# API Reference


## __name__
```python
from test_requirements_handling import __name__
```



---
## test_get_requirements_packages_empty_file
```python
from test_requirements_handling import test_get_requirements_packages_empty_file
```



---
## test_get_requirements_packages_with_content
```python
from test_requirements_handling import test_get_requirements_packages_with_content
```



---
## test_modify_requirements_install
```python
from test_requirements_handling import test_modify_requirements_install
```



---
## test_modify_requirements_uninstall
```python
from test_requirements_handling import test_modify_requirements_uninstall
```



---
## test_modify_requirements_nonexistent_file
```python
from test_requirements_handling import test_modify_requirements_nonexistent_file
```



---
## test_requirements_install_format
```python
from test_requirements_handling import test_requirements_install_format
```



---
## __name__
```python
from __init__ import __name__
```



---
## __name__
```python
from test_add_pip import __name__
```



---
## test_add_dependencies_to_pyproject
```python
from test_add_pip import test_add_dependencies_to_pyproject
```



---
## test_upgrade_from_requirements_file
```python
from test_add_pip import test_upgrade_from_requirements_file
```



---
## __name__
```python
from test_create import __name__
```



---
## test_create_project
```python
from test_create import test_create_project
```



---
## test_create_project_with_mkdocs
```python
from test_create import test_create_project_with_mkdocs
```



---
## test_create_project_without_cli
```python
from test_create import test_create_project_without_cli
```



---
## test_create_project_custom_python_version
```python
from test_create import test_create_project_custom_python_version
```



---
## test_create_project_classifiers_on_newlines
```python
from test_create import test_create_project_classifiers_on_newlines
```



---
## test_create_project_with_local_deps
```python
from test_create import test_create_project_with_local_deps
```



---
## test_create_project_no_deps
```python
from test_create import test_create_project_no_deps
```



---
## test_create_project_existing_directory
```python
from test_create import test_create_project_existing_directory
```



---
## test_create_project_with_documentation
```python
from test_create import test_create_project_with_documentation
```



---
## test_create_project_with_custom_python_version
```python
from test_create import test_create_project_with_custom_python_version
```



---
## test_create_project_existing_project
```python
from test_create import test_create_project_existing_project
```



---
## test_extract_docstrings
```python
from test_create import test_extract_docstrings
```



---
## test_mpip_create_and_mkdocs_serve
```python
from test_create import test_mpip_create_and_mkdocs_serve
```



---
## test_setup_documentation
```python
from test_create import test_setup_documentation
```



---
## walk_dict
```python
from test_create import walk_dict
```



---
## find_free_port
```python
from test_create import find_free_port
```



---
## __name__
```python
from test_mpip import __name__
```



---
## tmp_path
```python
from test_mpip import tmp_path
```



---
## test_upgrade_from_requirements_file
```python
from test_mpip import test_upgrade_from_requirements_file
```



---
## test_modify_dependencies
```python
from test_mpip import test_modify_dependencies
```



---
## test_pyproject_toml_formatting
```python
from test_mpip import test_pyproject_toml_formatting
```



---
## test_get_requirements_packages
```python
from test_mpip import test_get_requirements_packages
```



---
## test_search_parents_for_file_not_found
```python
from test_mpip import test_search_parents_for_file_not_found
```



---
## test_search_parents_for_file_max_levels
```python
from test_mpip import test_search_parents_for_file_max_levels
```



---
## test_search_parents_for_file_in_current_directory
```python
from test_mpip import test_search_parents_for_file_in_current_directory
```



---
## test_search_parents_for_file_found
```python
from test_mpip import test_search_parents_for_file_found
```



---
## __name__
```python
from test_pyproject_toml import __name__
```



---
## test_mpip_install_requirements
```python
from test_pyproject_toml import test_mpip_install_requirements
```



---
## test_mpip_install_upgrade
```python
from test_pyproject_toml import test_mpip_install_upgrade
```



---
## test_mpip_install_new_dependency
```python
from test_pyproject_toml import test_mpip_install_new_dependency
```



---
## test_mpip_install_requirements_variations
```python
from test_pyproject_toml import test_mpip_install_requirements_variations
```



---
## __name__
```python
from conf import __name__
```



---
## __name__
```python
from version import __name__
```



---
## __name__
```python
from create import __name__
```



---
## mmkdir
```python
from create import mmkdir
```



---
## mmtouch
```python
from create import mmtouch
```



---
## create_project
```python
from create import create_project
```



---
## setup_documentation
```python
from create import setup_documentation
```

Set up documentation for a project.

---
## setup_sphinx_docs
```python
from create import setup_sphinx_docs
```

Set up Sphinx documentation.

---
## extract_docstrings
```python
from create import extract_docstrings
```



---
## setup_mkdocs
```python
from create import setup_mkdocs
```



---
## create_pyproject_toml
```python
from create import create_pyproject_toml
```



---
## __name__
```python
from profile import __name__
```



---
## profile
```python
from profile import profile
```



---
## wrapper
```python
from profile import wrapper
```



---
## __name__
```python
from mpip import __name__
```

Synchronizes requirements and hatch pyproject.

---
## get_latest_version
```python
from mpip import get_latest_version
```

Gets the latest version of the specified package from PyPI.

Args:
    package_name (str): The name of the package to fetch the latest version for.

Returns:
    Optional[str]: The latest version of the package, or None if not found or on error.

---
## get_package_names
```python
from mpip import get_package_names
```

Fetch package names from PyPI search results.

---
## get_package_info
```python
from mpip import get_package_info
```

Retrieve detailed package information from PyPI JSON API.

---
## find_and_sort
```python
from mpip import find_and_sort
```

Find and sort potential packages by a specified key.

Args:
    query_key (str): The key to query for.
    limit (int): The maximum number of results to return.
    sort (str): The key to sort by. Defaults to None.
    verbose (bool): Whether to include verbose output.
    include (str or list): Additional information to include.
    release (str): Specific release to search for.

Returns:
    list[dict]: List of packages sorted by the specified key.

---
## modify_requirements
```python
from mpip import modify_requirements
```

Modify the requirements.txt file to install or uninstall a package.

Args:
    package_name (str): The name of the package to install or uninstall.
    package_version (str, optional): The version of the package to install. Defaults to None.
    action (str): The action to perform, either 'install' or 'uninstall'.
    requirements (str): The path to the requirements file. Defaults to "requirements.txt".

Raises:
    FileNotFoundError: If the requirements.txt file does not exist when attempting to read.

---
## is_group
```python
from mpip import is_group
```



---
## parse_dependencies
```python
from mpip import parse_dependencies
```



---
## split_dependencies
```python
from mpip import split_dependencies
```



---
## process_dependencies
```python
from mpip import process_dependencies
```



---
## format_dependency
```python
from mpip import format_dependency
```



---
## write_pyproject
```python
from mpip import write_pyproject
```

Write the modified pyproject.toml data back to the file.

---
## base_name
```python
from mpip import base_name
```

Extract the base package name from a package name with optional extras.

Args:
    package_name (str): The package name with optional extras.

Returns:
    str: The base package name without extras.

---
## name_and_version
```python
from mpip import name_and_version
```



---
## modify_pyproject_toml
```python
from mpip import modify_pyproject_toml
```

Modify the pyproject.toml file to update dependencies based on action.

Args:
    package_name (str): Name of the package to modify.
    package_version (str): Version of the package (optional).
    action (str): Action to perform, either 'install' or 'uninstall'.
    hatch_env (Optional[str]): Hatch environment to modify (if applicable).
    dependency_group (str): Dependency group to modify (default is 'dependencies').
    pyproject_path (str): Path to the pyproject.toml file.

Raises:
    FileNotFoundError: If pyproject.toml is not found.
    ValueError: If Hatch environment is specified but not found in pyproject.toml.

---
## modify_dependencies
```python
from mpip import modify_dependencies
```

Modify the dependencies list for installing or uninstalling a package.

Args:
    dependencies (List[str]): List of current dependencies.
    package_version_str (str): Package with version string to modify.
    action (str): Action to perform, either 'install' or 'uninstall'.

Returns:
    List[str]: Modified list of dependencies.

---
## search_parents_for_file
```python
from mpip import search_parents_for_file
```

Search parent directories for a file.

---
## find_toml_file
```python
from mpip import find_toml_file
```

Find the pyproject.toml file in the current directory or parent directories.

---
## get_requirements_packages
```python
from mpip import get_requirements_packages
```

Get the list of packages from the requirements.txt file.

Args:
    requirements (str): Path to the requirements file. Defaults to "requirements.txt".
    as_set (bool): Whether to return the result as a set. Defaults to True.

Returns:
    set or list: Packages listed in the requirements file.

---
## main
```python
from mpip import main
```



---
## __name__
```python
from cli import __name__
```



---
## cli
```python
from cli import cli
```

CLI for various AI agents.

---
## install_command
```python
from cli import install_command
```

Install packages and update requirements.txt and pyproject.toml accordingly.

Args:
    packages (tuple): Packages to install.
    requirements (str, optional): Requirements file to install packages from. Defaults to None.
    upgrade (bool, optional): Upgrade the package(s). Defaults to False.
    editable (bool, optional): Install a package in editable mode. Defaults to False.
    hatch_env (str, optional): The Hatch environment to use. Defaults to "default".
    dependency_group (str, optional): The dependency group to use. Defaults to "dependencies".
    debug (bool, optional): Enable debug logging. Defaults to False.

---
## uninstall_command
```python
from cli import uninstall_command
```

Uninstall packages and update requirements.txt and pyproject.toml accordingly.

Args:
    packages (tuple): Packages to uninstall.
    hatch_env (str, optional): The Hatch environment to use. Defaults to "default".
    dependency_group (str, optional): The dependency group to use. Defaults to "dependencies".
    debug (bool, optional): Enable debug logging. Defaults to False.

---
## show_command
```python
from cli import show_command
```

Show the dependencies from the pyproject.toml file.

Args:
    package (str, optional): The package to show information about. Defaults to None.
    hatch_env (str, optional): The Hatch environment to use. Defaults to "default".

---
## search_command
```python
from cli import search_command
```

Find a package on PyPI and optionally sort the results.

Args:
    package (str): The package to search for.s
    limit (int, optional): Limit the number of results. Defaults to 5.
    sort (str, optional): Sort key to use. Defaults to "downloads".
    include (str, optional): Include pre-release versions. Defaults to None.
    release (str, optional): Release type to use. Defaults to None.
    debug (bool, optional): Enable debug logging. Defaults to False.

---
## info_command
```python
from cli import info_command
```

Get information about a package from PyPI.

Args:
    package (str): The package to get information about.
    verbose (bool, optional): Show detailed output. Defaults to False.

---
## create_command
```python
from cli import create_command
```

Create a new Python project. Optionally add dependencies and a CLI.

---
## publish_command
```python
from cli import publish_command
```

Publish a package to a Notion table.

---
## run_cli_command
```python
from cli import run_cli_command
```

Run a command.

---
## main
```python
from cli import main
```

The [link=https://github.com/ewels/rich-click]rich-click[/] CLI provides attractive help output from any
tool using [link=https://click.palletsprojects.com/]click[/], formatted with
[link=https://github.com/Textualize/rich]rich[/].

The rich-click command line tool can be prepended before any Python package
using native click to provide attractive richified click help output.

For example, if you have a package called [argument]my_package[/] that uses click,
you can run:

>>> [command]rich-click[/] [argument]my_package[/] [option]--help[/]

This does not always work if the package is using customised [b]click.group()[/]
or [b]click.command()[/] classes.
If in doubt, please suggest to the authors that they use rich_click within their
tool natively - this will always give a better experience.

You can also use this tool to print your own RichCommands as HTML with the
--html flag.

---
## __name__
```python
from __about__ import __name__
```

Package metadata/info

---
## __name__
```python
from static import __name__
```



---
## __name__
```python
from commands import __name__
```



---
## NewCommandContext
```python
from commands import NewCommandContext
```



---
## PtyCommand
```python
from commands import PtyCommand
```



---
## cli
```python
from commands import cli
```



---
## run_command_background
```python
from commands import run_command_background
```



---
## run_command_remote
```python
from commands import run_command_remote
```



---
## run_command_stream
```python
from commands import run_command_stream
```



---
## run_command
```python
from commands import run_command
```



---
## run
```python
from commands import run
```



---
## sigwinch_passthrough
```python
from commands import sigwinch_passthrough
```



---
## run_local
```python
from commands import run_local
```



---
## interact
```python
from commands import interact
```



---
## progress
```python
from commands import progress
```



---
## main
```python
from commands import main
```



---
## __init__
```python
from commands import __init__
```



---
## __class_getitem__
```python
from commands import __class_getitem__
```



---
## start
```python
from commands import start
```



---
## __contains__
```python
from commands import __contains__
```



---
## inbackground
```python
from commands import inbackground
```



---
## inbg
```python
from commands import inbg
```



---
## streamlines
```python
from commands import streamlines
```



---
## readlines
```python
from commands import readlines
```



---
## __iter__
```python
from commands import __iter__
```



---
## __str__
```python
from commands import __str__
```



---
## __enter__
```python
from commands import __enter__
```



---
## __exit__
```python
from commands import __exit__
```



---
## __name__
```python
from publish import __name__
```



---
## append_notion_table_row
```python
from publish import append_notion_table_row
```

Appends a new row to a Notion table using the Notion SDK. Supports fields like `title`, `select`, `multi_select`, `checkbox`, and `rich_text`. Optionally adds page content if provided.

Args:
    new_data (dict): Row data where keys are column names and values are content. Supported types:
        - `title` (str): Primary title field.
        - `select` (str): Single option from a predefined list.
        - `multi_select` (list of str): Multiple options from a predefined list.
        - `checkbox` (bool): True/False field.
        - `rich_text` (str): Text with formatting support.
    page_content (list, optional): A list of blocks (e.g., paragraphs, bullet points) to append to the page linked to the first column (`Instruction`).
    debug (bool, optional): If True, logs debug information about the created row and response.

Example:
    new_data = {
        "Instruction": "New Task",  # Title
        "Status": "In Progress",  # Select
        "Tags": ["Priority", "Development"],  # MultiSelect
        "Complete": False,  # Checkbox
        "Comments": "Sample comment"  # Rich Text
    }

Example:
    page_content = [
        {"type": "paragraph", "content": "Task description"},
        {"type": "bulleted_list_item", "content": "First action point"}
    ]

Returns:
    None

---
## __name__
```python
from markdown2 import __name__
```

A fast and complete Python implementation of Markdown.

[from http://daringfireball.net/projects/markdown/]
> Markdown is a text-to-HTML filter; it translates an easy-to-read /
> easy-to-write structured text format into HTML.  Markdown's text
> format is most similar to that of plain text email, and supports
> features such as headers, *emphasis*, code blocks, blockquotes, and
> links.
>
> Markdown's syntax is designed not as a generic markup language, but
> specifically to serve as a front-end to (X)HTML. You can use span-level
> HTML tags anywhere in a Markdown document, and you can use block level
> HTML tags (like <div> and <table> as well).

Module usage:

    >>> import markdown2
    >>> markdown2.markdown("*boo!*")  # or use `html = markdown_path(PATH)`
    u'<p><em>boo!</em></p>\n'

    >>> markdowner = Markdown()
    >>> markdowner.convert("*boo!*")
    u'<p><em>boo!</em></p>\n'
    >>> markdowner.convert("**boom!**")
    u'<p><strong>boom!</strong></p>\n'

This implementation of Markdown implements the full "core" syntax plus a
number of extras (e.g., code syntax coloring, footnotes) as described on
<https://github.com/trentm/python-markdown2/wiki/Extras>.

---
## _hash_text
```python
from markdown2 import _hash_text
```



---
## MarkdownError
```python
from markdown2 import MarkdownError
```



---
## markdown_path
```python
from markdown2 import markdown_path
```



---
## markdown
```python
from markdown2 import markdown
```



---
## Stage
```python
from markdown2 import Stage
```



---
## mark_stage
```python
from markdown2 import mark_stage
```

Decorator that handles executing relevant `Extra`s before and after this `Stage` executes.

---
## Markdown
```python
from markdown2 import Markdown
```



---
## MarkdownWithExtras
```python
from markdown2 import MarkdownWithExtras
```

A markdowner class that enables most extras:

- footnotes
- fenced-code-blocks (only highlights code if 'pygments' Python module on path)

These are not included:
- pyshell (specific to Python-related documenting)
- code-friendly (because it *disables* part of the syntax)
- link-patterns (because you need to specify some actual
  link-patterns anyway)

---
## Extra
```python
from markdown2 import Extra
```



---
## ItalicAndBoldProcessor
```python
from markdown2 import ItalicAndBoldProcessor
```

An ABC that provides hooks for dealing with italics and bold syntax.
This class is set to trigger both before AND after the italics and bold stage.
This allows any child classes to intercept instances of bold or italic syntax and
change the output or hash it to prevent it from being processed.

After the I&B stage any hashes in the `hash_tables` instance variable are replaced.

---
## Admonitions
```python
from markdown2 import Admonitions
```

Enable parsing of RST admonitions

---
## _BreaksExtraOpts
```python
from markdown2 import _BreaksExtraOpts
```

Options for the `Breaks` extra

---
## Breaks
```python
from markdown2 import Breaks
```



---
## CodeFriendly
```python
from markdown2 import CodeFriendly
```

Disable _ and __ for em and strong.

---
## FencedCodeBlocks
```python
from markdown2 import FencedCodeBlocks
```

Allows a code block to not have to be indented
by fencing it with '```' on a line before and after. Based on
<http://github.github.com/github-flavored-markdown/> with support for
syntax highlighting.

---
## Latex
```python
from markdown2 import Latex
```

Convert $ and $$ to <math> and </math> tags for inline and block math.

---
## LinkPatterns
```python
from markdown2 import LinkPatterns
```

Auto-link given regex patterns in text (e.g. bug number
references, revision number references).

---
## MarkdownInHTML
```python
from markdown2 import MarkdownInHTML
```

Allow the use of `markdown="1"` in a block HTML tag to
have markdown processing be done on its contents. Similar to
<http://michelf.com/projects/php-markdown/extra/#markdown-attr> but with
some limitations.

---
## Mermaid
```python
from markdown2 import Mermaid
```



---
## MiddleWordEm
```python
from markdown2 import MiddleWordEm
```

Allows or disallows emphasis syntax in the middle of words,
defaulting to allow. Disabling this means that `this_text_here` will not be
converted to `this<em>text</em>here`.

---
## Numbering
```python
from markdown2 import Numbering
```

Support of generic counters.  Non standard extension to
allow sequential numbering of figures, tables, equations, exhibits etc.

---
## PyShell
```python
from markdown2 import PyShell
```

Treats unindented Python interactive shell sessions as <code>
blocks.

---
## SmartyPants
```python
from markdown2 import SmartyPants
```

Replaces ' and " with curly quotation marks or curly
apostrophes.  Replaces --, ---, ..., and . . . with en dashes, em dashes,
and ellipses.

---
## Strike
```python
from markdown2 import Strike
```

Text inside of double tilde is ~~strikethrough~~

---
## Tables
```python
from markdown2 import Tables
```

Tables using the same format as GFM
<https://help.github.com/articles/github-flavored-markdown#tables> and
PHP-Markdown Extra <https://michelf.ca/projects/php-markdown/extra/#table>.

---
## TelegramSpoiler
```python
from markdown2 import TelegramSpoiler
```



---
## Underline
```python
from markdown2 import Underline
```

Text inside of double dash is --underlined--.

---
## _WavedromExtraOpts
```python
from markdown2 import _WavedromExtraOpts
```

Options for the `Wavedrom` extra

---
## Wavedrom
```python
from markdown2 import Wavedrom
```

Support for generating Wavedrom digital timing diagrams

---
## WikiTables
```python
from markdown2 import WikiTables
```

Google Code Wiki-style tables. See
<http://code.google.com/p/support/wiki/WikiSyntax#Tables>.

---
## calculate_toc_html
```python
from markdown2 import calculate_toc_html
```

Return the HTML for the current TOC.

This expects the `_toc` attribute to have been set on this instance.

---
## UnicodeWithAttrs
```python
from markdown2 import UnicodeWithAttrs
```

A subclass of unicode used for the return value of conversion to
possibly attach some attributes. E.g. the "toc_html" attribute when
the "toc" extra is used.

---
## _slugify
```python
from markdown2 import _slugify
```

Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.

From Django's "django/template/defaultfilters.py".

---
## _curry
```python
from markdown2 import _curry
```



---
## _regex_from_encoded_pattern
```python
from markdown2 import _regex_from_encoded_pattern
```

'foo'    -> re.compile(re.escape('foo'))
'/foo/'  -> re.compile('foo')
'/foo/i' -> re.compile('foo', re.I)

---
## _dedentlines
```python
from markdown2 import _dedentlines
```

_dedentlines(lines, tabsize=8, skip_first_line=False) -> dedented lines

    "lines" is a list of lines to dedent.
    "tabsize" is the tab width to use for indent width calculations.
    "skip_first_line" is a boolean indicating if the first line should
        be skipped for calculating the indent width and for dedenting.
        This is sometimes useful for docstrings and similar.

Same as dedent() except operates on a sequence of lines. Note: the
lines list is modified **in-place**.

---
## _dedent
```python
from markdown2 import _dedent
```

_dedent(text, tabsize=8, skip_first_line=False) -> dedented text

    "text" is the text to dedent.
    "tabsize" is the tab width to use for indent width calculations.
    "skip_first_line" is a boolean indicating if the first line should
        be skipped for calculating the indent width and for dedenting.
        This is sometimes useful for docstrings and similar.

textwrap.dedent(s), but don't expand tabs to spaces

---
## _memoized
```python
from markdown2 import _memoized
```

Decorator that caches a function's return value each time it is called.
If called later with the same arguments, the cached value is returned, and
not re-evaluated.

http://wiki.python.org/moin/PythonDecoratorLibrary

---
## _xml_oneliner_re_from_tab_width
```python
from markdown2 import _xml_oneliner_re_from_tab_width
```

Standalone XML processing instruction regex.

---
## _hr_tag_re_from_tab_width
```python
from markdown2 import _hr_tag_re_from_tab_width
```



---
## _xml_escape_attr
```python
from markdown2 import _xml_escape_attr
```

Escape the given string for use in an HTML/XML tag attribute.

By default this doesn't bother with escaping `'` to `&#39;`, presuming that
the tag attribute is surrounded by double quotes.

---
## _xml_encode_email_char_at_random
```python
from markdown2 import _xml_encode_email_char_at_random
```



---
## _html_escape_url
```python
from markdown2 import _html_escape_url
```

Replace special characters that are potentially malicious in url string.

Args:
    charset: don't escape characters from this charset. Currently the only
        exception is for '+' when charset=='base64'

---
## _NoReflowFormatter
```python
from markdown2 import _NoReflowFormatter
```

An argparse formatter that does NOT reflow the description.

---
## _test
```python
from markdown2 import _test
```



---
## main
```python
from markdown2 import main
```



---
## wrapper
```python
from markdown2 import wrapper
```



---
## __init__
```python
from markdown2 import __init__
```



---
## reset
```python
from markdown2 import reset
```



---
## _setup_extras
```python
from markdown2 import _setup_extras
```



---
## convert
```python
from markdown2 import convert
```

Convert the given text.

---
## postprocess
```python
from markdown2 import postprocess
```

A hook for subclasses to do some postprocessing of the html, if
desired. This is called before unescaping of special chars and
unhashing of raw HTML spans.

---
## preprocess
```python
from markdown2 import preprocess
```

A hook for subclasses to do some preprocessing of the Markdown, if
desired. This is called after basic formatting of the text, but prior
to any extras, safe mode, etc. processing.

---
## _extract_metadata
```python
from markdown2 import _extract_metadata
```



---
## _emacs_vars_oneliner_sub
```python
from markdown2 import _emacs_vars_oneliner_sub
```



---
## _get_emacs_vars
```python
from markdown2 import _get_emacs_vars
```

Return a dictionary of emacs-style local variables.

Parsing is done loosely according to this spec (and according to
some in-practice deviations from this):
http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables

---
## _detab_line
```python
from markdown2 import _detab_line
```

Recusively convert tabs to spaces in a single line.

Called from _detab().

---
## _detab
```python
from markdown2 import _detab
```

Iterate text line by line and convert tabs to spaces.

>>> m = Markdown()
>>> m._detab("\tfoo")
'    foo'
>>> m._detab("  \tfoo")
'    foo'
>>> m._detab("\t  foo")
'      foo'
>>> m._detab("  foo")
'  foo'
>>> m._detab("  foo\n\tbar\tblam")
'  foo\n    bar blam'

---
## _hash_html_block_sub
```python
from markdown2 import _hash_html_block_sub
```



---
## _hash_html_blocks
```python
from markdown2 import _hash_html_blocks
```

Hashify HTML blocks

We only want to do this for block-level HTML tags, such as headers,
lists, and tables. That's because we still want to wrap <p>s around
"paragraphs" that are wrapped in non-block-level tags, such as anchors,
phrase emphasis, and spans. The list of tags we're looking for is
hard-coded.

@param raw {boolean} indicates if these are raw HTML blocks in
    the original source. It makes a difference in "safe" mode.

---
## _strict_tag_block_sub
```python
from markdown2 import _strict_tag_block_sub
```

Finds and substitutes HTML blocks within blocks of text

Args:
    text: the text to search
    html_tags_re: a regex pattern of HTML block tags to match against.
        For example, `Markdown._block_tags_a`
    callback: callback function that receives the found HTML text block and returns a new str
    allow_indent: allow matching HTML blocks that are not completely outdented

---
## _tag_is_closed
```python
from markdown2 import _tag_is_closed
```



---
## _strip_link_definitions
```python
from markdown2 import _strip_link_definitions
```



---
## _extract_link_def_sub
```python
from markdown2 import _extract_link_def_sub
```



---
## _extract_footnote_def_sub
```python
from markdown2 import _extract_footnote_def_sub
```



---
## _strip_footnote_definitions
```python
from markdown2 import _strip_footnote_definitions
```

A footnote definition looks like this:

    [^note-id]: Text of the note.

        May include one or more indented paragraphs.

Where,
- The 'note-id' can be pretty much anything, though typically it
  is the number of the footnote.
- The first paragraph may start on the next line, like so:

    [^note-id]:
        Text of the note.

---
## _run_block_gamut
```python
from markdown2 import _run_block_gamut
```



---
## _run_span_gamut
```python
from markdown2 import _run_span_gamut
```



---
## _escape_special_chars
```python
from markdown2 import _escape_special_chars
```



---
## _hash_html_spans
```python
from markdown2 import _hash_html_spans
```



---
## _unhash_html_spans
```python
from markdown2 import _unhash_html_spans
```



---
## _sanitize_html
```python
from markdown2 import _sanitize_html
```



---
## _find_non_whitespace
```python
from markdown2 import _find_non_whitespace
```

Returns the index of the first non-whitespace character in text
after (and including) start

---
## _find_balanced
```python
from markdown2 import _find_balanced
```

Returns the index where the open_c and close_c characters balance
out - the same number of open_c and close_c are encountered - or the
end of string if it's reached before the balance point is found.

---
## _extract_url_and_title
```python
from markdown2 import _extract_url_and_title
```

Extracts the url and (optional) title from the tail of a link

---
## _protect_url
```python
from markdown2 import _protect_url
```

Function that passes a URL through `_html_escape_url` to remove any nasty characters,
and then hashes the now "safe" URL to prevent other safety mechanisms from tampering
with it (eg: escaping "&" in URL parameters)

---
## _safe_href
```python
from markdown2 import _safe_href
```

_safe_href is adapted from pagedown's Markdown.Sanitizer.js
From: https://github.com/StackExchange/pagedown/blob/master/LICENSE.txt
Original Showdown code copyright (c) 2007 John Fraser
Modifications and bugfixes (c) 2009 Dana Robinson
Modifications and bugfixes (c) 2009-2014 Stack Exchange Inc.

---
## _do_links
```python
from markdown2 import _do_links
```

Turn Markdown link shortcuts into XHTML <a> and <img> tags.

This is a combination of Markdown.pl's _DoAnchors() and
_DoImages(). They are done together because that simplified the
approach. It was necessary to use a different approach than
Markdown.pl because of the lack of atomic matching support in
Python's regex engine used in $g_nested_brackets.

---
## header_id_from_text
```python
from markdown2 import header_id_from_text
```

Generate a header id attribute value from the given header
HTML content.

This is only called if the "header-ids" extra is enabled.
Subclasses may override this for different header ids.

@param text {str} The text of the header tag
@param prefix {str} The requested prefix for header ids. This is the
    value of the "header-ids" extra key, if any. Otherwise, None.
@param n {int} (unused) The <hN> tag number, i.e. `1` for an <h1> tag.
@returns {str} The value for the header tag's "id" attribute. Return
    None to not have an id attribute and to exclude this header from
    the TOC (if the "toc" extra is specified).

---
## _header_id_exists
```python
from markdown2 import _header_id_exists
```



---
## _toc_add_entry
```python
from markdown2 import _toc_add_entry
```



---
## _h_sub
```python
from markdown2 import _h_sub
```

Handles processing markdown headers

---
## _h_tag_sub
```python
from markdown2 import _h_tag_sub
```

Different to `_h_sub` in that this function handles existing HTML headers

---
## _do_headers
```python
from markdown2 import _do_headers
```



---
## _list_sub
```python
from markdown2 import _list_sub
```



---
## _do_lists
```python
from markdown2 import _do_lists
```



---
## _task_list_item_sub
```python
from markdown2 import _task_list_item_sub
```



---
## _list_item_sub
```python
from markdown2 import _list_item_sub
```



---
## _process_list_items
```python
from markdown2 import _process_list_items
```



---
## _get_pygments_lexer
```python
from markdown2 import _get_pygments_lexer
```

Returns:
`pygments.Lexer` or None if a lexer matching `lexer_name` is
not found

---
## _color_with_pygments
```python
from markdown2 import _color_with_pygments
```

TODO: this function is only referenced by the `FencedCodeBlocks`
extra. May be worth moving over there

Args:
    codeblock: the codeblock to highlight
    lexer (pygments.Lexer): lexer to use
    formatter_opts: pygments HtmlFormatter options

---
## _code_block_sub
```python
from markdown2 import _code_block_sub
```



---
## _html_class_str_from_tag
```python
from markdown2 import _html_class_str_from_tag
```

Get the appropriate ' class="..."' string (note the leading
space), if any, for the given tag.

---
## _do_code_blocks
```python
from markdown2 import _do_code_blocks
```

Process Markdown `<pre><code>` blocks.

---
## _code_span_sub
```python
from markdown2 import _code_span_sub
```



---
## _do_code_spans
```python
from markdown2 import _do_code_spans
```



---
## _encode_code
```python
from markdown2 import _encode_code
```

Encode/escape certain characters inside Markdown code runs.
The point is that in code, these characters are literals,
and lose their special Markdown meanings.

---
## _do_italics_and_bold
```python
from markdown2 import _do_italics_and_bold
```



---
## _dedent_two_spaces_sub
```python
from markdown2 import _dedent_two_spaces_sub
```



---
## _block_quote_sub
```python
from markdown2 import _block_quote_sub
```



---
## _do_block_quotes
```python
from markdown2 import _do_block_quotes
```



---
## _form_paragraphs
```python
from markdown2 import _form_paragraphs
```



---
## _add_footnotes
```python
from markdown2 import _add_footnotes
```



---
## _encode_amps_and_angles
```python
from markdown2 import _encode_amps_and_angles
```



---
## _encode_incomplete_tags
```python
from markdown2 import _encode_incomplete_tags
```



---
## _encode_backslash_escapes
```python
from markdown2 import _encode_backslash_escapes
```



---
## _auto_link_sub
```python
from markdown2 import _auto_link_sub
```



---
## _auto_email_link_sub
```python
from markdown2 import _auto_email_link_sub
```



---
## _do_auto_links
```python
from markdown2 import _do_auto_links
```



---
## _encode_email_address
```python
from markdown2 import _encode_email_address
```



---
## _unescape_special_chars
```python
from markdown2 import _unescape_special_chars
```



---
## _outdent
```python
from markdown2 import _outdent
```



---
## _uniform_outdent
```python
from markdown2 import _uniform_outdent
```

Removes the smallest common leading indentation from each (non empty)
line of `text` and returns said indent along with the outdented text.

Args:
    min_outdent: make sure the smallest common whitespace is at least this size
    max_outdent: the maximum amount a line can be outdented by

---
## _uniform_indent
```python
from markdown2 import _uniform_indent
```

Uniformly indent a block of text by a fixed amount

Args:
    text: the text to indent
    indent: a string containing the indent to apply
    include_empty_lines: don't remove whitespace only lines
    indent_empty_lines: indent whitespace only lines with the rest of the text

---
## _match_overlaps_substr
```python
from markdown2 import _match_overlaps_substr
```

Checks if a regex match overlaps with a substring in the given text.

---
## deregister
```python
from markdown2 import deregister
```

Removes the class from the extras registry and unsets its execution order.

---
## register
```python
from markdown2 import register
```

Registers the class for use with `Markdown` and calculates its execution order based on
the `order` class attribute.

---
## run
```python
from markdown2 import run
```



---
## test
```python
from markdown2 import test
```



---
## sub
```python
from markdown2 import sub
```



---
## sub_hash
```python
from markdown2 import sub_hash
```



---
## _code_block_with_lexer_sub
```python
from markdown2 import _code_block_with_lexer_sub
```

Args:
codeblock: the codeblock to format
leading_indent: the indentation to prefix the block with
lexer (pygments.Lexer): the lexer to use

---
## tags
```python
from markdown2 import tags
```



---
## _convert_single_match
```python
from markdown2 import _convert_single_match
```



---
## _convert_double_match
```python
from markdown2 import _convert_double_match
```



---
## code_placeholder
```python
from markdown2 import code_placeholder
```



---
## contractions
```python
from markdown2 import contractions
```



---
## indent
```python
from markdown2 import indent
```



---
## result
```python
from markdown2 import result
```



---
## __call__
```python
from markdown2 import __call__
```



---
## __repr__
```python
from markdown2 import __repr__
```

Return the function's docstring.

---
## format_description
```python
from markdown2 import format_description
```



---
## inner
```python
from markdown2 import inner
```



---
## parse_structured_value
```python
from markdown2 import parse_structured_value
```



---
## _is_auto_link
```python
from markdown2 import _is_auto_link
```



---
## _is_code_span
```python
from markdown2 import _is_code_span
```



---
## _is_comment
```python
from markdown2 import _is_comment
```



---
## _hash
```python
from markdown2 import _hash
```



---
## HtmlCodeFormatter
```python
from markdown2 import HtmlCodeFormatter
```



---
## incomplete_tags_sub
```python
from markdown2 import incomplete_tags_sub
```



---
## unhash_code
```python
from markdown2 import unhash_code
```



---
## callback
```python
from markdown2 import callback
```



---
## add_hline
```python
from markdown2 import add_hline
```



---
## format_cell
```python
from markdown2 import format_cell
```



---
## _wrap_code
```python
from markdown2 import _wrap_code
```

A function for use in a Pygments Formatter which
wraps in <code> tags.

---
## _add_newline
```python
from markdown2 import _add_newline
```



---
## wrap
```python
from markdown2 import wrap
```

Return the source with a code, pre, and div.

---
## toc_sort
```python
from markdown2 import toc_sort
```

Sort the TOC by order of appearance in text

---
## __name__
```python
from pylab import __name__
```

`pylab` is a historic interface and its use is strongly discouraged. The equivalent
replacement is `matplotlib.pyplot`.  See :ref:`api_interfaces` for a full overview
of Matplotlib interfaces.

`pylab` was designed to support a MATLAB-like way of working with all plotting related
functions directly available in the global namespace. This was achieved through a
wildcard import (``from pylab import *``).

.. warning::
   The use of `pylab` is discouraged for the following reasons:

   ``from pylab import *`` imports all the functions from `matplotlib.pyplot`, `numpy`,
   `numpy.fft`, `numpy.linalg`, and `numpy.random`, and some additional functions into
   the global namespace.

   Such a pattern is considered bad practice in modern python, as it clutters the global
   namespace. Even more severely, in the case of `pylab`, this will overwrite some
   builtin functions (e.g. the builtin `sum` will be replaced by `numpy.sum`), which
   can lead to unexpected behavior.

---
## __name__
```python
from ghp_import import __name__
```



---
## GhpError
```python
from ghp_import import GhpError
```



---
## Git
```python
from ghp_import import Git
```



---
## mk_when
```python
from ghp_import import mk_when
```



---
## start_commit
```python
from ghp_import import start_commit
```



---
## add_file
```python
from ghp_import import add_file
```



---
## add_nojekyll
```python
from ghp_import import add_nojekyll
```



---
## add_cname
```python
from ghp_import import add_cname
```



---
## gitpath
```python
from ghp_import import gitpath
```



---
## run_import
```python
from ghp_import import run_import
```



---
## options
```python
from ghp_import import options
```



---
## ghp_import
```python
from ghp_import import ghp_import
```



---
## main
```python
from ghp_import import main
```



---
## __init__
```python
from ghp_import import __init__
```



---
## enc
```python
from ghp_import import enc
```



---
## dec
```python
from ghp_import import dec
```



---
## write
```python
from ghp_import import write
```



---
## check_repo
```python
from ghp_import import check_repo
```



---
## try_rebase
```python
from ghp_import import try_rebase
```



---
## get_config
```python
from ghp_import import get_config
```



---
## get_prev_commit
```python
from ghp_import import get_prev_commit
```



---
## open
```python
from ghp_import import open
```



---
## call
```python
from ghp_import import call
```



---
## check_call
```python
from ghp_import import check_call
```



---
## __name__
```python
from proxytypes import __name__
```

Based on the implementation here by Phillip J. Eby:
https://pypi.python.org/pypi/ProxyTypes

---
## ProxyMetaClass
```python
from proxytypes import ProxyMetaClass
```



---
## Proxy
```python
from proxytypes import Proxy
```

Proxy for any python object. Base class for other proxies.

:attr:`__subject__` is the only non-proxied attribute, and contains the
    proxied object

---
## CallbackProxy
```python
from proxytypes import CallbackProxy
```

Proxy for a callback result. Callback is called on each use.

---
## LazyProxy
```python
from proxytypes import LazyProxy
```

Proxy for a callback result, that is cached on first use.

---
## notproxied
```python
from proxytypes import notproxied
```

Decorator to add methods to the __notproxied__ list

---
## __new__
```python
from proxytypes import __new__
```



---
## __setattr__
```python
from proxytypes import __setattr__
```



---
## _no_proxy
```python
from proxytypes import _no_proxy
```

Returns a wrapped version of `method`, such that proxying is turned off
during the method call.

---
## __init__
```python
from proxytypes import __init__
```



---
## _should_proxy
```python
from proxytypes import _should_proxy
```

Determines whether `attr` should be looked up on the proxied object, or
the proxy itself.

---
## __getattribute__
```python
from proxytypes import __getattribute__
```



---
## __delattr__
```python
from proxytypes import __delattr__
```



---
## __call__
```python
from proxytypes import __call__
```



---
## add_proxy_meth
```python
from proxytypes import add_proxy_meth
```

Add a method `name` to the class, which returns the value of `func`,
called with the proxied value inserted at `arg_pos`

---
## __subject__
```python
from proxytypes import __subject__
```



---
## wrapper
```python
from proxytypes import wrapper
```



---
## proxied
```python
from proxytypes import proxied
```



---
## __name__
```python
from yaml_env_tag import __name__
```

A custom YAML tag for referencing environment variables in YAML files. 

---
## construct_env_tag
```python
from yaml_env_tag import construct_env_tag
```

Assign value of ENV variable referenced at node.

---
## __name__
```python
from mypy_extensions import __name__
```

Defines experimental extensions to the standard "typing" module that are
supported by the mypy typechecker.

Example usage:
    from mypy_extensions import TypedDict

---
## _check_fails
```python
from mypy_extensions import _check_fails
```



---
## _dict_new
```python
from mypy_extensions import _dict_new
```



---
## _typeddict_new
```python
from mypy_extensions import _typeddict_new
```



---
## _TypedDictMeta
```python
from mypy_extensions import _TypedDictMeta
```



---
## Arg
```python
from mypy_extensions import Arg
```

A normal positional argument

---
## DefaultArg
```python
from mypy_extensions import DefaultArg
```

A positional argument with a default value

---
## NamedArg
```python
from mypy_extensions import NamedArg
```

A keyword-only argument

---
## DefaultNamedArg
```python
from mypy_extensions import DefaultNamedArg
```

A keyword-only argument with a default value

---
## VarArg
```python
from mypy_extensions import VarArg
```

A *args-style variadic positional argument

---
## KwArg
```python
from mypy_extensions import KwArg
```

A **kwargs-style variadic keyword argument

---
## NoReturn
```python
from mypy_extensions import NoReturn
```



---
## trait
```python
from mypy_extensions import trait
```



---
## mypyc_attr
```python
from mypy_extensions import mypyc_attr
```



---
## _FlexibleAliasClsApplied
```python
from mypy_extensions import _FlexibleAliasClsApplied
```



---
## _FlexibleAliasCls
```python
from mypy_extensions import _FlexibleAliasCls
```



---
## _NativeIntMeta
```python
from mypy_extensions import _NativeIntMeta
```



---
## i64
```python
from mypy_extensions import i64
```



---
## i32
```python
from mypy_extensions import i32
```



---
## i16
```python
from mypy_extensions import i16
```



---
## u8
```python
from mypy_extensions import u8
```



---
## __new__
```python
from mypy_extensions import __new__
```



---
## __init__
```python
from mypy_extensions import __init__
```



---
## __getitem__
```python
from mypy_extensions import __getitem__
```



---
## __instancecheck__
```python
from mypy_extensions import __instancecheck__
```



---
## __name__
```python
from six import __name__
```

Utilities for writing code that runs on Python 2 and 3

---
## _add_doc
```python
from six import _add_doc
```

Add documentation to a function.

---
## _import_module
```python
from six import _import_module
```

Import module, returning the module after the last dot.

---
## _LazyDescr
```python
from six import _LazyDescr
```



---
## MovedModule
```python
from six import MovedModule
```



---
## _LazyModule
```python
from six import _LazyModule
```



---
## MovedAttribute
```python
from six import MovedAttribute
```



---
## _SixMetaPathImporter
```python
from six import _SixMetaPathImporter
```

A meta path importer to import six.moves and its submodules.

This class implements a PEP302 finder and loader. It should be compatible
with Python 2.5 and all existing versions of Python3

---
## _MovedItems
```python
from six import _MovedItems
```

Lazy loading of moved objects

---
## Module_six_moves_urllib_parse
```python
from six import Module_six_moves_urllib_parse
```

Lazy loading of moved objects in six.moves.urllib_parse

---
## Module_six_moves_urllib_error
```python
from six import Module_six_moves_urllib_error
```

Lazy loading of moved objects in six.moves.urllib_error

---
## Module_six_moves_urllib_request
```python
from six import Module_six_moves_urllib_request
```

Lazy loading of moved objects in six.moves.urllib_request

---
## Module_six_moves_urllib_response
```python
from six import Module_six_moves_urllib_response
```

Lazy loading of moved objects in six.moves.urllib_response

---
## Module_six_moves_urllib_robotparser
```python
from six import Module_six_moves_urllib_robotparser
```

Lazy loading of moved objects in six.moves.urllib_robotparser

---
## Module_six_moves_urllib
```python
from six import Module_six_moves_urllib
```

Create a six.moves.urllib namespace that resembles the Python 3 namespace

---
## add_move
```python
from six import add_move
```

Add an item to six.moves.

---
## remove_move
```python
from six import remove_move
```

Remove item from six.moves.

---
## assertCountEqual
```python
from six import assertCountEqual
```



---
## assertRaisesRegex
```python
from six import assertRaisesRegex
```



---
## assertRegex
```python
from six import assertRegex
```



---
## assertNotRegex
```python
from six import assertNotRegex
```



---
## with_metaclass
```python
from six import with_metaclass
```

Create a base class with a metaclass.

---
## add_metaclass
```python
from six import add_metaclass
```

Class decorator for creating a class with a metaclass.

---
## ensure_binary
```python
from six import ensure_binary
```

Coerce **s** to six.binary_type.

For Python 2:
  - `unicode` -> encoded to `str`
  - `str` -> `str`

For Python 3:
  - `str` -> encoded to `bytes`
  - `bytes` -> `bytes`

---
## ensure_str
```python
from six import ensure_str
```

Coerce *s* to `str`.

For Python 2:
  - `unicode` -> encoded to `str`
  - `str` -> `str`

For Python 3:
  - `str` -> `str`
  - `bytes` -> decoded to `str`

---
## ensure_text
```python
from six import ensure_text
```

Coerce *s* to six.text_type.

For Python 2:
  - `unicode` -> `unicode`
  - `str` -> `unicode`

For Python 3:
  - `str` -> `str`
  - `bytes` -> decoded to `str`

---
## python_2_unicode_compatible
```python
from six import python_2_unicode_compatible
```

A class decorator that defines __unicode__ and __str__ methods under Python 2.
Under Python 3 it does nothing.

To support Python 2 and 3 with a single code base, define a __str__ method
returning text and apply this decorator to the class.

---
## __init__
```python
from six import __init__
```



---
## __get__
```python
from six import __get__
```



---
## _resolve
```python
from six import _resolve
```



---
## __getattr__
```python
from six import __getattr__
```



---
## __dir__
```python
from six import __dir__
```



---
## _add_module
```python
from six import _add_module
```



---
## _get_module
```python
from six import _get_module
```



---
## find_module
```python
from six import find_module
```



---
## find_spec
```python
from six import find_spec
```



---
## __get_module
```python
from six import __get_module
```



---
## load_module
```python
from six import load_module
```



---
## is_package
```python
from six import is_package
```

Return true, if the named module is a package.

We need this method to get correct spec objects with
Python 3.4 (see PEP451)

---
## get_code
```python
from six import get_code
```

Return None

Required, if is_package is implemented

---
## create_module
```python
from six import create_module
```



---
## exec_module
```python
from six import exec_module
```



---
## get_unbound_function
```python
from six import get_unbound_function
```



---
## create_unbound_method
```python
from six import create_unbound_method
```



---
## create_bound_method
```python
from six import create_bound_method
```



---
## Iterator
```python
from six import Iterator
```



---
## iterkeys
```python
from six import iterkeys
```



---
## itervalues
```python
from six import itervalues
```



---
## iteritems
```python
from six import iteritems
```



---
## iterlists
```python
from six import iterlists
```



---
## b
```python
from six import b
```



---
## u
```python
from six import u
```



---
## byte2int
```python
from six import byte2int
```



---
## indexbytes
```python
from six import indexbytes
```



---
## reraise
```python
from six import reraise
```



---
## exec_
```python
from six import exec_
```

Execute code in a namespace.

---
## raise_from
```python
from six import raise_from
```



---
## print_
```python
from six import print_
```



---
## _update_wrapper
```python
from six import _update_wrapper
```



---
## wraps
```python
from six import wraps
```



---
## metaclass
```python
from six import metaclass
```



---
## wrapper
```python
from six import wrapper
```



---
## X
```python
from six import X
```



---
## advance_iterator
```python
from six import advance_iterator
```



---
## callable
```python
from six import callable
```



---
## next
```python
from six import next
```



---
## write
```python
from six import write
```



---
## __new__
```python
from six import __new__
```



---
## __prepare__
```python
from six import __prepare__
```



---
## __len__
```python
from six import __len__
```



---
## __name__
```python
from jsonref import __name__
```



---
## JsonRefError
```python
from jsonref import JsonRefError
```



---
## JsonRef
```python
from jsonref import JsonRef
```

A lazy loading proxy to the dereferenced data pointed to by a JSON
Reference object.

---
## URIDict
```python
from jsonref import URIDict
```

Dictionary which uses normalized URIs as keys.

---
## jsonloader
```python
from jsonref import jsonloader
```

Provides a callable which takes a URI, and returns the loaded JSON referred
to by that URI. Uses :mod:`requests` if available for HTTP URIs, and falls
back to :mod:`urllib`.

---
## _walk_refs
```python
from jsonref import _walk_refs
```



---
## replace_refs
```python
from jsonref import replace_refs
```

.. deprecated:: 0.4
    Use :func:`replace_refs` instead.

Returns a deep copy of `obj` with all contained JSON reference objects
replaced with :class:`JsonRef` instances.

:param obj: If this is a JSON reference object, a :class:`JsonRef`
    instance will be created. If `obj` is not a JSON reference object,
    a deep copy of it will be created with all contained JSON
    reference objects replaced by :class:`JsonRef` instances
:param base_uri: URI to resolve relative references against
:param loader: Callable that takes a URI and returns the parsed JSON
    (defaults to global ``jsonloader``)
:param jsonschema: Flag to turn on `JSON Schema mode
    <http://json-schema.org/latest/json-schema-core.html#anchor25>`_.
    'id' keyword changes the `base_uri` for references contained within
    the object
:param load_on_repr: If set to ``False``, :func:`repr` call on a
    :class:`JsonRef` object will not cause the reference to be loaded
    if it hasn't already. (defaults to ``True``)

---
## _replace_refs
```python
from jsonref import _replace_refs
```



---
## load
```python
from jsonref import load
```

Drop in replacement for :func:`json.load`, where JSON references are
proxied to their referent data.

:param fp: File-like object containing JSON document
:param **kwargs: This function takes any of the keyword arguments from
    :func:`replace_refs`. Any other keyword arguments will be passed to
    :func:`json.load`

---
## loads
```python
from jsonref import loads
```

Drop in replacement for :func:`json.loads`, where JSON references are
proxied to their referent data.

:param s: String containing JSON document
:param **kwargs: This function takes any of the keyword arguments from
    :func:`replace_refs`. Any other keyword arguments will be passed to
    :func:`json.loads`

---
## load_uri
```python
from jsonref import load_uri
```

Load JSON data from ``uri`` with JSON references proxied to their referent
data.

:param uri: URI to fetch the JSON from
:param **kwargs: This function takes any of the keyword arguments from
    :func:`replace_refs`

---
## dump
```python
from jsonref import dump
```

Serialize `obj`, which may contain :class:`JsonRef` objects, as a JSON
formatted stream to file-like `fp`. `JsonRef` objects will be dumped as the
original reference object they were created from.

:param obj: Object to serialize
:param fp: File-like to output JSON string
:param kwargs: Keyword arguments are the same as to :func:`json.dump`

---
## dumps
```python
from jsonref import dumps
```

Serialize `obj`, which may contain :class:`JsonRef` objects, to a JSON
formatted string. `JsonRef` objects will be dumped as the original
reference object they were created from.

:param obj: Object to serialize
:param kwargs: Keyword arguments are the same as to :func:`json.dumps`

---
## _ref_encoder_factory
```python
from jsonref import _ref_encoder_factory
```



---
## __init__
```python
from jsonref import __init__
```



---
## __repr__
```python
from jsonref import __repr__
```



---
## __str__
```python
from jsonref import __str__
```



---
## _ref_kwargs
```python
from jsonref import _ref_kwargs
```



---
## full_uri
```python
from jsonref import full_uri
```



---
## callback
```python
from jsonref import callback
```



---
## resolve_pointer
```python
from jsonref import resolve_pointer
```

Resolve a json pointer ``pointer`` within the referenced ``document``.

:argument document: the referent document
:argument str pointer: a json pointer URI fragment to resolve within it

---
## _error
```python
from jsonref import _error
```



---
## normalize
```python
from jsonref import normalize
```



---
## __getitem__
```python
from jsonref import __getitem__
```



---
## __setitem__
```python
from jsonref import __setitem__
```



---
## __delitem__
```python
from jsonref import __delitem__
```



---
## __iter__
```python
from jsonref import __iter__
```



---
## __len__
```python
from jsonref import __len__
```



---
## JSONRefEncoder
```python
from jsonref import JSONRefEncoder
```



---
## default
```python
from jsonref import default
```



---
## _iterencode
```python
from jsonref import _iterencode
```



---
## _encode
```python
from jsonref import _encode
```



---
## __name__
```python
from ffmpy import __name__
```



---
## FFmpeg
```python
from ffmpy import FFmpeg
```

Wrapper for various `FFmpeg <https://www.ffmpeg.org/>`_ related applications (ffmpeg,
ffprobe).

---
## FFprobe
```python
from ffmpy import FFprobe
```

Wrapper for `ffprobe <https://www.ffmpeg.org/ffprobe.html>`_.

---
## FFExecutableNotFoundError
```python
from ffmpy import FFExecutableNotFoundError
```

Raise when FFmpeg/FFprobe executable was not found.

---
## FFRuntimeError
```python
from ffmpy import FFRuntimeError
```

Raise when FFmpeg/FFprobe command line execution returns a non-zero exit code.

The resulting exception object will contain the attributes relates to command line execution:
``cmd``, ``exit_code``, ``stdout``, ``stderr``.

---
## _merge_args_opts
```python
from ffmpy import _merge_args_opts
```

Merge options with their corresponding arguments.

Iterates over the dictionary holding arguments (keys) and options (values). Merges each
options string with its corresponding argument.

:param dict args_opts_dict: a dictionary of arguments and options
:param dict kwargs: *input_option* - if specified prepends ``-i`` to input argument
:return: merged list of strings with arguments and their corresponding options
:rtype: list

---
## _normalize_options
```python
from ffmpy import _normalize_options
```

Normalize options string or list of strings.

Splits `options` into a list of strings. If `split_mixed` is `True`, splits (flattens) mixed
options (i.e. list of strings with spaces) into separate items.

:param options: options string or list of strings
:param bool split_mixed: whether to split mixed options into separate items

---
## __init__
```python
from ffmpy import __init__
```



---
## __repr__
```python
from ffmpy import __repr__
```



---
## run
```python
from ffmpy import run
```

Execute FFmpeg command line.

``input_data`` can contain input for FFmpeg in case ``pipe`` protocol is used for input.
``stdout`` and ``stderr`` specify where to redirect the ``stdout`` and ``stderr`` of the
process. By default no redirection is done, which means all output goes to running shell
(this mode should normally only be used for debugging purposes). If FFmpeg ``pipe`` protocol
is used for output, ``stdout`` must be redirected to a pipe by passing `subprocess.PIPE` as
``stdout`` argument. You can pass custom environment to ffmpeg process with ``env``.

Returns a 2-tuple containing ``stdout`` and ``stderr`` of the process. If there was no
redirection or if the output was redirected to e.g. `os.devnull`, the value returned will
be a tuple of two `None` values, otherwise it will contain the actual ``stdout`` and
``stderr`` data returned by ffmpeg process.

More info about ``pipe`` protocol `here <https://ffmpeg.org/ffmpeg-protocols.html#pipe>`_.

:param str input_data: input data for FFmpeg to deal with (audio, video etc.) as bytes (e.g.
    the result of reading a file in binary mode)
:param stdout: redirect FFmpeg ``stdout`` there (default is `None` which means no
    redirection)
:param stderr: redirect FFmpeg ``stderr`` there (default is `None` which means no
    redirection)
:param env: custom environment for ffmpeg process
:param kwargs: any other keyword arguments to be forwarded to `subprocess.Popen
    <https://docs.python.org/3/library/subprocess.html#subprocess.Popen>`_
:return: a 2-tuple containing ``stdout`` and ``stderr`` of the process
:rtype: tuple
:raise: `FFRuntimeError` in case FFmpeg command exits with a non-zero code;
    `FFExecutableNotFoundError` in case the executable path passed was not valid

---
## __name__
```python
from py import __name__
```



---
## __name__
```python
from typing_extensions import __name__
```



---
## _Sentinel
```python
from typing_extensions import _Sentinel
```



---
## _ExtensionsSpecialForm
```python
from typing_extensions import _ExtensionsSpecialForm
```



---
## IntVar
```python
from typing_extensions import IntVar
```



---
## _get_protocol_attrs
```python
from typing_extensions import _get_protocol_attrs
```



---
## _caller
```python
from typing_extensions import _caller
```



---
## _ensure_subclassable
```python
from typing_extensions import _ensure_subclassable
```



---
## _set_default
```python
from typing_extensions import _set_default
```



---
## _set_module
```python
from typing_extensions import _set_module
```



---
## _DefaultMixin
```python
from typing_extensions import _DefaultMixin
```

Mixin for TypeVarLike defaults.

---
## _TypeVarLikeMeta
```python
from typing_extensions import _TypeVarLikeMeta
```



---
## _concatenate_getitem
```python
from typing_extensions import _concatenate_getitem
```



---
## _SpecialForm
```python
from typing_extensions import _SpecialForm
```



---
## _has_generic_or_protocol_as_origin
```python
from typing_extensions import _has_generic_or_protocol_as_origin
```



---
## _is_unpacked_typevartuple
```python
from typing_extensions import _is_unpacked_typevartuple
```



---
## __repr__
```python
from typing_extensions import __repr__
```



---
## _should_collect_from_parameters
```python
from typing_extensions import _should_collect_from_parameters
```



---
## _AnyMeta
```python
from typing_extensions import _AnyMeta
```



---
## Any
```python
from typing_extensions import Any
```

Special type indicating an unconstrained type.
- Any is compatible with every type.
- Any assumed to have all methods.
- All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of
static type checkers. At runtime, Any should not be used with instance
checks.

---
## final
```python
from typing_extensions import final
```

This decorator can be used to indicate to type checkers that
the decorated method cannot be overridden, and decorated class
cannot be subclassed. For example:

    class Base:
        @final
        def done(self) -> None:
            ...
    class Sub(Base):
        def done(self) -> None:  # Error reported by type checker
            ...
    @final
    class Leaf:
        ...
    class Other(Leaf):  # Error reported by type checker
        ...

There is no runtime checking of these properties. The decorator
sets the ``__final__`` attribute to ``True`` on the decorated object
to allow runtime introspection.

---
## _flatten_literal_params
```python
from typing_extensions import _flatten_literal_params
```

An internal helper for Literal creation: flatten Literals among parameters

---
## _value_and_type_iter
```python
from typing_extensions import _value_and_type_iter
```



---
## _LiteralGenericAlias
```python
from typing_extensions import _LiteralGenericAlias
```



---
## _LiteralForm
```python
from typing_extensions import _LiteralForm
```



---
## overload
```python
from typing_extensions import overload
```

Decorator for overloaded functions/methods.

In a stub file, place two or more stub definitions for the same
function in a row, each decorated with @overload.  For example:

@overload
def utf8(value: None) -> None: ...
@overload
def utf8(value: bytes) -> bytes: ...
@overload
def utf8(value: str) -> bytes: ...

In a non-stub file (i.e. a regular .py file), do the same but
follow it with an implementation.  The implementation should *not*
be decorated with @overload.  For example:

@overload
def utf8(value: None) -> None: ...
@overload
def utf8(value: bytes) -> bytes: ...
@overload
def utf8(value: str) -> bytes: ...
def utf8(value):
    # implementation goes here

The overloads for a function can be retrieved at runtime using the
get_overloads() function.

---
## get_overloads
```python
from typing_extensions import get_overloads
```

Return all defined overloads for *func* as a sequence.

---
## clear_overloads
```python
from typing_extensions import clear_overloads
```

Clear all overloads in the registry.

---
## _is_dunder
```python
from typing_extensions import _is_dunder
```



---
## _SpecialGenericAlias
```python
from typing_extensions import _SpecialGenericAlias
```



---
## _allow_reckless_class_checks
```python
from typing_extensions import _allow_reckless_class_checks
```

Allow instance and class checks for special stdlib modules.
The abc and functools modules indiscriminately call isinstance() and
issubclass() on the whole MRO of a user class, which may contain protocols.

---
## _no_init
```python
from typing_extensions import _no_init
```



---
## _type_check_issubclass_arg_1
```python
from typing_extensions import _type_check_issubclass_arg_1
```

Raise TypeError if `arg` is not an instance of `type`
in `issubclass(arg, <protocol>)`.

In most cases, this is verified by type.__subclasscheck__.
Checking it again unnecessarily would slow down issubclass() checks,
so, we don't perform this check unless we absolutely have to.

For various error paths, however,
we want to ensure that *this* error message is shown to the user
where relevant, rather than a typing.py-specific error message.

---
## _ProtocolMeta
```python
from typing_extensions import _ProtocolMeta
```



---
## _proto_hook
```python
from typing_extensions import _proto_hook
```



---
## Protocol
```python
from typing_extensions import Protocol
```



---
## runtime_checkable
```python
from typing_extensions import runtime_checkable
```

Mark a protocol class as a runtime protocol.

Such protocol can be used with isinstance() and issubclass().
Raise TypeError if applied to a non-protocol class.
This allows a simple-minded structural check very similar to
one trick ponies in collections.abc such as Iterable.

For example::

    @runtime_checkable
    class Closable(Protocol):
        def close(self): ...

    assert isinstance(open('/some/file'), Closable)

Warning: this will check only the presence of the required methods,
not their type signatures!

---
## SupportsInt
```python
from typing_extensions import SupportsInt
```

An ABC with one abstract method __int__.

---
## SupportsFloat
```python
from typing_extensions import SupportsFloat
```

An ABC with one abstract method __float__.

---
## SupportsComplex
```python
from typing_extensions import SupportsComplex
```

An ABC with one abstract method __complex__.

---
## SupportsBytes
```python
from typing_extensions import SupportsBytes
```

An ABC with one abstract method __bytes__.

---
## SupportsIndex
```python
from typing_extensions import SupportsIndex
```



---
## SupportsAbs
```python
from typing_extensions import SupportsAbs
```

An ABC with one abstract method __abs__ that is covariant in its return type.

---
## SupportsRound
```python
from typing_extensions import SupportsRound
```

An ABC with one abstract method __round__ that is covariant in its return type.

---
## inner
```python
from typing_extensions import inner
```



---
## _get_typeddict_qualifiers
```python
from typing_extensions import _get_typeddict_qualifiers
```



---
## _TypedDictMeta
```python
from typing_extensions import _TypedDictMeta
```



---
## TypedDict
```python
from typing_extensions import TypedDict
```

A simple typed namespace. At runtime it is equivalent to a plain dict.

TypedDict creates a dictionary type such that a type checker will expect all
instances to have a certain set of keys, where each key is
associated with a value of a consistent type. This expectation
is not checked at runtime.

Usage::

    class Point2D(TypedDict):
        x: int
        y: int
        label: str

    a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
    b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

    assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

The type info can be accessed via the Point2D.__annotations__ dict, and
the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
TypedDict supports an additional equivalent form::

    Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

By default, all keys must be present in a TypedDict. It is possible
to override this by specifying totality::

    class Point2D(TypedDict, total=False):
        x: int
        y: int

This means that a Point2D TypedDict can have any of the keys omitted. A type
checker is only expected to support a literal False or True as the value of
the total argument. True is the default, and makes all items defined in the
class body be required.

The Required and NotRequired special forms can also be used to mark
individual keys as being required or not required::

    class Point2D(TypedDict):
        x: int  # the "x" key must always be present (Required is the default)
        y: NotRequired[int]  # the "y" key can be omitted

See PEP 655 for more details on Required and NotRequired.

---
## is_typeddict
```python
from typing_extensions import is_typeddict
```

Check if an annotation is a TypedDict class

For example::
    class Film(TypedDict):
        title: str
        year: int

    is_typeddict(Film)  # => True
    is_typeddict(Union[list, str])  # => False

---
## assert_type
```python
from typing_extensions import assert_type
```

Assert (to the type checker) that the value is of the given type.

When the type checker encounters a call to assert_type(), it
emits an error if the value is not of the specified type::

    def greet(name: str) -> None:
        assert_type(name, str)  # ok
        assert_type(name, int)  # type checker error

At runtime this returns the first argument unchanged and otherwise
does nothing.

---
## _strip_extras
```python
from typing_extensions import _strip_extras
```

Strips Annotated, Required and NotRequired from a given type.

---
## get_type_hints
```python
from typing_extensions import get_type_hints
```

Return type hints for an object.

This is often the same as obj.__annotations__, but it handles
forward references encoded as string literals, adds Optional[t] if a
default value equal to None is set and recursively replaces all
'Annotated[T, ...]', 'Required[T]' or 'NotRequired[T]' with 'T'
(unless 'include_extras=True').

The argument may be a module, class, method, or function. The annotations
are returned as a dictionary. For classes, annotations include also
inherited members.

TypeError is raised if the argument is not of a type that can contain
annotations, and an empty dictionary is returned if no annotations are
present.

BEWARE -- the behavior of globalns and localns is counterintuitive
(unless you are familiar with how eval() and exec() work).  The
search order is locals first, then globals.

- If no dict arguments are passed, an attempt is made to use the
  globals from obj (or the respective module's globals for classes),
  and these are also used as the locals.  If the object does not appear
  to have globals, an empty dictionary is used.

- If one dict argument is passed, it is used for both globals and
  locals.

- If two dict arguments are passed, they specify globals and
  locals, respectively.

---
## _AnnotatedAlias
```python
from typing_extensions import _AnnotatedAlias
```

Runtime representation of an annotated type.

At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't'
with extra annotations. The alias behaves like a normal typing alias,
instantiating is the same as instantiating the underlying type, binding
it to types is also the same.

---
## Annotated
```python
from typing_extensions import Annotated
```

Add context specific metadata to a type.

Example: Annotated[int, runtime_check.Unsigned] indicates to the
hypothetical runtime_check module that this type is an unsigned int.
Every other consumer of this type can ignore this metadata and treat
this type as int.

The first argument to Annotated must be a valid type (and will be in
the __origin__ field), the remaining arguments are kept as a tuple in
the __extra__ field.

Details:

- It's an error to call `Annotated` with less than two arguments.
- Nested Annotated are flattened::

    Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]

- Instantiating an annotated type is equivalent to instantiating the
underlying type::

    Annotated[C, Ann1](5) == C(5)

- Annotated can be used as a generic type alias::

    Optimized = Annotated[T, runtime.Optimize()]
    Optimized[int] == Annotated[int, runtime.Optimize()]

    OptimizedList = Annotated[List[T], runtime.Optimize()]
    OptimizedList[int] == Annotated[List[int], runtime.Optimize()]

---
## get_origin
```python
from typing_extensions import get_origin
```

Get the unsubscripted version of a type.

This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
and Annotated. Return None for unsupported types. Examples::

    get_origin(Literal[42]) is Literal
    get_origin(int) is None
    get_origin(ClassVar[int]) is ClassVar
    get_origin(Generic) is Generic
    get_origin(Generic[T]) is Generic
    get_origin(Union[T, int]) is Union
    get_origin(List[Tuple[T, T]][int]) == list
    get_origin(P.args) is P

---
## get_args
```python
from typing_extensions import get_args
```

Get type arguments with all substitutions performed.

For unions, basic simplifications used by Union constructor are performed.
Examples::
    get_args(Dict[str, int]) == (str, int)
    get_args(int) == ()
    get_args(Union[int, Union[T, int], str][int]) == (int, str)
    get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
    get_args(Callable[[], T][int]) == ([], int)

---
## NoDefaultTypeMeta
```python
from typing_extensions import NoDefaultTypeMeta
```



---
## NoDefaultType
```python
from typing_extensions import NoDefaultType
```

The type of the NoDefault singleton.

---
## __instancecheck__
```python
from typing_extensions import __instancecheck__
```



---
## TypeVar
```python
from typing_extensions import TypeVar
```

Type variable.

---
## _Immutable
```python
from typing_extensions import _Immutable
```

Mixin to indicate that object should not be copied.

---
## ParamSpecArgs
```python
from typing_extensions import ParamSpecArgs
```

The args for a ParamSpec object.

Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.

ParamSpecArgs objects have a reference back to their ParamSpec:

P.args.__origin__ is P

This type is meant for runtime introspection and has no special meaning to
static type checkers.

---
## ParamSpecKwargs
```python
from typing_extensions import ParamSpecKwargs
```

The kwargs for a ParamSpec object.

Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.

ParamSpecKwargs objects have a reference back to their ParamSpec:

P.kwargs.__origin__ is P

This type is meant for runtime introspection and has no special meaning to
static type checkers.

---
## _ConcatenateGenericAlias
```python
from typing_extensions import _ConcatenateGenericAlias
```



---
## __init__
```python
from typing_extensions import __init__
```



---
## __getattr__
```python
from typing_extensions import __getattr__
```



---
## __mro_entries__
```python
from typing_extensions import __mro_entries__
```



---
## __reduce__
```python
from typing_extensions import __reduce__
```



---
## __call__
```python
from typing_extensions import __call__
```



---
## __or__
```python
from typing_extensions import __or__
```



---
## __ror__
```python
from typing_extensions import __ror__
```



---
## __subclasscheck__
```python
from typing_extensions import __subclasscheck__
```



---
## __getitem__
```python
from typing_extensions import __getitem__
```



---
## LiteralString
```python
from typing_extensions import LiteralString
```

Represents an arbitrary literal string.

Example::

  from pip._vendor.typing_extensions import LiteralString

  def query(sql: LiteralString) -> ...:
      ...

  query("SELECT * FROM table")  # ok
  query(f"SELECT * FROM {input()}")  # not ok

See PEP 675 for details.

---
## Self
```python
from typing_extensions import Self
```

Used to spell the type of "self" in classes.

Example::

  from typing import Self

  class ReturnsSelf:
      def parse(self, data: bytes) -> Self:
          ...
          return self

---
## Never
```python
from typing_extensions import Never
```

The bottom type, a type that has no members.

This can be used to define a function that should never be
called, or a function that never returns::

    from pip._vendor.typing_extensions import Never

    def never_call_me(arg: Never) -> None:
        pass

    def int_or_str(arg: int | str) -> None:
        never_call_me(arg)  # type checker error
        match arg:
            case int():
                print("It's an int")
            case str():
                print("It's a str")
            case _:
                never_call_me(arg)  # ok, arg is of type Never

---
## _is_unpack
```python
from typing_extensions import _is_unpack
```



---
## reveal_type
```python
from typing_extensions import reveal_type
```

Reveal the inferred type of a variable.

When a static type checker encounters a call to ``reveal_type()``,
it will emit the inferred type of the argument::

    x: int = 1
    reveal_type(x)

Running a static type checker (e.g., ``mypy``) on this example
will produce output similar to 'Revealed type is "builtins.int"'.

At runtime, the function prints the runtime type of the
argument and returns it unchanged.

---
## assert_never
```python
from typing_extensions import assert_never
```

Assert to the type checker that a line of code is unreachable.

Example::

    def int_or_str(arg: int | str) -> None:
        match arg:
            case int():
                print("It's an int")
            case str():
                print("It's a str")
            case _:
                assert_never(arg)

If a type checker finds that a call to assert_never() is
reachable, it will emit an error.

At runtime, this throws an exception when called.

---
## dataclass_transform
```python
from typing_extensions import dataclass_transform
```

Decorator that marks a function, class, or metaclass as providing
dataclass-like behavior.

Example:

    from pip._vendor.typing_extensions import dataclass_transform

    _T = TypeVar("_T")

    # Used on a decorator function
    @dataclass_transform()
    def create_model(cls: type[_T]) -> type[_T]:
        ...
        return cls

    @create_model
    class CustomerModel:
        id: int
        name: str

    # Used on a base class
    @dataclass_transform()
    class ModelBase: ...

    class CustomerModel(ModelBase):
        id: int
        name: str

    # Used on a metaclass
    @dataclass_transform()
    class ModelMeta(type): ...

    class ModelBase(metaclass=ModelMeta): ...

    class CustomerModel(ModelBase):
        id: int
        name: str

Each of the ``CustomerModel`` classes defined in this example will now
behave similarly to a dataclass created with the ``@dataclasses.dataclass``
decorator. For example, the type checker will synthesize an ``__init__``
method.

The arguments to this decorator can be used to customize this behavior:
- ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
  True or False if it is omitted by the caller.
- ``order_default`` indicates whether the ``order`` parameter is
  assumed to be True or False if it is omitted by the caller.
- ``kw_only_default`` indicates whether the ``kw_only`` parameter is
  assumed to be True or False if it is omitted by the caller.
- ``frozen_default`` indicates whether the ``frozen`` parameter is
  assumed to be True or False if it is omitted by the caller.
- ``field_specifiers`` specifies a static list of supported classes
  or functions that describe fields, similar to ``dataclasses.field()``.

At runtime, this decorator records its arguments in the
``__dataclass_transform__`` attribute on the decorated object.

See PEP 681 for details.

---
## override
```python
from typing_extensions import override
```

Indicate that a method is intended to override a method in a base class.

Usage:

    class Base:
        def method(self) -> None:
            pass

    class Child(Base):
        @override
        def method(self) -> None:
            super().method()

When this decorator is applied to a method, the type checker will
validate that it overrides a method with the same name on a base class.
This helps prevent bugs that may occur when a base class is changed
without an equivalent change to a child class.

There is no runtime checking of these properties. The decorator
sets the ``__override__`` attribute to ``True`` on the decorated object
to allow runtime introspection.

See PEP 698 for details.

---
## deprecated
```python
from typing_extensions import deprecated
```

Indicate that a class, function or overload is deprecated.

When this decorator is applied to an object, the type checker
will generate a diagnostic on usage of the deprecated object.

Usage:

    @deprecated("Use B instead")
    class A:
        pass

    @deprecated("Use g instead")
    def f():
        pass

    @overload
    @deprecated("int support is deprecated")
    def g(x: int) -> int: ...
    @overload
    def g(x: str) -> int: ...

The warning specified by *category* will be emitted at runtime
on use of deprecated objects. For functions, that happens on calls;
for classes, on instantiation and on creation of subclasses.
If the *category* is ``None``, no warning is emitted at runtime.
The *stacklevel* determines where the
warning is emitted. If it is ``1`` (the default), the warning
is emitted at the direct caller of the deprecated object; if it
is higher, it is emitted further up the stack.
Static type checker behavior is not affected by the *category*
and *stacklevel* arguments.

The deprecation message passed to the decorator is saved in the
``__deprecated__`` attribute on the decorated object.
If applied to an overload, the decorator
must be after the ``@overload`` decorator for the attribute to
exist on the overload as returned by ``get_overloads()``.

See PEP 702 for details.

---
## _check_generic
```python
from typing_extensions import _check_generic
```

Check correct count for parameters of a generic cls (internal helper).

This gives a nice error message in case of count mismatch.

---
## _collect_type_vars
```python
from typing_extensions import _collect_type_vars
```

Collect all type variable contained in types in order of
first appearance (lexicographic order). For example::

    _collect_type_vars((T, List[S, T])) == (T, S)

---
## _collect_parameters
```python
from typing_extensions import _collect_parameters
```

Collect all type variables and parameter specifications in args
in order of first appearance (lexicographic order).

For example::

    assert _collect_parameters((T, Callable[P, T])) == (T, P)

---
## _make_nmtuple
```python
from typing_extensions import _make_nmtuple
```



---
## _NamedTupleMeta
```python
from typing_extensions import _NamedTupleMeta
```



---
## _namedtuple_mro_entries
```python
from typing_extensions import _namedtuple_mro_entries
```



---
## NamedTuple
```python
from typing_extensions import NamedTuple
```

Typed version of namedtuple.

Usage::

    class Employee(NamedTuple):
        name: str
        id: int

This is equivalent to::

    Employee = collections.namedtuple('Employee', ['name', 'id'])

The resulting class has an extra __annotations__ attribute, giving a
dict that maps field names to types.  (The field names are also in
the _fields attribute, which is part of the namedtuple API.)
An alternative equivalent functional syntax is also accepted::

    Employee = NamedTuple('Employee', [('name', str), ('id', int)])

---
## Buffer
```python
from typing_extensions import Buffer
```

Base class for classes that implement the buffer protocol.

The buffer protocol allows Python objects to expose a low-level
memory buffer interface. Before Python 3.12, it is not possible
to implement the buffer protocol in pure Python code, or even
to check whether a class implements the buffer protocol. In
Python 3.12 and higher, the ``__buffer__`` method allows access
to the buffer protocol from Python code, and the
``collections.abc.Buffer`` ABC allows checking whether a class
implements the buffer protocol.

To indicate support for the buffer protocol in earlier versions,
inherit from this ABC, either in a stub file or at runtime,
or use ABC registration. This ABC provides no methods, because
there is no Python-accessible methods shared by pre-3.12 buffer
classes. It is useful primarily for static checks.

---
## get_original_bases
```python
from typing_extensions import get_original_bases
```

Return the class's "original" bases prior to modification by `__mro_entries__`.

Examples::

    from typing import TypeVar, Generic
    from pip._vendor.typing_extensions import NamedTuple, TypedDict

    T = TypeVar("T")
    class Foo(Generic[T]): ...
    class Bar(Foo[int], float): ...
    class Baz(list[str]): ...
    Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
    Spam = TypedDict("Spam", {"a": int, "b": str})

    assert get_original_bases(Bar) == (Foo[int], float)
    assert get_original_bases(Baz) == (list[str],)
    assert get_original_bases(Eggs) == (NamedTuple,)
    assert get_original_bases(Spam) == (TypedDict,)
    assert get_original_bases(int) == (object,)

---
## NewType
```python
from typing_extensions import NewType
```

NewType creates simple unique types with almost zero
runtime overhead. NewType(name, tp) is considered a subtype of tp
by static type checkers. At runtime, NewType(name, tp) returns
a dummy callable that simply returns its argument. Usage::
    UserId = NewType('UserId', int)
    def name_by_id(user_id: UserId) -> str:
        ...
    UserId('user')          # Fails type check
    name_by_id(42)          # Fails type check
    name_by_id(UserId(42))  # OK
    num = UserId(5) + 1     # type: int

---
## _is_unionable
```python
from typing_extensions import _is_unionable
```

Corresponds to is_unionable() in unionobject.c in CPython.

---
## TypeAliasType
```python
from typing_extensions import TypeAliasType
```

Create named, parameterized type aliases.

This provides a backport of the new `type` statement in Python 3.12:

    type ListOrSet[T] = list[T] | set[T]

is equivalent to:

    T = TypeVar("T")
    ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))

The name ListOrSet can then be used as an alias for the type it refers to.

The type_params argument should contain all the type parameters used
in the value of the type alias. If the alias is not generic, this
argument is omitted.

Static type checkers should only support type aliases declared using
TypeAliasType that follow these rules:

- The first argument (the name) must be a string literal.
- The TypeAliasType instance must be immediately assigned to a variable
  of the same name. (For example, 'X = TypeAliasType("Y", int)' is invalid,
  as is 'X, Y = TypeAliasType("X", int), TypeAliasType("Y", int)').

---
## is_protocol
```python
from typing_extensions import is_protocol
```

Return True if the given type is a Protocol.

Example::

    >>> from typing_extensions import Protocol, is_protocol
    >>> class P(Protocol):
    ...     def a(self) -> str: ...
    ...     b: int
    >>> is_protocol(P)
    True
    >>> is_protocol(int)
    False

---
## get_protocol_members
```python
from typing_extensions import get_protocol_members
```

Return the set of members defined in a Protocol.

Example::

    >>> from typing_extensions import Protocol, get_protocol_members
    >>> class P(Protocol):
    ...     def a(self) -> str: ...
    ...     b: int
    >>> get_protocol_members(P)
    frozenset({'a', 'b'})

Raise a TypeError for arguments that are not Protocols.

---
## Doc
```python
from typing_extensions import Doc
```

Define the documentation of a type annotation using ``Annotated``, to be
 used in class attributes, function and method parameters, return values,
 and variables.

The value should be a positional-only string literal to allow static tools
like editors and documentation generators to use it.

This complements docstrings.

The string value passed is available in the attribute ``documentation``.

Example::

    >>> from typing_extensions import Annotated, Doc
    >>> def hi(to: Annotated[str, Doc("Who to say hi to")]) -> None: ...

---
## __new__
```python
from typing_extensions import __new__
```



---
## __eq__
```python
from typing_extensions import __eq__
```



---
## __hash__
```python
from typing_extensions import __hash__
```



---
## __setattr__
```python
from typing_extensions import __setattr__
```



---
## __init_subclass__
```python
from typing_extensions import __init_subclass__
```



---
## __int__
```python
from typing_extensions import __int__
```



---
## __float__
```python
from typing_extensions import __float__
```



---
## __complex__
```python
from typing_extensions import __complex__
```



---
## __bytes__
```python
from typing_extensions import __bytes__
```



---
## __index__
```python
from typing_extensions import __index__
```



---
## __abs__
```python
from typing_extensions import __abs__
```



---
## __round__
```python
from typing_extensions import __round__
```



---
## copy_with
```python
from typing_extensions import copy_with
```



---
## __class_getitem__
```python
from typing_extensions import __class_getitem__
```



---
## TypeAlias
```python
from typing_extensions import TypeAlias
```

Special marker indicating that an assignment should
be recognized as a proper type alias definition by type
checkers.

For example::

    Predicate: TypeAlias = Callable[..., bool]

It's invalid when used anywhere except as in the example above.

---
## __copy__
```python
from typing_extensions import __copy__
```



---
## __deepcopy__
```python
from typing_extensions import __deepcopy__
```



---
## ParamSpec
```python
from typing_extensions import ParamSpec
```

Parameter specification variable.

Usage::

   P = ParamSpec('P')

Parameter specification variables exist primarily for the benefit of static
type checkers.  They are used to forward the parameter types of one
callable to another callable, a pattern commonly found in higher order
functions and decorators.  They are only valid when used in ``Concatenate``,
or s the first argument to ``Callable``. In Python 3.10 and higher,
they are also supported in user-defined Generics at runtime.
See class Generic for more information on generic types.  An
example for annotating a decorator::

   T = TypeVar('T')
   P = ParamSpec('P')

   def add_logging(f: Callable[P, T]) -> Callable[P, T]:
       '''A type-safe decorator to add logging to a function.'''
       def inner(*args: P.args, **kwargs: P.kwargs) -> T:
           logging.info(f'{f.__name__} was called')
           return f(*args, **kwargs)
       return inner

   @add_logging
   def add_two(x: float, y: float) -> float:
       '''Add two numbers together.'''
       return x + y

Parameter specification variables defined with covariant=True or
contravariant=True can be used to declare covariant or contravariant
generic types.  These keyword arguments are valid, but their actual semantics
are yet to be decided.  See PEP 612 for details.

Parameter specification variables can be introspected. e.g.:

   P.__name__ == 'T'
   P.__bound__ == None
   P.__covariant__ == False
   P.__contravariant__ == False

Note that only parameter specification variables defined in global scope can
be pickled.

---
## __parameters__
```python
from typing_extensions import __parameters__
```



---
## Concatenate
```python
from typing_extensions import Concatenate
```

Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
higher order function which adds, removes or transforms parameters of a
callable.

For example::

   Callable[Concatenate[int, P], int]

See PEP 612 for detailed information.

---
## _ConcatenateForm
```python
from typing_extensions import _ConcatenateForm
```



---
## TypeGuard
```python
from typing_extensions import TypeGuard
```

Special typing form used to annotate the return type of a user-defined
type guard function.  ``TypeGuard`` only accepts a single type argument.
At runtime, functions marked this way should return a boolean.

``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static
type checkers to determine a more precise type of an expression within a
program's code flow.  Usually type narrowing is done by analyzing
conditional code flow and applying the narrowing to a block of code.  The
conditional expression here is sometimes referred to as a "type guard".

Sometimes it would be convenient to use a user-defined boolean function
as a type guard.  Such a function should use ``TypeGuard[...]`` as its
return type to alert static type checkers to this intention.

Using  ``-> TypeGuard`` tells the static type checker that for a given
function:

1. The return value is a boolean.
2. If the return value is ``True``, the type of its argument
is the type inside ``TypeGuard``.

For example::

    def is_str(val: Union[str, float]):
        # "isinstance" type guard
        if isinstance(val, str):
            # Type of ``val`` is narrowed to ``str``
            ...
        else:
            # Else, type of ``val`` is narrowed to ``float``.
            ...

Strict type narrowing is not enforced -- ``TypeB`` need not be a narrower
form of ``TypeA`` (it can even be a wider form) and this may lead to
type-unsafe results.  The main reason is to allow for things like
narrowing ``List[object]`` to ``List[str]`` even though the latter is not
a subtype of the former, since ``List`` is invariant.  The responsibility of
writing type-safe type guards is left to the user.

``TypeGuard`` also works with type variables.  For more information, see
PEP 647 (User-Defined Type Guards).

---
## _TypeGuardForm
```python
from typing_extensions import _TypeGuardForm
```



---
## TypeIs
```python
from typing_extensions import TypeIs
```

Special typing form used to annotate the return type of a user-defined
type narrower function.  ``TypeIs`` only accepts a single type argument.
At runtime, functions marked this way should return a boolean.

``TypeIs`` aims to benefit *type narrowing* -- a technique used by static
type checkers to determine a more precise type of an expression within a
program's code flow.  Usually type narrowing is done by analyzing
conditional code flow and applying the narrowing to a block of code.  The
conditional expression here is sometimes referred to as a "type guard".

Sometimes it would be convenient to use a user-defined boolean function
as a type guard.  Such a function should use ``TypeIs[...]`` as its
return type to alert static type checkers to this intention.

Using  ``-> TypeIs`` tells the static type checker that for a given
function:

1. The return value is a boolean.
2. If the return value is ``True``, the type of its argument
is the intersection of the type inside ``TypeGuard`` and the argument's
previously known type.

For example::

    def is_awaitable(val: object) -> TypeIs[Awaitable[Any]]:
        return hasattr(val, '__await__')

    def f(val: Union[int, Awaitable[int]]) -> int:
        if is_awaitable(val):
            assert_type(val, Awaitable[int])
        else:
            assert_type(val, int)

``TypeIs`` also works with type variables.  For more information, see
PEP 742 (Narrowing types with TypeIs).

---
## _TypeIsForm
```python
from typing_extensions import _TypeIsForm
```



---
## Required
```python
from typing_extensions import Required
```

A special typing construct to mark a key of a total=False TypedDict
as required. For example:

    class Movie(TypedDict, total=False):
        title: Required[str]
        year: int

    m = Movie(
        title='The Matrix',  # typechecker error if key is omitted
        year=1999,
    )

There is no runtime checking that a required key is actually provided
when instantiating a related TypedDict.

---
## NotRequired
```python
from typing_extensions import NotRequired
```

A special typing construct to mark a key of a TypedDict as
potentially missing. For example:

    class Movie(TypedDict):
        title: str
        year: NotRequired[int]

    m = Movie(
        title='The Matrix',  # typechecker error if key is omitted
        year=1999,
    )

---
## _RequiredForm
```python
from typing_extensions import _RequiredForm
```



---
## ReadOnly
```python
from typing_extensions import ReadOnly
```

A special typing construct to mark an item of a TypedDict as read-only.

For example:

    class Movie(TypedDict):
        title: ReadOnly[str]
        year: int

    def mutate_movie(m: Movie) -> None:
        m["year"] = 1992  # allowed
        m["title"] = "The Matrix"  # typechecker error

There is no runtime checking for this property.

---
## _ReadOnlyForm
```python
from typing_extensions import _ReadOnlyForm
```



---
## _UnpackSpecialForm
```python
from typing_extensions import _UnpackSpecialForm
```



---
## _UnpackAlias
```python
from typing_extensions import _UnpackAlias
```



---
## Unpack
```python
from typing_extensions import Unpack
```



---
## _UnpackForm
```python
from typing_extensions import _UnpackForm
```



---
## _unpack_args
```python
from typing_extensions import _unpack_args
```



---
## TypeVarTuple
```python
from typing_extensions import TypeVarTuple
```

Type variable tuple.

Usage::

    Ts = TypeVarTuple('Ts')

In the same way that a normal type variable is a stand-in for a single
type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
type such as ``Tuple[int, str]``.

Type variable tuples can be used in ``Generic`` declarations.
Consider the following example::

    class Array(Generic[*Ts]): ...

The ``Ts`` type variable tuple here behaves like ``tuple[T1, T2]``,
where ``T1`` and ``T2`` are type variables. To use these type variables
as type parameters of ``Array``, we must *unpack* the type variable tuple using
the star operator: ``*Ts``. The signature of ``Array`` then behaves
as if we had simply written ``class Array(Generic[T1, T2]): ...``.
In contrast to ``Generic[T1, T2]``, however, ``Generic[*Shape]`` allows
us to parameterise the class with an *arbitrary* number of type parameters.

Type variable tuples can be used anywhere a normal ``TypeVar`` can.
This includes class definitions, as shown above, as well as function
signatures and variable annotations::

    class Array(Generic[*Ts]):

        def __init__(self, shape: Tuple[*Ts]):
            self._shape: Tuple[*Ts] = shape

        def get_shape(self) -> Tuple[*Ts]:
            return self._shape

    shape = (Height(480), Width(640))
    x: Array[Height, Width] = Array(shape)
    y = abs(x)  # Inferred type is Array[Height, Width]
    z = x + x   #        ...    is Array[Height, Width]
    x.get_shape()  #     ...    is tuple[Height, Width]

---
## decorator
```python
from typing_extensions import decorator
```



---
## __delattr__
```python
from typing_extensions import __delattr__
```



---
## _raise_attribute_error
```python
from typing_extensions import _raise_attribute_error
```



---
## _tvar_prepare_subst
```python
from typing_extensions import _tvar_prepare_subst
```



---
## args
```python
from typing_extensions import args
```



---
## kwargs
```python
from typing_extensions import kwargs
```



---
## __typing_unpacked_tuple_args__
```python
from typing_extensions import __typing_unpacked_tuple_args__
```



---
## __iter__
```python
from typing_extensions import __iter__
```



---
## Dummy
```python
from typing_extensions import Dummy
```



---
## _paramspec_prepare_subst
```python
from typing_extensions import _paramspec_prepare_subst
```



---
## _typevartuple_prepare_subst
```python
from typing_extensions import _typevartuple_prepare_subst
```



---
## wrapper
```python
from typing_extensions import wrapper
```



---
## __name__
```python
from imagesize import __name__
```



---
## _convertToDPI
```python
from imagesize import _convertToDPI
```



---
## _convertToPx
```python
from imagesize import _convertToPx
```



---
## get
```python
from imagesize import get
```

Return (width, height) for a given img file content
no requirements
:type filepath: Union[bytes, str, pathlib.Path]
:rtype Tuple[int, int]

---
## getDPI
```python
from imagesize import getDPI
```

Return (x DPI, y DPI) for a given img file content
no requirements
:type filepath: Union[bytes, str, pathlib.Path]
:rtype Tuple[int, int]

---
## __name__
```python
from _decorator import __name__
```



---
## on_predicate
```python
from _decorator import on_predicate
```

Returns decorator for backoff and retry triggered by predicate.

Args:
    wait_gen: A generator yielding successive wait times in
        seconds.
    predicate: A function which when called on the return value of
        the target function will trigger backoff when considered
        truthily. If not specified, the default behavior is to
        backoff on falsey return values.
    max_tries: The maximum number of attempts to make before giving
        up. In the case of failure, the result of the last attempt
        will be returned. The default value of None means there
        is no limit to the number of tries. If a callable is passed,
        it will be evaluated at runtime and its return value used.
    max_time: The maximum total amount of time to try for before
        giving up. If this time expires, the result of the last
        attempt will be returned. If a callable is passed, it will
        be evaluated at runtime and its return value used.
    jitter: A function of the value yielded by wait_gen returning
        the actual time to wait. This distributes wait times
        stochastically in order to avoid timing collisions across
        concurrent clients. Wait times are jittered by default
        using the full_jitter function. Jittering may be disabled
        altogether by passing jitter=None.
    on_success: Callable (or iterable of callables) with a unary
        signature to be called in the event of success. The
        parameter is a dict containing details about the invocation.
    on_backoff: Callable (or iterable of callables) with a unary
        signature to be called in the event of a backoff. The
        parameter is a dict containing details about the invocation.
    on_giveup: Callable (or iterable of callables) with a unary
        signature to be called in the event that max_tries
        is exceeded.  The parameter is a dict containing details
        about the invocation.
    logger: Name of logger or Logger object to log to. Defaults to
        'backoff'.
    backoff_log_level: log level for the backoff event. Defaults to "INFO"
    giveup_log_level: log level for the give up event. Defaults to "ERROR"
    **wait_gen_kwargs: Any additional keyword args specified will be
        passed to wait_gen when it is initialized.  Any callable
        args will first be evaluated and their return values passed.
        This is useful for runtime configuration.

---
## on_exception
```python
from _decorator import on_exception
```

Returns decorator for backoff and retry triggered by exception.

Args:
    wait_gen: A generator yielding successive wait times in
        seconds.
    exception: An exception type (or tuple of types) which triggers
        backoff.
    max_tries: The maximum number of attempts to make before giving
        up. Once exhausted, the exception will be allowed to escape.
        The default value of None means there is no limit to the
        number of tries. If a callable is passed, it will be
        evaluated at runtime and its return value used.
    max_time: The maximum total amount of time to try for before
        giving up. Once expired, the exception will be allowed to
        escape. If a callable is passed, it will be
        evaluated at runtime and its return value used.
    jitter: A function of the value yielded by wait_gen returning
        the actual time to wait. This distributes wait times
        stochastically in order to avoid timing collisions across
        concurrent clients. Wait times are jittered by default
        using the full_jitter function. Jittering may be disabled
        altogether by passing jitter=None.
    giveup: Function accepting an exception instance and
        returning whether or not to give up. Optional. The default
        is to always continue.
    on_success: Callable (or iterable of callables) with a unary
        signature to be called in the event of success. The
        parameter is a dict containing details about the invocation.
    on_backoff: Callable (or iterable of callables) with a unary
        signature to be called in the event of a backoff. The
        parameter is a dict containing details about the invocation.
    on_giveup: Callable (or iterable of callables) with a unary
        signature to be called in the event that max_tries
        is exceeded.  The parameter is a dict containing details
        about the invocation.
    raise_on_giveup: Boolean indicating whether the registered exceptions
        should be raised on giveup. Defaults to `True`
    logger: Name or Logger object to log to. Defaults to 'backoff'.
    backoff_log_level: log level for the backoff event. Defaults to "INFO"
    giveup_log_level: log level for the give up event. Defaults to "ERROR"
    **wait_gen_kwargs: Any additional keyword args specified will be
        passed to wait_gen when it is initialized.  Any callable
        args will first be evaluated and their return values passed.
        This is useful for runtime configuration.

---
## decorate
```python
from _decorator import decorate
```



---
## __name__
```python
from _typing import __name__
```



---
## _Details
```python
from _typing import _Details
```



---
## Details
```python
from _typing import Details
```



---
## TypedDict
```python
from _typing import TypedDict
```



---
## __init_subclass__
```python
from _typing import __init_subclass__
```



---
## __name__
```python
from _common import __name__
```



---
## _maybe_call
```python
from _common import _maybe_call
```



---
## _init_wait_gen
```python
from _common import _init_wait_gen
```



---
## _next_wait
```python
from _common import _next_wait
```



---
## _prepare_logger
```python
from _common import _prepare_logger
```



---
## _config_handlers
```python
from _common import _config_handlers
```



---
## _log_backoff
```python
from _common import _log_backoff
```



---
## _log_giveup
```python
from _common import _log_giveup
```



---
## __name__
```python
from types import __name__
```



---
## __name__
```python
from _async import __name__
```

Facade that provides coroutines implementation pertinent to running Py version.

Python 3.5 introduced the async def/await syntax keyword.
With later versions coroutines and methods to get the running asyncio loop are
being deprecated, not supported anymore.

For Python versions later than 3.6, coroutines and objects that are defined via
``async def``/``await`` keywords are imported.

Here the code is just imported, to provide the same interface to older code.

---
## _ensure_coroutine
```python
from _async import _ensure_coroutine
```



---
## _ensure_coroutines
```python
from _async import _ensure_coroutines
```



---
## retry_predicate
```python
from _async import retry_predicate
```



---
## retry_exception
```python
from _async import retry_exception
```



---
## __name__
```python
from _jitter import __name__
```



---
## random_jitter
```python
from _jitter import random_jitter
```

Jitter the value a random number of milliseconds.

This adds up to 1 second of additional time to the original value.
Prior to backoff version 1.2 this was the default jitter behavior.

Args:
    value: The unadulterated backoff value.

---
## full_jitter
```python
from _jitter import full_jitter
```

Jitter the value across the full range (0 to value).

This corresponds to the "Full Jitter" algorithm specified in the
AWS blog's post on the performance of various jitter algorithms.
(http://www.awsarchitectureblog.com/2015/03/backoff.html)

Args:
    value: The unadulterated backoff value.

---
## __name__
```python
from _sync import __name__
```



---
## _call_handlers
```python
from _sync import _call_handlers
```



---
## retry_predicate
```python
from _sync import retry_predicate
```



---
## retry_exception
```python
from _sync import retry_exception
```



---
## retry
```python
from _sync import retry
```



---
## __name__
```python
from _wait_gen import __name__
```



---
## expo
```python
from _wait_gen import expo
```

Generator for exponential decay.

Args:
    base: The mathematical base of the exponentiation operation
    factor: Factor to multiply the exponentiation by.
    max_value: The maximum value to yield. Once the value in the
         true exponential sequence exceeds this, the value
         of max_value will forever after be yielded.

---
## fibo
```python
from _wait_gen import fibo
```

Generator for fibonaccial decay.

Args:
    max_value: The maximum value to yield. Once the value in the
         true fibonacci sequence exceeds this, the value
         of max_value will forever after be yielded.

---
## constant
```python
from _wait_gen import constant
```

Generator for constant intervals.

Args:
    interval: A constant value to yield or an iterable of such values.

---
## runtime
```python
from _wait_gen import runtime
```

Generator that is based on parsing the return value or thrown
    exception of the decorated method

Args:
    value: a callable which takes as input the decorated
        function's return value or thrown exception and
        determines how long to wait

---
## __name__
```python
from _decode import __name__
```



---
## get_decode_cache
```python
from _decode import get_decode_cache
```



---
## decode
```python
from _decode import decode
```



---
## repl_func_with_cache
```python
from _decode import repl_func_with_cache
```



---
## __name__
```python
from _url import __name__
```



---
## URL
```python
from _url import URL
```



---
## __name__
```python
from _format import __name__
```



---
## format
```python
from _format import format
```



---
## __name__
```python
from _parse import __name__
```



---
## MutableURL
```python
from _parse import MutableURL
```



---
## url_parse
```python
from _parse import url_parse
```



---
## __init__
```python
from _parse import __init__
```



---
## parse
```python
from _parse import parse
```



---
## parse_host
```python
from _parse import parse_host
```



---
## __name__
```python
from _encode import __name__
```



---
## get_encode_cache
```python
from _encode import get_encode_cache
```



---
## encode
```python
from _encode import encode
```



---
## __name__
```python
from tags import __name__
```



---
## Tag
```python
from tags import Tag
```

A representation of the tag triple for a wheel.

Instances are considered immutable and thus are hashable. Equality checking
is also supported.

---
## parse_tag
```python
from tags import parse_tag
```

Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances.

Returning a set is required due to the possibility that the tag is a
compressed tag set.

---
## _get_config_var
```python
from tags import _get_config_var
```



---
## _normalize_string
```python
from tags import _normalize_string
```



---
## _is_threaded_cpython
```python
from tags import _is_threaded_cpython
```

Determine if the ABI corresponds to a threaded (`--disable-gil`) build.

The threaded builds are indicated by a "t" in the abiflags.

---
## _abi3_applies
```python
from tags import _abi3_applies
```

Determine if the Python version supports abi3.

PEP 384 was first implemented in Python 3.2. The threaded (`--disable-gil`)
builds do not support abi3.

---
## _cpython_abis
```python
from tags import _cpython_abis
```



---
## cpython_tags
```python
from tags import cpython_tags
```

Yields the tags for a CPython interpreter.

The tags consist of:
- cp<python_version>-<abi>-<platform>
- cp<python_version>-abi3-<platform>
- cp<python_version>-none-<platform>
- cp<less than python_version>-abi3-<platform>  # Older Python versions down to 3.2.

If python_version only specifies a major version then user-provided ABIs and
the 'none' ABItag will be used.

If 'abi3' or 'none' are specified in 'abis' then they will be yielded at
their normal position and not at the beginning.

---
## _generic_abi
```python
from tags import _generic_abi
```

Return the ABI tag based on EXT_SUFFIX.

---
## generic_tags
```python
from tags import generic_tags
```

Yields the tags for a generic interpreter.

The tags consist of:
- <interpreter>-<abi>-<platform>

The "none" ABI will be added if it was not explicitly provided.

---
## _py_interpreter_range
```python
from tags import _py_interpreter_range
```

Yields Python versions in descending order.

After the latest version, the major-only version will be yielded, and then
all previous versions of that major version.

---
## compatible_tags
```python
from tags import compatible_tags
```

Yields the sequence of tags that are compatible with a specific version of Python.

The tags consist of:
- py*-none-<platform>
- <interpreter>-none-any  # ... if `interpreter` is provided.
- py*-none-any

---
## _mac_arch
```python
from tags import _mac_arch
```



---
## _mac_binary_formats
```python
from tags import _mac_binary_formats
```



---
## mac_platforms
```python
from tags import mac_platforms
```

Yields the platform tags for a macOS system.

The `version` parameter is a two-item tuple specifying the macOS version to
generate platform tags for. The `arch` parameter is the CPU architecture to
generate platform tags for. Both parameters default to the appropriate value
for the current system.

---
## _linux_platforms
```python
from tags import _linux_platforms
```



---
## _generic_platforms
```python
from tags import _generic_platforms
```



---
## platform_tags
```python
from tags import platform_tags
```

Provides the platform tags for this installation.

---
## interpreter_name
```python
from tags import interpreter_name
```

Returns the name of the running interpreter.

Some implementations have a reserved, two-letter abbreviation which will
be returned when appropriate.

---
## interpreter_version
```python
from tags import interpreter_version
```

Returns the version of the running interpreter.

---
## _version_nodot
```python
from tags import _version_nodot
```



---
## sys_tags
```python
from tags import sys_tags
```

Returns the sequence of tag triples for the running interpreter.

The order of the sequence corresponds to priority order for the
interpreter, from most to least important.

---
## __init__
```python
from tags import __init__
```



---
## interpreter
```python
from tags import interpreter
```



---
## abi
```python
from tags import abi
```



---
## platform
```python
from tags import platform
```



---
## __eq__
```python
from tags import __eq__
```



---
## __hash__
```python
from tags import __hash__
```



---
## __str__
```python
from tags import __str__
```



---
## __repr__
```python
from tags import __repr__
```



---
## __name__
```python
from _musllinux import __name__
```

PEP 656 support.

This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.

---
## _MuslVersion
```python
from _musllinux import _MuslVersion
```



---
## _parse_musl_version
```python
from _musllinux import _parse_musl_version
```



---
## _get_musl_version
```python
from _musllinux import _get_musl_version
```

Detect currently-running musl runtime version.

This is done by checking the specified executable's dynamic linking
information, and invoking the loader to parse its output for a version
string. If the loader is musl, the output would be something like::

    musl libc (x86_64)
    Version 1.2.2
    Dynamic Program Loader

---
## platform_tags
```python
from _musllinux import platform_tags
```

Generate musllinux tags compatible to the current platform.

:param archs: Sequence of compatible architectures.
    The first one shall be the closest to the actual architecture and be the part of
    platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
    The ``linux_`` prefix is assumed as a prerequisite for the current platform to
    be musllinux-compatible.

:returns: An iterator of compatible musllinux tags.

---
## __name__
```python
from metadata import __name__
```

The metadata collector components for sphinx.environment.

---
## InvalidMetadata
```python
from metadata import InvalidMetadata
```

A metadata field contains invalid data.

---
## RawMetadata
```python
from metadata import RawMetadata
```

A dictionary of raw core metadata.

Each field in core metadata maps to a key of this dictionary (when data is
provided). The key is lower-case and underscores are used instead of dashes
compared to the equivalent core metadata field. Any core metadata field that
can be specified multiple times or can hold multiple values in a single
field have a key with a plural name. See :class:`Metadata` whose attributes
match the keys of this dictionary.

Core metadata fields that can be specified multiple times are stored as a
list or dict depending on which is appropriate for the field. Any fields
which hold multiple values in a single field are stored as a list.

---
## _parse_keywords
```python
from metadata import _parse_keywords
```

Split a string of comma-separate keyboards into a list of keywords.

---
## _parse_project_urls
```python
from metadata import _parse_project_urls
```

Parse a list of label/URL string pairings separated by a comma.

---
## _get_payload
```python
from metadata import _get_payload
```

Get the body of the message.

---
## parse_email
```python
from metadata import parse_email
```

Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``).

This function returns a two-item tuple of dicts. The first dict is of
recognized fields from the core metadata specification. Fields that can be
parsed and translated into Python's built-in types are converted
appropriately. All other fields are left as-is. Fields that are allowed to
appear multiple times are stored as lists.

The second dict contains all other fields from the metadata. This includes
any unrecognized fields. It also includes any fields which are expected to
be parsed into a built-in type but were not formatted appropriately. Finally,
any fields that are expected to appear only once but are repeated are
included in this dict.

---
## _Validator
```python
from metadata import _Validator
```

Validate a metadata field.

All _process_*() methods correspond to a core metadata field. The method is
called with the field's raw value. If the raw value is valid it is returned
in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field).
If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause
as appropriate).

---
## Metadata
```python
from metadata import Metadata
```

The metadata of a release. This implementation uses 2.1
metadata where possible. If not possible, it wraps a LegacyMetadata
instance which handles the key-value metadata format.

---
## __init__
```python
from metadata import __init__
```



---
## __set_name__
```python
from metadata import __set_name__
```



---
## __get__
```python
from metadata import __get__
```



---
## _invalid_metadata
```python
from metadata import _invalid_metadata
```



---
## _process_metadata_version
```python
from metadata import _process_metadata_version
```



---
## _process_name
```python
from metadata import _process_name
```



---
## _process_version
```python
from metadata import _process_version
```



---
## _process_summary
```python
from metadata import _process_summary
```

Check the field contains no newlines.

---
## _process_description_content_type
```python
from metadata import _process_description_content_type
```



---
## _process_dynamic
```python
from metadata import _process_dynamic
```



---
## _process_provides_extra
```python
from metadata import _process_provides_extra
```



---
## _process_requires_python
```python
from metadata import _process_requires_python
```



---
## _process_requires_dist
```python
from metadata import _process_requires_dist
```



---
## from_raw
```python
from metadata import from_raw
```

Create an instance from :class:`RawMetadata`.

If *validate* is true, all metadata will be validated. All exceptions
related to validation will be gathered and raised as an :class:`ExceptionGroup`.

---
## from_email
```python
from metadata import from_email
```

Parse metadata from email headers.

If *validate* is true, the metadata will be validated. All exceptions
related to validation will be gathered and raised as an :class:`ExceptionGroup`.

---
## ExceptionGroup
```python
from metadata import ExceptionGroup
```

A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11.

If :external:exc:`ExceptionGroup` is already defined by Python itself,
that version is used instead.

---
## __repr__
```python
from metadata import __repr__
```



---
## _Version
```python
from version import _Version
```



---
## parse
```python
from version import parse
```

Parse the given version string and return either a :class:`Version` object
or a :class:`LegacyVersion` object depending on if the given version is
a valid PEP 440 version or a legacy version.

---
## InvalidVersion
```python
from version import InvalidVersion
```

An invalid version was found, users should refer to PEP 440.

---
## _BaseVersion
```python
from version import _BaseVersion
```



---
## Version
```python
from version import Version
```



---
## _parse_letter_version
```python
from version import _parse_letter_version
```



---
## _parse_local_version
```python
from version import _parse_local_version
```

Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").

---
## _cmpkey
```python
from version import _cmpkey
```



---
## __hash__
```python
from version import __hash__
```



---
## __lt__
```python
from version import __lt__
```



---
## __le__
```python
from version import __le__
```



---
## __eq__
```python
from version import __eq__
```



---
## __ge__
```python
from version import __ge__
```



---
## __gt__
```python
from version import __gt__
```



---
## __ne__
```python
from version import __ne__
```



---
## __init__
```python
from version import __init__
```



---
## __repr__
```python
from version import __repr__
```



---
## __str__
```python
from version import __str__
```



---
## epoch
```python
from version import epoch
```



---
## release
```python
from version import release
```



---
## pre
```python
from version import pre
```



---
## post
```python
from version import post
```



---
## dev
```python
from version import dev
```



---
## local
```python
from version import local
```



---
## public
```python
from version import public
```



---
## base_version
```python
from version import base_version
```



---
## is_prerelease
```python
from version import is_prerelease
```



---
## is_postrelease
```python
from version import is_postrelease
```



---
## is_devrelease
```python
from version import is_devrelease
```



---
## major
```python
from version import major
```



---
## minor
```python
from version import minor
```



---
## micro
```python
from version import micro
```



---
## __name__
```python
from _parser import __name__
```

This module offers a generic date/time string parser which is able to parse
most known formats to represent a date and/or time.

This module attempts to be forgiving with regards to unlikely input formats,
returning a datetime object even for dates which are ambiguous. If an element
of a date/time stamp is omitted, the following rules are applied:

- If AM or PM is left unspecified, a 24-hour clock is assumed, however, an hour
  on a 12-hour clock (``0 <= hour <= 12``) *must* be specified if AM or PM is
  specified.
- If a time zone is omitted, a timezone-naive datetime is returned.

If any other elements are missing, they are taken from the
:class:`datetime.datetime` object passed to the parameter ``default``. If this
results in a day number exceeding the valid number of days per month, the
value falls back to the end of the month.

Additional resources about date/time string formats can be found below:

- `A summary of the international standard date and time notation
  <https://www.cl.cam.ac.uk/~mgk25/iso-time.html>`_
- `W3C Date and Time Formats <https://www.w3.org/TR/NOTE-datetime>`_
- `Time Formats (Planetary Rings Node) <https://pds-rings.seti.org:443/tools/time_formats.html>`_
- `CPAN ParseDate module
  <https://metacpan.org/pod/release/MUIR/Time-modules-2013.0912/lib/Time/ParseDate.pm>`_
- `Java SimpleDateFormat Class
  <https://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html>`_

---
## Node
```python
from _parser import Node
```



---
## Variable
```python
from _parser import Variable
```



---
## Value
```python
from _parser import Value
```



---
## Op
```python
from _parser import Op
```



---
## ParsedRequirement
```python
from _parser import ParsedRequirement
```



---
## parse_requirement
```python
from _parser import parse_requirement
```



---
## _parse_requirement
```python
from _parser import _parse_requirement
```

requirement = WS? IDENTIFIER WS? extras WS? requirement_details

---
## _parse_requirement_details
```python
from _parser import _parse_requirement_details
```

requirement_details = AT URL (WS requirement_marker?)?
| specifier WS? (requirement_marker)?

---
## _parse_requirement_marker
```python
from _parser import _parse_requirement_marker
```

requirement_marker = SEMICOLON marker WS?

---
## _parse_extras
```python
from _parser import _parse_extras
```

extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?

---
## _parse_extras_list
```python
from _parser import _parse_extras_list
```

extras_list = identifier (wsp* ',' wsp* identifier)*

---
## _parse_specifier
```python
from _parser import _parse_specifier
```

specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
| WS? version_many WS?

---
## _parse_version_many
```python
from _parser import _parse_version_many
```

version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?

---
## parse_marker
```python
from _parser import parse_marker
```



---
## _parse_full_marker
```python
from _parser import _parse_full_marker
```



---
## _parse_marker
```python
from _parser import _parse_marker
```

marker = marker_atom (BOOLOP marker_atom)+

---
## _parse_marker_atom
```python
from _parser import _parse_marker_atom
```

marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
| WS? marker_item WS?

---
## _parse_marker_item
```python
from _parser import _parse_marker_item
```

marker_item = WS? marker_var WS? marker_op WS? marker_var WS?

---
## _parse_marker_var
```python
from _parser import _parse_marker_var
```

marker_var = VARIABLE | QUOTED_STRING

---
## process_env_var
```python
from _parser import process_env_var
```



---
## process_python_str
```python
from _parser import process_python_str
```



---
## _parse_marker_op
```python
from _parser import _parse_marker_op
```

marker_op = IN | NOT IN | OP

---
## __init__
```python
from _parser import __init__
```



---
## __str__
```python
from _parser import __str__
```



---
## __repr__
```python
from _parser import __repr__
```



---
## serialize
```python
from _parser import serialize
```



---
## __name__
```python
from utils import __name__
```

Utility functions and objects for implementing the interchange API.

---
## InvalidName
```python
from utils import InvalidName
```

An invalid distribution name; users should refer to the packaging user guide.

---
## InvalidWheelFilename
```python
from utils import InvalidWheelFilename
```

An invalid wheel filename was found, users should refer to PEP 427.

---
## InvalidSdistFilename
```python
from utils import InvalidSdistFilename
```

An invalid sdist filename was found, users should refer to the packaging user guide.

---
## canonicalize_name
```python
from utils import canonicalize_name
```



---
## is_normalized_name
```python
from utils import is_normalized_name
```



---
## canonicalize_version
```python
from utils import canonicalize_version
```

This is very similar to Version.__str__, but has one subtle difference
with the way it handles the release segment.

---
## parse_wheel_filename
```python
from utils import parse_wheel_filename
```



---
## parse_sdist_filename
```python
from utils import parse_sdist_filename
```



---
## __name__
```python
from requirements import __name__
```



---
## InvalidRequirement
```python
from requirements import InvalidRequirement
```

An invalid requirement was found, users should refer to PEP 508.

---
## Requirement
```python
from requirements import Requirement
```

Parse a requirement.

Parse a given requirement string into its parts, such as name, specifier,
URL, and extras. Raises InvalidRequirement on a badly-formed requirement
string.

---
## __init__
```python
from requirements import __init__
```



---
## _iter_parts
```python
from requirements import _iter_parts
```



---
## __str__
```python
from requirements import __str__
```



---
## __repr__
```python
from requirements import __repr__
```



---
## __hash__
```python
from requirements import __hash__
```



---
## __eq__
```python
from requirements import __eq__
```



---
## __name__
```python
from _structures import __name__
```



---
## InfinityType
```python
from _structures import InfinityType
```



---
## NegativeInfinityType
```python
from _structures import NegativeInfinityType
```



---
## __repr__
```python
from _structures import __repr__
```



---
## __hash__
```python
from _structures import __hash__
```



---
## __lt__
```python
from _structures import __lt__
```



---
## __le__
```python
from _structures import __le__
```



---
## __eq__
```python
from _structures import __eq__
```



---
## __gt__
```python
from _structures import __gt__
```



---
## __ge__
```python
from _structures import __ge__
```



---
## __neg__
```python
from _structures import __neg__
```



---
## __name__
```python
from markers import __name__
```

Parser for the environment markers micro-language defined in PEP 508.

---
## InvalidMarker
```python
from markers import InvalidMarker
```

An invalid marker was found, users should refer to PEP 508.

---
## UndefinedComparison
```python
from markers import UndefinedComparison
```

An invalid operation was attempted on a value that doesn't support it.

---
## UndefinedEnvironmentName
```python
from markers import UndefinedEnvironmentName
```

A name was attempted to be used that does not exist inside of the
environment.

---
## Environment
```python
from markers import Environment
```



---
## _normalize_extra_values
```python
from markers import _normalize_extra_values
```

Normalize extra values.

---
## _format_marker
```python
from markers import _format_marker
```



---
## _eval_op
```python
from markers import _eval_op
```



---
## _normalize
```python
from markers import _normalize
```



---
## _evaluate_markers
```python
from markers import _evaluate_markers
```



---
## format_full_version
```python
from markers import format_full_version
```



---
## default_environment
```python
from markers import default_environment
```



---
## Marker
```python
from markers import Marker
```



---
## __init__
```python
from markers import __init__
```



---
## __str__
```python
from markers import __str__
```



---
## __repr__
```python
from markers import __repr__
```



---
## __hash__
```python
from markers import __hash__
```



---
## __eq__
```python
from markers import __eq__
```



---
## evaluate
```python
from markers import evaluate
```

Evaluate a marker expression returned by the :func:`parse_requirement`
function in the specified context.

---
## __name__
```python
from _manylinux import __name__
```



---
## _parse_elf
```python
from _manylinux import _parse_elf
```



---
## _is_linux_armhf
```python
from _manylinux import _is_linux_armhf
```



---
## _is_linux_i686
```python
from _manylinux import _is_linux_i686
```



---
## _have_compatible_abi
```python
from _manylinux import _have_compatible_abi
```



---
## _GLibCVersion
```python
from _manylinux import _GLibCVersion
```



---
## _glibc_version_string_confstr
```python
from _manylinux import _glibc_version_string_confstr
```

Primary implementation of glibc_version_string using os.confstr.

---
## _glibc_version_string_ctypes
```python
from _manylinux import _glibc_version_string_ctypes
```

Fallback implementation of glibc_version_string using ctypes.

---
## _glibc_version_string
```python
from _manylinux import _glibc_version_string
```

Returns glibc version string, or None if not using glibc.

---
## _parse_glibc_version
```python
from _manylinux import _parse_glibc_version
```

Parse glibc version.

We use a regexp instead of str.split because we want to discard any
random junk that might come after the minor version -- this might happen
in patched/forked versions of glibc (e.g. Linaro's version of glibc
uses version strings like "2.20-2014.11"). See gh-3588.

---
## _get_glibc_version
```python
from _manylinux import _get_glibc_version
```



---
## _is_compatible
```python
from _manylinux import _is_compatible
```



---
## platform_tags
```python
from _manylinux import platform_tags
```

Generate manylinux tags compatible to the current platform.

:param archs: Sequence of compatible architectures.
    The first one shall be the closest to the actual architecture and be the part of
    platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
    The ``linux_`` prefix is assumed as a prerequisite for the current platform to
    be manylinux-compatible.

:returns: An iterator of compatible manylinux tags.

---
## __name__
```python
from _tokenizer import __name__
```



---
## Token
```python
from _tokenizer import Token
```



---
## ParserSyntaxError
```python
from _tokenizer import ParserSyntaxError
```

The provided source text could not be parsed correctly.

---
## Tokenizer
```python
from _tokenizer import Tokenizer
```

Context-sensitive token parsing.

Provides methods to examine the input stream to check whether the next token
matches.

---
## __init__
```python
from _tokenizer import __init__
```



---
## __str__
```python
from _tokenizer import __str__
```



---
## consume
```python
from _tokenizer import consume
```

Move beyond provided token name, if at current position.

---
## check
```python
from _tokenizer import check
```

Check whether the next token has the provided name.

By default, if the check succeeds, the token *must* be read before
another check. If `peek` is set to `True`, the token is not loaded and
would need to be checked again.

---
## expect
```python
from _tokenizer import expect
```

Expect a certain token name next, failing with a syntax error otherwise.

The token is *not* read.

---
## read
```python
from _tokenizer import read
```

Consume the next token and return it.

---
## raise_syntax_error
```python
from _tokenizer import raise_syntax_error
```

Raise ParserSyntaxError at the given position.

---
## enclosing_tokens
```python
from _tokenizer import enclosing_tokens
```



---
## __name__
```python
from specifiers import __name__
```

.. testsetup::

from pip._vendor.packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
from pip._vendor.packaging.version import Version

---
## _coerce_version
```python
from specifiers import _coerce_version
```



---
## InvalidSpecifier
```python
from specifiers import InvalidSpecifier
```

Raised when attempting to create a :class:`Specifier` with a specifier
string that is invalid.

>>> Specifier("lolwat")
Traceback (most recent call last):
    ...
packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'

---
## BaseSpecifier
```python
from specifiers import BaseSpecifier
```



---
## Specifier
```python
from specifiers import Specifier
```

This class abstracts handling of version specifiers.

.. tip::

    It is generally not required to instantiate this manually. You should instead
    prefer to work with :class:`SpecifierSet` instead, which can parse
    comma-separated version specifiers (which is what package metadata contains).

---
## _version_split
```python
from specifiers import _version_split
```

Split version into components.

The split components are intended for version comparison. The logic does
not attempt to retain the original version string, so joining the
components back with :func:`_version_join` may not produce the original
version string.

---
## _version_join
```python
from specifiers import _version_join
```

Join split version components into a version string.

This function assumes the input came from :func:`_version_split`, where the
first component must be the epoch (either empty or numeric), and all other
components numeric.

---
## _is_not_suffix
```python
from specifiers import _is_not_suffix
```



---
## _pad_version
```python
from specifiers import _pad_version
```



---
## SpecifierSet
```python
from specifiers import SpecifierSet
```

This class abstracts handling of a set of version specifiers.

It can be passed a single specifier (``>=3.0``), a comma-separated list of
specifiers (``>=3.0,!=3.1``), or no specifier at all.

---
## __str__
```python
from specifiers import __str__
```

A string representation of the specifier set that can be round-tripped.

Note that the ordering of the individual specifiers within the set may not
match the input string.

>>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
'!=1.0.1,>=1.0.0'
>>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
'!=1.0.1,>=1.0.0'

---
## __hash__
```python
from specifiers import __hash__
```



---
## __eq__
```python
from specifiers import __eq__
```

Whether or not the two SpecifierSet-like objects are equal.

:param other: The other object to check against.

The value of :attr:`prereleases` is ignored.

>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
True
>>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
True
>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
False

---
## prereleases
```python
from specifiers import prereleases
```



---
## contains
```python
from specifiers import contains
```

Return whether or not the item is contained in this SpecifierSet.

:param item:
    The item to check for, which can be a version string or a
    :class:`Version` instance.
:param prereleases:
    Whether or not to match prereleases with this SpecifierSet. If set to
    ``None`` (the default), it uses :attr:`prereleases` to determine
    whether or not prereleases are allowed.

>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
True
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
True
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
False
>>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
True
>>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
True

---
## filter
```python
from specifiers import filter
```

Filter items in the given iterable, that match the specifiers in this set.

:param iterable:
    An iterable that can contain version strings and :class:`Version` instances.
    The items in the iterable will be filtered according to the specifier.
:param prereleases:
    Whether or not to allow prereleases in the returned iterator. If set to
    ``None`` (the default), it will be intelligently decide whether to allow
    prereleases or not (based on the :attr:`prereleases` attribute, and
    whether the only versions matching are prereleases).

This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
because it implements the rule from :pep:`440` that a prerelease item
SHOULD be accepted if no other versions match the given specifier.

>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
['1.3']
>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
['1.3', <Version('1.4')>]
>>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
[]
>>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
['1.3', '1.5a1']
>>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
['1.3', '1.5a1']

An "empty" SpecifierSet will filter items based on the presence of prerelease
versions in the set.

>>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
['1.3']
>>> list(SpecifierSet("").filter(["1.5a1"]))
['1.5a1']
>>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
['1.3', '1.5a1']
>>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
['1.3', '1.5a1']

---
## __init__
```python
from specifiers import __init__
```

Initialize a SpecifierSet instance.

:param specifiers:
    The string representation of a specifier or a comma-separated list of
    specifiers which will be parsed and normalized before use.
:param prereleases:
    This tells the SpecifierSet if it should accept prerelease versions if
    applicable or not. The default of ``None`` will autodetect it from the
    given specifiers.

:raises InvalidSpecifier:
    If the given ``specifiers`` are not parseable than this exception will be
    raised.

---
## operator
```python
from specifiers import operator
```

The operator of this specifier.

>>> Specifier("==1.2.3").operator
'=='

---
## version
```python
from specifiers import version
```

The version of this specifier.

>>> Specifier("==1.2.3").version
'1.2.3'

---
## __repr__
```python
from specifiers import __repr__
```

A representation of the specifier set that shows all internal state.

Note that the ordering of the individual specifiers within the set may not
match the input string.

>>> SpecifierSet('>=1.0.0,!=2.0.0')
<SpecifierSet('!=2.0.0,>=1.0.0')>
>>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
<SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
>>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
<SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>

---
## _canonical_spec
```python
from specifiers import _canonical_spec
```



---
## _get_operator
```python
from specifiers import _get_operator
```



---
## _compare_compatible
```python
from specifiers import _compare_compatible
```



---
## _compare_equal
```python
from specifiers import _compare_equal
```



---
## _compare_not_equal
```python
from specifiers import _compare_not_equal
```



---
## _compare_less_than_equal
```python
from specifiers import _compare_less_than_equal
```



---
## _compare_greater_than_equal
```python
from specifiers import _compare_greater_than_equal
```



---
## _compare_less_than
```python
from specifiers import _compare_less_than
```



---
## _compare_greater_than
```python
from specifiers import _compare_greater_than
```



---
## _compare_arbitrary
```python
from specifiers import _compare_arbitrary
```



---
## __contains__
```python
from specifiers import __contains__
```

Return whether or not the item is contained in this specifier.

:param item: The item to check for.

This is used for the ``in`` operator and behaves the same as
:meth:`contains` with no ``prereleases`` argument passed.

>>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
True
>>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
False
>>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
False
>>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
True

---
## __and__
```python
from specifiers import __and__
```

Return a SpecifierSet which is a combination of the two sets.

:param other: The other object to combine with.

>>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
<SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
>>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
<SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>

---
## __len__
```python
from specifiers import __len__
```

Returns the number of specifiers in this specifier set.

---
## __iter__
```python
from specifiers import __iter__
```

Returns an iterator over all the underlying :class:`Specifier` instances
in this specifier set.

>>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
[<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]

---
## __name__
```python
from _elffile import __name__
```

ELF file parser.

This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.

Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html

---
## ELFInvalid
```python
from _elffile import ELFInvalid
```



---
## EIClass
```python
from _elffile import EIClass
```



---
## EIData
```python
from _elffile import EIData
```



---
## EMachine
```python
from _elffile import EMachine
```



---
## ELFFile
```python
from _elffile import ELFFile
```

Representation of an ELF executable.

---
## __init__
```python
from _elffile import __init__
```



---
## _read
```python
from _elffile import _read
```



---
## interpreter
```python
from _elffile import interpreter
```

The path recorded in the ``PT_INTERP`` section header.

---
## __name__
```python
from clean import __name__
```

pygments.lexers.clean
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Clean language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## clean
```python
from clean import clean
```



---
## __name__
```python
from txt import __name__
```



---
## render
```python
from txt import render
```



---
## __name__
```python
from markdown import __name__
```

gr.Markdown() component.

---
## render
```python
from markdown import render
```



---
## _highlight
```python
from markdown import _highlight
```

Syntax-highlights HTML-rendered Markdown.

Plucks sections to highlight that conform the the GitHub fenced code info
string as defined at https://github.github.com/gfm/#info-string.

Args:
    html (str): The rendered HTML.

Returns:
    str: The HTML with Pygments syntax highlighting applied to all code
        blocks.

---
## replacer
```python
from markdown import replacer
```



---
## __name__
```python
from __main__ import __name__
```



---
## main
```python
from __main__ import main
```

Run the main entry point.

---
## __name__
```python
from rst import __name__
```

reST helper functions.

---
## ReadMeHTMLTranslator
```python
from rst import ReadMeHTMLTranslator
```



---
## render
```python
from rst import render
```



---
## emptytag
```python
from rst import emptytag
```

Override this to add back the width/height attributes.

---
## __name__
```python
from web_ws import __name__
```



---
## WebSocketReady
```python
from web_ws import WebSocketReady
```



---
## WebSocketResponse
```python
from web_ws import WebSocketResponse
```



---
## __bool__
```python
from web_ws import __bool__
```



---
## __init__
```python
from web_ws import __init__
```



---
## _cancel_heartbeat
```python
from web_ws import _cancel_heartbeat
```



---
## _cancel_pong_response_cb
```python
from web_ws import _cancel_pong_response_cb
```



---
## _reset_heartbeat
```python
from web_ws import _reset_heartbeat
```



---
## _send_heartbeat
```python
from web_ws import _send_heartbeat
```



---
## _ping_task_done
```python
from web_ws import _ping_task_done
```

Callback for when the ping task completes.

---
## _pong_not_received
```python
from web_ws import _pong_not_received
```



---
## _handle_ping_pong_exception
```python
from web_ws import _handle_ping_pong_exception
```

Handle exceptions raised during ping/pong processing.

---
## _set_closed
```python
from web_ws import _set_closed
```

Set the connection to closed.

Cancel any heartbeat timers and set the closed flag.

---
## _handshake
```python
from web_ws import _handshake
```



---
## _pre_start
```python
from web_ws import _pre_start
```



---
## _post_start
```python
from web_ws import _post_start
```



---
## can_prepare
```python
from web_ws import can_prepare
```



---
## closed
```python
from web_ws import closed
```



---
## close_code
```python
from web_ws import close_code
```



---
## ws_protocol
```python
from web_ws import ws_protocol
```



---
## compress
```python
from web_ws import compress
```



---
## get_extra_info
```python
from web_ws import get_extra_info
```

Get optional transport information.

If no value associated with ``name`` is found, ``default`` is returned.

---
## exception
```python
from web_ws import exception
```



---
## _set_closing
```python
from web_ws import _set_closing
```

Set the close code and mark the connection as closing.

---
## _set_code_close_transport
```python
from web_ws import _set_code_close_transport
```

Set the close code and close the transport.

---
## _close_transport
```python
from web_ws import _close_transport
```

Close the transport.

---
## __aiter__
```python
from web_ws import __aiter__
```



---
## _cancel
```python
from web_ws import _cancel
```



---
## __name__
```python
from worker import __name__
```

Async gunicorn worker for aiohttp.web

---
## GunicornWebWorker
```python
from worker import GunicornWebWorker
```



---
## GunicornUVLoopWebWorker
```python
from worker import GunicornUVLoopWebWorker
```



---
## __init__
```python
from worker import __init__
```



---
## init_process
```python
from worker import init_process
```



---
## run
```python
from worker import run
```



---
## _wait_next_notify
```python
from worker import _wait_next_notify
```



---
## _notify_waiter_done
```python
from worker import _notify_waiter_done
```



---
## init_signals
```python
from worker import init_signals
```



---
## handle_quit
```python
from worker import handle_quit
```



---
## handle_abort
```python
from worker import handle_abort
```



---
## _create_ssl_context
```python
from worker import _create_ssl_context
```

Creates SSLContext instance for usage in asyncio.create_server.

See ssl.SSLSocket.__init__ for more details.

---
## _get_valid_log_format
```python
from worker import _get_valid_log_format
```



---
## __name__
```python
from multipart import __name__
```



---
## BadContentDispositionHeader
```python
from multipart import BadContentDispositionHeader
```



---
## BadContentDispositionParam
```python
from multipart import BadContentDispositionParam
```



---
## parse_content_disposition
```python
from multipart import parse_content_disposition
```



---
## content_disposition_filename
```python
from multipart import content_disposition_filename
```



---
## MultipartResponseWrapper
```python
from multipart import MultipartResponseWrapper
```

Wrapper around the MultipartReader.

It takes care about
underlying connection and close it when it needs in.

---
## BodyPartReader
```python
from multipart import BodyPartReader
```

Multipart reader for single body part.

---
## BodyPartReaderPayload
```python
from multipart import BodyPartReaderPayload
```



---
## MultipartReader
```python
from multipart import MultipartReader
```

Multipart body reader.

---
## MultipartWriter
```python
from multipart import MultipartWriter
```

Multipart body writer.

---
## MultipartPayloadWriter
```python
from multipart import MultipartPayloadWriter
```



---
## is_token
```python
from multipart import is_token
```



---
## is_quoted
```python
from multipart import is_quoted
```



---
## is_rfc5987
```python
from multipart import is_rfc5987
```



---
## is_extended_param
```python
from multipart import is_extended_param
```



---
## is_continuous_param
```python
from multipart import is_continuous_param
```



---
## unescape
```python
from multipart import unescape
```



---
## __init__
```python
from multipart import __init__
```



---
## __aiter__
```python
from multipart import __aiter__
```



---
## at_eof
```python
from multipart import at_eof
```

Returns True if the final boundary was reached, false otherwise.

---
## decode
```python
from multipart import decode
```



---
## _decode_content
```python
from multipart import _decode_content
```



---
## _decode_content_transfer
```python
from multipart import _decode_content_transfer
```



---
## get_charset
```python
from multipart import get_charset
```

Returns charset parameter from Content-Type header or default.

---
## name
```python
from multipart import name
```

Returns name specified in Content-Disposition header.

If the header is missing or malformed, returns None.

---
## filename
```python
from multipart import filename
```

Returns filename specified in Content-Disposition header.

Returns None if the header is missing or malformed.

---
## from_response
```python
from multipart import from_response
```

Constructs reader instance from HTTP response.

:param response: :class:`~aiohttp.client.ClientResponse` instance

---
## _get_part_reader
```python
from multipart import _get_part_reader
```

Dispatches the response by the `Content-Type` header.

Returns a suitable reader instance.

:param dict headers: Response headers

---
## _get_boundary
```python
from multipart import _get_boundary
```



---
## __enter__
```python
from multipart import __enter__
```



---
## __exit__
```python
from multipart import __exit__
```



---
## __iter__
```python
from multipart import __iter__
```



---
## __len__
```python
from multipart import __len__
```



---
## __bool__
```python
from multipart import __bool__
```



---
## _boundary_value
```python
from multipart import _boundary_value
```

Wrap boundary parameter value in quotes, if necessary.

Reads self.boundary and returns a unicode string.

---
## boundary
```python
from multipart import boundary
```



---
## append
```python
from multipart import append
```



---
## append_payload
```python
from multipart import append_payload
```

Adds a new body part to multipart writer.

---
## append_json
```python
from multipart import append_json
```

Helper to append JSON part.

---
## append_form
```python
from multipart import append_form
```

Helper to append form urlencoded part.

---
## size
```python
from multipart import size
```

The total size of this file, counted as the number of bytes that
currently have been written to the file.

---
## enable_encoding
```python
from multipart import enable_encoding
```



---
## enable_compression
```python
from multipart import enable_compression
```



---
## __name__
```python
from web_response import __name__
```



---
## ContentCoding
```python
from web_response import ContentCoding
```



---
## StreamResponse
```python
from web_response import StreamResponse
```



---
## Response
```python
from web_response import Response
```



---
## json_response
```python
from web_response import json_response
```



---
## __init__
```python
from web_response import __init__
```



---
## prepared
```python
from web_response import prepared
```



---
## task
```python
from web_response import task
```



---
## status
```python
from web_response import status
```



---
## chunked
```python
from web_response import chunked
```



---
## compression
```python
from web_response import compression
```



---
## reason
```python
from web_response import reason
```



---
## set_status
```python
from web_response import set_status
```



---
## _set_status
```python
from web_response import _set_status
```



---
## keep_alive
```python
from web_response import keep_alive
```



---
## force_close
```python
from web_response import force_close
```



---
## body_length
```python
from web_response import body_length
```



---
## output_length
```python
from web_response import output_length
```



---
## enable_chunked_encoding
```python
from web_response import enable_chunked_encoding
```

Enables automatic chunked transfer encoding.

---
## enable_compression
```python
from web_response import enable_compression
```

Enables response compression encoding.

---
## headers
```python
from web_response import headers
```



---
## cookies
```python
from web_response import cookies
```



---
## set_cookie
```python
from web_response import set_cookie
```

Set or update response cookie.

Sets new cookie or updates existent with new value.
Also updates only those params which are not None.

---
## del_cookie
```python
from web_response import del_cookie
```

Delete cookie.

Creates new empty expired cookie.

---
## content_length
```python
from web_response import content_length
```



---
## content_type
```python
from web_response import content_type
```



---
## charset
```python
from web_response import charset
```



---
## last_modified
```python
from web_response import last_modified
```



---
## etag
```python
from web_response import etag
```



---
## _generate_content_type_header
```python
from web_response import _generate_content_type_header
```



---
## __repr__
```python
from web_response import __repr__
```



---
## __getitem__
```python
from web_response import __getitem__
```



---
## __setitem__
```python
from web_response import __setitem__
```



---
## __delitem__
```python
from web_response import __delitem__
```



---
## __len__
```python
from web_response import __len__
```



---
## __iter__
```python
from web_response import __iter__
```



---
## __hash__
```python
from web_response import __hash__
```



---
## __eq__
```python
from web_response import __eq__
```



---
## body
```python
from web_response import body
```



---
## text
```python
from web_response import text
```



---
## __name__
```python
from client_ws import __name__
```

WebSocket client for asyncio.

---
## ClientWebSocketResponse
```python
from client_ws import ClientWebSocketResponse
```



---
## __init__
```python
from client_ws import __init__
```



---
## _cancel_heartbeat
```python
from client_ws import _cancel_heartbeat
```



---
## _cancel_pong_response_cb
```python
from client_ws import _cancel_pong_response_cb
```



---
## _reset_heartbeat
```python
from client_ws import _reset_heartbeat
```



---
## _send_heartbeat
```python
from client_ws import _send_heartbeat
```



---
## _ping_task_done
```python
from client_ws import _ping_task_done
```

Callback for when the ping task completes.

---
## _pong_not_received
```python
from client_ws import _pong_not_received
```



---
## _handle_ping_pong_exception
```python
from client_ws import _handle_ping_pong_exception
```

Handle exceptions raised during ping/pong processing.

---
## _set_closed
```python
from client_ws import _set_closed
```

Set the connection to closed.

Cancel any heartbeat timers and set the closed flag.

---
## _set_closing
```python
from client_ws import _set_closing
```

Set the connection to closing.

Cancel any heartbeat timers and set the closing flag.

---
## closed
```python
from client_ws import closed
```



---
## close_code
```python
from client_ws import close_code
```



---
## protocol
```python
from client_ws import protocol
```



---
## compress
```python
from client_ws import compress
```



---
## client_notakeover
```python
from client_ws import client_notakeover
```



---
## get_extra_info
```python
from client_ws import get_extra_info
```

extra info from connection transport

---
## exception
```python
from client_ws import exception
```



---
## __aiter__
```python
from client_ws import __aiter__
```



---
## __name__
```python
from test_utils import __name__
```



---
## get_unused_port_socket
```python
from test_utils import get_unused_port_socket
```



---
## get_port_socket
```python
from test_utils import get_port_socket
```



---
## unused_port
```python
from test_utils import unused_port
```

Return a port that is unused on the current host.

---
## BaseTestServer
```python
from test_utils import BaseTestServer
```



---
## TestServer
```python
from test_utils import TestServer
```



---
## RawTestServer
```python
from test_utils import RawTestServer
```



---
## TestClient
```python
from test_utils import TestClient
```

A test client implementation.

To write functional tests for aiohttp based servers.

---
## AioHTTPTestCase
```python
from test_utils import AioHTTPTestCase
```

A base class to allow for unittest web applications using aiohttp.

Provides the following:

* self.client (aiohttp.test_utils.TestClient): an aiohttp test client.
* self.loop (asyncio.BaseEventLoop): the event loop in which the
    application and server are running.
* self.app (aiohttp.web.Application): the application returned by
    self.get_application()

Note that the TestClient's methods are asynchronous: you have to
execute function on the test client using asynchronous methods.

---
## unittest_run_loop
```python
from test_utils import unittest_run_loop
```

A decorator dedicated to use with asynchronous AioHTTPTestCase test methods.

In 3.8+, this does nothing.

---
## loop_context
```python
from test_utils import loop_context
```

A contextmanager that creates an event_loop, for test purposes.

Handles the creation and cleanup of a test loop.

---
## setup_test_loop
```python
from test_utils import setup_test_loop
```

Create and return an asyncio.BaseEventLoop instance.

The caller should also call teardown_test_loop,
once they are done with the loop.

---
## teardown_test_loop
```python
from test_utils import teardown_test_loop
```

Teardown and cleanup an event_loop created by setup_test_loop.

---
## _create_app_mock
```python
from test_utils import _create_app_mock
```



---
## _create_transport
```python
from test_utils import _create_transport
```



---
## make_mocked_request
```python
from test_utils import make_mocked_request
```

Creates mocked web.Request testing purposes.

Useful in unit tests, when spinning full web server is overkill or
specific conditions and errors are hard to trigger.

---
## make_mocked_coro
```python
from test_utils import make_mocked_coro
```

Creates a coroutine mock.

---
## __init__
```python
from test_utils import __init__
```



---
## make_url
```python
from test_utils import make_url
```



---
## started
```python
from test_utils import started
```



---
## closed
```python
from test_utils import closed
```



---
## handler
```python
from test_utils import handler
```



---
## __enter__
```python
from test_utils import __enter__
```



---
## __exit__
```python
from test_utils import __exit__
```



---
## host
```python
from test_utils import host
```



---
## port
```python
from test_utils import port
```



---
## server
```python
from test_utils import server
```



---
## app
```python
from test_utils import app
```



---
## session
```python
from test_utils import session
```

An internal aiohttp.ClientSession.

Unlike the methods on the TestClient, client session requests
do not automatically include the host in the url queried, and
will require an absolute path to the resource.

---
## ws_connect
```python
from test_utils import ws_connect
```

Initiate websocket connection.

The api corresponds to aiohttp.ClientSession.ws_connect.

---
## get_app
```python
from test_utils import get_app
```

Obsolete method used to constructing web application.

Use .get_application() coroutine instead.

---
## get_dict
```python
from test_utils import get_dict
```



---
## set_dict
```python
from test_utils import set_dict
```



---
## get_extra_info
```python
from test_utils import get_extra_info
```



---
## request
```python
from test_utils import request
```

Routes a request to tested http server.

The interface is identical to aiohttp.ClientSession.request,
except the loop kwarg is overridden by the instance used by the
test server.

---
## get
```python
from test_utils import get
```

Perform an HTTP GET request.

---
## options
```python
from test_utils import options
```

Perform an HTTP OPTIONS request.

---
## head
```python
from test_utils import head
```

Perform an HTTP HEAD request.

---
## post
```python
from test_utils import post
```

Perform an HTTP POST request.

---
## put
```python
from test_utils import put
```

Perform an HTTP PUT request.

---
## patch
```python
from test_utils import patch
```

Perform an HTTP PATCH request.

---
## delete
```python
from test_utils import delete
```

Perform an HTTP PATCH request.

---
## __name__
```python
from tracing import __name__
```



---
## TraceConfig
```python
from tracing import TraceConfig
```

First-class used to trace requests launched via ClientSession objects.

---
## TraceRequestStartParams
```python
from tracing import TraceRequestStartParams
```

Parameters sent by the `on_request_start` signal

---
## TraceRequestChunkSentParams
```python
from tracing import TraceRequestChunkSentParams
```

Parameters sent by the `on_request_chunk_sent` signal

---
## TraceResponseChunkReceivedParams
```python
from tracing import TraceResponseChunkReceivedParams
```

Parameters sent by the `on_response_chunk_received` signal

---
## TraceRequestEndParams
```python
from tracing import TraceRequestEndParams
```

Parameters sent by the `on_request_end` signal

---
## TraceRequestExceptionParams
```python
from tracing import TraceRequestExceptionParams
```

Parameters sent by the `on_request_exception` signal

---
## TraceRequestRedirectParams
```python
from tracing import TraceRequestRedirectParams
```

Parameters sent by the `on_request_redirect` signal

---
## TraceConnectionQueuedStartParams
```python
from tracing import TraceConnectionQueuedStartParams
```

Parameters sent by the `on_connection_queued_start` signal

---
## TraceConnectionQueuedEndParams
```python
from tracing import TraceConnectionQueuedEndParams
```

Parameters sent by the `on_connection_queued_end` signal

---
## TraceConnectionCreateStartParams
```python
from tracing import TraceConnectionCreateStartParams
```

Parameters sent by the `on_connection_create_start` signal

---
## TraceConnectionCreateEndParams
```python
from tracing import TraceConnectionCreateEndParams
```

Parameters sent by the `on_connection_create_end` signal

---
## TraceConnectionReuseconnParams
```python
from tracing import TraceConnectionReuseconnParams
```

Parameters sent by the `on_connection_reuseconn` signal

---
## TraceDnsResolveHostStartParams
```python
from tracing import TraceDnsResolveHostStartParams
```

Parameters sent by the `on_dns_resolvehost_start` signal

---
## TraceDnsResolveHostEndParams
```python
from tracing import TraceDnsResolveHostEndParams
```

Parameters sent by the `on_dns_resolvehost_end` signal

---
## TraceDnsCacheHitParams
```python
from tracing import TraceDnsCacheHitParams
```

Parameters sent by the `on_dns_cache_hit` signal

---
## TraceDnsCacheMissParams
```python
from tracing import TraceDnsCacheMissParams
```

Parameters sent by the `on_dns_cache_miss` signal

---
## TraceRequestHeadersSentParams
```python
from tracing import TraceRequestHeadersSentParams
```

Parameters sent by the `on_request_headers_sent` signal

---
## Trace
```python
from tracing import Trace
```

Internal dependency holder class.

Used to keep together the main dependencies used
at the moment of send a signal.

---
## _SignalCallback
```python
from tracing import _SignalCallback
```



---
## __init__
```python
from tracing import __init__
```



---
## trace_config_ctx
```python
from tracing import trace_config_ctx
```

Return a new trace_config_ctx instance

---
## freeze
```python
from tracing import freeze
```



---
## on_request_start
```python
from tracing import on_request_start
```



---
## on_request_chunk_sent
```python
from tracing import on_request_chunk_sent
```



---
## on_response_chunk_received
```python
from tracing import on_response_chunk_received
```



---
## on_request_end
```python
from tracing import on_request_end
```



---
## on_request_exception
```python
from tracing import on_request_exception
```



---
## on_request_redirect
```python
from tracing import on_request_redirect
```



---
## on_connection_queued_start
```python
from tracing import on_connection_queued_start
```



---
## on_connection_queued_end
```python
from tracing import on_connection_queued_end
```



---
## on_connection_create_start
```python
from tracing import on_connection_create_start
```



---
## on_connection_create_end
```python
from tracing import on_connection_create_end
```



---
## on_connection_reuseconn
```python
from tracing import on_connection_reuseconn
```



---
## on_dns_resolvehost_start
```python
from tracing import on_dns_resolvehost_start
```



---
## on_dns_resolvehost_end
```python
from tracing import on_dns_resolvehost_end
```



---
## on_dns_cache_hit
```python
from tracing import on_dns_cache_hit
```



---
## on_dns_cache_miss
```python
from tracing import on_dns_cache_miss
```



---
## on_request_headers_sent
```python
from tracing import on_request_headers_sent
```



---
## __call__
```python
from tracing import __call__
```



---
## __name__
```python
from web_exceptions import __name__
```



---
## NotAppKeyWarning
```python
from web_exceptions import NotAppKeyWarning
```

Warning when not using AppKey in Application.

---
## HTTPException
```python
from web_exceptions import HTTPException
```



---
## HTTPError
```python
from web_exceptions import HTTPError
```

Base class for exceptions with status codes in the 400s and 500s.

---
## HTTPRedirection
```python
from web_exceptions import HTTPRedirection
```

Base class for exceptions with status codes in the 300s.

---
## HTTPSuccessful
```python
from web_exceptions import HTTPSuccessful
```

Base class for exceptions with status codes in the 200s.

---
## HTTPOk
```python
from web_exceptions import HTTPOk
```



---
## HTTPCreated
```python
from web_exceptions import HTTPCreated
```



---
## HTTPAccepted
```python
from web_exceptions import HTTPAccepted
```



---
## HTTPNonAuthoritativeInformation
```python
from web_exceptions import HTTPNonAuthoritativeInformation
```



---
## HTTPNoContent
```python
from web_exceptions import HTTPNoContent
```



---
## HTTPResetContent
```python
from web_exceptions import HTTPResetContent
```



---
## HTTPPartialContent
```python
from web_exceptions import HTTPPartialContent
```



---
## HTTPMove
```python
from web_exceptions import HTTPMove
```



---
## HTTPMultipleChoices
```python
from web_exceptions import HTTPMultipleChoices
```



---
## HTTPMovedPermanently
```python
from web_exceptions import HTTPMovedPermanently
```



---
## HTTPFound
```python
from web_exceptions import HTTPFound
```



---
## HTTPSeeOther
```python
from web_exceptions import HTTPSeeOther
```



---
## HTTPNotModified
```python
from web_exceptions import HTTPNotModified
```



---
## HTTPUseProxy
```python
from web_exceptions import HTTPUseProxy
```



---
## HTTPTemporaryRedirect
```python
from web_exceptions import HTTPTemporaryRedirect
```



---
## HTTPPermanentRedirect
```python
from web_exceptions import HTTPPermanentRedirect
```



---
## HTTPClientError
```python
from web_exceptions import HTTPClientError
```



---
## HTTPBadRequest
```python
from web_exceptions import HTTPBadRequest
```



---
## HTTPUnauthorized
```python
from web_exceptions import HTTPUnauthorized
```



---
## HTTPPaymentRequired
```python
from web_exceptions import HTTPPaymentRequired
```



---
## HTTPForbidden
```python
from web_exceptions import HTTPForbidden
```



---
## HTTPNotFound
```python
from web_exceptions import HTTPNotFound
```



---
## HTTPMethodNotAllowed
```python
from web_exceptions import HTTPMethodNotAllowed
```



---
## HTTPNotAcceptable
```python
from web_exceptions import HTTPNotAcceptable
```



---
## HTTPProxyAuthenticationRequired
```python
from web_exceptions import HTTPProxyAuthenticationRequired
```



---
## HTTPRequestTimeout
```python
from web_exceptions import HTTPRequestTimeout
```



---
## HTTPConflict
```python
from web_exceptions import HTTPConflict
```



---
## HTTPGone
```python
from web_exceptions import HTTPGone
```



---
## HTTPLengthRequired
```python
from web_exceptions import HTTPLengthRequired
```



---
## HTTPPreconditionFailed
```python
from web_exceptions import HTTPPreconditionFailed
```



---
## HTTPRequestEntityTooLarge
```python
from web_exceptions import HTTPRequestEntityTooLarge
```



---
## HTTPRequestURITooLong
```python
from web_exceptions import HTTPRequestURITooLong
```



---
## HTTPUnsupportedMediaType
```python
from web_exceptions import HTTPUnsupportedMediaType
```



---
## HTTPRequestRangeNotSatisfiable
```python
from web_exceptions import HTTPRequestRangeNotSatisfiable
```



---
## HTTPExpectationFailed
```python
from web_exceptions import HTTPExpectationFailed
```



---
## HTTPMisdirectedRequest
```python
from web_exceptions import HTTPMisdirectedRequest
```



---
## HTTPUnprocessableEntity
```python
from web_exceptions import HTTPUnprocessableEntity
```



---
## HTTPFailedDependency
```python
from web_exceptions import HTTPFailedDependency
```



---
## HTTPUpgradeRequired
```python
from web_exceptions import HTTPUpgradeRequired
```



---
## HTTPPreconditionRequired
```python
from web_exceptions import HTTPPreconditionRequired
```



---
## HTTPTooManyRequests
```python
from web_exceptions import HTTPTooManyRequests
```



---
## HTTPRequestHeaderFieldsTooLarge
```python
from web_exceptions import HTTPRequestHeaderFieldsTooLarge
```



---
## HTTPUnavailableForLegalReasons
```python
from web_exceptions import HTTPUnavailableForLegalReasons
```



---
## HTTPServerError
```python
from web_exceptions import HTTPServerError
```



---
## HTTPInternalServerError
```python
from web_exceptions import HTTPInternalServerError
```



---
## HTTPNotImplemented
```python
from web_exceptions import HTTPNotImplemented
```



---
## HTTPBadGateway
```python
from web_exceptions import HTTPBadGateway
```



---
## HTTPServiceUnavailable
```python
from web_exceptions import HTTPServiceUnavailable
```



---
## HTTPGatewayTimeout
```python
from web_exceptions import HTTPGatewayTimeout
```



---
## HTTPVersionNotSupported
```python
from web_exceptions import HTTPVersionNotSupported
```



---
## HTTPVariantAlsoNegotiates
```python
from web_exceptions import HTTPVariantAlsoNegotiates
```



---
## HTTPInsufficientStorage
```python
from web_exceptions import HTTPInsufficientStorage
```



---
## HTTPNotExtended
```python
from web_exceptions import HTTPNotExtended
```



---
## HTTPNetworkAuthenticationRequired
```python
from web_exceptions import HTTPNetworkAuthenticationRequired
```



---
## __init__
```python
from web_exceptions import __init__
```



---
## __bool__
```python
from web_exceptions import __bool__
```



---
## link
```python
from web_exceptions import link
```



---
## __name__
```python
from web_middlewares import __name__
```



---
## middleware
```python
from web_middlewares import middleware
```



---
## normalize_path_middleware
```python
from web_middlewares import normalize_path_middleware
```

Factory for producing a middleware that normalizes the path of a request.

Normalizing means:
    - Add or remove a trailing slash to the path.
    - Double slashes are replaced by one.

The middleware returns as soon as it finds a path that resolves
correctly. The order if both merge and append/remove are enabled is
    1) merge slashes
    2) append/remove slash
    3) both merge slashes and append/remove slash.
If the path resolves with at least one of those conditions, it will
redirect to the new path.

Only one of `append_slash` and `remove_slash` can be enabled. If both
are `True` the factory will raise an assertion error

If `append_slash` is `True` the middleware will append a slash when
needed. If a resource is defined with trailing slash and the request
comes without it, it will append it automatically.

If `remove_slash` is `True`, `append_slash` must be `False`. When enabled
the middleware will remove trailing slashes and redirect if the resource
is defined

If merge_slashes is True, merge multiple consecutive slashes in the
path into one.

---
## _fix_request_current_app
```python
from web_middlewares import _fix_request_current_app
```



---
## __name__
```python
from web import __name__
```

pygments.lexers.web
~~~~~~~~~~~~~~~~~~~

Just export previously exported lexers.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _cancel_tasks
```python
from web import _cancel_tasks
```



---
## run_app
```python
from web import run_app
```

Run an app locally

---
## main
```python
from web import main
```



---
## __name__
```python
from http_exceptions import __name__
```

Low-level http related exceptions.

---
## HttpProcessingError
```python
from http_exceptions import HttpProcessingError
```

HTTP error.

Shortcut for raising HTTP errors with custom code, message and headers.

code: HTTP Error code.
message: (optional) Error message.
headers: (optional) Headers to be sent in response, a list of pairs

---
## BadHttpMessage
```python
from http_exceptions import BadHttpMessage
```



---
## HttpBadRequest
```python
from http_exceptions import HttpBadRequest
```



---
## PayloadEncodingError
```python
from http_exceptions import PayloadEncodingError
```

Base class for payload errors

---
## ContentEncodingError
```python
from http_exceptions import ContentEncodingError
```

Content encoding error.

---
## TransferEncodingError
```python
from http_exceptions import TransferEncodingError
```

transfer encoding error.

---
## ContentLengthError
```python
from http_exceptions import ContentLengthError
```

Not enough data for satisfy content length header.

---
## LineTooLong
```python
from http_exceptions import LineTooLong
```



---
## InvalidHeader
```python
from http_exceptions import InvalidHeader
```



---
## BadStatusLine
```python
from http_exceptions import BadStatusLine
```



---
## InvalidURLError
```python
from http_exceptions import InvalidURLError
```



---
## __init__
```python
from http_exceptions import __init__
```



---
## __str__
```python
from http_exceptions import __str__
```



---
## __repr__
```python
from http_exceptions import __repr__
```



---
## __name__
```python
from web_app import __name__
```



---
## _build_middlewares
```python
from web_app import _build_middlewares
```

Apply middlewares to handler.

---
## Application
```python
from web_app import Application
```



---
## CleanupError
```python
from web_app import CleanupError
```



---
## CleanupContext
```python
from web_app import CleanupContext
```



---
## __init__
```python
from web_app import __init__
```



---
## __init_subclass__
```python
from web_app import __init_subclass__
```



---
## __eq__
```python
from web_app import __eq__
```



---
## __getitem__
```python
from web_app import __getitem__
```



---
## _check_frozen
```python
from web_app import _check_frozen
```



---
## __setitem__
```python
from web_app import __setitem__
```



---
## __delitem__
```python
from web_app import __delitem__
```



---
## __len__
```python
from web_app import __len__
```



---
## __iter__
```python
from web_app import __iter__
```



---
## __hash__
```python
from web_app import __hash__
```



---
## get
```python
from web_app import get
```



---
## loop
```python
from web_app import loop
```



---
## _set_loop
```python
from web_app import _set_loop
```



---
## pre_frozen
```python
from web_app import pre_frozen
```



---
## pre_freeze
```python
from web_app import pre_freeze
```



---
## frozen
```python
from web_app import frozen
```



---
## freeze
```python
from web_app import freeze
```



---
## debug
```python
from web_app import debug
```



---
## _reg_subapp_signals
```python
from web_app import _reg_subapp_signals
```



---
## add_subapp
```python
from web_app import add_subapp
```



---
## _add_subapp
```python
from web_app import _add_subapp
```



---
## add_domain
```python
from web_app import add_domain
```



---
## add_routes
```python
from web_app import add_routes
```



---
## on_response_prepare
```python
from web_app import on_response_prepare
```



---
## on_startup
```python
from web_app import on_startup
```



---
## on_shutdown
```python
from web_app import on_shutdown
```



---
## on_cleanup
```python
from web_app import on_cleanup
```



---
## cleanup_ctx
```python
from web_app import cleanup_ctx
```



---
## router
```python
from web_app import router
```



---
## middlewares
```python
from web_app import middlewares
```



---
## _make_handler
```python
from web_app import _make_handler
```



---
## make_handler
```python
from web_app import make_handler
```



---
## _make_request
```python
from web_app import _make_request
```



---
## _prepare_middleware
```python
from web_app import _prepare_middleware
```



---
## __call__
```python
from web_app import __call__
```

gunicorn compatibility

---
## __repr__
```python
from web_app import __repr__
```



---
## __bool__
```python
from web_app import __bool__
```



---
## exceptions
```python
from web_app import exceptions
```



---
## __setattr__
```python
from web_app import __setattr__
```



---
## reg_handler
```python
from web_app import reg_handler
```



---
## __name__
```python
from streams import __name__
```



---
## EofStream
```python
from streams import EofStream
```

eof stream indication.

---
## AsyncStreamIterator
```python
from streams import AsyncStreamIterator
```



---
## ChunkTupleAsyncStreamIterator
```python
from streams import ChunkTupleAsyncStreamIterator
```



---
## AsyncStreamReaderMixin
```python
from streams import AsyncStreamReaderMixin
```



---
## StreamReader
```python
from streams import StreamReader
```

Generator-based stream reader.

This class doesn't support concurrent calls to :meth:`read_line`,
:meth:`read_exact`, or :meth:`read_to_eof`. Make sure calls are
serialized.

---
## EmptyStreamReader
```python
from streams import EmptyStreamReader
```



---
## DataQueue
```python
from streams import DataQueue
```

DataQueue is a general-purpose blocking queue with one reader.

---
## FlowControlDataQueue
```python
from streams import FlowControlDataQueue
```

FlowControlDataQueue resumes and pauses an underlying stream.

It is a destination for parsed data.

---
## __init__
```python
from streams import __init__
```



---
## __aiter__
```python
from streams import __aiter__
```



---
## iter_chunked
```python
from streams import iter_chunked
```

Returns an asynchronous iterator that yields chunks of size n.

---
## iter_any
```python
from streams import iter_any
```

Yield all available data as soon as it is received.

---
## iter_chunks
```python
from streams import iter_chunks
```

Yield chunks of data as they are received by the server.

The yielded objects are tuples
of (bytes, bool) as returned by the StreamReader.readchunk method.

---
## __repr__
```python
from streams import __repr__
```



---
## get_read_buffer_limits
```python
from streams import get_read_buffer_limits
```



---
## exception
```python
from streams import exception
```



---
## set_exception
```python
from streams import set_exception
```



---
## on_eof
```python
from streams import on_eof
```



---
## feed_eof
```python
from streams import feed_eof
```

End the stream.

:meth:`feed_eof` cannot be called more than once.

Raises:
    EOFError: if the stream has ended.

---
## is_eof
```python
from streams import is_eof
```



---
## at_eof
```python
from streams import at_eof
```

Tell whether the stream has ended and all data was read.

This is a generator-based coroutine.

---
## unread_data
```python
from streams import unread_data
```

rollback reading some data from stream, inserting it to buffer head.

---
## feed_data
```python
from streams import feed_data
```

Write data to the stream.

:meth:`feed_data` cannot be called after :meth:`feed_eof`.

Args:
    data: data to write.

Raises:
    EOFError: if the stream has ended.

---
## begin_http_chunk_receiving
```python
from streams import begin_http_chunk_receiving
```



---
## end_http_chunk_receiving
```python
from streams import end_http_chunk_receiving
```



---
## read_nowait
```python
from streams import read_nowait
```



---
## _read_nowait_chunk
```python
from streams import _read_nowait_chunk
```



---
## _read_nowait
```python
from streams import _read_nowait
```

Read not more than n bytes, or whole buffer if n == -1

---
## __len__
```python
from streams import __len__
```



---
## __name__
```python
from web_protocol import __name__
```



---
## RequestPayloadError
```python
from web_protocol import RequestPayloadError
```

Payload parsing error.

---
## PayloadAccessError
```python
from web_protocol import PayloadAccessError
```

Payload was accessed after response was sent.

---
## _ErrInfo
```python
from web_protocol import _ErrInfo
```



---
## RequestHandler
```python
from web_protocol import RequestHandler
```

HTTP protocol implementation.

RequestHandler handles incoming HTTP request. It reads request line,
request headers and request payload and calls handle_request() method.
By default it always returns with 404 response.

RequestHandler handles errors in incoming request, like bad
status line, bad headers or incomplete payload. If any error occurs,
connection gets closed.

keepalive_timeout -- number of seconds before closing
                     keep-alive connection

tcp_keepalive -- TCP keep-alive is on, default is on

debug -- enable debug mode

logger -- custom logger object

access_log_class -- custom class for access_logger

access_log -- custom logging object

access_log_format -- access log format string

loop -- Optional event loop

max_line_size -- Optional maximum header line size

max_field_size -- Optional maximum header field size

max_headers -- Optional maximum header size

timeout_ceil_threshold -- Optional value to specify
                          threshold to ceil() timeout
                          values

---
## __init__
```python
from web_protocol import __init__
```



---
## __repr__
```python
from web_protocol import __repr__
```



---
## keepalive_timeout
```python
from web_protocol import keepalive_timeout
```



---
## connection_made
```python
from web_protocol import connection_made
```



---
## connection_lost
```python
from web_protocol import connection_lost
```



---
## set_parser
```python
from web_protocol import set_parser
```



---
## eof_received
```python
from web_protocol import eof_received
```



---
## data_received
```python
from web_protocol import data_received
```



---
## keep_alive
```python
from web_protocol import keep_alive
```

Set keep-alive connection mode.

:param bool val: new state.

---
## close
```python
from web_protocol import close
```

Close connection.

Stop accepting new pipelining messages and close
connection when handlers done processing messages.

---
## force_close
```python
from web_protocol import force_close
```

Forcefully close connection.

---
## log_access
```python
from web_protocol import log_access
```



---
## log_debug
```python
from web_protocol import log_debug
```



---
## log_exception
```python
from web_protocol import log_exception
```



---
## _process_keepalive
```python
from web_protocol import _process_keepalive
```



---
## handle_error
```python
from web_protocol import handle_error
```

Handle errors.

Returns HTTP response with specific status code. Logs additional
information. It always closes current connection.

---
## _make_error_handler
```python
from web_protocol import _make_error_handler
```



---
## __name__
```python
from log import __name__
```



---
## __name__
```python
from compression_utils import __name__
```



---
## encoding_to_mode
```python
from compression_utils import encoding_to_mode
```



---
## ZlibBaseHandler
```python
from compression_utils import ZlibBaseHandler
```



---
## ZLibCompressor
```python
from compression_utils import ZLibCompressor
```



---
## ZLibDecompressor
```python
from compression_utils import ZLibDecompressor
```



---
## BrotliDecompressor
```python
from compression_utils import BrotliDecompressor
```



---
## __init__
```python
from compression_utils import __init__
```



---
## compress_sync
```python
from compression_utils import compress_sync
```



---
## flush
```python
from compression_utils import flush
```



---
## decompress_sync
```python
from compression_utils import decompress_sync
```



---
## eof
```python
from compression_utils import eof
```



---
## unconsumed_tail
```python
from compression_utils import unconsumed_tail
```



---
## unused_data
```python
from compression_utils import unused_data
```



---
## __name__
```python
from client import __name__
```

An example Flight CLI client.

---
## _RequestOptions
```python
from client import _RequestOptions
```



---
## ClientTimeout
```python
from client import ClientTimeout
```



---
## ClientSession
```python
from client import ClientSession
```

First-class interface for making HTTP requests.

---
## _BaseRequestContextManager
```python
from client import _BaseRequestContextManager
```



---
## _SessionRequestContextManager
```python
from client import _SessionRequestContextManager
```



---
## request
```python
from client import request
```

Send a request to the daemon.

Return the JSON dict with the response.

Raise BadStatus if there is something wrong with the status file
or if the process whose pid is in the status file has died.

Return {'error': <message>} if an IPC operation or receive()
raised OSError.  This covers cases such as connection refused or
closed prematurely as well as invalid JSON received.

---
## __init__
```python
from client import __init__
```



---
## __init_subclass__
```python
from client import __init_subclass__
```



---
## __del__
```python
from client import __del__
```



---
## _build_url
```python
from client import _build_url
```



---
## ws_connect
```python
from client import ws_connect
```

Initiate websocket connection.

---
## _prepare_headers
```python
from client import _prepare_headers
```

Add default headers and transform it to CIMultiDict

---
## closed
```python
from client import closed
```

Is client session closed.

A readonly property.

---
## connector
```python
from client import connector
```

Connector instance used for the session.

---
## cookie_jar
```python
from client import cookie_jar
```

The session cookies.

---
## version
```python
from client import version
```

The session HTTP protocol version.

---
## requote_redirect_url
```python
from client import requote_redirect_url
```

Do URL requoting on redirection handling.

---
## loop
```python
from client import loop
```

Session's loop.

---
## timeout
```python
from client import timeout
```

Timeout for the session.

---
## headers
```python
from client import headers
```

The default headers of the client session.

---
## skip_auto_headers
```python
from client import skip_auto_headers
```

Headers for which autogeneration should be skipped

---
## auth
```python
from client import auth
```

An object that represents HTTP Basic Authorization

---
## json_serialize
```python
from client import json_serialize
```

Json serializer callable

---
## connector_owner
```python
from client import connector_owner
```

Should connector be closed on session closing

---
## raise_for_status
```python
from client import raise_for_status
```

Should `ClientResponse.raise_for_status()` be called for each response.

---
## auto_decompress
```python
from client import auto_decompress
```

Should the body response be automatically decompressed.

---
## trust_env
```python
from client import trust_env
```

Should proxies information from environment or netrc be trusted.

Information is from HTTP_PROXY / HTTPS_PROXY environment variables
or ~/.netrc file if present.

---
## trace_configs
```python
from client import trace_configs
```

A list of TraceConfig instances used for client tracing

---
## detach
```python
from client import detach
```

Detach connector from session without closing the former.

Session is switched to closed state anyway.

---
## __enter__
```python
from client import __enter__
```



---
## __exit__
```python
from client import __exit__
```



---
## send
```python
from client import send
```



---
## throw
```python
from client import throw
```



---
## close
```python
from client import close
```

Close the connection pool of the current inner client.

---
## __await__
```python
from client import __await__
```



---
## __iter__
```python
from client import __iter__
```



---
## __setattr__
```python
from client import __setattr__
```



---
## get
```python
from client import get
```

Perform HTTP GET request.

---
## options
```python
from client import options
```

Perform HTTP OPTIONS request.

---
## head
```python
from client import head
```

Perform HTTP HEAD request.

---
## post
```python
from client import post
```

Perform HTTP POST request.

---
## put
```python
from client import put
```

Perform HTTP PUT request.

---
## patch
```python
from client import patch
```

Perform HTTP PATCH request.

---
## delete
```python
from client import delete
```

Perform HTTP DELETE request.

---
## __name__
```python
from web_urldispatcher import __name__
```



---
## _InfoDict
```python
from web_urldispatcher import _InfoDict
```



---
## AbstractResource
```python
from web_urldispatcher import AbstractResource
```



---
## AbstractRoute
```python
from web_urldispatcher import AbstractRoute
```



---
## UrlMappingMatchInfo
```python
from web_urldispatcher import UrlMappingMatchInfo
```



---
## MatchInfoError
```python
from web_urldispatcher import MatchInfoError
```



---
## Resource
```python
from web_urldispatcher import Resource
```



---
## PlainResource
```python
from web_urldispatcher import PlainResource
```



---
## DynamicResource
```python
from web_urldispatcher import DynamicResource
```



---
## PrefixResource
```python
from web_urldispatcher import PrefixResource
```



---
## StaticResource
```python
from web_urldispatcher import StaticResource
```



---
## PrefixedSubAppResource
```python
from web_urldispatcher import PrefixedSubAppResource
```



---
## AbstractRuleMatching
```python
from web_urldispatcher import AbstractRuleMatching
```



---
## Domain
```python
from web_urldispatcher import Domain
```



---
## MaskDomain
```python
from web_urldispatcher import MaskDomain
```



---
## MatchedSubAppResource
```python
from web_urldispatcher import MatchedSubAppResource
```



---
## ResourceRoute
```python
from web_urldispatcher import ResourceRoute
```

A route with resource

---
## SystemRoute
```python
from web_urldispatcher import SystemRoute
```



---
## View
```python
from web_urldispatcher import View
```



---
## ResourcesView
```python
from web_urldispatcher import ResourcesView
```



---
## RoutesView
```python
from web_urldispatcher import RoutesView
```



---
## UrlDispatcher
```python
from web_urldispatcher import UrlDispatcher
```



---
## _quote_path
```python
from web_urldispatcher import _quote_path
```



---
## _unquote_path_safe
```python
from web_urldispatcher import _unquote_path_safe
```



---
## _requote_path
```python
from web_urldispatcher import _requote_path
```



---
## __init__
```python
from web_urldispatcher import __init__
```



---
## name
```python
from web_urldispatcher import name
```



---
## canonical
```python
from web_urldispatcher import canonical
```



---
## url_for
```python
from web_urldispatcher import url_for
```



---
## add_prefix
```python
from web_urldispatcher import add_prefix
```



---
## get_info
```python
from web_urldispatcher import get_info
```



---
## freeze
```python
from web_urldispatcher import freeze
```



---
## raw_match
```python
from web_urldispatcher import raw_match
```



---
## method
```python
from web_urldispatcher import method
```



---
## handler
```python
from web_urldispatcher import handler
```



---
## resource
```python
from web_urldispatcher import resource
```



---
## route
```python
from web_urldispatcher import route
```



---
## expect_handler
```python
from web_urldispatcher import expect_handler
```



---
## http_exception
```python
from web_urldispatcher import http_exception
```



---
## apps
```python
from web_urldispatcher import apps
```



---
## add_app
```python
from web_urldispatcher import add_app
```



---
## current_app
```python
from web_urldispatcher import current_app
```



---
## __repr__
```python
from web_urldispatcher import __repr__
```



---
## add_route
```python
from web_urldispatcher import add_route
```



---
## register_route
```python
from web_urldispatcher import register_route
```



---
## _match
```python
from web_urldispatcher import _match
```



---
## __len__
```python
from web_urldispatcher import __len__
```



---
## __iter__
```python
from web_urldispatcher import __iter__
```



---
## _get_file_hash
```python
from web_urldispatcher import _get_file_hash
```



---
## set_options_route
```python
from web_urldispatcher import set_options_route
```



---
## _resolve_path_to_response
```python
from web_urldispatcher import _resolve_path_to_response
```

Take the unresolved path and query the file system to form a response.

---
## _directory_as_html
```python
from web_urldispatcher import _directory_as_html
```

returns directory's index as html.

---
## _add_prefix_to_resources
```python
from web_urldispatcher import _add_prefix_to_resources
```



---
## validation
```python
from web_urldispatcher import validation
```



---
## match_domain
```python
from web_urldispatcher import match_domain
```



---
## status
```python
from web_urldispatcher import status
```



---
## reason
```python
from web_urldispatcher import reason
```



---
## __await__
```python
from web_urldispatcher import __await__
```



---
## _raise_allowed_methods
```python
from web_urldispatcher import _raise_allowed_methods
```



---
## __contains__
```python
from web_urldispatcher import __contains__
```



---
## __getitem__
```python
from web_urldispatcher import __getitem__
```



---
## resources
```python
from web_urldispatcher import resources
```



---
## routes
```python
from web_urldispatcher import routes
```



---
## named_resources
```python
from web_urldispatcher import named_resources
```



---
## register_resource
```python
from web_urldispatcher import register_resource
```



---
## _get_resource_index_key
```python
from web_urldispatcher import _get_resource_index_key
```

Return a key to index the resource in the resource index.

---
## index_resource
```python
from web_urldispatcher import index_resource
```

Add a resource to the resource index.

---
## unindex_resource
```python
from web_urldispatcher import unindex_resource
```

Remove a resource from the resource index.

---
## add_resource
```python
from web_urldispatcher import add_resource
```



---
## add_static
```python
from web_urldispatcher import add_static
```

Add static files view.

prefix - url prefix
path - folder with files

---
## add_head
```python
from web_urldispatcher import add_head
```

Shortcut for add_route with method HEAD.

---
## add_options
```python
from web_urldispatcher import add_options
```

Shortcut for add_route with method OPTIONS.

---
## add_get
```python
from web_urldispatcher import add_get
```

Shortcut for add_route with method GET.

If allow_head is true, another
route is added allowing head requests to the same endpoint.

---
## add_post
```python
from web_urldispatcher import add_post
```

Shortcut for add_route with method POST.

---
## add_put
```python
from web_urldispatcher import add_put
```

Shortcut for add_route with method PUT.

---
## add_patch
```python
from web_urldispatcher import add_patch
```

Shortcut for add_route with method PATCH.

---
## add_delete
```python
from web_urldispatcher import add_delete
```

Shortcut for add_route with method DELETE.

---
## add_view
```python
from web_urldispatcher import add_view
```

Shortcut for add_route with ANY methods for a class-based view.

---
## add_routes
```python
from web_urldispatcher import add_routes
```

Append routes to route table.

Parameter should be a sequence of RouteDef objects.

Returns a list of registered AbstractRoute instances.

---
## __name__
```python
from web_request import __name__
```



---
## FileField
```python
from web_request import FileField
```



---
## BaseRequest
```python
from web_request import BaseRequest
```



---
## Request
```python
from web_request import Request
```



---
## __init__
```python
from web_request import __init__
```



---
## clone
```python
from web_request import clone
```



---
## task
```python
from web_request import task
```



---
## protocol
```python
from web_request import protocol
```



---
## transport
```python
from web_request import transport
```



---
## writer
```python
from web_request import writer
```



---
## client_max_size
```python
from web_request import client_max_size
```



---
## message
```python
from web_request import message
```



---
## rel_url
```python
from web_request import rel_url
```



---
## loop
```python
from web_request import loop
```



---
## __getitem__
```python
from web_request import __getitem__
```



---
## __setitem__
```python
from web_request import __setitem__
```



---
## __delitem__
```python
from web_request import __delitem__
```



---
## __len__
```python
from web_request import __len__
```



---
## __iter__
```python
from web_request import __iter__
```



---
## secure
```python
from web_request import secure
```

A bool indicating if the request is handled with SSL.

---
## forwarded
```python
from web_request import forwarded
```

A tuple containing all parsed Forwarded header(s).

Makes an effort to parse Forwarded headers as specified by RFC 7239:

- It adds one (immutable) dictionary per Forwarded 'field-value', ie
  per proxy. The element corresponds to the data in the Forwarded
  field-value added by the first proxy encountered by the client. Each
  subsequent item corresponds to those added by later proxies.
- It checks that every value has valid syntax in general as specified
  in section 4: either a 'token' or a 'quoted-string'.
- It un-escapes found escape sequences.
- It does NOT validate 'by' and 'for' contents as specified in section
  6.
- It does NOT validate 'host' contents (Host ABNF).
- It does NOT validate 'proto' contents for valid URI scheme names.

Returns a tuple containing one or more immutable dicts

---
## scheme
```python
from web_request import scheme
```

A string representing the scheme of the request.

Hostname is resolved in this order:

- overridden value by .clone(scheme=new_scheme) call.
- type of connection to peer: HTTPS if socket is SSL, HTTP otherwise.

'http' or 'https'.

---
## method
```python
from web_request import method
```

Read only property for getting HTTP method.

The value is upper-cased str like 'GET', 'POST', 'PUT' etc.

---
## version
```python
from web_request import version
```

Read only property for getting HTTP version of request.

Returns aiohttp.protocol.HttpVersion instance.

---
## host
```python
from web_request import host
```

Hostname of the request.

Hostname is resolved in this order:

- overridden value by .clone(host=new_host) call.
- HOST HTTP header
- socket.getfqdn() value

For example, 'example.com' or 'localhost:8080'.

For historical reasons, the port number may be included.

---
## remote
```python
from web_request import remote
```

Remote IP of client initiated HTTP request.

The IP is resolved in this order:

- overridden value by .clone(remote=new_remote) call.
- peername of opened socket

---
## url
```python
from web_request import url
```

The full URL of the request.

---
## path
```python
from web_request import path
```

The URL including *PATH INFO* without the host or scheme.

E.g., ``/app/blog``

---
## path_qs
```python
from web_request import path_qs
```

The URL including PATH_INFO and the query string.

E.g, /app/blog?id=10

---
## raw_path
```python
from web_request import raw_path
```

The URL including raw *PATH INFO* without the host or scheme.

Warning, the path is unquoted and may contains non valid URL characters

E.g., ``/my%2Fpath%7Cwith%21some%25strange%24characters``

---
## query
```python
from web_request import query
```

A multidict with all the variables in the query string.

---
## query_string
```python
from web_request import query_string
```

The query string in the URL.

E.g., id=10

---
## headers
```python
from web_request import headers
```

A case-insensitive multidict proxy with all headers.

---
## raw_headers
```python
from web_request import raw_headers
```

A sequence of pairs for all headers.

---
## if_modified_since
```python
from web_request import if_modified_since
```

The value of If-Modified-Since HTTP header, or None.

This header is represented as a `datetime` object.

---
## if_unmodified_since
```python
from web_request import if_unmodified_since
```

The value of If-Unmodified-Since HTTP header, or None.

This header is represented as a `datetime` object.

---
## _etag_values
```python
from web_request import _etag_values
```

Extract `ETag` objects from raw header.

---
## _if_match_or_none_impl
```python
from web_request import _if_match_or_none_impl
```



---
## if_match
```python
from web_request import if_match
```

The value of If-Match HTTP header, or None.

This header is represented as a `tuple` of `ETag` objects.

---
## if_none_match
```python
from web_request import if_none_match
```

The value of If-None-Match HTTP header, or None.

This header is represented as a `tuple` of `ETag` objects.

---
## if_range
```python
from web_request import if_range
```

The value of If-Range HTTP header, or None.

This header is represented as a `datetime` object.

---
## keep_alive
```python
from web_request import keep_alive
```

Is keepalive enabled by client?

---
## cookies
```python
from web_request import cookies
```

Return request cookies.

A read-only dictionary-like object.

---
## http_range
```python
from web_request import http_range
```

The content of Range HTTP header.

Return a slice instance.

---
## content
```python
from web_request import content
```

Return raw payload stream.

---
## has_body
```python
from web_request import has_body
```

Return True if request's HTTP BODY can be read, False otherwise.

---
## can_read_body
```python
from web_request import can_read_body
```

Return True if request's HTTP BODY can be read, False otherwise.

---
## body_exists
```python
from web_request import body_exists
```

Return True if request has HTTP BODY, False otherwise.

---
## get_extra_info
```python
from web_request import get_extra_info
```

Extra info from protocol transport

---
## __repr__
```python
from web_request import __repr__
```



---
## __eq__
```python
from web_request import __eq__
```



---
## __bool__
```python
from web_request import __bool__
```



---
## _cancel
```python
from web_request import _cancel
```



---
## _finish
```python
from web_request import _finish
```



---
## match_info
```python
from web_request import match_info
```

Result of route resolving.

---
## app
```python
from web_request import app
```

Application instance.

---
## config_dict
```python
from web_request import config_dict
```



---
## __setattr__
```python
from web_request import __setattr__
```



---
## __name__
```python
from http_websocket import __name__
```

WebSocket protocol versions 13 and 8.

---
## WSCloseCode
```python
from http_websocket import WSCloseCode
```



---
## WSMsgType
```python
from http_websocket import WSMsgType
```



---
## WSMessage
```python
from http_websocket import WSMessage
```



---
## WebSocketError
```python
from http_websocket import WebSocketError
```

WebSocket protocol parser error.

---
## WSHandshakeError
```python
from http_websocket import WSHandshakeError
```

WebSocket protocol handshake error.

---
## _xor_table
```python
from http_websocket import _xor_table
```



---
## _websocket_mask_python
```python
from http_websocket import _websocket_mask_python
```

Websocket masking function.

`mask` is a `bytes` object of length 4; `data` is a `bytearray`
object of any length. The contents of `data` are masked with `mask`,
as specified in section 5.3 of RFC 6455.

Note that this function mutates the `data` argument.

This pure-python implementation may be replaced by an optimized
version when available.

---
## ws_ext_parse
```python
from http_websocket import ws_ext_parse
```



---
## ws_ext_gen
```python
from http_websocket import ws_ext_gen
```



---
## WSParserState
```python
from http_websocket import WSParserState
```



---
## WebSocketReader
```python
from http_websocket import WebSocketReader
```



---
## WebSocketWriter
```python
from http_websocket import WebSocketWriter
```



---
## json
```python
from http_websocket import json
```

Return parsed JSON data.

.. versionadded:: 0.22

---
## __init__
```python
from http_websocket import __init__
```



---
## __str__
```python
from http_websocket import __str__
```



---
## feed_eof
```python
from http_websocket import feed_eof
```



---
## feed_data
```python
from http_websocket import feed_data
```



---
## _feed_data
```python
from http_websocket import _feed_data
```



---
## parse_frame
```python
from http_websocket import parse_frame
```

Return the next frame from the socket.

---
## _make_compress_obj
```python
from http_websocket import _make_compress_obj
```



---
## _write
```python
from http_websocket import _write
```



---
## __name__
```python
from client_proto import __name__
```



---
## ResponseHandler
```python
from client_proto import ResponseHandler
```

Helper class to adapt between Protocol and StreamReader.

---
## __init__
```python
from client_proto import __init__
```



---
## upgraded
```python
from client_proto import upgraded
```



---
## should_close
```python
from client_proto import should_close
```



---
## force_close
```python
from client_proto import force_close
```



---
## close
```python
from client_proto import close
```



---
## is_connected
```python
from client_proto import is_connected
```



---
## connection_lost
```python
from client_proto import connection_lost
```



---
## eof_received
```python
from client_proto import eof_received
```



---
## pause_reading
```python
from client_proto import pause_reading
```



---
## resume_reading
```python
from client_proto import resume_reading
```



---
## set_exception
```python
from client_proto import set_exception
```



---
## set_parser
```python
from client_proto import set_parser
```



---
## set_response_params
```python
from client_proto import set_response_params
```



---
## _drop_timeout
```python
from client_proto import _drop_timeout
```



---
## _reschedule_timeout
```python
from client_proto import _reschedule_timeout
```



---
## start_timeout
```python
from client_proto import start_timeout
```



---
## read_timeout
```python
from client_proto import read_timeout
```



---
## _on_read_timeout
```python
from client_proto import _on_read_timeout
```



---
## data_received
```python
from client_proto import data_received
```



---
## __name__
```python
from locks import __name__
```



---
## EventResultOrError
```python
from locks import EventResultOrError
```

Event asyncio lock helper class.

Wraps the Event asyncio lock allowing either to awake the
locked Tasks without any error or raising an exception.

thanks to @vorpalsmith for the simple design.

---
## __init__
```python
from locks import __init__
```



---
## set
```python
from locks import set
```



---
## cancel
```python
from locks import cancel
```

Cancel all waiters

---
## __dir__
```python
from __init__ import __dir__
```



---
## __getattr__
```python
from __init__ import __getattr__
```



---
## __name__
```python
from web_runner import __name__
```



---
## GracefulExit
```python
from web_runner import GracefulExit
```



---
## _raise_graceful_exit
```python
from web_runner import _raise_graceful_exit
```



---
## BaseSite
```python
from web_runner import BaseSite
```



---
## TCPSite
```python
from web_runner import TCPSite
```



---
## UnixSite
```python
from web_runner import UnixSite
```



---
## NamedPipeSite
```python
from web_runner import NamedPipeSite
```



---
## SockSite
```python
from web_runner import SockSite
```



---
## BaseRunner
```python
from web_runner import BaseRunner
```



---
## ServerRunner
```python
from web_runner import ServerRunner
```

Low-level web server runner

---
## AppRunner
```python
from web_runner import AppRunner
```

Web Application runner

---
## __init__
```python
from web_runner import __init__
```



---
## name
```python
from web_runner import name
```



---
## server
```python
from web_runner import server
```



---
## addresses
```python
from web_runner import addresses
```



---
## sites
```python
from web_runner import sites
```



---
## _reg_site
```python
from web_runner import _reg_site
```



---
## _check_site
```python
from web_runner import _check_site
```



---
## _unreg_site
```python
from web_runner import _unreg_site
```



---
## app
```python
from web_runner import app
```



---
## __name__
```python
from web_server import __name__
```

Low level HTTP server.

---
## Server
```python
from web_server import Server
```



---
## __init__
```python
from web_server import __init__
```



---
## connections
```python
from web_server import connections
```



---
## connection_made
```python
from web_server import connection_made
```



---
## connection_lost
```python
from web_server import connection_lost
```



---
## _make_request
```python
from web_server import _make_request
```



---
## pre_shutdown
```python
from web_server import pre_shutdown
```



---
## __call__
```python
from web_server import __call__
```



---
## __name__
```python
from base_protocol import __name__
```



---
## BaseProtocol
```python
from base_protocol import BaseProtocol
```



---
## __init__
```python
from base_protocol import __init__
```



---
## connected
```python
from base_protocol import connected
```

Return True if the connection is open.

---
## pause_writing
```python
from base_protocol import pause_writing
```



---
## resume_writing
```python
from base_protocol import resume_writing
```



---
## pause_reading
```python
from base_protocol import pause_reading
```



---
## resume_reading
```python
from base_protocol import resume_reading
```



---
## connection_made
```python
from base_protocol import connection_made
```



---
## connection_lost
```python
from base_protocol import connection_lost
```



---
## __name__
```python
from payload import __name__
```



---
## LookupError
```python
from payload import LookupError
```



---
## Order
```python
from payload import Order
```



---
## get_payload
```python
from payload import get_payload
```



---
## register_payload
```python
from payload import register_payload
```



---
## payload_type
```python
from payload import payload_type
```



---
## PayloadRegistry
```python
from payload import PayloadRegistry
```

Payload registry.

note: we need zope.interface for more efficient adapter search

---
## Payload
```python
from payload import Payload
```



---
## BytesPayload
```python
from payload import BytesPayload
```



---
## StringPayload
```python
from payload import StringPayload
```



---
## StringIOPayload
```python
from payload import StringIOPayload
```



---
## IOBasePayload
```python
from payload import IOBasePayload
```



---
## TextIOPayload
```python
from payload import TextIOPayload
```



---
## BytesIOPayload
```python
from payload import BytesIOPayload
```



---
## BufferedReaderPayload
```python
from payload import BufferedReaderPayload
```



---
## JsonPayload
```python
from payload import JsonPayload
```



---
## AsyncIterablePayload
```python
from payload import AsyncIterablePayload
```



---
## StreamReaderPayload
```python
from payload import StreamReaderPayload
```



---
## __init__
```python
from payload import __init__
```



---
## __call__
```python
from payload import __call__
```



---
## get
```python
from payload import get
```



---
## register
```python
from payload import register
```



---
## size
```python
from payload import size
```



---
## filename
```python
from payload import filename
```

Filename of the payload.

---
## headers
```python
from payload import headers
```

Custom item headers

---
## _binary_headers
```python
from payload import _binary_headers
```



---
## encoding
```python
from payload import encoding
```

Payload encoding

---
## content_type
```python
from payload import content_type
```

Content type

---
## set_content_disposition
```python
from payload import set_content_disposition
```

Sets ``Content-Disposition`` header.

---
## decode
```python
from payload import decode
```



---
## __name__
```python
from client_reqrep import __name__
```



---
## _gen_default_accept_encoding
```python
from client_reqrep import _gen_default_accept_encoding
```



---
## ContentDisposition
```python
from client_reqrep import ContentDisposition
```



---
## RequestInfo
```python
from client_reqrep import RequestInfo
```



---
## Fingerprint
```python
from client_reqrep import Fingerprint
```



---
## _merge_ssl_params
```python
from client_reqrep import _merge_ssl_params
```



---
## ConnectionKey
```python
from client_reqrep import ConnectionKey
```



---
## _is_expected_content_type
```python
from client_reqrep import _is_expected_content_type
```



---
## ClientRequest
```python
from client_reqrep import ClientRequest
```



---
## ClientResponse
```python
from client_reqrep import ClientResponse
```



---
## real_url_default
```python
from client_reqrep import real_url_default
```



---
## __init__
```python
from client_reqrep import __init__
```



---
## fingerprint
```python
from client_reqrep import fingerprint
```



---
## check
```python
from client_reqrep import check
```



---
## __reset_writer
```python
from client_reqrep import __reset_writer
```



---
## _writer
```python
from client_reqrep import _writer
```

Set the writer task for streaming data.

---
## is_ssl
```python
from client_reqrep import is_ssl
```



---
## ssl
```python
from client_reqrep import ssl
```



---
## connection_key
```python
from client_reqrep import connection_key
```



---
## host
```python
from client_reqrep import host
```



---
## port
```python
from client_reqrep import port
```



---
## request_info
```python
from client_reqrep import request_info
```



---
## update_host
```python
from client_reqrep import update_host
```

Update destination host, port and connection type (ssl).

---
## update_version
```python
from client_reqrep import update_version
```

Convert request version to two elements tuple.

parser HTTP version '1.1' => (1, 1)

---
## update_headers
```python
from client_reqrep import update_headers
```

Update request headers.

---
## update_auto_headers
```python
from client_reqrep import update_auto_headers
```



---
## update_cookies
```python
from client_reqrep import update_cookies
```

Update request cookies header.

---
## update_content_encoding
```python
from client_reqrep import update_content_encoding
```

Set request content encoding.

---
## update_transfer_encoding
```python
from client_reqrep import update_transfer_encoding
```

Analyze transfer-encoding header.

---
## update_auth
```python
from client_reqrep import update_auth
```

Set basic auth.

---
## update_body_from_data
```python
from client_reqrep import update_body_from_data
```



---
## update_expect_continue
```python
from client_reqrep import update_expect_continue
```



---
## update_proxy
```python
from client_reqrep import update_proxy
```



---
## keep_alive
```python
from client_reqrep import keep_alive
```



---
## terminate
```python
from client_reqrep import terminate
```



---
## url
```python
from client_reqrep import url
```



---
## url_obj
```python
from client_reqrep import url_obj
```



---
## real_url
```python
from client_reqrep import real_url
```



---
## headers
```python
from client_reqrep import headers
```



---
## raw_headers
```python
from client_reqrep import raw_headers
```



---
## content_disposition
```python
from client_reqrep import content_disposition
```



---
## __del__
```python
from client_reqrep import __del__
```



---
## __repr__
```python
from client_reqrep import __repr__
```



---
## connection
```python
from client_reqrep import connection
```



---
## history
```python
from client_reqrep import history
```

A sequence of of responses, if redirects occurred.

---
## links
```python
from client_reqrep import links
```



---
## _response_eof
```python
from client_reqrep import _response_eof
```



---
## closed
```python
from client_reqrep import closed
```



---
## close
```python
from client_reqrep import close
```



---
## release
```python
from client_reqrep import release
```



---
## ok
```python
from client_reqrep import ok
```

Returns ``True`` if ``status`` is less than ``400``, ``False`` if not.

This is **not** a check for ``200 OK`` but a check that the response
status is under 400.

---
## raise_for_status
```python
from client_reqrep import raise_for_status
```



---
## _release_connection
```python
from client_reqrep import _release_connection
```



---
## _cleanup_writer
```python
from client_reqrep import _cleanup_writer
```



---
## _notify_content
```python
from client_reqrep import _notify_content
```



---
## get_encoding
```python
from client_reqrep import get_encoding
```



---
## __name__
```python
from http import __name__
```



---
## __name__
```python
from web_log import __name__
```



---
## AccessLogger
```python
from web_log import AccessLogger
```

Helper object to log access.

Usage:
    log = logging.getLogger("spam")
    log_format = "%a %{User-Agent}i"
    access_logger = AccessLogger(log, log_format)
    access_logger.log(request, response, time)

Format:
    %%  The percent sign
    %a  Remote IP-address (IP-address of proxy if using reverse proxy)
    %t  Time when the request was started to process
    %P  The process ID of the child that serviced the request
    %r  First line of request
    %s  Response status code
    %b  Size of response in bytes, including HTTP headers
    %T  Time taken to serve the request, in seconds
    %Tf Time taken to serve the request, in seconds with floating fraction
        in .06f format
    %D  Time taken to serve the request, in microseconds
    %{FOO}i  request.headers['FOO']
    %{FOO}o  response.headers['FOO']
    %{FOO}e  os.environ['FOO']

---
## __init__
```python
from web_log import __init__
```

Initialise the logger.

logger is a logger object to be used for logging.
log_format is a string with apache compatible log format description.

---
## compile_format
```python
from web_log import compile_format
```

Translate log_format into form usable by modulo formatting

All known atoms will be replaced with %s
Also methods for formatting of those atoms will be added to
_methods in appropriate order

For example we have log_format = "%a %t"
This format will be translated to "%s %s"
Also contents of _methods will be
[self._format_a, self._format_t]
These method will be called and results will be passed
to translated string format.

Each _format_* method receive 'args' which is list of arguments
given to self.log

Exceptions are _format_e, _format_i and _format_o methods which
also receive key name (by functools.partial)

---
## _format_i
```python
from web_log import _format_i
```



---
## _format_o
```python
from web_log import _format_o
```



---
## _format_a
```python
from web_log import _format_a
```



---
## _format_t
```python
from web_log import _format_t
```



---
## _format_P
```python
from web_log import _format_P
```



---
## _format_r
```python
from web_log import _format_r
```



---
## _format_s
```python
from web_log import _format_s
```



---
## _format_b
```python
from web_log import _format_b
```



---
## _format_T
```python
from web_log import _format_T
```



---
## _format_Tf
```python
from web_log import _format_Tf
```



---
## _format_D
```python
from web_log import _format_D
```



---
## _format_line
```python
from web_log import _format_line
```



---
## log
```python
from web_log import log
```



---
## __name__
```python
from resolver import __name__
```



---
## ThreadedResolver
```python
from resolver import ThreadedResolver
```

Threaded resolver.

Uses an Executor for synchronous getaddrinfo() calls.
concurrent.futures.ThreadPoolExecutor is used by default.

---
## AsyncResolver
```python
from resolver import AsyncResolver
```

Use the `aiodns` package to make asynchronous DNS lookups

---
## __init__
```python
from resolver import __init__
```



---
## __name__
```python
from formdata import __name__
```

Implementation of nested form-data encoding function(s).

---
## FormData
```python
from formdata import FormData
```

Helper class for form body generation.

Supports multipart/form-data and application/x-www-form-urlencoded.

---
## __init__
```python
from formdata import __init__
```



---
## is_multipart
```python
from formdata import is_multipart
```



---
## add_field
```python
from formdata import add_field
```



---
## add_fields
```python
from formdata import add_fields
```



---
## _gen_form_urlencoded
```python
from formdata import _gen_form_urlencoded
```



---
## _gen_form_data
```python
from formdata import _gen_form_data
```

Encode a list of fields using the multipart/form-data MIME format

---
## __call__
```python
from formdata import __call__
```



---
## __name__
```python
from payload_streamer import __name__
```

Payload implementation for coroutines as data provider.

As a simple case, you can upload data from file::

   @aiohttp.streamer
   async def file_sender(writer, file_name=None):
      with open(file_name, 'rb') as f:
          chunk = f.read(2**16)
          while chunk:
              await writer.write(chunk)

              chunk = f.read(2**16)

Then you can use `file_sender` like this:

    async with session.post('http://httpbin.org/post',
                            data=file_sender(file_name='huge_file')) as resp:
        print(await resp.text())

..note:: Coroutine must accept `writer` as first argument

---
## _stream_wrapper
```python
from payload_streamer import _stream_wrapper
```



---
## streamer
```python
from payload_streamer import streamer
```



---
## StreamWrapperPayload
```python
from payload_streamer import StreamWrapperPayload
```



---
## StreamPayload
```python
from payload_streamer import StreamPayload
```



---
## __init__
```python
from payload_streamer import __init__
```



---
## __call__
```python
from payload_streamer import __call__
```



---
## decode
```python
from payload_streamer import decode
```



---
## __name__
```python
from web_routedef import __name__
```



---
## AbstractRouteDef
```python
from web_routedef import AbstractRouteDef
```



---
## RouteDef
```python
from web_routedef import RouteDef
```



---
## StaticDef
```python
from web_routedef import StaticDef
```



---
## route
```python
from web_routedef import route
```



---
## head
```python
from web_routedef import head
```



---
## options
```python
from web_routedef import options
```



---
## get
```python
from web_routedef import get
```



---
## post
```python
from web_routedef import post
```



---
## put
```python
from web_routedef import put
```



---
## patch
```python
from web_routedef import patch
```



---
## delete
```python
from web_routedef import delete
```



---
## view
```python
from web_routedef import view
```



---
## static
```python
from web_routedef import static
```



---
## RouteTableDef
```python
from web_routedef import RouteTableDef
```

Route definition table

---
## register
```python
from web_routedef import register
```



---
## __repr__
```python
from web_routedef import __repr__
```



---
## __init__
```python
from web_routedef import __init__
```



---
## __getitem__
```python
from web_routedef import __getitem__
```



---
## __iter__
```python
from web_routedef import __iter__
```



---
## __len__
```python
from web_routedef import __len__
```



---
## __contains__
```python
from web_routedef import __contains__
```



---
## inner
```python
from web_routedef import inner
```



---
## __name__
```python
from connector import __name__
```



---
## _DeprecationWaiter
```python
from connector import _DeprecationWaiter
```



---
## Connection
```python
from connector import Connection
```



---
## _TransportPlaceholder
```python
from connector import _TransportPlaceholder
```

placeholder for BaseConnector.connect function

---
## BaseConnector
```python
from connector import BaseConnector
```

Base connector class.

keepalive_timeout - (optional) Keep-alive timeout.
force_close - Set to True to force close and do reconnect
    after each request (and between redirects).
limit - The total number of simultaneous connections.
limit_per_host - Number of simultaneous connections to one host.
enable_cleanup_closed - Enables clean-up closed ssl transports.
                        Disabled by default.
timeout_ceil_threshold - Trigger ceiling of timeout values when
                         it's above timeout_ceil_threshold.
loop - Optional event loop.

---
## _DNSCacheTable
```python
from connector import _DNSCacheTable
```



---
## _make_ssl_context
```python
from connector import _make_ssl_context
```

Create SSL context.

This method is not async-friendly and should be called from a thread
because it will load certificates from disk and do other blocking I/O.

---
## TCPConnector
```python
from connector import TCPConnector
```

TCP connector.

verify_ssl - Set to True to check ssl certifications.
fingerprint - Pass the binary sha256
    digest of the expected certificate in DER format to verify
    that the certificate the server presents matches. See also
    https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning
resolver - Enable DNS lookups and use this
    resolver
use_dns_cache - Use memory cache for DNS lookups.
ttl_dns_cache - Max seconds having cached a DNS entry, None forever.
family - socket address family
local_addr - local tuple of (host, port) to bind socket to

keepalive_timeout - (optional) Keep-alive timeout.
force_close - Set to True to force close and do reconnect
    after each request (and between redirects).
limit - The total number of simultaneous connections.
limit_per_host - Number of simultaneous connections to one host.
enable_cleanup_closed - Enables clean-up closed ssl transports.
                        Disabled by default.
happy_eyeballs_delay - This is the “Connection Attempt Delay”
                       as defined in RFC 8305. To disable
                       the happy eyeballs algorithm, set to None.
interleave - “First Address Family Count” as defined in RFC 8305
loop - Optional event loop.

---
## UnixConnector
```python
from connector import UnixConnector
```

Unix socket connector.

path - Unix socket path.
keepalive_timeout - (optional) Keep-alive timeout.
force_close - Set to True to force close and do reconnect
    after each request (and between redirects).
limit - The total number of simultaneous connections.
limit_per_host - Number of simultaneous connections to one host.
loop - Optional event loop.

---
## NamedPipeConnector
```python
from connector import NamedPipeConnector
```

Named pipe connector.

Only supported by the proactor event loop.
See also: https://docs.python.org/3/library/asyncio-eventloop.html

path - Windows named pipe path.
keepalive_timeout - (optional) Keep-alive timeout.
force_close - Set to True to force close and do reconnect
    after each request (and between redirects).
limit - The total number of simultaneous connections.
limit_per_host - Number of simultaneous connections to one host.
loop - Optional event loop.

---
## __init__
```python
from connector import __init__
```



---
## __await__
```python
from connector import __await__
```



---
## __del__
```python
from connector import __del__
```



---
## __repr__
```python
from connector import __repr__
```



---
## __bool__
```python
from connector import __bool__
```

Force subclasses to not be falsy, to make checks simpler.

---
## loop
```python
from connector import loop
```



---
## transport
```python
from connector import transport
```



---
## protocol
```python
from connector import protocol
```



---
## add_callback
```python
from connector import add_callback
```



---
## _notify_release
```python
from connector import _notify_release
```



---
## close
```python
from connector import close
```

Close all ongoing DNS calls.

---
## release
```python
from connector import release
```



---
## closed
```python
from connector import closed
```

Is connector closed.

A readonly property.

---
## __enter__
```python
from connector import __enter__
```



---
## __exit__
```python
from connector import __exit__
```



---
## force_close
```python
from connector import force_close
```

Ultimately close connection on releasing if True.

---
## limit
```python
from connector import limit
```

The total number for simultaneous connections.

If limit is 0 the connector has no limit.
The default limit size is 100.

---
## limit_per_host
```python
from connector import limit_per_host
```

The limit for simultaneous connections to the same endpoint.

Endpoints are the same if they are have equal
(host, port, is_ssl) triple.

---
## _cleanup
```python
from connector import _cleanup
```

Cleanup unused transports.

---
## _drop_acquired_per_host
```python
from connector import _drop_acquired_per_host
```



---
## _cleanup_closed
```python
from connector import _cleanup_closed
```

Double confirmation for transport close.

Some broken ssl servers may leave socket open without proper close.

---
## _close
```python
from connector import _close
```



---
## _available_connections
```python
from connector import _available_connections
```

Return number of available connections.

The limit, limit_per_host and the connection key are taken into account.

If it returns less than 1 means that there are no connections
available.

---
## _get
```python
from connector import _get
```



---
## _release_waiter
```python
from connector import _release_waiter
```

Iterates over all waiters until one to be released is found.

The one to be released is not finished and
belongs to a host that has available connections.

---
## _release_acquired
```python
from connector import _release_acquired
```



---
## _release
```python
from connector import _release
```



---
## __contains__
```python
from connector import __contains__
```



---
## add
```python
from connector import add
```



---
## remove
```python
from connector import remove
```



---
## clear
```python
from connector import clear
```



---
## next_addrs
```python
from connector import next_addrs
```



---
## expired
```python
from connector import expired
```



---
## family
```python
from connector import family
```

Socket family like AF_INET.

---
## use_dns_cache
```python
from connector import use_dns_cache
```

True if local DNS caching is enabled.

---
## clear_dns_cache
```python
from connector import clear_dns_cache
```

Remove specified host/port or clear all dns local cache.

---
## _get_ssl_context
```python
from connector import _get_ssl_context
```

Logic to get the correct SSL context

0. if req.ssl is false, return None

1. if ssl_context is specified in req, use it
2. if _ssl_context is specified in self, use it
3. otherwise:
    1. if verify_ssl is not specified in req, use self.ssl_context
       (will generate a default context according to self.verify_ssl)
    2. if verify_ssl is True in req, generate a default SSL context
    3. if verify_ssl is False in req, generate a SSL context that
       won't verify

---
## _get_fingerprint
```python
from connector import _get_fingerprint
```



---
## _fail_on_no_start_tls
```python
from connector import _fail_on_no_start_tls
```

Raise a :py:exc:`RuntimeError` on missing ``start_tls()``.

It is necessary for TLS-in-TLS so that it is possible to
send HTTPS queries through HTTPS proxies.

This doesn't affect regular HTTP requests, though.

---
## _check_loop_for_start_tls
```python
from connector import _check_loop_for_start_tls
```



---
## _loop_supports_start_tls
```python
from connector import _loop_supports_start_tls
```



---
## _warn_about_tls_in_tls
```python
from connector import _warn_about_tls_in_tls
```

Issue a warning if the requested URL has HTTPS scheme.

---
## _convert_hosts_to_addr_infos
```python
from connector import _convert_hosts_to_addr_infos
```

Converts the list of hosts to a list of addr_infos.

The list of hosts is the result of a DNS lookup. The list of
addr_infos is the result of a call to `socket.getaddrinfo()`.

---
## path
```python
from connector import path
```

Path to the named pipe.

---
## drop_exception
```python
from connector import drop_exception
```



---
## __name__
```python
from client_exceptions import __name__
```

HTTP related errors.

---
## ClientError
```python
from client_exceptions import ClientError
```

Base class for client connection errors.

---
## ClientResponseError
```python
from client_exceptions import ClientResponseError
```

Base class for exceptions that occur after getting a response.

request_info: An instance of RequestInfo.
history: A sequence of responses, if redirects occurred.
status: HTTP status code.
message: Error message.
headers: Response headers.

---
## ContentTypeError
```python
from client_exceptions import ContentTypeError
```

ContentType found is not valid.

---
## WSServerHandshakeError
```python
from client_exceptions import WSServerHandshakeError
```

websocket server handshake error.

---
## ClientHttpProxyError
```python
from client_exceptions import ClientHttpProxyError
```

HTTP proxy error.

Raised in :class:`aiohttp.connector.TCPConnector` if
proxy responds with status other than ``200 OK``
on ``CONNECT`` request.

---
## TooManyRedirects
```python
from client_exceptions import TooManyRedirects
```

Client was redirected too many times.

---
## ClientConnectionError
```python
from client_exceptions import ClientConnectionError
```

Base class for client socket errors.

---
## ClientConnectionResetError
```python
from client_exceptions import ClientConnectionResetError
```

ConnectionResetError

---
## ClientOSError
```python
from client_exceptions import ClientOSError
```

OSError error.

---
## ClientConnectorError
```python
from client_exceptions import ClientConnectorError
```

Client connector error.

Raised in :class:`aiohttp.connector.TCPConnector` if
    a connection can not be established.

---
## ClientProxyConnectionError
```python
from client_exceptions import ClientProxyConnectionError
```

Proxy connection error.

Raised in :class:`aiohttp.connector.TCPConnector` if
    connection to proxy can not be established.

---
## UnixClientConnectorError
```python
from client_exceptions import UnixClientConnectorError
```

Unix connector error.

Raised in :py:class:`aiohttp.connector.UnixConnector`
if connection to unix socket can not be established.

---
## ServerConnectionError
```python
from client_exceptions import ServerConnectionError
```

Server connection errors.

---
## ServerDisconnectedError
```python
from client_exceptions import ServerDisconnectedError
```

Server disconnected.

---
## ServerTimeoutError
```python
from client_exceptions import ServerTimeoutError
```

Server timeout error.

---
## ConnectionTimeoutError
```python
from client_exceptions import ConnectionTimeoutError
```

Connection timeout error.

---
## SocketTimeoutError
```python
from client_exceptions import SocketTimeoutError
```

Socket timeout error.

---
## ServerFingerprintMismatch
```python
from client_exceptions import ServerFingerprintMismatch
```

SSL certificate does not match expected fingerprint.

---
## ClientPayloadError
```python
from client_exceptions import ClientPayloadError
```

Response payload error.

---
## InvalidURL
```python
from client_exceptions import InvalidURL
```

Invalid URL.

URL used for fetching is malformed, e.g. it doesn't contains host
part.

---
## InvalidUrlClientError
```python
from client_exceptions import InvalidUrlClientError
```

Invalid URL client error.

---
## RedirectClientError
```python
from client_exceptions import RedirectClientError
```

Client redirect error.

---
## NonHttpUrlClientError
```python
from client_exceptions import NonHttpUrlClientError
```

Non http URL client error.

---
## InvalidUrlRedirectClientError
```python
from client_exceptions import InvalidUrlRedirectClientError
```

Invalid URL redirect client error.

---
## NonHttpUrlRedirectClientError
```python
from client_exceptions import NonHttpUrlRedirectClientError
```

Non http URL redirect client error.

---
## ClientSSLError
```python
from client_exceptions import ClientSSLError
```

Base error for ssl.*Errors.

---
## ClientConnectorSSLError
```python
from client_exceptions import ClientConnectorSSLError
```

Response ssl error.

---
## ClientConnectorCertificateError
```python
from client_exceptions import ClientConnectorCertificateError
```

Response certificate error.

---
## __init__
```python
from client_exceptions import __init__
```



---
## __str__
```python
from client_exceptions import __str__
```



---
## __repr__
```python
from client_exceptions import __repr__
```



---
## code
```python
from client_exceptions import code
```



---
## os_error
```python
from client_exceptions import os_error
```



---
## host
```python
from client_exceptions import host
```



---
## port
```python
from client_exceptions import port
```



---
## ssl
```python
from client_exceptions import ssl
```



---
## path
```python
from client_exceptions import path
```



---
## url
```python
from client_exceptions import url
```



---
## description
```python
from client_exceptions import description
```



---
## certificate_error
```python
from client_exceptions import certificate_error
```



---
## __name__
```python
from typedefs import __name__
```



---
## Middleware
```python
from typedefs import Middleware
```



---
## __call__
```python
from typedefs import __call__
```



---
## __name__
```python
from hdrs import __name__
```

HTTP Headers constants.

---
## __name__
```python
from web_fileresponse import __name__
```



---
## FileResponse
```python
from web_fileresponse import FileResponse
```

A response object can be used to send files.

---
## __init__
```python
from web_fileresponse import __init__
```



---
## _etag_match
```python
from web_fileresponse import _etag_match
```



---
## _get_file_path_stat_encoding
```python
from web_fileresponse import _get_file_path_stat_encoding
```

Return the file path, stat result, and encoding.

If an uncompressed file is returned, the encoding is set to
:py:data:`None`.

This method should be called from a thread executor
since it calls os.stat which may block.

---
## __name__
```python
from http_writer import __name__
```

Http related parsers and protocol.

---
## HttpVersion
```python
from http_writer import HttpVersion
```



---
## StreamWriter
```python
from http_writer import StreamWriter
```



---
## _safe_header
```python
from http_writer import _safe_header
```



---
## _py_serialize_headers
```python
from http_writer import _py_serialize_headers
```



---
## __init__
```python
from http_writer import __init__
```



---
## transport
```python
from http_writer import transport
```



---
## protocol
```python
from http_writer import protocol
```



---
## enable_chunking
```python
from http_writer import enable_chunking
```



---
## enable_compression
```python
from http_writer import enable_compression
```



---
## _write
```python
from http_writer import _write
```



---
## __name__
```python
from tcp_helpers import __name__
```

Helper methods to tune a TCP connection

---
## tcp_nodelay
```python
from tcp_helpers import tcp_nodelay
```



---
## tcp_keepalive
```python
from tcp_helpers import tcp_keepalive
```



---
## __name__
```python
from helpers import __name__
```



---
## noop
```python
from helpers import noop
```



---
## BasicAuth
```python
from helpers import BasicAuth
```

Http basic authentication helper.

---
## strip_auth_from_url
```python
from helpers import strip_auth_from_url
```

Remove user and password from URL if present and return BasicAuth object.

---
## netrc_from_env
```python
from helpers import netrc_from_env
```

Load netrc from file.

Attempt to load it from the path specified by the env-var
NETRC or in the default location in the user's home directory.

Returns None if it couldn't be found or fails to parse.

---
## ProxyInfo
```python
from helpers import ProxyInfo
```



---
## basicauth_from_netrc
```python
from helpers import basicauth_from_netrc
```

Return :py:class:`~aiohttp.BasicAuth` credentials for ``host`` from ``netrc_obj``.

:raises LookupError: if ``netrc_obj`` is :py:data:`None` or if no
        entry is found for the ``host``.

---
## proxies_from_env
```python
from helpers import proxies_from_env
```



---
## get_env_proxy_for_url
```python
from helpers import get_env_proxy_for_url
```

Get a permitted proxy for the given URL from the env.

---
## MimeType
```python
from helpers import MimeType
```



---
## parse_mimetype
```python
from helpers import parse_mimetype
```

Parses a MIME type into its components.

mimetype is a MIME type string.

Returns a MimeType object.

Example:

>>> parse_mimetype('text/html; charset=utf-8')
MimeType(type='text', subtype='html', suffix='',
         parameters={'charset': 'utf-8'})

---
## guess_filename
```python
from helpers import guess_filename
```



---
## quoted_string
```python
from helpers import quoted_string
```

Return 7-bit content as quoted-string.

Format content into a quoted-string as defined in RFC5322 for
Internet Message Format. Notice that this is not the 8-bit HTTP
format, but the 7-bit email format. Content must be in usascii or
a ValueError is raised.

---
## content_disposition_header
```python
from helpers import content_disposition_header
```

Sets ``Content-Disposition`` header for MIME.

This is the MIME payload Content-Disposition header from RFC 2183
and RFC 7579 section 4.2, not the HTTP Content-Disposition from
RFC 6266.

disptype is a disposition type: inline, attachment, form-data.
Should be valid extension token (see RFC 2183)

quote_fields performs value quoting to 7-bit MIME headers
according to RFC 7578. Set to quote_fields to False if recipient
can take 8-bit file names and field values.

_charset specifies the charset to use when quote_fields is True.

params is a dict with disposition params.

---
## _TSelf
```python
from helpers import _TSelf
```



---
## reify
```python
from helpers import reify
```

Use as a class method decorator.

It operates almost exactly like
the Python `@property` decorator, but it puts the result of the
method it decorates into the instance dict after the first call,
effectively replacing the function it decorates with an instance
variable.  It is, in Python parlance, a data descriptor.

---
## is_ipv4_address
```python
from helpers import is_ipv4_address
```

Check if host looks like an IPv4 address.

This function does not validate that the format is correct, only that
the host is a str or bytes, and its all numeric.

This check is only meant as a heuristic to ensure that
a host is not a domain name.

---
## is_ipv6_address
```python
from helpers import is_ipv6_address
```

Check if host looks like an IPv6 address.

This function does not validate that the format is correct, only that
the host contains a colon and that it is a str or bytes.

This check is only meant as a heuristic to ensure that
a host is not a domain name.

---
## is_ip_address
```python
from helpers import is_ip_address
```

Check if host looks like an IP Address.

This check is only meant as a heuristic to ensure that
a host is not a domain name.

---
## rfc822_formatted_time
```python
from helpers import rfc822_formatted_time
```



---
## _weakref_handle
```python
from helpers import _weakref_handle
```



---
## weakref_handle
```python
from helpers import weakref_handle
```



---
## call_later
```python
from helpers import call_later
```



---
## calculate_timeout_when
```python
from helpers import calculate_timeout_when
```

Calculate when to execute a timeout.

---
## TimeoutHandle
```python
from helpers import TimeoutHandle
```

Timeout handle

---
## BaseTimerContext
```python
from helpers import BaseTimerContext
```



---
## TimerNoop
```python
from helpers import TimerNoop
```



---
## TimerContext
```python
from helpers import TimerContext
```

Low resolution timeout context manager

---
## ceil_timeout
```python
from helpers import ceil_timeout
```



---
## HeadersMixin
```python
from helpers import HeadersMixin
```



---
## set_result
```python
from helpers import set_result
```



---
## ErrorableProtocol
```python
from helpers import ErrorableProtocol
```



---
## set_exception
```python
from helpers import set_exception
```



---
## AppKey
```python
from helpers import AppKey
```

Keys for static typing support in Application.

---
## ChainMapProxy
```python
from helpers import ChainMapProxy
```



---
## ETag
```python
from helpers import ETag
```



---
## validate_etag_value
```python
from helpers import validate_etag_value
```



---
## parse_http_date
```python
from helpers import parse_http_date
```

Process a date string, return a datetime object

---
## must_be_empty_body
```python
from helpers import must_be_empty_body
```

Check if a request must return an empty body.

---
## method_must_be_empty_body
```python
from helpers import method_must_be_empty_body
```

Check if a method must return an empty body.

---
## status_code_must_be_empty_body
```python
from helpers import status_code_must_be_empty_body
```

Check if a status code must return an empty body.

---
## should_remove_content_length
```python
from helpers import should_remove_content_length
```

Check if a Content-Length header should be removed.

This should always be a subset of must_be_empty_body

---
## __await__
```python
from helpers import __await__
```



---
## __new__
```python
from helpers import __new__
```



---
## decode
```python
from helpers import decode
```

Create a BasicAuth object from an Authorization HTTP header.

---
## from_url
```python
from helpers import from_url
```

Create BasicAuth from url.

---
## encode
```python
from helpers import encode
```

Encode credentials.

---
## __init__
```python
from helpers import __init__
```



---
## __get__
```python
from helpers import __get__
```



---
## __set__
```python
from helpers import __set__
```



---
## register
```python
from helpers import register
```



---
## close
```python
from helpers import close
```

Removes iterable with given _tqdm.

---
## start
```python
from helpers import start
```



---
## timer
```python
from helpers import timer
```



---
## __call__
```python
from helpers import __call__
```

Updates progress tracker with progress and message text.
Parameters:
    progress: If float, should be between 0 and 1 representing completion. If Tuple, first number represents steps completed, and second value represents total steps or None if unknown. If None, hides progress bar.
    desc: description to display.
    total: estimated total number of steps.
    unit: unit of iterations.

---
## assert_timeout
```python
from helpers import assert_timeout
```

Raise TimeoutError if timer has already been cancelled.

---
## __enter__
```python
from helpers import __enter__
```



---
## __exit__
```python
from helpers import __exit__
```



---
## timeout
```python
from helpers import timeout
```



---
## _parse_content_type
```python
from helpers import _parse_content_type
```



---
## content_type
```python
from helpers import content_type
```

The value of content part for Content-Type HTTP header.

---
## charset
```python
from helpers import charset
```

The value of charset part for Content-Type HTTP header.

---
## content_length
```python
from helpers import content_length
```

The value of Content-Length HTTP header.

---
## __lt__
```python
from helpers import __lt__
```



---
## __repr__
```python
from helpers import __repr__
```



---
## __init_subclass__
```python
from helpers import __init_subclass__
```



---
## __getitem__
```python
from helpers import __getitem__
```



---
## get
```python
from helpers import get
```



---
## __len__
```python
from helpers import __len__
```



---
## __iter__
```python
from helpers import __iter__
```



---
## __contains__
```python
from helpers import __contains__
```



---
## __bool__
```python
from helpers import __bool__
```



---
## __name__
```python
from http_parser import __name__
```



---
## RawRequestMessage
```python
from http_parser import RawRequestMessage
```



---
## RawResponseMessage
```python
from http_parser import RawResponseMessage
```



---
## ParseState
```python
from http_parser import ParseState
```



---
## ChunkState
```python
from http_parser import ChunkState
```



---
## HeadersParser
```python
from http_parser import HeadersParser
```



---
## _is_supported_upgrade
```python
from http_parser import _is_supported_upgrade
```

Check if the upgrade header is supported.

---
## HttpParser
```python
from http_parser import HttpParser
```



---
## HttpRequestParser
```python
from http_parser import HttpRequestParser
```

Read request status line.

Exception .http_exceptions.BadStatusLine
could be raised in case of any errors in status line.
Returns RawRequestMessage.

---
## HttpResponseParser
```python
from http_parser import HttpResponseParser
```

Read response status line and headers.

BadStatusLine could be raised in case of any errors in status line.
Returns RawResponseMessage.

---
## HttpPayloadParser
```python
from http_parser import HttpPayloadParser
```



---
## DeflateBuffer
```python
from http_parser import DeflateBuffer
```

DeflateStream decompress stream and feed data into specified stream.

---
## __init__
```python
from http_parser import __init__
```



---
## parse_headers
```python
from http_parser import parse_headers
```

Parses RFC 5322 headers from a stream.

Line continuations are supported. Returns list of header name
and value pairs. Header name is in upper case.

---
## parse_message
```python
from http_parser import parse_message
```



---
## _is_chunked_te
```python
from http_parser import _is_chunked_te
```



---
## feed_eof
```python
from http_parser import feed_eof
```



---
## feed_data
```python
from http_parser import feed_data
```



---
## set_upgraded
```python
from http_parser import set_upgraded
```

Set connection upgraded (to websocket) mode.

:param bool val: new state.

---
## set_exception
```python
from http_parser import set_exception
```



---
## begin_http_chunk_receiving
```python
from http_parser import begin_http_chunk_receiving
```



---
## end_http_chunk_receiving
```python
from http_parser import end_http_chunk_receiving
```



---
## get_content_length
```python
from http_parser import get_content_length
```



---
## __name__
```python
from cookiejar import __name__
```



---
## CookieJar
```python
from cookiejar import CookieJar
```

Implements cookie storage adhering to RFC 6265.

---
## DummyCookieJar
```python
from cookiejar import DummyCookieJar
```

Implements a dummy cookie storage.

It can be used with the ClientSession when no cookie processing is needed.

---
## __init__
```python
from cookiejar import __init__
```



---
## save
```python
from cookiejar import save
```



---
## load
```python
from cookiejar import load
```



---
## clear
```python
from cookiejar import clear
```



---
## clear_domain
```python
from cookiejar import clear_domain
```



---
## __iter__
```python
from cookiejar import __iter__
```



---
## __len__
```python
from cookiejar import __len__
```



---
## _do_expiration
```python
from cookiejar import _do_expiration
```

Remove expired cookies.

---
## _delete_cookies
```python
from cookiejar import _delete_cookies
```



---
## _expire_cookie
```python
from cookiejar import _expire_cookie
```



---
## update_cookies
```python
from cookiejar import update_cookies
```



---
## filter_cookies
```python
from cookiejar import filter_cookies
```



---
## _is_domain_match
```python
from cookiejar import _is_domain_match
```

Implements domain matching adhering to RFC 6265.

---
## _parse_date
```python
from cookiejar import _parse_date
```

Implements date string parsing adhering to RFC 6265.

---
## __name__
```python
from pytest_plugin import __name__
```



---
## AiohttpClient
```python
from pytest_plugin import AiohttpClient
```



---
## AiohttpServer
```python
from pytest_plugin import AiohttpServer
```



---
## AiohttpRawServer
```python
from pytest_plugin import AiohttpRawServer
```



---
## pytest_addoption
```python
from pytest_plugin import pytest_addoption
```



---
## pytest_fixture_setup
```python
from pytest_plugin import pytest_fixture_setup
```



---
## fast
```python
from pytest_plugin import fast
```

--fast config option

---
## loop_debug
```python
from pytest_plugin import loop_debug
```

--enable-loop-debug config option

---
## _runtime_warning_context
```python
from pytest_plugin import _runtime_warning_context
```

Context manager which checks for RuntimeWarnings.

This exists specifically to
avoid "coroutine 'X' was never awaited" warnings being missed.

If RuntimeWarnings occur in the context a RuntimeError is raised.

---
## _passthrough_loop_context
```python
from pytest_plugin import _passthrough_loop_context
```

Passthrough loop context.

Sets up and tears down a loop unless one is passed in via the loop
argument when it's passed straight through.

---
## pytest_pycollect_makeitem
```python
from pytest_plugin import pytest_pycollect_makeitem
```



---
## pytest_pyfunc_call
```python
from pytest_plugin import pytest_pyfunc_call
```



---
## pytest_generate_tests
```python
from pytest_plugin import pytest_generate_tests
```



---
## loop
```python
from pytest_plugin import loop
```

Return an instance of the event loop.

---
## proactor_loop
```python
from pytest_plugin import proactor_loop
```



---
## unused_port
```python
from pytest_plugin import unused_port
```



---
## aiohttp_unused_port
```python
from pytest_plugin import aiohttp_unused_port
```

Return a port that is unused on the current host.

---
## aiohttp_server
```python
from pytest_plugin import aiohttp_server
```

Factory to create a TestServer instance, given an app.

aiohttp_server(app, **kwargs)

---
## test_server
```python
from pytest_plugin import test_server
```



---
## aiohttp_raw_server
```python
from pytest_plugin import aiohttp_raw_server
```

Factory to create a RawTestServer instance, given a web handler.

aiohttp_raw_server(handler, **kwargs)

---
## raw_test_server
```python
from pytest_plugin import raw_test_server
```



---
## aiohttp_client
```python
from pytest_plugin import aiohttp_client
```

Factory to create a TestClient instance.

aiohttp_client(app, **kwargs)
aiohttp_client(server, **kwargs)
aiohttp_client(raw_server, **kwargs)

---
## test_client
```python
from pytest_plugin import test_client
```



---
## __call__
```python
from pytest_plugin import __call__
```



---
## wrapper
```python
from pytest_plugin import wrapper
```



---
## finalizer
```python
from pytest_plugin import finalizer
```



---
## __name__
```python
from abc import __name__
```



---
## AbstractRouter
```python
from abc import AbstractRouter
```



---
## AbstractMatchInfo
```python
from abc import AbstractMatchInfo
```



---
## AbstractView
```python
from abc import AbstractView
```

Abstract class based view.

---
## ResolveResult
```python
from abc import ResolveResult
```

Resolve result.

This is the result returned from an AbstractResolver's
resolve method.

:param hostname: The hostname that was provided.
:param host: The IP address that was resolved.
:param port: The port that was resolved.
:param family: The address family that was resolved.
:param proto: The protocol that was resolved.
:param flags: The flags that were resolved.

---
## AbstractResolver
```python
from abc import AbstractResolver
```

Abstract DNS resolver.

---
## AbstractCookieJar
```python
from abc import AbstractCookieJar
```

Abstract Cookie Jar.

---
## AbstractStreamWriter
```python
from abc import AbstractStreamWriter
```

Abstract stream writer.

---
## AbstractAccessLogger
```python
from abc import AbstractAccessLogger
```

Abstract writer to access log.

---
## __init__
```python
from abc import __init__
```



---
## post_init
```python
from abc import post_init
```

Post init stage.

Not an abstract method for sake of backward compatibility,
but if the router wants to be aware of the application
it can override this.

---
## frozen
```python
from abc import frozen
```



---
## freeze
```python
from abc import freeze
```

Freeze the match info.

The method is called after route resolution.

After the call .add_app() is forbidden.

---
## handler
```python
from abc import handler
```

Execute matched request handler

---
## expect_handler
```python
from abc import expect_handler
```

Expect handler for 100-continue processing

---
## http_exception
```python
from abc import http_exception
```

HTTPException instance raised on router's resolving, or None

---
## get_info
```python
from abc import get_info
```

Return a dict with additional info useful for introspection

---
## apps
```python
from abc import apps
```

Stack of nested applications.

Top level application is left-most element.

---
## add_app
```python
from abc import add_app
```

Add application to the nested apps stack.

---
## request
```python
from abc import request
```

Request instance.

---
## __await__
```python
from abc import __await__
```

Execute the view handler.

---
## clear
```python
from abc import clear
```

Clear all cookies if no predicate is passed.

---
## clear_domain
```python
from abc import clear_domain
```

Clear all cookies for domain and all subdomains.

---
## update_cookies
```python
from abc import update_cookies
```

Update cookies.

---
## filter_cookies
```python
from abc import filter_cookies
```

Return the jar's cookies filtered by their attributes.

---
## enable_compression
```python
from abc import enable_compression
```

Enable HTTP body compression

---
## enable_chunking
```python
from abc import enable_chunking
```

Enable HTTP chunked mode

---
## log
```python
from abc import log
```

Emit log to logger.

---
## __name__
```python
from error import __name__
```

create errno-specific classes for IO or os calls.

---
## Error
```python
from error import Error
```



---
## Unregistered
```python
from error import Unregistered
```

Raised when the user requests an item from the registry that does not actually exist.

---
## UnregisteredEnv
```python
from error import UnregisteredEnv
```

Raised when the user requests an env from the registry that does not actually exist.

---
## NamespaceNotFound
```python
from error import NamespaceNotFound
```

Raised when the user requests an env from the registry where the namespace doesn't exist.

---
## NameNotFound
```python
from error import NameNotFound
```

Raised when the user requests an env from the registry where the name doesn't exist.

---
## VersionNotFound
```python
from error import VersionNotFound
```

Raised when the user requests an env from the registry where the version doesn't exist.

---
## UnregisteredBenchmark
```python
from error import UnregisteredBenchmark
```

Raised when the user requests an env from the registry that does not actually exist.

---
## DeprecatedEnv
```python
from error import DeprecatedEnv
```

Raised when the user requests an env from the registry with an older version number than the latest env with the same name.

---
## RegistrationError
```python
from error import RegistrationError
```

Raised when the user attempts to register an invalid env. For example, an unversioned env when a versioned env exists.

---
## UnseedableEnv
```python
from error import UnseedableEnv
```

Raised when the user tries to seed an env that does not support seeding.

---
## DependencyNotInstalled
```python
from error import DependencyNotInstalled
```

Raised when the user has not installed a dependency.

---
## UnsupportedMode
```python
from error import UnsupportedMode
```

Raised when the user requests a rendering mode not supported by the environment.

---
## InvalidMetadata
```python
from error import InvalidMetadata
```

Raised when the metadata of an environment is not valid.

---
## ResetNeeded
```python
from error import ResetNeeded
```

When the order enforcing is violated, i.e. step or render is called before reset.

---
## ResetNotAllowed
```python
from error import ResetNotAllowed
```

When the monitor is active, raised when the user tries to step an environment that's not yet terminated or truncated.

---
## InvalidAction
```python
from error import InvalidAction
```

Raised when the user performs an action not contained within the action space.

---
## MissingArgument
```python
from error import MissingArgument
```

Raised when a required argument in the initializer is missing.

---
## InvalidProbability
```python
from error import InvalidProbability
```

Raised when given an invalid value for a probability.

---
## InvalidBound
```python
from error import InvalidBound
```

Raised when the clipping an array with invalid upper and/or lower bound.

---
## APIError
```python
from error import APIError
```

Deprecated, to be removed at gymnasium 1.0.

---
## APIConnectionError
```python
from error import APIConnectionError
```

Deprecated, to be removed at gymnasium 1.0.

---
## InvalidRequestError
```python
from error import InvalidRequestError
```

Deprecated, to be removed at gymnasium 1.0.

---
## AuthenticationError
```python
from error import AuthenticationError
```

Deprecated, to be removed at gymnasium 1.0.

---
## RateLimitError
```python
from error import RateLimitError
```

Deprecated, to be removed at gymnasium 1.0.

---
## VideoRecorderError
```python
from error import VideoRecorderError
```

Unused error.

---
## InvalidFrame
```python
from error import InvalidFrame
```

Error message when an invalid frame is captured.

---
## DoubleWrapperError
```python
from error import DoubleWrapperError
```

Error message for when using double wrappers.

---
## WrapAfterConfigureError
```python
from error import WrapAfterConfigureError
```

Error message for using wrap after configure.

---
## RetriesExceededError
```python
from error import RetriesExceededError
```

Error message for retries exceeding set number.

---
## DeprecatedWrapper
```python
from error import DeprecatedWrapper
```

Error message for importing an old version of a wrapper.

---
## AlreadyPendingCallError
```python
from error import AlreadyPendingCallError
```

Raised when `reset`, or `step` is called asynchronously (e.g. with `reset_async`, or `step_async` respectively), and `reset_async`, or `step_async` (respectively) is called again (without a complete call to `reset_wait`, or `step_wait` respectively).

---
## NoAsyncCallError
```python
from error import NoAsyncCallError
```

Raised when an asynchronous `reset`, or `step` is not running, but `reset_wait`, or `step_wait` (respectively) is called.

---
## ClosedEnvironmentError
```python
from error import ClosedEnvironmentError
```

Trying to call `reset`, or `step`, while the environment is closed.

---
## CustomSpaceError
```python
from error import CustomSpaceError
```

The space is a custom gymnasium.Space instance, and is not supported by `AsyncVectorEnv` with `shared_memory=True`.

---
## __init__
```python
from error import __init__
```



---
## __unicode__
```python
from error import __unicode__
```

Returns a string, if request_id is not None then make message other use the _message.

---
## __str__
```python
from error import __str__
```



---
## __name__
```python
from core import __name__
```



---
## Env
```python
from core import Env
```

The main Gymnasium class for implementing Reinforcement Learning Agents environments.

The class encapsulates an environment with arbitrary behind-the-scenes dynamics through the :meth:`step` and :meth:`reset` functions.
An environment can be partially or fully observed by single agents. For multi-agent environments, see PettingZoo.

The main API methods that users of this class need to know are:

- :meth:`step` - Updates an environment with actions returning the next agent observation, the reward for taking that actions,
  if the environment has terminated or truncated due to the latest action and information from the environment about the step, i.e. metrics, debug info.
- :meth:`reset` - Resets the environment to an initial state, required before calling step.
  Returns the first agent observation for an episode and information, i.e. metrics, debug info.
- :meth:`render` - Renders the environments to help visualise what the agent see, examples modes are "human", "rgb_array", "ansi" for text.
- :meth:`close` - Closes the environment, important when external software is used, i.e. pygame for rendering, databases

Environments have additional attributes for users to understand the implementation

- :attr:`action_space` - The Space object corresponding to valid actions, all valid actions should be contained within the space.
- :attr:`observation_space` - The Space object corresponding to valid observations, all valid observations should be contained within the space.
- :attr:`reward_range` - A tuple corresponding to the minimum and maximum possible rewards for an agent over an episode.
  The default reward range is set to :math:`(-\infty,+\infty)`.
- :attr:`spec` - An environment spec that contains the information used to initialize the environment from :meth:`gymnasium.make`
- :attr:`metadata` - The metadata of the environment, i.e. render modes, render fps
- :attr:`np_random` - The random number generator for the environment. This is automatically assigned during
  ``super().reset(seed=seed)`` and when assessing ``self.np_random``.

.. seealso:: For modifying or extending environments use the :py:class:`gymnasium.Wrapper` class

Note:
    To get reproducible sampling of actions, a seed can be set with ``env.action_space.seed(123)``.

---
## Wrapper
```python
from core import Wrapper
```

Wraps a :class:`gymnasium.Env` to allow a modular transformation of the :meth:`step` and :meth:`reset` methods.

This class is the base class of all wrappers to change the behavior of the underlying environment.
Wrappers that inherit from this class can modify the :attr:`action_space`, :attr:`observation_space`,
:attr:`reward_range` and :attr:`metadata` attributes, without changing the underlying environment's attributes.
Moreover, the behavior of the :meth:`step` and :meth:`reset` methods can be changed by these wrappers.

Some attributes (:attr:`spec`, :attr:`render_mode`, :attr:`np_random`) will point back to the wrapper's environment
(i.e. to the corresponding attributes of :attr:`env`).

Note:
    If you inherit from :class:`Wrapper`, don't forget to call ``super().__init__(env)``

---
## ObservationWrapper
```python
from core import ObservationWrapper
```

Superclass of wrappers that can modify observations using :meth:`observation` for :meth:`reset` and :meth:`step`.

If you would like to apply a function to only the observation before
passing it to the learning code, you can simply inherit from :class:`ObservationWrapper` and overwrite the method
:meth:`observation` to implement that transformation. The transformation defined in that method must be
reflected by the :attr:`env` observation space. Otherwise, you need to specify the new observation space of the
wrapper by setting :attr:`self.observation_space` in the :meth:`__init__` method of your wrapper.

Among others, Gymnasium provides the observation wrapper :class:`TimeAwareObservation`, which adds information about the
index of the timestep to the observation.

---
## RewardWrapper
```python
from core import RewardWrapper
```

Superclass of wrappers that can modify the returning reward from a step.

If you would like to apply a function to the reward that is returned by the base environment before
passing it to learning code, you can simply inherit from :class:`RewardWrapper` and overwrite the method
:meth:`reward` to implement that transformation.
This transformation might change the :attr:`reward_range`; to specify the :attr:`reward_range` of your wrapper,
you can simply define :attr:`self.reward_range` in :meth:`__init__`.

---
## ActionWrapper
```python
from core import ActionWrapper
```

Superclass of wrappers that can modify the action before :meth:`env.step`.

If you would like to apply a function to the action before passing it to the base environment,
you can simply inherit from :class:`ActionWrapper` and overwrite the method :meth:`action` to implement
that transformation. The transformation defined in that method must take values in the base environment’s
action space. However, its domain might differ from the original action space.
In that case, you need to specify the new action space of the wrapper by setting :attr:`self.action_space` in
the :meth:`__init__` method of your wrapper.

Among others, Gymnasium provides the action wrappers :class:`ClipAction` and :class:`RescaleAction` for clipping and rescaling actions.

---
## step
```python
from core import step
```

Runs the :attr:`env` :meth:`env.step` using the modified ``action`` from :meth:`self.action`.

---
## reset
```python
from core import reset
```

Resets all state variables to prepare the parser instance for new input.

Called once upon creation of a class instance. Should be called manually between calls
to [`Markdown.convert`][markdown.Markdown.convert].

---
## render
```python
from core import render
```

Uses the :meth:`render` of the :attr:`env` that can be overwritten to change the returned data.

---
## close
```python
from core import close
```

Close the connection to the Parquet file.

---
## unwrapped
```python
from core import unwrapped
```

Returns the base environment of the wrapper.

This will be the bare :class:`gymnasium.Env` environment, underneath all layers of wrappers.

---
## np_random
```python
from core import np_random
```



---
## __str__
```python
from core import __str__
```



---
## __enter__
```python
from core import __enter__
```



---
## __exit__
```python
from core import __exit__
```



---
## get_wrapper_attr
```python
from core import get_wrapper_attr
```

Gets an attribute from the wrapper and lower environments if `name` doesn't exist in this object.

Args:
    name: The variable name to get

Returns:
    The variable with name in wrapper or lower environments

---
## __init__
```python
from core import __init__
```



---
## __getattr__
```python
from core import __getattr__
```



---
## spec
```python
from core import spec
```

Returns the :attr:`Env` :attr:`spec` attribute with the `WrapperSpec` if the wrapper inherits from `EzPickle`.

---
## wrapper_spec
```python
from core import wrapper_spec
```

Generates a `WrapperSpec` for the wrappers.

---
## class_name
```python
from core import class_name
```

Returns the class name of the wrapper.

---
## action_space
```python
from core import action_space
```



---
## observation_space
```python
from core import observation_space
```



---
## reward_range
```python
from core import reward_range
```



---
## metadata
```python
from core import metadata
```

Return the Parquet metadata.

---
## render_mode
```python
from core import render_mode
```

Returns the :attr:`Env` :attr:`render_mode`.

---
## _np_random
```python
from core import _np_random
```

This code will never be run due to __getattr__ being called prior this.

It seems that @property overwrites the variable (`_np_random`) meaning that __getattr__ gets called with the missing variable.

---
## __repr__
```python
from core import __repr__
```



---
## observation
```python
from core import observation
```

Returns a modified observation.

Args:
    observation: The :attr:`env` observation

Returns:
    The modified observation

---
## reward
```python
from core import reward
```

Returns a modified environment ``reward``.

Args:
    reward: The :attr:`env` :meth:`step` reward

Returns:
    The modified `reward`

---
## action
```python
from core import action
```

Returns a modified action before :meth:`env.step` is called.

Args:
    action: The original :meth:`step` actions

Returns:
    The modified actions

---
## __name__
```python
from logger import __name__
```

Logging utilities for dill.

The 'logger' object is dill's top-level logger.

The 'adapter' object wraps the logger and implements a 'trace()' method that
generates a detailed tree-style trace for the pickling call at log level INFO.

The 'trace()' function sets and resets dill's logger log level, enabling and
disabling the pickling trace.

The trace shows a tree structure depicting the depth of each object serialized
*with dill save functions*, but not the ones that use save functions from
'pickle._Pickler.dispatch'. If the information is available, it also displays
the size in bytes that the object contributed to the pickle stream (including
its child objects).  Sample trace output:

    >>> import dill, dill.tests
    >>> dill.detect.trace(True)
    >>> dill.dump_session(main=dill.tests)
    ┬ M1: <module 'dill.tests' from '.../dill/tests/__init__.py'>
    ├┬ F2: <function _import_module at 0x7f0d2dce1b80>
    │└ # F2 [32 B]
    ├┬ D2: <dict object at 0x7f0d2e98a540>
    │├┬ T4: <class '_frozen_importlib.ModuleSpec'>
    ││└ # T4 [35 B]
    │├┬ D2: <dict object at 0x7f0d2ef0e8c0>
    ││├┬ T4: <class '_frozen_importlib_external.SourceFileLoader'>
    │││└ # T4 [50 B]
    ││├┬ D2: <dict object at 0x7f0d2e988a40>
    │││└ # D2 [84 B]
    ││└ # D2 [413 B]
    │└ # D2 [763 B]
    └ # M1 [813 B]

---
## set_level
```python
from logger import set_level
```

Set logging threshold on current logger.

---
## debug
```python
from logger import debug
```

Logs a debug message to the user.

---
## info
```python
from logger import info
```

Logs an info message to the user.

---
## warn
```python
from logger import warn
```

Raises a warning to the user if the min_level <= WARN.

Args:
    msg: The message to warn the user
    *args: Additional information to warn the user
    category: The category of warning
    stacklevel: The stack level to raise to

---
## deprecation
```python
from logger import deprecation
```

Logs a deprecation warning to users.

---
## error
```python
from logger import error
```

Logs an error message if min_level <= ERROR in red on the sys.stderr.

---
## OffsetReferential
```python
from __init__ import OffsetReferential
```



---
## OffsetType
```python
from __init__ import OffsetType
```



---
## SplitDelimiterBehavior
```python
from __init__ import SplitDelimiterBehavior
```



---
## __name__
```python
from _ssl import __name__
```



---
## default_ssl_context
```python
from _ssl import default_ssl_context
```



---
## __name__
```python
from _synchronization import __name__
```



---
## current_async_library
```python
from _synchronization import current_async_library
```



---
## AsyncLock
```python
from _synchronization import AsyncLock
```

This is a standard lock.

In the sync case `Lock` provides thread locking.
In the async case `AsyncLock` provides async locking.

---
## AsyncThreadLock
```python
from _synchronization import AsyncThreadLock
```

This is a threading-only lock for no-I/O contexts.

In the sync case `ThreadLock` provides thread locking.
In the async case `AsyncThreadLock` is a no-op.

---
## AsyncEvent
```python
from _synchronization import AsyncEvent
```



---
## AsyncSemaphore
```python
from _synchronization import AsyncSemaphore
```



---
## AsyncShieldCancellation
```python
from _synchronization import AsyncShieldCancellation
```



---
## Lock
```python
from _synchronization import Lock
```



---
## ThreadLock
```python
from _synchronization import ThreadLock
```

This is a threading-only lock for no-I/O contexts.

In the sync case `ThreadLock` provides thread locking.
In the async case `AsyncThreadLock` is a no-op.

---
## Event
```python
from _synchronization import Event
```



---
## Semaphore
```python
from _synchronization import Semaphore
```



---
## ShieldCancellation
```python
from _synchronization import ShieldCancellation
```



---
## __init__
```python
from _synchronization import __init__
```



---
## setup
```python
from _synchronization import setup
```

Detect if we're running under 'asyncio' or 'trio' and create
a semaphore with the correct implementation.

---
## __enter__
```python
from _synchronization import __enter__
```



---
## __exit__
```python
from _synchronization import __exit__
```



---
## set
```python
from _synchronization import set
```



---
## wait
```python
from _synchronization import wait
```



---
## acquire
```python
from _synchronization import acquire
```



---
## release
```python
from _synchronization import release
```



---
## __name__
```python
from _api import __name__
```



---
## request
```python
from _api import request
```

Sends an HTTP request.

**Parameters:**

* **method** - HTTP method for the new `Request` object: `GET`, `OPTIONS`,
`HEAD`, `POST`, `PUT`, `PATCH`, or `DELETE`.
* **url** - URL for the new `Request` object.
* **params** - *(optional)* Query parameters to include in the URL, as a
string, dictionary, or sequence of two-tuples.
* **content** - *(optional)* Binary content to include in the body of the
request, as bytes or a byte iterator.
* **data** - *(optional)* Form data to include in the body of the request,
as a dictionary.
* **files** - *(optional)* A dictionary of upload files to include in the
body of the request.
* **json** - *(optional)* A JSON serializable object to include in the body
of the request.
* **headers** - *(optional)* Dictionary of HTTP headers to include in the
request.
* **cookies** - *(optional)* Dictionary of Cookie items to include in the
request.
* **auth** - *(optional)* An authentication class to use when sending the
request.
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
* **proxies** - *(optional)* A dictionary mapping proxy keys to proxy URLs.
* **timeout** - *(optional)* The timeout configuration to use when sending
the request.
* **follow_redirects** - *(optional)* Enables or disables HTTP redirects.
* **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
verify the identity of requested hosts. Either `True` (default CA bundle),
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
(which will disable verification).
* **cert** - *(optional)* An SSL certificate used by the requested host
to authenticate the client. Either a path to an SSL certificate file, or
two-tuple of (certificate file, key file), or a three-tuple of (certificate
file, key file, password).
* **trust_env** - *(optional)* Enables or disables usage of environment
variables for configuration.

**Returns:** `Response`

Usage:

```
>>> import httpx
>>> response = httpx.request('GET', 'https://httpbin.org/get')
>>> response
<Response [200 OK]>
```

---
## stream
```python
from _api import stream
```

Alternative to `httpx.request()` that streams the response body
instead of loading it into memory at once.

**Parameters**: See `httpx.request`.

See also: [Streaming Responses][0]

[0]: /quickstart#streaming-responses

---
## AnyIOBackend
```python
from __init__ import AnyIOBackend
```



---
## TrioBackend
```python
from __init__ import TrioBackend
```



---
## __init__
```python
from __init__ import __init__
```



---
## __name__
```python
from _trace import __name__
```



---
## Trace
```python
from _trace import Trace
```



---
## __init__
```python
from _trace import __init__
```



---
## trace
```python
from _trace import trace
```



---
## __enter__
```python
from _trace import __enter__
```



---
## __exit__
```python
from _trace import __exit__
```



---
## __name__
```python
from _models import __name__
```



---
## enforce_bytes
```python
from _models import enforce_bytes
```

Any arguments that are ultimately represented as bytes can be specified
either as bytes or as strings.

However we enforce that any string arguments must only contain characters in
the plain ASCII range. chr(0)...chr(127). If you need to use characters
outside that range then be precise, and use a byte-wise argument.

---
## enforce_url
```python
from _models import enforce_url
```

Type check for URL parameters.

---
## enforce_headers
```python
from _models import enforce_headers
```

Convienence function that ensure all items in request or response headers
are either bytes or strings in the plain ASCII range.

---
## enforce_stream
```python
from _models import enforce_stream
```



---
## include_request_headers
```python
from _models import include_request_headers
```



---
## ByteStream
```python
from _models import ByteStream
```

A container for non-streaming content, and that supports both sync and async
stream iteration.

---
## Origin
```python
from _models import Origin
```



---
## URL
```python
from _models import URL
```

Represents the URL against which an HTTP request may be made.

The URL may either be specified as a plain string, for convienence:

```python
url = httpcore.URL("https://www.example.com/")
```

Or be constructed with explicitily pre-parsed components:

```python
url = httpcore.URL(scheme=b'https', host=b'www.example.com', port=None, target=b'/')
```

Using this second more explicit style allows integrations that are using
`httpcore` to pass through URLs that have already been parsed in order to use
libraries such as `rfc-3986` rather than relying on the stdlib. It also ensures
that URL parsing is treated identically at both the networking level and at any
higher layers of abstraction.

The four components are important here, as they allow the URL to be precisely
specified in a pre-parsed format. They also allow certain types of request to
be created that could not otherwise be expressed.

For example, an HTTP request to `http://www.example.com/` forwarded via a proxy
at `http://localhost:8080`...

```python
# Constructs an HTTP request with a complete URL as the target:
# GET https://www.example.com/ HTTP/1.1
url = httpcore.URL(
    scheme=b'http',
    host=b'localhost',
    port=8080,
    target=b'https://www.example.com/'
)
request = httpcore.Request(
    method="GET",
    url=url
)
```

Another example is constructing an `OPTIONS *` request...

```python
# Constructs an 'OPTIONS *' HTTP request:
# OPTIONS * HTTP/1.1
url = httpcore.URL(scheme=b'https', host=b'www.example.com', target=b'*')
request = httpcore.Request(method="OPTIONS", url=url)
```

This kind of request is not possible to formulate with a URL string,
because the `/` delimiter is always used to demark the target from the
host/port portion of the URL.

For convenience, string-like arguments may be specified either as strings or
as bytes. However, once a request is being issue over-the-wire, the URL
components are always ultimately required to be a bytewise representation.

In order to avoid any ambiguity over character encodings, when strings are used
as arguments, they must be strictly limited to the ASCII range `chr(0)`-`chr(127)`.
If you require a bytewise representation that is outside this range you must
handle the character encoding directly, and pass a bytes instance.

---
## Request
```python
from _models import Request
```



---
## Response
```python
from _models import Response
```



---
## __init__
```python
from _models import __init__
```



---
## __iter__
```python
from _models import __iter__
```



---
## __repr__
```python
from _models import __repr__
```



---
## __eq__
```python
from _models import __eq__
```



---
## __str__
```python
from _models import __str__
```



---
## origin
```python
from _models import origin
```



---
## __bytes__
```python
from _models import __bytes__
```



---
## content
```python
from _models import content
```



---
## read
```python
from _models import read
```

Read and return the response content.

---
## iter_stream
```python
from _models import iter_stream
```



---
## close
```python
from _models import close
```

Close the response and release the connection.
Automatically called if the response body is read to completion.

---
## __name__
```python
from _exceptions import __name__
```



---
## map_exceptions
```python
from _exceptions import map_exceptions
```



---
## ConnectionNotAvailable
```python
from _exceptions import ConnectionNotAvailable
```



---
## ProxyError
```python
from _exceptions import ProxyError
```

An error occurred while establishing a proxy connection.

---
## UnsupportedProtocol
```python
from _exceptions import UnsupportedProtocol
```

Attempted to make a request to an unsupported protocol.

For example issuing a request to `ftp://www.example.com`.

---
## ProtocolError
```python
from _exceptions import ProtocolError
```

The protocol was violated.

---
## RemoteProtocolError
```python
from _exceptions import RemoteProtocolError
```

The protocol was violated by the server.

For example, returning malformed HTTP.

---
## LocalProtocolError
```python
from _exceptions import LocalProtocolError
```

A protocol was violated by the client.

For example if the user instantiated a `Request` instance explicitly,
failed to include the mandatory `Host:` header, and then issued it directly
using `client.send()`.

---
## TimeoutException
```python
from _exceptions import TimeoutException
```

The base class for timeout errors.

An operation has timed out.

---
## PoolTimeout
```python
from _exceptions import PoolTimeout
```

Timed out waiting to acquire a connection from the pool.

---
## ConnectTimeout
```python
from _exceptions import ConnectTimeout
```

Timed out while connecting to the host.

---
## ReadTimeout
```python
from _exceptions import ReadTimeout
```

Timed out while receiving data from the host.

---
## WriteTimeout
```python
from _exceptions import WriteTimeout
```

Timed out while sending data to the host.

---
## NetworkError
```python
from _exceptions import NetworkError
```

The base class for network-related errors.

An error occurred while interacting with the network.

---
## ConnectError
```python
from _exceptions import ConnectError
```

Failed to establish a connection.

---
## ReadError
```python
from _exceptions import ReadError
```

Failed to receive data from the network.

---
## WriteError
```python
from _exceptions import WriteError
```

Failed to send data through the network.

---
## __name__
```python
from _utils import __name__
```



---
## is_socket_readable
```python
from _utils import is_socket_readable
```

Return whether a socket, as identifed by its file descriptor, is readable.
"A socket is readable" means that the read buffer isn't empty, i.e. that calling
.recv() on it would immediately return some data.

---
## _process_keys
```python
from __init__ import _process_keys
```

Helper function to compose cycler keys.

Parameters
----------
left, right : iterable of dictionaries or None
    The cyclers to be composed.

Returns
-------
keys : set
    The keys in the composition of the two cyclers.

---
## concat
```python
from __init__ import concat
```

Concatenate multiple DataFrames, LazyFrames into a single entity.

Arguments:
    items: DataFrames, LazyFrames to concatenate.

    how: {'vertical', 'horizontal'}
        * vertical: Stacks Series from DataFrames vertically and fills with `null`
          if the lengths don't match.
        * horizontal: Stacks Series from DataFrames horizontally and fills with `null`
          if the lengths don't match.

Returns:
    A new DataFrame, Lazyframe resulting from the concatenation.

Raises:
    NotImplementedError: The items to concatenate should either all be eager, or all lazy

Examples:

    Let's take an example of vertical concatenation:

    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data_1 = {"a": [1, 2, 3], "b": [4, 5, 6]}
    >>> data_2 = {"a": [5, 2], "b": [1, 4]}

    >>> df_pd_1 = pd.DataFrame(data_1)
    >>> df_pd_2 = pd.DataFrame(data_2)
    >>> df_pl_1 = pl.DataFrame(data_1)
    >>> df_pl_2 = pl.DataFrame(data_2)

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df1, df2):
    ...     return nw.concat([df1, df2], how="vertical")

    >>> func(df_pd_1, df_pd_2)
       a  b
    0  1  4
    1  2  5
    2  3  6
    0  5  1
    1  2  4
    >>> func(df_pl_1, df_pl_2)
    shape: (5, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 1   ┆ 4   │
    │ 2   ┆ 5   │
    │ 3   ┆ 6   │
    │ 5   ┆ 1   │
    │ 2   ┆ 4   │
    └─────┴─────┘

    Let's look at case a for horizontal concatenation:

    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data_1 = {"a": [1, 2, 3], "b": [4, 5, 6]}
    >>> data_2 = {"c": [5, 2], "d": [1, 4]}

    >>> df_pd_1 = pd.DataFrame(data_1)
    >>> df_pd_2 = pd.DataFrame(data_2)
    >>> df_pl_1 = pl.DataFrame(data_1)
    >>> df_pl_2 = pl.DataFrame(data_2)

    Defining a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df1, df2):
    ...     return nw.concat([df1, df2], how="horizontal")

    >>> func(df_pd_1, df_pd_2)
       a  b    c    d
    0  1  4  5.0  1.0
    1  2  5  2.0  4.0
    2  3  6  NaN  NaN

    >>> func(df_pl_1, df_pl_2)
    shape: (3, 4)
    ┌─────┬─────┬──────┬──────┐
    │ a   ┆ b   ┆ c    ┆ d    │
    │ --- ┆ --- ┆ ---  ┆ ---  │
    │ i64 ┆ i64 ┆ i64  ┆ i64  │
    ╞═════╪═════╪══════╪══════╡
    │ 1   ┆ 4   ┆ 5    ┆ 1    │
    │ 2   ┆ 5   ┆ 2    ┆ 4    │
    │ 3   ┆ 6   ┆ null ┆ null │
    └─────┴─────┴──────┴──────┘

---
## Cycler
```python
from __init__ import Cycler
```

Composable cycles.

This class has compositions methods:

``+``
  for 'inner' products (zip)

``+=``
  in-place ``+``

``*``
  for outer products (`itertools.product`) and integer multiplication

``*=``
  in-place ``*``

and supports basic slicing via ``[]``.

Parameters
----------
left, right : Cycler or None
    The 'left' and 'right' cyclers.
op : func or None
    Function which composes the 'left' and 'right' cyclers.

---
## cycler
```python
from __init__ import cycler
```

Create a new `Cycler` object from a single positional argument,
a pair of positional arguments, or the combination of keyword arguments.

cycler(arg)
cycler(label1=itr1[, label2=iter2[, ...]])
cycler(label, itr)

Form 1 simply copies a given `Cycler` object.

Form 2 composes a `Cycler` as an inner product of the
pairs of keyword arguments. In other words, all of the
iterables are cycled simultaneously, as if through zip().

Form 3 creates a `Cycler` from a label and an iterable.
This is useful for when the label cannot be a keyword argument
(e.g., an integer or a name that has a space in it).

Parameters
----------
arg : Cycler
    Copy constructor for Cycler (does a shallow copy of iterables).
label : name
    The property key. In the 2-arg form of the function,
    the label can be any hashable object. In the keyword argument
    form of the function, it must be a valid python identifier.
itr : iterable
    Finite length iterable of the property values.
    Can be a single-property `Cycler` that would
    be like a key change, but as a shallow copy.

Returns
-------
cycler : Cycler
    New `Cycler` for the given property

---
## _cycler
```python
from __init__ import _cycler
```

Create a new `Cycler` object from a property name and iterable of values.

Parameters
----------
label : hashable
    The property key.
itr : iterable
    Finite length iterable of the property values.

Returns
-------
cycler : Cycler
    New `Cycler` for the given property

---
## __call__
```python
from __init__ import __call__
```



---
## __contains__
```python
from __init__ import __contains__
```



---
## keys
```python
from __init__ import keys
```



---
## change_key
```python
from __init__ import change_key
```

Change a key in this cycler to a new name.
Modification is performed in-place.

Does nothing if the old key is the same as the new key.
Raises a ValueError if the new key is already a key.
Raises a KeyError if the old key isn't a key.

---
## _from_iter
```python
from __init__ import _from_iter
```

Class method to create 'base' Cycler objects
that do not have a 'right' or 'op' and for which
the 'left' object is not another Cycler.

Parameters
----------
label : hashable
    The property key.

itr : iterable
    Finite length iterable of the property values.

Returns
-------
`Cycler`
    New 'base' cycler.

---
## __getitem__
```python
from __init__ import __getitem__
```



---
## __iter__
```python
from __init__ import __iter__
```



---
## __add__
```python
from __init__ import __add__
```



---
## __mul__
```python
from __init__ import __mul__
```



---
## __rmul__
```python
from __init__ import __rmul__
```



---
## __len__
```python
from __init__ import __len__
```



---
## __iadd__
```python
from __init__ import __iadd__
```

In-place addition of a distribution or environment

---
## __imul__
```python
from __init__ import __imul__
```

In-place outer product of two cyclers (`itertools.product`).

Parameters
----------
other : Cycler

---
## __eq__
```python
from __init__ import __eq__
```



---
## __repr__
```python
from __init__ import __repr__
```



---
## _repr_html_
```python
from __init__ import _repr_html_
```



---
## by_key
```python
from __init__ import by_key
```

Values by key.

This returns the transposed values of the cycler.  Iterating
over a `Cycler` yields dicts with a single value for each key,
this method returns a `dict` of `list` which are the values
for the given key.

The returned value can be used to create an equivalent `Cycler`
using only `+`.

Returns
-------
transpose : dict
    dict of lists of the values for each key.

---
## simplify
```python
from __init__ import simplify
```

Simplify the cycler into a sum (but no products) of cyclers.

Returns
-------
simple : Cycler

---
## __name__
```python
from decoder import __name__
```

requests_toolbelt.multipart.decoder
===================================

This holds all the implementation details of the MultipartDecoder

---
## _detect_pathlib_path
```python
from decoder import _detect_pathlib_path
```



---
## _ispath
```python
from decoder import _ispath
```



---
## _getpath
```python
from decoder import _getpath
```



---
## TomlDecodeError
```python
from decoder import TomlDecodeError
```

Base toml Exception / Error.

---
## CommentValue
```python
from decoder import CommentValue
```



---
## _strictly_valid_num
```python
from decoder import _strictly_valid_num
```



---
## load
```python
from decoder import load
```

Parses named file or files as toml and returns a dictionary

Args:
    f: Path to the file to open, array of files to read into single dict
       or a file descriptor
    _dict: (optional) Specifies the class of the returned toml dictionary
    decoder: The decoder to use

Returns:
    Parsed toml file represented as a dictionary

Raises:
    TypeError -- When f is invalid type
    TomlDecodeError: Error while decoding toml
    IOError / FileNotFoundError -- When an array with no valid (existing)
    (Python 2 / Python 3)          file paths is passed

---
## loads
```python
from decoder import loads
```

Parses string as toml

Args:
    s: String to be parsed
    _dict: (optional) Specifies the class of the returned toml dictionary

Returns:
    Parsed toml file represented as a dictionary

Raises:
    TypeError: When a non-string is passed
    TomlDecodeError: Error while decoding toml

---
## _load_date
```python
from decoder import _load_date
```



---
## _load_unicode_escapes
```python
from decoder import _load_unicode_escapes
```



---
## _unescape
```python
from decoder import _unescape
```

Unescape characters in a TOML string.

---
## InlineTableDict
```python
from decoder import InlineTableDict
```

Sentinel subclass of dict for inline tables.

---
## TomlDecoder
```python
from decoder import TomlDecoder
```



---
## TomlPreserveCommentDecoder
```python
from decoder import TomlPreserveCommentDecoder
```



---
## __init__
```python
from decoder import __init__
```



---
## __getitem__
```python
from decoder import __getitem__
```



---
## __setitem__
```python
from decoder import __setitem__
```



---
## dump
```python
from decoder import dump
```



---
## get_empty_table
```python
from decoder import get_empty_table
```



---
## get_empty_inline_table
```python
from decoder import get_empty_inline_table
```



---
## load_inline_object
```python
from decoder import load_inline_object
```



---
## _get_split_on_quotes
```python
from decoder import _get_split_on_quotes
```



---
## load_line
```python
from decoder import load_line
```



---
## _load_line_multiline_str
```python
from decoder import _load_line_multiline_str
```



---
## load_value
```python
from decoder import load_value
```



---
## bounded_string
```python
from decoder import bounded_string
```



---
## _load_array_isstrarray
```python
from decoder import _load_array_isstrarray
```



---
## load_array
```python
from decoder import load_array
```



---
## preserve_comment
```python
from decoder import preserve_comment
```



---
## embed_comments
```python
from decoder import embed_comments
```



---
## DynamicInlineTableDict
```python
from decoder import DynamicInlineTableDict
```

Concrete sentinel subclass for inline tables.
It is a subclass of _dict which is passed in dynamically at load
time

It is also a subclass of InlineTableDict

---
## __name__
```python
from tz import __name__
```

This module offers timezone implementations subclassing the abstract
:py:class:`datetime.tzinfo` type. There are classes to handle tzfile format
files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`,
etc), TZ environment string (in all known formats), given ranges (with help
from relative deltas), local machine timezone, fixed offset timezone, and UTC
timezone.

---
## TomlTz
```python
from tz import TomlTz
```



---
## __init__
```python
from tz import __init__
```



---
## __deepcopy__
```python
from tz import __deepcopy__
```



---
## tzname
```python
from tz import tzname
```



---
## utcoffset
```python
from tz import utcoffset
```



---
## dst
```python
from tz import dst
```



---
## __name__
```python
from encoder import __name__
```

requests_toolbelt.multipart.encoder
===================================

This holds all of the implementation details of the MultipartEncoder

---
## dump
```python
from encoder import dump
```

Writes out dict as toml to a file

Args:
    o: Object to dump into toml
    f: File descriptor where the toml should be stored
    encoder: The ``TomlEncoder`` to use for constructing the output string

Returns:
    String containing the toml corresponding to dictionary

Raises:
    TypeError: When anything other than file descriptor is passed

---
## dumps
```python
from encoder import dumps
```

Stringifies input dict as toml

    Args:
        o: Object to dump into toml
        encoder: The ``TomlEncoder`` to use for constructing the output string

    Returns:
        String containing the toml corresponding to dict

    Examples:
        ```python
        >>> import toml
        >>> output = {
        ... 'a': "I'm a string",
        ... 'b': ["I'm", "a", "list"],
        ... 'c': 2400
        ... }
        >>> toml.dumps(output)
        'a = "I'm a string"
b = [ "I'm", "a", "list",]
c = 2400
'
        ```
    

---
## _dump_str
```python
from encoder import _dump_str
```



---
## _dump_float
```python
from encoder import _dump_float
```



---
## _dump_time
```python
from encoder import _dump_time
```



---
## TomlEncoder
```python
from encoder import TomlEncoder
```



---
## TomlPreserveInlineDictEncoder
```python
from encoder import TomlPreserveInlineDictEncoder
```



---
## TomlArraySeparatorEncoder
```python
from encoder import TomlArraySeparatorEncoder
```



---
## TomlNumpyEncoder
```python
from encoder import TomlNumpyEncoder
```



---
## TomlPreserveCommentEncoder
```python
from encoder import TomlPreserveCommentEncoder
```



---
## TomlPathlibEncoder
```python
from encoder import TomlPathlibEncoder
```



---
## __init__
```python
from encoder import __init__
```



---
## get_empty_table
```python
from encoder import get_empty_table
```



---
## dump_list
```python
from encoder import dump_list
```



---
## dump_inline_table
```python
from encoder import dump_inline_table
```

Preserve inline table in its compact syntax instead of expanding
into subsection.

https://github.com/toml-lang/toml#user-content-inline-table

---
## dump_value
```python
from encoder import dump_value
```



---
## dump_sections
```python
from encoder import dump_sections
```



---
## _dump_int
```python
from encoder import _dump_int
```



---
## _dump_pathlib_path
```python
from encoder import _dump_pathlib_path
```



---
## __name__
```python
from ordered import __name__
```



---
## TomlOrderedDecoder
```python
from ordered import TomlOrderedDecoder
```



---
## TomlOrderedEncoder
```python
from ordered import TomlOrderedEncoder
```



---
## __init__
```python
from ordered import __init__
```



---
## __name__
```python
from compatibility import __name__
```



---
## __name__
```python
from _version import __name__
```



---
## get_versions
```python
from _version import get_versions
```

Get version information or return default if unable to do so.

---
## __name__
```python
from itertoolz import __name__
```



---
## remove
```python
from itertoolz import remove
```

Return those items of sequence for which predicate(item) is False

>>> def iseven(x):
...     return x % 2 == 0
>>> list(remove(iseven, [1, 2, 3, 4]))
[1, 3]

---
## accumulate
```python
from itertoolz import accumulate
```

Repeatedly apply binary function to a sequence, accumulating results

>>> from operator import add, mul
>>> list(accumulate(add, [1, 2, 3, 4, 5]))
[1, 3, 6, 10, 15]
>>> list(accumulate(mul, [1, 2, 3, 4, 5]))
[1, 2, 6, 24, 120]

Accumulate is similar to ``reduce`` and is good for making functions like
cumulative sum:

>>> from functools import partial, reduce
>>> sum    = partial(reduce, add)
>>> cumsum = partial(accumulate, add)

Accumulate also takes an optional argument that will be used as the first
value. This is similar to reduce.

>>> list(accumulate(add, [1, 2, 3], -1))
[-1, 0, 2, 5]
>>> list(accumulate(add, [], 1))
[1]

See Also:
    itertools.accumulate :  In standard itertools for Python 3.2+

---
## groupby
```python
from itertoolz import groupby
```

Group a collection by a key function

>>> names = ['Alice', 'Bob', 'Charlie', 'Dan', 'Edith', 'Frank']
>>> groupby(len, names)  # doctest: +SKIP
{3: ['Bob', 'Dan'], 5: ['Alice', 'Edith', 'Frank'], 7: ['Charlie']}

>>> iseven = lambda x: x % 2 == 0
>>> groupby(iseven, [1, 2, 3, 4, 5, 6, 7, 8])  # doctest: +SKIP
{False: [1, 3, 5, 7], True: [2, 4, 6, 8]}

Non-callable keys imply grouping on a member.

>>> groupby('gender', [{'name': 'Alice', 'gender': 'F'},
...                    {'name': 'Bob', 'gender': 'M'},
...                    {'name': 'Charlie', 'gender': 'M'}]) # doctest:+SKIP
{'F': [{'gender': 'F', 'name': 'Alice'}],
 'M': [{'gender': 'M', 'name': 'Bob'},
       {'gender': 'M', 'name': 'Charlie'}]}

Not to be confused with ``itertools.groupby``

See Also:
    countby

---
## merge_sorted
```python
from itertoolz import merge_sorted
```

Merge and sort a collection of sorted collections

This works lazily and only keeps one value from each iterable in memory.

>>> list(merge_sorted([1, 3, 5], [2, 4, 6]))
[1, 2, 3, 4, 5, 6]

>>> ''.join(merge_sorted('abc', 'abc', 'abc'))
'aaabbbccc'

The "key" function used to sort the input may be passed as a keyword.

>>> list(merge_sorted([2, 3], [1, 3], key=lambda x: x // 3))
[2, 1, 3, 3]

---
## _merge_sorted_binary
```python
from itertoolz import _merge_sorted_binary
```



---
## _merge_sorted_binary_key
```python
from itertoolz import _merge_sorted_binary_key
```



---
## interleave
```python
from itertoolz import interleave
```

Interleave a sequence of sequences

>>> list(interleave([[1, 2], [3, 4]]))
[1, 3, 2, 4]

>>> ''.join(interleave(('ABC', 'XY')))
'AXBYC'

Both the individual sequences and the sequence of sequences may be infinite

Returns a lazy iterator

---
## unique
```python
from itertoolz import unique
```

Return only unique elements of a sequence

>>> tuple(unique((1, 2, 3)))
(1, 2, 3)
>>> tuple(unique((1, 2, 1, 3)))
(1, 2, 3)

Uniqueness can be defined by key keyword

>>> tuple(unique(['cat', 'mouse', 'dog', 'hen'], key=len))
('cat', 'mouse')

---
## isiterable
```python
from itertoolz import isiterable
```

Is x iterable?

>>> isiterable([1, 2, 3])
True
>>> isiterable('abc')
True
>>> isiterable(5)
False

---
## isdistinct
```python
from itertoolz import isdistinct
```

All values in sequence are distinct

>>> isdistinct([1, 2, 3])
True
>>> isdistinct([1, 2, 1])
False

>>> isdistinct("Hello")
False
>>> isdistinct("World")
True

---
## take
```python
from itertoolz import take
```

The first n elements of a sequence

>>> list(take(2, [10, 20, 30, 40, 50]))
[10, 20]

See Also:
    drop
    tail

---
## tail
```python
from itertoolz import tail
```

The last n elements of a sequence

>>> tail(2, [10, 20, 30, 40, 50])
[40, 50]

See Also:
    drop
    take

---
## drop
```python
from itertoolz import drop
```

The sequence following the first n elements

>>> list(drop(2, [10, 20, 30, 40, 50]))
[30, 40, 50]

See Also:
    take
    tail

---
## take_nth
```python
from itertoolz import take_nth
```

Every nth item in seq

>>> list(take_nth(2, [10, 20, 30, 40, 50]))
[10, 30, 50]

---
## first
```python
from itertoolz import first
```

The first element in a sequence

>>> first('ABC')
'A'

---
## second
```python
from itertoolz import second
```

The second element in a sequence

>>> second('ABC')
'B'

---
## nth
```python
from itertoolz import nth
```

The nth element in a sequence

>>> nth(1, 'ABC')
'B'

---
## last
```python
from itertoolz import last
```

The last element in a sequence

>>> last('ABC')
'C'

---
## _get
```python
from itertoolz import _get
```



---
## get
```python
from itertoolz import get
```

Get element in a sequence or dict

Provides standard indexing

>>> get(1, 'ABC')       # Same as 'ABC'[1]
'B'

Pass a list to get multiple values

>>> get([1, 2], 'ABC')  # ('ABC'[1], 'ABC'[2])
('B', 'C')

Works on any value that supports indexing/getitem
For example here we see that it works with dictionaries

>>> phonebook = {'Alice':  '555-1234',
...              'Bob':    '555-5678',
...              'Charlie':'555-9999'}
>>> get('Alice', phonebook)
'555-1234'

>>> get(['Alice', 'Bob'], phonebook)
('555-1234', '555-5678')

Provide a default for missing values

>>> get(['Alice', 'Dennis'], phonebook, None)
('555-1234', None)

See Also:
    pluck

---
## concat
```python
from itertoolz import concat
```

Concatenate zero or more iterables, any of which may be infinite.

An infinite sequence will prevent the rest of the arguments from
being included.

We use chain.from_iterable rather than ``chain(*seqs)`` so that seqs
can be a generator.

>>> list(concat([[], [1], [2, 3]]))
[1, 2, 3]

See also:
    itertools.chain.from_iterable  equivalent

---
## concatv
```python
from itertoolz import concatv
```

Variadic version of concat

>>> list(concatv([], ["a"], ["b", "c"]))
['a', 'b', 'c']

See also:
    itertools.chain

---
## mapcat
```python
from itertoolz import mapcat
```

Apply func to each sequence in seqs, concatenating results.

>>> list(mapcat(lambda s: [c.upper() for c in s],
...             [["a", "b"], ["c", "d", "e"]]))
['A', 'B', 'C', 'D', 'E']

---
## cons
```python
from itertoolz import cons
```

Add el to beginning of (possibly infinite) sequence seq.

>>> list(cons(1, [2, 3]))
[1, 2, 3]

---
## interpose
```python
from itertoolz import interpose
```

Introduce element between each pair of elements in seq

>>> list(interpose("a", [1, 2, 3]))
[1, 'a', 2, 'a', 3]

---
## frequencies
```python
from itertoolz import frequencies
```

Find number of occurrences of each value in seq

>>> frequencies(['cat', 'cat', 'ox', 'pig', 'pig', 'cat'])  #doctest: +SKIP
{'cat': 3, 'ox': 1, 'pig': 2}

See Also:
    countby
    groupby

---
## reduceby
```python
from itertoolz import reduceby
```

Perform a simultaneous groupby and reduction

The computation:

>>> result = reduceby(key, binop, seq, init)      # doctest: +SKIP

is equivalent to the following:

>>> def reduction(group):                           # doctest: +SKIP
...     return reduce(binop, group, init)           # doctest: +SKIP

>>> groups = groupby(key, seq)                    # doctest: +SKIP
>>> result = valmap(reduction, groups)              # doctest: +SKIP

But the former does not build the intermediate groups, allowing it to
operate in much less space.  This makes it suitable for larger datasets
that do not fit comfortably in memory

The ``init`` keyword argument is the default initialization of the
reduction.  This can be either a constant value like ``0`` or a callable
like ``lambda : 0`` as might be used in ``defaultdict``.

Simple Examples
---------------

>>> from operator import add, mul
>>> iseven = lambda x: x % 2 == 0

>>> data = [1, 2, 3, 4, 5]

>>> reduceby(iseven, add, data)  # doctest: +SKIP
{False: 9, True: 6}

>>> reduceby(iseven, mul, data)  # doctest: +SKIP
{False: 15, True: 8}

Complex Example
---------------

>>> projects = [{'name': 'build roads', 'state': 'CA', 'cost': 1000000},
...             {'name': 'fight crime', 'state': 'IL', 'cost': 100000},
...             {'name': 'help farmers', 'state': 'IL', 'cost': 2000000},
...             {'name': 'help farmers', 'state': 'CA', 'cost': 200000}]

>>> reduceby('state',                        # doctest: +SKIP
...          lambda acc, x: acc + x['cost'],
...          projects, 0)
{'CA': 1200000, 'IL': 2100000}

Example Using ``init``
----------------------

>>> def set_add(s, i):
...     s.add(i)
...     return s

>>> reduceby(iseven, set_add, [1, 2, 3, 4, 1, 2, 3], set)  # doctest: +SKIP
{True:  set([2, 4]),
 False: set([1, 3])}

---
## iterate
```python
from itertoolz import iterate
```

Repeatedly apply a function func onto an original input

Yields x, then func(x), then func(func(x)), then func(func(func(x))), etc..

>>> def inc(x):  return x + 1
>>> counter = iterate(inc, 0)
>>> next(counter)
0
>>> next(counter)
1
>>> next(counter)
2

>>> double = lambda x: x * 2
>>> powers_of_two = iterate(double, 1)
>>> next(powers_of_two)
1
>>> next(powers_of_two)
2
>>> next(powers_of_two)
4
>>> next(powers_of_two)
8

---
## sliding_window
```python
from itertoolz import sliding_window
```

A sequence of overlapping subsequences

>>> list(sliding_window(2, [1, 2, 3, 4]))
[(1, 2), (2, 3), (3, 4)]

This function creates a sliding window suitable for transformations like
sliding means / smoothing

>>> mean = lambda seq: float(sum(seq)) / len(seq)
>>> list(map(mean, sliding_window(2, [1, 2, 3, 4])))
[1.5, 2.5, 3.5]

---
## partition
```python
from itertoolz import partition
```

Partition sequence into tuples of length n

>>> list(partition(2, [1, 2, 3, 4]))
[(1, 2), (3, 4)]

If the length of ``seq`` is not evenly divisible by ``n``, the final tuple
is dropped if ``pad`` is not specified, or filled to length ``n`` by pad:

>>> list(partition(2, [1, 2, 3, 4, 5]))
[(1, 2), (3, 4)]

>>> list(partition(2, [1, 2, 3, 4, 5], pad=None))
[(1, 2), (3, 4), (5, None)]

See Also:
    partition_all

---
## partition_all
```python
from itertoolz import partition_all
```

Partition all elements of sequence into tuples of length at most n

The final tuple may be shorter to accommodate extra elements.

>>> list(partition_all(2, [1, 2, 3, 4]))
[(1, 2), (3, 4)]

>>> list(partition_all(2, [1, 2, 3, 4, 5]))
[(1, 2), (3, 4), (5,)]

See Also:
    partition

---
## count
```python
from itertoolz import count
```

Count the number of items in seq

Like the builtin ``len`` but works on lazy sequences.

Not to be confused with ``itertools.count``

See also:
    len

---
## pluck
```python
from itertoolz import pluck
```

plucks an element or several elements from each item in a sequence.

``pluck`` maps ``itertoolz.get`` over a sequence and returns one or more
elements of each item in the sequence.

This is equivalent to running `map(curried.get(ind), seqs)`

``ind`` can be either a single string/index or a list of strings/indices.
``seqs`` should be sequence containing sequences or dicts.

e.g.

>>> data = [{'id': 1, 'name': 'Cheese'}, {'id': 2, 'name': 'Pies'}]
>>> list(pluck('name', data))
['Cheese', 'Pies']
>>> list(pluck([0, 1], [[1, 2, 3], [4, 5, 7]]))
[(1, 2), (4, 5)]

See Also:
    get
    map

---
## getter
```python
from itertoolz import getter
```



---
## join
```python
from itertoolz import join
```

Join two sequences on common attributes

This is a semi-streaming operation.  The LEFT sequence is fully evaluated
and placed into memory.  The RIGHT sequence is evaluated lazily and so can
be arbitrarily large.

(Note: If right_default is defined, then unique keys of rightseq
    will also be stored in memory.)

>>> friends = [('Alice', 'Edith'),
...            ('Alice', 'Zhao'),
...            ('Edith', 'Alice'),
...            ('Zhao', 'Alice'),
...            ('Zhao', 'Edith')]

>>> cities = [('Alice', 'NYC'),
...           ('Alice', 'Chicago'),
...           ('Dan', 'Sydney'),
...           ('Edith', 'Paris'),
...           ('Edith', 'Berlin'),
...           ('Zhao', 'Shanghai')]

>>> # Vacation opportunities
>>> # In what cities do people have friends?
>>> result = join(second, friends,
...               first, cities)
>>> for ((a, b), (c, d)) in sorted(unique(result)):
...     print((a, d))
('Alice', 'Berlin')
('Alice', 'Paris')
('Alice', 'Shanghai')
('Edith', 'Chicago')
('Edith', 'NYC')
('Zhao', 'Chicago')
('Zhao', 'NYC')
('Zhao', 'Berlin')
('Zhao', 'Paris')

Specify outer joins with keyword arguments ``left_default`` and/or
``right_default``.  Here is a full outer join in which unmatched elements
are paired with None.

>>> identity = lambda x: x
>>> list(join(identity, [1, 2, 3],
...           identity, [2, 3, 4],
...           left_default=None, right_default=None))
[(2, 2), (3, 3), (None, 4), (1, None)]

Usually the key arguments are callables to be applied to the sequences.  If
the keys are not obviously callable then it is assumed that indexing was
intended, e.g. the following is a legal change.
The join is implemented as a hash join and the keys of leftseq must be
hashable. Additionally, if right_default is defined, then keys of rightseq
must also be hashable.

>>> # result = join(second, friends, first, cities)
>>> result = join(1, friends, 0, cities)  # doctest: +SKIP

---
## diff
```python
from itertoolz import diff
```

Return those items that differ between sequences

>>> list(diff([1, 2, 3], [1, 2, 10, 100]))
[(3, 10)]

Shorter sequences may be padded with a ``default`` value:

>>> list(diff([1, 2, 3], [1, 2, 10, 100], default=None))
[(3, 10), (None, 100)]

A ``key`` function may also be applied to each item to use during
comparisons:

>>> list(diff(['apples', 'bananas'], ['Apples', 'Oranges'], key=str.lower))
[('bananas', 'Oranges')]

---
## topk
```python
from itertoolz import topk
```

Find the k largest elements of a sequence

Operates lazily in ``n*log(k)`` time

>>> topk(2, [1, 100, 10, 1000])
(1000, 100)

Use a key function to change sorted order

>>> topk(2, ['Alice', 'Bob', 'Charlie', 'Dan'], key=len)
('Charlie', 'Alice')

See also:
    heapq.nlargest

---
## peek
```python
from itertoolz import peek
```

Retrieve the next element of a sequence

Returns the first element and an iterable equivalent to the original
sequence, still having the element retrieved.

>>> seq = [0, 1, 2, 3, 4]
>>> first, seq = peek(seq)
>>> first
0
>>> list(seq)
[0, 1, 2, 3, 4]

---
## peekn
```python
from itertoolz import peekn
```

Retrieve the next n elements of a sequence

Returns a tuple of the first n elements and an iterable equivalent
to the original, still having the elements retrieved.

>>> seq = [0, 1, 2, 3, 4]
>>> first_two, seq = peekn(2, seq)
>>> first_two
(0, 1)
>>> list(seq)
[0, 1, 2, 3, 4]

---
## random_sample
```python
from itertoolz import random_sample
```

Return elements from a sequence with probability of prob

Returns a lazy iterator of random items from seq.

``random_sample`` considers each item independently and without
replacement. See below how the first time it returned 13 items and the
next time it returned 6 items.

>>> seq = list(range(100))
>>> list(random_sample(0.1, seq)) # doctest: +SKIP
[6, 9, 19, 35, 45, 50, 58, 62, 68, 72, 78, 86, 95]
>>> list(random_sample(0.1, seq)) # doctest: +SKIP
[6, 44, 54, 61, 69, 94]

Providing an integer seed for ``random_state`` will result in
deterministic sampling. Given the same seed it will return the same sample
every time.

>>> list(random_sample(0.1, seq, random_state=2016))
[7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]
>>> list(random_sample(0.1, seq, random_state=2016))
[7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]

``random_state`` can also be any object with a method ``random`` that
returns floats between 0.0 and 1.0 (exclusive).

>>> from random import Random
>>> randobj = Random(2016)
>>> list(random_sample(0.1, seq, random_state=randobj))
[7, 9, 19, 25, 30, 32, 34, 48, 59, 60, 81, 98]

---
## __name__
```python
from dicttoolz import __name__
```



---
## _get_factory
```python
from dicttoolz import _get_factory
```



---
## merge
```python
from dicttoolz import merge
```

Merge a collection of dictionaries

>>> merge({1: 'one'}, {2: 'two'})
{1: 'one', 2: 'two'}

Later dictionaries have precedence

>>> merge({1: 2, 3: 4}, {3: 3, 4: 4})
{1: 2, 3: 3, 4: 4}

See Also:
    merge_with

---
## merge_with
```python
from dicttoolz import merge_with
```

Merge dictionaries and apply function to combined values

A key may occur in more than one dict, and all values mapped from the key
will be passed to the function as a list, such as func([val1, val2, ...]).

>>> merge_with(sum, {1: 1, 2: 2}, {1: 10, 2: 20})
{1: 11, 2: 22}

>>> merge_with(first, {1: 1, 2: 2}, {2: 20, 3: 30})  # doctest: +SKIP
{1: 1, 2: 2, 3: 30}

See Also:
    merge

---
## valmap
```python
from dicttoolz import valmap
```

Apply function to values of dictionary

>>> bills = {"Alice": [20, 15, 30], "Bob": [10, 35]}
>>> valmap(sum, bills)  # doctest: +SKIP
{'Alice': 65, 'Bob': 45}

See Also:
    keymap
    itemmap

---
## keymap
```python
from dicttoolz import keymap
```

Apply function to keys of dictionary

>>> bills = {"Alice": [20, 15, 30], "Bob": [10, 35]}
>>> keymap(str.lower, bills)  # doctest: +SKIP
{'alice': [20, 15, 30], 'bob': [10, 35]}

See Also:
    valmap
    itemmap

---
## itemmap
```python
from dicttoolz import itemmap
```

Apply function to items of dictionary

>>> accountids = {"Alice": 10, "Bob": 20}
>>> itemmap(reversed, accountids)  # doctest: +SKIP
{10: "Alice", 20: "Bob"}

See Also:
    keymap
    valmap

---
## valfilter
```python
from dicttoolz import valfilter
```

Filter items in dictionary by value

>>> iseven = lambda x: x % 2 == 0
>>> d = {1: 2, 2: 3, 3: 4, 4: 5}
>>> valfilter(iseven, d)
{1: 2, 3: 4}

See Also:
    keyfilter
    itemfilter
    valmap

---
## keyfilter
```python
from dicttoolz import keyfilter
```

Filter items in dictionary by key

>>> iseven = lambda x: x % 2 == 0
>>> d = {1: 2, 2: 3, 3: 4, 4: 5}
>>> keyfilter(iseven, d)
{2: 3, 4: 5}

See Also:
    valfilter
    itemfilter
    keymap

---
## itemfilter
```python
from dicttoolz import itemfilter
```

Filter items in dictionary by item

>>> def isvalid(item):
...     k, v = item
...     return k % 2 == 0 and v < 4

>>> d = {1: 2, 2: 3, 3: 4, 4: 5}
>>> itemfilter(isvalid, d)
{2: 3}

See Also:
    keyfilter
    valfilter
    itemmap

---
## assoc
```python
from dicttoolz import assoc
```

Return a new dict with new key value pair

New dict has d[key] set to value. Does not modify the initial dictionary.

>>> assoc({'x': 1}, 'x', 2)
{'x': 2}
>>> assoc({'x': 1}, 'y', 3)   # doctest: +SKIP
{'x': 1, 'y': 3}

---
## dissoc
```python
from dicttoolz import dissoc
```

Return a new dict with the given key(s) removed.

New dict has d[key] deleted for each supplied key.
Does not modify the initial dictionary.

>>> dissoc({'x': 1, 'y': 2}, 'y')
{'x': 1}
>>> dissoc({'x': 1, 'y': 2}, 'y', 'x')
{}
>>> dissoc({'x': 1}, 'y') # Ignores missing keys
{'x': 1}

---
## assoc_in
```python
from dicttoolz import assoc_in
```

Return a new dict with new, potentially nested, key value pair

>>> purchase = {'name': 'Alice',
...             'order': {'items': ['Apple', 'Orange'],
...                       'costs': [0.50, 1.25]},
...             'credit card': '5555-1234-1234-1234'}
>>> assoc_in(purchase, ['order', 'costs'], [0.25, 1.00]) # doctest: +SKIP
{'credit card': '5555-1234-1234-1234',
 'name': 'Alice',
 'order': {'costs': [0.25, 1.00], 'items': ['Apple', 'Orange']}}

---
## update_in
```python
from dicttoolz import update_in
```

Update value in a (potentially) nested dictionary

inputs:
d - dictionary on which to operate
keys - list or tuple giving the location of the value to be changed in d
func - function to operate on that value

If keys == [k0,..,kX] and d[k0]..[kX] == v, update_in returns a copy of the
original dictionary with v replaced by func(v), but does not mutate the
original dictionary.

If k0 is not a key in d, update_in creates nested dictionaries to the depth
specified by the keys, with the innermost value set to func(default).

>>> inc = lambda x: x + 1
>>> update_in({'a': 0}, ['a'], inc)
{'a': 1}

>>> transaction = {'name': 'Alice',
...                'purchase': {'items': ['Apple', 'Orange'],
...                             'costs': [0.50, 1.25]},
...                'credit card': '5555-1234-1234-1234'}
>>> update_in(transaction, ['purchase', 'costs'], sum) # doctest: +SKIP
{'credit card': '5555-1234-1234-1234',
 'name': 'Alice',
 'purchase': {'costs': 1.75, 'items': ['Apple', 'Orange']}}

>>> # updating a value when k0 is not in d
>>> update_in({}, [1, 2, 3], str, default="bar")
{1: {2: {3: 'bar'}}}
>>> update_in({1: 'foo'}, [2, 3, 4], inc, 0)
{1: 'foo', 2: {3: {4: 1}}}

---
## get_in
```python
from dicttoolz import get_in
```

Returns coll[i0][i1]...[iX] where [i0, i1, ..., iX]==keys.

If coll[i0][i1]...[iX] cannot be found, returns ``default``, unless
``no_default`` is specified, then it raises KeyError or IndexError.

``get_in`` is a generalization of ``operator.getitem`` for nested data
structures such as dictionaries and lists.

>>> transaction = {'name': 'Alice',
...                'purchase': {'items': ['Apple', 'Orange'],
...                             'costs': [0.50, 1.25]},
...                'credit card': '5555-1234-1234-1234'}
>>> get_in(['purchase', 'items', 0], transaction)
'Apple'
>>> get_in(['name'], transaction)
'Alice'
>>> get_in(['purchase', 'total'], transaction)
>>> get_in(['purchase', 'items', 'apple'], transaction)
>>> get_in(['purchase', 'items', 10], transaction)
>>> get_in(['purchase', 'total'], transaction, 0)
0
>>> get_in(['y'], {}, no_default=True)
Traceback (most recent call last):
    ...
KeyError: 'y'

See Also:
    itertoolz.get
    operator.getitem

---
## __name__
```python
from functoolz import __name__
```



---
## identity
```python
from functoolz import identity
```

Identity function. Return x

>>> identity(3)
3

---
## apply
```python
from functoolz import apply
```

Applies a function and returns the results

>>> def double(x): return 2*x
>>> def inc(x):    return x + 1
>>> apply(double, 5)
10

>>> tuple(map(apply, [double, inc, double], [10, 500, 8000]))
(20, 501, 16000)

---
## thread_first
```python
from functoolz import thread_first
```

Thread value through a sequence of functions/forms

>>> def double(x): return 2*x
>>> def inc(x):    return x + 1
>>> thread_first(1, inc, double)
4

If the function expects more than one input you can specify those inputs
in a tuple.  The value is used as the first input.

>>> def add(x, y): return x + y
>>> def pow(x, y): return x**y
>>> thread_first(1, (add, 4), (pow, 2))  # pow(add(1, 4), 2)
25

So in general
    thread_first(x, f, (g, y, z))
expands to
    g(f(x), y, z)

See Also:
    thread_last

---
## thread_last
```python
from functoolz import thread_last
```

Thread value through a sequence of functions/forms

>>> def double(x): return 2*x
>>> def inc(x):    return x + 1
>>> thread_last(1, inc, double)
4

If the function expects more than one input you can specify those inputs
in a tuple.  The value is used as the last input.

>>> def add(x, y): return x + y
>>> def pow(x, y): return x**y
>>> thread_last(1, (add, 4), (pow, 2))  # pow(2, add(4, 1))
32

So in general
    thread_last(x, f, (g, y, z))
expands to
    g(y, z, f(x))

>>> def iseven(x):
...     return x % 2 == 0
>>> list(thread_last([1, 2, 3], (map, inc), (filter, iseven)))
[2, 4]

See Also:
    thread_first

---
## instanceproperty
```python
from functoolz import instanceproperty
```

Like @property, but returns ``classval`` when used as a class attribute

>>> class MyClass(object):
...     '''The class docstring'''
...     @instanceproperty(classval=__doc__)
...     def __doc__(self):
...         return 'An object docstring'
...     @instanceproperty
...     def val(self):
...         return 42
...
>>> MyClass.__doc__
'The class docstring'
>>> MyClass.val is None
True
>>> obj = MyClass()
>>> obj.__doc__
'An object docstring'
>>> obj.val
42

---
## InstanceProperty
```python
from functoolz import InstanceProperty
```

Like @property, but returns ``classval`` when used as a class attribute

Should not be used directly.  Use ``instanceproperty`` instead.

---
## curry
```python
from functoolz import curry
```

Curry a callable function

Enables partial application of arguments through calling a function with an
incomplete set of arguments.

>>> def mul(x, y):
...     return x * y
>>> mul = curry(mul)

>>> double = mul(2)
>>> double(10)
20

Also supports keyword arguments

>>> @curry                  # Can use curry as a decorator
... def f(x, y, a=10):
...     return a * (x + y)

>>> add = f(a=1)
>>> add(2, 3)
5

See Also:
    toolz.curried - namespace of curried functions
                    https://toolz.readthedocs.io/en/latest/curry.html

---
## _restore_curry
```python
from functoolz import _restore_curry
```



---
## memoize
```python
from functoolz import memoize
```

Cache a function's result for speedy future evaluation

Considerations:
    Trades memory for speed.
    Only use on pure functions.

>>> def add(x, y):  return x + y
>>> add = memoize(add)

Or use as a decorator

>>> @memoize
... def add(x, y):
...     return x + y

Use the ``cache`` keyword to provide a dict-like object as an initial cache

>>> @memoize(cache={(1, 2): 3})
... def add(x, y):
...     return x + y

Note that the above works as a decorator because ``memoize`` is curried.

It is also possible to provide a ``key(args, kwargs)`` function that
calculates keys used for the cache, which receives an ``args`` tuple and
``kwargs`` dict as input, and must return a hashable value.  However,
the default key function should be sufficient most of the time.

>>> # Use key function that ignores extraneous keyword arguments
>>> @memoize(key=lambda args, kwargs: args)
... def add(x, y, verbose=False):
...     if verbose:
...         print('Calculating %s + %s' % (x, y))
...     return x + y

---
## Compose
```python
from functoolz import Compose
```

A composition of functions

See Also:
    compose

---
## compose
```python
from functoolz import compose
```

Compose functions to operate in series.

Returns a function that applies other functions in sequence.

Functions are applied from right to left so that
``compose(f, g, h)(x, y)`` is the same as ``f(g(h(x, y)))``.

If no arguments are provided, the identity function (f(x) = x) is returned.

>>> inc = lambda i: i + 1
>>> compose(str, inc)(3)
'4'

See Also:
    compose_left
    pipe

---
## compose_left
```python
from functoolz import compose_left
```

Compose functions to operate in series.

Returns a function that applies other functions in sequence.

Functions are applied from left to right so that
``compose_left(f, g, h)(x, y)`` is the same as ``h(g(f(x, y)))``.

If no arguments are provided, the identity function (f(x) = x) is returned.

>>> inc = lambda i: i + 1
>>> compose_left(inc, str)(3)
'4'

See Also:
    compose
    pipe

---
## pipe
```python
from functoolz import pipe
```

Pipe a value through a sequence of functions

I.e. ``pipe(data, f, g, h)`` is equivalent to ``h(g(f(data)))``

We think of the value as progressing through a pipe of several
transformations, much like pipes in UNIX

``$ cat data | f | g | h``

>>> double = lambda i: 2 * i
>>> pipe(3, double, str)
'6'

See Also:
    compose
    compose_left
    thread_first
    thread_last

---
## complement
```python
from functoolz import complement
```

Convert a predicate function to its logical complement.

In other words, return a function that, for inputs that normally
yield True, yields False, and vice-versa.

>>> def iseven(n): return n % 2 == 0
>>> isodd = complement(iseven)
>>> iseven(2)
True
>>> isodd(2)
False

---
## juxt
```python
from functoolz import juxt
```

Creates a function that calls several functions with the same arguments

Takes several functions and returns a function that applies its arguments
to each of those functions then returns a tuple of the results.

Name comes from juxtaposition: the fact of two things being seen or placed
close together with contrasting effect.

>>> inc = lambda x: x + 1
>>> double = lambda x: x * 2
>>> juxt(inc, double)(10)
(11, 20)
>>> juxt([inc, double])(10)
(11, 20)

---
## do
```python
from functoolz import do
```

Runs ``func`` on ``x``, returns ``x``

Because the results of ``func`` are not returned, only the side
effects of ``func`` are relevant.

Logging functions can be made by composing ``do`` with a storage function
like ``list.append`` or ``file.write``

>>> from toolz import compose
>>> from toolz.curried import do

>>> log = []
>>> inc = lambda x: x + 1
>>> inc = compose(inc, do(log.append))
>>> inc(1)
2
>>> inc(11)
12
>>> log
[1, 11]

---
## flip
```python
from functoolz import flip
```

Call the function call with the arguments flipped

This function is curried.

>>> def div(a, b):
...     return a // b
...
>>> flip(div, 2, 6)
3
>>> div_by_two = flip(div, 2)
>>> div_by_two(4)
2

This is particularly useful for built in functions and functions defined
in C extensions that accept positional only arguments. For example:
isinstance, issubclass.

>>> data = [1, 'a', 'b', 2, 1.5, object(), 3]
>>> only_ints = list(filter(flip(isinstance, int), data))
>>> only_ints
[1, 2, 3]

---
## return_none
```python
from functoolz import return_none
```

Returns None.
    

---
## excepts
```python
from functoolz import excepts
```

A wrapper around a function to catch exceptions and
dispatch to a handler.

This is like a functional try/except block, in the same way that
ifexprs are functional if/else blocks.

Examples
--------
>>> excepting = excepts(
...     ValueError,
...     lambda a: [1, 2].index(a),
...     lambda _: -1,
... )
>>> excepting(1)
0
>>> excepting(3)
-1

Multiple exceptions and default except clause.

>>> excepting = excepts((IndexError, KeyError), lambda a: a[0])
>>> excepting([])
>>> excepting([1])
1
>>> excepting({})
>>> excepting({0: 1})
1

---
## _check_sigspec
```python
from functoolz import _check_sigspec
```



---
## num_required_args
```python
from functoolz import num_required_args
```



---
## has_varargs
```python
from functoolz import has_varargs
```



---
## has_keywords
```python
from functoolz import has_keywords
```



---
## is_valid_args
```python
from functoolz import is_valid_args
```



---
## is_partial_args
```python
from functoolz import is_partial_args
```



---
## is_arity
```python
from functoolz import is_arity
```

Does a function have only n positional arguments?

This function relies on introspection and does not call the function.
Returns None if validity can't be determined.

>>> def f(x):
...     return x
>>> is_arity(1, f)
True
>>> def g(x, y=1):
...     return x + y
>>> is_arity(1, g)
False

---
## evalform_front
```python
from functoolz import evalform_front
```



---
## evalform_back
```python
from functoolz import evalform_back
```



---
## __init__
```python
from functoolz import __init__
```



---
## __get__
```python
from functoolz import __get__
```



---
## __reduce__
```python
from functoolz import __reduce__
```



---
## func
```python
from functoolz import func
```



---
## __signature__
```python
from functoolz import __signature__
```



---
## args
```python
from functoolz import args
```



---
## keywords
```python
from functoolz import keywords
```



---
## func_name
```python
from functoolz import func_name
```



---
## __str__
```python
from functoolz import __str__
```



---
## __repr__
```python
from functoolz import __repr__
```



---
## __hash__
```python
from functoolz import __hash__
```



---
## __eq__
```python
from functoolz import __eq__
```



---
## __ne__
```python
from functoolz import __ne__
```



---
## __call__
```python
from functoolz import __call__
```



---
## _should_curry
```python
from functoolz import _should_curry
```



---
## bind
```python
from functoolz import bind
```



---
## call
```python
from functoolz import call
```



---
## memof
```python
from functoolz import memof
```



---
## __getstate__
```python
from functoolz import __getstate__
```



---
## __setstate__
```python
from functoolz import __setstate__
```



---
## __doc__
```python
from functoolz import __doc__
```



---
## composed_doc
```python
from functoolz import composed_doc
```

Generate a docstring for the composition of fs.
            

---
## key
```python
from functoolz import key
```



---
## raises
```python
from utils import raises
```



---
## __name__
```python
from recipes import __name__
```

Imported from the recipes section of the itertools documentation.

All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.

.. [1] http://docs.python.org/library/itertools.html#recipes

---
## countby
```python
from recipes import countby
```

Count elements of a collection by a key function

>>> countby(len, ['cat', 'mouse', 'dog'])
{3: 2, 5: 1}

>>> def iseven(x): return x % 2 == 0
>>> countby(iseven, [1, 2, 3])  # doctest:+SKIP
{True: 1, False: 2}

See Also:
    groupby

---
## partitionby
```python
from recipes import partitionby
```

Partition a sequence according to a function

Partition `s` into a sequence of lists such that, when traversing
`s`, every time the output of `func` changes a new list is started
and that and subsequent items are collected into that list.

>>> is_space = lambda c: c == " "
>>> list(partitionby(is_space, "I have space"))
[('I',), (' ',), ('h', 'a', 'v', 'e'), (' ',), ('s', 'p', 'a', 'c', 'e')]

>>> is_large = lambda x: x > 10
>>> list(partitionby(is_large, [1, 2, 1, 99, 88, 33, 99, -1, 5]))
[(1, 2, 1), (99, 88, 33, 99), (-1, 5)]

See also:
    partition
    groupby
    itertools.groupby

---
## __name__
```python
from _signatures import __name__
```

Internal module for better introspection of builtins.

The main functions are ``is_builtin_valid_args``, ``is_builtin_partial_args``,
and ``has_unknown_args``.  Other functions in this module support these three.

Notably, we create a ``signatures`` registry to enable introspection of
builtin functions in any Python version.  This includes builtins that
have more than one valid signature.  Currently, the registry includes
builtins from ``builtins``, ``functools``, ``itertools``, and ``operator``
modules.  More can be added as requested.  We don't guarantee full coverage.

Everything in this module should be regarded as implementation details.
Users should try to not use this module directly.

---
## num_pos_args
```python
from _signatures import num_pos_args
```

Return the number of positional arguments.  ``f(x, y=1)`` has 1

---
## get_exclude_keywords
```python
from _signatures import get_exclude_keywords
```

Return the names of position-only arguments if func has **kwargs

---
## signature_or_spec
```python
from _signatures import signature_or_spec
```



---
## expand_sig
```python
from _signatures import expand_sig
```

Convert the signature spec in ``module_info`` to add to ``signatures``

The input signature spec is one of:
    - ``lambda_func``
    - ``(num_position_args, lambda_func)``
    - ``(num_position_args, lambda_func, keyword_only_args)``

The output signature spec is:
    ``(num_position_args, lambda_func, keyword_exclude, sigspec)``

where ``keyword_exclude`` includes keyword only arguments and, if variadic
keywords is present, the names of position-only argument.  The latter is
included to support builtins such as ``partial(func, *args, **kwargs)``,
which allows ``func=`` to be used as a keyword even though it's the name
of a positional argument.

---
## create_signature_registry
```python
from _signatures import create_signature_registry
```



---
## check_valid
```python
from _signatures import check_valid
```

Like ``is_valid_args`` for the given signature spec

---
## _is_valid_args
```python
from _signatures import _is_valid_args
```

Like ``is_valid_args`` for builtins in our ``signatures`` registry

---
## check_partial
```python
from _signatures import check_partial
```

Like ``is_partial_args`` for the given signature spec

---
## _is_partial_args
```python
from _signatures import _is_partial_args
```

Like ``is_partial_args`` for builtins in our ``signatures`` registry

---
## check_arity
```python
from _signatures import check_arity
```



---
## _is_arity
```python
from _signatures import _is_arity
```



---
## check_varargs
```python
from _signatures import check_varargs
```



---
## _has_varargs
```python
from _signatures import _has_varargs
```



---
## check_keywords
```python
from _signatures import check_keywords
```



---
## _has_keywords
```python
from _signatures import _has_keywords
```



---
## check_required_args
```python
from _signatures import check_required_args
```



---
## _num_required_args
```python
from _signatures import _num_required_args
```



---
## _simple_escaping_wrapper
```python
from __init__ import _simple_escaping_wrapper
```



---
## Markup
```python
from __init__ import Markup
```

A string that is ready to be safely inserted into an HTML or XML
document, either because it was escaped or because it was marked
safe.

Passing an object to the constructor converts it to text and wraps
it to mark it safe without escaping. To escape the text, use the
:meth:`escape` class method instead.

>>> Markup("Hello, <em>World</em>!")
Markup('Hello, <em>World</em>!')
>>> Markup(42)
Markup('42')
>>> Markup.escape("Hello, <em>World</em>!")
Markup('Hello &lt;em&gt;World&lt;/em&gt;!')

This implements the ``__html__()`` interface that some frameworks
use. Passing an object that implements ``__html__()`` will wrap the
output of that method, marking it safe.

>>> class Foo:
...     def __html__(self):
...         return '<a href="/foo">foo</a>'
...
>>> Markup(Foo())
Markup('<a href="/foo">foo</a>')

This is a subclass of :class:`str`. It has the same methods, but
escapes their arguments and returns a ``Markup`` instance.

>>> Markup("<em>%s</em>") % ("foo & bar",)
Markup('<em>foo &amp; bar</em>')
>>> Markup("<em>Hello</em> ") + "<foo>"
Markup('<em>Hello</em> &lt;foo&gt;')

---
## EscapeFormatter
```python
from __init__ import EscapeFormatter
```



---
## _escape_argspec
```python
from __init__ import _escape_argspec
```

Helper for various string-wrapped functions.

---
## _MarkupEscapeHelper
```python
from __init__ import _MarkupEscapeHelper
```

Helper for :meth:`Markup.__mod__`.

---
## HasHTML
```python
from __init__ import HasHTML
```



---
## wrapped
```python
from __init__ import wrapped
```



---
## __new__
```python
from __init__ import __new__
```



---
## __html__
```python
from __init__ import __html__
```



---
## __radd__
```python
from __init__ import __radd__
```



---
## __mod__
```python
from __init__ import __mod__
```



---
## join
```python
from __init__ import join
```

Returns a new string by concatenating all of the elements of the input *array*, separated by commas or a specified *separator* string.

---
## split
```python
from __init__ import split
```

This method splits a sentence into words.  Default splitter splits input
at white spaces, which should be enough for most languages except CJK
languages.

---
## rsplit
```python
from __init__ import rsplit
```



---
## splitlines
```python
from __init__ import splitlines
```



---
## unescape
```python
from __init__ import unescape
```

Convert escaped markup back into a text string. This replaces
HTML entities with the characters they represent.

>>> Markup("Main &raquo; <em>About</em>").unescape()
'Main » <em>About</em>'

---
## striptags
```python
from __init__ import striptags
```

:meth:`unescape` the markup, remove tags, and normalize
whitespace to single spaces.

>>> Markup("Main &raquo;        <em>About</em>").striptags()
'Main » About'

---
## escape
```python
from __init__ import escape
```

Escape identifier.

---
## partition
```python
from __init__ import partition
```



---
## rpartition
```python
from __init__ import rpartition
```



---
## format
```python
from __init__ import format
```

Format ``tokens`` (an iterable of tokens) with the formatter ``formatter``
(a `Formatter` instance).

If ``outfile`` is given and a valid file object (an object with a
``write`` method), the result will be written to it, otherwise it
is returned as a string.

---
## format_map
```python
from __init__ import format_map
```



---
## __html_format__
```python
from __init__ import __html_format__
```



---
## format_field
```python
from __init__ import format_field
```



---
## __str__
```python
from __init__ import __str__
```



---
## __int__
```python
from __init__ import __int__
```



---
## __float__
```python
from __init__ import __float__
```



---
## __name__
```python
from _native import __name__
```



---
## escape
```python
from _native import escape
```

Replace the characters ``&``, ``<``, ``>``, ``'``, and ``"`` in
the string with HTML-safe sequences. Use this if you need to display
text that might contain such characters in HTML.

If the object has an ``__html__`` method, it is called and the
return value is assumed to already be safe for HTML.

:param s: An object to be converted to a string and escaped.
:return: A :class:`Markup` string with the escaped text.

---
## escape_silent
```python
from _native import escape_silent
```

Like :func:`escape` but treats ``None`` as the empty string.
Useful with optional values, as otherwise you get the string
``'None'`` when the value is ``None``.

>>> escape(None)
Markup('None')
>>> escape_silent(None)
Markup('')

---
## soft_str
```python
from _native import soft_str
```

Convert an object to a string if it isn't already. This preserves
a :class:`Markup` string rather than converting it back to a basic
string, so it will still be marked as safe and won't be escaped
again.

>>> value = escape("<User 1>")
>>> value
Markup('&lt;User 1&gt;')
>>> escape(str(value))
Markup('&amp;lt;User 1&amp;gt;')
>>> escape(soft_str(value))
Markup('&lt;User 1&gt;')

---
## __name__
```python
from _readers import __name__
```



---
## _obsolete_line_fold
```python
from _readers import _obsolete_line_fold
```



---
## _decode_header_lines
```python
from _readers import _decode_header_lines
```



---
## maybe_read_from_IDLE_client
```python
from _readers import maybe_read_from_IDLE_client
```



---
## maybe_read_from_SEND_RESPONSE_server
```python
from _readers import maybe_read_from_SEND_RESPONSE_server
```



---
## ContentLengthReader
```python
from _readers import ContentLengthReader
```



---
## ChunkedReader
```python
from _readers import ChunkedReader
```



---
## Http10Reader
```python
from _readers import Http10Reader
```



---
## expect_nothing
```python
from _readers import expect_nothing
```



---
## __init__
```python
from _readers import __init__
```



---
## __call__
```python
from _readers import __call__
```



---
## read_eof
```python
from _readers import read_eof
```



---
## __name__
```python
from _receivebuffer import __name__
```



---
## ReceiveBuffer
```python
from _receivebuffer import ReceiveBuffer
```



---
## __init__
```python
from _receivebuffer import __init__
```



---
## __iadd__
```python
from _receivebuffer import __iadd__
```



---
## __bool__
```python
from _receivebuffer import __bool__
```



---
## __len__
```python
from _receivebuffer import __len__
```



---
## __bytes__
```python
from _receivebuffer import __bytes__
```



---
## _extract
```python
from _receivebuffer import _extract
```



---
## maybe_extract_at_most
```python
from _receivebuffer import maybe_extract_at_most
```

Extract a fixed number of bytes from the buffer.

---
## maybe_extract_next_line
```python
from _receivebuffer import maybe_extract_next_line
```

Extract the first line, if it is completed in the buffer.

---
## maybe_extract_lines
```python
from _receivebuffer import maybe_extract_lines
```

Extract everything up to the first blank line, and return a list of lines.

---
## is_next_line_obviously_invalid_request_line
```python
from _receivebuffer import is_next_line_obviously_invalid_request_line
```



---
## __name__
```python
from _writers import __name__
```



---
## write_headers
```python
from _writers import write_headers
```



---
## write_request
```python
from _writers import write_request
```



---
## write_any_response
```python
from _writers import write_any_response
```



---
## BodyWriter
```python
from _writers import BodyWriter
```



---
## ContentLengthWriter
```python
from _writers import ContentLengthWriter
```



---
## ChunkedWriter
```python
from _writers import ChunkedWriter
```



---
## Http10Writer
```python
from _writers import Http10Writer
```



---
## __call__
```python
from _writers import __call__
```



---
## send_data
```python
from _writers import send_data
```



---
## send_eom
```python
from _writers import send_eom
```



---
## __init__
```python
from _writers import __init__
```



---
## __name__
```python
from _abnf import __name__
```



---
## __name__
```python
from _state import __name__
```



---
## CLIENT
```python
from _state import CLIENT
```



---
## SERVER
```python
from _state import SERVER
```



---
## IDLE
```python
from _state import IDLE
```



---
## SEND_RESPONSE
```python
from _state import SEND_RESPONSE
```



---
## SEND_BODY
```python
from _state import SEND_BODY
```



---
## DONE
```python
from _state import DONE
```



---
## MUST_CLOSE
```python
from _state import MUST_CLOSE
```



---
## CLOSED
```python
from _state import CLOSED
```



---
## ERROR
```python
from _state import ERROR
```



---
## MIGHT_SWITCH_PROTOCOL
```python
from _state import MIGHT_SWITCH_PROTOCOL
```



---
## SWITCHED_PROTOCOL
```python
from _state import SWITCHED_PROTOCOL
```



---
## _SWITCH_UPGRADE
```python
from _state import _SWITCH_UPGRADE
```



---
## _SWITCH_CONNECT
```python
from _state import _SWITCH_CONNECT
```



---
## ConnectionState
```python
from _state import ConnectionState
```



---
## __init__
```python
from _state import __init__
```



---
## process_error
```python
from _state import process_error
```



---
## process_keep_alive_disabled
```python
from _state import process_keep_alive_disabled
```



---
## process_client_switch_proposal
```python
from _state import process_client_switch_proposal
```



---
## process_event
```python
from _state import process_event
```



---
## _fire_event_triggered_transitions
```python
from _state import _fire_event_triggered_transitions
```



---
## _fire_state_triggered_transitions
```python
from _state import _fire_state_triggered_transitions
```



---
## start_next_cycle
```python
from _state import start_next_cycle
```



---
## __name__
```python
from _util import __name__
```



---
## ProtocolError
```python
from _util import ProtocolError
```

Exception indicating a violation of the HTTP/1.1 protocol.

This as an abstract base class, with two concrete base classes:
:exc:`LocalProtocolError`, which indicates that you tried to do something
that HTTP/1.1 says is illegal, and :exc:`RemoteProtocolError`, which
indicates that the remote peer tried to do something that HTTP/1.1 says is
illegal. See :ref:`error-handling` for details.

In addition to the normal :exc:`Exception` features, it has one attribute:

.. attribute:: error_status_hint

   This gives a suggestion as to what status code a server might use if
   this error occurred as part of a request.

   For a :exc:`RemoteProtocolError`, this is useful as a suggestion for
   how you might want to respond to a misbehaving peer, if you're
   implementing a server.

   For a :exc:`LocalProtocolError`, this can be taken as a suggestion for
   how your peer might have responded to *you* if h11 had allowed you to
   continue.

   The default is 400 Bad Request, a generic catch-all for protocol
   violations.

---
## LocalProtocolError
```python
from _util import LocalProtocolError
```



---
## RemoteProtocolError
```python
from _util import RemoteProtocolError
```



---
## validate
```python
from _util import validate
```



---
## Sentinel
```python
from _util import Sentinel
```



---
## bytesify
```python
from _util import bytesify
```



---
## __init__
```python
from _util import __init__
```



---
## _reraise_as_remote_protocol_error
```python
from _util import _reraise_as_remote_protocol_error
```



---
## __new__
```python
from _util import __new__
```



---
## __repr__
```python
from _util import __repr__
```



---
## __name__
```python
from _events import __name__
```



---
## Event
```python
from _events import Event
```

Base class for h11 events.

---
## Request
```python
from _events import Request
```

The beginning of an HTTP request.

Fields:

.. attribute:: method

   An HTTP method, e.g. ``b"GET"`` or ``b"POST"``. Always a byte
   string. :term:`Bytes-like objects <bytes-like object>` and native
   strings containing only ascii characters will be automatically
   converted to byte strings.

.. attribute:: target

   The target of an HTTP request, e.g. ``b"/index.html"``, or one of the
   more exotic formats described in `RFC 7320, section 5.3
   <https://tools.ietf.org/html/rfc7230#section-5.3>`_. Always a byte
   string. :term:`Bytes-like objects <bytes-like object>` and native
   strings containing only ascii characters will be automatically
   converted to byte strings.

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

---
## _ResponseBase
```python
from _events import _ResponseBase
```



---
## InformationalResponse
```python
from _events import InformationalResponse
```

An HTTP informational response.

Fields:

.. attribute:: status_code

   The status code of this response, as an integer. For an
   :class:`InformationalResponse`, this is always in the range [100,
   200).

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for
   details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

.. attribute:: reason

   The reason phrase of this response, as a byte string. For example:
   ``b"OK"``, or ``b"Not Found"``.

---
## Response
```python
from _events import Response
```

The beginning of an HTTP response.

Fields:

.. attribute:: status_code

   The status code of this response, as an integer. For an
   :class:`Response`, this is always in the range [200,
   1000).

.. attribute:: headers

   Request headers, represented as a list of (name, value) pairs. See
   :ref:`the header normalization rules <headers-format>` for details.

.. attribute:: http_version

   The HTTP protocol version, represented as a byte string like
   ``b"1.1"``. See :ref:`the HTTP version normalization rules
   <http_version-format>` for details.

.. attribute:: reason

   The reason phrase of this response, as a byte string. For example:
   ``b"OK"``, or ``b"Not Found"``.

---
## Data
```python
from _events import Data
```

Part of an HTTP message body.

Fields:

.. attribute:: data

   A :term:`bytes-like object` containing part of a message body. Or, if
   using the ``combine=False`` argument to :meth:`Connection.send`, then
   any object that your socket writing code knows what to do with, and for
   which calling :func:`len` returns the number of bytes that will be
   written -- see :ref:`sendfile` for details.

.. attribute:: chunk_start

   A marker that indicates whether this data object is from the start of a
   chunked transfer encoding chunk. This field is ignored when when a Data
   event is provided to :meth:`Connection.send`: it is only valid on
   events emitted from :meth:`Connection.next_event`. You probably
   shouldn't use this attribute at all; see
   :ref:`chunk-delimiters-are-bad` for details.

.. attribute:: chunk_end

   A marker that indicates whether this data object is the last for a
   given chunked transfer encoding chunk. This field is ignored when when
   a Data event is provided to :meth:`Connection.send`: it is only valid
   on events emitted from :meth:`Connection.next_event`. You probably
   shouldn't use this attribute at all; see
   :ref:`chunk-delimiters-are-bad` for details.

---
## EndOfMessage
```python
from _events import EndOfMessage
```

The end of an HTTP message.

Fields:

.. attribute:: headers

   Default value: ``[]``

   Any trailing headers attached to this message, represented as a list of
   (name, value) pairs. See :ref:`the header normalization rules
   <headers-format>` for details.

   Must be empty unless ``Transfer-Encoding: chunked`` is in use.

---
## ConnectionClosed
```python
from _events import ConnectionClosed
```

This event indicates that the sender has closed their outgoing
connection.

Note that this does not necessarily mean that they can't *receive* further
data, because TCP connections are composed to two one-way channels which
can be closed independently. See :ref:`closing` for details.

No fields.

---
## __init__
```python
from _events import __init__
```



---
## __post_init__
```python
from _events import __post_init__
```



---
## __name__
```python
from _headers import __name__
```

Contains utilities to handle headers to send in calls to Huggingface Hub.

---
## Headers
```python
from _headers import Headers
```

A list-like interface that allows iterating over headers as byte-pairs
of (lowercased-name, value).

Internally we actually store the representation as three-tuples,
including both the raw original casing, in order to preserve casing
over-the-wire, and the lowercased name, for case-insensitive comparisions.

r = Request(
    method="GET",
    target="/",
    headers=[("Host", "example.org"), ("Connection", "keep-alive")],
    http_version="1.1",
)
assert r.headers == [
    (b"host", b"example.org"),
    (b"connection", b"keep-alive")
]
assert r.headers.raw_items() == [
    (b"Host", b"example.org"),
    (b"Connection", b"keep-alive")
]

---
## normalize_and_validate
```python
from _headers import normalize_and_validate
```



---
## get_comma_header
```python
from _headers import get_comma_header
```



---
## set_comma_header
```python
from _headers import set_comma_header
```



---
## has_expect_100_continue
```python
from _headers import has_expect_100_continue
```



---
## __init__
```python
from _headers import __init__
```



---
## __bool__
```python
from _headers import __bool__
```



---
## __eq__
```python
from _headers import __eq__
```



---
## __len__
```python
from _headers import __len__
```



---
## __repr__
```python
from _headers import __repr__
```



---
## __getitem__
```python
from _headers import __getitem__
```



---
## raw_items
```python
from _headers import raw_items
```



---
## __name__
```python
from _connection import __name__
```



---
## NEED_DATA
```python
from _connection import NEED_DATA
```



---
## PAUSED
```python
from _connection import PAUSED
```



---
## _keep_alive
```python
from _connection import _keep_alive
```



---
## _body_framing
```python
from _connection import _body_framing
```



---
## Connection
```python
from _connection import Connection
```

An object encapsulating the state of an HTTP connection.

Args:
    our_role: If you're implementing a client, pass :data:`h11.CLIENT`. If
        you're implementing a server, pass :data:`h11.SERVER`.

    max_incomplete_event_size (int):
        The maximum number of bytes we're willing to buffer of an
        incomplete event. In practice this mostly sets a limit on the
        maximum size of the request/response line + headers. If this is
        exceeded, then :meth:`next_event` will raise
        :exc:`RemoteProtocolError`.

---
## __init__
```python
from _connection import __init__
```



---
## states
```python
from _connection import states
```

A dictionary like::

   {CLIENT: <client state>, SERVER: <server state>}

See :ref:`state-machine` for details.

---
## our_state
```python
from _connection import our_state
```

The current state of whichever role we are playing. See
:ref:`state-machine` for details.

---
## their_state
```python
from _connection import their_state
```

The current state of whichever role we are NOT playing. See
:ref:`state-machine` for details.

---
## they_are_waiting_for_100_continue
```python
from _connection import they_are_waiting_for_100_continue
```



---
## start_next_cycle
```python
from _connection import start_next_cycle
```

Attempt to reset our connection state for a new request/response
cycle.

If both client and server are in :data:`DONE` state, then resets them
both to :data:`IDLE` state in preparation for a new request/response
cycle on this same connection. Otherwise, raises a
:exc:`LocalProtocolError`.

See :ref:`keepalive-and-pipelining`.

---
## _process_error
```python
from _connection import _process_error
```



---
## _server_switch_event
```python
from _connection import _server_switch_event
```



---
## _process_event
```python
from _connection import _process_event
```



---
## _get_io_object
```python
from _connection import _get_io_object
```



---
## _respond_to_state_changes
```python
from _connection import _respond_to_state_changes
```



---
## trailing_data
```python
from _connection import trailing_data
```

Data that has been received, but not yet processed, represented as
a tuple with two elements, where the first is a byte-string containing
the unprocessed data itself, and the second is a bool that is True if
the receive connection was closed.

See :ref:`switching-protocols` for discussion of why you'd want this.

---
## receive_data
```python
from _connection import receive_data
```

Add data to our internal receive buffer.

This does not actually do any processing on the data, just stores
it. To trigger processing, you have to call :meth:`next_event`.

Args:
    data (:term:`bytes-like object`):
        The new data that was just received.

        Special case: If *data* is an empty byte-string like ``b""``,
        then this indicates that the remote side has closed the
        connection (end of file). Normally this is convenient, because
        standard Python APIs like :meth:`file.read` or
        :meth:`socket.recv` use ``b""`` to indicate end-of-file, while
        other failures to read are indicated using other mechanisms
        like raising :exc:`TimeoutError`. When using such an API you
        can just blindly pass through whatever you get from ``read``
        to :meth:`receive_data`, and everything will work.

        But, if you have an API where reading an empty string is a
        valid non-EOF condition, then you need to be aware of this and
        make sure to check for such strings and avoid passing them to
        :meth:`receive_data`.

Returns:
    Nothing, but after calling this you should call :meth:`next_event`
    to parse the newly received data.

Raises:
    RuntimeError:
        Raised if you pass an empty *data*, indicating EOF, and then
        pass a non-empty *data*, indicating more data that somehow
        arrived after the EOF.

        (Calling ``receive_data(b"")`` multiple times is fine,
        and equivalent to calling it once.)

---
## _extract_next_receive_event
```python
from _connection import _extract_next_receive_event
```



---
## next_event
```python
from _connection import next_event
```

Parse the next event out of our receive buffer, update our internal
state, and return it.

This is a mutating operation -- think of it like calling :func:`next`
on an iterator.

Returns:
    : One of three things:

    1) An event object -- see :ref:`events`.

    2) The special constant :data:`NEED_DATA`, which indicates that
       you need to read more data from your socket and pass it to
       :meth:`receive_data` before this method will be able to return
       any more events.

    3) The special constant :data:`PAUSED`, which indicates that we
       are not in a state where we can process incoming data (usually
       because the peer has finished their part of the current
       request/response cycle, and you have not yet called
       :meth:`start_next_cycle`). See :ref:`flow-control` for details.

Raises:
    RemoteProtocolError:
        The peer has misbehaved. You should close the connection
        (possibly after sending some kind of 4xx response).

Once this method returns :class:`ConnectionClosed` once, then all
subsequent calls will also return :class:`ConnectionClosed`.

If this method raises any exception besides :exc:`RemoteProtocolError`
then that's a bug -- if it happens please file a bug report!

If this method raises any exception then it also sets
:attr:`Connection.their_state` to :data:`ERROR` -- see
:ref:`error-handling` for discussion.

---
## send
```python
from _connection import send
```

Convert a high-level event into bytes that can be sent to the peer,
while updating our internal state machine.

Args:
    event: The :ref:`event <events>` to send.

Returns:
    If ``type(event) is ConnectionClosed``, then returns
    ``None``. Otherwise, returns a :term:`bytes-like object`.

Raises:
    LocalProtocolError:
        Sending this event at this time would violate our
        understanding of the HTTP/1.1 protocol.

If this method raises any exception then it also sets
:attr:`Connection.our_state` to :data:`ERROR` -- see
:ref:`error-handling` for discussion.

---
## send_with_data_passthrough
```python
from _connection import send_with_data_passthrough
```

Identical to :meth:`send`, except that in situations where
:meth:`send` returns a single :term:`bytes-like object`, this instead
returns a list of them -- and when sending a :class:`Data` event, this
list is guaranteed to contain the exact object you passed in as
:attr:`Data.data`. See :ref:`sendfile` for discussion.

---
## send_failed
```python
from _connection import send_failed
```

Notify the state machine that we failed to send the data it gave
us.

This causes :attr:`Connection.our_state` to immediately become
:data:`ERROR` -- see :ref:`error-handling` for discussion.

---
## _clean_up_response_headers_for_sending
```python
from _connection import _clean_up_response_headers_for_sending
```



---
## __name__
```python
from build import __name__
```



---
## get_extension
```python
from build import get_extension
```



---
## setup_mypycify_vars
```python
from build import setup_mypycify_vars
```

Rewrite a bunch of config vars in pretty dubious ways.

---
## fail
```python
from build import fail
```



---
## emit_messages
```python
from build import emit_messages
```



---
## get_mypy_config
```python
from build import get_mypy_config
```

Construct mypy BuildSources and Options from file and options lists

---
## generate_c_extension_shim
```python
from build import generate_c_extension_shim
```

Create a C extension shim with a passthrough PyInit function.

Arguments:
    full_module_name: the dotted full module name
    module_name: the final component of the module name
    dir_name: the directory to place source code
    group_name: the name of the group

---
## group_name
```python
from build import group_name
```

Produce a probably unique name for a group from a list of module names.

---
## include_dir
```python
from build import include_dir
```

Find the path of the lib-rt dir that needs to be included

---
## generate_c
```python
from build import generate_c
```

Drive the actual core compilation step.

The groups argument describes how modules are assigned to C
extension modules. See the comments on the Groups type in
mypyc.emitmodule for details.

Returns the C source code and (for debugging) the pretty printed IR.

---
## build_using_shared_lib
```python
from build import build_using_shared_lib
```

Produce the list of extension modules when a shared library is needed.

This creates one shared library extension module that all of the
others import and then one shim extension module for each
module in the build, that simply calls an initialization function
in the shared library.

The shared library (which lib_name is the name of) is a python
extension module that exports the real initialization functions in
Capsules stored in module attributes.

---
## build_single_module
```python
from build import build_single_module
```

Produce the list of extension modules for a standalone extension.

This contains just one module, since there is no need for a shared module.

---
## write_file
```python
from build import write_file
```

Write data into a file.

If the file already exists and has the same contents we
want to write, skip writing so as to preserve the mtime
and avoid triggering recompilation.

---
## construct_groups
```python
from build import construct_groups
```

Compute Groups given the input source list and separate configs.

separate is the user-specified configuration for how to assign
modules to compilation groups (see mypycify docstring for details).

This takes that and expands it into our internal representation of
group configuration, documented in mypyc.emitmodule's definition
of Group.

---
## get_header_deps
```python
from build import get_header_deps
```

Find all the headers used by a group of cfiles.

We do this by just regexping the source, which is a bit simpler than
properly plumbing the data through.

Arguments:
    cfiles: A list of (file name, file contents) pairs.

---
## mypyc_build
```python
from build import mypyc_build
```

Do the front and middle end of mypyc building, producing and writing out C source.

---
## mypycify
```python
from build import mypycify
```

Main entry point to building using mypyc.

This produces a list of Extension objects that should be passed as the
ext_modules parameter to setup.

Arguments:
    paths: A list of file paths to build. It may also contain mypy options.
    only_compile_paths: If not None, an iterable of paths that are to be
                        the only modules compiled, even if other modules
                        appear in the mypy command line given to paths.
                        (These modules must still be passed to paths.)

    verbose: Should mypyc be more verbose. Defaults to false.

    opt_level: The optimization level, as a string. Defaults to '3' (meaning '-O3').
    debug_level: The debug level, as a string. Defaults to '1' (meaning '-g1').
    strip_asserts: Should asserts be stripped from the generated code.

    multi_file: Should each Python module be compiled into its own C source file.
                This can reduce compile time and memory requirements at the likely
                cost of runtime performance of compiled code. Defaults to false.
    separate: Should compiled modules be placed in separate extension modules.
              If False, all modules are placed in a single shared library.
              If True, every module is placed in its own library.
              Otherwise separate should be a list of
              (file name list, optional shared library name) pairs specifying
              groups of files that should be placed in the same shared library
              (while all other modules will be placed in its own library).

              Each group can be compiled independently, which can
              speed up compilation, but calls between groups can
              be slower than calls within a group and can't be
              inlined.
    target_dir: The directory to write C output files. Defaults to 'build'.
    include_runtime_files: If not None, whether the mypyc runtime library
                           should be directly #include'd instead of linked
                           separately in order to reduce compiler invocations.
                           Defaults to False in multi_file mode, True otherwise.

---
## __name__
```python
from subtype import __name__
```

Subtype check for RTypes.

---
## is_subtype
```python
from subtype import is_subtype
```



---
## SubtypeVisitor
```python
from subtype import SubtypeVisitor
```

Is left a subtype of right?

A few special cases such as right being 'object' are handled in
is_subtype and don't need to be covered here.

---
## __init__
```python
from subtype import __init__
```



---
## visit_rinstance
```python
from subtype import visit_rinstance
```



---
## visit_runion
```python
from subtype import visit_runion
```



---
## visit_rprimitive
```python
from subtype import visit_rprimitive
```



---
## visit_rtuple
```python
from subtype import visit_rtuple
```



---
## visit_rstruct
```python
from subtype import visit_rstruct
```



---
## visit_rarray
```python
from subtype import visit_rarray
```



---
## visit_rvoid
```python
from subtype import visit_rvoid
```



---
## __name__
```python
from options import __name__
```



---
## CompilerOptions
```python
from options import CompilerOptions
```



---
## __init__
```python
from options import __init__
```



---
## __name__
```python
from crash import __name__
```



---
## catch_errors
```python
from crash import catch_errors
```



---
## crash_report
```python
from crash import crash_report
```



---
## __name__
```python
from common import __name__
```



---
## shared_lib_name
```python
from common import shared_lib_name
```

Given a group name, return the actual name of its extension module.

(This just adds a suffix to the final component.)

---
## short_name
```python
from common import short_name
```



---
## use_vectorcall
```python
from common import use_vectorcall
```



---
## use_method_vectorcall
```python
from common import use_method_vectorcall
```



---
## get_id_from_name
```python
from common import get_id_from_name
```

Create a unique id for a function.

This creates an id that is unique for any given function definition, so that it can be used as
a dictionary key. This is usually the fullname of the function, but this is different in that
it handles the case where the function is named '_', in which case multiple different functions
could have the same name.

---
## short_id_from_name
```python
from common import short_id_from_name
```



---
## bitmap_name
```python
from common import bitmap_name
```



---
## __name__
```python
from errors import __name__
```



---
## Errors
```python
from errors import Errors
```

Container for compile errors.

This class generates and keeps tracks of compile errors and the
current error context (nested imports).

---
## __init__
```python
from errors import __init__
```



---
## error
```python
from errors import error
```



---
## note
```python
from errors import note
```



---
## warning
```python
from errors import warning
```



---
## new_messages
```python
from errors import new_messages
```

Return a string list of new error messages.

Use a form suitable for displaying to the user.
Errors from different files are ordered based on the order in which
they first generated an error.

---
## flush_errors
```python
from errors import flush_errors
```



---
## __name__
```python
from sametype import __name__
```

Same type check for RTypes.

---
## is_same_type
```python
from sametype import is_same_type
```



---
## is_same_signature
```python
from sametype import is_same_signature
```



---
## is_same_method_signature
```python
from sametype import is_same_method_signature
```



---
## SameTypeVisitor
```python
from sametype import SameTypeVisitor
```



---
## __init__
```python
from sametype import __init__
```



---
## visit_rinstance
```python
from sametype import visit_rinstance
```



---
## visit_runion
```python
from sametype import visit_runion
```



---
## visit_rprimitive
```python
from sametype import visit_rprimitive
```



---
## visit_rtuple
```python
from sametype import visit_rtuple
```



---
## visit_rstruct
```python
from sametype import visit_rstruct
```



---
## visit_rarray
```python
from sametype import visit_rarray
```



---
## visit_rvoid
```python
from sametype import visit_rvoid
```



---
## __name__
```python
from namegen import __name__
```



---
## NameGenerator
```python
from namegen import NameGenerator
```

Utility for generating distinct C names from Python names.

Since C names can't use '.' (or unicode), some care is required to
make C names generated from Python names unique. Also, we want to
avoid generating overly long C names since they make the generated
code harder to read.

Note that we don't restrict ourselves to a 32-character distinguishing
prefix guaranteed by the C standard since all the compilers we care
about at the moment support longer names without issues.

For names that are exported in a shared library (not static) use
exported_name() instead.

Summary of the approach:

* Generate a unique name prefix from suffix of fully-qualified
  module name used for static names. If only compiling a single
  module, this can be empty. For example, if the modules are
  'foo.bar' and 'foo.baz', the prefixes can be 'bar_' and 'baz_',
  respectively. If the modules are 'bar.foo' and 'baz.foo', the
  prefixes will be 'bar_foo_' and 'baz_foo_'.

* Replace '.' in the Python name with '___' in the C name. (And
  replace the unlikely but possible '___' with '___3_'. This
  collides '___' with '.3_', but this is OK because names
  may not start with a digit.)

The generated should be internal to a build and thus the mapping is
arbitrary. Just generating names '1', '2', ... would be correct,
though not very usable.

---
## exported_name
```python
from namegen import exported_name
```

Return a C name usable for an exported definition.

This is like private_name(), but the output only depends on the
'fullname' argument, so the names are distinct across multiple
builds.

---
## make_module_translation_map
```python
from namegen import make_module_translation_map
```



---
## candidate_suffixes
```python
from namegen import candidate_suffixes
```



---
## __init__
```python
from namegen import __init__
```

Initialize with a list of modules in each compilation group.

The names of modules are used to shorten names referring to
modules, for convenience. Arbitrary module
names are supported for generated names, but uncompiled modules
will use long names.

---
## private_name
```python
from namegen import private_name
```

Return a C name usable for a static definition.

Return a distinct result for each (module, partial_name) pair.

The caller should add a suitable prefix to the name to avoid
conflicts with other C names. Only ensure that the results of
this function are unique, not that they aren't overlapping with
arbitrary names.

If a name is not specific to any module, the module argument can
be an empty string.

---
## __name__
```python
from rt_subtype import __name__
```

'Runtime subtype' check for RTypes.

A type S is a runtime subtype of T if a value of type S can be used at runtime
when a value of type T is expected without requiring any runtime conversions.

For boxed types, runtime subtyping is the same as regular subtyping.
Unboxed subtypes, on the other hand, are not runtime subtypes of object
(since they require boxing to be used as an object), but short ints
are runtime subtypes of int.

Subtyping is used to determine whether an object can be in a
particular place and runtime subtyping is used to determine whether a
coercion is necessary first.

---
## is_runtime_subtype
```python
from rt_subtype import is_runtime_subtype
```



---
## RTSubtypeVisitor
```python
from rt_subtype import RTSubtypeVisitor
```

Is left a runtime subtype of right?

A few special cases such as right being 'object' are handled in
is_runtime_subtype and don't need to be covered here.

---
## __init__
```python
from rt_subtype import __init__
```



---
## visit_rinstance
```python
from rt_subtype import visit_rinstance
```



---
## visit_runion
```python
from rt_subtype import visit_runion
```



---
## visit_rprimitive
```python
from rt_subtype import visit_rprimitive
```



---
## visit_rtuple
```python
from rt_subtype import visit_rtuple
```



---
## visit_rstruct
```python
from rt_subtype import visit_rstruct
```



---
## visit_rarray
```python
from rt_subtype import visit_rarray
```



---
## visit_rvoid
```python
from rt_subtype import visit_rvoid
```



---
## __name__
```python
from repocard_data import __name__
```



---
## EvalResult
```python
from repocard_data import EvalResult
```

Flattened representation of individual evaluation results found in model-index of Model Cards.

For more information on the model-index spec, see https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1.

Args:
    task_type (`str`):
        The task identifier. Example: "image-classification".
    dataset_type (`str`):
        The dataset identifier. Example: "common_voice". Use dataset id from https://hf.co/datasets.
    dataset_name (`str`):
        A pretty name for the dataset. Example: "Common Voice (French)".
    metric_type (`str`):
        The metric identifier. Example: "wer". Use metric id from https://hf.co/metrics.
    metric_value (`Any`):
        The metric value. Example: 0.9 or "20.0 ± 1.2".
    task_name (`str`, *optional*):
        A pretty name for the task. Example: "Speech Recognition".
    dataset_config (`str`, *optional*):
        The name of the dataset configuration used in `load_dataset()`.
        Example: fr in `load_dataset("common_voice", "fr")`. See the `datasets` docs for more info:
        https://hf.co/docs/datasets/package_reference/loading_methods#datasets.load_dataset.name
    dataset_split (`str`, *optional*):
        The split used in `load_dataset()`. Example: "test".
    dataset_revision (`str`, *optional*):
        The revision (AKA Git Sha) of the dataset used in `load_dataset()`.
        Example: 5503434ddd753f426f4b38109466949a1217c2bb
    dataset_args (`Dict[str, Any]`, *optional*):
        The arguments passed during `Metric.compute()`. Example for `bleu`: `{"max_order": 4}`
    metric_name (`str`, *optional*):
        A pretty name for the metric. Example: "Test WER".
    metric_config (`str`, *optional*):
        The name of the metric configuration used in `load_metric()`.
        Example: bleurt-large-512 in `load_metric("bleurt", "bleurt-large-512")`.
        See the `datasets` docs for more info: https://huggingface.co/docs/datasets/v2.1.0/en/loading#load-configurations
    metric_args (`Dict[str, Any]`, *optional*):
        The arguments passed during `Metric.compute()`. Example for `bleu`: max_order: 4
    verified (`bool`, *optional*):
        Indicates whether the metrics originate from Hugging Face's [evaluation service](https://huggingface.co/spaces/autoevaluate/model-evaluator) or not. Automatically computed by Hugging Face, do not set.
    verify_token (`str`, *optional*):
        A JSON Web Token that is used to verify whether the metrics originate from Hugging Face's [evaluation service](https://huggingface.co/spaces/autoevaluate/model-evaluator) or not.
    source_name (`str`, *optional*):
        The name of the source of the evaluation result. Example: "Open LLM Leaderboard".
    source_url (`str`, *optional*):
        The URL of the source of the evaluation result. Example: "https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard".

---
## CardData
```python
from repocard_data import CardData
```

Structure containing metadata from a RepoCard.

[`CardData`] is the parent class of [`ModelCardData`] and [`DatasetCardData`].

Metadata can be exported as a dictionary or YAML. Export can be customized to alter the representation of the data
(example: flatten evaluation results). `CardData` behaves as a dictionary (can get, pop, set values) but do not
inherit from `dict` to allow this export step.

---
## ModelCardData
```python
from repocard_data import ModelCardData
```

Model Card Metadata that is used by Hugging Face Hub when included at the top of your README.md

Args:
    base_model (`str` or `List[str]`, *optional*):
        The identifier of the base model from which the model derives. This is applicable for example if your model is a
        fine-tune or adapter of an existing model. The value must be the ID of a model on the Hub (or a list of IDs
        if your model derives from multiple models). Defaults to None.
    datasets (`List[str]`, *optional*):
        List of datasets that were used to train this model. Should be a dataset ID
        found on https://hf.co/datasets. Defaults to None.
    eval_results (`Union[List[EvalResult], EvalResult]`, *optional*):
        List of `huggingface_hub.EvalResult` that define evaluation results of the model. If provided,
        `model_name` is used to as a name on PapersWithCode's leaderboards. Defaults to `None`.
    language (`Union[str, List[str]]`, *optional*):
        Language of model's training data or metadata. It must be an ISO 639-1, 639-2 or
        639-3 code (two/three letters), or a special value like "code", "multilingual". Defaults to `None`.
    library_name (`str`, *optional*):
        Name of library used by this model. Example: keras or any library from
        https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/model-libraries.ts.
        Defaults to None.
    license (`str`, *optional*):
        License of this model. Example: apache-2.0 or any license from
        https://huggingface.co/docs/hub/repositories-licenses. Defaults to None.
    license_name (`str`, *optional*):
        Name of the license of this model. Defaults to None. To be used in conjunction with `license_link`.
        Common licenses (Apache-2.0, MIT, CC-BY-SA-4.0) do not need a name. In that case, use `license` instead.
    license_link (`str`, *optional*):
        Link to the license of this model. Defaults to None. To be used in conjunction with `license_name`.
        Common licenses (Apache-2.0, MIT, CC-BY-SA-4.0) do not need a link. In that case, use `license` instead.
    metrics (`List[str]`, *optional*):
        List of metrics used to evaluate this model. Should be a metric name that can be found
        at https://hf.co/metrics. Example: 'accuracy'. Defaults to None.
    model_name (`str`, *optional*):
        A name for this model. It is used along with
        `eval_results` to construct the `model-index` within the card's metadata. The name
        you supply here is what will be used on PapersWithCode's leaderboards. If None is provided
        then the repo name is used as a default. Defaults to None.
    tags (`List[str]`, *optional*):
        List of tags to add to your model that can be used when filtering on the Hugging
        Face Hub. Defaults to None.
    ignore_metadata_errors (`str`):
        If True, errors while parsing the metadata section will be ignored. Some information might be lost during
        the process. Use it at your own risk.
    kwargs (`dict`, *optional*):
        Additional metadata that will be added to the model card. Defaults to None.

Example:
    ```python
    >>> from huggingface_hub import ModelCardData
    >>> card_data = ModelCardData(
    ...     language="en",
    ...     license="mit",
    ...     library_name="timm",
    ...     tags=['image-classification', 'resnet'],
    ... )
    >>> card_data.to_dict()
    {'language': 'en', 'license': 'mit', 'library_name': 'timm', 'tags': ['image-classification', 'resnet']}

    ```

---
## DatasetCardData
```python
from repocard_data import DatasetCardData
```

Dataset Card Metadata that is used by Hugging Face Hub when included at the top of your README.md

Args:
    language (`List[str]`, *optional*):
        Language of dataset's data or metadata. It must be an ISO 639-1, 639-2 or
        639-3 code (two/three letters), or a special value like "code", "multilingual".
    license (`Union[str, List[str]]`, *optional*):
        License(s) of this dataset. Example: apache-2.0 or any license from
        https://huggingface.co/docs/hub/repositories-licenses.
    annotations_creators (`Union[str, List[str]]`, *optional*):
        How the annotations for the dataset were created.
        Options are: 'found', 'crowdsourced', 'expert-generated', 'machine-generated', 'no-annotation', 'other'.
    language_creators (`Union[str, List[str]]`, *optional*):
        How the text-based data in the dataset was created.
        Options are: 'found', 'crowdsourced', 'expert-generated', 'machine-generated', 'other'
    multilinguality (`Union[str, List[str]]`, *optional*):
        Whether the dataset is multilingual.
        Options are: 'monolingual', 'multilingual', 'translation', 'other'.
    size_categories (`Union[str, List[str]]`, *optional*):
        The number of examples in the dataset. Options are: 'n<1K', '1K<n<10K', '10K<n<100K',
        '100K<n<1M', '1M<n<10M', '10M<n<100M', '100M<n<1B', '1B<n<10B', '10B<n<100B', '100B<n<1T', 'n>1T', and 'other'.
    source_datasets (`List[str]]`, *optional*):
        Indicates whether the dataset is an original dataset or extended from another existing dataset.
        Options are: 'original' and 'extended'.
    task_categories (`Union[str, List[str]]`, *optional*):
        What categories of task does the dataset support?
    task_ids (`Union[str, List[str]]`, *optional*):
        What specific tasks does the dataset support?
    paperswithcode_id (`str`, *optional*):
        ID of the dataset on PapersWithCode.
    pretty_name (`str`, *optional*):
        A more human-readable name for the dataset. (ex. "Cats vs. Dogs")
    train_eval_index (`Dict`, *optional*):
        A dictionary that describes the necessary spec for doing evaluation on the Hub.
        If not provided, it will be gathered from the 'train-eval-index' key of the kwargs.
    config_names (`Union[str, List[str]]`, *optional*):
        A list of the available dataset configs for the dataset.

---
## SpaceCardData
```python
from repocard_data import SpaceCardData
```

Space Card Metadata that is used by Hugging Face Hub when included at the top of your README.md

To get an exhaustive reference of Spaces configuration, please visit https://huggingface.co/docs/hub/spaces-config-reference#spaces-configuration-reference.

Args:
    title (`str`, *optional*)
        Title of the Space.
    sdk (`str`, *optional*)
        SDK of the Space (one of `gradio`, `streamlit`, `docker`, or `static`).
    sdk_version (`str`, *optional*)
        Version of the used SDK (if Gradio/Streamlit sdk).
    python_version (`str`, *optional*)
        Python version used in the Space (if Gradio/Streamlit sdk).
    app_file (`str`, *optional*)
        Path to your main application file (which contains either gradio or streamlit Python code, or static html code).
        Path is relative to the root of the repository.
    app_port (`str`, *optional*)
        Port on which your application is running. Used only if sdk is `docker`.
    license (`str`, *optional*)
        License of this model. Example: apache-2.0 or any license from
        https://huggingface.co/docs/hub/repositories-licenses.
    duplicated_from (`str`, *optional*)
        ID of the original Space if this is a duplicated Space.
    models (List[`str`], *optional*)
        List of models related to this Space. Should be a dataset ID found on https://hf.co/models.
    datasets (`List[str]`, *optional*)
        List of datasets related to this Space. Should be a dataset ID found on https://hf.co/datasets.
    tags (`List[str]`, *optional*)
        List of tags to add to your Space that can be used when filtering on the Hub.
    ignore_metadata_errors (`str`):
        If True, errors while parsing the metadata section will be ignored. Some information might be lost during
        the process. Use it at your own risk.
    kwargs (`dict`, *optional*):
        Additional metadata that will be added to the space card.

Example:
    ```python
    >>> from huggingface_hub import SpaceCardData
    >>> card_data = SpaceCardData(
    ...     title="Dreambooth Training",
    ...     license="mit",
    ...     sdk="gradio",
    ...     duplicated_from="multimodalart/dreambooth-training"
    ... )
    >>> card_data.to_dict()
    {'title': 'Dreambooth Training', 'sdk': 'gradio', 'license': 'mit', 'duplicated_from': 'multimodalart/dreambooth-training'}
    ```

---
## model_index_to_eval_results
```python
from repocard_data import model_index_to_eval_results
```

Takes in a model index and returns the model name and a list of `huggingface_hub.EvalResult` objects.

A detailed spec of the model index can be found here:
https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1

Args:
    model_index (`List[Dict[str, Any]]`):
        A model index data structure, likely coming from a README.md file on the
        Hugging Face Hub.

Returns:
    model_name (`str`):
        The name of the model as found in the model index. This is used as the
        identifier for the model on leaderboards like PapersWithCode.
    eval_results (`List[EvalResult]`):
        A list of `huggingface_hub.EvalResult` objects containing the metrics
        reported in the provided model_index.

Example:
    ```python
    >>> from huggingface_hub.repocard_data import model_index_to_eval_results
    >>> # Define a minimal model index
    >>> model_index = [
    ...     {
    ...         "name": "my-cool-model",
    ...         "results": [
    ...             {
    ...                 "task": {
    ...                     "type": "image-classification"
    ...                 },
    ...                 "dataset": {
    ...                     "type": "beans",
    ...                     "name": "Beans"
    ...                 },
    ...                 "metrics": [
    ...                     {
    ...                         "type": "accuracy",
    ...                         "value": 0.9
    ...                     }
    ...                 ]
    ...             }
    ...         ]
    ...     }
    ... ]
    >>> model_name, eval_results = model_index_to_eval_results(model_index)
    >>> model_name
    'my-cool-model'
    >>> eval_results[0].task_type
    'image-classification'
    >>> eval_results[0].metric_type
    'accuracy'

    ```

---
## _remove_none
```python
from repocard_data import _remove_none
```

Recursively remove `None` values from a dict. Borrowed from: https://stackoverflow.com/a/20558778

---
## eval_results_to_model_index
```python
from repocard_data import eval_results_to_model_index
```

Takes in given model name and list of `huggingface_hub.EvalResult` and returns a
valid model-index that will be compatible with the format expected by the
Hugging Face Hub.

Args:
    model_name (`str`):
        Name of the model (ex. "my-cool-model"). This is used as the identifier
        for the model on leaderboards like PapersWithCode.
    eval_results (`List[EvalResult]`):
        List of `huggingface_hub.EvalResult` objects containing the metrics to be
        reported in the model-index.

Returns:
    model_index (`List[Dict[str, Any]]`): The eval_results converted to a model-index.

Example:
    ```python
    >>> from huggingface_hub.repocard_data import eval_results_to_model_index, EvalResult
    >>> # Define minimal eval_results
    >>> eval_results = [
    ...     EvalResult(
    ...         task_type="image-classification",  # Required
    ...         dataset_type="beans",  # Required
    ...         dataset_name="Beans",  # Required
    ...         metric_type="accuracy",  # Required
    ...         metric_value=0.9,  # Required
    ...     )
    ... ]
    >>> eval_results_to_model_index("my-cool-model", eval_results)
    [{'name': 'my-cool-model', 'results': [{'task': {'type': 'image-classification'}, 'dataset': {'name': 'Beans', 'type': 'beans'}, 'metrics': [{'type': 'accuracy', 'value': 0.9}]}]}]

    ```

---
## _to_unique_list
```python
from repocard_data import _to_unique_list
```



---
## unique_identifier
```python
from repocard_data import unique_identifier
```

Returns a tuple that uniquely identifies this evaluation.

---
## is_equal_except_value
```python
from repocard_data import is_equal_except_value
```

Return True if `self` and `other` describe exactly the same metric but with a
different value.

---
## __post_init__
```python
from repocard_data import __post_init__
```



---
## __init__
```python
from repocard_data import __init__
```



---
## to_dict
```python
from repocard_data import to_dict
```

Converts CardData to a dict.

Returns:
    `dict`: CardData represented as a dictionary ready to be dumped to a YAML
    block for inclusion in a README.md file.

---
## _to_dict
```python
from repocard_data import _to_dict
```



---
## to_yaml
```python
from repocard_data import to_yaml
```

Dumps CardData to a YAML block for inclusion in a README.md file.

Args:
    line_break (str, *optional*):
        The line break to use when dumping to yaml.

Returns:
    `str`: CardData represented as a YAML block.

---
## __repr__
```python
from repocard_data import __repr__
```



---
## __str__
```python
from repocard_data import __str__
```



---
## get
```python
from repocard_data import get
```

Get value for a given metadata key.

---
## pop
```python
from repocard_data import pop
```

Pop value for a given metadata key.

---
## __getitem__
```python
from repocard_data import __getitem__
```

Get value for a given metadata key.

---
## __setitem__
```python
from repocard_data import __setitem__
```

Set value for a given metadata key.

---
## __contains__
```python
from repocard_data import __contains__
```

Check if a given metadata key is set.

---
## __len__
```python
from repocard_data import __len__
```

Return the number of metadata keys set.

---
## __name__
```python
from _webhooks_payload import __name__
```

Contains data structures to parse the webhooks payload.

---
## ObjectId
```python
from _webhooks_payload import ObjectId
```



---
## WebhookPayloadUrl
```python
from _webhooks_payload import WebhookPayloadUrl
```



---
## WebhookPayloadMovedTo
```python
from _webhooks_payload import WebhookPayloadMovedTo
```



---
## WebhookPayloadWebhook
```python
from _webhooks_payload import WebhookPayloadWebhook
```



---
## WebhookPayloadEvent
```python
from _webhooks_payload import WebhookPayloadEvent
```



---
## WebhookPayloadDiscussionChanges
```python
from _webhooks_payload import WebhookPayloadDiscussionChanges
```



---
## WebhookPayloadComment
```python
from _webhooks_payload import WebhookPayloadComment
```



---
## WebhookPayloadDiscussion
```python
from _webhooks_payload import WebhookPayloadDiscussion
```



---
## WebhookPayloadRepo
```python
from _webhooks_payload import WebhookPayloadRepo
```



---
## WebhookPayloadUpdatedRef
```python
from _webhooks_payload import WebhookPayloadUpdatedRef
```



---
## WebhookPayload
```python
from _webhooks_payload import WebhookPayload
```



---
## BaseModel
```python
from _webhooks_payload import BaseModel
```



---
## __init__
```python
from _webhooks_payload import __init__
```



---
## __name__
```python
from hub_mixin import __name__
```



---
## MixinInfo
```python
from hub_mixin import MixinInfo
```



---
## ModelHubMixin
```python
from hub_mixin import ModelHubMixin
```

A generic mixin to integrate ANY machine learning framework with the Hub.

To integrate your framework, your model class must inherit from this class. Custom logic for saving/loading models
have to be overwritten in  [`_from_pretrained`] and [`_save_pretrained`]. [`PyTorchModelHubMixin`] is a good example
of mixin integration with the Hub. Check out our [integration guide](../guides/integrations) for more instructions.

When inheriting from [`ModelHubMixin`], you can define class-level attributes. These attributes are not passed to
`__init__` but to the class definition itself. This is useful to define metadata about the library integrating
[`ModelHubMixin`].

For more details on how to integrate the mixin with your library, checkout the [integration guide](../guides/integrations).

Args:
    repo_url (`str`, *optional*):
        URL of the library repository. Used to generate model card.
    docs_url (`str`, *optional*):
        URL of the library documentation. Used to generate model card.
    model_card_template (`str`, *optional*):
        Template of the model card. Used to generate model card. Defaults to a generic template.
    language (`str` or `List[str]`, *optional*):
        Language supported by the library. Used to generate model card.
    library_name (`str`, *optional*):
        Name of the library integrating ModelHubMixin. Used to generate model card.
    license (`str`, *optional*):
        License of the library integrating ModelHubMixin. Used to generate model card.
        E.g: "apache-2.0"
    license_name (`str`, *optional*):
        Name of the library integrating ModelHubMixin. Used to generate model card.
        Only used if `license` is set to `other`.
        E.g: "coqui-public-model-license".
    license_link (`str`, *optional*):
        URL to the license of the library integrating ModelHubMixin. Used to generate model card.
        Only used if `license` is set to `other` and `license_name` is set.
        E.g: "https://coqui.ai/cpml".
    pipeline_tag (`str`, *optional*):
        Tag of the pipeline. Used to generate model card. E.g. "text-classification".
    tags (`List[str]`, *optional*):
        Tags to be added to the model card. Used to generate model card. E.g. ["x-custom-tag", "arxiv:2304.12244"]
    coders (`Dict[Type, Tuple[Callable, Callable]]`, *optional*):
        Dictionary of custom types and their encoders/decoders. Used to encode/decode arguments that are not
        jsonable by default. E.g dataclasses, argparse.Namespace, OmegaConf, etc.

Example:

```python
>>> from huggingface_hub import ModelHubMixin

# Inherit from ModelHubMixin
>>> class MyCustomModel(
...         ModelHubMixin,
...         library_name="my-library",
...         tags=["x-custom-tag", "arxiv:2304.12244"],
...         repo_url="https://github.com/huggingface/my-cool-library",
...         docs_url="https://huggingface.co/docs/my-cool-library",
...         # ^ optional metadata to generate model card
...     ):
...     def __init__(self, size: int = 512, device: str = "cpu"):
...         # define how to initialize your model
...         super().__init__()
...         ...
...
...     def _save_pretrained(self, save_directory: Path) -> None:
...         # define how to serialize your model
...         ...
...
...     @classmethod
...     def from_pretrained(
...         cls: Type[T],
...         pretrained_model_name_or_path: Union[str, Path],
...         *,
...         force_download: bool = False,
...         resume_download: Optional[bool] = None,
...         proxies: Optional[Dict] = None,
...         token: Optional[Union[str, bool]] = None,
...         cache_dir: Optional[Union[str, Path]] = None,
...         local_files_only: bool = False,
...         revision: Optional[str] = None,
...         **model_kwargs,
...     ) -> T:
...         # define how to deserialize your model
...         ...

>>> model = MyCustomModel(size=256, device="gpu")

# Save model weights to local directory
>>> model.save_pretrained("my-awesome-model")

# Push model weights to the Hub
>>> model.push_to_hub("my-awesome-model")

# Download and initialize weights from the Hub
>>> reloaded_model = MyCustomModel.from_pretrained("username/my-awesome-model")
>>> reloaded_model.size
256

# Model card has been correctly populated
>>> from huggingface_hub import ModelCard
>>> card = ModelCard.load("username/my-awesome-model")
>>> card.data.tags
["x-custom-tag", "pytorch_model_hub_mixin", "model_hub_mixin"]
>>> card.data.library_name
"my-library"
```

---
## PyTorchModelHubMixin
```python
from hub_mixin import PyTorchModelHubMixin
```

Implementation of [`ModelHubMixin`] to provide model Hub upload/download capabilities to PyTorch models. The model
is set in evaluation mode by default using `model.eval()` (dropout modules are deactivated). To train the model,
you should first set it back in training mode with `model.train()`.

See [`ModelHubMixin`] for more details on how to use the mixin.

Example:

```python
>>> import torch
>>> import torch.nn as nn
>>> from huggingface_hub import PyTorchModelHubMixin

>>> class MyModel(
...         nn.Module,
...         PyTorchModelHubMixin,
...         library_name="keras-nlp",
...         repo_url="https://github.com/keras-team/keras-nlp",
...         docs_url="https://keras.io/keras_nlp/",
...         # ^ optional metadata to generate model card
...     ):
...     def __init__(self, hidden_size: int = 512, vocab_size: int = 30000, output_size: int = 4):
...         super().__init__()
...         self.param = nn.Parameter(torch.rand(hidden_size, vocab_size))
...         self.linear = nn.Linear(output_size, vocab_size)

...     def forward(self, x):
...         return self.linear(x + self.param)
>>> model = MyModel(hidden_size=256)

# Save model weights to local directory
>>> model.save_pretrained("my-awesome-model")

# Push model weights to the Hub
>>> model.push_to_hub("my-awesome-model")

# Download and initialize weights from the Hub
>>> model = MyModel.from_pretrained("username/my-awesome-model")
>>> model.hidden_size
256
```

---
## _load_dataclass
```python
from hub_mixin import _load_dataclass
```

Load a dataclass instance from a dictionary.

Fields not expected by the dataclass are ignored.

---
## __init_subclass__
```python
from hub_mixin import __init_subclass__
```



---
## __new__
```python
from hub_mixin import __new__
```

Create a new instance of the class and handle config.

3 cases:
- If `self._hub_mixin_config` is already set, do nothing.
- If `config` is passed as a dataclass, set it as `self._hub_mixin_config`.
- Otherwise, build `self._hub_mixin_config` from default values and passed values.

---
## _is_jsonable
```python
from hub_mixin import _is_jsonable
```

Check if a value is JSON serializable.

---
## _encode_arg
```python
from hub_mixin import _encode_arg
```

Encode an argument into a JSON serializable format.

---
## _decode_arg
```python
from hub_mixin import _decode_arg
```

Decode a JSON serializable value into an argument.

---
## save_pretrained
```python
from hub_mixin import save_pretrained
```

Save weights in local directory.

Args:
    save_directory (`str` or `Path`):
        Path to directory in which the model weights and configuration will be saved.
    config (`dict` or `DataclassInstance`, *optional*):
        Model configuration specified as a key/value dictionary or a dataclass instance.
    push_to_hub (`bool`, *optional*, defaults to `False`):
        Whether or not to push your model to the Huggingface Hub after saving it.
    repo_id (`str`, *optional*):
        ID of your repository on the Hub. Used only if `push_to_hub=True`. Will default to the folder name if
        not provided.
    model_card_kwargs (`Dict[str, Any]`, *optional*):
        Additional arguments passed to the model card template to customize the model card.
    push_to_hub_kwargs:
        Additional key word arguments passed along to the [`~ModelHubMixin.push_to_hub`] method.
Returns:
    `str` or `None`: url of the commit on the Hub if `push_to_hub=True`, `None` otherwise.

---
## _save_pretrained
```python
from hub_mixin import _save_pretrained
```

Save weights from a Pytorch model to a local directory.

---
## from_pretrained
```python
from hub_mixin import from_pretrained
```

Download a model from the Huggingface Hub and instantiate it.

Args:
    pretrained_model_name_or_path (`str`, `Path`):
        - Either the `model_id` (string) of a model hosted on the Hub, e.g. `bigscience/bloom`.
        - Or a path to a `directory` containing model weights saved using
            [`~transformers.PreTrainedModel.save_pretrained`], e.g., `../path/to/my_model_directory/`.
    revision (`str`, *optional*):
        Revision of the model on the Hub. Can be a branch name, a git tag or any commit id.
        Defaults to the latest commit on `main` branch.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether to force (re-)downloading the model weights and configuration files from the Hub, overriding
        the existing cache.
    proxies (`Dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g., `{'http': 'foo.bar:3128',
        'http://hostname': 'foo.bar:4012'}`. The proxies are used on every request.
    token (`str` or `bool`, *optional*):
        The token to use as HTTP bearer authorization for remote files. By default, it will use the token
        cached when running `huggingface-cli login`.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the local cached file if it exists.
    model_kwargs (`Dict`, *optional*):
        Additional kwargs to pass to the model during initialization.

---
## _from_pretrained
```python
from hub_mixin import _from_pretrained
```

Load Pytorch pretrained weights and return the loaded model.

---
## push_to_hub
```python
from hub_mixin import push_to_hub
```

Upload model checkpoint to the Hub.

Use `allow_patterns` and `ignore_patterns` to precisely filter which files should be pushed to the hub. Use
`delete_patterns` to delete existing remote files in the same commit. See [`upload_folder`] reference for more
details.

Args:
    repo_id (`str`):
        ID of the repository to push to (example: `"username/my-model"`).
    config (`dict` or `DataclassInstance`, *optional*):
        Model configuration specified as a key/value dictionary or a dataclass instance.
    commit_message (`str`, *optional*):
        Message to commit while pushing.
    private (`bool`, *optional*, defaults to `False`):
        Whether the repository created should be private.
    token (`str`, *optional*):
        The token to use as HTTP bearer authorization for remote files. By default, it will use the token
        cached when running `huggingface-cli login`.
    branch (`str`, *optional*):
        The git branch on which to push the model. This defaults to `"main"`.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request from `branch` with that commit. Defaults to `False`.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are pushed.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not pushed.
    delete_patterns (`List[str]` or `str`, *optional*):
        If provided, remote files matching any of the patterns will be deleted from the repo.
    model_card_kwargs (`Dict[str, Any]`, *optional*):
        Additional arguments passed to the model card template to customize the model card.

Returns:
    The url of the commit of your model in the given repository.

---
## generate_model_card
```python
from hub_mixin import generate_model_card
```



---
## _load_as_pickle
```python
from hub_mixin import _load_as_pickle
```



---
## _load_as_safetensor
```python
from hub_mixin import _load_as_safetensor
```



---
## __name__
```python
from _webhooks_server import __name__
```

Contains `WebhooksServer` and `webhook_endpoint` to create a webhook server easily.

---
## WebhooksServer
```python
from _webhooks_server import WebhooksServer
```

The [`WebhooksServer`] class lets you create an instance of a Gradio app that can receive Huggingface webhooks.
These webhooks can be registered using the [`~WebhooksServer.add_webhook`] decorator. Webhook endpoints are added to
the app as a POST endpoint to the FastAPI router. Once all the webhooks are registered, the `launch` method has to be
called to start the app.

It is recommended to accept [`WebhookPayload`] as the first argument of the webhook function. It is a Pydantic
model that contains all the information about the webhook event. The data will be parsed automatically for you.

Check out the [webhooks guide](../guides/webhooks_server) for a step-by-step tutorial on how to setup your
WebhooksServer and deploy it on a Space.

<Tip warning={true}>

`WebhooksServer` is experimental. Its API is subject to change in the future.

</Tip>

<Tip warning={true}>

You must have `gradio` installed to use `WebhooksServer` (`pip install --upgrade gradio`).

</Tip>

Args:
    ui (`gradio.Blocks`, optional):
        A Gradio UI instance to be used as the Space landing page. If `None`, a UI displaying instructions
        about the configured webhooks is created.
    webhook_secret (`str`, optional):
        A secret key to verify incoming webhook requests. You can set this value to any secret you want as long as
        you also configure it in your [webhooks settings panel](https://huggingface.co/settings/webhooks). You
        can also set this value as the `WEBHOOK_SECRET` environment variable. If no secret is provided, the
        webhook endpoints are opened without any security.

Example:

    ```python
    import gradio as gr
    from huggingface_hub import WebhooksServer, WebhookPayload

    with gr.Blocks() as ui:
        ...

    app = WebhooksServer(ui=ui, webhook_secret="my_secret_key")

    @app.add_webhook("/say_hello")
    async def hello(payload: WebhookPayload):
        return {"message": "hello"}

    app.launch()
    ```

---
## webhook_endpoint
```python
from _webhooks_server import webhook_endpoint
```

Decorator to start a [`WebhooksServer`] and register the decorated function as a webhook endpoint.

This is a helper to get started quickly. If you need more flexibility (custom landing page or webhook secret),
you can use [`WebhooksServer`] directly. You can register multiple webhook endpoints (to the same server) by using
this decorator multiple times.

Check out the [webhooks guide](../guides/webhooks_server) for a step-by-step tutorial on how to setup your
server and deploy it on a Space.

<Tip warning={true}>

`webhook_endpoint` is experimental. Its API is subject to change in the future.

</Tip>

<Tip warning={true}>

You must have `gradio` installed to use `webhook_endpoint` (`pip install --upgrade gradio`).

</Tip>

Args:
    path (`str`, optional):
        The URL path to register the webhook function. If not provided, the function name will be used as the path.
        In any case, all webhooks are registered under `/webhooks`.

Examples:
    The default usage is to register a function as a webhook endpoint. The function name will be used as the path.
    The server will be started automatically at exit (i.e. at the end of the script).

    ```python
    from huggingface_hub import webhook_endpoint, WebhookPayload

    @webhook_endpoint
    async def trigger_training(payload: WebhookPayload):
        if payload.repo.type == "dataset" and payload.event.action == "update":
            # Trigger a training job if a dataset is updated
            ...

    # Server is automatically started at the end of the script.
    ```

    Advanced usage: register a function as a webhook endpoint and start the server manually. This is useful if you
    are running it in a notebook.

    ```python
    from huggingface_hub import webhook_endpoint, WebhookPayload

    @webhook_endpoint
    async def trigger_training(payload: WebhookPayload):
        if payload.repo.type == "dataset" and payload.event.action == "update":
            # Trigger a training job if a dataset is updated
            ...

    # Start the server manually
    trigger_training.launch()
    ```

---
## _get_global_app
```python
from _webhooks_server import _get_global_app
```



---
## _warn_on_empty_secret
```python
from _webhooks_server import _warn_on_empty_secret
```



---
## _get_webhook_doc_url
```python
from _webhooks_server import _get_webhook_doc_url
```

Returns the anchor to a given webhook in the docs (experimental)

---
## _wrap_webhook_to_check_secret
```python
from _webhooks_server import _wrap_webhook_to_check_secret
```

Wraps a webhook function to check the webhook secret before calling the function.

This is a hacky way to add the `request` parameter to the function signature. Since FastAPI based itself on route
parameters to inject the values to the function, we need to hack the function signature to retrieve the `Request`
object (and hence the headers). A far cleaner solution would be to use a middleware. However, since
`fastapi==0.90.1`, a middleware cannot be added once the app has started. And since the FastAPI app is started by
Gradio internals (and not by us), we cannot add a middleware.

This method is called only when a secret has been defined by the user. If a request is sent without the
"x-webhook-secret", the function will return a 401 error (unauthorized). If the header is sent but is incorrect,
the function will return a 403 error (forbidden).

Inspired by https://stackoverflow.com/a/33112180.

---
## __new__
```python
from _webhooks_server import __new__
```



---
## __init__
```python
from _webhooks_server import __init__
```



---
## add_webhook
```python
from _webhooks_server import add_webhook
```

Decorator to add a webhook to the [`WebhooksServer`] server.

Args:
    path (`str`, optional):
        The URL path to register the webhook function. If not provided, the function name will be used as the
        path. In any case, all webhooks are registered under `/webhooks`.

Raises:
    ValueError: If the provided path is already registered as a webhook.

Example:
    ```python
    from huggingface_hub import WebhooksServer, WebhookPayload

    app = WebhooksServer()

    @app.add_webhook
    async def trigger_training(payload: WebhookPayload):
        if payload.repo.type == "dataset" and payload.event.action == "update":
            # Trigger a training job if a dataset is updated
            ...

    app.launch()
```

---
## launch
```python
from _webhooks_server import launch
```

Launch the Gradio app and register webhooks to the underlying FastAPI server.

Input parameters are forwarded to Gradio when launching the app.

---
## _get_default_ui
```python
from _webhooks_server import _get_default_ui
```

Default UI if not provided (lists webhooks and provides basic instructions).

---
## _inner
```python
from _webhooks_server import _inner
```



---
## _inner_post
```python
from _webhooks_server import _inner_post
```



---
## _launch_now
```python
from _webhooks_server import _launch_now
```



---
## __name__
```python
from _space_api import __name__
```



---
## SpaceStage
```python
from _space_api import SpaceStage
```

Enumeration of possible stage of a Space on the Hub.

Value can be compared to a string:
```py
assert SpaceStage.BUILDING == "BUILDING"
```

Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L61 (private url).

---
## SpaceHardware
```python
from _space_api import SpaceHardware
```

Enumeration of hardwares available to run your Space on the Hub.

Value can be compared to a string:
```py
assert SpaceHardware.CPU_BASIC == "cpu-basic"
```

Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L73 (private url).

---
## SpaceStorage
```python
from _space_api import SpaceStorage
```

Enumeration of persistent storage available for your Space on the Hub.

Value can be compared to a string:
```py
assert SpaceStorage.SMALL == "small"
```

Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceHardwareFlavor.ts#L24 (private url).

---
## SpaceRuntime
```python
from _space_api import SpaceRuntime
```

Contains information about the current runtime of a Space.

Args:
    stage (`str`):
        Current stage of the space. Example: RUNNING.
    hardware (`str` or `None`):
        Current hardware of the space. Example: "cpu-basic". Can be `None` if Space
        is `BUILDING` for the first time.
    requested_hardware (`str` or `None`):
        Requested hardware. Can be different than `hardware` especially if the request
        has just been made. Example: "t4-medium". Can be `None` if no hardware has
        been requested yet.
    sleep_time (`int` or `None`):
        Number of seconds the Space will be kept alive after the last request. By default (if value is `None`), the
        Space will never go to sleep if it's running on an upgraded hardware, while it will go to sleep after 48
        hours on a free 'cpu-basic' hardware. For more details, see https://huggingface.co/docs/hub/spaces-gpus#sleep-time.
    raw (`dict`):
        Raw response from the server. Contains more information about the Space
        runtime like number of replicas, number of cpu, memory size,...

---
## SpaceVariable
```python
from _space_api import SpaceVariable
```

Contains information about the current variables of a Space.

Args:
    key (`str`):
        Variable key. Example: `"MODEL_REPO_ID"`
    value (`str`):
        Variable value. Example: `"the_model_repo_id"`.
    description (`str` or None):
        Description of the variable. Example: `"Model Repo ID of the implemented model"`.
    updatedAt (`datetime` or None):
        datetime of the last update of the variable (if the variable has been updated at least once).

---
## __init__
```python
from _space_api import __init__
```



---
## __name__
```python
from keras_mixin import __name__
```



---
## _requires_keras_2_model
```python
from keras_mixin import _requires_keras_2_model
```



---
## _flatten_dict
```python
from keras_mixin import _flatten_dict
```

Flatten a nested dictionary.
Reference: https://stackoverflow.com/a/6027615/10319735

Args:
    dictionary (`dict`):
        The nested dictionary to be flattened.
    parent_key (`str`):
        The parent key to be prefixed to the children keys.
        Necessary for recursing over the nested dictionary.

Returns:
    The flattened dictionary.

---
## _create_hyperparameter_table
```python
from keras_mixin import _create_hyperparameter_table
```

Parse hyperparameter dictionary into a markdown table.

---
## _plot_network
```python
from keras_mixin import _plot_network
```



---
## _create_model_card
```python
from keras_mixin import _create_model_card
```

Creates a model card for the repository.

Do not overwrite an existing README.md file.

---
## save_pretrained_keras
```python
from keras_mixin import save_pretrained_keras
```

Saves a Keras model to save_directory in SavedModel format. Use this if
you're using the Functional or Sequential APIs.

Args:
    model (`Keras.Model`):
        The [Keras
        model](https://www.tensorflow.org/api_docs/python/tf/keras/Model)
        you'd like to save. The model must be compiled and built.
    save_directory (`str` or `Path`):
        Specify directory in which you want to save the Keras model.
    config (`dict`, *optional*):
        Configuration object to be saved alongside the model weights.
    include_optimizer(`bool`, *optional*, defaults to `False`):
        Whether or not to include optimizer in serialization.
    plot_model (`bool`, *optional*, defaults to `True`):
        Setting this to `True` will plot the model and put it in the model
        card. Requires graphviz and pydot to be installed.
    tags (Union[`str`,`list`], *optional*):
        List of tags that are related to model or string of a single tag. See example tags
        [here](https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1).
    model_save_kwargs(`dict`, *optional*):
        model_save_kwargs will be passed to
        [`tf.keras.models.save_model()`](https://www.tensorflow.org/api_docs/python/tf/keras/models/save_model).

---
## from_pretrained_keras
```python
from keras_mixin import from_pretrained_keras
```

Instantiate a pretrained Keras model from a pre-trained model from the Hub.
The model is expected to be in `SavedModel` format.

Args:
    pretrained_model_name_or_path (`str` or `os.PathLike`):
        Can be either:
            - A string, the `model id` of a pretrained model hosted inside a
              model repo on huggingface.co. Valid model ids can be located
              at the root-level, like `bert-base-uncased`, or namespaced
              under a user or organization name, like
              `dbmdz/bert-base-german-cased`.
            - You can add `revision` by appending `@` at the end of model_id
              simply like this: `dbmdz/bert-base-german-cased@main` Revision
              is the specific model version to use. It can be a branch name,
              a tag name, or a commit id, since we use a git-based system
              for storing models and other artifacts on huggingface.co, so
              `revision` can be any identifier allowed by git.
            - A path to a `directory` containing model weights saved using
              [`~transformers.PreTrainedModel.save_pretrained`], e.g.,
              `./my_model_directory/`.
            - `None` if you are both providing the configuration and state
              dictionary (resp. with keyword arguments `config` and
              `state_dict`).
    force_download (`bool`, *optional*, defaults to `False`):
        Whether to force the (re-)download of the model weights and
        configuration files, overriding the cached versions if they exist.
    proxies (`Dict[str, str]`, *optional*):
        A dictionary of proxy servers to use by protocol or endpoint, e.g.,
        `{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}`. The
        proxies are used on each request.
    token (`str` or `bool`, *optional*):
        The token to use as HTTP bearer authorization for remote files. If
        `True`, will use the token generated when running `transformers-cli
        login` (stored in `~/.huggingface`).
    cache_dir (`Union[str, os.PathLike]`, *optional*):
        Path to a directory in which a downloaded pretrained model
        configuration should be cached if the standard cache should not be
        used.
    local_files_only(`bool`, *optional*, defaults to `False`):
        Whether to only look at local files (i.e., do not try to download
        the model).
    model_kwargs (`Dict`, *optional*):
        model_kwargs will be passed to the model during initialization

<Tip>

Passing `token=True` is required when you want to use a private
model.

</Tip>

---
## push_to_hub_keras
```python
from keras_mixin import push_to_hub_keras
```

Upload model checkpoint to the Hub.

Use `allow_patterns` and `ignore_patterns` to precisely filter which files should be pushed to the hub. Use
`delete_patterns` to delete existing remote files in the same commit. See [`upload_folder`] reference for more
details.

Args:
    model (`Keras.Model`):
        The [Keras model](`https://www.tensorflow.org/api_docs/python/tf/keras/Model`) you'd like to push to the
        Hub. The model must be compiled and built.
    repo_id (`str`):
            ID of the repository to push to (example: `"username/my-model"`).
    commit_message (`str`, *optional*, defaults to "Add Keras model"):
        Message to commit while pushing.
    private (`bool`, *optional*, defaults to `False`):
        Whether the repository created should be private.
    api_endpoint (`str`, *optional*):
        The API endpoint to use when pushing the model to the hub.
    token (`str`, *optional*):
        The token to use as HTTP bearer authorization for remote files. If
        not set, will use the token set when logging in with
        `huggingface-cli login` (stored in `~/.huggingface`).
    branch (`str`, *optional*):
        The git branch on which to push the model. This defaults to
        the default branch as specified in your repository, which
        defaults to `"main"`.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request from `branch` with that commit.
        Defaults to `False`.
    config (`dict`, *optional*):
        Configuration object to be saved alongside the model weights.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are pushed.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not pushed.
    delete_patterns (`List[str]` or `str`, *optional*):
        If provided, remote files matching any of the patterns will be deleted from the repo.
    log_dir (`str`, *optional*):
        TensorBoard logging directory to be pushed. The Hub automatically
        hosts and displays a TensorBoard instance if log files are included
        in the repository.
    include_optimizer (`bool`, *optional*, defaults to `False`):
        Whether or not to include optimizer during serialization.
    tags (Union[`list`, `str`], *optional*):
        List of tags that are related to model or string of a single tag. See example tags
        [here](https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1).
    plot_model (`bool`, *optional*, defaults to `True`):
        Setting this to `True` will plot the model and put it in the model
        card. Requires graphviz and pydot to be installed.
    model_save_kwargs(`dict`, *optional*):
        model_save_kwargs will be passed to
        [`tf.keras.models.save_model()`](https://www.tensorflow.org/api_docs/python/tf/keras/models/save_model).

Returns:
    The url of the commit of your model in the given repository.

---
## KerasModelHubMixin
```python
from keras_mixin import KerasModelHubMixin
```

Implementation of [`ModelHubMixin`] to provide model Hub upload/download
capabilities to Keras models.


```python
>>> import tensorflow as tf
>>> from huggingface_hub import KerasModelHubMixin


>>> class MyModel(tf.keras.Model, KerasModelHubMixin):
...     def __init__(self, **kwargs):
...         super().__init__()
...         self.config = kwargs.pop("config", None)
...         self.dummy_inputs = ...
...         self.layer = ...

...     def call(self, *args):
...         return ...


>>> # Initialize and compile the model as you normally would
>>> model = MyModel()
>>> model.compile(...)
>>> # Build the graph by training it or passing dummy inputs
>>> _ = model(model.dummy_inputs)
>>> # Save model weights to local directory
>>> model.save_pretrained("my-awesome-model")
>>> # Push model weights to the Hub
>>> model.push_to_hub("my-awesome-model")
>>> # Download and initialize weights from the Hub
>>> model = MyModel.from_pretrained("username/super-cool-model")
```

---
## _inner
```python
from keras_mixin import _inner
```



---
## _save_pretrained
```python
from keras_mixin import _save_pretrained
```



---
## _from_pretrained
```python
from keras_mixin import _from_pretrained
```

Here we just call [`from_pretrained_keras`] function so both the mixin and
functional APIs stay in sync.

        TODO - Some args above aren't used since we are calling
        snapshot_download instead of hf_hub_download.

---
## __name__
```python
from constants import __name__
```



---
## _is_true
```python
from constants import _is_true
```



---
## _as_int
```python
from constants import _as_int
```



---
## __name__
```python
from _commit_scheduler import __name__
```



---
## _FileToUpload
```python
from _commit_scheduler import _FileToUpload
```

Temporary dataclass to store info about files to upload. Not meant to be used directly.

---
## CommitScheduler
```python
from _commit_scheduler import CommitScheduler
```

Scheduler to upload a local folder to the Hub at regular intervals (e.g. push to hub every 5 minutes).

The scheduler is started when instantiated and run indefinitely. At the end of your script, a last commit is
triggered. Checkout the [upload guide](https://huggingface.co/docs/huggingface_hub/guides/upload#scheduled-uploads)
to learn more about how to use it.

Args:
    repo_id (`str`):
        The id of the repo to commit to.
    folder_path (`str` or `Path`):
        Path to the local folder to upload regularly.
    every (`int` or `float`, *optional*):
        The number of minutes between each commit. Defaults to 5 minutes.
    path_in_repo (`str`, *optional*):
        Relative path of the directory in the repo, for example: `"checkpoints/"`. Defaults to the root folder
        of the repository.
    repo_type (`str`, *optional*):
        The type of the repo to commit to. Defaults to `model`.
    revision (`str`, *optional*):
        The revision of the repo to commit to. Defaults to `main`.
    private (`bool`, *optional*):
        Whether to make the repo private. Defaults to `False`. This value is ignored if the repo already exist.
    token (`str`, *optional*):
        The token to use to commit to the repo. Defaults to the token saved on the machine.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are uploaded.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not uploaded.
    squash_history (`bool`, *optional*):
        Whether to squash the history of the repo after each commit. Defaults to `False`. Squashing commits is
        useful to avoid degraded performances on the repo when it grows too large.
    hf_api (`HfApi`, *optional*):
        The [`HfApi`] client to use to commit to the Hub. Can be set with custom settings (user agent, token,...).

Example:
```py
>>> from pathlib import Path
>>> from huggingface_hub import CommitScheduler

# Scheduler uploads every 10 minutes
>>> csv_path = Path("watched_folder/data.csv")
>>> CommitScheduler(repo_id="test_scheduler", repo_type="dataset", folder_path=csv_path.parent, every=10)

>>> with csv_path.open("a") as f:
...     f.write("first line")

# Some time later (...)
>>> with csv_path.open("a") as f:
...     f.write("second line")
```

---
## PartialFileIO
```python
from _commit_scheduler import PartialFileIO
```

A file-like object that reads only the first part of a file.

Useful to upload a file to the Hub when the user might still be appending data to it. Only the first part of the
file is uploaded (i.e. the part that was available when the filesystem was first scanned).

In practice, only used internally by the CommitScheduler to regularly push a folder to the Hub with minimal
disturbance for the user. The object is passed to `CommitOperationAdd`.

Only supports `read`, `tell` and `seek` methods.

Args:
    file_path (`str` or `Path`):
        Path to the file to read.
    size_limit (`int`):
        The maximum number of bytes to read from the file. If the file is larger than this, only the first part
        will be read (and uploaded).

---
## __init__
```python
from _commit_scheduler import __init__
```



---
## stop
```python
from _commit_scheduler import stop
```

Stop the scheduler.

A stopped scheduler cannot be restarted. Mostly for tests purposes.

---
## _run_scheduler
```python
from _commit_scheduler import _run_scheduler
```

Dumb thread waiting between each scheduled push to Hub.

---
## trigger
```python
from _commit_scheduler import trigger
```

Trigger a `push_to_hub` and return a future.

This method is automatically called every `every` minutes. You can also call it manually to trigger a commit
immediately, without waiting for the next scheduled commit.

---
## _push_to_hub
```python
from _commit_scheduler import _push_to_hub
```



---
## push_to_hub
```python
from _commit_scheduler import push_to_hub
```

Push folder to the Hub and return the commit info.

<Tip warning={true}>

This method is not meant to be called directly. It is run in the background by the scheduler, respecting a
queue mechanism to avoid concurrent commits. Making a direct call to the method might lead to concurrency
issues.

</Tip>

The default behavior of `push_to_hub` is to assume an append-only folder. It lists all files in the folder and
uploads only changed files. If no changes are found, the method returns without committing anything. If you want
to change this behavior, you can inherit from [`CommitScheduler`] and override this method. This can be useful
for example to compress data together in a single file before committing. For more details and examples, check
out our [integration guide](https://huggingface.co/docs/huggingface_hub/main/en/guides/upload#scheduled-uploads).

---
## __del__
```python
from _commit_scheduler import __del__
```



---
## __repr__
```python
from _commit_scheduler import __repr__
```



---
## __len__
```python
from _commit_scheduler import __len__
```



---
## __getattribute__
```python
from _commit_scheduler import __getattribute__
```



---
## tell
```python
from _commit_scheduler import tell
```

Return the current file position.

---
## seek
```python
from _commit_scheduler import seek
```

Change the stream position to the given offset.

Behavior is the same as a regular file, except that the position is capped to the size limit.

---
## read
```python
from _commit_scheduler import read
```

Read at most `__size` bytes from the file.

Behavior is the same as a regular file, except that it is capped to the size limit.

---
## _attach
```python
from __init__ import _attach
```

Attach lazily loaded submodules, functions, or other attributes.

Typically, modules import submodules and attributes as follows:

```py
import mysubmodule
import anothersubmodule

from .foo import someattr
```

The idea is to replace a package's `__getattr__`, `__dir__`, and
`__all__`, such that all imports work exactly the way they would
with normal imports, except that the import occurs upon first use.

The typical way to call this function, replacing the above imports, is:

```python
__getattr__, __dir__, __all__ = lazy.attach(
    __name__,
    ['mysubmodule', 'anothersubmodule'],
    {'foo': ['someattr']}
)
```
This functionality requires Python 3.7 or higher.

Args:
    package_name (`str`):
        Typically use `__name__`.
    submodules (`set`):
        List of submodules to attach.
    submod_attrs (`dict`):
        Dictionary of submodule -> list of attributes / functions.
        These attributes are imported as they are used.

Returns:
    __getattr__, __dir__, __all__

---
## __name__
```python
from _local_folder import __name__
```

Contains utilities to handle the `../.cache/huggingface` folder in local directories.

First discussed in https://github.com/huggingface/huggingface_hub/issues/1738 to store
download metadata when downloading files from the hub to a local directory (without
using the cache).

./.cache/huggingface folder structure:
[4.0K]  data
├── [4.0K]  .cache
│   └── [4.0K]  huggingface
│       └── [4.0K]  download
│           ├── [  16]  file.parquet.metadata
│           ├── [  16]  file.txt.metadata
│           └── [4.0K]  folder
│               └── [  16]  file.parquet.metadata
│
├── [6.5G]  file.parquet
├── [1.5K]  file.txt
└── [4.0K]  folder
    └── [   16]  file.parquet


Download metadata file structure:
```
# file.txt.metadata
11c5a3d5811f50298f278a704980280950aedb10
a16a55fda99d2f2e7b69cce5cf93ff4ad3049930
1712656091.123

# file.parquet.metadata
11c5a3d5811f50298f278a704980280950aedb10
7c5d3f4b8b76583b422fcb9189ad6c89d5d97a094541ce8932dce3ecabde1421
1712656091.123
}
```

---
## LocalDownloadFilePaths
```python
from _local_folder import LocalDownloadFilePaths
```

Paths to the files related to a download process in a local dir.

Returned by [`get_local_download_paths`].

Attributes:
    file_path (`Path`):
        Path where the file will be saved.
    lock_path (`Path`):
        Path to the lock file used to ensure atomicity when reading/writing metadata.
    metadata_path (`Path`):
        Path to the metadata file.

---
## LocalUploadFilePaths
```python
from _local_folder import LocalUploadFilePaths
```

Paths to the files related to an upload process in a local dir.

Returned by [`get_local_upload_paths`].

Attributes:
    path_in_repo (`str`):
        Path of the file in the repo.
    file_path (`Path`):
        Path where the file will be saved.
    lock_path (`Path`):
        Path to the lock file used to ensure atomicity when reading/writing metadata.
    metadata_path (`Path`):
        Path to the metadata file.

---
## LocalDownloadFileMetadata
```python
from _local_folder import LocalDownloadFileMetadata
```

Metadata about a file in the local directory related to a download process.

Attributes:
    filename (`str`):
        Path of the file in the repo.
    commit_hash (`str`):
        Commit hash of the file in the repo.
    etag (`str`):
        ETag of the file in the repo. Used to check if the file has changed.
        For LFS files, this is the sha256 of the file. For regular files, it corresponds to the git hash.
    timestamp (`int`):
        Unix timestamp of when the metadata was saved i.e. when the metadata was accurate.

---
## LocalUploadFileMetadata
```python
from _local_folder import LocalUploadFileMetadata
```

Metadata about a file in the local directory related to an upload process.

---
## get_local_download_paths
```python
from _local_folder import get_local_download_paths
```

Compute paths to the files related to a download process.

Folders containing the paths are all guaranteed to exist.

Args:
    local_dir (`Path`):
        Path to the local directory in which files are downloaded.
    filename (`str`):
        Path of the file in the repo.

Return:
    [`LocalDownloadFilePaths`]: the paths to the files (file_path, lock_path, metadata_path, incomplete_path).

---
## get_local_upload_paths
```python
from _local_folder import get_local_upload_paths
```

Compute paths to the files related to an upload process.

Folders containing the paths are all guaranteed to exist.

Args:
    local_dir (`Path`):
        Path to the local directory that is uploaded.
    filename (`str`):
        Path of the file in the repo.

Return:
    [`LocalUploadFilePaths`]: the paths to the files (file_path, lock_path, metadata_path).

---
## read_download_metadata
```python
from _local_folder import read_download_metadata
```

Read metadata about a file in the local directory related to a download process.

Args:
    local_dir (`Path`):
        Path to the local directory in which files are downloaded.
    filename (`str`):
        Path of the file in the repo.

Return:
    `[LocalDownloadFileMetadata]` or `None`: the metadata if it exists, `None` otherwise.

---
## read_upload_metadata
```python
from _local_folder import read_upload_metadata
```

Read metadata about a file in the local directory related to an upload process.

TODO: factorize logic with `read_download_metadata`.

Args:
    local_dir (`Path`):
        Path to the local directory in which files are downloaded.
    filename (`str`):
        Path of the file in the repo.

Return:
    `[LocalUploadFileMetadata]` or `None`: the metadata if it exists, `None` otherwise.

---
## write_download_metadata
```python
from _local_folder import write_download_metadata
```

Write metadata about a file in the local directory related to a download process.

Args:
    local_dir (`Path`):
        Path to the local directory in which files are downloaded.

---
## _huggingface_dir
```python
from _local_folder import _huggingface_dir
```

Return the path to the `.cache/huggingface` directory in a local directory.

---
## incomplete_path
```python
from _local_folder import incomplete_path
```

Return the path where a file will be temporarily downloaded before being moved to `file_path`.

---
## save
```python
from _local_folder import save
```

Save the metadata to disk.

---
## __name__
```python
from lfs import __name__
```

Implementation of a custom transfer agent for the transfer type "multipart" for
git-lfs.

Inspired by:
github.com/cbartz/git-lfs-swift-transfer-agent/blob/master/git_lfs_swift_transfer.py

Spec is: github.com/git-lfs/git-lfs/blob/master/docs/custom-transfers.md


To launch debugger while developing:

``` [lfs "customtransfer.multipart"]
path = /path/to/huggingface_hub/.env/bin/python args = -m debugpy --listen 5678
--wait-for-client
/path/to/huggingface_hub/src/huggingface_hub/commands/huggingface_cli.py
lfs-multipart-upload ```

---
## UploadInfo
```python
from lfs import UploadInfo
```

Dataclass holding required information to determine whether a blob
should be uploaded to the hub using the LFS protocol or the regular protocol

Args:
    sha256 (`bytes`):
        SHA256 hash of the blob
    size (`int`):
        Size in bytes of the blob
    sample (`bytes`):
        First 512 bytes of the blob

---
## post_lfs_batch_info
```python
from lfs import post_lfs_batch_info
```

Requests the LFS batch endpoint to retrieve upload instructions

Learn more: https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md

Args:
    upload_infos (`Iterable` of `UploadInfo`):
        `UploadInfo` for the files that are being uploaded, typically obtained
        from `CommitOperationAdd.upload_info`
    repo_type (`str`):
        Type of the repo to upload to: `"model"`, `"dataset"` or `"space"`.
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`, *optional*):
        The git revision to upload to.
    headers (`dict`, *optional*):
        Additional headers to include in the request

Returns:
    `LfsBatchInfo`: 2-tuple:
        - First element is the list of upload instructions from the server
        - Second element is an list of errors, if any

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If an argument is invalid or the server response is malformed.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
        If the server returned an error.

---
## PayloadPartT
```python
from lfs import PayloadPartT
```



---
## CompletionPayloadT
```python
from lfs import CompletionPayloadT
```

Payload that will be sent to the Hub when uploading multi-part.

---
## lfs_upload
```python
from lfs import lfs_upload
```

Handles uploading a given object to the Hub with the LFS protocol.

Can be a No-op if the content of the file is already present on the hub large file storage.

Args:
    operation (`CommitOperationAdd`):
        The add operation triggering this upload.
    lfs_batch_action (`dict`):
        Upload instructions from the LFS batch endpoint for this object. See [`~utils.lfs.post_lfs_batch_info`] for
        more details.
    headers (`dict`, *optional*):
        Headers to include in the request, including authentication and user agent headers.

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `lfs_batch_action` is improperly formatted
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
        If the upload resulted in an error

---
## _validate_lfs_action
```python
from lfs import _validate_lfs_action
```

validates response from the LFS batch endpoint

---
## _validate_batch_actions
```python
from lfs import _validate_batch_actions
```

validates response from the LFS batch endpoint

---
## _validate_batch_error
```python
from lfs import _validate_batch_error
```

validates response from the LFS batch endpoint

---
## _upload_single_part
```python
from lfs import _upload_single_part
```

Uploads `fileobj` as a single PUT HTTP request (basic LFS transfer protocol)

Args:
    upload_url (`str`):
        The URL to PUT the file to.
    fileobj:
        The file-like object holding the data to upload.

Returns: `requests.Response`

Raises:
 [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
    If the upload resulted in an error.

---
## _upload_multi_part
```python
from lfs import _upload_multi_part
```

Uploads file using HF multipart LFS transfer protocol.

---
## _get_sorted_parts_urls
```python
from lfs import _get_sorted_parts_urls
```



---
## _get_completion_payload
```python
from lfs import _get_completion_payload
```



---
## _upload_parts_iteratively
```python
from lfs import _upload_parts_iteratively
```



---
## _upload_parts_hf_transfer
```python
from lfs import _upload_parts_hf_transfer
```



---
## from_path
```python
from lfs import from_path
```



---
## from_bytes
```python
from lfs import from_bytes
```



---
## from_fileobj
```python
from lfs import from_fileobj
```



---
## __name__
```python
from file_download import __name__
```



---
## are_symlinks_supported
```python
from file_download import are_symlinks_supported
```

Return whether the symlinks are supported on the machine.

Since symlinks support can change depending on the mounted disk, we need to check
on the precise cache folder. By default, the default HF cache directory is checked.

Args:
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.

Returns: [bool] Whether symlinks are supported in the directory.

---
## HfFileMetadata
```python
from file_download import HfFileMetadata
```

Data structure containing information about a file versioned on the Hub.

Returned by [`get_hf_file_metadata`] based on a URL.

Args:
    commit_hash (`str`, *optional*):
        The commit_hash related to the file.
    etag (`str`, *optional*):
        Etag of the file on the server.
    location (`str`):
        Location where to download the file. Can be a Hub url or not (CDN).
    size (`size`):
        Size of the file. In case of an LFS file, contains the size of the actual
        LFS file, not the pointer.

---
## hf_hub_url
```python
from file_download import hf_hub_url
```

Construct the URL of a file from the given information.

The resolved address can either be a huggingface.co-hosted url, or a link to
Cloudfront (a Content Delivery Network, or CDN) for large files which are
more than a few MBs.

Args:
    repo_id (`str`):
        A namespace (user or an organization) name and a repo name separated
        by a `/`.
    filename (`str`):
        The name of the file in the repo.
    subfolder (`str`, *optional*):
        An optional value corresponding to a folder inside the repo.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if downloading from a dataset or space,
        `None` or `"model"` if downloading from a model. Default is `None`.
    revision (`str`, *optional*):
        An optional Git revision id which can be a branch name, a tag, or a
        commit hash.

Example:

```python
>>> from huggingface_hub import hf_hub_url

>>> hf_hub_url(
...     repo_id="julien-c/EsperBERTo-small", filename="pytorch_model.bin"
... )
'https://huggingface.co/julien-c/EsperBERTo-small/resolve/main/pytorch_model.bin'
```

<Tip>

Notes:

    Cloudfront is replicated over the globe so downloads are way faster for
    the end user (and it also lowers our bandwidth costs).

    Cloudfront aggressively caches files by default (default TTL is 24
    hours), however this is not an issue here because we implement a
    git-based versioning system on huggingface.co, which means that we store
    the files on S3/Cloudfront in a content-addressable way (i.e., the file
    name is its hash). Using content-addressable filenames means cache can't
    ever be stale.

    In terms of client-side caching from this library, we base our caching
    on the objects' entity tag (`ETag`), which is an identifier of a
    specific version of a resource [1]_. An object's ETag is: its git-sha1
    if stored in git, or its sha256 if stored in git-lfs.

</Tip>

References:

-  [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag

---
## url_to_filename
```python
from file_download import url_to_filename
```

Generate a local filename from a url.

Convert `url` into a hashed filename in a reproducible way. If `etag` is
specified, append its hash to the url's, delimited by a period. If the url
ends with .h5 (Keras HDF5 weights) adds '.h5' to the name so that TF 2.0 can
identify it as a HDF5 file (see
https://github.com/tensorflow/tensorflow/blob/00fad90125b18b80fe054de1055770cfb8fe4ba3/tensorflow/python/keras/engine/network.py#L1380)

Args:
    url (`str`):
        The address to the file.
    etag (`str`, *optional*):
        The ETag of the file.

Returns:
    The generated filename.

---
## filename_to_url
```python
from file_download import filename_to_url
```

Return the url and etag (which may be `None`) stored for `filename`. Raise
`EnvironmentError` if `filename` or its stored metadata do not exist.

Args:
    filename (`str`):
        The name of the file
    cache_dir (`str`, *optional*):
        The cache directory to use instead of the default one.
    legacy_cache_layout (`bool`, *optional*, defaults to `False`):
        If `True`, uses the legacy file cache layout i.e. just call `hf_hub_url`
        then `cached_download`. This is deprecated as the new cache layout is
        more powerful.

---
## _request_wrapper
```python
from file_download import _request_wrapper
```

Wrapper around requests methods to follow relative redirects if `follow_relative_redirects=True` even when
`allow_redirection=False`.

Args:
    method (`str`):
        HTTP method, such as 'GET' or 'HEAD'.
    url (`str`):
        The URL of the resource to fetch.
    follow_relative_redirects (`bool`, *optional*, defaults to `False`)
        If True, relative redirection (redirection to the same site) will be resolved even when `allow_redirection`
        kwarg is set to False. Useful when we want to follow a redirection to a renamed repository without
        following redirection to a CDN.
    **params (`dict`, *optional*):
        Params to pass to `requests.request`.

---
## http_get
```python
from file_download import http_get
```

Download a remote file. Do not gobble up errors, and will return errors tailored to the Hugging Face Hub.

If ConnectionError (SSLError) or ReadTimeout happen while streaming data from the server, it is most likely a
transient error (network outage?). We log a warning message and try to resume the download a few times before
giving up. The method gives up after 5 attempts if no new data has being received from the server.

Args:
    url (`str`):
        The URL of the file to download.
    temp_file (`BinaryIO`):
        The file-like object where to save the file.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to `requests.request`.
    resume_size (`float`, *optional*):
        The number of bytes already downloaded. If set to 0 (default), the whole file is download. If set to a
        positive number, the download will resume at the given position.
    headers (`dict`, *optional*):
        Dictionary of HTTP Headers to send with the request.
    expected_size (`int`, *optional*):
        The expected size of the file to download. If set, the download will raise an error if the size of the
        received content is different from the expected one.
    displayed_filename (`str`, *optional*):
        The filename of the file that is being downloaded. Value is used only to display a nice progress bar. If
        not set, the filename is guessed from the URL or the `Content-Disposition` header.

---
## cached_download
```python
from file_download import cached_download
```

Download from a given URL and cache it if it's not already present in the
local cache.

Given a URL, this function looks for the corresponding file in the local
cache. If it's not there, download it. Then return the path to the cached
file.

Will raise errors tailored to the Hugging Face Hub.

Args:
    url (`str`):
        The path to the file to be downloaded.
    library_name (`str`, *optional*):
        The name of the library to which the object corresponds.
    library_version (`str`, *optional*):
        The version of the library.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    user_agent (`dict`, `str`, *optional*):
        The user-agent info in the form of a dictionary or a string.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether the file should be downloaded even if it already exists in
        the local cache.
    force_filename (`str`, *optional*):
        Use this name instead of a generated file name.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    etag_timeout (`float`, *optional* defaults to `10`):
        When fetching ETag, how many seconds to wait for the server to send
        data before giving up which is passed to `requests.request`.
    token (`bool`, `str`, *optional*):
        A token to be used for the download.
            - If `True`, the token is read from the HuggingFace config
              folder.
            - If a string, it's used as the authentication token.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the
        local cached file if it exists.
    legacy_cache_layout (`bool`, *optional*, defaults to `False`):
        Set this parameter to `True` to mention that you'd like to continue
        the old cache layout. Putting this to `True` manually will not raise
        any warning when using `cached_download`. We recommend using
        `hf_hub_download` to take advantage of the new cache.

Returns:
    Local path (string) of file or if networking is off, last version of
    file cached on disk.

<Tip>

Raises the following errors:

    - [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
      if `token=True` and the token cannot be found.
    - [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError)
      if ETag cannot be determined.
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.
    - [`~utils.EntryNotFoundError`]
      If the file to download cannot be found.
    - [`~utils.LocalEntryNotFoundError`]
      If network is disabled or unavailable and file is not found in cache.

</Tip>

---
## _normalize_etag
```python
from file_download import _normalize_etag
```

Normalize ETag HTTP header, so it can be used to create nice filepaths.

The HTTP spec allows two forms of ETag:
  ETag: W/"<etag_value>"
  ETag: "<etag_value>"

For now, we only expect the second form from the server, but we want to be future-proof so we support both. For
more context, see `TestNormalizeEtag` tests and https://github.com/huggingface/huggingface_hub/pull/1428.

Args:
    etag (`str`, *optional*): HTTP header

Returns:
    `str` or `None`: string that can be used as a nice directory name.
    Returns `None` if input is None.

---
## _create_relative_symlink
```python
from file_download import _create_relative_symlink
```

Alias method used in `transformers` conversion script.

---
## _create_symlink
```python
from file_download import _create_symlink
```

Create a symbolic link named dst pointing to src.

By default, it will try to create a symlink using a relative path. Relative paths have 2 advantages:
- If the cache_folder is moved (example: back-up on a shared drive), relative paths within the cache folder will
  not break.
- Relative paths seems to be better handled on Windows. Issue was reported 3 times in less than a week when
  changing from relative to absolute paths. See https://github.com/huggingface/huggingface_hub/issues/1398,
  https://github.com/huggingface/diffusers/issues/2729 and https://github.com/huggingface/transformers/pull/22228.
  NOTE: The issue with absolute paths doesn't happen on admin mode.
When creating a symlink from the cache to a local folder, it is possible that a relative path cannot be created.
This happens when paths are not on the same volume. In that case, we use absolute paths.


The result layout looks something like
    └── [ 128]  snapshots
        ├── [ 128]  2439f60ef33a0d46d85da5001d52aeda5b00ce9f
        │   ├── [  52]  README.md -> ../../../blobs/d7edf6bd2a681fb0175f7735299831ee1b22b812
        │   └── [  76]  pytorch_model.bin -> ../../../blobs/403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd

If symlinks cannot be created on this platform (most likely to be Windows), the workaround is to avoid symlinks by
having the actual file in `dst`. If it is a new file (`new_blob=True`), we move it to `dst`. If it is not a new file
(`new_blob=False`), we don't know if the blob file is already referenced elsewhere. To avoid breaking existing
cache, the file is duplicated on the disk.

In case symlinks are not supported, a warning message is displayed to the user once when loading `huggingface_hub`.
The warning message can be disabled with the `DISABLE_SYMLINKS_WARNING` environment variable.

---
## _cache_commit_hash_for_specific_revision
```python
from file_download import _cache_commit_hash_for_specific_revision
```

Cache reference between a revision (tag, branch or truncated commit hash) and the corresponding commit hash.

Does nothing if `revision` is already a proper `commit_hash` or reference is already cached.

---
## repo_folder_name
```python
from file_download import repo_folder_name
```

Return a serialized version of a hf.co repo name and type, safe for disk storage
as a single non-nested folder.

Example: models--julien-c--EsperBERTo-small

---
## _check_disk_space
```python
from file_download import _check_disk_space
```

Check disk usage and log a warning if there is not enough disk space to download the file.

Args:
    expected_size (`int`):
        The expected size of the file in bytes.
    target_dir (`str`):
        The directory where the file will be stored after downloading.

---
## hf_hub_download
```python
from file_download import hf_hub_download
```

Download a given file if it's not already present in the local cache.

The new cache file layout looks like this:
- The cache directory contains one subfolder per repo_id (namespaced by repo type)
- inside each repo folder:
    - refs is a list of the latest known revision => commit_hash pairs
    - blobs contains the actual file blobs (identified by their git-sha or sha256, depending on
      whether they're LFS files or not)
    - snapshots contains one subfolder per commit, each "commit" contains the subset of the files
      that have been resolved at that particular commit. Each filename is a symlink to the blob
      at that particular commit.

```
[  96]  .
└── [ 160]  models--julien-c--EsperBERTo-small
    ├── [ 160]  blobs
    │   ├── [321M]  403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
    │   ├── [ 398]  7cb18dc9bafbfcf74629a4b760af1b160957a83e
    │   └── [1.4K]  d7edf6bd2a681fb0175f7735299831ee1b22b812
    ├── [  96]  refs
    │   └── [  40]  main
    └── [ 128]  snapshots
        ├── [ 128]  2439f60ef33a0d46d85da5001d52aeda5b00ce9f
        │   ├── [  52]  README.md -> ../../blobs/d7edf6bd2a681fb0175f7735299831ee1b22b812
        │   └── [  76]  pytorch_model.bin -> ../../blobs/403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
        └── [ 128]  bbc77c8132af1cc5cf678da3f1ddf2de43606d48
            ├── [  52]  README.md -> ../../blobs/7cb18dc9bafbfcf74629a4b760af1b160957a83e
            └── [  76]  pytorch_model.bin -> ../../blobs/403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
```

If `local_dir` is provided, the file structure from the repo will be replicated in this location. When using this
option, the `cache_dir` will not be used and a `.cache/huggingface/` folder will be created at the root of `local_dir`
to store some metadata related to the downloaded files. While this mechanism is not as robust as the main
cache-system, it's optimized for regularly pulling the latest version of a repository.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    filename (`str`):
        The name of the file in the repo.
    subfolder (`str`, *optional*):
        An optional value corresponding to a folder inside the model repo.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if downloading from a dataset or space,
        `None` or `"model"` if downloading from a model. Default is `None`.
    revision (`str`, *optional*):
        An optional Git revision id which can be a branch name, a tag, or a
        commit hash.
    library_name (`str`, *optional*):
        The name of the library to which the object corresponds.
    library_version (`str`, *optional*):
        The version of the library.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    local_dir (`str` or `Path`, *optional*):
        If provided, the downloaded file will be placed under this directory.
    user_agent (`dict`, `str`, *optional*):
        The user-agent info in the form of a dictionary or a string.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether the file should be downloaded even if it already exists in
        the local cache.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    etag_timeout (`float`, *optional*, defaults to `10`):
        When fetching ETag, how many seconds to wait for the server to send
        data before giving up which is passed to `requests.request`.
    token (`str`, `bool`, *optional*):
        A token to be used for the download.
            - If `True`, the token is read from the HuggingFace config
              folder.
            - If a string, it's used as the authentication token.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the
        local cached file if it exists.
    headers (`dict`, *optional*):
        Additional headers to be sent with the request.
    legacy_cache_layout (`bool`, *optional*, defaults to `False`):
        If `True`, uses the legacy file cache layout i.e. just call [`hf_hub_url`]
        then `cached_download`. This is deprecated as the new cache layout is
        more powerful.

Returns:
    `str`: Local path of file or if networking is off, last version of file cached on disk.

Raises:
    [`~utils.RepositoryNotFoundError`]
        If the repository to download from cannot be found. This may be because it doesn't exist,
        or because it is set to `private` and you do not have access.
    [`~utils.RevisionNotFoundError`]
        If the revision to download from cannot be found.
    [`~utils.EntryNotFoundError`]
        If the file to download cannot be found.
    [`~utils.LocalEntryNotFoundError`]
        If network is disabled or unavailable and file is not found in cache.
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `token=True` but the token cannot be found.
    [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError)
        If ETag cannot be determined.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If some parameter value is invalid.

---
## _hf_hub_download_to_cache_dir
```python
from file_download import _hf_hub_download_to_cache_dir
```

Download a given file to a cache folder, if not already present.

Method should not be called directly. Please use `hf_hub_download` instead.

---
## _hf_hub_download_to_local_dir
```python
from file_download import _hf_hub_download_to_local_dir
```

Download a given file to a local folder, if not already present.

Method should not be called directly. Please use `hf_hub_download` instead.

---
## try_to_load_from_cache
```python
from file_download import try_to_load_from_cache
```

Explores the cache to return the latest cached file for a given revision if found.

This function will not raise any exception if the file in not cached.

Args:
    cache_dir (`str` or `os.PathLike`):
        The folder where the cached files lie.
    repo_id (`str`):
        The ID of the repo on huggingface.co.
    filename (`str`):
        The filename to look for inside `repo_id`.
    revision (`str`, *optional*):
        The specific model version to use. Will default to `"main"` if it's not provided and no `commit_hash` is
        provided either.
    repo_type (`str`, *optional*):
        The type of the repository. Will default to `"model"`.

Returns:
    `Optional[str]` or `_CACHED_NO_EXIST`:
        Will return `None` if the file was not cached. Otherwise:
        - The exact path to the cached file if it's found in the cache
        - A special value `_CACHED_NO_EXIST` if the file does not exist at the given commit hash and this fact was
          cached.

Example:

```python
from huggingface_hub import try_to_load_from_cache, _CACHED_NO_EXIST

filepath = try_to_load_from_cache()
if isinstance(filepath, str):
    # file exists and is cached
    ...
elif filepath is _CACHED_NO_EXIST:
    # non-existence of file is cached
    ...
else:
    # file is not cached
    ...
```

---
## get_hf_file_metadata
```python
from file_download import get_hf_file_metadata
```

Fetch metadata of a file versioned on the Hub for a given url.

Args:
    url (`str`):
        File url, for example returned by [`hf_hub_url`].
    token (`str` or `bool`, *optional*):
        A token to be used for the download.
            - If `True`, the token is read from the HuggingFace config
              folder.
            - If `False` or `None`, no token is provided.
            - If a string, it's used as the authentication token.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    timeout (`float`, *optional*, defaults to 10):
        How many seconds to wait for the server to send metadata before giving up.
    library_name (`str`, *optional*):
        The name of the library to which the object corresponds.
    library_version (`str`, *optional*):
        The version of the library.
    user_agent (`dict`, `str`, *optional*):
        The user-agent info in the form of a dictionary or a string.
    headers (`dict`, *optional*):
        Additional headers to be sent with the request.

Returns:
    A [`HfFileMetadata`] object containing metadata such as location, etag, size and
    commit_hash.

---
## _get_metadata_or_catch_error
```python
from file_download import _get_metadata_or_catch_error
```

Get metadata for a file on the Hub, safely handling network issues.

Returns either the etag, commit_hash and expected size of the file, or the error
raised while fetching the metadata.

NOTE: This function mutates `headers` inplace! It removes the `authorization` header
      if the file is a LFS blob and the domain of the url is different from the
      domain of the location (typically an S3 bucket).

---
## _raise_on_head_call_error
```python
from file_download import _raise_on_head_call_error
```

Raise an appropriate error when the HEAD call failed and we cannot locate a local file.

---
## _download_to_tmp_and_move
```python
from file_download import _download_to_tmp_and_move
```

Download content from a URL to a destination path.

Internal logic:
- return early if file is already downloaded
- resume download if possible (from incomplete file)
- do not resume download if `force_download=True` or `HF_HUB_ENABLE_HF_TRANSFER=True`
- check disk space before downloading
- download content to a temporary file
- set correct permissions on temporary file
- move the temporary file to the destination path

Both `incomplete_path` and `destination_path` must be on the same volume to avoid a local copy.

---
## _int_or_none
```python
from file_download import _int_or_none
```



---
## _chmod_and_move
```python
from file_download import _chmod_and_move
```

Set correct permission before moving a blob from tmp directory to cache dir.

Do not take into account the `umask` from the process as there is no convenient way
to get it that is thread-safe.

See:
- About umask: https://docs.python.org/3/library/os.html#os.umask
- Thread-safety: https://stackoverflow.com/a/70343066
- About solution: https://github.com/huggingface/huggingface_hub/pull/1220#issuecomment-1326211591
- Fix issue: https://github.com/huggingface/huggingface_hub/issues/1141
- Fix issue: https://github.com/huggingface/huggingface_hub/issues/1215

---
## _copy_no_matter_what
```python
from file_download import _copy_no_matter_what
```

Copy file from src to dst.

If `shutil.copy2` fails, fallback to `shutil.copyfile`.

---
## _get_pointer_path
```python
from file_download import _get_pointer_path
```



---
## __name__
```python
from community import __name__
```

Data structures to interact with Discussions and Pull Requests on the Hub.

See [the Discussions and Pull Requests guide](https://huggingface.co/docs/hub/repositories-pull-requests-discussions)
for more information on Pull Requests, Discussions, and the community tab.

---
## Discussion
```python
from community import Discussion
```

A Discussion or Pull Request on the Hub.

This dataclass is not intended to be instantiated directly.

Attributes:
    title (`str`):
        The title of the Discussion / Pull Request
    status (`str`):
        The status of the Discussion / Pull Request.
        It must be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )
            * `"draft"` (only for Pull Requests )
    num (`int`):
        The number of the Discussion / Pull Request.
    repo_id (`str`):
        The id (`"{namespace}/{repo_name}"`) of the repo on which
        the Discussion / Pull Request was open.
    repo_type (`str`):
        The type of the repo on which the Discussion / Pull Request was open.
        Possible values are: `"model"`, `"dataset"`, `"space"`.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    is_pull_request (`bool`):
        Whether or not this is a Pull Request.
    created_at (`datetime`):
        The `datetime` of creation of the Discussion / Pull Request.
    endpoint (`str`):
        Endpoint of the Hub. Default is https://huggingface.co.
    git_reference (`str`, *optional*):
        (property) Git reference to which changes can be pushed if this is a Pull Request, `None` otherwise.
    url (`str`):
        (property) URL of the discussion on the Hub.

---
## DiscussionWithDetails
```python
from community import DiscussionWithDetails
```

Subclass of [`Discussion`].

Attributes:
    title (`str`):
        The title of the Discussion / Pull Request
    status (`str`):
        The status of the Discussion / Pull Request.
        It can be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )
            * `"draft"` (only for Pull Requests )
    num (`int`):
        The number of the Discussion / Pull Request.
    repo_id (`str`):
        The id (`"{namespace}/{repo_name}"`) of the repo on which
        the Discussion / Pull Request was open.
    repo_type (`str`):
        The type of the repo on which the Discussion / Pull Request was open.
        Possible values are: `"model"`, `"dataset"`, `"space"`.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    is_pull_request (`bool`):
        Whether or not this is a Pull Request.
    created_at (`datetime`):
        The `datetime` of creation of the Discussion / Pull Request.
    events (`list` of [`DiscussionEvent`])
        The list of [`DiscussionEvents`] in this Discussion or Pull Request.
    conflicting_files (`Union[List[str], bool, None]`, *optional*):
        A list of conflicting files if this is a Pull Request.
        `None` if `self.is_pull_request` is `False`.
        `True` if there are conflicting files but the list can't be retrieved.
    target_branch (`str`, *optional*):
        The branch into which changes are to be merged if this is a
        Pull Request . `None`  if `self.is_pull_request` is `False`.
    merge_commit_oid (`str`, *optional*):
        If this is a merged Pull Request , this is set to the OID / SHA of
        the merge commit, `None` otherwise.
    diff (`str`, *optional*):
        The git diff if this is a Pull Request , `None` otherwise.
    endpoint (`str`):
        Endpoint of the Hub. Default is https://huggingface.co.
    git_reference (`str`, *optional*):
        (property) Git reference to which changes can be pushed if this is a Pull Request, `None` otherwise.
    url (`str`):
        (property) URL of the discussion on the Hub.

---
## DiscussionEvent
```python
from community import DiscussionEvent
```

An event in a Discussion or Pull Request.

Use concrete classes:
    * [`DiscussionComment`]
    * [`DiscussionStatusChange`]
    * [`DiscussionCommit`]
    * [`DiscussionTitleChange`]

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.

---
## DiscussionComment
```python
from community import DiscussionComment
```

A comment in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].


Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    content (`str`):
        The raw markdown content of the comment. Mentions, links and images are not rendered.
    edited (`bool`):
        Whether or not this comment has been edited.
    hidden (`bool`):
        Whether or not this comment has been hidden.

---
## DiscussionStatusChange
```python
from community import DiscussionStatusChange
```

A change of status in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    new_status (`str`):
        The status of the Discussion / Pull Request after the change.
        It can be one of:
            * `"open"`
            * `"closed"`
            * `"merged"` (only for Pull Requests )

---
## DiscussionCommit
```python
from community import DiscussionCommit
```

A commit in a Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    summary (`str`):
        The summary of the commit.
    oid (`str`):
        The OID / SHA of the commit, as a hexadecimal string.

---
## DiscussionTitleChange
```python
from community import DiscussionTitleChange
```

A rename event in a Discussion / Pull Request.

Subclass of [`DiscussionEvent`].

Attributes:
    id (`str`):
        The ID of the event. An hexadecimal string.
    type (`str`):
        The type of the event.
    created_at (`datetime`):
        A [`datetime`](https://docs.python.org/3/library/datetime.html?highlight=datetime#datetime.datetime)
        object holding the creation timestamp for the event.
    author (`str`):
        The username of the Discussion / Pull Request author.
        Can be `"deleted"` if the user has been deleted since.
    old_title (`str`):
        The previous title for the Discussion / Pull Request.
    new_title (`str`):
        The new title.

---
## deserialize_event
```python
from community import deserialize_event
```

Instantiates a [`DiscussionEvent`] from a dict

---
## git_reference
```python
from community import git_reference
```

If this is a Pull Request , returns the git reference to which changes can be pushed.
Returns `None` otherwise.

---
## url
```python
from community import url
```

Returns the URL of the discussion on the Hub.

---
## rendered
```python
from community import rendered
```

The rendered comment, as a HTML string

---
## last_edited_at
```python
from community import last_edited_at
```

The last edit time, as a `datetime` object.

---
## last_edited_by
```python
from community import last_edited_by
```

The last edit time, as a `datetime` object.

---
## edit_history
```python
from community import edit_history
```

The edit history of the comment

---
## number_of_edits
```python
from community import number_of_edits
```



---
## __name__
```python
from _login import __name__
```

Contains methods to log in to the Hub.

---
## login
```python
from _login import login
```

Login the machine to access the Hub.

The `token` is persisted in cache and set as a git credential. Once done, the machine
is logged in and the access token will be available across all `huggingface_hub`
components. If `token` is not provided, it will be prompted to the user either with
a widget (in a notebook) or via the terminal.

To log in from outside of a script, one can also use `huggingface-cli login` which is
a cli command that wraps [`login`].

<Tip>

[`login`] is a drop-in replacement method for [`notebook_login`] as it wraps and
extends its capabilities.

</Tip>

<Tip>

When the token is not passed, [`login`] will automatically detect if the script runs
in a notebook or not. However, this detection might not be accurate due to the
variety of notebooks that exists nowadays. If that is the case, you can always force
the UI by using [`notebook_login`] or [`interpreter_login`].

</Tip>

Args:
    token (`str`, *optional*):
        User access token to generate from https://huggingface.co/settings/token.
    add_to_git_credential (`bool`, defaults to `False`):
        If `True`, token will be set as git credential. If no git credential helper
        is configured, a warning will be displayed to the user. If `token` is `None`,
        the value of `add_to_git_credential` is ignored and will be prompted again
        to the end user.
    new_session (`bool`, defaults to `True`):
        If `True`, will request a token even if one is already saved on the machine.
    write_permission (`bool`, defaults to `False`):
        If `True`, requires a token with write permission.
Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If an organization token is passed. Only personal account tokens are valid
        to log in.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If token is invalid.
    [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
        If running in a notebook but `ipywidgets` is not installed.

---
## logout
```python
from _login import logout
```

Logout the machine from the Hub.

Token is deleted from the machine and removed from git credential.

---
## interpreter_login
```python
from _login import interpreter_login
```

Displays a prompt to log in to the HF website and store the token.

This is equivalent to [`login`] without passing a token when not run in a notebook.
[`interpreter_login`] is useful if you want to force the use of the terminal prompt
instead of a notebook widget.

For more details, see [`login`].

Args:
    new_session (`bool`, defaults to `True`):
        If `True`, will request a token even if one is already saved on the machine.
    write_permission (`bool`, defaults to `False`):
        If `True`, requires a token with write permission.

---
## notebook_login
```python
from _login import notebook_login
```

Displays a widget to log in to the HF website and store the token.

This is equivalent to [`login`] without passing a token when run in a notebook.
[`notebook_login`] is useful if you want to force the use of the notebook widget
instead of a prompt in the terminal.

For more details, see [`login`].

Args:
    new_session (`bool`, defaults to `True`):
        If `True`, will request a token even if one is already saved on the machine.
    write_permission (`bool`, defaults to `False`):
        If `True`, requires a token with write permission.

---
## _login
```python
from _login import _login
```



---
## _current_token_okay
```python
from _login import _current_token_okay
```

Check if the current token is valid.

Args:
    write_permission (`bool`, defaults to `False`):
        If `True`, requires a token with write permission.

Returns:
    `bool`: `True` if the current token is valid, `False` otherwise.

---
## _is_git_credential_helper_configured
```python
from _login import _is_git_credential_helper_configured
```

Check if a git credential helper is configured.

Warns user if not the case (except for Google Colab where "store" is set by default
by `huggingface_hub`).

---
## _set_store_as_git_credential_helper_globally
```python
from _login import _set_store_as_git_credential_helper_globally
```

Set globally the credential.helper to `store`.

To be used only in Google Colab as we assume the user doesn't care about the git
credential config. It is the only particular case where we don't want to display the
warning message in [`notebook_login()`].

Related:
- https://github.com/huggingface/huggingface_hub/issues/1043
- https://github.com/huggingface/huggingface_hub/issues/1051
- https://git-scm.com/docs/git-credential-store

---
## login_token_event
```python
from _login import login_token_event
```

Event handler for the login button.

Args:
    write_permission (`bool`, defaults to `False`):
        If `True`, requires a token with write permission.

---
## __name__
```python
from inference_api import __name__
```



---
## InferenceApi
```python
from inference_api import InferenceApi
```

Client to configure requests and make calls to the HuggingFace Inference API.

Example:

```python
>>> from huggingface_hub.inference_api import InferenceApi

>>> # Mask-fill example
>>> inference = InferenceApi("bert-base-uncased")
>>> inference(inputs="The goal of life is [MASK].")
[{'sequence': 'the goal of life is life.', 'score': 0.10933292657136917, 'token': 2166, 'token_str': 'life'}]

>>> # Question Answering example
>>> inference = InferenceApi("deepset/roberta-base-squad2")
>>> inputs = {
...     "question": "What's my name?",
...     "context": "My name is Clara and I live in Berkeley.",
... }
>>> inference(inputs)
{'score': 0.9326569437980652, 'start': 11, 'end': 16, 'answer': 'Clara'}

>>> # Zero-shot example
>>> inference = InferenceApi("typeform/distilbert-base-uncased-mnli")
>>> inputs = "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"
>>> params = {"candidate_labels": ["refund", "legal", "faq"]}
>>> inference(inputs, params)
{'sequence': 'Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!', 'labels': ['refund', 'faq', 'legal'], 'scores': [0.9378499388694763, 0.04914155602455139, 0.013008488342165947]}

>>> # Overriding configured task
>>> inference = InferenceApi("bert-base-uncased", task="feature-extraction")

>>> # Text-to-image
>>> inference = InferenceApi("stabilityai/stable-diffusion-2-1")
>>> inference("cat")
<PIL.PngImagePlugin.PngImageFile image (...)>

>>> # Return as raw response to parse the output yourself
>>> inference = InferenceApi("mio/amadeus")
>>> response = inference("hello world", raw_response=True)
>>> response.headers
{"Content-Type": "audio/flac", ...}
>>> response.content # raw bytes from server
b'(...)'
```

---
## __init__
```python
from inference_api import __init__
```

Inits headers and API call information.

Args:
    repo_id (``str``):
        Id of repository (e.g. `user/bert-base-uncased`).
    task (``str``, `optional`, defaults ``None``):
        Whether to force a task instead of using task specified in the
        repository.
    token (`str`, `optional`):
        The API token to use as HTTP bearer authorization. This is not
        the authentication token. You can find the token in
        https://huggingface.co/settings/token. Alternatively, you can
        find both your organizations and personal API tokens using
        `HfApi().whoami(token)`.
    gpu (`bool`, `optional`, defaults `False`):
        Whether to use GPU instead of CPU for inference(requires Startup
        plan at least).

---
## __repr__
```python
from inference_api import __repr__
```



---
## __call__
```python
from inference_api import __call__
```

Make a call to the Inference API.

Args:
    inputs (`str` or `Dict` or `List[str]` or `List[List[str]]`, *optional*):
        Inputs for the prediction.
    params (`Dict`, *optional*):
        Additional parameters for the models. Will be sent as `parameters` in the
        payload.
    data (`bytes`, *optional*):
        Bytes content of the request. In this case, leave `inputs` and `params` empty.
    raw_response (`bool`, defaults to `False`):
        If `True`, the raw `Response` object is returned. You can parse its content
        as preferred. By default, the content is parsed into a more practical format
        (json dictionary or PIL Image for example).

---
## __name__
```python
from _multi_commits import __name__
```

Contains utilities to multi-commits (i.e. push changes iteratively on a PR).

---
## MultiCommitException
```python
from _multi_commits import MultiCommitException
```

Base exception for any exception happening while doing a multi-commit.

---
## plan_multi_commits
```python
from _multi_commits import plan_multi_commits
```

Split a list of operations in a list of commits to perform.

Implementation follows a sub-optimal (yet simple) algorithm:
1. Delete operations are grouped together by commits of maximum `max_operations_per_commits` operations.
2. All additions exceeding `max_upload_size_per_commit` are committed 1 by 1.
3. All remaining additions are grouped together and split each time the `max_operations_per_commit` or the
   `max_upload_size_per_commit` limit is reached.

We do not try to optimize the splitting to get the lowest number of commits as this is a NP-hard problem (see
[bin packing problem](https://en.wikipedia.org/wiki/Bin_packing_problem)). For our use case, it is not problematic
to use a sub-optimal solution so we favored an easy-to-explain implementation.

Args:
    operations (`List` of [`~hf_api.CommitOperation`]):
        The list of operations to split into commits.
    max_operations_per_commit (`int`):
        Maximum number of operations in a single commit. Defaults to 50.
    max_upload_size_per_commit (`int`):
        Maximum size to upload (in bytes) in a single commit. Defaults to 2GB. Files bigger than this limit are
        uploaded, 1 per commit.

Returns:
    `Tuple[List[List[CommitOperationAdd]], List[List[CommitOperationDelete]]]`: a tuple. First item is a list of
    lists of [`CommitOperationAdd`] representing the addition commits to push. The second item is a list of lists
    of [`CommitOperationDelete`] representing the deletion commits.

<Tip warning={true}>

`plan_multi_commits` is experimental. Its API and behavior is subject to change in the future without prior notice.

</Tip>

Example:
```python
>>> from huggingface_hub import HfApi, plan_multi_commits
>>> addition_commits, deletion_commits = plan_multi_commits(
...     operations=[
...          CommitOperationAdd(...),
...          CommitOperationAdd(...),
...          CommitOperationDelete(...),
...          CommitOperationDelete(...),
...          CommitOperationAdd(...),
...     ],
... )
>>> HfApi().create_commits_on_pr(
...     repo_id="my-cool-model",
...     addition_commits=addition_commits,
...     deletion_commits=deletion_commits,
...     (...)
...     verbose=True,
... )
```

<Tip warning={true}>

The initial order of the operations is not guaranteed! All deletions will be performed before additions. If you are
not updating multiple times the same file, you are fine.

</Tip>

---
## MultiCommitStep
```python
from _multi_commits import MultiCommitStep
```

Dataclass containing a list of CommitOperation to commit at once.

A [`MultiCommitStep`] is one atomic part of a [`MultiCommitStrategy`]. Each step is identified by its own
deterministic ID based on the list of commit operations (hexadecimal sha256). ID is persistent between re-runs if
the list of commits is kept the same.

---
## MultiCommitStrategy
```python
from _multi_commits import MultiCommitStrategy
```

Dataclass containing a list of [`MultiCommitStep`] to commit iteratively.

A strategy is identified by its own deterministic ID based on the list of its steps (hexadecimal sha256). ID is
persistent between re-runs if the list of commits is kept the same.

---
## multi_commit_create_pull_request
```python
from _multi_commits import multi_commit_create_pull_request
```



---
## multi_commit_generate_comment
```python
from _multi_commits import multi_commit_generate_comment
```



---
## multi_commit_parse_pr_description
```python
from _multi_commits import multi_commit_parse_pr_description
```



---
## __post_init__
```python
from _multi_commits import __post_init__
```



---
## __str__
```python
from _multi_commits import __str__
```

Format a step for PR description.

Formatting can be changed in the future as long as it is single line, starts with `- [ ]`/`- [x]` and contains
`self.id`. Must be able to match `STEP_ID_REGEX`.

---
## __name__
```python
from _inference_endpoints import __name__
```



---
## InferenceEndpointStatus
```python
from _inference_endpoints import InferenceEndpointStatus
```



---
## InferenceEndpointType
```python
from _inference_endpoints import InferenceEndpointType
```



---
## InferenceEndpoint
```python
from _inference_endpoints import InferenceEndpoint
```

Contains information about a deployed Inference Endpoint.

Args:
    name (`str`):
        The unique name of the Inference Endpoint.
    namespace (`str`):
        The namespace where the Inference Endpoint is located.
    repository (`str`):
        The name of the model repository deployed on this Inference Endpoint.
    status ([`InferenceEndpointStatus`]):
        The current status of the Inference Endpoint.
    url (`str`, *optional*):
        The URL of the Inference Endpoint, if available. Only a deployed Inference Endpoint will have a URL.
    framework (`str`):
        The machine learning framework used for the model.
    revision (`str`):
        The specific model revision deployed on the Inference Endpoint.
    task (`str`):
        The task associated with the deployed model.
    created_at (`datetime.datetime`):
        The timestamp when the Inference Endpoint was created.
    updated_at (`datetime.datetime`):
        The timestamp of the last update of the Inference Endpoint.
    type ([`InferenceEndpointType`]):
        The type of the Inference Endpoint (public, protected, private).
    raw (`Dict`):
        The raw dictionary data returned from the API.
    token (`str` or `bool`, *optional*):
        Authentication token for the Inference Endpoint, if set when requesting the API. Will default to the
        locally saved token if not provided. Pass `token=False` if you don't want to send your token to the server.

Example:
    ```python
    >>> from huggingface_hub import get_inference_endpoint
    >>> endpoint = get_inference_endpoint("my-text-to-image")
    >>> endpoint
    InferenceEndpoint(name='my-text-to-image', ...)

    # Get status
    >>> endpoint.status
    'running'
    >>> endpoint.url
    'https://my-text-to-image.region.vendor.endpoints.huggingface.cloud'

    # Run inference
    >>> endpoint.client.text_to_image(...)

    # Pause endpoint to save $$$
    >>> endpoint.pause()

    # ...
    # Resume and wait for deployment
    >>> endpoint.resume()
    >>> endpoint.wait()
    >>> endpoint.client.text_to_image(...)
    ```

---
## from_raw
```python
from _inference_endpoints import from_raw
```

Initialize object from raw dictionary.

---
## __post_init__
```python
from _inference_endpoints import __post_init__
```

Populate fields from raw dictionary.

---
## client
```python
from _inference_endpoints import client
```

Returns a client to make predictions on this Inference Endpoint.

Returns:
    [`InferenceClient`]: an inference client pointing to the deployed endpoint.

Raises:
    [`InferenceEndpointError`]: If the Inference Endpoint is not yet deployed.

---
## async_client
```python
from _inference_endpoints import async_client
```

Returns a client to make predictions on this Inference Endpoint.

Returns:
    [`AsyncInferenceClient`]: an asyncio-compatible inference client pointing to the deployed endpoint.

Raises:
    [`InferenceEndpointError`]: If the Inference Endpoint is not yet deployed.

---
## wait
```python
from _inference_endpoints import wait
```

Wait for the Inference Endpoint to be deployed.

Information from the server will be fetched every 1s. If the Inference Endpoint is not deployed after `timeout`
seconds, a [`InferenceEndpointTimeoutError`] will be raised. The [`InferenceEndpoint`] will be mutated in place with the latest
data.

Args:
    timeout (`int`, *optional*):
        The maximum time to wait for the Inference Endpoint to be deployed, in seconds. If `None`, will wait
        indefinitely.
    refresh_every (`int`, *optional*):
        The time to wait between each fetch of the Inference Endpoint status, in seconds. Defaults to 5s.

Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

Raises:
    [`InferenceEndpointError`]
        If the Inference Endpoint ended up in a failed state.
    [`InferenceEndpointTimeoutError`]
        If the Inference Endpoint is not deployed after `timeout` seconds.

---
## fetch
```python
from _inference_endpoints import fetch
```

Fetch latest information about the Inference Endpoint.

Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

---
## update
```python
from _inference_endpoints import update
```

Update the Inference Endpoint.

This method allows the update of either the compute configuration, the deployed model, or both. All arguments are
optional but at least one must be provided.

This is an alias for [`HfApi.update_inference_endpoint`]. The current object is mutated in place with the
latest data from the server.

Args:
    accelerator (`str`, *optional*):
        The hardware accelerator to be used for inference (e.g. `"cpu"`).
    instance_size (`str`, *optional*):
        The size or type of the instance to be used for hosting the model (e.g. `"x4"`).
    instance_type (`str`, *optional*):
        The cloud instance type where the Inference Endpoint will be deployed (e.g. `"intel-icl"`).
    min_replica (`int`, *optional*):
        The minimum number of replicas (instances) to keep running for the Inference Endpoint.
    max_replica (`int`, *optional*):
        The maximum number of replicas (instances) to scale to for the Inference Endpoint.
    scale_to_zero_timeout (`int`, *optional*):
        The duration in minutes before an inactive endpoint is scaled to zero.

    repository (`str`, *optional*):
        The name of the model repository associated with the Inference Endpoint (e.g. `"gpt2"`).
    framework (`str`, *optional*):
        The machine learning framework used for the model (e.g. `"custom"`).
    revision (`str`, *optional*):
        The specific model revision to deploy on the Inference Endpoint (e.g. `"6c0e6080953db56375760c0471a8c5f2929baf11"`).
    task (`str`, *optional*):
        The task on which to deploy the model (e.g. `"text-classification"`).
    custom_image (`Dict`, *optional*):
        A custom Docker image to use for the Inference Endpoint. This is useful if you want to deploy an
        Inference Endpoint running on the `text-generation-inference` (TGI) framework (see examples).
    secrets (`Dict[str, str]`, *optional*):
        Secret values to inject in the container environment.
Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

---
## pause
```python
from _inference_endpoints import pause
```

Pause the Inference Endpoint.

A paused Inference Endpoint will not be charged. It can be resumed at any time using [`InferenceEndpoint.resume`].
This is different than scaling the Inference Endpoint to zero with [`InferenceEndpoint.scale_to_zero`], which
would be automatically restarted when a request is made to it.

This is an alias for [`HfApi.pause_inference_endpoint`]. The current object is mutated in place with the
latest data from the server.

Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

---
## resume
```python
from _inference_endpoints import resume
```

Resume the Inference Endpoint.

This is an alias for [`HfApi.resume_inference_endpoint`]. The current object is mutated in place with the
latest data from the server.

Args:
    running_ok (`bool`, *optional*):
        If `True`, the method will not raise an error if the Inference Endpoint is already running. Defaults to
        `True`.

Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

---
## scale_to_zero
```python
from _inference_endpoints import scale_to_zero
```

Scale Inference Endpoint to zero.

An Inference Endpoint scaled to zero will not be charged. It will be resume on the next request to it, with a
cold start delay. This is different than pausing the Inference Endpoint with [`InferenceEndpoint.pause`], which
would require a manual resume with [`InferenceEndpoint.resume`].

This is an alias for [`HfApi.scale_to_zero_inference_endpoint`]. The current object is mutated in place with the
latest data from the server.

Returns:
    [`InferenceEndpoint`]: the same Inference Endpoint, mutated in place with the latest data.

---
## delete
```python
from _inference_endpoints import delete
```

Delete the Inference Endpoint.

This operation is not reversible. If you don't want to be charged for an Inference Endpoint, it is preferable
to pause it with [`InferenceEndpoint.pause`] or scale it to zero with [`InferenceEndpoint.scale_to_zero`].

This is an alias for [`HfApi.delete_inference_endpoint`].

---
## _populate_from_raw
```python
from _inference_endpoints import _populate_from_raw
```

Populate fields from raw dictionary.

Called in __post_init__ + each time the Inference Endpoint is updated.

---
## __name__
```python
from hf_api import __name__
```



---
## repo_type_and_id_from_hf_id
```python
from hf_api import repo_type_and_id_from_hf_id
```

Returns the repo type and ID from a huggingface.co URL linking to a
repository

Args:
    hf_id (`str`):
        An URL or ID of a repository on the HF hub. Accepted values are:

        - https://huggingface.co/<repo_type>/<namespace>/<repo_id>
        - https://huggingface.co/<namespace>/<repo_id>
        - hf://<repo_type>/<namespace>/<repo_id>
        - hf://<namespace>/<repo_id>
        - <repo_type>/<namespace>/<repo_id>
        - <namespace>/<repo_id>
        - <repo_id>
    hub_url (`str`, *optional*):
        The URL of the HuggingFace Hub, defaults to https://huggingface.co

Returns:
    A tuple with three items: repo_type (`str` or `None`), namespace (`str` or
    `None`) and repo_id (`str`).

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If URL cannot be parsed.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `repo_type` is unknown.

---
## LastCommitInfo
```python
from hf_api import LastCommitInfo
```



---
## BlobLfsInfo
```python
from hf_api import BlobLfsInfo
```



---
## BlobSecurityInfo
```python
from hf_api import BlobSecurityInfo
```



---
## TransformersInfo
```python
from hf_api import TransformersInfo
```



---
## SafeTensorsInfo
```python
from hf_api import SafeTensorsInfo
```



---
## CommitInfo
```python
from hf_api import CommitInfo
```

Data structure containing information about a newly created commit.

Returned by any method that creates a commit on the Hub: [`create_commit`], [`upload_file`], [`upload_folder`],
[`delete_file`], [`delete_folder`]. It inherits from `str` for backward compatibility but using methods specific
to `str` is deprecated.

Attributes:
    commit_url (`str`):
        Url where to find the commit.

    commit_message (`str`):
        The summary (first line) of the commit that has been created.

    commit_description (`str`):
        Description of the commit that has been created. Can be empty.

    oid (`str`):
        Commit hash id. Example: `"91c54ad1727ee830252e457677f467be0bfd8a57"`.

    pr_url (`str`, *optional*):
        Url to the PR that has been created, if any. Populated when `create_pr=True`
        is passed.

    pr_revision (`str`, *optional*):
        Revision of the PR that has been created, if any. Populated when
        `create_pr=True` is passed. Example: `"refs/pr/1"`.

    pr_num (`int`, *optional*):
        Number of the PR discussion that has been created, if any. Populated when
        `create_pr=True` is passed. Can be passed as `discussion_num` in
        [`get_discussion_details`]. Example: `1`.

    repo_url (`RepoUrl`):
        Repo URL of the commit containing info like repo_id, repo_type, etc.

    _url (`str`, *optional*):
        Legacy url for `str` compatibility. Can be the url to the uploaded file on the Hub (if returned by
        [`upload_file`]), to the uploaded folder on the Hub (if returned by [`upload_folder`]) or to the commit on
        the Hub (if returned by [`create_commit`]). Defaults to `commit_url`. It is deprecated to use this
        attribute. Please use `commit_url` instead.

---
## AccessRequest
```python
from hf_api import AccessRequest
```

Data structure containing information about a user access request.

Attributes:
    username (`str`):
        Username of the user who requested access.
    fullname (`str`):
        Fullname of the user who requested access.
    email (`Optional[str]`):
        Email of the user who requested access.
        Can only be `None` in the /accepted list if the user was granted access manually.
    timestamp (`datetime`):
        Timestamp of the request.
    status (`Literal["pending", "accepted", "rejected"]`):
        Status of the request. Can be one of `["pending", "accepted", "rejected"]`.
    fields (`Dict[str, Any]`, *optional*):
        Additional fields filled by the user in the gate form.

---
## WebhookWatchedItem
```python
from hf_api import WebhookWatchedItem
```

Data structure containing information about the items watched by a webhook.

Attributes:
    type (`Literal["dataset", "model", "org", "space", "user"]`):
        Type of the item to be watched. Can be one of `["dataset", "model", "org", "space", "user"]`.
    name (`str`):
        Name of the item to be watched. Can be the username, organization name, model name, dataset name or space name.

---
## WebhookInfo
```python
from hf_api import WebhookInfo
```

Data structure containing information about a webhook.

Attributes:
    id (`str`):
        ID of the webhook.
    url (`str`):
        URL of the webhook.
    watched (`List[WebhookWatchedItem]`):
        List of items watched by the webhook, see [`WebhookWatchedItem`].
    domains (`List[WEBHOOK_DOMAIN_T]`):
        List of domains the webhook is watching. Can be one of `["repo", "discussions"]`.
    secret (`str`, *optional*):
        Secret of the webhook.
    disabled (`bool`):
        Whether the webhook is disabled or not.

---
## RepoUrl
```python
from hf_api import RepoUrl
```

Subclass of `str` describing a repo URL on the Hub.

`RepoUrl` is returned by `HfApi.create_repo`. It inherits from `str` for backward
compatibility. At initialization, the URL is parsed to populate properties:
- endpoint (`str`)
- namespace (`Optional[str]`)
- repo_name (`str`)
- repo_id (`str`)
- repo_type (`Literal["model", "dataset", "space"]`)
- url (`str`)

Args:
    url (`Any`):
        String value of the repo url.
    endpoint (`str`, *optional*):
        Endpoint of the Hub. Defaults to <https://huggingface.co>.

Example:
```py
>>> RepoUrl('https://huggingface.co/gpt2')
RepoUrl('https://huggingface.co/gpt2', endpoint='https://huggingface.co', repo_type='model', repo_id='gpt2')

>>> RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.co')
RepoUrl('https://hub-ci.huggingface.co/datasets/dummy_user/dummy_dataset', endpoint='https://hub-ci.huggingface.co', repo_type='dataset', repo_id='dummy_user/dummy_dataset')

>>> RepoUrl('hf://datasets/my-user/my-dataset')
RepoUrl('hf://datasets/my-user/my-dataset', endpoint='https://huggingface.co', repo_type='dataset', repo_id='user/dataset')

>>> HfApi.create_repo("dummy_model")
RepoUrl('https://huggingface.co/Wauplin/dummy_model', endpoint='https://huggingface.co', repo_type='model', repo_id='Wauplin/dummy_model')
```

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If URL cannot be parsed.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `repo_type` is unknown.

---
## RepoSibling
```python
from hf_api import RepoSibling
```

Contains basic information about a repo file inside a repo on the Hub.

<Tip>

All attributes of this class are optional except `rfilename`. This is because only the file names are returned when
listing repositories on the Hub (with [`list_models`], [`list_datasets`] or [`list_spaces`]). If you need more
information like file size, blob id or lfs details, you must request them specifically from one repo at a time
(using [`model_info`], [`dataset_info`] or [`space_info`]) as it adds more constraints on the backend server to
retrieve these.

</Tip>

Attributes:
    rfilename (str):
        file name, relative to the repo root.
    size (`int`, *optional*):
        The file's size, in bytes. This attribute is defined when `files_metadata` argument of [`repo_info`] is set
        to `True`. It's `None` otherwise.
    blob_id (`str`, *optional*):
        The file's git OID. This attribute is defined when `files_metadata` argument of [`repo_info`] is set to
        `True`. It's `None` otherwise.
    lfs (`BlobLfsInfo`, *optional*):
        The file's LFS metadata. This attribute is defined when`files_metadata` argument of [`repo_info`] is set to
        `True` and the file is stored with Git LFS. It's `None` otherwise.

---
## RepoFile
```python
from hf_api import RepoFile
```

Contains information about a file on the Hub.

Attributes:
    path (str):
        file path relative to the repo root.
    size (`int`):
        The file's size, in bytes.
    blob_id (`str`):
        The file's git OID.
    lfs (`BlobLfsInfo`):
        The file's LFS metadata.
    last_commit (`LastCommitInfo`, *optional*):
        The file's last commit metadata. Only defined if [`list_repo_tree`] and [`get_paths_info`]
        are called with `expand=True`.
    security (`BlobSecurityInfo`, *optional*):
        The file's security scan metadata. Only defined if [`list_repo_tree`] and [`get_paths_info`]
        are called with `expand=True`.

---
## RepoFolder
```python
from hf_api import RepoFolder
```

Contains information about a folder on the Hub.

Attributes:
    path (str):
        folder path relative to the repo root.
    tree_id (`str`):
        The folder's git OID.
    last_commit (`LastCommitInfo`, *optional*):
        The folder's last commit metadata. Only defined if [`list_repo_tree`] and [`get_paths_info`]
        are called with `expand=True`.

---
## ModelInfo
```python
from hf_api import ModelInfo
```

Contains information about a model on the Hub.

<Tip>

Most attributes of this class are optional. This is because the data returned by the Hub depends on the query made.
In general, the more specific the query, the more information is returned. On the contrary, when listing models
using [`list_models`] only a subset of the attributes are returned.

</Tip>

Attributes:
    id (`str`):
        ID of model.
    author (`str`, *optional*):
        Author of the model.
    sha (`str`, *optional*):
        Repo SHA at this particular revision.
    created_at (`datetime`, *optional*):
        Date of creation of the repo on the Hub. Note that the lowest value is `2022-03-02T23:29:04.000Z`,
        corresponding to the date when we began to store creation dates.
    last_modified (`datetime`, *optional*):
        Date of last commit to the repo.
    private (`bool`):
        Is the repo private.
    disabled (`bool`, *optional*):
        Is the repo disabled.
    downloads (`int`):
        Number of downloads of the model over the last 30 days.
    downloads_all_time (`int`):
        Cumulated number of downloads of the model since its creation.
    gated (`Literal["auto", "manual", False]`, *optional*):
        Is the repo gated.
        If so, whether there is manual or automatic approval.
    inference (`Literal["cold", "frozen", "warm"]`, *optional*):
        Status of the model on the inference API.
        Warm models are available for immediate use. Cold models will be loaded on first inference call.
        Frozen models are not available in Inference API.
    likes (`int`):
        Number of likes of the model.
    library_name (`str`, *optional*):
        Library associated with the model.
    tags (`List[str]`):
        List of tags of the model. Compared to `card_data.tags`, contains extra tags computed by the Hub
        (e.g. supported libraries, model's arXiv).
    pipeline_tag (`str`, *optional*):
        Pipeline tag associated with the model.
    mask_token (`str`, *optional*):
        Mask token used by the model.
    widget_data (`Any`, *optional*):
        Widget data associated with the model.
    model_index (`Dict`, *optional*):
        Model index for evaluation.
    config (`Dict`, *optional*):
        Model configuration.
    transformers_info (`TransformersInfo`, *optional*):
        Transformers-specific info (auto class, processor, etc.) associated with the model.
    trending_score (`int`, *optional*):
        Trending score of the model.
    card_data (`ModelCardData`, *optional*):
        Model Card Metadata  as a [`huggingface_hub.repocard_data.ModelCardData`] object.
    siblings (`List[RepoSibling]`):
        List of [`huggingface_hub.hf_api.RepoSibling`] objects that constitute the model.
    spaces (`List[str]`, *optional*):
        List of spaces using the model.
    safetensors (`SafeTensorsInfo`, *optional*):
        Model's safetensors information.

---
## DatasetInfo
```python
from hf_api import DatasetInfo
```

Contains information about a dataset on the Hub.

<Tip>

Most attributes of this class are optional. This is because the data returned by the Hub depends on the query made.
In general, the more specific the query, the more information is returned. On the contrary, when listing datasets
using [`list_datasets`] only a subset of the attributes are returned.

</Tip>

Attributes:
    id (`str`):
        ID of dataset.
    author (`str`):
        Author of the dataset.
    sha (`str`):
        Repo SHA at this particular revision.
    created_at (`datetime`, *optional*):
        Date of creation of the repo on the Hub. Note that the lowest value is `2022-03-02T23:29:04.000Z`,
        corresponding to the date when we began to store creation dates.
    last_modified (`datetime`, *optional*):
        Date of last commit to the repo.
    private (`bool`):
        Is the repo private.
    disabled (`bool`, *optional*):
        Is the repo disabled.
    gated (`Literal["auto", "manual", False]`, *optional*):
        Is the repo gated.
        If so, whether there is manual or automatic approval.
    downloads (`int`):
        Number of downloads of the dataset over the last 30 days.
    downloads_all_time (`int`):
        Cumulated number of downloads of the model since its creation.
    likes (`int`):
        Number of likes of the dataset.
    tags (`List[str]`):
        List of tags of the dataset.
    card_data (`DatasetCardData`, *optional*):
        Model Card Metadata  as a [`huggingface_hub.repocard_data.DatasetCardData`] object.
    siblings (`List[RepoSibling]`):
        List of [`huggingface_hub.hf_api.RepoSibling`] objects that constitute the dataset.
    paperswithcode_id (`str`, *optional*):
        Papers with code ID of the dataset.
    trending_score (`int`, *optional*):
        Trending score of the dataset.

---
## SpaceInfo
```python
from hf_api import SpaceInfo
```

Contains information about a Space on the Hub.

<Tip>

Most attributes of this class are optional. This is because the data returned by the Hub depends on the query made.
In general, the more specific the query, the more information is returned. On the contrary, when listing spaces
using [`list_spaces`] only a subset of the attributes are returned.

</Tip>

Attributes:
    id (`str`):
        ID of the Space.
    author (`str`, *optional*):
        Author of the Space.
    sha (`str`, *optional*):
        Repo SHA at this particular revision.
    created_at (`datetime`, *optional*):
        Date of creation of the repo on the Hub. Note that the lowest value is `2022-03-02T23:29:04.000Z`,
        corresponding to the date when we began to store creation dates.
    last_modified (`datetime`, *optional*):
        Date of last commit to the repo.
    private (`bool`):
        Is the repo private.
    gated (`Literal["auto", "manual", False]`, *optional*):
        Is the repo gated.
        If so, whether there is manual or automatic approval.
    disabled (`bool`, *optional*):
        Is the Space disabled.
    host (`str`, *optional*):
        Host URL of the Space.
    subdomain (`str`, *optional*):
        Subdomain of the Space.
    likes (`int`):
        Number of likes of the Space.
    tags (`List[str]`):
        List of tags of the Space.
    siblings (`List[RepoSibling]`):
        List of [`huggingface_hub.hf_api.RepoSibling`] objects that constitute the Space.
    card_data (`SpaceCardData`, *optional*):
        Space Card Metadata  as a [`huggingface_hub.repocard_data.SpaceCardData`] object.
    runtime (`SpaceRuntime`, *optional*):
        Space runtime information as a [`huggingface_hub.hf_api.SpaceRuntime`] object.
    sdk (`str`, *optional*):
        SDK used by the Space.
    models (`List[str]`, *optional*):
        List of models used by the Space.
    datasets (`List[str]`, *optional*):
        List of datasets used by the Space.
    trending_score (`int`, *optional*):
        Trending score of the Space.

---
## MetricInfo
```python
from hf_api import MetricInfo
```

Contains information about a metric on the Hub.

Attributes:
    id (`str`):
        ID of the metric. E.g. `"accuracy"`.
    space_id (`str`):
        ID of the space associated with the metric. E.g. `"Accuracy"`.
    description (`str`):
        Description of the metric.

---
## CollectionItem
```python
from hf_api import CollectionItem
```

Contains information about an item of a Collection (model, dataset, Space or paper).

Attributes:
    item_object_id (`str`):
        Unique ID of the item in the collection.
    item_id (`str`):
        ID of the underlying object on the Hub. Can be either a repo_id or a paper id
        e.g. `"jbilcke-hf/ai-comic-factory"`, `"2307.09288"`.
    item_type (`str`):
        Type of the underlying object. Can be one of `"model"`, `"dataset"`, `"space"` or `"paper"`.
    position (`int`):
        Position of the item in the collection.
    note (`str`, *optional*):
        Note associated with the item, as plain text.

---
## Collection
```python
from hf_api import Collection
```

Contains information about a Collection on the Hub.

Attributes:
    slug (`str`):
        Slug of the collection. E.g. `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    title (`str`):
        Title of the collection. E.g. `"Recent models"`.
    owner (`str`):
        Owner of the collection. E.g. `"TheBloke"`.
    items (`List[CollectionItem]`):
        List of items in the collection.
    last_updated (`datetime`):
        Date of the last update of the collection.
    position (`int`):
        Position of the collection in the list of collections of the owner.
    private (`bool`):
        Whether the collection is private or not.
    theme (`str`):
        Theme of the collection. E.g. `"green"`.
    upvotes (`int`):
        Number of upvotes of the collection.
    description (`str`, *optional*):
        Description of the collection, as plain text.
    url (`str`):
        (property) URL of the collection on the Hub.

---
## GitRefInfo
```python
from hf_api import GitRefInfo
```

Contains information about a git reference for a repo on the Hub.

Attributes:
    name (`str`):
        Name of the reference (e.g. tag name or branch name).
    ref (`str`):
        Full git ref on the Hub (e.g. `"refs/heads/main"` or `"refs/tags/v1.0"`).
    target_commit (`str`):
        OID of the target commit for the ref (e.g. `"e7da7f221d5bf496a48136c0cd264e630fe9fcc8"`)

---
## GitRefs
```python
from hf_api import GitRefs
```

Contains information about all git references for a repo on the Hub.

Object is returned by [`list_repo_refs`].

Attributes:
    branches (`List[GitRefInfo]`):
        A list of [`GitRefInfo`] containing information about branches on the repo.
    converts (`List[GitRefInfo]`):
        A list of [`GitRefInfo`] containing information about "convert" refs on the repo.
        Converts are refs used (internally) to push preprocessed data in Dataset repos.
    tags (`List[GitRefInfo]`):
        A list of [`GitRefInfo`] containing information about tags on the repo.
    pull_requests (`List[GitRefInfo]`, *optional*):
        A list of [`GitRefInfo`] containing information about pull requests on the repo.
        Only returned if `include_prs=True` is set.

---
## GitCommitInfo
```python
from hf_api import GitCommitInfo
```

Contains information about a git commit for a repo on the Hub. Check out [`list_repo_commits`] for more details.

Attributes:
    commit_id (`str`):
        OID of the commit (e.g. `"e7da7f221d5bf496a48136c0cd264e630fe9fcc8"`)
    authors (`List[str]`):
        List of authors of the commit.
    created_at (`datetime`):
        Datetime when the commit was created.
    title (`str`):
        Title of the commit. This is a free-text value entered by the authors.
    message (`str`):
        Description of the commit. This is a free-text value entered by the authors.
    formatted_title (`str`):
        Title of the commit formatted as HTML. Only returned if `formatted=True` is set.
    formatted_message (`str`):
        Description of the commit formatted as HTML. Only returned if `formatted=True` is set.

---
## UserLikes
```python
from hf_api import UserLikes
```

Contains information about a user likes on the Hub.

Attributes:
    user (`str`):
        Name of the user for which we fetched the likes.
    total (`int`):
        Total number of likes.
    datasets (`List[str]`):
        List of datasets liked by the user (as repo_ids).
    models (`List[str]`):
        List of models liked by the user (as repo_ids).
    spaces (`List[str]`):
        List of spaces liked by the user (as repo_ids).

---
## Organization
```python
from hf_api import Organization
```

Contains information about an organization on the Hub.

Attributes:
    avatar_url (`str`):
        URL of the organization's avatar.
    name (`str`):
        Name of the organization on the Hub (unique).
    fullname (`str`):
        Organization's full name.

---
## User
```python
from hf_api import User
```

Contains information about a user on the Hub.

Attributes:
    username (`str`):
        Name of the user on the Hub (unique).
    fullname (`str`):
        User's full name.
    avatar_url (`str`):
        URL of the user's avatar.
    details (`str`, *optional*):
        User's details.
    is_following (`bool`, *optional*):
        Whether the authenticated user is following this user.
    is_pro (`bool`, *optional*):
        Whether the user is a pro user.
    num_models (`int`, *optional*):
        Number of models created by the user.
    num_datasets (`int`, *optional*):
        Number of datasets created by the user.
    num_spaces (`int`, *optional*):
        Number of spaces created by the user.
    num_discussions (`int`, *optional*):
        Number of discussions initiated by the user.
    num_papers (`int`, *optional*):
        Number of papers authored by the user.
    num_upvotes (`int`, *optional*):
        Number of upvotes received by the user.
    num_likes (`int`, *optional*):
        Number of likes given by the user.
    num_following (`int`, *optional*):
        Number of users this user is following.
    num_followers (`int`, *optional*):
        Number of users following this user.
    orgs (list of [`Organization`]):
        List of organizations the user is part of.

---
## future_compatible
```python
from hf_api import future_compatible
```

Wrap a method of `HfApi` to handle `run_as_future=True`.

A method flagged as "future_compatible" will be called in a thread if `run_as_future=True` and return a
`concurrent.futures.Future` instance. Otherwise, it will be called normally and return the result.

---
## HfApi
```python
from hf_api import HfApi
```



---
## _parse_revision_from_pr_url
```python
from hf_api import _parse_revision_from_pr_url
```

Safely parse revision number from a PR url.

Example:
```py
>>> _parse_revision_from_pr_url("https://huggingface.co/bigscience/bloom/discussions/2")
"refs/pr/2"
```

---
## __post_init__
```python
from hf_api import __post_init__
```

Populate pr-related fields after initialization.

See https://docs.python.org/3.10/library/dataclasses.html#post-init-processing.

---
## __new__
```python
from hf_api import __new__
```



---
## __init__
```python
from hf_api import __init__
```

Create a HF client to interact with the Hub via HTTP.

The client is initialized with some high-level settings used in all requests
made to the Hub (HF endpoint, authentication, user agents...). Using the `HfApi`
client is preferred but not mandatory as all of its public methods are exposed
directly at the root of `huggingface_hub`.

Args:
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    library_name (`str`, *optional*):
        The name of the library that is making the HTTP request. Will be added to
        the user-agent header. Example: `"transformers"`.
    library_version (`str`, *optional*):
        The version of the library that is making the HTTP request. Will be added
        to the user-agent header. Example: `"4.24.0"`.
    user_agent (`str`, `dict`, *optional*):
        The user agent info in the form of a dictionary or a single string. It will
        be completed with information about the installed packages.
    headers (`dict`, *optional*):
        Additional headers to be sent with each request. Example: `{"X-My-Header": "value"}`.
        Headers passed here are taking precedence over the default headers.

---
## __repr__
```python
from hf_api import __repr__
```



---
## url
```python
from hf_api import url
```

Returns the URL of the collection on the Hub.

---
## _inner
```python
from hf_api import _inner
```



---
## run_as_future
```python
from hf_api import run_as_future
```

Run a method in the background and return a Future instance.

The main goal is to run methods without blocking the main thread (e.g. to push data during a training).
Background jobs are queued to preserve order but are not ran in parallel. If you need to speed-up your scripts
by parallelizing lots of call to the API, you must setup and use your own [ThreadPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor).

Note: Most-used methods like [`upload_file`], [`upload_folder`] and [`create_commit`] have a `run_as_future: bool`
argument to directly call them in the background. This is equivalent to calling `api.run_as_future(...)` on them
but less verbose.

Args:
    fn (`Callable`):
        The method to run in the background.
    *args, **kwargs:
        Arguments with which the method will be called.

Return:
    `Future`: a [Future](https://docs.python.org/3/library/concurrent.futures.html#future-objects) instance to
    get the result of the task.

Example:
    ```py
    >>> from huggingface_hub import HfApi
    >>> api = HfApi()
    >>> future = api.run_as_future(api.whoami) # instant
    >>> future.done()
    False
    >>> future.result() # wait until complete and return result
    (...)
    >>> future.done()
    True
    ```

---
## whoami
```python
from hf_api import whoami
```

Call HF API to know "whoami".

Args:
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## get_token_permission
```python
from hf_api import get_token_permission
```

Check if a given `token` is valid and return its permissions.

For more details about tokens, please refer to https://huggingface.co/docs/hub/security-tokens#what-are-user-access-tokens.

Args:
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Literal["read", "write", None]`: Permission granted by the token ("read" or "write"). Returns `None` if no
    token passed or token is invalid.

---
## get_model_tags
```python
from hf_api import get_model_tags
```

List all valid model tags as a nested namespace object

---
## get_dataset_tags
```python
from hf_api import get_dataset_tags
```

List all valid dataset tags as a nested namespace object.

---
## list_models
```python
from hf_api import list_models
```

List models hosted on the Huggingface Hub, given some filters.

Args:
    filter (`str` or `Iterable[str]`, *optional*):
        A string or list of string to filter models on the Hub.
    author (`str`, *optional*):
        A string which identify the author (user or organization) of the
        returned models.
    gated (`bool`, *optional*):
        A boolean to filter models on the Hub that are gated or not. By default, all models are returned.
        If `gated=True` is passed, only gated models are returned.
        If `gated=False` is passed, only non-gated models are returned.
    inference (`Literal["cold", "frozen", "warm"]`, *optional*):
        A string to filter models on the Hub by their state on the Inference API.
        Warm models are available for immediate use. Cold models will be loaded on first inference call.
        Frozen models are not available in Inference API.
    library (`str` or `List`, *optional*):
        A string or list of strings of foundational libraries models were
        originally trained from, such as pytorch, tensorflow, or allennlp.
    language (`str` or `List`, *optional*):
        A string or list of strings of languages, both by name and country
        code, such as "en" or "English"
    model_name (`str`, *optional*):
        A string that contain complete or partial names for models on the
        Hub, such as "bert" or "bert-base-cased"
    task (`str` or `List`, *optional*):
        A string or list of strings of tasks models were designed for, such
        as: "fill-mask" or "automatic-speech-recognition"
    trained_dataset (`str` or `List`, *optional*):
        A string tag or a list of string tags of the trained dataset for a
        model on the Hub.
    tags (`str` or `List`, *optional*):
        A string tag or a list of tags to filter models on the Hub by, such
        as `text-generation` or `spacy`.
    search (`str`, *optional*):
        A string that will be contained in the returned model ids.
    pipeline_tag (`str`, *optional*):
        A string pipeline tag to filter models on the Hub by, such as `summarization`.
    emissions_thresholds (`Tuple`, *optional*):
        A tuple of two ints or floats representing a minimum and maximum
        carbon footprint to filter the resulting models with in grams.
    sort (`Literal["last_modified"]` or `str`, *optional*):
        The key with which to sort the resulting models. Possible values
        are the properties of the [`huggingface_hub.hf_api.ModelInfo`] class.
    direction (`Literal[-1]` or `int`, *optional*):
        Direction in which to sort. The value `-1` sorts by descending
        order while all other values sort by ascending order.
    limit (`int`, *optional*):
        The limit on the number of models fetched. Leaving this option
        to `None` fetches all models.
    expand (`List[ExpandModelProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `full`, `cardData` or `fetch_config` are passed.
        Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"gguf"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"`, `"trendingScore"` and `"widgetData"`.
    full (`bool`, *optional*):
        Whether to fetch all model data, including the `last_modified`,
        the `sha`, the files and the `tags`. This is set to `True` by
        default when using a filter.
    cardData (`bool`, *optional*):
        Whether to grab the metadata for the model as well. Can contain
        useful information such as carbon emissions, metrics, and
        datasets trained on.
    fetch_config (`bool`, *optional*):
        Whether to fetch the model configs as well. This is not included
        in `full` due to its size.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.


Returns:
    `Iterable[ModelInfo]`: an iterable of [`huggingface_hub.hf_api.ModelInfo`] objects.

Example usage with the `filter` argument:

```python
>>> from huggingface_hub import HfApi

>>> api = HfApi()

# List all models
>>> api.list_models()

# List only the text classification models
>>> api.list_models(filter="text-classification")

# List only models from the AllenNLP library
>>> api.list_models(filter="allennlp")
```

Example usage with the `search` argument:

```python
>>> from huggingface_hub import HfApi

>>> api = HfApi()

# List all models with "bert" in their name
>>> api.list_models(search="bert")

# List all models with "bert" in their name made by google
>>> api.list_models(search="bert", author="google")
```

---
## list_datasets
```python
from hf_api import list_datasets
```

List datasets hosted on the Huggingface Hub, given some filters.

Args:
    filter (`str` or `Iterable[str]`, *optional*):
        A string or list of string to filter datasets on the hub.
    author (`str`, *optional*):
        A string which identify the author of the returned datasets.
    benchmark (`str` or `List`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub by their official benchmark.
    dataset_name (`str`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub by its name, such as `SQAC` or `wikineural`
    gated (`bool`, *optional*):
        A boolean to filter datasets on the Hub that are gated or not. By default, all datasets are returned.
        If `gated=True` is passed, only gated datasets are returned.
        If `gated=False` is passed, only non-gated datasets are returned.
    language_creators (`str` or `List`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub with how the data was curated, such as `crowdsourced` or
        `machine_generated`.
    language (`str` or `List`, *optional*):
        A string or list of strings representing a two-character language to
        filter datasets by on the Hub.
    multilinguality (`str` or `List`, *optional*):
        A string or list of strings representing a filter for datasets that
        contain multiple languages.
    size_categories (`str` or `List`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub by the size of the dataset such as `100K<n<1M` or
        `1M<n<10M`.
    tags (`str` or `List`, *optional*):
        A string tag or a list of tags to filter datasets on the Hub.
    task_categories (`str` or `List`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub by the designed task, such as `audio_classification` or
        `named_entity_recognition`.
    task_ids (`str` or `List`, *optional*):
        A string or list of strings that can be used to identify datasets on
        the Hub by the specific task such as `speech_emotion_recognition` or
        `paraphrase`.
    search (`str`, *optional*):
        A string that will be contained in the returned datasets.
    sort (`Literal["last_modified"]` or `str`, *optional*):
        The key with which to sort the resulting datasets. Possible
        values are the properties of the [`huggingface_hub.hf_api.DatasetInfo`] class.
    direction (`Literal[-1]` or `int`, *optional*):
        Direction in which to sort. The value `-1` sorts by descending
        order while all other values sort by ascending order.
    limit (`int`, *optional*):
        The limit on the number of datasets fetched. Leaving this option
        to `None` fetches all datasets.
    expand (`List[ExpandDatasetProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `full` is passed.
        Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"`, `"tags"` and `"trendingScore"`.
    full (`bool`, *optional*):
        Whether to fetch all dataset data, including the `last_modified`,
        the `card_data` and  the files. Can contain useful information such as the
        PapersWithCode ID.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[DatasetInfo]`: an iterable of [`huggingface_hub.hf_api.DatasetInfo`] objects.

Example usage with the `filter` argument:

```python
>>> from huggingface_hub import HfApi

>>> api = HfApi()

# List all datasets
>>> api.list_datasets()


# List only the text classification datasets
>>> api.list_datasets(filter="task_categories:text-classification")


# List only the datasets in russian for language modeling
>>> api.list_datasets(
...     filter=("language:ru", "task_ids:language-modeling")
... )

# List FiftyOne datasets (identified by the tag "fiftyone" in dataset card)
>>> api.list_datasets(tags="fiftyone")
```

Example usage with the `search` argument:

```python
>>> from huggingface_hub import HfApi

>>> api = HfApi()

# List all datasets with "text" in their name
>>> api.list_datasets(search="text")

# List all datasets with "text" in their name made by google
>>> api.list_datasets(search="text", author="google")
```

---
## list_metrics
```python
from hf_api import list_metrics
```

Get the public list of all the metrics on huggingface.co

Returns:
    `List[MetricInfo]`: a list of [`MetricInfo`] objects which.

---
## list_spaces
```python
from hf_api import list_spaces
```

List spaces hosted on the Huggingface Hub, given some filters.

Args:
    filter (`str` or `Iterable`, *optional*):
        A string tag or list of tags that can be used to identify Spaces on the Hub.
    author (`str`, *optional*):
        A string which identify the author of the returned Spaces.
    search (`str`, *optional*):
        A string that will be contained in the returned Spaces.
    datasets (`str` or `Iterable`, *optional*):
        Whether to return Spaces that make use of a dataset.
        The name of a specific dataset can be passed as a string.
    models (`str` or `Iterable`, *optional*):
        Whether to return Spaces that make use of a model.
        The name of a specific model can be passed as a string.
    linked (`bool`, *optional*):
        Whether to return Spaces that make use of either a model or a dataset.
    sort (`Literal["last_modified"]` or `str`, *optional*):
        The key with which to sort the resulting Spaces. Possible
        values are the properties of the [`huggingface_hub.hf_api.SpaceInfo`]` class.
    direction (`Literal[-1]` or `int`, *optional*):
        Direction in which to sort. The value `-1` sorts by descending
        order while all other values sort by ascending order.
    limit (`int`, *optional*):
        The limit on the number of Spaces fetched. Leaving this option
        to `None` fetches all Spaces.
    expand (`List[ExpandSpaceProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `full` is passed.
        Possible values are `"author"`, `"cardData"`, `"datasets"`, `"disabled"`, `"lastModified"`, `"createdAt"`, `"likes"`, `"models"`, `"private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"trendingScore"`.
    full (`bool`, *optional*):
        Whether to fetch all Spaces data, including the `last_modified`, `siblings`
        and `card_data` fields.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[SpaceInfo]`: an iterable of [`huggingface_hub.hf_api.SpaceInfo`] objects.

---
## like
```python
from hf_api import like
```

Like a given repo on the Hub (e.g. set as favorite).

See also [`unlike`] and [`list_liked_repos`].

Args:
    repo_id (`str`):
        The repository to like. Example: `"user/my-cool-model"`.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if liking a dataset or space, `None` or
        `"model"` if liking a model. Default is `None`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.

Example:
```python
>>> from huggingface_hub import like, list_liked_repos, unlike
>>> like("gpt2")
>>> "gpt2" in list_liked_repos().models
True
>>> unlike("gpt2")
>>> "gpt2" in list_liked_repos().models
False
```

---
## unlike
```python
from hf_api import unlike
```

Unlike a given repo on the Hub (e.g. remove from favorite list).

See also [`like`] and [`list_liked_repos`].

Args:
    repo_id (`str`):
        The repository to unlike. Example: `"user/my-cool-model"`.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if unliking a dataset or space, `None` or
        `"model"` if unliking a model. Default is `None`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.

Example:
```python
>>> from huggingface_hub import like, list_liked_repos, unlike
>>> like("gpt2")
>>> "gpt2" in list_liked_repos().models
True
>>> unlike("gpt2")
>>> "gpt2" in list_liked_repos().models
False
```

---
## list_liked_repos
```python
from hf_api import list_liked_repos
```

List all public repos liked by a user on huggingface.co.

This list is public so token is optional. If `user` is not passed, it defaults to
the logged in user.

See also [`like`] and [`unlike`].

Args:
    user (`str`, *optional*):
        Name of the user for which you want to fetch the likes.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`UserLikes`]: object containing the user name and 3 lists of repo ids (1 for
    models, 1 for datasets and 1 for Spaces).

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `user` is not passed and no token found (either from argument or from machine).

Example:
```python
>>> from huggingface_hub import list_liked_repos

>>> likes = list_liked_repos("julien-c")

>>> likes.user
"julien-c"

>>> likes.models
["osanseviero/streamlit_1.15", "Xhaheen/ChatGPT_HF", ...]
```

---
## list_repo_likers
```python
from hf_api import list_repo_likers
```

List all users who liked a given repo on the hugging Face Hub.

See also [`like`] and [`list_liked_repos`].

Args:
    repo_id (`str`):
        The repository to retrieve . Example: `"user/my-cool-model"`.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.

Returns:
    `Iterable[User]`: an iterable of [`huggingface_hub.hf_api.User`] objects.

---
## model_info
```python
from hf_api import model_info
```

Get info on one specific model on huggingface.co

Model can be private if you pass an acceptable token or are logged in.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`, *optional*):
        The revision of the model repository from which to get the
        information.
    timeout (`float`, *optional*):
        Whether to set a timeout for the request to the Hub.
    securityStatus (`bool`, *optional*):
        Whether to retrieve the security status from the model
        repository as well.
    files_metadata (`bool`, *optional*):
        Whether or not to retrieve metadata for files in the repository
        (size, LFS metadata, etc). Defaults to `False`.
    expand (`List[ExpandModelProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `securityStatus` or `files_metadata` are passed.
        Possible values are `"author"`, `"baseModels"`, `"cardData"`, `"childrenModelCount"`, `"config"`, `"createdAt"`, `"disabled"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"gguf"`, `"inference"`, `"lastModified"`, `"library_name"`, `"likes"`, `"mask_token"`, `"model-index"`, `"pipeline_tag"`, `"private"`, `"safetensors"`, `"sha"`, `"siblings"`, `"spaces"`, `"tags"`, `"transformersInfo"`, `"trendingScore"` and `"widgetData"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`huggingface_hub.hf_api.ModelInfo`]: The model repository information.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.

</Tip>

---
## dataset_info
```python
from hf_api import dataset_info
```

Get info on one specific dataset on huggingface.co.

Dataset can be private if you pass an acceptable token.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`, *optional*):
        The revision of the dataset repository from which to get the
        information.
    timeout (`float`, *optional*):
        Whether to set a timeout for the request to the Hub.
    files_metadata (`bool`, *optional*):
        Whether or not to retrieve metadata for files in the repository
        (size, LFS metadata, etc). Defaults to `False`.
    expand (`List[ExpandDatasetProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `files_metadata` is passed.
        Possible values are `"author"`, `"cardData"`, `"citation"`, `"createdAt"`, `"disabled"`, `"description"`, `"downloads"`, `"downloadsAllTime"`, `"gated"`, `"lastModified"`, `"likes"`, `"paperswithcode_id"`, `"private"`, `"siblings"`, `"sha"`, `"tags"` and `"trendingScore"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`hf_api.DatasetInfo`]: The dataset repository information.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.

</Tip>

---
## space_info
```python
from hf_api import space_info
```

Get info on one specific Space on huggingface.co.

Space can be private if you pass an acceptable token.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`, *optional*):
        The revision of the space repository from which to get the
        information.
    timeout (`float`, *optional*):
        Whether to set a timeout for the request to the Hub.
    files_metadata (`bool`, *optional*):
        Whether or not to retrieve metadata for files in the repository
        (size, LFS metadata, etc). Defaults to `False`.
    expand (`List[ExpandSpaceProperty_T]`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `full` is passed.
        Possible values are `"author"`, `"cardData"`, `"createdAt"`, `"datasets"`, `"disabled"`, `"lastModified"`, `"likes"`, `"models"`, `"private"`, `"runtime"`, `"sdk"`, `"siblings"`, `"sha"`, `"subdomain"`, `"tags"` and `"trendingScore"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`~hf_api.SpaceInfo`]: The space repository information.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.

</Tip>

---
## repo_info
```python
from hf_api import repo_info
```

Get the info object for a given repo of a given type.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`, *optional*):
        The revision of the repository from which to get the
        information.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if getting repository info from a dataset or a space,
        `None` or `"model"` if getting repository info from a model. Default is `None`.
    timeout (`float`, *optional*):
        Whether to set a timeout for the request to the Hub.
    expand (`ExpandModelProperty_T` or `ExpandDatasetProperty_T` or `ExpandSpaceProperty_T`, *optional*):
        List properties to return in the response. When used, only the properties in the list will be returned.
        This parameter cannot be used if `files_metadata` is passed.
        For an exhaustive list of available properties, check out [`model_info`], [`dataset_info`] or [`space_info`].
    files_metadata (`bool`, *optional*):
        Whether or not to retrieve metadata for files in the repository
        (size, LFS metadata, etc). Defaults to `False`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Union[SpaceInfo, DatasetInfo, ModelInfo]`: The repository information, as a
    [`huggingface_hub.hf_api.DatasetInfo`], [`huggingface_hub.hf_api.ModelInfo`]
    or [`huggingface_hub.hf_api.SpaceInfo`] object.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.

</Tip>

---
## repo_exists
```python
from hf_api import repo_exists
```

Checks if a repository exists on the Hugging Face Hub.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if getting repository info from a dataset or a space,
        `None` or `"model"` if getting repository info from a model. Default is `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    True if the repository exists, False otherwise.

Examples:
    ```py
    >>> from huggingface_hub import repo_exists
    >>> repo_exists("google/gemma-7b")
    True
    >>> repo_exists("google/not-a-repo")
    False
    ```

---
## revision_exists
```python
from hf_api import revision_exists
```

Checks if a specific revision exists on a repo on the Hugging Face Hub.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    revision (`str`):
        The revision of the repository to check.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if getting repository info from a dataset or a space,
        `None` or `"model"` if getting repository info from a model. Default is `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    True if the repository and the revision exists, False otherwise.

Examples:
    ```py
    >>> from huggingface_hub import revision_exists
    >>> revision_exists("google/gemma-7b", "float16")
    True
    >>> revision_exists("google/gemma-7b", "not-a-revision")
    False
    ```

---
## file_exists
```python
from hf_api import file_exists
```

Checks if a file exists in a repository on the Hugging Face Hub.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    filename (`str`):
        The name of the file to check, for example:
        `"config.json"`
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if getting repository info from a dataset or a space,
        `None` or `"model"` if getting repository info from a model. Default is `None`.
    revision (`str`, *optional*):
        The revision of the repository from which to get the information. Defaults to `"main"` branch.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    True if the file exists, False otherwise.

Examples:
    ```py
    >>> from huggingface_hub import file_exists
    >>> file_exists("bigcode/starcoder", "config.json")
    True
    >>> file_exists("bigcode/starcoder", "not-a-file")
    False
    >>> file_exists("bigcode/not-a-repo", "config.json")
    False
    ```

---
## list_repo_files
```python
from hf_api import list_repo_files
```

Get the list of files in a given repo.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a `/`.
    revision (`str`, *optional*):
        The revision of the model repository from which to get the information.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or space, `None` or `"model"` if uploading to
        a model. Default is `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[str]`: the list of files in a given repository.

---
## list_repo_tree
```python
from hf_api import list_repo_tree
```

List a repo tree's files and folders and get information about them.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a `/`.
    path_in_repo (`str`, *optional*):
        Relative path of the tree (folder) in the repo, for example:
        `"checkpoints/1fec34a/results"`. Will default to the root tree (folder) of the repository.
    recursive (`bool`, *optional*, defaults to `False`):
        Whether to list tree's files and folders recursively.
    expand (`bool`, *optional*, defaults to `False`):
        Whether to fetch more information about the tree's files and folders (e.g. last commit and files' security scan results). This
        operation is more expensive for the server so only 50 results are returned per page (instead of 1000).
        As pagination is implemented in `huggingface_hub`, this is transparent for you except for the time it
        takes to get the results.
    revision (`str`, *optional*):
        The revision of the repository from which to get the tree. Defaults to `"main"` branch.
    repo_type (`str`, *optional*):
        The type of the repository from which to get the tree (`"model"`, `"dataset"` or `"space"`.
        Defaults to `"model"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[Union[RepoFile, RepoFolder]]`:
        The information about the tree's files and folders, as an iterable of [`RepoFile`] and [`RepoFolder`] objects. The order of the files and folders is
        not guaranteed.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private but not authenticated or repo
        does not exist.
    [`~utils.RevisionNotFoundError`]:
        If revision is not found (error 404) on the repo.
    [`~utils.EntryNotFoundError`]:
        If the tree (folder) does not exist (error 404) on the repo.

Examples:

    Get information about a repo's tree.
    ```py
    >>> from huggingface_hub import list_repo_tree
    >>> repo_tree = list_repo_tree("lysandre/arxiv-nlp")
    >>> repo_tree
    <generator object HfApi.list_repo_tree at 0x7fa4088e1ac0>
    >>> list(repo_tree)
    [
        RepoFile(path='.gitattributes', size=391, blob_id='ae8c63daedbd4206d7d40126955d4e6ab1c80f8f', lfs=None, last_commit=None, security=None),
        RepoFile(path='README.md', size=391, blob_id='43bd404b159de6fba7c2f4d3264347668d43af25', lfs=None, last_commit=None, security=None),
        RepoFile(path='config.json', size=554, blob_id='2f9618c3a19b9a61add74f70bfb121335aeef666', lfs=None, last_commit=None, security=None),
        RepoFile(
            path='flax_model.msgpack', size=497764107, blob_id='8095a62ccb4d806da7666fcda07467e2d150218e',
            lfs={'size': 497764107, 'sha256': 'd88b0d6a6ff9c3f8151f9d3228f57092aaea997f09af009eefd7373a77b5abb9', 'pointer_size': 134}, last_commit=None, security=None
        ),
        RepoFile(path='merges.txt', size=456318, blob_id='226b0752cac7789c48f0cb3ec53eda48b7be36cc', lfs=None, last_commit=None, security=None),
        RepoFile(
            path='pytorch_model.bin', size=548123560, blob_id='64eaa9c526867e404b68f2c5d66fd78e27026523',
            lfs={'size': 548123560, 'sha256': '9be78edb5b928eba33aa88f431551348f7466ba9f5ef3daf1d552398722a5436', 'pointer_size': 134}, last_commit=None, security=None
        ),
        RepoFile(path='vocab.json', size=898669, blob_id='b00361fece0387ca34b4b8b8539ed830d644dbeb', lfs=None, last_commit=None, security=None)]
    ]
    ```

    Get even more information about a repo's tree (last commit and files' security scan results)
    ```py
    >>> from huggingface_hub import list_repo_tree
    >>> repo_tree = list_repo_tree("prompthero/openjourney-v4", expand=True)
    >>> list(repo_tree)
    [
        RepoFolder(
            path='feature_extractor',
            tree_id='aa536c4ea18073388b5b0bc791057a7296a00398',
            last_commit={
                'oid': '47b62b20b20e06b9de610e840282b7e6c3d51190',
                'title': 'Upload diffusers weights (#48)',
                'date': datetime.datetime(2023, 3, 21, 9, 5, 27, tzinfo=datetime.timezone.utc)
            }
        ),
        RepoFolder(
            path='safety_checker',
            tree_id='65aef9d787e5557373fdf714d6c34d4fcdd70440',
            last_commit={
                'oid': '47b62b20b20e06b9de610e840282b7e6c3d51190',
                'title': 'Upload diffusers weights (#48)',
                'date': datetime.datetime(2023, 3, 21, 9, 5, 27, tzinfo=datetime.timezone.utc)
            }
        ),
        RepoFile(
            path='model_index.json',
            size=582,
            blob_id='d3d7c1e8c3e78eeb1640b8e2041ee256e24c9ee1',
            lfs=None,
            last_commit={
                'oid': 'b195ed2d503f3eb29637050a886d77bd81d35f0e',
                'title': 'Fix deprecation warning by changing `CLIPFeatureExtractor` to `CLIPImageProcessor`. (#54)',
                'date': datetime.datetime(2023, 5, 15, 21, 41, 59, tzinfo=datetime.timezone.utc)
            },
            security={
                'safe': True,
                'av_scan': {'virusFound': False, 'virusNames': None},
                'pickle_import_scan': None
            }
        )
        ...
    ]
    ```

---
## list_repo_refs
```python
from hf_api import list_repo_refs
```

Get the list of refs of a given repo (both tags and branches).

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if listing refs from a dataset or a Space,
        `None` or `"model"` if listing from a model. Default is `None`.
    include_pull_requests (`bool`, *optional*):
        Whether to include refs from pull requests in the list. Defaults to `False`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Example:
```py
>>> from huggingface_hub import HfApi
>>> api = HfApi()
>>> api.list_repo_refs("gpt2")
GitRefs(branches=[GitRefInfo(name='main', ref='refs/heads/main', target_commit='e7da7f221d5bf496a48136c0cd264e630fe9fcc8')], converts=[], tags=[])

>>> api.list_repo_refs("bigcode/the-stack", repo_type='dataset')
GitRefs(
    branches=[
        GitRefInfo(name='main', ref='refs/heads/main', target_commit='18edc1591d9ce72aa82f56c4431b3c969b210ae3'),
        GitRefInfo(name='v1.1.a1', ref='refs/heads/v1.1.a1', target_commit='f9826b862d1567f3822d3d25649b0d6d22ace714')
    ],
    converts=[],
    tags=[
        GitRefInfo(name='v1.0', ref='refs/tags/v1.0', target_commit='c37a8cd1e382064d8aced5e05543c5f7753834da')
    ]
)
```

Returns:
    [`GitRefs`]: object containing all information about branches and tags for a
    repo on the Hub.

---
## list_repo_commits
```python
from hf_api import list_repo_commits
```

Get the list of commits of a given revision for a repo on the Hub.

Commits are sorted by date (last commit first).

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a `/`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if listing commits from a dataset or a Space, `None` or `"model"` if
        listing from a model. Default is `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    formatted (`bool`):
        Whether to return the HTML-formatted title and description of the commits. Defaults to False.

Example:
```py
>>> from huggingface_hub import HfApi
>>> api = HfApi()

# Commits are sorted by date (last commit first)
>>> initial_commit = api.list_repo_commits("gpt2")[-1]

# Initial commit is always a system commit containing the `.gitattributes` file.
>>> initial_commit
GitCommitInfo(
    commit_id='9b865efde13a30c13e0a33e536cf3e4a5a9d71d8',
    authors=['system'],
    created_at=datetime.datetime(2019, 2, 18, 10, 36, 15, tzinfo=datetime.timezone.utc),
    title='initial commit',
    message='',
    formatted_title=None,
    formatted_message=None
)

# Create an empty branch by deriving from initial commit
>>> api.create_branch("gpt2", "new_empty_branch", revision=initial_commit.commit_id)
```

Returns:
    List[[`GitCommitInfo`]]: list of objects containing information about the commits for a repo on the Hub.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private but not authenticated or repo
        does not exist.
    [`~utils.RevisionNotFoundError`]:
        If revision is not found (error 404) on the repo.

---
## get_paths_info
```python
from hf_api import get_paths_info
```

Get information about a repo's paths.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a `/`.
    paths (`Union[List[str], str]`, *optional*):
        The paths to get information about. If a path do not exist, it is ignored without raising
        an exception.
    expand (`bool`, *optional*, defaults to `False`):
        Whether to fetch more information about the paths (e.g. last commit and files' security scan results). This
        operation is more expensive for the server so only 50 results are returned per page (instead of 1000).
        As pagination is implemented in `huggingface_hub`, this is transparent for you except for the time it
        takes to get the results.
    revision (`str`, *optional*):
        The revision of the repository from which to get the information. Defaults to `"main"` branch.
    repo_type (`str`, *optional*):
        The type of the repository from which to get the information (`"model"`, `"dataset"` or `"space"`.
        Defaults to `"model"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[Union[RepoFile, RepoFolder]]`:
        The information about the paths, as a list of [`RepoFile`] and [`RepoFolder`] objects.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private but not authenticated or repo
        does not exist.
    [`~utils.RevisionNotFoundError`]:
        If revision is not found (error 404) on the repo.

Example:
```py
>>> from huggingface_hub import get_paths_info
>>> paths_info = get_paths_info("allenai/c4", ["README.md", "en"], repo_type="dataset")
>>> paths_info
[
    RepoFile(path='README.md', size=2379, blob_id='f84cb4c97182890fc1dbdeaf1a6a468fd27b4fff', lfs=None, last_commit=None, security=None),
    RepoFolder(path='en', tree_id='dc943c4c40f53d02b31ced1defa7e5f438d5862e', last_commit=None)
]
```

---
## super_squash_history
```python
from hf_api import super_squash_history
```

Squash commit history on a branch for a repo on the Hub.

Squashing the repo history is useful when you know you'll make hundreds of commits and you don't want to
clutter the history. Squashing commits can only be performed from the head of a branch.

<Tip warning={true}>

Once squashed, the commit history cannot be retrieved. This is a non-revertible operation.

</Tip>

<Tip warning={true}>

Once the history of a branch has been squashed, it is not possible to merge it back into another branch since
their history will have diverged.

</Tip>

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a `/`.
    branch (`str`, *optional*):
        The branch to squash. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The commit message to use for the squashed commit.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if listing commits from a dataset or a Space, `None` or `"model"` if
        listing from a model. Default is `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private but not authenticated or repo
        does not exist.
    [`~utils.RevisionNotFoundError`]:
        If the branch to squash cannot be found.
    [`~utils.BadRequestError`]:
        If invalid reference for a branch. You cannot squash history on tags.

Example:
```py
>>> from huggingface_hub import HfApi
>>> api = HfApi()

# Create repo
>>> repo_id = api.create_repo("test-squash").repo_id

# Make a lot of commits.
>>> api.upload_file(repo_id=repo_id, path_in_repo="file.txt", path_or_fileobj=b"content")
>>> api.upload_file(repo_id=repo_id, path_in_repo="lfs.bin", path_or_fileobj=b"content")
>>> api.upload_file(repo_id=repo_id, path_in_repo="file.txt", path_or_fileobj=b"another_content")

# Squash history
>>> api.super_squash_history(repo_id=repo_id)
```

---
## create_repo
```python
from hf_api import create_repo
```

Create an empty repo on the HuggingFace Hub.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    private (`bool`, *optional*, defaults to `False`):
        Whether the model repo should be private.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    exist_ok (`bool`, *optional*, defaults to `False`):
        If `True`, do not raise an error if repo already exists.
    resource_group_id (`str`, *optional*):
        Resource group in which to create the repo. Resource groups is only available for organizations and
        allow to define which members of the organization can access the resource. The ID of a resource group
        can be found in the URL of the resource's page on the Hub (e.g. `"66670e5163145ca562cb1988"`).
        To learn more about resource groups, see https://huggingface.co/docs/hub/en/security-resource-groups.
    space_sdk (`str`, *optional*):
        Choice of SDK to use if repo_type is "space". Can be "streamlit", "gradio", "docker", or "static".
    space_hardware (`SpaceHardware` or `str`, *optional*):
        Choice of Hardware if repo_type is "space". See [`SpaceHardware`] for a complete list.
    space_storage (`SpaceStorage` or `str`, *optional*):
        Choice of persistent storage tier. Example: `"small"`. See [`SpaceStorage`] for a complete list.
    space_sleep_time (`int`, *optional*):
        Number of seconds of inactivity to wait before a Space is put to sleep. Set to `-1` if you don't want
        your Space to sleep (default behavior for upgraded hardware). For free hardware, you can't configure
        the sleep time (value is fixed to 48 hours of inactivity).
        See https://huggingface.co/docs/hub/spaces-gpus#sleep-time for more details.
    space_secrets (`List[Dict[str, str]]`, *optional*):
        A list of secret keys to set in your Space. Each item is in the form `{"key": ..., "value": ..., "description": ...}` where description is optional.
        For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets.
    space_variables (`List[Dict[str, str]]`, *optional*):
        A list of public environment variables to set in your Space. Each item is in the form `{"key": ..., "value": ..., "description": ...}` where description is optional.
        For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets-and-environment-variables.

Returns:
    [`RepoUrl`]: URL to the newly created repo. Value is a subclass of `str` containing
    attributes like `endpoint`, `repo_type` and `repo_id`.

---
## delete_repo
```python
from hf_api import delete_repo
```

Delete a repo from the HuggingFace Hub. CAUTION: this is irreversible.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model.
    missing_ok (`bool`, *optional*, defaults to `False`):
        If `True`, do not raise an error if repo does not exist.

Raises:
    [`~utils.RepositoryNotFoundError`]
      If the repository to delete from cannot be found and `missing_ok` is set to False (default).

---
## update_repo_visibility
```python
from hf_api import update_repo_visibility
```

Update the visibility setting of a repository.

Args:
    repo_id (`str`, *optional*):
        A namespace (user or an organization) and a repo name separated by a `/`.
    private (`bool`, *optional*, defaults to `False`):
        Whether the model repo should be private.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.

Returns:
    The HTTP response in json.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## update_repo_settings
```python
from hf_api import update_repo_settings
```

Update the gated settings of a repository.
To give more control over how repos are used, the Hub allows repo authors to enable **access requests** for their repos.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated by a /.
    gated (`Literal["auto", "manual", False]`, *optional*):
        The gated release status for the repository.
        * "auto": The repository is gated, and access requests are automatically approved or denied based on predefined criteria.
        * "manual": The repository is gated, and access requests require manual approval.
        * False (default): The repository is not gated, and anyone can access it.
    token (`Union[str, bool, None]`, *optional*):
        A valid user access token (string). Defaults to the locally saved token,
        which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass False.
    repo_type (`str`, *optional*):
        The type of the repository to update settings from (`"model"`, `"dataset"` or `"space"`.
        Defaults to `"model"`.

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If gated is not one of "auto", "manual", or False.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If repo_type is not one of the values in constants.REPO_TYPES.
    [`~utils.HfHubHTTPError`]:
        If the request to the Hugging Face Hub API fails.

---
## move_repo
```python
from hf_api import move_repo
```

Moving a repository from namespace1/repo_name1 to namespace2/repo_name2

Note there are certain limitations. For more information about moving
repositories, please see
https://hf.co/docs/hub/repositories-settings#renaming-or-transferring-a-repo.

Args:
    from_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`. Original repository identifier.
    to_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`. Final repository identifier.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

<Tip>

Raises the following errors:

    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## create_commit
```python
from hf_api import create_commit
```

Creates a commit in the given repo, deleting & uploading files as needed.

<Tip warning={true}>

The input list of `CommitOperation` will be mutated during the commit process. Do not reuse the same objects
for multiple commits.

</Tip>

<Tip warning={true}>

`create_commit` assumes that the repo already exists on the Hub. If you get a
Client error 404, please make sure you are authenticated and that `repo_id` and
`repo_type` are set correctly. If repo does not exist, create it first using
[`~hf_api.create_repo`].

</Tip>

<Tip warning={true}>

`create_commit` is limited to 25k LFS files and a 1GB payload for regular files.

</Tip>

Args:
    repo_id (`str`):
        The repository in which the commit will be created, for example:
        `"username/custom_transformers"`

    operations (`Iterable` of [`~hf_api.CommitOperation`]):
        An iterable of operations to include in the commit, either:

            - [`~hf_api.CommitOperationAdd`] to upload a file
            - [`~hf_api.CommitOperationDelete`] to delete a file
            - [`~hf_api.CommitOperationCopy`] to copy a file

        Operation objects will be mutated to include information relative to the upload. Do not reuse the
        same objects for multiple commits.

    commit_message (`str`):
        The summary (first line) of the commit that will be created.

    commit_description (`str`, *optional*):
        The description of the commit that will be created

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.

    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.

    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`.
        If `revision` is not set, PR is opened against the `"main"` branch. If
        `revision` is set and is a branch, PR is opened against this branch. If
        `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server.

    num_threads (`int`, *optional*):
        Number of concurrent threads for uploading files. Defaults to 5.
        Setting it to 2 means at most 2 files will be uploaded concurrently.

    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string.
        Shorthands (7 first characters) are also supported. If specified and `create_pr` is `False`,
        the commit will fail if `revision` does not point to `parent_commit`. If specified and `create_pr`
        is `True`, the pull request will be created from `parent_commit`. Specifying `parent_commit`
        ensures the repo has not changed before committing the changes, and can be especially useful
        if the repo is updated / committed to concurrently.
    run_as_future (`bool`, *optional*):
        Whether or not to run this method in the background. Background jobs are run sequentially without
        blocking the main thread. Passing `run_as_future=True` will return a [Future](https://docs.python.org/3/library/concurrent.futures.html#future-objects)
        object. Defaults to `False`.

Returns:
    [`CommitInfo`] or `Future`:
        Instance of [`CommitInfo`] containing information about the newly created commit (commit hash, commit
        url, pr url, commit message,...). If `run_as_future=True` is passed, returns a Future object which will
        contain the result when executed.

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If commit message is empty.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If parent commit is not a valid commit OID.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If a README.md file with an invalid metadata section is committed. In this case, the commit will fail
        early, before trying to upload any file.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `create_pr` is `True` and revision is neither `None` nor `"main"`.
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.

---
## create_commits_on_pr
```python
from hf_api import create_commits_on_pr
```

Push changes to the Hub in multiple commits.

Commits are pushed to a draft PR branch. If the upload fails or gets interrupted, it can be resumed. Progress
is tracked in the PR description. At the end of the process, the PR is set as open and the title is updated to
match the initial commit message. If `merge_pr=True` is passed, the PR is merged automatically.

All deletion commits are pushed first, followed by the addition commits. The order of the commits is not
guaranteed as we might implement parallel commits in the future. Be sure that your are not updating several
times the same file.

<Tip warning={true}>

`create_commits_on_pr` is experimental.  Its API and behavior is subject to change in the future without prior notice.

</Tip>

<Tip warning={true}>

`create_commits_on_pr` assumes that the repo already exists on the Hub. If you get a Client error 404, please
make sure you are authenticated and that `repo_id` and `repo_type` are set correctly. If repo does not exist,
create it first using [`~hf_api.create_repo`].

</Tip>

Args:
    repo_id (`str`):
        The repository in which the commits will be pushed. Example: `"username/my-cool-model"`.

    addition_commits (`List` of `List` of [`~hf_api.CommitOperationAdd`]):
        A list containing lists of [`~hf_api.CommitOperationAdd`]. Each sublist will result in a commit on the
        PR.

    deletion_commits
        A list containing lists of [`~hf_api.CommitOperationDelete`]. Each sublist will result in a commit on
        the PR. Deletion commits are pushed before addition commits.

    commit_message (`str`):
        The summary (first line) of the commit that will be created. Will also be the title of the PR.

    commit_description (`str`, *optional*):
        The description of the commit that will be created. The description will be added to the PR.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or space, `None` or `"model"` if uploading to
        a model. Default is `None`.

    merge_pr (`bool`):
        If set to `True`, the Pull Request is merged at the end of the process. Defaults to `True`.

    num_threads (`int`, *optional*):
        Number of concurrent threads for uploading files. Defaults to 5.

    verbose (`bool`):
        If set to `True`, process will run on verbose mode i.e. print information about the ongoing tasks.
        Defaults to `False`.

Returns:
    `str`: URL to the created PR.

Example:
```python
>>> from huggingface_hub import HfApi, plan_multi_commits
>>> addition_commits, deletion_commits = plan_multi_commits(
...     operations=[
...          CommitOperationAdd(...),
...          CommitOperationAdd(...),
...          CommitOperationDelete(...),
...          CommitOperationDelete(...),
...          CommitOperationAdd(...),
...     ],
... )
>>> HfApi().create_commits_on_pr(
...     repo_id="my-cool-model",
...     addition_commits=addition_commits,
...     deletion_commits=deletion_commits,
...     (...)
...     verbose=True,
... )
```

Raises:
    [`MultiCommitException`]:
        If an unexpected issue occur in the process: empty commits, unexpected commits in a PR, unexpected PR
        description, etc.

---
## preupload_lfs_files
```python
from hf_api import preupload_lfs_files
```

Pre-upload LFS files to S3 in preparation on a future commit.

This method is useful if you are generating the files to upload on-the-fly and you don't want to store them
in memory before uploading them all at once.

<Tip warning={true}>

This is a power-user method. You shouldn't need to call it directly to make a normal commit.
Use [`create_commit`] directly instead.

</Tip>

<Tip warning={true}>

Commit operations will be mutated during the process. In particular, the attached `path_or_fileobj` will be
removed after the upload to save memory (and replaced by an empty `bytes` object). Do not reuse the same
objects except to pass them to [`create_commit`]. If you don't want to remove the attached content from the
commit operation object, pass `free_memory=False`.

</Tip>

Args:
    repo_id (`str`):
        The repository in which you will commit the files, for example: `"username/custom_transformers"`.

    operations (`Iterable` of [`CommitOperationAdd`]):
        The list of files to upload. Warning: the objects in this list will be mutated to include information
        relative to the upload. Do not reuse the same objects for multiple commits.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        The type of repository to upload to (e.g. `"model"` -default-, `"dataset"` or `"space"`).

    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.

    create_pr (`boolean`, *optional*):
        Whether or not you plan to create a Pull Request with that commit. Defaults to `False`.

    num_threads (`int`, *optional*):
        Number of concurrent threads for uploading files. Defaults to 5.
        Setting it to 2 means at most 2 files will be uploaded concurrently.

    gitignore_content (`str`, *optional*):
        The content of the `.gitignore` file to know which files should be ignored. The order of priority
        is to first check if `gitignore_content` is passed, then check if the `.gitignore` file is present
        in the list of files to commit and finally default to the `.gitignore` file already hosted on the Hub
        (if any).

Example:
```py
>>> from huggingface_hub import CommitOperationAdd, preupload_lfs_files, create_commit, create_repo

>>> repo_id = create_repo("test_preupload").repo_id

# Generate and preupload LFS files one by one
>>> operations = [] # List of all `CommitOperationAdd` objects that will be generated
>>> for i in range(5):
...     content = ... # generate binary content
...     addition = CommitOperationAdd(path_in_repo=f"shard_{i}_of_5.bin", path_or_fileobj=content)
...     preupload_lfs_files(repo_id, additions=[addition]) # upload + free memory
...     operations.append(addition)

# Create commit
>>> create_commit(repo_id, operations=operations, commit_message="Commit all shards")
```

---
## upload_file
```python
from hf_api import upload_file
```

Upload a local file (up to 50 GB) to the given repo. The upload is done
through a HTTP post request, and doesn't require git or git-lfs to be
installed.

Args:
    path_or_fileobj (`str`, `Path`, `bytes`, or `IO`):
        Path to a file on the local machine or binary data stream /
        fileobj / buffer.
    path_in_repo (`str`):
        Relative filepath in the repo, for example:
        `"checkpoints/1fec34a/weights.bin"`
    repo_id (`str`):
        The repository to which the file will be uploaded, for example:
        `"username/custom_transformers"`
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit
    commit_description (`str` *optional*)
        The description of the generated commit
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`.
        If `revision` is not set, PR is opened against the `"main"` branch. If
        `revision` is set and is a branch, PR is opened against this branch. If
        `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.
    run_as_future (`bool`, *optional*):
        Whether or not to run this method in the background. Background jobs are run sequentially without
        blocking the main thread. Passing `run_as_future=True` will return a [Future](https://docs.python.org/3/library/concurrent.futures.html#future-objects)
        object. Defaults to `False`.


Returns:
    [`CommitInfo`] or `Future`:
        Instance of [`CommitInfo`] containing information about the newly created commit (commit hash, commit
        url, pr url, commit message,...). If `run_as_future=True` is passed, returns a Future object which will
        contain the result when executed.
<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.

</Tip>

<Tip warning={true}>

`upload_file` assumes that the repo already exists on the Hub. If you get a
Client error 404, please make sure you are authenticated and that `repo_id` and
`repo_type` are set correctly. If repo does not exist, create it first using
[`~hf_api.create_repo`].

</Tip>

Example:

```python
>>> from huggingface_hub import upload_file

>>> with open("./local/filepath", "rb") as fobj:
...     upload_file(
...         path_or_fileobj=fileobj,
...         path_in_repo="remote/file/path.h5",
...         repo_id="username/my-dataset",
...         repo_type="dataset",
...         token="my_token",
...     )
"https://huggingface.co/datasets/username/my-dataset/blob/main/remote/file/path.h5"

>>> upload_file(
...     path_or_fileobj=".\\local\\file\\path",
...     path_in_repo="remote/file/path.h5",
...     repo_id="username/my-model",
...     token="my_token",
... )
"https://huggingface.co/username/my-model/blob/main/remote/file/path.h5"

>>> upload_file(
...     path_or_fileobj=".\\local\\file\\path",
...     path_in_repo="remote/file/path.h5",
...     repo_id="username/my-model",
...     token="my_token",
...     create_pr=True,
... )
"https://huggingface.co/username/my-model/blob/refs%2Fpr%2F1/remote/file/path.h5"
```

---
## upload_folder
```python
from hf_api import upload_folder
```

Upload a local folder to the given repo. The upload is done through a HTTP requests, and doesn't require git or
git-lfs to be installed.

The structure of the folder will be preserved. Files with the same name already present in the repository will
be overwritten. Others will be left untouched.

Use the `allow_patterns` and `ignore_patterns` arguments to specify which files to upload. These parameters
accept either a single pattern or a list of patterns. Patterns are Standard Wildcards (globbing patterns) as
documented [here](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm). If both `allow_patterns` and
`ignore_patterns` are provided, both constraints apply. By default, all files from the folder are uploaded.

Use the `delete_patterns` argument to specify remote files you want to delete. Input type is the same as for
`allow_patterns` (see above). If `path_in_repo` is also provided, the patterns are matched against paths
relative to this folder. For example, `upload_folder(..., path_in_repo="experiment", delete_patterns="logs/*")`
will delete any remote file under `./experiment/logs/`. Note that the `.gitattributes` file will not be deleted
even if it matches the patterns.

Any `.git/` folder present in any subdirectory will be ignored. However, please be aware that the `.gitignore`
file is not taken into account.

Uses `HfApi.create_commit` under the hood.

Args:
    repo_id (`str`):
        The repository to which the file will be uploaded, for example:
        `"username/custom_transformers"`
    folder_path (`str` or `Path`):
        Path to the folder to upload on the local file system
    path_in_repo (`str`, *optional*):
        Relative path of the directory in the repo, for example:
        `"checkpoints/1fec34a/results"`. Will default to the root folder of the repository.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit. Defaults to:
        `f"Upload {path_in_repo} with huggingface_hub"`
    commit_description (`str` *optional*):
        The description of the generated commit
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`. If `revision` is not
        set, PR is opened against the `"main"` branch. If `revision` is set and is a branch, PR is opened
        against this branch. If `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server. If both `multi_commits` and `create_pr` are True,
        the PR created in the multi-commit process is kept opened.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are uploaded.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not uploaded.
    delete_patterns (`List[str]` or `str`, *optional*):
        If provided, remote files matching any of the patterns will be deleted from the repo while committing
        new files. This is useful if you don't know which files have already been uploaded.
        Note: to avoid discrepancies the `.gitattributes` file is not deleted even if it matches the pattern.
    multi_commits (`bool`):
        Deprecated. For large uploads, use `upload_large_folder` instead.
        If True, changes are pushed to a PR using a multi-commit process. Defaults to `False`.
    multi_commits_verbose (`bool`):
        Deprecated. For large uploads, use `upload_large_folder` instead.
        If True and `multi_commits` is used, more information will be displayed to the user.
    run_as_future (`bool`, *optional*):
        Whether or not to run this method in the background. Background jobs are run sequentially without
        blocking the main thread. Passing `run_as_future=True` will return a [Future](https://docs.python.org/3/library/concurrent.futures.html#future-objects)
        object. Defaults to `False`.

Returns:
    [`CommitInfo`] or `Future`:
        Instance of [`CommitInfo`] containing information about the newly created commit (commit hash, commit
        url, pr url, commit message,...). If `run_as_future=True` is passed, returns a Future object which will
        contain the result when executed.
    [`str`] or `Future`:
        If `multi_commits=True`, returns the url of the PR created to push the changes. If `run_as_future=True`
        is passed, returns a Future object which will contain the result when executed.

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
    if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
    if some parameter value is invalid

</Tip>

<Tip warning={true}>

`upload_folder` assumes that the repo already exists on the Hub. If you get a Client error 404, please make
sure you are authenticated and that `repo_id` and `repo_type` are set correctly. If repo does not exist, create
it first using [`~hf_api.create_repo`].

</Tip>

<Tip warning={true}>

`multi_commits` is experimental. Its API and behavior is subject to change in the future without prior notice.

</Tip>

Example:

```python
# Upload checkpoints folder except the log files
>>> upload_folder(
...     folder_path="local/checkpoints",
...     path_in_repo="remote/experiment/checkpoints",
...     repo_id="username/my-dataset",
...     repo_type="datasets",
...     token="my_token",
...     ignore_patterns="**/logs/*.txt",
... )
# "https://huggingface.co/datasets/username/my-dataset/tree/main/remote/experiment/checkpoints"

# Upload checkpoints folder including logs while deleting existing logs from the repo
# Useful if you don't know exactly which log files have already being pushed
>>> upload_folder(
...     folder_path="local/checkpoints",
...     path_in_repo="remote/experiment/checkpoints",
...     repo_id="username/my-dataset",
...     repo_type="datasets",
...     token="my_token",
...     delete_patterns="**/logs/*.txt",
... )
"https://huggingface.co/datasets/username/my-dataset/tree/main/remote/experiment/checkpoints"

# Upload checkpoints folder while creating a PR
>>> upload_folder(
...     folder_path="local/checkpoints",
...     path_in_repo="remote/experiment/checkpoints",
...     repo_id="username/my-dataset",
...     repo_type="datasets",
...     token="my_token",
...     create_pr=True,
... )
"https://huggingface.co/datasets/username/my-dataset/tree/refs%2Fpr%2F1/remote/experiment/checkpoints"

```

---
## delete_file
```python
from hf_api import delete_file
```

Deletes a file in the given repo.

Args:
    path_in_repo (`str`):
        Relative filepath in the repo, for example:
        `"checkpoints/1fec34a/weights.bin"`
    repo_id (`str`):
        The repository from which the file will be deleted, for example:
        `"username/custom_transformers"`
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if the file is in a dataset or
        space, `None` or `"model"` if in a model. Default is `None`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit. Defaults to
        `f"Delete {path_in_repo} with huggingface_hub"`.
    commit_description (`str` *optional*)
        The description of the generated commit
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`.
        If `revision` is not set, PR is opened against the `"main"` branch. If
        `revision` is set and is a branch, PR is opened against this branch. If
        `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.


<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    - [`~utils.RevisionNotFoundError`]
      If the revision to download from cannot be found.
    - [`~utils.EntryNotFoundError`]
      If the file to download cannot be found.

</Tip>

---
## delete_files
```python
from hf_api import delete_files
```

Delete files from a repository on the Hub.

If a folder path is provided, the entire folder is deleted as well as
all files it contained.

Args:
    repo_id (`str`):
        The repository from which the folder will be deleted, for example:
        `"username/custom_transformers"`
    delete_patterns (`List[str]`):
        List of files or folders to delete. Each string can either be
        a file path, a folder path or a Unix shell-style wildcard.
        E.g. `["file.txt", "folder/", "data/*.parquet"]`
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
        to the stored token.
    repo_type (`str`, *optional*):
        Type of the repo to delete files from. Can be `"model"`,
        `"dataset"` or `"space"`. Defaults to `"model"`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The summary (first line) of the generated commit. Defaults to
        `f"Delete files using huggingface_hub"`.
    commit_description (`str` *optional*)
        The description of the generated commit.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`.
        If `revision` is not set, PR is opened against the `"main"` branch. If
        `revision` is set and is a branch, PR is opened against this branch. If
        `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.

---
## delete_folder
```python
from hf_api import delete_folder
```

Deletes a folder in the given repo.

Simple wrapper around [`create_commit`] method.

Args:
    path_in_repo (`str`):
        Relative folder path in the repo, for example: `"checkpoints/1fec34a"`.
    repo_id (`str`):
        The repository from which the folder will be deleted, for example:
        `"username/custom_transformers"`
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
        to the stored token.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if the folder is in a dataset or
        space, `None` or `"model"` if in a model. Default is `None`.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit. Defaults to
        `f"Delete folder {path_in_repo} with huggingface_hub"`.
    commit_description (`str` *optional*)
        The description of the generated commit.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request with that commit. Defaults to `False`.
        If `revision` is not set, PR is opened against the `"main"` branch. If
        `revision` is set and is a branch, PR is opened against this branch. If
        `revision` is set and is not a branch name (example: a commit oid), an
        `RevisionNotFoundError` is returned by the server.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.

---
## upload_large_folder
```python
from hf_api import upload_large_folder
```

Upload a large folder to the Hub in the most resilient way possible.

Several workers are started to upload files in an optimized way. Before being committed to a repo, files must be
hashed and be pre-uploaded if they are LFS files. Workers will perform these tasks for each file in the folder.
At each step, some metadata information about the upload process is saved in the folder under `.cache/.huggingface/`
to be able to resume the process if interrupted. The whole process might result in several commits.

Args:
    repo_id (`str`):
        The repository to which the file will be uploaded.
        E.g. `"HuggingFaceTB/smollm-corpus"`.
    folder_path (`str` or `Path`):
        Path to the folder to upload on the local file system.
    repo_type (`str`):
        Type of the repository. Must be one of `"model"`, `"dataset"` or `"space"`.
        Unlike in all other `HfApi` methods, `repo_type` is explicitly required here. This is to avoid
        any mistake when uploading a large folder to the Hub, and therefore prevent from having to re-upload
        everything.
    revision (`str`, `optional`):
        The branch to commit to. If not provided, the `main` branch will be used.
    private (`bool`, `optional`):
        Whether the repository should be private. Defaults to False.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are uploaded.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not uploaded.
    num_workers (`int`, *optional*):
        Number of workers to start. Defaults to `os.cpu_count() - 2` (minimum 2).
        A higher number of workers may speed up the process if your machine allows it. However, on machines with a
        slower connection, it is recommended to keep the number of workers low to ensure better resumability.
        Indeed, partially uploaded files will have to be completely re-uploaded if the process is interrupted.
    print_report (`bool`, *optional*):
        Whether to print a report of the upload progress. Defaults to True.
        Report is printed to `sys.stdout` every X seconds (60 by defaults) and overwrites the previous report.
    print_report_every (`int`, *optional*):
        Frequency at which the report is printed. Defaults to 60 seconds.

<Tip>

A few things to keep in mind:
    - Repository limits still apply: https://huggingface.co/docs/hub/repositories-recommendations
    - Do not start several processes in parallel.
    - You can interrupt and resume the process at any time.
    - Do not upload the same folder to several repositories. If you need to do so, you must delete the local `.cache/.huggingface/` folder first.

</Tip>

<Tip warning={true}>

While being much more robust to upload large folders, `upload_large_folder` is more limited than [`upload_folder`] feature-wise. In practice:
    - you cannot set a custom `path_in_repo`. If you want to upload to a subfolder, you need to set the proper structure locally.
    - you cannot set a custom `commit_message` and `commit_description` since multiple commits are created.
    - you cannot delete from the repo while uploading. Please make a separate commit first.
    - you cannot create a PR directly. Please create a PR first (from the UI or using [`create_pull_request`]) and then commit to it by passing `revision`.

</Tip>

**Technical details:**

`upload_large_folder` process is as follow:
    1. (Check parameters and setup.)
    2. Create repo if missing.
    3. List local files to upload.
    4. Start workers. Workers can perform the following tasks:
        - Hash a file.
        - Get upload mode (regular or LFS) for a list of files.
        - Pre-upload an LFS file.
        - Commit a bunch of files.
    Once a worker finishes a task, it will move on to the next task based on the priority list (see below) until
    all files are uploaded and committed.
    5. While workers are up, regularly print a report to sys.stdout.

Order of priority:
    1. Commit if more than 5 minutes since last commit attempt (and at least 1 file).
    2. Commit if at least 150 files are ready to commit.
    3. Get upload mode if at least 10 files have been hashed.
    4. Pre-upload LFS file if at least 1 file and no worker is pre-uploading.
    5. Hash file if at least 1 file and no worker is hashing.
    6. Get upload mode if at least 1 file and no worker is getting upload mode.
    7. Pre-upload LFS file if at least 1 file (exception: if hf_transfer is enabled, only 1 worker can preupload LFS at a time).
    8. Hash file if at least 1 file to hash.
    9. Get upload mode if at least 1 file to get upload mode.
    10. Commit if at least 1 file to commit and at least 1 min since last commit attempt.
    11. Commit if at least 1 file to commit and all other queues are empty.

Special rules:
    - If `hf_transfer` is enabled, only 1 LFS uploader at a time. Otherwise the CPU would be bloated by `hf_transfer`.
    - Only one worker can commit at a time.
    - If no tasks are available, the worker waits for 10 seconds before checking again.

---
## get_hf_file_metadata
```python
from hf_api import get_hf_file_metadata
```

Fetch metadata of a file versioned on the Hub for a given url.

Args:
    url (`str`):
        File url, for example returned by [`hf_hub_url`].
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to `requests.request`.
    timeout (`float`, *optional*, defaults to 10):
        How many seconds to wait for the server to send metadata before giving up.

Returns:
    A [`HfFileMetadata`] object containing metadata such as location, etag, size and commit_hash.

---
## hf_hub_download
```python
from hf_api import hf_hub_download
```

Download a given file if it's not already present in the local cache.

The new cache file layout looks like this:
- The cache directory contains one subfolder per repo_id (namespaced by repo type)
- inside each repo folder:
    - refs is a list of the latest known revision => commit_hash pairs
    - blobs contains the actual file blobs (identified by their git-sha or sha256, depending on
    whether they're LFS files or not)
    - snapshots contains one subfolder per commit, each "commit" contains the subset of the files
    that have been resolved at that particular commit. Each filename is a symlink to the blob
    at that particular commit.

```
[  96]  .
└── [ 160]  models--julien-c--EsperBERTo-small
    ├── [ 160]  blobs
    │   ├── [321M]  403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
    │   ├── [ 398]  7cb18dc9bafbfcf74629a4b760af1b160957a83e
    │   └── [1.4K]  d7edf6bd2a681fb0175f7735299831ee1b22b812
    ├── [  96]  refs
    │   └── [  40]  main
    └── [ 128]  snapshots
        ├── [ 128]  2439f60ef33a0d46d85da5001d52aeda5b00ce9f
        │   ├── [  52]  README.md -> ../../blobs/d7edf6bd2a681fb0175f7735299831ee1b22b812
        │   └── [  76]  pytorch_model.bin -> ../../blobs/403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
        └── [ 128]  bbc77c8132af1cc5cf678da3f1ddf2de43606d48
            ├── [  52]  README.md -> ../../blobs/7cb18dc9bafbfcf74629a4b760af1b160957a83e
            └── [  76]  pytorch_model.bin -> ../../blobs/403450e234d65943a7dcf7e05a771ce3c92faa84dd07db4ac20f592037a1e4bd
```

If `local_dir` is provided, the file structure from the repo will be replicated in this location. When using this
option, the `cache_dir` will not be used and a `.cache/huggingface/` folder will be created at the root of `local_dir`
to store some metadata related to the downloaded files. While this mechanism is not as robust as the main
cache-system, it's optimized for regularly pulling the latest version of a repository.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    filename (`str`):
        The name of the file in the repo.
    subfolder (`str`, *optional*):
        An optional value corresponding to a folder inside the model repo.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if downloading from a dataset or space,
        `None` or `"model"` if downloading from a model. Default is `None`.
    revision (`str`, *optional*):
        An optional Git revision id which can be a branch name, a tag, or a
        commit hash.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    local_dir (`str` or `Path`, *optional*):
        If provided, the downloaded file will be placed under this directory.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether the file should be downloaded even if it already exists in
        the local cache.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    etag_timeout (`float`, *optional*, defaults to `10`):
        When fetching ETag, how many seconds to wait for the server to send
        data before giving up which is passed to `requests.request`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the
        local cached file if it exists.

Returns:
    `str`: Local path of file or if networking is off, last version of file cached on disk.

Raises:
    [`~utils.RepositoryNotFoundError`]
        If the repository to download from cannot be found. This may be because it doesn't exist,
        or because it is set to `private` and you do not have access.
    [`~utils.RevisionNotFoundError`]
        If the revision to download from cannot be found.
    [`~utils.EntryNotFoundError`]
        If the file to download cannot be found.
    [`~utils.LocalEntryNotFoundError`]
        If network is disabled or unavailable and file is not found in cache.
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `token=True` but the token cannot be found.
    [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError)
        If ETag cannot be determined.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If some parameter value is invalid.

---
## snapshot_download
```python
from hf_api import snapshot_download
```

Download repo files.

Download a whole snapshot of a repo's files at the specified revision. This is useful when you want all files from
a repo, because you don't know which ones you will need a priori. All files are nested inside a folder in order
to keep their actual filename relative to that folder. You can also filter which files to download using
`allow_patterns` and `ignore_patterns`.

If `local_dir` is provided, the file structure from the repo will be replicated in this location. When using this
option, the `cache_dir` will not be used and a `.cache/huggingface/` folder will be created at the root of `local_dir`
to store some metadata related to the downloaded files.While this mechanism is not as robust as the main
cache-system, it's optimized for regularly pulling the latest version of a repository.

An alternative would be to clone the repo but this requires git and git-lfs to be installed and properly
configured. It is also not possible to filter which files to download when cloning a repository using git.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if downloading from a dataset or space,
        `None` or `"model"` if downloading from a model. Default is `None`.
    revision (`str`, *optional*):
        An optional Git revision id which can be a branch name, a tag, or a
        commit hash.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    local_dir (`str` or `Path`, *optional*):
        If provided, the downloaded files will be placed under this directory.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    etag_timeout (`float`, *optional*, defaults to `10`):
        When fetching ETag, how many seconds to wait for the server to send
        data before giving up which is passed to `requests.request`.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether the file should be downloaded even if it already exists in the local cache.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the
        local cached file if it exists.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are downloaded.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not downloaded.
    max_workers (`int`, *optional*):
        Number of concurrent threads to download files (1 thread = 1 file download).
        Defaults to 8.
    tqdm_class (`tqdm`, *optional*):
        If provided, overwrites the default behavior for the progress bar. Passed
        argument must inherit from `tqdm.auto.tqdm` or at least mimic its behavior.
        Note that the `tqdm_class` is not passed to each individual download.
        Defaults to the custom HF progress bar that can be disabled by setting
        `HF_HUB_DISABLE_PROGRESS_BARS` environment variable.

Returns:
    `str`: folder path of the repo snapshot.

Raises:
    [`~utils.RepositoryNotFoundError`]
        If the repository to download from cannot be found. This may be because it doesn't exist,
        or because it is set to `private` and you do not have access.
    [`~utils.RevisionNotFoundError`]
        If the revision to download from cannot be found.
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `token=True` and the token cannot be found.
    [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError) if
        ETag cannot be determined.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        if some parameter value is invalid.

---
## get_safetensors_metadata
```python
from hf_api import get_safetensors_metadata
```

Parse metadata for a safetensors repo on the Hub.

We first check if the repo has a single safetensors file or a sharded safetensors repo. If it's a single
safetensors file, we parse the metadata from this file. If it's a sharded safetensors repo, we parse the
metadata from the index file and then parse the metadata from each shard.

To parse metadata from a single safetensors file, use [`parse_safetensors_file_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    filename (`str`):
        The name of the file in the repo.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if the file is in a dataset or space, `None` or `"model"` if in a
        model. Default is `None`.
    revision (`str`, *optional*):
        The git revision to fetch the file from. Can be a branch name, a tag, or a commit hash. Defaults to the
        head of the `"main"` branch.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`SafetensorsRepoMetadata`]: information related to safetensors repo.

Raises:
    [`NotASafetensorsRepoError`]
        If the repo is not a safetensors repo i.e. doesn't have either a
      `model.safetensors` or a `model.safetensors.index.json` file.
    [`SafetensorsParsingError`]
        If a safetensors file header couldn't be parsed correctly.

Example:
    ```py
    # Parse repo with single weights file
    >>> metadata = get_safetensors_metadata("bigscience/bloomz-560m")
    >>> metadata
    SafetensorsRepoMetadata(
        metadata=None,
        sharded=False,
        weight_map={'h.0.input_layernorm.bias': 'model.safetensors', ...},
        files_metadata={'model.safetensors': SafetensorsFileMetadata(...)}
    )
    >>> metadata.files_metadata["model.safetensors"].metadata
    {'format': 'pt'}

    # Parse repo with sharded model
    >>> metadata = get_safetensors_metadata("bigscience/bloom")
    Parse safetensors files: 100%|██████████████████████████████████████████| 72/72 [00:12<00:00,  5.78it/s]
    >>> metadata
    SafetensorsRepoMetadata(metadata={'total_size': 352494542848}, sharded=True, weight_map={...}, files_metadata={...})
    >>> len(metadata.files_metadata)
    72  # All safetensors files have been fetched

    # Parse repo with sharded model
    >>> get_safetensors_metadata("runwayml/stable-diffusion-v1-5")
    NotASafetensorsRepoError: 'runwayml/stable-diffusion-v1-5' is not a safetensors repo. Couldn't find 'model.safetensors.index.json' or 'model.safetensors' files.
    ```

---
## parse_safetensors_file_metadata
```python
from hf_api import parse_safetensors_file_metadata
```

Parse metadata from a safetensors file on the Hub.

To parse metadata from all safetensors files in a repo at once, use [`get_safetensors_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    filename (`str`):
        The name of the file in the repo.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if the file is in a dataset or space, `None` or `"model"` if in a
        model. Default is `None`.
    revision (`str`, *optional*):
        The git revision to fetch the file from. Can be a branch name, a tag, or a commit hash. Defaults to the
        head of the `"main"` branch.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`SafetensorsFileMetadata`]: information related to a safetensors file.

Raises:
    [`NotASafetensorsRepoError`]:
        If the repo is not a safetensors repo i.e. doesn't have either a
      `model.safetensors` or a `model.safetensors.index.json` file.
    [`SafetensorsParsingError`]:
        If a safetensors file header couldn't be parsed correctly.

---
## create_branch
```python
from hf_api import create_branch
```

Create a new branch for a repo on the Hub, starting from the specified revision (defaults to `main`).
To find a revision suiting your needs, you can use [`list_repo_refs`] or [`list_repo_commits`].

Args:
    repo_id (`str`):
        The repository in which the branch will be created.
        Example: `"user/my-cool-model"`.

    branch (`str`):
        The name of the branch to create.

    revision (`str`, *optional*):
        The git revision to create the branch from. It can be a branch name or
        the OID/SHA of a commit, as a hexadecimal string. Defaults to the head
        of the `"main"` branch.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if creating a branch on a dataset or
        space, `None` or `"model"` if tagging a model. Default is `None`.

    exist_ok (`bool`, *optional*, defaults to `False`):
        If `True`, do not raise an error if branch already exists.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.
    [`~utils.BadRequestError`]:
        If invalid reference for a branch. Ex: `refs/pr/5` or 'refs/foo/bar'.
    [`~utils.HfHubHTTPError`]:
        If the branch already exists on the repo (error 409) and `exist_ok` is
        set to `False`.

---
## delete_branch
```python
from hf_api import delete_branch
```

Delete a branch from a repo on the Hub.

Args:
    repo_id (`str`):
        The repository in which a branch will be deleted.
        Example: `"user/my-cool-model"`.

    branch (`str`):
        The name of the branch to delete.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if creating a branch on a dataset or
        space, `None` or `"model"` if tagging a model. Default is `None`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.
    [`~utils.HfHubHTTPError`]:
        If trying to delete a protected branch. Ex: `main` cannot be deleted.
    [`~utils.HfHubHTTPError`]:
        If trying to delete a branch that does not exist.

---
## create_tag
```python
from hf_api import create_tag
```

Tag a given commit of a repo on the Hub.

Args:
    repo_id (`str`):
        The repository in which a commit will be tagged.
        Example: `"user/my-cool-model"`.

    tag (`str`):
        The name of the tag to create.

    tag_message (`str`, *optional*):
        The description of the tag to create.

    revision (`str`, *optional*):
        The git revision to tag. It can be a branch name or the OID/SHA of a
        commit, as a hexadecimal string. Shorthands (7 first characters) are
        also supported. Defaults to the head of the `"main"` branch.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if tagging a dataset or
        space, `None` or `"model"` if tagging a model. Default is
        `None`.

    exist_ok (`bool`, *optional*, defaults to `False`):
        If `True`, do not raise an error if tag already exists.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.
    [`~utils.RevisionNotFoundError`]:
        If revision is not found (error 404) on the repo.
    [`~utils.HfHubHTTPError`]:
        If the branch already exists on the repo (error 409) and `exist_ok` is
        set to `False`.

---
## delete_tag
```python
from hf_api import delete_tag
```

Delete a tag from a repo on the Hub.

Args:
    repo_id (`str`):
        The repository in which a tag will be deleted.
        Example: `"user/my-cool-model"`.

    tag (`str`):
        The name of the tag to delete.

    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if tagging a dataset or space, `None` or
        `"model"` if tagging a model. Default is `None`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If repository is not found (error 404): wrong repo_id/repo_type, private
        but not authenticated or repo does not exist.
    [`~utils.RevisionNotFoundError`]:
        If tag is not found.

---
## get_full_repo_name
```python
from hf_api import get_full_repo_name
```

Returns the repository name for a given model ID and optional
organization.

Args:
    model_id (`str`):
        The name of the model.
    organization (`str`, *optional*):
        If passed, the repository name will be in the organization
        namespace instead of the user namespace.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `str`: The repository name in the user's namespace
    ({username}/{model_id}) if no organization is passed, and under the
    organization namespace ({organization}/{model_id}) otherwise.

---
## get_repo_discussions
```python
from hf_api import get_repo_discussions
```

Fetches Discussions and Pull Requests for the given repo.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    author (`str`, *optional*):
        Pass a value to filter by discussion author. `None` means no filter.
        Default is `None`.
    discussion_type (`str`, *optional*):
        Set to `"pull_request"` to fetch only pull requests, `"discussion"`
        to fetch only discussions. Set to `"all"` or `None` to fetch both.
        Default is `None`.
    discussion_status (`str`, *optional*):
        Set to `"open"` (respectively `"closed"`) to fetch only open
        (respectively closed) discussions. Set to `"all"` or `None`
        to fetch both.
        Default is `None`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if fetching from a dataset or
        space, `None` or `"model"` if fetching from a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterator[Discussion]`: An iterator of [`Discussion`] objects.

Example:
    Collecting all discussions of a repo in a list:

    ```python
    >>> from huggingface_hub import get_repo_discussions
    >>> discussions_list = list(get_repo_discussions(repo_id="bert-base-uncased"))
    ```

    Iterating over discussions of a repo:

    ```python
    >>> from huggingface_hub import get_repo_discussions
    >>> for discussion in get_repo_discussions(repo_id="bert-base-uncased"):
    ...     print(discussion.num, discussion.title)
    ```

---
## get_discussion_details
```python
from hf_api import get_discussion_details
```

Fetches a Discussion's / Pull Request 's details from the Hub.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns: [`DiscussionWithDetails`]

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## create_discussion
```python
from hf_api import create_discussion
```

Creates a Discussion or Pull Request.

Pull Requests created programmatically will be in `"draft"` status.

Creating a Pull Request with changes can also be done at once with [`HfApi.create_commit`].

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    title (`str`):
        The title of the discussion. It can be up to 200 characters long,
        and must be at least 3 characters long. Leading and trailing whitespaces
        will be stripped.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    description (`str`, *optional*):
        An optional description for the Pull Request.
        Defaults to `"Discussion opened with the huggingface_hub Python library"`
    pull_request (`bool`, *optional*):
        Whether to create a Pull Request or discussion. If `True`, creates a Pull Request.
        If `False`, creates a discussion. Defaults to `False`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.

Returns: [`DiscussionWithDetails`]

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## create_pull_request
```python
from hf_api import create_pull_request
```

Creates a Pull Request . Pull Requests created programmatically will be in `"draft"` status.

Creating a Pull Request with changes can also be done at once with [`HfApi.create_commit`];

This is a wrapper around [`HfApi.create_discussion`].

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    title (`str`):
        The title of the discussion. It can be up to 200 characters long,
        and must be at least 3 characters long. Leading and trailing whitespaces
        will be stripped.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    description (`str`, *optional*):
        An optional description for the Pull Request.
        Defaults to `"Discussion opened with the huggingface_hub Python library"`
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.

Returns: [`DiscussionWithDetails`]

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## _post_discussion_changes
```python
from hf_api import _post_discussion_changes
```

Internal utility to POST changes to a Discussion or Pull Request

---
## comment_discussion
```python
from hf_api import comment_discussion
```

Creates a new comment on the given Discussion.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    comment (`str`):
        The content of the comment to create. Comments support markdown formatting.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionComment`]: the newly created comment


Examples:
    ```python

    >>> comment = """
    ... Hello @otheruser!
    ...
    ... # This is a title
    ...
    ... **This is bold**, *this is italic* and ~this is strikethrough~
    ... And [this](http://url) is a link
    ... """

    >>> HfApi().comment_discussion(
    ...     repo_id="username/repo_name",
    ...     discussion_num=34
    ...     comment=comment
    ... )
    # DiscussionComment(id='deadbeef0000000', type='comment', ...)

    ```

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## rename_discussion
```python
from hf_api import rename_discussion
```

Renames a Discussion.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    new_title (`str`):
        The new title for the discussion
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionTitleChange`]: the title change event


Examples:
    ```python
    >>> new_title = "New title, fixing a typo"
    >>> HfApi().rename_discussion(
    ...     repo_id="username/repo_name",
    ...     discussion_num=34
    ...     new_title=new_title
    ... )
    # DiscussionTitleChange(id='deadbeef0000000', type='title-change', ...)

    ```

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## change_discussion_status
```python
from hf_api import change_discussion_status
```

Closes or re-opens a Discussion or Pull Request.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    new_status (`str`):
        The new status for the discussion, either `"open"` or `"closed"`.
    comment (`str`, *optional*):
        An optional comment to post with the status change.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionStatusChange`]: the status change event


Examples:
    ```python
    >>> new_title = "New title, fixing a typo"
    >>> HfApi().rename_discussion(
    ...     repo_id="username/repo_name",
    ...     discussion_num=34
    ...     new_title=new_title
    ... )
    # DiscussionStatusChange(id='deadbeef0000000', type='status-change', ...)

    ```

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## merge_pull_request
```python
from hf_api import merge_pull_request
```

Merges a Pull Request.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    comment (`str`, *optional*):
        An optional comment to post with the status change.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionStatusChange`]: the status change event

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## edit_discussion_comment
```python
from hf_api import edit_discussion_comment
```

Edits a comment on a Discussion / Pull Request.

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    comment_id (`str`):
        The ID of the comment to edit.
    new_content (`str`):
        The new content of the comment. Comments support markdown formatting.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionComment`]: the edited comment

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## hide_discussion_comment
```python
from hf_api import hide_discussion_comment
```

Hides a comment on a Discussion / Pull Request.

<Tip warning={true}>
Hidden comments' content cannot be retrieved anymore. Hiding a comment is irreversible.
</Tip>

Args:
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    discussion_num (`int`):
        The number of the Discussion or Pull Request . Must be a strictly positive integer.
    comment_id (`str`):
        The ID of the comment to edit.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if uploading to a dataset or
        space, `None` or `"model"` if uploading to a model. Default is
        `None`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`DiscussionComment`]: the hidden comment

<Tip>

Raises the following errors:

    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the HuggingFace API returned an error
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if some parameter value is invalid
    - [`~utils.RepositoryNotFoundError`]
      If the repository to download from cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.

</Tip>

---
## add_space_secret
```python
from hf_api import add_space_secret
```

Adds or updates a secret in a Space.

Secrets allow to set secret keys or tokens to a Space without hardcoding them.
For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets.

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    key (`str`):
        Secret key. Example: `"GITHUB_API_KEY"`
    value (`str`):
        Secret value. Example: `"your_github_api_key"`.
    description (`str`, *optional*):
        Secret description. Example: `"Github API key to access the Github API"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## delete_space_secret
```python
from hf_api import delete_space_secret
```

Deletes a secret from a Space.

Secrets allow to set secret keys or tokens to a Space without hardcoding them.
For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets.

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    key (`str`):
        Secret key. Example: `"GITHUB_API_KEY"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## get_space_variables
```python
from hf_api import get_space_variables
```

Gets all variables from a Space.

Variables allow to set environment variables to a Space without hardcoding them.
For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets-and-environment-variables

Args:
    repo_id (`str`):
        ID of the repo to query. Example: `"bigcode/in-the-stack"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## add_space_variable
```python
from hf_api import add_space_variable
```

Adds or updates a variable in a Space.

Variables allow to set environment variables to a Space without hardcoding them.
For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets-and-environment-variables

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    key (`str`):
        Variable key. Example: `"MODEL_REPO_ID"`
    value (`str`):
        Variable value. Example: `"the_model_repo_id"`.
    description (`str`):
        Description of the variable. Example: `"Model Repo ID of the implemented model"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## delete_space_variable
```python
from hf_api import delete_space_variable
```

Deletes a variable from a Space.

Variables allow to set environment variables to a Space without hardcoding them.
For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets-and-environment-variables

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    key (`str`):
        Variable key. Example: `"MODEL_REPO_ID"`
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## get_space_runtime
```python
from hf_api import get_space_runtime
```

Gets runtime information about a Space.

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
Returns:
    [`SpaceRuntime`]: Runtime information about a Space including Space stage and hardware.

---
## request_space_hardware
```python
from hf_api import request_space_hardware
```

Request new hardware for a Space.

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    hardware (`str` or [`SpaceHardware`]):
        Hardware on which to run the Space. Example: `"t4-medium"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    sleep_time (`int`, *optional*):
        Number of seconds of inactivity to wait before a Space is put to sleep. Set to `-1` if you don't want
        your Space to sleep (default behavior for upgraded hardware). For free hardware, you can't configure
        the sleep time (value is fixed to 48 hours of inactivity).
        See https://huggingface.co/docs/hub/spaces-gpus#sleep-time for more details.
Returns:
    [`SpaceRuntime`]: Runtime information about a Space including Space stage and hardware.

<Tip>

It is also possible to request hardware directly when creating the Space repo! See [`create_repo`] for details.

</Tip>

---
## set_space_sleep_time
```python
from hf_api import set_space_sleep_time
```

Set a custom sleep time for a Space running on upgraded hardware..

Your Space will go to sleep after X seconds of inactivity. You are not billed when your Space is in "sleep"
mode. If a new visitor lands on your Space, it will "wake it up". Only upgraded hardware can have a
configurable sleep time. To know more about the sleep stage, please refer to
https://huggingface.co/docs/hub/spaces-gpus#sleep-time.

Args:
    repo_id (`str`):
        ID of the repo to update. Example: `"bigcode/in-the-stack"`.
    sleep_time (`int`, *optional*):
        Number of seconds of inactivity to wait before a Space is put to sleep. Set to `-1` if you don't want
        your Space to pause (default behavior for upgraded hardware). For free hardware, you can't configure
        the sleep time (value is fixed to 48 hours of inactivity).
        See https://huggingface.co/docs/hub/spaces-gpus#sleep-time for more details.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
Returns:
    [`SpaceRuntime`]: Runtime information about a Space including Space stage and hardware.

<Tip>

It is also possible to set a custom sleep time when requesting hardware with [`request_space_hardware`].

</Tip>

---
## pause_space
```python
from hf_api import pause_space
```

Pause your Space.

A paused Space stops executing until manually restarted by its owner. This is different from the sleeping
state in which free Spaces go after 48h of inactivity. Paused time is not billed to your account, no matter the
hardware you've selected. To restart your Space, use [`restart_space`] and go to your Space settings page.

For more details, please visit [the docs](https://huggingface.co/docs/hub/spaces-gpus#pause).

Args:
    repo_id (`str`):
        ID of the Space to pause. Example: `"Salesforce/BLIP2"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`SpaceRuntime`]: Runtime information about your Space including `stage=PAUSED` and requested hardware.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If your Space is not found (error 404). Most probably wrong repo_id or your space is private but you
        are not authenticated.
    [`~utils.HfHubHTTPError`]:
        403 Forbidden: only the owner of a Space can pause it. If you want to manage a Space that you don't
        own, either ask the owner by opening a Discussion or duplicate the Space.
    [`~utils.BadRequestError`]:
        If your Space is a static Space. Static Spaces are always running and never billed. If you want to hide
        a static Space, you can set it to private.

---
## restart_space
```python
from hf_api import restart_space
```

Restart your Space.

This is the only way to programmatically restart a Space if you've put it on Pause (see [`pause_space`]). You
must be the owner of the Space to restart it. If you are using an upgraded hardware, your account will be
billed as soon as the Space is restarted. You can trigger a restart no matter the current state of a Space.

For more details, please visit [the docs](https://huggingface.co/docs/hub/spaces-gpus#pause).

Args:
    repo_id (`str`):
        ID of the Space to restart. Example: `"Salesforce/BLIP2"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    factory_reboot (`bool`, *optional*):
        If `True`, the Space will be rebuilt from scratch without caching any requirements.

Returns:
    [`SpaceRuntime`]: Runtime information about your Space.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        If your Space is not found (error 404). Most probably wrong repo_id or your space is private but you
        are not authenticated.
    [`~utils.HfHubHTTPError`]:
        403 Forbidden: only the owner of a Space can restart it. If you want to restart a Space that you don't
        own, either ask the owner by opening a Discussion or duplicate the Space.
    [`~utils.BadRequestError`]:
        If your Space is a static Space. Static Spaces are always running and never billed. If you want to hide
        a static Space, you can set it to private.

---
## duplicate_space
```python
from hf_api import duplicate_space
```

Duplicate a Space.

Programmatically duplicate a Space. The new Space will be created in your account and will be in the same state
as the original Space (running or paused). You can duplicate a Space no matter the current state of a Space.

Args:
    from_id (`str`):
        ID of the Space to duplicate. Example: `"pharma/CLIP-Interrogator"`.
    to_id (`str`, *optional*):
        ID of the new Space. Example: `"dog/CLIP-Interrogator"`. If not provided, the new Space will have the same
        name as the original Space, but in your account.
    private (`bool`, *optional*):
        Whether the new Space should be private or not. Defaults to the same privacy as the original Space.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    exist_ok (`bool`, *optional*, defaults to `False`):
        If `True`, do not raise an error if repo already exists.
    hardware (`SpaceHardware` or `str`, *optional*):
        Choice of Hardware. Example: `"t4-medium"`. See [`SpaceHardware`] for a complete list.
    storage (`SpaceStorage` or `str`, *optional*):
        Choice of persistent storage tier. Example: `"small"`. See [`SpaceStorage`] for a complete list.
    sleep_time (`int`, *optional*):
        Number of seconds of inactivity to wait before a Space is put to sleep. Set to `-1` if you don't want
        your Space to sleep (default behavior for upgraded hardware). For free hardware, you can't configure
        the sleep time (value is fixed to 48 hours of inactivity).
        See https://huggingface.co/docs/hub/spaces-gpus#sleep-time for more details.
    secrets (`List[Dict[str, str]]`, *optional*):
        A list of secret keys to set in your Space. Each item is in the form `{"key": ..., "value": ..., "description": ...}` where description is optional.
        For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets.
    variables (`List[Dict[str, str]]`, *optional*):
        A list of public environment variables to set in your Space. Each item is in the form `{"key": ..., "value": ..., "description": ...}` where description is optional.
        For more details, see https://huggingface.co/docs/hub/spaces-overview#managing-secrets-and-environment-variables.

Returns:
    [`RepoUrl`]: URL to the newly created repo. Value is a subclass of `str` containing
    attributes like `endpoint`, `repo_type` and `repo_id`.

Raises:
    [`~utils.RepositoryNotFoundError`]:
      If one of `from_id` or `to_id` cannot be found. This may be because it doesn't exist,
      or because it is set to `private` and you do not have access.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
      If the HuggingFace API returned an error

Example:
```python
>>> from huggingface_hub import duplicate_space

# Duplicate a Space to your account
>>> duplicate_space("multimodalart/dreambooth-training")
RepoUrl('https://huggingface.co/spaces/nateraw/dreambooth-training',...)

# Can set custom destination id and visibility flag.
>>> duplicate_space("multimodalart/dreambooth-training", to_id="my-dreambooth", private=True)
RepoUrl('https://huggingface.co/spaces/nateraw/my-dreambooth',...)
```

---
## request_space_storage
```python
from hf_api import request_space_storage
```

Request persistent storage for a Space.

Args:
    repo_id (`str`):
        ID of the Space to update. Example: `"open-llm-leaderboard/open_llm_leaderboard"`.
    storage (`str` or [`SpaceStorage`]):
       Storage tier. Either 'small', 'medium', or 'large'.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
Returns:
    [`SpaceRuntime`]: Runtime information about a Space including Space stage and hardware.

<Tip>

It is not possible to decrease persistent storage after its granted. To do so, you must delete it
via [`delete_space_storage`].

</Tip>

---
## delete_space_storage
```python
from hf_api import delete_space_storage
```

Delete persistent storage for a Space.

Args:
    repo_id (`str`):
        ID of the Space to update. Example: `"open-llm-leaderboard/open_llm_leaderboard"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
Returns:
    [`SpaceRuntime`]: Runtime information about a Space including Space stage and hardware.
Raises:
    [`BadRequestError`]
        If space has no persistent storage.

---
## list_inference_endpoints
```python
from hf_api import list_inference_endpoints
```

Lists all inference endpoints for the given namespace.

Args:
    namespace (`str`, *optional*):
        The namespace to list endpoints for. Defaults to the current user. Set to `"*"` to list all endpoints
        from all namespaces (i.e. personal namespace and all orgs the user belongs to).
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    List[`InferenceEndpoint`]: A list of all inference endpoints for the given namespace.

Example:
```python
>>> from huggingface_hub import HfApi
>>> api = HfApi()
>>> api.list_inference_endpoints()
[InferenceEndpoint(name='my-endpoint', ...), ...]
```

---
## create_inference_endpoint
```python
from hf_api import create_inference_endpoint
```

Create a new Inference Endpoint.

Args:
    name (`str`):
        The unique name for the new Inference Endpoint.
    repository (`str`):
        The name of the model repository associated with the Inference Endpoint (e.g. `"gpt2"`).
    framework (`str`):
        The machine learning framework used for the model (e.g. `"custom"`).
    accelerator (`str`):
        The hardware accelerator to be used for inference (e.g. `"cpu"`).
    instance_size (`str`):
        The size or type of the instance to be used for hosting the model (e.g. `"x4"`).
    instance_type (`str`):
        The cloud instance type where the Inference Endpoint will be deployed (e.g. `"intel-icl"`).
    region (`str`):
        The cloud region in which the Inference Endpoint will be created (e.g. `"us-east-1"`).
    vendor (`str`):
        The cloud provider or vendor where the Inference Endpoint will be hosted (e.g. `"aws"`).
    account_id (`str`, *optional*):
        The account ID used to link a VPC to a private Inference Endpoint (if applicable).
    min_replica (`int`, *optional*):
        The minimum number of replicas (instances) to keep running for the Inference Endpoint. Defaults to 0.
    max_replica (`int`, *optional*):
        The maximum number of replicas (instances) to scale to for the Inference Endpoint. Defaults to 1.
    scale_to_zero_timeout (`int`, *optional*):
        The duration in minutes before an inactive endpoint is scaled to zero. Defaults to 15.
    revision (`str`, *optional*):
        The specific model revision to deploy on the Inference Endpoint (e.g. `"6c0e6080953db56375760c0471a8c5f2929baf11"`).
    task (`str`, *optional*):
        The task on which to deploy the model (e.g. `"text-classification"`).
    custom_image (`Dict`, *optional*):
        A custom Docker image to use for the Inference Endpoint. This is useful if you want to deploy an
        Inference Endpoint running on the `text-generation-inference` (TGI) framework (see examples).
    secrets (`Dict[str, str]`, *optional*):
        Secret values to inject in the container environment.
    type ([`InferenceEndpointType]`, *optional*):
        The type of the Inference Endpoint, which can be `"protected"` (default), `"public"` or `"private"`.
    namespace (`str`, *optional*):
        The namespace where the Inference Endpoint will be created. Defaults to the current user's namespace.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

    Returns:
        [`InferenceEndpoint`]: information about the updated Inference Endpoint.

    Example:
    ```python
    >>> from huggingface_hub import HfApi
    >>> api = HfApi()
    >>> endpoint = api.create_inference_endpoint(
    ...     "my-endpoint-name",
    ...     repository="gpt2",
    ...     framework="pytorch",
    ...     task="text-generation",
    ...     accelerator="cpu",
    ...     vendor="aws",
    ...     region="us-east-1",
    ...     type="protected",
    ...     instance_size="x2",
    ...     instance_type="intel-icl",
    ... )
    >>> endpoint
    InferenceEndpoint(name='my-endpoint-name', status="pending",...)

    # Run inference on the endpoint
    >>> endpoint.client.text_generation(...)
    "..."
    ```

    ```python
    # Start an Inference Endpoint running Zephyr-7b-beta on TGI
    >>> from huggingface_hub import HfApi
    >>> api = HfApi()
    >>> endpoint = api.create_inference_endpoint(
    ...     "aws-zephyr-7b-beta-0486",
    ...     repository="HuggingFaceH4/zephyr-7b-beta",
    ...     framework="pytorch",
    ...     task="text-generation",
    ...     accelerator="gpu",
    ...     vendor="aws",
    ...     region="us-east-1",
    ...     type="protected",
    ...     instance_size="x1",
    ...     instance_type="nvidia-a10g",
    ...     custom_image={
    ...         "health_route": "/health",
    ...         "env": {
    ...             "MAX_BATCH_PREFILL_TOKENS": "2048",
    ...             "MAX_INPUT_LENGTH": "1024",
    ...             "MAX_TOTAL_TOKENS": "1512",
    ...             "MODEL_ID": "/repository"
    ...         },
    ...         "url": "ghcr.io/huggingface/text-generation-inference:1.1.0",
    ...     },
    ...    secrets={"MY_SECRET_KEY": "secret_value"},
    ... )

    ```

---
## get_inference_endpoint
```python
from hf_api import get_inference_endpoint
```

Get information about an Inference Endpoint.

Args:
    name (`str`):
        The name of the Inference Endpoint to retrieve information about.
    namespace (`str`, *optional*):
        The namespace in which the Inference Endpoint is located. Defaults to the current user.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`InferenceEndpoint`]: information about the requested Inference Endpoint.

Example:
```python
>>> from huggingface_hub import HfApi
>>> api = HfApi()
>>> endpoint = api.get_inference_endpoint("my-text-to-image")
>>> endpoint
InferenceEndpoint(name='my-text-to-image', ...)

# Get status
>>> endpoint.status
'running'
>>> endpoint.url
'https://my-text-to-image.region.vendor.endpoints.huggingface.cloud'

# Run inference
>>> endpoint.client.text_to_image(...)
```

---
## update_inference_endpoint
```python
from hf_api import update_inference_endpoint
```

Update an Inference Endpoint.

This method allows the update of either the compute configuration, the deployed model, or both. All arguments are
optional but at least one must be provided.

For convenience, you can also update an Inference Endpoint using [`InferenceEndpoint.update`].

Args:
    name (`str`):
        The name of the Inference Endpoint to update.

    accelerator (`str`, *optional*):
        The hardware accelerator to be used for inference (e.g. `"cpu"`).
    instance_size (`str`, *optional*):
        The size or type of the instance to be used for hosting the model (e.g. `"x4"`).
    instance_type (`str`, *optional*):
        The cloud instance type where the Inference Endpoint will be deployed (e.g. `"intel-icl"`).
    min_replica (`int`, *optional*):
        The minimum number of replicas (instances) to keep running for the Inference Endpoint.
    max_replica (`int`, *optional*):
        The maximum number of replicas (instances) to scale to for the Inference Endpoint.
    scale_to_zero_timeout (`int`, *optional*):
        The duration in minutes before an inactive endpoint is scaled to zero.

    repository (`str`, *optional*):
        The name of the model repository associated with the Inference Endpoint (e.g. `"gpt2"`).
    framework (`str`, *optional*):
        The machine learning framework used for the model (e.g. `"custom"`).
    revision (`str`, *optional*):
        The specific model revision to deploy on the Inference Endpoint (e.g. `"6c0e6080953db56375760c0471a8c5f2929baf11"`).
    task (`str`, *optional*):
        The task on which to deploy the model (e.g. `"text-classification"`).
    custom_image (`Dict`, *optional*):
        A custom Docker image to use for the Inference Endpoint. This is useful if you want to deploy an
        Inference Endpoint running on the `text-generation-inference` (TGI) framework (see examples).
    secrets (`Dict[str, str]`, *optional*):
        Secret values to inject in the container environment.
    namespace (`str`, *optional*):
        The namespace where the Inference Endpoint will be updated. Defaults to the current user's namespace.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`InferenceEndpoint`]: information about the updated Inference Endpoint.

---
## delete_inference_endpoint
```python
from hf_api import delete_inference_endpoint
```

Delete an Inference Endpoint.

This operation is not reversible. If you don't want to be charged for an Inference Endpoint, it is preferable
to pause it with [`pause_inference_endpoint`] or scale it to zero with [`scale_to_zero_inference_endpoint`].

For convenience, you can also delete an Inference Endpoint using [`InferenceEndpoint.delete`].

Args:
    name (`str`):
        The name of the Inference Endpoint to delete.
    namespace (`str`, *optional*):
        The namespace in which the Inference Endpoint is located. Defaults to the current user.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

---
## pause_inference_endpoint
```python
from hf_api import pause_inference_endpoint
```

Pause an Inference Endpoint.

A paused Inference Endpoint will not be charged. It can be resumed at any time using [`resume_inference_endpoint`].
This is different than scaling the Inference Endpoint to zero with [`scale_to_zero_inference_endpoint`], which
would be automatically restarted when a request is made to it.

For convenience, you can also pause an Inference Endpoint using [`pause_inference_endpoint`].

Args:
    name (`str`):
        The name of the Inference Endpoint to pause.
    namespace (`str`, *optional*):
        The namespace in which the Inference Endpoint is located. Defaults to the current user.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`InferenceEndpoint`]: information about the paused Inference Endpoint.

---
## resume_inference_endpoint
```python
from hf_api import resume_inference_endpoint
```

Resume an Inference Endpoint.

For convenience, you can also resume an Inference Endpoint using [`InferenceEndpoint.resume`].

Args:
    name (`str`):
        The name of the Inference Endpoint to resume.
    namespace (`str`, *optional*):
        The namespace in which the Inference Endpoint is located. Defaults to the current user.
    running_ok (`bool`, *optional*):
        If `True`, the method will not raise an error if the Inference Endpoint is already running. Defaults to
        `True`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`InferenceEndpoint`]: information about the resumed Inference Endpoint.

---
## scale_to_zero_inference_endpoint
```python
from hf_api import scale_to_zero_inference_endpoint
```

Scale Inference Endpoint to zero.

An Inference Endpoint scaled to zero will not be charged. It will be resume on the next request to it, with a
cold start delay. This is different than pausing the Inference Endpoint with [`pause_inference_endpoint`], which
would require a manual resume with [`resume_inference_endpoint`].

For convenience, you can also scale an Inference Endpoint to zero using [`InferenceEndpoint.scale_to_zero`].

Args:
    name (`str`):
        The name of the Inference Endpoint to scale to zero.
    namespace (`str`, *optional*):
        The namespace in which the Inference Endpoint is located. Defaults to the current user.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`InferenceEndpoint`]: information about the scaled-to-zero Inference Endpoint.

---
## _get_namespace
```python
from hf_api import _get_namespace
```

Get the default namespace for the current user.

---
## list_collections
```python
from hf_api import list_collections
```

List collections on the Huggingface Hub, given some filters.

<Tip warning={true}>

When listing collections, the item list per collection is truncated to 4 items maximum. To retrieve all items
from a collection, you must use [`get_collection`].

</Tip>

Args:
    owner (`List[str]` or `str`, *optional*):
        Filter by owner's username.
    item (`List[str]` or `str`, *optional*):
        Filter collections containing a particular items. Example: `"models/teknium/OpenHermes-2.5-Mistral-7B"`, `"datasets/squad"` or `"papers/2311.12983"`.
    sort (`Literal["lastModified", "trending", "upvotes"]`, *optional*):
        Sort collections by last modified, trending or upvotes.
    limit (`int`, *optional*):
        Maximum number of collections to be returned.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[Collection]`: an iterable of [`Collection`] objects.

---
## get_collection
```python
from hf_api import get_collection
```

Gets information about a Collection on the Hub.

Args:
    collection_slug (`str`):
        Slug of the collection of the Hub. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns: [`Collection`]

Example:

```py
>>> from huggingface_hub import get_collection
>>> collection = get_collection("TheBloke/recent-models-64f9a55bb3115b4f513ec026")
>>> collection.title
'Recent models'
>>> len(collection.items)
37
>>> collection.items[0]
CollectionItem(
    item_object_id='651446103cd773a050bf64c2',
    item_id='TheBloke/U-Amethyst-20B-AWQ',
    item_type='model',
    position=88,
    note=None
)
```

---
## create_collection
```python
from hf_api import create_collection
```

Create a new Collection on the Hub.

Args:
    title (`str`):
        Title of the collection to create. Example: `"Recent models"`.
    namespace (`str`, *optional*):
        Namespace of the collection to create (username or org). Will default to the owner name.
    description (`str`, *optional*):
        Description of the collection to create.
    private (`bool`, *optional*):
        Whether the collection should be private or not. Defaults to `False` (i.e. public collection).
    exists_ok (`bool`, *optional*):
        If `True`, do not raise an error if collection already exists.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns: [`Collection`]

Example:

```py
>>> from huggingface_hub import create_collection
>>> collection = create_collection(
...     title="ICCV 2023",
...     description="Portfolio of models, papers and demos I presented at ICCV 2023",
... )
>>> collection.slug
"username/iccv-2023-64f9a55bb3115b4f513ec026"
```

---
## update_collection_metadata
```python
from hf_api import update_collection_metadata
```

Update metadata of a collection on the Hub.

All arguments are optional. Only provided metadata will be updated.

Args:
    collection_slug (`str`):
        Slug of the collection to update. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    title (`str`):
        Title of the collection to update.
    description (`str`, *optional*):
        Description of the collection to update.
    position (`int`, *optional*):
        New position of the collection in the list of collections of the user.
    private (`bool`, *optional*):
        Whether the collection should be private or not.
    theme (`str`, *optional*):
        Theme of the collection on the Hub.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns: [`Collection`]

Example:

```py
>>> from huggingface_hub import update_collection_metadata
>>> collection = update_collection_metadata(
...     collection_slug="username/iccv-2023-64f9a55bb3115b4f513ec026",
...     title="ICCV Oct. 2023"
...     description="Portfolio of models, datasets, papers and demos I presented at ICCV Oct. 2023",
...     private=False,
...     theme="pink",
... )
>>> collection.slug
"username/iccv-oct-2023-64f9a55bb3115b4f513ec026"
# ^collection slug got updated but not the trailing ID
```

---
## delete_collection
```python
from hf_api import delete_collection
```

Delete a collection on the Hub.

Args:
    collection_slug (`str`):
        Slug of the collection to delete. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    missing_ok (`bool`, *optional*):
        If `True`, do not raise an error if collection doesn't exists.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Example:

```py
>>> from huggingface_hub import delete_collection
>>> collection = delete_collection("username/useless-collection-64f9a55bb3115b4f513ec026", missing_ok=True)
```

<Tip warning={true}>

This is a non-revertible action. A deleted collection cannot be restored.

</Tip>

---
## add_collection_item
```python
from hf_api import add_collection_item
```

Add an item to a collection on the Hub.

Args:
    collection_slug (`str`):
        Slug of the collection to update. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    item_id (`str`):
        ID of the item to add to the collection. It can be the ID of a repo on the Hub (e.g. `"facebook/bart-large-mnli"`)
        or a paper id (e.g. `"2307.09288"`).
    item_type (`str`):
        Type of the item to add. Can be one of `"model"`, `"dataset"`, `"space"` or `"paper"`.
    note (`str`, *optional*):
        A note to attach to the item in the collection. The maximum size for a note is 500 characters.
    exists_ok (`bool`, *optional*):
        If `True`, do not raise an error if item already exists.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns: [`Collection`]

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the item you try to add to the collection does not exist on the Hub.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 409 if the item you try to add to the collection is already in the collection (and exists_ok=False)

Example:

```py
>>> from huggingface_hub import add_collection_item
>>> collection = add_collection_item(
...     collection_slug="davanstrien/climate-64f99dc2a5067f6b65531bab",
...     item_id="pierre-loic/climate-news-articles",
...     item_type="dataset"
... )
>>> collection.items[-1].item_id
"pierre-loic/climate-news-articles"
# ^item got added to the collection on last position

# Add item with a note
>>> add_collection_item(
...     collection_slug="davanstrien/climate-64f99dc2a5067f6b65531bab",
...     item_id="datasets/climate_fever",
...     item_type="dataset"
...     note="This dataset adopts the FEVER methodology that consists of 1,535 real-world claims regarding climate-change collected on the internet."
... )
(...)
```

---
## update_collection_item
```python
from hf_api import update_collection_item
```

Update an item in a collection.

Args:
    collection_slug (`str`):
        Slug of the collection to update. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    item_object_id (`str`):
        ID of the item in the collection. This is not the id of the item on the Hub (repo_id or paper id).
        It must be retrieved from a [`CollectionItem`] object. Example: `collection.items[0].item_object_id`.
    note (`str`, *optional*):
        A note to attach to the item in the collection. The maximum size for a note is 500 characters.
    position (`int`, *optional*):
        New position of the item in the collection.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Example:

```py
>>> from huggingface_hub import get_collection, update_collection_item

# Get collection first
>>> collection = get_collection("TheBloke/recent-models-64f9a55bb3115b4f513ec026")

# Update item based on its ID (add note + update position)
>>> update_collection_item(
...     collection_slug="TheBloke/recent-models-64f9a55bb3115b4f513ec026",
...     item_object_id=collection.items[-1].item_object_id,
...     note="Newly updated model!"
...     position=0,
... )
```

---
## delete_collection_item
```python
from hf_api import delete_collection_item
```

Delete an item from a collection.

Args:
    collection_slug (`str`):
        Slug of the collection to update. Example: `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.
    item_object_id (`str`):
        ID of the item in the collection. This is not the id of the item on the Hub (repo_id or paper id).
        It must be retrieved from a [`CollectionItem`] object. Example: `collection.items[0]._id`.
    missing_ok (`bool`, *optional*):
        If `True`, do not raise an error if item doesn't exists.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Example:

```py
>>> from huggingface_hub import get_collection, delete_collection_item

# Get collection first
>>> collection = get_collection("TheBloke/recent-models-64f9a55bb3115b4f513ec026")

# Delete item based on its ID
>>> delete_collection_item(
...     collection_slug="TheBloke/recent-models-64f9a55bb3115b4f513ec026",
...     item_object_id=collection.items[-1].item_object_id,
... )
```

---
## list_pending_access_requests
```python
from hf_api import list_pending_access_requests
```

Get pending access requests for a given gated repo.

A pending request means the user has requested access to the repo but the request has not been processed yet.
If the approval mode is automatic, this list should be empty. Pending requests can be accepted or rejected
using [`accept_access_request`] and [`reject_access_request`].

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to get access requests for.
    repo_type (`str`, *optional*):
        The type of the repo to get access requests for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[AccessRequest]`: A list of [`AccessRequest`] objects. Each time contains a `username`, `email`,
    `status` and `timestamp` attribute. If the gated repo has a custom form, the `fields` attribute will
    be populated with user's answers.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.

Example:
```py
>>> from huggingface_hub import list_pending_access_requests, accept_access_request

# List pending requests
>>> requests = list_pending_access_requests("meta-llama/Llama-2-7b")
>>> len(requests)
411
>>> requests[0]
[
    AccessRequest(
        username='clem',
        fullname='Clem 🤗',
        email='***',
        timestamp=datetime.datetime(2023, 11, 23, 18, 4, 53, 828000, tzinfo=datetime.timezone.utc),
        status='pending',
        fields=None,
    ),
    ...
]

# Accept Clem's request
>>> accept_access_request("meta-llama/Llama-2-7b", "clem")
```

---
## list_accepted_access_requests
```python
from hf_api import list_accepted_access_requests
```

Get accepted access requests for a given gated repo.

An accepted request means the user has requested access to the repo and the request has been accepted. The user
can download any file of the repo. If the approval mode is automatic, this list should contains by default all
requests. Accepted requests can be cancelled or rejected at any time using [`cancel_access_request`] and
[`reject_access_request`]. A cancelled request will go back to the pending list while a rejected request will
go to the rejected list. In both cases, the user will lose access to the repo.

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to get access requests for.
    repo_type (`str`, *optional*):
        The type of the repo to get access requests for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[AccessRequest]`: A list of [`AccessRequest`] objects. Each time contains a `username`, `email`,
    `status` and `timestamp` attribute. If the gated repo has a custom form, the `fields` attribute will
    be populated with user's answers.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.

Example:
```py
>>> from huggingface_hub import list_accepted_access_requests

>>> requests = list_accepted_access_requests("meta-llama/Llama-2-7b")
>>> len(requests)
411
>>> requests[0]
[
    AccessRequest(
        username='clem',
        fullname='Clem 🤗',
        email='***',
        timestamp=datetime.datetime(2023, 11, 23, 18, 4, 53, 828000, tzinfo=datetime.timezone.utc),
        status='accepted',
        fields=None,
    ),
    ...
]
```

---
## list_rejected_access_requests
```python
from hf_api import list_rejected_access_requests
```

Get rejected access requests for a given gated repo.

A rejected request means the user has requested access to the repo and the request has been explicitly rejected
by a repo owner (either you or another user from your organization). The user cannot download any file of the
repo. Rejected requests can be accepted or cancelled at any time using [`accept_access_request`] and
[`cancel_access_request`]. A cancelled request will go back to the pending list while an accepted request will
go to the accepted list.

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to get access requests for.
    repo_type (`str`, *optional*):
        The type of the repo to get access requests for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[AccessRequest]`: A list of [`AccessRequest`] objects. Each time contains a `username`, `email`,
    `status` and `timestamp` attribute. If the gated repo has a custom form, the `fields` attribute will
    be populated with user's answers.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.

Example:
```py
>>> from huggingface_hub import list_rejected_access_requests

>>> requests = list_rejected_access_requests("meta-llama/Llama-2-7b")
>>> len(requests)
411
>>> requests[0]
[
    AccessRequest(
        username='clem',
        fullname='Clem 🤗',
        email='***',
        timestamp=datetime.datetime(2023, 11, 23, 18, 4, 53, 828000, tzinfo=datetime.timezone.utc),
        status='rejected',
        fields=None,
    ),
    ...
]
```

---
## _list_access_requests
```python
from hf_api import _list_access_requests
```



---
## cancel_access_request
```python
from hf_api import cancel_access_request
```

Cancel an access request from a user for a given gated repo.

A cancelled request will go back to the pending list and the user will lose access to the repo.

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to cancel access request for.
    user (`str`):
        The username of the user which access request should be cancelled.
    repo_type (`str`, *optional*):
        The type of the repo to cancel access request for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user does not exist on the Hub.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request cannot be found.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request is already in the pending list.

---
## accept_access_request
```python
from hf_api import accept_access_request
```

Accept an access request from a user for a given gated repo.

Once the request is accepted, the user will be able to download any file of the repo and access the community
tab. If the approval mode is automatic, you don't have to accept requests manually. An accepted request can be
cancelled or rejected at any time using [`cancel_access_request`] and [`reject_access_request`].

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to accept access request for.
    user (`str`):
        The username of the user which access request should be accepted.
    repo_type (`str`, *optional*):
        The type of the repo to accept access request for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user does not exist on the Hub.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request cannot be found.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request is already in the accepted list.

---
## reject_access_request
```python
from hf_api import reject_access_request
```

Reject an access request from a user for a given gated repo.

A rejected request will go to the rejected list. The user cannot download any file of the repo. Rejected
requests can be accepted or cancelled at any time using [`accept_access_request`] and [`cancel_access_request`].
A cancelled request will go back to the pending list while an accepted request will go to the accepted list.

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to reject access request for.
    user (`str`):
        The username of the user which access request should be rejected.
    repo_type (`str`, *optional*):
        The type of the repo to reject access request for. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user does not exist on the Hub.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request cannot be found.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user access request is already in the rejected list.

---
## _handle_access_request
```python
from hf_api import _handle_access_request
```



---
## grant_access
```python
from hf_api import grant_access
```

Grant access to a user for a given gated repo.

Granting access don't require for the user to send an access request by themselves. The user is automatically
added to the accepted list meaning they can download the files You can revoke the granted access at any time
using [`cancel_access_request`] or [`reject_access_request`].

For more info about gated repos, see https://huggingface.co/docs/hub/models-gated.

Args:
    repo_id (`str`):
        The id of the repo to grant access to.
    user (`str`):
        The username of the user to grant access.
    repo_type (`str`, *optional*):
        The type of the repo to grant access to. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the repo is not gated.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 400 if the user already has access to the repo.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 403 if you only have read-only access to the repo. This can be the case if you don't have `write`
        or `admin` role in the organization the repo belongs to or if you passed a `read` token.
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 if the user does not exist on the Hub.

---
## get_webhook
```python
from hf_api import get_webhook
```

Get a webhook by its id.

Args:
    webhook_id (`str`):
        The unique identifier of the webhook to get.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`WebhookInfo`]:
        Info about the webhook.

Example:
    ```python
    >>> from huggingface_hub import get_webhook
    >>> webhook = get_webhook("654bbbc16f2ec14d77f109cc")
    >>> print(webhook)
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        secret="my-secret",
        domains=["repo", "discussion"],
        disabled=False,
    )
    ```

---
## list_webhooks
```python
from hf_api import list_webhooks
```

List all configured webhooks.

Args:
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `List[WebhookInfo]`:
        List of webhook info objects.

Example:
    ```python
    >>> from huggingface_hub import list_webhooks
    >>> webhooks = list_webhooks()
    >>> len(webhooks)
    2
    >>> webhooks[0]
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        secret="my-secret",
        domains=["repo", "discussion"],
        disabled=False,
    )
    ```

---
## create_webhook
```python
from hf_api import create_webhook
```

Create a new webhook.

Args:
    url (`str`):
        URL to send the payload to.
    watched (`List[WebhookWatchedItem]`):
        List of [`WebhookWatchedItem`] to be watched by the webhook. It can be users, orgs, models, datasets or spaces.
        Watched items can also be provided as plain dictionaries.
    domains (`List[Literal["repo", "discussion"]]`, optional):
        List of domains to watch. It can be "repo", "discussion" or both.
    secret (`str`, optional):
        A secret to sign the payload with.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`WebhookInfo`]:
        Info about the newly created webhook.

Example:
    ```python
    >>> from huggingface_hub import create_webhook
    >>> payload = create_webhook(
    ...     watched=[{"type": "user", "name": "julien-c"}, {"type": "org", "name": "HuggingFaceH4"}],
    ...     url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
    ...     domains=["repo", "discussion"],
    ...     secret="my-secret",
    ... )
    >>> print(payload)
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        domains=["repo", "discussion"],
        secret="my-secret",
        disabled=False,
    )
    ```

---
## update_webhook
```python
from hf_api import update_webhook
```

Update an existing webhook.

Args:
    webhook_id (`str`):
        The unique identifier of the webhook to be updated.
    url (`str`, optional):
        The URL to which the payload will be sent.
    watched (`List[WebhookWatchedItem]`, optional):
        List of items to watch. It can be users, orgs, models, datasets, or spaces.
        Refer to [`WebhookWatchedItem`] for more details. Watched items can also be provided as plain dictionaries.
    domains (`List[Literal["repo", "discussion"]]`, optional):
        The domains to watch. This can include "repo", "discussion", or both.
    secret (`str`, optional):
        A secret to sign the payload with, providing an additional layer of security.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`WebhookInfo`]:
        Info about the updated webhook.

Example:
    ```python
    >>> from huggingface_hub import update_webhook
    >>> updated_payload = update_webhook(
    ...     webhook_id="654bbbc16f2ec14d77f109cc",
    ...     url="https://new.webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
    ...     watched=[{"type": "user", "name": "julien-c"}, {"type": "org", "name": "HuggingFaceH4"}],
    ...     domains=["repo"],
    ...     secret="my-secret",
    ... )
    >>> print(updated_payload)
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        url="https://new.webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        domains=["repo"],
        secret="my-secret",
        disabled=False,
    ```

---
## enable_webhook
```python
from hf_api import enable_webhook
```

Enable a webhook (makes it "active").

Args:
    webhook_id (`str`):
        The unique identifier of the webhook to enable.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`WebhookInfo`]:
        Info about the enabled webhook.

Example:
    ```python
    >>> from huggingface_hub import enable_webhook
    >>> enabled_webhook = enable_webhook("654bbbc16f2ec14d77f109cc")
    >>> enabled_webhook
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        domains=["repo", "discussion"],
        secret="my-secret",
        disabled=False,
    )
    ```

---
## disable_webhook
```python
from hf_api import disable_webhook
```

Disable a webhook (makes it "disabled").

Args:
    webhook_id (`str`):
        The unique identifier of the webhook to disable.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    [`WebhookInfo`]:
        Info about the disabled webhook.

Example:
    ```python
    >>> from huggingface_hub import disable_webhook
    >>> disabled_webhook = disable_webhook("654bbbc16f2ec14d77f109cc")
    >>> disabled_webhook
    WebhookInfo(
        id="654bbbc16f2ec14d77f109cc",
        url="https://webhook.site/a2176e82-5720-43ee-9e06-f91cb4c91548",
        watched=[WebhookWatchedItem(type="user", name="julien-c"), WebhookWatchedItem(type="org", name="HuggingFaceH4")],
        domains=["repo", "discussion"],
        secret="my-secret",
        disabled=True,
    )
    ```

---
## delete_webhook
```python
from hf_api import delete_webhook
```

Delete a webhook.

Args:
    webhook_id (`str`):
        The unique identifier of the webhook to delete.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved token, which is the recommended
        method for authentication (see https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `None`

Example:
    ```python
    >>> from huggingface_hub import delete_webhook
    >>> delete_webhook("654bbbc16f2ec14d77f109cc")
    ```

---
## _build_hf_headers
```python
from hf_api import _build_hf_headers
```

Alias for [`build_hf_headers`] that uses the token from [`HfApi`] client
when `token` is not provided.

---
## _prepare_folder_deletions
```python
from hf_api import _prepare_folder_deletions
```

Generate the list of Delete operations for a commit to delete files from a repo.

List remote files and match them against the `delete_patterns` constraints. Returns a list of [`CommitOperationDelete`]
with the matching items.

Note: `.gitattributes` file is essential to make a repo work properly on the Hub. This file will always be
      kept even if it matches the `delete_patterns` constraints.

---
## _prepare_upload_folder_additions
```python
from hf_api import _prepare_upload_folder_additions
```

Generate the list of Add operations for a commit to upload a folder.

Files not matching the `allow_patterns` (allowlist) and `ignore_patterns` (denylist)
constraints are discarded.

---
## _validate_yaml
```python
from hf_api import _validate_yaml
```

Validate YAML from `README.md`, used before file hashing and upload.

Args:
    content (`str`):
        Content of `README.md` to validate.
    repo_type (`str`, *optional*):
        The type of the repo to grant access to. Must be one of `model`, `dataset` or `space`.
        Defaults to `model`.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Raises:
    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if YAML is invalid

---
## get_user_overview
```python
from hf_api import get_user_overview
```

Get an overview of a user on the Hub.

Args:
    username (`str`):
        Username of the user to get an overview of.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `User`: A [`User`] object with the user's overview.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 If the user does not exist on the Hub.

---
## list_organization_members
```python
from hf_api import list_organization_members
```

List of members of an organization on the Hub.

Args:
    organization (`str`):
        Name of the organization to get the members of.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[User]`: A list of [`User`] objects with the members of the organization.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 If the organization does not exist on the Hub.

---
## list_user_followers
```python
from hf_api import list_user_followers
```

Get the list of followers of a user on the Hub.

Args:
    username (`str`):
        Username of the user to get the followers of.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[User]`: A list of [`User`] objects with the followers of the user.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 If the user does not exist on the Hub.

---
## list_user_following
```python
from hf_api import list_user_following
```

Get the list of users followed by a user on the Hub.

Args:
    username (`str`):
        Username of the user to get the users followed by.
    token (Union[bool, str, None], optional):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Returns:
    `Iterable[User]`: A list of [`User`] objects with the users followed by the user.

Raises:
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError):
        HTTP 404 If the user does not exist on the Hub.

---
## auth_check
```python
from hf_api import auth_check
```

Check if the provided user token has access to a specific repository on the Hugging Face Hub.

This method verifies whether the user, authenticated via the provided token, has access to the specified
repository. If the repository is not found or if the user lacks the required permissions to access it,
the method raises an appropriate exception.

Args:
    repo_id (`str`):
        The repository to check for access. Format should be `"user/repo_name"`.
        Example: `"user/my-cool-model"`.

    repo_type (`str`, *optional*):
        The type of the repository. Should be one of `"model"`, `"dataset"`, or `"space"`.
        If not specified, the default is `"model"`.

    token `(Union[bool, str, None]`, *optional*):
        A valid user access token. If not provided, the locally saved token will be used, which is the
        recommended authentication method. Set to `False` to disable authentication.
        Refer to: https://huggingface.co/docs/huggingface_hub/quick-start#authentication.

Raises:
    [`~utils.RepositoryNotFoundError`]:
        Raised if the repository does not exist, is private, or the user does not have access. This can
        occur if the `repo_id` or `repo_type` is incorrect or if the repository is private but the user
        is not authenticated.

    [`~utils.GatedRepoError`]:
        Raised if the repository exists but is gated and the user is not authorized to access it.

Example:
    Check if the user has access to a repository:

    ```python
    >>> from huggingface_hub import auth_check
    >>> from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError

    try:
        auth_check("user/my-cool-model")
    except GatedRepoError:
        # Handle gated repository error
        print("You do not have permission to access this gated repository.")
    except RepositoryNotFoundError:
        # Handle repository not found error
        print("The repository was not found or you do not have access.")
    ```

    In this example:
    - If the user has access, the method completes successfully.
    - If the repository is gated or does not exist, appropriate exceptions are raised, allowing the user
    to handle them accordingly.

---
## _format_as_git_ref_info
```python
from hf_api import _format_as_git_ref_info
```



---
## _payload_as_ndjson
```python
from hf_api import _payload_as_ndjson
```



---
## _fetch_discussion_page
```python
from hf_api import _fetch_discussion_page
```



---
## _parse
```python
from hf_api import _parse
```



---
## CacheNotFound
```python
from errors import CacheNotFound
```

Exception thrown when the Huggingface cache is not found.

---
## CorruptedCacheException
```python
from errors import CorruptedCacheException
```

Exception for any unexpected structure in the Huggingface cache-system.

---
## LocalTokenNotFoundError
```python
from errors import LocalTokenNotFoundError
```

Raised if local token is required but not found.

---
## OfflineModeIsEnabled
```python
from errors import OfflineModeIsEnabled
```

Raised when a request is made but `HF_HUB_OFFLINE=1` is set as environment variable.

---
## HfHubHTTPError
```python
from errors import HfHubHTTPError
```

HTTPError to inherit from for any custom HTTP Error raised in HF Hub.

    Any HTTPError is converted at least into a `HfHubHTTPError`. If some information is
    sent back by the server, it will be added to the error message.

    Added details:
    - Request id from "X-Request-Id" header if exists.
    - Server error message from the header "X-Error-Message".
    - Server error message if we can found one in the response body.

    Example:
    ```py
        import requests
        from huggingface_hub.utils import get_session, hf_raise_for_status, HfHubHTTPError

        response = get_session().post(...)
        try:
            hf_raise_for_status(response)
        except HfHubHTTPError as e:
            print(str(e)) # formatted message
            e.request_id, e.server_message # details returned by server

            # Complete the error message with additional information once it's raised
            e.append_to_message("
`create_commit` expects the repository to exist.")
            raise
    ```
    

---
## InferenceTimeoutError
```python
from errors import InferenceTimeoutError
```

Error raised when a model is unavailable or the request times out.

---
## InferenceEndpointError
```python
from errors import InferenceEndpointError
```

Generic exception when dealing with Inference Endpoints.

---
## InferenceEndpointTimeoutError
```python
from errors import InferenceEndpointTimeoutError
```

Exception for timeouts while waiting for Inference Endpoint.

---
## SafetensorsParsingError
```python
from errors import SafetensorsParsingError
```

Raised when failing to parse a safetensors file metadata.

This can be the case if the file is not a safetensors file or does not respect the specification.

---
## NotASafetensorsRepoError
```python
from errors import NotASafetensorsRepoError
```

Raised when a repo is not a Safetensors repo i.e. doesn't have either a `model.safetensors` or a
`model.safetensors.index.json` file.

---
## TemplateError
```python
from errors import TemplateError
```

Any error raised while trying to fetch or render a chat template.

---
## TextGenerationError
```python
from errors import TextGenerationError
```

Generic error raised if text-generation went wrong.

---
## ValidationError
```python
from errors import ValidationError
```

Server-side validation error.

---
## GenerationError
```python
from errors import GenerationError
```



---
## OverloadedError
```python
from errors import OverloadedError
```



---
## IncompleteGenerationError
```python
from errors import IncompleteGenerationError
```



---
## UnknownError
```python
from errors import UnknownError
```



---
## HFValidationError
```python
from errors import HFValidationError
```

Generic exception thrown by `huggingface_hub` validators.

Inherits from [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError).

---
## FileMetadataError
```python
from errors import FileMetadataError
```

Error triggered when the metadata of a file on the Hub cannot be retrieved (missing ETag or commit_hash).

Inherits from `OSError` for backward compatibility.

---
## RepositoryNotFoundError
```python
from errors import RepositoryNotFoundError
```

Raised when trying to access a hf.co URL with an invalid repository name, or
with a private repo name the user does not have access to.

Example:

```py
>>> from huggingface_hub import model_info
>>> model_info("<non_existent_repository>")
(...)
huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: PvMw_VjBMjVdMz53WKIzP)

Repository Not Found for url: https://huggingface.co/api/models/%3Cnon_existent_repository%3E.
Please make sure you specified the correct `repo_id` and `repo_type`.
If the repo is private, make sure you are authenticated.
Invalid username or password.
```

---
## GatedRepoError
```python
from errors import GatedRepoError
```

Raised when trying to access a gated repository for which the user is not on the
authorized list.

Note: derives from `RepositoryNotFoundError` to ensure backward compatibility.

Example:

```py
>>> from huggingface_hub import model_info
>>> model_info("<gated_repository>")
(...)
huggingface_hub.utils._errors.GatedRepoError: 403 Client Error. (Request ID: ViT1Bf7O_026LGSQuVqfa)

Cannot access gated repo for url https://huggingface.co/api/models/ardent-figment/gated-model.
Access to model ardent-figment/gated-model is restricted and you are not in the authorized list.
Visit https://huggingface.co/ardent-figment/gated-model to ask for access.
```

---
## DisabledRepoError
```python
from errors import DisabledRepoError
```

Raised when trying to access a repository that has been disabled by its author.

Example:

```py
>>> from huggingface_hub import dataset_info
>>> dataset_info("laion/laion-art")
(...)
huggingface_hub.utils._errors.DisabledRepoError: 403 Client Error. (Request ID: Root=1-659fc3fa-3031673e0f92c71a2260dbe2;bc6f4dfb-b30a-4862-af0a-5cfe827610d8)

Cannot access repository for url https://huggingface.co/api/datasets/laion/laion-art.
Access to this resource is disabled.
```

---
## RevisionNotFoundError
```python
from errors import RevisionNotFoundError
```

Raised when trying to access a hf.co URL with a valid repository but an invalid
revision.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', 'config.json', revision='<non-existent-revision>')
(...)
huggingface_hub.utils._errors.RevisionNotFoundError: 404 Client Error. (Request ID: Mwhe_c3Kt650GcdKEFomX)

Revision Not Found for url: https://huggingface.co/bert-base-cased/resolve/%3Cnon-existent-revision%3E/config.json.
```

---
## EntryNotFoundError
```python
from errors import EntryNotFoundError
```

Raised when trying to access a hf.co URL with a valid repository and revision
but an invalid filename.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', '<non-existent-file>')
(...)
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: 53pNl6M0MxsnG5Sw8JA6x)

Entry Not Found for url: https://huggingface.co/bert-base-cased/resolve/main/%3Cnon-existent-file%3E.
```

---
## LocalEntryNotFoundError
```python
from errors import LocalEntryNotFoundError
```

Raised when trying to access a file or snapshot that is not on the disk when network is
disabled or unavailable (connection issue). The entry may exist on the Hub.

Note: `ValueError` type is to ensure backward compatibility.
Note: `LocalEntryNotFoundError` derives from `HTTPError` because of `EntryNotFoundError`
      even when it is not a network issue.

Example:

```py
>>> from huggingface_hub import hf_hub_download
>>> hf_hub_download('bert-base-cased', '<non-cached-file>',  local_files_only=True)
(...)
huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False.
```

---
## BadRequestError
```python
from errors import BadRequestError
```

Raised by `hf_raise_for_status` when the server returns a HTTP 400 error.

Example:

```py
>>> resp = requests.post("hf.co/api/check", ...)
>>> hf_raise_for_status(resp, endpoint_name="check")
huggingface_hub.utils._errors.BadRequestError: Bad request for check endpoint: {details} (Request ID: XXX)
```

---
## append_to_message
```python
from errors import append_to_message
```

Append additional information to the `HfHubHTTPError` initial message.

---
## __name__
```python
from _snapshot_download import __name__
```



---
## snapshot_download
```python
from _snapshot_download import snapshot_download
```

Download repo files.

Download a whole snapshot of a repo's files at the specified revision. This is useful when you want all files from
a repo, because you don't know which ones you will need a priori. All files are nested inside a folder in order
to keep their actual filename relative to that folder. You can also filter which files to download using
`allow_patterns` and `ignore_patterns`.

If `local_dir` is provided, the file structure from the repo will be replicated in this location. When using this
option, the `cache_dir` will not be used and a `.cache/huggingface/` folder will be created at the root of `local_dir`
to store some metadata related to the downloaded files. While this mechanism is not as robust as the main
cache-system, it's optimized for regularly pulling the latest version of a repository.

An alternative would be to clone the repo but this requires git and git-lfs to be installed and properly
configured. It is also not possible to filter which files to download when cloning a repository using git.

Args:
    repo_id (`str`):
        A user or an organization name and a repo name separated by a `/`.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if downloading from a dataset or space,
        `None` or `"model"` if downloading from a model. Default is `None`.
    revision (`str`, *optional*):
        An optional Git revision id which can be a branch name, a tag, or a
        commit hash.
    cache_dir (`str`, `Path`, *optional*):
        Path to the folder where cached files are stored.
    local_dir (`str` or `Path`, *optional*):
        If provided, the downloaded files will be placed under this directory.
    library_name (`str`, *optional*):
        The name of the library to which the object corresponds.
    library_version (`str`, *optional*):
        The version of the library.
    user_agent (`str`, `dict`, *optional*):
        The user-agent info in the form of a dictionary or a string.
    proxies (`dict`, *optional*):
        Dictionary mapping protocol to the URL of the proxy passed to
        `requests.request`.
    etag_timeout (`float`, *optional*, defaults to `10`):
        When fetching ETag, how many seconds to wait for the server to send
        data before giving up which is passed to `requests.request`.
    force_download (`bool`, *optional*, defaults to `False`):
        Whether the file should be downloaded even if it already exists in the local cache.
    token (`str`, `bool`, *optional*):
        A token to be used for the download.
            - If `True`, the token is read from the HuggingFace config
              folder.
            - If a string, it's used as the authentication token.
    headers (`dict`, *optional*):
        Additional headers to include in the request. Those headers take precedence over the others.
    local_files_only (`bool`, *optional*, defaults to `False`):
        If `True`, avoid downloading the file and return the path to the
        local cached file if it exists.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are downloaded.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not downloaded.
    max_workers (`int`, *optional*):
        Number of concurrent threads to download files (1 thread = 1 file download).
        Defaults to 8.
    tqdm_class (`tqdm`, *optional*):
        If provided, overwrites the default behavior for the progress bar. Passed
        argument must inherit from `tqdm.auto.tqdm` or at least mimic its behavior.
        Note that the `tqdm_class` is not passed to each individual download.
        Defaults to the custom HF progress bar that can be disabled by setting
        `HF_HUB_DISABLE_PROGRESS_BARS` environment variable.

Returns:
    `str`: folder path of the repo snapshot.

Raises:
    [`~utils.RepositoryNotFoundError`]
        If the repository to download from cannot be found. This may be because it doesn't exist,
        or because it is set to `private` and you do not have access.
    [`~utils.RevisionNotFoundError`]
        If the revision to download from cannot be found.
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `token=True` and the token cannot be found.
    [`OSError`](https://docs.python.org/3/library/exceptions.html#OSError) if
        ETag cannot be determined.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        if some parameter value is invalid.

---
## _inner_hf_hub_download
```python
from _snapshot_download import _inner_hf_hub_download
```



---
## __name__
```python
from _upload_large_folder import __name__
```



---
## upload_large_folder_internal
```python
from _upload_large_folder import upload_large_folder_internal
```

Upload a large folder to the Hub in the most resilient way possible.

See [`HfApi.upload_large_folder`] for the full documentation.

---
## WorkerJob
```python
from _upload_large_folder import WorkerJob
```



---
## LargeUploadStatus
```python
from _upload_large_folder import LargeUploadStatus
```

Contains information, queues and tasks for a large upload process.

---
## _worker_job
```python
from _upload_large_folder import _worker_job
```

Main process for a worker. The worker will perform tasks based on the priority list until all files are uploaded
and committed. If no tasks are available, the worker will wait for 10 seconds before checking again.

If a task fails for any reason, the item(s) are put back in the queue for another worker to pick up.

Read `upload_large_folder` docstring for more information on how tasks are prioritized.

---
## _determine_next_job
```python
from _upload_large_folder import _determine_next_job
```



---
## _compute_sha256
```python
from _upload_large_folder import _compute_sha256
```

Compute sha256 of a file and save it in metadata.

---
## _get_upload_mode
```python
from _upload_large_folder import _get_upload_mode
```

Get upload mode for each file and update metadata.

Also receive info if the file should be ignored.

---
## _preupload_lfs
```python
from _upload_large_folder import _preupload_lfs
```

Preupload LFS file and update metadata.

---
## _commit
```python
from _upload_large_folder import _commit
```

Commit files to the repo.

---
## HackyCommitOperationAdd
```python
from _upload_large_folder import HackyCommitOperationAdd
```



---
## _build_hacky_operation
```python
from _upload_large_folder import _build_hacky_operation
```



---
## _get_one
```python
from _upload_large_folder import _get_one
```



---
## _get_n
```python
from _upload_large_folder import _get_n
```



---
## _get_items_to_commit
```python
from _upload_large_folder import _get_items_to_commit
```

Special case for commit job: the number of items to commit depends on the type of files.

---
## _print_overwrite
```python
from _upload_large_folder import _print_overwrite
```

Print a report, overwriting the previous lines.

Since tqdm in using `sys.stderr` to (re-)write progress bars, we need to use `sys.stdout`
to print the report.

Note: works well only if no other process is writing to `sys.stdout`!

---
## __init__
```python
from _upload_large_folder import __init__
```



---
## current_report
```python
from _upload_large_folder import current_report
```

Generate a report of the current status of the large upload.

---
## is_done
```python
from _upload_large_folder import is_done
```



---
## __post_init__
```python
from _upload_large_folder import __post_init__
```



---
## __name__
```python
from repocard import __name__
```



---
## RepoCard
```python
from repocard import RepoCard
```



---
## ModelCard
```python
from repocard import ModelCard
```



---
## DatasetCard
```python
from repocard import DatasetCard
```



---
## SpaceCard
```python
from repocard import SpaceCard
```



---
## _detect_line_ending
```python
from repocard import _detect_line_ending
```

Detect the line ending of a string. Used by RepoCard to avoid making huge diff on newlines.

Uses same implementation as in Hub server, keep it in sync.

Returns:
    str: The detected line ending of the string.

---
## metadata_load
```python
from repocard import metadata_load
```



---
## metadata_save
```python
from repocard import metadata_save
```

Save the metadata dict in the upper YAML part Trying to preserve newlines as
in the existing file. Docs about open() with newline="" parameter:
https://docs.python.org/3/library/functions.html?highlight=open#open Does
not work with "^M" linebreaks, which are replaced by 

---
## metadata_eval_result
```python
from repocard import metadata_eval_result
```

Creates a metadata dict with the result from a model evaluated on a dataset.

Args:
    model_pretty_name (`str`):
        The name of the model in natural language.
    task_pretty_name (`str`):
        The name of a task in natural language.
    task_id (`str`):
        Example: automatic-speech-recognition. A task id.
    metrics_pretty_name (`str`):
        A name for the metric in natural language. Example: Test WER.
    metrics_id (`str`):
        Example: wer. A metric id from https://hf.co/metrics.
    metrics_value (`Any`):
        The value from the metric. Example: 20.0 or "20.0 ± 1.2".
    dataset_pretty_name (`str`):
        The name of the dataset in natural language.
    dataset_id (`str`):
        Example: common_voice. A dataset id from https://hf.co/datasets.
    metrics_config (`str`, *optional*):
        The name of the metric configuration used in `load_metric()`.
        Example: bleurt-large-512 in `load_metric("bleurt", "bleurt-large-512")`.
    metrics_verified (`bool`, *optional*, defaults to `False`):
        Indicates whether the metrics originate from Hugging Face's [evaluation service](https://huggingface.co/spaces/autoevaluate/model-evaluator) or not. Automatically computed by Hugging Face, do not set.
    dataset_config (`str`, *optional*):
        Example: fr. The name of the dataset configuration used in `load_dataset()`.
    dataset_split (`str`, *optional*):
        Example: test. The name of the dataset split used in `load_dataset()`.
    dataset_revision (`str`, *optional*):
        Example: 5503434ddd753f426f4b38109466949a1217c2bb. The name of the dataset dataset revision
        used in `load_dataset()`.
    metrics_verification_token (`bool`, *optional*):
        A JSON Web Token that is used to verify whether the metrics originate from Hugging Face's [evaluation service](https://huggingface.co/spaces/autoevaluate/model-evaluator) or not.

Returns:
    `dict`: a metadata dict with the result from a model evaluated on a dataset.

Example:
    ```python
    >>> from huggingface_hub import metadata_eval_result
    >>> results = metadata_eval_result(
    ...         model_pretty_name="RoBERTa fine-tuned on ReactionGIF",
    ...         task_pretty_name="Text Classification",
    ...         task_id="text-classification",
    ...         metrics_pretty_name="Accuracy",
    ...         metrics_id="accuracy",
    ...         metrics_value=0.2662102282047272,
    ...         dataset_pretty_name="ReactionJPEG",
    ...         dataset_id="julien-c/reactionjpeg",
    ...         dataset_config="default",
    ...         dataset_split="test",
    ... )
    >>> results == {
    ...     'model-index': [
    ...         {
    ...             'name': 'RoBERTa fine-tuned on ReactionGIF',
    ...             'results': [
    ...                 {
    ...                     'task': {
    ...                         'type': 'text-classification',
    ...                         'name': 'Text Classification'
    ...                     },
    ...                     'dataset': {
    ...                         'name': 'ReactionJPEG',
    ...                         'type': 'julien-c/reactionjpeg',
    ...                         'config': 'default',
    ...                         'split': 'test'
    ...                     },
    ...                     'metrics': [
    ...                         {
    ...                             'type': 'accuracy',
    ...                             'value': 0.2662102282047272,
    ...                             'name': 'Accuracy',
    ...                             'verified': False
    ...                         }
    ...                     ]
    ...                 }
    ...             ]
    ...         }
    ...     ]
    ... }
    True

    ```

---
## metadata_update
```python
from repocard import metadata_update
```

Updates the metadata in the README.md of a repository on the Hugging Face Hub.
If the README.md file doesn't exist yet, a new one is created with metadata and an
the default ModelCard or DatasetCard template. For `space` repo, an error is thrown
as a Space cannot exist without a `README.md` file.

Args:
    repo_id (`str`):
        The name of the repository.
    metadata (`dict`):
        A dictionary containing the metadata to be updated.
    repo_type (`str`, *optional*):
        Set to `"dataset"` or `"space"` if updating to a dataset or space,
        `None` or `"model"` if updating to a model. Default is `None`.
    overwrite (`bool`, *optional*, defaults to `False`):
        If set to `True` an existing field can be overwritten, otherwise
        attempting to overwrite an existing field will cause an error.
    token (`str`, *optional*):
        The Hugging Face authentication token.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit. Defaults to
        `f"Update metadata with huggingface_hub"`
    commit_description (`str` *optional*)
        The description of the generated commit
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the
        `"main"` branch.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request from `revision` with that commit.
        Defaults to `False`.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.
Returns:
    `str`: URL of the commit which updated the card metadata.

Example:
    ```python
    >>> from huggingface_hub import metadata_update
    >>> metadata = {'model-index': [{'name': 'RoBERTa fine-tuned on ReactionGIF',
    ...             'results': [{'dataset': {'name': 'ReactionGIF',
    ...                                      'type': 'julien-c/reactiongif'},
    ...                           'metrics': [{'name': 'Recall',
    ...                                        'type': 'recall',
    ...                                        'value': 0.7762102282047272}],
    ...                          'task': {'name': 'Text Classification',
    ...                                   'type': 'text-classification'}}]}]}
    >>> url = metadata_update("hf-internal-testing/reactiongif-roberta-card", metadata)

    ```

---
## __init__
```python
from repocard import __init__
```

Initialize a RepoCard from string content. The content should be a
Markdown file with a YAML block at the beginning and a Markdown body.

Args:
    content (`str`): The content of the Markdown file.

Example:
    ```python
    >>> from huggingface_hub.repocard import RepoCard
    >>> text = '''
    ... ---
    ... language: en
    ... license: mit
    ... ---
    ...
    ... # My repo
    ... '''
    >>> card = RepoCard(text)
    >>> card.data.to_dict()
    {'language': 'en', 'license': 'mit'}
    >>> card.text
    '\n# My repo\n'

    ```
<Tip>
Raises the following error:

    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      when the content of the repo card metadata is not a dictionary.

</Tip>

---
## content
```python
from repocard import content
```

Set the content of the RepoCard.

---
## __str__
```python
from repocard import __str__
```



---
## save
```python
from repocard import save
```

Save a RepoCard to a file.

Args:
    filepath (`Union[Path, str]`): Filepath to the markdown file to save.

Example:
    ```python
    >>> from huggingface_hub.repocard import RepoCard
    >>> card = RepoCard("---\nlanguage: en\n---\n# This is a test repo card")
    >>> card.save("/tmp/test.md")

    ```

---
## load
```python
from repocard import load
```

Initialize a RepoCard from a Hugging Face Hub repo's README.md or a local filepath.

Args:
    repo_id_or_path (`Union[str, Path]`):
        The repo ID associated with a Hugging Face Hub repo or a local filepath.
    repo_type (`str`, *optional*):
        The type of Hugging Face repo to push to. Defaults to None, which will use use "model". Other options
        are "dataset" and "space". Not used when loading from a local filepath. If this is called from a child
        class, the default value will be the child class's `repo_type`.
    token (`str`, *optional*):
        Authentication token, obtained with `huggingface_hub.HfApi.login` method. Will default to the stored token.
    ignore_metadata_errors (`str`):
        If True, errors while parsing the metadata section will be ignored. Some information might be lost during
        the process. Use it at your own risk.

Returns:
    [`huggingface_hub.repocard.RepoCard`]: The RepoCard (or subclass) initialized from the repo's
        README.md file or filepath.

Example:
    ```python
    >>> from huggingface_hub.repocard import RepoCard
    >>> card = RepoCard.load("nateraw/food")
    >>> assert card.data.tags == ["generated_from_trainer", "image-classification", "pytorch"]

    ```

---
## validate
```python
from repocard import validate
```

Validates card against Hugging Face Hub's card validation logic.
Using this function requires access to the internet, so it is only called
internally by [`huggingface_hub.repocard.RepoCard.push_to_hub`].

Args:
    repo_type (`str`, *optional*, defaults to "model"):
        The type of Hugging Face repo to push to. Options are "model", "dataset", and "space".
        If this function is called from a child class, the default will be the child class's `repo_type`.

<Tip>
Raises the following errors:

    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if the card fails validation checks.
    - [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
      if the request to the Hub API fails for any other reason.

</Tip>

---
## push_to_hub
```python
from repocard import push_to_hub
```

Push a RepoCard to a Hugging Face Hub repo.

Args:
    repo_id (`str`):
        The repo ID of the Hugging Face Hub repo to push to. Example: "nateraw/food".
    token (`str`, *optional*):
        Authentication token, obtained with `huggingface_hub.HfApi.login` method. Will default to
        the stored token.
    repo_type (`str`, *optional*, defaults to "model"):
        The type of Hugging Face repo to push to. Options are "model", "dataset", and "space". If this
        function is called by a child class, it will default to the child class's `repo_type`.
    commit_message (`str`, *optional*):
        The summary / title / first line of the generated commit.
    commit_description (`str`, *optional*)
        The description of the generated commit.
    revision (`str`, *optional*):
        The git revision to commit from. Defaults to the head of the `"main"` branch.
    create_pr (`bool`, *optional*):
        Whether or not to create a Pull Request with this commit. Defaults to `False`.
    parent_commit (`str`, *optional*):
        The OID / SHA of the parent commit, as a hexadecimal string. Shorthands (7 first characters) are also supported.
        If specified and `create_pr` is `False`, the commit will fail if `revision` does not point to `parent_commit`.
        If specified and `create_pr` is `True`, the pull request will be created from `parent_commit`.
        Specifying `parent_commit` ensures the repo has not changed before committing the changes, and can be
        especially useful if the repo is updated / committed to concurrently.
Returns:
    `str`: URL of the commit which updated the card metadata.

---
## from_template
```python
from repocard import from_template
```

Initialize a DatasetCard from a template. By default, it uses the default template, which can be found here:
https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md

Templates are Jinja2 templates that can be customized by passing keyword arguments.

Args:
    card_data (`huggingface_hub.DatasetCardData`):
        A huggingface_hub.DatasetCardData instance containing the metadata you want to include in the YAML
        header of the dataset card on the Hugging Face Hub.
    template_path (`str`, *optional*):
        A path to a markdown file with optional Jinja template variables that can be filled
        in with `template_kwargs`. Defaults to the default template.

Returns:
    [`huggingface_hub.DatasetCard`]: A DatasetCard instance with the specified card data and content from the
    template.

Example:
    ```python
    >>> from huggingface_hub import DatasetCard, DatasetCardData

    >>> # Using the Default Template
    >>> card_data = DatasetCardData(
    ...     language='en',
    ...     license='mit',
    ...     annotations_creators='crowdsourced',
    ...     task_categories=['text-classification'],
    ...     task_ids=['sentiment-classification', 'text-scoring'],
    ...     multilinguality='monolingual',
    ...     pretty_name='My Text Classification Dataset',
    ... )
    >>> card = DatasetCard.from_template(
    ...     card_data,
    ...     pretty_name=card_data.pretty_name,
    ... )

    >>> # Using a Custom Template
    >>> card_data = DatasetCardData(
    ...     language='en',
    ...     license='mit',
    ... )
    >>> card = DatasetCard.from_template(
    ...     card_data=card_data,
    ...     template_path='./src/huggingface_hub/templates/datasetcard_template.md',
    ...     custom_template_var='custom value',  # will be replaced in template if it exists
    ... )

    ```

---
## __name__
```python
from repository import __name__
```



---
## CommandInProgress
```python
from repository import CommandInProgress
```

Utility to follow commands launched asynchronously.

---
## is_git_repo
```python
from repository import is_git_repo
```

Check if the folder is the root or part of a git repository

Args:
    folder (`str`):
        The folder in which to run the command.

Returns:
    `bool`: `True` if the repository is part of a repository, `False`
    otherwise.

---
## is_local_clone
```python
from repository import is_local_clone
```

Check if the folder is a local clone of the remote_url

Args:
    folder (`str` or `Path`):
        The folder in which to run the command.
    remote_url (`str`):
        The url of a git repository.

Returns:
    `bool`: `True` if the repository is a local clone of the remote
    repository specified, `False` otherwise.

---
## is_tracked_with_lfs
```python
from repository import is_tracked_with_lfs
```

Check if the file passed is tracked with git-lfs.

Args:
    filename (`str` or `Path`):
        The filename to check.

Returns:
    `bool`: `True` if the file passed is tracked with git-lfs, `False`
    otherwise.

---
## is_git_ignored
```python
from repository import is_git_ignored
```

Check if file is git-ignored. Supports nested .gitignore files.

Args:
    filename (`str` or `Path`):
        The filename to check.

Returns:
    `bool`: `True` if the file passed is ignored by `git`, `False`
    otherwise.

---
## is_binary_file
```python
from repository import is_binary_file
```

Check if file is a binary file.

Args:
    filename (`str` or `Path`):
        The filename to check.

Returns:
    `bool`: `True` if the file passed is a binary file, `False` otherwise.

---
## files_to_be_staged
```python
from repository import files_to_be_staged
```

Returns a list of filenames that are to be staged.

Args:
    pattern (`str` or `Path`):
        The pattern of filenames to check. Put `.` to get all files.
    folder (`str` or `Path`):
        The folder in which to run the command.

Returns:
    `List[str]`: List of files that are to be staged.

---
## is_tracked_upstream
```python
from repository import is_tracked_upstream
```

Check if the current checked-out branch is tracked upstream.

Args:
    folder (`str` or `Path`):
        The folder in which to run the command.

Returns:
    `bool`: `True` if the current checked-out branch is tracked upstream,
    `False` otherwise.

---
## commits_to_push
```python
from repository import commits_to_push
```

Check the number of commits that would be pushed upstream

    Args:
        folder (`str` or `Path`):
            The folder in which to run the command.
        upstream (`str`, *optional*):
The name of the upstream repository with which the comparison should be
made.

    Returns:
        `int`: Number of commits that would be pushed upstream were a `git
        push` to proceed.

---
## PbarT
```python
from repository import PbarT
```



---
## _lfs_log_progress
```python
from repository import _lfs_log_progress
```

This is a context manager that will log the Git LFS progress of cleaning,
smudging, pulling and pushing.

---
## Repository
```python
from repository import Repository
```



---
## __init__
```python
from repository import __init__
```



---
## is_done
```python
from repository import is_done
```

Whether the process is done.

---
## status
```python
from repository import status
```

The exit code/status of the current action. Will return `0` if the
command has completed successfully, and a number between 1 and 255 if
the process errored-out.

Will return -1 if the command is still ongoing.

---
## failed
```python
from repository import failed
```

Whether the process errored-out.

---
## stderr
```python
from repository import stderr
```

The current output message on the standard error.

---
## stdout
```python
from repository import stdout
```

The current output message on the standard output.

---
## __repr__
```python
from repository import __repr__
```



---
## output_progress
```python
from repository import output_progress
```

To be launched as a separate thread with an event meaning it should stop
the tail.

---
## current_branch
```python
from repository import current_branch
```

Returns the current checked out branch.

Returns:
    `str`: Current checked out branch.

---
## check_git_versions
```python
from repository import check_git_versions
```

Checks that `git` and `git-lfs` can be run.

Raises:
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `git` or `git-lfs` are not installed.

---
## clone_from
```python
from repository import clone_from
```

Clone from a remote. If the folder already exists, will try to clone the
repository within it.

If this folder is a git repository with linked history, will try to
update the repository.

Args:
    repo_url (`str`):
        The URL from which to clone the repository
    token (`Union[str, bool]`, *optional*):
        Whether to use the authentication token. It can be:
         - a string which is the token itself
         - `False`, which would not use the authentication token
         - `True`, which would fetch the authentication token from the
           local folder and use it (you should be logged in for this to
           work).
        - `None`, which would retrieve the value of
          `self.huggingface_token`.

<Tip>

Raises the following error:

    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if an organization token (starts with "api_org") is passed. Use must use
      your own personal access token (see https://hf.co/settings/tokens).

    - [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
      if you are trying to clone the repository in a non-empty folder, or if the
      `git` operations raise errors.

</Tip>

---
## git_config_username_and_email
```python
from repository import git_config_username_and_email
```

Sets git username and email (only in the current repo).

Args:
    git_user (`str`, *optional*):
        The username to register through `git`.
    git_email (`str`, *optional*):
        The email to register through `git`.

---
## git_credential_helper_store
```python
from repository import git_credential_helper_store
```

Sets the git credential helper to `store`

---
## git_head_hash
```python
from repository import git_head_hash
```

Get commit sha on top of HEAD.

Returns:
    `str`: The current checked out commit SHA.

---
## git_remote_url
```python
from repository import git_remote_url
```

Get URL to origin remote.

Returns:
    `str`: The URL of the `origin` remote.

---
## git_head_commit_url
```python
from repository import git_head_commit_url
```

Get URL to last commit on HEAD. We assume it's been pushed, and the url
scheme is the same one as for GitHub or HuggingFace.

Returns:
    `str`: The URL to the current checked-out commit.

---
## list_deleted_files
```python
from repository import list_deleted_files
```

Returns a list of the files that are deleted in the working directory or
index.

Returns:
    `List[str]`: A list of files that have been deleted in the working
    directory or index.

---
## lfs_track
```python
from repository import lfs_track
```

Tell git-lfs to track files according to a pattern.

Setting the `filename` argument to `True` will treat the arguments as
literal filenames, not as patterns. Any special glob characters in the
filename will be escaped when writing to the `.gitattributes` file.

Args:
    patterns (`Union[str, List[str]]`):
        The pattern, or list of patterns, to track with git-lfs.
    filename (`bool`, *optional*, defaults to `False`):
        Whether to use the patterns as literal filenames.

---
## lfs_untrack
```python
from repository import lfs_untrack
```

Tell git-lfs to untrack those files.

Args:
    patterns (`Union[str, List[str]]`):
        The pattern, or list of patterns, to untrack with git-lfs.

---
## lfs_enable_largefiles
```python
from repository import lfs_enable_largefiles
```

HF-specific. This enables upload support of files >5GB.

---
## auto_track_binary_files
```python
from repository import auto_track_binary_files
```

Automatically track binary files with git-lfs.

Args:
    pattern (`str`, *optional*, defaults to "."):
        The pattern with which to track files that are binary.

Returns:
    `List[str]`: List of filenames that are now tracked due to being
    binary files

---
## auto_track_large_files
```python
from repository import auto_track_large_files
```

Automatically track large files (files that weigh more than 10MBs) with
git-lfs.

Args:
    pattern (`str`, *optional*, defaults to "."):
        The pattern with which to track files that are above 10MBs.

Returns:
    `List[str]`: List of filenames that are now tracked due to their
    size.

---
## lfs_prune
```python
from repository import lfs_prune
```

git lfs prune

Args:
    recent (`bool`, *optional*, defaults to `False`):
        Whether to prune files even if they were referenced by recent
        commits. See the following
        [link](https://github.com/git-lfs/git-lfs/blob/f3d43f0428a84fc4f1e5405b76b5a73ec2437e65/docs/man/git-lfs-prune.1.ronn#recent-files)
        for more information.

---
## git_pull
```python
from repository import git_pull
```

git pull

Args:
    rebase (`bool`, *optional*, defaults to `False`):
        Whether to rebase the current branch on top of the upstream
        branch after fetching.
    lfs (`bool`, *optional*, defaults to `False`):
        Whether to fetch the LFS files too. This option only changes the
        behavior when a repository was cloned without fetching the LFS
        files; calling `repo.git_pull(lfs=True)` will then fetch the LFS
        file from the remote repository.

---
## git_add
```python
from repository import git_add
```

git add

Setting the `auto_lfs_track` parameter to `True` will automatically
track files that are larger than 10MB with `git-lfs`.

Args:
    pattern (`str`, *optional*, defaults to "."):
        The pattern with which to add files to staging.
    auto_lfs_track (`bool`, *optional*, defaults to `False`):
        Whether to automatically track large and binary files with
        git-lfs. Any file over 10MB in size, or in binary format, will
        be automatically tracked.

---
## git_commit
```python
from repository import git_commit
```

git commit

Args:
    commit_message (`str`, *optional*, defaults to "commit files to HF hub"):
        The message attributed to the commit.

---
## git_push
```python
from repository import git_push
```

git push

If used without setting `blocking`, will return url to commit on remote
repo. If used with `blocking=True`, will return a tuple containing the
url to commit and the command object to follow for information about the
process.

Args:
    upstream (`str`, *optional*):
        Upstream to which this should push. If not specified, will push
        to the lastly defined upstream or to the default one (`origin
        main`).
    blocking (`bool`, *optional*, defaults to `True`):
        Whether the function should return only when the push has
        finished. Setting this to `False` will return an
        `CommandInProgress` object which has an `is_done` property. This
        property will be set to `True` when the push is finished.
    auto_lfs_prune (`bool`, *optional*, defaults to `False`):
        Whether to automatically prune files once they have been pushed
        to the remote.

---
## git_checkout
```python
from repository import git_checkout
```

git checkout a given revision

Specifying `create_branch_ok` to `True` will create the branch to the
given revision if that revision doesn't exist.

Args:
    revision (`str`):
        The revision to checkout.
    create_branch_ok (`str`, *optional*, defaults to `False`):
        Whether creating a branch named with the `revision` passed at
        the current checked-out reference if `revision` isn't an
        existing revision is allowed.

---
## tag_exists
```python
from repository import tag_exists
```

Check if a tag exists or not.

Args:
    tag_name (`str`):
        The name of the tag to check.
    remote (`str`, *optional*):
        Whether to check if the tag exists on a remote. This parameter
        should be the identifier of the remote.

Returns:
    `bool`: Whether the tag exists.

---
## delete_tag
```python
from repository import delete_tag
```

Delete a tag, both local and remote, if it exists

Args:
    tag_name (`str`):
        The tag name to delete.
    remote (`str`, *optional*):
        The remote on which to delete the tag.

Returns:
     `bool`: `True` if deleted, `False` if the tag didn't exist.
        If remote is not passed, will just be updated locally

---
## add_tag
```python
from repository import add_tag
```

Add a tag at the current head and push it

If remote is None, will just be updated locally

If no message is provided, the tag will be lightweight. if a message is
provided, the tag will be annotated.

Args:
    tag_name (`str`):
        The name of the tag to be added.
    message (`str`, *optional*):
        The message that accompanies the tag. The tag will turn into an
        annotated tag if a message is passed.
    remote (`str`, *optional*):
        The remote on which to add the tag.

---
## is_repo_clean
```python
from repository import is_repo_clean
```

Return whether or not the git status is clean or not

Returns:
    `bool`: `True` if the git status is clean, `False` otherwise.

---
## push_to_hub
```python
from repository import push_to_hub
```

Helper to add, commit, and push files to remote repository on the
HuggingFace Hub. Will automatically track large files (>10MB).

Args:
    commit_message (`str`):
        Message to use for the commit.
    blocking (`bool`, *optional*, defaults to `True`):
        Whether the function should return only when the `git push` has
        finished.
    clean_ok (`bool`, *optional*, defaults to `True`):
        If True, this function will return None if the repo is
        untouched. Default behavior is to fail because the git command
        fails.
    auto_lfs_prune (`bool`, *optional*, defaults to `False`):
        Whether to automatically prune files once they have been pushed
        to the remote.

---
## commit
```python
from repository import commit
```

Context manager utility to handle committing to a repository. This
automatically tracks large files (>10Mb) with git-lfs. Set the
`track_large_files` argument to `False` if you wish to ignore that
behavior.

Args:
    commit_message (`str`):
        Message to use for the commit.
    branch (`str`, *optional*):
        The branch on which the commit will appear. This branch will be
        checked-out before any operation.
    track_large_files (`bool`, *optional*, defaults to `True`):
        Whether to automatically track large files or not. Will do so by
        default.
    blocking (`bool`, *optional*, defaults to `True`):
        Whether the function should return only when the `git push` has
        finished.
    auto_lfs_prune (`bool`, defaults to `True`):
        Whether to automatically prune files once they have been pushed
        to the remote.

Examples:

```python
>>> with Repository(
...     "text-files",
...     clone_from="<user>/text-files",
...     token=True,
>>> ).commit("My first file :)"):
...     with open("file.txt", "w+") as f:
...         f.write(json.dumps({"hey": 8}))

>>> import torch

>>> model = torch.nn.Transformer()
>>> with Repository(
...     "torch-model",
...     clone_from="<user>/torch-model",
...     token=True,
>>> ).commit("My cool model :)"):
...     torch.save(model.state_dict(), "model.pt")
```

---
## repocard_metadata_load
```python
from repository import repocard_metadata_load
```



---
## repocard_metadata_save
```python
from repository import repocard_metadata_save
```



---
## commands_failed
```python
from repository import commands_failed
```

Returns the asynchronous commands that failed.

---
## commands_in_progress
```python
from repository import commands_in_progress
```

Returns the asynchronous commands that are currently in progress.

---
## wait_for_commands
```python
from repository import wait_for_commands
```

Blocking method: blocks all subsequent execution until all commands have
been processed.

---
## close_pbars
```python
from repository import close_pbars
```



---
## tail_file
```python
from repository import tail_file
```

Creates a generator to be iterated through, which will return each
line one by one. Will stop tailing the file if the stopping_event is
set.

---
## status_method
```python
from repository import status_method
```



---
## __name__
```python
from _tensorboard_logger import __name__
```

Contains a logger to push training logs to the Hub, using Tensorboard.

---
## HFSummaryWriter
```python
from _tensorboard_logger import HFSummaryWriter
```

Wrapper around the tensorboard's `SummaryWriter` to push training logs to the Hub.

Data is logged locally and then pushed to the Hub asynchronously. Pushing data to the Hub is done in a separate
thread to avoid blocking the training script. In particular, if the upload fails for any reason (e.g. a connection
issue), the main script will not be interrupted. Data is automatically pushed to the Hub every `commit_every`
minutes (default to every 5 minutes).

<Tip warning={true}>

`HFSummaryWriter` is experimental. Its API is subject to change in the future without prior notice.

</Tip>

Args:
    repo_id (`str`):
        The id of the repo to which the logs will be pushed.
    logdir (`str`, *optional*):
        The directory where the logs will be written. If not specified, a local directory will be created by the
        underlying `SummaryWriter` object.
    commit_every (`int` or `float`, *optional*):
        The frequency (in minutes) at which the logs will be pushed to the Hub. Defaults to 5 minutes.
    squash_history (`bool`, *optional*):
        Whether to squash the history of the repo after each commit. Defaults to `False`. Squashing commits is
        useful to avoid degraded performances on the repo when it grows too large.
    repo_type (`str`, *optional*):
        The type of the repo to which the logs will be pushed. Defaults to "model".
    repo_revision (`str`, *optional*):
        The revision of the repo to which the logs will be pushed. Defaults to "main".
    repo_private (`bool`, *optional*):
        Whether to create a private repo or not. Defaults to False. This argument is ignored if the repo already
        exists.
    path_in_repo (`str`, *optional*):
        The path to the folder in the repo where the logs will be pushed. Defaults to "tensorboard/".
    repo_allow_patterns (`List[str]` or `str`, *optional*):
        A list of patterns to include in the upload. Defaults to `"*.tfevents.*"`. Check out the
        [upload guide](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder) for more details.
    repo_ignore_patterns (`List[str]` or `str`, *optional*):
        A list of patterns to exclude in the upload. Check out the
        [upload guide](https://huggingface.co/docs/huggingface_hub/guides/upload#upload-a-folder) for more details.
    token (`str`, *optional*):
        Authentication token. Will default to the stored token. See https://huggingface.co/settings/token for more
        details
    kwargs:
        Additional keyword arguments passed to `SummaryWriter`.

Examples:
```diff
# Taken from https://pytorch.org/docs/stable/tensorboard.html
- from torch.utils.tensorboard import SummaryWriter
+ from huggingface_hub import HFSummaryWriter

import numpy as np

- writer = SummaryWriter()
+ writer = HFSummaryWriter(repo_id="username/my-trained-model")

for n_iter in range(100):
    writer.add_scalar('Loss/train', np.random.random(), n_iter)
    writer.add_scalar('Loss/test', np.random.random(), n_iter)
    writer.add_scalar('Accuracy/train', np.random.random(), n_iter)
    writer.add_scalar('Accuracy/test', np.random.random(), n_iter)
```

```py
>>> from huggingface_hub import HFSummaryWriter

# Logs are automatically pushed every 15 minutes (5 by default) + when exiting the context manager
>>> with HFSummaryWriter(repo_id="test_hf_logger", commit_every=15) as logger:
...     logger.add_scalar("a", 1)
...     logger.add_scalar("b", 2)
```

---
## __new__
```python
from _tensorboard_logger import __new__
```



---
## __init__
```python
from _tensorboard_logger import __init__
```



---
## __exit__
```python
from _tensorboard_logger import __exit__
```

Push to hub in a non-blocking way when exiting the logger's context manager.

---
## __name__
```python
from hf_file_system import __name__
```



---
## HfFileSystemResolvedPath
```python
from hf_file_system import HfFileSystemResolvedPath
```

Data structure containing information about a resolved Hugging Face file system path.

---
## HfFileSystem
```python
from hf_file_system import HfFileSystem
```

Access a remote Hugging Face Hub repository as if were a local file system.

Args:
    token (`str` or `bool`, *optional*):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.

Usage:

```python
>>> from huggingface_hub import HfFileSystem

>>> fs = HfFileSystem()

>>> # List files
>>> fs.glob("my-username/my-model/*.bin")
['my-username/my-model/pytorch_model.bin']
>>> fs.ls("datasets/my-username/my-dataset", detail=False)
['datasets/my-username/my-dataset/.gitattributes', 'datasets/my-username/my-dataset/README.md', 'datasets/my-username/my-dataset/data.json']

>>> # Read/write files
>>> with fs.open("my-username/my-model/pytorch_model.bin") as f:
...     data = f.read()
>>> with fs.open("my-username/my-model/pytorch_model.bin", "wb") as f:
...     f.write(data)
```

---
## HfFileSystemFile
```python
from hf_file_system import HfFileSystemFile
```



---
## HfFileSystemStreamFile
```python
from hf_file_system import HfFileSystemStreamFile
```



---
## safe_revision
```python
from hf_file_system import safe_revision
```



---
## safe_quote
```python
from hf_file_system import safe_quote
```



---
## _raise_file_not_found
```python
from hf_file_system import _raise_file_not_found
```



---
## reopen
```python
from hf_file_system import reopen
```



---
## unresolve
```python
from hf_file_system import unresolve
```



---
## __init__
```python
from hf_file_system import __init__
```



---
## _repo_and_revision_exist
```python
from hf_file_system import _repo_and_revision_exist
```



---
## resolve_path
```python
from hf_file_system import resolve_path
```



---
## invalidate_cache
```python
from hf_file_system import invalidate_cache
```



---
## _open
```python
from hf_file_system import _open
```



---
## _rm
```python
from hf_file_system import _rm
```



---
## rm
```python
from hf_file_system import rm
```



---
## ls
```python
from hf_file_system import ls
```

List the contents of a directory.

---
## _ls_tree
```python
from hf_file_system import _ls_tree
```



---
## walk
```python
from hf_file_system import walk
```



---
## glob
```python
from hf_file_system import glob
```



---
## find
```python
from hf_file_system import find
```



---
## cp_file
```python
from hf_file_system import cp_file
```



---
## modified
```python
from hf_file_system import modified
```



---
## info
```python
from hf_file_system import info
```



---
## exists
```python
from hf_file_system import exists
```

Is there a file at the given path

---
## isdir
```python
from hf_file_system import isdir
```

Is this entry directory-like?

---
## isfile
```python
from hf_file_system import isfile
```

Is this entry file-like?

---
## url
```python
from hf_file_system import url
```



---
## get_file
```python
from hf_file_system import get_file
```

Copy single remote file to local.

---
## transaction
```python
from hf_file_system import transaction
```

A context within which files are committed together upon exit

Requires the file class to implement `.commit()` and `.discard()`
for the normal and exception cases.

---
## start_transaction
```python
from hf_file_system import start_transaction
```

Begin write transaction for deferring files, non-context version

---
## __del__
```python
from hf_file_system import __del__
```



---
## _fetch_range
```python
from hf_file_system import _fetch_range
```



---
## _initiate_upload
```python
from hf_file_system import _initiate_upload
```



---
## _upload_chunk
```python
from hf_file_system import _upload_chunk
```



---
## read
```python
from hf_file_system import read
```



---
## seek
```python
from hf_file_system import seek
```



---
## __reduce__
```python
from hf_file_system import __reduce__
```



---
## _align_revision_in_path_with_revision
```python
from hf_file_system import _align_revision_in_path_with_revision
```



---
## __name__
```python
from fastai_utils import __name__
```



---
## _check_fastai_fastcore_versions
```python
from fastai_utils import _check_fastai_fastcore_versions
```

Checks that the installed fastai and fastcore versions are compatible for pickle serialization.

Args:
    fastai_min_version (`str`, *optional*):
        The minimum fastai version supported.
    fastcore_min_version (`str`, *optional*):
        The minimum fastcore version supported.

<Tip>
Raises the following error:

    - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
      if the fastai or fastcore libraries are not available or are of an invalid version.

</Tip>

---
## _check_fastai_fastcore_pyproject_versions
```python
from fastai_utils import _check_fastai_fastcore_pyproject_versions
```

Checks that the `pyproject.toml` file in the directory `storage_folder` has fastai and fastcore versions
that are compatible with `from_pretrained_fastai` and `push_to_hub_fastai`. If `pyproject.toml` does not exist
or does not contain versions for fastai and fastcore, then it logs a warning.

Args:
    storage_folder (`str`):
        Folder to look for the `pyproject.toml` file.
    fastai_min_version (`str`, *optional*):
        The minimum fastai version supported.
    fastcore_min_version (`str`, *optional*):
        The minimum fastcore version supported.

<Tip>
Raises the following errors:

    - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
      if the `toml` module is not installed.
    - [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError)
      if the `pyproject.toml` indicates a lower than minimum supported version of fastai or fastcore.

</Tip>

---
## _create_model_card
```python
from fastai_utils import _create_model_card
```

Creates a model card for the repository.

Args:
    repo_dir (`Path`):
        Directory where model card is created.

---
## _create_model_pyproject
```python
from fastai_utils import _create_model_pyproject
```

Creates a `pyproject.toml` for the repository.

Args:
    repo_dir (`Path`):
        Directory where `pyproject.toml` is created.

---
## _save_pretrained_fastai
```python
from fastai_utils import _save_pretrained_fastai
```

Saves a fastai learner to `save_directory` in pickle format using the default pickle protocol for the version of python used.

Args:
    learner (`Learner`):
        The `fastai.Learner` you'd like to save.
    save_directory (`str` or `Path`):
        Specific directory in which you want to save the fastai learner.
    config (`dict`, *optional*):
        Configuration object. Will be uploaded as a .json file. Example: 'https://huggingface.co/espejelomar/fastai-pet-breeds-classification/blob/main/config.json'.

<Tip>

Raises the following error:

    - [`RuntimeError`](https://docs.python.org/3/library/exceptions.html#RuntimeError)
      if the config file provided is not a dictionary.

</Tip>

---
## from_pretrained_fastai
```python
from fastai_utils import from_pretrained_fastai
```

Load pretrained fastai model from the Hub or from a local directory.

Args:
    repo_id (`str`):
        The location where the pickled fastai.Learner is. It can be either of the two:
            - Hosted on the Hugging Face Hub. E.g.: 'espejelomar/fatai-pet-breeds-classification' or 'distilgpt2'.
              You can add a `revision` by appending `@` at the end of `repo_id`. E.g.: `dbmdz/bert-base-german-cased@main`.
              Revision is the specific model version to use. Since we use a git-based system for storing models and other
              artifacts on the Hugging Face Hub, it can be a branch name, a tag name, or a commit id.
            - Hosted locally. `repo_id` would be a directory containing the pickle and a pyproject.toml
              indicating the fastai and fastcore versions used to build the `fastai.Learner`. E.g.: `./my_model_directory/`.
    revision (`str`, *optional*):
        Revision at which the repo's files are downloaded. See documentation of `snapshot_download`.

Returns:
    The `fastai.Learner` model in the `repo_id` repo.

---
## push_to_hub_fastai
```python
from fastai_utils import push_to_hub_fastai
```

Upload learner checkpoint files to the Hub.

Use `allow_patterns` and `ignore_patterns` to precisely filter which files should be pushed to the hub. Use
`delete_patterns` to delete existing remote files in the same commit. See [`upload_folder`] reference for more
details.

Args:
    learner (`Learner`):
        The `fastai.Learner' you'd like to push to the Hub.
    repo_id (`str`):
        The repository id for your model in Hub in the format of "namespace/repo_name". The namespace can be your individual account or an organization to which you have write access (for example, 'stanfordnlp/stanza-de').
    commit_message (`str`, *optional*):
        Message to commit while pushing. Will default to :obj:`"add model"`.
    private (`bool`, *optional*, defaults to `False`):
        Whether or not the repository created should be private.
    token (`str`, *optional*):
        The Hugging Face account token to use as HTTP bearer authorization for remote files. If :obj:`None`, the token will be asked by a prompt.
    config (`dict`, *optional*):
        Configuration object to be saved alongside the model weights.
    branch (`str`, *optional*):
        The git branch on which to push the model. This defaults to
        the default branch as specified in your repository, which
        defaults to `"main"`.
    create_pr (`boolean`, *optional*):
        Whether or not to create a Pull Request from `branch` with that commit.
        Defaults to `False`.
    api_endpoint (`str`, *optional*):
        The API endpoint to use when pushing the model to the hub.
    allow_patterns (`List[str]` or `str`, *optional*):
        If provided, only files matching at least one pattern are pushed.
    ignore_patterns (`List[str]` or `str`, *optional*):
        If provided, files matching any of the patterns are not pushed.
    delete_patterns (`List[str]` or `str`, *optional*):
        If provided, remote files matching any of the patterns will be deleted from the repo.

Returns:
    The url of the commit of your model in the given repository.

<Tip>

Raises the following error:

    - [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      if the user is not log on to the Hugging Face Hub.

</Tip>

---
## __name__
```python
from _commit_api import __name__
```

Type definitions and utilities for the `create_commit` API

---
## CommitOperationDelete
```python
from _commit_api import CommitOperationDelete
```

Data structure holding necessary info to delete a file or a folder from a repository
on the Hub.

Args:
    path_in_repo (`str`):
        Relative filepath in the repo, for example: `"checkpoints/1fec34a/weights.bin"`
        for a file or `"checkpoints/1fec34a/"` for a folder.
    is_folder (`bool` or `Literal["auto"]`, *optional*)
        Whether the Delete Operation applies to a folder or not. If "auto", the path
        type (file or folder) is guessed automatically by looking if path ends with
        a "/" (folder) or not (file). To explicitly set the path type, you can set
        `is_folder=True` or `is_folder=False`.

---
## CommitOperationCopy
```python
from _commit_api import CommitOperationCopy
```

Data structure holding necessary info to copy a file in a repository on the Hub.

Limitations:
  - Only LFS files can be copied. To copy a regular file, you need to download it locally and re-upload it
  - Cross-repository copies are not supported.

Note: you can combine a [`CommitOperationCopy`] and a [`CommitOperationDelete`] to rename an LFS file on the Hub.

Args:
    src_path_in_repo (`str`):
        Relative filepath in the repo of the file to be copied, e.g. `"checkpoints/1fec34a/weights.bin"`.
    path_in_repo (`str`):
        Relative filepath in the repo where to copy the file, e.g. `"checkpoints/1fec34a/weights_copy.bin"`.
    src_revision (`str`, *optional*):
        The git revision of the file to be copied. Can be any valid git revision.
        Default to the target commit revision.

---
## CommitOperationAdd
```python
from _commit_api import CommitOperationAdd
```

Data structure holding necessary info to upload a file to a repository on the Hub.

Args:
    path_in_repo (`str`):
        Relative filepath in the repo, for example: `"checkpoints/1fec34a/weights.bin"`
    path_or_fileobj (`str`, `Path`, `bytes`, or `BinaryIO`):
        Either:
        - a path to a local file (as `str` or `pathlib.Path`) to upload
        - a buffer of bytes (`bytes`) holding the content of the file to upload
        - a "file object" (subclass of `io.BufferedIOBase`), typically obtained
            with `open(path, "rb")`. It must support `seek()` and `tell()` methods.

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `path_or_fileobj` is not one of `str`, `Path`, `bytes` or `io.BufferedIOBase`.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `path_or_fileobj` is a `str` or `Path` but not a path to an existing file.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `path_or_fileobj` is a `io.BufferedIOBase` but it doesn't support both
        `seek()` and `tell()`.

---
## _validate_path_in_repo
```python
from _commit_api import _validate_path_in_repo
```



---
## _warn_on_overwriting_operations
```python
from _commit_api import _warn_on_overwriting_operations
```

Warn user when a list of operations is expected to overwrite itself in a single
commit.

Rules:
- If a filepath is updated by multiple `CommitOperationAdd` operations, a warning
  message is triggered.
- If a filepath is updated at least once by a `CommitOperationAdd` and then deleted
  by a `CommitOperationDelete`, a warning is triggered.
- If a `CommitOperationDelete` deletes a filepath that is then updated by a
  `CommitOperationAdd`, no warning is triggered. This is usually useless (no need to
  delete before upload) but can happen if a user deletes an entire folder and then
  add new files to it.

---
## _upload_lfs_files
```python
from _commit_api import _upload_lfs_files
```

Uploads the content of `additions` to the Hub using the large file storage protocol.

Relevant external documentation:
    - LFS Batch API: https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md

Args:
    additions (`List` of `CommitOperationAdd`):
        The files to be uploaded
    repo_type (`str`):
        Type of the repo to upload to: `"model"`, `"dataset"` or `"space"`.
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    headers (`Dict[str, str]`):
        Headers to use for the request, including authorization headers and user agent.
    num_threads (`int`, *optional*):
        The number of concurrent threads to use when uploading. Defaults to 5.
    revision (`str`, *optional*):
        The git revision to upload to.

Raises:
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If an upload failed for any reason
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If the server returns malformed responses
    [`HTTPError`](https://requests.readthedocs.io/en/latest/api/#requests.HTTPError)
        If the LFS batch endpoint returned an HTTP error.

---
## _validate_preupload_info
```python
from _commit_api import _validate_preupload_info
```



---
## _fetch_upload_modes
```python
from _commit_api import _fetch_upload_modes
```

Requests the Hub "preupload" endpoint to determine whether each input file should be uploaded as a regular git blob
or as git LFS blob. Input `additions` are mutated in-place with the upload mode.

Args:
    additions (`Iterable` of :class:`CommitOperationAdd`):
        Iterable of :class:`CommitOperationAdd` describing the files to
        upload to the Hub.
    repo_type (`str`):
        Type of the repo to upload to: `"model"`, `"dataset"` or `"space"`.
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    headers (`Dict[str, str]`):
        Headers to use for the request, including authorization headers and user agent.
    revision (`str`):
        The git revision to upload the files to. Can be any valid git revision.
    gitignore_content (`str`, *optional*):
        The content of the `.gitignore` file to know which files should be ignored. The order of priority
        is to first check if `gitignore_content` is passed, then check if the `.gitignore` file is present
        in the list of files to commit and finally default to the `.gitignore` file already hosted on the Hub
        (if any).
Raises:
    [`~utils.HfHubHTTPError`]
        If the Hub API returned an error.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If the Hub API response is improperly formatted.

---
## _fetch_files_to_copy
```python
from _commit_api import _fetch_files_to_copy
```

Fetch information about the files to copy.

For LFS files, we only need their metadata (file size and sha256) while for regular files
we need to download the raw content from the Hub.

Args:
    copies (`Iterable` of :class:`CommitOperationCopy`):
        Iterable of :class:`CommitOperationCopy` describing the files to
        copy on the Hub.
    repo_type (`str`):
        Type of the repo to upload to: `"model"`, `"dataset"` or `"space"`.
    repo_id (`str`):
        A namespace (user or an organization) and a repo name separated
        by a `/`.
    headers (`Dict[str, str]`):
        Headers to use for the request, including authorization headers and user agent.
    revision (`str`):
        The git revision to upload the files to. Can be any valid git revision.

Returns: `Dict[Tuple[str, Optional[str]], Union[RepoFile, bytes]]]`
    Key is the file path and revision of the file to copy.
    Value is the raw content as bytes (for regular files) or the file information as a RepoFile (for LFS files).

Raises:
    [`~utils.HfHubHTTPError`]
        If the Hub API returned an error.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If the Hub API response is improperly formatted.

---
## _prepare_commit_payload
```python
from _commit_api import _prepare_commit_payload
```

Builds the payload to POST to the `/commit` API of the Hub.

Payload is returned as an iterator so that it can be streamed as a ndjson in the
POST request.

For more information, see:
    - https://github.com/huggingface/huggingface_hub/issues/1085#issuecomment-1265208073
    - http://ndjson.org/

---
## __post_init__
```python
from _commit_api import __post_init__
```

Validates `path_or_fileobj` and compute `upload_info`.

---
## as_file
```python
from _commit_api import as_file
```

A context manager that yields a file-like object allowing to read the underlying
data behind `path_or_fileobj`.

Args:
    with_tqdm (`bool`, *optional*, defaults to `False`):
        If True, iterating over the file object will display a progress bar. Only
        works if the file-like object is a path to a file. Pure bytes and buffers
        are not supported.

Example:

```python
>>> operation = CommitOperationAdd(
...        path_in_repo="remote/dir/weights.h5",
...        path_or_fileobj="./local/weights.h5",
... )
CommitOperationAdd(path_in_repo='remote/dir/weights.h5', path_or_fileobj='./local/weights.h5')

>>> with operation.as_file() as file:
...     content = file.read()

>>> with operation.as_file(with_tqdm=True) as file:
...     while True:
...         data = file.read(1024)
...         if not data:
...              break
config.json: 100%|█████████████████████████| 8.19k/8.19k [00:02<00:00, 3.72kB/s]

>>> with operation.as_file(with_tqdm=True) as file:
...     requests.put(..., data=file)
config.json: 100%|█████████████████████████| 8.19k/8.19k [00:02<00:00, 3.72kB/s]
```

---
## b64content
```python
from _commit_api import b64content
```

The base64-encoded content of `path_or_fileobj`

Returns: `bytes`

---
## _local_oid
```python
from _commit_api import _local_oid
```

Return the OID of the local file.

This OID is then compared to `self._remote_oid` to check if the file has changed compared to the remote one.
If the file did not change, we won't upload it again to prevent empty commits.

For LFS files, the OID corresponds to the SHA256 of the file content (used a LFS ref).
For regular files, the OID corresponds to the SHA1 of the file content.
Note: this is slightly different to git OID computation since the oid of an LFS file is usually the git-SHA1 of the
      pointer file content (not the actual file content). However, using the SHA256 is enough to detect changes
      and more convenient client-side.

---
## _wrapped_lfs_upload
```python
from _commit_api import _wrapped_lfs_upload
```



---
## chomp
```python
from __init__ import chomp
```

If the text in an inline tag like b, a, or em contains a leading or trailing
space, strip the string and return a space as suffix of prefix, if needed.
This function is used to prevent conversions like
    <b> foo</b> => ** foo**

---
## abstract_inline_conversion
```python
from __init__ import abstract_inline_conversion
```

This abstracts all simple inline tags like b, em, del, ...
Returns a function that wraps the chomped text in a pair of the string
that is returned by markup_fn, with '/' inserted in the string used after
the text if it looks like an HTML tag. markup_fn is necessary to allow for
references to self.strong_em_symbol etc.

---
## _todict
```python
from __init__ import _todict
```



---
## MarkdownConverter
```python
from __init__ import MarkdownConverter
```



---
## markdownify
```python
from __init__ import markdownify
```



---
## implementation
```python
from __init__ import implementation
```



---
## DefaultOptions
```python
from __init__ import DefaultOptions
```



---
## Options
```python
from __init__ import Options
```

A dict/attribute hybrid that returns None on nonexisting keys.

---
## convert
```python
from __init__ import convert
```



---
## convert_soup
```python
from __init__ import convert_soup
```



---
## process_tag
```python
from __init__ import process_tag
```



---
## process_text
```python
from __init__ import process_text
```



---
## should_convert_tag
```python
from __init__ import should_convert_tag
```



---
## indent
```python
from __init__ import indent
```



---
## underline
```python
from __init__ import underline
```



---
## convert_a
```python
from __init__ import convert_a
```



---
## convert_blockquote
```python
from __init__ import convert_blockquote
```



---
## convert_br
```python
from __init__ import convert_br
```



---
## convert_code
```python
from __init__ import convert_code
```



---
## convert_hn
```python
from __init__ import convert_hn
```



---
## convert_hr
```python
from __init__ import convert_hr
```



---
## convert_img
```python
from __init__ import convert_img
```



---
## convert_list
```python
from __init__ import convert_list
```



---
## convert_li
```python
from __init__ import convert_li
```



---
## convert_p
```python
from __init__ import convert_p
```



---
## convert_pre
```python
from __init__ import convert_pre
```



---
## convert_script
```python
from __init__ import convert_script
```



---
## convert_style
```python
from __init__ import convert_style
```



---
## convert_table
```python
from __init__ import convert_table
```



---
## convert_caption
```python
from __init__ import convert_caption
```



---
## convert_figcaption
```python
from __init__ import convert_figcaption
```



---
## convert_td
```python
from __init__ import convert_td
```



---
## convert_th
```python
from __init__ import convert_th
```



---
## convert_tr
```python
from __init__ import convert_tr
```



---
## is_nested_node
```python
from __init__ import is_nested_node
```



---
## convert_tag
```python
from __init__ import convert_tag
```



---
## __name__
```python
from main import __name__
```



---
## main
```python
from main import main
```



---
## __name__
```python
from variables import __name__
```



---
## Atom
```python
from variables import Atom
```



---
## Literal
```python
from variables import Literal
```



---
## Variable
```python
from variables import Variable
```



---
## parse_variables
```python
from variables import parse_variables
```



---
## __ne__
```python
from variables import __ne__
```



---
## resolve
```python
from variables import resolve
```



---
## __init__
```python
from variables import __init__
```



---
## __repr__
```python
from variables import __repr__
```



---
## __eq__
```python
from variables import __eq__
```



---
## __hash__
```python
from variables import __hash__
```



---
## load_ipython_extension
```python
from __init__ import load_ipython_extension
```



---
## get_cli_string
```python
from __init__ import get_cli_string
```

Returns a string suitable for running as a shell script.

Useful for converting a arguments passed to a fabric task
to be passed to a `local` or `run` command.

---
## __name__
```python
from parser import __name__
```



---
## make_regex
```python
from parser import make_regex
```



---
## Original
```python
from parser import Original
```



---
## Binding
```python
from parser import Binding
```



---
## Position
```python
from parser import Position
```



---
## Error
```python
from parser import Error
```



---
## Reader
```python
from parser import Reader
```



---
## decode_escapes
```python
from parser import decode_escapes
```



---
## parse_key
```python
from parser import parse_key
```



---
## parse_unquoted_value
```python
from parser import parse_unquoted_value
```



---
## parse_value
```python
from parser import parse_value
```



---
## parse_binding
```python
from parser import parse_binding
```



---
## parse_stream
```python
from parser import parse_stream
```



---
## __init__
```python
from parser import __init__
```



---
## start
```python
from parser import start
```



---
## set
```python
from parser import set
```



---
## advance
```python
from parser import advance
```



---
## has_next
```python
from parser import has_next
```



---
## set_mark
```python
from parser import set_mark
```



---
## get_marked
```python
from parser import get_marked
```



---
## peek
```python
from parser import peek
```



---
## read
```python
from parser import read
```



---
## read_regex
```python
from parser import read_regex
```



---
## decode_match
```python
from parser import decode_match
```



---
## enumerate_env
```python
from cli import enumerate_env
```

Return a path for the ${pwd}/.env file.

If pwd does not exist, return None.

---
## stream_file
```python
from cli import stream_file
```

Open a file and yield the corresponding (decoded) stream.

Exits with error code 2 if the file cannot be opened.

---
## list
```python
from cli import list
```

Display all the stored key/value.

---
## set
```python
from cli import set
```

Store the given key/value.

---
## get
```python
from cli import get
```

Retrieve the value for the given key.

---
## unset
```python
from cli import unset
```

Removes the given key.

---
## run
```python
from cli import run
```



---
## run_command
```python
from cli import run_command
```

Run command in sub process.

Runs the command in a sub process with the variables from `env`
added in the current environment variables.

Parameters
----------
command: List[str]
    The command and it's parameters
env: Dict
    The additional environment variables

Returns
-------
int
    The return code of the command

---
## __name__
```python
from ipython import __name__
```



---
## IPythonDotEnv
```python
from ipython import IPythonDotEnv
```



---
## load_ipython_extension
```python
from ipython import load_ipython_extension
```

Register the %dotenv magic.

---
## dotenv
```python
from ipython import dotenv
```



---
## with_warn_for_invalid_lines
```python
from main import with_warn_for_invalid_lines
```



---
## DotEnv
```python
from main import DotEnv
```



---
## get_key
```python
from main import get_key
```

Get the value of a given key from the given .env.

Returns `None` if the key isn't found or doesn't have a value.

---
## rewrite
```python
from main import rewrite
```



---
## set_key
```python
from main import set_key
```

Adds or Updates a key/value to the given .env

If the .env path given doesn't exist, fails instead of risking creating
an orphan .env somewhere in the filesystem

---
## unset_key
```python
from main import unset_key
```

Removes a given key from the given `.env` file.

If the .env path given doesn't exist, fails.
If the given key doesn't exist in the .env, fails.

---
## resolve_variables
```python
from main import resolve_variables
```



---
## _walk_to_root
```python
from main import _walk_to_root
```

Yield directories starting from the given directory up to the root

---
## find_dotenv
```python
from main import find_dotenv
```

Search in increasingly higher folders for the given file

Returns path to the file if found, or an empty string otherwise

---
## load_dotenv
```python
from main import load_dotenv
```

Parse a .env file and then load all the variables found as environment variables.

Parameters:
    dotenv_path: Absolute or relative path to .env file.
    stream: Text stream (such as `io.StringIO`) with .env content, used if
        `dotenv_path` is `None`.
    verbose: Whether to output a warning the .env file is missing.
    override: Whether to override the system environment variables with the variables
        from the `.env` file.
    encoding: Encoding to be used to read the file.
Returns:
    Bool: True if at least one environment variable is set else False

If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the
.env file.

---
## dotenv_values
```python
from main import dotenv_values
```

Parse a .env file and return its content as a dict.

The returned dict will have `None` values for keys without values in the .env file.
For example, `foo=bar` results in `{"foo": "bar"}` whereas `foo` alone results in
`{"foo": None}`

Parameters:
    dotenv_path: Absolute or relative path to the .env file.
    stream: `StringIO` object with .env content, used if `dotenv_path` is `None`.
    verbose: Whether to output a warning if the .env file is missing.
    encoding: Encoding to be used to read the file.

If both `dotenv_path` and `stream` are `None`, `find_dotenv()` is used to find the
.env file.

---
## __init__
```python
from main import __init__
```



---
## _get_stream
```python
from main import _get_stream
```



---
## dict
```python
from main import dict
```

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

---
## parse
```python
from main import parse
```

Parse a YAML stream and produce parsing events.

---
## set_as_environment_variables
```python
from main import set_as_environment_variables
```

Load the current dotenv as system environment variable.

---
## get
```python
from main import get
```



---
## _is_interactive
```python
from main import _is_interactive
```

Decide whether this is running in a REPL or IPython notebook 

---
## __name__
```python
from live_pane import __name__
```



---
## LivePanelDisplay
```python
from live_pane import LivePanelDisplay
```



---
## __init__
```python
from live_pane import __init__
```



---
## update
```python
from live_pane import update
```



---
## __enter__
```python
from live_pane import __enter__
```



---
## __exit__
```python
from live_pane import __exit__
```



---
## __name__
```python
from md import __name__
```



---
## Markdown
```python
from md import Markdown
```

Stream formatted JSON-like text to the terminal with live updates.

---
## recursive_read
```python
from md import recursive_read
```



---
## cli
```python
from md import cli
```

Stream markdown content from a file.

---
## example
```python
from md import example
```



---
## __init__
```python
from md import __init__
```



---
## generate_markdown
```python
from md import generate_markdown
```

Generate Markdown from JSON with headers based on depth.

---
## update
```python
from md import update
```

Update the renderable that is being displayed.

Args:
    renderable (RenderableType): New renderable to use.
    refresh (bool, optional): Refresh the display. Defaults to False.

---
## stream
```python
from md import stream
```

Stream the markdown content with live updates.

---
## is_valid_url
```python
from web import is_valid_url
```



---
## expand_and_view_webpage
```python
from web import expand_and_view_webpage
```



---
## display_webpage_content
```python
from web import display_webpage_content
```



---
## __name__
```python
from render import __name__
```



---
## display_class_methods
```python
from render import display_class_methods
```



---
## display_rich_output
```python
from render import display_rich_output
```



---
## create_doc_link
```python
from render import create_doc_link
```



---
## __name__
```python
from extract_docs import __name__
```

Utilities related to attribute docstring extraction.

---
## DocstringVisitor
```python
from extract_docs import DocstringVisitor
```



---
## _dedent_source_lines
```python
from extract_docs import _dedent_source_lines
```



---
## _extract_source_from_frame
```python
from extract_docs import _extract_source_from_frame
```



---
## extract_docstrings_from_cls
```python
from extract_docs import extract_docstrings_from_cls
```

Map model attributes and their corresponding docstring.

Args:
    cls: The class of the Pydantic model to inspect.
    use_inspect: Whether to skip usage of frames to find the object and use
        the `inspect` module instead.

Returns:
    A mapping containing attribute names and their corresponding docstring.

---
## extract_docstring_from_object
```python
from extract_docs import extract_docstring_from_object
```

Extract docstrings from a module.

Args:
    module: The module name.

Returns:
    A mapping containing attribute names and their corresponding docstring.

---
## __init__
```python
from extract_docs import __init__
```



---
## visit
```python
from extract_docs import visit
```



---
## visit_AnnAssign
```python
from extract_docs import visit_AnnAssign
```



---
## visit_Expr
```python
from extract_docs import visit_Expr
```



---
## __name__
```python
from docs2md import __name__
```



---
## parse_google_docstring
```python
from docs2md import parse_google_docstring
```

Parse a Google-style docstring into its components using regex.

---
## generate_feature_list
```python
from docs2md import generate_feature_list
```

Generate a markdown list of features from the description.

---
## generate_examples
```python
from docs2md import generate_examples
```

Generate a markdown code block with examples.

---
## generate_docs
```python
from docs2md import generate_docs
```

Generate markdown documentation for a given Python file.

---
## main
```python
from docs2md import main
```

Generate markdown documentation for all Python files in a given path.

---
## cli
```python
from docs2md import cli
```

Command-line interface for generating markdown documentation.

Args:
    path (str): The path to the Python file or directory.
    output_file (str): The output file to save the generated markdown.

---
## __name__
```python
from web2md import __name__
```



---
## html_to_markdown_with_depth
```python
from web2md import html_to_markdown_with_depth
```

Recursively convert HTML element and its children to Markdown.

---
## display_markdown_hierarchically
```python
from web2md import display_markdown_hierarchically
```



---
## cli
```python
from web2md import cli
```



---
## extract_links
```python
from web2md import extract_links
```

Extract links from markdown content.

---
## __name__
```python
from python2json import __name__
```



---
## generate_json_spec
```python
from python2json import generate_json_spec
```



---
## generate_summary
```python
from main import generate_summary
```



---
## cli
```python
from main import cli
```

Stream formatted JSON-like text or markdown files to the terminal with live updates.

Usage:
    $ md-stream file.json

---
## __name__
```python
from panel import __name__
```



---
## LivePanelDisplay
```python
from panel import LivePanelDisplay
```



---
## __init__
```python
from panel import __init__
```



---
## update
```python
from panel import update
```



---
## __enter__
```python
from panel import __enter__
```



---
## __exit__
```python
from panel import __exit__
```



---
## SupportsGt
```python
from __init__ import SupportsGt
```



---
## SupportsGe
```python
from __init__ import SupportsGe
```



---
## SupportsLt
```python
from __init__ import SupportsLt
```



---
## SupportsLe
```python
from __init__ import SupportsLe
```



---
## SupportsMod
```python
from __init__ import SupportsMod
```



---
## SupportsDiv
```python
from __init__ import SupportsDiv
```



---
## BaseMetadata
```python
from __init__ import BaseMetadata
```

Base class for all metadata.

This exists mainly so that implementers
can do `isinstance(..., BaseMetadata)` while traversing field annotations.

---
## Gt
```python
from __init__ import Gt
```

Gt(gt=x) implies that the value must be greater than x.

It can be used with any type that supports the ``>`` operator,
including numbers, dates and times, strings, sets, and so on.

---
## Ge
```python
from __init__ import Ge
```

Ge(ge=x) implies that the value must be greater than or equal to x.

It can be used with any type that supports the ``>=`` operator,
including numbers, dates and times, strings, sets, and so on.

---
## Lt
```python
from __init__ import Lt
```

Lt(lt=x) implies that the value must be less than x.

It can be used with any type that supports the ``<`` operator,
including numbers, dates and times, strings, sets, and so on.

---
## Le
```python
from __init__ import Le
```

Le(le=x) implies that the value must be less than or equal to x.

It can be used with any type that supports the ``<=`` operator,
including numbers, dates and times, strings, sets, and so on.

---
## GroupedMetadata
```python
from __init__ import GroupedMetadata
```

A grouping of multiple objects, like typing.Unpack.

`GroupedMetadata` on its own is not metadata and has no meaning.
All of the constraints and metadata should be fully expressable
in terms of the `BaseMetadata`'s returned by `GroupedMetadata.__iter__()`.

Concrete implementations should override `GroupedMetadata.__iter__()`
to add their own metadata.
For example:

>>> @dataclass
>>> class Field(GroupedMetadata):
>>>     gt: float | None = None
>>>     description: str | None = None
...
>>>     def __iter__(self) -> Iterable[object]:
>>>         if self.gt is not None:
>>>             yield Gt(self.gt)
>>>         if self.description is not None:
>>>             yield Description(self.gt)

Also see the implementation of `Interval` below for an example.

Parsers should recognize this and unpack it so that it can be used
both with and without unpacking:

- `Annotated[int, Field(...)]` (parser must unpack Field)
- `Annotated[int, *Field(...)]` (PEP-646)

---
## Interval
```python
from __init__ import Interval
```

Interval can express inclusive or exclusive bounds with a single object.

It accepts keyword arguments ``gt``, ``ge``, ``lt``, and/or ``le``, which
are interpreted the same way as the single-bound constraints.

---
## MultipleOf
```python
from __init__ import MultipleOf
```

MultipleOf(multiple_of=x) might be interpreted in two ways:

1. Python semantics, implying ``value % multiple_of == 0``, or
2. JSONschema semantics, where ``int(value / multiple_of) == value / multiple_of``

We encourage users to be aware of these two common interpretations,
and libraries to carefully document which they implement.

---
## MinLen
```python
from __init__ import MinLen
```

MinLen() implies minimum inclusive length,
e.g. ``len(value) >= min_length``.

---
## MaxLen
```python
from __init__ import MaxLen
```

MaxLen() implies maximum inclusive length,
e.g. ``len(value) <= max_length``.

---
## Len
```python
from __init__ import Len
```

Len() implies that ``min_length <= len(value) <= max_length``.

Upper bound may be omitted or ``None`` to indicate no upper length bound.

---
## Timezone
```python
from __init__ import Timezone
```

Timezone(tz=...) requires a datetime to be aware (or ``tz=None``, naive).

``Annotated[datetime, Timezone(None)]`` must be a naive datetime.
``Timezone[...]`` (the ellipsis literal) expresses that the datetime must be
tz-aware but any timezone is allowed.

You may also pass a specific timezone string or tzinfo object such as
``Timezone(timezone.utc)`` or ``Timezone("Africa/Abidjan")`` to express that
you only allow a specific timezone, though we note that this is often
a symptom of poor design.

---
## Unit
```python
from __init__ import Unit
```

Indicates that the value is a physical quantity with the specified unit.

It is intended for usage with numeric types, where the value represents the
magnitude of the quantity. For example, ``distance: Annotated[float, Unit('m')]``
or ``speed: Annotated[float, Unit('m/s')]``.

Interpretation of the unit string is left to the discretion of the consumer.
It is suggested to follow conventions established by python libraries that work
with physical quantities, such as

- ``pint`` : <https://pint.readthedocs.io/en/stable/>
- ``astropy.units``: <https://docs.astropy.org/en/stable/units/>

For indicating a quantity with a certain dimensionality but without a specific unit
it is recommended to use square brackets, e.g. `Annotated[float, Unit('[time]')]`.
Note, however, ``annotated_types`` itself makes no use of the unit string.

---
## Predicate
```python
from __init__ import Predicate
```

``Predicate(func: Callable)`` implies `func(value)` is truthy for valid values.

Users should prefer statically inspectable metadata, but if you need the full
power and flexibility of arbitrary runtime predicates... here it is.

We provide a few predefined predicates for common string constraints:
``IsLower = Predicate(str.islower)``, ``IsUpper = Predicate(str.isupper)``, and
``IsDigits = Predicate(str.isdigit)``. Users are encouraged to use methods which
can be given special handling, and avoid indirection like ``lambda s: s.lower()``.

Some libraries might have special logic to handle certain predicates, e.g. by
checking for `str.isdigit` and using its presence to both call custom logic to
enforce digit-only strings, and customise some generated external schema.

We do not specify what behaviour should be expected for predicates that raise
an exception.  For example `Annotated[int, Predicate(str.isdigit)]` might silently
skip invalid constraints, or statically raise an error; or it might try calling it
and then propagate or discard the resulting exception.

---
## Not
```python
from __init__ import Not
```



---
## __gt__
```python
from __init__ import __gt__
```



---
## __ge__
```python
from __init__ import __ge__
```



---
## __lt__
```python
from __init__ import __lt__
```



---
## __le__
```python
from __init__ import __le__
```



---
## __div__
```python
from __init__ import __div__
```



---
## __is_annotated_types_grouped_metadata__
```python
from __init__ import __is_annotated_types_grouped_metadata__
```



---
## __init_subclass__
```python
from __init__ import __init_subclass__
```



---
## DocInfo
```python
from __init__ import DocInfo
```

"
The return value of doc(), mainly to be used by tools that want to extract the
Annotated documentation at runtime.

---
## doc
```python
from __init__ import doc
```

Add documentation to a type annotation inside of Annotated.

For example:

>>> def hi(name: Annotated[int, doc("The name of the user")]) -> None: ...

---
## __name__
```python
from test_cases import __name__
```



---
## Case
```python
from test_cases import Case
```

A test case for `annotated_types`.

---
## cases
```python
from test_cases import cases
```



---
## MyCustomGroupedMetadata
```python
from test_cases import MyCustomGroupedMetadata
```



---
## __iter__
```python
from test_cases import __iter__
```



---
## __name__
```python
from _meta import __name__
```

Package metadata/info

---
## __name__
```python
from fastapi import __name__
```

FastAPI logging

---
## fastapi_intercept
```python
from fastapi import fastapi_intercept
```



---
## loglevel
```python
from core import loglevel
```

Convert log-level abrev to a valid loguru log level

---
## flog
```python
from core import flog
```

Log function (sync/async) enter and exit using this decorator

Args:
    funk (Callable): Function to decorate
    level (Union[int, str]): Log level
    enter (bool): Log function entry if True
    exit (bool): Log function exit if False

Returns:
    A wrapped function that now has logging!

Usage:
    # SYNC
    @flog
    def add(a, b):
        return a + b
    add(1, 4)

    # ASYNC
    @flog
    async def add_async(a, b):
        return a + b
    import asyncio
    asyncio.run(add_async(1, 4))

---
## handlers
```python
from core import handlers
```

Return all handlers

---
## _stringify_new_line
```python
from core import _stringify_new_line
```



---
## _stringify_no_new_line
```python
from core import _stringify_no_new_line
```



---
## _serialize_record
```python
from core import _serialize_record
```



---
## _flog
```python
from core import _flog
```



---
## _flog_decorator
```python
from core import _flog_decorator
```



---
## __name__
```python
from pydantic import __name__
```

Lager & pydantic

---
## RecordFile
```python
from pydantic import RecordFile
```



---
## RecordLevel
```python
from pydantic import RecordLevel
```



---
## RecordThread
```python
from pydantic import RecordThread
```



---
## RecordProcess
```python
from pydantic import RecordProcess
```



---
## RecordException
```python
from pydantic import RecordException
```



---
## Record
```python
from pydantic import Record
```



---
## Message
```python
from pydantic import Message
```



---
## __name__
```python
from dev import __name__
```



---
## HttpxSink
```python
from dev import HttpxSink
```



---
## __init__
```python
from dev import __init__
```



---
## __name__
```python
from const import __name__
```

Constants go here!

---
## __name__
```python
from __info__ import __name__
```

-----------------------------
dill: serialize all of Python
-----------------------------

About Dill
==========

``dill`` extends Python's ``pickle`` module for serializing and de-serializing
Python objects to the majority of the built-in Python types. Serialization
is the process of converting an object to a byte stream, and the inverse
of which is converting a byte stream back to a Python object hierarchy.

``dill`` provides the user the same interface as the ``pickle`` module, and
also includes some additional features. In addition to pickling Python
objects, ``dill`` provides the ability to save the state of an interpreter
session in a single command.  Hence, it would be feasible to save an
interpreter session, close the interpreter, ship the pickled file to
another computer, open a new interpreter, unpickle the session and
thus continue from the 'saved' state of the original interpreter
session.

``dill`` can be used to store Python objects to a file, but the primary
usage is to send Python objects across the network as a byte stream.
``dill`` is quite flexible, and allows arbitrary user defined classes
and functions to be serialized.  Thus ``dill`` is not intended to be
secure against erroneously or maliciously constructed data. It is
left to the user to decide whether the data they unpickle is from
a trustworthy source.

``dill`` is part of ``pathos``, a Python framework for heterogeneous computing.
``dill`` is in active development, so any user feedback, bug reports, comments,
or suggestions are highly appreciated.  A list of issues is located at
https://github.com/uqfoundation/dill/issues, with a legacy list maintained at
https://uqfoundation.github.io/project/pathos/query.


Major Features
==============

``dill`` can pickle the following standard types:

    - none, type, bool, int, float, complex, bytes, str,
    - tuple, list, dict, file, buffer, builtin,
    - Python classes, namedtuples, dataclasses, metaclasses,
    - instances of classes,
    - set, frozenset, array, functions, exceptions

``dill`` can also pickle more 'exotic' standard types:

    - functions with yields, nested functions, lambdas,
    - cell, method, unboundmethod, module, code, methodwrapper,
    - methoddescriptor, getsetdescriptor, memberdescriptor, wrapperdescriptor,
    - dictproxy, slice, notimplemented, ellipsis, quit

``dill`` cannot yet pickle these standard types:

    - frame, generator, traceback

``dill`` also provides the capability to:

    - save and load Python interpreter sessions
    - save and extract the source code from functions and classes
    - interactively diagnose pickling errors


Current Release
===============

The latest released version of ``dill`` is available from:

    https://pypi.org/project/dill

``dill`` is distributed under a 3-clause BSD license.


Development Version
===================

You can get the latest development version with all the shiny new features at:

    https://github.com/uqfoundation

If you have a new contribution, please submit a pull request.


Installation
============

``dill`` can be installed with ``pip``::

    $ pip install dill

To optionally include the ``objgraph`` diagnostic tool in the install::

    $ pip install dill[graph]

To optionally include the ``gprof2dot`` diagnostic tool in the install::

    $ pip install dill[profile]

For windows users, to optionally install session history tools::

    $ pip install dill[readline]


Requirements
============

``dill`` requires:

    - ``python`` (or ``pypy``), **>=3.8**
    - ``setuptools``, **>=42**

Optional requirements:

    - ``objgraph``, **>=1.7.2**
    - ``gprof2dot``, **>=2022.7.29**
    - ``pyreadline``, **>=1.7.1** (on windows)


Basic Usage
===========

``dill`` is a drop-in replacement for ``pickle``. Existing code can be
updated to allow complete pickling using::

    >>> import dill as pickle

or::

    >>> from dill import dumps, loads

``dumps`` converts the object to a unique byte string, and ``loads`` performs
the inverse operation::

    >>> squared = lambda x: x**2
    >>> loads(dumps(squared))(3)
    9

There are a number of options to control serialization which are provided
as keyword arguments to several ``dill`` functions:

* with *protocol*, the pickle protocol level can be set. This uses the
  same value as the ``pickle`` module, *DEFAULT_PROTOCOL*.
* with *byref=True*, ``dill`` to behave a lot more like pickle with
  certain objects (like modules) pickled by reference as opposed to
  attempting to pickle the object itself.
* with *recurse=True*, objects referred to in the global dictionary are
  recursively traced and pickled, instead of the default behavior of
  attempting to store the entire global dictionary.
* with *fmode*, the contents of the file can be pickled along with the file
  handle, which is useful if the object is being sent over the wire to a
  remote system which does not have the original file on disk. Options are
  *HANDLE_FMODE* for just the handle, *CONTENTS_FMODE* for the file content
  and *FILE_FMODE* for content and handle.
* with *ignore=False*, objects reconstructed with types defined in the
  top-level script environment use the existing type in the environment
  rather than a possibly different reconstructed type.

The default serialization can also be set globally in *dill.settings*.
Thus, we can modify how ``dill`` handles references to the global dictionary
locally or globally::

    >>> import dill.settings
    >>> dumps(absolute) == dumps(absolute, recurse=True)
    False
    >>> dill.settings['recurse'] = True
    >>> dumps(absolute) == dumps(absolute, recurse=True)
    True

``dill`` also includes source code inspection, as an alternate to pickling::

    >>> import dill.source
    >>> print(dill.source.getsource(squared))
    squared = lambda x:x**2

To aid in debugging pickling issues, use *dill.detect* which provides
tools like pickle tracing::

    >>> import dill.detect
    >>> with dill.detect.trace():
    >>>     dumps(squared)
    ┬ F1: <function <lambda> at 0x7fe074f8c280>
    ├┬ F2: <function _create_function at 0x7fe074c49c10>
    │└ # F2 [34 B]
    ├┬ Co: <code object <lambda> at 0x7fe07501eb30, file "<stdin>", line 1>
    │├┬ F2: <function _create_code at 0x7fe074c49ca0>
    ││└ # F2 [19 B]
    │└ # Co [87 B]
    ├┬ D1: <dict object at 0x7fe0750d4680>
    │└ # D1 [22 B]
    ├┬ D2: <dict object at 0x7fe074c5a1c0>
    │└ # D2 [2 B]
    ├┬ D2: <dict object at 0x7fe074f903c0>
    │├┬ D2: <dict object at 0x7fe074f8ebc0>
    ││└ # D2 [2 B]
    │└ # D2 [23 B]
    └ # F1 [180 B]

With trace, we see how ``dill`` stored the lambda (``F1``) by first storing
``_create_function``, the underlying code object (``Co``) and ``_create_code``
(which is used to handle code objects), then we handle the reference to
the global dict (``D2``) plus other dictionaries (``D1`` and ``D2``) that
save the lambda object's state. A ``#`` marks when the object is actually stored.


More Information
================

Probably the best way to get started is to look at the documentation at
http://dill.rtfd.io. Also see ``dill.tests`` for a set of scripts that
demonstrate how ``dill`` can serialize different Python objects. You can
run the test suite with ``python -m dill.tests``. The contents of any
pickle file can be examined with ``undill``.  As ``dill`` conforms to
the ``pickle`` interface, the examples and documentation found at
http://docs.python.org/library/pickle.html also apply to ``dill``
if one will ``import dill as pickle``. The source code is also generally
well documented, so further questions may be resolved by inspecting the
code itself. Please feel free to submit a ticket on github, or ask a
question on stackoverflow (**@Mike McKerns**).
If you would like to share how you use ``dill`` in your work, please send
an email (to **mmckerns at uqfoundation dot org**).


Citation
========

If you use ``dill`` to do research that leads to publication, we ask that you
acknowledge use of ``dill`` by citing the following in your publication::

    M.M. McKerns, L. Strand, T. Sullivan, A. Fang, M.A.G. Aivazis,
    "Building a framework for predictive science", Proceedings of
    the 10th Python in Science Conference, 2011;
    http://arxiv.org/pdf/1202.1056

    Michael McKerns and Michael Aivazis,
    "pathos: a framework for heterogeneous computing", 2010- ;
    https://uqfoundation.github.io/project/pathos

Please see https://uqfoundation.github.io/project/pathos or
http://arxiv.org/pdf/1202.1056 for further information.

---
## __name__
```python
from queues import __name__
```



---
## Queue
```python
from queues import Queue
```



---
## JoinableQueue
```python
from queues import JoinableQueue
```



---
## SimpleQueue
```python
from queues import SimpleQueue
```



---
## __init__
```python
from queues import __init__
```



---
## __getstate__
```python
from queues import __getstate__
```



---
## __setstate__
```python
from queues import __setstate__
```



---
## _after_fork
```python
from queues import _after_fork
```



---
## _reset
```python
from queues import _reset
```



---
## put
```python
from queues import put
```



---
## get
```python
from queues import get
```



---
## qsize
```python
from queues import qsize
```



---
## empty
```python
from queues import empty
```



---
## full
```python
from queues import full
```



---
## get_nowait
```python
from queues import get_nowait
```



---
## put_nowait
```python
from queues import put_nowait
```



---
## close
```python
from queues import close
```



---
## join_thread
```python
from queues import join_thread
```



---
## cancel_join_thread
```python
from queues import cancel_join_thread
```



---
## _terminate_broken
```python
from queues import _terminate_broken
```



---
## _start_thread
```python
from queues import _start_thread
```



---
## _finalize_join
```python
from queues import _finalize_join
```



---
## _finalize_close
```python
from queues import _finalize_close
```



---
## _feed
```python
from queues import _feed
```



---
## _on_queue_feeder_error
```python
from queues import _on_queue_feeder_error
```

Private API hook called when feeding data in the background thread
raises an exception.  For overriding by concurrent.futures.

---
## task_done
```python
from queues import task_done
```



---
## join
```python
from queues import join
```



---
## __name__
```python
from heap import __name__
```



---
## Heap
```python
from heap import Heap
```



---
## BufferWrapper
```python
from heap import BufferWrapper
```



---
## Arena
```python
from heap import Arena
```

A shared memory area backed by a temporary file (POSIX).

---
## reduce_arena
```python
from heap import reduce_arena
```



---
## rebuild_arena
```python
from heap import rebuild_arena
```



---
## __init__
```python
from heap import __init__
```



---
## _roundup
```python
from heap import _roundup
```



---
## _new_arena
```python
from heap import _new_arena
```



---
## _discard_arena
```python
from heap import _discard_arena
```



---
## _malloc
```python
from heap import _malloc
```



---
## _add_free_block
```python
from heap import _add_free_block
```



---
## _absorb
```python
from heap import _absorb
```



---
## _remove_allocated_block
```python
from heap import _remove_allocated_block
```



---
## _free_pending_blocks
```python
from heap import _free_pending_blocks
```



---
## free
```python
from heap import free
```



---
## malloc
```python
from heap import malloc
```



---
## create_memoryview
```python
from heap import create_memoryview
```



---
## __getstate__
```python
from heap import __getstate__
```



---
## __setstate__
```python
from heap import __setstate__
```



---
## _choose_dir
```python
from heap import _choose_dir
```



---
## __name__
```python
from shared_memory import __name__
```

Utility functions for vector environments to share memory between processes.

---
## _make_filename
```python
from shared_memory import _make_filename
```

Create a random filename for the shared memory object.

---
## SharedMemory
```python
from shared_memory import SharedMemory
```

Creates a new shared memory block or attaches to an existing
shared memory block.

Every shared memory block is assigned a unique name.  This enables
one process to create a shared memory block with a particular name
so that a different process can attach to that same shared memory
block using that same name.

As a resource for sharing data across processes, shared memory blocks
may outlive the original process that created them.  When one process
no longer needs access to a shared memory block that might still be
needed by other processes, the close() method should be called.
When a shared memory block is no longer needed by any process, the
unlink() method should be called to ensure proper cleanup.

---
## ShareableList
```python
from shared_memory import ShareableList
```

Pattern for a mutable list-like object shareable via a shared
memory block.  It differs from the built-in list type in that these
lists can not change their overall length (i.e. no append, insert,
etc.)

Because values are packed into a memoryview as bytes, the struct
packing format for any storable value must require no more than 8
characters to describe its format.

---
## __init__
```python
from shared_memory import __init__
```



---
## __del__
```python
from shared_memory import __del__
```



---
## __reduce__
```python
from shared_memory import __reduce__
```



---
## __repr__
```python
from shared_memory import __repr__
```



---
## buf
```python
from shared_memory import buf
```

A memoryview of contents of the shared memory block.

---
## name
```python
from shared_memory import name
```

Unique name that identifies the shared memory block.

---
## size
```python
from shared_memory import size
```

Size in bytes.

---
## close
```python
from shared_memory import close
```

Closes access to the shared memory from this instance but does
not destroy the shared memory block.

---
## unlink
```python
from shared_memory import unlink
```

Requests that the underlying shared memory block be destroyed.

In order to ensure proper cleanup of resources, unlink should be
called once (and only once) across all processes which have access
to the shared memory block.

---
## _extract_recreation_code
```python
from shared_memory import _extract_recreation_code
```

Used in concert with _back_transforms_mapping to convert values
into the appropriate Python objects when retrieving them from
the list as well as when storing them.

---
## _get_packing_format
```python
from shared_memory import _get_packing_format
```

Gets the packing format for a single value stored in the list.

---
## _get_back_transform
```python
from shared_memory import _get_back_transform
```

Gets the back transformation function for a single value.

---
## _set_packing_format_and_transform
```python
from shared_memory import _set_packing_format_and_transform
```

Sets the packing format and back transformation code for a
single value in the list at the specified position.

---
## __getitem__
```python
from shared_memory import __getitem__
```



---
## __setitem__
```python
from shared_memory import __setitem__
```



---
## __len__
```python
from shared_memory import __len__
```



---
## format
```python
from shared_memory import format
```

The struct packing format used by all currently stored items.

---
## _format_size_metainfo
```python
from shared_memory import _format_size_metainfo
```

The struct packing format used for the items' storage offsets.

---
## _format_packing_metainfo
```python
from shared_memory import _format_packing_metainfo
```

The struct packing format used for the items' packing formats.

---
## _format_back_transform_codes
```python
from shared_memory import _format_back_transform_codes
```

The struct packing format used for the items' back transforms.

---
## _offset_data_start
```python
from shared_memory import _offset_data_start
```



---
## _offset_packing_formats
```python
from shared_memory import _offset_packing_formats
```



---
## _offset_back_transform_codes
```python
from shared_memory import _offset_back_transform_codes
```



---
## count
```python
from shared_memory import count
```

L.count(value) -> integer -- return number of occurrences of value.

---
## index
```python
from shared_memory import index
```

L.index(value) -> integer -- return first index of value.
Raises ValueError if the value is not present.

---
## __name__
```python
from resource_tracker import __name__
```



---
## ReentrantCallError
```python
from resource_tracker import ReentrantCallError
```



---
## ResourceTracker
```python
from resource_tracker import ResourceTracker
```



---
## main
```python
from resource_tracker import main
```

Run resource tracker.

---
## __init__
```python
from resource_tracker import __init__
```



---
## _reentrant_call_error
```python
from resource_tracker import _reentrant_call_error
```



---
## _stop
```python
from resource_tracker import _stop
```



---
## getfd
```python
from resource_tracker import getfd
```



---
## ensure_running
```python
from resource_tracker import ensure_running
```

Make sure that resource tracker process is running.

This can be run from any process.  Usually a child process will use
the resource created by its parent.

---
## _check_alive
```python
from resource_tracker import _check_alive
```

Check that the pipe has not been closed by sending a probe.

---
## register
```python
from resource_tracker import register
```

Register name of resource with resource tracker.

---
## unregister
```python
from resource_tracker import unregister
```

Unregister name of resource with resource tracker.

---
## _send
```python
from resource_tracker import _send
```



---
## __name__
```python
from reduction import __name__
```



---
## ForkingPickler
```python
from reduction import ForkingPickler
```

Pickler subclass used by multiprocess.

---
## dump
```python
from reduction import dump
```

Replacement for pickle.dump() using ForkingPickler.

---
## _reduce_method
```python
from reduction import _reduce_method
```



---
## _C
```python
from reduction import _C
```



---
## _reduce_method_descriptor
```python
from reduction import _reduce_method_descriptor
```



---
## _reduce_partial
```python
from reduction import _reduce_partial
```



---
## _rebuild_partial
```python
from reduction import _rebuild_partial
```



---
## AbstractReducer
```python
from reduction import AbstractReducer
```

Abstract base class for use in implementing a Reduction class
suitable for use in replacing the standard reduction mechanism
used in multiprocess.

---
## __init__
```python
from reduction import __init__
```



---
## register
```python
from reduction import register
```

Register a reduce function for a type.

---
## dumps
```python
from reduction import dumps
```



---
## duplicate
```python
from reduction import duplicate
```

Duplicate a handle.  (target_process is a handle not a pid!)

---
## steal_handle
```python
from reduction import steal_handle
```

Steal a handle from process identified by source_pid.

---
## send_handle
```python
from reduction import send_handle
```

Send a handle over a local connection.

---
## recv_handle
```python
from reduction import recv_handle
```

Receive a handle over a local connection.

---
## DupHandle
```python
from reduction import DupHandle
```

Picklable wrapper for a handle.

---
## sendfds
```python
from reduction import sendfds
```

Send an array of fds over an AF_UNIX socket.

---
## recvfds
```python
from reduction import recvfds
```

Receive an array of fds over an AF_UNIX socket.

---
## DupFd
```python
from reduction import DupFd
```

Return a wrapper for an fd.

---
## f
```python
from reduction import f
```



---
## _reduce_socket
```python
from reduction import _reduce_socket
```



---
## _rebuild_socket
```python
from reduction import _rebuild_socket
```



---
## detach
```python
from reduction import detach
```

Get the handle.  This should only be called once.

---
## __name__
```python
from util import __name__
```

Utility functions for testing

---
## sub_debug
```python
from util import sub_debug
```



---
## debug
```python
from util import debug
```



---
## info
```python
from util import info
```



---
## sub_warning
```python
from util import sub_warning
```



---
## get_logger
```python
from util import get_logger
```

Returns logger used by multiprocess

---
## log_to_stderr
```python
from util import log_to_stderr
```

Turn on logging and add a handler which prints to stderr

---
## _platform_supports_abstract_sockets
```python
from util import _platform_supports_abstract_sockets
```



---
## is_abstract_socket_namespace
```python
from util import is_abstract_socket_namespace
```



---
## _remove_temp_dir
```python
from util import _remove_temp_dir
```



---
## get_temp_dir
```python
from util import get_temp_dir
```



---
## _run_after_forkers
```python
from util import _run_after_forkers
```



---
## register_after_fork
```python
from util import register_after_fork
```



---
## Finalize
```python
from util import Finalize
```

Class which supports object finalization using weakrefs

---
## _run_finalizers
```python
from util import _run_finalizers
```

Run all finalizers whose exit priority is not None and at least minpriority

Finalizers with highest priority are called first; finalizers with
the same priority will be called in reverse order of creation.

---
## is_exiting
```python
from util import is_exiting
```

Returns true if the process is shutting down

---
## _exit_function
```python
from util import _exit_function
```



---
## ForkAwareThreadLock
```python
from util import ForkAwareThreadLock
```



---
## ForkAwareLocal
```python
from util import ForkAwareLocal
```



---
## close_all_fds_except
```python
from util import close_all_fds_except
```



---
## _close_stdin
```python
from util import _close_stdin
```



---
## _flush_std_streams
```python
from util import _flush_std_streams
```



---
## spawnv_passfds
```python
from util import spawnv_passfds
```



---
## close_fds
```python
from util import close_fds
```

Close each file descriptor given as an argument

---
## _cleanup_tests
```python
from util import _cleanup_tests
```

Cleanup multiprocessing resources when multiprocessing tests
completed.

---
## __init__
```python
from util import __init__
```



---
## __call__
```python
from util import __call__
```

Apply highlighting to the given source.

---
## cancel
```python
from util import cancel
```

Cancel finalization of the object

---
## still_active
```python
from util import still_active
```

Return whether this finalizer is still waiting to invoke callback

---
## __repr__
```python
from util import __repr__
```



---
## _at_fork_reinit
```python
from util import _at_fork_reinit
```



---
## __enter__
```python
from util import __enter__
```



---
## __exit__
```python
from util import __exit__
```



---
## __reduce__
```python
from util import __reduce__
```



---
## __name__
```python
from popen_spawn_win32 import __name__
```



---
## _path_eq
```python
from popen_spawn_win32 import _path_eq
```



---
## _close_handles
```python
from popen_spawn_win32 import _close_handles
```



---
## Popen
```python
from popen_spawn_win32 import Popen
```

Start a subprocess to run the code of a process object

---
## __init__
```python
from popen_spawn_win32 import __init__
```



---
## duplicate_for_child
```python
from popen_spawn_win32 import duplicate_for_child
```



---
## wait
```python
from popen_spawn_win32 import wait
```



---
## poll
```python
from popen_spawn_win32 import poll
```



---
## terminate
```python
from popen_spawn_win32 import terminate
```



---
## close
```python
from popen_spawn_win32 import close
```



---
## license
```python
from __init__ import license
```

print license

---
## citation
```python
from __init__ import citation
```

print citation

---
## __name__
```python
from forkserver import __name__
```



---
## ForkServer
```python
from forkserver import ForkServer
```



---
## main
```python
from forkserver import main
```

Run forkserver.

---
## _serve_one
```python
from forkserver import _serve_one
```



---
## read_signed
```python
from forkserver import read_signed
```



---
## write_signed
```python
from forkserver import write_signed
```



---
## __init__
```python
from forkserver import __init__
```



---
## _stop
```python
from forkserver import _stop
```



---
## _stop_unlocked
```python
from forkserver import _stop_unlocked
```



---
## set_forkserver_preload
```python
from forkserver import set_forkserver_preload
```

Set list of module names to try to load in forkserver process.

---
## get_inherited_fds
```python
from forkserver import get_inherited_fds
```

Return list of fds inherited from parent process.

This returns None if the current process was not started by fork
server.

---
## connect_to_new_process
```python
from forkserver import connect_to_new_process
```

Request forkserver to create a child process.

Returns a pair of fds (status_r, data_w).  The calling process can read
the child process's pid and (eventually) its returncode from status_r.
The calling process should write to data_w the pickled preparation and
process data.

---
## ensure_running
```python
from forkserver import ensure_running
```

Make sure that a fork server is running.

This can be called from any process.  Note that usually a child
process will just reuse the forkserver started by its parent, so
ensure_running() will do nothing.

---
## sigchld_handler
```python
from forkserver import sigchld_handler
```



---
## __name__
```python
from connection import __name__
```



---
## _init_timeout
```python
from connection import _init_timeout
```



---
## _check_timeout
```python
from connection import _check_timeout
```



---
## arbitrary_address
```python
from connection import arbitrary_address
```

Return an arbitrary free address for the given family

---
## _validate_family
```python
from connection import _validate_family
```

Checks if the family is valid for the current environment.

---
## address_type
```python
from connection import address_type
```

Return the types of the address

This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE'

---
## _ConnectionBase
```python
from connection import _ConnectionBase
```



---
## Connection
```python
from connection import Connection
```

Threaded implementation of a WebSocket connection.

:class:`Connection` provides APIs shared between WebSocket servers and
clients.

You shouldn't use it directly. Instead, use
:class:`~websockets.sync.client.ClientConnection` or
:class:`~websockets.sync.server.ServerConnection`.

---
## Listener
```python
from connection import Listener
```



---
## Client
```python
from connection import Client
```



---
## SocketListener
```python
from connection import SocketListener
```

Representation of a socket which is bound to an address and listening

---
## SocketClient
```python
from connection import SocketClient
```

Return a connection object connected to the socket given by `address`

---
## _get_digest_name_and_payload
```python
from connection import _get_digest_name_and_payload
```

Returns a digest name and the payload for a response hash.

If a legacy protocol is detected based on the message length
or contents the digest name returned will be empty to indicate
legacy mode where MD5 and no digest prefix should be sent.

---
## _create_response
```python
from connection import _create_response
```

Create a MAC based on authkey and message

The MAC algorithm defaults to HMAC-MD5, unless MD5 is not available or
the message has a '{digest_name}' prefix. For legacy HMAC-MD5, the response
is the raw MAC, otherwise the response is prefixed with '{digest_name}',
e.g. b'{sha256}abcdefg...'

Note: The MAC protects the entire message including the digest_name prefix.

---
## _verify_challenge
```python
from connection import _verify_challenge
```

Verify MAC challenge

If our message did not include a digest_name prefix, the client is allowed
to select a stronger digest_name from _ALLOWED_DIGESTS.

In case our message is prefixed, a client cannot downgrade to a weaker
algorithm, because the MAC is calculated over the entire message
including the '{digest_name}' prefix.

---
## deliver_challenge
```python
from connection import deliver_challenge
```



---
## answer_challenge
```python
from connection import answer_challenge
```



---
## ConnectionWrapper
```python
from connection import ConnectionWrapper
```



---
## _xml_dumps
```python
from connection import _xml_dumps
```



---
## _xml_loads
```python
from connection import _xml_loads
```



---
## XmlListener
```python
from connection import XmlListener
```



---
## XmlClient
```python
from connection import XmlClient
```



---
## __init__
```python
from connection import __init__
```



---
## __del__
```python
from connection import __del__
```



---
## _check_closed
```python
from connection import _check_closed
```



---
## _check_readable
```python
from connection import _check_readable
```



---
## _check_writable
```python
from connection import _check_writable
```



---
## _bad_message_length
```python
from connection import _bad_message_length
```



---
## closed
```python
from connection import closed
```

True if the connection is closed

---
## readable
```python
from connection import readable
```

True if the connection is readable

---
## writable
```python
from connection import writable
```

True if the connection is writable

---
## fileno
```python
from connection import fileno
```

File descriptor or handle of the connection

---
## close
```python
from connection import close
```



---
## send_bytes
```python
from connection import send_bytes
```

Send the bytes data from a bytes-like object

---
## send
```python
from connection import send
```

Send data to the server.
`data` can be: `str`, `bytes`, an iterable, or file-like objects
that support a .read() method.

---
## recv_bytes
```python
from connection import recv_bytes
```

Receive bytes data as a bytes object.

---
## recv_bytes_into
```python
from connection import recv_bytes_into
```

Receive bytes data into a writeable bytes-like object.
Return the number of bytes read.

---
## recv
```python
from connection import recv
```

Receive the next message.

When the connection is closed, :meth:`recv` raises
:exc:`~websockets.exceptions.ConnectionClosed`. Specifically, it raises
:exc:`~websockets.exceptions.ConnectionClosedOK` after a normal closure
and :exc:`~websockets.exceptions.ConnectionClosedError` after a protocol
error or a network failure. This is how you detect the end of the
message stream.

If ``timeout`` is :obj:`None`, block until a message is received. If
``timeout`` is set and no message is received within ``timeout``
seconds, raise :exc:`TimeoutError`. Set ``timeout`` to ``0`` to check if
a message was already received.

If the message is fragmented, wait until all fragments are received,
reassemble them, and return the whole message.

Returns:
    A string (:class:`str`) for a Text_ frame or a bytestring
    (:class:`bytes`) for a Binary_ frame.

    .. _Text: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6
    .. _Binary: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6

Raises:
    ConnectionClosed: When the connection is closed.
    RuntimeError: If two threads call :meth:`recv` or
        :meth:`recv_streaming` concurrently.

---
## poll
```python
from connection import poll
```



---
## __enter__
```python
from connection import __enter__
```



---
## __exit__
```python
from connection import __exit__
```



---
## PipeConnection
```python
from connection import PipeConnection
```

Connection class based on a Windows named pipe.
Overlapped I/O is used, so the handles must have been created
with FILE_FLAG_OVERLAPPED.

---
## _send
```python
from connection import _send
```



---
## _recv
```python
from connection import _recv
```



---
## _send_bytes
```python
from connection import _send_bytes
```



---
## _recv_bytes
```python
from connection import _recv_bytes
```



---
## _poll
```python
from connection import _poll
```



---
## accept
```python
from connection import accept
```



---
## address
```python
from connection import address
```



---
## last_accepted
```python
from connection import last_accepted
```



---
## Pipe
```python
from connection import Pipe
```



---
## PipeListener
```python
from connection import PipeListener
```

Representation of a named pipe

---
## PipeClient
```python
from connection import PipeClient
```

Return a connection object connected to the pipe given by `address`

---
## _exhaustive_wait
```python
from connection import _exhaustive_wait
```



---
## wait
```python
from connection import wait
```

Wait till an object in object_list is ready/readable.

Returns list of those objects in object_list which are ready/readable.

---
## reduce_connection
```python
from connection import reduce_connection
```



---
## rebuild_connection
```python
from connection import rebuild_connection
```



---
## reduce_pipe_connection
```python
from connection import reduce_pipe_connection
```



---
## rebuild_pipe_connection
```python
from connection import rebuild_pipe_connection
```



---
## _close
```python
from connection import _close
```



---
## _get_more_data
```python
from connection import _get_more_data
```



---
## _new_handle
```python
from connection import _new_handle
```



---
## _finalize_pipe_listener
```python
from connection import _finalize_pipe_listener
```



---
## __name__
```python
from context import __name__
```

Helpers that store information about functions and the related classes.

---
## ProcessError
```python
from context import ProcessError
```



---
## BufferTooShort
```python
from context import BufferTooShort
```



---
## TimeoutError
```python
from context import TimeoutError
```



---
## AuthenticationError
```python
from context import AuthenticationError
```



---
## BaseContext
```python
from context import BaseContext
```



---
## Process
```python
from context import Process
```



---
## DefaultContext
```python
from context import DefaultContext
```



---
## _force_start_method
```python
from context import _force_start_method
```



---
## get_spawning_popen
```python
from context import get_spawning_popen
```



---
## set_spawning_popen
```python
from context import set_spawning_popen
```



---
## assert_spawning
```python
from context import assert_spawning
```



---
## cpu_count
```python
from context import cpu_count
```

Returns the number of CPUs in the system

---
## Manager
```python
from context import Manager
```

Returns a manager associated with a running server process

The managers methods such as `Lock()`, `Condition()` and `Queue()`
can be used to create shared objects.

---
## Pipe
```python
from context import Pipe
```

Returns two connection object connected by a pipe

---
## Lock
```python
from context import Lock
```

Returns a non-recursive lock object

---
## RLock
```python
from context import RLock
```

Returns a recursive lock object

---
## Condition
```python
from context import Condition
```

Returns a condition object

---
## Semaphore
```python
from context import Semaphore
```

Returns a semaphore object

---
## BoundedSemaphore
```python
from context import BoundedSemaphore
```

Returns a bounded semaphore object

---
## Event
```python
from context import Event
```

Returns an event object

---
## Barrier
```python
from context import Barrier
```

Returns a barrier object

---
## Queue
```python
from context import Queue
```

Returns a queue object

---
## JoinableQueue
```python
from context import JoinableQueue
```

Returns a queue object

---
## SimpleQueue
```python
from context import SimpleQueue
```

Returns a queue object

---
## Pool
```python
from context import Pool
```

Returns a process pool object

---
## RawValue
```python
from context import RawValue
```

Returns a shared object

---
## RawArray
```python
from context import RawArray
```

Returns a shared array

---
## Value
```python
from context import Value
```

Returns a synchronized shared object

---
## Array
```python
from context import Array
```

Returns a synchronized shared array

---
## freeze_support
```python
from context import freeze_support
```

Check whether this is a fake forked process in a frozen executable.
If so then run code specified by commandline and exit.

---
## get_logger
```python
from context import get_logger
```

Return package logger -- if it does not already exist then
it is created.

---
## log_to_stderr
```python
from context import log_to_stderr
```

Turn on logging and add a handler which prints to stderr

---
## allow_connection_pickling
```python
from context import allow_connection_pickling
```

Install support for sending connections and sockets
between processes

---
## set_executable
```python
from context import set_executable
```

Sets the path to a python.exe or pythonw.exe binary used to run
child processes instead of sys.executable when using the 'spawn'
start method.  Useful for people embedding Python.

---
## set_forkserver_preload
```python
from context import set_forkserver_preload
```

Set list of module names to try to load in forkserver process.
This is really just a hint.

---
## get_context
```python
from context import get_context
```



---
## get_start_method
```python
from context import get_start_method
```



---
## set_start_method
```python
from context import set_start_method
```



---
## reducer
```python
from context import reducer
```



---
## _check_available
```python
from context import _check_available
```



---
## _Popen
```python
from context import _Popen
```



---
## _after_fork
```python
from context import _after_fork
```



---
## __init__
```python
from context import __init__
```



---
## get_all_start_methods
```python
from context import get_all_start_methods
```

Returns a list of the supported start methods, default first.

---
## ForkProcess
```python
from context import ForkProcess
```



---
## SpawnProcess
```python
from context import SpawnProcess
```



---
## ForkServerProcess
```python
from context import ForkServerProcess
```



---
## ForkContext
```python
from context import ForkContext
```



---
## SpawnContext
```python
from context import SpawnContext
```



---
## ForkServerContext
```python
from context import ForkServerContext
```



---
## __name__
```python
from spawn import __name__
```



---
## set_executable
```python
from spawn import set_executable
```



---
## get_executable
```python
from spawn import get_executable
```



---
## is_forking
```python
from spawn import is_forking
```

Return whether commandline indicates we are forking

---
## freeze_support
```python
from spawn import freeze_support
```

Run code for process object if this in not the main process

---
## get_command_line
```python
from spawn import get_command_line
```

Returns prefix of command line used for spawning a child process

---
## spawn_main
```python
from spawn import spawn_main
```

Run code specified by data received over pipe

---
## _main
```python
from spawn import _main
```



---
## _check_not_importing_main
```python
from spawn import _check_not_importing_main
```



---
## get_preparation_data
```python
from spawn import get_preparation_data
```

Return info about parent needed by child to unpickle process object

---
## prepare
```python
from spawn import prepare
```

Try to get current process ready to unpickle process object

---
## _fixup_main_from_name
```python
from spawn import _fixup_main_from_name
```



---
## _fixup_main_from_path
```python
from spawn import _fixup_main_from_path
```



---
## import_main_path
```python
from spawn import import_main_path
```

Set sys.modules['__main__'] to module at main_path

---
## __name__
```python
from synchronize import __name__
```



---
## SemLock
```python
from synchronize import SemLock
```



---
## Semaphore
```python
from synchronize import Semaphore
```



---
## BoundedSemaphore
```python
from synchronize import BoundedSemaphore
```



---
## Lock
```python
from synchronize import Lock
```



---
## RLock
```python
from synchronize import RLock
```



---
## Condition
```python
from synchronize import Condition
```



---
## Event
```python
from synchronize import Event
```



---
## Barrier
```python
from synchronize import Barrier
```



---
## __init__
```python
from synchronize import __init__
```



---
## _cleanup
```python
from synchronize import _cleanup
```



---
## _make_methods
```python
from synchronize import _make_methods
```



---
## __enter__
```python
from synchronize import __enter__
```



---
## __exit__
```python
from synchronize import __exit__
```



---
## __getstate__
```python
from synchronize import __getstate__
```



---
## __setstate__
```python
from synchronize import __setstate__
```



---
## _make_name
```python
from synchronize import _make_name
```



---
## get_value
```python
from synchronize import get_value
```



---
## __repr__
```python
from synchronize import __repr__
```



---
## wait
```python
from synchronize import wait
```



---
## notify
```python
from synchronize import notify
```



---
## notify_all
```python
from synchronize import notify_all
```



---
## wait_for
```python
from synchronize import wait_for
```



---
## is_set
```python
from synchronize import is_set
```



---
## set
```python
from synchronize import set
```



---
## clear
```python
from synchronize import clear
```



---
## _state
```python
from synchronize import _state
```



---
## _count
```python
from synchronize import _count
```



---
## _after_fork
```python
from synchronize import _after_fork
```



---
## __name__
```python
from process import __name__
```



---
## current_process
```python
from process import current_process
```

Return process object representing the current process

---
## active_children
```python
from process import active_children
```

Return list of process objects corresponding to live child processes

---
## parent_process
```python
from process import parent_process
```

Return process object representing the parent process

---
## _cleanup
```python
from process import _cleanup
```



---
## BaseProcess
```python
from process import BaseProcess
```

Process objects represent activity that is run in a separate process

The class is analogous to `threading.Thread`

---
## AuthenticationString
```python
from process import AuthenticationString
```



---
## _ParentProcess
```python
from process import _ParentProcess
```



---
## _MainProcess
```python
from process import _MainProcess
```



---
## _Popen
```python
from process import _Popen
```



---
## __init__
```python
from process import __init__
```



---
## _check_closed
```python
from process import _check_closed
```



---
## run
```python
from process import run
```

Method to be run in sub-process; can be overridden in sub-class

---
## start
```python
from process import start
```

Start child process

---
## terminate
```python
from process import terminate
```

Terminate process; sends SIGTERM signal or uses TerminateProcess()

---
## kill
```python
from process import kill
```

Terminate process; sends SIGKILL signal or uses TerminateProcess()

---
## join
```python
from process import join
```

Wait until parent process terminates

---
## is_alive
```python
from process import is_alive
```



---
## close
```python
from process import close
```



---
## name
```python
from process import name
```



---
## daemon
```python
from process import daemon
```

Set whether process is a daemon

---
## authkey
```python
from process import authkey
```

Set authorization key of process

---
## exitcode
```python
from process import exitcode
```

Return exit code of process or `None` if it has yet to stop

---
## ident
```python
from process import ident
```



---
## sentinel
```python
from process import sentinel
```

Return a file descriptor (Unix) or handle (Windows) suitable for
waiting for process termination.

---
## __repr__
```python
from process import __repr__
```



---
## _bootstrap
```python
from process import _bootstrap
```



---
## _after_fork
```python
from process import _after_fork
```



---
## __reduce__
```python
from process import __reduce__
```



---
## __name__
```python
from sharedctypes import __name__
```



---
## _new_value
```python
from sharedctypes import _new_value
```



---
## RawValue
```python
from sharedctypes import RawValue
```

Returns a ctypes object allocated from shared memory

---
## RawArray
```python
from sharedctypes import RawArray
```

Returns a ctypes array allocated from shared memory

---
## Value
```python
from sharedctypes import Value
```

Return a synchronization wrapper for a Value

---
## Array
```python
from sharedctypes import Array
```

Return a synchronization wrapper for a RawArray

---
## copy
```python
from sharedctypes import copy
```



---
## synchronized
```python
from sharedctypes import synchronized
```



---
## reduce_ctype
```python
from sharedctypes import reduce_ctype
```



---
## rebuild_ctype
```python
from sharedctypes import rebuild_ctype
```



---
## make_property
```python
from sharedctypes import make_property
```



---
## SynchronizedBase
```python
from sharedctypes import SynchronizedBase
```



---
## Synchronized
```python
from sharedctypes import Synchronized
```



---
## SynchronizedArray
```python
from sharedctypes import SynchronizedArray
```



---
## SynchronizedString
```python
from sharedctypes import SynchronizedString
```



---
## __init__
```python
from sharedctypes import __init__
```



---
## __enter__
```python
from sharedctypes import __enter__
```



---
## __exit__
```python
from sharedctypes import __exit__
```



---
## __reduce__
```python
from sharedctypes import __reduce__
```



---
## get_obj
```python
from sharedctypes import get_obj
```



---
## get_lock
```python
from sharedctypes import get_lock
```



---
## __repr__
```python
from sharedctypes import __repr__
```



---
## __len__
```python
from sharedctypes import __len__
```



---
## __getitem__
```python
from sharedctypes import __getitem__
```



---
## __setitem__
```python
from sharedctypes import __setitem__
```



---
## __getslice__
```python
from sharedctypes import __getslice__
```



---
## __setslice__
```python
from sharedctypes import __setslice__
```



---
## __name__
```python
from popen_fork import __name__
```



---
## Popen
```python
from popen_fork import Popen
```



---
## __init__
```python
from popen_fork import __init__
```



---
## duplicate_for_child
```python
from popen_fork import duplicate_for_child
```



---
## poll
```python
from popen_fork import poll
```



---
## wait
```python
from popen_fork import wait
```



---
## _send_signal
```python
from popen_fork import _send_signal
```



---
## terminate
```python
from popen_fork import terminate
```



---
## kill
```python
from popen_fork import kill
```



---
## _launch
```python
from popen_fork import _launch
```



---
## close
```python
from popen_fork import close
```



---
## __name__
```python
from pool import __name__
```

Module implementing the Pool for :mod:``requests_toolbelt.threaded``.

---
## mapstar
```python
from pool import mapstar
```



---
## starmapstar
```python
from pool import starmapstar
```



---
## RemoteTraceback
```python
from pool import RemoteTraceback
```



---
## ExceptionWithTraceback
```python
from pool import ExceptionWithTraceback
```



---
## rebuild_exc
```python
from pool import rebuild_exc
```



---
## MaybeEncodingError
```python
from pool import MaybeEncodingError
```

Wraps possible unpickleable errors, so they can be
safely sent through the socket.

---
## worker
```python
from pool import worker
```



---
## _helper_reraises_exception
```python
from pool import _helper_reraises_exception
```

Pickle-able helper function for use by _guarded_task_generation.

---
## _PoolCache
```python
from pool import _PoolCache
```

Class that implements a cache for the Pool class that will notify
the pool management threads every time the cache is emptied. The
notification is done by the use of a queue that is provided when
instantiating the cache.

---
## Pool
```python
from pool import Pool
```

Pool that manages the threads containing sessions.

:param queue:
    The queue you're expected to use to which you should add items.
:type queue: queue.Queue
:param initializer:
    Function used to initialize an instance of ``session``.
:type initializer: collections.Callable
:param auth_generator:
    Function used to generate new auth credentials for the session.
:type auth_generator: collections.Callable
:param int num_process:
    Number of threads to create.
:param session:
:type session: requests.Session

---
## ApplyResult
```python
from pool import ApplyResult
```



---
## MapResult
```python
from pool import MapResult
```



---
## IMapIterator
```python
from pool import IMapIterator
```



---
## IMapUnorderedIterator
```python
from pool import IMapUnorderedIterator
```



---
## ThreadPool
```python
from pool import ThreadPool
```



---
## __init__
```python
from pool import __init__
```



---
## __str__
```python
from pool import __str__
```



---
## __reduce__
```python
from pool import __reduce__
```



---
## __repr__
```python
from pool import __repr__
```



---
## __delitem__
```python
from pool import __delitem__
```



---
## Process
```python
from pool import Process
```



---
## __del__
```python
from pool import __del__
```



---
## _get_sentinels
```python
from pool import _get_sentinels
```



---
## _get_worker_sentinels
```python
from pool import _get_worker_sentinels
```



---
## _join_exited_workers
```python
from pool import _join_exited_workers
```

Cleanup after any worker processes which have exited due to reaching
their specified lifetime.  Returns True if any workers were cleaned up.

---
## _repopulate_pool
```python
from pool import _repopulate_pool
```



---
## _repopulate_pool_static
```python
from pool import _repopulate_pool_static
```

Bring the number of pool processes up to the specified number,
for use after reaping workers which have exited.

---
## _maintain_pool
```python
from pool import _maintain_pool
```

Clean up any exited workers and start replacements for them.
        

---
## _setup_queues
```python
from pool import _setup_queues
```



---
## _check_running
```python
from pool import _check_running
```



---
## apply
```python
from pool import apply
```

Equivalent of `func(*args, **kwds)`.
Pool must be running.

---
## map
```python
from pool import map
```

Apply `func` to each element in `iterable`, collecting the results
in a list that is returned.

---
## starmap
```python
from pool import starmap
```

Like `map()` method but the elements of the `iterable` are expected to
be iterables as well and will be unpacked as arguments. Hence
`func` and (a, b) becomes func(a, b).

---
## starmap_async
```python
from pool import starmap_async
```

Asynchronous version of `starmap()` method.

---
## _guarded_task_generation
```python
from pool import _guarded_task_generation
```

Provides a generator of tasks for imap and imap_unordered with
appropriate handling for iterables which throw exceptions during
iteration.

---
## imap
```python
from pool import imap
```

Equivalent of `map()` -- can be MUCH slower than `Pool.map()`.

---
## imap_unordered
```python
from pool import imap_unordered
```

Like `imap()` method but ordering of results is arbitrary.

---
## apply_async
```python
from pool import apply_async
```

Asynchronous version of `apply()` method.

---
## map_async
```python
from pool import map_async
```

Asynchronous version of `map()` method.

---
## _map_async
```python
from pool import _map_async
```

Helper function to implement map, starmap and their async counterparts.

---
## _wait_for_updates
```python
from pool import _wait_for_updates
```



---
## _handle_workers
```python
from pool import _handle_workers
```



---
## _handle_tasks
```python
from pool import _handle_tasks
```



---
## _handle_results
```python
from pool import _handle_results
```



---
## _get_tasks
```python
from pool import _get_tasks
```



---
## close
```python
from pool import close
```



---
## terminate
```python
from pool import terminate
```



---
## join
```python
from pool import join
```



---
## _help_stuff_finish
```python
from pool import _help_stuff_finish
```



---
## _terminate_pool
```python
from pool import _terminate_pool
```



---
## __enter__
```python
from pool import __enter__
```



---
## __exit__
```python
from pool import __exit__
```



---
## ready
```python
from pool import ready
```



---
## successful
```python
from pool import successful
```



---
## wait
```python
from pool import wait
```



---
## get
```python
from pool import get
```



---
## _set
```python
from pool import _set
```



---
## __iter__
```python
from pool import __iter__
```



---
## next
```python
from pool import next
```



---
## _set_length
```python
from pool import _set_length
```



---
## __name__
```python
from popen_forkserver import __name__
```



---
## _DupFd
```python
from popen_forkserver import _DupFd
```



---
## Popen
```python
from popen_forkserver import Popen
```



---
## __init__
```python
from popen_forkserver import __init__
```



---
## detach
```python
from popen_forkserver import detach
```



---
## duplicate_for_child
```python
from popen_forkserver import duplicate_for_child
```



---
## _launch
```python
from popen_forkserver import _launch
```



---
## poll
```python
from popen_forkserver import poll
```



---
## __name__
```python
from popen_spawn_posix import __name__
```



---
## _DupFd
```python
from popen_spawn_posix import _DupFd
```



---
## Popen
```python
from popen_spawn_posix import Popen
```



---
## __init__
```python
from popen_spawn_posix import __init__
```



---
## detach
```python
from popen_spawn_posix import detach
```



---
## duplicate_for_child
```python
from popen_spawn_posix import duplicate_for_child
```



---
## _launch
```python
from popen_spawn_posix import _launch
```



---
## __name__
```python
from managers import __name__
```



---
## reduce_array
```python
from managers import reduce_array
```



---
## rebuild_as_list
```python
from managers import rebuild_as_list
```



---
## Token
```python
from managers import Token
```

Type to uniquely identify a shared object

---
## dispatch
```python
from managers import dispatch
```

Send a message to manager using connection `c` and return response

---
## convert_to_error
```python
from managers import convert_to_error
```



---
## RemoteError
```python
from managers import RemoteError
```



---
## all_methods
```python
from managers import all_methods
```

Return a list of names of methods of `obj`

---
## public_methods
```python
from managers import public_methods
```

Return a list of names of methods of `obj` which do not start with '_'

---
## Server
```python
from managers import Server
```

Server class which runs in a process controlled by a manager object

---
## State
```python
from managers import State
```



---
## BaseManager
```python
from managers import BaseManager
```

Base class for managers

---
## ProcessLocalSet
```python
from managers import ProcessLocalSet
```



---
## BaseProxy
```python
from managers import BaseProxy
```

A base for proxies of shared objects

---
## RebuildProxy
```python
from managers import RebuildProxy
```

Function used for unpickling proxy objects.

---
## MakeProxyType
```python
from managers import MakeProxyType
```

Return a proxy type whose methods are given by `exposed`

---
## AutoProxy
```python
from managers import AutoProxy
```

Return an auto-proxy for `token`

---
## Namespace
```python
from managers import Namespace
```



---
## Value
```python
from managers import Value
```



---
## Array
```python
from managers import Array
```



---
## IteratorProxy
```python
from managers import IteratorProxy
```



---
## AcquirerProxy
```python
from managers import AcquirerProxy
```



---
## ConditionProxy
```python
from managers import ConditionProxy
```



---
## EventProxy
```python
from managers import EventProxy
```



---
## BarrierProxy
```python
from managers import BarrierProxy
```



---
## NamespaceProxy
```python
from managers import NamespaceProxy
```



---
## ValueProxy
```python
from managers import ValueProxy
```



---
## ListProxy
```python
from managers import ListProxy
```



---
## PoolProxy
```python
from managers import PoolProxy
```



---
## SyncManager
```python
from managers import SyncManager
```

Subclass of `BaseManager` which supports a number of shared object types.

The types registered are those intended for the synchronization
of threads, plus `dict`, `list` and `Namespace`.

The `multiprocess.Manager()` function creates started instances of
this class.

---
## __init__
```python
from managers import __init__
```



---
## __getstate__
```python
from managers import __getstate__
```



---
## __setstate__
```python
from managers import __setstate__
```



---
## __repr__
```python
from managers import __repr__
```



---
## __str__
```python
from managers import __str__
```

Return representation of the referent (or a fall-back if that fails)

---
## serve_forever
```python
from managers import serve_forever
```

Run the server forever

---
## accepter
```python
from managers import accepter
```



---
## _handle_request
```python
from managers import _handle_request
```



---
## handle_request
```python
from managers import handle_request
```

Handle a new connection

---
## serve_client
```python
from managers import serve_client
```

Handle requests from the proxies in a particular process/thread

---
## fallback_getvalue
```python
from managers import fallback_getvalue
```



---
## fallback_str
```python
from managers import fallback_str
```



---
## fallback_repr
```python
from managers import fallback_repr
```



---
## dummy
```python
from managers import dummy
```



---
## debug_info
```python
from managers import debug_info
```

Return some info --- useful to spot problems with refcounting

---
## number_of_objects
```python
from managers import number_of_objects
```

Number of shared objects

---
## shutdown
```python
from managers import shutdown
```

Call unlink() on all tracked shared memory, terminate the Server.

---
## create
```python
from managers import create
```

Create a new distributed-shared object (not backed by a shared
memory block) and return its id to be used in a Proxy Object.

---
## get_methods
```python
from managers import get_methods
```

Return the methods of the shared object indicated by token

---
## accept_connection
```python
from managers import accept_connection
```

Spawn a new thread to serve this connection

---
## incref
```python
from managers import incref
```



---
## decref
```python
from managers import decref
```



---
## get_server
```python
from managers import get_server
```

Better than monkeypatching for now; merge into Server ultimately

---
## connect
```python
from managers import connect
```

Connect manager object to the server process

---
## start
```python
from managers import start
```

Spawn a server process for this manager object

---
## _run_server
```python
from managers import _run_server
```

Create a server, report its address and run it

---
## _create
```python
from managers import _create
```

Create a new shared object; return the token and exposed tuple

---
## join
```python
from managers import join
```

Join the manager process (if it has been spawned)

---
## _debug_info
```python
from managers import _debug_info
```

Return some info about the servers shared objects and connections

---
## _number_of_objects
```python
from managers import _number_of_objects
```

Return the number of shared objects

---
## __enter__
```python
from managers import __enter__
```



---
## __exit__
```python
from managers import __exit__
```



---
## _finalize_manager
```python
from managers import _finalize_manager
```

Shutdown the manager process; will be registered as a finalizer

---
## address
```python
from managers import address
```



---
## register
```python
from managers import register
```

Register a typeid with the manager type

---
## __reduce__
```python
from managers import __reduce__
```



---
## _connect
```python
from managers import _connect
```



---
## _callmethod
```python
from managers import _callmethod
```

Try to call a method of the referent and return a copy of the result

---
## _getvalue
```python
from managers import _getvalue
```

Get a copy of the value of the referent

---
## _incref
```python
from managers import _incref
```



---
## _decref
```python
from managers import _decref
```



---
## _after_fork
```python
from managers import _after_fork
```



---
## __deepcopy__
```python
from managers import __deepcopy__
```



---
## get
```python
from managers import get
```



---
## set
```python
from managers import set
```



---
## __iter__
```python
from managers import __iter__
```



---
## __next__
```python
from managers import __next__
```



---
## send
```python
from managers import send
```



---
## throw
```python
from managers import throw
```



---
## close
```python
from managers import close
```



---
## acquire
```python
from managers import acquire
```



---
## release
```python
from managers import release
```



---
## wait
```python
from managers import wait
```



---
## notify
```python
from managers import notify
```



---
## notify_all
```python
from managers import notify_all
```



---
## wait_for
```python
from managers import wait_for
```



---
## is_set
```python
from managers import is_set
```



---
## clear
```python
from managers import clear
```



---
## abort
```python
from managers import abort
```



---
## reset
```python
from managers import reset
```



---
## parties
```python
from managers import parties
```



---
## n_waiting
```python
from managers import n_waiting
```



---
## broken
```python
from managers import broken
```



---
## __getattr__
```python
from managers import __getattr__
```



---
## __setattr__
```python
from managers import __setattr__
```



---
## __delattr__
```python
from managers import __delattr__
```



---
## __iadd__
```python
from managers import __iadd__
```



---
## __imul__
```python
from managers import __imul__
```



---
## _SharedMemoryTracker
```python
from managers import _SharedMemoryTracker
```

Manages one or more shared memory segments.

---
## SharedMemoryServer
```python
from managers import SharedMemoryServer
```



---
## SharedMemoryManager
```python
from managers import SharedMemoryManager
```

Like SyncManager but uses SharedMemoryServer instead of Server.

It provides methods for creating and returning SharedMemory instances
and for creating a list-like object (ShareableList) backed by shared
memory.  It also provides methods that create and return Proxy Objects
that support synchronization across processes (i.e. multi-process-safe
locks and semaphores).

---
## register_segment
```python
from managers import register_segment
```

Adds the supplied shared memory block name to tracker.

---
## destroy_segment
```python
from managers import destroy_segment
```

Calls unlink() on the shared memory block with the supplied name
and removes it from the list of blocks being tracked.

---
## unlink
```python
from managers import unlink
```

Calls destroy_segment() on all tracked shared memory blocks.

---
## __del__
```python
from managers import __del__
```



---
## track_segment
```python
from managers import track_segment
```

Adds the supplied shared memory block name to Server's tracker.

---
## release_segment
```python
from managers import release_segment
```

Calls unlink() on the shared memory block with the supplied name
and removes it from the tracker instance inside the Server.

---
## list_segments
```python
from managers import list_segments
```

Returns a list of names of shared memory blocks that the Server
is currently tracking.

---
## SharedMemory
```python
from managers import SharedMemory
```

Returns a new SharedMemory instance with the specified size in
bytes, to be tracked by the manager.

---
## ShareableList
```python
from managers import ShareableList
```

Returns a new ShareableList instance populated with the values
from the input sequence, to be tracked by the manager.

---
## temp
```python
from managers import temp
```



---
## __name__
```python
from resource_sharer import __name__
```



---
## _ResourceSharer
```python
from resource_sharer import _ResourceSharer
```

Manager for resources using background thread.

---
## DupSocket
```python
from resource_sharer import DupSocket
```

Picklable wrapper for a socket.

---
## DupFd
```python
from resource_sharer import DupFd
```

Wrapper for fd which can be used at any time.

---
## __init__
```python
from resource_sharer import __init__
```



---
## register
```python
from resource_sharer import register
```

Register resource, returning an identifier.

---
## get_connection
```python
from resource_sharer import get_connection
```

Return connection from which to receive identified resource.

---
## stop
```python
from resource_sharer import stop
```

Stop the background thread and clear registered resources.

---
## _afterfork
```python
from resource_sharer import _afterfork
```



---
## _start
```python
from resource_sharer import _start
```



---
## _serve
```python
from resource_sharer import _serve
```



---
## detach
```python
from resource_sharer import detach
```

Get the fd.  This should only be called once.

---
## send
```python
from resource_sharer import send
```



---
## close
```python
from resource_sharer import close
```



---
## __name__
```python
from setters import __name__
```

Commonly used hooks for on_setattr.

---
## __name__
```python
from validators import __name__
```



---
## __name__
```python
from exceptions import __name__
```



---
## __name__
```python
from converters import __name__
```

Conversion functions.

---
## __name__
```python
from filters import __name__
```



---
## __name__
```python
from modeline import __name__
```

pygments.modeline
~~~~~~~~~~~~~~~~~

A simple modeline parser (based on pymodeline).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## get_filetype_from_line
```python
from modeline import get_filetype_from_line
```



---
## get_filetype_from_buffer
```python
from modeline import get_filetype_from_buffer
```

Scan the buffer for modelines and return filetype if one is found.

---
## __name__
```python
from console import __name__
```

Internal module for console introspection

---
## reset_color
```python
from console import reset_color
```



---
## colorize
```python
from console import colorize
```



---
## ansiformat
```python
from console import ansiformat
```

Format ``text`` with a color and/or some attributes::

color       normal color
*color*     bold color
_color_     underlined color
+color+     blinking color

---
## __name__
```python
from scanner import __name__
```



---
## EndOfText
```python
from scanner import EndOfText
```

Raise if end of text is reached and the user
tried to call a match function.

---
## Scanner
```python
from scanner import Scanner
```



---
## __init__
```python
from scanner import __init__
```



---
## eos
```python
from scanner import eos
```

`True` if the scanner reached the end of text.

---
## check
```python
from scanner import check
```

Apply `pattern` on the current position and return
the match object. (Doesn't touch pos). Use this for
lookahead.

---
## test
```python
from scanner import test
```

Apply a pattern on the current position and check
if it patches. Doesn't touch pos.

---
## scan
```python
from scanner import scan
```

Scan the text for the given pattern and update pos/match
and related fields. The return value is a boolean that
indicates if the pattern matched. The matched value is
stored on the instance as ``match``, the last value is
stored as ``last``. ``start_pos`` is the position of the
pointer before the pattern was matched, ``pos`` is the
end position.

---
## get_char
```python
from scanner import get_char
```

Scan exactly one char.

---
## __repr__
```python
from scanner import __repr__
```



---
## __name__
```python
from formatter import __name__
```

pygments.formatter
~~~~~~~~~~~~~~~~~~

Base formatter class.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _lookup_style
```python
from formatter import _lookup_style
```



---
## Formatter
```python
from formatter import Formatter
```

Converts a token stream to text.

Formatters should have attributes to help selecting them. These
are similar to the corresponding :class:`~pygments.lexer.Lexer`
attributes.

.. autoattribute:: name
   :no-value:

.. autoattribute:: aliases
   :no-value:

.. autoattribute:: filenames
   :no-value:

You can pass options as keyword arguments to the constructor.
All formatters accept these basic options:

``style``
    The style to use, can be a string or a Style subclass
    (default: "default"). Not used by e.g. the
    TerminalFormatter.
``full``
    Tells the formatter to output a "full" document, i.e.
    a complete self-contained document. This doesn't have
    any effect for some formatters (default: false).
``title``
    If ``full`` is true, the title that should be used to
    caption the document (default: '').
``encoding``
    If given, must be an encoding name. This will be used to
    convert the Unicode token strings to byte strings in the
    output. If it is "" or None, Unicode strings will be written
    to the output file, which most file-like objects do not
    support (default: None).
``outencoding``
    Overrides ``encoding`` if given.

---
## __init__
```python
from formatter import __init__
```

As with lexers, this constructor takes arbitrary optional arguments,
and if you override it, you should first process your own options, then
call the base class implementation.

---
## get_style_defs
```python
from formatter import get_style_defs
```

This method must return statements or declarations suitable to define
the current style for subsequent highlighted text (e.g. CSS classes
in the `HTMLFormatter`).

The optional argument `arg` can be used to modify the generation and
is formatter dependent (it is standardized because it can be given on
the command line).

This method is called by the ``-S`` :doc:`command-line option <cmdline>`,
the `arg` is then given by the ``-a`` option.

---
## format
```python
from formatter import format
```

This method must format the tokens from the `tokensource` iterable and
write the formatted version to the file object `outfile`.

Formatter options can control how exactly the tokens are converted.

---
## __class_getitem__
```python
from formatter import __class_getitem__
```



---
## __name__
```python
from token import __name__
```

pygments.token
~~~~~~~~~~~~~~

Basic token types and the standard tokens.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _TokenType
```python
from token import _TokenType
```



---
## is_token_subtype
```python
from token import is_token_subtype
```

Return True if ``ttype`` is a subtype of ``other``.

exists for backwards compatibility. use ``ttype in other`` now.

---
## string_to_tokentype
```python
from token import string_to_tokentype
```

Convert a string into a token type::

    >>> string_to_token('String.Double')
    Token.Literal.String.Double
    >>> string_to_token('Token.Literal.Number')
    Token.Literal.Number
    >>> string_to_token('')
    Token

Tokens that are already tokens are returned unchanged:

    >>> string_to_token(String)
    Token.Literal.String

---
## split
```python
from token import split
```



---
## __init__
```python
from token import __init__
```



---
## __contains__
```python
from token import __contains__
```



---
## __getattr__
```python
from token import __getattr__
```



---
## __repr__
```python
from token import __repr__
```



---
## __copy__
```python
from token import __copy__
```



---
## __deepcopy__
```python
from token import __deepcopy__
```



---
## __name__
```python
from style import __name__
```



---
## StyleMeta
```python
from style import StyleMeta
```



---
## Style
```python
from style import Style
```

A terminal style.

A terminal style consists of a color (`color`), a background color (`bgcolor`), and a number of attributes, such
as bold, italic etc. The attributes have 3 states: they can either be on
(``True``), off (``False``), or not set (``None``).

Args:
    color (Union[Color, str], optional): Color of terminal text. Defaults to None.
    bgcolor (Union[Color, str], optional): Color of terminal background. Defaults to None.
    bold (bool, optional): Enable bold text. Defaults to None.
    dim (bool, optional): Enable dim text. Defaults to None.
    italic (bool, optional): Enable italic text. Defaults to None.
    underline (bool, optional): Enable underlined text. Defaults to None.
    blink (bool, optional): Enabled blinking text. Defaults to None.
    blink2 (bool, optional): Enable fast blinking text. Defaults to None.
    reverse (bool, optional): Enabled reverse text. Defaults to None.
    conceal (bool, optional): Enable concealed text. Defaults to None.
    strike (bool, optional): Enable strikethrough text. Defaults to None.
    underline2 (bool, optional): Enable doubly underlined text. Defaults to None.
    frame (bool, optional): Enable framed text. Defaults to None.
    encircle (bool, optional): Enable encircled text. Defaults to None.
    overline (bool, optional): Enable overlined text. Defaults to None.
    link (str, link): Link URL. Defaults to None.

---
## __new__
```python
from style import __new__
```



---
## style_for_token
```python
from style import style_for_token
```



---
## list_styles
```python
from style import list_styles
```



---
## styles_token
```python
from style import styles_token
```



---
## __iter__
```python
from style import __iter__
```



---
## __len__
```python
from style import __len__
```



---
## colorformat
```python
from style import colorformat
```



---
## ClassNotFound
```python
from util import ClassNotFound
```

Raised if one of the lookup functions didn't find a matching class.

---
## OptionError
```python
from util import OptionError
```

This exception will be raised by all option processing functions if
the type or value of the argument is not correct.

---
## get_choice_opt
```python
from util import get_choice_opt
```

If the key `optname` from the dictionary is not in the sequence
`allowed`, raise an error, otherwise return it.

---
## get_bool_opt
```python
from util import get_bool_opt
```

Intuitively, this is `options.get(optname, default)`, but restricted to
Boolean value. The Booleans can be represented as string, in order to accept
Boolean value from the command line arguments. If the key `optname` is
present in the dictionary `options` and is not associated with a Boolean,
raise an `OptionError`. If it is absent, `default` is returned instead.

The valid string values for ``True`` are ``1``, ``yes``, ``true`` and
``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
(matched case-insensitively).

---
## get_int_opt
```python
from util import get_int_opt
```

As :func:`get_bool_opt`, but interpret the value as an integer.

---
## get_list_opt
```python
from util import get_list_opt
```

If the key `optname` from the dictionary `options` is a string,
split it at whitespace and return it. If it is already a list
or a tuple, it is returned as a list.

---
## docstring_headline
```python
from util import docstring_headline
```



---
## make_analysator
```python
from util import make_analysator
```

Return a static text analyser function that returns float values.

---
## shebang_matches
```python
from util import shebang_matches
```

Check if the given regular expression matches the last part of the
shebang if one exists.

    >>> from pygments.util import shebang_matches
    >>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
    True
    >>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
    True
    >>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
    False
    >>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
    False
    >>> shebang_matches('#!/usr/bin/startsomethingwith python',
    ...                 r'python(2\.\d)?')
    True

It also checks for common windows executable file extensions::

    >>> shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')
    True

Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
the same as ``'perl -e'``)

Note that this method automatically searches the whole string (eg:
the regular expression is wrapped in ``'^$'``)

---
## doctype_matches
```python
from util import doctype_matches
```

Check if the doctype matches a regular expression (if present).

Note that this method only checks the first part of a DOCTYPE.
eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'

---
## html_doctype_matches
```python
from util import html_doctype_matches
```

Check if the file looks like it has a html doctype.

---
## looks_like_xml
```python
from util import looks_like_xml
```

Check if a doctype exists or if we have some tags.

---
## surrogatepair
```python
from util import surrogatepair
```

Given a unicode character code with length greater than 16 bits,
return the two 16 bit surrogate pair.

---
## format_lines
```python
from util import format_lines
```

Formats a sequence of strings for output.

---
## duplicates_removed
```python
from util import duplicates_removed
```

Returns a list with duplicates removed from the iterable `it`.

Order is preserved.

---
## Future
```python
from util import Future
```

Generic class to defer some work.

Handled specially in RegexLexerMeta, to support regex string construction at
first use.

---
## guess_decode
```python
from util import guess_decode
```

Decode *text* with guessed encoding.

First try UTF-8; this should fail for non-UTF-8 encodings.
Then try the preferred locale encoding.
Fall back to latin-1, which always works.

---
## guess_decode_from_terminal
```python
from util import guess_decode_from_terminal
```

Decode *text* coming from terminal *term*.

First try the terminal encoding, if given.
Then try UTF-8.  Then try the preferred locale encoding.
Fall back to latin-1, which always works.

---
## terminal_encoding
```python
from util import terminal_encoding
```

Return our best guess of encoding for the given *term*.

---
## UnclosingTextIOWrapper
```python
from util import UnclosingTextIOWrapper
```



---
## text_analyse
```python
from util import text_analyse
```



---
## get
```python
from util import get
```



---
## close
```python
from util import close
```



---
## __name__
```python
from sphinxext import __name__
```

pygments.sphinxext
~~~~~~~~~~~~~~~~~~

Sphinx extension to generate automatic documentation of lexers,
formatters and filters.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PygmentsDoc
```python
from sphinxext import PygmentsDoc
```

A directive to collect all lexers/formatters/filters and generate
autoclass directives for them.

---
## setup
```python
from sphinxext import setup
```



---
## run
```python
from sphinxext import run
```



---
## document_lexers_overview
```python
from sphinxext import document_lexers_overview
```

Generate a tabular overview of all lexers.

The columns are the lexer name, the extensions handled by this lexer
(or "None"), the aliases and a link to the lexer class.

---
## document_lexers
```python
from sphinxext import document_lexers
```



---
## document_formatters
```python
from sphinxext import document_formatters
```



---
## document_filters
```python
from sphinxext import document_filters
```



---
## format_link
```python
from sphinxext import format_link
```



---
## write_row
```python
from sphinxext import write_row
```

Format a table row

---
## write_seperator
```python
from sphinxext import write_seperator
```

Write a table separator row

---
## __name__
```python
from cmdline import __name__
```

pygments.cmdline
~~~~~~~~~~~~~~~~

Command line interface.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _parse_options
```python
from cmdline import _parse_options
```



---
## _parse_filters
```python
from cmdline import _parse_filters
```



---
## _print_help
```python
from cmdline import _print_help
```



---
## _print_list
```python
from cmdline import _print_list
```



---
## _print_list_as_json
```python
from cmdline import _print_list_as_json
```



---
## main_inner
```python
from cmdline import main_inner
```



---
## HelpFormatter
```python
from cmdline import HelpFormatter
```



---
## main
```python
from cmdline import main
```

Main command line entry point.

---
## is_only_option
```python
from cmdline import is_only_option
```



---
## __init__
```python
from cmdline import __init__
```



---
## lex
```python
from __init__ import lex
```

Lex `code` with the `lexer` (must be a `Lexer` instance)
and return an iterable of tokens. Currently, this only calls
`lexer.get_tokens()`.

---
## highlight
```python
from __init__ import highlight
```

This is the most high-level highlighting function. It combines `lex` and
`format` in one function.

---
## __name__
```python
from unistring import __name__
```

pygments.unistring
~~~~~~~~~~~~~~~~~~

Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.

Inspired by chartypes_create.py from the MoinMoin project.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## combine
```python
from unistring import combine
```



---
## allexcept
```python
from unistring import allexcept
```



---
## _handle_runs
```python
from unistring import _handle_runs
```



---
## __name__
```python
from lexer import __name__
```

pygments.lexer
~~~~~~~~~~~~~~

Base lexer classes.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LexerMeta
```python
from lexer import LexerMeta
```

This metaclass automagically converts ``analyse_text`` methods into
static methods which always return float values.

---
## Lexer
```python
from lexer import Lexer
```

Lexer for a specific language.

See also :doc:`lexerdevelopment`, a high-level guide to writing
lexers.

Lexer classes have attributes used for choosing the most appropriate
lexer based on various criteria.

.. autoattribute:: name
   :no-value:
.. autoattribute:: aliases
   :no-value:
.. autoattribute:: filenames
   :no-value:
.. autoattribute:: alias_filenames
.. autoattribute:: mimetypes
   :no-value:
.. autoattribute:: priority

Lexers included in Pygments should have two additional attributes:

.. autoattribute:: url
   :no-value:
.. autoattribute:: version_added
   :no-value:

Lexers included in Pygments may have additional attributes:

.. autoattribute:: _example
   :no-value:

You can pass options to the constructor. The basic options recognized
by all lexers and processed by the base `Lexer` class are:

``stripnl``
    Strip leading and trailing newlines from the input (default: True).
``stripall``
    Strip all leading and trailing whitespace from the input
    (default: False).
``ensurenl``
    Make sure that the input ends with a newline (default: True).  This
    is required for some lexers that consume input linewise.

    .. versionadded:: 1.3

``tabsize``
    If given and greater than 0, expand tabs in the input (default: 0).
``encoding``
    If given, must be an encoding name. This encoding will be used to
    convert the input string to Unicode, if it is not already a Unicode
    string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
    Latin1 detection.  Can also be ``'chardet'`` to use the chardet
    library, if it is installed.
``inencoding``
    Overrides the ``encoding`` if given.

---
## DelegatingLexer
```python
from lexer import DelegatingLexer
```

This lexer takes two lexer as arguments. A root lexer and
a language lexer. First everything is scanned using the language
lexer, afterwards all ``Other`` tokens are lexed using the root
lexer.

The lexers from the ``template`` lexer package use this base lexer.

---
## include
```python
from lexer import include
```

Indicates that a state should include rules from another state.

---
## _inherit
```python
from lexer import _inherit
```

Indicates the a state should inherit from its superclass.

---
## combined
```python
from lexer import combined
```

Indicates a state combined from multiple states.

---
## _PseudoMatch
```python
from lexer import _PseudoMatch
```

A pseudo match object constructed from a string.

---
## bygroups
```python
from lexer import bygroups
```

Callback that yields multiple actions for each group in the match.

---
## _This
```python
from lexer import _This
```

Special singleton used for indicating the caller class.
Used by ``using``.

---
## using
```python
from lexer import using
```

Callback that processes the match with a different lexer.

The keyword arguments are forwarded to the lexer, except `state` which
is handled separately.

`state` specifies the state that the new lexer will start in, and can
be an enumerable such as ('root', 'inline', 'string') or a simple
string which is assumed to be on top of the root state.

Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.

---
## default
```python
from lexer import default
```

Indicates a state or state action (e.g. #pop) to apply.
For example default('#pop') is equivalent to ('', Token, '#pop')
Note that state tuples may be used as well.

.. versionadded:: 2.0

---
## words
```python
from lexer import words
```

Indicates a list of literal words that is transformed into an optimized
regex that matches any of the words.

.. versionadded:: 2.0

---
## RegexLexerMeta
```python
from lexer import RegexLexerMeta
```

Metaclass for RegexLexer, creates the self._tokens attribute from
self.tokens on the first instantiation.

---
## RegexLexer
```python
from lexer import RegexLexer
```

Base for simple stateful regular expression-based lexers.
Simplifies the lexing process so that you need only
provide a list of states and regular expressions.

---
## LexerContext
```python
from lexer import LexerContext
```

A helper object that holds lexer position data.

---
## ExtendedRegexLexer
```python
from lexer import ExtendedRegexLexer
```

A RegexLexer that uses a context object to store its state.

---
## do_insertions
```python
from lexer import do_insertions
```

Helper for lexers which must combine the results of several
sublexers.

``insertions`` is a list of ``(index, itokens)`` pairs.
Each ``itokens`` iterable should be inserted at position
``index`` into the token stream given by the ``tokens``
argument.

The result is a combined token stream.

TODO: clean up the code here.

---
## ProfilingRegexLexerMeta
```python
from lexer import ProfilingRegexLexerMeta
```

Metaclass for ProfilingRegexLexer, collects regex timing info.

---
## ProfilingRegexLexer
```python
from lexer import ProfilingRegexLexer
```

Drop-in replacement for RegexLexer that does profiling of its regexes.

---
## __new__
```python
from lexer import __new__
```



---
## __init__
```python
from lexer import __init__
```



---
## __repr__
```python
from lexer import __repr__
```



---
## add_filter
```python
from lexer import add_filter
```

Add a new stream filter to this lexer.

---
## analyse_text
```python
from lexer import analyse_text
```

A static method which is called for lexer guessing.

It should analyse the text and return a float in the range
from ``0.0`` to ``1.0``.  If it returns ``0.0``, the lexer
will not be selected as the most probable one, if it returns
``1.0``, it will be selected immediately.  This is used by
`guess_lexer`.

The `LexerMeta` metaclass automatically wraps this function so
that it works like a static method (no ``self`` or ``cls``
parameter) and the return value is automatically converted to
`float`. If the return value is an object that is boolean `False`
it's the same as if the return values was ``0.0``.

---
## _preprocess_lexer_input
```python
from lexer import _preprocess_lexer_input
```

Apply preprocessing such as decoding the input, removing BOM and normalizing newlines.

---
## get_tokens
```python
from lexer import get_tokens
```

This method is the basic interface of a lexer. It is called by
the `highlight()` function. It must process the text and return an
iterable of ``(tokentype, value)`` pairs from `text`.

Normally, you don't need to override this method. The default
implementation processes the options recognized by all lexers
(`stripnl`, `stripall` and so on), and then yields all tokens
from `get_tokens_unprocessed()`, with the ``index`` dropped.

If `unfiltered` is set to `True`, the filtering mechanism is
bypassed even if filters are defined.

---
## get_tokens_unprocessed
```python
from lexer import get_tokens_unprocessed
```



---
## start
```python
from lexer import start
```



---
## end
```python
from lexer import end
```



---
## group
```python
from lexer import group
```



---
## groups
```python
from lexer import groups
```



---
## groupdict
```python
from lexer import groupdict
```



---
## callback
```python
from lexer import callback
```



---
## get
```python
from lexer import get
```



---
## _process_regex
```python
from lexer import _process_regex
```



---
## _process_token
```python
from lexer import _process_token
```

Preprocess the token component of a token definition.

---
## _process_new_state
```python
from lexer import _process_new_state
```

Preprocess the state transition action of a token definition.

---
## _process_state
```python
from lexer import _process_state
```

Preprocess a single state definition.

---
## process_tokendef
```python
from lexer import process_tokendef
```

Preprocess a dictionary of token definitions.

---
## get_tokendefs
```python
from lexer import get_tokendefs
```

Merge tokens from superclasses in MRO order, returning a single tokendef
dictionary.

Any state that is not defined by a subclass will be inherited
automatically.  States that *are* defined by subclasses will, by
default, override that state in the superclass.  If a subclass wishes to
inherit definitions from a superclass, it can use the special value
"inherit", which will cause the superclass' state definition to be
included at that point in the state.

---
## __call__
```python
from lexer import __call__
```

Instantiate cls after preprocessing its token definitions.

---
## streamer
```python
from lexer import streamer
```



---
## match_func
```python
from lexer import match_func
```



---
## __name__
```python
from regexopt import __name__
```

pygments.regexopt
~~~~~~~~~~~~~~~~~

An algorithm that generates optimized regexes for matching long lists of
literal strings.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## make_charset
```python
from regexopt import make_charset
```



---
## regex_opt_inner
```python
from regexopt import regex_opt_inner
```

Return a regex that matches any string in the sorted list of strings.

---
## regex_opt
```python
from regexopt import regex_opt
```

Return a compiled regex that matches any string in the given list.

The strings to match must be literal strings, not regexes.  They will be
regex-escaped.

*prefix* and *suffix* are pre- and appended to the final regex.

---
## __name__
```python
from plugin import __name__
```

pygments.plugin
~~~~~~~~~~~~~~~

Pygments plugin interface.

lexer plugins::

    [pygments.lexers]
    yourlexer = yourmodule:YourLexer

formatter plugins::

    [pygments.formatters]
    yourformatter = yourformatter:YourFormatter
    /.ext = yourformatter:YourFormatter

As you can see, you can define extensions for the formatter
with a leading slash.

syntax plugins::

    [pygments.styles]
    yourstyle = yourstyle:YourStyle

filter plugin::

    [pygments.filter]
    yourfilter = yourfilter:YourFilter


:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## iter_entry_points
```python
from plugin import iter_entry_points
```



---
## find_plugin_lexers
```python
from plugin import find_plugin_lexers
```



---
## find_plugin_formatters
```python
from plugin import find_plugin_formatters
```



---
## find_plugin_styles
```python
from plugin import find_plugin_styles
```



---
## find_plugin_filters
```python
from plugin import find_plugin_filters
```



---
## __name__
```python
from filter import __name__
```

pygments.filter
~~~~~~~~~~~~~~~

Module that implements the default filter.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## apply_filters
```python
from filter import apply_filters
```

Use this method to apply an iterable of filters to
a stream. If lexer is given it's forwarded to the
filter, otherwise the filter receives `None`.

---
## simplefilter
```python
from filter import simplefilter
```

Decorator that converts a function into a filter::

@simplefilter
def lowercase(self, lexer, stream, options):
    for ttype, value in stream:
        yield ttype, value.lower()

---
## Filter
```python
from filter import Filter
```

Default filter. Subclass this class or use the `simplefilter`
decorator to create own filters.

---
## FunctionFilter
```python
from filter import FunctionFilter
```

Abstract class used by `simplefilter` to create simple
function filters on the fly. The `simplefilter` decorator
automatically creates subclasses of this class for
functions passed to it.

---
## _apply
```python
from filter import _apply
```



---
## __init__
```python
from filter import __init__
```



---
## filter
```python
from filter import filter
```



---
## __name__
```python
from django_fields import __name__
```



---
## SemVerField
```python
from django_fields import SemVerField
```



---
## VersionField
```python
from django_fields import VersionField
```



---
## SpecField
```python
from django_fields import SpecField
```



---
## __init__
```python
from django_fields import __init__
```



---
## from_db_value
```python
from django_fields import from_db_value
```

Convert from the database format.

This should be the inverse of self.get_prep_value()

---
## get_prep_value
```python
from django_fields import get_prep_value
```



---
## get_db_prep_value
```python
from django_fields import get_db_prep_value
```



---
## value_to_string
```python
from django_fields import value_to_string
```



---
## run_validators
```python
from django_fields import run_validators
```



---
## deconstruct
```python
from django_fields import deconstruct
```

Handle django.db.migrations.

---
## to_python
```python
from django_fields import to_python
```

Converts any value to a base.Spec field.

---
## __name__
```python
from base import __name__
```



---
## _has_leading_zero
```python
from base import _has_leading_zero
```



---
## MaxIdentifier
```python
from base import MaxIdentifier
```



---
## NumericIdentifier
```python
from base import NumericIdentifier
```



---
## AlphaIdentifier
```python
from base import AlphaIdentifier
```



---
## Version
```python
from base import Version
```



---
## SpecItem
```python
from base import SpecItem
```

A requirement specification.

---
## compare
```python
from base import compare
```



---
## match
```python
from base import match
```



---
## validate
```python
from base import validate
```



---
## BaseSpec
```python
from base import BaseSpec
```

A specification of compatible versions.

Usage:
>>> Spec('>=1.0.0', syntax='npm')

A version matches a specification if it matches any
of the clauses of that specification.

Internally, a Spec is AnyOf(
    AllOf(Matcher, Matcher, Matcher),
    AllOf(...),
)

---
## Clause
```python
from base import Clause
```



---
## AnyOf
```python
from base import AnyOf
```



---
## AllOf
```python
from base import AllOf
```



---
## Matcher
```python
from base import Matcher
```



---
## Never
```python
from base import Never
```



---
## Always
```python
from base import Always
```



---
## Range
```python
from base import Range
```



---
## SimpleSpec
```python
from base import SimpleSpec
```



---
## LegacySpec
```python
from base import LegacySpec
```



---
## NpmSpec
```python
from base import NpmSpec
```



---
## __repr__
```python
from base import __repr__
```

Return a string representation for this object.

---
## __eq__
```python
from base import __eq__
```

Return for `self == other` (element-wise equality).

---
## __init__
```python
from base import __init__
```



---
## __lt__
```python
from base import __lt__
```



---
## _coerce
```python
from base import _coerce
```



---
## next_major
```python
from base import next_major
```



---
## next_minor
```python
from base import next_minor
```



---
## next_patch
```python
from base import next_patch
```



---
## truncate
```python
from base import truncate
```

Return a new Version object, truncated up to the selected level.

---
## coerce
```python
from base import coerce
```

Coerce an arbitrary version string into a semver-compatible one.

The rule is:
- If not enough components, fill minor/patch with zeroes; unless
  partial=True
- If more than 3 dot-separated components, extra components are "build"
  data. If some "build" data already appeared, append it to the
  extra components

Examples:
    >>> Version.coerce('0.1')
    Version(0, 1, 0)
    >>> Version.coerce('0.1.2.3')
    Version(0, 1, 2, (), ('3',))
    >>> Version.coerce('0.1.2.3+4')
    Version(0, 1, 2, (), ('3', '4'))
    >>> Version.coerce('0.1+2-3+4_5')
    Version(0, 1, 0, (), ('2-3', '4-5'))

---
## parse
```python
from base import parse
```



---
## _validate_identifiers
```python
from base import _validate_identifiers
```



---
## _validate_kwargs
```python
from base import _validate_kwargs
```



---
## __iter__
```python
from base import __iter__
```

Iterate over elements of the array.

---
## __str__
```python
from base import __str__
```



---
## __hash__
```python
from base import __hash__
```



---
## _build_precedence_key
```python
from base import _build_precedence_key
```

Build a precedence key.

The "build" component should only be used when sorting an iterable
of versions.

---
## precedence_key
```python
from base import precedence_key
```



---
## __cmp__
```python
from base import __cmp__
```



---
## __ne__
```python
from base import __ne__
```

Return for `self != other` (element-wise in-equality).

---
## __le__
```python
from base import __le__
```



---
## __gt__
```python
from base import __gt__
```



---
## __ge__
```python
from base import __ge__
```



---
## from_matcher
```python
from base import from_matcher
```



---
## register_syntax
```python
from base import register_syntax
```



---
## _parse_to_clause
```python
from base import _parse_to_clause
```



---
## filter
```python
from base import filter
```

Filter an iterable of versions satisfying the Spec.

---
## select
```python
from base import select
```

Select the best compatible version among an iterable of options.

---
## __contains__
```python
from base import __contains__
```

Return a boolean indicating whether the provided key is in the index.

Parameters
----------
key : label
    The key to check if it is present in the index.

Returns
-------
bool
    Whether the key search is in the index.

Raises
------
TypeError
    If the key is not hashable.

See Also
--------
Index.isin : Returns an ndarray of boolean dtype indicating whether the
    list-like key is in the index.

Examples
--------
>>> idx = pd.Index([1, 2, 3, 4])
>>> idx
Index([1, 2, 3, 4], dtype='int64')

>>> 2 in idx
True
>>> 6 in idx
False

---
## __and__
```python
from base import __and__
```



---
## __or__
```python
from base import __or__
```



---
## prettyprint
```python
from base import prettyprint
```

Pretty-print the clause.
        

---
## _pretty
```python
from base import _pretty
```



---
## simplify
```python
from base import simplify
```



---
## Parser
```python
from base import Parser
```



---
## specs
```python
from base import specs
```



---
## parse_block
```python
from base import parse_block
```



---
## range
```python
from base import range
```



---
## parse_simple
```python
from base import parse_simple
```



---
## __name__
```python
from ospath import __name__
```

Async executor versions of file functions from the os.path module.

---
## wrap
```python
from ospath import wrap
```



---
## __name__
```python
from os import __name__
```

Async executor versions of file functions from the os module.

---
## AsyncBase
```python
from base import AsyncBase
```



---
## AsyncIndirectBase
```python
from base import AsyncIndirectBase
```



---
## _ContextManager
```python
from base import _ContextManager
```



---
## AiofilesContextManager
```python
from base import AiofilesContextManager
```

An adjusted async context manager for aiofiles.

---
## _loop
```python
from base import _loop
```



---
## __aiter__
```python
from base import __aiter__
```

We are our own iterator.

---
## _file
```python
from base import _file
```



---
## send
```python
from base import send
```



---
## throw
```python
from base import throw
```



---
## close
```python
from base import close
```

Close the input/output binary stream.

This closes the input/output stream that is created during the ``__init__``.

Parameters
----------
kwargs
    Any other key word arguments that can be handled by the specific binary stream closer.

---
## gi_frame
```python
from base import gi_frame
```



---
## gi_running
```python
from base import gi_running
```



---
## gi_code
```python
from base import gi_code
```



---
## __next__
```python
from base import __next__
```



---
## __await__
```python
from base import __await__
```



---
## __name__
```python
from io import __name__
```



---
## InputError
```python
from io import InputError
```



---
## OutputError
```python
from io import OutputError
```



---
## check_encoding
```python
from io import check_encoding
```

Test, whether the encoding of `stream` matches `encoding`.

Returns

:None:  if `encoding` or `stream.encoding` are not a valid encoding
        argument (e.g. ``None``) or `stream.encoding is missing.
:True:  if the encoding argument resolves to the same value as `encoding`,
:False: if the encodings differ.

---
## error_string
```python
from io import error_string
```

Return string representation of Exception `err`.
    

---
## Input
```python
from io import Input
```

Abstract base class for input wrappers.

Docutils input objects must provide a `read()` method that
returns the source, typically as `str` instance.

Inheriting `TransformSpec` allows input objects to add
"transforms" and "unknown_reference_resolvers" to the "Transformer".
(Optional for custom input objects since Docutils 0.19.)

---
## Output
```python
from io import Output
```

Abstract base class for output wrappers.

Docutils output objects must provide a `write()` method that
expects and handles one argument (the output).

Inheriting `TransformSpec` allows output objects to add
"transforms" and "unknown_reference_resolvers" to the "Transformer".
(Optional for custom output objects since Docutils 0.19.)

---
## ErrorOutput
```python
from io import ErrorOutput
```

Wrapper class for file-like error streams with
failsafe de- and encoding of `str`, `bytes`, `unicode` and
`Exception` instances.

---
## FileInput
```python
from io import FileInput
```

Input for single, simple file-like objects.

---
## FileOutput
```python
from io import FileOutput
```

Output for single, simple file-like objects.

---
## BinaryFileOutput
```python
from io import BinaryFileOutput
```

A version of docutils.io.FileOutput which writes to a binary file.

---
## StringInput
```python
from io import StringInput
```

Input from a `str` or `bytes` instance.

---
## StringOutput
```python
from io import StringOutput
```

Output to a `bytes` or `str` instance.

Provisional.

---
## NullInput
```python
from io import NullInput
```

Degenerate input: read nothing.

---
## NullOutput
```python
from io import NullOutput
```

Degenerate output: write nothing.

---
## DocTreeInput
```python
from io import DocTreeInput
```

Adapter for document tree input.

The document tree must be passed in the ``source`` parameter.

---
## __init__
```python
from io import __init__
```



---
## __repr__
```python
from io import __repr__
```



---
## read
```python
from io import read
```



---
## decode
```python
from io import decode
```

Decode `data` if required.

Return Unicode `str` instances unchanged (nothing to decode).

If `self.encoding` is None, determine encoding from data
or try UTF-8 and the locale's preferred encoding.
The client application should call ``locale.setlocale()`` at the
beginning of processing::

    locale.setlocale(locale.LC_ALL, '')

Raise UnicodeError if unsuccessful.

Provisional: encoding detection will be removed in Docutils 1.0.

---
## determine_encoding_from_data
```python
from io import determine_encoding_from_data
```

Try to determine the encoding of `data` by looking *in* `data`.
Check for a byte order mark (BOM) or an encoding declaration.

---
## isatty
```python
from io import isatty
```

Return True, if the destination is connected to a TTY device.

---
## write
```python
from io import write
```



---
## encode
```python
from io import encode
```

Encode and return `data`.

If `data` is a `bytes` instance, it is returned unchanged.
Otherwise it is encoded with `self.encoding`.

Provisional: If `self.encoding` is set to the pseudo encoding name
"unicode", `data` must be a `str` instance and is returned unchanged.

---
## close
```python
from io import close
```



---
## readlines
```python
from io import readlines
```

Return lines of a single file as list of strings.

---
## open
```python
from io import open
```



---
## __name__
```python
from frontend import __name__
```

babel.messages.frontend
~~~~~~~~~~~~~~~~~~~~~~~

Frontends for the message extraction functionality.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## store_multiple
```python
from frontend import store_multiple
```

Store multiple values in `parser.values`.  (Option callback.)

Store `None` for each attribute named in `args`, and store the value for
each key (attribute name) in `kwargs`.

---
## read_config_file
```python
from frontend import read_config_file
```

Read a configuration file during option processing.  (Option callback.)

---
## validate_encoding
```python
from frontend import validate_encoding
```



---
## validate_encoding_error_handler
```python
from frontend import validate_encoding_error_handler
```



---
## validate_encoding_and_error_handler
```python
from frontend import validate_encoding_and_error_handler
```

Side-effect: if an error handler is included in the value, it is inserted
into the appropriate place as if it were a separate setting/option.

---
## validate_boolean
```python
from frontend import validate_boolean
```

Check/normalize boolean settings:
     True:  '1', 'on', 'yes', 'true'
     False: '0', 'off', 'no','false', ''

All arguments except `value` are ignored
(kept for compatibility with "optparse" module).
If there is only one positional argument, it is interpreted as `value`.

---
## validate_ternary
```python
from frontend import validate_ternary
```

Check/normalize three-value settings:
     True:  '1', 'on', 'yes', 'true'
     False: '0', 'off', 'no','false', ''
     any other value: returned as-is.

All arguments except `value` are ignored
(kept for compatibility with "optparse" module).
If there is only one positional argument, it is interpreted as `value`.

---
## validate_nonnegative_int
```python
from frontend import validate_nonnegative_int
```



---
## validate_threshold
```python
from frontend import validate_threshold
```



---
## validate_colon_separated_string_list
```python
from frontend import validate_colon_separated_string_list
```



---
## validate_comma_separated_list
```python
from frontend import validate_comma_separated_list
```

Check/normalize list arguments (split at "," and strip whitespace).

All arguments except `value` are ignored
(kept for compatibility with "optparse" module).
If there is only one positional argument, it is interpreted as `value`.

---
## validate_math_output
```python
from frontend import validate_math_output
```

Check "math-output" setting, return list with "format" and "options".

See also https://docutils.sourceforge.io/docs/user/config.html#math-output

Argument list for compatibility with "optparse" module.
All arguments except `value` are ignored.
If there is only one positional argument, it is interpreted as `value`.

---
## validate_url_trailing_slash
```python
from frontend import validate_url_trailing_slash
```



---
## validate_dependency_file
```python
from frontend import validate_dependency_file
```



---
## validate_strip_class
```python
from frontend import validate_strip_class
```



---
## validate_smartquotes_locales
```python
from frontend import validate_smartquotes_locales
```

Check/normalize a comma separated list of smart quote definitions.

Return a list of (language-tag, quotes) string tuples.

All arguments except `value` are ignored
(kept for compatibility with "optparse" module).
If there is only one positional argument, it is interpreted as `value`.

---
## make_paths_absolute
```python
from frontend import make_paths_absolute
```

Interpret filesystem path settings relative to the `base_path` given.

Paths are values in `pathdict` whose keys are in `keys`.  Get `keys` from
`OptionParser.relative_path_settings`.

---
## make_one_path_absolute
```python
from frontend import make_one_path_absolute
```



---
## filter_settings_spec
```python
from frontend import filter_settings_spec
```

Return a copy of `settings_spec` excluding/replacing some settings.

`settings_spec` is a tuple of configuration settings
(cf. `docutils.SettingsSpec.settings_spec`).

Optional positional arguments are names of to-be-excluded settings.
Keyword arguments are option specification replacements.
(See the html4strict writer for an example.)

---
## Values
```python
from frontend import Values
```

Storage for option values.

Updates list attributes by extension rather than by replacement.
Works in conjunction with the `OptionParser.lists` instance attribute.

Deprecated. Will be removed.

---
## Option
```python
from frontend import Option
```

Add validation and override support to `optparse.Option`.

Deprecated. Will be removed.

---
## OptionParser
```python
from frontend import OptionParser
```

Settings parser for command-line and library use.

The `settings_spec` specification here and in other Docutils components
are merged to build the set of command-line options and runtime settings
for this process.

Common settings (defined below) and component-specific settings must not
conflict.  Short options are reserved for common settings, and components
are restricted to using long options.

Deprecated.
Will be replaced by a subclass of `argparse.ArgumentParser`.

---
## ConfigParser
```python
from frontend import ConfigParser
```

Parser for Docutils configuration files.

See https://docutils.sourceforge.io/docs/user/config.html.

Option key normalization includes conversion of '-' to '_'.

Config file encoding is "utf-8". Encoding errors are reported
and the affected file(s) skipped.

This class is provisional and will change in future versions.

---
## ConfigDeprecationWarning
```python
from frontend import ConfigDeprecationWarning
```

Warning for deprecated configuration file features.

---
## get_default_settings
```python
from frontend import get_default_settings
```

Return default runtime settings for `components`.

Return a `frontend.Values` instance with defaults for generic Docutils
settings and settings from the `components` (`SettingsSpec` instances).

This corresponds to steps 1 and 2 in the `runtime settings priority`__.

__ https://docutils.sourceforge.io/docs/api/runtime-settings.html
   #settings-priority

---
## __init__
```python
from frontend import __init__
```



---
## update
```python
from frontend import update
```



---
## copy
```python
from frontend import copy
```

Return a shallow copy of `self`.

---
## setdefault
```python
from frontend import setdefault
```

Return ``self.name`` or ``default``.

If ``self.name`` is unset, set ``self.name = default``.

---
## process
```python
from frontend import process
```

Call the validator function on applicable settings and
evaluate the 'overrides' option.
Extends `optparse.Option.process`.

---
## populate_from_components
```python
from frontend import populate_from_components
```

Collect settings specification from components.

For each component, populate from the `SettingsSpec.settings_spec`
structure, then from the `SettingsSpec.settings_defaults` dictionary.
After all components have been processed, check for and populate from
each component's `SettingsSpec.settings_default_overrides` dictionary.

---
## get_standard_config_files
```python
from frontend import get_standard_config_files
```

Return list of config files, from environment or standard.

---
## get_standard_config_settings
```python
from frontend import get_standard_config_settings
```



---
## get_config_file_settings
```python
from frontend import get_config_file_settings
```

Returns a dictionary containing appropriate config file settings.

---
## check_values
```python
from frontend import check_values
```

Store positional arguments as runtime settings.

---
## check_args
```python
from frontend import check_args
```



---
## set_defaults_from_dict
```python
from frontend import set_defaults_from_dict
```



---
## get_default_values
```python
from frontend import get_default_values
```

Needed to get custom `Values` instances.

---
## get_option_by_dest
```python
from frontend import get_option_by_dest
```

Get an option by its dest.

If you're supplying a dest which is shared by several options,
it is undefined which option of those is returned.

A KeyError is raised if there is no option with the supplied
dest.

---
## read
```python
from frontend import read
```



---
## handle_old_config
```python
from frontend import handle_old_config
```



---
## validate_settings
```python
from frontend import validate_settings
```

Call the validator function and implement overrides on all applicable
settings.

---
## optionxform
```python
from frontend import optionxform
```

Lowercase and transform '-' to '_'.

So the cmdline form of option names can be used in config files.

---
## get_section
```python
from frontend import get_section
```

Return a given section as a dictionary.

Return empty dictionary if the section doesn't exist.

Deprecated. Use the configparser "Mapping Protocol Access" and
catch KeyError.

---
## VersionInfo
```python
from __init__ import VersionInfo
```



---
## ApplicationError
```python
from __init__ import ApplicationError
```



---
## DataError
```python
from __init__ import DataError
```

Exceptionn raised when performing an operation on non-numerical data.

For example, calling ``ohlc`` on a non-numerical column or a function
on a rolling window.

Examples
--------
>>> ser = pd.Series(['a', 'b', 'c'])
>>> ser.rolling(2).sum()
Traceback (most recent call last):
DataError: No numeric types to aggregate

---
## SettingsSpec
```python
from __init__ import SettingsSpec
```

Runtime setting specification base class.

SettingsSpec subclass objects used by `docutils.frontend.OptionParser`.

---
## TransformSpec
```python
from __init__ import TransformSpec
```

Runtime transform specification base class.

Provides the interface to register "transforms" and helper functions
to resolve references with a `docutils.transforms.Transformer`.

https://docutils.sourceforge.io/docs/ref/transforms.html

---
## Component
```python
from __init__ import Component
```

Base class for Docutils components.

---
## get_transforms
```python
from __init__ import get_transforms
```



---
## supports
```python
from __init__ import supports
```

Is `format` supported by this component?

To be used by transforms to ask the dependent component if it supports
a certain input context or output format.

---
## Publisher
```python
from core import Publisher
```

A facade encapsulating the high-level logic of a Docutils system.

---
## publish_cmdline
```python
from core import publish_cmdline
```

Set up & run a `Publisher` for command-line-based file I/O (input and
output file paths taken automatically from the command line).
Also return the output as `str` or `bytes` (for binary output document
formats).

Parameters: see `publish_programmatically()` for the remainder.

- `argv`: Command-line argument list to use instead of ``sys.argv[1:]``.
- `usage`: Usage string, output if there's a problem parsing the command
  line.
- `description`: Program description, output for the "--help" option
  (along with command-line option descriptions).

---
## publish_file
```python
from core import publish_file
```

Set up & run a `Publisher` for programmatic use with file-like I/O.
Also return the output as `str` or `bytes` (for binary output document
formats).

Parameters: see `publish_programmatically()`.

---
## publish_string
```python
from core import publish_string
```

Set up & run a `Publisher` for programmatic use with string I/O.

Accepts a `bytes` or `str` instance as `source`.

The output is encoded according to the `output_encoding`_ setting;
the return value is a `bytes` instance (unless `output_encoding`_ is
"unicode", cf. `docutils.io.StringOutput.write()`).

Parameters: see `publish_programmatically()`.

This function is provisional because in Python 3 name and behaviour
no longer match.

.. _output_encoding:
    https://docutils.sourceforge.io/docs/user/config.html#output-encoding

---
## publish_parts
```python
from core import publish_parts
```

Set up & run a `Publisher`, and return a dictionary of document parts.

Dictionary keys are the names of parts.
Dictionary values are `str` instances; encoding is up to the client,
e.g.::

   parts = publish_parts(...)
   body = parts['body'].encode(parts['encoding'], parts['errors'])

See the `API documentation`__ for details on the provided parts.

Parameters: see `publish_programmatically()`.

__ https://docutils.sourceforge.io/docs/api/publisher.html#publish-parts

---
## publish_doctree
```python
from core import publish_doctree
```

Set up & run a `Publisher` for programmatic use. Return a document tree.

Parameters: see `publish_programmatically()`.

---
## publish_from_doctree
```python
from core import publish_from_doctree
```

Set up & run a `Publisher` to render from an existing document tree
data structure. For programmatic use with string output
(`bytes` or `str`, cf. `publish_string()`).

Note that ``document.settings`` is overridden; if you want to use the
settings of the original `document`, pass ``settings=document.settings``.

Also, new `document.transformer` and `document.reporter` objects are
generated.

Parameters: `document` is a `docutils.nodes.document` object, an existing
document tree.

Other parameters: see `publish_programmatically()`.

This function is provisional because in Python 3 name and behaviour
of the `io.StringOutput` class no longer match.

---
## publish_cmdline_to_binary
```python
from core import publish_cmdline_to_binary
```

Set up & run a `Publisher` for command-line-based file I/O (input and
output file paths taken automatically from the command line).
Also return the output as `bytes`.

This is just like publish_cmdline, except that it uses
io.BinaryFileOutput instead of io.FileOutput.

Parameters: see `publish_programmatically()` for the remainder.

- `argv`: Command-line argument list to use instead of ``sys.argv[1:]``.
- `usage`: Usage string, output if there's a problem parsing the command
  line.
- `description`: Program description, output for the "--help" option
  (along with command-line option descriptions).

---
## publish_programmatically
```python
from core import publish_programmatically
```

Set up & run a `Publisher` for custom programmatic use.

Return the output (as `str` or `bytes`, depending on `destination_class`,
writer, and the "output_encoding" setting) and the Publisher object.

Applications should not need to call this function directly.  If it does
seem to be necessary to call this function directly, please write to the
Docutils-develop mailing list
<https://docutils.sourceforge.io/docs/user/mailing-lists.html#docutils-develop>.

Parameters:

* `source_class` **required**: The class for dynamically created source
  objects.  Typically `io.FileInput` or `io.StringInput`.

* `source`: Type depends on `source_class`:

  - If `source_class` is `io.FileInput`: Either a file-like object
    (must have 'read' and 'close' methods), or ``None``
    (`source_path` is opened).  If neither `source` nor
    `source_path` are supplied, `sys.stdin` is used.

  - If `source_class` is `io.StringInput` **required**:
    The input as either a `bytes` object (ensure the 'input_encoding'
    setting matches its encoding) or a `str` object.

* `source_path`: Type depends on `source_class`:

  - `io.FileInput`: Path to the input file, opened if no `source`
    supplied.

  - `io.StringInput`: Optional.  Path to the file or name of the
    object that produced `source`.  Only used for diagnostic output.

* `destination_class` **required**: The class for dynamically created
  destination objects.  Typically `io.FileOutput` or `io.StringOutput`.

* `destination`: Type depends on `destination_class`:

  - `io.FileOutput`: Either a file-like object (must have 'write' and
    'close' methods), or ``None`` (`destination_path` is opened).  If
    neither `destination` nor `destination_path` are supplied,
    `sys.stdout` is used.

  - `io.StringOutput`: Not used; pass ``None``.

* `destination_path`: Type depends on `destination_class`:

  - `io.FileOutput`: Path to the output file.  Opened if no `destination`
    supplied.

  - `io.StringOutput`: Path to the file or object which will receive the
    output; optional.  Used for determining relative paths (stylesheets,
    source links, etc.).

* `reader`: A `docutils.readers.Reader` object.

* `reader_name`: Name or alias of the Reader class to be instantiated if
  no `reader` supplied.

* `parser`: A `docutils.parsers.Parser` object.

* `parser_name`: Name or alias of the Parser class to be instantiated if
  no `parser` supplied.

* `writer`: A `docutils.writers.Writer` object.

* `writer_name`: Name or alias of the Writer class to be instantiated if
  no `writer` supplied.

* `settings`: A runtime settings (`docutils.frontend.Values`) object, for
  dotted-attribute access to runtime settings.  It's the end result of the
  `SettingsSpec`, config file, and option processing.  If `settings` is
  passed, it's assumed to be complete and no further setting/config/option
  processing is done.

* `settings_spec`: A `docutils.SettingsSpec` subclass or object.  Provides
  extra application-specific settings definitions independently of
  components.  In other words, the application becomes a component, and
  its settings data is processed along with that of the other components.
  Used only if no `settings` specified.

* `settings_overrides`: A dictionary containing application-specific
  settings defaults that override the defaults of other components.
  Used only if no `settings` specified.

* `config_section`: A string, the name of the configuration file section
  for this application.  Overrides the ``config_section`` attribute
  defined by `settings_spec`.  Used only if no `settings` specified.

* `enable_exit_status`: Boolean; enable exit status at end of processing?

---
## rst2something
```python
from core import rst2something
```



---
## rst2html
```python
from core import rst2html
```



---
## rst2html4
```python
from core import rst2html4
```



---
## rst2html5
```python
from core import rst2html5
```



---
## rst2latex
```python
from core import rst2latex
```



---
## rst2man
```python
from core import rst2man
```



---
## rst2odt
```python
from core import rst2odt
```



---
## rst2pseudoxml
```python
from core import rst2pseudoxml
```



---
## rst2s5
```python
from core import rst2s5
```



---
## rst2xetex
```python
from core import rst2xetex
```



---
## rst2xml
```python
from core import rst2xml
```



---
## set_reader
```python
from core import set_reader
```

Set `self.reader` by name.

---
## set_writer
```python
from core import set_writer
```

Set `self.writer` by name.

---
## set_components
```python
from core import set_components
```



---
## setup_option_parser
```python
from core import setup_option_parser
```



---
## _setup_settings_parser
```python
from core import _setup_settings_parser
```



---
## get_settings
```python
from core import get_settings
```

Return settings from components and config files.

Please set components first (`self.set_reader` & `self.set_writer`).
Use keyword arguments to override component defaults
(before updating from configuration files).

Calling this function also sets `self.settings` which makes
`self.publish()` skip parsing command line options.

---
## process_programmatic_settings
```python
from core import process_programmatic_settings
```



---
## process_command_line
```python
from core import process_command_line
```

Parse command line arguments and set ``self.settings``.

Pass an empty sequence to `argv` to avoid reading `sys.argv`
(the default behaviour).

Set components first (`self.set_reader` & `self.set_writer`).

---
## set_io
```python
from core import set_io
```



---
## set_source
```python
from core import set_source
```



---
## set_destination
```python
from core import set_destination
```



---
## apply_transforms
```python
from core import apply_transforms
```



---
## publish
```python
from core import publish
```

Process command line options and arguments (if `self.settings` not
already set), run `self.reader` and then `self.writer`.  Return
`self.writer`'s output.

---
## debugging_dumps
```python
from core import debugging_dumps
```



---
## prompt
```python
from core import prompt
```

Print info and prompt when waiting for input from a terminal.

---
## report_Exception
```python
from core import report_Exception
```



---
## report_SystemMessage
```python
from core import report_SystemMessage
```



---
## report_UnicodeError
```python
from core import report_UnicodeError
```



---
## __name__
```python
from examples import __name__
```

This module contains practical examples of Docutils client code.

Importing this module from client code is not recommended; its contents are
subject to change in future Docutils releases.  Instead, it is recommended
that you copy and paste the parts you need into your own code, modifying as
necessary.

---
## html_parts
```python
from examples import html_parts
```

Given an input string, returns a dictionary of HTML document parts.

Dictionary keys are the names of parts, and values are Unicode strings;
encoding is up to the client.

Parameters:

- `input_string`: A multi-line text string; required.
- `source_path`: Path to the source file or object.  Optional, but useful
  for diagnostic output (system messages).
- `destination_path`: Path to the file or object which will receive the
  output; optional.  Used for determining relative paths (stylesheets,
  source links, etc.).
- `input_encoding`: The encoding of `input_string`.  If it is an encoded
  8-bit string, provide the correct encoding.  If it is a Unicode string,
  use "unicode", the default.
- `doctitle`: Disable the promotion of a lone top-level section title to
  document title (and subsequent section title to document subtitle
  promotion); enabled by default.
- `initial_header_level`: The initial level for header elements (e.g. 1
  for "<h1>").

---
## html_body
```python
from examples import html_body
```

Given an input string, returns an HTML fragment as a string.

The return value is the contents of the <body> element.

Parameters (see `html_parts()` for the remainder):

- `output_encoding`: The desired encoding of the output.  If a Unicode
  string is desired, use the default value of "unicode" .

---
## internals
```python
from examples import internals
```

Return the document tree and publisher, for exploring Docutils internals.

Parameters: see `html_parts()`.

---
## __name__
```python
from nodes import __name__
```



---
## Node
```python
from nodes import Node
```



---
## unescape
```python
from nodes import unescape
```

Return a string with nulls removed or restored to backslashes.
Backslash-escaped spaces are also removed.

---
## Text
```python
from nodes import Text
```

Instances are terminal nodes (leaves) containing text only; no child
nodes or attributes.  Initialize by passing a string to the constructor.

Access the raw (null-escaped) text with ``str(<instance>)``
and unescaped text with ``<instance>.astext()``.

---
## Element
```python
from nodes import Element
```

`Element` is the superclass to all specific elements.

Elements contain attributes and child nodes.
They can be described as a cross between a list and a dictionary.

Elements emulate dictionaries for external [#]_ attributes, indexing by
attribute name (a string). To set the attribute 'att' to 'value', do::

    element['att'] = 'value'

.. [#] External attributes correspond to the XML element attributes.
   From its `Node` superclass, Element also inherits "internal"
   class attributes that are accessed using the standard syntax, e.g.
   ``element.parent``.

There are two special attributes: 'ids' and 'names'.  Both are
lists of unique identifiers: 'ids' conform to the regular expression
``[a-z](-?[a-z0-9]+)*`` (see the make_id() function for rationale and
details). 'names' serve as user-friendly interfaces to IDs; they are
case- and whitespace-normalized (see the fully_normalize_name() function).

Elements emulate lists for child nodes (element nodes and/or text
nodes), indexing by integer.  To get the first child node, use::

    element[0]

to iterate over the child nodes (without descending), use::

    for child in element:
        ...

Elements may be constructed using the ``+=`` operator.  To add one new
child node to element, do::

    element += node

This is equivalent to ``element.append(node)``.

To add a list of multiple child nodes at once, use the same ``+=``
operator::

    element += [node1, node2]

This is equivalent to ``element.extend([node1, node2])``.

---
## TextElement
```python
from nodes import TextElement
```

An element which directly contains text.

Its children are all `Text` or `Inline` subclass nodes.  You can
check whether an element's context is inline simply by checking whether
its immediate parent is a `TextElement` instance (including subclasses).
This is handy for nodes like `image` that can appear both inline and as
standalone body elements.

If passing children to `__init__()`, make sure to set `text` to
``''`` or some other suitable value.

---
## FixedTextElement
```python
from nodes import FixedTextElement
```

An element which directly contains preformatted text.

---
## Resolvable
```python
from nodes import Resolvable
```



---
## BackLinkable
```python
from nodes import BackLinkable
```



---
## Root
```python
from nodes import Root
```



---
## Titular
```python
from nodes import Titular
```



---
## PreBibliographic
```python
from nodes import PreBibliographic
```

Category of Node which may occur before Bibliographic Nodes.

---
## Bibliographic
```python
from nodes import Bibliographic
```



---
## Decorative
```python
from nodes import Decorative
```



---
## Structural
```python
from nodes import Structural
```



---
## Body
```python
from nodes import Body
```



---
## General
```python
from nodes import General
```



---
## Sequential
```python
from nodes import Sequential
```

List-like elements.

---
## Admonition
```python
from nodes import Admonition
```



---
## Special
```python
from nodes import Special
```

Special internal body elements.

---
## Invisible
```python
from nodes import Invisible
```

Internal elements that don't appear in output.

---
## Part
```python
from nodes import Part
```



---
## Inline
```python
from nodes import Inline
```



---
## Referential
```python
from nodes import Referential
```



---
## Targetable
```python
from nodes import Targetable
```



---
## Labeled
```python
from nodes import Labeled
```

Contains a `label` as its first element.

---
## document
```python
from nodes import document
```



---
## title
```python
from nodes import title
```



---
## subtitle
```python
from nodes import subtitle
```



---
## rubric
```python
from nodes import rubric
```



---
## meta
```python
from nodes import meta
```

Container for "invisible" bibliographic data, or meta-data.

---
## docinfo
```python
from nodes import docinfo
```



---
## author
```python
from nodes import author
```



---
## authors
```python
from nodes import authors
```



---
## organization
```python
from nodes import organization
```



---
## address
```python
from nodes import address
```



---
## contact
```python
from nodes import contact
```



---
## version
```python
from nodes import version
```



---
## revision
```python
from nodes import revision
```



---
## status
```python
from nodes import status
```



---
## date
```python
from nodes import date
```



---
## copyright
```python
from nodes import copyright
```



---
## decoration
```python
from nodes import decoration
```



---
## header
```python
from nodes import header
```



---
## footer
```python
from nodes import footer
```



---
## section
```python
from nodes import section
```



---
## topic
```python
from nodes import topic
```

Topics are terminal, "leaf" mini-sections, like block quotes with titles,
or textual figures.  A topic is just like a section, except that it has no
subsections, and it doesn't have to conform to section placement rules.

Topics are allowed wherever body elements (list, table, etc.) are allowed,
but only at the top level of a section or document.  Topics cannot nest
inside topics, sidebars, or body elements; you can't have a topic inside a
table, list, block quote, etc.

---
## sidebar
```python
from nodes import sidebar
```

Sidebars are like miniature, parallel documents that occur inside other
documents, providing related or reference material.  A sidebar is
typically offset by a border and "floats" to the side of the page; the
document's main text may flow around it.  Sidebars can also be likened to
super-footnotes; their content is outside of the flow of the document's
main text.

Sidebars are allowed wherever body elements (list, table, etc.) are
allowed, but only at the top level of a section or document.  Sidebars
cannot nest inside sidebars, topics, or body elements; you can't have a
sidebar inside a table, list, block quote, etc.

---
## transition
```python
from nodes import transition
```



---
## paragraph
```python
from nodes import paragraph
```



---
## compound
```python
from nodes import compound
```



---
## container
```python
from nodes import container
```



---
## bullet_list
```python
from nodes import bullet_list
```



---
## enumerated_list
```python
from nodes import enumerated_list
```



---
## list_item
```python
from nodes import list_item
```



---
## definition_list
```python
from nodes import definition_list
```



---
## definition_list_item
```python
from nodes import definition_list_item
```



---
## term
```python
from nodes import term
```



---
## classifier
```python
from nodes import classifier
```



---
## definition
```python
from nodes import definition
```



---
## field_list
```python
from nodes import field_list
```



---
## field
```python
from nodes import field
```



---
## field_name
```python
from nodes import field_name
```



---
## field_body
```python
from nodes import field_body
```



---
## option
```python
from nodes import option
```



---
## option_argument
```python
from nodes import option_argument
```



---
## option_group
```python
from nodes import option_group
```



---
## option_list
```python
from nodes import option_list
```



---
## option_list_item
```python
from nodes import option_list_item
```



---
## option_string
```python
from nodes import option_string
```



---
## description
```python
from nodes import description
```



---
## literal_block
```python
from nodes import literal_block
```



---
## doctest_block
```python
from nodes import doctest_block
```



---
## math_block
```python
from nodes import math_block
```



---
## line_block
```python
from nodes import line_block
```



---
## line
```python
from nodes import line
```



---
## block_quote
```python
from nodes import block_quote
```



---
## attribution
```python
from nodes import attribution
```



---
## attention
```python
from nodes import attention
```



---
## caution
```python
from nodes import caution
```



---
## danger
```python
from nodes import danger
```



---
## error
```python
from nodes import error
```



---
## important
```python
from nodes import important
```



---
## note
```python
from nodes import note
```



---
## tip
```python
from nodes import tip
```



---
## hint
```python
from nodes import hint
```



---
## warning
```python
from nodes import warning
```



---
## admonition
```python
from nodes import admonition
```



---
## comment
```python
from nodes import comment
```



---
## substitution_definition
```python
from nodes import substitution_definition
```



---
## target
```python
from nodes import target
```



---
## footnote
```python
from nodes import footnote
```



---
## citation
```python
from nodes import citation
```



---
## label
```python
from nodes import label
```



---
## figure
```python
from nodes import figure
```



---
## caption
```python
from nodes import caption
```



---
## legend
```python
from nodes import legend
```



---
## table
```python
from nodes import table
```



---
## tgroup
```python
from nodes import tgroup
```



---
## colspec
```python
from nodes import colspec
```



---
## thead
```python
from nodes import thead
```



---
## tbody
```python
from nodes import tbody
```



---
## row
```python
from nodes import row
```



---
## entry
```python
from nodes import entry
```



---
## system_message
```python
from nodes import system_message
```

System message element.

Do not instantiate this class directly; use
``document.reporter.info/warning/error/severe()`` instead.

---
## pending
```python
from nodes import pending
```

The "pending" element is used to encapsulate a pending operation: the
operation (transform), the point at which to apply it, and any data it
requires.  Only the pending operation's location within the document is
stored in the public document tree (by the "pending" object itself); the
operation and its data are stored in the "pending" object's internal
instance attributes.

For example, say you want a table of contents in your reStructuredText
document.  The easiest way to specify where to put it is from within the
document, with a directive::

    .. contents::

But the "contents" directive can't do its work until the entire document
has been parsed and possibly transformed to some extent.  So the directive
code leaves a placeholder behind that will trigger the second phase of its
processing, something like this::

    <pending ...public attributes...> + internal attributes

Use `document.note_pending()` so that the
`docutils.transforms.Transformer` stage of processing can run all pending
transforms.

---
## raw
```python
from nodes import raw
```

Raw data that is to be passed untouched to the Writer.

---
## emphasis
```python
from nodes import emphasis
```



---
## strong
```python
from nodes import strong
```



---
## literal
```python
from nodes import literal
```



---
## reference
```python
from nodes import reference
```



---
## footnote_reference
```python
from nodes import footnote_reference
```



---
## citation_reference
```python
from nodes import citation_reference
```



---
## substitution_reference
```python
from nodes import substitution_reference
```



---
## title_reference
```python
from nodes import title_reference
```



---
## abbreviation
```python
from nodes import abbreviation
```



---
## acronym
```python
from nodes import acronym
```



---
## superscript
```python
from nodes import superscript
```



---
## subscript
```python
from nodes import subscript
```



---
## math
```python
from nodes import math
```



---
## image
```python
from nodes import image
```



---
## inline
```python
from nodes import inline
```



---
## problematic
```python
from nodes import problematic
```



---
## generated
```python
from nodes import generated
```



---
## NodeVisitor
```python
from nodes import NodeVisitor
```

"Visitor" pattern [GoF95]_ abstract superclass implementation for
document tree traversals.

Each node class has corresponding methods, doing nothing by
default; override individual methods for specific and useful
behaviour.  The `dispatch_visit()` method is called by
`Node.walk()` upon entering a node.  `Node.walkabout()` also calls
the `dispatch_departure()` method before exiting a node.

The dispatch methods call "``visit_`` + node class name" or
"``depart_`` + node class name", resp.

This is a base class for visitors whose ``visit_...`` & ``depart_...``
methods must be implemented for *all* compulsory node types encountered
(such as for `docutils.writers.Writer` subclasses).
Unimplemented methods will raise exceptions (except for optional nodes).

For sparse traversals, where only certain node types are of interest, use
subclass `SparseNodeVisitor` instead.  When (mostly or entirely) uniform
processing is desired, subclass `GenericNodeVisitor`.

.. [GoF95] Gamma, Helm, Johnson, Vlissides. *Design Patterns: Elements of
   Reusable Object-Oriented Software*. Addison-Wesley, Reading, MA, USA,
   1995.

---
## SparseNodeVisitor
```python
from nodes import SparseNodeVisitor
```

Base class for sparse traversals, where only certain node types are of
interest.  When ``visit_...`` & ``depart_...`` methods should be
implemented for *all* node types (such as for `docutils.writers.Writer`
subclasses), subclass `NodeVisitor` instead.

---
## GenericNodeVisitor
```python
from nodes import GenericNodeVisitor
```

Generic "Visitor" abstract superclass, for simple traversals.

Unless overridden, each ``visit_...`` method calls `default_visit()`, and
each ``depart_...`` method (when using `Node.walkabout()`) calls
`default_departure()`. `default_visit()` (and `default_departure()`) must
be overridden in subclasses.

Define fully generic visitors by overriding `default_visit()` (and
`default_departure()`) only. Define semi-generic visitors by overriding
individual ``visit_...()`` (and ``depart_...()``) methods also.

`NodeVisitor.unknown_visit()` (`NodeVisitor.unknown_departure()`) should
be overridden for default behavior.

---
## _call_default_visit
```python
from nodes import _call_default_visit
```



---
## _call_default_departure
```python
from nodes import _call_default_departure
```



---
## _nop
```python
from nodes import _nop
```



---
## _add_node_class_names
```python
from nodes import _add_node_class_names
```

Save typing with dynamic assignments:

---
## TreeCopyVisitor
```python
from nodes import TreeCopyVisitor
```

Make a complete copy of a tree or branch, including element attributes.

---
## TreePruningException
```python
from nodes import TreePruningException
```

Base class for `NodeVisitor`-related tree pruning exceptions.

Raise subclasses from within ``visit_...`` or ``depart_...`` methods
called from `Node.walk()` and `Node.walkabout()` tree traversals to prune
the tree traversed.

---
## SkipChildren
```python
from nodes import SkipChildren
```

Do not visit any children of the current node.  The current node's
siblings and ``depart_...`` method are not affected.

---
## SkipSiblings
```python
from nodes import SkipSiblings
```

Do not visit any more siblings (to the right) of the current node.  The
current node's children and its ``depart_...`` method are not affected.

---
## SkipNode
```python
from nodes import SkipNode
```

Do not visit the current node's children, and do not call the current
node's ``depart_...`` method.

---
## SkipDeparture
```python
from nodes import SkipDeparture
```

Do not call the current node's ``depart_...`` method.  The current node's
children and siblings are not affected.

---
## NodeFound
```python
from nodes import NodeFound
```

Raise to indicate that the target of a search has been found.  This
exception must be caught by the client; it is not caught by the traversal
code.

---
## StopTraversal
```python
from nodes import StopTraversal
```

Stop the traversal altogether.  The current node's ``depart_...`` method
is not affected.  The parent nodes ``depart_...`` methods are also called
as usual.  No other nodes are visited.  This is an alternative to
NodeFound that does not cause exception handling to trickle up to the
caller.

---
## make_id
```python
from nodes import make_id
```

Generate an appropriate node_id for given *prefix* and *term*.

---
## dupname
```python
from nodes import dupname
```



---
## fully_normalize_name
```python
from nodes import fully_normalize_name
```

Return a case- and whitespace-normalized name.

---
## whitespace_normalize_name
```python
from nodes import whitespace_normalize_name
```

Return a whitespace-normalized name.

---
## serial_escape
```python
from nodes import serial_escape
```

Escape string values that are elements of a list, for serialization.

---
## pseudo_quoteattr
```python
from nodes import pseudo_quoteattr
```

Quote attributes for pseudo-xml

---
## __bool__
```python
from nodes import __bool__
```



---
## asdom
```python
from nodes import asdom
```

Return a DOM representation of this document.

---
## pformat
```python
from nodes import pformat
```



---
## copy
```python
from nodes import copy
```



---
## deepcopy
```python
from nodes import deepcopy
```



---
## astext
```python
from nodes import astext
```



---
## setup_child
```python
from nodes import setup_child
```



---
## walk
```python
from nodes import walk
```

Traverse a tree of `Node` objects, calling the
`dispatch_visit()` method of `visitor` when entering each
node.  (The `walkabout()` method is similar, except it also
calls the `dispatch_departure()` method before exiting each
node.)

This tree traversal supports limited in-place tree
modifications.  Replacing one node with one or more nodes is
OK, as is removing an element.  However, if the node removed
or replaced occurs after the current node, the old node will
still be traversed, and any new nodes will not.

Within ``visit`` methods (and ``depart`` methods for
`walkabout()`), `TreePruningException` subclasses may be raised
(`SkipChildren`, `SkipSiblings`, `SkipNode`, `SkipDeparture`).

Parameter `visitor`: A `NodeVisitor` object, containing a
``visit`` implementation for each `Node` subclass encountered.

Return true if we should stop the traversal.

---
## walkabout
```python
from nodes import walkabout
```

Perform a tree traversal similarly to `Node.walk()` (which
see), except also call the `dispatch_departure()` method
before exiting each node.

Parameter `visitor`: A `NodeVisitor` object, containing a
``visit`` and ``depart`` implementation for each `Node`
subclass encountered.

Return true if we should stop the traversal.

---
## _fast_findall
```python
from nodes import _fast_findall
```

Return iterator that only supports instance checks.

---
## _superfast_findall
```python
from nodes import _superfast_findall
```

Return iterator that doesn't check for a condition.

---
## traverse
```python
from nodes import traverse
```

Return list of nodes following `self`.

For looping, Node.findall() is faster and more memory efficient.

---
## findall
```python
from nodes import findall
```

An alternative to `Node.findall` with improved type safety.

While the `NodeMatcher` object can be used as an argument to `Node.findall`, doing so
confounds type checkers' ability to determine the return type of the iterator.

---
## next_node
```python
from nodes import next_node
```

Return the first node in the iterator returned by findall(),
or None if the iterable is empty.

Parameter list is the same as of `findall()`.  Note that `include_self`
defaults to False, though.

---
## __new__
```python
from nodes import __new__
```



---
## shortrepr
```python
from nodes import shortrepr
```



---
## __repr__
```python
from nodes import __repr__
```



---
## _dom_node
```python
from nodes import _dom_node
```



---
## rstrip
```python
from nodes import rstrip
```



---
## lstrip
```python
from nodes import lstrip
```



---
## __init__
```python
from nodes import __init__
```



---
## __str__
```python
from nodes import __str__
```



---
## starttag
```python
from nodes import starttag
```



---
## endtag
```python
from nodes import endtag
```



---
## emptytag
```python
from nodes import emptytag
```



---
## __len__
```python
from nodes import __len__
```



---
## __contains__
```python
from nodes import __contains__
```



---
## __getitem__
```python
from nodes import __getitem__
```



---
## __setitem__
```python
from nodes import __setitem__
```



---
## __delitem__
```python
from nodes import __delitem__
```



---
## __add__
```python
from nodes import __add__
```



---
## __radd__
```python
from nodes import __radd__
```



---
## __iadd__
```python
from nodes import __iadd__
```

Append a node or a list of nodes to `self.children`.

---
## non_default_attributes
```python
from nodes import non_default_attributes
```



---
## attlist
```python
from nodes import attlist
```



---
## get
```python
from nodes import get
```



---
## hasattr
```python
from nodes import hasattr
```



---
## delattr
```python
from nodes import delattr
```



---
## setdefault
```python
from nodes import setdefault
```



---
## get_language_code
```python
from nodes import get_language_code
```

Return node's language tag.

Look iteratively in self and parents for a class argument
starting with ``language-`` and return the remainder of it
(which should be a `BCP49` language tag) or the `fallback`.

---
## append
```python
from nodes import append
```



---
## extend
```python
from nodes import extend
```



---
## insert
```python
from nodes import insert
```



---
## pop
```python
from nodes import pop
```



---
## remove
```python
from nodes import remove
```



---
## index
```python
from nodes import index
```



---
## previous_sibling
```python
from nodes import previous_sibling
```

Return preceding sibling node or ``None``.

---
## is_not_default
```python
from nodes import is_not_default
```



---
## update_basic_atts
```python
from nodes import update_basic_atts
```

Update basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') from node or dictionary `dict_`.

---
## append_attr_list
```python
from nodes import append_attr_list
```

For each element in values, if it does not exist in self[attr], append
it.

NOTE: Requires self[attr] and values to be sequence type and the
former should specifically be a list.

---
## coerce_append_attr_list
```python
from nodes import coerce_append_attr_list
```

First, convert both self[attr] and value to a non-string sequence
type; if either is not already a sequence, convert it to a list of one
element.  Then call append_attr_list.

NOTE: self[attr] and value both must not be None.

---
## replace_attr
```python
from nodes import replace_attr
```

If self[attr] does not exist or force is True or omitted, set
self[attr] to value, otherwise do nothing.

---
## copy_attr_convert
```python
from nodes import copy_attr_convert
```

If attr is an attribute of self, set self[attr] to
[self[attr], value], otherwise set self[attr] to value.

NOTE: replace is not used by this function and is kept only for
      compatibility with the other copy functions.

---
## copy_attr_coerce
```python
from nodes import copy_attr_coerce
```

If attr is an attribute of self and either self[attr] or value is a
list, convert all non-sequence values to a sequence of 1 element and
then concatenate the two sequence, setting the result to self[attr].
If both self[attr] and value are non-sequences and replace is True or
self[attr] is None, replace self[attr] with value. Otherwise, do
nothing.

---
## copy_attr_concatenate
```python
from nodes import copy_attr_concatenate
```

If attr is an attribute of self and both self[attr] and value are
lists, concatenate the two sequences, setting the result to
self[attr].  If either self[attr] or value are non-sequences and
replace is True or self[attr] is None, replace self[attr] with value.
Otherwise, do nothing.

---
## copy_attr_consistent
```python
from nodes import copy_attr_consistent
```

If replace is True or self[attr] is None, replace self[attr] with
value.  Otherwise, do nothing.

---
## update_all_atts
```python
from nodes import update_all_atts
```

Updates all attributes from node or dictionary `dict_`.

Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self.  When attributes with the
same identifier appear in both self and dict_, the two values are
merged based on the value of update_fun.  Generally, when replace is
True, the values in self are replaced or merged with the values in
dict_; otherwise, the values in self may be preserved or merged.  When
and_source is True, the 'source' attribute is included in the copy.

NOTE: When replace is False, and self contains a 'source' attribute,
      'source' is not replaced even when dict_ has a 'source'
      attribute, though it may still be merged into a list depending
      on the value of update_fun.
NOTE: It is easier to call the update-specific methods then to pass
      the update_fun method to this function.

---
## update_all_atts_consistantly
```python
from nodes import update_all_atts_consistantly
```

Updates all attributes from node or dictionary `dict_`.

Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self.  When attributes with the
same identifier appear in both self and dict_ and replace is True, the
values in self are replaced with the values in dict_; otherwise, the
values in self are preserved.  When and_source is True, the 'source'
attribute is included in the copy.

NOTE: When replace is False, and self contains a 'source' attribute,
      'source' is not replaced even when dict_ has a 'source'
      attribute, though it may still be merged into a list depending
      on the value of update_fun.

---
## update_all_atts_concatenating
```python
from nodes import update_all_atts_concatenating
```

Updates all attributes from node or dictionary `dict_`.

Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self.  When attributes with the
same identifier appear in both self and dict_ whose values aren't each
lists and replace is True, the values in self are replaced with the
values in dict_; if the values from self and dict_ for the given
identifier are both of list type, then the two lists are concatenated
and the result stored in self; otherwise, the values in self are
preserved.  When and_source is True, the 'source' attribute is
included in the copy.

NOTE: When replace is False, and self contains a 'source' attribute,
      'source' is not replaced even when dict_ has a 'source'
      attribute, though it may still be merged into a list depending
      on the value of update_fun.

---
## update_all_atts_coercion
```python
from nodes import update_all_atts_coercion
```

Updates all attributes from node or dictionary `dict_`.

Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self.  When attributes with the
same identifier appear in both self and dict_ whose values are both
not lists and replace is True, the values in self are replaced with
the values in dict_; if either of the values from self and dict_ for
the given identifier are of list type, then first any non-lists are
converted to 1-element lists and then the two lists are concatenated
and the result stored in self; otherwise, the values in self are
preserved.  When and_source is True, the 'source' attribute is
included in the copy.

NOTE: When replace is False, and self contains a 'source' attribute,
      'source' is not replaced even when dict_ has a 'source'
      attribute, though it may still be merged into a list depending
      on the value of update_fun.

---
## update_all_atts_convert
```python
from nodes import update_all_atts_convert
```

Updates all attributes from node or dictionary `dict_`.

Appends the basic attributes ('ids', 'names', 'classes',
'dupnames', but not 'source') and then, for all other attributes in
dict_, updates the same attribute in self.  When attributes with the
same identifier appear in both self and dict_ then first any non-lists
are converted to 1-element lists and then the two lists are
concatenated and the result stored in self; otherwise, the values in
self are preserved.  When and_source is True, the 'source' attribute
is included in the copy.

NOTE: When replace is False, and self contains a 'source' attribute,
      'source' is not replaced even when dict_ has a 'source'
      attribute, though it may still be merged into a list depending
      on the value of update_fun.

---
## clear
```python
from nodes import clear
```



---
## replace
```python
from nodes import replace
```

Replace one child `Node` with another child or children.

---
## replace_self
```python
from nodes import replace_self
```

Replace `self` node with `new`, where `new` is a node or a
list of nodes.

---
## first_child_matching_class
```python
from nodes import first_child_matching_class
```

Return the index of the first child whose class exactly matches.

Parameters:

- `childclass`: A `Node` subclass to search for, or a tuple of `Node`
  classes. If a tuple, any of the classes may match.
- `start`: Initial index to check.
- `end`: Initial index to *not* check.

---
## first_child_not_matching_class
```python
from nodes import first_child_not_matching_class
```

Return the index of the first child whose class does *not* match.

Parameters:

- `childclass`: A `Node` subclass to skip, or a tuple of `Node`
  classes. If a tuple, none of the classes may match.
- `start`: Initial index to check.
- `end`: Initial index to *not* check.

---
## set_class
```python
from nodes import set_class
```

Add a new class to the "classes" attribute.

---
## note_referenced_by
```python
from nodes import note_referenced_by
```

Note that this Element has been referenced by its name
`name` or id `id`.

---
## is_not_list_attribute
```python
from nodes import is_not_list_attribute
```

Returns True if and only if the given attribute is NOT one of the
basic list attributes defined for all Elements.

---
## is_not_known_attribute
```python
from nodes import is_not_known_attribute
```

Returns True if and only if the given attribute is NOT recognized by
this class.

---
## add_backref
```python
from nodes import add_backref
```



---
## __getstate__
```python
from nodes import __getstate__
```

Return dict with unpicklable references removed.

---
## set_id
```python
from nodes import set_id
```



---
## set_name_id_map
```python
from nodes import set_name_id_map
```

`self.nameids` maps names to IDs, while `self.nametypes` maps names to
booleans representing hyperlink type (True==explicit,
False==implicit).  This method updates the mappings.

The following state transition table shows how `self.nameids` items
("id") and `self.nametypes` items ("type") change with new input
(a call to this method), and what actions are performed
("implicit"-type system messages are INFO/1, and
"explicit"-type system messages are ERROR/3):

====  =====  ========  ========  =======  ====  =====  =====
 Old State    Input          Action        New State   Notes
-----------  --------  -----------------  -----------  -----
id    type   new type  sys.msg.  dupname  id    type
====  =====  ========  ========  =======  ====  =====  =====
-     -      explicit  -         -        new   True
-     -      implicit  -         -        new   False
-     False  explicit  -         -        new   True
old   False  explicit  implicit  old      new   True
-     True   explicit  explicit  new      -     True
old   True   explicit  explicit  new,old  -     True   [#]_
-     False  implicit  implicit  new      -     False
old   False  implicit  implicit  new,old  -     False
-     True   implicit  implicit  new      -     True
old   True   implicit  implicit  new      old   True
====  =====  ========  ========  =======  ====  =====  =====

.. [#] Do not clear the name-to-id map or invalidate the old target if
   both old and new targets are external and refer to identical URIs.
   The new target is invalidated regardless.

---
## set_duplicate_name_id
```python
from nodes import set_duplicate_name_id
```



---
## has_name
```python
from nodes import has_name
```



---
## note_implicit_target
```python
from nodes import note_implicit_target
```



---
## note_explicit_target
```python
from nodes import note_explicit_target
```



---
## note_refname
```python
from nodes import note_refname
```



---
## note_refid
```python
from nodes import note_refid
```



---
## note_indirect_target
```python
from nodes import note_indirect_target
```



---
## note_anonymous_target
```python
from nodes import note_anonymous_target
```



---
## note_autofootnote
```python
from nodes import note_autofootnote
```



---
## note_autofootnote_ref
```python
from nodes import note_autofootnote_ref
```



---
## note_symbol_footnote
```python
from nodes import note_symbol_footnote
```



---
## note_symbol_footnote_ref
```python
from nodes import note_symbol_footnote_ref
```



---
## note_footnote
```python
from nodes import note_footnote
```



---
## note_footnote_ref
```python
from nodes import note_footnote_ref
```



---
## note_citation
```python
from nodes import note_citation
```



---
## note_citation_ref
```python
from nodes import note_citation_ref
```



---
## note_substitution_def
```python
from nodes import note_substitution_def
```



---
## note_substitution_ref
```python
from nodes import note_substitution_ref
```



---
## note_pending
```python
from nodes import note_pending
```



---
## note_parse_message
```python
from nodes import note_parse_message
```



---
## note_transform_message
```python
from nodes import note_transform_message
```



---
## note_source
```python
from nodes import note_source
```



---
## get_decoration
```python
from nodes import get_decoration
```



---
## get_header
```python
from nodes import get_header
```



---
## get_footer
```python
from nodes import get_footer
```



---
## dispatch_visit
```python
from nodes import dispatch_visit
```

Call self."``visit_`` + node class name" with `node` as
parameter.  If the ``visit_...`` method does not exist, call
self.unknown_visit.

---
## dispatch_departure
```python
from nodes import dispatch_departure
```

Call self."``depart_`` + node class name" with `node` as
parameter.  If the ``depart_...`` method does not exist, call
self.unknown_departure.

---
## unknown_visit
```python
from nodes import unknown_visit
```

Called when entering unknown `Node` types.

Raise an exception unless overridden.

---
## unknown_departure
```python
from nodes import unknown_departure
```

Called before exiting unknown `Node` types.

Raise exception unless overridden.

---
## default_visit
```python
from nodes import default_visit
```

Copy the current node, and make it the new acting parent.

---
## default_departure
```python
from nodes import default_departure
```

Restore the previous acting parent.

---
## get_tree_copy
```python
from nodes import get_tree_copy
```



---
## condition
```python
from nodes import condition
```



---
## CliSettingsSpec
```python
from __main__ import CliSettingsSpec
```

Runtime settings & command-line options for the generic CLI.

Configurable reader, parser, and writer components.

The "--writer" default will change to 'html' in Docutils 2.0
when 'html' becomes an alias for the current value 'html5'.

---
## __name__
```python
from statemachine import __name__
```

A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:

- `StateMachine`, a state machine
- `State`, a state superclass
- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
- `StateWS`, a state superclass for use with `StateMachineWS`
- `SearchStateMachine`, uses `re.search()` instead of `re.match()`
- `SearchStateMachineWS`, uses `re.search()` instead of `re.match()`
- `ViewList`, extends standard Python lists.
- `StringList`, string-specific ViewList.

Exception classes:

- `StateMachineError`
- `UnknownStateError`
- `DuplicateStateError`
- `UnknownTransitionError`
- `DuplicateTransitionError`
- `TransitionPatternNotFound`
- `TransitionMethodNotFound`
- `UnexpectedIndentationError`
- `TransitionCorrection`: Raised to switch to another transition.
- `StateCorrection`: Raised to switch to another state & transition.

Functions:

- `string2lines()`: split a multi-line string into a list of one-line strings


How To Use This Module
======================
(See the individual classes, methods, and attributes for details.)

1. Import it: ``import statemachine`` or ``from statemachine import ...``.
   You will also need to ``import re``.

2. Derive a subclass of `State` (or `StateWS`) for each state in your state
   machine::

       class MyState(statemachine.State):

   Within the state's class definition:

   a) Include a pattern for each transition, in `State.patterns`::

          patterns = {'atransition': r'pattern', ...}

   b) Include a list of initial transitions to be set up automatically, in
      `State.initial_transitions`::

          initial_transitions = ['atransition', ...]

   c) Define a method for each transition, with the same name as the
      transition pattern::

          def atransition(self, match, context, next_state):
              # do something
              result = [...]  # a list
              return context, next_state, result
              # context, next_state may be altered

      Transition methods may raise an `EOFError` to cut processing short.

   d) You may wish to override the `State.bof()` and/or `State.eof()` implicit
      transition methods, which handle the beginning- and end-of-file.

   e) In order to handle nested processing, you may wish to override the
      attributes `State.nested_sm` and/or `State.nested_sm_kwargs`.

      If you are using `StateWS` as a base class, in order to handle nested
      indented blocks, you may wish to:

      - override the attributes `StateWS.indent_sm`,
        `StateWS.indent_sm_kwargs`, `StateWS.known_indent_sm`, and/or
        `StateWS.known_indent_sm_kwargs`;
      - override the `StateWS.blank()` method; and/or
      - override or extend the `StateWS.indent()`, `StateWS.known_indent()`,
        and/or `StateWS.firstknown_indent()` methods.

3. Create a state machine object::

       sm = StateMachine(state_classes=[MyState, ...],
                         initial_state='MyState')

4. Obtain the input text, which needs to be converted into a tab-free list of
   one-line strings. For example, to read text from a file called
   'inputfile'::

       with open('inputfile', encoding='utf-8') as fp:
           input_string = fp.read()
       input_lines = statemachine.string2lines(input_string)

5. Run the state machine on the input text and collect the results, a list::

       results = sm.run(input_lines)

6. Remove any lingering circular references::

       sm.unlink()

---
## StateMachine
```python
from statemachine import StateMachine
```

A finite state machine for text filters using regular expressions.

The input is provided in the form of a list of one-line strings (no
newlines). States are subclasses of the `State` class. Transitions consist
of regular expression patterns and transition methods, and are defined in
each state.

The state machine is started with the `run()` method, which returns the
results of processing in a list.

---
## State
```python
from statemachine import State
```

State superclass. Contains a list of transitions, and transition methods.

Transition methods all have the same signature. They take 3 parameters:

- An `re` match object. ``match.string`` contains the matched input line,
  ``match.start()`` gives the start index of the match, and
  ``match.end()`` gives the end index.
- A context object, whose meaning is application-defined (initial value
  ``None``). It can be used to store any information required by the state
  machine, and the returned context is passed on to the next transition
  method unchanged.
- The name of the next state, a string, taken from the transitions list;
  normally it is returned unchanged, but it may be altered by the
  transition method if necessary.

Transition methods all return a 3-tuple:

- A context object, as (potentially) modified by the transition method.
- The next state name (a return value of ``None`` means no state change).
- The processing result, a list, which is accumulated by the state
  machine.

Transition methods may raise an `EOFError` to cut processing short.

There are two implicit transitions, and corresponding transition methods
are defined: `bof()` handles the beginning-of-file, and `eof()` handles
the end-of-file. These methods have non-standard signatures and return
values. `bof()` returns the initial context and results, and may be used
to return a header string, or do any other processing needed. `eof()`
should handle any remaining context and wrap things up; it returns the
final processing result.

Typical applications need only subclass `State` (or a subclass), set the
`patterns` and `initial_transitions` class attributes, and provide
corresponding transition methods. The default object initialization will
take care of constructing the list of transitions.

---
## StateMachineWS
```python
from statemachine import StateMachineWS
```

`StateMachine` subclass specialized for whitespace recognition.

There are three methods provided for extracting indented text blocks:

- `get_indented()`: use when the indent is unknown.
- `get_known_indented()`: use when the indent is known for all lines.
- `get_first_known_indented()`: use when only the first line's indent is
  known.

---
## StateWS
```python
from statemachine import StateWS
```

State superclass specialized for whitespace (blank lines & indents).

Use this class with `StateMachineWS`.  The transitions 'blank' (for blank
lines) and 'indent' (for indented text blocks) are added automatically,
before any other transitions.  The transition method `blank()` handles
blank lines and `indent()` handles nested indented blocks.  Indented
blocks trigger a new state machine to be created by `indent()` and run.
The class of the state machine to be created is in `indent_sm`, and the
constructor keyword arguments are in the dictionary `indent_sm_kwargs`.

The methods `known_indent()` and `firstknown_indent()` are provided for
indented blocks where the indent (all lines' and first line's only,
respectively) is known to the transition method, along with the attributes
`known_indent_sm` and `known_indent_sm_kwargs`.  Neither transition method
is triggered automatically.

---
## _SearchOverride
```python
from statemachine import _SearchOverride
```

Mix-in class to override `StateMachine` regular expression behavior.

Changes regular expression matching, from the default `re.match()`
(succeeds only if the pattern matches at the start of `self.line`) to
`re.search()` (succeeds if the pattern matches anywhere in `self.line`).
When subclassing a `StateMachine`, list this class **first** in the
inheritance list of the class definition.

---
## SearchStateMachine
```python
from statemachine import SearchStateMachine
```

`StateMachine` which uses `re.search()` instead of `re.match()`.

---
## SearchStateMachineWS
```python
from statemachine import SearchStateMachineWS
```

`StateMachineWS` which uses `re.search()` instead of `re.match()`.

---
## ViewList
```python
from statemachine import ViewList
```

List with extended functionality: slices of ViewList objects are child
lists, linked to their parents. Changes made to a child list also affect
the parent list.  A child list is effectively a "view" (in the SQL sense)
of the parent list.  Changes to parent lists, however, do *not* affect
active child lists.  If a parent list is changed, any active child lists
should be recreated.

The start and end of the slice can be trimmed using the `trim_start()` and
`trim_end()` methods, without affecting the parent list.  The link between
child and parent lists can be broken by calling `disconnect()` on the
child list.

Also, ViewList objects keep track of the source & offset of each item.
This information is accessible via the `source()`, `offset()`, and
`info()` methods.

---
## StringList
```python
from statemachine import StringList
```

A `ViewList` with string-specific methods.

---
## StateMachineError
```python
from statemachine import StateMachineError
```



---
## UnknownStateError
```python
from statemachine import UnknownStateError
```



---
## DuplicateStateError
```python
from statemachine import DuplicateStateError
```



---
## UnknownTransitionError
```python
from statemachine import UnknownTransitionError
```



---
## DuplicateTransitionError
```python
from statemachine import DuplicateTransitionError
```



---
## TransitionPatternNotFound
```python
from statemachine import TransitionPatternNotFound
```



---
## TransitionMethodNotFound
```python
from statemachine import TransitionMethodNotFound
```



---
## UnexpectedIndentationError
```python
from statemachine import UnexpectedIndentationError
```



---
## TransitionCorrection
```python
from statemachine import TransitionCorrection
```

Raise from within a transition method to switch to another transition.

Raise with one argument, the new transition name.

---
## StateCorrection
```python
from statemachine import StateCorrection
```

Raise from within a transition method to switch to another state.

Raise with one or two arguments: new state name, and an optional new
transition name.

---
## string2lines
```python
from statemachine import string2lines
```

Return a list of one-line strings with tabs expanded, no newlines, and
trailing whitespace stripped.

Each tab is expanded with between 1 and `tab_width` spaces, so that the
next character's index becomes a multiple of `tab_width` (8 by default).

Parameters:

- `astring`: a multi-line string.
- `tab_width`: the number of columns between tab stops.
- `convert_whitespace`: convert form feeds and vertical tabs to spaces?
- `whitespace`: pattern object with the to-be-converted
  whitespace characters (default [\v\f]).

---
## _exception_data
```python
from statemachine import _exception_data
```

Return exception information:

- the exception's class name;
- the exception object;
- the name of the file containing the offending code;
- the line number of the offending code;
- the function name of the offending code.

---
## __init__
```python
from statemachine import __init__
```



---
## unlink
```python
from statemachine import unlink
```

Remove circular references to objects no longer required.

---
## run
```python
from statemachine import run
```

Run the state machine on `input_lines`. Return results (a list).

Reset `self.line_offset` and `self.current_state`. Run the
beginning-of-file transition. Input one line at a time and check for a
matching transition. If a match is found, call the transition method
and possibly change the state. Store the context returned by the
transition method to be passed on to the next transition matched.
Accumulate the results returned by the transition methods in a list.
Run the end-of-file transition. Finally, return the accumulated
results.

Parameters:

- `input_lines`: a list of strings without newlines, or `StringList`.
- `input_offset`: the line offset of `input_lines` from the beginning
  of the file.
- `context`: application-specific storage.
- `input_source`: name or path of source of `input_lines`.
- `initial_state`: name of initial state.

---
## get_state
```python
from statemachine import get_state
```

Return current state object; set it first if `next_state` given.

Parameter `next_state`: a string, the name of the next state.

Exception: `UnknownStateError` raised if `next_state` unknown.

---
## next_line
```python
from statemachine import next_line
```

Load `self.line` with the `n`'th next line and return it.

---
## is_next_line_blank
```python
from statemachine import is_next_line_blank
```

Return True if the next line is blank or non-existent.

---
## at_eof
```python
from statemachine import at_eof
```

Return 1 if the input is at or past end-of-file.

---
## at_bof
```python
from statemachine import at_bof
```

Return 1 if the input is at or before beginning-of-file.

---
## previous_line
```python
from statemachine import previous_line
```

Load `self.line` with the `n`'th previous line and return it.

---
## goto_line
```python
from statemachine import goto_line
```

Jump to absolute line offset `line_offset`, load and return it.

---
## get_source
```python
from statemachine import get_source
```

Return source of line at absolute line offset `line_offset`.

---
## abs_line_offset
```python
from statemachine import abs_line_offset
```

Return line offset of current line, from beginning of file.

---
## abs_line_number
```python
from statemachine import abs_line_number
```

Return line number of current line (counting from 1).

---
## get_source_and_line
```python
from statemachine import get_source_and_line
```

Return (source, line) tuple for current or given line number.

Looks up the source and line number in the `self.input_lines`
StringList instance to count for included source files.

If the optional argument `lineno` is given, convert it from an
absolute line number to the corresponding (source, line) pair.

---
## insert_input
```python
from statemachine import insert_input
```



---
## get_text_block
```python
from statemachine import get_text_block
```

Return a contiguous block of text.

If `flush_left` is true, raise `UnexpectedIndentationError` if an
indented line is encountered before the text block ends (with a blank
line).

---
## check_line
```python
from statemachine import check_line
```

Examine one line of input for a transition match & execute its method.

Parameters:

- `context`: application-dependent storage.
- `state`: a `State` object, the current state.
- `transitions`: an optional ordered list of transition names to try,
  instead of ``state.transition_order``.

Return the values returned by the transition method:

- context: possibly modified from the parameter `context`;
- next state name (`State` subclass name);
- the result output of the transition, a list.

When there is no match, ``state.no_match()`` is called and its return
value is returned.

---
## add_state
```python
from statemachine import add_state
```

Initialize & add a `state_class` (`State` subclass) object.

Exception: `DuplicateStateError` raised if `state_class` was already
added.

---
## add_states
```python
from statemachine import add_states
```

Add `state_classes` (a list of `State` subclasses).

---
## runtime_init
```python
from statemachine import runtime_init
```

Initialize this `State` before running the state machine; called from
`self.state_machine.run()`.

---
## error
```python
from statemachine import error
```

Report error details.

---
## attach_observer
```python
from statemachine import attach_observer
```

The `observer` parameter is a function or bound method which takes two
arguments, the source and offset of the current line.

---
## detach_observer
```python
from statemachine import detach_observer
```



---
## notify_observers
```python
from statemachine import notify_observers
```



---
## add_initial_transitions
```python
from statemachine import add_initial_transitions
```

Add whitespace-specific transitions before those defined in subclass.

Extends `State.add_initial_transitions()`.

---
## add_transitions
```python
from statemachine import add_transitions
```

Add a list of transitions to the start of the transition list.

Parameters:

- `names`: a list of transition names.
- `transitions`: a mapping of names to transition tuples.

Exceptions: `DuplicateTransitionError`, `UnknownTransitionError`.

---
## add_transition
```python
from statemachine import add_transition
```

Add a transition to the start of the transition list.

Parameter `transition`: a ready-made transition 3-tuple.

Exception: `DuplicateTransitionError`.

---
## remove_transition
```python
from statemachine import remove_transition
```

Remove a transition by `name`.

Exception: `UnknownTransitionError`.

---
## make_transition
```python
from statemachine import make_transition
```

Make & return a transition tuple based on `name`.

This is a convenience function to simplify transition creation.

Parameters:

- `name`: a string, the name of the transition pattern & method. This
  `State` object must have a method called '`name`', and a dictionary
  `self.patterns` containing a key '`name`'.
- `next_state`: a string, the name of the next `State` object for this
  transition. A value of ``None`` (or absent) implies no state change
  (i.e., continue with the same state).

Exceptions: `TransitionPatternNotFound`, `TransitionMethodNotFound`.

---
## make_transitions
```python
from statemachine import make_transitions
```

Return a list of transition names and a transition mapping.

Parameter `name_list`: a list, where each entry is either a transition
name string, or a 1- or 2-tuple (transition name, optional next state
name).

---
## no_match
```python
from statemachine import no_match
```

Called when there is no match from `StateMachine.check_line()`.

Return the same values returned by transition methods:

- context: unchanged;
- next state name: ``None``;
- empty result list.

Override in subclasses to catch this event.

---
## bof
```python
from statemachine import bof
```

Handle beginning-of-file. Return unchanged `context`, empty result.

Override in subclasses.

Parameter `context`: application-defined storage.

---
## eof
```python
from statemachine import eof
```

Handle end-of-file. Return empty result.

Override in subclasses.

Parameter `context`: application-defined storage.

---
## nop
```python
from statemachine import nop
```

A "do nothing" transition method.

Return unchanged `context` & `next_state`, empty result. Useful for
simple state changes (actionless transitions).

---
## get_indented
```python
from statemachine import get_indented
```

Extract and return a StringList of indented lines of text.

Collect all lines with indentation, determine the minimum indentation,
remove the minimum indentation from all indented lines (unless
`strip_indent` is false), and return them. All lines up to but not
including the first unindented line will be returned.

:Parameters:
  - `start`: The index of the first line to examine.
  - `until_blank`: Stop collecting at the first blank line if true.
  - `strip_indent`: Strip common leading indent if true (default).
  - `block_indent`: The indent of the entire block, if known.
  - `first_indent`: The indent of the first line, if known.

:Return:
  - a StringList of indented lines with minimum indent removed;
  - the amount of the indent;
  - a boolean: did the indented block finish with a blank line or EOF?

---
## get_known_indented
```python
from statemachine import get_known_indented
```

Return an indented block and info.

Extract an indented block where the indent is known for all lines.
Starting with the current line, extract the entire text block with at
least `indent` indentation (which must be whitespace, except for the
first line).

:Parameters:
    - `indent`: The number of indent columns/characters.
    - `until_blank`: Stop collecting at the first blank line if true.
    - `strip_indent`: Strip `indent` characters of indentation if true
      (default).

:Return:
    - the indented block,
    - its first line offset from BOF, and
    - whether or not it finished with a blank line.

---
## get_first_known_indented
```python
from statemachine import get_first_known_indented
```

Return an indented block and info.

Extract an indented block where the indent is known for the first line
and unknown for all other lines.

:Parameters:
    - `indent`: The first line's indent (# of columns/characters).
    - `until_blank`: Stop collecting at the first blank line if true
      (1).
    - `strip_indent`: Strip `indent` characters of indentation if true
      (1, default).
    - `strip_top`: Strip blank lines from the beginning of the block.

:Return:
    - the indented block,
    - its indent,
    - its first line offset from BOF, and
    - whether or not it finished with a blank line.

---
## blank
```python
from statemachine import blank
```

Handle blank lines. Does nothing. Override in subclasses.

---
## indent
```python
from statemachine import indent
```

Handle an indented text block. Extend or override in subclasses.

Recursively run the registered state machine for indented blocks
(`self.indent_sm`).

---
## known_indent
```python
from statemachine import known_indent
```

Handle a known-indent text block. Extend or override in subclasses.

Recursively run the registered state machine for known-indent indented
blocks (`self.known_indent_sm`). The indent is the length of the
match, ``match.end()``.

---
## first_known_indent
```python
from statemachine import first_known_indent
```

Handle an indented text block (first line's indent known).

Extend or override in subclasses.

Recursively run the registered state machine for known-indent indented
blocks (`self.known_indent_sm`). The indent is the length of the
match, ``match.end()``.

---
## match
```python
from statemachine import match
```

Return the result of a regular expression search.

Overrides `StateMachine.match()`.

Parameter `pattern`: `re` compiled regular expression.

---
## __str__
```python
from statemachine import __str__
```



---
## __repr__
```python
from statemachine import __repr__
```



---
## __lt__
```python
from statemachine import __lt__
```



---
## __le__
```python
from statemachine import __le__
```



---
## __eq__
```python
from statemachine import __eq__
```



---
## __ne__
```python
from statemachine import __ne__
```



---
## __gt__
```python
from statemachine import __gt__
```



---
## __ge__
```python
from statemachine import __ge__
```



---
## __cast
```python
from statemachine import __cast
```



---
## __contains__
```python
from statemachine import __contains__
```



---
## __len__
```python
from statemachine import __len__
```



---
## __getitem__
```python
from statemachine import __getitem__
```



---
## __setitem__
```python
from statemachine import __setitem__
```



---
## __delitem__
```python
from statemachine import __delitem__
```



---
## __add__
```python
from statemachine import __add__
```



---
## __radd__
```python
from statemachine import __radd__
```



---
## __iadd__
```python
from statemachine import __iadd__
```



---
## __mul__
```python
from statemachine import __mul__
```



---
## __imul__
```python
from statemachine import __imul__
```



---
## extend
```python
from statemachine import extend
```



---
## append
```python
from statemachine import append
```



---
## insert
```python
from statemachine import insert
```



---
## pop
```python
from statemachine import pop
```



---
## trim_start
```python
from statemachine import trim_start
```

Remove items from the start of the list, without touching the parent.

---
## trim_end
```python
from statemachine import trim_end
```

Remove items from the end of the list, without touching the parent.

---
## remove
```python
from statemachine import remove
```



---
## count
```python
from statemachine import count
```



---
## index
```python
from statemachine import index
```



---
## reverse
```python
from statemachine import reverse
```



---
## sort
```python
from statemachine import sort
```



---
## info
```python
from statemachine import info
```

Return source & offset for index `i`.

---
## source
```python
from statemachine import source
```

Return source for index `i`.

---
## offset
```python
from statemachine import offset
```

Return offset for index `i`.

---
## disconnect
```python
from statemachine import disconnect
```

Break link between this list and parent list.

---
## xitems
```python
from statemachine import xitems
```

Return iterator yielding (source, offset, value) tuples.

---
## pprint
```python
from statemachine import pprint
```

Print the list in `grep` format (`source:offset:value` lines)

---
## trim_left
```python
from statemachine import trim_left
```

Trim `length` characters off the beginning of each item, in-place,
from index `start` to `end`.  No whitespace-checking is done on the
trimmed text.  Does not affect slice parent.

---
## get_2D_block
```python
from statemachine import get_2D_block
```



---
## pad_double_width
```python
from statemachine import pad_double_width
```

Pad all double-width characters in `self` appending `pad_char`.

For East Asian language support.

---
## replace
```python
from statemachine import replace
```

Replace all occurrences of substring `old` with `new`.

---
## __name__
```python
from results import __name__
```



---
## _ParseResultsWithOffset
```python
from results import _ParseResultsWithOffset
```



---
## ParseResults
```python
from results import ParseResults
```

Structured parse results, to provide multiple means of access to
the parsed data:

- as a list (``len(results)``)
- by list index (``results[0], results[1]``, etc.)
- by attribute (``results.<results_name>`` - see :class:`ParserElement.set_results_name`)

Example::

    integer = Word(nums)
    date_str = (integer.set_results_name("year") + '/'
                + integer.set_results_name("month") + '/'
                + integer.set_results_name("day"))
    # equivalent form:
    # date_str = (integer("year") + '/'
    #             + integer("month") + '/'
    #             + integer("day"))

    # parse_string returns a ParseResults object
    result = date_str.parse_string("1999/12/31")

    def test(s, fn=repr):
        print(f"{s} -> {fn(eval(s))}")
    test("list(result)")
    test("result[0]")
    test("result['month']")
    test("result.day")
    test("'month' in result")
    test("'minutes' in result")
    test("result.dump()", str)

prints::

    list(result) -> ['1999', '/', '12', '/', '31']
    result[0] -> '1999'
    result['month'] -> '12'
    result.day -> '31'
    'month' in result -> True
    'minutes' in result -> False
    result.dump() -> ['1999', '/', '12', '/', '31']
    - day: '31'
    - month: '12'
    - year: '1999'

---
## __init__
```python
from results import __init__
```



---
## __getitem__
```python
from results import __getitem__
```



---
## __getstate__
```python
from results import __getstate__
```



---
## __setstate__
```python
from results import __setstate__
```



---
## List
```python
from results import List
```

Simple wrapper class to distinguish parsed list results that should be preserved
as actual Python lists, instead of being converted to :class:`ParseResults`::

    LBRACK, RBRACK = map(pp.Suppress, "[]")
    element = pp.Forward()
    item = ppc.integer
    element_list = LBRACK + pp.DelimitedList(element) + RBRACK

    # add parse actions to convert from ParseResults to actual Python collection types
    def as_python_list(t):
        return pp.ParseResults.List(t.as_list())
    element_list.add_parse_action(as_python_list)

    element <<= item | element_list

    element.run_tests('''
        100
        [2,3,4]
        [[2, 1],3,4]
        [(2, 1),3,4]
        (2,3,4)
        ''', post_parse=lambda s, r: (r[0], type(r[0])))

prints::

    100
    (100, <class 'int'>)

    [2,3,4]
    ([2, 3, 4], <class 'list'>)

    [[2, 1],3,4]
    ([[2, 1], 3, 4], <class 'list'>)

(Used internally by :class:`Group` when `aslist=True`.)

---
## __new__
```python
from results import __new__
```



---
## __setitem__
```python
from results import __setitem__
```



---
## __delitem__
```python
from results import __delitem__
```



---
## __contains__
```python
from results import __contains__
```



---
## __len__
```python
from results import __len__
```



---
## __bool__
```python
from results import __bool__
```



---
## __iter__
```python
from results import __iter__
```



---
## __reversed__
```python
from results import __reversed__
```



---
## keys
```python
from results import keys
```



---
## values
```python
from results import values
```



---
## items
```python
from results import items
```



---
## haskeys
```python
from results import haskeys
```

Since ``keys()`` returns an iterator, this method is helpful in bypassing
code that looks for the existence of any defined results names.

---
## pop
```python
from results import pop
```

Removes and returns item at specified index (default= ``last``).
Supports both ``list`` and ``dict`` semantics for ``pop()``. If
passed no argument or an integer argument, it will use ``list``
semantics and pop tokens from the list of parsed tokens. If passed
a non-integer argument (most likely a string), it will use ``dict``
semantics and pop the corresponding value from any defined results
names. A second default return value argument is supported, just as in
``dict.pop()``.

Example::

    numlist = Word(nums)[...]
    print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

    def remove_first(tokens):
        tokens.pop(0)
    numlist.add_parse_action(remove_first)
    print(numlist.parse_string("0 123 321")) # -> ['123', '321']

    label = Word(alphas)
    patt = label("LABEL") + Word(nums)[1, ...]
    print(patt.parse_string("AAB 123 321").dump())

    # Use pop() in a parse action to remove named result (note that corresponding value is not
    # removed from list form of results)
    def remove_LABEL(tokens):
        tokens.pop("LABEL")
        return tokens
    patt.add_parse_action(remove_LABEL)
    print(patt.parse_string("AAB 123 321").dump())

prints::

    ['AAB', '123', '321']
    - LABEL: 'AAB'

    ['AAB', '123', '321']

---
## get
```python
from results import get
```

Returns named result matching the given key, or if there is no
such name, then returns the given ``default_value`` or ``None`` if no
``default_value`` is specified.

Similar to ``dict.get()``.

Example::

    integer = Word(nums)
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

    result = date_str.parse_string("1999/12/31")
    print(result.get("year")) # -> '1999'
    print(result.get("hour", "not specified")) # -> 'not specified'
    print(result.get("hour")) # -> None

---
## insert
```python
from results import insert
```

Inserts new element at location index in the list of parsed tokens.

Similar to ``list.insert()``.

Example::

    numlist = Word(nums)[...]
    print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

    # use a parse action to insert the parse location in the front of the parsed results
    def insert_locn(locn, tokens):
        tokens.insert(0, locn)
    numlist.add_parse_action(insert_locn)
    print(numlist.parse_string("0 123 321")) # -> [0, '0', '123', '321']

---
## append
```python
from results import append
```

Add single element to end of ``ParseResults`` list of elements.

Example::

    numlist = Word(nums)[...]
    print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321']

    # use a parse action to compute the sum of the parsed integers, and add it to the end
    def append_sum(tokens):
        tokens.append(sum(map(int, tokens)))
    numlist.add_parse_action(append_sum)
    print(numlist.parse_string("0 123 321")) # -> ['0', '123', '321', 444]

---
## extend
```python
from results import extend
```

Add sequence of elements to end of ``ParseResults`` list of elements.

Example::

    patt = Word(alphas)[1, ...]

    # use a parse action to append the reverse of the matched strings, to make a palindrome
    def make_palindrome(tokens):
        tokens.extend(reversed([t[::-1] for t in tokens]))
        return ''.join(tokens)
    patt.add_parse_action(make_palindrome)
    print(patt.parse_string("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'

---
## clear
```python
from results import clear
```

Clear all elements and results names.

---
## __getattr__
```python
from results import __getattr__
```



---
## __add__
```python
from results import __add__
```



---
## __iadd__
```python
from results import __iadd__
```



---
## __radd__
```python
from results import __radd__
```



---
## __repr__
```python
from results import __repr__
```



---
## __str__
```python
from results import __str__
```



---
## _asStringList
```python
from results import _asStringList
```



---
## as_list
```python
from results import as_list
```

Returns the parse results as a nested list of matching tokens, all converted to strings.

Example::

    patt = Word(alphas)[1, ...]
    result = patt.parse_string("sldkj lsdkj sldkj")
    # even though the result prints in string-like form, it is actually a pyparsing ParseResults
    print(type(result), result) # -> <class 'pyparsing.ParseResults'> ['sldkj', 'lsdkj', 'sldkj']

    # Use as_list() to create an actual list
    result_list = result.as_list()
    print(type(result_list), result_list) # -> <class 'list'> ['sldkj', 'lsdkj', 'sldkj']

---
## as_dict
```python
from results import as_dict
```

Returns the named parse results as a nested dictionary.

Example::

    integer = Word(nums)
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

    result = date_str.parse_string('12/31/1999')
    print(type(result), repr(result)) # -> <class 'pyparsing.ParseResults'> (['12', '/', '31', '/', '1999'], {'day': [('1999', 4)], 'year': [('12', 0)], 'month': [('31', 2)]})

    result_dict = result.as_dict()
    print(type(result_dict), repr(result_dict)) # -> <class 'dict'> {'day': '1999', 'year': '12', 'month': '31'}

    # even though a ParseResults supports dict-like access, sometime you just need to have a dict
    import json
    print(json.dumps(result)) # -> Exception: TypeError: ... is not JSON serializable
    print(json.dumps(result.as_dict())) # -> {"month": "31", "day": "1999", "year": "12"}

---
## copy
```python
from results import copy
```

Returns a new shallow copy of a :class:`ParseResults` object. `ParseResults`
items contained within the source are shared with the copy. Use
:class:`ParseResults.deepcopy()` to create a copy with its own separate
content values.

---
## deepcopy
```python
from results import deepcopy
```

Returns a new deep copy of a :class:`ParseResults` object.

---
## get_name
```python
from results import get_name
```

Returns the results name for this token expression. Useful when several
different expressions might match at a particular location.

Example::

    integer = Word(nums)
    ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
    house_number_expr = Suppress('#') + Word(nums, alphanums)
    user_data = (Group(house_number_expr)("house_number")
                | Group(ssn_expr)("ssn")
                | Group(integer)("age"))
    user_info = user_data[1, ...]

    result = user_info.parse_string("22 111-22-3333 #221B")
    for item in result:
        print(item.get_name(), ':', item[0])

prints::

    age : 22
    ssn : 111-22-3333
    house_number : 221B

---
## dump
```python
from results import dump
```

Diagnostic method for listing out the contents of
a :class:`ParseResults`. Accepts an optional ``indent`` argument so
that this string can be embedded in a nested display of other data.

Example::

    integer = Word(nums)
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

    result = date_str.parse_string('1999/12/31')
    print(result.dump())

prints::

    ['1999', '/', '12', '/', '31']
    - day: '31'
    - month: '12'
    - year: '1999'

---
## pprint
```python
from results import pprint
```

Pretty-printer for parsed results as a list, using the
`pprint <https://docs.python.org/3/library/pprint.html>`_ module.
Accepts additional positional or keyword args as defined for
`pprint.pprint <https://docs.python.org/3/library/pprint.html#pprint.pprint>`_ .

Example::

    ident = Word(alphas, alphanums)
    num = Word(nums)
    func = Forward()
    term = ident | num | Group('(' + func + ')')
    func <<= ident + Group(Optional(DelimitedList(term)))
    result = func.parse_string("fna a,b,(fnb c,d,200),100")
    result.pprint(width=40)

prints::

    ['fna',
     ['a',
      'b',
      ['(', 'fnb', ['c', 'd', '200'], ')'],
      '100']]

---
## __getnewargs__
```python
from results import __getnewargs__
```



---
## __dir__
```python
from results import __dir__
```



---
## from_dict
```python
from results import from_dict
```

Helper classmethod to construct a ``ParseResults`` from a ``dict``, preserving the
name-value relations as results names. If an optional ``name`` argument is
given, a nested ``ParseResults`` will be returned.

---
## to_item
```python
from results import to_item
```



---
## is_iterable
```python
from results import is_iterable
```



---
## __name__
```python
from unicode import __name__
```



---
## _lazyclassproperty
```python
from unicode import _lazyclassproperty
```



---
## unicode_set
```python
from unicode import unicode_set
```

A set of Unicode characters, for language-specific strings for
``alphas``, ``nums``, ``alphanums``, and ``printables``.
A unicode_set is defined by a list of ranges in the Unicode character
set, in a class attribute ``_ranges``. Ranges can be specified using
2-tuples or a 1-tuple, such as::

    _ranges = [
        (0x0020, 0x007e),
        (0x00a0, 0x00ff),
        (0x0100,),
        ]

Ranges are left- and right-inclusive. A 1-tuple of (x,) is treated as (x, x).

A unicode set can also be defined using multiple inheritance of other unicode sets::

    class CJK(Chinese, Japanese, Korean):
        pass

---
## pyparsing_unicode
```python
from unicode import pyparsing_unicode
```

A namespace class for defining common language unicode_sets.

---
## __init__
```python
from unicode import __init__
```



---
## __get__
```python
from unicode import __get__
```



---
## _chars_for_ranges
```python
from unicode import _chars_for_ranges
```



---
## printables
```python
from unicode import printables
```

all non-whitespace characters in this range

---
## alphas
```python
from unicode import alphas
```

all alphabetic characters in this range

---
## nums
```python
from unicode import nums
```

all numeric digit characters in this range

---
## alphanums
```python
from unicode import alphanums
```

all alphanumeric characters in this range

---
## identchars
```python
from unicode import identchars
```

all characters in this range that are valid identifier characters, plus underscore '_'

---
## identbodychars
```python
from unicode import identbodychars
```

all characters in this range that are valid identifier body characters,
plus the digits 0-9, and · (Unicode MIDDLE DOT)

---
## identifier
```python
from unicode import identifier
```

a pyparsing Word expression for an identifier using this range's definitions for
identchars and identbodychars

---
## BasicMultilingualPlane
```python
from unicode import BasicMultilingualPlane
```

Unicode set for the Basic Multilingual Plane

---
## Latin1
```python
from unicode import Latin1
```

Unicode set for Latin-1 Unicode Character Range

---
## LatinA
```python
from unicode import LatinA
```

Unicode set for Latin-A Unicode Character Range

---
## LatinB
```python
from unicode import LatinB
```

Unicode set for Latin-B Unicode Character Range

---
## Greek
```python
from unicode import Greek
```

Unicode set for Greek Unicode Character Ranges

---
## Cyrillic
```python
from unicode import Cyrillic
```

Unicode set for Cyrillic Unicode Character Range

---
## Chinese
```python
from unicode import Chinese
```

Unicode set for Chinese Unicode Character Range

---
## Japanese
```python
from unicode import Japanese
```

Unicode set for Japanese Unicode Character Range, combining Kanji, Hiragana, and Katakana ranges

---
## Hangul
```python
from unicode import Hangul
```

Unicode set for Hangul (Korean) Unicode Character Range

---
## CJK
```python
from unicode import CJK
```

Unicode set for combined Chinese, Japanese, and Korean (CJK) Unicode Character Range

---
## Thai
```python
from unicode import Thai
```

Unicode set for Thai Unicode Character Range

---
## Arabic
```python
from unicode import Arabic
```

Unicode set for Arabic Unicode Character Range

---
## Hebrew
```python
from unicode import Hebrew
```

Unicode set for Hebrew Unicode Character Range

---
## Devanagari
```python
from unicode import Devanagari
```

Unicode set for Devanagari Unicode Character Range

---
## Kanji
```python
from unicode import Kanji
```

Unicode set for Kanji Unicode Character Range

---
## Hiragana
```python
from unicode import Hiragana
```

Unicode set for Hiragana Unicode Character Range

---
## Katakana
```python
from unicode import Katakana
```

Unicode set for Katakana  Unicode Character Range

---
## __config_flags
```python
from util import __config_flags
```

Internal class for defining compatibility and debugging flags

---
## col
```python
from util import col
```

Returns current column within a string, counting newlines as line separators.
The first column is number 1.

Note: the default parsing behavior is to expand tabs in the input string
before starting the parsing process.  See
:class:`ParserElement.parse_string` for more
information on parsing strings containing ``<TAB>`` s, and suggested
methods to maintain a consistent view of the parsed string, the parse
location, and line and column positions within the parsed string.

---
## lineno
```python
from util import lineno
```

Returns current line number within a string, counting newlines as line separators.
The first line is number 1.

Note - the default parsing behavior is to expand tabs in the input string
before starting the parsing process.  See :class:`ParserElement.parse_string`
for more information on parsing strings containing ``<TAB>`` s, and
suggested methods to maintain a consistent view of the parsed string, the
parse location, and line and column positions within the parsed string.

---
## line
```python
from util import line
```

Returns the line of text containing loc within a string, counting newlines as line separators.

---
## _UnboundedCache
```python
from util import _UnboundedCache
```



---
## _FifoCache
```python
from util import _FifoCache
```



---
## LRUMemo
```python
from util import LRUMemo
```

A memoizing mapping that retains `capacity` deleted items

The memo tracks retained items by their access order; once `capacity` items
are retained, the least recently used item is discarded.

---
## UnboundedMemo
```python
from util import UnboundedMemo
```

A memoizing mapping that retains all deleted items

---
## _escape_regex_range_chars
```python
from util import _escape_regex_range_chars
```



---
## _collapse_string_to_ranges
```python
from util import _collapse_string_to_ranges
```



---
## _flatten
```python
from util import _flatten
```



---
## replaced_by_pep8
```python
from util import replaced_by_pep8
```



---
## _set
```python
from util import _set
```



---
## __getitem__
```python
from util import __getitem__
```



---
## __setitem__
```python
from util import __setitem__
```



---
## __delitem__
```python
from util import __delitem__
```



---
## clear
```python
from util import clear
```

Clear the cache.

---
## is_consecutive
```python
from util import is_consecutive
```



---
## escape_re_range_char
```python
from util import escape_re_range_char
```



---
## no_escape_re_range_char
```python
from util import no_escape_re_range_char
```



---
## set_
```python
from util import set_
```



---
## _inner
```python
from util import _inner
```



---
## __name__
```python
from actions import __name__
```



---
## OnlyOnce
```python
from actions import OnlyOnce
```

Wrapper for parse actions, to ensure they are only called once.

---
## match_only_at_col
```python
from actions import match_only_at_col
```

Helper method for defining parse actions that require matching at
a specific column in the input text.

---
## replace_with
```python
from actions import replace_with
```

Helper method for common parse actions that simply return
a literal value.  Especially useful when used with
:class:`transform_string<ParserElement.transform_string>` ().

Example::

    num = Word(nums).set_parse_action(lambda toks: int(toks[0]))
    na = one_of("N/A NA").set_parse_action(replace_with(math.nan))
    term = na | num

    term[1, ...].parse_string("324 234 N/A 234") # -> [324, 234, nan, 234]

---
## remove_quotes
```python
from actions import remove_quotes
```

Helper parse action for removing quotation marks from parsed
quoted strings.

Example::

    # by default, quotation marks are included in parsed results
    quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["'Now is the Winter of our Discontent'"]

    # use remove_quotes to strip quotation marks from parsed results
    quoted_string.set_parse_action(remove_quotes)
    quoted_string.parse_string("'Now is the Winter of our Discontent'") # -> ["Now is the Winter of our Discontent"]

---
## with_attribute
```python
from actions import with_attribute
```

Helper to create a validating parse action to be used with start
tags created with :class:`make_xml_tags` or
:class:`make_html_tags`. Use ``with_attribute`` to qualify
a starting tag with a required attribute value, to avoid false
matches on common tags such as ``<TD>`` or ``<DIV>``.

Call ``with_attribute`` with a series of attribute names and
values. Specify the list of filter attributes names and values as:

- keyword arguments, as in ``(align="right")``, or
- as an explicit dict with ``**`` operator, when an attribute
  name is also a Python reserved word, as in ``**{"class":"Customer", "align":"right"}``
- a list of name-value tuples, as in ``(("ns1:class", "Customer"), ("ns2:align", "right"))``

For attribute names with a namespace prefix, you must use the second
form.  Attribute names are matched insensitive to upper/lower case.

If just testing for ``class`` (with or without a namespace), use
:class:`with_class`.

To verify that the attribute exists, but without specifying a value,
pass ``with_attribute.ANY_VALUE`` as the value.

Example::

    html = '''
        <div>
        Some text
        <div type="grid">1 4 0 1 0</div>
        <div type="graph">1,3 2,3 1,1</div>
        <div>this has no type</div>
        </div>
    '''
    div,div_end = make_html_tags("div")

    # only match div tag having a type attribute with value "grid"
    div_grid = div().set_parse_action(with_attribute(type="grid"))
    grid_expr = div_grid + SkipTo(div | div_end)("body")
    for grid_header in grid_expr.search_string(html):
        print(grid_header.body)

    # construct a match with any div tag having a type attribute, regardless of the value
    div_any_type = div().set_parse_action(with_attribute(type=with_attribute.ANY_VALUE))
    div_expr = div_any_type + SkipTo(div | div_end)("body")
    for div_header in div_expr.search_string(html):
        print(div_header.body)

prints::

    1 4 0 1 0

    1 4 0 1 0
    1,3 2,3 1,1

---
## with_class
```python
from actions import with_class
```

Simplified version of :class:`with_attribute` when
matching on a div class - made difficult because ``class`` is
a reserved word in Python.

Example::

    html = '''
        <div>
        Some text
        <div class="grid">1 4 0 1 0</div>
        <div class="graph">1,3 2,3 1,1</div>
        <div>this &lt;div&gt; has no class</div>
        </div>

    '''
    div,div_end = make_html_tags("div")
    div_grid = div().set_parse_action(with_class("grid"))

    grid_expr = div_grid + SkipTo(div | div_end)("body")
    for grid_header in grid_expr.search_string(html):
        print(grid_header.body)

    div_any_type = div().set_parse_action(with_class(withAttribute.ANY_VALUE))
    div_expr = div_any_type + SkipTo(div | div_end)("body")
    for div_header in div_expr.search_string(html):
        print(div_header.body)

prints::

    1 4 0 1 0

    1 4 0 1 0
    1,3 2,3 1,1

---
## __init__
```python
from actions import __init__
```



---
## __call__
```python
from actions import __call__
```



---
## reset
```python
from actions import reset
```

Allow the associated parse action to be called once more.

---
## verify_col
```python
from actions import verify_col
```



---
## pa
```python
from actions import pa
```



---
## version_info
```python
from __init__ import version_info
```



---
## __version__
```python
from __init__ import __version__
```



---
## __compat__
```python
from core import __compat__
```

A cross-version compatibility configuration for pyparsing features that will be
released in a future version. By setting values in this configuration to True,
those features can be enabled in prior versions for compatibility development
and testing.

- ``collect_all_And_tokens`` - flag to enable fix for Issue #63 that fixes erroneous grouping
  of results names when an :class:`And` expression is nested within an :class:`Or` or :class:`MatchFirst`;
  maintained for compatibility, but setting to ``False`` no longer restores pre-2.3.1
  behavior

---
## __diag__
```python
from core import __diag__
```



---
## Diagnostics
```python
from core import Diagnostics
```

Diagnostic configuration (all default to disabled)

- ``warn_multiple_tokens_in_named_alternation`` - flag to enable warnings when a results
  name is defined on a :class:`MatchFirst` or :class:`Or` expression with one or more :class:`And` subexpressions
- ``warn_ungrouped_named_tokens_in_collection`` - flag to enable warnings when a results
  name is defined on a containing expression with ungrouped subexpressions that also
  have results names
- ``warn_name_set_on_empty_Forward`` - flag to enable warnings when a :class:`Forward` is defined
  with a results name, but has no contents defined
- ``warn_on_parse_using_empty_Forward`` - flag to enable warnings when a :class:`Forward` is
  defined in a grammar but has never had an expression attached to it
- ``warn_on_assignment_to_Forward`` - flag to enable warnings when a :class:`Forward` is defined
  but is overwritten by assigning using ``'='`` instead of ``'<<='`` or ``'<<'``
- ``warn_on_multiple_string_args_to_oneof`` - flag to enable warnings when :class:`one_of` is
  incorrectly called with multiple str arguments
- ``enable_debug_on_named_expressions`` - flag to auto-enable debug on all subsequent
  calls to :class:`ParserElement.set_name`

Diagnostics are enabled/disabled by calling :class:`enable_diag` and :class:`disable_diag`.
All warnings can be enabled by calling :class:`enable_all_warnings`.

---
## enable_diag
```python
from core import enable_diag
```

Enable a global pyparsing diagnostic flag (see :class:`Diagnostics`).

---
## disable_diag
```python
from core import disable_diag
```

Disable a global pyparsing diagnostic flag (see :class:`Diagnostics`).

---
## enable_all_warnings
```python
from core import enable_all_warnings
```



---
## _should_enable_warnings
```python
from core import _should_enable_warnings
```



---
## _trim_arity
```python
from core import _trim_arity
```

decorator to trim function calls to match the arity of the target

---
## condition_as_parse_action
```python
from core import condition_as_parse_action
```

Function to convert a simple predicate function that returns ``True`` or ``False``
into a parse action. Can be used in places when a parse action is required
and :class:`ParserElement.add_condition` cannot be used (such as when adding a condition
to an operator level in :class:`infix_notation`).

Optional keyword arguments:

- ``message`` - define a custom message to be used in the raised exception
- ``fatal`` - if True, will raise :class:`ParseFatalException` to stop parsing immediately;
  otherwise will raise :class:`ParseException`

---
## _default_start_debug_action
```python
from core import _default_start_debug_action
```



---
## _default_success_debug_action
```python
from core import _default_success_debug_action
```



---
## _default_exception_debug_action
```python
from core import _default_exception_debug_action
```



---
## null_debug_action
```python
from core import null_debug_action
```

'Do-nothing' debug action, to suppress debugging output during parsing.

---
## ParserElement
```python
from core import ParserElement
```

Abstract base level parser element class.

---
## _PendingSkip
```python
from core import _PendingSkip
```



---
## Token
```python
from core import Token
```

Abstract :class:`ParserElement` subclass, for defining atomic
matching patterns.

---
## NoMatch
```python
from core import NoMatch
```

A token that will never match.

---
## Literal
```python
from core import Literal
```

Token to exactly match a specified string.

Example::

    Literal('abc').parse_string('abc')  # -> ['abc']
    Literal('abc').parse_string('abcdef')  # -> ['abc']
    Literal('abc').parse_string('ab')  # -> Exception: Expected "abc"

For case-insensitive matching, use :class:`CaselessLiteral`.

For keyword matching (force word break before and after the matched string),
use :class:`Keyword` or :class:`CaselessKeyword`.

---
## Empty
```python
from core import Empty
```

An empty token, will always match.

---
## _SingleCharLiteral
```python
from core import _SingleCharLiteral
```



---
## Keyword
```python
from core import Keyword
```

Token to exactly match a specified string as a keyword, that is,
it must be immediately preceded and followed by whitespace or
non-keyword characters. Compare with :class:`Literal`:

- ``Literal("if")`` will match the leading ``'if'`` in
  ``'ifAndOnlyIf'``.
- ``Keyword("if")`` will not; it will only match the leading
  ``'if'`` in ``'if x=1'``, or ``'if(y==2)'``

Accepts two optional constructor arguments in addition to the
keyword string:

- ``ident_chars`` is a string of characters that would be valid
  identifier characters, defaulting to all alphanumerics + "_" and
  "$"
- ``caseless`` allows case-insensitive matching, default is ``False``.

Example::

    Keyword("start").parse_string("start")  # -> ['start']
    Keyword("start").parse_string("starting")  # -> Exception

For case-insensitive matching, use :class:`CaselessKeyword`.

---
## CaselessLiteral
```python
from core import CaselessLiteral
```

Token to match a specified string, ignoring case of letters.
Note: the matched results will always be in the case of the given
match string, NOT the case of the input text.

Example::

    CaselessLiteral("CMD")[1, ...].parse_string("cmd CMD Cmd10")
    # -> ['CMD', 'CMD', 'CMD']

(Contrast with example for :class:`CaselessKeyword`.)

---
## CaselessKeyword
```python
from core import CaselessKeyword
```

Caseless version of :class:`Keyword`.

Example::

    CaselessKeyword("CMD")[1, ...].parse_string("cmd CMD Cmd10")
    # -> ['CMD', 'CMD']

(Contrast with example for :class:`CaselessLiteral`.)

---
## CloseMatch
```python
from core import CloseMatch
```

A variation on :class:`Literal` which matches "close" matches,
that is, strings with at most 'n' mismatching characters.
:class:`CloseMatch` takes parameters:

- ``match_string`` - string to be matched
- ``caseless`` - a boolean indicating whether to ignore casing when comparing characters
- ``max_mismatches`` - (``default=1``) maximum number of
  mismatches allowed to count as a match

The results from a successful parse will contain the matched text
from the input string and the following named results:

- ``mismatches`` - a list of the positions within the
  match_string where mismatches were found
- ``original`` - the original match_string used to compare
  against the input string

If ``mismatches`` is an empty list, then the match was an exact
match.

Example::

    patt = CloseMatch("ATCATCGAATGGA")
    patt.parse_string("ATCATCGAAXGGA") # -> (['ATCATCGAAXGGA'], {'mismatches': [[9]], 'original': ['ATCATCGAATGGA']})
    patt.parse_string("ATCAXCGAAXGGA") # -> Exception: Expected 'ATCATCGAATGGA' (with up to 1 mismatches) (at char 0), (line:1, col:1)

    # exact match
    patt.parse_string("ATCATCGAATGGA") # -> (['ATCATCGAATGGA'], {'mismatches': [[]], 'original': ['ATCATCGAATGGA']})

    # close match allowing up to 2 mismatches
    patt = CloseMatch("ATCATCGAATGGA", max_mismatches=2)
    patt.parse_string("ATCAXCGAAXGGA") # -> (['ATCAXCGAAXGGA'], {'mismatches': [[4, 9]], 'original': ['ATCATCGAATGGA']})

---
## Word
```python
from core import Word
```

Token for matching words composed of allowed character sets.

Parameters:

- ``init_chars`` - string of all characters that should be used to
  match as a word; "ABC" will match "AAA", "ABAB", "CBAC", etc.;
  if ``body_chars`` is also specified, then this is the string of
  initial characters
- ``body_chars`` - string of characters that
  can be used for matching after a matched initial character as
  given in ``init_chars``; if omitted, same as the initial characters
  (default=``None``)
- ``min`` - minimum number of characters to match (default=1)
- ``max`` - maximum number of characters to match (default=0)
- ``exact`` - exact number of characters to match (default=0)
- ``as_keyword`` - match as a keyword (default=``False``)
- ``exclude_chars`` - characters that might be
  found in the input ``body_chars`` string but which should not be
  accepted for matching ;useful to define a word of all
  printables except for one or two characters, for instance
  (default=``None``)

:class:`srange` is useful for defining custom character set strings
for defining :class:`Word` expressions, using range notation from
regular expression character sets.

A common mistake is to use :class:`Word` to match a specific literal
string, as in ``Word("Address")``. Remember that :class:`Word`
uses the string argument to define *sets* of matchable characters.
This expression would match "Add", "AAA", "dAred", or any other word
made up of the characters 'A', 'd', 'r', 'e', and 's'. To match an
exact literal string, use :class:`Literal` or :class:`Keyword`.

pyparsing includes helper strings for building Words:

- :class:`alphas`
- :class:`nums`
- :class:`alphanums`
- :class:`hexnums`
- :class:`alphas8bit` (alphabetic characters in ASCII range 128-255
  - accented, tilded, umlauted, etc.)
- :class:`punc8bit` (non-alphabetic characters in ASCII range
  128-255 - currency, symbols, superscripts, diacriticals, etc.)
- :class:`printables` (any non-whitespace character)

``alphas``, ``nums``, and ``printables`` are also defined in several
Unicode sets - see :class:`pyparsing_unicode``.

Example::

    # a word composed of digits
    integer = Word(nums) # equivalent to Word("0123456789") or Word(srange("0-9"))

    # a word with a leading capital, and zero or more lowercase
    capitalized_word = Word(alphas.upper(), alphas.lower())

    # hostnames are alphanumeric, with leading alpha, and '-'
    hostname = Word(alphas, alphanums + '-')

    # roman numeral (not a strict parser, accepts invalid mix of characters)
    roman = Word("IVXLCDM")

    # any string of non-whitespace characters, except for ','
    csv_value = Word(printables, exclude_chars=",")

---
## Char
```python
from core import Char
```

A short-cut class for defining :class:`Word` ``(characters, exact=1)``,
when defining a match of any single character in a string of
characters.

---
## Regex
```python
from core import Regex
```

Token for matching strings that match a given regular
expression. Defined with string specifying the regular expression in
a form recognized by the stdlib Python  `re module <https://docs.python.org/3/library/re.html>`_.
If the given regex contains named groups (defined using ``(?P<name>...)``),
these will be preserved as named :class:`ParseResults`.

If instead of the Python stdlib ``re`` module you wish to use a different RE module
(such as the ``regex`` module), you can do so by building your ``Regex`` object with
a compiled RE that was compiled using ``regex``.

Example::

    realnum = Regex(r"[+-]?\d+\.\d*")
    # ref: https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression
    roman = Regex(r"M{0,4}(CM|CD|D?{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})")

    # named fields in a regex will be returned as named results
    date = Regex(r'(?P<year>\d{4})-(?P<month>\d\d?)-(?P<day>\d\d?)')

    # the Regex class will accept re's compiled using the regex module
    import regex
    parser = pp.Regex(regex.compile(r'[0-9]'))

---
## QuotedString
```python
from core import QuotedString
```

Token for matching strings that are delimited by quoting characters.

Defined with the following parameters:

- ``quote_char`` - string of one or more characters defining the
  quote delimiting string
- ``esc_char`` - character to re_escape quotes, typically backslash
  (default= ``None``)
- ``esc_quote`` - special quote sequence to re_escape an embedded quote
  string (such as SQL's ``""`` to re_escape an embedded ``"``)
  (default= ``None``)
- ``multiline`` - boolean indicating whether quotes can span
  multiple lines (default= ``False``)
- ``unquote_results`` - boolean indicating whether the matched text
  should be unquoted (default= ``True``)
- ``end_quote_char`` - string of one or more characters defining the
  end of the quote delimited string (default= ``None``  => same as
  quote_char)
- ``convert_whitespace_escapes`` - convert escaped whitespace
  (``'\t'``, ``'\n'``, etc.) to actual whitespace
  (default= ``True``)

Example::

    qs = QuotedString('"')
    print(qs.search_string('lsjdf "This is the quote" sldjf'))
    complex_qs = QuotedString('{{', end_quote_char='}}')
    print(complex_qs.search_string('lsjdf {{This is the "quote"}} sldjf'))
    sql_qs = QuotedString('"', esc_quote='""')
    print(sql_qs.search_string('lsjdf "This is the quote with ""embedded"" quotes" sldjf'))

prints::

    [['This is the quote']]
    [['This is the "quote"']]
    [['This is the quote with "embedded" quotes']]

---
## CharsNotIn
```python
from core import CharsNotIn
```

Token for matching words composed of characters *not* in a given
set (will include whitespace in matched characters if not listed in
the provided exclusion set - see example). Defined with string
containing all disallowed characters, and an optional minimum,
maximum, and/or exact length.  The default value for ``min`` is
1 (a minimum value < 1 is not valid); the default values for
``max`` and ``exact`` are 0, meaning no maximum or exact
length restriction.

Example::

    # define a comma-separated-value as anything that is not a ','
    csv_value = CharsNotIn(',')
    print(DelimitedList(csv_value).parse_string("dkls,lsdkjf,s12 34,@!#,213"))

prints::

    ['dkls', 'lsdkjf', 's12 34', '@!#', '213']

---
## White
```python
from core import White
```

Special matching class for matching whitespace.  Normally,
whitespace is ignored by pyparsing grammars.  This class is included
when some whitespace structures are significant.  Define with
a string containing the whitespace characters to be matched; default
is ``" \t\r\n"``.  Also takes optional ``min``,
``max``, and ``exact`` arguments, as defined for the
:class:`Word` class.

---
## PositionToken
```python
from core import PositionToken
```



---
## GoToColumn
```python
from core import GoToColumn
```

Token to advance to a specific column of input text; useful for
tabular report scraping.

---
## LineStart
```python
from core import LineStart
```

Matches if current position is at the beginning of a line within
the parse string

Example::

    test = '''\
    AAA this line
    AAA and this line
      AAA but not this one
    B AAA and definitely not this one
    '''

    for t in (LineStart() + 'AAA' + rest_of_line).search_string(test):
        print(t)

prints::

    ['AAA', ' this line']
    ['AAA', ' and this line']

---
## LineEnd
```python
from core import LineEnd
```

Matches if current position is at the end of a line within the
parse string

---
## StringStart
```python
from core import StringStart
```

Matches if current position is at the beginning of the parse
string

---
## StringEnd
```python
from core import StringEnd
```

Matches if current position is at the end of the parse string

---
## WordStart
```python
from core import WordStart
```

Matches if the current position is at the beginning of a
:class:`Word`, and is not preceded by any character in a given
set of ``word_chars`` (default= ``printables``). To emulate the
```` behavior of regular expressions, use
``WordStart(alphanums)``. ``WordStart`` will also match at
the beginning of the string being parsed, or at the beginning of
a line.

---
## WordEnd
```python
from core import WordEnd
```

Matches if the current position is at the end of a :class:`Word`,
and is not followed by any character in a given set of ``word_chars``
(default= ``printables``). To emulate the ```` behavior of
regular expressions, use ``WordEnd(alphanums)``. ``WordEnd``
will also match at the end of the string being parsed, or at the end
of a line.

---
## Tag
```python
from core import Tag
```

A meta-element for inserting a named result into the parsed
tokens that may be checked later in a parse action or while
processing the parsed results. Accepts an optional tag value,
defaulting to `True`.

Example::

    end_punc = "." | ("!" + Tag("enthusiastic")))
    greeting = "Hello," + Word(alphas) + end_punc

    result = greeting.parse_string("Hello, World.")
    print(result.dump())

    result = greeting.parse_string("Hello, World!")
    print(result.dump())

prints::

    ['Hello,', 'World', '.']

    ['Hello,', 'World', '!']
    - enthusiastic: True

---
## ParseExpression
```python
from core import ParseExpression
```

Abstract subclass of ParserElement, for combining and
post-processing parsed tokens.

---
## And
```python
from core import And
```

Requires all given :class:`ParseExpression` s to be found in the given order.
Expressions may be separated by whitespace.
May be constructed using the ``'+'`` operator.
May also be constructed using the ``'-'`` operator, which will
suppress backtracking.

Example::

    integer = Word(nums)
    name_expr = Word(alphas)[1, ...]

    expr = And([integer("id"), name_expr("name"), integer("age")])
    # more easily written as:
    expr = integer("id") + name_expr("name") + integer("age")

---
## Or
```python
from core import Or
```

Requires that at least one :class:`ParseExpression` is found. If
two expressions match, the expression that matches the longest
string will be used. May be constructed using the ``'^'``
operator.

Example::

    # construct Or using '^' operator

    number = Word(nums) ^ Combine(Word(nums) + '.' + Word(nums))
    print(number.search_string("123 3.1416 789"))

prints::

    [['123'], ['3.1416'], ['789']]

---
## MatchFirst
```python
from core import MatchFirst
```

Requires that at least one :class:`ParseExpression` is found. If
more than one expression matches, the first one listed is the one that will
match. May be constructed using the ``'|'`` operator.

Example::

    # construct MatchFirst using '|' operator

    # watch the order of expressions to match
    number = Word(nums) | Combine(Word(nums) + '.' + Word(nums))
    print(number.search_string("123 3.1416 789")) #  Fail! -> [['123'], ['3'], ['1416'], ['789']]

    # put more selective expression first
    number = Combine(Word(nums) + '.' + Word(nums)) | Word(nums)
    print(number.search_string("123 3.1416 789")) #  Better -> [['123'], ['3.1416'], ['789']]

---
## Each
```python
from core import Each
```

Requires all given :class:`ParseExpression` s to be found, but in
any order. Expressions may be separated by whitespace.

May be constructed using the ``'&'`` operator.

Example::

    color = one_of("RED ORANGE YELLOW GREEN BLUE PURPLE BLACK WHITE BROWN")
    shape_type = one_of("SQUARE CIRCLE TRIANGLE STAR HEXAGON OCTAGON")
    integer = Word(nums)
    shape_attr = "shape:" + shape_type("shape")
    posn_attr = "posn:" + Group(integer("x") + ',' + integer("y"))("posn")
    color_attr = "color:" + color("color")
    size_attr = "size:" + integer("size")

    # use Each (using operator '&') to accept attributes in any order
    # (shape and posn are required, color and size are optional)
    shape_spec = shape_attr & posn_attr & Opt(color_attr) & Opt(size_attr)

    shape_spec.run_tests('''
        shape: SQUARE color: BLACK posn: 100, 120
        shape: CIRCLE size: 50 color: BLUE posn: 50,80
        color:GREEN size:20 shape:TRIANGLE posn:20,40
        '''
        )

prints::

    shape: SQUARE color: BLACK posn: 100, 120
    ['shape:', 'SQUARE', 'color:', 'BLACK', 'posn:', ['100', ',', '120']]
    - color: BLACK
    - posn: ['100', ',', '120']
      - x: 100
      - y: 120
    - shape: SQUARE


    shape: CIRCLE size: 50 color: BLUE posn: 50,80
    ['shape:', 'CIRCLE', 'size:', '50', 'color:', 'BLUE', 'posn:', ['50', ',', '80']]
    - color: BLUE
    - posn: ['50', ',', '80']
      - x: 50
      - y: 80
    - shape: CIRCLE
    - size: 50


    color: GREEN size: 20 shape: TRIANGLE posn: 20,40
    ['color:', 'GREEN', 'size:', '20', 'shape:', 'TRIANGLE', 'posn:', ['20', ',', '40']]
    - color: GREEN
    - posn: ['20', ',', '40']
      - x: 20
      - y: 40
    - shape: TRIANGLE
    - size: 20

---
## ParseElementEnhance
```python
from core import ParseElementEnhance
```

Abstract subclass of :class:`ParserElement`, for combining and
post-processing parsed tokens.

---
## IndentedBlock
```python
from core import IndentedBlock
```

Expression to match one or more expressions at a given indentation level.
Useful for parsing text where structure is implied by indentation (like Python source code).

---
## AtStringStart
```python
from core import AtStringStart
```

Matches if expression matches at the beginning of the parse
string::

    AtStringStart(Word(nums)).parse_string("123")
    # prints ["123"]

    AtStringStart(Word(nums)).parse_string("    123")
    # raises ParseException

---
## AtLineStart
```python
from core import AtLineStart
```

Matches if an expression matches at the beginning of a line within
the parse string

Example::

    test = '''\
    AAA this line
    AAA and this line
      AAA but not this one
    B AAA and definitely not this one
    '''

    for t in (AtLineStart('AAA') + rest_of_line).search_string(test):
        print(t)

prints::

    ['AAA', ' this line']
    ['AAA', ' and this line']

---
## FollowedBy
```python
from core import FollowedBy
```

Lookahead matching of the given parse expression.
``FollowedBy`` does *not* advance the parsing position within
the input string, it only verifies that the specified parse
expression matches at the current position.  ``FollowedBy``
always returns a null token list. If any results names are defined
in the lookahead expression, those *will* be returned for access by
name.

Example::

    # use FollowedBy to match a label only if it is followed by a ':'
    data_word = Word(alphas)
    label = data_word + FollowedBy(':')
    attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))

    attr_expr[1, ...].parse_string("shape: SQUARE color: BLACK posn: upper left").pprint()

prints::

    [['shape', 'SQUARE'], ['color', 'BLACK'], ['posn', 'upper left']]

---
## PrecededBy
```python
from core import PrecededBy
```

Lookbehind matching of the given parse expression.
``PrecededBy`` does not advance the parsing position within the
input string, it only verifies that the specified parse expression
matches prior to the current position.  ``PrecededBy`` always
returns a null token list, but if a results name is defined on the
given expression, it is returned.

Parameters:

- ``expr`` - expression that must match prior to the current parse
  location
- ``retreat`` - (default= ``None``) - (int) maximum number of characters
  to lookbehind prior to the current parse location

If the lookbehind expression is a string, :class:`Literal`,
:class:`Keyword`, or a :class:`Word` or :class:`CharsNotIn`
with a specified exact or maximum length, then the retreat
parameter is not required. Otherwise, retreat must be specified to
give a maximum number of characters to look back from
the current parse position for a lookbehind match.

Example::

    # VB-style variable names with type prefixes
    int_var = PrecededBy("#") + pyparsing_common.identifier
    str_var = PrecededBy("$") + pyparsing_common.identifier

---
## Located
```python
from core import Located
```

Decorates a returned token with its starting and ending
locations in the input string.

This helper adds the following results names:

- ``locn_start`` - location where matched expression begins
- ``locn_end`` - location where matched expression ends
- ``value`` - the actual parsed results

Be careful if the input text contains ``<TAB>`` characters, you
may want to call :class:`ParserElement.parse_with_tabs`

Example::

    wd = Word(alphas)
    for match in Located(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
        print(match)

prints::

    [0, ['ljsdf'], 5]
    [8, ['lksdjjf'], 15]
    [18, ['lkkjj'], 23]

---
## NotAny
```python
from core import NotAny
```

Lookahead to disallow matching with the given parse expression.
``NotAny`` does *not* advance the parsing position within the
input string, it only verifies that the specified parse expression
does *not* match at the current position.  Also, ``NotAny`` does
*not* skip over leading whitespace. ``NotAny`` always returns
a null token list.  May be constructed using the ``'~'`` operator.

Example::

    AND, OR, NOT = map(CaselessKeyword, "AND OR NOT".split())

    # take care not to mistake keywords for identifiers
    ident = ~(AND | OR | NOT) + Word(alphas)
    boolean_term = Opt(NOT) + ident

    # very crude boolean expression - to support parenthesis groups and
    # operation hierarchy, use infix_notation
    boolean_expr = boolean_term + ((AND | OR) + boolean_term)[...]

    # integers that are followed by "." are actually floats
    integer = Word(nums) + ~Char(".")

---
## _MultipleMatch
```python
from core import _MultipleMatch
```



---
## OneOrMore
```python
from core import OneOrMore
```

Repetition of one or more of the given expression.

Parameters:

- ``expr`` - expression that must match one or more times
- ``stop_on`` - (default= ``None``) - expression for a terminating sentinel
  (only required if the sentinel would ordinarily match the repetition
  expression)

Example::

    data_word = Word(alphas)
    label = data_word + FollowedBy(':')
    attr_expr = Group(label + Suppress(':') + OneOrMore(data_word).set_parse_action(' '.join))

    text = "shape: SQUARE posn: upper left color: BLACK"
    attr_expr[1, ...].parse_string(text).pprint()  # Fail! read 'color' as data instead of next label -> [['shape', 'SQUARE color']]

    # use stop_on attribute for OneOrMore to avoid reading label string as part of the data
    attr_expr = Group(label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
    OneOrMore(attr_expr).parse_string(text).pprint() # Better -> [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'BLACK']]

    # could also be written as
    (attr_expr * (1,)).parse_string(text).pprint()

---
## ZeroOrMore
```python
from core import ZeroOrMore
```

Optional repetition of zero or more of the given expression.

Parameters:

- ``expr`` - expression that must match zero or more times
- ``stop_on`` - expression for a terminating sentinel
  (only required if the sentinel would ordinarily match the repetition
  expression) - (default= ``None``)

Example: similar to :class:`OneOrMore`

---
## DelimitedList
```python
from core import DelimitedList
```



---
## _NullToken
```python
from core import _NullToken
```



---
## Opt
```python
from core import Opt
```

Optional matching of the given expression.

Parameters:

- ``expr`` - expression that must match zero or more times
- ``default`` (optional) - value to be returned if the optional expression is not found.

Example::

    # US postal code can be a 5-digit zip, plus optional 4-digit qualifier
    zip = Combine(Word(nums, exact=5) + Opt('-' + Word(nums, exact=4)))
    zip.run_tests('''
        # traditional ZIP code
        12345

        # ZIP+4 form
        12101-0001

        # invalid ZIP
        98765-
        ''')

prints::

    # traditional ZIP code
    12345
    ['12345']

    # ZIP+4 form
    12101-0001
    ['12101-0001']

    # invalid ZIP
    98765-
         ^
    FAIL: Expected end of text (at char 5), (line:1, col:6)

---
## SkipTo
```python
from core import SkipTo
```

Token for skipping over all undefined text until the matched
expression is found.

Parameters:

- ``expr`` - target expression marking the end of the data to be skipped
- ``include`` - if ``True``, the target expression is also parsed
  (the skipped text and target expression are returned as a 2-element
  list) (default= ``False``).
- ``ignore`` - (default= ``None``) used to define grammars (typically quoted strings and
  comments) that might contain false matches to the target expression
- ``fail_on`` - (default= ``None``) define expressions that are not allowed to be
  included in the skipped test; if found before the target expression is found,
  the :class:`SkipTo` is not a match

Example::

    report = '''
        Outstanding Issues Report - 1 Jan 2000

           # | Severity | Description                               |  Days Open
        -----+----------+-------------------------------------------+-----------
         101 | Critical | Intermittent system crash                 |          6
          94 | Cosmetic | Spelling error on Login ('log|n')         |         14
          79 | Minor    | System slow when running too many reports |         47
        '''
    integer = Word(nums)
    SEP = Suppress('|')
    # use SkipTo to simply match everything up until the next SEP
    # - ignore quoted strings, so that a '|' character inside a quoted string does not match
    # - parse action will call token.strip() for each matched token, i.e., the description body
    string_data = SkipTo(SEP, ignore=quoted_string)
    string_data.set_parse_action(token_map(str.strip))
    ticket_expr = (integer("issue_num") + SEP
                  + string_data("sev") + SEP
                  + string_data("desc") + SEP
                  + integer("days_open"))

    for tkt in ticket_expr.search_string(report):
        print tkt.dump()

prints::

    ['101', 'Critical', 'Intermittent system crash', '6']
    - days_open: '6'
    - desc: 'Intermittent system crash'
    - issue_num: '101'
    - sev: 'Critical'
    ['94', 'Cosmetic', "Spelling error on Login ('log|n')", '14']
    - days_open: '14'
    - desc: "Spelling error on Login ('log|n')"
    - issue_num: '94'
    - sev: 'Cosmetic'
    ['79', 'Minor', 'System slow when running too many reports', '47']
    - days_open: '47'
    - desc: 'System slow when running too many reports'
    - issue_num: '79'
    - sev: 'Minor'

---
## Forward
```python
from core import Forward
```

Forward declaration of an expression to be defined later -
used for recursive grammars, such as algebraic infix notation.
When the expression is known, it is assigned to the ``Forward``
variable using the ``'<<'`` operator.

Note: take care when assigning to ``Forward`` not to overlook
precedence of operators.

Specifically, ``'|'`` has a lower precedence than ``'<<'``, so that::

    fwd_expr << a | b | c

will actually be evaluated as::

    (fwd_expr << a) | b | c

thereby leaving b and c out as parseable alternatives.  It is recommended that you
explicitly group the values inserted into the ``Forward``::

    fwd_expr << (a | b | c)

Converting to use the ``'<<='`` operator instead will avoid this problem.

See :class:`ParseResults.pprint` for an example of a recursive
parser created using ``Forward``.

---
## TokenConverter
```python
from core import TokenConverter
```

Abstract subclass of :class:`ParseExpression`, for converting parsed results.

---
## Combine
```python
from core import Combine
```

Converter to concatenate all matching tokens to a single string.
By default, the matching patterns must also be contiguous in the
input string; this can be disabled by specifying
``'adjacent=False'`` in the constructor.

Example::

    real = Word(nums) + '.' + Word(nums)
    print(real.parse_string('3.1416')) # -> ['3', '.', '1416']
    # will also erroneously match the following
    print(real.parse_string('3. 1416')) # -> ['3', '.', '1416']

    real = Combine(Word(nums) + '.' + Word(nums))
    print(real.parse_string('3.1416')) # -> ['3.1416']
    # no match when there are internal spaces
    print(real.parse_string('3. 1416')) # -> Exception: Expected W:(0123...)

---
## Group
```python
from core import Group
```

A group allows a command to have subcommands attached. This is
the most common way to implement nesting in Click.

:param name: The name of the group command.
:param commands: A dict mapping names to :class:`Command` objects.
    Can also be a list of :class:`Command`, which will use
    :attr:`Command.name` to create the dict.
:param attrs: Other command arguments described in
    :class:`MultiCommand`, :class:`Command`, and
    :class:`BaseCommand`.

.. versionchanged:: 8.0
    The ``commands`` argument can be a list of command objects.

---
## Dict
```python
from core import Dict
```

Dict schema wrapper.

---
## Suppress
```python
from core import Suppress
```

Converter for ignoring the results of a parsed expression.

Example::

    source = "a, b, c,d"
    wd = Word(alphas)
    wd_list1 = wd + (',' + wd)[...]
    print(wd_list1.parse_string(source))

    # often, delimiters that are useful during parsing are just in the
    # way afterward - use Suppress to keep them out of the parsed output
    wd_list2 = wd + (Suppress(',') + wd)[...]
    print(wd_list2.parse_string(source))

    # Skipped text (using '...') can be suppressed as well
    source = "lead in START relevant text END trailing text"
    start_marker = Keyword("START")
    end_marker = Keyword("END")
    find_body = Suppress(...) + start_marker + ... + end_marker
    print(find_body.parse_string(source)

prints::

    ['a', ',', 'b', ',', 'c', ',', 'd']
    ['a', 'b', 'c', 'd']
    ['START', 'relevant text ', 'END']

(See also :class:`DelimitedList`.)

---
## trace_parse_action
```python
from core import trace_parse_action
```

Decorator for debugging parse actions.

When the parse action is called, this decorator will print
``">> entering method-name(line:<current_source_line>, <parse_location>, <matched_tokens>)"``.
When the parse action completes, the decorator will print
``"<<"`` followed by the returned value, or any exception that the parse action raised.

Example::

    wd = Word(alphas)

    @trace_parse_action
    def remove_duplicate_chars(tokens):
        return ''.join(sorted(set(''.join(tokens))))

    wds = wd[1, ...].set_parse_action(remove_duplicate_chars)
    print(wds.parse_string("slkdjs sld sldd sdlf sdljf"))

prints::

    >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
    <<leaving remove_duplicate_chars (ret: 'dfjkls')
    ['dfjkls']

---
## srange
```python
from core import srange
```

Helper to easily define string ranges for use in :class:`Word`
construction. Borrows syntax from regexp ``'[]'`` string range
definitions::

    srange("[0-9]")   -> "0123456789"
    srange("[a-z]")   -> "abcdefghijklmnopqrstuvwxyz"
    srange("[a-z$_]") -> "abcdefghijklmnopqrstuvwxyz$_"

The input string must be enclosed in []'s, and the returned string
is the expanded character set joined into a single string. The
values enclosed in the []'s may be:

- a single character
- an escaped character with a leading backslash (such as ``\-``
  or ``\]``)
- an escaped hex character with a leading ``'\x'``
  (``\x21``, which is a ``'!'`` character) (``\0x##``
  is also supported for backwards compatibility)
- an escaped octal character with a leading ``'\0'``
  (``\041``, which is a ``'!'`` character)
- a range of any of the above, separated by a dash (``'a-z'``,
  etc.)
- any combination of the above (``'aeiouy'``,
  ``'a-zA-Z0-9_$'``, etc.)

---
## token_map
```python
from core import token_map
```

Helper to define a parse action by mapping a function to all
elements of a :class:`ParseResults` list. If any additional args are passed,
they are forwarded to the given function as additional arguments
after the token, as in
``hex_integer = Word(hexnums).set_parse_action(token_map(int, 16))``,
which will convert the parsed data to an integer using base 16.

Example (compare the last to example in :class:`ParserElement.transform_string`::

    hex_ints = Word(hexnums)[1, ...].set_parse_action(token_map(int, 16))
    hex_ints.run_tests('''
        00 11 22 aa FF 0a 0d 1a
        ''')

    upperword = Word(alphas).set_parse_action(token_map(str.upper))
    upperword[1, ...].run_tests('''
        my kingdom for a horse
        ''')

    wd = Word(alphas).set_parse_action(token_map(str.title))
    wd[1, ...].set_parse_action(' '.join).run_tests('''
        now is the winter of our discontent made glorious summer by this sun of york
        ''')

prints::

    00 11 22 aa FF 0a 0d 1a
    [0, 17, 34, 170, 255, 10, 13, 26]

    my kingdom for a horse
    ['MY', 'KINGDOM', 'FOR', 'A', 'HORSE']

    now is the winter of our discontent made glorious summer by this sun of york
    ['Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York']

---
## autoname_elements
```python
from core import autoname_elements
```

Utility to simplify mass-naming of parser elements, for
generating railroad diagram with named subdiagrams.

---
## cached_property
```python
from core import cached_property
```



---
## wrapper
```python
from core import wrapper
```



---
## pa
```python
from core import pa
```



---
## set_default_whitespace_chars
```python
from core import set_default_whitespace_chars
```

Overrides the default whitespace chars

Example::

    # default whitespace chars are space, <TAB> and newline
    Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def', 'ghi', 'jkl']

    # change to just treat newline as significant
    ParserElement.set_default_whitespace_chars(" \t")
    Word(alphas)[1, ...].parse_string("abc def\nghi jkl")  # -> ['abc', 'def']

---
## inline_literals_using
```python
from core import inline_literals_using
```

Set class to be used for inclusion of string literals into a parser.

Example::

    # default literal class used is Literal
    integer = Word(nums)
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

    date_str.parse_string("1999/12/31")  # -> ['1999', '/', '12', '/', '31']


    # change to Suppress
    ParserElement.inline_literals_using(Suppress)
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

    date_str.parse_string("1999/12/31")  # -> ['1999', '12', '31']

---
## using_each
```python
from core import using_each
```

Yields a sequence of class(obj, **class_kwargs) for obj in seq.

Example::

    LPAR, RPAR, LBRACE, RBRACE, SEMI = Suppress.using_each("(){};")

---
## DebugActions
```python
from core import DebugActions
```



---
## suppress_warning
```python
from core import suppress_warning
```

Suppress warnings emitted for a particular diagnostic on this expression.

Example::

    base = pp.Forward()
    base.suppress_warning(Diagnostics.warn_on_parse_using_empty_Forward)

    # statement would normally raise a warning, but is now suppressed
    print(base.parse_string("x"))

---
## visit_all
```python
from core import visit_all
```

General-purpose method to yield all expressions and sub-expressions
in a grammar. Typically just for internal use.

---
## copy
```python
from core import copy
```

Copy is a no-op on the maskedconstant, as it is a scalar 

---
## set_results_name
```python
from core import set_results_name
```

Define name for referencing matching tokens as a nested attribute
of the returned parse results.

Normally, results names are assigned as you would assign keys in a dict:
any existing value is overwritten by later values. If it is necessary to
keep all values captured for a particular results name, call ``set_results_name``
with ``list_all_matches`` = True.

NOTE: ``set_results_name`` returns a *copy* of the original :class:`ParserElement` object;
this is so that the client can define a basic element, such as an
integer, and reference it in multiple places with different names.

You can also set results names using the abbreviated syntax,
``expr("name")`` in place of ``expr.set_results_name("name")``
- see :class:`__call__`. If ``list_all_matches`` is required, use
``expr("name*")``.

Example::

    integer = Word(nums)
    date_str = (integer.set_results_name("year") + '/'
                + integer.set_results_name("month") + '/'
                + integer.set_results_name("day"))

    # equivalent form:
    date_str = integer("year") + '/' + integer("month") + '/' + integer("day")

---
## _setResultsName
```python
from core import _setResultsName
```



---
## set_break
```python
from core import set_break
```

Method to invoke the Python pdb debugger when this element is
about to be parsed. Set ``break_flag`` to ``True`` to enable, ``False`` to
disable.

---
## set_parse_action
```python
from core import set_parse_action
```

Define one or more actions to perform when successfully matching parse element definition.

Parse actions can be called to perform data conversions, do extra validation,
update external data structures, or enhance or replace the parsed tokens.
Each parse action ``fn`` is a callable method with 0-3 arguments, called as
``fn(s, loc, toks)`` , ``fn(loc, toks)`` , ``fn(toks)`` , or just ``fn()`` , where:

- ``s``    = the original string being parsed (see note below)
- ``loc``  = the location of the matching substring
- ``toks`` = a list of the matched tokens, packaged as a :class:`ParseResults` object

The parsed tokens are passed to the parse action as ParseResults. They can be
modified in place using list-style append, extend, and pop operations to update
the parsed list elements; and with dictionary-style item set and del operations
to add, update, or remove any named results. If the tokens are modified in place,
it is not necessary to return them with a return statement.

Parse actions can also completely replace the given tokens, with another ``ParseResults``
object, or with some entirely different object (common for parse actions that perform data
conversions). A convenient way to build a new parse result is to define the values
using a dict, and then create the return value using :class:`ParseResults.from_dict`.

If None is passed as the ``fn`` parse action, all previously added parse actions for this
expression are cleared.

Optional keyword arguments:

- ``call_during_try`` = (default= ``False``) indicate if parse action should be run during
  lookaheads and alternate testing. For parse actions that have side effects, it is
  important to only call the parse action once it is determined that it is being
  called as part of a successful parse. For parse actions that perform additional
  validation, then call_during_try should be passed as True, so that the validation
  code is included in the preliminary "try" parses.

Note: the default parsing behavior is to expand tabs in the input string
before starting the parsing process.  See :class:`parse_string` for more
information on parsing strings containing ``<TAB>`` s, and suggested
methods to maintain a consistent view of the parsed string, the parse
location, and line and column positions within the parsed string.

Example::

    # parse dates in the form YYYY/MM/DD

    # use parse action to convert toks from str to int at parse time
    def convert_to_int(toks):
        return int(toks[0])

    # use a parse action to verify that the date is a valid date
    def is_valid_date(instring, loc, toks):
        from datetime import date
        year, month, day = toks[::2]
        try:
            date(year, month, day)
        except ValueError:
            raise ParseException(instring, loc, "invalid date given")

    integer = Word(nums)
    date_str = integer + '/' + integer + '/' + integer

    # add parse actions
    integer.set_parse_action(convert_to_int)
    date_str.set_parse_action(is_valid_date)

    # note that integer fields are now ints, not strings
    date_str.run_tests('''
        # successful parse - note that integer fields were converted to ints
        1999/12/31

        # fail - invalid date
        1999/13/31
        ''')

---
## add_parse_action
```python
from core import add_parse_action
```

Add one or more parse actions to expression's list of parse actions. See :class:`set_parse_action`.

See examples in :class:`copy`.

---
## add_condition
```python
from core import add_condition
```

Add a boolean predicate function to expression's list of parse actions. See
:class:`set_parse_action` for function call signatures. Unlike ``set_parse_action``,
functions passed to ``add_condition`` need to return boolean success/fail of the condition.

Optional keyword arguments:

- ``message`` = define a custom message to be used in the raised exception
- ``fatal`` = if True, will raise ParseFatalException to stop parsing immediately; otherwise will raise
  ParseException
- ``call_during_try`` = boolean to indicate if this method should be called during internal tryParse calls,
  default=False

Example::

    integer = Word(nums).set_parse_action(lambda toks: int(toks[0]))
    year_int = integer.copy()
    year_int.add_condition(lambda toks: toks[0] >= 2000, message="Only support years 2000 and later")
    date_str = year_int + '/' + integer + '/' + integer

    result = date_str.parse_string("1999/12/31")  # -> Exception: Only support years 2000 and later (at char 0),
                                                                 (line:1, col:1)

---
## set_fail_action
```python
from core import set_fail_action
```

Define action to perform if parsing fails at this expression.
Fail acton fn is a callable function that takes the arguments
``fn(s, loc, expr, err)`` where:

- ``s`` = string being parsed
- ``loc`` = location where expression match was attempted and failed
- ``expr`` = the parse expression that failed
- ``err`` = the exception thrown

The function returns no value.  It may throw :class:`ParseFatalException`
if it is desired to stop parsing immediately.

---
## _skipIgnorables
```python
from core import _skipIgnorables
```



---
## preParse
```python
from core import preParse
```



---
## parseImpl
```python
from core import parseImpl
```



---
## postParse
```python
from core import postParse
```



---
## _parseNoCache
```python
from core import _parseNoCache
```



---
## try_parse
```python
from core import try_parse
```



---
## can_parse_next
```python
from core import can_parse_next
```



---
## _CacheType
```python
from core import _CacheType
```

class to help type checking

---
## _parseCache
```python
from core import _parseCache
```



---
## reset_cache
```python
from core import reset_cache
```



---
## disable_memoization
```python
from core import disable_memoization
```

Disables active Packrat or Left Recursion parsing and their memoization

This method also works if neither Packrat nor Left Recursion are enabled.
This makes it safe to call before activating Packrat nor Left Recursion
to clear any previous settings.

---
## enable_left_recursion
```python
from core import enable_left_recursion
```

Enables "bounded recursion" parsing, which allows for both direct and indirect
left-recursion. During parsing, left-recursive :class:`Forward` elements are
repeatedly matched with a fixed recursion depth that is gradually increased
until finding the longest match.

Example::

    import pyparsing as pp
    pp.ParserElement.enable_left_recursion()

    E = pp.Forward("E")
    num = pp.Word(pp.nums)
    # match `num`, or `num '+' num`, or `num '+' num '+' num`, ...
    E <<= E + '+' - num | num

    print(E.parse_string("1+2+3"))

Recursion search naturally memoizes matches of ``Forward`` elements and may
thus skip reevaluation of parse actions during backtracking. This may break
programs with parse actions which rely on strict ordering of side-effects.

Parameters:

- ``cache_size_limit`` - (default=``None``) - memoize at most this many
  ``Forward`` elements during matching; if ``None`` (the default),
  memoize all ``Forward`` elements.

Bounded Recursion parsing works similar but not identical to Packrat parsing,
thus the two cannot be used together. Use ``force=True`` to disable any
previous, conflicting settings.

---
## enable_packrat
```python
from core import enable_packrat
```

Enables "packrat" parsing, which adds memoizing to the parsing logic.
Repeated parse attempts at the same string location (which happens
often in many complex grammars) can immediately return a cached value,
instead of re-executing parsing/validating code.  Memoizing is done of
both valid results and parsing exceptions.

Parameters:

- ``cache_size_limit`` - (default= ``128``) - if an integer value is provided
  will limit the size of the packrat cache; if None is passed, then
  the cache size will be unbounded; if 0 is passed, the cache will
  be effectively disabled.

This speedup may break existing programs that use parse actions that
have side-effects.  For this reason, packrat parsing is disabled when
you first import pyparsing.  To activate the packrat feature, your
program must call the class method :class:`ParserElement.enable_packrat`.
For best results, call ``enable_packrat()`` immediately after
importing pyparsing.

Example::

    import pyparsing
    pyparsing.ParserElement.enable_packrat()

Packrat parsing works similar but not identical to Bounded Recursion parsing,
thus the two cannot be used together. Use ``force=True`` to disable any
previous, conflicting settings.

---
## parse_string
```python
from core import parse_string
```

Parse a string with respect to the parser definition. This function is intended as the primary interface to the
client code.

:param instring: The input string to be parsed.
:param parse_all: If set, the entire input string must match the grammar.
:param parseAll: retained for pre-PEP8 compatibility, will be removed in a future release.
:raises ParseException: Raised if ``parse_all`` is set and the input string does not match the whole grammar.
:returns: the parsed data as a :class:`ParseResults` object, which may be accessed as a `list`, a `dict`, or
  an object with attributes if the given parser includes results names.

If the input string is required to match the entire grammar, ``parse_all`` flag must be set to ``True``. This
is also equivalent to ending the grammar with :class:`StringEnd`\ ().

To report proper column numbers, ``parse_string`` operates on a copy of the input string where all tabs are
converted to spaces (8 spaces per tab, as per the default in ``string.expandtabs``). If the input string
contains tabs and the grammar uses parse actions that use the ``loc`` argument to index into the string
being parsed, one can ensure a consistent view of the input string by doing one of the following:

- calling ``parse_with_tabs`` on your grammar before calling ``parse_string`` (see :class:`parse_with_tabs`),
- define your parse action using the full ``(s,loc,toks)`` signature, and reference the input string using the
  parse action's ``s`` argument, or
- explicitly expand the tabs in your input string before calling ``parse_string``.

Examples:

By default, partial matches are OK.

>>> res = Word('a').parse_string('aaaaabaaa')
>>> print(res)
['aaaaa']

The parsing behavior varies by the inheriting class of this abstract class. Please refer to the children
directly to see more examples.

It raises an exception if parse_all flag is set and instring does not match the whole grammar.

>>> res = Word('a').parse_string('aaaaabaaa', parse_all=True)
Traceback (most recent call last):
...
pyparsing.ParseException: Expected end of text, found 'b'  (at char 5), (line:1, col:6)

---
## scan_string
```python
from core import scan_string
```

Scan the input string for expression matches.  Each match will return the
matching tokens, start location, and end location.  May be called with optional
``max_matches`` argument, to clip scanning after 'n' matches are found.  If
``overlap`` is specified, then overlapping matches will be reported.

Note that the start and end locations are reported relative to the string
being parsed.  See :class:`parse_string` for more information on parsing
strings with embedded tabs.

Example::

    source = "sldjf123lsdjjkf345sldkjf879lkjsfd987"
    print(source)
    for tokens, start, end in Word(alphas).scan_string(source):
        print(' '*start + '^'*(end-start))
        print(' '*start + tokens[0])

prints::

    sldjf123lsdjjkf345sldkjf879lkjsfd987
    ^^^^^
    sldjf
            ^^^^^^^
            lsdjjkf
                      ^^^^^^
                      sldkjf
                               ^^^^^^
                               lkjsfd

---
## transform_string
```python
from core import transform_string
```

Extension to :class:`scan_string`, to modify matching text with modified tokens that may
be returned from a parse action.  To use ``transform_string``, define a grammar and
attach a parse action to it that modifies the returned token list.
Invoking ``transform_string()`` on a target string will then scan for matches,
and replace the matched text patterns according to the logic in the parse
action.  ``transform_string()`` returns the resulting transformed string.

Example::

    wd = Word(alphas)
    wd.set_parse_action(lambda toks: toks[0].title())

    print(wd.transform_string("now is the winter of our discontent made glorious summer by this sun of york."))

prints::

    Now Is The Winter Of Our Discontent Made Glorious Summer By This Sun Of York.

---
## search_string
```python
from core import search_string
```

Another extension to :class:`scan_string`, simplifying the access to the tokens found
to match the given parse expression.  May be called with optional
``max_matches`` argument, to clip searching after 'n' matches are found.

Example::

    # a capitalized word starts with an uppercase letter, followed by zero or more lowercase letters
    cap_word = Word(alphas.upper(), alphas.lower())

    print(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity"))

    # the sum() builtin can be used to merge results into a single ParseResults object
    print(sum(cap_word.search_string("More than Iron, more than Lead, more than Gold I need Electricity")))

prints::

    [['More'], ['Iron'], ['Lead'], ['Gold'], ['I'], ['Electricity']]
    ['More', 'Iron', 'Lead', 'Gold', 'I', 'Electricity']

---
## split
```python
from core import split
```

Generator method to split a string using the given expression as a separator.
May be called with optional ``maxsplit`` argument, to limit the number of splits;
and the optional ``include_separators`` argument (default= ``False``), if the separating
matching text should be included in the split results.

Example::

    punc = one_of(list(".,;:/-!?"))
    print(list(punc.split("This, this?, this sentence, is badly punctuated!")))

prints::

    ['This', ' this', '', ' this sentence', ' is badly punctuated', '']

---
## __add__
```python
from core import __add__
```

Add self to other, and return a new masked array.

---
## __radd__
```python
from core import __radd__
```

Add other to self, and return a new masked array.

---
## __sub__
```python
from core import __sub__
```

Subtract other from self, and return a new masked array.

---
## __rsub__
```python
from core import __rsub__
```

Subtract self from other, and return a new masked array.

---
## __mul__
```python
from core import __mul__
```

Multiply self by other, and return a new masked array.

---
## __rmul__
```python
from core import __rmul__
```

Multiply other by self, and return a new masked array.

---
## __or__
```python
from core import __or__
```



---
## __ror__
```python
from core import __ror__
```



---
## __xor__
```python
from core import __xor__
```

Implementation of ``^`` operator - returns :class:`Or`

---
## __rxor__
```python
from core import __rxor__
```

Implementation of ``^`` operator when left operand is not a :class:`ParserElement`

---
## __and__
```python
from core import __and__
```



---
## __rand__
```python
from core import __rand__
```



---
## __invert__
```python
from core import __invert__
```



---
## __getitem__
```python
from core import __getitem__
```

Get the index.

---
## __call__
```python
from core import __call__
```



---
## suppress
```python
from core import suppress
```



---
## ignore_whitespace
```python
from core import ignore_whitespace
```



---
## leave_whitespace
```python
from core import leave_whitespace
```



---
## set_whitespace_chars
```python
from core import set_whitespace_chars
```

Overrides the default whitespace chars

---
## parse_with_tabs
```python
from core import parse_with_tabs
```

Overrides default behavior to expand ``<TAB>`` s to spaces before parsing the input string.
Must be called before ``parse_string`` when the input grammar contains elements that
match ``<TAB>`` characters.

---
## ignore
```python
from core import ignore
```



---
## set_debug_actions
```python
from core import set_debug_actions
```

Customize display of debugging messages while doing pattern matching:

- ``start_action`` - method to be called when an expression is about to be parsed;
  should have the signature ``fn(input_string: str, location: int, expression: ParserElement, cache_hit: bool)``

- ``success_action`` - method to be called when an expression has successfully parsed;
  should have the signature ``fn(input_string: str, start_location: int, end_location: int, expression: ParserELement, parsed_tokens: ParseResults, cache_hit: bool)``

- ``exception_action`` - method to be called when expression fails to parse;
  should have the signature ``fn(input_string: str, location: int, expression: ParserElement, exception: Exception, cache_hit: bool)``

---
## set_debug
```python
from core import set_debug
```

Enable display of debugging messages while doing pattern matching.
Set ``flag`` to ``True`` to enable, ``False`` to disable.
Set ``recurse`` to ``True`` to set the debug flag on this expression and all sub-expressions.

Example::

    wd = Word(alphas).set_name("alphaword")
    integer = Word(nums).set_name("numword")
    term = wd | integer

    # turn on debugging for wd
    wd.set_debug()

    term[1, ...].parse_string("abc 123 xyz 890")

prints::

    Match alphaword at loc 0(1,1)
    Matched alphaword -> ['abc']
    Match alphaword at loc 3(1,4)
    Exception raised:Expected alphaword (at char 4), (line:1, col:5)
    Match alphaword at loc 7(1,8)
    Matched alphaword -> ['xyz']
    Match alphaword at loc 11(1,12)
    Exception raised:Expected alphaword (at char 12), (line:1, col:13)
    Match alphaword at loc 15(1,16)
    Exception raised:Expected alphaword (at char 15), (line:1, col:16)

The output shown is that produced by the default debug actions - custom debug actions can be
specified using :class:`set_debug_actions`. Prior to attempting
to match the ``wd`` expression, the debugging message ``"Match <exprname> at loc <n>(<line>,<col>)"``
is shown. Then if the parse succeeds, a ``"Matched"`` message is shown, or an ``"Exception raised"``
message is shown. Also note the use of :class:`set_name` to assign a human-readable name to the expression,
which makes debugging and exception messages easier to understand - for instance, the default
name created for the :class:`Word` expression without calling ``set_name`` is ``"W:(A-Za-z)"``.

---
## default_name
```python
from core import default_name
```



---
## _generateDefaultName
```python
from core import _generateDefaultName
```



---
## set_name
```python
from core import set_name
```

Define name for this expression, makes debugging and exception messages clearer. If
`__diag__.enable_debug_on_named_expressions` is set to True, setting a name will also
enable debug for this expression.

If `name` is None, clears any custom name for this expression, and clears the
debug flag is it was enabled via `__diag__.enable_debug_on_named_expressions`.

Example::

    integer = Word(nums)
    integer.parse_string("ABC")  # -> Exception: Expected W:(0-9) (at char 0), (line:1, col:1)

    integer.set_name("integer")
    integer.parse_string("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)

---
## name
```python
from core import name
```



---
## streamline
```python
from core import streamline
```



---
## recurse
```python
from core import recurse
```



---
## _checkRecursion
```python
from core import _checkRecursion
```



---
## validate
```python
from core import validate
```



---
## parse_file
```python
from core import parse_file
```

Execute the parse expression on the given file or filename.
If a filename is specified (instead of a file object),
the entire file is opened, read, and closed before parsing.

---
## __eq__
```python
from core import __eq__
```



---
## __hash__
```python
from core import __hash__
```



---
## matches
```python
from core import matches
```

Method for quick testing of a parser against a test string. Good for simple
inline microtests of sub expressions while building up larger parser.

Parameters:

- ``test_string`` - to test against this expression for a match
- ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests

Example::

    expr = Word(nums)
    assert expr.matches("100")

---
## run_tests
```python
from core import run_tests
```

Execute the parse expression on a series of test strings, showing each
test, the parsed results or where the parse failed. Quick and easy way to
run a parse expression against a list of sample strings.

Parameters:

- ``tests`` - a list of separate test strings, or a multiline string of test strings
- ``parse_all`` - (default= ``True``) - flag to pass to :class:`parse_string` when running tests
- ``comment`` - (default= ``'#'``) - expression for indicating embedded comments in the test
  string; pass None to disable comment filtering
- ``full_dump`` - (default= ``True``) - dump results as list followed by results names in nested outline;
  if False, only dump nested list
- ``print_results`` - (default= ``True``) prints test output to stdout
- ``failure_tests`` - (default= ``False``) indicates if these tests are expected to fail parsing
- ``post_parse`` - (default= ``None``) optional callback for successful parse results; called as
  `fn(test_string, parse_results)` and returns a string to be added to the test output
- ``file`` - (default= ``None``) optional file-like object to which test output will be written;
  if None, will default to ``sys.stdout``
- ``with_line_numbers`` - default= ``False``) show test strings with line and column numbers

Returns: a (success, results) tuple, where success indicates that all tests succeeded
(or failed if ``failure_tests`` is True), and the results contain a list of lines of each
test's output

Example::

    number_expr = pyparsing_common.number.copy()

    result = number_expr.run_tests('''
        # unsigned integer
        100
        # negative integer
        -100
        # float with scientific notation
        6.02e23
        # integer with scientific notation
        1e-12
        ''')
    print("Success" if result[0] else "Failed!")

    result = number_expr.run_tests('''
        # stray character
        100Z
        # missing leading digit before '.'
        -.100
        # too many '.'
        3.14.159
        ''', failure_tests=True)
    print("Success" if result[0] else "Failed!")

prints::

    # unsigned integer
    100
    [100]

    # negative integer
    -100
    [-100]

    # float with scientific notation
    6.02e23
    [6.02e+23]

    # integer with scientific notation
    1e-12
    [1e-12]

    Success

    # stray character
    100Z
       ^
    FAIL: Expected end of text (at char 3), (line:1, col:4)

    # missing leading digit before '.'
    -.100
    ^
    FAIL: Expected {real number with scientific notation | real number | signed integer} (at char 0), (line:1, col:1)

    # too many '.'
    3.14.159
        ^
    FAIL: Expected end of text (at char 4), (line:1, col:5)

    Success

Each test string must be on a single line. If you want to test a string that spans multiple
lines, create a test like this::

    expr.run_tests(r"this is a test\n of strings that spans \n 3 lines")

(Note that this is a raw string literal, you must include the leading ``'r'``.)

---
## create_diagram
```python
from core import create_diagram
```

Create a railroad diagram for the parser.

Parameters:

- ``output_html`` (str or file-like object) - output target for generated
  diagram HTML
- ``vertical`` (int) - threshold for formatting multiple alternatives vertically
  instead of horizontally (default=3)
- ``show_results_names`` - bool flag whether diagram should show annotations for
  defined results names
- ``show_groups`` - bool flag whether groups should be highlighted with an unlabeled surrounding box
- ``embed`` - bool flag whether generated HTML should omit <HEAD>, <BODY>, and <DOCTYPE> tags to embed
  the resulting HTML in an enclosing HTML source
- ``head`` - str containing additional HTML to insert into the <HEAD> section of the generated code;
  can be used to insert custom CSS styling
- ``body`` - str containing additional HTML to insert at the beginning of the <BODY> section of the
  generated code

Additional diagram-formatting keyword arguments can also be included;
see railroad.Diagram class.

---
## __new__
```python
from core import __new__
```



---
## __getnewargs__
```python
from core import __getnewargs__
```



---
## set_default_keyword_chars
```python
from core import set_default_keyword_chars
```

Overrides the default characters used by :class:`Keyword` expressions.

---
## parseImpl_regex
```python
from core import parseImpl_regex
```



---
## re
```python
from core import re
```



---
## re_match
```python
from core import re_match
```



---
## mayReturnEmpty
```python
from core import mayReturnEmpty
```



---
## parseImplAsGroupList
```python
from core import parseImplAsGroupList
```



---
## parseImplAsMatch
```python
from core import parseImplAsMatch
```



---
## sub
```python
from core import sub
```

Return :class:`Regex` with an attached parse action to transform the parsed
result as if called using `re.sub(expr, repl, string) <https://docs.python.org/3/library/re.html#re.sub>`_.

Example::

    make_html = Regex(r"(\w+):(.*?):").sub(r"<\1>\2</\1>")
    print(make_html.transform_string("h1:main title:"))
    # prints "<h1>main title</h1>"

---
## _add_tag
```python
from core import _add_tag
```



---
## append
```python
from core import append
```

Append values to the end of an array.

.. versionadded:: 1.9.0

Parameters
----------
a : array_like
    Values are appended to a copy of this array.
b : array_like
    These values are appended to a copy of `a`.  It must be of the
    correct shape (the same shape as `a`, excluding `axis`).  If `axis`
    is not specified, `b` can be any shape and will be flattened
    before use.
axis : int, optional
    The axis along which `v` are appended.  If `axis` is not given,
    both `a` and `b` are flattened before use.

Returns
-------
append : MaskedArray
    A copy of `a` with `b` appended to `axis`.  Note that `append`
    does not occur in-place: a new array is allocated and filled.  If
    `axis` is None, the result is a flattened array.

See Also
--------
numpy.append : Equivalent function in the top-level NumPy module.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.masked_values([1, 2, 3], 2)
>>> b = ma.masked_values([[4, 5, 6], [7, 8, 9]], 7)
>>> ma.append(a, b)
masked_array(data=[1, --, 3, 4, 5, 6, --, 8, 9],
             mask=[False,  True, False, False, False, False,  True, False,
                   False],
       fill_value=999999)

---
## _ErrorStop
```python
from core import _ErrorStop
```



---
## __iadd__
```python
from core import __iadd__
```

Add other to self in-place.

---
## __ixor__
```python
from core import __ixor__
```



---
## __ior__
```python
from core import __ior__
```



---
## __iand__
```python
from core import __iand__
```



---
## _Indent
```python
from core import _Indent
```



---
## _IndentGreater
```python
from core import _IndentGreater
```



---
## stopOn
```python
from core import stopOn
```



---
## __bool__
```python
from core import __bool__
```



---
## _update_ignorer
```python
from core import _update_ignorer
```



---
## __lshift__
```python
from core import __lshift__
```



---
## __ilshift__
```python
from core import __ilshift__
```



---
## __del__
```python
from core import __del__
```



---
## z
```python
from core import z
```



---
## __get__
```python
from core import __get__
```



---
## get
```python
from core import get
```



---
## set
```python
from core import set
```



---
## charsAsStr
```python
from core import charsAsStr
```



---
## breaker
```python
from core import breaker
```



---
## makeOptionalList
```python
from core import makeOptionalList
```



---
## must_skip
```python
from core import must_skip
```



---
## show_skip
```python
from core import show_skip
```



---
## pyparsing_common
```python
from common import pyparsing_common
```

Here are some common low-level expressions that may be useful in
jump-starting parser development:

- numeric forms (:class:`integers<integer>`, :class:`reals<real>`,
  :class:`scientific notation<sci_real>`)
- common :class:`programming identifiers<identifier>`
- network addresses (:class:`MAC<mac_address>`,
  :class:`IPv4<ipv4_address>`, :class:`IPv6<ipv6_address>`)
- ISO8601 :class:`dates<iso8601_date>` and
  :class:`datetime<iso8601_datetime>`
- :class:`UUID<uuid>`
- :class:`comma-separated list<comma_separated_list>`
- :class:`url`

Parse actions:

- :class:`convert_to_integer`
- :class:`convert_to_float`
- :class:`convert_to_date`
- :class:`convert_to_datetime`
- :class:`strip_html_tags`
- :class:`upcase_tokens`
- :class:`downcase_tokens`

Example::

    pyparsing_common.number.run_tests('''
        # any int or real number, returned as the appropriate type
        100
        -100
        +100
        3.14159
        6.02e23
        1e-12
        ''')

    pyparsing_common.fnumber.run_tests('''
        # any int or real number, returned as float
        100
        -100
        +100
        3.14159
        6.02e23
        1e-12
        ''')

    pyparsing_common.hex_integer.run_tests('''
        # hex numbers
        100
        FF
        ''')

    pyparsing_common.fraction.run_tests('''
        # fractions
        1/2
        -3/4
        ''')

    pyparsing_common.mixed_integer.run_tests('''
        # mixed fractions
        1
        1/2
        -3/4
        1-3/4
        ''')

    import uuid
    pyparsing_common.uuid.set_parse_action(token_map(uuid.UUID))
    pyparsing_common.uuid.run_tests('''
        # uuid
        12345678-1234-5678-1234-567812345678
        ''')

prints::

    # any int or real number, returned as the appropriate type
    100
    [100]

    -100
    [-100]

    +100
    [100]

    3.14159
    [3.14159]

    6.02e23
    [6.02e+23]

    1e-12
    [1e-12]

    # any int or real number, returned as float
    100
    [100.0]

    -100
    [-100.0]

    +100
    [100.0]

    3.14159
    [3.14159]

    6.02e23
    [6.02e+23]

    1e-12
    [1e-12]

    # hex numbers
    100
    [256]

    FF
    [255]

    # fractions
    1/2
    [0.5]

    -3/4
    [-0.75]

    # mixed fractions
    1
    [1]

    1/2
    [0.5]

    -3/4
    [-0.75]

    1-3/4
    [1.75]

    # uuid
    12345678-1234-5678-1234-567812345678
    [UUID('12345678-1234-5678-1234-567812345678')]

---
## convert_to_date
```python
from common import convert_to_date
```

Helper to create a parse action for converting parsed date string to Python datetime.date

Params -
- fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%d"``)

Example::

    date_expr = pyparsing_common.iso8601_date.copy()
    date_expr.set_parse_action(pyparsing_common.convert_to_date())
    print(date_expr.parse_string("1999-12-31"))

prints::

    [datetime.date(1999, 12, 31)]

---
## convert_to_datetime
```python
from common import convert_to_datetime
```

Helper to create a parse action for converting parsed
datetime string to Python datetime.datetime

Params -
- fmt - format to be passed to datetime.strptime (default= ``"%Y-%m-%dT%H:%M:%S.%f"``)

Example::

    dt_expr = pyparsing_common.iso8601_datetime.copy()
    dt_expr.set_parse_action(pyparsing_common.convert_to_datetime())
    print(dt_expr.parse_string("1999-12-31T23:59:59.999"))

prints::

    [datetime.datetime(1999, 12, 31, 23, 59, 59, 999000)]

---
## strip_html_tags
```python
from common import strip_html_tags
```

Parse action to remove HTML tags from web page HTML source

Example::

    # strip HTML links from normal text
    text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
    td, td_end = make_html_tags("TD")
    table_text = td + SkipTo(td_end).set_parse_action(pyparsing_common.strip_html_tags)("body") + td_end
    print(table_text.parse_string(text).body)

Prints::

    More info at the pyparsing wiki page

---
## cvt_fn
```python
from common import cvt_fn
```



---
## _ExceptionWordUnicodeSet
```python
from exceptions import _ExceptionWordUnicodeSet
```



---
## ParseBaseException
```python
from exceptions import ParseBaseException
```

base exception class for all parsing runtime exceptions

---
## ParseException
```python
from exceptions import ParseException
```

Exception thrown when a parse expression doesn't match the input string

Example::

    integer = Word(nums).set_name("integer")
    try:
        integer.parse_string("ABC")
    except ParseException as pe:
        print(pe)
        print(f"column: {pe.column}")

prints::

   Expected integer (at char 0), (line:1, col:1) column: 1

---
## ParseFatalException
```python
from exceptions import ParseFatalException
```

User-throwable exception thrown when inconsistent parse content
is found; stops all parsing immediately

---
## ParseSyntaxException
```python
from exceptions import ParseSyntaxException
```

Just like :class:`ParseFatalException`, but thrown internally
when an :class:`ErrorStop<And._ErrorStop>` ('-' operator) indicates
that parsing is to stop immediately because an unbacktrackable
syntax error has been found.

---
## RecursiveGrammarException
```python
from exceptions import RecursiveGrammarException
```

Exception thrown by :class:`ParserElement.validate` if the
grammar could be left-recursive; parser may need to enable
left recursion using :class:`ParserElement.enable_left_recursion<ParserElement.enable_left_recursion>`

---
## __init__
```python
from exceptions import __init__
```



---
## explain_exception
```python
from exceptions import explain_exception
```

Method to take an exception and translate the Python internal traceback into a list
of the pyparsing expressions that caused the exception to be raised.

Parameters:

- exc - exception raised during parsing (need not be a ParseException, in support
  of Python exceptions that might be raised in a parse action)
- depth (default=16) - number of levels back in the stack trace to list expression
  and function names; if None, the full stack trace names will be listed; if 0, only
  the failing input line, marker, and exception string will be shown

Returns a multi-line string listing the ParserElements and/or function names in the
exception's stack trace.

---
## _from_exception
```python
from exceptions import _from_exception
```

internal factory method to simplify creating one type of ParseException
from another - avoids having __init__ signature conflicts among subclasses

---
## line
```python
from exceptions import line
```



---
## lineno
```python
from exceptions import lineno
```

Return the 1-based line number of text where the exception occurred.

---
## col
```python
from exceptions import col
```



---
## column
```python
from exceptions import column
```

Return the 1-based column on the line of text where the exception occurred.

---
## parserElement
```python
from exceptions import parserElement
```



---
## __str__
```python
from exceptions import __str__
```



---
## __repr__
```python
from exceptions import __repr__
```



---
## mark_input_line
```python
from exceptions import mark_input_line
```

Extracts the exception line from the input string, and marks
the location of the exception with a special symbol.

---
## explain
```python
from exceptions import explain
```

Method to translate the Python internal traceback into a list
of the pyparsing expressions that caused the exception to be raised.

Parameters:

- depth (default=16) - number of levels back in the stack trace to list expression
  and function names; if None, the full stack trace names will be listed; if 0, only
  the failing input line, marker, and exception string will be shown

Returns a multi-line string listing the ParserElements and/or function names in the
exception's stack trace.

Example::

    # an expression to parse 3 integers
    expr = pp.Word(pp.nums) * 3
    try:
        # a failing parse - the third integer is prefixed with "A"
        expr.parse_string("123 456 A789")
    except pp.ParseException as pe:
        print(pe.explain(depth=0))

prints::

    123 456 A789
            ^
    ParseException: Expected W:(0-9), found 'A'  (at char 8), (line:1, col:9)

Note: the diagnostic output will include string representations of the expressions
that failed to parse. These representations will be more helpful if you use `set_name` to
give identifiable names to your expressions. Otherwise they will use the default string
forms, which may be cryptic to read.

Note: pyparsing's default truncation of exception tracebacks may also truncate the
stack of expressions that are displayed in the ``explain`` output. To get the full listing
of parser expressions, you may have to set ``ParserElement.verbose_stacktrace = True``

---
## __name__
```python
from testing import __name__
```

pygments.lexers.testing
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for testing languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## pyparsing_test
```python
from testing import pyparsing_test
```

namespace class for classes useful in writing unit tests

---
## reset_pyparsing_context
```python
from testing import reset_pyparsing_context
```

Context manager to be used when writing unit tests that modify pyparsing config values:
- packrat parsing
- bounded recursion parsing
- default whitespace characters.
- default keyword characters
- literal string auto-conversion class
- __diag__ settings

Example::

    with reset_pyparsing_context():
        # test that literals used to construct a grammar are automatically suppressed
        ParserElement.inlineLiteralsUsing(Suppress)

        term = Word(alphas) | Word(nums)
        group = Group('(' + term[...] + ')')

        # assert that the '()' characters are not included in the parsed tokens
        self.assertParseAndCheckList(group, "(abc 123 def)", ['abc', '123', 'def'])

    # after exiting context manager, literals are converted to Literal expressions again

---
## TestParseResultsAsserts
```python
from testing import TestParseResultsAsserts
```

A mixin class to add parse results assertion methods to normal unittest.TestCase classes.

---
## with_line_numbers
```python
from testing import with_line_numbers
```

Helpful method for debugging a parser - prints a string with line and column numbers.
(Line and column numbers are 1-based.)

:param s: tuple(bool, str - string to be printed with line and column numbers
:param start_line: int - (optional) starting line number in s to print (default=1)
:param end_line: int - (optional) ending line number in s to print (default=len(s))
:param expand_tabs: bool - (optional) expand tabs to spaces, to match the pyparsing default
:param eol_mark: str - (optional) string to mark the end of lines, helps visualize trailing spaces (default="|")
:param mark_spaces: str - (optional) special character to display in place of spaces
:param mark_control: str - (optional) convert non-printing control characters to a placeholding
                         character; valid values:
                         - "unicode" - replaces control chars with Unicode symbols, such as "␍" and "␊"
                         - any single character string - replace control characters with given string
                         - None (default) - string is displayed as-is

:return: str - input string with leading line numbers and column number headers

---
## __init__
```python
from testing import __init__
```



---
## save
```python
from testing import save
```



---
## restore
```python
from testing import restore
```



---
## copy
```python
from testing import copy
```



---
## __enter__
```python
from testing import __enter__
```



---
## __exit__
```python
from testing import __exit__
```



---
## assertParseResultsEquals
```python
from testing import assertParseResultsEquals
```

Unit test assertion to compare a :class:`ParseResults` object with an optional ``expected_list``,
and compare any defined results names with an optional ``expected_dict``.

---
## assertParseAndCheckList
```python
from testing import assertParseAndCheckList
```

Convenience wrapper assert to test a parser element and input string, and assert that
the resulting ``ParseResults.asList()`` is equal to the ``expected_list``.

---
## assertParseAndCheckDict
```python
from testing import assertParseAndCheckDict
```

Convenience wrapper assert to test a parser element and input string, and assert that
the resulting ``ParseResults.asDict()`` is equal to the ``expected_dict``.

---
## assertRunTestResults
```python
from testing import assertRunTestResults
```

Unit test assertion to evaluate output of ``ParserElement.runTests()``. If a list of
list-dict tuples is given as the ``expected_parse_results`` argument, then these are zipped
with the report tuples returned by ``runTests`` and evaluated using ``assertParseResultsEquals``.
Finally, asserts that the overall ``runTests()`` success value is ``True``.

:param run_tests_report: tuple(bool, [tuple(str, ParseResults or Exception)]) returned from runTests
:param expected_parse_results (optional): [tuple(str, list, dict, Exception)]

---
## assertRaisesParseException
```python
from testing import assertRaisesParseException
```



---
## counted_array
```python
from helpers import counted_array
```

Helper to define a counted list of expressions.

This helper defines a pattern of the form::

    integer expr expr expr...

where the leading integer tells how many expr expressions follow.
The matched tokens returns the array of expr tokens as a list - the
leading count token is suppressed.

If ``int_expr`` is specified, it should be a pyparsing expression
that produces an integer value.

Example::

    counted_array(Word(alphas)).parse_string('2 ab cd ef')  # -> ['ab', 'cd']

    # in this parser, the leading integer value is given in binary,
    # '10' indicating that 2 values are in the array
    binary_constant = Word('01').set_parse_action(lambda t: int(t[0], 2))
    counted_array(Word(alphas), int_expr=binary_constant).parse_string('10 ab cd ef')  # -> ['ab', 'cd']

    # if other fields must be parsed after the count but before the
    # list items, give the fields results names and they will
    # be preserved in the returned ParseResults:
    count_with_metadata = integer + Word(alphas)("type")
    typed_array = counted_array(Word(alphanums), int_expr=count_with_metadata)("items")
    result = typed_array.parse_string("3 bool True True False")
    print(result.dump())

    # prints
    # ['True', 'True', 'False']
    # - items: ['True', 'True', 'False']
    # - type: 'bool'

---
## match_previous_literal
```python
from helpers import match_previous_literal
```

Helper to define an expression that is indirectly defined from
the tokens matched in a previous expression, that is, it looks for
a 'repeat' of a previous expression.  For example::

    first = Word(nums)
    second = match_previous_literal(first)
    match_expr = first + ":" + second

will match ``"1:1"``, but not ``"1:2"``.  Because this
matches a previous literal, will also match the leading
``"1:1"`` in ``"1:10"``. If this is not desired, use
:class:`match_previous_expr`. Do *not* use with packrat parsing
enabled.

---
## match_previous_expr
```python
from helpers import match_previous_expr
```

Helper to define an expression that is indirectly defined from
the tokens matched in a previous expression, that is, it looks for
a 'repeat' of a previous expression.  For example::

    first = Word(nums)
    second = match_previous_expr(first)
    match_expr = first + ":" + second

will match ``"1:1"``, but not ``"1:2"``.  Because this
matches by expressions, will *not* match the leading ``"1:1"``
in ``"1:10"``; the expressions are evaluated first, and then
compared, so ``"1"`` is compared with ``"10"``. Do *not* use
with packrat parsing enabled.

---
## one_of
```python
from helpers import one_of
```

Helper to quickly define a set of alternative :class:`Literal` s,
and makes sure to do longest-first testing when there is a conflict,
regardless of the input order, but returns
a :class:`MatchFirst` for best performance.

Parameters:

- ``strs`` - a string of space-delimited literals, or a collection of
  string literals
- ``caseless`` - treat all literals as caseless - (default= ``False``)
- ``use_regex`` - as an optimization, will
  generate a :class:`Regex` object; otherwise, will generate
  a :class:`MatchFirst` object (if ``caseless=True`` or ``as_keyword=True``, or if
  creating a :class:`Regex` raises an exception) - (default= ``True``)
- ``as_keyword`` - enforce :class:`Keyword`-style matching on the
  generated expressions - (default= ``False``)
- ``asKeyword`` and ``useRegex`` are retained for pre-PEP8 compatibility,
  but will be removed in a future release

Example::

    comp_oper = one_of("< = > <= >= !=")
    var = Word(alphas)
    number = Word(nums)
    term = var | number
    comparison_expr = term + comp_oper + term
    print(comparison_expr.search_string("B = 12  AA=23 B<=AA AA>12"))

prints::

    [['B', '=', '12'], ['AA', '=', '23'], ['B', '<=', 'AA'], ['AA', '>', '12']]

---
## dict_of
```python
from helpers import dict_of
```

Helper to easily and clearly define a dictionary by specifying
the respective patterns for the key and value.  Takes care of
defining the :class:`Dict`, :class:`ZeroOrMore`, and
:class:`Group` tokens in the proper order.  The key pattern
can include delimiting markers or punctuation, as long as they are
suppressed, thereby leaving the significant key text.  The value
pattern can include named results, so that the :class:`Dict` results
can include named token fields.

Example::

    text = "shape: SQUARE posn: upper left color: light blue texture: burlap"
    attr_expr = (label + Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join))
    print(attr_expr[1, ...].parse_string(text).dump())

    attr_label = label
    attr_value = Suppress(':') + OneOrMore(data_word, stop_on=label).set_parse_action(' '.join)

    # similar to Dict, but simpler call format
    result = dict_of(attr_label, attr_value).parse_string(text)
    print(result.dump())
    print(result['shape'])
    print(result.shape)  # object attribute access works too
    print(result.as_dict())

prints::

    [['shape', 'SQUARE'], ['posn', 'upper left'], ['color', 'light blue'], ['texture', 'burlap']]
    - color: 'light blue'
    - posn: 'upper left'
    - shape: 'SQUARE'
    - texture: 'burlap'
    SQUARE
    SQUARE
    {'color': 'light blue', 'shape': 'SQUARE', 'posn': 'upper left', 'texture': 'burlap'}

---
## original_text_for
```python
from helpers import original_text_for
```

Helper to return the original, untokenized text for a given
expression.  Useful to restore the parsed fields of an HTML start
tag into the raw tag text itself, or to revert separate tokens with
intervening whitespace back to the original matching input text. By
default, returns a string containing the original parsed text.

If the optional ``as_string`` argument is passed as
``False``, then the return value is
a :class:`ParseResults` containing any results names that
were originally matched, and a single token containing the original
matched text from the input string.  So if the expression passed to
:class:`original_text_for` contains expressions with defined
results names, you must set ``as_string`` to ``False`` if you
want to preserve those results name values.

The ``asString`` pre-PEP8 argument is retained for compatibility,
but will be removed in a future release.

Example::

    src = "this is test <b> bold <i>text</i> </b> normal text "
    for tag in ("b", "i"):
        opener, closer = make_html_tags(tag)
        patt = original_text_for(opener + ... + closer)
        print(patt.search_string(src)[0])

prints::

    ['<b> bold <i>text</i> </b>']
    ['<i>text</i>']

---
## ungroup
```python
from helpers import ungroup
```

Helper to undo pyparsing's default grouping of And expressions,
even if all but one are non-empty.

---
## locatedExpr
```python
from helpers import locatedExpr
```

(DEPRECATED - future code should use the :class:`Located` class)
Helper to decorate a returned token with its starting and ending
locations in the input string.

This helper adds the following results names:

- ``locn_start`` - location where matched expression begins
- ``locn_end`` - location where matched expression ends
- ``value`` - the actual parsed results

Be careful if the input text contains ``<TAB>`` characters, you
may want to call :class:`ParserElement.parse_with_tabs`

Example::

    wd = Word(alphas)
    for match in locatedExpr(wd).search_string("ljsdf123lksdjjf123lkkjj1222"):
        print(match)

prints::

    [[0, 'ljsdf', 5]]
    [[8, 'lksdjjf', 15]]
    [[18, 'lkkjj', 23]]

---
## nested_expr
```python
from helpers import nested_expr
```

Helper method for defining nested lists enclosed in opening and
closing delimiters (``"("`` and ``")"`` are the default).

Parameters:

- ``opener`` - opening character for a nested list
  (default= ``"("``); can also be a pyparsing expression
- ``closer`` - closing character for a nested list
  (default= ``")"``); can also be a pyparsing expression
- ``content`` - expression for items within the nested lists
  (default= ``None``)
- ``ignore_expr`` - expression for ignoring opening and closing delimiters
  (default= :class:`quoted_string`)
- ``ignoreExpr`` - this pre-PEP8 argument is retained for compatibility
  but will be removed in a future release

If an expression is not provided for the content argument, the
nested expression will capture all whitespace-delimited content
between delimiters as a list of separate values.

Use the ``ignore_expr`` argument to define expressions that may
contain opening or closing characters that should not be treated as
opening or closing characters for nesting, such as quoted_string or
a comment expression.  Specify multiple expressions using an
:class:`Or` or :class:`MatchFirst`. The default is
:class:`quoted_string`, but if no expressions are to be ignored, then
pass ``None`` for this argument.

Example::

    data_type = one_of("void int short long char float double")
    decl_data_type = Combine(data_type + Opt(Word('*')))
    ident = Word(alphas+'_', alphanums+'_')
    number = pyparsing_common.number
    arg = Group(decl_data_type + ident)
    LPAR, RPAR = map(Suppress, "()")

    code_body = nested_expr('{', '}', ignore_expr=(quoted_string | c_style_comment))

    c_function = (decl_data_type("type")
                  + ident("name")
                  + LPAR + Opt(DelimitedList(arg), [])("args") + RPAR
                  + code_body("body"))
    c_function.ignore(c_style_comment)

    source_code = '''
        int is_odd(int x) {
            return (x%2);
        }

        int dec_to_hex(char hchar) {
            if (hchar >= '0' && hchar <= '9') {
                return (ord(hchar)-ord('0'));
            } else {
                return (10+ord(hchar)-ord('A'));
            }
        }
    '''
    for func in c_function.search_string(source_code):
        print("%(name)s (%(type)s) args: %(args)s" % func)


prints::

    is_odd (int) args: [['int', 'x']]
    dec_to_hex (int) args: [['char', 'hchar']]

---
## _makeTags
```python
from helpers import _makeTags
```

Internal helper to construct opening and closing tag expressions, given a tag name

---
## make_html_tags
```python
from helpers import make_html_tags
```

Helper to construct opening and closing tag expressions for HTML,
given a tag name. Matches tags in either upper or lower case,
attributes with namespaces and with quoted or unquoted values.

Example::

    text = '<td>More info at the <a href="https://github.com/pyparsing/pyparsing/wiki">pyparsing</a> wiki page</td>'
    # make_html_tags returns pyparsing expressions for the opening and
    # closing tags as a 2-tuple
    a, a_end = make_html_tags("A")
    link_expr = a + SkipTo(a_end)("link_text") + a_end

    for link in link_expr.search_string(text):
        # attributes in the <A> tag (like "href" shown here) are
        # also accessible as named results
        print(link.link_text, '->', link.href)

prints::

    pyparsing -> https://github.com/pyparsing/pyparsing/wiki

---
## make_xml_tags
```python
from helpers import make_xml_tags
```

Helper to construct opening and closing tag expressions for XML,
given a tag name. Matches tags only in the given upper/lower case.

Example: similar to :class:`make_html_tags`

---
## replace_html_entity
```python
from helpers import replace_html_entity
```

Helper parser action to replace common HTML entities with their special characters

---
## OpAssoc
```python
from helpers import OpAssoc
```

Enumeration of operator associativity
- used in constructing InfixNotationOperatorSpec for :class:`infix_notation`

---
## infix_notation
```python
from helpers import infix_notation
```

Helper method for constructing grammars of expressions made up of
operators working in a precedence hierarchy.  Operators may be unary
or binary, left- or right-associative.  Parse actions can also be
attached to operator expressions. The generated parser will also
recognize the use of parentheses to override operator precedences
(see example below).

Note: if you define a deep operator list, you may see performance
issues when using infix_notation. See
:class:`ParserElement.enable_packrat` for a mechanism to potentially
improve your parser performance.

Parameters:

- ``base_expr`` - expression representing the most basic operand to
  be used in the expression
- ``op_list`` - list of tuples, one for each operator precedence level
  in the expression grammar; each tuple is of the form ``(op_expr,
  num_operands, right_left_assoc, (optional)parse_action)``, where:

  - ``op_expr`` is the pyparsing expression for the operator; may also
    be a string, which will be converted to a Literal; if ``num_operands``
    is 3, ``op_expr`` is a tuple of two expressions, for the two
    operators separating the 3 terms
  - ``num_operands`` is the number of terms for this operator (must be 1,
    2, or 3)
  - ``right_left_assoc`` is the indicator whether the operator is right
    or left associative, using the pyparsing-defined constants
    ``OpAssoc.RIGHT`` and ``OpAssoc.LEFT``.
  - ``parse_action`` is the parse action to be associated with
    expressions matching this operator expression (the parse action
    tuple member may be omitted); if the parse action is passed
    a tuple or list of functions, this is equivalent to calling
    ``set_parse_action(*fn)``
    (:class:`ParserElement.set_parse_action`)
- ``lpar`` - expression for matching left-parentheses; if passed as a
  str, then will be parsed as ``Suppress(lpar)``. If lpar is passed as
  an expression (such as ``Literal('(')``), then it will be kept in
  the parsed results, and grouped with them. (default= ``Suppress('(')``)
- ``rpar`` - expression for matching right-parentheses; if passed as a
  str, then will be parsed as ``Suppress(rpar)``. If rpar is passed as
  an expression (such as ``Literal(')')``), then it will be kept in
  the parsed results, and grouped with them. (default= ``Suppress(')')``)

Example::

    # simple example of four-function arithmetic with ints and
    # variable names
    integer = pyparsing_common.signed_integer
    varname = pyparsing_common.identifier

    arith_expr = infix_notation(integer | varname,
        [
        ('-', 1, OpAssoc.RIGHT),
        (one_of('* /'), 2, OpAssoc.LEFT),
        (one_of('+ -'), 2, OpAssoc.LEFT),
        ])

    arith_expr.run_tests('''
        5+3*6
        (5+3)*6
        -2--11
        ''', full_dump=False)

prints::

    5+3*6
    [[5, '+', [3, '*', 6]]]

    (5+3)*6
    [[[5, '+', 3], '*', 6]]

    (5+x)*y
    [[[5, '+', 'x'], '*', 'y']]

    -2--11
    [[['-', 2], '-', ['-', 11]]]

---
## indentedBlock
```python
from helpers import indentedBlock
```

(DEPRECATED - use :class:`IndentedBlock` class instead)
Helper method for defining space-delimited indentation blocks,
such as those used to define block statements in Python source code.

Parameters:

- ``blockStatementExpr`` - expression defining syntax of statement that
  is repeated within the indented block
- ``indentStack`` - list created by caller to manage indentation stack
  (multiple ``statementWithIndentedBlock`` expressions within a single
  grammar should share a common ``indentStack``)
- ``indent`` - boolean indicating whether block must be indented beyond
  the current level; set to ``False`` for block of left-most statements
  (default= ``True``)

A valid block must contain at least one ``blockStatement``.

(Note that indentedBlock uses internal parse actions which make it
incompatible with packrat parsing.)

Example::

    data = '''
    def A(z):
      A1
      B = 100
      G = A2
      A2
      A3
    B
    def BB(a,b,c):
      BB1
      def BBA():
        bba1
        bba2
        bba3
    C
    D
    def spam(x,y):
         def eggs(z):
             pass
    '''


    indentStack = [1]
    stmt = Forward()

    identifier = Word(alphas, alphanums)
    funcDecl = ("def" + identifier + Group("(" + Opt(delimitedList(identifier)) + ")") + ":")
    func_body = indentedBlock(stmt, indentStack)
    funcDef = Group(funcDecl + func_body)

    rvalue = Forward()
    funcCall = Group(identifier + "(" + Opt(delimitedList(rvalue)) + ")")
    rvalue << (funcCall | identifier | Word(nums))
    assignment = Group(identifier + "=" + rvalue)
    stmt << (funcDef | assignment | identifier)

    module_body = stmt[1, ...]

    parseTree = module_body.parseString(data)
    parseTree.pprint()

prints::

    [['def',
      'A',
      ['(', 'z', ')'],
      ':',
      [['A1'], [['B', '=', '100']], [['G', '=', 'A2']], ['A2'], ['A3']]],
     'B',
     ['def',
      'BB',
      ['(', 'a', 'b', 'c', ')'],
      ':',
      [['BB1'], [['def', 'BBA', ['(', ')'], ':', [['bba1'], ['bba2'], ['bba3']]]]]],
     'C',
     'D',
     ['def',
      'spam',
      ['(', 'x', 'y', ')'],
      ':',
      [[['def', 'eggs', ['(', 'z', ')'], ':', [['pass']]]]]]]

---
## delimited_list
```python
from helpers import delimited_list
```

(DEPRECATED - use :class:`DelimitedList` class)

---
## count_field_parse_action
```python
from helpers import count_field_parse_action
```



---
## copy_token_to_repeater
```python
from helpers import copy_token_to_repeater
```



---
## _FB
```python
from helpers import _FB
```



---
## reset_stack
```python
from helpers import reset_stack
```



---
## checkPeerIndent
```python
from helpers import checkPeerIndent
```



---
## checkSubIndent
```python
from helpers import checkSubIndent
```



---
## checkUnindent
```python
from helpers import checkUnindent
```



---
## must_match_these_tokens
```python
from helpers import must_match_these_tokens
```



---
## extractText
```python
from helpers import extractText
```



---
## parseImpl
```python
from helpers import parseImpl
```



---
## __name__
```python
from yaml_util import __name__
```



---
## YamlLoader
```python
from yaml_util import YamlLoader
```



---
## yaml_load
```python
from yaml_util import yaml_load
```

Return dict of source YAML file using loader, recursively deep merging inherited parent.

---
## __name__
```python
from cache import __name__
```



---
## _download_url
```python
from cache import _download_url
```



---
## download_and_cache_url
```python
from cache import download_and_cache_url
```

Downloads a file from the URL, stores it under ~/.cache/, and returns its content.

For tracking the age of the content, a prefix is inserted into the stored file, rather than relying on mtime.

Args:
    url: URL to use.
    download: Callback that will accept the URL and actually perform the download.
    cache_duration: How long to consider the URL content cached.
    comment: The appropriate comment prefix for this file format.

---
## _dig
```python
from __init__ import _dig
```

Receives a string such as 'foo.bar' and returns `cfg['foo']['bar']`, or `_NotFound`.

A list of single-item dicts gets converted to a flat dict. This is intended for `plugins` config.

---
## _strings
```python
from __init__ import _strings
```



---
## _entry_points
```python
from __init__ import _entry_points
```



---
## _PluginKind
```python
from __init__ import _PluginKind
```



---
## get_projects_file
```python
from __init__ import get_projects_file
```



---
## get_deps
```python
from __init__ import get_deps
```

Print PyPI package dependencies inferred from a mkdocs.yml file based on a reverse mapping of known projects.

Args:
    config_file: Non-default mkdocs.yml file - content as a buffer, or path.
    projects_file: File/buffer that declares all known MkDocs-related projects.
        The file is in YAML format and contains `projects: [{mkdocs_theme:, mkdocs_plugin:, markdown_extension:}]

---
## CountHandler
```python
from __main__ import CountHandler
```



---
## cli
```python
from __main__ import cli
```

MkDocs - Project documentation with Markdown.

---
## handle
```python
from __main__ import handle
```



---
## __name__
```python
from compiler import __name__
```



---
## optimizeconst
```python
from compiler import optimizeconst
```



---
## _make_binop
```python
from compiler import _make_binop
```



---
## _make_unop
```python
from compiler import _make_unop
```



---
## generate
```python
from compiler import generate
```

Generate the python source for a node tree.

---
## has_safe_repr
```python
from compiler import has_safe_repr
```

Does the node have a safe representation?

---
## find_undeclared
```python
from compiler import find_undeclared
```

Check if the names passed are accessed undeclared.  The return value
is a set of all the undeclared names from the sequence of names found.

---
## MacroRef
```python
from compiler import MacroRef
```



---
## Frame
```python
from compiler import Frame
```

Holds compile time information for us.

---
## VisitorExit
```python
from compiler import VisitorExit
```

Exception used by the `UndeclaredNameVisitor` to signal a stop.

---
## DependencyFinderVisitor
```python
from compiler import DependencyFinderVisitor
```

A visitor that collects filter and test calls.

---
## UndeclaredNameVisitor
```python
from compiler import UndeclaredNameVisitor
```

A visitor that checks if a name is accessed without being
declared.  This is different from the frame visitor as it will
not stop at closure frames.

---
## CompilerExit
```python
from compiler import CompilerExit
```

Raised if the compiler encountered a situation where it just
doesn't make sense to further process the code.  Any block that
raises such an exception is not further processed.

---
## CodeGenerator
```python
from compiler import CodeGenerator
```



---
## new_func
```python
from compiler import new_func
```



---
## visitor
```python
from compiler import visitor
```



---
## __init__
```python
from compiler import __init__
```



---
## copy
```python
from compiler import copy
```

Create a copy of the current one.

---
## inner
```python
from compiler import inner
```

Return an inner frame.

---
## soft
```python
from compiler import soft
```

Return a soft frame.  A soft frame may not be modified as
standalone thing as it shares the resources with the frame it
was created of, but it's not a rootlevel frame any longer.

This is only used to implement if-statements and conditional
expressions.

---
## visit_Filter
```python
from compiler import visit_Filter
```



---
## visit_Test
```python
from compiler import visit_Test
```



---
## visit_Block
```python
from compiler import visit_Block
```

Call a block and register it for the template.

---
## visit_Name
```python
from compiler import visit_Name
```



---
## optimized
```python
from compiler import optimized
```



---
## fail
```python
from compiler import fail
```

Fail with a :exc:`TemplateAssertionError`.

---
## temporary_identifier
```python
from compiler import temporary_identifier
```

Get a new unique identifier.

---
## buffer
```python
from compiler import buffer
```

Enable buffering for the frame from that point onwards.

---
## return_buffer_contents
```python
from compiler import return_buffer_contents
```

Return the buffer contents of the frame.

---
## indent
```python
from compiler import indent
```

Indent by one.

---
## outdent
```python
from compiler import outdent
```

Outdent by step.

---
## start_write
```python
from compiler import start_write
```

Yield or write into the frame buffer.

---
## end_write
```python
from compiler import end_write
```

End the writing process started by `start_write`.

---
## simple_write
```python
from compiler import simple_write
```

Simple shortcut for start_write + write + end_write.

---
## blockvisit
```python
from compiler import blockvisit
```

Visit a list of nodes as block in a frame.  If the current frame
is no buffer a dummy ``if 0: yield None`` is written automatically.

---
## write
```python
from compiler import write
```

Write a string into the output stream.

---
## writeline
```python
from compiler import writeline
```

Combination of newline and write.

---
## newline
```python
from compiler import newline
```

Add one or more newlines before the next write.

---
## signature
```python
from compiler import signature
```

Writes a function call to the stream for the current node.
A leading comma is added automatically.  The extra keyword
arguments may not include python keywords otherwise a syntax
error could occur.  The extra keyword arguments should be given
as python dict.

---
## pull_dependencies
```python
from compiler import pull_dependencies
```

Find all filter and test names used in the template and
assign them to variables in the compiled namespace. Checking
that the names are registered with the environment is done when
compiling the Filter and Test nodes. If the node is in an If or
CondExpr node, the check is done at runtime instead.

.. versionchanged:: 3.0
    Filters and tests in If and CondExpr nodes are checked at
    runtime instead of compile time.

---
## enter_frame
```python
from compiler import enter_frame
```



---
## leave_frame
```python
from compiler import leave_frame
```



---
## choose_async
```python
from compiler import choose_async
```



---
## func
```python
from compiler import func
```



---
## macro_body
```python
from compiler import macro_body
```

Dump the function def of a macro or call block.

---
## macro_def
```python
from compiler import macro_def
```

Dump the macro definition for the def created by macro_body.

---
## position
```python
from compiler import position
```

Return a human readable position for the node.

---
## dump_local_context
```python
from compiler import dump_local_context
```



---
## write_commons
```python
from compiler import write_commons
```

Writes a common preamble that is used by root and block functions.
Primarily this sets up common local helpers and enforces a generator
through a dead branch.

---
## push_parameter_definitions
```python
from compiler import push_parameter_definitions
```

Pushes all parameter targets from the given frame into a local
stack that permits tracking of yet to be assigned parameters.  In
particular this enables the optimization from `visit_Name` to skip
undefined expressions for parameters in macros as macros can reference
otherwise unbound parameters.

---
## pop_parameter_definitions
```python
from compiler import pop_parameter_definitions
```

Pops the current parameter definitions set.

---
## mark_parameter_stored
```python
from compiler import mark_parameter_stored
```

Marks a parameter in the current parameter definitions as stored.
This will skip the enforced undefined checks.

---
## push_context_reference
```python
from compiler import push_context_reference
```



---
## pop_context_reference
```python
from compiler import pop_context_reference
```



---
## get_context_ref
```python
from compiler import get_context_ref
```



---
## get_resolve_func
```python
from compiler import get_resolve_func
```



---
## derive_context
```python
from compiler import derive_context
```



---
## parameter_is_undeclared
```python
from compiler import parameter_is_undeclared
```

Checks if a given target is an undeclared parameter.

---
## push_assign_tracking
```python
from compiler import push_assign_tracking
```

Pushes a new layer for assignment tracking.

---
## pop_assign_tracking
```python
from compiler import pop_assign_tracking
```

Pops the topmost level for assignment tracking and updates the
context variables if necessary.

---
## visit_Template
```python
from compiler import visit_Template
```



---
## visit_Extends
```python
from compiler import visit_Extends
```

Calls the extender.

---
## visit_Include
```python
from compiler import visit_Include
```

Handles includes.

---
## _import_common
```python
from compiler import _import_common
```



---
## visit_Import
```python
from compiler import visit_Import
```

Visit regular imports.

---
## visit_FromImport
```python
from compiler import visit_FromImport
```

Visit named imports.

---
## visit_For
```python
from compiler import visit_For
```



---
## visit_If
```python
from compiler import visit_If
```



---
## visit_Macro
```python
from compiler import visit_Macro
```



---
## visit_CallBlock
```python
from compiler import visit_CallBlock
```



---
## visit_FilterBlock
```python
from compiler import visit_FilterBlock
```



---
## visit_With
```python
from compiler import visit_With
```



---
## visit_ExprStmt
```python
from compiler import visit_ExprStmt
```



---
## _FinalizeInfo
```python
from compiler import _FinalizeInfo
```



---
## _default_finalize
```python
from compiler import _default_finalize
```

The default finalize function if the environment isn't
configured with one. Or, if the environment has one, this is
called on that function's output for constants.

---
## _make_finalize
```python
from compiler import _make_finalize
```

Build the finalize function to be used on constants and at
runtime. Cached so it's only created once for all output nodes.

Returns a ``namedtuple`` with the following attributes:

``const``
    A function to finalize constant data at compile time.

``src``
    Source code to output around nodes to be evaluated at
    runtime.

---
## _output_const_repr
```python
from compiler import _output_const_repr
```

Given a group of constant values converted from ``Output``
child nodes, produce a string to write to the template module
source.

---
## _output_child_to_const
```python
from compiler import _output_child_to_const
```

Try to optimize a child of an ``Output`` node by trying to
convert it to constant, finalized data at compile time.

If :exc:`Impossible` is raised, the node is not constant and
will be evaluated at runtime. Any other exception will also be
evaluated at runtime for easier debugging.

---
## _output_child_pre
```python
from compiler import _output_child_pre
```

Output extra source code before visiting a child of an
``Output`` node.

---
## _output_child_post
```python
from compiler import _output_child_post
```

Output extra source code after visiting a child of an
``Output`` node.

---
## visit_Output
```python
from compiler import visit_Output
```



---
## visit_Assign
```python
from compiler import visit_Assign
```



---
## visit_AssignBlock
```python
from compiler import visit_AssignBlock
```



---
## visit_NSRef
```python
from compiler import visit_NSRef
```



---
## visit_Const
```python
from compiler import visit_Const
```



---
## visit_TemplateData
```python
from compiler import visit_TemplateData
```



---
## visit_Tuple
```python
from compiler import visit_Tuple
```



---
## visit_List
```python
from compiler import visit_List
```



---
## visit_Dict
```python
from compiler import visit_Dict
```



---
## visit_Concat
```python
from compiler import visit_Concat
```



---
## visit_Compare
```python
from compiler import visit_Compare
```



---
## visit_Operand
```python
from compiler import visit_Operand
```



---
## visit_Getattr
```python
from compiler import visit_Getattr
```



---
## visit_Getitem
```python
from compiler import visit_Getitem
```



---
## visit_Slice
```python
from compiler import visit_Slice
```



---
## _filter_test_common
```python
from compiler import _filter_test_common
```



---
## visit_CondExpr
```python
from compiler import visit_CondExpr
```



---
## visit_Call
```python
from compiler import visit_Call
```



---
## visit_Keyword
```python
from compiler import visit_Keyword
```



---
## visit_MarkSafe
```python
from compiler import visit_MarkSafe
```



---
## visit_MarkSafeIfAutoescape
```python
from compiler import visit_MarkSafeIfAutoescape
```



---
## visit_EnvironmentAttribute
```python
from compiler import visit_EnvironmentAttribute
```



---
## visit_ExtensionAttribute
```python
from compiler import visit_ExtensionAttribute
```



---
## visit_ImportedName
```python
from compiler import visit_ImportedName
```



---
## visit_InternalName
```python
from compiler import visit_InternalName
```



---
## visit_ContextReference
```python
from compiler import visit_ContextReference
```



---
## visit_DerivedContextReference
```python
from compiler import visit_DerivedContextReference
```



---
## visit_Continue
```python
from compiler import visit_Continue
```



---
## visit_Break
```python
from compiler import visit_Break
```



---
## visit_Scope
```python
from compiler import visit_Scope
```



---
## visit_OverlayScope
```python
from compiler import visit_OverlayScope
```



---
## visit_EvalContextModifier
```python
from compiler import visit_EvalContextModifier
```



---
## visit_ScopedEvalContextModifier
```python
from compiler import visit_ScopedEvalContextModifier
```



---
## write_expr2
```python
from compiler import write_expr2
```



---
## finalize
```python
from compiler import finalize
```



---
## __name__
```python
from async_utils import __name__
```



---
## async_variant
```python
from async_utils import async_variant
```



---
## decorator
```python
from async_utils import decorator
```



---
## wrapper
```python
from async_utils import wrapper
```



---
## is_async
```python
from async_utils import is_async
```



---
## __name__
```python
from loaders import __name__
```

API and implementations for loading templates from different data
sources.

---
## split_template_path
```python
from loaders import split_template_path
```

Split a path into segments and perform a sanity check.  If it detects
'..' in the path it will raise a `TemplateNotFound` error.

---
## BaseLoader
```python
from loaders import BaseLoader
```

Baseclass for all loaders.  Subclass this and override `get_source` to
implement a custom loading mechanism.  The environment provides a
`get_template` method that calls the loader's `load` method to get the
:class:`Template` object.

A very basic example for a loader that looks up templates on the file
system could look like this::

    from jinja2 import BaseLoader, TemplateNotFound
    from os.path import join, exists, getmtime

    class MyLoader(BaseLoader):

        def __init__(self, path):
            self.path = path

        def get_source(self, environment, template):
            path = join(self.path, template)
            if not exists(path):
                raise TemplateNotFound(template)
            mtime = getmtime(path)
            with open(path) as f:
                source = f.read()
            return source, path, lambda: mtime == getmtime(path)

---
## FileSystemLoader
```python
from loaders import FileSystemLoader
```

Load templates from a directory in the file system.

The path can be relative or absolute. Relative paths are relative to
the current working directory.

.. code-block:: python

    loader = FileSystemLoader("templates")

A list of paths can be given. The directories will be searched in
order, stopping at the first matching template.

.. code-block:: python

    loader = FileSystemLoader(["/override/templates", "/default/templates"])

:param searchpath: A path, or list of paths, to the directory that
    contains the templates.
:param encoding: Use this encoding to read the text from template
    files.
:param followlinks: Follow symbolic links in the path.

.. versionchanged:: 2.8
    Added the ``followlinks`` parameter.

---
## PackageLoader
```python
from loaders import PackageLoader
```

Load templates from a directory in a Python package.

:param package_name: Import name of the package that contains the
    template directory.
:param package_path: Directory within the imported package that
    contains the templates.
:param encoding: Encoding of template files.

The following example looks up templates in the ``pages`` directory
within the ``project.ui`` package.

.. code-block:: python

    loader = PackageLoader("project.ui", "pages")

Only packages installed as directories (standard pip behavior) or
zip/egg files (less common) are supported. The Python API for
introspecting data in packages is too limited to support other
installation methods the way this loader requires.

There is limited support for :pep:`420` namespace packages. The
template directory is assumed to only be in one namespace
contributor. Zip files contributing to a namespace are not
supported.

.. versionchanged:: 3.0
    No longer uses ``setuptools`` as a dependency.

.. versionchanged:: 3.0
    Limited PEP 420 namespace package support.

---
## DictLoader
```python
from loaders import DictLoader
```

Loads a template from a Python dict mapping template names to
template source.  This loader is useful for unittesting:

>>> loader = DictLoader({'index.html': 'source here'})

Because auto reloading is rarely useful this is disabled per default.

---
## FunctionLoader
```python
from loaders import FunctionLoader
```

A loader that is passed a function which does the loading.  The
function receives the name of the template and has to return either
a string with the template source, a tuple in the form ``(source,
filename, uptodatefunc)`` or `None` if the template does not exist.

>>> def load_template(name):
...     if name == 'index.html':
...         return '...'
...
>>> loader = FunctionLoader(load_template)

The `uptodatefunc` is a function that is called if autoreload is enabled
and has to return `True` if the template is still up to date.  For more
details have a look at :meth:`BaseLoader.get_source` which has the same
return value.

---
## PrefixLoader
```python
from loaders import PrefixLoader
```

A loader that is passed a dict of loaders where each loader is bound
to a prefix.  The prefix is delimited from the template by a slash per
default, which can be changed by setting the `delimiter` argument to
something else::

    loader = PrefixLoader({
        'app1':     PackageLoader('mypackage.app1'),
        'app2':     PackageLoader('mypackage.app2')
    })

By loading ``'app1/index.html'`` the file from the app1 package is loaded,
by loading ``'app2/index.html'`` the file from the second.

---
## ChoiceLoader
```python
from loaders import ChoiceLoader
```

This loader works like the `PrefixLoader` just that no prefix is
specified.  If a template could not be found by one loader the next one
is tried.

>>> loader = ChoiceLoader([
...     FileSystemLoader('/path/to/user/templates'),
...     FileSystemLoader('/path/to/system/templates')
... ])

This is useful if you want to allow users to override builtin templates
from a different location.

---
## _TemplateModule
```python
from loaders import _TemplateModule
```

Like a normal module but with support for weak references

---
## ModuleLoader
```python
from loaders import ModuleLoader
```

This loader loads templates from precompiled templates.

Example usage:

>>> loader = ChoiceLoader([
...     ModuleLoader('/path/to/compiled/templates'),
...     FileSystemLoader('/path/to/templates')
... ])

Templates can be precompiled with :meth:`Environment.compile_templates`.

---
## get_source
```python
from loaders import get_source
```



---
## list_templates
```python
from loaders import list_templates
```



---
## load
```python
from loaders import load
```



---
## __init__
```python
from loaders import __init__
```



---
## get_loader
```python
from loaders import get_loader
```



---
## get_template_key
```python
from loaders import get_template_key
```



---
## get_module_filename
```python
from loaders import get_module_filename
```



---
## uptodate
```python
from loaders import uptodate
```



---
## up_to_date
```python
from loaders import up_to_date
```



---
## __name__
```python
from idtracking import __name__
```



---
## find_symbols
```python
from idtracking import find_symbols
```



---
## symbols_for_node
```python
from idtracking import symbols_for_node
```



---
## Symbols
```python
from idtracking import Symbols
```



---
## RootVisitor
```python
from idtracking import RootVisitor
```



---
## FrameSymbolVisitor
```python
from idtracking import FrameSymbolVisitor
```

A visitor for `Frame.inspect`.

---
## __init__
```python
from idtracking import __init__
```



---
## analyze_node
```python
from idtracking import analyze_node
```



---
## _define_ref
```python
from idtracking import _define_ref
```



---
## find_load
```python
from idtracking import find_load
```



---
## find_ref
```python
from idtracking import find_ref
```



---
## ref
```python
from idtracking import ref
```



---
## copy
```python
from idtracking import copy
```



---
## store
```python
from idtracking import store
```



---
## declare_parameter
```python
from idtracking import declare_parameter
```



---
## load
```python
from idtracking import load
```



---
## branch_update
```python
from idtracking import branch_update
```



---
## dump_stores
```python
from idtracking import dump_stores
```



---
## dump_param_targets
```python
from idtracking import dump_param_targets
```



---
## _simple_visit
```python
from idtracking import _simple_visit
```



---
## visit_AssignBlock
```python
from idtracking import visit_AssignBlock
```

Stop visiting at block assigns.

---
## visit_CallBlock
```python
from idtracking import visit_CallBlock
```



---
## visit_OverlayScope
```python
from idtracking import visit_OverlayScope
```

Do not visit into overlay scopes.

---
## visit_For
```python
from idtracking import visit_For
```

Visiting stops at for blocks.  However the block sequence
is visited as part of the outer scope.

---
## visit_With
```python
from idtracking import visit_With
```



---
## generic_visit
```python
from idtracking import generic_visit
```



---
## visit_Name
```python
from idtracking import visit_Name
```

All assignments to names go through this function.

---
## visit_NSRef
```python
from idtracking import visit_NSRef
```



---
## visit_If
```python
from idtracking import visit_If
```



---
## visit_Macro
```python
from idtracking import visit_Macro
```



---
## visit_Import
```python
from idtracking import visit_Import
```



---
## visit_FromImport
```python
from idtracking import visit_FromImport
```



---
## visit_Assign
```python
from idtracking import visit_Assign
```

Visit assignments in the correct order.

---
## visit_FilterBlock
```python
from idtracking import visit_FilterBlock
```



---
## visit_Scope
```python
from idtracking import visit_Scope
```

Stop visiting at scopes.

---
## visit_Block
```python
from idtracking import visit_Block
```

Stop visiting at blocks.

---
## inner_visit
```python
from idtracking import inner_visit
```



---
## __name__
```python
from runtime import __name__
```

The runtime functions and state used by compiled templates.

---
## identity
```python
from runtime import identity
```

Returns its argument. Useful for certain things in the
environment.

---
## markup_join
```python
from runtime import markup_join
```

Concatenation that escapes if necessary and converts to string.

---
## str_join
```python
from runtime import str_join
```

Simple args to string conversion and concatenation.

---
## new_context
```python
from runtime import new_context
```

Internal helper for context creation.

---
## TemplateReference
```python
from runtime import TemplateReference
```

The `self` in templates.

---
## _dict_method_all
```python
from runtime import _dict_method_all
```



---
## Context
```python
from runtime import Context
```

The template context holds the variables of a template.  It stores the
values passed to the template and also the names the template exports.
Creating instances is neither supported nor useful as it's created
automatically at various stages of the template evaluation and should not
be created by hand.

The context is immutable.  Modifications on :attr:`parent` **must not**
happen and modifications on :attr:`vars` are allowed from generated
template code only.  Template filters and global functions marked as
:func:`pass_context` get the active context passed as first argument
and are allowed to access the context read-only.

The template context supports read only dict operations (`get`,
`keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
`__getitem__`, `__contains__`).  Additionally there is a :meth:`resolve`
method that doesn't fail with a `KeyError` but returns an
:class:`Undefined` object for missing variables.

---
## BlockReference
```python
from runtime import BlockReference
```

One block on a template reference.

---
## LoopContext
```python
from runtime import LoopContext
```

A wrapper iterable for dynamic ``for`` loops, with information
about the loop and iteration.

---
## AsyncLoopContext
```python
from runtime import AsyncLoopContext
```



---
## Macro
```python
from runtime import Macro
```

Wraps a macro function.

---
## Undefined
```python
from runtime import Undefined
```

The default undefined type.  This undefined type can be printed and
iterated over, but every other access will raise an :exc:`UndefinedError`:

>>> foo = Undefined(name='foo')
>>> str(foo)
''
>>> not foo
True
>>> foo + 42
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined

---
## make_logging_undefined
```python
from runtime import make_logging_undefined
```

Given a logger object this returns a new undefined class that will
log certain failures.  It will log iterations and printing.  If no
logger is given a default logger is created.

Example::

    logger = logging.getLogger(__name__)
    LoggingUndefined = make_logging_undefined(
        logger=logger,
        base=Undefined
    )

.. versionadded:: 2.8

:param logger: the logger to use.  If not provided, a default logger
               is created.
:param base: the base class to add logging functionality to.  This
             defaults to :class:`Undefined`.

---
## ChainableUndefined
```python
from runtime import ChainableUndefined
```

An undefined that is chainable, where both ``__getattr__`` and
``__getitem__`` return itself rather than raising an
:exc:`UndefinedError`.

>>> foo = ChainableUndefined(name='foo')
>>> str(foo.bar['baz'])
''
>>> foo.bar['baz'] + 42
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined

.. versionadded:: 2.11.0

---
## DebugUndefined
```python
from runtime import DebugUndefined
```

An undefined that returns the debug info when printed.

>>> foo = DebugUndefined(name='foo')
>>> str(foo)
'{{ foo }}'
>>> not foo
True
>>> foo + 42
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined

---
## StrictUndefined
```python
from runtime import StrictUndefined
```

An undefined that barks on print and iteration as well as boolean
tests and all kinds of comparisons.  In other words: you can do nothing
with it except checking if it's defined using the `defined` test.

>>> foo = StrictUndefined(name='foo')
>>> str(foo)
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined
>>> not foo
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined
>>> foo + 42
Traceback (most recent call last):
  ...
jinja2.exceptions.UndefinedError: 'foo' is undefined

---
## LoopRenderFunc
```python
from runtime import LoopRenderFunc
```



---
## __init__
```python
from runtime import __init__
```



---
## __getitem__
```python
from runtime import __getitem__
```

Look up a variable by name with ``[]`` syntax, or raise a
``KeyError`` if the key is not found.

---
## __repr__
```python
from runtime import __repr__
```



---
## f_all
```python
from runtime import f_all
```



---
## super
```python
from runtime import super
```

Super the block.

---
## get
```python
from runtime import get
```

Look up a variable by name, or return a default if the key is
not found.

:param key: The variable name to look up.
:param default: The value to return if the key is not found.

---
## resolve
```python
from runtime import resolve
```

Look up a variable by name, or return an :class:`Undefined`
object if the key is not found.

If you need to add custom behavior, override
:meth:`resolve_or_missing`, not this method. The various lookup
functions use that method, not this one.

:param key: The variable name to look up.

---
## resolve_or_missing
```python
from runtime import resolve_or_missing
```

Look up a variable by name, or return a ``missing`` sentinel
if the key is not found.

Override this method to add custom lookup behavior.
:meth:`resolve`, :meth:`get`, and :meth:`__getitem__` use this
method. Don't call this method directly.

:param key: The variable name to look up.

---
## get_exported
```python
from runtime import get_exported
```

Get a new dict with the exported variables.

---
## get_all
```python
from runtime import get_all
```

Return the complete context as dict including the exported
variables.  For optimizations reasons this might not return an
actual copy so be careful with using it.

---
## call
```python
from runtime import call
```

Call the callable with the arguments and keyword arguments
provided but inject the active context or environment as first
argument if the callable has :func:`pass_context` or
:func:`pass_environment`.

---
## derived
```python
from runtime import derived
```

Internal helper function to create a derived context.  This is
used in situations where the system needs a new context in the same
template that is independent.

---
## __contains__
```python
from runtime import __contains__
```



---
## __call__
```python
from runtime import __call__
```



---
## _to_iterator
```python
from runtime import _to_iterator
```



---
## length
```python
from runtime import length
```

Length of the iterable.

If the iterable is a generator or otherwise does not have a
size, it is eagerly evaluated to get a size.

---
## __len__
```python
from runtime import __len__
```



---
## depth
```python
from runtime import depth
```

How many levels deep a recursive loop currently is, starting at 1.

---
## index
```python
from runtime import index
```

Current iteration of the loop, starting at 1.

---
## revindex0
```python
from runtime import revindex0
```

Number of iterations from the end of the loop, ending at 0.

Requires calculating :attr:`length`.

---
## revindex
```python
from runtime import revindex
```

Number of iterations from the end of the loop, ending at 1.

Requires calculating :attr:`length`.

---
## first
```python
from runtime import first
```

Whether this is the first iteration of the loop.

---
## _peek_next
```python
from runtime import _peek_next
```

Return the next element in the iterable, or :data:`missing`
if the iterable is exhausted. Only peeks one item ahead, caching
the result in :attr:`_last` for use in subsequent checks. The
cache is reset when :meth:`__next__` is called.

---
## last
```python
from runtime import last
```

Whether this is the last iteration of the loop.

Causes the iterable to advance early. See
:func:`itertools.groupby` for issues this can cause.
The :func:`groupby` filter avoids that issue.

---
## previtem
```python
from runtime import previtem
```

The item in the previous iteration. Undefined during the
first iteration.

---
## nextitem
```python
from runtime import nextitem
```

The item in the next iteration. Undefined during the last
iteration.

Causes the iterable to advance early. See
:func:`itertools.groupby` for issues this can cause.
The :func:`jinja-filters.groupby` filter avoids that issue.

---
## cycle
```python
from runtime import cycle
```

Return a value from the given args, cycling through based on
the current :attr:`index0`.

:param args: One or more values to cycle through.

---
## changed
```python
from runtime import changed
```

Return ``True`` if previously called with a different value
(including when called for the first time).

:param value: One or more values to compare to the last call.

---
## __iter__
```python
from runtime import __iter__
```



---
## __next__
```python
from runtime import __next__
```



---
## __aiter__
```python
from runtime import __aiter__
```



---
## _invoke
```python
from runtime import _invoke
```



---
## _undefined_message
```python
from runtime import _undefined_message
```

Build a message about the undefined value based on how it was
accessed.

---
## _fail_with_undefined_error
```python
from runtime import _fail_with_undefined_error
```



---
## __getattr__
```python
from runtime import __getattr__
```



---
## __eq__
```python
from runtime import __eq__
```



---
## __ne__
```python
from runtime import __ne__
```



---
## __hash__
```python
from runtime import __hash__
```



---
## __str__
```python
from runtime import __str__
```



---
## __bool__
```python
from runtime import __bool__
```



---
## _log_message
```python
from runtime import _log_message
```



---
## LoggingUndefined
```python
from runtime import LoggingUndefined
```



---
## __html__
```python
from runtime import __html__
```



---
## Parser
```python
from parser import Parser
```



---
## fail
```python
from parser import fail
```

Convenience method that raises `exc` with the message, passed
line number or last line number as well as the current name and
filename.

---
## _fail_ut_eof
```python
from parser import _fail_ut_eof
```



---
## fail_unknown_tag
```python
from parser import fail_unknown_tag
```

Called if the parser encounters an unknown tag.  Tries to fail
with a human readable error message that could help to identify
the problem.

---
## fail_eof
```python
from parser import fail_eof
```

Like fail_unknown_tag but for end of template situations.

---
## is_tuple_end
```python
from parser import is_tuple_end
```

Are we at the end of a tuple?

---
## free_identifier
```python
from parser import free_identifier
```

Return a new free identifier as :class:`~jinja2.nodes.InternalName`.

---
## parse_statement
```python
from parser import parse_statement
```

Parse a single statement.

---
## parse_statements
```python
from parser import parse_statements
```

Parse multiple statements into a list until one of the end tokens
is reached.  This is used to parse the body of statements as it also
parses template data if appropriate.  The parser checks first if the
current token is a colon and skips it if there is one.  Then it checks
for the block end and parses until if one of the `end_tokens` is
reached.  Per default the active token in the stream at the end of
the call is the matched end token.  If this is not wanted `drop_needle`
can be set to `True` and the end token is removed.

---
## parse_set
```python
from parser import parse_set
```

Parse an assign statement.

---
## parse_for
```python
from parser import parse_for
```

Parse a for loop.

---
## parse_if
```python
from parser import parse_if
```

Parse an if construct.

---
## parse_with
```python
from parser import parse_with
```



---
## parse_autoescape
```python
from parser import parse_autoescape
```



---
## parse_block
```python
from parser import parse_block
```



---
## parse_extends
```python
from parser import parse_extends
```



---
## parse_import_context
```python
from parser import parse_import_context
```



---
## parse_include
```python
from parser import parse_include
```



---
## parse_import
```python
from parser import parse_import
```



---
## parse_from
```python
from parser import parse_from
```



---
## parse_signature
```python
from parser import parse_signature
```



---
## parse_call_block
```python
from parser import parse_call_block
```



---
## parse_filter_block
```python
from parser import parse_filter_block
```



---
## parse_macro
```python
from parser import parse_macro
```



---
## parse_print
```python
from parser import parse_print
```



---
## parse_assign_target
```python
from parser import parse_assign_target
```

Parse an assignment target.  As Jinja allows assignments to
tuples, this function can parse all allowed assignment targets.  Per
default assignments to tuples are parsed, that can be disable however
by setting `with_tuple` to `False`.  If only assignments to names are
wanted `name_only` can be set to `True`.  The `extra_end_rules`
parameter is forwarded to the tuple parsing function.  If
`with_namespace` is enabled, a namespace assignment may be parsed.

---
## parse_expression
```python
from parser import parse_expression
```

Parse an expression.  Per default all expressions are parsed, if
the optional `with_condexpr` parameter is set to `False` conditional
expressions are not parsed.

---
## parse_condexpr
```python
from parser import parse_condexpr
```



---
## parse_or
```python
from parser import parse_or
```



---
## parse_and
```python
from parser import parse_and
```



---
## parse_not
```python
from parser import parse_not
```



---
## parse_compare
```python
from parser import parse_compare
```



---
## parse_math1
```python
from parser import parse_math1
```



---
## parse_concat
```python
from parser import parse_concat
```



---
## parse_math2
```python
from parser import parse_math2
```



---
## parse_pow
```python
from parser import parse_pow
```



---
## parse_unary
```python
from parser import parse_unary
```



---
## parse_primary
```python
from parser import parse_primary
```



---
## parse_tuple
```python
from parser import parse_tuple
```

Works like `parse_expression` but if multiple expressions are
delimited by a comma a :class:`~jinja2.nodes.Tuple` node is created.
This method could also return a regular expression instead of a tuple
if no commas where found.

The default parsing mode is a full tuple.  If `simplified` is `True`
only names and literals are parsed.  The `no_condexpr` parameter is
forwarded to :meth:`parse_expression`.

Because tuples do not require delimiters and may end in a bogus comma
an extra hint is needed that marks the end of a tuple.  For example
for loops support tuples between `for` and `in`.  In that case the
`extra_end_rules` is set to ``['name:in']``.

`explicit_parentheses` is true if the parsing was triggered by an
expression in parentheses.  This is used to figure out if an empty
tuple is a valid expression or not.

---
## parse_list
```python
from parser import parse_list
```



---
## parse_dict
```python
from parser import parse_dict
```



---
## parse_postfix
```python
from parser import parse_postfix
```



---
## parse_filter_expr
```python
from parser import parse_filter_expr
```



---
## parse_subscript
```python
from parser import parse_subscript
```



---
## parse_subscribed
```python
from parser import parse_subscribed
```



---
## parse_call_args
```python
from parser import parse_call_args
```



---
## parse_call
```python
from parser import parse_call
```



---
## parse_filter
```python
from parser import parse_filter
```



---
## parse_test
```python
from parser import parse_test
```



---
## subparse
```python
from parser import subparse
```



---
## parse
```python
from parser import parse
```

Parse the source code.

---
## parse_context
```python
from parser import parse_context
```



---
## ensure
```python
from parser import ensure
```



---
## flush_data
```python
from parser import flush_data
```



---
## __name__
```python
from sandbox import __name__
```

A sandbox layer that ensures unsafe operations cannot be performed.
Useful when the template itself comes from an untrusted source.

---
## inspect_format_method
```python
from sandbox import inspect_format_method
```



---
## safe_range
```python
from sandbox import safe_range
```

A range that can't generate ranges with a length of more than
MAX_RANGE items.

---
## unsafe
```python
from sandbox import unsafe
```

Marks a function or method as unsafe.

.. code-block: python

    @unsafe
    def delete(self):
        pass

---
## is_internal_attribute
```python
from sandbox import is_internal_attribute
```

Test if the attribute given is an internal python attribute.  For
example this function returns `True` for the `func_code` attribute of
python objects.  This is useful if the environment method
:meth:`~SandboxedEnvironment.is_safe_attribute` is overridden.

>>> from jinja2.sandbox import is_internal_attribute
>>> is_internal_attribute(str, "mro")
True
>>> is_internal_attribute(str, "upper")
False

---
## modifies_known_mutable
```python
from sandbox import modifies_known_mutable
```

This function checks if an attribute on a builtin mutable object
(list, dict, set or deque) or the corresponding ABCs would modify it
if called.

>>> modifies_known_mutable({}, "clear")
True
>>> modifies_known_mutable({}, "keys")
False
>>> modifies_known_mutable([], "append")
True
>>> modifies_known_mutable([], "index")
False

If called with an unsupported object, ``False`` is returned.

>>> modifies_known_mutable("foo", "upper")
False

---
## SandboxedEnvironment
```python
from sandbox import SandboxedEnvironment
```

The sandboxed environment.  It works like the regular environment but
tells the compiler to generate sandboxed code.  Additionally subclasses of
this environment may override the methods that tell the runtime what
attributes or functions are safe to access.

If the template tries to access insecure code a :exc:`SecurityError` is
raised.  However also other exceptions may occur during the rendering so
the caller has to ensure that all exceptions are caught.

---
## ImmutableSandboxedEnvironment
```python
from sandbox import ImmutableSandboxedEnvironment
```

Works exactly like the regular `SandboxedEnvironment` but does not
permit modifications on the builtin mutable objects `list`, `set`, and
`dict` by using the :func:`modifies_known_mutable` function.

---
## SandboxedFormatter
```python
from sandbox import SandboxedFormatter
```



---
## SandboxedEscapeFormatter
```python
from sandbox import SandboxedEscapeFormatter
```



---
## __init__
```python
from sandbox import __init__
```



---
## is_safe_attribute
```python
from sandbox import is_safe_attribute
```



---
## is_safe_callable
```python
from sandbox import is_safe_callable
```

Check if an object is safely callable. By default callables
are considered safe unless decorated with :func:`unsafe`.

This also recognizes the Django convention of setting
``func.alters_data = True``.

---
## call_binop
```python
from sandbox import call_binop
```

For intercepted binary operator calls (:meth:`intercepted_binops`)
this function is executed instead of the builtin operator.  This can
be used to fine tune the behavior of certain operators.

.. versionadded:: 2.6

---
## call_unop
```python
from sandbox import call_unop
```

For intercepted unary operator calls (:meth:`intercepted_unops`)
this function is executed instead of the builtin operator.  This can
be used to fine tune the behavior of certain operators.

.. versionadded:: 2.6

---
## getitem
```python
from sandbox import getitem
```

Subscribe an object from sandboxed code.

---
## getattr
```python
from sandbox import getattr
```

Subscribe an object from sandboxed code and prefer the
attribute.  The attribute passed *must* be a bytestring.

---
## unsafe_undefined
```python
from sandbox import unsafe_undefined
```

Return an undefined object for unsafe attributes.

---
## format_string
```python
from sandbox import format_string
```

If a format call is detected, then this is routed through this
method so that our safety sandbox can be used for it.

---
## call
```python
from sandbox import call
```

Call an object from sandboxed code.

---
## get_field
```python
from sandbox import get_field
```



---
## __name__
```python
from visitor import __name__
```

Generic visitor pattern implementation for Python objects.

---
## NodeVisitor
```python
from visitor import NodeVisitor
```

Empty base class for parse tree node visitors.

The T type argument specifies the return type of the visit
methods. As all methods defined here return None by default,
subclasses do not always need to override all the methods.

TODO: make the default return value explicit, then turn on
      empty body checking in mypy_self_check.ini.

---
## NodeTransformer
```python
from visitor import NodeTransformer
```

Walks the abstract syntax tree and allows modifications of nodes.

The `NodeTransformer` will walk the AST and use the return value of the
visitor functions to replace or remove the old node.  If the return
value of the visitor function is `None` the node will be removed
from the previous location otherwise it's replaced with the return
value.  The return value may be the original node in which case no
replacement takes place.

---
## VisitCallable
```python
from visitor import VisitCallable
```



---
## get_visitor
```python
from visitor import get_visitor
```

Return the visitor function for this node or `None` if no visitor
exists for this node.  In that case the generic visit function is
used instead.

---
## visit
```python
from visitor import visit
```

This is the main entry to the visitor. The visitor will visit object
obj.

The visitor will first determine if there is a registered (via
@register()) visit function for the type of object. If there is, it
will be called, and (visitor, obj, *args, **kwargs) will be passed to
the user visit function.

If there is no user-registered visit function, of if there is and it
returns True, or it returns None (or doesn't return anything) and
visitor.defaultStop is False (default), then the visitor will proceed
to dispatch to one of self.visitObject(), self.visitList(),
self.visitDict(), or self.visitLeaf() (any of which can be overriden in
a subclass).

---
## generic_visit
```python
from visitor import generic_visit
```



---
## visit_list
```python
from visitor import visit_list
```

As transformers may return lists in some places this method
can be used to enforce a list as return value.

---
## __call__
```python
from visitor import __call__
```



---
## pass_context
```python
from utils import pass_context
```

Pass the :class:`~jinja2.runtime.Context` as the first argument
to the decorated function when called while rendering a template.

Can be used on functions, filters, and tests.

If only ``Context.eval_context`` is needed, use
:func:`pass_eval_context`. If only ``Context.environment`` is
needed, use :func:`pass_environment`.

.. versionadded:: 3.0.0
    Replaces ``contextfunction`` and ``contextfilter``.

---
## pass_eval_context
```python
from utils import pass_eval_context
```

Pass the :class:`~jinja2.nodes.EvalContext` as the first argument
to the decorated function when called while rendering a template.
See :ref:`eval-context`.

Can be used on functions, filters, and tests.

If only ``EvalContext.environment`` is needed, use
:func:`pass_environment`.

.. versionadded:: 3.0.0
    Replaces ``evalcontextfunction`` and ``evalcontextfilter``.

---
## pass_environment
```python
from utils import pass_environment
```

Pass the :class:`~jinja2.Environment` as the first argument to
the decorated function when called while rendering a template.

Can be used on functions, filters, and tests.

.. versionadded:: 3.0.0
    Replaces ``environmentfunction`` and ``environmentfilter``.

---
## _PassArg
```python
from utils import _PassArg
```



---
## internalcode
```python
from utils import internalcode
```

Marks the function as internally used

---
## is_undefined
```python
from utils import is_undefined
```

Check if the object passed is undefined.  This does nothing more than
performing an instance check against :class:`Undefined` but looks nicer.
This can be used for custom filters or tests that want to react to
undefined variables.  For example a custom default filter can look like
this::

    def default(var, default=''):
        if is_undefined(var):
            return default
        return var

---
## consume
```python
from utils import consume
```

Consumes an iterable without doing anything with it.

---
## clear_caches
```python
from utils import clear_caches
```

Jinja keeps internal caches for environments and lexers.  These are
used so that Jinja doesn't have to recreate environments and lexers all
the time.  Normally you don't have to care about that but if you are
measuring memory consumption you may want to clean the caches.

---
## import_string
```python
from utils import import_string
```

Stolen approximately from django. Import a dotted module path and return the attribute/class designated by the
last name in the path. Raise ImportError if the import fails.

---
## open_if_exists
```python
from utils import open_if_exists
```

Returns a file descriptor for the filename if that file exists,
otherwise ``None``.

---
## object_type_repr
```python
from utils import object_type_repr
```

Returns the name of the object's type.  For some recognized
singletons the name of the object is returned instead. (For
example for `None` and `Ellipsis`).

---
## pformat
```python
from utils import pformat
```

Format an object using :func:`pprint.pformat`.

---
## urlize
```python
from utils import urlize
```

Convert URLs in text into clickable links.

This may not recognize links in some situations. Usually, a more
comprehensive formatter, such as a Markdown library, is a better
choice.

Works on ``http://``, ``https://``, ``www.``, ``mailto:``, and email
addresses. Links with trailing punctuation (periods, commas, closing
parentheses) and leading punctuation (opening parentheses) are
recognized excluding the punctuation. Email addresses that include
header fields are not recognized (for example,
``mailto:address@example.com?cc=copy@example.com``).

:param text: Original text containing URLs to link.
:param trim_url_limit: Shorten displayed URL values to this length.
:param target: Add the ``target`` attribute to links.
:param rel: Add the ``rel`` attribute to links.
:param extra_schemes: Recognize URLs that start with these schemes
    in addition to the default behavior.

.. versionchanged:: 3.0
    The ``extra_schemes`` parameter was added.

.. versionchanged:: 3.0
    Generate ``https://`` links for URLs without a scheme.

.. versionchanged:: 3.0
    The parsing rules were updated. Recognize email addresses with
    or without the ``mailto:`` scheme. Validate IP addresses. Ignore
    parentheses and brackets in more cases.

---
## generate_lorem_ipsum
```python
from utils import generate_lorem_ipsum
```

Generate some lorem ipsum for the template.

---
## url_quote
```python
from utils import url_quote
```

Quote a string for use in a URL using the given charset.

:param obj: String or bytes to quote. Other types are converted to
    string then encoded to bytes using the given charset.
:param charset: Encode text to bytes using this charset.
:param for_qs: Quote "/" and use "+" for spaces.

---
## LRUCache
```python
from utils import LRUCache
```

A simple LRU Cache implementation.

---
## select_autoescape
```python
from utils import select_autoescape
```

Intelligently sets the initial value of autoescaping based on the
filename of the template.  This is the recommended way to configure
autoescaping if you do not want to write a custom function yourself.

If you want to enable it for all templates created from strings or
for all templates with `.html` and `.xml` extensions::

    from jinja2 import Environment, select_autoescape
    env = Environment(autoescape=select_autoescape(
        enabled_extensions=('html', 'xml'),
        default_for_string=True,
    ))

Example configuration to turn it on at all times except if the template
ends with `.txt`::

    from jinja2 import Environment, select_autoescape
    env = Environment(autoescape=select_autoescape(
        disabled_extensions=('txt',),
        default_for_string=True,
        default=True,
    ))

The `enabled_extensions` is an iterable of all the extensions that
autoescaping should be enabled for.  Likewise `disabled_extensions` is
a list of all templates it should be disabled for.  If a template is
loaded from a string then the default from `default_for_string` is used.
If nothing matches then the initial value of autoescaping is set to the
value of `default`.

For security reasons this function operates case insensitive.

.. versionadded:: 2.9

---
## htmlsafe_json_dumps
```python
from utils import htmlsafe_json_dumps
```

Serialize an object to a string of JSON with :func:`json.dumps`,
then replace HTML-unsafe characters with Unicode escapes and mark
the result safe with :class:`~markupsafe.Markup`.

This is available in templates as the ``|tojson`` filter.

The following characters are escaped: ``<``, ``>``, ``&``, ``'``.

The returned string is safe to render in HTML documents and
``<script>`` tags. The exception is in HTML attributes that are
double quoted; either use single quotes or the ``|forceescape``
filter.

:param obj: The object to serialize to JSON.
:param dumps: The ``dumps`` function to use. Defaults to
    ``env.policies["json.dumps_function"]``, which defaults to
    :func:`json.dumps`.
:param kwargs: Extra arguments to pass to ``dumps``. Merged onto
    ``env.policies["json.dumps_kwargs"]``.

.. versionchanged:: 3.0
    The ``dumper`` parameter is renamed to ``dumps``.

.. versionadded:: 2.9

---
## Cycler
```python
from utils import Cycler
```

Cycle through values by yield them one at a time, then restarting
once the end is reached. Available as ``cycler`` in templates.

Similar to ``loop.cycle``, but can be used outside loops or across
multiple loops. For example, render a list of folders and files in a
list, alternating giving them "odd" and "even" classes.

.. code-block:: html+jinja

    {% set row_class = cycler("odd", "even") %}
    <ul class="browser">
    {% for folder in folders %}
      <li class="folder {{ row_class.next() }}">{{ folder }}
    {% endfor %}
    {% for file in files %}
      <li class="file {{ row_class.next() }}">{{ file }}
    {% endfor %}
    </ul>

:param items: Each positional argument will be yielded in the order
    given for each cycle.

.. versionadded:: 2.1

---
## Joiner
```python
from utils import Joiner
```

A joining helper for templates.

---
## Namespace
```python
from utils import Namespace
```

A namespace object that can hold arbitrary attributes.  It may be
initialized from a dictionary or with keyword arguments.

---
## from_obj
```python
from utils import from_obj
```



---
## __init__
```python
from utils import __init__
```



---
## _postinit
```python
from utils import _postinit
```



---
## __getstate__
```python
from utils import __getstate__
```



---
## __setstate__
```python
from utils import __setstate__
```



---
## __getnewargs__
```python
from utils import __getnewargs__
```



---
## copy
```python
from utils import copy
```

Return a shallow copy of the instance.

---
## get
```python
from utils import get
```



---
## setdefault
```python
from utils import setdefault
```

Set `default` if the key is not in the cache otherwise
leave unchanged. Return the value of this key.

---
## clear
```python
from utils import clear
```

Clear the cache.

---
## __contains__
```python
from utils import __contains__
```



---
## __len__
```python
from utils import __len__
```



---
## __repr__
```python
from utils import __repr__
```



---
## __getitem__
```python
from utils import __getitem__
```



---
## __setitem__
```python
from utils import __setitem__
```



---
## __delitem__
```python
from utils import __delitem__
```



---
## items
```python
from utils import items
```



---
## values
```python
from utils import values
```



---
## keys
```python
from utils import keys
```

Keys of the pseudo dictionary, uses a list not set so order information can be maintained like python
dictionaries.

---
## __iter__
```python
from utils import __iter__
```



---
## __reversed__
```python
from utils import __reversed__
```

Iterate over the keys in the cache dict, oldest items
coming first.

---
## autoescape
```python
from utils import autoescape
```



---
## reset
```python
from utils import reset
```

Resets the current item to the first item.

---
## current
```python
from utils import current
```

Return the current item. Equivalent to the item that will be
returned next time :meth:`next` is called.

---
## next
```python
from utils import next
```

Return the current item, then advance :attr:`current` to the
next item.

---
## __call__
```python
from utils import __call__
```

Function decorator to apply certain suppressions to a whole
function.

---
## __getattribute__
```python
from utils import __getattribute__
```



---
## trim_url
```python
from utils import trim_url
```



---
## __name__
```python
from debug import __name__
```



---
## rewrite_traceback_stack
```python
from debug import rewrite_traceback_stack
```

Rewrite the current exception to replace any tracebacks from
within compiled template code with tracebacks that look like they
came from the template source.

This must be called within an ``except`` block.

:param source: For ``TemplateSyntaxError``, the original source if
    known.
:return: The original exception with the rewritten traceback.

---
## fake_traceback
```python
from debug import fake_traceback
```

Produce a new traceback object that looks like it came from the
template source instead of the compiled code. The filename, line
number, and location name will point to the template, and the local
variables will be the current template context.

:param exc_value: The original exception to be re-raised to create
    the new traceback.
:param tb: The original traceback to get the local variables and
    code info from.
:param filename: The template filename.
:param lineno: The line number in the template source.

---
## get_template_locals
```python
from debug import get_template_locals
```

Based on the runtime locals, get the context that would be
available at that point in the template.

---
## _describe_token_type
```python
from lexer import _describe_token_type
```



---
## describe_token
```python
from lexer import describe_token
```

Returns a description of the token.

---
## describe_token_expr
```python
from lexer import describe_token_expr
```

Like `describe_token` but for token expressions.

---
## count_newlines
```python
from lexer import count_newlines
```

Count the number of newline characters in the string.  This is
useful for extensions that filter a stream.

---
## compile_rules
```python
from lexer import compile_rules
```

Compiles all the rules from the environment into a list of rules.

---
## Failure
```python
from lexer import Failure
```

Class that raises a `TemplateSyntaxError` if called.
Used by the `Lexer` to specify known errors.

---
## Token
```python
from lexer import Token
```



---
## TokenStreamIterator
```python
from lexer import TokenStreamIterator
```

The iterator for tokenstreams.  Iterate over the stream
until the eof token is reached.

---
## TokenStream
```python
from lexer import TokenStream
```

A token stream is an iterable that yields :class:`Token`\s.  The
parser however does not iterate over it but calls :meth:`next` to go
one token ahead.  The current active token is stored as :attr:`current`.

---
## get_lexer
```python
from lexer import get_lexer
```

Return a lexer which is probably cached.

---
## OptionalLStrip
```python
from lexer import OptionalLStrip
```

A special tuple for marking a point in the state that can have
lstrip applied.

---
## _Rule
```python
from lexer import _Rule
```



---
## __str__
```python
from lexer import __str__
```



---
## test
```python
from lexer import test
```

Test a token against a token expression.  This can either be a
token type or ``'token_type:token_value'``.  This can only test
against string values and types.

---
## test_any
```python
from lexer import test_any
```

Test against multiple token expressions.

---
## __iter__
```python
from lexer import __iter__
```



---
## __next__
```python
from lexer import __next__
```



---
## __bool__
```python
from lexer import __bool__
```



---
## eos
```python
from lexer import eos
```

Are we at the end of the stream?

---
## push
```python
from lexer import push
```

Push a token back to the stream.

---
## look
```python
from lexer import look
```

Look at the next token.

---
## skip
```python
from lexer import skip
```

Got n tokens ahead.

---
## next_if
```python
from lexer import next_if
```

Perform the token test and return the token if it matched.
Otherwise the return value is `None`.

---
## skip_if
```python
from lexer import skip_if
```

Like :meth:`next_if` but only returns `True` or `False`.

---
## close
```python
from lexer import close
```

Close the stream.

---
## expect
```python
from lexer import expect
```

Expect a given token type and return it.  This accepts the same
argument as :meth:`jinja2.lexer.Token.test`.

---
## _normalize_newlines
```python
from lexer import _normalize_newlines
```

Replace all newlines with the configured sequence in strings
and template data.

---
## tokenize
```python
from lexer import tokenize
```

Calls tokeniter + tokenize and wraps it in a token stream.

---
## wrap
```python
from lexer import wrap
```

This is called with the stream as returned by `tokenize` and wraps
every token in a :class:`Token` and converts the value.

---
## tokeniter
```python
from lexer import tokeniter
```

This method tokenizes the text and returns the tokens in a
generator. Use this method if you just want to tokenize a template.

.. versionchanged:: 3.0
    Only ``\n``, ``\r\n`` and ``\r`` are treated as line
    breaks.

---
## c
```python
from lexer import c
```



---
## __name__
```python
from environment import __name__
```

Classes for managing templates and their runtime and compile time
options.

---
## get_spontaneous_environment
```python
from environment import get_spontaneous_environment
```

Return a new spontaneous environment. A spontaneous environment
is used for templates created directly rather than through an
existing environment.

:param cls: Environment class to create.
:param args: Positional arguments passed to environment.

---
## create_cache
```python
from environment import create_cache
```

Return the cache class for the given size.

---
## copy_cache
```python
from environment import copy_cache
```

Create an empty copy of the given cache.

---
## load_extensions
```python
from environment import load_extensions
```

Load the extensions from the list and bind it to the environment.
Returns a dict of instantiated extensions.

---
## _environment_config_check
```python
from environment import _environment_config_check
```

Perform a sanity check on the environment.

---
## Environment
```python
from environment import Environment
```

The core component of Jinja is the `Environment`.  It contains
important shared variables like configuration, filters, tests,
globals and others.  Instances of this class may be modified if
they are not shared and if no template was loaded so far.
Modifications on environments after the first template was loaded
will lead to surprising effects and undefined behavior.

Here are the possible initialization parameters:

    `block_start_string`
        The string marking the beginning of a block.  Defaults to ``'{%'``.

    `block_end_string`
        The string marking the end of a block.  Defaults to ``'%}'``.

    `variable_start_string`
        The string marking the beginning of a print statement.
        Defaults to ``'{{'``.

    `variable_end_string`
        The string marking the end of a print statement.  Defaults to
        ``'}}'``.

    `comment_start_string`
        The string marking the beginning of a comment.  Defaults to ``'{#'``.

    `comment_end_string`
        The string marking the end of a comment.  Defaults to ``'#}'``.

    `line_statement_prefix`
        If given and a string, this will be used as prefix for line based
        statements.  See also :ref:`line-statements`.

    `line_comment_prefix`
        If given and a string, this will be used as prefix for line based
        comments.  See also :ref:`line-statements`.

        .. versionadded:: 2.2

    `trim_blocks`
        If this is set to ``True`` the first newline after a block is
        removed (block, not variable tag!).  Defaults to `False`.

    `lstrip_blocks`
        If this is set to ``True`` leading spaces and tabs are stripped
        from the start of a line to a block.  Defaults to `False`.

    `newline_sequence`
        The sequence that starts a newline.  Must be one of ``'\r'``,
        ``'\n'`` or ``'\r\n'``.  The default is ``'\n'`` which is a
        useful default for Linux and OS X systems as well as web
        applications.

    `keep_trailing_newline`
        Preserve the trailing newline when rendering templates.
        The default is ``False``, which causes a single newline,
        if present, to be stripped from the end of the template.

        .. versionadded:: 2.7

    `extensions`
        List of Jinja extensions to use.  This can either be import paths
        as strings or extension classes.  For more information have a
        look at :ref:`the extensions documentation <jinja-extensions>`.

    `optimized`
        should the optimizer be enabled?  Default is ``True``.

    `undefined`
        :class:`Undefined` or a subclass of it that is used to represent
        undefined values in the template.

    `finalize`
        A callable that can be used to process the result of a variable
        expression before it is output.  For example one can convert
        ``None`` implicitly into an empty string here.

    `autoescape`
        If set to ``True`` the XML/HTML autoescaping feature is enabled by
        default.  For more details about autoescaping see
        :class:`~markupsafe.Markup`.  As of Jinja 2.4 this can also
        be a callable that is passed the template name and has to
        return ``True`` or ``False`` depending on autoescape should be
        enabled by default.

        .. versionchanged:: 2.4
           `autoescape` can now be a function

    `loader`
        The template loader for this environment.

    `cache_size`
        The size of the cache.  Per default this is ``400`` which means
        that if more than 400 templates are loaded the loader will clean
        out the least recently used template.  If the cache size is set to
        ``0`` templates are recompiled all the time, if the cache size is
        ``-1`` the cache will not be cleaned.

        .. versionchanged:: 2.8
           The cache size was increased to 400 from a low 50.

    `auto_reload`
        Some loaders load templates from locations where the template
        sources may change (ie: file system or database).  If
        ``auto_reload`` is set to ``True`` (default) every time a template is
        requested the loader checks if the source changed and if yes, it
        will reload the template.  For higher performance it's possible to
        disable that.

    `bytecode_cache`
        If set to a bytecode cache object, this object will provide a
        cache for the internal Jinja bytecode so that templates don't
        have to be parsed if they were not changed.

        See :ref:`bytecode-cache` for more information.

    `enable_async`
        If set to true this enables async template execution which
        allows using async functions and generators.

---
## Template
```python
from environment import Template
```

A compiled template that can be rendered.

Use the methods on :class:`Environment` to create or load templates.
The environment is used to configure how templates are compiled and
behave.

It is also possible to create a template object directly. This is
not usually recommended. The constructor takes most of the same
arguments as :class:`Environment`. All templates created with the
same environment arguments share the same ephemeral ``Environment``
instance behind the scenes.

A template object should be considered immutable. Modifications on
the object are not supported.

---
## TemplateModule
```python
from environment import TemplateModule
```

Represents an imported template.  All the exported names of the
template are available as attributes on this object.  Additionally
converting it into a string renders the contents.

---
## TemplateExpression
```python
from environment import TemplateExpression
```

The :meth:`jinja2.Environment.compile_expression` method returns an
instance of this object.  It encapsulates the expression-like access
to the template with an expression it wraps.

---
## TemplateStream
```python
from environment import TemplateStream
```

A template stream works pretty much like an ordinary python generator
but it can buffer multiple items to reduce the number of total iterations.
Per default the output is unbuffered which means that for every unbuffered
instruction in the template one string is yielded.

If buffering is enabled with a buffer size of 5, five items are combined
into a new string.  This is mainly useful if you are streaming
big templates to a client via WSGI which flushes after each iteration.

---
## __init__
```python
from environment import __init__
```



---
## add_extension
```python
from environment import add_extension
```

Adds an extension after the environment was created.

.. versionadded:: 2.5

---
## extend
```python
from environment import extend
```

Add the items to the instance of the environment if they do not exist
yet.  This is used by :ref:`extensions <writing-extensions>` to register
callbacks and configuration values without breaking inheritance.

---
## overlay
```python
from environment import overlay
```

Create a new overlay environment that shares all the data with the
current environment except for cache and the overridden attributes.
Extensions cannot be removed for an overlayed environment.  An overlayed
environment automatically gets all the extensions of the environment it
is linked to plus optional extra extensions.

Creating overlays should happen after the initial environment was set
up completely.  Not all attributes are truly linked, some are just
copied over so modifications on the original environment may not shine
through.

.. versionchanged:: 3.1.2
    Added the ``newline_sequence``,, ``keep_trailing_newline``,
    and ``enable_async`` parameters to match ``__init__``.

---
## lexer
```python
from environment import lexer
```

The lexer for this environment.

---
## iter_extensions
```python
from environment import iter_extensions
```

Iterates over the extensions by priority.

---
## getitem
```python
from environment import getitem
```

Get an item or attribute of an object but prefer the item.

---
## getattr
```python
from environment import getattr
```

Get an item or attribute of an object but prefer the attribute.
Unlike :meth:`getitem` the attribute *must* be a string.

---
## _filter_test_common
```python
from environment import _filter_test_common
```



---
## call_filter
```python
from environment import call_filter
```

Invoke a filter on a value the same way the compiler does.

This might return a coroutine if the filter is running from an
environment in async mode and the filter supports async
execution. It's your responsibility to await this if needed.

.. versionadded:: 2.7

---
## call_test
```python
from environment import call_test
```

Invoke a test on a value the same way the compiler does.

This might return a coroutine if the test is running from an
environment in async mode and the test supports async execution.
It's your responsibility to await this if needed.

.. versionchanged:: 3.0
    Tests support ``@pass_context``, etc. decorators. Added
    the ``context`` and ``eval_ctx`` parameters.

.. versionadded:: 2.7

---
## parse
```python
from environment import parse
```

Parse the sourcecode and return the abstract syntax tree.  This
tree of nodes is used by the compiler to convert the template into
executable source- or bytecode.  This is useful for debugging or to
extract information from templates.

If you are :ref:`developing Jinja extensions <writing-extensions>`
this gives you a good overview of the node tree generated.

---
## _parse
```python
from environment import _parse
```

Internal parsing function used by `parse` and `compile`.

---
## lex
```python
from environment import lex
```

Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development <writing-extensions>`
and debugging templates.

This does not perform preprocessing.  If you want the preprocessing
of the extensions to be applied you have to filter source through
the :meth:`preprocess` method.

---
## preprocess
```python
from environment import preprocess
```

Preprocesses the source with all extensions.  This is automatically
called for all parsing and compiling methods but *not* for :meth:`lex`
because there you usually only want the actual source tokenized.

---
## _tokenize
```python
from environment import _tokenize
```

Called by the parser to do the preprocessing and filtering
for all the extensions.  Returns a :class:`~jinja2.lexer.TokenStream`.

---
## _generate
```python
from environment import _generate
```

Internal hook that can be overridden to hook a different generate
method in.

.. versionadded:: 2.5

---
## _compile
```python
from environment import _compile
```

Internal hook that can be overridden to hook a different compile
method in.

.. versionadded:: 2.5

---
## compile
```python
from environment import compile
```

Compile a node or template source code.  The `name` parameter is
the load name of the template after it was joined using
:meth:`join_path` if necessary, not the filename on the file system.
the `filename` parameter is the estimated filename of the template on
the file system.  If the template came from a database or memory this
can be omitted.

The return value of this method is a python code object.  If the `raw`
parameter is `True` the return value will be a string with python
code equivalent to the bytecode returned otherwise.  This method is
mainly used internally.

`defer_init` is use internally to aid the module code generator.  This
causes the generated code to be able to import without the global
environment variable to be set.

.. versionadded:: 2.4
   `defer_init` parameter added.

---
## compile_expression
```python
from environment import compile_expression
```

A handy helper method that returns a callable that accepts keyword
arguments that appear as variables in the expression.  If called it
returns the result of the expression.

This is useful if applications want to use the same rules as Jinja
in template "configuration files" or similar situations.

Example usage:

>>> env = Environment()
>>> expr = env.compile_expression('foo == 42')
>>> expr(foo=23)
False
>>> expr(foo=42)
True

Per default the return value is converted to `None` if the
expression returns an undefined value.  This can be changed
by setting `undefined_to_none` to `False`.

>>> env.compile_expression('var')() is None
True
>>> env.compile_expression('var', undefined_to_none=False)()
Undefined

.. versionadded:: 2.1

---
## compile_templates
```python
from environment import compile_templates
```

Finds all the templates the loader can find, compiles them
and stores them in `target`.  If `zip` is `None`, instead of in a
zipfile, the templates will be stored in a directory.
By default a deflate zip algorithm is used. To switch to
the stored algorithm, `zip` can be set to ``'stored'``.

`extensions` and `filter_func` are passed to :meth:`list_templates`.
Each template returned will be compiled to the target folder or
zipfile.

By default template compilation errors are ignored.  In case a
log function is provided, errors are logged.  If you want template
syntax errors to abort the compilation you can set `ignore_errors`
to `False` and you will get an exception on syntax errors.

.. versionadded:: 2.4

---
## list_templates
```python
from environment import list_templates
```

Returns a list of templates for this environment.  This requires
that the loader supports the loader's
:meth:`~BaseLoader.list_templates` method.

If there are other files in the template folder besides the
actual templates, the returned list can be filtered.  There are two
ways: either `extensions` is set to a list of file extensions for
templates, or a `filter_func` can be provided which is a callable that
is passed a template name and should return `True` if it should end up
in the result list.

If the loader does not support that, a :exc:`TypeError` is raised.

.. versionadded:: 2.4

---
## handle_exception
```python
from environment import handle_exception
```

Exception handling helper.  This is used internally to either raise
rewritten exceptions or return a rendered traceback for the template.

---
## join_path
```python
from environment import join_path
```

Join a template with the parent.  By default all the lookups are
relative to the loader root so this method returns the `template`
parameter unchanged, but if the paths should be relative to the
parent template, this function can be used to calculate the real
template name.

Subclasses may override this method and implement template path
joining here.

---
## _load_template
```python
from environment import _load_template
```



---
## get_template
```python
from environment import get_template
```

Load a template by name with :attr:`loader` and return a
:class:`Template`. If the template does not exist a
:exc:`TemplateNotFound` exception is raised.

:param name: Name of the template to load. When loading
    templates from the filesystem, "/" is used as the path
    separator, even on Windows.
:param parent: The name of the parent template importing this
    template. :meth:`join_path` can be used to implement name
    transformations with this.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.

.. versionchanged:: 3.0
    If a template is loaded from cache, ``globals`` will update
    the template's globals instead of ignoring the new values.

.. versionchanged:: 2.4
    If ``name`` is a :class:`Template` object it is returned
    unchanged.

---
## select_template
```python
from environment import select_template
```

Like :meth:`get_template`, but tries loading multiple names.
If none of the names can be loaded a :exc:`TemplatesNotFound`
exception is raised.

:param names: List of template names to try loading in order.
:param parent: The name of the parent template importing this
    template. :meth:`join_path` can be used to implement name
    transformations with this.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.

.. versionchanged:: 3.0
    If a template is loaded from cache, ``globals`` will update
    the template's globals instead of ignoring the new values.

.. versionchanged:: 2.11
    If ``names`` is :class:`Undefined`, an :exc:`UndefinedError`
    is raised instead. If no templates were found and ``names``
    contains :class:`Undefined`, the message is more helpful.

.. versionchanged:: 2.4
    If ``names`` contains a :class:`Template` object it is
    returned unchanged.

.. versionadded:: 2.3

---
## get_or_select_template
```python
from environment import get_or_select_template
```

Use :meth:`select_template` if an iterable of template names
is given, or :meth:`get_template` if one name is given.

.. versionadded:: 2.3

---
## from_string
```python
from environment import from_string
```

Load a template from a source string without using
:attr:`loader`.

:param source: Jinja source to compile into a template.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.
:param template_class: Return an instance of this
    :class:`Template` class.

---
## make_globals
```python
from environment import make_globals
```

Make the globals map for a template. Any given template
globals overlay the environment :attr:`globals`.

Returns a :class:`collections.ChainMap`. This allows any changes
to a template's globals to only affect that template, while
changes to the environment's globals are still reflected.
However, avoid modifying any globals after a template is loaded.

:param d: Dict of template-specific globals.

.. versionchanged:: 3.0
    Use :class:`collections.ChainMap` to always prevent mutating
    environment globals.

---
## __new__
```python
from environment import __new__
```



---
## from_code
```python
from environment import from_code
```

Creates a template object from compiled code and the globals.  This
is used by the loaders and environment to create a template object.

---
## from_module_dict
```python
from environment import from_module_dict
```

Creates a template object from a module.  This is used by the
module loader to create a template object.

.. versionadded:: 2.4

---
## _from_namespace
```python
from environment import _from_namespace
```



---
## render
```python
from environment import render
```

This method accepts the same arguments as the `dict` constructor:
A dict, a dict subclass or some keyword arguments.  If no arguments
are given the context will be empty.  These two calls do the same::

    template.render(knights='that say nih')
    template.render({'knights': 'that say nih'})

This will return the rendered template as a string.

---
## stream
```python
from environment import stream
```

Works exactly like :meth:`generate` but returns a
:class:`TemplateStream`.

---
## generate
```python
from environment import generate
```

For very large templates it can be useful to not render the whole
template at once but evaluate each statement after another and yield
piece for piece.  This method basically does exactly that and returns
a generator that yields one item after another as strings.

It accepts the same arguments as :meth:`render`.

---
## new_context
```python
from environment import new_context
```

Create a new :class:`Context` for this template.  The vars
provided will be passed to the template.  Per default the globals
are added to the context.  If shared is set to `True` the data
is passed as is to the context without adding the globals.

`locals` can be a dict of local variables for internal usage.

---
## make_module
```python
from environment import make_module
```

This method works like the :attr:`module` attribute when called
without arguments but it will evaluate the template on every call
rather than caching it.  It's also possible to provide
a dict which is then used as context.  The arguments are the same
as for the :meth:`new_context` method.

---
## _get_default_module
```python
from environment import _get_default_module
```

If a context is passed in, this means that the template was
imported. Imported templates have access to the current
template's globals by default, but they can only be accessed via
the context during runtime.

If there are new globals, we need to create a new module because
the cached module is already rendered and will not have access
to globals from the current context. This new module is not
cached because the template can be imported elsewhere, and it
should have access to only the current template's globals.

---
## module
```python
from environment import module
```

The template as module.  This is used for imports in the
template runtime but is also useful if one wants to access
exported template variables from the Python layer:

>>> t = Template('{% macro foo() %}42{% endmacro %}23')
>>> str(t.module)
'23'
>>> t.module.foo() == u'42'
True

This attribute is not available if async mode is enabled.

---
## get_corresponding_lineno
```python
from environment import get_corresponding_lineno
```

Return the source line number of a line number in the
generated bytecode as they are not in sync.

---
## is_up_to_date
```python
from environment import is_up_to_date
```

If this variable is `False` there is a newer version available.

---
## debug_info
```python
from environment import debug_info
```

The debug info mapping.

---
## __repr__
```python
from environment import __repr__
```



---
## __html__
```python
from environment import __html__
```



---
## __str__
```python
from environment import __str__
```



---
## __call__
```python
from environment import __call__
```



---
## dump
```python
from environment import dump
```

Dump the complete stream into a file or file-like object.
Per default strings are written, if you want to encode
before writing specify an `encoding`.

Example usage::

    Template('Hello {{ name }}!').stream(name='foo').dump('hello.html')

---
## disable_buffering
```python
from environment import disable_buffering
```

Disable the output buffering.

---
## _buffered_generator
```python
from environment import _buffered_generator
```



---
## enable_buffering
```python
from environment import enable_buffering
```

Enable buffering.  Buffer `size` items before yielding them.

---
## __iter__
```python
from environment import __iter__
```



---
## __next__
```python
from environment import __next__
```



---
## write_file
```python
from environment import write_file
```



---
## log_function
```python
from environment import log_function
```



---
## filter_func
```python
from environment import filter_func
```



---
## __name__
```python
from _identifier import __name__
```



---
## __name__
```python
from optimizer import __name__
```

The optimizer tries to constant fold expressions and modify the AST
in place so that it should be faster to evaluate.

Because the AST does not contain all the scoping information and the
compiler has to find that out, we cannot do all the optimizations we
want. For example, loop unrolling doesn't work because unrolled loops
would have a different scope. The solution would be a second syntax tree
that stored the scoping rules.

---
## optimize
```python
from optimizer import optimize
```

The context hint can be used to perform an static optimization
based on the context given.

---
## Optimizer
```python
from optimizer import Optimizer
```



---
## __init__
```python
from optimizer import __init__
```



---
## generic_visit
```python
from optimizer import generic_visit
```



---
## TemplateError
```python
from exceptions import TemplateError
```

Baseclass for all template errors.

---
## TemplateNotFound
```python
from exceptions import TemplateNotFound
```

Raised if a template does not exist.

.. versionchanged:: 2.11
    If the given name is :class:`Undefined` and no message was
    provided, an :exc:`UndefinedError` is raised.

---
## TemplatesNotFound
```python
from exceptions import TemplatesNotFound
```

Like :class:`TemplateNotFound` but raised if multiple templates
are selected.  This is a subclass of :class:`TemplateNotFound`
exception, so just catching the base exception will catch both.

.. versionchanged:: 2.11
    If a name in the list of names is :class:`Undefined`, a message
    about it being undefined is shown rather than the empty string.

.. versionadded:: 2.2

---
## TemplateSyntaxError
```python
from exceptions import TemplateSyntaxError
```

Raised to tell the user that there is a problem with the template.

---
## TemplateAssertionError
```python
from exceptions import TemplateAssertionError
```

Like a template syntax error, but covers cases where something in the
template caused an error at compile time that wasn't necessarily caused
by a syntax error.  However it's a direct subclass of
:exc:`TemplateSyntaxError` and has the same attributes.

---
## TemplateRuntimeError
```python
from exceptions import TemplateRuntimeError
```

A generic runtime error in the template engine.  Under some situations
Jinja may raise this exception.

---
## UndefinedError
```python
from exceptions import UndefinedError
```

Raised if a template tries to operate on :class:`Undefined`.

---
## SecurityError
```python
from exceptions import SecurityError
```

Raised when a handshake request or response breaks a security rule.

Security limits are hard coded.

---
## FilterArgumentError
```python
from exceptions import FilterArgumentError
```

This error is raised if a filter was called with inappropriate
arguments

---
## message
```python
from exceptions import message
```



---
## __reduce__
```python
from exceptions import __reduce__
```



---
## __name__
```python
from defaults import __name__
```



---
## __name__
```python
from nativetypes import __name__
```



---
## native_concat
```python
from nativetypes import native_concat
```

Return a native Python type from the list of compiled nodes. If
the result is a single node, its value is returned. Otherwise, the
nodes are concatenated as strings. If the result can be parsed with
:func:`ast.literal_eval`, the parsed value is returned. Otherwise,
the string is returned.

:param values: Iterable of outputs to concatenate.

---
## NativeCodeGenerator
```python
from nativetypes import NativeCodeGenerator
```

A code generator which renders Python types by not adding
``str()`` around output nodes.

---
## NativeEnvironment
```python
from nativetypes import NativeEnvironment
```

An environment that renders templates to native Python types.

---
## NativeTemplate
```python
from nativetypes import NativeTemplate
```



---
## _default_finalize
```python
from nativetypes import _default_finalize
```



---
## _output_const_repr
```python
from nativetypes import _output_const_repr
```



---
## _output_child_to_const
```python
from nativetypes import _output_child_to_const
```



---
## _output_child_pre
```python
from nativetypes import _output_child_pre
```



---
## _output_child_post
```python
from nativetypes import _output_child_post
```



---
## render
```python
from nativetypes import render
```

Render the template to produce a native Python type. If the
result is a single node, its value is returned. Otherwise, the
nodes are concatenated as strings. If the result can be parsed
with :func:`ast.literal_eval`, the parsed value is returned.
Otherwise, the string is returned.

---
## Impossible
```python
from nodes import Impossible
```

Raised if the node could not perform a requested action.

---
## NodeType
```python
from nodes import NodeType
```

A metaclass for nodes that handles the field and attribute
inheritance.  fields and attributes from the parent class are
automatically forwarded to the child.

---
## EvalContext
```python
from nodes import EvalContext
```

Holds evaluation time information.  Custom attributes can be attached
to it in extensions.

---
## get_eval_context
```python
from nodes import get_eval_context
```



---
## Stmt
```python
from nodes import Stmt
```

Base node for all statements.

---
## Helper
```python
from nodes import Helper
```

Nodes that exist in a specific context only.

---
## Template
```python
from nodes import Template
```

Node that represents a template.  This must be the outermost node that
is passed to the compiler.

---
## Output
```python
from nodes import Output
```

A node that holds multiple expressions which are then printed out.
This is used both for the `print` statement and the regular template data.

---
## Extends
```python
from nodes import Extends
```

Represents an extends statement.

---
## For
```python
from nodes import For
```

The for loop.  `target` is the target for the iteration (usually a
:class:`Name` or :class:`Tuple`), `iter` the iterable.  `body` is a list
of nodes that are used as loop-body, and `else_` a list of nodes for the
`else` block.  If no else node exists it has to be an empty list.

For filtered nodes an expression can be stored as `test`, otherwise `None`.

---
## If
```python
from nodes import If
```

If `test` is true, `body` is rendered, else `else_`.

---
## Macro
```python
from nodes import Macro
```

A macro definition.  `name` is the name of the macro, `args` a list of
arguments and `defaults` a list of defaults if there are any.  `body` is
a list of nodes for the macro body.

---
## CallBlock
```python
from nodes import CallBlock
```

Like a macro without a name but a call instead.  `call` is called with
the unnamed macro as `caller` argument this node holds.

---
## FilterBlock
```python
from nodes import FilterBlock
```

Node for filter sections.

---
## With
```python
from nodes import With
```

Specific node for with statements.  In older versions of Jinja the
with statement was implemented on the base of the `Scope` node instead.

.. versionadded:: 2.9.3

---
## Block
```python
from nodes import Block
```



---
## Include
```python
from nodes import Include
```

A node that represents the include tag.

---
## Import
```python
from nodes import Import
```

import m [as n]

---
## FromImport
```python
from nodes import FromImport
```

A node that represents the from import tag.  It's important to not
pass unsafe names to the name attribute.  The compiler translates the
attribute lookups directly into getattr calls and does *not* use the
subscript callback of the interface.  As exported variables may not
start with double underscores (which the parser asserts) this is not a
problem for regular Jinja code, but if this node is used in an extension
extra care must be taken.

The list of names may contain tuples if aliases are wanted.

---
## ExprStmt
```python
from nodes import ExprStmt
```

A statement that evaluates an expression and discards the result.

---
## Assign
```python
from nodes import Assign
```

Assigns an expression to a target.

---
## AssignBlock
```python
from nodes import AssignBlock
```

Assigns a block to a target.

---
## Expr
```python
from nodes import Expr
```

Baseclass for all expressions.

---
## BinExpr
```python
from nodes import BinExpr
```

Baseclass for all binary expressions.

---
## UnaryExpr
```python
from nodes import UnaryExpr
```

Unary operation

---
## Name
```python
from nodes import Name
```

Looks up a name or stores a value in a name.
The `ctx` of the node can be one of the following values:

-   `store`: store a value in the name
-   `load`: load that name
-   `param`: like `store` but if the name was defined as function parameter.

---
## NSRef
```python
from nodes import NSRef
```

Reference to a namespace value assignment

---
## Literal
```python
from nodes import Literal
```

Baseclass for literals.

---
## Const
```python
from nodes import Const
```

All constant values.  The parser will return this node for simple
constants such as ``42`` or ``"foo"`` but it can be used to store more
complex values such as lists too.  Only constants with a safe
representation (objects where ``eval(repr(x)) == x`` is true).

---
## TemplateData
```python
from nodes import TemplateData
```

A constant template string.

---
## Tuple
```python
from nodes import Tuple
```

For loop unpacking and some other things like multiple arguments
for subscripts.  Like for :class:`Name` `ctx` specifies if the tuple
is used for loading the names or storing.

---
## List
```python
from nodes import List
```

Any list literal such as ``[1, 2, 3]``

---
## Dict
```python
from nodes import Dict
```

Any dict literal such as ``{1: 2, 3: 4}``.  The items must be a list of
:class:`Pair` nodes.

---
## Pair
```python
from nodes import Pair
```

A key, value pair for dicts.

---
## Keyword
```python
from nodes import Keyword
```

A key, value pair for keyword arguments where key is a string.

---
## CondExpr
```python
from nodes import CondExpr
```

A conditional expression (inline if expression).  (``{{
foo if bar else baz }}``)

---
## args_as_const
```python
from nodes import args_as_const
```



---
## _FilterTestCommon
```python
from nodes import _FilterTestCommon
```



---
## Filter
```python
from nodes import Filter
```

Apply a filter to an expression. ``name`` is the name of the
filter, the other fields are the same as :class:`Call`.

If ``node`` is ``None``, the filter is being used in a filter block
and is applied to the content of the block.

---
## Test
```python
from nodes import Test
```

Apply a test to an expression. ``name`` is the name of the test,
the other field are the same as :class:`Call`.

.. versionchanged:: 3.0
    ``as_const`` shares the same logic for filters and tests. Tests
    check for volatile, async, and ``@pass_context`` etc.
    decorators.

---
## Call
```python
from nodes import Call
```

Calls an expression.  `args` is a list of arguments, `kwargs` a list
of keyword arguments (list of :class:`Keyword` nodes), and `dyn_args`
and `dyn_kwargs` has to be either `None` or a node that is used as
node for dynamic positional (``*args``) or keyword (``**kwargs``)
arguments.

---
## Getitem
```python
from nodes import Getitem
```

Get an attribute or item from an expression and prefer the item.

---
## Getattr
```python
from nodes import Getattr
```

Get an attribute or item from an expression that is a ascii-only
bytestring and prefer the attribute.

---
## Slice
```python
from nodes import Slice
```

Represents a slice object.  This must only be used as argument for
:class:`Subscript`.

---
## Concat
```python
from nodes import Concat
```

Concatenates the list of expressions provided after converting
them to strings.

---
## Compare
```python
from nodes import Compare
```

Compares an expression with some other expressions.  `ops` must be a
list of :class:`Operand`\s.

---
## Operand
```python
from nodes import Operand
```

Holds an operator and an expression.

---
## Mul
```python
from nodes import Mul
```

Multiplies the left with the right node.

---
## Div
```python
from nodes import Div
```

Divides the left by the right node.

---
## FloorDiv
```python
from nodes import FloorDiv
```

Divides the left by the right node and converts the
result into an integer by truncating.

---
## Add
```python
from nodes import Add
```

Add the left to the right node.

---
## Sub
```python
from nodes import Sub
```

Subtract the right from the left node.

---
## Mod
```python
from nodes import Mod
```

Left modulo right.

---
## Pow
```python
from nodes import Pow
```

Left to the power of right.

---
## And
```python
from nodes import And
```

Short circuited AND.

---
## Or
```python
from nodes import Or
```

Short circuited OR.

---
## Not
```python
from nodes import Not
```

Negate the expression.

---
## Neg
```python
from nodes import Neg
```

Make the expression negative.

---
## Pos
```python
from nodes import Pos
```

Make the expression positive (noop for most expressions)

---
## EnvironmentAttribute
```python
from nodes import EnvironmentAttribute
```

Loads an attribute from the environment object.  This is useful for
extensions that want to call a callback stored on the environment.

---
## ExtensionAttribute
```python
from nodes import ExtensionAttribute
```

Returns the attribute of an extension bound to the environment.
The identifier is the identifier of the :class:`Extension`.

This node is usually constructed by calling the
:meth:`~jinja2.ext.Extension.attr` method on an extension.

---
## ImportedName
```python
from nodes import ImportedName
```

If created with an import name the import name is returned on node
access.  For example ``ImportedName('cgi.escape')`` returns the `escape`
function from the cgi module on evaluation.  Imports are optimized by the
compiler so there is no need to assign them to local variables.

---
## InternalName
```python
from nodes import InternalName
```

An internal name in the compiler.  You cannot create these nodes
yourself but the parser provides a
:meth:`~jinja2.parser.Parser.free_identifier` method that creates
a new identifier for you.  This identifier is not available from the
template and is not treated specially by the compiler.

---
## MarkSafe
```python
from nodes import MarkSafe
```

Mark the wrapped expression as safe (wrap it as `Markup`).

---
## MarkSafeIfAutoescape
```python
from nodes import MarkSafeIfAutoescape
```

Mark the wrapped expression as safe (wrap it as `Markup`) but
only if autoescaping is active.

.. versionadded:: 2.5

---
## ContextReference
```python
from nodes import ContextReference
```

Returns the current template context.  It can be used like a
:class:`Name` node, with a ``'load'`` ctx and will return the
current :class:`~jinja2.runtime.Context` object.

Here an example that assigns the current template name to a
variable named `foo`::

    Assign(Name('foo', ctx='store'),
           Getattr(ContextReference(), 'name'))

This is basically equivalent to using the
:func:`~jinja2.pass_context` decorator when using the high-level
API, which causes a reference to the context to be passed as the
first argument to a function.

---
## DerivedContextReference
```python
from nodes import DerivedContextReference
```

Return the current template context including locals. Behaves
exactly like :class:`ContextReference`, but includes local
variables, such as from a ``for`` loop.

.. versionadded:: 2.11

---
## Continue
```python
from nodes import Continue
```

Continue a loop.

---
## Break
```python
from nodes import Break
```

Break a loop.

---
## Scope
```python
from nodes import Scope
```

An artificial scope.

---
## OverlayScope
```python
from nodes import OverlayScope
```

An overlay scope for extensions.  This is a largely unoptimized scope
that however can be used to introduce completely arbitrary variables into
a sub scope from a dictionary or dictionary like object.  The `context`
field has to evaluate to a dictionary object.

Example usage::

    OverlayScope(context=self.call_method('get_context'),
                 body=[...])

.. versionadded:: 2.10

---
## EvalContextModifier
```python
from nodes import EvalContextModifier
```

Modifies the eval context.  For each option that should be modified,
a :class:`Keyword` has to be added to the :attr:`options` list.

Example to change the `autoescape` setting::

    EvalContextModifier(options=[Keyword('autoescape', Const(True))])

---
## ScopedEvalContextModifier
```python
from nodes import ScopedEvalContextModifier
```

Modifies the eval context and reverts it later.  Works exactly like
:class:`EvalContextModifier` but will only modify the
:class:`~jinja2.nodes.EvalContext` for nodes in the :attr:`body`.

---
## _failing_new
```python
from nodes import _failing_new
```



---
## save
```python
from nodes import save
```



---
## revert
```python
from nodes import revert
```



---
## iter_fields
```python
from nodes import iter_fields
```

This method iterates over all fields that are defined and yields
``(key, value)`` tuples.  Per default all fields are returned, but
it's possible to limit that to some fields by providing the `only`
parameter or to exclude some using the `exclude` parameter.  Both
should be sets or tuples of field names.

---
## iter_child_nodes
```python
from nodes import iter_child_nodes
```

Iterates over all direct child nodes of the node.  This iterates
over all fields and yields the values of they are nodes.  If the value
of a field is a list all the nodes in that list are returned.

---
## find
```python
from nodes import find
```

Find the first node of a given type.  If no such node exists the
return value is `None`.

---
## find_all
```python
from nodes import find_all
```

Find all the nodes of a given type.  If the type is a tuple,
the check is performed for any of the tuple items.

---
## set_ctx
```python
from nodes import set_ctx
```

Reset the context of a node and all child nodes.  Per default the
parser will all generate nodes that have a 'load' context as it's the
most common one.  This method is used in the parser to set assignment
targets and other nodes to a store context.

---
## set_lineno
```python
from nodes import set_lineno
```

Set the line numbers of the node and children.

---
## set_environment
```python
from nodes import set_environment
```

Set the environment for all nodes.

---
## __eq__
```python
from nodes import __eq__
```



---
## dump
```python
from nodes import dump
```



---
## as_const
```python
from nodes import as_const
```



---
## can_assign
```python
from nodes import can_assign
```



---
## from_untrusted
```python
from nodes import from_untrusted
```

Return a const object if the value is representable as
constant value in the generated code, otherwise it will raise
an `Impossible` exception.

---
## _dump
```python
from nodes import _dump
```



---
## const
```python
from nodes import const
```



---
## __name__
```python
from tests import __name__
```

Built-in template tests used with the ``is`` operator.

---
## test_odd
```python
from tests import test_odd
```

Return true if the variable is odd.

---
## test_even
```python
from tests import test_even
```

Return true if the variable is even.

---
## test_divisibleby
```python
from tests import test_divisibleby
```

Check if a variable is divisible by a number.

---
## test_defined
```python
from tests import test_defined
```

Return true if the variable is defined:

.. sourcecode:: jinja

    {% if variable is defined %}
        value of variable: {{ variable }}
    {% else %}
        variable is not defined
    {% endif %}

See the :func:`default` filter for a simple way to set undefined
variables.

---
## test_undefined
```python
from tests import test_undefined
```

Like :func:`defined` but the other way round.

---
## test_filter
```python
from tests import test_filter
```

Check if a filter exists by name. Useful if a filter may be
optionally available.

.. code-block:: jinja

    {% if 'markdown' is filter %}
        {{ value | markdown }}
    {% else %}
        {{ value }}
    {% endif %}

.. versionadded:: 3.0

---
## test_test
```python
from tests import test_test
```

Check if a test exists by name. Useful if a test may be
optionally available.

.. code-block:: jinja

    {% if 'loud' is test %}
        {% if value is loud %}
            {{ value|upper }}
        {% else %}
            {{ value|lower }}
        {% endif %}
    {% else %}
        {{ value }}
    {% endif %}

.. versionadded:: 3.0

---
## test_none
```python
from tests import test_none
```

Return true if the variable is none.

---
## test_boolean
```python
from tests import test_boolean
```

Return true if the object is a boolean value.

.. versionadded:: 2.11

---
## test_false
```python
from tests import test_false
```

Return true if the object is False.

.. versionadded:: 2.11

---
## test_true
```python
from tests import test_true
```

Return true if the object is True.

.. versionadded:: 2.11

---
## test_integer
```python
from tests import test_integer
```

Return true if the object is an integer.

.. versionadded:: 2.11

---
## test_float
```python
from tests import test_float
```

Return true if the object is a float.

.. versionadded:: 2.11

---
## test_lower
```python
from tests import test_lower
```

Return true if the variable is lowercased.

---
## test_upper
```python
from tests import test_upper
```

Return true if the variable is uppercased.

---
## test_string
```python
from tests import test_string
```

Return true if the object is a string.

---
## test_mapping
```python
from tests import test_mapping
```

Return true if the object is a mapping (dict etc.).

.. versionadded:: 2.6

---
## test_number
```python
from tests import test_number
```

Return true if the variable is a number.

---
## test_sequence
```python
from tests import test_sequence
```

Return true if the variable is a sequence. Sequences are variables
that are iterable.

---
## test_sameas
```python
from tests import test_sameas
```

Check if an object points to the same memory address than another
object:

.. sourcecode:: jinja

    {% if foo.attribute is sameas false %}
        the foo attribute really is the `False` singleton
    {% endif %}

---
## test_iterable
```python
from tests import test_iterable
```

Check if it's possible to iterate over an object.

---
## test_escaped
```python
from tests import test_escaped
```

Check if the value is escaped.

---
## test_in
```python
from tests import test_in
```

Check if value is in seq.

.. versionadded:: 2.10

---
## __name__
```python
from bccache import __name__
```

The optional bytecode cache system. This is useful if you have very
complex template situations and the compilation of all those templates
slows down your application too much.

Situations where this is useful are often forking web applications that
are initialized on the first request.

---
## Bucket
```python
from bccache import Bucket
```

Buckets are used to store the bytecode for one template.  It's created
and initialized by the bytecode cache and passed to the loading functions.

The buckets get an internal checksum from the cache assigned and use this
to automatically reject outdated cache material.  Individual bytecode
cache subclasses don't have to care about cache invalidation.

---
## BytecodeCache
```python
from bccache import BytecodeCache
```

To implement your own bytecode cache you have to subclass this class
and override :meth:`load_bytecode` and :meth:`dump_bytecode`.  Both of
these methods are passed a :class:`~jinja2.bccache.Bucket`.

A very basic bytecode cache that saves the bytecode on the file system::

    from os import path

    class MyCache(BytecodeCache):

        def __init__(self, directory):
            self.directory = directory

        def load_bytecode(self, bucket):
            filename = path.join(self.directory, bucket.key)
            if path.exists(filename):
                with open(filename, 'rb') as f:
                    bucket.load_bytecode(f)

        def dump_bytecode(self, bucket):
            filename = path.join(self.directory, bucket.key)
            with open(filename, 'wb') as f:
                bucket.write_bytecode(f)

A more advanced version of a filesystem based bytecode cache is part of
Jinja.

---
## FileSystemBytecodeCache
```python
from bccache import FileSystemBytecodeCache
```

A bytecode cache that stores bytecode on the filesystem.  It accepts
two arguments: The directory where the cache items are stored and a
pattern string that is used to build the filename.

If no directory is specified a default cache directory is selected.  On
Windows the user's temp directory is used, on UNIX systems a directory
is created for the user in the system temp directory.

The pattern can be used to have multiple separate caches operate on the
same directory.  The default pattern is ``'__jinja2_%s.cache'``.  ``%s``
is replaced with the cache key.

>>> bcc = FileSystemBytecodeCache('/tmp/jinja_cache', '%s.cache')

This bytecode cache supports clearing of the cache using the clear method.

---
## MemcachedBytecodeCache
```python
from bccache import MemcachedBytecodeCache
```

This class implements a bytecode cache that uses a memcache cache for
storing the information.  It does not enforce a specific memcache library
(tummy's memcache or cmemcache) but will accept any class that provides
the minimal interface required.

Libraries compatible with this class:

-   `cachelib <https://github.com/pallets/cachelib>`_
-   `python-memcached <https://pypi.org/project/python-memcached/>`_

(Unfortunately the django cache interface is not compatible because it
does not support storing binary data, only text. You can however pass
the underlying cache client to the bytecode cache which is available
as `django.core.cache.cache._client`.)

The minimal interface for the client passed to the constructor is this:

.. class:: MinimalClientInterface

    .. method:: set(key, value[, timeout])

        Stores the bytecode in the cache.  `value` is a string and
        `timeout` the timeout of the key.  If timeout is not provided
        a default timeout or no timeout should be assumed, if it's
        provided it's an integer with the number of seconds the cache
        item should exist.

    .. method:: get(key)

        Returns the value for the cache key.  If the item does not
        exist in the cache the return value must be `None`.

The other arguments to the constructor are the prefix for all keys that
is added before the actual cache key and the timeout for the bytecode in
the cache system.  We recommend a high (or no) timeout.

This bytecode cache does not support clearing of used items in the cache.
The clear method is a no-operation function.

.. versionadded:: 2.7
   Added support for ignoring memcache errors through the
   `ignore_memcache_errors` parameter.

---
## _MemcachedClient
```python
from bccache import _MemcachedClient
```



---
## __init__
```python
from bccache import __init__
```



---
## reset
```python
from bccache import reset
```

Resets the bucket (unloads the bytecode).

---
## load_bytecode
```python
from bccache import load_bytecode
```



---
## write_bytecode
```python
from bccache import write_bytecode
```

Dump the bytecode into the file or file like object passed.

---
## bytecode_from_string
```python
from bccache import bytecode_from_string
```

Load bytecode from bytes.

---
## bytecode_to_string
```python
from bccache import bytecode_to_string
```

Return the bytecode as bytes.

---
## dump_bytecode
```python
from bccache import dump_bytecode
```



---
## clear
```python
from bccache import clear
```



---
## get_cache_key
```python
from bccache import get_cache_key
```

Returns the unique hash key for this template name.

---
## get_source_checksum
```python
from bccache import get_source_checksum
```

Returns a checksum for the source.

---
## get_bucket
```python
from bccache import get_bucket
```

Return a cache bucket for the given template.  All arguments are
mandatory but filename may be `None`.

---
## set_bucket
```python
from bccache import set_bucket
```

Put the bucket into the cache.

---
## _get_default_cache_dir
```python
from bccache import _get_default_cache_dir
```



---
## _get_cache_filename
```python
from bccache import _get_cache_filename
```



---
## get
```python
from bccache import get
```



---
## set
```python
from bccache import set
```



---
## _unsafe_dir
```python
from bccache import _unsafe_dir
```



---
## remove_silent
```python
from bccache import remove_silent
```



---
## ignore_case
```python
from filters import ignore_case
```

For use as a postprocessor for :func:`make_attrgetter`. Converts strings
to lowercase and returns other types as-is.

---
## make_attrgetter
```python
from filters import make_attrgetter
```

Returns a callable that looks up the given attribute from a
passed object with the rules of the environment.  Dots are allowed
to access attributes of attributes.  Integer parts in paths are
looked up as integers.

---
## make_multi_attrgetter
```python
from filters import make_multi_attrgetter
```

Returns a callable that looks up the given comma separated
attributes from a passed object with the rules of the environment.
Dots are allowed to access attributes of each attribute.  Integer
parts in paths are looked up as integers.

The value returned by the returned callable is a list of extracted
attribute values.

Examples of attribute: "attr1,attr2", "attr1.inner1.0,attr2.inner2.0", etc.

---
## _prepare_attribute_parts
```python
from filters import _prepare_attribute_parts
```



---
## do_forceescape
```python
from filters import do_forceescape
```

Enforce HTML escaping.  This will probably double escape variables.

---
## do_urlencode
```python
from filters import do_urlencode
```

Quote data for use in a URL path or query using UTF-8.

Basic wrapper around :func:`urllib.parse.quote` when given a
string, or :func:`urllib.parse.urlencode` for a dict or iterable.

:param value: Data to quote. A string will be quoted directly. A
    dict or iterable of ``(key, value)`` pairs will be joined as a
    query string.

When given a string, "/" is not quoted. HTTP servers treat "/" and
"%2F" equivalently in paths. If you need quoted slashes, use the
``|replace("/", "%2F")`` filter.

.. versionadded:: 2.7

---
## do_replace
```python
from filters import do_replace
```

Return a copy of the value with all occurrences of a substring
replaced with a new one. The first argument is the substring
that should be replaced, the second is the replacement string.
If the optional third argument ``count`` is given, only the first
``count`` occurrences are replaced:

.. sourcecode:: jinja

    {{ "Hello World"|replace("Hello", "Goodbye") }}
        -> Goodbye World

    {{ "aaaaargh"|replace("a", "d'oh, ", 2) }}
        -> d'oh, d'oh, aaargh

---
## do_upper
```python
from filters import do_upper
```

Convert a value to uppercase.

---
## do_lower
```python
from filters import do_lower
```

Convert a value to lowercase.

---
## do_items
```python
from filters import do_items
```

Return an iterator over the ``(key, value)`` items of a mapping.

``x|items`` is the same as ``x.items()``, except if ``x`` is
undefined an empty iterator is returned.

This filter is useful if you expect the template to be rendered with
an implementation of Jinja in another programming language that does
not have a ``.items()`` method on its mapping type.

.. code-block:: html+jinja

    <dl>
    {% for key, value in my_dict|items %}
        <dt>{{ key }}
        <dd>{{ value }}
    {% endfor %}
    </dl>

.. versionadded:: 3.1

---
## do_xmlattr
```python
from filters import do_xmlattr
```

Create an SGML/XML attribute string based on the items in a dict.

**Values** that are neither ``none`` nor ``undefined`` are automatically
escaped, safely allowing untrusted user input.

User input should not be used as **keys** to this filter. If any key
contains a space, ``/`` solidus, ``>`` greater-than sign, or ``=`` equals
sign, this fails with a ``ValueError``. Regardless of this, user input
should never be used as keys to this filter, or must be separately validated
first.

.. sourcecode:: html+jinja

    <ul{{ {'class': 'my_list', 'missing': none,
            'id': 'list-%d'|format(variable)}|xmlattr }}>
    ...
    </ul>

Results in something like this:

.. sourcecode:: html

    <ul class="my_list" id="list-42">
    ...
    </ul>

As you can see it automatically prepends a space in front of the item
if the filter returned something unless the second parameter is false.

.. versionchanged:: 3.1.4
    Keys with ``/`` solidus, ``>`` greater-than sign, or ``=`` equals sign
    are not allowed.

.. versionchanged:: 3.1.3
    Keys with spaces are not allowed.

---
## do_capitalize
```python
from filters import do_capitalize
```

Capitalize a value. The first character will be uppercase, all others
lowercase.

---
## do_title
```python
from filters import do_title
```

Return a titlecased version of the value. I.e. words will start with
uppercase letters, all remaining characters are lowercase.

---
## do_dictsort
```python
from filters import do_dictsort
```

Sort a dict and yield (key, value) pairs. Python dicts may not
be in the order you want to display them in, so sort them first.

.. sourcecode:: jinja

    {% for key, value in mydict|dictsort %}
        sort the dict by key, case insensitive

    {% for key, value in mydict|dictsort(reverse=true) %}
        sort the dict by key, case insensitive, reverse order

    {% for key, value in mydict|dictsort(true) %}
        sort the dict by key, case sensitive

    {% for key, value in mydict|dictsort(false, 'value') %}
        sort the dict by value, case insensitive

---
## do_sort
```python
from filters import do_sort
```

Sort an iterable using Python's :func:`sorted`.

.. sourcecode:: jinja

    {% for city in cities|sort %}
        ...
    {% endfor %}

:param reverse: Sort descending instead of ascending.
:param case_sensitive: When sorting strings, sort upper and lower
    case separately.
:param attribute: When sorting objects or dicts, an attribute or
    key to sort by. Can use dot notation like ``"address.city"``.
    Can be a list of attributes like ``"age,name"``.

The sort is stable, it does not change the relative order of
elements that compare equal. This makes it is possible to chain
sorts on different attributes and ordering.

.. sourcecode:: jinja

    {% for user in users|sort(attribute="name")
        |sort(reverse=true, attribute="age") %}
        ...
    {% endfor %}

As a shortcut to chaining when the direction is the same for all
attributes, pass a comma separate list of attributes.

.. sourcecode:: jinja

    {% for user in users|sort(attribute="age,name") %}
        ...
    {% endfor %}

.. versionchanged:: 2.11.0
    The ``attribute`` parameter can be a comma separated list of
    attributes, e.g. ``"age,name"``.

.. versionchanged:: 2.6
   The ``attribute`` parameter was added.

---
## do_unique
```python
from filters import do_unique
```

Returns a list of unique items from the given iterable.

.. sourcecode:: jinja

    {{ ['foo', 'bar', 'foobar', 'FooBar']|unique|list }}
        -> ['foo', 'bar', 'foobar']

The unique items are yielded in the same order as their first occurrence in
the iterable passed to the filter.

:param case_sensitive: Treat upper and lower case strings as distinct.
:param attribute: Filter objects with unique values for this attribute.

---
## _min_or_max
```python
from filters import _min_or_max
```



---
## do_min
```python
from filters import do_min
```

Return the smallest item from the sequence.

.. sourcecode:: jinja

    {{ [1, 2, 3]|min }}
        -> 1

:param case_sensitive: Treat upper and lower case strings as distinct.
:param attribute: Get the object with the min value of this attribute.

---
## do_max
```python
from filters import do_max
```

Return the largest item from the sequence.

.. sourcecode:: jinja

    {{ [1, 2, 3]|max }}
        -> 3

:param case_sensitive: Treat upper and lower case strings as distinct.
:param attribute: Get the object with the max value of this attribute.

---
## do_default
```python
from filters import do_default
```

If the value is undefined it will return the passed default value,
otherwise the value of the variable:

.. sourcecode:: jinja

    {{ my_variable|default('my_variable is not defined') }}

This will output the value of ``my_variable`` if the variable was
defined, otherwise ``'my_variable is not defined'``. If you want
to use default with variables that evaluate to false you have to
set the second parameter to `true`:

.. sourcecode:: jinja

    {{ ''|default('the string was empty', true) }}

.. versionchanged:: 2.11
   It's now possible to configure the :class:`~jinja2.Environment` with
   :class:`~jinja2.ChainableUndefined` to make the `default` filter work
   on nested elements and attributes that may contain undefined values
   in the chain without getting an :exc:`~jinja2.UndefinedError`.

---
## sync_do_join
```python
from filters import sync_do_join
```

Return a string which is the concatenation of the strings in the
sequence. The separator between elements is an empty string per
default, you can define it with the optional parameter:

.. sourcecode:: jinja

    {{ [1, 2, 3]|join('|') }}
        -> 1|2|3

    {{ [1, 2, 3]|join }}
        -> 123

It is also possible to join certain attributes of an object:

.. sourcecode:: jinja

    {{ users|join(', ', attribute='username') }}

.. versionadded:: 2.6
   The `attribute` parameter was added.

---
## do_center
```python
from filters import do_center
```

Centers the value in a field of a given width.

---
## sync_do_first
```python
from filters import sync_do_first
```

Return the first item of a sequence.

---
## do_last
```python
from filters import do_last
```

Return the last item of a sequence.

Note: Does not work with generators. You may want to explicitly
convert it to a list:

.. sourcecode:: jinja

    {{ data | selectattr('name', '==', 'Jinja') | list | last }}

---
## do_random
```python
from filters import do_random
```

Return a random item from the sequence.

---
## do_filesizeformat
```python
from filters import do_filesizeformat
```

Format the value like a 'human-readable' file size (i.e. 13 kB,
4.1 MB, 102 Bytes, etc).  Per default decimal prefixes are used (Mega,
Giga, etc.), if the second parameter is set to `True` the binary
prefixes are used (Mebi, Gibi).

---
## do_pprint
```python
from filters import do_pprint
```

Pretty print a variable. Useful for debugging.

---
## do_urlize
```python
from filters import do_urlize
```

Convert URLs in text into clickable links.

This may not recognize links in some situations. Usually, a more
comprehensive formatter, such as a Markdown library, is a better
choice.

Works on ``http://``, ``https://``, ``www.``, ``mailto:``, and email
addresses. Links with trailing punctuation (periods, commas, closing
parentheses) and leading punctuation (opening parentheses) are
recognized excluding the punctuation. Email addresses that include
header fields are not recognized (for example,
``mailto:address@example.com?cc=copy@example.com``).

:param value: Original text containing URLs to link.
:param trim_url_limit: Shorten displayed URL values to this length.
:param nofollow: Add the ``rel=nofollow`` attribute to links.
:param target: Add the ``target`` attribute to links.
:param rel: Add the ``rel`` attribute to links.
:param extra_schemes: Recognize URLs that start with these schemes
    in addition to the default behavior. Defaults to
    ``env.policies["urlize.extra_schemes"]``, which defaults to no
    extra schemes.

.. versionchanged:: 3.0
    The ``extra_schemes`` parameter was added.

.. versionchanged:: 3.0
    Generate ``https://`` links for URLs without a scheme.

.. versionchanged:: 3.0
    The parsing rules were updated. Recognize email addresses with
    or without the ``mailto:`` scheme. Validate IP addresses. Ignore
    parentheses and brackets in more cases.

.. versionchanged:: 2.8
   The ``target`` parameter was added.

---
## do_indent
```python
from filters import do_indent
```

Return a copy of the string with each line indented by 4 spaces. The
first line and blank lines are not indented by default.

:param width: Number of spaces, or a string, to indent by.
:param first: Don't skip indenting the first line.
:param blank: Don't skip indenting empty lines.

.. versionchanged:: 3.0
    ``width`` can be a string.

.. versionchanged:: 2.10
    Blank lines are not indented by default.

    Rename the ``indentfirst`` argument to ``first``.

---
## do_truncate
```python
from filters import do_truncate
```

Return a truncated copy of the string. The length is specified
with the first parameter which defaults to ``255``. If the second
parameter is ``true`` the filter will cut the text at length. Otherwise
it will discard the last word. If the text was in fact
truncated it will append an ellipsis sign (``"..."``). If you want a
different ellipsis sign than ``"..."`` you can specify it using the
third parameter. Strings that only exceed the length by the tolerance
margin given in the fourth parameter will not be truncated.

.. sourcecode:: jinja

    {{ "foo bar baz qux"|truncate(9) }}
        -> "foo..."
    {{ "foo bar baz qux"|truncate(9, True) }}
        -> "foo ba..."
    {{ "foo bar baz qux"|truncate(11) }}
        -> "foo bar baz qux"
    {{ "foo bar baz qux"|truncate(11, False, '...', 0) }}
        -> "foo bar..."

The default leeway on newer Jinja versions is 5 and was 0 before but
can be reconfigured globally.

---
## do_wordwrap
```python
from filters import do_wordwrap
```

Wrap a string to the given width. Existing newlines are treated
as paragraphs to be wrapped separately.

:param s: Original text to wrap.
:param width: Maximum length of wrapped lines.
:param break_long_words: If a word is longer than ``width``, break
    it across lines.
:param break_on_hyphens: If a word contains hyphens, it may be split
    across lines.
:param wrapstring: String to join each wrapped line. Defaults to
    :attr:`Environment.newline_sequence`.

.. versionchanged:: 2.11
    Existing newlines are treated as paragraphs wrapped separately.

.. versionchanged:: 2.11
    Added the ``break_on_hyphens`` parameter.

.. versionchanged:: 2.7
    Added the ``wrapstring`` parameter.

---
## do_wordcount
```python
from filters import do_wordcount
```

Count the words in that string.

---
## do_int
```python
from filters import do_int
```

Convert the value into an integer. If the
conversion doesn't work it will return ``0``. You can
override this default using the first parameter. You
can also override the default base (10) in the second
parameter, which handles input with prefixes such as
0b, 0o and 0x for bases 2, 8 and 16 respectively.
The base is ignored for decimal numbers and non-string values.

---
## do_float
```python
from filters import do_float
```

Convert the value into a floating point number. If the
conversion doesn't work it will return ``0.0``. You can
override this default using the first parameter.

---
## do_format
```python
from filters import do_format
```

Apply the given values to a `printf-style`_ format string, like
``string % values``.

.. sourcecode:: jinja

    {{ "%s, %s!"|format(greeting, name) }}
    Hello, World!

In most cases it should be more convenient and efficient to use the
``%`` operator or :meth:`str.format`.

.. code-block:: text

    {{ "%s, %s!" % (greeting, name) }}
    {{ "{}, {}!".format(greeting, name) }}

.. _printf-style: https://docs.python.org/library/stdtypes.html
    #printf-style-string-formatting

---
## do_trim
```python
from filters import do_trim
```

Strip leading and trailing characters, by default whitespace.

---
## do_striptags
```python
from filters import do_striptags
```

Strip SGML/XML tags and replace adjacent whitespace by one space.

---
## sync_do_slice
```python
from filters import sync_do_slice
```

Slice an iterator and return a list of lists containing
those items. Useful if you want to create a div containing
three ul tags that represent columns:

.. sourcecode:: html+jinja

    <div class="columnwrapper">
      {%- for column in items|slice(3) %}
        <ul class="column-{{ loop.index }}">
        {%- for item in column %}
          <li>{{ item }}</li>
        {%- endfor %}
        </ul>
      {%- endfor %}
    </div>

If you pass it a second argument it's used to fill missing
values on the last iteration.

---
## do_batch
```python
from filters import do_batch
```

A filter that batches items. It works pretty much like `slice`
just the other way round. It returns a list of lists with the
given number of items. If you provide a second parameter this
is used to fill up missing items. See this example:

.. sourcecode:: html+jinja

    <table>
    {%- for row in items|batch(3, '&nbsp;') %}
      <tr>
      {%- for column in row %}
        <td>{{ column }}</td>
      {%- endfor %}
      </tr>
    {%- endfor %}
    </table>

---
## do_round
```python
from filters import do_round
```

Round the number to a given precision. The first
parameter specifies the precision (default is ``0``), the
second the rounding method:

- ``'common'`` rounds either up or down
- ``'ceil'`` always rounds up
- ``'floor'`` always rounds down

If you don't specify a method ``'common'`` is used.

.. sourcecode:: jinja

    {{ 42.55|round }}
        -> 43.0
    {{ 42.55|round(1, 'floor') }}
        -> 42.5

Note that even if rounded to 0 precision, a float is returned.  If
you need a real integer, pipe it through `int`:

.. sourcecode:: jinja

    {{ 42.55|round|int }}
        -> 43

---
## _GroupTuple
```python
from filters import _GroupTuple
```



---
## sync_do_groupby
```python
from filters import sync_do_groupby
```

Group a sequence of objects by an attribute using Python's
:func:`itertools.groupby`. The attribute can use dot notation for
nested access, like ``"address.city"``. Unlike Python's ``groupby``,
the values are sorted first so only one group is returned for each
unique value.

For example, a list of ``User`` objects with a ``city`` attribute
can be rendered in groups. In this example, ``grouper`` refers to
the ``city`` value of the group.

.. sourcecode:: html+jinja

    <ul>{% for city, items in users|groupby("city") %}
      <li>{{ city }}
        <ul>{% for user in items %}
          <li>{{ user.name }}
        {% endfor %}</ul>
      </li>
    {% endfor %}</ul>

``groupby`` yields namedtuples of ``(grouper, list)``, which
can be used instead of the tuple unpacking above. ``grouper`` is the
value of the attribute, and ``list`` is the items with that value.

.. sourcecode:: html+jinja

    <ul>{% for group in users|groupby("city") %}
      <li>{{ group.grouper }}: {{ group.list|join(", ") }}
    {% endfor %}</ul>

You can specify a ``default`` value to use if an object in the list
does not have the given attribute.

.. sourcecode:: jinja

    <ul>{% for city, items in users|groupby("city", default="NY") %}
      <li>{{ city }}: {{ items|map(attribute="name")|join(", ") }}</li>
    {% endfor %}</ul>

Like the :func:`~jinja-filters.sort` filter, sorting and grouping is
case-insensitive by default. The ``key`` for each group will have
the case of the first item in that group of values. For example, if
a list of users has cities ``["CA", "NY", "ca"]``, the "CA" group
will have two values. This can be disabled by passing
``case_sensitive=True``.

.. versionchanged:: 3.1
    Added the ``case_sensitive`` parameter. Sorting and grouping is
    case-insensitive by default, matching other filters that do
    comparisons.

.. versionchanged:: 3.0
    Added the ``default`` parameter.

.. versionchanged:: 2.6
    The attribute supports dot notation for nested access.

---
## sync_do_sum
```python
from filters import sync_do_sum
```

Returns the sum of a sequence of numbers plus the value of parameter
'start' (which defaults to 0).  When the sequence is empty it returns
start.

It is also possible to sum up only certain attributes:

.. sourcecode:: jinja

    Total: {{ items|sum(attribute='price') }}

.. versionchanged:: 2.6
   The ``attribute`` parameter was added to allow summing up over
   attributes.  Also the ``start`` parameter was moved on to the right.

---
## sync_do_list
```python
from filters import sync_do_list
```

Convert the value into a list.  If it was a string the returned list
will be a list of characters.

---
## do_mark_safe
```python
from filters import do_mark_safe
```

Mark the value as safe which means that in an environment with automatic
escaping enabled this variable will not be escaped.

---
## do_mark_unsafe
```python
from filters import do_mark_unsafe
```

Mark a value as unsafe.  This is the reverse operation for :func:`safe`.

---
## do_reverse
```python
from filters import do_reverse
```

Reverse the object or return an iterator that iterates over it the other
way round.

---
## do_attr
```python
from filters import do_attr
```

Get an attribute of an object.  ``foo|attr("bar")`` works like
``foo.bar`` just that always an attribute is returned and items are not
looked up.

See :ref:`Notes on subscriptions <notes-on-subscriptions>` for more details.

---
## sync_do_map
```python
from filters import sync_do_map
```

Applies a filter on a sequence of objects or looks up an attribute.
This is useful when dealing with lists of objects but you are really
only interested in a certain value of it.

The basic usage is mapping on an attribute.  Imagine you have a list
of users but you are only interested in a list of usernames:

.. sourcecode:: jinja

    Users on this page: {{ users|map(attribute='username')|join(', ') }}

You can specify a ``default`` value to use if an object in the list
does not have the given attribute.

.. sourcecode:: jinja

    {{ users|map(attribute="username", default="Anonymous")|join(", ") }}

Alternatively you can let it invoke a filter by passing the name of the
filter and the arguments afterwards.  A good example would be applying a
text conversion filter on a sequence:

.. sourcecode:: jinja

    Users on this page: {{ titles|map('lower')|join(', ') }}

Similar to a generator comprehension such as:

.. code-block:: python

    (u.username for u in users)
    (getattr(u, "username", "Anonymous") for u in users)
    (do_lower(x) for x in titles)

.. versionchanged:: 2.11.0
    Added the ``default`` parameter.

.. versionadded:: 2.7

---
## do_map
```python
from filters import do_map
```



---
## sync_do_select
```python
from filters import sync_do_select
```

Filters a sequence of objects by applying a test to each object,
and only selecting the objects with the test succeeding.

If no test is specified, each object will be evaluated as a boolean.

Example usage:

.. sourcecode:: jinja

    {{ numbers|select("odd") }}
    {{ numbers|select("odd") }}
    {{ numbers|select("divisibleby", 3) }}
    {{ numbers|select("lessthan", 42) }}
    {{ strings|select("equalto", "mystring") }}

Similar to a generator comprehension such as:

.. code-block:: python

    (n for n in numbers if test_odd(n))
    (n for n in numbers if test_divisibleby(n, 3))

.. versionadded:: 2.7

---
## sync_do_reject
```python
from filters import sync_do_reject
```

Filters a sequence of objects by applying a test to each object,
and rejecting the objects with the test succeeding.

If no test is specified, each object will be evaluated as a boolean.

Example usage:

.. sourcecode:: jinja

    {{ numbers|reject("odd") }}

Similar to a generator comprehension such as:

.. code-block:: python

    (n for n in numbers if not test_odd(n))

.. versionadded:: 2.7

---
## sync_do_selectattr
```python
from filters import sync_do_selectattr
```

Filters a sequence of objects by applying a test to the specified
attribute of each object, and only selecting the objects with the
test succeeding.

If no test is specified, the attribute's value will be evaluated as
a boolean.

Example usage:

.. sourcecode:: jinja

    {{ users|selectattr("is_active") }}
    {{ users|selectattr("email", "none") }}

Similar to a generator comprehension such as:

.. code-block:: python

    (u for user in users if user.is_active)
    (u for user in users if test_none(user.email))

.. versionadded:: 2.7

---
## sync_do_rejectattr
```python
from filters import sync_do_rejectattr
```

Filters a sequence of objects by applying a test to the specified
attribute of each object, and rejecting the objects with the test
succeeding.

If no test is specified, the attribute's value will be evaluated as
a boolean.

.. sourcecode:: jinja

    {{ users|rejectattr("is_active") }}
    {{ users|rejectattr("email", "none") }}

Similar to a generator comprehension such as:

.. code-block:: python

    (u for user in users if not user.is_active)
    (u for user in users if not test_none(user.email))

.. versionadded:: 2.7

---
## do_tojson
```python
from filters import do_tojson
```

Serialize an object to a string of JSON, and mark it safe to
render in HTML. This filter is only for use in HTML documents.

The returned string is safe to render in HTML documents and
``<script>`` tags. The exception is in HTML attributes that are
double quoted; either use single quotes or the ``|forceescape``
filter.

:param value: The object to serialize to JSON.
:param indent: The ``indent`` parameter passed to ``dumps``, for
    pretty-printing the value.

.. versionadded:: 2.9

---
## prepare_map
```python
from filters import prepare_map
```



---
## prepare_select_or_reject
```python
from filters import prepare_select_or_reject
```



---
## select_or_reject
```python
from filters import select_or_reject
```



---
## HasHTML
```python
from filters import HasHTML
```



---
## attrgetter
```python
from filters import attrgetter
```



---
## sort_func
```python
from filters import sort_func
```



---
## __repr__
```python
from filters import __repr__
```



---
## __str__
```python
from filters import __str__
```



---
## __html__
```python
from filters import __html__
```



---
## func
```python
from filters import func
```



---
## transfunc
```python
from filters import transfunc
```



---
## __name__
```python
from ext import __name__
```



---
## Extension
```python
from ext import Extension
```

Extensions can be used to add extra functionality to the Jinja template
system at the parser level.  Custom extensions are bound to an environment
but may not store environment specific data on `self`.  The reason for
this is that an extension can be bound to another environment (for
overlays) by creating a copy and reassigning the `environment` attribute.

As extensions are created by the environment they cannot accept any
arguments for configuration.  One may want to work around that by using
a factory function, but that is not possible as extensions are identified
by their import name.  The correct way to configure the extension is
storing the configuration values on the environment.  Because this way the
environment ends up acting as central configuration storage the
attributes may clash which is why extensions have to ensure that the names
they choose for configuration are not too generic.  ``prefix`` for example
is a terrible name, ``fragment_cache_prefix`` on the other hand is a good
name as includes the name of the extension (fragment cache).

---
## _gettext_alias
```python
from ext import _gettext_alias
```



---
## _make_new_gettext
```python
from ext import _make_new_gettext
```



---
## _make_new_ngettext
```python
from ext import _make_new_ngettext
```



---
## _make_new_pgettext
```python
from ext import _make_new_pgettext
```



---
## _make_new_npgettext
```python
from ext import _make_new_npgettext
```



---
## InternationalizationExtension
```python
from ext import InternationalizationExtension
```

This extension adds gettext support to Jinja.

---
## ExprStmtExtension
```python
from ext import ExprStmtExtension
```

Adds a `do` tag to Jinja that works like the print statement just
that it doesn't print the return value.

---
## LoopControlExtension
```python
from ext import LoopControlExtension
```

Adds break and continue to the template engine.

---
## DebugExtension
```python
from ext import DebugExtension
```

A ``{% debug %}`` tag that dumps the available variables,
filters, and tests.

.. code-block:: html+jinja

    <pre>{% debug %}</pre>

.. code-block:: text

    {'context': {'cycler': <class 'jinja2.utils.Cycler'>,
                 ...,
                 'namespace': <class 'jinja2.utils.Namespace'>},
     'filters': ['abs', 'attr', 'batch', 'capitalize', 'center', 'count', 'd',
                 ..., 'urlencode', 'urlize', 'wordcount', 'wordwrap', 'xmlattr'],
     'tests': ['!=', '<', '<=', '==', '>', '>=', 'callable', 'defined',
               ..., 'odd', 'sameas', 'sequence', 'string', 'undefined', 'upper']}

.. versionadded:: 2.11.0

---
## extract_from_ast
```python
from ext import extract_from_ast
```

Extract localizable strings from the given template node.  Per
default this function returns matches in babel style that means non string
parameters as well as keyword arguments are returned as `None`.  This
allows Babel to figure out what you really meant if you are using
gettext functions that allow keyword arguments for placeholder expansion.
If you don't want that behavior set the `babel_style` parameter to `False`
which causes only strings to be returned and parameters are always stored
in tuples.  As a consequence invalid gettext calls (calls without a single
string parameter or string parameters after non-string parameters) are
skipped.

This example explains the behavior:

>>> from jinja2 import Environment
>>> env = Environment()
>>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
>>> list(extract_from_ast(node))
[(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
>>> list(extract_from_ast(node, babel_style=False))
[(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]

For every string found this function yields a ``(lineno, function,
message)`` tuple, where:

* ``lineno`` is the number of the line on which the string was found,
* ``function`` is the name of the ``gettext`` function used (if the
  string was extracted from embedded Python code), and
*   ``message`` is the string, or a tuple of strings for functions
     with multiple string arguments.

This extraction function operates on the AST and is because of that unable
to extract any comments.  For comment support you have to use the babel
extraction interface or extract comments yourself.

---
## _CommentFinder
```python
from ext import _CommentFinder
```

Helper class to find comments in a token stream.  Can only
find comments for gettext calls forwards.  Once the comment
from line 4 is found, a comment for line 1 will not return a
usable value.

---
## babel_extract
```python
from ext import babel_extract
```

Babel extraction method for Jinja templates.

.. versionchanged:: 2.3
   Basic support for translation comments was added.  If `comment_tags`
   is now set to a list of keywords for extraction, the extractor will
   try to find the best preceding comment that begins with one of the
   keywords.  For best results, make sure to not have more than one
   gettext call in one line of code and the matching comment in the
   same line or the line before.

.. versionchanged:: 2.5.1
   The `newstyle_gettext` flag can be set to `True` to enable newstyle
   gettext calls.

.. versionchanged:: 2.7
   A `silent` option can now be provided.  If set to `False` template
   syntax errors are propagated instead of being ignored.

:param fileobj: the file-like object the messages should be extracted from
:param keywords: a list of keywords (i.e. function names) that should be
                 recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
                     in the results.
:param options: a dictionary of additional options (optional)
:return: an iterator over ``(lineno, funcname, message, comments)`` tuples.
         (comments will be empty currently)

---
## _TranslationsBasic
```python
from ext import _TranslationsBasic
```



---
## _TranslationsContext
```python
from ext import _TranslationsContext
```



---
## __init_subclass__
```python
from ext import __init_subclass__
```



---
## __init__
```python
from ext import __init__
```

Initialize a Timestamp object.

:param int seconds:
    Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
    May be negative.

:param int nanoseconds:
    Number of nanoseconds to add to `seconds` to get fractional time.
    Maximum is 999_999_999.  Default is 0.

Note: Negative times (before the UNIX epoch) are represented as neg. seconds + pos. ns.

---
## bind
```python
from ext import bind
```

Create a copy of this extension bound to another environment.

---
## preprocess
```python
from ext import preprocess
```

This method is called before the actual lexing and can be used to
preprocess the source.  The `filename` is optional.  The return value
must be the preprocessed source.

---
## filter_stream
```python
from ext import filter_stream
```

It's passed a :class:`~jinja2.lexer.TokenStream` that can be used
to filter tokens returned.  This method has to return an iterable of
:class:`~jinja2.lexer.Token`\s, but it doesn't have to return a
:class:`~jinja2.lexer.TokenStream`.

---
## parse
```python
from ext import parse
```



---
## attr
```python
from ext import attr
```

Return an attribute node for the current extension.  This is useful
to pass constants on extensions to generated template code.

::

    self.attr('_my_attribute', lineno=lineno)

---
## call_method
```python
from ext import call_method
```

Call a method of the extension.  This is a shortcut for
:meth:`attr` + :class:`jinja2.nodes.Call`.

---
## gettext
```python
from ext import gettext
```



---
## ngettext
```python
from ext import ngettext
```



---
## pgettext
```python
from ext import pgettext
```



---
## npgettext
```python
from ext import npgettext
```



---
## _install
```python
from ext import _install
```



---
## _install_null
```python
from ext import _install_null
```



---
## _install_callables
```python
from ext import _install_callables
```



---
## _uninstall
```python
from ext import _uninstall
```



---
## _extract
```python
from ext import _extract
```



---
## _trim_whitespace
```python
from ext import _trim_whitespace
```



---
## _parse_block
```python
from ext import _parse_block
```

Parse until the next block tag with a given name.

---
## _make_node
```python
from ext import _make_node
```

Generates a useful node from the data provided.

---
## _render
```python
from ext import _render
```



---
## find_backwards
```python
from ext import find_backwards
```



---
## find_comments
```python
from ext import find_comments
```



---
## getbool
```python
from ext import getbool
```



---
## __name__
```python
from meta import __name__
```

Copyright (c) 2015, Waylan Limberg
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

MultiMarkdown Meta-Data

Extracts, parses and transforms MultiMarkdown style data from documents.

---
## TrackingCodeGenerator
```python
from meta import TrackingCodeGenerator
```

We abuse the code generator for introspection.

---
## find_undeclared_variables
```python
from meta import find_undeclared_variables
```

Returns a set of all variables in the AST that will be looked up from
the context at runtime.  Because at compile time it's not known which
variables will be used depending on the path the execution takes at
runtime, all variables are returned.

>>> from jinja2 import Environment, meta
>>> env = Environment()
>>> ast = env.parse('{% set foo = 42 %}{{ bar + foo }}')
>>> meta.find_undeclared_variables(ast) == {'bar'}
True

.. admonition:: Implementation

   Internally the code generator is used for finding undeclared variables.
   This is good to know because the code generator might raise a
   :exc:`TemplateAssertionError` during compilation and as a matter of
   fact this function can currently raise that exception as well.

---
## find_referenced_templates
```python
from meta import find_referenced_templates
```

Finds all the referenced templates from the AST.  This will return an
iterator over all the hardcoded template extensions, inclusions and
imports.  If dynamic inheritance or inclusion is used, `None` will be
yielded.

>>> from jinja2 import Environment, meta
>>> env = Environment()
>>> ast = env.parse('{% extends "layout.html" %}{% include helper %}')
>>> list(meta.find_referenced_templates(ast))
['layout.html', None]

This function is useful for dependency tracking.  For example if you want
to rebuild parts of the website after a layout template has changed.

---
## __init__
```python
from meta import __init__
```



---
## write
```python
from meta import write
```

Don't write.

---
## enter_frame
```python
from meta import enter_frame
```

Remember all undeclared identifiers.

---
## __name__
```python
from distro import __name__
```

The ``distro`` package (``distro`` stands for Linux Distribution) provides
information about the Linux distribution it runs on, such as a reliable
machine-readable distro ID, or version information.

It is the recommended replacement for Python's original
:py:func:`platform.linux_distribution` function, but it provides much more
functionality. An alternative implementation became necessary because Python
3.5 deprecated this function, and Python 3.8 removed it altogether. Its
predecessor function :py:func:`platform.dist` was already deprecated since
Python 2.6 and removed in Python 3.8. Still, there are many cases in which
access to OS distribution information is needed. See `Python issue 1322
<https://bugs.python.org/issue1322>`_ for more information.

---
## VersionDict
```python
from distro import VersionDict
```



---
## InfoDict
```python
from distro import InfoDict
```



---
## linux_distribution
```python
from distro import linux_distribution
```

Return information about the OS distribution that is compatible
with Python's :func:`platform.linux_distribution`, supporting a subset
of its parameters.

For details, see :func:`distro.linux_distribution`.

---
## id
```python
from distro import id
```

Return the distro ID of the OS distribution, as a string.

For details, see :func:`distro.id`.

---
## name
```python
from distro import name
```

Return the name of the OS distribution, as a string.

For details, see :func:`distro.name`.

---
## version
```python
from distro import version
```

Return the version of the OS distribution, as a string.

For details, see :func:`distro.version`.

---
## version_parts
```python
from distro import version_parts
```

Return the version of the OS distribution, as a tuple of version
numbers.

For details, see :func:`distro.version_parts`.

---
## major_version
```python
from distro import major_version
```

Return the major version number of the current distribution.

For details, see :func:`distro.major_version`.

---
## minor_version
```python
from distro import minor_version
```

Return the minor version number of the current distribution.

For details, see :func:`distro.minor_version`.

---
## build_number
```python
from distro import build_number
```

Return the build number of the current distribution.

For details, see :func:`distro.build_number`.

---
## like
```python
from distro import like
```

Return the IDs of distributions that are like the OS distribution.

For details, see :func:`distro.like`.

---
## codename
```python
from distro import codename
```

Return the codename of the OS distribution.

For details, see :func:`distro.codename`.

---
## info
```python
from distro import info
```

Return certain machine-readable information about the OS
distribution.

For details, see :func:`distro.info`.

---
## os_release_info
```python
from distro import os_release_info
```

Return a dictionary containing key-value pairs for the information
items from the os-release file data source of the OS distribution.

For details, see :func:`distro.os_release_info`.

---
## lsb_release_info
```python
from distro import lsb_release_info
```

Return a dictionary containing key-value pairs for the information
items from the lsb_release command data source of the OS
distribution.

For details, see :func:`distro.lsb_release_info`.

---
## distro_release_info
```python
from distro import distro_release_info
```

Return a dictionary containing key-value pairs for the information
items from the distro release file data source of the OS
distribution.

For details, see :func:`distro.distro_release_info`.

---
## uname_info
```python
from distro import uname_info
```

Return a dictionary containing key-value pairs for the information
items from the uname command data source of the OS distribution.

For details, see :func:`distro.uname_info`.

---
## os_release_attr
```python
from distro import os_release_attr
```

Return a single named information item from the os-release file data
source of the OS distribution.

For details, see :func:`distro.os_release_attr`.

---
## lsb_release_attr
```python
from distro import lsb_release_attr
```

Return a single named information item from the lsb_release command
output data source of the OS distribution.

For details, see :func:`distro.lsb_release_attr`.

---
## distro_release_attr
```python
from distro import distro_release_attr
```

Return a single named information item from the distro release file
data source of the OS distribution.

For details, see :func:`distro.distro_release_attr`.

---
## uname_attr
```python
from distro import uname_attr
```

Return a single named information item from the uname command
output data source of the OS distribution.

For details, see :func:`distro.uname_attr`.

---
## LinuxDistribution
```python
from distro import LinuxDistribution
```

Provides information about a OS distribution.

This package creates a private module-global instance of this class with
default initialization arguments, that is used by the
`consolidated accessor functions`_ and `single source accessor functions`_.
By using default initialization arguments, that module-global instance
returns data about the current OS distribution (i.e. the distro this
package runs on).

Normally, it is not necessary to create additional instances of this class.
However, in situations where control is needed over the exact data sources
that are used, instances of this class can be created with a specific
distro release file, or a specific os-release file, or without invoking the
lsb_release command.

---
## main
```python
from distro import main
```



---
## __init__
```python
from distro import __init__
```



---
## __repr__
```python
from distro import __repr__
```

Return repr of all info

---
## oslevel_info
```python
from distro import oslevel_info
```

Return AIX' oslevel command output.

---
## _os_release_info
```python
from distro import _os_release_info
```

Get the information items from the specified os-release file.

Returns:
    A dictionary containing all information items.

---
## _parse_os_release_content
```python
from distro import _parse_os_release_content
```

Parse the lines of an os-release file.

Parameters:

* lines: Iterable through the lines in the os-release file.
         Each line must be a unicode string or a UTF-8 encoded byte
         string.

Returns:
    A dictionary containing all information items.

---
## _lsb_release_info
```python
from distro import _lsb_release_info
```

Get the information items from the lsb_release command output.

Returns:
    A dictionary containing all information items.

---
## _parse_lsb_release_content
```python
from distro import _parse_lsb_release_content
```

Parse the output of the lsb_release command.

Parameters:

* lines: Iterable through the lines of the lsb_release output.
         Each line must be a unicode string or a UTF-8 encoded byte
         string.

Returns:
    A dictionary containing all information items.

---
## _uname_info
```python
from distro import _uname_info
```



---
## _oslevel_info
```python
from distro import _oslevel_info
```



---
## _debian_version
```python
from distro import _debian_version
```



---
## _parse_uname_content
```python
from distro import _parse_uname_content
```



---
## _to_str
```python
from distro import _to_str
```



---
## _distro_release_info
```python
from distro import _distro_release_info
```

Get the information items from the specified distro release file.

Returns:
    A dictionary containing all information items.

---
## _parse_distro_release_file
```python
from distro import _parse_distro_release_file
```

Parse a distro release file.

Parameters:

* filepath: Path name of the distro release file.

Returns:
    A dictionary containing all information items.

---
## _parse_distro_release_content
```python
from distro import _parse_distro_release_content
```

Parse a line from a distro release file.

Parameters:
* line: Line from the distro release file. Must be a unicode string
        or a UTF-8 encoded byte string.

Returns:
    A dictionary containing all information items.

---
## cached_property
```python
from distro import cached_property
```

A version of @property which caches the value.  On access, it calls the
underlying function and sets the value in `__dict__` so future accesses
will not re-call the property.

---
## normalize
```python
from distro import normalize
```



---
## __get__
```python
from distro import __get__
```



---
## __name__
```python
from __meta__ import __name__
```



---
## Version
```python
from __meta__ import Version
```

Get the version (PEP 440).

A biased approach to the PEP 440 semantic version.

Provides a tuple structure which is sorted for comparisons `v1 > v2` etc.
  (major, minor, micro, release type, pre-release build, post-release build, development release build)
Release types are named in is such a way they are comparable with ease.
Accessors to check if a development, pre-release, or post-release build. Also provides accessor to get
development status for setup files.

How it works (currently):

- You must specify a release type as either `final`, `alpha`, `beta`, or `candidate`.
- To define a development release, you can use either `.dev`, `.dev-alpha`, `.dev-beta`, or `.dev-candidate`.
  The dot is used to ensure all development specifiers are sorted before `alpha`.
  You can specify a `dev` number for development builds, but do not have to as implicit development releases
  are allowed.
- You must specify a `pre` value greater than zero if using a prerelease as this project (not PEP 440) does not
  allow implicit prereleases.
- You can optionally set `post` to a value greater than zero to make the build a post release. While post releases
  are technically allowed in prereleases, it is strongly discouraged, so we are rejecting them. It should be
  noted that we do not allow `post0` even though PEP 440 does not restrict this. This project specifically
  does not allow implicit post releases.
- It should be noted that we do not support epochs `1!` or local versions `+some-custom.version-1`.

Acceptable version releases:

```
Version(1, 0, 0, "final")                    1.0
Version(1, 2, 0, "final")                    1.2
Version(1, 2, 3, "final")                    1.2.3
Version(1, 2, 0, ".dev-alpha", pre=4)        1.2a4
Version(1, 2, 0, ".dev-beta", pre=4)         1.2b4
Version(1, 2, 0, ".dev-candidate", pre=4)    1.2rc4
Version(1, 2, 0, "final", post=1)            1.2.post1
Version(1, 2, 3, ".dev")                     1.2.3.dev0
Version(1, 2, 3, ".dev", dev=1)              1.2.3.dev1
```

---
## parse_version
```python
from __meta__ import parse_version
```

Parse version into a comparable Version tuple.

---
## __new__
```python
from __meta__ import __new__
```

Validate version info.

---
## _is_pre
```python
from __meta__ import _is_pre
```

Is prerelease.

---
## _is_dev
```python
from __meta__ import _is_dev
```

Is development.

---
## _is_post
```python
from __meta__ import _is_post
```

Is post.

---
## _get_dev_status
```python
from __meta__ import _get_dev_status
```

Get development status string.

---
## _get_canonical
```python
from __meta__ import _get_canonical
```

Get the canonical output string.

---
## lower
```python
from util import lower
```

Lower.

---
## SelectorSyntaxError
```python
from util import SelectorSyntaxError
```

Syntax error in a CSS selector.

---
## deprecated
```python
from util import deprecated
```

Raise a [`DeprecationWarning`][] when wrapped function/method is called.

Usage:

```python
@deprecated("This method will be removed in version X; use Y instead.")
def some_method():
    pass
```

---
## warn_deprecated
```python
from util import warn_deprecated
```

Warn deprecated.

---
## get_pattern_context
```python
from util import get_pattern_context
```

Get the pattern context.

---
## _wrapper
```python
from util import _wrapper
```



---
## _deprecated_func
```python
from util import _deprecated_func
```



---
## __name__
```python
from css_types import __name__
```

CSS selector structure items.

---
## Immutable
```python
from css_types import Immutable
```

Immutable.

---
## ImmutableDict
```python
from css_types import ImmutableDict
```

Hashable, immutable dictionary.

---
## Namespaces
```python
from css_types import Namespaces
```

Namespaces.

---
## CustomSelectors
```python
from css_types import CustomSelectors
```

Custom selectors.

---
## Selector
```python
from css_types import Selector
```

Selector.

---
## SelectorNull
```python
from css_types import SelectorNull
```

Null Selector.

---
## SelectorTag
```python
from css_types import SelectorTag
```

Selector tag.

---
## SelectorAttribute
```python
from css_types import SelectorAttribute
```

Selector attribute rule.

---
## SelectorContains
```python
from css_types import SelectorContains
```

Selector contains rule.

---
## SelectorNth
```python
from css_types import SelectorNth
```

Selector nth type.

---
## SelectorLang
```python
from css_types import SelectorLang
```

Selector language rules.

---
## SelectorList
```python
from css_types import SelectorList
```

Selector list.

---
## _pickle
```python
from css_types import _pickle
```



---
## pickle_register
```python
from css_types import pickle_register
```

Allow object to be pickled.

---
## __init__
```python
from css_types import __init__
```

Initialize.

---
## __base__
```python
from css_types import __base__
```

Get base class.

---
## __eq__
```python
from css_types import __eq__
```

Equal.

---
## __ne__
```python
from css_types import __ne__
```

Equal.

---
## __hash__
```python
from css_types import __hash__
```

Hash.

---
## __setattr__
```python
from css_types import __setattr__
```

Prevent mutability.

---
## __repr__
```python
from css_types import __repr__
```

Representation.

---
## pretty
```python
from css_types import pretty
```

Pretty print.

---
## _validate
```python
from css_types import _validate
```

Validate arguments.

---
## __iter__
```python
from css_types import __iter__
```

Iterator.

---
## __len__
```python
from css_types import __len__
```

Length.

---
## __getitem__
```python
from css_types import __getitem__
```

Get item.

---
## compile
```python
from __init__ import compile
```

Build extension module from a Fortran 77 source string with f2py.

Parameters
----------
source : str or bytes
    Fortran source of module / subroutine to compile

    .. versionchanged:: 1.16.0
       Accept str as well as bytes

modulename : str, optional
    The name of the compiled python module
extra_args : str or list, optional
    Additional parameters passed to f2py

    .. versionchanged:: 1.16.0
        A list of args may also be provided.

verbose : bool, optional
    Print f2py output to screen
source_fn : str, optional
    Name of the file where the fortran source is written.
    The default is to use a temporary file with the extension
    provided by the ``extension`` parameter
extension : ``{'.f', '.f90'}``, optional
    Filename extension if `source_fn` is not provided.
    The extension tells which fortran standard is used.
    The default is ``.f``, which implies F77 standard.

    .. versionadded:: 1.11.0

full_output : bool, optional
    If True, return a `subprocess.CompletedProcess` containing
    the stdout and stderr of the compile process, instead of just
    the status code.

    .. versionadded:: 1.20.0


Returns
-------
result : int or `subprocess.CompletedProcess`
    0 on success, or a `subprocess.CompletedProcess` if
    ``full_output=True``

Examples
--------
.. literalinclude:: ../../source/f2py/code/results/compile_session.dat
    :language: python

---
## purge
```python
from __init__ import purge
```

Purge cached patterns.

---
## closest
```python
from __init__ import closest
```

Match closest ancestor.

---
## match
```python
from __init__ import match
```



---
## filter
```python
from __init__ import filter
```



---
## select_one
```python
from __init__ import select_one
```

Select a single tag.

---
## select
```python
from __init__ import select
```

Select entry points from self that match the
given parameters (typically group and/or name).

---
## iselect
```python
from __init__ import iselect
```

Iterate the specified tags.

---
## __name__
```python
from pretty import __name__
```



---
## pretty
```python
from pretty import pretty
```

Make the object output string pretty.

---
## __name__
```python
from css_parser import __name__
```

CSS selector parser.

---
## _cached_css_compile
```python
from css_parser import _cached_css_compile
```

Cached CSS compile.

---
## _purge_cache
```python
from css_parser import _purge_cache
```

Purge the cache.

---
## process_custom
```python
from css_parser import process_custom
```

Process custom.

---
## css_unescape
```python
from css_parser import css_unescape
```

Unescape CSS value.

Strings allow for spanning the value on multiple strings by escaping a new line.

---
## escape
```python
from css_parser import escape
```

Escape identifier.

---
## SelectorPattern
```python
from css_parser import SelectorPattern
```

Selector pattern.

---
## SpecialPseudoPattern
```python
from css_parser import SpecialPseudoPattern
```

Selector pattern.

---
## _Selector
```python
from css_parser import _Selector
```

Intermediate selector class.

This stores selector data for a compound selector as we are acquiring them.
Once we are done collecting the data for a compound selector, we freeze
the data in an object that can be pickled and hashed.

---
## CSSParser
```python
from css_parser import CSSParser
```

Parse CSS selectors.

---
## replace
```python
from css_parser import replace
```

Replace with the appropriate substitute.

---
## __init__
```python
from css_parser import __init__
```

Initialize.

---
## get_name
```python
from css_parser import get_name
```

Get name.

---
## match
```python
from css_parser import match
```

Match the selector.

---
## _freeze_relations
```python
from css_parser import _freeze_relations
```

Freeze relation.

---
## freeze
```python
from css_parser import freeze
```

Freeze self.

---
## __str__
```python
from css_parser import __str__
```

String representation.

---
## parse_attribute_selector
```python
from css_parser import parse_attribute_selector
```

Create attribute selector from the returned regex match.

---
## parse_tag_pattern
```python
from css_parser import parse_tag_pattern
```

Parse tag pattern from regex match.

---
## parse_pseudo_class_custom
```python
from css_parser import parse_pseudo_class_custom
```

Parse custom pseudo class alias.

Compile custom selectors as we need them. When compiling a custom selector,
set it to `None` in the dictionary so we can avoid an infinite loop.

---
## parse_pseudo_class
```python
from css_parser import parse_pseudo_class
```

Parse pseudo class.

---
## parse_pseudo_nth
```python
from css_parser import parse_pseudo_nth
```

Parse `nth` pseudo.

---
## parse_pseudo_open
```python
from css_parser import parse_pseudo_open
```

Parse pseudo with opening bracket.

---
## parse_has_combinator
```python
from css_parser import parse_has_combinator
```

Parse combinator tokens.

---
## parse_combinator
```python
from css_parser import parse_combinator
```

Parse combinator tokens.

---
## parse_class_id
```python
from css_parser import parse_class_id
```

Parse HTML classes and ids.

---
## parse_pseudo_contains
```python
from css_parser import parse_pseudo_contains
```

Parse contains.

---
## parse_pseudo_lang
```python
from css_parser import parse_pseudo_lang
```

Parse pseudo language.

---
## parse_pseudo_dir
```python
from css_parser import parse_pseudo_dir
```

Parse pseudo direction.

---
## parse_selectors
```python
from css_parser import parse_selectors
```

Parse selectors.

---
## selector_iter
```python
from css_parser import selector_iter
```

Iterate selector tokens.

---
## process_selectors
```python
from css_parser import process_selectors
```

Process selectors.

---
## __name__
```python
from css_match import __name__
```

CSS matcher.

---
## _FakeParent
```python
from css_match import _FakeParent
```

Fake parent class.

When we have a fragment with no `BeautifulSoup` document object,
we can't evaluate `nth` selectors properly.  Create a temporary
fake parent so we can traverse the root element as a child.

---
## _DocumentNav
```python
from css_match import _DocumentNav
```

Navigate a Beautiful Soup document.

---
## Inputs
```python
from css_match import Inputs
```

Class for parsing and validating input items.

---
## CSSMatch
```python
from css_match import CSSMatch
```

Perform CSS matching.

---
## SoupSieve
```python
from css_match import SoupSieve
```

Compiled Soup Sieve selector matching object.

---
## __init__
```python
from css_match import __init__
```

Initialize.

---
## __len__
```python
from css_match import __len__
```

Length.

---
## assert_valid_input
```python
from css_match import assert_valid_input
```

Check if valid input tag or document.

---
## is_doc
```python
from css_match import is_doc
```

Is `BeautifulSoup` object.

---
## is_tag
```python
from css_match import is_tag
```

Is tag.

---
## is_declaration
```python
from css_match import is_declaration
```

Is declaration.

---
## is_cdata
```python
from css_match import is_cdata
```

Is CDATA.

---
## is_processing_instruction
```python
from css_match import is_processing_instruction
```

Is processing instruction.

---
## is_navigable_string
```python
from css_match import is_navigable_string
```

Is navigable string.

---
## is_special_string
```python
from css_match import is_special_string
```

Is special string.

---
## is_content_string
```python
from css_match import is_content_string
```

Check if node is content string.

---
## create_fake_parent
```python
from css_match import create_fake_parent
```

Create fake parent for a given element.

---
## is_xml_tree
```python
from css_match import is_xml_tree
```

Check if element (or document) is from a XML tree.

---
## is_iframe
```python
from css_match import is_iframe
```

Check if element is an `iframe`.

---
## is_root
```python
from css_match import is_root
```

Return whether element is a root element.

We check that the element is the root of the tree (which we have already pre-calculated),
and we check if it is the root element under an `iframe`.

---
## get_contents
```python
from css_match import get_contents
```

Get contents or contents in reverse.

---
## get_children
```python
from css_match import get_children
```

Get children.

---
## get_descendants
```python
from css_match import get_descendants
```

Get descendants.

---
## get_parent
```python
from css_match import get_parent
```

Get parent.

---
## get_tag_name
```python
from css_match import get_tag_name
```

Get tag.

---
## get_prefix_name
```python
from css_match import get_prefix_name
```

Get prefix.

---
## get_uri
```python
from css_match import get_uri
```

Get namespace `URI`.

---
## get_next
```python
from css_match import get_next
```

Get next sibling tag.

---
## get_previous
```python
from css_match import get_previous
```

Get previous sibling tag.

---
## has_html_ns
```python
from css_match import has_html_ns
```

Check if element has an HTML namespace.

This is a bit different than whether a element is treated as having an HTML namespace,
like we do in the case of `is_html_tag`.

---
## split_namespace
```python
from css_match import split_namespace
```

Return namespace and attribute name without the prefix.

---
## normalize_value
```python
from css_match import normalize_value
```

Normalize the value to be a string or list of strings.

---
## get_attribute_by_name
```python
from css_match import get_attribute_by_name
```

Get attribute by name.

---
## iter_attributes
```python
from css_match import iter_attributes
```

Iterate attributes.

---
## get_classes
```python
from css_match import get_classes
```

Get classes.

---
## get_text
```python
from css_match import get_text
```

Get text.

---
## get_own_text
```python
from css_match import get_own_text
```

Get Own Text.

---
## validate_day
```python
from css_match import validate_day
```

Validate day.

---
## validate_week
```python
from css_match import validate_week
```

Validate week.

---
## validate_month
```python
from css_match import validate_month
```

Validate month.

---
## validate_year
```python
from css_match import validate_year
```

Validate year.

---
## validate_hour
```python
from css_match import validate_hour
```

Validate hour.

---
## validate_minutes
```python
from css_match import validate_minutes
```

Validate minutes.

---
## parse_value
```python
from css_match import parse_value
```

Parse the input value.

---
## supports_namespaces
```python
from css_match import supports_namespaces
```

Check if namespaces are supported in the HTML type.

---
## get_tag_ns
```python
from css_match import get_tag_ns
```

Get tag namespace.

---
## is_html_tag
```python
from css_match import is_html_tag
```

Check if tag is in HTML namespace.

---
## get_tag
```python
from css_match import get_tag
```

Get tag.

---
## get_prefix
```python
from css_match import get_prefix
```

Get prefix.

---
## find_bidi
```python
from css_match import find_bidi
```

Get directionality from element text.

---
## extended_language_filter
```python
from css_match import extended_language_filter
```

Filter the language tags.

---
## match_attribute_name
```python
from css_match import match_attribute_name
```

Match attribute name and return value if it exists.

---
## match_namespace
```python
from css_match import match_namespace
```

Match the namespace of the element.

---
## match_attributes
```python
from css_match import match_attributes
```

Match attributes.

---
## match_tagname
```python
from css_match import match_tagname
```

Match tag name.

---
## match_tag
```python
from css_match import match_tag
```

Match the tag.

---
## match_past_relations
```python
from css_match import match_past_relations
```

Match past relationship.

---
## match_future_child
```python
from css_match import match_future_child
```

Match future child.

---
## match_future_relations
```python
from css_match import match_future_relations
```

Match future relationship.

---
## match_relations
```python
from css_match import match_relations
```

Match relationship to other elements.

---
## match_id
```python
from css_match import match_id
```

Match element's ID.

---
## match_classes
```python
from css_match import match_classes
```

Match element's classes.

---
## match_root
```python
from css_match import match_root
```

Match element as root.

---
## match_scope
```python
from css_match import match_scope
```

Match element as scope.

---
## match_nth_tag_type
```python
from css_match import match_nth_tag_type
```

Match tag type for `nth` matches.

---
## match_nth
```python
from css_match import match_nth
```

Match `nth` elements.

---
## match_empty
```python
from css_match import match_empty
```

Check if element is empty (if requested).

---
## match_subselectors
```python
from css_match import match_subselectors
```

Match selectors.

---
## match_contains
```python
from css_match import match_contains
```

Match element if it contains text.

---
## match_default
```python
from css_match import match_default
```

Match default.

---
## match_indeterminate
```python
from css_match import match_indeterminate
```

Match default.

---
## match_lang
```python
from css_match import match_lang
```

Match languages.

---
## match_dir
```python
from css_match import match_dir
```

Check directionality.

---
## match_range
```python
from css_match import match_range
```

Match range.

Behavior is modeled after what we see in browsers. Browsers seem to evaluate
if the value is out of range, and if not, it is in range. So a missing value
will not evaluate out of range; therefore, value is in range. Personally, I
feel like this should evaluate as neither in or out of range.

---
## match_defined
```python
from css_match import match_defined
```

Match defined.

`:defined` is related to custom elements in a browser.

- If the document is XML (not XHTML), all tags will match.
- Tags that are not custom (don't have a hyphen) are marked defined.
- If the tag has a prefix (without or without a namespace), it will not match.

This is of course requires the parser to provide us with the proper prefix and namespace info,
if it doesn't, there is nothing we can do.

---
## match_placeholder_shown
```python
from css_match import match_placeholder_shown
```

Match placeholder shown according to HTML spec.

- text area should be checked if they have content. A single newline does not count as content.

---
## match_selectors
```python
from css_match import match_selectors
```

Check if element matches one of the selectors.

---
## select
```python
from css_match import select
```

Select the specified tags.

---
## closest
```python
from css_match import closest
```

Match closest ancestor.

---
## filter
```python
from css_match import filter
```

Filter.

`CSSMatch` can cache certain searches for tags of the same document,
so if we are given a tag, all tags are from the same document,
and we can take advantage of the optimization.

Any other kind of iterable could have tags from different documents or detached tags,
so for those, we use a new `CSSMatch` for each item in the iterable.

---
## match
```python
from css_match import match
```

Match.

---
## select_one
```python
from css_match import select_one
```

Select a single tag.

---
## iselect
```python
from css_match import iselect
```

Iterate the specified tags.

---
## __repr__
```python
from css_match import __repr__
```

Representation.

---
## get_parent_form
```python
from css_match import get_parent_form
```

Find this input's form.

---
## FrozenList
```python
from __init__ import FrozenList
```



---
## frozen
```python
from __init__ import frozen
```



---
## freeze
```python
from __init__ import freeze
```

Create a usable data structure for serializing.

---
## __setitem__
```python
from __init__ import __setitem__
```



---
## __delitem__
```python
from __init__ import __delitem__
```



---
## __reversed__
```python
from __init__ import __reversed__
```



---
## insert
```python
from __init__ import insert
```



---
## __hash__
```python
from __init__ import __hash__
```



---
## __class_getitem__
```python
from __init__ import __class_getitem__
```



---
## __name__
```python
from functions import __name__
```



---
## __word2art
```python
from functions import __word2art
```

Return art word.

:param word: input word
:type word: str
:param font: input font
:type font: str
:param chr_ignore: ignore not supported character
:type chr_ignore: bool
:param letters: font letters table
:type letters: dict
:param next_word: next word flag
:type next_word: bool
:param sep: line separator char
:type sep: str
:return: ascii art as str

---
## text2art
```python
from functions import text2art
```

Return art text (support \n).

:param text: input text
:type text:str
:param font: input font
:type font:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param decoration: text decoration
:type decoration:str
:param sep: line separator char
:type sep: str
:param space: space between characters
:type space: int
:param __detailed_return: flag for returning the font and the decoration
:type __detailed_return: bool
:return: ascii art text as str

---
## tprint
```python
from functions import tprint
```

Print art text (support \n).

:param text: input text
:type text:str
:param font: input font
:type font:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param decoration: text decoration
:type decoration:str
:param sep: line separator char
:type sep: str
:param space: space between characters
:type space: int
:return: None

---
## art
```python
from functions import art
```

Return 1-line art.

:param artname: art name
:type artname : str
:param number: number of repeats
:type number: int
:param space: space between arts
:type space: int
:param __detailed_return: flag for returning the art name
:type __detailed_return: bool
:return: ascii art as str

---
## aprint
```python
from functions import aprint
```

Print 1-line art.

:param artname: art name
:type artname : str
:param number: number of repeats
:type number: int
:param space: space between arts
:type space: int
:return: None

---
## decor
```python
from functions import decor
```

Return given decoration part.

:param  decoration: decoration's name
:type decoration:str
:param reverse: true if second tail of decoration wanted
:type reverse:bool
:param both: both tails returning flag
:type bool: bool
:return: decor's tail as str or tails as list of str

---
## randart
```python
from functions import randart
```

Return random 1-line art.

:return: ascii art as str

---
## tsave
```python
from functions import tsave
```

Save ascii art (support \n).

:param text: input text
:param font: input font
:type font:str
:type text:str
:param filename: output file name
:type filename:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param print_status : save message print flag
:type print_status:bool
:param overwrite : overwrite the saved file if true
:type overwrite:bool
:param decoration: text decoration
:type decoration:str
:param sep: line separator char
:type sep: str
:param space: space between characters
:type space: int
:return: None

---
## set_default
```python
from functions import set_default
```

Change text2art, tprint and tsave default values.

:param font: input font
:type font:str
:param chr_ignore: ignore not supported character
:type chr_ignore:bool
:param filename: output file name (only tsave)
:type filename:str
:param print_status : save message print flag (only tsave)
:type print_status:bool
:param overwrite : overwrite the saved file if true (only tsave)
:type overwrite:bool
:param decoration: input decoration
:type decoration:str
:param sep: line separator char
:type sep: str
:param space: space between characters
:type space: int
:param __detailed_return: flag for returning the font and the decoration
:type __detailed_return: bool
:return: None

---
## get_font_dic
```python
from functions import get_font_dic
```

Return given font's dictionary.

:param  font_name: font's name
:type font_name:str
:return: font's dictionary

---
## decor_list
```python
from functions import decor_list
```

Print all decorations.

:param text : input text
:type text : str
:param font: input font
:type font:str
:return: None

---
## font_list
```python
from functions import font_list
```

Print all fonts.

:param text : input text
:type text : str
:param mode: fonts mode (all,ascii,non-ascii)
:type mode: str
:return: None

---
## art_list
```python
from functions import art_list
```

Print all 1-Line arts.

:param mode: fonts mode (all,ascii,non-ascii)
:type mode: str
:return: None

---
## mix_letters
```python
from functions import mix_letters
```

Return letters list in mix mode.

:return: letters as list

---
## help_func
```python
from functions import help_func
```

Print help page.

:return: None

---
## __name__
```python
from params import __name__
```



---
## distance_calc
```python
from utils import distance_calc
```

Calculate Levenshtein distance between two words.

:param s1: first word
:type s1 : str
:param s2: second word
:type s2 : str
:return: distance between two word

References :
1- https://stackoverflow.com/questions/2460177/edit-distance-in-python
2- https://en.wikipedia.org/wiki/Levenshtein_distance

---
## wizard_font
```python
from utils import wizard_font
```

Check input text length for wizard mode.

:param text: input text
:type text:str
:return: font as str

---
## indirect_font
```python
from utils import indirect_font
```

Check input font for indirect modes.

:param font: input font
:type font : str
:param text: input text
:type text:str
:return: font as str

---
## indirect_decoration
```python
from utils import indirect_decoration
```

Check input decoration for indirect modes.

:param decoration: input decoration
:type decoration : str
:return: decoration as str

---
## font_size_splitter
```python
from utils import font_size_splitter
```

Split fonts to 4 category (small,medium,large,xlarge) by maximum length of letter in each font.

:param font_map: input fontmap
:type font_map : dict
:return: splitted fonts as dict

---
## line
```python
from utils import line
```

Print line of chars.

:param char: input character
:type char:str
:param number: number of characters
:return: None

---
## artError
```python
from errors import artError
```

Art error class.

---
## select_test
```python
from __main__ import select_test
```

Select proper test mode.

:param test_name: test name
:type test_name: str
:return: None

---
## __name__
```python
from cloudpickle import __name__
```



---
## _get_or_create_tracker_id
```python
from cloudpickle import _get_or_create_tracker_id
```



---
## _lookup_class_or_track
```python
from cloudpickle import _lookup_class_or_track
```



---
## register_pickle_by_value
```python
from cloudpickle import register_pickle_by_value
```

Register a module to make it functions and classes picklable by value.

By default, functions and classes that are attributes of an importable
module are to be pickled by reference, that is relying on re-importing
the attribute from the module at load time.

If `register_pickle_by_value(module)` is called, all its functions and
classes are subsequently to be pickled by value, meaning that they can
be loaded in Python processes where the module is not importable.

This is especially useful when developing a module in a distributed
execution environment: restarting the client Python process with the new
source code is enough: there is no need to re-install the new version
of the module on all the worker nodes nor to restart the workers.

Note: this feature is considered experimental. See the cloudpickle
README.md file for more details and limitations.

---
## unregister_pickle_by_value
```python
from cloudpickle import unregister_pickle_by_value
```

Unregister that the input module should be pickled by value.

---
## list_registry_pickle_by_value
```python
from cloudpickle import list_registry_pickle_by_value
```



---
## _is_registered_pickle_by_value
```python
from cloudpickle import _is_registered_pickle_by_value
```



---
## _whichmodule
```python
from cloudpickle import _whichmodule
```

Find the module an object belongs to.

This function differs from ``pickle.whichmodule`` in two ways:
- it does not mangle the cases where obj's module is __main__ and obj was
  not found in any module.
- Errors arising during module introspection are ignored, as those errors
  are considered unwanted side effects.

---
## _should_pickle_by_reference
```python
from cloudpickle import _should_pickle_by_reference
```

Test whether an function or a class should be pickled by reference

Pickling by reference means by that the object (typically a function or a
class) is an attribute of a module that is assumed to be importable in the
target Python environment. Loading will therefore rely on importing the
module and then calling `getattr` on it to access the function or class.

Pickling by reference is the only option to pickle functions and classes
in the standard library. In cloudpickle the alternative option is to
pickle by value (for instance for interactively or locally defined
functions and classes or for attributes of modules that have been
explicitly registered to be pickled by value.

---
## _lookup_module_and_qualname
```python
from cloudpickle import _lookup_module_and_qualname
```



---
## _extract_code_globals
```python
from cloudpickle import _extract_code_globals
```

Find all globals names read or written to by codeblock co.

---
## _find_imported_submodules
```python
from cloudpickle import _find_imported_submodules
```

Find currently imported submodules used by a function.

Submodules used by a function need to be detected and referenced for the
function to work correctly at depickling time. Because submodules can be
referenced as attribute of their parent package (``package.submodule``), we
need a special introspection technique that does not rely on GLOBAL-related
opcodes to find references of them in a code object.

Example:
```
import concurrent.futures
import cloudpickle
def func():
    x = concurrent.futures.ThreadPoolExecutor
if __name__ == '__main__':
    cloudpickle.dumps(func)
```
The globals extracted by cloudpickle in the function's state include the
concurrent package, but not its submodule (here, concurrent.futures), which
is the module used by func. Find_imported_submodules will detect the usage
of concurrent.futures. Saving this module alongside with func will ensure
that calling func once depickled does not fail due to concurrent.futures
not being imported

---
## _builtin_type
```python
from cloudpickle import _builtin_type
```



---
## _walk_global_ops
```python
from cloudpickle import _walk_global_ops
```

Yield referenced name for global-referencing instructions in code.

---
## _extract_class_dict
```python
from cloudpickle import _extract_class_dict
```

Retrieve a copy of the dict of a class without the inherited method.

---
## is_tornado_coroutine
```python
from cloudpickle import is_tornado_coroutine
```

Return whether `func` is a Tornado coroutine function.

Running coroutines are not supported.

---
## subimport
```python
from cloudpickle import subimport
```



---
## dynamic_subimport
```python
from cloudpickle import dynamic_subimport
```



---
## _get_cell_contents
```python
from cloudpickle import _get_cell_contents
```



---
## instance
```python
from cloudpickle import instance
```

Create a new instance of a class.

Parameters
----------
cls : type
    The class to create an instance of.

Returns
-------
instance : cls
    A new instance of ``cls``.

---
## _empty_cell_value
```python
from cloudpickle import _empty_cell_value
```

Sentinel for empty closures.

---
## _make_function
```python
from cloudpickle import _make_function
```



---
## _make_empty_cell
```python
from cloudpickle import _make_empty_cell
```



---
## _make_cell
```python
from cloudpickle import _make_cell
```



---
## _make_skeleton_class
```python
from cloudpickle import _make_skeleton_class
```

Build dynamic class with an empty __dict__ to be filled once memoized

If class_tracker_id is not None, try to lookup an existing class definition
matching that id. If none is found, track a newly reconstructed class
definition under that id so that other instances stemming from the same
class id will also reuse this class definition.

The "extra" variable is meant to be a dict (or None) that can be used for
forward compatibility shall the need arise.

---
## _make_skeleton_enum
```python
from cloudpickle import _make_skeleton_enum
```

Build dynamic enum with an empty __dict__ to be filled once memoized

The creation of the enum class is inspired by the code of
EnumMeta._create_.

If class_tracker_id is not None, try to lookup an existing enum definition
matching that id. If none is found, track a newly reconstructed enum
definition under that id so that other instances stemming from the same
class id will also reuse this enum definition.

The "extra" variable is meant to be a dict (or None) that can be used for
forward compatibility shall the need arise.

---
## _make_typevar
```python
from cloudpickle import _make_typevar
```



---
## _decompose_typevar
```python
from cloudpickle import _decompose_typevar
```



---
## _typevar_reduce
```python
from cloudpickle import _typevar_reduce
```



---
## _get_bases
```python
from cloudpickle import _get_bases
```



---
## _make_dict_keys
```python
from cloudpickle import _make_dict_keys
```



---
## _make_dict_values
```python
from cloudpickle import _make_dict_values
```



---
## _make_dict_items
```python
from cloudpickle import _make_dict_items
```



---
## _class_getnewargs
```python
from cloudpickle import _class_getnewargs
```



---
## _enum_getnewargs
```python
from cloudpickle import _enum_getnewargs
```



---
## _file_reconstructor
```python
from cloudpickle import _file_reconstructor
```



---
## _function_getstate
```python
from cloudpickle import _function_getstate
```



---
## _class_getstate
```python
from cloudpickle import _class_getstate
```



---
## _enum_getstate
```python
from cloudpickle import _enum_getstate
```



---
## _code_reduce
```python
from cloudpickle import _code_reduce
```

code object reducer.

---
## _cell_reduce
```python
from cloudpickle import _cell_reduce
```

Cell (containing values of a function's free variables) reducer.

---
## _classmethod_reduce
```python
from cloudpickle import _classmethod_reduce
```



---
## _file_reduce
```python
from cloudpickle import _file_reduce
```

Save a file.

---
## _getset_descriptor_reduce
```python
from cloudpickle import _getset_descriptor_reduce
```



---
## _mappingproxy_reduce
```python
from cloudpickle import _mappingproxy_reduce
```



---
## _memoryview_reduce
```python
from cloudpickle import _memoryview_reduce
```



---
## _module_reduce
```python
from cloudpickle import _module_reduce
```



---
## _method_reduce
```python
from cloudpickle import _method_reduce
```



---
## _logger_reduce
```python
from cloudpickle import _logger_reduce
```



---
## _root_logger_reduce
```python
from cloudpickle import _root_logger_reduce
```



---
## _property_reduce
```python
from cloudpickle import _property_reduce
```



---
## _weakset_reduce
```python
from cloudpickle import _weakset_reduce
```



---
## _dynamic_class_reduce
```python
from cloudpickle import _dynamic_class_reduce
```

Save a class that can't be referenced as a module attribute.

This method is used to serialize classes that are defined inside
functions, or that otherwise can't be serialized as attribute lookups
from importable modules.

---
## _class_reduce
```python
from cloudpickle import _class_reduce
```

Select the reducer depending on the dynamic nature of the class obj.

---
## _dict_keys_reduce
```python
from cloudpickle import _dict_keys_reduce
```



---
## _dict_values_reduce
```python
from cloudpickle import _dict_values_reduce
```



---
## _dict_items_reduce
```python
from cloudpickle import _dict_items_reduce
```



---
## _odict_keys_reduce
```python
from cloudpickle import _odict_keys_reduce
```



---
## _odict_values_reduce
```python
from cloudpickle import _odict_values_reduce
```



---
## _odict_items_reduce
```python
from cloudpickle import _odict_items_reduce
```



---
## _dataclass_field_base_reduce
```python
from cloudpickle import _dataclass_field_base_reduce
```



---
## _function_setstate
```python
from cloudpickle import _function_setstate
```

Update the state of a dynamic function.

As __closure__ and __globals__ are readonly attributes of a function, we
cannot rely on the native setstate routine of pickle.load_build, that calls
setattr on items of the slotstate. Instead, we have to modify them inplace.

---
## _class_setstate
```python
from cloudpickle import _class_setstate
```



---
## _get_dataclass_field_type_sentinel
```python
from cloudpickle import _get_dataclass_field_type_sentinel
```



---
## Pickler
```python
from cloudpickle import Pickler
```



---
## dump
```python
from cloudpickle import dump
```

Write a serialized binary representation of an object to a stream.

Parameters
----------
obj : Any
    The python object that must be serialized and written.
stream : IO[bytes]
    The binary stream (file-like object) where the serialized object must be written to.
kwargs
    Any extra keyword arguments to pass to ``cloudpickle.dump``.

---
## dumps
```python
from cloudpickle import dumps
```

Serialize obj as a string of bytes allocated in memory

protocol defaults to cloudpickle.DEFAULT_PROTOCOL which is an alias to
pickle.HIGHEST_PROTOCOL. This setting favors maximum communication
speed between processes running the same Python version.

Set protocol=pickle.DEFAULT_PROTOCOL instead if you need to ensure
compatibility with older versions of Python (although this is not always
guaranteed to work because cloudpickle relies on some internal
implementation details that can change from one Python version to the
next).

---
## __reduce__
```python
from cloudpickle import __reduce__
```



---
## _dynamic_function_reduce
```python
from cloudpickle import _dynamic_function_reduce
```

Reduce a function that is not pickleable via attribute lookup.

---
## _function_reduce
```python
from cloudpickle import _function_reduce
```

Reducer for function objects.

If obj is a top-level attribute of a file-backed module, this reducer
returns NotImplemented, making the cloudpickle.Pickler fall back to
traditional pickle.Pickler routines to save obj. Otherwise, it reduces
obj using a custom cloudpickle reducer designed specifically to handle
dynamic functions.

---
## _function_getnewargs
```python
from cloudpickle import _function_getnewargs
```



---
## __init__
```python
from cloudpickle import __init__
```



---
## reducer_override
```python
from cloudpickle import reducer_override
```

Type-agnostic reducing callback for function and classes.

For performance reasons, subclasses of the C `pickle.Pickler` class
cannot register custom reducers for functions and classes in the
dispatch_table attribute. Reducers for such types must instead
implemented via the special `reducer_override` method.

Note that this method will be called for any object except a few
builtin-types (int, lists, dicts etc.), which differs from reducers
in the Pickler's dispatch_table, each of them being invoked for
objects of a specific type only.

This property comes in handy for classes: although most classes are
instances of the ``type`` metaclass, some of them can be instances
of other custom metaclasses (such as enum.EnumMeta for example). In
particular, the metaclass will likely not be known in advance, and
thus cannot be special-cased using an entry in the dispatch_table.
reducer_override, among other things, allows us to register a
reducer that will be called for any class, independently of its
type.

Notes:

* reducer_override has the priority over dispatch_table-registered
reducers.
* reducer_override can be used to fix other limitations of
  cloudpickle for other types that suffered from type-specific
  reducers, such as Exceptions. See
  https://github.com/cloudpipe/cloudpickle/issues/248

---
## _save_reduce_pickle5
```python
from cloudpickle import _save_reduce_pickle5
```



---
## save_global
```python
from cloudpickle import save_global
```

Main dispatch method.

The name of this method is somewhat misleading: all types get
dispatched here.

---
## save_function
```python
from cloudpickle import save_function
```

Registered with the dispatch to handle all function types.

Determines what kind of function obj is (e.g. lambda, defined at
interactive prompt, etc) and handles the pickling appropriately.

---
## save_pypy_builtin_func
```python
from cloudpickle import save_pypy_builtin_func
```

Save pypy equivalent of builtin functions.

PyPy does not have the concept of builtin-functions. Instead,
builtin-functions are simple function instances, but with a
builtin-code attribute.
Most of the time, builtin functions should be pickled by attribute.
But PyPy has flaky support for __qualname__, so some builtin
functions such as float.__new__ will be classified as dynamic. For
this reason only, we created this special routine. Because
builtin-functions are not expected to have closure or globals,
there is no additional hack (compared the one already implemented
in pickle) to protect ourselves from reference cycles. A simple
(reconstructor, newargs, obj.__dict__) tuple is save_reduced.  Note
also that PyPy improved their support for __qualname__ in v3.6, so
this routing should be removed when cloudpickle supports only PyPy
3.6 and later.

---
## __name__
```python
from cloudpickle_fast import __name__
```

Compatibility module.

It can be necessary to load files generated by previous versions of cloudpickle
that rely on symbols being defined under the `cloudpickle.cloudpickle_fast`
namespace.

See: tests/test_backward_compat.py

---
## __getattr__
```python
from cloudpickle_fast import __getattr__
```



---
## __name__
```python
from conftest import __name__
```



---
## m
```python
from conftest import m
```

Fixture providing a memory filesystem.

---
## ftp_writable
```python
from conftest import ftp_writable
```

Fixture providing a writable FTP filesystem.

---
## __name__
```python
from dircache import __name__
```



---
## DirCache
```python
from dircache import DirCache
```

Caching of directory listings, in a structure like::

    {"path0": [
        {"name": "path0/file0",
         "size": 123,
         "type": "file",
         ...
        },
        {"name": "path0/file1",
        },
        ...
        ],
     "path1": [...]
    }

Parameters to this class control listing expiry or indeed turn
caching off

---
## __init__
```python
from dircache import __init__
```

Parameters
----------
use_listings_cache: bool
    If False, this cache never returns items, but always reports KeyError,
    and setting items has no effect
listings_expiry_time: int or float (optional)
    Time in seconds that a listing is considered valid. If None,
    listings do not expire.
max_paths: int (optional)
    The number of most recent listings that are considered valid; 'recent'
    refers to when the entry was set.

---
## __getitem__
```python
from dircache import __getitem__
```



---
## clear
```python
from dircache import clear
```



---
## __len__
```python
from dircache import __len__
```



---
## __contains__
```python
from dircache import __contains__
```



---
## __setitem__
```python
from dircache import __setitem__
```



---
## __delitem__
```python
from dircache import __delitem__
```



---
## __iter__
```python
from dircache import __iter__
```



---
## __reduce__
```python
from dircache import __reduce__
```



---
## __name__
```python
from config import __name__
```

The config module holds package-wide configurables and provides
a uniform API for working with them.

Overview
========

This module supports the following requirements:
- options are referenced using keys in dot.notation, e.g. "x.y.option - z".
- keys are case-insensitive.
- functions should accept partial/regex keys, when unambiguous.
- options can be registered by modules at import time.
- options can be registered at init-time (via core.config_init)
- options have a default value, and (optionally) a description and
  validation function associated with them.
- options can be deprecated, in which case referencing them
  should produce a warning.
- deprecated options can optionally be rerouted to a replacement
  so that accessing a deprecated option reroutes to a differently
  named option.
- options can be reset to their default value.
- all option can be reset to their default value at once.
- all options in a certain sub - namespace can be reset at once.
- the user can set / get / reset or ask for the description of an option.
- a developer can register and mark an option as deprecated.
- you can register a callback to be invoked when the option value
  is set or reset. Changing the stored value is considered misuse, but
  is not verboten.

Implementation
==============

- Data is stored using nested dictionaries, and should be accessed
  through the provided API.

- "Registered options" and "Deprecated options" have metadata associated
  with them, which are stored in auxiliary dictionaries keyed on the
  fully-qualified key, e.g. "x.y.z.option".

- the config_init module is imported by the package's __init__.py file.
  placing any register_option() calls there will ensure those options
  are available as soon as pandas is loaded. If you use register_option
  in a module, it will only be available after that module is imported,
  which you should be aware of.

- `config_prefix` is a context_manager (for use with the `with` keyword)
  which can save developers some typing, see the docstring.

---
## set_conf_env
```python
from config import set_conf_env
```

Set config values from environment variables

Looks for variables of the form ``FSSPEC_<protocol>`` and
``FSSPEC_<protocol>_<kwarg>``. For ``FSSPEC_<protocol>`` the value is parsed
as a json dictionary and used to ``update`` the config of the
corresponding protocol. For ``FSSPEC_<protocol>_<kwarg>`` there is no
attempt to convert the string value, but the kwarg keys will be lower-cased.

The ``FSSPEC_<protocol>_<kwarg>`` variables are applied after the
``FSSPEC_<protocol>`` ones.

Parameters
----------
conf_dict : dict(str, dict)
    This dict will be mutated
envdict : dict-like(str, str)
    Source for the values - usually the real environment

---
## set_conf_files
```python
from config import set_conf_files
```

Set config values from files

Scans for INI and JSON files in the given dictionary, and uses their
contents to set the config. In case of repeated values, later values
win.

In the case of INI files, all values are strings, and these will not
be converted.

Parameters
----------
cdir : str
    Directory to search
conf_dict : dict(str, dict)
    This dict will be mutated

---
## apply_config
```python
from config import apply_config
```

Supply default values for kwargs when instantiating class

Augments the passed kwargs, by finding entries in the config dict
which match the classes ``.protocol`` attribute (one or more str)

Parameters
----------
cls : file system implementation
kwargs : dict
conf_dict : dict of dict
    Typically this is the global configuration

Returns
-------
dict : the modified set of kwargs

---
## __name__
```python
from parquet import __name__
```

parquet compat 

---
## open_parquet_file
```python
from parquet import open_parquet_file
```

Return a file-like object for a single Parquet file.

The specified parquet `engine` will be used to parse the
footer metadata, and determine the required byte ranges
from the file. The target path will then be opened with
the "parts" (`KnownPartsOfAFile`) caching strategy.

Note that this method is intended for usage with remote
file systems, and is unlikely to improve parquet-read
performance on local file systems.

Parameters
----------
path: str
    Target file path.
mode: str, optional
    Mode option to be passed through to `fs.open`. Default is "rb".
metadata: Any, optional
    Parquet metadata object. Object type must be supported
    by the backend parquet engine. For now, only the "fastparquet"
    engine supports an explicit `ParquetFile` metadata object.
    If a metadata object is supplied, the remote footer metadata
    will not need to be transferred into local memory.
fs: AbstractFileSystem, optional
    Filesystem object to use for opening the file. If nothing is
    specified, an `AbstractFileSystem` object will be inferred.
engine : str, default "auto"
    Parquet engine to use for metadata parsing. Allowed options
    include "fastparquet", "pyarrow", and "auto". The specified
    engine must be installed in the current environment. If
    "auto" is specified, and both engines are installed,
    "fastparquet" will take precedence over "pyarrow".
columns: list, optional
    List of all column names that may be read from the file.
row_groups : list, optional
    List of all row-groups that may be read from the file. This
    may be a list of row-group indices (integers), or it may be
    a list of `RowGroup` metadata objects (if the "fastparquet"
    engine is used).
storage_options : dict, optional
    Used to generate an `AbstractFileSystem` object if `fs` was
    not specified.
strict : bool, optional
    Whether the resulting `KnownPartsOfAFile` cache should
    fetch reads that go beyond a known byte-range boundary.
    If `False` (the default), any read that ends outside a
    known part will be zero padded. Note that using
    `strict=True` may be useful for debugging.
max_gap : int, optional
    Neighboring byte ranges will only be merged when their
    inter-range gap is <= `max_gap`. Default is 64KB.
max_block : int, optional
    Neighboring byte ranges will only be merged when the size of
    the aggregated range is <= `max_block`. Default is 256MB.
footer_sample_size : int, optional
    Number of bytes to read from the end of the path to look
    for the footer metadata. If the sampled bytes do not contain
    the footer, a second read request will be required, and
    performance will suffer. Default is 1MB.
**kwargs :
    Optional key-word arguments to pass to `fs.open`

---
## _get_parquet_byte_ranges
```python
from parquet import _get_parquet_byte_ranges
```

Get a dictionary of the known byte ranges needed
to read a specific column/row-group selection from a
Parquet dataset. Each value in the output dictionary
is intended for use as the `data` argument for the
`KnownPartsOfAFile` caching strategy of a single path.

---
## _get_parquet_byte_ranges_from_metadata
```python
from parquet import _get_parquet_byte_ranges_from_metadata
```

Simplified version of `_get_parquet_byte_ranges` for
the case that an engine-specific `metadata` object is
provided, and the remote footer metadata does not need to
be transferred before calculating the required byte ranges.

---
## _transfer_ranges
```python
from parquet import _transfer_ranges
```



---
## _add_header_magic
```python
from parquet import _add_header_magic
```



---
## _set_engine
```python
from parquet import _set_engine
```



---
## FastparquetEngine
```python
from parquet import FastparquetEngine
```



---
## PyarrowEngine
```python
from parquet import PyarrowEngine
```



---
## __init__
```python
from parquet import __init__
```



---
## _row_group_filename
```python
from parquet import _row_group_filename
```



---
## _parquet_byte_ranges
```python
from parquet import _parquet_byte_ranges
```



---
## __name__
```python
from registry import __name__
```



---
## register_implementation
```python
from registry import register_implementation
```

Add implementation class to the registry

Parameters
----------
name: str
    Protocol name to associate with the class
cls: class or str
    if a class: fsspec-compliant implementation class (normally inherits from
    ``fsspec.AbstractFileSystem``, gets added straight to the registry. If a
    str, the full path to an implementation class like package.module.class,
    which gets added to known_implementations,
    so the import is deferred until the filesystem is actually used.
clobber: bool (optional)
    Whether to overwrite a protocol with the same name; if False, will raise
    instead.
errtxt: str (optional)
    If given, then a failure to import the given class will result in this
    text being given.

---
## get_filesystem_class
```python
from registry import get_filesystem_class
```

Fetch named protocol implementation from the registry

The dict ``known_implementations`` maps protocol names to the locations
of classes implementing the corresponding file-system. When used for the
first time, appropriate imports will happen and the class will be placed in
the registry. All subsequent calls will fetch directly from the registry.

Some protocol implementations require additional dependencies, and so the
import may fail. In this case, the string in the "err" field of the
``known_implementations`` will be given as the error message.

---
## _import_class
```python
from registry import _import_class
```

Take a fully-qualified path and return the imported class or identifier.

``fqp`` is of the form "package.module.klass" or
"package.module:subobject.klass".

Warnings
--------
This can import arbitrary modules. Make sure you haven't installed any modules
that may execute malicious code at import time.

---
## filesystem
```python
from registry import filesystem
```

Instantiate filesystems for given protocol and arguments

``storage_options`` are specific to the protocol being chosen, and are
passed directly to the class.

---
## available_protocols
```python
from registry import available_protocols
```

Return a list of the implemented protocols.

Note that any given protocol may require extra packages to be importable.

---
## __name__
```python
from transaction import __name__
```



---
## Transaction
```python
from transaction import Transaction
```

Filesystem transaction write context

Gathers files for deferred commit or discard, so that several write
operations can be finalized semi-atomically. This works by having this
instance as the ``.transaction`` attribute of the given filesystem

---
## FileActor
```python
from transaction import FileActor
```



---
## DaskTransaction
```python
from transaction import DaskTransaction
```



---
## __init__
```python
from transaction import __init__
```

Parameters
----------
fs: FileSystem instance

---
## __enter__
```python
from transaction import __enter__
```



---
## __exit__
```python
from transaction import __exit__
```

End transaction and commit, if exit is not due to exception

---
## start
```python
from transaction import start
```

Start a transaction on this FileSystem

---
## complete
```python
from transaction import complete
```

Finish transaction: commit or discard all deferred files

---
## commit
```python
from transaction import commit
```



---
## discard
```python
from transaction import discard
```



---
## append
```python
from transaction import append
```



---
## __name__
```python
from compression import __name__
```



---
## noop_file
```python
from compression import noop_file
```



---
## register_compression
```python
from compression import register_compression
```

Register an "inferable" file compression type.

Registers transparent file compression type for use with fsspec.open.
Compression can be specified by name in open, or "infer"-ed for any files
ending with the given extensions.

Args:
    name: (str) The compression type name. Eg. "gzip".
    callback: A callable of form (infile, mode, **kwargs) -> file-like.
        Accepts an input file-like object, the target mode and kwargs.
        Returns a wrapped file-like object.
    extensions: (str, Iterable[str]) A file extension, or list of file
        extensions for which to infer this compression scheme. Eg. "gz".
    force: (bool) Force re-registration of compression type or extensions.

Raises:
    ValueError: If name or extensions already registered, and not force.

---
## unzip
```python
from compression import unzip
```



---
## SnappyFile
```python
from compression import SnappyFile
```



---
## available_compressions
```python
from compression import available_compressions
```

Return a list of the implemented compressions.

---
## isal
```python
from compression import isal
```



---
## __init__
```python
from compression import __init__
```

The compressed file system can be instantiated from any compressed file.
It reads the contents of compressed file as a filesystem with one file inside, as if it was an archive.

The single file inside the filesystem is named after the compresssed file,
without the compression extension at the end of the filename.

Args:
    fo (:obj:``str``): Path to compressed file. Will fetch file using ``fsspec.open()``
    mode (:obj:``str``): Currently, only 'rb' accepted
    target_protocol(:obj:``str``, optional): To override the FS protocol inferred from a URL.
    target_options (:obj:``dict``, optional): Kwargs passed when instantiating the target FS.

---
## _upload_chunk
```python
from compression import _upload_chunk
```



---
## seek
```python
from compression import seek
```



---
## seekable
```python
from compression import seekable
```



---
## _fetch_range
```python
from compression import _fetch_range
```

Get the specified set of bytes from remote

---
## zstandard_file
```python
from compression import zstandard_file
```



---
## __name__
```python
from generic import __name__
```

Define the SeriesGroupBy and DataFrameGroupBy
classes that hold the groupby interfaces (and some implementations).

These are user facing as the result of the ``df.groupby(...)`` operations,
which here returns a DataFrameGroupBy object.

---
## set_generic_fs
```python
from generic import set_generic_fs
```



---
## _resolve_fs
```python
from generic import _resolve_fs
```

Pick instance of backend FS

---
## rsync
```python
from generic import rsync
```

Sync files between two directory trees

See `func:rsync` for more details.

---
## GenericFileSystem
```python
from generic import GenericFileSystem
```

Wrapper over all other FS types

<experimental!>

This implementation is a single unified interface to be able to run FS operations
over generic URLs, and dispatch to the specific implementations using the URL
protocol prefix.

Note: instances of this FS are always async, even if you never use it with any async
backend.

---
## __init__
```python
from generic import __init__
```



---
## _parent
```python
from generic import _parent
```



---
## _strip_protocol
```python
from generic import _strip_protocol
```



---
## __name__
```python
from asyn import __name__
```



---
## get_lock
```python
from asyn import get_lock
```

Allocate or return a threading lock.

The lock is allocated on first use to allow setting one lock per forked process.

---
## reset_lock
```python
from asyn import reset_lock
```

Reset the global lock.

This should be called only on the init of a forked process to reset the lock to
None, enabling the new forked process to get a new lock.

---
## sync
```python
from asyn import sync
```

Make loop run coroutine until it returns. Runs in other thread

Examples
--------
>>> fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args,
                     timeout=timeout, **kwargs)

---
## sync_wrapper
```python
from asyn import sync_wrapper
```

Given a function, make so can be called in blocking contexts

Leave obj=None if defining within a class. Pass the instance if attaching
as an attribute of the instance.

---
## _selector_policy
```python
from asyn import _selector_policy
```



---
## get_loop
```python
from asyn import get_loop
```

Create or return the default fsspec IO loop

The loop will be running on a separate thread.

---
## _get_batch_size
```python
from asyn import _get_batch_size
```



---
## running_async
```python
from asyn import running_async
```

Being executed by an event loop?

---
## AsyncFileSystem
```python
from asyn import AsyncFileSystem
```

Async file operations, default implementations

Passes bulk operations to asyncio.gather for concurrent operation.

Implementations that have concurrent batch operations and/or async methods
should inherit from this class instead of AbstractFileSystem. Docstrings are
copied from the un-underscored method in AbstractFileSystem, if not given.

---
## mirror_sync_methods
```python
from asyn import mirror_sync_methods
```

Populate sync and async methods for obj

For each method will create a sync version if the name refers to an async method
(coroutine) and there is no override in the child class; will create an async
method for the corresponding sync method if there is no implementation.

Uses the methods specified in
- async_methods: the set that an implementation is expected to provide
- default_async_methods: that can be derived from their sync version in
  AbstractFileSystem
- AsyncFileSystem: async-specific default coroutines

---
## FSSpecCoroutineCancel
```python
from asyn import FSSpecCoroutineCancel
```



---
## _dump_running_tasks
```python
from asyn import _dump_running_tasks
```



---
## AbstractAsyncStreamedFile
```python
from asyn import AbstractAsyncStreamedFile
```



---
## wrapper
```python
from asyn import wrapper
```



---
## __init__
```python
from asyn import __init__
```



---
## loop
```python
from asyn import loop
```



---
## process_entries
```python
from __init__ import process_entries
```



---
## OpenFile
```python
from core import OpenFile
```

File-like object to be used in a context

Can layer (buffered) text-mode and compression over any file-system, which
are typically binary-only.

These instances are safe to serialize, as the low-level file object
is not created until invoked using ``with``.

Parameters
----------
fs: FileSystem
    The file system to use for opening the file. Should be a subclass or duck-type
    with ``fsspec.spec.AbstractFileSystem``
path: str
    Location to open
mode: str like 'rb', optional
    Mode of the opened file
compression: str or None, optional
    Compression to apply
encoding: str or None, optional
    The encoding to use if opened in text mode.
errors: str or None, optional
    How to handle encoding errors if opened in text mode.
newline: None or str
    Passed to TextIOWrapper in text mode, how to handle line endings.
autoopen: bool
    If True, calls open() immediately. Mostly used by pickle
pos: int
    If given and autoopen is True, seek to this location immediately

---
## OpenFiles
```python
from core import OpenFiles
```

List of OpenFile instances

Can be used in a single context, which opens and closes all of the
contained files. Normal list access to get the elements works as
normal.

A special case is made for caching filesystems - the files will
be down/uploaded together at the start or end of the context, and
this may happen concurrently, if the target filesystem supports it.

---
## open_files
```python
from core import open_files
```

Given a path or paths, return a list of ``OpenFile`` objects.

For writing, a str path must contain the "*" character, which will be filled
in by increasing numbers, e.g., "part*" ->  "part1", "part2" if num=2.

For either reading or writing, can instead provide explicit list of paths.

Parameters
----------
urlpath: string or list
    Absolute or relative filepath(s). Prefix with a protocol like ``s3://``
    to read from alternative filesystems. To read from multiple files you
    can pass a globstring or a list of paths, with the caveat that they
    must all have the same protocol.
mode: 'rb', 'wt', etc.
compression: string or None
    If given, open file using compression codec. Can either be a compression
    name (a key in ``fsspec.compression.compr``) or "infer" to guess the
    compression from the filename suffix.
encoding: str
    For text mode only
errors: None or str
    Passed to TextIOWrapper in text mode
name_function: function or None
    if opening a set of files for writing, those files do not yet exist,
    so we need to generate their names by formatting the urlpath for
    each sequence number
num: int [1]
    if writing mode, number of files we expect to create (passed to
    name+function)
protocol: str or None
    If given, overrides the protocol found in the URL.
newline: bytes or None
    Used for line terminator in text mode. If None, uses system default;
    if blank, uses no translation.
auto_mkdir: bool (True)
    If in write mode, this will ensure the target directory exists before
    writing, by calling ``fs.mkdirs(exist_ok=True)``.
expand: bool
**kwargs: dict
    Extra options that make sense to a particular storage connection, e.g.
    host, port, username, password, etc.

Examples
--------
>>> files = open_files('2015-*-*.csv')  # doctest: +SKIP
>>> files = open_files(
...     's3://bucket/2015-*-*.csv.gz', compression='gzip'
... )  # doctest: +SKIP

Returns
-------
An ``OpenFiles`` instance, which is a list of ``OpenFile`` objects that can
be used as a single context

Notes
-----
For a full list of the available protocols and the implementations that
they map across to see the latest online documentation:

- For implementations built into ``fsspec`` see
  https://filesystem-spec.readthedocs.io/en/latest/api.html#built-in-implementations
- For implementations in separate packages see
  https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations

---
## _un_chain
```python
from core import _un_chain
```



---
## url_to_fs
```python
from core import url_to_fs
```

Turn fully-qualified and potentially chained URL into filesystem instance

Parameters
----------
url : str
    The fsspec-compatible URL
**kwargs: dict
    Extra options that make sense to a particular storage connection, e.g.
    host, port, username, password, etc.

Returns
-------
filesystem : FileSystem
    The new filesystem discovered from ``url`` and created with
    ``**kwargs``.
urlpath : str
    The file-systems-specific URL for ``url``.

---
## open
```python
from core import open
```

Materialise this as a real open file without context

The OpenFile object should be explicitly closed to avoid enclosed file
instances persisting. You must, therefore, keep a reference to the OpenFile
during the life of the file-like it generates.

---
## open_local
```python
from core import open_local
```

Open file(s) which can be resolved to local

For files which either are local, or get downloaded upon open
(e.g., by file caching)

Parameters
----------
url: str or list(str)
mode: str
    Must be read mode
storage_options:
    passed on to FS for or used by open_files (e.g., compression)

---
## get_compression
```python
from core import get_compression
```



---
## split_protocol
```python
from core import split_protocol
```

Return protocol, path pair

---
## strip_protocol
```python
from core import strip_protocol
```

Return only path part of full URL, according to appropriate backend

---
## expand_paths_if_needed
```python
from core import expand_paths_if_needed
```

Expand paths if they have a ``*`` in them (write mode) or any of ``*?[]``
in them (read mode).

:param paths: list of paths
mode: str
    Mode in which to open files.
num: int
    If opening in writing mode, number of files we expect to create.
fs: filesystem object
name_function: callable
    If opening in writing mode, this callable is used to generate path
    names. Names are generated for each partition by
    ``urlpath.replace('*', name_function(partition_index))``.
:return: list of paths

---
## get_fs_token_paths
```python
from core import get_fs_token_paths
```

Filesystem, deterministic token, and paths from a urlpath and options.

Parameters
----------
urlpath: string or iterable
    Absolute or relative filepath, URL (may include protocols like
    ``s3://``), or globstring pointing to data.
mode: str, optional
    Mode in which to open files.
num: int, optional
    If opening in writing mode, number of files we expect to create.
name_function: callable, optional
    If opening in writing mode, this callable is used to generate path
    names. Names are generated for each partition by
    ``urlpath.replace('*', name_function(partition_index))``.
storage_options: dict, optional
    Additional keywords to pass to the filesystem class.
protocol: str or None
    To override the protocol specifier in the URL
expand: bool
    Expand string paths for writing, assuming the path is a directory

---
## _expand_paths
```python
from core import _expand_paths
```



---
## PickleableTextIOWrapper
```python
from core import PickleableTextIOWrapper
```

TextIOWrapper cannot be pickled. This solves it.

Requires that ``buffer`` be pickleable, which all instances of
AbstractBufferedFile are.

---
## __reduce__
```python
from core import __reduce__
```

Override of MaskedArray's __reduce__.
        

---
## full_name
```python
from core import full_name
```



---
## __name__
```python
from spec import __name__
```



---
## make_instance
```python
from spec import make_instance
```



---
## _Cached
```python
from spec import _Cached
```

Metaclass for caching file system instances.

Notes
-----
Instances are cached according to

* The values of the class attributes listed in `_extra_tokenize_attributes`
* The arguments passed to ``__init__``.

This creates an additional reference to the filesystem, which prevents the
filesystem from being garbage collected when all *user* references go away.
A call to the :meth:`AbstractFileSystem.clear_instance_cache` must *also*
be made for a filesystem instance to be garbage collected.

---
## AbstractFileSystem
```python
from spec import AbstractFileSystem
```

An abstract super-class for pythonic file-systems

Implementations are expected to be compatible with or, better, subclass
from here.

---
## AbstractBufferedFile
```python
from spec import AbstractBufferedFile
```

Convenient class to derive from to provide buffering

In the case that the backend does not provide a pythonic file-like object
already, this class contains much of the logic to build one. The only
methods that need to be overridden are ``_upload_chunk``,
``_initiate_upload`` and ``_fetch_range``.

---
## __init__
```python
from spec import __init__
```

Template for files with buffered reading and writing

Parameters
----------
fs: instance of FileSystem
path: str
    location in file-system
mode: str
    Normal file modes. Currently only 'wb', 'ab' or 'rb'. Some file
    systems may be read-only, and some may not support append.
block_size: int
    Buffer size for reading or writing, 'default' for class default
autocommit: bool
    Whether to write to final destination; may only impact what
    happens when file is being closed.
cache_type: {"readahead", "none", "mmap", "bytes"}, default "readahead"
    Caching policy in read mode. See the definitions in ``core``.
cache_options : dict
    Additional options passed to the constructor for the cache specified
    by `cache_type`.
size: int
    If given and in read mode, suppressed having to look up the file size
kwargs:
    Gets stored as self.kwargs

---
## __call__
```python
from spec import __call__
```



---
## fsid
```python
from spec import fsid
```

Persistent filesystem id that can be used to compare filesystems
across sessions.

---
## _fs_token
```python
from spec import _fs_token
```



---
## __dask_tokenize__
```python
from spec import __dask_tokenize__
```



---
## __hash__
```python
from spec import __hash__
```



---
## __eq__
```python
from spec import __eq__
```

Files are equal if they have the same checksum, only in read mode

---
## __reduce__
```python
from spec import __reduce__
```



---
## _strip_protocol
```python
from spec import _strip_protocol
```

Turn path from fully-qualified to file-system-specific

May require FS-specific handling, e.g., for relative paths or links.

---
## unstrip_protocol
```python
from spec import unstrip_protocol
```

Format FS-specific path to generic, including protocol

---
## _get_kwargs_from_urls
```python
from spec import _get_kwargs_from_urls
```

If kwargs can be encoded in the paths, extract them here

This should happen before instantiation of the class; incoming paths
then should be amended to strip the options in methods.

Examples may look like an sftp path "sftp://user@host:/my/path", where
the user and host should become kwargs and later get stripped.

---
## current
```python
from spec import current
```

Return the most recently instantiated FileSystem

If no instance has been created, then create one with defaults

---
## transaction
```python
from spec import transaction
```

A context within which files are committed together upon exit

Requires the file class to implement `.commit()` and `.discard()`
for the normal and exception cases.

---
## start_transaction
```python
from spec import start_transaction
```

Begin write transaction for deferring files, non-context version

---
## end_transaction
```python
from spec import end_transaction
```

Finish write transaction, non-context version

---
## invalidate_cache
```python
from spec import invalidate_cache
```

Discard any cached directory information

Parameters
----------
path: string or None
    If None, clear all listings cached else listings at or under given
    path.

---
## mkdir
```python
from spec import mkdir
```

Create directory entry at path

For systems that don't have true directories, may create an for
this instance only and not touch the real filesystem

Parameters
----------
path: str
    location
create_parents: bool
    if True, this is equivalent to ``makedirs``
kwargs:
    may be permissions, etc.

---
## makedirs
```python
from spec import makedirs
```

Recursively make directories

Creates directory at path and any intervening required directories.
Raises exception if, for instance, the path already exists but is a
file.

Parameters
----------
path: str
    leaf directory name
exist_ok: bool (False)
    If False, will error if the target already exists

---
## rmdir
```python
from spec import rmdir
```

Remove a directory, if empty

---
## ls
```python
from spec import ls
```

List objects at path.

This should include subdirectories and files at that location. The
difference between a file and a directory must be clear when details
are requested.

The specific keys, or perhaps a FileInfo class, or similar, is TBD,
but must be consistent across implementations.
Must include:

- full path to the entry (without protocol)
- size of the entry, in bytes. If the value cannot be determined, will
  be ``None``.
- type of entry, "file", "directory" or other

Additional information
may be present, appropriate to the file-system, e.g., generation,
checksum, etc.

May use refresh=True|False to allow use of self._ls_from_cache to
check for a saved listing and avoid calling the backend. This would be
common where listing may be expensive.

Parameters
----------
path: str
detail: bool
    if True, gives a list of dictionaries, where each is the same as
    the result of ``info(path)``. If False, gives a list of paths
    (str).
kwargs: may have additional backend-specific options, such as version
    information

Returns
-------
List of strings if detail is False, or list of directory information
dicts if detail is True.

---
## _ls_from_cache
```python
from spec import _ls_from_cache
```

Check cache for listing

Returns listing, if found (may be empty list for a directly that exists
but contains nothing), None if not in cache.

---
## walk
```python
from spec import walk
```

Return all files belows path

List all files, recursing into subdirectories; output is iterator-style,
like ``os.walk()``. For a simple list of files, ``find()`` is available.

When topdown is True, the caller can modify the dirnames list in-place (perhaps
using del or slice assignment), and walk() will
only recurse into the subdirectories whose names remain in dirnames;
this can be used to prune the search, impose a specific order of visiting,
or even to inform walk() about directories the caller creates or renames before
it resumes walk() again.
Modifying dirnames when topdown is False has no effect. (see os.walk)

Note that the "files" outputted will include anything that is not
a directory, such as links.

Parameters
----------
path: str
    Root to recurse into
maxdepth: int
    Maximum recursion depth. None means limitless, but not recommended
    on link-based file-systems.
topdown: bool (True)
    Whether to walk the directory tree from the top downwards or from
    the bottom upwards.
on_error: "omit", "raise", a collable
    if omit (default), path with exception will simply be empty;
    If raise, an underlying exception will be raised;
    if callable, it will be called with a single OSError instance as argument
kwargs: passed to ``ls``

---
## find
```python
from spec import find
```

List all files below path.

Like posix ``find`` command without conditions

Parameters
----------
path : str
maxdepth: int or None
    If not None, the maximum number of levels to descend
withdirs: bool
    Whether to include directory paths in the output. This is True
    when used by glob, but users usually only want files.
kwargs are passed to ``ls``.

---
## du
```python
from spec import du
```

Space used by files and optionally directories within a path

Directory size does not include the size of its contents.

Parameters
----------
path: str
total: bool
    Whether to sum all the file sizes
maxdepth: int or None
    Maximum number of directory levels to descend, None for unlimited.
withdirs: bool
    Whether to include directory paths in the output.
kwargs: passed to ``find``

Returns
-------
Dict of {path: size} if total=False, or int otherwise, where numbers
refer to bytes used.

---
## glob
```python
from spec import glob
```

Find files by glob-matching.

If the path ends with '/', only folders are returned.

We support ``"**"``,
``"?"`` and ``"[..]"``. We do not support ^ for pattern negation.

The `maxdepth` option is applied on the first `**` found in the path.

kwargs are passed to ``ls``.

---
## exists
```python
from spec import exists
```

Is there a file at the given path

---
## lexists
```python
from spec import lexists
```

If there is a file at the given path (including
broken links)

---
## info
```python
from spec import info
```

File information about this path

---
## checksum
```python
from spec import checksum
```

Unique value for current version of file

If the checksum is the same from one moment to another, the contents
are guaranteed to be the same. If the checksum changes, the contents
*might* have changed.

This should normally be overridden; default will probably capture
creation/modification timestamp (which would be good) or maybe
access timestamp (which would be bad)

---
## size
```python
from spec import size
```

Size in bytes of file

---
## sizes
```python
from spec import sizes
```

Size in bytes of each file in a list of paths

---
## isdir
```python
from spec import isdir
```

Is this entry directory-like?

---
## isfile
```python
from spec import isfile
```

Is this entry file-like?

---
## read_text
```python
from spec import read_text
```

Get the contents of the file as a string.

Parameters
----------
path: str
    URL of file on this filesystems
encoding, errors, newline: same as `open`.

---
## write_text
```python
from spec import write_text
```

Write the text to the given file.

An existing file will be overwritten.

Parameters
----------
path: str
    URL of file on this filesystems
value: str
    Text to write.
encoding, errors, newline: same as `open`.

---
## cat_file
```python
from spec import cat_file
```

Get the content of a file

Parameters
----------
path: URL of file on this filesystems
start, end: int
    Bytes limits of the read. If negative, backwards from end,
    like usual python slices. Either can be None for start or
    end of file, respectively
kwargs: passed to ``open()``.

---
## pipe_file
```python
from spec import pipe_file
```

Set the bytes of given file

---
## pipe
```python
from spec import pipe
```

Put value into path

(counterpart to ``cat``)

Parameters
----------
path: string or dict(str, bytes)
    If a string, a single remote location to put ``value`` bytes; if a dict,
    a mapping of {path: bytesvalue}.
value: bytes, optional
    If using a single path, these are the bytes to put there. Ignored if
    ``path`` is a dict

---
## cat_ranges
```python
from spec import cat_ranges
```

Get the contents of byte ranges from one or more files

Parameters
----------
paths: list
    A list of of filepaths on this filesystems
starts, ends: int or list
    Bytes limits of the read. If using a single int, the same value will be
    used to read all the specified files.

---
## cat
```python
from spec import cat
```

Fetch (potentially multiple) paths' contents

Parameters
----------
recursive: bool
    If True, assume the path(s) are directories, and get all the
    contained files
on_error : "raise", "omit", "return"
    If raise, an underlying exception will be raised (converted to KeyError
    if the type is in self.missing_exceptions); if omit, keys with exception
    will simply not be included in the output; if "return", all keys are
    included in the output, but the value will be bytes or an exception
    instance.
kwargs: passed to cat_file

Returns
-------
dict of {path: contents} if there are multiple paths
or the path has been otherwise expanded

---
## get_file
```python
from spec import get_file
```

Copy single remote file to local

---
## get
```python
from spec import get
```

Copy file(s) to local.

Copies a specific file or tree of files (if recursive=True). If lpath
ends with a "/", it will be assumed to be a directory, and target files
will go within. Can submit a list of paths, which may be glob-patterns
and will be expanded.

Calls get_file for each source.

---
## put_file
```python
from spec import put_file
```

Copy single file to remote

---
## put
```python
from spec import put
```

Copy file(s) from local.

Copies a specific file or tree of files (if recursive=True). If rpath
ends with a "/", it will be assumed to be a directory, and target files
will go within.

Calls put_file for each source.

---
## head
```python
from spec import head
```

Get the first ``size`` bytes from file

---
## tail
```python
from spec import tail
```

Get the last ``size`` bytes from file

---
## cp_file
```python
from spec import cp_file
```



---
## copy
```python
from spec import copy
```

Copy within two locations in the filesystem

on_error : "raise", "ignore"
    If raise, any not-found exceptions will be raised; if ignore any
    not-found exceptions will cause the path to be skipped; defaults to
    raise unless recursive is true, where the default is ignore

---
## expand_path
```python
from spec import expand_path
```

Turn one or more globs or directories into a list of all matching paths
to files or directories.

kwargs are passed to ``glob`` or ``find``, which may in turn call ``ls``

---
## mv
```python
from spec import mv
```

Move file(s) from one location to another

---
## rm_file
```python
from spec import rm_file
```

Delete a file

---
## _rm
```python
from spec import _rm
```

Delete one file

---
## rm
```python
from spec import rm
```

Delete files.

Parameters
----------
path: str or list of str
    File(s) to delete.
recursive: bool
    If file(s) are directories, recursively delete contents and then
    also remove the directory
maxdepth: int or None
    Depth to pass to walk for finding files to delete, if recursive.
    If None, there will be no limit and infinite recursion may be
    possible.

---
## _parent
```python
from spec import _parent
```



---
## _open
```python
from spec import _open
```

Return raw bytes-mode file-like from the file-system

---
## open
```python
from spec import open
```

Return a file-like object from the filesystem

The resultant instance must function correctly in a context ``with``
block.

Parameters
----------
path: str
    Target file
mode: str like 'rb', 'w'
    See builtin ``open()``
block_size: int
    Some indication of buffering - this is a value in bytes
cache_options : dict, optional
    Extra arguments to pass through to the cache.
compression: string or None
    If given, open file using compression codec. Can either be a compression
    name (a key in ``fsspec.compression.compr``) or "infer" to guess the
    compression from the filename suffix.
encoding, errors, newline: passed on to TextIOWrapper for text mode

---
## touch
```python
from spec import touch
```

Create empty file, or update timestamp

Parameters
----------
path: str
    file location
truncate: bool
    If True, always set file size to 0; if False, update timestamp and
    leave file unchanged, if backend allows this

---
## ukey
```python
from spec import ukey
```

Hash of file properties, to tell if it has changed

---
## read_block
```python
from spec import read_block
```

Read a block of bytes from

Starting at ``offset`` of the file, read ``length`` bytes.  If
``delimiter`` is set then we ensure that the read starts and stops at
delimiter boundaries that follow the locations ``offset`` and ``offset
+ length``.  If ``offset`` is zero then we start at zero.  The
bytestring returned WILL include the end delimiter string.

If offset+length is beyond the eof, reads to eof.

Parameters
----------
fn: string
    Path to filename
offset: int
    Byte offset to start read
length: int
    Number of bytes to read. If None, read to end.
delimiter: bytes (optional)
    Ensure reading starts and stops at delimiter bytestring

Examples
--------
>>> fs.read_block('data/file.csv', 0, 13)  # doctest: +SKIP
b'Alice, 100\nBo'
>>> fs.read_block('data/file.csv', 0, 13, delimiter=b'\n')  # doctest: +SKIP
b'Alice, 100\nBob, 200\n'

Use ``length=None`` to read to the end of the file.
>>> fs.read_block('data/file.csv', 0, None, delimiter=b'\n')  # doctest: +SKIP
b'Alice, 100\nBob, 200\nCharlie, 300'

See Also
--------
:func:`fsspec.utils.read_block`

---
## to_json
```python
from spec import to_json
```

JSON representation of this filesystem instance.

Parameters
----------
include_password: bool, default True
    Whether to include the password (if any) in the output.

Returns
-------
JSON string with keys ``cls`` (the python location of this class),
protocol (text name of this class's protocol, first one in case of
multiple), ``args`` (positional args, usually empty), and all other
keyword arguments as their own keys.

Warnings
--------
Serialized filesystems may contain sensitive information which have been
passed to the constructor, such as passwords and tokens. Make sure you
store and send them in a secure environment!

---
## from_json
```python
from spec import from_json
```

Recreate a filesystem instance from JSON representation.

See ``.to_json()`` for the expected structure of the input.

Parameters
----------
blob: str

Returns
-------
file system instance, not necessarily of this particular class.

Warnings
--------
This can import arbitrary modules (as determined by the ``cls`` key).
Make sure you haven't installed any modules that may execute malicious code
at import time.

---
## to_dict
```python
from spec import to_dict
```

JSON-serializable dictionary representation of this filesystem instance.

Parameters
----------
include_password: bool, default True
    Whether to include the password (if any) in the output.

Returns
-------
Dictionary with keys ``cls`` (the python location of this class),
protocol (text name of this class's protocol, first one in case of
multiple), ``args`` (positional args, usually empty), and all other
keyword arguments as their own keys.

Warnings
--------
Serialized filesystems may contain sensitive information which have been
passed to the constructor, such as passwords and tokens. Make sure you
store and send them in a secure environment!

---
## from_dict
```python
from spec import from_dict
```

Recreate a filesystem instance from dictionary representation.

See ``.to_dict()`` for the expected structure of the input.

Parameters
----------
dct: Dict[str, Any]

Returns
-------
file system instance, not necessarily of this particular class.

Warnings
--------
This can import arbitrary modules (as determined by the ``cls`` key).
Make sure you haven't installed any modules that may execute malicious code
at import time.

---
## _get_pyarrow_filesystem
```python
from spec import _get_pyarrow_filesystem
```

Make a version of the FS instance which will be acceptable to pyarrow

---
## get_mapper
```python
from spec import get_mapper
```

Create key/value store based on this file-system

Makes a MutableMapping interface to the FS at the given root path.
See ``fsspec.mapping.FSMap`` for further details.

---
## clear_instance_cache
```python
from spec import clear_instance_cache
```

Clear the cache of filesystem instances.

Notes
-----
Unless overridden by setting the ``cachable`` class attribute to False,
the filesystem class stores a reference to newly created instances. This
prevents Python's normal rules around garbage collection from working,
since the instances refcount will not drop to zero until
``clear_instance_cache`` is called.

---
## created
```python
from spec import created
```

Return the created timestamp of a file as a datetime.datetime

---
## modified
```python
from spec import modified
```

Return the modified timestamp of a file as a datetime.datetime

---
## read_bytes
```python
from spec import read_bytes
```

Alias of `AbstractFileSystem.cat_file`.

---
## write_bytes
```python
from spec import write_bytes
```

Alias of `AbstractFileSystem.pipe_file`.

---
## makedir
```python
from spec import makedir
```

Alias of `AbstractFileSystem.mkdir`.

---
## mkdirs
```python
from spec import mkdirs
```

Alias of `AbstractFileSystem.makedirs`.

---
## listdir
```python
from spec import listdir
```

Alias of `AbstractFileSystem.ls`.

---
## cp
```python
from spec import cp
```

Alias of `AbstractFileSystem.copy`.

---
## move
```python
from spec import move
```

Alias of `AbstractFileSystem.mv`.

---
## stat
```python
from spec import stat
```

Alias of `AbstractFileSystem.info`.

---
## disk_usage
```python
from spec import disk_usage
```

Alias of `AbstractFileSystem.du`.

---
## rename
```python
from spec import rename
```

Alias of `AbstractFileSystem.mv`.

---
## delete
```python
from spec import delete
```

Alias of `AbstractFileSystem.rm`.

---
## upload
```python
from spec import upload
```

Alias of `AbstractFileSystem.put`.

---
## download
```python
from spec import download
```

Alias of `AbstractFileSystem.get`.

---
## sign
```python
from spec import sign
```

Create a signed URL representing the given path

Some implementations allow temporary URLs to be generated, as a
way of delegating credentials.

Parameters
----------
path : str
     The path on the filesystem
expiration : int
    Number of seconds to enable the URL for (if supported)

Returns
-------
URL : str
    The signed URL

Raises
------
NotImplementedError : if method is not implemented for a filesystem

---
## _isfilestore
```python
from spec import _isfilestore
```



---
## details
```python
from spec import details
```



---
## full_name
```python
from spec import full_name
```



---
## closed
```python
from spec import closed
```



---
## commit
```python
from spec import commit
```

Move from temp to final destination

---
## discard
```python
from spec import discard
```

Throw away temporary file

---
## tell
```python
from spec import tell
```

Current file location

---
## seek
```python
from spec import seek
```

Set current file location

Parameters
----------
loc: int
    byte location
whence: {0, 1, 2}
    from start of file, current location or end of file, resp.

---
## write
```python
from spec import write
```

Write data to buffer.

Buffer only sent on flush() or if buffer is greater than
or equal to blocksize.

Parameters
----------
data: bytes
    Set of bytes to be written.

---
## flush
```python
from spec import flush
```

Write buffered data to backend store.

Writes the current buffer, if it is larger than the block-size, or if
the file is being closed.

Parameters
----------
force: bool
    When closing, write the last block even if it is smaller than
    blocks are allowed to be. Disallows further writing to this file.

---
## _upload_chunk
```python
from spec import _upload_chunk
```

Write one part of a multi-block file upload

Parameters
==========
final: bool
    This is the last block, so should complete file, if
    self.autocommit is True.

---
## _initiate_upload
```python
from spec import _initiate_upload
```

Create remote file/upload

---
## _fetch_range
```python
from spec import _fetch_range
```

Get the specified set of bytes from remote

---
## read
```python
from spec import read
```

Return data from cache, or fetch pieces as necessary

Parameters
----------
length: int (-1)
    Number of bytes to read; if <0, all remaining bytes.

---
## readinto
```python
from spec import readinto
```

mirrors builtin file's readinto method

https://docs.python.org/3/library/io.html#io.RawIOBase.readinto

---
## readuntil
```python
from spec import readuntil
```

Return data between current position and first occurrence of char

char is included in the output, except if the end of the tile is
encountered first.

Parameters
----------
char: bytes
    Thing to find
blocks: None or int
    How much to read in each go. Defaults to file blocksize - which may
    mean a new read on every call.

---
## readline
```python
from spec import readline
```

Read until first occurrence of newline character

Note that, because of character encoding, this is not necessarily a
true line ending.

---
## __next__
```python
from spec import __next__
```



---
## __iter__
```python
from spec import __iter__
```



---
## readlines
```python
from spec import readlines
```

Return all data, split by the newline character

---
## readinto1
```python
from spec import readinto1
```



---
## close
```python
from spec import close
```

Close file

Finalizes writes, discards cache

---
## readable
```python
from spec import readable
```

Whether opened for reading

---
## seekable
```python
from spec import seekable
```

Whether is seekable (only in read mode)

---
## writable
```python
from spec import writable
```

Whether opened for writing

---
## __del__
```python
from spec import __del__
```



---
## __str__
```python
from spec import __str__
```



---
## __enter__
```python
from spec import __enter__
```



---
## __exit__
```python
from spec import __exit__
```



---
## __name__
```python
from caching import __name__
```



---
## BaseCache
```python
from caching import BaseCache
```

Pass-though cache: doesn't keep anything, calls every time

Acts as base class for other cachers

Parameters
----------
blocksize: int
    How far to read ahead in numbers of bytes
fetcher: func
    Function of the form f(start, end) which gets bytes from remote as
    specified
size: int
    How big this file is

---
## MMapCache
```python
from caching import MMapCache
```

memory-mapped sparse file cache

Opens temporary file, which is filled blocks-wise when data is requested.
Ensure there is enough disc space in the temporary location.

This cache method might only work on posix

---
## ReadAheadCache
```python
from caching import ReadAheadCache
```

Cache which reads only when we get beyond a block of data

This is a much simpler version of BytesCache, and does not attempt to
fill holes in the cache or keep fragments alive. It is best suited to
many small reads in a sequential order (e.g., reading lines from a file).

---
## FirstChunkCache
```python
from caching import FirstChunkCache
```

Caches the first block of a file only

This may be useful for file types where the metadata is stored in the header,
but is randomly accessed.

---
## BlockCache
```python
from caching import BlockCache
```

Cache holding memory as a set of blocks.

Requests are only ever made ``blocksize`` at a time, and are
stored in an LRU cache. The least recently accessed block is
discarded when more than ``maxblocks`` are stored.

Parameters
----------
blocksize : int
    The number of bytes to store in each block.
    Requests are only ever made for ``blocksize``, so this
    should balance the overhead of making a request against
    the granularity of the blocks.
fetcher : Callable
size : int
    The total size of the file being cached.
maxblocks : int
    The maximum number of blocks to cache for. The maximum memory
    use for this cache is then ``blocksize * maxblocks``.

---
## BytesCache
```python
from caching import BytesCache
```

Cache which holds data in a in-memory bytes object

Implements read-ahead by the block size, for semi-random reads progressing
through the file.

Parameters
----------
trim: bool
    As we read more data, whether to discard the start of the buffer when
    we are more than a blocksize ahead of it.

---
## AllBytes
```python
from caching import AllBytes
```

Cache entire contents of the file

---
## KnownPartsOfAFile
```python
from caching import KnownPartsOfAFile
```

Cache holding known file parts.

Parameters
----------
blocksize: int
    How far to read ahead in numbers of bytes
fetcher: func
    Function of the form f(start, end) which gets bytes from remote as
    specified
size: int
    How big this file is
data: dict
    A dictionary mapping explicit `(start, stop)` file-offset tuples
    with known bytes.
strict: bool, default True
    Whether to fetch reads that go beyond a known byte-range boundary.
    If `False`, any read that ends outside a known part will be zero
    padded. Note that zero padding will not be used for reads that
    begin outside a known byte-range.

---
## UpdatableLRU
```python
from caching import UpdatableLRU
```

Custom implementation of LRU cache that allows updating keys

Used by BackgroudBlockCache

---
## BackgroundBlockCache
```python
from caching import BackgroundBlockCache
```

Cache holding memory as a set of blocks with pre-loading of
the next block in the background.

Requests are only ever made ``blocksize`` at a time, and are
stored in an LRU cache. The least recently accessed block is
discarded when more than ``maxblocks`` are stored. If the
next block is not in cache, it is loaded in a separate thread
in non-blocking way.

Parameters
----------
blocksize : int
    The number of bytes to store in each block.
    Requests are only ever made for ``blocksize``, so this
    should balance the overhead of making a request against
    the granularity of the blocks.
fetcher : Callable
size : int
    The total size of the file being cached.
maxblocks : int
    The maximum number of blocks to cache for. The maximum memory
    use for this cache is then ``blocksize * maxblocks``.

---
## register_cache
```python
from caching import register_cache
```

'Register' cache implementation.

Parameters
----------
clobber: bool, optional
    If set to True (default is False) - allow to overwrite existing
    entry.

Raises
------
ValueError

---
## __init__
```python
from caching import __init__
```



---
## _fetch
```python
from caching import _fetch
```



---
## _reset_stats
```python
from caching import _reset_stats
```

Reset hit and miss counts for a more ganular report e.g. by file.

---
## _log_stats
```python
from caching import _log_stats
```

Return a formatted string of the cache statistics.

---
## __repr__
```python
from caching import __repr__
```



---
## _makefile
```python
from caching import _makefile
```



---
## __getstate__
```python
from caching import __getstate__
```



---
## __setstate__
```python
from caching import __setstate__
```



---
## cache_info
```python
from caching import cache_info
```

The statistics on the block cache.

Returns
-------
NamedTuple
    Returned directly from the LRU Cache used internally.

---
## _fetch_block
```python
from caching import _fetch_block
```

Fetch the block of data for `block_number`.

---
## _read_cache
```python
from caching import _read_cache
```

Read from our block cache.

Parameters
----------
start, end : int
    The start and end byte positions.
start_block_number, end_block_number : int
    The start and end block numbers.

---
## __len__
```python
from caching import __len__
```



---
## CacheInfo
```python
from caching import CacheInfo
```



---
## __call__
```python
from caching import __call__
```



---
## is_key_cached
```python
from caching import is_key_cached
```



---
## add_key
```python
from caching import add_key
```



---
## infer_storage_options
```python
from utils import infer_storage_options
```

Infer storage options from URL path and merge it with existing storage
options.

Parameters
----------
urlpath: str or unicode
    Either local absolute file path or URL (hdfs://namenode:8020/file.csv)
inherit_storage_options: dict (optional)
    Its contents will get merged with the inferred information from the
    given path

Returns
-------
Storage options dict.

Examples
--------
>>> infer_storage_options('/mnt/datasets/test.csv')  # doctest: +SKIP
{"protocol": "file", "path", "/mnt/datasets/test.csv"}
>>> infer_storage_options(
...     'hdfs://username:pwd@node:123/mnt/datasets/test.csv?q=1',
...     inherit_storage_options={'extra': 'value'},
... )  # doctest: +SKIP
{"protocol": "hdfs", "username": "username", "password": "pwd",
"host": "node", "port": 123, "path": "/mnt/datasets/test.csv",
"url_query": "q=1", "extra": "value"}

---
## update_storage_options
```python
from utils import update_storage_options
```



---
## infer_compression
```python
from utils import infer_compression
```

Infer compression, if available, from filename.

Infer a named compression type, if registered and available, from filename
extension. This includes builtin (gz, bz2, zip) compressions, as well as
optional compressions. See fsspec.compression.register_compression.

---
## build_name_function
```python
from utils import build_name_function
```

Returns a function that receives a single integer
and returns it as a string padded by enough zero characters
to align with maximum possible integer

>>> name_f = build_name_function(57)

>>> name_f(7)
'07'
>>> name_f(31)
'31'
>>> build_name_function(1000)(42)
'0042'
>>> build_name_function(999)(42)
'042'
>>> build_name_function(0)(0)
'0'

---
## seek_delimiter
```python
from utils import seek_delimiter
```

Seek current file to file start, file end, or byte after delimiter seq.

Seeks file to next chunk delimiter, where chunks are defined on file start,
a delimiting sequence, and file end. Use file.tell() to see location afterwards.
Note that file start is a valid split, so must be at offset > 0 to seek for
delimiter.

Parameters
----------
file: a file
delimiter: bytes
    a delimiter like ``b'\n'`` or message sentinel, matching file .read() type
blocksize: int
    Number of bytes to read from the file at once.


Returns
-------
Returns True if a delimiter was found, False if at file start or end.

---
## read_block
```python
from utils import read_block
```

Read a block of bytes from a file

Parameters
----------
f: File
    Open file
offset: int
    Byte offset to start read
length: int
    Number of bytes to read, read through end of file if None
delimiter: bytes (optional)
    Ensure reading starts and stops at delimiter bytestring
split_before: bool (optional)
    Start/stop read *before* delimiter bytestring.


If using the ``delimiter=`` keyword argument we ensure that the read
starts and stops at delimiter boundaries that follow the locations
``offset`` and ``offset + length``.  If ``offset`` is zero then we
start at zero, regardless of delimiter.  The bytestring returned WILL
include the terminating delimiter string.

Examples
--------

>>> from io import BytesIO  # doctest: +SKIP
>>> f = BytesIO(b'Alice, 100\nBob, 200\nCharlie, 300')  # doctest: +SKIP
>>> read_block(f, 0, 13)  # doctest: +SKIP
b'Alice, 100\nBo'

>>> read_block(f, 0, 13, delimiter=b'\n')  # doctest: +SKIP
b'Alice, 100\nBob, 200\n'

>>> read_block(f, 10, 10, delimiter=b'\n')  # doctest: +SKIP
b'Bob, 200\nCharlie, 300'

---
## tokenize
```python
from utils import tokenize
```

Deterministic token

(modified from dask.base)

>>> tokenize([1, 2, '3'])
'9d71491b50023b06fc76928e6eddb952'

>>> tokenize('Hello') == tokenize('Hello')
True

---
## stringify_path
```python
from utils import stringify_path
```

Attempt to convert a path-like object to a string.

Parameters
----------
filepath: object to be converted

Returns
-------
filepath_str: maybe a string version of the object

Notes
-----
Objects supporting the fspath protocol are coerced according to its
__fspath__ method.

For backwards compatibility with older Python version, pathlib.Path
objects are specially coerced.

Any other object is passed through unchanged, which includes bytes,
strings, buffers, or anything else that's not even path-like.

---
## make_instance
```python
from utils import make_instance
```



---
## common_prefix
```python
from utils import common_prefix
```

For a list of paths, find the shortest prefix common to all

---
## other_paths
```python
from utils import other_paths
```

In bulk file operations, construct a new file tree from a list of files

Parameters
----------
paths: list of str
    The input file tree
path2: str or list of str
    Root to construct the new list in. If this is already a list of str, we just
    assert it has the right number of elements.
exists: bool (optional)
    For a str destination, it is already exists (and is a dir), files should
    end up inside.
flatten: bool (optional)
    Whether to flatten the input directory tree structure so that the output files
    are in the same directory.

Returns
-------
list of str

---
## is_exception
```python
from utils import is_exception
```



---
## isfilelike
```python
from utils import isfilelike
```



---
## get_protocol
```python
from utils import get_protocol
```



---
## can_be_local
```python
from utils import can_be_local
```

Can the given URL be used with open_local?

---
## get_package_version_without_import
```python
from utils import get_package_version_without_import
```

For given package name, try to find the version without importing it

Import and package.__version__ is still the backup here, so an import
*might* happen.

Returns either the version string, or None if the package
or the version was not readily  found.

---
## setup_logging
```python
from utils import setup_logging
```



---
## _unstrip_protocol
```python
from utils import _unstrip_protocol
```



---
## mirror_from
```python
from utils import mirror_from
```

Mirror attributes and methods from the given
origin_name attribute of the instance to the
decorated class

---
## nullcontext
```python
from utils import nullcontext
```



---
## merge_offset_ranges
```python
from utils import merge_offset_ranges
```

Merge adjacent byte-offset ranges when the inter-range
gap is <= `max_gap`, and when the merged byte range does not
exceed `max_block` (if specified). By default, this function
will re-order the input paths and byte ranges to ensure sorted
order. If the user can guarantee that the inputs are already
sorted, passing `sort=False` will skip the re-ordering.

---
## file_size
```python
from utils import file_size
```

Find length of any open read-mode file-like

---
## atomic_write
```python
from utils import atomic_write
```

A context manager that opens a temporary file next to `path` and, on exit,
replaces `path` with the temporary file, thereby updating `path`
atomically.

---
## _translate
```python
from utils import _translate
```



---
## glob_translate
```python
from utils import glob_translate
```

Translate a pathname with shell wildcards to a regular expression.

---
## name_function
```python
from utils import name_function
```



---
## origin_getter
```python
from utils import origin_getter
```



---
## wrapper
```python
from utils import wrapper
```



---
## __name__
```python
from callbacks import __name__
```



---
## Callback
```python
from callbacks import Callback
```

Base class and interface for callback mechanism

This class can be used directly for monitoring file transfers by
providing ``callback=Callback(hooks=...)`` (see the ``hooks`` argument,
below), or subclassed for more specialised behaviour.

Parameters
----------
size: int (optional)
    Nominal quantity for the value that corresponds to a complete
    transfer, e.g., total number of tiles or total number of
    bytes
value: int (0)
    Starting internal counter value
hooks: dict or None
    A dict of named functions to be called on each update. The signature
    of these must be ``f(size, value, **kwargs)``

---
## NoOpCallback
```python
from callbacks import NoOpCallback
```

This implementation of Callback does exactly nothing

---
## DotPrinterCallback
```python
from callbacks import DotPrinterCallback
```

Simple example Callback implementation

Almost identical to Callback with a hook that prints a char; here we
demonstrate how the outer layer may print "#" and the inner layer "."

---
## TqdmCallback
```python
from callbacks import TqdmCallback
```

A callback to display a progress bar using tqdm

Parameters
----------
tqdm_kwargs : dict, (optional)
    Any argument accepted by the tqdm constructor.
    See the `tqdm doc <https://tqdm.github.io/docs/tqdm/#__init__>`_.
    Will be forwarded to `tqdm_cls`.
tqdm_cls: (optional)
    subclass of `tqdm.tqdm`. If not passed, it will default to `tqdm.tqdm`.

Examples
--------
>>> import fsspec
>>> from fsspec.callbacks import TqdmCallback
>>> fs = fsspec.filesystem("memory")
>>> path2distant_data = "/your-path"
>>> fs.upload(
        ".",
        path2distant_data,
        recursive=True,
        callback=TqdmCallback(),
    )

You can forward args to tqdm using the ``tqdm_kwargs`` parameter.

>>> fs.upload(
        ".",
        path2distant_data,
        recursive=True,
        callback=TqdmCallback(tqdm_kwargs={"desc": "Your tqdm description"}),
    )

You can also customize the progress bar by passing a subclass of `tqdm`.

.. code-block:: python

    class TqdmFormat(tqdm):
        '''Provides a `total_time` format parameter'''
        @property
        def format_dict(self):
            d = super().format_dict
            total_time = d["elapsed"] * (d["total"] or 0) / max(d["n"], 1)
            d.update(total_time=self.format_interval(total_time) + " in total")
            return d

>>> with TqdmCallback(
        tqdm_kwargs={
            "desc": "desc",
            "bar_format": "{total_time}: {percentage:.0f}%|{bar}{r_bar}",
        },
        tqdm_cls=TqdmFormat,
    ) as callback:
        fs.upload(".", path2distant_data, recursive=True, callback=callback)

---
## __init__
```python
from callbacks import __init__
```



---
## __enter__
```python
from callbacks import __enter__
```



---
## __exit__
```python
from callbacks import __exit__
```



---
## close
```python
from callbacks import close
```



---
## branched
```python
from callbacks import branched
```

Return callback for child transfers

If this callback is operating at a higher level, e.g., put, which may
trigger transfers that can also be monitored. The function returns a callback
that has to be passed to the child method, e.g., put_file,
as `callback=` argument.

The implementation uses `callback.branch` for compatibility.
When implementing callbacks, it is recommended to override this function instead
of `branch` and avoid calling `super().branched(...)`.

Prefer using this function over `branch`.

Parameters
----------
path_1: str
    Child's source path
path_2: str
    Child's destination path
**kwargs:
    Arbitrary keyword arguments

Returns
-------
callback: Callback
    A callback instance to be passed to the child method

---
## branch_coro
```python
from callbacks import branch_coro
```

Wraps a coroutine, and pass a new child callback to it.

---
## set_size
```python
from callbacks import set_size
```

Set the internal maximum size attribute

Usually called if not initially set at instantiation. Note that this
triggers a ``call()``.

Parameters
----------
size: int

---
## absolute_update
```python
from callbacks import absolute_update
```

Set the internal value state

Triggers ``call()``

Parameters
----------
value: int

---
## relative_update
```python
from callbacks import relative_update
```

Delta increment the internal counter

Triggers ``call()``

Parameters
----------
inc: int

---
## call
```python
from callbacks import call
```



---
## wrap
```python
from callbacks import wrap
```

Wrap an iterable to call ``relative_update`` on each iterations

Parameters
----------
iterable: Iterable
    The iterable that is being wrapped

---
## branch
```python
from callbacks import branch
```

Mutate kwargs to add new instance with different print char

---
## no_op
```python
from callbacks import no_op
```



---
## __getattr__
```python
from callbacks import __getattr__
```

If undefined methods are called on this class, nothing happens

---
## as_callback
```python
from callbacks import as_callback
```

Transform callback=... into Callback instance

For the special value of ``None``, return the global instance of
``NoOpCallback``. This is an alternative to including
``callback=DEFAULT_CALLBACK`` directly in a method signature.

---
## __del__
```python
from callbacks import __del__
```



---
## __name__
```python
from archive import __name__
```



---
## AbstractArchiveFileSystem
```python
from archive import AbstractArchiveFileSystem
```

A generic superclass for implementing Archive-based filesystems.

Currently, it is shared amongst
:class:`~fsspec.implementations.zip.ZipFileSystem`,
:class:`~fsspec.implementations.libarchive.LibArchiveFileSystem` and
:class:`~fsspec.implementations.tar.TarFileSystem`.

---
## __str__
```python
from archive import __str__
```



---
## ukey
```python
from archive import ukey
```



---
## _all_dirnames
```python
from archive import _all_dirnames
```

Returns *all* directory names for each path in paths, including intermediate
ones.

Parameters
----------
paths: Iterable of path strings

---
## info
```python
from archive import info
```



---
## ls
```python
from archive import ls
```



---
## BlocksizeMismatchError
```python
from exceptions import BlocksizeMismatchError
```

Raised when a cached file is opened with a different blocksize than it was
written with

---
## FSTimeoutError
```python
from exceptions import FSTimeoutError
```

Raised when a fsspec function timed out occurs

---
## __name__
```python
from mapping import __name__
```



---
## FSMap
```python
from mapping import FSMap
```

Wrap a FileSystem instance as a mutable wrapping.

The keys of the mapping become files under the given root, and the
values (which must be bytes) the contents of those files.

Parameters
----------
root: string
    prefix for all the files
fs: FileSystem instance
check: bool (=True)
    performs a touch at the location, to check for write access.

Examples
--------
>>> fs = FileSystem(**parameters)  # doctest: +SKIP
>>> d = FSMap('my-data/path/', fs)  # doctest: +SKIP
or, more likely
>>> d = fs.get_mapper('my-data/path/')

>>> d['loc1'] = b'Hello World'  # doctest: +SKIP
>>> list(d.keys())  # doctest: +SKIP
['loc1']
>>> d['loc1']  # doctest: +SKIP
b'Hello World'

---
## maybe_convert
```python
from mapping import maybe_convert
```



---
## get_mapper
```python
from mapping import get_mapper
```

Create key-value interface for given URL and options

The URL will be of the form "protocol://location" and point to the root
of the mapper required. All keys will be file-names below this location,
and their values the contents of each key.

Also accepts compound URLs like zip::s3://bucket/file.zip , see ``fsspec.open``.

Parameters
----------
url: str
    Root URL of mapping
check: bool
    Whether to attempt to read from the location before instantiation, to
    check that the mapping does exist
create: bool
    Whether to make the directory corresponding to the root before
    instantiating
missing_exceptions: None or tuple
    If given, these exception types will be regarded as missing keys and
    return KeyError when trying to read data. By default, you get
    (FileNotFoundError, IsADirectoryError, NotADirectoryError)
alternate_root: None or str
    In cases of complex URLs, the parser may fail to pick the correct part
    for the mapper root, so this arg can override

Returns
-------
``FSMap`` instance, the dict-like key-value store.

---
## __init__
```python
from mapping import __init__
```



---
## dirfs
```python
from mapping import dirfs
```

dirfs instance that can be used with the same keys as the mapper

---
## clear
```python
from mapping import clear
```

Remove all keys below root - empties out mapping

---
## getitems
```python
from mapping import getitems
```

Fetch multiple items from the store

If the backend is async-able, this might proceed concurrently

Parameters
----------
keys: list(str)
    They keys to be fetched
on_error : "raise", "omit", "return"
    If raise, an underlying exception will be raised (converted to KeyError
    if the type is in self.missing_exceptions); if omit, keys with exception
    will simply not be included in the output; if "return", all keys are
    included in the output, but the value will be bytes or an exception
    instance.

Returns
-------
dict(key, bytes|exception)

---
## setitems
```python
from mapping import setitems
```

Set the values of multiple items in the store

Parameters
----------
values_dict: dict(str, bytes)

---
## delitems
```python
from mapping import delitems
```

Remove multiple keys from the store

---
## _key_to_str
```python
from mapping import _key_to_str
```

Generate full path for the key

---
## _str_to_key
```python
from mapping import _str_to_key
```

Strip path of to leave key name

---
## __getitem__
```python
from mapping import __getitem__
```

Retrieve data

---
## pop
```python
from mapping import pop
```

Pop data

---
## __setitem__
```python
from mapping import __setitem__
```

Store value in key

---
## __iter__
```python
from mapping import __iter__
```



---
## __len__
```python
from mapping import __len__
```



---
## __delitem__
```python
from mapping import __delitem__
```

Remove key

---
## __contains__
```python
from mapping import __contains__
```

Does key exist in mapping?

---
## __reduce__
```python
from mapping import __reduce__
```



---
## __name__
```python
from fuse import __name__
```



---
## FUSEr
```python
from fuse import FUSEr
```



---
## run
```python
from fuse import run
```

Mount stuff in a local directory

This uses fusepy to make it appear as if a given path on an fsspec
instance is in fact resident within the local file-system.

This requires that fusepy by installed, and that FUSE be available on
the system (typically requiring a package to be installed with
apt, yum, brew, etc.).

Parameters
----------
fs: file-system instance
    From one of the compatible implementations
path: str
    Location on that file-system to regard as the root directory to
    mount. Note that you typically should include the terminating "/"
    character.
mount_point: str
    An empty directory on the local file-system where the contents of
    the remote path will appear.
foreground: bool
    Whether or not calling this function will block. Operation will
    typically be more stable if True.
threads: bool
    Whether or not to create threads when responding to file operations
    within the mounter directory. Operation will typically be more
    stable if False.
ready_file: bool
    Whether the FUSE process is ready. The ``.fuse_ready`` file will
    exist in the ``mount_point`` directory if True. Debugging purpose.
ops_class: FUSEr or Subclass of FUSEr
    To override the default behavior of FUSEr. For Example, logging
    to file.

---
## main
```python
from fuse import main
```

Mount filesystem from chained URL to MOUNT_POINT.

Examples:

python3 -m fsspec.fuse memory /usr/share /tmp/mem

python3 -m fsspec.fuse local /tmp/source /tmp/local \
        -l /tmp/fsspecfuse.log

You can also mount chained-URLs and use special settings:

python3 -m fsspec.fuse 'filecache::zip::file://data.zip' \
        / /tmp/zip \
        -o 'filecache-cache_storage=/tmp/simplecache'

You can specify the type of the setting by using `[int]` or `[bool]`,
(`true`, `yes`, `1` represents the Boolean value `True`):

python3 -m fsspec.fuse 'simplecache::ftp://ftp1.at.proftpd.org' \
        /historic/packages/RPMS /tmp/ftp \
        -o 'simplecache-cache_storage=/tmp/simplecache' \
        -o 'simplecache-check_files=false[bool]' \
        -o 'ftp-listings_expiry_time=60[int]' \
        -o 'ftp-username=anonymous' \
        -o 'ftp-password=xieyanbo'

---
## __init__
```python
from fuse import __init__
```



---
## getattr
```python
from fuse import getattr
```



---
## readdir
```python
from fuse import readdir
```



---
## mkdir
```python
from fuse import mkdir
```



---
## rmdir
```python
from fuse import rmdir
```



---
## read
```python
from fuse import read
```



---
## write
```python
from fuse import write
```



---
## create
```python
from fuse import create
```



---
## open
```python
from fuse import open
```



---
## truncate
```python
from fuse import truncate
```



---
## unlink
```python
from fuse import unlink
```



---
## release
```python
from fuse import release
```



---
## chmod
```python
from fuse import chmod
```



---
## RawDescriptionArgumentParser
```python
from fuse import RawDescriptionArgumentParser
```



---
## format_help
```python
from fuse import format_help
```



---
## LoggingFUSEr
```python
from fuse import LoggingFUSEr
```



---
## __name__
```python
from json import __name__
```



---
## FilesystemJSONEncoder
```python
from json import FilesystemJSONEncoder
```



---
## FilesystemJSONDecoder
```python
from json import FilesystemJSONDecoder
```



---
## default
```python
from json import default
```



---
## make_serializable
```python
from json import make_serializable
```

Recursively converts an object so that it can be JSON serialized via
:func:`json.dumps` and :func:`json.dump`, without actually calling
said functions.

---
## __init__
```python
from json import __init__
```



---
## try_resolve_path_cls
```python
from json import try_resolve_path_cls
```



---
## try_resolve_fs_cls
```python
from json import try_resolve_fs_cls
```



---
## custom_object_hook
```python
from json import custom_object_hook
```



---
## unmake_serializable
```python
from json import unmake_serializable
```

Inverse function of :meth:`FilesystemJSONEncoder.make_serializable`.

---
## __name__
```python
from gui import __name__
```

Matplotlib GUI progressbar decorator for iterators.

Usage:
>>> from tqdm.gui import trange, tqdm
>>> for i in trange(10):
...     ...

---
## SigSlot
```python
from gui import SigSlot
```

Signal-slot mixin, for Panel event passing

Include this class in a widget manager's superclasses to be able to
register events and callbacks on Panel widgets managed by that class.

The method ``_register`` should be called as widgets are added, and external
code should call ``connect`` to associate callbacks.

By default, all signals emit a DEBUG logging statement.

---
## SingleSelect
```python
from gui import SingleSelect
```

A multiselect which only allows you to select one item for an event

---
## FileSelector
```python
from gui import FileSelector
```

Panel-based graphical file selector widget

Instances of this widget are interactive and can be displayed in jupyter by having
them as the output of a cell,  or in a separate browser tab using ``.show()``.

---
## __init__
```python
from gui import __init__
```



---
## _setup
```python
from gui import _setup
```



---
## _register
```python
from gui import _register
```

Watch the given attribute of a widget and assign it a named event

This is normally called at the time a widget is instantiated, in the
class which owns it.

Parameters
----------
widget : pn.layout.Panel or None
    Widget to watch. If None, an anonymous signal not associated with
    any widget.
name : str
    Name of this event
thing : str
    Attribute of the given widget to watch
log_level : int
    When the signal is triggered, a logging event of the given level
    will be fired in the dfviz logger.
auto : bool
    If True, automatically connects with a method in this class of the
    same name.

---
## _repr_mimebundle_
```python
from gui import _repr_mimebundle_
```

Display in a notebook or a server

---
## connect
```python
from gui import connect
```

Associate call back with given event

The callback must be a function which takes the "new" value of the
watched attribute as the only parameter. If the callback return False,
this cancels any further processing of the given event.

Alternatively, the callback can be a string, in which case it means
emitting the correspondingly-named event (i.e., connect to self)

---
## _signal
```python
from gui import _signal
```



---
## ignore_events
```python
from gui import ignore_events
```

Temporarily turn off events processing in this instance

(does not propagate to children)

---
## _emit
```python
from gui import _emit
```

An event happened, call its callbacks

This method can be used in tests to simulate message passing without
directly changing visual elements.

Calling of callbacks will halt whenever one returns False.

---
## show
```python
from gui import show
```

Open a new browser tab and display this instance's interface

---
## select_one
```python
from gui import select_one
```



---
## set_options
```python
from gui import set_options
```



---
## clear
```python
from gui import clear
```



---
## value
```python
from gui import value
```



---
## set_selection
```python
from gui import set_selection
```



---
## set_filters
```python
from gui import set_filters
```



---
## storage_options
```python
from gui import storage_options
```

Value of the kwargs box as a dictionary

---
## fs
```python
from gui import fs
```

Current filesystem instance

---
## urlpath
```python
from gui import urlpath
```

URL of currently selected item

---
## open_file
```python
from gui import open_file
```

Create OpenFile instance for the currently selected item

For example, in a notebook you might do something like

.. code-block::

    [ ]: sel = FileSelector(); sel

    # user selects their file

    [ ]: with sel.open_file('rb') as f:
    ...      out = f.read()

Parameters
----------
mode: str (optional)
    Open mode for the file.
compression: str (optional)
    The interact with the file as compressed. Set to 'infer' to guess
    compression from the file ending
encoding: str (optional)
    If using text mode, use this encoding; defaults to UTF8.

---
## filters_changed
```python
from gui import filters_changed
```



---
## selection_changed
```python
from gui import selection_changed
```



---
## go_clicked
```python
from gui import go_clicked
```



---
## protocol_changed
```python
from gui import protocol_changed
```



---
## home_clicked
```python
from gui import home_clicked
```



---
## up_clicked
```python
from gui import up_clicked
```



---
## OutCallback
```python
from _typing import OutCallback
```



---
## __call__
```python
from _typing import __call__
```



---
## __name__
```python
from elements import __name__
```



---
## AnchorElement
```python
from elements import AnchorElement
```



---
## ListElement
```python
from elements import ListElement
```



---
## __init__
```python
from elements import __init__
```



---
## HTML2Text
```python
from __init__ import HTML2Text
```



---
## html2text
```python
from __init__ import html2text
```



---
## feed
```python
from __init__ import feed
```

Feed a doctree to the index.

---
## handle
```python
from __init__ import handle
```



---
## outtextf
```python
from __init__ import outtextf
```



---
## finish
```python
from __init__ import finish
```



---
## handle_charref
```python
from __init__ import handle_charref
```



---
## handle_entityref
```python
from __init__ import handle_entityref
```



---
## handle_starttag
```python
from __init__ import handle_starttag
```

Called by the tree builder when a new tag is encountered.

:param name: Name of the tag.
:param nsprefix: Namespace prefix for the tag.
:param attrs: A dictionary of attribute values.
:param sourceline: The line number where this tag was found in its
    source document.
:param sourcepos: The character position within `sourceline` where this
    tag was found.
:param namespaces: A dictionary of all namespace prefix mappings 
    currently in scope in the document.

If this method returns None, the tag was rejected by an active
SoupStrainer. You should proceed as if the tag had not occurred
in the document. For instance, if this was a self-closing tag,
don't call handle_endtag.

---
## handle_endtag
```python
from __init__ import handle_endtag
```

Called by the tree builder when an ending tag is encountered.

:param name: Name of the tag.
:param nsprefix: Namespace prefix for the tag.

---
## previousIndex
```python
from __init__ import previousIndex
```

:type attrs: dict

:returns: The index of certain set of attributes (of a link) in the
self.a list. If the set of attributes is not found, returns None
:rtype: int

---
## handle_emphasis
```python
from __init__ import handle_emphasis
```

Handles various text emphases

---
## handle_tag
```python
from __init__ import handle_tag
```



---
## pbr
```python
from __init__ import pbr
```

Pretty print has a line break

---
## p
```python
from __init__ import p
```

Set pretty print to 1 or 2 lines

---
## soft_br
```python
from __init__ import soft_br
```

Soft breaks

---
## o
```python
from __init__ import o
```

Deal with indentation and whitespace

---
## handle_data
```python
from __init__ import handle_data
```

Called by the tree builder when a chunk of textual data is encountered.

---
## charref
```python
from __init__ import charref
```



---
## entityref
```python
from __init__ import entityref
```



---
## google_nest_count
```python
from __init__ import google_nest_count
```

Calculate the nesting count of google doc lists

:type style: dict

:rtype: int

---
## optwrap
```python
from __init__ import optwrap
```

Wrap all paragraphs in the provided text.

:type text: str

:rtype: str

---
## link_url
```python
from __init__ import link_url
```



---
## bcolors
```python
from cli import bcolors
```



---
## hn
```python
from utils import hn
```



---
## dumb_property_dict
```python
from utils import dumb_property_dict
```

:returns: A hash of css attributes

---
## dumb_css_parser
```python
from utils import dumb_css_parser
```

:type data: str

:returns: A hash of css selectors, each of which contains a hash of
css attributes.
:rtype: dict

---
## element_style
```python
from utils import element_style
```

:type attrs: dict
:type style_def: dict
:type style_def: dict

:returns: A hash of the 'final' style attributes of the element
:rtype: dict

---
## google_list_style
```python
from utils import google_list_style
```

Finds out whether this is an ordered or unordered list

:type style: dict

:rtype: str

---
## google_has_height
```python
from utils import google_has_height
```

Check if the style of the element has the 'height' attribute
explicitly defined

:type style: dict

:rtype: bool

---
## google_text_emphasis
```python
from utils import google_text_emphasis
```

:type style: dict

:returns: A list of all emphasis modifiers of the element
:rtype: list

---
## google_fixed_width_font
```python
from utils import google_fixed_width_font
```

Check if the css of the current element defines a fixed width font

:type style: dict

:rtype: bool

---
## list_numbering_start
```python
from utils import list_numbering_start
```

Extract numbering from list element attributes

:type attrs: dict

:rtype: int or None

---
## skipwrap
```python
from utils import skipwrap
```



---
## escape_md
```python
from utils import escape_md
```

Escapes markdown-sensitive characters within other markdown
constructs.

---
## escape_md_section
```python
from utils import escape_md_section
```

Escapes markdown-sensitive characters across whole document sections.

---
## reformat_table
```python
from utils import reformat_table
```

Given the lines of a table
padds the cells and returns the new lines

---
## pad_tables_in_text
```python
from utils import pad_tables_in_text
```

Provide padding for tables in the text

---
## __name__
```python
from blockparser import __name__
```

The block parser handles basic parsing of Markdown blocks.  It doesn't concern
itself with inline elements such as `**bold**` or `*italics*`, but rather just
catches blocks, lists, quotes, etc.

The `BlockParser` is made up of a bunch of `BlockProcessors`, each handling a
different type of block. Extensions may add/replace/remove `BlockProcessors`
as they need to alter how Markdown blocks are parsed.

---
## State
```python
from blockparser import State
```

Track the current and nested state of the parser.

This utility class is used to track the state of the `BlockParser` and
support multiple levels if nesting. It's just a simple API wrapped around
a list. Each time a state is set, that state is appended to the end of the
list. Each time a state is reset, that state is removed from the end of
the list.

Therefore, each time a state is set for a nested block, that state must be
reset when we back out of that level of nesting or the state could be
corrupted.

While all the methods of a list object are available, only the three
defined below need be used.

---
## BlockParser
```python
from blockparser import BlockParser
```

Parse Markdown blocks into an `ElementTree` object.

A wrapper class that stitches the various `BlockProcessors` together,
looping through them and creating an `ElementTree` object.

---
## set
```python
from blockparser import set
```

Set a new state. 

---
## reset
```python
from blockparser import reset
```

Step back one step in nested state. 

---
## isstate
```python
from blockparser import isstate
```

Test that top (current) level is of given state. 

---
## __init__
```python
from blockparser import __init__
```

Initialize the block parser.

Arguments:
    md: A Markdown instance.

Attributes:
    BlockParser.md (Markdown): A Markdown instance.
    BlockParser.state (State): Tracks the nesting level of current location in document being parsed.
    BlockParser.blockprocessors (util.Registry): A collection of
        [`blockprocessors`][markdown.blockprocessors].

---
## parseDocument
```python
from blockparser import parseDocument
```

Parse a Markdown document into an `ElementTree`.

Given a list of lines, an `ElementTree` object (not just a parent
`Element`) is created and the root element is passed to the parser
as the parent. The `ElementTree` object is returned.

This should only be called on an entire document, not pieces.

Arguments:
    lines: A list of lines (strings).

Returns:
    An element tree.

---
## parseChunk
```python
from blockparser import parseChunk
```

Parse a chunk of Markdown text and attach to given `etree` node.

While the `text` argument is generally assumed to contain multiple
blocks which will be split on blank lines, it could contain only one
block. Generally, this method would be called by extensions when
block parsing is required.

The `parent` `etree` Element passed in is altered in place.
Nothing is returned.

Arguments:
    parent: The parent element.
    text: The text to parse.

---
## parseBlocks
```python
from blockparser import parseBlocks
```

Process blocks of Markdown text and attach to given `etree` node.

Given a list of `blocks`, each `blockprocessor` is stepped through
until there are no blocks left. While an extension could potentially
call this method directly, it's generally expected to be used
internally.

This is a public method as an extension may need to add/alter
additional `BlockProcessors` which call this method to recursively
parse a nested block.

Arguments:
    parent: The parent element.
    blocks: The blocks of text to parse.

---
## __name__
```python
from blockprocessors import __name__
```

A block processor parses blocks of text and adds new elements to the ElementTree. Blocks of text,
separated from other text by blank lines, may have a different syntax and produce a differently
structured tree than other Markdown. Block processors excel at handling code formatting, equation
layouts, tables, etc.

---
## build_block_parser
```python
from blockprocessors import build_block_parser
```

Build the default block parser used by Markdown. 

---
## BlockProcessor
```python
from blockprocessors import BlockProcessor
```

Base class for block processors.

Each subclass will provide the methods below to work with the source and
tree. Each processor will need to define it's own `test` and `run`
methods. The `test` method should return True or False, to indicate
whether the current block should be processed by this processor. If the
test passes, the parser will call the processors `run` method.

Attributes:
    BlockProcessor.parser (BlockParser): The `BlockParser` instance this is attached to.
    BlockProcessor.tab_length (int): The tab length set on the `Markdown` instance.

---
## ListIndentProcessor
```python
from blockprocessors import ListIndentProcessor
```

Process children of list items.

Example

    * a list item
        process this part

        or this part

---
## CodeBlockProcessor
```python
from blockprocessors import CodeBlockProcessor
```

Process code blocks. 

---
## BlockQuoteProcessor
```python
from blockprocessors import BlockQuoteProcessor
```

Process blockquotes. 

---
## OListProcessor
```python
from blockprocessors import OListProcessor
```

Process ordered list blocks. 

---
## UListProcessor
```python
from blockprocessors import UListProcessor
```

Process unordered list blocks. 

---
## HashHeaderProcessor
```python
from blockprocessors import HashHeaderProcessor
```

Process Hash Headers. 

---
## SetextHeaderProcessor
```python
from blockprocessors import SetextHeaderProcessor
```

Process Setext-style Headers. 

---
## HRProcessor
```python
from blockprocessors import HRProcessor
```

Process Horizontal Rules. 

---
## EmptyBlockProcessor
```python
from blockprocessors import EmptyBlockProcessor
```

Process blocks that are empty or start with an empty line. 

---
## ReferenceProcessor
```python
from blockprocessors import ReferenceProcessor
```

Process link references. 

---
## ParagraphProcessor
```python
from blockprocessors import ParagraphProcessor
```

Process Paragraph blocks. 

---
## __init__
```python
from blockprocessors import __init__
```



---
## lastChild
```python
from blockprocessors import lastChild
```

Return the last child of an `etree` element. 

---
## detab
```python
from blockprocessors import detab
```

Remove a tab from the front of each line of the given text. 

---
## looseDetab
```python
from blockprocessors import looseDetab
```

Remove a tab from front of lines but allowing dedented lines. 

---
## test
```python
from blockprocessors import test
```



---
## run
```python
from blockprocessors import run
```



---
## create_item
```python
from blockprocessors import create_item
```

Create a new `li` and parse the block with it as the parent. 

---
## get_level
```python
from blockprocessors import get_level
```

Get level of indentation based on list level. 

---
## clean
```python
from blockprocessors import clean
```

Remove `>` from beginning of a line. 

---
## get_items
```python
from blockprocessors import get_items
```

Break a block into list items. 

---
## __name__
```python
from treeprocessors import __name__
```

Tree processors manipulate the tree created by block processors. They can even create an entirely
new `ElementTree` object. This is an excellent place for creating summaries, adding collected
references, or last minute adjustments.

---
## build_treeprocessors
```python
from treeprocessors import build_treeprocessors
```

Build the default  `treeprocessors` for Markdown. 

---
## isString
```python
from treeprocessors import isString
```

Return `True` if object is a string but not an  [`AtomicString`][markdown.util.AtomicString]. 

---
## Treeprocessor
```python
from treeprocessors import Treeprocessor
```

`Treeprocessor`s are run on the `ElementTree` object before serialization.

Each `Treeprocessor` implements a `run` method that takes a pointer to an
`Element` and modifies it as necessary.

`Treeprocessors` must extend `markdown.Treeprocessor`.

---
## InlineProcessor
```python
from treeprocessors import InlineProcessor
```

A `Treeprocessor` that traverses a tree, applying inline patterns.

---
## PrettifyTreeprocessor
```python
from treeprocessors import PrettifyTreeprocessor
```

Add line breaks to the html document. 

---
## UnescapeTreeprocessor
```python
from treeprocessors import UnescapeTreeprocessor
```

Restore escaped chars 

---
## run
```python
from treeprocessors import run
```

Loop over all elements and unescape all text. 

---
## __init__
```python
from treeprocessors import __init__
```



---
## __makePlaceholder
```python
from treeprocessors import __makePlaceholder
```

Generate a placeholder 

---
## __findPlaceholder
```python
from treeprocessors import __findPlaceholder
```

Extract id from data string, start from index.

Arguments:
    data: String.
    index: Index, from which we start search.

Returns:
    Placeholder id and string index, after the found placeholder.

---
## __stashNode
```python
from treeprocessors import __stashNode
```

Add node to stash. 

---
## __handleInline
```python
from treeprocessors import __handleInline
```

Process string with inline patterns and replace it with placeholders.

Arguments:
    data: A line of Markdown text.
    patternIndex: The index of the `inlinePattern` to start with.

Returns:
    String with placeholders.

---
## __processElementText
```python
from treeprocessors import __processElementText
```

Process placeholders in `Element.text` or `Element.tail`
of Elements popped from `self.stashed_nodes`.

Arguments:
    node: Parent node.
    subnode: Processing node.
    isText: Boolean variable, True - it's text, False - it's a tail.

---
## __processPlaceholders
```python
from treeprocessors import __processPlaceholders
```

Process string with placeholders and generate `ElementTree` tree.

Arguments:
    data: String with placeholders instead of `ElementTree` elements.
    parent: Element, which contains processing inline data.
    isText: Boolean variable, True - it's text, False - it's a tail.

Returns:
    List with `ElementTree` elements with applied inline patterns.

---
## __applyPattern
```python
from treeprocessors import __applyPattern
```

Check if the line fits the pattern, create the necessary
elements, add it to `stashed_nodes`.

Arguments:
    data: The text to be processed.
    pattern: The pattern to be checked.
    patternIndex: Index of current pattern.
    startIndex: String index, from which we start searching.

Returns:
    String with placeholders instead of `ElementTree` elements.

---
## __build_ancestors
```python
from treeprocessors import __build_ancestors
```

Build the ancestor list.

---
## _prettifyETree
```python
from treeprocessors import _prettifyETree
```

Recursively add line breaks to `ElementTree` children. 

---
## _unescape
```python
from treeprocessors import _unescape
```



---
## unescape
```python
from treeprocessors import unescape
```



---
## linkText
```python
from treeprocessors import linkText
```



---
## __name__
```python
from htmlparser import __name__
```

This module imports a copy of [`html.parser.HTMLParser`][] and modifies it heavily through monkey-patches.
A copy is imported rather than the module being directly imported as this ensures that the user can import
and  use the unmodified library for their own needs.

---
## HTMLExtractor
```python
from htmlparser import HTMLExtractor
```

Extract raw HTML from text.

The raw HTML is stored in the [`htmlStash`][markdown.util.HtmlStash] of the
[`Markdown`][markdown.Markdown] instance passed to `md` and the remaining text
is stored in `cleandoc` as a list of strings.

---
## __init__
```python
from htmlparser import __init__
```



---
## reset
```python
from htmlparser import reset
```

Reset this instance.  Loses all unprocessed data.

---
## close
```python
from htmlparser import close
```

Handle any buffered data.

---
## line_offset
```python
from htmlparser import line_offset
```

Returns char index in `self.rawdata` for the start of the current line. 

---
## at_line_start
```python
from htmlparser import at_line_start
```

Returns True if current position is at start of line.

Allows for up to three blank spaces at start of line.

---
## get_endtag_text
```python
from htmlparser import get_endtag_text
```

Returns the text of the end tag.

If it fails to extract the actual text from the raw data, it builds a closing tag with `tag`.

---
## handle_starttag
```python
from htmlparser import handle_starttag
```



---
## handle_endtag
```python
from htmlparser import handle_endtag
```



---
## handle_data
```python
from htmlparser import handle_data
```



---
## handle_empty_tag
```python
from htmlparser import handle_empty_tag
```

Handle empty tags (`<data>`). 

---
## handle_startendtag
```python
from htmlparser import handle_startendtag
```



---
## handle_charref
```python
from htmlparser import handle_charref
```



---
## handle_entityref
```python
from htmlparser import handle_entityref
```



---
## handle_comment
```python
from htmlparser import handle_comment
```



---
## handle_decl
```python
from htmlparser import handle_decl
```



---
## handle_pi
```python
from htmlparser import handle_pi
```



---
## unknown_decl
```python
from htmlparser import unknown_decl
```



---
## parse_pi
```python
from htmlparser import parse_pi
```



---
## parse_html_declaration
```python
from htmlparser import parse_html_declaration
```



---
## parse_bogus_comment
```python
from htmlparser import parse_bogus_comment
```



---
## get_starttag_text
```python
from htmlparser import get_starttag_text
```

Return full source of start tag: `<...>`.

---
## parse_starttag
```python
from htmlparser import parse_starttag
```



---
## _get_version
```python
from __meta__ import _get_version
```

Returns a PEP 440-compliant version number from `version_info`. 

---
## get_installed_extensions
```python
from util import get_installed_extensions
```

Return all entry_points in the `markdown.extensions` group. 

---
## parseBoolValue
```python
from util import parseBoolValue
```

Parses a string representing a boolean value. If parsing was successful,
returns `True` or `False`. If `preserve_none=True`, returns `True`, `False`,
or `None`. If parsing was not successful, raises `ValueError`, or, if
`fail_on_errors=False`, returns `None`.

---
## code_escape
```python
from util import code_escape
```

HTML escape a string of code.

---
## _get_stack_depth
```python
from util import _get_stack_depth
```

Get current stack depth, performantly.
    

---
## nearing_recursion_limit
```python
from util import nearing_recursion_limit
```

Return true if current stack depth is within 100 of maximum limit.

---
## AtomicString
```python
from util import AtomicString
```

A string which should not be further processed.

---
## Processor
```python
from util import Processor
```

The base class for all processors.

Attributes:
    Processor.md: The `Markdown` instance passed in an initialization.

Arguments:
    md: The `Markdown` instance this processor is a part of.

---
## HtmlStash
```python
from util import HtmlStash
```

This class is used for stashing HTML objects that we extract
in the beginning and replace with place-holders.

---
## _PriorityItem
```python
from util import _PriorityItem
```



---
## Registry
```python
from util import Registry
```

A priority sorted registry.

A `Registry` instance provides two public methods to alter the data of the
registry: `register` and `deregister`. Use `register` to add items and
`deregister` to remove items. See each method for specifics.

When registering an item, a "name" and a "priority" must be provided. All
items are automatically sorted by "priority" from highest to lowest. The
"name" is used to remove ("deregister") and get items.

A `Registry` instance it like a list (which maintains order) when reading
data. You may iterate over the items, get an item and get a count (length)
of all items. You may also check that the registry contains an item.

When getting an item you may use either the index of the item or the
string-based "name". For example:

    registry = Registry()
    registry.register(SomeItem(), 'itemname', 20)
    # Get the item by index
    item = registry[0]
    # Get the item by name
    item = registry['itemname']

When checking that the registry contains an item, you may use either the
string-based "name", or a reference to the actual item. For example:

    someitem = SomeItem()
    registry.register(someitem, 'itemname', 20)
    # Contains the name
    assert 'itemname' in registry
    # Contains the item instance
    assert someitem in registry

The method `get_index_for_name` is also available to obtain the index of
an item using that item's assigned "name".

---
## wrapper
```python
from util import wrapper
```



---
## TagData
```python
from util import TagData
```



---
## store
```python
from util import store
```

Saves an HTML segment for later reinsertion.  Returns a
placeholder string that needs to be inserted into the
document.

Keyword arguments:
    html: An html segment.

Returns:
    A placeholder string.

---
## reset
```python
from util import reset
```

Clear the stash. 

---
## get_placeholder
```python
from util import get_placeholder
```



---
## store_tag
```python
from util import store_tag
```

Store tag data and return a placeholder.

---
## __contains__
```python
from util import __contains__
```



---
## __iter__
```python
from util import __iter__
```



---
## __len__
```python
from util import __len__
```



---
## get_index_for_name
```python
from util import get_index_for_name
```

Return the index of the given name.

---
## register
```python
from util import register
```

Add an item to the registry with the given name and priority.

Arguments:
    item: The item being registered.
    name: A string used to reference the item.
    priority: An integer or float used to sort against all items.

If an item is registered with a "name" which already exists, the
existing item is replaced with the new item. Treat carefully as the
old item is lost with no way to recover it. The new item will be
sorted according to its priority and will **not** retain the position
of the old item.

---
## deregister
```python
from util import deregister
```

Remove an item from the registry.

Set `strict=False` to fail silently. Otherwise a [`ValueError`][] is raised for an unknown `name`.

---
## _sort
```python
from util import _sort
```

Sort the registry by priority from highest to lowest.

This method is called internally and should never be explicitly called.

---
## deprecated_func
```python
from util import deprecated_func
```



---
## __name__
```python
from serializers import __name__
```

Python-Markdown provides two serializers which render [`ElementTree.Element`][xml.etree.ElementTree.Element]
objects to a string of HTML. Both functions wrap the same underlying code with only a few minor
differences as outlined below:

1. Empty (self-closing) tags are rendered as `<tag>` for HTML and as `<tag />` for XHTML.
2. Boolean attributes are rendered as `attrname` for HTML and as `attrname="attrname"` for XHTML.

---
## _raise_serialization_error
```python
from serializers import _raise_serialization_error
```



---
## _escape_cdata
```python
from serializers import _escape_cdata
```



---
## _escape_attrib
```python
from serializers import _escape_attrib
```



---
## _escape_attrib_html
```python
from serializers import _escape_attrib_html
```



---
## _serialize_html
```python
from serializers import _serialize_html
```



---
## _write_html
```python
from serializers import _write_html
```



---
## to_html_string
```python
from serializers import to_html_string
```

Serialize element and its children to a string of HTML5. 

---
## to_xhtml_string
```python
from serializers import to_xhtml_string
```

Serialize element and its children to a string of XHTML. 

---
## Markdown
```python
from core import Markdown
```

A parser which converts Markdown to HTML.

Attributes:
    Markdown.tab_length (int): The number of spaces which correspond to a single tab. Default: `4`.
    Markdown.ESCAPED_CHARS (list[str]): List of characters which get the backslash escape treatment.
    Markdown.block_level_elements (list[str]): List of HTML tags which get treated as block-level elements.
        See [`markdown.util.BLOCK_LEVEL_ELEMENTS`][] for the full list of elements.
    Markdown.registeredExtensions (list[Extension]): List of extensions which have called
        [`registerExtension`][markdown.Markdown.registerExtension] during setup.
    Markdown.doc_tag (str): Element used to wrap document. Default: `div`.
    Markdown.stripTopLevelTags (bool): Indicates whether the `doc_tag` should be removed. Default: 'True'.
    Markdown.references (dict[str, tuple[str, str]]): A mapping of link references found in a parsed document
         where the key is the reference name and the value is a tuple of the URL and title.
    Markdown.htmlStash (util.HtmlStash): The instance of the `HtmlStash` used by an instance of this class.
    Markdown.output_formats (dict[str, Callable[xml.etree.ElementTree.Element]]): A mapping of known output
         formats by name and their respective serializers. Each serializer must be a callable which accepts an
        [`Element`][xml.etree.ElementTree.Element] and returns a `str`.
    Markdown.output_format (str): The output format set by
        [`set_output_format`][markdown.Markdown.set_output_format].
    Markdown.serializer (Callable[xml.etree.ElementTree.Element]): The serializer set by
        [`set_output_format`][markdown.Markdown.set_output_format].
    Markdown.preprocessors (util.Registry): A collection of [`preprocessors`][markdown.preprocessors].
    Markdown.parser (blockparser.BlockParser): A collection of [`blockprocessors`][markdown.blockprocessors].
    Markdown.inlinePatterns (util.Registry): A collection of [`inlinepatterns`][markdown.inlinepatterns].
    Markdown.treeprocessors (util.Registry): A collection of [`treeprocessors`][markdown.treeprocessors].
    Markdown.postprocessors (util.Registry): A collection of [`postprocessors`][markdown.postprocessors].

---
## markdown
```python
from core import markdown
```

Convert a markdown string to HTML and return HTML as a Unicode string.

This is a shortcut function for [`Markdown`][markdown.Markdown] class to cover the most
basic use case.  It initializes an instance of [`Markdown`][markdown.Markdown], loads the
necessary extensions and runs the parser on the given text.

Arguments:
    text: Markdown formatted text as Unicode or ASCII string.

Keyword arguments:
    **kwargs: Any arguments accepted by the Markdown class.

Returns:
    A string in the specified output format.

---
## markdownFromFile
```python
from core import markdownFromFile
```

Read Markdown text from a file and write output to a file or a stream.

This is a shortcut function which initializes an instance of [`Markdown`][markdown.Markdown],
and calls the [`convertFile`][markdown.Markdown.convertFile] method rather than
[`convert`][markdown.Markdown.convert].

Keyword arguments:
    input (str | BinaryIO): A file name or readable object.
    output (str | BinaryIO): A file name or writable object.
    encoding (str): Encoding of input and output.
    **kwargs: Any arguments accepted by the `Markdown` class.

---
## build_parser
```python
from core import build_parser
```

Build the parser from the various parts.

Assigns a value to each of the following attributes on the class instance:

* **`Markdown.preprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of
  [`preprocessors`][markdown.preprocessors].
* **`Markdown.parser`** ([`BlockParser`][markdown.blockparser.BlockParser]) -- A collection of
  [`blockprocessors`][markdown.blockprocessors].
* **`Markdown.inlinePatterns`** ([`Registry`][markdown.util.Registry]) -- A collection of
  [`inlinepatterns`][markdown.inlinepatterns].
* **`Markdown.treeprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of
  [`treeprocessors`][markdown.treeprocessors].
* **`Markdown.postprocessors`** ([`Registry`][markdown.util.Registry]) -- A collection of
  [`postprocessors`][markdown.postprocessors].

This method could be redefined in a subclass to build a custom parser which is made up of a different
combination of processors and patterns.

---
## registerExtensions
```python
from core import registerExtensions
```

Load a list of extensions into an instance of the `Markdown` class.

Arguments:
    extensions (list[Extension | str]): A list of extensions.

        If an item is an instance of a subclass of [`markdown.extensions.Extension`][],
        the instance will be used as-is. If an item is of type `str`, it is passed
        to [`build_extension`][markdown.Markdown.build_extension] with its corresponding `configs` and the
        returned instance  of [`markdown.extensions.Extension`][] is used.
    configs (dict[str, dict[str, Any]]): Configuration settings for extensions.

---
## build_extension
```python
from core import build_extension
```

Build extension from a string name, then return an instance using the given `configs`.

Arguments:
    ext_name: Name of extension as a string.
    configs: Configuration settings for extension.

Returns:
    An instance of the extension with the given configuration settings.

First attempt to load an entry point. The string name must be registered as an entry point in the
`markdown.extensions` group which points to a subclass of the [`markdown.extensions.Extension`][] class.
If multiple distributions have registered the same name, the first one found is returned.

If no entry point is found, assume dot notation (`path.to.module:ClassName`). Load the specified class and
return an instance. If no class is specified, import the module and call a `makeExtension` function and return
the [`markdown.extensions.Extension`][] instance returned by that function.

---
## registerExtension
```python
from core import registerExtension
```

Register an extension as having a resettable state.

Arguments:
    extension: An instance of the extension to register.

This should get called once by an extension during setup. A "registered" extension's
`reset` method is called by [`Markdown.reset()`][markdown.Markdown.reset]. Not all extensions have or need a
resettable state, and so it should not be assumed that all extensions are "registered."

---
## set_output_format
```python
from core import set_output_format
```

Set the output format for the class instance.

Arguments:
    format: Must be a known value in `Markdown.output_formats`.

---
## is_block_level
```python
from core import is_block_level
```

Check if the given `tag` is a block level HTML tag.

Returns `True` for any string listed in `Markdown.block_level_elements`. A `tag` which is
not a string always returns `False`.

---
## convert
```python
from core import convert
```



---
## convertFile
```python
from core import convertFile
```

Converts a Markdown file and returns the HTML as a Unicode string.

Decodes the file using the provided encoding (defaults to `utf-8`),
passes the file content to markdown, and outputs the HTML to either
the provided stream or the file with provided name, using the same
encoding as the source file. The
[`xmlcharrefreplace`](https://docs.python.org/3/library/codecs.html#error-handlers)
error handler is used when encoding the output.

**Note:** This is the only place that decoding and encoding of Unicode
takes place in Python-Markdown.  (All other code is Unicode-in /
Unicode-out.)

Arguments:
    input: File object or path. Reads from `stdin` if `None`.
    output: File object or path. Writes to `stdout` if `None`.
    encoding: Encoding of input and output files. Defaults to `utf-8`.

---
## __name__
```python
from preprocessors import __name__
```

Preprocessors work on source text before it is broken down into its individual parts.
This is an excellent place to clean up bad characters or to extract portions for later
processing that the parser may otherwise choke on.

---
## build_preprocessors
```python
from preprocessors import build_preprocessors
```

Build and return the default set of preprocessors used by Markdown. 

---
## Preprocessor
```python
from preprocessors import Preprocessor
```

Preprocessors are run after the text is broken into lines.

Each preprocessor implements a `run` method that takes a pointer to a
list of lines of the document, modifies it as necessary and returns
either the same pointer or a pointer to a new list.

Preprocessors must extend `Preprocessor`.

---
## NormalizeWhitespace
```python
from preprocessors import NormalizeWhitespace
```

Normalize whitespace for consistent parsing. 

---
## HtmlBlockPreprocessor
```python
from preprocessors import HtmlBlockPreprocessor
```

Remove html blocks from the text and store them for later retrieval.

The raw HTML is stored in the [`htmlStash`][markdown.util.HtmlStash] of the
[`Markdown`][markdown.Markdown] instance.

---
## run
```python
from preprocessors import run
```



---
## __name__
```python
from postprocessors import __name__
```

Post-processors run on the text of the entire document after is has been serialized into a string.
Postprocessors should be used to work with the text just before output. Usually, they are used add
back sections that were extracted in a preprocessor, fix up outgoing encodings, or wrap the whole
document.

---
## build_postprocessors
```python
from postprocessors import build_postprocessors
```

Build the default postprocessors for Markdown. 

---
## Postprocessor
```python
from postprocessors import Postprocessor
```

Postprocessors are run after the ElementTree it converted back into text.

Each Postprocessor implements a `run` method that takes a pointer to a
text string, modifies it as necessary and returns a text string.

Postprocessors must extend `Postprocessor`.

---
## RawHtmlPostprocessor
```python
from postprocessors import RawHtmlPostprocessor
```

Restore raw html to the document. 

---
## AndSubstitutePostprocessor
```python
from postprocessors import AndSubstitutePostprocessor
```

Restore valid entities 

---
## UnescapePostprocessor
```python
from postprocessors import UnescapePostprocessor
```

Restore escaped chars. 

---
## run
```python
from postprocessors import run
```



---
## isblocklevel
```python
from postprocessors import isblocklevel
```

Check is block of HTML is block-level. 

---
## stash_to_string
```python
from postprocessors import stash_to_string
```

Convert a stashed object to a string. 

---
## unescape
```python
from postprocessors import unescape
```



---
## substitute_match
```python
from postprocessors import substitute_match
```



---
## __name__
```python
from inlinepatterns import __name__
```

In version 3.0, a new, more flexible inline processor was added, [`markdown.inlinepatterns.InlineProcessor`][].   The
original inline patterns, which inherit from [`markdown.inlinepatterns.Pattern`][] or one of its children are still
supported, though users are encouraged to migrate.

The new `InlineProcessor` provides two major enhancements to `Patterns`:

1. Inline Processors no longer need to match the entire block, so regular expressions no longer need to start with
  `r'^(.*?)'` and end with `r'(.*?)%'`. This runs faster. The returned [`Match`][re.Match] object will only contain
   what is explicitly matched in the pattern, and extension pattern groups now start with `m.group(1)`.

2.  The `handleMatch` method now takes an additional input called `data`, which is the entire block under analysis,
    not just what is matched with the specified pattern. The method now returns the element *and* the indexes relative
    to `data` that the return element is replacing (usually `m.start(0)` and `m.end(0)`).  If the boundaries are
    returned as `None`, it is assumed that the match did not take place, and nothing will be altered in `data`.

    This allows handling of more complex constructs than regular expressions can handle, e.g., matching nested
    brackets, and explicit control of the span "consumed" by the processor.

---
## build_inlinepatterns
```python
from inlinepatterns import build_inlinepatterns
```

Build the default set of inline patterns for Markdown.

The order in which processors and/or patterns are applied is very important - e.g. if we first replace
`http://.../` links with `<a>` tags and _then_ try to replace inline HTML, we would end up with a mess. So, we
apply the expressions in the following order:

* backticks and escaped characters have to be handled before everything else so that we can preempt any markdown
  patterns by escaping them;

* then we handle the various types of links (auto-links must be handled before inline HTML);

* then we handle inline HTML.  At this point we will simply replace all inline HTML strings with a placeholder
  and add the actual HTML to a stash;

* finally we apply strong, emphasis, etc.

---
## dequote
```python
from inlinepatterns import dequote
```

Remove quotes from around a string.

---
## EmStrongItem
```python
from inlinepatterns import EmStrongItem
```

Emphasis/strong pattern item.

---
## Pattern
```python
from inlinepatterns import Pattern
```

Base class that inline patterns subclass.

Inline patterns are handled by means of `Pattern` subclasses, one per regular expression.
Each pattern object uses a single regular expression and must support the following methods:
[`getCompiledRegExp`][markdown.inlinepatterns.Pattern.getCompiledRegExp] and
[`handleMatch`][markdown.inlinepatterns.Pattern.handleMatch].

All the regular expressions used by `Pattern` subclasses must capture the whole block.  For this
reason, they all start with `^(.*)` and end with `(.*)!`.  When passing a regular expression on
class initialization, the `^(.*)` and `(.*)!` are added automatically and the regular expression
is pre-compiled.

It is strongly suggested that the newer style [`markdown.inlinepatterns.InlineProcessor`][] that
use a more efficient and flexible search approach be used instead. However, the older style
`Pattern` remains for backward compatibility with many existing third-party extensions.

---
## InlineProcessor
```python
from inlinepatterns import InlineProcessor
```

Base class that inline processors subclass.

This is the newer style inline processor that uses a more
efficient and flexible search approach.

---
## SimpleTextPattern
```python
from inlinepatterns import SimpleTextPattern
```

Return a simple text of `group(2)` of a Pattern. 

---
## SimpleTextInlineProcessor
```python
from inlinepatterns import SimpleTextInlineProcessor
```

Return a simple text of `group(1)` of a Pattern. 

---
## EscapeInlineProcessor
```python
from inlinepatterns import EscapeInlineProcessor
```

Return an escaped character. 

---
## SimpleTagPattern
```python
from inlinepatterns import SimpleTagPattern
```

Return element of type `tag` with a text attribute of `group(3)`
of a Pattern.

---
## SimpleTagInlineProcessor
```python
from inlinepatterns import SimpleTagInlineProcessor
```

Return element of type `tag` with a text attribute of `group(2)`
of a Pattern.

---
## SubstituteTagPattern
```python
from inlinepatterns import SubstituteTagPattern
```

Return an element of type `tag` with no children. 

---
## SubstituteTagInlineProcessor
```python
from inlinepatterns import SubstituteTagInlineProcessor
```

Return an element of type `tag` with no children. 

---
## BacktickInlineProcessor
```python
from inlinepatterns import BacktickInlineProcessor
```

Return a `<code>` element containing the escaped matching text. 

---
## DoubleTagPattern
```python
from inlinepatterns import DoubleTagPattern
```

Return a ElementTree element nested in tag2 nested in tag1.

Useful for strong emphasis etc.

---
## DoubleTagInlineProcessor
```python
from inlinepatterns import DoubleTagInlineProcessor
```

Return a ElementTree element nested in tag2 nested in tag1.

Useful for strong emphasis etc.

---
## HtmlInlineProcessor
```python
from inlinepatterns import HtmlInlineProcessor
```

Store raw inline html and return a placeholder. 

---
## AsteriskProcessor
```python
from inlinepatterns import AsteriskProcessor
```

Emphasis processor for handling strong and em matches inside asterisks.

---
## UnderscoreProcessor
```python
from inlinepatterns import UnderscoreProcessor
```

Emphasis processor for handling strong and em matches inside underscores.

---
## LinkInlineProcessor
```python
from inlinepatterns import LinkInlineProcessor
```

Return a link element from the given match. 

---
## ImageInlineProcessor
```python
from inlinepatterns import ImageInlineProcessor
```

Return a `img` element from the given match. 

---
## ReferenceInlineProcessor
```python
from inlinepatterns import ReferenceInlineProcessor
```

Match to a stored reference and return link element. 

---
## ShortReferenceInlineProcessor
```python
from inlinepatterns import ShortReferenceInlineProcessor
```

Short form of reference: `[google]`. 

---
## ImageReferenceInlineProcessor
```python
from inlinepatterns import ImageReferenceInlineProcessor
```

Match to a stored reference and return `img` element. 

---
## ShortImageReferenceInlineProcessor
```python
from inlinepatterns import ShortImageReferenceInlineProcessor
```

Short form of image reference: `![ref]`. 

---
## AutolinkInlineProcessor
```python
from inlinepatterns import AutolinkInlineProcessor
```

Return a link Element given an auto-link (`<http://example/com>`). 

---
## AutomailInlineProcessor
```python
from inlinepatterns import AutomailInlineProcessor
```

Return a `mailto` link Element given an auto-mail link (`<foo@example.com>`).

---
## __init__
```python
from inlinepatterns import __init__
```



---
## getCompiledRegExp
```python
from inlinepatterns import getCompiledRegExp
```

Return a compiled regular expression. 

---
## handleMatch
```python
from inlinepatterns import handleMatch
```

Return an [`Element`][xml.etree.ElementTree.Element] containing a `mailto` link  of `group(1)`. 

---
## type
```python
from inlinepatterns import type
```

Return class name, to define pattern type 

---
## unescape
```python
from inlinepatterns import unescape
```

Return unescaped text given text with an inline placeholder. 

---
## backslash_unescape
```python
from inlinepatterns import backslash_unescape
```

Return text with backslash escapes undone (backslashes are restored). 

---
## build_single
```python
from inlinepatterns import build_single
```

Return single tag.

---
## build_double
```python
from inlinepatterns import build_double
```

Return double tag.

---
## build_double2
```python
from inlinepatterns import build_double2
```

Return double tags (variant 2): `<strong>text <em>text</em></strong>`.

---
## parse_sub_patterns
```python
from inlinepatterns import parse_sub_patterns
```

Parses sub patterns.

`data`: text to evaluate.

`parent`: Parent to attach text and sub elements to.

`last`: Last appended child to parent. Can also be None if parent has no children.

`idx`: Current pattern index that was used to evaluate the parent.

---
## build_element
```python
from inlinepatterns import build_element
```

Element builder.

---
## getLink
```python
from inlinepatterns import getLink
```

Parse data between `()` of `[Text]()` allowing recursive `()`. 

---
## getText
```python
from inlinepatterns import getText
```

Parse the content between `[]` of the start of an image or link
resolving nested square brackets.

---
## evalId
```python
from inlinepatterns import evalId
```

Evaluate the id of `[ref]`.  

---
## makeTag
```python
from inlinepatterns import makeTag
```

Return an `img` [`Element`][xml.etree.ElementTree.Element]. 

---
## get_stash
```python
from inlinepatterns import get_stash
```



---
## _unescape
```python
from inlinepatterns import _unescape
```



---
## codepoint2name
```python
from inlinepatterns import codepoint2name
```

Return entity definition by code, or the code if not defined.

---
## __name__
```python
from test_tools import __name__
```



---
## TestCase
```python
from test_tools import TestCase
```

A [`unittest.TestCase`][] subclass with helpers for testing Markdown output.

Define `default_kwargs` as a `dict` of keywords to pass to Markdown for each
test. The defaults can be overridden on individual tests.

The `assertMarkdownRenders` method accepts the source text, the expected
output, and any keywords to pass to Markdown. The `default_kwargs` are used
except where overridden by `kwargs`. The output and expected output are passed
to `TestCase.assertMultiLineEqual`. An `AssertionError` is raised with a diff
if the actual output does not equal the expected output.

The `dedent` method is available to dedent triple-quoted strings if
necessary.

In all other respects, behaves as `unittest.TestCase`.

---
## recursionlimit
```python
from test_tools import recursionlimit
```

A context manager which temporarily modifies the Python recursion limit.

The testing framework, coverage, etc. may add an arbitrary number of levels to the depth. To maintain consistency
in the tests, the current stack depth is determined when called, then added to the provided limit.

Example usage:

``` python
with recursionlimit(20):
    # test code here
```

See <https://stackoverflow.com/a/50120316/866026>.

---
## Kwargs
```python
from test_tools import Kwargs
```

A `dict` like class for holding keyword arguments. 

---
## _normalize_whitespace
```python
from test_tools import _normalize_whitespace
```

Normalize whitespace for a string of HTML using `tidylib`. 

---
## LegacyTestMeta
```python
from test_tools import LegacyTestMeta
```



---
## LegacyTestCase
```python
from test_tools import LegacyTestCase
```

A [`unittest.TestCase`][] subclass for running Markdown's legacy file-based tests.

A subclass should define various properties which point to a directory of
text-based test files and define various behaviors/defaults for those tests.
The following properties are supported:

Attributes:
    location (str): A path to the directory of test files. An absolute path is preferred.
    exclude (list[str]): A list of tests to exclude. Each test name should comprise the filename
        without an extension.
    normalize (bool): A boolean value indicating if the HTML should be normalized. Default: `False`.
    input_ext (str): A string containing the file extension of input files. Default: `.txt`.
    output_ext (str): A string containing the file extension of expected output files. Default: `html`.
    default_kwargs (Kwargs[str, Any]): The default set of keyword arguments for all test files in the directory.

In addition, properties can be defined for each individual set of test files within
the directory. The property should be given the name of the file without the file
extension. Any spaces and dashes in the filename should be replaced with
underscores. The value of the property should be a `Kwargs` instance which
contains the keyword arguments that should be passed to `Markdown` for that
test file. The keyword arguments will "update" the `default_kwargs`.

When the class instance is created, it will walk the given directory and create
a separate `Unitttest` for each set of test files using the naming scheme:
`test_filename`. One `Unittest` will be run for each set of input and output files.

---
## assertMarkdownRenders
```python
from test_tools import assertMarkdownRenders
```

Test that source Markdown text renders to expected output with given keywords.

`expected_attrs` accepts a `dict`. Each key should be the name of an attribute
on the `Markdown` instance and the value should be the expected value after
the source text is parsed by Markdown. After the expected output is tested,
the expected value for each attribute is compared against the actual
attribute of the `Markdown` instance using `TestCase.assertEqual`.

---
## dedent
```python
from test_tools import dedent
```

Dedent text.

---
## __init__
```python
from test_tools import __init__
```



---
## __enter__
```python
from test_tools import __enter__
```



---
## __exit__
```python
from test_tools import __exit__
```



---
## __new__
```python
from test_tools import __new__
```



---
## generate_test
```python
from test_tools import generate_test
```



---
## test
```python
from test_tools import test
```



---
## parse_options
```python
from __main__ import parse_options
```

Define and parse `optparse` options for command-line usage.

---
## run
```python
from __main__ import run
```

Run Markdown from the command line.

---
## Markdown
```python
from main import Markdown
```

Stream formatted JSON-like text to the terminal with live updates.

---
## __del__
```python
from main import __del__
```



---
## stream
```python
from main import stream
```



---
## generate_markdown
```python
from main import generate_markdown
```

Generate Markdown from JSON with headers based on depth.

---
## __name__
```python
from _core import __name__
```



---
## _Unset
```python
from _core import _Unset
```

What sillyness...

---
## _MaybeInSubresource
```python
from _core import _MaybeInSubresource
```



---
## _detect_or_error
```python
from _core import _detect_or_error
```



---
## _detect_or_default
```python
from _core import _detect_or_default
```



---
## _SpecificationDetector
```python
from _core import _SpecificationDetector
```



---
## Specification
```python
from _core import Specification
```

A specification which defines referencing behavior.

The various methods of a `Specification` allow for varying referencing
behavior across JSON Schema specification versions, etc.

---
## Resource
```python
from _core import Resource
```

A document (deserialized JSON) with a concrete interpretation under a spec.

In other words, a Python object, along with an instance of `Specification`
which describes how the document interacts with referencing -- both
internally (how it refers to other `Resource`\ s) and externally (how it
should be identified such that it is referenceable by other documents).

---
## _fail_to_retrieve
```python
from _core import _fail_to_retrieve
```



---
## Registry
```python
from _core import Registry
```

A registry of `Resource`\ s, each identified by their canonical URIs.

Registries store a collection of in-memory resources, and optionally
enable additional resources which may be stored elsewhere (e.g. in a
database, a separate set of files, over the network, etc.).

They also lazily walk their known resources, looking for subresources
within them. In other words, subresources contained within any added
resources will be retrievable via their own IDs (though this discovery of
subresources will be delayed until necessary).

Registries are immutable, and their methods return new instances of the
registry with the additional resources added to them.

The ``retrieve`` argument can be used to configure retrieval of resources
dynamically, either over the network, from a database, or the like.
Pass it a callable which will be called if any URI not present in the
registry is accessed. It must either return a `Resource` or else raise a
`NoSuchResource` exception indicating that the resource does not exist
even according to the retrieval logic.

---
## Retrieved
```python
from _core import Retrieved
```

A value retrieved from a `Registry`.

---
## Resolved
```python
from _core import Resolved
```

A reference resolved to its contents by a `Resolver`.

---
## Resolver
```python
from _core import Resolver
```

A reference resolver.

Resolvers help resolve references (including relative ones) by
pairing a fixed base URI with a `Registry`.

This object, under normal circumstances, is expected to be used by
*implementers of libraries* built on top of `referencing` (e.g. JSON Schema
implementations or other libraries resolving JSON references),
not directly by end-users populating registries or while writing
schemas or other resources.

References are resolved against the base URI, and the combined URI
is then looked up within the registry.

The process of resolving a reference may itself involve calculating
a *new* base URI for future reference resolution (e.g. if an
intermediate resource sets a new base URI), or may involve encountering
additional subresources and adding them to a new registry.

---
## Anchor
```python
from _core import Anchor
```

A simple anchor in a `Resource`.

---
## __call__
```python
from _core import __call__
```



---
## _detect
```python
from _core import _detect
```



---
## __get__
```python
from _core import __get__
```



---
## __repr__
```python
from _core import __repr__
```



---
## anchors_in
```python
from _core import anchors_in
```

Retrieve the anchors contained in the given document.

---
## create_resource
```python
from _core import create_resource
```

Create a resource which is interpreted using this specification.

---
## from_contents
```python
from _core import from_contents
```

Create a resource guessing which specification applies to the contents.

Raises:

    `CannotDetermineSpecification`

        if the given contents don't have any discernible
        information which could be used to guess which
        specification they identify as

---
## opaque
```python
from _core import opaque
```

Create an opaque `Resource` -- i.e. one with opaque specification.

See `Specification.OPAQUE` for details.

---
## id
```python
from _core import id
```

Retrieve this resource's (specification-specific) identifier.

---
## subresources
```python
from _core import subresources
```

Retrieve this resource's subresources.

---
## anchors
```python
from _core import anchors
```

Retrieve this resource's (specification-specific) identifier.

---
## pointer
```python
from _core import pointer
```

Resolve the given JSON pointer.

Raises:

    `exceptions.PointerToNowhere`

        if the pointer points to a location not present in the document

---
## __getitem__
```python
from _core import __getitem__
```

Return the (already crawled) `Resource` identified by the given URI.

---
## __iter__
```python
from _core import __iter__
```

Iterate over all crawled URIs in the registry.

---
## __len__
```python
from _core import __len__
```

Count the total number of fully crawled resources in this registry.

---
## __rmatmul__
```python
from _core import __rmatmul__
```

Create a new registry with resource(s) added using their internal IDs.

Resources must have a internal IDs (e.g. the :kw:`$id` keyword in
modern JSON Schema versions), otherwise an error will be raised.

Both a single resource as well as an iterable of resources works, i.e.:

    * ``resource @ registry`` or

    * ``[iterable, of, multiple, resources] @ registry``

which -- again, assuming the resources have internal IDs -- is
equivalent to calling `Registry.with_resources` as such:

.. code:: python

    registry.with_resources(
        (resource.id(), resource) for resource in new_resources
    )

Raises:

    `NoInternalID`

        if the resource(s) in fact do not have IDs

---
## get_or_retrieve
```python
from _core import get_or_retrieve
```

Get a resource from the registry, crawling or retrieving if necessary.

May involve crawling to find the given URI if it is not already known,
so the returned object is a `Retrieved` object which contains both the
resource value as well as the registry which ultimately contained it.

---
## remove
```python
from _core import remove
```

Return a registry with the resource identified by a given URI removed.

---
## anchor
```python
from _core import anchor
```

Retrieve a given anchor from a resource which must already be crawled.

---
## contents
```python
from _core import contents
```

Retrieve the (already crawled) contents identified by the given URI.

---
## crawl
```python
from _core import crawl
```

Crawl all added resources, discovering subresources.

---
## with_resource
```python
from _core import with_resource
```

Add the given `Resource` to the registry, without crawling it.

---
## with_resources
```python
from _core import with_resources
```

Add the given `Resource`\ s to the registry, without crawling them.

---
## with_contents
```python
from _core import with_contents
```

Add the given contents to the registry, autodetecting when necessary.

---
## combine
```python
from _core import combine
```

Combine together one or more other registries, producing a unified one.

---
## resolver
```python
from _core import resolver
```

Return a `Resolver` which resolves references against this registry.

---
## resolver_with_root
```python
from _core import resolver_with_root
```

Return a `Resolver` with a specific root resource.

---
## lookup
```python
from _core import lookup
```

Resolve the given reference to the resource it points to.

Raises:

    `exceptions.Unresolvable`

        or a subclass thereof (see below) if the reference isn't
        resolvable

    `exceptions.NoSuchAnchor`

        if the reference is to a URI where a resource exists but
        contains a plain name fragment which does not exist within
        the resource

    `exceptions.PointerToNowhere`

        if the reference is to a URI where a resource exists but
        contains a JSON pointer to a location within the resource
        that does not exist

---
## in_subresource
```python
from _core import in_subresource
```

Create a resolver for a subresource (which may have a new base URI).

---
## dynamic_scope
```python
from _core import dynamic_scope
```

In specs with such a notion, return the URIs in the dynamic scope.

---
## _evolve
```python
from _core import _evolve
```

Evolve, appending to the dynamic scope.

---
## resolve
```python
from _core import resolve
```

Return the resource for this anchor.

---
## __name__
```python
from retrieval import __name__
```

Helpers related to (dynamic) resource retrieval.

---
## to_cached_resource
```python
from retrieval import to_cached_resource
```

Create a retriever which caches its return values from a simpler callable.

Takes a function which returns things like serialized JSON (strings) and
returns something suitable for passing to `Registry` as a retrieve
function.

This decorator both reduces a small bit of boilerplate for a common case
(deserializing JSON from strings and creating `Resource` objects from the
result) as well as makes the probable need for caching a bit easier.
Retrievers which otherwise do expensive operations (like hitting the
network) might otherwise be called repeatedly.

Examples
--------

.. testcode::

    from referencing import Registry
    from referencing.typing import URI
    import referencing.retrieval


    @referencing.retrieval.to_cached_resource()
    def retrieve(uri: URI):
        print(f"Retrieved {uri}")

        # Normally, go get some expensive JSON from the network, a file ...
        return '''
            {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "foo": "bar"
            }
        '''

    one = Registry(retrieve=retrieve).get_or_retrieve("urn:example:foo")
    print(one.value.contents["foo"])

    # Retrieving the same URI again reuses the same value (and thus doesn't
    # print another retrieval message here)
    two = Registry(retrieve=retrieve).get_or_retrieve("urn:example:foo")
    print(two.value.contents["foo"])

.. testoutput::

    Retrieved urn:example:foo
    bar
    bar

---
## decorator
```python
from retrieval import decorator
```



---
## cached_retrieve
```python
from retrieval import cached_retrieve
```



---
## __name__
```python
from _attrs import __name__
```



---
## define
```python
from _attrs import define
```



---
## frozen
```python
from _attrs import frozen
```



---
## UnsupportedSubclassing
```python
from _attrs import UnsupportedSubclassing
```



---
## _do_not_subclass
```python
from _attrs import _do_not_subclass
```



---
## __str__
```python
from _attrs import __str__
```



---
## NoSuchResource
```python
from exceptions import NoSuchResource
```

The given URI is not present in a registry.

Unlike most exceptions, this class *is* intended to be publicly
instantiable and *is* part of the public API of the package.

---
## NoInternalID
```python
from exceptions import NoInternalID
```

A resource has no internal ID, but one is needed.

E.g. in modern JSON Schema drafts, this is the :kw:`$id` keyword.

One might be needed if a resource was to-be added to a registry but no
other URI is available, and the resource doesn't declare its canonical URI.

---
## Unretrievable
```python
from exceptions import Unretrievable
```

The given URI is not present in a registry, and retrieving it failed.

---
## CannotDetermineSpecification
```python
from exceptions import CannotDetermineSpecification
```

Attempting to detect the appropriate `Specification` failed.

This happens if no discernible information is found in the contents of the
new resource which would help identify it.

---
## Unresolvable
```python
from exceptions import Unresolvable
```

A reference was unresolvable.

---
## PointerToNowhere
```python
from exceptions import PointerToNowhere
```

A JSON Pointer leads to a part of a document that does not exist.

---
## NoSuchAnchor
```python
from exceptions import NoSuchAnchor
```

An anchor does not exist within a particular resource.

---
## InvalidAnchor
```python
from exceptions import InvalidAnchor
```

An anchor which could never exist in a resource was dereferenced.

It is somehow syntactically invalid.

---
## __eq__
```python
from exceptions import __eq__
```



---
## __hash__
```python
from exceptions import __hash__
```



---
## __name__
```python
from typing import __name__
```



---
## Retrieve
```python
from typing import Retrieve
```

A retrieval callable, usable within a `Registry` for resource retrieval.

Does not make assumptions about where the resource might be coming from.

---
## Anchor
```python
from typing import Anchor
```

An anchor within a `Resource`.

Beyond "simple" anchors, some specifications like JSON Schema's 2020
version have dynamic anchors.

---
## __call__
```python
from typing import __call__
```



---
## name
```python
from typing import name
```

Return the name of this anchor.

---
## resolve
```python
from typing import resolve
```

Return the resource for this anchor.

---
## __name__
```python
from jsonschema import __name__
```

Referencing implementations for JSON Schema specs (historic & current).

---
## UnknownDialect
```python
from jsonschema import UnknownDialect
```

A dialect identifier was found for a dialect unknown by this library.

If it's a custom ("unofficial") dialect, be sure you've registered it.

---
## _dollar_id
```python
from jsonschema import _dollar_id
```



---
## _legacy_dollar_id
```python
from jsonschema import _legacy_dollar_id
```



---
## _legacy_id
```python
from jsonschema import _legacy_id
```



---
## _anchor
```python
from jsonschema import _anchor
```



---
## _anchor_2019
```python
from jsonschema import _anchor_2019
```



---
## _legacy_anchor_in_dollar_id
```python
from jsonschema import _legacy_anchor_in_dollar_id
```



---
## _legacy_anchor_in_id
```python
from jsonschema import _legacy_anchor_in_id
```



---
## _subresources_of
```python
from jsonschema import _subresources_of
```

Create a callable returning JSON Schema specification-style subschemas.

Relies on specifying the set of keywords containing subschemas in their
values, in a subobject's values, or in a subarray.

---
## _subresources_of_with_crazy_items
```python
from jsonschema import _subresources_of_with_crazy_items
```

Specifically handle older drafts where there are some funky keywords.

---
## _subresources_of_with_crazy_items_dependencies
```python
from jsonschema import _subresources_of_with_crazy_items_dependencies
```

Specifically handle older drafts where there are some funky keywords.

---
## _subresources_of_with_crazy_aP_items_dependencies
```python
from jsonschema import _subresources_of_with_crazy_aP_items_dependencies
```

Specifically handle even older drafts where there are some funky keywords.

---
## _maybe_in_subresource
```python
from jsonschema import _maybe_in_subresource
```



---
## _maybe_in_subresource_crazy_items
```python
from jsonschema import _maybe_in_subresource_crazy_items
```



---
## _maybe_in_subresource_crazy_items_dependencies
```python
from jsonschema import _maybe_in_subresource_crazy_items_dependencies
```



---
## specification_with
```python
from jsonschema import specification_with
```

Retrieve the `Specification` with the given dialect identifier.

Raises:

    `UnknownDialect`

        if the given ``dialect_id`` isn't known

---
## DynamicAnchor
```python
from jsonschema import DynamicAnchor
```

Dynamic anchors, introduced in draft 2020.

---
## lookup_recursive_ref
```python
from jsonschema import lookup_recursive_ref
```

Recursive references (via recursive anchors), present only in draft 2019.

As per the 2019 specification (§ 8.2.4.2.1), only the ``#`` recursive
reference is supported (and is therefore assumed to be the relevant
reference).

---
## subresources_of
```python
from jsonschema import subresources_of
```



---
## maybe_in_subresource
```python
from jsonschema import maybe_in_subresource
```



---
## resolve
```python
from jsonschema import resolve
```

Resolve this anchor dynamically.

---
## __name__
```python
from responses import __name__
```



---
## Response
```python
from responses import Response
```



---
## HTMLResponse
```python
from responses import HTMLResponse
```



---
## PlainTextResponse
```python
from responses import PlainTextResponse
```



---
## JSONResponse
```python
from responses import JSONResponse
```



---
## RedirectResponse
```python
from responses import RedirectResponse
```



---
## StreamingResponse
```python
from responses import StreamingResponse
```



---
## FileResponse
```python
from responses import FileResponse
```



---
## __init__
```python
from responses import __init__
```



---
## render
```python
from responses import render
```



---
## init_headers
```python
from responses import init_headers
```



---
## headers
```python
from responses import headers
```



---
## set_cookie
```python
from responses import set_cookie
```



---
## delete_cookie
```python
from responses import delete_cookie
```



---
## set_stat_headers
```python
from responses import set_stat_headers
```



---
## undefined
```python
from config import undefined
```



---
## EnvironError
```python
from config import EnvironError
```



---
## Environ
```python
from config import Environ
```



---
## Config
```python
from config import Config
```



---
## __init__
```python
from config import __init__
```



---
## __getitem__
```python
from config import __getitem__
```



---
## __setitem__
```python
from config import __setitem__
```



---
## __delitem__
```python
from config import __delitem__
```



---
## __iter__
```python
from config import __iter__
```



---
## __len__
```python
from config import __len__
```



---
## __call__
```python
from config import __call__
```



---
## get
```python
from config import get
```



---
## _read_file
```python
from config import _read_file
```



---
## _perform_cast
```python
from config import _perform_cast
```



---
## __name__
```python
from templating import __name__
```



---
## _TemplateResponse
```python
from templating import _TemplateResponse
```



---
## Jinja2Templates
```python
from templating import Jinja2Templates
```

templates = Jinja2Templates("templates")

return templates.TemplateResponse("index.html", {"request": request})

---
## __init__
```python
from templating import __init__
```



---
## _create_env
```python
from templating import _create_env
```



---
## _setup_env_defaults
```python
from templating import _setup_env_defaults
```



---
## get_template
```python
from templating import get_template
```



---
## TemplateResponse
```python
from templating import TemplateResponse
```



---
## url_for
```python
from templating import url_for
```



---
## __name__
```python
from websockets import __name__
```



---
## WebSocketState
```python
from websockets import WebSocketState
```



---
## WebSocketDisconnect
```python
from websockets import WebSocketDisconnect
```



---
## WebSocket
```python
from websockets import WebSocket
```



---
## WebSocketClose
```python
from websockets import WebSocketClose
```



---
## __init__
```python
from websockets import __init__
```



---
## _raise_on_disconnect
```python
from websockets import _raise_on_disconnect
```



---
## __name__
```python
from applications import __name__
```



---
## Starlette
```python
from applications import Starlette
```

Creates an application instance.

**Parameters:**

* **debug** - Boolean indicating if debug tracebacks should be returned on errors.
* **routes** - A list of routes to serve incoming HTTP and WebSocket requests.
* **middleware** - A list of middleware to run for every request. A starlette
application will always automatically include two middleware classes.
`ServerErrorMiddleware` is added as the very outermost middleware, to handle
any uncaught errors occurring anywhere in the entire stack.
`ExceptionMiddleware` is added as the very innermost middleware, to deal
with handled exception cases occurring in the routing or endpoints.
* **exception_handlers** - A mapping of either integer status codes,
or exception class types onto callables which handle the exceptions.
Exception handler callables should be of the form
`handler(request, exc) -> response` and may be either standard functions, or
async functions.
* **on_startup** - A list of callables to run on application startup.
Startup handler callables do not take any arguments, and may be either
standard functions, or async functions.
* **on_shutdown** - A list of callables to run on application shutdown.
Shutdown handler callables do not take any arguments, and may be either
standard functions, or async functions.
* **lifespan** - A lifespan context function, which can be used to perform
startup and shutdown tasks. This is a newer style that replaces the
`on_startup` and `on_shutdown` handlers. Use one or the other, not both.

---
## __init__
```python
from applications import __init__
```



---
## build_middleware_stack
```python
from applications import build_middleware_stack
```



---
## routes
```python
from applications import routes
```



---
## url_path_for
```python
from applications import url_path_for
```



---
## on_event
```python
from applications import on_event
```

Add an event handler for the application.

`on_event` is deprecated, use `lifespan` event handlers instead.

Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/#alternative-events-deprecated).

---
## mount
```python
from applications import mount
```



---
## host
```python
from applications import host
```



---
## add_middleware
```python
from applications import add_middleware
```



---
## add_exception_handler
```python
from applications import add_exception_handler
```



---
## add_event_handler
```python
from applications import add_event_handler
```



---
## add_route
```python
from applications import add_route
```



---
## add_websocket_route
```python
from applications import add_websocket_route
```



---
## exception_handler
```python
from applications import exception_handler
```

Add an exception handler to the app.

Read more about it in the
[FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).

## Example

```python
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse


class UnicornException(Exception):
    def __init__(self, name: str):
        self.name = name


app = FastAPI()


@app.exception_handler(UnicornException)
async def unicorn_exception_handler(request: Request, exc: UnicornException):
    return JSONResponse(
        status_code=418,
        content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."},
    )
```

---
## route
```python
from applications import route
```

We no longer document this decorator style API, and its usage is discouraged.
Instead you should use the following approach:

>>> routes = [Route(path, endpoint=...), ...]
>>> app = Starlette(routes=routes)

---
## websocket_route
```python
from applications import websocket_route
```



---
## middleware
```python
from applications import middleware
```

Add a middleware to the application.

Read more about it in the
[FastAPI docs for Middleware](https://fastapi.tiangolo.com/tutorial/middleware/).

## Example

```python
import time

from fastapi import FastAPI, Request

app = FastAPI()


@app.middleware("http")
async def add_process_time_header(request: Request, call_next):
    start_time = time.time()
    response = await call_next(request)
    process_time = time.time() - start_time
    response.headers["X-Process-Time"] = str(process_time)
    return response
```

---
## decorator
```python
from applications import decorator
```



---
## __name__
```python
from concurrency import __name__
```



---
## _StopIteration
```python
from concurrency import _StopIteration
```



---
## _next
```python
from concurrency import _next
```



---
## __name__
```python
from background import __name__
```



---
## BackgroundTask
```python
from background import BackgroundTask
```



---
## BackgroundTasks
```python
from background import BackgroundTasks
```

A collection of background tasks that will be called after a response has been
sent to the client.

Read more about it in the
[FastAPI docs for Background Tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).

## Example

```python
from fastapi import BackgroundTasks, FastAPI

app = FastAPI()


def write_notification(email: str, message=""):
    with open("log.txt", mode="w") as email_file:
        content = f"notification for {email}: {message}"
        email_file.write(content)


@app.post("/send-notification/{email}")
async def send_notification(email: str, background_tasks: BackgroundTasks):
    background_tasks.add_task(write_notification, email, message="some notification")
    return {"message": "Notification sent in the background"}
```

---
## __init__
```python
from background import __init__
```



---
## add_task
```python
from background import add_task
```

Add a function to be called in the background after the response is sent.

Read more about it in the
[FastAPI docs for Background Tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).

---
## __name__
```python
from convertors import __name__
```



---
## Convertor
```python
from convertors import Convertor
```



---
## StringConvertor
```python
from convertors import StringConvertor
```



---
## PathConvertor
```python
from convertors import PathConvertor
```



---
## IntegerConvertor
```python
from convertors import IntegerConvertor
```



---
## FloatConvertor
```python
from convertors import FloatConvertor
```



---
## UUIDConvertor
```python
from convertors import UUIDConvertor
```



---
## register_url_convertor
```python
from convertors import register_url_convertor
```



---
## convert
```python
from convertors import convert
```



---
## to_string
```python
from convertors import to_string
```



---
## __name__
```python
from staticfiles import __name__
```



---
## NotModifiedResponse
```python
from staticfiles import NotModifiedResponse
```



---
## StaticFiles
```python
from staticfiles import StaticFiles
```



---
## __init__
```python
from staticfiles import __init__
```



---
## get_directories
```python
from staticfiles import get_directories
```

Given `directory` and `packages` arguments, return a list of all the
directories that should be used for serving static files from.

---
## get_path
```python
from staticfiles import get_path
```

Given the ASGI scope, return the `path` string to serve up,
with OS specific path separators, and any '..', '.' components removed.

---
## lookup_path
```python
from staticfiles import lookup_path
```



---
## file_response
```python
from staticfiles import file_response
```



---
## is_not_modified
```python
from staticfiles import is_not_modified
```

Given the request and response headers, return `True` if an HTTP
"Not Modified" response could be returned instead.

---
## __name__
```python
from schemas import __name__
```



---
## OpenAPIResponse
```python
from schemas import OpenAPIResponse
```



---
## EndpointInfo
```python
from schemas import EndpointInfo
```



---
## BaseSchemaGenerator
```python
from schemas import BaseSchemaGenerator
```



---
## SchemaGenerator
```python
from schemas import SchemaGenerator
```



---
## render
```python
from schemas import render
```



---
## get_schema
```python
from schemas import get_schema
```



---
## get_endpoints
```python
from schemas import get_endpoints
```

Given the routes, yields the following information:

- path
    eg: /users/
- http_method
    one of 'get', 'post', 'put', 'patch', 'delete', 'options'
- func
    method ready to extract the docstring

---
## _remove_converter
```python
from schemas import _remove_converter
```

Remove the converter from the path.
For example, a route like this:
    Route("/users/{id:int}", endpoint=get_user, methods=["GET"])
Should be represented as `/users/{id}` in the OpenAPI schema.

---
## parse_docstring
```python
from schemas import parse_docstring
```

Given a function, parse the docstring as YAML and return a dictionary of info.

---
## __init__
```python
from schemas import __init__
```



---
## __name__
```python
from routing import __name__
```



---
## NoMatchFound
```python
from routing import NoMatchFound
```

Raised by `.url_for(name, **path_params)` and `.url_path_for(name, **path_params)`
if no matching route exists.

---
## Match
```python
from routing import Match
```



---
## iscoroutinefunction_or_partial
```python
from routing import iscoroutinefunction_or_partial
```

Correctly determines if an object is a coroutine function,
including those wrapped in functools.partial objects.

---
## request_response
```python
from routing import request_response
```

Takes a function or coroutine `func(request) -> response`,
and returns an ASGI application.

---
## websocket_session
```python
from routing import websocket_session
```

Takes a coroutine `func(session)`, and returns an ASGI application.

---
## get_name
```python
from routing import get_name
```



---
## replace_params
```python
from routing import replace_params
```



---
## compile_path
```python
from routing import compile_path
```

Given a path string, like: "/{username:str}",
or a host string, like: "{subdomain}.mydomain.org", return a three-tuple
of (regex, format, {param_name:convertor}).

regex:      "/(?P<username>[^/]+)"
format:     "/{username}"
convertors: {"username": StringConvertor()}

---
## BaseRoute
```python
from routing import BaseRoute
```



---
## Route
```python
from routing import Route
```



---
## WebSocketRoute
```python
from routing import WebSocketRoute
```



---
## Mount
```python
from routing import Mount
```



---
## Host
```python
from routing import Host
```



---
## _AsyncLiftContextManager
```python
from routing import _AsyncLiftContextManager
```



---
## _wrap_gen_lifespan_context
```python
from routing import _wrap_gen_lifespan_context
```



---
## _DefaultLifespan
```python
from routing import _DefaultLifespan
```



---
## Router
```python
from routing import Router
```



---
## __init__
```python
from routing import __init__
```



---
## matches
```python
from routing import matches
```



---
## url_path_for
```python
from routing import url_path_for
```



---
## __eq__
```python
from routing import __eq__
```



---
## __repr__
```python
from routing import __repr__
```



---
## routes
```python
from routing import routes
```



---
## wrapper
```python
from routing import wrapper
```



---
## __call__
```python
from routing import __call__
```



---
## mount
```python
from routing import mount
```



---
## host
```python
from routing import host
```



---
## add_route
```python
from routing import add_route
```



---
## add_websocket_route
```python
from routing import add_websocket_route
```



---
## route
```python
from routing import route
```



---
## websocket_route
```python
from routing import websocket_route
```



---
## add_event_handler
```python
from routing import add_event_handler
```



---
## on_event
```python
from routing import on_event
```

Add an event handler for the router.

`on_event` is deprecated, use `lifespan` event handlers instead.

Read more about it in the
[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/#alternative-events-deprecated).

---
## decorator
```python
from routing import decorator
```



---
## __name__
```python
from authentication import __name__
```



---
## has_required_scope
```python
from authentication import has_required_scope
```



---
## requires
```python
from authentication import requires
```



---
## AuthenticationError
```python
from authentication import AuthenticationError
```



---
## AuthenticationBackend
```python
from authentication import AuthenticationBackend
```



---
## AuthCredentials
```python
from authentication import AuthCredentials
```



---
## BaseUser
```python
from authentication import BaseUser
```



---
## SimpleUser
```python
from authentication import SimpleUser
```



---
## UnauthenticatedUser
```python
from authentication import UnauthenticatedUser
```



---
## decorator
```python
from authentication import decorator
```



---
## __init__
```python
from authentication import __init__
```



---
## is_authenticated
```python
from authentication import is_authenticated
```



---
## display_name
```python
from authentication import display_name
```



---
## identity
```python
from authentication import identity
```



---
## sync_wrapper
```python
from authentication import sync_wrapper
```



---
## __name__
```python
from testclient import __name__
```



---
## _is_asgi3
```python
from testclient import _is_asgi3
```



---
## _WrapASGI2
```python
from testclient import _WrapASGI2
```

Provide an ASGI3 interface onto an ASGI2 app.

---
## _AsyncBackend
```python
from testclient import _AsyncBackend
```



---
## _Upgrade
```python
from testclient import _Upgrade
```



---
## WebSocketDenialResponse
```python
from testclient import WebSocketDenialResponse
```

A special case of `WebSocketDisconnect`, raised in the `TestClient` if the
`WebSocket` is closed before being accepted with a `send_denial_response()`.

---
## WebSocketTestSession
```python
from testclient import WebSocketTestSession
```



---
## _TestClientTransport
```python
from testclient import _TestClientTransport
```



---
## TestClient
```python
from testclient import TestClient
```



---
## __init__
```python
from testclient import __init__
```



---
## __enter__
```python
from testclient import __enter__
```



---
## should_close
```python
from testclient import should_close
```



---
## __exit__
```python
from testclient import __exit__
```



---
## _raise_on_close
```python
from testclient import _raise_on_close
```



---
## send
```python
from testclient import send
```



---
## send_text
```python
from testclient import send_text
```



---
## send_bytes
```python
from testclient import send_bytes
```



---
## send_json
```python
from testclient import send_json
```



---
## close
```python
from testclient import close
```



---
## receive
```python
from testclient import receive
```



---
## receive_text
```python
from testclient import receive_text
```



---
## receive_bytes
```python
from testclient import receive_bytes
```



---
## receive_json
```python
from testclient import receive_json
```



---
## handle_request
```python
from testclient import handle_request
```



---
## _portal_factory
```python
from testclient import _portal_factory
```



---
## _choose_redirect_arg
```python
from testclient import _choose_redirect_arg
```



---
## request
```python
from testclient import request
```



---
## get
```python
from testclient import get
```



---
## options
```python
from testclient import options
```



---
## head
```python
from testclient import head
```



---
## post
```python
from testclient import post
```



---
## put
```python
from testclient import put
```



---
## patch
```python
from testclient import patch
```



---
## delete
```python
from testclient import delete
```



---
## websocket_connect
```python
from testclient import websocket_connect
```



---
## reset_portal
```python
from testclient import reset_portal
```



---
## wait_shutdown
```python
from testclient import wait_shutdown
```



---
## __name__
```python
from _exception_handler import __name__
```



---
## _lookup_exception_handler
```python
from _exception_handler import _lookup_exception_handler
```



---
## wrap_app_handling_exceptions
```python
from _exception_handler import wrap_app_handling_exceptions
```



---
## HTTPException
```python
from exceptions import HTTPException
```

An HTTP exception you can raise in your own code to show errors to the client.

This is for client errors, invalid authentication, invalid data, etc. Not for server
errors in your code.

Read more about it in the
[FastAPI docs for Handling Errors](https://fastapi.tiangolo.com/tutorial/handling-errors/).

## Example

```python
from fastapi import FastAPI, HTTPException

app = FastAPI()

items = {"foo": "The Foo Wrestlers"}


@app.get("/items/{item_id}")
async def read_item(item_id: str):
    if item_id not in items:
        raise HTTPException(status_code=404, detail="Item not found")
    return {"item": items[item_id]}
```

---
## WebSocketException
```python
from exceptions import WebSocketException
```

A WebSocket exception you can raise in your own code to show errors to the client.

This is for client errors, invalid authentication, invalid data, etc. Not for server
errors in your code.

Read more about it in the
[FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).

## Example

```python
from typing import Annotated

from fastapi import (
    Cookie,
    FastAPI,
    WebSocket,
    WebSocketException,
    status,
)

app = FastAPI()

@app.websocket("/items/{item_id}/ws")
async def websocket_endpoint(
    *,
    websocket: WebSocket,
    session: Annotated[str | None, Cookie()] = None,
    item_id: str,
):
    if session is None:
        raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION)
    await websocket.accept()
    while True:
        data = await websocket.receive_text()
        await websocket.send_text(f"Session cookie is: {session}")
        await websocket.send_text(f"Message text was: {data}, for item ID: {item_id}")
```

---
## __getattr__
```python
from exceptions import __getattr__
```



---
## __dir__
```python
from exceptions import __dir__
```



---
## __name__
```python
from _compat import __name__
```



---
## md5_hexdigest
```python
from _compat import md5_hexdigest
```



---
## __name__
```python
from requests import __name__
```

Simple requests package loader

---
## cookie_parser
```python
from requests import cookie_parser
```

This function parses a ``Cookie`` HTTP header into a dict of key/value pairs.

It attempts to mimic browser cookie parsing behavior: browsers and web servers
frequently disregard the spec (RFC 6265) when setting and reading cookies,
so we attempt to suit the common scenarios here.

This function has been adapted from Django 3.1.0.
Note: we are explicitly _NOT_ using `SimpleCookie.load` because it is based
on an outdated spec and will fail on lots of input we want to support

---
## ClientDisconnect
```python
from requests import ClientDisconnect
```



---
## HTTPConnection
```python
from requests import HTTPConnection
```

A base class for incoming HTTP connections, that is used to provide
any functionality that is common to both `Request` and `WebSocket`.

---
## Request
```python
from requests import Request
```



---
## __init__
```python
from requests import __init__
```



---
## __getitem__
```python
from requests import __getitem__
```



---
## __iter__
```python
from requests import __iter__
```



---
## __len__
```python
from requests import __len__
```



---
## app
```python
from requests import app
```



---
## url
```python
from requests import url
```



---
## base_url
```python
from requests import base_url
```



---
## headers
```python
from requests import headers
```



---
## query_params
```python
from requests import query_params
```



---
## path_params
```python
from requests import path_params
```



---
## cookies
```python
from requests import cookies
```



---
## client
```python
from requests import client
```



---
## session
```python
from requests import session
```



---
## auth
```python
from requests import auth
```



---
## user
```python
from requests import user
```



---
## state
```python
from requests import state
```



---
## url_for
```python
from requests import url_for
```



---
## method
```python
from requests import method
```



---
## receive
```python
from requests import receive
```



---
## form
```python
from requests import form
```



---
## __name__
```python
from datastructures import __name__
```



---
## Address
```python
from datastructures import Address
```



---
## URL
```python
from datastructures import URL
```



---
## URLPath
```python
from datastructures import URLPath
```

A URL path string that may also hold an associated protocol and/or host.
Used by the routing to return `url_path_for` matches.

---
## Secret
```python
from datastructures import Secret
```

Holds a string value that should not be revealed in tracebacks etc.
You should cast the value to `str` at the point it is required.

---
## CommaSeparatedStrings
```python
from datastructures import CommaSeparatedStrings
```



---
## ImmutableMultiDict
```python
from datastructures import ImmutableMultiDict
```



---
## MultiDict
```python
from datastructures import MultiDict
```



---
## QueryParams
```python
from datastructures import QueryParams
```

An immutable multidict.

---
## UploadFile
```python
from datastructures import UploadFile
```

A file uploaded in a request.

Define it as a *path operation function* (or dependency) parameter.

If you are using a regular `def` function, you can use the `upload_file.file`
attribute to access the raw standard Python file (blocking, not async), useful and
needed for non-async code.

Read more about it in the
[FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/).

## Example

```python
from typing import Annotated

from fastapi import FastAPI, File, UploadFile

app = FastAPI()


@app.post("/files/")
async def create_file(file: Annotated[bytes, File()]):
    return {"file_size": len(file)}


@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile):
    return {"filename": file.filename}
```

---
## FormData
```python
from datastructures import FormData
```

An immutable multidict, containing both file uploads and text input.

---
## Headers
```python
from datastructures import Headers
```

Efficient data structure for manipulating HTTP headers.

A :class:`list` of ``(name, values)`` is inefficient for lookups.

A :class:`dict` doesn't suffice because header names are case-insensitive
and multiple occurrences of headers with the same name are possible.

:class:`Headers` stores HTTP headers in a hybrid data structure to provide
efficient insertions and lookups while preserving the original data.

In order to account for multiple values with minimal hassle,
:class:`Headers` follows this logic:

- When getting a header with ``headers[name]``:
    - if there's no value, :exc:`KeyError` is raised;
    - if there's exactly one value, it's returned;
    - if there's more than one value, :exc:`MultipleValuesError` is raised.

- When setting a header with ``headers[name] = value``, the value is
  appended to the list of values for that header.

- When deleting a header with ``del headers[name]``, all values for that
  header are removed (this is slow).

Other methods for manipulating headers are consistent with this logic.

As long as no header occurs multiple times, :class:`Headers` behaves like
:class:`dict`, except keys are lower-cased to provide case-insensitivity.

Two methods support manipulating multiple values explicitly:

- :meth:`get_all` returns a list of all values for a header;
- :meth:`raw_items` returns an iterator of ``(name, values)`` pairs.

---
## MutableHeaders
```python
from datastructures import MutableHeaders
```



---
## State
```python
from datastructures import State
```

An object that can be used to store arbitrary state.

Used for `request.state` and `app.state`.

---
## __init__
```python
from datastructures import __init__
```



---
## components
```python
from datastructures import components
```



---
## scheme
```python
from datastructures import scheme
```



---
## netloc
```python
from datastructures import netloc
```



---
## path
```python
from datastructures import path
```



---
## query
```python
from datastructures import query
```



---
## fragment
```python
from datastructures import fragment
```



---
## username
```python
from datastructures import username
```



---
## password
```python
from datastructures import password
```



---
## hostname
```python
from datastructures import hostname
```



---
## port
```python
from datastructures import port
```



---
## is_secure
```python
from datastructures import is_secure
```



---
## replace
```python
from datastructures import replace
```



---
## include_query_params
```python
from datastructures import include_query_params
```



---
## replace_query_params
```python
from datastructures import replace_query_params
```



---
## remove_query_params
```python
from datastructures import remove_query_params
```



---
## __eq__
```python
from datastructures import __eq__
```



---
## __str__
```python
from datastructures import __str__
```



---
## __repr__
```python
from datastructures import __repr__
```



---
## __new__
```python
from datastructures import __new__
```



---
## make_absolute_url
```python
from datastructures import make_absolute_url
```



---
## __bool__
```python
from datastructures import __bool__
```



---
## __len__
```python
from datastructures import __len__
```



---
## __getitem__
```python
from datastructures import __getitem__
```



---
## __iter__
```python
from datastructures import __iter__
```



---
## getlist
```python
from datastructures import getlist
```



---
## keys
```python
from datastructures import keys
```



---
## values
```python
from datastructures import values
```



---
## items
```python
from datastructures import items
```



---
## multi_items
```python
from datastructures import multi_items
```



---
## __contains__
```python
from datastructures import __contains__
```



---
## __setitem__
```python
from datastructures import __setitem__
```



---
## __delitem__
```python
from datastructures import __delitem__
```



---
## pop
```python
from datastructures import pop
```



---
## popitem
```python
from datastructures import popitem
```



---
## poplist
```python
from datastructures import poplist
```



---
## clear
```python
from datastructures import clear
```

Remove all headers.

---
## setdefault
```python
from datastructures import setdefault
```

If the header `key` does not exist, then set it to `value`.
Returns the header value.

---
## setlist
```python
from datastructures import setlist
```



---
## append
```python
from datastructures import append
```

Append a header, preserving any duplicate entries.

---
## update
```python
from datastructures import update
```

Update from a :class:`Headers` instance and/or keyword arguments.

---
## content_type
```python
from datastructures import content_type
```



---
## _in_memory
```python
from datastructures import _in_memory
```



---
## raw
```python
from datastructures import raw
```



---
## mutablecopy
```python
from datastructures import mutablecopy
```



---
## __ior__
```python
from datastructures import __ior__
```



---
## __or__
```python
from datastructures import __or__
```



---
## add_vary_header
```python
from datastructures import add_vary_header
```



---
## __setattr__
```python
from datastructures import __setattr__
```



---
## __getattr__
```python
from datastructures import __getattr__
```



---
## __delattr__
```python
from datastructures import __delattr__
```



---
## __name__
```python
from endpoints import __name__
```



---
## HTTPEndpoint
```python
from endpoints import HTTPEndpoint
```



---
## WebSocketEndpoint
```python
from endpoints import WebSocketEndpoint
```



---
## __init__
```python
from endpoints import __init__
```



---
## __await__
```python
from endpoints import __await__
```



---
## __name__
```python
from formparsers import __name__
```



---
## FormMessage
```python
from formparsers import FormMessage
```



---
## MultipartPart
```python
from formparsers import MultipartPart
```



---
## _user_safe_decode
```python
from formparsers import _user_safe_decode
```



---
## MultiPartException
```python
from formparsers import MultiPartException
```



---
## FormParser
```python
from formparsers import FormParser
```



---
## MultiPartParser
```python
from formparsers import MultiPartParser
```



---
## __init__
```python
from formparsers import __init__
```



---
## on_field_start
```python
from formparsers import on_field_start
```



---
## on_field_name
```python
from formparsers import on_field_name
```



---
## on_field_data
```python
from formparsers import on_field_data
```



---
## on_field_end
```python
from formparsers import on_field_end
```



---
## on_end
```python
from formparsers import on_end
```



---
## on_part_begin
```python
from formparsers import on_part_begin
```



---
## on_part_data
```python
from formparsers import on_part_data
```



---
## on_part_end
```python
from formparsers import on_part_end
```



---
## on_header_field
```python
from formparsers import on_header_field
```



---
## on_header_value
```python
from formparsers import on_header_value
```



---
## on_header_end
```python
from formparsers import on_header_end
```



---
## on_headers_finished
```python
from formparsers import on_headers_finished
```



---
## is_async_callable
```python
from _utils import is_async_callable
```



---
## AwaitableOrContextManager
```python
from _utils import AwaitableOrContextManager
```



---
## SupportsAsyncClose
```python
from _utils import SupportsAsyncClose
```



---
## AwaitableOrContextManagerWrapper
```python
from _utils import AwaitableOrContextManagerWrapper
```



---
## collapse_excgroups
```python
from _utils import collapse_excgroups
```



---
## get_route_path
```python
from _utils import get_route_path
```



---
## __init__
```python
from _utils import __init__
```



---
## __await__
```python
from _utils import __await__
```



---
## __name__
```python
from status import __name__
```



---
## __getattr__
```python
from status import __getattr__
```



---
## __dir__
```python
from status import __dir__
```



---
## append_dir_sep
```python
from util import append_dir_sep
```

Appends the path separator to the path if the path is a directory.
This can be used to aid in distinguishing between directories and
files on the file-system by relying on the presence of a trailing path
separator.

*path* (:class:`pathlib.Path`) is the path to use.

Returns the path (:class:`str`).

---
## check_match_file
```python
from util import check_match_file
```

Check the file against the patterns.

*patterns* (:class:`~collections.abc.Iterable`) yields each indexed pattern
(:class:`tuple`) which contains the pattern index (:class:`int`) and actual
pattern (:class:`~pathspec.pattern.Pattern`).

*file* (:class:`str`) is the normalized file path to be matched
against *patterns*.

Returns a :class:`tuple` containing whether to include *file* (:class:`bool`
or :data:`None`), and the index of the last matched pattern (:class:`int` or
:data:`None`).

---
## detailed_match_files
```python
from util import detailed_match_files
```

Matches the files to the patterns, and returns which patterns matched
the files.

*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
contains the patterns to use.

*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains
the normalized file paths to be matched against *patterns*.

*all_matches* (:class:`bool` or :data:`None`) is whether to return all
matches patterns (:data:`True`), or only the last matched pattern
(:data:`False`). Default is :data:`None` for :data:`False`.

Returns the matched files (:class:`dict`) which maps each matched file
(:class:`str`) to the patterns that matched in order (:class:`.MatchDetail`).

---
## _filter_check_patterns
```python
from util import _filter_check_patterns
```

Filters out null-patterns.

*patterns* (:class:`Iterable` of :class:`.Pattern`) contains the
patterns.

Returns a :class:`list` containing each indexed pattern (:class:`tuple`) which
contains the pattern index (:class:`int`) and the actual pattern
(:class:`~pathspec.pattern.Pattern`).

---
## _is_iterable
```python
from util import _is_iterable
```



---
## iter_tree_entries
```python
from util import iter_tree_entries
```

Walks the specified directory for all files and directories.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
optionally is the error handler for file-system exceptions. It will be
called with the exception (:exc:`OSError`). Reraise the exception to
abort the walk. Default is :data:`None` to ignore file-system
exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether
to walk symbolic links that resolve to directories. Default is
:data:`None` for :data:`True`.

Raises :exc:`RecursionError` if recursion is detected.

Returns an :class:`~collections.abc.Iterator` yielding each file or
directory entry (:class:`.TreeEntry`) relative to *root*.

---
## _iter_tree_entries_next
```python
from util import _iter_tree_entries_next
```

Scan the directory for all descendant files.

*root_full* (:class:`str`) the absolute path to the root directory.

*dir_rel* (:class:`str`) the path to the directory to scan relative to
*root_full*.

*memo* (:class:`dict`) keeps track of ancestor directories
encountered. Maps each ancestor real path (:class:`str`) to relative
path (:class:`str`).

*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
optionally is the error handler for file-system exceptions.

*follow_links* (:class:`bool`) is whether to walk symbolic links that
resolve to directories.

Yields each entry (:class:`.TreeEntry`).

---
## iter_tree_files
```python
from util import iter_tree_files
```

Walks the specified directory for all files.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search for files.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
optionally is the error handler for file-system exceptions. It will be
called with the exception (:exc:`OSError`). Reraise the exception to
abort the walk. Default is :data:`None` to ignore file-system
exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether
to walk symbolic links that resolve to directories. Default is
:data:`None` for :data:`True`.

Raises :exc:`RecursionError` if recursion is detected.

Returns an :class:`~collections.abc.Iterator` yielding the path to
each file (:class:`str`) relative to *root*.

---
## iter_tree
```python
from util import iter_tree
```

DEPRECATED: The :func:`.iter_tree` function is an alias for the
:func:`.iter_tree_files` function.

---
## lookup_pattern
```python
from util import lookup_pattern
```

Lookups a registered pattern factory by name.

*name* (:class:`str`) is the name of the pattern factory.

Returns the registered pattern factory (:class:`~collections.abc.Callable`).
If no pattern factory is registered, raises :exc:`KeyError`.

---
## match_file
```python
from util import match_file
```

Matches the file to the patterns.

*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
contains the patterns to use.

*file* (:class:`str`) is the normalized file path to be matched
against *patterns*.

Returns :data:`True` if *file* matched; otherwise, :data:`False`.

---
## match_files
```python
from util import match_files
```

DEPRECATED: This is an old function no longer used. Use the
:func:`~pathspec.util.match_file` function with a loop for better results.

Matches the files to the patterns.

*patterns* (:class:`~collections.abc.Iterable` of :class:`~pathspec.pattern.Pattern`)
contains the patterns to use.

*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains
the normalized file paths to be matched against *patterns*.

Returns the matched files (:class:`set` of :class:`str`).

---
## normalize_file
```python
from util import normalize_file
```

Normalizes the file path to use the POSIX path separator (i.e.,
``"/"``), and make the paths relative (remove leading ``"/"``).

*file* (:class:`str` or :class:`os.PathLike`) is the file path.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
``None``) optionally contains the path separators to normalize.
This does not need to include the POSIX path separator (``"/"``),
but including it will not affect the results. Default is ``None``
for ``NORMALIZE_PATH_SEPS``. To prevent normalization, pass an
empty container (e.g., an empty tuple ``()``).

Returns the normalized file path (:class:`str`).

---
## normalize_files
```python
from util import normalize_files
```

DEPRECATED: This function is no longer used. Use the :func:`.normalize_file`
function with a loop for better results.

Normalizes the file paths to use the POSIX path separator.

*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be normalized.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize.
See :func:`normalize_file` for more information.

Returns a :class:`dict` mapping each normalized file path (:class:`str`)
to the original file paths (:class:`list` of :class:`str` or
:class:`os.PathLike`).

---
## register_pattern
```python
from util import register_pattern
```

Registers the specified pattern factory.

*name* (:class:`str`) is the name to register the pattern factory
under.

*pattern_factory* (:class:`~collections.abc.Callable`) is used to
compile patterns. It must accept an uncompiled pattern (:class:`str`)
and return the compiled pattern (:class:`.Pattern`).

*override* (:class:`bool` or :data:`None`) optionally is whether to
allow overriding an already registered pattern under the same name
(:data:`True`), instead of raising an :exc:`AlreadyRegisteredError`
(:data:`False`). Default is :data:`None` for :data:`False`.

---
## AlreadyRegisteredError
```python
from util import AlreadyRegisteredError
```

The :exc:`AlreadyRegisteredError` exception is raised when a pattern
factory is registered under a name already in use.

---
## RecursionError
```python
from util import RecursionError
```

The :exc:`RecursionError` exception is raised when recursion is
detected.

---
## CheckResult
```python
from util import CheckResult
```

The :class:`CheckResult` class contains information about the file and which
pattern matched it.

---
## MatchDetail
```python
from util import MatchDetail
```

The :class:`.MatchDetail` class contains information about

---
## TreeEntry
```python
from util import TreeEntry
```

The :class:`.TreeEntry` class contains information about a file-system
entry.

---
## message
```python
from util import message
```

*message* (:class:`str`) is the error message.

---
## name
```python
from util import name
```

*name* (:class:`str`) is the name of the registered pattern.

---
## pattern_factory
```python
from util import pattern_factory
```

*pattern_factory* (:class:`~collections.abc.Callable`) is the
registered pattern factory.

---
## first_path
```python
from util import first_path
```

*first_path* (:class:`str`) is the first path encountered for
:attr:`self.real_path <RecursionError.real_path>`.

---
## real_path
```python
from util import real_path
```

*real_path* (:class:`str`) is the real path that recursion was
encountered on.

---
## second_path
```python
from util import second_path
```

*second_path* (:class:`str`) is the second path encountered for
:attr:`self.real_path <RecursionError.real_path>`.

---
## is_dir
```python
from util import is_dir
```

Get whether the entry is a directory.

*follow_links* (:class:`bool` or :data:`None`) is whether to follow
symbolic links. If this is :data:`True`, a symlink to a directory
will result in :data:`True`. Default is :data:`None` for :data:`True`.

Returns whether the entry is a directory (:class:`bool`).

---
## is_file
```python
from util import is_file
```

Get whether the entry is a regular file.

*follow_links* (:class:`bool` or :data:`None`) is whether to follow
symbolic links. If this is :data:`True`, a symlink to a regular file
will result in :data:`True`. Default is :data:`None` for :data:`True`.

Returns whether the entry is a regular file (:class:`bool`).

---
## is_symlink
```python
from util import is_symlink
```

Returns whether the entry is a symbolic link (:class:`bool`).

---
## stat
```python
from util import stat
```

Get the cached stat result for the entry.

*follow_links* (:class:`bool` or :data:`None`) is whether to follow
symbolic links. If this is :data:`True`, the stat result of the
linked file will be returned. Default is :data:`None` for :data:`True`.

Returns that stat result (:class:`os.stat_result`).

---
## __name__
```python
from pattern import __name__
```

This module provides the base definition for patterns.

---
## Pattern
```python
from pattern import Pattern
```

The :class:`Pattern` class is the abstract definition of a pattern.

---
## RegexPattern
```python
from pattern import RegexPattern
```

The :class:`RegexPattern` class is an implementation of a pattern using
regular expressions.

---
## RegexMatchResult
```python
from pattern import RegexMatchResult
```

The :class:`RegexMatchResult` data class is used to return information about
the matched regular expression.

---
## __init__
```python
from pattern import __init__
```

Initializes the :class:`RegexPattern` instance.

*pattern* (:class:`str`, :class:`bytes`, :class:`re.Pattern`, or
:data:`None`) is the pattern to compile into a regular expression.

*include* (:class:`bool` or :data:`None`) must be :data:`None` unless
*pattern* is a precompiled regular expression (:class:`re.Pattern`) in which
case it is whether matched files should be included (:data:`True`), excluded
(:data:`False`), or is a null operation (:data:`None`).

        .. NOTE:: Subclasses do not need to support the *include* parameter.

---
## match
```python
from pattern import match
```

DEPRECATED: This method is no longer used and has been replaced by
:meth:`.match_file`. Use the :meth:`.match_file` method with a loop for
similar results.

Matches this pattern against the specified files.

*files* (:class:`~collections.abc.Iterable` of :class:`str`) contains each
file relative to the root directory (e.g., ``"relative/path/to/file"``).

Returns an :class:`~collections.abc.Iterable` yielding each matched file
path (:class:`str`).

---
## match_file
```python
from pattern import match_file
```

Matches this pattern against the specified file.

*file* (:class:`str`) contains each file relative to the root directory
(e.g., "relative/path/to/file").

Returns the match result (:class:`.RegexMatchResult`) if *file* matched;
otherwise, :data:`None`.

---
## __eq__
```python
from pattern import __eq__
```

Tests the equality of this regex pattern with *other* (:class:`RegexPattern`)
by comparing their :attr:`~Pattern.include` and :attr:`~RegexPattern.regex`
attributes.

---
## pattern_to_regex
```python
from pattern import pattern_to_regex
```

Convert the pattern into an uncompiled regular expression.

*pattern* (:class:`str`) is the pattern to convert into a regular
expression.

Returns the uncompiled regular expression (:class:`str` or :data:`None`),
and whether matched files should be included (:data:`True`), excluded
(:data:`False`), or is a null-operation (:data:`None`).

        .. NOTE:: The default implementation simply returns *pattern* and
           :data:`True`.

---
## __name__
```python
from pathspec import __name__
```

This module provides an object oriented interface for pattern matching of files.

---
## PathSpec
```python
from pathspec import PathSpec
```

The :class:`PathSpec` class is a wrapper around a list of compiled
:class:`.Pattern` instances.

---
## __init__
```python
from pathspec import __init__
```

Initializes the :class:`PathSpec` instance.

*patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
yields each compiled pattern (:class:`.Pattern`).

---
## __eq__
```python
from pathspec import __eq__
```

Tests the equality of this path-spec with *other* (:class:`PathSpec`)
by comparing their :attr:`~PathSpec.patterns` attributes.

---
## __len__
```python
from pathspec import __len__
```

Returns the number of compiled patterns this path-spec contains
(:class:`int`).

---
## __add__
```python
from pathspec import __add__
```

Combines the :attr:`Pathspec.patterns` patterns from two
:class:`PathSpec` instances.

---
## __iadd__
```python
from pathspec import __iadd__
```

Adds the :attr:`Pathspec.patterns` patterns from one :class:`PathSpec`
instance to this instance.

---
## check_file
```python
from pathspec import check_file
```

Check the files against this path-spec.

*file* (:class:`str` or :class:`os.PathLike`) is the file path to be
matched against :attr:`self.patterns <PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`~pathspec.util.normalize_file` for more information.

Returns the file check result (:class:`~pathspec.util.CheckResult`).

---
## check_files
```python
from pathspec import check_files
```

Check the files against this path-spec.

*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be checked against
:attr:`self.patterns <PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`~pathspec.util.normalize_file` for more information.

Returns an :class:`~collections.abc.Iterator` yielding each file check
result (:class:`~pathspec.util.CheckResult`).

---
## check_tree_files
```python
from pathspec import check_tree_files
```

Walks the specified root path for all files and checks them against this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search for files.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns an :class:`~collections.abc.Iterator` yielding each file check
result (:class:`~pathspec.util.CheckResult`).

---
## from_lines
```python
from pathspec import from_lines
```

Compiles the pattern lines.

*pattern_factory* can be either the name of a registered pattern factory
(:class:`str`), or a :class:`~collections.abc.Callable` used to compile
patterns. It must accept an uncompiled pattern (:class:`str`) and return the
compiled pattern (:class:`.Pattern`).

*lines* (:class:`~collections.abc.Iterable`) yields each uncompiled pattern
(:class:`str`). This simply has to yield each line so that it can be a
:class:`io.TextIOBase` (e.g., from :func:`open` or :class:`io.StringIO`) or
the result from :meth:`str.splitlines`.

Returns the :class:`PathSpec` instance.

---
## match_entries
```python
from pathspec import match_entries
```

Matches the entries to this path-spec.

*entries* (:class:`~collections.abc.Iterable` of :class:`~pathspec.util.TreeEntry`)
contains the entries to be matched against :attr:`self.patterns <PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`~pathspec.util.normalize_file` for more information.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched entries (:class:`~collections.abc.Iterator` of
:class:`~pathspec.util.TreeEntry`).

---
## match_file
```python
from pathspec import match_file
```

Matches the file to this path-spec.

*file* (:class:`str` or :class:`os.PathLike`) is the file path to be
matched against :attr:`self.patterns <PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`)
optionally contains the path separators to normalize. See
:func:`~pathspec.util.normalize_file` for more information.

Returns :data:`True` if *file* matched; otherwise, :data:`False`.

---
## match_files
```python
from pathspec import match_files
```

Matches the files to this path-spec.

*files* (:class:`~collections.abc.Iterable` of :class:`str` or
:class:`os.PathLike`) contains the file paths to be matched against
:attr:`self.patterns <PathSpec.patterns>`.

*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize. See
:func:`~pathspec.util.normalize_file` for more information.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterator` of
:class:`str` or :class:`os.PathLike`).

---
## match_tree_entries
```python
from pathspec import match_tree_entries
```

Walks the specified root path for all files and matches them to this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterator` of
:class:`.TreeEntry`).

---
## match_tree_files
```python
from pathspec import match_tree_files
```

Walks the specified root path for all files and matches them to this
path-spec.

*root* (:class:`str` or :class:`os.PathLike`) is the root directory to
search for files.

*on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
is the error handler for file-system exceptions. It will be called with the
exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
is :data:`None` to ignore file-system exceptions.

*follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
symbolic links that resolve to directories. Default is :data:`None` for
:data:`True`.

*negate* (:class:`bool` or :data:`None`) is whether to negate the match
results of the patterns. If :data:`True`, a pattern matching a file will
exclude the file rather than include it. Default is :data:`None` for
:data:`False`.

Returns the matched files (:class:`~collections.abc.Iterable` of
:class:`str`).

---
## __name__
```python
from gitignore import __name__
```

This module provides :class:`.GitIgnoreSpec` which replicates
*.gitignore* behavior.

---
## GitIgnoreSpec
```python
from gitignore import GitIgnoreSpec
```

The :class:`GitIgnoreSpec` class extends :class:`pathspec.pathspec.PathSpec` to
replicate *.gitignore* behavior.

---
## __eq__
```python
from gitignore import __eq__
```

Tests the equality of this gitignore-spec with *other* (:class:`GitIgnoreSpec`)
by comparing their :attr:`~pathspec.pattern.Pattern`
attributes. A non-:class:`GitIgnoreSpec` will not compare equal.

---
## from_lines
```python
from gitignore import from_lines
```

Compiles the pattern lines.

*lines* (:class:`~collections.abc.Iterable`) yields each uncompiled
pattern (:class:`str`). This simply has to yield each line so it can
be a :class:`io.TextIOBase` (e.g., from :func:`open` or
:class:`io.StringIO`) or the result from :meth:`str.splitlines`.

*pattern_factory* can be :data:`None`, the name of a registered
pattern factory (:class:`str`), or a :class:`~collections.abc.Callable`
used to compile patterns. The callable must accept an uncompiled
pattern (:class:`str`) and return the compiled pattern
(:class:`pathspec.pattern.Pattern`).
Default is :data:`None` for :class:`.GitWildMatchPattern`).

Returns the :class:`GitIgnoreSpec` instance.

---
## _match_file
```python
from gitignore import _match_file
```

Check the file against the patterns.

.. NOTE:: Subclasses of :class:`~pathspec.pathspec.PathSpec` may override
   this method as an instance method. It does not have to be a static
   method. The signature for this method is subject to change.

*patterns* (:class:`~collections.abc.Iterable`) yields each indexed pattern
(:class:`tuple`) which contains the pattern index (:class:`int`) and actual
pattern (:class:`~pathspec.pattern.Pattern`).

*file* (:class:`str`) is the normalized file path to be matched against
*patterns*.

Returns a :class:`tuple` containing whether to include *file* (:class:`bool`
or :data:`None`), and the index of the last matched pattern (:class:`int` or
:data:`None`).

---
## __name__
```python
from parser_block import __name__
```

Block-level tokenizer.

---
## ParserBlock
```python
from parser_block import ParserBlock
```

ParserBlock#ruler -> Ruler

[[Ruler]] instance. Keep configuration of block rules.

---
## __init__
```python
from parser_block import __init__
```



---
## tokenize
```python
from parser_block import tokenize
```

Generate tokens for input range.

---
## parse
```python
from parser_block import parse
```

Process input string and push block tokens into `outTokens`.

---
## __name__
```python
from tree import __name__
```



---
## _NesterTokens
```python
from tree import _NesterTokens
```



---
## SyntaxTreeNode
```python
from tree import SyntaxTreeNode
```

A Markdown syntax tree node.

A class that can be used to construct a tree representation of a linear
`markdown-it-py` token stream.

Each node in the tree represents either:
  - root of the Markdown document
  - a single unnested `Token`
  - a `Token` "_open" and "_close" token pair, and the tokens nested in
      between

---
## _removesuffix
```python
from tree import _removesuffix
```

Remove a suffix from a string.

Replace this with str.removesuffix() from stdlib when minimum Python
version is 3.9.

---
## __init__
```python
from tree import __init__
```



---
## __repr__
```python
from tree import __repr__
```



---
## __getitem__
```python
from tree import __getitem__
```



---
## to_tokens
```python
from tree import to_tokens
```

Recover the linear token stream.

---
## children
```python
from tree import children
```



---
## parent
```python
from tree import parent
```



---
## is_root
```python
from tree import is_root
```

Is the node a special root node?

---
## is_nested
```python
from tree import is_nested
```

Is this node nested?.

Returns `True` if the node represents a `Token` pair and tokens in the
sequence between them, where `Token.nesting` of the first `Token` in
the pair is 1 and nesting of the other `Token` is -1.

---
## siblings
```python
from tree import siblings
```

Get siblings of the node.

Gets the whole group of siblings, including self.

---
## type
```python
from tree import type
```

Get a string type of the represented syntax.

- "root" for root nodes
- `Token.type` if the node represents an unnested token
- `Token.type` of the opening token, with "_open" suffix stripped, if
    the node represents a nester token pair

---
## next_sibling
```python
from tree import next_sibling
```

Get the next node in the sequence of siblings.

Returns `None` if this is the last sibling.

---
## previous_sibling
```python
from tree import previous_sibling
```

Get the previous node in the sequence of siblings.

Returns `None` if this is the first sibling.

---
## _add_child
```python
from tree import _add_child
```

Make a child node for `self`.

---
## _set_children_from_tokens
```python
from tree import _set_children_from_tokens
```

Convert the token stream to a tree structure and set the resulting
nodes as children of `self`.

---
## pretty
```python
from tree import pretty
```

Create an XML style string of the tree.

---
## walk
```python
from tree import walk
```

Recursively yield all descendant nodes in the tree starting at self.

The order mimics the order of the underlying linear token
stream (i.e. depth first).

---
## _attribute_token
```python
from tree import _attribute_token
```

Return the `Token` that is used as the data source for the
properties defined below.

---
## tag
```python
from tree import tag
```

html tag name, e.g. "p" 

---
## attrs
```python
from tree import attrs
```

Html attributes.

---
## attrGet
```python
from tree import attrGet
```

Get the value of attribute `name`, or null if it does not exist.

---
## map
```python
from tree import map
```

Source map info. Format: `tuple[ line_begin, line_end ]`

---
## level
```python
from tree import level
```

nesting level, the same as `state.level`

---
## content
```python
from tree import content
```

In a case of self-closing tag (code, html, fence, etc.), it
has contents of this tag.

---
## markup
```python
from tree import markup
```

'*' or '_' for emphasis, fence string for fence, etc.

---
## info
```python
from tree import info
```

fence infostring

---
## meta
```python
from tree import meta
```

A place for plugins to store an arbitrary data.

---
## block
```python
from tree import block
```

True for block-level tokens, false for inline tokens.

---
## hidden
```python
from tree import hidden
```

If it's true, ignore this element when rendering.
Used for tight lists to hide paragraphs.

---
## recursive_collect_tokens
```python
from tree import recursive_collect_tokens
```



---
## convert_attrs
```python
from token import convert_attrs
```

Convert Token.attrs set as ``None`` or ``[[key, value], ...]`` to a dict.

This improves compatibility with upstream markdown-it.

---
## Token
```python
from token import Token
```



---
## __post_init__
```python
from token import __post_init__
```



---
## attrIndex
```python
from token import attrIndex
```



---
## attrItems
```python
from token import attrItems
```

Get (key, value) list of attrs.

---
## attrPush
```python
from token import attrPush
```

Add `[ name, value ]` attribute to list. Init attrs if necessary.

---
## attrSet
```python
from token import attrSet
```

Set `name` attribute to `value`. Override old value if exists.

---
## attrGet
```python
from token import attrGet
```

Get the value of attribute `name`, or null if it does not exist.

---
## attrJoin
```python
from token import attrJoin
```

Join value to existing attribute via space.
Or create new attribute if not exists.
Useful to operate with token classes.

---
## copy
```python
from token import copy
```

Return a shallow copy of the instance.

---
## as_dict
```python
from token import as_dict
```

Return the token as a dictionary.

:param children: Also convert children to dicts
:param as_upstream: Ensure the output dictionary is equal to that created by markdown-it
    For example, attrs are converted to null or lists
:param meta_serializer: hook for serializing ``Token.meta``
:param filter: A callable whose return code determines whether an
    attribute or element is included (``True``) or dropped (``False``).
    Is called with the (key, value) pair.
:param dict_factory: A callable to produce dictionaries from.
    For example, to produce ordered dictionaries instead of normal Python
    dictionaries, pass in ``collections.OrderedDict``.

---
## from_dict
```python
from token import from_dict
```

Convert a dict to a Token.

---
## __name__
```python
from _punycode import __name__
```



---
## encode
```python
from _punycode import encode
```



---
## decode
```python
from _punycode import decode
```



---
## map_domain
```python
from _punycode import map_domain
```



---
## to_unicode
```python
from _punycode import to_unicode
```



---
## to_ascii
```python
from _punycode import to_ascii
```



---
## mapping
```python
from _punycode import mapping
```



---
## __name__
```python
from renderer import __name__
```



---
## RendererProtocol
```python
from renderer import RendererProtocol
```



---
## RendererHTML
```python
from renderer import RendererHTML
```

Contains render rules for tokens. Can be updated and extended.

Example:

Each rule is called as independent static function with fixed signature:

::

    class Renderer:
        def token_type_name(self, tokens, idx, options, env) {
            # ...
            return renderedHTML

::

    class CustomRenderer(RendererHTML):
        def strong_open(self, tokens, idx, options, env):
            return '<b>'
        def strong_close(self, tokens, idx, options, env):
            return '</b>'

    md = MarkdownIt(renderer_cls=CustomRenderer)

    result = md.render(...)

See https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js
for more details and examples.

---
## render
```python
from renderer import render
```

Takes token stream and generates HTML.

:param tokens: list on block tokens to render
:param options: params of parser instance
:param env: additional data from parsed input

---
## __init__
```python
from renderer import __init__
```



---
## renderInline
```python
from renderer import renderInline
```

The same as ``render``, but for single token of `inline` type.

:param tokens: list on block tokens to render
:param options: params of parser instance
:param env: additional data from parsed input (references, for example)

---
## renderToken
```python
from renderer import renderToken
```

Default token renderer.

Can be overridden by custom function

:param idx: token index to render
:param options: params of parser instance

---
## renderAttrs
```python
from renderer import renderAttrs
```

Render token attributes to string.

---
## renderInlineAsText
```python
from renderer import renderInlineAsText
```

Special kludge for image `alt` attributes to conform CommonMark spec.

Don't try to use it! Spec requires to show `alt` content with stripped markup,
instead of simple escaping.

:param tokens: list on block tokens to render
:param options: params of parser instance
:param env: additional data from parsed input

---
## code_inline
```python
from renderer import code_inline
```



---
## code_block
```python
from renderer import code_block
```



---
## fence
```python
from renderer import fence
```



---
## image
```python
from renderer import image
```



---
## hardbreak
```python
from renderer import hardbreak
```



---
## softbreak
```python
from renderer import softbreak
```



---
## text
```python
from renderer import text
```



---
## html_block
```python
from renderer import html_block
```



---
## html_inline
```python
from renderer import html_inline
```



---
## __name__
```python
from ruler import __name__
```

class Ruler

Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and
[[MarkdownIt#inline]] to manage sequences of functions (rules):

- keep rules in defined order
- assign the name to each rule
- enable/disable rules
- add/replace rules
- allow assign rules to additional named chains (in the same)
- caching lists of active rules

You will not need use this class directly until write plugins. For simple
rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and
[[MarkdownIt.use]].

---
## StateBase
```python
from ruler import StateBase
```



---
## RuleOptionsType
```python
from ruler import RuleOptionsType
```



---
## Rule
```python
from ruler import Rule
```



---
## Ruler
```python
from ruler import Ruler
```



---
## __init__
```python
from ruler import __init__
```



---
## src
```python
from ruler import src
```



---
## srcCharCode
```python
from ruler import srcCharCode
```



---
## __find__
```python
from ruler import __find__
```

Find rule index by name

---
## __compile__
```python
from ruler import __compile__
```

Build rules lookup cache

---
## at
```python
from ruler import at
```

Replace rule by name with new function & options.

:param ruleName: rule name to replace.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

---
## before
```python
from ruler import before
```

Add new rule to chain before one with given name.

:param beforeName: new rule will be added before this one.
:param ruleName: new rule will be added before this one.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

---
## after
```python
from ruler import after
```

Add new rule to chain after one with given name.

:param afterName: new rule will be added after this one.
:param ruleName: new rule will be added after this one.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

---
## push
```python
from ruler import push
```

Push new rule to the end of chain.

:param ruleName: new rule will be added to the end of chain.
:param fn: new rule function.
:param options: new rule options (not mandatory).

---
## enable
```python
from ruler import enable
```

Enable rules with given names.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

---
## enableOnly
```python
from ruler import enableOnly
```

Enable rules with given names, and disable everything else.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

---
## disable
```python
from ruler import disable
```

Disable rules with given names.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

---
## getRules
```python
from ruler import getRules
```

Return array of active functions (rules) for given chain name.
It analyzes rules configuration, compiles caches if not exists and returns result.

Default chain name is `''` (empty string). It can't be skipped.
That's done intentionally, to keep signature monomorphic for high speed.

---
## get_all_rules
```python
from ruler import get_all_rules
```

Return all available rule names.

---
## get_active_rules
```python
from ruler import get_active_rules
```

Return the active rule names.

---
## __name__
```python
from parser_core import __name__
```

* class Core
*
* Top-level rules executor. Glues block/inline parsers and does intermediate
* transformations.

---
## ParserCore
```python
from parser_core import ParserCore
```



---
## __init__
```python
from parser_core import __init__
```



---
## process
```python
from parser_core import process
```

Executes core chain rules.

---
## OptionsType
```python
from utils import OptionsType
```

Options for parsing.

---
## PresetType
```python
from utils import PresetType
```

Preset configuration for markdown-it.

---
## OptionsDict
```python
from utils import OptionsDict
```

A dictionary, with attribute access to core markdownit configuration options.

---
## read_fixture_file
```python
from utils import read_fixture_file
```



---
## __str__
```python
from utils import __str__
```



---
## maxNesting
```python
from utils import maxNesting
```



---
## html
```python
from utils import html
```



---
## linkify
```python
from utils import linkify
```



---
## typographer
```python
from utils import typographer
```



---
## quotes
```python
from utils import quotes
```



---
## xhtmlOut
```python
from utils import xhtmlOut
```



---
## breaks
```python
from utils import breaks
```



---
## langPrefix
```python
from utils import langPrefix
```



---
## highlight
```python
from utils import highlight
```



---
## __name__
```python
from parser_inline import __name__
```

Tokenizes paragraph content.

---
## ParserInline
```python
from parser_inline import ParserInline
```



---
## __init__
```python
from parser_inline import __init__
```



---
## skipToken
```python
from parser_inline import skipToken
```

Skip single token by running all rules in validation mode;
returns `True` if any rule reported success

---
## tokenize
```python
from parser_inline import tokenize
```

Generate tokens for input range.

---
## parse
```python
from parser_inline import parse
```

Process input string and push inline tokens into `tokens`

---
## MarkdownIt
```python
from main import MarkdownIt
```



---
## __repr__
```python
from main import __repr__
```



---
## __getitem__
```python
from main import __getitem__
```



---
## set
```python
from main import set
```

Set parser options (in the same format as in constructor).
Probably, you will never need it, but you can change options after constructor call.

__Note:__ To achieve the best possible performance, don't modify a
`markdown-it` instance options on the fly. If you need multiple configurations
it's best to create multiple instances and initialize each with separate config.

---
## configure
```python
from main import configure
```

Batch load of all options and component settings.
This is an internal method, and you probably will not need it.
But if you will - see available presets and data structure
[here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)

We strongly recommend to use presets instead of direct config loads.
That will give better compatibility with next versions.

---
## get_all_rules
```python
from main import get_all_rules
```

Return the names of all active rules.

---
## get_active_rules
```python
from main import get_active_rules
```

Return the names of all active rules.

---
## enable
```python
from main import enable
```

Enable list or rules. (chainable)

:param names: rule name or list of rule names to enable.
:param ignoreInvalid: set `true` to ignore errors when rule not found.

It will automatically find appropriate components,
containing rules with given names. If rule not found, and `ignoreInvalid`
not set - throws exception.

Example::

    md = MarkdownIt().enable(['sub', 'sup']).disable('smartquotes')

---
## disable
```python
from main import disable
```

The same as [[MarkdownIt.enable]], but turn specified rules off. (chainable)

:param names: rule name or list of rule names to disable.
:param ignoreInvalid: set `true` to ignore errors when rule not found.

---
## reset_rules
```python
from main import reset_rules
```

A context manager, that will reset the current enabled rules on exit.

---
## add_render_rule
```python
from main import add_render_rule
```

Add a rule for rendering a particular Token type.

Only applied when ``renderer.__output__ == fmt``

---
## use
```python
from main import use
```

Load specified plugin with given params into current parser instance. (chainable)

It's just a sugar to call `plugin(md, params)` with curring.

Example::

    def func(tokens, idx):
        tokens[idx].content = tokens[idx].content.replace('foo', 'bar')
    md = MarkdownIt().use(plugin, 'foo_replace', 'text', func)

---
## render
```python
from main import render
```

Render markdown string into html. It does all magic for you :).

:param src: source string
:param env: environment sandbox
:returns: The output of the loaded renderer

`env` can be used to inject additional metadata (`{}` by default).
But you will not need it with high probability. See also comment
in [[MarkdownIt.parse]].

---
## parseInline
```python
from main import parseInline
```

The same as [[MarkdownIt.parse]] but skip all block rules.

:param src: source string
:param env: environment sandbox

It returns the
block tokens list with the single `inline` element, containing parsed inline
tokens in `children` property. Also updates `env` object.

---
## renderInline
```python
from main import renderInline
```

Similar to [[MarkdownIt.render]] but for single paragraph content.

:param src: source string
:param env: environment sandbox

Similar to [[MarkdownIt.render]] but for single paragraph content. Result
will NOT be wrapped into `<p>` tags.

---
## validateLink
```python
from main import validateLink
```

Validate if the URL link is allowed in output.

This validator can prohibit more than really needed to prevent XSS.
It's a tradeoff to keep code simple and to be secure by default.

Note: the url should be normalized at this point, and existing entities decoded.

---
## normalizeLink
```python
from main import normalizeLink
```

Normalize destination URLs in links

::

    [label]:   destination   'title'
            ^^^^^^^^^^^

---
## normalizeLinkText
```python
from main import normalizeLinkText
```

Normalize autolink content

::

    <destination>
    ~~~~~~~~~~~

---
## __name__
```python
from arrow_dataset import __name__
```

Simple Dataset wrapping an Arrow Table.

---
## DatasetInfoMixin
```python
from arrow_dataset import DatasetInfoMixin
```

This base class exposes some attributes of DatasetInfo
at the base level of the Dataset for easy access.

---
## TensorflowDatasetMixin
```python
from arrow_dataset import TensorflowDatasetMixin
```



---
## DatasetTransformationNotAllowedError
```python
from arrow_dataset import DatasetTransformationNotAllowedError
```



---
## transmit_format
```python
from arrow_dataset import transmit_format
```

Wrapper for dataset transforms that recreate a new Dataset to transmit the format of the original dataset to the new dataset

---
## update_metadata_with_features
```python
from arrow_dataset import update_metadata_with_features
```

To be used in dataset transforms that modify the features of the dataset, in order to update the features stored in the metadata of its schema.

---
## _check_table
```python
from arrow_dataset import _check_table
```

We check the table type to make sure it's an instance of :class:`datasets.table.Table`

---
## _check_column_names
```python
from arrow_dataset import _check_column_names
```

Check the column names to make sure they don't contain duplicates.

---
## _check_valid_indices_value
```python
from arrow_dataset import _check_valid_indices_value
```



---
## NonExistentDatasetError
```python
from arrow_dataset import NonExistentDatasetError
```

Used when we expect the existence of a dataset

---
## Dataset
```python
from arrow_dataset import Dataset
```

A Dataset backed by an Arrow table.

---
## _concatenate_map_style_datasets
```python
from arrow_dataset import _concatenate_map_style_datasets
```

Converts a list of :class:`Dataset` with the same schema into a single :class:`Dataset`.
When you concatenate on axis 0, missing data are filled with None values.

Args:
    dsets (`List[datasets.Dataset]`): List of Datasets to concatenate.
    info (:class:`DatasetInfo`, optional): Dataset information, like description, citation, etc.
    split (:class:`NamedSplit`, optional): Name of the dataset split.
    axis (``{0, 1}``, default ``0``, meaning over rows):
        Axis to concatenate over, where ``0`` means over rows (vertically) and ``1`` means over columns
        (horizontally).

        *New in version 1.6.0*

Example:

```py
>>> ds3 = _concatenate_map_style_datasets([ds1, ds2])
```

---
## _interleave_map_style_datasets
```python
from arrow_dataset import _interleave_map_style_datasets
```

Interleave several map-style datasets (sources) into a single map-style dataset.
The new dataset is constructed by alternating between the sources to get the examples.
If `probabilities = None` (default) the new dataset is constructed by cycling between each source to get the examples.
If `probabilities` is not `None, the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities.

Args:
    datasets (`List[Dataset]`): list of datasets to interleave
    probabilities (`List[float]`, optional, default None): If specified, the new dataset is constructed by sampling
        examples from one source at a time according to these probabilities.
    seed (`int`, optional, default None): The random seed used to choose a source for each example.
    info (:class:`DatasetInfo`, optional): Dataset information, like description, citation, etc.
    split (:class:`NamedSplit`, optional): Name of the dataset split.
    stopping_strategy (`str`, defaults to `first_exhausted`):
        Two strategies are proposed right now.
        By default, `first_exhausted` is an undersampling strategy, i.e the dataset construction is stopped as soon as one dataset has ran out of samples.
        If the strategy is `all_exhausted`,  we use an oversampling strategy, i.e the dataset construction is stopped as soon as every samples of every dataset has been added at least once.
        Note that if the strategy is `all_exhausted`, the interleaved dataset size can get enormous:
        - with no probabilities, the resulting dataset will have max_length_datasets*nb_dataset samples.
        - with given probabilities, the resulting dataset will have more samples if some datasets have really low probability of visiting.
    **kwargs (additional keyword arguments): Keyword arguments to be passed to :meth:`datasets.Datasets.select` when selecting the indices used to interleave the datasets.

Output:
    :class:`datasets.Dataset`

---
## _split_by_node_map_style_dataset
```python
from arrow_dataset import _split_by_node_map_style_dataset
```

Split a dataset for the node at rank `rank` in a pool of nodes of size `world_size`.
Each node is assigned a chunk of data, e.g. rank 0 is given the first chunk of the dataset.
To maximize data loading throughput, chunks are made of contiguous data on disk if possible.

Args:
    dataset ([`Dataset`]):
        The dataset to split by node.
    rank (`int`):
        Rank of the current node.
    world_size (`int`):
        Total number of nodes.

Returns:
    [`Dataset`]: The dataset to be used on the node at rank `rank`.

---
## get_indices_from_mask_function
```python
from arrow_dataset import get_indices_from_mask_function
```



---
## __init__
```python
from arrow_dataset import __init__
```



---
## info
```python
from arrow_dataset import info
```

[`~datasets.DatasetInfo`] object containing all the metadata in the dataset.

---
## split
```python
from arrow_dataset import split
```

[`~datasets.NamedSplit`] object corresponding to a named dataset split.

---
## builder_name
```python
from arrow_dataset import builder_name
```



---
## citation
```python
from arrow_dataset import citation
```



---
## config_name
```python
from arrow_dataset import config_name
```



---
## dataset_size
```python
from arrow_dataset import dataset_size
```



---
## description
```python
from arrow_dataset import description
```



---
## download_checksums
```python
from arrow_dataset import download_checksums
```



---
## download_size
```python
from arrow_dataset import download_size
```



---
## features
```python
from arrow_dataset import features
```



---
## homepage
```python
from arrow_dataset import homepage
```



---
## license
```python
from arrow_dataset import license
```



---
## size_in_bytes
```python
from arrow_dataset import size_in_bytes
```



---
## supervised_keys
```python
from arrow_dataset import supervised_keys
```



---
## version
```python
from arrow_dataset import version
```



---
## _get_output_signature
```python
from arrow_dataset import _get_output_signature
```

Private method used by `to_tf_dataset()` to find the shapes and dtypes of samples from this dataset
   after being passed through the collate_fn. Tensorflow needs an exact signature for tf.numpy_function, so
   the only way to do this is to run test batches - the collator may add or rename columns, so we can't figure
   it out just by inspecting the dataset.

Args:
    dataset (`Dataset`): Dataset to load samples from.
    collate_fn(`bool`): Shuffle the dataset order when loading. Recommended True for training, False for
        validation/evaluation.
    collate_fn(`Callable`): A function or callable object (such as a `DataCollator`) that will collate
        lists of samples into a batch.
    collate_fn_args (`Dict`): A `dict` of keyword arguments to be passed to the
        `collate_fn`.
    batch_size (`int`, optional): The size of batches loaded from the dataset. Used for shape inference.
        Can be None, which indicates that batch sizes can be variable.
    num_test_batches (`int`): The number of batches to load from the dataset for shape inference.

Returns:
    `dict`: Dict mapping column names to tf.Tensorspec objects
    `dict`: Dict mapping column names to np.dtype objects

---
## to_tf_dataset
```python
from arrow_dataset import to_tf_dataset
```

Create a `tf.data.Dataset` from the underlying Dataset. This `tf.data.Dataset` will load and collate batches from
the Dataset, and is suitable for passing to methods like `model.fit()` or `model.predict()`. The dataset will yield
`dicts` for both inputs and labels unless the `dict` would contain only a single key, in which case a raw
`tf.Tensor` is yielded instead.

Args:
    batch_size (`int`, *optional*):
        Size of batches to load from the dataset. Defaults to `None`, which implies that the dataset won't be
        batched, but the returned dataset can be batched later with `tf_dataset.batch(batch_size)`.
    columns (`List[str]` or `str`, *optional*):
        Dataset column(s) to load in the `tf.data.Dataset`.
        Column names that are created by the `collate_fn` and that do not exist in the original dataset can be used.
    shuffle(`bool`, defaults to `False`):
        Shuffle the dataset order when loading. Recommended `True` for training, `False` for
        validation/evaluation.
    drop_remainder(`bool`, defaults to `False`):
        Drop the last incomplete batch when loading. Ensures
        that all batches yielded by the dataset will have the same length on the batch dimension.
    collate_fn(`Callable`, *optional*):
        A function or callable object (such as a `DataCollator`) that will collate
        lists of samples into a batch.
    collate_fn_args (`Dict`, *optional*):
        An optional `dict` of keyword arguments to be passed to the
        `collate_fn`.
    label_cols (`List[str]` or `str`, defaults to `None`):
        Dataset column(s) to load as labels.
        Note that many models compute loss internally rather than letting Keras do it, in which case
        passing the labels here is optional, as long as they're in the input `columns`.
    prefetch (`bool`, defaults to `True`):
        Whether to run the dataloader in a separate thread and maintain
        a small buffer of batches for training. Improves performance by allowing data to be loaded in the
        background while the model is training.
    num_workers (`int`, defaults to `0`):
        Number of workers to use for loading the dataset. Only supported on Python versions >= 3.8.
    num_test_batches (`int`, defaults to `20`):
        Number of batches to use to infer the output signature of the dataset.
        The higher this number, the more accurate the signature will be, but the longer it will take to
        create the dataset.

Returns:
    `tf.data.Dataset`

Example:

```py
>>> ds_train = ds["train"].to_tf_dataset(
...    columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'],
...    shuffle=True,
...    batch_size=16,
...    collate_fn=data_collator,
... )
```

---
## wrapper
```python
from arrow_dataset import wrapper
```



---
## from_file
```python
from arrow_dataset import from_file
```

Instantiate a Dataset backed by an Arrow table at filename.

Args:
    filename (`str`):
        File name of the dataset.
    info (`DatasetInfo`, *optional*):
        Dataset information, like description, citation, etc.
    split (`NamedSplit`, *optional*):
        Name of the dataset split.
    indices_filename (`str`, *optional*):
        File names of the indices.
    in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.

Returns:
    [`Dataset`]

---
## from_buffer
```python
from arrow_dataset import from_buffer
```

Instantiate a Dataset backed by an Arrow buffer.

Args:
    buffer (`pyarrow.Buffer`):
        Arrow buffer.
    info (`DatasetInfo`, *optional*):
        Dataset information, like description, citation, etc.
    split (`NamedSplit`, *optional*):
        Name of the dataset split.
    indices_buffer (`pyarrow.Buffer`, *optional*):
        Indices Arrow buffer.

Returns:
    [`Dataset`]

---
## from_pandas
```python
from arrow_dataset import from_pandas
```

Convert `pandas.DataFrame` to a `pyarrow.Table` to create a [`Dataset`].

The column types in the resulting Arrow Table are inferred from the dtypes of the `pandas.Series` in the
DataFrame. In the case of non-object Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `object`, we need to guess the datatype by looking at the Python objects in this Series.

Be aware that Series of the `object` dtype don't carry enough information to always lead to a meaningful Arrow
type. In the case that we cannot infer a type, e.g. because the DataFrame is of length 0 or the Series only
contains `None/nan` objects, the type is set to `null`. This behavior can be avoided by constructing explicit
features and passing it to this function.

Args:
    df (`pandas.DataFrame`):
        Dataframe that contains the dataset.
    features ([`Features`], *optional*):
        Dataset features.
    info (`DatasetInfo`, *optional*):
        Dataset information, like description, citation, etc.
    split (`NamedSplit`, *optional*):
        Name of the dataset split.
    preserve_index (`bool`, *optional*):
        Whether to store the index as an additional column in the resulting Dataset.
        The default of `None` will store the index as a column, except for `RangeIndex` which is stored as metadata only.
        Use `preserve_index=True` to force it to be stored as a column.

Returns:
    [`Dataset`]

Example:

```py
>>> ds = Dataset.from_pandas(df)
```

---
## from_polars
```python
from arrow_dataset import from_polars
```

Collect the underlying arrow arrays in an Arrow Table.

This operation is mostly zero copy.

Data types that do copy:
    * CategoricalType

Args:
    df (`polars.DataFrame`): DataFrame to convert to Arrow Table
    features (`Features`, optional): Dataset features.
    info (`DatasetInfo`, optional): Dataset information, like description, citation, etc.
    split (`NamedSplit`, optional): Name of the dataset split.

Examples:
```py
>>> ds = Dataset.from_polars(df)
```

---
## from_dict
```python
from arrow_dataset import from_dict
```

Convert `dict` to a `pyarrow.Table` to create a [`Dataset`].

Args:
    mapping (`Mapping`):
        Mapping of strings to Arrays or Python lists.
    features ([`Features`], *optional*):
        Dataset features.
    info (`DatasetInfo`, *optional*):
        Dataset information, like description, citation, etc.
    split (`NamedSplit`, *optional*):
        Name of the dataset split.

Returns:
    [`Dataset`]

---
## from_list
```python
from arrow_dataset import from_list
```

Convert a list of dicts to a `pyarrow.Table` to create a [`Dataset`]`.

Note that the keys of the first entry will be used to determine the dataset columns,
regardless of what is passed to features.

Args:
    mapping (`List[dict]`): A list of mappings of strings to row values.
    features (`Features`, optional): Dataset features.
    info (`DatasetInfo`, optional): Dataset information, like description, citation, etc.
    split (`NamedSplit`, optional): Name of the dataset split.

Returns:
    [`Dataset`]

---
## from_csv
```python
from arrow_dataset import from_csv
```

Create Dataset from CSV file(s).

Args:
    path_or_paths (`path-like` or list of `path-like`):
        Path(s) of the CSV file(s).
    split ([`NamedSplit`], *optional*):
        Split name to be assigned to the dataset.
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`pandas.read_csv`].

Returns:
    [`Dataset`]

Example:

```py
>>> ds = Dataset.from_csv('path/to/dataset.csv')
```

---
## from_generator
```python
from arrow_dataset import from_generator
```

Create a Dataset from a generator.

Args:
    generator (:`Callable`):
        A generator function that `yields` examples.
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    gen_kwargs(`dict`, *optional*):
        Keyword arguments to be passed to the `generator` callable.
        You can define a sharded dataset by passing the list of shards in `gen_kwargs` and setting `num_proc` greater than 1.
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.
        If `num_proc` is greater than one, then all list values in `gen_kwargs` must be the same length. These values will be split between calls to the generator. The number of shards will be the minimum of the shortest list in `gen_kwargs` and `num_proc`.

        <Added version="2.7.0"/>
    split ([`NamedSplit`], defaults to `Split.TRAIN`):
        Split name to be assigned to the dataset.

        <Added version="2.21.0"/>
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to :[`GeneratorConfig`].

Returns:
    [`Dataset`]

Example:

```py
>>> def gen():
...     yield {"text": "Good", "label": 0}
...     yield {"text": "Bad", "label": 1}
...
>>> ds = Dataset.from_generator(gen)
```

```py
>>> def gen(shards):
...     for shard in shards:
...         with open(shard) as f:
...             for line in f:
...                 yield {"line": line}
...
>>> shards = [f"data{i}.txt" for i in range(32)]
>>> ds = Dataset.from_generator(gen, gen_kwargs={"shards": shards})
```

---
## from_json
```python
from arrow_dataset import from_json
```

Create Dataset from JSON or JSON Lines file(s).

Args:
    path_or_paths (`path-like` or list of `path-like`):
        Path(s) of the JSON or JSON Lines file(s).
    split ([`NamedSplit`], *optional*):
        Split name to be assigned to the dataset.
    features ([`Features`], *optional*):
         Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    field (`str`, *optional*):
        Field name of the JSON file where the dataset is contained in.
    num_proc (`int`, *optional* defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`JsonConfig`].

Returns:
    [`Dataset`]

Example:

```py
>>> ds = Dataset.from_json('path/to/dataset.json')
```

---
## from_parquet
```python
from arrow_dataset import from_parquet
```

Create Dataset from Parquet file(s).

Args:
    path_or_paths (`path-like` or list of `path-like`):
        Path(s) of the Parquet file(s).
    split (`NamedSplit`, *optional*):
        Split name to be assigned to the dataset.
    features (`Features`, *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    columns (`List[str]`, *optional*):
        If not `None`, only these columns will be read from the file.
        A column name may be a prefix of a nested field, e.g. 'a' will select
        'a.b', 'a.c', and 'a.d.e'.
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`ParquetConfig`].

Returns:
    [`Dataset`]

Example:

```py
>>> ds = Dataset.from_parquet('path/to/dataset.parquet')
```

---
## from_text
```python
from arrow_dataset import from_text
```

Create Dataset from text file(s).

Args:
    path_or_paths (`path-like` or list of `path-like`):
        Path(s) of the text file(s).
    split (`NamedSplit`, *optional*):
        Split name to be assigned to the dataset.
    features (`Features`, *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        This is helpful if the dataset is made of multiple files. Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`TextConfig`].

Returns:
    [`Dataset`]

Example:

```py
>>> ds = Dataset.from_text('path/to/dataset.txt')
```

---
## from_spark
```python
from arrow_dataset import from_spark
```

Create a Dataset from Spark DataFrame. Dataset downloading is distributed over Spark workers.

Args:
    df (`pyspark.sql.DataFrame`):
        The DataFrame containing the desired data.
    split (`NamedSplit`, *optional*):
        Split name to be assigned to the dataset.
    features (`Features`, *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data. When using a multi-node Spark cluster, the cache_dir must be accessible to both
        workers and the driver.
    keep_in_memory (`bool`):
        Whether to copy the data in-memory.
    working_dir (`str`, *optional*)
        Intermediate directory for each Spark worker to write data to before moving it to `cache_dir`. Setting
        a non-NFS intermediate directory may improve performance.
    load_from_cache_file (`bool`):
        Whether to load the dataset from the cache if possible.

Returns:
    [`Dataset`]

Example:

```py
>>> df = spark.createDataFrame(
>>>     data=[[1, "Elia"], [2, "Teo"], [3, "Fang"]],
>>>     columns=["id", "name"],
>>> )
>>> ds = Dataset.from_spark(df)
```

---
## from_sql
```python
from arrow_dataset import from_sql
```

Create Dataset from SQL query or database table.

Args:
    sql (`str` or `sqlalchemy.sql.Selectable`):
        SQL query to be executed or a table name.
    con (`str` or `sqlite3.Connection` or `sqlalchemy.engine.Connection` or `sqlalchemy.engine.Connection`):
        A [URI string](https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls) used to instantiate a database connection or a SQLite3/SQLAlchemy connection object.
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`SqlConfig`].

Returns:
    [`Dataset`]

Example:

```py
>>> # Fetch a database table
>>> ds = Dataset.from_sql("test_data", "postgres:///db_name")
>>> # Execute a SQL query on the table
>>> ds = Dataset.from_sql("SELECT sentence FROM test_data", "postgres:///db_name")
>>> # Use a Selectable object to specify the query
>>> from sqlalchemy import select, text
>>> stmt = select([text("sentence")]).select_from(text("test_data"))
>>> ds = Dataset.from_sql(stmt, "postgres:///db_name")
```

<Tip>

The returned dataset can only be cached if `con` is specified as URI string.

</Tip>

---
## __setstate__
```python
from arrow_dataset import __setstate__
```



---
## __del__
```python
from arrow_dataset import __del__
```



---
## __enter__
```python
from arrow_dataset import __enter__
```



---
## __exit__
```python
from arrow_dataset import __exit__
```



---
## save_to_disk
```python
from arrow_dataset import save_to_disk
```

Saves a dataset to a dataset directory, or in a filesystem using any implementation of `fsspec.spec.AbstractFileSystem`.

For [`Image`] and [`Audio`] data:

All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value("string") type.

Args:
    dataset_path (`path-like`):
        Path (e.g. `dataset/train`) or remote URI (e.g. `s3://my-bucket/dataset/train`)
        of the dataset directory where the dataset will be saved to.
    max_shard_size (`int` or `str`, *optional*, defaults to `"500MB"`):
        The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
        (like `"50MB"`).
    num_shards (`int`, *optional*):
        Number of shards to write. By default the number of shards depends on `max_shard_size` and `num_proc`.

        <Added version="2.8.0"/>
    num_proc (`int`, *optional*):
        Number of processes when downloading and generating the dataset locally.
        Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.8.0"/>

Example:

```py
>>> ds.save_to_disk("path/to/dataset/directory")
>>> ds.save_to_disk("path/to/dataset/directory", max_shard_size="1GB")
>>> ds.save_to_disk("path/to/dataset/directory", num_shards=1024)
```

---
## _save_to_disk_single
```python
from arrow_dataset import _save_to_disk_single
```



---
## _build_local_temp_path
```python
from arrow_dataset import _build_local_temp_path
```

Builds and returns a Path concatenating a local temporary dir with the dir path (or absolute/relative
path extracted from the uri) passed.

Args:
    uri_or_path (`str`): Path (e.g. `"dataset/train"`) or remote URI (e.g.
        `"s3://my-bucket/dataset/train"`) to concatenate.

Returns:
    :class:`Path`: the concatenated path (temp dir + path)

---
## load_from_disk
```python
from arrow_dataset import load_from_disk
```

Loads a dataset that was previously saved using [`save_to_disk`] from a dataset directory, or from a
filesystem using any implementation of `fsspec.spec.AbstractFileSystem`.

Args:
    dataset_path (`path-like`):
        Path (e.g. `"dataset/train"`) or remote URI (e.g. `"s3//my-bucket/dataset/train"`)
        of the dataset directory where the dataset will be loaded from.
    keep_in_memory (`bool`, defaults to `None`):
        Whether to copy the dataset in-memory. If `None`, the
        dataset will not be copied in-memory unless explicitly enabled by setting
        `datasets.config.IN_MEMORY_MAX_SIZE` to nonzero. See more details in the
        [improve performance](../cache#improve-performance) section.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.8.0"/>

Returns:
    [`Dataset`] or [`DatasetDict`]:
    - If `dataset_path` is a path of a dataset directory, the dataset requested.
    - If `dataset_path` is a path of a dataset dict directory, a `datasets.DatasetDict` with each split.

Example:

```py
>>> ds = load_from_disk("path/to/dataset/directory")
```

---
## data
```python
from arrow_dataset import data
```

The Apache Arrow table backing the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.data
MemoryMappedTable
text: string
label: int64
----
text: [["compassionately explores the seemingly irreconcilable situation between conservative christian parents and their estranged gay and lesbian children .","the soundtrack alone is worth the price of admission .","rodriguez does a splendid job of racial profiling hollywood style--casting excellent latin actors of all ages--a trend long overdue .","beneath the film's obvious determination to shock at any cost lies considerable skill and determination , backed by sheer nerve .","bielinsky is a filmmaker of impressive talent .","so beautifully acted and directed , it's clear that washington most certainly has a new career ahead of him if he so chooses .","a visual spectacle full of stunning images and effects .","a gentle and engrossing character study .","it's enough to watch huppert scheming , with her small , intelligent eyes as steady as any noir villain , and to enjoy the perfectly pitched web of tension that chabrol spins .","an engrossing portrait of uncompromising artists trying to create something original against the backdrop of a corporate music industry that only seems to care about the bottom line .",...,"ultimately , jane learns her place as a girl , softens up and loses some of the intensity that made her an interesting character to begin with .","ah-nuld's action hero days might be over .","it's clear why deuces wild , which was shot two years ago , has been gathering dust on mgm's shelf .","feels like nothing quite so much as a middle-aged moviemaker's attempt to surround himself with beautiful , half-naked women .","when the precise nature of matthew's predicament finally comes into sharp focus , the revelation fails to justify the build-up .","this picture is murder by numbers , and as easy to be bored by as your abc's , despite a few whopping shootouts .","hilarious musical comedy though stymied by accents thick as mud .","if you are into splatter movies , then you will probably have a reasonably good time with the salton sea .","a dull , simple-minded and stereotypical tale of drugs , death and mind-numbing indifference on the inner-city streets .","the feature-length stretch . . . strains the show's concept ."]]
label: [[1,1,1,1,1,1,1,1,1,1,...,0,0,0,0,0,0,0,0,0,0]]
```

---
## cache_files
```python
from arrow_dataset import cache_files
```

The cache files containing the Apache Arrow table backing the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.cache_files
[{'filename': '/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-validation.arrow'}]
```

---
## num_columns
```python
from arrow_dataset import num_columns
```

Number of columns in the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.num_columns
2
```

---
## num_rows
```python
from arrow_dataset import num_rows
```

Number of rows in the dataset (same as [`Dataset.__len__`]).

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.num_rows
1066
```

---
## column_names
```python
from arrow_dataset import column_names
```

Names of the columns in the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.column_names
['text', 'label']
```

---
## shape
```python
from arrow_dataset import shape
```

Shape of the dataset (number of columns, number of rows).

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.shape
(1066, 2)
```

---
## unique
```python
from arrow_dataset import unique
```

Return a list of the unique elements in a column.

This is implemented in the low-level backend and as such, very fast.

Args:
    column (`str`):
        Column name (list all the column names with [`~datasets.Dataset.column_names`]).

Returns:
    `list`: List of unique elements in the given column.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.unique('label')
[1, 0]
```

---
## class_encode_column
```python
from arrow_dataset import class_encode_column
```

Casts the given column as [`~datasets.features.ClassLabel`] and updates the table.

Args:
    column (`str`):
        The name of the column to cast (list all the column names with [`~datasets.Dataset.column_names`])
    include_nulls (`bool`, defaults to `False`):
        Whether to include null values in the class labels. If `True`, the null values will be encoded as the `"None"` class label.

        <Added version="1.14.2"/>

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("boolq", split="validation")
>>> ds.features
{'answer': Value(dtype='bool', id=None),
 'passage': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None)}
>>> ds = ds.class_encode_column('answer')
>>> ds.features
{'answer': ClassLabel(num_classes=2, names=['False', 'True'], id=None),
 'passage': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None)}
```

---
## flatten
```python
from arrow_dataset import flatten
```

Flatten the table.
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.

Args:
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A copy of the dataset with flattened columns.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("squad", split="train")
>>> ds.features
{'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None),
 'context': Value(dtype='string', id=None),
 'id': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None),
 'title': Value(dtype='string', id=None)}
>>> ds.flatten()
Dataset({
    features: ['id', 'title', 'context', 'question', 'answers.text', 'answers.answer_start'],
    num_rows: 87599
})
```

---
## cast
```python
from arrow_dataset import cast
```

Cast the dataset to a new set of features.

Args:
    features ([`Features`]):
        New features to cast the dataset to.
        The name of the fields in the features must match the current column names.
        The type of the data must also be convertible from one type to the other.
        For non-trivial conversion, e.g. `str` <-> `ClassLabel` you should use [`~datasets.Dataset.map`] to update the Dataset.
    batch_size (`int`, defaults to `1000`):
        Number of examples per batch provided to cast.
        If `batch_size <= 0` or `batch_size == None` then provide the full dataset as a single batch to cast.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    load_from_cache_file (`bool`, defaults to `True` if caching is enabled):
        If a cache file storing the current computation from `function`
        can be identified, use it instead of recomputing.
    cache_file_name (`str`, *optional*, defaults to `None`):
        Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running [`~datasets.Dataset.map`].
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes for multiprocessing. By default it doesn't
        use multiprocessing.

Returns:
    [`Dataset`]: A copy of the dataset with casted features.

Example:

```py
>>> from datasets import load_dataset, ClassLabel, Value
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
>>> new_features = ds.features.copy()
>>> new_features['label'] = ClassLabel(names=['bad', 'good'])
>>> new_features['text'] = Value('large_string')
>>> ds = ds.cast(new_features)
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['bad', 'good'], id=None),
 'text': Value(dtype='large_string', id=None)}
```

---
## cast_column
```python
from arrow_dataset import cast_column
```

Cast column to feature for decoding.

Args:
    column (`str`):
        Column name.
    feature (`FeatureType`):
        Target feature.
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
>>> ds = ds.cast_column('label', ClassLabel(names=['bad', 'good']))
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['bad', 'good'], id=None),
 'text': Value(dtype='string', id=None)}
```

---
## remove_columns
```python
from arrow_dataset import remove_columns
```

Remove one or several column(s) in the dataset and the features associated to them.

You can also remove a column using [`~datasets.Dataset.map`] with `remove_columns` but the present method
doesn't copy the data of the remaining columns and is thus faster.

Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to remove.
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A copy of the dataset object without the columns to remove.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds = ds.remove_columns('label')
Dataset({
    features: ['text'],
    num_rows: 1066
})
>>> ds = ds.remove_columns(column_names=ds.column_names) # Removing all the columns returns an empty dataset with the `num_rows` property set to 0
Dataset({
    features: [],
    num_rows: 0
})
```

---
## rename_column
```python
from arrow_dataset import rename_column
```

Rename a column in the dataset, and move the features associated to the original column under the new column
name.

Args:
    original_column_name (`str`):
        Name of the column to rename.
    new_column_name (`str`):
        New name for the column.
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A copy of the dataset with a renamed column.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds = ds.rename_column('label', 'label_new')
Dataset({
    features: ['text', 'label_new'],
    num_rows: 1066
})
```

---
## rename_columns
```python
from arrow_dataset import rename_columns
```

Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.

Args:
    column_mapping (`Dict[str, str]`):
        A mapping of columns to rename to their new names
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A copy of the dataset with renamed columns

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds = ds.rename_columns({'text': 'text_new', 'label': 'label_new'})
Dataset({
    features: ['text_new', 'label_new'],
    num_rows: 1066
})
```

---
## select_columns
```python
from arrow_dataset import select_columns
```

Select one or several column(s) in the dataset and the features
associated to them.

Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to keep.
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform. If `None`,
        the new fingerprint is computed using a hash of the previous
        fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A copy of the dataset object which only consists of
    selected columns.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.select_columns(['text'])
Dataset({
    features: ['text'],
    num_rows: 1066
})
```

---
## __len__
```python
from arrow_dataset import __len__
```

Number of rows in the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.__len__
<bound method Dataset.__len__ of Dataset({
    features: ['text', 'label'],
    num_rows: 1066
})>
```

---
## __iter__
```python
from arrow_dataset import __iter__
```

Iterate through the examples.

If a formatting is set with [`Dataset.set_format`] rows will be returned with the
selected format.

---
## iter
```python
from arrow_dataset import iter
```

Iterate through the batches of size `batch_size`.

If a formatting is set with [`~datasets.Dataset.set_format`] rows will be returned with the
selected format.

Args:
    batch_size (:obj:`int`): size of each batch to yield.
    drop_last_batch (:obj:`bool`, default `False`): Whether a last batch smaller than the batch_size should be
        dropped

---
## __repr__
```python
from arrow_dataset import __repr__
```



---
## format
```python
from arrow_dataset import format
```



---
## formatted_as
```python
from arrow_dataset import formatted_as
```

To be used in a `with` statement. Set `__getitem__` return format (type and columns).

Args:
    type (`str`, *optional*):
        Output type selected in `[None, 'numpy', 'torch', 'tensorflow', 'pandas', 'arrow', 'jax']`.
        `None` means `__getitem__`` returns python objects (default).
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        `None` means `__getitem__` returns all columns (default).
    output_all_columns (`bool`, defaults to `False`):
        Keep un-formatted columns as well in the output (as python objects).
    **format_kwargs (additional keyword arguments):
        Keywords arguments passed to the convert function like `np.array`, `torch.tensor` or `tensorflow.ragged.constant`.

---
## set_format
```python
from arrow_dataset import set_format
```

Set `__getitem__` return format (type and columns). The data formatting is applied on-the-fly.
The format `type` (for example "numpy") is used to format batches when using `__getitem__`.
It's also possible to use custom transforms for formatting using [`~datasets.Dataset.set_transform`].

Args:
    type (`str`, *optional*):
        Either output type selected in `[None, 'numpy', 'torch', 'tensorflow', 'pandas', 'arrow', 'jax']`.
        `None` means `__getitem__` returns python objects (default).
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        `None` means `__getitem__` returns all columns (default).
    output_all_columns (`bool`, defaults to `False`):
        Keep un-formatted columns as well in the output (as python objects).
    **format_kwargs (additional keyword arguments):
        Keywords arguments passed to the convert function like `np.array`, `torch.tensor` or `tensorflow.ragged.constant`.

It is possible to call [`~datasets.Dataset.map`] after calling `set_format`. Since `map` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `map` on a dataset to add a new column, then this column will be formatted as:

    ```
    new formatted columns = (all columns - previously unformatted columns)
    ```

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
>>> ds.set_format(type='numpy', columns=['text', 'label'])
>>> ds.format
{'type': 'numpy',
'format_kwargs': {},
'columns': ['text', 'label'],
'output_all_columns': False}
```

---
## reset_format
```python
from arrow_dataset import reset_format
```

Reset `__getitem__` return format to python objects and all columns.

Same as `self.set_format()`

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
>>> ds.set_format(type='numpy', columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
>>> ds.format
{'columns': ['input_ids', 'token_type_ids', 'attention_mask', 'label'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': 'numpy'}
>>> ds.reset_format()
>>> ds.format
{'columns': ['text', 'label', 'input_ids', 'token_type_ids', 'attention_mask'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': None}
```

---
## set_transform
```python
from arrow_dataset import set_transform
```

Set `__getitem__` return format using this transform. The transform is applied on-the-fly on batches when `__getitem__` is called.
As [`~datasets.Dataset.set_format`], this can be reset using [`~datasets.Dataset.reset_format`].

Args:
    transform (`Callable`, *optional*):
        User-defined formatting transform, replaces the format defined by [`~datasets.Dataset.set_format`].
        A formatting function is a callable that takes a batch (as a `dict`) as input and returns a batch.
        This function is applied right before returning the objects in `__getitem__`.
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        If specified, then the input batch of the transform only contains those columns.
    output_all_columns (`bool`, defaults to `False`):
        Keep un-formatted columns as well in the output (as python objects).
        If set to True, then the other un-formatted columns are kept with the output of the transform.

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased')
>>> def encode(batch):
...     return tokenizer(batch['text'], padding=True, truncation=True, return_tensors='pt')
>>> ds.set_transform(encode)
>>> ds[0]
{'attention_mask': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1]),
 'input_ids': tensor([  101, 29353,  2135, 15102,  1996,  9428, 20868,  2890,  8663,  6895,
         20470,  2571,  3663,  2090,  4603,  3017,  3008,  1998,  2037, 24211,
         5637,  1998, 11690,  2336,  1012,   102]),
 'token_type_ids': tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0])}
```

---
## with_format
```python
from arrow_dataset import with_format
```

Set `__getitem__` return format (type and columns). The data formatting is applied on-the-fly.
The format `type` (for example "numpy") is used to format batches when using `__getitem__`.

It's also possible to use custom transforms for formatting using [`~datasets.Dataset.with_transform`].

Contrary to [`~datasets.Dataset.set_format`], `with_format` returns a new [`Dataset`] object.

Args:
    type (`str`, *optional*):
        Either output type selected in `[None, 'numpy', 'torch', 'tensorflow', 'pandas', 'arrow', 'jax']`.
        `None` means `__getitem__` returns python objects (default).
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        `None` means `__getitem__` returns all columns (default).
    output_all_columns (`bool`, defaults to `False`):
        Keep un-formatted columns as well in the output (as python objects).
    **format_kwargs (additional keyword arguments):
        Keywords arguments passed to the convert function like `np.array`, `torch.tensor` or `tensorflow.ragged.constant`.

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> ds = ds.map(lambda x: tokenizer(x['text'], truncation=True, padding=True), batched=True)
>>> ds.format
{'columns': ['text', 'label', 'input_ids', 'token_type_ids', 'attention_mask'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': None}
>>> ds = ds.with_format(type='tensorflow', columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
>>> ds.format
{'columns': ['input_ids', 'token_type_ids', 'attention_mask', 'label'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': 'tensorflow'}
```

---
## with_transform
```python
from arrow_dataset import with_transform
```

Set `__getitem__` return format using this transform. The transform is applied on-the-fly on batches when `__getitem__` is called.

As [`~datasets.Dataset.set_format`], this can be reset using [`~datasets.Dataset.reset_format`].

Contrary to [`~datasets.Dataset.set_transform`], `with_transform` returns a new [`Dataset`] object.

Args:
    transform (`Callable`, `optional`):
        User-defined formatting transform, replaces the format defined by [`~datasets.Dataset.set_format`].
        A formatting function is a callable that takes a batch (as a `dict`) as input and returns a batch.
        This function is applied right before returning the objects in `__getitem__`.
    columns (`List[str]`, `optional`):
        Columns to format in the output.
        If specified, then the input batch of the transform only contains those columns.
    output_all_columns (`bool`, defaults to `False`):
        Keep un-formatted columns as well in the output (as python objects).
        If set to `True`, then the other un-formatted columns are kept with the output of the transform.

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> def encode(example):
...     return tokenizer(example["text"], padding=True, truncation=True, return_tensors='pt')
>>> ds = ds.with_transform(encode)
>>> ds[0]
{'attention_mask': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1]),
 'input_ids': tensor([  101, 18027, 16310, 16001,  1103,  9321,   178, 11604,  7235,  6617,
         1742,  2165,  2820,  1206,  6588, 22572, 12937,  1811,  2153,  1105,
         1147, 12890, 19587,  6463,  1105, 15026,  1482,   119,   102]),
 'token_type_ids': tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
         0, 0, 0, 0, 0])}
```

---
## _getitem
```python
from arrow_dataset import _getitem
```

Can be used to index columns (by string names) or rows (by integer, slice, or list-like of integer indices)

---
## __getitem__
```python
from arrow_dataset import __getitem__
```

Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).

---
## __getitems__
```python
from arrow_dataset import __getitems__
```

Can be used to get a batch using a list of integers indices.

---
## cleanup_cache_files
```python
from arrow_dataset import cleanup_cache_files
```

Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is
one.

Be careful when running this command that no other process is currently using other cache files.

Returns:
    `int`: Number of removed files.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.cleanup_cache_files()
10
```

---
## _get_cache_file_path
```python
from arrow_dataset import _get_cache_file_path
```



---
## map
```python
from arrow_dataset import map
```

Apply a function to all the examples in the table (individually or in batches) and update the table.
If your function returns a column that already exists, then it overwrites it.

You can specify whether the function should be batched or not with the `batched` parameter:

- If batched is `False`, then the function takes 1 example in and should return 1 example.
  An example is a dictionary, e.g. `{"text": "Hello there !"}`.
- If batched is `True` and `batch_size` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
  A batch is a dictionary, e.g. a batch of 1 example is `{"text": ["Hello there !"]}`.
- If batched is `True` and `batch_size` is `n > 1`, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
  Note that the last batch may have less than `n` examples.
  A batch is a dictionary, e.g. a batch of `n` examples is `{"text": ["Hello there !"] * n}`.

Args:
    function (`Callable`): Function with one of the following signatures:

        - `function(example: Dict[str, Any]) -> Dict[str, Any]` if `batched=False` and `with_indices=False` and `with_rank=False`
        - `function(example: Dict[str, Any], *extra_args) -> Dict[str, Any]` if `batched=False` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)
        - `function(batch: Dict[str, List]) -> Dict[str, List]` if `batched=True` and `with_indices=False` and `with_rank=False`
        - `function(batch: Dict[str, List], *extra_args) -> Dict[str, List]` if `batched=True` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)

        For advanced usage, the function can also return a `pyarrow.Table`.
        Moreover if your function returns nothing (`None`), then `map` will run your function and return the dataset unchanged.
        If no function is provided, default to identity function: `lambda x: x`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the
        signature of `function` should be `def function(example, idx[, rank]): ...`.
    with_rank (`bool`, defaults to `False`):
        Provide process rank to `function`. Note that in this case the
        signature of `function` should be `def function(example[, idx], rank): ...`.
    input_columns (`Optional[Union[str, List[str]]]`, defaults to `None`):
        The columns to be passed into `function`
        as positional arguments. If `None`, a `dict` mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`.
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of examples per batch provided to `function` if `batched=True`.
        If `batch_size <= 0` or `batch_size == None`, provide the full dataset as a single batch to `function`.
    drop_last_batch (`bool`, defaults to `False`):
        Whether a last batch smaller than the batch_size should be
        dropped instead of being processed by the function.
    remove_columns (`Optional[Union[str, List[str]]]`, defaults to `None`):
        Remove a selection of columns while doing the mapping.
        Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding
        columns with names in `remove_columns`, these columns will be kept.
    keep_in_memory (`bool`, defaults to `False`):
        Keep the dataset in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the current computation from `function`
        can be identified, use it instead of recomputing.
    cache_file_name (`str`, *optional*, defaults to `None`):
        Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    features (`Optional[datasets.Features]`, defaults to `None`):
        Use a specific Features to store the cache file
        instead of the automatically generated one.
    disable_nullable (`bool`, defaults to `False`):
        Disallow null values in the table.
    fn_kwargs (`Dict`, *optional*, defaults to `None`):
        Keyword arguments to be passed to `function`.
    num_proc (`int`, *optional*, defaults to `None`):
        Max number of processes when generating cache. Already cached shards are loaded sequentially.
    suffix_template (`str`):
        If `cache_file_name` is specified, then this suffix
        will be added at the end of the base name of each. Defaults to `"_{rank:05d}_of_{num_proc:05d}"`. For example, if `cache_file_name` is "processed.arrow", then for
        `rank=1` and `num_proc=4`, the resulting file would be `"processed_00001_of_00004.arrow"` for the default suffix.
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.
    desc (`str`, *optional*, defaults to `None`):
        Meaningful description to be displayed alongside with the progress bar while mapping examples.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> def add_prefix(example):
...     example["text"] = "Review: " + example["text"]
...     return example
>>> ds = ds.map(add_prefix)
>>> ds[0:3]["text"]
['Review: compassionately explores the seemingly irreconcilable situation between conservative christian parents and their estranged gay and lesbian children .',
 'Review: the soundtrack alone is worth the price of admission .',
 'Review: rodriguez does a splendid job of racial profiling hollywood style--casting excellent latin actors of all ages--a trend long overdue .']

# process a batch of examples
>>> ds = ds.map(lambda example: tokenizer(example["text"]), batched=True)
# set number of processors
>>> ds = ds.map(add_prefix, num_proc=4)
```

---
## _map_single
```python
from arrow_dataset import _map_single
```

Apply a function to all the elements in the table (individually or in batches)
and update the table (if function does update examples).

Args:
    shard (`datasets.Dataset`): Dataset to map the transform on.
    function (`Callable`): with one of the following signature:
        - `function(example: Dict[str, Any]) -> Dict[str, Any]` if `batched=False` and `with_indices=False` and `with_rank=False`
        - `function(example: Dict[str, Any], *extra_args) -> Dict[str, Any]` if `batched=False` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)
        - `function(batch: Dict[str, List]) -> Dict[str, List]` if `batched=True` and `with_indices=False` and `with_rank=False`
        - `function(batch: Dict[str, List], *extra_args) -> Dict[str, List]` if `batched=True` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)

        For advanced usage, the function can also return a `pyarrow.Table`.
        Moreover if your function returns nothing (`None`), then `map` will run your function and return the dataset unchanged.
        If no function is provided, default to identity function: lambda x: x
    with_indices (`bool`, defaults to `False`): Provide example indices to `function`. Note that in this case the signature of `function` should be `def function(example, idx[, rank]): ...`.
    with_rank (`bool`, default `False`): Provide process rank to `function`. Note that in this case the signature of `function` should be `def function(example[, idx], rank): ...`.
    input_columns (`Optional[List[str]]`, defaults to `None`): The columns to be passed into `function` as
        positional arguments. If `None`, a dict mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`): Provide batch of examples to `function`
    batch_size (`int`, optional, defaults to `1000`): Number of examples per batch provided to `function` if `batched=True`
        `batch_size <= 0` or `batch_size == None`: Provide the full dataset as a single batch to `function`
    drop_last_batch (`bool`, default: `False`): Whether a last batch smaller than the batch_size should be
        dropped instead of being processed by the function.
    remove_columns (`Optional[List[str]]`, defaults to `None`): Remove a selection of columns while doing the mapping.
        Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding
        columns with names in `remove_columns`, these columns will be kept.
    keep_in_memory (`bool`, defaults to `False`): Keep the dataset in memory instead of writing it to a cache file.
    cache_file_name (`str`, optional, defaults to `None`): Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
    writer_batch_size (`int`, default `1000`): Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `.map()`.
    features (`Optional[datasets.Features]`, defaults to `None`): Use a specific Features to store the cache file
        instead of the automatically generated one.
    disable_nullable (`bool`, defaults to `False`): Disallow null values in the table.
    fn_kwargs (`Dict`, optional, defaults to `None`): Keyword arguments to be passed to `function`
    new_fingerprint (`str`, optional, defaults to `None`): the new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments
    rank: (`int`, optional, defaults to `None`): If specified, this is the process rank when doing multiprocessing
    offset: (`int`, defaults to 0): If specified, this is an offset applied to the indices passed to `function` if `with_indices=True`.

---
## batch
```python
from arrow_dataset import batch
```

Group samples from the dataset into batches.

Args:
    batch_size (`int`):
        The number of samples in each batch.
    drop_last_batch (`bool`, defaults to `False`):
        Whether to drop the last incomplete batch.
    num_proc (`int`, *optional*, defaults to `None`):
        Max number of processes when generating cache. Already cached shards are loaded sequentially.
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Returns:
    [`Dataset`]: A new Dataset where each item is a batch of multiple samples from the original dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> batched_ds = ds.batch(batch_size=4)
>>> batched_ds[0]
{'text': ['compassionately explores the seemingly irreconcilable situation...', ...],  # 4 items
'label': [1, 1, 1, 1]}
```

---
## filter
```python
from arrow_dataset import filter
```

Apply a filter function to all the elements in the table in batches
and update the table so that the dataset only includes examples according to the filter function.

Args:
    function (`Callable`): Callable with one of the following signatures:

        - `function(example: Dict[str, Any]) -> bool` if `batched=False` and `with_indices=False` and `with_rank=False`
        - `function(example: Dict[str, Any], *extra_args) -> bool` if `batched=False` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)
        - `function(batch: Dict[str, List]) -> List[bool]` if `batched=True` and `with_indices=False` and `with_rank=False`
        - `function(batch: Dict[str, List], *extra_args) -> List[bool]` if `batched=True` and `with_indices=True` and/or `with_rank=True` (one extra arg for each)

        If no function is provided, defaults to an always `True` function: `lambda x: True`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the
        signature of `function` should be `def function(example, idx[, rank]): ...`.
    with_rank (`bool`, defaults to `False`):
        Provide process rank to `function`. Note that in this case the
        signature of `function` should be `def function(example[, idx], rank): ...`.
    input_columns (`str` or `List[str]`, *optional*):
        The columns to be passed into `function` as
        positional arguments. If `None`, a `dict` mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`.
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of examples per batch provided to `function` if
        `batched = True`. If `batched = False`, one example per batch is passed to `function`.
        If `batch_size <= 0` or `batch_size == None`, provide the full dataset as a single batch to `function`.
    keep_in_memory (`bool`, defaults to `False`):
        Keep the dataset in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the current computation from `function`
        can be identified, use it instead of recomputing.
    cache_file_name (`str`, *optional*):
        Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    fn_kwargs (`dict`, *optional*):
        Keyword arguments to be passed to `function`.
    num_proc (`int`, *optional*):
        Number of processes for multiprocessing. By default it doesn't
        use multiprocessing.
    suffix_template (`str`):
        If `cache_file_name` is specified, then this suffix will be added at the end of the base name of each.
        For example, if `cache_file_name` is `"processed.arrow"`, then for `rank = 1` and `num_proc = 4`,
        the resulting file would be `"processed_00001_of_00004.arrow"` for the default suffix (default
        `_{rank:05d}_of_{num_proc:05d}`).
    new_fingerprint (`str`, *optional*):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.
    desc (`str`, *optional*, defaults to `None`):
        Meaningful description to be displayed alongside with the progress bar while filtering examples.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.filter(lambda x: x["label"] == 1)
Dataset({
    features: ['text', 'label'],
    num_rows: 533
})
```

---
## flatten_indices
```python
from arrow_dataset import flatten_indices
```

Create and cache a new Dataset by flattening the indices mapping.

Args:
    keep_in_memory (`bool`, defaults to `False`):
        Keep the dataset in memory instead of writing it to a cache file.
    cache_file_name (`str`, *optional*, default `None`):
        Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    features (`Optional[datasets.Features]`, defaults to `None`):
        Use a specific [`Features`] to store the cache file
        instead of the automatically generated one.
    disable_nullable (`bool`, defaults to `False`):
        Allow null values in the table.
    num_proc (`int`, optional, default `None`):
        Max number of processes when generating cache. Already cached shards are loaded sequentially
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

---
## _new_dataset_with_indices
```python
from arrow_dataset import _new_dataset_with_indices
```

Return a new Dataset obtained by adding indices (provided in indices_cache_file_name or in a buffer) to the
current Dataset.

---
## select
```python
from arrow_dataset import select
```

Create a new dataset with rows selected following the list/array of indices.

Args:
    indices (`range`, `list`, `iterable`, `ndarray` or `Series`):
        Range, list or 1D-array of integer indices for indexing.
        If the indices correspond to a contiguous range, the Arrow table is simply sliced.
        However passing a list of indices that are not contiguous creates indices mapping, which is much less efficient,
        but still faster than recreating an Arrow table made of the requested rows.
    keep_in_memory (`bool`, defaults to `False`):
        Keep the indices mapping in memory instead of writing it to a cache file.
    indices_cache_file_name (`str`, *optional*, defaults to `None`):
        Provide the name of a path for the cache file. It is used to store the
        indices mapping instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds.select(range(4))
Dataset({
    features: ['text', 'label'],
    num_rows: 4
})
```

---
## _select_contiguous
```python
from arrow_dataset import _select_contiguous
```

Create a new dataset with rows from a contiguous slice of data.
The slice is defined by that start index and its length.

Args:
    start (`int`): start index.
    length (`int`): length of the slice to select.
    new_fingerprint (`str`, optional, default `None`): the new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds._select_contiguous(0, 4)
Dataset({
    features: ['text', 'label'],
    num_rows: 4
})
```

---
## _select_with_indices_mapping
```python
from arrow_dataset import _select_with_indices_mapping
```

Create a new dataset with rows selected following the list/array of indices.
The new dataset is made by creating a new indices mapping on top of the main arrow table.

Args:
    indices (sequence, iterable, range, ndarray or Series): List or 1D-array of integer indices for indexing.
    keep_in_memory (`bool`, default `False`): Keep the indices mapping in memory instead of writing it to a cache file.
    indices_cache_file_name (`str`, optional, default `None`): Provide the name of a path for the cache file. It is used to store the
        indices mapping instead of the automatically generated cache file name.
    writer_batch_size (`int`, default `1000`): Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `.map()`.
    new_fingerprint (`str`, optional, default `None`): the new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds._select_with_indices_mapping(range(4))
Dataset({
    features: ['text', 'label'],
    num_rows: 4
})
```

---
## skip
```python
from arrow_dataset import skip
```

Create a new [`Dataset`] that skips the first `n` elements.

Args:
    n (`int`):
        Number of elements to skip.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> list(ds.take(3))
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'}]
>>> ds = ds.skip(1)
>>> list(ds.take(3))
[{'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'},
 {'label': 1,
 'text': 'if you sometimes like to go to the movies to have fun , wasabi is a good place to start .'}]
```

---
## take
```python
from arrow_dataset import take
```

Create a new [`Dataset`] with only the first `n` elements.

Args:
    n (`int`):
        Number of elements to take.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> small_ds = ds.take(2)
>>> list(small_ds)
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'}]
```

---
## sort
```python
from arrow_dataset import sort
```

Create a new dataset sorted according to a single or multiple columns.

Args:
    column_names (`Union[str, Sequence[str]]`):
        Column name(s) to sort by.
    reverse (`Union[bool, Sequence[bool]]`, defaults to `False`):
        If `True`, sort by descending order rather than ascending. If a single bool is provided,
        the value is applied to the sorting of all column names. Otherwise a list of bools with the
        same length and order as column_names must be provided.
    null_placement (`str`, defaults to `at_end`):
        Put `None` values at the beginning if `at_start` or `first` or at the end if `at_end` or `last`

        <Added version="1.14.2"/>
    keep_in_memory (`bool`, defaults to `False`):
        Keep the sorted indices in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the sorted indices
        can be identified, use it instead of recomputing.
    indices_cache_file_name (`str`, *optional*, defaults to `None`):
        Provide the name of a path for the cache file. It is used to store the
        sorted indices instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        Higher value gives smaller cache files, lower value consume less temporary memory.
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset('rotten_tomatoes', split='validation')
>>> ds['label'][:10]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
>>> sorted_ds = ds.sort('label')
>>> sorted_ds['label'][:10]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>>> another_sorted_ds = ds.sort(['label', 'text'], reverse=[True, False])
>>> another_sorted_ds['label'][:10]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
```

---
## shuffle
```python
from arrow_dataset import shuffle
```

Create a new Dataset where the rows are shuffled.

Currently shuffling uses numpy random generators.
You can either supply a NumPy BitGenerator to use, or a seed to initiate NumPy's default random generator (PCG64).

Shuffling takes the list of indices `[0:len(my_dataset)]` and shuffles it to create an indices mapping.
However as soon as your [`Dataset`] has an indices mapping, the speed can become 10x slower.
This is because there is an extra step to get the row index to read using the indices mapping, and most importantly, you aren't reading contiguous chunks of data anymore.
To restore the speed, you'd need to rewrite the entire dataset on your disk again using [`Dataset.flatten_indices`], which removes the indices mapping.
This may take a lot of time depending of the size of your dataset though:

```python
my_dataset[0]  # fast
my_dataset = my_dataset.shuffle(seed=42)
my_dataset[0]  # up to 10x slower
my_dataset = my_dataset.flatten_indices()  # rewrite the shuffled dataset on disk as contiguous chunks of data
my_dataset[0]  # fast again
```

In this case, we recommend switching to an [`IterableDataset`] and leveraging its fast approximate shuffling method [`IterableDataset.shuffle`].
It only shuffles the shards order and adds a shuffle buffer to your dataset, which keeps the speed of your dataset optimal:

```python
my_iterable_dataset = my_dataset.to_iterable_dataset(num_shards=128)
for example in enumerate(my_iterable_dataset):  # fast
    pass

shuffled_iterable_dataset = my_iterable_dataset.shuffle(seed=42, buffer_size=100)

for example in enumerate(shuffled_iterable_dataset):  # as fast as before
    pass
```

Args:
    seed (`int`, *optional*):
        A seed to initialize the default BitGenerator if `generator=None`.
        If `None`, then fresh, unpredictable entropy will be pulled from the OS.
        If an `int` or `array_like[ints]` is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state.
    generator (`numpy.random.Generator`, *optional*):
        Numpy random Generator to use to compute the permutation of the dataset rows.
        If `generator=None` (default), uses `np.random.default_rng` (the default BitGenerator (PCG64) of NumPy).
    keep_in_memory (`bool`, default `False`):
        Keep the shuffled indices in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the shuffled indices
        can be identified, use it instead of recomputing.
    indices_cache_file_name (`str`, *optional*):
        Provide the name of a path for the cache file. It is used to store the
        shuffled indices instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds['label'][:10]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

# set a seed
>>> shuffled_ds = ds.shuffle(seed=42)
>>> shuffled_ds['label'][:10]
[1, 0, 1, 1, 0, 0, 0, 0, 0, 0]
```

---
## train_test_split
```python
from arrow_dataset import train_test_split
```

Return a dictionary ([`datasets.DatasetDict`]) with two random train and test subsets (`train` and `test` `Dataset` splits).
Splits are created from the dataset according to `test_size`, `train_size` and `shuffle`.

This method is similar to scikit-learn `train_test_split`.

Args:
    test_size (`numpy.random.Generator`, *optional*):
        Size of the test split
        If `float`, should be between `0.0` and `1.0` and represent the proportion of the dataset to include in the test split.
        If `int`, represents the absolute number of test samples.
        If `None`, the value is set to the complement of the train size.
        If `train_size` is also `None`, it will be set to `0.25`.
    train_size (`numpy.random.Generator`, *optional*):
        Size of the train split
        If `float`, should be between `0.0` and `1.0` and represent the proportion of the dataset to include in the train split.
        If `int`, represents the absolute number of train samples.
        If `None`, the value is automatically set to the complement of the test size.
    shuffle (`bool`, *optional*, defaults to `True`):
        Whether or not to shuffle the data before splitting.
    stratify_by_column (`str`, *optional*, defaults to `None`):
        The column name of labels to be used to perform stratified split of data.
    seed (`int`, *optional*):
        A seed to initialize the default BitGenerator if `generator=None`.
        If `None`, then fresh, unpredictable entropy will be pulled from the OS.
        If an `int` or `array_like[ints]` is passed, then it will be passed to SeedSequence to derive the initial BitGenerator state.
    generator (`numpy.random.Generator`, *optional*):
        Numpy random Generator to use to compute the permutation of the dataset rows.
        If `generator=None` (default), uses `np.random.default_rng` (the default BitGenerator (PCG64) of NumPy).
    keep_in_memory (`bool`, defaults to `False`):
        Keep the splits indices in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the splits indices
        can be identified, use it instead of recomputing.
    train_cache_file_name (`str`, *optional*):
        Provide the name of a path for the cache file. It is used to store the
        train split indices instead of the automatically generated cache file name.
    test_cache_file_name (`str`, *optional*):
        Provide the name of a path for the cache file. It is used to store the
        test split indices instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    train_new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the train set after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments
    test_new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the test set after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds = ds.train_test_split(test_size=0.2, shuffle=True)
DatasetDict({
    train: Dataset({
        features: ['text', 'label'],
        num_rows: 852
    })
    test: Dataset({
        features: ['text', 'label'],
        num_rows: 214
    })
})

# set a seed
>>> ds = ds.train_test_split(test_size=0.2, seed=42)

# stratified split
>>> ds = load_dataset("imdb",split="train")
Dataset({
    features: ['text', 'label'],
    num_rows: 25000
})
>>> ds = ds.train_test_split(test_size=0.2, stratify_by_column="label")
DatasetDict({
    train: Dataset({
        features: ['text', 'label'],
        num_rows: 20000
    })
    test: Dataset({
        features: ['text', 'label'],
        num_rows: 5000
    })
})
```

---
## shard
```python
from arrow_dataset import shard
```

Return the `index`-nth shard from dataset split into `num_shards` pieces.

This shards deterministically. `dset.shard(n, i)` will contain all elements of dset whose
index mod `n = i`.

`dset.shard(n, i, contiguous=True)` will instead split dset into contiguous chunks,
so it can be easily concatenated back together after processing. If `n % i == l`, then the
first `l` shards will have length `(n // i) + 1`, and the remaining shards will have length `(n // i)`.
`datasets.concatenate([dset.shard(n, i, contiguous=True) for i in range(n)])` will return
a dataset with the same order as the original.

Be sure to shard before using any randomizing operator (such as `shuffle`).
It is best if the shard operator is used early in the dataset pipeline.


Args:
    num_shards (`int`):
        How many shards to split the dataset into.
    index (`int`):
        Which shard to select and return.
    contiguous: (`bool`, defaults to `False`):
        Whether to select contiguous blocks of indices for shards.
    keep_in_memory (`bool`, defaults to `False`):
        Keep the dataset in memory instead of writing it to a cache file.
    indices_cache_file_name (`str`, *optional*):
        Provide the name of a path for the cache file. It is used to store the
        indices of each shard instead of the automatically generated cache file name.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> ds
Dataset({
    features: ['text', 'label'],
    num_rows: 1066
})
>>> ds.shard(num_shards=2, index=0)
Dataset({
    features: ['text', 'label'],
    num_rows: 533
})
```

---
## to_csv
```python
from arrow_dataset import to_csv
```

Exports the dataset to csv

Args:
    path_or_buf (`PathLike` or `FileOrBuffer`):
        Either a path to a file (e.g. `file.csv`), a remote URI (e.g. `hf://datasets/username/my_dataset_name/data.csv`),
        or a BinaryIO, where the dataset will be saved to in the specified format.
    batch_size (`int`, *optional*):
        Size of the batch to load in memory and write at once.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.
    num_proc (`int`, *optional*):
        Number of processes for multiprocessing. By default it doesn't
        use multiprocessing. `batch_size` in this case defaults to
        `datasets.config.DEFAULT_MAX_BATCH_SIZE` but feel free to make it 5x or 10x of the default
        value if you have sufficient compute power.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.19.0"/>
    **to_csv_kwargs (additional keyword arguments):
        Parameters to pass to pandas's [`pandas.DataFrame.to_csv`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html).

        <Changed version="2.10.0">

        Now, `index` defaults to `False` if not specified.

        If you would like to write the index, pass `index=True` and also set a name for the index column by
        passing `index_label`.

        </Changed>

Returns:
    `int`: The number of characters or bytes written.

Example:

```py
>>> ds.to_csv("path/to/dataset/directory")
```

---
## to_dict
```python
from arrow_dataset import to_dict
```

Returns the dataset as a Python dict. Can also return a generator for large datasets.

Args:
    batch_size (`int`, *optional*): The size (number of rows) of the batches if `batched` is `True`.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.

Returns:
    `dict` or `Iterator[dict]`

Example:

```py
>>> ds.to_dict()
```

---
## to_list
```python
from arrow_dataset import to_list
```

Returns the dataset as a Python list.

Returns:
    `list`

Example:

```py
>>> ds.to_list()
```

---
## to_json
```python
from arrow_dataset import to_json
```

Export the dataset to JSON Lines or JSON.

The default output format is [JSON Lines](https://jsonlines.org/).
To export to [JSON](https://www.json.org), pass `lines=False` argument and the desired `orient`.

Args:
    path_or_buf (`PathLike` or `FileOrBuffer`):
        Either a path to a file (e.g. `file.json`), a remote URI (e.g. `hf://datasets/username/my_dataset_name/data.json`),
        or a BinaryIO, where the dataset will be saved to in the specified format.
    batch_size (`int`, *optional*):
        Size of the batch to load in memory and write at once.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.
    num_proc (`int`, *optional*):
        Number of processes for multiprocessing. By default, it doesn't
        use multiprocessing. `batch_size` in this case defaults to
        `datasets.config.DEFAULT_MAX_BATCH_SIZE` but feel free to make it 5x or 10x of the default
        value if you have sufficient compute power.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.19.0"/>
    **to_json_kwargs (additional keyword arguments):
        Parameters to pass to pandas's [`pandas.DataFrame.to_json`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_json.html).
        Default arguments are `lines=True` and `orient="records".

        <Changed version="2.11.0">

        The parameter `index` defaults to `False` if `orient` is `"split"` or `"table"`.

        If you would like to write the index, pass `index=True`.

        </Changed>

Returns:
    `int`: The number of characters or bytes written.

Example:

```py
>>> ds.to_json("path/to/dataset/directory/filename.jsonl")
```

---
## to_pandas
```python
from arrow_dataset import to_pandas
```

Returns the dataset as a `pandas.DataFrame`. Can also return a generator for large datasets.

Args:
    batched (`bool`):
        Set to `True` to return a generator that yields the dataset as batches
        of `batch_size` rows. Defaults to `False` (returns the whole datasets once).
    batch_size (`int`, *optional*):
        The size (number of rows) of the batches if `batched` is `True`.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.

Returns:
    `pandas.DataFrame` or `Iterator[pandas.DataFrame]`

Example:

```py
>>> ds.to_pandas()
```

---
## to_polars
```python
from arrow_dataset import to_polars
```

Returns the dataset as a `polars.DataFrame`. Can also return a generator for large datasets.

Args:
    batched (`bool`):
        Set to `True` to return a generator that yields the dataset as batches
        of `batch_size` rows. Defaults to `False` (returns the whole datasets once).
    batch_size (`int`, *optional*):
        The size (number of rows) of the batches if `batched` is `True`.
        Defaults to `genomicsml.datasets.config.DEFAULT_MAX_BATCH_SIZE`.
    schema_overrides (`dict`, *optional*):
        Support type specification or override of one or more columns; note that
        any dtypes inferred from the schema param will be overridden.
    rechunk (`bool`):
        Make sure that all data is in contiguous memory. Defaults to `True`.
Returns:
    `polars.DataFrame` or `Iterator[polars.DataFrame]`

Example:

```py
>>> ds.to_polars()
```

---
## to_parquet
```python
from arrow_dataset import to_parquet
```

Exports the dataset to parquet

Args:
    path_or_buf (`PathLike` or `FileOrBuffer`):
        Either a path to a file (e.g. `file.parquet`), a remote URI (e.g. `hf://datasets/username/my_dataset_name/data.parquet`),
        or a BinaryIO, where the dataset will be saved to in the specified format.
    batch_size (`int`, *optional*):
        Size of the batch to load in memory and write at once.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.19.0"/>
    **parquet_writer_kwargs (additional keyword arguments):
        Parameters to pass to PyArrow's `pyarrow.parquet.ParquetWriter`.

Returns:
    `int`: The number of characters or bytes written.

Example:

```py
>>> ds.to_parquet("path/to/dataset/directory")
```

---
## to_sql
```python
from arrow_dataset import to_sql
```

Exports the dataset to a SQL database.

Args:
    name (`str`):
        Name of SQL table.
    con (`str` or `sqlite3.Connection` or `sqlalchemy.engine.Connection` or `sqlalchemy.engine.Connection`):
        A [URI string](https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls) or a SQLite3/SQLAlchemy connection object used to write to a database.
    batch_size (`int`, *optional*):
        Size of the batch to load in memory and write at once.
        Defaults to `datasets.config.DEFAULT_MAX_BATCH_SIZE`.
    **sql_writer_kwargs (additional keyword arguments):
        Parameters to pass to pandas's [`pandas.DataFrame.to_sql`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html).

        <Changed version="2.11.0">

        Now, `index` defaults to `False` if not specified.

        If you would like to write the index, pass `index=True` and also set a name for the index column by
        passing `index_label`.

        </Changed>

Returns:
    `int`: The number of records written.

Example:

```py
>>> # con provided as a connection URI string
>>> ds.to_sql("data", "sqlite:///my_own_db.sql")
>>> # con provided as a sqlite3 connection object
>>> import sqlite3
>>> con = sqlite3.connect("my_own_db.sql")
>>> with con:
...     ds.to_sql("data", con)
```

---
## _estimate_nbytes
```python
from arrow_dataset import _estimate_nbytes
```



---
## _generate_tables_from_shards
```python
from arrow_dataset import _generate_tables_from_shards
```



---
## _generate_tables_from_cache_file
```python
from arrow_dataset import _generate_tables_from_cache_file
```



---
## to_iterable_dataset
```python
from arrow_dataset import to_iterable_dataset
```

Get an [`datasets.IterableDataset`] from a map-style [`datasets.Dataset`].
This is equivalent to loading a dataset in streaming mode with [`datasets.load_dataset`], but much faster since the data is streamed from local files.

Contrary to map-style datasets, iterable datasets are lazy and can only be iterated over (e.g. using a for loop).
Since they are read sequentially in training loops, iterable datasets are much faster than map-style datasets.
All the transformations applied to iterable datasets like filtering or processing are done on-the-fly when you start iterating over the dataset.

Still, it is possible to shuffle an iterable dataset using [`datasets.IterableDataset.shuffle`].
This is a fast approximate shuffling that works best if you have multiple shards and if you specify a buffer size that is big enough.

To get the best speed performance, make sure your dataset doesn't have an indices mapping.
If this is the case, the data are not read contiguously, which can be slow sometimes.
You can use `ds = ds.flatten_indices()` to write your dataset in contiguous chunks of data and have optimal speed before switching to an iterable dataset.

Args:
    num_shards (`int`, default to `1`):
        Number of shards to define when instantiating the iterable dataset. This is especially useful for big datasets to be able to shuffle properly,
        and also to enable fast parallel loading using a PyTorch DataLoader or in distributed setups for example.
        Shards are defined using [`datasets.Dataset.shard`]: it simply slices the data without writing anything on disk.

Returns:
    [`datasets.IterableDataset`]

Example:

Basic usage:
```python
>>> ids = ds.to_iterable_dataset()
>>> for example in ids:
...     pass
```

With lazy filtering and processing:
```python
>>> ids = ds.to_iterable_dataset()
>>> ids = ids.filter(filter_fn).map(process_fn)  # will filter and process on-the-fly when you start iterating over the iterable dataset
>>> for example in ids:
...     pass
```

With sharding to enable efficient shuffling:
```python
>>> ids = ds.to_iterable_dataset(num_shards=64)  # the dataset is split into 64 shards to be iterated over
>>> ids = ids.shuffle(buffer_size=10_000)  # will shuffle the shards order and use a shuffle buffer for fast approximate shuffling when you start iterating
>>> for example in ids:
...     pass
```

With a PyTorch DataLoader:
```python
>>> import torch
>>> ids = ds.to_iterable_dataset(num_shards=64)
>>> ids = ids.filter(filter_fn).map(process_fn)
>>> dataloader = torch.utils.data.DataLoader(ids, num_workers=4)  # will assign 64 / 4 = 16 shards to each worker to load, filter and process when you start iterating
>>> for example in ids:
...     pass
```

With a PyTorch DataLoader and shuffling:
```python
>>> import torch
>>> ids = ds.to_iterable_dataset(num_shards=64)
>>> ids = ids.shuffle(buffer_size=10_000)  # will shuffle the shards order and use a shuffle buffer when you start iterating
>>> dataloader = torch.utils.data.DataLoader(ids, num_workers=4)  # will assign 64 / 4 = 16 shards from the shuffled list of shards to each worker when you start iterating
>>> for example in ids:
...     pass
```

In a distributed setup like PyTorch DDP with a PyTorch DataLoader and shuffling
```python
>>> from datasets.distributed import split_dataset_by_node
>>> ids = ds.to_iterable_dataset(num_shards=512)
>>> ids = ids.shuffle(buffer_size=10_000, seed=42)  # will shuffle the shards order and use a shuffle buffer when you start iterating
>>> ids = split_dataset_by_node(ds, world_size=8, rank=0)  # will keep only 512 / 8 = 64 shards from the shuffled lists of shards when you start iterating
>>> dataloader = torch.utils.data.DataLoader(ids, num_workers=4)  # will assign 64 / 4 = 16 shards from this node's list of shards to each worker when you start iterating
>>> for example in ids:
...     pass
```

With shuffling and multiple epochs:
```python
>>> ids = ds.to_iterable_dataset(num_shards=64)
>>> ids = ids.shuffle(buffer_size=10_000, seed=42)  # will shuffle the shards order and use a shuffle buffer when you start iterating
>>> for epoch in range(n_epochs):
...     ids.set_epoch(epoch)  # will use effective_seed = seed + epoch to shuffle the shards and for the shuffle buffer when you start iterating
...     for example in ids:
...         pass
```
Feel free to also use [`IterableDataset.set_epoch`] when using a PyTorch DataLoader or in distributed setups.

---
## _push_parquet_shards_to_hub
```python
from arrow_dataset import _push_parquet_shards_to_hub
```

Pushes the dataset shards as Parquet files to the hub.

Returns:
    additions (`List[CommitOperation]`): list of the `CommitOperationAdd` of the uploaded shards
    uploaded_size (`int`): number of uploaded bytes to the repository
    dataset_nbytes (`int`): approximate size in bytes of the uploaded dataset afer uncompression

---
## push_to_hub
```python
from arrow_dataset import push_to_hub
```

Pushes the dataset to the hub as a Parquet dataset.
The dataset is pushed using HTTP requests and does not need to have neither git or git-lfs installed.

The resulting Parquet files are self-contained by default. If your dataset contains [`Image`] or [`Audio`]
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `embed_external_files` to `False`.

Args:
    repo_id (`str`):
        The ID of the repository to push to in the following format: `<user>/<dataset_name>` or
        `<org>/<dataset_name>`. Also accepts `<dataset_name>`, which will default to the namespace
        of the logged-in user.
    config_name (`str`, defaults to "default"):
        The configuration name (or subset) of a dataset. Defaults to "default".
    set_default (`bool`, *optional*):
        Whether to set this configuration as the default one. Otherwise, the default configuration is the one
        named "default".
    split (`str`, *optional*):
        The name of the split that will be given to that dataset. Defaults to `self.split`.
    data_dir (`str`, *optional*):
        Directory name that will contain the uploaded data files. Defaults to the `config_name` if different
        from "default", else "data".

        <Added version="2.17.0"/>
    commit_message (`str`, *optional*):
        Message to commit while pushing. Will default to `"Upload dataset"`.
    commit_description (`str`, *optional*):
        Description of the commit that will be created.
        Additionally, description of the PR if a PR is created (`create_pr` is True).

        <Added version="2.16.0"/>
    private (`bool`, *optional*, defaults to `False`):
        Whether the dataset repository should be set to private or not. Only affects repository creation:
        a repository that already exists will not be affected by that parameter.
    token (`str`, *optional*):
        An optional authentication token for the Hugging Face Hub. If no token is passed, will default
        to the token saved locally when logging in with `huggingface-cli login`. Will raise an error
        if no token is passed and the user is not logged-in.
    revision (`str`, *optional*):
        Branch to push the uploaded files to. Defaults to the `"main"` branch.

        <Added version="2.15.0"/>
    create_pr (`bool`, *optional*, defaults to `False`):
        Whether to create a PR with the uploaded files or directly commit.

        <Added version="2.15.0"/>
    max_shard_size (`int` or `str`, *optional*, defaults to `"500MB"`):
        The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by
        a unit (like `"5MB"`).
    num_shards (`int`, *optional*):
        Number of shards to write. By default, the number of shards depends on `max_shard_size`.

        <Added version="2.8.0"/>
    embed_external_files (`bool`, defaults to `True`):
        Whether to embed file bytes in the shards.
        In particular, this will do the following before the push for the fields of type:

        - [`Audio`] and [`Image`]: remove local path information and embed file content in the Parquet files.

Return:
    huggingface_hub.CommitInfo

Example:

```python
>>> dataset.push_to_hub("<organization>/<dataset_id>")
>>> dataset_dict.push_to_hub("<organization>/<dataset_id>", private=True)
>>> dataset.push_to_hub("<organization>/<dataset_id>", max_shard_size="1GB")
>>> dataset.push_to_hub("<organization>/<dataset_id>", num_shards=1024)
```

If your dataset has multiple splits (e.g. train/validation/test):

```python
>>> train_dataset.push_to_hub("<organization>/<dataset_id>", split="train")
>>> val_dataset.push_to_hub("<organization>/<dataset_id>", split="validation")
>>> # later
>>> dataset = load_dataset("<organization>/<dataset_id>")
>>> train_dataset = dataset["train"]
>>> val_dataset = dataset["validation"]
```

If you want to add a new configuration (or subset) to a dataset (e.g. if the dataset has multiple tasks/versions/languages):

```python
>>> english_dataset.push_to_hub("<organization>/<dataset_id>", "en")
>>> french_dataset.push_to_hub("<organization>/<dataset_id>", "fr")
>>> # later
>>> english_dataset = load_dataset("<organization>/<dataset_id>", "en")
>>> french_dataset = load_dataset("<organization>/<dataset_id>", "fr")
```

---
## add_column
```python
from arrow_dataset import add_column
```

Add column to Dataset.

<Added version="1.7"/>

Args:
    name (`str`):
        Column name.
    column (`list` or `np.array`):
        Column data to be added.
    feature (`FeatureType` or `None`, defaults to `None`):
        Column datatype.

Returns:
    [`Dataset`]

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> more_text = ds["text"]
>>> ds.add_column(name="text_2", column=more_text)
Dataset({
    features: ['text', 'label', 'text_2'],
    num_rows: 1066
})
```

---
## add_faiss_index
```python
from arrow_dataset import add_faiss_index
```

Add a dense index using Faiss for fast retrieval.
By default the index is done over the vectors of the specified column.
You can specify `device` if you want to run it on GPU (`device` must be the GPU index).
You can find more information about Faiss here:

- For [string factory](https://github.com/facebookresearch/faiss/wiki/The-index-factory)

Args:
    column (`str`):
        The column of the vectors to add to the index.
    index_name (`str`, *optional*):
        The `index_name`/identifier of the index.
        This is the `index_name` that is used to call [`~datasets.Dataset.get_nearest_examples`] or [`~datasets.Dataset.search`].
        By default it corresponds to `column`.
    device (`Union[int, List[int]]`, *optional*):
        If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
        If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.
    string_factory (`str`, *optional*):
        This is passed to the index factory of Faiss to create the index.
        Default index class is `IndexFlat`.
    metric_type (`int`, *optional*):
        Type of metric. Ex: `faiss.METRIC_INNER_PRODUCT` or `faiss.METRIC_L2`.
    custom_index (`faiss.Index`, *optional*):
        Custom Faiss index that you already have instantiated and configured for your needs.
    batch_size (`int`):
        Size of the batch to use while adding vectors to the `FaissIndex`. Default value is `1000`.
        <Added version="2.4.0"/>
    train_size (`int`, *optional*):
        If the index needs a training step, specifies how many vectors will be used to train the index.
    faiss_verbose (`bool`, defaults to `False`):
        Enable the verbosity of the Faiss index.
    dtype (`data-type`):
        The dtype of the numpy arrays that are indexed.
        Default is `np.float32`.

Example:

```python
>>> ds = datasets.load_dataset('crime_and_punish', split='train')
>>> ds_with_embeddings = ds.map(lambda example: {'embeddings': embed(example['line']}))
>>> ds_with_embeddings.add_faiss_index(column='embeddings')
>>> # query
>>> scores, retrieved_examples = ds_with_embeddings.get_nearest_examples('embeddings', embed('my new query'), k=10)
>>> # save index
>>> ds_with_embeddings.save_faiss_index('embeddings', 'my_index.faiss')

>>> ds = datasets.load_dataset('crime_and_punish', split='train')
>>> # load index
>>> ds.load_faiss_index('embeddings', 'my_index.faiss')
>>> # query
>>> scores, retrieved_examples = ds.get_nearest_examples('embeddings', embed('my new query'), k=10)
```

---
## add_faiss_index_from_external_arrays
```python
from arrow_dataset import add_faiss_index_from_external_arrays
```

Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `external_arrays`.
You can specify `device` if you want to run it on GPU (`device` must be the GPU index).
You can find more information about Faiss here:

- For [string factory](https://github.com/facebookresearch/faiss/wiki/The-index-factory)

Args:
    external_arrays (`np.array`):
        If you want to use arrays from outside the lib for the index, you can set `external_arrays`.
        It will use `external_arrays` to create the Faiss index instead of the arrays in the given `column`.
    index_name (`str`):
        The `index_name`/identifier of the index.
        This is the `index_name` that is used to call [`~datasets.Dataset.get_nearest_examples`] or [`~datasets.Dataset.search`].
    device (Optional `Union[int, List[int]]`, *optional*):
        If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
        If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.
    string_factory (`str`, *optional*):
        This is passed to the index factory of Faiss to create the index.
        Default index class is `IndexFlat`.
    metric_type (`int`, *optional*):
        Type of metric. Ex: `faiss.faiss.METRIC_INNER_PRODUCT` or `faiss.METRIC_L2`.
    custom_index (`faiss.Index`, *optional*):
        Custom Faiss index that you already have instantiated and configured for your needs.
    batch_size (`int`, *optional*):
        Size of the batch to use while adding vectors to the FaissIndex. Default value is 1000.
        <Added version="2.4.0"/>
    train_size (`int`, *optional*):
        If the index needs a training step, specifies how many vectors will be used to train the index.
    faiss_verbose (`bool`, defaults to False):
        Enable the verbosity of the Faiss index.
    dtype (`numpy.dtype`):
        The dtype of the numpy arrays that are indexed. Default is np.float32.

---
## add_elasticsearch_index
```python
from arrow_dataset import add_elasticsearch_index
```

Add a text index using ElasticSearch for fast retrieval. This is done in-place.

Args:
    column (`str`):
        The column of the documents to add to the index.
    index_name (`str`, *optional*):
        The `index_name`/identifier of the index.
        This is the index name that is used to call [`~Dataset.get_nearest_examples`] or [`~Dataset.search`].
        By default it corresponds to `column`.
    host (`str`, *optional*, defaults to `localhost`):
        Host of where ElasticSearch is running.
    port (`str`, *optional*, defaults to `9200`):
        Port of where ElasticSearch is running.
    es_client (`elasticsearch.Elasticsearch`, *optional*):
        The elasticsearch client used to create the index if host and port are `None`.
    es_index_name (`str`, *optional*):
        The elasticsearch index name used to create the index.
    es_index_config (`dict`, *optional*):
        The configuration of the elasticsearch index.
        Default config is:
            ```
            {
                "settings": {
                    "number_of_shards": 1,
                    "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}},
                },
                "mappings": {
                    "properties": {
                        "text": {
                            "type": "text",
                            "analyzer": "standard",
                            "similarity": "BM25"
                        },
                    }
                },
            }
            ```
Example:

```python
>>> es_client = elasticsearch.Elasticsearch()
>>> ds = datasets.load_dataset('crime_and_punish', split='train')
>>> ds.add_elasticsearch_index(column='line', es_client=es_client, es_index_name="my_es_index")
>>> scores, retrieved_examples = ds.get_nearest_examples('line', 'my new query', k=10)
```

---
## add_item
```python
from arrow_dataset import add_item
```

Add item to Dataset.

<Added version="1.7"/>

Args:
    item (`dict`):
        Item data to be added.

Returns:
    [`Dataset`]

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation")
>>> new_review = {'label': 0, 'text': 'this movie is the absolute worst thing I have ever seen'}
>>> ds = ds.add_item(new_review)
>>> ds[-1]
{'label': 0, 'text': 'this movie is the absolute worst thing I have ever seen'}
```

---
## align_labels_with_mapping
```python
from arrow_dataset import align_labels_with_mapping
```

Align the dataset's label ID and label name mapping to match an input `label2id` mapping.
This is useful when you want to ensure that a model's predicted labels are aligned with the dataset.
The alignment in done using the lowercase label names.

Args:
    label2id (`dict`):
        The label name to ID mapping to align the dataset with.
    label_column (`str`):
        The column name of labels to align on.

Example:

```python
>>> # dataset with mapping {'entailment': 0, 'neutral': 1, 'contradiction': 2}
>>> ds = load_dataset("glue", "mnli", split="train")
>>> # mapping to align with
>>> label2id = {'CONTRADICTION': 0, 'NEUTRAL': 1, 'ENTAILMENT': 2}
>>> ds_aligned = ds.align_labels_with_mapping(label2id, "label")
```

---
## apply_offset_to_indices_table
```python
from arrow_dataset import apply_offset_to_indices_table
```



---
## split_features_and_labels
```python
from arrow_dataset import split_features_and_labels
```



---
## cleanup_callback
```python
from arrow_dataset import cleanup_callback
```



---
## cast_to_class_labels
```python
from arrow_dataset import cast_to_class_labels
```



---
## rename
```python
from arrow_dataset import rename
```



---
## load_processed_shard_from_cache
```python
from arrow_dataset import load_processed_shard_from_cache
```

Load a processed shard from cache if it exists, otherwise throw an error.

---
## NumExamplesMismatchError
```python
from arrow_dataset import NumExamplesMismatchError
```



---
## validate_function_output
```python
from arrow_dataset import validate_function_output
```

Validate output of the map function.

---
## apply_function_on_filtered_inputs
```python
from arrow_dataset import apply_function_on_filtered_inputs
```

Utility to apply the function on a selection of columns.

---
## init_buffer_and_writer
```python
from arrow_dataset import init_buffer_and_writer
```



---
## batch_fn
```python
from arrow_dataset import batch_fn
```



---
## stringify_column
```python
from arrow_dataset import stringify_column
```



---
## format_cache_file_name
```python
from arrow_dataset import format_cache_file_name
```



---
## format_new_fingerprint
```python
from arrow_dataset import format_new_fingerprint
```



---
## extra_nbytes_visitor
```python
from arrow_dataset import extra_nbytes_visitor
```



---
## shards_with_embedded_external_files
```python
from arrow_dataset import shards_with_embedded_external_files
```



---
## process_label_ids
```python
from arrow_dataset import process_label_ids
```



---
## iter_random_indices
```python
from arrow_dataset import iter_random_indices
```

Get an infinite iterator that randomly samples the index of the source to pick examples from.

---
## __name__
```python
from data_files import __name__
```



---
## Url
```python
from data_files import Url
```



---
## EmptyDatasetError
```python
from data_files import EmptyDatasetError
```



---
## contains_wildcards
```python
from data_files import contains_wildcards
```



---
## sanitize_patterns
```python
from data_files import sanitize_patterns
```

Take the data_files patterns from the user, and format them into a dictionary.
Each key is the name of the split, and each value is a list of data files patterns (paths or urls).
The default split is "train".

Returns:
    patterns: dictionary of split_name -> list of patterns

---
## _is_inside_unrequested_special_dir
```python
from data_files import _is_inside_unrequested_special_dir
```

When a path matches a pattern, we additionnally check if it's inside a special directory
we ignore by default (if it starts with a double underscore).

Users can still explicitly request a filepath inside such a directory if "__pycache__" is
mentioned explicitly in the requested pattern.

Some examples:

base directory:

    ./
    └── __pycache__
        └── b.txt

>>> _is_inside_unrequested_special_dir("__pycache__/b.txt", "**")
True
>>> _is_inside_unrequested_special_dir("__pycache__/b.txt", "*/b.txt")
True
>>> _is_inside_unrequested_special_dir("__pycache__/b.txt", "__pycache__/*")
False
>>> _is_inside_unrequested_special_dir("__pycache__/b.txt", "__*/*")
False

---
## _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir
```python
from data_files import _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir
```

When a path matches a pattern, we additionnally check if it's a hidden file or if it's inside
a hidden directory we ignore by default, i.e. if the file name or a parent directory name starts with a dot.

Users can still explicitly request a filepath that is hidden or is inside a hidden directory
if the hidden part is mentioned explicitly in the requested pattern.

Some examples:

base directory:

    ./
    └── .hidden_file.txt

>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_file.txt", "**")
True
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_file.txt", ".*")
False

base directory:

    ./
    └── .hidden_dir
        └── a.txt

>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/a.txt", "**")
True
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/a.txt", ".*/*")
False
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/a.txt", ".hidden_dir/*")
False

base directory:

    ./
    └── .hidden_dir
        └── .hidden_file.txt

>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/.hidden_file.txt", "**")
True
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/.hidden_file.txt", ".*/*")
True
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/.hidden_file.txt", ".*/.*")
False
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/.hidden_file.txt", ".hidden_dir/*")
True
>>> _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(".hidden_dir/.hidden_file.txt", ".hidden_dir/.*")
False

---
## _get_data_files_patterns
```python
from data_files import _get_data_files_patterns
```

Get the default pattern from a directory or repository by testing all the supported patterns.
The first patterns to return a non-empty list of data files is returned.

In order, it first tests if SPLIT_PATTERN_SHARDED works, otherwise it tests the patterns in ALL_DEFAULT_PATTERNS.

---
## _get_metadata_files_patterns
```python
from data_files import _get_metadata_files_patterns
```

Get the supported metadata patterns from a directory or repository.

---
## resolve_pattern
```python
from data_files import resolve_pattern
```

Resolve the paths and URLs of the data files from the pattern passed by the user.

You can use patterns to resolve multiple local files. Here are a few examples:
- *.csv to match all the CSV files at the first level
- **.csv to match all the CSV files at any level
- data/* to match all the files inside "data"
- data/** to match all the files inside "data" and its subdirectories

The patterns are resolved using the fsspec glob. In fsspec>=2023.12.0 this is equivalent to
Python's glob.glob, Path.glob, Path.match and fnmatch where ** is unsupported with a prefix/suffix
other than a forward slash /.

More generally:
- '*' matches any character except a forward-slash (to match just the file or directory name)
- '**' matches any character including a forward-slash /

Hidden files and directories (i.e. whose names start with a dot) are ignored, unless they are explicitly requested.
The same applies to special directories that start with a double underscore like "__pycache__".
You can still include one if the pattern explicilty mentions it:
- to include a hidden file: "*/.hidden.txt" or "*/.*"
- to include a hidden directory: ".hidden/*" or ".*/*"
- to include a special directory: "__special__/*" or "__*/*"

Example::

    >>> from datasets.data_files import resolve_pattern
    >>> base_path = "."
    >>> resolve_pattern("docs/**/*.py", base_path)
    [/Users/mariosasko/Desktop/projects/datasets/docs/source/_config.py']

Args:
    pattern (str): Unix pattern or paths or URLs of the data files to resolve.
        The paths can be absolute or relative to base_path.
        Remote filesystems using fsspec are supported, e.g. with the hf:// protocol.
    base_path (str): Base path to use when resolving relative paths.
    allowed_extensions (Optional[list], optional): White-list of file extensions to use. Defaults to None (all extensions).
        For example: allowed_extensions=[".csv", ".json", ".txt", ".parquet"]
    download_config ([`DownloadConfig`], *optional*): Specific download configuration parameters.
Returns:
    List[str]: List of paths or URLs to the local or remote files that match the patterns.

---
## get_data_patterns
```python
from data_files import get_data_patterns
```

Get the default pattern from a directory testing all the supported patterns.
The first patterns to return a non-empty list of data files is returned.

Some examples of supported patterns:

Input:

    my_dataset_repository/
    ├── README.md
    └── dataset.csv

Output:

    {'train': ['**']}

Input:

    my_dataset_repository/
    ├── README.md
    ├── train.csv
    └── test.csv

    my_dataset_repository/
    ├── README.md
    └── data/
        ├── train.csv
        └── test.csv

    my_dataset_repository/
    ├── README.md
    ├── train_0.csv
    ├── train_1.csv
    ├── train_2.csv
    ├── train_3.csv
    ├── test_0.csv
    └── test_1.csv

Output:

    {'train': ['**/train[-._ 0-9]*', '**/*[-._ 0-9]train[-._ 0-9]*', '**/training[-._ 0-9]*', '**/*[-._ 0-9]training[-._ 0-9]*'],
     'test': ['**/test[-._ 0-9]*', '**/*[-._ 0-9]test[-._ 0-9]*', '**/testing[-._ 0-9]*', '**/*[-._ 0-9]testing[-._ 0-9]*', ...]}

Input:

    my_dataset_repository/
    ├── README.md
    └── data/
        ├── train/
        │   ├── shard_0.csv
        │   ├── shard_1.csv
        │   ├── shard_2.csv
        │   └── shard_3.csv
        └── test/
            ├── shard_0.csv
            └── shard_1.csv

Output:

    {'train': ['**/train/**', '**/train[-._ 0-9]*/**', '**/*[-._ 0-9]train/**', '**/*[-._ 0-9]train[-._ 0-9]*/**', ...],
     'test': ['**/test/**', '**/test[-._ 0-9]*/**', '**/*[-._ 0-9]test/**', '**/*[-._ 0-9]test[-._ 0-9]*/**', ...]}

Input:

    my_dataset_repository/
    ├── README.md
    └── data/
        ├── train-00000-of-00003.csv
        ├── train-00001-of-00003.csv
        ├── train-00002-of-00003.csv
        ├── test-00000-of-00001.csv
        ├── random-00000-of-00003.csv
        ├── random-00001-of-00003.csv
        └── random-00002-of-00003.csv

Output:

    {'train': ['data/train-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*'],
     'test': ['data/test-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*'],
     'random': ['data/random-[0-9][0-9][0-9][0-9][0-9]-of-[0-9][0-9][0-9][0-9][0-9]*.*']}

In order, it first tests if SPLIT_PATTERN_SHARDED works, otherwise it tests the patterns in ALL_DEFAULT_PATTERNS.

---
## get_metadata_patterns
```python
from data_files import get_metadata_patterns
```

Get the supported metadata patterns from a local directory.

---
## _get_single_origin_metadata
```python
from data_files import _get_single_origin_metadata
```



---
## _get_origin_metadata
```python
from data_files import _get_origin_metadata
```



---
## DataFilesList
```python
from data_files import DataFilesList
```

List of data files (absolute local paths or URLs).
It has two construction methods given the user's data files patterns:
- ``from_hf_repo``: resolve patterns inside a dataset repository
- ``from_local_or_remote``: resolve patterns from a local path

Moreover, DataFilesList has an additional attribute ``origin_metadata``.
It can store:
- the last modified time of local files
- ETag of remote files
- commit sha of a dataset repository

Thanks to this additional attribute, it is possible to hash the list
and get a different hash if and only if at least one file changed.
This is useful for caching Dataset objects that are obtained from a list of data files.

---
## DataFilesDict
```python
from data_files import DataFilesDict
```

Dict of split_name -> list of data files (absolute local paths or URLs).
It has two construction methods given the user's data files patterns :
- ``from_hf_repo``: resolve patterns inside a dataset repository
- ``from_local_or_remote``: resolve patterns from a local path

Moreover, each list is a DataFilesList. It is possible to hash the dictionary
and get a different hash if and only if at least one file changed.
For more info, see [`DataFilesList`].

This is useful for caching Dataset objects that are obtained from a list of data files.

Changing the order of the keys of this dictionary also doesn't change its hash.

---
## DataFilesPatternsList
```python
from data_files import DataFilesPatternsList
```

List of data files patterns (absolute local paths or URLs).
For each pattern there should also be a list of allowed extensions
to keep, or a None ot keep all the files for the pattern.

---
## DataFilesPatternsDict
```python
from data_files import DataFilesPatternsDict
```

Dict of split_name -> list of data files patterns (absolute local paths or URLs).

---
## __init__
```python
from data_files import __init__
```



---
## __add__
```python
from data_files import __add__
```



---
## from_hf_repo
```python
from data_files import from_hf_repo
```



---
## from_local_or_remote
```python
from data_files import from_local_or_remote
```



---
## from_patterns
```python
from data_files import from_patterns
```



---
## filter_extensions
```python
from data_files import filter_extensions
```



---
## resolve
```python
from data_files import resolve
```



---
## __name__
```python
from iterable_dataset import __name__
```



---
## identity_func
```python
from iterable_dataset import identity_func
```



---
## _rename_columns_fn
```python
from iterable_dataset import _rename_columns_fn
```



---
## add_column_fn
```python
from iterable_dataset import add_column_fn
```



---
## _infer_features_from_batch
```python
from iterable_dataset import _infer_features_from_batch
```



---
## _examples_to_batch
```python
from iterable_dataset import _examples_to_batch
```



---
## _batch_to_examples
```python
from iterable_dataset import _batch_to_examples
```

Convert a batch (dict of examples) to examples list

---
## _convert_to_arrow
```python
from iterable_dataset import _convert_to_arrow
```

Convert and group examples in Arrow tables of size `batch_size`.

Args:
    iterable (`Iterable[Tuple[Key, dict]]`):
        An examples iterable containing tuples (example_key, example) of type (int/str, dict)
    batch_size (`Optional[int]`):
        Size of each sub-table to yield. If None or <= 0, yields the full table.
    drop_last_batch (`bool`, defaults to `False`):
        Drop the last batch if it is smaller than `batch_size`.

---
## _BaseExamplesIterable
```python
from iterable_dataset import _BaseExamplesIterable
```

Base class for the examples iterable used by an IterableDataset

---
## ExamplesIterable
```python
from iterable_dataset import ExamplesIterable
```



---
## ShuffledDataSourcesExamplesIterable
```python
from iterable_dataset import ShuffledDataSourcesExamplesIterable
```



---
## ArrowExamplesIterable
```python
from iterable_dataset import ArrowExamplesIterable
```



---
## ShuffledDataSourcesArrowExamplesIterable
```python
from iterable_dataset import ShuffledDataSourcesArrowExamplesIterable
```



---
## RebatchedArrowExamplesIterable
```python
from iterable_dataset import RebatchedArrowExamplesIterable
```



---
## SelectColumnsIterable
```python
from iterable_dataset import SelectColumnsIterable
```



---
## StepExamplesIterable
```python
from iterable_dataset import StepExamplesIterable
```



---
## CyclingMultiSourcesExamplesIterable
```python
from iterable_dataset import CyclingMultiSourcesExamplesIterable
```



---
## VerticallyConcatenatedMultiSourcesExamplesIterable
```python
from iterable_dataset import VerticallyConcatenatedMultiSourcesExamplesIterable
```

VerticallyConcatenatedMultiSourcesExamplesIterable simply chains the input iterables.
It doesn't require the examples iterables to always yield the same columns.
Instead, this is handled by the `IterableDataset` class or `TypedExamplesIterable`.

For information, `IterableDataset` merges the features of all the datasets to concatenate into one.
We use `IterableDataset._resolve_features` to obtain the features of all the datasets to concatenate.

Then for each example, `IterableDataset` and `TypedExamplesIterable` automatically fill missing columns with None.
This is done with `_apply_feature_types_on_example`.

---
## _check_column_names
```python
from iterable_dataset import _check_column_names
```

Check the column names to make sure they don't contain duplicates.

---
## HorizontallyConcatenatedMultiSourcesExamplesIterable
```python
from iterable_dataset import HorizontallyConcatenatedMultiSourcesExamplesIterable
```

HorizontallyConcatenatedMultiSourcesExamplesIterable merges examples together for the input list of iterables.
It also checks that there are no duplicate columns (otherwise we don't know which one to keep).
This check is done once when yielding the first example.

However it doesn't fill missing columns with None.
Instead, this is handled by the `IterableDataset` class or `TypedExamplesIterable`.

For information, `IterableDataset` merges the features of all the datasets to concatenate into one.
We use `IterableDataset._resolve_features` to obtain the features of all the datasets to concatenate.

Then for each example, `IterableDataset` and `TypedExamplesIterable` automatically fill missing columns with None.
This is done with `_apply_feature_types_on_example`.

---
## RandomlyCyclingMultiSourcesExamplesIterable
```python
from iterable_dataset import RandomlyCyclingMultiSourcesExamplesIterable
```



---
## MappedExamplesIterable
```python
from iterable_dataset import MappedExamplesIterable
```



---
## FilteredExamplesIterable
```python
from iterable_dataset import FilteredExamplesIterable
```



---
## BufferShuffledExamplesIterable
```python
from iterable_dataset import BufferShuffledExamplesIterable
```



---
## SkipExamplesIterable
```python
from iterable_dataset import SkipExamplesIterable
```



---
## TakeExamplesIterable
```python
from iterable_dataset import TakeExamplesIterable
```



---
## _apply_feature_types_on_example
```python
from iterable_dataset import _apply_feature_types_on_example
```



---
## _apply_feature_types_on_batch
```python
from iterable_dataset import _apply_feature_types_on_batch
```



---
## TypedExamplesIterable
```python
from iterable_dataset import TypedExamplesIterable
```



---
## FormattingConfig
```python
from iterable_dataset import FormattingConfig
```



---
## ShufflingConfig
```python
from iterable_dataset import ShufflingConfig
```



---
## DistributedConfig
```python
from iterable_dataset import DistributedConfig
```



---
## _maybe_add_torch_iterable_dataset_parent_class
```python
from iterable_dataset import _maybe_add_torch_iterable_dataset_parent_class
```

Add torch.utils.data.IterableDataset as a parent class if 'torch' is available

---
## _maybe_share_with_torch_persistent_workers
```python
from iterable_dataset import _maybe_share_with_torch_persistent_workers
```



---
## IterableDataset
```python
from iterable_dataset import IterableDataset
```

A Dataset backed by an iterable.

---
## _concatenate_iterable_datasets
```python
from iterable_dataset import _concatenate_iterable_datasets
```

Converts a list of `IterableDataset` with the same schema into a single `IterableDataset`.
Missing data are filled with None values.

<Added version="2.4.0"/>

Args:
    dsets (`List[datasets.IterableDataset]`): List of Datasets to concatenate.
    info (`DatasetInfo`, optional): Dataset information, like description, citation, etc.
    split (`NamedSplit`, optional): Name of the dataset split.
    axis (``{0, 1}``, default ``0``, meaning over rows):
        Axis to concatenate over, where ``0`` means over rows (vertically) and ``1`` means over columns
        (horizontally).

        *New in version 1.6.0*

Example:

```py
>>> ds3 = _concatenate_iterable_datasets([ds1, ds2])
```

---
## _interleave_iterable_datasets
```python
from iterable_dataset import _interleave_iterable_datasets
```

Interleave several iterable datasets (sources) into a single iterable dataset.
The new iterable dataset alternates between the sources to yield examples.
If `probabilities = None` (default) the iterable dataset will cycles through the sources in order for each next example in the iteration.
If `probabilities` is not `None, the iterable dataset will sample a random source according to the provided probabilities for each next examples in the iteration.

<Added version="2.4.0"/>

Args:
    datasets (`List[IterableDataset]`): list of datasets to interleave
    probabilities (`List[float]`, optional, default None): If specified, the new iterable dataset samples
        examples from one source at a time according to these probabilities.
    seed (`int`, optional, default None): The random seed used to choose a source for each example.
    stopping_strategy (`str`, defaults to `first_exhausted`):
        Two strategies are proposed right now.
        By default, `first_exhausted` is an undersampling strategy, i.e the dataset construction is stopped as soon as one dataset has ran out of samples.
        If the strategy is `all_exhausted`,  we use an oversampling strategy, i.e the dataset construction is stopped as soon as every samples of every dataset has been added at least once.
        Note that if the strategy is `all_exhausted`, the interleaved dataset size can get enormous:
        - with no probabilities, the resulting dataset will have max_length_datasets*nb_dataset samples.
        - with given probabilities, the resulting dataset will have more samples if some datasets have really low probability of visiting.

Output:
    `datasets.IterableDataset`

---
## _split_by_node_iterable_dataset
```python
from iterable_dataset import _split_by_node_iterable_dataset
```

Split an iterable dataset for the node at rank `rank` in a pool of nodes of size `world_size`.

If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`),
then the shards are evenly assigned across the nodes, which is the most optimized.
Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples.

Args:
    dataset ([`IterableDataset`]):
        The iterable dataset to split by node.
    rank (`int`):
        Rank of the current node.
    world_size (`int`):
        Total number of nodes.

Returns:
    [`IterableDataset`]: The iterable dataset to be used on the node at rank `rank`.

---
## __init__
```python
from iterable_dataset import __init__
```



---
## __iter__
```python
from iterable_dataset import __iter__
```



---
## iter_arrow
```python
from iterable_dataset import iter_arrow
```



---
## shuffle_data_sources
```python
from iterable_dataset import shuffle_data_sources
```

Shuffle the wrapped examples iterable.

---
## shard_data_sources
```python
from iterable_dataset import shard_data_sources
```

Keep only the requested shard.

---
## split_shard_indices_by_worker
```python
from iterable_dataset import split_shard_indices_by_worker
```



---
## n_shards
```python
from iterable_dataset import n_shards
```



---
## _init_state_dict
```python
from iterable_dataset import _init_state_dict
```



---
## load_state_dict
```python
from iterable_dataset import load_state_dict
```

Load the state_dict of the dataset.
The iteration will restart at the next example from when the state was saved.

Resuming returns exactly where the checkpoint was saved except in two cases:

1. examples from shuffle buffers are lost when resuming and the buffers are refilled with new data
2. combinations of `.with_format(arrow)` and batched `.map()` may skip one batch.

Example:

```py
>>> from datasets import Dataset, concatenate_datasets
>>> ds = Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=3)
>>> for idx, example in enumerate(ds):
...     print(example)
...     if idx == 2:
...         state_dict = ds.state_dict()
...         print("checkpoint")
...         break
>>> ds.load_state_dict(state_dict)
>>> print(f"restart from checkpoint")
>>> for example in ds:
...     print(example)
```

which returns:
```
{'a': 0}
{'a': 1}
{'a': 2}
checkpoint
restart from checkpoint
{'a': 3}
{'a': 4}
{'a': 5}
```

```py
>>> from torchdata.stateful_dataloader import StatefulDataLoader
>>> ds = load_dataset("deepmind/code_contests", streaming=True, split="train")
>>> dataloader = StatefulDataLoader(ds, batch_size=32, num_workers=4)
>>> # checkpoint
>>> state_dict = dataloader.state_dict()  # uses ds.state_dict() under the hood
>>> # resume from checkpoint
>>> dataloader.load_state_dict(state_dict)  # uses ds.load_state_dict() under the hood
```

---
## state_dict
```python
from iterable_dataset import state_dict
```

Get the current state_dict of the dataset.
It corresponds to the state at the latest example it yielded.

Resuming returns exactly where the checkpoint was saved except in two cases:

1. examples from shuffle buffers are lost when resuming and the buffers are refilled with new data
2. combinations of `.with_format(arrow)` and batched `.map()` may skip one batch.

Returns:
    `dict`

Example:

```py
>>> from datasets import Dataset, concatenate_datasets
>>> ds = Dataset.from_dict({"a": range(6)}).to_iterable_dataset(num_shards=3)
>>> for idx, example in enumerate(ds):
...     print(example)
...     if idx == 2:
...         state_dict = ds.state_dict()
...         print("checkpoint")
...         break
>>> ds.load_state_dict(state_dict)
>>> print(f"restart from checkpoint")
>>> for example in ds:
...     print(example)
```

which returns:
```
{'a': 0}
{'a': 1}
{'a': 2}
checkpoint
restart from checkpoint
{'a': 3}
{'a': 4}
{'a': 5}
```

```py
>>> from torchdata.stateful_dataloader import StatefulDataLoader
>>> ds = load_dataset("deepmind/code_contests", streaming=True, split="train")
>>> dataloader = StatefulDataLoader(ds, batch_size=32, num_workers=4)
>>> # checkpoint
>>> state_dict = dataloader.state_dict()  # uses ds.state_dict() under the hood
>>> # resume from checkpoint
>>> dataloader.load_state_dict(state_dict)  # uses ds.load_state_dict() under the hood
```

---
## _iter_arrow
```python
from iterable_dataset import _iter_arrow
```



---
## _get_indices_iterator
```python
from iterable_dataset import _get_indices_iterator
```



---
## _iter
```python
from iterable_dataset import _iter
```



---
## _iter_random_indices
```python
from iterable_dataset import _iter_random_indices
```



---
## split_number
```python
from iterable_dataset import split_number
```



---
## __post_init__
```python
from iterable_dataset import __post_init__
```



---
## __repr__
```python
from iterable_dataset import __repr__
```



---
## __getstate__
```python
from iterable_dataset import __getstate__
```



---
## __setstate__
```python
from iterable_dataset import __setstate__
```



---
## _head
```python
from iterable_dataset import _head
```



---
## epoch
```python
from iterable_dataset import epoch
```



---
## _effective_generator
```python
from iterable_dataset import _effective_generator
```



---
## _iter_pytorch
```python
from iterable_dataset import _iter_pytorch
```



---
## _is_main_process
```python
from iterable_dataset import _is_main_process
```



---
## _prepare_ex_iterable_for_iteration
```python
from iterable_dataset import _prepare_ex_iterable_for_iteration
```



---
## iter
```python
from iterable_dataset import iter
```

Iterate through the batches of size `batch_size`.

Args:
    batch_size (:obj:`int`): size of each batch to yield.
    drop_last_batch (:obj:`bool`, default `False`): Whether a last batch smaller than the batch_size should be
        dropped

---
## from_generator
```python
from iterable_dataset import from_generator
```

Create an Iterable Dataset from a generator.

Args:
    generator (`Callable`):
        A generator function that `yields` examples.
    features (`Features`, *optional*):
        Dataset features.
    gen_kwargs(`dict`, *optional*):
        Keyword arguments to be passed to the `generator` callable.
        You can define a sharded iterable dataset by passing the list of shards in `gen_kwargs`.
        This can be used to improve shuffling and when iterating over the dataset with multiple workers.
    split ([`NamedSplit`], defaults to `Split.TRAIN`):
        Split name to be assigned to the dataset.

        <Added version="2.21.0"/>
Returns:
    `IterableDataset`

Example:

```py
>>> def gen():
...     yield {"text": "Good", "label": 0}
...     yield {"text": "Bad", "label": 1}
...
>>> ds = IterableDataset.from_generator(gen)
```

```py
>>> def gen(shards):
...     for shard in shards:
...         with open(shard) as f:
...             for line in f:
...                 yield {"line": line}
...
>>> shards = [f"data{i}.txt" for i in range(32)]
>>> ds = IterableDataset.from_generator(gen, gen_kwargs={"shards": shards})
>>> ds = ds.shuffle(seed=42, buffer_size=10_000)  # shuffles the shards order + uses a shuffle buffer
>>> from torch.utils.data import DataLoader
>>> dataloader = DataLoader(ds.with_format("torch"), num_workers=4)  # give each worker a subset of 32/4=8 shards
```

---
## from_spark
```python
from iterable_dataset import from_spark
```

Create an IterableDataset from Spark DataFrame. The dataset is streamed to the driver in batches.

Args:
    df (`pyspark.sql.DataFrame`):
        The DataFrame containing the desired data.
    split (`NamedSplit`, *optional*):
        Split name to be assigned to the dataset.
    features (`Features`, *optional*):
        Dataset features.

Returns:
    [`IterableDataset`]

Example:

```py
>>> df = spark.createDataFrame(
>>>     data=[[1, "Elia"], [2, "Teo"], [3, "Fang"]],
>>>     columns=["id", "name"],
>>> )
>>> ds = IterableDataset.from_spark(df)
```

---
## from_file
```python
from iterable_dataset import from_file
```

Instantiate a IterableDataset from Arrow table at filename.

Args:
    filename (`str`):
        File name of the dataset.

Returns:
    [`IterableDataset`]

---
## with_format
```python
from iterable_dataset import with_format
```

Return a dataset with the specified format.
Supported formats: "arrow", or None for regular python objects.
The other formats are currently not implemented.

Args:

    type (`str`, optional, default None): if set to "torch", the returned dataset
        will be a subclass of torch.utils.data.IterableDataset to be used in a DataLoader

---
## map
```python
from iterable_dataset import map
```

Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.

You can specify whether the function should be batched or not with the `batched` parameter:

- If batched is `False`, then the function takes 1 example in and should return 1 example.
  An example is a dictionary, e.g. `{"text": "Hello there !"}`.
- If batched is `True` and `batch_size` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
  A batch is a dictionary, e.g. a batch of 1 example is {"text": ["Hello there !"]}.
- If batched is `True` and `batch_size` is `n` > 1, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
  Note that the last batch may have less than `n` examples.
  A batch is a dictionary, e.g. a batch of `n` examples is `{"text": ["Hello there !"] * n}`.

Args:
    function (`Callable`, *optional*, defaults to `None`):
        Function applied on-the-fly on the examples when you iterate on the dataset.
        It must have one of the following signatures:

        - `function(example: Dict[str, Any]) -> Dict[str, Any]` if `batched=False` and `with_indices=False`
        - `function(example: Dict[str, Any], idx: int) -> Dict[str, Any]` if `batched=False` and `with_indices=True`
        - `function(batch: Dict[str, List]) -> Dict[str, List]` if `batched=True` and `with_indices=False`
        - `function(batch: Dict[str, List], indices: List[int]) -> Dict[str, List]` if `batched=True` and `with_indices=True`

        For advanced usage, the function can also return a `pyarrow.Table`.
        Moreover if your function returns nothing (`None`), then `map` will run your function and return the dataset unchanged.
        If no function is provided, default to identity function: `lambda x: x`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the signature of `function` should be `def function(example, idx[, rank]): ...`.
    input_columns (`Optional[Union[str, List[str]]]`, defaults to `None`):
        The columns to be passed into `function`
        as positional arguments. If `None`, a dict mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`.
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of examples per batch provided to `function` if `batched=True`.
        `batch_size <= 0` or `batch_size == None` then provide the full dataset as a single batch to `function`.
    drop_last_batch (`bool`, defaults to `False`):
        Whether a last batch smaller than the batch_size should be
        dropped instead of being processed by the function.
    remove_columns (`[List[str]]`, *optional*, defaults to `None`):
        Remove a selection of columns while doing the mapping.
        Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding
        columns with names in `remove_columns`, these columns will be kept.
    features (`[Features]`, *optional*, defaults to `None`):
        Feature types of the resulting dataset.
    fn_kwargs (`Dict`, *optional*, default `None`):
        Keyword arguments to be passed to `function`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> def add_prefix(example):
...     example["text"] = "Review: " + example["text"]
...     return example
>>> ds = ds.map(add_prefix)
>>> list(ds.take(3))
[{'label': 1,
 'text': 'Review: the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'Review: the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'Review: effective but too-tepid biopic'}]
```

---
## filter
```python
from iterable_dataset import filter
```

Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.

Args:
    function (`Callable`):
        Callable with one of the following signatures:

        - `function(example: Dict[str, Any]) -> bool` if `with_indices=False, batched=False`
        - `function(example: Dict[str, Any], indices: int) -> bool` if `with_indices=True, batched=False`
        - `function(example: Dict[str, List]) -> List[bool]` if `with_indices=False, batched=True`
        - `function(example: Dict[str, List], indices: List[int]) -> List[bool]` if `with_indices=True, batched=True`

        If no function is provided, defaults to an always True function: `lambda x: True`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the signature of `function` should be `def function(example, idx): ...`.
    input_columns (`str` or `List[str]`, *optional*):
        The columns to be passed into `function` as
        positional arguments. If `None`, a dict mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`.
    batch_size (`int`, *optional*, default `1000`):
        Number of examples per batch provided to `function` if `batched=True`.
    fn_kwargs (`Dict`, *optional*, default `None`):
        Keyword arguments to be passed to `function`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> ds = ds.filter(lambda x: x["label"] == 0)
>>> list(ds.take(3))
[{'label': 0, 'movie_review': 'simplistic , silly and tedious .'},
 {'label': 0,
 'movie_review': "it's so laddish and juvenile , only teenage boys could possibly find it funny ."},
 {'label': 0,
 'movie_review': 'exploitative and largely devoid of the depth or sophistication that would make watching such a graphic treatment of the crimes bearable .'}]
```

---
## shuffle
```python
from iterable_dataset import shuffle
```

Randomly shuffles the elements of this dataset.

This dataset fills a buffer with `buffer_size` elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.

For instance, if your dataset contains 10,000 elements but `buffer_size` is set to 1000, then `shuffle` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.

If the dataset is made of several shards, it also does shuffle the order of the shards.
However if the order has been fixed by using [`~datasets.IterableDataset.skip`] or [`~datasets.IterableDataset.take`]
then the order of the shards is kept unchanged.

Args:
    seed (`int`, *optional*, defaults to `None`):
        Random seed that will be used to shuffle the dataset.
        It is used to sample from the shuffle buffer and also to shuffle the data shards.
    generator (`numpy.random.Generator`, *optional*):
        Numpy random Generator to use to compute the permutation of the dataset rows.
        If `generator=None` (default), uses `np.random.default_rng` (the default BitGenerator (PCG64) of NumPy).
    buffer_size (`int`, defaults to `1000`):
        Size of the buffer.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> list(ds.take(3))
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'}]
>>> shuffled_ds = ds.shuffle(seed=42)
>>> list(shuffled_ds.take(3))
[{'label': 1,
 'text': "a sports movie with action that's exciting on the field and a story you care about off it ."},
 {'label': 1,
 'text': 'at its best , the good girl is a refreshingly adult take on adultery . . .'},
 {'label': 1,
 'text': "sam jones became a very lucky filmmaker the day wilco got dropped from their record label , proving that one man's ruin may be another's fortune ."}]
```

---
## set_epoch
```python
from iterable_dataset import set_epoch
```



---
## skip
```python
from iterable_dataset import skip
```

Create a new [`IterableDataset`] that skips the first `n` elements.

Args:
    n (`int`):
        Number of elements to skip.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> list(ds.take(3))
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'}]
>>> ds = ds.skip(1)
>>> list(ds.take(3))
[{'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'},
 {'label': 1,
 'text': 'if you sometimes like to go to the movies to have fun , wasabi is a good place to start .'}]
```

---
## take
```python
from iterable_dataset import take
```

Create a new [`IterableDataset`] with only the first `n` elements.

Args:
    n (`int`):
        Number of elements to take.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> small_ds = ds.take(2)
>>> list(small_ds)
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'}]
```

---
## column_names
```python
from iterable_dataset import column_names
```

Names of the columns in the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="validation", streaming=True)
>>> ds.column_names
['text', 'label']
```

---
## add_column
```python
from iterable_dataset import add_column
```

Add column to Dataset.

Args:
    name (str): Column name.
    column (list or np.array): Column data to be added.

Returns:
    `IterableDataset`

---
## rename_column
```python
from iterable_dataset import rename_column
```

Rename a column in the dataset, and move the features associated to the original column under the new column
name.

Args:
    original_column_name (`str`):
        Name of the column to rename.
    new_column_name (`str`):
        New name for the column.

Returns:
    `IterableDataset`: A copy of the dataset with a renamed column.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> next(iter(ds))
{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
>>> ds = ds.rename_column("text", "movie_review")
>>> next(iter(ds))
{'label': 1,
 'movie_review': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## rename_columns
```python
from iterable_dataset import rename_columns
```

Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.

Args:
    column_mapping (`Dict[str, str]`): A mapping of columns to rename to their new names

Returns:
    `IterableDataset`: A copy of the dataset with renamed columns

---
## remove_columns
```python
from iterable_dataset import remove_columns
```

Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.


Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to remove.

Returns:
    `IterableDataset`: A copy of the dataset object without the columns to remove.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> next(iter(ds))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .', 'label': 1}
>>> ds = ds.remove_columns("label")
>>> next(iter(ds))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## select_columns
```python
from iterable_dataset import select_columns
```

Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset.


Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to select.

Returns:
    `IterableDataset`: A copy of the dataset object with selected columns.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> next(iter(ds))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .', 'label': 1}
>>> ds = ds.select_columns("text")
>>> next(iter(ds))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## cast_column
```python
from iterable_dataset import cast_column
```

Cast column to feature for decoding.

Args:
    column (`str`):
        Column name.
    feature (`Feature`):
        Target feature.

Returns:
    `IterableDataset`

Example:

```py
>>> from datasets import load_dataset, Audio
>>> ds = load_dataset("PolyAI/minds14", name="en-US", split="train", streaming=True)
>>> ds.features
{'audio': Audio(sampling_rate=8000, mono=True, decode=True, id=None),
 'english_transcription': Value(dtype='string', id=None),
 'intent_class': ClassLabel(num_classes=14, names=['abroad', 'address', 'app_error', 'atm_limit', 'balance', 'business_loan',  'card_issues', 'cash_deposit', 'direct_debit', 'freeze', 'high_value_payment', 'joint_account', 'latest_transactions', 'pay_bill'], id=None),
 'lang_id': ClassLabel(num_classes=14, names=['cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-US', 'es-ES', 'fr-FR', 'it-IT', 'ko-KR',  'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'zh-CN'], id=None),
 'path': Value(dtype='string', id=None),
 'transcription': Value(dtype='string', id=None)}
>>> ds = ds.cast_column("audio", Audio(sampling_rate=16000))
>>> ds.features
{'audio': Audio(sampling_rate=16000, mono=True, decode=True, id=None),
 'english_transcription': Value(dtype='string', id=None),
 'intent_class': ClassLabel(num_classes=14, names=['abroad', 'address', 'app_error', 'atm_limit', 'balance', 'business_loan',  'card_issues', 'cash_deposit', 'direct_debit', 'freeze', 'high_value_payment', 'joint_account', 'latest_transactions', 'pay_bill'], id=None),
 'lang_id': ClassLabel(num_classes=14, names=['cs-CZ', 'de-DE', 'en-AU', 'en-GB', 'en-US', 'es-ES', 'fr-FR', 'it-IT', 'ko-KR',  'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'zh-CN'], id=None),
 'path': Value(dtype='string', id=None),
 'transcription': Value(dtype='string', id=None)}
```

---
## cast
```python
from iterable_dataset import cast
```

Cast the dataset to a new set of features.

Args:
    features ([`Features`]):
        New features to cast the dataset to.
        The name of the fields in the features must match the current column names.
        The type of the data must also be convertible from one type to the other.
        For non-trivial conversion, e.g. `string` <-> `ClassLabel` you should use [`~Dataset.map`] to update the Dataset.

Returns:
    `IterableDataset`: A copy of the dataset with casted features.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train", streaming=True)
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
>>> new_features = ds.features.copy()
>>> new_features["label"] = ClassLabel(names=["bad", "good"])
>>> new_features["text"] = Value("large_string")
>>> ds = ds.cast(new_features)
>>> ds.features
{'label': ClassLabel(num_classes=2, names=['bad', 'good'], id=None),
 'text': Value(dtype='large_string', id=None)}
```

---
## _step
```python
from iterable_dataset import _step
```



---
## _resolve_features
```python
from iterable_dataset import _resolve_features
```



---
## batch
```python
from iterable_dataset import batch
```

Group samples from the dataset into batches.

Args:
    batch_size (`int`): The number of samples in each batch.
    drop_last_batch (`bool`, defaults to `False`): Whether to drop the last incomplete batch.

Example:
```py
>>> ds = load_dataset("some_dataset", streaming=True)
>>> batched_ds = ds.batch(batch_size=32)
```

---
## _inner_load_state_dict
```python
from iterable_dataset import _inner_load_state_dict
```



---
## batch_fn
```python
from iterable_dataset import batch_fn
```



---
## __name__
```python
from combine import __name__
```



---
## interleave_datasets
```python
from combine import interleave_datasets
```

Interleave several datasets (sources) into a single dataset.
The new dataset is constructed by alternating between the sources to get the examples.

You can use this function on a list of [`Dataset`] objects, or on a list of [`IterableDataset`] objects.

    - If `probabilities` is `None` (default) the new dataset is constructed by cycling between each source to get the examples.
    - If `probabilities` is not `None`, the new dataset is constructed by getting examples from a random source at a time according to the provided probabilities.

The resulting dataset ends when one of the source datasets runs out of examples except when `oversampling` is `True`,
in which case, the resulting dataset ends when all datasets have ran out of examples at least one time.

Note for iterable datasets:

In a distributed setup or in PyTorch DataLoader workers, the stopping strategy is applied per process.
Therefore the "first_exhausted" strategy on an sharded iterable dataset can generate less samples in total (up to 1 missing sample per subdataset per worker).

Args:
    datasets (`List[Dataset]` or `List[IterableDataset]`):
        List of datasets to interleave.
    probabilities (`List[float]`, *optional*, defaults to `None`):
        If specified, the new dataset is constructed by sampling
        examples from one source at a time according to these probabilities.
    seed (`int`, *optional*, defaults to `None`):
        The random seed used to choose a source for each example.
    info ([`DatasetInfo`], *optional*):
        Dataset information, like description, citation, etc.
        <Added version="2.4.0"/>
    split ([`NamedSplit`], *optional*):
        Name of the dataset split.
        <Added version="2.4.0"/>
    stopping_strategy (`str`, defaults to `first_exhausted`):
        Two strategies are proposed right now, `first_exhausted` and `all_exhausted`.
        By default, `first_exhausted` is an undersampling strategy, i.e the dataset construction is stopped as soon as one dataset has ran out of samples.
        If the strategy is `all_exhausted`,  we use an oversampling strategy, i.e the dataset construction is stopped as soon as every samples of every dataset has been added at least once.
        Note that if the strategy is `all_exhausted`, the interleaved dataset size can get enormous:
        - with no probabilities, the resulting dataset will have `max_length_datasets*nb_dataset` samples.
        - with given probabilities, the resulting dataset will have more samples if some datasets have really low probability of visiting.
Returns:
    [`Dataset`] or [`IterableDataset`]: Return type depends on the input `datasets`
    parameter. `Dataset` if the input is a list of `Dataset`, `IterableDataset` if the input is a list of
    `IterableDataset`.

Example:

    For regular datasets (map-style):

    ```python
    >>> from datasets import Dataset, interleave_datasets
    >>> d1 = Dataset.from_dict({"a": [0, 1, 2]})
    >>> d2 = Dataset.from_dict({"a": [10, 11, 12]})
    >>> d3 = Dataset.from_dict({"a": [20, 21, 22]})
    >>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42, stopping_strategy="all_exhausted")
    >>> dataset["a"]
    [10, 0, 11, 1, 2, 20, 12, 10, 0, 1, 2, 21, 0, 11, 1, 2, 0, 1, 12, 2, 10, 0, 22]
    >>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
    >>> dataset["a"]
    [10, 0, 11, 1, 2]
    >>> dataset = interleave_datasets([d1, d2, d3])
    >>> dataset["a"]
    [0, 10, 20, 1, 11, 21, 2, 12, 22]
    >>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted")
    >>> dataset["a"]
    [0, 10, 20, 1, 11, 21, 2, 12, 22]
    >>> d1 = Dataset.from_dict({"a": [0, 1, 2]})
    >>> d2 = Dataset.from_dict({"a": [10, 11, 12, 13]})
    >>> d3 = Dataset.from_dict({"a": [20, 21, 22, 23, 24]})
    >>> dataset = interleave_datasets([d1, d2, d3])
    >>> dataset["a"]
    [0, 10, 20, 1, 11, 21, 2, 12, 22]
    >>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted")
    >>> dataset["a"]
    [0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 10, 24]
    >>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
    >>> dataset["a"]
    [10, 0, 11, 1, 2]
    >>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42, stopping_strategy="all_exhausted")
    >>> dataset["a"]
    [10, 0, 11, 1, 2, 20, 12, 13, ..., 0, 1, 2, 0, 24]
    For datasets in streaming mode (iterable):

    >>> from datasets import load_dataset, interleave_datasets
    >>> d1 = load_dataset("oscar", "unshuffled_deduplicated_en", split="train", streaming=True)
    >>> d2 = load_dataset("oscar", "unshuffled_deduplicated_fr", split="train", streaming=True)
    >>> dataset = interleave_datasets([d1, d2])
    >>> iterator = iter(dataset)
    >>> next(iterator)
    {'text': 'Mtendere Village was inspired by the vision...}
    >>> next(iterator)
    {'text': "Média de débat d'idées, de culture...}
    ```

---
## concatenate_datasets
```python
from combine import concatenate_datasets
```

Converts a list of [`Dataset`] with the same schema into a single [`Dataset`].

Args:
    dsets (`List[datasets.Dataset]`):
        List of Datasets to concatenate.
    info (`DatasetInfo`, *optional*):
        Dataset information, like description, citation, etc.
    split (`NamedSplit`, *optional*):
        Name of the dataset split.
    axis (`{0, 1}`, defaults to `0`):
        Axis to concatenate over, where `0` means over rows (vertically) and `1` means over columns
        (horizontally).

        <Added version="1.6.0"/>

Example:

```py
>>> ds3 = concatenate_datasets([ds1, ds2])
```

---
## __name__
```python
from dataset_dict import __name__
```



---
## DatasetDict
```python
from dataset_dict import DatasetDict
```

A dictionary (dict of str: datasets.Dataset) with dataset transforms methods (map, filter, etc.)

---
## IterableDatasetDict
```python
from dataset_dict import IterableDatasetDict
```



---
## _check_values_type
```python
from dataset_dict import _check_values_type
```



---
## _check_values_features
```python
from dataset_dict import _check_values_features
```



---
## __enter__
```python
from dataset_dict import __enter__
```



---
## __exit__
```python
from dataset_dict import __exit__
```



---
## __getitem__
```python
from dataset_dict import __getitem__
```



---
## data
```python
from dataset_dict import data
```

The Apache Arrow tables backing each split.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.data
```

---
## cache_files
```python
from dataset_dict import cache_files
```

The cache files containing the Apache Arrow table backing each split.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.cache_files
{'test': [{'filename': '/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-test.arrow'}],
 'train': [{'filename': '/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-train.arrow'}],
 'validation': [{'filename': '/root/.cache/huggingface/datasets/rotten_tomatoes_movie_review/default/1.0.0/40d411e45a6ce3484deed7cc15b82a53dad9a72aafd9f86f8f227134bec5ca46/rotten_tomatoes_movie_review-validation.arrow'}]}
```

---
## num_columns
```python
from dataset_dict import num_columns
```

Number of columns in each split of the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.num_columns
{'test': 2, 'train': 2, 'validation': 2}
```

---
## num_rows
```python
from dataset_dict import num_rows
```

Number of rows in each split of the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.num_rows
{'test': 1066, 'train': 8530, 'validation': 1066}
```

---
## column_names
```python
from dataset_dict import column_names
```

Names of the columns in each split of the dataset.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.column_names
{'test': ['text', 'label'],
 'train': ['text', 'label'],
 'validation': ['text', 'label']}
```

---
## shape
```python
from dataset_dict import shape
```

Shape of each split of the dataset (number of rows, number of columns).

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.shape
{'test': (1066, 2), 'train': (8530, 2), 'validation': (1066, 2)}
```

---
## flatten
```python
from dataset_dict import flatten
```

Flatten the Apache Arrow Table of each split (nested features are flatten).
Each column with a struct type is flattened into one column per struct field.
Other columns are left unchanged.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("squad")
>>> ds["train"].features
{'answers': Sequence(feature={'text': Value(dtype='string', id=None), 'answer_start': Value(dtype='int32', id=None)}, length=-1, id=None),
 'context': Value(dtype='string', id=None),
 'id': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None),
 'title': Value(dtype='string', id=None)}
>>> ds.flatten()
DatasetDict({
    train: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers.text', 'answers.answer_start'],
        num_rows: 87599
    })
    validation: Dataset({
        features: ['id', 'title', 'context', 'question', 'answers.text', 'answers.answer_start'],
        num_rows: 10570
    })
})
```

---
## unique
```python
from dataset_dict import unique
```

Return a list of the unique elements in a column for each split.

This is implemented in the low-level backend and as such, very fast.

Args:
    column (`str`):
        column name (list all the column names with [`~datasets.DatasetDict.column_names`])

Returns:
    Dict[`str`, `list`]: Dictionary of unique elements in the given column.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.unique("label")
{'test': [1, 0], 'train': [1, 0], 'validation': [1, 0]}
```

---
## cleanup_cache_files
```python
from dataset_dict import cleanup_cache_files
```

Clean up all cache files in the dataset cache directory, excepted the currently used cache file if there is one.
Be careful when running this command that no other process is currently using other cache files.

Return:
    `Dict` with the number of removed files for each split

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes")
>>> ds.cleanup_cache_files()
{'test': 0, 'train': 0, 'validation': 0}
```

---
## __repr__
```python
from dataset_dict import __repr__
```



---
## cast
```python
from dataset_dict import cast
```

Cast the dataset to a new set of features.
The type casting is applied to all the datasets of the dataset dictionary.

Args:
    features (`Features`):
        New features to cast the dataset to.
        The name of the fields in the features must match the current column names.
        The type of the data must also be convertible from one type to the other.
        For non-trivial conversion, e.g. `string` <-> `ClassLabel` you should use [`map`] to update the Dataset.

Returns:
    [`IterableDatasetDict`]: A copy of the dataset with casted features.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds["train"].features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
>>> new_features = ds["train"].features.copy()
>>> new_features['label'] = ClassLabel(names=['bad', 'good'])
>>> new_features['text'] = Value('large_string')
>>> ds = ds.cast(new_features)
>>> ds["train"].features
{'label': ClassLabel(num_classes=2, names=['bad', 'good'], id=None),
 'text': Value(dtype='large_string', id=None)}
```

---
## cast_column
```python
from dataset_dict import cast_column
```

Cast column to feature for decoding.
The type casting is applied to all the datasets of the dataset dictionary.

Args:
    column (`str`):
        Column name.
    feature ([`Feature`]):
        Target feature.

Returns:
    [`IterableDatasetDict`]

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds["train"].features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
>>> ds = ds.cast_column('label', ClassLabel(names=['bad', 'good']))
>>> ds["train"].features
{'label': ClassLabel(num_classes=2, names=['bad', 'good'], id=None),
 'text': Value(dtype='string', id=None)}
```

---
## remove_columns
```python
from dataset_dict import remove_columns
```

Remove one or several column(s) in the dataset and the features associated to them.
The removal is done on-the-fly on the examples when iterating over the dataset.
The removal is applied to all the datasets of the dataset dictionary.


Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to remove.

Returns:
    [`IterableDatasetDict`]: A copy of the dataset object without the columns to remove.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds = ds.remove_columns("label")
>>> next(iter(ds["train"]))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## rename_column
```python
from dataset_dict import rename_column
```

Rename a column in the dataset, and move the features associated to the original column under the new column
name.
The renaming is applied to all the datasets of the dataset dictionary.

Args:
    original_column_name (`str`):
        Name of the column to rename.
    new_column_name (`str`):
        New name for the column.

Returns:
    [`IterableDatasetDict`]: A copy of the dataset with a renamed column.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds = ds.rename_column("text", "movie_review")
>>> next(iter(ds["train"]))
{'label': 1,
 'movie_review': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## rename_columns
```python
from dataset_dict import rename_columns
```

Rename several columns in the dataset, and move the features associated to the original columns under
the new column names.
The renaming is applied to all the datasets of the dataset dictionary.

Args:
    column_mapping (`Dict[str, str]`):
        A mapping of columns to rename to their new names.

Returns:
    [`IterableDatasetDict`]: A copy of the dataset with renamed columns

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds = ds.rename_columns({"text": "movie_review", "label": "rating"})
>>> next(iter(ds["train"]))
{'movie_review': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .',
 'rating': 1}
```

---
## select_columns
```python
from dataset_dict import select_columns
```

Select one or several column(s) in the dataset and the features
associated to them. The selection is done on-the-fly on the examples
when iterating over the dataset. The selection is applied to all the
datasets of the dataset dictionary.


Args:
    column_names (`Union[str, List[str]]`):
        Name of the column(s) to keep.

Returns:
    [`IterableDatasetDict`]: A copy of the dataset object with only selected columns.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds = ds.select("text")
>>> next(iter(ds["train"]))
{'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## class_encode_column
```python
from dataset_dict import class_encode_column
```

Casts the given column as [`~datasets.features.ClassLabel`] and updates the tables.

Args:
    column (`str`):
        The name of the column to cast.
    include_nulls (`bool`, defaults to `False`):
        Whether to include null values in the class labels. If `True`, the null values will be encoded as the `"None"` class label.

        <Added version="1.14.2"/>

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("boolq")
>>> ds["train"].features
{'answer': Value(dtype='bool', id=None),
 'passage': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None)}
>>> ds = ds.class_encode_column("answer")
>>> ds["train"].features
{'answer': ClassLabel(num_classes=2, names=['False', 'True'], id=None),
 'passage': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None)}
```

---
## formatted_as
```python
from dataset_dict import formatted_as
```

To be used in a `with` statement. Set `__getitem__` return format (type and columns).
The transformation is applied to all the datasets of the dataset dictionary.

Args:
    type (`str`, *optional*):
        Output type selected in `[None, 'numpy', 'torch', 'tensorflow', 'pandas', 'arrow', 'jax']`.
        `None` means `__getitem__` returns python objects (default).
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        `None` means `__getitem__` returns all columns (default).
    output_all_columns (`bool`, defaults to False):
        Keep un-formatted columns as well in the output (as python objects).
    **format_kwargs (additional keyword arguments):
        Keywords arguments passed to the convert function like `np.array`, `torch.tensor` or `tensorflow.ragged.constant`.

---
## set_format
```python
from dataset_dict import set_format
```

Set `__getitem__` return format (type and columns).
The format is set for every dataset in the dataset dictionary.

Args:
    type (`str`, *optional*):
        Output type selected in `[None, 'numpy', 'torch', 'tensorflow', 'pandas', 'arrow', 'jax']`.
        `None` means `__getitem__` returns python objects (default).
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        `None` means `__getitem__` returns all columns (default).
    output_all_columns (`bool`, defaults to False):
        Keep un-formatted columns as well in the output (as python objects),
    **format_kwargs (additional keyword arguments):
        Keywords arguments passed to the convert function like `np.array`, `torch.tensor` or `tensorflow.ragged.constant`.

It is possible to call `map` after calling `set_format`. Since `map` may add new columns, then the list of formatted columns
gets updated. In this case, if you apply `map` on a dataset to add a new column, then this column will be formatted:

    `new formatted columns = (all columns - previously unformatted columns)`

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> ds = ds.map(lambda x: tokenizer(x["text"], truncation=True, padding=True), batched=True)
>>> ds.set_format(type="numpy", columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
>>> ds["train"].format
{'columns': ['input_ids', 'token_type_ids', 'attention_mask', 'label'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': 'numpy'}
```

---
## reset_format
```python
from dataset_dict import reset_format
```

Reset `__getitem__` return format to python objects and all columns.
The transformation is applied to all the datasets of the dataset dictionary.

Same as `self.set_format()`

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> ds = ds.map(lambda x: tokenizer(x["text"], truncation=True, padding=True), batched=True)
>>> ds.set_format(type="numpy", columns=['input_ids', 'token_type_ids', 'attention_mask', 'label'])
>>> ds["train"].format
{'columns': ['input_ids', 'token_type_ids', 'attention_mask', 'label'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': 'numpy'}
>>> ds.reset_format()
>>> ds["train"].format
{'columns': ['text', 'label', 'input_ids', 'token_type_ids', 'attention_mask'],
 'format_kwargs': {},
 'output_all_columns': False,
 'type': None}
```

---
## set_transform
```python
from dataset_dict import set_transform
```

Set ``__getitem__`` return format using this transform. The transform is applied on-the-fly on batches when ``__getitem__`` is called.
The transform is set for every dataset in the dataset dictionary
As :func:`datasets.Dataset.set_format`, this can be reset using :func:`datasets.Dataset.reset_format`

Args:
    transform (`Callable`, optional): user-defined formatting transform, replaces the format defined by :func:`datasets.Dataset.set_format`
        A formatting function is a callable that takes a batch (as a dict) as input and returns a batch.
        This function is applied right before returning the objects in ``__getitem__``.
    columns (`List[str]`, optional): columns to format in the output
        If specified, then the input batch of the transform only contains those columns.
    output_all_columns (`bool`, default to False): keep un-formatted columns as well in the output (as python objects)
        If set to True, then the other un-formatted columns are kept with the output of the transform.

---
## with_format
```python
from dataset_dict import with_format
```

Return a dataset with the specified format.
This method only supports the "torch" format for now.
The format is set to all the datasets of the dataset dictionary.

Args:
    type (`str`, *optional*, defaults to `None`):
        If set to "torch", the returned dataset
        will be a subclass of `torch.utils.data.IterableDataset` to be used in a `DataLoader`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> from transformers import AutoTokenizer
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
>>> def encode(example):
...     return tokenizer(examples["text"], truncation=True, padding="max_length")
>>> ds = ds.map(encode, batched=True, remove_columns=["text"])
>>> ds = ds.with_format("torch")
```

---
## with_transform
```python
from dataset_dict import with_transform
```

Set `__getitem__` return format using this transform. The transform is applied on-the-fly on batches when `__getitem__` is called.
The transform is set for every dataset in the dataset dictionary

As [`~datasets.Dataset.set_format`], this can be reset using [`~datasets.Dataset.reset_format`].

Contrary to [`~datasets.DatasetDict.set_transform`], `with_transform` returns a new [`DatasetDict`] object with new [`Dataset`] objects.

Args:
    transform (`Callable`, *optional*):
        User-defined formatting transform, replaces the format defined by [`~datasets.Dataset.set_format`].
        A formatting function is a callable that takes a batch (as a dict) as input and returns a batch.
        This function is applied right before returning the objects in `__getitem__`.
    columns (`List[str]`, *optional*):
        Columns to format in the output.
        If specified, then the input batch of the transform only contains those columns.
    output_all_columns (`bool`, defaults to False):
        Keep un-formatted columns as well in the output (as python objects).
        If set to `True`, then the other un-formatted columns are kept with the output of the transform.

Example:

```py
>>> from datasets import load_dataset
>>> from transformers import AutoTokenizer
>>> ds = load_dataset("rotten_tomatoes")
>>> tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
>>> def encode(example):
...     return tokenizer(example['text'], truncation=True, padding=True, return_tensors="pt")
>>> ds = ds.with_transform(encode)
>>> ds["train"][0]
{'attention_mask': tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1]),
 'input_ids': tensor([  101,  1103,  2067,  1110, 17348,  1106,  1129,  1103,  6880,  1432,
        112,   188,  1207,   107, 14255,  1389,   107,  1105,  1115,  1119,
        112,   188,  1280,  1106,  1294,   170, 24194,  1256,  3407,  1190,
        170, 11791,  5253,   188,  1732,  7200, 10947, 12606,  2895,   117,
        179,  7766,   118,   172, 15554,  1181,  3498,  6961,  3263,  1137,
        188,  1566,  7912, 14516,  6997,   119,   102]),
 'token_type_ids': tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0])}
```

---
## map
```python
from dataset_dict import map
```

Apply a function to all the examples in the iterable dataset (individually or in batches) and update them.
If your function returns a column that already exists, then it overwrites it.
The function is applied on-the-fly on the examples when iterating over the dataset.
The transformation is applied to all the datasets of the dataset dictionary.

You can specify whether the function should be batched or not with the `batched` parameter:

- If batched is `False`, then the function takes 1 example in and should return 1 example.
  An example is a dictionary, e.g. `{"text": "Hello there !"}`.
- If batched is `True` and `batch_size` is 1, then the function takes a batch of 1 example as input and can return a batch with 1 or more examples.
  A batch is a dictionary, e.g. a batch of 1 example is `{"text": ["Hello there !"]}`.
- If batched is `True` and `batch_size` is `n` > 1, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
  Note that the last batch may have less than `n` examples.
  A batch is a dictionary, e.g. a batch of `n` examples is `{"text": ["Hello there !"] * n}`.

Args:
    function (`Callable`, *optional*, defaults to `None`):
        Function applied on-the-fly on the examples when you iterate on the dataset.
        It must have one of the following signatures:

        - `function(example: Dict[str, Any]) -> Dict[str, Any]` if `batched=False` and `with_indices=False`
        - `function(example: Dict[str, Any], idx: int) -> Dict[str, Any]` if `batched=False` and `with_indices=True`
        - `function(batch: Dict[str, List]) -> Dict[str, List]` if `batched=True` and `with_indices=False`
        - `function(batch: Dict[str, List], indices: List[int]) -> Dict[str, List]` if `batched=True` and `with_indices=True`

        For advanced usage, the function can also return a `pyarrow.Table`.
        Moreover if your function returns nothing (`None`), then `map` will run your function and return the dataset unchanged.
        If no function is provided, default to identity function: `lambda x: x`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the signature of `function` should be `def function(example, idx[, rank]): ...`.
    input_columns (`[Union[str, List[str]]]`, *optional*, defaults to `None`):
        The columns to be passed into `function`
        as positional arguments. If `None`, a dict mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`.
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of examples per batch provided to `function` if `batched=True`.
    drop_last_batch (`bool`, defaults to `False`):
        Whether a last batch smaller than the `batch_size` should be
        dropped instead of being processed by the function.
    remove_columns (`[List[str]]`, *optional*, defaults to `None`):
        Remove a selection of columns while doing the mapping.
        Columns will be removed before updating the examples with the output of `function`, i.e. if `function` is adding
        columns with names in `remove_columns`, these columns will be kept.
    fn_kwargs (`Dict`, *optional*, defaults to `None`):
        Keyword arguments to be passed to `function`

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> def add_prefix(example):
...     example["text"] = "Review: " + example["text"]
...     return example
>>> ds = ds.map(add_prefix)
>>> next(iter(ds["train"]))
{'label': 1,
 'text': 'Review: the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'}
```

---
## filter
```python
from dataset_dict import filter
```

Apply a filter function to all the elements so that the dataset only includes examples according to the filter function.
The filtering is done on-the-fly when iterating over the dataset.
The filtering is applied to all the datasets of the dataset dictionary.

Args:
    function (`Callable`):
        Callable with one of the following signatures:

        - `function(example: Dict[str, Any]) -> bool` if `with_indices=False, batched=False`
        - `function(example: Dict[str, Any], indices: int) -> bool` if `with_indices=True, batched=False`
        - `function(example: Dict[str, List]) -> List[bool]` if `with_indices=False, batched=True`
        - `function(example: Dict[str, List], indices: List[int]) -> List[bool]` if `with_indices=True, batched=True`

        If no function is provided, defaults to an always True function: `lambda x: True`.
    with_indices (`bool`, defaults to `False`):
        Provide example indices to `function`. Note that in this case the signature of `function` should be `def function(example, idx): ...`.
    input_columns (`str` or `List[str]`, *optional*):
        The columns to be passed into `function` as
        positional arguments. If `None`, a dict mapping to all formatted columns is passed as one argument.
    batched (`bool`, defaults to `False`):
        Provide batch of examples to `function`
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of examples per batch provided to `function` if `batched=True`.
    fn_kwargs (`Dict`, *optional*, defaults to `None`):
        Keyword arguments to be passed to `function`

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> ds = ds.filter(lambda x: x["label"] == 0)
>>> list(ds["train"].take(3))
[{'label': 0, 'text': 'Review: simplistic , silly and tedious .'},
 {'label': 0,
 'text': "Review: it's so laddish and juvenile , only teenage boys could possibly find it funny ."},
 {'label': 0,
 'text': 'Review: exploitative and largely devoid of the depth or sophistication that would make watching such a graphic treatment of the crimes bearable .'}]
```

---
## flatten_indices
```python
from dataset_dict import flatten_indices
```

Create and cache a new Dataset by flattening the indices mapping.

Args:
    keep_in_memory (`bool`, defaults to `False`):
        Keep the dataset in memory instead of writing it to a cache file.
    cache_file_names (`Dict[str, str]`, *optional*, default `None`):
        Provide the name of a path for the cache file. It is used to store the
        results of the computation instead of the automatically generated cache file name.
        You have to provide one `cache_file_name` per dataset in the dataset dictionary.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        This value is a good trade-off between memory usage during the processing, and processing speed.
        Higher value makes the processing do fewer lookups, lower value consume less temporary memory while running `map`.
    features (`Optional[datasets.Features]`, defaults to `None`):
        Use a specific [`Features`] to store the cache file
        instead of the automatically generated one.
    disable_nullable (`bool`, defaults to `False`):
        Allow null values in the table.
    num_proc (`int`, optional, default `None`):
        Max number of processes when generating cache. Already cached shards are loaded sequentially
    new_fingerprint (`str`, *optional*, defaults to `None`):
        The new fingerprint of the dataset after transform.
        If `None`, the new fingerprint is computed using a hash of the previous fingerprint, and the transform arguments

---
## sort
```python
from dataset_dict import sort
```

Create a new dataset sorted according to a single or multiple columns.

Args:
    column_names (`Union[str, Sequence[str]]`):
        Column name(s) to sort by.
    reverse (`Union[bool, Sequence[bool]]`, defaults to `False`):
        If `True`, sort by descending order rather than ascending. If a single bool is provided,
        the value is applied to the sorting of all column names. Otherwise a list of bools with the
        same length and order as column_names must be provided.
    null_placement (`str`, defaults to `at_end`):
        Put `None` values at the beginning if `at_start` or `first` or at the end if `at_end` or `last`
    keep_in_memory (`bool`, defaults to `False`):
        Keep the sorted indices in memory instead of writing it to a cache file.
    load_from_cache_file (`Optional[bool]`, defaults to `True` if caching is enabled):
        If a cache file storing the sorted indices
        can be identified, use it instead of recomputing.
    indices_cache_file_names (`[Dict[str, str]]`, *optional*, defaults to `None`):
        Provide the name of a path for the cache file. It is used to store the
        indices mapping instead of the automatically generated cache file name.
        You have to provide one `cache_file_name` per dataset in the dataset dictionary.
    writer_batch_size (`int`, defaults to `1000`):
        Number of rows per write operation for the cache file writer.
        Higher value gives smaller cache files, lower value consume less temporary memory.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset('rotten_tomatoes')
>>> ds['train']['label'][:10]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
>>> sorted_ds = ds.sort('label')
>>> sorted_ds['train']['label'][:10]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
>>> another_sorted_ds = ds.sort(['label', 'text'], reverse=[True, False])
>>> another_sorted_ds['train']['label'][:10]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
```

---
## shuffle
```python
from dataset_dict import shuffle
```

Randomly shuffles the elements of this dataset.
The shuffling is applied to all the datasets of the dataset dictionary.

This dataset fills a buffer with buffer_size elements, then randomly samples elements from this buffer,
replacing the selected elements with new elements. For perfect shuffling, a buffer size greater than or
equal to the full size of the dataset is required.

For instance, if your dataset contains 10,000 elements but `buffer_size` is set to 1000, then `shuffle` will
initially select a random element from only the first 1000 elements in the buffer. Once an element is
selected, its space in the buffer is replaced by the next (i.e. 1,001-st) element,
maintaining the 1000 element buffer.

If the dataset is made of several shards, it also does `shuffle` the order of the shards.
However if the order has been fixed by using [`~datasets.IterableDataset.skip`] or [`~datasets.IterableDataset.take`]
then the order of the shards is kept unchanged.

Args:
    seed (`int`, *optional*, defaults to `None`):
        Random seed that will be used to shuffle the dataset.
        It is used to sample from the shuffle buffer and also to shuffle the data shards.
    generator (`numpy.random.Generator`, *optional*):
        Numpy random Generator to use to compute the permutation of the dataset rows.
        If `generator=None` (default), uses `np.random.default_rng` (the default BitGenerator (PCG64) of NumPy).
    buffer_size (`int`, defaults to `1000`):
        Size of the buffer.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", streaming=True)
>>> list(ds["train"].take(3))
[{'label': 1,
 'text': 'the rock is destined to be the 21st century's new " conan " and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .'},
 {'label': 1,
 'text': 'the gorgeously elaborate continuation of " the lord of the rings " trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .'},
 {'label': 1, 'text': 'effective but too-tepid biopic'}]
>>> ds = ds.shuffle(seed=42)
>>> list(ds["train"].take(3))
[{'label': 1,
 'text': "a sports movie with action that's exciting on the field and a story you care about off it ."},
 {'label': 1,
 'text': 'at its best , the good girl is a refreshingly adult take on adultery . . .'},
 {'label': 1,
 'text': "sam jones became a very lucky filmmaker the day wilco got dropped from their record label , proving that one man's ruin may be another's fortune ."}]
```

---
## save_to_disk
```python
from dataset_dict import save_to_disk
```

Saves a dataset dict to a filesystem using `fsspec.spec.AbstractFileSystem`.

For [`Image`] and [`Audio`] data:

All the Image() and Audio() data are stored in the arrow files.
If you want to store paths or urls, please use the Value("string") type.

Args:
    dataset_dict_path (`path-like`):
        Path (e.g. `dataset/train`) or remote URI (e.g. `s3://my-bucket/dataset/train`)
        of the dataset dict directory where the dataset dict will be saved to.
    max_shard_size (`int` or `str`, *optional*, defaults to `"500MB"`):
        The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
        (like `"50MB"`).
    num_shards (`Dict[str, int]`, *optional*):
        Number of shards to write. By default the number of shards depends on `max_shard_size` and `num_proc`.
        You need to provide the number of shards for each dataset in the dataset dictionary.
        Use a dictionary to define a different num_shards for each split.

        <Added version="2.8.0"/>
    num_proc (`int`, *optional*, default `None`):
        Number of processes when downloading and generating the dataset locally.
        Multiprocessing is disabled by default.

        <Added version="2.8.0"/>
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.8.0"/>

Example:

```python
>>> dataset_dict.save_to_disk("path/to/dataset/directory")
>>> dataset_dict.save_to_disk("path/to/dataset/directory", max_shard_size="1GB")
>>> dataset_dict.save_to_disk("path/to/dataset/directory", num_shards={"train": 1024, "test": 8})
```

---
## load_from_disk
```python
from dataset_dict import load_from_disk
```

Load a dataset that was previously saved using [`save_to_disk`] from a filesystem using `fsspec.spec.AbstractFileSystem`.

Args:
    dataset_dict_path (`path-like`):
        Path (e.g. `"dataset/train"`) or remote URI (e.g. `"s3//my-bucket/dataset/train"`)
        of the dataset dict directory where the dataset dict will be loaded from.
    keep_in_memory (`bool`, defaults to `None`):
        Whether to copy the dataset in-memory. If `None`, the
        dataset will not be copied in-memory unless explicitly enabled by setting
        `datasets.config.IN_MEMORY_MAX_SIZE` to nonzero. See more details in the
        [improve performance](../cache#improve-performance) section.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.8.0"/>

Returns:
    [`DatasetDict`]

Example:

```py
>>> ds = load_from_disk('path/to/dataset/directory')
```

---
## from_csv
```python
from dataset_dict import from_csv
```

Create [`DatasetDict`] from CSV file(s).

Args:
    path_or_paths (`dict` of path-like):
        Path(s) of the CSV file(s).
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (str, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`pandas.read_csv`].

Returns:
    [`DatasetDict`]

Example:

```py
>>> from datasets import DatasetDict
>>> ds = DatasetDict.from_csv({'train': 'path/to/dataset.csv'})
```

---
## from_json
```python
from dataset_dict import from_json
```

Create [`DatasetDict`] from JSON Lines file(s).

Args:
    path_or_paths (`path-like` or list of `path-like`):
        Path(s) of the JSON Lines file(s).
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (str, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`JsonConfig`].

Returns:
    [`DatasetDict`]

Example:

```py
>>> from datasets import DatasetDict
>>> ds = DatasetDict.from_json({'train': 'path/to/dataset.json'})
```

---
## from_parquet
```python
from dataset_dict import from_parquet
```

Create [`DatasetDict`] from Parquet file(s).

Args:
    path_or_paths (`dict` of path-like):
        Path(s) of the CSV file(s).
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    columns (`List[str]`, *optional*):
        If not `None`, only these columns will be read from the file.
        A column name may be a prefix of a nested field, e.g. 'a' will select
        'a.b', 'a.c', and 'a.d.e'.
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`ParquetConfig`].

Returns:
    [`DatasetDict`]

Example:

```py
>>> from datasets import DatasetDict
>>> ds = DatasetDict.from_parquet({'train': 'path/to/dataset/parquet'})
```

---
## from_text
```python
from dataset_dict import from_text
```

Create [`DatasetDict`] from text file(s).

Args:
    path_or_paths (`dict` of path-like):
        Path(s) of the text file(s).
    features ([`Features`], *optional*):
        Dataset features.
    cache_dir (`str`, *optional*, defaults to `"~/.cache/huggingface/datasets"`):
        Directory to cache data.
    keep_in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.
    **kwargs (additional keyword arguments):
        Keyword arguments to be passed to [`TextConfig`].

Returns:
    [`DatasetDict`]

Example:

```py
>>> from datasets import DatasetDict
>>> ds = DatasetDict.from_text({'train': 'path/to/dataset.txt'})
```

---
## align_labels_with_mapping
```python
from dataset_dict import align_labels_with_mapping
```



---
## push_to_hub
```python
from dataset_dict import push_to_hub
```

Pushes the [`DatasetDict`] to the hub as a Parquet dataset.
The [`DatasetDict`] is pushed using HTTP requests and does not need to have neither git or git-lfs installed.

Each dataset split will be pushed independently. The pushed dataset will keep the original split names.

The resulting Parquet files are self-contained by default: if your dataset contains [`Image`] or [`Audio`]
data, the Parquet files will store the bytes of your images or audio files.
You can disable this by setting `embed_external_files` to False.

Args:
    repo_id (`str`):
        The ID of the repository to push to in the following format: `<user>/<dataset_name>` or
        `<org>/<dataset_name>`. Also accepts `<dataset_name>`, which will default to the namespace
        of the logged-in user.
    config_name (`str`):
        Configuration name of a dataset. Defaults to "default".
    set_default (`bool`, *optional*):
        Whether to set this configuration as the default one. Otherwise, the default configuration is the one
        named "default".
    data_dir (`str`, *optional*):
        Directory name that will contain the uploaded data files. Defaults to the `config_name` if different
        from "default", else "data".

        <Added version="2.17.0"/>
    commit_message (`str`, *optional*):
        Message to commit while pushing. Will default to `"Upload dataset"`.
    commit_description (`str`, *optional*):
        Description of the commit that will be created.
        Additionally, description of the PR if a PR is created (`create_pr` is True).

        <Added version="2.16.0"/>
    private (`bool`, *optional*):
        Whether the dataset repository should be set to private or not. Only affects repository creation:
        a repository that already exists will not be affected by that parameter.
    token (`str`, *optional*):
        An optional authentication token for the Hugging Face Hub. If no token is passed, will default
        to the token saved locally when logging in with `huggingface-cli login`. Will raise an error
        if no token is passed and the user is not logged-in.
    revision (`str`, *optional*):
        Branch to push the uploaded files to. Defaults to the `"main"` branch.

        <Added version="2.15.0"/>
    create_pr (`bool`, *optional*, defaults to `False`):
        Whether to create a PR with the uploaded files or directly commit.

        <Added version="2.15.0"/>
    max_shard_size (`int` or `str`, *optional*, defaults to `"500MB"`):
        The maximum size of the dataset shards to be uploaded to the hub. If expressed as a string, needs to be digits followed by a unit
        (like `"500MB"` or `"1GB"`).
    num_shards (`Dict[str, int]`, *optional*):
        Number of shards to write. By default, the number of shards depends on `max_shard_size`.
        Use a dictionary to define a different num_shards for each split.

        <Added version="2.8.0"/>
    embed_external_files (`bool`, defaults to `True`):
        Whether to embed file bytes in the shards.
        In particular, this will do the following before the push for the fields of type:

        - [`Audio`] and [`Image`] removes local path information and embed file content in the Parquet files.

Return:
    huggingface_hub.CommitInfo

Example:

```python
>>> dataset_dict.push_to_hub("<organization>/<dataset_id>")
>>> dataset_dict.push_to_hub("<organization>/<dataset_id>", private=True)
>>> dataset_dict.push_to_hub("<organization>/<dataset_id>", max_shard_size="1GB")
>>> dataset_dict.push_to_hub("<organization>/<dataset_id>", num_shards={"train": 1024, "test": 8})
```

If you want to add a new configuration (or subset) to a dataset (e.g. if the dataset has multiple tasks/versions/languages):

```python
>>> english_dataset.push_to_hub("<organization>/<dataset_id>", "en")
>>> french_dataset.push_to_hub("<organization>/<dataset_id>", "fr")
>>> # later
>>> english_dataset = load_dataset("<organization>/<dataset_id>", "en")
>>> french_dataset = load_dataset("<organization>/<dataset_id>", "fr")
```

---
## __name__
```python
from fingerprint import __name__
```

Submodule containing the implementation for the FingerprintAdapter.

This file contains an implementation of a Transport Adapter that validates
the fingerprints of SSL certificates presented upon connection.

---
## _TempCacheDir
```python
from fingerprint import _TempCacheDir
```

A temporary directory for storing cached Arrow files with a cleanup that frees references to the Arrow files
before deleting the directory itself to avoid permission errors on Windows.

---
## maybe_register_dataset_for_temp_dir_deletion
```python
from fingerprint import maybe_register_dataset_for_temp_dir_deletion
```

This function registers the datasets that have cache files in _TEMP_DIR_FOR_TEMP_CACHE_FILES in order
to properly delete them before deleting the temporary directory.
The temporary directory _TEMP_DIR_FOR_TEMP_CACHE_FILES is used when caching is disabled.

---
## get_datasets_with_cache_file_in_temp_dir
```python
from fingerprint import get_datasets_with_cache_file_in_temp_dir
```



---
## enable_caching
```python
from fingerprint import enable_caching
```

When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it's already been computed.

Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.

If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:
- cache files are always recreated
- cache files are written to a temporary directory that is deleted when session closes
- cache files are named using a random hash instead of the dataset fingerprint
- use [`~datasets.Dataset.save_to_disk`] to save a transformed dataset or it will be deleted when session closes
- caching doesn't affect [`~datasets.load_dataset`]. If you want to regenerate a dataset from scratch you should use
the `download_mode` parameter in [`~datasets.load_dataset`].

---
## disable_caching
```python
from fingerprint import disable_caching
```

When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it's already been computed.

Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.

If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:
- cache files are always recreated
- cache files are written to a temporary directory that is deleted when session closes
- cache files are named using a random hash instead of the dataset fingerprint
- use [`~datasets.Dataset.save_to_disk`] to save a transformed dataset or it will be deleted when session closes
- caching doesn't affect [`~datasets.load_dataset`]. If you want to regenerate a dataset from scratch you should use
the `download_mode` parameter in [`~datasets.load_dataset`].

---
## is_caching_enabled
```python
from fingerprint import is_caching_enabled
```

When applying transforms on a dataset, the data are stored in cache files.
The caching mechanism allows to reload an existing cache file if it's already been computed.

Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated
after each transform.

If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets.
More precisely, if the caching is disabled:
- cache files are always recreated
- cache files are written to a temporary directory that is deleted when session closes
- cache files are named using a random hash instead of the dataset fingerprint
- use [`~datasets.Dataset.save_to_disk`]] to save a transformed dataset or it will be deleted when session closes
- caching doesn't affect [`~datasets.load_dataset`]. If you want to regenerate a dataset from scratch you should use
the `download_mode` parameter in [`~datasets.load_dataset`].

---
## get_temporary_cache_files_directory
```python
from fingerprint import get_temporary_cache_files_directory
```

Return a directory that is deleted when session closes.

---
## Hasher
```python
from fingerprint import Hasher
```

Hasher that accepts python objects as inputs.

---
## generate_fingerprint
```python
from fingerprint import generate_fingerprint
```



---
## generate_random_fingerprint
```python
from fingerprint import generate_random_fingerprint
```



---
## update_fingerprint
```python
from fingerprint import update_fingerprint
```



---
## validate_fingerprint
```python
from fingerprint import validate_fingerprint
```

Make sure the fingerprint is a non-empty string that is not longer that max_length=64 by default,
so that the fingerprint can be used to name cache files without issues.

---
## format_transform_for_fingerprint
```python
from fingerprint import format_transform_for_fingerprint
```

Format a transform to the format that will be used to update the fingerprint.

---
## format_kwargs_for_fingerprint
```python
from fingerprint import format_kwargs_for_fingerprint
```

Format the kwargs of a transform to the format that will be used to update the fingerprint.

---
## fingerprint_transform
```python
from fingerprint import fingerprint_transform
```

Wrapper for dataset transforms to update the dataset fingerprint using ``update_fingerprint``
Args:
    inplace (:obj:`bool`):  If inplace is True, the fingerprint of the dataset is updated inplace.
        Otherwise, a parameter "new_fingerprint" is passed to the wrapped method that should take care of
        setting the fingerprint of the returned Dataset.
    use_kwargs (:obj:`List[str]`, optional): optional white list of argument names to take into account
        to update the fingerprint to the wrapped method that should take care of
        setting the fingerprint of the returned Dataset. By default all the arguments are used.
    ignore_kwargs (:obj:`List[str]`, optional): optional black list of argument names to take into account
        to update the fingerprint. Note that ignore_kwargs prevails on use_kwargs.
    fingerprint_names (:obj:`List[str]`, optional, defaults to ["new_fingerprint"]):
        If the dataset transforms is not inplace and returns a DatasetDict, then it can require
        several fingerprints (one per dataset in the DatasetDict). By specifying fingerprint_names,
        one fingerprint named after each element of fingerprint_names is going to be passed.
    randomized_function (:obj:`bool`, defaults to False): If the dataset transform is random and has
        optional parameters "seed" and "generator", then you can set randomized_function to True.
        This way, even if users set "seed" and "generator" to None, then the fingerprint is
        going to be randomly generated depending on numpy's current state. In this case, the
        generator is set to np.random.default_rng(np.random.get_state()[1][0]).
    version (:obj:`str`, optional): version of the transform. The version is taken into account when
        computing the fingerprint. If a datase transform changes (or at least if the output data
        that are cached changes), then one should increase the version. If the version stays the
        same, then old cached data could be reused that are not compatible with the new transform.
        It should be in the format "MAJOR.MINOR.PATCH".

---
## __init__
```python
from fingerprint import __init__
```



---
## _cleanup
```python
from fingerprint import _cleanup
```



---
## cleanup
```python
from fingerprint import cleanup
```



---
## hash_bytes
```python
from fingerprint import hash_bytes
```



---
## hash
```python
from fingerprint import hash
```



---
## update
```python
from fingerprint import update
```



---
## hexdigest
```python
from fingerprint import hexdigest
```



---
## _fingerprint
```python
from fingerprint import _fingerprint
```



---
## wrapper
```python
from fingerprint import wrapper
```



---
## __name__
```python
from naming import __name__
```

Utilities for file names.

---
## camelcase_to_snakecase
```python
from naming import camelcase_to_snakecase
```

Convert camel-case string to snake-case.

---
## snakecase_to_camelcase
```python
from naming import snakecase_to_camelcase
```

Convert snake-case string to camel-case string.

---
## filename_prefix_for_name
```python
from naming import filename_prefix_for_name
```



---
## filename_prefix_for_split
```python
from naming import filename_prefix_for_split
```



---
## filepattern_for_dataset_split
```python
from naming import filepattern_for_dataset_split
```



---
## filenames_for_dataset_split
```python
from naming import filenames_for_dataset_split
```



---
## __name__
```python
from arrow_writer import __name__
```

To write records into Parquet files.

---
## SchemaInferenceError
```python
from arrow_writer import SchemaInferenceError
```



---
## TypedSequence
```python
from arrow_writer import TypedSequence
```

This data container generalizes the typing when instantiating pyarrow arrays, tables or batches.

More specifically it adds several features:
- Support extension types like ``datasets.features.Array2DExtensionType``:
    By default pyarrow arrays don't return extension arrays. One has to call
    ``pa.ExtensionArray.from_storage(type, pa.array(data, type.storage_type))``
    in order to get an extension array.
- Support for ``try_type`` parameter that can be used instead of ``type``:
    When an array is transformed, we like to keep the same type as before if possible.
    For example when calling :func:`datasets.Dataset.map`, we don't want to change the type
    of each column by default.
- Better error message when a pyarrow array overflows.

Example::

    from datasets.features import Array2D, Array2DExtensionType, Value
    from datasets.arrow_writer import TypedSequence
    import pyarrow as pa

    arr = pa.array(TypedSequence([1, 2, 3], type=Value("int32")))
    assert arr.type == pa.int32()

    arr = pa.array(TypedSequence([1, 2, 3], try_type=Value("int32")))
    assert arr.type == pa.int32()

    arr = pa.array(TypedSequence(["foo", "bar"], try_type=Value("int32")))
    assert arr.type == pa.string()

    arr = pa.array(TypedSequence([[[1, 2, 3]]], type=Array2D((1, 3), "int64")))
    assert arr.type == Array2DExtensionType((1, 3), "int64")

    table = pa.Table.from_pydict({
        "image": TypedSequence([[[1, 2, 3]]], type=Array2D((1, 3), "int64"))
    })
    assert table["image"].type == Array2DExtensionType((1, 3), "int64")

---
## OptimizedTypedSequence
```python
from arrow_writer import OptimizedTypedSequence
```



---
## ArrowWriter
```python
from arrow_writer import ArrowWriter
```

Shuffles and writes Examples to Arrow files.

---
## ParquetWriter
```python
from arrow_writer import ParquetWriter
```



---
## __init__
```python
from arrow_writer import __init__
```



---
## get_inferred_type
```python
from arrow_writer import get_inferred_type
```

Return the inferred feature type.
This is done by converting the sequence to an Arrow array, and getting the corresponding
feature type.

Since building the Arrow array can be expensive, the value of the inferred type is cached
as soon as pa.array is called on the typed sequence.

Returns:
    FeatureType: inferred feature type of the sequence.

---
## _infer_custom_type_and_encode
```python
from arrow_writer import _infer_custom_type_and_encode
```

Implement type inference for custom objects like PIL.Image.Image -> Image type.

This function is only used for custom python objects that can't be direclty passed to build
an Arrow array. In such cases is infers the feature type to use, and it encodes the data so
that they can be passed to an Arrow array.

Args:
    data (Iterable): array of data to infer the type, e.g. a list of PIL images.

Returns:
    Tuple[Iterable, Optional[FeatureType]]: a tuple with:
        - the (possibly encoded) array, if the inferred feature type requires encoding
        - the inferred feature type if the array is made of supported custom objects like
            PIL images, else None.

---
## __arrow_array__
```python
from arrow_writer import __arrow_array__
```

This function is called when calling pa.array(typed_sequence)

---
## __len__
```python
from arrow_writer import __len__
```

Return the number of writed and staged examples

---
## __enter__
```python
from arrow_writer import __enter__
```



---
## __exit__
```python
from arrow_writer import __exit__
```



---
## close
```python
from arrow_writer import close
```



---
## _build_writer
```python
from arrow_writer import _build_writer
```



---
## schema
```python
from arrow_writer import schema
```



---
## _build_metadata
```python
from arrow_writer import _build_metadata
```



---
## write_examples_on_file
```python
from arrow_writer import write_examples_on_file
```

Write stored examples from the write-pool of examples. It makes a table out of the examples and write it.

---
## write_rows_on_file
```python
from arrow_writer import write_rows_on_file
```

Write stored rows from the write-pool of rows. It concatenates the single-row tables and it writes the resulting table.

---
## write
```python
from arrow_writer import write
```

Add a given (Example,Key) pair to the write-pool of examples which is written to file.

Args:
    example: the Example to add.
    key: Optional, a unique identifier(str, int or bytes) associated with each example

---
## check_duplicate_keys
```python
from arrow_writer import check_duplicate_keys
```

Raises error if duplicates found in a batch

---
## write_row
```python
from arrow_writer import write_row
```

Add a given single-row Table to the write-pool of rows which is written to file.

Args:
    row: the row to add.

---
## write_batch
```python
from arrow_writer import write_batch
```

Write a batch of Example to file.
Ignores the batch if it appears to be empty,
preventing a potential schema update of unknown types.

Args:
    batch_examples: the batch of examples to add.

---
## write_table
```python
from arrow_writer import write_table
```

Write a Table to file.

Args:
    example: the Table to add.

---
## finalize
```python
from arrow_writer import finalize
```



---
## __name__
```python
from arrow_reader import __name__
```

Arrow ArrowReader.

---
## DatasetNotOnHfGcsError
```python
from arrow_reader import DatasetNotOnHfGcsError
```

When you can't get the dataset from the Hf google cloud storage

---
## MissingFilesOnHfGcsError
```python
from arrow_reader import MissingFilesOnHfGcsError
```

When some files are missing on the Hf oogle cloud storage

---
## FileInstructions
```python
from arrow_reader import FileInstructions
```

The file instructions associated with a split ReadInstruction.

Attributes:
    num_examples: `int`, The total number of examples
    file_instructions: List[dict(filename, skip, take)], the files information.
        The filenames contains the relative path, not absolute.
        skip/take indicates which example read in the file: `ds.slice(skip, take)`

---
## make_file_instructions
```python
from arrow_reader import make_file_instructions
```

Returns instructions of the split dict.

Args:
    name (`str`): Name of the dataset.
    split_infos (`list` of `[SplitInfo]`): Dataset splits information.
    instruction ([`ReadInstruction`] or `str`): Reading instruction for a dataset.
    filetype_suffix (`str`, *optional*): Suffix of dataset files, e.g. 'arrow' or 'parquet'.
    prefix_path (`str`, *optional*): Prefix of dataset files, e.g. directory name.

Returns:
    [`FileInstructions`]

---
## BaseReader
```python
from arrow_reader import BaseReader
```

Build a Dataset object out of Instruction instance(s).

---
## ArrowReader
```python
from arrow_reader import ArrowReader
```

Build a Dataset object out of Instruction instance(s).
This Reader uses either memory mapping or file descriptors (in-memory) on arrow files.

---
## ParquetReader
```python
from arrow_reader import ParquetReader
```

Build a Dataset object out of Instruction instance(s).
This Reader uses memory mapping on parquet files.

---
## _AbsoluteInstruction
```python
from arrow_reader import _AbsoluteInstruction
```

A machine friendly slice: defined absolute positive boundaries.

---
## _RelativeInstruction
```python
from arrow_reader import _RelativeInstruction
```

Represents a single parsed slicing instruction, can use % and negatives.

---
## _str_to_read_instruction
```python
from arrow_reader import _str_to_read_instruction
```

Returns ReadInstruction for given string.

---
## _pct_to_abs_pct1
```python
from arrow_reader import _pct_to_abs_pct1
```



---
## _pct_to_abs_closest
```python
from arrow_reader import _pct_to_abs_closest
```



---
## _rel_to_abs_instr
```python
from arrow_reader import _rel_to_abs_instr
```

Returns _AbsoluteInstruction instance for given RelativeInstruction.

Args:
    rel_instr: RelativeInstruction instance.
    name2len: dict {split_name: num_examples}.

---
## ReadInstruction
```python
from arrow_reader import ReadInstruction
```

Reading instruction for a dataset.

Examples::

  # The following lines are equivalent:
  ds = datasets.load_dataset('mnist', split='test[:33%]')
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction.from_spec('test[:33%]'))
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction('test', to=33, unit='%'))
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction(
      'test', from_=0, to=33, unit='%'))

  # The following lines are equivalent:
  ds = datasets.load_dataset('mnist', split='test[:33%]+train[1:-1]')
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction.from_spec(
      'test[:33%]+train[1:-1]'))
  ds = datasets.load_dataset('mnist', split=(
      datasets.ReadInstruction('test', to=33, unit='%') +
      datasets.ReadInstruction('train', from_=1, to=-1, unit='abs')))

  # The following lines are equivalent:
  ds = datasets.load_dataset('mnist', split='test[:33%](pct1_dropremainder)')
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction.from_spec(
      'test[:33%](pct1_dropremainder)'))
  ds = datasets.load_dataset('mnist', split=datasets.ReadInstruction(
      'test', from_=0, to=33, unit='%', rounding="pct1_dropremainder"))

  # 10-fold validation:
  tests = datasets.load_dataset(
      'mnist',
      [datasets.ReadInstruction('train', from_=k, to=k+10, unit='%')
      for k in range(0, 100, 10)])
  trains = datasets.load_dataset(
      'mnist',
      [datasets.ReadInstruction('train', to=k, unit='%') + datasets.ReadInstruction('train', from_=k+10, unit='%')
      for k in range(0, 100, 10)])

---
## __init__
```python
from arrow_reader import __init__
```

Initialize ReadInstruction.

Args:
    split_name (str): name of the split to read. Eg: 'train'.
    rounding (str, optional): The rounding behaviour to use when percent slicing is
        used. Ignored when slicing with absolute indices.
        Possible values:
         - 'closest' (default): The specified percentages are rounded to the
             closest value. Use this if you want specified percents to be as
             much exact as possible.
         - 'pct1_dropremainder': the specified percentages are treated as
             multiple of 1%. Use this option if you want consistency. Eg:
                 len(5%) == 5 * len(1%).
             Using this option, one might not be able to use the full set of
             examples, if the number of those is not a multiple of 100.
    from_ (int):
    to (int): alternative way of specifying slicing boundaries. If any of
        {from_, to, unit} argument is used, slicing cannot be specified as
        string.
    unit (str): optional, one of:
        '%': to set the slicing unit as percents of the split size.
        'abs': to set the slicing unit as absolute numbers.

---
## _get_table_from_filename
```python
from arrow_reader import _get_table_from_filename
```

Returns a Dataset instance from given (filename, skip, take).

---
## _read_files
```python
from arrow_reader import _read_files
```

Returns Dataset for given file instructions.

Args:
    files: List[dict(filename, skip, take)], the files information.
        The filenames contain the absolute path, not relative.
        skip/take indicates which example read in the file: `ds.slice(skip, take)`
    in_memory (bool, default False): Whether to copy the data in-memory.

---
## get_file_instructions
```python
from arrow_reader import get_file_instructions
```

Return list of dict {'filename': str, 'skip': int, 'take': int}

---
## read
```python
from arrow_reader import read
```

Returns Dataset instance(s).

Args:
    name (str): name of the dataset.
    instructions (ReadInstruction): instructions to read.
        Instruction can be string and will then be passed to the Instruction
        constructor as it.
    split_infos (list of SplitInfo proto): the available splits for dataset.
    in_memory (bool, default False): Whether to copy the data in-memory.

Returns:
     kwargs to build a single Dataset instance.

---
## read_files
```python
from arrow_reader import read_files
```

Returns single Dataset instance for the set of file instructions.

Args:
    files: List[dict(filename, skip, take)], the files information.
        The filenames contains the relative path, not absolute.
        skip/take indicates which example read in the file: `ds.skip().take()`
    original_instructions: store the original instructions used to build the dataset split in the dataset.
    in_memory (bool, default False): Whether to copy the data in-memory.

Returns:
    kwargs to build a Dataset instance.

---
## read_table
```python
from arrow_reader import read_table
```

Read table from file.

Args:
    filename (str): File name of the table.
    in_memory (bool, default=False): Whether to copy the data in-memory.

Returns:
    pyarrow.Table

---
## __post_init__
```python
from arrow_reader import __post_init__
```



---
## _init
```python
from arrow_reader import _init
```



---
## _read_instruction_from_relative_instructions
```python
from arrow_reader import _read_instruction_from_relative_instructions
```

Returns ReadInstruction obj initialized with relative_instructions.

---
## from_spec
```python
from arrow_reader import from_spec
```

Creates a `ReadInstruction` instance out of a string spec.

Args:
    spec (`str`):
        Split(s) + optional slice(s) to read + optional rounding
        if percents are used as the slicing unit. A slice can be specified,
        using absolute numbers (`int`) or percentages (`int`).

Examples:

    ```
    test: test split.
    test + validation: test split + validation split.
    test[10:]: test split, minus its first 10 records.
    test[:10%]: first 10% records of test split.
    test[:20%](pct1_dropremainder): first 10% records, rounded with the pct1_dropremainder rounding.
    test[:-5%]+train[40%:60%]: first 95% of test + middle 20% of train.
    ```

Returns:
    ReadInstruction instance.

---
## to_spec
```python
from arrow_reader import to_spec
```



---
## __add__
```python
from arrow_reader import __add__
```

Returns a new ReadInstruction obj, result of appending other to self.

---
## __str__
```python
from arrow_reader import __str__
```



---
## __repr__
```python
from arrow_reader import __repr__
```



---
## to_absolute
```python
from arrow_reader import to_absolute
```

Translate instruction into a list of absolute instructions.

Those absolute instructions are then to be added together.

Args:
    name2len (`dict`):
        Associating split names to number of examples.

Returns:
    list of _AbsoluteInstruction instances (corresponds to the + in spec).

---
## __name__
```python
from hub import __name__
```



---
## convert_to_parquet
```python
from hub import convert_to_parquet
```

Convert Hub [script-based dataset](dataset_script) to Parquet [data-only dataset](repository_structure), so that
the dataset viewer will be supported.

This function:
- makes a copy of the script on the "main" branch into a dedicated branch called "script" (if it does not already exist)
- creates a pull request to the Hub dataset to convert it to Parquet files (and deletes the script from the main branch)

If in the future you need to recreate the Parquet files from the "script" branch, pass the `revision="script"` argument.

Note that you should pass the `trust_remote_code=True` argument only if you trust the remote code to be executed locally on your machine.

Args:
    repo_id (`str`): ID of the source Hub dataset repository, in the following format: `<user>/<dataset_name>` or
        `<org>/<dataset_name>`.
    revision (`str`, *optional*): Branch of the source Hub dataset repository. Defaults to the `"main"` branch.
    token (`bool` or `str`, *optional*): Authentication token for the Hugging Face Hub.
    trust_remote_code (`bool`, defaults to `False`): Whether you trust the remote code of the Hub script-based
        dataset to be executed locally on your machine. This option should only be set to `True` for repositories
        where you have read the code and which you trust.

        <Changed version="2.20.0">

        `trust_remote_code` defaults to `False` if not specified.

        </Changed>

Returns:
    `huggingface_hub.CommitInfo`

---
## delete_from_hub
```python
from hub import delete_from_hub
```

Delete a dataset configuration from a [data-only dataset](repository_structure) on the Hub.

Args:
    repo_id (`str`): ID of the Hub dataset repository, in the following format: `<user>/<dataset_name>` or
        `<org>/<dataset_name>`.
    config_name (`str`): Name of the dataset configuration.
    revision (`str`, *optional*): Branch to delete the configuration from. Defaults to the `"main"` branch.
    token (`bool` or `str`, *optional*): Authentication token for the Hugging Face Hub.

Returns:
    `huggingface_hub.CommitInfo`

---
## _delete_files
```python
from hub import _delete_files
```



---
## __name__
```python
from builder import __name__
```

colorLib.builder: Build COLR/CPAL tables from scratch

---
## InvalidConfigName
```python
from builder import InvalidConfigName
```



---
## BuilderConfig
```python
from builder import BuilderConfig
```

Base class for `DatasetBuilder` data configuration.

`DatasetBuilder` subclasses with data configuration options should subclass
`BuilderConfig` and add their own properties.

Attributes:
    name (`str`, defaults to `default`):
        The name of the configuration.
    version (`Version` or `str`, defaults to `0.0.0`):
        The version of the configuration.
    data_dir (`str`, *optional*):
        Path to the directory containing the source data.
    data_files (`str` or `Sequence` or `Mapping`, *optional*):
        Path(s) to source data file(s).
    description (`str`, *optional*):
        A human description of the configuration.

---
## DatasetBuilder
```python
from builder import DatasetBuilder
```

Abstract base class for all datasets.

`DatasetBuilder` has 3 key methods:

    - [`DatasetBuilder.info`]: Documents the dataset, including feature
      names, types, shapes, version, splits, citation, etc.
    - [`DatasetBuilder.download_and_prepare`]: Downloads the source data
      and writes it to disk.
    - [`DatasetBuilder.as_dataset`]: Generates a [`Dataset`].

Some `DatasetBuilder`s expose multiple variants of the
dataset by defining a [`BuilderConfig`] subclass and accepting a
config object (or name) on construction. Configurable datasets expose a
pre-defined set of configurations in [`DatasetBuilder.builder_configs`].

Args:
    cache_dir (`str`, *optional*):
        Directory to cache data. Defaults to `"~/.cache/huggingface/datasets"`.
    dataset_name (`str`, *optional*):
        Name of the dataset, if different from the builder name. Useful for packaged builders
        like csv, imagefolder, audiofolder, etc. to reflect the difference between datasets
        that use the same packaged builder.
    config_name (`str`, *optional*):
        Name of the dataset configuration.
        It affects the data generated on disk. Different configurations will have their own subdirectories and
        versions.
        If not provided, the default configuration is used (if it exists).

        <Added version="2.3.0">

        Parameter `name` was renamed to `config_name`.

        </Added>
    hash (`str`, *optional*):
        Hash specific to the dataset code. Used to update the caching directory when the
        dataset loading script code is updated (to avoid reusing old data).
        The typical caching directory (defined in `self._relative_data_dir`) is `name/version/hash/`.
    base_path (`str`, *optional*):
        Base path for relative paths that are used to download files.
        This can be a remote URL.
    features ([`Features`], *optional*):
        Features types to use with this dataset.
        It can be used to change the [`Features`] types of a dataset, for example.
    token (`str` or `bool`, *optional*):
        String or boolean to use as Bearer token for remote files on the
        Datasets Hub. If `True`, will get token from `"~/.huggingface"`.
    repo_id (`str`, *optional*):
        ID of the dataset repository.
        Used to distinguish builders with the same name but not coming from the same namespace, for example "squad"
        and "lhoestq/squad" repo IDs. In the latter, the builder name would be "lhoestq___squad".
    data_files (`str` or `Sequence` or `Mapping`, *optional*):
        Path(s) to source data file(s).
        For builders like "csv" or "json" that need the user to specify data files. They can be either
        local or remote files. For convenience, you can use a `DataFilesDict`.
    data_dir (`str`, *optional*):
        Path to directory containing source data file(s).
        Use only if `data_files` is not passed, in which case it is equivalent to passing
        `os.path.join(data_dir, "**")` as `data_files`.
        For builders that require manual download, it must be the path to the local directory containing the
        manually downloaded data.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the dataset file-system backend, if any.
    writer_batch_size (`int`, *optional*):
        Batch size used by the ArrowWriter.
        It defines the number of samples that are kept in memory before writing them
        and also the length of the arrow chunks.
        None means that the ArrowWriter will use its default value.
    **config_kwargs (additional keyword arguments): Keyword arguments to be passed to the corresponding builder
        configuration class, set on the class attribute [`DatasetBuilder.BUILDER_CONFIG_CLASS`]. The builder
        configuration class is [`BuilderConfig`] or a subclass of it.

---
## GeneratorBasedBuilder
```python
from builder import GeneratorBasedBuilder
```

Base class for datasets with data generation based on dict generators.

`GeneratorBasedBuilder` is a convenience class that abstracts away much
of the data writing and reading of `DatasetBuilder`. It expects subclasses to
implement generators of feature dictionaries across the dataset splits
(`_split_generators`). See the method docstrings for details.

---
## ArrowBasedBuilder
```python
from builder import ArrowBasedBuilder
```

Base class for datasets with data generation based on Arrow loading functions (CSV/JSON/Parquet).

---
## __post_init__
```python
from builder import __post_init__
```



---
## __eq__
```python
from builder import __eq__
```



---
## create_config_id
```python
from builder import create_config_id
```

The config id is used to build the cache directory.
By default it is equal to the config name.
However the name of a config is not sufficient to have a unique identifier for the dataset being generated
since it doesn't take into account:
- the config kwargs that can be used to overwrite attributes
- the custom features used to write the dataset
- the data_files for json/text/csv/pandas datasets

Therefore the config id is just the config name with an optional suffix based on these.

---
## _resolve_data_files
```python
from builder import _resolve_data_files
```



---
## __init__
```python
from builder import __init__
```



---
## __getstate__
```python
from builder import __getstate__
```



---
## __setstate__
```python
from builder import __setstate__
```



---
## manual_download_instructions
```python
from builder import manual_download_instructions
```



---
## _check_legacy_cache
```python
from builder import _check_legacy_cache
```

Check for the old cache directory template {cache_dir}/{namespace}___{builder_name} from 2.13

---
## _check_legacy_cache2
```python
from builder import _check_legacy_cache2
```

Check for the old cache directory template {cache_dir}/{namespace}___{dataset_name}/{config_name}-xxx from 2.14 and 2.15

---
## get_all_exported_dataset_infos
```python
from builder import get_all_exported_dataset_infos
```

Empty dict if doesn't exist

        Example:

        ```py
        >>> from datasets import load_dataset_builder
        >>> ds_builder = load_dataset_builder('rotten_tomatoes')
        >>> ds_builder.get_all_exported_dataset_infos()
        {'default': DatasetInfo(description="Movie Review Dataset.
This is a dataset of containing 5,331 positive and 5,331 negative processed
sentences from Rotten Tomatoes movie reviews. This data was first used in Bo
Pang and Lillian Lee, ``Seeing stars: Exploiting class relationships for
sentiment categorization with respect to rating scales.'', Proceedings of the
ACL, 2005.
", citation='@InProceedings{Pang+Lee:05a,
  author =       {Bo Pang and Lillian Lee},
  title =        {Seeing stars: Exploiting class relationships for sentiment
                  categorization with respect to rating scales},
  booktitle =    {Proceedings of the ACL},
  year =         2005
}
', homepage='http://www.cs.cornell.edu/people/pabo/movie-review-data/', license='', features={'text': Value(dtype='string', id=None), 'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None)}, post_processed=None, supervised_keys=SupervisedKeysData(input='', output=''), builder_name='rotten_tomatoes_movie_review', config_name='default', version=1.0.0, splits={'train': SplitInfo(name='train', num_bytes=1074810, num_examples=8530, dataset_name='rotten_tomatoes_movie_review'), 'validation': SplitInfo(name='validation', num_bytes=134679, num_examples=1066, dataset_name='rotten_tomatoes_movie_review'), 'test': SplitInfo(name='test', num_bytes=135972, num_examples=1066, dataset_name='rotten_tomatoes_movie_review')}, download_checksums={'https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz': {'num_bytes': 487770, 'checksum': 'a05befe52aafda71d458d188a1c54506a998b1308613ba76bbda2e5029409ce9'}}, download_size=487770, post_processing_size=None, dataset_size=1345461, size_in_bytes=1833231)}
        ```
        

---
## get_exported_dataset_info
```python
from builder import get_exported_dataset_info
```

Empty `DatasetInfo` if doesn't exist

        Example:

        ```py
        >>> from datasets import load_dataset_builder
        >>> ds_builder = load_dataset_builder('rotten_tomatoes')
        >>> ds_builder.get_exported_dataset_info()
        DatasetInfo(description="Movie Review Dataset.
This is a dataset of containing 5,331 positive and 5,331 negative processed
sentences from Rotten Tomatoes movie reviews. This data was first used in Bo
Pang and Lillian Lee, ``Seeing stars: Exploiting class relationships for
sentiment categorization with respect to rating scales.'', Proceedings of the
ACL, 2005.
", citation='@InProceedings{Pang+Lee:05a,
  author =       {Bo Pang and Lillian Lee},
  title =        {Seeing stars: Exploiting class relationships for sentiment
                  categorization with respect to rating scales},
  booktitle =    {Proceedings of the ACL},
  year =         2005
}
', homepage='http://www.cs.cornell.edu/people/pabo/movie-review-data/', license='', features={'text': Value(dtype='string', id=None), 'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None)}, post_processed=None, supervised_keys=SupervisedKeysData(input='', output=''), builder_name='rotten_tomatoes_movie_review', config_name='default', version=1.0.0, splits={'train': SplitInfo(name='train', num_bytes=1074810, num_examples=8530, dataset_name='rotten_tomatoes_movie_review'), 'validation': SplitInfo(name='validation', num_bytes=134679, num_examples=1066, dataset_name='rotten_tomatoes_movie_review'), 'test': SplitInfo(name='test', num_bytes=135972, num_examples=1066, dataset_name='rotten_tomatoes_movie_review')}, download_checksums={'https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz': {'num_bytes': 487770, 'checksum': 'a05befe52aafda71d458d188a1c54506a998b1308613ba76bbda2e5029409ce9'}}, download_size=487770, post_processing_size=None, dataset_size=1345461, size_in_bytes=1833231)
        ```
        

---
## _create_builder_config
```python
from builder import _create_builder_config
```

Create and validate BuilderConfig object as well as a unique config id for this config.
Raises ValueError if there are multiple builder configs and config_name and DEFAULT_CONFIG_NAME are None.
config_kwargs override the defaults kwargs in config

---
## builder_configs
```python
from builder import builder_configs
```

Dictionary of pre-defined configurations for this builder class.

---
## cache_dir
```python
from builder import cache_dir
```



---
## _use_legacy_cache_dir_if_possible
```python
from builder import _use_legacy_cache_dir_if_possible
```



---
## _relative_data_dir
```python
from builder import _relative_data_dir
```

Relative path of this dataset in cache_dir:
Will be:
    self.dataset_name/self.config.version/self.hash/
or if a repo_id with a namespace has been specified:
    self.namespace___self.dataset_name/self.config.version/self.hash/
If any of these element is missing or if ``with_version=False`` the corresponding subfolders are dropped.

---
## _build_cache_dir
```python
from builder import _build_cache_dir
```

Return the data directory for the current version.

---
## _info
```python
from builder import _info
```

Construct the DatasetInfo object. See `DatasetInfo` for details.

Warning: This function is only called once and the result is cached for all
following .info() calls.

Returns:
    info: (DatasetInfo) The dataset information

---
## get_imported_module_dir
```python
from builder import get_imported_module_dir
```

Return the path of the module of this class or subclass.

---
## _rename
```python
from builder import _rename
```



---
## download_and_prepare
```python
from builder import download_and_prepare
```

Downloads and prepares dataset for reading.

Args:
    output_dir (`str`, *optional*):
        Output directory for the dataset.
        Default to this builder's `cache_dir`, which is inside `~/.cache/huggingface/datasets` by default.

        <Added version="2.5.0"/>
    download_config (`DownloadConfig`, *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, *optional*):
        Select the download/generate mode, default to `REUSE_DATASET_IF_EXISTS`.
    verification_mode ([`VerificationMode`] or `str`, defaults to `BASIC_CHECKS`):
        Verification mode determining the checks to run on the downloaded/processed dataset information (checksums/size/splits/...).

        <Added version="2.9.1"/>
    dl_manager (`DownloadManager`, *optional*):
        Specific `DownloadManger` to use.
    base_path (`str`, *optional*):
        Base path for relative paths that are used to download files. This can be a remote url.
        If not specified, the value of the `base_path` attribute (`self.base_path`) will be used instead.
    file_format (`str`, *optional*):
        Format of the data files in which the dataset will be written.
        Supported formats: "arrow", "parquet". Default to "arrow" format.
        If the format is "parquet", then image and audio data are embedded into the Parquet files instead of pointing to local files.

        <Added version="2.5.0"/>
    max_shard_size (`Union[str, int]`, *optional*):
        Maximum number of bytes written per shard, default is "500MB".
        The size is based on uncompressed data size, so in practice your shard files may be smaller than
        `max_shard_size` thanks to Parquet compression for example.

        <Added version="2.5.0"/>
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        Multiprocessing is disabled by default.

        <Added version="2.7.0"/>
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the caching file-system backend, if any.

        <Added version="2.5.0"/>
    **download_and_prepare_kwargs (additional keyword arguments): Keyword arguments.

Example:

Download and prepare the dataset as Arrow files that can be loaded as a Dataset using `builder.as_dataset()`:

```py
>>> from datasets import load_dataset_builder
>>> builder = load_dataset_builder("rotten_tomatoes")
>>> builder.download_and_prepare()
```

Download and prepare the dataset as sharded Parquet files locally:

```py
>>> from datasets import load_dataset_builder
>>> builder = load_dataset_builder("rotten_tomatoes")
>>> builder.download_and_prepare("./output_dir", file_format="parquet")
```

Download and prepare the dataset as sharded Parquet files in a cloud storage:

```py
>>> from datasets import load_dataset_builder
>>> storage_options = {"key": aws_access_key_id, "secret": aws_secret_access_key}
>>> builder = load_dataset_builder("rotten_tomatoes")
>>> builder.download_and_prepare("s3://my-bucket/my_rotten_tomatoes", storage_options=storage_options, file_format="parquet")
```

---
## _check_manual_download
```python
from builder import _check_manual_download
```



---
## _download_and_prepare
```python
from builder import _download_and_prepare
```



---
## download_post_processing_resources
```python
from builder import download_post_processing_resources
```



---
## _load_info
```python
from builder import _load_info
```



---
## _save_info
```python
from builder import _save_info
```



---
## _save_infos
```python
from builder import _save_infos
```



---
## _make_split_generators_kwargs
```python
from builder import _make_split_generators_kwargs
```

Get kwargs for `self._split_generators()` from `prepare_split_kwargs`.

---
## as_dataset
```python
from builder import as_dataset
```

Return a Dataset for the specified split.

Args:
    split (`datasets.Split`):
        Which subset of the data to return.
    run_post_process (`bool`, defaults to `True`):
        Whether to run post-processing dataset transforms and/or add
        indexes.
    verification_mode ([`VerificationMode`] or `str`, defaults to `BASIC_CHECKS`):
        Verification mode determining the checks to run on the
        downloaded/processed dataset information (checksums/size/splits/...).

        <Added version="2.9.1"/>
    in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.

Returns:
    datasets.Dataset

Example:

```py
>>> from datasets import load_dataset_builder
>>> builder = load_dataset_builder('rotten_tomatoes')
>>> builder.download_and_prepare()
>>> ds = builder.as_dataset(split='train')
>>> ds
Dataset({
    features: ['text', 'label'],
    num_rows: 8530
})
```

---
## _build_single_dataset
```python
from builder import _build_single_dataset
```

as_dataset for a single split.

---
## _as_dataset
```python
from builder import _as_dataset
```

Constructs a `Dataset`.

This is the internal implementation to overwrite called when user calls
`as_dataset`. It should read the pre-processed datasets files and generate
the `Dataset` object.

Args:
    split (`datasets.Split`):
        which subset of the data to read.
    in_memory (`bool`, defaults to `False`):
        Whether to copy the data in-memory.

Returns:
    `Dataset`

---
## _get_dataset_fingerprint
```python
from builder import _get_dataset_fingerprint
```

The dataset fingerprint is the hash of the relative directory dataset_name/config_name/version/hash, as well as the split specs.

---
## as_streaming_dataset
```python
from builder import as_streaming_dataset
```



---
## _as_streaming_dataset_single
```python
from builder import _as_streaming_dataset_single
```



---
## _post_process
```python
from builder import _post_process
```

Run dataset transforms or add indexes

---
## _post_processing_resources
```python
from builder import _post_processing_resources
```

Mapping resource_name -> resource_file_name

---
## _download_post_processing_resources
```python
from builder import _download_post_processing_resources
```

Download the resource using the download manager and return the downloaded path.

---
## _split_generators
```python
from builder import _split_generators
```

Specify feature dictionary generators and dataset splits.

This function returns a list of `SplitGenerator`s defining how to generate
data and what splits to use.

Example:

    return [
            datasets.SplitGenerator(
                    name=datasets.Split.TRAIN,
                    gen_kwargs={'file': 'train_data.zip'},
            ),
            datasets.SplitGenerator(
                    name=datasets.Split.TEST,
                    gen_kwargs={'file': 'test_data.zip'},
            ),
    ]

The above code will first call `_generate_examples(file='train_data.zip')`
to write the train data, then `_generate_examples(file='test_data.zip')` to
write the test data.

Datasets are typically split into different subsets to be used at various
stages of training and evaluation.

Note that for datasets without a `VALIDATION` split, you can use a
fraction of the `TRAIN` data for evaluation as you iterate on your model
so as not to overfit to the `TEST` data.

For downloads and extractions, use the given `download_manager`.
Note that the `DownloadManager` caches downloads, so it is fine to have each
generator attempt to download the source data.

A good practice is to download all data in this function, and then
distribute the relevant parts to each split with the `gen_kwargs` argument

Args:
    dl_manager (`Union[DownloadManager, StreamingDownloadManager]`):
        Download manager to download the data

Returns:
    `list<SplitGenerator>`.

---
## _prepare_split
```python
from builder import _prepare_split
```



---
## _get_examples_iterable_for_split
```python
from builder import _get_examples_iterable_for_split
```



---
## _generate_examples
```python
from builder import _generate_examples
```

Default function generating examples for each `SplitGenerator`.

This function preprocess the examples from the raw data to the preprocessed
dataset files.
This function is called once for each `SplitGenerator` defined in
`_split_generators`. The examples yielded here will be written on
disk.

Args:
    **kwargs (additional keyword arguments):
        Arguments forwarded from the SplitGenerator.gen_kwargs

Yields:
    key: `str` or `int`, a unique deterministic example identification key.
        * Unique: An error will be raised if two examples are yield with the
            same key.
        * Deterministic: When generating the dataset twice, the same example
            should have the same key.
        Good keys can be the image id, or line number if examples are extracted
        from a text file.
        The key will be hashed and sorted to shuffle examples deterministically,
        such as generating the dataset multiple times keep examples in the
        same order.
    example: `dict<str feature_name, feature_value>`, a feature dictionary
        ready to be encoded and written to disk. The example will be
        encoded with `self.info.features.encode_example({...})`.

---
## _prepare_split_single
```python
from builder import _prepare_split_single
```



---
## _generate_tables
```python
from builder import _generate_tables
```

Default function generating examples for each `SplitGenerator`.

This function preprocess the examples from the raw data to the preprocessed
dataset files.
This function is called once for each `SplitGenerator` defined in
`_split_generators`. The examples yielded here will be written on
disk.

Args:
    **kwargs (additional keyword arguments):
        Arguments forwarded from the SplitGenerator.gen_kwargs

Yields:
    key: `str` or `int`, a unique deterministic example identification key.
        * Unique: An error will be raised if two examples are yield with the
            same key.
        * Deterministic: When generating the dataset twice, the same example
            should have the same key.
        Good keys can be the image id, or line number if examples are extracted
        from a text file.
        The key will be hashed and sorted to shuffle examples deterministically,
        such as generating the dataset multiple times keep examples in the
        same order.
    example: `pyarrow.Table`, a feature table
        ready to be encoded and written to disk.

---
## _other_versions_on_disk
```python
from builder import _other_versions_on_disk
```

Returns previous versions on disk.

---
## update_hash_with_config_parameters
```python
from builder import update_hash_with_config_parameters
```

Used to update hash of packaged modules which is used for creating unique cache directories to reflect
different config parameters which are passed in metadata from readme.

---
## incomplete_dir
```python
from builder import incomplete_dir
```

Create temporary dir for dirname and rename on exit.

---
## _rename_shard
```python
from builder import _rename_shard
```



---
## __name__
```python
from inspect import __name__
```

Helpers for inspecting Python modules.

---
## SplitsNotFoundError
```python
from inspect import SplitsNotFoundError
```



---
## get_dataset_infos
```python
from inspect import get_dataset_infos
```

Get the meta information about a dataset, returned as a dict mapping config name to DatasetInfoDict.

    Args:
        path (`str`): path to the dataset processing script with the dataset builder. Can be either:

            - a local path to processing script or the directory containing the script (if the script has the same name as the directory),
                e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`
            - a dataset identifier on the Hugging Face Hub (list all available datasets and ids with [`huggingface_hub.list_datasets`]),
                e.g. `'squad'`, `'glue'` or``'openai/webtext'`
        revision (`Union[str, datasets.Version]`, *optional*):
            If specified, the dataset module will be loaded from the datasets repository at this version.
            By default:
            - it is set to the local version of the lib.
            - it will also try to load it from the main branch if it's not available at the local version of the lib.
            Specifying a version that is different from your local version of the lib might cause compatibility issues.
        download_config ([`DownloadConfig`], *optional*):
            Specific download configuration parameters.
        download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
            Download/generate mode.
        data_files (`Union[Dict, List, str]`, *optional*):
            Defining the data_files of the dataset configuration.
        token (`str` or `bool`, *optional*):
            Optional string or boolean to use as Bearer token for remote files on the Datasets Hub.
            If `True`, or not specified, will get token from `"~/.huggingface"`.
        **config_kwargs (additional keyword arguments):
            Optional attributes for builder class which will override the attributes if supplied.

    Example:

    ```py
    >>> from datasets import get_dataset_infos
    >>> get_dataset_infos('rotten_tomatoes')
    {'default': DatasetInfo(description="Movie Review Dataset.
This is a dataset of containing 5,331 positive and 5,331 negative processed
sentences from Rotten Tomatoes movie reviews...), ...}
    ```
    

---
## get_dataset_config_names
```python
from inspect import get_dataset_config_names
```

Get the list of available config names for a particular dataset.

Args:
    path (`str`): path to the dataset processing script with the dataset builder. Can be either:

        - a local path to processing script or the directory containing the script (if the script has the same name as the directory),
            e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`
        - a dataset identifier on the Hugging Face Hub (list all available datasets and ids with [`huggingface_hub.list_datasets`]),
            e.g. `'squad'`, `'glue'` or `'openai/webtext'`
    revision (`Union[str, datasets.Version]`, *optional*):
        If specified, the dataset module will be loaded from the datasets repository at this version.
        By default:
        - it is set to the local version of the lib.
        - it will also try to load it from the main branch if it's not available at the local version of the lib.
        Specifying a version that is different from your local version of the lib might cause compatibility issues.
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
        Download/generate mode.
    dynamic_modules_path (`str`, defaults to `~/.cache/huggingface/modules/datasets_modules`):
        Optional path to the directory in which the dynamic modules are saved. It must have been initialized with `init_dynamic_modules`.
        By default the datasets are stored inside the `datasets_modules` module.
    data_files (`Union[Dict, List, str]`, *optional*):
        Defining the data_files of the dataset configuration.
    **download_kwargs (additional keyword arguments):
        Optional attributes for [`DownloadConfig`] which will override the attributes in `download_config` if supplied,
        for example `token`.

Example:

```py
>>> from datasets import get_dataset_config_names
>>> get_dataset_config_names("glue")
['cola',
 'sst2',
 'mrpc',
 'qqp',
 'stsb',
 'mnli',
 'mnli_mismatched',
 'mnli_matched',
 'qnli',
 'rte',
 'wnli',
 'ax']
```

---
## get_dataset_default_config_name
```python
from inspect import get_dataset_default_config_name
```

Get the default config name for a particular dataset.
Can return None only if the dataset has multiple configurations and no default configuration.

Args:
    path (`str`): path to the dataset processing script with the dataset builder. Can be either:

        - a local path to processing script or the directory containing the script (if the script has the same name as the directory),
            e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`
        - a dataset identifier on the Hugging Face Hub (list all available datasets and ids with [`huggingface_hub.list_datasets`]),
            e.g. `'squad'`, `'glue'` or `'openai/webtext'`
    revision (`Union[str, datasets.Version]`, *optional*):
        If specified, the dataset module will be loaded from the datasets repository at this version.
        By default:
        - it is set to the local version of the lib.
        - it will also try to load it from the main branch if it's not available at the local version of the lib.
        Specifying a version that is different from your local version of the lib might cause compatibility issues.
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
        Download/generate mode.
    dynamic_modules_path (`str`, defaults to `~/.cache/huggingface/modules/datasets_modules`):
        Optional path to the directory in which the dynamic modules are saved. It must have been initialized with `init_dynamic_modules`.
        By default the datasets are stored inside the `datasets_modules` module.
    data_files (`Union[Dict, List, str]`, *optional*):
        Defining the data_files of the dataset configuration.
    **download_kwargs (additional keyword arguments):
        Optional attributes for [`DownloadConfig`] which will override the attributes in `download_config` if supplied,
        for example `token`.

Returns:
    Optional[str]: the default config name if there is one

Example:

```py
>>> from datasets import get_dataset_default_config_name
>>> get_dataset_default_config_name("openbookqa")
'main'
```

---
## get_dataset_config_info
```python
from inspect import get_dataset_config_info
```

Get the meta information (DatasetInfo) about a dataset for a particular config

Args:
    path (``str``): path to the dataset processing script with the dataset builder. Can be either:

        - a local path to processing script or the directory containing the script (if the script has the same name as the directory),
            e.g. ``'./dataset/squad'`` or ``'./dataset/squad/squad.py'``
        - a dataset identifier on the Hugging Face Hub (list all available datasets and ids with [`huggingface_hub.list_datasets`]),
            e.g. ``'squad'``, ``'glue'`` or ``'openai/webtext'``
    config_name (:obj:`str`, optional): Defining the name of the dataset configuration.
    data_files (:obj:`str` or :obj:`Sequence` or :obj:`Mapping`, optional): Path(s) to source data file(s).
    download_config (:class:`~download.DownloadConfig`, optional): Specific download configuration parameters.
    download_mode (:class:`DownloadMode` or :obj:`str`, default ``REUSE_DATASET_IF_EXISTS``): Download/generate mode.
    revision (:class:`~utils.Version` or :obj:`str`, optional): Version of the dataset script to load.
        As datasets have their own git repository on the Datasets Hub, the default version "main" corresponds to their "main" branch.
        You can specify a different version than the default "main" by using a commit SHA or a git tag of the dataset repository.
    token (``str`` or :obj:`bool`, optional): Optional string or boolean to use as Bearer token for remote files on the Datasets Hub.
        If True, or not specified, will get token from `"~/.huggingface"`.
    **config_kwargs (additional keyword arguments): optional attributes for builder class which will override the attributes if supplied.

---
## get_dataset_split_names
```python
from inspect import get_dataset_split_names
```

Get the list of available splits for a particular config and dataset.

Args:
    path (`str`): path to the dataset processing script with the dataset builder. Can be either:

        - a local path to processing script or the directory containing the script (if the script has the same name as the directory),
            e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`
        - a dataset identifier on the Hugging Face Hub (list all available datasets and ids with [`huggingface_hub.list_datasets`]),
            e.g. `'squad'`, `'glue'` or `'openai/webtext'`
    config_name (`str`, *optional*):
        Defining the name of the dataset configuration.
    data_files (`str` or `Sequence` or `Mapping`, *optional*):
        Path(s) to source data file(s).
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
        Download/generate mode.
    revision ([`Version`] or `str`, *optional*):
        Version of the dataset script to load.
        As datasets have their own git repository on the Datasets Hub, the default version "main" corresponds to their "main" branch.
        You can specify a different version than the default "main" by using a commit SHA or a git tag of the dataset repository.
    token (`str` or `bool`, *optional*):
        Optional string or boolean to use as Bearer token for remote files on the Datasets Hub.
        If `True`, or not specified, will get token from `"~/.huggingface"`.
    **config_kwargs (additional keyword arguments):
        Optional attributes for builder class which will override the attributes if supplied.

Example:

```py
>>> from datasets import get_dataset_split_names
>>> get_dataset_split_names('rotten_tomatoes')
['train', 'validation', 'test']
```

---
## __name__
```python
from distributed import __name__
```



---
## split_dataset_by_node
```python
from distributed import split_dataset_by_node
```

Split a dataset for the node at rank `rank` in a pool of nodes of size `world_size`.

For map-style datasets:

Each node is assigned a chunk of data, e.g. rank 0 is given the first chunk of the dataset.
To maximize data loading throughput, chunks are made of contiguous data on disk if possible.

For iterable datasets:

If the dataset has a number of shards that is a factor of `world_size` (i.e. if `dataset.n_shards % world_size == 0`),
then the shards are evenly assigned across the nodes, which is the most optimized.
Otherwise, each node keeps 1 example out of `world_size`, skipping the other examples.

Args:
    dataset ([`Dataset`] or [`IterableDataset`]):
        The dataset to split by node.
    rank (`int`):
        Rank of the current node.
    world_size (`int`):
        Total number of nodes.

Returns:
    [`Dataset`] or [`IterableDataset`]: The dataset to be used on the node at rank `rank`.

---
## __name__
```python
from search import __name__
```



---
## MissingIndex
```python
from search import MissingIndex
```



---
## SearchResults
```python
from search import SearchResults
```



---
## BatchedSearchResults
```python
from search import BatchedSearchResults
```



---
## NearestExamplesResults
```python
from search import NearestExamplesResults
```



---
## BatchedNearestExamplesResults
```python
from search import BatchedNearestExamplesResults
```



---
## BaseIndex
```python
from search import BaseIndex
```

Base class for indexing

---
## ElasticSearchIndex
```python
from search import ElasticSearchIndex
```

Sparse index using Elasticsearch. It is used to index text and run queries based on BM25 similarity.
An Elasticsearch server needs to be accessible, and a python client is declared with
```
es_client = Elasticsearch([{'host': 'localhost', 'port': '9200'}])
```
for example.

---
## FaissIndex
```python
from search import FaissIndex
```

Dense index using Faiss. It is used to index vectors.
Faiss is a library for efficient similarity search and clustering of dense vectors.
It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM.
You can find more information about Faiss here:
- For index types and the string factory: https://github.com/facebookresearch/faiss/wiki/The-index-factory
- For GPU settings: https://github.com/facebookresearch/faiss/wiki/Faiss-on-the-GPU

---
## IndexableMixin
```python
from search import IndexableMixin
```

Add indexing features to `datasets.Dataset`

---
## search
```python
from search import search
```



---
## search_batch
```python
from search import search_batch
```

Find the nearest examples indices in the dataset to the query.

Args:
    index_name (`str`):
        The `index_name`/identifier of the index.
    queries (`Union[List[str], np.ndarray]`):
        The queries as a list of strings if `index_name` is a text index or as a numpy array if `index_name` is a vector index.
    k (`int`):
        The number of examples to retrieve per query.

Returns:
    `(total_scores, total_indices)`:
        A tuple of `(total_scores, total_indices)` where:
        - **total_scores** (`List[List[float]`): the retrieval scores from either FAISS (`IndexFlatL2` by default) or ElasticSearch of the retrieved examples per query
        - **total_indices** (`List[List[int]]`): the indices of the retrieved examples per query

---
## save
```python
from search import save
```

Serialize the FaissIndex on disk

---
## load
```python
from search import load
```

Deserialize the FaissIndex from disk

---
## __init__
```python
from search import __init__
```



---
## add_documents
```python
from search import add_documents
```

Add documents to the index.
If the documents are inside a certain column, you can specify it using the `column` argument.

---
## add_vectors
```python
from search import add_vectors
```

Add vectors to the index.
If the arrays are inside a certain column, you can specify it using the `column` argument.

---
## _faiss_index_to_device
```python
from search import _faiss_index_to_device
```

Sends a faiss index to a device.
A device can either be a positive integer (GPU id), a negative integer (all GPUs),
    or a list of positive integers (select GPUs to use), or `None` for CPU.

---
## __len__
```python
from search import __len__
```



---
## __getitem__
```python
from search import __getitem__
```



---
## is_index_initialized
```python
from search import is_index_initialized
```



---
## _check_index_is_initialized
```python
from search import _check_index_is_initialized
```



---
## list_indexes
```python
from search import list_indexes
```

List the `colindex_nameumns`/identifiers of all the attached indexes.

---
## get_index
```python
from search import get_index
```

List the `index_name`/identifiers of all the attached indexes.

Args:
    index_name (`str`): Index name.

Returns:
    [`BaseIndex`]

---
## add_faiss_index
```python
from search import add_faiss_index
```

Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of the specified column.
You can specify `device` if you want to run it on GPU (`device` must be the GPU index, see more below).
You can find more information about Faiss here:
- For `string factory`: https://github.com/facebookresearch/faiss/wiki/The-index-factory

Args:
    column (`str`): The column of the vectors to add to the index.
    index_name (Optional `str`): The index_name/identifier of the index. This is the index_name that is used to call `.get_nearest` or `.search`.
        By default it corresponds to `column`.
    device (Optional `Union[int, List[int]]`): If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
        If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.
    string_factory (Optional `str`): This is passed to the index factory of Faiss to create the index. Default index class is IndexFlatIP.
    metric_type (Optional `int`): Type of metric. Ex: `faiss.METRIC_INNER_PRODUCT` or `faiss.METRIC_L2`.
    custom_index (Optional `faiss.Index`): Custom Faiss index that you already have instantiated and configured for your needs.
    batch_size (Optional `int`): Size of the batch to use while adding vectors to the FaissIndex. Default value is 1000.
        <Added version="2.4.0"/>
    train_size (Optional `int`): If the index needs a training step, specifies how many vectors will be used to train the index.
    faiss_verbose (`bool`, defaults to False): Enable the verbosity of the Faiss index.

---
## add_faiss_index_from_external_arrays
```python
from search import add_faiss_index_from_external_arrays
```

Add a dense index using Faiss for fast retrieval.
The index is created using the vectors of `external_arrays`.
You can specify `device` if you want to run it on GPU (`device` must be the GPU index).
You can find more information about Faiss here:
- For `string factory`: https://github.com/facebookresearch/faiss/wiki/The-index-factory

Args:
    external_arrays (`np.array`): If you want to use arrays from outside the lib for the index, you can set `external_arrays`.
        It will use `external_arrays` to create the Faiss index instead of the arrays in the given `column`.
    index_name (`str`): The index_name/identifier of the index. This is the index_name that is used to call `.get_nearest` or `.search`.
    device (Optional `Union[int, List[int]]`): If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
        If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.
    string_factory (Optional `str`): This is passed to the index factory of Faiss to create the index. Default index class is IndexFlatIP.
    metric_type (Optional `int`): Type of metric. Ex: `faiss.METRIC_INNER_PRODUCT` or `faiss.METRIC_L2`.
    custom_index (Optional `faiss.Index`): Custom Faiss index that you already have instantiated and configured for your needs.
    batch_size (Optional `int`): Size of the batch to use while adding vectors to the FaissIndex. Default value is 1000.
        <Added version="2.4.0"/>
    train_size (Optional `int`): If the index needs a training step, specifies how many vectors will be used to train the index.
    faiss_verbose (`bool`, defaults to False): Enable the verbosity of the Faiss index.

---
## save_faiss_index
```python
from search import save_faiss_index
```

Save a FaissIndex on disk.

Args:
    index_name (`str`): The index_name/identifier of the index. This is the index_name that is used to call `.get_nearest` or `.search`.
    file (`str`): The path to the serialized faiss index on disk or remote URI (e.g. `"s3://my-bucket/index.faiss"`).
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.11.0"/>

---
## load_faiss_index
```python
from search import load_faiss_index
```

Load a FaissIndex from disk.

If you want to do additional configurations, you can have access to the faiss index object by doing
`.get_index(index_name).faiss_index` to make it fit your needs.

Args:
    index_name (`str`): The index_name/identifier of the index. This is the index_name that is used to
        call `.get_nearest` or `.search`.
    file (`str`): The path to the serialized faiss index on disk or remote URI (e.g. `"s3://my-bucket/index.faiss"`).
    device (Optional `Union[int, List[int]]`): If positive integer, this is the index of the GPU to use. If negative integer, use all GPUs.
        If a list of positive integers is passed in, run only on those GPUs. By default it uses the CPU.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.11.0"/>

---
## add_elasticsearch_index
```python
from search import add_elasticsearch_index
```

Add a text index using ElasticSearch for fast retrieval.

Args:
    column (`str`): The column of the documents to add to the index.
    index_name (Optional `str`): The index_name/identifier of the index. This is the index name that is used to call `.get_nearest` or `.search`.
        By default it corresponds to `column`.
    host (Optional `str`, defaults to localhost):
        host of where ElasticSearch is running
    port (Optional `str`, defaults to 9200):
        port of where ElasticSearch is running
    es_client (Optional `elasticsearch.Elasticsearch`):
        The elasticsearch client used to create the index if host and port are None.
    es_index_name (Optional `str`): The elasticsearch index name used to create the index.
    es_index_config (Optional `dict`):
        The configuration of the elasticsearch index.
        Default config is:

Config::

    {
        "settings": {
            "number_of_shards": 1,
            "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}},
        },
        "mappings": {
            "properties": {
                "text": {
                    "type": "text",
                    "analyzer": "standard",
                    "similarity": "BM25"
                },
            }
        },
    }

---
## load_elasticsearch_index
```python
from search import load_elasticsearch_index
```

Load an existing text index using ElasticSearch for fast retrieval.

Args:
    index_name (`str`):
        The `index_name`/identifier of the index. This is the index name that is used to call `get_nearest` or `search`.
    es_index_name (`str`):
        The name of elasticsearch index to load.
    host (`str`, *optional*, defaults to `localhost`):
        Host of where ElasticSearch is running.
    port (`str`, *optional*, defaults to `9200`):
        Port of where ElasticSearch is running.
    es_client (`elasticsearch.Elasticsearch`, *optional*):
        The elasticsearch client used to create the index if host and port are `None`.
    es_index_config (`dict`, *optional*):
        The configuration of the elasticsearch index.
        Default config is:
            ```
            {
                "settings": {
                    "number_of_shards": 1,
                    "analysis": {"analyzer": {"stop_standard": {"type": "standard", " stopwords": "_english_"}}},
                },
                "mappings": {
                    "properties": {
                        "text": {
                            "type": "text",
                            "analyzer": "standard",
                            "similarity": "BM25"
                        },
                    }
                },
            }
            ```

---
## drop_index
```python
from search import drop_index
```

Drop the index with the specified column.

Args:
    index_name (`str`):
        The `index_name`/identifier of the index.

---
## get_nearest_examples
```python
from search import get_nearest_examples
```

Find the nearest examples in the dataset to the query.

Args:
    index_name (`str`):
        The index_name/identifier of the index.
    query (`Union[str, np.ndarray]`):
        The query as a string if `index_name` is a text index or as a numpy array if `index_name` is a vector index.
    k (`int`):
        The number of examples to retrieve.

Returns:
    `(scores, examples)`:
        A tuple of `(scores, examples)` where:
        - **scores** (`List[float]`): the retrieval scores from either FAISS (`IndexFlatL2` by default) or ElasticSearch of the retrieved examples
        - **examples** (`dict`): the retrieved examples

---
## get_nearest_examples_batch
```python
from search import get_nearest_examples_batch
```

Find the nearest examples in the dataset to the query.

Args:
    index_name (`str`):
        The `index_name`/identifier of the index.
    queries (`Union[List[str], np.ndarray]`):
        The queries as a list of strings if `index_name` is a text index or as a numpy array if `index_name` is a vector index.
    k (`int`):
        The number of examples to retrieve per query.

Returns:
    `(total_scores, total_examples)`:
        A tuple of `(total_scores, total_examples)` where:
        - **total_scores** (`List[List[float]`): the retrieval scores from either FAISS (`IndexFlatL2` by default) or ElasticSearch of the retrieved examples per query
        - **total_examples** (`List[dict]`): the retrieved examples per query

---
## passage_generator
```python
from search import passage_generator
```



---
## DatasetsError
```python
from exceptions import DatasetsError
```

Base class for exceptions in this library.

---
## DefunctDatasetError
```python
from exceptions import DefunctDatasetError
```

The dataset has been defunct.

---
## FileNotFoundDatasetsError
```python
from exceptions import FileNotFoundDatasetsError
```

FileNotFoundError raised by this library.

---
## DataFilesNotFoundError
```python
from exceptions import DataFilesNotFoundError
```

No (supported) data files found.

---
## DatasetNotFoundError
```python
from exceptions import DatasetNotFoundError
```

Dataset not found.

Raised when trying to access:
- a missing dataset, or
- a private/gated dataset and the user is not authenticated.

---
## DatasetBuildError
```python
from exceptions import DatasetBuildError
```



---
## ManualDownloadError
```python
from exceptions import ManualDownloadError
```



---
## FileFormatError
```python
from exceptions import FileFormatError
```



---
## DatasetGenerationError
```python
from exceptions import DatasetGenerationError
```



---
## DatasetGenerationCastError
```python
from exceptions import DatasetGenerationCastError
```



---
## ChecksumVerificationError
```python
from exceptions import ChecksumVerificationError
```

Error raised during checksums verifications of downloaded files.

---
## UnexpectedDownloadedFileError
```python
from exceptions import UnexpectedDownloadedFileError
```

Some downloaded files were not expected.

---
## ExpectedMoreDownloadedFilesError
```python
from exceptions import ExpectedMoreDownloadedFilesError
```

Some files were supposed to be downloaded but were not.

---
## NonMatchingChecksumError
```python
from exceptions import NonMatchingChecksumError
```

The downloaded file checksum don't match the expected checksum.

---
## SplitsVerificationError
```python
from exceptions import SplitsVerificationError
```

Error raised during splits verifications.

---
## UnexpectedSplitsError
```python
from exceptions import UnexpectedSplitsError
```

The expected splits of the downloaded file is missing.

---
## ExpectedMoreSplitsError
```python
from exceptions import ExpectedMoreSplitsError
```

Some recorded splits are missing.

---
## NonMatchingSplitsSizesError
```python
from exceptions import NonMatchingSplitsSizesError
```

The splits sizes don't match the expected splits sizes.

---
## from_cast_error
```python
from exceptions import from_cast_error
```



---
## __name__
```python
from splits import __name__
```

Splits related API.

---
## SplitInfo
```python
from splits import SplitInfo
```



---
## SubSplitInfo
```python
from splits import SubSplitInfo
```

Wrapper around a sub split info.
This class expose info on the subsplit:
```
ds, info = datasets.load_dataset(..., split='train[75%:]', with_info=True)
info.splits['train[75%:]'].num_examples
```

---
## SplitBase
```python
from splits import SplitBase
```

Abstract base class for Split compositionality.

See the
[guide on splits](../loading#slice-splits)
for more information.

There are three parts to the composition:
    1) The splits are composed (defined, merged, split,...) together before
         calling the `.as_dataset()` function. This is done with the `__add__`,
         `__getitem__`, which return a tree of `SplitBase` (whose leaf
         are the `NamedSplit` objects)

    ```
    split = datasets.Split.TRAIN + datasets.Split.TEST.subsplit(datasets.percent[:50])
    ```

    2) The `SplitBase` is forwarded to the `.as_dataset()` function
         to be resolved into actual read instruction. This is done by the
         `.get_read_instruction()` method which takes the real dataset splits
         (name, number of shards,...) and parse the tree to return a
         `SplitReadInstruction()` object

    ```
    read_instruction = split.get_read_instruction(self.info.splits)
    ```

    3) The `SplitReadInstruction` is then used in the `tf.data.Dataset` pipeline
         to define which files to read and how to skip examples within file.

---
## PercentSliceMeta
```python
from splits import PercentSliceMeta
```



---
## PercentSlice
```python
from splits import PercentSlice
```

Syntactic sugar for defining slice subsplits: `datasets.percent[75:-5]`.

See the
[guide on splits](../loading#slice-splits)
for more information.

---
## _SplitMerged
```python
from splits import _SplitMerged
```

Represent two split descriptors merged together.

---
## _SubSplit
```python
from splits import _SubSplit
```

Represent a sub split of a split descriptor.

---
## NamedSplit
```python
from splits import NamedSplit
```

Descriptor corresponding to a named split (train, test, ...).

Example:
    Each descriptor can be composed with other using addition or slice:

        ```py
        split = datasets.Split.TRAIN.subsplit(datasets.percent[0:25]) + datasets.Split.TEST
        ```

    The resulting split will correspond to 25% of the train split merged with
    100% of the test split.

    A split cannot be added twice, so the following will fail:

        ```py
        split = (
                datasets.Split.TRAIN.subsplit(datasets.percent[:25]) +
                datasets.Split.TRAIN.subsplit(datasets.percent[75:])
        )  # Error
        split = datasets.Split.TEST + datasets.Split.ALL  # Error
        ```

    The slices can be applied only one time. So the following are valid:

        ```py
        split = (
                datasets.Split.TRAIN.subsplit(datasets.percent[:25]) +
                datasets.Split.TEST.subsplit(datasets.percent[:50])
        )
        split = (datasets.Split.TRAIN + datasets.Split.TEST).subsplit(datasets.percent[:50])
        ```

    But this is not valid:

        ```py
        train = datasets.Split.TRAIN
        test = datasets.Split.TEST
        split = train.subsplit(datasets.percent[:25]).subsplit(datasets.percent[:25])
        split = (train.subsplit(datasets.percent[:25]) + test).subsplit(datasets.percent[:50])
        ```

---
## NamedSplitAll
```python
from splits import NamedSplitAll
```

Split corresponding to the union of all defined dataset splits.

---
## Split
```python
from splits import Split
```

`Enum` for dataset splits.

Datasets are typically split into different subsets to be used at various
stages of training and evaluation.

- `TRAIN`: the training data.
- `VALIDATION`: the validation data. If present, this is typically used as
  evaluation data while iterating on a model (e.g. changing hyperparameters,
  model architecture, etc.).
- `TEST`: the testing data. This is the data to report metrics on. Typically
  you do not want to use this during model iteration as you may overfit to it.
- `ALL`: the union of all defined dataset splits.

All splits, including compositions inherit from `datasets.SplitBase`.

See the [guide](../load_hub#splits) on splits for more information.

Example:

```py
>>> datasets.SplitGenerator(
...     name=datasets.Split.TRAIN,
...     gen_kwargs={"split_key": "train", "files": dl_manager.download_and extract(url)},
... ),
... datasets.SplitGenerator(
...     name=datasets.Split.VALIDATION,
...     gen_kwargs={"split_key": "validation", "files": dl_manager.download_and extract(url)},
... ),
... datasets.SplitGenerator(
...     name=datasets.Split.TEST,
...     gen_kwargs={"split_key": "test", "files": dl_manager.download_and extract(url)},
... )
```

---
## SplitReadInstruction
```python
from splits import SplitReadInstruction
```

Object containing the reading instruction for the dataset.

Similarly to `SplitDescriptor` nodes, this object can be composed with itself,
but the resolution happens instantaneously, instead of keeping track of the
tree, such as all instructions are compiled and flattened in a single
SplitReadInstruction object containing the list of files and slice to use.

Once resolved, the instructions can be accessed with:

```
read_instructions.get_list_sliced_split_info()  # List of splits to use
```

---
## SplitDict
```python
from splits import SplitDict
```

Split info object.

---
## SplitGenerator
```python
from splits import SplitGenerator
```

Defines the split information for the generator.

This should be used as returned value of
`GeneratorBasedBuilder._split_generators`.
See `GeneratorBasedBuilder._split_generators` for more info and example
of usage.

Args:
    name (`str`):
        Name of the `Split` for which the generator will
        create the examples.
    **gen_kwargs (additional keyword arguments):
        Keyword arguments to forward to the `DatasetBuilder._generate_examples` method
        of the builder.

Example:

```py
>>> datasets.SplitGenerator(
...     name=datasets.Split.TRAIN,
...     gen_kwargs={"split_key": "train", "files": dl_manager.download_and_extract(url)},
... )
```

---
## file_instructions
```python
from splits import file_instructions
```

Returns the list of dict(filename, take, skip).

---
## num_examples
```python
from splits import num_examples
```

Returns the number of example in the subsplit.

---
## get_read_instruction
```python
from splits import get_read_instruction
```



---
## __eq__
```python
from splits import __eq__
```

Equality: datasets.Split.TRAIN == 'train'.

---
## __ne__
```python
from splits import __ne__
```

InEquality: datasets.Split.TRAIN != 'test'.

---
## __add__
```python
from splits import __add__
```

Merging split together.

---
## subsplit
```python
from splits import subsplit
```

Divides this split into subsplits.

There are 3 ways to define subsplits, which correspond to the 3
arguments `k` (get `k` even subsplits), `percent` (get a slice of the
dataset with `datasets.percent`), and `weighted` (get subsplits with proportions
specified by `weighted`).

Example::

```
# 50% train, 50% test
train, test = split.subsplit(k=2)
# 50% train, 25% test, 25% validation
train, test, validation = split.subsplit(weighted=[2, 1, 1])
# Extract last 20%
subsplit = split.subsplit(datasets.percent[-20:])
```

Warning: k and weighted will be converted into percent which mean that
values below the percent will be rounded up or down. The final split may be
bigger to deal with remainders. For instance:

```
train, test, valid = split.subsplit(k=3)  # 33%, 33%, 34%
s1, s2, s3, s4 = split.subsplit(weighted=[2, 2, 1, 1])  # 33%, 33%, 16%, 18%
```

Args:
    arg: If no kwargs are given, `arg` will be interpreted as one of
        `k`, `percent`, or `weighted` depending on the type.
        For example:
        ```
        split.subsplit(10)  # Equivalent to split.subsplit(k=10)
        split.subsplit(datasets.percent[:-20])  # percent=datasets.percent[:-20]
        split.subsplit([1, 1, 2])  # weighted=[1, 1, 2]
        ```
    k: `int` If set, subdivide the split into `k` equal parts.
    percent: `datasets.percent slice`, return a single subsplit corresponding to
        a slice of the original split. For example:
        `split.subsplit(datasets.percent[-20:])  # Last 20% of the dataset`.
    weighted: `list[int]`, return a list of subsplits whose proportions match
        the normalized sum of the list. For example:
        `split.subsplit(weighted=[1, 1, 2])  # 25%, 25%, 50%`.

Returns:
    A subsplit or list of subsplits extracted from this split object.

---
## __getitem__
```python
from splits import __getitem__
```



---
## __init__
```python
from splits import __init__
```



---
## __repr__
```python
from splits import __repr__
```



---
## __str__
```python
from splits import __str__
```



---
## __lt__
```python
from splits import __lt__
```



---
## __hash__
```python
from splits import __hash__
```



---
## __new__
```python
from splits import __new__
```

Create a custom split with datasets.Split('custom_name').

---
## add
```python
from splits import add
```

Add the split info.

---
## get_list_sliced_split_info
```python
from splits import get_list_sliced_split_info
```



---
## __setitem__
```python
from splits import __setitem__
```



---
## total_num_examples
```python
from splits import total_num_examples
```

Return the total number of examples.

---
## from_split_dict
```python
from splits import from_split_dict
```

Returns a new SplitDict initialized from a Dict or List of `split_infos`.

---
## to_split_dict
```python
from splits import to_split_dict
```

Returns a list of SplitInfo protos that we have.

---
## copy
```python
from splits import copy
```



---
## _to_yaml_list
```python
from splits import _to_yaml_list
```



---
## _from_yaml_list
```python
from splits import _from_yaml_list
```



---
## __post_init__
```python
from splits import __post_init__
```



---
## assert_slices_coverage
```python
from splits import assert_slices_coverage
```



---
## __name__
```python
from table import __name__
```



---
## inject_arrow_table_documentation
```python
from table import inject_arrow_table_documentation
```



---
## _in_memory_arrow_table_from_file
```python
from table import _in_memory_arrow_table_from_file
```



---
## _in_memory_arrow_table_from_buffer
```python
from table import _in_memory_arrow_table_from_buffer
```



---
## _memory_mapped_record_batch_reader_from_file
```python
from table import _memory_mapped_record_batch_reader_from_file
```



---
## read_schema_from_file
```python
from table import read_schema_from_file
```

Infer arrow table schema from file without loading whole file into memory.
Usefull especially while having very big files.

---
## _memory_mapped_arrow_table_from_file
```python
from table import _memory_mapped_arrow_table_from_file
```



---
## _deepcopy
```python
from table import _deepcopy
```

deepcopy a regular class instance

---
## _interpolation_search
```python
from table import _interpolation_search
```

Return the position i of a sorted array so that arr[i] <= x < arr[i+1]

Args:
    arr (`List[int]`): non-empty sorted list of integers
    x (`int`): query

Returns:
    `int`: the position i so that arr[i] <= x < arr[i+1]

Raises:
    `IndexError`: if the array is empty or if the query is outside the array values

---
## IndexedTableMixin
```python
from table import IndexedTableMixin
```



---
## Table
```python
from table import Table
```

A console renderable to draw a table.

Args:
    *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
    title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
    caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
    width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
    min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
    box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
    safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
    padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
    pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
    show_header (bool, optional): Show a header row. Defaults to True.
    show_footer (bool, optional): Show a footer row. Defaults to False.
    show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
    show_lines (bool, optional): Draw lines between every row. Defaults to False.
    leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
    style (Union[str, Style], optional): Default style for the table. Defaults to "none".
    row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
    header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
    footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
    border_style (Union[str, Style], optional): Style of the border. Defaults to None.
    title_style (Union[str, Style], optional): Style of the title. Defaults to None.
    caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
    title_justify (str, optional): Justify method for title. Defaults to "center".
    caption_justify (str, optional): Justify method for caption. Defaults to "center".
    highlight (bool, optional): Highlight cell contents (if str). Defaults to False.

---
## TableBlock
```python
from table import TableBlock
```

`TableBlock` is the allowed class inside a `ConcanetationTable`.
Only `MemoryMappedTable` and `InMemoryTable` are `TableBlock`.
This is because we don't want a `ConcanetationTable` made out of other `ConcanetationTables`.

---
## InMemoryTable
```python
from table import InMemoryTable
```

The table is said in-memory when it is loaded into the user's RAM.

Pickling it does copy all the data using memory.
Its implementation is simple and uses the underlying pyarrow Table methods directly.

This is different from the `MemoryMapped` table, for which pickling doesn't copy all the
data in memory. For a `MemoryMapped`, unpickling instead reloads the table from the disk.

`InMemoryTable` must be used when data fit in memory, while `MemoryMapped` are reserved for
data bigger than memory or when you want the memory footprint of your application to
stay low.

---
## MemoryMappedTable
```python
from table import MemoryMappedTable
```

The table is said memory mapped when it doesn't use the user's RAM but loads the data
from the disk instead.

Pickling it doesn't copy the data into memory.
Instead, only the path to the memory mapped arrow file is pickled, as well as the list
of transforms to "replay" when reloading the table from the disk.

Its implementation requires to store an history of all the transforms that were applied
to the underlying pyarrow Table, so that they can be "replayed" when reloading the Table
from the disk.

This is different from the `InMemoryTable` table, for which pickling does copy all the
data in memory.

`InMemoryTable` must be used when data fit in memory, while `MemoryMapped` are reserved for
data bigger than memory or when you want the memory footprint of your application to
stay low.

---
## ConcatenationTable
```python
from table import ConcatenationTable
```

The table comes from the concatenation of several tables called blocks.
It enables concatenation on both axis 0 (append rows) and axis 1 (append columns).

The underlying tables are called "blocks" and can be either `InMemoryTable`
or `MemoryMappedTable` objects.
This allows to combine tables that come from memory or that are memory mapped.
When a `ConcatenationTable` is pickled, then each block is pickled:
- the `InMemoryTable` objects are pickled by copying all the data in memory.
- the MemoryMappedTable objects are pickled without copying the data into memory.
Instead, only the path to the memory mapped arrow file is pickled, as well as the list
of transforms to "replays" when reloading the table from the disk.

Its implementation requires to store each block separately.
The `blocks` attributes stores a list of list of blocks.
The first axis concatenates the tables along the axis 0 (it appends rows),
while the second axis concatenates tables along the axis 1 (it appends columns).

If some columns are missing when concatenating on axis 0, they are filled with null values.
This is done using `pyarrow.concat_tables(tables, promote=True)`.

You can access the fully combined table by accessing the `ConcatenationTable.table` attribute,
and the blocks by accessing the `ConcatenationTable.blocks` attribute.

---
## concat_tables
```python
from table import concat_tables
```

Concatenate tables.

Args:
    tables (list of `Table`):
        List of tables to be concatenated.
    axis (`{0, 1}`, defaults to `0`, meaning over rows):
        Axis to concatenate over, where `0` means over rows (vertically) and `1` means over columns
        (horizontally).

        <Added version="1.6.0"/>
Returns:
    `datasets.table.Table`:
        If the number of input tables is > 1, then the returned table is a `datasets.table.ConcatenationTable`.
        Otherwise if there's only one table, it is returned as is.

---
## list_table_cache_files
```python
from table import list_table_cache_files
```

Get the cache files that are loaded by the table.
Cache file are used when parts of the table come from the disk via memory mapping.

Returns:
    `List[str]`:
        A list of paths to the cache files loaded by the table.

---
## _wrap_for_chunked_arrays
```python
from table import _wrap_for_chunked_arrays
```

Apply the function on each chunk of a `pyarrow.ChunkedArray`, or on the array directly

---
## _are_list_values_of_length
```python
from table import _are_list_values_of_length
```

Check if all the sub-lists of a `pa.ListArray` have the specified length.

---
## _combine_list_array_offsets_with_mask
```python
from table import _combine_list_array_offsets_with_mask
```

Add the null bitmap to the offsets of a `pa.ListArray`.

---
## _storage_type
```python
from table import _storage_type
```

Convert a (possibly nested) `pa.ExtensionType` to its storage type.

---
## _short_str
```python
from table import _short_str
```



---
## array_cast
```python
from table import array_cast
```

Improved version of `pa.Array.cast`

It supports casting `pa.StructArray` objects to re-order the fields.
It also let you control certain aspects of the casting, e.g. whether
to disable casting primitives (`booleans`, `floats` or `ints`) or
disable casting decimals to strings.

Args:
    array (`pa.Array`):
        PyArrow array to cast
    pa_type (`pa.DataType`):
        Target PyArrow type
    allow_primitive_to_str (`bool`, defaults to `True`):
        Whether to allow casting primitives to strings.
        Defaults to `True`.
    allow_decimal_to_str (`bool`, defaults to `True`):
        Whether to allow casting decimals to strings.
        Defaults to `True`.

Raises:
    `pa.ArrowInvalidError`: if the arrow data casting fails
    `TypeError`: if the target type is not supported according, e.g.

        - if a field is missing
        - if casting from primitives to strings and `allow_primitive_to_str` is `False`
        - if casting from decimals to strings and `allow_decimal_to_str` is `False`

Returns:
    `List[pyarrow.Array]`: the casted array

---
## cast_array_to_feature
```python
from table import cast_array_to_feature
```

Cast an array to the arrow type that corresponds to the requested feature type.
For custom features like [`Audio`] or [`Image`], it takes into account the "cast_storage" methods
they defined to enable casting from other arrow types.

Args:
    array (`pa.Array`):
        The PyArrow array to cast.
    feature (`datasets.features.FeatureType`):
        The target feature type.
    allow_primitive_to_str (`bool`, defaults to `True`):
        Whether to allow casting primitives to strings.
        Defaults to `True`.
    allow_decimal_to_str (`bool`, defaults to `True`):
        Whether to allow casting decimals to strings.
        Defaults to `True`.

Raises:
    `pa.ArrowInvalidError`: if the arrow data casting fails
    `TypeError`: if the target type is not supported according, e.g.

        - if a field is missing
        - if casting from primitives and `allow_primitive_to_str` is `False`
        - if casting from decimals and `allow_decimal_to_str` is `False`

Returns:
    array (`pyarrow.Array`): the casted array

---
## embed_array_storage
```python
from table import embed_array_storage
```

Embed data into an arrays's storage.
For custom features like Audio or Image, it takes into account the "embed_storage" methods
they define to embed external data (e.g. an image file) into an array.

<Added version="2.4.0"/>

Args:
    array (`pa.Array`):
        The PyArrow array in which to embed data.
    feature (`datasets.features.FeatureType`):
        Array features.

Raises:
    `TypeError`: if the target type is not supported according, e.g.

        - if a field is missing

Returns:
     array (`pyarrow.Array`): the casted array

---
## CastError
```python
from table import CastError
```

When it's not possible to cast an Arrow table to a specific schema or set of features

---
## cast_table_to_features
```python
from table import cast_table_to_features
```

Cast a table to the arrow schema that corresponds to the requested features.

Args:
    table (`pyarrow.Table`):
        PyArrow table to cast.
    features ([`Features`]):
        Target features.

Returns:
    table (`pyarrow.Table`): the casted table

---
## cast_table_to_schema
```python
from table import cast_table_to_schema
```

Cast a table to the arrow schema. Different from `cast_table_to_features`, this method can preserve nullability.

Args:
    table (`pa.Table`):
        PyArrow table to cast.
    features ([`Features`]):
        Target features.

Returns:
    `pa.Table`: the casted table

---
## embed_table_storage
```python
from table import embed_table_storage
```

Embed external data into a table's storage.

<Added version="2.4.0"/>

Args:
    table (`pyarrow.Table`):
        PyArrow table in which to embed data.

Returns:
    table (`pyarrow.Table`): the table with embedded data

---
## table_cast
```python
from table import table_cast
```

Improved version of `pa.Table.cast`.

It supports casting to feature types stored in the schema metadata.

Args:
    table (`pyarrow.Table`):
        PyArrow table to cast.
    schema (`pyarrow.Schema`):
        Target PyArrow schema.

Returns:
    table (`pyarrow.Table`): the casted table

---
## table_flatten
```python
from table import table_flatten
```

Improved version of `pa.Table.flatten`.

It behaves as `pa.Table.flatten` in a sense it does 1-step flatten of the columns with a struct type into one column per struct field,
but updates the metadata and skips decodable features unless the `decode` attribute of these features is set to False.

Args:
    table (`pa.Table`):
        PyArrow table to flatten.

Returns:
    `Table`: the flattened table

---
## table_visitor
```python
from table import table_visitor
```

Visit all arrays in a table and apply a function to them.

Args:
    table (`pyarrow.Table`):
        PyArrow table to visit.
    function (`Callable[[pa.Array], None]`):
        Function to apply to each array.

---
## table_iter
```python
from table import table_iter
```

Iterate over sub-tables of size `batch_size`.

Args:
    table (`pyarrow.Table`):
        PyArrow table to iterate over.
    batch_size (`int`):
        Size of each sub-table to yield.
    drop_last_batch (`bool`, defaults to `False`):
        Drop the last batch if it is smaller than `batch_size`.

---
## wrapper
```python
from table import wrapper
```



---
## __init__
```python
from table import __init__
```



---
## fast_gather
```python
from table import fast_gather
```

Create a pa.Table by gathering the records at the records at the specified indices. Should be faster
than pa.concat_tables(table.fast_slice(int(i) % table.num_rows, 1) for i in indices) since NumPy can compute
the binary searches in parallel, highly optimized C

---
## fast_slice
```python
from table import fast_slice
```

Slice the Table using interpolation search.
The behavior is the same as `pyarrow.Table.slice` but it's significantly faster.

Interpolation search is used to find the start and end indexes of the batches we want to keep.
The batches to keep are then concatenated to form the sliced Table.

---
## __deepcopy__
```python
from table import __deepcopy__
```



---
## validate
```python
from table import validate
```

Perform validation checks.  An exception is raised if validation fails.

By default only cheap validation checks are run.  Pass `full=True`
for thorough validation checks (potentially `O(n)`).

Args:
    full (`bool`, defaults to `False`):
        If `True`, run expensive checks, otherwise cheap checks only.

Raises:
    `pa.lib.ArrowInvalid`: if validation fails

---
## equals
```python
from table import equals
```

Check if contents of two tables are equal.

Args:
    other ([`~datasets.table.Table`]):
        Table to compare against.
    check_metadata `bool`, defaults to `False`):
        Whether schema metadata equality should be checked as well.

Returns:
    `bool`

---
## to_batches
```python
from table import to_batches
```

Convert Table to list of (contiguous) `RecordBatch` objects.

Args:
    max_chunksize (`int`, defaults to `None`):
        Maximum size for `RecordBatch` chunks. Individual chunks may be
        smaller depending on the chunk layout of individual columns.

Returns:
    `List[pyarrow.RecordBatch]`

---
## to_pydict
```python
from table import to_pydict
```

Convert the Table to a `dict` or `OrderedDict`.

Returns:
    `dict`

---
## to_pylist
```python
from table import to_pylist
```

Convert the Table to a list

Returns:
    `list`

---
## to_pandas
```python
from table import to_pandas
```

Convert to a pandas-compatible NumPy array or DataFrame, as appropriate.

Args:
    memory_pool (`MemoryPool`, defaults to `None`):
        Arrow MemoryPool to use for allocations. Uses the default memory
        pool is not passed.
    strings_to_categorical (`bool`, defaults to `False`):
        Encode string (UTF8) and binary types to `pandas.Categorical`.
    categories (`list`, defaults to `empty`):
        List of fields that should be returned as `pandas.Categorical`. Only
        applies to table-like data structures.
    zero_copy_only (`bool`, defaults to `False`):
        Raise an `ArrowException` if this function call would require copying
        the underlying data.
    integer_object_nulls (`bool`, defaults to `False`):
        Cast integers with nulls to objects.
    date_as_object (`bool`, defaults to `True`):
        Cast dates to objects. If `False`, convert to `datetime64[ns]` dtype.
    timestamp_as_object (`bool`, defaults to `False`):
        Cast non-nanosecond timestamps (`np.datetime64`) to objects. This is
        useful if you have timestamps that don't fit in the normal date
        range of nanosecond timestamps (1678 CE-2262 CE).
        If `False`, all timestamps are converted to `datetime64[ns]` dtype.
    use_threads (`bool`, defaults to `True`):
        Whether to parallelize the conversion using multiple threads.
    deduplicate_objects (`bool`, defaults to `False`):
        Do not create multiple copies Python objects when created, to save
        on memory use. Conversion will be slower.
    ignore_metadata (`bool`, defaults to `False`):
        If `True`, do not use the 'pandas' metadata to reconstruct the
        DataFrame index, if present.
    safe (`bool`, defaults to `True`):
        For certain data types, a cast is needed in order to store the
        data in a pandas DataFrame or Series (e.g. timestamps are always
        stored as nanoseconds in pandas). This option controls whether it
        is a safe cast or not.
    split_blocks (`bool`, defaults to `False`):
        If `True`, generate one internal "block" for each column when
        creating a pandas.DataFrame from a `RecordBatch` or `Table`. While this
        can temporarily reduce memory note that various pandas operations
        can trigger "consolidation" which may balloon memory use.
    self_destruct (`bool`, defaults to `False`):
        EXPERIMENTAL: If `True`, attempt to deallocate the originating Arrow
        memory while converting the Arrow object to pandas. If you use the
        object after calling `to_pandas` with this option it will crash your
        program.
    types_mapper (`function`, defaults to `None`):
        A function mapping a pyarrow DataType to a pandas `ExtensionDtype`.
        This can be used to override the default pandas type for conversion
        of built-in pyarrow types or in absence of `pandas_metadata` in the
        Table schema. The function receives a pyarrow DataType and is
        expected to return a pandas `ExtensionDtype` or `None` if the
        default conversion should be used for that type. If you have
        a dictionary mapping, you can pass `dict.get` as function.

Returns:
    `pandas.Series` or `pandas.DataFrame`: `pandas.Series` or `pandas.DataFrame` depending on type of object

---
## to_string
```python
from table import to_string
```



---
## to_reader
```python
from table import to_reader
```

Convert the Table to a RecordBatchReader.

Note that this method is zero-copy, it merely exposes the same data under a different API.

Args:
    max_chunksize (`int`, defaults to `None`)
        Maximum size for RecordBatch chunks. Individual chunks may be smaller depending
        on the chunk layout of individual columns.

Returns:
    `pyarrow.RecordBatchReader`

---
## field
```python
from table import field
```

Select a schema field by its column name or numeric index.

Args:
    i (`Union[int, str]`):
        The index or name of the field to retrieve.

Returns:
    `pyarrow.Field`

---
## column
```python
from table import column
```

Select a column by its column name, or numeric index.

Args:
    i (`Union[int, str]`):
        The index or name of the column to retrieve.

Returns:
    `pyarrow.ChunkedArray`

---
## itercolumns
```python
from table import itercolumns
```

Iterator over all columns in their numerical order.

Yields:
    `pyarrow.ChunkedArray`

---
## schema
```python
from table import schema
```

Schema of the table and its columns.

Returns:
    `pyarrow.Schema`

---
## columns
```python
from table import columns
```

List of all columns in numerical order.

Returns:
    `List[pa.ChunkedArray]`

---
## num_columns
```python
from table import num_columns
```

Number of columns in this table.

Returns:
    int

---
## num_rows
```python
from table import num_rows
```

Number of rows in this table.

Due to the definition of a table, all columns have the same number of
rows.

Returns:
    int

---
## shape
```python
from table import shape
```

Dimensions of the table: (#rows, #columns).

Returns:
    `(int, int)`: Number of rows and number of columns.

---
## nbytes
```python
from table import nbytes
```

Total number of bytes consumed by the elements of the table.

---
## column_names
```python
from table import column_names
```

Names of the table's columns.

---
## __eq__
```python
from table import __eq__
```



---
## __getitem__
```python
from table import __getitem__
```

Retrieve a custom cell from a given position.

---
## __len__
```python
from table import __len__
```



---
## __repr__
```python
from table import __repr__
```



---
## __str__
```python
from table import __str__
```



---
## slice
```python
from table import slice
```

Compute zero-copy slice of this Table.

Args:
    offset (`int`, defaults to `0`):
        Offset from start of table to slice.
    length (`int`, defaults to `None`):
        Length of slice (default is until end of table starting from
        offset).

Returns:
    `datasets.table.Table`

---
## filter
```python
from table import filter
```

Select records from a Table. See `pyarrow.compute.filter` for full usage.

---
## flatten
```python
from table import flatten
```

Flatten this Table.  Each column with a struct type is flattened
into one column per struct field.  Other columns are left unchanged.

Args:
    memory_pool (`MemoryPool`, defaults to `None`):
        For memory allocations, if required, otherwise use default pool.

Returns:
    `datasets.table.Table`

---
## combine_chunks
```python
from table import combine_chunks
```

Make a new table by combining the chunks this table has.

All the underlying chunks in the `ChunkedArray` of each column are
concatenated into zero or one chunk.

Args:
    memory_pool (`MemoryPool`, defaults to `None`):
        For memory allocations, if required, otherwise use default pool.

Returns:
    `datasets.table.Table`

---
## cast
```python
from table import cast
```

Cast table values to another schema.

Args:
    target_schema (`Schema`):
        Schema to cast to, the names and order of fields must match.
    safe (`bool`, defaults to `True`):
        Check for overflows or other unsafe conversions.

Returns:
    `datasets.table.Table`

---
## replace_schema_metadata
```python
from table import replace_schema_metadata
```

EXPERIMENTAL: Create shallow copy of table by replacing schema
key-value metadata with the indicated new metadata (which may be `None`,
which deletes any existing metadata).

Args:
    metadata (`dict`, defaults to `None`):

Returns:
    `datasets.table.Table`: shallow_copy

---
## add_column
```python
from table import add_column
```

Add a column to the table.

Args:
    header (RenderableType, optional): Text or renderable for the header.
        Defaults to "".
    footer (RenderableType, optional): Text or renderable for the footer.
        Defaults to "".
    header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.
    footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.
    style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.
    justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
    vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".
    overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".
    width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.
    min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.
    max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.
    ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
    no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.

---
## append_column
```python
from table import append_column
```

Append column at end of columns.

Args:
    field_ (`Union[str, pyarrow.Field]`):
        If a string is passed then the type is deduced from the column
        data.
    column (`Union[pyarrow.Array, List[pyarrow.Array]]`):
        Column data.

Returns:
    `datasets.table.Table`:
        New table with the passed column added.

---
## remove_column
```python
from table import remove_column
```

Create new Table with the indicated column removed.

Args:
    i (`int`):
        Index of column to remove.

Returns:
    `datasets.table.Table`:
        New table without the column.

---
## set_column
```python
from table import set_column
```

Replace column in Table at position.

Args:
    i (`int`):
        Index to place the column at.
    field_ (`Union[str, pyarrow.Field]`):
        If a string is passed then the type is deduced from the column
        data.
    column (`Union[pyarrow.Array, List[pyarrow.Array]]`):
        Column data.

Returns:
    `datasets.table.Table`:
        New table with the passed column set.

---
## rename_columns
```python
from table import rename_columns
```

Create new table with columns renamed to provided names.

---
## drop
```python
from table import drop
```

Drop one or more columns and return a new table.

Args:
    columns (`List[str]`):
        List of field names referencing existing columns.

Raises:
    `KeyError` : if any of the passed columns name are not existing.

Returns:
    `datasets.table.Table`:
        New table without the columns.

---
## select
```python
from table import select
```

Select columns of the table.

Returns a new table with the specified columns, and metadata preserved.

Args:
    columns (:obj:`Union[List[str], List[int]]`):
        The column names or integer indices to select.

Returns:
    :class:`datasets.table.Table`: New table with the specified columns, and metadata preserved.

---
## from_file
```python
from table import from_file
```



---
## from_buffer
```python
from table import from_buffer
```



---
## from_pandas
```python
from table import from_pandas
```

Convert pandas.DataFrame to an Arrow Table.

The column types in the resulting Arrow Table are inferred from the
dtypes of the pandas.Series in the DataFrame. In the case of non-object
Series, the NumPy dtype is translated to its Arrow equivalent. In the
case of `object`, we need to guess the datatype by looking at the
Python objects in this Series.

Be aware that Series of the `object` dtype don't carry enough
information to always lead to a meaningful Arrow type. In the case that
we cannot infer a type, e.g. because the DataFrame is of length 0 or
the Series only contains `None/nan` objects, the type is set to
null. This behavior can be avoided by constructing an explicit schema
and passing it to this function.

Args:
    df (`pandas.DataFrame`):
    schema (`pyarrow.Schema`, *optional*):
        The expected schema of the Arrow Table. This can be used to
        indicate the type of columns if we cannot infer it automatically.
        If passed, the output will have exactly this schema. Columns
        specified in the schema that are not found in the DataFrame columns
        or its index will raise an error. Additional columns or index
        levels in the DataFrame which are not specified in the schema will
        be ignored.
    preserve_index (`bool`, *optional*):
        Whether to store the index as an additional column in the resulting
        `Table`. The default of None will store the index as a column,
        except for RangeIndex which is stored as metadata only. Use
        `preserve_index=True` to force it to be stored as a column.
    nthreads (`int`, defaults to `None` (may use up to system CPU count threads))
        If greater than 1, convert columns to Arrow in parallel using
        indicated number of threads.
    columns (`List[str]`, *optional*):
       List of column to be converted. If `None`, use all columns.
    safe (`bool`, defaults to `True`):
       Check for overflows or other unsafe conversions,

Returns:
    `datasets.table.Table`:

Examples:
```python
>>> import pandas as pd
>>> import pyarrow as pa
>>> df = pd.DataFrame({
    ...     'int': [1, 2],
    ...     'str': ['a', 'b']
    ... })
>>> pa.Table.from_pandas(df)
<pyarrow.lib.Table object at 0x7f05d1fb1b40>
```

---
## from_arrays
```python
from table import from_arrays
```

Construct a Table from Arrow arrays.

Args:
    arrays (`List[Union[pyarrow.Array, pyarrow.ChunkedArray]]`):
        Equal-length arrays that should form the table.
    names (`List[str]`, *optional*):
        Names for the table columns. If not passed, schema must be passed.
    schema (`Schema`, defaults to `None`):
        Schema for the created table. If not passed, names must be passed.
    metadata (`Union[dict, Mapping]`, defaults to `None`):
        Optional metadata for the schema (if inferred).

Returns:
    `datasets.table.Table`

---
## from_pydict
```python
from table import from_pydict
```

Construct a Table from Arrow arrays or columns.

Args:
    mapping (`Union[dict, Mapping]`):
        A mapping of strings to Arrays or Python lists.
    schema (`Schema`, defaults to `None`):
        If not passed, will be inferred from the Mapping values
    metadata (`Union[dict, Mapping]`, defaults to `None`):
        Optional metadata for the schema (if inferred).

Returns:
    `datasets.table.Table`

---
## from_pylist
```python
from table import from_pylist
```

Construct a Table from list of rows / dictionaries.

Args:
    mapping (`List[dict]`):
        A mapping of strings to row values.
    schema (`Schema`, defaults to `None`):
        If not passed, will be inferred from the Mapping values
    metadata (`Union[dict, Mapping]`, defaults to `None`):
        Optional metadata for the schema (if inferred).

Returns:
    `datasets.table.Table`

---
## from_batches
```python
from table import from_batches
```

Construct a Table from a sequence or iterator of Arrow `RecordBatches`.

Args:
    batches (`Union[Sequence[pyarrow.RecordBatch], Iterator[pyarrow.RecordBatch]]`):
        Sequence of `RecordBatch` to be converted, all schemas must be equal.
    schema (`Schema`, defaults to `None`):
        If not passed, will be inferred from the first `RecordBatch`.

Returns:
    `datasets.table.Table`:

---
## __getstate__
```python
from table import __getstate__
```



---
## __setstate__
```python
from table import __setstate__
```



---
## _apply_replays
```python
from table import _apply_replays
```



---
## _append_replay
```python
from table import _append_replay
```



---
## _concat_blocks
```python
from table import _concat_blocks
```



---
## _concat_blocks_horizontally_and_vertically
```python
from table import _concat_blocks_horizontally_and_vertically
```



---
## _merge_blocks
```python
from table import _merge_blocks
```



---
## _consolidate_blocks
```python
from table import _consolidate_blocks
```



---
## from_blocks
```python
from table import from_blocks
```



---
## from_tables
```python
from table import from_tables
```

Create `ConcatenationTable` from list of tables.

Args:
    tables (list of `Table` or list of `pyarrow.Table`):
        List of tables.
    axis (`{0, 1}`, defaults to `0`, meaning over rows):
        Axis to concatenate over, where `0` means over rows (vertically) and `1` means over columns
        (horizontally).

        <Added version="1.6.0"/>

---
## _slices
```python
from table import _slices
```



---
## __reduce__
```python
from table import __reduce__
```



---
## details
```python
from table import details
```



---
## _visit
```python
from table import _visit
```



---
## to_blocks
```python
from table import to_blocks
```



---
## _slice_row_block
```python
from table import _slice_row_block
```



---
## _split_both_like
```python
from table import _split_both_like
```

Make sure each row_block contain the same num_rows to be able to concatenate them on axis=1.

To do so, we modify both blocks sets to have the same row_blocks boundaries.
For example, if `result` has 2 row_blocks of 3 rows and `blocks` has 3 row_blocks of 2 rows,
we modify both to have 4 row_blocks of size 2, 1, 1 and 2:

        [ x   x   x | x   x   x ]
    +   [ y   y | y   y | y   y ]
    -----------------------------
    =   [ x   x | x | x | x   x ]
        [ y   y | y | y | y   y ]

---
## _extend_blocks
```python
from table import _extend_blocks
```



---
## __name__
```python
from load import __name__
```

Access datasets.

---
## _raise_timeout_error
```python
from load import _raise_timeout_error
```



---
## resolve_trust_remote_code
```python
from load import resolve_trust_remote_code
```

Copied and adapted from Transformers
https://github.com/huggingface/transformers/blob/2098d343cc4b4b9d2aea84b3cf1eb5a1e610deff/src/transformers/dynamic_module_utils.py#L589

---
## init_dynamic_modules
```python
from load import init_dynamic_modules
```

Create a module with name `name` in which you can add dynamic modules
such as datasets. The module can be imported using its name.
The module is created in the HF_MODULE_CACHE directory by default (~/.cache/huggingface/modules) but it can
be overridden by specifying a path to another directory in `hf_modules_cache`.

---
## import_main_class
```python
from load import import_main_class
```

Import a module at module_path and return its main class: a DatasetBuilder

---
## _InitializeConfiguredDatasetBuilder
```python
from load import _InitializeConfiguredDatasetBuilder
```

From https://stackoverflow.com/questions/4647566/pickle-a-dynamically-parameterized-sub-class
See also ConfiguredDatasetBuilder.__reduce__
When called with the param value as the only argument, returns an
un-initialized instance of the parameterized class. Subsequent __setstate__
will be called by pickle.

---
## configure_builder_class
```python
from load import configure_builder_class
```

Dynamically create a builder class with custom builder configs parsed from README.md file,
i.e. set BUILDER_CONFIGS class variable of a builder class to custom configs list.

---
## get_dataset_builder_class
```python
from load import get_dataset_builder_class
```



---
## files_to_hash
```python
from load import files_to_hash
```

Convert a list of scripts or text files provided in file_paths into a hashed filename in a repeatable way.

---
## increase_load_count
```python
from load import increase_load_count
```

Update the download count of a dataset.

---
## _download_additional_modules
```python
from load import _download_additional_modules
```

Download additional module for a module <name>.py at URL (or local path) <base_path>/<name>.py
The imports must have been parsed first using ``get_imports``.

If some modules need to be installed with pip, an error is raised showing how to install them.
This function return the list of downloaded modules as tuples (import_name, module_file_path).

The downloaded modules can then be moved into an importable directory with ``_copy_script_and_other_resources_in_importable_dir``.

---
## _check_library_imports
```python
from load import _check_library_imports
```



---
## _copy_script_and_other_resources_in_importable_dir
```python
from load import _copy_script_and_other_resources_in_importable_dir
```

Copy a script and its required imports to an importable directory

Args:
    name (str): name of the resource to load
    importable_directory_path (str): path to the loadable folder in the dynamic modules directory
    subdirectory_name (str): name of the subdirectory in importable_directory_path in which to place the script
    original_local_path (str): local path to the resource script
    local_imports (List[Tuple[str, str]]): list of (destination_filename, import_file_to_copy)
    additional_files (List[Tuple[str, str]]): list of (destination_filename, additional_file_to_copy)
    download_mode (Optional[Union[DownloadMode, str]]): download mode

Return:
    importable_file: path to an importable module with importlib.import_module

---
## _get_importable_file_path
```python
from load import _get_importable_file_path
```



---
## _create_importable_file
```python
from load import _create_importable_file
```



---
## _load_importable_file
```python
from load import _load_importable_file
```



---
## infer_module_for_data_files_list
```python
from load import infer_module_for_data_files_list
```

Infer module (and builder kwargs) from list of data files.

It picks the module based on the most common file extension.
In case of a draw ".parquet" is the favorite, and then alphabetical order.

Args:
    data_files_list (DataFilesList): List of data files.
    download_config (bool or str, optional): Mainly use `token` or `storage_options` to support different platforms and auth types.

Returns:
    tuple[str, dict[str, Any]]: Tuple with
        - inferred module name
        - dict of builder kwargs

---
## infer_module_for_data_files_list_in_archives
```python
from load import infer_module_for_data_files_list_in_archives
```

Infer module (and builder kwargs) from list of archive data files.

Args:
    data_files_list (DataFilesList): List of data files.
    download_config (bool or str, optional): Mainly use `token` or `storage_options` to support different platforms and auth types.

Returns:
    tuple[str, dict[str, Any]]: Tuple with
        - inferred module name
        - dict of builder kwargs

---
## infer_module_for_data_files
```python
from load import infer_module_for_data_files
```

Infer module (and builder kwargs) from data files. Raise if module names for different splits don't match.

Args:
    data_files ([`DataFilesDict`]): Dict of list of data files.
    path (str, *optional*): Dataset name or path.
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters to authenticate on the Hugging Face Hub for private remote files.

Returns:
    tuple[str, dict[str, Any]]: Tuple with
        - inferred module name
        - builder kwargs

---
## create_builder_configs_from_metadata_configs
```python
from load import create_builder_configs_from_metadata_configs
```



---
## BuilderConfigsParameters
```python
from load import BuilderConfigsParameters
```

Dataclass containing objects related to creation of builder configurations from yaml's metadata content.

Attributes:
    metadata_configs (`MetadataConfigs`, *optional*):
        Configs parsed from yaml's metadata.
    builder_configs (`list[BuilderConfig]`, *optional*):
        List of BuilderConfig objects created from metadata_configs above.
    default_config_name (`str`):
        Name of default config taken from yaml's metadata.

---
## DatasetModule
```python
from load import DatasetModule
```



---
## _DatasetModuleFactory
```python
from load import _DatasetModuleFactory
```



---
## LocalDatasetModuleFactoryWithScript
```python
from load import LocalDatasetModuleFactoryWithScript
```

Get the module of a local dataset. The dataset script is loaded from a local script.

---
## LocalDatasetModuleFactoryWithoutScript
```python
from load import LocalDatasetModuleFactoryWithoutScript
```

Get the module of a dataset loaded from the user's data files. The dataset builder module to use is inferred
from the data files extensions.

---
## PackagedDatasetModuleFactory
```python
from load import PackagedDatasetModuleFactory
```

Get the dataset builder module from the ones that are packaged with the library: csv, json, etc.

---
## HubDatasetModuleFactoryWithoutScript
```python
from load import HubDatasetModuleFactoryWithoutScript
```

Get the module of a dataset loaded from data files of a dataset repository.
The dataset builder module to use is inferred from the data files extensions.

---
## HubDatasetModuleFactoryWithParquetExport
```python
from load import HubDatasetModuleFactoryWithParquetExport
```

Get the module of a dataset loaded from parquet files of a dataset repository parquet export.

---
## HubDatasetModuleFactoryWithScript
```python
from load import HubDatasetModuleFactoryWithScript
```

Get the module of a dataset from a dataset repository.
The dataset script comes from the script inside the dataset repository.

---
## CachedDatasetModuleFactory
```python
from load import CachedDatasetModuleFactory
```

Get the module of a dataset that has been loaded once already and cached.
The script that is loaded from the cache is the most recent one with a matching name.

---
## dataset_module_factory
```python
from load import dataset_module_factory
```

Download/extract/cache a dataset module.

Dataset codes are cached inside the dynamic modules cache to allow easy import (avoid ugly sys.path tweaks).

Args:

    path (str): Path or name of the dataset.
        Depending on ``path``, the dataset builder that is used comes from a generic dataset script (JSON, CSV, Parquet, text etc.) or from the dataset script (a python file) inside the dataset directory.

        For local datasets:

        - if ``path`` is a local directory (containing data files only)
          -> load a generic dataset builder (csv, json, text etc.) based on the content of the directory
          e.g. ``'./path/to/directory/with/my/csv/data'``.
        - if ``path`` is a local dataset script or a directory containing a local dataset script (if the script has the same name as the directory):
          -> load the dataset builder from the dataset script
          e.g. ``'./dataset/squad'`` or ``'./dataset/squad/squad.py'``.

        For datasets on the Hugging Face Hub (list all available datasets with ``huggingface_hub.list_datasets()``)

        - if ``path`` is a dataset repository on the HF hub (containing data files only)
          -> load a generic dataset builder (csv, text etc.) based on the content of the repository
          e.g. ``'username/dataset_name'``, a dataset repository on the HF hub containing your data files.
        - if ``path`` is a dataset repository on the HF hub with a dataset script (if the script has the same name as the directory)
          -> load the dataset builder from the dataset script in the dataset repository
          e.g. ``glue``, ``squad``, ``'username/dataset_name'``, a dataset repository on the HF hub containing a dataset script `'dataset_name.py'`.

    revision (:class:`~utils.Version` or :obj:`str`, optional): Version of the dataset script to load.
        As datasets have their own git repository on the Datasets Hub, the default version "main" corresponds to their "main" branch.
        You can specify a different version than the default "main" by using a commit SHA or a git tag of the dataset repository.
    download_config (:class:`DownloadConfig`, optional): Specific download configuration parameters.
    download_mode (:class:`DownloadMode` or :obj:`str`, default ``REUSE_DATASET_IF_EXISTS``): Download/generate mode.
    dynamic_modules_path (Optional str, defaults to HF_MODULES_CACHE / "datasets_modules", i.e. ~/.cache/huggingface/modules/datasets_modules):
        Optional path to the directory in which the dynamic modules are saved. It must have been initialized with :obj:`init_dynamic_modules`.
        By default, the datasets are stored inside the `datasets_modules` module.
    data_dir (:obj:`str`, optional): Directory with the data files. Used only if `data_files` is not specified,
        in which case it's equal to pass `os.path.join(data_dir, "**")` as `data_files`.
    data_files (:obj:`Union[Dict, List, str]`, optional): Defining the data_files of the dataset configuration.
    cache_dir (`str`, *optional*):
        Directory to read/write data. Defaults to `"~/.cache/huggingface/datasets"`.

        <Added version="2.16.0"/>
    trust_remote_code (`bool`, defaults to `False`):
        Whether or not to allow for datasets defined on the Hub using a dataset script. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.

        <Added version="2.16.0"/>

        <Changed version="2.20.0">

        `trust_remote_code` defaults to `False` if not specified.

        </Changed>

    **download_kwargs (additional keyword arguments): optional attributes for DownloadConfig() which will override
        the attributes in download_config if supplied.

Returns:
    DatasetModule

---
## load_dataset_builder
```python
from load import load_dataset_builder
```

Load a dataset builder from the Hugging Face Hub, or a local dataset. A dataset builder can be used to inspect general information that is required to build a dataset (cache directory, config, dataset info, etc.)
without downloading the dataset itself.

You can find the list of datasets on the [Hub](https://huggingface.co/datasets) or with [`huggingface_hub.list_datasets`].

A dataset is a directory that contains:

- some data files in generic formats (JSON, CSV, Parquet, text, etc.)
- and optionally a dataset script, if it requires some code to read the data files. This is used to load any kind of formats or structures.

Note that dataset scripts can also download and read data files from anywhere - in case your data files already exist online.

Args:

    path (`str`):
        Path or name of the dataset.
        Depending on `path`, the dataset builder that is used comes from a generic dataset script (JSON, CSV, Parquet, text etc.) or from the dataset script (a python file) inside the dataset directory.

        For local datasets:

        - if `path` is a local directory (containing data files only)
          -> load a generic dataset builder (csv, json, text etc.) based on the content of the directory
          e.g. `'./path/to/directory/with/my/csv/data'`.
        - if `path` is a local dataset script or a directory containing a local dataset script (if the script has the same name as the directory)
          -> load the dataset builder from the dataset script
          e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`.

        For datasets on the Hugging Face Hub (list all available datasets with [`huggingface_hub.list_datasets`])

        - if `path` is a dataset repository on the HF hub (containing data files only)
          -> load a generic dataset builder (csv, text etc.) based on the content of the repository
          e.g. `'username/dataset_name'`, a dataset repository on the HF hub containing your data files.
        - if `path` is a dataset repository on the HF hub with a dataset script (if the script has the same name as the directory)
          -> load the dataset builder from the dataset script in the dataset repository
          e.g. `glue`, `squad`, `'username/dataset_name'`, a dataset repository on the HF hub containing a dataset script `'dataset_name.py'`.

    name (`str`, *optional*):
        Defining the name of the dataset configuration.
    data_dir (`str`, *optional*):
        Defining the `data_dir` of the dataset configuration. If specified for the generic builders (csv, text etc.) or the Hub datasets and `data_files` is `None`,
        the behavior is equal to passing `os.path.join(data_dir, **)` as `data_files` to reference all the files in a directory.
    data_files (`str` or `Sequence` or `Mapping`, *optional*):
        Path(s) to source data file(s).
    cache_dir (`str`, *optional*):
        Directory to read/write data. Defaults to `"~/.cache/huggingface/datasets"`.
    features ([`Features`], *optional*):
        Set the features type to use for this dataset.
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
        Download/generate mode.
    revision ([`Version`] or `str`, *optional*):
        Version of the dataset script to load.
        As datasets have their own git repository on the Datasets Hub, the default version "main" corresponds to their "main" branch.
        You can specify a different version than the default "main" by using a commit SHA or a git tag of the dataset repository.
    token (`str` or `bool`, *optional*):
        Optional string or boolean to use as Bearer token for remote files on the Datasets Hub.
        If `True`, or not specified, will get token from `"~/.huggingface"`.
    storage_options (`dict`, *optional*, defaults to `None`):
        **Experimental**. Key/value pairs to be passed on to the dataset file-system backend, if any.

        <Added version="2.11.0"/>
    trust_remote_code (`bool`, defaults to `False`):
        Whether or not to allow for datasets defined on the Hub using a dataset script. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.

        <Added version="2.16.0"/>

        <Changed version="2.20.0">

        `trust_remote_code` defaults to `False` if not specified.

        </Changed>

    **config_kwargs (additional keyword arguments):
        Keyword arguments to be passed to the [`BuilderConfig`]
        and used in the [`DatasetBuilder`].

Returns:
    [`DatasetBuilder`]

Example:

```py
>>> from datasets import load_dataset_builder
>>> ds_builder = load_dataset_builder('rotten_tomatoes')
>>> ds_builder.info.features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
```

---
## load_dataset
```python
from load import load_dataset
```

Load a dataset from the Hugging Face Hub, or a local dataset.

You can find the list of datasets on the [Hub](https://huggingface.co/datasets) or with [`huggingface_hub.list_datasets`].

A dataset is a directory that contains:

- some data files in generic formats (JSON, CSV, Parquet, text, etc.).
- and optionally a dataset script, if it requires some code to read the data files. This is used to load any kind of formats or structures.

Note that dataset scripts can also download and read data files from anywhere - in case your data files already exist online.

This function does the following under the hood:

    1. Download and import in the library the dataset script from `path` if it's not already cached inside the library.

        If the dataset has no dataset script, then a generic dataset script is imported instead (JSON, CSV, Parquet, text, etc.)

        Dataset scripts are small python scripts that define dataset builders. They define the citation, info and format of the dataset,
        contain the path or URL to the original data files and the code to load examples from the original data files.

        You can find the complete list of datasets in the Datasets [Hub](https://huggingface.co/datasets).

    2. Run the dataset script which will:

        * Download the dataset file from the original URL (see the script) if it's not already available locally or cached.
        * Process and cache the dataset in typed Arrow tables for caching.

            Arrow table are arbitrarily long, typed tables which can store nested objects and be mapped to numpy/pandas/python generic types.
            They can be directly accessed from disk, loaded in RAM or even streamed over the web.

    3. Return a dataset built from the requested splits in `split` (default: all).

It also allows to load a dataset from a local directory or a dataset repository on the Hugging Face Hub without dataset script.
In this case, it automatically loads all the data files from the directory or the dataset repository.

Args:

    path (`str`):
        Path or name of the dataset.
        Depending on `path`, the dataset builder that is used comes from a generic dataset script (JSON, CSV, Parquet, text etc.) or from the dataset script (a python file) inside the dataset directory.

        For local datasets:

        - if `path` is a local directory (containing data files only)
          -> load a generic dataset builder (csv, json, text etc.) based on the content of the directory
          e.g. `'./path/to/directory/with/my/csv/data'`.
        - if `path` is a local dataset script or a directory containing a local dataset script (if the script has the same name as the directory)
          -> load the dataset builder from the dataset script
          e.g. `'./dataset/squad'` or `'./dataset/squad/squad.py'`.

        For datasets on the Hugging Face Hub (list all available datasets with [`huggingface_hub.list_datasets`])

        - if `path` is a dataset repository on the HF hub (containing data files only)
          -> load a generic dataset builder (csv, text etc.) based on the content of the repository
          e.g. `'username/dataset_name'`, a dataset repository on the HF hub containing your data files.
        - if `path` is a dataset repository on the HF hub with a dataset script (if the script has the same name as the directory)
          -> load the dataset builder from the dataset script in the dataset repository
          e.g. `glue`, `squad`, `'username/dataset_name'`, a dataset repository on the HF hub containing a dataset script `'dataset_name.py'`.

    name (`str`, *optional*):
        Defining the name of the dataset configuration.
    data_dir (`str`, *optional*):
        Defining the `data_dir` of the dataset configuration. If specified for the generic builders (csv, text etc.) or the Hub datasets and `data_files` is `None`,
        the behavior is equal to passing `os.path.join(data_dir, **)` as `data_files` to reference all the files in a directory.
    data_files (`str` or `Sequence` or `Mapping`, *optional*):
        Path(s) to source data file(s).
    split (`Split` or `str`):
        Which split of the data to load.
        If `None`, will return a `dict` with all splits (typically `datasets.Split.TRAIN` and `datasets.Split.TEST`).
        If given, will return a single Dataset.
        Splits can be combined and specified like in tensorflow-datasets.
    cache_dir (`str`, *optional*):
        Directory to read/write data. Defaults to `"~/.cache/huggingface/datasets"`.
    features (`Features`, *optional*):
        Set the features type to use for this dataset.
    download_config ([`DownloadConfig`], *optional*):
        Specific download configuration parameters.
    download_mode ([`DownloadMode`] or `str`, defaults to `REUSE_DATASET_IF_EXISTS`):
        Download/generate mode.
    verification_mode ([`VerificationMode`] or `str`, defaults to `BASIC_CHECKS`):
        Verification mode determining the checks to run on the downloaded/processed dataset information (checksums/size/splits/...).

        <Added version="2.9.1"/>
    keep_in_memory (`bool`, defaults to `None`):
        Whether to copy the dataset in-memory. If `None`, the dataset
        will not be copied in-memory unless explicitly enabled by setting `datasets.config.IN_MEMORY_MAX_SIZE` to
        nonzero. See more details in the [improve performance](../cache#improve-performance) section.
    save_infos (`bool`, defaults to `False`):
        Save the dataset information (checksums/size/splits/...).
    revision ([`Version`] or `str`, *optional*):
        Version of the dataset script to load.
        As datasets have their own git repository on the Datasets Hub, the default version "main" corresponds to their "main" branch.
        You can specify a different version than the default "main" by using a commit SHA or a git tag of the dataset repository.
    token (`str` or `bool`, *optional*):
        Optional string or boolean to use as Bearer token for remote files on the Datasets Hub.
        If `True`, or not specified, will get token from `"~/.huggingface"`.
    streaming (`bool`, defaults to `False`):
        If set to `True`, don't download the data files. Instead, it streams the data progressively while
        iterating on the dataset. An [`IterableDataset`] or [`IterableDatasetDict`] is returned instead in this case.

        Note that streaming works for datasets that use data formats that support being iterated over like txt, csv, jsonl for example.
        Json files may be downloaded completely. Also streaming from remote zip or gzip files is supported but other compressed formats
        like rar and xz are not yet supported. The tgz format doesn't allow streaming.
    num_proc (`int`, *optional*, defaults to `None`):
        Number of processes when downloading and generating the dataset locally.
        Multiprocessing is disabled by default.

        <Added version="2.7.0"/>
    storage_options (`dict`, *optional*, defaults to `None`):
        **Experimental**. Key/value pairs to be passed on to the dataset file-system backend, if any.

        <Added version="2.11.0"/>
    trust_remote_code (`bool`, defaults to `False`):
        Whether or not to allow for datasets defined on the Hub using a dataset script. This option
        should only be set to `True` for repositories you trust and in which you have read the code, as it will
        execute code present on the Hub on your local machine.

        <Added version="2.16.0"/>

        <Changed version="2.20.0">

        `trust_remote_code` defaults to `False` if not specified.

        </Changed>

    **config_kwargs (additional keyword arguments):
        Keyword arguments to be passed to the `BuilderConfig`
        and used in the [`DatasetBuilder`].

Returns:
    [`Dataset`] or [`DatasetDict`]:
    - if `split` is not `None`: the dataset requested,
    - if `split` is `None`, a [`~datasets.DatasetDict`] with each split.

    or [`IterableDataset`] or [`IterableDatasetDict`]: if `streaming=True`

    - if `split` is not `None`, the dataset is requested
    - if `split` is `None`, a [`~datasets.streaming.IterableDatasetDict`] with each split.

Example:

Load a dataset from the Hugging Face Hub:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset('rotten_tomatoes', split='train')

# Map data files to splits
>>> data_files = {'train': 'train.csv', 'test': 'test.csv'}
>>> ds = load_dataset('namespace/your_dataset_name', data_files=data_files)
```

Load a local dataset:

```py
# Load a CSV file
>>> from datasets import load_dataset
>>> ds = load_dataset('csv', data_files='path/to/local/my_dataset.csv')

# Load a JSON file
>>> from datasets import load_dataset
>>> ds = load_dataset('json', data_files='path/to/local/my_dataset.json')

# Load from a local loading script
>>> from datasets import load_dataset
>>> ds = load_dataset('path/to/local/loading_script/loading_script.py', split='train')
```

Load an [`~datasets.IterableDataset`]:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset('rotten_tomatoes', split='train', streaming=True)
```

Load an image dataset with the `ImageFolder` dataset builder:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset('imagefolder', data_dir='/path/to/images', split='train')
```

---
## load_from_disk
```python
from load import load_from_disk
```

Loads a dataset that was previously saved using [`~Dataset.save_to_disk`] from a dataset directory, or
from a filesystem using any implementation of `fsspec.spec.AbstractFileSystem`.

Args:
    dataset_path (`path-like`):
        Path (e.g. `"dataset/train"`) or remote URI (e.g. `"s3://my-bucket/dataset/train"`)
        of the [`Dataset`] or [`DatasetDict`] directory where the dataset/dataset-dict will be
        loaded from.
    keep_in_memory (`bool`, defaults to `None`):
        Whether to copy the dataset in-memory. If `None`, the dataset
        will not be copied in-memory unless explicitly enabled by setting `datasets.config.IN_MEMORY_MAX_SIZE` to
        nonzero. See more details in the [improve performance](../cache#improve-performance) section.

    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the file-system backend, if any.

        <Added version="2.9.0"/>

Returns:
    [`Dataset`] or [`DatasetDict`]:
    - If `dataset_path` is a path of a dataset directory: the dataset requested.
    - If `dataset_path` is a path of a dataset dict directory, a [`DatasetDict`] with each split.

Example:

```py
>>> from datasets import load_from_disk
>>> ds = load_from_disk('path/to/dataset/directory')
```

---
## __call__
```python
from load import __call__
```



---
## ConfiguredDatasetBuilder
```python
from load import ConfiguredDatasetBuilder
```



---
## get_module
```python
from load import get_module
```



---
## __init__
```python
from load import __init__
```



---
## download_loading_script
```python
from load import download_loading_script
```



---
## download_dataset_infos_file
```python
from load import download_dataset_infos_file
```



---
## download_dataset_readme_file
```python
from load import download_dataset_readme_file
```



---
## __reduce__
```python
from load import __reduce__
```



---
## sort_key
```python
from load import sort_key
```

Sort by count and set ".parquet" as the favorite in case of a draw, and ignore metadata files

---
## _get_modification_time
```python
from load import _get_modification_time
```



---
## __name__
```python
from streaming import __name__
```



---
## extend_module_for_streaming
```python
from streaming import extend_module_for_streaming
```

Extend the module to support streaming.

We patch some functions in the module to use `fsspec` to support data streaming:
- We use `fsspec.open` to open and read remote files. We patch the module function:
  - `open`
- We use the "::" hop separator to join paths and navigate remote compressed/archive files. We patch the module
  functions:
  - `os.path.join`
  - `pathlib.Path.joinpath` and `pathlib.Path.__truediv__` (called when using the "/" operator)

The patched functions are replaced with custom functions defined to work with the
:class:`~download.streaming_download_manager.StreamingDownloadManager`.

Args:
    module_path: Path to the module to be extended.
    download_config: Mainly use `token` or `storage_options` to support different platforms and auth types.

---
## extend_dataset_builder_for_streaming
```python
from streaming import extend_dataset_builder_for_streaming
```

Extend the dataset builder module and the modules imported by it to support streaming.

Args:
    builder (:class:`DatasetBuilder`): Dataset builder instance.

---
## wrap_auth
```python
from streaming import wrap_auth
```



---
## wrapper
```python
from streaming import wrapper
```



---
## __name__
```python
from info import __name__
```



---
## SupervisedKeysData
```python
from info import SupervisedKeysData
```



---
## DownloadChecksumsEntryData
```python
from info import DownloadChecksumsEntryData
```



---
## MissingCachedSizesConfigError
```python
from info import MissingCachedSizesConfigError
```

The expected cached sizes of the download file are missing.

---
## NonMatchingCachedSizesError
```python
from info import NonMatchingCachedSizesError
```

The prepared split doesn't have expected sizes.

---
## PostProcessedInfo
```python
from info import PostProcessedInfo
```



---
## DatasetInfo
```python
from info import DatasetInfo
```

Information about a dataset.

`DatasetInfo` documents datasets, including its name, version, and features.
See the constructor arguments and properties for a full list.

Not all fields are known on construction and may be updated later.

Attributes:
    description (`str`):
        A description of the dataset.
    citation (`str`):
        A BibTeX citation of the dataset.
    homepage (`str`):
        A URL to the official homepage for the dataset.
    license (`str`):
        The dataset's license. It can be the name of the license or a paragraph containing the terms of the license.
    features ([`Features`], *optional*):
        The features used to specify the dataset's column types.
    post_processed (`PostProcessedInfo`, *optional*):
        Information regarding the resources of a possible post-processing of a dataset. For example, it can contain the information of an index.
    supervised_keys (`SupervisedKeysData`, *optional*):
        Specifies the input feature and the label for supervised learning if applicable for the dataset (legacy from TFDS).
    builder_name (`str`, *optional*):
        The name of the `GeneratorBasedBuilder` subclass used to create the dataset. Usually matched to the corresponding script name. It is also the snake_case version of the dataset builder class name.
    config_name (`str`, *optional*):
        The name of the configuration derived from [`BuilderConfig`].
    version (`str` or [`Version`], *optional*):
        The version of the dataset.
    splits (`dict`, *optional*):
        The mapping between split name and metadata.
    download_checksums (`dict`, *optional*):
        The mapping between the URL to download the dataset's checksums and corresponding metadata.
    download_size (`int`, *optional*):
        The size of the files to download to generate the dataset, in bytes.
    post_processing_size (`int`, *optional*):
        Size of the dataset in bytes after post-processing, if any.
    dataset_size (`int`, *optional*):
        The combined size in bytes of the Arrow tables for all splits.
    size_in_bytes (`int`, *optional*):
        The combined size in bytes of all files associated with the dataset (downloaded files + Arrow files).
    **config_kwargs (additional keyword arguments):
        Keyword arguments to be passed to the [`BuilderConfig`] and used in the [`DatasetBuilder`].

---
## DatasetInfosDict
```python
from info import DatasetInfosDict
```



---
## __post_init__
```python
from info import __post_init__
```



---
## from_dict
```python
from info import from_dict
```



---
## write_to_directory
```python
from info import write_to_directory
```



---
## _dump_info
```python
from info import _dump_info
```

Dump info in `file` file-like object open in bytes mode (to support remote files)

---
## _dump_license
```python
from info import _dump_license
```

Dump license in `file` file-like object open in bytes mode (to support remote files)

---
## from_merge
```python
from info import from_merge
```



---
## from_directory
```python
from info import from_directory
```



---
## update
```python
from info import update
```



---
## copy
```python
from info import copy
```



---
## _to_yaml_dict
```python
from info import _to_yaml_dict
```



---
## _from_yaml_dict
```python
from info import _from_yaml_dict
```



---
## from_dataset_card_data
```python
from info import from_dataset_card_data
```



---
## to_dataset_card_data
```python
from info import to_dataset_card_data
```



---
## __name__
```python
from keyhash import __name__
```

Hashing function for dataset keys using `hashlib.md5`

Requirements for the hash function:

- Provides a uniformly distributed hash from random space
- Adequately fast speed
- Working with multiple input types (in this case, `str`, `int` or `bytes`)
- Should be platform independent (generates same hash on different OS and systems)

The hashing function provides a unique 128-bit integer hash of the key provided.

The split name is being used here as the hash salt to avoid having same hashes
in different splits due to same keys

---
## _as_bytes
```python
from keyhash import _as_bytes
```

Returns the input hash_data in its bytes form

Args:
hash_data: the hash salt/key to be converted to bytes

---
## InvalidKeyError
```python
from keyhash import InvalidKeyError
```

Raises an error when given key is of invalid datatype.

---
## DuplicatedKeysError
```python
from keyhash import DuplicatedKeysError
```

Raise an error when duplicate key found.

---
## KeyHasher
```python
from keyhash import KeyHasher
```

KeyHasher class for providing hash using md5

---
## __init__
```python
from keyhash import __init__
```



---
## hash
```python
from keyhash import hash
```

Returns 128-bits unique hash of input key

Args:
key: the input key to be hashed (should be str, int or bytes)

Returns: 128-bit int hash key

---
## __name__
```python
from ttx import __name__
```

usage: ttx [options] inputfile1 [... inputfileN]

TTX -- From OpenType To XML And Back

If an input file is a TrueType or OpenType font file, it will be
decompiled to a TTX file (an XML-based text format).
If an input file is a TTX file, it will be compiled to whatever
format the data is in, a TrueType or OpenType/CFF font file.
A special input value of - means read from the standard input.

Output files are created so they are unique: an existing file is
never overwritten.

General options
===============

-h Help            print this message.
--version          show version and exit.
-d <outputfolder>  Specify a directory where the output files are
                   to be created.
-o <outputfile>    Specify a file to write the output to. A special
                   value of - would use the standard output.
-f                 Overwrite existing output file(s), ie. don't append
                   numbers.
-v                 Verbose: more messages will be written to stdout
                   about what is being done.
-q                 Quiet: No messages will be written to stdout about
                   what is being done.
-a                 allow virtual glyphs ID's on compile or decompile.

Dump options
============

-l           List table info: instead of dumping to a TTX file, list
             some minimal info about each table.
-t <table>   Specify a table to dump. Multiple -t options
             are allowed. When no -t option is specified, all tables
             will be dumped.
-x <table>   Specify a table to exclude from the dump. Multiple
             -x options are allowed. -t and -x are mutually exclusive.
-s           Split tables: save the TTX data into separate TTX files per
             table and write one small TTX file that contains references
             to the individual table dumps. This file can be used as
             input to ttx, as long as the table files are in the
             same directory.
-g           Split glyf table: Save the glyf data into separate TTX files
             per glyph and write a small TTX for the glyf table which
             contains references to the individual TTGlyph elements.
             NOTE: specifying -g implies -s (no need for -s together
             with -g)
-i           Do NOT disassemble TT instructions: when this option is
             given, all TrueType programs (glyph programs, the font
             program and the pre-program) will be written to the TTX
             file as hex data instead of assembly. This saves some time
             and makes the TTX file smaller.
-z <format>  Specify a bitmap data export option for EBDT:
             {'raw', 'row', 'bitwise', 'extfile'} or for the CBDT:
             {'raw', 'extfile'} Each option does one of the following:

             -z raw
               export the bitmap data as a hex dump
             -z row
               export each row as hex data
             -z bitwise
               export each row as binary in an ASCII art style
             -z extfile
               export the data as external files with XML references

             If no export format is specified 'raw' format is used.
-e           Don't ignore decompilation errors, but show a full traceback
             and abort.
-y <number>  Select font number for TrueType Collection (.ttc/.otc),
             starting from 0.
--unicodedata <UnicodeData.txt>
             Use custom database file to write character names in the
             comments of the cmap TTX output.
--newline <value>
             Control how line endings are written in the XML file. It
             can be 'LF', 'CR', or 'CRLF'. If not specified, the
             default platform-specific line endings are used.

Compile options
===============

-m           Merge with TrueType-input-file: specify a TrueType or
             OpenType font file to be merged with the TTX file. This
             option is only valid when at most one TTX file is specified.
-b           Don't recalc glyph bounding boxes: use the values in the
             TTX file as-is.
--recalc-timestamp
             Set font 'modified' timestamp to current time.
             By default, the modification time of the TTX file will be
             used.
--no-recalc-timestamp
             Keep the original font 'modified' timestamp.
--flavor <type>
             Specify flavor of output font file. May be 'woff' or 'woff2'.
             Note that WOFF2 requires the Brotli Python extension,
             available at https://github.com/google/brotli
--with-zopfli
             Use Zopfli instead of Zlib to compress WOFF. The Python
             extension is available at https://pypi.python.org/pypi/zopfli

---
## Options
```python
from ttx import Options
```



---
## ttList
```python
from ttx import ttList
```



---
## ttDump
```python
from ttx import ttDump
```



---
## ttCompile
```python
from ttx import ttCompile
```



---
## guessFileType
```python
from ttx import guessFileType
```



---
## parseOptions
```python
from ttx import parseOptions
```



---
## process
```python
from ttx import process
```



---
## main
```python
from ttx import main
```

Convert OpenType fonts to XML and back

---
## __init__
```python
from ttx import __init__
```



---
## __name__
```python
from fontBuilder import __name__
```



---
## FontBuilder
```python
from fontBuilder import FontBuilder
```



---
## buildCmapSubTable
```python
from fontBuilder import buildCmapSubTable
```



---
## addFvar
```python
from fontBuilder import addFvar
```



---
## __init__
```python
from fontBuilder import __init__
```

Initialize a FontBuilder instance.

If the `font` argument is not given, a new `TTFont` will be
constructed, and `unitsPerEm` must be given. If `isTTF` is True,
the font will be a glyf-based TTF; if `isTTF` is False it will be
a CFF-based OTF.

The `glyphDataFormat` argument corresponds to the `head` table field
that defines the format of the TrueType `glyf` table (default=0).
TrueType glyphs historically can only contain quadratic splines and static
components, but there's a proposal to add support for cubic Bezier curves as well
as variable composites/components at
https://github.com/harfbuzz/boring-expansion-spec/blob/main/glyf1.md
You can experiment with the new features by setting `glyphDataFormat` to 1.
A ValueError is raised if `glyphDataFormat` is left at 0 but glyphs are added
that contain cubic splines or varcomposites. This is to prevent accidentally
creating fonts that are incompatible with existing TrueType implementations.

If `font` is given, it must be a `TTFont` instance and `unitsPerEm`
must _not_ be given. The `isTTF` and `glyphDataFormat` arguments will be ignored.

---
## save
```python
from fontBuilder import save
```

Save the font. The 'file' argument can be either a pathname or a
writable file object.

---
## _initTableWithValues
```python
from fontBuilder import _initTableWithValues
```



---
## _updateTableWithValues
```python
from fontBuilder import _updateTableWithValues
```



---
## setupHead
```python
from fontBuilder import setupHead
```

Create a new `head` table and initialize it with default values,
which can be overridden by keyword arguments.

---
## updateHead
```python
from fontBuilder import updateHead
```

Update the head table with the fields and values passed as
keyword arguments.

---
## setupGlyphOrder
```python
from fontBuilder import setupGlyphOrder
```

Set the glyph order for the font.

---
## setupCharacterMap
```python
from fontBuilder import setupCharacterMap
```

Build the `cmap` table for the font. The `cmapping` argument should
be a dict mapping unicode code points as integers to glyph names.

The `uvs` argument, when passed, must be a list of tuples, describing
Unicode Variation Sequences. These tuples have three elements:
    (unicodeValue, variationSelector, glyphName)
`unicodeValue` and `variationSelector` are integer code points.
`glyphName` may be None, to indicate this is the default variation.
Text processors will then use the cmap to find the glyph name.
Each Unicode Variation Sequence should be an officially supported
sequence, but this is not policed.

---
## setupNameTable
```python
from fontBuilder import setupNameTable
```

Create the `name` table for the font. The `nameStrings` argument must
be a dict, mapping nameIDs or descriptive names for the nameIDs to name
record values. A value is either a string, or a dict, mapping language codes
to strings, to allow localized name table entries.

By default, both Windows (platformID=3) and Macintosh (platformID=1) name
records are added, unless any of `windows` or `mac` arguments is False.

The following descriptive names are available for nameIDs:

    copyright (nameID 0)
    familyName (nameID 1)
    styleName (nameID 2)
    uniqueFontIdentifier (nameID 3)
    fullName (nameID 4)
    version (nameID 5)
    psName (nameID 6)
    trademark (nameID 7)
    manufacturer (nameID 8)
    designer (nameID 9)
    description (nameID 10)
    vendorURL (nameID 11)
    designerURL (nameID 12)
    licenseDescription (nameID 13)
    licenseInfoURL (nameID 14)
    typographicFamily (nameID 16)
    typographicSubfamily (nameID 17)
    compatibleFullName (nameID 18)
    sampleText (nameID 19)
    postScriptCIDFindfontName (nameID 20)
    wwsFamilyName (nameID 21)
    wwsSubfamilyName (nameID 22)
    lightBackgroundPalette (nameID 23)
    darkBackgroundPalette (nameID 24)
    variationsPostScriptNamePrefix (nameID 25)

---
## setupOS2
```python
from fontBuilder import setupOS2
```

Create a new `OS/2` table and initialize it with default values,
which can be overridden by keyword arguments.

---
## setupCFF
```python
from fontBuilder import setupCFF
```



---
## setupCFF2
```python
from fontBuilder import setupCFF2
```



---
## setupCFF2Regions
```python
from fontBuilder import setupCFF2Regions
```



---
## setupGlyf
```python
from fontBuilder import setupGlyf
```

Create the `glyf` table from a dict, that maps glyph names
to `fontTools.ttLib.tables._g_l_y_f.Glyph` objects, for example
as made by `fontTools.pens.ttGlyphPen.TTGlyphPen`.

If `calcGlyphBounds` is True, the bounds of all glyphs will be
calculated. Only pass False if your glyph objects already have
their bounding box values set.

If `validateGlyphFormat` is True, raise ValueError if any of the glyphs contains
cubic curves or is a variable composite but head.glyphDataFormat=0.
Set it to False to skip the check if you know in advance all the glyphs are
compatible with the specified glyphDataFormat.

---
## setupFvar
```python
from fontBuilder import setupFvar
```

Adds an font variations table to the font.

Args:
    axes (list): See below.
    instances (list): See below.

``axes`` should be a list of axes, with each axis either supplied as
a py:class:`.designspaceLib.AxisDescriptor` object, or a tuple in the
format ```tupletag, minValue, defaultValue, maxValue, name``.
The ``name`` is either a string, or a dict, mapping language codes
to strings, to allow localized name table entries.

```instances`` should be a list of instances, with each instance either
supplied as a py:class:`.designspaceLib.InstanceDescriptor` object, or a
dict with keys ``location`` (mapping of axis tags to float values),
``stylename`` and (optionally) ``postscriptfontname``.
The ``stylename`` is either a string, or a dict, mapping language codes
to strings, to allow localized name table entries.

---
## setupAvar
```python
from fontBuilder import setupAvar
```

Adds an axis variations table to the font.

Args:
    axes (list): A list of py:class:`.designspaceLib.AxisDescriptor` objects.

---
## setupGvar
```python
from fontBuilder import setupGvar
```



---
## calcGlyphBounds
```python
from fontBuilder import calcGlyphBounds
```

Calculate the bounding boxes of all glyphs in the `glyf` table.
This is usually not called explicitly by client code.

---
## setupHorizontalMetrics
```python
from fontBuilder import setupHorizontalMetrics
```

Create a new `hmtx` table, for horizontal metrics.

The `metrics` argument must be a dict, mapping glyph names to
`(width, leftSidebearing)` tuples.

---
## setupVerticalMetrics
```python
from fontBuilder import setupVerticalMetrics
```

Create a new `vmtx` table, for horizontal metrics.

The `metrics` argument must be a dict, mapping glyph names to
`(height, topSidebearing)` tuples.

---
## setupMetrics
```python
from fontBuilder import setupMetrics
```

See `setupHorizontalMetrics()` and `setupVerticalMetrics()`.

---
## setupHorizontalHeader
```python
from fontBuilder import setupHorizontalHeader
```

Create a new `hhea` table initialize it with default values,
which can be overridden by keyword arguments.

---
## setupVerticalHeader
```python
from fontBuilder import setupVerticalHeader
```

Create a new `vhea` table initialize it with default values,
which can be overridden by keyword arguments.

---
## setupVerticalOrigins
```python
from fontBuilder import setupVerticalOrigins
```

Create a new `VORG` table. The `verticalOrigins` argument must be
a dict, mapping glyph names to vertical origin values.

The `defaultVerticalOrigin` argument should be the most common vertical
origin value. If omitted, this value will be derived from the actual
values in the `verticalOrigins` argument.

---
## setupPost
```python
from fontBuilder import setupPost
```

Create a new `post` table and initialize it with default values,
which can be overridden by keyword arguments.

---
## setupMaxp
```python
from fontBuilder import setupMaxp
```

Create a new `maxp` table. This is called implicitly by FontBuilder
itself and is usually not called by client code.

---
## setupDummyDSIG
```python
from fontBuilder import setupDummyDSIG
```

This adds an empty DSIG table to the font to make some MS applications
happy. This does not properly sign the font.

---
## addOpenTypeFeatures
```python
from fontBuilder import addOpenTypeFeatures
```

Add OpenType features to the font from a string containing
Feature File syntax.

The `filename` argument is used in error messages and to determine
where to look for "include" files.

The optional `tables` argument can be a list of OTL tables tags to
build, allowing the caller to only build selected OTL tables. See
`fontTools.feaLib` for details.

The optional `debug` argument controls whether to add source debugging
information to the font in the `Debg` table.

---
## addFeatureVariations
```python
from fontBuilder import addFeatureVariations
```

Add conditional substitutions to a Variable Font.

See `fontTools.varLib.featureVars.addFeatureVariations`.

---
## setupCOLR
```python
from fontBuilder import setupCOLR
```

Build new COLR table using color layers dictionary.

Cf. `fontTools.colorLib.builder.buildCOLR`.

---
## setupCPAL
```python
from fontBuilder import setupCPAL
```

Build new CPAL table using list of palettes.

Optionally build CPAL v1 table using paletteTypes, paletteLabels and
paletteEntryLabels.

Cf. `fontTools.colorLib.builder.buildCPAL`.

---
## setupStat
```python
from fontBuilder import setupStat
```

Build a new 'STAT' table.

See `fontTools.otlLib.builder.buildStatTable` for details about
the arguments.

---
## _makeunicodes
```python
from unicode import _makeunicodes
```



---
## _UnicodeCustom
```python
from unicode import _UnicodeCustom
```



---
## _UnicodeBuiltin
```python
from unicode import _UnicodeBuiltin
```



---
## setUnicodeData
```python
from unicode import setUnicodeData
```



---
## __getitem__
```python
from unicode import __getitem__
```



---
## __name__
```python
from tfmLib import __name__
```

Module for reading TFM (TeX Font Metrics) files.

The TFM format is described in the TFtoPL WEB source code, whose typeset form
can be found on `CTAN <http://mirrors.ctan.org/info/knuth-pdf/texware/tftopl.pdf>`_.

        >>> from fontTools.tfmLib import TFM
        >>> tfm = TFM("Tests/tfmLib/data/cmr10.tfm")
        >>>
        >>> # Accessing an attribute gets you metadata.
        >>> tfm.checksum
        1274110073
        >>> tfm.designsize
        10.0
        >>> tfm.codingscheme
        'TeX text'
        >>> tfm.family
        'CMR'
        >>> tfm.seven_bit_safe_flag
        False
        >>> tfm.face
        234
        >>> tfm.extraheader
        {}
        >>> tfm.fontdimens
        {'SLANT': 0.0, 'SPACE': 0.33333396911621094, 'STRETCH': 0.16666698455810547, 'SHRINK': 0.11111164093017578, 'XHEIGHT': 0.4305553436279297, 'QUAD': 1.0000028610229492, 'EXTRASPACE': 0.11111164093017578}
        >>> # Accessing a character gets you its metrics.
        >>> # “width” is always available, other metrics are available only when
        >>> # applicable. All values are relative to “designsize”.
        >>> tfm.chars[ord("g")]
        {'width': 0.5000019073486328, 'height': 0.4305553436279297, 'depth': 0.1944446563720703, 'italic': 0.013888359069824219}
        >>> # Kerning and ligature can be accessed as well.
        >>> tfm.kerning[ord("c")]
        {104: -0.02777862548828125, 107: -0.02777862548828125}
        >>> tfm.ligatures[ord("f")]
        {105: ('LIG', 12), 102: ('LIG', 11), 108: ('LIG', 13)}

---
## TFMException
```python
from tfmLib import TFMException
```



---
## TFM
```python
from tfmLib import TFM
```



---
## __init__
```python
from tfmLib import __init__
```



---
## __repr__
```python
from tfmLib import __repr__
```



---
## _read
```python
from tfmLib import _read
```



---
## char_info
```python
from tfmLib import char_info
```



---
## width_index
```python
from tfmLib import width_index
```



---
## noneexistent
```python
from tfmLib import noneexistent
```



---
## height_index
```python
from tfmLib import height_index
```



---
## depth_index
```python
from tfmLib import depth_index
```



---
## italic_index
```python
from tfmLib import italic_index
```



---
## tag
```python
from tfmLib import tag
```



---
## remainder
```python
from tfmLib import remainder
```



---
## width
```python
from tfmLib import width
```



---
## height
```python
from tfmLib import height
```



---
## depth
```python
from tfmLib import depth
```



---
## italic
```python
from tfmLib import italic
```



---
## exten
```python
from tfmLib import exten
```



---
## lig_step
```python
from tfmLib import lig_step
```



---
## lig_kern_command
```python
from tfmLib import lig_kern_command
```



---
## kern
```python
from tfmLib import kern
```



---
## param
```python
from tfmLib import param
```



---
## read_fixed
```python
from tfmLib import read_fixed
```



---
## __name__
```python
from afmLib import __name__
```

Module for reading and writing AFM (Adobe Font Metrics) files.

Note that this has been designed to read in AFM files generated by Fontographer
and has not been tested on many other files. In particular, it does not
implement the whole Adobe AFM specification [#f1]_ but, it should read most
"common" AFM files.

Here is an example of using `afmLib` to read, modify and write an AFM file:

        >>> from fontTools.afmLib import AFM
        >>> f = AFM("Tests/afmLib/data/TestAFM.afm")
        >>>
        >>> # Accessing a pair gets you the kern value
        >>> f[("V","A")]
        -60
        >>>
        >>> # Accessing a glyph name gets you metrics
        >>> f["A"]
        (65, 668, (8, -25, 660, 666))
        >>> # (charnum, width, bounding box)
        >>>
        >>> # Accessing an attribute gets you metadata
        >>> f.FontName
        'TestFont-Regular'
        >>> f.FamilyName
        'TestFont'
        >>> f.Weight
        'Regular'
        >>> f.XHeight
        500
        >>> f.Ascender
        750
        >>>
        >>> # Attributes and items can also be set
        >>> f[("A","V")] = -150 # Tighten kerning
        >>> f.FontName = "TestFont Squished"
        >>>
        >>> # And the font written out again (remove the # in front)
        >>> #f.write("testfont-squished.afm")

.. rubric:: Footnotes

.. [#f1] `Adobe Technote 5004 <https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf>`_,
   Adobe Font Metrics File Format Specification.

---
## error
```python
from afmLib import error
```



---
## AFM
```python
from afmLib import AFM
```



---
## readlines
```python
from afmLib import readlines
```



---
## writelines
```python
from afmLib import writelines
```



---
## __init__
```python
from afmLib import __init__
```

AFM file reader.

Instantiating an object with a path name will cause the file to be opened,
read, and parsed. Alternatively the path can be left unspecified, and a
file can be parsed later with the :meth:`read` method.

---
## read
```python
from afmLib import read
```

Opens, reads and parses a file.

---
## parsechar
```python
from afmLib import parsechar
```



---
## parsekernpair
```python
from afmLib import parsekernpair
```



---
## parseattr
```python
from afmLib import parseattr
```



---
## parsecomposite
```python
from afmLib import parsecomposite
```



---
## write
```python
from afmLib import write
```

Writes out an AFM font to the given path.

---
## has_kernpair
```python
from afmLib import has_kernpair
```

Returns `True` if the given glyph pair (specified as a tuple) exists
in the kerning dictionary.

---
## kernpairs
```python
from afmLib import kernpairs
```

Returns a list of all kern pairs in the kerning dictionary.

---
## has_char
```python
from afmLib import has_char
```

Returns `True` if the given glyph exists in the font.

---
## chars
```python
from afmLib import chars
```

Returns a list of all glyph names in the font.

---
## comments
```python
from afmLib import comments
```

Returns all comments from the file.

---
## addComment
```python
from afmLib import addComment
```

Adds a new comment to the file.

---
## addComposite
```python
from afmLib import addComposite
```

Specifies that the glyph `glyphName` is made up of the given components.
The components list should be of the following form::

        [
                (glyphname, xOffset, yOffset),
                ...
        ]

---
## __getattr__
```python
from afmLib import __getattr__
```



---
## __setattr__
```python
from afmLib import __setattr__
```



---
## __delattr__
```python
from afmLib import __delattr__
```



---
## __getitem__
```python
from afmLib import __getitem__
```



---
## __setitem__
```python
from afmLib import __setitem__
```



---
## __delitem__
```python
from afmLib import __delitem__
```



---
## __repr__
```python
from afmLib import __repr__
```



---
## myKey
```python
from afmLib import myKey
```

Custom key function to make sure unencoded chars (-1)
end up at the end of the list after sorting.

---
## __name__
```python
from agl import __name__
```

Interface to the Adobe Glyph List

This module exists to convert glyph names from the Adobe Glyph List
to their Unicode equivalents. Example usage:

        >>> from fontTools.agl import toUnicode
        >>> toUnicode("nahiragana")
        'な'

It also contains two dictionaries, ``UV2AGL`` and ``AGL2UV``, which map from
Unicode codepoints to AGL names and vice versa:

        >>> import fontTools
        >>> fontTools.agl.UV2AGL[ord("?")]
        'question'
        >>> fontTools.agl.AGL2UV["wcircumflex"]
        373

This is used by fontTools when it has to construct glyph names for a font which
doesn't include any (e.g. format 3.0 post tables).

---
## AGLError
```python
from agl import AGLError
```



---
## _builddicts
```python
from agl import _builddicts
```



---
## toUnicode
```python
from agl import toUnicode
```

Convert glyph names to Unicode, such as ``'longs_t.oldstyle'`` --> ``u'ſt'``

If ``isZapfDingbats`` is ``True``, the implementation recognizes additional
glyph names (as required by the AGL specification).

---
## _glyphComponentToUnicode
```python
from agl import _glyphComponentToUnicode
```



---
## _zapfDingbatsToUnicode
```python
from agl import _zapfDingbatsToUnicode
```

Helper for toUnicode().

---
## _uniToUnicode
```python
from agl import _uniToUnicode
```

Helper for toUnicode() to handle "uniABCD" components.

---
## _uToUnicode
```python
from agl import _uToUnicode
```

Helper for toUnicode() to handle "u1ABCD" components.

---
## __name__
```python
from help import __name__
```

Module containing bug report helper(s).

---
## main
```python
from help import main
```

Pretty-print the bug information as JSON.

---
## __name__
```python
from intranges import __name__
```

Given a list of integers, made up of (hopefully) a small number of long runs
of consecutive integers, compute a representation of the form
((start1, end1), (start2, end2) ...). Then answer the question "was x present
in the original list?" in time O(log(# runs)).

---
## intranges_from_list
```python
from intranges import intranges_from_list
```

Represent a list of integers as a sequence of ranges:
((start_0, end_0), (start_1, end_1), ...), such that the original
integers are exactly those x such that start_i <= x < end_i for some i.

Ranges are encoded as single integers (start << 32 | end), not as tuples.

---
## _encode_range
```python
from intranges import _encode_range
```



---
## _decode_range
```python
from intranges import _decode_range
```



---
## intranges_contain
```python
from intranges import intranges_contain
```

Determine if `int_` falls into one of the ranges in `ranges`.

---
## __name__
```python
from package_data import __name__
```



---
## __name__
```python
from compat import __name__
```



---
## ToASCII
```python
from compat import ToASCII
```



---
## ToUnicode
```python
from compat import ToUnicode
```



---
## nameprep
```python
from compat import nameprep
```



---
## __name__
```python
from idnadata import __name__
```



---
## IDNAError
```python
from core import IDNAError
```

Base exception for all IDNA-encoding related problems 

---
## IDNABidiError
```python
from core import IDNABidiError
```

Exception when bidirectional requirements are not satisfied 

---
## InvalidCodepoint
```python
from core import InvalidCodepoint
```

Exception when a disallowed or unallocated codepoint is used 

---
## InvalidCodepointContext
```python
from core import InvalidCodepointContext
```

Exception when the codepoint is not valid in the context it is used 

---
## _combining_class
```python
from core import _combining_class
```



---
## _is_script
```python
from core import _is_script
```



---
## _punycode
```python
from core import _punycode
```



---
## _unot
```python
from core import _unot
```



---
## valid_label_length
```python
from core import valid_label_length
```



---
## valid_string_length
```python
from core import valid_string_length
```



---
## check_bidi
```python
from core import check_bidi
```



---
## check_initial_combiner
```python
from core import check_initial_combiner
```



---
## check_hyphen_ok
```python
from core import check_hyphen_ok
```



---
## check_nfc
```python
from core import check_nfc
```



---
## valid_contextj
```python
from core import valid_contextj
```



---
## valid_contexto
```python
from core import valid_contexto
```



---
## check_label
```python
from core import check_label
```



---
## alabel
```python
from core import alabel
```



---
## ulabel
```python
from core import ulabel
```



---
## uts46_remap
```python
from core import uts46_remap
```

Re-map the characters in the string according to UTS46 processing.

---
## encode
```python
from core import encode
```



---
## decode
```python
from core import decode
```



---
## __name__
```python
from codec import __name__
```



---
## Codec
```python
from codec import Codec
```



---
## IncrementalEncoder
```python
from codec import IncrementalEncoder
```



---
## IncrementalDecoder
```python
from codec import IncrementalDecoder
```



---
## StreamWriter
```python
from codec import StreamWriter
```



---
## StreamReader
```python
from codec import StreamReader
```



---
## search_function
```python
from codec import search_function
```



---
## encode
```python
from codec import encode
```



---
## decode
```python
from codec import decode
```



---
## _buffer_encode
```python
from codec import _buffer_encode
```



---
## _buffer_decode
```python
from codec import _buffer_decode
```



---
## __name__
```python
from uts46data import __name__
```



---
## _seg_0
```python
from uts46data import _seg_0
```



---
## _seg_1
```python
from uts46data import _seg_1
```



---
## _seg_2
```python
from uts46data import _seg_2
```



---
## _seg_3
```python
from uts46data import _seg_3
```



---
## _seg_4
```python
from uts46data import _seg_4
```



---
## _seg_5
```python
from uts46data import _seg_5
```



---
## _seg_6
```python
from uts46data import _seg_6
```



---
## _seg_7
```python
from uts46data import _seg_7
```



---
## _seg_8
```python
from uts46data import _seg_8
```



---
## _seg_9
```python
from uts46data import _seg_9
```



---
## _seg_10
```python
from uts46data import _seg_10
```



---
## _seg_11
```python
from uts46data import _seg_11
```



---
## _seg_12
```python
from uts46data import _seg_12
```



---
## _seg_13
```python
from uts46data import _seg_13
```



---
## _seg_14
```python
from uts46data import _seg_14
```



---
## _seg_15
```python
from uts46data import _seg_15
```



---
## _seg_16
```python
from uts46data import _seg_16
```



---
## _seg_17
```python
from uts46data import _seg_17
```



---
## _seg_18
```python
from uts46data import _seg_18
```



---
## _seg_19
```python
from uts46data import _seg_19
```



---
## _seg_20
```python
from uts46data import _seg_20
```



---
## _seg_21
```python
from uts46data import _seg_21
```



---
## _seg_22
```python
from uts46data import _seg_22
```



---
## _seg_23
```python
from uts46data import _seg_23
```



---
## _seg_24
```python
from uts46data import _seg_24
```



---
## _seg_25
```python
from uts46data import _seg_25
```



---
## _seg_26
```python
from uts46data import _seg_26
```



---
## _seg_27
```python
from uts46data import _seg_27
```



---
## _seg_28
```python
from uts46data import _seg_28
```



---
## _seg_29
```python
from uts46data import _seg_29
```



---
## _seg_30
```python
from uts46data import _seg_30
```



---
## _seg_31
```python
from uts46data import _seg_31
```



---
## _seg_32
```python
from uts46data import _seg_32
```



---
## _seg_33
```python
from uts46data import _seg_33
```



---
## _seg_34
```python
from uts46data import _seg_34
```



---
## _seg_35
```python
from uts46data import _seg_35
```



---
## _seg_36
```python
from uts46data import _seg_36
```



---
## _seg_37
```python
from uts46data import _seg_37
```



---
## _seg_38
```python
from uts46data import _seg_38
```



---
## _seg_39
```python
from uts46data import _seg_39
```



---
## _seg_40
```python
from uts46data import _seg_40
```



---
## _seg_41
```python
from uts46data import _seg_41
```



---
## _seg_42
```python
from uts46data import _seg_42
```



---
## _seg_43
```python
from uts46data import _seg_43
```



---
## _seg_44
```python
from uts46data import _seg_44
```



---
## _seg_45
```python
from uts46data import _seg_45
```



---
## _seg_46
```python
from uts46data import _seg_46
```



---
## _seg_47
```python
from uts46data import _seg_47
```



---
## _seg_48
```python
from uts46data import _seg_48
```



---
## _seg_49
```python
from uts46data import _seg_49
```



---
## _seg_50
```python
from uts46data import _seg_50
```



---
## _seg_51
```python
from uts46data import _seg_51
```



---
## _seg_52
```python
from uts46data import _seg_52
```



---
## _seg_53
```python
from uts46data import _seg_53
```



---
## _seg_54
```python
from uts46data import _seg_54
```



---
## _seg_55
```python
from uts46data import _seg_55
```



---
## _seg_56
```python
from uts46data import _seg_56
```



---
## _seg_57
```python
from uts46data import _seg_57
```



---
## _seg_58
```python
from uts46data import _seg_58
```



---
## _seg_59
```python
from uts46data import _seg_59
```



---
## _seg_60
```python
from uts46data import _seg_60
```



---
## _seg_61
```python
from uts46data import _seg_61
```



---
## _seg_62
```python
from uts46data import _seg_62
```



---
## _seg_63
```python
from uts46data import _seg_63
```



---
## _seg_64
```python
from uts46data import _seg_64
```



---
## _seg_65
```python
from uts46data import _seg_65
```



---
## _seg_66
```python
from uts46data import _seg_66
```



---
## _seg_67
```python
from uts46data import _seg_67
```



---
## _seg_68
```python
from uts46data import _seg_68
```



---
## _seg_69
```python
from uts46data import _seg_69
```



---
## _seg_70
```python
from uts46data import _seg_70
```



---
## _seg_71
```python
from uts46data import _seg_71
```



---
## _seg_72
```python
from uts46data import _seg_72
```



---
## _seg_73
```python
from uts46data import _seg_73
```



---
## _seg_74
```python
from uts46data import _seg_74
```



---
## _seg_75
```python
from uts46data import _seg_75
```



---
## _seg_76
```python
from uts46data import _seg_76
```



---
## _seg_77
```python
from uts46data import _seg_77
```



---
## _seg_78
```python
from uts46data import _seg_78
```



---
## _seg_79
```python
from uts46data import _seg_79
```



---
## _seg_80
```python
from uts46data import _seg_80
```



---
## _seg_81
```python
from uts46data import _seg_81
```



---
## __name__
```python
from _magics import __name__
```

Magic functions for rendering vega-lite specifications.

---
## _prepare_data
```python
from _magics import _prepare_data
```

Convert input data to data for use within schema.

---
## _get_variable
```python
from _magics import _get_variable
```

Get a variable from the notebook namespace.

---
## vegalite
```python
from _magics import vegalite
```

Cell magic for displaying vega-lite visualizations in CoLab.

%%vegalite [dataframe] [--json] [--version='v5']

Visualize the contents of the cell using Vega-Lite, optionally
specifying a pandas DataFrame object to be used as the dataset.

if --json is passed, then input is parsed as json rather than yaml.

---
## PackageMetadata
```python
from _meta import PackageMetadata
```



---
## SimplePath
```python
from _meta import SimplePath
```

A minimal subset of pathlib.Path required by Distribution.

---
## __len__
```python
from _meta import __len__
```



---
## __contains__
```python
from _meta import __contains__
```



---
## __getitem__
```python
from _meta import __getitem__
```



---
## __iter__
```python
from _meta import __iter__
```



---
## get
```python
from _meta import get
```



---
## get_all
```python
from _meta import get_all
```

Return all values associated with a possibly multi-valued key.

---
## json
```python
from _meta import json
```

A JSON-compatible form of the metadata.

---
## joinpath
```python
from _meta import joinpath
```



---
## __truediv__
```python
from _meta import __truediv__
```



---
## parent
```python
from _meta import parent
```



---
## read_text
```python
from _meta import read_text
```



---
## read_bytes
```python
from _meta import read_bytes
```



---
## exists
```python
from _meta import exists
```



---
## __name__
```python
from _text import __name__
```



---
## FoldedCase
```python
from _text import FoldedCase
```

A case insensitive string class; behaves just like str
except compares equal when the only variation is case.

>>> s = FoldedCase('hello world')

>>> s == 'Hello World'
True

>>> 'Hello World' == s
True

>>> s != 'Hello World'
False

>>> s.index('O')
4

>>> s.split('O')
['hell', ' w', 'rld']

>>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
['alpha', 'Beta', 'GAMMA']

Sequence membership is straightforward.

>>> "Hello World" in [s]
True
>>> s in ["Hello World"]
True

You may test for set inclusion, but candidate and elements
must both be folded.

>>> FoldedCase("Hello World") in {s}
True
>>> s in {FoldedCase("Hello World")}
True

String inclusion works as long as the FoldedCase object
is on the right.

>>> "hello" in FoldedCase("Hello World")
True

But not if the FoldedCase object is on the left:

>>> FoldedCase('hello') in 'Hello World'
False

In that case, use in_:

>>> FoldedCase('hello').in_('Hello World')
True

>>> FoldedCase('hello') > FoldedCase('Hello')
False

---
## __lt__
```python
from _text import __lt__
```



---
## __gt__
```python
from _text import __gt__
```



---
## __eq__
```python
from _text import __eq__
```



---
## __ne__
```python
from _text import __ne__
```



---
## __hash__
```python
from _text import __hash__
```



---
## __contains__
```python
from _text import __contains__
```



---
## in_
```python
from _text import in_
```

Does self appear in other?

---
## lower
```python
from _text import lower
```



---
## index
```python
from _text import index
```



---
## split
```python
from _text import split
```



---
## PackageNotFoundError
```python
from __init__ import PackageNotFoundError
```

The package was not found.

---
## Sectioned
```python
from __init__ import Sectioned
```

A simple entry point config parser for performance

>>> for item in Sectioned.read(Sectioned._sample):
...     print(item)
Pair(name='sec1', value='# comments ignored')
Pair(name='sec1', value='a = 1')
Pair(name='sec1', value='b = 2')
Pair(name='sec2', value='a = 2')

>>> res = Sectioned.section_pairs(Sectioned._sample)
>>> item = next(res)
>>> item.name
'sec1'
>>> item.value
Pair(name='a', value='1')
>>> item = next(res)
>>> item.value
Pair(name='b', value='2')
>>> item = next(res)
>>> item.name
'sec2'
>>> item.value
Pair(name='a', value='2')
>>> list(res)
[]

---
## EntryPoint
```python
from __init__ import EntryPoint
```

Object representing an advertised importable object

---
## EntryPoints
```python
from __init__ import EntryPoints
```

An immutable collection of selectable EntryPoint objects.

---
## PackagePath
```python
from __init__ import PackagePath
```

A reference to a path in a package

---
## FileHash
```python
from __init__ import FileHash
```



---
## Distribution
```python
from __init__ import Distribution
```

Wrap an actual or potential sys.path entry w/metadata

---
## DistributionFinder
```python
from __init__ import DistributionFinder
```

A MetaPathFinder capable of discovering installed distributions.

Custom providers should implement this interface in order to
supply metadata.

---
## FastPath
```python
from __init__ import FastPath
```

Micro-optimized class for searching a root for children.

Root is a path on the file system that may contain metadata
directories either as natural directories or within a zip file.

>>> FastPath('').children()
['...']

FastPath objects are cached and recycled for any given root.

>>> FastPath('foobar') is FastPath('foobar')
True

---
## Lookup
```python
from __init__ import Lookup
```

A micro-optimized class for searching a (fast) path for metadata.

---
## Prepared
```python
from __init__ import Prepared
```

A prepared search query for metadata on a possibly-named package.

Pre-calculates the normalization to prevent repeated operations.

>>> none = Prepared(None)
>>> none.normalized
>>> none.legacy_normalized
>>> bool(none)
False
>>> sample = Prepared('Sample__Pkg-name.foo')
>>> sample.normalized
'sample_pkg_name_foo'
>>> sample.legacy_normalized
'sample__pkg_name.foo'
>>> bool(sample)
True

---
## MetadataPathFinder
```python
from __init__ import MetadataPathFinder
```

A degenerate finder for distribution packages on the file system.

This finder supplies only a find_distributions() method for versions
of Python that do not have a PathFinder find_distributions().

---
## PathDistribution
```python
from __init__ import PathDistribution
```



---
## distribution
```python
from __init__ import distribution
```

Get the ``Distribution`` instance for the named package.

:param distribution_name: The name of the distribution package as a string.
:return: A ``Distribution`` instance (or subclass thereof).

---
## distributions
```python
from __init__ import distributions
```

Get all ``Distribution`` instances in the current environment.

:return: An iterable of ``Distribution`` instances.

---
## metadata
```python
from __init__ import metadata
```

Return the parsed metadata for this Distribution.

The returned object will have keys that name the various bits of
metadata per the
`Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_.

Custom providers may provide the METADATA file or override this
property.

---
## version
```python
from __init__ import version
```



---
## entry_points
```python
from __init__ import entry_points
```

Return EntryPoints for this distribution.

Custom providers may provide the ``entry_points.txt`` file
or override this property.

---
## files
```python
from __init__ import files
```

Files in this distribution.

:return: List of PackagePath for this distribution or None

Result is `None` if the metadata file that enumerates files
(i.e. RECORD for dist-info, or installed-files.txt or
SOURCES.txt for egg-info) is missing.
Result may be empty if the metadata exists but is empty.

Custom providers are recommended to provide a "RECORD" file (in
``read_text``) or override this property to allow for callers to be
able to resolve filenames provided by the package.

---
## requires
```python
from __init__ import requires
```

List of Requirements needed for this distro if `extras` are used

---
## packages_distributions
```python
from __init__ import packages_distributions
```

Return a mapping of top-level packages to their
distributions.

>>> import collections.abc
>>> pkgs = packages_distributions()
>>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
True

---
## _top_level_declared
```python
from __init__ import _top_level_declared
```



---
## _topmost
```python
from __init__ import _topmost
```

Return the top-most parent as long as there is a parent.

---
## _get_toplevel_name
```python
from __init__ import _get_toplevel_name
```

Infer a possibly importable module name from a name presumed on
sys.path.

>>> _get_toplevel_name(PackagePath('foo.py'))
'foo'
>>> _get_toplevel_name(PackagePath('foo'))
'foo'
>>> _get_toplevel_name(PackagePath('foo.pyc'))
'foo'
>>> _get_toplevel_name(PackagePath('foo/__init__.py'))
'foo'
>>> _get_toplevel_name(PackagePath('foo.pth'))
'foo.pth'
>>> _get_toplevel_name(PackagePath('foo.dist-info'))
'foo.dist-info'

---
## _top_level_inferred
```python
from __init__ import _top_level_inferred
```



---
## name
```python
from __init__ import name
```



---
## section_pairs
```python
from __init__ import section_pairs
```



---
## read
```python
from __init__ import read
```

(Re-)read all files new or changed since last update.

Store all environment docnames in the canonical format (ie using SEP as
a separator in place of os.path.sep).

---
## valid
```python
from __init__ import valid
```



---
## load
```python
from __init__ import load
```



---
## module
```python
from __init__ import module
```



---
## attr
```python
from __init__ import attr
```



---
## extras
```python
from __init__ import extras
```



---
## _for
```python
from __init__ import _for
```



---
## matches
```python
from __init__ import matches
```

EntryPoint matches the given parameters.

>>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
>>> ep.matches(group='foo')
True
>>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
True
>>> ep.matches(group='foo', name='other')
False
>>> ep.matches()
True
>>> ep.matches(extras=['extra1', 'extra2'])
True
>>> ep.matches(module='bing')
True
>>> ep.matches(attr='bong')
True

---
## _disallow_dist
```python
from __init__ import _disallow_dist
```

Querying by dist is not allowed (dist objects are not comparable).
>>> EntryPoint(name='fan', value='fav', group='fag').matches(dist='foo')
Traceback (most recent call last):
...
ValueError: "dist" is not suitable for matching...

---
## _key
```python
from __init__ import _key
```



---
## __setattr__
```python
from __init__ import __setattr__
```



---
## names
```python
from __init__ import names
```

Return the set of all names of all entry points.

---
## groups
```python
from __init__ import groups
```

Return the set of all groups of all entry points.

---
## _from_text_for
```python
from __init__ import _from_text_for
```



---
## _from_text
```python
from __init__ import _from_text
```



---
## read_text
```python
from __init__ import read_text
```



---
## read_binary
```python
from __init__ import read_binary
```



---
## locate
```python
from __init__ import locate
```

Return a path-like object for this path

---
## locate_file
```python
from __init__ import locate_file
```



---
## from_name
```python
from __init__ import from_name
```

Return the Distribution for the given package name.

:param name: The name of the distribution package to search for.
:return: The Distribution instance (or subclass thereof) for the named
    package, if found.
:raises PackageNotFoundError: When the named package's distribution
    metadata cannot be found.
:raises ValueError: When an invalid value is supplied for name.

---
## discover
```python
from __init__ import discover
```

Return an iterable of Distribution objects for all packages.

Pass a ``context`` or pass keyword arguments for constructing
a context.

:context: A ``DistributionFinder.Context`` object.
:return: Iterable of Distribution objects for packages matching
  the context.

---
## _prefer_valid
```python
from __init__ import _prefer_valid
```

Prefer (move to the front) distributions that have metadata.

Ref python/importlib_resources#489.

---
## at
```python
from __init__ import at
```



---
## _discover_resolvers
```python
from __init__ import _discover_resolvers
```

Search the meta_path for resolvers (MetadataPathFinders).

---
## _normalized_name
```python
from __init__ import _normalized_name
```

Performance optimization: where possible, resolve the
normalized name from the file system path.

---
## _read_files_distinfo
```python
from __init__ import _read_files_distinfo
```

Read the lines of RECORD.

---
## _read_files_egginfo_installed
```python
from __init__ import _read_files_egginfo_installed
```

Read installed-files.txt and return lines in a similar
CSV-parsable format as RECORD: each file must be placed
relative to the site-packages directory and must also be
quoted (since file names can contain literal commas).

This file is written when the package is installed by pip,
but it might not be written for other installation methods.
Assume the file is accurate if it exists.

---
## _read_files_egginfo_sources
```python
from __init__ import _read_files_egginfo_sources
```

Read SOURCES.txt and return lines in a similar CSV-parsable
format as RECORD: each file name must be quoted (since it
might contain literal commas).

Note that SOURCES.txt is not a reliable source for what
files are installed by a package. This file is generated
for a source archive, and the files that are present
there (e.g. setup.py) may not correctly reflect the files
that are present after the package has been installed.

---
## _read_dist_info_reqs
```python
from __init__ import _read_dist_info_reqs
```



---
## _read_egg_info_reqs
```python
from __init__ import _read_egg_info_reqs
```



---
## _deps_from_requires_text
```python
from __init__ import _deps_from_requires_text
```



---
## _convert_egg_info_reqs_to_simple_reqs
```python
from __init__ import _convert_egg_info_reqs_to_simple_reqs
```

Historically, setuptools would solicit and store 'extra'
requirements, including those with environment markers,
in separate sections. More modern tools expect each
dependency to be defined separately, with any relevant
extras and environment markers attached directly to that
requirement. This method converts the former to the
latter. See _test_deps_from_requires_text for an example.

---
## origin
```python
from __init__ import origin
```



---
## _load_json
```python
from __init__ import _load_json
```



---
## Context
```python
from __init__ import Context
```

Keyword arguments presented by the caller to
``distributions()`` or ``Distribution.discover()``
to narrow the scope of a search for distributions
in all DistributionFinders.

Each DistributionFinder may expect any parameters
and should attempt to honor the canonical
parameters defined below when appropriate.

This mechanism gives a custom provider a means to
solicit additional details from the caller beyond
"name" and "path" when searching distributions.
For example, imagine a provider that exposes suites
of packages in either a "public" or "private" ``realm``.
A caller may wish to query only for distributions in
a particular realm and could call
``distributions(realm="private")`` to signal to the
custom provider to only include distributions from that
realm.

---
## find_distributions
```python
from __init__ import find_distributions
```

Yield distributions accessible via `path_item`

---
## joinpath
```python
from __init__ import joinpath
```



---
## children
```python
from __init__ import children
```



---
## zip_children
```python
from __init__ import zip_children
```



---
## search
```python
from __init__ import search
```

Yield all infos and eggs matching the Prepared query.

---
## mtime
```python
from __init__ import mtime
```



---
## lookup
```python
from __init__ import lookup
```

Look up a TreeBuilder subclass with the desired features.

:param features: A list of features to look for. If none are
    provided, the most recently registered TreeBuilder subclass
    will be used.
:return: A TreeBuilder subclass, or None if there's no
    registered subclass with all the requested features.

---
## normalize
```python
from __init__ import normalize
```

Return a new NormalizedAxisLimits with normalized -1..0..+1 values.

If usingAvar is True, the avar table is used to warp the default normalization.

---
## legacy_normalize
```python
from __init__ import legacy_normalize
```

Normalize the package name as found in the convention in
older packaging tools versions and specs.

---
## __bool__
```python
from __init__ import __bool__
```



---
## _search_paths
```python
from __init__ import _search_paths
```

Find metadata directories in paths heuristically.

---
## invalidate_caches
```python
from __init__ import invalidate_caches
```



---
## _name_from_stem
```python
from __init__ import _name_from_stem
```

>>> PathDistribution._name_from_stem('foo-3.0.egg-info')
'foo'
>>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
'CherryPy'
>>> PathDistribution._name_from_stem('face.egg-info')
'face'
>>> PathDistribution._name_from_stem('foo.bar')

---
## importable_name
```python
from __init__ import importable_name
```



---
## make_file
```python
from __init__ import make_file
```



---
## make_files
```python
from __init__ import make_files
```



---
## skip_missing_files
```python
from __init__ import skip_missing_files
```



---
## make_condition
```python
from __init__ import make_condition
```



---
## quoted_marker
```python
from __init__ import quoted_marker
```



---
## url_req_space
```python
from __init__ import url_req_space
```

PEP 508 requires a space between the url_spec and the quoted_marker.
Ref python/importlib_metadata#357.

---
## path
```python
from __init__ import path
```

Return the path argument unwrapped (with newlines removed).
(Directive option conversion function.)

Raise ``ValueError`` if no argument is found.

---
## __name__
```python
from _functools import __name__
```



---
## method_cache
```python
from _functools import method_cache
```

Wrap lru_cache to support storing the cache data in the object instances.

Abstracts the common paradigm where the method explicitly saves an
underscore-prefixed protected property on first call and returns that
subsequently.

>>> class MyClass:
...     calls = 0
...
...     @method_cache
...     def method(self, value):
...         self.calls += 1
...         return value

>>> a = MyClass()
>>> a.method(3)
3
>>> for x in range(75):
...     res = a.method(x)
>>> a.calls
75

Note that the apparent behavior will be exactly like that of lru_cache
except that the cache is stored on each instance, so values in one
instance will not flush values from another, and when an instance is
deleted, so are the cached values for that instance.

>>> b = MyClass()
>>> for x in range(35):
...     res = b.method(x)
>>> b.calls
35
>>> a.method(0)
0
>>> a.calls
75

Note that if method had been decorated with ``functools.lru_cache()``,
a.calls would have been 76 (due to the cached value of 0 having been
flushed by the 'b' instance).

Clear the cache with ``.cache_clear()``

>>> a.method.cache_clear()

Same for a method that hasn't yet been called.

>>> c = MyClass()
>>> c.method.cache_clear()

Another cache wrapper may be supplied:

>>> cache = functools.lru_cache(maxsize=2)
>>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
>>> a = MyClass()
>>> a.method2()
3

Caution - do not subsequently wrap the method with another decorator, such
as ``@property``, which changes the semantics of the function.

See also
http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
for another implementation and additional justification.

---
## pass_none
```python
from _functools import pass_none
```

Wrap func so it's not called if its first param is None

>>> print_text = pass_none(print)
>>> print_text('text')
text
>>> print_text(None)

---
## wrapper
```python
from _functools import wrapper
```



---
## __name__
```python
from diagnose import __name__
```



---
## inspect
```python
from diagnose import inspect
```



---
## run
```python
from diagnose import run
```



---
## __name__
```python
from _collections import __name__
```



---
## FreezableDefaultDict
```python
from _collections import FreezableDefaultDict
```

Often it is desirable to prevent the mutation of
a default dict after its initial construction, such
as to prevent mutation during iteration.

>>> dd = FreezableDefaultDict(list)
>>> dd[0].append('1')
>>> dd.freeze()
>>> dd[1]
[]
>>> len(dd)
1

---
## Pair
```python
from _collections import Pair
```



---
## __missing__
```python
from _collections import __missing__
```



---
## freeze
```python
from _collections import freeze
```



---
## parse
```python
from _collections import parse
```



---
## __name__
```python
from _itertools import __name__
```



---
## unique_everseen
```python
from _itertools import unique_everseen
```

List unique elements, preserving order. Remember all elements ever seen.

---
## always_iterable
```python
from _itertools import always_iterable
```

If *obj* is iterable, return an iterator over its items::

    >>> obj = (1, 2, 3)
    >>> list(always_iterable(obj))
    [1, 2, 3]

If *obj* is not iterable, return a one-item iterable containing *obj*::

    >>> obj = 1
    >>> list(always_iterable(obj))
    [1]

If *obj* is ``None``, return an empty iterable:

    >>> obj = None
    >>> list(always_iterable(None))
    []

By default, binary and text strings are not considered iterable::

    >>> obj = 'foo'
    >>> list(always_iterable(obj))
    ['foo']

If *base_type* is set, objects for which ``isinstance(obj, base_type)``
returns ``True`` won't be considered iterable.

    >>> obj = {'a': 1}
    >>> list(always_iterable(obj))  # Iterate over the dict's keys
    ['a']
    >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
    [{'a': 1}]

Set *base_type* to ``None`` to avoid any special handling and treat objects
Python considers iterable as iterable:

    >>> obj = 'foo'
    >>> list(always_iterable(obj, base_type=None))
    ['f', 'o', 'o']

---
## bucket
```python
from _itertools import bucket
```

Wrap *iterable* and return an object that buckets the iterable into
child iterables based on a *key* function.

    >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
    >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
    >>> sorted(list(s))  # Get the keys
    ['a', 'b', 'c']
    >>> a_iterable = s['a']
    >>> next(a_iterable)
    'a1'
    >>> next(a_iterable)
    'a2'
    >>> list(s['b'])
    ['b1', 'b2', 'b3']

The original iterable will be advanced and its items will be cached until
they are used by the child iterables. This may require significant storage.

By default, attempting to select a bucket to which no items belong  will
exhaust the iterable and cache all values.
If you specify a *validator* function, selected buckets will instead be
checked against it.

    >>> from itertools import count
    >>> it = count(1, 2)  # Infinite sequence of odd numbers
    >>> key = lambda x: x % 10  # Bucket by last digit
    >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
    >>> s = bucket(it, key=key, validator=validator)
    >>> 2 in s
    False
    >>> list(s[2])
    []

---
## __init__
```python
from _itertools import __init__
```



---
## __contains__
```python
from _itertools import __contains__
```



---
## _get_values
```python
from _itertools import _get_values
```

Helper to yield items from the parent iterator that match *value*.
Items that don't match are stored in the local cache as they
are encountered.

---
## __iter__
```python
from _itertools import __iter__
```



---
## __getitem__
```python
from _itertools import __getitem__
```



---
## __name__
```python
from _adapters import __name__
```



---
## Message
```python
from _adapters import Message
```



---
## __new__
```python
from _adapters import __new__
```



---
## __init__
```python
from _adapters import __init__
```



---
## __iter__
```python
from _adapters import __iter__
```



---
## __getitem__
```python
from _adapters import __getitem__
```

Override parent behavior to typical dict behavior.

``email.message.Message`` will emit None values for missing
keys. Typical mappings, including this ``Message``, will raise
a key error for missing keys.

Ref python/importlib_metadata#371.

---
## _repair_headers
```python
from _adapters import _repair_headers
```



---
## json
```python
from _adapters import json
```

Convert PackageMetadata to a JSON-compatible format
per PEP 0566.

---
## redent
```python
from _adapters import redent
```

Correct for RFC822 indentation

---
## transform
```python
from _adapters import transform
```



---
## install
```python
from _compat import install
```

Class decorator for installation on sys.meta_path.

Adds the backport DistributionFinder to sys.meta_path and
attempts to disable the finder functionality of the stdlib
DistributionFinder.

---
## disable_stdlib_finder
```python
from _compat import disable_stdlib_finder
```

Give the backport primacy for discovering path-based distributions
by monkey-patching the stdlib O_O.

See #91 for more background for rationale on this sketchy
behavior.

---
## NullFinder
```python
from _compat import NullFinder
```

A "Finder" (aka "MetaPathFinder") that never finds any modules,
but may find distributions.

---
## pypy_partial
```python
from _compat import pypy_partial
```

Adjust for variable stacklevel on partial under PyPy.

Workaround for #327.

---
## matches
```python
from _compat import matches
```



---
## find_spec
```python
from _compat import find_spec
```



---
## HTMLFormatter
```python
from formatter import HTMLFormatter
```

A generic Formatter for HTML.

---
## XMLFormatter
```python
from formatter import XMLFormatter
```

A generic Formatter for XML.

---
## _default
```python
from formatter import _default
```



---
## substitute
```python
from formatter import substitute
```

Process a string that needs to undergo entity substitution.
This may be a string encountered in an attribute value or as
text.

:param ns: A string.
:return: A string with certain characters replaced by named
   or numeric entities.

---
## attribute_value
```python
from formatter import attribute_value
```

Process the value of an attribute.

:param ns: A string.
:return: A string with certain characters replaced by named
   or numeric entities.

---
## attributes
```python
from formatter import attributes
```

Reorder a tag's attributes however you want.

By default, attributes are sorted alphabetically. This makes
behavior consistent between Python 2 and Python 3, and preserves
backwards compatibility with older versions of Beautiful Soup.

If `empty_boolean_attributes` is True, then attributes whose
values are set to the empty string will be treated as boolean
attributes.

---
## GuessedAtParserWarning
```python
from __init__ import GuessedAtParserWarning
```

The warning issued when BeautifulSoup has to guess what parser to
use -- probably because no parser was specified in the constructor.

---
## MarkupResemblesLocatorWarning
```python
from __init__ import MarkupResemblesLocatorWarning
```

The warning issued when BeautifulSoup is given 'markup' that
actually looks like a resource locator -- a URL or a path to a file
on disk.

---
## BeautifulSoup
```python
from __init__ import BeautifulSoup
```

A data structure representing a parsed HTML or XML document.

Most of the methods you'll call on a BeautifulSoup object are inherited from
PageElement or Tag.

Internally, this class defines the basic interface called by the
tree builders when converting an HTML/XML document into a data
structure. The interface abstracts away the differences between
parsers. To write a new tree builder, you'll need to understand
these methods as a whole.

These methods will be called by the BeautifulSoup constructor:
  * reset()
  * feed(markup)

The tree builder may call these methods from its feed() implementation:
  * handle_starttag(name, attrs) # See note about return value
  * handle_endtag(name)
  * handle_data(data) # Appends to the current data node
  * endData(containerClass) # Ends the current data node

No matter how complicated the underlying parser is, you should be
able to build a tree using 'start tag' events, 'end tag' events,
'data' events, and "done with data" events.

If you encounter an empty-element tag (aka a self-closing tag,
like HTML's <br> tag), call handle_starttag and then
handle_endtag.

---
## BeautifulStoneSoup
```python
from __init__ import BeautifulStoneSoup
```

Deprecated interface to an XML parser.

---
## StopParsing
```python
from __init__ import StopParsing
```

Exception raised by a TreeBuilder if it's unable to continue parsing.

---
## FeatureNotFound
```python
from __init__ import FeatureNotFound
```

Exception raised by the BeautifulSoup constructor if no parser with the
requested features is found.

---
## _clone
```python
from __init__ import _clone
```

Create a new BeautifulSoup object with the same TreeBuilder,
but not associated with any markup.

This is the first step of the deepcopy process.

---
## __getstate__
```python
from __init__ import __getstate__
```



---
## __setstate__
```python
from __init__ import __setstate__
```



---
## _decode_markup
```python
from __init__ import _decode_markup
```

Ensure `markup` is bytes so it's safe to send into warnings.warn.

TODO: warnings.warn had this problem back in 2010 but it might not
anymore.

---
## _markup_is_url
```python
from __init__ import _markup_is_url
```

Error-handling method to raise a warning if incoming markup looks
like a URL.

:param markup: A string.
:return: Whether or not the markup resembles a URL
    closely enough to justify a warning.

---
## _markup_resembles_filename
```python
from __init__ import _markup_resembles_filename
```

Error-handling method to raise a warning if incoming markup
resembles a filename.

:param markup: A bytestring or string.
:return: Whether or not the markup resembles a filename
    closely enough to justify a warning.

---
## _feed
```python
from __init__ import _feed
```

Internal method that parses previously set markup, creating a large
number of Tag and NavigableString objects.

---
## reset
```python
from __init__ import reset
```

Do any work necessary to reset the underlying parser
for a new document.

By default, this does nothing.

---
## new_tag
```python
from __init__ import new_tag
```

Create a new Tag associated with this BeautifulSoup object.

:param name: The name of the new Tag.
:param namespace: The URI of the new Tag's XML namespace, if any.
:param prefix: The prefix for the new Tag's XML namespace, if any.
:param attrs: A dictionary of this Tag's attribute values; can
    be used instead of `kwattrs` for attributes like 'class'
    that are reserved words in Python.
:param sourceline: The line number where this tag was
    (purportedly) found in its source document.
:param sourcepos: The character position within `sourceline` where this
    tag was (purportedly) found.
:param kwattrs: Keyword arguments for the new Tag's attribute values.

---
## string_container
```python
from __init__ import string_container
```



---
## new_string
```python
from __init__ import new_string
```

Create a new NavigableString associated with this BeautifulSoup
object.

---
## insert_before
```python
from __init__ import insert_before
```

This method is part of the PageElement API, but `BeautifulSoup` doesn't implement
it because there is nothing before or after it in the parse tree.

---
## insert_after
```python
from __init__ import insert_after
```

This method is part of the PageElement API, but `BeautifulSoup` doesn't implement
it because there is nothing before or after it in the parse tree.

---
## popTag
```python
from __init__ import popTag
```

Internal method called by _popToTag when a tag is closed.

---
## pushTag
```python
from __init__ import pushTag
```

Internal method called by handle_starttag when a tag is opened.

---
## endData
```python
from __init__ import endData
```

Method called by the TreeBuilder when the end of a data segment
occurs.

---
## object_was_parsed
```python
from __init__ import object_was_parsed
```

Method called by the TreeBuilder to integrate an object into the parse tree.

---
## _linkage_fixer
```python
from __init__ import _linkage_fixer
```

Make sure linkage of this fragment is sound.

---
## _popToTag
```python
from __init__ import _popToTag
```

Pops the tag stack up to and including the most recent
instance of the given tag.

If there are no open tags with the given name, nothing will be
popped.

:param name: Pop up to the most recent tag with this name.
:param nsprefix: The namespace prefix that goes with `name`.
:param inclusivePop: It this is false, pops the tag stack up
  to but *not* including the most recent instqance of the
  given tag.

---
## decode
```python
from __init__ import decode
```

Returns a string or Unicode representation of the parse tree
    as an HTML or XML document.

:param pretty_print: If this is True, indentation will be used to
    make the document more readable.
:param eventual_encoding: The encoding of the final document.
    If this is None, the document will be a Unicode string.

---
## deprecated_argument
```python
from __init__ import deprecated_argument
```



---
## __name__
```python
from element import __name__
```



---
## _alias
```python
from element import _alias
```

Alias one attribute name to another for backward compatibility

---
## NamespacedAttribute
```python
from element import NamespacedAttribute
```

A namespaced string (e.g. 'xml:lang') that remembers the namespace
('xml') and the name ('lang') that were used to create it.

---
## AttributeValueWithCharsetSubstitution
```python
from element import AttributeValueWithCharsetSubstitution
```

A stand-in object for a character encoding specified in HTML.

---
## CharsetMetaAttributeValue
```python
from element import CharsetMetaAttributeValue
```

A generic stand-in for the value of a meta tag's 'charset' attribute.

When Beautiful Soup parses the markup '<meta charset="utf8">', the
value of the 'charset' attribute will be one of these objects.

---
## ContentMetaAttributeValue
```python
from element import ContentMetaAttributeValue
```

A generic stand-in for the value of a meta tag's 'content' attribute.

When Beautiful Soup parses the markup:
 <meta http-equiv="content-type" content="text/html; charset=utf8">

The value of the 'content' attribute will be one of these objects.

---
## PageElement
```python
from element import PageElement
```

Contains the navigational information for some part of the page:
that is, its current location in the parse tree.

NavigableString, Tag, etc. are all subclasses of PageElement.

---
## NavigableString
```python
from element import NavigableString
```

A Python Unicode string that is part of a parse tree.

When Beautiful Soup parses the markup <b>penguin</b>, it will
create a NavigableString for the string "penguin".

---
## PreformattedString
```python
from element import PreformattedString
```

A NavigableString not subject to the normal formatting rules.

This is an abstract class used for special kinds of strings such
as comments (the Comment class) and CDATA blocks (the CData
class).

---
## CData
```python
from element import CData
```

A CDATA block.

---
## ProcessingInstruction
```python
from element import ProcessingInstruction
```

A SGML processing instruction.

---
## XMLProcessingInstruction
```python
from element import XMLProcessingInstruction
```

An XML processing instruction.

---
## Comment
```python
from element import Comment
```

An HTML or XML comment.

---
## Declaration
```python
from element import Declaration
```

An XML declaration.

---
## Doctype
```python
from element import Doctype
```

A document type declaration.

---
## Stylesheet
```python
from element import Stylesheet
```

A NavigableString representing an stylesheet (probably
CSS).

Used to distinguish embedded stylesheets from textual content.

---
## Script
```python
from element import Script
```

A NavigableString representing an executable script (probably
Javascript).

Used to distinguish executable code from textual content.

---
## TemplateString
```python
from element import TemplateString
```

A NavigableString representing a string found inside an HTML
template embedded in a larger document.

Used to distinguish such strings from the main body of the document.

---
## RubyTextString
```python
from element import RubyTextString
```

A NavigableString representing the contents of the <rt> HTML
element.

https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rt-element

Can be used to distinguish such strings from the strings they're
annotating.

---
## RubyParenthesisString
```python
from element import RubyParenthesisString
```

A NavigableString representing the contents of the <rp> HTML
element.

https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rp-element

---
## Tag
```python
from element import Tag
```

Represents an HTML or XML tag that is part of a parse tree, along
with its attributes and contents.

When Beautiful Soup parses the markup <b>penguin</b>, it will
create a Tag object representing the <b> tag.

---
## SoupStrainer
```python
from element import SoupStrainer
```

Encapsulates a number of ways of matching a markup element (tag or
string).

This is primarily used to underpin the find_* methods, but you can
create one yourself and pass it in as `parse_only` to the
`BeautifulSoup` constructor, to parse a subset of a large
document.

---
## ResultSet
```python
from element import ResultSet
```

A ResultSet is just a list that keeps track of the SoupStrainer
that created it.

---
## alias
```python
from element import alias
```



---
## __new__
```python
from element import __new__
```

Create a new NavigableString.

When unpickling a NavigableString, this method is called with
the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
passed in to the superclass's __new__ or the superclass won't know
how to handle non-ASCII characters.

---
## encode
```python
from element import encode
```

Render a bytestring representation of this PageElement and its
contents.

:param encoding: The destination encoding.
:param indent_level: Each line of the rendering will be
   indented this many levels. (The formatter decides what a
   'level' means in terms of spaces or other characters
   output.) Used internally in recursive calls while
   pretty-printing.
:param formatter: A Formatter object, or a string naming one of
    the standard formatters.
:param errors: An error handling strategy such as
    'xmlcharrefreplace'. This value is passed along into
    encode() and its value should be one of the constants
    defined by Python.
:return: A bytestring.

---
## setup
```python
from element import setup
```

Sets up the initial relations between this element and
other elements.

:param parent: The parent of this element.

:param previous_element: The element parsed immediately before
    this one.

:param next_element: The element parsed immediately before
    this one.

:param previous_sibling: The most recently encountered element
    on the same level of the parse tree as this one.

:param previous_sibling: The next element to be encountered
    on the same level of the parse tree as this one.

---
## format_string
```python
from element import format_string
```

Format the given string using the given formatter.

:param s: A string.
:param formatter: A Formatter object, or a string naming one of the standard formatters.

---
## formatter_for_name
```python
from element import formatter_for_name
```

Look up or create a Formatter for the given identifier,
if necessary.

:param formatter: Can be a Formatter object (used as-is), a
    function (used as the entity substitution hook for an
    XMLFormatter or HTMLFormatter), or a string (used to look
    up an XMLFormatter or HTMLFormatter in the appropriate
    registry.

---
## _is_xml
```python
from element import _is_xml
```

Is this element part of an XML tree or an HTML tree?

This is used in formatter_for_name, when deciding whether an
XMLFormatter or HTMLFormatter is more appropriate. It can be
inefficient, but it should be called very rarely.

---
## _all_strings
```python
from element import _all_strings
```

Yield all strings of certain classes, possibly stripping them.

:param strip: If True, all strings will be stripped before being
    yielded.

:param types: A tuple of NavigableString subclasses. Any strings of
    a subclass not found in this list will be ignored. By
    default, the subclasses considered are the ones found in
    self.interesting_string_types. If that's not specified,
    only NavigableString and CData objects will be
    considered. That means no comments, processing
    instructions, etc.

:yield: A sequence of strings.

---
## stripped_strings
```python
from element import stripped_strings
```

Yield all strings in this PageElement, stripping them first.

:yield: A sequence of stripped strings.

---
## get_text
```python
from element import get_text
```

Get all child strings of this PageElement, concatenated using the
given separator.

:param separator: Strings will be concatenated using this separator.

:param strip: If True, strings will be stripped before being
    concatenated.

:param types: A tuple of NavigableString subclasses. Any
    strings of a subclass not found in this list will be
    ignored. Although there are exceptions, the default
    behavior in most cases is to consider only NavigableString
    and CData objects. That means no comments, processing
    instructions, etc.

:return: A string.

---
## replace_with
```python
from element import replace_with
```

Replace this PageElement with one or more PageElements, keeping the
rest of the tree the same.

:param args: One or more PageElements.
:return: `self`, no longer part of the tree.

---
## unwrap
```python
from element import unwrap
```

Replace this PageElement with its contents.

:return: `self`, no longer part of the tree.

---
## wrap
```python
from element import wrap
```

Wrap this PageElement inside another one.

:param wrap_inside: A PageElement.
:return: `wrap_inside`, occupying the position in the tree that used
   to be occupied by `self`, and with `self` inside it.

---
## extract
```python
from element import extract
```

Destructively rips this element out of the tree.

:param _self_index: The location of this element in its parent's
   .contents, if known. Passing this in allows for a performance
   optimization.

:return: `self`, no longer part of the tree.

---
## _last_descendant
```python
from element import _last_descendant
```

Finds the last element beneath this object to be parsed.

:param is_initialized: Has `setup` been called on this PageElement
    yet?
:param accept_self: Is `self` an acceptable answer to the question?

---
## insert
```python
from element import insert
```

Insert a new PageElement in the list of this PageElement's children.

This works the same way as `list.insert`.

:param position: The numeric position that should be occupied
   in `self.children` by the new PageElement.
:param new_child: A PageElement.

---
## append
```python
from element import append
```

Appends the given PageElement to the contents of this one.

:param tag: A PageElement.

---
## extend
```python
from element import extend
```

Appends the given PageElements to this one's contents.

:param tags: A list of PageElements. If a single Tag is
    provided instead, this PageElement's contents will be extended
    with that Tag's contents.

---
## insert_before
```python
from element import insert_before
```

Makes the given element(s) the immediate predecessor of this one.

All the elements will have the same parent, and the given elements
will be immediately before this one.

:param args: One or more PageElements.

---
## insert_after
```python
from element import insert_after
```

Makes the given element(s) the immediate successor of this one.

The elements will have the same parent, and the given elements
will be immediately after this one.

:param args: One or more PageElements.

---
## find_next
```python
from element import find_next
```

Find the first PageElement that matches the given criteria and
appears later in the document than this PageElement.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_all_next
```python
from element import find_all_next
```

Find all PageElements that match the given criteria and appear
later in the document than this PageElement.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet containing PageElements.

---
## find_next_sibling
```python
from element import find_next_sibling
```

Find the closest sibling to this PageElement that matches the
given criteria and appears later in the document.

All find_* methods take a common set of arguments. See the
online documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_next_siblings
```python
from element import find_next_siblings
```

Find all siblings of this PageElement that match the given criteria
and appear later in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet

---
## find_previous
```python
from element import find_previous
```

Look backwards in the document from this PageElement and find the
first PageElement that matches the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_all_previous
```python
from element import find_all_previous
```

Look backwards in the document from this PageElement and find all
PageElements that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet

---
## find_previous_sibling
```python
from element import find_previous_sibling
```

Returns the closest sibling to this PageElement that matches the
given criteria and appears earlier in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_previous_siblings
```python
from element import find_previous_siblings
```

Returns all siblings to this PageElement that match the
given criteria and appear earlier in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet

---
## find_parent
```python
from element import find_parent
```

Find the closest parent of this PageElement that matches the given
criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:kwargs: A dictionary of filters on attribute values.

:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_parents
```python
from element import find_parents
```

Find all parents of this PageElement that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.

:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## next
```python
from element import next
```

The PageElement, if any, that was parsed just after this one.

:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## previous
```python
from element import previous
```

The PageElement, if any, that was parsed just before this one.

:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## _find_one
```python
from element import _find_one
```



---
## _find_all
```python
from element import _find_all
```

Iterates over a generator looking for things that match.

---
## next_elements
```python
from element import next_elements
```

All PageElements that were parsed after this one.

:yield: A sequence of PageElements.

---
## next_siblings
```python
from element import next_siblings
```

All PageElements that are siblings of this one but were parsed
later.

:yield: A sequence of PageElements.

---
## previous_elements
```python
from element import previous_elements
```

All PageElements that were parsed before this one.

:yield: A sequence of PageElements.

---
## previous_siblings
```python
from element import previous_siblings
```

All PageElements that are siblings of this one but were parsed
earlier.

:yield: A sequence of PageElements.

---
## parents
```python
from element import parents
```

All PageElements that are parents of this PageElement.

:yield: A sequence of PageElements.

---
## decomposed
```python
from element import decomposed
```

Check whether a PageElement has been decomposed.

:rtype: bool

---
## nextGenerator
```python
from element import nextGenerator
```



---
## nextSiblingGenerator
```python
from element import nextSiblingGenerator
```



---
## previousGenerator
```python
from element import previousGenerator
```



---
## previousSiblingGenerator
```python
from element import previousSiblingGenerator
```



---
## parentGenerator
```python
from element import parentGenerator
```



---
## __deepcopy__
```python
from element import __deepcopy__
```

A deepcopy of a Tag is a new Tag, unconnected to the parse tree.
Its contents are a copy of the old Tag's contents.

---
## __copy__
```python
from element import __copy__
```

A copy of a Tag must always be a deep copy, because a Tag's
children can only have one parent at a time.

---
## __getnewargs__
```python
from element import __getnewargs__
```



---
## __getattr__
```python
from element import __getattr__
```

Raise a helpful exception to explain a common code fix.

---
## output_ready
```python
from element import output_ready
```

Make this string ready for output by adding any subclass-specific
    prefix or suffix.

:param formatter: A Formatter object, or a string naming one
    of the standard formatters. The string will be passed into the
    Formatter, but only to trigger any side effects: the return
    value is ignored.

:return: The string, with any subclass-specific prefix and
   suffix added on.

---
## name
```python
from element import name
```

Prevent NavigableString.name from ever being set.

---
## for_name_and_ids
```python
from element import for_name_and_ids
```

Generate an appropriate document type declaration for a given
public ID and system ID.

:param name: The name of the document's root element, e.g. 'html'.
:param pub_id: The Formal Public Identifier for this document type,
    e.g. '-//W3C//DTD XHTML 1.1//EN'
:param system_id: The system identifier for this document type,
    e.g. 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'

:return: A Doctype.

---
## __init__
```python
from element import __init__
```

Constructor.

:param source: A SoupStrainer.
:param result: A list of PageElements.

---
## _clone
```python
from element import _clone
```

Create a new Tag just like this one, but with no
contents and unattached to any parse tree.

This is the first step in the deepcopy process.

---
## is_empty_element
```python
from element import is_empty_element
```

Is this tag an empty-element tag? (aka a self-closing tag)

A tag that has contents is never an empty-element tag.

A tag that has no contents may or may not be an empty-element
tag. It depends on the builder used to create the tag. If the
builder has a designated list of empty-element tags, then only
a tag whose name shows up in that list is considered an
empty-element tag.

If the builder has no designated list of empty-element tags,
then any tag with no contents is an empty-element tag.

---
## string
```python
from element import string
```

Replace this PageElement's contents with `string`.

---
## decompose
```python
from element import decompose
```

Recursively destroys this PageElement and its children.

This element will be removed from the tree and wiped out; so
will everything beneath it.

The behavior of a decomposed PageElement is undefined and you
should never use one for anything, but if you need to _check_
whether an element has been decomposed, you can use the
`decomposed` property.

---
## clear
```python
from element import clear
```

Wipe out all children of this PageElement by calling extract()
   on them.

:param decompose: If this is True, decompose() (a more
    destructive method) will be called instead of extract().

---
## smooth
```python
from element import smooth
```

Smooth out this element's children by consolidating consecutive
strings.

This makes pretty-printed output look more natural following a
lot of operations that modified the tree.

---
## index
```python
from element import index
```

Find the index of a child by identity, not value.

Avoids issues with tag.contents.index(element) getting the
index of equal elements.

:param element: Look for this PageElement in `self.contents`.

---
## get
```python
from element import get
```

Returns the value of the 'key' attribute for the tag, or
the value given for 'default' if it doesn't have that
attribute.

---
## get_attribute_list
```python
from element import get_attribute_list
```

The same as get(), but always returns a list.

:param key: The attribute to look for.
:param default: Use this value if the attribute is not present
    on this PageElement.
:return: A list of values, probably containing only a single
    value.

---
## has_attr
```python
from element import has_attr
```

Does this PageElement have an attribute with the given name?

---
## __hash__
```python
from element import __hash__
```



---
## __getitem__
```python
from element import __getitem__
```

tag[key] returns the value of the 'key' attribute for the Tag,
and throws an exception if it's not there.

---
## __iter__
```python
from element import __iter__
```

Iterating over a Tag iterates over its contents.

---
## __len__
```python
from element import __len__
```

The length of a Tag is the length of its list of contents.

---
## __contains__
```python
from element import __contains__
```



---
## __bool__
```python
from element import __bool__
```

A tag is non-None even if it has no contents.

---
## __setitem__
```python
from element import __setitem__
```

Setting tag[key] sets the value of the 'key' attribute for the
tag.

---
## __delitem__
```python
from element import __delitem__
```

Deleting tag[key] deletes all 'key' attributes for the tag.

---
## __call__
```python
from element import __call__
```

Calling a Tag like a function is the same as calling its
find_all() method. Eg. tag('a') returns a list of all the A tags
found within this tag.

---
## __eq__
```python
from element import __eq__
```

Returns true iff this Tag has the same name, the same attributes,
and the same contents (recursively) as `other`.

---
## __ne__
```python
from element import __ne__
```

Returns true iff this Tag is not identical to `other`,
as defined in __eq__.

---
## __repr__
```python
from element import __repr__
```

Renders this PageElement as a string.

:param encoding: The encoding to use (Python 2 only).
    TODO: This is now ignored and a warning should be issued
    if a value is provided.
:return: A (Unicode) string.

---
## __unicode__
```python
from element import __unicode__
```

Renders this PageElement as a Unicode string.

---
## decode
```python
from element import decode
```



---
## _event_stream
```python
from element import _event_stream
```

Yield a sequence of events that can be used to reconstruct the DOM
for this element.

This lets us recreate the nested structure of this element
(e.g. when formatting it as a string) without using recursive
method calls.

This is similar in concept to the SAX API, but it's a simpler
interface designed for internal use. The events are different
from SAX and the arguments associated with the events are Tags
and other Beautiful Soup objects.

:param iterator: An alternate iterator to use when traversing
 the tree.

---
## _indent_string
```python
from element import _indent_string
```

Add indentation whitespace before and/or after a string.

:param s: The string to amend with whitespace.
:param indent_level: The indentation level; affects how much
   whitespace goes before the string.
:param indent_before: Whether or not to add whitespace
   before the string.
:param indent_after: Whether or not to add whitespace
   (a newline) after the string.

---
## _format_tag
```python
from element import _format_tag
```



---
## _should_pretty_print
```python
from element import _should_pretty_print
```

Should this tag be pretty-printed?

Most of them should, but some (such as <pre> in HTML
documents) should not.

---
## prettify
```python
from element import prettify
```

Pretty-print this PageElement as a string.

:param encoding: The eventual encoding of the string. If this is None,
    a Unicode string will be returned.
:param formatter: A Formatter object, or a string naming one of
    the standard formatters.
:return: A Unicode string (if encoding==None) or a bytestring
    (otherwise).

---
## decode_contents
```python
from element import decode_contents
```

Renders the contents of this tag as a Unicode string.

:param indent_level: Each line of the rendering will be
   indented this many levels. (The formatter decides what a
   'level' means in terms of spaces or other characters
   output.) Used internally in recursive calls while
   pretty-printing.

:param eventual_encoding: The tag is destined to be
   encoded into this encoding. decode_contents() is _not_
   responsible for performing that encoding. This information
   is passed in so that it can be substituted in if the
   document contains a <META> tag that mentions the document's
   encoding.

:param formatter: A Formatter object, or a string naming one of
    the standard Formatters.

---
## encode_contents
```python
from element import encode_contents
```

Renders the contents of this PageElement as a bytestring.

:param indent_level: Each line of the rendering will be
   indented this many levels. (The formatter decides what a
   'level' means in terms of spaces or other characters
   output.) Used internally in recursive calls while
   pretty-printing.

:param eventual_encoding: The bytestring will be in this encoding.

:param formatter: A Formatter object, or a string naming one of
    the standard Formatters.

:return: A bytestring.

---
## renderContents
```python
from element import renderContents
```

Deprecated method for BS3 compatibility.

---
## find
```python
from element import find
```

Look in the children of this PageElement and find the first
PageElement that matches the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param recursive: If this is True, find() will perform a
    recursive search of this PageElement's children. Otherwise,
    only the direct children will be considered.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString

---
## find_all
```python
from element import find_all
```

Look in the children of this PageElement and find all
PageElements that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param recursive: If this is True, find_all() will perform a
    recursive search of this PageElement's children. Otherwise,
    only the direct children will be considered.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet

---
## children
```python
from element import children
```

Iterate over all direct children of this PageElement.

:yield: A sequence of PageElements.

---
## self_and_descendants
```python
from element import self_and_descendants
```

Iterate over this PageElement and its children in a
breadth-first sequence.

:yield: A sequence of PageElements.

---
## descendants
```python
from element import descendants
```

Iterate over all children of this PageElement in a
breadth-first sequence.

:yield: A sequence of PageElements.

---
## select_one
```python
from element import select_one
```

Perform a CSS selection operation on the current element.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   soupsieve.select() method.

:return: A Tag.
:rtype: bs4.element.Tag

---
## select
```python
from element import select
```

Perform a CSS selection operation on the current element.

This uses the SoupSieve library.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param limit: After finding this number of results, stop looking.

:param kwargs: Keyword arguments to be passed into SoupSieve's
   soupsieve.select() method.

:return: A ResultSet of Tags.
:rtype: bs4.element.ResultSet

---
## css
```python
from element import css
```

Return an interface to the CSS selector API.

---
## childGenerator
```python
from element import childGenerator
```

Deprecated generator.

---
## recursiveChildGenerator
```python
from element import recursiveChildGenerator
```

Deprecated generator.

---
## has_key
```python
from element import has_key
```

Deprecated method. This was kind of misleading because has_key()
(attributes) was different from __in__ (contents).

has_key() is gone in Python 3, anyway.

---
## _normalize_search_value
```python
from element import _normalize_search_value
```



---
## __str__
```python
from element import __str__
```

A human-readable representation of this SoupStrainer.

---
## search_tag
```python
from element import search_tag
```

Check whether a Tag with the given name and attributes would
match this SoupStrainer.

Used prospectively to decide whether to even bother creating a Tag
object.

:param markup_name: A tag name as found in some markup.
:param markup_attrs: A dictionary of attributes as found in some markup.

:return: True if the prospective tag would match this SoupStrainer;
    False otherwise.

---
## search
```python
from element import search
```

Find all items in `markup` that match this SoupStrainer.

Used by the core _find_all() method, which is ultimately
called by all find_* methods.

:param markup: A PageElement or a list of them.

---
## _matches
```python
from element import _matches
```



---
## rewrite
```python
from element import rewrite
```



---
## diagnose
```python
from diagnose import diagnose
```

Diagnostic suite for isolating common problems.

:param data: A string containing markup that needs to be explained.
:return: None; diagnostics are printed to standard output.

---
## lxml_trace
```python
from diagnose import lxml_trace
```

Print out the lxml events that occur during parsing.

This lets you see how lxml parses a document when no Beautiful
Soup code is running. You can use this to determine whether
an lxml-specific problem is in Beautiful Soup's lxml tree builders
or in lxml itself.

:param data: Some markup.
:param html: If True, markup will be parsed with lxml's HTML parser.
   if False, lxml's XML parser will be used.

---
## AnnouncingParser
```python
from diagnose import AnnouncingParser
```

Subclass of HTMLParser that announces parse events, without doing
anything else.

You can use this to get a picture of how html.parser sees a given
document. The easiest way to do this is to call `htmlparser_trace`.

---
## htmlparser_trace
```python
from diagnose import htmlparser_trace
```

Print out the HTMLParser events that occur during parsing.

This lets you see how HTMLParser parses a document when no
Beautiful Soup code is running.

:param data: Some markup.

---
## rword
```python
from diagnose import rword
```

Generate a random word-like string.

---
## rsentence
```python
from diagnose import rsentence
```

Generate a random sentence-like string.

---
## rdoc
```python
from diagnose import rdoc
```

Randomly generate an invalid HTML document.

---
## benchmark_parsers
```python
from diagnose import benchmark_parsers
```

Very basic head-to-head performance benchmark.

---
## profile
```python
from diagnose import profile
```

Use Python's profiler on a randomly generated document.

---
## _p
```python
from diagnose import _p
```



---
## handle_starttag
```python
from diagnose import handle_starttag
```



---
## handle_endtag
```python
from diagnose import handle_endtag
```



---
## handle_data
```python
from diagnose import handle_data
```



---
## handle_charref
```python
from diagnose import handle_charref
```



---
## handle_entityref
```python
from diagnose import handle_entityref
```



---
## handle_comment
```python
from diagnose import handle_comment
```



---
## handle_decl
```python
from diagnose import handle_decl
```



---
## unknown_decl
```python
from diagnose import unknown_decl
```



---
## handle_pi
```python
from diagnose import handle_pi
```



---
## __name__
```python
from css import __name__
```

Utilities for interpreting CSS from Stylers for formatting non-HTML outputs.

---
## CSS
```python
from css import CSS
```

A proxy object against the soupsieve library, to simplify its
CSS selector API.

Acquire this object through the .css attribute on the
BeautifulSoup object, or on the Tag you want to use as the
starting point for a CSS selector.

The main advantage of doing this is that the tag to be selected
against doesn't need to be explicitly specified in the function
calls, since it's already scoped to a tag.

---
## __init__
```python
from css import __init__
```

Constructor.

You don't need to instantiate this class yourself; instead,
access the .css attribute on the BeautifulSoup object, or on
the Tag you want to use as the starting point for your CSS
selector.

:param tag: All CSS selectors will use this as their starting
point.

:param api: A plug-in replacement for the soupsieve module,
designed mainly for use in tests.

---
## escape
```python
from css import escape
```

Escape a CSS identifier.

This is a simple wrapper around soupselect.escape(). See the
documentation for that function for more information.

---
## _ns
```python
from css import _ns
```

Normalize a dictionary of namespaces.

---
## _rs
```python
from css import _rs
```

Normalize a list of results to a Resultset.

A ResultSet is more consistent with the rest of Beautiful
Soup's API, and ResultSet.__getattr__ has a helpful error
message if you try to treat a list of results as a single
result (a common mistake).

---
## compile
```python
from css import compile
```

Pre-compile a selector and return the compiled object.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.compile() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
   soupsieve.compile() method.

:return: A precompiled selector object.
:rtype: soupsieve.SoupSieve

---
## select_one
```python
from css import select_one
```

Perform a CSS selection operation on the current Tag and return the
first result.

This uses the Soup Sieve library. For more information, see
that library's documentation for the soupsieve.select_one()
method.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.select_one() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
   soupsieve.select_one() method.

:return: A Tag, or None if the selector has no match.
:rtype: bs4.element.Tag

---
## select
```python
from css import select
```

Perform a CSS selection operation on the current Tag.

This uses the Soup Sieve library. For more information, see
that library's documentation for the soupsieve.select()
method.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param limit: After finding this number of results, stop looking.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.select() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    soupsieve.select() method.

:return: A ResultSet of Tag objects.
:rtype: bs4.element.ResultSet

---
## iselect
```python
from css import iselect
```

Perform a CSS selection operation on the current Tag.

This uses the Soup Sieve library. For more information, see
that library's documentation for the soupsieve.iselect()
method. It is the same as select(), but it returns a generator
instead of a list.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param limit: After finding this number of results, stop looking.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.iselect() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    soupsieve.iselect() method.

:return: A generator
:rtype: types.GeneratorType

---
## closest
```python
from css import closest
```

Find the Tag closest to this one that matches the given selector.

This uses the Soup Sieve library. For more information, see
that library's documentation for the soupsieve.closest()
method.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.closest() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    soupsieve.closest() method.

:return: A Tag, or None if there is no match.
:rtype: bs4.Tag

---
## match
```python
from css import match
```

Check whether this Tag matches the given CSS selector.

This uses the Soup Sieve library. For more information, see
that library's documentation for the soupsieve.match()
method.

:param: a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.match() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    soupsieve.match() method.

:return: True if this Tag matches the selector; False otherwise.
:rtype: bool

---
## filter
```python
from css import filter
```

Filter this Tag's direct children based on the given CSS selector.

This uses the Soup Sieve library. It works the same way as
passing this Tag into that library's soupsieve.filter()
method. More information, for more information see the
documentation for soupsieve.filter().

:param namespaces: A dictionary mapping namespace prefixes
    used in the CSS selector to namespace URIs. By default,
    Beautiful Soup will pass in the prefixes it encountered while
    parsing the document.

:param flags: Flags to be passed into Soup Sieve's
    soupsieve.filter() method.

:param kwargs: Keyword arguments to be passed into SoupSieve's
    soupsieve.filter() method.

:return: A ResultSet of Tag objects.
:rtype: bs4.element.ResultSet

---
## __name__
```python
from dammit import __name__
```

Beautiful Soup bonus library: Unicode, Dammit

This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's Universal
Feed Parser. It works best on XML and HTML, but it does not rewrite the
XML or HTML to reflect a new encoding; that's the tree builder's job.

---
## EntitySubstitution
```python
from dammit import EntitySubstitution
```

The ability to substitute XML or HTML entities for certain characters.

---
## EncodingDetector
```python
from dammit import EncodingDetector
```

Suggests a number of possible encodings for a bytestring.

Order of precedence:

1. Encodings you specifically tell EncodingDetector to try first
(the known_definite_encodings argument to the constructor).

2. An encoding determined by sniffing the document's byte-order mark.

3. Encodings you specifically tell EncodingDetector to try if
byte-order mark sniffing fails (the user_encodings argument to the
constructor).

4. An encoding declared within the bytestring itself, either in an
XML declaration (if the bytestring is to be interpreted as an XML
document), or in a <meta> tag (if the bytestring is to be
interpreted as an HTML document.)

5. An encoding detected through textual analysis by chardet,
cchardet, or a similar external library.

4. UTF-8.

5. Windows-1252.

---
## UnicodeDammit
```python
from dammit import UnicodeDammit
```

A class for detecting the encoding of a *ML document and
converting it to a Unicode string. If the source encoding is
windows-1252, can replace MS smart quotes with their HTML or XML
equivalents.

---
## chardet_dammit
```python
from dammit import chardet_dammit
```



---
## _populate_class_variables
```python
from dammit import _populate_class_variables
```

Initialize variables used by this class to manage the plethora of
HTML5 named entities.

This function returns a 3-tuple containing two dictionaries
and a regular expression:

unicode_to_name - A mapping of Unicode strings like "⦨" to
entity names like "angmsdaa". When a single Unicode string has
multiple entity names, we try to choose the most commonly-used
name.

name_to_unicode: A mapping of entity names like "angmsdaa" to 
Unicode strings like "⦨".

named_entity_re: A regular expression matching (almost) any
Unicode string that corresponds to an HTML5 named entity.

---
## _substitute_html_entity
```python
from dammit import _substitute_html_entity
```

Used with a regular expression to substitute the
appropriate HTML entity for a special character string.

---
## _substitute_xml_entity
```python
from dammit import _substitute_xml_entity
```

Used with a regular expression to substitute the
appropriate XML entity for a special character string.

---
## quoted_attribute_value
```python
from dammit import quoted_attribute_value
```

Make a value into a quoted XML attribute, possibly escaping it.

Most strings will be quoted using double quotes.

 Bob's Bar -> "Bob's Bar"

If a string contains double quotes, it will be quoted using
single quotes.

 Welcome to "my bar" -> 'Welcome to "my bar"'

If a string contains both single and double quotes, the
double quotes will be escaped, and the string will be quoted
using double quotes.

 Welcome to "Bob's Bar" -> "Welcome to &quot;Bob's bar&quot;

---
## substitute_xml
```python
from dammit import substitute_xml
```

Substitute XML entities for special XML characters.

:param value: A string to be substituted. The less-than sign
  will become &lt;, the greater-than sign will become &gt;,
  and any ampersands will become &amp;. If you want ampersands
  that appear to be part of an entity definition to be left
  alone, use substitute_xml_containing_entities() instead.

:param make_quoted_attribute: If True, then the string will be
 quoted, as befits an attribute value.

---
## substitute_xml_containing_entities
```python
from dammit import substitute_xml_containing_entities
```

Substitute XML entities for special XML characters.

:param value: A string to be substituted. The less-than sign will
  become &lt;, the greater-than sign will become &gt;, and any
  ampersands that are not part of an entity defition will
  become &amp;.

:param make_quoted_attribute: If True, then the string will be
 quoted, as befits an attribute value.

---
## substitute_html
```python
from dammit import substitute_html
```

Replace certain Unicode characters with named HTML entities.

This differs from data.encode(encoding, 'xmlcharrefreplace')
in that the goal is to make the result more readable (to those
with ASCII displays) rather than to recover from
errors. There's absolutely nothing wrong with a UTF-8 string
containg a LATIN SMALL LETTER E WITH ACUTE, but replacing that
character with "&eacute;" will make it more readable to some
people.

:param s: A Unicode string.

---
## __init__
```python
from dammit import __init__
```

Constructor.

:param markup: A bytestring representing markup in an unknown encoding.

:param known_definite_encodings: When determining the encoding
    of `markup`, these encodings will be tried first, in
    order. In HTML terms, this corresponds to the "known
    definite encoding" step defined here:
    https://html.spec.whatwg.org/multipage/parsing.html#parsing-with-a-known-character-encoding

:param user_encodings: These encodings will be tried after the
    `known_definite_encodings` have been tried and failed, and
    after an attempt to sniff the encoding by looking at a
    byte order mark has failed. In HTML terms, this
    corresponds to the step "user has explicitly instructed
    the user agent to override the document's character
    encoding", defined here:
    https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding

:param override_encodings: A deprecated alias for
    known_definite_encodings. Any encodings here will be tried
    immediately after the encodings in
    known_definite_encodings.

:param smart_quotes_to: By default, Microsoft smart quotes will, like all other characters, be converted
   to Unicode characters. Setting this to 'ascii' will convert them to ASCII quotes instead.
   Setting it to 'xml' will convert them to XML entity references, and setting it to 'html'
   will convert them to HTML entity references.
:param is_html: If True, this markup is considered to be HTML. Otherwise
    it's assumed to be XML.
:param exclude_encodings: These encodings will not be considered, even
    if the sniffing code thinks they might make sense.

---
## _usable
```python
from dammit import _usable
```

Should we even bother to try this encoding?

:param encoding: Name of an encoding.
:param tried: Encodings that have already been tried. This will be modified
    as a side effect.

---
## encodings
```python
from dammit import encodings
```

Yield a number of encodings that might work for this markup.

:yield: A sequence of strings.

---
## strip_byte_order_mark
```python
from dammit import strip_byte_order_mark
```

If a byte-order mark is present, strip it and return the encoding it implies.

:param data: Some markup.
:return: A 2-tuple (modified data, implied encoding)

---
## find_declared_encoding
```python
from dammit import find_declared_encoding
```

Given a document, tries to find its declared encoding.

An XML encoding is declared at the beginning of the document.

An HTML encoding is declared in a <meta> tag, hopefully near the
beginning of the document.

:param markup: Some markup.
:param is_html: If True, this markup is considered to be HTML. Otherwise
    it's assumed to be XML.
:param search_entire_document: Since an encoding is supposed to declared near the beginning
    of the document, most of the time it's only necessary to search a few kilobytes of data.
    Set this to True to force this method to search the entire document.

---
## _sub_ms_char
```python
from dammit import _sub_ms_char
```

Changes a MS smart quote character to an XML or HTML
entity, or an ASCII character.

---
## _convert_from
```python
from dammit import _convert_from
```

Attempt to convert the markup to the proposed encoding.

:param proposed: The name of a character encoding.

---
## _to_unicode
```python
from dammit import _to_unicode
```

Given a string and its encoding, decodes the string into Unicode.

:param encoding: The name of an encoding.

---
## declared_html_encoding
```python
from dammit import declared_html_encoding
```

If the markup is an HTML document, returns the encoding declared _within_
the document.

---
## find_codec
```python
from dammit import find_codec
```

Convert the name of a character set to a codec name.

:param charset: The name of a character set.
:return: The name of a codec.

---
## _codec
```python
from dammit import _codec
```



---
## detwingle
```python
from dammit import detwingle
```

Fix characters from one encoding embedded in some other encoding.

Currently the only situation supported is Windows-1252 (or its
subset ISO-8859-1), embedded in UTF-8.

:param in_bytes: A bytestring that you suspect contains
    characters from multiple encodings. Note that this _must_
    be a bytestring. If you've already converted the document
    to Unicode, you're too late.
:param main_encoding: The primary encoding of `in_bytes`.
:param embedded_encoding: The encoding that was used to embed characters
    in the main document.
:return: A bytestring in which `embedded_encoding`
  characters have been converted to their `main_encoding`
  equivalents.

---
## __name__
```python
from _winconsole import __name__
```



---
## _WindowsConsoleRawIOBase
```python
from _winconsole import _WindowsConsoleRawIOBase
```



---
## _WindowsConsoleReader
```python
from _winconsole import _WindowsConsoleReader
```



---
## _WindowsConsoleWriter
```python
from _winconsole import _WindowsConsoleWriter
```



---
## ConsoleStream
```python
from _winconsole import ConsoleStream
```



---
## _get_text_stdin
```python
from _winconsole import _get_text_stdin
```



---
## _get_text_stdout
```python
from _winconsole import _get_text_stdout
```



---
## _get_text_stderr
```python
from _winconsole import _get_text_stderr
```



---
## _is_console
```python
from _winconsole import _is_console
```



---
## _get_windows_console_stream
```python
from _winconsole import _get_windows_console_stream
```



---
## Py_buffer
```python
from _winconsole import Py_buffer
```



---
## get_buffer
```python
from _winconsole import get_buffer
```



---
## __init__
```python
from _winconsole import __init__
```



---
## isatty
```python
from _winconsole import isatty
```



---
## readable
```python
from _winconsole import readable
```



---
## readinto
```python
from _winconsole import readinto
```



---
## writable
```python
from _winconsole import writable
```



---
## _get_error_message
```python
from _winconsole import _get_error_message
```



---
## write
```python
from _winconsole import write
```



---
## name
```python
from _winconsole import name
```



---
## writelines
```python
from _winconsole import writelines
```



---
## __getattr__
```python
from _winconsole import __getattr__
```



---
## __repr__
```python
from _winconsole import __repr__
```



---
## __name__
```python
from _textwrap import __name__
```



---
## TextWrapper
```python
from _textwrap import TextWrapper
```



---
## _handle_long_word
```python
from _textwrap import _handle_long_word
```



---
## extra_indent
```python
from _textwrap import extra_indent
```



---
## indent_only
```python
from _textwrap import indent_only
```



---
## __name__
```python
from globals import __name__
```



---
## get_current_context
```python
from globals import get_current_context
```

Returns the current click context.  This can be used as a way to
access the current context object from anywhere.  This is a more implicit
alternative to the :func:`pass_context` decorator.  This function is
primarily useful for helpers such as :func:`echo` which might be
interested in changing its behavior based on the current context.

To push the current context, :meth:`Context.scope` can be used.

.. versionadded:: 5.0

:param silent: if set to `True` the return value is `None` if no context
               is available.  The default behavior is to raise a
               :exc:`RuntimeError`.

---
## push_context
```python
from globals import push_context
```

Pushes a new context to the current stack.

---
## pop_context
```python
from globals import pop_context
```

Removes the top level from the stack.

---
## resolve_color_default
```python
from globals import resolve_color_default
```

Internal helper to get the default value of the color flag.  If a
value is passed it's returned unchanged, otherwise it's looked up from
the current context.

---
## _complete_visible_commands
```python
from core import _complete_visible_commands
```

List all the subcommands of a group that start with the
incomplete value and aren't hidden.

:param ctx: Invocation context for the group.
:param incomplete: Value being completed. May be empty.

---
## _check_multicommand
```python
from core import _check_multicommand
```



---
## batch
```python
from core import batch
```



---
## augment_usage_errors
```python
from core import augment_usage_errors
```

Context manager that attaches extra information to exceptions.

---
## iter_params_for_processing
```python
from core import iter_params_for_processing
```

Given a sequence of parameters in the order as should be considered
for processing and an iterable of parameters that exist, this returns
a list in the correct order as they should be processed.

---
## ParameterSource
```python
from core import ParameterSource
```

This is an :class:`~enum.Enum` that indicates the source of a
parameter's value.

Use :meth:`click.Context.get_parameter_source` to get the
source for a parameter by name.

.. versionchanged:: 8.0
    Use :class:`~enum.Enum` and drop the ``validate`` method.

.. versionchanged:: 8.0
    Added the ``PROMPT`` value.

---
## Context
```python
from core import Context
```

The context is a special internal object that holds state relevant
for the script execution at every single level.  It's normally invisible
to commands unless they opt-in to getting access to it.

The context is useful as it can pass internal objects around and can
control special execution features such as reading data from
environment variables.

A context can be used as context manager in which case it will call
:meth:`close` on teardown.

:param command: the command class for this context.
:param parent: the parent context.
:param info_name: the info name for this invocation.  Generally this
                  is the most descriptive name for the script or
                  command.  For the toplevel script it is usually
                  the name of the script, for commands below it it's
                  the name of the script.
:param obj: an arbitrary object of user data.
:param auto_envvar_prefix: the prefix to use for automatic environment
                           variables.  If this is `None` then reading
                           from environment variables is disabled.  This
                           does not affect manually set environment
                           variables which are always read.
:param default_map: a dictionary (like object) with default values
                    for parameters.
:param terminal_width: the width of the terminal.  The default is
                       inherit from parent context.  If no context
                       defines the terminal width then auto
                       detection will be applied.
:param max_content_width: the maximum width for content rendered by
                          Click (this currently only affects help
                          pages).  This defaults to 80 characters if
                          not overridden.  In other words: even if the
                          terminal is larger than that, Click will not
                          format things wider than 80 characters by
                          default.  In addition to that, formatters might
                          add some safety mapping on the right.
:param resilient_parsing: if this flag is enabled then Click will
                          parse without any interactivity or callback
                          invocation.  Default values will also be
                          ignored.  This is useful for implementing
                          things such as completion support.
:param allow_extra_args: if this is set to `True` then extra arguments
                         at the end will not raise an error and will be
                         kept on the context.  The default is to inherit
                         from the command.
:param allow_interspersed_args: if this is set to `False` then options
                                and arguments cannot be mixed.  The
                                default is to inherit from the command.
:param ignore_unknown_options: instructs click to ignore options it does
                               not know and keeps them for later
                               processing.
:param help_option_names: optionally a list of strings that define how
                          the default help parameter is named.  The
                          default is ``['--help']``.
:param token_normalize_func: an optional function that is used to
                             normalize tokens (options, choices,
                             etc.).  This for instance can be used to
                             implement case insensitive behavior.
:param color: controls if the terminal supports ANSI colors or not.  The
              default is autodetection.  This is only needed if ANSI
              codes are used in texts that Click prints which is by
              default not the case.  This for instance would affect
              help output.
:param show_default: Show the default value for commands. If this
    value is not set, it defaults to the value from the parent
    context. ``Command.show_default`` overrides this default for the
    specific command.

.. versionchanged:: 8.1
    The ``show_default`` parameter is overridden by
    ``Command.show_default``, instead of the other way around.

.. versionchanged:: 8.0
    The ``show_default`` parameter defaults to the value from the
    parent context.

.. versionchanged:: 7.1
   Added the ``show_default`` parameter.

.. versionchanged:: 4.0
    Added the ``color``, ``ignore_unknown_options``, and
    ``max_content_width`` parameters.

.. versionchanged:: 3.0
    Added the ``allow_extra_args`` and ``allow_interspersed_args``
    parameters.

.. versionchanged:: 2.0
    Added the ``resilient_parsing``, ``help_option_names``, and
    ``token_normalize_func`` parameters.

---
## BaseCommand
```python
from core import BaseCommand
```

The base command implements the minimal API contract of commands.
Most code will never use this as it does not implement a lot of useful
functionality but it can act as the direct subclass of alternative
parsing methods that do not depend on the Click parser.

For instance, this can be used to bridge Click and other systems like
argparse or docopt.

Because base commands do not implement a lot of the API that other
parts of Click take for granted, they are not supported for all
operations.  For instance, they cannot be used with the decorators
usually and they have no built-in callback system.

.. versionchanged:: 2.0
   Added the `context_settings` parameter.

:param name: the name of the command to use unless a group overrides it.
:param context_settings: an optional dictionary with defaults that are
                         passed to the context object.

---
## Command
```python
from core import Command
```

Commands are the basic building block of command line interfaces in
Click.  A basic command handles command line parsing and might dispatch
more parsing to commands nested below it.

:param name: the name of the command to use unless a group overrides it.
:param context_settings: an optional dictionary with defaults that are
                         passed to the context object.
:param callback: the callback to invoke.  This is optional.
:param params: the parameters to register with this command.  This can
               be either :class:`Option` or :class:`Argument` objects.
:param help: the help string to use for this command.
:param epilog: like the help string but it's printed at the end of the
               help page after everything else.
:param short_help: the short help to use for this command.  This is
                   shown on the command listing of the parent command.
:param add_help_option: by default each command registers a ``--help``
                        option.  This can be disabled by this parameter.
:param no_args_is_help: this controls what happens if no arguments are
                        provided.  This option is disabled by default.
                        If enabled this will add ``--help`` as argument
                        if no arguments are passed
:param hidden: hide this command from help outputs.

:param deprecated: issues a message indicating that
                         the command is deprecated.

.. versionchanged:: 8.1
    ``help``, ``epilog``, and ``short_help`` are stored unprocessed,
    all formatting is done when outputting help text, not at init,
    and is done even if not using the ``@command`` decorator.

.. versionchanged:: 8.0
    Added a ``repr`` showing the command name.

.. versionchanged:: 7.1
    Added the ``no_args_is_help`` parameter.

.. versionchanged:: 2.0
    Added the ``context_settings`` parameter.

---
## MultiCommand
```python
from core import MultiCommand
```

A multi command is the basic implementation of a command that
dispatches to subcommands.  The most common version is the
:class:`Group`.

:param invoke_without_command: this controls how the multi command itself
                               is invoked.  By default it's only invoked
                               if a subcommand is provided.
:param no_args_is_help: this controls what happens if no arguments are
                        provided.  This option is enabled by default if
                        `invoke_without_command` is disabled or disabled
                        if it's enabled.  If enabled this will add
                        ``--help`` as argument if no arguments are
                        passed.
:param subcommand_metavar: the string that is used in the documentation
                           to indicate the subcommand place.
:param chain: if this is set to `True` chaining of multiple subcommands
              is enabled.  This restricts the form of commands in that
              they cannot have optional arguments but it allows
              multiple commands to be chained together.
:param result_callback: The result callback to attach to this multi
    command. This can be set or changed later with the
    :meth:`result_callback` decorator.
:param attrs: Other command arguments described in :class:`Command`.

---
## CommandCollection
```python
from core import CommandCollection
```

A command collection is a multi command that merges multiple multi
commands together into one.  This is a straightforward implementation
that accepts a list of different multi commands as sources and
provides all the commands for each of them.

See :class:`MultiCommand` and :class:`Command` for the description of
``name`` and ``attrs``.

---
## _check_iter
```python
from core import _check_iter
```

Check if the value is iterable but not a string. Raises a type
error, or return an iterator over the value.

---
## Parameter
```python
from core import Parameter
```

A parameter to a command comes in two versions: they are either
:class:`Option`\s or :class:`Argument`\s.  Other subclasses are currently
not supported by design as some of the internals for parsing are
intentionally not finalized.

Some settings are supported by both options and arguments.

:param param_decls: the parameter declarations for this option or
                    argument.  This is a list of flags or argument
                    names.
:param type: the type that should be used.  Either a :class:`ParamType`
             or a Python type.  The latter is converted into the former
             automatically if supported.
:param required: controls if this is optional or not.
:param default: the default value if omitted.  This can also be a callable,
                in which case it's invoked when the default is needed
                without any arguments.
:param callback: A function to further process or validate the value
    after type conversion. It is called as ``f(ctx, param, value)``
    and must return the value. It is called for all sources,
    including prompts.
:param nargs: the number of arguments to match.  If not ``1`` the return
              value is a tuple instead of single value.  The default for
              nargs is ``1`` (except if the type is a tuple, then it's
              the arity of the tuple). If ``nargs=-1``, all remaining
              parameters are collected.
:param metavar: how the value is represented in the help page.
:param expose_value: if this is `True` then the value is passed onwards
                     to the command callback and stored on the context,
                     otherwise it's skipped.
:param is_eager: eager values are processed before non eager ones.  This
                 should not be set for arguments or it will inverse the
                 order of processing.
:param envvar: a string or list of strings that are environment variables
               that should be checked.
:param shell_complete: A function that returns custom shell
    completions. Used instead of the param's type completion if
    given. Takes ``ctx, param, incomplete`` and must return a list
    of :class:`~click.shell_completion.CompletionItem` or a list of
    strings.

.. versionchanged:: 8.0
    ``process_value`` validates required parameters and bounded
    ``nargs``, and invokes the parameter callback before returning
    the value. This allows the callback to validate prompts.
    ``full_process_value`` is removed.

.. versionchanged:: 8.0
    ``autocompletion`` is renamed to ``shell_complete`` and has new
    semantics described above. The old name is deprecated and will
    be removed in 8.1, until then it will be wrapped to match the
    new requirements.

.. versionchanged:: 8.0
    For ``multiple=True, nargs>1``, the default must be a list of
    tuples.

.. versionchanged:: 8.0
    Setting a default is no longer required for ``nargs>1``, it will
    default to ``None``. ``multiple=True`` or ``nargs=-1`` will
    default to ``()``.

.. versionchanged:: 7.1
    Empty environment variables are ignored rather than taking the
    empty string value. This makes it possible for scripts to clear
    variables if they can't unset them.

.. versionchanged:: 2.0
    Changed signature for parameter callback to also be passed the
    parameter. The old callback format will still work, but it will
    raise a warning to give you a chance to migrate the code easier.

---
## Option
```python
from core import Option
```

Options are usually optional values on the command line and
have some extra features that arguments don't have.

All other parameters are passed onwards to the parameter constructor.

:param show_default: Show the default value for this option in its
    help text. Values are not shown by default, unless
    :attr:`Context.show_default` is ``True``. If this value is a
    string, it shows that string in parentheses instead of the
    actual value. This is particularly useful for dynamic options.
    For single option boolean flags, the default remains hidden if
    its value is ``False``.
:param show_envvar: Controls if an environment variable should be
    shown on the help page. Normally, environment variables are not
    shown.
:param prompt: If set to ``True`` or a non empty string then the
    user will be prompted for input. If set to ``True`` the prompt
    will be the option name capitalized.
:param confirmation_prompt: Prompt a second time to confirm the
    value if it was prompted for. Can be set to a string instead of
    ``True`` to customize the message.
:param prompt_required: If set to ``False``, the user will be
    prompted for input only when the option was specified as a flag
    without a value.
:param hide_input: If this is ``True`` then the input on the prompt
    will be hidden from the user. This is useful for password input.
:param is_flag: forces this option to act as a flag.  The default is
                auto detection.
:param flag_value: which value should be used for this flag if it's
                   enabled.  This is set to a boolean automatically if
                   the option string contains a slash to mark two options.
:param multiple: if this is set to `True` then the argument is accepted
                 multiple times and recorded.  This is similar to ``nargs``
                 in how it works but supports arbitrary number of
                 arguments.
:param count: this flag makes an option increment an integer.
:param allow_from_autoenv: if this is enabled then the value of this
                           parameter will be pulled from an environment
                           variable in case a prefix is defined on the
                           context.
:param help: the help string.
:param hidden: hide this option from help outputs.
:param attrs: Other command arguments described in :class:`Parameter`.

.. versionchanged:: 8.1.0
    Help text indentation is cleaned here instead of only in the
    ``@option`` decorator.

.. versionchanged:: 8.1.0
    The ``show_default`` parameter overrides
    ``Context.show_default``.

.. versionchanged:: 8.1.0
    The default of a single option boolean flag is not shown if the
    default value is ``False``.

.. versionchanged:: 8.0.1
    ``type`` is detected from ``flag_value`` if given.

---
## Argument
```python
from core import Argument
```

Arguments are positional parameters to a command.  They generally
provide fewer features than options but can have infinite ``nargs``
and are required by default.

All parameters are passed onwards to the constructor of :class:`Parameter`.

---
## sort_key
```python
from core import sort_key
```



---
## to_info_dict
```python
from core import to_info_dict
```



---
## scope
```python
from core import scope
```

This helper method can be used with the context object to promote
it to the current thread local (see :func:`get_current_context`).
The default behavior of this is to invoke the cleanup functions which
can be disabled by setting `cleanup` to `False`.  The cleanup
functions are typically used for things such as closing file handles.

If the cleanup is intended the context object can also be directly
used as a context manager.

Example usage::

    with ctx.scope():
        assert get_current_context() is ctx

This is equivalent::

    with ctx:
        assert get_current_context() is ctx

.. versionadded:: 5.0

:param cleanup: controls if the cleanup functions should be run or
                not.  The default is to run these functions.  In
                some situations the context only wants to be
                temporarily pushed in which case this can be disabled.
                Nested pushes automatically defer the cleanup.

---
## meta
```python
from core import meta
```

This is a dictionary which is shared with all the contexts
that are nested.  It exists so that click utilities can store some
state here if they need to.  It is however the responsibility of
that code to manage this dictionary well.

The keys are supposed to be unique dotted strings.  For instance
module paths are a good choice for it.  What is stored in there is
irrelevant for the operation of click.  However what is important is
that code that places data here adheres to the general semantics of
the system.

Example usage::

    LANG_KEY = f'{__name__}.lang'

    def set_language(value):
        ctx = get_current_context()
        ctx.meta[LANG_KEY] = value

    def get_language():
        return get_current_context().meta.get(LANG_KEY, 'en_US')

.. versionadded:: 5.0

---
## make_formatter
```python
from core import make_formatter
```

Creates the :class:`~click.HelpFormatter` for the help and
usage output.

To quickly customize the formatter class used without overriding
this method, set the :attr:`formatter_class` attribute.

.. versionchanged:: 8.0
    Added the :attr:`formatter_class` attribute.

---
## with_resource
```python
from core import with_resource
```

Register a resource as if it were used in a ``with``
statement. The resource will be cleaned up when the context is
popped.

Uses :meth:`contextlib.ExitStack.enter_context`. It calls the
resource's ``__enter__()`` method and returns the result. When
the context is popped, it closes the stack, which calls the
resource's ``__exit__()`` method.

To register a cleanup function for something that isn't a
context manager, use :meth:`call_on_close`. Or use something
from :mod:`contextlib` to turn it into a context manager first.

.. code-block:: python

    @click.group()
    @click.option("--name")
    @click.pass_context
    def cli(ctx):
        ctx.obj = ctx.with_resource(connect_db(name))

:param context_manager: The context manager to enter.
:return: Whatever ``context_manager.__enter__()`` returns.

.. versionadded:: 8.0

---
## call_on_close
```python
from core import call_on_close
```

Register a function to be called when the context tears down.

This can be used to close resources opened during the script
execution. Resources that support Python's context manager
protocol which would be used in a ``with`` statement should be
registered with :meth:`with_resource` instead.

:param f: The function to execute on teardown.

---
## command_path
```python
from core import command_path
```

The computed command path.  This is used for the ``usage``
information on the help page.  It's automatically created by
combining the info names of the chain of contexts to the root.

---
## find_root
```python
from core import find_root
```

Finds the outermost context.

---
## find_object
```python
from core import find_object
```

Finds the closest object of a given type.

---
## ensure_object
```python
from core import ensure_object
```

Like :meth:`find_object` but sets the innermost object to a
new instance of `object_type` if it does not exist.

---
## lookup_default
```python
from core import lookup_default
```

Get the default for a parameter from :attr:`default_map`.

:param name: Name of the parameter.
:param call: If the default is a callable, call it. Disable to
    return the callable instead.

.. versionchanged:: 8.0
    Added the ``call`` parameter.

---
## fail
```python
from core import fail
```

Aborts the execution of the program with a specific error
message.

:param message: the error message to fail with.

---
## abort
```python
from core import abort
```

Aborts the script.

---
## exit
```python
from core import exit
```

Exits the application with a given exit code.

---
## get_usage
```python
from core import get_usage
```

Formats the usage line into a string and returns it.

Calls :meth:`format_usage` internally.

---
## get_help
```python
from core import get_help
```

Formats the help into a string and returns it.

Calls :meth:`format_help` internally.

---
## _make_sub_context
```python
from core import _make_sub_context
```

Create a new context of the same type as this context, but
for a new command.

:meta private:

---
## invoke
```python
from core import invoke
```



---
## forward
```python
from core import forward
```

Similar to :meth:`invoke` but fills in default keyword
arguments from the current context if the other command expects
it.  This cannot invoke callbacks directly, only other commands.

.. versionchanged:: 8.0
    All ``kwargs`` are tracked in :attr:`params` so they will be
    passed if ``forward`` is called at multiple levels.

---
## set_parameter_source
```python
from core import set_parameter_source
```

Set the source of a parameter. This indicates the location
from which the value of the parameter was obtained.

:param name: The name of the parameter.
:param source: A member of :class:`~click.core.ParameterSource`.

---
## get_parameter_source
```python
from core import get_parameter_source
```

Get the source of a parameter. This indicates the location
from which the value of the parameter was obtained.

This can be useful for determining when a user specified a value
on the command line that is the same as the default value. It
will be :attr:`~click.core.ParameterSource.DEFAULT` only if the
value was actually taken from the default.

:param name: The name of the parameter.
:rtype: ParameterSource

.. versionchanged:: 8.0
    Returns ``None`` if the parameter was not provided from any
    source.

---
## make_context
```python
from core import make_context
```

This function when given an info name and arguments will kick
off the parsing and create a new :class:`Context`.  It does not
invoke the actual command callback though.

To quickly customize the context class used without overriding
this method, set the :attr:`context_class` attribute.

:param info_name: the info name for this invocation.  Generally this
                  is the most descriptive name for the script or
                  command.  For the toplevel script it's usually
                  the name of the script, for commands below it's
                  the name of the command.
:param args: the arguments to parse as list of strings.
:param parent: the parent context if available.
:param extra: extra keyword arguments forwarded to the context
              constructor.

.. versionchanged:: 8.0
    Added the :attr:`context_class` attribute.

---
## parse_args
```python
from core import parse_args
```



---
## shell_complete
```python
from core import shell_complete
```

Return a list of completions for the incomplete value. If a
``shell_complete`` function was given during init, it is used.
Otherwise, the :attr:`type`
:meth:`~click.types.ParamType.shell_complete` function is used.

:param ctx: Invocation context for this command.
:param incomplete: Value being completed. May be empty.

.. versionadded:: 8.0

---
## main
```python
from core import main
```

This is the way to invoke a script with all the bells and
whistles as a command line application.  This will always terminate
the application after a call.  If this is not wanted, ``SystemExit``
needs to be caught.

This method is also available by directly calling the instance of
a :class:`Command`.

:param args: the arguments that should be used for parsing.  If not
             provided, ``sys.argv[1:]`` is used.
:param prog_name: the program name that should be used.  By default
                  the program name is constructed by taking the file
                  name from ``sys.argv[0]``.
:param complete_var: the environment variable that controls the
                     bash completion support.  The default is
                     ``"_<prog_name>_COMPLETE"`` with prog_name in
                     uppercase.
:param standalone_mode: the default behavior is to invoke the script
                        in standalone mode.  Click will then
                        handle exceptions and convert them into
                        error messages and the function will never
                        return but shut down the interpreter.  If
                        this is set to `False` they will be
                        propagated to the caller and the return
                        value of this function is the return value
                        of :meth:`invoke`.
:param windows_expand_args: Expand glob patterns, user dir, and
    env vars in command line args on Windows.
:param extra: extra keyword arguments are forwarded to the context
              constructor.  See :class:`Context` for more information.

.. versionchanged:: 8.0.1
    Added the ``windows_expand_args`` parameter to allow
    disabling command line arg expansion on Windows.

.. versionchanged:: 8.0
    When taking arguments from ``sys.argv`` on Windows, glob
    patterns, user dir, and env vars are expanded.

.. versionchanged:: 3.0
   Added the ``standalone_mode`` parameter.

---
## _main_shell_completion
```python
from core import _main_shell_completion
```

Check if the shell is asking for tab completion, process
that, then exit early. Called from :meth:`main` before the
program is invoked.

:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction. Defaults to
    ``_{PROG_NAME}_COMPLETE``.

.. versionchanged:: 8.2.0
    Dots (``.``) in ``prog_name`` are replaced with underscores (``_``).

---
## get_params
```python
from core import get_params
```



---
## format_usage
```python
from core import format_usage
```

Writes the usage line into the formatter.

This is a low-level method called by :meth:`get_usage`.

---
## collect_usage_pieces
```python
from core import collect_usage_pieces
```



---
## get_help_option_names
```python
from core import get_help_option_names
```

Returns the names for the help option.

---
## get_help_option
```python
from core import get_help_option
```

Returns the help option object.

---
## make_parser
```python
from core import make_parser
```

Creates the underlying option parser for this command.

---
## get_short_help_str
```python
from core import get_short_help_str
```

Gets short help for the command or makes it by shortening the
long help string.

---
## format_help
```python
from core import format_help
```

Writes the help into the formatter if it exists.

This is a low-level method called by :meth:`get_help`.

This calls the following methods:

-   :meth:`format_usage`
-   :meth:`format_help_text`
-   :meth:`format_options`
-   :meth:`format_epilog`

---
## format_help_text
```python
from core import format_help_text
```

Writes the help text to the formatter if it exists.

---
## format_options
```python
from core import format_options
```



---
## format_epilog
```python
from core import format_epilog
```

Writes the epilog into the formatter if it exists.

---
## result_callback
```python
from core import result_callback
```

Adds a result callback to the command.  By default if a
result callback is already registered this will chain them but
this can be disabled with the `replace` parameter.  The result
callback is invoked with the return value of the subcommand
(or the list of return values from all subcommands if chaining
is enabled) as well as the parameters as they would be passed
to the main callback.

Example::

    @click.group()
    @click.option('-i', '--input', default=23)
    def cli(input):
        return 42

    @cli.result_callback()
    def process_result(result, input):
        return result + input

:param replace: if set to `True` an already existing result
                callback will be removed.

.. versionchanged:: 8.0
    Renamed from ``resultcallback``.

.. versionadded:: 3.0

---
## format_commands
```python
from core import format_commands
```

Extra format methods for multi methods that adds all the commands
after the options.

---
## resolve_command
```python
from core import resolve_command
```



---
## get_command
```python
from core import get_command
```



---
## list_commands
```python
from core import list_commands
```



---
## add_command
```python
from core import add_command
```

Registers another :class:`Command` with this group.  If the name
is not provided, the name of the command is used.

---
## command
```python
from core import command
```

A shortcut decorator for declaring and attaching a command to
the group. This takes the same arguments as :func:`command` and
immediately registers the created command with this group by
calling :meth:`add_command`.

To customize the command class used, set the
:attr:`command_class` attribute.

.. versionchanged:: 8.1
    This decorator can be applied without parentheses.

.. versionchanged:: 8.0
    Added the :attr:`command_class` attribute.

---
## group
```python
from core import group
```

A shortcut decorator for declaring and attaching a group to
the group. This takes the same arguments as :func:`group` and
immediately registers the created group with this group by
calling :meth:`add_command`.

To customize the group class used, set the :attr:`group_class`
attribute.

.. versionchanged:: 8.1
    This decorator can be applied without parentheses.

.. versionchanged:: 8.0
    Added the :attr:`group_class` attribute.

---
## add_source
```python
from core import add_source
```

Adds a new multi command to the chain dispatcher.

---
## _parse_decls
```python
from core import _parse_decls
```



---
## human_readable_name
```python
from core import human_readable_name
```



---
## make_metavar
```python
from core import make_metavar
```



---
## get_default
```python
from core import get_default
```



---
## add_to_parser
```python
from core import add_to_parser
```



---
## consume_value
```python
from core import consume_value
```



---
## type_cast_value
```python
from core import type_cast_value
```

Convert and validate a value against the option's
:attr:`type`, :attr:`multiple`, and :attr:`nargs`.

---
## value_is_missing
```python
from core import value_is_missing
```



---
## process_value
```python
from core import process_value
```



---
## resolve_envvar_value
```python
from core import resolve_envvar_value
```



---
## value_from_envvar
```python
from core import value_from_envvar
```



---
## handle_parse_result
```python
from core import handle_parse_result
```



---
## get_help_record
```python
from core import get_help_record
```



---
## get_usage_pieces
```python
from core import get_usage_pieces
```



---
## get_error_hint
```python
from core import get_error_hint
```



---
## prompt_for_value
```python
from core import prompt_for_value
```

This is an alternative flow that can be activated in the full
value processing if a value does not exist.  It will prompt the
user until a valid value exists and then returns the processed
value as result.

---
## show_help
```python
from core import show_help
```



---
## decorator
```python
from core import decorator
```



---
## _process_result
```python
from core import _process_result
```



---
## check_iter
```python
from core import check_iter
```



---
## _write_opts
```python
from core import _write_opts
```



---
## function
```python
from core import function
```



---
## ParamType
```python
from types import ParamType
```

Represents the type of a parameter. Validates and converts values
from the command line or Python into the correct type.

To implement a custom type, subclass and implement at least the
following:

-   The :attr:`name` class attribute must be set.
-   Calling an instance of the type with ``None`` must return
    ``None``. This is already implemented by default.
-   :meth:`convert` must convert string values to the correct type.
-   :meth:`convert` must accept values that are already the correct
    type.
-   It must be able to convert a value if the ``ctx`` and ``param``
    arguments are ``None``. This can occur when converting prompt
    input.

---
## CompositeParamType
```python
from types import CompositeParamType
```



---
## FuncParamType
```python
from types import FuncParamType
```



---
## UnprocessedParamType
```python
from types import UnprocessedParamType
```



---
## StringParamType
```python
from types import StringParamType
```



---
## Choice
```python
from types import Choice
```

The choice type allows a value to be checked against a fixed set
of supported values. All of these values have to be strings.

You should only pass a list or tuple of choices. Other iterables
(like generators) may lead to surprising results.

The resulting value will always be one of the originally passed choices
regardless of ``case_sensitive`` or any ``ctx.token_normalize_func``
being specified.

See :ref:`choice-opts` for an example.

:param case_sensitive: Set to false to make choices case
    insensitive. Defaults to true.

---
## DateTime
```python
from types import DateTime
```

The DateTime type converts date strings into `datetime` objects.

The format strings which are checked are configurable, but default to some
common (non-timezone aware) ISO 8601 formats.

When specifying *DateTime* formats, you should only pass a list or a tuple.
Other iterables, like generators, may lead to surprising results.

The format strings are processed using ``datetime.strptime``, and this
consequently defines the format strings which are allowed.

Parsing is tried using each format, in order, and the first format which
parses successfully is used.

:param formats: A list or tuple of date format strings, in the order in
                which they should be tried. Defaults to
                ``'%Y-%m-%d'``, ``'%Y-%m-%dT%H:%M:%S'``,
                ``'%Y-%m-%d %H:%M:%S'``.

---
## _NumberParamTypeBase
```python
from types import _NumberParamTypeBase
```



---
## _NumberRangeBase
```python
from types import _NumberRangeBase
```



---
## IntParamType
```python
from types import IntParamType
```



---
## IntRange
```python
from types import IntRange
```

Restrict an :data:`click.INT` value to a range of accepted
values. See :ref:`ranges`.

If ``min`` or ``max`` are not passed, any value is accepted in that
direction. If ``min_open`` or ``max_open`` are enabled, the
corresponding boundary is not included in the range.

If ``clamp`` is enabled, a value outside the range is clamped to the
boundary instead of failing.

.. versionchanged:: 8.0
    Added the ``min_open`` and ``max_open`` parameters.

---
## FloatParamType
```python
from types import FloatParamType
```



---
## FloatRange
```python
from types import FloatRange
```

Restrict a :data:`click.FLOAT` value to a range of accepted
values. See :ref:`ranges`.

If ``min`` or ``max`` are not passed, any value is accepted in that
direction. If ``min_open`` or ``max_open`` are enabled, the
corresponding boundary is not included in the range.

If ``clamp`` is enabled, a value outside the range is clamped to the
boundary instead of failing. This is not supported if either
boundary is marked ``open``.

.. versionchanged:: 8.0
    Added the ``min_open`` and ``max_open`` parameters.

---
## BoolParamType
```python
from types import BoolParamType
```



---
## UUIDParameterType
```python
from types import UUIDParameterType
```



---
## File
```python
from types import File
```

Declares a parameter to be a file for reading or writing.  The file
is automatically closed once the context tears down (after the command
finished working).

Files can be opened for reading or writing.  The special value ``-``
indicates stdin or stdout depending on the mode.

By default, the file is opened for reading text data, but it can also be
opened in binary mode or for writing.  The encoding parameter can be used
to force a specific encoding.

The `lazy` flag controls if the file should be opened immediately or upon
first IO. The default is to be non-lazy for standard input and output
streams as well as files opened for reading, `lazy` otherwise. When opening a
file lazily for reading, it is still opened temporarily for validation, but
will not be held open until first IO. lazy is mainly useful when opening
for writing to avoid creating the file until it is needed.

Starting with Click 2.0, files can also be opened atomically in which
case all writes go into a separate file in the same folder and upon
completion the file will be moved over to the original location.  This
is useful if a file regularly read by other users is modified.

See :ref:`file-args` for more information.

---
## _is_file_like
```python
from types import _is_file_like
```



---
## Path
```python
from types import Path
```

The ``Path`` type is similar to the :class:`File` type, but
returns the filename instead of an open file. Various checks can be
enabled to validate the type of file and permissions.

:param exists: The file or directory needs to exist for the value to
    be valid. If this is not set to ``True``, and the file does not
    exist, then all further checks are silently skipped.
:param file_okay: Allow a file as a value.
:param dir_okay: Allow a directory as a value.
:param readable: if true, a readable check is performed.
:param writable: if true, a writable check is performed.
:param executable: if true, an executable check is performed.
:param resolve_path: Make the value absolute and resolve any
    symlinks. A ``~`` is not expanded, as this is supposed to be
    done by the shell only.
:param allow_dash: Allow a single dash as a value, which indicates
    a standard stream (but does not open it). Use
    :func:`~click.open_file` to handle opening this value.
:param path_type: Convert the incoming path value to this type. If
    ``None``, keep Python's default, which is ``str``. Useful to
    convert to :class:`pathlib.Path`.

.. versionchanged:: 8.1
    Added the ``executable`` parameter.

.. versionchanged:: 8.0
    Allow passing ``path_type=pathlib.Path``.

.. versionchanged:: 6.0
    Added the ``allow_dash`` parameter.

---
## Tuple
```python
from types import Tuple
```

The default behavior of Click is to apply a type on a value directly.
This works well in most cases, except for when `nargs` is set to a fixed
count and different types should be used for different items.  In this
case the :class:`Tuple` type can be used.  This type can only be used
if `nargs` is set to a fixed number.

For more information see :ref:`tuple-type`.

This can be selected by using a Python tuple literal as a type.

:param types: a list of types that should be used for the tuple items.

---
## convert_type
```python
from types import convert_type
```

Find the most appropriate :class:`ParamType` for the given Python
type. If the type isn't provided, it can be inferred from a default
value.

---
## to_info_dict
```python
from types import to_info_dict
```



---
## __call__
```python
from types import __call__
```



---
## get_metavar
```python
from types import get_metavar
```



---
## get_missing_message
```python
from types import get_missing_message
```



---
## convert
```python
from types import convert
```



---
## split_envvar_value
```python
from types import split_envvar_value
```

Given a value from an environment variable this splits it up
into small chunks depending on the defined envvar list splitter.

If the splitter is set to `None`, which means that whitespace splits,
then leading and trailing whitespace is ignored.  Otherwise, leading
and trailing splitters usually lead to empty items being included.

---
## fail
```python
from types import fail
```

Helper method to fail with an invalid value message.

---
## shell_complete
```python
from types import shell_complete
```

Return a special completion marker that tells the completion
system to use the shell to provide path completions for only
directories or any paths.

:param ctx: Invocation context for this command.
:param param: The parameter that is requesting completion.
:param incomplete: Value being completed. May be empty.

.. versionadded:: 8.0

---
## arity
```python
from types import arity
```



---
## __init__
```python
from types import __init__
```



---
## __repr__
```python
from types import __repr__
```



---
## _try_to_convert_date
```python
from types import _try_to_convert_date
```



---
## _clamp
```python
from types import _clamp
```



---
## _describe_range
```python
from types import _describe_range
```

Describe the range for use in help text.

---
## resolve_lazy_flag
```python
from types import resolve_lazy_flag
```



---
## coerce_path_result
```python
from types import coerce_path_result
```



---
## name
```python
from types import name
```



---
## __name__
```python
from formatting import __name__
```



---
## measure_table
```python
from formatting import measure_table
```



---
## iter_rows
```python
from formatting import iter_rows
```



---
## wrap_text
```python
from formatting import wrap_text
```

A helper function that intelligently wraps text.  By default, it
assumes that it operates on a single paragraph of text but if the
`preserve_paragraphs` parameter is provided it will intelligently
handle paragraphs (defined by two empty lines).

If paragraphs are handled, a paragraph can be prefixed with an empty
line containing the ``\b`` character (``\x08``) to indicate that
no rewrapping should happen in that block.

:param text: the text that should be rewrapped.
:param width: the maximum width for the text.
:param initial_indent: the initial indent that should be placed on the
                       first line as a string.
:param subsequent_indent: the indent string that should be placed on
                          each consecutive line.
:param preserve_paragraphs: if this flag is set then the wrapping will
                            intelligently handle paragraphs.

---
## HelpFormatter
```python
from formatting import HelpFormatter
```

This class helps with formatting text-based help pages.  It's
usually just needed for very special internal cases, but it's also
exposed so that developers can write their own fancy outputs.

At present, it always writes into memory.

:param indent_increment: the additional increment for each level.
:param width: the width for the text.  This defaults to the terminal
              width clamped to a maximum of 78.

---
## join_options
```python
from formatting import join_options
```

Given a list of option strings this joins them in the most appropriate
way and returns them in the form ``(formatted_string,
any_prefix_is_slash)`` where the second item in the tuple is a flag that
indicates if any of the option prefixes was a slash.

---
## _flush_par
```python
from formatting import _flush_par
```



---
## __init__
```python
from formatting import __init__
```



---
## write
```python
from formatting import write
```

Writes a unicode string into the internal buffer.

---
## indent
```python
from formatting import indent
```

Increases the indentation.

---
## dedent
```python
from formatting import dedent
```

Decreases the indentation.

---
## write_usage
```python
from formatting import write_usage
```

Writes a usage line into the buffer.

:param prog: the program name.
:param args: whitespace separated list of arguments.
:param prefix: The prefix for the first line. Defaults to
    ``"Usage: "``.

---
## write_heading
```python
from formatting import write_heading
```

Writes a heading into the buffer.

---
## write_paragraph
```python
from formatting import write_paragraph
```

Writes a paragraph into the buffer.

---
## write_text
```python
from formatting import write_text
```

Writes re-indented text into the buffer.  This rewraps and
preserves paragraphs.

---
## write_dl
```python
from formatting import write_dl
```

Writes a definition list into the buffer.  This is how options
and commands are usually formatted.

:param rows: a list of two item tuples for the terms and values.
:param col_max: the maximum width of the first column.
:param col_spacing: the number of spaces between the first and
                    second column.

---
## section
```python
from formatting import section
```

Helpful context manager that writes a paragraph, a heading,
and the indents.

:param name: the section name that is written as heading.

---
## indentation
```python
from formatting import indentation
```

A context manager that increases the indentation.

---
## getvalue
```python
from formatting import getvalue
```

Returns the buffer contents.

---
## _unpack_args
```python
from parser import _unpack_args
```

Given an iterable of arguments and an iterable of nargs specifications,
it returns a tuple with all the unpacked arguments at the first index
and all remaining arguments as the second.

The nargs specification is the number of arguments that should be consumed
or `-1` to indicate that this position should eat up all the remainders.

Missing items are filled with `None`.

---
## split_opt
```python
from parser import split_opt
```



---
## normalize_opt
```python
from parser import normalize_opt
```



---
## split_arg_string
```python
from parser import split_arg_string
```

Split an argument string as with :func:`shlex.split`, but don't
fail if the string is incomplete. Ignores a missing closing quote or
incomplete escape sequence and uses the partial token as-is.

.. code-block:: python

    split_arg_string("example 'my file")
    ["example", "my file"]

    split_arg_string("example my\")
    ["example", "my"]

:param string: String to split.

---
## Option
```python
from parser import Option
```



---
## Argument
```python
from parser import Argument
```



---
## ParsingState
```python
from parser import ParsingState
```



---
## OptionParser
```python
from parser import OptionParser
```

The option parser is an internal class that is ultimately used to
parse options and arguments.  It's modelled after optparse and brings
a similar but vastly simplified API.  It should generally not be used
directly as the high level Click classes wrap it for you.

It's not nearly as extensible as optparse or argparse as it does not
implement features that are implemented on a higher level (such as
types or defaults).

:param ctx: optionally the :class:`~click.Context` where this parser
            should go with.

---
## _fetch
```python
from parser import _fetch
```



---
## takes_value
```python
from parser import takes_value
```



---
## process
```python
from parser import process
```



---
## add_option
```python
from parser import add_option
```

Adds a new option named `dest` to the parser.  The destination
is not inferred (unlike with optparse) and needs to be explicitly
provided.  Action can be any of ``store``, ``store_const``,
``append``, ``append_const`` or ``count``.

The `obj` can be used to identify the option in the order list
that is returned from the parser.

---
## add_argument
```python
from parser import add_argument
```

Adds a positional argument named `dest` to the parser.

The `obj` can be used to identify the option in the order list
that is returned from the parser.

---
## parse_args
```python
from parser import parse_args
```

Parses positional arguments and returns ``(values, args, order)``
for the parsed options and arguments as well as the leftover
arguments if there are any.  The order is a list of objects as they
appear on the command line.  If arguments appear multiple times they
will be memorized multiple times as well.

---
## _process_args_for_args
```python
from parser import _process_args_for_args
```



---
## _process_args_for_options
```python
from parser import _process_args_for_options
```



---
## _match_long_opt
```python
from parser import _match_long_opt
```



---
## _match_short_opt
```python
from parser import _match_short_opt
```



---
## _get_value_from_state
```python
from parser import _get_value_from_state
```



---
## _process_opts
```python
from parser import _process_opts
```



---
## __name__
```python
from termui import __name__
```



---
## hidden_prompt_func
```python
from termui import hidden_prompt_func
```



---
## _build_prompt
```python
from termui import _build_prompt
```



---
## _format_default
```python
from termui import _format_default
```



---
## prompt
```python
from termui import prompt
```

Prompts a user for input.  This is a convenience function that can
be used to prompt a user for input later.

If the user aborts the input by sending an interrupt signal, this
function will catch it and raise a :exc:`Abort` exception.

:param text: the text to show for the prompt.
:param default: the default value to use if no input happens.  If this
                is not given it will prompt until it's aborted.
:param hide_input: if this is set to true then the input value will
                   be hidden.
:param confirmation_prompt: Prompt a second time to confirm the
    value. Can be set to a string instead of ``True`` to customize
    the message.
:param type: the type to use to check the value against.
:param value_proc: if this parameter is provided it's a function that
                   is invoked instead of the type conversion to
                   convert a value.
:param prompt_suffix: a suffix that should be added to the prompt.
:param show_default: shows or hides the default value in the prompt.
:param err: if set to true the file defaults to ``stderr`` instead of
            ``stdout``, the same as with echo.
:param show_choices: Show or hide choices if the passed type is a Choice.
                     For example if type is a Choice of either day or week,
                     show_choices is true and text is "Group by" then the
                     prompt will be "Group by (day, week): ".

.. versionadded:: 8.0
    ``confirmation_prompt`` can be a custom string.

.. versionadded:: 7.0
    Added the ``show_choices`` parameter.

.. versionadded:: 6.0
    Added unicode support for cmd.exe on Windows.

.. versionadded:: 4.0
    Added the `err` parameter.

---
## confirm
```python
from termui import confirm
```

Prompts for confirmation (yes/no question).

If the user aborts the input by sending a interrupt signal this
function will catch it and raise a :exc:`Abort` exception.

:param text: the question to ask.
:param default: The default value to use when no input is given. If
    ``None``, repeat until input is given.
:param abort: if this is set to `True` a negative answer aborts the
              exception by raising :exc:`Abort`.
:param prompt_suffix: a suffix that should be added to the prompt.
:param show_default: shows or hides the default value in the prompt.
:param err: if set to true the file defaults to ``stderr`` instead of
            ``stdout``, the same as with echo.

.. versionchanged:: 8.0
    Repeat until input is given if ``default`` is ``None``.

.. versionadded:: 4.0
    Added the ``err`` parameter.

---
## echo_via_pager
```python
from termui import echo_via_pager
```

This function takes a text and shows it via an environment specific
pager on stdout.

.. versionchanged:: 3.0
   Added the `color` flag.

:param text_or_generator: the text to page, or alternatively, a
                          generator emitting the text to page.
:param color: controls if the pager supports ANSI colors or not.  The
              default is autodetection.

---
## progressbar
```python
from termui import progressbar
```

This function creates an iterable context manager that can be used
to iterate over something while showing a progress bar.  It will
either iterate over the `iterable` or `length` items (that are counted
up).  While iteration happens, this function will print a rendered
progress bar to the given `file` (defaults to stdout) and will attempt
to calculate remaining time and more.  By default, this progress bar
will not be rendered if the file is not a terminal.

The context manager creates the progress bar.  When the context
manager is entered the progress bar is already created.  With every
iteration over the progress bar, the iterable passed to the bar is
advanced and the bar is updated.  When the context manager exits,
a newline is printed and the progress bar is finalized on screen.

Note: The progress bar is currently designed for use cases where the
total progress can be expected to take at least several seconds.
Because of this, the ProgressBar class object won't display
progress that is considered too fast, and progress where the time
between steps is less than a second.

No printing must happen or the progress bar will be unintentionally
destroyed.

Example usage::

    with progressbar(items) as bar:
        for item in bar:
            do_something_with(item)

Alternatively, if no iterable is specified, one can manually update the
progress bar through the `update()` method instead of directly
iterating over the progress bar.  The update method accepts the number
of steps to increment the bar with::

    with progressbar(length=chunks.total_bytes) as bar:
        for chunk in chunks:
            process_chunk(chunk)
            bar.update(chunks.bytes)

The ``update()`` method also takes an optional value specifying the
``current_item`` at the new position. This is useful when used
together with ``item_show_func`` to customize the output for each
manual step::

    with click.progressbar(
        length=total_size,
        label='Unzipping archive',
        item_show_func=lambda a: a.filename
    ) as bar:
        for archive in zip_file:
            archive.extract()
            bar.update(archive.size, archive)

:param iterable: an iterable to iterate over.  If not provided the length
                 is required.
:param length: the number of items to iterate over.  By default the
               progressbar will attempt to ask the iterator about its
               length, which might or might not work.  If an iterable is
               also provided this parameter can be used to override the
               length.  If an iterable is not provided the progress bar
               will iterate over a range of that length.
:param label: the label to show next to the progress bar.
:param show_eta: enables or disables the estimated time display.  This is
                 automatically disabled if the length cannot be
                 determined.
:param show_percent: enables or disables the percentage display.  The
                     default is `True` if the iterable has a length or
                     `False` if not.
:param show_pos: enables or disables the absolute position display.  The
                 default is `False`.
:param item_show_func: A function called with the current item which
    can return a string to show next to the progress bar. If the
    function returns ``None`` nothing is shown. The current item can
    be ``None``, such as when entering and exiting the bar.
:param fill_char: the character to use to show the filled part of the
                  progress bar.
:param empty_char: the character to use to show the non-filled part of
                   the progress bar.
:param bar_template: the format string to use as template for the bar.
                     The parameters in it are ``label`` for the label,
                     ``bar`` for the progress bar and ``info`` for the
                     info section.
:param info_sep: the separator between multiple info items (eta etc.)
:param width: the width of the progress bar in characters, 0 means full
              terminal width
:param file: The file to write to. If this is not a terminal then
    only the label is printed.
:param color: controls if the terminal supports ANSI colors or not.  The
              default is autodetection.  This is only needed if ANSI
              codes are included anywhere in the progress bar output
              which is not the case by default.
:param update_min_steps: Render only when this many updates have
    completed. This allows tuning for very fast iterators.

.. versionchanged:: 8.0
    Output is shown even if execution time is less than 0.5 seconds.

.. versionchanged:: 8.0
    ``item_show_func`` shows the current item, not the previous one.

.. versionchanged:: 8.0
    Labels are echoed if the output is not a TTY. Reverts a change
    in 7.0 that removed all output.

.. versionadded:: 8.0
   Added the ``update_min_steps`` parameter.

.. versionchanged:: 4.0
    Added the ``color`` parameter. Added the ``update`` method to
    the object.

.. versionadded:: 2.0

---
## clear
```python
from termui import clear
```

Clears the terminal screen.  This will have the effect of clearing
the whole visible space of the terminal and moving the cursor to the
top left.  This does not do anything if not connected to a terminal.

.. versionadded:: 2.0

---
## _interpret_color
```python
from termui import _interpret_color
```



---
## style
```python
from termui import style
```

Styles a text with ANSI styles and returns the new string.  By
default the styling is self contained which means that at the end
of the string a reset code is issued.  This can be prevented by
passing ``reset=False``.

Examples::

    click.echo(click.style('Hello World!', fg='green'))
    click.echo(click.style('ATTENTION!', blink=True))
    click.echo(click.style('Some things', reverse=True, fg='cyan'))
    click.echo(click.style('More colors', fg=(255, 12, 128), bg=117))

Supported color names:

* ``black`` (might be a gray)
* ``red``
* ``green``
* ``yellow`` (might be an orange)
* ``blue``
* ``magenta``
* ``cyan``
* ``white`` (might be light gray)
* ``bright_black``
* ``bright_red``
* ``bright_green``
* ``bright_yellow``
* ``bright_blue``
* ``bright_magenta``
* ``bright_cyan``
* ``bright_white``
* ``reset`` (reset the color code only)

If the terminal supports it, color may also be specified as:

-   An integer in the interval [0, 255]. The terminal must support
    8-bit/256-color mode.
-   An RGB tuple of three integers in [0, 255]. The terminal must
    support 24-bit/true-color mode.

See https://en.wikipedia.org/wiki/ANSI_color and
https://gist.github.com/XVilka/8346728 for more information.

:param text: the string to style with ansi codes.
:param fg: if provided this will become the foreground color.
:param bg: if provided this will become the background color.
:param bold: if provided this will enable or disable bold mode.
:param dim: if provided this will enable or disable dim mode.  This is
            badly supported.
:param underline: if provided this will enable or disable underline.
:param overline: if provided this will enable or disable overline.
:param italic: if provided this will enable or disable italic.
:param blink: if provided this will enable or disable blinking.
:param reverse: if provided this will enable or disable inverse
                rendering (foreground becomes background and the
                other way round).
:param strikethrough: if provided this will enable or disable
    striking through text.
:param reset: by default a reset-all code is added at the end of the
              string which means that styles do not carry over.  This
              can be disabled to compose styles.

.. versionchanged:: 8.0
    A non-string ``message`` is converted to a string.

.. versionchanged:: 8.0
   Added support for 256 and RGB color codes.

.. versionchanged:: 8.0
    Added the ``strikethrough``, ``italic``, and ``overline``
    parameters.

.. versionchanged:: 7.0
    Added support for bright colors.

.. versionadded:: 2.0

---
## unstyle
```python
from termui import unstyle
```

Removes ANSI styling information from a string.  Usually it's not
necessary to use this function as Click's echo function will
automatically remove styling if necessary.

.. versionadded:: 2.0

:param text: the text to remove style information from.

---
## secho
```python
from termui import secho
```

This function combines :func:`echo` and :func:`style` into one
call.  As such the following two calls are the same::

    click.secho('Hello World!', fg='green')
    click.echo(click.style('Hello World!', fg='green'))

All keyword arguments are forwarded to the underlying functions
depending on which one they go with.

Non-string types will be converted to :class:`str`. However,
:class:`bytes` are passed directly to :meth:`echo` without applying
style. If you want to style bytes that represent text, call
:meth:`bytes.decode` first.

.. versionchanged:: 8.0
    A non-string ``message`` is converted to a string. Bytes are
    passed through without style applied.

.. versionadded:: 2.0

---
## edit
```python
from termui import edit
```

Edits the given text in the defined editor.  If an editor is given
(should be the full path to the executable but the regular operating
system search path is used for finding the executable) it overrides
the detected editor.  Optionally, some environment variables can be
used.  If the editor is closed without changes, `None` is returned.  In
case a file is edited directly the return value is always `None` and
`require_save` and `extension` are ignored.

If the editor cannot be opened a :exc:`UsageError` is raised.

Note for Windows: to simplify cross-platform usage, the newlines are
automatically converted from POSIX to Windows and vice versa.  As such,
the message here will have ``\n`` as newline markers.

:param text: the text to edit.
:param editor: optionally the editor to use.  Defaults to automatic
               detection.
:param env: environment variables to forward to the editor.
:param require_save: if this is true, then not saving in the editor
                     will make the return value become `None`.
:param extension: the extension to tell the editor about.  This defaults
                  to `.txt` but changing this might change syntax
                  highlighting.
:param filename: if provided it will edit this file instead of the
                 provided text contents.  It will not use a temporary
                 file as an indirection in that case.

---
## launch
```python
from termui import launch
```

This function launches the given URL (or filename) in the default
viewer application for this file type.  If this is an executable, it
might launch the executable in a new session.  The return value is
the exit code of the launched application.  Usually, ``0`` indicates
success.

Examples::

    click.launch('https://click.palletsprojects.com/')
    click.launch('/my/downloaded/file', locate=True)

.. versionadded:: 2.0

:param url: URL or filename of the thing to launch.
:param wait: Wait for the program to exit before returning. This
    only works if the launched program blocks. In particular,
    ``xdg-open`` on Linux does not block.
:param locate: if this is set to `True` then instead of launching the
               application associated with the URL it will attempt to
               launch a file manager with the file located.  This
               might have weird effects if the URL does not point to
               the filesystem.

---
## getchar
```python
from termui import getchar
```

Fetches a single character from the terminal and returns it.  This
will always return a unicode character and under certain rare
circumstances this might return more than one character.  The
situations which more than one character is returned is when for
whatever reason multiple characters end up in the terminal buffer or
standard input was not actually a terminal.

Note that this will always read from the terminal, even if something
is piped into the standard input.

Note for Windows: in rare cases when typing non-ASCII characters, this
function might wait for a second character and then return both at once.
This is because certain Unicode characters look like special-key markers.

.. versionadded:: 2.0

:param echo: if set to `True`, the character read will also show up on
             the terminal.  The default is to not show it.

---
## raw_terminal
```python
from termui import raw_terminal
```



---
## pause
```python
from termui import pause
```

This command stops execution and waits for the user to press any
key to continue.  This is similar to the Windows batch "pause"
command.  If the program is not run through a terminal, this command
will instead do nothing.

.. versionadded:: 2.0

.. versionadded:: 4.0
   Added the `err` parameter.

:param info: The message to print before pausing. Defaults to
    ``"Press any key to continue..."``.
:param err: if set to message goes to ``stderr`` instead of
            ``stdout``, the same as with echo.

---
## prompt_func
```python
from termui import prompt_func
```



---
## _posixify
```python
from utils import _posixify
```



---
## safecall
```python
from utils import safecall
```

Wraps a function so that it swallows exceptions.

---
## make_str
```python
from utils import make_str
```

Converts a value into a valid string.

---
## make_default_short_help
```python
from utils import make_default_short_help
```

Returns a condensed version of help string.

---
## LazyFile
```python
from utils import LazyFile
```

A lazy file works like a regular file but it does not fully open
the file but it does perform some basic checks early to see if the
filename parameter does make sense.  This is useful for safely opening
files for writing.

---
## KeepOpenFile
```python
from utils import KeepOpenFile
```



---
## echo
```python
from utils import echo
```

Print a message and newline to stdout or a file. This should be
used instead of :func:`print` because it provides better support
for different data, files, and environments.

Compared to :func:`print`, this does the following:

-   Ensures that the output encoding is not misconfigured on Linux.
-   Supports Unicode in the Windows console.
-   Supports writing to binary outputs, and supports writing bytes
    to text outputs.
-   Supports colors and styles on Windows.
-   Removes ANSI color and style codes if the output does not look
    like an interactive terminal.
-   Always flushes the output.

:param message: The string or bytes to output. Other objects are
    converted to strings.
:param file: The file to write to. Defaults to ``stdout``.
:param err: Write to ``stderr`` instead of ``stdout``.
:param nl: Print a newline after the message. Enabled by default.
:param color: Force showing or hiding colors and other styles. By
    default Click will remove color if the output does not look like
    an interactive terminal.

.. versionchanged:: 6.0
    Support Unicode output on the Windows console. Click does not
    modify ``sys.stdout``, so ``sys.stdout.write()`` and ``print()``
    will still not support Unicode.

.. versionchanged:: 4.0
    Added the ``color`` parameter.

.. versionadded:: 3.0
    Added the ``err`` parameter.

.. versionchanged:: 2.0
    Support colors on Windows if colorama is installed.

---
## get_binary_stream
```python
from utils import get_binary_stream
```

Returns a system stream for byte processing.

:param name: the name of the stream to open.  Valid names are ``'stdin'``,
             ``'stdout'`` and ``'stderr'``

---
## get_text_stream
```python
from utils import get_text_stream
```

Returns a system stream for text processing.  This usually returns
a wrapped stream around a binary stream returned from
:func:`get_binary_stream` but it also can take shortcuts for already
correctly configured streams.

:param name: the name of the stream to open.  Valid names are ``'stdin'``,
             ``'stdout'`` and ``'stderr'``
:param encoding: overrides the detected default encoding.
:param errors: overrides the default error mode.

---
## open_file
```python
from utils import open_file
```

Open a file, with extra behavior to handle ``'-'`` to indicate
a standard stream, lazy open on write, and atomic write. Similar to
the behavior of the :class:`~click.File` param type.

If ``'-'`` is given to open ``stdout`` or ``stdin``, the stream is
wrapped so that using it in a context manager will not close it.
This makes it possible to use the function without accidentally
closing a standard stream:

.. code-block:: python

    with open_file(filename) as f:
        ...

:param filename: The name of the file to open, or ``'-'`` for
    ``stdin``/``stdout``.
:param mode: The mode in which to open the file.
:param encoding: The encoding to decode or encode a file opened in
    text mode.
:param errors: The error handling mode.
:param lazy: Wait to open the file until it is accessed. For read
    mode, the file is temporarily opened to raise access errors
    early, then closed until it is read again.
:param atomic: Write to a temporary file and replace the given file
    on close.

.. versionadded:: 3.0

---
## format_filename
```python
from utils import format_filename
```

Format a filename as a string for display. Ensures the filename can be
displayed by replacing any invalid bytes or surrogate escapes in the name
with the replacement character ``�``.

Invalid bytes or surrogate escapes will raise an error when written to a
stream with ``errors="strict". This will typically happen with ``stdout``
when the locale is something like ``en_GB.UTF-8``.

Many scenarios *are* safe to write surrogates though, due to PEP 538 and
PEP 540, including:

-   Writing to ``stderr``, which uses ``errors="backslashreplace"``.
-   The system has ``LANG=C.UTF-8``, ``C``, or ``POSIX``. Python opens
    stdout and stderr with ``errors="surrogateescape"``.
-   None of ``LANG/LC_*`` are set. Python assumes ``LANG=C.UTF-8``.
-   Python is started in UTF-8 mode  with  ``PYTHONUTF8=1`` or ``-X utf8``.
    Python opens stdout and stderr with ``errors="surrogateescape"``.

:param filename: formats a filename for UI display.  This will also convert
                 the filename into unicode without failing.
:param shorten: this optionally shortens the filename to strip of the
                path that leads up to it.

---
## get_app_dir
```python
from utils import get_app_dir
```

Returns the config folder for the application.  The default behavior
is to return whatever is most appropriate for the operating system.

To give you an idea, for an app called ``"Foo Bar"``, something like
the following folders could be returned:

Mac OS X:
  ``~/Library/Application Support/Foo Bar``
Mac OS X (POSIX):
  ``~/.foo-bar``
Unix:
  ``~/.config/foo-bar``
Unix (POSIX):
  ``~/.foo-bar``
Windows (roaming):
  ``C:\Users\<user>\AppData\Roaming\Foo Bar``
Windows (not roaming):
  ``C:\Users\<user>\AppData\Local\Foo Bar``

.. versionadded:: 2.0

:param app_name: the application name.  This should be properly capitalized
                 and can contain whitespace.
:param roaming: controls if the folder should be roaming or not on Windows.
                Has no effect otherwise.
:param force_posix: if this is set to `True` then on any POSIX system the
                    folder will be stored in the home folder with a leading
                    dot instead of the XDG config home or darwin's
                    application support folder.

---
## PacifyFlushWrapper
```python
from utils import PacifyFlushWrapper
```

This wrapper is used to catch and suppress BrokenPipeErrors resulting
from ``.flush()`` being called on broken pipe during the shutdown/final-GC
of the Python interpreter. Notably ``.flush()`` is always called on
``sys.stdout`` and ``sys.stderr``. So as to have minimal impact on any
other cleanup code, and the case where the underlying file is not a broken
pipe, all calls and attributes are proxied.

---
## _detect_program_name
```python
from utils import _detect_program_name
```

Determine the command used to run the program, for use in help
text. If a file or entry point was executed, the file name is
returned. If ``python -m`` was used to execute a module or package,
``python -m name`` is returned.

This doesn't try to be too precise, the goal is to give a concise
name for help text. Files are only shown as their name without the
path. ``python`` is only shown for modules, and the full path to
``sys.executable`` is not shown.

:param path: The Python file being executed. Python puts this in
    ``sys.argv[0]``, which is used by default.
:param _main: The ``__main__`` module. This should only be passed
    during internal testing.

.. versionadded:: 8.0
    Based on command args detection in the Werkzeug reloader.

:meta private:

---
## _expand_args
```python
from utils import _expand_args
```

Simulate Unix shell expansion with Python functions.

See :func:`glob.glob`, :func:`os.path.expanduser`, and
:func:`os.path.expandvars`.

This is intended for use on Windows, where the shell does not do any
expansion. It may not exactly match what a Unix shell would do.

:param args: List of command line arguments to expand.
:param user: Expand user home directory.
:param env: Expand environment variables.
:param glob_recursive: ``**`` matches directories recursively.

.. versionchanged:: 8.1
    Invalid glob patterns are treated as empty expansions rather
    than raising an error.

.. versionadded:: 8.0

:meta private:

---
## __getattr__
```python
from utils import __getattr__
```



---
## open
```python
from utils import open
```

Opens the file if it's not yet open.  This call might fail with
a :exc:`FileError`.  Not handling this error will produce an error
that Click shows.

---
## close
```python
from utils import close
```

Closes the underlying file, no matter what.

---
## close_intelligently
```python
from utils import close_intelligently
```

This function only closes the file if it was opened by the lazy
file wrapper.  For instance this will never close stdin.

---
## __enter__
```python
from utils import __enter__
```



---
## __exit__
```python
from utils import __exit__
```



---
## flush
```python
from utils import flush
```



---
## _join_param_hints
```python
from exceptions import _join_param_hints
```



---
## ClickException
```python
from exceptions import ClickException
```

An exception that Click can handle and show to the user.

---
## UsageError
```python
from exceptions import UsageError
```

Error in pytest usage or invocation.

---
## BadParameter
```python
from exceptions import BadParameter
```

An exception that formats out a standardized error message for a
bad parameter.  This is useful when thrown from a callback or type as
Click will attach contextual information to it (for instance, which
parameter it is).

.. versionadded:: 2.0

:param param: the parameter object that caused this error.  This can
              be left out, and Click will attach this info itself
              if possible.
:param param_hint: a string that shows up as parameter name.  This
                   can be used as alternative to `param` in cases
                   where custom validation should happen.  If it is
                   a string it's used as such, if it's a list then
                   each item is quoted and separated.

---
## MissingParameter
```python
from exceptions import MissingParameter
```

Raised if click required an option or argument but it was not
provided when invoking the script.

.. versionadded:: 4.0

:param param_type: a string that indicates the type of the parameter.
                   The default is to inherit the parameter type from
                   the given `param`.  Valid values are ``'parameter'``,
                   ``'option'`` or ``'argument'``.

---
## NoSuchOption
```python
from exceptions import NoSuchOption
```

Raised if click attempted to handle an option that does not
exist.

.. versionadded:: 4.0

---
## BadOptionUsage
```python
from exceptions import BadOptionUsage
```

Raised if an option is generally supplied but the use of the option
was incorrect.  This is for instance raised if the number of arguments
for an option is not correct.

.. versionadded:: 4.0

:param option_name: the name of the option being used incorrectly.

---
## BadArgumentUsage
```python
from exceptions import BadArgumentUsage
```

Raised if an argument is generally supplied but the use of the argument
was incorrect.  This is for instance raised if the number of values
for an argument is not correct.

.. versionadded:: 6.0

---
## FileError
```python
from exceptions import FileError
```

Exception class for problems with the File class.

---
## Abort
```python
from exceptions import Abort
```

Abort the build.

---
## Exit
```python
from exceptions import Exit
```

An exception that indicates that the application should exit with some
status code.

:param code: the status code to exit with.

---
## format_message
```python
from exceptions import format_message
```



---
## show
```python
from exceptions import show
```



---
## __name__
```python
from shell_completion import __name__
```



---
## shell_complete
```python
from shell_completion import shell_complete
```

Perform shell completion for the given CLI program.

:param cli: Command being called.
:param ctx_args: Extra arguments to pass to
    ``cli.make_context``.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.
:param instruction: Value of ``complete_var`` with the completion
    instruction and shell, in the form ``instruction_shell``.
:return: Status code to exit with.

---
## CompletionItem
```python
from shell_completion import CompletionItem
```

Represents a completion value and metadata about the value. The
default metadata is ``type`` to indicate special shell handling,
and ``help`` if a shell supports showing a help string next to the
value.

Arbitrary parameters can be passed when creating the object, and
accessed using ``item.attr``. If an attribute wasn't passed,
accessing it returns ``None``.

:param value: The completion suggestion.
:param type: Tells the shell script to provide special completion
    support for the type. Click uses ``"dir"`` and ``"file"``.
:param help: String shown next to the value if supported.
:param kwargs: Arbitrary metadata. The built-in implementations
    don't use this, but custom type completions paired with custom
    shell support could use it.

---
## ShellComplete
```python
from shell_completion import ShellComplete
```

Base class for providing shell completion support. A subclass for
a given shell will override attributes and methods to implement the
completion instructions (``source`` and ``complete``).

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.

.. versionadded:: 8.0

---
## BashComplete
```python
from shell_completion import BashComplete
```

Shell completion for Bash.

---
## ZshComplete
```python
from shell_completion import ZshComplete
```

Shell completion for Zsh.

---
## FishComplete
```python
from shell_completion import FishComplete
```

Shell completion for Fish.

---
## add_completion_class
```python
from shell_completion import add_completion_class
```

Register a :class:`ShellComplete` subclass under the given name.
The name will be provided by the completion instruction environment
variable during completion.

:param cls: The completion class that will handle completion for the
    shell.
:param name: Name to register the class under. Defaults to the
    class's ``name`` attribute.

---
## get_completion_class
```python
from shell_completion import get_completion_class
```

Look up a registered :class:`ShellComplete` subclass by the name
provided by the completion instruction environment variable. If the
name isn't registered, returns ``None``.

:param shell: Name the class is registered under.

---
## _is_incomplete_argument
```python
from shell_completion import _is_incomplete_argument
```

Determine if the given parameter is an argument that can still
accept values.

:param ctx: Invocation context for the command represented by the
    parsed complete args.
:param param: Argument object being checked.

---
## _start_of_option
```python
from shell_completion import _start_of_option
```

Check if the value looks like the start of an option.

---
## _is_incomplete_option
```python
from shell_completion import _is_incomplete_option
```

Determine if the given parameter is an option that needs a value.

:param args: List of complete args before the incomplete value.
:param param: Option object being checked.

---
## _resolve_context
```python
from shell_completion import _resolve_context
```

Produce the context hierarchy starting with the command and
traversing the complete arguments. This only follows the commands,
it doesn't trigger input prompts or callbacks.

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param args: List of complete args before the incomplete value.

---
## _resolve_incomplete
```python
from shell_completion import _resolve_incomplete
```

Find the Click object that will handle the completion of the
incomplete value. Return the object and the incomplete value.

:param ctx: Invocation context for the command represented by
    the parsed complete args.
:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.

---
## __init__
```python
from shell_completion import __init__
```



---
## __getattr__
```python
from shell_completion import __getattr__
```



---
## func_name
```python
from shell_completion import func_name
```

The name of the shell function defined by the completion
script.

---
## source_vars
```python
from shell_completion import source_vars
```

Vars for formatting :attr:`source_template`.

By default this provides ``complete_func``, ``complete_var``,
and ``prog_name``.

---
## source
```python
from shell_completion import source
```



---
## get_completion_args
```python
from shell_completion import get_completion_args
```



---
## get_completions
```python
from shell_completion import get_completions
```

Determine the context and last complete command or parameter
from the complete args. Call that object's ``shell_complete``
method to get the completions for the incomplete value.

:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.

---
## format_completion
```python
from shell_completion import format_completion
```



---
## complete
```python
from shell_completion import complete
```

Produce the completion data to send back to the shell.

By default this calls :meth:`get_completion_args`, gets the
completions, then calls :meth:`format_completion` for each
completion.

---
## _check_version
```python
from shell_completion import _check_version
```



---
## _make_text_stream
```python
from _compat import _make_text_stream
```



---
## is_ascii_encoding
```python
from _compat import is_ascii_encoding
```

Checks if a given encoding is ascii.

---
## get_best_encoding
```python
from _compat import get_best_encoding
```

Returns the default stream encoding if not found.

---
## _NonClosingTextIOWrapper
```python
from _compat import _NonClosingTextIOWrapper
```



---
## _FixupStream
```python
from _compat import _FixupStream
```

The new io interface needs more from streams than streams
traditionally implement.  As such, this fix-up code is necessary in
some circumstances.

The forcing of readable and writable flags are there because some tools
put badly patched objects on sys (one such offender are certain version
of jupyter notebook).

---
## _is_binary_reader
```python
from _compat import _is_binary_reader
```



---
## _is_binary_writer
```python
from _compat import _is_binary_writer
```



---
## _find_binary_reader
```python
from _compat import _find_binary_reader
```



---
## _find_binary_writer
```python
from _compat import _find_binary_writer
```



---
## _stream_is_misconfigured
```python
from _compat import _stream_is_misconfigured
```

A stream is misconfigured if its encoding is ASCII.

---
## _is_compat_stream_attr
```python
from _compat import _is_compat_stream_attr
```

A stream attribute is compatible if it is equal to the
desired value or the desired value is unset and the attribute
has a value.

---
## _is_compatible_text_stream
```python
from _compat import _is_compatible_text_stream
```

Check if a stream's encoding and errors attributes are
compatible with the desired values.

---
## _force_correct_text_stream
```python
from _compat import _force_correct_text_stream
```



---
## _force_correct_text_reader
```python
from _compat import _force_correct_text_reader
```



---
## _force_correct_text_writer
```python
from _compat import _force_correct_text_writer
```



---
## get_binary_stdin
```python
from _compat import get_binary_stdin
```



---
## get_binary_stdout
```python
from _compat import get_binary_stdout
```



---
## get_binary_stderr
```python
from _compat import get_binary_stderr
```



---
## get_text_stdin
```python
from _compat import get_text_stdin
```



---
## get_text_stdout
```python
from _compat import get_text_stdout
```



---
## get_text_stderr
```python
from _compat import get_text_stderr
```



---
## _wrap_io_open
```python
from _compat import _wrap_io_open
```

Handles not passing ``encoding`` and ``errors`` in binary mode.

---
## open_stream
```python
from _compat import open_stream
```



---
## _AtomicFile
```python
from _compat import _AtomicFile
```



---
## strip_ansi
```python
from _compat import strip_ansi
```



---
## _is_jupyter_kernel_output
```python
from _compat import _is_jupyter_kernel_output
```



---
## should_strip_ansi
```python
from _compat import should_strip_ansi
```



---
## term_len
```python
from _compat import term_len
```



---
## isatty
```python
from _compat import isatty
```



---
## _make_cached_stream_func
```python
from _compat import _make_cached_stream_func
```



---
## __init__
```python
from _compat import __init__
```



---
## __del__
```python
from _compat import __del__
```



---
## __getattr__
```python
from _compat import __getattr__
```



---
## read1
```python
from _compat import read1
```



---
## readable
```python
from _compat import readable
```



---
## writable
```python
from _compat import writable
```



---
## seekable
```python
from _compat import seekable
```



---
## name
```python
from _compat import name
```



---
## close
```python
from _compat import close
```



---
## __enter__
```python
from _compat import __enter__
```



---
## __exit__
```python
from _compat import __exit__
```



---
## __repr__
```python
from _compat import __repr__
```



---
## _get_argv_encoding
```python
from _compat import _get_argv_encoding
```



---
## auto_wrap_for_ansi
```python
from _compat import auto_wrap_for_ansi
```

Support ANSI color and style codes on Windows by wrapping a
stream with colorama.

---
## _get_windows_console_stream
```python
from _compat import _get_windows_console_stream
```



---
## func
```python
from _compat import func
```



---
## _safe_write
```python
from _compat import _safe_write
```



---
## __name__
```python
from _termui_impl import __name__
```

This module contains implementations for the termui module. To keep the
import time of Click down, some infrequently used functionality is
placed in this module and only imported as needed.

---
## ProgressBar
```python
from _termui_impl import ProgressBar
```



---
## pager
```python
from _termui_impl import pager
```

Decide what method to use for paging through text.

---
## _pipepager
```python
from _termui_impl import _pipepager
```

Page through text by feeding it to another program.  Invoking a
pager through this might support colors.

---
## _tempfilepager
```python
from _termui_impl import _tempfilepager
```

Page through text by invoking a program on a temporary file.

---
## _nullpager
```python
from _termui_impl import _nullpager
```

Simply print unformatted text.  This is the ultimate fallback.

---
## Editor
```python
from _termui_impl import Editor
```



---
## open_url
```python
from _termui_impl import open_url
```



---
## _translate_ch_to_exc
```python
from _termui_impl import _translate_ch_to_exc
```



---
## __init__
```python
from _termui_impl import __init__
```



---
## __enter__
```python
from _termui_impl import __enter__
```



---
## __exit__
```python
from _termui_impl import __exit__
```



---
## __iter__
```python
from _termui_impl import __iter__
```



---
## __next__
```python
from _termui_impl import __next__
```



---
## render_finish
```python
from _termui_impl import render_finish
```



---
## pct
```python
from _termui_impl import pct
```



---
## time_per_iteration
```python
from _termui_impl import time_per_iteration
```



---
## eta
```python
from _termui_impl import eta
```



---
## format_eta
```python
from _termui_impl import format_eta
```



---
## format_pos
```python
from _termui_impl import format_pos
```



---
## format_pct
```python
from _termui_impl import format_pct
```



---
## format_bar
```python
from _termui_impl import format_bar
```



---
## format_progress_line
```python
from _termui_impl import format_progress_line
```



---
## render_progress
```python
from _termui_impl import render_progress
```



---
## make_step
```python
from _termui_impl import make_step
```



---
## update
```python
from _termui_impl import update
```

Update the progress bar by advancing a specified number of
steps, and optionally set the ``current_item`` for this new
position.

:param n_steps: Number of steps to advance.
:param current_item: Optional item to set as ``current_item``
    for the updated position.

.. versionchanged:: 8.0
    Added the ``current_item`` optional parameter.

.. versionchanged:: 8.0
    Only render when the number of steps meets the
    ``update_min_steps`` threshold.

---
## finish
```python
from _termui_impl import finish
```



---
## generator
```python
from _termui_impl import generator
```

Return a generator which yields the items added to the bar
during construction, and updates the progress bar *after* the
yielded block returns.

---
## get_editor
```python
from _termui_impl import get_editor
```



---
## edit_file
```python
from _termui_impl import edit_file
```



---
## edit
```python
from _termui_impl import edit
```



---
## _unquote_file
```python
from _termui_impl import _unquote_file
```



---
## raw_terminal
```python
from _termui_impl import raw_terminal
```



---
## getchar
```python
from _termui_impl import getchar
```



---
## EchoingStdin
```python
from testing import EchoingStdin
```



---
## _pause_echo
```python
from testing import _pause_echo
```



---
## _NamedTextIOWrapper
```python
from testing import _NamedTextIOWrapper
```



---
## make_input_stream
```python
from testing import make_input_stream
```



---
## Result
```python
from testing import Result
```

Holds the captured result of an invoked CLI script.

---
## CliRunner
```python
from testing import CliRunner
```

The CLI runner provides functionality to invoke a Click command line
script for unittesting purposes in a isolated environment.  This only
works in single-threaded systems without any concurrency as it changes the
global interpreter state.

:param charset: the character set for the input and output data.
:param env: a dictionary with environment variables for overriding.
:param echo_stdin: if this is set to `True`, then reading from stdin writes
                   to stdout.  This is useful for showing examples in
                   some circumstances.  Note that regular prompts
                   will automatically echo the input.
:param mix_stderr: if this is set to `False`, then stdout and stderr are
                   preserved as independent streams.  This is useful for
                   Unix-philosophy apps that have predictable stdout and
                   noisy stderr, such that each may be measured
                   independently

---
## __getattr__
```python
from testing import __getattr__
```



---
## _echo
```python
from testing import _echo
```



---
## read
```python
from testing import read
```



---
## read1
```python
from testing import read1
```



---
## readline
```python
from testing import readline
```



---
## readlines
```python
from testing import readlines
```



---
## __iter__
```python
from testing import __iter__
```



---
## __repr__
```python
from testing import __repr__
```



---
## name
```python
from testing import name
```



---
## mode
```python
from testing import mode
```



---
## output
```python
from testing import output
```

The (standard) output as unicode string.

---
## stdout
```python
from testing import stdout
```

The standard output as unicode string.

---
## stderr
```python
from testing import stderr
```

The standard error as unicode string.

---
## get_default_prog_name
```python
from testing import get_default_prog_name
```

Given a command object it will return the default program name
for it.  The default is the `name` attribute or ``"root"`` if not
set.

---
## make_env
```python
from testing import make_env
```

Returns the environment overrides for invoking a script.

---
## isolation
```python
from testing import isolation
```

A context manager that sets up the isolation for invoking of a
command line tool.  This sets up stdin with the given input data
and `os.environ` with the overrides from the given dictionary.
This also rebinds some internals in Click to be mocked (like the
prompt functionality).

This is automatically done in the :meth:`invoke` method.

:param input: the input stream to put into sys.stdin.
:param env: the environment overrides as dictionary.
:param color: whether the output should contain color codes. The
              application can still override this explicitly.

.. versionchanged:: 8.0
    ``stderr`` is opened with ``errors="backslashreplace"``
    instead of the default ``"strict"``.

.. versionchanged:: 4.0
    Added the ``color`` parameter.

---
## invoke
```python
from testing import invoke
```

Invokes a command in an isolated environment.  The arguments are
forwarded directly to the command line script, the `extra` keyword
arguments are passed to the :meth:`~clickpkg.Command.main` function of
the command.

This returns a :class:`Result` object.

:param cli: the command to invoke
:param args: the arguments to invoke. It may be given as an iterable
             or a string. When given as string it will be interpreted
             as a Unix shell command. More details at
             :func:`shlex.split`.
:param input: the input data for `sys.stdin`.
:param env: the environment overrides.
:param catch_exceptions: Whether to catch any other exceptions than
                         ``SystemExit``.
:param extra: the keyword arguments to pass to :meth:`main`.
:param color: whether the output should contain color codes. The
              application can still override this explicitly.

.. versionchanged:: 8.0
    The result object has the ``return_value`` attribute with
    the value returned from the invoked command.

.. versionchanged:: 4.0
    Added the ``color`` parameter.

.. versionchanged:: 3.0
    Added the ``catch_exceptions`` parameter.

.. versionchanged:: 3.0
    The result object has the ``exc_info`` attribute with the
    traceback if available.

---
## isolated_filesystem
```python
from testing import isolated_filesystem
```

A context manager that creates a temporary directory and
changes the current working directory to it. This isolates tests
that affect the contents of the CWD to prevent them from
interfering with each other.

:param temp_dir: Create the temporary directory under this
    directory. If given, the created directory is not removed
    when exiting.

.. versionchanged:: 8.0
    Added the ``temp_dir`` parameter.

---
## visible_input
```python
from testing import visible_input
```



---
## hidden_input
```python
from testing import hidden_input
```



---
## _getchar
```python
from testing import _getchar
```



---
## should_strip_ansi
```python
from testing import should_strip_ansi
```



---
## __name__
```python
from decorators import __name__
```



---
## pass_context
```python
from decorators import pass_context
```

Marks a callback as wanting to receive the current context object as first argument.

---
## pass_obj
```python
from decorators import pass_obj
```

Similar to :func:`pass_context`, but only pass the object on the
context onwards (:attr:`Context.obj`).  This is useful if that object
represents the state of a nested system.

---
## make_pass_decorator
```python
from decorators import make_pass_decorator
```

Given an object type this creates a decorator that will work
similar to :func:`pass_obj` but instead of passing the object of the
current context, it will find the innermost context of type
:func:`object_type`.

This generates a decorator that works roughly like this::

    from functools import update_wrapper

    def decorator(f):
        @pass_context
        def new_func(ctx, *args, **kwargs):
            obj = ctx.find_object(object_type)
            return ctx.invoke(f, obj, *args, **kwargs)
        return update_wrapper(new_func, f)
    return decorator

:param object_type: the type of the object to pass.
:param ensure: if set to `True`, a new object will be created and
               remembered on the context if it's not there yet.

---
## pass_meta_key
```python
from decorators import pass_meta_key
```

Create a decorator that passes a key from
:attr:`click.Context.meta` as the first argument to the decorated
function.

:param key: Key in ``Context.meta`` to pass.
:param doc_description: Description of the object being passed,
    inserted into the decorator's docstring. Defaults to "the 'key'
    key from Context.meta".

.. versionadded:: 8.0

---
## command
```python
from decorators import command
```

Command decorator function.

Defines the command() function so that it uses the RichCommand class by default.

---
## group
```python
from decorators import group
```

Group decorator function.

Defines the group() function so that it uses the RichGroup class by default.

---
## _param_memo
```python
from decorators import _param_memo
```



---
## argument
```python
from decorators import argument
```

Attaches an argument to the command.  All positional arguments are
passed as parameter declarations to :class:`Argument`; all keyword
arguments are forwarded unchanged (except ``cls``).
This is equivalent to creating an :class:`Argument` instance manually
and attaching it to the :attr:`Command.params` list.

For the default argument class, refer to :class:`Argument` and
:class:`Parameter` for descriptions of parameters.

:param cls: the argument class to instantiate.  This defaults to
            :class:`Argument`.
:param param_decls: Passed as positional arguments to the constructor of
    ``cls``.
:param attrs: Passed as keyword arguments to the constructor of ``cls``.

---
## option
```python
from decorators import option
```

Attaches an option to the command.  All positional arguments are
passed as parameter declarations to :class:`Option`; all keyword
arguments are forwarded unchanged (except ``cls``).
This is equivalent to creating an :class:`Option` instance manually
and attaching it to the :attr:`Command.params` list.

For the default option class, refer to :class:`Option` and
:class:`Parameter` for descriptions of parameters.

:param cls: the option class to instantiate.  This defaults to
            :class:`Option`.
:param param_decls: Passed as positional arguments to the constructor of
    ``cls``.
:param attrs: Passed as keyword arguments to the constructor of ``cls``.

---
## confirmation_option
```python
from decorators import confirmation_option
```

Add a ``--yes`` option which shows a prompt before continuing if
not passed. If the prompt is declined, the program will exit.

:param param_decls: One or more option names. Defaults to the single
    value ``"--yes"``.
:param kwargs: Extra arguments are passed to :func:`option`.

---
## password_option
```python
from decorators import password_option
```

Add a ``--password`` option which prompts for a password, hiding
input and asking to enter the value again for confirmation.

:param param_decls: One or more option names. Defaults to the single
    value ``"--password"``.
:param kwargs: Extra arguments are passed to :func:`option`.

---
## version_option
```python
from decorators import version_option
```

Add a ``--version`` option which immediately prints the version
number and exits the program.

If ``version`` is not provided, Click will try to detect it using
:func:`importlib.metadata.version` to get the version for the
``package_name``. On Python < 3.8, the ``importlib_metadata``
backport must be installed.

If ``package_name`` is not provided, Click will try to detect it by
inspecting the stack frames. This will be used to detect the
version, so it must match the name of the installed package.

:param version: The version number to show. If not provided, Click
    will try to detect it.
:param param_decls: One or more option names. Defaults to the single
    value ``"--version"``.
:param package_name: The package name to detect the version from. If
    not provided, Click will try to detect it.
:param prog_name: The name of the CLI to show in the message. If not
    provided, it will be detected from the command.
:param message: The message to show. The values ``%(prog)s``,
    ``%(package)s``, and ``%(version)s`` are available. Defaults to
    ``"%(prog)s, version %(version)s"``.
:param kwargs: Extra arguments are passed to :func:`option`.
:raise RuntimeError: ``version`` could not be detected.

.. versionchanged:: 8.0
    Add the ``package_name`` parameter, and the ``%(package)s``
    value for messages.

.. versionchanged:: 8.0
    Use :mod:`importlib.metadata` instead of ``pkg_resources``. The
    version is detected based on the package name, not the entry
    point name. The Python package name must match the installed
    package name, or be passed with ``package_name=``.

---
## help_option
```python
from decorators import help_option
```

Add a ``--help`` option which immediately prints the help page
and exits the program.

This is usually unnecessary, as the ``--help`` option is added to
each command automatically unless ``add_help_option=False`` is
passed.

:param param_decls: One or more option names. Defaults to the single
    value ``"--help"``.
:param kwargs: Extra arguments are passed to :func:`option`.

---
## new_func
```python
from decorators import new_func
```



---
## decorator
```python
from decorators import decorator
```



---
## callback
```python
from decorators import callback
```



---
## __name__
```python
from sessions import __name__
```

requests.sessions
~~~~~~~~~~~~~~~~~

This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).

---
## BaseUrlSession
```python
from sessions import BaseUrlSession
```

A Session with a URL that all requests will use as a base.

Let's start by looking at a few examples:

.. code-block:: python

    >>> from requests_toolbelt import sessions
    >>> s = sessions.BaseUrlSession(
    ...     base_url='https://example.com/resource/')
    >>> r = s.get('sub-resource/', params={'foo': 'bar'})
    >>> print(r.request.url)
    https://example.com/resource/sub-resource/?foo=bar

Our call to the ``get`` method will make a request to the URL passed in
when we created the Session and the partial resource name we provide.
We implement this by overriding the ``request`` method of the Session.

Likewise, we override the ``prepare_request`` method so you can construct
a PreparedRequest in the same way:

.. code-block:: python

    >>> from requests import Request
    >>> from requests_toolbelt import sessions
    >>> s = sessions.BaseUrlSession(
    ...     base_url='https://example.com/resource/')
    >>> request = Request(method='GET', url='sub-resource/')
    >>> prepared_request = s.prepare_request(request)
    >>> r = s.send(prepared_request)
    >>> print(r.request.url)
    https://example.com/resource/sub-resource

.. note::

    The base URL that you provide and the path you provide are **very**
    important.

Let's look at another *similar* example

.. code-block:: python

    >>> from requests_toolbelt import sessions
    >>> s = sessions.BaseUrlSession(
    ...     base_url='https://example.com/resource/')
    >>> r = s.get('/sub-resource/', params={'foo': 'bar'})
    >>> print(r.request.url)
    https://example.com/sub-resource/?foo=bar

The key difference here is that we called ``get`` with ``/sub-resource/``,
i.e., there was a leading ``/``. This changes how we create the URL
because we rely on :mod:`urllib.parse.urljoin`.

To override how we generate the URL, sub-class this method and override the
``create_url`` method.

Based on implementation from
https://github.com/kennethreitz/requests/issues/2554#issuecomment-109341010

---
## __init__
```python
from sessions import __init__
```



---
## request
```python
from sessions import request
```

Constructs a :class:`Request <Request>`, prepares it and sends it.
Returns :class:`Response <Response>` object.

:param method: method for the new :class:`Request` object.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query
    string for the :class:`Request`.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) json to send in the body of the
    :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the
    :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the
    :class:`Request`.
:param files: (optional) Dictionary of ``'filename': file-like-objects``
    for multipart encoding upload.
:param auth: (optional) Auth tuple or callable to enable
    Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) How long to wait for the server to send
    data before giving up, as a float, or a :ref:`(connect timeout,
    read timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param allow_redirects: (optional) Set to True by default.
:type allow_redirects: bool
:param proxies: (optional) Dictionary mapping protocol or protocol and
    hostname to the URL of the proxy.
:param hooks: (optional) Dictionary mapping hook name to one event or
    list of events, event must be callable.
:param stream: (optional) whether to immediately download the response
    content. Defaults to ``False``.
:param verify: (optional) Either a boolean, in which case it controls whether we verify
    the server's TLS certificate, or a string, in which case it must be a path
    to a CA bundle to use. Defaults to ``True``. When set to
    ``False``, requests will accept any TLS certificate presented by
    the server, and will ignore hostname mismatches and/or expired
    certificates, which will make your application vulnerable to
    man-in-the-middle (MitM) attacks. Setting verify to ``False``
    may be useful during local development or testing.
:param cert: (optional) if String, path to ssl client cert file (.pem).
    If Tuple, ('cert', 'key') pair.
:rtype: requests.Response

---
## prepare_request
```python
from sessions import prepare_request
```

Constructs a :class:`PreparedRequest <PreparedRequest>` for
transmission and returns it. The :class:`PreparedRequest` has settings
merged from the :class:`Request <Request>` instance and those of the
:class:`Session`.

:param request: :class:`Request` instance to prepare with this
    session's settings.
:rtype: requests.PreparedRequest

---
## create_url
```python
from sessions import create_url
```

Create the URL based off this partial path.

---
## StreamingError
```python
from exceptions import StreamingError
```

Used in :mod:`requests_toolbelt.downloadutils.stream`.

---
## VersionMismatchError
```python
from exceptions import VersionMismatchError
```

Used to indicate a version mismatch in the version of requests required.

The feature in use requires a newer version of Requests to function
appropriately but the version installed is not sufficient.

---
## RequestsVersionTooOld
```python
from exceptions import RequestsVersionTooOld
```

Used to indicate that the Requests version is too old.

If the version of Requests is too old to support a feature, we will issue
this warning to the user.

---
## HTTPHeaderDict
```python
from _compat import HTTPHeaderDict
```

:param headers:
    An iterable of field-value pairs. Must not contain multiple field names
    when compared case-insensitively.

:param kwargs:
    Additional field-value pairs to pass in to ``dict.update``.

A ``dict`` like container for storing HTTP Headers.

Field names are stored and compared case-insensitively in compliance with
RFC 7230. Iteration provides the first case-sensitive key seen for each
case-insensitive pair.

Using ``__setitem__`` syntax overwrites fields that compare equal
case-insensitively in order to maintain ``dict``'s api. For fields that
compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
in a loop.

If multiple fields that are equal case-insensitively are passed to the
constructor or ``.update``, the behavior is undefined and some will be
lost.

>>> headers = HTTPHeaderDict()
>>> headers.add('Set-Cookie', 'foo=bar')
>>> headers.add('set-cookie', 'baz=quxx')
>>> headers['content-length'] = '7'
>>> headers['SET-cookie']
'foo=bar, baz=quxx'
>>> headers['Content-Length']
'7'

---
## __setitem__
```python
from _compat import __setitem__
```



---
## __getitem__
```python
from _compat import __getitem__
```



---
## __delitem__
```python
from _compat import __delitem__
```



---
## __contains__
```python
from _compat import __contains__
```



---
## __eq__
```python
from _compat import __eq__
```



---
## __ne__
```python
from _compat import __ne__
```



---
## __len__
```python
from _compat import __len__
```



---
## __iter__
```python
from _compat import __iter__
```



---
## pop
```python
from _compat import pop
```

D.pop(k[,d]) -> v, remove specified key and return its value.

If key is not found, d is returned if given, otherwise KeyError is
raised.

---
## discard
```python
from _compat import discard
```



---
## add
```python
from _compat import add
```

Adds a (name, value) pair, doesn't overwrite the value if it already
exists.

>>> headers = HTTPHeaderDict(foo='bar')
>>> headers.add('Foo', 'baz')
>>> headers['foo']
'bar, baz'

---
## extend
```python
from _compat import extend
```

Generic import function for any type of header-like object.
Adapted version of MutableMapping.update in order to insert items
with self.add instead of self.__setitem__

---
## getlist
```python
from _compat import getlist
```

Returns a list of all the values for the named field. Returns an
empty list if the key doesn't exist.

---
## _copy_from
```python
from _compat import _copy_from
```



---
## copy
```python
from _compat import copy
```



---
## iteritems
```python
from _compat import iteritems
```

Iterate over all header lines, including duplicate ones.

---
## itermerged
```python
from _compat import itermerged
```

Iterate over all headers, merging duplicate ones together.

---
## items
```python
from _compat import items
```



---
## from_httplib
```python
from _compat import from_httplib
```

Read headers from a Python 2 httplib message object.

---
## __name__
```python
from streaming_iterator import __name__
```

requests_toolbelt.streaming_iterator
====================================

This holds the implementation details for the :class:`StreamingIterator`. It
is designed for the case where you, the user, know the size of the upload but
need to provide the data as an iterator. This class will allow you to specify
the size and stream the data without using a chunked transfer-encoding.

---
## StreamingIterator
```python
from streaming_iterator import StreamingIterator
```

This class provides a way of allowing iterators with a known size to be
streamed instead of chunked.

In requests, if you pass in an iterator it assumes you want to use
chunked transfer-encoding to upload the data, which not all servers
support well. Additionally, you may want to set the content-length
yourself to avoid this but that will not work. The only way to preempt
requests using a chunked transfer-encoding and forcing it to stream the
uploads is to mimic a very specific interace. Instead of having to know
these details you can instead just use this class. You simply provide the
size and iterator and pass the instance of StreamingIterator to requests
via the data parameter like so:

.. code-block:: python

    from requests_toolbelt import StreamingIterator

    import requests

    # Let iterator be some generator that you already have and size be
    # the size of the data produced by the iterator

    r = requests.post(url, data=StreamingIterator(size, iterator))

You can also pass file-like objects to :py:class:`StreamingIterator` in
case requests can't determize the filesize itself. This is the case with
streaming file objects like ``stdin`` or any sockets. Wrapping e.g. files
that are on disk with ``StreamingIterator`` is unnecessary, because
requests can determine the filesize itself.

Naturally, you should also set the `Content-Type` of your upload
appropriately because the toolbelt will not attempt to guess that for you.

---
## _IteratorAsBinaryFile
```python
from streaming_iterator import _IteratorAsBinaryFile
```



---
## __init__
```python
from streaming_iterator import __init__
```



---
## read
```python
from streaming_iterator import read
```



---
## _get_bytes
```python
from streaming_iterator import _get_bytes
```



---
## _load_bytes
```python
from streaming_iterator import _load_bytes
```



---
## _parents
```python
from __init__ import _parents
```

yield all parents of path including path

---
## _ancestry
```python
from __init__ import _ancestry
```

Given a path with elements separated by
posixpath.sep, generate all elements of that path.

>>> list(_ancestry('b/d'))
['b/d', 'b']
>>> list(_ancestry('/b/d/'))
['/b/d', '/b']
>>> list(_ancestry('b/d/f/'))
['b/d/f', 'b/d', 'b']
>>> list(_ancestry('b'))
['b']
>>> list(_ancestry(''))
[]

Multiple separators are treated like a single.

>>> list(_ancestry('//b//d///f//'))
['//b//d///f', '//b//d', '//b']

---
## _difference
```python
from __init__ import _difference
```

Return items in minuend not in subtrahend, retaining order
with O(1) lookup.

---
## InitializedState
```python
from __init__ import InitializedState
```

Mix-in to save the initialization state for pickling.

---
## CompleteDirs
```python
from __init__ import CompleteDirs
```

A ZipFile subclass that ensures that implied directories
are always included in the namelist.

>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
['foo/', 'foo/bar/']
>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt', 'foo/bar/']))
['foo/']

---
## FastLookup
```python
from __init__ import FastLookup
```

ZipFile subclass to ensure implicit
dirs exist and are resolved rapidly.

---
## _extract_text_encoding
```python
from __init__ import _extract_text_encoding
```



---
## Path
```python
from __init__ import Path
```

A :class:`importlib.resources.abc.Traversable` interface for zip files.

Implements many of the features users enjoy from
:class:`pathlib.Path`.

Consider a zip file with this structure::

    .
    ├── a.txt
    └── b
        ├── c.txt
        └── d
            └── e.txt

>>> data = io.BytesIO()
>>> zf = zipfile.ZipFile(data, 'w')
>>> zf.writestr('a.txt', 'content of a')
>>> zf.writestr('b/c.txt', 'content of c')
>>> zf.writestr('b/d/e.txt', 'content of e')
>>> zf.filename = 'mem/abcde.zip'

Path accepts the zipfile object itself or a filename

>>> path = Path(zf)

From there, several path operations are available.

Directory iteration (including the zip file itself):

>>> a, b = path.iterdir()
>>> a
Path('mem/abcde.zip', 'a.txt')
>>> b
Path('mem/abcde.zip', 'b/')

name property:

>>> b.name
'b'

join with divide operator:

>>> c = b / 'c.txt'
>>> c
Path('mem/abcde.zip', 'b/c.txt')
>>> c.name
'c.txt'

Read text:

>>> c.read_text(encoding='utf-8')
'content of c'

existence:

>>> c.exists()
True
>>> (b / 'missing.txt').exists()
False

Coercion to string:

>>> import os
>>> str(c).replace(os.sep, posixpath.sep)
'mem/abcde.zip/b/c.txt'

At the root, ``name``, ``filename``, and ``parent``
resolve to the zipfile.

>>> str(path)
'mem/abcde.zip/'
>>> path.name
'abcde.zip'
>>> path.filename == pathlib.Path('mem/abcde.zip')
True
>>> str(path.parent)
'mem'

If the zipfile has no filename, such attributes are not
valid and accessing them will raise an Exception.

>>> zf.filename = None
>>> path.name
Traceback (most recent call last):
...
TypeError: ...

>>> path.filename
Traceback (most recent call last):
...
TypeError: ...

>>> path.parent
Traceback (most recent call last):
...
TypeError: ...

# workaround python/cpython#106763
>>> pass

---
## _implied_dirs
```python
from __init__ import _implied_dirs
```



---
## namelist
```python
from __init__ import namelist
```



---
## _name_set
```python
from __init__ import _name_set
```



---
## resolve_dir
```python
from __init__ import resolve_dir
```

If the name represents a directory, return that name
as a directory (with the trailing slash).

---
## getinfo
```python
from __init__ import getinfo
```

Supplement getinfo for implied dirs.

---
## make
```python
from __init__ import make
```



---
## inject
```python
from __init__ import inject
```

Given a writable zip file zf, inject directory entries for
any directories implied by the presence of children.

---
## open
```python
from __init__ import open
```

Open an LZ4Frame-compressed file in binary or text mode.

``filename`` can be either an actual file name (given as a str, bytes, or
PathLike object), in which case the named file is opened, or it can be an
existing file object to read from or write to.

The ``mode`` argument can be ``'r'``, ``'rb'`` (default), ``'w'``,
``'wb'``, ``'x'``, ``'xb'``, ``'a'``, or ``'ab'`` for binary mode, or
``'rt'``, ``'wt'``, ``'xt'``, or ``'at'`` for text mode.

For binary mode, this function is equivalent to the `LZ4FrameFile`
constructor: `LZ4FrameFile(filename, mode, ...)`.

For text mode, an `LZ4FrameFile` object is created, and wrapped in an
``io.TextIOWrapper`` instance with the specified encoding, error handling
behavior, and line ending(s).

Args:
    filename (str, bytes, os.PathLike): file name or file object to open

Keyword Args:
    mode (str): mode for opening the file
    encoding (str): the name of the encoding that will be used for
        encoding/deconging the stream. It defaults to
        ``locale.getpreferredencoding(False)``. See ``io.TextIOWrapper``
        for further details.
    errors (str): specifies how encoding and decoding errors are to be
        handled. See ``io.TextIOWrapper`` for further details.
    newline (str): controls how line endings are handled. See
        ``io.TextIOWrapper`` for further details.
    return_bytearray (bool): When ``False`` a bytes object is returned
        from the calls to methods of this class. When ``True`` a bytearray
        object will be returned. The default is ``False``.
    source_size (int): Optionally specify the total size of the
        uncompressed data. If specified, will be stored in the compressed
        frame header as an 8-byte field for later use during decompression.
        Default is 0 (no size stored). Only used for writing compressed
        files.
    block_size (int): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    block_linked (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    compression_level (int): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    content_checksum (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    block_checksum (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    auto_flush (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.

---
## _base
```python
from __init__ import _base
```



---
## suffix
```python
from __init__ import suffix
```



---
## suffixes
```python
from __init__ import suffixes
```



---
## stem
```python
from __init__ import stem
```



---
## filename
```python
from __init__ import filename
```



---
## read_bytes
```python
from __init__ import read_bytes
```



---
## _is_child
```python
from __init__ import _is_child
```



---
## _next
```python
from __init__ import _next
```



---
## is_dir
```python
from __init__ import is_dir
```



---
## is_file
```python
from __init__ import is_file
```



---
## exists
```python
from __init__ import exists
```



---
## iterdir
```python
from __init__ import iterdir
```



---
## is_symlink
```python
from __init__ import is_symlink
```

Return whether this path is a symlink.

---
## glob
```python
from __init__ import glob
```



---
## rglob
```python
from __init__ import rglob
```



---
## relative_to
```python
from __init__ import relative_to
```



---
## parent
```python
from __init__ import parent
```



---
## __name__
```python
from glob import __name__
```



---
## Translator
```python
from glob import Translator
```

>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators

>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators

---
## separate
```python
from glob import separate
```

Separate out character sets to avoid translating their contents.

>>> [m.group(0) for m in separate('*.txt')]
['*.txt']
>>> [m.group(0) for m in separate('a[?]txt')]
['a', '[?]', 'txt']

---
## __init__
```python
from glob import __init__
```



---
## translate
```python
from glob import translate
```

Given a glob pattern, produce a regex that matches it.

---
## extend
```python
from glob import extend
```

Extend regex for pattern-wide concerns.

Apply '(?s:)' to create a non-matching group that
matches newlines (valid on Unix).

Append '\Z' to imply fullmatch even when match is used.

---
## match_dirs
```python
from glob import match_dirs
```

Ensure that zipfile.Path directory names are matched.

zipfile.Path directory names always end in a slash.

---
## translate_core
```python
from glob import translate_core
```

Given a glob pattern, produce a regex that matches it.

>>> t = Translator()
>>> t.translate_core('*.txt').replace('\\\\', '')
'[^/]*\\.txt'
>>> t.translate_core('a?txt')
'a[^/]txt'
>>> t.translate_core('**/*').replace('\\\\', '')
'.*/[^/][^/]*'

---
## replace
```python
from glob import replace
```

Perform the replacements for a match from :func:`separate`.

---
## restrict_rglob
```python
from glob import restrict_rglob
```

Raise ValueError if ** appears in anything but a full path segment.

>>> Translator().translate('**foo')
Traceback (most recent call last):
...
ValueError: ** must appear alone in a path segment

---
## star_not_empty
```python
from glob import star_not_empty
```

Ensure that * will not match an empty segment.

---
## handle_segment
```python
from glob import handle_segment
```



---
## __name__
```python
from auth import __name__
```

requests.auth
~~~~~~~~~~~~~

This module contains the authentication handlers for Requests.

---
## __name__
```python
from server import __name__
```

An example Flight Python server.

---
## ServerProtocol
```python
from server import ServerProtocol
```

Sans-I/O implementation of a WebSocket server connection.

Args:
    origins: acceptable values of the ``Origin`` header; include
        :obj:`None` in the list if the lack of an origin is acceptable.
        This is useful for defending against Cross-Site WebSocket
        Hijacking attacks.
    extensions: list of supported extensions, in order in which they
        should be tried.
    subprotocols: list of supported subprotocols, in order of decreasing
        preference.
    select_subprotocol: Callback for selecting a subprotocol among
        those supported by the client and the server. It has the same
        signature as the :meth:`select_subprotocol` method, including a
        :class:`ServerProtocol` instance as first argument.
    state: initial state of the WebSocket connection.
    max_size: maximum size of incoming messages in bytes;
        :obj:`None` disables the limit.
    logger: logger for this connection;
        defaults to ``logging.getLogger("websockets.client")``;
        see the :doc:`logging guide <../../topics/logging>` for details.

---
## ServerConnection
```python
from server import ServerConnection
```

Threaded implementation of a WebSocket server connection.

:class:`ServerConnection` provides :meth:`recv` and :meth:`send` methods for
receiving and sending messages.

It supports iteration to receive messages::

    for message in websocket:
        process(message)

The iterator exits normally when the connection is closed with close code
1000 (OK) or 1001 (going away) or without a close code. It raises a
:exc:`~websockets.exceptions.ConnectionClosedError` when the connection is
closed with any other code.

Args:
    socket: Socket connected to a WebSocket client.
    protocol: Sans-I/O connection.
    close_timeout: Timeout for closing the connection in seconds.

---
## __init__
```python
from server import __init__
```



---
## accept
```python
from server import accept
```

Create a handshake response to accept the connection.

If the connection cannot be established, the handshake response
actually rejects the handshake.

You must send the handshake response with :meth:`send_response`.

You may modify it before sending it, for example to add HTTP headers.

Args:
    request: WebSocket handshake request event received from the client.

Returns:
    WebSocket handshake response event to send to the client.

---
## process_request
```python
from server import process_request
```

Check a handshake request and negotiate extensions and subprotocol.

This function doesn't verify that the request is an HTTP/1.1 or higher
GET request and doesn't check the ``Host`` header. These controls are
usually performed earlier in the HTTP request handling code. They're
the responsibility of the caller.

Args:
    request: WebSocket handshake request received from the client.

Returns:
    Tuple[str, Optional[str], Optional[str]]:
    ``Sec-WebSocket-Accept``, ``Sec-WebSocket-Extensions``, and
    ``Sec-WebSocket-Protocol`` headers for the handshake response.

Raises:
    InvalidHandshake: if the handshake request is invalid;
        then the server must return 400 Bad Request error.

---
## process_origin
```python
from server import process_origin
```

Handle the Origin HTTP request header.

Args:
    headers: request headers.
    origins: optional list of acceptable origins.

Raises:
    InvalidOrigin: if the origin isn't acceptable.

---
## process_extensions
```python
from server import process_extensions
```

Handle the Sec-WebSocket-Extensions HTTP request header.

Accept or reject each extension proposed in the client request.
Negotiate parameters for accepted extensions.

Return the Sec-WebSocket-Extensions HTTP response header and the list
of accepted extensions.

:rfc:`6455` leaves the rules up to the specification of each
:extension.

To provide this level of flexibility, for each extension proposed by
the client, we check for a match with each extension available in the
server configuration. If no match is found, the extension is ignored.

If several variants of the same extension are proposed by the client,
it may be accepted several times, which won't make sense in general.
Extensions must implement their own requirements. For this purpose,
the list of previously accepted extensions is provided.

This process doesn't allow the server to reorder extensions. It can
only select a subset of the extensions proposed by the client.

Other requirements, for example related to mandatory extensions or the
order of extensions, may be implemented by overriding this method.

Args:
    headers: request headers.
    extensions: optional list of supported extensions.

Raises:
    InvalidHandshake: to abort the handshake with an HTTP 400 error.

---
## process_subprotocol
```python
from server import process_subprotocol
```

Handle the Sec-WebSocket-Protocol HTTP request header.

Return Sec-WebSocket-Protocol HTTP response header, which is the same
as the selected subprotocol.

Args:
    headers: request headers.
    available_subprotocols: optional list of supported subprotocols.

Raises:
    InvalidHandshake: to abort the handshake with an HTTP 400 error.

---
## select_subprotocol
```python
from server import select_subprotocol
```

Pick a subprotocol among those supported by the client and the server.

If several subprotocols are available, select the preferred subprotocol
by giving equal weight to the preferences of the client and the server.

If no subprotocol is available, proceed without a subprotocol.

You may provide a ``select_subprotocol`` argument to :func:`serve` or
:class:`WebSocketServerProtocol` to override this logic. For example,
you could reject the handshake if the client doesn't support a
particular subprotocol, rather than accept the handshake without that
subprotocol.

Args:
    client_subprotocols: list of subprotocols offered by the client.
    server_subprotocols: list of subprotocols available on the server.

Returns:
    Optional[Subprotocol]: Selected subprotocol, if a common subprotocol
    was found.

    :obj:`None` to continue without a subprotocol.

---
## reject
```python
from server import reject
```

Create a handshake response to reject the connection.

A short plain text response is the best fallback when failing to
establish a WebSocket connection.

You must send the handshake response with :meth:`send_response`.

You can modify it before sending it, for example to alter HTTP headers.

Args:
    status: HTTP status code.
    text: HTTP response body; will be encoded to UTF-8.

Returns:
    Response: WebSocket handshake response event to send to the client.

---
## send_response
```python
from server import send_response
```

Send a handshake response to the client.

Args:
    response: WebSocket handshake response event to send.

---
## parse
```python
from server import parse
```



---
## read_line
```python
from streams import read_line
```

Read a LF-terminated line from the stream.

This is a generator-based coroutine.

The return value includes the LF character.

Args:
    m: maximum number bytes to read; this is a security limit.

Raises:
    EOFError: if the stream ends without a LF.
    RuntimeError: if the stream ends in more than ``m`` bytes.

---
## read_exact
```python
from streams import read_exact
```

Read a given number of bytes from the stream.

This is a generator-based coroutine.

Args:
    n: how many bytes to read.

Raises:
    EOFError: if the stream ends in less than ``n`` bytes.

---
## read_to_eof
```python
from streams import read_to_eof
```

Read all bytes from the stream.

This is a generator-based coroutine.

Args:
    m: maximum number bytes to read; this is a security limit.

Raises:
    RuntimeError: if the stream ends in more than ``m`` bytes.

---
## discard
```python
from streams import discard
```

Discard all buffered data, but don't end the stream.

---
## get_version
```python
from version import get_version
```



---
## get_commit
```python
from version import get_commit
```



---
## __name__
```python
from protocol import __name__
```



---
## Side
```python
from protocol import Side
```

A WebSocket connection is either a server or a client.

---
## State
```python
from protocol import State
```

A WebSocket connection is in one of these four states.

---
## Protocol
```python
from protocol import Protocol
```

Sans-I/O implementation of a WebSocket connection.

Args:
    side: :attr:`~Side.CLIENT` or :attr:`~Side.SERVER`.
    state: initial state of the WebSocket connection.
    max_size: maximum size of incoming messages in bytes;
        :obj:`None` disables the limit.
    logger: logger for this connection; depending on ``side``,
        defaults to ``logging.getLogger("websockets.client")``
        or ``logging.getLogger("websockets.server")``;
        see the :doc:`logging guide <../../topics/logging>` for details.

---
## __init__
```python
from protocol import __init__
```



---
## state
```python
from protocol import state
```



---
## close_code
```python
from protocol import close_code
```

WebSocket close code, defined in `section 7.1.5 of RFC 6455`_.

.. _section 7.1.5 of RFC 6455:
    https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5

:obj:`None` if the connection isn't closed yet.

---
## close_reason
```python
from protocol import close_reason
```

WebSocket close reason, defined in `section 7.1.6 of RFC 6455`_.

.. _section 7.1.6 of RFC 6455:
    https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.6

:obj:`None` if the connection isn't closed yet.

---
## close_exc
```python
from protocol import close_exc
```

Exception to raise when trying to interact with a closed connection.

Don't raise this exception while the connection :attr:`state`
is :attr:`~websockets.protocol.State.CLOSING`; wait until
it's :attr:`~websockets.protocol.State.CLOSED`.

Indeed, the exception includes the close code and reason, which are
known only once the connection is closed.

Raises:
    AssertionError: if the connection isn't closed yet.

---
## receive_data
```python
from protocol import receive_data
```

Receive data from the network.

After calling this method:

- You must call :meth:`data_to_send` and send this data to the network.
- You should call :meth:`events_received` and process resulting events.

Raises:
    EOFError: if :meth:`receive_eof` was called earlier.

---
## receive_eof
```python
from protocol import receive_eof
```

Receive the end of the data stream from the network.

After calling this method:

- You must call :meth:`data_to_send` and send this data to the network;
  it will return ``[b""]``, signaling the end of the stream, or ``[]``.
- You aren't expected to call :meth:`events_received`; it won't return
  any new events.

Raises:
    EOFError: if :meth:`receive_eof` was called earlier.

---
## send_continuation
```python
from protocol import send_continuation
```

Send a `Continuation frame`_.

.. _Continuation frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

Parameters:
    data: payload containing the same kind of data
        as the initial frame.
    fin: FIN bit; set it to :obj:`True` if this is the last frame
        of a fragmented message and to :obj:`False` otherwise.

Raises:
    ProtocolError: if a fragmented message isn't in progress.

---
## send_text
```python
from protocol import send_text
```

Send a `Text frame`_.

.. _Text frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

Parameters:
    data: payload containing text encoded with UTF-8.
    fin: FIN bit; set it to :obj:`False` if this is the first frame of
        a fragmented message.

Raises:
    ProtocolError: if a fragmented message is in progress.

---
## send_binary
```python
from protocol import send_binary
```

Send a `Binary frame`_.

.. _Binary frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

Parameters:
    data: payload containing arbitrary binary data.
    fin: FIN bit; set it to :obj:`False` if this is the first frame of
        a fragmented message.

Raises:
    ProtocolError: if a fragmented message is in progress.

---
## send_close
```python
from protocol import send_close
```

Send a `Close frame`_.

.. _Close frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.1

Parameters:
    code: close code.
    reason: close reason.

Raises:
    ProtocolError: if a fragmented message is being sent, if the code
        isn't valid, or if a reason is provided without a code

---
## send_ping
```python
from protocol import send_ping
```

Send a `Ping frame`_.

.. _Ping frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2

Parameters:
    data: payload containing arbitrary binary data.

---
## send_pong
```python
from protocol import send_pong
```

Send a `Pong frame`_.

.. _Pong frame:
    https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.3

Parameters:
    data: payload containing arbitrary binary data.

---
## fail
```python
from protocol import fail
```

`Fail the WebSocket connection`_.

.. _Fail the WebSocket connection:
    https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.7

Parameters:
    code: close code
    reason: close reason

Raises:
    ProtocolError: if the code isn't valid.

---
## events_received
```python
from protocol import events_received
```

Fetch events generated from data received from the network.

Call this method immediately after any of the ``receive_*()`` methods.

Process resulting events, likely by passing them to the application.

Returns:
    List[Event]: Events read from the connection.

---
## data_to_send
```python
from protocol import data_to_send
```

Obtain data to send to the network.

Call this method immediately after any of the ``receive_*()``,
``send_*()``, or :meth:`fail` methods.

Write resulting data to the connection.

The empty bytestring :data:`~websockets.protocol.SEND_EOF` signals
the end of the data stream. When you receive it, half-close the TCP
connection.

Returns:
    List[bytes]: Data to write to the connection.

---
## close_expected
```python
from protocol import close_expected
```

Tell if the TCP connection is expected to close soon.

Call this method immediately after any of the ``receive_*()``,
``send_close()``, or :meth:`fail` methods.

If it returns :obj:`True`, schedule closing the TCP connection after a
short timeout if the other side hasn't already closed it.

Returns:
    bool: Whether the TCP connection is expected to close soon.

---
## parse
```python
from protocol import parse
```

Parse incoming data into frames.

:meth:`receive_data` and :meth:`receive_eof` run this generator
coroutine until it needs more data or reaches EOF.

:meth:`parse` never raises an exception. Instead, it sets the
:attr:`parser_exc` and yields control.

---
## discard
```python
from protocol import discard
```

Discard incoming data.

This coroutine replaces :meth:`parse`:

- after receiving a close frame, during a normal closure (1.4);
- after sending a close frame, during an abnormal closure (7.1.7).

---
## recv_frame
```python
from protocol import recv_frame
```

Process an incoming frame.

---
## send_frame
```python
from protocol import send_frame
```



---
## send_eof
```python
from protocol import send_eof
```



---
## ClientProtocol
```python
from client import ClientProtocol
```

Sans-I/O implementation of a WebSocket client connection.

Args:
    wsuri: URI of the WebSocket server, parsed
        with :func:`~websockets.uri.parse_uri`.
    origin: value of the ``Origin`` header. This is useful when connecting
        to a server that validates the ``Origin`` header to defend against
        Cross-Site WebSocket Hijacking attacks.
    extensions: list of supported extensions, in order in which they
        should be tried.
    subprotocols: list of supported subprotocols, in order of decreasing
        preference.
    state: initial state of the WebSocket connection.
    max_size: maximum size of incoming messages in bytes;
        :obj:`None` disables the limit.
    logger: logger for this connection;
        defaults to ``logging.getLogger("websockets.client")``;
        see the :doc:`logging guide <../../topics/logging>` for details.

---
## ClientConnection
```python
from client import ClientConnection
```

Threaded implementation of a WebSocket client connection.

:class:`ClientConnection` provides :meth:`recv` and :meth:`send` methods for
receiving and sending messages.

It supports iteration to receive messages::

    for message in websocket:
        process(message)

The iterator exits normally when the connection is closed with close code
1000 (OK) or 1001 (going away) or without a close code. It raises a
:exc:`~websockets.exceptions.ConnectionClosedError` when the connection is
closed with any other code.

Args:
    socket: Socket connected to a WebSocket server.
    protocol: Sans-I/O connection.
    close_timeout: Timeout for closing the connection in seconds.

---
## connect
```python
from client import connect
```

Connect to the WebSocket server at ``uri``.

This function returns a :class:`ClientConnection` instance, which you can
use to send and receive messages.

:func:`connect` may be used as a context manager::

    async with websockets.sync.client.connect(...) as websocket:
        ...

The connection is closed automatically when exiting the context.

Args:
    uri: URI of the WebSocket server.
    sock: Preexisting TCP socket. ``sock`` overrides the host and port
        from ``uri``. You may call :func:`socket.create_connection` to
        create a suitable TCP socket.
    ssl_context: Configuration for enabling TLS on the connection.
    server_hostname: Host name for the TLS handshake. ``server_hostname``
        overrides the host name from ``uri``.
    origin: Value of the ``Origin`` header, for servers that require it.
    extensions: List of supported extensions, in order in which they
        should be negotiated and run.
    subprotocols: List of supported subprotocols, in order of decreasing
        preference.
    additional_headers (HeadersLike | None): Arbitrary HTTP headers to add
        to the handshake request.
    user_agent_header: Value of  the ``User-Agent`` request header.
        It defaults to ``"Python/x.y.z websockets/X.Y"``.
        Setting it to :obj:`None` removes the header.
    compression: The "permessage-deflate" extension is enabled by default.
        Set ``compression`` to :obj:`None` to disable it. See the
        :doc:`compression guide <../../topics/compression>` for details.
    open_timeout: Timeout for opening the connection in seconds.
        :obj:`None` disables the timeout.
    close_timeout: Timeout for closing the connection in seconds.
        :obj:`None` disables the timeout.
    max_size: Maximum size of incoming messages in bytes.
        :obj:`None` disables the limit.
    logger: Logger for this client.
        It defaults to ``logging.getLogger("websockets.client")``.
        See the :doc:`logging guide <../../topics/logging>` for details.
    create_connection: Factory for the :class:`ClientConnection` managing
        the connection. Set it to a wrapper or a subclass to customize
        connection handling.

Raises:
    InvalidURI: If ``uri`` isn't a valid WebSocket URI.
    OSError: If the TCP connection fails.
    InvalidHandshake: If the opening handshake fails.
    TimeoutError: If the opening handshake times out.

---
## process_response
```python
from client import process_response
```

Check a handshake response.

Args:
    request: WebSocket handshake response received from the server.

Raises:
    InvalidHandshake: if the handshake response is invalid.

---
## process_extensions
```python
from client import process_extensions
```

Handle the Sec-WebSocket-Extensions HTTP response header.

Check that each extension is supported, as well as its parameters.

Return the list of accepted extensions.

Raise :exc:`~websockets.exceptions.InvalidHandshake` to abort the
connection.

:rfc:`6455` leaves the rules up to the specification of each
:extension.

To provide this level of flexibility, for each extension accepted by
the server, we check for a match with each extension available in the
client configuration. If no match is found, an exception is raised.

If several variants of the same extension are accepted by the server,
it may be configured several times, which won't make sense in general.
Extensions must implement their own requirements. For this purpose,
the list of previously accepted extensions is provided.

Other requirements, for example related to mandatory extensions or the
order of extensions, may be implemented by overriding this method.

---
## process_subprotocol
```python
from client import process_subprotocol
```

Handle the Sec-WebSocket-Protocol HTTP response header.

Check that it contains exactly one supported subprotocol.

Return the selected subprotocol.

---
## send_request
```python
from client import send_request
```

Send a handshake request to the server.

Args:
    request: WebSocket handshake request event.

---
## parse
```python
from client import parse
```



---
## __name__
```python
from imports import __name__
```



---
## import_name
```python
from imports import import_name
```

Import ``name`` from ``source`` in ``namespace``.

There are two use cases:

- ``name`` is an object defined in ``source``;
- ``name`` is a submodule of ``source``.

Neither :func:`__import__` nor :func:`~importlib.import_module` does
exactly this. :func:`__import__` is closer to the intended behavior.

---
## lazy_import
```python
from imports import lazy_import
```

Provide lazy, module-level imports.

Typical use::

    __getattr__, __dir__ = lazy_import(
        globals(),
        aliases={
            "<name>": "<source module>",
            ...
        },
        deprecated_aliases={
            ...,
        }
    )

This function defines ``__getattr__`` and ``__dir__`` per :pep:`562`.

---
## __getattr__
```python
from imports import __getattr__
```



---
## __dir__
```python
from imports import __dir__
```



---
## __name__
```python
from http11 import __name__
```



---
## d
```python
from http11 import d
```

Decode a bytestring for interpolating into an error message.

---
## Request
```python
from http11 import Request
```

WebSocket handshake request.

Attributes:
    path: Request path, including optional query.
    headers: Request headers.

---
## Response
```python
from http11 import Response
```

WebSocket handshake response.

Attributes:
    status_code: Response code.
    reason_phrase: Response reason.
    headers: Response headers.
    body: Response body, if any.

---
## parse_headers
```python
from http11 import parse_headers
```

Parse HTTP headers.

Non-ASCII characters are represented with surrogate escapes.

Args:
    read_line: generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

Raises:
    EOFError: if the connection is closed without complete headers.
    SecurityError: if the request exceeds a security limit.
    ValueError: if the request isn't well formatted.

---
## parse_line
```python
from http11 import parse_line
```

Parse a single line.

CRLF is stripped from the return value.

Args:
    read_line: generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

Raises:
    EOFError: if the connection is closed without a CRLF.
    SecurityError: if the response exceeds a security limit.

---
## exception
```python
from http11 import exception
```



---
## parse
```python
from http11 import parse
```

Parse a WebSocket handshake response.

This is a generator-based coroutine.

The reason phrase and headers are expected to contain only ASCII
characters. Other characters are represented with surrogate escapes.

Args:
    read_line: generator-based coroutine that reads a LF-terminated
        line or raises an exception if there isn't enough data.
    read_exact: generator-based coroutine that reads the requested
        bytes or raises an exception if there isn't enough data.
    read_to_eof: generator-based coroutine that reads until the end
        of the stream.

Raises:
    EOFError: if the connection is closed without a full HTTP response.
    SecurityError: if the response exceeds a security limit.
    LookupError: if the response isn't well formatted.
    ValueError: if the response isn't well formatted.

---
## serialize
```python
from http11 import serialize
```

Serialize a WebSocket handshake response.

---
## __name__
```python
from frames import __name__
```



---
## Opcode
```python
from frames import Opcode
```

Opcode values for WebSocket frames.

---
## Frame
```python
from frames import Frame
```

WebSocket frame.

Attributes:
    opcode: Opcode.
    data: Payload data.
    fin: FIN bit.
    rsv1: RSV1 bit.
    rsv2: RSV2 bit.
    rsv3: RSV3 bit.

Only these fields are needed. The MASK bit, payload length and masking-key
are handled on the fly when parsing and serializing frames.

---
## prepare_data
```python
from frames import prepare_data
```

Convert a string or byte-like object to an opcode and a bytes-like object.

This function is designed for data frames.

If ``data`` is a :class:`str`, return ``OP_TEXT`` and a :class:`bytes`
object encoding ``data`` in UTF-8.

If ``data`` is a bytes-like object, return ``OP_BINARY`` and a bytes-like
object.

Raises:
    TypeError: if ``data`` doesn't have a supported type.

---
## prepare_ctrl
```python
from frames import prepare_ctrl
```

Convert a string or byte-like object to bytes.

This function is designed for ping and pong frames.

If ``data`` is a :class:`str`, return a :class:`bytes` object encoding
``data`` in UTF-8.

If ``data`` is a bytes-like object, return a :class:`bytes` object.

Raises:
    TypeError: if ``data`` doesn't have a supported type.

---
## Close
```python
from frames import Close
```

Code and reason for WebSocket close frames.

Attributes:
    code: Close code.
    reason: Close reason.

---
## __str__
```python
from frames import __str__
```

Return a human-readable representation of a close code and reason.

---
## parse
```python
from frames import parse
```

Parse the payload of a close frame.

Args:
    data: payload of the close frame.

Raises:
    ProtocolError: if data is ill-formed.
    UnicodeDecodeError: if the reason isn't valid UTF-8.

---
## serialize
```python
from frames import serialize
```

Serialize the payload of a close frame.

---
## check
```python
from frames import check
```

Check that the close code has a valid value for a close frame.

Raises:
    ProtocolError: if the close code is invalid.

---
## generate_key
```python
from utils import generate_key
```

Generate a random key for the Sec-WebSocket-Key header.

---
## accept_key
```python
from utils import accept_key
```

Compute the value of the Sec-WebSocket-Accept header.

Args:
    key: value of the Sec-WebSocket-Key header.

---
## apply_mask
```python
from utils import apply_mask
```

Apply masking to the data of a WebSocket message.

Args:
    data: data to mask.
    mask: 4-bytes mask.

---
## __name__
```python
from uri import __name__
```

Module containing the implementation of the URIReference class.

---
## WebSocketURI
```python
from uri import WebSocketURI
```

WebSocket URI.

Attributes:
    secure: :obj:`True` for a ``wss`` URI, :obj:`False` for a ``ws`` URI.
    host: Normalized to lower case.
    port: Always set even if it's the default.
    path: May be empty.
    query: May be empty if the URI doesn't include a query component.
    username: Available when the URI contains `User Information`_.
    password: Available when the URI contains `User Information`_.

.. _User Information: https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.1

---
## parse_uri
```python
from uri import parse_uri
```

Parse and validate a WebSocket URI.

Args:
    uri: WebSocket URI.

Returns:
    WebSocketURI: Parsed WebSocket URI.

Raises:
    InvalidURI: if ``uri`` isn't a valid WebSocket URI.

---
## resource_name
```python
from uri import resource_name
```



---
## user_info
```python
from uri import user_info
```



---
## ConnectionClosed
```python
from exceptions import ConnectionClosed
```

Raised when trying to interact with a closed connection.

Attributes:
    rcvd (Optional[Close]): if a close frame was received, its code and
        reason are available in ``rcvd.code`` and ``rcvd.reason``.
    sent (Optional[Close]): if a close frame was sent, its code and reason
        are available in ``sent.code`` and ``sent.reason``.
    rcvd_then_sent (Optional[bool]): if close frames were received and
        sent, this attribute tells in which order this happened, from the
        perspective of this side of the connection.

---
## ConnectionClosedError
```python
from exceptions import ConnectionClosedError
```

Like :exc:`ConnectionClosed`, when the connection terminated with an error.

A close frame with a code other than 1000 (OK) or 1001 (going away) was
received or sent, or the closing handshake didn't complete properly.

---
## ConnectionClosedOK
```python
from exceptions import ConnectionClosedOK
```

Like :exc:`ConnectionClosed`, when the connection terminated properly.

A close code with code 1000 (OK) or 1001 (going away) or without a code was
received and sent.

---
## InvalidHandshake
```python
from exceptions import InvalidHandshake
```

Raised during the handshake when the WebSocket connection fails.

---
## InvalidMessage
```python
from exceptions import InvalidMessage
```

Raised when a handshake request or response is malformed.

---
## InvalidHeader
```python
from exceptions import InvalidHeader
```

The header provided was somehow invalid.

---
## InvalidHeaderFormat
```python
from exceptions import InvalidHeaderFormat
```

Raised when an HTTP header cannot be parsed.

The format of the header doesn't match the grammar for that header.

---
## InvalidHeaderValue
```python
from exceptions import InvalidHeaderValue
```

Raised when an HTTP header has a wrong value.

The format of the header is correct but a value isn't acceptable.

---
## InvalidOrigin
```python
from exceptions import InvalidOrigin
```

Raised when the Origin header in a request isn't allowed.

---
## InvalidUpgrade
```python
from exceptions import InvalidUpgrade
```

Raised when the Upgrade or Connection header isn't correct.

---
## InvalidStatus
```python
from exceptions import InvalidStatus
```

Raised when a handshake response rejects the WebSocket upgrade.

---
## InvalidStatusCode
```python
from exceptions import InvalidStatusCode
```

Raised when a handshake response status code is invalid.

---
## NegotiationError
```python
from exceptions import NegotiationError
```

Raised when negotiating an extension fails.

---
## DuplicateParameter
```python
from exceptions import DuplicateParameter
```

Raised when a parameter name is repeated in an extension header.

---
## InvalidParameterName
```python
from exceptions import InvalidParameterName
```

Raised when a parameter name in an extension header is invalid.

---
## InvalidParameterValue
```python
from exceptions import InvalidParameterValue
```

Raised when a parameter value in an extension header is invalid.

---
## AbortHandshake
```python
from exceptions import AbortHandshake
```

Raised to abort the handshake on purpose and return an HTTP response.

This exception is an implementation detail.

The public API
is :meth:`~websockets.server.WebSocketServerProtocol.process_request`.

Attributes:
    status (~http.HTTPStatus): HTTP status code.
    headers (Headers): HTTP response headers.
    body (bytes): HTTP response body.

---
## RedirectHandshake
```python
from exceptions import RedirectHandshake
```

Raised when a handshake gets redirected.

This exception is an implementation detail.

---
## InvalidState
```python
from exceptions import InvalidState
```

Raised when an operation is forbidden in the current state.

This exception is an implementation detail.

It should never be raised in normal circumstances.

---
## InvalidURI
```python
from exceptions import InvalidURI
```

Raised when connecting to a URI that isn't a valid WebSocket URI.

---
## PayloadTooBig
```python
from exceptions import PayloadTooBig
```

Raised when receiving a frame with a payload exceeding the maximum size.

---
## ProtocolError
```python
from exceptions import ProtocolError
```

Raised when something unexpected happens mid-request/response.

---
## code
```python
from exceptions import code
```



---
## reason
```python
from exceptions import reason
```



---
## __name__
```python
from headers import __name__
```



---
## build_host
```python
from headers import build_host
```

Build a ``Host`` header.

---
## peek_ahead
```python
from headers import peek_ahead
```

Return the next character from ``header`` at the given position.

Return :obj:`None` at the end of ``header``.

We never need to peek more than one character ahead.

---
## parse_OWS
```python
from headers import parse_OWS
```

Parse optional whitespace from ``header`` at the given position.

Return the new position.

The whitespace itself isn't returned because it isn't significant.

---
## parse_token
```python
from headers import parse_token
```

Parse a token from ``header`` at the given position.

Return the token value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_quoted_string
```python
from headers import parse_quoted_string
```

Parse a quoted string from ``header`` at the given position.

Return the unquoted value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## build_quoted_string
```python
from headers import build_quoted_string
```

Format ``value`` as a quoted string.

This is the reverse of :func:`parse_quoted_string`.

---
## parse_list
```python
from headers import parse_list
```

Parse a comma-separated list from ``header`` at the given position.

This is appropriate for parsing values with the following grammar:

    1#item

``parse_item`` parses one item.

``header`` is assumed not to start or end with whitespace.

(This function is designed for parsing an entire header value and
:func:`~websockets.http.read_headers` strips whitespace from values.)

Return a list of items.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_connection_option
```python
from headers import parse_connection_option
```

Parse a Connection option from ``header`` at the given position.

Return the protocol value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_connection
```python
from headers import parse_connection
```

Parse a ``Connection`` header.

Return a list of HTTP connection options.

Args
    header: value of the ``Connection`` header.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_upgrade_protocol
```python
from headers import parse_upgrade_protocol
```

Parse an Upgrade protocol from ``header`` at the given position.

Return the protocol value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_upgrade
```python
from headers import parse_upgrade
```

Parse an ``Upgrade`` header.

Return a list of HTTP protocols.

Args:
    header: value of the ``Upgrade`` header.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_extension_item_param
```python
from headers import parse_extension_item_param
```

Parse a single extension parameter from ``header`` at the given position.

Return a ``(name, value)`` pair and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_extension_item
```python
from headers import parse_extension_item
```

Parse an extension definition from ``header`` at the given position.

Return an ``(extension name, parameters)`` pair, where ``parameters`` is a
list of ``(name, value)`` pairs, and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_extension
```python
from headers import parse_extension
```

Parse a ``Sec-WebSocket-Extensions`` header.

Return a list of WebSocket extensions and their parameters in this format::

    [
        (
            'extension name',
            [
                ('parameter name', 'parameter value'),
                ....
            ]
        ),
        ...
    ]

Parameter values are :obj:`None` when no value is provided.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## build_extension_item
```python
from headers import build_extension_item
```

Build an extension definition.

This is the reverse of :func:`parse_extension_item`.

---
## build_extension
```python
from headers import build_extension
```

Build a ``Sec-WebSocket-Extensions`` header.

This is the reverse of :func:`parse_extension`.

---
## parse_subprotocol_item
```python
from headers import parse_subprotocol_item
```

Parse a subprotocol from ``header`` at the given position.

Return the subprotocol value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_subprotocol
```python
from headers import parse_subprotocol
```

Parse a ``Sec-WebSocket-Protocol`` header.

Return a list of WebSocket subprotocols.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## build_subprotocol
```python
from headers import build_subprotocol
```

Build a ``Sec-WebSocket-Protocol`` header.

This is the reverse of :func:`parse_subprotocol`.

---
## validate_subprotocols
```python
from headers import validate_subprotocols
```

Validate that ``subprotocols`` is suitable for :func:`build_subprotocol`.

---
## build_www_authenticate_basic
```python
from headers import build_www_authenticate_basic
```

Build a ``WWW-Authenticate`` header for HTTP Basic Auth.

Args:
    realm: identifier of the protection space.

---
## parse_token68
```python
from headers import parse_token68
```

Parse a token68 from ``header`` at the given position.

Return the token value and the new position.

Raises:
    InvalidHeaderFormat: on invalid inputs.

---
## parse_end
```python
from headers import parse_end
```

Check that parsing reached the end of header.

---
## parse_authorization_basic
```python
from headers import parse_authorization_basic
```

Parse an ``Authorization`` header for HTTP Basic Auth.

Return a ``(username, password)`` tuple.

Args:
    header: value of the ``Authorization`` header.

Raises:
    InvalidHeaderFormat: on invalid inputs.
    InvalidHeaderValue: on unsupported inputs.

---
## build_authorization_basic
```python
from headers import build_authorization_basic
```

Build an ``Authorization`` header for HTTP Basic Auth.

This is the reverse of :func:`parse_authorization_basic`.

---
## MultipleValuesError
```python
from datastructures import MultipleValuesError
```

Exception raised when :class:`Headers` has more than one value for a key.

---
## SupportsKeysAndGetItem
```python
from datastructures import SupportsKeysAndGetItem
```

Dict-like types with ``keys() -> str`` and ``__getitem__(key: str) -> str`` methods.

---
## copy
```python
from datastructures import copy
```



---
## serialize
```python
from datastructures import serialize
```



---
## get_all
```python
from datastructures import get_all
```

Return the (possibly empty) list of all values for a header.

Args:
    key: header name.

---
## raw_items
```python
from datastructures import raw_items
```

Return an iterator of all values as ``(name, value)`` pairs.

---
## print_during_input
```python
from __main__ import print_during_input
```



---
## print_over_input
```python
from __main__ import print_over_input
```



---
## print_incoming_messages
```python
from __main__ import print_incoming_messages
```



---
## win_enable_vt100
```python
from __main__ import win_enable_vt100
```

Enable VT-100 for console output on Windows.

See also https://bugs.python.org/issue29059.

---
## __name__
```python
from tzfile import __name__
```

$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $

---
## _byte_string
```python
from tzfile import _byte_string
```

Cast a string or byte string to an ASCII byte string.

---
## _std_string
```python
from tzfile import _std_string
```

Cast a string or byte string to an ASCII string.

---
## build_tzinfo
```python
from tzfile import build_tzinfo
```



---
## __name__
```python
from tzinfo import __name__
```

Base classes and helpers for building zone specific tzinfo classes

---
## memorized_timedelta
```python
from tzinfo import memorized_timedelta
```

Create only one instance of each distinct timedelta

---
## memorized_datetime
```python
from tzinfo import memorized_datetime
```

Create only one instance of each distinct datetime

---
## memorized_ttinfo
```python
from tzinfo import memorized_ttinfo
```

Create only one instance of each distinct tuple

---
## _to_seconds
```python
from tzinfo import _to_seconds
```

Convert a timedelta to seconds

---
## BaseTzInfo
```python
from tzinfo import BaseTzInfo
```



---
## StaticTzInfo
```python
from tzinfo import StaticTzInfo
```

A timezone that has a constant offset from UTC

These timezones are rare, as most locations have changed their
offset at some point in their history

---
## DstTzInfo
```python
from tzinfo import DstTzInfo
```

A timezone that has a variable offset from UTC

The offset might change if daylight saving time comes into effect,
or at a point in history when the region decides to change their
timezone definition.

---
## unpickler
```python
from tzinfo import unpickler
```

Factory function for unpickling pytz tzinfo instances.

This is shared for both StaticTzInfo and DstTzInfo instances, because
database changes could cause a zones implementation to switch between
these two base classes and we can't break pickles on a pytz version
upgrade.

---
## __str__
```python
from tzinfo import __str__
```



---
## fromutc
```python
from tzinfo import fromutc
```

See datetime.tzinfo.fromutc

---
## utcoffset
```python
from tzinfo import utcoffset
```

See datetime.tzinfo.utcoffset

The is_dst parameter may be used to remove ambiguity during DST
transitions.

>>> from pytz import timezone
>>> tz = timezone('America/St_Johns')
>>> ambiguous = datetime(2009, 10, 31, 23, 30)

>>> str(tz.utcoffset(ambiguous, is_dst=False))
'-1 day, 20:30:00'

>>> str(tz.utcoffset(ambiguous, is_dst=True))
'-1 day, 21:30:00'

>>> try:
...     tz.utcoffset(ambiguous)
... except AmbiguousTimeError:
...     print('Ambiguous')
Ambiguous

---
## dst
```python
from tzinfo import dst
```

See datetime.tzinfo.dst

The is_dst parameter may be used to remove ambiguity during DST
transitions.

>>> from pytz import timezone
>>> tz = timezone('America/St_Johns')

>>> normal = datetime(2009, 9, 1)

>>> str(tz.dst(normal))
'1:00:00'
>>> str(tz.dst(normal, is_dst=False))
'1:00:00'
>>> str(tz.dst(normal, is_dst=True))
'1:00:00'

>>> ambiguous = datetime(2009, 10, 31, 23, 30)

>>> str(tz.dst(ambiguous, is_dst=False))
'0:00:00'
>>> str(tz.dst(ambiguous, is_dst=True))
'1:00:00'
>>> try:
...     tz.dst(ambiguous)
... except AmbiguousTimeError:
...     print('Ambiguous')
Ambiguous

---
## tzname
```python
from tzinfo import tzname
```

See datetime.tzinfo.tzname

The is_dst parameter may be used to remove ambiguity during DST
transitions.

>>> from pytz import timezone
>>> tz = timezone('America/St_Johns')

>>> normal = datetime(2009, 9, 1)

>>> tz.tzname(normal)
'NDT'
>>> tz.tzname(normal, is_dst=False)
'NDT'
>>> tz.tzname(normal, is_dst=True)
'NDT'

>>> ambiguous = datetime(2009, 10, 31, 23, 30)

>>> tz.tzname(ambiguous, is_dst=False)
'NST'
>>> tz.tzname(ambiguous, is_dst=True)
'NDT'
>>> try:
...     tz.tzname(ambiguous)
... except AmbiguousTimeError:
...     print('Ambiguous')
Ambiguous

---
## localize
```python
from tzinfo import localize
```

Convert naive time to local time.

This method should be used to construct localtimes, rather
than passing a tzinfo argument to a datetime constructor.

is_dst is used to determine the correct timezone in the ambigous
period at the end of daylight saving time.

>>> from pytz import timezone
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> amdam = timezone('Europe/Amsterdam')
>>> dt  = datetime(2004, 10, 31, 2, 0, 0)
>>> loc_dt1 = amdam.localize(dt, is_dst=True)
>>> loc_dt2 = amdam.localize(dt, is_dst=False)
>>> loc_dt1.strftime(fmt)
'2004-10-31 02:00:00 CEST (+0200)'
>>> loc_dt2.strftime(fmt)
'2004-10-31 02:00:00 CET (+0100)'
>>> str(loc_dt2 - loc_dt1)
'1:00:00'

Use is_dst=None to raise an AmbiguousTimeError for ambiguous
times at the end of daylight saving time

>>> try:
...     loc_dt1 = amdam.localize(dt, is_dst=None)
... except AmbiguousTimeError:
...     print('Ambiguous')
Ambiguous

is_dst defaults to False

>>> amdam.localize(dt) == amdam.localize(dt, False)
True

is_dst is also used to determine the correct timezone in the
wallclock times jumped over at the start of daylight saving time.

>>> pacific = timezone('US/Pacific')
>>> dt = datetime(2008, 3, 9, 2, 0, 0)
>>> ploc_dt1 = pacific.localize(dt, is_dst=True)
>>> ploc_dt2 = pacific.localize(dt, is_dst=False)
>>> ploc_dt1.strftime(fmt)
'2008-03-09 02:00:00 PDT (-0700)'
>>> ploc_dt2.strftime(fmt)
'2008-03-09 02:00:00 PST (-0800)'
>>> str(ploc_dt2 - ploc_dt1)
'1:00:00'

Use is_dst=None to raise a NonExistentTimeError for these skipped
times.

>>> try:
...     loc_dt1 = pacific.localize(dt, is_dst=None)
... except NonExistentTimeError:
...     print('Non-existent')
Non-existent

---
## normalize
```python
from tzinfo import normalize
```

Correct the timezone information on the given datetime

If date arithmetic crosses DST boundaries, the tzinfo
is not magically adjusted. This method normalizes the
tzinfo to the correct one.

To test, first we need to do some setup

>>> from pytz import timezone
>>> utc = timezone('UTC')
>>> eastern = timezone('US/Eastern')
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'

We next create a datetime right on an end-of-DST transition point,
the instant when the wallclocks are wound back one hour.

>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
>>> loc_dt = utc_dt.astimezone(eastern)
>>> loc_dt.strftime(fmt)
'2002-10-27 01:00:00 EST (-0500)'

Now, if we subtract a few minutes from it, note that the timezone
information has not changed.

>>> before = loc_dt - timedelta(minutes=10)
>>> before.strftime(fmt)
'2002-10-27 00:50:00 EST (-0500)'

But we can fix that by calling the normalize method

>>> before = eastern.normalize(before)
>>> before.strftime(fmt)
'2002-10-27 01:50:00 EDT (-0400)'

The supported method of converting between timezones is to use
datetime.astimezone(). Currently, normalize() also works:

>>> th = timezone('Asia/Bangkok')
>>> am = timezone('Europe/Amsterdam')
>>> dt = th.localize(datetime(2011, 5, 7, 1, 2, 3))
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> am.normalize(dt).strftime(fmt)
'2011-05-06 20:02:03 CEST (+0200)'

---
## __repr__
```python
from tzinfo import __repr__
```



---
## __reduce__
```python
from tzinfo import __reduce__
```



---
## __init__
```python
from tzinfo import __init__
```



---
## open_resource
```python
from __init__ import open_resource
```

Open a resource from the zoneinfo subdir for reading.

Uses the pkg_resources module if available and no standard file
found at the calculated location.

It is possible to specify different location for zoneinfo
subdir by using the PYTZ_TZDATADIR environment variable.

---
## resource_exists
```python
from __init__ import resource_exists
```

Does the named resource exist?

---
## timezone
```python
from __init__ import timezone
```

Return a datetime.tzinfo implementation for the given timezone

>>> from datetime import datetime, timedelta
>>> utc = timezone('UTC')
>>> eastern = timezone('US/Eastern')
>>> eastern.zone
'US/Eastern'
>>> timezone(unicode('US/Eastern')) is eastern
True
>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
>>> loc_dt = utc_dt.astimezone(eastern)
>>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
>>> loc_dt.strftime(fmt)
'2002-10-27 01:00:00 EST (-0500)'
>>> (loc_dt - timedelta(minutes=10)).strftime(fmt)
'2002-10-27 00:50:00 EST (-0500)'
>>> eastern.normalize(loc_dt - timedelta(minutes=10)).strftime(fmt)
'2002-10-27 01:50:00 EDT (-0400)'
>>> (loc_dt + timedelta(minutes=10)).strftime(fmt)
'2002-10-27 01:10:00 EST (-0500)'

Raises UnknownTimeZoneError if passed an unknown zone.

>>> try:
...     timezone('Asia/Shangri-La')
... except UnknownTimeZoneError:
...     print('Unknown')
Unknown

>>> try:
...     timezone(unicode('\N{TRADE MARK SIGN}'))
... except UnknownTimeZoneError:
...     print('Unknown')
Unknown

---
## _unmunge_zone
```python
from __init__ import _unmunge_zone
```

Undo the time zone name munging done by older versions of pytz.

---
## _case_insensitive_zone_lookup
```python
from __init__ import _case_insensitive_zone_lookup
```

case-insensitively matching timezone, else return zone unchanged

---
## UTC
```python
from __init__ import UTC
```

UTC

Optimized UTC implementation. It unpickles using the single module global
instance defined beneath this class declaration.

---
## _UTC
```python
from __init__ import _UTC
```

Factory function for utc unpickling.

Makes sure that unpickling a utc instance always returns the same
module global.

These examples belong in the UTC class above, but it is obscured; or in
the README.rst, but we are not depending on Python 2.4 so integrating
the README.rst examples with the unit tests is not trivial.

>>> import datetime, pickle
>>> dt = datetime.datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)
>>> naive = dt.replace(tzinfo=None)
>>> p = pickle.dumps(dt, 1)
>>> naive_p = pickle.dumps(naive, 1)
>>> len(p) - len(naive_p)
17
>>> new = pickle.loads(p)
>>> new == dt
True
>>> new is dt
False
>>> new.tzinfo is dt.tzinfo
True
>>> utc is UTC is timezone('UTC')
True
>>> utc is timezone('GMT')
False

---
## _p
```python
from __init__ import _p
```

Factory function for unpickling pytz tzinfo instances.

Just a wrapper around tzinfo.unpickler to save a few bytes in each pickle
by shortening the path.

---
## _CountryTimezoneDict
```python
from __init__ import _CountryTimezoneDict
```

Map ISO 3166 country code to a list of timezone names commonly used
in that country.

iso3166_code is the two letter code used to identify the country.

>>> def print_list(list_of_strings):
...     'We use a helper so doctests work under Python 2.3 -> 3.x'
...     for s in list_of_strings:
...         print(s)

>>> print_list(country_timezones['nz'])
Pacific/Auckland
Pacific/Chatham
>>> print_list(country_timezones['ch'])
Europe/Zurich
>>> print_list(country_timezones['CH'])
Europe/Zurich
>>> print_list(country_timezones[unicode('ch')])
Europe/Zurich
>>> print_list(country_timezones['XXX'])
Traceback (most recent call last):
...
KeyError: 'XXX'

Previously, this information was exposed as a function rather than a
dictionary. This is still supported::

>>> print_list(country_timezones('nz'))
Pacific/Auckland
Pacific/Chatham

---
## _CountryNameDict
```python
from __init__ import _CountryNameDict
```

Dictionary proving ISO3166 code -> English name.

>>> print(country_names['au'])
Australia

---
## _FixedOffset
```python
from __init__ import _FixedOffset
```



---
## FixedOffset
```python
from __init__ import FixedOffset
```

return a fixed-offset timezone based off a number of minutes.

    >>> one = FixedOffset(-330)
    >>> one
    pytz.FixedOffset(-330)
    >>> str(one.utcoffset(datetime.datetime.now()))
    '-1 day, 18:30:00'
    >>> str(one.dst(datetime.datetime.now()))
    '0:00:00'

    >>> two = FixedOffset(1380)
    >>> two
    pytz.FixedOffset(1380)
    >>> str(two.utcoffset(datetime.datetime.now()))
    '23:00:00'
    >>> str(two.dst(datetime.datetime.now()))
    '0:00:00'

The datetime.timedelta must be between the range of -1 and 1 day,
non-inclusive.

    >>> FixedOffset(1440)
    Traceback (most recent call last):
    ...
    ValueError: ('absolute offset is too large', 1440)

    >>> FixedOffset(-1440)
    Traceback (most recent call last):
    ...
    ValueError: ('absolute offset is too large', -1440)

An offset of 0 is special-cased to return UTC.

    >>> FixedOffset(0) is UTC
    True

There should always be only one instance of a FixedOffset per timedelta.
This should be true for multiple creation calls.

    >>> FixedOffset(-330) is one
    True
    >>> FixedOffset(1380) is two
    True

It should also be true for pickling.

    >>> import pickle
    >>> pickle.loads(pickle.dumps(one)) is one
    True
    >>> pickle.loads(pickle.dumps(two)) is two
    True

---
## _test
```python
from __init__ import _test
```



---
## ascii
```python
from __init__ import ascii
```

>>> ascii('Hello')
'Hello'
>>> ascii(u'Hello')
'Hello'
>>> ascii(u'\N{TRADE MARK SIGN}') #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
    ...
UnicodeEncodeError: ...

---
## fromutc
```python
from __init__ import fromutc
```



---
## utcoffset
```python
from __init__ import utcoffset
```



---
## tzname
```python
from __init__ import tzname
```



---
## dst
```python
from __init__ import dst
```



---
## __reduce__
```python
from __init__ import __reduce__
```



---
## localize
```python
from __init__ import localize
```

Convert naive time to local time

---
## _fill
```python
from __init__ import _fill
```



---
## __name__
```python
from reference import __name__
```



---
## FixedOffset
```python
from reference import FixedOffset
```

Fixed offset in minutes east from UTC.

---
## LocalTimezone
```python
from reference import LocalTimezone
```



---
## first_sunday_on_or_after
```python
from reference import first_sunday_on_or_after
```



---
## USTimeZone
```python
from reference import USTimeZone
```



---
## __init__
```python
from reference import __init__
```

Parameters
----------
fo : dict or str
    The set of references to use for this instance, with a structure as above.
    If str referencing a JSON file, will use fsspec.open, in conjunction
    with target_options and target_protocol to open and parse JSON at this
    location. If a directory, then assume references are a set of parquet
    files to be loaded lazily.
target : str
    For any references having target_url as None, this is the default file
    target to use
ref_storage_args : dict
    If references is a str, use these kwargs for loading the JSON file.
    Deprecated: use target_options instead.
target_protocol : str
    Used for loading the reference file, if it is a path. If None, protocol
    will be derived from the given path
target_options : dict
    Extra FS options for loading the reference file ``fo``, if given as a path
remote_protocol : str
    The protocol of the filesystem on which the references will be evaluated
    (unless fs is provided). If not given, will be derived from the first
    URL that has a protocol in the templates or in the references, in that
    order.
remote_options : dict
    kwargs to go with remote_protocol
fs : AbstractFileSystem | dict(str, (AbstractFileSystem | dict))
    Directly provide a file system(s):
        - a single filesystem instance
        - a dict of protocol:filesystem, where each value is either a filesystem
          instance, or a dict of kwargs that can be used to create in
          instance for the given protocol

    If this is given, remote_options and remote_protocol are ignored.
template_overrides : dict
    Swap out any templates in the references file with these - useful for
    testing.
simple_templates: bool
    Whether templates can be processed with simple replace (True) or if
    jinja  is needed (False, much slower). All reference sets produced by
    ``kerchunk`` are simple in this sense, but the spec allows for complex.
max_gap, max_block: int
    For merging multiple concurrent requests to the same remote file.
    Neighboring byte ranges will only be merged when their
    inter-range gap is <= ``max_gap``. Default is 64KB. Set to 0
    to only merge when it requires no extra bytes. Pass a negative
    number to disable merging, appropriate for local target files.
    Neighboring byte ranges will only be merged when the size of
    the aggregated range is <= ``max_block``. Default is 256MB.
cache_size : int
    Maximum size of LRU cache, where cache_size*record_size denotes
    the total number of references that can be loaded in memory at once.
    Only used for lazily loaded references.
kwargs : passed to parent class

---
## utcoffset
```python
from reference import utcoffset
```



---
## tzname
```python
from reference import tzname
```



---
## dst
```python
from reference import dst
```



---
## _isdst
```python
from reference import _isdst
```



---
## __repr__
```python
from reference import __repr__
```



---
## Error
```python
from exceptions import Error
```

This class allows you to pass custom error messages to the user. You can do so by raising a gr.Error("custom message") anywhere in the code, and when that line is executed the custom message will appear in a modal on the demo.
Example:
    import gradio as gr
    def divide(numerator, denominator):
        if denominator == 0:
            raise gr.Error("Cannot divide by zero!")
    gr.Interface(divide, ["number", "number"], "number").launch()
Demos: calculator, blocks_chained_events

---
## UnknownTimeZoneError
```python
from exceptions import UnknownTimeZoneError
```

Exception raised when pytz is passed an unknown timezone.

>>> isinstance(UnknownTimeZoneError(), LookupError)
True

This class is actually a subclass of KeyError to provide backwards
compatibility with code relying on the undocumented behavior of earlier
pytz releases.

>>> isinstance(UnknownTimeZoneError(), KeyError)
True

And also a subclass of pytz.exceptions.Error, as are other pytz
exceptions.

>>> isinstance(UnknownTimeZoneError(), Error)
True

---
## InvalidTimeError
```python
from exceptions import InvalidTimeError
```

A date field was improperly specified.

---
## AmbiguousTimeError
```python
from exceptions import AmbiguousTimeError
```

Exception raised when attempting to create an ambiguous wallclock time.

At the end of a DST transition period, a particular wallclock time will
occur twice (once before the clocks are set back, once after). Both
possibilities may be correct, unless further information is supplied.

See DstTzInfo.normalize() for more info

---
## NonExistentTimeError
```python
from exceptions import NonExistentTimeError
```

Exception raised when attempting to create a wallclock time that
cannot exist.

At the start of a DST transition period, the wallclock time jumps forward.
The instants jumped over never occur.

---
## __name__
```python
from lazy import __name__
```



---
## LazyDict
```python
from lazy import LazyDict
```

Dictionary populated on first use.

---
## LazyList
```python
from lazy import LazyList
```



---
## LazySet
```python
from lazy import LazySet
```



---
## __getitem__
```python
from lazy import __getitem__
```



---
## __contains__
```python
from lazy import __contains__
```



---
## __iter__
```python
from lazy import __iter__
```



---
## __len__
```python
from lazy import __len__
```



---
## keys
```python
from lazy import keys
```



---
## __new__
```python
from lazy import __new__
```



---
## lazy
```python
from lazy import lazy
```



---
## _lazy
```python
from lazy import _lazy
```



---
## AcquireReturnProxy
```python
from _api import AcquireReturnProxy
```

A context-aware object that will release the lock file when exiting.

---
## FileLockContext
```python
from _api import FileLockContext
```

A dataclass which holds the context for a ``BaseFileLock`` object.

---
## ThreadLocalFileContext
```python
from _api import ThreadLocalFileContext
```

A thread local version of the ``FileLockContext`` class.

---
## FileLockMeta
```python
from _api import FileLockMeta
```



---
## BaseFileLock
```python
from _api import BaseFileLock
```

Abstract base class for a file lock object.

---
## __init__
```python
from _api import __init__
```



---
## __enter__
```python
from _api import __enter__
```

Acquire the lock.

:return: the lock object

---
## __exit__
```python
from _api import __exit__
```

Release the lock.

:param exc_type: the exception type if raised
:param exc_value: the exception value if raised
:param traceback: the exception traceback if raised

---
## __call__
```python
from _api import __call__
```



---
## __init_subclass__
```python
from _api import __init_subclass__
```

Setup unique state for lock subclasses.

---
## is_thread_local
```python
from _api import is_thread_local
```

:return: a flag indicating if this lock is thread local or not

---
## is_singleton
```python
from _api import is_singleton
```

:return: a flag indicating if this lock is singleton or not

---
## lock_file
```python
from _api import lock_file
```

:return: path to the lock file

---
## timeout
```python
from _api import timeout
```

Change the default timeout value.

:param value: the new value, in seconds

---
## blocking
```python
from _api import blocking
```

Change the default blocking value.

:param value: the new value as bool

---
## mode
```python
from _api import mode
```

:return: the file permissions for the lockfile

---
## _acquire
```python
from _api import _acquire
```

If the file lock could be acquired, self._context.lock_file_fd holds the file descriptor of the lock file.

---
## _release
```python
from _api import _release
```

Releases the lock and sets self._context.lock_file_fd to None.

---
## is_locked
```python
from _api import is_locked
```

:return: A boolean indicating if the lock file is holding the lock currently.

.. versionchanged:: 2.0.0

    This was previously a method and is now a property.

---
## lock_counter
```python
from _api import lock_counter
```

:return: The number of times this lock has been acquired (but not yet released).

---
## acquire
```python
from _api import acquire
```

Try to acquire the file lock.

:param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :attr:`~timeout` is and
 if ``timeout < 0``, there is no timeout and this method will block until the lock could be acquired
:param poll_interval: interval of trying to acquire the lock file
:param poll_intervall: deprecated, kept for backwards compatibility, use ``poll_interval`` instead
:param blocking: defaults to True. If False, function will return immediately if it cannot obtain a lock on the
 first attempt. Otherwise, this method will block until the timeout expires or the lock is acquired.
:raises Timeout: if fails to acquire lock within the timeout period
:return: a context object that will unlock the file when the context is exited

.. code-block:: python

    # You can use this method in the context manager (recommended)
    with lock.acquire():
        pass

    # Or use an equivalent try-finally construct:
    lock.acquire()
    try:
        pass
    finally:
        lock.release()

.. versionchanged:: 2.0.0

    This method returns now a *proxy* object instead of *self*,
    so that it can be used in a with statement without side effects.

---
## release
```python
from _api import release
```

Releases the file lock. Please note, that the lock is only completely released, if the lock counter is 0.
Also note, that the lock file itself is not automatically deleted.

:param force: If true, the lock counter is ignored and the lock is released in every case/

---
## __del__
```python
from _api import __del__
```

Called when the lock object is deleted.

---
## __name__
```python
from _error import __name__
```



---
## Timeout
```python
from _error import Timeout
```

Raised when the lock could not be acquired in *timeout* seconds.

---
## __init__
```python
from _error import __init__
```



---
## __reduce__
```python
from _error import __reduce__
```



---
## __str__
```python
from _error import __str__
```



---
## __repr__
```python
from _error import __repr__
```



---
## lock_file
```python
from _error import lock_file
```

:return: The path of the file lock.

---
## __name__
```python
from asyncio import __name__
```



---
## AsyncFileLockContext
```python
from asyncio import AsyncFileLockContext
```

A dataclass which holds the context for a ``BaseAsyncFileLock`` object.

---
## AsyncThreadLocalFileContext
```python
from asyncio import AsyncThreadLocalFileContext
```

A thread local version of the ``FileLockContext`` class.

---
## AsyncAcquireReturnProxy
```python
from asyncio import AsyncAcquireReturnProxy
```

A context-aware object that will release the lock file when exiting.

---
## AsyncFileLockMeta
```python
from asyncio import AsyncFileLockMeta
```



---
## BaseAsyncFileLock
```python
from asyncio import BaseAsyncFileLock
```

Base class for asynchronous file locks.

---
## AsyncSoftFileLock
```python
from asyncio import AsyncSoftFileLock
```

Simply watches the existence of the lock file.

---
## AsyncUnixFileLock
```python
from asyncio import AsyncUnixFileLock
```

Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems.

---
## AsyncWindowsFileLock
```python
from asyncio import AsyncWindowsFileLock
```

Uses the :func:`msvcrt.locking` to hard lock the lock file on windows systems.

---
## __init__
```python
from asyncio import __init__
```



---
## __call__
```python
from asyncio import __call__
```



---
## run_in_executor
```python
from asyncio import run_in_executor
```

::return: whether run in executor.

---
## executor
```python
from asyncio import executor
```

Change the executor.

:param value: the new executor or ``None``
:type value: futures.Executor | None

---
## loop
```python
from asyncio import loop
```

::return: the event loop.

---
## __enter__
```python
from asyncio import __enter__
```

Replace old __enter__ method to avoid using it.

NOTE: DO NOT USE `with` FOR ASYNCIO LOCKS, USE `async with` INSTEAD.

:return: none
:rtype: NoReturn

---
## __del__
```python
from asyncio import __del__
```

Called when the lock object is deleted.

---
## raise_on_not_writable_file
```python
from _util import raise_on_not_writable_file
```

Raise an exception if attempting to open the file for writing would fail.

This is done so files that will never be writable can be separated from files that are writable but currently
locked.

:param filename: file to check
:raises OSError: as if the file was opened for writing.

---
## ensure_directory_exists
```python
from _util import ensure_directory_exists
```

Ensure the directory containing the file exists (create it if necessary).

:param filename: file.

---
## __name__
```python
from _soft import __name__
```



---
## SoftFileLock
```python
from _soft import SoftFileLock
```

Simply watches the existence of the lock file.

---
## _acquire
```python
from _soft import _acquire
```



---
## _release
```python
from _soft import _release
```



---
## __name__
```python
from _unix import __name__
```



---
## UnixFileLock
```python
from _unix import UnixFileLock
```

Uses the :func:`fcntl.flock` to hard lock the lock file on unix systems.

---
## _acquire
```python
from _unix import _acquire
```



---
## _release
```python
from _unix import _release
```



---
## __name__
```python
from _windows import __name__
```



---
## WindowsFileLock
```python
from _windows import WindowsFileLock
```

Uses the :func:`msvcrt.locking` function to hard lock the lock file on Windows systems.

---
## _acquire
```python
from _windows import _acquire
```



---
## _release
```python
from _windows import _release
```



---
## __name__
```python
from support import __name__
```

babel.support
~~~~~~~~~~~~~

Several classes and functions that help with integrating and using Babel
in applications.

.. note: the code in this module is not used by Babel itself

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## Alabaster
```python
from support import Alabaster
```



---
## get_path
```python
from __init__ import get_path
```

Shortcut for users whose theme is next to their conf.py.

---
## update_context
```python
from __init__ import update_context
```

Update template variables for .tex file just before writing.

---
## setup
```python
from __init__ import setup
```



---
## pytest_configure
```python
from conftest import pytest_configure
```



---
## pytest_addoption
```python
from conftest import pytest_addoption
```



---
## pytest_sessionstart
```python
from conftest import pytest_sessionstart
```



---
## pytest_itemcollected
```python
from conftest import pytest_itemcollected
```

Check FPU precision mode was not changed during test collection.

The clumsy way we do it here is mainly necessary because numpy
still uses yield tests, which can execute code at test collection
time.

---
## check_fpu_mode
```python
from conftest import check_fpu_mode
```

Check FPU precision mode was not changed during the test.

---
## add_np
```python
from conftest import add_np
```



---
## env_setup
```python
from conftest import env_setup
```



---
## weak_promotion
```python
from conftest import weak_promotion
```

Fixture to ensure "legacy" promotion state or change it to use the new
weak promotion (plus warning).  `old_promotion` should be used as a
parameter in the function.

---
## __name__
```python
from _globals import __name__
```

Module defining global singleton classes.

This module raises a RuntimeError if an attempt to reload it is made. In that
way the identities of the classes defined here are fixed and will remain so
even if numpy itself is reloaded. In particular, a function like the following
will still work correctly after numpy is reloaded::

    def foo(arg=np._NoValue):
        if arg is np._NoValue:
            ...

That was not the case when the singleton classes were defined in the numpy
``__init__.py`` file. See gh-7844 for a discussion of the reload problem that
motivated this module.

---
## _NoValueType
```python
from _globals import _NoValueType
```

Special keyword value.

The instance of this class may be used as the default value assigned to a
keyword if no other obvious default (e.g., `None`) is suitable,

Common reasons for using this keyword are:

- A new keyword is added to a function, and that function forwards its
  inputs to another function or method which can be defined outside of
  NumPy. For example, ``np.std(x)`` calls ``x.std``, so when a ``keepdims``
  keyword was added that could only be forwarded if the user explicitly
  specified ``keepdims``; downstream array libraries may not have added
  the same keyword, so adding ``x.std(..., keepdims=keepdims)``
  unconditionally could have broken previously working code.
- A keyword is being deprecated, and a deprecation warning must only be
  emitted when the keyword is used.

---
## _CopyMode
```python
from _globals import _CopyMode
```

An enumeration for the copy modes supported
by numpy.copy() and numpy.array(). The following three modes are supported,

- ALWAYS: This means that a deep copy of the input
          array will always be taken.
- IF_NEEDED: This means that a deep copy of the input
             array will be taken only if necessary.
- NEVER: This means that the deep copy will never be taken.
         If a copy cannot be avoided then a `ValueError` will be
         raised.

Note that the buffer-protocol could in theory do copies.  NumPy currently
assumes an object exporting the buffer protocol will never do this.

---
## __new__
```python
from _globals import __new__
```



---
## __repr__
```python
from _globals import __repr__
```



---
## __bool__
```python
from _globals import __bool__
```



---
## _sanity_check
```python
from __init__ import _sanity_check
```

Quick sanity checks for common bugs caused by environment.
There are some cases e.g. with wrong BLAS ABI that cause wrong
results under specific runtime conditions that are not necessarily
achieved during test suite runs, and it is useful to catch those early.

See https://github.com/numpy/numpy/issues/8577 and other
similar bug reports.

---
## _mac_os_check
```python
from __init__ import _mac_os_check
```

Quick Sanity check for Mac OS look for accelerate build bugs.
Testing numpy polyfit calls init_dgelsd(LAPACK)

---
## _pyinstaller_hooks_dir
```python
from __init__ import _pyinstaller_hooks_dir
```



---
## _expired
```python
from __init__ import _expired
```



---
## __name__
```python
from dtypes import __name__
```

Define extension dtypes.

---
## _add_dtype_helper
```python
from dtypes import _add_dtype_helper
```



---
## __name__
```python
from _distributor_init import __name__
```

Distributor init file

Distributors: you can add custom code here to support particular distributions
of numpy.

For example, this is a good place to put any BLAS/LAPACK initialization code.

The numpy standard source distribution will not put code in this file, so you
can safely replace this file with your own version.

---
## __name__
```python
from __config__ import __name__
```



---
## DisplayModes
```python
from __config__ import DisplayModes
```



---
## _cleanup
```python
from __config__ import _cleanup
```

Removes empty values in a `dict` recursively
This ensures we remove values that Meson could not provide to CONFIG

---
## _check_pyyaml
```python
from __config__ import _check_pyyaml
```



---
## show
```python
from __config__ import show
```

Show libraries and system information on which NumPy was built
and is being used

Parameters
----------
mode : {`'stdout'`, `'dicts'`}, optional.
    Indicates how to display the config information.
    `'stdout'` prints to console, `'dicts'` returns a dictionary
    of the configuration.

Returns
-------
out : {`dict`, `None`}
    If mode is `'dicts'`, a dict is returned, else None

See Also
--------
get_include : Returns the directory containing NumPy C
              header files.

Notes
-----
1. The `'stdout'` mode will give more readable
   output if ``pyyaml`` is installed

---
## __name__
```python
from ctypeslib import __name__
```

============================
``ctypes`` Utility Functions
============================

See Also
--------
load_library : Load a C library.
ndpointer : Array restype/argtype with verification.
as_ctypes : Create a ctypes array from an ndarray.
as_array : Create an ndarray from a ctypes array.

References
----------
.. [1] "SciPy Cookbook: ctypes", https://scipy-cookbook.readthedocs.io/items/Ctypes.html

Examples
--------
Load the C library:

>>> _lib = np.ctypeslib.load_library('libmystuff', '.')     #doctest: +SKIP

Our result type, an ndarray that must be of type double, be 1-dimensional
and is C-contiguous in memory:

>>> array_1d_double = np.ctypeslib.ndpointer(
...                          dtype=np.double,
...                          ndim=1, flags='CONTIGUOUS')    #doctest: +SKIP

Our C-function typically takes an array and updates its values
in-place.  For example::

    void foo_func(double* x, int length)
    {
        int i;
        for (i = 0; i < length; i++) {
            x[i] = i*i;
        }
    }

We wrap it using:

>>> _lib.foo_func.restype = None                      #doctest: +SKIP
>>> _lib.foo_func.argtypes = [array_1d_double, c_int] #doctest: +SKIP

Then, we're ready to call ``foo_func``:

>>> out = np.empty(15, dtype=np.double)
>>> _lib.foo_func(out, len(out))                #doctest: +SKIP

---
## _num_fromflags
```python
from ctypeslib import _num_fromflags
```



---
## _flags_fromnum
```python
from ctypeslib import _flags_fromnum
```



---
## _ndptr
```python
from ctypeslib import _ndptr
```



---
## _concrete_ndptr
```python
from ctypeslib import _concrete_ndptr
```

Like _ndptr, but with `_shape_` and `_dtype_` specified.

Notably, this means the pointer has enough information to reconstruct
the array, which is not generally true.

---
## ndpointer
```python
from ctypeslib import ndpointer
```

Array-checking restype/argtypes.

An ndpointer instance is used to describe an ndarray in restypes
and argtypes specifications.  This approach is more flexible than
using, for example, ``POINTER(c_double)``, since several restrictions
can be specified, which are verified upon calling the ctypes function.
These include data type, number of dimensions, shape and flags.  If a
given array does not satisfy the specified restrictions,
a ``TypeError`` is raised.

Parameters
----------
dtype : data-type, optional
    Array data-type.
ndim : int, optional
    Number of array dimensions.
shape : tuple of ints, optional
    Array shape.
flags : str or tuple of str
    Array flags; may be one or more of:

      - C_CONTIGUOUS / C / CONTIGUOUS
      - F_CONTIGUOUS / F / FORTRAN
      - OWNDATA / O
      - WRITEABLE / W
      - ALIGNED / A
      - WRITEBACKIFCOPY / X

Returns
-------
klass : ndpointer type object
    A type object, which is an ``_ndtpr`` instance containing
    dtype, ndim, shape and flags information.

Raises
------
TypeError
    If a given array does not satisfy the specified restrictions.

Examples
--------
>>> clib.somefunc.argtypes = [np.ctypeslib.ndpointer(dtype=np.float64,
...                                                  ndim=1,
...                                                  flags='C_CONTIGUOUS')]
... #doctest: +SKIP
>>> clib.somefunc(np.array([1, 2, 3], dtype=np.float64))
... #doctest: +SKIP

---
## _dummy
```python
from ctypeslib import _dummy
```

Dummy object that raises an ImportError if ctypes is not available.

Raises
------
ImportError
    If ctypes is not available.

---
## load_library
```python
from ctypeslib import load_library
```

It is possible to load a library using

>>> lib = ctypes.cdll[<full_path_name>] # doctest: +SKIP

But there are cross-platform considerations, such as library file extensions,
plus the fact Windows will just load the first library it finds with that name.
NumPy supplies the load_library function as a convenience.

.. versionchanged:: 1.20.0
    Allow libname and loader_path to take any
    :term:`python:path-like object`.

Parameters
----------
libname : path-like
    Name of the library, which can have 'lib' as a prefix,
    but without an extension.
loader_path : path-like
    Where the library can be found.

Returns
-------
ctypes.cdll[libpath] : library object
   A ctypes library object

Raises
------
OSError
    If there is no library with the expected extension, or the
    library is defective and cannot be loaded.

---
## from_param
```python
from ctypeslib import from_param
```



---
## _check_retval_
```python
from ctypeslib import _check_retval_
```

This method is called when this class is used as the .restype
attribute for a shared-library function, to automatically wrap the
pointer into an array.

---
## contents
```python
from ctypeslib import contents
```

Get an ndarray viewing the data pointed to by this pointer.

This mirrors the `contents` attribute of a normal ctypes pointer

---
## _ctype_ndarray
```python
from ctypeslib import _ctype_ndarray
```

Create an ndarray of the given element type and shape 

---
## _get_scalar_type_map
```python
from ctypeslib import _get_scalar_type_map
```

Return a dictionary mapping native endian scalar dtype to ctypes types

---
## _ctype_from_dtype_scalar
```python
from ctypeslib import _ctype_from_dtype_scalar
```



---
## _ctype_from_dtype_subarray
```python
from ctypeslib import _ctype_from_dtype_subarray
```



---
## _ctype_from_dtype_structured
```python
from ctypeslib import _ctype_from_dtype_structured
```



---
## _ctype_from_dtype
```python
from ctypeslib import _ctype_from_dtype
```



---
## as_ctypes_type
```python
from ctypeslib import as_ctypes_type
```

Convert a dtype into a ctypes type.

Parameters
----------
dtype : dtype
    The dtype to convert

Returns
-------
ctype
    A ctype scalar, union, array, or struct

Raises
------
NotImplementedError
    If the conversion is not possible

Notes
-----
This function does not losslessly round-trip in either direction.

``np.dtype(as_ctypes_type(dt))`` will:

 - insert padding fields
 - reorder fields to be sorted by offset
 - discard field titles

``as_ctypes_type(np.dtype(ctype))`` will:

 - discard the class names of `ctypes.Structure`\ s and
   `ctypes.Union`\ s
 - convert single-element `ctypes.Union`\ s into single-element
   `ctypes.Structure`\ s
 - insert padding fields

---
## as_array
```python
from ctypeslib import as_array
```

Create a numpy array from a ctypes array or POINTER.

The numpy array shares the memory with the ctypes object.

The shape parameter must be given if converting from a ctypes POINTER.
The shape parameter is ignored if converting from a ctypes array

---
## as_ctypes
```python
from ctypeslib import as_ctypes
```

Create and return a ctypes object from a numpy array.  Actually
anything that exposes the __array_interface__ is accepted.

---
## __name__
```python
from matlib import __name__
```



---
## empty
```python
from matlib import empty
```

Return a new matrix of given shape and type, without initializing entries.

Parameters
----------
shape : int or tuple of int
    Shape of the empty matrix.
dtype : data-type, optional
    Desired output data-type.
order : {'C', 'F'}, optional
    Whether to store multi-dimensional data in row-major
    (C-style) or column-major (Fortran-style) order in
    memory.

See Also
--------
empty_like, zeros

Notes
-----
`empty`, unlike `zeros`, does not set the matrix values to zero,
and may therefore be marginally faster.  On the other hand, it requires
the user to manually set all the values in the array, and should be
used with caution.

Examples
--------
>>> import numpy.matlib
>>> np.matlib.empty((2, 2))    # filled with random data
matrix([[  6.76425276e-320,   9.79033856e-307], # random
        [  7.39337286e-309,   3.22135945e-309]])
>>> np.matlib.empty((2, 2), dtype=int)
matrix([[ 6600475,        0], # random
        [ 6586976, 22740995]])

---
## ones
```python
from matlib import ones
```

Matrix of ones.

Return a matrix of given shape and type, filled with ones.

Parameters
----------
shape : {sequence of ints, int}
    Shape of the matrix
dtype : data-type, optional
    The desired data-type for the matrix, default is np.float64.
order : {'C', 'F'}, optional
    Whether to store matrix in C- or Fortran-contiguous order,
    default is 'C'.

Returns
-------
out : matrix
    Matrix of ones of given shape, dtype, and order.

See Also
--------
ones : Array of ones.
matlib.zeros : Zero matrix.

Notes
-----
If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``,
`out` becomes a single row matrix of shape ``(1,N)``.

Examples
--------
>>> np.matlib.ones((2,3))
matrix([[1.,  1.,  1.],
        [1.,  1.,  1.]])

>>> np.matlib.ones(2)
matrix([[1.,  1.]])

---
## zeros
```python
from matlib import zeros
```

Return a matrix of given shape and type, filled with zeros.

Parameters
----------
shape : int or sequence of ints
    Shape of the matrix
dtype : data-type, optional
    The desired data-type for the matrix, default is float.
order : {'C', 'F'}, optional
    Whether to store the result in C- or Fortran-contiguous order,
    default is 'C'.

Returns
-------
out : matrix
    Zero matrix of given shape, dtype, and order.

See Also
--------
numpy.zeros : Equivalent array function.
matlib.ones : Return a matrix of ones.

Notes
-----
If `shape` has length one i.e. ``(N,)``, or is a scalar ``N``,
`out` becomes a single row matrix of shape ``(1,N)``.

Examples
--------
>>> import numpy.matlib
>>> np.matlib.zeros((2, 3))
matrix([[0.,  0.,  0.],
        [0.,  0.,  0.]])

>>> np.matlib.zeros(2)
matrix([[0.,  0.]])

---
## identity
```python
from matlib import identity
```

Returns the square identity matrix of given size.

Parameters
----------
n : int
    Size of the returned identity matrix.
dtype : data-type, optional
    Data-type of the output. Defaults to ``float``.

Returns
-------
out : matrix
    `n` x `n` matrix with its main diagonal set to one,
    and all other elements zero.

See Also
--------
numpy.identity : Equivalent array function.
matlib.eye : More general matrix identity function.

Examples
--------
>>> import numpy.matlib
>>> np.matlib.identity(3, dtype=int)
matrix([[1, 0, 0],
        [0, 1, 0],
        [0, 0, 1]])

---
## eye
```python
from matlib import eye
```

Return a matrix with ones on the diagonal and zeros elsewhere.

Parameters
----------
n : int
    Number of rows in the output.
M : int, optional
    Number of columns in the output, defaults to `n`.
k : int, optional
    Index of the diagonal: 0 refers to the main diagonal,
    a positive value refers to an upper diagonal,
    and a negative value to a lower diagonal.
dtype : dtype, optional
    Data-type of the returned matrix.
order : {'C', 'F'}, optional
    Whether the output should be stored in row-major (C-style) or
    column-major (Fortran-style) order in memory.

    .. versionadded:: 1.14.0

Returns
-------
I : matrix
    A `n` x `M` matrix where all elements are equal to zero,
    except for the `k`-th diagonal, whose values are equal to one.

See Also
--------
numpy.eye : Equivalent array function.
identity : Square identity matrix.

Examples
--------
>>> import numpy.matlib
>>> np.matlib.eye(3, k=1, dtype=float)
matrix([[0.,  1.,  0.],
        [0.,  0.,  1.],
        [0.,  0.,  0.]])

---
## rand
```python
from matlib import rand
```

Return a matrix of random values with given shape.

Create a matrix of the given shape and propagate it with
random samples from a uniform distribution over ``[0, 1)``.

Parameters
----------
\*args : Arguments
    Shape of the output.
    If given as N integers, each integer specifies the size of one
    dimension.
    If given as a tuple, this tuple gives the complete shape.

Returns
-------
out : ndarray
    The matrix of random values with shape given by `\*args`.

See Also
--------
randn, numpy.random.RandomState.rand

Examples
--------
>>> np.random.seed(123)
>>> import numpy.matlib
>>> np.matlib.rand(2, 3)
matrix([[0.69646919, 0.28613933, 0.22685145],
        [0.55131477, 0.71946897, 0.42310646]])
>>> np.matlib.rand((2, 3))
matrix([[0.9807642 , 0.68482974, 0.4809319 ],
        [0.39211752, 0.34317802, 0.72904971]])

If the first argument is a tuple, other arguments are ignored:

>>> np.matlib.rand((2, 3), 4)
matrix([[0.43857224, 0.0596779 , 0.39804426],
        [0.73799541, 0.18249173, 0.17545176]])

---
## randn
```python
from matlib import randn
```

Return a random matrix with data from the "standard normal" distribution.

`randn` generates a matrix filled with random floats sampled from a
univariate "normal" (Gaussian) distribution of mean 0 and variance 1.

Parameters
----------
\*args : Arguments
    Shape of the output.
    If given as N integers, each integer specifies the size of one
    dimension. If given as a tuple, this tuple gives the complete shape.

Returns
-------
Z : matrix of floats
    A matrix of floating-point samples drawn from the standard normal
    distribution.

See Also
--------
rand, numpy.random.RandomState.randn

Notes
-----
For random samples from the normal distribution with mean ``mu`` and
standard deviation ``sigma``, use::

    sigma * np.matlib.randn(...) + mu

Examples
--------
>>> np.random.seed(123)
>>> import numpy.matlib
>>> np.matlib.randn(1)
matrix([[-1.0856306]])
>>> np.matlib.randn(1, 2, 3)
matrix([[ 0.99734545,  0.2829785 , -1.50629471],
        [-0.57860025,  1.65143654, -2.42667924]])

Two-by-four matrix of samples from the normal distribution with
mean 3 and standard deviation 2.5:

>>> 2.5 * np.matlib.randn((2, 4)) + 3
matrix([[1.92771843, 6.16484065, 0.83314899, 1.30278462],
        [2.76322758, 6.72847407, 1.40274501, 1.8900451 ]])

---
## repmat
```python
from matlib import repmat
```

Repeat a 0-D to 2-D array or matrix MxN times.

Parameters
----------
a : array_like
    The array or matrix to be repeated.
m, n : int
    The number of times `a` is repeated along the first and second axes.

Returns
-------
out : ndarray
    The result of repeating `a`.

Examples
--------
>>> import numpy.matlib
>>> a0 = np.array(1)
>>> np.matlib.repmat(a0, 2, 3)
array([[1, 1, 1],
       [1, 1, 1]])

>>> a1 = np.arange(4)
>>> np.matlib.repmat(a1, 2, 2)
array([[0, 1, 2, 3, 0, 1, 2, 3],
       [0, 1, 2, 3, 0, 1, 2, 3]])

>>> a2 = np.asmatrix(np.arange(6).reshape(2, 3))
>>> np.matlib.repmat(a2, 2, 3)
matrix([[0, 1, 2, 0, 1, 2, 0, 1, 2],
        [3, 4, 5, 3, 4, 5, 3, 4, 5],
        [0, 1, 2, 0, 1, 2, 0, 1, 2],
        [3, 4, 5, 3, 4, 5, 3, 4, 5]])

---
## ComplexWarning
```python
from exceptions import ComplexWarning
```

The warning raised when casting a complex dtype to a real dtype.

As implemented, casting a complex number to a real discards its imaginary
part, but this behavior may not be what the user actually wants.

---
## ModuleDeprecationWarning
```python
from exceptions import ModuleDeprecationWarning
```

Module deprecation warning.

.. warning::

    This warning should not be used, since nose testing is not relevant
    anymore.

The nose tester turns ordinary Deprecation warnings into test failures.
That makes it hard to deprecate whole modules, because they get
imported by default. So this is a special Deprecation warning that the
nose tester will let pass without making tests fail.

---
## VisibleDeprecationWarning
```python
from exceptions import VisibleDeprecationWarning
```

Visible deprecation warning.

By default, python will not show deprecation warnings, so this class
can be used when a very visible warning is helpful, for example because
the usage is most likely a user bug.

---
## TooHardError
```python
from exceptions import TooHardError
```

max_work was exceeded.

This is raised whenever the maximum number of candidate solutions
to consider specified by the ``max_work`` parameter is exceeded.
Assigning a finite number to max_work may have caused the operation
to fail.

---
## AxisError
```python
from exceptions import AxisError
```

Axis supplied was invalid.

This is raised whenever an ``axis`` parameter is specified that is larger
than the number of array dimensions.
For compatibility with code written against older numpy versions, which
raised a mixture of `ValueError` and `IndexError` for this situation, this
exception subclasses both to ensure that ``except ValueError`` and
``except IndexError`` statements continue to catch `AxisError`.

.. versionadded:: 1.13

Parameters
----------
axis : int or str
    The out of bounds axis or a custom exception message.
    If an axis is provided, then `ndim` should be specified as well.
ndim : int, optional
    The number of array dimensions.
msg_prefix : str, optional
    A prefix for the exception message.

Attributes
----------
axis : int, optional
    The out of bounds axis or ``None`` if a custom exception
    message was provided. This should be the axis as passed by
    the user, before any normalization to resolve negative indices.

    .. versionadded:: 1.22
ndim : int, optional
    The number of array dimensions or ``None`` if a custom exception
    message was provided.

    .. versionadded:: 1.22


Examples
--------
>>> array_1d = np.arange(10)
>>> np.cumsum(array_1d, axis=1)
Traceback (most recent call last):
  ...
numpy.exceptions.AxisError: axis 1 is out of bounds for array of dimension 1

Negative axes are preserved:

>>> np.cumsum(array_1d, axis=-2)
Traceback (most recent call last):
  ...
numpy.exceptions.AxisError: axis -2 is out of bounds for array of dimension 1

The class constructor generally takes the axis and arrays'
dimensionality as arguments:

>>> print(np.AxisError(2, 1, msg_prefix='error'))
error: axis 2 is out of bounds for array of dimension 1

Alternatively, a custom exception message can be passed:

>>> print(np.AxisError('Custom error message'))
Custom error message

---
## DTypePromotionError
```python
from exceptions import DTypePromotionError
```

Multiple DTypes could not be converted to a common one.

This exception derives from ``TypeError`` and is raised whenever dtypes
cannot be converted to a single common one.  This can be because they
are of a different category/class or incompatible instances of the same
one (see Examples).

Notes
-----
Many functions will use promotion to find the correct result and
implementation.  For these functions the error will typically be chained
with a more specific error indicating that no implementation was found
for the input dtypes.

Typically promotion should be considered "invalid" between the dtypes of
two arrays when `arr1 == arr2` can safely return all ``False`` because the
dtypes are fundamentally different.

Examples
--------
Datetimes and complex numbers are incompatible classes and cannot be
promoted:

>>> np.result_type(np.dtype("M8[s]"), np.complex128)
DTypePromotionError: The DType <class 'numpy.dtype[datetime64]'> could not
be promoted by <class 'numpy.dtype[complex128]'>. This means that no common
DType exists for the given inputs. For example they cannot be stored in a
single array unless the dtype is `object`. The full list of DTypes is:
(<class 'numpy.dtype[datetime64]'>, <class 'numpy.dtype[complex128]'>)

For example for structured dtypes, the structure can mismatch and the
same ``DTypePromotionError`` is given when two structured dtypes with
a mismatch in their number of fields is given:

>>> dtype1 = np.dtype([("field1", np.float64), ("field2", np.int64)])
>>> dtype2 = np.dtype([("field1", np.float64)])
>>> np.promote_types(dtype1, dtype2)
DTypePromotionError: field names `('field1', 'field2')` and `('field1',)`
mismatch.

---
## __name__
```python
from _pytesttester import __name__
```

Pytest test running.

This module implements the ``test()`` function for NumPy modules. The usual
boiler plate for doing that is to put the following in the module
``__init__.py`` file::

    from numpy._pytesttester import PytestTester
    test = PytestTester(__name__)
    del PytestTester


Warnings filtering and other runtime settings should be dealt with in the
``pytest.ini`` file in the numpy repo root. The behavior of the test depends on
whether or not that file is found as follows:

* ``pytest.ini`` is present (develop mode)
    All warnings except those explicitly filtered out are raised as error.
* ``pytest.ini`` is absent (release mode)
    DeprecationWarnings and PendingDeprecationWarnings are ignored, other
    warnings are passed through.

In practice, tests run from the numpy repo are run in develop mode. That
includes the standard ``python runtests.py`` invocation.

This module is imported by every numpy subpackage, so lies at the top level to
simplify circular import issues. For the same reason, it contains no numpy
imports at module scope, instead importing numpy within function calls.

---
## _show_numpy_info
```python
from _pytesttester import _show_numpy_info
```



---
## PytestTester
```python
from _pytesttester import PytestTester
```

Pytest test runner.

A test function is typically added to a package's __init__.py like so::

  from numpy._pytesttester import PytestTester
  test = PytestTester(__name__).test
  del PytestTester

Calling this test function finds and runs all tests associated with the
module and all its sub-modules.

Attributes
----------
module_name : str
    Full path to the package to test.

Parameters
----------
module_name : module name
    The name of the module to test.

Notes
-----
Unlike the previous ``nose``-based implementation, this class is not
publicly exposed as it performs some ``numpy``-specific warning
suppression.

---
## __init__
```python
from _pytesttester import __init__
```



---
## __call__
```python
from _pytesttester import __call__
```

Run tests for module using pytest.

Parameters
----------
label : {'fast', 'full'}, optional
    Identifies the tests to run. When set to 'fast', tests decorated
    with `pytest.mark.slow` are skipped, when 'full', the slow marker
    is ignored.
verbose : int, optional
    Verbosity value for test outputs, in the range 1-3. Default is 1.
extra_argv : list, optional
    List with any extra arguments to pass to pytests.
doctests : bool, optional
    .. note:: Not supported
coverage : bool, optional
    If True, report coverage of NumPy code. Default is False.
    Requires installation of (pip) pytest-cov.
durations : int, optional
    If < 0, do nothing, If 0, report time of all tests, if > 0,
    report the time of the slowest `timer` tests. Default is -1.
tests : test or list of tests
    Tests to be executed with pytest '--pyargs'

Returns
-------
result : bool
    Return True on success, false otherwise.

Notes
-----
Each NumPy module exposes `test` in its namespace to run all tests for
it. For example, to run all tests for numpy.lib:

>>> np.lib.test() #doctest: +SKIP

Examples
--------
>>> result = np.lib.test() #doctest: +SKIP
...
1023 passed, 2 skipped, 6 deselected, 1 xfailed in 10.39 seconds
>>> result
True

---
## __name__
```python
from logging import __name__
```

Logging utility functions for Sphinx.

---
## make_console_logger
```python
from logging import make_console_logger
```

Return a custom logger.

---
## ClientOptions
```python
from client import ClientOptions
```

Options to configure the client.

Attributes:
    auth: Bearer token for authentication. If left undefined, the `auth` parameter
        should be set on each request.
    timeout_ms: Number of milliseconds to wait before emitting a
        `RequestTimeoutError`.
    base_url: The root URL for sending API requests. This can be changed to test with
        a mock server.
    log_level: Verbosity of logs the instance will produce. By default, logs are
        written to `stdout`.
    logger: A custom logger.
    notion_version: Notion version to use.

---
## BaseClient
```python
from client import BaseClient
```



---
## Client
```python
from client import Client
```

The main Client class for the Python client. This class is used to connect to a remote Gradio app and call its API endpoints.

Example:
    from gradio_client import Client

    client = Client("abidlabs/whisper-large-v2")  # connecting to a Hugging Face Space
    client.predict("test.mp4", api_name="/predict")
    >> What a nice recording! # returns the result of the remote API call

    client = Client("https://bec81a83-5b5c-471e.gradio.live")  # connecting to a temporary Gradio share URL
    job = client.submit("hello", api_name="/predict")  # runs the prediction in a background thread
    job.result()
    >> 49 # returns the result of the remote API call (blocking call)

---
## AsyncClient
```python
from client import AsyncClient
```

Asynchronous client for Notion's API.

---
## client
```python
from client import client
```



---
## _build_request
```python
from client import _build_request
```



---
## _parse_response
```python
from client import _parse_response
```



---
## RequestTimeoutError
```python
from errors import RequestTimeoutError
```

Exception for requests that timeout.

The request that we made waits for a specified period of time or maximum number of
retries to get the response. But if no response comes within the limited time or
retries, then this Exception is raised.

---
## HTTPResponseError
```python
from errors import HTTPResponseError
```

Exception for HTTP errors.

Responses from the API use HTTP response codes that are used to indicate general
classes of success and error.

---
## APIErrorCode
```python
from errors import APIErrorCode
```



---
## APIResponseError
```python
from errors import APIResponseError
```

An error raised by Notion API.

---
## is_api_error_code
```python
from errors import is_api_error_code
```

Check if given code belongs to the list of valid API error codes.

---
## __name__
```python
from api_endpoints import __name__
```

Notion API endpoints.

---
## Endpoint
```python
from api_endpoints import Endpoint
```



---
## BlocksChildrenEndpoint
```python
from api_endpoints import BlocksChildrenEndpoint
```



---
## BlocksEndpoint
```python
from api_endpoints import BlocksEndpoint
```



---
## DatabasesEndpoint
```python
from api_endpoints import DatabasesEndpoint
```



---
## PagesPropertiesEndpoint
```python
from api_endpoints import PagesPropertiesEndpoint
```



---
## PagesEndpoint
```python
from api_endpoints import PagesEndpoint
```



---
## UsersEndpoint
```python
from api_endpoints import UsersEndpoint
```



---
## SearchEndpoint
```python
from api_endpoints import SearchEndpoint
```



---
## CommentsEndpoint
```python
from api_endpoints import CommentsEndpoint
```



---
## __init__
```python
from api_endpoints import __init__
```



---
## append
```python
from api_endpoints import append
```

Create and append new children blocks to the block using the ID specified.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-block-children)*

---
## list
```python
from api_endpoints import list
```

Retrieve a list of un-resolved [Comment objects](https://developers.notion.com/reference/comment-object) from the specified block.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/retrieve-a-comment)*

---
## retrieve
```python
from api_endpoints import retrieve
```

Retrieve a [User](https://developers.notion.com/reference/user) using the ID specified.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/get-user)*

---
## update
```python
from api_endpoints import update
```

Update [page property values](https://developers.notion.com/reference/page#property-value-object) for the specified page.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/patch-page)*

---
## delete
```python
from api_endpoints import delete
```

Set a [Block object](https://developers.notion.com/reference/block), including page blocks, to `archived: true`.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/delete-a-block)*

---
## query
```python
from api_endpoints import query
```

Get a list of [Pages](https://developers.notion.com/reference/page) contained in the database.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/post-database-query)*

---
## create
```python
from api_endpoints import create
```

Create a new comment in the specified page or existing discussion thread.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/create-a-comment)*

---
## me
```python
from api_endpoints import me
```

Retrieve the bot [User](https://developers.notion.com/reference/user) associated with the API token.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/get-self)*

---
## __call__
```python
from api_endpoints import __call__
```

Search all pages and child pages that are shared with the integration.

*[🔗 Endpoint documentation](https://developers.notion.com/reference/post-search)*

---
## pick
```python
from helpers import pick
```

Return a dict composed of key value pairs for keys passed as args.

---
## get_url
```python
from helpers import get_url
```

Return the URL for the object with the given id.

---
## get_id
```python
from helpers import get_id
```

Return the id of the object behind the given URL.

---
## iterate_paginated_api
```python
from helpers import iterate_paginated_api
```

Return an iterator over the results of any paginated Notion API.

---
## collect_paginated_api
```python
from helpers import collect_paginated_api
```

Collect all the results of paginating an API into a list.

---
## is_full_block
```python
from helpers import is_full_block
```

Return `True` if response is a full block.

---
## is_full_page
```python
from helpers import is_full_page
```

Return `True` if response is a full page.

---
## is_full_database
```python
from helpers import is_full_database
```

Return `True` if response is a full database.

---
## is_full_page_or_database
```python
from helpers import is_full_page_or_database
```

Return `True` if `response` is a full database or a full page.

---
## is_full_user
```python
from helpers import is_full_user
```

Return `True` if response is a full user.

---
## is_full_comment
```python
from helpers import is_full_comment
```

Return `True` if response is a full comment.

---
## is_text_rich_text_item_response
```python
from helpers import is_text_rich_text_item_response
```

Return `True` if `rich_text` is a text.

---
## is_equation_rich_text_item_response
```python
from helpers import is_equation_rich_text_item_response
```

Return `True` if `rich_text` is an equation.

---
## is_mention_rich_text_item_response
```python
from helpers import is_mention_rich_text_item_response
```

Return `True` if `rich_text` is a mention.

---
## __name__
```python
from more import __name__
```



---
## chunked
```python
from more import chunked
```

Break *iterable* into lists of length *n*:

    >>> list(chunked([1, 2, 3, 4, 5, 6], 3))
    [[1, 2, 3], [4, 5, 6]]

By the default, the last yielded list will have fewer than *n* elements
if the length of *iterable* is not divisible by *n*:

    >>> list(chunked([1, 2, 3, 4, 5, 6, 7, 8], 3))
    [[1, 2, 3], [4, 5, 6], [7, 8]]

To use a fill-in value instead, see the :func:`grouper` recipe.

If the length of *iterable* is not divisible by *n* and *strict* is
``True``, then ``ValueError`` will be raised before the last
list is yielded.

---
## first
```python
from more import first
```

Return the first item of *iterable*, or *default* if *iterable* is
empty.

    >>> first([0, 1, 2, 3])
    0
    >>> first([], 'some default')
    'some default'

If *default* is not provided and there are no items in the iterable,
raise ``ValueError``.

:func:`first` is useful when you have a generator of expensive-to-retrieve
values and want any arbitrary one. It is marginally shorter than
``next(iter(iterable), default)``.

---
## last
```python
from more import last
```

Return the last item of *iterable*, or *default* if *iterable* is
empty.

    >>> last([0, 1, 2, 3])
    3
    >>> last([], 'some default')
    'some default'

If *default* is not provided and there are no items in the iterable,
raise ``ValueError``.

---
## nth_or_last
```python
from more import nth_or_last
```

Return the nth or the last item of *iterable*,
or *default* if *iterable* is empty.

    >>> nth_or_last([0, 1, 2, 3], 2)
    2
    >>> nth_or_last([0, 1], 2)
    1
    >>> nth_or_last([], 0, 'some default')
    'some default'

If *default* is not provided and there are no items in the iterable,
raise ``ValueError``.

---
## peekable
```python
from more import peekable
```

Wrap an iterator to allow lookahead and prepending elements.

Call :meth:`peek` on the result to get the value that will be returned
by :func:`next`. This won't advance the iterator:

    >>> p = peekable(['a', 'b'])
    >>> p.peek()
    'a'
    >>> next(p)
    'a'

Pass :meth:`peek` a default value to return that instead of raising
``StopIteration`` when the iterator is exhausted.

    >>> p = peekable([])
    >>> p.peek('hi')
    'hi'

peekables also offer a :meth:`prepend` method, which "inserts" items
at the head of the iterable:

    >>> p = peekable([1, 2, 3])
    >>> p.prepend(10, 11, 12)
    >>> next(p)
    10
    >>> p.peek()
    11
    >>> list(p)
    [11, 12, 1, 2, 3]

peekables can be indexed. Index 0 is the item that will be returned by
:func:`next`, index 1 is the item after that, and so on:
The values up to the given index will be cached.

    >>> p = peekable(['a', 'b', 'c', 'd'])
    >>> p[0]
    'a'
    >>> p[1]
    'b'
    >>> next(p)
    'a'

Negative indexes are supported, but be aware that they will cache the
remaining items in the source iterator, which may require significant
storage.

To check whether a peekable is exhausted, check its truth value:

    >>> p = peekable(['a', 'b'])
    >>> if p:  # peekable has items
    ...     list(p)
    ['a', 'b']
    >>> if not p:  # peekable is exhausted
    ...     list(p)
    []

---
## consumer
```python
from more import consumer
```

Decorator that automatically advances a PEP-342-style "reverse iterator"
to its first yield point so you don't have to call ``next()`` on it
manually.

    >>> @consumer
    ... def tally():
    ...     i = 0
    ...     while True:
    ...         print('Thing number %s is %s.' % (i, (yield)))
    ...         i += 1
    ...
    >>> t = tally()
    >>> t.send('red')
    Thing number 0 is red.
    >>> t.send('fish')
    Thing number 1 is fish.

Without the decorator, you would have to call ``next(t)`` before
``t.send()`` could be used.

---
## ilen
```python
from more import ilen
```

Return the number of items in *iterable*.

    >>> ilen(x for x in range(1000000) if x % 3 == 0)
    333334

This consumes the iterable, so handle with care.

---
## iterate
```python
from more import iterate
```

Return ``start``, ``func(start)``, ``func(func(start))``, ...

>>> from itertools import islice
>>> list(islice(iterate(lambda x: 2*x, 1), 10))
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512]

---
## with_iter
```python
from more import with_iter
```

Wrap an iterable in a ``with`` statement, so it closes once exhausted.

For example, this will close the file when the iterator is exhausted::

    upper_lines = (line.upper() for line in with_iter(open('foo')))

Any context manager which returns an iterable is a candidate for
``with_iter``.

---
## one
```python
from more import one
```

Return the first item from *iterable*, which is expected to contain only
that item. Raise an exception if *iterable* is empty or has more than one
item.

:func:`one` is useful for ensuring that an iterable contains only one item.
For example, it can be used to retrieve the result of a database query
that is expected to return a single row.

If *iterable* is empty, ``ValueError`` will be raised. You may specify a
different exception with the *too_short* keyword:

    >>> it = []
    >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: too many items in iterable (expected 1)'
    >>> too_short = IndexError('too few items')
    >>> one(it, too_short=too_short)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    IndexError: too few items

Similarly, if *iterable* contains more than one item, ``ValueError`` will
be raised. You may specify a different exception with the *too_long*
keyword:

    >>> it = ['too', 'many']
    >>> one(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: Expected exactly one item in iterable, but got 'too',
    'many', and perhaps more.
    >>> too_long = RuntimeError
    >>> one(it, too_long=too_long)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    RuntimeError

Note that :func:`one` attempts to advance *iterable* twice to ensure there
is only one item. See :func:`spy` or :func:`peekable` to check iterable
contents less destructively.

---
## raise_
```python
from more import raise_
```



---
## strictly_n
```python
from more import strictly_n
```

Validate that *iterable* has exactly *n* items and return them if
it does. If it has fewer than *n* items, call function *too_short*
with those items. If it has more than *n* items, call function
*too_long* with the first ``n + 1`` items.

    >>> iterable = ['a', 'b', 'c', 'd']
    >>> n = 4
    >>> list(strictly_n(iterable, n))
    ['a', 'b', 'c', 'd']

Note that the returned iterable must be consumed in order for the check to
be made.

By default, *too_short* and *too_long* are functions that raise
``ValueError``.

    >>> list(strictly_n('ab', 3))  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: too few items in iterable (got 2)

    >>> list(strictly_n('abc', 2))  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    ValueError: too many items in iterable (got at least 3)

You can instead supply functions that do something else.
*too_short* will be called with the number of items in *iterable*.
*too_long* will be called with `n + 1`.

    >>> def too_short(item_count):
    ...     raise RuntimeError
    >>> it = strictly_n('abcd', 6, too_short=too_short)
    >>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    RuntimeError

    >>> def too_long(item_count):
    ...     print('The boss is going to hear about this')
    >>> it = strictly_n('abcdef', 4, too_long=too_long)
    >>> list(it)
    The boss is going to hear about this
    ['a', 'b', 'c', 'd']

---
## distinct_permutations
```python
from more import distinct_permutations
```

Yield successive distinct permutations of the elements in *iterable*.

    >>> sorted(distinct_permutations([1, 0, 1]))
    [(0, 1, 1), (1, 0, 1), (1, 1, 0)]

Equivalent to yielding from ``set(permutations(iterable))``, except
duplicates are not generated and thrown away. For larger input sequences
this is much more efficient.

Duplicate permutations arise when there are duplicated elements in the
input iterable. The number of items returned is
`n! / (x_1! * x_2! * ... * x_n!)`, where `n` is the total number of
items input, and each `x_i` is the count of a distinct item in the input
sequence.

If *r* is given, only the *r*-length permutations are yielded.

    >>> sorted(distinct_permutations([1, 0, 1], r=2))
    [(0, 1), (1, 0), (1, 1)]
    >>> sorted(distinct_permutations(range(3), r=2))
    [(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]

*iterable* need not be sortable, but note that using equal (``x == y``)
but non-identical (``id(x) != id(y)``) elements may produce surprising
behavior. For example, ``1`` and ``True`` are equal but non-identical:

    >>> list(distinct_permutations([1, True, '3']))  # doctest: +SKIP
    [
        (1, True, '3'),
        (1, '3', True),
        ('3', 1, True)
    ]
    >>> list(distinct_permutations([1, 2, '3']))  # doctest: +SKIP
    [
        (1, 2, '3'),
        (1, '3', 2),
        (2, 1, '3'),
        (2, '3', 1),
        ('3', 1, 2),
        ('3', 2, 1)
    ]

---
## intersperse
```python
from more import intersperse
```

Intersperse filler element *e* among the items in *iterable*, leaving
*n* items between each filler element.

    >>> list(intersperse('!', [1, 2, 3, 4, 5]))
    [1, '!', 2, '!', 3, '!', 4, '!', 5]

    >>> list(intersperse(None, [1, 2, 3, 4, 5], n=2))
    [1, 2, None, 3, 4, None, 5]

---
## unique_to_each
```python
from more import unique_to_each
```

Return the elements from each of the input iterables that aren't in the
other input iterables.

For example, suppose you have a set of packages, each with a set of
dependencies::

    {'pkg_1': {'A', 'B'}, 'pkg_2': {'B', 'C'}, 'pkg_3': {'B', 'D'}}

If you remove one package, which dependencies can also be removed?

If ``pkg_1`` is removed, then ``A`` is no longer necessary - it is not
associated with ``pkg_2`` or ``pkg_3``. Similarly, ``C`` is only needed for
``pkg_2``, and ``D`` is only needed for ``pkg_3``::

    >>> unique_to_each({'A', 'B'}, {'B', 'C'}, {'B', 'D'})
    [['A'], ['C'], ['D']]

If there are duplicates in one input iterable that aren't in the others
they will be duplicated in the output. Input order is preserved::

    >>> unique_to_each("mississippi", "missouri")
    [['p', 'p'], ['o', 'u', 'r']]

It is assumed that the elements of each iterable are hashable.

---
## windowed
```python
from more import windowed
```

Return a sliding window of width *n* over the given iterable.

    >>> all_windows = windowed([1, 2, 3, 4, 5], 3)
    >>> list(all_windows)
    [(1, 2, 3), (2, 3, 4), (3, 4, 5)]

When the window is larger than the iterable, *fillvalue* is used in place
of missing values:

    >>> list(windowed([1, 2, 3], 4))
    [(1, 2, 3, None)]

Each window will advance in increments of *step*:

    >>> list(windowed([1, 2, 3, 4, 5, 6], 3, fillvalue='!', step=2))
    [(1, 2, 3), (3, 4, 5), (5, 6, '!')]

To slide into the iterable's items, use :func:`chain` to add filler items
to the left:

    >>> iterable = [1, 2, 3, 4]
    >>> n = 3
    >>> padding = [None] * (n - 1)
    >>> list(windowed(chain(padding, iterable), 3))
    [(None, None, 1), (None, 1, 2), (1, 2, 3), (2, 3, 4)]

---
## substrings
```python
from more import substrings
```

Yield all of the substrings of *iterable*.

    >>> [''.join(s) for s in substrings('more')]
    ['m', 'o', 'r', 'e', 'mo', 'or', 're', 'mor', 'ore', 'more']

Note that non-string iterables can also be subdivided.

    >>> list(substrings([0, 1, 2]))
    [(0,), (1,), (2,), (0, 1), (1, 2), (0, 1, 2)]

---
## substrings_indexes
```python
from more import substrings_indexes
```

Yield all substrings and their positions in *seq*

The items yielded will be a tuple of the form ``(substr, i, j)``, where
``substr == seq[i:j]``.

This function only works for iterables that support slicing, such as
``str`` objects.

>>> for item in substrings_indexes('more'):
...    print(item)
('m', 0, 1)
('o', 1, 2)
('r', 2, 3)
('e', 3, 4)
('mo', 0, 2)
('or', 1, 3)
('re', 2, 4)
('mor', 0, 3)
('ore', 1, 4)
('more', 0, 4)

Set *reverse* to ``True`` to yield the same items in the opposite order.

---
## bucket
```python
from more import bucket
```

Wrap *iterable* and return an object that buckets the iterable into
child iterables based on a *key* function.

    >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
    >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
    >>> sorted(list(s))  # Get the keys
    ['a', 'b', 'c']
    >>> a_iterable = s['a']
    >>> next(a_iterable)
    'a1'
    >>> next(a_iterable)
    'a2'
    >>> list(s['b'])
    ['b1', 'b2', 'b3']

The original iterable will be advanced and its items will be cached until
they are used by the child iterables. This may require significant storage.

By default, attempting to select a bucket to which no items belong  will
exhaust the iterable and cache all values.
If you specify a *validator* function, selected buckets will instead be
checked against it.

    >>> from itertools import count
    >>> it = count(1, 2)  # Infinite sequence of odd numbers
    >>> key = lambda x: x % 10  # Bucket by last digit
    >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
    >>> s = bucket(it, key=key, validator=validator)
    >>> 2 in s
    False
    >>> list(s[2])
    []

---
## spy
```python
from more import spy
```

Return a 2-tuple with a list containing the first *n* elements of
*iterable*, and an iterator with the same items as *iterable*.
This allows you to "look ahead" at the items in the iterable without
advancing it.

There is one item in the list by default:

    >>> iterable = 'abcdefg'
    >>> head, iterable = spy(iterable)
    >>> head
    ['a']
    >>> list(iterable)
    ['a', 'b', 'c', 'd', 'e', 'f', 'g']

You may use unpacking to retrieve items instead of lists:

    >>> (head,), iterable = spy('abcdefg')
    >>> head
    'a'
    >>> (first, second), iterable = spy('abcdefg', 2)
    >>> first
    'a'
    >>> second
    'b'

The number of items requested can be larger than the number of items in
the iterable:

    >>> iterable = [1, 2, 3, 4, 5]
    >>> head, iterable = spy(iterable, 10)
    >>> head
    [1, 2, 3, 4, 5]
    >>> list(iterable)
    [1, 2, 3, 4, 5]

---
## interleave
```python
from more import interleave
```

Return a new iterable yielding from each iterable in turn,
until the shortest is exhausted.

    >>> list(interleave([1, 2, 3], [4, 5], [6, 7, 8]))
    [1, 4, 6, 2, 5, 7]

For a version that doesn't terminate after the shortest iterable is
exhausted, see :func:`interleave_longest`.

---
## interleave_longest
```python
from more import interleave_longest
```

Return a new iterable yielding from each iterable in turn,
skipping any that are exhausted.

    >>> list(interleave_longest([1, 2, 3], [4, 5], [6, 7, 8]))
    [1, 4, 6, 2, 5, 7, 3, 8]

This function produces the same output as :func:`roundrobin`, but may
perform better for some inputs (in particular when the number of iterables
is large).

---
## interleave_evenly
```python
from more import interleave_evenly
```

Interleave multiple iterables so that their elements are evenly distributed
throughout the output sequence.

>>> iterables = [1, 2, 3, 4, 5], ['a', 'b']
>>> list(interleave_evenly(iterables))
[1, 2, 'a', 3, 4, 'b', 5]

>>> iterables = [[1, 2, 3], [4, 5], [6, 7, 8]]
>>> list(interleave_evenly(iterables))
[1, 6, 4, 2, 7, 3, 8, 5]

This function requires iterables of known length. Iterables without
``__len__()`` can be used by manually specifying lengths with *lengths*:

>>> from itertools import combinations, repeat
>>> iterables = [combinations(range(4), 2), ['a', 'b', 'c']]
>>> lengths = [4 * (4 - 1) // 2, 3]
>>> list(interleave_evenly(iterables, lengths=lengths))
[(0, 1), (0, 2), 'a', (0, 3), (1, 2), 'b', (1, 3), (2, 3), 'c']

Based on Bresenham's algorithm.

---
## collapse
```python
from more import collapse
```

Flatten an iterable with multiple levels of nesting (e.g., a list of
lists of tuples) into non-iterable types.

    >>> iterable = [(1, 2), ([3, 4], [[5], [6]])]
    >>> list(collapse(iterable))
    [1, 2, 3, 4, 5, 6]

Binary and text strings are not considered iterable and
will not be collapsed.

To avoid collapsing other types, specify *base_type*:

    >>> iterable = ['ab', ('cd', 'ef'), ['gh', 'ij']]
    >>> list(collapse(iterable, base_type=tuple))
    ['ab', ('cd', 'ef'), 'gh', 'ij']

Specify *levels* to stop flattening after a certain level:

>>> iterable = [('a', ['b']), ('c', ['d'])]
>>> list(collapse(iterable))  # Fully flattened
['a', 'b', 'c', 'd']
>>> list(collapse(iterable, levels=1))  # Only one level flattened
['a', ['b'], 'c', ['d']]

---
## side_effect
```python
from more import side_effect
```

Invoke *func* on each item in *iterable* (or on each *chunk_size* group
of items) before yielding the item.

`func` must be a function that takes a single argument. Its return value
will be discarded.

*before* and *after* are optional functions that take no arguments. They
will be executed before iteration starts and after it ends, respectively.

`side_effect` can be used for logging, updating progress bars, or anything
that is not functionally "pure."

Emitting a status message:

    >>> from more_itertools import consume
    >>> func = lambda item: print('Received {}'.format(item))
    >>> consume(side_effect(func, range(2)))
    Received 0
    Received 1

Operating on chunks of items:

    >>> pair_sums = []
    >>> func = lambda chunk: pair_sums.append(sum(chunk))
    >>> list(side_effect(func, [0, 1, 2, 3, 4, 5], 2))
    [0, 1, 2, 3, 4, 5]
    >>> list(pair_sums)
    [1, 5, 9]

Writing to a file-like object:

    >>> from io import StringIO
    >>> from more_itertools import consume
    >>> f = StringIO()
    >>> func = lambda x: print(x, file=f)
    >>> before = lambda: print(u'HEADER', file=f)
    >>> after = f.close
    >>> it = [u'a', u'b', u'c']
    >>> consume(side_effect(func, it, before=before, after=after))
    >>> f.closed
    True

---
## sliced
```python
from more import sliced
```

Yield slices of length *n* from the sequence *seq*.

>>> list(sliced((1, 2, 3, 4, 5, 6), 3))
[(1, 2, 3), (4, 5, 6)]

By the default, the last yielded slice will have fewer than *n* elements
if the length of *seq* is not divisible by *n*:

>>> list(sliced((1, 2, 3, 4, 5, 6, 7, 8), 3))
[(1, 2, 3), (4, 5, 6), (7, 8)]

If the length of *seq* is not divisible by *n* and *strict* is
``True``, then ``ValueError`` will be raised before the last
slice is yielded.

This function will only work for iterables that support slicing.
For non-sliceable iterables, see :func:`chunked`.

---
## split_at
```python
from more import split_at
```

Yield lists of items from *iterable*, where each list is delimited by
an item where callable *pred* returns ``True``.

    >>> list(split_at('abcdcba', lambda x: x == 'b'))
    [['a'], ['c', 'd', 'c'], ['a']]

    >>> list(split_at(range(10), lambda n: n % 2 == 1))
    [[0], [2], [4], [6], [8], []]

At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
then there is no limit on the number of splits:

    >>> list(split_at(range(10), lambda n: n % 2 == 1, maxsplit=2))
    [[0], [2], [4, 5, 6, 7, 8, 9]]

By default, the delimiting items are not included in the output.
To include them, set *keep_separator* to ``True``.

    >>> list(split_at('abcdcba', lambda x: x == 'b', keep_separator=True))
    [['a'], ['b'], ['c', 'd', 'c'], ['b'], ['a']]

---
## split_before
```python
from more import split_before
```

Yield lists of items from *iterable*, where each list ends just before
an item for which callable *pred* returns ``True``:

    >>> list(split_before('OneTwo', lambda s: s.isupper()))
    [['O', 'n', 'e'], ['T', 'w', 'o']]

    >>> list(split_before(range(10), lambda n: n % 3 == 0))
    [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]

At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
then there is no limit on the number of splits:

    >>> list(split_before(range(10), lambda n: n % 3 == 0, maxsplit=2))
    [[0, 1, 2], [3, 4, 5], [6, 7, 8, 9]]

---
## split_after
```python
from more import split_after
```

Yield lists of items from *iterable*, where each list ends with an
item where callable *pred* returns ``True``:

    >>> list(split_after('one1two2', lambda s: s.isdigit()))
    [['o', 'n', 'e', '1'], ['t', 'w', 'o', '2']]

    >>> list(split_after(range(10), lambda n: n % 3 == 0))
    [[0], [1, 2, 3], [4, 5, 6], [7, 8, 9]]

At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
then there is no limit on the number of splits:

    >>> list(split_after(range(10), lambda n: n % 3 == 0, maxsplit=2))
    [[0], [1, 2, 3], [4, 5, 6, 7, 8, 9]]

---
## split_when
```python
from more import split_when
```

Split *iterable* into pieces based on the output of *pred*.
*pred* should be a function that takes successive pairs of items and
returns ``True`` if the iterable should be split in between them.

For example, to find runs of increasing numbers, split the iterable when
element ``i`` is larger than element ``i + 1``:

    >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2], lambda x, y: x > y))
    [[1, 2, 3, 3], [2, 5], [2, 4], [2]]

At most *maxsplit* splits are done. If *maxsplit* is not specified or -1,
then there is no limit on the number of splits:

    >>> list(split_when([1, 2, 3, 3, 2, 5, 2, 4, 2],
    ...                 lambda x, y: x > y, maxsplit=2))
    [[1, 2, 3, 3], [2, 5], [2, 4, 2]]

---
## split_into
```python
from more import split_into
```

Yield a list of sequential items from *iterable* of length 'n' for each
integer 'n' in *sizes*.

    >>> list(split_into([1,2,3,4,5,6], [1,2,3]))
    [[1], [2, 3], [4, 5, 6]]

If the sum of *sizes* is smaller than the length of *iterable*, then the
remaining items of *iterable* will not be returned.

    >>> list(split_into([1,2,3,4,5,6], [2,3]))
    [[1, 2], [3, 4, 5]]

If the sum of *sizes* is larger than the length of *iterable*, fewer items
will be returned in the iteration that overruns *iterable* and further
lists will be empty:

    >>> list(split_into([1,2,3,4], [1,2,3,4]))
    [[1], [2, 3], [4], []]

When a ``None`` object is encountered in *sizes*, the returned list will
contain items up to the end of *iterable* the same way that itertools.slice
does:

    >>> list(split_into([1,2,3,4,5,6,7,8,9,0], [2,3,None]))
    [[1, 2], [3, 4, 5], [6, 7, 8, 9, 0]]

:func:`split_into` can be useful for grouping a series of items where the
sizes of the groups are not uniform. An example would be where in a row
from a table, multiple columns represent elements of the same feature
(e.g. a point represented by x,y,z) but, the format is not the same for
all columns.

---
## padded
```python
from more import padded
```

Yield the elements from *iterable*, followed by *fillvalue*, such that
at least *n* items are emitted.

    >>> list(padded([1, 2, 3], '?', 5))
    [1, 2, 3, '?', '?']

If *next_multiple* is ``True``, *fillvalue* will be emitted until the
number of items emitted is a multiple of *n*:

    >>> list(padded([1, 2, 3, 4], n=3, next_multiple=True))
    [1, 2, 3, 4, None, None]

If *n* is ``None``, *fillvalue* will be emitted indefinitely.

To create an *iterable* of exactly size *n*, you can truncate with
:func:`islice`.

    >>> list(islice(padded([1, 2, 3], '?'), 5))
    [1, 2, 3, '?', '?']
    >>> list(islice(padded([1, 2, 3, 4, 5, 6, 7, 8], '?'), 5))
    [1, 2, 3, 4, 5]

---
## repeat_each
```python
from more import repeat_each
```

Repeat each element in *iterable* *n* times.

>>> list(repeat_each('ABC', 3))
['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C']

---
## repeat_last
```python
from more import repeat_last
```

After the *iterable* is exhausted, keep yielding its last element.

    >>> list(islice(repeat_last(range(3)), 5))
    [0, 1, 2, 2, 2]

If the iterable is empty, yield *default* forever::

    >>> list(islice(repeat_last(range(0), 42), 5))
    [42, 42, 42, 42, 42]

---
## distribute
```python
from more import distribute
```

Distribute the items from *iterable* among *n* smaller iterables.

    >>> group_1, group_2 = distribute(2, [1, 2, 3, 4, 5, 6])
    >>> list(group_1)
    [1, 3, 5]
    >>> list(group_2)
    [2, 4, 6]

If the length of *iterable* is not evenly divisible by *n*, then the
length of the returned iterables will not be identical:

    >>> children = distribute(3, [1, 2, 3, 4, 5, 6, 7])
    >>> [list(c) for c in children]
    [[1, 4, 7], [2, 5], [3, 6]]

If the length of *iterable* is smaller than *n*, then the last returned
iterables will be empty:

    >>> children = distribute(5, [1, 2, 3])
    >>> [list(c) for c in children]
    [[1], [2], [3], [], []]

This function uses :func:`itertools.tee` and may require significant
storage.

If you need the order items in the smaller iterables to match the
original iterable, see :func:`divide`.

---
## stagger
```python
from more import stagger
```

Yield tuples whose elements are offset from *iterable*.
The amount by which the `i`-th item in each tuple is offset is given by
the `i`-th item in *offsets*.

    >>> list(stagger([0, 1, 2, 3]))
    [(None, 0, 1), (0, 1, 2), (1, 2, 3)]
    >>> list(stagger(range(8), offsets=(0, 2, 4)))
    [(0, 2, 4), (1, 3, 5), (2, 4, 6), (3, 5, 7)]

By default, the sequence will end when the final element of a tuple is the
last item in the iterable. To continue until the first element of a tuple
is the last item in the iterable, set *longest* to ``True``::

    >>> list(stagger([0, 1, 2, 3], longest=True))
    [(None, 0, 1), (0, 1, 2), (1, 2, 3), (2, 3, None), (3, None, None)]

By default, ``None`` will be used to replace offsets beyond the end of the
sequence. Specify *fillvalue* to use some other value.

---
## zip_equal
```python
from more import zip_equal
```

``zip`` the input *iterables* together, but raise
``UnequalIterablesError`` if they aren't all the same length.

    >>> it_1 = range(3)
    >>> it_2 = iter('abc')
    >>> list(zip_equal(it_1, it_2))
    [(0, 'a'), (1, 'b'), (2, 'c')]

    >>> it_1 = range(3)
    >>> it_2 = iter('abcd')
    >>> list(zip_equal(it_1, it_2)) # doctest: +IGNORE_EXCEPTION_DETAIL
    Traceback (most recent call last):
    ...
    more_itertools.more.UnequalIterablesError: Iterables have different
    lengths

---
## zip_offset
```python
from more import zip_offset
```

``zip`` the input *iterables* together, but offset the `i`-th iterable
by the `i`-th item in *offsets*.

    >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1)))
    [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e')]

This can be used as a lightweight alternative to SciPy or pandas to analyze
data sets in which some series have a lead or lag relationship.

By default, the sequence will end when the shortest iterable is exhausted.
To continue until the longest iterable is exhausted, set *longest* to
``True``.

    >>> list(zip_offset('0123', 'abcdef', offsets=(0, 1), longest=True))
    [('0', 'b'), ('1', 'c'), ('2', 'd'), ('3', 'e'), (None, 'f')]

By default, ``None`` will be used to replace offsets beyond the end of the
sequence. Specify *fillvalue* to use some other value.

---
## sort_together
```python
from more import sort_together
```

Return the input iterables sorted together, with *key_list* as the
priority for sorting. All iterables are trimmed to the length of the
shortest one.

This can be used like the sorting function in a spreadsheet. If each
iterable represents a column of data, the key list determines which
columns are used for sorting.

By default, all iterables are sorted using the ``0``-th iterable::

    >>> iterables = [(4, 3, 2, 1), ('a', 'b', 'c', 'd')]
    >>> sort_together(iterables)
    [(1, 2, 3, 4), ('d', 'c', 'b', 'a')]

Set a different key list to sort according to another iterable.
Specifying multiple keys dictates how ties are broken::

    >>> iterables = [(3, 1, 2), (0, 1, 0), ('c', 'b', 'a')]
    >>> sort_together(iterables, key_list=(1, 2))
    [(2, 3, 1), (0, 0, 1), ('a', 'c', 'b')]

To sort by a function of the elements of the iterable, pass a *key*
function. Its arguments are the elements of the iterables corresponding to
the key list::

    >>> names = ('a', 'b', 'c')
    >>> lengths = (1, 2, 3)
    >>> widths = (5, 2, 1)
    >>> def area(length, width):
    ...     return length * width
    >>> sort_together([names, lengths, widths], key_list=(1, 2), key=area)
    [('c', 'b', 'a'), (3, 2, 1), (1, 2, 5)]

Set *reverse* to ``True`` to sort in descending order.

    >>> sort_together([(1, 2, 3), ('c', 'b', 'a')], reverse=True)
    [(3, 2, 1), ('a', 'b', 'c')]

If the *strict* keyword argument is ``True``, then
``UnequalIterablesError`` will be raised if any of the iterables have
different lengths.

---
## unzip
```python
from more import unzip
```

The inverse of :func:`zip`, this function disaggregates the elements
of the zipped *iterable*.

The ``i``-th iterable contains the ``i``-th element from each element
of the zipped iterable. The first element is used to determine the
length of the remaining elements.

    >>> iterable = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
    >>> letters, numbers = unzip(iterable)
    >>> list(letters)
    ['a', 'b', 'c', 'd']
    >>> list(numbers)
    [1, 2, 3, 4]

This is similar to using ``zip(*iterable)``, but it avoids reading
*iterable* into memory. Note, however, that this function uses
:func:`itertools.tee` and thus may require significant storage.

---
## divide
```python
from more import divide
```

Divide the elements from *iterable* into *n* parts, maintaining
order.

    >>> group_1, group_2 = divide(2, [1, 2, 3, 4, 5, 6])
    >>> list(group_1)
    [1, 2, 3]
    >>> list(group_2)
    [4, 5, 6]

If the length of *iterable* is not evenly divisible by *n*, then the
length of the returned iterables will not be identical:

    >>> children = divide(3, [1, 2, 3, 4, 5, 6, 7])
    >>> [list(c) for c in children]
    [[1, 2, 3], [4, 5], [6, 7]]

If the length of the iterable is smaller than n, then the last returned
iterables will be empty:

    >>> children = divide(5, [1, 2, 3])
    >>> [list(c) for c in children]
    [[1], [2], [3], [], []]

This function will exhaust the iterable before returning.
If order is not important, see :func:`distribute`, which does not first
pull the iterable into memory.

---
## always_iterable
```python
from more import always_iterable
```

If *obj* is iterable, return an iterator over its items::

    >>> obj = (1, 2, 3)
    >>> list(always_iterable(obj))
    [1, 2, 3]

If *obj* is not iterable, return a one-item iterable containing *obj*::

    >>> obj = 1
    >>> list(always_iterable(obj))
    [1]

If *obj* is ``None``, return an empty iterable:

    >>> obj = None
    >>> list(always_iterable(None))
    []

By default, binary and text strings are not considered iterable::

    >>> obj = 'foo'
    >>> list(always_iterable(obj))
    ['foo']

If *base_type* is set, objects for which ``isinstance(obj, base_type)``
returns ``True`` won't be considered iterable.

    >>> obj = {'a': 1}
    >>> list(always_iterable(obj))  # Iterate over the dict's keys
    ['a']
    >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
    [{'a': 1}]

Set *base_type* to ``None`` to avoid any special handling and treat objects
Python considers iterable as iterable:

    >>> obj = 'foo'
    >>> list(always_iterable(obj, base_type=None))
    ['f', 'o', 'o']

---
## adjacent
```python
from more import adjacent
```

Return an iterable over `(bool, item)` tuples where the `item` is
drawn from *iterable* and the `bool` indicates whether
that item satisfies the *predicate* or is adjacent to an item that does.

For example, to find whether items are adjacent to a ``3``::

    >>> list(adjacent(lambda x: x == 3, range(6)))
    [(False, 0), (False, 1), (True, 2), (True, 3), (True, 4), (False, 5)]

Set *distance* to change what counts as adjacent. For example, to find
whether items are two places away from a ``3``:

    >>> list(adjacent(lambda x: x == 3, range(6), distance=2))
    [(False, 0), (True, 1), (True, 2), (True, 3), (True, 4), (True, 5)]

This is useful for contextualizing the results of a search function.
For example, a code comparison tool might want to identify lines that
have changed, but also surrounding lines to give the viewer of the diff
context.

The predicate function will only be called once for each item in the
iterable.

See also :func:`groupby_transform`, which can be used with this function
to group ranges of items with the same `bool` value.

---
## groupby_transform
```python
from more import groupby_transform
```

An extension of :func:`itertools.groupby` that can apply transformations
to the grouped data.

* *keyfunc* is a function computing a key value for each item in *iterable*
* *valuefunc* is a function that transforms the individual items from
  *iterable* after grouping
* *reducefunc* is a function that transforms each group of items

>>> iterable = 'aAAbBBcCC'
>>> keyfunc = lambda k: k.upper()
>>> valuefunc = lambda v: v.lower()
>>> reducefunc = lambda g: ''.join(g)
>>> list(groupby_transform(iterable, keyfunc, valuefunc, reducefunc))
[('A', 'aaa'), ('B', 'bbb'), ('C', 'ccc')]

Each optional argument defaults to an identity function if not specified.

:func:`groupby_transform` is useful when grouping elements of an iterable
using a separate iterable as the key. To do this, :func:`zip` the iterables
and pass a *keyfunc* that extracts the first element and a *valuefunc*
that extracts the second element::

    >>> from operator import itemgetter
    >>> keys = [0, 0, 1, 1, 1, 2, 2, 2, 3]
    >>> values = 'abcdefghi'
    >>> iterable = zip(keys, values)
    >>> grouper = groupby_transform(iterable, itemgetter(0), itemgetter(1))
    >>> [(k, ''.join(g)) for k, g in grouper]
    [(0, 'ab'), (1, 'cde'), (2, 'fgh'), (3, 'i')]

Note that the order of items in the iterable is significant.
Only adjacent items are grouped together, so if you don't want any
duplicate groups, you should sort the iterable by the key function.

---
## numeric_range
```python
from more import numeric_range
```

An extension of the built-in ``range()`` function whose arguments can
be any orderable numeric type.

With only *stop* specified, *start* defaults to ``0`` and *step*
defaults to ``1``. The output items will match the type of *stop*:

    >>> list(numeric_range(3.5))
    [0.0, 1.0, 2.0, 3.0]

With only *start* and *stop* specified, *step* defaults to ``1``. The
output items will match the type of *start*:

    >>> from decimal import Decimal
    >>> start = Decimal('2.1')
    >>> stop = Decimal('5.1')
    >>> list(numeric_range(start, stop))
    [Decimal('2.1'), Decimal('3.1'), Decimal('4.1')]

With *start*, *stop*, and *step*  specified the output items will match
the type of ``start + step``:

    >>> from fractions import Fraction
    >>> start = Fraction(1, 2)  # Start at 1/2
    >>> stop = Fraction(5, 2)  # End at 5/2
    >>> step = Fraction(1, 2)  # Count by 1/2
    >>> list(numeric_range(start, stop, step))
    [Fraction(1, 2), Fraction(1, 1), Fraction(3, 2), Fraction(2, 1)]

If *step* is zero, ``ValueError`` is raised. Negative steps are supported:

    >>> list(numeric_range(3, -1, -1.0))
    [3.0, 2.0, 1.0, 0.0]

Be aware of the limitations of floating point numbers; the representation
of the yielded numbers may be surprising.

``datetime.datetime`` objects can be used for *start* and *stop*, if *step*
is a ``datetime.timedelta`` object:

    >>> import datetime
    >>> start = datetime.datetime(2019, 1, 1)
    >>> stop = datetime.datetime(2019, 1, 3)
    >>> step = datetime.timedelta(days=1)
    >>> items = iter(numeric_range(start, stop, step))
    >>> next(items)
    datetime.datetime(2019, 1, 1, 0, 0)
    >>> next(items)
    datetime.datetime(2019, 1, 2, 0, 0)

---
## count_cycle
```python
from more import count_cycle
```

Cycle through the items from *iterable* up to *n* times, yielding
the number of completed cycles along with each item. If *n* is omitted the
process repeats indefinitely.

>>> list(count_cycle('AB', 3))
[(0, 'A'), (0, 'B'), (1, 'A'), (1, 'B'), (2, 'A'), (2, 'B')]

---
## mark_ends
```python
from more import mark_ends
```

Yield 3-tuples of the form ``(is_first, is_last, item)``.

>>> list(mark_ends('ABC'))
[(True, False, 'A'), (False, False, 'B'), (False, True, 'C')]

Use this when looping over an iterable to take special action on its first
and/or last items:

>>> iterable = ['Header', 100, 200, 'Footer']
>>> total = 0
>>> for is_first, is_last, item in mark_ends(iterable):
...     if is_first:
...         continue  # Skip the header
...     if is_last:
...         continue  # Skip the footer
...     total += item
>>> print(total)
300

---
## locate
```python
from more import locate
```

Yield the index of each item in *iterable* for which *pred* returns
``True``.

*pred* defaults to :func:`bool`, which will select truthy items:

    >>> list(locate([0, 1, 1, 0, 1, 0, 0]))
    [1, 2, 4]

Set *pred* to a custom function to, e.g., find the indexes for a particular
item.

    >>> list(locate(['a', 'b', 'c', 'b'], lambda x: x == 'b'))
    [1, 3]

If *window_size* is given, then the *pred* function will be called with
that many items. This enables searching for sub-sequences:

    >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
    >>> pred = lambda *args: args == (1, 2, 3)
    >>> list(locate(iterable, pred=pred, window_size=3))
    [1, 5, 9]

Use with :func:`seekable` to find indexes and then retrieve the associated
items:

    >>> from itertools import count
    >>> from more_itertools import seekable
    >>> source = (3 * n + 1 if (n % 2) else n // 2 for n in count())
    >>> it = seekable(source)
    >>> pred = lambda x: x > 100
    >>> indexes = locate(it, pred=pred)
    >>> i = next(indexes)
    >>> it.seek(i)
    >>> next(it)
    106

---
## longest_common_prefix
```python
from more import longest_common_prefix
```

Yield elements of the longest common prefix amongst given *iterables*.

>>> ''.join(longest_common_prefix(['abcd', 'abc', 'abf']))
'ab'

---
## lstrip
```python
from more import lstrip
```

Yield the items from *iterable*, but strip any from the beginning
for which *pred* returns ``True``.

For example, to remove a set of items from the start of an iterable:

    >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
    >>> pred = lambda x: x in {None, False, ''}
    >>> list(lstrip(iterable, pred))
    [1, 2, None, 3, False, None]

This function is analogous to to :func:`str.lstrip`, and is essentially
an wrapper for :func:`itertools.dropwhile`.

---
## rstrip
```python
from more import rstrip
```

Yield the items from *iterable*, but strip any from the end
for which *pred* returns ``True``.

For example, to remove a set of items from the end of an iterable:

    >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
    >>> pred = lambda x: x in {None, False, ''}
    >>> list(rstrip(iterable, pred))
    [None, False, None, 1, 2, None, 3]

This function is analogous to :func:`str.rstrip`.

---
## strip
```python
from more import strip
```

Yield the items from *iterable*, but strip any from the
beginning and end for which *pred* returns ``True``.

For example, to remove a set of items from both ends of an iterable:

    >>> iterable = (None, False, None, 1, 2, None, 3, False, None)
    >>> pred = lambda x: x in {None, False, ''}
    >>> list(strip(iterable, pred))
    [1, 2, None, 3]

This function is analogous to :func:`str.strip`.

---
## islice_extended
```python
from more import islice_extended
```

An extension of :func:`itertools.islice` that supports negative values
for *stop*, *start*, and *step*.

    >>> iterable = iter('abcdefgh')
    >>> list(islice_extended(iterable, -4, -1))
    ['e', 'f', 'g']

Slices with negative values require some caching of *iterable*, but this
function takes care to minimize the amount of memory required.

For example, you can use a negative step with an infinite iterator:

    >>> from itertools import count
    >>> list(islice_extended(count(), 110, 99, -2))
    [110, 108, 106, 104, 102, 100]

You can also use slice notation directly:

    >>> iterable = map(str, count())
    >>> it = islice_extended(iterable)[10:20:2]
    >>> list(it)
    ['10', '12', '14', '16', '18']

---
## _islice_helper
```python
from more import _islice_helper
```



---
## always_reversible
```python
from more import always_reversible
```

An extension of :func:`reversed` that supports all iterables, not
just those which implement the ``Reversible`` or ``Sequence`` protocols.

    >>> print(*always_reversible(x for x in range(3)))
    2 1 0

If the iterable is already reversible, this function returns the
result of :func:`reversed()`. If the iterable is not reversible,
this function will cache the remaining items in the iterable and
yield them in reverse order, which may require significant storage.

---
## consecutive_groups
```python
from more import consecutive_groups
```

Yield groups of consecutive items using :func:`itertools.groupby`.
The *ordering* function determines whether two items are adjacent by
returning their position.

By default, the ordering function is the identity function. This is
suitable for finding runs of numbers:

    >>> iterable = [1, 10, 11, 12, 20, 30, 31, 32, 33, 40]
    >>> for group in consecutive_groups(iterable):
    ...     print(list(group))
    [1]
    [10, 11, 12]
    [20]
    [30, 31, 32, 33]
    [40]

For finding runs of adjacent letters, try using the :meth:`index` method
of a string of letters:

    >>> from string import ascii_lowercase
    >>> iterable = 'abcdfgilmnop'
    >>> ordering = ascii_lowercase.index
    >>> for group in consecutive_groups(iterable, ordering):
    ...     print(list(group))
    ['a', 'b', 'c', 'd']
    ['f', 'g']
    ['i']
    ['l', 'm', 'n', 'o', 'p']

Each group of consecutive items is an iterator that shares it source with
*iterable*. When an an output group is advanced, the previous group is
no longer available unless its elements are copied (e.g., into a ``list``).

    >>> iterable = [1, 2, 11, 12, 21, 22]
    >>> saved_groups = []
    >>> for group in consecutive_groups(iterable):
    ...     saved_groups.append(list(group))  # Copy group elements
    >>> saved_groups
    [[1, 2], [11, 12], [21, 22]]

---
## difference
```python
from more import difference
```

This function is the inverse of :func:`itertools.accumulate`. By default
it will compute the first difference of *iterable* using
:func:`operator.sub`:

    >>> from itertools import accumulate
    >>> iterable = accumulate([0, 1, 2, 3, 4])  # produces 0, 1, 3, 6, 10
    >>> list(difference(iterable))
    [0, 1, 2, 3, 4]

*func* defaults to :func:`operator.sub`, but other functions can be
specified. They will be applied as follows::

    A, B, C, D, ... --> A, func(B, A), func(C, B), func(D, C), ...

For example, to do progressive division:

    >>> iterable = [1, 2, 6, 24, 120]
    >>> func = lambda x, y: x // y
    >>> list(difference(iterable, func))
    [1, 2, 3, 4, 5]

If the *initial* keyword is set, the first element will be skipped when
computing successive differences.

    >>> it = [10, 11, 13, 16]  # from accumulate([1, 2, 3], initial=10)
    >>> list(difference(it, initial=10))
    [1, 2, 3]

---
## SequenceView
```python
from more import SequenceView
```

Return a read-only view of the sequence object *target*.

:class:`SequenceView` objects are analogous to Python's built-in
"dictionary view" types. They provide a dynamic view of a sequence's items,
meaning that when the sequence updates, so does the view.

    >>> seq = ['0', '1', '2']
    >>> view = SequenceView(seq)
    >>> view
    SequenceView(['0', '1', '2'])
    >>> seq.append('3')
    >>> view
    SequenceView(['0', '1', '2', '3'])

Sequence views support indexing, slicing, and length queries. They act
like the underlying sequence, except they don't allow assignment:

    >>> view[1]
    '1'
    >>> view[1:-1]
    ['1', '2']
    >>> len(view)
    4

Sequence views are useful as an alternative to copying, as they don't
require (much) extra storage.

---
## seekable
```python
from more import seekable
```

Wrap an iterator to allow for seeking backward and forward. This
progressively caches the items in the source iterable so they can be
re-visited.

Call :meth:`seek` with an index to seek to that position in the source
iterable.

To "reset" an iterator, seek to ``0``:

    >>> from itertools import count
    >>> it = seekable((str(n) for n in count()))
    >>> next(it), next(it), next(it)
    ('0', '1', '2')
    >>> it.seek(0)
    >>> next(it), next(it), next(it)
    ('0', '1', '2')

You can also seek forward:

    >>> it = seekable((str(n) for n in range(20)))
    >>> it.seek(10)
    >>> next(it)
    '10'
    >>> it.seek(20)  # Seeking past the end of the source isn't a problem
    >>> list(it)
    []
    >>> it.seek(0)  # Resetting works even after hitting the end
    >>> next(it)
    '0'

Call :meth:`relative_seek` to seek relative to the source iterator's
current position.

    >>> it = seekable((str(n) for n in range(20)))
    >>> next(it), next(it), next(it)
    ('0', '1', '2')
    >>> it.relative_seek(2)
    >>> next(it)
    '5'
    >>> it.relative_seek(-3)  # Source is at '6', we move back to '3'
    >>> next(it)
    '3'
    >>> it.relative_seek(-3)  # Source is at '4', we move back to '1'
    >>> next(it)
    '1'


Call :meth:`peek` to look ahead one item without advancing the iterator:

    >>> it = seekable('1234')
    >>> it.peek()
    '1'
    >>> list(it)
    ['1', '2', '3', '4']
    >>> it.peek(default='empty')
    'empty'

Before the iterator is at its end, calling :func:`bool` on it will return
``True``. After it will return ``False``:

    >>> it = seekable('5678')
    >>> bool(it)
    True
    >>> list(it)
    ['5', '6', '7', '8']
    >>> bool(it)
    False

You may view the contents of the cache with the :meth:`elements` method.
That returns a :class:`SequenceView`, a view that updates automatically:

    >>> it = seekable((str(n) for n in range(10)))
    >>> next(it), next(it), next(it)
    ('0', '1', '2')
    >>> elements = it.elements()
    >>> elements
    SequenceView(['0', '1', '2'])
    >>> next(it)
    '3'
    >>> elements
    SequenceView(['0', '1', '2', '3'])

By default, the cache grows as the source iterable progresses, so beware of
wrapping very large or infinite iterables. Supply *maxlen* to limit the
size of the cache (this of course limits how far back you can seek).

    >>> from itertools import count
    >>> it = seekable((str(n) for n in count()), maxlen=2)
    >>> next(it), next(it), next(it), next(it)
    ('0', '1', '2', '3')
    >>> list(it.elements())
    ['2', '3']
    >>> it.seek(0)
    >>> next(it), next(it), next(it), next(it)
    ('2', '3', '4', '5')
    >>> next(it)
    '6'

---
## run_length
```python
from more import run_length
```

:func:`run_length.encode` compresses an iterable with run-length encoding.
It yields groups of repeated items with the count of how many times they
were repeated:

    >>> uncompressed = 'abbcccdddd'
    >>> list(run_length.encode(uncompressed))
    [('a', 1), ('b', 2), ('c', 3), ('d', 4)]

:func:`run_length.decode` decompresses an iterable that was previously
compressed with run-length encoding. It yields the items of the
decompressed iterable:

    >>> compressed = [('a', 1), ('b', 2), ('c', 3), ('d', 4)]
    >>> list(run_length.decode(compressed))
    ['a', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd']

---
## exactly_n
```python
from more import exactly_n
```

Return ``True`` if exactly ``n`` items in the iterable are ``True``
according to the *predicate* function.

    >>> exactly_n([True, True, False], 2)
    True
    >>> exactly_n([True, True, False], 1)
    False
    >>> exactly_n([0, 1, 2, 3, 4, 5], 3, lambda x: x < 3)
    True

The iterable will be advanced until ``n + 1`` truthy items are encountered,
so avoid calling it on infinite iterables.

---
## circular_shifts
```python
from more import circular_shifts
```

Yield the circular shifts of *iterable*.

>>> list(circular_shifts(range(4)))
[(0, 1, 2, 3), (1, 2, 3, 0), (2, 3, 0, 1), (3, 0, 1, 2)]

Set *steps* to the number of places to rotate to the left
(or to the right if negative).  Defaults to 1.

>>> list(circular_shifts(range(4), 2))
[(0, 1, 2, 3), (2, 3, 0, 1)]

>>> list(circular_shifts(range(4), -1))
[(0, 1, 2, 3), (3, 0, 1, 2), (2, 3, 0, 1), (1, 2, 3, 0)]

---
## make_decorator
```python
from more import make_decorator
```

Return a decorator version of *wrapping_func*, which is a function that
modifies an iterable. *result_index* is the position in that function's
signature where the iterable goes.

This lets you use itertools on the "production end," i.e. at function
definition. This can augment what the function returns without changing the
function's code.

For example, to produce a decorator version of :func:`chunked`:

    >>> from more_itertools import chunked
    >>> chunker = make_decorator(chunked, result_index=0)
    >>> @chunker(3)
    ... def iter_range(n):
    ...     return iter(range(n))
    ...
    >>> list(iter_range(9))
    [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

To only allow truthy items to be returned:

    >>> truth_serum = make_decorator(filter, result_index=1)
    >>> @truth_serum(bool)
    ... def boolean_test():
    ...     return [0, 1, '', ' ', False, True]
    ...
    >>> list(boolean_test())
    [1, ' ', True]

The :func:`peekable` and :func:`seekable` wrappers make for practical
decorators:

    >>> from more_itertools import peekable
    >>> peekable_function = make_decorator(peekable)
    >>> @peekable_function()
    ... def str_range(*args):
    ...     return (str(x) for x in range(*args))
    ...
    >>> it = str_range(1, 20, 2)
    >>> next(it), next(it), next(it)
    ('1', '3', '5')
    >>> it.peek()
    '7'
    >>> next(it)
    '7'

---
## map_reduce
```python
from more import map_reduce
```

Return a dictionary that maps the items in *iterable* to categories
defined by *keyfunc*, transforms them with *valuefunc*, and
then summarizes them by category with *reducefunc*.

*valuefunc* defaults to the identity function if it is unspecified.
If *reducefunc* is unspecified, no summarization takes place:

    >>> keyfunc = lambda x: x.upper()
    >>> result = map_reduce('abbccc', keyfunc)
    >>> sorted(result.items())
    [('A', ['a']), ('B', ['b', 'b']), ('C', ['c', 'c', 'c'])]

Specifying *valuefunc* transforms the categorized items:

    >>> keyfunc = lambda x: x.upper()
    >>> valuefunc = lambda x: 1
    >>> result = map_reduce('abbccc', keyfunc, valuefunc)
    >>> sorted(result.items())
    [('A', [1]), ('B', [1, 1]), ('C', [1, 1, 1])]

Specifying *reducefunc* summarizes the categorized items:

    >>> keyfunc = lambda x: x.upper()
    >>> valuefunc = lambda x: 1
    >>> reducefunc = sum
    >>> result = map_reduce('abbccc', keyfunc, valuefunc, reducefunc)
    >>> sorted(result.items())
    [('A', 1), ('B', 2), ('C', 3)]

You may want to filter the input iterable before applying the map/reduce
procedure:

    >>> all_items = range(30)
    >>> items = [x for x in all_items if 10 <= x <= 20]  # Filter
    >>> keyfunc = lambda x: x % 2  # Evens map to 0; odds to 1
    >>> categories = map_reduce(items, keyfunc=keyfunc)
    >>> sorted(categories.items())
    [(0, [10, 12, 14, 16, 18, 20]), (1, [11, 13, 15, 17, 19])]
    >>> summaries = map_reduce(items, keyfunc=keyfunc, reducefunc=sum)
    >>> sorted(summaries.items())
    [(0, 90), (1, 75)]

Note that all items in the iterable are gathered into a list before the
summarization step, which may require significant storage.

The returned object is a :obj:`collections.defaultdict` with the
``default_factory`` set to ``None``, such that it behaves like a normal
dictionary.

---
## rlocate
```python
from more import rlocate
```

Yield the index of each item in *iterable* for which *pred* returns
``True``, starting from the right and moving left.

*pred* defaults to :func:`bool`, which will select truthy items:

    >>> list(rlocate([0, 1, 1, 0, 1, 0, 0]))  # Truthy at 1, 2, and 4
    [4, 2, 1]

Set *pred* to a custom function to, e.g., find the indexes for a particular
item:

    >>> iterable = iter('abcb')
    >>> pred = lambda x: x == 'b'
    >>> list(rlocate(iterable, pred))
    [3, 1]

If *window_size* is given, then the *pred* function will be called with
that many items. This enables searching for sub-sequences:

    >>> iterable = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
    >>> pred = lambda *args: args == (1, 2, 3)
    >>> list(rlocate(iterable, pred=pred, window_size=3))
    [9, 5, 1]

Beware, this function won't return anything for infinite iterables.
If *iterable* is reversible, ``rlocate`` will reverse it and search from
the right. Otherwise, it will search from the left and return the results
in reverse order.

See :func:`locate` to for other example applications.

---
## replace
```python
from more import replace
```

Yield the items from *iterable*, replacing the items for which *pred*
returns ``True`` with the items from the iterable *substitutes*.

    >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1]
    >>> pred = lambda x: x == 0
    >>> substitutes = (2, 3)
    >>> list(replace(iterable, pred, substitutes))
    [1, 1, 2, 3, 1, 1, 2, 3, 1, 1]

If *count* is given, the number of replacements will be limited:

    >>> iterable = [1, 1, 0, 1, 1, 0, 1, 1, 0]
    >>> pred = lambda x: x == 0
    >>> substitutes = [None]
    >>> list(replace(iterable, pred, substitutes, count=2))
    [1, 1, None, 1, 1, None, 1, 1, 0]

Use *window_size* to control the number of items passed as arguments to
*pred*. This allows for locating and replacing subsequences.

    >>> iterable = [0, 1, 2, 5, 0, 1, 2, 5]
    >>> window_size = 3
    >>> pred = lambda *args: args == (0, 1, 2)  # 3 items passed to pred
    >>> substitutes = [3, 4] # Splice in these items
    >>> list(replace(iterable, pred, substitutes, window_size=window_size))
    [3, 4, 5, 3, 4, 5]

---
## partitions
```python
from more import partitions
```

Yield all possible order-preserving partitions of *iterable*.

>>> iterable = 'abc'
>>> for part in partitions(iterable):
...     print([''.join(p) for p in part])
['abc']
['a', 'bc']
['ab', 'c']
['a', 'b', 'c']

This is unrelated to :func:`partition`.

---
## set_partitions
```python
from more import set_partitions
```

Yield the set partitions of *iterable* into *k* parts. Set partitions are
not order-preserving.

>>> iterable = 'abc'
>>> for part in set_partitions(iterable, 2):
...     print([''.join(p) for p in part])
['a', 'bc']
['ab', 'c']
['b', 'ac']


If *k* is not given, every set partition is generated.

>>> iterable = 'abc'
>>> for part in set_partitions(iterable):
...     print([''.join(p) for p in part])
['abc']
['a', 'bc']
['ab', 'c']
['b', 'ac']
['a', 'b', 'c']

if *min_size* and/or *max_size* are given, the minimum and/or maximum size
per block in partition is set.

>>> iterable = 'abc'
>>> for part in set_partitions(iterable, min_size=2):
...     print([''.join(p) for p in part])
['abc']
>>> for part in set_partitions(iterable, max_size=2):
...     print([''.join(p) for p in part])
['a', 'bc']
['ab', 'c']
['b', 'ac']
['a', 'b', 'c']

---
## time_limited
```python
from more import time_limited
```

Yield items from *iterable* until *limit_seconds* have passed.
If the time limit expires before all items have been yielded, the
``timed_out`` parameter will be set to ``True``.

>>> from time import sleep
>>> def generator():
...     yield 1
...     yield 2
...     sleep(0.2)
...     yield 3
>>> iterable = time_limited(0.1, generator())
>>> list(iterable)
[1, 2]
>>> iterable.timed_out
True

Note that the time is checked before each item is yielded, and iteration
stops if  the time elapsed is greater than *limit_seconds*. If your time
limit is 1 second, but it takes 2 seconds to generate the first item from
the iterable, the function will run for 2 seconds and not yield anything.
As a special case, when *limit_seconds* is zero, the iterator never
returns anything.

---
## only
```python
from more import only
```

If *iterable* has only one item, return it.
If it has zero items, return *default*.
If it has more than one item, raise the exception given by *too_long*,
which is ``ValueError`` by default.

>>> only([], default='missing')
'missing'
>>> only([1])
1
>>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ValueError: Expected exactly one item in iterable, but got 1, 2,
 and perhaps more.'
>>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TypeError

Note that :func:`only` attempts to advance *iterable* twice to ensure there
is only one item.  See :func:`spy` or :func:`peekable` to check
iterable contents less destructively.

---
## _ichunk
```python
from more import _ichunk
```



---
## ichunked
```python
from more import ichunked
```

Break *iterable* into sub-iterables with *n* elements each.
:func:`ichunked` is like :func:`chunked`, but it yields iterables
instead of lists.

If the sub-iterables are read in order, the elements of *iterable*
won't be stored in memory.
If they are read out of order, :func:`itertools.tee` is used to cache
elements as necessary.

>>> from itertools import count
>>> all_chunks = ichunked(count(), 4)
>>> c_1, c_2, c_3 = next(all_chunks), next(all_chunks), next(all_chunks)
>>> list(c_2)  # c_1's elements have been cached; c_3's haven't been
[4, 5, 6, 7]
>>> list(c_1)
[0, 1, 2, 3]
>>> list(c_3)
[8, 9, 10, 11]

---
## iequals
```python
from more import iequals
```

Return ``True`` if all given *iterables* are equal to each other,
which means that they contain the same elements in the same order.

The function is useful for comparing iterables of different data types
or iterables that do not support equality checks.

>>> iequals("abc", ['a', 'b', 'c'], ('a', 'b', 'c'), iter("abc"))
True

>>> iequals("abc", "acb")
False

Not to be confused with :func:`all_equal`, which checks whether all
elements of iterable are equal to each other.

---
## distinct_combinations
```python
from more import distinct_combinations
```

Yield the distinct combinations of *r* items taken from *iterable*.

    >>> list(distinct_combinations([0, 0, 1], 2))
    [(0, 0), (0, 1)]

Equivalent to ``set(combinations(iterable))``, except duplicates are not
generated and thrown away. For larger input sequences this is much more
efficient.

---
## filter_except
```python
from more import filter_except
```

Yield the items from *iterable* for which the *validator* function does
not raise one of the specified *exceptions*.

*validator* is called for each item in *iterable*.
It should be a function that accepts one argument and raises an exception
if that item is not valid.

>>> iterable = ['1', '2', 'three', '4', None]
>>> list(filter_except(int, iterable, ValueError, TypeError))
['1', '2', '4']

If an exception other than one given by *exceptions* is raised by
*validator*, it is raised like normal.

---
## map_except
```python
from more import map_except
```

Transform each item from *iterable* with *function* and yield the
result, unless *function* raises one of the specified *exceptions*.

*function* is called to transform each item in *iterable*.
It should accept one argument.

>>> iterable = ['1', '2', 'three', '4', None]
>>> list(map_except(int, iterable, ValueError, TypeError))
[1, 2, 4]

If an exception other than one given by *exceptions* is raised by
*function*, it is raised like normal.

---
## map_if
```python
from more import map_if
```

Evaluate each item from *iterable* using *pred*. If the result is
equivalent to ``True``, transform the item with *func* and yield it.
Otherwise, transform the item with *func_else* and yield it.

*pred*, *func*, and *func_else* should each be functions that accept
one argument. By default, *func_else* is the identity function.

>>> from math import sqrt
>>> iterable = list(range(-5, 5))
>>> iterable
[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4]
>>> list(map_if(iterable, lambda x: x > 3, lambda x: 'toobig'))
[-5, -4, -3, -2, -1, 0, 1, 2, 3, 'toobig']
>>> list(map_if(iterable, lambda x: x >= 0,
... lambda x: f'{sqrt(x):.2f}', lambda x: None))
[None, None, None, None, None, '0.00', '1.00', '1.41', '1.73', '2.00']

---
## _sample_unweighted
```python
from more import _sample_unweighted
```



---
## _sample_weighted
```python
from more import _sample_weighted
```



---
## _sample_counted
```python
from more import _sample_counted
```



---
## sample
```python
from more import sample
```

Return a *k*-length list of elements chosen (without replacement)
from the *iterable*. Similar to :func:`random.sample`, but works on
iterables of unknown length.

>>> iterable = range(100)
>>> sample(iterable, 5)  # doctest: +SKIP
[81, 60, 96, 16, 4]

For iterables with repeated elements, you may supply *counts* to
indicate the repeats.

>>> iterable = ['a', 'b']
>>> counts = [3, 4]  # Equivalent to 'a', 'a', 'a', 'b', 'b', 'b', 'b'
>>> sample(iterable, k=3, counts=counts)  # doctest: +SKIP
['a', 'a', 'b']

An iterable with *weights* may be given:

>>> iterable = range(100)
>>> weights = (i * i + 1 for i in range(100))
>>> sampled = sample(iterable, 5, weights=weights)  # doctest: +SKIP
[79, 67, 74, 66, 78]

Weighted selections are made without replacement.
After an element is selected, it is removed from the pool and the
relative weights of the other elements increase (this
does not match the behavior of :func:`random.sample`'s *counts*
parameter). Note that *weights* may not be used with *counts*.

If the length of *iterable* is less than *k*,
``ValueError`` is raised if *strict* is ``True`` and
all elements are returned (in shuffled order) if *strict* is ``False``.

By default, the `Algorithm L <https://w.wiki/ANrM>`__ reservoir sampling
technique is used. When *weights* are provided,
`Algorithm A-ExpJ <https://w.wiki/ANrS>`__ is used.

---
## is_sorted
```python
from more import is_sorted
```

Returns ``True`` if the items of iterable are in sorted order, and
``False`` otherwise. *key* and *reverse* have the same meaning that they do
in the built-in :func:`sorted` function.

>>> is_sorted(['1', '2', '3', '4', '5'], key=int)
True
>>> is_sorted([5, 4, 3, 1, 2], reverse=True)
False

If *strict*, tests for strict sorting, that is, returns ``False`` if equal
elements are found:

>>> is_sorted([1, 2, 2])
True
>>> is_sorted([1, 2, 2], strict=True)
False

The function returns ``False`` after encountering the first out-of-order
item, which means it may produce results that differ from the built-in
:func:`sorted` function for objects with unusual comparison dynamics.
If there are no out-of-order items, the iterable is exhausted.

---
## AbortThread
```python
from more import AbortThread
```



---
## callback_iter
```python
from more import callback_iter
```

Convert a function that uses callbacks to an iterator.

Let *func* be a function that takes a `callback` keyword argument.
For example:

>>> def func(callback=None):
...     for i, c in [(1, 'a'), (2, 'b'), (3, 'c')]:
...         if callback:
...             callback(i, c)
...     return 4


Use ``with callback_iter(func)`` to get an iterator over the parameters
that are delivered to the callback.

>>> with callback_iter(func) as it:
...     for args, kwargs in it:
...         print(args)
(1, 'a')
(2, 'b')
(3, 'c')

The function will be called in a background thread. The ``done`` property
indicates whether it has completed execution.

>>> it.done
True

If it completes successfully, its return value will be available
in the ``result`` property.

>>> it.result
4

Notes:

* If the function uses some keyword argument besides ``callback``, supply
  *callback_kwd*.
* If it finished executing, but raised an exception, accessing the
  ``result`` property will raise the same exception.
* If it hasn't finished executing, accessing the ``result``
  property from within the ``with`` block will raise ``RuntimeError``.
* If it hasn't finished executing, accessing the ``result`` property from
  outside the ``with`` block will raise a
  ``more_itertools.AbortThread`` exception.
* Provide *wait_seconds* to adjust how frequently the it is polled for
  output.

---
## windowed_complete
```python
from more import windowed_complete
```

Yield ``(beginning, middle, end)`` tuples, where:

* Each ``middle`` has *n* items from *iterable*
* Each ``beginning`` has the items before the ones in ``middle``
* Each ``end`` has the items after the ones in ``middle``

>>> iterable = range(7)
>>> n = 3
>>> for beginning, middle, end in windowed_complete(iterable, n):
...     print(beginning, middle, end)
() (0, 1, 2) (3, 4, 5, 6)
(0,) (1, 2, 3) (4, 5, 6)
(0, 1) (2, 3, 4) (5, 6)
(0, 1, 2) (3, 4, 5) (6,)
(0, 1, 2, 3) (4, 5, 6) ()

Note that *n* must be at least 0 and most equal to the length of
*iterable*.

This function will exhaust the iterable and may require significant
storage.

---
## all_unique
```python
from more import all_unique
```

Returns ``True`` if all the elements of *iterable* are unique (no two
elements are equal).

    >>> all_unique('ABCB')
    False

If a *key* function is specified, it will be used to make comparisons.

    >>> all_unique('ABCb')
    True
    >>> all_unique('ABCb', str.lower)
    False

The function returns as soon as the first non-unique element is
encountered. Iterables with a mix of hashable and unhashable items can
be used, but the function will be slower for unhashable items.

---
## nth_product
```python
from more import nth_product
```

Equivalent to ``list(product(*args))[index]``.

The products of *args* can be ordered lexicographically.
:func:`nth_product` computes the product at sort position *index* without
computing the previous products.

    >>> nth_product(8, range(2), range(2), range(2), range(2))
    (1, 0, 0, 0)

``IndexError`` will be raised if the given *index* is invalid.

---
## nth_permutation
```python
from more import nth_permutation
```

Equivalent to ``list(permutations(iterable, r))[index]```

The subsequences of *iterable* that are of length *r* where order is
important can be ordered lexicographically. :func:`nth_permutation`
computes the subsequence at sort position *index* directly, without
computing the previous subsequences.

    >>> nth_permutation('ghijk', 2, 5)
    ('h', 'i')

``ValueError`` will be raised If *r* is negative or greater than the length
of *iterable*.
``IndexError`` will be raised if the given *index* is invalid.

---
## nth_combination_with_replacement
```python
from more import nth_combination_with_replacement
```

Equivalent to
``list(combinations_with_replacement(iterable, r))[index]``.


The subsequences with repetition of *iterable* that are of length *r* can
be ordered lexicographically. :func:`nth_combination_with_replacement`
computes the subsequence at sort position *index* directly, without
computing the previous subsequences with replacement.

    >>> nth_combination_with_replacement(range(5), 3, 5)
    (0, 1, 1)

``ValueError`` will be raised If *r* is negative or greater than the length
of *iterable*.
``IndexError`` will be raised if the given *index* is invalid.

---
## value_chain
```python
from more import value_chain
```

Yield all arguments passed to the function in the same order in which
they were passed. If an argument itself is iterable then iterate over its
values.

    >>> list(value_chain(1, 2, 3, [4, 5, 6]))
    [1, 2, 3, 4, 5, 6]

Binary and text strings are not considered iterable and are emitted
as-is:

    >>> list(value_chain('12', '34', ['56', '78']))
    ['12', '34', '56', '78']

Pre- or postpend a single element to an iterable:

    >>> list(value_chain(1, [2, 3, 4, 5, 6]))
    [1, 2, 3, 4, 5, 6]
    >>> list(value_chain([1, 2, 3, 4, 5], 6))
    [1, 2, 3, 4, 5, 6]

Multiple levels of nesting are not flattened.

---
## product_index
```python
from more import product_index
```

Equivalent to ``list(product(*args)).index(element)``

The products of *args* can be ordered lexicographically.
:func:`product_index` computes the first index of *element* without
computing the previous products.

    >>> product_index([8, 2], range(10), range(5))
    42

``ValueError`` will be raised if the given *element* isn't in the product
of *args*.

---
## combination_index
```python
from more import combination_index
```

Equivalent to ``list(combinations(iterable, r)).index(element)``

The subsequences of *iterable* that are of length *r* can be ordered
lexicographically. :func:`combination_index` computes the index of the
first *element*, without computing the previous combinations.

    >>> combination_index('adf', 'abcdefg')
    10

``ValueError`` will be raised if the given *element* isn't one of the
combinations of *iterable*.

---
## combination_with_replacement_index
```python
from more import combination_with_replacement_index
```

Equivalent to
``list(combinations_with_replacement(iterable, r)).index(element)``

The subsequences with repetition of *iterable* that are of length *r* can
be ordered lexicographically. :func:`combination_with_replacement_index`
computes the index of the first *element*, without computing the previous
combinations with replacement.

    >>> combination_with_replacement_index('adf', 'abcdefg')
    20

``ValueError`` will be raised if the given *element* isn't one of the
combinations with replacement of *iterable*.

---
## permutation_index
```python
from more import permutation_index
```

Equivalent to ``list(permutations(iterable, r)).index(element)```

The subsequences of *iterable* that are of length *r* where order is
important can be ordered lexicographically. :func:`permutation_index`
computes the index of the first *element* directly, without computing
the previous permutations.

    >>> permutation_index([1, 3, 2], range(5))
    19

``ValueError`` will be raised if the given *element* isn't one of the
permutations of *iterable*.

---
## countable
```python
from more import countable
```

Wrap *iterable* and keep a count of how many items have been consumed.

The ``items_seen`` attribute starts at ``0`` and increments as the iterable
is consumed:

    >>> iterable = map(str, range(10))
    >>> it = countable(iterable)
    >>> it.items_seen
    0
    >>> next(it), next(it)
    ('0', '1')
    >>> list(it)
    ['2', '3', '4', '5', '6', '7', '8', '9']
    >>> it.items_seen
    10

---
## chunked_even
```python
from more import chunked_even
```

Break *iterable* into lists of approximately length *n*.
Items are distributed such the lengths of the lists differ by at most
1 item.

>>> iterable = [1, 2, 3, 4, 5, 6, 7]
>>> n = 3
>>> list(chunked_even(iterable, n))  # List lengths: 3, 2, 2
[[1, 2, 3], [4, 5], [6, 7]]
>>> list(chunked(iterable, n))  # List lengths: 3, 3, 1
[[1, 2, 3], [4, 5, 6], [7]]

---
## zip_broadcast
```python
from more import zip_broadcast
```

A version of :func:`zip` that "broadcasts" any scalar
(i.e., non-iterable) items into output tuples.

>>> iterable_1 = [1, 2, 3]
>>> iterable_2 = ['a', 'b', 'c']
>>> scalar = '_'
>>> list(zip_broadcast(iterable_1, iterable_2, scalar))
[(1, 'a', '_'), (2, 'b', '_'), (3, 'c', '_')]

The *scalar_types* keyword argument determines what types are considered
scalar. It is set to ``(str, bytes)`` by default. Set it to ``None`` to
treat strings and byte strings as iterable:

>>> list(zip_broadcast('abc', 0, 'xyz', scalar_types=None))
[('a', 0, 'x'), ('b', 0, 'y'), ('c', 0, 'z')]

If the *strict* keyword argument is ``True``, then
``UnequalIterablesError`` will be raised if any of the iterables have
different lengths.

---
## unique_in_window
```python
from more import unique_in_window
```

Yield the items from *iterable* that haven't been seen recently.
*n* is the size of the lookback window.

    >>> iterable = [0, 1, 0, 2, 3, 0]
    >>> n = 3
    >>> list(unique_in_window(iterable, n))
    [0, 1, 2, 3, 0]

The *key* function, if provided, will be used to determine uniqueness:

    >>> list(unique_in_window('abAcda', 3, key=lambda x: x.lower()))
    ['a', 'b', 'c', 'd', 'a']

The items in *iterable* must be hashable.

---
## duplicates_everseen
```python
from more import duplicates_everseen
```

Yield duplicate elements after their first appearance.

>>> list(duplicates_everseen('mississippi'))
['s', 'i', 's', 's', 'i', 'p', 'i']
>>> list(duplicates_everseen('AaaBbbCccAaa', str.lower))
['a', 'a', 'b', 'b', 'c', 'c', 'A', 'a', 'a']

This function is analogous to :func:`unique_everseen` and is subject to
the same performance considerations.

---
## duplicates_justseen
```python
from more import duplicates_justseen
```

Yields serially-duplicate elements after their first appearance.

>>> list(duplicates_justseen('mississippi'))
['s', 's', 'p']
>>> list(duplicates_justseen('AaaBbbCccAaa', str.lower))
['a', 'a', 'b', 'b', 'c', 'c', 'a', 'a']

This function is analogous to :func:`unique_justseen`.

---
## classify_unique
```python
from more import classify_unique
```

Classify each element in terms of its uniqueness.

For each element in the input iterable, return a 3-tuple consisting of:

1. The element itself
2. ``False`` if the element is equal to the one preceding it in the input,
   ``True`` otherwise (i.e. the equivalent of :func:`unique_justseen`)
3. ``False`` if this element has been seen anywhere in the input before,
   ``True`` otherwise (i.e. the equivalent of :func:`unique_everseen`)

>>> list(classify_unique('otto'))    # doctest: +NORMALIZE_WHITESPACE
[('o', True,  True),
 ('t', True,  True),
 ('t', False, False),
 ('o', True,  False)]

This function is analogous to :func:`unique_everseen` and is subject to
the same performance considerations.

---
## minmax
```python
from more import minmax
```

Returns both the smallest and largest items in an iterable
or the largest of two or more arguments.

    >>> minmax([3, 1, 5])
    (1, 5)

    >>> minmax(4, 2, 6)
    (2, 6)

If a *key* function is provided, it will be used to transform the input
items for comparison.

    >>> minmax([5, 30], key=str)  # '30' sorts before '5'
    (30, 5)

If a *default* value is provided, it will be returned if there are no
input items.

    >>> minmax([], default=(0, 0))
    (0, 0)

Otherwise ``ValueError`` is raised.

This function is based on the
`recipe <http://code.activestate.com/recipes/577916/>`__ by
Raymond Hettinger and takes care to minimize the number of comparisons
performed.

---
## constrained_batches
```python
from more import constrained_batches
```

Yield batches of items from *iterable* with a combined size limited by
*max_size*.

>>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
>>> list(constrained_batches(iterable, 10))
[(b'12345', b'123'), (b'12345678', b'1', b'1'), (b'12', b'1')]

If a *max_count* is supplied, the number of items per batch is also
limited:

>>> iterable = [b'12345', b'123', b'12345678', b'1', b'1', b'12', b'1']
>>> list(constrained_batches(iterable, 10, max_count = 2))
[(b'12345', b'123'), (b'12345678', b'1'), (b'1', b'12'), (b'1',)]

If a *get_len* function is supplied, use that instead of :func:`len` to
determine item size.

If *strict* is ``True``, raise ``ValueError`` if any single item is bigger
than *max_size*. Otherwise, allow single items to exceed *max_size*.

---
## gray_product
```python
from more import gray_product
```

Like :func:`itertools.product`, but return tuples in an order such
that only one element in the generated tuple changes from one iteration
to the next.

    >>> list(gray_product('AB','CD'))
    [('A', 'C'), ('B', 'C'), ('B', 'D'), ('A', 'D')]

This function consumes all of the input iterables before producing output.
If any of the input iterables have fewer than two items, ``ValueError``
is raised.

For information on the algorithm, see
`this section <https://www-cs-faculty.stanford.edu/~knuth/fasc2a.ps.gz>`__
of Donald Knuth's *The Art of Computer Programming*.

---
## partial_product
```python
from more import partial_product
```

Yields tuples containing one item from each iterator, with subsequent
tuples changing a single item at a time by advancing each iterator until it
is exhausted. This sequence guarantees every value in each iterable is
output at least once without generating all possible combinations.

This may be useful, for example, when testing an expensive function.

    >>> list(partial_product('AB', 'C', 'DEF'))
    [('A', 'C', 'D'), ('B', 'C', 'D'), ('B', 'C', 'E'), ('B', 'C', 'F')]

---
## takewhile_inclusive
```python
from more import takewhile_inclusive
```

A variant of :func:`takewhile` that yields one additional element.

    >>> list(takewhile_inclusive(lambda x: x < 5, [1, 4, 6, 4, 1]))
    [1, 4, 6]

:func:`takewhile` would return ``[1, 4]``.

---
## outer_product
```python
from more import outer_product
```

A generalized outer product that applies a binary function to all
pairs of items. Returns a 2D matrix with ``len(xs)`` rows and ``len(ys)``
columns.
Also accepts ``*args`` and ``**kwargs`` that are passed to ``func``.

Multiplication table:

>>> list(outer_product(mul, range(1, 4), range(1, 6)))
[(1, 2, 3, 4, 5), (2, 4, 6, 8, 10), (3, 6, 9, 12, 15)]

Cross tabulation:

>>> xs = ['A', 'B', 'A', 'A', 'B', 'B', 'A', 'A', 'B', 'B']
>>> ys = ['X', 'X', 'X', 'Y', 'Z', 'Z', 'Y', 'Y', 'Z', 'Z']
>>> rows = list(zip(xs, ys))
>>> count_rows = lambda x, y: rows.count((x, y))
>>> list(outer_product(count_rows, sorted(set(xs)), sorted(set(ys))))
[(2, 3, 0), (1, 0, 4)]

Usage with ``*args`` and ``**kwargs``:

>>> animals = ['cat', 'wolf', 'mouse']
>>> list(outer_product(min, animals, animals, key=len))
[('cat', 'cat', 'cat'), ('cat', 'wolf', 'wolf'), ('cat', 'wolf', 'mouse')]

---
## iter_suppress
```python
from more import iter_suppress
```

Yield each of the items from *iterable*. If the iteration raises one of
the specified *exceptions*, that exception will be suppressed and iteration
will stop.

>>> from itertools import chain
>>> def breaks_at_five(x):
...     while True:
...         if x >= 5:
...             raise RuntimeError
...         yield x
...         x += 1
>>> it_1 = iter_suppress(breaks_at_five(1), RuntimeError)
>>> it_2 = iter_suppress(breaks_at_five(2), RuntimeError)
>>> list(chain(it_1, it_2))
[1, 2, 3, 4, 2, 3, 4]

---
## filter_map
```python
from more import filter_map
```

Apply *func* to every element of *iterable*, yielding only those which
are not ``None``.

>>> elems = ['1', 'a', '2', 'b', '3']
>>> list(filter_map(lambda s: int(s) if s.isnumeric() else None, elems))
[1, 2, 3]

---
## powerset_of_sets
```python
from more import powerset_of_sets
```

Yields all possible subsets of the iterable.

    >>> list(powerset_of_sets([1, 2, 3]))  # doctest: +SKIP
    [set(), {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}]
    >>> list(powerset_of_sets([1, 1, 0]))  # doctest: +SKIP
    [set(), {1}, {0}, {0, 1}]

:func:`powerset_of_sets` takes care to minimize the number
of hash operations performed.

---
## join_mappings
```python
from more import join_mappings
```

Joins multiple mappings together using their common keys.

>>> user_scores = {'elliot': 50, 'claris': 60}
>>> user_times = {'elliot': 30, 'claris': 40}
>>> join_mappings(score=user_scores, time=user_times)
{'elliot': {'score': 50, 'time': 30}, 'claris': {'score': 60, 'time': 40}}

---
## _complex_sumprod
```python
from more import _complex_sumprod
```

High precision sumprod() for complex numbers.
Used by :func:`dft` and :func:`idft`.

---
## dft
```python
from more import dft
```

Discrete Fourier Tranform. *xarr* is a sequence of complex numbers.
Yields the components of the corresponding transformed output vector.

>>> import cmath
>>> xarr = [1, 2-1j, -1j, -1+2j]
>>> Xarr = [2, -2-2j, -2j, 4+4j]
>>> all(map(cmath.isclose, dft(xarr), Xarr))
True

See :func:`idft` for the inverse Discrete Fourier Transform.

---
## idft
```python
from more import idft
```

Inverse Discrete Fourier Tranform. *Xarr* is a sequence of
complex numbers. Yields the components of the corresponding
inverse-transformed output vector.

>>> import cmath
>>> xarr = [1, 2-1j, -1j, -1+2j]
>>> Xarr = [2, -2-2j, -2j, 4+4j]
>>> all(map(cmath.isclose, idft(Xarr), xarr))
True

See :func:`dft` for the Discrete Fourier Transform.

---
## doublestarmap
```python
from more import doublestarmap
```

Apply *func* to every item of *iterable* by dictionary unpacking
the item into *func*.

The difference between :func:`itertools.starmap` and :func:`doublestarmap`
parallels the distinction between ``func(*a)`` and ``func(**a)``.

>>> iterable = [{'a': 1, 'b': 2}, {'a': 40, 'b': 60}]
>>> list(doublestarmap(lambda a, b: a + b, iterable))
[3, 100]

``TypeError`` will be raised if *func*'s signature doesn't match the
mapping contained in *iterable* or if *iterable* does not contain mappings.

---
## __init__
```python
from more import __init__
```



---
## __iter__
```python
from more import __iter__
```



---
## __bool__
```python
from more import __bool__
```



---
## peek
```python
from more import peek
```



---
## prepend
```python
from more import prepend
```

Stack up items to be the next ones returned from ``next()`` or
``self.peek()``. The items will be returned in
first in, first out order::

    >>> p = peekable([1, 2, 3])
    >>> p.prepend(10, 11, 12)
    >>> next(p)
    10
    >>> list(p)
    [11, 12, 1, 2, 3]

It is possible, by prepending items, to "resurrect" a peekable that
previously raised ``StopIteration``.

    >>> p = peekable([])
    >>> next(p)
    Traceback (most recent call last):
      ...
    StopIteration
    >>> p.prepend(1)
    >>> next(p)
    1
    >>> next(p)
    Traceback (most recent call last):
      ...
    StopIteration

---
## __next__
```python
from more import __next__
```



---
## _get_slice
```python
from more import _get_slice
```



---
## __getitem__
```python
from more import __getitem__
```



---
## wrapper
```python
from more import wrapper
```



---
## _full
```python
from more import _full
```



---
## _partial
```python
from more import _partial
```



---
## __contains__
```python
from more import __contains__
```



---
## _get_values
```python
from more import _get_values
```

Helper to yield items from the parent iterator that match *value*.
Items that don't match are stored in the local cache as they
are encountered.

---
## itemgetter
```python
from more import itemgetter
```



---
## __eq__
```python
from more import __eq__
```



---
## __hash__
```python
from more import __hash__
```



---
## __len__
```python
from more import __len__
```



---
## _len
```python
from more import _len
```



---
## __reduce__
```python
from more import __reduce__
```



---
## __repr__
```python
from more import __repr__
```



---
## __reversed__
```python
from more import __reversed__
```



---
## count
```python
from more import count
```



---
## index
```python
from more import index
```



---
## _get_by_index
```python
from more import _get_by_index
```



---
## elements
```python
from more import elements
```



---
## seek
```python
from more import seek
```



---
## relative_seek
```python
from more import relative_seek
```



---
## encode
```python
from more import encode
```



---
## decode
```python
from more import decode
```



---
## decorator
```python
from more import decorator
```



---
## set_partitions_helper
```python
from more import set_partitions_helper
```



---
## generator
```python
from more import generator
```



---
## materialize_next
```python
from more import materialize_next
```



---
## feed
```python
from more import feed
```



---
## __enter__
```python
from more import __enter__
```



---
## __exit__
```python
from more import __exit__
```



---
## done
```python
from more import done
```



---
## result
```python
from more import result
```



---
## _reader
```python
from more import _reader
```



---
## is_scalar
```python
from more import is_scalar
```



---
## ret
```python
from more import ret
```



---
## getter
```python
from more import getter
```



---
## outer_wrapper
```python
from more import outer_wrapper
```



---
## callback
```python
from more import callback
```



---
## permuted_items
```python
from more import permuted_items
```



---
## inner_wrapper
```python
from more import inner_wrapper
```



---
## slice_generator
```python
from more import slice_generator
```



---
## take
```python
from recipes import take
```

Return first *n* items of the iterable as a list.

    >>> take(3, range(10))
    [0, 1, 2]

If there are fewer than *n* items in the iterable, all of them are
returned.

    >>> take(10, range(3))
    [0, 1, 2]

---
## tabulate
```python
from recipes import tabulate
```

Return an iterator over the results of ``func(start)``,
``func(start + 1)``, ``func(start + 2)``...

*func* should be a function that accepts one integer argument.

If *start* is not specified it defaults to 0. It will be incremented each
time the iterator is advanced.

    >>> square = lambda x: x ** 2
    >>> iterator = tabulate(square, -3)
    >>> take(4, iterator)
    [9, 4, 1, 0]

---
## tail
```python
from recipes import tail
```

Return an iterator over the last *n* items of *iterable*.

>>> t = tail(3, 'ABCDEFG')
>>> list(t)
['E', 'F', 'G']

---
## consume
```python
from recipes import consume
```

Advance *iterable* by *n* steps. If *n* is ``None``, consume it
entirely.

Efficiently exhausts an iterator without returning values. Defaults to
consuming the whole iterator, but an optional second argument may be
provided to limit consumption.

    >>> i = (x for x in range(10))
    >>> next(i)
    0
    >>> consume(i, 3)
    >>> next(i)
    4
    >>> consume(i)
    >>> next(i)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    StopIteration

If the iterator has fewer items remaining than the provided limit, the
whole iterator will be consumed.

    >>> i = (x for x in range(3))
    >>> consume(i, 5)
    >>> next(i)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    StopIteration

---
## nth
```python
from recipes import nth
```

Returns the nth item or a default value.

>>> l = range(10)
>>> nth(l, 3)
3
>>> nth(l, 20, "zebra")
'zebra'

---
## all_equal
```python
from recipes import all_equal
```

Returns ``True`` if all the elements are equal to each other.

    >>> all_equal('aaaa')
    True
    >>> all_equal('aaab')
    False

A function that accepts a single argument and returns a transformed version
of each input item can be specified with *key*:

    >>> all_equal('AaaA', key=str.casefold)
    True
    >>> all_equal([1, 2, 3], key=lambda x: x < 10)
    True

---
## quantify
```python
from recipes import quantify
```

Return the how many times the predicate is true.

>>> quantify([True, False, True])
2

---
## pad_none
```python
from recipes import pad_none
```

Returns the sequence of elements and then returns ``None`` indefinitely.

    >>> take(5, pad_none(range(3)))
    [0, 1, 2, None, None]

Useful for emulating the behavior of the built-in :func:`map` function.

See also :func:`padded`.

---
## ncycles
```python
from recipes import ncycles
```

Returns the sequence elements *n* times

>>> list(ncycles(["a", "b"], 3))
['a', 'b', 'a', 'b', 'a', 'b']

---
## dotproduct
```python
from recipes import dotproduct
```

Returns the dot product of the two iterables.

>>> dotproduct([10, 10], [20, 20])
400

---
## flatten
```python
from recipes import flatten
```

Return an iterator flattening one level of nesting in a list of lists.

    >>> list(flatten([[0, 1], [2, 3]]))
    [0, 1, 2, 3]

See also :func:`collapse`, which can flatten multiple levels of nesting.

---
## repeatfunc
```python
from recipes import repeatfunc
```

Call *func* with *args* repeatedly, returning an iterable over the
results.

If *times* is specified, the iterable will terminate after that many
repetitions:

    >>> from operator import add
    >>> times = 4
    >>> args = 3, 5
    >>> list(repeatfunc(add, times, *args))
    [8, 8, 8, 8]

If *times* is ``None`` the iterable will not terminate:

    >>> from random import randrange
    >>> times = None
    >>> args = 1, 11
    >>> take(6, repeatfunc(randrange, times, *args))  # doctest:+SKIP
    [2, 4, 8, 1, 8, 4]

---
## _pairwise
```python
from recipes import _pairwise
```

Returns an iterator of paired items, overlapping, from the original

>>> take(4, pairwise(count()))
[(0, 1), (1, 2), (2, 3), (3, 4)]

On Python 3.10 and above, this is an alias for :func:`itertools.pairwise`.

---
## UnequalIterablesError
```python
from recipes import UnequalIterablesError
```



---
## _zip_equal_generator
```python
from recipes import _zip_equal_generator
```



---
## _zip_equal
```python
from recipes import _zip_equal
```



---
## grouper
```python
from recipes import grouper
```

Group elements from *iterable* into fixed-length groups of length *n*.

>>> list(grouper('ABCDEF', 3))
[('A', 'B', 'C'), ('D', 'E', 'F')]

The keyword arguments *incomplete* and *fillvalue* control what happens for
iterables whose length is not a multiple of *n*.

When *incomplete* is `'fill'`, the last group will contain instances of
*fillvalue*.

>>> list(grouper('ABCDEFG', 3, incomplete='fill', fillvalue='x'))
[('A', 'B', 'C'), ('D', 'E', 'F'), ('G', 'x', 'x')]

When *incomplete* is `'ignore'`, the last group will not be emitted.

>>> list(grouper('ABCDEFG', 3, incomplete='ignore', fillvalue='x'))
[('A', 'B', 'C'), ('D', 'E', 'F')]

When *incomplete* is `'strict'`, a subclass of `ValueError` will be raised.

>>> it = grouper('ABCDEFG', 3, incomplete='strict')
>>> list(it)  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
UnequalIterablesError

---
## roundrobin
```python
from recipes import roundrobin
```

Yields an item from each iterable, alternating between them.

    >>> list(roundrobin('ABC', 'D', 'EF'))
    ['A', 'D', 'E', 'B', 'F', 'C']

This function produces the same output as :func:`interleave_longest`, but
may perform better for some inputs (in particular when the number of
iterables is small).

---
## partition
```python
from recipes import partition
```

Returns a 2-tuple of iterables derived from the input iterable.
The first yields the items that have ``pred(item) == False``.
The second yields the items that have ``pred(item) == True``.

    >>> is_odd = lambda x: x % 2 != 0
    >>> iterable = range(10)
    >>> even_items, odd_items = partition(is_odd, iterable)
    >>> list(even_items), list(odd_items)
    ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])

If *pred* is None, :func:`bool` is used.

    >>> iterable = [0, 1, False, True, '', ' ']
    >>> false_items, true_items = partition(None, iterable)
    >>> list(false_items), list(true_items)
    ([0, False, ''], [1, True, ' '])

---
## powerset
```python
from recipes import powerset
```

Yields all possible subsets of the iterable.

    >>> list(powerset([1, 2, 3]))
    [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)]

:func:`powerset` will operate on iterables that aren't :class:`set`
instances, so repeated elements in the input will produce repeated elements
in the output.

    >>> seq = [1, 1, 0]
    >>> list(powerset(seq))
    [(), (1,), (1,), (0,), (1, 1), (1, 0), (1, 0), (1, 1, 0)]

For a variant that efficiently yields actual :class:`set` instances, see
:func:`powerset_of_sets`.

---
## unique_everseen
```python
from recipes import unique_everseen
```

Yield unique elements, preserving order.

    >>> list(unique_everseen('AAAABBBCCDAABBB'))
    ['A', 'B', 'C', 'D']
    >>> list(unique_everseen('ABBCcAD', str.lower))
    ['A', 'B', 'C', 'D']

Sequences with a mix of hashable and unhashable items can be used.
The function will be slower (i.e., `O(n^2)`) for unhashable items.

Remember that ``list`` objects are unhashable - you can use the *key*
parameter to transform the list to a tuple (which is hashable) to
avoid a slowdown.

    >>> iterable = ([1, 2], [2, 3], [1, 2])
    >>> list(unique_everseen(iterable))  # Slow
    [[1, 2], [2, 3]]
    >>> list(unique_everseen(iterable, key=tuple))  # Faster
    [[1, 2], [2, 3]]

Similarly, you may want to convert unhashable ``set`` objects with
``key=frozenset``. For ``dict`` objects,
``key=lambda x: frozenset(x.items())`` can be used.

---
## unique_justseen
```python
from recipes import unique_justseen
```

Yields elements in order, ignoring serial duplicates

>>> list(unique_justseen('AAAABBBCCDAABBB'))
['A', 'B', 'C', 'D', 'A', 'B']
>>> list(unique_justseen('ABBCcAD', str.lower))
['A', 'B', 'C', 'A', 'D']

---
## unique
```python
from recipes import unique
```

Yields unique elements in sorted order.

>>> list(unique([[1, 2], [3, 4], [1, 2]]))
[[1, 2], [3, 4]]

*key* and *reverse* are passed to :func:`sorted`.

>>> list(unique('ABBcCAD', str.casefold))
['A', 'B', 'c', 'D']
>>> list(unique('ABBcCAD', str.casefold, reverse=True))
['D', 'c', 'B', 'A']

The elements in *iterable* need not be hashable, but they must be
comparable for sorting to work.

---
## iter_except
```python
from recipes import iter_except
```

Yields results from a function repeatedly until an exception is raised.

Converts a call-until-exception interface to an iterator interface.
Like ``iter(func, sentinel)``, but uses an exception instead of a sentinel
to end the loop.

    >>> l = [0, 1, 2]
    >>> list(iter_except(l.pop, IndexError))
    [2, 1, 0]

Multiple exceptions can be specified as a stopping condition:

    >>> l = [1, 2, 3, '...', 4, 5, 6]
    >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
    [7, 6, 5]
    >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
    [4, 3, 2]
    >>> list(iter_except(lambda: 1 + l.pop(), (IndexError, TypeError)))
    []

---
## first_true
```python
from recipes import first_true
```

Returns the first true value in the iterable.

If no true value is found, returns *default*

If *pred* is not None, returns the first item for which
``pred(item) == True`` .

    >>> first_true(range(10))
    1
    >>> first_true(range(10), pred=lambda x: x > 5)
    6
    >>> first_true(range(10), default='missing', pred=lambda x: x > 9)
    'missing'

---
## random_product
```python
from recipes import random_product
```

Draw an item at random from each of the input iterables.

    >>> random_product('abc', range(4), 'XYZ')  # doctest:+SKIP
    ('c', 3, 'Z')

If *repeat* is provided as a keyword argument, that many items will be
drawn from each iterable.

    >>> random_product('abcd', range(4), repeat=2)  # doctest:+SKIP
    ('a', 2, 'd', 3)

This equivalent to taking a random selection from
``itertools.product(*args, **kwarg)``.

---
## random_permutation
```python
from recipes import random_permutation
```

Return a random *r* length permutation of the elements in *iterable*.

If *r* is not specified or is ``None``, then *r* defaults to the length of
*iterable*.

    >>> random_permutation(range(5))  # doctest:+SKIP
    (3, 4, 0, 1, 2)

This equivalent to taking a random selection from
``itertools.permutations(iterable, r)``.

---
## random_combination
```python
from recipes import random_combination
```

Return a random *r* length subsequence of the elements in *iterable*.

    >>> random_combination(range(5), 3)  # doctest:+SKIP
    (2, 3, 4)

This equivalent to taking a random selection from
``itertools.combinations(iterable, r)``.

---
## random_combination_with_replacement
```python
from recipes import random_combination_with_replacement
```

Return a random *r* length subsequence of elements in *iterable*,
allowing individual elements to be repeated.

    >>> random_combination_with_replacement(range(3), 5) # doctest:+SKIP
    (0, 0, 1, 2, 2)

This equivalent to taking a random selection from
``itertools.combinations_with_replacement(iterable, r)``.

---
## nth_combination
```python
from recipes import nth_combination
```

Equivalent to ``list(combinations(iterable, r))[index]``.

The subsequences of *iterable* that are of length *r* can be ordered
lexicographically. :func:`nth_combination` computes the subsequence at
sort position *index* directly, without computing the previous
subsequences.

    >>> nth_combination(range(5), 3, 5)
    (0, 3, 4)

``ValueError`` will be raised If *r* is negative or greater than the length
of *iterable*.
``IndexError`` will be raised if the given *index* is invalid.

---
## prepend
```python
from recipes import prepend
```

Yield *value*, followed by the elements in *iterator*.

    >>> value = '0'
    >>> iterator = ['1', '2', '3']
    >>> list(prepend(value, iterator))
    ['0', '1', '2', '3']

To prepend multiple values, see :func:`itertools.chain`
or :func:`value_chain`.

---
## convolve
```python
from recipes import convolve
```

Convolve the iterable *signal* with the iterable *kernel*.

    >>> signal = (1, 2, 3, 4, 5)
    >>> kernel = [3, 2, 1]
    >>> list(convolve(signal, kernel))
    [3, 8, 14, 20, 26, 14, 5]

Note: the input arguments are not interchangeable, as the *kernel*
is immediately consumed and stored.

---
## before_and_after
```python
from recipes import before_and_after
```

A variant of :func:`takewhile` that allows complete access to the
remainder of the iterator.

     >>> it = iter('ABCdEfGhI')
     >>> all_upper, remainder = before_and_after(str.isupper, it)
     >>> ''.join(all_upper)
     'ABC'
     >>> ''.join(remainder) # takewhile() would lose the 'd'
     'dEfGhI'

Note that the first iterator must be fully consumed before the second
iterator can generate valid results.

---
## triplewise
```python
from recipes import triplewise
```

Return overlapping triplets from *iterable*.

>>> list(triplewise('ABCDE'))
[('A', 'B', 'C'), ('B', 'C', 'D'), ('C', 'D', 'E')]

---
## _sliding_window_islice
```python
from recipes import _sliding_window_islice
```



---
## _sliding_window_deque
```python
from recipes import _sliding_window_deque
```



---
## sliding_window
```python
from recipes import sliding_window
```

Return a sliding window of width *n* over *iterable*.

    >>> list(sliding_window(range(6), 4))
    [(0, 1, 2, 3), (1, 2, 3, 4), (2, 3, 4, 5)]

If *iterable* has fewer than *n* items, then nothing is yielded:

    >>> list(sliding_window(range(3), 4))
    []

For a variant with more features, see :func:`windowed`.

---
## subslices
```python
from recipes import subslices
```

Return all contiguous non-empty subslices of *iterable*.

    >>> list(subslices('ABC'))
    [['A'], ['A', 'B'], ['A', 'B', 'C'], ['B'], ['B', 'C'], ['C']]

This is similar to :func:`substrings`, but emits items in a different
order.

---
## polynomial_from_roots
```python
from recipes import polynomial_from_roots
```

Compute a polynomial's coefficients from its roots.

>>> roots = [5, -4, 3]  # (x - 5) * (x + 4) * (x - 3)
>>> polynomial_from_roots(roots)  # x^3 - 4 * x^2 - 17 * x + 60
[1, -4, -17, 60]

---
## iter_index
```python
from recipes import iter_index
```

Yield the index of each place in *iterable* that *value* occurs,
beginning with index *start* and ending before index *stop*.


>>> list(iter_index('AABCADEAF', 'A'))
[0, 1, 4, 7]
>>> list(iter_index('AABCADEAF', 'A', 1))  # start index is inclusive
[1, 4, 7]
>>> list(iter_index('AABCADEAF', 'A', 1, 7))  # stop index is not inclusive
[1, 4]

The behavior for non-scalar *values* matches the built-in Python types.

>>> list(iter_index('ABCDABCD', 'AB'))
[0, 4]
>>> list(iter_index([0, 1, 2, 3, 0, 1, 2, 3], [0, 1]))
[]
>>> list(iter_index([[0, 1], [2, 3], [0, 1], [2, 3]], [0, 1]))
[0, 2]

See :func:`locate` for a more general means of finding the indexes
associated with particular values.

---
## sieve
```python
from recipes import sieve
```

Yield the primes less than n.

>>> list(sieve(30))
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]

---
## _batched
```python
from recipes import _batched
```

Batch data into tuples of length *n*. If the number of items in
*iterable* is not divisible by *n*:
* The last batch will be shorter if *strict* is ``False``.
* :exc:`ValueError` will be raised if *strict* is ``True``.

>>> list(batched('ABCDEFG', 3))
[('A', 'B', 'C'), ('D', 'E', 'F'), ('G',)]

On Python 3.13 and above, this is an alias for :func:`itertools.batched`.

---
## transpose
```python
from recipes import transpose
```

Swap the rows and columns of the input matrix.

>>> list(transpose([(1, 2, 3), (11, 22, 33)]))
[(1, 11), (2, 22), (3, 33)]

The caller should ensure that the dimensions of the input are compatible.
If the input is empty, no output will be produced.

---
## reshape
```python
from recipes import reshape
```

Reshape the 2-D input *matrix* to have a column count given by *cols*.

>>> matrix = [(0, 1), (2, 3), (4, 5)]
>>> cols = 3
>>> list(reshape(matrix, cols))
[(0, 1, 2), (3, 4, 5)]

---
## matmul
```python
from recipes import matmul
```

Multiply two matrices.

>>> list(matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)]))
[(49, 80), (41, 60)]

The caller should ensure that the dimensions of the input matrices are
compatible with each other.

---
## factor
```python
from recipes import factor
```

Yield the prime factors of n.

>>> list(factor(360))
[2, 2, 2, 3, 3, 5]

---
## polynomial_eval
```python
from recipes import polynomial_eval
```

Evaluate a polynomial at a specific value.

Example: evaluating x^3 - 4 * x^2 - 17 * x + 60 at x = 2.5:

>>> coefficients = [1, -4, -17, 60]
>>> x = 2.5
>>> polynomial_eval(coefficients, x)
8.125

---
## sum_of_squares
```python
from recipes import sum_of_squares
```

Return the sum of the squares of the input values.

>>> sum_of_squares([10, 20, 30])
1400

---
## polynomial_derivative
```python
from recipes import polynomial_derivative
```

Compute the first derivative of a polynomial.

Example: evaluating the derivative of x^3 - 4 * x^2 - 17 * x + 60

>>> coefficients = [1, -4, -17, 60]
>>> derivative_coefficients = polynomial_derivative(coefficients)
>>> derivative_coefficients
[3, -8, -17]

---
## totient
```python
from recipes import totient
```

Return the count of natural numbers up to *n* that are coprime with *n*.

>>> totient(9)
6
>>> totient(12)
4

---
## pairwise
```python
from recipes import pairwise
```



---
## __init__
```python
from recipes import __init__
```



---
## true_iterator
```python
from recipes import true_iterator
```



---
## batched
```python
from recipes import batched
```



---
## MessDetectorPlugin
```python
from md import MessDetectorPlugin
```

Base abstract class used for mess detection plugins.
All detectors MUST extend and implement given methods.

---
## TooManySymbolOrPunctuationPlugin
```python
from md import TooManySymbolOrPunctuationPlugin
```



---
## TooManyAccentuatedPlugin
```python
from md import TooManyAccentuatedPlugin
```



---
## UnprintablePlugin
```python
from md import UnprintablePlugin
```



---
## SuspiciousDuplicateAccentPlugin
```python
from md import SuspiciousDuplicateAccentPlugin
```



---
## SuspiciousRange
```python
from md import SuspiciousRange
```



---
## SuperWeirdWordPlugin
```python
from md import SuperWeirdWordPlugin
```



---
## CjkInvalidStopPlugin
```python
from md import CjkInvalidStopPlugin
```

GB(Chinese) based encoding often render the stop incorrectly when the content does not fit and
can be easily detected. Searching for the overuse of '丅' and '丄'.

---
## ArchaicUpperLowerPlugin
```python
from md import ArchaicUpperLowerPlugin
```



---
## ArabicIsolatedFormPlugin
```python
from md import ArabicIsolatedFormPlugin
```



---
## is_suspiciously_successive_range
```python
from md import is_suspiciously_successive_range
```

Determine if two Unicode range seen next to each other can be considered as suspicious.

---
## mess_ratio
```python
from md import mess_ratio
```

Compute a mess ratio given a decoded bytes sequence. The maximum threshold does stop the computation earlier.

---
## eligible
```python
from md import eligible
```



---
## feed
```python
from md import feed
```



---
## reset
```python
from md import reset
```



---
## ratio
```python
from md import ratio
```



---
## __name__
```python
from legacy import __name__
```



---
## detect
```python
from legacy import detect
```

chardet legacy method
Detect the encoding of the given byte string. It should be mostly backward-compatible.
Encoding name will match Chardet own writing whenever possible. (Not on encoding name unsupported by it)
This function is deprecated and should be used to migrate your project easily, consult the documentation for
further information. Not planned for removal.

:param byte_str:     The byte sequence to examine.
:param should_rename_legacy:  Should we rename legacy encodings
                              to their more modern equivalents?

---
## __name__
```python
from models import __name__
```



---
## CharsetMatch
```python
from models import CharsetMatch
```



---
## CharsetMatches
```python
from models import CharsetMatches
```

Container with every CharsetMatch items ordered by default from most probable to the less one.
Act like a list(iterable) but does not implements all related methods.

---
## CliDetectionResult
```python
from models import CliDetectionResult
```



---
## __init__
```python
from models import __init__
```



---
## __eq__
```python
from models import __eq__
```



---
## __lt__
```python
from models import __lt__
```

Implemented to make sorted available upon CharsetMatches items.

---
## multi_byte_usage
```python
from models import multi_byte_usage
```



---
## __str__
```python
from models import __str__
```



---
## __repr__
```python
from models import __repr__
```



---
## add_submatch
```python
from models import add_submatch
```



---
## encoding
```python
from models import encoding
```



---
## encoding_aliases
```python
from models import encoding_aliases
```

Encoding name are known by many name, using this could help when searching for IBM855 when it's listed as CP855.

---
## bom
```python
from models import bom
```



---
## byte_order_mark
```python
from models import byte_order_mark
```



---
## languages
```python
from models import languages
```

Return the complete list of possible languages found in decoded sequence.
Usually not really useful. Returned list may be empty even if 'language' property return something != 'Unknown'.

---
## language
```python
from models import language
```

Most probable language found in decoded sequence. If none were detected or inferred, the property will return
"Unknown".

---
## chaos
```python
from models import chaos
```



---
## coherence
```python
from models import coherence
```



---
## percent_chaos
```python
from models import percent_chaos
```



---
## percent_coherence
```python
from models import percent_coherence
```



---
## raw
```python
from models import raw
```

Original untouched bytes.

---
## submatch
```python
from models import submatch
```



---
## has_submatch
```python
from models import has_submatch
```



---
## alphabets
```python
from models import alphabets
```



---
## could_be_from_charset
```python
from models import could_be_from_charset
```

The complete list of encoding that output the exact SAME str result and therefore could be the originating
encoding.
This list does include the encoding available in property 'encoding'.

---
## output
```python
from models import output
```

Method to get re-encoded bytes payload using given target encoding. Default to UTF-8.
Any errors will be simply ignored by the encoder NOT replaced.

---
## fingerprint
```python
from models import fingerprint
```

Retrieve the unique SHA256 computed using the transformed (re-encoded) payload. Not the original one.

---
## __iter__
```python
from models import __iter__
```

Allows you to use a response as an iterator.

---
## __getitem__
```python
from models import __getitem__
```

Retrieve a single item either by its position or encoding name (alias may be used here).
Raise KeyError upon invalid index or encoding not present in results.

---
## __len__
```python
from models import __len__
```



---
## __bool__
```python
from models import __bool__
```

Returns True if :attr:`status_code` is less than 400.

This attribute checks if the status code of the response is between
400 and 600 to see if there was a client error or a server error. If
the status code, is between 200 and 400, this will return True. This
is **not** a check to see if the response code is ``200 OK``.

---
## append
```python
from models import append
```

Insert a single match. Will be inserted accordingly to preserve sort.
Can be inserted as a submatch.

---
## best
```python
from models import best
```

Simply return the first match. Strict equivalent to matches[0].

---
## first
```python
from models import first
```

Redundant method, call the method best(). Kept for BC reasons.

---
## __dict__
```python
from models import __dict__
```



---
## to_json
```python
from models import to_json
```



---
## __name__
```python
from api import __name__
```



---
## from_bytes
```python
from api import from_bytes
```

Given a raw bytes sequence, return the best possibles charset usable to render str objects.
If there is no results, it is a strong indicator that the source is binary/not text.
By default, the process will extract 5 blocks of 512o each to assess the mess and coherence of a given sequence.
And will give up a particular code page after 20% of measured mess. Those criteria are customizable at will.

The preemptive behavior DOES NOT replace the traditional detection workflow, it prioritize a particular code page
but never take it for granted. Can improve the performance.

You may want to focus your attention to some code page or/and not others, use cp_isolation and cp_exclusion for that
purpose.

This function will strip the SIG in the payload/sequence every time except on UTF-16, UTF-32.
By default the library does not setup any handler other than the NullHandler, if you choose to set the 'explain'
toggle to True it will alter the logger configuration to add a StreamHandler that is suitable for debugging.
Custom logging format and handler can be set manually.

---
## from_fp
```python
from api import from_fp
```

Same thing than the function from_bytes but using a file pointer that is already ready.
Will not close the file pointer.

---
## from_path
```python
from api import from_path
```

Same thing than the function from_bytes but with one extra step. Opening and reading given file path in binary mode.
Can raise IOError.

---
## is_binary
```python
from api import is_binary
```

Detect if the given input (file, bytes, or path) points to a binary file. aka. not a string.
Based on the same main heuristic algorithms and default kwargs at the sole exception that fallbacks match
are disabled to be stricter around ASCII-compatible but unlikely to be a string.

---
## is_accentuated
```python
from utils import is_accentuated
```



---
## remove_accent
```python
from utils import remove_accent
```



---
## unicode_range
```python
from utils import unicode_range
```

Retrieve the Unicode range official name from a single character.

---
## is_latin
```python
from utils import is_latin
```



---
## is_punctuation
```python
from utils import is_punctuation
```



---
## is_symbol
```python
from utils import is_symbol
```



---
## is_emoticon
```python
from utils import is_emoticon
```



---
## is_separator
```python
from utils import is_separator
```



---
## is_case_variable
```python
from utils import is_case_variable
```



---
## is_cjk
```python
from utils import is_cjk
```



---
## is_hiragana
```python
from utils import is_hiragana
```



---
## is_katakana
```python
from utils import is_katakana
```



---
## is_hangul
```python
from utils import is_hangul
```



---
## is_thai
```python
from utils import is_thai
```



---
## is_arabic
```python
from utils import is_arabic
```



---
## is_arabic_isolated_form
```python
from utils import is_arabic_isolated_form
```



---
## is_unicode_range_secondary
```python
from utils import is_unicode_range_secondary
```



---
## is_unprintable
```python
from utils import is_unprintable
```



---
## any_specified_encoding
```python
from utils import any_specified_encoding
```

Extract using ASCII-only decoder any specified encoding in the first n-bytes.

---
## is_multi_byte_encoding
```python
from utils import is_multi_byte_encoding
```

Verify is a specific encoding is a multi byte one based on it IANA name

---
## identify_sig_or_bom
```python
from utils import identify_sig_or_bom
```

Identify and extract SIG/BOM in given sequence.

---
## should_strip_sig_or_bom
```python
from utils import should_strip_sig_or_bom
```



---
## iana_name
```python
from utils import iana_name
```



---
## range_scan
```python
from utils import range_scan
```



---
## cp_similarity
```python
from utils import cp_similarity
```



---
## is_cp_similar
```python
from utils import is_cp_similar
```

Determine if two code page are at least 80% similar. IANA_SUPPORTED_SIMILAR dict was generated using
the function cp_similarity.

---
## set_logging_handler
```python
from utils import set_logging_handler
```



---
## cut_sequence_chunks
```python
from utils import cut_sequence_chunks
```



---
## __name__
```python
from constant import __name__
```



---
## __name__
```python
from cd import __name__
```



---
## encoding_unicode_range
```python
from cd import encoding_unicode_range
```

Return associated unicode ranges in a single byte code page.

---
## unicode_range_languages
```python
from cd import unicode_range_languages
```

Return inferred languages used with a unicode range.

---
## encoding_languages
```python
from cd import encoding_languages
```

Single-byte encoding language association. Some code page are heavily linked to particular language(s).
This function does the correspondence.

---
## mb_encoding_languages
```python
from cd import mb_encoding_languages
```

Multi-byte encoding language association. Some code page are heavily linked to particular language(s).
This function does the correspondence.

---
## get_target_features
```python
from cd import get_target_features
```

Determine main aspects from a supported language if it contains accents and if is pure Latin.

---
## alphabet_languages
```python
from cd import alphabet_languages
```

Return associated languages associated to given characters.

---
## characters_popularity_compare
```python
from cd import characters_popularity_compare
```

Determine if a ordered characters list (by occurrence from most appearance to rarest) match a particular language.
The result is a ratio between 0. (absolutely no correspondence) and 1. (near perfect fit).
Beware that is function is not strict on the match in order to ease the detection. (Meaning close match is 1.)

---
## alpha_unicode_split
```python
from cd import alpha_unicode_split
```

Given a decoded text sequence, return a list of str. Unicode range / alphabet separation.
Ex. a text containing English/Latin with a bit a Hebrew will return two items in the resulting list;
One containing the latin letters and the other hebrew.

---
## merge_coherence_ratios
```python
from cd import merge_coherence_ratios
```

This function merge results previously given by the function coherence_ratio.
The return type is the same as coherence_ratio.

---
## filter_alt_coherence_matches
```python
from cd import filter_alt_coherence_matches
```

We shall NOT return "English—" in CoherenceMatches because it is an alternative
of "English". This function only keeps the best match and remove the em-dash in it.

---
## coherence_ratio
```python
from cd import coherence_ratio
```

Detect ANY language that can be identified in given sequence. The sequence will be analysed by layers.
A layer = Character extraction by alphabets/ranges.

---
## __name__
```python
from MpoImagePlugin import __name__
```



---
## _save
```python
from MpoImagePlugin import _save
```



---
## _save_all
```python
from MpoImagePlugin import _save_all
```



---
## MpoImageFile
```python
from MpoImagePlugin import MpoImageFile
```



---
## _open
```python
from MpoImagePlugin import _open
```



---
## _after_jpeg_open
```python
from MpoImagePlugin import _after_jpeg_open
```



---
## load_seek
```python
from MpoImagePlugin import load_seek
```



---
## seek
```python
from MpoImagePlugin import seek
```



---
## tell
```python
from MpoImagePlugin import tell
```



---
## adopt
```python
from MpoImagePlugin import adopt
```

Transform the instance of JpegImageFile into
an instance of MpoImageFile.
After the call, the JpegImageFile is extended
to be an MpoImageFile.

This is essentially useful when opening a JPEG
file that reveals itself as an MPO, to avoid
double call to _open.

---
## __name__
```python
from ImageMode import __name__
```



---
## ModeDescriptor
```python
from ImageMode import ModeDescriptor
```

Wrapper for mode strings.

---
## getmode
```python
from ImageMode import getmode
```

Gets a mode descriptor for the given mode.

---
## __str__
```python
from ImageMode import __str__
```



---
## __name__
```python
from PngImagePlugin import __name__
```



---
## Disposal
```python
from PngImagePlugin import Disposal
```



---
## Blend
```python
from PngImagePlugin import Blend
```



---
## _safe_zlib_decompress
```python
from PngImagePlugin import _safe_zlib_decompress
```



---
## _crc32
```python
from PngImagePlugin import _crc32
```



---
## ChunkStream
```python
from PngImagePlugin import ChunkStream
```



---
## iTXt
```python
from PngImagePlugin import iTXt
```

Subclass of string to allow iTXt chunks to look like strings while
keeping their extra information

---
## PngInfo
```python
from PngImagePlugin import PngInfo
```

PNG chunk container (for use with save(pnginfo=))

---
## PngStream
```python
from PngImagePlugin import PngStream
```



---
## _accept
```python
from PngImagePlugin import _accept
```



---
## PngImageFile
```python
from PngImagePlugin import PngImageFile
```



---
## putchunk
```python
from PngImagePlugin import putchunk
```

Write a PNG chunk (including CRC field)

---
## _idat
```python
from PngImagePlugin import _idat
```



---
## _fdat
```python
from PngImagePlugin import _fdat
```



---
## _write_multiple_frames
```python
from PngImagePlugin import _write_multiple_frames
```



---
## _save_all
```python
from PngImagePlugin import _save_all
```



---
## _save
```python
from PngImagePlugin import _save
```



---
## getchunks
```python
from PngImagePlugin import getchunks
```

Return a list of PNG chunks representing this image.

---
## __init__
```python
from PngImagePlugin import __init__
```



---
## read
```python
from PngImagePlugin import read
```

Fetch a new chunk. Returns header information.

---
## __enter__
```python
from PngImagePlugin import __enter__
```



---
## __exit__
```python
from PngImagePlugin import __exit__
```



---
## close
```python
from PngImagePlugin import close
```



---
## push
```python
from PngImagePlugin import push
```



---
## call
```python
from PngImagePlugin import call
```

Call the appropriate chunk handler

---
## crc
```python
from PngImagePlugin import crc
```

Read and verify checksum

---
## crc_skip
```python
from PngImagePlugin import crc_skip
```

Read checksum

---
## verify
```python
from PngImagePlugin import verify
```

Verify PNG file

---
## __new__
```python
from PngImagePlugin import __new__
```

:param cls: the class to use when creating the instance
:param text: value for this key
:param lang: language code
:param tkey: UTF-8 version of the key name

---
## add
```python
from PngImagePlugin import add
```

Appends an arbitrary chunk. Use with caution.

:param cid: a byte string, 4 bytes long.
:param data: a byte string of the encoded data
:param after_idat: for use with private chunks. Whether the chunk
                   should be written after IDAT

---
## add_itxt
```python
from PngImagePlugin import add_itxt
```

Appends an iTXt chunk.

:param key: latin-1 encodable text key name
:param value: value for this key
:param lang: language code
:param tkey: UTF-8 version of the key name
:param zip: compression flag

---
## add_text
```python
from PngImagePlugin import add_text
```

Appends a text chunk.

:param key: latin-1 encodable text key name
:param value: value for this key, text or an
   :py:class:`PIL.PngImagePlugin.iTXt` instance
:param zip: compression flag

---
## check_text_memory
```python
from PngImagePlugin import check_text_memory
```



---
## save_rewind
```python
from PngImagePlugin import save_rewind
```



---
## rewind
```python
from PngImagePlugin import rewind
```



---
## chunk_iCCP
```python
from PngImagePlugin import chunk_iCCP
```



---
## chunk_IHDR
```python
from PngImagePlugin import chunk_IHDR
```



---
## chunk_IDAT
```python
from PngImagePlugin import chunk_IDAT
```



---
## chunk_IEND
```python
from PngImagePlugin import chunk_IEND
```



---
## chunk_PLTE
```python
from PngImagePlugin import chunk_PLTE
```



---
## chunk_tRNS
```python
from PngImagePlugin import chunk_tRNS
```



---
## chunk_gAMA
```python
from PngImagePlugin import chunk_gAMA
```



---
## chunk_cHRM
```python
from PngImagePlugin import chunk_cHRM
```



---
## chunk_sRGB
```python
from PngImagePlugin import chunk_sRGB
```



---
## chunk_pHYs
```python
from PngImagePlugin import chunk_pHYs
```



---
## chunk_tEXt
```python
from PngImagePlugin import chunk_tEXt
```



---
## chunk_zTXt
```python
from PngImagePlugin import chunk_zTXt
```



---
## chunk_iTXt
```python
from PngImagePlugin import chunk_iTXt
```



---
## chunk_eXIf
```python
from PngImagePlugin import chunk_eXIf
```



---
## chunk_acTL
```python
from PngImagePlugin import chunk_acTL
```



---
## chunk_fcTL
```python
from PngImagePlugin import chunk_fcTL
```



---
## chunk_fdAT
```python
from PngImagePlugin import chunk_fdAT
```



---
## _open
```python
from PngImagePlugin import _open
```



---
## text
```python
from PngImagePlugin import text
```



---
## seek
```python
from PngImagePlugin import seek
```



---
## _seek
```python
from PngImagePlugin import _seek
```



---
## tell
```python
from PngImagePlugin import tell
```



---
## load_prepare
```python
from PngImagePlugin import load_prepare
```

internal: prepare to read PNG file

---
## load_read
```python
from PngImagePlugin import load_read
```

internal: read more image data

---
## load_end
```python
from PngImagePlugin import load_end
```

internal: finished reading image data

---
## _getexif
```python
from PngImagePlugin import _getexif
```



---
## getexif
```python
from PngImagePlugin import getexif
```



---
## write
```python
from PngImagePlugin import write
```



---
## collector
```python
from PngImagePlugin import collector
```



---
## append
```python
from PngImagePlugin import append
```



---
## __name__
```python
from XbmImagePlugin import __name__
```



---
## _accept
```python
from XbmImagePlugin import _accept
```



---
## XbmImageFile
```python
from XbmImagePlugin import XbmImageFile
```



---
## _save
```python
from XbmImagePlugin import _save
```



---
## _open
```python
from XbmImagePlugin import _open
```



---
## __name__
```python
from PcxImagePlugin import __name__
```



---
## _accept
```python
from PcxImagePlugin import _accept
```



---
## PcxImageFile
```python
from PcxImagePlugin import PcxImageFile
```



---
## _save
```python
from PcxImagePlugin import _save
```



---
## _open
```python
from PcxImagePlugin import _open
```



---
## __name__
```python
from SunImagePlugin import __name__
```



---
## _accept
```python
from SunImagePlugin import _accept
```



---
## SunImageFile
```python
from SunImagePlugin import SunImageFile
```



---
## _open
```python
from SunImagePlugin import _open
```



---
## __name__
```python
from ImageFile import __name__
```



---
## _get_oserror
```python
from ImageFile import _get_oserror
```



---
## raise_oserror
```python
from ImageFile import raise_oserror
```



---
## _tilesort
```python
from ImageFile import _tilesort
```



---
## _Tile
```python
from ImageFile import _Tile
```



---
## ImageFile
```python
from ImageFile import ImageFile
```

Base class for image file format handlers.

---
## StubHandler
```python
from ImageFile import StubHandler
```



---
## StubImageFile
```python
from ImageFile import StubImageFile
```

Base class for stub image loaders.

A stub loader is an image loader that can identify files of a
certain format, but relies on external code to load the file.

---
## Parser
```python
from ImageFile import Parser
```

Incremental image parser.  This class implements the standard
feed/close consumer interface.

---
## _save
```python
from ImageFile import _save
```

Helper to save image based on tile list

:param im: Image object.
:param fp: File object.
:param tile: Tile list.
:param bufsize: Optional buffer size

---
## _encode_tile
```python
from ImageFile import _encode_tile
```



---
## _safe_read
```python
from ImageFile import _safe_read
```

Reads large blocks in a safe way.  Unlike fp.read(n), this function
doesn't trust the user.  If the requested size is larger than
SAFEBLOCK, the file is read block by block.

:param fp: File handle.  Must implement a <b>read</b> method.
:param size: Number of bytes to read.
:returns: A string containing <i>size</i> bytes of data.

Raises an OSError if the file is truncated and the read cannot be completed

---
## PyCodecState
```python
from ImageFile import PyCodecState
```



---
## PyCodec
```python
from ImageFile import PyCodec
```



---
## PyDecoder
```python
from ImageFile import PyDecoder
```

Python implementation of a format decoder. Override this class and
add the decoding logic in the :meth:`decode` method.

See :ref:`Writing Your Own File Codec in Python<file-codecs-py>`

---
## PyEncoder
```python
from ImageFile import PyEncoder
```

Python implementation of a format encoder. Override this class and
add the decoding logic in the :meth:`encode` method.

See :ref:`Writing Your Own File Codec in Python<file-codecs-py>`

---
## __init__
```python
from ImageFile import __init__
```



---
## get_format_mimetype
```python
from ImageFile import get_format_mimetype
```



---
## __setstate__
```python
from ImageFile import __setstate__
```



---
## verify
```python
from ImageFile import verify
```

Check file integrity

---
## load
```python
from ImageFile import load
```



---
## load_prepare
```python
from ImageFile import load_prepare
```



---
## load_end
```python
from ImageFile import load_end
```



---
## _seek_check
```python
from ImageFile import _seek_check
```



---
## open
```python
from ImageFile import open
```



---
## _open
```python
from ImageFile import _open
```



---
## _load
```python
from ImageFile import _load
```

(Hook) Find actual image loader.

---
## reset
```python
from ImageFile import reset
```

(Consumer) Reset the parser.  Note that you can only call this
method immediately after you've created a parser; parser
instances cannot be reused.

---
## feed
```python
from ImageFile import feed
```

(Consumer) Feed data to the parser.

:param data: A string buffer.
:exception OSError: If the parser failed to parse the image file.

---
## __enter__
```python
from ImageFile import __enter__
```



---
## __exit__
```python
from ImageFile import __exit__
```



---
## close
```python
from ImageFile import close
```

(Consumer) Close the stream.

:returns: An image object.
:exception OSError: If the parser failed to parse the image file either
                    because it cannot be identified or cannot be
                    decoded.

---
## extents
```python
from ImageFile import extents
```



---
## init
```python
from ImageFile import init
```

Override to perform codec specific initialization

:param args: Array of args items from the tile entry
:returns: None

---
## cleanup
```python
from ImageFile import cleanup
```

Override to perform codec specific cleanup

:returns: None

---
## setfd
```python
from ImageFile import setfd
```

Called from ImageFile to set the Python file-like object

:param fd: A Python file-like object
:returns: None

---
## setimage
```python
from ImageFile import setimage
```

Called from ImageFile to set the core output image for the codec

:param im: A core image object
:param extents: a 4 tuple of (x0, y0, x1, y1) defining the rectangle
    for this tile
:returns: None

---
## pulls_fd
```python
from ImageFile import pulls_fd
```



---
## decode
```python
from ImageFile import decode
```

Override to perform the decoding process.

:param buffer: A bytes object with the data to be decoded.
:returns: A tuple of ``(bytes consumed, errcode)``.
    If finished with decoding return -1 for the bytes consumed.
    Err codes are from :data:`.ImageFile.ERRORS`.

---
## set_as_raw
```python
from ImageFile import set_as_raw
```

Convenience method to set the internal image from a stream of raw data

:param data: Bytes to be set
:param rawmode: The rawmode to be used for the decoder.
    If not specified, it will default to the mode of the image
:returns: None

---
## pushes_fd
```python
from ImageFile import pushes_fd
```



---
## encode
```python
from ImageFile import encode
```

Override to perform the encoding process.

:param bufsize: Buffer size.
:returns: A tuple of ``(bytes encoded, errcode, bytes)``.
    If finished with encoding return 1 for the error code.
    Err codes are from :data:`.ImageFile.ERRORS`.

---
## encode_to_pyfd
```python
from ImageFile import encode_to_pyfd
```

If ``pushes_fd`` is ``True``, then this method will be used,
and ``encode()`` will only be called once.

:returns: A tuple of ``(bytes consumed, errcode)``.
    Err codes are from :data:`.ImageFile.ERRORS`.

---
## encode_to_file
```python
from ImageFile import encode_to_file
```

:param fh: File handle.
:param bufsize: Buffer size.

:returns: If finished successfully, return 0.
    Otherwise, return an error code. Err codes are from
    :data:`.ImageFile.ERRORS`.

---
## __name__
```python
from SpiderImagePlugin import __name__
```



---
## isInt
```python
from SpiderImagePlugin import isInt
```



---
## isSpiderHeader
```python
from SpiderImagePlugin import isSpiderHeader
```



---
## isSpiderImage
```python
from SpiderImagePlugin import isSpiderImage
```



---
## SpiderImageFile
```python
from SpiderImagePlugin import SpiderImageFile
```



---
## loadImageSeries
```python
from SpiderImagePlugin import loadImageSeries
```

create a list of :py:class:`~PIL.Image.Image` objects for use in a montage

---
## makeSpiderHeader
```python
from SpiderImagePlugin import makeSpiderHeader
```



---
## _save
```python
from SpiderImagePlugin import _save
```



---
## _save_spider
```python
from SpiderImagePlugin import _save_spider
```



---
## _open
```python
from SpiderImagePlugin import _open
```



---
## n_frames
```python
from SpiderImagePlugin import n_frames
```



---
## is_animated
```python
from SpiderImagePlugin import is_animated
```



---
## tell
```python
from SpiderImagePlugin import tell
```



---
## seek
```python
from SpiderImagePlugin import seek
```



---
## convert2byte
```python
from SpiderImagePlugin import convert2byte
```



---
## tkPhotoImage
```python
from SpiderImagePlugin import tkPhotoImage
```



---
## __name__
```python
from TarIO import __name__
```



---
## TarIO
```python
from TarIO import TarIO
```

A file object that provides read access to a given member of a TAR file.

---
## __init__
```python
from TarIO import __init__
```

Create file object.

:param tarfile: Name of TAR file.
:param file: Name of member file.

---
## __enter__
```python
from TarIO import __enter__
```



---
## __exit__
```python
from TarIO import __exit__
```



---
## close
```python
from TarIO import close
```



---
## __name__
```python
from MpegImagePlugin import __name__
```



---
## BitStream
```python
from MpegImagePlugin import BitStream
```



---
## _accept
```python
from MpegImagePlugin import _accept
```



---
## MpegImageFile
```python
from MpegImagePlugin import MpegImageFile
```



---
## __init__
```python
from MpegImagePlugin import __init__
```



---
## next
```python
from MpegImagePlugin import next
```



---
## peek
```python
from MpegImagePlugin import peek
```



---
## skip
```python
from MpegImagePlugin import skip
```



---
## read
```python
from MpegImagePlugin import read
```



---
## _open
```python
from MpegImagePlugin import _open
```



---
## __name__
```python
from BdfFontFile import __name__
```

Parse X Bitmap Distribution Format (BDF)

---
## bdf_char
```python
from BdfFontFile import bdf_char
```



---
## BdfFontFile
```python
from BdfFontFile import BdfFontFile
```

Font file plugin for the X11 BDF format.

---
## __init__
```python
from BdfFontFile import __init__
```



---
## __name__
```python
from GribStubImagePlugin import __name__
```



---
## register_handler
```python
from GribStubImagePlugin import register_handler
```

Install application-specific GRIB image handler.

:param handler: Handler object.

---
## _accept
```python
from GribStubImagePlugin import _accept
```



---
## GribStubImageFile
```python
from GribStubImagePlugin import GribStubImageFile
```



---
## _save
```python
from GribStubImagePlugin import _save
```



---
## _open
```python
from GribStubImagePlugin import _open
```



---
## _load
```python
from GribStubImagePlugin import _load
```



---
## __name__
```python
from ImageStat import __name__
```



---
## Stat
```python
from ImageStat import Stat
```



---
## __init__
```python
from ImageStat import __init__
```

Calculate statistics for the given image. If a mask is included,
only the regions covered by that mask are included in the
statistics. You can also pass in a previously calculated histogram.

:param image: A PIL image, or a precalculated histogram.

    .. note::

        For a PIL image, calculations rely on the
        :py:meth:`~PIL.Image.Image.histogram` method. The pixel counts are
        grouped into 256 bins, even if the image has more than 8 bits per
        channel. So ``I`` and ``F`` mode images have a maximum ``mean``,
        ``median`` and ``rms`` of 255, and cannot have an ``extrema`` maximum
        of more than 255.

:param mask: An optional mask.

---
## extrema
```python
from ImageStat import extrema
```

Min/max values for each band in the image.

.. note::
    This relies on the :py:meth:`~PIL.Image.Image.histogram` method, and
    simply returns the low and high bins used. This is correct for
    images with 8 bits per channel, but fails for other modes such as
    ``I`` or ``F``. Instead, use :py:meth:`~PIL.Image.Image.getextrema` to
    return per-band extrema for the image. This is more correct and
    efficient because, for non-8-bit modes, the histogram method uses
    :py:meth:`~PIL.Image.Image.getextrema` to determine the bins used.

---
## count
```python
from ImageStat import count
```

Total number of pixels for each band in the image.

---
## sum
```python
from ImageStat import sum
```

Sum of all pixels for each band in the image.

---
## sum2
```python
from ImageStat import sum2
```

Squared sum of all pixels for each band in the image.

---
## mean
```python
from ImageStat import mean
```

Average (arithmetic mean) pixel level for each band in the image.

---
## median
```python
from ImageStat import median
```

Median pixel level for each band in the image.

---
## rms
```python
from ImageStat import rms
```

RMS (root-mean-square) for each band in the image.

---
## var
```python
from ImageStat import var
```

Variance for each band in the image.

---
## stddev
```python
from ImageStat import stddev
```

Standard deviation for each band in the image.

---
## minmax
```python
from ImageStat import minmax
```



---
## __name__
```python
from PixarImagePlugin import __name__
```



---
## _accept
```python
from PixarImagePlugin import _accept
```



---
## PixarImageFile
```python
from PixarImagePlugin import PixarImageFile
```



---
## _open
```python
from PixarImagePlugin import _open
```



---
## __name__
```python
from GimpPaletteFile import __name__
```



---
## GimpPaletteFile
```python
from GimpPaletteFile import GimpPaletteFile
```

File handler for GIMP's palette format.

---
## __init__
```python
from GimpPaletteFile import __init__
```



---
## getpalette
```python
from GimpPaletteFile import getpalette
```



---
## __name__
```python
from ImageColor import __name__
```



---
## getrgb
```python
from ImageColor import getrgb
```

Convert a color string to an RGB or RGBA tuple. If the string cannot be
 parsed, this function raises a :py:exc:`ValueError` exception.

.. versionadded:: 1.1.4

:param color: A color string
:return: ``(red, green, blue[, alpha])``

---
## getcolor
```python
from ImageColor import getcolor
```

Same as :py:func:`~PIL.ImageColor.getrgb` for most modes. However, if
``mode`` is HSV, converts the RGB value to a HSV value, or if ``mode`` is
not color or a palette image, converts the RGB value to a grayscale value.
If the string cannot be parsed, this function raises a :py:exc:`ValueError`
exception.

.. versionadded:: 1.1.4

:param color: A color string
:param mode: Convert result to this mode
:return: ``graylevel, (graylevel, alpha) or (red, green, blue[, alpha])``

---
## __name__
```python
from QoiImagePlugin import __name__
```



---
## _accept
```python
from QoiImagePlugin import _accept
```



---
## QoiImageFile
```python
from QoiImagePlugin import QoiImageFile
```



---
## QoiDecoder
```python
from QoiImagePlugin import QoiDecoder
```



---
## _open
```python
from QoiImagePlugin import _open
```



---
## _add_to_previous_pixels
```python
from QoiImagePlugin import _add_to_previous_pixels
```



---
## decode
```python
from QoiImagePlugin import decode
```



---
## __name__
```python
from ContainerIO import __name__
```



---
## ContainerIO
```python
from ContainerIO import ContainerIO
```

A file object that provides read access to a part of an existing
file (for example a TAR file).

---
## __init__
```python
from ContainerIO import __init__
```

Create file object.

:param file: Existing file.
:param offset: Start of region, in bytes.
:param length: Size of region, in bytes.

---
## isatty
```python
from ContainerIO import isatty
```



---
## seek
```python
from ContainerIO import seek
```

Move file pointer.

:param offset: Offset in bytes.
:param mode: Starting position. Use 0 for beginning of region, 1
   for current offset, and 2 for end of region.  You cannot move
   the pointer outside the defined region.

---
## tell
```python
from ContainerIO import tell
```

Get current file pointer.

:returns: Offset from start of region, in bytes.

---
## read
```python
from ContainerIO import read
```

Read data.

:param n: Number of bytes to read. If omitted or zero,
    read until end of region.
:returns: An 8-bit string.

---
## readline
```python
from ContainerIO import readline
```

Read a line of text.

:returns: An 8-bit string.

---
## readlines
```python
from ContainerIO import readlines
```

Read multiple lines of text.

:returns: A list of 8-bit strings.

---
## SupportsRead
```python
from _typing import SupportsRead
```



---
## read
```python
from _typing import read
```



---
## TypeGuard
```python
from _typing import TypeGuard
```



---
## __class_getitem__
```python
from _typing import __class_getitem__
```



---
## __name__
```python
from MspImagePlugin import __name__
```



---
## _accept
```python
from MspImagePlugin import _accept
```



---
## MspImageFile
```python
from MspImagePlugin import MspImageFile
```



---
## MspDecoder
```python
from MspImagePlugin import MspDecoder
```



---
## _save
```python
from MspImagePlugin import _save
```



---
## _open
```python
from MspImagePlugin import _open
```



---
## decode
```python
from MspImagePlugin import decode
```



---
## __name__
```python
from MicImagePlugin import __name__
```



---
## _accept
```python
from MicImagePlugin import _accept
```



---
## MicImageFile
```python
from MicImagePlugin import MicImageFile
```



---
## _open
```python
from MicImagePlugin import _open
```



---
## seek
```python
from MicImagePlugin import seek
```



---
## tell
```python
from MicImagePlugin import tell
```



---
## close
```python
from MicImagePlugin import close
```



---
## __exit__
```python
from MicImagePlugin import __exit__
```



---
## __name__
```python
from ImtImagePlugin import __name__
```



---
## ImtImageFile
```python
from ImtImagePlugin import ImtImageFile
```



---
## _open
```python
from ImtImagePlugin import _open
```



---
## __name__
```python
from GifImagePlugin import __name__
```



---
## LoadingStrategy
```python
from GifImagePlugin import LoadingStrategy
```

.. versionadded:: 9.1.0

---
## _accept
```python
from GifImagePlugin import _accept
```



---
## GifImageFile
```python
from GifImagePlugin import GifImageFile
```



---
## _normalize_mode
```python
from GifImagePlugin import _normalize_mode
```

Takes an image (or frame), returns an image in a mode that is appropriate
for saving in a Gif.

It may return the original image, or it may return an image converted to
palette or 'L' mode.

:param im: Image object
:returns: Image object

---
## _normalize_palette
```python
from GifImagePlugin import _normalize_palette
```

Normalizes the palette for image.
  - Sets the palette to the incoming palette, if provided.
  - Ensures that there's a palette for L mode images
  - Optimizes the palette if necessary/desired.

:param im: Image object
:param palette: bytes object containing the source palette, or ....
:param info: encoderinfo
:returns: Image object

---
## _write_single_frame
```python
from GifImagePlugin import _write_single_frame
```



---
## _getbbox
```python
from GifImagePlugin import _getbbox
```



---
## _Frame
```python
from GifImagePlugin import _Frame
```



---
## _write_multiple_frames
```python
from GifImagePlugin import _write_multiple_frames
```



---
## _save_all
```python
from GifImagePlugin import _save_all
```



---
## _save
```python
from GifImagePlugin import _save
```



---
## get_interlace
```python
from GifImagePlugin import get_interlace
```



---
## _write_local_header
```python
from GifImagePlugin import _write_local_header
```



---
## _save_netpbm
```python
from GifImagePlugin import _save_netpbm
```



---
## _get_optimize
```python
from GifImagePlugin import _get_optimize
```

Palette optimization is a potentially expensive operation.

This function determines if the palette should be optimized using
some heuristics, then returns the list of palette entries in use.

:param im: Image object
:param info: encoderinfo
:returns: list of indexes of palette entries in use, or None

---
## _get_color_table_size
```python
from GifImagePlugin import _get_color_table_size
```



---
## _get_header_palette
```python
from GifImagePlugin import _get_header_palette
```

Returns the palette, null padded to the next power of 2 (*3) bytes
suitable for direct inclusion in the GIF header

:param palette_bytes: Unpadded palette bytes, in RGBRGB form
:returns: Null padded palette

---
## _get_palette_bytes
```python
from GifImagePlugin import _get_palette_bytes
```

Gets the palette for inclusion in the gif header

:param im: Image object
:returns: Bytes, len<=768 suitable for inclusion in gif header

---
## _get_background
```python
from GifImagePlugin import _get_background
```



---
## _get_global_header
```python
from GifImagePlugin import _get_global_header
```

Return a list of strings representing a GIF header

---
## _write_frame_data
```python
from GifImagePlugin import _write_frame_data
```



---
## getheader
```python
from GifImagePlugin import getheader
```

Legacy Method to get Gif data from image.

Warning:: May modify image data.

:param im: Image object
:param palette: bytes object containing the source palette, or ....
:param info: encoderinfo
:returns: tuple of(list of header items, optimized palette)

---
## getdata
```python
from GifImagePlugin import getdata
```

Legacy Method

Return a list of strings representing this image.
The first string is a local image header, the rest contains
encoded image data.

To specify duration, add the time in milliseconds,
e.g. ``getdata(im_frame, duration=1000)``

:param im: Image object
:param offset: Tuple of (x, y) pixels. Defaults to (0, 0)
:param \**params: e.g. duration or other encoder info parameters
:returns: List of bytes containing GIF encoded frame data

---
## data
```python
from GifImagePlugin import data
```



---
## _is_palette_needed
```python
from GifImagePlugin import _is_palette_needed
```



---
## _open
```python
from GifImagePlugin import _open
```



---
## n_frames
```python
from GifImagePlugin import n_frames
```



---
## is_animated
```python
from GifImagePlugin import is_animated
```



---
## seek
```python
from GifImagePlugin import seek
```



---
## _seek
```python
from GifImagePlugin import _seek
```



---
## load_prepare
```python
from GifImagePlugin import load_prepare
```



---
## load_end
```python
from GifImagePlugin import load_end
```



---
## tell
```python
from GifImagePlugin import tell
```



---
## Collector
```python
from GifImagePlugin import Collector
```



---
## _rgb
```python
from GifImagePlugin import _rgb
```



---
## write
```python
from GifImagePlugin import write
```



---
## __name__
```python
from PalmImagePlugin import __name__
```



---
## build_prototype_image
```python
from PalmImagePlugin import build_prototype_image
```



---
## _save
```python
from PalmImagePlugin import _save
```



---
## __name__
```python
from ImageQt import __name__
```



---
## rgb
```python
from ImageQt import rgb
```

(Internal) Turns an RGB color into a Qt compatible color integer.

---
## fromqimage
```python
from ImageQt import fromqimage
```

:param im: QImage or PIL ImageQt object

---
## fromqpixmap
```python
from ImageQt import fromqpixmap
```



---
## align8to32
```python
from ImageQt import align8to32
```

converts each scanline of data from 8 bit to 32 bit aligned

---
## _toqclass_helper
```python
from ImageQt import _toqclass_helper
```



---
## toqimage
```python
from ImageQt import toqimage
```



---
## toqpixmap
```python
from ImageQt import toqpixmap
```



---
## ImageQt
```python
from ImageQt import ImageQt
```



---
## __init__
```python
from ImageQt import __init__
```

An PIL image wrapper for Qt.  This is a subclass of PyQt's QImage
class.

:param im: A PIL Image object, or a file name (given either as
    Python string or a PyQt string object).

---
## __name__
```python
from ImageMath import __name__
```



---
## _Operand
```python
from ImageMath import _Operand
```

Wraps an image operand, providing standard operators

---
## imagemath_int
```python
from ImageMath import imagemath_int
```



---
## imagemath_float
```python
from ImageMath import imagemath_float
```



---
## imagemath_equal
```python
from ImageMath import imagemath_equal
```



---
## imagemath_notequal
```python
from ImageMath import imagemath_notequal
```



---
## imagemath_min
```python
from ImageMath import imagemath_min
```



---
## imagemath_max
```python
from ImageMath import imagemath_max
```



---
## imagemath_convert
```python
from ImageMath import imagemath_convert
```



---
## lambda_eval
```python
from ImageMath import lambda_eval
```

Returns the result of an image function.

:py:mod:`~PIL.ImageMath` only supports single-layer images. To process multi-band
images, use the :py:meth:`~PIL.Image.Image.split` method or
:py:func:`~PIL.Image.merge` function.

:param expression: A function that receives a dictionary.
:param options: Values to add to the function's dictionary. You
                can either use a dictionary, or one or more keyword
                arguments.
:return: The expression result. This is usually an image object, but can
         also be an integer, a floating point value, or a pixel tuple,
         depending on the expression.

---
## unsafe_eval
```python
from ImageMath import unsafe_eval
```

Evaluates an image expression. This uses Python's ``eval()`` function to process
the expression string, and carries the security risks of doing so. It is not
recommended to process expressions without considering this.
:py:meth:`~lambda_eval` is a more secure alternative.

:py:mod:`~PIL.ImageMath` only supports single-layer images. To process multi-band
images, use the :py:meth:`~PIL.Image.Image.split` method or
:py:func:`~PIL.Image.merge` function.

:param expression: A string containing a Python-style expression.
:param options: Values to add to the evaluation context.  You
                can either use a dictionary, or one or more keyword
                arguments.
:return: The evaluated expression. This is usually an image object, but can
         also be an integer, a floating point value, or a pixel tuple,
         depending on the expression.

---
## eval
```python
from ImageMath import eval
```

Evaluates an image expression.

Deprecated. Use lambda_eval() or unsafe_eval() instead.

:param expression: A string containing a Python-style expression.
:param _dict: Values to add to the evaluation context.  You
              can either use a dictionary, or one or more keyword
              arguments.
:return: The evaluated expression. This is usually an image object, but can
         also be an integer, a floating point value, or a pixel tuple,
         depending on the expression.

..  deprecated:: 10.3.0

---
## __init__
```python
from ImageMath import __init__
```



---
## __fixup
```python
from ImageMath import __fixup
```



---
## apply
```python
from ImageMath import apply
```



---
## __bool__
```python
from ImageMath import __bool__
```



---
## __abs__
```python
from ImageMath import __abs__
```



---
## __pos__
```python
from ImageMath import __pos__
```



---
## __neg__
```python
from ImageMath import __neg__
```



---
## __add__
```python
from ImageMath import __add__
```



---
## __radd__
```python
from ImageMath import __radd__
```



---
## __sub__
```python
from ImageMath import __sub__
```



---
## __rsub__
```python
from ImageMath import __rsub__
```



---
## __mul__
```python
from ImageMath import __mul__
```



---
## __rmul__
```python
from ImageMath import __rmul__
```



---
## __truediv__
```python
from ImageMath import __truediv__
```



---
## __rtruediv__
```python
from ImageMath import __rtruediv__
```



---
## __mod__
```python
from ImageMath import __mod__
```



---
## __rmod__
```python
from ImageMath import __rmod__
```



---
## __pow__
```python
from ImageMath import __pow__
```



---
## __rpow__
```python
from ImageMath import __rpow__
```



---
## __invert__
```python
from ImageMath import __invert__
```



---
## __and__
```python
from ImageMath import __and__
```



---
## __rand__
```python
from ImageMath import __rand__
```



---
## __or__
```python
from ImageMath import __or__
```



---
## __ror__
```python
from ImageMath import __ror__
```



---
## __xor__
```python
from ImageMath import __xor__
```



---
## __rxor__
```python
from ImageMath import __rxor__
```



---
## __lshift__
```python
from ImageMath import __lshift__
```



---
## __rshift__
```python
from ImageMath import __rshift__
```



---
## __eq__
```python
from ImageMath import __eq__
```



---
## __ne__
```python
from ImageMath import __ne__
```



---
## __lt__
```python
from ImageMath import __lt__
```



---
## __le__
```python
from ImageMath import __le__
```



---
## __gt__
```python
from ImageMath import __gt__
```



---
## __ge__
```python
from ImageMath import __ge__
```



---
## scan
```python
from ImageMath import scan
```



---
## __name__
```python
from PaletteFile import __name__
```



---
## PaletteFile
```python
from PaletteFile import PaletteFile
```

File handler for Teragon-style palette files.

---
## __init__
```python
from PaletteFile import __init__
```



---
## getpalette
```python
from PaletteFile import getpalette
```



---
## __name__
```python
from FontFile import __name__
```



---
## puti16
```python
from FontFile import puti16
```

Write network order (big-endian) 16-bit sequence

---
## FontFile
```python
from FontFile import FontFile
```

Base class for raster font file handlers.

---
## __init__
```python
from FontFile import __init__
```



---
## __getitem__
```python
from FontFile import __getitem__
```



---
## compile
```python
from FontFile import compile
```

Create metrics and bitmap

---
## save
```python
from FontFile import save
```

Save font

---
## __name__
```python
from PdfParser import __name__
```



---
## encode_text
```python
from PdfParser import encode_text
```



---
## decode_text
```python
from PdfParser import decode_text
```



---
## PdfFormatError
```python
from PdfParser import PdfFormatError
```

An error that probably indicates a syntactic or semantic error in the
PDF file structure

---
## check_format_condition
```python
from PdfParser import check_format_condition
```



---
## IndirectReferenceTuple
```python
from PdfParser import IndirectReferenceTuple
```



---
## IndirectReference
```python
from PdfParser import IndirectReference
```



---
## IndirectObjectDef
```python
from PdfParser import IndirectObjectDef
```



---
## XrefTable
```python
from PdfParser import XrefTable
```



---
## PdfName
```python
from PdfParser import PdfName
```



---
## PdfArray
```python
from PdfParser import PdfArray
```



---
## PdfDict
```python
from PdfParser import PdfDict
```



---
## PdfBinary
```python
from PdfParser import PdfBinary
```



---
## PdfStream
```python
from PdfParser import PdfStream
```



---
## pdf_repr
```python
from PdfParser import pdf_repr
```



---
## PdfParser
```python
from PdfParser import PdfParser
```

Based on
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
Supports PDF up to 1.4

---
## __str__
```python
from PdfParser import __str__
```



---
## __bytes__
```python
from PdfParser import __bytes__
```



---
## __eq__
```python
from PdfParser import __eq__
```



---
## __ne__
```python
from PdfParser import __ne__
```



---
## __hash__
```python
from PdfParser import __hash__
```



---
## __init__
```python
from PdfParser import __init__
```



---
## __setitem__
```python
from PdfParser import __setitem__
```



---
## __getitem__
```python
from PdfParser import __getitem__
```



---
## __delitem__
```python
from PdfParser import __delitem__
```



---
## __contains__
```python
from PdfParser import __contains__
```



---
## __len__
```python
from PdfParser import __len__
```



---
## keys
```python
from PdfParser import keys
```



---
## write
```python
from PdfParser import write
```



---
## name_as_str
```python
from PdfParser import name_as_str
```



---
## __repr__
```python
from PdfParser import __repr__
```



---
## from_pdf_stream
```python
from PdfParser import from_pdf_stream
```



---
## __setattr__
```python
from PdfParser import __setattr__
```



---
## __getattr__
```python
from PdfParser import __getattr__
```



---
## decode
```python
from PdfParser import decode
```



---
## __enter__
```python
from PdfParser import __enter__
```



---
## __exit__
```python
from PdfParser import __exit__
```



---
## start_writing
```python
from PdfParser import start_writing
```



---
## close_buf
```python
from PdfParser import close_buf
```



---
## close
```python
from PdfParser import close
```



---
## seek_end
```python
from PdfParser import seek_end
```



---
## write_header
```python
from PdfParser import write_header
```



---
## write_comment
```python
from PdfParser import write_comment
```



---
## write_catalog
```python
from PdfParser import write_catalog
```



---
## rewrite_pages
```python
from PdfParser import rewrite_pages
```



---
## write_xref_and_trailer
```python
from PdfParser import write_xref_and_trailer
```



---
## write_page
```python
from PdfParser import write_page
```



---
## write_obj
```python
from PdfParser import write_obj
```



---
## del_root
```python
from PdfParser import del_root
```



---
## get_buf_from_file
```python
from PdfParser import get_buf_from_file
```



---
## read_pdf_info
```python
from PdfParser import read_pdf_info
```



---
## next_object_id
```python
from PdfParser import next_object_id
```



---
## read_trailer
```python
from PdfParser import read_trailer
```



---
## read_prev_trailer
```python
from PdfParser import read_prev_trailer
```



---
## interpret_trailer
```python
from PdfParser import interpret_trailer
```



---
## interpret_name
```python
from PdfParser import interpret_name
```



---
## get_value
```python
from PdfParser import get_value
```



---
## get_literal_string
```python
from PdfParser import get_literal_string
```



---
## read_xref_table
```python
from PdfParser import read_xref_table
```



---
## read_indirect
```python
from PdfParser import read_indirect
```



---
## linearize_page_tree
```python
from PdfParser import linearize_page_tree
```



---
## __name__
```python
from ExifTags import __name__
```

This module provides constants and clear-text names for various
well-known EXIF tags.

---
## Base
```python
from ExifTags import Base
```



---
## GPS
```python
from ExifTags import GPS
```



---
## Interop
```python
from ExifTags import Interop
```



---
## IFD
```python
from ExifTags import IFD
```



---
## LightSource
```python
from ExifTags import LightSource
```



---
## __name__
```python
from ImageCms import __name__
```



---
## __getattr__
```python
from ImageCms import __getattr__
```



---
## Intent
```python
from ImageCms import Intent
```



---
## Direction
```python
from ImageCms import Direction
```



---
## Flags
```python
from ImageCms import Flags
```

Flags and documentation are taken from ``lcms2.h``.

---
## ImageCmsProfile
```python
from ImageCms import ImageCmsProfile
```



---
## ImageCmsTransform
```python
from ImageCms import ImageCmsTransform
```

Transform.  This can be used with the procedural API, or with the standard
:py:func:`~PIL.Image.Image.point` method.

Will return the output profile in the ``output.info['icc_profile']``.

---
## get_display_profile
```python
from ImageCms import get_display_profile
```

(experimental) Fetches the profile for the current display device.

:returns: ``None`` if the profile is not known.

---
## PyCMSError
```python
from ImageCms import PyCMSError
```

(pyCMS) Exception class.
This is used for all errors in the pyCMS API.

---
## profileToProfile
```python
from ImageCms import profileToProfile
```

(pyCMS) Applies an ICC transformation to a given image, mapping from
``inputProfile`` to ``outputProfile``.

If the input or output profiles specified are not valid filenames, a
:exc:`PyCMSError` will be raised.  If ``inPlace`` is ``True`` and
``outputMode != im.mode``, a :exc:`PyCMSError` will be raised.
If an error occurs during application of the profiles,
a :exc:`PyCMSError` will be raised.
If ``outputMode`` is not a mode supported by the ``outputProfile`` (or by pyCMS),
a :exc:`PyCMSError` will be raised.

This function applies an ICC transformation to im from ``inputProfile``'s
color space to ``outputProfile``'s color space using the specified rendering
intent to decide how to handle out-of-gamut colors.

``outputMode`` can be used to specify that a color mode conversion is to
be done using these profiles, but the specified profiles must be able
to handle that mode.  I.e., if converting im from RGB to CMYK using
profiles, the input profile must handle RGB data, and the output
profile must handle CMYK data.

:param im: An open :py:class:`~PIL.Image.Image` object (i.e. Image.new(...)
    or Image.open(...), etc.)
:param inputProfile: String, as a valid filename path to the ICC input
    profile you wish to use for this image, or a profile object
:param outputProfile: String, as a valid filename path to the ICC output
    profile you wish to use for this image, or a profile object
:param renderingIntent: Integer (0-3) specifying the rendering intent you
    wish to use for the transform

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
    they do.
:param outputMode: A valid PIL mode for the output image (i.e. "RGB",
    "CMYK", etc.).  Note: if rendering the image "inPlace", outputMode
    MUST be the same mode as the input, or omitted completely.  If
    omitted, the outputMode will be the same as the mode of the input
    image (im.mode)
:param inPlace: Boolean.  If ``True``, the original image is modified in-place,
    and ``None`` is returned.  If ``False`` (default), a new
    :py:class:`~PIL.Image.Image` object is returned with the transform applied.
:param flags: Integer (0-...) specifying additional flags
:returns: Either None or a new :py:class:`~PIL.Image.Image` object, depending on
    the value of ``inPlace``
:exception PyCMSError:

---
## getOpenProfile
```python
from ImageCms import getOpenProfile
```

(pyCMS) Opens an ICC profile file.

The PyCMSProfile object can be passed back into pyCMS for use in creating
transforms and such (as in ImageCms.buildTransformFromOpenProfiles()).

If ``profileFilename`` is not a valid filename for an ICC profile,
a :exc:`PyCMSError` will be raised.

:param profileFilename: String, as a valid filename path to the ICC profile
    you wish to open, or a file-like object.
:returns: A CmsProfile class object.
:exception PyCMSError:

---
## buildTransform
```python
from ImageCms import buildTransform
```

(pyCMS) Builds an ICC transform mapping from the ``inputProfile`` to the
``outputProfile``. Use applyTransform to apply the transform to a given
image.

If the input or output profiles specified are not valid filenames, a
:exc:`PyCMSError` will be raised. If an error occurs during creation
of the transform, a :exc:`PyCMSError` will be raised.

If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a :exc:`PyCMSError` will be raised.

This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile`` using the ``renderingIntent`` to determine what to do
with out-of-gamut colors.  It will ONLY work for converting images that
are in ``inMode`` to images that are in ``outMode`` color format (PIL mode,
i.e. "RGB", "RGBA", "CMYK", etc.).

Building the transform is a fair part of the overhead in
ImageCms.profileToProfile(), so if you're planning on converting multiple
images using the same input/output settings, this can save you time.
Once you have a transform object, it can be used with
ImageCms.applyProfile() to convert images without the need to re-compute
the lookup table for the transform.

The reason pyCMS returns a class object rather than a handle directly
to the transform is that it needs to keep track of the PIL input/output
modes that the transform is meant for.  These attributes are stored in
the ``inMode`` and ``outMode`` attributes of the object (which can be
manually overridden if you really want to, but I don't know of any
time that would be of use, or would even work).

:param inputProfile: String, as a valid filename path to the ICC input
    profile you wish to use for this transform, or a profile object
:param outputProfile: String, as a valid filename path to the ICC output
    profile you wish to use for this transform, or a profile object
:param inMode: String, as a valid PIL mode that the appropriate profile
    also supports (i.e. "RGB", "RGBA", "CMYK", etc.)
:param outMode: String, as a valid PIL mode that the appropriate profile
    also supports (i.e. "RGB", "RGBA", "CMYK", etc.)
:param renderingIntent: Integer (0-3) specifying the rendering intent you
    wish to use for the transform

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
    they do.
:param flags: Integer (0-...) specifying additional flags
:returns: A CmsTransform class object.
:exception PyCMSError:

---
## buildProofTransform
```python
from ImageCms import buildProofTransform
```

(pyCMS) Builds an ICC transform mapping from the ``inputProfile`` to the
``outputProfile``, but tries to simulate the result that would be
obtained on the ``proofProfile`` device.

If the input, output, or proof profiles specified are not valid
filenames, a :exc:`PyCMSError` will be raised.

If an error occurs during creation of the transform,
a :exc:`PyCMSError` will be raised.

If ``inMode`` or ``outMode`` are not a mode supported by the ``outputProfile``
(or by pyCMS), a :exc:`PyCMSError` will be raised.

This function builds and returns an ICC transform from the ``inputProfile``
to the ``outputProfile``, but tries to simulate the result that would be
obtained on the ``proofProfile`` device using ``renderingIntent`` and
``proofRenderingIntent`` to determine what to do with out-of-gamut
colors.  This is known as "soft-proofing".  It will ONLY work for
converting images that are in ``inMode`` to images that are in outMode
color format (PIL mode, i.e. "RGB", "RGBA", "CMYK", etc.).

Usage of the resulting transform object is exactly the same as with
ImageCms.buildTransform().

Proof profiling is generally used when using an output device to get a
good idea of what the final printed/displayed image would look like on
the ``proofProfile`` device when it's quicker and easier to use the
output device for judging color.  Generally, this means that the
output device is a monitor, or a dye-sub printer (etc.), and the simulated
device is something more expensive, complicated, or time consuming
(making it difficult to make a real print for color judgement purposes).

Soft-proofing basically functions by adjusting the colors on the
output device to match the colors of the device being simulated. However,
when the simulated device has a much wider gamut than the output
device, you may obtain marginal results.

:param inputProfile: String, as a valid filename path to the ICC input
    profile you wish to use for this transform, or a profile object
:param outputProfile: String, as a valid filename path to the ICC output
    (monitor, usually) profile you wish to use for this transform, or a
    profile object
:param proofProfile: String, as a valid filename path to the ICC proof
    profile you wish to use for this transform, or a profile object
:param inMode: String, as a valid PIL mode that the appropriate profile
    also supports (i.e. "RGB", "RGBA", "CMYK", etc.)
:param outMode: String, as a valid PIL mode that the appropriate profile
    also supports (i.e. "RGB", "RGBA", "CMYK", etc.)
:param renderingIntent: Integer (0-3) specifying the rendering intent you
    wish to use for the input->proof (simulated) transform

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
    they do.
:param proofRenderingIntent: Integer (0-3) specifying the rendering intent
    you wish to use for proof->output transform

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
    they do.
:param flags: Integer (0-...) specifying additional flags
:returns: A CmsTransform class object.
:exception PyCMSError:

---
## applyTransform
```python
from ImageCms import applyTransform
```

(pyCMS) Applies a transform to a given image.

If ``im.mode != transform.input_mode``, a :exc:`PyCMSError` is raised.

If ``inPlace`` is ``True`` and ``transform.input_mode != transform.output_mode``, a
:exc:`PyCMSError` is raised.

If ``im.mode``, ``transform.input_mode`` or ``transform.output_mode`` is not
supported by pyCMSdll or the profiles you used for the transform, a
:exc:`PyCMSError` is raised.

If an error occurs while the transform is being applied,
a :exc:`PyCMSError` is raised.

This function applies a pre-calculated transform (from
ImageCms.buildTransform() or ImageCms.buildTransformFromOpenProfiles())
to an image. The transform can be used for multiple images, saving
considerable calculation time if doing the same conversion multiple times.

If you want to modify im in-place instead of receiving a new image as
the return value, set ``inPlace`` to ``True``.  This can only be done if
``transform.input_mode`` and ``transform.output_mode`` are the same, because we
can't change the mode in-place (the buffer sizes for some modes are
different).  The default behavior is to return a new :py:class:`~PIL.Image.Image`
object of the same dimensions in mode ``transform.output_mode``.

:param im: An :py:class:`~PIL.Image.Image` object, and ``im.mode`` must be the same
    as the ``input_mode`` supported by the transform.
:param transform: A valid CmsTransform class object
:param inPlace: Bool.  If ``True``, ``im`` is modified in place and ``None`` is
    returned, if ``False``, a new :py:class:`~PIL.Image.Image` object with the
    transform applied is returned (and ``im`` is not changed). The default is
    ``False``.
:returns: Either ``None``, or a new :py:class:`~PIL.Image.Image` object,
    depending on the value of ``inPlace``. The profile will be returned in
    the image's ``info['icc_profile']``.
:exception PyCMSError:

---
## createProfile
```python
from ImageCms import createProfile
```

(pyCMS) Creates a profile.

If colorSpace not in ``["LAB", "XYZ", "sRGB"]``,
a :exc:`PyCMSError` is raised.

If using LAB and ``colorTemp`` is not a positive integer,
a :exc:`PyCMSError` is raised.

If an error occurs while creating the profile,
a :exc:`PyCMSError` is raised.

Use this function to create common profiles on-the-fly instead of
having to supply a profile on disk and knowing the path to it.  It
returns a normal CmsProfile object that can be passed to
ImageCms.buildTransformFromOpenProfiles() to create a transform to apply
to images.

:param colorSpace: String, the color space of the profile you wish to
    create.
    Currently only "LAB", "XYZ", and "sRGB" are supported.
:param colorTemp: Positive number for the white point for the profile, in
    degrees Kelvin (i.e. 5000, 6500, 9600, etc.).  The default is for D50
    illuminant if omitted (5000k).  colorTemp is ONLY applied to LAB
    profiles, and is ignored for XYZ and sRGB.
:returns: A CmsProfile class object
:exception PyCMSError:

---
## getProfileName
```python
from ImageCms import getProfileName
```

(pyCMS) Gets the internal product name for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile,
a :exc:`PyCMSError` is raised If an error occurs while trying
to obtain the name tag, a :exc:`PyCMSError` is raised.

Use this function to obtain the INTERNAL name of the profile (stored
in an ICC tag in the profile itself), usually the one used when the
profile was originally created.  Sometimes this tag also contains
additional information supplied by the creator.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal name of the profile as stored
    in an ICC tag.
:exception PyCMSError:

---
## getProfileInfo
```python
from ImageCms import getProfileInfo
```

(pyCMS) Gets the internal product information for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile,
a :exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the info tag,
a :exc:`PyCMSError` is raised.

Use this function to obtain the information stored in the profile's
info tag.  This often contains details about the profile, and how it
was created, as supplied by the creator.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal profile information stored in
    an ICC tag.
:exception PyCMSError:

---
## getProfileCopyright
```python
from ImageCms import getProfileCopyright
```

(pyCMS) Gets the copyright for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
:exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the copyright tag,
a :exc:`PyCMSError` is raised.

Use this function to obtain the information stored in the profile's
copyright tag.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal profile information stored in
    an ICC tag.
:exception PyCMSError:

---
## getProfileManufacturer
```python
from ImageCms import getProfileManufacturer
```

(pyCMS) Gets the manufacturer for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
:exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the manufacturer tag, a
:exc:`PyCMSError` is raised.

Use this function to obtain the information stored in the profile's
manufacturer tag.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal profile information stored in
    an ICC tag.
:exception PyCMSError:

---
## getProfileModel
```python
from ImageCms import getProfileModel
```

(pyCMS) Gets the model for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
:exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the model tag,
a :exc:`PyCMSError` is raised.

Use this function to obtain the information stored in the profile's
model tag.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal profile information stored in
    an ICC tag.
:exception PyCMSError:

---
## getProfileDescription
```python
from ImageCms import getProfileDescription
```

(pyCMS) Gets the description for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
:exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the description tag,
a :exc:`PyCMSError` is raised.

Use this function to obtain the information stored in the profile's
description tag.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: A string containing the internal profile information stored in an
    ICC tag.
:exception PyCMSError:

---
## getDefaultIntent
```python
from ImageCms import getDefaultIntent
```

(pyCMS) Gets the default intent name for the given profile.

If ``profile`` isn't a valid CmsProfile object or filename to a profile, a
:exc:`PyCMSError` is raised.

If an error occurs while trying to obtain the default intent, a
:exc:`PyCMSError` is raised.

Use this function to determine the default (and usually best optimized)
rendering intent for this profile.  Most profiles support multiple
rendering intents, but are intended mostly for one type of conversion.
If you wish to use a different intent than returned, use
ImageCms.isIntentSupported() to verify it will work first.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:returns: Integer 0-3 specifying the default rendering intent for this
    profile.

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
        they do.
:exception PyCMSError:

---
## isIntentSupported
```python
from ImageCms import isIntentSupported
```

(pyCMS) Checks if a given intent is supported.

Use this function to verify that you can use your desired
``intent`` with ``profile``, and that ``profile`` can be used for the
input/output/proof profile as you desire.

Some profiles are created specifically for one "direction", can cannot
be used for others. Some profiles can only be used for certain
rendering intents, so it's best to either verify this before trying
to create a transform with them (using this function), or catch the
potential :exc:`PyCMSError` that will occur if they don't
support the modes you select.

:param profile: EITHER a valid CmsProfile object, OR a string of the
    filename of an ICC profile.
:param intent: Integer (0-3) specifying the rendering intent you wish to
    use with this profile

        ImageCms.Intent.PERCEPTUAL            = 0 (DEFAULT)
        ImageCms.Intent.RELATIVE_COLORIMETRIC = 1
        ImageCms.Intent.SATURATION            = 2
        ImageCms.Intent.ABSOLUTE_COLORIMETRIC = 3

    see the pyCMS documentation for details on rendering intents and what
        they do.
:param direction: Integer specifying if the profile is to be used for
    input, output, or proof

        INPUT  = 0 (or use ImageCms.Direction.INPUT)
        OUTPUT = 1 (or use ImageCms.Direction.OUTPUT)
        PROOF  = 2 (or use ImageCms.Direction.PROOF)

:returns: 1 if the intent/direction are supported, -1 if they are not.
:exception PyCMSError:

---
## versions
```python
from ImageCms import versions
```

(pyCMS) Fetches versions.

---
## GRIDPOINTS
```python
from ImageCms import GRIDPOINTS
```

Fine-tune control over number of gridpoints

:param n: :py:class:`int` in range ``0 <= n <= 255``

---
## __init__
```python
from ImageCms import __init__
```



---
## _set
```python
from ImageCms import _set
```



---
## tobytes
```python
from ImageCms import tobytes
```

Returns the profile in a format suitable for embedding in
saved images.

:returns: a bytes object containing the ICC profile.

---
## point
```python
from ImageCms import point
```



---
## apply
```python
from ImageCms import apply
```



---
## apply_in_place
```python
from ImageCms import apply_in_place
```



---
## __name__
```python
from FpxImagePlugin import __name__
```



---
## _accept
```python
from FpxImagePlugin import _accept
```



---
## FpxImageFile
```python
from FpxImagePlugin import FpxImageFile
```



---
## _open
```python
from FpxImagePlugin import _open
```



---
## _open_index
```python
from FpxImagePlugin import _open_index
```



---
## _open_subimage
```python
from FpxImagePlugin import _open_subimage
```



---
## load
```python
from FpxImagePlugin import load
```



---
## close
```python
from FpxImagePlugin import close
```



---
## __exit__
```python
from FpxImagePlugin import __exit__
```



---
## __name__
```python
from ImageChops import __name__
```



---
## constant
```python
from ImageChops import constant
```

Fill a channel with a given gray level.

:rtype: :py:class:`~PIL.Image.Image`

---
## duplicate
```python
from ImageChops import duplicate
```

Copy a channel. Alias for :py:meth:`PIL.Image.Image.copy`.

:rtype: :py:class:`~PIL.Image.Image`

---
## invert
```python
from ImageChops import invert
```

Invert an image (channel). ::

    out = MAX - image

:rtype: :py:class:`~PIL.Image.Image`

---
## lighter
```python
from ImageChops import lighter
```

Compares the two images, pixel by pixel, and returns a new image containing
the lighter values. ::

    out = max(image1, image2)

:rtype: :py:class:`~PIL.Image.Image`

---
## darker
```python
from ImageChops import darker
```

Compares the two images, pixel by pixel, and returns a new image containing
the darker values. ::

    out = min(image1, image2)

:rtype: :py:class:`~PIL.Image.Image`

---
## difference
```python
from ImageChops import difference
```

Returns the absolute value of the pixel-by-pixel difference between the two
images. ::

    out = abs(image1 - image2)

:rtype: :py:class:`~PIL.Image.Image`

---
## multiply
```python
from ImageChops import multiply
```

Superimposes two images on top of each other.

If you multiply an image with a solid black image, the result is black. If
you multiply with a solid white image, the image is unaffected. ::

    out = image1 * image2 / MAX

:rtype: :py:class:`~PIL.Image.Image`

---
## screen
```python
from ImageChops import screen
```

Superimposes two inverted images on top of each other. ::

    out = MAX - ((MAX - image1) * (MAX - image2) / MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## soft_light
```python
from ImageChops import soft_light
```

Superimposes two images on top of each other using the Soft Light algorithm

:rtype: :py:class:`~PIL.Image.Image`

---
## hard_light
```python
from ImageChops import hard_light
```

Superimposes two images on top of each other using the Hard Light algorithm

:rtype: :py:class:`~PIL.Image.Image`

---
## overlay
```python
from ImageChops import overlay
```

Superimposes two images on top of each other using the Overlay algorithm

:rtype: :py:class:`~PIL.Image.Image`

---
## add
```python
from ImageChops import add
```

Adds two images, dividing the result by scale and adding the
offset. If omitted, scale defaults to 1.0, and offset to 0.0. ::

    out = ((image1 + image2) / scale + offset)

:rtype: :py:class:`~PIL.Image.Image`

---
## subtract
```python
from ImageChops import subtract
```

Subtracts two images, dividing the result by scale and adding the offset.
If omitted, scale defaults to 1.0, and offset to 0.0. ::

    out = ((image1 - image2) / scale + offset)

:rtype: :py:class:`~PIL.Image.Image`

---
## add_modulo
```python
from ImageChops import add_modulo
```

Add two images, without clipping the result. ::

    out = ((image1 + image2) % MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## subtract_modulo
```python
from ImageChops import subtract_modulo
```

Subtract two images, without clipping the result. ::

    out = ((image1 - image2) % MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## logical_and
```python
from ImageChops import logical_and
```

Logical AND between two images.

Both of the images must have mode "1". If you would like to perform a
logical AND on an image with a mode other than "1", try
:py:meth:`~PIL.ImageChops.multiply` instead, using a black-and-white mask
as the second image. ::

    out = ((image1 and image2) % MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## logical_or
```python
from ImageChops import logical_or
```

Logical OR between two images.

Both of the images must have mode "1". ::

    out = ((image1 or image2) % MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## logical_xor
```python
from ImageChops import logical_xor
```

Logical XOR between two images.

Both of the images must have mode "1". ::

    out = ((bool(image1) != bool(image2)) % MAX)

:rtype: :py:class:`~PIL.Image.Image`

---
## blend
```python
from ImageChops import blend
```

Blend images using constant transparency weight. Alias for
:py:func:`PIL.Image.blend`.

:rtype: :py:class:`~PIL.Image.Image`

---
## composite
```python
from ImageChops import composite
```

Create composite using transparency mask. Alias for
:py:func:`PIL.Image.composite`.

:rtype: :py:class:`~PIL.Image.Image`

---
## offset
```python
from ImageChops import offset
```

Returns a copy of the image where data has been offset by the given
distances. Data wraps around the edges. If ``yoffset`` is omitted, it
is assumed to be equal to ``xoffset``.

:param image: Input image.
:param xoffset: The horizontal distance.
:param yoffset: The vertical distance.  If omitted, both
    distances are set to the same value.
:rtype: :py:class:`~PIL.Image.Image`

---
## __name__
```python
from _deprecate import __name__
```



---
## deprecate
```python
from _deprecate import deprecate
```

Deprecations helper.

:param deprecated: Name of thing to be deprecated.
:param when: Pillow major version to be removed in.
:param replacement: Name of replacement.
:param action: Instead of "replacement", give a custom call to action
    e.g. "Upgrade to new thing".
:param plural: if the deprecated thing is plural, needing "are" instead of "is".

Usually of the form:

    "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd).
    Use [replacement] instead."

You can leave out the replacement sentence:

    "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd)"

Or with another call to action:

    "[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd).
    [action]."

---
## __name__
```python
from BufrStubImagePlugin import __name__
```



---
## register_handler
```python
from BufrStubImagePlugin import register_handler
```

Install application-specific BUFR image handler.

:param handler: Handler object.

---
## _accept
```python
from BufrStubImagePlugin import _accept
```



---
## BufrStubImageFile
```python
from BufrStubImagePlugin import BufrStubImageFile
```



---
## _save
```python
from BufrStubImagePlugin import _save
```



---
## _open
```python
from BufrStubImagePlugin import _open
```



---
## _load
```python
from BufrStubImagePlugin import _load
```



---
## __name__
```python
from PSDraw import __name__
```



---
## PSDraw
```python
from PSDraw import PSDraw
```

Sets up printing to the given file. If ``fp`` is omitted,
``sys.stdout.buffer`` or ``sys.stdout`` is assumed.

---
## __init__
```python
from PSDraw import __init__
```



---
## begin_document
```python
from PSDraw import begin_document
```

Set up printing of a document. (Write PostScript DSC header.)

---
## end_document
```python
from PSDraw import end_document
```

Ends printing. (Write PostScript DSC footer.)

---
## setfont
```python
from PSDraw import setfont
```

Selects which font to use.

:param font: A PostScript font name
:param size: Size in points.

---
## line
```python
from PSDraw import line
```

Draws a line between the two points. Coordinates are given in
PostScript point coordinates (72 points per inch, (0, 0) is the lower
left corner of the page).

---
## rectangle
```python
from PSDraw import rectangle
```

Draws a rectangle.

:param box: A tuple of four integers, specifying left, bottom, width and
   height.

---
## text
```python
from PSDraw import text
```

Draws text at the given position. You must use
:py:meth:`~PIL.PSDraw.PSDraw.setfont` before calling this method.

---
## image
```python
from PSDraw import image
```

Draw a PIL image, centered in the given box.

---
## __name__
```python
from PcdImagePlugin import __name__
```



---
## PcdImageFile
```python
from PcdImagePlugin import PcdImageFile
```



---
## _open
```python
from PcdImagePlugin import _open
```



---
## load_end
```python
from PcdImagePlugin import load_end
```



---
## __name__
```python
from ImageFilter import __name__
```



---
## Filter
```python
from ImageFilter import Filter
```



---
## MultibandFilter
```python
from ImageFilter import MultibandFilter
```



---
## BuiltinFilter
```python
from ImageFilter import BuiltinFilter
```



---
## Kernel
```python
from ImageFilter import Kernel
```

Create a convolution kernel. This only supports 3x3 and 5x5 integer and floating
point kernels.

Kernels can only be applied to "L" and "RGB" images.

:param size: Kernel size, given as (width, height). This must be (3,3) or (5,5).
:param kernel: A sequence containing kernel weights. The kernel will be flipped
               vertically before being applied to the image.
:param scale: Scale factor. If given, the result for each pixel is divided by this
              value. The default is the sum of the kernel weights.
:param offset: Offset. If given, this value is added to the result, after it has
               been divided by the scale factor.

---
## RankFilter
```python
from ImageFilter import RankFilter
```

Create a rank filter.  The rank filter sorts all pixels in
a window of the given size, and returns the ``rank``'th value.

:param size: The kernel size, in pixels.
:param rank: What pixel value to pick.  Use 0 for a min filter,
             ``size * size / 2`` for a median filter, ``size * size - 1``
             for a max filter, etc.

---
## MedianFilter
```python
from ImageFilter import MedianFilter
```

Create a median filter. Picks the median pixel value in a window with the
given size.

:param size: The kernel size, in pixels.

---
## MinFilter
```python
from ImageFilter import MinFilter
```

Create a min filter.  Picks the lowest pixel value in a window with the
given size.

:param size: The kernel size, in pixels.

---
## MaxFilter
```python
from ImageFilter import MaxFilter
```

Create a max filter.  Picks the largest pixel value in a window with the
given size.

:param size: The kernel size, in pixels.

---
## ModeFilter
```python
from ImageFilter import ModeFilter
```

Create a mode filter. Picks the most frequent pixel value in a box with the
given size.  Pixel values that occur only once or twice are ignored; if no
pixel value occurs more than twice, the original pixel value is preserved.

:param size: The kernel size, in pixels.

---
## GaussianBlur
```python
from ImageFilter import GaussianBlur
```

Blurs the image with a sequence of extended box filters, which
approximates a Gaussian kernel. For details on accuracy see
<https://www.mia.uni-saarland.de/Publications/gwosdek-ssvm11.pdf>

:param radius: Standard deviation of the Gaussian kernel. Either a sequence of two
               numbers for x and y, or a single number for both.

---
## BoxBlur
```python
from ImageFilter import BoxBlur
```

Blurs the image by setting each pixel to the average value of the pixels
in a square box extending radius pixels in each direction.
Supports float radius of arbitrary size. Uses an optimized implementation
which runs in linear time relative to the size of the image
for any radius value.

:param radius: Size of the box in a direction. Either a sequence of two numbers for
               x and y, or a single number for both.

               Radius 0 does not blur, returns an identical image.
               Radius 1 takes 1 pixel in each direction, i.e. 9 pixels in total.

---
## UnsharpMask
```python
from ImageFilter import UnsharpMask
```

Unsharp mask filter.

See Wikipedia's entry on `digital unsharp masking`_ for an explanation of
the parameters.

:param radius: Blur Radius
:param percent: Unsharp strength, in percent
:param threshold: Threshold controls the minimum brightness change that
  will be sharpened

.. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking

---
## BLUR
```python
from ImageFilter import BLUR
```



---
## CONTOUR
```python
from ImageFilter import CONTOUR
```



---
## DETAIL
```python
from ImageFilter import DETAIL
```



---
## EDGE_ENHANCE
```python
from ImageFilter import EDGE_ENHANCE
```



---
## EDGE_ENHANCE_MORE
```python
from ImageFilter import EDGE_ENHANCE_MORE
```



---
## EMBOSS
```python
from ImageFilter import EMBOSS
```



---
## FIND_EDGES
```python
from ImageFilter import FIND_EDGES
```



---
## SHARPEN
```python
from ImageFilter import SHARPEN
```



---
## SMOOTH
```python
from ImageFilter import SMOOTH
```



---
## SMOOTH_MORE
```python
from ImageFilter import SMOOTH_MORE
```



---
## Color3DLUT
```python
from ImageFilter import Color3DLUT
```

Three-dimensional color lookup table.

Transforms 3-channel pixels using the values of the channels as coordinates
in the 3D lookup table and interpolating the nearest elements.

This method allows you to apply almost any color transformation
in constant time by using pre-calculated decimated tables.

.. versionadded:: 5.2.0

:param size: Size of the table. One int or tuple of (int, int, int).
             Minimal size in any dimension is 2, maximum is 65.
:param table: Flat lookup table. A list of ``channels * size**3``
              float elements or a list of ``size**3`` channels-sized
              tuples with floats. Channels are changed first,
              then first dimension, then second, then third.
              Value 0.0 corresponds lowest value of output, 1.0 highest.
:param channels: Number of channels in the table. Could be 3 or 4.
                 Default is 3.
:param target_mode: A mode for the result image. Should have not less
                    than ``channels`` channels. Default is ``None``,
                    which means that mode wouldn't be changed.

---
## filter
```python
from ImageFilter import filter
```



---
## __init__
```python
from ImageFilter import __init__
```



---
## _check_size
```python
from ImageFilter import _check_size
```



---
## generate
```python
from ImageFilter import generate
```

Generates new LUT using provided callback.

:param size: Size of the table. Passed to the constructor.
:param callback: Function with three parameters which correspond
                 three color channels. Will be called ``size**3``
                 times with values from 0.0 to 1.0 and should return
                 a tuple with ``channels`` elements.
:param channels: The number of channels which should return callback.
:param target_mode: Passed to the constructor of the resulting
                    lookup table.

---
## transform
```python
from ImageFilter import transform
```

Transforms the table values using provided callback and returns
a new LUT with altered values.

:param callback: A function which takes old lookup table values
                 and returns a new set of values. The number
                 of arguments which function should take is
                 ``self.channels`` or ``3 + self.channels``
                 if ``with_normals`` flag is set.
                 Should return a tuple of ``self.channels`` or
                 ``channels`` elements if it is set.
:param with_normals: If true, ``callback`` will be called with
                     coordinates in the color cube as the first
                     three arguments. Otherwise, ``callback``
                     will be called only with actual color values.
:param channels: The number of channels in the resulting lookup table.
:param target_mode: Passed to the constructor of the resulting
                    lookup table.

---
## __repr__
```python
from ImageFilter import __repr__
```



---
## __name__
```python
from ImageDraw2 import __name__
```

(Experimental) WCK-style drawing interface operations

.. seealso:: :py:mod:`PIL.ImageDraw`

---
## Pen
```python
from ImageDraw2 import Pen
```

Stores an outline color and width.

---
## Brush
```python
from ImageDraw2 import Brush
```

Stores a fill color

---
## Font
```python
from ImageDraw2 import Font
```

Stores a TrueType font and color

---
## Draw
```python
from ImageDraw2 import Draw
```

(Experimental) WCK-style drawing interface

---
## __init__
```python
from ImageDraw2 import __init__
```



---
## flush
```python
from ImageDraw2 import flush
```



---
## render
```python
from ImageDraw2 import render
```



---
## settransform
```python
from ImageDraw2 import settransform
```

Sets a transformation offset.

---
## arc
```python
from ImageDraw2 import arc
```

Draws an arc (a portion of a circle outline) between the start and end
angles, inside the given bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.arc`

---
## chord
```python
from ImageDraw2 import chord
```

Same as :py:meth:`~PIL.ImageDraw2.Draw.arc`, but connects the end points
with a straight line.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.chord`

---
## ellipse
```python
from ImageDraw2 import ellipse
```

Draws an ellipse inside the given bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.ellipse`

---
## line
```python
from ImageDraw2 import line
```

Draws a line between the coordinates in the ``xy`` list.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.line`

---
## pieslice
```python
from ImageDraw2 import pieslice
```

Same as arc, but also draws straight lines between the end points and the
center of the bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.pieslice`

---
## polygon
```python
from ImageDraw2 import polygon
```

Draws a polygon.

The polygon outline consists of straight lines between the given
coordinates, plus a straight line between the last and the first
coordinate.


.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.polygon`

---
## rectangle
```python
from ImageDraw2 import rectangle
```

Draws a rectangle.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.rectangle`

---
## text
```python
from ImageDraw2 import text
```

Draws the string at the given position.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.text`

---
## textbbox
```python
from ImageDraw2 import textbbox
```

Returns bounding box (in pixels) of given text.

:return: ``(left, top, right, bottom)`` bounding box

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textbbox`

---
## textlength
```python
from ImageDraw2 import textlength
```

Returns length (in pixels) of given text.
This is the amount by which following text should be offset.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textlength`

---
## __name__
```python
from ImagePath import __name__
```



---
## __name__
```python
from DcxImagePlugin import __name__
```



---
## _accept
```python
from DcxImagePlugin import _accept
```



---
## DcxImageFile
```python
from DcxImagePlugin import DcxImageFile
```



---
## _open
```python
from DcxImagePlugin import _open
```



---
## seek
```python
from DcxImagePlugin import seek
```



---
## tell
```python
from DcxImagePlugin import tell
```



---
## UnidentifiedImageError
```python
from __init__ import UnidentifiedImageError
```

Raised in :py:meth:`PIL.Image.open` if an image cannot be opened and identified.

If a PNG image raises this error, setting :data:`.ImageFile.LOAD_TRUNCATED_IMAGES`
to true may allow the image to be opened after all. The setting will ignore missing
data and checksum failures.

---
## __name__
```python
from JpegPresets import __name__
```

JPEG quality settings equivalent to the Photoshop settings.
Can be used when saving JPEG files.

The following presets are available by default:
``web_low``, ``web_medium``, ``web_high``, ``web_very_high``, ``web_maximum``,
``low``, ``medium``, ``high``, ``maximum``.
More presets can be added to the :py:data:`presets` dict if needed.

To apply the preset, specify::

  quality="preset_name"

To apply only the quantization table::

  qtables="preset_name"

To apply only the subsampling setting::

  subsampling="preset_name"

Example::

  im.save("image_name.jpg", quality="web_high")

Subsampling
-----------

Subsampling is the practice of encoding images by implementing less resolution
for chroma information than for luma information.
(ref.: https://en.wikipedia.org/wiki/Chroma_subsampling)

Possible subsampling values are 0, 1 and 2 that correspond to 4:4:4, 4:2:2 and
4:2:0.

You can get the subsampling of a JPEG with the
:func:`.JpegImagePlugin.get_sampling` function.

In JPEG compressed data a JPEG marker is used instead of an EXIF tag.
(ref.: https://web.archive.org/web/20240227115053/https://exiv2.org/tags.html)


Quantization tables
-------------------

They are values use by the DCT (Discrete cosine transform) to remove
*unnecessary* information from the image (the lossy part of the compression).
(ref.: https://en.wikipedia.org/wiki/Quantization_matrix#Quantization_matrices,
https://en.wikipedia.org/wiki/JPEG#Quantization)

You can get the quantization tables of a JPEG with::

  im.quantization

This will return a dict with a number of lists. You can pass this dict
directly as the qtables argument when saving a JPEG.

The quantization table format in presets is a list with sublists. These formats
are interchangeable.

Libjpeg ref.:
https://web.archive.org/web/20120328125543/http://www.jpegcameras.com/libjpeg/libjpeg-3.html

---
## __name__
```python
from Hdf5StubImagePlugin import __name__
```



---
## register_handler
```python
from Hdf5StubImagePlugin import register_handler
```

Install application-specific HDF5 image handler.

:param handler: Handler object.

---
## _accept
```python
from Hdf5StubImagePlugin import _accept
```



---
## HDF5StubImageFile
```python
from Hdf5StubImagePlugin import HDF5StubImageFile
```



---
## _save
```python
from Hdf5StubImagePlugin import _save
```



---
## _open
```python
from Hdf5StubImagePlugin import _open
```



---
## _load
```python
from Hdf5StubImagePlugin import _load
```



---
## __name__
```python
from features import __name__
```

This class handle features definition in datasets and some utilities to display table type.

---
## check_module
```python
from features import check_module
```

Checks if a module is available.

:param feature: The module to check for.
:returns: ``True`` if available, ``False`` otherwise.
:raises ValueError: If the module is not defined in this version of Pillow.

---
## version_module
```python
from features import version_module
```

:param feature: The module to check for.
:returns:
    The loaded version number as a string, or ``None`` if unknown or not available.
:raises ValueError: If the module is not defined in this version of Pillow.

---
## get_supported_modules
```python
from features import get_supported_modules
```

:returns: A list of all supported modules.

---
## check_codec
```python
from features import check_codec
```

Checks if a codec is available.

:param feature: The codec to check for.
:returns: ``True`` if available, ``False`` otherwise.
:raises ValueError: If the codec is not defined in this version of Pillow.

---
## version_codec
```python
from features import version_codec
```

:param feature: The codec to check for.
:returns:
    The version number as a string, or ``None`` if not available.
    Checked at compile time for ``jpg``, run-time otherwise.
:raises ValueError: If the codec is not defined in this version of Pillow.

---
## get_supported_codecs
```python
from features import get_supported_codecs
```

:returns: A list of all supported codecs.

---
## check_feature
```python
from features import check_feature
```

Checks if a feature is available.

:param feature: The feature to check for.
:returns: ``True`` if available, ``False`` if unavailable, ``None`` if unknown.
:raises ValueError: If the feature is not defined in this version of Pillow.

---
## version_feature
```python
from features import version_feature
```

:param feature: The feature to check for.
:returns: The version number as a string, or ``None`` if not available.
:raises ValueError: If the feature is not defined in this version of Pillow.

---
## get_supported_features
```python
from features import get_supported_features
```

:returns: A list of all supported features.

---
## check
```python
from features import check
```

:param feature: A module, codec, or feature name.
:returns:
    ``True`` if the module, codec, or feature is available,
    ``False`` or ``None`` otherwise.

---
## version
```python
from features import version
```

:param feature:
    The module, codec, or feature to check for.
:returns:
    The version number as a string, or ``None`` if unknown or not available.

---
## get_supported
```python
from features import get_supported
```

:returns: A list of all supported modules, features, and codecs.

---
## pilinfo
```python
from features import pilinfo
```

Prints information about this installation of Pillow.
This function can be called with ``python3 -m PIL``.
It can also be called with ``python3 -m PIL.report`` or ``python3 -m PIL --report``
to have "supported_formats" set to ``False``, omitting the list of all supported
image file formats.

:param out:
    The output stream to print to. Defaults to ``sys.stdout`` if ``None``.
:param supported_formats:
    If ``True``, a list of all supported image file formats will be printed.

---
## __name__
```python
from ImageDraw import __name__
```



---
## ImageDraw
```python
from ImageDraw import ImageDraw
```



---
## Draw
```python
from ImageDraw import Draw
```

A simple 2D drawing interface for PIL images.

:param im: The image to draw in.
:param mode: Optional mode to use for color values.  For RGB
   images, this argument can be RGB or RGBA (to blend the
   drawing into the image).  For all other modes, this argument
   must be the same as the image mode.  If omitted, the mode
   defaults to the mode of the image.

---
## getdraw
```python
from ImageDraw import getdraw
```

:param im: The image to draw in.
:param hints: An optional list of hints. Deprecated.
:returns: A (drawing context, drawing resource factory) tuple.

---
## floodfill
```python
from ImageDraw import floodfill
```

.. warning:: This method is experimental.

Fills a bounded region with a given color.

:param image: Target image.
:param xy: Seed position (a 2-item coordinate tuple). See
    :ref:`coordinate-system`.
:param value: Fill color.
:param border: Optional border value.  If given, the region consists of
    pixels with a color different from the border color.  If not given,
    the region consists of pixels having the same color as the seed
    pixel.
:param thresh: Optional threshold value which specifies a maximum
    tolerable difference of a pixel value from the 'background' in
    order for it to be replaced. Useful for filling regions of
    non-homogeneous, but similar, colors.

---
## _compute_regular_polygon_vertices
```python
from ImageDraw import _compute_regular_polygon_vertices
```

Generate a list of vertices for a 2D regular polygon.

:param bounding_circle: The bounding circle is a sequence defined
    by a point and radius. The polygon is inscribed in this circle.
    (e.g. ``bounding_circle=(x, y, r)`` or ``((x, y), r)``)
:param n_sides: Number of sides
    (e.g. ``n_sides=3`` for a triangle, ``6`` for a hexagon)
:param rotation: Apply an arbitrary rotation to the polygon
    (e.g. ``rotation=90``, applies a 90 degree rotation)
:return: List of regular polygon vertices
    (e.g. ``[(25, 50), (50, 50), (50, 25), (25, 25)]``)

How are the vertices computed?
1. Compute the following variables
    - theta: Angle between the apothem & the nearest polygon vertex
    - side_length: Length of each polygon edge
    - centroid: Center of bounding circle (1st, 2nd elements of bounding_circle)
    - polygon_radius: Polygon radius (last element of bounding_circle)
    - angles: Location of each polygon vertex in polar grid
        (e.g. A square with 0 degree rotation => [225.0, 315.0, 45.0, 135.0])

2. For each angle in angles, get the polygon vertex at that angle
    The vertex is computed using the equation below.
        X= xcos(φ) + ysin(φ)
        Y= −xsin(φ) + ycos(φ)

    Note:
        φ = angle in degrees
        x = 0
        y = polygon_radius

    The formula above assumes rotation around the origin.
    In our case, we are rotating around the centroid.
    To account for this, we use the formula below
        X = xcos(φ) + ysin(φ) + centroid_x
        Y = −xsin(φ) + ycos(φ) + centroid_y

---
## _color_diff
```python
from ImageDraw import _color_diff
```

Uses 1-norm distance to calculate difference between two values.

---
## __init__
```python
from ImageDraw import __init__
```

Create a drawing instance.

:param im: The image to draw in.
:param mode: Optional mode to use for color values.  For RGB
   images, this argument can be RGB or RGBA (to blend the
   drawing into the image).  For all other modes, this argument
   must be the same as the image mode.  If omitted, the mode
   defaults to the mode of the image.

---
## getfont
```python
from ImageDraw import getfont
```

Get the current default font.

To set the default font for this ImageDraw instance::

    from PIL import ImageDraw, ImageFont
    draw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf")

To set the default font for all future ImageDraw instances::

    from PIL import ImageDraw, ImageFont
    ImageDraw.ImageDraw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf")

If the current default font is ``None``,
it is initialized with ``ImageFont.load_default()``.

:returns: An image font.

---
## _getfont
```python
from ImageDraw import _getfont
```



---
## _getink
```python
from ImageDraw import _getink
```



---
## arc
```python
from ImageDraw import arc
```

Draw an arc.

---
## bitmap
```python
from ImageDraw import bitmap
```

Draw a bitmap.

---
## chord
```python
from ImageDraw import chord
```

Draw a chord.

---
## ellipse
```python
from ImageDraw import ellipse
```

Draw an ellipse.

---
## circle
```python
from ImageDraw import circle
```

Draw a circle given center coordinates and a radius.

---
## line
```python
from ImageDraw import line
```

Draw a line, or a connected sequence of line segments.

---
## shape
```python
from ImageDraw import shape
```

(Experimental) Draw a shape.

---
## pieslice
```python
from ImageDraw import pieslice
```

Draw a pieslice.

---
## point
```python
from ImageDraw import point
```

Draw one or more individual pixels.

---
## polygon
```python
from ImageDraw import polygon
```

Draw a polygon.

---
## regular_polygon
```python
from ImageDraw import regular_polygon
```

Draw a regular polygon.

---
## rectangle
```python
from ImageDraw import rectangle
```

Draw a rectangle.

---
## rounded_rectangle
```python
from ImageDraw import rounded_rectangle
```

Draw a rounded rectangle.

---
## _multiline_check
```python
from ImageDraw import _multiline_check
```



---
## _multiline_split
```python
from ImageDraw import _multiline_split
```



---
## _multiline_spacing
```python
from ImageDraw import _multiline_spacing
```



---
## text
```python
from ImageDraw import text
```

Draw text.

---
## multiline_text
```python
from ImageDraw import multiline_text
```



---
## textlength
```python
from ImageDraw import textlength
```

Get the length of a given string, in pixels with 1/64 precision.

---
## textbbox
```python
from ImageDraw import textbbox
```

Get the bounding box of a given string, in pixels.

---
## multiline_textbbox
```python
from ImageDraw import multiline_textbbox
```



---
## _apply_rotation
```python
from ImageDraw import _apply_rotation
```



---
## _compute_polygon_vertex
```python
from ImageDraw import _compute_polygon_vertex
```



---
## _get_angles
```python
from ImageDraw import _get_angles
```



---
## draw_corners
```python
from ImageDraw import draw_corners
```



---
## getink
```python
from ImageDraw import getink
```



---
## draw_text
```python
from ImageDraw import draw_text
```



---
## coord_at_angle
```python
from ImageDraw import coord_at_angle
```



---
## __name__
```python
from GimpGradientFile import __name__
```

Stuff to translate curve segments to palette values (derived from
the corresponding code in GIMP, written by Federico Mena Quintero.
See the GIMP distribution for more information.)

---
## linear
```python
from GimpGradientFile import linear
```



---
## curved
```python
from GimpGradientFile import curved
```



---
## sine
```python
from GimpGradientFile import sine
```



---
## sphere_increasing
```python
from GimpGradientFile import sphere_increasing
```



---
## sphere_decreasing
```python
from GimpGradientFile import sphere_decreasing
```



---
## GradientFile
```python
from GimpGradientFile import GradientFile
```



---
## GimpGradientFile
```python
from GimpGradientFile import GimpGradientFile
```

File handler for GIMP's gradient format.

---
## getpalette
```python
from GimpGradientFile import getpalette
```



---
## __init__
```python
from GimpGradientFile import __init__
```



---
## __name__
```python
from ImageWin import __name__
```



---
## HDC
```python
from ImageWin import HDC
```

Wraps an HDC integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods.

---
## HWND
```python
from ImageWin import HWND
```

Wraps an HWND integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
methods, instead of a DC.

---
## Dib
```python
from ImageWin import Dib
```

A Windows bitmap with the given mode and size.  The mode can be one of "1",
"L", "P", or "RGB".

If the display requires a palette, this constructor creates a suitable
palette and associates it with the image. For an "L" image, 128 graylevels
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
with 20 graylevels.

To make sure that palettes work properly under Windows, you must call the
``palette`` method upon certain events from Windows.

:param image: Either a PIL image, or a mode string. If a mode string is
              used, a size must also be given.  The mode can be one of "1",
              "L", "P", or "RGB".
:param size: If the first argument is a mode string, this
             defines the size of the image.

---
## Window
```python
from ImageWin import Window
```

Create a Window with the given title size.

---
## ImageWindow
```python
from ImageWin import ImageWindow
```

Create an image window which displays the given image.

---
## __init__
```python
from ImageWin import __init__
```



---
## __int__
```python
from ImageWin import __int__
```



---
## expose
```python
from ImageWin import expose
```

Copy the bitmap contents to a device context.

:param handle: Device context (HDC), cast to a Python integer, or an
               HDC or HWND instance.  In PythonWin, you can use
               ``CDC.GetHandleAttrib()`` to get a suitable handle.

---
## draw
```python
from ImageWin import draw
```

Same as expose, but allows you to specify where to draw the image, and
what part of it to draw.

The destination and source areas are given as 4-tuple rectangles. If
the source is omitted, the entire image is copied. If the source and
the destination have different sizes, the image is resized as
necessary.

---
## query_palette
```python
from ImageWin import query_palette
```

Installs the palette associated with the image in the given device
context.

This method should be called upon **QUERYNEWPALETTE** and
**PALETTECHANGED** events from Windows. If this method returns a
non-zero value, one or more display palette entries were changed, and
the image should be redrawn.

:param handle: Device context (HDC), cast to a Python integer, or an
               HDC or HWND instance.
:return: A true value if one or more entries were changed (this
         indicates that the image should be redrawn).

---
## paste
```python
from ImageWin import paste
```

Paste a PIL image into the bitmap image.

:param im: A PIL image.  The size must match the target region.
           If the mode does not match, the image is converted to the
           mode of the bitmap image.
:param box: A 4-tuple defining the left, upper, right, and
            lower pixel coordinate.  See :ref:`coordinate-system`. If
            None is given instead of a tuple, all of the image is
            assumed.

---
## frombytes
```python
from ImageWin import frombytes
```

Load display memory contents from byte data.

:param buffer: A buffer containing display data (usually
               data returned from :py:func:`~PIL.ImageWin.Dib.tobytes`)

---
## tobytes
```python
from ImageWin import tobytes
```

Copy display memory contents to bytes object.

:return: A bytes object containing display data.

---
## __dispatcher
```python
from ImageWin import __dispatcher
```



---
## ui_handle_clear
```python
from ImageWin import ui_handle_clear
```



---
## ui_handle_damage
```python
from ImageWin import ui_handle_damage
```



---
## ui_handle_destroy
```python
from ImageWin import ui_handle_destroy
```



---
## ui_handle_repair
```python
from ImageWin import ui_handle_repair
```



---
## ui_handle_resize
```python
from ImageWin import ui_handle_resize
```



---
## mainloop
```python
from ImageWin import mainloop
```



---
## __name__
```python
from IcoImagePlugin import __name__
```



---
## _save
```python
from IcoImagePlugin import _save
```



---
## _accept
```python
from IcoImagePlugin import _accept
```



---
## IcoFile
```python
from IcoImagePlugin import IcoFile
```



---
## IcoImageFile
```python
from IcoImagePlugin import IcoImageFile
```

PIL read-only image support for Microsoft Windows .ico files.

By default the largest resolution image in the file will be loaded. This
can be changed by altering the 'size' attribute before calling 'load'.

The info dictionary has a key 'sizes' that is a list of the sizes available
in the icon file.

Handles classic, XP and Vista icon formats.

When saving, PNG compression is used. Support for this was only added in
Windows Vista. If you are unable to view the icon in Windows, convert the
image to "RGBA" mode before saving.

This plugin is a refactored version of Win32IconImagePlugin by Bryan Davis
<casadebender@gmail.com>.
https://code.google.com/archive/p/casadebender/wikis/Win32IconImagePlugin.wiki

---
## __init__
```python
from IcoImagePlugin import __init__
```

Parse image from file-like object containing ico file data

---
## sizes
```python
from IcoImagePlugin import sizes
```

Get a list of all available icon sizes and color depths.

---
## getentryindex
```python
from IcoImagePlugin import getentryindex
```



---
## getimage
```python
from IcoImagePlugin import getimage
```

Get an image from the icon

---
## frame
```python
from IcoImagePlugin import frame
```

Get an image from frame idx

---
## _open
```python
from IcoImagePlugin import _open
```



---
## size
```python
from IcoImagePlugin import size
```



---
## load
```python
from IcoImagePlugin import load
```



---
## load_seek
```python
from IcoImagePlugin import load_seek
```



---
## __name__
```python
from _tkinter_finder import __name__
```

Find compiled module linking to Tcl / Tk libraries

---
## __name__
```python
from EpsImagePlugin import __name__
```



---
## has_ghostscript
```python
from EpsImagePlugin import has_ghostscript
```



---
## Ghostscript
```python
from EpsImagePlugin import Ghostscript
```

Render an image using Ghostscript

---
## PSFile
```python
from EpsImagePlugin import PSFile
```

Wrapper for bytesio object that treats either CR or LF as end of line.
This class is no longer used internally, but kept for backwards compatibility.

---
## _accept
```python
from EpsImagePlugin import _accept
```



---
## EpsImageFile
```python
from EpsImagePlugin import EpsImageFile
```

EPS File Parser for the Python Imaging Library

---
## _save
```python
from EpsImagePlugin import _save
```

EPS Writer for the Python Imaging Library.

---
## __init__
```python
from EpsImagePlugin import __init__
```



---
## seek
```python
from EpsImagePlugin import seek
```



---
## readline
```python
from EpsImagePlugin import readline
```



---
## _open
```python
from EpsImagePlugin import _open
```



---
## _find_offset
```python
from EpsImagePlugin import _find_offset
```



---
## load
```python
from EpsImagePlugin import load
```



---
## load_seek
```python
from EpsImagePlugin import load_seek
```



---
## check_required_header_comments
```python
from EpsImagePlugin import check_required_header_comments
```

The EPS specification requires that some headers exist.
This should be checked when the header comments formally end,
when image data starts, or when the file ends, whichever comes first.

---
## _read_comment
```python
from EpsImagePlugin import _read_comment
```



---
## __name__
```python
from TgaImagePlugin import __name__
```



---
## TgaImageFile
```python
from TgaImagePlugin import TgaImageFile
```



---
## _save
```python
from TgaImagePlugin import _save
```



---
## _open
```python
from TgaImagePlugin import _open
```



---
## load_end
```python
from TgaImagePlugin import load_end
```



---
## __name__
```python
from ImageMorph import __name__
```



---
## LutBuilder
```python
from ImageMorph import LutBuilder
```

A class for building a MorphLut from a descriptive language

The input patterns is a list of a strings sequences like these::

    4:(...
       .1.
       111)->1

(whitespaces including linebreaks are ignored). The option 4
describes a series of symmetry operations (in this case a
4-rotation), the pattern is described by:

- . or X - Ignore
- 1 - Pixel is on
- 0 - Pixel is off

The result of the operation is described after "->" string.

The default is to return the current pixel value, which is
returned if no other match is found.

Operations:

- 4 - 4 way rotation
- N - Negate
- 1 - Dummy op for no other operation (an op must always be given)
- M - Mirroring

Example::

    lb = LutBuilder(patterns = ["4:(... .1. 111)->1"])
    lut = lb.build_lut()

---
## MorphOp
```python
from ImageMorph import MorphOp
```

A class for binary morphological operators

---
## __init__
```python
from ImageMorph import __init__
```

Create a binary morphological operator

---
## add_patterns
```python
from ImageMorph import add_patterns
```



---
## build_default_lut
```python
from ImageMorph import build_default_lut
```



---
## get_lut
```python
from ImageMorph import get_lut
```



---
## _string_permute
```python
from ImageMorph import _string_permute
```

string_permute takes a pattern and a permutation and returns the
string permuted according to the permutation list.

---
## _pattern_permute
```python
from ImageMorph import _pattern_permute
```

pattern_permute takes a basic pattern and its result and clones
the pattern according to the modifications described in the $options
parameter. It returns a list of all cloned patterns.

---
## build_lut
```python
from ImageMorph import build_lut
```

Compile all patterns into a morphology lut.

TBD :Build based on (file) morphlut:modify_lut

---
## apply
```python
from ImageMorph import apply
```

Run a single morphological operation on an image

Returns a tuple of the number of changed pixels and the
morphed image

---
## match
```python
from ImageMorph import match
```

Get a list of coordinates matching the morphological operation on
an image.

Returns a list of tuples of (x,y) coordinates
of all matching pixels. See :ref:`coordinate-system`.

---
## get_on_pixels
```python
from ImageMorph import get_on_pixels
```

Get a list of all turned on pixels in a binary image

Returns a list of tuples of (x,y) coordinates
of all matching pixels. See :ref:`coordinate-system`.

---
## load_lut
```python
from ImageMorph import load_lut
```

Load an operator from an mrl file

---
## save_lut
```python
from ImageMorph import save_lut
```

Save an operator to an mrl file

---
## set_lut
```python
from ImageMorph import set_lut
```

Set the lut from an external source

---
## __name__
```python
from Jpeg2KImagePlugin import __name__
```



---
## BoxReader
```python
from Jpeg2KImagePlugin import BoxReader
```

A small helper class to read fields stored in JPEG2000 header boxes
and to easily step into and read sub-boxes.

---
## _parse_codestream
```python
from Jpeg2KImagePlugin import _parse_codestream
```

Parse the JPEG 2000 codestream to extract the size and component
count from the SIZ marker segment, returning a PIL (size, mode) tuple.

---
## _res_to_dpi
```python
from Jpeg2KImagePlugin import _res_to_dpi
```

Convert JPEG2000's (numerator, denominator, exponent-base-10) resolution,
calculated as (num / denom) * 10^exp and stored in dots per meter,
to floating-point dots per inch.

---
## _parse_jp2_header
```python
from Jpeg2KImagePlugin import _parse_jp2_header
```

Parse the JP2 header box to extract size, component count,
color space information, and optionally DPI information,
returning a (size, mode, mimetype, dpi) tuple.

---
## Jpeg2KImageFile
```python
from Jpeg2KImagePlugin import Jpeg2KImageFile
```



---
## _accept
```python
from Jpeg2KImagePlugin import _accept
```



---
## _save
```python
from Jpeg2KImagePlugin import _save
```



---
## __init__
```python
from Jpeg2KImagePlugin import __init__
```



---
## _can_read
```python
from Jpeg2KImagePlugin import _can_read
```



---
## _read_bytes
```python
from Jpeg2KImagePlugin import _read_bytes
```



---
## read_fields
```python
from Jpeg2KImagePlugin import read_fields
```



---
## read_boxes
```python
from Jpeg2KImagePlugin import read_boxes
```



---
## has_next_box
```python
from Jpeg2KImagePlugin import has_next_box
```



---
## next_box_type
```python
from Jpeg2KImagePlugin import next_box_type
```



---
## _open
```python
from Jpeg2KImagePlugin import _open
```



---
## _parse_comment
```python
from Jpeg2KImagePlugin import _parse_comment
```



---
## reduce
```python
from Jpeg2KImagePlugin import reduce
```



---
## load
```python
from Jpeg2KImagePlugin import load
```



---
## __name__
```python
from WalImageFile import __name__
```

This reader is based on the specification available from:
https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml
and has been tested with a few sample files found using google.

.. note::
    This format cannot be automatically recognized, so the reader
    is not registered for use with :py:func:`PIL.Image.open()`.
    To open a WAL file, use the :py:func:`PIL.WalImageFile.open()` function instead.

---
## WalImageFile
```python
from WalImageFile import WalImageFile
```



---
## open
```python
from WalImageFile import open
```

Load texture from a Quake2 WAL texture file.

By default, a Quake2 standard palette is attached to the texture.
To override the palette, use the :py:func:`PIL.Image.Image.putpalette()` method.

:param filename: WAL file name, or an opened file handle.
:returns: An image instance.

---
## _open
```python
from WalImageFile import _open
```



---
## load
```python
from WalImageFile import load
```



---
## __name__
```python
from PcfFontFile import __name__
```



---
## sz
```python
from PcfFontFile import sz
```



---
## PcfFontFile
```python
from PcfFontFile import PcfFontFile
```

Font file plugin for the X11 PCF format.

---
## __init__
```python
from PcfFontFile import __init__
```



---
## _getformat
```python
from PcfFontFile import _getformat
```



---
## _load_properties
```python
from PcfFontFile import _load_properties
```



---
## _load_metrics
```python
from PcfFontFile import _load_metrics
```



---
## _load_bitmaps
```python
from PcfFontFile import _load_bitmaps
```



---
## _load_encoding
```python
from PcfFontFile import _load_encoding
```



---
## __name__
```python
from BlpImagePlugin import __name__
```

Blizzard Mipmap Format (.blp)
Jerome Leclanche <jerome@leclan.ch>

The contents of this file are hereby released in the public domain (CC0)
Full text of the CC0 license:
  https://creativecommons.org/publicdomain/zero/1.0/

BLP1 files, used mostly in Warcraft III, are not fully supported.
All types of BLP2 files used in World of Warcraft are supported.

The BLP file structure consists of a header, up to 16 mipmaps of the
texture

Texture sizes must be powers of two, though the two dimensions do
not have to be equal; 512x256 is valid, but 512x200 is not.
The first mipmap (mipmap #0) is the full size image; each subsequent
mipmap halves both dimensions. The final mipmap should be 1x1.

BLP files come in many different flavours:
* JPEG-compressed (type == 0) - only supported for BLP1.
* RAW images (type == 1, encoding == 1). Each mipmap is stored as an
  array of 8-bit values, one per pixel, left to right, top to bottom.
  Each value is an index to the palette.
* DXT-compressed (type == 1, encoding == 2):
- DXT1 compression is used if alpha_encoding == 0.
  - An additional alpha bit is used if alpha_depth == 1.
  - DXT3 compression is used if alpha_encoding == 1.
  - DXT5 compression is used if alpha_encoding == 7.

---
## Format
```python
from BlpImagePlugin import Format
```



---
## Encoding
```python
from BlpImagePlugin import Encoding
```



---
## AlphaEncoding
```python
from BlpImagePlugin import AlphaEncoding
```



---
## unpack_565
```python
from BlpImagePlugin import unpack_565
```



---
## decode_dxt1
```python
from BlpImagePlugin import decode_dxt1
```

input: one "row" of data (i.e. will produce 4*width pixels)

---
## decode_dxt3
```python
from BlpImagePlugin import decode_dxt3
```

input: one "row" of data (i.e. will produce 4*width pixels)

---
## decode_dxt5
```python
from BlpImagePlugin import decode_dxt5
```

input: one "row" of data (i.e. will produce 4 * width pixels)

---
## BLPFormatError
```python
from BlpImagePlugin import BLPFormatError
```



---
## _accept
```python
from BlpImagePlugin import _accept
```



---
## BlpImageFile
```python
from BlpImagePlugin import BlpImageFile
```

Blizzard Mipmap Format

---
## _BLPBaseDecoder
```python
from BlpImagePlugin import _BLPBaseDecoder
```



---
## BLP1Decoder
```python
from BlpImagePlugin import BLP1Decoder
```



---
## BLP2Decoder
```python
from BlpImagePlugin import BLP2Decoder
```



---
## BLPEncoder
```python
from BlpImagePlugin import BLPEncoder
```



---
## _save
```python
from BlpImagePlugin import _save
```



---
## _open
```python
from BlpImagePlugin import _open
```



---
## decode
```python
from BlpImagePlugin import decode
```



---
## _load
```python
from BlpImagePlugin import _load
```



---
## _read_blp_header
```python
from BlpImagePlugin import _read_blp_header
```



---
## _safe_read
```python
from BlpImagePlugin import _safe_read
```



---
## _read_palette
```python
from BlpImagePlugin import _read_palette
```



---
## _read_bgra
```python
from BlpImagePlugin import _read_bgra
```



---
## _decode_jpeg_stream
```python
from BlpImagePlugin import _decode_jpeg_stream
```



---
## _write_palette
```python
from BlpImagePlugin import _write_palette
```



---
## encode
```python
from BlpImagePlugin import encode
```



---
## __name__
```python
from ImageTk import __name__
```



---
## _pilbitmap_check
```python
from ImageTk import _pilbitmap_check
```



---
## _get_image_from_kw
```python
from ImageTk import _get_image_from_kw
```



---
## _pyimagingtkcall
```python
from ImageTk import _pyimagingtkcall
```



---
## PhotoImage
```python
from ImageTk import PhotoImage
```

A Tkinter-compatible photo image.  This can be used
everywhere Tkinter expects an image object.  If the image is an RGBA
image, pixels having alpha 0 are treated as transparent.

The constructor takes either a PIL image, or a mode and a size.
Alternatively, you can use the ``file`` or ``data`` options to initialize
the photo image object.

:param image: Either a PIL image, or a mode string.  If a mode string is
              used, a size must also be given.
:param size: If the first argument is a mode string, this defines the size
             of the image.
:keyword file: A filename to load the image from (using
               ``Image.open(file)``).
:keyword data: An 8-bit string containing image data (as loaded from an
               image file).

---
## BitmapImage
```python
from ImageTk import BitmapImage
```

A Tkinter-compatible bitmap image.  This can be used everywhere Tkinter
expects an image object.

The given image must have mode "1".  Pixels having value 0 are treated as
transparent.  Options, if any, are passed on to Tkinter.  The most commonly
used option is ``foreground``, which is used to specify the color for the
non-transparent parts.  See the Tkinter documentation for information on
how to specify colours.

:param image: A PIL image.

---
## getimage
```python
from ImageTk import getimage
```

Copies the contents of a PhotoImage to a PIL image memory.

---
## _show
```python
from ImageTk import _show
```

Helper for the Image.show method.

---
## __init__
```python
from ImageTk import __init__
```



---
## __del__
```python
from ImageTk import __del__
```



---
## __str__
```python
from ImageTk import __str__
```

Get the Tkinter bitmap image identifier.  This method is automatically
called by Tkinter whenever a BitmapImage object is passed to a Tkinter
method.

:return: A Tkinter bitmap image identifier (a string).

---
## width
```python
from ImageTk import width
```

Get the width of the image.

:return: The width, in pixels.

---
## height
```python
from ImageTk import height
```

Get the height of the image.

:return: The height, in pixels.

---
## paste
```python
from ImageTk import paste
```

Paste a PIL image into the photo image.  Note that this can
be very slow if the photo image is displayed.

:param im: A PIL image. The size must match the target region.  If the
           mode does not match, the image is converted to the mode of
           the bitmap image.

---
## UI
```python
from ImageTk import UI
```



---
## __name__
```python
from GbrImagePlugin import __name__
```



---
## _accept
```python
from GbrImagePlugin import _accept
```



---
## GbrImageFile
```python
from GbrImagePlugin import GbrImageFile
```



---
## _open
```python
from GbrImagePlugin import _open
```



---
## load
```python
from GbrImagePlugin import load
```



---
## __name__
```python
from ImageOps import __name__
```



---
## _border
```python
from ImageOps import _border
```



---
## _color
```python
from ImageOps import _color
```



---
## _lut
```python
from ImageOps import _lut
```



---
## autocontrast
```python
from ImageOps import autocontrast
```

Maximize (normalize) image contrast. This function calculates a
histogram of the input image (or mask region), removes ``cutoff`` percent of the
lightest and darkest pixels from the histogram, and remaps the image
so that the darkest pixel becomes black (0), and the lightest
becomes white (255).

:param image: The image to process.
:param cutoff: The percent to cut off from the histogram on the low and
               high ends. Either a tuple of (low, high), or a single
               number for both.
:param ignore: The background pixel value (use None for no background).
:param mask: Histogram used in contrast operation is computed using pixels
             within the mask. If no mask is given the entire image is used
             for histogram computation.
:param preserve_tone: Preserve image tone in Photoshop-like style autocontrast.

                      .. versionadded:: 8.2.0

:return: An image.

---
## colorize
```python
from ImageOps import colorize
```

Colorize grayscale image.
This function calculates a color wedge which maps all black pixels in
the source image to the first color and all white pixels to the
second color. If ``mid`` is specified, it uses three-color mapping.
The ``black`` and ``white`` arguments should be RGB tuples or color names;
optionally you can use three-color mapping by also specifying ``mid``.
Mapping positions for any of the colors can be specified
(e.g. ``blackpoint``), where these parameters are the integer
value corresponding to where the corresponding color should be mapped.
These parameters must have logical order, such that
``blackpoint <= midpoint <= whitepoint`` (if ``mid`` is specified).

:param image: The image to colorize.
:param black: The color to use for black input pixels.
:param white: The color to use for white input pixels.
:param mid: The color to use for midtone input pixels.
:param blackpoint: an int value [0, 255] for the black mapping.
:param whitepoint: an int value [0, 255] for the white mapping.
:param midpoint: an int value [0, 255] for the midtone mapping.
:return: An image.

---
## contain
```python
from ImageOps import contain
```

Returns a resized version of the image, set to the maximum width and height
within the requested size, while maintaining the original aspect ratio.

:param image: The image to resize.
:param size: The requested output size in pixels, given as a
             (width, height) tuple.
:param method: Resampling method to use. Default is
               :py:attr:`~PIL.Image.Resampling.BICUBIC`.
               See :ref:`concept-filters`.
:return: An image.

---
## cover
```python
from ImageOps import cover
```

Returns a resized version of the image, so that the requested size is
covered, while maintaining the original aspect ratio.

:param image: The image to resize.
:param size: The requested output size in pixels, given as a
             (width, height) tuple.
:param method: Resampling method to use. Default is
               :py:attr:`~PIL.Image.Resampling.BICUBIC`.
               See :ref:`concept-filters`.
:return: An image.

---
## pad
```python
from ImageOps import pad
```

Returns a resized and padded version of the image, expanded to fill the
requested aspect ratio and size.

:param image: The image to resize and crop.
:param size: The requested output size in pixels, given as a
             (width, height) tuple.
:param method: Resampling method to use. Default is
               :py:attr:`~PIL.Image.Resampling.BICUBIC`.
               See :ref:`concept-filters`.
:param color: The background color of the padded image.
:param centering: Control the position of the original image within the
                  padded version.

                      (0.5, 0.5) will keep the image centered
                      (0, 0) will keep the image aligned to the top left
                      (1, 1) will keep the image aligned to the bottom
                      right
:return: An image.

---
## crop
```python
from ImageOps import crop
```

Remove border from image.  The same amount of pixels are removed
from all four sides.  This function works on all image modes.

.. seealso:: :py:meth:`~PIL.Image.Image.crop`

:param image: The image to crop.
:param border: The number of pixels to remove.
:return: An image.

---
## scale
```python
from ImageOps import scale
```

Returns a rescaled image by a specific factor given in parameter.
A factor greater than 1 expands the image, between 0 and 1 contracts the
image.

:param image: The image to rescale.
:param factor: The expansion factor, as a float.
:param resample: Resampling method to use. Default is
                 :py:attr:`~PIL.Image.Resampling.BICUBIC`.
                 See :ref:`concept-filters`.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## SupportsGetMesh
```python
from ImageOps import SupportsGetMesh
```

An object that supports the ``getmesh`` method, taking an image as an
argument, and returning a list of tuples. Each tuple contains two tuples,
the source box as a tuple of 4 integers, and a tuple of 8 integers for the
final quadrilateral, in order of top left, bottom left, bottom right, top
right.

---
## deform
```python
from ImageOps import deform
```

Deform the image.

:param image: The image to deform.
:param deformer: A deformer object.  Any object that implements a
                ``getmesh`` method can be used.
:param resample: An optional resampling filter. Same values possible as
   in the PIL.Image.transform function.
:return: An image.

---
## equalize
```python
from ImageOps import equalize
```

Equalize the image histogram. This function applies a non-linear
mapping to the input image, in order to create a uniform
distribution of grayscale values in the output image.

:param image: The image to equalize.
:param mask: An optional mask.  If given, only the pixels selected by
             the mask are included in the analysis.
:return: An image.

---
## expand
```python
from ImageOps import expand
```

Add border to the image

:param image: The image to expand.
:param border: Border width, in pixels.
:param fill: Pixel fill value (a color value).  Default is 0 (black).
:return: An image.

---
## fit
```python
from ImageOps import fit
```

Returns a resized and cropped version of the image, cropped to the
requested aspect ratio and size.

This function was contributed by Kevin Cazabon.

:param image: The image to resize and crop.
:param size: The requested output size in pixels, given as a
             (width, height) tuple.
:param method: Resampling method to use. Default is
               :py:attr:`~PIL.Image.Resampling.BICUBIC`.
               See :ref:`concept-filters`.
:param bleed: Remove a border around the outside of the image from all
              four edges. The value is a decimal percentage (use 0.01 for
              one percent). The default value is 0 (no border).
              Cannot be greater than or equal to 0.5.
:param centering: Control the cropping position.  Use (0.5, 0.5) for
                  center cropping (e.g. if cropping the width, take 50% off
                  of the left side, and therefore 50% off the right side).
                  (0.0, 0.0) will crop from the top left corner (i.e. if
                  cropping the width, take all of the crop off of the right
                  side, and if cropping the height, take all of it off the
                  bottom).  (1.0, 0.0) will crop from the bottom left
                  corner, etc. (i.e. if cropping the width, take all of the
                  crop off the left side, and if cropping the height take
                  none from the top, and therefore all off the bottom).
:return: An image.

---
## flip
```python
from ImageOps import flip
```

Flip the image vertically (top to bottom).

:param image: The image to flip.
:return: An image.

---
## grayscale
```python
from ImageOps import grayscale
```

Convert the image to grayscale.

:param image: The image to convert.
:return: An image.

---
## invert
```python
from ImageOps import invert
```

Invert (negate) the image.

:param image: The image to invert.
:return: An image.

---
## mirror
```python
from ImageOps import mirror
```

Flip image horizontally (left to right).

:param image: The image to mirror.
:return: An image.

---
## posterize
```python
from ImageOps import posterize
```

Reduce the number of bits for each color channel.

:param image: The image to posterize.
:param bits: The number of bits to keep for each channel (1-8).
:return: An image.

---
## solarize
```python
from ImageOps import solarize
```

Invert all pixel values above a threshold.

:param image: The image to solarize.
:param threshold: All pixels above this grayscale level are inverted.
:return: An image.

---
## exif_transpose
```python
from ImageOps import exif_transpose
```

If an image has an EXIF Orientation tag, other than 1, transpose the image
accordingly, and remove the orientation data.

:param image: The image to transpose.
:param in_place: Boolean. Keyword-only argument.
    If ``True``, the original image is modified in-place, and ``None`` is returned.
    If ``False`` (default), a new :py:class:`~PIL.Image.Image` object is returned
    with the transposition applied. If there is no transposition, a copy of the
    image will be returned.

---
## getmesh
```python
from ImageOps import getmesh
```



---
## __name__
```python
from PdfImagePlugin import __name__
```



---
## _save_all
```python
from PdfImagePlugin import _save_all
```



---
## _write_image
```python
from PdfImagePlugin import _write_image
```



---
## _save
```python
from PdfImagePlugin import _save
```



---
## __name__
```python
from ImageShow import __name__
```



---
## register
```python
from ImageShow import register
```

The :py:func:`register` function is used to register additional viewers::

    from PIL import ImageShow
    ImageShow.register(MyViewer())  # MyViewer will be used as a last resort
    ImageShow.register(MySecondViewer(), 0)  # MySecondViewer will be prioritised
    ImageShow.register(ImageShow.XVViewer(), 0)  # XVViewer will be prioritised

:param viewer: The viewer to be registered.
:param order:
    Zero or a negative integer to prepend this viewer to the list,
    a positive integer to append it.

---
## show
```python
from ImageShow import show
```

The main function for displaying an image.
Converts the given image to the target format and displays it.

---
## Viewer
```python
from ImageShow import Viewer
```

Base class for viewers.

---
## WindowsViewer
```python
from ImageShow import WindowsViewer
```

The default viewer on Windows is the default system application for PNG files.

---
## MacViewer
```python
from ImageShow import MacViewer
```

The default viewer on macOS using ``Preview.app``.

---
## UnixViewer
```python
from ImageShow import UnixViewer
```



---
## XDGViewer
```python
from ImageShow import XDGViewer
```

The freedesktop.org ``xdg-open`` command.

---
## DisplayViewer
```python
from ImageShow import DisplayViewer
```

The ImageMagick ``display`` command.
This viewer supports the ``title`` parameter.

---
## GmDisplayViewer
```python
from ImageShow import GmDisplayViewer
```

The GraphicsMagick ``gm display`` command.

---
## EogViewer
```python
from ImageShow import EogViewer
```

The GNOME Image Viewer ``eog`` command.

---
## XVViewer
```python
from ImageShow import XVViewer
```

The X Viewer ``xv`` command.
This viewer supports the ``title`` parameter.

---
## IPythonViewer
```python
from ImageShow import IPythonViewer
```

The viewer for IPython frontends.

---
## get_format
```python
from ImageShow import get_format
```

Return format name, or ``None`` to save as PGM/PPM.

---
## get_command
```python
from ImageShow import get_command
```



---
## save_image
```python
from ImageShow import save_image
```

Save to temporary file and return filename.

---
## show_image
```python
from ImageShow import show_image
```



---
## show_file
```python
from ImageShow import show_file
```

Display given file.

---
## get_command_ex
```python
from ImageShow import get_command_ex
```



---
## __name__
```python
from ImageEnhance import __name__
```



---
## _Enhance
```python
from ImageEnhance import _Enhance
```



---
## Color
```python
from ImageEnhance import Color
```

Adjust image color balance.

This class can be used to adjust the colour balance of an image, in
a manner similar to the controls on a colour TV set. An enhancement
factor of 0.0 gives a black and white image. A factor of 1.0 gives
the original image.

---
## Contrast
```python
from ImageEnhance import Contrast
```

Adjust image contrast.

This class can be used to control the contrast of an image, similar
to the contrast control on a TV set. An enhancement factor of 0.0
gives a solid gray image. A factor of 1.0 gives the original image.

---
## Brightness
```python
from ImageEnhance import Brightness
```

Adjust image brightness.

This class can be used to control the brightness of an image.  An
enhancement factor of 0.0 gives a black image. A factor of 1.0 gives the
original image.

---
## Sharpness
```python
from ImageEnhance import Sharpness
```

Adjust image sharpness.

This class can be used to adjust the sharpness of an image. An
enhancement factor of 0.0 gives a blurred image, a factor of 1.0 gives the
original image, and a factor of 2.0 gives a sharpened image.

---
## enhance
```python
from ImageEnhance import enhance
```

Returns an enhanced image.

:param factor: A floating point value controlling the enhancement.
               Factor 1.0 always returns a copy of the original image,
               lower factors mean less color (brightness, contrast,
               etc), and higher values more. There are no restrictions
               on this value.
:rtype: :py:class:`~PIL.Image.Image`

---
## __init__
```python
from ImageEnhance import __init__
```



---
## __name__
```python
from WmfImagePlugin import __name__
```



---
## register_handler
```python
from WmfImagePlugin import register_handler
```

Install application-specific WMF image handler.

:param handler: Handler object.

---
## _accept
```python
from WmfImagePlugin import _accept
```



---
## WmfStubImageFile
```python
from WmfImagePlugin import WmfStubImageFile
```



---
## _save
```python
from WmfImagePlugin import _save
```



---
## WmfHandler
```python
from WmfImagePlugin import WmfHandler
```



---
## _open
```python
from WmfImagePlugin import _open
```



---
## _load
```python
from WmfImagePlugin import _load
```



---
## load
```python
from WmfImagePlugin import load
```



---
## open
```python
from WmfImagePlugin import open
```



---
## __name__
```python
from ImageGrab import __name__
```



---
## grab
```python
from ImageGrab import grab
```



---
## grabclipboard
```python
from ImageGrab import grabclipboard
```



---
## __name__
```python
from WebPImagePlugin import __name__
```



---
## _accept
```python
from WebPImagePlugin import _accept
```



---
## WebPImageFile
```python
from WebPImagePlugin import WebPImageFile
```



---
## _save_all
```python
from WebPImagePlugin import _save_all
```



---
## _save
```python
from WebPImagePlugin import _save
```



---
## _open
```python
from WebPImagePlugin import _open
```



---
## _getexif
```python
from WebPImagePlugin import _getexif
```



---
## seek
```python
from WebPImagePlugin import seek
```



---
## _reset
```python
from WebPImagePlugin import _reset
```



---
## _get_next
```python
from WebPImagePlugin import _get_next
```



---
## _seek
```python
from WebPImagePlugin import _seek
```



---
## load
```python
from WebPImagePlugin import load
```



---
## load_seek
```python
from WebPImagePlugin import load_seek
```



---
## tell
```python
from WebPImagePlugin import tell
```



---
## __name__
```python
from FliImagePlugin import __name__
```



---
## _accept
```python
from FliImagePlugin import _accept
```



---
## FliImageFile
```python
from FliImagePlugin import FliImageFile
```



---
## _open
```python
from FliImagePlugin import _open
```



---
## _palette
```python
from FliImagePlugin import _palette
```



---
## seek
```python
from FliImagePlugin import seek
```



---
## _seek
```python
from FliImagePlugin import _seek
```



---
## tell
```python
from FliImagePlugin import tell
```



---
## __name__
```python
from TiffTags import __name__
```



---
## _TagInfo
```python
from TiffTags import _TagInfo
```



---
## TagInfo
```python
from TiffTags import TagInfo
```



---
## lookup
```python
from TiffTags import lookup
```

:param tag: Integer tag number
:param group: Which :py:data:`~PIL.TiffTags.TAGS_V2_GROUPS` to look in

.. versionadded:: 8.3.0

:returns: Taginfo namedtuple, From the ``TAGS_V2`` info if possible,
    otherwise just populating the value and name from ``TAGS``.
    If the tag is not recognized, "unknown" is returned for the name

---
## _populate
```python
from TiffTags import _populate
```



---
## __new__
```python
from TiffTags import __new__
```



---
## cvt_enum
```python
from TiffTags import cvt_enum
```



---
## __name__
```python
from CurImagePlugin import __name__
```



---
## _accept
```python
from CurImagePlugin import _accept
```



---
## CurImageFile
```python
from CurImagePlugin import CurImageFile
```



---
## _open
```python
from CurImagePlugin import _open
```



---
## is_path
```python
from _util import is_path
```



---
## is_directory
```python
from _util import is_directory
```

Checks if an object is a string, and that it points to a directory.

---
## DeferredError
```python
from _util import DeferredError
```



---
## __getattr__
```python
from _util import __getattr__
```



---
## new
```python
from _util import new
```

Creates an object that raises the wrapped exception ``ex`` when used,
and casts it to :py:obj:`~typing.Any` type.

---
## __name__
```python
from GdImageFile import __name__
```

.. note::
    This format cannot be automatically recognized, so the
    class is not registered for use with :py:func:`PIL.Image.open()`.  To open a
    gd file, use the :py:func:`PIL.GdImageFile.open()` function instead.

.. warning::
    THE GD FORMAT IS NOT DESIGNED FOR DATA INTERCHANGE.  This
    implementation is provided for convenience and demonstrational
    purposes only.

---
## GdImageFile
```python
from GdImageFile import GdImageFile
```

Image plugin for the GD uncompressed format.  Note that this format
is not supported by the standard :py:func:`PIL.Image.open()` function.  To use
this plugin, you have to import the :py:mod:`PIL.GdImageFile` module and
use the :py:func:`PIL.GdImageFile.open()` function.

---
## open
```python
from GdImageFile import open
```

Load texture from a GD image file.

:param fp: GD file name, or an opened file handle.
:param mode: Optional mode.  In this version, if the mode argument
    is given, it must be "r".
:returns: An image instance.
:raises OSError: If the image could not be read.

---
## _open
```python
from GdImageFile import _open
```



---
## __name__
```python
from TiffImagePlugin import __name__
```



---
## _accept
```python
from TiffImagePlugin import _accept
```



---
## _limit_rational
```python
from TiffImagePlugin import _limit_rational
```



---
## _limit_signed_rational
```python
from TiffImagePlugin import _limit_signed_rational
```



---
## _delegate
```python
from TiffImagePlugin import _delegate
```



---
## IFDRational
```python
from TiffImagePlugin import IFDRational
```

Implements a rational class where 0/0 is a legal value to match
the in the wild use of exif rationals.

e.g., DigitalZoomRatio - 0.00/0.00  indicates that no digital zoom was used

---
## _register_loader
```python
from TiffImagePlugin import _register_loader
```



---
## _register_writer
```python
from TiffImagePlugin import _register_writer
```



---
## _register_basic
```python
from TiffImagePlugin import _register_basic
```



---
## ImageFileDirectory_v2
```python
from TiffImagePlugin import ImageFileDirectory_v2
```

This class represents a TIFF tag directory.  To speed things up, we
don't decode tags unless they're asked for.

Exposes a dictionary interface of the tags in the directory::

    ifd = ImageFileDirectory_v2()
    ifd[key] = 'Some Data'
    ifd.tagtype[key] = TiffTags.ASCII
    print(ifd[key])
    'Some Data'

Individual values are returned as the strings or numbers, sequences are
returned as tuples of the values.

The tiff metadata type of each item is stored in a dictionary of
tag types in
:attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype`. The types
are read from a tiff file, guessed from the type added, or added
manually.

Data Structures:

    * ``self.tagtype = {}``

      * Key: numerical TIFF tag number
      * Value: integer corresponding to the data type from
        :py:data:`.TiffTags.TYPES`

      .. versionadded:: 3.0.0

'Internal' data structures:

    * ``self._tags_v2 = {}``

      * Key: numerical TIFF tag number
      * Value: decoded data, as tuple for multiple values

    * ``self._tagdata = {}``

      * Key: numerical TIFF tag number
      * Value: undecoded byte string from file

    * ``self._tags_v1 = {}``

      * Key: numerical TIFF tag number
      * Value: decoded data in the v1 format

Tags will be found in the private attributes ``self._tagdata``, and in
``self._tags_v2`` once decoded.

``self.legacy_api`` is a value for internal use, and shouldn't be changed
from outside code. In cooperation with
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`, if ``legacy_api``
is true, then decoded tags will be populated into both ``_tags_v1`` and
``_tags_v2``. ``_tags_v2`` will be used if this IFD is used in the TIFF
save routine. Tags should be read from ``_tags_v1`` if
``legacy_api == true``.

---
## ImageFileDirectory_v1
```python
from TiffImagePlugin import ImageFileDirectory_v1
```

This class represents the **legacy** interface to a TIFF tag directory.

Exposes a dictionary interface of the tags in the directory::

    ifd = ImageFileDirectory_v1()
    ifd[key] = 'Some Data'
    ifd.tagtype[key] = TiffTags.ASCII
    print(ifd[key])
    ('Some Data',)

Also contains a dictionary of tag types as read from the tiff image file,
:attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v1.tagtype`.

Values are returned as a tuple.

..  deprecated:: 3.0.0

---
## TiffImageFile
```python
from TiffImagePlugin import TiffImageFile
```



---
## _save
```python
from TiffImagePlugin import _save
```



---
## AppendingTiffWriter
```python
from TiffImagePlugin import AppendingTiffWriter
```



---
## _save_all
```python
from TiffImagePlugin import _save_all
```



---
## delegate
```python
from TiffImagePlugin import delegate
```



---
## __init__
```python
from TiffImagePlugin import __init__
```



---
## numerator
```python
from TiffImagePlugin import numerator
```



---
## denominator
```python
from TiffImagePlugin import denominator
```



---
## limit_rational
```python
from TiffImagePlugin import limit_rational
```

:param max_denominator: Integer, the maximum denominator value
:returns: Tuple of (numerator, denominator)

---
## __repr__
```python
from TiffImagePlugin import __repr__
```



---
## __hash__
```python
from TiffImagePlugin import __hash__
```



---
## __eq__
```python
from TiffImagePlugin import __eq__
```



---
## __getstate__
```python
from TiffImagePlugin import __getstate__
```



---
## __setstate__
```python
from TiffImagePlugin import __setstate__
```



---
## decorator
```python
from TiffImagePlugin import decorator
```



---
## legacy_api
```python
from TiffImagePlugin import legacy_api
```



---
## reset
```python
from TiffImagePlugin import reset
```



---
## __str__
```python
from TiffImagePlugin import __str__
```



---
## named
```python
from TiffImagePlugin import named
```

:returns: dict of name|key: value

Returns the complete tag dictionary, with named tags where possible.

---
## __len__
```python
from TiffImagePlugin import __len__
```



---
## __getitem__
```python
from TiffImagePlugin import __getitem__
```



---
## __contains__
```python
from TiffImagePlugin import __contains__
```



---
## __setitem__
```python
from TiffImagePlugin import __setitem__
```



---
## _setitem
```python
from TiffImagePlugin import _setitem
```



---
## __delitem__
```python
from TiffImagePlugin import __delitem__
```



---
## __iter__
```python
from TiffImagePlugin import __iter__
```



---
## _unpack
```python
from TiffImagePlugin import _unpack
```



---
## _pack
```python
from TiffImagePlugin import _pack
```



---
## load_byte
```python
from TiffImagePlugin import load_byte
```



---
## write_byte
```python
from TiffImagePlugin import write_byte
```



---
## load_string
```python
from TiffImagePlugin import load_string
```



---
## write_string
```python
from TiffImagePlugin import write_string
```



---
## load_rational
```python
from TiffImagePlugin import load_rational
```



---
## write_rational
```python
from TiffImagePlugin import write_rational
```



---
## load_undefined
```python
from TiffImagePlugin import load_undefined
```



---
## write_undefined
```python
from TiffImagePlugin import write_undefined
```



---
## load_signed_rational
```python
from TiffImagePlugin import load_signed_rational
```



---
## write_signed_rational
```python
from TiffImagePlugin import write_signed_rational
```



---
## _ensure_read
```python
from TiffImagePlugin import _ensure_read
```



---
## load
```python
from TiffImagePlugin import load
```



---
## tobytes
```python
from TiffImagePlugin import tobytes
```



---
## save
```python
from TiffImagePlugin import save
```



---
## from_v2
```python
from TiffImagePlugin import from_v2
```

Returns an
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`
instance with the same data as is contained in the original
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`
instance.

:returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`

---
## to_v2
```python
from TiffImagePlugin import to_v2
```

Returns an
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`
instance with the same data as is contained in the original
:py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`
instance.

:returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`

---
## _open
```python
from TiffImagePlugin import _open
```

Open the first image in a TIFF file

---
## n_frames
```python
from TiffImagePlugin import n_frames
```



---
## seek
```python
from TiffImagePlugin import seek
```



---
## _seek
```python
from TiffImagePlugin import _seek
```



---
## tell
```python
from TiffImagePlugin import tell
```



---
## get_photoshop_blocks
```python
from TiffImagePlugin import get_photoshop_blocks
```

Returns a dictionary of Photoshop "Image Resource Blocks".
The keys are the image resource ID. For more information, see
https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037727

:returns: Photoshop "Image Resource Blocks" in a dictionary.

---
## load_end
```python
from TiffImagePlugin import load_end
```



---
## _load_libtiff
```python
from TiffImagePlugin import _load_libtiff
```

Overload method triggered when we detect a compressed tiff
Calls out to libtiff

---
## _setup
```python
from TiffImagePlugin import _setup
```

Setup this image object based on current tags

---
## setup
```python
from TiffImagePlugin import setup
```



---
## finalize
```python
from TiffImagePlugin import finalize
```



---
## newFrame
```python
from TiffImagePlugin import newFrame
```



---
## __enter__
```python
from TiffImagePlugin import __enter__
```



---
## __exit__
```python
from TiffImagePlugin import __exit__
```



---
## goToEnd
```python
from TiffImagePlugin import goToEnd
```



---
## setEndian
```python
from TiffImagePlugin import setEndian
```



---
## skipIFDs
```python
from TiffImagePlugin import skipIFDs
```



---
## write
```python
from TiffImagePlugin import write
```



---
## readShort
```python
from TiffImagePlugin import readShort
```



---
## readLong
```python
from TiffImagePlugin import readLong
```



---
## rewriteLastShortToLong
```python
from TiffImagePlugin import rewriteLastShortToLong
```



---
## rewriteLastShort
```python
from TiffImagePlugin import rewriteLastShort
```



---
## rewriteLastLong
```python
from TiffImagePlugin import rewriteLastLong
```



---
## writeShort
```python
from TiffImagePlugin import writeShort
```



---
## writeLong
```python
from TiffImagePlugin import writeLong
```



---
## close
```python
from TiffImagePlugin import close
```



---
## fixIFD
```python
from TiffImagePlugin import fixIFD
```



---
## fixOffsets
```python
from TiffImagePlugin import fixOffsets
```



---
## combine
```python
from TiffImagePlugin import combine
```



---
## __name__
```python
from IptcImagePlugin import __name__
```



---
## __getattr__
```python
from IptcImagePlugin import __getattr__
```



---
## _i
```python
from IptcImagePlugin import _i
```



---
## _i8
```python
from IptcImagePlugin import _i8
```



---
## i
```python
from IptcImagePlugin import i
```

.. deprecated:: 10.2.0

---
## dump
```python
from IptcImagePlugin import dump
```

.. deprecated:: 10.2.0

---
## IptcImageFile
```python
from IptcImagePlugin import IptcImageFile
```



---
## getiptcinfo
```python
from IptcImagePlugin import getiptcinfo
```

Get IPTC information from TIFF, JPEG, or IPTC file.

:param im: An image containing IPTC data.
:returns: A dictionary containing IPTC information, or None if
    no IPTC information block was found.

---
## getint
```python
from IptcImagePlugin import getint
```



---
## field
```python
from IptcImagePlugin import field
```



---
## _open
```python
from IptcImagePlugin import _open
```



---
## load
```python
from IptcImagePlugin import load
```



---
## FakeImage
```python
from IptcImagePlugin import FakeImage
```



---
## __name__
```python
from ImagePalette import __name__
```



---
## ImagePalette
```python
from ImagePalette import ImagePalette
```

Color palette for palette mapped images

:param mode: The mode to use for the palette. See:
    :ref:`concept-modes`. Defaults to "RGB"
:param palette: An optional palette. If given, it must be a bytearray,
    an array or a list of ints between 0-255. The list must consist of
    all channels for one color followed by the next color (e.g. RGBRGBRGB).
    Defaults to an empty palette.

---
## raw
```python
from ImagePalette import raw
```



---
## make_linear_lut
```python
from ImagePalette import make_linear_lut
```



---
## make_gamma_lut
```python
from ImagePalette import make_gamma_lut
```



---
## negative
```python
from ImagePalette import negative
```



---
## random
```python
from ImagePalette import random
```



---
## sepia
```python
from ImagePalette import sepia
```



---
## wedge
```python
from ImagePalette import wedge
```



---
## load
```python
from ImagePalette import load
```



---
## __init__
```python
from ImagePalette import __init__
```



---
## palette
```python
from ImagePalette import palette
```



---
## colors
```python
from ImagePalette import colors
```



---
## copy
```python
from ImagePalette import copy
```



---
## getdata
```python
from ImagePalette import getdata
```

Get palette contents in format suitable for the low-level
``im.putpalette`` primitive.

.. warning:: This method is experimental.

---
## tobytes
```python
from ImagePalette import tobytes
```

Convert palette to bytes.

.. warning:: This method is experimental.

---
## _new_color_index
```python
from ImagePalette import _new_color_index
```



---
## getcolor
```python
from ImagePalette import getcolor
```

Given an rgb tuple, allocate palette entry.

.. warning:: This method is experimental.

---
## save
```python
from ImagePalette import save
```

Save palette to text file.

.. warning:: This method is experimental.

---
## __name__
```python
from BmpImagePlugin import __name__
```



---
## _accept
```python
from BmpImagePlugin import _accept
```



---
## _dib_accept
```python
from BmpImagePlugin import _dib_accept
```



---
## BmpImageFile
```python
from BmpImagePlugin import BmpImageFile
```

Image plugin for the Windows Bitmap format (BMP)

---
## BmpRleDecoder
```python
from BmpImagePlugin import BmpRleDecoder
```



---
## DibImageFile
```python
from BmpImagePlugin import DibImageFile
```



---
## _dib_save
```python
from BmpImagePlugin import _dib_save
```



---
## _save
```python
from BmpImagePlugin import _save
```



---
## _bitmap
```python
from BmpImagePlugin import _bitmap
```

Read relevant info about the BMP

---
## _open
```python
from BmpImagePlugin import _open
```



---
## decode
```python
from BmpImagePlugin import decode
```



---
## __name__
```python
from ImageTransform import __name__
```



---
## Transform
```python
from ImageTransform import Transform
```

Base class for other transforms defined in :py:mod:`~PIL.ImageTransform`.

---
## AffineTransform
```python
from ImageTransform import AffineTransform
```

Define an affine image transform.

This function takes a 6-tuple (a, b, c, d, e, f) which contain the first
two rows from an affine transform matrix. For each pixel (x, y) in the
output image, the new value is taken from a position (a x + b y + c,
d x + e y + f) in the input image, rounded to nearest pixel.

This function can be used to scale, translate, rotate, and shear the
original image.

See :py:meth:`.Image.transform`

:param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows
    from an affine transform matrix.

---
## PerspectiveTransform
```python
from ImageTransform import PerspectiveTransform
```

Define a perspective image transform.

This function takes an 8-tuple (a, b, c, d, e, f, g, h). For each pixel
(x, y) in the output image, the new value is taken from a position
((a x + b y + c) / (g x + h y + 1), (d x + e y + f) / (g x + h y + 1)) in
the input image, rounded to nearest pixel.

This function can be used to scale, translate, rotate, and shear the
original image.

See :py:meth:`.Image.transform`

:param matrix: An 8-tuple (a, b, c, d, e, f, g, h).

---
## ExtentTransform
```python
from ImageTransform import ExtentTransform
```

Define a transform to extract a subregion from an image.

Maps a rectangle (defined by two corners) from the image to a rectangle of
the given size. The resulting image will contain data sampled from between
the corners, such that (x0, y0) in the input image will end up at (0,0) in
the output image, and (x1, y1) at size.

This method can be used to crop, stretch, shrink, or mirror an arbitrary
rectangle in the current image. It is slightly slower than crop, but about
as fast as a corresponding resize operation.

See :py:meth:`.Image.transform`

:param bbox: A 4-tuple (x0, y0, x1, y1) which specifies two points in the
    input image's coordinate system. See :ref:`coordinate-system`.

---
## QuadTransform
```python
from ImageTransform import QuadTransform
```

Define a quad image transform.

Maps a quadrilateral (a region defined by four corners) from the image to a
rectangle of the given size.

See :py:meth:`.Image.transform`

:param xy: An 8-tuple (x0, y0, x1, y1, x2, y2, x3, y3) which contain the
    upper left, lower left, lower right, and upper right corner of the
    source quadrilateral.

---
## MeshTransform
```python
from ImageTransform import MeshTransform
```

Define a mesh image transform.  A mesh transform consists of one or more
individual quad transforms.

See :py:meth:`.Image.transform`

:param data: A list of (bbox, quad) tuples.

---
## __init__
```python
from ImageTransform import __init__
```



---
## getdata
```python
from ImageTransform import getdata
```



---
## transform
```python
from ImageTransform import transform
```

Perform the transform. Called from :py:meth:`.Image.transform`.

---
## __name__
```python
from IcnsImagePlugin import __name__
```



---
## nextheader
```python
from IcnsImagePlugin import nextheader
```



---
## read_32t
```python
from IcnsImagePlugin import read_32t
```



---
## read_32
```python
from IcnsImagePlugin import read_32
```

Read a 32bit RGB icon resource.  Seems to be either uncompressed or
an RLE packbits-like scheme.

---
## read_mk
```python
from IcnsImagePlugin import read_mk
```



---
## read_png_or_jpeg2000
```python
from IcnsImagePlugin import read_png_or_jpeg2000
```



---
## IcnsFile
```python
from IcnsImagePlugin import IcnsFile
```



---
## IcnsImageFile
```python
from IcnsImagePlugin import IcnsImageFile
```

PIL image support for Mac OS .icns files.
Chooses the best resolution, but will possibly load
a different size image if you mutate the size attribute
before calling 'load'.

The info dictionary has a key 'sizes' that is a list
of sizes that the icns file has.

---
## _save
```python
from IcnsImagePlugin import _save
```

Saves the image as a series of PNG files,
that are then combined into a .icns file.

---
## _accept
```python
from IcnsImagePlugin import _accept
```



---
## __init__
```python
from IcnsImagePlugin import __init__
```

fobj is a file-like object as an icns resource

---
## itersizes
```python
from IcnsImagePlugin import itersizes
```



---
## bestsize
```python
from IcnsImagePlugin import bestsize
```



---
## dataforsize
```python
from IcnsImagePlugin import dataforsize
```

Get an icon resource as {channel: array}.  Note that
the arrays are bottom-up like windows bitmaps and will likely
need to be flipped or transposed in some way.

---
## getimage
```python
from IcnsImagePlugin import getimage
```



---
## _open
```python
from IcnsImagePlugin import _open
```



---
## size
```python
from IcnsImagePlugin import size
```



---
## load
```python
from IcnsImagePlugin import load
```



---
## __name__
```python
from McIdasImagePlugin import __name__
```



---
## _accept
```python
from McIdasImagePlugin import _accept
```



---
## McIdasImageFile
```python
from McIdasImagePlugin import McIdasImageFile
```



---
## _open
```python
from McIdasImagePlugin import _open
```



---
## __name__
```python
from FitsImagePlugin import __name__
```



---
## _accept
```python
from FitsImagePlugin import _accept
```



---
## FitsImageFile
```python
from FitsImagePlugin import FitsImageFile
```



---
## FitsGzipDecoder
```python
from FitsImagePlugin import FitsGzipDecoder
```



---
## _open
```python
from FitsImagePlugin import _open
```



---
## _get_size
```python
from FitsImagePlugin import _get_size
```



---
## _parse_headers
```python
from FitsImagePlugin import _parse_headers
```



---
## decode
```python
from FitsImagePlugin import decode
```



---
## __name__
```python
from XpmImagePlugin import __name__
```



---
## _accept
```python
from XpmImagePlugin import _accept
```



---
## XpmImageFile
```python
from XpmImagePlugin import XpmImageFile
```



---
## _open
```python
from XpmImagePlugin import _open
```



---
## load_read
```python
from XpmImagePlugin import load_read
```



---
## __name__
```python
from DdsImagePlugin import __name__
```

A Pillow loader for .dds files (S3TC-compressed aka DXTC)
Jerome Leclanche <jerome@leclan.ch>

Documentation:
https://web.archive.org/web/20170802060935/http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt

The contents of this file are hereby released in the public domain (CC0)
Full text of the CC0 license:
https://creativecommons.org/publicdomain/zero/1.0/

---
## DDSD
```python
from DdsImagePlugin import DDSD
```



---
## DDSCAPS
```python
from DdsImagePlugin import DDSCAPS
```



---
## DDSCAPS2
```python
from DdsImagePlugin import DDSCAPS2
```



---
## DDPF
```python
from DdsImagePlugin import DDPF
```



---
## DXGI_FORMAT
```python
from DdsImagePlugin import DXGI_FORMAT
```



---
## D3DFMT
```python
from DdsImagePlugin import D3DFMT
```



---
## DdsImageFile
```python
from DdsImagePlugin import DdsImageFile
```



---
## DdsRgbDecoder
```python
from DdsImagePlugin import DdsRgbDecoder
```



---
## _save
```python
from DdsImagePlugin import _save
```



---
## _accept
```python
from DdsImagePlugin import _accept
```



---
## _open
```python
from DdsImagePlugin import _open
```



---
## load_seek
```python
from DdsImagePlugin import load_seek
```



---
## decode
```python
from DdsImagePlugin import decode
```



---
## __name__
```python
from ImageSequence import __name__
```



---
## Iterator
```python
from ImageSequence import Iterator
```

This class implements an iterator object that can be used to loop
over an image sequence.

You can use the ``[]`` operator to access elements by index. This operator
will raise an :py:exc:`IndexError` if you try to access a nonexistent
frame.

:param im: An image object.

---
## all_frames
```python
from ImageSequence import all_frames
```

Applies a given function to all frames in an image or a list of images.
The frames are returned as a list of separate images.

:param im: An image, or a list of images.
:param func: The function to apply to all of the image frames.
:returns: A list of images.

---
## __init__
```python
from ImageSequence import __init__
```



---
## __getitem__
```python
from ImageSequence import __getitem__
```



---
## __iter__
```python
from ImageSequence import __iter__
```



---
## __next__
```python
from ImageSequence import __next__
```



---
## __name__
```python
from PyAccess import __name__
```



---
## PyAccess
```python
from PyAccess import PyAccess
```



---
## _PyAccess32_2
```python
from PyAccess import _PyAccess32_2
```

PA, LA, stored in first and last bytes of a 32 bit word

---
## _PyAccess32_3
```python
from PyAccess import _PyAccess32_3
```

RGB and friends, stored in the first three bytes of a 32 bit word

---
## _PyAccess32_4
```python
from PyAccess import _PyAccess32_4
```

RGBA etc, all 4 bytes of a 32 bit word

---
## _PyAccess8
```python
from PyAccess import _PyAccess8
```

1, L, P, 8 bit images stored as uint8

---
## _PyAccessI16_N
```python
from PyAccess import _PyAccessI16_N
```

I;16 access, native bitendian without conversion

---
## _PyAccessI16_L
```python
from PyAccess import _PyAccessI16_L
```

I;16L access, with conversion

---
## _PyAccessI16_B
```python
from PyAccess import _PyAccessI16_B
```

I;16B access, with conversion

---
## _PyAccessI32_N
```python
from PyAccess import _PyAccessI32_N
```

Signed Int32 access, native endian

---
## _PyAccessI32_Swap
```python
from PyAccess import _PyAccessI32_Swap
```

I;32L/B access, with byteswapping conversion

---
## _PyAccessF
```python
from PyAccess import _PyAccessF
```

32 bit float access

---
## new
```python
from PyAccess import new
```



---
## __init__
```python
from PyAccess import __init__
```



---
## _post_init
```python
from PyAccess import _post_init
```



---
## __setitem__
```python
from PyAccess import __setitem__
```

Modifies the pixel at x,y. The color is given as a single
numerical value for single band images, and a tuple for
multi-band images. In addition to this, RGB and RGBA tuples
are accepted for P and PA images.

:param xy: The pixel coordinate, given as (x, y). See
   :ref:`coordinate-system`.
:param color: The pixel value.

---
## __getitem__
```python
from PyAccess import __getitem__
```

Returns the pixel at x,y. The pixel is returned as a single
value for single band images or a tuple for multiple band
images

:param xy: The pixel coordinate, given as (x, y). See
  :ref:`coordinate-system`.
:returns: a pixel value for single band images, a tuple of
  pixel values for multiband images.

---
## check_xy
```python
from PyAccess import check_xy
```



---
## get_pixel
```python
from PyAccess import get_pixel
```



---
## set_pixel
```python
from PyAccess import set_pixel
```



---
## reverse
```python
from PyAccess import reverse
```



---
## __name__
```python
from _binary import __name__
```

Binary input/output support routines.

---
## i8
```python
from _binary import i8
```



---
## o8
```python
from _binary import o8
```



---
## i16le
```python
from _binary import i16le
```

Converts a 2-bytes (16 bits) string to an unsigned integer.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## si16le
```python
from _binary import si16le
```

Converts a 2-bytes (16 bits) string to a signed integer.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## si16be
```python
from _binary import si16be
```

Converts a 2-bytes (16 bits) string to a signed integer, big endian.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## i32le
```python
from _binary import i32le
```

Converts a 4-bytes (32 bits) string to an unsigned integer.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## si32le
```python
from _binary import si32le
```

Converts a 4-bytes (32 bits) string to a signed integer.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## si32be
```python
from _binary import si32be
```

Converts a 4-bytes (32 bits) string to a signed integer, big endian.

:param c: string containing bytes to convert
:param o: offset of bytes to convert in string

---
## i16be
```python
from _binary import i16be
```



---
## i32be
```python
from _binary import i32be
```



---
## o16le
```python
from _binary import o16le
```



---
## o32le
```python
from _binary import o32le
```



---
## o16be
```python
from _binary import o16be
```



---
## o32be
```python
from _binary import o32be
```



---
## __name__
```python
from Image import __name__
```



---
## DecompressionBombWarning
```python
from Image import DecompressionBombWarning
```



---
## DecompressionBombError
```python
from Image import DecompressionBombError
```



---
## isImageType
```python
from Image import isImageType
```

Checks if an object is an image object.

.. warning::

   This function is for internal use only.

:param t: object to check if it's an image
:returns: True if the object is an image

---
## Transpose
```python
from Image import Transpose
```



---
## Transform
```python
from Image import Transform
```



---
## Resampling
```python
from Image import Resampling
```



---
## Dither
```python
from Image import Dither
```



---
## Palette
```python
from Image import Palette
```



---
## Quantize
```python
from Image import Quantize
```



---
## _conv_type_shape
```python
from Image import _conv_type_shape
```



---
## getmodebase
```python
from Image import getmodebase
```

Gets the "base" mode for given mode.  This function returns "L" for
images that contain grayscale data, and "RGB" for images that
contain color data.

:param mode: Input mode.
:returns: "L" or "RGB".
:exception KeyError: If the input mode was not a standard mode.

---
## getmodetype
```python
from Image import getmodetype
```

Gets the storage type mode.  Given a mode, this function returns a
single-layer mode suitable for storing individual bands.

:param mode: Input mode.
:returns: "L", "I", or "F".
:exception KeyError: If the input mode was not a standard mode.

---
## getmodebandnames
```python
from Image import getmodebandnames
```

Gets a list of individual band names.  Given a mode, this function returns
a tuple containing the names of individual bands (use
:py:method:`~PIL.Image.getmodetype` to get the mode used to store each
individual band.

:param mode: Input mode.
:returns: A tuple containing band names.  The length of the tuple
    gives the number of bands in an image of the given mode.
:exception KeyError: If the input mode was not a standard mode.

---
## getmodebands
```python
from Image import getmodebands
```

Gets the number of individual bands for this mode.

:param mode: Input mode.
:returns: The number of bands in this mode.
:exception KeyError: If the input mode was not a standard mode.

---
## preinit
```python
from Image import preinit
```

Explicitly loads BMP, GIF, JPEG, PPM and PPM file format drivers.

It is called when opening or saving images.

---
## init
```python
from Image import init
```

Explicitly initializes the Python Imaging Library. This function
loads all available file format drivers.

It is called when opening or saving images if :py:meth:`~preinit()` is
insufficient, and by :py:meth:`~PIL.features.pilinfo`.

---
## _getdecoder
```python
from Image import _getdecoder
```



---
## _getencoder
```python
from Image import _getencoder
```



---
## _E
```python
from Image import _E
```



---
## _getscaleoffset
```python
from Image import _getscaleoffset
```



---
## SupportsGetData
```python
from Image import SupportsGetData
```



---
## Image
```python
from Image import Image
```

This class represents an image object.  To create
:py:class:`~PIL.Image.Image` objects, use the appropriate factory
functions.  There's hardly ever any reason to call the Image constructor
directly.

* :py:func:`~PIL.Image.open`
* :py:func:`~PIL.Image.new`
* :py:func:`~PIL.Image.frombytes`

---
## ImagePointHandler
```python
from Image import ImagePointHandler
```

Used as a mixin by point transforms
(for use with :py:meth:`~PIL.Image.Image.point`)

---
## ImageTransformHandler
```python
from Image import ImageTransformHandler
```

Used as a mixin by geometry transforms
(for use with :py:meth:`~PIL.Image.Image.transform`)

---
## _wedge
```python
from Image import _wedge
```

Create grayscale wedge (for debugging only)

---
## _check_size
```python
from Image import _check_size
```

Common check to enforce type and sanity check on size tuples

:param size: Should be a 2 tuple of (width, height)
:returns: None, or raises a ValueError

---
## new
```python
from Image import new
```

Creates a new image with the given mode and size.

:param mode: The mode to use for the new image. See:
   :ref:`concept-modes`.
:param size: A 2-tuple, containing (width, height) in pixels.
:param color: What color to use for the image.  Default is black.
   If given, this should be a single integer or floating point value
   for single-band modes, and a tuple for multi-band modes (one value
   per band).  When creating RGB or HSV images, you can also use color
   strings as supported by the ImageColor module.  If the color is
   None, the image is not initialised.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## frombytes
```python
from Image import frombytes
```

Loads this image with pixel data from a bytes object.

This method is similar to the :py:func:`~PIL.Image.frombytes` function,
but loads data into this image instead of creating a new image object.

---
## frombuffer
```python
from Image import frombuffer
```

Creates an image memory referencing pixel data in a byte buffer.

This function is similar to :py:func:`~PIL.Image.frombytes`, but uses data
in the byte buffer, where possible.  This means that changes to the
original buffer object are reflected in this image).  Not all modes can
share memory; supported modes include "L", "RGBX", "RGBA", and "CMYK".

Note that this function decodes pixel data only, not entire images.
If you have an entire image file in a string, wrap it in a
:py:class:`~io.BytesIO` object, and use :py:func:`~PIL.Image.open` to load it.

The default parameters used for the "raw" decoder differs from that used for
:py:func:`~PIL.Image.frombytes`. This is a bug, and will probably be fixed in a
future release. The current release issues a warning if you do this; to disable
the warning, you should provide the full set of parameters. See below for details.

:param mode: The image mode. See: :ref:`concept-modes`.
:param size: The image size.
:param data: A bytes or other buffer object containing raw
    data for the given mode.
:param decoder_name: What decoder to use.
:param args: Additional parameters for the given decoder.  For the
    default encoder ("raw"), it's recommended that you provide the
    full set of parameters::

        frombuffer(mode, size, data, "raw", mode, 0, 1)

:returns: An :py:class:`~PIL.Image.Image` object.

.. versionadded:: 1.1.4

---
## SupportsArrayInterface
```python
from Image import SupportsArrayInterface
```

An object that has an ``__array_interface__`` dictionary.

---
## fromarray
```python
from Image import fromarray
```

Creates an image memory from an object exporting the array interface
(using the buffer protocol)::

  from PIL import Image
  import numpy as np
  a = np.zeros((5, 5))
  im = Image.fromarray(a)

If ``obj`` is not contiguous, then the ``tobytes`` method is called
and :py:func:`~PIL.Image.frombuffer` is used.

In the case of NumPy, be aware that Pillow modes do not always correspond
to NumPy dtypes. Pillow modes only offer 1-bit pixels, 8-bit pixels,
32-bit signed integer pixels, and 32-bit floating point pixels.

Pillow images can also be converted to arrays::

  from PIL import Image
  import numpy as np
  im = Image.open("hopper.jpg")
  a = np.asarray(im)

When converting Pillow images to arrays however, only pixel values are
transferred. This means that P and PA mode images will lose their palette.

:param obj: Object with array interface
:param mode: Optional mode to use when reading ``obj``. Will be determined from
  type if ``None``.

  This will not be used to convert the data after reading, but will be used to
  change how the data is read::

    from PIL import Image
    import numpy as np
    a = np.full((1, 1), 300)
    im = Image.fromarray(a, mode="L")
    im.getpixel((0, 0))  # 44
    im = Image.fromarray(a, mode="RGB")
    im.getpixel((0, 0))  # (44, 1, 0)

  See: :ref:`concept-modes` for general information about modes.
:returns: An image object.

.. versionadded:: 1.1.6

---
## fromqimage
```python
from Image import fromqimage
```

Creates an image instance from a QImage image

---
## fromqpixmap
```python
from Image import fromqpixmap
```

Creates an image instance from a QPixmap image

---
## _decompression_bomb_check
```python
from Image import _decompression_bomb_check
```



---
## open
```python
from Image import open
```

Opens and identifies the given image file.

This is a lazy operation; this function identifies the file, but
the file remains open and the actual image data is not read from
the file until you try to process the data (or call the
:py:meth:`~PIL.Image.Image.load` method).  See
:py:func:`~PIL.Image.new`. See :ref:`file-handling`.

:param fp: A filename (string), os.PathLike object or a file object.
   The file object must implement ``file.read``,
   ``file.seek``, and ``file.tell`` methods,
   and be opened in binary mode. The file object will also seek to zero
   before reading.
:param mode: The mode.  If given, this argument must be "r".
:param formats: A list or tuple of formats to attempt to load the file in.
   This can be used to restrict the set of formats checked.
   Pass ``None`` to try all supported formats. You can print the set of
   available formats by running ``python3 -m PIL`` or using
   the :py:func:`PIL.features.pilinfo` function.
:returns: An :py:class:`~PIL.Image.Image` object.
:exception FileNotFoundError: If the file cannot be found.
:exception PIL.UnidentifiedImageError: If the image cannot be opened and
   identified.
:exception ValueError: If the ``mode`` is not "r", or if a ``StringIO``
   instance is used for ``fp``.
:exception TypeError: If ``formats`` is not ``None``, a list or a tuple.

---
## alpha_composite
```python
from Image import alpha_composite
```

'In-place' analog of Image.alpha_composite. Composites an image
onto this image.

:param im: image to composite over this one
:param dest: Optional 2 tuple (left, top) specifying the upper
  left corner in this (destination) image.
:param source: Optional 2 (left, top) tuple for the upper left
  corner in the overlay source image, or 4 tuple (left, top, right,
  bottom) for the bounds of the source rectangle

Performance Note: Not currently implemented in-place in the core layer.

---
## blend
```python
from Image import blend
```

Creates a new image by interpolating between two input images, using
a constant alpha::

    out = image1 * (1.0 - alpha) + image2 * alpha

:param im1: The first image.
:param im2: The second image.  Must have the same mode and size as
   the first image.
:param alpha: The interpolation alpha factor.  If alpha is 0.0, a
   copy of the first image is returned. If alpha is 1.0, a copy of
   the second image is returned. There are no restrictions on the
   alpha value. If necessary, the result is clipped to fit into
   the allowed output range.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## composite
```python
from Image import composite
```

Create composite image by blending images using a transparency mask.

:param image1: The first image.
:param image2: The second image.  Must have the same mode and
   size as the first image.
:param mask: A mask image.  This image can have mode
   "1", "L", or "RGBA", and must have the same size as the
   other two images.

---
## eval
```python
from Image import eval
```

Applies the function (which should take one argument) to each pixel
in the given image. If the image has more than one band, the same
function is applied to each band. Note that the function is
evaluated once for each possible pixel value, so you cannot use
random components or other generators.

:param image: The input image.
:param function: A function object, taking one integer argument.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## merge
```python
from Image import merge
```

Merge a set of single band images into a new multiband image.

:param mode: The mode to use for the output image. See:
    :ref:`concept-modes`.
:param bands: A sequence containing one single-band image for
    each band in the output image.  All bands must have the
    same size.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## register_open
```python
from Image import register_open
```

Register an image file plugin.  This function should not be used
in application code.

:param id: An image format identifier.
:param factory: An image file factory method.
:param accept: An optional function that can be used to quickly
   reject images having another format.

---
## register_mime
```python
from Image import register_mime
```

Registers an image MIME type by populating ``Image.MIME``. This function
should not be used in application code.

``Image.MIME`` provides a mapping from image format identifiers to mime
formats, but :py:meth:`~PIL.ImageFile.ImageFile.get_format_mimetype` can
provide a different result for specific images.

:param id: An image format identifier.
:param mimetype: The image MIME type for this format.

---
## register_save
```python
from Image import register_save
```

Registers an image save function.  This function should not be
used in application code.

:param id: An image format identifier.
:param driver: A function to save images in this format.

---
## register_save_all
```python
from Image import register_save_all
```

Registers an image function to save all the frames
of a multiframe format.  This function should not be
used in application code.

:param id: An image format identifier.
:param driver: A function to save images in this format.

---
## register_extension
```python
from Image import register_extension
```

Registers an image extension.  This function should not be
used in application code.

:param id: An image format identifier.
:param extension: An extension used for this format.

---
## register_extensions
```python
from Image import register_extensions
```

Registers image extensions.  This function should not be
used in application code.

:param id: An image format identifier.
:param extensions: A list of extensions used for this format.

---
## registered_extensions
```python
from Image import registered_extensions
```

Returns a dictionary containing all file extensions belonging
to registered plugins

---
## register_decoder
```python
from Image import register_decoder
```

Registers an image decoder.  This function should not be
used in application code.

:param name: The name of the decoder
:param decoder: An ImageFile.PyDecoder object

.. versionadded:: 4.1.0

---
## register_encoder
```python
from Image import register_encoder
```

Registers an image encoder.  This function should not be
used in application code.

:param name: The name of the encoder
:param encoder: An ImageFile.PyEncoder object

.. versionadded:: 4.1.0

---
## _show
```python
from Image import _show
```



---
## effect_mandelbrot
```python
from Image import effect_mandelbrot
```

Generate a Mandelbrot set covering the given extent.

:param size: The requested size in pixels, as a 2-tuple:
   (width, height).
:param extent: The extent to cover, as a 4-tuple:
   (x0, y0, x1, y1).
:param quality: Quality.

---
## effect_noise
```python
from Image import effect_noise
```

Generate Gaussian noise centered around 128.

:param size: The requested size in pixels, as a 2-tuple:
   (width, height).
:param sigma: Standard deviation of noise.

---
## linear_gradient
```python
from Image import linear_gradient
```

Generate 256x256 linear gradient from black to white, top to bottom.

:param mode: Input mode.

---
## radial_gradient
```python
from Image import radial_gradient
```

Generate 256x256 radial gradient from black to white, centre to edge.

:param mode: Input mode.

---
## _apply_env_variables
```python
from Image import _apply_env_variables
```



---
## Exif
```python
from Image import Exif
```

This class provides read and write access to EXIF image data::

  from PIL import Image
  im = Image.open("exif.png")
  exif = im.getexif()  # Returns an instance of this class

Information can be read and written, iterated over or deleted::

  print(exif[274])  # 1
  exif[274] = 2
  for k, v in exif.items():
    print("Tag", k, "Value", v)  # Tag 274 Value 2
  del exif[274]

To access information beyond IFD0, :py:meth:`~PIL.Image.Exif.get_ifd`
returns a dictionary::

  from PIL import ExifTags
  im = Image.open("exif_gps.jpg")
  exif = im.getexif()
  gps_ifd = exif.get_ifd(ExifTags.IFD.GPSInfo)
  print(gps_ifd)

Other IFDs include ``ExifTags.IFD.Exif``, ``ExifTags.IFD.Makernote``,
``ExifTags.IFD.Interop`` and ``ExifTags.IFD.IFD1``.

:py:mod:`~PIL.ExifTags` also has enum classes to provide names for data::

  print(exif[ExifTags.Base.Software])  # PIL
  print(gps_ifd[ExifTags.GPS.GPSDateStamp])  # 1999:99:99 99:99:99

---
## __init__
```python
from Image import __init__
```



---
## __neg__
```python
from Image import __neg__
```



---
## __add__
```python
from Image import __add__
```



---
## __sub__
```python
from Image import __sub__
```



---
## __rsub__
```python
from Image import __rsub__
```



---
## __mul__
```python
from Image import __mul__
```



---
## __truediv__
```python
from Image import __truediv__
```



---
## getdata
```python
from Image import getdata
```

Returns the contents of this image as a sequence object
containing pixel values.  The sequence object is flattened, so
that values for line one follow directly after the values of
line zero, and so on.

Note that the sequence object returned by this method is an
internal PIL data type, which only supports certain sequence
operations.  To convert it to an ordinary sequence (e.g. for
printing), use ``list(im.getdata())``.

:param band: What band to return.  The default is to return
   all bands.  To return a single band, pass in the index
   value (e.g. 0 to get the "R" band from an "RGB" image).
:returns: A sequence-like object.

---
## width
```python
from Image import width
```



---
## height
```python
from Image import height
```



---
## size
```python
from Image import size
```



---
## mode
```python
from Image import mode
```



---
## _new
```python
from Image import _new
```



---
## __enter__
```python
from Image import __enter__
```



---
## _close_fp
```python
from Image import _close_fp
```



---
## __exit__
```python
from Image import __exit__
```



---
## close
```python
from Image import close
```

Closes the file pointer, if possible.

This operation will destroy the image core and release its memory.
The image data will be unusable afterward.

This function is required to close images that have multiple frames or
have not had their file read and closed by the
:py:meth:`~PIL.Image.Image.load` method. See :ref:`file-handling` for
more information.

---
## _copy
```python
from Image import _copy
```



---
## _ensure_mutable
```python
from Image import _ensure_mutable
```



---
## _dump
```python
from Image import _dump
```



---
## __eq__
```python
from Image import __eq__
```



---
## __repr__
```python
from Image import __repr__
```



---
## _repr_pretty_
```python
from Image import _repr_pretty_
```

IPython plain text display support

---
## _repr_image
```python
from Image import _repr_image
```

Helper function for iPython display hook.

:param image_format: Image format.
:returns: image as bytes, saved into the given format.

---
## _repr_png_
```python
from Image import _repr_png_
```

iPython display hook support for PNG format.

:returns: PNG version of the image as bytes

---
## _repr_jpeg_
```python
from Image import _repr_jpeg_
```

iPython display hook support for JPEG format.

:returns: JPEG version of the image as bytes

---
## __array_interface__
```python
from Image import __array_interface__
```



---
## __getstate__
```python
from Image import __getstate__
```



---
## __setstate__
```python
from Image import __setstate__
```



---
## tobytes
```python
from Image import tobytes
```



---
## tobitmap
```python
from Image import tobitmap
```

Returns the image converted to an X11 bitmap.

.. note:: This method only works for mode "1" images.

:param name: The name prefix to use for the bitmap variables.
:returns: A string containing an X11 bitmap.
:raises ValueError: If the mode is not "1"

---
## load
```python
from Image import load
```



---
## verify
```python
from Image import verify
```

Verifies the contents of a file. For data read from a file, this
method attempts to determine if the file is broken, without
actually decoding the image data.  If this method finds any
problems, it raises suitable exceptions.  If you need to load
the image after using this method, you must reopen the image
file.

---
## convert
```python
from Image import convert
```

Returns a converted copy of this image. For the "P" mode, this
method translates pixels through the palette.  If mode is
omitted, a mode is chosen so that all information in the image
and the palette can be represented without a palette.

This supports all possible conversions between "L", "RGB" and "CMYK". The
``matrix`` argument only supports "L" and "RGB".

When translating a color image to grayscale (mode "L"),
the library uses the ITU-R 601-2 luma transform::

    L = R * 299/1000 + G * 587/1000 + B * 114/1000

The default method of converting a grayscale ("L") or "RGB"
image into a bilevel (mode "1") image uses Floyd-Steinberg
dither to approximate the original image luminosity levels. If
dither is ``None``, all values larger than 127 are set to 255 (white),
all other values to 0 (black). To use other thresholds, use the
:py:meth:`~PIL.Image.Image.point` method.

When converting from "RGBA" to "P" without a ``matrix`` argument,
this passes the operation to :py:meth:`~PIL.Image.Image.quantize`,
and ``dither`` and ``palette`` are ignored.

When converting from "PA", if an "RGBA" palette is present, the alpha
channel from the image will be used instead of the values from the palette.

:param mode: The requested mode. See: :ref:`concept-modes`.
:param matrix: An optional conversion matrix.  If given, this
   should be 4- or 12-tuple containing floating point values.
:param dither: Dithering method, used when converting from
   mode "RGB" to "P" or from "RGB" or "L" to "1".
   Available methods are :data:`Dither.NONE` or :data:`Dither.FLOYDSTEINBERG`
   (default). Note that this is not used when ``matrix`` is supplied.
:param palette: Palette to use when converting from mode "RGB"
   to "P".  Available palettes are :data:`Palette.WEB` or
   :data:`Palette.ADAPTIVE`.
:param colors: Number of colors to use for the :data:`Palette.ADAPTIVE`
   palette. Defaults to 256.
:rtype: :py:class:`~PIL.Image.Image`
:returns: An :py:class:`~PIL.Image.Image` object.

---
## quantize
```python
from Image import quantize
```

Convert the image to 'P' mode with the specified number
of colors.

:param colors: The desired number of colors, <= 256
:param method: :data:`Quantize.MEDIANCUT` (median cut),
               :data:`Quantize.MAXCOVERAGE` (maximum coverage),
               :data:`Quantize.FASTOCTREE` (fast octree),
               :data:`Quantize.LIBIMAGEQUANT` (libimagequant; check support
               using :py:func:`PIL.features.check_feature` with
               ``feature="libimagequant"``).

               By default, :data:`Quantize.MEDIANCUT` will be used.

               The exception to this is RGBA images. :data:`Quantize.MEDIANCUT`
               and :data:`Quantize.MAXCOVERAGE` do not support RGBA images, so
               :data:`Quantize.FASTOCTREE` is used by default instead.
:param kmeans: Integer greater than or equal to zero.
:param palette: Quantize to the palette of given
                :py:class:`PIL.Image.Image`.
:param dither: Dithering method, used when converting from
   mode "RGB" to "P" or from "RGB" or "L" to "1".
   Available methods are :data:`Dither.NONE` or :data:`Dither.FLOYDSTEINBERG`
   (default).
:returns: A new image

---
## copy
```python
from Image import copy
```

Copies this image. Use this method if you wish to paste things
into an image, but still retain the original.

:rtype: :py:class:`~PIL.Image.Image`
:returns: An :py:class:`~PIL.Image.Image` object.

---
## crop
```python
from Image import crop
```

Returns a rectangular region from this image. The box is a
4-tuple defining the left, upper, right, and lower pixel
coordinate. See :ref:`coordinate-system`.

Note: Prior to Pillow 3.4.0, this was a lazy operation.

:param box: The crop rectangle, as a (left, upper, right, lower)-tuple.
:rtype: :py:class:`~PIL.Image.Image`
:returns: An :py:class:`~PIL.Image.Image` object.

---
## _crop
```python
from Image import _crop
```

Returns a rectangular region from the core image object im.

This is equivalent to calling im.crop((x0, y0, x1, y1)), but
includes additional sanity checks.

:param im: a core image object
:param box: The crop rectangle, as a (left, upper, right, lower)-tuple.
:returns: A core image object.

---
## draft
```python
from Image import draft
```

Configures the image file loader so it returns a version of the
image that as closely as possible matches the given mode and
size. For example, you can use this method to convert a color
JPEG to grayscale while loading it.

If any changes are made, returns a tuple with the chosen ``mode`` and
``box`` with coordinates of the original image within the altered one.

Note that this method modifies the :py:class:`~PIL.Image.Image` object
in place. If the image has already been loaded, this method has no
effect.

Note: This method is not implemented for most images. It is
currently implemented only for JPEG and MPO images.

:param mode: The requested mode.
:param size: The requested size in pixels, as a 2-tuple:
   (width, height).

---
## _expand
```python
from Image import _expand
```



---
## filter
```python
from Image import filter
```

Filters this image using the given filter.  For a list of
available filters, see the :py:mod:`~PIL.ImageFilter` module.

:param filter: Filter kernel.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## getbands
```python
from Image import getbands
```

Returns a tuple containing the name of each band in this image.
For example, ``getbands`` on an RGB image returns ("R", "G", "B").

:returns: A tuple containing band names.
:rtype: tuple

---
## getbbox
```python
from Image import getbbox
```

Calculates the bounding box of the non-zero regions in the
image.

:param alpha_only: Optional flag, defaulting to ``True``.
   If ``True`` and the image has an alpha channel, trim transparent pixels.
   Otherwise, trim pixels when all channels are zero.
   Keyword-only argument.
:returns: The bounding box is returned as a 4-tuple defining the
   left, upper, right, and lower pixel coordinate. See
   :ref:`coordinate-system`. If the image is completely empty, this
   method returns None.

---
## getcolors
```python
from Image import getcolors
```

Returns a list of colors used in this image.

The colors will be in the image's mode. For example, an RGB image will
return a tuple of (red, green, blue) color values, and a P image will
return the index of the color in the palette.

:param maxcolors: Maximum number of colors.  If this number is
   exceeded, this method returns None.  The default limit is
   256 colors.
:returns: An unsorted list of (count, pixel) values.

---
## getextrema
```python
from Image import getextrema
```

Gets the minimum and maximum pixel values for each band in
the image.

:returns: For a single-band image, a 2-tuple containing the
   minimum and maximum pixel value.  For a multi-band image,
   a tuple containing one 2-tuple for each band.

---
## getxmp
```python
from Image import getxmp
```

Returns a dictionary containing the XMP tags.
Requires defusedxml to be installed.

:returns: XMP tags in a dictionary.

---
## getexif
```python
from Image import getexif
```

Gets EXIF data from the image.

:returns: an :py:class:`~PIL.Image.Exif` object.

---
## _reload_exif
```python
from Image import _reload_exif
```



---
## get_child_images
```python
from Image import get_child_images
```



---
## getim
```python
from Image import getim
```

Returns a capsule that points to the internal image memory.

:returns: A capsule object.

---
## getpalette
```python
from Image import getpalette
```

Returns the image palette as a list.

:param rawmode: The mode in which to return the palette. ``None`` will
   return the palette in its current mode.

   .. versionadded:: 9.1.0

:returns: A list of color values [r, g, b, ...], or None if the
   image has no palette.

---
## has_transparency_data
```python
from Image import has_transparency_data
```

Determine if an image has transparency data, whether in the form of an
alpha channel, a palette with an alpha channel, or a "transparency" key
in the info dictionary.

Note the image might still appear solid, if all of the values shown
within are opaque.

:returns: A boolean.

---
## apply_transparency
```python
from Image import apply_transparency
```

If a P mode image has a "transparency" key in the info dictionary,
remove the key and instead apply the transparency to the palette.
Otherwise, the image is unchanged.

---
## getpixel
```python
from Image import getpixel
```

Returns the pixel value at a given position.

:param xy: The coordinate, given as (x, y). See
   :ref:`coordinate-system`.
:returns: The pixel value.  If the image is a multi-layer image,
   this method returns a tuple.

---
## getprojection
```python
from Image import getprojection
```

Get projection to x and y axes

:returns: Two sequences, indicating where there are non-zero
    pixels along the X-axis and the Y-axis, respectively.

---
## histogram
```python
from Image import histogram
```

Returns a histogram for the image. The histogram is returned as a
list of pixel counts, one for each pixel value in the source
image. Counts are grouped into 256 bins for each band, even if
the image has more than 8 bits per band. If the image has more
than one band, the histograms for all bands are concatenated (for
example, the histogram for an "RGB" image contains 768 values).

A bilevel image (mode "1") is treated as a grayscale ("L") image
by this method.

If a mask is provided, the method returns a histogram for those
parts of the image where the mask image is non-zero. The mask
image must have the same size as the image, and be either a
bi-level image (mode "1") or a grayscale image ("L").

:param mask: An optional mask.
:param extrema: An optional tuple of manually-specified extrema.
:returns: A list containing pixel counts.

---
## entropy
```python
from Image import entropy
```

Calculates and returns the entropy for the image.

A bilevel image (mode "1") is treated as a grayscale ("L")
image by this method.

If a mask is provided, the method employs the histogram for
those parts of the image where the mask image is non-zero.
The mask image must have the same size as the image, and be
either a bi-level image (mode "1") or a grayscale image ("L").

:param mask: An optional mask.
:param extrema: An optional tuple of manually-specified extrema.
:returns: A float value representing the image entropy

---
## paste
```python
from Image import paste
```

Pastes another image into this image. The box argument is either
a 2-tuple giving the upper left corner, a 4-tuple defining the
left, upper, right, and lower pixel coordinate, or None (same as
(0, 0)). See :ref:`coordinate-system`. If a 4-tuple is given, the size
of the pasted image must match the size of the region.

If the modes don't match, the pasted image is converted to the mode of
this image (see the :py:meth:`~PIL.Image.Image.convert` method for
details).

Instead of an image, the source can be a integer or tuple
containing pixel values.  The method then fills the region
with the given color.  When creating RGB images, you can
also use color strings as supported by the ImageColor module.

If a mask is given, this method updates only the regions
indicated by the mask. You can use either "1", "L", "LA", "RGBA"
or "RGBa" images (if present, the alpha band is used as mask).
Where the mask is 255, the given image is copied as is.  Where
the mask is 0, the current value is preserved.  Intermediate
values will mix the two images together, including their alpha
channels if they have them.

See :py:meth:`~PIL.Image.Image.alpha_composite` if you want to
combine images with respect to their alpha channels.

:param im: Source image or pixel value (integer, float or tuple).
:param box: An optional 4-tuple giving the region to paste into.
   If a 2-tuple is used instead, it's treated as the upper left
   corner.  If omitted or None, the source is pasted into the
   upper left corner.

   If an image is given as the second argument and there is no
   third, the box defaults to (0, 0), and the second argument
   is interpreted as a mask image.
:param mask: An optional mask image.

---
## point
```python
from Image import point
```



---
## putalpha
```python
from Image import putalpha
```

Adds or replaces the alpha layer in this image.  If the image
does not have an alpha layer, it's converted to "LA" or "RGBA".
The new layer must be either "L" or "1".

:param alpha: The new alpha layer.  This can either be an "L" or "1"
   image having the same size as this image, or an integer.

---
## putdata
```python
from Image import putdata
```

Copies pixel data from a flattened sequence object into the image. The
values should start at the upper left corner (0, 0), continue to the
end of the line, followed directly by the first value of the second
line, and so on. Data will be read until either the image or the
sequence ends. The scale and offset values are used to adjust the
sequence values: **pixel = value*scale + offset**.

:param data: A flattened sequence object.
:param scale: An optional scale value.  The default is 1.0.
:param offset: An optional offset value.  The default is 0.0.

---
## putpalette
```python
from Image import putpalette
```

Attaches a palette to this image.  The image must be a "P", "PA", "L"
or "LA" image.

The palette sequence must contain at most 256 colors, made up of one
integer value for each channel in the raw mode.
For example, if the raw mode is "RGB", then it can contain at most 768
values, made up of red, green and blue values for the corresponding pixel
index in the 256 colors.
If the raw mode is "RGBA", then it can contain at most 1024 values,
containing red, green, blue and alpha values.

Alternatively, an 8-bit string may be used instead of an integer sequence.

:param data: A palette sequence (either a list or a string).
:param rawmode: The raw mode of the palette. Either "RGB", "RGBA", or a mode
   that can be transformed to "RGB" or "RGBA" (e.g. "R", "BGR;15", "RGBA;L").

---
## putpixel
```python
from Image import putpixel
```

Modifies the pixel at the given position. The color is given as
a single numerical value for single-band images, and a tuple for
multi-band images. In addition to this, RGB and RGBA tuples are
accepted for P and PA images.

Note that this method is relatively slow.  For more extensive changes,
use :py:meth:`~PIL.Image.Image.paste` or the :py:mod:`~PIL.ImageDraw`
module instead.

See:

* :py:meth:`~PIL.Image.Image.paste`
* :py:meth:`~PIL.Image.Image.putdata`
* :py:mod:`~PIL.ImageDraw`

:param xy: The pixel coordinate, given as (x, y). See
   :ref:`coordinate-system`.
:param value: The pixel value.

---
## remap_palette
```python
from Image import remap_palette
```

Rewrites the image to reorder the palette.

:param dest_map: A list of indexes into the original palette.
   e.g. ``[1,0]`` would swap a two item palette, and ``list(range(256))``
   is the identity transform.
:param source_palette: Bytes or None.
:returns:  An :py:class:`~PIL.Image.Image` object.

---
## _get_safe_box
```python
from Image import _get_safe_box
```

Expands the box so it includes adjacent pixels
that may be used by resampling with the given resampling filter.

---
## resize
```python
from Image import resize
```

Returns a resized copy of this image.

:param size: The requested size in pixels, as a 2-tuple:
   (width, height).
:param resample: An optional resampling filter.  This can be
   one of :py:data:`Resampling.NEAREST`, :py:data:`Resampling.BOX`,
   :py:data:`Resampling.BILINEAR`, :py:data:`Resampling.HAMMING`,
   :py:data:`Resampling.BICUBIC` or :py:data:`Resampling.LANCZOS`.
   If the image has mode "1" or "P", it is always set to
   :py:data:`Resampling.NEAREST`. If the image mode specifies a number
   of bits, such as "I;16", then the default filter is
   :py:data:`Resampling.NEAREST`. Otherwise, the default filter is
   :py:data:`Resampling.BICUBIC`. See: :ref:`concept-filters`.
:param box: An optional 4-tuple of floats providing
   the source image region to be scaled.
   The values must be within (0, 0, width, height) rectangle.
   If omitted or None, the entire source is used.
:param reducing_gap: Apply optimization by resizing the image
   in two steps. First, reducing the image by integer times
   using :py:meth:`~PIL.Image.Image.reduce`.
   Second, resizing using regular resampling. The last step
   changes size no less than by ``reducing_gap`` times.
   ``reducing_gap`` may be None (no first step is performed)
   or should be greater than 1.0. The bigger ``reducing_gap``,
   the closer the result to the fair resampling.
   The smaller ``reducing_gap``, the faster resizing.
   With ``reducing_gap`` greater or equal to 3.0, the result is
   indistinguishable from fair resampling in most cases.
   The default value is None (no optimization).
:returns: An :py:class:`~PIL.Image.Image` object.

---
## reduce
```python
from Image import reduce
```

Returns a copy of the image reduced ``factor`` times.
If the size of the image is not dividable by ``factor``,
the resulting size will be rounded up.

:param factor: A greater than 0 integer or tuple of two integers
   for width and height separately.
:param box: An optional 4-tuple of ints providing
   the source image region to be reduced.
   The values must be within ``(0, 0, width, height)`` rectangle.
   If omitted or ``None``, the entire source is used.

---
## rotate
```python
from Image import rotate
```

Returns a rotated copy of this image.  This method returns a
copy of this image, rotated the given number of degrees counter
clockwise around its centre.

:param angle: In degrees counter clockwise.
:param resample: An optional resampling filter.  This can be
   one of :py:data:`Resampling.NEAREST` (use nearest neighbour),
   :py:data:`Resampling.BILINEAR` (linear interpolation in a 2x2
   environment), or :py:data:`Resampling.BICUBIC` (cubic spline
   interpolation in a 4x4 environment). If omitted, or if the image has
   mode "1" or "P", it is set to :py:data:`Resampling.NEAREST`.
   See :ref:`concept-filters`.
:param expand: Optional expansion flag.  If true, expands the output
   image to make it large enough to hold the entire rotated image.
   If false or omitted, make the output image the same size as the
   input image.  Note that the expand flag assumes rotation around
   the center and no translation.
:param center: Optional center of rotation (a 2-tuple).  Origin is
   the upper left corner.  Default is the center of the image.
:param translate: An optional post-rotate translation (a 2-tuple).
:param fillcolor: An optional color for area outside the rotated image.
:returns: An :py:class:`~PIL.Image.Image` object.

---
## save
```python
from Image import save
```

Saves this image under the given filename.  If no format is
specified, the format to use is determined from the filename
extension, if possible.

Keyword options can be used to provide additional instructions
to the writer. If a writer doesn't recognise an option, it is
silently ignored. The available options are described in the
:doc:`image format documentation
<../handbook/image-file-formats>` for each writer.

You can use a file object instead of a filename. In this case,
you must always specify the format. The file object must
implement the ``seek``, ``tell``, and ``write``
methods, and be opened in binary mode.

:param fp: A filename (string), os.PathLike object or file object.
:param format: Optional format override.  If omitted, the
   format to use is determined from the filename extension.
   If a file object was used instead of a filename, this
   parameter should always be used.
:param params: Extra parameters to the image writer.
:returns: None
:exception ValueError: If the output format could not be determined
   from the file name.  Use the format option to solve this.
:exception OSError: If the file could not be written.  The file
   may have been created, and may contain partial data.

---
## seek
```python
from Image import seek
```

Seeks to the given frame in this sequence file. If you seek
beyond the end of the sequence, the method raises an
``EOFError`` exception. When a sequence file is opened, the
library automatically seeks to frame 0.

See :py:meth:`~PIL.Image.Image.tell`.

If defined, :attr:`~PIL.Image.Image.n_frames` refers to the
number of available frames.

:param frame: Frame number, starting at 0.
:exception EOFError: If the call attempts to seek beyond the end
    of the sequence.

---
## show
```python
from Image import show
```

Displays this image. This method is mainly intended for debugging purposes.

This method calls :py:func:`PIL.ImageShow.show` internally. You can use
:py:func:`PIL.ImageShow.register` to override its default behaviour.

The image is first saved to a temporary file. By default, it will be in
PNG format.

On Unix, the image is then opened using the **xdg-open**, **display**,
**gm**, **eog** or **xv** utility, depending on which one can be found.

On macOS, the image is opened with the native Preview application.

On Windows, the image is opened with the standard PNG display utility.

:param title: Optional title to use for the image window, where possible.

---
## split
```python
from Image import split
```

Split this image into individual bands. This method returns a
tuple of individual image bands from an image. For example,
splitting an "RGB" image creates three new images each
containing a copy of one of the original bands (red, green,
blue).

If you need only one band, :py:meth:`~PIL.Image.Image.getchannel`
method can be more convenient and faster.

:returns: A tuple containing bands.

---
## getchannel
```python
from Image import getchannel
```

Returns an image containing a single channel of the source image.

:param channel: What channel to return. Could be index
  (0 for "R" channel of "RGB") or channel name
  ("A" for alpha channel of "RGBA").
:returns: An image in "L" mode.

.. versionadded:: 4.3.0

---
## tell
```python
from Image import tell
```

Returns the current frame number. See :py:meth:`~PIL.Image.Image.seek`.

If defined, :attr:`~PIL.Image.Image.n_frames` refers to the
number of available frames.

:returns: Frame number, starting with 0.

---
## thumbnail
```python
from Image import thumbnail
```

Make this image into a thumbnail.  This method modifies the
image to contain a thumbnail version of itself, no larger than
the given size.  This method calculates an appropriate thumbnail
size to preserve the aspect of the image, calls the
:py:meth:`~PIL.Image.Image.draft` method to configure the file reader
(where applicable), and finally resizes the image.

Note that this function modifies the :py:class:`~PIL.Image.Image`
object in place.  If you need to use the full resolution image as well,
apply this method to a :py:meth:`~PIL.Image.Image.copy` of the original
image.

:param size: The requested size in pixels, as a 2-tuple:
   (width, height).
:param resample: Optional resampling filter.  This can be one
   of :py:data:`Resampling.NEAREST`, :py:data:`Resampling.BOX`,
   :py:data:`Resampling.BILINEAR`, :py:data:`Resampling.HAMMING`,
   :py:data:`Resampling.BICUBIC` or :py:data:`Resampling.LANCZOS`.
   If omitted, it defaults to :py:data:`Resampling.BICUBIC`.
   (was :py:data:`Resampling.NEAREST` prior to version 2.5.0).
   See: :ref:`concept-filters`.
:param reducing_gap: Apply optimization by resizing the image
   in two steps. First, reducing the image by integer times
   using :py:meth:`~PIL.Image.Image.reduce` or
   :py:meth:`~PIL.Image.Image.draft` for JPEG images.
   Second, resizing using regular resampling. The last step
   changes size no less than by ``reducing_gap`` times.
   ``reducing_gap`` may be None (no first step is performed)
   or should be greater than 1.0. The bigger ``reducing_gap``,
   the closer the result to the fair resampling.
   The smaller ``reducing_gap``, the faster resizing.
   With ``reducing_gap`` greater or equal to 3.0, the result is
   indistinguishable from fair resampling in most cases.
   The default value is 2.0 (very close to fair resampling
   while still being faster in many cases).
:returns: None

---
## transform
```python
from Image import transform
```



---
## __transformer
```python
from Image import __transformer
```



---
## transpose
```python
from Image import transpose
```

Transpose image (flip or rotate in 90 degree steps)

:param method: One of :py:data:`Transpose.FLIP_LEFT_RIGHT`,
  :py:data:`Transpose.FLIP_TOP_BOTTOM`, :py:data:`Transpose.ROTATE_90`,
  :py:data:`Transpose.ROTATE_180`, :py:data:`Transpose.ROTATE_270`,
  :py:data:`Transpose.TRANSPOSE` or :py:data:`Transpose.TRANSVERSE`.
:returns: Returns a flipped or rotated copy of this image.

---
## effect_spread
```python
from Image import effect_spread
```

Randomly spread pixels in an image.

:param distance: Distance to spread pixels.

---
## toqimage
```python
from Image import toqimage
```

Returns a QImage copy of this image

---
## toqpixmap
```python
from Image import toqpixmap
```

Returns a QPixmap copy of this image

---
## _open_core
```python
from Image import _open_core
```



---
## _fixup
```python
from Image import _fixup
```



---
## _fixup_dict
```python
from Image import _fixup_dict
```



---
## _get_ifd_dict
```python
from Image import _get_ifd_dict
```



---
## _get_head
```python
from Image import _get_head
```



---
## load_from_fp
```python
from Image import load_from_fp
```



---
## _get_merged_dict
```python
from Image import _get_merged_dict
```



---
## get_ifd
```python
from Image import get_ifd
```



---
## hide_offsets
```python
from Image import hide_offsets
```



---
## __str__
```python
from Image import __str__
```



---
## __len__
```python
from Image import __len__
```



---
## __getitem__
```python
from Image import __getitem__
```



---
## __contains__
```python
from Image import __contains__
```



---
## __setitem__
```python
from Image import __setitem__
```



---
## __delitem__
```python
from Image import __delitem__
```



---
## __iter__
```python
from Image import __iter__
```



---
## get_name
```python
from Image import get_name
```



---
## get_value
```python
from Image import get_value
```



---
## preserve_aspect_ratio
```python
from Image import preserve_aspect_ratio
```



---
## round_aspect
```python
from Image import round_aspect
```



---
## convert_transparency
```python
from Image import convert_transparency
```



---
## __name__
```python
from XVThumbImagePlugin import __name__
```



---
## _accept
```python
from XVThumbImagePlugin import _accept
```



---
## XVThumbImageFile
```python
from XVThumbImagePlugin import XVThumbImageFile
```



---
## _open
```python
from XVThumbImagePlugin import _open
```



---
## __name__
```python
from SgiImagePlugin import __name__
```



---
## _accept
```python
from SgiImagePlugin import _accept
```



---
## SgiImageFile
```python
from SgiImagePlugin import SgiImageFile
```



---
## _save
```python
from SgiImagePlugin import _save
```



---
## SGI16Decoder
```python
from SgiImagePlugin import SGI16Decoder
```



---
## _open
```python
from SgiImagePlugin import _open
```



---
## decode
```python
from SgiImagePlugin import decode
```



---
## __name__
```python
from report import __name__
```

Classes for producing HTML reports about imprecision.

---
## __name__
```python
from ImImagePlugin import __name__
```



---
## number
```python
from ImImagePlugin import number
```



---
## ImImageFile
```python
from ImImagePlugin import ImImageFile
```



---
## _save
```python
from ImImagePlugin import _save
```



---
## _open
```python
from ImImagePlugin import _open
```



---
## n_frames
```python
from ImImagePlugin import n_frames
```



---
## is_animated
```python
from ImImagePlugin import is_animated
```



---
## seek
```python
from ImImagePlugin import seek
```



---
## tell
```python
from ImImagePlugin import tell
```



---
## __name__
```python
from PsdImagePlugin import __name__
```



---
## _accept
```python
from PsdImagePlugin import _accept
```



---
## PsdImageFile
```python
from PsdImagePlugin import PsdImageFile
```



---
## _layerinfo
```python
from PsdImagePlugin import _layerinfo
```



---
## _maketile
```python
from PsdImagePlugin import _maketile
```



---
## _open
```python
from PsdImagePlugin import _open
```



---
## layers
```python
from PsdImagePlugin import layers
```



---
## n_frames
```python
from PsdImagePlugin import n_frames
```



---
## is_animated
```python
from PsdImagePlugin import is_animated
```



---
## seek
```python
from PsdImagePlugin import seek
```



---
## tell
```python
from PsdImagePlugin import tell
```



---
## read
```python
from PsdImagePlugin import read
```



---
## __name__
```python
from JpegImagePlugin import __name__
```



---
## Skip
```python
from JpegImagePlugin import Skip
```



---
## APP
```python
from JpegImagePlugin import APP
```



---
## COM
```python
from JpegImagePlugin import COM
```



---
## SOF
```python
from JpegImagePlugin import SOF
```



---
## DQT
```python
from JpegImagePlugin import DQT
```



---
## _accept
```python
from JpegImagePlugin import _accept
```



---
## JpegImageFile
```python
from JpegImagePlugin import JpegImageFile
```



---
## _getexif
```python
from JpegImagePlugin import _getexif
```



---
## _getmp
```python
from JpegImagePlugin import _getmp
```



---
## get_sampling
```python
from JpegImagePlugin import get_sampling
```



---
## _save
```python
from JpegImagePlugin import _save
```



---
## _save_cjpeg
```python
from JpegImagePlugin import _save_cjpeg
```



---
## jpeg_factory
```python
from JpegImagePlugin import jpeg_factory
```



---
## _open
```python
from JpegImagePlugin import _open
```



---
## load_read
```python
from JpegImagePlugin import load_read
```

internal: read more image data
For premature EOF and LOAD_TRUNCATED_IMAGES adds EOI marker
so libjpeg can finish decoding

---
## draft
```python
from JpegImagePlugin import draft
```



---
## load_djpeg
```python
from JpegImagePlugin import load_djpeg
```



---
## _read_dpi_from_exif
```python
from JpegImagePlugin import _read_dpi_from_exif
```



---
## validate_qtables
```python
from JpegImagePlugin import validate_qtables
```



---
## __name__
```python
from ImageFont import __name__
```



---
## Layout
```python
from ImageFont import Layout
```



---
## _string_length_check
```python
from ImageFont import _string_length_check
```



---
## ImageFont
```python
from ImageFont import ImageFont
```

PIL font wrapper

---
## FreeTypeFont
```python
from ImageFont import FreeTypeFont
```

FreeType font wrapper (requires _imagingft service)

---
## TransposedFont
```python
from ImageFont import TransposedFont
```

Wrapper for writing rotated or mirrored text

---
## load
```python
from ImageFont import load
```

Load a font file.  This function loads a font object from the given
bitmap font file, and returns the corresponding font object.

:param filename: Name of font file.
:return: A font object.
:exception OSError: If the file could not be read.

---
## truetype
```python
from ImageFont import truetype
```

Load a TrueType or OpenType font from a file or file-like object,
and create a font object.
This function loads a font object from the given file or file-like
object, and creates a font object for a font of the given size.

Pillow uses FreeType to open font files. On Windows, be aware that FreeType
will keep the file open as long as the FreeTypeFont object exists. Windows
limits the number of files that can be open in C at once to 512, so if many
fonts are opened simultaneously and that limit is approached, an
``OSError`` may be thrown, reporting that FreeType "cannot open resource".
A workaround would be to copy the file(s) into memory, and open that instead.

This function requires the _imagingft service.

:param font: A filename or file-like object containing a TrueType font.
             If the file is not found in this filename, the loader may also
             search in other directories, such as:

             * The :file:`fonts/` directory on Windows,
             * :file:`/Library/Fonts/`, :file:`/System/Library/Fonts/`
               and :file:`~/Library/Fonts/` on macOS.
             * :file:`~/.local/share/fonts`, :file:`/usr/local/share/fonts`,
               and :file:`/usr/share/fonts` on Linux; or those specified by
               the ``XDG_DATA_HOME`` and ``XDG_DATA_DIRS`` environment variables
               for user-installed and system-wide fonts, respectively.

:param size: The requested size, in pixels.
:param index: Which font face to load (default is first available face).
:param encoding: Which font encoding to use (default is Unicode). Possible
                 encodings include (see the FreeType documentation for more
                 information):

                 * "unic" (Unicode)
                 * "symb" (Microsoft Symbol)
                 * "ADOB" (Adobe Standard)
                 * "ADBE" (Adobe Expert)
                 * "ADBC" (Adobe Custom)
                 * "armn" (Apple Roman)
                 * "sjis" (Shift JIS)
                 * "gb  " (PRC)
                 * "big5"
                 * "wans" (Extended Wansung)
                 * "joha" (Johab)
                 * "lat1" (Latin-1)

                 This specifies the character set to use. It does not alter the
                 encoding of any text provided in subsequent operations.
:param layout_engine: Which layout engine to use, if available:
                 :attr:`.ImageFont.Layout.BASIC` or :attr:`.ImageFont.Layout.RAQM`.
                 If it is available, Raqm layout will be used by default.
                 Otherwise, basic layout will be used.

                 Raqm layout is recommended for all non-English text. If Raqm layout
                 is not required, basic layout will have better performance.

                 You can check support for Raqm layout using
                 :py:func:`PIL.features.check_feature` with ``feature="raqm"``.

                 .. versionadded:: 4.2.0
:return: A font object.
:exception OSError: If the file could not be read.
:exception ValueError: If the font size is not greater than zero.

---
## load_path
```python
from ImageFont import load_path
```

Load font file. Same as :py:func:`~PIL.ImageFont.load`, but searches for a
bitmap font along the Python path.

:param filename: Name of font file.
:return: A font object.
:exception OSError: If the file could not be read.

---
## load_default_imagefont
```python
from ImageFont import load_default_imagefont
```



---
## load_default
```python
from ImageFont import load_default
```

If FreeType support is available, load a version of Aileron Regular,
https://dotcolon.net/font/aileron, with a more limited character set.

Otherwise, load a "better than nothing" font.

.. versionadded:: 1.1.4

:param size: The font size of Aileron Regular.

    .. versionadded:: 10.1.0

:return: A font object.

---
## _load_pilfont
```python
from ImageFont import _load_pilfont
```



---
## _load_pilfont_data
```python
from ImageFont import _load_pilfont_data
```



---
## getmask
```python
from ImageFont import getmask
```



---
## getbbox
```python
from ImageFont import getbbox
```



---
## getlength
```python
from ImageFont import getlength
```



---
## __init__
```python
from ImageFont import __init__
```

Wrapper that creates a transposed font from any existing font
object.

:param font: A font object.
:param orientation: An optional orientation.  If given, this should
    be one of Image.Transpose.FLIP_LEFT_RIGHT, Image.Transpose.FLIP_TOP_BOTTOM,
    Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_180, or
    Image.Transpose.ROTATE_270.

---
## __getstate__
```python
from ImageFont import __getstate__
```



---
## __setstate__
```python
from ImageFont import __setstate__
```



---
## getname
```python
from ImageFont import getname
```

:return: A tuple of the font family (e.g. Helvetica) and the font style
(e.g. Bold)

---
## getmetrics
```python
from ImageFont import getmetrics
```

:return: A tuple of the font ascent (the distance from the baseline to
the highest outline point) and descent (the distance from the
baseline to the lowest outline point, a negative value)

---
## getmask2
```python
from ImageFont import getmask2
```

Create a bitmap for the text.

If the font uses antialiasing, the bitmap should have mode ``L`` and use a
maximum value of 255. If the font has embedded color data, the bitmap
should have mode ``RGBA``. Otherwise, it should have mode ``1``.

:param text: Text to render.
:param mode: Used by some graphics drivers to indicate what mode the
             driver prefers; if empty, the renderer may return either
             mode. Note that the mode is always a string, to simplify
             C-level implementations.

             .. versionadded:: 1.1.5

:param direction: Direction of the text. It can be 'rtl' (right to
                  left), 'ltr' (left to right) or 'ttb' (top to bottom).
                  Requires libraqm.

                  .. versionadded:: 4.2.0

:param features: A list of OpenType font features to be used during text
                 layout. This is usually used to turn on optional
                 font features that are not enabled by default,
                 for example 'dlig' or 'ss01', but can be also
                 used to turn off default font features for
                 example '-liga' to disable ligatures or '-kern'
                 to disable kerning.  To get all supported
                 features, see
                 https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist
                 Requires libraqm.

                 .. versionadded:: 4.2.0

:param language: Language of the text. Different languages may use
                 different glyph shapes or ligatures. This parameter tells
                 the font which language the text is in, and to apply the
                 correct substitutions as appropriate, if available.
                 It should be a `BCP 47 language code
                 <https://www.w3.org/International/articles/language-tags/>`_
                 Requires libraqm.

                 .. versionadded:: 6.0.0

:param stroke_width: The width of the text stroke.

                 .. versionadded:: 6.2.0

:param anchor:  The text anchor alignment. Determines the relative location of
                the anchor to the text. The default alignment is top left,
                specifically ``la`` for horizontal text and ``lt`` for
                vertical text. See :ref:`text-anchors` for details.

                 .. versionadded:: 8.0.0

:param ink: Foreground ink for rendering in RGBA mode.

                 .. versionadded:: 8.0.0

:param start: Tuple of horizontal and vertical offset, as text may render
              differently when starting at fractional coordinates.

                 .. versionadded:: 9.4.0

:return: A tuple of an internal PIL storage memory instance as defined by the
         :py:mod:`PIL.Image.core` interface module, and the text offset, the
         gap between the starting coordinate and the first marking

---
## font_variant
```python
from ImageFont import font_variant
```

Create a copy of this FreeTypeFont object,
using any specified arguments to override the settings.

Parameters are identical to the parameters used to initialize this
object.

:return: A FreeTypeFont object.

---
## get_variation_names
```python
from ImageFont import get_variation_names
```

:returns: A list of the named styles in a variation font.
:exception OSError: If the font is not a variation font.

---
## set_variation_by_name
```python
from ImageFont import set_variation_by_name
```

:param name: The name of the style.
:exception OSError: If the font is not a variation font.

---
## get_variation_axes
```python
from ImageFont import get_variation_axes
```

:returns: A list of the axes in a variation font.
:exception OSError: If the font is not a variation font.

---
## set_variation_by_axes
```python
from ImageFont import set_variation_by_axes
```

:param axes: A list of values for each axis.
:exception OSError: If the font is not a variation font.

---
## freetype
```python
from ImageFont import freetype
```



---
## load_from_bytes
```python
from ImageFont import load_from_bytes
```



---
## fill
```python
from ImageFont import fill
```



---
## __name__
```python
from PpmImagePlugin import __name__
```



---
## _accept
```python
from PpmImagePlugin import _accept
```



---
## PpmImageFile
```python
from PpmImagePlugin import PpmImageFile
```



---
## PpmPlainDecoder
```python
from PpmImagePlugin import PpmPlainDecoder
```



---
## PpmDecoder
```python
from PpmImagePlugin import PpmDecoder
```



---
## _save
```python
from PpmImagePlugin import _save
```



---
## _read_magic
```python
from PpmImagePlugin import _read_magic
```



---
## _read_token
```python
from PpmImagePlugin import _read_token
```



---
## _open
```python
from PpmImagePlugin import _open
```



---
## _read_block
```python
from PpmImagePlugin import _read_block
```



---
## _find_comment_end
```python
from PpmImagePlugin import _find_comment_end
```



---
## _ignore_comments
```python
from PpmImagePlugin import _ignore_comments
```



---
## _decode_bitonal
```python
from PpmImagePlugin import _decode_bitonal
```

This is a separate method because in the plain PBM format, all data tokens are
exactly one byte, so the inter-token whitespace is optional.

---
## _decode_blocks
```python
from PpmImagePlugin import _decode_blocks
```



---
## decode
```python
from PpmImagePlugin import decode
```



---
## __name__
```python
from FtexImagePlugin import __name__
```

A Pillow loader for .ftc and .ftu files (FTEX)
Jerome Leclanche <jerome@leclan.ch>

The contents of this file are hereby released in the public domain (CC0)
Full text of the CC0 license:
  https://creativecommons.org/publicdomain/zero/1.0/

Independence War 2: Edge Of Chaos - Texture File Format - 16 October 2001

The textures used for 3D objects in Independence War 2: Edge Of Chaos are in a
packed custom format called FTEX. This file format uses file extensions FTC
and FTU.
* FTC files are compressed textures (using standard texture compression).
* FTU files are not compressed.
Texture File Format
The FTC and FTU texture files both use the same format. This
has the following structure:
{header}
{format_directory}
{data}
Where:
{header} = {
    u32:magic,
    u32:version,
    u32:width,
    u32:height,
    u32:mipmap_count,
    u32:format_count
}

* The "magic" number is "FTEX".
* "width" and "height" are the dimensions of the texture.
* "mipmap_count" is the number of mipmaps in the texture.
* "format_count" is the number of texture formats (different versions of the
same texture) in this file.

{format_directory} = format_count * { u32:format, u32:where }

The format value is 0 for DXT1 compressed textures and 1 for 24-bit RGB
uncompressed textures.
The texture data for a format starts at the position "where" in the file.

Each set of texture data in the file has the following structure:
{data} = format_count * { u32:mipmap_size, mipmap_size * { u8 } }
* "mipmap_size" is the number of bytes in that mip level. For compressed
textures this is the size of the texture data compressed with DXT1. For 24 bit
uncompressed textures, this is 3 * width * height. Following this are the image
bytes for that mipmap level.

Note: All data is stored in little-Endian (Intel) byte order.

---
## Format
```python
from FtexImagePlugin import Format
```



---
## FtexImageFile
```python
from FtexImagePlugin import FtexImageFile
```



---
## _accept
```python
from FtexImagePlugin import _accept
```



---
## _open
```python
from FtexImagePlugin import _open
```



---
## load_seek
```python
from FtexImagePlugin import load_seek
```



---
## __name__
```python
from cookies import __name__
```

requests.cookies
~~~~~~~~~~~~~~~~

Compatibility code to be able to use `http.cookiejar.CookieJar` with requests.

requests.utils imports from here, so be careful with imports.

---
## MockRequest
```python
from cookies import MockRequest
```

Wraps a `requests.Request` to mimic a `urllib2.Request`.

The code in `http.cookiejar.CookieJar` expects this interface in order to correctly
manage cookie policies, i.e., determine whether a cookie can be set, given the
domains of the request and the cookie.

The original request object is read-only. The client is responsible for collecting
the new headers via `get_new_headers()` and interpreting them appropriately. You
probably want `get_cookie_header`, defined below.

---
## MockResponse
```python
from cookies import MockResponse
```

Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`.

...what? Basically, expose the parsed HTTP headers from the server response
the way `http.cookiejar` expects to see them.

---
## extract_cookies_to_jar
```python
from cookies import extract_cookies_to_jar
```

Extract the cookies from the response into a CookieJar.

:param jar: http.cookiejar.CookieJar (not necessarily a RequestsCookieJar)
:param request: our own requests.Request object
:param response: urllib3.HTTPResponse object

---
## get_cookie_header
```python
from cookies import get_cookie_header
```

Produce an appropriate Cookie header string to be sent with `request`, or None.

:rtype: str

---
## remove_cookie_by_name
```python
from cookies import remove_cookie_by_name
```

Unsets a cookie by name, by default over all domains and paths.

Wraps CookieJar.clear(), is O(n).

---
## CookieConflictError
```python
from cookies import CookieConflictError
```

There are two cookies that meet the criteria specified in the cookie jar.
Use .get and .set and include domain and path args in order to be more specific.

---
## RequestsCookieJar
```python
from cookies import RequestsCookieJar
```

Compatibility class; is a http.cookiejar.CookieJar, but exposes a dict
interface.

This is the CookieJar we create by default for requests and sessions that
don't specify one, since some clients may expect response.cookies and
session.cookies to support dict operations.

Requests does not use the dict interface internally; it's just for
compatibility with external client code. All requests code should work
out of the box with externally provided instances of ``CookieJar``, e.g.
``LWPCookieJar`` and ``FileCookieJar``.

Unlike a regular CookieJar, this class is pickleable.

.. warning:: dictionary operations that are normally O(1) may be O(n).

---
## _copy_cookie_jar
```python
from cookies import _copy_cookie_jar
```



---
## create_cookie
```python
from cookies import create_cookie
```

Make a cookie from underspecified parameters.

By default, the pair of `name` and `value` will be set for the domain ''
and sent on every request (this is sometimes called a "supercookie").

---
## morsel_to_cookie
```python
from cookies import morsel_to_cookie
```

Convert a Morsel object into a Cookie containing the one k/v pair.

---
## cookiejar_from_dict
```python
from cookies import cookiejar_from_dict
```

Returns a CookieJar from a key/value dictionary.

:param cookie_dict: Dict of key/values to insert into CookieJar.
:param cookiejar: (optional) A cookiejar to add the cookies to.
:param overwrite: (optional) If False, will not replace cookies
    already in the jar with new ones.
:rtype: CookieJar

---
## merge_cookies
```python
from cookies import merge_cookies
```

Add cookies to cookiejar and returns a merged CookieJar.

:param cookiejar: CookieJar object to add the cookies to.
:param cookies: Dictionary or CookieJar object to be added.
:rtype: CookieJar

---
## __init__
```python
from cookies import __init__
```

Make a MockResponse for `cookiejar` to read.

:param headers: a httplib.HTTPMessage or analogous carrying the headers

---
## get_type
```python
from cookies import get_type
```



---
## get_host
```python
from cookies import get_host
```



---
## get_origin_req_host
```python
from cookies import get_origin_req_host
```



---
## get_full_url
```python
from cookies import get_full_url
```



---
## is_unverifiable
```python
from cookies import is_unverifiable
```



---
## has_header
```python
from cookies import has_header
```



---
## get_header
```python
from cookies import get_header
```



---
## add_header
```python
from cookies import add_header
```

cookiejar has no legitimate use for this method; add it back if you find one.

---
## add_unredirected_header
```python
from cookies import add_unredirected_header
```



---
## get_new_headers
```python
from cookies import get_new_headers
```



---
## unverifiable
```python
from cookies import unverifiable
```



---
## origin_req_host
```python
from cookies import origin_req_host
```



---
## host
```python
from cookies import host
```



---
## info
```python
from cookies import info
```



---
## getheaders
```python
from cookies import getheaders
```



---
## get
```python
from cookies import get
```

Dict-like get() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains.

.. warning:: operation is O(n), not O(1).

---
## set
```python
from cookies import set
```

Dict-like set() that also supports optional domain and path args in
order to resolve naming collisions from using one cookie jar over
multiple domains.

---
## iterkeys
```python
from cookies import iterkeys
```

Dict-like iterkeys() that returns an iterator of names of cookies
from the jar.

.. seealso:: itervalues() and iteritems().

---
## keys
```python
from cookies import keys
```

Dict-like keys() that returns a list of names of cookies from the
jar.

.. seealso:: values() and items().

---
## itervalues
```python
from cookies import itervalues
```

Dict-like itervalues() that returns an iterator of values of cookies
from the jar.

.. seealso:: iterkeys() and iteritems().

---
## values
```python
from cookies import values
```

Dict-like values() that returns a list of values of cookies from the
jar.

.. seealso:: keys() and items().

---
## iteritems
```python
from cookies import iteritems
```

Dict-like iteritems() that returns an iterator of name-value tuples
from the jar.

.. seealso:: iterkeys() and itervalues().

---
## items
```python
from cookies import items
```

Dict-like items() that returns a list of name-value tuples from the
jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a
vanilla python dict of key value pairs.

.. seealso:: keys() and values().

---
## list_domains
```python
from cookies import list_domains
```

Utility method to list all the domains in the jar.

---
## list_paths
```python
from cookies import list_paths
```

Utility method to list all the paths in the jar.

---
## multiple_domains
```python
from cookies import multiple_domains
```

Returns True if there are multiple domains in the jar.
Returns False otherwise.

:rtype: bool

---
## get_dict
```python
from cookies import get_dict
```

Takes as an argument an optional domain and path and returns a plain
old Python dict of name-value pairs of cookies that meet the
requirements.

:rtype: dict

---
## __contains__
```python
from cookies import __contains__
```



---
## __getitem__
```python
from cookies import __getitem__
```

Dict-like __getitem__() for compatibility with client code. Throws
exception if there are more than one cookie with name. In that case,
use the more explicit get() method instead.

.. warning:: operation is O(n), not O(1).

---
## __setitem__
```python
from cookies import __setitem__
```

Dict-like __setitem__ for compatibility with client code. Throws
exception if there is already a cookie of that name in the jar. In that
case, use the more explicit set() method instead.

---
## __delitem__
```python
from cookies import __delitem__
```

Deletes a cookie given a name. Wraps ``http.cookiejar.CookieJar``'s
``remove_cookie_by_name()``.

---
## set_cookie
```python
from cookies import set_cookie
```



---
## update
```python
from cookies import update
```

Updates this jar with cookies from another CookieJar or dict-like

---
## _find
```python
from cookies import _find
```

Requests uses this method internally to get cookie values.

If there are conflicting cookies, _find arbitrarily chooses one.
See _find_no_duplicates if you want an exception thrown if there are
conflicting cookies.

:param name: a string containing name of cookie
:param domain: (optional) string containing domain of cookie
:param path: (optional) string containing path of cookie
:return: cookie.value

---
## _find_no_duplicates
```python
from cookies import _find_no_duplicates
```

Both ``__get_item__`` and ``get`` call this function: it's never
used elsewhere in Requests.

:param name: a string containing name of cookie
:param domain: (optional) string containing domain of cookie
:param path: (optional) string containing path of cookie
:raises KeyError: if cookie is not found
:raises CookieConflictError: if there are multiple cookies
    that match name and optionally domain and path
:return: cookie.value

---
## __getstate__
```python
from cookies import __getstate__
```

Unlike a normal CookieJar, this class is pickleable.

---
## __setstate__
```python
from cookies import __setstate__
```

Unlike a normal CookieJar, this class is pickleable.

---
## copy
```python
from cookies import copy
```

Return a copy of this RequestsCookieJar.

---
## get_policy
```python
from cookies import get_policy
```

Return the CookiePolicy instance used.

---
## _basic_auth_str
```python
from auth import _basic_auth_str
```

Returns a Basic Auth string.

---
## AuthBase
```python
from auth import AuthBase
```

Base class that all auth implementations derive from

---
## HTTPBasicAuth
```python
from auth import HTTPBasicAuth
```

Attaches HTTP Basic Authentication to the given Request object.

---
## HTTPProxyAuth
```python
from auth import HTTPProxyAuth
```

Attaches HTTP Proxy Authentication to a given Request object.

---
## HTTPDigestAuth
```python
from auth import HTTPDigestAuth
```

Attaches HTTP Digest Authentication to the given Request object.

---
## __call__
```python
from auth import __call__
```



---
## __init__
```python
from auth import __init__
```



---
## __eq__
```python
from auth import __eq__
```



---
## __ne__
```python
from auth import __ne__
```



---
## init_per_thread_state
```python
from auth import init_per_thread_state
```



---
## build_digest_header
```python
from auth import build_digest_header
```

:rtype: str

---
## handle_redirect
```python
from auth import handle_redirect
```

Reset num_401_calls counter on redirects.

---
## handle_401
```python
from auth import handle_401
```

Takes the given response and tries digest-auth, if needed.

:rtype: requests.Response

---
## md5_utf8
```python
from auth import md5_utf8
```



---
## sha_utf8
```python
from auth import sha_utf8
```



---
## sha256_utf8
```python
from auth import sha256_utf8
```



---
## sha512_utf8
```python
from auth import sha512_utf8
```



---
## merge_setting
```python
from sessions import merge_setting
```

Determines appropriate setting for a given request, taking into account
the explicit setting on that request, and the setting in the session. If a
setting is a dictionary, they will be merged together using `dict_class`

---
## merge_hooks
```python
from sessions import merge_hooks
```

Properly merges both requests and session hooks.

This is necessary because when request_hooks == {'response': []}, the
merge breaks Session hooks entirely.

---
## SessionRedirectMixin
```python
from sessions import SessionRedirectMixin
```



---
## Session
```python
from sessions import Session
```

A Requests session.

Provides cookie persistence, connection-pooling, and configuration.

Basic Usage::

  >>> import requests
  >>> s = requests.Session()
  >>> s.get('https://httpbin.org/get')
  <Response [200]>

Or as a context manager::

  >>> with requests.Session() as s:
  ...     s.get('https://httpbin.org/get')
  <Response [200]>

---
## session
```python
from sessions import session
```

Returns a :class:`Session` for context-management.

.. deprecated:: 1.0.0

    This method has been deprecated since version 1.0.0 and is only kept for
    backwards compatibility. New code should use :class:`~requests.sessions.Session`
    to create a session. This may be removed at a future date.

:rtype: Session

---
## get_redirect_target
```python
from sessions import get_redirect_target
```

Receives a Response. Returns a redirect URI or ``None``

---
## should_strip_auth
```python
from sessions import should_strip_auth
```

Decide whether Authorization header should be removed when redirecting

---
## resolve_redirects
```python
from sessions import resolve_redirects
```

Receives a Response. Returns a generator of Responses or Requests.

---
## rebuild_auth
```python
from sessions import rebuild_auth
```

When being redirected we may want to strip authentication from the
request to avoid leaking credentials. This method intelligently removes
and reapplies authentication where possible to avoid credential loss.

---
## rebuild_proxies
```python
from sessions import rebuild_proxies
```

This method re-evaluates the proxy configuration by considering the
environment variables. If we are redirected to a URL covered by
NO_PROXY, we strip the proxy configuration. Otherwise, we set missing
proxy keys for this URL (in case they were stripped by a previous
redirect).

This method also replaces the Proxy-Authorization header where
necessary.

:rtype: dict

---
## rebuild_method
```python
from sessions import rebuild_method
```

When being redirected we may want to change the method of the request
based on certain specs or browser behavior.

---
## __enter__
```python
from sessions import __enter__
```



---
## __exit__
```python
from sessions import __exit__
```



---
## get
```python
from sessions import get
```

Sends a GET request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## options
```python
from sessions import options
```

Sends a OPTIONS request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## head
```python
from sessions import head
```

Sends a HEAD request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## post
```python
from sessions import post
```

Sends a POST request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) json to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## put
```python
from sessions import put
```

Sends a PUT request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## patch
```python
from sessions import patch
```

Sends a PATCH request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## delete
```python
from sessions import delete
```

Sends a DELETE request. Returns :class:`Response` object.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:rtype: requests.Response

---
## send
```python
from sessions import send
```

Send a given PreparedRequest.

:rtype: requests.Response

---
## merge_environment_settings
```python
from sessions import merge_environment_settings
```

Check the environment and merge it with some settings.

:rtype: dict

---
## get_adapter
```python
from sessions import get_adapter
```

Returns the appropriate connection adapter for the given URL.

:rtype: requests.adapters.BaseAdapter

---
## close
```python
from sessions import close
```

Closes all adapters and as such the session

---
## mount
```python
from sessions import mount
```

Registers a connection adapter to a prefix.

Adapters are sorted in descending order by prefix length.

---
## __getstate__
```python
from sessions import __getstate__
```



---
## __setstate__
```python
from sessions import __setstate__
```



---
## __name__
```python
from hooks import __name__
```

requests.hooks
~~~~~~~~~~~~~~

This module provides the capabilities for the Requests hooks system.

Available hooks:

``response``:
    The response generated from a Request.

---
## default_hooks
```python
from hooks import default_hooks
```



---
## dispatch_hook
```python
from hooks import dispatch_hook
```

Dispatches a hook dictionary on a given piece of data.

---
## _resolve_char_detection
```python
from compat import _resolve_char_detection
```

Find supported character detection libraries.

---
## RequestEncodingMixin
```python
from models import RequestEncodingMixin
```



---
## RequestHooksMixin
```python
from models import RequestHooksMixin
```



---
## Request
```python
from models import Request
```

A user-created :class:`Request <Request>` object.

Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

:param method: HTTP method to use.
:param url: URL to send.
:param headers: dictionary of headers to send.
:param files: dictionary of {filename: fileobject} files to multipart upload.
:param data: the body to attach to the request. If a dictionary or
    list of tuples ``[(key, value)]`` is provided, form-encoding will
    take place.
:param json: json for the body to attach to the request (if files or data is not specified).
:param params: URL parameters to append to the URL. If a dictionary or
    list of tuples ``[(key, value)]`` is provided, form-encoding will
    take place.
:param auth: Auth handler or (user, pass) tuple.
:param cookies: dictionary or CookieJar of cookies to attach to this request.
:param hooks: dictionary of callback hooks, for internal usage.

Usage::

  >>> import requests
  >>> req = requests.Request('GET', 'https://httpbin.org/get')
  >>> req.prepare()
  <PreparedRequest [GET]>

---
## PreparedRequest
```python
from models import PreparedRequest
```

The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
containing the exact bytes that will be sent to the server.

Instances are generated from a :class:`Request <Request>` object, and
should not be instantiated manually; doing so may produce undesirable
effects.

Usage::

  >>> import requests
  >>> req = requests.Request('GET', 'https://httpbin.org/get')
  >>> r = req.prepare()
  >>> r
  <PreparedRequest [GET]>

  >>> s = requests.Session()
  >>> s.send(r)
  <Response [200]>

---
## Response
```python
from models import Response
```



---
## path_url
```python
from models import path_url
```

Build the path URL to use.

---
## _encode_params
```python
from models import _encode_params
```

Encode parameters in a piece of data.

Will successfully encode parameters when passed as a dict or a list of
2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
if parameters are supplied as a dict.

---
## _encode_files
```python
from models import _encode_files
```

Build the body for a multipart/form-data request.

Will successfully encode files when passed as a dict or a list of
tuples. Order is retained if data is a list of tuples but arbitrary
if parameters are supplied as a dict.
The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
or 4-tuples (filename, fileobj, contentype, custom_headers).

---
## register_hook
```python
from models import register_hook
```

Properly register a hook.

---
## deregister_hook
```python
from models import deregister_hook
```

Deregister a previously registered hook.
Returns True if the hook existed, False if not.

---
## prepare
```python
from models import prepare
```

Prepares the entire request with the given parameters.

---
## copy
```python
from models import copy
```



---
## prepare_method
```python
from models import prepare_method
```

Prepares the given HTTP method.

---
## _get_idna_encoded_host
```python
from models import _get_idna_encoded_host
```



---
## prepare_url
```python
from models import prepare_url
```

Prepares the given HTTP URL.

---
## prepare_headers
```python
from models import prepare_headers
```

Prepares the given HTTP headers.

---
## prepare_body
```python
from models import prepare_body
```

Prepares the given HTTP body data.

---
## prepare_content_length
```python
from models import prepare_content_length
```

Prepare Content-Length header based on request method and body

---
## prepare_auth
```python
from models import prepare_auth
```

Prepares the given HTTP auth data.

---
## prepare_cookies
```python
from models import prepare_cookies
```

Prepares the given HTTP cookie data.

This function eventually generates a ``Cookie`` header from the
given cookies using cookielib. Due to cookielib's design, the header
will not be regenerated if it already exists, meaning this function
can only be called once for the life of the
:class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
header is removed beforehand.

---
## prepare_hooks
```python
from models import prepare_hooks
```

Prepares the given hooks.

---
## __enter__
```python
from models import __enter__
```



---
## __exit__
```python
from models import __exit__
```



---
## __getstate__
```python
from models import __getstate__
```



---
## __setstate__
```python
from models import __setstate__
```



---
## __nonzero__
```python
from models import __nonzero__
```

Returns True if :attr:`status_code` is less than 400.

This attribute checks if the status code of the response is between
400 and 600 to see if there was a client error or a server error. If
the status code, is between 200 and 400, this will return True. This
is **not** a check to see if the response code is ``200 OK``.

---
## ok
```python
from models import ok
```

Returns True if :attr:`status_code` is less than 400, False if not.

This attribute checks if the status code of the response is between
400 and 600 to see if there was a client error or a server error. If
the status code is between 200 and 400, this will return True. This
is **not** a check to see if the response code is ``200 OK``.

---
## is_redirect
```python
from models import is_redirect
```

True if this Response is a well-formed HTTP redirect that could have
been processed automatically (by :meth:`Session.resolve_redirects`).

---
## is_permanent_redirect
```python
from models import is_permanent_redirect
```

True if this Response one of the permanent versions of redirect.

---
## next
```python
from models import next
```

Returns a PreparedRequest for the next request in a redirect chain, if there is one.

---
## apparent_encoding
```python
from models import apparent_encoding
```

The apparent encoding, provided by the charset_normalizer or chardet libraries.

---
## iter_content
```python
from models import iter_content
```

Iterates over the response data.  When stream=True is set on the
request, this avoids reading the content at once into memory for
large responses.  The chunk size is the number of bytes it should
read into memory.  This is not necessarily the length of each item
returned as decoding can take place.

chunk_size must be of type int or None. A value of None will
function differently depending on the value of `stream`.
stream=True will read data as it arrives in whatever size the
chunks are received. If stream=False, data is returned as
a single chunk.

If decode_unicode is True, content will be decoded using the best
available encoding based on the response.

---
## iter_lines
```python
from models import iter_lines
```

Iterates over the response data, one line at a time.  When
stream=True is set on the request, this avoids reading the
content at once into memory for large responses.

.. note:: This method is not reentrant safe.

---
## content
```python
from models import content
```

Content of the response, in bytes.

---
## text
```python
from models import text
```

Content of the response, in unicode.

If Response.encoding is None, encoding will be guessed using
``charset_normalizer`` or ``chardet``.

The encoding of the response content is determined based solely on HTTP
headers, following RFC 2616 to the letter. If you can take advantage of
non-HTTP knowledge to make a better guess at the encoding, you should
set ``r.encoding`` appropriately before accessing this property.

---
## json
```python
from models import json
```

Returns the json-encoded content of a response, if any.

:param \*\*kwargs: Optional arguments that ``json.loads`` takes.
:raises requests.exceptions.JSONDecodeError: If the response body does not
    contain valid json.

---
## links
```python
from models import links
```

Returns the parsed header links of the response, if any.

---
## raise_for_status
```python
from models import raise_for_status
```

Raises :class:`HTTPError`, if one occurred.

---
## close
```python
from models import close
```

Releases the connection back to the pool. Once this method has been
called the underlying ``raw`` object must not be accessed again.

*Note: Should not normally need to be called explicitly.*

---
## generate
```python
from models import generate
```



---
## __name__
```python
from certs import __name__
```

requests.certs
~~~~~~~~~~~~~~

This module returns the preferred default CA certificate bundle. There is
only one — the one from the certifi package.

If you are packaging Requests, e.g., for a Linux distribution or a managed
environment, you can change the definition of where() to return a separately
packaged CA bundle.

---
## check_compatibility
```python
from __init__ import check_compatibility
```



---
## _check_cryptography
```python
from __init__ import _check_cryptography
```



---
## __name__
```python
from status_codes import __name__
```

The ``codes`` object defines a mapping from common names for HTTP statuses
to their numerical codes, accessible either as attributes or as dictionary
items.

Example::

    >>> import requests
    >>> requests.codes['temporary_redirect']
    307
    >>> requests.codes.teapot
    418
    >>> requests.codes['\o/']
    200

Some codes have multiple names, and both upper- and lower-case versions of
the names are allowed. For example, ``codes.ok``, ``codes.OK``, and
``codes.okay`` all correspond to the HTTP status code 200.

---
## _init
```python
from status_codes import _init
```



---
## doc
```python
from status_codes import doc
```



---
## __name__
```python
from packages import __name__
```



---
## __name__
```python
from __version__ import __name__
```



---
## request
```python
from api import request
```

Constructs and sends a :class:`Request <Request>`.

:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary, list of tuples or bytes to send
    in the query string for the :class:`Request`.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
    ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
    or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
    defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
    to add for the file.
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) How many seconds to wait for the server to send data
    before giving up, as a float, or a :ref:`(connect timeout, read
    timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
:type allow_redirects: bool
:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
:param verify: (optional) Either a boolean, in which case it controls whether we verify
        the server's TLS certificate, or a string, in which case it must be a path
        to a CA bundle to use. Defaults to ``True``.
:param stream: (optional) if ``False``, the response content will be immediately downloaded.
:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
:return: :class:`Response <Response>` object
:rtype: requests.Response

Usage::

  >>> import requests
  >>> req = requests.request('GET', 'https://httpbin.org/get')
  >>> req
  <Response [200]>

---
## get
```python
from api import get
```

Sends a GET request.

:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary, list of tuples or bytes to send
    in the query string for the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## options
```python
from api import options
```

Sends an OPTIONS request.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## head
```python
from api import head
```

Sends a HEAD request.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes. If
    `allow_redirects` is not provided, it will be set to `False` (as
    opposed to the default :meth:`request` behavior).
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## post
```python
from api import post
```

Sends a POST request.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## put
```python
from api import put
```

Sends a PUT request.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## patch
```python
from api import patch
```

Sends a PATCH request.

:param url: URL for the new :class:`Request` object.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
    object to send in the body of the :class:`Request`.
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## delete
```python
from api import delete
```

Sends a DELETE request.

:param url: URL for the new :class:`Request` object.
:param \*\*kwargs: Optional arguments that ``request`` takes.
:return: :class:`Response <Response>` object
:rtype: requests.Response

---
## __name__
```python
from _internal_utils import __name__
```

requests._internal_utils
~~~~~~~~~~~~~~

Provides utility functions that are consumed internally by Requests
which depend on extremely few external helpers (such as compat)

---
## to_native_string
```python
from _internal_utils import to_native_string
```

Given a string object, regardless of type, returns a representation of
that string in the native string type, encoding and decoding where
necessary. This assumes ASCII unless told otherwise.

---
## unicode_is_ascii
```python
from _internal_utils import unicode_is_ascii
```

Determine if unicode string only contains ASCII characters.

:param str u_string: unicode string to check. Must be unicode
    and not Python 2 `str`.
:rtype: bool

---
## dict_to_sequence
```python
from utils import dict_to_sequence
```

Returns an internal sequence dictionary update.

---
## super_len
```python
from utils import super_len
```



---
## get_netrc_auth
```python
from utils import get_netrc_auth
```

Returns the Requests tuple auth for a given url from netrc.

---
## guess_filename
```python
from utils import guess_filename
```

Tries to guess the filename of the given object.

---
## extract_zipped_paths
```python
from utils import extract_zipped_paths
```

Replace nonexistent paths that look like they refer to a member of a zip
archive with the location of an extracted copy of the target, or else
just return the provided path unchanged.

---
## atomic_open
```python
from utils import atomic_open
```

Write a file to the disk in an atomic fashion

---
## from_key_val_list
```python
from utils import from_key_val_list
```

Take an object and test to see if it can be represented as a
dictionary. Unless it can not be represented as such, return an
OrderedDict, e.g.,

::

    >>> from_key_val_list([('key', 'val')])
    OrderedDict([('key', 'val')])
    >>> from_key_val_list('string')
    Traceback (most recent call last):
    ...
    ValueError: cannot encode objects that are not 2-tuples
    >>> from_key_val_list({'key': 'val'})
    OrderedDict([('key', 'val')])

:rtype: OrderedDict

---
## to_key_val_list
```python
from utils import to_key_val_list
```

Take an object and test to see if it can be represented as a
dictionary. If it can be, return a list of tuples, e.g.,

::

    >>> to_key_val_list([('key', 'val')])
    [('key', 'val')]
    >>> to_key_val_list({'key': 'val'})
    [('key', 'val')]
    >>> to_key_val_list('string')
    Traceback (most recent call last):
    ...
    ValueError: cannot encode objects that are not 2-tuples

:rtype: list

---
## parse_list_header
```python
from utils import parse_list_header
```

Parse lists as described by RFC 2068 Section 2.

In particular, parse comma-separated lists where the elements of
the list may include quoted-strings.  A quoted-string could
contain a comma.  A non-quoted string could have quotes in the
middle.  Quotes are removed automatically after parsing.

It basically works like :func:`parse_set_header` just that items
may appear multiple times and case sensitivity is preserved.

The return value is a standard :class:`list`:

>>> parse_list_header('token, "quoted value"')
['token', 'quoted value']

To create a header from the :class:`list` again, use the
:func:`dump_header` function.

:param value: a string with a list header.
:return: :class:`list`
:rtype: list

---
## parse_dict_header
```python
from utils import parse_dict_header
```

Parse lists of key, value pairs as described by RFC 2068 Section 2 and
convert them into a python dict:

>>> d = parse_dict_header('foo="is a fish", bar="as well"')
>>> type(d) is dict
True
>>> sorted(d.items())
[('bar', 'as well'), ('foo', 'is a fish')]

If there is no value for a key it will be `None`:

>>> parse_dict_header('key_without_value')
{'key_without_value': None}

To create a header from the :class:`dict` again, use the
:func:`dump_header` function.

:param value: a string with a dict header.
:return: :class:`dict`
:rtype: dict

---
## unquote_header_value
```python
from utils import unquote_header_value
```

Unquotes a header value.  (Reversal of :func:`quote_header_value`).
This does not use the real unquoting but what browsers are actually
using for quoting.

:param value: the header value to unquote.
:rtype: str

---
## dict_from_cookiejar
```python
from utils import dict_from_cookiejar
```

Returns a key/value dictionary from a CookieJar.

:param cj: CookieJar object to extract cookies from.
:rtype: dict

---
## add_dict_to_cookiejar
```python
from utils import add_dict_to_cookiejar
```

Returns a CookieJar from a key/value dictionary.

:param cj: CookieJar to insert cookies into.
:param cookie_dict: Dict of key/values to insert into CookieJar.
:rtype: CookieJar

---
## get_encodings_from_content
```python
from utils import get_encodings_from_content
```

Returns encodings from given content string.

:param content: bytestring to extract encodings from.

---
## _parse_content_type_header
```python
from utils import _parse_content_type_header
```

Returns content type and parameters from given header

:param header: string
:return: tuple containing content type and dictionary of
     parameters

---
## get_encoding_from_headers
```python
from utils import get_encoding_from_headers
```

Returns encodings from given HTTP Header Dict.

:param headers: dictionary to extract encoding from.
:rtype: str

---
## stream_decode_response_unicode
```python
from utils import stream_decode_response_unicode
```

Stream decodes an iterator.

---
## iter_slices
```python
from utils import iter_slices
```

Iterate over slices of a string.

---
## get_unicode_from_response
```python
from utils import get_unicode_from_response
```

Returns the requested content back in unicode.

:param r: Response object to get unicode content from.

Tried:

1. charset from content-type
2. fall back and replace all unicode characters

:rtype: str

---
## unquote_unreserved
```python
from utils import unquote_unreserved
```

Un-escape any percent-escape sequences in a URI that are unreserved
characters. This leaves all reserved, illegal and non-ASCII bytes encoded.

:rtype: str

---
## requote_uri
```python
from utils import requote_uri
```

Re-quote the given URI.

This function passes the given URI through an unquote/quote cycle to
ensure that it is fully and consistently quoted.

:rtype: str

---
## address_in_network
```python
from utils import address_in_network
```

This function allows you to check if an IP belongs to a network subnet

Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
         returns False if ip = 192.168.1.1 and net = 192.168.100.0/24

:rtype: bool

---
## dotted_netmask
```python
from utils import dotted_netmask
```

Converts mask from /xx format to xxx.xxx.xxx.xxx

Example: if mask is 24 function returns 255.255.255.0

:rtype: str

---
## is_ipv4_address
```python
from utils import is_ipv4_address
```

:rtype: bool

---
## is_valid_cidr
```python
from utils import is_valid_cidr
```

Very simple check of the cidr format in no_proxy variable.

:rtype: bool

---
## set_environ
```python
from utils import set_environ
```

Set the environment variable 'env_name' to 'value'

Save previous value, yield, and then restore the previous value stored in
the environment variable 'env_name'.

If 'value' is None, do nothing

---
## should_bypass_proxies
```python
from utils import should_bypass_proxies
```

Returns whether we should bypass proxies or not.

:rtype: bool

---
## get_environ_proxies
```python
from utils import get_environ_proxies
```

Return a dict of environment proxies.

:rtype: dict

---
## select_proxy
```python
from utils import select_proxy
```

Select a proxy for the url, if applicable.

:param url: The url being for the request
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs

---
## resolve_proxies
```python
from utils import resolve_proxies
```

This method takes proxy information from a request and configuration
input to resolve a mapping of target proxies. This will consider settings
such as NO_PROXY to strip proxy configurations.

:param request: Request or PreparedRequest
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs
:param trust_env: Boolean declaring whether to trust environment configs

:rtype: dict

---
## default_user_agent
```python
from utils import default_user_agent
```

Return a string representing the default user agent.

:rtype: str

---
## default_headers
```python
from utils import default_headers
```

:rtype: requests.structures.CaseInsensitiveDict

---
## parse_header_links
```python
from utils import parse_header_links
```

Return a list of parsed link headers proxies.

i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"

:rtype: list

---
## guess_json_utf
```python
from utils import guess_json_utf
```

:rtype: str

---
## prepend_scheme_if_needed
```python
from utils import prepend_scheme_if_needed
```

Given a URL that may or may not have a scheme, prepend the given scheme.
Does not replace a present scheme with the one provided as an argument.

:rtype: str

---
## get_auth_from_url
```python
from utils import get_auth_from_url
```

Given a url with authentication components, extract them into a tuple of
username,password.

:rtype: (str,str)

---
## check_header_validity
```python
from utils import check_header_validity
```

Verifies that header parts don't contain leading whitespace
reserved characters, or return characters.

:param header: tuple, in the format (name, value).

---
## _validate_header_part
```python
from utils import _validate_header_part
```



---
## urldefragauth
```python
from utils import urldefragauth
```

Given a url remove the fragment and the authentication part.

:rtype: str

---
## rewind_body
```python
from utils import rewind_body
```

Move file pointer back to its recorded starting position
so it can be read again on redirect.

---
## proxy_bypass_registry
```python
from utils import proxy_bypass_registry
```



---
## proxy_bypass
```python
from utils import proxy_bypass
```

Return True, if the host should be bypassed.

Checks proxy settings gathered from the environment, if specified,
or the registry.

---
## get_proxy
```python
from utils import get_proxy
```



---
## RequestException
```python
from exceptions import RequestException
```

There was an ambiguous exception that occurred while handling your
request.

---
## InvalidJSONError
```python
from exceptions import InvalidJSONError
```

A JSON error occurred.

---
## JSONDecodeError
```python
from exceptions import JSONDecodeError
```

Couldn't decode the text into json

---
## HTTPError
```python
from exceptions import HTTPError
```

Base exception used by this module.

---
## ConnectionError
```python
from exceptions import ConnectionError
```

A Connection error occurred.

---
## ProxyError
```python
from exceptions import ProxyError
```

Raised when the connection to a proxy fails.

---
## SSLError
```python
from exceptions import SSLError
```

Raised when SSL certificate fails in an HTTPS connection.

---
## Timeout
```python
from exceptions import Timeout
```

The request timed out.

Catching this error will catch both
:exc:`~requests.exceptions.ConnectTimeout` and
:exc:`~requests.exceptions.ReadTimeout` errors.

---
## ConnectTimeout
```python
from exceptions import ConnectTimeout
```

The request timed out while trying to connect to the remote server.

Requests that produced this error are safe to retry.

---
## ReadTimeout
```python
from exceptions import ReadTimeout
```

The server did not send any data in the allotted amount of time.

---
## URLRequired
```python
from exceptions import URLRequired
```

A valid URL is required to make a request.

---
## TooManyRedirects
```python
from exceptions import TooManyRedirects
```

Too many redirects.

---
## MissingSchema
```python
from exceptions import MissingSchema
```

The URL scheme (e.g. http or https) is missing.

---
## InvalidSchema
```python
from exceptions import InvalidSchema
```

The URL scheme provided is either invalid or unsupported.

---
## InvalidURL
```python
from exceptions import InvalidURL
```

The URL provided was somehow invalid.

---
## InvalidProxyURL
```python
from exceptions import InvalidProxyURL
```

The proxy URL provided is invalid.

---
## ChunkedEncodingError
```python
from exceptions import ChunkedEncodingError
```

The server declared chunked encoding but sent an invalid chunk.

---
## ContentDecodingError
```python
from exceptions import ContentDecodingError
```

Failed to decode response content.

---
## StreamConsumedError
```python
from exceptions import StreamConsumedError
```

The content for this response was already consumed.

---
## RetryError
```python
from exceptions import RetryError
```

Custom retries logic failed

---
## UnrewindableBodyError
```python
from exceptions import UnrewindableBodyError
```

urllib3 encountered an error when trying to rewind a body

---
## RequestsWarning
```python
from exceptions import RequestsWarning
```

Base warning for Requests.

---
## FileModeWarning
```python
from exceptions import FileModeWarning
```

A file was opened in text mode, but Requests determined its binary length.

---
## RequestsDependencyWarning
```python
from exceptions import RequestsDependencyWarning
```

An imported dependency doesn't match the expected version range.

---
## __name__
```python
from structures import __name__
```



---
## CaseInsensitiveDict
```python
from structures import CaseInsensitiveDict
```

A case-insensitive ``dict``-like object.

Implements all methods and operations of
``MutableMapping`` as well as dict's ``copy``. Also
provides ``lower_items``.

All keys are expected to be strings. The structure remembers the
case of the last key to be set, and ``iter(instance)``,
``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()``
will contain case-sensitive keys. However, querying and contains
testing is case insensitive::

    cid = CaseInsensitiveDict()
    cid['Accept'] = 'application/json'
    cid['aCCEPT'] == 'application/json'  # True
    list(cid) == ['Accept']  # True

For example, ``headers['content-encoding']`` will return the
value of a ``'Content-Encoding'`` response header, regardless
of how the header name was originally stored.

If the constructor, ``.update``, or equality comparison
operations are given keys that have equal ``.lower()``s, the
behavior is undefined.

---
## LookupDict
```python
from structures import LookupDict
```

Dictionary lookup object.

---
## __init__
```python
from structures import __init__
```



---
## __setitem__
```python
from structures import __setitem__
```



---
## __getitem__
```python
from structures import __getitem__
```



---
## __delitem__
```python
from structures import __delitem__
```



---
## __iter__
```python
from structures import __iter__
```



---
## __len__
```python
from structures import __len__
```



---
## lower_items
```python
from structures import lower_items
```

Like iteritems(), but with all lowercase keys.

---
## __eq__
```python
from structures import __eq__
```



---
## copy
```python
from structures import copy
```



---
## __repr__
```python
from structures import __repr__
```



---
## get
```python
from structures import get
```



---
## _implementation
```python
from help import _implementation
```

Return a dict with the Python implementation and version.

Provide both the name and the version of the Python implementation
currently running. For example, on CPython 3.10.3 it will return
{'name': 'CPython', 'version': '3.10.3'}.

This function works best on CPython and PyPy: in particular, it probably
doesn't work for Jython or IronPython. Future investigation should be done
to work out the correct shape of the code for those platforms.

---
## info
```python
from help import info
```

Generate information for a bug report.

---
## __name__
```python
from adapters import __name__
```



---
## _urllib3_request_context
```python
from adapters import _urllib3_request_context
```



---
## BaseAdapter
```python
from adapters import BaseAdapter
```

The Base Transport Adapter

---
## HTTPAdapter
```python
from adapters import HTTPAdapter
```

The built-in HTTP Adapter for urllib3.

Provides a general-case interface for Requests sessions to contact HTTP and
HTTPS urls by implementing the Transport Adapter interface. This class will
usually be created by the :class:`Session <Session>` class under the
covers.

:param pool_connections: The number of urllib3 connection pools to cache.
:param pool_maxsize: The maximum number of connections to save in the pool.
:param max_retries: The maximum number of retries each connection
    should attempt. Note, this applies only to failed DNS lookups, socket
    connections and connection timeouts, never to requests where data has
    made it to the server. By default, Requests does not retry failed
    connections. If you need granular control over the conditions under
    which we retry a request, import urllib3's ``Retry`` class and pass
    that instead.
:param pool_block: Whether the connection pool should block for connections.

Usage::

  >>> import requests
  >>> s = requests.Session()
  >>> a = requests.adapters.HTTPAdapter(max_retries=3)
  >>> s.mount('http://', a)

---
## __init__
```python
from adapters import __init__
```



---
## send
```python
from adapters import send
```

Sends PreparedRequest object. Returns Response object.

:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param stream: (optional) Whether to stream the request content.
:param timeout: (optional) How long to wait for the server to send
    data before giving up, as a float, or a :ref:`(connect timeout,
    read timeout) <timeouts>` tuple.
:type timeout: float or tuple or urllib3 Timeout object
:param verify: (optional) Either a boolean, in which case it controls whether
    we verify the server's TLS certificate, or a string, in which case it
    must be a path to a CA bundle to use
:param cert: (optional) Any user-provided SSL certificate to be trusted.
:param proxies: (optional) The proxies dictionary to apply to the request.
:rtype: requests.Response

---
## close
```python
from adapters import close
```

Disposes of any internal state.

Currently, this closes the PoolManager and any active ProxyManager,
which closes any pooled connections.

---
## __getstate__
```python
from adapters import __getstate__
```



---
## __setstate__
```python
from adapters import __setstate__
```



---
## init_poolmanager
```python
from adapters import init_poolmanager
```

Initializes a urllib3 PoolManager.

This method should not be called from user code, and is only
exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param connections: The number of urllib3 connection pools to cache.
:param maxsize: The maximum number of connections to save in the pool.
:param block: Block when no free connections are available.
:param pool_kwargs: Extra keyword arguments used to initialize the Pool Manager.

---
## proxy_manager_for
```python
from adapters import proxy_manager_for
```

Return urllib3 ProxyManager for the given proxy.

This method should not be called from user code, and is only
exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param proxy: The proxy to return a urllib3 ProxyManager for.
:param proxy_kwargs: Extra keyword arguments used to configure the Proxy Manager.
:returns: ProxyManager
:rtype: urllib3.ProxyManager

---
## cert_verify
```python
from adapters import cert_verify
```

Verify a SSL certificate. This method should not be called from user
code, and is only exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param conn: The urllib3 connection object associated with the cert.
:param url: The requested URL.
:param verify: Either a boolean, in which case it controls whether we verify
    the server's TLS certificate, or a string, in which case it must be a path
    to a CA bundle to use
:param cert: The SSL certificate to verify.

---
## build_response
```python
from adapters import build_response
```

Builds a :class:`Response <requests.Response>` object from a urllib3
response. This should not be called from user code, and is only exposed
for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`

:param req: The :class:`PreparedRequest <PreparedRequest>` used to generate the response.
:param resp: The urllib3 response object.
:rtype: requests.Response

---
## build_connection_pool_key_attributes
```python
from adapters import build_connection_pool_key_attributes
```

Build the PoolKey attributes used by urllib3 to return a connection.

This looks at the PreparedRequest, the user-specified verify value,
and the value of the cert parameter to determine what PoolKey values
to use to select a connection from a given urllib3 Connection Pool.

The SSL related pool key arguments are not consistently set. As of
this writing, use the following to determine what keys may be in that
dictionary:

* If ``verify`` is ``True``, ``"ssl_context"`` will be set and will be the
  default Requests SSL Context
* If ``verify`` is ``False``, ``"ssl_context"`` will not be set but
  ``"cert_reqs"`` will be set
* If ``verify`` is a string, (i.e., it is a user-specified trust bundle)
  ``"ca_certs"`` will be set if the string is not a directory recognized
  by :py:func:`os.path.isdir`, otherwise ``"ca_certs_dir"`` will be
  set.
* If ``"cert"`` is specified, ``"cert_file"`` will always be set. If
  ``"cert"`` is a tuple with a second item, ``"key_file"`` will also
  be present

To override these settings, one may subclass this class, call this
method and use the above logic to change parameters as desired. For
example, if one wishes to use a custom :py:class:`ssl.SSLContext` one
must both set ``"ssl_context"`` and based on what else they require,
alter the other keys to ensure the desired behaviour.

:param request:
    The PreparedReqest being sent over the connection.
:type request:
    :class:`~requests.models.PreparedRequest`
:param verify:
    Either a boolean, in which case it controls whether
    we verify the server's TLS certificate, or a string, in which case it
    must be a path to a CA bundle to use.
:param cert:
    (optional) Any user-provided SSL certificate for client
    authentication (a.k.a., mTLS). This may be a string (i.e., just
    the path to a file which holds both certificate and key) or a
    tuple of length 2 with the certificate file path and key file
    path.
:returns:
    A tuple of two dictionaries. The first is the "host parameters"
    portion of the Pool Key including scheme, hostname, and port. The
    second is a dictionary of SSLContext related parameters.

---
## get_connection_with_tls_context
```python
from adapters import get_connection_with_tls_context
```

Returns a urllib3 connection for the given request and TLS settings.
This should not be called from user code, and is only exposed for use
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param request:
    The :class:`PreparedRequest <PreparedRequest>` object to be sent
    over the connection.
:param verify:
    Either a boolean, in which case it controls whether we verify the
    server's TLS certificate, or a string, in which case it must be a
    path to a CA bundle to use.
:param proxies:
    (optional) The proxies dictionary to apply to the request.
:param cert:
    (optional) Any user-provided SSL certificate to be used for client
    authentication (a.k.a., mTLS).
:rtype:
    urllib3.ConnectionPool

---
## get_connection
```python
from adapters import get_connection
```

DEPRECATED: Users should move to `get_connection_with_tls_context`
for all subclasses of HTTPAdapter using Requests>=2.32.2.

Returns a urllib3 connection for the given URL. This should not be
called from user code, and is only exposed for use when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param url: The URL to connect to.
:param proxies: (optional) A Requests-style dictionary of proxies used on this request.
:rtype: urllib3.ConnectionPool

---
## request_url
```python
from adapters import request_url
```

Obtain the url to use when making the final request.

If the message is being sent through a HTTP proxy, the full URL has to
be used. Otherwise, we should only use the path portion of the URL.

This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
:rtype: str

---
## add_headers
```python
from adapters import add_headers
```

Add any headers needed by the connection. As of v2.0 this does
nothing by default, but is left for overriding by users that subclass
the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param request: The :class:`PreparedRequest <PreparedRequest>` to add headers to.
:param kwargs: The keyword arguments from the call to send().

---
## proxy_headers
```python
from adapters import proxy_headers
```

Returns a dictionary of the headers to add to any request sent
through a proxy. This works with urllib3 magic to ensure that they are
correctly sent to the proxy, rather than in a tunnelled request if
CONNECT is being used.

This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

:param proxy: The url of the proxy being used for this request.
:rtype: dict

---
## SOCKSProxyManager
```python
from adapters import SOCKSProxyManager
```



---
## __name__
```python
from _multidict_py import __name__
```



---
## istr
```python
from _multidict_py import istr
```

Case insensitive str.

---
## getversion
```python
from _multidict_py import getversion
```



---
## _Impl
```python
from _multidict_py import _Impl
```



---
## _Base
```python
from _multidict_py import _Base
```



---
## MultiDictProxy
```python
from _multidict_py import MultiDictProxy
```

Read-only proxy for MultiDict instance.

---
## CIMultiDictProxy
```python
from _multidict_py import CIMultiDictProxy
```

Read-only proxy for CIMultiDict instance.

---
## MultiDict
```python
from _multidict_py import MultiDict
```

Dictionary with the support for duplicate keys.

---
## CIMultiDict
```python
from _multidict_py import CIMultiDict
```

Dictionary with the support for duplicate case-insensitive keys.

---
## _Iter
```python
from _multidict_py import _Iter
```



---
## _ViewBase
```python
from _multidict_py import _ViewBase
```



---
## _ItemsView
```python
from _multidict_py import _ItemsView
```



---
## _ValuesView
```python
from _multidict_py import _ValuesView
```



---
## _KeysView
```python
from _multidict_py import _KeysView
```



---
## GenericAlias
```python
from _multidict_py import GenericAlias
```



---
## __init__
```python
from _multidict_py import __init__
```



---
## incr_version
```python
from _multidict_py import incr_version
```



---
## _title
```python
from _multidict_py import _title
```



---
## getall
```python
from _multidict_py import getall
```

Return a list of all values matching the key.

---
## getone
```python
from _multidict_py import getone
```

Get first value matching the key.

Raises KeyError if the key is not found and no default is provided.

---
## __getitem__
```python
from _multidict_py import __getitem__
```



---
## get
```python
from _multidict_py import get
```

Get first value matching the key.

If the key is not found, returns the default (or None if no default is provided)

---
## __iter__
```python
from _multidict_py import __iter__
```



---
## __len__
```python
from _multidict_py import __len__
```



---
## keys
```python
from _multidict_py import keys
```

Return a new view of the dictionary's keys.

---
## items
```python
from _multidict_py import items
```

Return a new view of the dictionary's items *(key, value) pairs).

---
## values
```python
from _multidict_py import values
```

Return a new view of the dictionary's values.

---
## __eq__
```python
from _multidict_py import __eq__
```



---
## __contains__
```python
from _multidict_py import __contains__
```



---
## __repr__
```python
from _multidict_py import __repr__
```



---
## __reduce__
```python
from _multidict_py import __reduce__
```



---
## copy
```python
from _multidict_py import copy
```

Return a copy of itself.

---
## _key
```python
from _multidict_py import _key
```



---
## add
```python
from _multidict_py import add
```



---
## extend
```python
from _multidict_py import extend
```

Extend current MultiDict with more values.

This method must be used instead of update.

---
## _extend
```python
from _multidict_py import _extend
```



---
## _extend_items
```python
from _multidict_py import _extend_items
```



---
## clear
```python
from _multidict_py import clear
```

Remove all items from MultiDict.

---
## __setitem__
```python
from _multidict_py import __setitem__
```



---
## __delitem__
```python
from _multidict_py import __delitem__
```



---
## setdefault
```python
from _multidict_py import setdefault
```

Return value for key, set value to default if key is not present.

---
## popone
```python
from _multidict_py import popone
```

Remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise
KeyError is raised.

---
## popall
```python
from _multidict_py import popall
```

Remove all occurrences of key and return the list of corresponding
values.

If key is not found, default is returned if given, otherwise
KeyError is raised.

---
## popitem
```python
from _multidict_py import popitem
```

Remove and return an arbitrary (key, value) pair.

---
## update
```python
from _multidict_py import update
```

Update the dictionary from *other*, overwriting existing keys.

---
## _update_items
```python
from _multidict_py import _update_items
```



---
## _replace
```python
from _multidict_py import _replace
```



---
## __next__
```python
from _multidict_py import __next__
```



---
## __length_hint__
```python
from _multidict_py import __length_hint__
```



---
## _iter
```python
from _multidict_py import _iter
```



---
## __sizeof__
```python
from _multidict_py import __sizeof__
```



---
## __name__
```python
from _abc import __name__
```



---
## _TypingMeta
```python
from _abc import _TypingMeta
```



---
## MultiMapping
```python
from _abc import MultiMapping
```



---
## MutableMultiMapping
```python
from _abc import MutableMultiMapping
```



---
## getall
```python
from _abc import getall
```



---
## getone
```python
from _abc import getone
```



---
## add
```python
from _abc import add
```



---
## extend
```python
from _abc import extend
```



---
## popone
```python
from _abc import popone
```



---
## popall
```python
from _abc import popall
```



---
## __getitem__
```python
from _abc import __getitem__
```



---
## __name__
```python
from _multidict_base import __name__
```



---
## _abc_itemsview_register
```python
from _multidict_base import _abc_itemsview_register
```



---
## _abc_keysview_register
```python
from _multidict_base import _abc_keysview_register
```



---
## _abc_valuesview_register
```python
from _multidict_base import _abc_valuesview_register
```



---
## _viewbaseset_richcmp
```python
from _multidict_base import _viewbaseset_richcmp
```



---
## _viewbaseset_and
```python
from _multidict_base import _viewbaseset_and
```



---
## _viewbaseset_or
```python
from _multidict_base import _viewbaseset_or
```



---
## _viewbaseset_sub
```python
from _multidict_base import _viewbaseset_sub
```



---
## _viewbaseset_xor
```python
from _multidict_base import _viewbaseset_xor
```



---
## _itemsview_isdisjoint
```python
from _multidict_base import _itemsview_isdisjoint
```

Return True if two sets have a null intersection.

---
## _itemsview_repr
```python
from _multidict_base import _itemsview_repr
```



---
## _keysview_isdisjoint
```python
from _multidict_base import _keysview_isdisjoint
```

Return True if two sets have a null intersection.

---
## _keysview_repr
```python
from _multidict_base import _keysview_repr
```



---
## _valuesview_repr
```python
from _multidict_base import _valuesview_repr
```



---
## _mdrepr
```python
from _multidict_base import _mdrepr
```



---
## __name__
```python
from to_process import __name__
```



---
## current_default_process_limiter
```python
from to_process import current_default_process_limiter
```

Return the capacity limiter that is used by default to limit the number of worker
processes.

:return: a capacity limiter object

---
## process_worker
```python
from to_process import process_worker
```



---
## __name__
```python
from to_thread import __name__
```



---
## current_default_thread_limiter
```python
from to_thread import current_default_thread_limiter
```

Return the capacity limiter that is used by default to limit the number of
concurrent threads.

:return: a capacity limiter object

---
## __name__
```python
from from_thread import __name__
```



---
## run
```python
from from_thread import run
```

Call a coroutine function from a worker thread.

:param func: a coroutine function
:param args: positional arguments for the callable
:return: the return value of the coroutine function

---
## run_sync
```python
from from_thread import run_sync
```

Call a function in the event loop thread from a worker thread.

:param func: a callable
:param args: positional arguments for the callable
:return: the return value of the callable

---
## _BlockingAsyncContextManager
```python
from from_thread import _BlockingAsyncContextManager
```



---
## _BlockingPortalTaskStatus
```python
from from_thread import _BlockingPortalTaskStatus
```



---
## BlockingPortal
```python
from from_thread import BlockingPortal
```

An object that lets external threads run code in an asynchronous event loop.

---
## BlockingPortalProvider
```python
from from_thread import BlockingPortalProvider
```

A manager for a blocking portal. Used as a context manager. The first thread to
enter this context manager causes a blocking portal to be started with the specific
parameters, and the last thread to exit causes the portal to be shut down. Thus,
there will be exactly one blocking portal running in this context as long as at
least one thread has entered this context manager.

The parameters are the same as for :func:`~anyio.run`.

:param backend: name of the backend
:param backend_options: backend options

.. versionadded:: 4.4

---
## start_blocking_portal
```python
from from_thread import start_blocking_portal
```

Start a new event loop in a new thread and run a blocking portal in its main task.

The parameters are the same as for :func:`~anyio.run`.

:param backend: name of the backend
:param backend_options: backend options
:return: a context manager that yields a blocking portal

.. versionchanged:: 3.0
    Usage as a context manager is now required.

---
## check_cancelled
```python
from from_thread import check_cancelled
```

Check if the cancel scope of the host task's running the current worker thread has
been cancelled.

If the host task's current cancel scope has indeed been cancelled, the
backend-specific cancellation exception will be raised.

:raises RuntimeError: if the current thread was not spawned by
    :func:`.to_thread.run_sync`

---
## __init__
```python
from from_thread import __init__
```



---
## __enter__
```python
from from_thread import __enter__
```



---
## __exit__
```python
from from_thread import __exit__
```



---
## started
```python
from from_thread import started
```



---
## __new__
```python
from from_thread import __new__
```



---
## _check_running
```python
from from_thread import _check_running
```



---
## _spawn_task_from_thread
```python
from from_thread import _spawn_task_from_thread
```

Spawn a new task using the given callable.

Implementors must ensure that the future is resolved when the task finishes.

:param func: a callable
:param args: positional arguments to be passed to the callable
:param kwargs: keyword arguments to be passed to the callable
:param name: name of the task (will be coerced to a string if not ``None``)
:param future: a future that will resolve to the return value of the callable,
    or the exception raised during its execution

---
## call
```python
from from_thread import call
```

Call the given function in the event loop thread.

If the callable returns a coroutine object, it is awaited on.

:param func: any callable
:raises RuntimeError: if the portal is not running or if this method is called
    from within the event loop thread

---
## start_task_soon
```python
from from_thread import start_task_soon
```

Start a task in the portal's task group.

The task will be run inside a cancel scope which can be cancelled by cancelling
the returned future.

:param func: the target function
:param args: positional arguments passed to ``func``
:param name: name of the task (will be coerced to a string if not ``None``)
:return: a future that resolves with the return value of the callable if the
    task completes successfully, or with the exception raised in the task
:raises RuntimeError: if the portal is not running or if this method is called
    from within the event loop thread
:rtype: concurrent.futures.Future[T_Retval]

.. versionadded:: 3.0

---
## start_task
```python
from from_thread import start_task
```

Start a task in the portal's task group and wait until it signals for readiness.

This method works the same way as :meth:`.abc.TaskGroup.start`.

:param func: the target function
:param args: positional arguments passed to ``func``
:param name: name of the task (will be coerced to a string if not ``None``)
:return: a tuple of (future, task_status_value) where the ``task_status_value``
    is the value passed to ``task_status.started()`` from within the target
    function
:rtype: tuple[concurrent.futures.Future[T_Retval], Any]

.. versionadded:: 3.0

---
## wrap_async_context_manager
```python
from from_thread import wrap_async_context_manager
```

Wrap an async context manager as a synchronous context manager via this portal.

Spawns a task that will call both ``__aenter__()`` and ``__aexit__()``, stopping
in the middle until the synchronous context manager exits.

:param cm: an asynchronous context manager
:return: a synchronous context manager

.. versionadded:: 2.1

---
## run_blocking_portal
```python
from from_thread import run_blocking_portal
```



---
## callback
```python
from from_thread import callback
```



---
## task_done
```python
from from_thread import task_done
```



---
## __name__
```python
from lowlevel import __name__
```



---
## current_token
```python
from lowlevel import current_token
```

Return a backend specific token object that can be used to get back to the event
loop.

---
## _TokenWrapper
```python
from lowlevel import _TokenWrapper
```



---
## _NoValueSet
```python
from lowlevel import _NoValueSet
```



---
## RunvarToken
```python
from lowlevel import RunvarToken
```



---
## RunVar
```python
from lowlevel import RunVar
```

Like a :class:`~contextvars.ContextVar`, except scoped to the running event loop.

---
## __init__
```python
from lowlevel import __init__
```



---
## _current_vars
```python
from lowlevel import _current_vars
```



---
## get
```python
from lowlevel import get
```



---
## set
```python
from lowlevel import set
```



---
## reset
```python
from lowlevel import reset
```



---
## __repr__
```python
from lowlevel import __repr__
```



---
## extract_backend_and_options
```python
from pytest_plugin import extract_backend_and_options
```



---
## get_runner
```python
from pytest_plugin import get_runner
```



---
## pytest_configure
```python
from pytest_plugin import pytest_configure
```



---
## anyio_backend
```python
from pytest_plugin import anyio_backend
```



---
## anyio_backend_name
```python
from pytest_plugin import anyio_backend_name
```



---
## anyio_backend_options
```python
from pytest_plugin import anyio_backend_options
```



---
## run_with_hypothesis
```python
from pytest_plugin import run_with_hypothesis
```



---
## __name__
```python
from flagging import __name__
```



---
## FlaggingCallback
```python
from flagging import FlaggingCallback
```

An abstract class for defining the methods that any FlaggingCallback should have.

---
## SimpleCSVLogger
```python
from flagging import SimpleCSVLogger
```

A simplified implementation of the FlaggingCallback abstract class
provided for illustrative purposes.  Each flagged sample (both the input and output data)
is logged to a CSV file on the machine running the gradio app.
Example:
    import gradio as gr
    def image_classifier(inp):
        return {'cat': 0.3, 'dog': 0.7}
    demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
                        flagging_callback=SimpleCSVLogger())

---
## CSVLogger
```python
from flagging import CSVLogger
```

The default implementation of the FlaggingCallback abstract class. Each flagged
sample (both the input and output data) is logged to a CSV file with headers on the machine running the gradio app.
Example:
    import gradio as gr
    def image_classifier(inp):
        return {'cat': 0.3, 'dog': 0.7}
    demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
                        flagging_callback=CSVLogger())
Guides: using-flagging

---
## HuggingFaceDatasetSaver
```python
from flagging import HuggingFaceDatasetSaver
```

A callback that saves each flagged sample (both the input and output data) to a HuggingFace dataset.

Example:
    import gradio as gr
    hf_writer = gr.HuggingFaceDatasetSaver(HF_API_TOKEN, "image-classification-mistakes")
    def image_classifier(inp):
        return {'cat': 0.3, 'dog': 0.7}
    demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label",
                        allow_flagging="manual", flagging_callback=hf_writer)
Guides: using-flagging

---
## HuggingFaceDatasetJSONSaver
```python
from flagging import HuggingFaceDatasetJSONSaver
```



---
## FlagMethod
```python
from flagging import FlagMethod
```

Helper class that contains the flagging options and calls the flagging method. Also
provides visual feedback to the user when flag is clicked.

---
## setup
```python
from flagging import setup
```

Params:
flagging_dir (str): local directory where the dataset is cloned,
updated, and pushed from.

---
## flag
```python
from flagging import flag
```



---
## __init__
```python
from flagging import __init__
```



---
## _flag_in_dir
```python
from flagging import _flag_in_dir
```



---
## _save_as_csv
```python
from flagging import _save_as_csv
```

Save data as CSV and return the sample name (row number).

---
## _save_as_jsonl
```python
from flagging import _save_as_jsonl
```

Save data as JSONL and return the sample name (uuid).

---
## _deserialize_components
```python
from flagging import _deserialize_components
```

Deserialize components and return the corresponding row for the flagged sample.

Images/audio are saved to disk as individual files.

---
## __call__
```python
from flagging import __call__
```



---
## reset
```python
from flagging import reset
```



---
## __name__
```python
from tunneling import __name__
```



---
## Tunnel
```python
from tunneling import Tunnel
```



---
## __init__
```python
from tunneling import __init__
```



---
## download_binary
```python
from tunneling import download_binary
```



---
## start_tunnel
```python
from tunneling import start_tunnel
```



---
## kill
```python
from tunneling import kill
```



---
## _start_tunnel
```python
from tunneling import _start_tunnel
```



---
## _read_url_from_tunnel_stream
```python
from tunneling import _read_url_from_tunnel_stream
```



---
## _raise_tunnel_error
```python
from tunneling import _raise_tunnel_error
```



---
## __name__
```python
from deploy_space import __name__
```



---
## add_configuration_to_readme
```python
from deploy_space import add_configuration_to_readme
```



---
## format_title
```python
from deploy_space import format_title
```



---
## deploy
```python
from deploy_space import deploy
```



---
## __name__
```python
from reload import __name__
```

Contains the functions that run when `gradio` is called from the command line. Specifically, allows

$ gradio app.py, to run app.py in reload mode where any changes in the app.py file or Gradio library reloads the demo.
$ gradio app.py my_demo, to use variable names other than "demo"

---
## _setup_config
```python
from reload import _setup_config
```



---
## main
```python
from reload import main
```



---
## __name__
```python
from deprecation import __name__
```

Helper functions for deprecating parts of the Matplotlib API.

This documentation is only relevant for Matplotlib developers, not for users.

.. warning::

    This module is for internal use only.  Do not use it in your own code.
    We may change the API at any time with no warning.

---
## GradioDeprecationWarning
```python
from deprecation import GradioDeprecationWarning
```



---
## GradioUnusedKwargWarning
```python
from deprecation import GradioUnusedKwargWarning
```



---
## simple_deprecated_notice
```python
from deprecation import simple_deprecated_notice
```



---
## use_in_launch
```python
from deprecation import use_in_launch
```



---
## check_deprecated_parameters
```python
from deprecation import check_deprecated_parameters
```



---
## warn_deprecation
```python
from deprecation import warn_deprecation
```



---
## warn_style_method_deprecation
```python
from deprecation import warn_style_method_deprecation
```



---
## __name__
```python
from cli_env_info import __name__
```

This file is the part of 'gradio/cli.py' for printing the environment info 
for the cli command 'gradio environment'

---
## print_environment_info
```python
from cli_env_info import print_environment_info
```



---
## __name__
```python
from events import __name__
```



---
## set_cancel_events
```python
from events import set_cancel_events
```



---
## EventListener
```python
from events import EventListener
```



---
## Dependency
```python
from events import Dependency
```



---
## EventListenerMethod
```python
from events import EventListenerMethod
```

Triggered on an event deployment.

---
## on
```python
from events import on
```

Parameters:
triggers: List of triggers to listen to, e.g. [btn.click, number.change]. If None, will listen to changes to any inputs.
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
scroll_to_output: If True, will scroll to output component on completion
show_progress: If True, will show progress animation while pending
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.

---
## Changeable
```python
from events import Changeable
```



---
## Inputable
```python
from events import Inputable
```



---
## Clickable
```python
from events import Clickable
```



---
## Submittable
```python
from events import Submittable
```



---
## Editable
```python
from events import Editable
```



---
## Clearable
```python
from events import Clearable
```



---
## Playable
```python
from events import Playable
```



---
## Streamable
```python
from events import Streamable
```



---
## StreamableOutput
```python
from events import StreamableOutput
```



---
## Recordable
```python
from events import Recordable
```



---
## Focusable
```python
from events import Focusable
```



---
## Uploadable
```python
from events import Uploadable
```



---
## Releaseable
```python
from events import Releaseable
```



---
## Selectable
```python
from events import Selectable
```



---
## SelectData
```python
from events import SelectData
```



---
## Likeable
```python
from events import Likeable
```



---
## LikeData
```python
from events import LikeData
```



---
## __init__
```python
from events import __init__
```



---
## __call__
```python
from events import __call__
```

Parameters:
fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
status_tracker: Deprecated and has no effect.
scroll_to_output: If True, will scroll to output component on completion
show_progress: If True, will show progress animation while pending
queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.

---
## check_streamable
```python
from events import check_streamable
```



---
## stream_output
```python
from events import stream_output
```



---
## get_config
```python
from events import get_config
```



---
## wrapper
```python
from events import wrapper
```



---
## inner
```python
from events import inner
```



---
## __name__
```python
from queueing import __name__
```



---
## Event
```python
from queueing import Event
```



---
## Queue
```python
from queueing import Queue
```



---
## __init__
```python
from queueing import __init__
```



---
## start
```python
from queueing import start
```



---
## close
```python
from queueing import close
```



---
## resume
```python
from queueing import resume
```



---
## _cancel_asyncio_tasks
```python
from queueing import _cancel_asyncio_tasks
```



---
## set_server_app
```python
from queueing import set_server_app
```



---
## get_active_worker_count
```python
from queueing import get_active_worker_count
```



---
## get_events_in_batch
```python
from queueing import get_events_in_batch
```



---
## set_progress
```python
from queueing import set_progress
```



---
## log_message
```python
from queueing import log_message
```



---
## push
```python
from queueing import push
```

Add event to queue, or return None if Queue is full
Parameters:
    event: Event to add to Queue
Returns:
    rank of submitted Event

---
## update_estimation
```python
from queueing import update_estimation
```

Update estimation by last x element's average duration.

Parameters:
    duration:

---
## get_estimation
```python
from queueing import get_estimation
```



---
## get_request_params
```python
from queueing import get_request_params
```



---
## __name__
```python
from route_utils import __name__
```



---
## Obj
```python
from route_utils import Obj
```

Using a class to convert dictionaries into objects. Used by the `Request` class.
Credit: https://www.geeksforgeeks.org/convert-nested-python-dictionary-to-object/

---
## Request
```python
from route_utils import Request
```

A Gradio request object that can be used to access the request headers, cookies,
query parameters and other information about the request from within the prediction
function. The class is a thin wrapper around the fastapi.Request class. Attributes
of this class include: `headers`, `client`, `query_params`, and `path_params`. If
auth is enabled, the `username` attribute can be used to get the logged in user.
Example:
    import gradio as gr
    def echo(text, request: gr.Request):
        if request:
            print("Request headers dictionary:", request.headers)
            print("IP address:", request.client.host)
            print("Query parameters:", dict(request.query_params))
        return text
    io = gr.Interface(echo, "textbox", "textbox").launch()
Demos: request_ip_headers

---
## FnIndexInferError
```python
from route_utils import FnIndexInferError
```



---
## infer_fn_index
```python
from route_utils import infer_fn_index
```



---
## compile_gr_request
```python
from route_utils import compile_gr_request
```



---
## restore_session_state
```python
from route_utils import restore_session_state
```



---
## prepare_event_data
```python
from route_utils import prepare_event_data
```



---
## strip_url
```python
from route_utils import strip_url
```

Strips the query parameters and trailing slash from a URL.

---
## __init__
```python
from route_utils import __init__
```

Can be instantiated with either a fastapi.Request or by manually passing in
attributes (needed for websocket-based queueing).
Parameters:
    request: A fastapi.Request

---
## __getitem__
```python
from route_utils import __getitem__
```



---
## __setitem__
```python
from route_utils import __setitem__
```



---
## __iter__
```python
from route_utils import __iter__
```



---
## __contains__
```python
from route_utils import __contains__
```



---
## keys
```python
from route_utils import keys
```



---
## values
```python
from route_utils import values
```



---
## items
```python
from route_utils import items
```



---
## __str__
```python
from route_utils import __str__
```



---
## __repr__
```python
from route_utils import __repr__
```



---
## dict_to_obj
```python
from route_utils import dict_to_obj
```



---
## __getattr__
```python
from route_utils import __getattr__
```



---
## __name__
```python
from processing_utils import __name__
```



---
## to_binary
```python
from processing_utils import to_binary
```

Converts a base64 string or dictionary to a binary string that can be sent in a POST.

---
## extract_base64_data
```python
from processing_utils import extract_base64_data
```

Just extracts the base64 data from a general base64 string.

---
## decode_base64_to_image
```python
from processing_utils import decode_base64_to_image
```



---
## encode_plot_to_base64
```python
from processing_utils import encode_plot_to_base64
```



---
## get_pil_metadata
```python
from processing_utils import get_pil_metadata
```



---
## encode_pil_to_bytes
```python
from processing_utils import encode_pil_to_bytes
```



---
## encode_pil_to_base64
```python
from processing_utils import encode_pil_to_base64
```



---
## encode_array_to_base64
```python
from processing_utils import encode_array_to_base64
```



---
## resize_and_crop
```python
from processing_utils import resize_and_crop
```

Resize and crop an image to fit the specified size.
args:
    size: `(width, height)` tuple. Pass `None` for either width or height
    to only crop and resize the other.
    crop_type: can be 'top', 'middle' or 'bottom', depending on this
        value, the image will cropped getting the 'top/left', 'middle' or
        'bottom/right' of the image to fit the size.
raises:
    ValueError: if an invalid `crop_type` is provided.

---
## audio_from_file
```python
from processing_utils import audio_from_file
```



---
## audio_to_file
```python
from processing_utils import audio_to_file
```



---
## convert_to_16_bit_wav
```python
from processing_utils import convert_to_16_bit_wav
```



---
## _convert
```python
from processing_utils import _convert
```

Adapted from: https://github.com/scikit-image/scikit-image/blob/main/skimage/util/dtype.py#L510-L531

Convert an image to the requested data-type.
Warnings are issued in case of precision loss, or when negative values
are clipped during conversion to unsigned integer types (sign loss).
Floating point values are expected to be normalized and will be clipped
to the range [0.0, 1.0] or [-1.0, 1.0] when converting to unsigned or
signed integers respectively.
Numbers are not shifted to the negative side when converting from
unsigned to signed integer types. Negative values will be clipped when
converting to unsigned integers.
Parameters
----------
image : ndarray
    Input image.
dtype : dtype
    Target data-type.
force_copy : bool, optional
    Force a copy of the data, irrespective of its current dtype.
uniform : bool, optional
    Uniformly quantize the floating point range to the integer range.
    By default (uniform=False) floating point values are scaled and
    rounded to the nearest integers, which minimizes back and forth
    conversion errors.
.. versionchanged :: 0.15
    ``_convert`` no longer warns about possible precision or sign
    information loss. See discussions on these warnings at:
    https://github.com/scikit-image/scikit-image/issues/2602
    https://github.com/scikit-image/scikit-image/issues/543#issuecomment-208202228
    https://github.com/scikit-image/scikit-image/pull/3575
References
----------
.. [1] DirectX data conversion rules.
       https://msdn.microsoft.com/en-us/library/windows/desktop/dd607323%28v=vs.85%29.aspx
.. [2] Data Conversions. In "OpenGL ES 2.0 Specification v2.0.25",
       pp 7-8. Khronos Group, 2010.
.. [3] Proper treatment of pixels as integers. A.W. Paeth.
       In "Graphics Gems I", pp 249-256. Morgan Kaufmann, 1990.
.. [4] Dirty Pixels. J. Blinn. In "Jim Blinn's corner: Dirty Pixels",
       pp 47-57. Morgan Kaufmann, 1998.

---
## ffmpeg_installed
```python
from processing_utils import ffmpeg_installed
```



---
## video_is_playable
```python
from processing_utils import video_is_playable
```

Determines if a video is playable in the browser.

A video is playable if it has a playable container and codec.
    .mp4 -> h264
    .webm -> vp9
    .ogg -> theora

---
## convert_video_to_playable_mp4
```python
from processing_utils import convert_video_to_playable_mp4
```

Convert the video to mp4. If something goes wrong return the original video.

---
## _dtype_itemsize
```python
from processing_utils import _dtype_itemsize
```

Return first of `dtypes` with itemsize greater than `itemsize`
Parameters
----------
itemsize: int
    The data type object element size.
Other Parameters
----------------
*dtypes:
    Any Object accepted by `np.dtype` to be converted to a data
    type object
Returns
-------
dtype: data type object
    First of `dtypes` with itemsize greater than `itemsize`.

---
## _dtype_bits
```python
from processing_utils import _dtype_bits
```

Return dtype of `kind` that can store a `bits` wide unsigned int
Parameters:
kind: str
    Data type kind.
bits: int
    Desired number of bits.
itemsize: int
    The data type object element size.
Returns
-------
dtype: data type object
    Data type of `kind` that can store a `bits` wide unsigned int

---
## _scale
```python
from processing_utils import _scale
```

Scale an array of unsigned/positive integers from `n` to `m` bits.
Numbers can be represented exactly only if `m` is a multiple of `n`.
Parameters
----------
a : ndarray
    Input image array.
n : int
    Number of bits currently used to encode the values in `a`.
m : int
    Desired number of bits to encode the values in `out`.
copy : bool, optional
    If True, allocates and returns new array. Otherwise, modifies
    `a` in place.
Returns
-------
out : array
    Output image array. Has the same kind as `a`.

---
## __name__
```python
from state_holder import __name__
```



---
## StateHolder
```python
from state_holder import StateHolder
```



---
## SessionState
```python
from state_holder import SessionState
```



---
## __init__
```python
from state_holder import __init__
```



---
## set_blocks
```python
from state_holder import set_blocks
```



---
## __getitem__
```python
from state_holder import __getitem__
```



---
## __contains__
```python
from state_holder import __contains__
```



---
## update
```python
from state_holder import update
```



---
## __setitem__
```python
from state_holder import __setitem__
```



---
## __name__
```python
from interface import __name__
```



---
## Interface
```python
from interface import Interface
```

Interface is Gradio's main high-level class, and allows you to create a web-based GUI / demo
around a machine learning model (or any Python function) in a few lines of code.
You must specify three parameters: (1) the function to create a GUI for (2) the desired input components and
(3) the desired output components. Additional parameters can be used to control the appearance
and behavior of the demo.

Example:
    import gradio as gr

    def image_classifier(inp):
        return {'cat': 0.3, 'dog': 0.7}

    demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
    demo.launch()
Demos: hello_world, hello_world_3, gpt2_xl
Guides: quickstart, key-features, sharing-your-app, interface-state, reactive-interfaces, advanced-interface-features, setting-up-a-gradio-demo-for-maximum-performance

---
## TabbedInterface
```python
from interface import TabbedInterface
```

A TabbedInterface is created by providing a list of Interfaces, each of which gets
rendered in a separate tab.
Demos: stt_or_tts

---
## close_all
```python
from interface import close_all
```



---
## get_instances
```python
from interface import get_instances
```

:return: list of all current instances.

---
## load
```python
from interface import load
```

Warning: this method will be deprecated. Use the equivalent `gradio.load()` instead. This is a class
method that constructs a Blocks from a Hugging Face repo. Can accept
model repos (if src is "models") or Space repos (if src is "spaces"). The input
and output components are automatically loaded from the repo.
Parameters:
    name: the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base")
    src: the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`)
    api_key: optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens. Warning: only provide this if you are loading a trusted private Space as it can be read by the Space you are loading.
    alias: optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x)
Returns:
    a Gradio Interface object for the given model

---
## from_pipeline
```python
from interface import from_pipeline
```

Class method that constructs an Interface from a Hugging Face transformers.Pipeline object.
The input and output components are automatically determined from the pipeline.
Parameters:
    pipeline: the pipeline object to use.
Returns:
    a Gradio Interface object from the given Pipeline
Example:
    import gradio as gr
    from transformers import pipeline
    pipe = pipeline("image-classification")
    gr.Interface.from_pipeline(pipe).launch()

---
## __init__
```python
from interface import __init__
```

Initializes the hardware interface.

Args:
    kwargs: Additional arguments to pass to the hardware interface.

---
## render_title_description
```python
from interface import render_title_description
```



---
## render_flag_btns
```python
from interface import render_flag_btns
```



---
## render_input_column
```python
from interface import render_input_column
```



---
## render_output_column
```python
from interface import render_output_column
```



---
## render_article
```python
from interface import render_article
```



---
## attach_submit_events
```python
from interface import attach_submit_events
```



---
## attach_clear_events
```python
from interface import attach_clear_events
```



---
## attach_interpretation_events
```python
from interface import attach_interpretation_events
```



---
## attach_flagging_events
```python
from interface import attach_flagging_events
```



---
## render_examples
```python
from interface import render_examples
```



---
## __str__
```python
from interface import __str__
```



---
## __repr__
```python
from interface import __repr__
```



---
## test_launch
```python
from interface import test_launch
```

Deprecated.

---
## cleanup
```python
from interface import cleanup
```



---
## __name__
```python
from chat_interface import __name__
```

This file defines a useful high-level abstraction to build Gradio chatbots: ChatInterface.

---
## ChatInterface
```python
from chat_interface import ChatInterface
```

ChatInterface is Gradio's high-level abstraction for creating chatbot UIs, and allows you to create
a web-based demo around a chatbot model in a few lines of code. Only one parameter is required: fn, which
takes a function that governs the response of the chatbot based on the user input and chat history. Additional
parameters can be used to control the appearance and behavior of the demo.

Example:
    import gradio as gr

    def echo(message, history):
        return message

    demo = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot")
    demo.launch()
Demos: chatinterface_random_response, chatinterface_streaming_echo
Guides: creating-a-chatbot-fast, sharing-your-app

---
## __init__
```python
from chat_interface import __init__
```

Parameters:
fn: the function to wrap the chat interface around. Should accept two parameters: a string input message and list of two-element lists of the form [[user_message, bot_message], ...] representing the chat history, and return a string response. See the Chatbot documentation for more information on the chat history format.
chatbot: an instance of the gr.Chatbot component to use for the chat interface, if you would like to customize the chatbot properties. If not provided, a default gr.Chatbot component will be created.
textbox: an instance of the gr.Textbox component to use for the chat interface, if you would like to customize the textbox properties. If not provided, a default gr.Textbox component will be created.
additional_inputs: an instance or list of instances of gradio components (or their string shortcuts) to use as additional inputs to the chatbot. If components are not already rendered in a surrounding Blocks, then the components will be displayed under the chatbot, in an accordion.
additional_inputs_accordion_name: the label of the accordion to use for additional inputs, only used if additional_inputs is provided.
examples: sample inputs for the function; if provided, appear below the chatbot and can be clicked to populate the chatbot input.
cache_examples: If True, caches examples in the server for fast runtime in examples. The default option in HuggingFace Spaces is True. The default option elsewhere is False.
title: a title for the interface; if provided, appears above chatbot in large font. Also used as the tab title when opened in a browser window.
description: a description for the interface; if provided, appears above the chatbot and beneath the title in regular font. Accepts Markdown and HTML content.
theme: Theme to use, loaded from gradio.themes.
css: custom css or path to custom css file to use with interface.
analytics_enabled: Whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable if defined, or default to True.
submit_btn: Text to display on the submit button. If None, no button will be displayed. If a Button object, that button will be used.
stop_btn: Text to display on the stop button, which replaces the submit_btn when the submit_btn or retry_btn is clicked and response is streaming. Clicking on the stop_btn will halt the chatbot response. If set to None, stop button functionality does not appear in the chatbot. If a Button object, that button will be used as the stop button.
retry_btn: Text to display on the retry button. If None, no button will be displayed. If a Button object, that button will be used.
undo_btn: Text to display on the delete last button. If None, no button will be displayed. If a Button object, that button will be used.
clear_btn: Text to display on the clear button. If None, no button will be displayed. If a Button object, that button will be used.
autofocus: If True, autofocuses to the textbox when the page loads.

---
## _setup_events
```python
from chat_interface import _setup_events
```



---
## _setup_stop_events
```python
from chat_interface import _setup_stop_events
```



---
## _setup_api
```python
from chat_interface import _setup_api
```



---
## _clear_and_save_textbox
```python
from chat_interface import _clear_and_save_textbox
```



---
## _display_input
```python
from chat_interface import _display_input
```



---
## _delete_prev_fn
```python
from chat_interface import _delete_prev_fn
```



---
## __name__
```python
from external_utils import __name__
```

Utility function for gradio/external.py

---
## get_tabular_examples
```python
from external_utils import get_tabular_examples
```



---
## cols_to_rows
```python
from external_utils import cols_to_rows
```



---
## rows_to_cols
```python
from external_utils import rows_to_cols
```



---
## postprocess_label
```python
from external_utils import postprocess_label
```



---
## encode_to_base64
```python
from external_utils import encode_to_base64
```



---
## streamline_spaces_interface
```python
from external_utils import streamline_spaces_interface
```

Streamlines the interface config dictionary to remove unnecessary keys.

---
## __name__
```python
from templates import __name__
```



---
## TextArea
```python
from templates import TextArea
```

Sets: lines=7

---
## Webcam
```python
from templates import Webcam
```

Sets: source="webcam", interactive=True

---
## Sketchpad
```python
from templates import Sketchpad
```

Sets: image_mode="L", source="canvas", shape=(28, 28), invert_colors=True, interactive=True

---
## Paint
```python
from templates import Paint
```

Sets: source="canvas", tool="color-sketch", interactive=True

---
## ImageMask
```python
from templates import ImageMask
```

Sets: source="upload", tool="sketch", interactive=True

---
## ImagePaint
```python
from templates import ImagePaint
```

Sets: source="upload", tool="color-sketch", interactive=True

---
## Pil
```python
from templates import Pil
```

Sets: type="pil"

---
## PlayableVideo
```python
from templates import PlayableVideo
```

Sets: format="mp4"

---
## Microphone
```python
from templates import Microphone
```

Sets: source="microphone"

---
## Files
```python
from templates import Files
```

Sets: file_count="multiple"

---
## Numpy
```python
from templates import Numpy
```

Sets: type="numpy"

---
## Matrix
```python
from templates import Matrix
```

Sets: type="array"

---
## List
```python
from templates import List
```

Sets: type="array", col_count=1

---
## __init__
```python
from templates import __init__
```



---
## __name__
```python
from interpretation import __name__
```

gr.Interpretation() component

---
## Interpretable
```python
from interpretation import Interpretable
```



---
## TokenInterpretable
```python
from interpretation import TokenInterpretable
```



---
## NeighborInterpretable
```python
from interpretation import NeighborInterpretable
```



---
## diff
```python
from interpretation import diff
```



---
## quantify_difference_in_label
```python
from interpretation import quantify_difference_in_label
```



---
## get_regression_or_classification_value
```python
from interpretation import get_regression_or_classification_value
```

Used to combine regression/classification for Shap interpretation method.

---
## __init__
```python
from interpretation import __init__
```

Parameters:
component: Which component to show in the interpretation widget.
visible: Whether or not the interpretation is visible.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## set_interpret_parameters
```python
from interpretation import set_interpret_parameters
```

Set any parameters for interpretation. Properties can be set here to be
used in get_interpretation_neighbors and get_interpretation_scores.

---
## get_interpretation_scores
```python
from interpretation import get_interpretation_scores
```

Arrange the output values from the neighbors into interpretation scores for the interface to render.
Parameters:
    x: Input to interface
    neighbors: Neighboring values to input x used for interpretation.
    scores: Output value corresponding to each neighbor in neighbors
Returns:
    Arrangement of interpretation scores for interfaces to render.

---
## tokenize
```python
from interpretation import tokenize
```

Interprets an input data point x by splitting it into a list of tokens (e.g
a string into words or an image into super-pixels).

---
## get_masked_inputs
```python
from interpretation import get_masked_inputs
```



---
## get_interpretation_neighbors
```python
from interpretation import get_interpretation_neighbors
```

Generates values similar to input to be used to interpret the significance of the input in the final output.
Parameters:
    x: Input to interface
Returns: (neighbor_values, interpret_kwargs, interpret_by_removal)
    neighbor_values: Neighboring values to input x to compute for interpretation
    interpret_kwargs: Keyword arguments to be passed to get_interpretation_scores

---
## get_masked_prediction
```python
from interpretation import get_masked_prediction
```



---
## __name__
```python
from ranged_response import __name__
```



---
## ClosedRange
```python
from ranged_response import ClosedRange
```



---
## OpenRange
```python
from ranged_response import OpenRange
```



---
## RangedFileResponse
```python
from ranged_response import RangedFileResponse
```



---
## RangedStaticFiles
```python
from ranged_response import RangedStaticFiles
```



---
## __len__
```python
from ranged_response import __len__
```



---
## __bool__
```python
from ranged_response import __bool__
```



---
## clamp
```python
from ranged_response import clamp
```



---
## __init__
```python
from ranged_response import __init__
```



---
## set_range_headers
```python
from ranged_response import set_range_headers
```



---
## file_response
```python
from ranged_response import file_response
```



---
## ranged_file_response
```python
from ranged_response import ranged_file_response
```



---
## Context
```python
from context import Context
```



---
## LocalContext
```python
from context import LocalContext
```



---
## __name__
```python
from inputs import __name__
```

This module defines various classes that can serve as the `input` to an interface. Each class must inherit from
`InputComponent`, and each class must define a path to its template. All of the subclasses of `InputComponent` are
automatically added to a registry, which allows them to be easily referenced in other parts of the code.

---
## warn_inputs_deprecation
```python
from inputs import warn_inputs_deprecation
```



---
## Textbox
```python
from inputs import Textbox
```



---
## Number
```python
from inputs import Number
```

Component creates a field for user to enter numeric input. Provides a number as an argument to the wrapped function.
Input type: float

---
## Slider
```python
from inputs import Slider
```

Component creates a slider that ranges from `minimum` to `maximum`. Provides number as an argument to the wrapped function.
Input type: float

---
## Checkbox
```python
from inputs import Checkbox
```

Component creates a checkbox that can be set to `True` or `False`. Provides a boolean as an argument to the wrapped function.
Input type: bool

---
## CheckboxGroup
```python
from inputs import CheckboxGroup
```

Component creates a set of checkboxes of which a subset can be selected. Provides a list of strings representing the selected choices as an argument to the wrapped function.
Input type: Union[List[str], List[int]]

---
## Radio
```python
from inputs import Radio
```

Component creates a set of radio buttons of which only one can be selected. Provides string representing selected choice as an argument to the wrapped function.
Input type: Union[str, int]

---
## Dropdown
```python
from inputs import Dropdown
```

Component creates a dropdown of which only one can be selected. Provides string representing selected choice as an argument to the wrapped function.
Input type: Union[str, int]

---
## Image
```python
from inputs import Image
```

Component creates an image upload box with editing capabilities.
Input type: Union[numpy.array, PIL.Image, file-object]

---
## Video
```python
from inputs import Video
```

Component creates a video file upload that is converted to a file path.

Input type: filepath

---
## Audio
```python
from inputs import Audio
```

Component accepts audio input files.
Input type: Union[Tuple[int, numpy.array], file-object, numpy.array]

---
## File
```python
from inputs import File
```

Component accepts generic file uploads.
Input type: Union[file-object, bytes, List[Union[file-object, bytes]]]

---
## Dataframe
```python
from inputs import Dataframe
```

Component accepts 2D input through a spreadsheet interface.
Input type: Union[pandas.DataFrame, numpy.array, List[Union[str, float]], List[List[Union[str, float]]]]

---
## Timeseries
```python
from inputs import Timeseries
```

Component accepts pandas.DataFrame uploaded as a timeseries csv file.
Input type: pandas.DataFrame

---
## State
```python
from inputs import State
```

Special hidden component that stores state across runs of the interface.
Input type: Any

---
## Image3D
```python
from inputs import Image3D
```

Used for 3D image model output.
Input type: File object of type (.obj, glb, or .gltf)

---
## __init__
```python
from inputs import __init__
```

Parameters:
label (str): component name in interface.
optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None.

---
## __name__
```python
from networking import __name__
```

Defines helper methods useful for setting up ports, launching servers, and
creating tunnels.

---
## Server
```python
from networking import Server
```



---
## get_first_available_port
```python
from networking import get_first_available_port
```

Gets the first open port in a specified range of port numbers
Parameters:
initial: the initial value in the range of port numbers
final: final (exclusive) value in the range of port numbers, should be greater than `initial`
Returns:
port: the first open port in the range

---
## configure_app
```python
from networking import configure_app
```



---
## start_server
```python
from networking import start_server
```

Launches a local server running the provided Interface
Parameters:
    blocks: The Blocks object to run on the server
    server_name: to make app accessible on local network, set this to "0.0.0.0". Can be set by environment variable GRADIO_SERVER_NAME.
    server_port: will start gradio app on this port (if available). Can be set by environment variable GRADIO_SERVER_PORT.
    auth: If provided, username and password (or list of username-password tuples) required to access the Blocks. Can also provide function that takes username and password and returns True if valid login.
    ssl_keyfile: If a path to a file is provided, will use this as the private key file to create a local server running on https.
    ssl_certfile: If a path to a file is provided, will use this as the signed certificate for https. Needs to be provided if ssl_keyfile is provided.
    ssl_keyfile_password: If a password is provided, will use this with the ssl certificate for https.
    app_kwargs: Additional keyword arguments to pass to the gradio.routes.App constructor.

Returns:
    port: the port number the server is running on
    path_to_local_server: the complete address that the local server can be accessed at
    app: the FastAPI app object
    server: the server object that is a subclass of uvicorn.Server (used to close the server)

---
## setup_tunnel
```python
from networking import setup_tunnel
```



---
## url_ok
```python
from networking import url_ok
```



---
## __init__
```python
from networking import __init__
```



---
## install_signal_handlers
```python
from networking import install_signal_handlers
```



---
## run_in_thread
```python
from networking import run_in_thread
```



---
## close
```python
from networking import close
```



---
## get_package_version
```python
from utils import get_package_version
```



---
## safe_get_lock
```python
from utils import safe_get_lock
```

Get asyncio.Lock() without fear of getting an Exception.

Needed because in reload mode we import the Blocks object outside
the main thread.

---
## BaseReloader
```python
from utils import BaseReloader
```



---
## SourceFileReloader
```python
from utils import SourceFileReloader
```



---
## watchfn
```python
from utils import watchfn
```

Watch python files in a given module.

get_changes is taken from uvicorn's default file watcher.

---
## colab_check
```python
from utils import colab_check
```

Check if interface is launching from Google Colab
:return is_colab (bool): True or False

---
## kaggle_check
```python
from utils import kaggle_check
```



---
## sagemaker_check
```python
from utils import sagemaker_check
```



---
## ipython_check
```python
from utils import ipython_check
```

Check if interface is launching from iPython (not colab)
:return is_ipython (bool): True or False

---
## get_space
```python
from utils import get_space
```



---
## is_zero_gpu_space
```python
from utils import is_zero_gpu_space
```



---
## readme_to_html
```python
from utils import readme_to_html
```



---
## show_tip
```python
from utils import show_tip
```



---
## launch_counter
```python
from utils import launch_counter
```



---
## get_default_args
```python
from utils import get_default_args
```



---
## assert_configs_are_equivalent_besides_ids
```python
from utils import assert_configs_are_equivalent_besides_ids
```

Allows you to test if two different Blocks configs produce the same demo.

Parameters:
config1 (dict): nested dict with config from the first Blocks instance
config2 (dict): nested dict with config from the second Blocks instance
root_keys (Tuple): an interable consisting of which keys to test for equivalence at
    the root level of the config. By default, only "mode" is tested,
    so keys like "version" are ignored.

---
## format_ner_list
```python
from utils import format_ner_list
```



---
## delete_none
```python
from utils import delete_none
```

Delete keys whose values are None from a dictionary

---
## resolve_singleton
```python
from utils import resolve_singleton
```



---
## component_or_layout_class
```python
from utils import component_or_layout_class
```

Returns the component, template, or layout class with the given class name, or
raises a ValueError if not found.

Parameters:
cls_name (str): lower-case string class name of a component
Returns:
cls: the component class

---
## run_coro_in_background
```python
from utils import run_coro_in_background
```

Runs coroutines in background.

Warning, be careful to not use this function in other than FastAPI scope, because the event_loop has not started yet.
You can use it in any scope reached by FastAPI app.

correct scope examples: endpoints in routes, Blocks.process_api
incorrect scope examples: Blocks.launch

Use startup_events in routes.py if you need to run a coro in background in Blocks.launch().


Example:
    utils.run_coro_in_background(fn, *args, **kwargs)

Args:
    func:
    *args:
    **kwargs:

Returns:

---
## run_sync_iterator_async
```python
from utils import run_sync_iterator_async
```

Helper for yielding StopAsyncIteration from sync iterators.

---
## SyncToAsyncIterator
```python
from utils import SyncToAsyncIterator
```

Treat a synchronous iterator as async one.

---
## set_directory
```python
from utils import set_directory
```

Context manager that sets the working directory to the given path.

---
## sanitize_value_for_csv
```python
from utils import sanitize_value_for_csv
```

Sanitizes a value that is being written to a CSV file to prevent CSV injection attacks.
Reference: https://owasp.org/www-community/attacks/CSV_Injection

---
## sanitize_list_for_csv
```python
from utils import sanitize_list_for_csv
```

Sanitizes a list of values (or a list of list of values) that is being written to a
CSV file to prevent CSV injection attacks.

---
## append_unique_suffix
```python
from utils import append_unique_suffix
```

Appends a numerical suffix to `name` so that it does not appear in `list_of_names`.

---
## validate_url
```python
from utils import validate_url
```



---
## is_update
```python
from utils import is_update
```



---
## get_continuous_fn
```python
from utils import get_continuous_fn
```



---
## function_wrapper
```python
from utils import function_wrapper
```



---
## get_function_with_locals
```python
from utils import get_function_with_locals
```



---
## set_task_name
```python
from utils import set_task_name
```



---
## get_cancel_function
```python
from utils import get_cancel_function
```



---
## get_type_hints
```python
from utils import get_type_hints
```



---
## is_special_typed_parameter
```python
from utils import is_special_typed_parameter
```



---
## check_function_inputs_match
```python
from utils import check_function_inputs_match
```

Checks if the input component set matches the function
Returns: None if valid, a string error message if mismatch

---
## concurrency_count_warning
```python
from utils import concurrency_count_warning
```



---
## TupleNoPrint
```python
from utils import TupleNoPrint
```



---
## MatplotlibBackendMananger
```python
from utils import MatplotlibBackendMananger
```



---
## tex2svg
```python
from utils import tex2svg
```



---
## abspath
```python
from utils import abspath
```

Returns absolute path of a str or Path path, but does not resolve symlinks.

---
## is_in_or_equal
```python
from utils import is_in_or_equal
```

True if path_1 is a descendant (i.e. located within) path_2 or if the paths are the
same, returns False otherwise.
Parameters:
    path_1: str or Path (should be a file)
    path_2: str or Path (can be a file or directory)

---
## get_serializer_name
```python
from utils import get_serializer_name
```



---
## remove_html_tags
```python
from utils import remove_html_tags
```



---
## find_user_stack_level
```python
from utils import find_user_stack_level
```

Find the first stack frame not inside Gradio.

---
## running_app
```python
from utils import running_app
```



---
## queue_changed
```python
from utils import queue_changed
```



---
## swap_blocks
```python
from utils import swap_blocks
```



---
## should_watch
```python
from utils import should_watch
```



---
## stop
```python
from utils import stop
```



---
## alert_change
```python
from utils import alert_change
```



---
## get_changes
```python
from utils import get_changes
```



---
## iter_py_files
```python
from utils import iter_py_files
```



---
## assert_same_components
```python
from utils import assert_same_components
```



---
## same_children_recursive
```python
from utils import same_children_recursive
```



---
## __aiter__
```python
from utils import __aiter__
```



---
## continuous_fn
```python
from utils import continuous_fn
```



---
## before_fn
```python
from utils import before_fn
```



---
## after_fn
```python
from utils import after_fn
```



---
## get_class_that_defined_method
```python
from utils import get_class_that_defined_method
```



---
## gen_wrapper
```python
from utils import gen_wrapper
```



---
## __name__
```python
from ipython_ext import __name__
```



---
## CellIdTracker
```python
from ipython_ext import CellIdTracker
```

Determines the most recently run cell in the notebook.

Needed to keep track of which demo the user is updating.

---
## JupyterReloader
```python
from ipython_ext import JupyterReloader
```

Swap a running blocks class in a notebook with the latest cell contents.

---
## load_ipython_extension
```python
from ipython_ext import load_ipython_extension
```



---
## __init__
```python
from ipython_ext import __init__
```



---
## pre_run_cell
```python
from ipython_ext import pre_run_cell
```



---
## current_cell
```python
from ipython_ext import current_cell
```



---
## running_app
```python
from ipython_ext import running_app
```



---
## running_demo
```python
from ipython_ext import running_demo
```



---
## demo_tracked
```python
from ipython_ext import demo_tracked
```



---
## track
```python
from ipython_ext import track
```



---
## blocks
```python
from ipython_ext import blocks
```

Launch a demo defined in a cell in reload mode.

---
## __name__
```python
from wasm_utils import __name__
```



---
## WasmUnsupportedError
```python
from wasm_utils import WasmUnsupportedError
```



---
## register_app
```python
from wasm_utils import register_app
```



---
## get_registered_app
```python
from wasm_utils import get_registered_app
```



---
## DuplicateBlockError
```python
from exceptions import DuplicateBlockError
```

Raised when a Blocks contains more than one Block with the same id

---
## InvalidComponentError
```python
from exceptions import InvalidComponentError
```

Raised when invalid components are used.

---
## TooManyRequestsError
```python
from exceptions import TooManyRequestsError
```

Raised when the Hugging Face API returns a 429 status code.

---
## ModelNotFoundError
```python
from exceptions import ModelNotFoundError
```

Raised when the provided model doesn't exists or is not found by the provided api url.

---
## RenderError
```python
from exceptions import RenderError
```

Raised when a component has not been rendered in the current Blocks but is expected to have been rendered.

---
## InvalidApiNameError
```python
from exceptions import InvalidApiNameError
```



---
## ServerFailedToStartError
```python
from exceptions import ServerFailedToStartError
```



---
## InvalidBlockError
```python
from exceptions import InvalidBlockError
```

Raised when an event in a Blocks contains a reference to a Block that is not in the original Blocks

---
## ReloadError
```python
from exceptions import ReloadError
```

Raised when something goes wrong when reloading the gradio app.

---
## __name__
```python
from analytics import __name__
```

Functions related to analytics and telemetry. 

---
## analytics_enabled
```python
from analytics import analytics_enabled
```

Returns: True if analytics are enabled, False otherwise.

---
## _do_analytics_request
```python
from analytics import _do_analytics_request
```



---
## _do_normal_analytics_request
```python
from analytics import _do_normal_analytics_request
```



---
## version_check
```python
from analytics import version_check
```



---
## get_local_ip_address
```python
from analytics import get_local_ip_address
```

Gets the public IP address or returns the string "No internet connection" if unable
to obtain it or the string "Analytics disabled" if a user has disabled analytics.
Does not make a new request if the IP address has already been obtained in the
same Python session.

---
## initiated_analytics
```python
from analytics import initiated_analytics
```



---
## launched_analytics
```python
from analytics import launched_analytics
```



---
## integration_analytics
```python
from analytics import integration_analytics
```



---
## error_analytics
```python
from analytics import error_analytics
```

Send error analytics if there is network
Parameters:
    message: Details about error

---
## __name__
```python
from blocks import __name__
```



---
## in_event_listener
```python
from blocks import in_event_listener
```



---
## updateable
```python
from blocks import updateable
```



---
## Updateable
```python
from blocks import Updateable
```



---
## Block
```python
from blocks import Block
```

Canonical n-dimensional unit of homogeneous dtype contained in a pandas
data structure

Index-ignorant; let the container take care of that

---
## BlockContext
```python
from blocks import BlockContext
```



---
## BlockFunction
```python
from blocks import BlockFunction
```



---
## postprocess_update_dict
```python
from blocks import postprocess_update_dict
```

Converts a dictionary of updates into a format that can be sent to the frontend.
E.g. {"__type__": "update", "value": "2", "interactive": False}
Into -> {"__type__": "update", "value": 2.0, "mode": "static"}
Parameters:
    block: The Block that is being updated with this update dictionary.
    update_dict: The original update dictionary
    postprocess: Whether to postprocess the "value" key of the update dictionary.

---
## convert_component_dict_to_list
```python
from blocks import convert_component_dict_to_list
```

Converts a dictionary of component updates into a list of updates in the order of
the outputs_ids and including every output component. Leaves other types of dictionaries unchanged.
E.g. {"textbox": "hello", "number": {"__type__": "generic_update", "value": "2"}}
Into -> ["hello", {"__type__": "generic_update"}, {"__type__": "generic_update", "value": "2"}]

---
## get_api_info
```python
from blocks import get_api_info
```

Gets the information needed to generate the API docs from a Blocks config.
Parameters:
    config: a Blocks config dictionary
    serialize: If True, returns the serialized version of the typed information. If False, returns the raw version.

---
## Blocks
```python
from blocks import Blocks
```

Blocks is Gradio's low-level API that allows you to create more custom web
applications and demos than Interfaces (yet still entirely in Python).


Compared to the Interface class, Blocks offers more flexibility and control over:
(1) the layout of components (2) the events that
trigger the execution of functions (3) data flows (e.g. inputs can trigger outputs,
which can trigger the next level of outputs). Blocks also offers ways to group
together related demos such as with tabs.


The basic usage of Blocks is as follows: create a Blocks object, then use it as a
context (with the "with" statement), and then define layouts, components, or events
within the Blocks context. Finally, call the launch() method to launch the demo.

Example:
    import gradio as gr
    def update(name):
        return f"Welcome to Gradio, {name}!"

    with gr.Blocks() as demo:
        gr.Markdown("Start typing below and then click **Run** to see the output.")
        with gr.Row():
            inp = gr.Textbox(placeholder="What is your name?")
            out = gr.Textbox()
        btn = gr.Button("Run")
        btn.click(fn=update, inputs=inp, outputs=out)

    demo.launch()
Demos: blocks_hello, blocks_flipper, blocks_speech_text_sentiment, generate_english_german
Guides: blocks-and-event-listeners, controlling-layout, state-in-blocks, custom-CSS-and-JS, custom-interpretations-with-blocks, using-blocks-like-functions

---
## wrapper
```python
from blocks import wrapper
```



---
## __new__
```python
from blocks import __new__
```



---
## __init__
```python
from blocks import __init__
```

Parameters:
theme: a Theme object or a string representing a theme. If a string, will look for a built-in theme with that name (e.g. "soft" or "default"), or will attempt to load a theme from the HF Hub (e.g. "gradio/monochrome"). If None, will use the Default theme.
analytics_enabled: whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable or default to True.
mode: a human-friendly name for the kind of Blocks or Interface being created.
title: The tab title to display when this is opened in a browser window.
css: custom css or path to custom css file to apply to entire Blocks

---
## render
```python
from blocks import render
```



---
## unrender
```python
from blocks import unrender
```

Removes self from BlockContext if it has been rendered (otherwise does nothing).
Removes self from the layout and collection of blocks, but does not delete any event triggers.

---
## get_block_name
```python
from blocks import get_block_name
```

Gets block's class name.

If it is template component it gets the parent's class name.

@return: class name

---
## get_expected_parent
```python
from blocks import get_expected_parent
```



---
## get_config
```python
from blocks import get_config
```



---
## update
```python
from blocks import update
```



---
## add_child
```python
from blocks import add_child
```



---
## __enter__
```python
from blocks import __enter__
```



---
## add
```python
from blocks import add
```



---
## fill_expected_parents
```python
from blocks import fill_expected_parents
```



---
## __exit__
```python
from blocks import __exit__
```



---
## postprocess
```python
from blocks import postprocess
```

Any postprocessing needed to be performed on a block context.

---
## spaces_auto_wrap
```python
from blocks import spaces_auto_wrap
```



---
## __str__
```python
from blocks import __str__
```



---
## __repr__
```python
from blocks import __repr__
```



---
## _is_running_in_reload_thread
```python
from blocks import _is_running_in_reload_thread
```



---
## from_config
```python
from blocks import from_config
```

Factory method that creates a Blocks from a config and list of functions. Used
internally by the gradio.external.load() method.

Parameters:
config: a dictionary containing the configuration of the Blocks.
fns: a list of functions that are used in the Blocks. Must be in the same order as the dependencies in the config.
root_url: an external url to use as a root URL when serving files for components in the Blocks.

---
## expects_oauth
```python
from blocks import expects_oauth
```

Return whether the app expects user to authenticate via OAuth.

---
## set_event_trigger
```python
from blocks import set_event_trigger
```

Adds an event to the component's dependencies.
Parameters:
    event_name: event name
    fn: Callable function
    inputs: input list
    outputs: output list
    preprocess: whether to run the preprocess methods of components
    postprocess: whether to run the postprocess methods of components
    scroll_to_output: whether to scroll to output of dependency on trigger
    show_progress: whether to show progress animation while running.
    api_name: defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
    js: Experimental parameter (API may change): Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components
    no_target: if True, sets "targets" to [], used for Blocks "load" event
    queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
    batch: whether this function takes in a batch of inputs
    max_batch_size: the maximum batch size to send to the function
    cancels: a list of other events to cancel when this event is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method.
    every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
    collects_event_data: whether to collect event data for this event
    trigger_after: if set, this event will be triggered after 'trigger_after' function index
    trigger_only_on_success: if True, this event will only be triggered if the previous event was successful (only applies if `trigger_after` is set)
Returns: dependency information, dependency index

---
## is_callable
```python
from blocks import is_callable
```

Checks if a particular Blocks function is callable (i.e. not stateful or a generator).

---
## __call__
```python
from blocks import __call__
```

Allows Blocks objects to be called as functions. Supply the parameters to the
function as positional arguments. To choose which function to call, use the
fn_index parameter, which must be a keyword argument.

Parameters:
*inputs: the parameters to pass to the function
fn_index: the index of the function to call (defaults to 0, which for Interfaces, is the default prediction function)
api_name: The api_name of the dependency to call. Will take precedence over fn_index.

---
## serialize_data
```python
from blocks import serialize_data
```



---
## deserialize_data
```python
from blocks import deserialize_data
```



---
## validate_inputs
```python
from blocks import validate_inputs
```



---
## preprocess_data
```python
from blocks import preprocess_data
```



---
## validate_outputs
```python
from blocks import validate_outputs
```



---
## postprocess_data
```python
from blocks import postprocess_data
```



---
## handle_streaming_outputs
```python
from blocks import handle_streaming_outputs
```



---
## create_limiter
```python
from blocks import create_limiter
```



---
## get_config_file
```python
from blocks import get_config_file
```



---
## load
```python
from blocks import load
```

For reverse compatibility reasons, this is both a class method and an instance
method, the two of which, confusingly, do two completely different things.

Class method: loads a demo from a Hugging Face Spaces repo and creates it locally and returns a block instance. Warning: this method will be deprecated. Use the equivalent `gradio.load()` instead.

Instance method: adds event that runs as soon as the demo loads in the browser. Example usage below.
Parameters:
    name: Class Method - the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base")
    src: Class Method - the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`)
    api_key: Class Method - optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens. Warning: only provide this if you are loading a trusted private Space as it can be read by the Space you are loading.
    alias: Class Method - optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x)
    fn: Instance Method - the function to wrap an interface around. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
    inputs: Instance Method - List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
    outputs: Instance Method - List of gradio.components to use as inputs. If the function returns no outputs, this should be an empty list.
    api_name: Instance Method - Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
    scroll_to_output: Instance Method - If True, will scroll to output component on completion
    show_progress: Instance Method - If True, will show progress animation while pending
    queue: Instance Method - If True, will place the request on the queue, if the queue exists
    batch: Instance Method - If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
    max_batch_size: Instance Method - Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
    preprocess: Instance Method - If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
    postprocess: Instance Method - If False, will not run postprocessing of component data before returning 'fn' output to the browser.
    every: Instance Method - Run this event 'every' number of seconds. Interpreted in seconds. Queue must be enabled.
Example:
    import gradio as gr
    import datetime
    with gr.Blocks() as demo:
        def get_time():
            return datetime.datetime.now().time()
        dt = gr.Textbox(label="Current time")
        demo.load(get_time, inputs=None, outputs=dt)
    demo.launch()

---
## clear
```python
from blocks import clear
```

Resets the layout of the Blocks object.

---
## queue
```python
from blocks import queue
```

By enabling the queue you can control the rate of processed requests, let users know their position in the queue, and set a limit on maximum number of events allowed.
Parameters:
    concurrency_count: Number of worker threads that will be processing requests from the queue concurrently. Increasing this number will increase the rate at which requests are processed, but will also increase the memory usage of the queue.
    status_update_rate: If "auto", Queue will send status estimations to all clients whenever a job is finished. Otherwise Queue will send status at regular intervals set by this parameter as the number of seconds.
    client_position_to_load_data: DEPRECATED. This parameter is deprecated and has no effect.
    default_enabled: Deprecated and has no effect.
    api_open: If True, the REST routes of the backend will be open, allowing requests made directly to those endpoints to skip the queue.
    max_size: The maximum number of events the queue will store at any given moment. If the queue is full, new events will not be added and a user will receive a message saying that the queue is full. If None, the queue size will be unlimited.
Example: (Blocks)
    with gr.Blocks() as demo:
        button = gr.Button(label="Generate Image")
        button.click(fn=image_generator, inputs=gr.Textbox(), outputs=gr.Image())
    demo.queue(max_size=10)
    demo.launch()
Example: (Interface)
    demo = gr.Interface(image_generator, gr.Textbox(), gr.Image())
    demo.queue(max_size=20)
    demo.launch()

---
## validate_queue_settings
```python
from blocks import validate_queue_settings
```



---
## launch
```python
from blocks import launch
```

Launches a simple web server that serves the demo. Can also be used to create a
public link used by anyone to access the demo from their browser by setting share=True.

Parameters:
    inline: whether to display in the interface inline in an iframe. Defaults to True in python notebooks; False otherwise.
    inbrowser: whether to automatically launch the interface in a new tab on the default browser.
    share: whether to create a publicly shareable link for the interface. Creates an SSH tunnel to make your UI accessible from anywhere. If not provided, it is set to False by default every time, except when running in Google Colab. When localhost is not accessible (e.g. Google Colab), setting share=False is not supported.
    debug: if True, blocks the main thread from running. If running in Google Colab, this is needed to print the errors in the cell output.
    auth: If provided, username and password (or list of username-password tuples) required to access interface. Can also provide function that takes username and password and returns True if valid login.
    auth_message: If provided, HTML message provided on login page.
    prevent_thread_lock: If True, the interface will block the main thread while the server is running.
    show_error: If True, any errors in the interface will be displayed in an alert modal and printed in the browser console log
    server_port: will start gradio app on this port (if available). Can be set by environment variable GRADIO_SERVER_PORT. If None, will search for an available port starting at 7860.
    server_name: to make app accessible on local network, set this to "0.0.0.0". Can be set by environment variable GRADIO_SERVER_NAME. If None, will use "127.0.0.1".
    show_tips: if True, will occasionally show tips about new Gradio features
    enable_queue: DEPRECATED (use .queue() method instead.) if True, inference requests will be served through a queue instead of with parallel threads. Required for longer inference times (> 1min) to prevent timeout. The default option in HuggingFace Spaces is True. The default option elsewhere is False.
    max_threads: the maximum number of total threads that the Gradio app can generate in parallel. The default is inherited from the starlette library (currently 40). Applies whether the queue is enabled or not. But if queuing is enabled, this parameter is increaseed to be at least the concurrency_count of the queue.
    width: The width in pixels of the iframe element containing the interface (used if inline=True)
    height: The height in pixels of the iframe element containing the interface (used if inline=True)
    encrypt: DEPRECATED. Has no effect.
    favicon_path: If a path to a file (.png, .gif, or .ico) is provided, it will be used as the favicon for the web page.
    ssl_keyfile: If a path to a file is provided, will use this as the private key file to create a local server running on https.
    ssl_certfile: If a path to a file is provided, will use this as the signed certificate for https. Needs to be provided if ssl_keyfile is provided.
    ssl_keyfile_password: If a password is provided, will use this with the ssl certificate for https.
    ssl_verify: If False, skips certificate validation which allows self-signed certificates to be used.
    quiet: If True, suppresses most print statements.
    show_api: If True, shows the api docs in the footer of the app. Default True.
    file_directories: This parameter has been renamed to `allowed_paths`. It will be removed in a future version.
    allowed_paths: List of complete filepaths or parent directories that gradio is allowed to serve (in addition to the directory containing the gradio python file). Must be absolute paths. Warning: if you provide directories, any files in these directories or their subdirectories are accessible to all users of your app.
    blocked_paths: List of complete filepaths or parent directories that gradio is not allowed to serve (i.e. users of your app are not allowed to access). Must be absolute paths. Warning: takes precedence over `allowed_paths` and all other directories exposed by Gradio by default.
    root_path: The root path (or "mount point") of the application, if it's not served from the root ("/") of the domain. Often used when the application is behind a reverse proxy that forwards requests to the application. For example, if the application is served at "https://example.com/myapp", the `root_path` should be set to "/myapp". Can be set by environment variable GRADIO_ROOT_PATH. Defaults to "".
    app_kwargs: Additional keyword arguments to pass to the underlying FastAPI app as a dictionary of parameter keys and argument values. For example, `{"docs_url": "/docs"}`
    state_session_capacity: The maximum number of sessions whose information to store in memory. If the number of sessions exceeds this number, the oldest sessions will be removed. Reduce capacity to reduce memory usage when using gradio.State or returning updated components from functions. Defaults to 10000.
Returns:
    app: FastAPI app object that is running the demo
    local_url: Locally accessible link to the demo
    share_url: Publicly accessible link to the demo (if share=True, otherwise None)
Example: (Blocks)
    import gradio as gr
    def reverse(text):
        return text[::-1]
    with gr.Blocks() as demo:
        button = gr.Button(value="Reverse")
        button.click(reverse, gr.Textbox(), gr.Textbox())
    demo.launch(share=True, auth=("username", "password"))
Example:  (Interface)
    import gradio as gr
    def reverse(text):
        return text[::-1]
    demo = gr.Interface(reverse, "text", "text")
    demo.launch(share=True, auth=("username", "password"))

---
## integrate
```python
from blocks import integrate
```

A catch-all method for integrating with other libraries. This method should be run after launch()
Parameters:
    comet_ml: If a comet_ml Experiment object is provided, will integrate with the experiment and appear on Comet dashboard
    wandb: If the wandb module is provided, will integrate with it and appear on WandB dashboard
    mlflow: If the mlflow module  is provided, will integrate with the experiment and appear on ML Flow dashboard

---
## close
```python
from blocks import close
```

Closes the Interface that was launched and frees the port.

---
## block_thread
```python
from blocks import block_thread
```

Block main thread until interrupted by user.

---
## attach_load_events
```python
from blocks import attach_load_events
```

Add a load event for every component whose initial value should be randomized.

---
## startup_events
```python
from blocks import startup_events
```

Events that should be run when the app containing this block starts up.

---
## queue_enabled_for_fn
```python
from blocks import queue_enabled_for_fn
```



---
## get_block_instance
```python
from blocks import get_block_instance
```



---
## iterate_over_children
```python
from blocks import iterate_over_children
```



---
## get_layout
```python
from blocks import get_layout
```



---
## __name__
```python
from external import __name__
```

This module should not be used directly as its API is subject to change. Instead,
use the `gr.Blocks.load()` or `gr.load()` functions.

---
## load
```python
from external import load
```

Method that constructs a Blocks from a Hugging Face repo. Can accept
model repos (if src is "models") or Space repos (if src is "spaces"). The input
and output components are automatically loaded from the repo.
Parameters:
    name: the name of the model (e.g. "gpt2" or "facebook/bart-base") or space (e.g. "flax-community/spanish-gpt2"), can include the `src` as prefix (e.g. "models/facebook/bart-base")
    src: the source of the model: `models` or `spaces` (or leave empty if source is provided as a prefix in `name`)
    api_key: Deprecated. Please use the `hf_token` parameter instead.
    hf_token: optional access token for loading private Hugging Face Hub models or spaces. Find your token here: https://huggingface.co/settings/tokens.  Warning: only provide this if you are loading a trusted private Space as it can be read by the Space you are loading.
    alias: optional string used as the name of the loaded model instead of the default name (only applies if loading a Space running Gradio 2.x)
Returns:
    a Gradio Blocks object for the given model
Example:
    import gradio as gr
    demo = gr.load("gradio/question-answering", src="spaces")
    demo.launch()

---
## load_blocks_from_repo
```python
from external import load_blocks_from_repo
```

Creates and returns a Blocks instance from a Hugging Face model or Space repo.

---
## chatbot_preprocess
```python
from external import chatbot_preprocess
```



---
## chatbot_postprocess
```python
from external import chatbot_postprocess
```



---
## from_model
```python
from external import from_model
```



---
## from_spaces
```python
from external import from_spaces
```



---
## from_spaces_blocks
```python
from external import from_spaces_blocks
```



---
## from_spaces_interface
```python
from external import from_spaces_interface
```



---
## query_huggingface_api
```python
from external import query_huggingface_api
```



---
## fn
```python
from external import fn
```



---
## __name__
```python
from layouts import __name__
```



---
## Row
```python
from layouts import Row
```

Row is a layout element within Blocks that renders all children horizontally.
Example:
    with gr.Blocks() as demo:
        with gr.Row():
            gr.Image("lion.jpg", scale=2)
            gr.Image("tiger.jpg", scale=1)
    demo.launch()
Guides: controlling-layout

---
## Column
```python
from layouts import Column
```

Column is a layout element within Blocks that renders all children vertically. The widths of columns can be set through the `scale` and `min_width` parameters.
If a certain scale results in a column narrower than min_width, the min_width parameter will win.
Example:
    with gr.Blocks() as demo:
        with gr.Row():
            with gr.Column(scale=1):
                text1 = gr.Textbox()
                text2 = gr.Textbox()
            with gr.Column(scale=4):
                btn1 = gr.Button("Button 1")
                btn2 = gr.Button("Button 2")
Guides: controlling-layout

---
## Tabs
```python
from layouts import Tabs
```

Tabs is a layout element within Blocks that can contain multiple "Tab" Components.

---
## Tab
```python
from layouts import Tab
```

Tab (or its alias TabItem) is a layout element. Components defined within the Tab will be visible when this tab is selected tab.
Example:
    with gr.Blocks() as demo:
        with gr.Tab("Lion"):
            gr.Image("lion.jpg")
            gr.Button("New Lion")
        with gr.Tab("Tiger"):
            gr.Image("tiger.jpg")
            gr.Button("New Tiger")
Guides: controlling-layout

---
## Group
```python
from layouts import Group
```

Group is a layout element within Blocks which groups together children so that
they do not have any padding or margin between them.
Example:
    with gr.Group():
        gr.Textbox(label="First")
        gr.Textbox(label="Last")

---
## Box
```python
from layouts import Box
```

DEPRECATED.
Box is a a layout element which places children in a box with rounded corners and
some padding around them.
Example:
    with gr.Box():
        gr.Textbox(label="First")
        gr.Textbox(label="Last")

---
## Form
```python
from layouts import Form
```



---
## Accordion
```python
from layouts import Accordion
```

Accordion is a layout element which can be toggled to show/hide the contained content.
Example:
    with gr.Accordion("See Details"):
        gr.Markdown("lorem ipsum")

---
## __init__
```python
from layouts import __init__
```

Parameters:
label: name of accordion section.
open: if True, accordion is open by default.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional string or list of strings that are assigned as the class of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## update
```python
from layouts import update
```



---
## style
```python
from layouts import style
```



---
## get_expected_parent
```python
from layouts import get_expected_parent
```



---
## get_block_name
```python
from layouts import get_block_name
```



---
## add_child
```python
from layouts import add_child
```



---
## __name__
```python
from mix import __name__
```

Ways to transform interfaces to produce new interfaces

---
## Parallel
```python
from mix import Parallel
```

Creates a new Interface consisting of multiple Interfaces in parallel (comparing their outputs).
The Interfaces to put in Parallel must share the same input components (but can have different output components).

Demos: interface_parallel, interface_parallel_load
Guides: advanced-interface-features

---
## Series
```python
from mix import Series
```

Creates a new Interface from multiple Interfaces in series (the output of one is fed as the input to the next,
and so the input and output components must agree between the interfaces).

Demos: interface_series, interface_series_load
Guides: advanced-interface-features

---
## __init__
```python
from mix import __init__
```

Parameters:
    interfaces: any number of Interface objects that are to be connected in series
    options: additional kwargs that are passed into the new Interface object to customize it
Returns:
    an Interface object connecting the given models

---
## create_examples
```python
from helpers import create_examples
```

Top-level synchronous function that creates Examples. Provided for backwards compatibility, i.e. so that gr.Examples(...) can be used to create the Examples component.

---
## Examples
```python
from helpers import Examples
```

This class is a wrapper over the Dataset component and can be used to create Examples
for Blocks / Interfaces. Populates the Dataset component with examples and
assigns event listener so that clicking on an example populates the input/output
components. Optionally handles example caching for fast inference.

Demos: blocks_inputs, fake_gan
Guides: more-on-examples-and-flagging, using-hugging-face-integrations, image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, create-your-own-friends-with-a-gan

---
## merge_generated_values_into_output
```python
from helpers import merge_generated_values_into_output
```



---
## TrackedIterable
```python
from helpers import TrackedIterable
```



---
## Progress
```python
from helpers import Progress
```

The Progress class provides a custom progress tracker that is used in a function signature.
To attach a Progress tracker to a function, simply add a parameter right after the input parameters that has a default value set to a `gradio.Progress()` instance.
The Progress tracker can then be updated in the function by calling the Progress object or using the `tqdm` method on an Iterable.
The Progress tracker is currently only available with `queue()`.
Example:
    import gradio as gr
    import time
    def my_function(x, progress=gr.Progress()):
        progress(0, desc="Starting...")
        time.sleep(1)
        for i in progress.tqdm(range(100)):
            time.sleep(0.1)
        return x
    gr.Interface(my_function, gr.Textbox(), gr.Textbox()).queue().launch()
Demos: progress

---
## patch_tqdm
```python
from helpers import patch_tqdm
```



---
## create_tracker
```python
from helpers import create_tracker
```



---
## special_args
```python
from helpers import special_args
```

Checks if function has special arguments Request or EventData (via annotation) or Progress (via default value).
If inputs is provided, these values will be loaded into the inputs array.
Parameters:
    fn: function to check.
    inputs: array to load special arguments into.
    request: request to load into inputs.
    event_data: event-related data to load into inputs.
Returns:
    updated inputs, progress index, event data index.

---
## update
```python
from helpers import update
```

Increases latest iterable with specified number of steps.
Parameters:
    n: number of steps completed.

---
## skip
```python
from helpers import skip
```



---
## make_waveform
```python
from helpers import make_waveform
```

Generates a waveform video from an audio file. Useful for creating an easy to share audio visualization. The output should be passed into a `gr.Video` component.
Parameters:
    audio: Audio file path or tuple of (sample_rate, audio_data)
    bg_color: Background color of waveform (ignored if bg_image is provided)
    bg_image: Background image of waveform
    fg_alpha: Opacity of foreground waveform
    bars_color: Color of waveform bars. Can be a single color or a tuple of (start_color, end_color) of gradient
    bar_count: Number of bars in waveform
    bar_width: Width of bars in waveform. 1 represents full width, 0.5 represents half width, etc.
    animate: If true, the audio waveform overlay will be animated, if false, it will be static.
Returns:
    A filepath to the output video in mp4 format.

---
## EventData
```python
from helpers import EventData
```

When a subclass of EventData is added as a type hint to an argument of an event listener method, this object will be passed as that argument.
It contains information about the event that triggered the listener, such the target object, and other data related to the specific event that are attributes of the subclass.

Example:
    table = gr.Dataframe([[1, 2, 3], [4, 5, 6]])
    gallery = gr.Gallery([("cat.jpg", "Cat"), ("dog.jpg", "Dog")])
    textbox = gr.Textbox("Hello World!")

    statement = gr.Textbox()

    def on_select(evt: gr.SelectData):  # SelectData is a subclass of EventData
        return f"You selected {evt.value} at {evt.index} from {evt.target}"

    table.select(on_select, None, statement)
    gallery.select(on_select, None, statement)
    textbox.select(on_select, None, statement)
Demos: gallery_selections, tictactoe

---
## log_message
```python
from helpers import log_message
```



---
## Warning
```python
from helpers import Warning
```

This function allows you to pass custom warning messages to the user. You can do so simply by writing `gr.Warning('message here')` in your function, and when that line is executed the custom message will appear in a modal on the demo. The modal is yellow by default and has the heading: "Warning." Queue must be enabled for this behavior; otherwise, the warning will be printed to the console using the `warnings` library.
Demos: blocks_chained_events
Parameters:
    message: The warning message to be displayed to the user.
Example:
    import gradio as gr
    def hello_world():
        gr.Warning('This is a warning message.')
        return "hello world"
    with gr.Blocks() as demo:
        md = gr.Markdown()
        demo.load(hello_world, inputs=None, outputs=[md])
    demo.queue().launch()

---
## Info
```python
from helpers import Info
```

This function allows you to pass custom info messages to the user. You can do so simply by writing `gr.Info('message here')` in your function, and when that line is executed the custom message will appear in a modal on the demo. The modal is gray by default and has the heading: "Info." Queue must be enabled for this behavior; otherwise, the message will be printed to the console.
Demos: blocks_chained_events
Parameters:
    message: The info message to be displayed to the user.
Example:
    import gradio as gr
    def hello_world():
        gr.Info('This is some info.')
        return "hello world"
    with gr.Blocks() as demo:
        md = gr.Markdown()
        demo.load(hello_world, inputs=None, outputs=[md])
    demo.queue().launch()

---
## create
```python
from helpers import create
```

Caches the examples if self.cache_examples is True and creates the Dataset
component to hold the examples

---
## load_from_cache
```python
from helpers import load_from_cache
```

Loads a particular cached example for the interface.
Parameters:
    example_id: The id of the example to process (zero-indexed).

---
## __next__
```python
from helpers import __next__
```

Updates progress tracker with next item in iterable.

---
## tqdm
```python
from helpers import tqdm
```

Attaches progress tracker to iterable, like tqdm.
Parameters:
    iterable: iterable to attach progress tracker to.
    desc: description to display.
    total: estimated total number of steps.
    unit: unit of iterations.

---
## _progress_callback
```python
from helpers import _progress_callback
```



---
## init_tqdm
```python
from helpers import init_tqdm
```



---
## iter_tqdm
```python
from helpers import iter_tqdm
```



---
## update_tqdm
```python
from helpers import update_tqdm
```



---
## close_tqdm
```python
from helpers import close_tqdm
```



---
## exit_tqdm
```python
from helpers import exit_tqdm
```



---
## hex_to_rgb
```python
from helpers import hex_to_rgb
```



---
## get_color_gradient
```python
from helpers import get_color_gradient
```



---
## load_example
```python
from helpers import load_example
```



---
## _animate
```python
from helpers import _animate
```



---
## get_final_item
```python
from helpers import get_final_item
```



---
## __name__
```python
from pipelines import __name__
```

This module should not be used directly as its API is subject to change. Instead,
please use the `gr.Interface.from_pipeline()` function.

---
## load_from_pipeline
```python
from pipelines import load_from_pipeline
```

Gets the appropriate Interface kwargs for a given Hugging Face transformers.Pipeline.
pipeline (transformers.Pipeline): the transformers.Pipeline from which to create an interface
Returns:
(dict): a dictionary of kwargs that can be used to construct an Interface object

---
## fn
```python
from pipelines import fn
```



---
## __name__
```python
from data_classes import __name__
```



---
## PredictBody
```python
from data_classes import PredictBody
```



---
## ResetBody
```python
from data_classes import ResetBody
```



---
## ComponentServerBody
```python
from data_classes import ComponentServerBody
```



---
## InterfaceTypes
```python
from data_classes import InterfaceTypes
```



---
## Estimation
```python
from data_classes import Estimation
```



---
## ProgressUnit
```python
from data_classes import ProgressUnit
```



---
## Progress
```python
from data_classes import Progress
```



---
## LogMessage
```python
from data_classes import LogMessage
```



---
## __name__
```python
from strings import __name__
```



---
## get_updated_messaging
```python
from strings import get_updated_messaging
```



---
## __name__
```python
from oauth import __name__
```



---
## attach_oauth
```python
from oauth import attach_oauth
```



---
## _add_oauth_routes
```python
from oauth import _add_oauth_routes
```

Add OAuth routes to the FastAPI app (login, callback handler and logout).

---
## _add_mocked_oauth_routes
```python
from oauth import _add_mocked_oauth_routes
```

Add fake oauth routes if Gradio is run locally and OAuth is enabled.

Clicking on a gr.LoginButton will have the same behavior as in a Space (i.e. gets redirected in a new tab) but
instead of authenticating with HF, a mocked user profile is added to the session.

---
## OAuthProfile
```python
from oauth import OAuthProfile
```

A Gradio OAuthProfile object that can be used to inject the profile of a user in a
function. If a function expects `OAuthProfile` or `Optional[OAuthProfile]` as input,
the value will be injected from the FastAPI session if the user is logged in. If the
user is not logged in and the function expects `OAuthProfile`, an error will be
raised.

Example:
    import gradio as gr
    from typing import Optional


    def hello(profile: Optional[gr.OAuthProfile]) -> str:
        if profile is None:
            return "I don't know you."
        return f"Hello {profile.name}"


    with gr.Blocks() as demo:
        gr.LoginButton()
        gr.LogoutButton()
        gr.Markdown().attach_load_event(hello, None)

---
## __name__
```python
from routes import __name__
```

Implements a FastAPI server to run the gradio interface. Note that some types in this
module use the Optional/Union notation so that they work correctly with pydantic.

---
## ORJSONResponse
```python
from routes import ORJSONResponse
```



---
## toorjson
```python
from routes import toorjson
```



---
## App
```python
from routes import App
```

FastAPI App Wrapper

---
## safe_join
```python
from routes import safe_join
```

Safely path to a base directory to avoid escaping the base directory.
Borrowed from: werkzeug.security.safe_join

---
## get_types
```python
from routes import get_types
```



---
## mount_gradio_app
```python
from routes import mount_gradio_app
```

Mount a gradio.Blocks to an existing FastAPI application.

Parameters:
    app: The parent FastAPI application.
    blocks: The blocks object we want to mount to the parent app.
    path: The path at which the gradio application will be mounted.
    gradio_api_url: Deprecated and has no effect.
    app_kwargs: Additional keyword arguments to pass to the underlying FastAPI app as a dictionary of parameter keys and argument values. For example, `{"docs_url": "/docs"}`
Example:
    from fastapi import FastAPI
    import gradio as gr
    app = FastAPI()
    @app.get("/")
    def read_main():
        return {"message": "This is your main app"}
    io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
    app = gr.mount_gradio_app(app, io, path="/gradio")
    # Then run `uvicorn run:app` from the terminal and navigate to http://localhost:8000/gradio.

---
## _render
```python
from routes import _render
```



---
## render
```python
from routes import render
```



---
## _render_str
```python
from routes import _render_str
```



---
## __init__
```python
from routes import __init__
```



---
## configure_app
```python
from routes import configure_app
```



---
## get_blocks
```python
from routes import get_blocks
```



---
## build_proxy_request
```python
from routes import build_proxy_request
```



---
## _cancel_asyncio_tasks
```python
from routes import _cancel_asyncio_tasks
```



---
## create_app
```python
from routes import create_app
```



---
## get_current_user
```python
from routes import get_current_user
```



---
## login_check
```python
from routes import login_check
```



---
## get_token
```python
from routes import get_token
```



---
## app_id
```python
from routes import app_id
```



---
## login
```python
from routes import login
```



---
## main
```python
from routes import main
```



---
## api_info
```python
from routes import api_info
```



---
## get_config
```python
from routes import get_config
```



---
## static_resource
```python
from routes import static_resource
```



---
## build_resource
```python
from routes import build_resource
```



---
## component_server
```python
from routes import component_server
```



---
## theme_css
```python
from routes import theme_css
```



---
## robots_txt
```python
from routes import robots_txt
```



---
## stream_wrapper
```python
from routes import stream_wrapper
```



---
## __name__
```python
from outputs import __name__
```

This module defines various classes that can serve as the `output` to an interface. Each class must inherit from
`OutputComponent`, and each class must define a path to its template. All of the subclasses of `OutputComponent` are
automatically added to a registry, which allows them to be easily referenced in other parts of the code.

---
## warn_outputs_deprecation
```python
from outputs import warn_outputs_deprecation
```



---
## Textbox
```python
from outputs import Textbox
```



---
## Image
```python
from outputs import Image
```

Component displays an output image.
Output type: Union[numpy.array, PIL.Image, str, matplotlib.pyplot, Tuple[Union[numpy.array, PIL.Image, str], List[Tuple[str, float, float, float, float]]]]

---
## Video
```python
from outputs import Video
```

Used for video output.
Output type: filepath

---
## Audio
```python
from outputs import Audio
```

Creates an audio player that plays the output audio.
Output type: Union[Tuple[int, numpy.array], str]

---
## File
```python
from outputs import File
```

Used for file output.
Output type: Union[file-like, str]

---
## Dataframe
```python
from outputs import Dataframe
```

Component displays 2D output through a spreadsheet interface.
Output type: Union[pandas.DataFrame, numpy.array, List[Union[str, float]], List[List[Union[str, float]]]]

---
## Timeseries
```python
from outputs import Timeseries
```

Component accepts pandas.DataFrame.
Output type: pandas.DataFrame

---
## State
```python
from outputs import State
```

Special hidden component that stores state across runs of the interface.
Output type: Any

---
## Label
```python
from outputs import Label
```

Component outputs a classification label, along with confidence scores of top categories if provided. Confidence scores are represented as a dictionary mapping labels to scores between 0 and 1.
Output type: Union[Dict[str, float], str, int, float]

---
## KeyValues
```python
from outputs import KeyValues
```

Component displays a table representing values for multiple fields.
Output type: Union[Dict, List[Tuple[str, Union[str, int, float]]]]

---
## HighlightedText
```python
from outputs import HighlightedText
```

Component creates text that contains spans that are highlighted by category or numerical value.
Output is represent as a list of Tuple pairs, where the first element represents the span of text represented by the tuple, and the second element represents the category or value of the text.
Output type: List[Tuple[str, Union[float, str]]]

---
## JSON
```python
from outputs import JSON
```

Used for JSON output. Expects a JSON string or a Python object that is JSON serializable.
Output type: Union[str, Any]

---
## HTML
```python
from outputs import HTML
```

Used for HTML output. Expects an HTML valid string.
Output type: str

---
## Carousel
```python
from outputs import Carousel
```

Component displays a set of output components that can be scrolled through.

---
## Chatbot
```python
from outputs import Chatbot
```

Component displays a chatbot output showing both user submitted messages and responses
Output type: List[Tuple[str, str]]

---
## Image3D
```python
from outputs import Image3D
```

Used for 3D image model output.
Input type: File object of type (.obj, glb, or .gltf)

---
## __init__
```python
from outputs import __init__
```

Parameters:
label (str): component name in interface.
optional (bool): If True, the interface can be submitted with no uploaded image, in which case the input value is None.

---
## main
```python
from __init__ import main
```

Perform an in-process test run.

:param args:
    List of command line arguments. If `None` or not given, defaults to reading
    arguments directly from the process command line (:data:`sys.argv`).
:param plugins: List of plugin objects to be auto-registered during initialization.

:returns: An exit code.

---
## __name__
```python
from __pip-runner__ import __name__
```

Execute exactly this copy of pip, within a different environment.

This file is named as it is, to ensure that this module can't be imported via
an import statement.

---
## version_str
```python
from __pip-runner__ import version_str
```



---
## PipImportRedirectingFinder
```python
from __pip-runner__ import PipImportRedirectingFinder
```



---
## find_spec
```python
from __pip-runner__ import find_spec
```



---
## __name__
```python
from lists import __name__
```

babel.lists
~~~~~~~~~~~

Locale dependent formatting of lists.

The default locale for the functions in this module is determined by the
following environment variables, in that order:

 * ``LC_ALL``, and
 * ``LANG``

:copyright: (c) 2015-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## format_list
```python
from lists import format_list
```

Format the items in `lst` as a list.

>>> format_list(['apples', 'oranges', 'pears'], locale='en')
u'apples, oranges, and pears'
>>> format_list(['apples', 'oranges', 'pears'], locale='zh')
u'apples、oranges和pears'
>>> format_list(['omena', 'peruna', 'aplari'], style='or', locale='fi')
u'omena, peruna tai aplari'

Not all styles are necessarily available in all locales.
The function will attempt to fall back to replacement styles according to the rules
set forth in the CLDR root XML file, and raise a ValueError if no suitable replacement
can be found.

The following text is verbatim from the Unicode TR35-49 spec [1].

* standard:
  A typical 'and' list for arbitrary placeholders.
  eg. "January, February, and March"
* standard-short:
  A short version of an 'and' list, suitable for use with short or abbreviated placeholder values.
  eg. "Jan., Feb., and Mar."
* or:
  A typical 'or' list for arbitrary placeholders.
  eg. "January, February, or March"
* or-short:
  A short version of an 'or' list.
  eg. "Jan., Feb., or Mar."
* unit:
  A list suitable for wide units.
  eg. "3 feet, 7 inches"
* unit-short:
  A list suitable for short units
  eg. "3 ft, 7 in"
* unit-narrow:
  A list suitable for narrow units, where space on the screen is very limited.
  eg. "3′ 7″"

[1]: https://www.unicode.org/reports/tr35/tr35-49/tr35-general.html#ListPatterns

:param lst: a sequence of items to format in to a list
:param style: the style to format the list with. See above for description.
:param locale: the locale

---
## _resolve_list_style
```python
from lists import _resolve_list_style
```



---
## Format
```python
from support import Format
```

Wrapper class providing the various date and number formatting functions
bound to a specific locale and time-zone.

>>> from babel.util import UTC
>>> from datetime import date
>>> fmt = Format('en_US', UTC)
>>> fmt.date(date(2007, 4, 1))
u'Apr 1, 2007'
>>> fmt.decimal(1.2345)
u'1.234'

---
## LazyProxy
```python
from support import LazyProxy
```

Class for proxy objects that delegate to a specified function to evaluate
the actual object.

>>> def greeting(name='world'):
...     return 'Hello, %s!' % name
>>> lazy_greeting = LazyProxy(greeting, name='Joe')
>>> print(lazy_greeting)
Hello, Joe!
>>> u'  ' + lazy_greeting
u'  Hello, Joe!'
>>> u'(%s)' % lazy_greeting
u'(Hello, Joe!)'

This can be used, for example, to implement lazy translation functions that
delay the actual translation until the string is actually used. The
rationale for such behavior is that the locale of the user may not always
be available. In web applications, you only know the locale when processing
a request.

The proxy implementation attempts to be as complete as possible, so that
the lazy objects should mostly work as expected, for example for sorting:

>>> greetings = [
...     LazyProxy(greeting, 'world'),
...     LazyProxy(greeting, 'Joe'),
...     LazyProxy(greeting, 'universe'),
... ]
>>> greetings.sort()
>>> for greeting in greetings:
...     print(greeting)
Hello, Joe!
Hello, universe!
Hello, world!

---
## NullTranslations
```python
from support import NullTranslations
```



---
## Translations
```python
from support import Translations
```

An extended translation catalog class.

---
## _locales_to_names
```python
from support import _locales_to_names
```

Normalize a `locales` argument to a list of locale names.

:param locales: the list of locales in order of preference (items in
                this list can be either `Locale` objects or locale
                strings)

---
## __init__
```python
from support import __init__
```

Initialize the translations catalog.

:param fp: the file-like object the translation should be read from
:param domain: the message domain (default: 'messages')

---
## date
```python
from support import date
```

Return a date formatted according to the given pattern.

>>> from datetime import date
>>> fmt = Format('en_US')
>>> fmt.date(date(2007, 4, 1))
u'Apr 1, 2007'

---
## datetime
```python
from support import datetime
```

Return a date and time formatted according to the given pattern.

>>> from datetime import datetime
>>> from babel.dates import get_timezone
>>> fmt = Format('en_US', tzinfo=get_timezone('US/Eastern'))
>>> fmt.datetime(datetime(2007, 4, 1, 15, 30))
u'Apr 1, 2007, 11:30:00 AM'

---
## time
```python
from support import time
```

Return a time formatted according to the given pattern.

>>> from datetime import datetime
>>> from babel.dates import get_timezone
>>> fmt = Format('en_US', tzinfo=get_timezone('US/Eastern'))
>>> fmt.time(datetime(2007, 4, 1, 15, 30))
u'11:30:00 AM'

---
## timedelta
```python
from support import timedelta
```

Return a time delta according to the rules of the given locale.

>>> from datetime import timedelta
>>> fmt = Format('en_US')
>>> fmt.timedelta(timedelta(weeks=11))
u'3 months'

---
## number
```python
from support import number
```

Return an integer number formatted for the locale.

>>> fmt = Format('en_US')
>>> fmt.number(1099)
u'1,099'

---
## decimal
```python
from support import decimal
```

Return a decimal number formatted for the locale.

>>> fmt = Format('en_US')
>>> fmt.decimal(1.2345)
u'1.234'

---
## compact_decimal
```python
from support import compact_decimal
```

Return a number formatted in compact form for the locale.

>>> fmt = Format('en_US')
>>> fmt.compact_decimal(123456789)
u'123M'
>>> fmt.compact_decimal(1234567, format_type='long', fraction_digits=2)
'1.23 million'

---
## currency
```python
from support import currency
```

Return a number in the given currency formatted for the locale.
        

---
## compact_currency
```python
from support import compact_currency
```

Return a number in the given currency formatted for the locale
using the compact number format.

>>> Format('en_US').compact_currency(1234567, "USD", format_type='short', fraction_digits=2)
'$1.23M'

---
## percent
```python
from support import percent
```

Return a number formatted as percentage for the locale.

>>> fmt = Format('en_US')
>>> fmt.percent(0.34)
u'34%'

---
## scientific
```python
from support import scientific
```

Return a number formatted using scientific notation for the locale.
        

---
## value
```python
from support import value
```



---
## __contains__
```python
from support import __contains__
```



---
## __bool__
```python
from support import __bool__
```



---
## __dir__
```python
from support import __dir__
```



---
## __iter__
```python
from support import __iter__
```



---
## __len__
```python
from support import __len__
```



---
## __str__
```python
from support import __str__
```



---
## __add__
```python
from support import __add__
```



---
## __radd__
```python
from support import __radd__
```



---
## __mod__
```python
from support import __mod__
```



---
## __rmod__
```python
from support import __rmod__
```



---
## __mul__
```python
from support import __mul__
```



---
## __rmul__
```python
from support import __rmul__
```



---
## __call__
```python
from support import __call__
```



---
## __lt__
```python
from support import __lt__
```



---
## __le__
```python
from support import __le__
```



---
## __eq__
```python
from support import __eq__
```



---
## __ne__
```python
from support import __ne__
```



---
## __gt__
```python
from support import __gt__
```



---
## __ge__
```python
from support import __ge__
```



---
## __delattr__
```python
from support import __delattr__
```



---
## __getattr__
```python
from support import __getattr__
```



---
## __setattr__
```python
from support import __setattr__
```



---
## __delitem__
```python
from support import __delitem__
```



---
## __getitem__
```python
from support import __getitem__
```



---
## __setitem__
```python
from support import __setitem__
```



---
## __copy__
```python
from support import __copy__
```



---
## __deepcopy__
```python
from support import __deepcopy__
```



---
## dgettext
```python
from support import dgettext
```

Like ``gettext()``, but look the message up in the specified
domain.

---
## ldgettext
```python
from support import ldgettext
```

Like ``lgettext()``, but look the message up in the specified
domain.

---
## udgettext
```python
from support import udgettext
```

Like ``ugettext()``, but look the message up in the specified
domain.

---
## dngettext
```python
from support import dngettext
```

Like ``ngettext()``, but look the message up in the specified
domain.

---
## ldngettext
```python
from support import ldngettext
```

Like ``lngettext()``, but look the message up in the specified
domain.

---
## udngettext
```python
from support import udngettext
```

Like ``ungettext()`` but look the message up in the specified
domain.

---
## pgettext
```python
from support import pgettext
```

Look up the `context` and `message` id in the catalog and return the
corresponding message string, as an 8-bit string encoded with the
catalog's charset encoding, if known.  If there is no entry in the
catalog for the `message` id and `context` , and a fallback has been
set, the look up is forwarded to the fallback's ``pgettext()``
method. Otherwise, the `message` id is returned.

---
## lpgettext
```python
from support import lpgettext
```

Equivalent to ``pgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

---
## npgettext
```python
from support import npgettext
```

Do a plural-forms lookup of a message id.  `singular` is used as the
message id for purposes of lookup in the catalog, while `num` is used to
determine which plural form to use.  The returned message string is an
8-bit string encoded with the catalog's charset encoding, if known.

If the message id for `context` is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
``npgettext()`` method.  Otherwise, when ``num`` is 1 ``singular`` is
returned, and ``plural`` is returned in all other cases.

---
## lnpgettext
```python
from support import lnpgettext
```

Equivalent to ``npgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

---
## upgettext
```python
from support import upgettext
```

Look up the `context` and `message` id in the catalog and return the
corresponding message string, as a Unicode string.  If there is no entry
in the catalog for the `message` id and `context`, and a fallback has
been set, the look up is forwarded to the fallback's ``upgettext()``
method.  Otherwise, the `message` id is returned.

---
## unpgettext
```python
from support import unpgettext
```

Do a plural-forms lookup of a message id.  `singular` is used as the
message id for purposes of lookup in the catalog, while `num` is used to
determine which plural form to use.  The returned message string is a
Unicode string.

If the message id for `context` is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
``unpgettext()`` method.  Otherwise, when `num` is 1 `singular` is
returned, and `plural` is returned in all other cases.

---
## dpgettext
```python
from support import dpgettext
```

Like `pgettext()`, but look the message up in the specified
`domain`.

---
## udpgettext
```python
from support import udpgettext
```

Like `upgettext()`, but look the message up in the specified
`domain`.

---
## ldpgettext
```python
from support import ldpgettext
```

Equivalent to ``dpgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

---
## dnpgettext
```python
from support import dnpgettext
```

Like ``npgettext``, but look the message up in the specified
`domain`.

---
## udnpgettext
```python
from support import udnpgettext
```

Like ``unpgettext``, but look the message up in the specified
`domain`.

---
## ldnpgettext
```python
from support import ldnpgettext
```

Equivalent to ``dnpgettext()``, but the translation is returned in
the preferred system encoding, if no other encoding was explicitly set
with ``bind_textdomain_codeset()``.

---
## load
```python
from support import load
```

Load translations from the given directory.

:param dirname: the directory containing the ``MO`` files
:param locales: the list of locales in order of preference (items in
                this list can be either `Locale` objects or locale
                strings)
:param domain: the message domain (default: 'messages')

---
## __repr__
```python
from support import __repr__
```



---
## add
```python
from support import add
```

Add the given translations to the catalog.

If the domain of the translations is different than that of the
current catalog, they are added as a catalog that is only accessible
by the various ``d*gettext`` functions.

:param translations: the `Translations` instance with the messages to
                     add
:param merge: whether translations for message domains that have
              already been added should be merged with the existing
              translations

---
## merge
```python
from support import merge
```

Merge the given translations into the catalog.

Message translations in the specified catalog override any messages
with the same identifier in the existing catalog.

:param translations: the `Translations` instance with the messages to
                     merge

---
## __name__
```python
from units import __name__
```

The classes here provide support for using custom classes with
Matplotlib, e.g., those that do not expose the array interface but know
how to convert themselves to arrays.  It also supports classes with
units and units conversion.  Use cases include converters for custom
objects, e.g., a list of datetime objects, as well as for objects that
are unit aware.  We don't assume any particular units implementation;
rather a units implementation must register with the Registry converter
dictionary and provide a `ConversionInterface`.  For example,
here is a complete implementation which supports plotting with native
datetime objects::

    import matplotlib.units as units
    import matplotlib.dates as dates
    import matplotlib.ticker as ticker
    import datetime

    class DateConverter(units.ConversionInterface):

        @staticmethod
        def convert(value, unit, axis):
            "Convert a datetime value to a scalar or array."
            return dates.date2num(value)

        @staticmethod
        def axisinfo(unit, axis):
            "Return major and minor tick locators and formatters."
            if unit != 'date':
                return None
            majloc = dates.AutoDateLocator()
            majfmt = dates.AutoDateFormatter(majloc)
            return units.AxisInfo(majloc=majloc, majfmt=majfmt, label='date')

        @staticmethod
        def default_units(x, axis):
            "Return the default unit for x or None."
            return 'date'

    # Finally we register our object type with the Matplotlib units registry.
    units.registry[datetime.date] = DateConverter()

---
## UnknownUnitError
```python
from units import UnknownUnitError
```



---
## get_unit_name
```python
from units import get_unit_name
```

Get the display name for a measurement unit in the given locale.

>>> get_unit_name("radian", locale="en")
'radians'

Unknown units will raise exceptions:

>>> get_unit_name("battery", locale="fi")
Traceback (most recent call last):
    ...
UnknownUnitError: battery/long is not a known unit/length in fi

:param measurement_unit: the code of a measurement unit.
                         Known units can be found in the CLDR Unit Validity XML file:
                         https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml

:param length: "short", "long" or "narrow"
:param locale: the `Locale` object or locale identifier
:return: The unit display name, or None.

---
## _find_unit_pattern
```python
from units import _find_unit_pattern
```

Expand a unit into a qualified form.

Known units can be found in the CLDR Unit Validity XML file:
https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml

>>> _find_unit_pattern("radian", locale="en")
'angle-radian'

Unknown values will return None.

>>> _find_unit_pattern("horse", locale="en")

:param unit_id: the code of a measurement unit.
:return: A key to the `unit_patterns` mapping, or None.

---
## format_unit
```python
from units import format_unit
```

Format a value of a given unit.

Values are formatted according to the locale's usual pluralization rules
and number formats.

>>> format_unit(12, 'length-meter', locale='ro_RO')
u'12 metri'
>>> format_unit(15.5, 'length-mile', locale='fi_FI')
u'15,5 mailia'
>>> format_unit(1200, 'pressure-millimeter-ofhg', locale='nb')
u'1\xa0200 millimeter kvikks\xf8lv'
>>> format_unit(270, 'ton', locale='en')
u'270 tons'
>>> format_unit(1234.5, 'kilogram', locale='ar_EG', numbering_system='default')
u'1٬234٫5 كيلوغرام'

Number formats may be overridden with the ``format`` parameter.

>>> import decimal
>>> format_unit(decimal.Decimal("-42.774"), 'temperature-celsius', 'short', format='#.0', locale='fr')
u'-42,8\u202f\xb0C'

The locale's usual pluralization rules are respected.

>>> format_unit(1, 'length-meter', locale='ro_RO')
u'1 metru'
>>> format_unit(0, 'length-mile', locale='cy')
u'0 mi'
>>> format_unit(1, 'length-mile', locale='cy')
u'1 filltir'
>>> format_unit(3, 'length-mile', locale='cy')
u'3 milltir'

>>> format_unit(15, 'length-horse', locale='fi')
Traceback (most recent call last):
    ...
UnknownUnitError: length-horse is not a known unit in fi

.. versionadded:: 2.2.0

:param value: the value to format. If this is a string, no number formatting will be attempted.
:param measurement_unit: the code of a measurement unit.
                         Known units can be found in the CLDR Unit Validity XML file:
                         https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
:param length: "short", "long" or "narrow"
:param format: An optional format, as accepted by `format_decimal`.
:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## _find_compound_unit
```python
from units import _find_compound_unit
```

Find a predefined compound unit pattern.

Used internally by format_compound_unit.

>>> _find_compound_unit("kilometer", "hour", locale="en")
'speed-kilometer-per-hour'

>>> _find_compound_unit("mile", "gallon", locale="en")
'consumption-mile-per-gallon'

If no predefined compound pattern can be found, `None` is returned.

>>> _find_compound_unit("gallon", "mile", locale="en")

>>> _find_compound_unit("horse", "purple", locale="en")

:param numerator_unit: The numerator unit's identifier
:param denominator_unit: The denominator unit's identifier
:param locale: the `Locale` object or locale identifier
:return: A key to the `unit_patterns` mapping, or None.
:rtype: str|None

---
## format_compound_unit
```python
from units import format_compound_unit
```

Format a compound number value, i.e. "kilometers per hour" or similar.

Both unit specifiers are optional to allow for formatting of arbitrary values still according
to the locale's general "per" formatting specifier.

>>> format_compound_unit(7, denominator_value=11, length="short", locale="pt")
'7/11'

>>> format_compound_unit(150, "kilometer", denominator_unit="hour", locale="sv")
'150 kilometer per timme'

>>> format_compound_unit(150, "kilowatt", denominator_unit="year", locale="fi")
'150 kilowattia / vuosi'

>>> format_compound_unit(32.5, "ton", 15, denominator_unit="hour", locale="en")
'32.5 tons per 15 hours'

>>> format_compound_unit(1234.5, "ton", 15, denominator_unit="hour", locale="ar_EG", numbering_system="arab")
'1٬234٫5 طن لكل 15 ساعة'

>>> format_compound_unit(160, denominator_unit="square-meter", locale="fr")
'160 par m\xe8tre carr\xe9'

>>> format_compound_unit(4, "meter", "ratakisko", length="short", locale="fi")
'4 m/ratakisko'

>>> format_compound_unit(35, "minute", denominator_unit="nautical-mile", locale="sv")
'35 minuter per nautisk mil'

>>> from babel.numbers import format_currency
>>> format_compound_unit(format_currency(35, "JPY", locale="de"), denominator_unit="liter", locale="de")
'35\xa0\xa5 pro Liter'

See https://www.unicode.org/reports/tr35/tr35-general.html#perUnitPatterns

:param numerator_value: The numerator value. This may be a string,
                        in which case it is considered preformatted and the unit is ignored.
:param numerator_unit: The numerator unit. See `format_unit`.
:param denominator_value: The denominator value. This may be a string,
                          in which case it is considered preformatted and the unit is ignored.
:param denominator_unit: The denominator unit. See `format_unit`.
:param length: The formatting length. "short", "long" or "narrow"
:param format: An optional format, as accepted by `format_decimal`.
:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:return: A formatted compound value.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## __init__
```python
from units import __init__
```

Parameters
----------
majloc, minloc : Locator, optional
    Tick locators for the major and minor ticks.
majfmt, minfmt : Formatter, optional
    Tick formatters for the major and minor ticks.
label : str, optional
    The default axis label.
default_limits : optional
    The default min and max limits of the axis if no data has
    been plotted.

Notes
-----
If any of the above are ``None``, the axis will simply use the
default value.

---
## distinct
```python
from util import distinct
```

Yield all items in an iterable collection that are distinct.

Unlike when using sets for a similar effect, the original ordering of the
items in the collection is preserved by this function.

>>> print(list(distinct([1, 2, 1, 3, 4, 4])))
[1, 2, 3, 4]
>>> print(list(distinct('foobar')))
['f', 'o', 'b', 'a', 'r']

:param iterable: the iterable collection providing the data

---
## parse_encoding
```python
from util import parse_encoding
```

Deduce the encoding of a source file from magic comment.

It does this in the same way as the `Python interpreter`__

.. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations

The ``fp`` argument should be a seekable file object.

(From Jeff Dairiki)

---
## parse_future_flags
```python
from util import parse_future_flags
```

Parse the compiler flags by :mod:`__future__` from the given Python
code.

---
## pathmatch
```python
from util import pathmatch
```

Extended pathname pattern matching.

This function is similar to what is provided by the ``fnmatch`` module in
the Python standard library, but:

 * can match complete (relative or absolute) path names, and not just file
   names, and
 * also supports a convenience pattern ("**") to match files at any
   directory level.

Examples:

>>> pathmatch('**.py', 'bar.py')
True
>>> pathmatch('**.py', 'foo/bar/baz.py')
True
>>> pathmatch('**.py', 'templates/index.html')
False

>>> pathmatch('./foo/**.py', 'foo/bar/baz.py')
True
>>> pathmatch('./foo/**.py', 'bar/baz.py')
False

>>> pathmatch('^foo/**.py', 'foo/bar/baz.py')
True
>>> pathmatch('^foo/**.py', 'bar/baz.py')
False

>>> pathmatch('**/templates/*.html', 'templates/index.html')
True
>>> pathmatch('**/templates/*.html', 'templates/foo/bar.html')
False

:param pattern: the glob pattern
:param filename: the path name of the file to match against

---
## TextWrapper
```python
from util import TextWrapper
```



---
## wraptext
```python
from util import wraptext
```

Simple wrapper around the ``textwrap.wrap`` function in the standard
library. This version does not wrap lines on hyphens in words.

:param text: the text to wrap
:param width: the maximum line width
:param initial_indent: string that will be prepended to the first line of
                       wrapped output
:param subsequent_indent: string that will be prepended to all lines save
                          the first of wrapped output

---
## FixedOffsetTimezone
```python
from util import FixedOffsetTimezone
```

Fixed offset in minutes east from UTC.

---
## _cmp
```python
from util import _cmp
```



---
## __str__
```python
from util import __str__
```



---
## utcoffset
```python
from util import utcoffset
```



---
## tzname
```python
from util import tzname
```



---
## dst
```python
from util import dst
```



---
## _raise_no_data_error
```python
from core import _raise_no_data_error
```



---
## get_global
```python
from core import get_global
```

Return the dictionary for the given key in the global data.

The global data is stored in the ``babel/global.dat`` file and contains
information independent of individual locales.

>>> get_global('zone_aliases')['UTC']
u'Etc/UTC'
>>> get_global('zone_territories')['Europe/Berlin']
u'DE'

The keys available are:

- ``all_currencies``
- ``currency_fractions``
- ``language_aliases``
- ``likely_subtags``
- ``parent_exceptions``
- ``script_aliases``
- ``territory_aliases``
- ``territory_currencies``
- ``territory_languages``
- ``territory_zones``
- ``variant_aliases``
- ``windows_zone_mapping``
- ``zone_aliases``
- ``zone_territories``

.. note:: The internal structure of the data may change between versions.

.. versionadded:: 0.9

:param key: the data key

---
## UnknownLocaleError
```python
from core import UnknownLocaleError
```

Exception thrown when a locale is requested for which no locale data
is available.

---
## Locale
```python
from core import Locale
```

Locale schema wrapper.

Parameters
----------
number : dict, :class:`NumberLocale`
    Locale definition for formatting numbers.
time : dict, :class:`TimeLocale`
    Locale definition for formatting dates and times.

---
## default_locale
```python
from core import default_locale
```

Returns the system default locale for a given category, based on
environment variables.

>>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE']:
...     os.environ[name] = ''
>>> os.environ['LANG'] = 'fr_FR.UTF-8'
>>> default_locale('LC_MESSAGES')
'fr_FR'

The "C" or "POSIX" pseudo-locales are treated as aliases for the
"en_US_POSIX" locale:

>>> os.environ['LC_MESSAGES'] = 'POSIX'
>>> default_locale('LC_MESSAGES')
'en_US_POSIX'

The following fallbacks to the variable are always considered:

- ``LANGUAGE``
- ``LC_ALL``
- ``LC_CTYPE``
- ``LANG``

:param category: one of the ``LC_XXX`` environment variable names
:param aliases: a dictionary of aliases for locale identifiers

---
## negotiate_locale
```python
from core import negotiate_locale
```

Find the best match between available and requested locale strings.

>>> negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
'de_DE'
>>> negotiate_locale(['de_DE', 'en_US'], ['en', 'de'])
'de'

Case is ignored by the algorithm, the result uses the case of the preferred
locale identifier:

>>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
'de_DE'

>>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
'de_DE'

By default, some web browsers unfortunately do not include the territory
in the locale identifier for many locales, and some don't even allow the
user to easily add the territory. So while you may prefer using qualified
locale identifiers in your web-application, they would not normally match
the language-only locale sent by such browsers. To workaround that, this
function uses a default mapping of commonly used language-only locale
identifiers to identifiers including the territory:

>>> negotiate_locale(['ja', 'en_US'], ['ja_JP', 'en_US'])
'ja_JP'

Some browsers even use an incorrect or outdated language code, such as "no"
for Norwegian, where the correct locale identifier would actually be "nb_NO"
(Bokmål) or "nn_NO" (Nynorsk). The aliases are intended to take care of
such cases, too:

>>> negotiate_locale(['no', 'sv'], ['nb_NO', 'sv_SE'])
'nb_NO'

You can override this default mapping by passing a different `aliases`
dictionary to this function, or you can bypass the behavior althogher by
setting the `aliases` parameter to `None`.

:param preferred: the list of locale strings preferred by the user
:param available: the list of locale strings available
:param sep: character that separates the different parts of the locale
            strings
:param aliases: a dictionary of aliases for locale identifiers

---
## parse_locale
```python
from core import parse_locale
```

Parse a locale identifier into a tuple of the form ``(language,
territory, script, variant, modifier)``.

>>> parse_locale('zh_CN')
('zh', 'CN', None, None)
>>> parse_locale('zh_Hans_CN')
('zh', 'CN', 'Hans', None)
>>> parse_locale('ca_es_valencia')
('ca', 'ES', None, 'VALENCIA')
>>> parse_locale('en_150')
('en', '150', None, None)
>>> parse_locale('en_us_posix')
('en', 'US', None, 'POSIX')
>>> parse_locale('it_IT@euro')
('it', 'IT', None, None, 'euro')
>>> parse_locale('it_IT@custom')
('it', 'IT', None, None, 'custom')
>>> parse_locale('it_IT@')
('it', 'IT', None, None)

The default component separator is "_", but a different separator can be
specified using the `sep` parameter.

The optional modifier is always separated with "@" and at the end:

>>> parse_locale('zh-CN', sep='-')
('zh', 'CN', None, None)
>>> parse_locale('zh-CN@custom', sep='-')
('zh', 'CN', None, None, 'custom')

If the identifier cannot be parsed into a locale, a `ValueError` exception
is raised:

>>> parse_locale('not_a_LOCALE_String')
Traceback (most recent call last):
  ...
ValueError: 'not_a_LOCALE_String' is not a valid locale identifier

Encoding information is removed from the identifier, while modifiers are
kept:

>>> parse_locale('en_US.UTF-8')
('en', 'US', None, None)
>>> parse_locale('de_DE.iso885915@euro')
('de', 'DE', None, None, 'euro')

See :rfc:`4646` for more information.

:param identifier: the locale identifier string
:param sep: character that separates the different components of the locale
            identifier
:raise `ValueError`: if the string does not appear to be a valid locale
                     identifier

---
## get_locale_identifier
```python
from core import get_locale_identifier
```

The reverse of :func:`parse_locale`.  It creates a locale identifier out
of a ``(language, territory, script, variant, modifier)`` tuple.  Items can be set to
``None`` and trailing ``None``\s can also be left out of the tuple.

>>> get_locale_identifier(('de', 'DE', None, '1999', 'custom'))
'de_DE_1999@custom'
>>> get_locale_identifier(('fi', None, None, None, 'custom'))
'fi@custom'


.. versionadded:: 1.0

:param tup: the tuple as returned by :func:`parse_locale`.
:param sep: the separator for the identifier.

---
## default
```python
from core import default
```

Return the system default locale for the specified category.

>>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
...     os.environ[name] = ''
>>> os.environ['LANG'] = 'fr_FR.UTF-8'
>>> Locale.default('LC_MESSAGES')
Locale('fr', territory='FR')

The following fallbacks to the variable are always considered:

- ``LANGUAGE``
- ``LC_ALL``
- ``LC_CTYPE``
- ``LANG``

:param category: one of the ``LC_XXX`` environment variable names
:param aliases: a dictionary of aliases for locale identifiers

---
## negotiate
```python
from core import negotiate
```

Find the best match between available and requested locale strings.

>>> Locale.negotiate(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
Locale('de', territory='DE')
>>> Locale.negotiate(['de_DE', 'en_US'], ['en', 'de'])
Locale('de')
>>> Locale.negotiate(['de_DE', 'de'], ['en_US'])

You can specify the character used in the locale identifiers to separate
the different components. This separator is applied to both lists. Also,
case is ignored in the comparison:

>>> Locale.negotiate(['de-DE', 'de'], ['en-us', 'de-de'], sep='-')
Locale('de', territory='DE')

:param preferred: the list of locale identifiers preferred by the user
:param available: the list of locale identifiers available
:param aliases: a dictionary of aliases for locale identifiers

---
## parse
```python
from core import parse
```

Create a `Locale` instance for the given locale identifier.

>>> l = Locale.parse('de-DE', sep='-')
>>> l.display_name
u'Deutsch (Deutschland)'

If the `identifier` parameter is not a string, but actually a `Locale`
object, that object is returned:

>>> Locale.parse(l)
Locale('de', territory='DE')

If the `identifier` parameter is neither of these, such as `None`
e.g. because a default locale identifier could not be determined,
a `TypeError` is raised:

>>> Locale.parse(None)
Traceback (most recent call last):
    ...
TypeError: ...

This also can perform resolving of likely subtags which it does
by default.  This is for instance useful to figure out the most
likely locale for a territory you can use ``'und'`` as the
language tag:

>>> Locale.parse('und_AT')
Locale('de', territory='AT')

Modifiers are optional, and always at the end, separated by "@":

>>> Locale.parse('de_AT@euro')
Locale('de', territory='AT', modifier='euro')

:param identifier: the locale identifier string
:param sep: optional component separator
:param resolve_likely_subtags: if this is specified then a locale will
                               have its likely subtag resolved if the
                               locale otherwise does not exist.  For
                               instance ``zh_TW`` by itself is not a
                               locale that exists but Babel can
                               automatically expand it to the full
                               form of ``zh_hant_TW``.  Note that this
                               expansion is only taking place if no
                               locale exists otherwise.  For instance
                               there is a locale ``en`` that can exist
                               by itself.
:raise `ValueError`: if the string does not appear to be a valid locale
                     identifier
:raise `UnknownLocaleError`: if no locale data is available for the
                             requested locale
:raise `TypeError`: if the identifier is not a string or a `Locale`

---
## __ne__
```python
from core import __ne__
```

Check whether other does not equal self elementwise.

When either of the elements is masked, the result is masked as well,
but the underlying boolean data are still set, with self and other
considered equal if both are masked, and unequal otherwise.

For structured arrays, all fields are combined, with masked values
ignored. The result is masked if all fields were masked, with self
and other considered equal only if both were fully masked.

---
## _data
```python
from core import _data
```



---
## get_display_name
```python
from core import get_display_name
```

Return the display name of the locale using the given locale.

The display name will include the language, territory, script, and
variant, if those are specified.

>>> Locale('zh', 'CN', script='Hans').get_display_name('en')
u'Chinese (Simplified, China)'

Modifiers are currently passed through verbatim:

>>> Locale('it', 'IT', modifier='euro').get_display_name('en')
u'Italian (Italy, euro)'

:param locale: the locale to use

---
## get_language_name
```python
from core import get_language_name
```

Return the language of this locale in the given locale.

>>> Locale('zh', 'CN', script='Hans').get_language_name('de')
u'Chinesisch'

.. versionadded:: 1.0

:param locale: the locale to use

---
## get_territory_name
```python
from core import get_territory_name
```

Return the territory name in the given locale.

---
## get_script_name
```python
from core import get_script_name
```

Return the script name in the given locale.

---
## english_name
```python
from core import english_name
```

The english display name of the locale.

>>> Locale('de').english_name
u'German'
>>> Locale('de', 'DE').english_name
u'German (Germany)'

:type: `unicode`

---
## languages
```python
from core import languages
```

Mapping of language codes to translated language names.

>>> Locale('de', 'DE').languages['ja']
u'Japanisch'

See `ISO 639 <http://www.loc.gov/standards/iso639-2/>`_ for
more information.

---
## scripts
```python
from core import scripts
```

Mapping of script codes to translated script names.

>>> Locale('en', 'US').scripts['Hira']
u'Hiragana'

See `ISO 15924 <http://www.evertype.com/standards/iso15924/>`_
for more information.

---
## territories
```python
from core import territories
```

Mapping of script codes to translated script names.

>>> Locale('es', 'CO').territories['DE']
u'Alemania'

See `ISO 3166 <http://www.iso.org/iso/en/prods-services/iso3166ma/>`_
for more information.

---
## variants
```python
from core import variants
```

Mapping of script codes to translated script names.

>>> Locale('de', 'DE').variants['1901']
u'Alte deutsche Rechtschreibung'

---
## currencies
```python
from core import currencies
```

Mapping of currency codes to translated currency names.  This
only returns the generic form of the currency name, not the count
specific one.  If an actual number is requested use the
:func:`babel.numbers.get_currency_name` function.

>>> Locale('en').currencies['COP']
u'Colombian Peso'
>>> Locale('de', 'DE').currencies['COP']
u'Kolumbianischer Peso'

---
## currency_symbols
```python
from core import currency_symbols
```

Mapping of currency codes to symbols.

>>> Locale('en', 'US').currency_symbols['USD']
u'$'
>>> Locale('es', 'CO').currency_symbols['USD']
u'US$'

---
## number_symbols
```python
from core import number_symbols
```

Symbols used in number formatting by number system.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('fr', 'FR').number_symbols["latn"]['decimal']
u','
>>> Locale('fa', 'IR').number_symbols["arabext"]['decimal']
u'٫'
>>> Locale('fa', 'IR').number_symbols["latn"]['decimal']
u'.'

---
## other_numbering_systems
```python
from core import other_numbering_systems
```

Mapping of other numbering systems available for the locale.
See: https://www.unicode.org/reports/tr35/tr35-numbers.html#otherNumberingSystems

>>> Locale('el', 'GR').other_numbering_systems['traditional']
u'grek'

.. note:: The format of the value returned may change between
          Babel versions.

---
## default_numbering_system
```python
from core import default_numbering_system
```

The default numbering system used by the locale.
>>> Locale('el', 'GR').default_numbering_system
u'latn'

---
## decimal_formats
```python
from core import decimal_formats
```

Locale patterns for decimal number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').decimal_formats[None]
<NumberPattern u'#,##0.###'>

---
## compact_decimal_formats
```python
from core import compact_decimal_formats
```

Locale patterns for compact decimal number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').compact_decimal_formats["short"]["one"]["1000"]
<NumberPattern u'0K'>

---
## currency_formats
```python
from core import currency_formats
```

Locale patterns for currency number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').currency_formats['standard']
<NumberPattern u'\xa4#,##0.00'>
>>> Locale('en', 'US').currency_formats['accounting']
<NumberPattern u'\xa4#,##0.00;(\xa4#,##0.00)'>

---
## compact_currency_formats
```python
from core import compact_currency_formats
```

Locale patterns for compact currency number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').compact_currency_formats["short"]["one"]["1000"]
<NumberPattern u'¤0K'>

---
## percent_formats
```python
from core import percent_formats
```

Locale patterns for percent number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').percent_formats[None]
<NumberPattern u'#,##0%'>

---
## scientific_formats
```python
from core import scientific_formats
```

Locale patterns for scientific number formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').scientific_formats[None]
<NumberPattern u'#E0'>

---
## periods
```python
from core import periods
```

Locale display names for day periods (AM/PM).

>>> Locale('en', 'US').periods['am']
u'AM'

---
## day_periods
```python
from core import day_periods
```

Locale display names for various day periods (not necessarily only AM/PM).

These are not meant to be used without the relevant `day_period_rules`.

---
## day_period_rules
```python
from core import day_period_rules
```

Day period rules for the locale.  Used by `get_period_id`.
        

---
## days
```python
from core import days
```

Locale display names for weekdays.

>>> Locale('de', 'DE').days['format']['wide'][3]
u'Donnerstag'

---
## months
```python
from core import months
```

Locale display names for months.

>>> Locale('de', 'DE').months['format']['wide'][10]
u'Oktober'

---
## quarters
```python
from core import quarters
```

Locale display names for quarters.

>>> Locale('de', 'DE').quarters['format']['wide'][1]
u'1. Quartal'

---
## eras
```python
from core import eras
```

Locale display names for eras.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').eras['wide'][1]
u'Anno Domini'
>>> Locale('en', 'US').eras['abbreviated'][0]
u'BC'

---
## time_zones
```python
from core import time_zones
```

Locale display names for time zones.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').time_zones['Europe/London']['long']['daylight']
u'British Summer Time'
>>> Locale('en', 'US').time_zones['America/St_Johns']['city']
u'St. John’s'

---
## meta_zones
```python
from core import meta_zones
```

Locale display names for meta time zones.

Meta time zones are basically groups of different Olson time zones that
have the same GMT offset and daylight savings time.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').meta_zones['Europe_Central']['long']['daylight']
u'Central European Summer Time'

.. versionadded:: 0.9

---
## zone_formats
```python
from core import zone_formats
```

Patterns related to the formatting of time zones.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').zone_formats['fallback']
u'%(1)s (%(0)s)'
>>> Locale('pt', 'BR').zone_formats['region']
u'Hor\xe1rio %s'

.. versionadded:: 0.9

---
## first_week_day
```python
from core import first_week_day
```

The first day of a week, with 0 being Monday.

>>> Locale('de', 'DE').first_week_day
0
>>> Locale('en', 'US').first_week_day
6

---
## weekend_start
```python
from core import weekend_start
```

The day the weekend starts, with 0 being Monday.

>>> Locale('de', 'DE').weekend_start
5

---
## weekend_end
```python
from core import weekend_end
```

The day the weekend ends, with 0 being Monday.

>>> Locale('de', 'DE').weekend_end
6

---
## min_week_days
```python
from core import min_week_days
```

The minimum number of days in a week so that the week is counted as
the first week of a year or month.

>>> Locale('de', 'DE').min_week_days
4

---
## date_formats
```python
from core import date_formats
```

Locale patterns for date formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').date_formats['short']
<DateTimePattern u'M/d/yy'>
>>> Locale('fr', 'FR').date_formats['long']
<DateTimePattern u'd MMMM y'>

---
## time_formats
```python
from core import time_formats
```

Locale patterns for time formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en', 'US').time_formats['short']
<DateTimePattern u'h:mm a'>
>>> Locale('fr', 'FR').time_formats['long']
<DateTimePattern u'HH:mm:ss z'>

---
## datetime_formats
```python
from core import datetime_formats
```

Locale patterns for datetime formatting.

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en').datetime_formats['full']
u'{1}, {0}'
>>> Locale('th').datetime_formats['medium']
u'{1} {0}'

---
## datetime_skeletons
```python
from core import datetime_skeletons
```

Locale patterns for formatting parts of a datetime.

>>> Locale('en').datetime_skeletons['MEd']
<DateTimePattern u'E, M/d'>
>>> Locale('fr').datetime_skeletons['MEd']
<DateTimePattern u'E dd/MM'>
>>> Locale('fr').datetime_skeletons['H']
<DateTimePattern u"HH 'h'">

---
## interval_formats
```python
from core import interval_formats
```

Locale patterns for interval formatting.

.. note:: The format of the value returned may change between
          Babel versions.

How to format date intervals in Finnish when the day is the
smallest changing component:

>>> Locale('fi_FI').interval_formats['MEd']['d']
[u'E d. – ', u'E d.M.']

.. seealso::

   The primary API to use this data is :py:func:`babel.dates.format_interval`.


:rtype: dict[str, dict[str, list[str]]]

---
## plural_form
```python
from core import plural_form
```

Plural rules for the locale.

>>> Locale('en').plural_form(1)
'one'
>>> Locale('en').plural_form(0)
'other'
>>> Locale('fr').plural_form(0)
'one'
>>> Locale('ru').plural_form(100)
'many'

---
## list_patterns
```python
from core import list_patterns
```

Patterns for generating lists

.. note:: The format of the value returned may change between
          Babel versions.

>>> Locale('en').list_patterns['standard']['start']
u'{0}, {1}'
>>> Locale('en').list_patterns['standard']['end']
u'{0}, and {1}'
>>> Locale('en_GB').list_patterns['standard']['end']
u'{0} and {1}'

---
## ordinal_form
```python
from core import ordinal_form
```

Plural rules for the locale.

>>> Locale('en').ordinal_form(1)
'one'
>>> Locale('en').ordinal_form(2)
'two'
>>> Locale('en').ordinal_form(3)
'few'
>>> Locale('fr').ordinal_form(2)
'other'
>>> Locale('ru').ordinal_form(100)
'other'

---
## measurement_systems
```python
from core import measurement_systems
```

Localized names for various measurement systems.

>>> Locale('fr', 'FR').measurement_systems['US']
u'am\xe9ricain'
>>> Locale('en', 'US').measurement_systems['US']
u'US'

---
## character_order
```python
from core import character_order
```

The text direction for the language.

>>> Locale('de', 'DE').character_order
'left-to-right'
>>> Locale('ar', 'SA').character_order
'right-to-left'

---
## text_direction
```python
from core import text_direction
```

The text direction for the language in CSS short-hand form.

>>> Locale('de', 'DE').text_direction
'ltr'
>>> Locale('ar', 'SA').text_direction
'rtl'

---
## unit_display_names
```python
from core import unit_display_names
```

Display names for units of measurement.

.. seealso::

   You may want to use :py:func:`babel.units.get_unit_name` instead.

.. note:: The format of the value returned may change between
          Babel versions.

---
## _try_load
```python
from core import _try_load
```



---
## _try_load_reducing
```python
from core import _try_load_reducing
```



---
## __name__
```python
from numbers import __name__
```

babel.numbers
~~~~~~~~~~~~~

Locale dependent formatting and parsing of numeric data.

The default locale for the functions in this module is determined by the
following environment variables, in that order:

 * ``LC_NUMERIC``,
 * ``LC_ALL``, and
 * ``LANG``

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## UnknownCurrencyError
```python
from numbers import UnknownCurrencyError
```

Exception thrown when a currency is requested for which no data is available.
    

---
## list_currencies
```python
from numbers import list_currencies
```

Return a `set` of normalized currency codes.

.. versionadded:: 2.5.0

:param locale: filters returned currency codes by the provided locale.
               Expected to be a locale instance or code. If no locale is
               provided, returns the list of all currencies from all
               locales.

---
## validate_currency
```python
from numbers import validate_currency
```

Check the currency code is recognized by Babel.

Accepts a ``locale`` parameter for fined-grained validation, working as
the one defined above in ``list_currencies()`` method.

Raises a `UnknownCurrencyError` exception if the currency is unknown to Babel.

---
## is_currency
```python
from numbers import is_currency
```

Returns `True` only if a currency is recognized by Babel.

This method always return a Boolean and never raise.

---
## normalize_currency
```python
from numbers import normalize_currency
```

Returns the normalized identifier of any currency code.

Accepts a ``locale`` parameter for fined-grained validation, working as
the one defined above in ``list_currencies()`` method.

Returns None if the currency is unknown to Babel.

---
## get_currency_name
```python
from numbers import get_currency_name
```

Return the name used by the locale for the specified currency.

>>> get_currency_name('USD', locale='en_US')
u'US Dollar'

.. versionadded:: 0.9.4

:param currency: the currency code.
:param count: the optional count.  If provided the currency name
              will be pluralized to that number if possible.
:param locale: the `Locale` object or locale identifier.

---
## get_currency_symbol
```python
from numbers import get_currency_symbol
```

Return the symbol used by the locale for the specified currency.

>>> get_currency_symbol('USD', locale='en_US')
u'$'

:param currency: the currency code.
:param locale: the `Locale` object or locale identifier.

---
## get_currency_precision
```python
from numbers import get_currency_precision
```

Return currency's precision.

Precision is the number of decimals found after the decimal point in the
currency's format pattern.

.. versionadded:: 2.5.0

:param currency: the currency code.

---
## get_currency_unit_pattern
```python
from numbers import get_currency_unit_pattern
```

Return the unit pattern used for long display of a currency value
for a given locale.
This is a string containing ``{0}`` where the numeric part
should be substituted and ``{1}`` where the currency long display
name should be substituted.

>>> get_currency_unit_pattern('USD', locale='en_US', count=10)
u'{0} {1}'

.. versionadded:: 2.7.0

:param currency: the currency code.
:param count: the optional count.  If provided the unit
              pattern for that number will be returned.
:param locale: the `Locale` object or locale identifier.

---
## get_territory_currencies
```python
from numbers import get_territory_currencies
```

Returns the list of currencies for the given territory that are valid for
the given date range.  In addition to that the currency database
distinguishes between tender and non-tender currencies.  By default only
tender currencies are returned.

The return value is a list of all currencies roughly ordered by the time
of when the currency became active.  The longer the currency is being in
use the more to the left of the list it will be.

The start date defaults to today.  If no end date is given it will be the
same as the start date.  Otherwise a range can be defined.  For instance
this can be used to find the currencies in use in Austria between 1995 and
2011:

>>> from datetime import date
>>> get_territory_currencies('AT', date(1995, 1, 1), date(2011, 1, 1))
['ATS', 'EUR']

Likewise it's also possible to find all the currencies in use on a
single date:

>>> get_territory_currencies('AT', date(1995, 1, 1))
['ATS']
>>> get_territory_currencies('AT', date(2011, 1, 1))
['EUR']

By default the return value only includes tender currencies.  This
however can be changed:

>>> get_territory_currencies('US')
['USD']
>>> get_territory_currencies('US', tender=False, non_tender=True,
...                          start_date=date(2014, 1, 1))
['USN', 'USS']

.. versionadded:: 2.0

:param territory: the name of the territory to find the currency for.
:param start_date: the start date.  If not given today is assumed.
:param end_date: the end date.  If not given the start date is assumed.
:param tender: controls whether tender currencies should be included.
:param non_tender: controls whether non-tender currencies should be
                   included.
:param include_details: if set to `True`, instead of returning currency
                        codes the return value will be dictionaries
                        with detail information.  In that case each
                        dictionary will have the keys ``'currency'``,
                        ``'from'``, ``'to'``, and ``'tender'``.

---
## _get_numbering_system
```python
from numbers import _get_numbering_system
```



---
## _get_number_symbols
```python
from numbers import _get_number_symbols
```



---
## UnsupportedNumberingSystemError
```python
from numbers import UnsupportedNumberingSystemError
```

Exception thrown when an unsupported numbering system is requested for the given Locale.

---
## get_decimal_symbol
```python
from numbers import get_decimal_symbol
```

Return the symbol used by the locale to separate decimal fractions.

>>> get_decimal_symbol('en_US')
u'.'
>>> get_decimal_symbol('ar_EG', numbering_system='default')
u'٫'
>>> get_decimal_symbol('ar_EG', numbering_system='latn')
u'.'

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## get_plus_sign_symbol
```python
from numbers import get_plus_sign_symbol
```

Return the plus sign symbol used by the current locale.

>>> get_plus_sign_symbol('en_US')
u'+'
>>> get_plus_sign_symbol('ar_EG', numbering_system='default')
u'؜+'
>>> get_plus_sign_symbol('ar_EG', numbering_system='latn')
u'‎+'

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## get_minus_sign_symbol
```python
from numbers import get_minus_sign_symbol
```

Return the plus sign symbol used by the current locale.

>>> get_minus_sign_symbol('en_US')
u'-'
>>> get_minus_sign_symbol('ar_EG', numbering_system='default')
u'؜-'
>>> get_minus_sign_symbol('ar_EG', numbering_system='latn')
u'‎-'

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## get_exponential_symbol
```python
from numbers import get_exponential_symbol
```

Return the symbol used by the locale to separate mantissa and exponent.

>>> get_exponential_symbol('en_US')
u'E'
>>> get_exponential_symbol('ar_EG', numbering_system='default')
u'أس'
>>> get_exponential_symbol('ar_EG', numbering_system='latn')
u'E'

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## get_group_symbol
```python
from numbers import get_group_symbol
```

Return the symbol used by the locale to separate groups of thousands.

>>> get_group_symbol('en_US')
u','
>>> get_group_symbol('ar_EG', numbering_system='default')
u'٬'
>>> get_group_symbol('ar_EG', numbering_system='latn')
u','

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## get_infinity_symbol
```python
from numbers import get_infinity_symbol
```

Return the symbol used by the locale to represent infinity.

>>> get_infinity_symbol('en_US')
u'∞'
>>> get_infinity_symbol('ar_EG', numbering_system='default')
u'∞'
>>> get_infinity_symbol('ar_EG', numbering_system='latn')
u'∞'

:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for fetching the symbol. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## format_number
```python
from numbers import format_number
```

Return the given number formatted for a specific locale.

>>> format_number(1099, locale='en_US')  # doctest: +SKIP
u'1,099'
>>> format_number(1099, locale='de_DE')  # doctest: +SKIP
u'1.099'

.. deprecated:: 2.6.0

   Use babel.numbers.format_decimal() instead.

:param number: the number to format
:param locale: the `Locale` object or locale identifier

---
## get_decimal_precision
```python
from numbers import get_decimal_precision
```

Return maximum precision of a decimal instance's fractional part.

Precision is extracted from the fractional part only.

---
## get_decimal_quantum
```python
from numbers import get_decimal_quantum
```

Return minimal quantum of a number, as defined by precision.

---
## format_decimal
```python
from numbers import format_decimal
```

Return the given decimal number formatted for a specific locale.

>>> format_decimal(1.2345, locale='en_US')
u'1.234'
>>> format_decimal(1.2346, locale='en_US')
u'1.235'
>>> format_decimal(-1.2346, locale='en_US')
u'-1.235'
>>> format_decimal(1.2345, locale='sv_SE')
u'1,234'
>>> format_decimal(1.2345, locale='de')
u'1,234'
>>> format_decimal(1.2345, locale='ar_EG', numbering_system='default')
u'1٫234'
>>> format_decimal(1.2345, locale='ar_EG', numbering_system='latn')
u'1.234'

The appropriate thousands grouping and the decimal separator are used for
each locale:

>>> format_decimal(12345.5, locale='en_US')
u'12,345.5'

By default the locale is allowed to truncate and round a high-precision
number by forcing its format pattern onto the decimal part. You can bypass
this behavior with the `decimal_quantization` parameter:

>>> format_decimal(1.2346, locale='en_US')
u'1.235'
>>> format_decimal(1.2346, locale='en_US', decimal_quantization=False)
u'1.2346'
>>> format_decimal(12345.67, locale='fr_CA', group_separator=False)
u'12345,67'
>>> format_decimal(12345.67, locale='en_US', group_separator=True)
u'12,345.67'

:param number: the number to format
:param format:
:param locale: the `Locale` object or locale identifier
:param decimal_quantization: Truncate and round high-precision numbers to
                             the format pattern. Defaults to `True`.
:param group_separator: Boolean to switch group separator on/off in a locale's
                        number format.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## format_compact_decimal
```python
from numbers import format_compact_decimal
```

Return the given decimal number formatted for a specific locale in compact form.

>>> format_compact_decimal(12345, format_type="short", locale='en_US')
u'12K'
>>> format_compact_decimal(12345, format_type="long", locale='en_US')
u'12 thousand'
>>> format_compact_decimal(12345, format_type="short", locale='en_US', fraction_digits=2)
u'12.34K'
>>> format_compact_decimal(1234567, format_type="short", locale="ja_JP")
u'123万'
>>> format_compact_decimal(2345678, format_type="long", locale="mk")
u'2 милиони'
>>> format_compact_decimal(21000000, format_type="long", locale="mk")
u'21 милион'
>>> format_compact_decimal(12345, format_type="short", locale='ar_EG', fraction_digits=2, numbering_system='default')
u'12٫34 ألف'

:param number: the number to format
:param format_type: Compact format to use ("short" or "long")
:param locale: the `Locale` object or locale identifier
:param fraction_digits: Number of digits after the decimal point to use. Defaults to `0`.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## _get_compact_format
```python
from numbers import _get_compact_format
```

Returns the number after dividing by the unit and the format pattern to use.
The algorithm is described here:
https://www.unicode.org/reports/tr35/tr35-45/tr35-numbers.html#Compact_Number_Formats.

---
## UnknownCurrencyFormatError
```python
from numbers import UnknownCurrencyFormatError
```

Exception raised when an unknown currency format is requested.

---
## format_currency
```python
from numbers import format_currency
```

Return formatted currency value.

>>> format_currency(1099.98, 'USD', locale='en_US')
'$1,099.98'
>>> format_currency(1099.98, 'USD', locale='es_CO')
u'US$1.099,98'
>>> format_currency(1099.98, 'EUR', locale='de_DE')
u'1.099,98\xa0\u20ac'
>>> format_currency(1099.98, 'EGP', locale='ar_EG', numbering_system='default')
u'‏1٬099٫98 ج.م.‏'

The format can also be specified explicitly.  The currency is
placed with the '¤' sign.  As the sign gets repeated the format
expands (¤ being the symbol, ¤¤ is the currency abbreviation and
¤¤¤ is the full name of the currency):

>>> format_currency(1099.98, 'EUR', u'¤¤ #,##0.00', locale='en_US')
u'EUR 1,099.98'
>>> format_currency(1099.98, 'EUR', u'#,##0.00 ¤¤¤', locale='en_US')
u'1,099.98 euros'

Currencies usually have a specific number of decimal digits. This function
favours that information over the given format:

>>> format_currency(1099.98, 'JPY', locale='en_US')
u'\xa51,100'
>>> format_currency(1099.98, 'COP', u'#,##0.00', locale='es_ES')
u'1.099,98'

However, the number of decimal digits can be overridden from the currency
information, by setting the last parameter to ``False``:

>>> format_currency(1099.98, 'JPY', locale='en_US', currency_digits=False)
u'\xa51,099.98'
>>> format_currency(1099.98, 'COP', u'#,##0.00', locale='es_ES', currency_digits=False)
u'1.099,98'

If a format is not specified the type of currency format to use
from the locale can be specified:

>>> format_currency(1099.98, 'EUR', locale='en_US', format_type='standard')
u'\u20ac1,099.98'

When the given currency format type is not available, an exception is
raised:

>>> format_currency('1099.98', 'EUR', locale='root', format_type='unknown')
Traceback (most recent call last):
    ...
UnknownCurrencyFormatError: "'unknown' is not a known currency format type"

>>> format_currency(101299.98, 'USD', locale='en_US', group_separator=False)
u'$101299.98'

>>> format_currency(101299.98, 'USD', locale='en_US', group_separator=True)
u'$101,299.98'

You can also pass format_type='name' to use long display names. The order of
the number and currency name, along with the correct localized plural form
of the currency name, is chosen according to locale:

>>> format_currency(1, 'USD', locale='en_US', format_type='name')
u'1.00 US dollar'
>>> format_currency(1099.98, 'USD', locale='en_US', format_type='name')
u'1,099.98 US dollars'
>>> format_currency(1099.98, 'USD', locale='ee', format_type='name')
u'us ga dollar 1,099.98'

By default the locale is allowed to truncate and round a high-precision
number by forcing its format pattern onto the decimal part. You can bypass
this behavior with the `decimal_quantization` parameter:

>>> format_currency(1099.9876, 'USD', locale='en_US')
u'$1,099.99'
>>> format_currency(1099.9876, 'USD', locale='en_US', decimal_quantization=False)
u'$1,099.9876'

:param number: the number to format
:param currency: the currency code
:param format: the format string to use
:param locale: the `Locale` object or locale identifier
:param currency_digits: use the currency's natural number of decimal digits
:param format_type: the currency format type to use
:param decimal_quantization: Truncate and round high-precision numbers to
                             the format pattern. Defaults to `True`.
:param group_separator: Boolean to switch group separator on/off in a locale's
                        number format.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## _format_currency_long_name
```python
from numbers import _format_currency_long_name
```



---
## format_compact_currency
```python
from numbers import format_compact_currency
```

Format a number as a currency value in compact form.

>>> format_compact_currency(12345, 'USD', locale='en_US')
u'$12K'
>>> format_compact_currency(123456789, 'USD', locale='en_US', fraction_digits=2)
u'$123.46M'
>>> format_compact_currency(123456789, 'EUR', locale='de_DE', fraction_digits=1)
'123,5 Mio. €'

:param number: the number to format
:param currency: the currency code
:param format_type: the compact format type to use. Defaults to "short".
:param locale: the `Locale` object or locale identifier
:param fraction_digits: Number of digits after the decimal point to use. Defaults to `0`.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## format_percent
```python
from numbers import format_percent
```

Return formatted percent value for a specific locale.

>>> format_percent(0.34, locale='en_US')
u'34%'
>>> format_percent(25.1234, locale='en_US')
u'2,512%'
>>> format_percent(25.1234, locale='sv_SE')
u'2\xa0512\xa0%'
>>> format_percent(25.1234, locale='ar_EG', numbering_system='default')
u'2٬512%'

The format pattern can also be specified explicitly:

>>> format_percent(25.1234, u'#,##0‰', locale='en_US')
u'25,123‰'

By default the locale is allowed to truncate and round a high-precision
number by forcing its format pattern onto the decimal part. You can bypass
this behavior with the `decimal_quantization` parameter:

>>> format_percent(23.9876, locale='en_US')
u'2,399%'
>>> format_percent(23.9876, locale='en_US', decimal_quantization=False)
u'2,398.76%'

>>> format_percent(229291.1234, locale='pt_BR', group_separator=False)
u'22929112%'

>>> format_percent(229291.1234, locale='pt_BR', group_separator=True)
u'22.929.112%'

:param number: the percent number to format
:param format:
:param locale: the `Locale` object or locale identifier
:param decimal_quantization: Truncate and round high-precision numbers to
                             the format pattern. Defaults to `True`.
:param group_separator: Boolean to switch group separator on/off in a locale's
                        number format.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## format_scientific
```python
from numbers import format_scientific
```

Return value formatted in scientific notation for a specific locale.

>>> format_scientific(10000, locale='en_US')
u'1E4'
>>> format_scientific(10000, locale='ar_EG', numbering_system='default')
u'1أس4'

The format pattern can also be specified explicitly:

>>> format_scientific(1234567, u'##0.##E00', locale='en_US')
u'1.23E06'

By default the locale is allowed to truncate and round a high-precision
number by forcing its format pattern onto the decimal part. You can bypass
this behavior with the `decimal_quantization` parameter:

>>> format_scientific(1234.9876, u'#.##E0', locale='en_US')
u'1.23E3'
>>> format_scientific(1234.9876, u'#.##E0', locale='en_US', decimal_quantization=False)
u'1.2349876E3'

:param number: the number to format
:param format:
:param locale: the `Locale` object or locale identifier
:param decimal_quantization: Truncate and round high-precision numbers to
                             the format pattern. Defaults to `True`.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise `UnsupportedNumberingSystemError`: If the numbering system is not supported by the locale.

---
## NumberFormatError
```python
from numbers import NumberFormatError
```

Exception raised when a string cannot be parsed into a number.

---
## parse_number
```python
from numbers import parse_number
```

Parse localized number string into an integer.

>>> parse_number('1,099', locale='en_US')
1099
>>> parse_number('1.099', locale='de_DE')
1099

When the given string cannot be parsed, an exception is raised:

>>> parse_number('1.099,98', locale='de')
Traceback (most recent call last):
    ...
NumberFormatError: '1.099,98' is not a valid number

:param string: the string to parse
:param locale: the `Locale` object or locale identifier
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:return: the parsed number
:raise `NumberFormatError`: if the string can not be converted to a number
:raise `UnsupportedNumberingSystemError`: if the numbering system is not supported by the locale.

---
## parse_decimal
```python
from numbers import parse_decimal
```

Parse localized decimal string into a decimal.

>>> parse_decimal('1,099.98', locale='en_US')
Decimal('1099.98')
>>> parse_decimal('1.099,98', locale='de')
Decimal('1099.98')
>>> parse_decimal('12 345,123', locale='ru')
Decimal('12345.123')
>>> parse_decimal('1٬099٫98', locale='ar_EG', numbering_system='default')
Decimal('1099.98')

When the given string cannot be parsed, an exception is raised:

>>> parse_decimal('2,109,998', locale='de')
Traceback (most recent call last):
    ...
NumberFormatError: '2,109,998' is not a valid decimal number

If `strict` is set to `True` and the given string contains a number
formatted in an irregular way, an exception is raised:

>>> parse_decimal('30.00', locale='de', strict=True)
Traceback (most recent call last):
    ...
NumberFormatError: '30.00' is not a properly formatted decimal number. Did you mean '3.000'? Or maybe '30,00'?

>>> parse_decimal('0.00', locale='de', strict=True)
Traceback (most recent call last):
    ...
NumberFormatError: '0.00' is not a properly formatted decimal number. Did you mean '0'?

:param string: the string to parse
:param locale: the `Locale` object or locale identifier
:param strict: controls whether numbers formatted in a weird way are
               accepted or rejected
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:raise NumberFormatError: if the string can not be converted to a
                          decimal number
:raise UnsupportedNumberingSystemError: if the numbering system is not supported by the locale.

---
## _remove_trailing_zeros_after_decimal
```python
from numbers import _remove_trailing_zeros_after_decimal
```

Remove trailing zeros from the decimal part of a numeric string.

This function takes a string representing a numeric value and a decimal symbol.
It removes any trailing zeros that appear after the decimal symbol in the number.
If the decimal part becomes empty after removing trailing zeros, the decimal symbol
is also removed. If the string does not contain the decimal symbol, it is returned unchanged.

:param string: The numeric string from which to remove trailing zeros.
:type string: str
:param decimal_symbol: The symbol used to denote the decimal point.
:type decimal_symbol: str
:return: The numeric string with trailing zeros removed from its decimal part.
:rtype: str

Example:
>>> _remove_trailing_zeros_after_decimal("123.4500", ".")
'123.45'
>>> _remove_trailing_zeros_after_decimal("100.000", ".")
'100'
>>> _remove_trailing_zeros_after_decimal("100", ".")
'100'

---
## parse_grouping
```python
from numbers import parse_grouping
```

Parse primary and secondary digit grouping

>>> parse_grouping('##')
(1000, 1000)
>>> parse_grouping('#,###')
(3, 3)
>>> parse_grouping('#,####,###')
(3, 4)

---
## parse_pattern
```python
from numbers import parse_pattern
```

Parse number format patterns

---
## NumberPattern
```python
from numbers import NumberPattern
```



---
## __init__
```python
from numbers import __init__
```



---
## _is_active
```python
from numbers import _is_active
```



---
## _match_number
```python
from numbers import _match_number
```



---
## parse_precision
```python
from numbers import parse_precision
```

Calculate the min and max allowed digits

---
## __repr__
```python
from numbers import __repr__
```



---
## compute_scale
```python
from numbers import compute_scale
```

Return the scaling factor to apply to the number before rendering.

Auto-set to a factor of 2 or 3 if presence of a ``%`` or ``‰`` sign is
detected in the prefix or suffix of the pattern. Default is to not mess
with the scale at all and keep it to 0.

---
## scientific_notation_elements
```python
from numbers import scientific_notation_elements
```

Returns normalized scientific notation components of a value.
        

---
## apply
```python
from numbers import apply
```

Renders into a string a number following the defined pattern.

Forced decimal quantization is active by default so we'll produce a
number string that is strictly following CLDR pattern definitions.

:param value: The value to format. If this is not a Decimal object,
              it will be cast to one.
:type value: decimal.Decimal|float|int
:param locale: The locale to use for formatting.
:type locale: str|babel.core.Locale
:param currency: Which currency, if any, to format as.
:type currency: str|None
:param currency_digits: Whether or not to use the currency's precision.
                        If false, the pattern's precision is used.
:type currency_digits: bool
:param decimal_quantization: Whether decimal numbers should be forcibly
                             quantized to produce a formatted output
                             strictly matching the CLDR definition for
                             the locale.
:type decimal_quantization: bool
:param force_frac: DEPRECATED - a forced override for `self.frac_prec`
                   for a single formatting invocation.
:param numbering_system: The numbering system used for formatting number symbols. Defaults to "latn".
                         The special value "default" will use the default numbering system of the locale.
:return: Formatted decimal string.
:rtype: str
:raise UnsupportedNumberingSystemError: If the numbering system is not supported by the locale.

---
## _format_significant
```python
from numbers import _format_significant
```



---
## _format_int
```python
from numbers import _format_int
```



---
## _quantize_value
```python
from numbers import _quantize_value
```



---
## _format_frac
```python
from numbers import _format_frac
```



---
## __name__
```python
from plural import __name__
```

babel.numbers
~~~~~~~~~~~~~

CLDR Plural support.  See UTS #35.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## extract_operands
```python
from plural import extract_operands
```

Extract operands from a decimal, a float or an int, according to `CLDR rules`_.

The result is an 8-tuple (n, i, v, w, f, t, c, e), where those symbols are as follows:

====== ===============================================================
Symbol Value
------ ---------------------------------------------------------------
n      absolute value of the source number (integer and decimals).
i      integer digits of n.
v      number of visible fraction digits in n, with trailing zeros.
w      number of visible fraction digits in n, without trailing zeros.
f      visible fractional digits in n, with trailing zeros.
t      visible fractional digits in n, without trailing zeros.
c      compact decimal exponent value: exponent of the power of 10 used in compact decimal formatting.
e      currently, synonym for ‘c’. however, may be redefined in the future.
====== ===============================================================

.. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-61/tr35-numbers.html#Operands

:param source: A real number
:type source: int|float|decimal.Decimal
:return: A n-i-v-w-f-t-c-e tuple
:rtype: tuple[decimal.Decimal, int, int, int, int, int, int, int]

---
## PluralRule
```python
from plural import PluralRule
```

Represents a set of language pluralization rules.  The constructor
accepts a list of (tag, expr) tuples or a dict of `CLDR rules`_. The
resulting object is callable and accepts one parameter with a positive or
negative number (both integer and float) for the number that indicates the
plural form for a string and returns the tag for the format:

>>> rule = PluralRule({'one': 'n is 1'})
>>> rule(1)
'one'
>>> rule(2)
'other'

Currently the CLDR defines these tags: zero, one, two, few, many and
other where other is an implicit default.  Rules should be mutually
exclusive; for a given numeric value, only one rule should apply (i.e.
the condition should only be true for one of the plural rule elements.

.. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules

---
## to_javascript
```python
from plural import to_javascript
```

Convert a list/dict of rules or a `PluralRule` object into a JavaScript
function.  This function depends on no external library:

>>> to_javascript({'one': 'n is 1'})
"(function(n) { return (n == 1) ? 'one' : 'other'; })"

Implementation detail: The function generated will probably evaluate
expressions involved into range operations multiple times.  This has the
advantage that external helper functions are not required and is not a
big performance hit for these simple calculations.

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed

---
## to_python
```python
from plural import to_python
```

Convert a list/dict of rules or a `PluralRule` object into a regular
Python function.  This is useful in situations where you need a real
function and don't are about the actual rule object:

>>> func = to_python({'one': 'n is 1', 'few': 'n in 2..4'})
>>> func(1)
'one'
>>> func(3)
'few'
>>> func = to_python({'one': 'n in 1,11', 'few': 'n in 3..10,13..19'})
>>> func(11)
'one'
>>> func(15)
'few'

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed

---
## to_gettext
```python
from plural import to_gettext
```

The plural rule as gettext expression.  The gettext expression is
technically limited to integers and returns indices rather than tags.

>>> to_gettext({'one': 'n is 1', 'two': 'n is 2'})
'nplurals=3; plural=((n == 1) ? 0 : (n == 2) ? 1 : 2);'

:param rule: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed

---
## in_range_list
```python
from plural import in_range_list
```

Integer range list test.  This is the callback for the "in" operator
of the UTS #35 pluralization rule language:

>>> in_range_list(1, [(1, 3)])
True
>>> in_range_list(3, [(1, 3)])
True
>>> in_range_list(3, [(1, 3), (5, 8)])
True
>>> in_range_list(1.2, [(1, 4)])
False
>>> in_range_list(10, [(1, 4)])
False
>>> in_range_list(10, [(1, 4), (6, 8)])
False

---
## within_range_list
```python
from plural import within_range_list
```

Float range test.  This is the callback for the "within" operator
of the UTS #35 pluralization rule language:

>>> within_range_list(1, [(1, 3)])
True
>>> within_range_list(1.0, [(1, 3)])
True
>>> within_range_list(1.2, [(1, 4)])
True
>>> within_range_list(8.8, [(1, 4), (7, 15)])
True
>>> within_range_list(10, [(1, 4)])
False
>>> within_range_list(10.5, [(1, 4), (20, 30)])
False

---
## cldr_modulo
```python
from plural import cldr_modulo
```

Javaish modulo.  This modulo operator returns the value with the sign
of the dividend rather than the divisor like Python does:

>>> cldr_modulo(-3, 5)
-3
>>> cldr_modulo(-3, -5)
-3
>>> cldr_modulo(3, 5)
3

---
## RuleError
```python
from plural import RuleError
```

Raised if a rule is malformed.

---
## tokenize_rule
```python
from plural import tokenize_rule
```



---
## test_next_token
```python
from plural import test_next_token
```



---
## skip_token
```python
from plural import skip_token
```



---
## value_node
```python
from plural import value_node
```



---
## ident_node
```python
from plural import ident_node
```



---
## range_list_node
```python
from plural import range_list_node
```



---
## negate
```python
from plural import negate
```



---
## _Parser
```python
from plural import _Parser
```

Internal parser.  This class can translate a single rule into an abstract
tree of tuples. It implements the following grammar::

    condition     = and_condition ('or' and_condition)*
                    ('@integer' samples)?
                    ('@decimal' samples)?
    and_condition = relation ('and' relation)*
    relation      = is_relation | in_relation | within_relation
    is_relation   = expr 'is' ('not')? value
    in_relation   = expr (('not')? 'in' | '=' | '!=') range_list
    within_relation = expr ('not')? 'within' range_list
    expr          = operand (('mod' | '%') value)?
    operand       = 'n' | 'i' | 'f' | 't' | 'v' | 'w'
    range_list    = (range | value) (',' range_list)*
    value         = digit+
    digit         = 0|1|2|3|4|5|6|7|8|9
    range         = value'..'value
    samples       = sampleRange (',' sampleRange)* (',' ('…'|'...'))?
    sampleRange   = decimalValue '~' decimalValue
    decimalValue  = value ('.' value)?

- Whitespace can occur between or around any of the above tokens.
- Rules should be mutually exclusive; for a given numeric value, only one
  rule should apply (i.e. the condition should only be true for one of
  the plural rule elements).
- The in and within relations can take comma-separated lists, such as:
  'n in 3,5,7..15'.
- Samples are ignored.

The translator parses the expression on instantiation into an attribute
called `ast`.

---
## _binary_compiler
```python
from plural import _binary_compiler
```

Compiler factory for the `_Compiler`.

---
## _unary_compiler
```python
from plural import _unary_compiler
```

Compiler factory for the `_Compiler`.

---
## _Compiler
```python
from plural import _Compiler
```

The compilers are able to transform the expressions into multiple
output formats.

---
## _PythonCompiler
```python
from plural import _PythonCompiler
```

Compiles an expression to Python.

---
## _GettextCompiler
```python
from plural import _GettextCompiler
```

Compile into a gettext plural expression.

---
## _JavaScriptCompiler
```python
from plural import _JavaScriptCompiler
```

Compiles the expression to plain of JavaScript.

---
## _UnicodeCompiler
```python
from plural import _UnicodeCompiler
```

Returns a unicode pluralization rule again.

---
## __init__
```python
from plural import __init__
```



---
## __repr__
```python
from plural import __repr__
```



---
## parse
```python
from plural import parse
```

Create a `PluralRule` instance for the given rules.  If the rules
are a `PluralRule` object, that object is returned.

:param rules: the rules as list or dict, or a `PluralRule` object
:raise RuleError: if the expression is malformed

---
## rules
```python
from plural import rules
```

The `PluralRule` as a dict of unicode plural rules.

>>> rule = PluralRule({'one': 'n is 1'})
>>> rule.rules
{'one': 'n is 1'}

---
## tags
```python
from plural import tags
```

A set of explicitly defined tags in this rule.  The implicit default
``'other'`` rules is not part of this set unless there is an explicit
rule for it.

---
## __getstate__
```python
from plural import __getstate__
```



---
## __setstate__
```python
from plural import __setstate__
```



---
## __call__
```python
from plural import __call__
```



---
## expect
```python
from plural import expect
```



---
## condition
```python
from plural import condition
```



---
## and_condition
```python
from plural import and_condition
```



---
## relation
```python
from plural import relation
```



---
## newfangled_relation
```python
from plural import newfangled_relation
```



---
## range_or_value
```python
from plural import range_or_value
```



---
## range_list
```python
from plural import range_list
```



---
## expr
```python
from plural import expr
```



---
## value
```python
from plural import value
```



---
## compile
```python
from plural import compile
```



---
## compile_relation
```python
from plural import compile_relation
```



---
## compile_not
```python
from plural import compile_not
```



---
## __name__
```python
from dates import __name__
```

config for datetime formatting

---
## _localize
```python
from dates import _localize
```



---
## _get_dt_and_tzinfo
```python
from dates import _get_dt_and_tzinfo
```

Parse a `dt_or_tzinfo` value into a datetime and a tzinfo.

See the docs for this function's callers for semantics.

:rtype: tuple[datetime, tzinfo]

---
## _get_tz_name
```python
from dates import _get_tz_name
```

Get the timezone name out of a time, datetime, or tzinfo object.

:rtype: str

---
## _get_datetime
```python
from dates import _get_datetime
```

Get a datetime out of an "instant" (date, time, datetime, number).

.. warning:: The return values of this function may depend on the system clock.

If the instant is None, the current moment is used.
If the instant is a time, it's augmented with today's date.

Dates are converted to naive datetimes with midnight as the time component.

>>> from datetime import date, datetime
>>> _get_datetime(date(2015, 1, 1))
datetime.datetime(2015, 1, 1, 0, 0)

UNIX timestamps are converted to datetimes.

>>> _get_datetime(1400000000)
datetime.datetime(2014, 5, 13, 16, 53, 20)

Other values are passed through as-is.

>>> x = datetime(2015, 1, 1)
>>> _get_datetime(x) is x
True

:param instant: date, time, datetime, integer, float or None
:type instant: date|time|datetime|int|float|None
:return: a datetime
:rtype: datetime

---
## _ensure_datetime_tzinfo
```python
from dates import _ensure_datetime_tzinfo
```

Ensure the datetime passed has an attached tzinfo.

If the datetime is tz-naive to begin with, UTC is attached.

If a tzinfo is passed in, the datetime is normalized to that timezone.

>>> from datetime import datetime
>>> _get_tz_name(_ensure_datetime_tzinfo(datetime(2015, 1, 1)))
'UTC'

>>> tz = get_timezone("Europe/Stockholm")
>>> _ensure_datetime_tzinfo(datetime(2015, 1, 1, 13, 15, tzinfo=UTC), tzinfo=tz).hour
14

:param datetime: Datetime to augment.
:param tzinfo: optional tzinfo
:return: datetime with tzinfo
:rtype: datetime

---
## _get_time
```python
from dates import _get_time
```

Get a timezoned time from a given instant.

.. warning:: The return values of this function may depend on the system clock.

:param time: time, datetime or None
:rtype: time

---
## get_timezone
```python
from dates import get_timezone
```

Looks up a timezone by name and returns it.  The timezone object
returned comes from ``pytz`` or ``zoneinfo``, whichever is available.
It corresponds to the `tzinfo` interface and can be used with all of
the functions of Babel that operate with dates.

If a timezone is not known a :exc:`LookupError` is raised.  If `zone`
is ``None`` a local zone object is returned.

:param zone: the name of the timezone to look up.  If a timezone object
             itself is passed in, it's returned unchanged.

---
## get_period_names
```python
from dates import get_period_names
```

Return the names for day periods (AM/PM) used by the locale.

>>> get_period_names(locale='en_US')['am']
u'AM'

:param width: the width to use, one of "abbreviated", "narrow", or "wide"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string

---
## get_day_names
```python
from dates import get_day_names
```

Return the day names used by the locale for the specified format.

>>> get_day_names('wide', locale='en_US')[1]
u'Tuesday'
>>> get_day_names('short', locale='en_US')[1]
u'Tu'
>>> get_day_names('abbreviated', locale='es')[1]
u'mar'
>>> get_day_names('narrow', context='stand-alone', locale='de_DE')[1]
u'D'

:param width: the width to use, one of "wide", "abbreviated", "short" or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string

---
## get_month_names
```python
from dates import get_month_names
```

Return the month names used by the locale for the specified format.

>>> get_month_names('wide', locale='en_US')[1]
u'January'
>>> get_month_names('abbreviated', locale='es')[1]
u'ene'
>>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1]
u'J'

:param width: the width to use, one of "wide", "abbreviated", or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string

---
## get_quarter_names
```python
from dates import get_quarter_names
```

Return the quarter names used by the locale for the specified format.

>>> get_quarter_names('wide', locale='en_US')[1]
u'1st quarter'
>>> get_quarter_names('abbreviated', locale='de_DE')[1]
u'Q1'
>>> get_quarter_names('narrow', locale='de_DE')[1]
u'1'

:param width: the width to use, one of "wide", "abbreviated", or "narrow"
:param context: the context, either "format" or "stand-alone"
:param locale: the `Locale` object, or a locale string

---
## get_era_names
```python
from dates import get_era_names
```

Return the era names used by the locale for the specified format.

>>> get_era_names('wide', locale='en_US')[1]
u'Anno Domini'
>>> get_era_names('abbreviated', locale='de_DE')[1]
u'n. Chr.'

:param width: the width to use, either "wide", "abbreviated", or "narrow"
:param locale: the `Locale` object, or a locale string

---
## get_date_format
```python
from dates import get_date_format
```

Return the date formatting patterns used by the locale for the specified
format.

>>> get_date_format(locale='en_US')
<DateTimePattern u'MMM d, y'>
>>> get_date_format('full', locale='de_DE')
<DateTimePattern u'EEEE, d. MMMM y'>

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string

---
## get_datetime_format
```python
from dates import get_datetime_format
```

Return the datetime formatting patterns used by the locale for the
specified format.

>>> get_datetime_format(locale='en_US')
u'{1}, {0}'

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string

---
## get_time_format
```python
from dates import get_time_format
```

Return the time formatting patterns used by the locale for the specified
format.

>>> get_time_format(locale='en_US')
<DateTimePattern u'h:mm:ss a'>
>>> get_time_format('full', locale='de_DE')
<DateTimePattern u'HH:mm:ss zzzz'>

:param format: the format to use, one of "full", "long", "medium", or
               "short"
:param locale: the `Locale` object, or a locale string

---
## get_timezone_gmt
```python
from dates import get_timezone_gmt
```

Return the timezone associated with the given `datetime` object formatted
as string indicating the offset from GMT.

>>> from datetime import datetime
>>> dt = datetime(2007, 4, 1, 15, 30)
>>> get_timezone_gmt(dt, locale='en')
u'GMT+00:00'
>>> get_timezone_gmt(dt, locale='en', return_z=True)
'Z'
>>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
u'+00'
>>> tz = get_timezone('America/Los_Angeles')
>>> dt = _localize(tz, datetime(2007, 4, 1, 15, 30))
>>> get_timezone_gmt(dt, locale='en')
u'GMT-07:00'
>>> get_timezone_gmt(dt, 'short', locale='en')
u'-0700'
>>> get_timezone_gmt(dt, locale='en', width='iso8601_short')
u'-07'

The long format depends on the locale, for example in France the acronym
UTC string is used instead of GMT:

>>> get_timezone_gmt(dt, 'long', locale='fr_FR')
u'UTC-07:00'

.. versionadded:: 0.9

:param datetime: the ``datetime`` object; if `None`, the current date and
                 time in UTC is used
:param width: either "long" or "short" or "iso8601" or "iso8601_short"
:param locale: the `Locale` object, or a locale string
:param return_z: True or False; Function returns indicator "Z"
                 when local time offset is 0

---
## get_timezone_location
```python
from dates import get_timezone_location
```

Return a representation of the given timezone using "location format".

The result depends on both the local display name of the country and the
city associated with the time zone:

>>> tz = get_timezone('America/St_Johns')
>>> print(get_timezone_location(tz, locale='de_DE'))
Kanada (St. John’s) (Ortszeit)
>>> print(get_timezone_location(tz, locale='en'))
Canada (St. John’s) Time
>>> print(get_timezone_location(tz, locale='en', return_city=True))
St. John’s
>>> tz = get_timezone('America/Mexico_City')
>>> get_timezone_location(tz, locale='de_DE')
u'Mexiko (Mexiko-Stadt) (Ortszeit)'

If the timezone is associated with a country that uses only a single
timezone, just the localized country name is returned:

>>> tz = get_timezone('Europe/Berlin')
>>> get_timezone_name(tz, locale='de_DE')
u'Mitteleurop\xe4ische Zeit'

.. versionadded:: 0.9

:param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
                     the timezone; if `None`, the current date and time in
                     UTC is assumed
:param locale: the `Locale` object, or a locale string
:param return_city: True or False, if True then return exemplar city (location)
                    for the time zone
:return: the localized timezone name using location format

---
## get_timezone_name
```python
from dates import get_timezone_name
```

Return the localized display name for the given timezone. The timezone
may be specified using a ``datetime`` or `tzinfo` object.

>>> from datetime import time
>>> dt = time(15, 30, tzinfo=get_timezone('America/Los_Angeles'))
>>> get_timezone_name(dt, locale='en_US')  # doctest: +SKIP
u'Pacific Standard Time'
>>> get_timezone_name(dt, locale='en_US', return_zone=True)
'America/Los_Angeles'
>>> get_timezone_name(dt, width='short', locale='en_US')  # doctest: +SKIP
u'PST'

If this function gets passed only a `tzinfo` object and no concrete
`datetime`,  the returned display name is independent of daylight savings
time. This can be used for example for selecting timezones, or to set the
time of events that recur across DST changes:

>>> tz = get_timezone('America/Los_Angeles')
>>> get_timezone_name(tz, locale='en_US')
u'Pacific Time'
>>> get_timezone_name(tz, 'short', locale='en_US')
u'PT'

If no localized display name for the timezone is available, and the timezone
is associated with a country that uses only a single timezone, the name of
that country is returned, formatted according to the locale:

>>> tz = get_timezone('Europe/Berlin')
>>> get_timezone_name(tz, locale='de_DE')
u'Mitteleurop\xe4ische Zeit'
>>> get_timezone_name(tz, locale='pt_BR')
u'Hor\xe1rio da Europa Central'

On the other hand, if the country uses multiple timezones, the city is also
included in the representation:

>>> tz = get_timezone('America/St_Johns')
>>> get_timezone_name(tz, locale='de_DE')
u'Neufundland-Zeit'

Note that short format is currently not supported for all timezones and
all locales.  This is partially because not every timezone has a short
code in every locale.  In that case it currently falls back to the long
format.

For more information see `LDML Appendix J: Time Zone Display Names
<https://www.unicode.org/reports/tr35/#Time_Zone_Fallback>`_

.. versionadded:: 0.9

.. versionchanged:: 1.0
   Added `zone_variant` support.

:param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines
                     the timezone; if a ``tzinfo`` object is used, the
                     resulting display name will be generic, i.e.
                     independent of daylight savings time; if `None`, the
                     current date in UTC is assumed
:param width: either "long" or "short"
:param uncommon: deprecated and ignored
:param zone_variant: defines the zone variation to return.  By default the
                       variation is defined from the datetime object
                       passed in.  If no datetime object is passed in, the
                       ``'generic'`` variation is assumed.  The following
                       values are valid: ``'generic'``, ``'daylight'`` and
                       ``'standard'``.
:param locale: the `Locale` object, or a locale string
:param return_zone: True or False. If true then function
                    returns long time zone ID

---
## format_date
```python
from dates import format_date
```

Return a date formatted according to the given pattern.

>>> from datetime import date
>>> d = date(2007, 4, 1)
>>> format_date(d, locale='en_US')
u'Apr 1, 2007'
>>> format_date(d, format='full', locale='de_DE')
u'Sonntag, 1. April 2007'

If you don't want to use the locale default formats, you can specify a
custom date pattern:

>>> format_date(d, "EEE, MMM d, ''yy", locale='en')
u"Sun, Apr 1, '07"

:param date: the ``date`` or ``datetime`` object; if `None`, the current
             date is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param locale: a `Locale` object or a locale identifier

---
## format_datetime
```python
from dates import format_datetime
```

Return a date formatted according to the given pattern.

>>> from datetime import datetime
>>> dt = datetime(2007, 4, 1, 15, 30)
>>> format_datetime(dt, locale='en_US')
u'Apr 1, 2007, 3:30:00\u202fPM'

For any pattern requiring the display of the timezone:

>>> format_datetime(dt, 'full', tzinfo=get_timezone('Europe/Paris'),
...                 locale='fr_FR')
'dimanche 1 avril 2007, 17:30:00 heure d’été d’Europe centrale'
>>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz",
...                 tzinfo=get_timezone('US/Eastern'), locale='en')
u'2007.04.01 AD at 11:30:00 EDT'

:param datetime: the `datetime` object; if `None`, the current date and
                 time is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param tzinfo: the timezone to apply to the time for display
:param locale: a `Locale` object or a locale identifier

---
## format_time
```python
from dates import format_time
```

Return a time formatted according to the given pattern.

>>> from datetime import datetime, time
>>> t = time(15, 30)
>>> format_time(t, locale='en_US')
u'3:30:00\u202fPM'
>>> format_time(t, format='short', locale='de_DE')
u'15:30'

If you don't want to use the locale default formats, you can specify a
custom time pattern:

>>> format_time(t, "hh 'o''clock' a", locale='en')
u"03 o'clock PM"

For any pattern requiring the display of the time-zone a
timezone has to be specified explicitly:

>>> t = datetime(2007, 4, 1, 15, 30)
>>> tzinfo = get_timezone('Europe/Paris')
>>> t = _localize(tzinfo, t)
>>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR')
'15:30:00 heure d’été d’Europe centrale'
>>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=get_timezone('US/Eastern'),
...             locale='en')
u"09 o'clock AM, Eastern Daylight Time"

As that example shows, when this function gets passed a
``datetime.datetime`` value, the actual time in the formatted string is
adjusted to the timezone specified by the `tzinfo` parameter. If the
``datetime`` is "naive" (i.e. it has no associated timezone information),
it is assumed to be in UTC.

These timezone calculations are **not** performed if the value is of type
``datetime.time``, as without date information there's no way to determine
what a given time would translate to in a different timezone without
information about whether daylight savings time is in effect or not. This
means that time values are left as-is, and the value of the `tzinfo`
parameter is only used to display the timezone name if needed:

>>> t = time(15, 30)
>>> format_time(t, format='full', tzinfo=get_timezone('Europe/Paris'),
...             locale='fr_FR')  # doctest: +SKIP
u'15:30:00 heure normale d\u2019Europe centrale'
>>> format_time(t, format='full', tzinfo=get_timezone('US/Eastern'),
...             locale='en_US')  # doctest: +SKIP
u'3:30:00\u202fPM Eastern Standard Time'

:param time: the ``time`` or ``datetime`` object; if `None`, the current
             time in UTC is used
:param format: one of "full", "long", "medium", or "short", or a custom
               date/time pattern
:param tzinfo: the time-zone to apply to the time for display
:param locale: a `Locale` object or a locale identifier

---
## format_skeleton
```python
from dates import format_skeleton
```

Return a time and/or date formatted according to the given pattern.

The skeletons are defined in the CLDR data and provide more flexibility
than the simple short/long/medium formats, but are a bit harder to use.
The are defined using the date/time symbols without order or punctuation
and map to a suitable format for the given locale.

>>> from datetime import datetime
>>> t = datetime(2007, 4, 1, 15, 30)
>>> format_skeleton('MMMEd', t, locale='fr')
u'dim. 1 avr.'
>>> format_skeleton('MMMEd', t, locale='en')
u'Sun, Apr 1'
>>> format_skeleton('yMMd', t, locale='fi')  # yMMd is not in the Finnish locale; yMd gets used
u'1.4.2007'
>>> format_skeleton('yMMd', t, fuzzy=False, locale='fi')  # yMMd is not in the Finnish locale, an error is thrown
Traceback (most recent call last):
    ...
KeyError: yMMd
>>> format_skeleton('GH', t, fuzzy=True, locale='fi_FI')  # GH is not in the Finnish locale and there is no close match, an error is thrown
Traceback (most recent call last):
    ...
KeyError: None

After the skeleton is resolved to a pattern `format_datetime` is called so
all timezone processing etc is the same as for that.

:param skeleton: A date time skeleton as defined in the cldr data.
:param datetime: the ``time`` or ``datetime`` object; if `None`, the current
             time in UTC is used
:param tzinfo: the time-zone to apply to the time for display
:param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
              close enough to it. If there is no close match, a `KeyError`
              is thrown.
:param locale: a `Locale` object or a locale identifier

---
## format_timedelta
```python
from dates import format_timedelta
```

Return a time delta according to the rules of the given locale.

>>> from datetime import timedelta
>>> format_timedelta(timedelta(weeks=12), locale='en_US')
u'3 months'
>>> format_timedelta(timedelta(seconds=1), locale='es')
u'1 segundo'

The granularity parameter can be provided to alter the lowest unit
presented, which defaults to a second.

>>> format_timedelta(timedelta(hours=3), granularity='day', locale='en_US')
u'1 day'

The threshold parameter can be used to determine at which value the
presentation switches to the next higher unit. A higher threshold factor
means the presentation will switch later. For example:

>>> format_timedelta(timedelta(hours=23), threshold=0.9, locale='en_US')
u'1 day'
>>> format_timedelta(timedelta(hours=23), threshold=1.1, locale='en_US')
u'23 hours'

In addition directional information can be provided that informs
the user if the date is in the past or in the future:

>>> format_timedelta(timedelta(hours=1), add_direction=True, locale='en')
u'in 1 hour'
>>> format_timedelta(timedelta(hours=-1), add_direction=True, locale='en')
u'1 hour ago'

The format parameter controls how compact or wide the presentation is:

>>> format_timedelta(timedelta(hours=3), format='short', locale='en')
u'3 hr'
>>> format_timedelta(timedelta(hours=3), format='narrow', locale='en')
u'3h'

:param delta: a ``timedelta`` object representing the time difference to
              format, or the delta in seconds as an `int` value
:param granularity: determines the smallest unit that should be displayed,
                    the value can be one of "year", "month", "week", "day",
                    "hour", "minute" or "second"
:param threshold: factor that determines at which point the presentation
                  switches to the next higher unit
:param add_direction: if this flag is set to `True` the return value will
                      include directional information.  For instance a
                      positive timedelta will include the information about
                      it being in the future, a negative will be information
                      about the value being in the past.
:param format: the format, can be "narrow", "short" or "long". (
               "medium" is deprecated, currently converted to "long" to
               maintain compatibility)
:param locale: a `Locale` object or a locale identifier

---
## _format_fallback_interval
```python
from dates import _format_fallback_interval
```



---
## format_interval
```python
from dates import format_interval
```

Format an interval between two instants according to the locale's rules.

>>> from datetime import date, time
>>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "yMd", locale="fi")
u'15.–17.1.2016'

>>> format_interval(time(12, 12), time(16, 16), "Hm", locale="en_GB")
'12:12–16:16'

>>> format_interval(time(5, 12), time(16, 16), "hm", locale="en_US")
'5:12 AM – 4:16 PM'

>>> format_interval(time(16, 18), time(16, 24), "Hm", locale="it")
'16:18–16:24'

If the start instant equals the end instant, the interval is formatted like the instant.

>>> format_interval(time(16, 18), time(16, 18), "Hm", locale="it")
'16:18'

Unknown skeletons fall back to "default" formatting.

>>> format_interval(date(2015, 1, 1), date(2017, 1, 1), "wzq", locale="ja")
'2015/01/01～2017/01/01'

>>> format_interval(time(16, 18), time(16, 24), "xxx", locale="ja")
'16:18:00～16:24:00'

>>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "xxx", locale="de")
'15.01.2016 – 17.01.2016'

:param start: First instant (datetime/date/time)
:param end: Second instant (datetime/date/time)
:param skeleton: The "skeleton format" to use for formatting.
:param tzinfo: tzinfo to use (if none is already attached)
:param fuzzy: If the skeleton is not found, allow choosing a skeleton that's
              close enough to it.
:param locale: A locale object or identifier.
:return: Formatted interval

---
## get_period_id
```python
from dates import get_period_id
```

Get the day period ID for a given time.

This ID can be used as a key for the period name dictionary.

>>> from datetime import time
>>> get_period_names(locale="de")[get_period_id(time(7, 42), locale="de")]
u'Morgen'

>>> get_period_id(time(0), locale="en_US")
u'midnight'

>>> get_period_id(time(0), type="selection", locale="en_US")
u'night1'

:param time: The time to inspect.
:param tzinfo: The timezone for the time. See ``format_time``.
:param type: The period type to use. Either "selection" or None.
             The selection type is used for selecting among phrases such as
             “Your email arrived yesterday evening” or “Your email arrived last night”.
:param locale: the `Locale` object, or a locale string
:return: period ID. Something is always returned -- even if it's just "am" or "pm".

---
## ParseError
```python
from dates import ParseError
```



---
## parse_date
```python
from dates import parse_date
```

Parse a date from a string.

This function first tries to interpret the string as ISO-8601
date format, then uses the date format for the locale as a hint to
determine the order in which the date fields appear in the string.

>>> parse_date('4/1/04', locale='en_US')
datetime.date(2004, 4, 1)
>>> parse_date('01.04.2004', locale='de_DE')
datetime.date(2004, 4, 1)
>>> parse_date('2004-04-01', locale='en_US')
datetime.date(2004, 4, 1)
>>> parse_date('2004-04-01', locale='de_DE')
datetime.date(2004, 4, 1)

:param string: the string containing the date
:param locale: a `Locale` object or a locale identifier
:param format: the format to use (see ``get_date_format``)

---
## parse_time
```python
from dates import parse_time
```

Parse a time from a string.

This function uses the time format for the locale as a hint to determine
the order in which the time fields appear in the string.

>>> parse_time('15:30:00', locale='en_US')
datetime.time(15, 30)

:param string: the string containing the time
:param locale: a `Locale` object or a locale identifier
:param format: the format to use (see ``get_time_format``)
:return: the parsed time
:rtype: `time`

---
## DateTimePattern
```python
from dates import DateTimePattern
```



---
## DateTimeFormat
```python
from dates import DateTimeFormat
```



---
## parse_pattern
```python
from dates import parse_pattern
```

Parse date, time, and datetime format patterns.

>>> parse_pattern("MMMMd").format
u'%(MMMM)s%(d)s'
>>> parse_pattern("MMM d, yyyy").format
u'%(MMM)s %(d)s, %(yyyy)s'

Pattern can contain literal strings in single quotes:

>>> parse_pattern("H:mm' Uhr 'z").format
u'%(H)s:%(mm)s Uhr %(z)s'

An actual single quote can be used by using two adjacent single quote
characters:

>>> parse_pattern("hh' o''clock'").format
u"%(hh)s o'clock"

:param pattern: the formatting pattern to parse

---
## _cached_parse_pattern
```python
from dates import _cached_parse_pattern
```



---
## tokenize_pattern
```python
from dates import tokenize_pattern
```

Tokenize date format patterns.

Returns a list of (token_type, token_value) tuples.

``token_type`` may be either "chars" or "field".

For "chars" tokens, the value is the literal value.

For "field" tokens, the value is a tuple of (field character, repetition count).

:param pattern: Pattern string
:type pattern: str
:rtype: list[tuple]

---
## untokenize_pattern
```python
from dates import untokenize_pattern
```

Turn a date format pattern token stream back into a string.

This is the reverse operation of ``tokenize_pattern``.

:type tokens: Iterable[tuple]
:rtype: str

---
## split_interval_pattern
```python
from dates import split_interval_pattern
```

Split an interval-describing datetime pattern into multiple pieces.

> The pattern is then designed to be broken up into two pieces by determining the first repeating field.
- https://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats

>>> split_interval_pattern(u'E d.M. – E d.M.')
[u'E d.M. – ', 'E d.M.']
>>> split_interval_pattern("Y 'text' Y 'more text'")
["Y 'text '", "Y 'more text'"]
>>> split_interval_pattern(u"E, MMM d – E")
[u'E, MMM d – ', u'E']
>>> split_interval_pattern("MMM d")
['MMM d']
>>> split_interval_pattern("y G")
['y G']
>>> split_interval_pattern(u"MMM d – d")
[u'MMM d – ', u'd']

:param pattern: Interval pattern string
:return: list of "subpatterns"

---
## match_skeleton
```python
from dates import match_skeleton
```

Find the closest match for the given datetime skeleton among the options given.

This uses the rules outlined in the TR35 document.

>>> match_skeleton('yMMd', ('yMd', 'yMMMd'))
'yMd'

>>> match_skeleton('yMMd', ('jyMMd',), allow_different_fields=True)
'jyMMd'

>>> match_skeleton('yMMd', ('qyMMd',), allow_different_fields=False)

>>> match_skeleton('hmz', ('hmv',))
'hmv'

:param skeleton: The skeleton to match
:type skeleton: str
:param options: An iterable of other skeletons to match against
:type options: Iterable[str]
:return: The closest skeleton match, or if no match was found, None.
:rtype: str|None

---
## _iter_patterns
```python
from dates import _iter_patterns
```



---
## __init__
```python
from dates import __init__
```



---
## __repr__
```python
from dates import __repr__
```



---
## __str__
```python
from dates import __str__
```



---
## __mod__
```python
from dates import __mod__
```



---
## apply
```python
from dates import apply
```



---
## __getitem__
```python
from dates import __getitem__
```



---
## extract
```python
from dates import extract
```



---
## format_era
```python
from dates import format_era
```



---
## format_year
```python
from dates import format_year
```



---
## format_quarter
```python
from dates import format_quarter
```



---
## format_month
```python
from dates import format_month
```



---
## format_week
```python
from dates import format_week
```



---
## format_weekday
```python
from dates import format_weekday
```

Return weekday from parsed datetime according to format pattern.

>>> from datetime import date
>>> format = DateTimeFormat(date(2016, 2, 28), Locale.parse('en_US'))
>>> format.format_weekday()
u'Sunday'

'E': Day of week - Use one through three letters for the abbreviated day name, four for the full (wide) name,
     five for the narrow name, or six for the short name.
>>> format.format_weekday('E',2)
u'Sun'

'e': Local day of week. Same as E except adds a numeric value that will depend on the local starting day of the
     week, using one or two letters. For this example, Monday is the first day of the week.
>>> format.format_weekday('e',2)
'01'

'c': Stand-Alone local day of week - Use one letter for the local numeric value (same as 'e'), three for the
     abbreviated day name, four for the full (wide) name, five for the narrow name, or six for the short name.
>>> format.format_weekday('c',1)
'1'

:param char: pattern format character ('e','E','c')
:param num: count of format character

---
## format_day_of_year
```python
from dates import format_day_of_year
```



---
## format_day_of_week_in_month
```python
from dates import format_day_of_week_in_month
```



---
## format_period
```python
from dates import format_period
```

Return period from parsed datetime according to format pattern.

>>> from datetime import datetime, time
>>> format = DateTimeFormat(time(13, 42), 'fi_FI')
>>> format.format_period('a', 1)
u'ip.'
>>> format.format_period('b', 1)
u'iltap.'
>>> format.format_period('b', 4)
u'iltapäivä'
>>> format.format_period('B', 4)
u'iltapäivällä'
>>> format.format_period('B', 5)
u'ip.'

>>> format = DateTimeFormat(datetime(2022, 4, 28, 6, 27), 'zh_Hant')
>>> format.format_period('a', 1)
u'上午'
>>> format.format_period('B', 1)
u'清晨'

:param char: pattern format character ('a', 'b', 'B')
:param num: count of format character

---
## format_frac_seconds
```python
from dates import format_frac_seconds
```

Return fractional seconds.

Rounds the time's microseconds to the precision given by the number         of digits passed in.

---
## format_milliseconds_in_day
```python
from dates import format_milliseconds_in_day
```



---
## format_timezone
```python
from dates import format_timezone
```



---
## format
```python
from dates import format
```



---
## get_day_of_year
```python
from dates import get_day_of_year
```



---
## get_week_number
```python
from dates import get_week_number
```

Return the number of the week of a day within a period. This may be
the week number in a year or the week number in a month.

Usually this will return a value equal to or greater than 1, but if the
first week of the period is so short that it actually counts as the last
week of the previous period, this function will return 0.

>>> date = datetime.date(2006, 1, 8)
>>> DateTimeFormat(date, 'de_DE').get_week_number(6)
1
>>> DateTimeFormat(date, 'en_US').get_week_number(6)
2

:param day_of_period: the number of the day in the period (usually
                      either the day of month or the day of year)
:param day_of_week: the week day; if omitted, the week day of the
                    current date is assumed

---
## append_chars
```python
from dates import append_chars
```



---
## append_field
```python
from dates import append_field
```



---
## __name__
```python
from localedata import __name__
```

babel.localedata
~~~~~~~~~~~~~~~~

Low-level locale data access.

:note: The `Locale` class, which uses this module under the hood, provides a
       more convenient interface for accessing the locale data.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## normalize_locale
```python
from localedata import normalize_locale
```

Normalize a locale ID by stripping spaces and apply proper casing.

Returns the normalized locale ID string or `None` if the ID is not
recognized.

---
## resolve_locale_filename
```python
from localedata import resolve_locale_filename
```

Resolve a locale identifier to a `.dat` path on disk.

---
## exists
```python
from localedata import exists
```

Check whether locale data is available for the given locale.

Returns `True` if it exists, `False` otherwise.

:param name: the locale identifier string

---
## locale_identifiers
```python
from localedata import locale_identifiers
```

Return a list of all locale identifiers for which locale data is
available.

This data is cached after the first invocation.
You can clear the cache by calling `locale_identifiers.cache_clear()`.

.. versionadded:: 0.8.1

:return: a list of locale identifiers (strings)

---
## _is_non_likely_script
```python
from localedata import _is_non_likely_script
```

Return whether the locale is of the form ``lang_Script``,
and the script is not the likely script for the language.

This implements the behavior of the ``nonlikelyScript`` value of the
``localRules`` attribute for parent locales added in CLDR 45.

---
## load
```python
from localedata import load
```

Load the locale data for the given locale.

The locale data is a dictionary that contains much of the data defined by
the Common Locale Data Repository (CLDR). This data is stored as a
collection of pickle files inside the ``babel`` package.

>>> d = load('en_US')
>>> d['languages']['sv']
u'Swedish'

Note that the results are cached, and subsequent requests for the same
locale return the same dictionary:

>>> d1 = load('en_US')
>>> d2 = load('en_US')
>>> d1 is d2
True

:param name: the locale identifier string (or "root")
:param merge_inherited: whether the inherited data should be merged into
                        the data of the requested locale
:raise `IOError`: if no locale data file is found for the given locale
                  identifier, or one of the locales it inherits from

---
## merge
```python
from localedata import merge
```

Merge the data from `dict2` into the `dict1` dictionary, making copies
of nested dictionaries.

>>> d = {1: 'foo', 3: 'baz'}
>>> merge(d, {1: 'Foo', 2: 'Bar'})
>>> sorted(d.items())
[(1, 'Foo'), (2, 'Bar'), (3, 'baz')]

:param dict1: the dictionary to merge into
:param dict2: the dictionary containing the data that should be merged

---
## Alias
```python
from localedata import Alias
```

Representation of an alias in the locale data.

An alias is a value that refers to some other part of the locale data,
as specified by the `keys`.

---
## LocaleDataDict
```python
from localedata import LocaleDataDict
```

Dictionary wrapper that automatically resolves aliases to the actual
values.

---
## __init__
```python
from localedata import __init__
```



---
## __repr__
```python
from localedata import __repr__
```



---
## resolve
```python
from localedata import resolve
```

Resolve the alias based on the given data.

This is done recursively, so if one alias resolves to a second alias,
that second alias will also be resolved.

:param data: the locale data
:type data: `dict`

---
## __len__
```python
from localedata import __len__
```



---
## __iter__
```python
from localedata import __iter__
```



---
## __getitem__
```python
from localedata import __getitem__
```



---
## __setitem__
```python
from localedata import __setitem__
```



---
## __delitem__
```python
from localedata import __delitem__
```



---
## copy
```python
from localedata import copy
```



---
## __name__
```python
from languages import __name__
```



---
## get_official_languages
```python
from languages import get_official_languages
```

Get the official language(s) for the given territory.

The language codes, if any are known, are returned in order of descending popularity.

If the `regional` flag is set, then languages which are regionally official are also returned.

If the `de_facto` flag is set, then languages which are "de facto" official are also returned.

.. warning:: Note that the data is as up to date as the current version of the CLDR used
             by Babel.  If you need scientifically accurate information, use another source!

:param territory: Territory code
:type territory: str
:param regional: Whether to return regionally official languages too
:type regional: bool
:param de_facto: Whether to return de-facto official languages too
:type de_facto: bool
:return: Tuple of language codes
:rtype: tuple[str]

---
## get_territory_language_info
```python
from languages import get_territory_language_info
```

Get a dictionary of language information for a territory.

The dictionary is keyed by language code; the values are dicts with more information.

The following keys are currently known for the values:

* `population_percent`: The percentage of the territory's population speaking the
                        language.
* `official_status`: An optional string describing the officiality status of the language.
                     Known values are "official", "official_regional" and "de_facto_official".

.. warning:: Note that the data is as up to date as the current version of the CLDR used
             by Babel.  If you need scientifically accurate information, use another source!

.. note:: Note that the format of the dict returned may change between Babel versions.

See https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html

:param territory: Territory code
:type territory: str
:return: Language information dictionary
:rtype: dict[str, dict]

---
## __name__
```python
from h5py_warnings import __name__
```

This module contains the warning classes for h5py. These classes are part of
the public API of h5py, and should be imported from this module.

---
## H5pyWarning
```python
from h5py_warnings import H5pyWarning
```



---
## H5pyDeprecationWarning
```python
from h5py_warnings import H5pyDeprecationWarning
```



---
## run_tests
```python
from __init__ import run_tests
```



---
## enable_ipython_completer
```python
from __init__ import enable_ipython_completer
```

Call this from an interactive IPython session to enable tab-completion
of group and attribute names.

---
## __name__
```python
from ipy_completer import __name__
```

This is the h5py completer extension for ipython.  It is loaded by
calling the function h5py.enable_ipython_completer() from within an
interactive IPython session.

It will let you do things like::

  f=File('foo.h5')
  f['<tab>
  # or:
  f['ite<tab>

which will do tab completion based on the subgroups of `f`. Also::

  f['item1'].at<tab>

will perform tab completion for the attributes in the usual way. This should
also work::

  a = b = f['item1'].attrs.<tab>

as should::

  f['item1/item2/it<tab>

---
## _retrieve_obj
```python
from ipy_completer import _retrieve_obj
```

Filter function for completion. 

---
## h5py_item_completer
```python
from ipy_completer import h5py_item_completer
```

Compute possible item matches for dict-like objects

---
## h5py_attr_completer
```python
from ipy_completer import h5py_attr_completer
```

Compute possible attr matches for nested dict-like objects

---
## h5py_completer
```python
from ipy_completer import h5py_completer
```

Completer function to be loaded into IPython 

---
## load_ipython_extension
```python
from ipy_completer import load_ipython_extension
```

Load completer function into IPython 

---
## __name__
```python
from abnf_regexp import __name__
```

Module for the regular expressions crafted from ABNF.

---
## __name__
```python
from misc import __name__
```



---
## merge_paths
```python
from misc import merge_paths
```

Merge a base URI's path with a relative URI's path.

---
## __name__
```python
from iri import __name__
```

Module containing the implementation of the IRIReference class.

---
## IRIReference
```python
from iri import IRIReference
```

Immutable object representing a parsed IRI Reference.

Can be encoded into an URIReference object via the procedure
specified in RFC 3987 Section 3.1

 .. note::
    The IRI submodule is a new interface and may possibly change in
    the future. Check for changes to the interface when upgrading.

---
## __new__
```python
from iri import __new__
```

Create a new IRIReference.

---
## __eq__
```python
from iri import __eq__
```

Compare this reference to another.

---
## _match_subauthority
```python
from iri import _match_subauthority
```



---
## from_string
```python
from iri import from_string
```

Parse a IRI reference from the given unicode IRI string.

:param str iri_string: Unicode IRI to be parsed into a reference.
:param str encoding: The encoding of the string provided
:returns: :class:`IRIReference` or subclass thereof

---
## encode
```python
from iri import encode
```

Encode an IRIReference into a URIReference instance.

If the ``idna`` module is installed or the ``rfc3986[idna]``
extra is used then unicode characters in the IRI host
component will be encoded with IDNA2008.

:param idna_encoder:
    Function that encodes each part of the host component
    If not given will raise an exception if the IRI
    contains a host component.
:rtype: uri.URIReference
:returns: A URI reference

---
## idna_encoder
```python
from iri import idna_encoder
```



---
## __name__
```python
from parseresult import __name__
```

Module containing the urlparse compatibility logic.

---
## ParseResultMixin
```python
from parseresult import ParseResultMixin
```



---
## ParseResult
```python
from parseresult import ParseResult
```

Implementation of urlparse compatibility class.

This uses the URIReference logic to handle compatibility with the
urlparse.ParseResult class.

---
## ParseResultBytes
```python
from parseresult import ParseResultBytes
```

Compatibility shim for the urlparse.ParseResultBytes object.

---
## split_authority
```python
from parseresult import split_authority
```



---
## authority_from
```python
from parseresult import authority_from
```



---
## _generate_authority
```python
from parseresult import _generate_authority
```



---
## geturl
```python
from parseresult import geturl
```

Shim to match the standard library method.

---
## hostname
```python
from parseresult import hostname
```

Shim to match the standard library.

---
## netloc
```python
from parseresult import netloc
```

Shim to match the standard library.

---
## params
```python
from parseresult import params
```

Shim to match the standard library.

---
## __new__
```python
from parseresult import __new__
```

Create a new ParseResultBytes instance.

---
## from_parts
```python
from parseresult import from_parts
```

Create a ParseResult instance from its parts.

---
## from_string
```python
from parseresult import from_string
```

Parse a URI from the given unicode URI string.

:param str uri_string: Unicode URI to be parsed into a reference.
:param str encoding: The encoding of the string provided
:param bool strict: Parse strictly according to :rfc:`3986` if True.
    If False, parse similarly to the standard library's urlparse
    function.
:returns: :class:`ParseResultBytes` or subclass thereof

---
## authority
```python
from parseresult import authority
```

Return the normalized authority.

---
## copy_with
```python
from parseresult import copy_with
```

Create a copy of this instance replacing with specified parts.

---
## encode
```python
from parseresult import encode
```

Convert to an instance of ParseResultBytes.

---
## unsplit
```python
from parseresult import unsplit
```

Create a URI bytes object from the components.

:returns: The parsed URI reconstituted as a string.
:rtype: bytes

---
## to_str
```python
from compat import to_str
```

Ensure that b is text in the specified encoding.

---
## to_bytes
```python
from compat import to_bytes
```

Ensure that s is converted to bytes from the encoding.

---
## Validator
```python
from validators import Validator
```



---
## check_password
```python
from validators import check_password
```

Assert that there is no password present in the uri.

---
## ensure_one_of
```python
from validators import ensure_one_of
```

Assert that the uri's attribute is one of the allowed values.

---
## ensure_required_components_exist
```python
from validators import ensure_required_components_exist
```

Assert that all required components are present in the URI.

---
## is_valid
```python
from validators import is_valid
```



---
## authority_is_valid
```python
from validators import authority_is_valid
```

Determine if the authority string is valid.

:param str authority:
    The authority to validate.
:param str host:
    (optional) The host portion of the authority to validate.
:param bool require:
    (optional) Specify if authority must not be None.
:returns:
    ``True`` if valid, ``False`` otherwise
:rtype:
    bool

---
## host_is_valid
```python
from validators import host_is_valid
```

Determine if the host string is valid.

:param str host:
    The host to validate.
:param bool require:
    (optional) Specify if host must not be None.
:returns:
    ``True`` if valid, ``False`` otherwise
:rtype:
    bool

---
## scheme_is_valid
```python
from validators import scheme_is_valid
```

Determine if the scheme is valid.

:param str scheme:
    The scheme string to validate.
:param bool require:
    (optional) Set to ``True`` to require the presence of a scheme.
:returns:
    ``True`` if the scheme is valid. ``False`` otherwise.
:rtype:
    bool

---
## path_is_valid
```python
from validators import path_is_valid
```

Determine if the path component is valid.

:param str path:
    The path string to validate.
:param bool require:
    (optional) Set to ``True`` to require the presence of a path.
:returns:
    ``True`` if the path is valid. ``False`` otherwise.
:rtype:
    bool

---
## query_is_valid
```python
from validators import query_is_valid
```

Determine if the query component is valid.

:param str query:
    The query string to validate.
:param bool require:
    (optional) Set to ``True`` to require the presence of a query.
:returns:
    ``True`` if the query is valid. ``False`` otherwise.
:rtype:
    bool

---
## fragment_is_valid
```python
from validators import fragment_is_valid
```

Determine if the fragment component is valid.

:param str fragment:
    The fragment string to validate.
:param bool require:
    (optional) Set to ``True`` to require the presence of a fragment.
:returns:
    ``True`` if the fragment is valid. ``False`` otherwise.
:rtype:
    bool

---
## valid_ipv4_host_address
```python
from validators import valid_ipv4_host_address
```

Determine if the given host is a valid IPv4 address.

---
## subauthority_component_is_valid
```python
from validators import subauthority_component_is_valid
```

Determine if the userinfo, host, and port are valid.

---
## ensure_components_are_valid
```python
from validators import ensure_components_are_valid
```

Assert that all components are valid in the URI.

---
## __init__
```python
from validators import __init__
```



---
## allow_schemes
```python
from validators import allow_schemes
```

Require the scheme to be one of the provided schemes.

.. versionadded:: 1.0

:param schemes:
    Schemes, without ``://`` that are allowed.
:returns:
    The validator instance.
:rtype:
    Validator

---
## allow_hosts
```python
from validators import allow_hosts
```

Require the host to be one of the provided hosts.

.. versionadded:: 1.0

:param hosts:
    Hosts that are allowed.
:returns:
    The validator instance.
:rtype:
    Validator

---
## allow_ports
```python
from validators import allow_ports
```

Require the port to be one of the provided ports.

.. versionadded:: 1.0

:param ports:
    Ports that are allowed.
:returns:
    The validator instance.
:rtype:
    Validator

---
## allow_use_of_password
```python
from validators import allow_use_of_password
```

Allow passwords to be present in the URI.

.. versionadded:: 1.0

:returns:
    The validator instance.
:rtype:
    Validator

---
## forbid_use_of_password
```python
from validators import forbid_use_of_password
```

Prevent passwords from being included in the URI.

.. versionadded:: 1.0

:returns:
    The validator instance.
:rtype:
    Validator

---
## check_validity_of
```python
from validators import check_validity_of
```

Check the validity of the components provided.

This can be specified repeatedly.

.. versionadded:: 1.1

:param components:
    Names of components from :attr:`Validator.COMPONENT_NAMES`.
:returns:
    The validator instance.
:rtype:
    Validator

---
## require_presence_of
```python
from validators import require_presence_of
```

Require the components provided.

This can be specified repeatedly.

.. versionadded:: 1.0

:param components:
    Names of components from :attr:`Validator.COMPONENT_NAMES`.
:returns:
    The validator instance.
:rtype:
    Validator

---
## validate
```python
from validators import validate
```



---
## __name__
```python
from _mixin import __name__
```

Module containing the implementation of the URIMixin class.

---
## URIMixin
```python
from _mixin import URIMixin
```

Mixin with all shared methods for URIs and IRIs.

---
## authority_info
```python
from _mixin import authority_info
```

Return a dictionary with the ``userinfo``, ``host``, and ``port``.

If the authority is not valid, it will raise a
:class:`~rfc3986.exceptions.InvalidAuthority` Exception.

:returns:
    ``{'userinfo': 'username:password', 'host': 'www.example.com',
    'port': '80'}``
:rtype: dict
:raises rfc3986.exceptions.InvalidAuthority:
    If the authority is not ``None`` and can not be parsed.

---
## _match_subauthority
```python
from _mixin import _match_subauthority
```



---
## host
```python
from _mixin import host
```

If present, a string representing the host.

---
## port
```python
from _mixin import port
```

If present, the port extracted from the authority.

---
## userinfo
```python
from _mixin import userinfo
```

If present, the userinfo extracted from the authority.

---
## is_absolute
```python
from _mixin import is_absolute
```

Determine if this URI Reference is an absolute URI.

See http://tools.ietf.org/html/rfc3986#section-4.3 for explanation.

:returns: ``True`` if it is an absolute URI, ``False`` otherwise.
:rtype: bool

---
## is_valid
```python
from _mixin import is_valid
```

Determine if the URI is valid.

.. deprecated:: 1.1.0

    Use the :class:`~rfc3986.validators.Validator` object instead.

:param bool require_scheme: Set to ``True`` if you wish to require the
    presence of the scheme component.
:param bool require_authority: Set to ``True`` if you wish to require
    the presence of the authority component.
:param bool require_path: Set to ``True`` if you wish to require the
    presence of the path component.
:param bool require_query: Set to ``True`` if you wish to require the
    presence of the query component.
:param bool require_fragment: Set to ``True`` if you wish to require
    the presence of the fragment component.
:returns: ``True`` if the URI is valid. ``False`` otherwise.
:rtype: bool

---
## authority_is_valid
```python
from _mixin import authority_is_valid
```

Determine if the authority component is valid.

.. deprecated:: 1.1.0

    Use the :class:`~rfc3986.validators.Validator` object instead.

:param bool require:
    Set to ``True`` to require the presence of this component.
:returns:
    ``True`` if the authority is valid. ``False`` otherwise.
:rtype:
    bool

---
## scheme_is_valid
```python
from _mixin import scheme_is_valid
```

Determine if the scheme component is valid.

.. deprecated:: 1.1.0

    Use the :class:`~rfc3986.validators.Validator` object instead.

:param str require: Set to ``True`` to require the presence of this
    component.
:returns: ``True`` if the scheme is valid. ``False`` otherwise.
:rtype: bool

---
## path_is_valid
```python
from _mixin import path_is_valid
```

Determine if the path component is valid.

.. deprecated:: 1.1.0

    Use the :class:`~rfc3986.validators.Validator` object instead.

:param str require: Set to ``True`` to require the presence of this
    component.
:returns: ``True`` if the path is valid. ``False`` otherwise.
:rtype: bool

---
## query_is_valid
```python
from _mixin import query_is_valid
```

Determine if the query component is valid.

.. deprecated:: 1.1.0

    Use the :class:`~rfc3986.validators.Validator` object instead.

:param str require: Set to ``True`` to require the presence of this
    component.
:returns: ``True`` if the query is valid. ``False`` otherwise.
:rtype: bool

---
## fragment_is_valid
```python
from _mixin import fragment_is_valid
```

Determine if the fragment component is valid.

.. deprecated:: 1.1.0

    Use the Validator object instead.

:param str require: Set to ``True`` to require the presence of this
    component.
:returns: ``True`` if the fragment is valid. ``False`` otherwise.
:rtype: bool

---
## normalized_equality
```python
from _mixin import normalized_equality
```

Compare this URIReference to another URIReference.

:param URIReference other_ref: (required), The reference with which
    we're comparing.
:returns: ``True`` if the references are equal, ``False`` otherwise.
:rtype: bool

---
## resolve_with
```python
from _mixin import resolve_with
```

Use an absolute URI Reference to resolve this relative reference.

Assuming this is a relative reference that you would like to resolve,
use the provided base URI to resolve it.

See http://tools.ietf.org/html/rfc3986#section-5 for more information.

:param base_uri: Either a string or URIReference. It must be an
    absolute URI or it will raise an exception.
:returns: A new URIReference which is the result of resolving this
    reference using ``base_uri``.
:rtype: :class:`URIReference`
:raises rfc3986.exceptions.ResolutionError:
    If the ``base_uri`` does not at least have a scheme.

---
## unsplit
```python
from _mixin import unsplit
```

Create a URI string from the components.

:returns: The URI Reference reconstituted as a string.
:rtype: str

---
## copy_with
```python
from _mixin import copy_with
```

Create a copy of this reference with the new components.

:param str scheme:
    (optional) The scheme to use for the new reference.
:param str authority:
    (optional) The authority to use for the new reference.
:param str path:
    (optional) The path to use for the new reference.
:param str query:
    (optional) The query to use for the new reference.
:param str fragment:
    (optional) The fragment to use for the new reference.
:returns:
    New URIReference with provided components.
:rtype:
    URIReference

---
## __name__
```python
from normalizers import __name__
```

Module with functions to normalize components.

---
## normalize_scheme
```python
from normalizers import normalize_scheme
```

Normalize the scheme component.

---
## normalize_authority
```python
from normalizers import normalize_authority
```

Normalize an authority tuple to a string.

---
## normalize_username
```python
from normalizers import normalize_username
```

Normalize a username to make it safe to include in userinfo.

---
## normalize_password
```python
from normalizers import normalize_password
```

Normalize a password to make safe for userinfo.

---
## normalize_host
```python
from normalizers import normalize_host
```

Normalize a host string.

---
## normalize_path
```python
from normalizers import normalize_path
```

Normalize the path string.

---
## normalize_query
```python
from normalizers import normalize_query
```

Normalize the query string.

---
## normalize_fragment
```python
from normalizers import normalize_fragment
```

Normalize the fragment string.

---
## normalize_percent_characters
```python
from normalizers import normalize_percent_characters
```

All percent characters should be upper-cased.

For example, ``"%3afoo%DF%ab"`` should be turned into ``"%3Afoo%DF%AB"``.

---
## remove_dot_segments
```python
from normalizers import remove_dot_segments
```

Remove dot segments from the string.

See also Section 5.2.4 of :rfc:`3986`.

---
## encode_component
```python
from normalizers import encode_component
```

Encode the specific component in the provided encoding.

---
## URIBuilder
```python
from builder import URIBuilder
```

Object to aid in building up a URI Reference from parts.

.. note::

    This object should be instantiated by the user, but it's recommended
    that it is not provided with arguments. Instead, use the available
    method to populate the fields.

---
## __repr__
```python
from builder import __repr__
```

Provide a convenient view of our builder object.

---
## from_uri
```python
from builder import from_uri
```

Initialize the URI builder from another URI.

Takes the given URI reference and creates a new URI builder instance
populated with the values from the reference. If given a string it will
try to convert it to a reference before constructing the builder.

---
## add_scheme
```python
from builder import add_scheme
```

Add a scheme to our builder object.

After normalizing, this will generate a new URIBuilder instance with
the specified scheme and all other attributes the same.

.. code-block:: python

    >>> URIBuilder().add_scheme('HTTPS')
    URIBuilder(scheme='https', userinfo=None, host=None, port=None,
            path=None, query=None, fragment=None)

---
## add_credentials
```python
from builder import add_credentials
```

Add credentials as the userinfo portion of the URI.

.. code-block:: python

    >>> URIBuilder().add_credentials('root', 's3crete')
    URIBuilder(scheme=None, userinfo='root:s3crete', host=None,
            port=None, path=None, query=None, fragment=None)

    >>> URIBuilder().add_credentials('root', None)
    URIBuilder(scheme=None, userinfo='root', host=None,
            port=None, path=None, query=None, fragment=None)

---
## add_host
```python
from builder import add_host
```

Add hostname to the URI.

.. code-block:: python

    >>> URIBuilder().add_host('google.com')
    URIBuilder(scheme=None, userinfo=None, host='google.com',
            port=None, path=None, query=None, fragment=None)

---
## add_port
```python
from builder import add_port
```

Add port to the URI.

.. code-block:: python

    >>> URIBuilder().add_port(80)
    URIBuilder(scheme=None, userinfo=None, host=None, port='80',
            path=None, query=None, fragment=None)

    >>> URIBuilder().add_port(443)
    URIBuilder(scheme=None, userinfo=None, host=None, port='443',
            path=None, query=None, fragment=None)

---
## add_path
```python
from builder import add_path
```

Add a path to the URI.

.. code-block:: python

    >>> URIBuilder().add_path('sigmavirus24/rfc3985')
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/sigmavirus24/rfc3986', query=None, fragment=None)

    >>> URIBuilder().add_path('/checkout.php')
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/checkout.php', query=None, fragment=None)

---
## extend_path
```python
from builder import extend_path
```

Extend the existing path value with the provided value.

.. versionadded:: 1.5.0

.. code-block:: python

    >>> URIBuilder(path="/users").extend_path("/sigmavirus24")
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/users/sigmavirus24', query=None, fragment=None)

    >>> URIBuilder(path="/users/").extend_path("/sigmavirus24")
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/users/sigmavirus24', query=None, fragment=None)

    >>> URIBuilder(path="/users/").extend_path("sigmavirus24")
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/users/sigmavirus24', query=None, fragment=None)

    >>> URIBuilder(path="/users").extend_path("sigmavirus24")
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path='/users/sigmavirus24', query=None, fragment=None)

---
## add_query_from
```python
from builder import add_query_from
```

Generate and add a query a dictionary or list of tuples.

.. code-block:: python

    >>> URIBuilder().add_query_from({'a': 'b c'})
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query='a=b+c', fragment=None)

    >>> URIBuilder().add_query_from([('a', 'b c')])
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query='a=b+c', fragment=None)

---
## extend_query_with
```python
from builder import extend_query_with
```

Extend the existing query string with the new query items.

.. versionadded:: 1.5.0

.. code-block:: python

    >>> URIBuilder(query='a=b+c').extend_query_with({'a': 'b c'})
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query='a=b+c&a=b+c', fragment=None)

    >>> URIBuilder(query='a=b+c').extend_query_with([('a', 'b c')])
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query='a=b+c&a=b+c', fragment=None)

---
## add_query
```python
from builder import add_query
```

Add a pre-formated query string to the URI.

.. code-block:: python

    >>> URIBuilder().add_query('a=b&c=d')
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query='a=b&c=d', fragment=None)

---
## add_fragment
```python
from builder import add_fragment
```

Add a fragment to the URI.

.. code-block:: python

    >>> URIBuilder().add_fragment('section-2.6.1')
    URIBuilder(scheme=None, userinfo=None, host=None, port=None,
            path=None, query=None, fragment='section-2.6.1')

---
## finalize
```python
from builder import finalize
```

Create a URIReference from our builder.

.. code-block:: python

    >>> URIBuilder().add_scheme('https').add_host('github.com'
    ...     ).add_path('sigmavirus24/rfc3986').finalize().unsplit()
    'https://github.com/sigmavirus24/rfc3986'

    >>> URIBuilder().add_scheme('https').add_host('github.com'
    ...     ).add_path('sigmavirus24/rfc3986').add_credentials(
    ...     'sigmavirus24', 'not-re@l').finalize().unsplit()
    'https://sigmavirus24:not-re%40l@github.com/sigmavirus24/rfc3986'

---
## geturl
```python
from builder import geturl
```

Generate the URL from this builder.

.. versionadded:: 1.5.0

This is an alternative to calling :meth:`finalize` and keeping the
:class:`rfc3986.uri.URIReference` around.

---
## uri_reference
```python
from api import uri_reference
```

Parse a URI string into a URIReference.

This is a convenience function. You could achieve the same end by using
``URIReference.from_string(uri)``.

:param str uri: The URI which needs to be parsed into a reference.
:param str encoding: The encoding of the string provided
:returns: A parsed URI
:rtype: :class:`URIReference`

---
## iri_reference
```python
from api import iri_reference
```

Parse a IRI string into an IRIReference.

This is a convenience function. You could achieve the same end by using
``IRIReference.from_string(iri)``.

:param str iri: The IRI which needs to be parsed into a reference.
:param str encoding: The encoding of the string provided
:returns: A parsed IRI
:rtype: :class:`IRIReference`

---
## is_valid_uri
```python
from api import is_valid_uri
```

Determine if the URI given is valid.

This is a convenience function. You could use either
``uri_reference(uri).is_valid()`` or
``URIReference.from_string(uri).is_valid()`` to achieve the same result.

:param str uri: The URI to be validated.
:param str encoding: The encoding of the string provided
:param bool require_scheme: Set to ``True`` if you wish to require the
    presence of the scheme component.
:param bool require_authority: Set to ``True`` if you wish to require the
    presence of the authority component.
:param bool require_path: Set to ``True`` if you wish to require the
    presence of the path component.
:param bool require_query: Set to ``True`` if you wish to require the
    presence of the query component.
:param bool require_fragment: Set to ``True`` if you wish to require the
    presence of the fragment component.
:returns: ``True`` if the URI is valid, ``False`` otherwise.
:rtype: bool

---
## normalize_uri
```python
from api import normalize_uri
```

Normalize the given URI.

This is a convenience function. You could use either
``uri_reference(uri).normalize().unsplit()`` or
``URIReference.from_string(uri).normalize().unsplit()`` instead.

:param str uri: The URI to be normalized.
:param str encoding: The encoding of the string provided
:returns: The normalized URI.
:rtype: str

---
## urlparse
```python
from api import urlparse
```

Parse a given URI and return a ParseResult.

This is a partial replacement of the standard library's urlparse function.

:param str uri: The URI to be parsed.
:param str encoding: The encoding of the string provided.
:returns: A parsed URI
:rtype: :class:`~rfc3986.parseresult.ParseResult`

---
## URIReference
```python
from uri import URIReference
```

Immutable object representing a parsed URI Reference.

.. note::

    This class is not intended to be directly instantiated by the user.

This object exposes attributes for the following components of a
URI:

- scheme
- authority
- path
- query
- fragment

.. attribute:: scheme

    The scheme that was parsed for the URI Reference. For example,
    ``http``, ``https``, ``smtp``, ``imap``, etc.

.. attribute:: authority

    Component of the URI that contains the user information, host,
    and port sub-components. For example,
    ``google.com``, ``127.0.0.1:5000``, ``username@[::1]``,
    ``username:password@example.com:443``, etc.

.. attribute:: path

    The path that was parsed for the given URI Reference. For example,
    ``/``, ``/index.php``, etc.

.. attribute:: query

    The query component for a given URI Reference. For example, ``a=b``,
    ``a=b%20c``, ``a=b+c``, ``a=b,c=d,e=%20f``, etc.

.. attribute:: fragment

    The fragment component of a URI. For example, ``section-3.1``.

This class also provides extra attributes for easier access to information
like the subcomponents of the authority component.

.. attribute:: userinfo

    The user information parsed from the authority.

.. attribute:: host

    The hostname, IPv4, or IPv6 address parsed from the authority.

.. attribute:: port

    The port parsed from the authority.

---
## __new__
```python
from uri import __new__
```

Create a new URIReference.

---
## __eq__
```python
from uri import __eq__
```

Compare this reference to another.

---
## normalize
```python
from uri import normalize
```

Normalize this reference as described in Section 6.2.2.

This is not an in-place normalization. Instead this creates a new
URIReference.

:returns: A new reference object with normalized components.
:rtype: URIReference

---
## from_string
```python
from uri import from_string
```

Parse a URI reference from the given unicode URI string.

:param str uri_string: Unicode URI to be parsed into a reference.
:param str encoding: The encoding of the string provided
:returns: :class:`URIReference` or subclass thereof

---
## RFC3986Exception
```python
from exceptions import RFC3986Exception
```

Base class for all rfc3986 exception classes.

---
## InvalidAuthority
```python
from exceptions import InvalidAuthority
```

Exception when the authority string is invalid.

---
## InvalidPort
```python
from exceptions import InvalidPort
```

Exception when the port is invalid.

---
## ResolutionError
```python
from exceptions import ResolutionError
```

Exception to indicate a failure to resolve a URI.

---
## ValidationError
```python
from exceptions import ValidationError
```

An instance was invalid under a provided schema.

---
## MissingComponentError
```python
from exceptions import MissingComponentError
```

Exception raised when a required component is missing.

---
## UnpermittedComponentError
```python
from exceptions import UnpermittedComponentError
```

Exception raised when a component has an unpermitted value.

---
## PasswordForbidden
```python
from exceptions import PasswordForbidden
```

Exception raised when a URL has a password in the userinfo section.

---
## InvalidComponentsError
```python
from exceptions import InvalidComponentsError
```

Exception raised when one or more components are invalid.

---
## MissingDependencyError
```python
from exceptions import MissingDependencyError
```

Exception raised when an IRI is encoded without the 'idna' module.

---
## __name__
```python
from readers import __name__
```

Module contains tools for processing files into DataFrames or other objects

GH#48849 provides a convenient way of deprecating keyword arguments

---
## remove_duplicates
```python
from readers import remove_duplicates
```



---
## FileReader
```python
from readers import FileReader
```



---
## ZipReader
```python
from readers import ZipReader
```



---
## MultiplexedPath
```python
from readers import MultiplexedPath
```

Given a series of Traversable objects, implement a merged
version of the interface across all objects. Useful for
namespace packages which may be multihomed at a single
name.

---
## NamespaceReader
```python
from readers import NamespaceReader
```



---
## _ensure_traversable
```python
from readers import _ensure_traversable
```

Convert deprecated string arguments to traversables (pathlib.Path).

Remove with Python 3.15.

---
## __init__
```python
from readers import __init__
```



---
## resource_path
```python
from readers import resource_path
```

Return the file system path to prevent
`resources.path()` from creating a temporary
copy.

---
## files
```python
from readers import files
```



---
## open_resource
```python
from readers import open_resource
```



---
## is_resource
```python
from readers import is_resource
```

Workaround for `zipfile.Path.is_file` returning true
for non-existent paths.

---
## iterdir
```python
from readers import iterdir
```



---
## read_bytes
```python
from readers import read_bytes
```



---
## read_text
```python
from readers import read_text
```



---
## is_dir
```python
from readers import is_dir
```



---
## is_file
```python
from readers import is_file
```



---
## joinpath
```python
from readers import joinpath
```



---
## _follow
```python
from readers import _follow
```

Construct a MultiplexedPath if needed.

If children contains a sole element, return it.
Otherwise, return a MultiplexedPath of the items.
Unless one of the items is not a Directory, then return the first.

---
## open
```python
from readers import open
```



---
## name
```python
from readers import name
```



---
## __repr__
```python
from readers import __repr__
```



---
## _resolve
```python
from readers import _resolve
```

Given an item from a namespace path, resolve it to a Traversable.

path_str might be a directory on the filesystem or a path to a
zipfile plus the path within the zipfile, e.g. ``/foo/bar`` or
``/foo/baz.zip/inner_dir`` or ``foo\baz.zip\inner_dir\sub``.

path_str might also be a sentinel used by editable packages to
trigger other behaviors (see python/importlib_resources#311).
In that case, return None.

---
## _candidate_paths
```python
from readers import _candidate_paths
```



---
## _resolve_zip_path
```python
from readers import _resolve_zip_path
```



---
## package_to_anchor
```python
from _common import package_to_anchor
```

Replace 'package' parameter as 'anchor' and warn about the change.

Other errors should fall through.

>>> files('a', 'b')
Traceback (most recent call last):
TypeError: files() takes from 0 to 1 positional arguments but 2 were given

Remove this compatibility in Python 3.14.

---
## files
```python
from _common import files
```

Get a Traversable resource for an anchor.

---
## get_resource_reader
```python
from _common import get_resource_reader
```

Return the package's loader if it's a ResourceReader.

---
## resolve
```python
from _common import resolve
```



---
## _
```python
from _common import _
```

Degenerate behavior for pathlib.Path objects.

---
## _infer_caller
```python
from _common import _infer_caller
```

Walk the stack and find the frame of the first caller not in this module.

---
## from_package
```python
from _common import from_package
```

Return a Traversable object for the given package.

---
## _tempfile
```python
from _common import _tempfile
```



---
## _temp_file
```python
from _common import _temp_file
```



---
## _is_present_dir
```python
from _common import _is_present_dir
```

Some Traversables implement ``is_dir()`` to raise an
exception (i.e. ``FileNotFoundError``) when the
directory doesn't exist. This function wraps that call
to always return a boolean and only return True
if there's a dir and it exists.

---
## as_file
```python
from _common import as_file
```

Given a Traversable object, return that object as a
path on the local file system in a context manager.

---
## _temp_path
```python
from _common import _temp_path
```

Wrap tempfile.TemporaryDirectory to return a pathlib object.

---
## _temp_dir
```python
from _common import _temp_dir
```

Given a traversable dir, recursively replicate the whole tree
to the file system in a context manager.

---
## _write_contents
```python
from _common import _write_contents
```



---
## wrapper
```python
from _common import wrapper
```



---
## is_this_file
```python
from _common import is_this_file
```



---
## is_wrapper
```python
from _common import is_wrapper
```



---
## only
```python
from _itertools import only
```

If *iterable* has only one item, return it.
If it has zero items, return *default*.
If it has more than one item, raise the exception given by *too_long*,
which is ``ValueError`` by default.
>>> only([], default='missing')
'missing'
>>> only([1])
1
>>> only([1, 2])  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ValueError: Expected exactly one item in iterable, but got 1, 2,
 and perhaps more.'
>>> only([1, 2], too_long=TypeError)  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TypeError
Note that :func:`only` attempts to advance *iterable* twice to ensure there
is only one item.  See :func:`spy` or :func:`peekable` to check
iterable contents less destructively.

---
## SpecLoaderAdapter
```python
from _adapters import SpecLoaderAdapter
```

Adapt a package spec to adapt the underlying loader.

---
## TraversableResourcesLoader
```python
from _adapters import TraversableResourcesLoader
```

Adapt a loader to provide TraversableResources.

---
## _io_wrapper
```python
from _adapters import _io_wrapper
```



---
## CompatibilityFiles
```python
from _adapters import CompatibilityFiles
```

Adapter for an existing or non-existent resource reader
to provide a compatibility .files().

---
## wrap_spec
```python
from _adapters import wrap_spec
```

Construct a package spec with traversable compatibility
on the spec/loader/reader.

---
## __getattr__
```python
from _adapters import __getattr__
```



---
## get_resource_reader
```python
from _adapters import get_resource_reader
```



---
## SpecPath
```python
from _adapters import SpecPath
```

Path tied to a module spec.
Can be read and exposes the resource reader children.

---
## ChildPath
```python
from _adapters import ChildPath
```

Path tied to a resource reader child.
Can be read but doesn't expose any meaningful children.

---
## OrphanPath
```python
from _adapters import OrphanPath
```

Orphan path, not tied to a module spec or resource reader.
Can't be read and doesn't expose any meaningful children.

---
## _reader
```python
from _adapters import _reader
```



---
## _native
```python
from _adapters import _native
```

Return the native reader if it supports files().

---
## files
```python
from _adapters import files
```



---
## iterdir
```python
from _adapters import iterdir
```



---
## is_file
```python
from _adapters import is_file
```



---
## joinpath
```python
from _adapters import joinpath
```



---
## name
```python
from _adapters import name
```



---
## open
```python
from _adapters import open
```



---
## is_dir
```python
from _adapters import is_dir
```



---
## __name__
```python
from simple import __name__
```

Simple expression that should pass with mypy.

---
## SimpleReader
```python
from simple import SimpleReader
```

The minimum, low-level interface required from a resource
provider.

---
## ResourceContainer
```python
from simple import ResourceContainer
```

Traversable container for a package's resources via its reader.

---
## ResourceHandle
```python
from simple import ResourceHandle
```

Handle to a named resource in a ResourceReader.

---
## TraversableReader
```python
from simple import TraversableReader
```

A TraversableResources based on SimpleReader. Resource providers
may derive from this class to provide the TraversableResources
interface by supplying the SimpleReader interface.

---
## package
```python
from simple import package
```

The name of the package for which this reader loads resources.

---
## children
```python
from simple import children
```

Obtain an iterable of SimpleReader for available
child containers (e.g. directories).

---
## resources
```python
from simple import resources
```

Obtain available named resources for this virtual package.

---
## open_binary
```python
from simple import open_binary
```

Obtain a File-like for a named resource.

---
## name
```python
from simple import name
```



---
## __init__
```python
from simple import __init__
```



---
## is_dir
```python
from simple import is_dir
```



---
## is_file
```python
from simple import is_file
```



---
## iterdir
```python
from simple import iterdir
```



---
## open
```python
from simple import open
```



---
## joinpath
```python
from simple import joinpath
```



---
## files
```python
from simple import files
```



---
## __name__
```python
from _functional import __name__
```

Simplified function-based API for importlib.resources

---
## open_binary
```python
from _functional import open_binary
```

Open for binary reading the *resource* within *package*.

---
## open_text
```python
from _functional import open_text
```

Open for text reading the *resource* within *package*.

---
## read_binary
```python
from _functional import read_binary
```

Read and return contents of *resource* within *package* as bytes.

---
## read_text
```python
from _functional import read_text
```

Read and return contents of *resource* within *package* as str.

---
## path
```python
from _functional import path
```

Return the path to the *resource* as an actual file system path.

---
## is_resource
```python
from _functional import is_resource
```

Return ``True`` if there is a resource named *name* in the package,

Otherwise returns ``False``.

---
## contents
```python
from _functional import contents
```

Return an iterable over the named resources within the package.

The iterable returns :class:`str` resources (e.g. files).
The iterable does not recurse into subdirectories.

---
## _get_encoding_arg
```python
from _functional import _get_encoding_arg
```



---
## _get_resource
```python
from _functional import _get_resource
```



---
## ResourceReader
```python
from abc import ResourceReader
```

Abstract base class for loaders to provide resource reading support.

---
## TraversalError
```python
from abc import TraversalError
```



---
## Traversable
```python
from abc import Traversable
```

An object with a subset of pathlib.Path methods suitable for
traversing directories and opening files.

Any exceptions that occur when accessing the backing resource
may propagate unaltered.

---
## TraversableResources
```python
from abc import TraversableResources
```

The required interface for providing traversable
resources.

---
## open_resource
```python
from abc import open_resource
```



---
## resource_path
```python
from abc import resource_path
```



---
## is_resource
```python
from abc import is_resource
```



---
## contents
```python
from abc import contents
```



---
## iterdir
```python
from abc import iterdir
```

Yield Traversable objects in self

---
## read_bytes
```python
from abc import read_bytes
```

Read contents of self as bytes

---
## read_text
```python
from abc import read_text
```

Read contents of self as text

---
## is_dir
```python
from abc import is_dir
```

Return True if self is a directory

---
## is_file
```python
from abc import is_file
```

Return True if self is a file

---
## joinpath
```python
from abc import joinpath
```

Return Traversable resolved with any descendants applied.

Each descendant should be a path segment relative to self
and each may contain multiple levels separated by
``posixpath.sep`` (``/``).

---
## __truediv__
```python
from abc import __truediv__
```

Return Traversable child in self

---
## open
```python
from abc import open
```

mode may be 'r' or 'rb' to open as text or binary. Return a handle
suitable for reading (same as pathlib.Path.open).

When opening as text, accepts encoding parameters such as those
accepted by io.TextIOWrapper.

---
## name
```python
from abc import name
```

The base name of this object without any parent references.

---
## files
```python
from abc import files
```

Return a Traversable object for the loaded package.

---
## __name__
```python
from dechunk import __name__
```



---
## dechunk_filled
```python
from dechunk import dechunk_filled
```

Return the specified filled contours with chunked data moved into the first chunk.

Filled contours that are not chunked (``FillType.OuterCode`` and ``FillType.OuterOffset``) and
those that are but only contain a single chunk are returned unmodified. Individual polygons are
unchanged, they are not geometrically combined.

Args:
    filled (sequence of arrays): Filled contour data, such as returned by
        :meth:`.ContourGenerator.filled`.
    fill_type (FillType or str): Type of :meth:`~.ContourGenerator.filled` as enum or string
        equivalent.

Return:
    Filled contours in a single chunk.

.. versionadded:: 1.2.0

---
## dechunk_lines
```python
from dechunk import dechunk_lines
```

Return the specified contour lines with chunked data moved into the first chunk.

Contour lines that are not chunked (``LineType.Separate`` and ``LineType.SeparateCode``) and
those that are but only contain a single chunk are returned unmodified. Individual lines are
unchanged, they are not geometrically combined.

Args:
    lines (sequence of arrays): Contour line data, such as returned by
        :meth:`.ContourGenerator.lines`.
    line_type (LineType or str): Type of :meth:`~.ContourGenerator.lines` as enum or string
        equivalent.

Return:
    Contour lines in a single chunk.

.. versionadded:: 1.2.0

---
## dechunk_multi_filled
```python
from dechunk import dechunk_multi_filled
```

Return multiple sets of filled contours with chunked data moved into the first chunks.

Filled contours that are not chunked (``FillType.OuterCode`` and ``FillType.OuterOffset``) and
those that are but only contain a single chunk are returned unmodified. Individual polygons are
unchanged, they are not geometrically combined.

Args:
    multi_filled (nested sequence of arrays): Filled contour data, such as returned by
        :meth:`.ContourGenerator.multi_filled`.
    fill_type (FillType or str): Type of :meth:`~.ContourGenerator.filled` as enum or string
        equivalent.

Return:
    Multiple sets of filled contours in a single chunk.

.. versionadded:: 1.3.0

---
## dechunk_multi_lines
```python
from dechunk import dechunk_multi_lines
```

Return multiple sets of contour lines with all chunked data moved into the first chunks.

Contour lines that are not chunked (``LineType.Separate`` and ``LineType.SeparateCode``) and
those that are but only contain a single chunk are returned unmodified. Individual lines are
unchanged, they are not geometrically combined.

Args:
    multi_lines (nested sequence of arrays): Contour line data, such as returned by
        :meth:`.ContourGenerator.multi_lines`.
    line_type (LineType or str): Type of :meth:`~.ContourGenerator.lines` as enum or string
        equivalent.

Return:
    Multiple sets of contour lines in a single chunk.

.. versionadded:: 1.3.0

---
## __name__
```python
from typecheck import __name__
```



---
## check_code_array
```python
from typecheck import check_code_array
```



---
## check_offset_array
```python
from typecheck import check_offset_array
```



---
## check_point_array
```python
from typecheck import check_point_array
```



---
## _check_tuple_of_lists_with_same_length
```python
from typecheck import _check_tuple_of_lists_with_same_length
```



---
## check_filled
```python
from typecheck import check_filled
```



---
## check_lines
```python
from typecheck import check_lines
```



---
## __name__
```python
from convert import __name__
```



---
## _convert_filled_from_OuterCode
```python
from convert import _convert_filled_from_OuterCode
```



---
## _convert_filled_from_OuterOffset
```python
from convert import _convert_filled_from_OuterOffset
```



---
## _convert_filled_from_ChunkCombinedCode
```python
from convert import _convert_filled_from_ChunkCombinedCode
```



---
## _convert_filled_from_ChunkCombinedOffset
```python
from convert import _convert_filled_from_ChunkCombinedOffset
```



---
## _convert_filled_from_ChunkCombinedCodeOffset
```python
from convert import _convert_filled_from_ChunkCombinedCodeOffset
```



---
## _convert_filled_from_ChunkCombinedOffsetOffset
```python
from convert import _convert_filled_from_ChunkCombinedOffsetOffset
```



---
## convert_filled
```python
from convert import convert_filled
```

Convert filled contours from one :class:`~.FillType` to another.

Args:
    filled (sequence of arrays): Filled contour polygons to convert, such as those returned by
        :meth:`.ContourGenerator.filled`.
    fill_type_from (FillType or str): :class:`~.FillType` to convert from as enum or
        string equivalent.
    fill_type_to (FillType or str): :class:`~.FillType` to convert to as enum or string
        equivalent.

Return:
    Converted filled contour polygons.

When converting non-chunked fill types (``FillType.OuterCode`` or ``FillType.OuterOffset``) to
chunked ones, all polygons are placed in the first chunk. When converting in the other
direction, all chunk information is discarded. Converting a fill type that is not aware of the
relationship between outer boundaries and contained holes (``FillType.ChunkCombinedCode`` or
``FillType.ChunkCombinedOffset``) to one that is will raise a ``ValueError``.

.. versionadded:: 1.2.0

---
## _convert_lines_from_Separate
```python
from convert import _convert_lines_from_Separate
```



---
## _convert_lines_from_SeparateCode
```python
from convert import _convert_lines_from_SeparateCode
```



---
## _convert_lines_from_ChunkCombinedCode
```python
from convert import _convert_lines_from_ChunkCombinedCode
```



---
## _convert_lines_from_ChunkCombinedOffset
```python
from convert import _convert_lines_from_ChunkCombinedOffset
```



---
## _convert_lines_from_ChunkCombinedNan
```python
from convert import _convert_lines_from_ChunkCombinedNan
```



---
## convert_lines
```python
from convert import convert_lines
```

Convert contour lines from one :class:`~.LineType` to another.

Args:
    lines (sequence of arrays): Contour lines to convert, such as those returned by
        :meth:`.ContourGenerator.lines`.
    line_type_from (LineType or str): :class:`~.LineType` to convert from as enum or
        string equivalent.
    line_type_to (LineType or str): :class:`~.LineType` to convert to as enum or string
        equivalent.

Return:
    Converted contour lines.

When converting non-chunked line types (``LineType.Separate`` or ``LineType.SeparateCode``) to
chunked ones (``LineType.ChunkCombinedCode``, ``LineType.ChunkCombinedOffset`` or
``LineType.ChunkCombinedNan``), all lines are placed in the first chunk. When converting in the
other direction, all chunk information is discarded.

.. versionadded:: 1.2.0

---
## convert_multi_filled
```python
from convert import convert_multi_filled
```

Convert multiple sets of filled contours from one :class:`~.FillType` to another.

Args:
    multi_filled (nested sequence of arrays): Filled contour polygons to convert, such as those
        returned by :meth:`.ContourGenerator.multi_filled`.
    fill_type_from (FillType or str): :class:`~.FillType` to convert from as enum or
        string equivalent.
    fill_type_to (FillType or str): :class:`~.FillType` to convert to as enum or string
        equivalent.

Return:
    Converted sets filled contour polygons.

When converting non-chunked fill types (``FillType.OuterCode`` or ``FillType.OuterOffset``) to
chunked ones, all polygons are placed in the first chunk. When converting in the other
direction, all chunk information is discarded. Converting a fill type that is not aware of the
relationship between outer boundaries and contained holes (``FillType.ChunkCombinedCode`` or
``FillType.ChunkCombinedOffset``) to one that is will raise a ``ValueError``.

.. versionadded:: 1.3.0

---
## convert_multi_lines
```python
from convert import convert_multi_lines
```

Convert multiple sets of contour lines from one :class:`~.LineType` to another.

Args:
    multi_lines (nested sequence of arrays): Contour lines to convert, such as those returned by
        :meth:`.ContourGenerator.multi_lines`.
    line_type_from (LineType or str): :class:`~.LineType` to convert from as enum or
        string equivalent.
    line_type_to (LineType or str): :class:`~.LineType` to convert to as enum or string
        equivalent.

Return:
    Converted set of contour lines.

When converting non-chunked line types (``LineType.Separate`` or ``LineType.SeparateCode``) to
chunked ones (``LineType.ChunkCombinedCode``, ``LineType.ChunkCombinedOffset`` or
``LineType.ChunkCombinedNan``), all lines are placed in the first chunk. When converting in the
other direction, all chunk information is discarded.

.. versionadded:: 1.3.0

---
## _remove_z_mask
```python
from __init__ import _remove_z_mask
```



---
## contour_generator
```python
from __init__ import contour_generator
```

Create and return a :class:`~.ContourGenerator` object.

The class and properties of the returned :class:`~.ContourGenerator` are determined by the
function arguments, with sensible defaults.

Args:
    x (array-like of shape (ny, nx) or (nx,), optional): The x-coordinates of the ``z`` values.
        May be 2D with the same shape as ``z.shape``, or 1D with length ``nx = z.shape[1]``.
        If not specified are assumed to be ``np.arange(nx)``. Must be ordered monotonically.
    y (array-like of shape (ny, nx) or (ny,), optional): The y-coordinates of the ``z`` values.
        May be 2D with the same shape as ``z.shape``, or 1D with length ``ny = z.shape[0]``.
        If not specified are assumed to be ``np.arange(ny)``. Must be ordered monotonically.
    z (array-like of shape (ny, nx), may be a masked array): The 2D gridded values to calculate
        the contours of.  May be a masked array, and any invalid values (``np.inf`` or
        ``np.nan``) will also be masked out.
    name (str): Algorithm name, one of ``"serial"``, ``"threaded"``, ``"mpl2005"`` or
        ``"mpl2014"``, default ``"serial"``.
    corner_mask (bool, optional): Enable/disable corner masking, which only has an effect if
        ``z`` is a masked array. If ``False``, any quad touching a masked point is masked out.
        If ``True``, only the triangular corners of quads nearest these points are always masked
        out, other triangular corners comprising three unmasked points are contoured as usual.
        If not specified, uses the default provided by the algorithm ``name``.
    line_type (LineType or str, optional): The format of contour line data returned from calls
        to :meth:`~.ContourGenerator.lines`, specified either as a :class:`~.LineType` or its
        string equivalent such as ``"SeparateCode"``.
        If not specified, uses the default provided by the algorithm ``name``.
        The relationship between the :class:`~.LineType` enum and the data format returned from
        :meth:`~.ContourGenerator.lines` is explained at :ref:`line_type`.
    fill_type (FillType or str, optional): The format of filled contour data returned from calls
        to :meth:`~.ContourGenerator.filled`, specified either as a :class:`~.FillType` or its
        string equivalent such as ``"OuterOffset"``.
        If not specified, uses the default provided by the algorithm ``name``.
        The relationship between the :class:`~.FillType` enum and the data format returned from
        :meth:`~.ContourGenerator.filled` is explained at :ref:`fill_type`.
    chunk_size (int or tuple(int, int), optional): Chunk size in (y, x) directions, or the same
        size in both directions if only one value is specified.
    chunk_count (int or tuple(int, int), optional): Chunk count in (y, x) directions, or the
        same count in both directions if only one value is specified.
    total_chunk_count (int, optional): Total number of chunks.
    quad_as_tri (bool): Enable/disable treating quads as 4 triangles, default ``False``.
        If ``False``, a contour line within a quad is a straight line between points on two of
        its edges. If ``True``, each full quad is divided into 4 triangles using a virtual point
        at the centre (mean x, y of the corner points) and a contour line is piecewise linear
        within those triangles. Corner-masked triangles are not affected by this setting, only
        full unmasked quads.
    z_interp (ZInterp or str, optional): How to interpolate ``z`` values when determining where
        contour lines intersect the edges of quads and the ``z`` values of the central points of
        quads, specified either as a :class:`~contourpy.ZInterp` or its string equivalent such
        as ``"Log"``. Default is ``ZInterp.Linear``.
    thread_count (int): Number of threads to use for contour calculation, default 0. Threads can
        only be used with an algorithm ``name`` that supports threads (currently only
        ``name="threaded"``) and there must be at least the same number of chunks as threads.
        If ``thread_count=0`` and ``name="threaded"`` then it uses the maximum number of threads
        as determined by the C++11 call ``std::thread::hardware_concurrency()``. If ``name`` is
        something other than ``"threaded"`` then the ``thread_count`` will be set to ``1``.

Return:
    :class:`~.ContourGenerator`.

Note:
    A maximum of one of ``chunk_size``, ``chunk_count`` and ``total_chunk_count`` may be
    specified.

Warning:
    The ``name="mpl2005"`` algorithm does not implement chunking for contour lines.

---
## __name__
```python
from chunk import __name__
```



---
## calc_chunk_sizes
```python
from chunk import calc_chunk_sizes
```

Calculate chunk sizes.

Args:
    chunk_size (int or tuple(int, int), optional): Chunk size in (y, x) directions, or the same
        size in both directions if only one is specified. Cannot be negative.
    chunk_count (int or tuple(int, int), optional): Chunk count in (y, x) directions, or the
        same count in both directions if only one is specified. If less than 1, set to 1.
    total_chunk_count (int, optional): Total number of chunks. If less than 1, set to 1.
    ny (int): Number of grid points in y-direction.
    nx (int): Number of grid points in x-direction.

Return:
    tuple(int, int): Chunk sizes (y_chunk_size, x_chunk_size).

Note:
    Zero or one of ``chunk_size``, ``chunk_count`` and ``total_chunk_count`` should be
    specified.

---
## two_factors
```python
from chunk import two_factors
```

Split an integer into two integer factors.

The two factors will be as close as possible to the sqrt of n, and are returned in decreasing
order.  Worst case returns (n, 1).

Args:
    n (int): The integer to factorize, must be positive.

Return:
    tuple(int, int): The two factors of n, in decreasing order.

---
## __name__
```python
from enum_util import __name__
```



---
## as_fill_type
```python
from enum_util import as_fill_type
```

Coerce a FillType or string value to a FillType.

Args:
    fill_type (FillType or str): Value to convert.

Return:
    FillType: Converted value.

---
## as_line_type
```python
from enum_util import as_line_type
```

Coerce a LineType or string value to a LineType.

Args:
    line_type (LineType or str): Value to convert.

Return:
    LineType: Converted value.

---
## as_z_interp
```python
from enum_util import as_z_interp
```

Coerce a ZInterp or string value to a ZInterp.

Args:
    z_interp (ZInterp or str): Value to convert.

Return:
    ZInterp: Converted value.

---
## __name__
```python
from array import __name__
```

Test extension array for storing nested data in a pandas container.

The ListArray stores an ndarray of lists.

---
## codes_from_offsets
```python
from array import codes_from_offsets
```

Determine codes from offsets, assuming they all correspond to closed polygons.
    

---
## codes_from_offsets_and_points
```python
from array import codes_from_offsets_and_points
```

Determine codes from offsets and points, using the equality of the start and end points of
each line to determine if lines are closed or not.

---
## codes_from_points
```python
from array import codes_from_points
```

Determine codes for a single line, using the equality of the start and end points to
determine if the line is closed or not.

---
## concat_codes
```python
from array import concat_codes
```

Concatenate a list of codes arrays into a single code array.
    

---
## concat_codes_or_none
```python
from array import concat_codes_or_none
```

Concatenate a list of codes arrays or None into a single code array or None.
    

---
## concat_offsets
```python
from array import concat_offsets
```

Concatenate a list of offsets arrays into a single offset array.
    

---
## concat_offsets_or_none
```python
from array import concat_offsets_or_none
```

Concatenate a list of offsets arrays or None into a single offset array or None.
    

---
## concat_points
```python
from array import concat_points
```

Concatenate a list of point arrays into a single point array.
    

---
## concat_points_or_none
```python
from array import concat_points_or_none
```

Concatenate a list of point arrays or None into a single point array or None.
    

---
## concat_points_or_none_with_nan
```python
from array import concat_points_or_none_with_nan
```

Concatenate a list of points or None into a single point array or None, with NaNs used to
separate each line.

---
## concat_points_with_nan
```python
from array import concat_points_with_nan
```

Concatenate a list of points into a single point array with NaNs used to separate each line.
    

---
## insert_nan_at_offsets
```python
from array import insert_nan_at_offsets
```

Insert NaNs into a point array at locations specified by an offset array.
    

---
## offsets_from_codes
```python
from array import offsets_from_codes
```

Determine offsets from codes using locations of MOVETO codes.
    

---
## offsets_from_lengths
```python
from array import offsets_from_lengths
```

Determine offsets from lengths of point arrays.
    

---
## outer_offsets_from_list_of_codes
```python
from array import outer_offsets_from_list_of_codes
```

Determine outer offsets from codes using locations of MOVETO codes.
    

---
## outer_offsets_from_list_of_offsets
```python
from array import outer_offsets_from_list_of_offsets
```

Determine outer offsets from a list of offsets.
    

---
## remove_nan
```python
from array import remove_nan
```

Remove NaN from a points array, also return the offsets corresponding to the NaN removed.
    

---
## split_codes_by_offsets
```python
from array import split_codes_by_offsets
```

Split a code array at locations specified by an offset array into a list of code arrays.
    

---
## split_points_by_offsets
```python
from array import split_points_by_offsets
```

Split a point array at locations specified by an offset array into a list of point arrays.
    

---
## split_points_at_nan
```python
from array import split_points_at_nan
```

Split a points array at NaNs into a list of point arrays.
    

---
## __name__
```python
from _decoders import __name__
```

Handlers for Content-Encoding.

See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

---
## ContentDecoder
```python
from _decoders import ContentDecoder
```



---
## IdentityDecoder
```python
from _decoders import IdentityDecoder
```

Handle unencoded data.

---
## DeflateDecoder
```python
from _decoders import DeflateDecoder
```

Handle 'deflate' decoding.

See: https://stackoverflow.com/questions/1838699

---
## GZipDecoder
```python
from _decoders import GZipDecoder
```

Handle 'gzip' decoding.

See: https://stackoverflow.com/questions/1838699

---
## BrotliDecoder
```python
from _decoders import BrotliDecoder
```

Handle 'brotli' decoding.

Requires `pip install brotlipy`. See: https://brotlipy.readthedocs.io/
    or   `pip install brotli`. See https://github.com/google/brotli
Supports both 'brotlipy' and 'Brotli' packages since they share an import
name. The top branches are for 'brotlipy' and bottom branches for 'Brotli'

---
## ZStandardDecoder
```python
from _decoders import ZStandardDecoder
```

Handle 'zstd' RFC 8878 decoding.

Requires `pip install zstandard`.
Can be installed as a dependency of httpx using `pip install httpx[zstd]`.

---
## MultiDecoder
```python
from _decoders import MultiDecoder
```

Handle the case where multiple encodings have been applied.

---
## ByteChunker
```python
from _decoders import ByteChunker
```

Handles returning byte content in fixed-size chunks.

---
## TextChunker
```python
from _decoders import TextChunker
```

Handles returning text content in fixed-size chunks.

---
## TextDecoder
```python
from _decoders import TextDecoder
```

Handles incrementally decoding bytes into text

---
## LineDecoder
```python
from _decoders import LineDecoder
```

Handles incrementally reading lines from text.

Has the same behaviour as the stdllib splitlines,
but handling the input iteratively.

---
## decode
```python
from _decoders import decode
```



---
## flush
```python
from _decoders import flush
```



---
## __init__
```python
from _decoders import __init__
```



---
## __name__
```python
from _types import __name__
```



---
## SyncByteStream
```python
from _types import SyncByteStream
```



---
## AsyncByteStream
```python
from _types import AsyncByteStream
```



---
## __iter__
```python
from _types import __iter__
```



---
## close
```python
from _types import close
```

Subclasses can override this method to release any network resources
after a request/response cycle is complete.

---
## __name__
```python
from _main import __name__
```



---
## print_help
```python
from _main import print_help
```



---
## get_lexer_for_response
```python
from _main import get_lexer_for_response
```



---
## format_request_headers
```python
from _main import format_request_headers
```



---
## format_response_headers
```python
from _main import format_response_headers
```



---
## print_request_headers
```python
from _main import print_request_headers
```



---
## print_response_headers
```python
from _main import print_response_headers
```



---
## print_response
```python
from _main import print_response
```



---
## format_certificate
```python
from _main import format_certificate
```



---
## trace
```python
from _main import trace
```



---
## download_response
```python
from _main import download_response
```



---
## validate_json
```python
from _main import validate_json
```



---
## validate_auth
```python
from _main import validate_auth
```



---
## handle_help
```python
from _main import handle_help
```



---
## main
```python
from _main import main
```

An HTTP command line client.
Sends a request and displays the response.

---
## __name__
```python
from _urls import __name__
```



---
## URL
```python
from _urls import URL
```

url = httpx.URL("HTTPS://jo%40email.com:a%20secret@müller.de:1234/pa%20th?search=ab#anchorlink")

assert url.scheme == "https"
assert url.username == "jo@email.com"
assert url.password == "a secret"
assert url.userinfo == b"jo%40email.com:a%20secret"
assert url.host == "müller.de"
assert url.raw_host == b"xn--mller-kva.de"
assert url.port == 1234
assert url.netloc == b"xn--mller-kva.de:1234"
assert url.path == "/pa th"
assert url.query == b"?search=ab"
assert url.raw_path == b"/pa%20th?search=ab"
assert url.fragment == "anchorlink"

The components of a URL are broken down like this:

   https://jo%40email.com:a%20secret@müller.de:1234/pa%20th?search=ab#anchorlink
[scheme]   [  username  ] [password] [ host ][port][ path ] [ query ] [fragment]
           [       userinfo        ] [   netloc   ][    raw_path    ]

Note that:

* `url.scheme` is normalized to always be lowercased.

* `url.host` is normalized to always be lowercased. Internationalized domain
  names are represented in unicode, without IDNA encoding applied. For instance:

  url = httpx.URL("http://中国.icom.museum")
  assert url.host == "中国.icom.museum"
  url = httpx.URL("http://xn--fiqs8s.icom.museum")
  assert url.host == "中国.icom.museum"

* `url.raw_host` is normalized to always be lowercased, and is IDNA encoded.

  url = httpx.URL("http://中国.icom.museum")
  assert url.raw_host == b"xn--fiqs8s.icom.museum"
  url = httpx.URL("http://xn--fiqs8s.icom.museum")
  assert url.raw_host == b"xn--fiqs8s.icom.museum"

* `url.port` is either None or an integer. URLs that include the default port for
  "http", "https", "ws", "wss", and "ftp" schemes have their port
  normalized to `None`.

  assert httpx.URL("http://example.com") == httpx.URL("http://example.com:80")
  assert httpx.URL("http://example.com").port is None
  assert httpx.URL("http://example.com:80").port is None

* `url.userinfo` is raw bytes, without URL escaping. Usually you'll want to work
  with `url.username` and `url.password` instead, which handle the URL escaping.

* `url.raw_path` is raw bytes of both the path and query, without URL escaping.
  This portion is used as the target when constructing HTTP requests. Usually you'll
  want to work with `url.path` instead.

* `url.query` is raw bytes, without URL escaping. A URL query string portion can
  only be properly URL escaped when decoding the parameter names and values
  themselves.

---
## QueryParams
```python
from _urls import QueryParams
```

URL query parameters, as a multi-dict.

---
## __init__
```python
from _urls import __init__
```



---
## scheme
```python
from _urls import scheme
```

The URL scheme, such as "http", "https".
Always normalised to lowercase.

---
## raw_scheme
```python
from _urls import raw_scheme
```

The raw bytes representation of the URL scheme, such as b"http", b"https".
Always normalised to lowercase.

---
## userinfo
```python
from _urls import userinfo
```

The URL userinfo as a raw bytestring.
For example: b"jo%40email.com:a%20secret".

---
## username
```python
from _urls import username
```

The URL username as a string, with URL decoding applied.
For example: "jo@email.com"

---
## password
```python
from _urls import password
```

The URL password as a string, with URL decoding applied.
For example: "a secret"

---
## host
```python
from _urls import host
```

The URL host as a string.
Always normalized to lowercase, with IDNA hosts decoded into unicode.

Examples:

url = httpx.URL("http://www.EXAMPLE.org")
assert url.host == "www.example.org"

url = httpx.URL("http://中国.icom.museum")
assert url.host == "中国.icom.museum"

url = httpx.URL("http://xn--fiqs8s.icom.museum")
assert url.host == "中国.icom.museum"

url = httpx.URL("https://[::ffff:192.168.0.1]")
assert url.host == "::ffff:192.168.0.1"

---
## raw_host
```python
from _urls import raw_host
```

The raw bytes representation of the URL host.
Always normalized to lowercase, and IDNA encoded.

Examples:

url = httpx.URL("http://www.EXAMPLE.org")
assert url.raw_host == b"www.example.org"

url = httpx.URL("http://中国.icom.museum")
assert url.raw_host == b"xn--fiqs8s.icom.museum"

url = httpx.URL("http://xn--fiqs8s.icom.museum")
assert url.raw_host == b"xn--fiqs8s.icom.museum"

url = httpx.URL("https://[::ffff:192.168.0.1]")
assert url.raw_host == b"::ffff:192.168.0.1"

---
## port
```python
from _urls import port
```

The URL port as an integer.

Note that the URL class performs port normalization as per the WHATWG spec.
Default ports for "http", "https", "ws", "wss", and "ftp" schemes are always
treated as `None`.

For example:

assert httpx.URL("http://www.example.com") == httpx.URL("http://www.example.com:80")
assert httpx.URL("http://www.example.com:80").port is None

---
## netloc
```python
from _urls import netloc
```

Either `<host>` or `<host>:<port>` as bytes.
Always normalized to lowercase, and IDNA encoded.

This property may be used for generating the value of a request
"Host" header.

---
## path
```python
from _urls import path
```

The URL path as a string. Excluding the query string, and URL decoded.

For example:

url = httpx.URL("https://example.com/pa%20th")
assert url.path == "/pa th"

---
## query
```python
from _urls import query
```

The URL query string, as raw bytes, excluding the leading b"?".

This is necessarily a bytewise interface, because we cannot
perform URL decoding of this representation until we've parsed
the keys and values into a QueryParams instance.

For example:

url = httpx.URL("https://example.com/?filter=some%20search%20terms")
assert url.query == b"filter=some%20search%20terms"

---
## params
```python
from _urls import params
```

The URL query parameters, neatly parsed and packaged into an immutable
multidict representation.

---
## raw_path
```python
from _urls import raw_path
```

The complete URL path and query string as raw bytes.
Used as the target when constructing HTTP requests.

For example:

GET /users?search=some%20text HTTP/1.1
Host: www.example.org
Connection: close

---
## fragment
```python
from _urls import fragment
```

The URL fragments, as used in HTML anchors.
As a string, without the leading '#'.

---
## raw
```python
from _urls import raw
```

Provides the (scheme, host, port, target) for the outgoing request.

In older versions of `httpx` this was used in the low-level transport API.
We no longer use `RawURL`, and this property will be deprecated
in a future release.

---
## is_absolute_url
```python
from _urls import is_absolute_url
```

Return `True` for absolute URLs such as 'http://example.com/path',
and `False` for relative URLs such as '/path'.

---
## is_relative_url
```python
from _urls import is_relative_url
```

Return `False` for absolute URLs such as 'http://example.com/path',
and `True` for relative URLs such as '/path'.

---
## copy_with
```python
from _urls import copy_with
```

Copy this URL, returning a new URL with some components altered.
Accepts the same set of parameters as the components that are made
available via properties on the `URL` class.

For example:

url = httpx.URL("https://www.example.com").copy_with(
    username="jo@gmail.com", password="a secret"
)
assert url == "https://jo%40email.com:a%20secret@www.example.com"

---
## copy_set_param
```python
from _urls import copy_set_param
```



---
## copy_add_param
```python
from _urls import copy_add_param
```



---
## copy_remove_param
```python
from _urls import copy_remove_param
```



---
## copy_merge_params
```python
from _urls import copy_merge_params
```



---
## join
```python
from _urls import join
```

Return an absolute URL, using this URL as the base.

Eg.

url = httpx.URL("https://www.example.com/test")
url = url.join("/new/path")
assert url == "https://www.example.com/new/path"

---
## __hash__
```python
from _urls import __hash__
```



---
## __eq__
```python
from _urls import __eq__
```



---
## __str__
```python
from _urls import __str__
```

Note that we use '%20' encoding for spaces, and treat '/' as a safe
character.

See https://github.com/encode/httpx/issues/2536 and
https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode

---
## __repr__
```python
from _urls import __repr__
```



---
## keys
```python
from _urls import keys
```

Return all the keys in the query params.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert list(q.keys()) == ["a", "b"]

---
## values
```python
from _urls import values
```

Return all the values in the query params. If a key occurs more than once
only the first item for that key is returned.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert list(q.values()) == ["123", "789"]

---
## items
```python
from _urls import items
```

Return all items in the query params. If a key occurs more than once
only the first item for that key is returned.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert list(q.items()) == [("a", "123"), ("b", "789")]

---
## multi_items
```python
from _urls import multi_items
```

Return all items in the query params. Allow duplicate keys to occur.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert list(q.multi_items()) == [("a", "123"), ("a", "456"), ("b", "789")]

---
## get
```python
from _urls import get
```

Get a value from the query param for a given key. If the key occurs
more than once, then only the first value is returned.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert q.get("a") == "123"

---
## get_list
```python
from _urls import get_list
```

Get all values from the query param for a given key.

Usage:

q = httpx.QueryParams("a=123&a=456&b=789")
assert q.get_list("a") == ["123", "456"]

---
## set
```python
from _urls import set
```

Return a new QueryParams instance, setting the value of a key.

Usage:

q = httpx.QueryParams("a=123")
q = q.set("a", "456")
assert q == httpx.QueryParams("a=456")

---
## add
```python
from _urls import add
```

Return a new QueryParams instance, setting or appending the value of a key.

Usage:

q = httpx.QueryParams("a=123")
q = q.add("a", "456")
assert q == httpx.QueryParams("a=123&a=456")

---
## remove
```python
from _urls import remove
```

Return a new QueryParams instance, removing the value of a key.

Usage:

q = httpx.QueryParams("a=123")
q = q.remove("a")
assert q == httpx.QueryParams("")

---
## merge
```python
from _urls import merge
```

Return a new QueryParams instance, updated with.

Usage:

q = httpx.QueryParams("a=123")
q = q.merge({"b": "456"})
assert q == httpx.QueryParams("a=123&b=456")

q = httpx.QueryParams("a=123")
q = q.merge({"a": "456", "b": "789"})
assert q == httpx.QueryParams("a=456&b=789")

---
## __getitem__
```python
from _urls import __getitem__
```



---
## __contains__
```python
from _urls import __contains__
```



---
## __iter__
```python
from _urls import __iter__
```



---
## __len__
```python
from _urls import __len__
```



---
## __bool__
```python
from _urls import __bool__
```



---
## update
```python
from _urls import update
```



---
## __setitem__
```python
from _urls import __setitem__
```



---
## get
```python
from _api import get
```

Sends a `GET` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `GET` requests should not include a request body.

---
## options
```python
from _api import options
```



---
## head
```python
from _api import head
```

Sends a `HEAD` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `HEAD` requests should not include a request body.

---
## post
```python
from _api import post
```

Sends a `POST` request.

**Parameters**: See `httpx.request`.

---
## put
```python
from _api import put
```

Sends a `PUT` request.

**Parameters**: See `httpx.request`.

---
## patch
```python
from _api import patch
```

Sends a `PATCH` request.

**Parameters**: See `httpx.request`.

---
## delete
```python
from _api import delete
```

Sends a `DELETE` request.

**Parameters**: See `httpx.request`.

Note that the `data`, `files`, `json` and `content` parameters are not available
on this function, as `DELETE` requests should not include a request body.

---
## __name__
```python
from _multipart import __name__
```



---
## get_multipart_boundary_from_content_type
```python
from _multipart import get_multipart_boundary_from_content_type
```



---
## DataField
```python
from _multipart import DataField
```

A single form field item, within a multipart form field.

---
## FileField
```python
from _multipart import FileField
```

A single file field item, within a multipart form field.

---
## MultipartStream
```python
from _multipart import MultipartStream
```

Request content as streaming multipart encoded form data.

---
## __init__
```python
from _multipart import __init__
```



---
## render_headers
```python
from _multipart import render_headers
```



---
## render_data
```python
from _multipart import render_data
```



---
## get_length
```python
from _multipart import get_length
```



---
## render
```python
from _multipart import render
```



---
## _iter_fields
```python
from _multipart import _iter_fields
```



---
## iter_chunks
```python
from _multipart import iter_chunks
```



---
## get_content_length
```python
from _multipart import get_content_length
```

Return the length of the multipart encoded content, or `None` if
any of the files have a length that cannot be determined upfront.

---
## get_headers
```python
from _multipart import get_headers
```



---
## __iter__
```python
from _multipart import __iter__
```



---
## __name__
```python
from _content import __name__
```



---
## ByteStream
```python
from _content import ByteStream
```



---
## IteratorByteStream
```python
from _content import IteratorByteStream
```



---
## AsyncIteratorByteStream
```python
from _content import AsyncIteratorByteStream
```



---
## UnattachedStream
```python
from _content import UnattachedStream
```

If a request or response is serialized using pickle, then it is no longer
attached to a stream for I/O purposes. Any stream operations should result
in `httpx.StreamClosed`.

---
## encode_content
```python
from _content import encode_content
```



---
## encode_urlencoded_data
```python
from _content import encode_urlencoded_data
```



---
## encode_multipart_data
```python
from _content import encode_multipart_data
```



---
## encode_text
```python
from _content import encode_text
```



---
## encode_html
```python
from _content import encode_html
```



---
## encode_json
```python
from _content import encode_json
```



---
## encode_request
```python
from _content import encode_request
```

Handles encoding the given `content`, `data`, `files`, and `json`,
returning a two-tuple of (<headers>, <stream>).

---
## encode_response
```python
from _content import encode_response
```

Handles encoding the given `content`, returning a two-tuple of
(<headers>, <stream>).

---
## __init__
```python
from _content import __init__
```



---
## __iter__
```python
from _content import __iter__
```



---
## __name__
```python
from _client import __name__
```



---
## UseClientDefault
```python
from _client import UseClientDefault
```

For some parameters such as `auth=...` and `timeout=...` we need to be able
to indicate the default "unset" state, in a way that is distinctly different
to using `None`.

The default "unset" state indicates that whatever default is set on the
client should be used. This is different to setting `None`, which
explicitly disables the parameter, possibly overriding a client default.

For example we use `timeout=USE_CLIENT_DEFAULT` in the `request()` signature.
Omitting the `timeout` parameter will send a request using whatever default
timeout has been configured on the client. Including `timeout=None` will
ensure no timeout is used.

Note that user code shouldn't need to use the `USE_CLIENT_DEFAULT` constant,
but it is used internally when a parameter is not included.

---
## ClientState
```python
from _client import ClientState
```



---
## BoundSyncStream
```python
from _client import BoundSyncStream
```

A byte stream that is bound to a given response instance, and that
ensures the `response.elapsed` is set once the response is closed.

---
## BoundAsyncStream
```python
from _client import BoundAsyncStream
```

An async byte stream that is bound to a given response instance, and that
ensures the `response.elapsed` is set once the response is closed.

---
## BaseClient
```python
from _client import BaseClient
```



---
## Client
```python
from _client import Client
```

An HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc.

It can be shared between threads.

Usage:

```python
>>> client = httpx.Client()
>>> response = client.get('https://example.org')
```

**Parameters:**

* **auth** - *(optional)* An authentication class to use when sending
requests.
* **params** - *(optional)* Query parameters to include in request URLs, as
a string, dictionary, or sequence of two-tuples.
* **headers** - *(optional)* Dictionary of HTTP headers to include when
sending requests.
* **cookies** - *(optional)* Dictionary of Cookie items to include when
sending requests.
* **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
verify the identity of requested hosts. Either `True` (default CA bundle),
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
(which will disable verification).
* **cert** - *(optional)* An SSL certificate used by the requested host
to authenticate the client. Either a path to an SSL certificate file, or
two-tuple of (certificate file, key file), or a three-tuple of (certificate
file, key file, password).
* **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
* **proxies** - *(optional)* A dictionary mapping proxy keys to proxy
URLs.
* **timeout** - *(optional)* The timeout configuration to use when sending
requests.
* **limits** - *(optional)* The limits configuration to use.
* **max_redirects** - *(optional)* The maximum number of redirect responses
that should be followed.
* **base_url** - *(optional)* A URL to use as the base when building
request URLs.
* **transport** - *(optional)* A transport class to use for sending requests
over the network.
* **app** - *(optional)* An WSGI application to send requests to,
rather than sending actual network requests.
* **trust_env** - *(optional)* Enables or disables usage of environment
variables for configuration.
* **default_encoding** - *(optional)* The default encoding to use for decoding
response text, if no charset information is included in a response Content-Type
header. Set to a callable for automatic character set detection. Default: "utf-8".

---
## AsyncClient
```python
from _client import AsyncClient
```

An asynchronous HTTP client, with connection pooling, HTTP/2, redirects,
cookie persistence, etc.

It can be shared between tasks.

Usage:

```python
>>> async with httpx.AsyncClient() as client:
>>>     response = await client.get('https://example.org')
```

**Parameters:**

* **auth** - *(optional)* An authentication class to use when sending
requests.
* **params** - *(optional)* Query parameters to include in request URLs, as
a string, dictionary, or sequence of two-tuples.
* **headers** - *(optional)* Dictionary of HTTP headers to include when
sending requests.
* **cookies** - *(optional)* Dictionary of Cookie items to include when
sending requests.
* **verify** - *(optional)* SSL certificates (a.k.a CA bundle) used to
verify the identity of requested hosts. Either `True` (default CA bundle),
a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
(which will disable verification).
* **cert** - *(optional)* An SSL certificate used by the requested host
to authenticate the client. Either a path to an SSL certificate file, or
two-tuple of (certificate file, key file), or a three-tuple of (certificate
file, key file, password).
* **http2** - *(optional)* A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
* **proxy** - *(optional)* A proxy URL where all the traffic should be routed.
* **proxies** - *(optional)* A dictionary mapping HTTP protocols to proxy
URLs.
* **timeout** - *(optional)* The timeout configuration to use when sending
requests.
* **limits** - *(optional)* The limits configuration to use.
* **max_redirects** - *(optional)* The maximum number of redirect responses
that should be followed.
* **base_url** - *(optional)* A URL to use as the base when building
request URLs.
* **transport** - *(optional)* A transport class to use for sending requests
over the network.
* **app** - *(optional)* An ASGI application to send requests to,
rather than sending actual network requests.
* **trust_env** - *(optional)* Enables or disables usage of environment
variables for configuration.
* **default_encoding** - *(optional)* The default encoding to use for decoding
response text, if no charset information is included in a response Content-Type
header. Set to a callable for automatic character set detection. Default: "utf-8".

---
## __init__
```python
from _client import __init__
```



---
## __iter__
```python
from _client import __iter__
```



---
## close
```python
from _client import close
```

Close transport and proxies.

---
## is_closed
```python
from _client import is_closed
```

Check if the client being closed

---
## trust_env
```python
from _client import trust_env
```



---
## _enforce_trailing_slash
```python
from _client import _enforce_trailing_slash
```



---
## _get_proxy_map
```python
from _client import _get_proxy_map
```



---
## timeout
```python
from _client import timeout
```



---
## event_hooks
```python
from _client import event_hooks
```



---
## auth
```python
from _client import auth
```



---
## base_url
```python
from _client import base_url
```



---
## headers
```python
from _client import headers
```



---
## cookies
```python
from _client import cookies
```



---
## params
```python
from _client import params
```



---
## build_request
```python
from _client import build_request
```

Build and return a request instance.

* The `params`, `headers` and `cookies` arguments
are merged with any values set on the client.
* The `url` argument is merged with any `base_url` set on the client.

See also: [Request instances][0]

[0]: /advanced/clients/#request-instances

---
## _merge_url
```python
from _client import _merge_url
```

Merge a URL argument together with any 'base_url' on the client,
to create the URL used for the outgoing request.

---
## _merge_cookies
```python
from _client import _merge_cookies
```

Merge a cookies argument together with any cookies on the client,
to create the cookies used for the outgoing request.

---
## _merge_headers
```python
from _client import _merge_headers
```

Merge a headers argument together with any headers on the client,
to create the headers used for the outgoing request.

---
## _merge_queryparams
```python
from _client import _merge_queryparams
```

Merge a queryparams argument together with any queryparams on the client,
to create the queryparams used for the outgoing request.

---
## _build_auth
```python
from _client import _build_auth
```



---
## _build_request_auth
```python
from _client import _build_request_auth
```



---
## _build_redirect_request
```python
from _client import _build_redirect_request
```

Given a request and a redirect response, return a new request that
should be used to effect the redirect.

---
## _redirect_method
```python
from _client import _redirect_method
```

When being redirected we may want to change the method of the request
based on certain specs or browser behavior.

---
## _redirect_url
```python
from _client import _redirect_url
```

Return the URL for the redirect to follow.

---
## _redirect_headers
```python
from _client import _redirect_headers
```

Return the headers that should be used for the redirect request.

---
## _redirect_stream
```python
from _client import _redirect_stream
```

Return the body that should be used for the redirect request.

---
## _set_timeout
```python
from _client import _set_timeout
```



---
## _init_transport
```python
from _client import _init_transport
```



---
## _init_proxy_transport
```python
from _client import _init_proxy_transport
```



---
## _transport_for_url
```python
from _client import _transport_for_url
```

Returns the transport instance that should be used for a given URL.
This will either be the standard connection pool, or a proxy.

---
## request
```python
from _client import request
```

Build and send a request.

Equivalent to:

```python
request = client.build_request(...)
response = client.send(request, ...)
```

See `Client.build_request()`, `Client.send()` and
[Merging of configuration][0] for how the various parameters
are merged with client-level configuration.

[0]: /advanced/clients/#merging-of-configuration

---
## stream
```python
from _client import stream
```

Alternative to `httpx.request()` that streams the response body
instead of loading it into memory at once.

**Parameters**: See `httpx.request`.

See also: [Streaming Responses][0]

[0]: /quickstart#streaming-responses

---
## send
```python
from _client import send
```

Send a request.

The request is sent as-is, unmodified.

Typically you'll want to build one with `Client.build_request()`
so that any client-level configuration is merged into the request,
but passing an explicit `httpx.Request()` is supported as well.

See also: [Request instances][0]

[0]: /advanced/clients/#request-instances

---
## _send_handling_auth
```python
from _client import _send_handling_auth
```



---
## _send_handling_redirects
```python
from _client import _send_handling_redirects
```



---
## _send_single_request
```python
from _client import _send_single_request
```

Sends a single request, without handling any redirections.

---
## get
```python
from _client import get
```

Send a `GET` request.

**Parameters**: See `httpx.request`.

---
## options
```python
from _client import options
```

Send an `OPTIONS` request.

**Parameters**: See `httpx.request`.

---
## head
```python
from _client import head
```

Send a `HEAD` request.

**Parameters**: See `httpx.request`.

---
## post
```python
from _client import post
```

Make a POST request to the inference server.

Args:
    json (`Union[str, Dict, List]`, *optional*):
        The JSON data to send in the request body, specific to each task. Defaults to None.
    data (`Union[str, Path, bytes, BinaryIO]`, *optional*):
        The content to send in the request body, specific to each task.
        It can be raw bytes, a pointer to an opened file, a local file path,
        or a URL to an online resource (image, audio file,...). If both `json` and `data` are passed,
        `data` will take precedence. At least `json` or `data` must be provided. Defaults to None.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. Will override the model defined at the instance level. Defaults to None.
    task (`str`, *optional*):
        The task to perform on the inference. All available tasks can be found
        [here](https://huggingface.co/tasks). Used only to default to a recommended model if `model` is not
        provided. At least `model` or `task` must be provided. Defaults to None.
    stream (`bool`, *optional*):
        Whether to iterate over streaming APIs.

Returns:
    bytes: The raw bytes returned by the server.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

---
## put
```python
from _client import put
```

Send a `PUT` request.

**Parameters**: See `httpx.request`.

---
## patch
```python
from _client import patch
```

Send a `PATCH` request.

**Parameters**: See `httpx.request`.

---
## delete
```python
from _client import delete
```

Send a `DELETE` request.

**Parameters**: See `httpx.request`.

---
## __enter__
```python
from _client import __enter__
```



---
## __exit__
```python
from _client import __exit__
```



---
## __name__
```python
from _urlparse import __name__
```

An implementation of `urlparse` that provides URL validation and normalization
as described by RFC3986.

We rely on this implementation rather than the one in Python's stdlib, because:

* It provides more complete URL validation.
* It properly differentiates between an empty querystring and an absent querystring,
  to distinguish URLs with a trailing '?'.
* It handles scheme, hostname, port, and path normalization.
* It supports IDNA hostnames, normalizing them to their encoded form.
* The API supports passing individual components, as well as the complete URL string.

Previously we relied on the excellent `rfc3986` package to handle URL parsing and
validation, but this module provides a simpler alternative, with less indirection
required.

---
## ParseResult
```python
from _urlparse import ParseResult
```



---
## urlparse
```python
from _urlparse import urlparse
```



---
## encode_host
```python
from _urlparse import encode_host
```



---
## normalize_port
```python
from _urlparse import normalize_port
```



---
## validate_path
```python
from _urlparse import validate_path
```

Path validation rules that depend on if the URL contains
a scheme or authority component.

See https://datatracker.ietf.org/doc/html/rfc3986.html#section-3.3

---
## normalize_path
```python
from _urlparse import normalize_path
```

Drop "." and ".." segments from a URL path.

For example:

    normalize_path("/path/./to/somewhere/..") == "/path/to"

---
## PERCENT
```python
from _urlparse import PERCENT
```



---
## percent_encoded
```python
from _urlparse import percent_encoded
```

Use percent-encoding to quote a string.

---
## quote
```python
from _urlparse import quote
```

Use percent-encoding to quote a string, omitting existing '%xx' escape sequences.

See: https://www.rfc-editor.org/rfc/rfc3986#section-2.1

* `string`: The string to be percent-escaped.
* `safe`: A string containing characters that may be treated as safe, and do not
    need to be escaped. Unreserved characters are always treated as safe.
    See: https://www.rfc-editor.org/rfc/rfc3986#section-2.3

---
## urlencode
```python
from _urlparse import urlencode
```

We can use a much simpler version of the stdlib urlencode here because
we don't need to handle a bunch of different typing cases, such as bytes vs str.

https://github.com/python/cpython/blob/b2f7b2ef0b5421e01efb8c7bee2ef95d3bab77eb/Lib/urllib/parse.py#L926

Note that we use '%20' encoding for spaces. and '%2F  for '/'.
This is slightly different than `requests`, but is the behaviour that browsers use.

See
- https://github.com/encode/httpx/issues/2536
- https://github.com/encode/httpx/issues/2721
- https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode

---
## authority
```python
from _urlparse import authority
```



---
## netloc
```python
from _urlparse import netloc
```



---
## copy_with
```python
from _urlparse import copy_with
```



---
## __str__
```python
from _urlparse import __str__
```



---
## Headers
```python
from _models import Headers
```

HTTP headers, as a case-insensitive multi-dict.

---
## Cookies
```python
from _models import Cookies
```

HTTP Cookies, as a mutable mapping.

---
## encoding
```python
from _models import encoding
```

Set the encoding to use for decoding the byte content into text.

If the `text` attribute has been accessed, attempting to set the
encoding will throw a ValueError.

---
## raw
```python
from _models import raw
```

Returns a list of the raw header items, as byte pairs.

---
## keys
```python
from _models import keys
```



---
## values
```python
from _models import values
```



---
## items
```python
from _models import items
```

Return `(key, value)` items of headers. Concatenate headers
into a single comma separated value when a key occurs multiple times.

---
## multi_items
```python
from _models import multi_items
```

Return a list of `(key, value)` pairs of headers. Allow multiple
occurrences of the same key without concatenating into a single
comma separated value.

---
## get
```python
from _models import get
```

Get a cookie by name. May optionally include domain and path
in order to specify exactly which cookie to retrieve.

---
## get_list
```python
from _models import get_list
```

Return a list of all header values for a given key.
If `split_commas=True` is passed, then any comma separated header
values are split into multiple return strings.

---
## update
```python
from _models import update
```



---
## copy
```python
from _models import copy
```



---
## __getitem__
```python
from _models import __getitem__
```



---
## __setitem__
```python
from _models import __setitem__
```



---
## __delitem__
```python
from _models import __delitem__
```



---
## __contains__
```python
from _models import __contains__
```



---
## __len__
```python
from _models import __len__
```



---
## _prepare
```python
from _models import _prepare
```



---
## __getstate__
```python
from _models import __getstate__
```



---
## __setstate__
```python
from _models import __setstate__
```



---
## elapsed
```python
from _models import elapsed
```



---
## request
```python
from _models import request
```



---
## http_version
```python
from _models import http_version
```



---
## reason_phrase
```python
from _models import reason_phrase
```



---
## url
```python
from _models import url
```

Returns the URL for which the request was made.

---
## text
```python
from _models import text
```



---
## charset_encoding
```python
from _models import charset_encoding
```

Return the encoding, as specified by the Content-Type header.

---
## _get_content_decoder
```python
from _models import _get_content_decoder
```

Returns a decoder instance which can be used to decode the raw byte
content, depending on the Content-Encoding used in the response.

---
## is_informational
```python
from _models import is_informational
```

A property which is `True` for 1xx status codes, `False` otherwise.

---
## is_success
```python
from _models import is_success
```

A property which is `True` for 2xx status codes, `False` otherwise.

---
## is_redirect
```python
from _models import is_redirect
```

A property which is `True` for 3xx status codes, `False` otherwise.

Note that not all responses with a 3xx status code indicate a URL redirect.

Use `response.has_redirect_location` to determine responses with a properly
formed URL redirection.

---
## is_client_error
```python
from _models import is_client_error
```

A property which is `True` for 4xx status codes, `False` otherwise.

---
## is_server_error
```python
from _models import is_server_error
```

A property which is `True` for 5xx status codes, `False` otherwise.

---
## is_error
```python
from _models import is_error
```

A property which is `True` for 4xx and 5xx status codes, `False` otherwise.

---
## has_redirect_location
```python
from _models import has_redirect_location
```

Returns True for 3xx responses with a properly formed URL redirection,
`False` otherwise.

---
## raise_for_status
```python
from _models import raise_for_status
```

Raise the `HTTPStatusError` if one occurred.

---
## json
```python
from _models import json
```



---
## cookies
```python
from _models import cookies
```



---
## links
```python
from _models import links
```

Returns the parsed header links of the response, if any

---
## num_bytes_downloaded
```python
from _models import num_bytes_downloaded
```



---
## iter_bytes
```python
from _models import iter_bytes
```

A byte-iterator over the decoded response content.
This allows us to handle gzip, deflate, brotli, and zstd encoded responses.

---
## iter_text
```python
from _models import iter_text
```

A str-iterator over the decoded response content
that handles both gzip, deflate, etc but also detects the content's
string encoding.

---
## iter_lines
```python
from _models import iter_lines
```



---
## iter_raw
```python
from _models import iter_raw
```

A byte-iterator over the raw response content.

---
## extract_cookies
```python
from _models import extract_cookies
```

Loads any cookies based on the response `Set-Cookie` headers.

---
## set_cookie_header
```python
from _models import set_cookie_header
```

Sets an appropriate 'Cookie:' HTTP header on the `Request`.

---
## set
```python
from _models import set
```

Set a cookie value by name. May optionally include domain and path.

---
## delete
```python
from _models import delete
```

Delete a cookie by name. May optionally include domain and path
in order to specify exactly which cookie to delete.

---
## clear
```python
from _models import clear
```

Delete all cookies. Optionally include a domain and path in
order to only delete a subset of all the cookies.

---
## __bool__
```python
from _models import __bool__
```



---
## _CookieCompatRequest
```python
from _models import _CookieCompatRequest
```

Wraps a `Request` instance up in a compatibility interface suitable
for use with `CookieJar` operations.

---
## _CookieCompatResponse
```python
from _models import _CookieCompatResponse
```

Wraps a `Request` instance up in a compatibility interface suitable
for use with `CookieJar` operations.

---
## add_unredirected_header
```python
from _models import add_unredirected_header
```



---
## info
```python
from _models import info
```



---
## set_minimum_tls_version_1_2
```python
from _compat import set_minimum_tls_version_1_2
```



---
## __name__
```python
from _config import __name__
```



---
## UnsetType
```python
from _config import UnsetType
```



---
## create_ssl_context
```python
from _config import create_ssl_context
```



---
## SSLConfig
```python
from _config import SSLConfig
```

SSL Configuration.

---
## Timeout
```python
from _config import Timeout
```

Timeout configuration.

**Usage**:

Timeout(None)               # No timeouts.
Timeout(5.0)                # 5s timeout on all operations.
Timeout(None, connect=5.0)  # 5s timeout on connect, no other timeouts.
Timeout(5.0, connect=10.0)  # 10s timeout on connect. 5s timeout elsewhere.
Timeout(5.0, pool=None)     # No timeout on acquiring connection from pool.
                            # 5s timeout elsewhere.

---
## Limits
```python
from _config import Limits
```

Configuration for limits to various client behaviors.

**Parameters:**

* **max_connections** - The maximum number of concurrent connections that may be
        established.
* **max_keepalive_connections** - Allow the connection pool to maintain
        keep-alive connections below this point. Should be less than or equal
        to `max_connections`.
* **keepalive_expiry** - Time limit on idle keep-alive connections in seconds.

---
## Proxy
```python
from _config import Proxy
```



---
## __init__
```python
from _config import __init__
```



---
## load_ssl_context
```python
from _config import load_ssl_context
```



---
## load_ssl_context_no_verify
```python
from _config import load_ssl_context_no_verify
```

Return an SSL context for unverified connections.

---
## load_ssl_context_verify
```python
from _config import load_ssl_context_verify
```

Return an SSL context for verified connections.

---
## _create_default_ssl_context
```python
from _config import _create_default_ssl_context
```

Creates the default SSLContext object that's used for both verified
and unverified connections.

---
## _load_client_certs
```python
from _config import _load_client_certs
```

Loads client certificates into our SSLContext object

---
## as_dict
```python
from _config import as_dict
```



---
## __eq__
```python
from _config import __eq__
```



---
## __repr__
```python
from _config import __repr__
```



---
## raw_auth
```python
from _config import raw_auth
```



---
## __name__
```python
from _status_codes import __name__
```



---
## codes
```python
from _status_codes import codes
```

HTTP status codes and reason phrases

Status codes from the following RFCs are all observed:

    * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
    * RFC 6585: Additional HTTP Status Codes
    * RFC 3229: Delta encoding in HTTP
    * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
    * RFC 5842: Binding Extensions to WebDAV
    * RFC 7238: Permanent Redirect
    * RFC 2295: Transparent Content Negotiation in HTTP
    * RFC 2774: An HTTP Extension Framework
    * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2)
    * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)
    * RFC 7725: An HTTP Status Code to Report Legal Obstacles
    * RFC 8297: An HTTP Status Code for Indicating Hints
    * RFC 8470: Using Early Data in HTTP

---
## __new__
```python
from _status_codes import __new__
```



---
## __str__
```python
from _status_codes import __str__
```



---
## get_reason_phrase
```python
from _status_codes import get_reason_phrase
```



---
## is_informational
```python
from _status_codes import is_informational
```

Returns `True` for 1xx status codes, `False` otherwise.

---
## is_success
```python
from _status_codes import is_success
```

Returns `True` for 2xx status codes, `False` otherwise.

---
## is_redirect
```python
from _status_codes import is_redirect
```

Returns `True` for 3xx status codes, `False` otherwise.

---
## is_client_error
```python
from _status_codes import is_client_error
```

Returns `True` for 4xx status codes, `False` otherwise.

---
## is_server_error
```python
from _status_codes import is_server_error
```

Returns `True` for 5xx status codes, `False` otherwise.

---
## is_error
```python
from _status_codes import is_error
```

Returns `True` for 4xx or 5xx status codes, `False` otherwise.

---
## HTTPError
```python
from _exceptions import HTTPError
```

Base class for `RequestError` and `HTTPStatusError`.

Useful for `try...except` blocks when issuing a request,
and then calling `.raise_for_status()`.

For example:

```
try:
    response = httpx.get("https://www.example.com")
    response.raise_for_status()
except httpx.HTTPError as exc:
    print(f"HTTP Exception for {exc.request.url} - {exc}")
```

---
## RequestError
```python
from _exceptions import RequestError
```

Base class for all exceptions that may occur when issuing a `.request()`.

---
## TransportError
```python
from _exceptions import TransportError
```

Base class for all exceptions that occur at the level of the Transport API.

---
## CloseError
```python
from _exceptions import CloseError
```

Failed to close a connection.

---
## DecodingError
```python
from _exceptions import DecodingError
```

Decoding of the response failed, due to a malformed encoding.

---
## TooManyRedirects
```python
from _exceptions import TooManyRedirects
```

Too many redirects.

---
## HTTPStatusError
```python
from _exceptions import HTTPStatusError
```

The response had an error HTTP status of 4xx or 5xx.

May be raised when calling `response.raise_for_status()`

---
## InvalidURL
```python
from _exceptions import InvalidURL
```

URL is improperly formed or cannot be parsed.

---
## CookieConflict
```python
from _exceptions import CookieConflict
```

Attempted to lookup a cookie by name, but multiple cookies existed.

Can occur when calling `response.cookies.get(...)`.

---
## StreamError
```python
from _exceptions import StreamError
```

The base class for stream exceptions.

The developer made an error in accessing the request stream in
an invalid way.

---
## StreamConsumed
```python
from _exceptions import StreamConsumed
```

Attempted to read or stream content, but the content has already
been streamed.

---
## StreamClosed
```python
from _exceptions import StreamClosed
```

Attempted to read or stream response content, but the request has been
closed.

---
## ResponseNotRead
```python
from _exceptions import ResponseNotRead
```

Attempted to access streaming response content, without having called `read()`.

---
## RequestNotRead
```python
from _exceptions import RequestNotRead
```

Attempted to access streaming request content, without having called `read()`.

---
## request_context
```python
from _exceptions import request_context
```

A context manager that can be used to attach the given request context
to any `RequestError` exceptions that are raised within the block.

---
## __init__
```python
from _exceptions import __init__
```



---
## request
```python
from _exceptions import request
```



---
## __name__
```python
from _auth import __name__
```



---
## Auth
```python
from _auth import Auth
```

Base class for all authentication schemes.

To implement a custom authentication scheme, subclass `Auth` and override
the `.auth_flow()` method.

If the authentication scheme does I/O such as disk access or network calls, or uses
synchronization primitives such as locks, you should override `.sync_auth_flow()`
and/or `.async_auth_flow()` instead of `.auth_flow()` to provide specialized
implementations that will be used by `Client` and `AsyncClient` respectively.

---
## FunctionAuth
```python
from _auth import FunctionAuth
```

Allows the 'auth' argument to be passed as a simple callable function,
that takes the request, and returns a new, modified request.

---
## BasicAuth
```python
from _auth import BasicAuth
```

Allows the 'auth' argument to be passed as a (username, password) pair,
and uses HTTP Basic authentication.

---
## NetRCAuth
```python
from _auth import NetRCAuth
```

Use a 'netrc' file to lookup basic auth credentials based on the url host.

---
## DigestAuth
```python
from _auth import DigestAuth
```



---
## _DigestAuthChallenge
```python
from _auth import _DigestAuthChallenge
```



---
## auth_flow
```python
from _auth import auth_flow
```



---
## sync_auth_flow
```python
from _auth import sync_auth_flow
```

Execute the authentication flow synchronously.

By default, this defers to `.auth_flow()`. You should override this method
when the authentication scheme does I/O and/or uses concurrency primitives.

---
## __init__
```python
from _auth import __init__
```



---
## _build_auth_header
```python
from _auth import _build_auth_header
```



---
## _parse_challenge
```python
from _auth import _parse_challenge
```

Returns a challenge from a Digest WWW-Authenticate header.
These take the form of:
`Digest realm="realm@host.com",qop="auth,auth-int",nonce="abc",opaque="xyz"`

---
## _get_client_nonce
```python
from _auth import _get_client_nonce
```



---
## _get_header_value
```python
from _auth import _get_header_value
```



---
## _resolve_qop
```python
from _auth import _resolve_qop
```



---
## digest
```python
from _auth import digest
```



---
## normalize_header_key
```python
from _utils import normalize_header_key
```

Coerce str/bytes into a strictly byte-wise HTTP header key.

---
## normalize_header_value
```python
from _utils import normalize_header_value
```

Coerce str/bytes into a strictly byte-wise HTTP header value.

---
## primitive_value_to_str
```python
from _utils import primitive_value_to_str
```

Coerce a primitive data type into a string value.

Note that we prefer JSON-style 'true'/'false' for boolean values here.

---
## is_known_encoding
```python
from _utils import is_known_encoding
```

Return `True` if `encoding` is a known codec.

---
## format_form_param
```python
from _utils import format_form_param
```

Encode a name/value pair within a multipart form.

---
## get_ca_bundle_from_env
```python
from _utils import get_ca_bundle_from_env
```



---
## parse_header_links
```python
from _utils import parse_header_links
```

Returns a list of parsed link headers, for more info see:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link
The generic syntax of those is:
Link: < uri-reference >; param1=value1; param2="value2"
So for instance:
Link; '<http:/.../front.jpeg>; type="image/jpeg",<http://.../back.jpeg>;'
would return
    [
        {"url": "http:/.../front.jpeg", "type": "image/jpeg"},
        {"url": "http://.../back.jpeg"},
    ]
:param value: HTTP Link entity-header field
:return: list of parsed link headers

---
## parse_content_type_charset
```python
from _utils import parse_content_type_charset
```



---
## obfuscate_sensitive_headers
```python
from _utils import obfuscate_sensitive_headers
```



---
## port_or_default
```python
from _utils import port_or_default
```



---
## same_origin
```python
from _utils import same_origin
```

Return 'True' if the given URLs share the same origin.

---
## is_https_redirect
```python
from _utils import is_https_redirect
```

Return 'True' if 'location' is a HTTPS upgrade of 'url'

---
## get_environment_proxies
```python
from _utils import get_environment_proxies
```

Gets proxy information from the environment

---
## to_bytes
```python
from _utils import to_bytes
```



---
## to_str
```python
from _utils import to_str
```



---
## to_bytes_or_str
```python
from _utils import to_bytes_or_str
```



---
## unquote
```python
from _utils import unquote
```



---
## guess_content_type
```python
from _utils import guess_content_type
```



---
## peek_filelike_length
```python
from _utils import peek_filelike_length
```

Given a file-like stream object, return its length in number of bytes
without reading it into memory.

---
## Timer
```python
from _utils import Timer
```



---
## URLPattern
```python
from _utils import URLPattern
```

A utility class currently used for making lookups against proxy keys...

# Wildcard matching...
>>> pattern = URLPattern("all://")
>>> pattern.matches(httpx.URL("http://example.com"))
True

# Witch scheme matching...
>>> pattern = URLPattern("https://")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
False

# With domain matching...
>>> pattern = URLPattern("https://example.com")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
False
>>> pattern.matches(httpx.URL("https://other.com"))
False

# Wildcard scheme, with domain matching...
>>> pattern = URLPattern("all://example.com")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
True
>>> pattern.matches(httpx.URL("https://other.com"))
False

# With port matching...
>>> pattern = URLPattern("https://example.com:1234")
>>> pattern.matches(httpx.URL("https://example.com:1234"))
True
>>> pattern.matches(httpx.URL("https://example.com"))
False

---
## is_ipv4_hostname
```python
from _utils import is_ipv4_hostname
```



---
## is_ipv6_hostname
```python
from _utils import is_ipv6_hostname
```



---
## replacer
```python
from _utils import replacer
```



---
## sync_start
```python
from _utils import sync_start
```



---
## sync_elapsed
```python
from _utils import sync_elapsed
```



---
## matches
```python
from _utils import matches
```



---
## priority
```python
from _utils import priority
```

The priority allows URLPattern instances to be sortable, so that
we can match from most specific to least specific.

---
## __hash__
```python
from _utils import __hash__
```



---
## __lt__
```python
from _utils import __lt__
```



---
## __eq__
```python
from _utils import __eq__
```



---
## _comparator
```python
from version import _comparator
```

Wrap a Version binary op method in a type-check.

---
## _cmp
```python
from version import _cmp
```

Return negative if a<b, zero if a==b, positive if a>b.

---
## wrapper
```python
from version import wrapper
```



---
## _nat_cmp
```python
from version import _nat_cmp
```



---
## patch
```python
from version import patch
```



---
## prerelease
```python
from version import prerelease
```



---
## build
```python
from version import build
```



---
## to_tuple
```python
from version import to_tuple
```

Convert the Version object to a tuple.

.. versionadded:: 2.10.0
   Renamed :meth:`Version._astuple` to :meth:`Version.to_tuple` to
   make this function available in the public API.

:return: a tuple with all the parts

>>> semver.Version(5, 3, 1).to_tuple()
(5, 3, 1, None, None)

---
## to_dict
```python
from version import to_dict
```

Convert the Version object to an dict.

.. versionadded:: 2.10.0
   Renamed :meth:`Version._asdict` to :meth:`Version.to_dict` to
   make this function available in the public API.

:return: an dict with the keys in the order ``major``, ``minor``,
  ``patch``, ``prerelease``, and ``build``.

>>> semver.Version(3, 2, 1).to_dict()
{'major': 3, 'minor': 2, 'patch': 1, 'prerelease': None, 'build': None}

---
## __iter__
```python
from version import __iter__
```

Return iter(self).

---
## _increment_string
```python
from version import _increment_string
```

Look for the last sequence of number(s) in a string and increment.

:param string: the string to search for.
:return: the incremented string

Source:
http://code.activestate.com/recipes/442460-increment-numbers-in-a-string/#c1

---
## bump_major
```python
from version import bump_major
```

Raise the major part of the version, return a new object but leave self
untouched.

:return: new object with the raised major part

>>> ver = semver.parse("3.4.5")
>>> ver.bump_major()
Version(major=4, minor=0, patch=0, prerelease=None, build=None)

---
## bump_minor
```python
from version import bump_minor
```

Raise the minor part of the version, return a new object but leave self
untouched.

:return: new object with the raised minor part

>>> ver = semver.parse("3.4.5")
>>> ver.bump_minor()
Version(major=3, minor=5, patch=0, prerelease=None, build=None)

---
## bump_patch
```python
from version import bump_patch
```

Raise the patch part of the version, return a new object but leave self
untouched.

:return: new object with the raised patch part

>>> ver = semver.parse("3.4.5")
>>> ver.bump_patch()
Version(major=3, minor=4, patch=6, prerelease=None, build=None)

---
## bump_prerelease
```python
from version import bump_prerelease
```

Raise the prerelease part of the version, return a new object but leave
self untouched.

:param token: defaults to ``'rc'``
:return: new :class:`Version` object with the raised prerelease part.
    The original object is not modified.

>>> ver = semver.parse("3.4.5")
>>> ver.bump_prerelease().prerelease
'rc.2'
>>> ver.bump_prerelease('').prerelease
'1'
>>> ver.bump_prerelease(None).prerelease
'rc.1'

---
## bump_build
```python
from version import bump_build
```

Raise the build part of the version, return a new object but leave self
untouched.

:param token: defaults to ``'build'``
:return: new :class:`Version` object with the raised build part.
    The original object is not modified.

>>> ver = semver.parse("3.4.5-rc.1+build.9")
>>> ver.bump_build()
Version(major=3, minor=4, patch=5, prerelease='rc.1', build='build.10')

---
## compare
```python
from version import compare
```

Compare self with other.

:param other: the second version
:return: The return value is negative if ver1 < ver2,
     zero if ver1 == ver2 and strictly positive if ver1 > ver2

>>> semver.compare("2.0.0")
-1
>>> semver.compare("1.0.0")
1
>>> semver.compare("2.0.0")
0
>>> semver.compare(dict(major=2, minor=0, patch=0))
0

---
## next_version
```python
from version import next_version
```

Determines next version, preserving natural order.

.. versionadded:: 2.10.0

This function is taking prereleases into account.
The "major", "minor", and "patch" raises the respective parts like
the ``bump_*`` functions. The real difference is using the
"prerelease" part. It gives you the next patch version of the
prerelease, for example:

>>> str(semver.parse("0.1.4").next_version("prerelease"))
'0.1.5-rc.1'

:param part: One of "major", "minor", "patch", or "prerelease"
:param prerelease_token: prefix string of prerelease, defaults to 'rc'
:return: new object with the appropriate part raised

---
## __getitem__
```python
from version import __getitem__
```

self.__getitem__(index) <==> self[index] Implement getitem.

If the part  requested is undefined, or a part of the range requested
is undefined, it will throw an index error.
Negative indices are not supported.

:param index: a positive integer indicating the
       offset or a :func:`slice` object
:raises IndexError: if index is beyond the range or a part is None
:return: the requested part of the version at position index

>>> ver = semver.Version.parse("3.4.5")
>>> ver[0], ver[1], ver[2]
(3, 4, 5)

---
## finalize_version
```python
from version import finalize_version
```

Remove any prerelease and build metadata from the version.

:return: a new instance with the finalized version string

>>> str(semver.Version.parse('1.2.3-rc.5').finalize_version())
'1.2.3'

---
## match
```python
from version import match
```

Check if the provided version matches the constraints.

:param version: The version to match against this instance.
:type version: String or :class:`Version` instance.

---
## replace
```python
from version import replace
```

Replace one or more parts of a version and return a new :class:`Version`
object, but leave self untouched.

.. versionadded:: 2.9.0
   Added :func:`Version.replace`

:param parts: the parts to be updated. Valid keys are:
  ``major``, ``minor``, ``patch``, ``prerelease``, or ``build``
:return: the new :class:`~semver.version.Version` object with
  the changed parts
:raises TypeError: if ``parts`` contain invalid keys

---
## is_valid
```python
from version import is_valid
```

Check if the string is a valid semver version.

.. versionadded:: 2.9.1

.. versionchanged:: 3.0.0
   Renamed from :meth:`~semver.version.Version.isvalid`

:param version: the version string to check
:return: True if the version string is a valid semver version, False
         otherwise.

---
## is_compatible
```python
from version import is_compatible
```

Check if current version is compatible with other version.

The result is True, if either of the following is true:

* both versions are equal, or
* both majors are equal and higher than 0. Same for both minors.
  Both pre-releases are equal, or
* both majors are equal and higher than 0. The minor of b's
  minor version is higher then a's. Both pre-releases are equal.

The algorithm does *not* check patches.

.. versionadded:: 3.0.0

:param other: the version to check for compatibility
:return: True, if ``other`` is compatible with the old version,
         otherwise False

>>> Version(1, 1, 0).is_compatible(Version(1, 0, 0))
False
>>> Version(1, 0, 0).is_compatible(Version(1, 1, 0))
True

---
## cmp_prerelease_tag
```python
from version import cmp_prerelease_tag
```



---
## __name__
```python
from _deprecated import __name__
```

Contains all deprecated functions.

.. autofunction: deprecated

---
## deprecated
```python
from _deprecated import deprecated
```

Decorates a function to output a deprecation warning.

:param func: the function to decorate
:param replace: the function to replace (use the full qualified
    name like ``semver.version.Version.bump_major``.
:param version: the first version when this function was deprecated.
:param category: allow you to specify the deprecation warning class
    of your choice. By default, it's  :class:`DeprecationWarning`, but
    you can choose :class:`PendingDeprecationWarning` or a custom class.
:return: decorated function which is marked as deprecated

---
## compare
```python
from _deprecated import compare
```

Compare two versions strings.

.. deprecated:: 3.0.0
   The situation of this function is unclear and it might
   disappear in the future.
   If possible, use :meth:`semver.version.Version.compare`.
   See :gh:`258` for details.

:param ver1: first version string
:param ver2: second version string
:return: The return value is negative if ver1 < ver2,
         zero if ver1 == ver2 and strictly positive if ver1 > ver2

>>> semver.compare("1.0.0", "2.0.0")
-1
>>> semver.compare("2.0.0", "1.0.0")
1
>>> semver.compare("2.0.0", "2.0.0")
0

---
## parse
```python
from _deprecated import parse
```

Parse version to major, minor, patch, pre-release, build parts.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.parse` instead.

:param version: version string
:return: dictionary with the keys 'build', 'major', 'minor', 'patch',
         and 'prerelease'. The prerelease or build keys can be None
         if not provided
:rtype: dict

>>> ver = semver.parse('3.4.5-pre.2+build.4')
>>> ver['major']
3
>>> ver['minor']
4
>>> ver['patch']
5
>>> ver['prerelease']
'pre.2'
>>> ver['build']
'build.4'

---
## parse_version_info
```python
from _deprecated import parse_version_info
```

Parse version string to a Version instance.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.parse` instead.
.. versionadded:: 2.7.2
   Added :func:`semver.parse_version_info`

:param version: version string
:return: a :class:`VersionInfo` instance

>>> version_info = semver.Version.parse("3.4.5-pre.2+build.4")
>>> version_info.major
3
>>> version_info.minor
4
>>> version_info.patch
5
>>> version_info.prerelease
'pre.2'
>>> version_info.build
'build.4'

---
## match
```python
from _deprecated import match
```

Compare two versions strings through a comparison.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.match` instead.

:param str version: a version string
:param str match_expr: operator and version; valid operators are
      <   smaller than
      >   greater than
      >=  greator or equal than
      <=  smaller or equal than
      ==  equal
      !=  not equal
:return: True if the expression matches the version, otherwise False
:rtype: bool

>>> semver.match("2.0.0", ">=1.0.0")
True
>>> semver.match("1.0.0", ">1.0.0")
False

---
## max_ver
```python
from _deprecated import max_ver
```

Returns the greater version of two versions strings.

.. deprecated:: 2.10.2
   Use :func:`max` instead.

:param ver1: version string 1
:param ver2: version string 2
:return: the greater version of the two
:rtype: :class:`Version`

>>> semver.max_ver("1.0.0", "2.0.0")
'2.0.0'

---
## min_ver
```python
from _deprecated import min_ver
```

Returns the smaller version of two versions strings.

.. deprecated:: 2.10.2
   Use Use :func:`min` instead.

:param ver1: version string 1
:param ver2: version string 2
:return: the smaller version of the two
:rtype: :class:`Version`

>>> semver.min_ver("1.0.0", "2.0.0")
'1.0.0'

---
## format_version
```python
from _deprecated import format_version
```

Format a version string according to the Semantic Versioning specification.

.. deprecated:: 2.10.0
   Use ``str(Version(VERSION)`` instead.

:param int major: the required major part of a version
:param int minor: the required minor part of a version
:param int patch: the required patch part of a version
:param str prerelease: the optional prerelease part of a version
:param str build: the optional build part of a version
:return: the formatted string
:rtype: str

>>> semver.format_version(3, 4, 5, 'pre.2', 'build.4')
'3.4.5-pre.2+build.4'

---
## bump_major
```python
from _deprecated import bump_major
```

Raise the major part of the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.bump_major` instead.

:param: version string
:return: the raised version string
:rtype: str

>>> semver.bump_major("3.4.5")
'4.0.0'

---
## bump_minor
```python
from _deprecated import bump_minor
```

Raise the minor part of the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.bump_minor` instead.

:param: version string
:return: the raised version string
:rtype: str

>>> semver.bump_minor("3.4.5")
'3.5.0'

---
## bump_patch
```python
from _deprecated import bump_patch
```

Raise the patch part of the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.bump_patch` instead.

:param: version string
:return: the raised version string
:rtype: str

>>> semver.bump_patch("3.4.5")
'3.4.6'

---
## bump_prerelease
```python
from _deprecated import bump_prerelease
```

Raise the prerelease part of the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.bump_prerelease` instead.

:param version: version string
:param token: defaults to 'rc'
:return: the raised version string
:rtype: str

>>> semver.bump_prerelease('3.4.5', 'dev')
'3.4.5-dev.1'

---
## bump_build
```python
from _deprecated import bump_build
```

Raise the build part of the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.bump_build` instead.

:param version: version string
:param token: defaults to 'build'
:return: the raised version string
:rtype: str

>>> semver.bump_build('3.4.5-rc.1+build.9')
'3.4.5-rc.1+build.10'

---
## finalize_version
```python
from _deprecated import finalize_version
```

Remove any prerelease and build metadata from the version string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.finalize_version` instead.

.. versionadded:: 2.7.9
   Added :func:`finalize_version`

:param version: version string
:return: the finalized version string
:rtype: str

>>> semver.finalize_version('1.2.3-rc.5')
'1.2.3'

---
## replace
```python
from _deprecated import replace
```

Replace one or more parts of a version and return the new string.

.. deprecated:: 2.10.0
   Use :meth:`~semver.version.Version.replace` instead.
.. versionadded:: 2.9.0
   Added :func:`replace`

:param version: the version string to replace
:param parts: the parts to be updated. Valid keys are:
  ``major``, ``minor``, ``patch``, ``prerelease``, or ``build``
:return: the replaced version string
:raises TypeError: if ``parts`` contains invalid keys

>>> import semver
>>> semver.replace("1.2.3", major=2, patch=10)
'2.2.10'

---
## wrapper
```python
from _deprecated import wrapper
```



---
## cmd_bump
```python
from cli import cmd_bump
```

Subcommand: Bumps a version.

Synopsis: bump <PART> <VERSION>
<PART> can be major, minor, patch, prerelease, or build

:param args: The parsed arguments
:return: the new, bumped version

---
## cmd_check
```python
from cli import cmd_check
```

Subcommand: Checks if a string is a valid semver version.

Synopsis: check <VERSION>

:param args: The parsed arguments

---
## cmd_compare
```python
from cli import cmd_compare
```

Subcommand: Compare two versions.

Synopsis: compare <VERSION1> <VERSION2>

:param args: The parsed arguments

---
## cmd_nextver
```python
from cli import cmd_nextver
```

Subcommand: Determines the next version, taking prereleases into account.

Synopsis: nextver <VERSION> <PART>

:param args: The parsed arguments

---
## createparser
```python
from cli import createparser
```

Create an :class:`argparse.ArgumentParser` instance.

:return: parser instance

---
## process
```python
from cli import process
```

Process the input from the CLI.

:param args: The parsed arguments
:param parser: the parser instance
:return: result of the selected action

---
## exit_cacert_ctx
```python
from core import exit_cacert_ctx
```



---
## where
```python
from core import where
```



---
## contents
```python
from core import contents
```



---
## read_text
```python
from core import read_text
```



---
## __name__
```python
from _impl import __name__
```



---
## _ThreadLocal
```python
from _impl import _ThreadLocal
```



---
## AsyncLibraryNotFoundError
```python
from _impl import AsyncLibraryNotFoundError
```



---
## current_async_library
```python
from _impl import current_async_library
```

Detect which async library is currently running.

The following libraries are currently supported:

================   ===========  ============================
Library             Requires     Magic string
================   ===========  ============================
**Trio**            Trio v0.6+   ``"trio"``
**Curio**           -            ``"curio"``
**asyncio**                      ``"asyncio"``
**Trio-asyncio**    v0.8.2+     ``"trio"`` or ``"asyncio"``,
                                depending on current mode
================   ===========  ============================

Returns:
  A string like ``"trio"``.

Raises:
  AsyncLibraryNotFoundError: if called from synchronous context,
    or if the current async library was not recognized.

Examples:

    .. code-block:: python3

       from sniffio import current_async_library

       async def generic_sleep(seconds):
           library = current_async_library()
           if library == "trio":
               import trio
               await trio.sleep(seconds)
           elif library == "asyncio":
               import asyncio
               await asyncio.sleep(seconds)
           # ... and so on ...
           else:
               raise RuntimeError(f"Unsupported library {library!r}")

---
## pipe
```python
from setters import pipe
```

Run all *setters* and return the return value of the last one.

.. versionadded:: 20.1.0

---
## frozen
```python
from setters import frozen
```

Prevent an attribute to be modified.

.. versionadded:: 20.1.0

---
## validate
```python
from setters import validate
```

Run *attrib*'s validator on *new_value* if it has one.

.. versionadded:: 20.1.0

---
## convert
```python
from setters import convert
```

Run *attrib*'s converter -- if it has one -- on *new_value* and return the
result.

.. versionadded:: 20.1.0

---
## wrapped_pipe
```python
from setters import wrapped_pipe
```



---
## set_disabled
```python
from validators import set_disabled
```

Globally disable or enable running validators.

By default, they are run.

Args:
    disabled (bool): If `True`, disable running all validators.

.. warning::

    This function is not thread-safe!

.. versionadded:: 21.3.0

---
## get_disabled
```python
from validators import get_disabled
```

Return a bool indicating whether validators are currently disabled or not.

Returns:
    bool:`True` if validators are currently disabled.

.. versionadded:: 21.3.0

---
## disabled
```python
from validators import disabled
```

Context manager that disables running validators within its context.

.. warning::

    This context manager is not thread-safe!

.. versionadded:: 21.3.0

---
## _InstanceOfValidator
```python
from validators import _InstanceOfValidator
```



---
## instance_of
```python
from validators import instance_of
```

A validator that raises a `TypeError` if the initializer is called with a
wrong type for this particular attribute (checks are performed using
`isinstance` therefore it's also valid to pass a tuple of types).

Args:
    type (type | tuple[type]): The type to check for.

Raises:
    TypeError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected type, and the value it got.

---
## _MatchesReValidator
```python
from validators import _MatchesReValidator
```



---
## matches_re
```python
from validators import matches_re
```

A validator that raises `ValueError` if the initializer is called with a
string that doesn't match *regex*.

Args:
    regex (str, re.Pattern):
        A regex string or precompiled pattern to match against

    flags (int):
        Flags that will be passed to the underlying re function (default 0)

    func (typing.Callable):
        Which underlying `re` function to call. Valid options are
        `re.fullmatch`, `re.search`, and `re.match`; the default `None`
        means `re.fullmatch`. For performance reasons, the pattern is
        always precompiled using `re.compile`.

.. versionadded:: 19.2.0
.. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern.

---
## _OptionalValidator
```python
from validators import _OptionalValidator
```



---
## optional
```python
from validators import optional
```

A validator that makes an attribute optional.  An optional attribute is one
which can be set to `None` in addition to satisfying the requirements of
the sub-validator.

Args:
    validator
        (typing.Callable | tuple[typing.Callable] | list[typing.Callable]):
        A validator (or validators) that is used for non-`None` values.

.. versionadded:: 15.1.0
.. versionchanged:: 17.1.0 *validator* can be a list of validators.
.. versionchanged:: 23.1.0 *validator* can also be a tuple of validators.

---
## _InValidator
```python
from validators import _InValidator
```



---
## in_
```python
from validators import in_
```

A validator that raises a `ValueError` if the initializer is called with a
value that does not belong in the *options* provided.

The check is performed using ``value in options``, so *options* has to
support that operation.

To keep the validator hashable, dicts, lists, and sets are transparently
transformed into a `tuple`.

Args:
    options: Allowed options.

Raises:
    ValueError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected options, and the value it got.

.. versionadded:: 17.1.0
.. versionchanged:: 22.1.0
   The ValueError was incomplete until now and only contained the human
   readable error message. Now it contains all the information that has
   been promised since 17.1.0.
.. versionchanged:: 24.1.0
   *options* that are a list, dict, or a set are now transformed into a
   tuple to keep the validator hashable.

---
## _IsCallableValidator
```python
from validators import _IsCallableValidator
```



---
## is_callable
```python
from validators import is_callable
```

A validator that raises a `attrs.exceptions.NotCallableError` if the
initializer is called with a value for this particular attribute that is
not callable.

.. versionadded:: 19.1.0

Raises:
    attrs.exceptions.NotCallableError:
        With a human readable error message containing the attribute
        (`attrs.Attribute`) name, and the value it got.

---
## _DeepIterable
```python
from validators import _DeepIterable
```



---
## deep_iterable
```python
from validators import deep_iterable
```

A validator that performs deep validation of an iterable.

Args:
    member_validator: Validator to apply to iterable members.

    iterable_validator:
        Validator to apply to iterable itself (optional).

Raises
    TypeError: if any sub-validators fail

.. versionadded:: 19.1.0

---
## _DeepMapping
```python
from validators import _DeepMapping
```



---
## deep_mapping
```python
from validators import deep_mapping
```

A validator that performs deep validation of a dictionary.

Args:
    key_validator: Validator to apply to dictionary keys.

    value_validator: Validator to apply to dictionary values.

    mapping_validator:
        Validator to apply to top-level mapping attribute (optional).

.. versionadded:: 19.1.0

Raises:
    TypeError: if any sub-validators fail

---
## _NumberValidator
```python
from validators import _NumberValidator
```



---
## lt
```python
from validators import lt
```

A validator that raises `ValueError` if the initializer is called with a
number larger or equal to *val*.

The validator uses `operator.lt` to compare the values.

Args:
    val: Exclusive upper bound for values.

.. versionadded:: 21.3.0

---
## le
```python
from validators import le
```

A validator that raises `ValueError` if the initializer is called with a
number greater than *val*.

The validator uses `operator.le` to compare the values.

Args:
    val: Inclusive upper bound for values.

.. versionadded:: 21.3.0

---
## ge
```python
from validators import ge
```

A validator that raises `ValueError` if the initializer is called with a
number smaller than *val*.

The validator uses `operator.ge` to compare the values.

Args:
    val: Inclusive lower bound for values

.. versionadded:: 21.3.0

---
## gt
```python
from validators import gt
```

A validator that raises `ValueError` if the initializer is called with a
number smaller or equal to *val*.

The validator uses `operator.ge` to compare the values.

Args:
   val: Exclusive lower bound for values

.. versionadded:: 21.3.0

---
## _MaxLengthValidator
```python
from validators import _MaxLengthValidator
```



---
## max_len
```python
from validators import max_len
```

A validator that raises `ValueError` if the initializer is called
with a string or iterable that is longer than *length*.

Args:
    length (int): Maximum length of the string or iterable

.. versionadded:: 21.3.0

---
## _MinLengthValidator
```python
from validators import _MinLengthValidator
```



---
## min_len
```python
from validators import min_len
```

A validator that raises `ValueError` if the initializer is called
with a string or iterable that is shorter than *length*.

Args:
    length (int): Minimum length of the string or iterable

.. versionadded:: 22.1.0

---
## _SubclassOfValidator
```python
from validators import _SubclassOfValidator
```



---
## _subclass_of
```python
from validators import _subclass_of
```

A validator that raises a `TypeError` if the initializer is called with a
wrong type for this particular attribute (checks are performed using
`issubclass` therefore it's also valid to pass a tuple of types).

Args:
    type (type | tuple[type, ...]): The type(s) to check for.

Raises:
    TypeError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the expected type, and the value it got.

---
## _NotValidator
```python
from validators import _NotValidator
```



---
## not_
```python
from validators import not_
```

A validator that wraps and logically 'inverts' the validator passed to it.
It will raise a `ValueError` if the provided validator *doesn't* raise a
`ValueError` or `TypeError` (by default), and will suppress the exception
if the provided validator *does*.

Intended to be used with existing validators to compose logic without
needing to create inverted variants, for example, ``not_(in_(...))``.

Args:
    validator: A validator to be logically inverted.

    msg (str):
        Message to raise if validator fails. Formatted with keys
        ``exc_types`` and ``validator``.

    exc_types (tuple[type, ...]):
        Exception type(s) to capture. Other types raised by child
        validators will not be intercepted and pass through.

Raises:
    ValueError:
        With a human readable error message, the attribute (of type
        `attrs.Attribute`), the validator that failed to raise an
        exception, the value it got, and the expected exception types.

.. versionadded:: 22.2.0

---
## _OrValidator
```python
from validators import _OrValidator
```



---
## or_
```python
from validators import or_
```

A validator that composes multiple validators into one.

When called on a value, it runs all wrapped validators until one of them is
satisfied.

Args:
    validators (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of validators.

Raises:
    ValueError:
        If no validator is satisfied. Raised with a human-readable error
        message listing all the wrapped validators and the value that
        failed all of them.

.. versionadded:: 24.1.0

---
## __call__
```python
from validators import __call__
```



---
## __repr__
```python
from validators import __repr__
```



---
## __name__
```python
from _make import __name__
```



---
## _Nothing
```python
from _make import _Nothing
```

Sentinel to indicate the lack of a value when `None` is ambiguous.

If extending attrs, you can use ``typing.Literal[NOTHING]`` to show
that a value may be ``NOTHING``.

.. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False.
.. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant.

---
## _CacheHashWrapper
```python
from _make import _CacheHashWrapper
```

An integer subclass that pickles / copies as None

This is used for non-slots classes with ``cache_hash=True``, to avoid
serializing a potentially (even likely) invalid hash value. Since `None`
is the default value for uncalculated hashes, whenever this is copied,
the copy's value for the hash should automatically reset.

See GH #613 for more details.

---
## attrib
```python
from _make import attrib
```

Create a new field / attribute on a class.

Identical to `attrs.field`, except it's not keyword-only.

Consider using `attrs.field` in new code (``attr.ib`` will *never* go away,
though).

..  warning::

    Does **nothing** unless the class is also decorated with
    `attr.s` (or similar)!


.. versionadded:: 15.2.0 *convert*
.. versionadded:: 16.3.0 *metadata*
.. versionchanged:: 17.1.0 *validator* can be a ``list`` now.
.. versionchanged:: 17.1.0
   *hash* is `None` and therefore mirrors *eq* by default.
.. versionadded:: 17.3.0 *type*
.. deprecated:: 17.4.0 *convert*
.. versionadded:: 17.4.0
   *converter* as a replacement for the deprecated *convert* to achieve
   consistency with other noun-based arguments.
.. versionadded:: 18.1.0
   ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``.
.. versionadded:: 18.2.0 *kw_only*
.. versionchanged:: 19.2.0 *convert* keyword argument removed.
.. versionchanged:: 19.2.0 *repr* also accepts a custom callable.
.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
.. versionadded:: 19.2.0 *eq* and *order*
.. versionadded:: 20.1.0 *on_setattr*
.. versionchanged:: 20.3.0 *kw_only* backported to Python 2
.. versionchanged:: 21.1.0
   *eq*, *order*, and *cmp* also accept a custom callable
.. versionchanged:: 21.1.0 *cmp* undeprecated
.. versionadded:: 22.2.0 *alias*

---
## _compile_and_eval
```python
from _make import _compile_and_eval
```

Evaluate the script with the given global (globs) and local (locs)
variables.

---
## _make_method
```python
from _make import _make_method
```

Create the method with the script given and return the method object.

---
## _make_attr_tuple_class
```python
from _make import _make_attr_tuple_class
```

Create a tuple subclass to hold `Attribute`s for an `attrs` class.

The subclass is a bare tuple with properties for names.

class MyClassAttributes(tuple):
    __slots__ = ()
    x = property(itemgetter(0))

---
## _is_class_var
```python
from _make import _is_class_var
```

Check whether *annot* is a typing.ClassVar.

The string comparison hack is used to avoid evaluating all string
annotations which would put attrs-based classes at a performance
disadvantage compared to plain old classes.

---
## _has_own_attribute
```python
from _make import _has_own_attribute
```

Check whether *cls* defines *attrib_name* (and doesn't just inherit it).

---
## _collect_base_attrs
```python
from _make import _collect_base_attrs
```

Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.

---
## _collect_base_attrs_broken
```python
from _make import _collect_base_attrs_broken
```

Collect attr.ibs from base classes of *cls*, except *taken_attr_names*.

N.B. *taken_attr_names* will be mutated.

Adhere to the old incorrect behavior.

Notably it collects from the front and considers inherited attributes which
leads to the buggy behavior reported in #428.

---
## _transform_attrs
```python
from _make import _transform_attrs
```

Transform all `_CountingAttr`s on a class into `Attribute`s.

If *these* is passed, use that and don't look for them on the class.

If *collect_by_mro* is True, collect them in the correct MRO order,
otherwise use the old -- incorrect -- order.  See #428.

Return an `_Attributes`.

---
## _make_cached_property_getattr
```python
from _make import _make_cached_property_getattr
```



---
## _frozen_setattrs
```python
from _make import _frozen_setattrs
```

Attached to frozen classes as __setattr__.

---
## _frozen_delattrs
```python
from _make import _frozen_delattrs
```

Attached to frozen classes as __delattr__.

---
## _ClassBuilder
```python
from _make import _ClassBuilder
```

Iteratively build *one* class.

---
## _determine_attrs_eq_order
```python
from _make import _determine_attrs_eq_order
```

Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
values of eq and order.  If *eq* is None, set it to *default_eq*.

---
## _determine_attrib_eq_order
```python
from _make import _determine_attrib_eq_order
```

Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
values of eq and order.  If *eq* is None, set it to *default_eq*.

---
## _determine_whether_to_implement
```python
from _make import _determine_whether_to_implement
```

Check whether we should implement a set of methods for *cls*.

*flag* is the argument passed into @attr.s like 'init', *auto_detect* the
same as passed into @attr.s and *dunders* is a tuple of attribute names
whose presence signal that the user has implemented it themselves.

Return *default* if no reason for either for or against is found.

---
## attrs
```python
from _make import attrs
```

A class decorator that adds :term:`dunder methods` according to the
specified attributes using `attr.ib` or the *these* argument.

Consider using `attrs.define` / `attrs.frozen` in new code (``attr.s`` will
*never* go away, though).

Args:
    repr_ns (str):
        When using nested classes, there was no way in Python 2 to
        automatically detect that.  This argument allows to set a custom
        name for a more meaningful ``repr`` output.  This argument is
        pointless in Python 3 and is therefore deprecated.

.. caution::
    Refer to `attrs.define` for the rest of the parameters, but note that they
    can have different defaults.

    Notably, leaving *on_setattr* as `None` will **not** add any hooks.

.. versionadded:: 16.0.0 *slots*
.. versionadded:: 16.1.0 *frozen*
.. versionadded:: 16.3.0 *str*
.. versionadded:: 16.3.0 Support for ``__attrs_post_init__``.
.. versionchanged:: 17.1.0
   *hash* supports `None` as value which is also the default now.
.. versionadded:: 17.3.0 *auto_attribs*
.. versionchanged:: 18.1.0
   If *these* is passed, no attributes are deleted from the class body.
.. versionchanged:: 18.1.0 If *these* is ordered, the order is retained.
.. versionadded:: 18.2.0 *weakref_slot*
.. deprecated:: 18.2.0
   ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a
   `DeprecationWarning` if the classes compared are subclasses of
   each other. ``__eq`` and ``__ne__`` never tried to compared subclasses
   to each other.
.. versionchanged:: 19.2.0
   ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider
   subclasses comparable anymore.
.. versionadded:: 18.2.0 *kw_only*
.. versionadded:: 18.2.0 *cache_hash*
.. versionadded:: 19.1.0 *auto_exc*
.. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01.
.. versionadded:: 19.2.0 *eq* and *order*
.. versionadded:: 20.1.0 *auto_detect*
.. versionadded:: 20.1.0 *collect_by_mro*
.. versionadded:: 20.1.0 *getstate_setstate*
.. versionadded:: 20.1.0 *on_setattr*
.. versionadded:: 20.3.0 *field_transformer*
.. versionchanged:: 21.1.0
   ``init=False`` injects ``__attrs_init__``
.. versionchanged:: 21.1.0 Support for ``__attrs_pre_init__``
.. versionchanged:: 21.1.0 *cmp* undeprecated
.. versionadded:: 21.3.0 *match_args*
.. versionadded:: 22.2.0
   *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
.. deprecated:: 24.1.0 *repr_ns*
.. versionchanged:: 24.1.0
   Instances are not compared as tuples of attributes anymore, but using a
   big ``and`` condition. This is faster and has more correct behavior for
   uncomparable values like `math.nan`.
.. versionadded:: 24.1.0
   If a class has an *inherited* classmethod called
   ``__attrs_init_subclass__``, it is executed after the class is created.
.. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*.

---
## _has_frozen_base_class
```python
from _make import _has_frozen_base_class
```

Check whether *cls* has a frozen ancestor by looking at its
__setattr__.

---
## _generate_unique_filename
```python
from _make import _generate_unique_filename
```

Create a "filename" suitable for a function being generated.

---
## _make_hash
```python
from _make import _make_hash
```



---
## _add_hash
```python
from _make import _add_hash
```

Add a hash method to *cls*.

---
## _make_ne
```python
from _make import _make_ne
```

Create __ne__ method.

---
## _make_eq
```python
from _make import _make_eq
```

Create __eq__ method for *cls* with *attrs*.

---
## _make_order
```python
from _make import _make_order
```

Create ordering methods for *cls* with *attrs*.

---
## _add_eq
```python
from _make import _add_eq
```

Add equality methods to *cls* with *attrs*.

---
## _make_repr
```python
from _make import _make_repr
```



---
## _add_repr
```python
from _make import _add_repr
```

Add a repr method to *cls*.

---
## fields
```python
from _make import fields
```

Return the tuple of *attrs* attributes for a class.

The tuple also allows accessing the fields by their names (see below for
examples).

Args:
    cls (type): Class to introspect.

Raises:
    TypeError: If *cls* is not a class.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

Returns:
    tuple (with name accessors) of `attrs.Attribute`

.. versionchanged:: 16.2.0 Returned tuple allows accessing the fields
   by name.
.. versionchanged:: 23.1.0 Add support for generic classes.

---
## fields_dict
```python
from _make import fields_dict
```

Return an ordered dictionary of *attrs* attributes for a class, whose keys
are the attribute names.

Args:
    cls (type): Class to introspect.

Raises:
    TypeError: If *cls* is not a class.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

Returns:
    dict[str, attrs.Attribute]: Dict of attribute name to definition

.. versionadded:: 18.1.0

---
## validate
```python
from _make import validate
```

Validate all attributes on *inst* that have a validator.

Leaves all exceptions through.

Args:
    inst: Instance of a class with *attrs* attributes.

---
## _is_slot_attr
```python
from _make import _is_slot_attr
```

Check if the attribute name comes from a slot class.

---
## _make_init
```python
from _make import _make_init
```



---
## _setattr
```python
from _make import _setattr
```

Use the cached object.setattr to set *attr_name* to *value_var*.

---
## _setattr_with_converter
```python
from _make import _setattr_with_converter
```

Use the cached object.setattr to set *attr_name* to *value_var*, but run
its converter first.

---
## _assign
```python
from _make import _assign
```

Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise
relegate to _setattr.

---
## _assign_with_converter
```python
from _make import _assign_with_converter
```

Unless *attr_name* has an on_setattr hook, use normal assignment after
conversion. Otherwise relegate to _setattr_with_converter.

---
## _determine_setters
```python
from _make import _determine_setters
```

Determine the correct setter functions based on whether a class is frozen
and/or slotted.

---
## _attrs_to_init_script
```python
from _make import _attrs_to_init_script
```

Return a script of an initializer for *attrs*, a dict of globals, and
annotations for the initializer.

The globals are required by the generated script.

---
## _default_init_alias_for
```python
from _make import _default_init_alias_for
```

The default __init__ parameter name for a field.

This performs private-name adjustment via leading-unscore stripping,
and is the default value of Attribute.alias if not provided.

---
## Attribute
```python
from _make import Attribute
```

*Read-only* representation of an attribute.

.. warning::

   You should never instantiate this class yourself.

The class has *all* arguments of `attr.ib` (except for ``factory`` which is
only syntactic sugar for ``default=Factory(...)`` plus the following:

- ``name`` (`str`): The name of the attribute.
- ``alias`` (`str`): The __init__ parameter name of the attribute, after
  any explicit overrides and default private-attribute-name handling.
- ``inherited`` (`bool`): Whether or not that attribute has been inherited
  from a base class.
- ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The
  callables that are used for comparing and ordering objects by this
  attribute, respectively. These are set by passing a callable to
  `attr.ib`'s ``eq``, ``order``, or ``cmp`` arguments. See also
  :ref:`comparison customization <custom-comparison>`.

Instances of this class are frequently used for introspection purposes
like:

- `fields` returns a tuple of them.
- Validators get them passed as the first argument.
- The :ref:`field transformer <transform-fields>` hook receives a list of
  them.
- The ``alias`` property exposes the __init__ parameter name of the field,
  with any overrides and default private-attribute handling applied.


.. versionadded:: 20.1.0 *inherited*
.. versionadded:: 20.1.0 *on_setattr*
.. versionchanged:: 20.2.0 *inherited* is not taken into account for
    equality checks and hashing anymore.
.. versionadded:: 21.1.0 *eq_key* and *order_key*
.. versionadded:: 22.2.0 *alias*

For the full version history of the fields, see `attr.ib`.

---
## _CountingAttr
```python
from _make import _CountingAttr
```

Intermediate representation of attributes that uses a counter to preserve
the order in which the attributes have been defined.

*Internal* data structure of the attrs library.  Running into is most
likely the result of a bug like a forgotten `@attr.s` decorator.

---
## Factory
```python
from _make import Factory
```

Stores a factory callable.

If passed as the default value to `attrs.field`, the factory is used to
generate a new value.

Args:
    factory (typing.Callable):
        A callable that takes either none or exactly one mandatory
        positional argument depending on *takes_self*.

    takes_self (bool):
        Pass the partially initialized instance that is being initialized
        as a positional argument.

.. versionadded:: 17.1.0  *takes_self*

---
## Converter
```python
from _make import Converter
```

Stores a converter callable.

Allows for the wrapped converter to take additional arguments. The
arguments are passed in the order they are documented.

Args:
    converter (Callable): A callable that converts the passed value.

    takes_self (bool):
        Pass the partially initialized instance that is being initialized
        as a positional argument. (default: `False`)

    takes_field (bool):
        Pass the field definition (an :class:`Attribute`) into the
        converter as a positional argument. (default: `False`)

.. versionadded:: 24.1.0

---
## make_class
```python
from _make import make_class
```

A quick way to create a new class called *name* with *attrs*.

Args:
    name (str): The name for the new class.

    attrs( list | dict):
        A list of names or a dictionary of mappings of names to `attr.ib`\
        s / `attrs.field`\ s.

        The order is deduced from the order of the names or attributes
        inside *attrs*.  Otherwise the order of the definition of the
        attributes is used.

    bases (tuple[type, ...]): Classes that the new class will subclass.

    class_body (dict):
        An optional dictionary of class attributes for the new class.

    attributes_arguments: Passed unmodified to `attr.s`.

Returns:
    type: A new class with *attrs*.

.. versionadded:: 17.1.0 *bases*
.. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
.. versionchanged:: 23.2.0 *class_body*

---
## _AndValidator
```python
from _make import _AndValidator
```

Compose many validators to a single one.

---
## and_
```python
from _make import and_
```

A validator that composes multiple validators into one.

When called on a value, it runs all wrapped validators.

Args:
    validators (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of validators.

.. versionadded:: 17.1.0

---
## pipe
```python
from _make import pipe
```

A converter that composes multiple converters into one.

When called on a value, it runs all wrapped converters, returning the
*last* value.

Type annotations will be inferred from the wrapped converters', if they
have any.

    converters (~collections.abc.Iterable[typing.Callable]):
        Arbitrary number of converters.

.. versionadded:: 20.1.0

---
## __repr__
```python
from _make import __repr__
```



---
## __bool__
```python
from _make import __bool__
```



---
## __reduce__
```python
from _make import __reduce__
```



---
## __init__
```python
from _make import __init__
```



---
## build_class
```python
from _make import build_class
```

Finalize class based on the accumulated configuration.

Builder cannot be used after calling this method.

---
## _patch_original_class
```python
from _make import _patch_original_class
```

Apply accumulated methods and return the class.

---
## _create_slots_class
```python
from _make import _create_slots_class
```

Build and return a new class with a `__slots__` attribute.

---
## add_repr
```python
from _make import add_repr
```



---
## add_str
```python
from _make import add_str
```



---
## _make_getstate_setstate
```python
from _make import _make_getstate_setstate
```

Create custom __setstate__ and __getstate__ methods.

---
## make_unhashable
```python
from _make import make_unhashable
```



---
## add_hash
```python
from _make import add_hash
```



---
## add_init
```python
from _make import add_init
```



---
## add_match_args
```python
from _make import add_match_args
```



---
## add_attrs_init
```python
from _make import add_attrs_init
```



---
## add_eq
```python
from _make import add_eq
```



---
## add_order
```python
from _make import add_order
```



---
## add_setattr
```python
from _make import add_setattr
```



---
## _add_method_dunders
```python
from _make import _add_method_dunders
```

Add __module__ and __qualname__ to a *method* if possible.

---
## decide_callable_or_boolean
```python
from _make import decide_callable_or_boolean
```

Decide whether a key function is used.

---
## wrap
```python
from _make import wrap
```



---
## append_hash_computation_lines
```python
from _make import append_hash_computation_lines
```

Generate the code for actually computing the hash code.
Below this will either be returned directly or used to compute
a value which is then cached, depending on the value of cache_hash

---
## __ne__
```python
from _make import __ne__
```

Check equality and either forward a NotImplemented or
return the result negated.

---
## attrs_to_tuple
```python
from _make import attrs_to_tuple
```

Save us some typing.

---
## __lt__
```python
from _make import __lt__
```

Automatically created by attrs.

---
## __le__
```python
from _make import __le__
```

Automatically created by attrs.

---
## __gt__
```python
from _make import __gt__
```

Automatically created by attrs.

---
## __ge__
```python
from _make import __ge__
```

Automatically created by attrs.

---
## __setattr__
```python
from _make import __setattr__
```



---
## from_counting_attr
```python
from _make import from_counting_attr
```



---
## evolve
```python
from _make import evolve
```

Copy *self* and apply *changes*.

This works similarly to `attrs.evolve` but that function does not work
with {class}`Attribute`.

It is mainly meant to be used for `transform-fields`.

.. versionadded:: 20.3.0

---
## __getstate__
```python
from _make import __getstate__
```

Return a dict containing only converter and takes_self -- the rest gets
computed when loading.

---
## __setstate__
```python
from _make import __setstate__
```

Load instance from state.

---
## _setattrs
```python
from _make import _setattrs
```



---
## validator
```python
from _make import validator
```

Decorator that adds *meth* to the list of validators.

Returns *meth* unchanged.

.. versionadded:: 17.1.0

---
## default
```python
from _make import default
```

Decorator that allows to set the default for an attribute.

Returns *meth* unchanged.

Raises:
    DefaultAlreadySetError: If default has been set before.

.. versionadded:: 17.1.0

---
## _get_global_name
```python
from _make import _get_global_name
```

Return the name that a converter for an attribute name *attr_name*
would have.

---
## _fmt_converter_call
```python
from _make import _fmt_converter_call
```

Return a string that calls the converter for an attribute name
*attr_name* and the value in variable named *value_var* according to
`self.takes_self` and `self.takes_field`.

---
## __call__
```python
from _make import __call__
```



---
## pipe_converter
```python
from _make import pipe_converter
```



---
## __str__
```python
from _make import __str__
```



---
## slots_getstate
```python
from _make import slots_getstate
```

Automatically created by attrs.

---
## slots_setstate
```python
from _make import slots_setstate
```

Automatically created by attrs.

---
## fmt_setter
```python
from _make import fmt_setter
```



---
## fmt_setter_with_converter
```python
from _make import fmt_setter_with_converter
```



---
## __name__
```python
from _cmp import __name__
```



---
## cmp_using
```python
from _cmp import cmp_using
```

Create a class that can be passed into `attrs.field`'s ``eq``, ``order``,
and ``cmp`` arguments to customize field comparison.

The resulting class will have a full set of ordering methods if at least
one of ``{lt, le, gt, ge}`` and ``eq``  are provided.

Args:
    eq (typing.Callable | None):
        Callable used to evaluate equality of two objects.

    lt (typing.Callable | None):
        Callable used to evaluate whether one object is less than another
        object.

    le (typing.Callable | None):
        Callable used to evaluate whether one object is less than or equal
        to another object.

    gt (typing.Callable | None):
        Callable used to evaluate whether one object is greater than
        another object.

    ge (typing.Callable | None):
        Callable used to evaluate whether one object is greater than or
        equal to another object.

    require_same_type (bool):
        When `True`, equality and ordering methods will return
        `NotImplemented` if objects are not of the same type.

    class_name (str | None): Name of class. Defaults to "Comparable".

See `comparison` for more details.

.. versionadded:: 21.1.0

---
## _make_init
```python
from _cmp import _make_init
```

Create __init__ method.

---
## _make_operator
```python
from _cmp import _make_operator
```

Create operator method.

---
## _is_comparable_to
```python
from _cmp import _is_comparable_to
```

Check whether `other` is comparable to `self`.

---
## _check_same_type
```python
from _cmp import _check_same_type
```

Return True if *self* and *other* are of the same type, False otherwise.

---
## __init__
```python
from _cmp import __init__
```

Initialize object with *value*.

---
## method
```python
from _cmp import method
```



---
## AttrsInstance
```python
from __init__ import AttrsInstance
```



---
## _make_getattr
```python
from __init__ import _make_getattr
```

Create a metadata proxy for packaging information that uses *mod_name* in
its warnings and errors.

---
## __name__
```python
from _next_gen import __name__
```

These are keyword-only APIs that call `attr.s` and `attr.ib` with different
default values.

---
## define
```python
from _next_gen import define
```

A class decorator that adds :term:`dunder methods` according to
:term:`fields <field>` specified using :doc:`type annotations <types>`,
`field()` calls, or the *these* argument.

Since *attrs* patches or replaces an existing class, you cannot use
`object.__init_subclass__` with *attrs* classes, because it runs too early.
As a replacement, you can define ``__attrs_init_subclass__`` on your class.
It will be called by *attrs* classes that subclass it after they're
created. See also :ref:`init-subclass`.

Args:
    slots (bool):
        Create a :term:`slotted class <slotted classes>` that's more
        memory-efficient. Slotted classes are generally superior to the
        default dict classes, but have some gotchas you should know about,
        so we encourage you to read the :term:`glossary entry <slotted
        classes>`.

    auto_detect (bool):
        Instead of setting the *init*, *repr*, *eq*, and *hash* arguments
        explicitly, assume they are set to True **unless any** of the
        involved methods for one of the arguments is implemented in the
        *current* class (meaning, it is *not* inherited from some base
        class).

        So, for example by implementing ``__eq__`` on a class yourself,
        *attrs* will deduce ``eq=False`` and will create *neither*
        ``__eq__`` *nor* ``__ne__`` (but Python classes come with a
        sensible ``__ne__`` by default, so it *should* be enough to only
        implement ``__eq__`` in most cases).

        Passing True or False` to *init*, *repr*, *eq*, *cmp*, or *hash*
        overrides whatever *auto_detect* would determine.

    auto_exc (bool):
        If the class subclasses `BaseException` (which implicitly includes
        any subclass of any exception), the following happens to behave
        like a well-behaved Python exception class:

        - the values for *eq*, *order*, and *hash* are ignored and the
          instances compare and hash by the instance's ids [#]_ ,
        - all attributes that are either passed into ``__init__`` or have a
          default value are additionally available as a tuple in the
          ``args`` attribute,
        - the value of *str* is ignored leaving ``__str__`` to base
          classes.

        .. [#]
           Note that *attrs* will *not* remove existing implementations of
           ``__hash__`` or the equality methods. It just won't add own
           ones.

    on_setattr (~typing.Callable | list[~typing.Callable] | None | ~typing.Literal[attrs.setters.NO_OP]):
        A callable that is run whenever the user attempts to set an
        attribute (either by assignment like ``i.x = 42`` or by using
        `setattr` like ``setattr(i, "x", 42)``). It receives the same
        arguments as validators: the instance, the attribute that is being
        modified, and the new value.

        If no exception is raised, the attribute is set to the return value
        of the callable.

        If a list of callables is passed, they're automatically wrapped in
        an `attrs.setters.pipe`.

        If left None, the default behavior is to run converters and
        validators whenever an attribute is set.

    init (bool):
        Create a ``__init__`` method that initializes the *attrs*
        attributes. Leading underscores are stripped for the argument name,
        unless an alias is set on the attribute.

        .. seealso::
            `init` shows advanced ways to customize the generated
            ``__init__`` method, including executing code before and after.

    repr(bool):
        Create a ``__repr__`` method with a human readable representation
        of *attrs* attributes.

    str (bool):
        Create a ``__str__`` method that is identical to ``__repr__``. This
        is usually not necessary except for `Exception`\ s.

    eq (bool | None):
        If True or None (default), add ``__eq__`` and ``__ne__`` methods
        that check two instances for equality.

        .. seealso::
            `comparison` describes how to customize the comparison behavior
            going as far comparing NumPy arrays.

    order (bool | None):
        If True, add ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__``
        methods that behave like *eq* above and allow instances to be
        ordered.

        They compare the instances as if they were tuples of their *attrs*
        attributes if and only if the types of both classes are
        *identical*.

        If `None` mirror value of *eq*.

        .. seealso:: `comparison`

    cmp (bool | None):
        Setting *cmp* is equivalent to setting *eq* and *order* to the same
        value. Must not be mixed with *eq* or *order*.

    unsafe_hash (bool | None):
        If None (default), the ``__hash__`` method is generated according
        how *eq* and *frozen* are set.

        1. If *both* are True, *attrs* will generate a ``__hash__`` for
           you.
        2. If *eq* is True and *frozen* is False, ``__hash__`` will be set
           to None, marking it unhashable (which it is).
        3. If *eq* is False, ``__hash__`` will be left untouched meaning
           the ``__hash__`` method of the base class will be used. If the
           base class is `object`, this means it will fall back to id-based
           hashing.

        Although not recommended, you can decide for yourself and force
        *attrs* to create one (for example, if the class is immutable even
        though you didn't freeze it programmatically) by passing True or
        not.  Both of these cases are rather special and should be used
        carefully.

        .. seealso::

            - Our documentation on `hashing`,
            - Python's documentation on `object.__hash__`,
            - and the `GitHub issue that led to the default \ behavior
              <https://github.com/python-attrs/attrs/issues/136>`_ for more
              details.

    hash (bool | None):
        Deprecated alias for *unsafe_hash*. *unsafe_hash* takes precedence.

    cache_hash (bool):
        Ensure that the object's hash code is computed only once and stored
        on the object.  If this is set to True, hashing must be either
        explicitly or implicitly enabled for this class.  If the hash code
        is cached, avoid any reassignments of fields involved in hash code
        computation or mutations of the objects those fields point to after
        object creation.  If such changes occur, the behavior of the
        object's hash code is undefined.

    frozen (bool):
        Make instances immutable after initialization.  If someone attempts
        to modify a frozen instance, `attrs.exceptions.FrozenInstanceError`
        is raised.

        .. note::

            1. This is achieved by installing a custom ``__setattr__``
               method on your class, so you can't implement your own.

            2. True immutability is impossible in Python.

            3. This *does* have a minor a runtime performance `impact
               <how-frozen>` when initializing new instances.  In other
               words: ``__init__`` is slightly slower with ``frozen=True``.

            4. If a class is frozen, you cannot modify ``self`` in
               ``__attrs_post_init__`` or a self-written ``__init__``. You
               can circumvent that limitation by using
               ``object.__setattr__(self, "attribute_name", value)``.

            5. Subclasses of a frozen class are frozen too.

    kw_only (bool):
        Make all attributes keyword-only in the generated ``__init__`` (if
        *init* is False, this parameter is ignored).

    weakref_slot (bool):
        Make instances weak-referenceable.  This has no effect unless
        *slots* is True.

    field_transformer (~typing.Callable | None):
        A function that is called with the original class object and all
        fields right before *attrs* finalizes the class.  You can use this,
        for example, to automatically add converters or validators to
        fields based on their types.

        .. seealso:: `transform-fields`

    match_args (bool):
        If True (default), set ``__match_args__`` on the class to support
        :pep:`634` (*Structural Pattern Matching*). It is a tuple of all
        non-keyword-only ``__init__`` parameter names on Python 3.10 and
        later. Ignored on older Python versions.

    collect_by_mro (bool):
        If True, *attrs* collects attributes from base classes correctly
        according to the `method resolution order
        <https://docs.python.org/3/howto/mro.html>`_. If False, *attrs*
        will mimic the (wrong) behavior of `dataclasses` and :pep:`681`.

        See also `issue #428
        <https://github.com/python-attrs/attrs/issues/428>`_.

    getstate_setstate (bool | None):
        .. note::

            This is usually only interesting for slotted classes and you
            should probably just set *auto_detect* to True.

        If True, ``__getstate__`` and ``__setstate__`` are generated and
        attached to the class. This is necessary for slotted classes to be
        pickleable. If left None, it's True by default for slotted classes
        and False for dict classes.

        If *auto_detect* is True, and *getstate_setstate* is left None, and
        **either** ``__getstate__`` or ``__setstate__`` is detected
        directly on the class (meaning: not inherited), it is set to False
        (this is usually what you want).

    auto_attribs (bool | None):
        If True, look at type annotations to determine which attributes to
        use, like `dataclasses`. If False, it will only look for explicit
        :func:`field` class attributes, like classic *attrs*.

        If left None, it will guess:

        1. If any attributes are annotated and no unannotated
           `attrs.field`\ s are found, it assumes *auto_attribs=True*.
        2. Otherwise it assumes *auto_attribs=False* and tries to collect
           `attrs.field`\ s.

        If *attrs* decides to look at type annotations, **all** fields
        **must** be annotated. If *attrs* encounters a field that is set to
        a :func:`field` / `attr.ib` but lacks a type annotation, an
        `attrs.exceptions.UnannotatedAttributeError` is raised.  Use
        ``field_name: typing.Any = field(...)`` if you don't want to set a
        type.

        .. warning::

            For features that use the attribute name to create decorators
            (for example, :ref:`validators <validators>`), you still *must*
            assign :func:`field` / `attr.ib` to them. Otherwise Python will
            either not find the name or try to use the default value to
            call, for example, ``validator`` on it.

        Attributes annotated as `typing.ClassVar`, and attributes that are
        neither annotated nor set to an `field()` are **ignored**.

    these (dict[str, object]):
        A dictionary of name to the (private) return value of `field()`
        mappings. This is useful to avoid the definition of your attributes
        within the class body because you can't (for example, if you want
        to add ``__repr__`` methods to Django models) or don't want to.

        If *these* is not `None`, *attrs* will *not* search the class body
        for attributes and will *not* remove any attributes from it.

        The order is deduced from the order of the attributes inside
        *these*.

        Arguably, this is a rather obscure feature.

.. versionadded:: 20.1.0
.. versionchanged:: 21.3.0 Converters are also run ``on_setattr``.
.. versionadded:: 22.2.0
   *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance).
.. versionchanged:: 24.1.0
   Instances are not compared as tuples of attributes anymore, but using a
   big ``and`` condition. This is faster and has more correct behavior for
   uncomparable values like `math.nan`.
.. versionadded:: 24.1.0
   If a class has an *inherited* classmethod called
   ``__attrs_init_subclass__``, it is executed after the class is created.
.. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*.

.. note::

    The main differences to the classic `attr.s` are:

    - Automatically detect whether or not *auto_attribs* should be `True`
      (c.f. *auto_attribs* parameter).
    - Converters and validators run when attributes are set by default --
      if *frozen* is `False`.
    - *slots=True*

      Usually, this has only upsides and few visible effects in everyday
      programming. But it *can* lead to some surprising behaviors, so
      please make sure to read :term:`slotted classes`.

    - *auto_exc=True*
    - *auto_detect=True*
    - *order=False*
    - Some options that were only relevant on Python 2 or were kept around
      for backwards-compatibility have been removed.

---
## field
```python
from _next_gen import field
```

Create a new :term:`field` / :term:`attribute` on a class.

..  warning::

    Does **nothing** unless the class is also decorated with
    `attrs.define` (or similar)!

Args:
    default:
        A value that is used if an *attrs*-generated ``__init__`` is used
        and no value is passed while instantiating or the attribute is
        excluded using ``init=False``.

        If the value is an instance of `attrs.Factory`, its callable will
        be used to construct a new value (useful for mutable data types
        like lists or dicts).

        If a default is not set (or set manually to `attrs.NOTHING`), a
        value *must* be supplied when instantiating; otherwise a
        `TypeError` will be raised.

        .. seealso:: `defaults`

    factory (~typing.Callable):
        Syntactic sugar for ``default=attr.Factory(factory)``.

    validator (~typing.Callable | list[~typing.Callable]):
        Callable that is called by *attrs*-generated ``__init__`` methods
        after the instance has been initialized.  They receive the
        initialized instance, the :func:`~attrs.Attribute`, and the passed
        value.

        The return value is *not* inspected so the validator has to throw
        an exception itself.

        If a `list` is passed, its items are treated as validators and must
        all pass.

        Validators can be globally disabled and re-enabled using
        `attrs.validators.get_disabled` / `attrs.validators.set_disabled`.

        The validator can also be set using decorator notation as shown
        below.

        .. seealso:: :ref:`validators`

    repr (bool | ~typing.Callable):
        Include this attribute in the generated ``__repr__`` method. If
        True, include the attribute; if False, omit it. By default, the
        built-in ``repr()`` function is used. To override how the attribute
        value is formatted, pass a ``callable`` that takes a single value
        and returns a string. Note that the resulting string is used as-is,
        which means it will be used directly *instead* of calling
        ``repr()`` (the default).

    eq (bool | ~typing.Callable):
        If True (default), include this attribute in the generated
        ``__eq__`` and ``__ne__`` methods that check two instances for
        equality. To override how the attribute value is compared, pass a
        callable that takes a single value and returns the value to be
        compared.

        .. seealso:: `comparison`

    order (bool | ~typing.Callable):
        If True (default), include this attributes in the generated
        ``__lt__``, ``__le__``, ``__gt__`` and ``__ge__`` methods. To
        override how the attribute value is ordered, pass a callable that
        takes a single value and returns the value to be ordered.

        .. seealso:: `comparison`

    cmp(bool | ~typing.Callable):
        Setting *cmp* is equivalent to setting *eq* and *order* to the same
        value. Must not be mixed with *eq* or *order*.

        .. seealso:: `comparison`

    hash (bool | None):
        Include this attribute in the generated ``__hash__`` method.  If
        None (default), mirror *eq*'s value.  This is the correct behavior
        according the Python spec.  Setting this value to anything else
        than None is *discouraged*.

        .. seealso:: `hashing`

    init (bool):
        Include this attribute in the generated ``__init__`` method.

        It is possible to set this to False and set a default value. In
        that case this attributed is unconditionally initialized with the
        specified default value or factory.

        .. seealso:: `init`

    converter (typing.Callable | Converter):
        A callable that is called by *attrs*-generated ``__init__`` methods
        to convert attribute's value to the desired format.

        If a vanilla callable is passed, it is given the passed-in value as
        the only positional argument. It is possible to receive additional
        arguments by wrapping the callable in a `Converter`.

        Either way, the returned value will be used as the new value of the
        attribute.  The value is converted before being passed to the
        validator, if any.

        .. seealso:: :ref:`converters`

    metadata (dict | None):
        An arbitrary mapping, to be used by third-party code.

        .. seealso:: `extending-metadata`.

    type (type):
        The type of the attribute. Nowadays, the preferred method to
        specify the type is using a variable annotation (see :pep:`526`).
        This argument is provided for backwards-compatibility and for usage
        with `make_class`. Regardless of the approach used, the type will
        be stored on ``Attribute.type``.

        Please note that *attrs* doesn't do anything with this metadata by
        itself. You can use it as part of your own code or for `static type
        checking <types>`.

    kw_only (bool):
        Make this attribute keyword-only in the generated ``__init__`` (if
        ``init`` is False, this parameter is ignored).

    on_setattr (~typing.Callable | list[~typing.Callable] | None | ~typing.Literal[attrs.setters.NO_OP]):
        Allows to overwrite the *on_setattr* setting from `attr.s`. If left
        None, the *on_setattr* value from `attr.s` is used. Set to
        `attrs.setters.NO_OP` to run **no** `setattr` hooks for this
        attribute -- regardless of the setting in `define()`.

    alias (str | None):
        Override this attribute's parameter name in the generated
        ``__init__`` method. If left None, default to ``name`` stripped
        of leading underscores. See `private-attributes`.

.. versionadded:: 20.1.0
.. versionchanged:: 21.1.0
   *eq*, *order*, and *cmp* also accept a custom callable
.. versionadded:: 22.2.0 *alias*
.. versionadded:: 23.1.0
   The *type* parameter has been re-added; mostly for `attrs.make_class`.
   Please note that type checkers ignore this metadata.

.. seealso::

   `attr.ib`

---
## asdict
```python
from _next_gen import asdict
```

Same as `attr.asdict`, except that collections types are always retained
and dict is always used as *dict_factory*.

.. versionadded:: 21.3.0

---
## astuple
```python
from _next_gen import astuple
```

Same as `attr.astuple`, except that collections types are always retained
and `tuple` is always used as the *tuple_factory*.

.. versionadded:: 21.3.0

---
## do_it
```python
from _next_gen import do_it
```



---
## wrap
```python
from _next_gen import wrap
```

Making this a wrapper ensures this code runs during class creation.

We also ensure that frozen-ness of classes is inherited.

---
## FrozenError
```python
from exceptions import FrozenError
```

A frozen/immutable instance or attribute have been attempted to be
modified.

It mirrors the behavior of ``namedtuples`` by using the same error message
and subclassing `AttributeError`.

.. versionadded:: 20.1.0

---
## FrozenInstanceError
```python
from exceptions import FrozenInstanceError
```

A frozen instance has been attempted to be modified.

.. versionadded:: 16.1.0

---
## FrozenAttributeError
```python
from exceptions import FrozenAttributeError
```

A frozen attribute has been attempted to be modified.

.. versionadded:: 20.1.0

---
## AttrsAttributeNotFoundError
```python
from exceptions import AttrsAttributeNotFoundError
```

An *attrs* function couldn't find an attribute that the user asked for.

.. versionadded:: 16.2.0

---
## NotAnAttrsClassError
```python
from exceptions import NotAnAttrsClassError
```

A non-*attrs* class has been passed into an *attrs* function.

.. versionadded:: 16.2.0

---
## DefaultAlreadySetError
```python
from exceptions import DefaultAlreadySetError
```

A default has been set when defining the field and is attempted to be reset
using the decorator.

.. versionadded:: 17.1.0

---
## UnannotatedAttributeError
```python
from exceptions import UnannotatedAttributeError
```

A class with ``auto_attribs=True`` has a field without a type annotation.

.. versionadded:: 17.3.0

---
## PythonTooOldError
```python
from exceptions import PythonTooOldError
```

It was attempted to use an *attrs* feature that requires a newer Python
version.

.. versionadded:: 18.2.0

---
## NotCallableError
```python
from exceptions import NotCallableError
```

A field requiring a callable has been set with a value that is not
callable.

.. versionadded:: 19.2.0

---
## __name__
```python
from _version_info import __name__
```



---
## VersionInfo
```python
from _version_info import VersionInfo
```

A version object that can be compared to tuple of length 1--4:

>>> attr.VersionInfo(19, 1, 0, "final")  <= (19, 2)
True
>>> attr.VersionInfo(19, 1, 0, "final") < (19, 1, 1)
True
>>> vi = attr.VersionInfo(19, 2, 0, "final")
>>> vi < (19, 1, 1)
False
>>> vi < (19,)
False
>>> vi == (19, 2,)
True
>>> vi == (19, 2, 1)
False

.. versionadded:: 19.2

---
## _from_version_string
```python
from _version_info import _from_version_string
```

Parse *s* and return a _VersionInfo.

---
## _ensure_tuple
```python
from _version_info import _ensure_tuple
```

Ensure *other* is a tuple of a valid length.

Returns a possibly transformed *other* and ourselves as a tuple of
the same length as *other*.

---
## __eq__
```python
from _version_info import __eq__
```



---
## __lt__
```python
from _version_info import __lt__
```



---
## optional
```python
from converters import optional
```

A converter that allows an attribute to be optional. An optional attribute
is one which can be set to `None`.

Type annotations will be inferred from the wrapped converter's, if it has
any.

Args:
    converter (typing.Callable):
        the converter that is used for non-`None` values.

.. versionadded:: 17.1.0

---
## default_if_none
```python
from converters import default_if_none
```

A converter that allows to replace `None` values by *default* or the result
of *factory*.

Args:
    default:
        Value to be used if `None` is passed. Passing an instance of
        `attrs.Factory` is supported, however the ``takes_self`` option is
        *not*.

    factory (typing.Callable):
        A callable that takes no parameters whose result is used if `None`
        is passed.

Raises:
    TypeError: If **neither** *default* or *factory* is passed.

    TypeError: If **both** *default* and *factory* are passed.

    ValueError:
        If an instance of `attrs.Factory` is passed with
        ``takes_self=True``.

.. versionadded:: 18.2.0

---
## to_bool
```python
from converters import to_bool
```

Convert "boolean" strings (for example, from environment variables) to real
booleans.

Values mapping to `True`:

- ``True``
- ``"true"`` / ``"t"``
- ``"yes"`` / ``"y"``
- ``"on"``
- ``"1"``
- ``1``

Values mapping to `False`:

- ``False``
- ``"false"`` / ``"f"``
- ``"no"`` / ``"n"``
- ``"off"``
- ``"0"``
- ``0``

Raises:
    ValueError: For any other value.

.. versionadded:: 21.3.0

---
## optional_converter
```python
from converters import optional_converter
```



---
## default_if_none_converter
```python
from converters import default_if_none_converter
```



---
## _AnnotationExtractor
```python
from _compat import _AnnotationExtractor
```

Extract type annotations from a callable, returning None whenever there
is none.

---
## get_generic_base
```python
from _compat import get_generic_base
```

If this is a generic class (A[str]), return the generic base for it.

---
## _get_annotations
```python
from _compat import _get_annotations
```

Get annotations for *cls*.

---
## get_first_param_type
```python
from _compat import get_first_param_type
```

Return the type annotation of the first argument if it's not empty.

---
## get_return_type
```python
from _compat import get_return_type
```

Return the return type if it's not empty.

---
## set_run_validators
```python
from _config import set_run_validators
```

Set whether or not validators are run.  By default, they are run.

.. deprecated:: 21.3.0 It will not be removed, but it also will not be
    moved to new ``attrs`` namespace. Use `attrs.validators.set_disabled()`
    instead.

---
## get_run_validators
```python
from _config import get_run_validators
```

Return whether or not validators are run.

.. deprecated:: 21.3.0 It will not be removed, but it also will not be
    moved to new ``attrs`` namespace. Use `attrs.validators.get_disabled()`
    instead.

---
## __name__
```python
from _funcs import __name__
```



---
## asdict
```python
from _funcs import asdict
```

Return the *attrs* attribute values of *inst* as a dict.

Optionally recurse into other *attrs*-decorated classes.

Args:
    inst: Instance of an *attrs*-decorated class.

    recurse (bool): Recurse into classes that are also *attrs*-decorated.

    filter (~typing.Callable):
        A callable whose return code determines whether an attribute or
        element is included (`True`) or dropped (`False`).  Is called with
        the `attrs.Attribute` as the first argument and the value as the
        second argument.

    dict_factory (~typing.Callable):
        A callable to produce dictionaries from.  For example, to produce
        ordered dictionaries instead of normal Python dictionaries, pass in
        ``collections.OrderedDict``.

    retain_collection_types (bool):
        Do not convert to `list` when encountering an attribute whose type
        is `tuple` or `set`.  Only meaningful if *recurse* is `True`.

    value_serializer (typing.Callable | None):
        A hook that is called for every attribute or dict key/value.  It
        receives the current instance, field and value and must return the
        (updated) value.  The hook is run *after* the optional *filter* has
        been applied.

Returns:
    Return type of *dict_factory*.

Raises:
    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

..  versionadded:: 16.0.0 *dict_factory*
..  versionadded:: 16.1.0 *retain_collection_types*
..  versionadded:: 20.3.0 *value_serializer*
..  versionadded:: 21.3.0
    If a dict has a collection for a key, it is serialized as a tuple.

---
## _asdict_anything
```python
from _funcs import _asdict_anything
```

``asdict`` only works on attrs instances, this works on anything.

---
## astuple
```python
from _funcs import astuple
```

Return the *attrs* attribute values of *inst* as a tuple.

Optionally recurse into other *attrs*-decorated classes.

Args:
    inst: Instance of an *attrs*-decorated class.

    recurse (bool):
        Recurse into classes that are also *attrs*-decorated.

    filter (~typing.Callable):
        A callable whose return code determines whether an attribute or
        element is included (`True`) or dropped (`False`).  Is called with
        the `attrs.Attribute` as the first argument and the value as the
        second argument.

    tuple_factory (~typing.Callable):
        A callable to produce tuples from. For example, to produce lists
        instead of tuples.

    retain_collection_types (bool):
        Do not convert to `list` or `dict` when encountering an attribute
        which type is `tuple`, `dict` or `set`. Only meaningful if
        *recurse* is `True`.

Returns:
    Return type of *tuple_factory*

Raises:
    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

..  versionadded:: 16.2.0

---
## has
```python
from _funcs import has
```

Check whether *cls* is a class with *attrs* attributes.

Args:
    cls (type): Class to introspect.

Raises:
    TypeError: If *cls* is not a class.

Returns:
    bool:

---
## assoc
```python
from _funcs import assoc
```

Copy *inst* and apply *changes*.

This is different from `evolve` that applies the changes to the arguments
that create the new instance.

`evolve`'s behavior is preferable, but there are `edge cases`_ where it
doesn't work. Therefore `assoc` is deprecated, but will not be removed.

.. _`edge cases`: https://github.com/python-attrs/attrs/issues/251

Args:
    inst: Instance of a class with *attrs* attributes.

    changes: Keyword changes in the new copy.

Returns:
    A copy of inst with *changes* incorporated.

Raises:
    attrs.exceptions.AttrsAttributeNotFoundError:
        If *attr_name* couldn't be found on *cls*.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

..  deprecated:: 17.1.0
    Use `attrs.evolve` instead if you can. This function will not be
    removed du to the slightly different approach compared to
    `attrs.evolve`, though.

---
## evolve
```python
from _funcs import evolve
```

Create a new instance, based on the first positional argument with
*changes* applied.

Args:

    inst:
        Instance of a class with *attrs* attributes. *inst* must be passed
        as a positional argument.

    changes:
        Keyword changes in the new copy.

Returns:
    A copy of inst with *changes* incorporated.

Raises:
    TypeError:
        If *attr_name* couldn't be found in the class ``__init__``.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class.

.. versionadded:: 17.1.0
.. deprecated:: 23.1.0
   It is now deprecated to pass the instance using the keyword argument
   *inst*. It will raise a warning until at least April 2024, after which
   it will become an error. Always pass the instance as a positional
   argument.
.. versionchanged:: 24.1.0
   *inst* can't be passed as a keyword argument anymore.

---
## resolve_types
```python
from _funcs import resolve_types
```

Resolve any strings and forward annotations in type annotations.

This is only required if you need concrete types in :class:`Attribute`'s
*type* field. In other words, you don't need to resolve your types if you
only use them for static type checking.

With no arguments, names will be looked up in the module in which the class
was created. If this is not what you want, for example, if the name only
exists inside a method, you may pass *globalns* or *localns* to specify
other dictionaries in which to look up these names. See the docs of
`typing.get_type_hints` for more details.

Args:
    cls (type): Class to resolve.

    globalns (dict | None): Dictionary containing global variables.

    localns (dict | None): Dictionary containing local variables.

    attribs (list | None):
        List of attribs for the given class. This is necessary when calling
        from inside a ``field_transformer`` since *cls* is not an *attrs*
        class yet.

    include_extras (bool):
        Resolve more accurately, if possible. Pass ``include_extras`` to
        ``typing.get_hints``, if supported by the typing module. On
        supported Python versions (3.9+), this resolves the types more
        accurately.

Raises:
    TypeError: If *cls* is not a class.

    attrs.exceptions.NotAnAttrsClassError:
        If *cls* is not an *attrs* class and you didn't pass any attribs.

    NameError: If types cannot be resolved because of missing variables.

Returns:
    *cls* so you can use this function also as a class decorator. Please
    note that you have to apply it **after** `attrs.define`. That means the
    decorator has to come in the line **before** `attrs.define`.

..  versionadded:: 20.1.0
..  versionadded:: 21.1.0 *attribs*
..  versionadded:: 23.1.0 *include_extras*

---
## _split_what
```python
from filters import _split_what
```

Returns a tuple of `frozenset`s of classes and attributes.

---
## include
```python
from filters import include
```

Create a filter that only allows *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to include. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.1.0 Accept strings with field names.

---
## exclude
```python
from filters import exclude
```

Create a filter that does **not** allow *what*.

Args:
    what (list[type, str, attrs.Attribute]):
        What to exclude. Can be a type, a name, or an attribute.

Returns:
    Callable:
        A callable that can be passed to `attrs.asdict`'s and
        `attrs.astuple`'s *filter* argument.

.. versionchanged:: 23.3.0 Accept field name string as input argument

---
## include_
```python
from filters import include_
```



---
## exclude_
```python
from filters import exclude_
```



---
## __name__
```python
from watchmedo import __name__
```

:module: watchdog.watchmedo
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:synopsis: ``watchmedo`` shell script utility.

---
## HelpFormatter
```python
from watchmedo import HelpFormatter
```

A nicer help formatter.

Help for arguments can be indented and contain new lines.
It will be de-dented and arguments in the help
will be separated by a blank line for better readability.

Source: https://github.com/httpie/httpie/blob/2423f89/httpie/cli/argparser.py#L31

---
## argument
```python
from watchmedo import argument
```

Convenience function to properly format arguments to pass to the
command decorator.

---
## command
```python
from watchmedo import command
```

Decorator to define a new command in a sanity-preserving way.
The function will be stored in the ``func`` variable when the parser
parses arguments so that it can be called directly like so::

  >>> args = cli.parse_args()
  >>> args.func(args)

---
## path_split
```python
from watchmedo import path_split
```

Splits a pathname specification separated by an OS-dependent separator.

:param pathname_spec:
    The pathname specification.
:param separator:
    (OS Dependent) `:` on Unix and `;` on Windows or user-specified.

---
## add_to_sys_path
```python
from watchmedo import add_to_sys_path
```

Adds specified paths at specified index into the sys.path list.

:param paths:
    A list of paths to add to the sys.path
:param index:
    (Default 0) The index in the sys.path list where the paths will be
    added.

---
## load_config
```python
from watchmedo import load_config
```

Loads the YAML configuration from the specified file.

:param tricks_file_path:
    The path to the tricks configuration file.
:returns:
    A dictionary of configuration information.

---
## parse_patterns
```python
from watchmedo import parse_patterns
```

Parses pattern argument specs and returns a two-tuple of
(patterns, ignore_patterns).

---
## observe_with
```python
from watchmedo import observe_with
```

Single observer thread with a scheduled path and event handler.

:param observer:
    The observer thread.
:param event_handler:
    Event handler which will be called in response to file system events.
:param pathnames:
    A list of pathnames to monitor.
:param recursive:
    ``True`` if recursive; ``False`` otherwise.

---
## schedule_tricks
```python
from watchmedo import schedule_tricks
```

Schedules tricks with the specified observer and for the given watch
path.

:param observer:
    The observer thread into which to schedule the trick and watch.
:param tricks:
    A list of tricks.
:param pathname:
    A path name which should be watched.
:param recursive:
    ``True`` if recursive; ``False`` otherwise.

---
## tricks_from
```python
from watchmedo import tricks_from
```

Command to execute tricks from a tricks configuration file.

---
## tricks_generate_yaml
```python
from watchmedo import tricks_generate_yaml
```

Command to generate Yaml configuration for tricks named on the command line.

---
## log
```python
from watchmedo import log
```

Command to log file system events to the console.

---
## shell_command
```python
from watchmedo import shell_command
```

Command to execute shell commands in response to file system events.

---
## auto_restart
```python
from watchmedo import auto_restart
```

Command to start a long-running subprocess and restart it on matched events.

---
## LogLevelError
```python
from watchmedo import LogLevelError
```



---
## _get_log_level_from_args
```python
from watchmedo import _get_log_level_from_args
```



---
## main
```python
from watchmedo import main
```

Entry-point function.

---
## __init__
```python
from watchmedo import __init__
```



---
## _split_lines
```python
from watchmedo import _split_lines
```



---
## decorator
```python
from watchmedo import decorator
```



---
## handler_termination_signal
```python
from watchmedo import handler_termination_signal
```



---
## FileSystemEvent
```python
from events import FileSystemEvent
```

Immutable type that represents a file system event that is triggered
when a change occurs on the monitored file system.

All FileSystemEvent objects are required to be immutable and hence
can be used as keys in dictionaries or be added to sets.

---
## FileSystemMovedEvent
```python
from events import FileSystemMovedEvent
```

File system event representing any kind of file system movement.

---
## FileDeletedEvent
```python
from events import FileDeletedEvent
```

File system event representing file deletion on the file system.

---
## FileModifiedEvent
```python
from events import FileModifiedEvent
```

File system event representing file modification on the file system.

---
## FileCreatedEvent
```python
from events import FileCreatedEvent
```

File system event representing file creation on the file system.

---
## FileMovedEvent
```python
from events import FileMovedEvent
```

File system event representing file movement on the file system.

---
## FileClosedEvent
```python
from events import FileClosedEvent
```

File system event representing file close on the file system.

---
## FileClosedNoWriteEvent
```python
from events import FileClosedNoWriteEvent
```

File system event representing an unmodified file close on the file system.

---
## FileOpenedEvent
```python
from events import FileOpenedEvent
```

File system event representing file close on the file system.

---
## DirDeletedEvent
```python
from events import DirDeletedEvent
```

File system event representing directory deletion on the file system.

---
## DirModifiedEvent
```python
from events import DirModifiedEvent
```

File system event representing directory modification on the file system.

---
## DirCreatedEvent
```python
from events import DirCreatedEvent
```

File system event representing directory creation on the file system.

---
## DirMovedEvent
```python
from events import DirMovedEvent
```

File system event representing directory movement on the file system.

---
## FileSystemEventHandler
```python
from events import FileSystemEventHandler
```

Base file system event handler that you can override methods from.

---
## PatternMatchingEventHandler
```python
from events import PatternMatchingEventHandler
```

Matches given patterns with file paths associated with occurring events.
Uses pathlib's `PurePath.match()` method. `patterns` and `ignore_patterns`
are expected to be a list of strings.

---
## RegexMatchingEventHandler
```python
from events import RegexMatchingEventHandler
```

Matches given regexes with file paths associated with occurring events.
Uses the `re` module.

---
## LoggingEventHandler
```python
from events import LoggingEventHandler
```

Logs all the events captured.

---
## generate_sub_moved_events
```python
from events import generate_sub_moved_events
```

Generates an event list of :class:`DirMovedEvent` and
:class:`FileMovedEvent` objects for all the files and directories within
the given moved directory that were moved along with the directory.

:param src_dir_path:
    The source path of the moved directory.
:param dest_dir_path:
    The destination path of the moved directory.
:returns:
    An iterable of file system events of type :class:`DirMovedEvent` and
    :class:`FileMovedEvent`.

---
## generate_sub_created_events
```python
from events import generate_sub_created_events
```

Generates an event list of :class:`DirCreatedEvent` and
:class:`FileCreatedEvent` objects for all the files and directories within
the given moved directory that were moved along with the directory.

:param src_dir_path:
    The source path of the created directory.
:returns:
    An iterable of file system events of type :class:`DirCreatedEvent` and
    :class:`FileCreatedEvent`.

---
## dispatch
```python
from events import dispatch
```

Dispatches events to the appropriate methods.

:param event:
    The event object representing the file system event.
:type event:
    :class:`FileSystemEvent`

---
## on_any_event
```python
from events import on_any_event
```

Catch-all event handler.

:param event:
    The event object representing the file system event.
:type event:
    :class:`FileSystemEvent`

---
## on_moved
```python
from events import on_moved
```



---
## on_created
```python
from events import on_created
```



---
## on_deleted
```python
from events import on_deleted
```



---
## on_modified
```python
from events import on_modified
```



---
## on_closed
```python
from events import on_closed
```



---
## on_closed_no_write
```python
from events import on_closed_no_write
```



---
## on_opened
```python
from events import on_opened
```



---
## patterns
```python
from events import patterns
```

(Read-only)
Patterns to allow matching event paths.

---
## ignore_patterns
```python
from events import ignore_patterns
```

(Read-only)
Patterns to ignore matching event paths.

---
## ignore_directories
```python
from events import ignore_directories
```

(Read-only)
``True`` if directories should be ignored; ``False`` otherwise.

---
## case_sensitive
```python
from events import case_sensitive
```

(Read-only)
``True`` if path names should be matched sensitive to case; ``False``
otherwise.

---
## regexes
```python
from events import regexes
```

(Read-only)
Regexes to allow matching event paths.

---
## ignore_regexes
```python
from events import ignore_regexes
```

(Read-only)
Regexes to ignore matching event paths.

---
## __name__
```python
from screen import __name__
```



---
## constrain
```python
from screen import constrain
```

This returns a number, n constrained to the min and max bounds. 

---
## screen
```python
from screen import screen
```

This object maintains the state of a virtual text screen as a
rectangular array. This maintains a virtual cursor position and handles
scrolling as characters are added. This supports most of the methods needed
by an ANSI text screen. Row and column indexes are 1-based (not zero-based,
like arrays).

Characters are represented internally using unicode. Methods that accept
input characters, when passed 'bytes' (which in Python 2 is equivalent to
'str'), convert them from the encoding specified in the 'encoding'
parameter to the constructor. Methods that return screen contents return
unicode strings, with the exception of __str__() under Python 2. Passing
``encoding=None`` limits the API to only accept unicode input, so passing
bytes in will raise :exc:`TypeError`.

---
## __init__
```python
from screen import __init__
```



---
## _decode
```python
from screen import _decode
```

This converts from the external coding system (as passed to
the constructor) to the internal one (unicode). 

---
## _unicode
```python
from screen import _unicode
```

This returns a printable representation of the screen as a unicode
string (which, under Python 3.x, is the same as 'str'). The end of each
screen line is terminated by a newline.

---
## dump
```python
from screen import dump
```

This returns a copy of the screen as a unicode string. This is similar to
__str__/__unicode__ except that lines are not terminated with line
feeds.

---
## pretty
```python
from screen import pretty
```

This returns a copy of the screen as a unicode string with an ASCII
text box around the screen border. This is similar to
__str__/__unicode__ except that it adds a box.

---
## fill
```python
from screen import fill
```



---
## fill_region
```python
from screen import fill_region
```



---
## cr
```python
from screen import cr
```

This moves the cursor to the beginning (col 1) of the current row.
        

---
## lf
```python
from screen import lf
```

This moves the cursor down with scrolling.
        

---
## crlf
```python
from screen import crlf
```

This advances the cursor with CRLF properties.
The cursor will line wrap and the screen may scroll.

---
## newline
```python
from screen import newline
```

This is an alias for crlf().
        

---
## put_abs
```python
from screen import put_abs
```

Screen array starts at 1 index.

---
## put
```python
from screen import put
```

This puts a characters at the current cursor position.
        

---
## insert_abs
```python
from screen import insert_abs
```

This inserts a character at (r,c). Everything under
and to the right is shifted right one character.
The last character of the line is lost.

---
## insert
```python
from screen import insert
```



---
## get_abs
```python
from screen import get_abs
```



---
## get
```python
from screen import get
```



---
## get_region
```python
from screen import get_region
```

This returns a list of lines representing the region.
        

---
## cursor_constrain
```python
from screen import cursor_constrain
```

This keeps the cursor within the screen area.
        

---
## cursor_home
```python
from screen import cursor_home
```



---
## cursor_back
```python
from screen import cursor_back
```



---
## cursor_down
```python
from screen import cursor_down
```



---
## cursor_forward
```python
from screen import cursor_forward
```



---
## cursor_up
```python
from screen import cursor_up
```



---
## cursor_up_reverse
```python
from screen import cursor_up_reverse
```



---
## cursor_force_position
```python
from screen import cursor_force_position
```

Identical to Cursor Home.

---
## cursor_save
```python
from screen import cursor_save
```

Save current cursor position.

---
## cursor_unsave
```python
from screen import cursor_unsave
```

Restores cursor position after a Save Cursor.

---
## cursor_save_attrs
```python
from screen import cursor_save_attrs
```

Save current cursor position.

---
## cursor_restore_attrs
```python
from screen import cursor_restore_attrs
```

Restores cursor position after a Save Cursor.

---
## scroll_constrain
```python
from screen import scroll_constrain
```

This keeps the scroll region within the screen region.

---
## scroll_screen
```python
from screen import scroll_screen
```

Enable scrolling for entire display.

---
## scroll_screen_rows
```python
from screen import scroll_screen_rows
```

Enable scrolling from row {start} to row {end}.

---
## scroll_down
```python
from screen import scroll_down
```

Scroll display down one line.

---
## scroll_up
```python
from screen import scroll_up
```

Scroll display up one line.

---
## erase_end_of_line
```python
from screen import erase_end_of_line
```

Erases from the current cursor position to the end of the current
line.

---
## erase_start_of_line
```python
from screen import erase_start_of_line
```

Erases from the current cursor position to the start of the current
line.

---
## erase_line
```python
from screen import erase_line
```

Erases the entire current line.

---
## erase_down
```python
from screen import erase_down
```

Erases the screen from the current line down to the bottom of the
screen.

---
## erase_up
```python
from screen import erase_up
```

Erases the screen from the current line up to the top of the
screen.

---
## erase_screen
```python
from screen import erase_screen
```

Erases the screen with the background color.

---
## set_tab
```python
from screen import set_tab
```

Sets a tab at the current position.

---
## clear_tab
```python
from screen import clear_tab
```

Clears tab at the current position.

---
## clear_all_tabs
```python
from screen import clear_all_tabs
```

Clears all tabs.

---
## __str__
```python
from screen import __str__
```

This returns a printable representation of the screen. The end of
each screen line is terminated by a newline. 

---
## __name__
```python
from popen_spawn import __name__
```

Provides an interface like pexpect.spawn interface using subprocess.Popen

---
## PopenSpawn
```python
from popen_spawn import PopenSpawn
```



---
## __init__
```python
from popen_spawn import __init__
```



---
## read_nonblocking
```python
from popen_spawn import read_nonblocking
```



---
## _read_incoming
```python
from popen_spawn import _read_incoming
```

Run in a thread to move output from a pipe to a queue.

---
## write
```python
from popen_spawn import write
```

This is similar to send() except that there is no return value.
        

---
## writelines
```python
from popen_spawn import writelines
```

This calls write() for each element in the sequence.

The sequence can be any iterable object producing strings, typically a
list of strings. This does not add line separators. There is no return
value.

---
## send
```python
from popen_spawn import send
```

Send data to the subprocess' stdin.

Returns the number of bytes written.

---
## sendline
```python
from popen_spawn import sendline
```

Wraps send(), sending string ``s`` to child process, with os.linesep
automatically appended. Returns number of bytes written. 

---
## wait
```python
from popen_spawn import wait
```

Wait for the subprocess to finish.

Returns the exit code.

---
## kill
```python
from popen_spawn import kill
```

Sends a Unix signal to the subprocess.

Use constants from the :mod:`signal` module to specify which signal.

---
## sendeof
```python
from popen_spawn import sendeof
```

Closes the stdin pipe from the writing end.

---
## __name__
```python
from run import __name__
```



---
## run
```python
from run import run
```

This function runs the given command; waits for it to finish; then
returns all output as a string. STDERR is included in output. If the full
path to the command is not given then the path is searched.

Note that lines are terminated by CR/LF (\r\n) combination even on
UNIX-like systems because this is the standard for pseudottys. If you set
'withexitstatus' to true, then run will return a tuple of (command_output,
exitstatus). If 'withexitstatus' is false then this returns just
command_output.

The run() function can often be used instead of creating a spawn instance.
For example, the following code uses spawn::

    from pexpect import *
    child = spawn('scp foo user@example.com:.')
    child.expect('(?i)password')
    child.sendline(mypassword)

The previous code can be replace with the following::

    from pexpect import *
    run('scp foo user@example.com:.', events={'(?i)password': mypassword})

**Examples**

Start the apache daemon on the local machine::

    from pexpect import *
    run("/usr/local/apache/bin/apachectl start")

Check in a file using SVN::

    from pexpect import *
    run("svn ci -m 'automatic commit' my_file.py")

Run a command and capture exit status::

    from pexpect import *
    (command_output, exitstatus) = run('ls -l /bin', withexitstatus=1)

The following will run SSH and execute 'ls -l' on the remote machine. The
password 'secret' will be sent if the '(?i)password' pattern is ever seen::

    run("ssh username@machine.example.com 'ls -l'",
        events={'(?i)password':'secret\n'})

This will start mencoder to rip a video from DVD. This will also display
progress ticks every 5 seconds as it runs. For example::

    from pexpect import *
    def print_ticks(d):
        print d['event_count'],
    run("mencoder dvd://1 -o video.avi -oac copy -ovc copy",
        events={TIMEOUT:print_ticks}, timeout=5)

The 'events' argument should be either a dictionary or a tuple list that
contains patterns and responses. Whenever one of the patterns is seen
in the command output, run() will send the associated response string.
So, run() in the above example can be also written as::

    run("mencoder dvd://1 -o video.avi -oac copy -ovc copy",
        events=[(TIMEOUT,print_ticks)], timeout=5)

Use a tuple list for events if the command output requires a delicate
control over what pattern should be matched, since the tuple list is passed
to pexpect() as its pattern list, with the order of patterns preserved.

Note that you should put newlines in your string if Enter is necessary.

Like the example above, the responses may also contain a callback, either
a function or method.  It should accept a dictionary value as an argument.
The dictionary contains all the locals from the run() function, so you can
access the child spawn object or any other variable defined in run()
(event_count, child, and extra_args are the most useful). A callback may
return True to stop the current run process.  Otherwise run() continues
until the next event. A callback may also return a string which will be
sent to the child. 'extra_args' is not used by directly run(). It provides
a way to pass data to a callback function through run() through the locals
dictionary passed to a callback.

Like :class:`spawn`, passing *encoding* will make it work with unicode
instead of bytes. You can pass *codec_errors* to control how errors in
encoding and decoding are handled.

---
## runu
```python
from run import runu
```

Deprecated: pass encoding to run() instead.
    

---
## __name__
```python
from expect import __name__
```



---
## Expecter
```python
from expect import Expecter
```



---
## searcher_string
```python
from expect import searcher_string
```

This is a plain string search helper for the spawn.expect_any() method.
This helper class is for speed. For more powerful regex patterns
see the helper class, searcher_re.

Attributes:

    eof_index     - index of EOF, or -1
    timeout_index - index of TIMEOUT, or -1

After a successful match by the search() method the following attributes
are available:

    start - index into the buffer, first byte of match
    end   - index into the buffer, first byte after match
    match - the matching string itself

---
## searcher_re
```python
from expect import searcher_re
```

This is regular expression string search helper for the
spawn.expect_any() method. This helper class is for powerful
pattern matching. For speed, see the helper class, searcher_string.

Attributes:

    eof_index     - index of EOF, or -1
    timeout_index - index of TIMEOUT, or -1

After a successful match by the search() method the following attributes
are available:

    start - index into the buffer, first byte of match
    end   - index into the buffer, first byte after match
    match - the re.match object returned by a successful re.search

---
## __init__
```python
from expect import __init__
```

This creates an instance that searches for 'patterns' Where
'patterns' may be a list or other sequence of compiled regular
expressions, or the EOF or TIMEOUT types.

---
## do_search
```python
from expect import do_search
```



---
## existing_data
```python
from expect import existing_data
```



---
## new_data
```python
from expect import new_data
```



---
## eof
```python
from expect import eof
```



---
## timeout
```python
from expect import timeout
```



---
## errored
```python
from expect import errored
```



---
## expect_loop
```python
from expect import expect_loop
```

Blocking expect

---
## __str__
```python
from expect import __str__
```

This returns a human-readable string that represents the state of
the object.

---
## search
```python
from expect import search
```

This searches 'buffer' for the first occurrence of one of the regular
expressions. 'freshlen' must indicate the number of bytes at the end of
'buffer' which have not been searched before.

See class spawn for the 'searchwindowsize' argument.

If there is a match this returns the index of that string, and sets
'start', 'end' and 'match'. Otherwise, returns -1.

---
## __name__
```python
from replwrap import __name__
```

Generic wrapper for read-eval-print-loops, a.k.a. interactive shells

---
## REPLWrapper
```python
from replwrap import REPLWrapper
```

Wrapper for a REPL.

:param cmd_or_spawn: This can either be an instance of :class:`pexpect.spawn`
  in which a REPL has already been started, or a str command to start a new
  REPL process.
:param str orig_prompt: The prompt to expect at first.
:param str prompt_change: A command to change the prompt to something more
  unique. If this is ``None``, the prompt will not be changed. This will
  be formatted with the new and continuation prompts as positional
  parameters, so you can use ``{}`` style formatting to insert them into
  the command.
:param str new_prompt: The more unique prompt to expect after the change.
:param str extra_init_cmd: Commands to do extra initialisation, such as
  disabling pagers.

---
## python
```python
from replwrap import python
```

Start a Python shell and return a :class:`REPLWrapper` object.

---
## _repl_sh
```python
from replwrap import _repl_sh
```



---
## bash
```python
from replwrap import bash
```

Start a bash shell and return a :class:`REPLWrapper` object.

---
## zsh
```python
from replwrap import zsh
```

Start a zsh shell and return a :class:`REPLWrapper` object.

---
## __init__
```python
from replwrap import __init__
```



---
## set_prompt
```python
from replwrap import set_prompt
```



---
## _expect_prompt
```python
from replwrap import _expect_prompt
```



---
## run_command
```python
from replwrap import run_command
```

Send a command to the REPL, wait for and return output.

:param str command: The command to send. Trailing newlines are not needed.
  This should be a complete block of input that will trigger execution;
  if a continuation prompt is found after sending input, :exc:`ValueError`
  will be raised.
:param int timeout: How long to wait for the next prompt. -1 means the
  default from the :class:`pexpect.spawn` object (default 30 seconds).
  None means to wait indefinitely.
:param bool async_: On Python 3.4, or Python 3.3 with asyncio
  installed, passing ``async_=True`` will make this return an
  :mod:`asyncio` Future, which you can yield from to get the same
  result that this method would normally give directly.

---
## __name__
```python
from spawnbase import __name__
```



---
## _NullCoder
```python
from spawnbase import _NullCoder
```

Pass bytes through unchanged.

---
## SpawnBase
```python
from spawnbase import SpawnBase
```

A base class providing the backwards-compatible spawn API for Pexpect.

This should not be instantiated directly: use :class:`pexpect.spawn` or
:class:`pexpect.fdpexpect.fdspawn`.

---
## encode
```python
from spawnbase import encode
```



---
## decode
```python
from spawnbase import decode
```



---
## __init__
```python
from spawnbase import __init__
```



---
## _log
```python
from spawnbase import _log
```



---
## _coerce_expect_string
```python
from spawnbase import _coerce_expect_string
```



---
## _coerce_expect_re
```python
from spawnbase import _coerce_expect_re
```



---
## _coerce_send_string
```python
from spawnbase import _coerce_send_string
```



---
## _get_buffer
```python
from spawnbase import _get_buffer
```



---
## _set_buffer
```python
from spawnbase import _set_buffer
```



---
## read_nonblocking
```python
from spawnbase import read_nonblocking
```

This reads data from the file descriptor.

This is a simple implementation suitable for a regular file. Subclasses using ptys or pipes should override it.

The timeout parameter is ignored.

---
## _pattern_type_err
```python
from spawnbase import _pattern_type_err
```



---
## compile_pattern_list
```python
from spawnbase import compile_pattern_list
```

This compiles a pattern-string or a list of pattern-strings.
Patterns must be a StringType, EOF, TIMEOUT, SRE_Pattern, or a list of
those. Patterns may also be None which results in an empty list (you
might do this if waiting for an EOF or TIMEOUT condition without
expecting any pattern).

This is used by expect() when calling expect_list(). Thus expect() is
nothing more than::

     cpl = self.compile_pattern_list(pl)
     return self.expect_list(cpl, timeout)

If you are using expect() within a loop it may be more
efficient to compile the patterns first and then call expect_list().
This avoid calls in a loop to compile_pattern_list()::

     cpl = self.compile_pattern_list(my_pattern)
     while some_condition:
        ...
        i = self.expect_list(cpl, timeout)
        ...

---
## expect
```python
from spawnbase import expect
```

This seeks through the stream until a pattern is matched. The
pattern is overloaded and may take several types. The pattern can be a
StringType, EOF, a compiled re, or a list of any of those types.
Strings will be compiled to re types. This returns the index into the
pattern list. If the pattern was not a list this returns index 0 on a
successful match. This may raise exceptions for EOF or TIMEOUT. To
avoid the EOF or TIMEOUT exceptions add EOF or TIMEOUT to the pattern
list. That will cause expect to match an EOF or TIMEOUT condition
instead of raising an exception.

If you pass a list of patterns and more than one matches, the first
match in the stream is chosen. If more than one pattern matches at that
point, the leftmost in the pattern list is chosen. For example::

    # the input is 'foobar'
    index = p.expect(['bar', 'foo', 'foobar'])
    # returns 1('foo') even though 'foobar' is a "better" match

Please note, however, that buffering can affect this behavior, since
input arrives in unpredictable chunks. For example::

    # the input is 'foobar'
    index = p.expect(['foobar', 'foo'])
    # returns 0('foobar') if all input is available at once,
    # but returns 1('foo') if parts of the final 'bar' arrive late

When a match is found for the given pattern, the class instance
attribute *match* becomes an re.MatchObject result.  Should an EOF
or TIMEOUT pattern match, then the match attribute will be an instance
of that exception class.  The pairing before and after class
instance attributes are views of the data preceding and following
the matching pattern.  On general exception, class attribute
*before* is all data received up to the exception, while *match* and
*after* attributes are value None.

When the keyword argument timeout is -1 (default), then TIMEOUT will
raise after the default value specified by the class timeout
attribute. When None, TIMEOUT will not be raised and may block
indefinitely until match.

When the keyword argument searchwindowsize is -1 (default), then the
value specified by the class maxread attribute is used.

A list entry may be EOF or TIMEOUT instead of a string. This will
catch these exceptions and return the index of the list entry instead
of raising the exception. The attribute 'after' will be set to the
exception type. The attribute 'match' will be None. This allows you to
write code like this::

        index = p.expect(['good', 'bad', pexpect.EOF, pexpect.TIMEOUT])
        if index == 0:
            do_something()
        elif index == 1:
            do_something_else()
        elif index == 2:
            do_some_other_thing()
        elif index == 3:
            do_something_completely_different()

instead of code like this::

        try:
            index = p.expect(['good', 'bad'])
            if index == 0:
                do_something()
            elif index == 1:
                do_something_else()
        except EOF:
            do_some_other_thing()
        except TIMEOUT:
            do_something_completely_different()

These two forms are equivalent. It all depends on what you want. You
can also just expect the EOF if you are waiting for all output of a
child to finish. For example::

        p = pexpect.spawn('/bin/ls')
        p.expect(pexpect.EOF)
        print p.before

If you are trying to optimize for speed then see expect_list().

On Python 3.4, or Python 3.3 with asyncio installed, passing
``async_=True``  will make this return an :mod:`asyncio` coroutine,
which you can yield from to get the same result that this method would
normally give directly. So, inside a coroutine, you can replace this code::

    index = p.expect(patterns)

With this non-blocking form::

    index = yield from p.expect(patterns, async_=True)

---
## expect_list
```python
from spawnbase import expect_list
```

This takes a list of compiled regular expressions and returns the
index into the pattern_list that matched the child output. The list may
also contain EOF or TIMEOUT(which are not compiled regular
expressions). This method is similar to the expect() method except that
expect_list() does not recompile the pattern list on every call. This
may help if you are trying to optimize for speed, otherwise just use
the expect() method.  This is called by expect().


Like :meth:`expect`, passing ``async_=True`` will make this return an
asyncio coroutine.

---
## expect_exact
```python
from spawnbase import expect_exact
```

This is similar to expect(), but uses plain string matching instead
of compiled regular expressions in 'pattern_list'. The 'pattern_list'
may be a string; a list or other sequence of strings; or TIMEOUT and
EOF.

This call might be faster than expect() for two reasons: string
searching is faster than RE matching and it is possible to limit the
search to just the end of the input buffer.

This method is also useful when you don't want to have to worry about
escaping regular expression characters that you want to match.

Like :meth:`expect`, passing ``async_=True`` will make this return an
asyncio coroutine.

---
## expect_loop
```python
from spawnbase import expect_loop
```

This is the common loop used inside expect. The 'searcher' should be
an instance of searcher_re or searcher_string, which describes how and
what to search for in the input.

See expect() for other arguments, return value and exceptions. 

---
## read
```python
from spawnbase import read
```

This reads at most "size" bytes from the file (less if the read hits
EOF before obtaining size bytes). If the size argument is negative or
omitted, read all data until EOF is reached. The bytes are returned as
a string object. An empty string is returned when EOF is encountered
immediately. 

---
## readline
```python
from spawnbase import readline
```

This reads and returns one entire line. The newline at the end of
line is returned as part of the string, unless the file ends without a
newline. An empty string is returned if EOF is encountered immediately.
This looks for a newline as a CR/LF pair (\r\n) even on UNIX because
this is what the pseudotty device returns. So contrary to what you may
expect you will receive newlines as \r\n.

If the size argument is 0 then an empty string is returned. In all
other cases the size argument is ignored, which is not standard
behavior for a file-like object. 

---
## __iter__
```python
from spawnbase import __iter__
```

This is to support iterators over a file-like object.
        

---
## readlines
```python
from spawnbase import readlines
```

This reads until EOF using readline() and returns a list containing
the lines thus read. The optional 'sizehint' argument is ignored.
Remember, because this reads until EOF that means the child
process should have closed its stdout. If you run this method on
a child that is still running with its stdout open then this
method will block until it timesout.

---
## fileno
```python
from spawnbase import fileno
```

Expose file descriptor for a file-like interface
        

---
## flush
```python
from spawnbase import flush
```

This does nothing. It is here to support the interface for a
File-like object. 

---
## isatty
```python
from spawnbase import isatty
```

Overridden in subclass using tty

---
## __enter__
```python
from spawnbase import __enter__
```



---
## __exit__
```python
from spawnbase import __exit__
```



---
## prepare_pattern
```python
from spawnbase import prepare_pattern
```



---
## write_to_stdout
```python
from spawnbase import write_to_stdout
```



---
## __name__
```python
from pxssh import __name__
```

This class extends pexpect.spawn to specialize setting up SSH connections.
This adds methods for login, logout, and expecting the shell prompt.

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
## ExceptionPxssh
```python
from pxssh import ExceptionPxssh
```

Raised for pxssh exceptions.
    

---
## pxssh
```python
from pxssh import pxssh
```

This class extends pexpect.spawn to specialize setting up SSH
connections. This adds methods for login, logout, and expecting the shell
prompt. It does various tricky things to handle many situations in the SSH
login process. For example, if the session is your first login, then pxssh
automatically accepts the remote certificate; or if you have public key
authentication setup then pxssh won't wait for the password prompt.

pxssh uses the shell prompt to synchronize output from the remote host. In
order to make this more robust it sets the shell prompt to something more
unique than just $ or #. This should work on most Borne/Bash or Csh style
shells.

Example that runs a few commands on a remote server and prints the result::

    from pexpect import pxssh
    import getpass
    try:
        s = pxssh.pxssh()
        hostname = raw_input('hostname: ')
        username = raw_input('username: ')
        password = getpass.getpass('password: ')
        s.login(hostname, username, password)
        s.sendline('uptime')   # run a command
        s.prompt()             # match the prompt
        print(s.before)        # print everything before the prompt.
        s.sendline('ls -l')
        s.prompt()
        print(s.before)
        s.sendline('df')
        s.prompt()
        print(s.before)
        s.logout()
    except pxssh.ExceptionPxssh as e:
        print("pxssh failed on login.")
        print(e)

Example showing how to specify SSH options::

    from pexpect import pxssh
    s = pxssh.pxssh(options={
                        "StrictHostKeyChecking": "no",
                        "UserKnownHostsFile": "/dev/null"})
    ...

Note that if you have ssh-agent running while doing development with pxssh
then this can lead to a lot of confusion. Many X display managers (xdm,
gdm, kdm, etc.) will automatically start a GUI agent. You may see a GUI
dialog box popup asking for a password during development. You should turn
off any key agents during testing. The 'force_password' attribute will turn
off public key authentication. This will only work if the remote SSH server
is configured to allow password logins. Example of using 'force_password'
attribute::

        s = pxssh.pxssh()
        s.force_password = True
        hostname = raw_input('hostname: ')
        username = raw_input('username: ')
        password = getpass.getpass('password: ')
        s.login (hostname, username, password)

`debug_command_string` is only for the test suite to confirm that the string
generated for SSH is correct, using this will not allow you to do
anything other than get a string back from `pxssh.pxssh.login()`.

---
## quote
```python
from pxssh import quote
```

Return a shell-escaped version of the string *s*.

---
## __init__
```python
from pxssh import __init__
```



---
## levenshtein_distance
```python
from pxssh import levenshtein_distance
```

This calculates the Levenshtein distance between a and b.
        

---
## try_read_prompt
```python
from pxssh import try_read_prompt
```

This facilitates using communication timeouts to perform
synchronization as quickly as possible, while supporting high latency
connections with a tunable worst case performance. Fast connections
should be read almost immediately. Worst case performance for this
method is timeout_multiplier * 3 seconds.

---
## sync_original_prompt
```python
from pxssh import sync_original_prompt
```

This attempts to find the prompt. Basically, press enter and record
the response; press enter again and record the response; if the two
responses are similar then assume we are at the original prompt.
This can be a slow function. Worst case with the default sync_multiplier
can take 12 seconds. Low latency connections are more likely to fail
with a low sync_multiplier. Best case sync time gets worse with a
high sync multiplier (500 ms with default). 

---
## login
```python
from pxssh import login
```

This logs the user into the given server.

It uses 'original_prompt' to try to find the prompt right after login.
When it finds the prompt it immediately tries to reset the prompt to
something more easily matched. The default 'original_prompt' is very
optimistic and is easily fooled. It's more reliable to try to match the original
prompt as exactly as possible to prevent false matches by server
strings such as the "Message Of The Day". On many systems you can
disable the MOTD on the remote server by creating a zero-length file
called :file:`~/.hushlogin` on the remote server. If a prompt cannot be found
then this will not necessarily cause the login to fail. In the case of
a timeout when looking for the prompt we assume that the original
prompt was so weird that we could not match it, so we use a few tricks
to guess when we have reached the prompt. Then we hope for the best and
blindly try to reset the prompt to something more unique. If that fails
then login() raises an :class:`ExceptionPxssh` exception.

In some situations it is not possible or desirable to reset the
original prompt. In this case, pass ``auto_prompt_reset=False`` to
inhibit setting the prompt to the UNIQUE_PROMPT. Remember that pxssh
uses a unique prompt in the :meth:`prompt` method. If the original prompt is
not reset then this will disable the :meth:`prompt` method unless you
manually set the :attr:`PROMPT` attribute.

Set ``password_regex`` if there is a MOTD message with `password` in it.
Changing this is like playing in traffic, don't (p)expect it to match straight
away.

If you require to connect to another SSH server from the your original SSH
connection set ``spawn_local_ssh`` to `False` and this will use your current
session to do so. Setting this option to `False` and not having an active session
will trigger an error.

Set ``ssh_key`` to a file path to an SSH private key to use that SSH key
for the session authentication.
Set ``ssh_key`` to `True` to force passing the current SSH authentication socket
to the desired ``hostname``.

Set ``ssh_config`` to a file path string of an SSH client config file to pass that
file to the client to handle itself. You may set any options you wish in here, however
doing so will require you to post extra information that you may not want to if you
run into issues.

Alter the ``cmd`` to change the ssh client used, or to prepend it with network
namespaces. For example ```cmd="ip netns exec vlan2 ssh"``` to execute the ssh in
network namespace named ```vlan```.

---
## logout
```python
from pxssh import logout
```

Sends exit to the remote shell.

If there are stopped jobs then this automatically sends exit twice.

---
## prompt
```python
from pxssh import prompt
```

Match the next shell prompt.

This is little more than a short-cut to the :meth:`~pexpect.spawn.expect`
method. Note that if you called :meth:`login` with
``auto_prompt_reset=False``, then before calling :meth:`prompt` you must
set the :attr:`PROMPT` attribute to a regex that it will use for
matching the prompt.

Calling :meth:`prompt` will erase the contents of the :attr:`before`
attribute even if no prompt is ever matched. If timeout is not given or
it is set to -1 then self.timeout is used.

:return: True if the shell prompt was matched, False if the timeout was
         reached.

---
## set_unique_prompt
```python
from pxssh import set_unique_prompt
```

This sets the remote prompt to something more unique than ``#`` or ``$``.
This makes it easier for the :meth:`prompt` method to match the shell prompt
unambiguously. This method is called automatically by the :meth:`login`
method, but you may want to call it manually if you somehow reset the
shell prompt. For example, if you 'su' to a different user then you
will need to manually reset the prompt. This sends shell commands to
the remote host to set the prompt, so this assumes the remote host is
ready to receive commands.

Alternatively, you may use your own prompt pattern. In this case you
should call :meth:`login` with ``auto_prompt_reset=False``; then set the
:attr:`PROMPT` attribute to a regular expression. After that, the
:meth:`prompt` method will try to match your prompt pattern.

---
## __name__
```python
from socket_pexpect import __name__
```

This is like :mod:`pexpect`, but it will work with any socket that you
pass it. You are responsible for opening and closing the socket.

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
## SocketSpawn
```python
from socket_pexpect import SocketSpawn
```

This is like :mod:`pexpect.fdpexpect` but uses the cross-platform python socket api,
rather than the unix-specific file descriptor api. Thus, it works with
remote connections on both unix and windows.

---
## __init__
```python
from socket_pexpect import __init__
```

This takes an open socket.

---
## close
```python
from socket_pexpect import close
```

Close the socket.

Calling this method a second time does nothing, but if the file
descriptor was closed elsewhere, :class:`OSError` will be raised.

---
## isalive
```python
from socket_pexpect import isalive
```

Alive if the fileno is valid 

---
## send
```python
from socket_pexpect import send
```

Write to socket, return number of bytes written

---
## sendline
```python
from socket_pexpect import sendline
```

Write to socket with trailing newline, return number of bytes written

---
## write
```python
from socket_pexpect import write
```

Write to socket, return None

---
## writelines
```python
from socket_pexpect import writelines
```

Call self.write() for each item in sequence

---
## _timeout
```python
from socket_pexpect import _timeout
```



---
## read_nonblocking
```python
from socket_pexpect import read_nonblocking
```

Read from the file descriptor and return the result as a string.

The read_nonblocking method of :class:`SpawnBase` assumes that a call
to os.read will not block (timeout parameter is ignored). This is not
the case for POSIX file-like objects such as sockets and serial ports.

Use :func:`select.select`, timeout is implemented conditionally for
POSIX systems.

:param int size: Read at most *size* bytes.
:param int timeout: Wait timeout seconds for file descriptor to be
    ready to read. When -1 (default), use self.timeout. When 0, poll.
:return: String containing the bytes read

---
## __name__
```python
from fdpexpect import __name__
```

This is like :mod:`pexpect`, but it will work with any file descriptor that you
pass it. You are responsible for opening and close the file descriptor.
This allows you to use Pexpect with sockets and named pipes (FIFOs).

.. note::
    socket.fileno() does not give a readable file descriptor on windows.
    Use :mod:`pexpect.socket_pexpect` for cross-platform socket support

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
## fdspawn
```python
from fdpexpect import fdspawn
```

This is like pexpect.spawn but allows you to supply your own open file
descriptor. For example, you could use it to read through a file looking
for patterns, or to control a modem or serial device. 

---
## __init__
```python
from fdpexpect import __init__
```

This takes a file descriptor (an int) or an object that support the
fileno() method (returning an int). All Python file-like objects
support fileno(). 

---
## close
```python
from fdpexpect import close
```

Close the file descriptor.

Calling this method a second time does nothing, but if the file
descriptor was closed elsewhere, :class:`OSError` will be raised.

---
## isalive
```python
from fdpexpect import isalive
```

This checks if the file descriptor is still valid. If :func:`os.fstat`
does not raise an exception then we assume it is alive. 

---
## terminate
```python
from fdpexpect import terminate
```

Deprecated and invalid. Just raises an exception.

---
## send
```python
from fdpexpect import send
```

Write to fd, return number of bytes written

---
## sendline
```python
from fdpexpect import sendline
```

Write to fd with trailing newline, return number of bytes written

---
## write
```python
from fdpexpect import write
```

Write to fd, return None

---
## writelines
```python
from fdpexpect import writelines
```

Call self.write() for each item in sequence

---
## read_nonblocking
```python
from fdpexpect import read_nonblocking
```

Read from the file descriptor and return the result as a string.

The read_nonblocking method of :class:`SpawnBase` assumes that a call
to os.read will not block (timeout parameter is ignored). This is not
the case for POSIX file-like objects such as sockets and serial ports.

Use :func:`select.select`, timeout is implemented conditionally for
POSIX systems.

:param int size: Read at most *size* bytes.
:param int timeout: Wait timeout seconds for file descriptor to be
    ready to read. When -1 (default), use self.timeout. When 0, poll.
:return: String containing the bytes read

---
## is_executable_file
```python
from utils import is_executable_file
```

Checks that path is an executable regular file, or a symlink towards one.

This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``.

---
## which
```python
from utils import which
```

Mimics behavior of UNIX which command.

---
## split_command_line
```python
from utils import split_command_line
```

This splits a command line into a list of arguments. It splits arguments
on spaces, but handles embedded quotes, doublequotes, and escaped
characters. It's impossible to do this with a regular expression, so I
wrote a little state machine to parse the command line. 

---
## select_ignore_interrupts
```python
from utils import select_ignore_interrupts
```

This is a wrapper around select.select() that ignores signals. If
select.select raises a select.error exception and errno is an EINTR
error then it is ignored. Mainly this is used to ignore sigwinch
(terminal resize). 

---
## poll_ignore_interrupts
```python
from utils import poll_ignore_interrupts
```

Simple wrapper around poll to register file descriptors and
ignore signals.

---
## __name__
```python
from _async_pre_await import __name__
```

Implementation of coroutines without using ``async def``/``await`` keywords.

``@asyncio.coroutine`` and ``yield from`` are  used here instead.

---
## expect_async
```python
from _async_pre_await import expect_async
```



---
## repl_run_command_async
```python
from _async_pre_await import repl_run_command_async
```



---
## PatternWaiter
```python
from _async_pre_await import PatternWaiter
```



---
## set_expecter
```python
from _async_pre_await import set_expecter
```



---
## found
```python
from _async_pre_await import found
```



---
## error
```python
from _async_pre_await import error
```



---
## connection_made
```python
from _async_pre_await import connection_made
```



---
## data_received
```python
from _async_pre_await import data_received
```



---
## eof_received
```python
from _async_pre_await import eof_received
```



---
## connection_lost
```python
from _async_pre_await import connection_lost
```



---
## ExceptionPexpect
```python
from exceptions import ExceptionPexpect
```

Base class for all exceptions raised by this module.
    

---
## EOF
```python
from exceptions import EOF
```

Raised when EOF is read from a child.
This usually means the child has exited.

---
## TIMEOUT
```python
from exceptions import TIMEOUT
```

Raised when a read time exceeds the timeout. 

---
## get_trace
```python
from exceptions import get_trace
```

This returns an abbreviated stack trace with lines that only concern
the caller. In other words, the stack trace inside the Pexpect module
is not included. 

---
## __name__
```python
from ANSI import __name__
```

This implements an ANSI (VT100) terminal emulator as a subclass of screen.

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
## DoEmit
```python
from ANSI import DoEmit
```



---
## DoStartNumber
```python
from ANSI import DoStartNumber
```



---
## DoBuildNumber
```python
from ANSI import DoBuildNumber
```



---
## DoBackOne
```python
from ANSI import DoBackOne
```



---
## DoBack
```python
from ANSI import DoBack
```



---
## DoDownOne
```python
from ANSI import DoDownOne
```



---
## DoDown
```python
from ANSI import DoDown
```



---
## DoForwardOne
```python
from ANSI import DoForwardOne
```



---
## DoForward
```python
from ANSI import DoForward
```



---
## DoUpReverse
```python
from ANSI import DoUpReverse
```



---
## DoUpOne
```python
from ANSI import DoUpOne
```



---
## DoUp
```python
from ANSI import DoUp
```



---
## DoHome
```python
from ANSI import DoHome
```



---
## DoHomeOrigin
```python
from ANSI import DoHomeOrigin
```



---
## DoEraseDown
```python
from ANSI import DoEraseDown
```



---
## DoErase
```python
from ANSI import DoErase
```



---
## DoEraseEndOfLine
```python
from ANSI import DoEraseEndOfLine
```



---
## DoEraseLine
```python
from ANSI import DoEraseLine
```



---
## DoEnableScroll
```python
from ANSI import DoEnableScroll
```



---
## DoCursorSave
```python
from ANSI import DoCursorSave
```



---
## DoCursorRestore
```python
from ANSI import DoCursorRestore
```



---
## DoScrollRegion
```python
from ANSI import DoScrollRegion
```



---
## DoMode
```python
from ANSI import DoMode
```



---
## DoLog
```python
from ANSI import DoLog
```



---
## term
```python
from ANSI import term
```

This class is an abstract, generic terminal.
This does nothing. This is a placeholder that
provides a common base class for other terminals
such as an ANSI terminal. 

---
## ANSI
```python
from ANSI import ANSI
```

This class implements an ANSI (VT100) terminal.
It is a stream filter that recognizes ANSI terminal
escape sequences and maintains the state of a screen object. 

---
## __init__
```python
from ANSI import __init__
```



---
## process
```python
from ANSI import process
```

Process a single character. Called by :meth:`write`.

---
## process_list
```python
from ANSI import process_list
```



---
## write
```python
from ANSI import write
```

Process text, writing it to the virtual screen while handling
ANSI escape codes.

---
## flush
```python
from ANSI import flush
```



---
## write_ch
```python
from ANSI import write_ch
```

This puts a character at the current cursor position. The cursor
position is moved forward with wrap-around, but no scrolling is done if
the cursor hits the lower-right corner of the screen. 

---
## do_sgr
```python
from ANSI import do_sgr
```

Select Graphic Rendition, e.g. color. 

---
## do_decsca
```python
from ANSI import do_decsca
```

Select character protection attribute. 

---
## do_modecrap
```python
from ANSI import do_modecrap
```

Handler for [?<number>h and [?<number>l. If anyone
wanted to actually use these, they'd need to add more states to the
FSM rather than just improve or override this method. 

---
## __name__
```python
from _async_w_await import __name__
```

Implementation of coroutines using ``async def``/``await`` keywords.

These keywords replaced ``@asyncio.coroutine`` and ``yield from`` from
Python 3.5 onwards.

---
## PatternWaiter
```python
from _async_w_await import PatternWaiter
```



---
## set_expecter
```python
from _async_w_await import set_expecter
```



---
## found
```python
from _async_w_await import found
```



---
## error
```python
from _async_w_await import error
```



---
## connection_made
```python
from _async_w_await import connection_made
```



---
## data_received
```python
from _async_w_await import data_received
```



---
## eof_received
```python
from _async_w_await import eof_received
```



---
## connection_lost
```python
from _async_w_await import connection_lost
```



---
## __name__
```python
from pty_spawn import __name__
```



---
## _wrap_ptyprocess_err
```python
from pty_spawn import _wrap_ptyprocess_err
```

Turn ptyprocess errors into our own ExceptionPexpect errors

---
## spawn
```python
from pty_spawn import spawn
```

This is the main class interface for Pexpect. Use this class to start
and control child applications. 

---
## spawnu
```python
from pty_spawn import spawnu
```

Deprecated: pass encoding to spawn() instead.

---
## __init__
```python
from pty_spawn import __init__
```

This is the constructor. The command parameter may be a string that
includes a command and any arguments to the command. For example::

    child = pexpect.spawn('/usr/bin/ftp')
    child = pexpect.spawn('/usr/bin/ssh user@example.com')
    child = pexpect.spawn('ls -latr /tmp')

You may also construct it with a list of arguments like so::

    child = pexpect.spawn('/usr/bin/ftp', [])
    child = pexpect.spawn('/usr/bin/ssh', ['user@example.com'])
    child = pexpect.spawn('ls', ['-latr', '/tmp'])

After this the child application will be created and will be ready to
talk to. For normal use, see expect() and send() and sendline().

Remember that Pexpect does NOT interpret shell meta characters such as
redirect, pipe, or wild cards (``>``, ``|``, or ``*``). This is a
common mistake.  If you want to run a command and pipe it through
another command then you must also start a shell. For example::

    child = pexpect.spawn('/bin/bash -c "ls -l | grep LOG > logs.txt"')
    child.expect(pexpect.EOF)

The second form of spawn (where you pass a list of arguments) is useful
in situations where you wish to spawn a command and pass it its own
argument list. This can make syntax more clear. For example, the
following is equivalent to the previous example::

    shell_cmd = 'ls -l | grep LOG > logs.txt'
    child = pexpect.spawn('/bin/bash', ['-c', shell_cmd])
    child.expect(pexpect.EOF)

The maxread attribute sets the read buffer size. This is maximum number
of bytes that Pexpect will try to read from a TTY at one time. Setting
the maxread size to 1 will turn off buffering. Setting the maxread
value higher may help performance in cases where large amounts of
output are read back from the child. This feature is useful in
conjunction with searchwindowsize.

When the keyword argument *searchwindowsize* is None (default), the
full buffer is searched at each iteration of receiving incoming data.
The default number of bytes scanned at each iteration is very large
and may be reduced to collaterally reduce search cost.  After
:meth:`~.expect` returns, the full buffer attribute remains up to
size *maxread* irrespective of *searchwindowsize* value.

When the keyword argument ``timeout`` is specified as a number,
(default: *30*), then :class:`TIMEOUT` will be raised after the value
specified has elapsed, in seconds, for any of the :meth:`~.expect`
family of method calls.  When None, TIMEOUT will not be raised, and
:meth:`~.expect` may block indefinitely until match.


The logfile member turns on or off logging. All input and output will
be copied to the given file object. Set logfile to None to stop
logging. This is the default. Set logfile to sys.stdout to echo
everything to standard output. The logfile is flushed after each write.

Example log input and output to a file::

    child = pexpect.spawn('some_command')
    fout = open('mylog.txt','wb')
    child.logfile = fout

Example log to stdout::

    # In Python 2:
    child = pexpect.spawn('some_command')
    child.logfile = sys.stdout

    # In Python 3, we'll use the ``encoding`` argument to decode data
    # from the subprocess and handle it as unicode:
    child = pexpect.spawn('some_command', encoding='utf-8')
    child.logfile = sys.stdout

The logfile_read and logfile_send members can be used to separately log
the input from the child and output sent to the child. Sometimes you
don't want to see everything you write to the child. You only want to
log what the child sends back. For example::

    child = pexpect.spawn('some_command')
    child.logfile_read = sys.stdout

You will need to pass an encoding to spawn in the above code if you are
using Python 3.

To separately log output sent to the child use logfile_send::

    child.logfile_send = fout

If ``ignore_sighup`` is True, the child process will ignore SIGHUP
signals. The default is False from Pexpect 4.0, meaning that SIGHUP
will be handled normally by the child.

The delaybeforesend helps overcome a weird behavior that many users
were experiencing. The typical problem was that a user would expect() a
"Password:" prompt and then immediately call sendline() to send the
password. The user would then see that their password was echoed back
to them. Passwords don't normally echo. The problem is caused by the
fact that most applications print out the "Password" prompt and then
turn off stdin echo, but if you send your password before the
application turned off echo, then you get your password echoed.
Normally this wouldn't be a problem when interacting with a human at a
real keyboard. If you introduce a slight delay just before writing then
this seems to clear up the problem. This was such a common problem for
many users that I decided that the default pexpect behavior should be
to sleep just before writing to the child application. 1/20th of a
second (50 ms) seems to be enough to clear up the problem. You can set
delaybeforesend to None to return to the old behavior.

Note that spawn is clever about finding commands on your path.
It uses the same logic that "which" uses to find executables.

If you wish to get the exit status of the child you must call the
close() method. The exit or signal status of the child will be stored
in self.exitstatus or self.signalstatus. If the child exited normally
then exitstatus will store the exit return code and signalstatus will
be None. If the child was terminated abnormally with a signal then
signalstatus will store the signal value and exitstatus will be None::

    child = pexpect.spawn('some_command')
    child.close()
    print(child.exitstatus, child.signalstatus)

If you need more detail you can also read the self.status member which
stores the status returned by os.waitpid. You can interpret this using
os.WIFEXITED/os.WEXITSTATUS or os.WIFSIGNALED/os.TERMSIG.

The echo attribute may be set to False to disable echoing of input.
As a pseudo-terminal, all input echoed by the "keyboard" (send()
or sendline()) will be repeated to output.  For many cases, it is
not desirable to have echo enabled, and it may be later disabled
using setecho(False) followed by waitnoecho().  However, for some
platforms such as Solaris, this is not possible, and should be
disabled immediately on spawn.

If preexec_fn is given, it will be called in the child process before
launching the given command. This is useful to e.g. reset inherited
signal handlers.

The dimensions attribute specifies the size of the pseudo-terminal as
seen by the subprocess, and is specified as a two-entry tuple (rows,
columns). If this is unspecified, the defaults in ptyprocess will apply.

The use_poll attribute enables using select.poll() over select.select()
for socket handling. This is handy if your system could have > 1024 fds

---
## __str__
```python
from pty_spawn import __str__
```

This returns a human-readable string that represents the state of
the object. 

---
## _spawn
```python
from pty_spawn import _spawn
```

This starts the given command in a child process. This does all the
fork/exec type of stuff for a pty. This is called by __init__. If args
is empty then command will be parsed (split on spaces) and args will be
set to parsed arguments. 

---
## _spawnpty
```python
from pty_spawn import _spawnpty
```

Spawn a pty and return an instance of PtyProcess.

---
## close
```python
from pty_spawn import close
```

This closes the connection with the child application. Note that
calling close() more than once is valid. This emulates standard Python
behavior with files. Set force to True if you want to make sure that
the child is terminated (SIGKILL is sent if the child ignores SIGHUP
and SIGINT). 

---
## isatty
```python
from pty_spawn import isatty
```

This returns True if the file descriptor is open and connected to a
tty(-like) device, else False.

On SVR4-style platforms implementing streams, such as SunOS and HP-UX,
the child pty may not appear as a terminal device.  This means
methods such as setecho(), setwinsize(), getwinsize() may raise an
IOError. 

---
## waitnoecho
```python
from pty_spawn import waitnoecho
```

This waits until the terminal ECHO flag is set False. This returns
True if the echo mode is off. This returns False if the ECHO flag was
not set False before the timeout. This can be used to detect when the
child is waiting for a password. Usually a child application will turn
off echo mode when it is waiting for the user to enter a password. For
example, instead of expecting the "password:" prompt you can wait for
the child to set ECHO off::

    p = pexpect.spawn('ssh user@example.com')
    p.waitnoecho()
    p.sendline(mypassword)

If timeout==-1 then this method will use the value in self.timeout.
If timeout==None then this method to block until ECHO flag is False.

---
## getecho
```python
from pty_spawn import getecho
```

This returns the terminal echo mode. This returns True if echo is
on or False if echo is off. Child applications that are expecting you
to enter a password often set ECHO False. See waitnoecho().

Not supported on platforms where ``isatty()`` returns False.  

---
## setecho
```python
from pty_spawn import setecho
```

This sets the terminal echo mode on or off. Note that anything the
child sent before the echo will be lost, so you should be sure that
your input buffer is empty before you call setecho(). For example, the
following will work as expected::

    p = pexpect.spawn('cat') # Echo is on by default.
    p.sendline('1234') # We expect see this twice from the child...
    p.expect(['1234']) # ... once from the tty echo...
    p.expect(['1234']) # ... and again from cat itself.
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['abcd'])
    p.expect(['wxyz'])

The following WILL NOT WORK because the lines sent before the setecho
will be lost::

    p = pexpect.spawn('cat')
    p.sendline('1234')
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['1234'])
    p.expect(['1234'])
    p.expect(['abcd'])
    p.expect(['wxyz'])


Not supported on platforms where ``isatty()`` returns False.

---
## read_nonblocking
```python
from pty_spawn import read_nonblocking
```

This reads at most size characters from the child application. It
includes a timeout. If the read does not complete within the timeout
period then a TIMEOUT exception is raised. If the end of file is read
then an EOF exception will be raised.  If a logfile is specified, a
copy is written to that log.

If timeout is None then the read may block indefinitely.
If timeout is -1 then the self.timeout value is used. If timeout is 0
then the child is polled and if there is no data immediately ready
then this will raise a TIMEOUT exception.

The timeout refers only to the amount of time to read at least one
character. This is not affected by the 'size' parameter, so if you call
read_nonblocking(size=100, timeout=30) and only one character is
available right away then one character will be returned immediately.
It will not wait for 30 seconds for another 99 characters to come in.

On the other hand, if there are bytes available to read immediately,
all those bytes will be read (up to the buffer size). So, if the
buffer size is 1 megabyte and there is 1 megabyte of data available
to read, the buffer will be filled, regardless of timeout.

This is a wrapper around os.read(). It uses select.select() or
select.poll() to implement the timeout. 

---
## write
```python
from pty_spawn import write
```

This is similar to send() except that there is no return value.
        

---
## writelines
```python
from pty_spawn import writelines
```

This calls write() for each element in the sequence. The sequence
can be any iterable object producing strings, typically a list of
strings. This does not add line separators. There is no return value.

---
## send
```python
from pty_spawn import send
```

Sends string ``s`` to the child process, returning the number of
bytes written. If a logfile is specified, a copy is written to that
log.

The default terminal input mode is canonical processing unless set
otherwise by the child process. This allows backspace and other line
processing to be performed prior to transmitting to the receiving
program. As this is buffered, there is a limited size of such buffer.

On Linux systems, this is 4096 (defined by N_TTY_BUF_SIZE). All
other systems honor the POSIX.1 definition PC_MAX_CANON -- 1024
on OSX, 256 on OpenSolaris, and 1920 on FreeBSD.

This value may be discovered using fpathconf(3)::

    >>> from os import fpathconf
    >>> print(fpathconf(0, 'PC_MAX_CANON'))
    256

On such a system, only 256 bytes may be received per line. Any
subsequent bytes received will be discarded. BEL (``''``) is then
sent to output if IMAXBEL (termios.h) is set by the tty driver.
This is usually enabled by default.  Linux does not honor this as
an option -- it behaves as though it is always set on.

Canonical input processing may be disabled altogether by executing
a shell, then stty(1), before executing the final program::

    >>> bash = pexpect.spawn('/bin/bash', echo=False)
    >>> bash.sendline('stty -icanon')
    >>> bash.sendline('base64')
    >>> bash.sendline('x' * 5000)

---
## sendline
```python
from pty_spawn import sendline
```

Wraps send(), sending string ``s`` to child process, with
``os.linesep`` automatically appended. Returns number of bytes
written.  Only a limited number of bytes may be sent for each
line in the default terminal mode, see docstring of :meth:`send`.

---
## _log_control
```python
from pty_spawn import _log_control
```

Write control characters to the appropriate log files

---
## sendcontrol
```python
from pty_spawn import sendcontrol
```

Helper method that wraps send() with mnemonic access for sending control
character to the child (such as Ctrl-C or Ctrl-D).  For example, to send
Ctrl-G (ASCII 7, bell, '')::

    child.sendcontrol('g')

See also, sendintr() and sendeof().

---
## sendeof
```python
from pty_spawn import sendeof
```

This sends an EOF to the child. This sends a character which causes
the pending parent output buffer to be sent to the waiting child
program without waiting for end-of-line. If it is the first character
of the line, the read() in the user program returns 0, which signifies
end-of-file. This means to work as expected a sendeof() has to be
called at the beginning of a line. This method does not send a newline.
It is the responsibility of the caller to ensure the eof is sent at the
beginning of a line. 

---
## sendintr
```python
from pty_spawn import sendintr
```

This sends a SIGINT to the child. It does not require
the SIGINT to be the first character on a line. 

---
## flag_eof
```python
from pty_spawn import flag_eof
```



---
## eof
```python
from pty_spawn import eof
```

This returns True if the EOF exception was ever raised.
        

---
## terminate
```python
from pty_spawn import terminate
```

This forces a child process to terminate. It starts nicely with
SIGHUP and SIGINT. If "force" is True then moves onto SIGKILL. This
returns True if the child was terminated. This returns False if the
child could not be terminated. 

---
## wait
```python
from pty_spawn import wait
```

This waits until the child exits. This is a blocking call. This will
not read any data from the child, so this will block forever if the
child has unread output and has terminated. In other words, the child
may have printed output then called exit(), but, the child is
technically still alive until its output is read by the parent.

This method is non-blocking if :meth:`wait` has already been called
previously or :meth:`isalive` method returns False.  It simply returns
the previously determined exit status.

---
## isalive
```python
from pty_spawn import isalive
```

This tests if the child process is running or not. This is
non-blocking. If the child was terminated then this will read the
exitstatus or signalstatus of the child. This returns True if the child
process appears to be running or False if not. It can take literally
SECONDS for Solaris to return the right status. 

---
## kill
```python
from pty_spawn import kill
```

This sends the given signal to the child application. In keeping
with UNIX tradition it has a misleading name. It does not necessarily
kill the child unless you send the right signal. 

---
## getwinsize
```python
from pty_spawn import getwinsize
```

This returns the terminal window size of the child tty. The return
value is a tuple of (rows, cols). 

---
## setwinsize
```python
from pty_spawn import setwinsize
```

This sets the terminal window size of the child tty. This will cause
a SIGWINCH signal to be sent to the child. This does not change the
physical window size. It changes the size reported to TTY-aware
applications like vi or curses -- applications that respond to the
SIGWINCH signal. 

---
## interact
```python
from pty_spawn import interact
```

This gives control of the child process to the interactive user (the
human at the keyboard). Keystrokes are sent to the child process, and
the stdout and stderr output of the child process is printed. This
simply echos the child stdout and child stderr to the real stdout and
it echos the real stdin to the child stdin. When the user types the
escape_character this method will return None. The escape_character
will not be transmitted.  The default for escape_character is
entered as ``Ctrl - ]``, the very same as BSD telnet. To prevent
escaping, escape_character may be set to None.

If a logfile is specified, then the data sent and received from the
child process in interact mode is duplicated to the given log.

You may pass in optional input and output filter functions. These
functions should take bytes array and return bytes array too. Even
with ``encoding='utf-8'`` support, meth:`interact` will always pass
input_filter and output_filter bytes. You may need to wrap your
function to decode and encode back to UTF-8.

The output_filter will be passed all the output from the child process.
The input_filter will be passed all the keyboard input from the user.
The input_filter is run BEFORE the check for the escape_character.

Note that if you change the window size of the parent the SIGWINCH
signal will not be passed through to the child. If you want the child
window size to change when the parent's window size changes then do
something like the following example::

    import pexpect, struct, fcntl, termios, signal, sys
    def sigwinch_passthrough (sig, data):
        s = struct.pack("HHHH", 0, 0, 0, 0)
        a = struct.unpack('hhhh', fcntl.ioctl(sys.stdout.fileno(),
            termios.TIOCGWINSZ , s))
        if not p.closed:
            p.setwinsize(a[0],a[1])

    # Note this 'p' is global and used in sigwinch_passthrough.
    p = pexpect.spawn('/bin/bash')
    signal.signal(signal.SIGWINCH, sigwinch_passthrough)
    p.interact()

---
## __interact_writen
```python
from pty_spawn import __interact_writen
```

This is used by the interact() method.
        

---
## __interact_read
```python
from pty_spawn import __interact_read
```

This is used by the interact() method.
        

---
## __interact_copy
```python
from pty_spawn import __interact_copy
```

This is used by the interact() method.
        

---
## preexec_wrapper
```python
from pty_spawn import preexec_wrapper
```

Set SIGHUP to be ignored, then call the real preexec_fn

---
## select
```python
from pty_spawn import select
```



---
## __name__
```python
from FSM import __name__
```

This module implements a Finite State Machine (FSM). In addition to state
this FSM also maintains a user defined "memory". So this FSM can be used as a
Push-down Automata (PDA) since a PDA is a FSM + memory.

The following describes how the FSM works, but you will probably also need to
see the example function to understand how the FSM is used in practice.

You define an FSM by building tables of transitions. For a given input symbol
the process() method uses these tables to decide what action to call and what
the next state will be. The FSM has a table of transitions that associate:

        (input_symbol, current_state) --> (action, next_state)

Where "action" is a function you define. The symbols and states can be any
objects. You use the add_transition() and add_transition_list() methods to add
to the transition table. The FSM also has a table of transitions that
associate:

        (current_state) --> (action, next_state)

You use the add_transition_any() method to add to this transition table. The
FSM also has one default transition that is not associated with any specific
input_symbol or state. You use the set_default_transition() method to set the
default transition.

When an action function is called it is passed a reference to the FSM. The
action function may then access attributes of the FSM such as input_symbol,
current_state, or "memory". The "memory" attribute can be any object that you
want to pass along to the action functions. It is not used by the FSM itself.
For parsing you would typically pass a list to be used as a stack.

The processing sequence is as follows. The process() method is given an
input_symbol to process. The FSM will search the table of transitions that
associate:

        (input_symbol, current_state) --> (action, next_state)

If the pair (input_symbol, current_state) is found then process() will call the
associated action function and then set the current state to the next_state.

If the FSM cannot find a match for (input_symbol, current_state) it will then
search the table of transitions that associate:

        (current_state) --> (action, next_state)

If the current_state is found then the process() method will call the
associated action function and then set the current state to the next_state.
Notice that this table lacks an input_symbol. It lets you define transitions
for a current_state and ANY input_symbol. Hence, it is called the "any" table.
Remember, it is always checked after first searching the table for a specific
(input_symbol, current_state).

For the case where the FSM did not match either of the previous two cases the
FSM will try to use the default transition. If the default transition is
defined then the process() method will call the associated action function and
then set the current state to the next_state. This lets you define a default
transition as a catch-all case. You can think of it as an exception handler.
There can be only one default transition.

Finally, if none of the previous cases are defined for an input_symbol and
current_state then the FSM will raise an exception. This may be desirable, but
you can always prevent this just by defining a default transition.

Noah Spurrier 20020822

PEXPECT LICENSE

    This license is approved by the OSI and FSF as GPL-compatible.
        http://opensource.org/licenses/isc-license.txt

    Copyright (c) 2012, Noah Spurrier <noah@noah.org>
    PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
    PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
    COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

---
## ExceptionFSM
```python
from FSM import ExceptionFSM
```

This is the FSM Exception class.

---
## FSM
```python
from FSM import FSM
```

This is a Finite State Machine (FSM).
    

---
## BeginBuildNumber
```python
from FSM import BeginBuildNumber
```



---
## BuildNumber
```python
from FSM import BuildNumber
```



---
## EndBuildNumber
```python
from FSM import EndBuildNumber
```



---
## DoOperator
```python
from FSM import DoOperator
```



---
## DoEqual
```python
from FSM import DoEqual
```



---
## Error
```python
from FSM import Error
```



---
## main
```python
from FSM import main
```

This is where the example starts and the FSM state transitions are
defined. Note that states are strings (such as 'INIT'). This is not
necessary, but it makes the example easier to read. 

---
## __init__
```python
from FSM import __init__
```

This creates the FSM. You set the initial state here. The "memory"
attribute is any object that you want to pass along to the action
functions. It is not used by the FSM. For parsing you would typically
pass a list to be used as a stack. 

---
## __str__
```python
from FSM import __str__
```



---
## reset
```python
from FSM import reset
```

This sets the current_state to the initial_state and sets
input_symbol to None. The initial state was set by the constructor
__init__(). 

---
## add_transition
```python
from FSM import add_transition
```

This adds a transition that associates:

        (input_symbol, current_state) --> (action, next_state)

The action may be set to None in which case the process() method will
ignore the action and only set the next_state. The next_state may be
set to None in which case the current state will be unchanged.

You can also set transitions for a list of symbols by using
add_transition_list(). 

---
## add_transition_list
```python
from FSM import add_transition_list
```

This adds the same transition for a list of input symbols.
You can pass a list or a string. Note that it is handy to use
string.digits, string.whitespace, string.letters, etc. to add
transitions that match character classes.

The action may be set to None in which case the process() method will
ignore the action and only set the next_state. The next_state may be
set to None in which case the current state will be unchanged. 

---
## add_transition_any
```python
from FSM import add_transition_any
```

This adds a transition that associates:

        (current_state) --> (action, next_state)

That is, any input symbol will match the current state.
The process() method checks the "any" state associations after it first
checks for an exact match of (input_symbol, current_state).

The action may be set to None in which case the process() method will
ignore the action and only set the next_state. The next_state may be
set to None in which case the current state will be unchanged. 

---
## set_default_transition
```python
from FSM import set_default_transition
```

This sets the default transition. This defines an action and
next_state if the FSM cannot find the input symbol and the current
state in the transition list and if the FSM cannot find the
current_state in the transition_any list. This is useful as a final
fall-through state for catching errors and undefined states.

The default transition can be removed by setting the attribute
default_transition to None. 

---
## get_transition
```python
from FSM import get_transition
```

This returns (action, next state) given an input_symbol and state.
This does not modify the FSM state, so calling this method has no side
effects. Normally you do not call this method directly. It is called by
process().

The sequence of steps to check for a defined transition goes from the
most specific to the least specific.

1. Check state_transitions[] that match exactly the tuple,
    (input_symbol, state)

2. Check state_transitions_any[] that match (state)
    In other words, match a specific state and ANY input_symbol.

3. Check if the default_transition is defined.
    This catches any input_symbol and any state.
    This is a handler for errors, undefined states, or defaults.

4. No transition was defined. If we get here then raise an exception.

---
## process
```python
from FSM import process
```

This is the main method that you call to process input. This may
cause the FSM to change state and call an action. This method calls
get_transition() to find the action and next_state associated with the
input_symbol and current_state. If the action is None then the action
is not called and only the current state is changed. This method
processes one complete input symbol. You can process a list of symbols
(or a string) by calling process_list(). 

---
## process_list
```python
from FSM import process_list
```

This takes a list and sends each element to process(). The list may
be a string or any iterable object. 

---
## _typed_map_converter
```python
from _types import _typed_map_converter
```



---
## is_array
```python
from _types import is_array
```



---
## is_bool
```python
from _types import is_bool
```



---
## is_integer
```python
from _types import is_integer
```



---
## is_null
```python
from _types import is_null
```



---
## is_number
```python
from _types import is_number
```



---
## is_object
```python
from _types import is_object
```



---
## is_string
```python
from _types import is_string
```



---
## is_any
```python
from _types import is_any
```



---
## TypeChecker
```python
from _types import TypeChecker
```

A :kw:`type` property checker.

A `TypeChecker` performs type checking for a `Validator`, converting
between the defined JSON Schema types and some associated Python types or
objects.

Modifying the behavior just mentioned by redefining which Python objects
are considered to be of which JSON Schema types can be done using
`TypeChecker.redefine` or `TypeChecker.redefine_many`, and types can be
removed via `TypeChecker.remove`. Each of these return a new `TypeChecker`.

Arguments:

    type_checkers:

        The initial mapping of types to their checking functions.

---
## __repr__
```python
from _types import __repr__
```



---
## is_type
```python
from _types import is_type
```

Check if the instance is of the appropriate type.

Arguments:

    instance:

        The instance to check

    type:

        The name of the type that is expected.

Raises:

    `jsonschema.exceptions.UndefinedTypeCheck`:

        if ``type`` is unknown to this object.

---
## redefine
```python
from _types import redefine
```

Produce a new checker with the given type redefined.

Arguments:

    type:

        The name of the type to check.

    fn (collections.abc.Callable):

        A callable taking exactly two parameters - the type
        checker calling the function and the instance to check.
        The function should return true if instance is of this
        type and false otherwise.

---
## redefine_many
```python
from _types import redefine_many
```

Produce a new checker with the given types redefined.

Arguments:

    definitions (dict):

        A dictionary mapping types to their checking functions.

---
## remove
```python
from _types import remove
```

Produce a new checker with the given types forgotten.

Arguments:

    types:

        the names of the types to remove.

Raises:

    `jsonschema.exceptions.UndefinedTypeCheck`:

        if any given type is unknown to this object

---
## SchemaKeywordValidator
```python
from _typing import SchemaKeywordValidator
```



---
## __name__
```python
from protocols import __name__
```

typing.Protocol classes for jsonschema interfaces.

---
## Validator
```python
from protocols import Validator
```

The protocol to which all validator classes adhere.

Arguments:

    schema:

        The schema that the validator object will validate with.
        It is assumed to be valid, and providing
        an invalid schema can lead to undefined behavior. See
        `Validator.check_schema` to validate a schema first.

    registry:

        a schema registry that will be used for looking up JSON references

    resolver:

        a resolver that will be used to resolve :kw:`$ref`
        properties (JSON references). If unprovided, one will be created.

        .. deprecated:: v4.18.0

            `RefResolver <_RefResolver>` has been deprecated in favor of
            `referencing`, and with it, this argument.

    format_checker:

        if provided, a checker which will be used to assert about
        :kw:`format` properties present in the schema. If unprovided,
        *no* format validation is done, and the presence of format
        within schemas is strictly informational. Certain formats
        require additional packages to be installed in order to assert
        against instances. Ensure you've installed `jsonschema` with
        its `extra (optional) dependencies <index:extras>` when
        invoking ``pip``.

.. deprecated:: v4.12.0

    Subclassing validator classes now explicitly warns this is not part of
    their public API.

---
## __init__
```python
from protocols import __init__
```



---
## check_schema
```python
from protocols import check_schema
```

Validate the given schema against the validator's `META_SCHEMA`.

Raises:

    `jsonschema.exceptions.SchemaError`:

        if the schema is invalid

---
## is_type
```python
from protocols import is_type
```

Check if the instance is of the given (JSON Schema) type.

Arguments:

    instance:

        the value to check

    type:

        the name of a known (JSON Schema) type

Returns:

    whether the instance is of the given type

Raises:

    `jsonschema.exceptions.UnknownType`:

        if ``type`` is not a known type

---
## is_valid
```python
from protocols import is_valid
```

Check if the instance is valid under the current `schema`.

Returns:

    whether the instance is valid or not

>>> schema = {"maxItems" : 2}
>>> Draft202012Validator(schema).is_valid([2, 3, 4])
False

---
## iter_errors
```python
from protocols import iter_errors
```

Lazily yield each of the validation errors in the given instance.

>>> schema = {
...     "type" : "array",
...     "items" : {"enum" : [1, 2, 3]},
...     "maxItems" : 2,
... }
>>> v = Draft202012Validator(schema)
>>> for error in sorted(v.iter_errors([2, 3, 4]), key=str):
...     print(error.message)
4 is not one of [1, 2, 3]
[2, 3, 4] is too long

.. deprecated:: v4.0.0

    Calling this function with a second schema argument is deprecated.
    Use `Validator.evolve` instead.

---
## validate
```python
from protocols import validate
```

Check if the instance is valid under the current `schema`.

Raises:

    `jsonschema.exceptions.ValidationError`:

        if the instance is invalid

>>> schema = {"maxItems" : 2}
>>> Draft202012Validator(schema).validate([2, 3, 4])
Traceback (most recent call last):
    ...
ValidationError: [2, 3, 4] is too long

---
## evolve
```python
from protocols import evolve
```

Create a new validator like this one, but with given changes.

Preserves all other attributes, so can be used to e.g. create a
validator with a different schema but with the same :kw:`$ref`
resolution behavior.

>>> validator = Draft202012Validator({})
>>> validator.evolve(schema={"type": "number"})
Draft202012Validator(schema={'type': 'number'}, format_checker=None)

The returned object satisfies the validator protocol, but may not
be of the same concrete class! In particular this occurs
when a :kw:`$ref` occurs to a schema with a different
:kw:`$schema` than this one (i.e. for a different draft).

>>> validator.evolve(
...     schema={"$schema": Draft7Validator.META_SCHEMA["$id"]}
... )
Draft7Validator(schema=..., format_checker=None)

---
## __getattr__
```python
from validators import __getattr__
```



---
## validates
```python
from validators import validates
```

Register the decorated validator for a ``version`` of the specification.

Registered validators and their meta schemas will be considered when
parsing :kw:`$schema` keywords' URIs.

Arguments:

    version (str):

        An identifier to use as the version's name

Returns:

    collections.abc.Callable:

        a class decorator to decorate the validator with the version

---
## _warn_for_remote_retrieve
```python
from validators import _warn_for_remote_retrieve
```



---
## create
```python
from validators import create
```

Create a new validator class.

Arguments:

    meta_schema:

        the meta schema for the new validator class

    validators:

        a mapping from names to callables, where each callable will
        validate the schema property with the given name.

        Each callable should take 4 arguments:

            1. a validator instance,
            2. the value of the property being validated within the
               instance
            3. the instance
            4. the schema

    version:

        an identifier for the version that this validator class will
        validate. If provided, the returned validator class will
        have its ``__name__`` set to include the version, and also
        will have `jsonschema.validators.validates` automatically
        called for the given version.

    type_checker:

        a type checker, used when applying the :kw:`type` keyword.

        If unprovided, a `jsonschema.TypeChecker` will be created
        with a set of default types typical of JSON Schema drafts.

    format_checker:

        a format checker, used when applying the :kw:`format` keyword.

        If unprovided, a `jsonschema.FormatChecker` will be created
        with a set of default formats typical of JSON Schema drafts.

    id_of:

        A function that given a schema, returns its ID.

    applicable_validators:

        A function that, given a schema, returns the list of
        applicable schema keywords and associated values
        which will be used to validate the instance.
        This is mostly used to support pre-draft 7 versions of JSON Schema
        which specified behavior around ignoring keywords if they were
        siblings of a ``$ref`` keyword. If you're not attempting to
        implement similar behavior, you can typically ignore this argument
        and leave it at its default.

Returns:

    a new `jsonschema.protocols.Validator` class

---
## extend
```python
from validators import extend
```

Create a new validator class by extending an existing one.

Arguments:

    validator (jsonschema.protocols.Validator):

        an existing validator class

    validators (collections.abc.Mapping):

        a mapping of new validator callables to extend with, whose
        structure is as in `create`.

        .. note::

            Any validator callables with the same name as an
            existing one will (silently) replace the old validator
            callable entirely, effectively overriding any validation
            done in the "parent" validator class.

            If you wish to instead extend the behavior of a parent's
            validator callable, delegate and call it directly in
            the new validator function by retrieving it using
            ``OldValidator.VALIDATORS["validation_keyword_name"]``.

    version (str):

        a version for the new validator class

    type_checker (jsonschema.TypeChecker):

        a type checker, used when applying the :kw:`type` keyword.

        If unprovided, the type checker of the extended
        `jsonschema.protocols.Validator` will be carried along.

    format_checker (jsonschema.FormatChecker):

        a format checker, used when applying the :kw:`format` keyword.

        If unprovided, the format checker of the extended
        `jsonschema.protocols.Validator` will be carried along.

Returns:

    a new `jsonschema.protocols.Validator` class extending the one
    provided

.. note:: Meta Schemas

    The new validator class will have its parent's meta schema.

    If you wish to change or extend the meta schema in the new
    validator class, modify ``META_SCHEMA`` directly on the returned
    class. Note that no implicit copying is done, so a copy should
    likely be made before modifying it, in order to not affect the
    old validator.

---
## _RefResolver
```python
from validators import _RefResolver
```

Resolve JSON References.

Arguments:

    base_uri (str):

        The URI of the referring document

    referrer:

        The actual referring document

    store (dict):

        A mapping from URIs to documents to cache

    cache_remote (bool):

        Whether remote refs should be cached after first resolution

    handlers (dict):

        A mapping from URI schemes to functions that should be used
        to retrieve them

    urljoin_cache (:func:`functools.lru_cache`):

        A cache that will be used for caching the results of joining
        the resolution scope to subscopes.

    remote_cache (:func:`functools.lru_cache`):

        A cache that will be used for caching the results of
        resolved remote URLs.

Attributes:

    cache_remote (bool):

        Whether remote refs should be cached after first resolution

.. deprecated:: v4.18.0

    ``RefResolver`` has been deprecated in favor of `referencing`.

---
## _match_keyword
```python
from validators import _match_keyword
```



---
## _match_subschema_keywords
```python
from validators import _match_subschema_keywords
```



---
## _search_schema
```python
from validators import _search_schema
```

Breadth-first search routine.

---
## validator_for
```python
from validators import validator_for
```

Retrieve the validator class appropriate for validating the given schema.

Uses the :kw:`$schema` keyword that should be present in the given
schema to look up the appropriate validator class.

Arguments:

    schema (collections.abc.Mapping or bool):

        the schema to look at

    default:

        the default to return if the appropriate validator class
        cannot be determined.

        If unprovided, the default is to return the latest supported
        draft.

Examples:

    The :kw:`$schema` JSON Schema keyword will control which validator
    class is returned:

    >>> schema = {
    ...     "$schema": "https://json-schema.org/draft/2020-12/schema",
    ...     "type": "integer",
    ... }
    >>> jsonschema.validators.validator_for(schema)
    <class 'jsonschema.validators.Draft202012Validator'>


    Here, a draft 7 schema instead will return the draft 7 validator:

    >>> schema = {
    ...     "$schema": "http://json-schema.org/draft-07/schema#",
    ...     "type": "integer",
    ... }
    >>> jsonschema.validators.validator_for(schema)
    <class 'jsonschema.validators.Draft7Validator'>


    Schemas with no ``$schema`` keyword will fallback to the default
    argument:

    >>> schema = {"type": "integer"}
    >>> jsonschema.validators.validator_for(
    ...     schema, default=Draft7Validator,
    ... )
    <class 'jsonschema.validators.Draft7Validator'>

    or if none is provided, to the latest version supported.
    Always including the keyword when authoring schemas is highly
    recommended.

---
## _validates
```python
from validators import _validates
```



---
## from_schema
```python
from validators import from_schema
```

Construct a resolver from a JSON schema object.

Arguments:

    schema:

        the referring schema

Returns:

    `_RefResolver`

---
## push_scope
```python
from validators import push_scope
```

Enter a given sub-scope.

Treats further dereferences as being performed underneath the
given scope.

---
## pop_scope
```python
from validators import pop_scope
```

Exit the most recent entered scope.

Treats further dereferences as being performed underneath the
original scope.

Don't call this method more times than `push_scope` has been
called.

---
## resolution_scope
```python
from validators import resolution_scope
```

Retrieve the current resolution scope.

---
## base_uri
```python
from validators import base_uri
```

Retrieve the current base URI, not including any fragment.

---
## in_scope
```python
from validators import in_scope
```

Temporarily enter the given scope for the duration of the context.

.. deprecated:: v4.0.0

---
## resolving
```python
from validators import resolving
```

Resolve the given ``ref`` and enter its resolution scope.

Exits the scope on exit of this context manager.

Arguments:

    ref (str):

        The reference to resolve

---
## _find_in_referrer
```python
from validators import _find_in_referrer
```



---
## _get_subschemas_cache
```python
from validators import _get_subschemas_cache
```



---
## _find_in_subschemas
```python
from validators import _find_in_subschemas
```



---
## resolve
```python
from validators import resolve
```

Resolve the given reference.

---
## resolve_from_url
```python
from validators import resolve_from_url
```

Resolve the given URL.

---
## resolve_fragment
```python
from validators import resolve_fragment
```

Resolve a ``fragment`` within the referenced ``document``.

Arguments:

    document:

        The referent document

    fragment (str):

        a URI fragment to resolve within it

---
## resolve_remote
```python
from validators import resolve_remote
```

Resolve a remote ``uri``.

If called directly, does not check the store first, but after
retrieving the document at the specified URI it will be saved in
the store if :attr:`cache_remote` is True.

.. note::

    If the requests_ library is present, ``jsonschema`` will use it to
    request the remote ``uri``, so that the correct encoding is
    detected and used.

    If it isn't, or if the scheme of the ``uri`` is not ``http`` or
    ``https``, UTF-8 is assumed.

Arguments:

    uri (str):

        The URI to resolve

Returns:

    The retrieved document

.. _requests: https://pypi.org/project/requests/

---
## matcher
```python
from validators import matcher
```



---
## __init_subclass__
```python
from validators import __init_subclass__
```



---
## __attrs_post_init__
```python
from validators import __attrs_post_init__
```



---
## check_schema
```python
from validators import check_schema
```



---
## resolver
```python
from validators import resolver
```



---
## evolve
```python
from validators import evolve
```



---
## iter_errors
```python
from validators import iter_errors
```



---
## descend
```python
from validators import descend
```



---
## is_type
```python
from validators import is_type
```



---
## _validate_reference
```python
from validators import _validate_reference
```



---
## find
```python
from validators import find
```



---
## __name__
```python
from _legacy_keywords import __name__
```



---
## ignore_ref_siblings
```python
from _legacy_keywords import ignore_ref_siblings
```

Ignore siblings of ``$ref`` if it is present.

Otherwise, return all keywords.

Suitable for use with `create`'s ``applicable_validators`` argument.

---
## dependencies_draft3
```python
from _legacy_keywords import dependencies_draft3
```



---
## dependencies_draft4_draft6_draft7
```python
from _legacy_keywords import dependencies_draft4_draft6_draft7
```

Support for the ``dependencies`` keyword from pre-draft 2019-09.

In later drafts, the keyword was split into separate
``dependentRequired`` and ``dependentSchemas`` validators.

---
## disallow_draft3
```python
from _legacy_keywords import disallow_draft3
```



---
## extends_draft3
```python
from _legacy_keywords import extends_draft3
```



---
## items_draft3_draft4
```python
from _legacy_keywords import items_draft3_draft4
```



---
## additionalItems
```python
from _legacy_keywords import additionalItems
```



---
## items_draft6_draft7_draft201909
```python
from _legacy_keywords import items_draft6_draft7_draft201909
```



---
## minimum_draft3_draft4
```python
from _legacy_keywords import minimum_draft3_draft4
```



---
## maximum_draft3_draft4
```python
from _legacy_keywords import maximum_draft3_draft4
```



---
## properties_draft3
```python
from _legacy_keywords import properties_draft3
```



---
## type_draft3
```python
from _legacy_keywords import type_draft3
```



---
## contains_draft6_draft7
```python
from _legacy_keywords import contains_draft6_draft7
```



---
## recursiveRef
```python
from _legacy_keywords import recursiveRef
```



---
## find_evaluated_item_indexes_by_schema
```python
from _legacy_keywords import find_evaluated_item_indexes_by_schema
```

Get all indexes of items that get evaluated under the current schema.

Covers all keywords related to unevaluatedItems: items, prefixItems, if,
then, else, contains, unevaluatedItems, allOf, oneOf, anyOf

---
## unevaluatedItems_draft2019
```python
from _legacy_keywords import unevaluatedItems_draft2019
```



---
## find_evaluated_property_keys_by_schema
```python
from _legacy_keywords import find_evaluated_property_keys_by_schema
```



---
## unevaluatedProperties_draft2019
```python
from _legacy_keywords import unevaluatedProperties_draft2019
```



---
## __name__
```python
from _keywords import __name__
```



---
## patternProperties
```python
from _keywords import patternProperties
```



---
## propertyNames
```python
from _keywords import propertyNames
```



---
## additionalProperties
```python
from _keywords import additionalProperties
```



---
## items
```python
from _keywords import items
```



---
## const
```python
from _keywords import const
```



---
## contains
```python
from _keywords import contains
```



---
## exclusiveMinimum
```python
from _keywords import exclusiveMinimum
```



---
## exclusiveMaximum
```python
from _keywords import exclusiveMaximum
```



---
## minimum
```python
from _keywords import minimum
```



---
## maximum
```python
from _keywords import maximum
```



---
## multipleOf
```python
from _keywords import multipleOf
```



---
## minItems
```python
from _keywords import minItems
```



---
## maxItems
```python
from _keywords import maxItems
```



---
## uniqueItems
```python
from _keywords import uniqueItems
```



---
## pattern
```python
from _keywords import pattern
```



---
## format
```python
from _keywords import format
```



---
## minLength
```python
from _keywords import minLength
```



---
## maxLength
```python
from _keywords import maxLength
```



---
## dependentRequired
```python
from _keywords import dependentRequired
```



---
## dependentSchemas
```python
from _keywords import dependentSchemas
```



---
## enum
```python
from _keywords import enum
```



---
## ref
```python
from _keywords import ref
```



---
## dynamicRef
```python
from _keywords import dynamicRef
```



---
## type
```python
from _keywords import type
```



---
## properties
```python
from _keywords import properties
```



---
## required
```python
from _keywords import required
```



---
## minProperties
```python
from _keywords import minProperties
```



---
## maxProperties
```python
from _keywords import maxProperties
```



---
## allOf
```python
from _keywords import allOf
```



---
## anyOf
```python
from _keywords import anyOf
```



---
## oneOf
```python
from _keywords import oneOf
```



---
## not_
```python
from _keywords import not_
```



---
## if_
```python
from _keywords import if_
```



---
## unevaluatedItems
```python
from _keywords import unevaluatedItems
```



---
## unevaluatedProperties
```python
from _keywords import unevaluatedProperties
```



---
## prefixItems
```python
from _keywords import prefixItems
```



---
## FormatChecker
```python
from _format import FormatChecker
```

A ``format`` property checker.

JSON Schema does not mandate that the ``format`` property actually do any
validation. If validation is desired however, instances of this class can
be hooked into validators to enable format validation.

`FormatChecker` objects always return ``True`` when asked about
formats that they do not know how to validate.

To add a check for a custom format use the `FormatChecker.checks`
decorator.

Arguments:

    formats:

        The known formats to validate. This argument can be used to
        limit which formats will be used during validation.

---
## _checks_drafts
```python
from _format import _checks_drafts
```



---
## is_email
```python
from _format import is_email
```



---
## is_ipv4
```python
from _format import is_ipv4
```



---
## is_ipv6
```python
from _format import is_ipv6
```



---
## is_regex
```python
from _format import is_regex
```



---
## is_date
```python
from _format import is_date
```



---
## is_draft3_time
```python
from _format import is_draft3_time
```



---
## is_uuid
```python
from _format import is_uuid
```



---
## __init__
```python
from _format import __init__
```



---
## __repr__
```python
from _format import __repr__
```



---
## checks
```python
from _format import checks
```

Register a decorated function as validating a new format.

Arguments:

    format:

        The format that the decorated function will check.

    raises:

        The exception(s) raised by the decorated function when an
        invalid instance is found.

        The exception object will be accessible as the
        `jsonschema.exceptions.ValidationError.cause` attribute of the
        resulting validation error.

---
## cls_checks
```python
from _format import cls_checks
```



---
## _cls_checks
```python
from _format import _cls_checks
```



---
## check
```python
from _format import check
```

Check whether the instance conforms to the given format.

Arguments:

    instance (*any primitive type*, i.e. str, number, bool):

        The instance to check

    format:

        The format that instance should conform to

Raises:

    FormatError:

        if the instance does not conform to ``format``

---
## conforms
```python
from _format import conforms
```

Check whether the instance conforms to the given format.

Arguments:

    instance (*any primitive type*, i.e. str, number, bool):

        The instance to check

    format:

        The format that instance should conform to

Returns:

    bool: whether it conformed

---
## wrap
```python
from _format import wrap
```



---
## is_host_name
```python
from _format import is_host_name
```



---
## is_idn_host_name
```python
from _format import is_idn_host_name
```



---
## is_iri
```python
from _format import is_iri
```



---
## is_iri_reference
```python
from _format import is_iri_reference
```



---
## is_uri
```python
from _format import is_uri
```



---
## is_uri_reference
```python
from _format import is_uri_reference
```



---
## is_datetime
```python
from _format import is_datetime
```



---
## is_time
```python
from _format import is_time
```



---
## is_css21_color
```python
from _format import is_css21_color
```



---
## is_json_pointer
```python
from _format import is_json_pointer
```



---
## is_relative_json_pointer
```python
from _format import is_relative_json_pointer
```



---
## is_uri_template
```python
from _format import is_uri_template
```



---
## is_duration
```python
from _format import is_duration
```



---
## _checks
```python
from _format import _checks
```



---
## _CannotLoadFile
```python
from cli import _CannotLoadFile
```



---
## _Outputter
```python
from cli import _Outputter
```



---
## _PrettyFormatter
```python
from cli import _PrettyFormatter
```



---
## _PlainFormatter
```python
from cli import _PlainFormatter
```



---
## _resolve_name_with_default
```python
from cli import _resolve_name_with_default
```



---
## parse_args
```python
from cli import parse_args
```



---
## _validate_instance
```python
from cli import _validate_instance
```



---
## from_arguments
```python
from cli import from_arguments
```



---
## load
```python
from cli import load
```



---
## filenotfound_error
```python
from cli import filenotfound_error
```



---
## parsing_error
```python
from cli import parsing_error
```



---
## validation_error
```python
from cli import validation_error
```



---
## validation_success
```python
from cli import validation_success
```



---
## _pretty
```python
from exceptions import _pretty
```

Format something for an error message as prettily as we currently can.

---
## _Error
```python
from exceptions import _Error
```



---
## SchemaError
```python
from exceptions import SchemaError
```

A schema was invalid under its corresponding metaschema.

---
## _RefResolutionError
```python
from exceptions import _RefResolutionError
```

A ref could not be resolved.

---
## _WrappedReferencingError
```python
from exceptions import _WrappedReferencingError
```



---
## UndefinedTypeCheck
```python
from exceptions import UndefinedTypeCheck
```

A type checker was asked to check a type it did not have registered.

---
## UnknownType
```python
from exceptions import UnknownType
```

A validator was asked to validate an instance against an unknown type.

---
## FormatError
```python
from exceptions import FormatError
```

Invalid msgpack format

---
## ErrorTree
```python
from exceptions import ErrorTree
```

ErrorTrees make it easier to check which validations failed.

---
## by_relevance
```python
from exceptions import by_relevance
```

Create a key function that can be used to sort errors by relevance.

Arguments:
    weak (set):
        a collection of validation keywords to consider to be
        "weak".  If there are two errors at the same level of the
        instance and one is in the set of weak validation keywords,
        the other error will take priority. By default, :kw:`anyOf`
        and :kw:`oneOf` are considered weak keywords and will be
        superseded by other same-level validation errors.

    strong (set):
        a collection of validation keywords to consider to be
        "strong"

---
## best_match
```python
from exceptions import best_match
```

Try to find an error that appears to be the best match among given errors.

In general, errors that are higher up in the instance (i.e. for which
`ValidationError.path` is shorter) are considered better matches,
since they indicate "more" is wrong with the instance.

If the resulting match is either :kw:`oneOf` or :kw:`anyOf`, the
*opposite* assumption is made -- i.e. the deepest error is picked,
since these keywords only need to match once, and any other errors
may not be relevant.

Arguments:
    errors (collections.abc.Iterable):

        the errors to select from. Do not provide a mixture of
        errors from different validation attempts (i.e. from
        different instances or schemas), since it won't produce
        sensical output.

    key (collections.abc.Callable):

        the key to use when sorting errors. See `relevance` and
        transitively `by_relevance` for more details (the default is
        to sort with the defaults of that function). Changing the
        default is only useful if you want to change the function
        that rates errors but still want the error context descent
        done by this function.

Returns:
    the best matching error, or ``None`` if the iterable was empty

.. note::

    This function is a heuristic. Its return value may change for a given
    set of inputs from version to version if better heuristics are added.

---
## create_from
```python
from exceptions import create_from
```



---
## absolute_path
```python
from exceptions import absolute_path
```



---
## absolute_schema_path
```python
from exceptions import absolute_schema_path
```



---
## json_path
```python
from exceptions import json_path
```



---
## _set
```python
from exceptions import _set
```



---
## _contents
```python
from exceptions import _contents
```



---
## _matches_type
```python
from exceptions import _matches_type
```



---
## __contains__
```python
from exceptions import __contains__
```

Check whether ``instance[index]`` has any errors.

---
## __getitem__
```python
from exceptions import __getitem__
```

Retrieve the child tree one level down at the given ``index``.

If the index is not in the instance that this tree corresponds
to and is not known by this tree, whatever error would be raised
by ``instance.__getitem__`` will be propagated (usually this is
some subclass of `LookupError`.

---
## __setitem__
```python
from exceptions import __setitem__
```

Add an error to the tree at the given ``index``.

.. deprecated:: v4.20.0

    Setting items on an `ErrorTree` is deprecated without replacement.
    To populate a tree, provide all of its sub-errors when you
    construct the tree.

---
## __iter__
```python
from exceptions import __iter__
```

Iterate (non-recursively) over the indices in the instance with errors.

---
## __len__
```python
from exceptions import __len__
```

Return the `total_errors`.

---
## total_errors
```python
from exceptions import total_errors
```

The total number of errors in the entire tree, including children.

---
## relevance
```python
from exceptions import relevance
```



---
## URIDict
```python
from _utils import URIDict
```

Dictionary which uses normalized URIs as keys.

---
## Unset
```python
from _utils import Unset
```

An as-of-yet unset attribute or unprovided default parameter.

---
## format_as_index
```python
from _utils import format_as_index
```

Construct a single string containing indexing operations for the indices.

For example for a container ``bar``, [1, 2, "foo"] -> bar[1][2]["foo"]

Arguments:

    container (str):

        A word to use for the thing being indexed

    indices (sequence):

        The indices to format.

---
## find_additional_properties
```python
from _utils import find_additional_properties
```

Return the set of additional properties for the given ``instance``.

Weeds out properties that should have been validated by ``properties`` and
/ or ``patternProperties``.

Assumes ``instance`` is dict-like already.

---
## extras_msg
```python
from _utils import extras_msg
```

Create an error message for extra items or properties.

---
## ensure_list
```python
from _utils import ensure_list
```

Wrap ``thing`` in a list if it's a single str.

Otherwise, return it unchanged.

---
## _mapping_equal
```python
from _utils import _mapping_equal
```

Check if two mappings are equal using the semantics of `equal`.

---
## _sequence_equal
```python
from _utils import _sequence_equal
```

Check if two sequences are equal using the semantics of `equal`.

---
## equal
```python
from _utils import equal
```

Check if two things are equal evading some Python type hierarchy semantics.

Specifically in JSON Schema, evade `bool` inheriting from `int`,
recursing into sequences to do the same.

---
## unbool
```python
from _utils import unbool
```

A hack to make True and 1 and False and 0 unique for ``uniq``.

---
## uniq
```python
from _utils import uniq
```

Check if all of a container's elements are unique.

Tries to rely on the container being recursively sortable, or otherwise
falls back on (slow) brute force.

---
## find_evaluated_item_indexes_by_schema
```python
from _utils import find_evaluated_item_indexes_by_schema
```

Get all indexes of items that get evaluated under the current schema.

Covers all keywords related to unevaluatedItems: items, prefixItems, if,
then, else, contains, unevaluatedItems, allOf, oneOf, anyOf

---
## find_evaluated_property_keys_by_schema
```python
from _utils import find_evaluated_property_keys_by_schema
```

Get all keys of items that get evaluated under the current schema.

Covers all keywords related to unevaluatedProperties: properties,
additionalProperties, unevaluatedProperties, patternProperties,
dependentSchemas, allOf, oneOf, anyOf, if, then, else

---
## normalize
```python
from _utils import normalize
```



---
## __getitem__
```python
from _utils import __getitem__
```



---
## __setitem__
```python
from _utils import __setitem__
```



---
## __delitem__
```python
from _utils import __delitem__
```



---
## __iter__
```python
from _utils import __iter__
```



---
## __len__
```python
from _utils import __len__
```



---
## __repr__
```python
from _utils import __repr__
```



---
## concat
```python
from functions import concat
```

Concatenate multiple DataFrames, LazyFrames into a single entity.

Arguments:
    items: DataFrames, LazyFrames to concatenate.

    how: {'vertical', 'horizontal'}
        * vertical: Stacks Series from DataFrames vertically and fills with `null`
          if the lengths don't match.
        * horizontal: Stacks Series from DataFrames horizontally and fills with `null`
          if the lengths don't match.

Returns:
    A new DataFrame, Lazyframe resulting from the concatenation.

Raises:
    NotImplementedError: The items to concatenate should either all be eager, or all lazy

Examples:

    Let's take an example of vertical concatenation:

    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data_1 = {"a": [1, 2, 3], "b": [4, 5, 6]}
    >>> data_2 = {"a": [5, 2], "b": [1, 4]}

    >>> df_pd_1 = pd.DataFrame(data_1)
    >>> df_pd_2 = pd.DataFrame(data_2)
    >>> df_pl_1 = pl.DataFrame(data_1)
    >>> df_pl_2 = pl.DataFrame(data_2)

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df1, df2):
    ...     return nw.concat([df1, df2], how="vertical")

    >>> func(df_pd_1, df_pd_2)
       a  b
    0  1  4
    1  2  5
    2  3  6
    0  5  1
    1  2  4
    >>> func(df_pl_1, df_pl_2)
    shape: (5, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 1   ┆ 4   │
    │ 2   ┆ 5   │
    │ 3   ┆ 6   │
    │ 5   ┆ 1   │
    │ 2   ┆ 4   │
    └─────┴─────┘

    Let's look at case a for horizontal concatenation:

    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data_1 = {"a": [1, 2, 3], "b": [4, 5, 6]}
    >>> data_2 = {"c": [5, 2], "d": [1, 4]}

    >>> df_pd_1 = pd.DataFrame(data_1)
    >>> df_pd_2 = pd.DataFrame(data_2)
    >>> df_pl_1 = pl.DataFrame(data_1)
    >>> df_pl_2 = pl.DataFrame(data_2)

    Defining a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df1, df2):
    ...     return nw.concat([df1, df2], how="horizontal")

    >>> func(df_pd_1, df_pd_2)
       a  b    c    d
    0  1  4  5.0  1.0
    1  2  5  2.0  4.0
    2  3  6  NaN  NaN

    >>> func(df_pl_1, df_pl_2)
    shape: (3, 4)
    ┌─────┬─────┬──────┬──────┐
    │ a   ┆ b   ┆ c    ┆ d    │
    │ --- ┆ --- ┆ ---  ┆ ---  │
    │ i64 ┆ i64 ┆ i64  ┆ i64  │
    ╞═════╪═════╪══════╪══════╡
    │ 1   ┆ 4   ┆ 5    ┆ 1    │
    │ 2   ┆ 5   ┆ 2    ┆ 4    │
    │ 3   ┆ 6   ┆ null ┆ null │
    └─────┴─────┴──────┴──────┘

---
## new_series
```python
from functions import new_series
```

Instantiate Narwhals Series from raw data.

Arguments:
    name: Name of resulting Series.
    values: Values of make Series from.
    dtype: (Narwhals) dtype. If not provided, the native library
        may auto-infer it from `values`.
    native_namespace: The native library to use for DataFrame creation.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {"a": [1, 2, 3], "b": [4, 5, 6]}

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     values = [4, 1, 2]
    ...     native_namespace = nw.get_native_namespace(df)
    ...     return nw.new_series("c", values, nw.Int32, native_namespace=native_namespace)

    Let's see what happens when passing pandas / Polars input:

    >>> func(pd.DataFrame(data))
    0    4
    1    1
    2    2
    Name: c, dtype: int32
    >>> func(pl.DataFrame(data))  # doctest: +NORMALIZE_WHITESPACE
    shape: (3,)
    Series: 'c' [i32]
    [
       4
       1
       2
    ]

---
## _new_series_impl
```python
from functions import _new_series_impl
```



---
## from_dict
```python
from functions import from_dict
```

Instantiate DataFrame from dictionary.

Notes:
    For pandas-like dataframes, conversion to schema is applied after dataframe
    creation.

Arguments:
    data: Dictionary to create DataFrame from.
    schema: The DataFrame schema as Schema or dict of {name: type}.
    native_namespace: The native library to use for DataFrame creation. Only
        necessary if inputs are not Narwhals Series.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {"a": [1, 2, 3], "b": [4, 5, 6]}

    Let's create a new dataframe of the same class as the dataframe we started with, from a dict of new data:

    >>> @nw.narwhalify
    ... def func(df):
    ...     new_data = {"c": [5, 2], "d": [1, 4]}
    ...     native_namespace = nw.get_native_namespace(df)
    ...     return nw.from_dict(new_data, native_namespace=native_namespace)

    Let's see what happens when passing pandas / Polars input:

    >>> func(pd.DataFrame(data))
       c  d
    0  5  1
    1  2  4
    >>> func(pl.DataFrame(data))
    shape: (2, 2)
    ┌─────┬─────┐
    │ c   ┆ d   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 5   ┆ 1   │
    │ 2   ┆ 4   │
    └─────┴─────┘

---
## _from_dict_impl
```python
from functions import _from_dict_impl
```



---
## _get_sys_info
```python
from functions import _get_sys_info
```

System information

Returns system and Python version information

Copied from sklearn

---
## _get_deps_info
```python
from functions import _get_deps_info
```

Overview of the installed version of main dependencies

This function does not import the modules to collect the version numbers
but instead relies on standard Python package metadata.

Returns version information on relevant Python libraries

This function and show_versions were copied from sklearn and adapted

---
## show_versions
```python
from functions import show_versions
```

Print useful debugging information

Examples:

    >>> from narwhals import show_versions
    >>> show_versions()  # doctest:+SKIP

---
## get_level
```python
from functions import get_level
```

Level of support Narwhals has for current object.

This can be one of:

- 'full': full Narwhals API support
- 'metadata': only metadata operations are supported (`df.schema`)

---
## __name__
```python
from translate import __name__
```



---
## to_native
```python
from translate import to_native
```

Convert Narwhals object to native one.

Arguments:
    narwhals_object: Narwhals object.
    strict: whether to raise on non-Narwhals input.

Returns:
    Object of class that user started with.

---
## from_native
```python
from translate import from_native
```

Convert dataframe/series to Narwhals DataFrame, LazyFrame, or Series.

Arguments:
    native_object: Raw object from user.
        Depending on the other arguments, input object can be:

        - pandas.DataFrame
        - polars.DataFrame
        - polars.LazyFrame
        - anything with a `__narwhals_dataframe__` or `__narwhals_lazyframe__` method
        - pandas.Series
        - polars.Series
        - anything with a `__narwhals_series__` method
    strict: Whether to raise if object can't be converted (default) or
        to just leave it as-is.
    eager_only: Whether to only allow eager objects.
    eager_or_interchange_only: Whether to only allow eager objects or objects which
        implement the Dataframe Interchange Protocol.
    series_only: Whether to only allow series.
    allow_series: Whether to allow series (default is only dataframe / lazyframe).

Returns:
    narwhals.DataFrame or narwhals.LazyFrame or narwhals.Series

---
## _from_native_impl
```python
from translate import _from_native_impl
```



---
## get_native_namespace
```python
from translate import get_native_namespace
```

Get native namespace from object.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> df = nw.from_native(pd.DataFrame({"a": [1, 2, 3]}))
    >>> nw.get_native_namespace(df)
    <module 'pandas'...>
    >>> df = nw.from_native(pl.DataFrame({"a": [1, 2, 3]}))
    >>> nw.get_native_namespace(df)
    <module 'polars'...>

---
## narwhalify
```python
from translate import narwhalify
```

Decorate function so it becomes dataframe-agnostic.

`narwhalify` will try to convert any dataframe/series-like object into the narwhal
respective DataFrame/Series, while leaving the other parameters as they are.

Similarly, if the output of the function is a narwhals DataFrame or Series, it will be
converted back to the original dataframe/series type, while if the output is another
type it will be left as is.

By setting `strict=True`, then every input and every output will be required to be a
dataframe/series-like object.

Instead of writing

```python
import narwhals as nw


def func(df):
    df = nw.from_native(df, strict=False)
    df = df.group_by("a").agg(nw.col("b").sum())
    return nw.to_native(df)
```

you can just write

```python
import narwhals as nw


@nw.narwhalify
def func(df):
    return df.group_by("a").agg(nw.col("b").sum())
```

You can also pass in extra arguments, e.g.

```python
@nw.narwhalify(eager_only=True)
```

that will get passed down to `nw.from_native`.

Arguments:
    func: Function to wrap in a `from_native`-`to_native` block.
    strict: Whether to raise if object can't be converted or to just leave it as-is
        (default).
    eager_only: Whether to only allow eager objects.
    eager_or_interchange_only: Whether to only allow eager objects or objects which
        implement the Dataframe Interchange Protocol.
    series_only: Whether to only allow series.
    allow_series: Whether to allow series (default is only dataframe / lazyframe).

---
## decorator
```python
from translate import decorator
```



---
## wrapper
```python
from translate import wrapper
```



---
## __name__
```python
from dataframe import __name__
```



---
## BaseFrame
```python
from dataframe import BaseFrame
```



---
## DataFrame
```python
from dataframe import DataFrame
```

Narwhals DataFrame, backed by a native dataframe.

The native dataframe might be pandas.DataFrame, polars.DataFrame, ...

This class is not meant to be instantiated directly - instead, use
`narwhals.from_native`.

---
## LazyFrame
```python
from dataframe import LazyFrame
```

Narwhals DataFrame, backed by a native dataframe.

The native dataframe might be pandas.DataFrame, polars.LazyFrame, ...

This class is not meant to be instantiated directly - instead, use
`narwhals.from_native`.

---
## __native_namespace__
```python
from dataframe import __native_namespace__
```



---
## __narwhals_namespace__
```python
from dataframe import __narwhals_namespace__
```



---
## _from_compliant_dataframe
```python
from dataframe import _from_compliant_dataframe
```



---
## _flatten_and_extract
```python
from dataframe import _flatten_and_extract
```

Process `args` and `kwargs`, extracting underlying objects as we go.

---
## _extract_compliant
```python
from dataframe import _extract_compliant
```



---
## schema
```python
from dataframe import schema
```



---
## collect_schema
```python
from dataframe import collect_schema
```



---
## pipe
```python
from dataframe import pipe
```

Pipe function call.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> data = {"a": [1, 2, 3], "ba": [4, 5, 6]}
    >>> df_pd = pd.DataFrame(data)
    >>> df_pl = pl.LazyFrame(data)

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.pipe(lambda _df: _df.select("a"))

    We can then pass either pandas or Polars:

    >>> func(df_pd)
       a
    0  1
    1  2
    2  3
    >>> func(df_pl).collect()
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 1   │
    │ 2   │
    │ 3   │
    └─────┘

---
## with_row_index
```python
from dataframe import with_row_index
```



---
## drop_nulls
```python
from dataframe import drop_nulls
```



---
## columns
```python
from dataframe import columns
```



---
## with_columns
```python
from dataframe import with_columns
```



---
## select
```python
from dataframe import select
```



---
## rename
```python
from dataframe import rename
```



---
## head
```python
from dataframe import head
```



---
## tail
```python
from dataframe import tail
```



---
## drop
```python
from dataframe import drop
```



---
## unique
```python
from dataframe import unique
```

NOTE:
The param `maintain_order` is only here for compatibility with the polars API
and has no effect on the output.

---
## filter
```python
from dataframe import filter
```



---
## sort
```python
from dataframe import sort
```



---
## join
```python
from dataframe import join
```



---
## clone
```python
from dataframe import clone
```



---
## gather_every
```python
from dataframe import gather_every
```



---
## join_asof
```python
from dataframe import join_asof
```



---
## unpivot
```python
from dataframe import unpivot
```



---
## _series
```python
from dataframe import _series
```



---
## _lazyframe
```python
from dataframe import _lazyframe
```



---
## __init__
```python
from dataframe import __init__
```

Constructor - an instance of this (private) class is returned from
`pa.Table.__dataframe__` or `pa.RecordBatch.__dataframe__`.

---
## __len__
```python
from dataframe import __len__
```



---
## __array__
```python
from dataframe import __array__
```



---
## __repr__
```python
from dataframe import __repr__
```



---
## __arrow_c_stream__
```python
from dataframe import __arrow_c_stream__
```

Export a DataFrame via the Arrow PyCapsule Interface.

- if the underlying dataframe implements the interface, it'll return that
- else, it'll call `to_arrow` and then defer to PyArrow's implementation

See [PyCapsule Interface](https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html)
for more.

---
## lazy
```python
from dataframe import lazy
```



---
## to_native
```python
from dataframe import to_native
```

Convert Narwhals LazyFrame to native one.

Returns:
    Object of class that user started with.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import pyarrow as pa
    >>> import narwhals as nw
    >>> data = {"foo": [1, 2, 3], "bar": [6.0, 7.0, 8.0], "ham": ["a", "b", "c"]}
    >>> df_pd = pd.DataFrame(data)
    >>> df_pl = pl.LazyFrame(data)
    >>> df_pa = pa.table(data)

    Calling `to_native` on a Narwhals DataFrame returns the native object:

    >>> nw.from_native(df_pd).lazy().to_native()
       foo  bar ham
    0    1  6.0   a
    1    2  7.0   b
    2    3  8.0   c
    >>> nw.from_native(df_pl).to_native().collect()
    shape: (3, 3)
    ┌─────┬─────┬─────┐
    │ foo ┆ bar ┆ ham │
    │ --- ┆ --- ┆ --- │
    │ i64 ┆ f64 ┆ str │
    ╞═════╪═════╪═════╡
    │ 1   ┆ 6.0 ┆ a   │
    │ 2   ┆ 7.0 ┆ b   │
    │ 3   ┆ 8.0 ┆ c   │
    └─────┴─────┴─────┘

---
## to_pandas
```python
from dataframe import to_pandas
```



---
## write_csv
```python
from dataframe import write_csv
```



---
## write_parquet
```python
from dataframe import write_parquet
```



---
## to_numpy
```python
from dataframe import to_numpy
```



---
## shape
```python
from dataframe import shape
```



---
## get_column
```python
from dataframe import get_column
```

Return the column at the indicated position.

---
## __getitem__
```python
from dataframe import __getitem__
```



---
## __contains__
```python
from dataframe import __contains__
```



---
## to_dict
```python
from dataframe import to_dict
```



---
## row
```python
from dataframe import row
```



---
## rows
```python
from dataframe import rows
```



---
## iter_rows
```python
from dataframe import iter_rows
```

NOTE:
The param ``buffer_size`` is only here for compatibility with the polars API
and has no effect on the output.

---
## group_by
```python
from dataframe import group_by
```



---
## is_duplicated
```python
from dataframe import is_duplicated
```



---
## is_empty
```python
from dataframe import is_empty
```



---
## is_unique
```python
from dataframe import is_unique
```



---
## null_count
```python
from dataframe import null_count
```



---
## item
```python
from dataframe import item
```



---
## to_arrow
```python
from dataframe import to_arrow
```



---
## sample
```python
from dataframe import sample
```



---
## _dataframe
```python
from dataframe import _dataframe
```



---
## collect
```python
from dataframe import collect
```



---
## __name__
```python
from series import __name__
```

Data structure for 1-dimensional cross-sectional and time series data

---
## Series
```python
from series import Series
```

One-dimensional ndarray with axis labels (including time series).

Labels need not be unique but must be a hashable type. The object
supports both integer- and label-based indexing and provides a host of
methods for performing operations involving the index. Statistical
methods from ndarray have been overridden to automatically exclude
missing data (currently represented as NaN).

Operations between Series (+, -, /, \*, \*\*) align values based on their
associated index values-- they need not be the same length. The result
index will be the sorted union of the two indexes.

Parameters
----------
data : array-like, Iterable, dict, or scalar value
    Contains data stored in Series. If data is a dict, argument order is
    maintained.
index : array-like or Index (1d)
    Values must be hashable and have the same length as `data`.
    Non-unique index values are allowed. Will default to
    RangeIndex (0, 1, 2, ..., n) if not provided. If data is dict-like
    and index is None, then the keys in the data are used as the index. If the
    index is not None, the resulting Series is reindexed with the index values.
dtype : str, numpy.dtype, or ExtensionDtype, optional
    Data type for the output Series. If not specified, this will be
    inferred from `data`.
    See the :ref:`user guide <basics.dtypes>` for more usages.
name : Hashable, default None
    The name to give to the Series.
copy : bool, default False
    Copy input data. Only affects Series or 1d ndarray input. See examples.

Notes
-----
Please reference the :ref:`User Guide <basics.series>` for more information.

Examples
--------
Constructing Series from a dictionary with an Index specified

>>> d = {'a': 1, 'b': 2, 'c': 3}
>>> ser = pd.Series(data=d, index=['a', 'b', 'c'])
>>> ser
a   1
b   2
c   3
dtype: int64

The keys of the dictionary match with the Index values, hence the Index
values have no effect.

>>> d = {'a': 1, 'b': 2, 'c': 3}
>>> ser = pd.Series(data=d, index=['x', 'y', 'z'])
>>> ser
x   NaN
y   NaN
z   NaN
dtype: float64

Note that the Index is first build with the keys from the dictionary.
After this the Series is reindexed with the given Index values, hence we
get all NaN as a result.

Constructing Series from a list with `copy=False`.

>>> r = [1, 2]
>>> ser = pd.Series(r, copy=False)
>>> ser.iloc[0] = 999
>>> r
[1, 2]
>>> ser
0    999
1      2
dtype: int64

Due to input data type the Series has a `copy` of
the original data even though `copy=False`, so
the data is unchanged.

Constructing Series from a 1d ndarray with `copy=False`.

>>> r = np.array([1, 2])
>>> ser = pd.Series(r, copy=False)
>>> ser.iloc[0] = 999
>>> r
array([999,   2])
>>> ser
0    999
1      2
dtype: int64

Due to input data type the Series has a `view` on
the original data, so
the data is changed as well.

---
## SeriesCatNamespace
```python
from series import SeriesCatNamespace
```



---
## SeriesStringNamespace
```python
from series import SeriesStringNamespace
```



---
## SeriesDateTimeNamespace
```python
from series import SeriesDateTimeNamespace
```



---
## _dataframe
```python
from series import _dataframe
```



---
## __init__
```python
from series import __init__
```



---
## __array__
```python
from series import __array__
```

Return the values as a NumPy array.

Users should not call this directly. Rather, it is invoked by
:func:`numpy.array` and :func:`numpy.asarray`.

Parameters
----------
dtype : str or numpy.dtype, optional
    The dtype to use for the resulting NumPy array. By default,
    the dtype is inferred from the data.

copy : bool or None, optional
    Unused.

Returns
-------
numpy.ndarray
    The values in the series converted to a :class:`numpy.ndarray`
    with the specified `dtype`.

See Also
--------
array : Create a new array from data.
Series.array : Zero-copy view to the array backing the Series.
Series.to_numpy : Series method for similar behavior.

Examples
--------
>>> ser = pd.Series([1, 2, 3])
>>> np.asarray(ser)
array([1, 2, 3])

For timezone-aware data, the timezones may be retained with
``dtype='object'``

>>> tzser = pd.Series(pd.date_range('2000', periods=2, tz="CET"))
>>> np.asarray(tzser, dtype="object")
array([Timestamp('2000-01-01 00:00:00+0100', tz='CET'),
       Timestamp('2000-01-02 00:00:00+0100', tz='CET')],
      dtype=object)

Or the values may be localized to UTC and the tzinfo discarded with
``dtype='datetime64[ns]'``

>>> np.asarray(tzser, dtype="datetime64[ns]")  # doctest: +ELLIPSIS
array(['1999-12-31T23:00:00.000000000', ...],
      dtype='datetime64[ns]')

---
## __getitem__
```python
from series import __getitem__
```



---
## __native_namespace__
```python
from series import __native_namespace__
```



---
## __arrow_c_stream__
```python
from series import __arrow_c_stream__
```

Export a Series via the Arrow PyCapsule Interface.

Narwhals doesn't implement anything itself here:

- if the underlying series implements the interface, it'll return that
- else, it'll call `to_arrow` and then defer to PyArrow's implementation

See [PyCapsule Interface](https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html)
for more.

---
## to_native
```python
from series import to_native
```

Convert Narwhals series to native series.

Returns:
    Series of class that user started with.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> s = [1, 2, 3]
    >>> s_pd = pd.Series(s)
    >>> s_pl = pl.Series(s)

    We define a library agnostic function:

    >>> @nw.narwhalify
    ... def func(s):
    ...     return s.to_native()

    We can then pass either pandas or Polars to `func`:

    >>> func(s_pd)
    0    1
    1    2
    2    3
    dtype: int64
    >>> func(s_pl)  # doctest: +NORMALIZE_WHITESPACE
    shape: (3,)
    Series: '' [i64]
    [
        1
        2
        3
    ]

---
## scatter
```python
from series import scatter
```



---
## shape
```python
from series import shape
```



---
## _extract_native
```python
from series import _extract_native
```



---
## _from_compliant_series
```python
from series import _from_compliant_series
```



---
## pipe
```python
from series import pipe
```

Pipe function call.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> s_pd = pd.Series([1, 2, 3, 4])
    >>> s_pl = pl.Series([1, 2, 3, 4])

    Lets define a function to pipe into
    >>> @nw.narwhalify
    ... def func(s):
    ...     return s.pipe(lambda x: x + 2)

    Now apply it to the series

    >>> func(s_pd)
    0    3
    1    4
    2    5
    3    6
    dtype: int64
    >>> func(s_pl)  # doctest: +NORMALIZE_WHITESPACE
    shape: (4,)
    Series: '' [i64]
    [
       3
       4
       5
       6
    ]

---
## __repr__
```python
from series import __repr__
```

Return a string representation for a particular Series.

---
## __len__
```python
from series import __len__
```

Return the length of the Series.

---
## len
```python
from series import len
```



---
## dtype
```python
from series import dtype
```

Return the dtype object of the underlying data.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.dtype
dtype('int64')

---
## name
```python
from series import name
```



---
## cast
```python
from series import cast
```



---
## to_frame
```python
from series import to_frame
```

Convert Series to DataFrame.

Parameters
----------
name : object, optional
    The passed name should substitute for the series name (if it has
    one).

Returns
-------
DataFrame
    DataFrame representation of Series.

Examples
--------
>>> s = pd.Series(["a", "b", "c"],
...               name="vals")
>>> s.to_frame()
  vals
0    a
1    b
2    c

---
## to_list
```python
from series import to_list
```



---
## mean
```python
from series import mean
```



---
## count
```python
from series import count
```

Return number of non-NA/null observations in the Series.

Returns
-------
int
    Number of non-null values in the Series.

See Also
--------
DataFrame.count : Count non-NA cells for each column or row.

Examples
--------
>>> s = pd.Series([0.0, 1.0, np.nan])
>>> s.count()
2

---
## any
```python
from series import any
```



---
## all
```python
from series import all
```



---
## min
```python
from series import min
```



---
## max
```python
from series import max
```



---
## sum
```python
from series import sum
```



---
## std
```python
from series import std
```



---
## clip
```python
from series import clip
```



---
## is_in
```python
from series import is_in
```



---
## arg_true
```python
from series import arg_true
```



---
## drop_nulls
```python
from series import drop_nulls
```



---
## abs
```python
from series import abs
```



---
## cum_sum
```python
from series import cum_sum
```



---
## unique
```python
from series import unique
```

Return unique values of Series object.

Uniques are returned in order of appearance. Hash table-based unique,
therefore does NOT sort.

Returns
-------
ndarray or ExtensionArray
    The unique values returned as a NumPy array. See Notes.

See Also
--------
Series.drop_duplicates : Return Series with duplicate values removed.
unique : Top-level unique method for any 1-d array-like object.
Index.unique : Return Index with unique values from an Index object.

Notes
-----
Returns the unique values as a NumPy array. In case of an
extension-array backed Series, a new
:class:`~api.extensions.ExtensionArray` of that type with just
the unique values is returned. This includes

    * Categorical
    * Period
    * Datetime with Timezone
    * Datetime without Timezone
    * Timedelta
    * Interval
    * Sparse
    * IntegerNA

See Examples section.

Examples
--------
>>> pd.Series([2, 1, 3, 3], name='A').unique()
array([2, 1, 3])

>>> pd.Series([pd.Timestamp('2016-01-01') for _ in range(3)]).unique()
<DatetimeArray>
['2016-01-01 00:00:00']
Length: 1, dtype: datetime64[ns]

>>> pd.Series([pd.Timestamp('2016-01-01', tz='US/Eastern')
...            for _ in range(3)]).unique()
<DatetimeArray>
['2016-01-01 00:00:00-05:00']
Length: 1, dtype: datetime64[ns, US/Eastern]

An Categorical will return categories in the order of
appearance and with the same dtype.

>>> pd.Series(pd.Categorical(list('baabc'))).unique()
['b', 'a', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> pd.Series(pd.Categorical(list('baabc'), categories=list('abc'),
...                          ordered=True)).unique()
['b', 'a', 'c']
Categories (3, object): ['a' < 'b' < 'c']

---
## diff
```python
from series import diff
```

First discrete difference of element.

Calculates the difference of a {klass} element compared with another
element in the {klass} (default is element in previous row).

Parameters
----------
periods : int, default 1
    Periods to shift for calculating difference, accepts negative
    values.
{extra_params}
Returns
-------
{klass}
    First differences of the Series.

See Also
--------
{klass}.pct_change: Percent change over given number of periods.
{klass}.shift: Shift index by desired number of periods with an
    optional time freq.
{other_klass}.diff: First discrete difference of object.

Notes
-----
For boolean dtypes, this uses :meth:`operator.xor` rather than
:meth:`operator.sub`.
The result is calculated according to current dtype in {klass},
however dtype of the result is always float64.

Examples
--------
{examples}

---
## shift
```python
from series import shift
```



---
## sample
```python
from series import sample
```



---
## alias
```python
from series import alias
```



---
## rename
```python
from series import rename
```

Alter Series index labels or name.

Function / dict values must be unique (1-to-1). Labels not contained in
a dict / Series will be left as-is. Extra labels listed don't throw an
error.

Alternatively, change ``Series.name`` with a scalar value.

See the :ref:`user guide <basics.rename>` for more.

Parameters
----------
index : scalar, hashable sequence, dict-like or function optional
    Functions or dict-like are transformations to apply to
    the index.
    Scalar or hashable sequence-like will alter the ``Series.name``
    attribute.
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
copy : bool, default True
    Also copy underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
inplace : bool, default False
    Whether to return a new Series. If True the value of copy is ignored.
level : int or level name, default None
    In case of MultiIndex, only rename labels in the specified level.
errors : {'ignore', 'raise'}, default 'ignore'
    If 'raise', raise `KeyError` when a `dict-like mapper` or
    `index` contains labels that are not present in the index being transformed.
    If 'ignore', existing keys will be renamed and extra keys will be ignored.

Returns
-------
Series or None
    Series with index labels or name altered or None if ``inplace=True``.

See Also
--------
DataFrame.rename : Corresponding DataFrame method.
Series.rename_axis : Set the name of the axis.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s
0    1
1    2
2    3
dtype: int64
>>> s.rename("my_name")  # scalar, changes Series.name
0    1
1    2
2    3
Name: my_name, dtype: int64
>>> s.rename(lambda x: x ** 2)  # function, changes labels
0    1
1    2
4    3
dtype: int64
>>> s.rename({1: 3, 2: 5})  # mapping, changes labels
0    1
3    2
5    3
dtype: int64

---
## sort
```python
from series import sort
```



---
## is_null
```python
from series import is_null
```



---
## fill_null
```python
from series import fill_null
```



---
## is_between
```python
from series import is_between
```



---
## n_unique
```python
from series import n_unique
```



---
## to_numpy
```python
from series import to_numpy
```



---
## to_pandas
```python
from series import to_pandas
```



---
## __add__
```python
from series import __add__
```



---
## __radd__
```python
from series import __radd__
```



---
## __sub__
```python
from series import __sub__
```



---
## __rsub__
```python
from series import __rsub__
```



---
## __mul__
```python
from series import __mul__
```



---
## __rmul__
```python
from series import __rmul__
```



---
## __truediv__
```python
from series import __truediv__
```



---
## __rtruediv__
```python
from series import __rtruediv__
```



---
## __floordiv__
```python
from series import __floordiv__
```



---
## __rfloordiv__
```python
from series import __rfloordiv__
```



---
## __pow__
```python
from series import __pow__
```



---
## __rpow__
```python
from series import __rpow__
```



---
## __mod__
```python
from series import __mod__
```



---
## __rmod__
```python
from series import __rmod__
```



---
## __eq__
```python
from series import __eq__
```



---
## __ne__
```python
from series import __ne__
```



---
## __gt__
```python
from series import __gt__
```



---
## __ge__
```python
from series import __ge__
```



---
## __lt__
```python
from series import __lt__
```



---
## __le__
```python
from series import __le__
```



---
## __and__
```python
from series import __and__
```



---
## __or__
```python
from series import __or__
```



---
## __invert__
```python
from series import __invert__
```



---
## filter
```python
from series import filter
```



---
## is_duplicated
```python
from series import is_duplicated
```



---
## is_empty
```python
from series import is_empty
```



---
## is_unique
```python
from series import is_unique
```



---
## null_count
```python
from series import null_count
```



---
## is_first_distinct
```python
from series import is_first_distinct
```



---
## is_last_distinct
```python
from series import is_last_distinct
```



---
## is_sorted
```python
from series import is_sorted
```



---
## value_counts
```python
from series import value_counts
```

Parallel is unused, exists for compatibility

---
## quantile
```python
from series import quantile
```

Return value at the given quantile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    The quantile(s) to compute, which can lie in range: 0 <= q <= 1.
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    This optional parameter specifies the interpolation method to use,
    when the desired quantile lies between two data points `i` and `j`:

        * linear: `i + (j - i) * (x-i)/(j-i)`, where `(x-i)/(j-i)` is
          the fractional part of the index surrounded by `i > j`.
        * lower: `i`.
        * higher: `j`.
        * nearest: `i` or `j` whichever is nearest.
        * midpoint: (`i` + `j`) / 2.

Returns
-------
float or Series
    If ``q`` is an array, a Series will be returned where the
    index is ``q`` and the values are the quantiles, otherwise
    a float will be returned.

See Also
--------
core.window.Rolling.quantile : Calculate the rolling quantile.
numpy.percentile : Returns the q-th percentile(s) of the array elements.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s.quantile(.5)
2.5
>>> s.quantile([.25, .5, .75])
0.25    1.75
0.50    2.50
0.75    3.25
dtype: float64

---
## zip_with
```python
from series import zip_with
```



---
## item
```python
from series import item
```



---
## head
```python
from series import head
```



---
## tail
```python
from series import tail
```



---
## round
```python
from series import round
```

Round each value in a Series to the given number of decimals.

Parameters
----------
decimals : int, default 0
    Number of decimal places to round to. If decimals is negative,
    it specifies the number of positions to the left of the decimal point.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Series
    Rounded values of the Series.

See Also
--------
numpy.around : Round values of an np.array.
DataFrame.round : Round values of a DataFrame.

Examples
--------
>>> s = pd.Series([0.1, 1.3, 2.7])
>>> s.round()
0    0.0
1    1.0
2    3.0
dtype: float64

---
## to_dummies
```python
from series import to_dummies
```



---
## gather_every
```python
from series import gather_every
```



---
## to_arrow
```python
from series import to_arrow
```



---
## mode
```python
from series import mode
```

Return the mode(s) of the Series.

The mode is the value that appears most often. There can be multiple modes.

Always returns Series even if only one value is returned.

Parameters
----------
dropna : bool, default True
    Don't consider counts of NaN/NaT.

Returns
-------
Series
    Modes of the Series in sorted order.

Examples
--------
>>> s = pd.Series([2, 4, 2, 2, 4, None])
>>> s.mode()
0    2.0
dtype: float64

More than one mode:

>>> s = pd.Series([2, 4, 8, 2, 4, None])
>>> s.mode()
0    2.0
1    4.0
dtype: float64

With and without considering null value:

>>> s = pd.Series([2, 4, None, None, 4, None])
>>> s.mode(dropna=False)
0   NaN
dtype: float64
>>> s = pd.Series([2, 4, None, None, 4, None])
>>> s.mode()
0    4.0
dtype: float64

---
## __iter__
```python
from series import __iter__
```



---
## str
```python
from series import str
```



---
## dt
```python
from series import dt
```



---
## cat
```python
from series import cat
```



---
## get_categories
```python
from series import get_categories
```



---
## len_chars
```python
from series import len_chars
```



---
## replace
```python
from series import replace
```



---
## replace_all
```python
from series import replace_all
```



---
## strip_chars
```python
from series import strip_chars
```



---
## starts_with
```python
from series import starts_with
```



---
## ends_with
```python
from series import ends_with
```



---
## contains
```python
from series import contains
```



---
## slice
```python
from series import slice
```



---
## to_uppercase
```python
from series import to_uppercase
```



---
## to_lowercase
```python
from series import to_lowercase
```



---
## to_datetime
```python
from series import to_datetime
```



---
## date
```python
from series import date
```



---
## year
```python
from series import year
```



---
## month
```python
from series import month
```



---
## day
```python
from series import day
```



---
## hour
```python
from series import hour
```



---
## minute
```python
from series import minute
```



---
## second
```python
from series import second
```



---
## millisecond
```python
from series import millisecond
```



---
## microsecond
```python
from series import microsecond
```



---
## nanosecond
```python
from series import nanosecond
```



---
## ordinal_day
```python
from series import ordinal_day
```



---
## total_minutes
```python
from series import total_minutes
```



---
## total_seconds
```python
from series import total_seconds
```



---
## total_milliseconds
```python
from series import total_milliseconds
```



---
## total_microseconds
```python
from series import total_microseconds
```



---
## total_nanoseconds
```python
from series import total_nanoseconds
```



---
## to_string
```python
from series import to_string
```

Render a string representation of the Series.

Parameters
----------
buf : StringIO-like, optional
    Buffer to write to.
na_rep : str, optional
    String representation of NaN to use, default 'NaN'.
float_format : one-parameter function, optional
    Formatter function to apply to columns' elements if they are
    floats, default None.
header : bool, default True
    Add the Series header (index name).
index : bool, optional
    Add index (row) labels, default True.
length : bool, default False
    Add the Series length.
dtype : bool, default False
    Add the Series dtype.
name : bool, default False
    Add the Series name if not None.
max_rows : int, optional
    Maximum number of rows to show before truncating. If None, show
    all.
min_rows : int, optional
    The number of rows to display in a truncated repr (when number
    of rows is above `max_rows`).

Returns
-------
str or None
    String representation of Series if ``buf=None``, otherwise None.

Examples
--------
>>> ser = pd.Series([1, 2, 3]).to_string()
>>> ser
'0    1\n1    2\n2    3'

---
## __name__
```python
from group_by import __name__
```



---
## GroupBy
```python
from group_by import GroupBy
```



---
## LazyGroupBy
```python
from group_by import LazyGroupBy
```



---
## __init__
```python
from group_by import __init__
```



---
## agg
```python
from group_by import agg
```



---
## __iter__
```python
from group_by import __iter__
```



---
## __name__
```python
from selectors import __name__
```



---
## Selector
```python
from selectors import Selector
```



---
## by_dtype
```python
from selectors import by_dtype
```



---
## numeric
```python
from selectors import numeric
```



---
## boolean
```python
from selectors import boolean
```



---
## string
```python
from selectors import string
```



---
## categorical
```python
from selectors import categorical
```



---
## all
```python
from selectors import all
```



---
## DType
```python
from dtypes import DType
```



---
## NumericType
```python
from dtypes import NumericType
```



---
## TemporalType
```python
from dtypes import TemporalType
```



---
## Int64
```python
from dtypes import Int64
```



---
## Int32
```python
from dtypes import Int32
```



---
## Int16
```python
from dtypes import Int16
```



---
## Int8
```python
from dtypes import Int8
```



---
## UInt64
```python
from dtypes import UInt64
```



---
## UInt32
```python
from dtypes import UInt32
```



---
## UInt16
```python
from dtypes import UInt16
```



---
## UInt8
```python
from dtypes import UInt8
```



---
## Float64
```python
from dtypes import Float64
```



---
## Float32
```python
from dtypes import Float32
```



---
## String
```python
from dtypes import String
```



---
## Boolean
```python
from dtypes import Boolean
```



---
## Object
```python
from dtypes import Object
```



---
## Unknown
```python
from dtypes import Unknown
```



---
## Datetime
```python
from dtypes import Datetime
```

Data type representing a calendar date and time of day.

Arguments:
    time_unit: Unit of time. Defaults to `'us'` (microseconds).
    time_zone: Time zone string, as defined in zoneinfo (to see valid strings run
        `import zoneinfo; zoneinfo.available_timezones()` for a full list).

Notes:
    Adapted from Polars implementation at:
    https://github.com/pola-rs/polars/blob/py-1.7.1/py-polars/polars/datatypes/classes.py#L398-L457

---
## Duration
```python
from dtypes import Duration
```

Data type representing a time duration.

Arguments:
    time_unit: Unit of time. Defaults to `'us'` (microseconds).

Notes:
    Adapted from Polars implementation at:
    https://github.com/pola-rs/polars/blob/py-1.7.1/py-polars/polars/datatypes/classes.py#L460-L502

---
## Categorical
```python
from dtypes import Categorical
```



---
## Enum
```python
from dtypes import Enum
```



---
## Struct
```python
from dtypes import Struct
```



---
## List
```python
from dtypes import List
```



---
## Array
```python
from dtypes import Array
```



---
## Date
```python
from dtypes import Date
```



---
## __repr__
```python
from dtypes import __repr__
```



---
## is_numeric
```python
from dtypes import is_numeric
```



---
## __eq__
```python
from dtypes import __eq__
```



---
## __hash__
```python
from dtypes import __hash__
```



---
## __init__
```python
from dtypes import __init__
```



---
## Implementation
```python
from utils import Implementation
```



---
## remove_prefix
```python
from utils import remove_prefix
```



---
## remove_suffix
```python
from utils import remove_suffix
```



---
## flatten
```python
from utils import flatten
```

Flatten a data point from a space.

This is useful when e.g. points from spaces must be passed to a neural
network, which only understands flat arrays of floats.

Args:
    space: The space that ``x`` is flattened by
    x: The value to flatten

Returns:
    The flattened datapoint

        - For :class:`gymnasium.spaces.Box` and :class:`gymnasium.spaces.MultiBinary`, this is a flattened array
        - For :class:`gymnasium.spaces.Discrete` and :class:`gymnasium.spaces.MultiDiscrete`, this is a flattened one-hot array of the sample
        - For :class:`gymnasium.spaces.Tuple` and :class:`gymnasium.spaces.Dict`, this is a concatenated array the subspaces (does not support graph subspaces)
        - For graph spaces, returns :class:`GraphInstance` where:
            - :attr:`GraphInstance.nodes` are n x k arrays
            - :attr:`GraphInstance.edges` are either:
                - m x k arrays
                - None
            - :attr:`GraphInstance.edge_links` are either:
                - m x 2 arrays
                - None

Raises:
    NotImplementedError: If the space is not defined in :mod:`gymnasium.spaces`.

Example:
    >>> from gymnasium.spaces import Box, Discrete, Tuple
    >>> space = Box(0, 1, shape=(3, 5))
    >>> flatten(space, space.sample()).shape
    (15,)
    >>> space = Discrete(4)
    >>> flatten(space, 2)
    array([0, 0, 1, 0])
    >>> space = Tuple((Box(0, 1, shape=(2,)), Box(0, 1, shape=(3,)), Discrete(3)))
    >>> example = ((.5, .25), (1., 0., .2), 1)
    >>> flatten(space, example)
    array([0.5 , 0.25, 1.  , 0.  , 0.2 , 0.  , 1.  , 0.  ])

---
## tupleify
```python
from utils import tupleify
```



---
## _is_iterable
```python
from utils import _is_iterable
```



---
## parse_version
```python
from utils import parse_version
```

Simple version parser; split into a tuple of ints for comparison.

---
## isinstance_or_issubclass
```python
from utils import isinstance_or_issubclass
```



---
## validate_laziness
```python
from utils import validate_laziness
```



---
## maybe_align_index
```python
from utils import maybe_align_index
```

Align `lhs` to the Index of `rhs`, if they're both pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this only checks that `lhs` and `rhs`
    are the same length.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2]}, index=[3, 4])
    >>> s_pd = pd.Series([6, 7], index=[4, 3])
    >>> df = nw.from_native(df_pd)
    >>> s = nw.from_native(s_pd, series_only=True)
    >>> nw.to_native(nw.maybe_align_index(df, s))
       a
    4  2
    3  1

---
## maybe_get_index
```python
from utils import maybe_get_index
```

Get the index of a DataFrame or a Series, if it's pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this returns `None`.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]})
    >>> df = nw.from_native(df_pd)
    >>> nw.maybe_get_index(df)
    RangeIndex(start=0, stop=2, step=1)
    >>> series_pd = pd.Series([1, 2])
    >>> series = nw.from_native(series_pd, series_only=True)
    >>> nw.maybe_get_index(series)
    RangeIndex(start=0, stop=2, step=1)

---
## maybe_set_index
```python
from utils import maybe_set_index
```

Set columns `columns` to be the index of `df`, if `df` is pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this is a no-op.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]})
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_set_index(df, "b"))  # doctest: +NORMALIZE_WHITESPACE
       a
    b
    4  1
    5  2

---
## maybe_reset_index
```python
from utils import maybe_reset_index
```

Reset the index to the default integer index of a DataFrame or a Series, if it's pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already resets the index for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this is a no-op.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]}, index=([6, 7]))
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_reset_index(df))
       a  b
    0  1  4
    1  2  5
    >>> series_pd = pd.Series([1, 2])
    >>> series = nw.from_native(series_pd, series_only=True)
    >>> nw.maybe_get_index(series)
    RangeIndex(start=0, stop=2, step=1)

---
## maybe_convert_dtypes
```python
from utils import maybe_convert_dtypes
```

Convert columns or series to the best possible dtypes using dtypes supporting ``pd.NA``, if df is pandas-like.

Arguments:
    obj: DataFrame or Series.
    *args: Additional arguments which gets passed through.
    **kwargs: Additional arguments which gets passed through.

Notes:
    For non-pandas-like inputs, this is a no-op.
    Also, `args` and `kwargs` just get passed down to the underlying library as-is.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> import numpy as np
    >>> df_pd = pd.DataFrame(
    ...     {
    ...         "a": pd.Series([1, 2, 3], dtype=np.dtype("int32")),
    ...         "b": pd.Series([True, False, np.nan], dtype=np.dtype("O")),
    ...     }
    ... )
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_convert_dtypes(df)).dtypes  # doctest: +NORMALIZE_WHITESPACE
    a             Int32
    b           boolean
    dtype: object

---
## is_ordered_categorical
```python
from utils import is_ordered_categorical
```

Return whether indices of categories are semantically meaningful.

This is a convenience function to accessing what would otherwise be
the `is_ordered` property from the DataFrame Interchange Protocol,
see https://data-apis.org/dataframe-protocol/latest/API.html.

- For Polars:
  - Enums are always ordered.
  - Categoricals are ordered if `dtype.ordering == "physical"`.
- For pandas-like APIs:
  - Categoricals are ordered if `dtype.cat.ordered == True`.
- For PyArrow table:
  - Categoricals are ordered if `dtype.type.ordered == True`.

Examples:
    >>> import narwhals as nw
    >>> import pandas as pd
    >>> import polars as pl
    >>> data = ["x", "y"]
    >>> s_pd = pd.Series(data, dtype=pd.CategoricalDtype(ordered=True))
    >>> s_pl = pl.Series(data, dtype=pl.Categorical(ordering="physical"))

    Let's define a library-agnostic function:

    >>> @nw.narwhalify
    ... def func(s):
    ...     return nw.is_ordered_categorical(s)

    Then, we can pass any supported library to `func`:

    >>> func(s_pd)
    True
    >>> func(s_pl)
    True

---
## generate_unique_token
```python
from utils import generate_unique_token
```

Generates a unique token of specified n_bytes that is not present in the given list of columns.

Arguments:
    n_bytes : The number of bytes to generate for the token.
    columns : The list of columns to check for uniqueness.

Returns:
    A unique token that is not present in the given list of columns.

Raises:
    AssertionError: If a unique token cannot be generated after 100 attempts.

---
## parse_columns_to_drop
```python
from utils import parse_columns_to_drop
```



---
## is_sequence_but_not_str
```python
from utils import is_sequence_but_not_str
```



---
## from_native_namespace
```python
from utils import from_native_namespace
```

Instantiate Implementation object from a native namespace module.

---
## to_native_namespace
```python
from utils import to_native_namespace
```

Return the native namespace module corresponding to Implementation.

---
## _validate_index
```python
from utils import _validate_index
```



---
## DTypes
```python
from typing import DTypes
```



---
## NativeFrame
```python
from typing import NativeFrame
```



---
## DataFrameLike
```python
from typing import DataFrameLike
```



---
## columns
```python
from typing import columns
```



---
## join
```python
from typing import join
```



---
## __dataframe__
```python
from typing import __dataframe__
```



---
## ColumnNotFoundError
```python
from _exceptions import ColumnNotFoundError
```



---
## __name__
```python
from _expression_parsing import __name__
```



---
## evaluate_into_expr
```python
from _expression_parsing import evaluate_into_expr
```

Return list of raw columns.

---
## evaluate_into_exprs
```python
from _expression_parsing import evaluate_into_exprs
```

Evaluate each expr into Series.

---
## maybe_evaluate_expr
```python
from _expression_parsing import maybe_evaluate_expr
```

Evaluate `expr` if it's an expression, otherwise return it as is.

---
## parse_into_exprs
```python
from _expression_parsing import parse_into_exprs
```

Parse each input as an expression (if it's not already one). See `parse_into_expr` for
more details.

---
## parse_into_expr
```python
from _expression_parsing import parse_into_expr
```

Parse `into_expr` as an expression.

For example, in Polars, we can do both `df.select('a')` and `df.select(pl.col('a'))`.
We do the same in Narwhals:

- if `into_expr` is already an expression, just return it
- if it's a Series, then convert it to an expression
- if it's a numpy array, then convert it to a Series and then to an expression
- if it's a string, then convert it to an expression
- else, raise

---
## reuse_series_implementation
```python
from _expression_parsing import reuse_series_implementation
```

Reuse Series implementation for expression.

If Series.foo is already defined, and we'd like Expr.foo to be the same, we can
leverage this method to do that for us.

Arguments
    expr: expression object.
    attr: name of method.
    returns_scalar: whether the Series version returns a scalar. In this case,
        the expression version should return a 1-row Series.
    args, kwargs: arguments and keyword arguments to pass to function.

---
## reuse_series_namespace_implementation
```python
from _expression_parsing import reuse_series_namespace_implementation
```

Just like `reuse_series_implementation`, but for e.g. `Expr.dt.foo` instead
of `Expr.foo`.

---
## is_simple_aggregation
```python
from _expression_parsing import is_simple_aggregation
```

Check if expr is a very simple one, such as:

- nw.col('a').mean()  # depth 1
- nw.mean('a')  # depth 1
- nw.len()  # depth 0

as opposed to, say

- nw.col('a').filter(nw.col('b')>nw.col('c')).max()

because then, we can use a fastpath in pandas.

---
## combine_root_names
```python
from _expression_parsing import combine_root_names
```



---
## reduce_output_names
```python
from _expression_parsing import reduce_output_names
```

Returns the left-most output name

---
## func
```python
from _expression_parsing import func
```



---
## __name__
```python
from dependencies import __name__
```

The dependencies collector components for sphinx.environment.

---
## get_polars
```python
from dependencies import get_polars
```

Get Polars module (if already imported - else return None).

---
## get_pandas
```python
from dependencies import get_pandas
```

Get pandas module (if already imported - else return None).

---
## get_modin
```python
from dependencies import get_modin
```

Get modin.pandas module (if already imported - else return None).

---
## get_cudf
```python
from dependencies import get_cudf
```

Get cudf module (if already imported - else return None).

---
## get_pyarrow
```python
from dependencies import get_pyarrow
```

Get pyarrow module (if already imported - else return None).

---
## get_numpy
```python
from dependencies import get_numpy
```

Get numpy module (if already imported - else return None).

---
## get_dask
```python
from dependencies import get_dask
```

Get dask (if already imported - else return None).

---
## get_dask_dataframe
```python
from dependencies import get_dask_dataframe
```

Get dask.dataframe module (if already imported - else return None).

---
## get_duckdb
```python
from dependencies import get_duckdb
```

Get duckdb module (if already imported - else return None).

---
## get_dask_expr
```python
from dependencies import get_dask_expr
```

Get dask_expr module (if already imported - else return None).

---
## get_ibis
```python
from dependencies import get_ibis
```

Get ibis module (if already imported - else return None).

---
## is_pandas_dataframe
```python
from dependencies import is_pandas_dataframe
```

Check whether `df` is a pandas DataFrame without importing pandas.

---
## is_pandas_series
```python
from dependencies import is_pandas_series
```

Check whether `ser` is a pandas Series without importing pandas.

---
## is_modin_dataframe
```python
from dependencies import is_modin_dataframe
```

Check whether `df` is a modin DataFrame without importing modin.

---
## is_modin_series
```python
from dependencies import is_modin_series
```

Check whether `ser` is a modin Series without importing modin.

---
## is_cudf_dataframe
```python
from dependencies import is_cudf_dataframe
```

Check whether `df` is a cudf DataFrame without importing cudf.

---
## is_cudf_series
```python
from dependencies import is_cudf_series
```

Check whether `ser` is a cudf Series without importing cudf.

---
## is_dask_dataframe
```python
from dependencies import is_dask_dataframe
```

Check whether `df` is a Dask DataFrame without importing Dask.

---
## is_duckdb_relation
```python
from dependencies import is_duckdb_relation
```

Check whether `df` is a DuckDB Relation without importing DuckDB.

---
## is_ibis_table
```python
from dependencies import is_ibis_table
```

Check whether `df` is a Ibis Table without importing Ibis.

---
## is_polars_dataframe
```python
from dependencies import is_polars_dataframe
```

Check whether `df` is a Polars DataFrame without importing Polars.

---
## is_polars_lazyframe
```python
from dependencies import is_polars_lazyframe
```

Check whether `df` is a Polars LazyFrame without importing Polars.

---
## is_polars_series
```python
from dependencies import is_polars_series
```

Check whether `ser` is a Polars Series without importing Polars.

---
## is_pyarrow_chunked_array
```python
from dependencies import is_pyarrow_chunked_array
```

Check whether `ser` is a PyArrow ChunkedArray without importing PyArrow.

---
## is_pyarrow_table
```python
from dependencies import is_pyarrow_table
```

Check whether `df` is a PyArrow Table without importing PyArrow.

---
## is_numpy_array
```python
from dependencies import is_numpy_array
```

Check whether `arr` is a NumPy Array without importing NumPy.

---
## is_pandas_like_dataframe
```python
from dependencies import is_pandas_like_dataframe
```

Check whether `df` is a pandas-like DataFrame without doing any imports

By "pandas-like", we mean: pandas, Modin, cuDF.

---
## is_pandas_like_series
```python
from dependencies import is_pandas_like_series
```

Check whether `arr` is a pandas-like Series without doing any imports

By "pandas-like", we mean: pandas, Modin, cuDF.

---
## __name__
```python
from schema import __name__
```



---
## Schema
```python
from schema import Schema
```

Ordered mapping of column names to their data type.

Arguments:
    schema: Mapping[str, DType] | Iterable[tuple[str, DType]] | None
        The schema definition given by column names and their associated.
        *instantiated* Narwhals data type. Accepts a mapping or an iterable of tuples.

Examples:
    Define a schema by passing *instantiated* data types.

    >>> import narwhals as nw
    >>> schema = nw.Schema({"foo": nw.Int8(), "bar": nw.String()})
    >>> schema  # doctest:+SKIP
    Schema({'foo': Int8, 'bar': String})

    Access the data type associated with a specific column name.

    >>> schema["foo"]
    Int8

    Access various schema properties using the `names`, `dtypes`, and `len` methods.

    >>> schema.names()
    ['foo', 'bar']
    >>> schema.dtypes()
    [Int8, String]
    >>> schema.len()
    2

---
## __init__
```python
from schema import __init__
```



---
## names
```python
from schema import names
```

Get the column names of the schema.

---
## dtypes
```python
from schema import dtypes
```

Get the data types of the schema.

---
## len
```python
from schema import len
```

Get the number of columns in the schema.

---
## __name__
```python
from expr import __name__
```

:func:`~pandas.eval` parsers.

---
## extract_compliant
```python
from expr import extract_compliant
```



---
## Expr
```python
from expr import Expr
```

Object encapsulating an expression.

Parameters
----------
expr : str
engine : str, optional, default 'numexpr'
parser : str, optional, default 'pandas'
env : Scope, optional, default None
level : int, optional, default 2

---
## ExprCatNamespace
```python
from expr import ExprCatNamespace
```



---
## ExprStringNamespace
```python
from expr import ExprStringNamespace
```



---
## ExprDateTimeNamespace
```python
from expr import ExprDateTimeNamespace
```



---
## ExprNameNamespace
```python
from expr import ExprNameNamespace
```



---
## col
```python
from expr import col
```

Creates an expression that references one or more columns by their name(s).

Arguments:
    names: Name(s) of the columns to use in the aggregation function.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [3, 4]})
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [3, 4]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.col("a") * nw.col("b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a
    0  3
    1  8
    >>> func(df_pl)
    shape: (2, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 3   │
    │ 8   │
    └─────┘

---
## nth
```python
from expr import nth
```

Creates an expression that references one or more columns by their index(es).

Notes:
    `nth` is not supported for Polars version<1.0.0. Please use [`col`](/api-reference/narwhals/#narwhals.col) instead.

Arguments:
    indices: One or more indices representing the columns to retrieve.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import pyarrow as pa
    >>> import narwhals as nw
    >>> data = {"a": [1, 2], "b": [3, 4]}
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)
    >>> df_pa = pa.table(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.nth(0) * 2)

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a
    0  2
    1  4
    >>> func(df_pl)  # doctest: +SKIP
    shape: (2, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 2   │
    │ 4   │
    └─────┘
    >>> func(df_pa)
    pyarrow.Table
    a: int64
    ----
    a: [[2,4]]

---
## all_
```python
from expr import all_
```

Instantiate an expression representing all columns.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
    >>> df_pl = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.all() * 2)

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       a   b
    0  2   8
    1  4  10
    2  6  12
    >>> func(df_pl)
    shape: (3, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 2   ┆ 8   │
    │ 4   ┆ 10  │
    │ 6   ┆ 12  │
    └─────┴─────┘

---
## len_
```python
from expr import len_
```

Return the number of rows.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [5, 10]})
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [5, 10]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.len())

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       len
    0    2
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ len │
    │ --- │
    │ u32 │
    ╞═════╡
    │ 2   │
    └─────┘

---
## sum
```python
from expr import sum
```



---
## mean
```python
from expr import mean
```



---
## min
```python
from expr import min
```



---
## max
```python
from expr import max
```



---
## sum_horizontal
```python
from expr import sum_horizontal
```

Sum all values horizontally across columns.

Warning:
    Unlike Polars, we support horizontal sum over numeric columns only.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts
        expression input.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {"a": [1, 2, 3], "b": [5, 10, None]}
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.sum_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
          a
    0   6.0
    1  12.0
    2   3.0
    >>> func(df_pl)
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 6   │
    │ 12  │
    │ 3   │
    └─────┘

---
## When
```python
from expr import When
```



---
## Then
```python
from expr import Then
```



---
## when
```python
from expr import when
```

Start a `when-then-otherwise` expression.

Expression similar to an `if-else` statement in Python. Always initiated by a `pl.when(<condition>).then(<value if condition>)`., and optionally followed by chaining one or more `.when(<condition>).then(<value>)` statements.
Chained when-then operations should be read as Python `if, elif, ... elif` blocks, not as `if, if, ... if`, i.e. the first condition that evaluates to `True` will be picked.
If none of the conditions are `True`, an optional `.otherwise(<value if all statements are false>)` can be appended at the end. If not appended, and none of the conditions are `True`, `None` will be returned.

Arguments:
    predicates: Condition(s) that must be met in order to apply the subsequent statement. Accepts one or more boolean expressions, which are implicitly combined with `&`. String input is parsed as a column name.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2, 3], "b": [5, 10, 15]})
    >>> df_pd = pd.DataFrame({"a": [1, 2, 3], "b": [5, 10, 15]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df_any):
    ...     return df_any.with_columns(
    ...         nw.when(nw.col("a") < 3).then(5).otherwise(6).alias("a_when")
    ...     )

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a   b  a_when
    0  1   5       5
    1  2  10       5
    2  3  15       6
    >>> func(df_pl)
    shape: (3, 3)
    ┌─────┬─────┬────────┐
    │ a   ┆ b   ┆ a_when │
    │ --- ┆ --- ┆ ---    │
    │ i64 ┆ i64 ┆ i32    │
    ╞═════╪═════╪════════╡
    │ 1   ┆ 5   ┆ 5      │
    │ 2   ┆ 10  ┆ 5      │
    │ 3   ┆ 15  ┆ 6      │
    └─────┴─────┴────────┘

---
## all_horizontal
```python
from expr import all_horizontal
```

Compute the bitwise AND horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts expression input.

Notes:
    pandas and Polars handle null values differently.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {
    ...     "a": [False, False, True, True, False, None],
    ...     "b": [False, True, True, None, None, None],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select("a", "b", all=nw.all_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
           a      b    all
    0  False  False  False
    1  False   True  False
    2   True   True   True
    3   True   None  False
    4  False   None  False
    5   None   None  False

    >>> func(df_pl)
    shape: (6, 3)
    ┌───────┬───────┬───────┐
    │ a     ┆ b     ┆ all   │
    │ ---   ┆ ---   ┆ ---   │
    │ bool  ┆ bool  ┆ bool  │
    ╞═══════╪═══════╪═══════╡
    │ false ┆ false ┆ false │
    │ false ┆ true  ┆ false │
    │ true  ┆ true  ┆ true  │
    │ true  ┆ null  ┆ null  │
    │ false ┆ null  ┆ false │
    │ null  ┆ null  ┆ null  │
    └───────┴───────┴───────┘

---
## lit
```python
from expr import lit
```

Return an expression representing a literal value.

Arguments:
    value: The value to use as literal.
    dtype: The data type of the literal value. If not provided, the data type will be inferred.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2]})
    >>> df_pd = pd.DataFrame({"a": [1, 2]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.with_columns(nw.lit(3).alias("b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a  b
    0  1  3
    1  2  3
    >>> func(df_pl)
    shape: (2, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i32 │
    ╞═════╪═════╡
    │ 1   ┆ 3   │
    │ 2   ┆ 3   │
    └─────┴─────┘

---
## any_horizontal
```python
from expr import any_horizontal
```

Compute the bitwise OR horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts expression input.

Notes:
    pandas and Polars handle null values differently.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {
    ...     "a": [False, False, True, True, False, None],
    ...     "b": [False, True, True, None, None, None],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select("a", "b", any=nw.any_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
           a      b    any
    0  False  False  False
    1  False   True   True
    2   True   True   True
    3   True   None   True
    4  False   None  False
    5   None   None  False

    >>> func(df_pl)
    shape: (6, 3)
    ┌───────┬───────┬───────┐
    │ a     ┆ b     ┆ any   │
    │ ---   ┆ ---   ┆ ---   │
    │ bool  ┆ bool  ┆ bool  │
    ╞═══════╪═══════╪═══════╡
    │ false ┆ false ┆ false │
    │ false ┆ true  ┆ true  │
    │ true  ┆ true  ┆ true  │
    │ true  ┆ null  ┆ true  │
    │ false ┆ null  ┆ null  │
    │ null  ┆ null  ┆ null  │
    └───────┴───────┴───────┘

---
## mean_horizontal
```python
from expr import mean_horizontal
```

Compute the mean of all values horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts
        expression input.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals as nw
    >>> data = {
    ...     "a": [1, 8, 3],
    ...     "b": [4, 5, None],
    ...     "c": ["x", "y", "z"],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function that computes the horizontal mean of "a"
    and "b" columns:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.mean_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
         a
    0  2.5
    1  6.5
    2  3.0
    >>> func(df_pl)
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ f64 │
    ╞═════╡
    │ 2.5 │
    │ 6.5 │
    │ 3.0 │
    └─────┘

---
## __init__
```python
from expr import __init__
```



---
## _taxicab_norm
```python
from expr import _taxicab_norm
```



---
## alias
```python
from expr import alias
```



---
## pipe
```python
from expr import pipe
```

Pipe function call.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals as nw
    >>> data = {"a": [1, 2, 3, 4]}
    >>> df_pd = pd.DataFrame(data)
    >>> df_pl = pl.DataFrame(data)

    Lets define a library-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.col("a").pipe(lambda x: x + 1))

    We can then pass any supported library:

    >>> func(df_pd)
       a
    0  2
    1  3
    2  4
    3  5
    >>> func(df_pl)
    shape: (4, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 2   │
    │ 3   │
    │ 4   │
    │ 5   │
    └─────┘

---
## cast
```python
from expr import cast
```



---
## __eq__
```python
from expr import __eq__
```



---
## __ne__
```python
from expr import __ne__
```



---
## __and__
```python
from expr import __and__
```



---
## __rand__
```python
from expr import __rand__
```



---
## __or__
```python
from expr import __or__
```



---
## __ror__
```python
from expr import __ror__
```



---
## __add__
```python
from expr import __add__
```



---
## __radd__
```python
from expr import __radd__
```



---
## __sub__
```python
from expr import __sub__
```



---
## __rsub__
```python
from expr import __rsub__
```



---
## __truediv__
```python
from expr import __truediv__
```



---
## __rtruediv__
```python
from expr import __rtruediv__
```



---
## __mul__
```python
from expr import __mul__
```



---
## __rmul__
```python
from expr import __rmul__
```



---
## __le__
```python
from expr import __le__
```



---
## __lt__
```python
from expr import __lt__
```



---
## __gt__
```python
from expr import __gt__
```



---
## __ge__
```python
from expr import __ge__
```



---
## __pow__
```python
from expr import __pow__
```



---
## __rpow__
```python
from expr import __rpow__
```



---
## __floordiv__
```python
from expr import __floordiv__
```



---
## __rfloordiv__
```python
from expr import __rfloordiv__
```



---
## __mod__
```python
from expr import __mod__
```



---
## __rmod__
```python
from expr import __rmod__
```



---
## __invert__
```python
from expr import __invert__
```



---
## any
```python
from expr import any
```



---
## all
```python
from expr import all
```



---
## std
```python
from expr import std
```



---
## count
```python
from expr import count
```



---
## n_unique
```python
from expr import n_unique
```



---
## unique
```python
from expr import unique
```



---
## abs
```python
from expr import abs
```



---
## cum_sum
```python
from expr import cum_sum
```



---
## diff
```python
from expr import diff
```



---
## shift
```python
from expr import shift
```



---
## sort
```python
from expr import sort
```



---
## is_between
```python
from expr import is_between
```



---
## is_in
```python
from expr import is_in
```



---
## filter
```python
from expr import filter
```



---
## is_null
```python
from expr import is_null
```



---
## arg_true
```python
from expr import arg_true
```



---
## fill_null
```python
from expr import fill_null
```



---
## drop_nulls
```python
from expr import drop_nulls
```



---
## sample
```python
from expr import sample
```



---
## over
```python
from expr import over
```



---
## is_duplicated
```python
from expr import is_duplicated
```



---
## is_unique
```python
from expr import is_unique
```



---
## null_count
```python
from expr import null_count
```



---
## is_first_distinct
```python
from expr import is_first_distinct
```



---
## is_last_distinct
```python
from expr import is_last_distinct
```



---
## quantile
```python
from expr import quantile
```



---
## head
```python
from expr import head
```



---
## tail
```python
from expr import tail
```



---
## round
```python
from expr import round
```



---
## len
```python
from expr import len
```



---
## gather_every
```python
from expr import gather_every
```



---
## clip
```python
from expr import clip
```



---
## mode
```python
from expr import mode
```



---
## str
```python
from expr import str
```



---
## dt
```python
from expr import dt
```



---
## cat
```python
from expr import cat
```



---
## name
```python
from expr import name
```



---
## get_categories
```python
from expr import get_categories
```



---
## len_chars
```python
from expr import len_chars
```



---
## replace
```python
from expr import replace
```



---
## replace_all
```python
from expr import replace_all
```



---
## strip_chars
```python
from expr import strip_chars
```



---
## starts_with
```python
from expr import starts_with
```



---
## ends_with
```python
from expr import ends_with
```



---
## contains
```python
from expr import contains
```



---
## slice
```python
from expr import slice
```



---
## to_datetime
```python
from expr import to_datetime
```



---
## to_uppercase
```python
from expr import to_uppercase
```



---
## to_lowercase
```python
from expr import to_lowercase
```



---
## date
```python
from expr import date
```



---
## year
```python
from expr import year
```



---
## month
```python
from expr import month
```



---
## day
```python
from expr import day
```



---
## hour
```python
from expr import hour
```



---
## minute
```python
from expr import minute
```



---
## second
```python
from expr import second
```



---
## millisecond
```python
from expr import millisecond
```



---
## microsecond
```python
from expr import microsecond
```



---
## nanosecond
```python
from expr import nanosecond
```



---
## ordinal_day
```python
from expr import ordinal_day
```



---
## total_minutes
```python
from expr import total_minutes
```



---
## total_seconds
```python
from expr import total_seconds
```



---
## total_milliseconds
```python
from expr import total_milliseconds
```



---
## total_microseconds
```python
from expr import total_microseconds
```



---
## total_nanoseconds
```python
from expr import total_nanoseconds
```



---
## to_string
```python
from expr import to_string
```



---
## keep
```python
from expr import keep
```



---
## map
```python
from expr import map
```



---
## prefix
```python
from expr import prefix
```



---
## suffix
```python
from expr import suffix
```



---
## func
```python
from expr import func
```



---
## _extract_predicates
```python
from expr import _extract_predicates
```



---
## then
```python
from expr import then
```



---
## otherwise
```python
from expr import otherwise
```



---
## __name__
```python
from _build_tlz import __name__
```



---
## TlzLoader
```python
from _build_tlz import TlzLoader
```

Finds and loads ``tlz`` modules when added to sys.meta_path

---
## __init__
```python
from _build_tlz import __init__
```



---
## _load_toolz
```python
from _build_tlz import _load_toolz
```



---
## find_module
```python
from _build_tlz import find_module
```



---
## load_module
```python
from _build_tlz import load_module
```



---
## find_spec
```python
from _build_tlz import find_spec
```



---
## create_module
```python
from _build_tlz import create_module
```



---
## exec_module
```python
from _build_tlz import exec_module
```



---
## QuerystringState
```python
from multipart import QuerystringState
```

Querystring parser states.

These are used to keep track of the state of the parser, and are used to determine
what to do when new data is encountered.

---
## MultipartState
```python
from multipart import MultipartState
```

Multipart parser states.

These are used to keep track of the state of the parser, and are used to determine
what to do when new data is encountered.

---
## parse_options_header
```python
from multipart import parse_options_header
```

Parses a Content-Type header into a value in the following format: (content_type, {parameters}).

---
## Field
```python
from multipart import Field
```

A Field object represents a (parsed) form field.  It represents a single
field with a corresponding name and value.

The name that a :class:`Field` will be instantiated with is the same name
that would be found in the following HTML::

    <input name="name_goes_here" type="text"/>

This class defines two methods, :meth:`on_data` and :meth:`on_end`, that
will be called when data is written to the Field, and when the Field is
finalized, respectively.

Args:
    name: The name of the form field.

---
## File
```python
from multipart import File
```

This class represents an uploaded file.  It handles writing file data to
either an in-memory file or a temporary file on-disk, if the optional
threshold is passed.

There are some options that can be passed to the File to change behavior
of the class.  Valid options are as follows:

| Name                  | Type  | Default | Description |
|-----------------------|-------|---------|-------------|
| UPLOAD_DIR            | `str` | None    | The directory to store uploaded files in. If this is None, a temporary file will be created in the system's standard location. |
| UPLOAD_DELETE_TMP     | `bool`| True    | Delete automatically created TMP file |
| UPLOAD_KEEP_FILENAME  | `bool`| False   | Whether or not to keep the filename of the uploaded file. If True, then the filename will be converted to a safe representation (e.g. by removing any invalid path segments), and then saved with the same name). Otherwise, a temporary name will be used. |
| UPLOAD_KEEP_EXTENSIONS| `bool`| False   | Whether or not to keep the uploaded file's extension. If False, the file will be saved with the default temporary extension (usually ".tmp"). Otherwise, the file's extension will be maintained. Note that this will properly combine with the UPLOAD_KEEP_FILENAME setting. |
| MAX_MEMORY_FILE_SIZE  | `int` | 1 MiB   | The maximum number of bytes of a File to keep in memory. By default, the contents of a File are kept into memory until a certain limit is reached, after which the contents of the File are written to a temporary file. This behavior can be disabled by setting this value to an appropriately large value (or, for example, infinity, such as `float('inf')`. |

Args:
    file_name: The name of the file that this [`File`][multipart.File] represents.
    field_name: The name of the form field that this file was uploaded with.  This can be None, if, for example,
        the file was uploaded with Content-Type application/octet-stream.
    config: The configuration for this File.  See above for valid configuration keys and their corresponding values.

---
## BaseParser
```python
from multipart import BaseParser
```

This class is the base class for all parsers.  It contains the logic for
calling and adding callbacks.

A callback can be one of two different forms.  "Notification callbacks" are
callbacks that are called when something happens - for example, when a new
part of a multipart message is encountered by the parser.  "Data callbacks"
are called when we get some sort of data - for example, part of the body of
a multipart chunk.  Notification callbacks are called with no parameters,
whereas data callbacks are called with three, as follows::

    data_callback(data, start, end)

The "data" parameter is a bytestring (i.e. "foo" on Python 2, or b"foo" on
Python 3).  "start" and "end" are integer indexes into the "data" string
that represent the data of interest.  Thus, in a data callback, the slice
`data[start:end]` represents the data that the callback is "interested in".
The callback is not passed a copy of the data, since copying severely hurts
performance.

---
## OctetStreamParser
```python
from multipart import OctetStreamParser
```

This parser parses an octet-stream request body and calls callbacks when
incoming data is received.  Callbacks are as follows:

| Callback Name  | Parameters      | Description                                         |
|----------------|-----------------|-----------------------------------------------------|
| on_start       | None            | Called when the first data is parsed.               |
| on_data        | data, start, end| Called for each data chunk that is parsed.           |
| on_end         | None            | Called when the parser is finished parsing all data.|

Args:
    callbacks: A dictionary of callbacks.  See the documentation for [`BaseParser`][multipart.BaseParser].
    max_size: The maximum size of body to parse.  Defaults to infinity - i.e. unbounded.

---
## QuerystringParser
```python
from multipart import QuerystringParser
```

This is a streaming querystring parser.  It will consume data, and call
the callbacks given when it has data.

| Callback Name  | Parameters      | Description                                         |
|----------------|-----------------|-----------------------------------------------------|
| on_field_start | None            | Called when a new field is encountered.             |
| on_field_name  | data, start, end| Called when a portion of a field's name is encountered. |
| on_field_data  | data, start, end| Called when a portion of a field's data is encountered. |
| on_field_end   | None            | Called when the end of a field is encountered.      |
| on_end         | None            | Called when the parser is finished parsing all data.|

Args:
    callbacks: A dictionary of callbacks.  See the documentation for [`BaseParser`][multipart.BaseParser].
    strict_parsing: Whether or not to parse the body strictly.  Defaults to False.  If this is set to True, then the
        behavior of the parser changes as the following: if a field has a value with an equal sign
        (e.g. "foo=bar", or "foo="), it is always included.  If a field has no equals sign (e.g. "...&name&..."),
        it will be treated as an error if 'strict_parsing' is True, otherwise included.  If an error is encountered,
        then a [`QuerystringParseError`][multipart.exceptions.QuerystringParseError] will be raised.
    max_size: The maximum size of body to parse.  Defaults to infinity - i.e. unbounded.

---
## MultipartParser
```python
from multipart import MultipartParser
```

This class is a streaming multipart/form-data parser.

| Callback Name      | Parameters      | Description |
|--------------------|-----------------|-------------|
| on_part_begin      | None            | Called when a new part of the multipart message is encountered. |
| on_part_data       | data, start, end| Called when a portion of a part's data is encountered. |
| on_part_end        | None            | Called when the end of a part is reached. |
| on_header_begin    | None            | Called when we've found a new header in a part of a multipart message |
| on_header_field    | data, start, end| Called each time an additional portion of a header is read (i.e. the part of the header that is before the colon; the "Foo" in "Foo: Bar"). |
| on_header_value    | data, start, end| Called when we get data for a header. |
| on_header_end      | None            | Called when the current header is finished - i.e. we've reached the newline at the end of the header. |
| on_headers_finished| None            | Called when all headers are finished, and before the part data starts. |
| on_end             | None            | Called when the parser is finished parsing all data. |

Args:
    boundary: The multipart boundary.  This is required, and must match what is given in the HTTP request - usually in the Content-Type header.
    callbacks: A dictionary of callbacks.  See the documentation for [`BaseParser`][multipart.BaseParser].
    max_size: The maximum size of body to parse.  Defaults to infinity - i.e. unbounded.

---
## FormParser
```python
from multipart import FormParser
```

This class is the all-in-one form parser.  Given all the information
necessary to parse a form, it will instantiate the correct parser, create
the proper :class:`Field` and :class:`File` classes to store the data that
is parsed, and call the two given callbacks with each field and file as
they become available.

Args:
    content_type: The Content-Type of the incoming request.  This is used to select the appropriate parser.
    on_field: The callback to call when a field has been parsed and is ready for usage.  See above for parameters.
    on_file: The callback to call when a file has been parsed and is ready for usage.  See above for parameters.
    on_end: An optional callback to call when all fields and files in a request has been parsed.  Can be None.
    boundary: If the request is a multipart/form-data request, this should be the boundary of the request, as given
        in the Content-Type header, as a bytestring.
    file_name: If the request is of type application/octet-stream, then the body of the request will not contain any
        information about the uploaded file.  In such cases, you can provide the file name of the uploaded file
        manually.
    FileClass: The class to use for uploaded files.  Defaults to :class:`File`, but you can provide your own class
        if you wish to customize behaviour.  The class will be instantiated as FileClass(file_name, field_name), and
        it must provide the following functions::
            - file_instance.write(data)
            - file_instance.finalize()
            - file_instance.close()
    FieldClass: The class to use for uploaded fields.  Defaults to :class:`Field`, but you can provide your own
        class if you wish to customize behaviour.  The class will be instantiated as FieldClass(field_name), and it
        must provide the following functions::
            - field_instance.write(data)
            - field_instance.finalize()
            - field_instance.close()
            - field_instance.set_none()
    config: Configuration to use for this FormParser.  The default values are taken from the DEFAULT_CONFIG value,
        and then any keys present in this dictionary will overwrite the default values.

---
## create_form_parser
```python
from multipart import create_form_parser
```

This function is a helper function to aid in creating a FormParser
instances.  Given a dictionary-like headers object, it will determine
the correct information needed, instantiate a FormParser with the
appropriate values and given callbacks, and then return the corresponding
parser.

Args:
    headers: A dictionary-like object of HTTP headers.  The only required header is Content-Type.
    on_field: Callback to call with each parsed field.
    on_file: Callback to call with each parsed file.
    trust_x_headers: Whether or not to trust information received from certain X-Headers - for example, the file
        name from X-File-Name.
    config: Configuration variables to pass to the FormParser.

---
## parse_form
```python
from multipart import parse_form
```

This function is useful if you just want to parse a request body,
without too much work.  Pass it a dictionary-like object of the request's
headers, and a file-like object for the input stream, along with two
callbacks that will get called whenever a field or file is parsed.

Args:
    headers: A dictionary-like object of HTTP headers.  The only required header is Content-Type.
    input_stream: A file-like object that represents the request body. The read() method must return bytestrings.
    on_field: Callback to call with each parsed field.
    on_file: Callback to call with each parsed file.
    chunk_size: The maximum size to read from the input stream and write to the parser at one time.
        Defaults to 1 MiB.

---
## SupportsRead
```python
from multipart import SupportsRead
```



---
## QuerystringCallbacks
```python
from multipart import QuerystringCallbacks
```



---
## OctetStreamCallbacks
```python
from multipart import OctetStreamCallbacks
```



---
## MultipartCallbacks
```python
from multipart import MultipartCallbacks
```



---
## FormParserConfig
```python
from multipart import FormParserConfig
```



---
## FileConfig
```python
from multipart import FileConfig
```



---
## _FormProtocol
```python
from multipart import _FormProtocol
```



---
## FieldProtocol
```python
from multipart import FieldProtocol
```



---
## FileProtocol
```python
from multipart import FileProtocol
```



---
## from_value
```python
from multipart import from_value
```

Create an instance of a :class:`Field`, and set the corresponding
value - either None or an actual value.  This method will also
finalize the Field itself.

Args:
    name: the name of the form field.
    value: the value of the form field - either a bytestring or None.

Returns:
    A new instance of a [`Field`][multipart.Field].

---
## write
```python
from multipart import write
```



---
## on_data
```python
from multipart import on_data
```



---
## on_end
```python
from multipart import on_end
```

This method is called whenever the Field is finalized.

---
## finalize
```python
from multipart import finalize
```



---
## close
```python
from multipart import close
```



---
## set_none
```python
from multipart import set_none
```



---
## field_name
```python
from multipart import field_name
```

The form field associated with this file.  May be None if there isn't
one, for example when we have an application/octet-stream upload.

---
## value
```python
from multipart import value
```

This property returns the value of the form field.

---
## __eq__
```python
from multipart import __eq__
```



---
## __repr__
```python
from multipart import __repr__
```



---
## file_name
```python
from multipart import file_name
```

The file name given in the upload request.

---
## actual_file_name
```python
from multipart import actual_file_name
```

The file name that this file is saved as.  Will be None if it's not
currently saved on disk.

---
## file_object
```python
from multipart import file_object
```

The file object that we're currently writing to.  Note that this
will either be an instance of a :class:`io.BytesIO`, or a regular file
object.

---
## in_memory
```python
from multipart import in_memory
```

A boolean representing whether or not this file object is currently
stored in-memory or on-disk.

---
## flush_to_disk
```python
from multipart import flush_to_disk
```

If the file is already on-disk, do nothing.  Otherwise, copy from
the in-memory buffer to a disk file, and then reassign our internal
file object to this new disk file.

Note that if you attempt to flush a file that is already on-disk, a
warning will be logged to this module's logger.

---
## _get_disk_file
```python
from multipart import _get_disk_file
```

This function is responsible for getting a file object on-disk for us.

---
## callback
```python
from multipart import callback
```

This function calls a provided callback with some data.  If the
callback is not set, will do nothing.

Args:
    name: The name of the callback to call (as a string).
    data: Data to pass to the callback.  If None, then it is assumed that the callback is a notification
        callback, and no parameters are given.
    end: An integer that is passed to the data callback.
    start: An integer that is passed to the data callback.

---
## set_callback
```python
from multipart import set_callback
```

Update the function for a callback.  Removes from the callbacks dict
if new_func is None.

:param name: The name of the callback to call (as a string).

:param new_func: The new function for the callback.  If None, then the
                 callback will be removed (with no error if it does not
                 exist).

---
## _internal_write
```python
from multipart import _internal_write
```



---
## read
```python
from multipart import read
```



---
## set_mark
```python
from multipart import set_mark
```



---
## delete_mark
```python
from multipart import delete_mark
```



---
## data_callback
```python
from multipart import data_callback
```



---
## on_start
```python
from multipart import on_start
```



---
## _on_end
```python
from multipart import _on_end
```



---
## on_field_start
```python
from multipart import on_field_start
```



---
## on_field_name
```python
from multipart import on_field_name
```



---
## on_field_data
```python
from multipart import on_field_data
```



---
## on_field_end
```python
from multipart import on_field_end
```



---
## on_part_begin
```python
from multipart import on_part_begin
```



---
## on_part_data
```python
from multipart import on_part_data
```



---
## on_part_end
```python
from multipart import on_part_end
```



---
## on_header_field
```python
from multipart import on_header_field
```



---
## on_header_value
```python
from multipart import on_header_value
```



---
## on_header_end
```python
from multipart import on_header_end
```



---
## on_headers_finished
```python
from multipart import on_headers_finished
```



---
## __name__
```python
from decoders import __name__
```



---
## Base64Decoder
```python
from decoders import Base64Decoder
```

This object provides an interface to decode a stream of Base64 data.  It
is instantiated with an "underlying object", and whenever a write()
operation is performed, it will decode the incoming data as Base64, and
call write() on the underlying object.  This is primarily used for decoding
form data encoded as Base64, but can be used for other purposes::

    from multipart.decoders import Base64Decoder
    fd = open("notb64.txt", "wb")
    decoder = Base64Decoder(fd)
    try:
        decoder.write("Zm9vYmFy")       # "foobar" in Base64
        decoder.finalize()
    finally:
        decoder.close()

    # The contents of "notb64.txt" should be "foobar".

This object will also pass all finalize() and close() calls to the
underlying object, if the underlying object supports them.

Note that this class maintains a cache of base64 chunks, so that a write of
arbitrary size can be performed.  You must call :meth:`finalize` on this
object after all writes are completed to ensure that all data is flushed
to the underlying object.

:param underlying: the underlying object to pass writes to

---
## QuotedPrintableDecoder
```python
from decoders import QuotedPrintableDecoder
```

This object provides an interface to decode a stream of quoted-printable
data.  It is instantiated with an "underlying object", in the same manner
as the :class:`multipart.decoders.Base64Decoder` class.  This class behaves
in exactly the same way, including maintaining a cache of quoted-printable
chunks.

:param underlying: the underlying object to pass writes to

---
## SupportsWrite
```python
from decoders import SupportsWrite
```



---
## __init__
```python
from decoders import __init__
```



---
## write
```python
from decoders import write
```



---
## close
```python
from decoders import close
```

Close this decoder.  If the underlying object has a `close()`
method, this function will call it.

---
## finalize
```python
from decoders import finalize
```

Finalize this object.  This should be called when no more data
should be written to the stream.  This function will not raise any
exceptions, but it may write more data to the underlying object if
there is data remaining in the cache.

If the underlying object has a `finalize()` method, this function will
call it.

---
## __repr__
```python
from decoders import __repr__
```



---
## FormParserError
```python
from exceptions import FormParserError
```

Base error class for our form parser.

---
## ParseError
```python
from exceptions import ParseError
```

This error occurs when the parser encounters a syntax error
in the TOML being parsed. The error references the line and
location within the line where the error was encountered.

---
## MultipartParseError
```python
from exceptions import MultipartParseError
```

This is a specific error that is raised when the MultipartParser detects
an error while parsing.

---
## QuerystringParseError
```python
from exceptions import QuerystringParseError
```

This is a specific error that is raised when the QuerystringParser
detects an error while parsing.

---
## DecodeError
```python
from exceptions import DecodeError
```

Raised when automatic decoding based on Content-Type fails.

---
## __name__
```python
from _monitor import __name__
```



---
## TqdmSynchronisationWarning
```python
from _monitor import TqdmSynchronisationWarning
```

tqdm multi-thread/-process errors which may cause incorrect nesting
but otherwise no adverse effects

---
## TMonitor
```python
from _monitor import TMonitor
```

Monitoring thread for tqdm bars.
Monitors if tqdm bars are taking too much time to display
and readjusts miniters automatically if necessary.

Parameters
----------
tqdm_cls  : class
    tqdm class to use (can be core tqdm or a submodule).
sleep_interval  : float
    Time to sleep between monitoring checks.

---
## __init__
```python
from _monitor import __init__
```



---
## exit
```python
from _monitor import exit
```



---
## get_instances
```python
from _monitor import get_instances
```



---
## run
```python
from _monitor import run
```



---
## report
```python
from _monitor import report
```



---
## __name__
```python
from keras import __name__
```



---
## TqdmCallback
```python
from keras import TqdmCallback
```

Keras callback for epoch and batch progress.

---
## bar2callback
```python
from keras import bar2callback
```



---
## __init__
```python
from keras import __init__
```

Parameters
----------
epochs  : int, optional
data_size  : int, optional
    Number of training pairs.
batch_size  : int, optional
    Number of training pairs per batch.
verbose  : int
    0: epoch, 1: batch (transient), 2: batch. [default: 1].
    Will be set to `0` unless both `data_size` and `batch_size`
    are given.
tqdm_class  : optional
    `tqdm` class to use for bars [default: `tqdm.auto.tqdm`].
tqdm_kwargs  : optional
    Any other arguments used for all bars.

---
## on_train_begin
```python
from keras import on_train_begin
```



---
## on_epoch_begin
```python
from keras import on_epoch_begin
```



---
## on_train_end
```python
from keras import on_train_end
```



---
## display
```python
from keras import display
```

Displays in the current cell in Notebooks.

---
## _implements_train_batch_hooks
```python
from keras import _implements_train_batch_hooks
```



---
## _implements_test_batch_hooks
```python
from keras import _implements_test_batch_hooks
```



---
## _implements_predict_batch_hooks
```python
from keras import _implements_predict_batch_hooks
```



---
## callback
```python
from keras import callback
```



---
## __name__
```python
from _tqdm_gui import __name__
```



---
## tqdm_asyncio
```python
from asyncio import tqdm_asyncio
```

Asynchronous-friendly version of tqdm.

---
## tarange
```python
from asyncio import tarange
```

A shortcut for `tqdm.asyncio.tqdm(range(*args), **kwargs)`.

---
## __aiter__
```python
from asyncio import __aiter__
```



---
## send
```python
from asyncio import send
```



---
## as_completed
```python
from asyncio import as_completed
```

Wrapper for `asyncio.as_completed`.

---
## __name__
```python
from _dist_ver import __name__
```



---
## __name__
```python
from std import __name__
```

Customisable progressbar decorator for iterators.
Includes a default `range` iterator printing to `stderr`.

Usage:
>>> from tqdm import trange, tqdm
>>> for i in trange(10):
...     ...

---
## TqdmTypeError
```python
from std import TqdmTypeError
```



---
## TqdmKeyError
```python
from std import TqdmKeyError
```



---
## TqdmWarning
```python
from std import TqdmWarning
```

base class for all tqdm warnings.

Used for non-external-code-breaking errors, such as garbled printing.

---
## TqdmExperimentalWarning
```python
from std import TqdmExperimentalWarning
```

beta feature, unstable API and behaviour

---
## TqdmDeprecationWarning
```python
from std import TqdmDeprecationWarning
```



---
## TqdmMonitorWarning
```python
from std import TqdmMonitorWarning
```

tqdm monitor errors which do not affect external functionality

---
## TRLock
```python
from std import TRLock
```

threading RLock

---
## TqdmDefaultWriteLock
```python
from std import TqdmDefaultWriteLock
```

Provide a default write lock for thread and multiprocessing safety.
Works only on platforms supporting `fork` (so Windows is excluded).
You must initialise a `tqdm` or `TqdmDefaultWriteLock` instance
before forking in order for the write lock to work.
On Windows, you need to supply the lock from the parent to the children as
an argument to joblib or the parallelism lib you use.

---
## Bar
```python
from std import Bar
```

`str.format`-able bar with format specifiers: `[width][type]`

- `width`
  + unspecified (default): use `self.default_len`
  + `int >= 0`: overrides `self.default_len`
  + `int < 0`: subtract from `self.default_len`
- `type`
  + `a`: ascii (`charset=self.ASCII` override)
  + `u`: unicode (`charset=self.UTF` override)
  + `b`: blank (`charset="  "` override)

---
## EMA
```python
from std import EMA
```

Exponential moving average: smoothing to give progressively lower
weights to older values.

Parameters
----------
smoothing  : float, optional
    Smoothing factor in range [0, 1], [default: 0.3].
    Increase to give more weight to recent values.
    Ranges from 0 (yields old value) to 1 (yields new value).

---
## tqdm
```python
from std import tqdm
```

Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.

Parameters
----------
iterable  : iterable, optional
    Iterable to decorate with a progressbar.
    Leave blank to manually manage the updates.
desc  : str, optional
    Prefix for the progressbar.
total  : int or float, optional
    The number of expected iterations. If unspecified,
    len(iterable) is used if possible. If float("inf") or as a last
    resort, only basic progress statistics are displayed
    (no ETA, no progressbar).
    If `gui` is True and this parameter needs subsequent updating,
    specify an initial arbitrary large positive number,
    e.g. 9e9.
leave  : bool, optional
    If [default: True], keeps all traces of the progressbar
    upon termination of iteration.
    If `None`, will leave only if `position` is `0`.
file  : `io.TextIOWrapper` or `io.StringIO`, optional
    Specifies where to output the progress messages
    (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
    methods.  For encoding, see `write_bytes`.
ncols  : int, optional
    The width of the entire output message. If specified,
    dynamically resizes the progressbar to stay within this bound.
    If unspecified, attempts to use environment width. The
    fallback is a meter width of 10 and no limit for the counter and
    statistics. If 0, will not print any meter (only stats).
mininterval  : float, optional
    Minimum progress display update interval [default: 0.1] seconds.
maxinterval  : float, optional
    Maximum progress display update interval [default: 10] seconds.
    Automatically adjusts `miniters` to correspond to `mininterval`
    after long display update lag. Only works if `dynamic_miniters`
    or monitor thread is enabled.
miniters  : int or float, optional
    Minimum progress display update interval, in iterations.
    If 0 and `dynamic_miniters`, will automatically adjust to equal
    `mininterval` (more CPU efficient, good for tight loops).
    If > 0, will skip display of specified number of iterations.
    Tweak this and `mininterval` to get very efficient loops.
    If your progress is erratic with both fast and slow iterations
    (network, skipping items, etc) you should set miniters=1.
ascii  : bool or str, optional
    If unspecified or False, use unicode (smooth blocks) to fill
    the meter. The fallback is to use ASCII characters " 123456789#".
disable  : bool, optional
    Whether to disable the entire progressbar wrapper
    [default: False]. If set to None, disable on non-TTY.
unit  : str, optional
    String that will be used to define the unit of each iteration
    [default: it].
unit_scale  : bool or int or float, optional
    If 1 or True, the number of iterations will be reduced/scaled
    automatically and a metric prefix following the
    International System of Units standard will be added
    (kilo, mega, etc.) [default: False]. If any other non-zero
    number, will scale `total` and `n`.
dynamic_ncols  : bool, optional
    If set, constantly alters `ncols` and `nrows` to the
    environment (allowing for window resizes) [default: False].
smoothing  : float, optional
    Exponential moving average smoothing factor for speed estimates
    (ignored in GUI mode). Ranges from 0 (average speed) to 1
    (current/instantaneous speed) [default: 0.3].
bar_format  : str, optional
    Specify a custom bar string formatting. May impact performance.
    [default: '{l_bar}{bar}{r_bar}'], where
    l_bar='{desc}: {percentage:3.0f}%|' and
    r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
        '{rate_fmt}{postfix}]'
    Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
        percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
        rate, rate_fmt, rate_noinv, rate_noinv_fmt,
        rate_inv, rate_inv_fmt, postfix, unit_divisor,
        remaining, remaining_s, eta.
    Note that a trailing ": " is automatically removed after {desc}
    if the latter is empty.
initial  : int or float, optional
    The initial counter value. Useful when restarting a progress
    bar [default: 0]. If using float, consider specifying `{n:.3f}`
    or similar in `bar_format`, or specifying `unit_scale`.
position  : int, optional
    Specify the line offset to print this bar (starting from 0)
    Automatic if unspecified.
    Useful to manage multiple bars at once (eg, from threads).
postfix  : dict or *, optional
    Specify additional stats to display at the end of the bar.
    Calls `set_postfix(**postfix)` if possible (dict).
unit_divisor  : float, optional
    [default: 1000], ignored unless `unit_scale` is True.
write_bytes  : bool, optional
    Whether to write bytes. If (default: False) will write unicode.
lock_args  : tuple, optional
    Passed to `refresh` for intermediate output
    (initialisation, iterating, and updating).
nrows  : int, optional
    The screen height. If specified, hides nested bars outside this
    bound. If unspecified, attempts to use environment height.
    The fallback is 20.
colour  : str, optional
    Bar colour (e.g. 'green', '#00ff00').
delay  : float, optional
    Don't display until [default: 0] seconds have elapsed.
gui  : bool, optional
    WARNING: internal parameter - do not use.
    Use tqdm.gui.tqdm(...) instead. If set, will attempt to use
    matplotlib animations for a graphical output [default: False].

Returns
-------
out  : decorated iterator.

---
## trange
```python
from std import trange
```

Shortcut for tqdm(range(*args), **kwargs).

---
## __init__
```python
from std import __init__
```

see tqdm.tqdm for arguments

---
## acquire
```python
from std import acquire
```



---
## release
```python
from std import release
```



---
## __enter__
```python
from std import __enter__
```



---
## __exit__
```python
from std import __exit__
```



---
## create_mp_lock
```python
from std import create_mp_lock
```



---
## create_th_lock
```python
from std import create_th_lock
```



---
## colour
```python
from std import colour
```



---
## __format__
```python
from std import __format__
```



---
## __call__
```python
from std import __call__
```

Parameters
----------
x  : float
    New value to include in EMA.

---
## format_sizeof
```python
from std import format_sizeof
```

Formats a number (greater than unity) with SI Order of Magnitude
prefixes.

Parameters
----------
num  : float
    Number ( >= 1) to format.
suffix  : str, optional
    Post-postfix [default: ''].
divisor  : float, optional
    Divisor between prefixes [default: 1000].

Returns
-------
out  : str
    Number with Order of Magnitude SI unit postfix.

---
## format_interval
```python
from std import format_interval
```

Formats a number of seconds as a clock time, [H:]MM:SS

Parameters
----------
t  : int
    Number of seconds.

Returns
-------
out  : str
    [H:]MM:SS

---
## format_num
```python
from std import format_num
```

Intelligent scientific notation (.3g).

Parameters
----------
n  : int or float or Numeric
    A Number.

Returns
-------
out  : str
    Formatted number.

---
## status_printer
```python
from std import status_printer
```

Manage the printing and in-place updating of a line of characters.
Note that if the string is longer than a line, then in-place
updating may not work (it will print a new line at each refresh).

---
## format_meter
```python
from std import format_meter
```

Return a string-based progress bar given some parameters

Parameters
----------
n  : int or float
    Number of finished iterations.
total  : int or float
    The expected total number of iterations. If meaningless (None),
    only basic progress statistics are displayed (no ETA).
elapsed  : float
    Number of seconds passed since start.
ncols  : int, optional
    The width of the entire output message. If specified,
    dynamically resizes `{bar}` to stay within this bound
    [default: None]. If `0`, will not print any bar (only stats).
    The fallback is `{bar:10}`.
prefix  : str, optional
    Prefix message (included in total width) [default: ''].
    Use as {desc} in bar_format string.
ascii  : bool, optional or str, optional
    If not set, use unicode (smooth blocks) to fill the meter
    [default: False]. The fallback is to use ASCII characters
    " 123456789#".
unit  : str, optional
    The iteration unit [default: 'it'].
unit_scale  : bool or int or float, optional
    If 1 or True, the number of iterations will be printed with an
    appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
    [default: False]. If any other non-zero number, will scale
    `total` and `n`.
rate  : float, optional
    Manual override for iteration rate.
    If [default: None], uses n/elapsed.
bar_format  : str, optional
    Specify a custom bar string formatting. May impact performance.
    [default: '{l_bar}{bar}{r_bar}'], where
    l_bar='{desc}: {percentage:3.0f}%|' and
    r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
      '{rate_fmt}{postfix}]'
    Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
      percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
      rate, rate_fmt, rate_noinv, rate_noinv_fmt,
      rate_inv, rate_inv_fmt, postfix, unit_divisor,
      remaining, remaining_s, eta.
    Note that a trailing ": " is automatically removed after {desc}
    if the latter is empty.
postfix  : *, optional
    Similar to `prefix`, but placed at the end
    (e.g. for additional stats).
    Note: postfix is usually a string (not a dict) for this method,
    and will if possible be set to postfix = ', ' + postfix.
    However other types are supported (#382).
unit_divisor  : float, optional
    [default: 1000], ignored unless `unit_scale` is True.
initial  : int or float, optional
    The initial counter value [default: 0].
colour  : str, optional
    Bar colour (e.g. 'green', '#00ff00').

Returns
-------
out  : Formatted meter and stats, ready to display.

---
## __new__
```python
from std import __new__
```



---
## _get_free_pos
```python
from std import _get_free_pos
```

Skips specified instance.

---
## _decr_instances
```python
from std import _decr_instances
```

Remove from list and reposition another unfixed bar
to fill the new gap.

This means that by default (where all nested bars are unfixed),
order is not maintained but screen flicker/blank space is minimised.
(tqdm<=4.44.1 moved ALL subsequent unfixed bars up.)

---
## write
```python
from std import write
```

Print a message via tqdm (without overlap with bars).

---
## external_write_mode
```python
from std import external_write_mode
```

Disable tqdm within context and refresh tqdm when exits.
Useful when writing to standard output stream

---
## set_lock
```python
from std import set_lock
```

Set the global lock.

---
## get_lock
```python
from std import get_lock
```

Get the global lock. Construct it if it does not exist.

---
## pandas
```python
from std import pandas
```

Registers the current `tqdm` class with
    pandas.core.
    ( frame.DataFrame
    | series.Series
    | groupby.(generic.)DataFrameGroupBy
    | groupby.(generic.)SeriesGroupBy
    ).progress_apply

A new instance will be created every time `progress_apply` is called,
and each instance will automatically `close()` upon completion.

Parameters
----------
tqdm_kwargs  : arguments for the tqdm instance

Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> from tqdm import tqdm
>>> from tqdm.gui import tqdm as tqdm_gui
>>>
>>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
>>> tqdm.pandas(ncols=50)  # can use tqdm_gui, optional kwargs, etc
>>> # Now you can use `progress_apply` instead of `apply`
>>> df.groupby(0).progress_apply(lambda x: x**2)

References
----------
<https://stackoverflow.com/questions/18603270/        progress-indicator-during-pandas-operations-python>

---
## __bool__
```python
from std import __bool__
```



---
## __len__
```python
from std import __len__
```



---
## __reversed__
```python
from std import __reversed__
```



---
## __contains__
```python
from std import __contains__
```



---
## __del__
```python
from std import __del__
```



---
## __str__
```python
from std import __str__
```



---
## _comparable
```python
from std import _comparable
```



---
## __hash__
```python
from std import __hash__
```



---
## __iter__
```python
from std import __iter__
```

Backward-compatibility to use: for x in tqdm(iterable)

---
## update
```python
from std import update
```

Manually update the progress bar, useful for streams
such as reading files.
E.g.:
>>> t = tqdm(total=filesize) # Initialise
>>> for current_buffer in stream:
...    ...
...    t.update(len(current_buffer))
>>> t.close()
The last line is highly recommended, but possibly not necessary if
`t.update()` will be called in such a way that `filesize` will be
exactly reached and printed.

Parameters
----------
n  : int or float, optional
    Increment to add to the internal counter of iterations
    [default: 1]. If using float, consider specifying `{n:.3f}`
    or similar in `bar_format`, or specifying `unit_scale`.

Returns
-------
out  : bool or None
    True if a `display()` was triggered.

---
## close
```python
from std import close
```

Cleanup and (if leave=False) close the progressbar.

---
## clear
```python
from std import clear
```

Clear current bar display.

---
## refresh
```python
from std import refresh
```

Force refresh the display of this bar.

Parameters
----------
nolock  : bool, optional
    If `True`, does not lock.
    If [default: `False`]: calls `acquire()` on internal lock.
lock_args  : tuple, optional
    Passed to internal lock's `acquire()`.
    If specified, will only `display()` if `acquire()` returns `True`.

---
## unpause
```python
from std import unpause
```

Restart tqdm timer from last print time.

---
## reset
```python
from std import reset
```

Resets to 0 iterations for repeated use.

Consider combining with `leave=True`.

Parameters
----------
total  : int or float, optional. Total to use for the new bar.

---
## set_description
```python
from std import set_description
```

Set/modify description of the progress bar.

Parameters
----------
desc  : str, optional
refresh  : bool, optional
    Forces refresh [default: True].

---
## set_description_str
```python
from std import set_description_str
```

Set/modify description without ': ' appended.

---
## set_postfix
```python
from std import set_postfix
```

Set/modify postfix (additional stats)
with automatic formatting based on datatype.

Parameters
----------
ordered_dict  : dict or OrderedDict, optional
refresh  : bool, optional
    Forces refresh [default: True].
kwargs  : dict, optional

---
## set_postfix_str
```python
from std import set_postfix_str
```

Postfix without dictionary expansion, similar to prefix handling.

---
## moveto
```python
from std import moveto
```



---
## format_dict
```python
from std import format_dict
```

Public API for read-only member access.

---
## display
```python
from std import display
```

Use `self.sp` to display `msg` in the specified `pos`.

Consider overloading this function when inheriting to use e.g.:
`self.some_frontend(**self.format_dict)` instead of `self.sp`.

Parameters
----------
msg  : str, optional. What to display (default: `repr(self)`).
pos  : int, optional. Position to `moveto`
  (default: `abs(self.pos)`).

---
## wrapattr
```python
from std import wrapattr
```

stream  : file-like object.
method  : str, "read" or "write". The result of `read()` and
    the first argument of `write()` should have a `len()`.

>>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj:
...     while True:
...         chunk = fobj.read(chunk_size)
...         if not chunk:
...             break

---
## fp_write
```python
from std import fp_write
```



---
## print_status
```python
from std import print_status
```



---
## inner_generator
```python
from std import inner_generator
```



---
## inner
```python
from std import inner
```

Parameters
----------
df  : (DataFrame|Series)[GroupBy]
    Data (may be grouped).
func  : function
    To be applied on the (grouped) data.
**kwargs  : optional
    Transmitted to `df.apply()`.

---
## wrapper
```python
from std import wrapper
```



---
## __name__
```python
from _tqdm_notebook import __name__
```



---
## tqdm_notebook
```python
from __init__ import tqdm_notebook
```

See tqdm.notebook.tqdm for full documentation

---
## tnrange
```python
from __init__ import tnrange
```

Shortcut for `tqdm.notebook.tqdm(range(*args), **kwargs)`.

---
## __name__
```python
from rich import __name__
```

`rich.progress` decorator for iterators.

Usage:
>>> from tqdm.rich import trange, tqdm
>>> for i in trange(10):
...     ...

---
## FractionColumn
```python
from rich import FractionColumn
```

Renders completed/total, e.g. '0.5/2.3 G'.

---
## RateColumn
```python
from rich import RateColumn
```

Renders human readable transfer speed.

---
## tqdm_rich
```python
from rich import tqdm_rich
```

Experimental rich.progress GUI version of tqdm!

---
## trrange
```python
from rich import trrange
```

Shortcut for `tqdm.rich.tqdm(range(*args), **kwargs)`.

---
## __init__
```python
from rich import __init__
```

This class accepts the following parameters *in addition* to
the parameters accepted by `tqdm`.

Parameters
----------
progress  : tuple, optional
    arguments for `rich.progress.Progress()`.
options  : dict, optional
    keyword arguments for `rich.progress.Progress()`.

---
## render
```python
from rich import render
```

Show data transfer speed.

---
## close
```python
from rich import close
```



---
## clear
```python
from rich import clear
```



---
## display
```python
from rich import display
```



---
## reset
```python
from rich import reset
```

Resets to 0 iterations for repeated use.

Parameters
----------
total  : int or float, optional. Total to use for the new bar.

---
## __name__
```python
from tk import __name__
```

Tkinter GUI progressbar decorator for iterators.

Usage:
>>> from tqdm.tk import trange, tqdm
>>> for i in trange(10):
...     ...

---
## tqdm_tk
```python
from tk import tqdm_tk
```

Experimental Tkinter GUI version of tqdm!

Note: Window interactivity suffers if `tqdm_tk` is not running within
a Tkinter mainloop and values are generated infrequently. In this case,
consider calling `tqdm_tk.refresh()` frequently in the Tk thread.

---
## ttkrange
```python
from tk import ttkrange
```

Shortcut for `tqdm.tk.tqdm(range(*args), **kwargs)`.

---
## __init__
```python
from tk import __init__
```

This class accepts the following parameters *in addition* to
the parameters accepted by `tqdm`.

Parameters
----------
grab  : bool, optional
    Grab the input across all windows of the process.
tk_parent  : `tkinter.Wm`, optional
    Parent Tk window.
cancel_callback  : Callable, optional
    Create a cancel button and set `cancel_callback` to be called
    when the cancel or window close button is clicked.

---
## close
```python
from tk import close
```



---
## clear
```python
from tk import clear
```



---
## display
```python
from tk import display
```



---
## set_description
```python
from tk import set_description
```



---
## set_description_str
```python
from tk import set_description_str
```



---
## cancel
```python
from tk import cancel
```

`cancel_callback()` followed by `close()`
when close/cancel buttons clicked.

---
## reset
```python
from tk import reset
```

Resets to 0 iterations for repeated use.

Parameters
----------
total  : int or float, optional. Total to use for the new bar.

---
## _tk_dispatching_helper
```python
from tk import _tk_dispatching_helper
```

determine if Tkinter mainloop is dispatching events

---
## _close
```python
from tk import _close
```



---
## cast
```python
from cli import cast
```



---
## posix_pipe
```python
from cli import posix_pipe
```

Params
------
fin  : binary file with `read(buf_size : int)` method
fout  : binary file with `write` (and optionally `flush`) methods.
callback  : function(float), e.g.: `tqdm.update`
callback_len  : If (default: True) do `callback(len(buffer))`.
  Otherwise, do `callback(data) for data in buffer.split(delim)`.

---
## stdout
```python
from cli import stdout
```



---
## cp
```python
from cli import cp
```

copy resource `name` to `dst`

---
## write
```python
from cli import write
```



---
## callback
```python
from cli import callback
```



---
## __name__
```python
from dask import __name__
```



---
## TqdmCallback
```python
from dask import TqdmCallback
```

Dask callback for task progress.

---
## __init__
```python
from dask import __init__
```



---
## _start_state
```python
from dask import _start_state
```



---
## _posttask
```python
from dask import _posttask
```



---
## _finish
```python
from dask import _finish
```



---
## display
```python
from dask import display
```

Displays in the current cell in Notebooks.

---
## envwrap
```python
from utils import envwrap
```

Override parameter defaults via `os.environ[prefix + param_name]`.
Maps UPPER_CASE env vars map to lower_case param names.
camelCase isn't supported (because Windows ignores case).

Precedence (highest first):

- call (`foo(a=3)`)
- environ (`FOO_A=2`)
- signature (`def foo(a=1)`)

Parameters
----------
prefix  : str
    Env var prefix, e.g. "FOO_"
types  : dict, optional
    Fallback mappings `{'param_name': type, ...}` if types cannot be
    inferred from function signature.
    Consider using `types=collections.defaultdict(lambda: ast.literal_eval)`.
is_method  : bool, optional
    Whether to use `functools.partialmethod`. If (default: False) use `functools.partial`.

Examples
--------
```
$ cat foo.py
from tqdm.utils import envwrap
@envwrap("FOO_")
def test(a=1, b=2, c=3):
    print(f"received: a={a}, b={b}, c={c}")

$ FOO_A=42 FOO_C=1337 python -c 'import foo; foo.test(c=99)'
received: a=42, b=2, c=99
```

---
## FormatReplace
```python
from utils import FormatReplace
```

>>> a = FormatReplace('something')
>>> f"{a:5d}"
'something'

---
## Comparable
```python
from utils import Comparable
```

Assumes child has self._comparable attr/@property

---
## ObjectWrapper
```python
from utils import ObjectWrapper
```



---
## SimpleTextIOWrapper
```python
from utils import SimpleTextIOWrapper
```

Change only `.write()` of the wrapped object by encoding the passed
value and passing the result to the wrapped object's `.write()` method.

---
## DisableOnWriteError
```python
from utils import DisableOnWriteError
```

Disable the given `tqdm_instance` upon `write()` or `flush()` errors.

---
## CallbackIOWrapper
```python
from utils import CallbackIOWrapper
```



---
## _is_utf
```python
from utils import _is_utf
```



---
## _supports_unicode
```python
from utils import _supports_unicode
```



---
## _is_ascii
```python
from utils import _is_ascii
```



---
## _screen_shape_wrapper
```python
from utils import _screen_shape_wrapper
```

Return a function which returns console dimensions (width, height).
Supported: linux, osx, windows, cygwin.

---
## _screen_shape_windows
```python
from utils import _screen_shape_windows
```



---
## _screen_shape_tput
```python
from utils import _screen_shape_tput
```

cygwin xterm (windows)

---
## _screen_shape_linux
```python
from utils import _screen_shape_linux
```



---
## _environ_cols_wrapper
```python
from utils import _environ_cols_wrapper
```

Return a function which returns console width.
Supported: linux, osx, windows, cygwin.

---
## _term_move_up
```python
from utils import _term_move_up
```



---
## _text_width
```python
from utils import _text_width
```



---
## disp_len
```python
from utils import disp_len
```

Returns the real on-screen length of a string which may contain
ANSI control codes and wide chars.

---
## disp_trim
```python
from utils import disp_trim
```

Trim a string which may contain ANSI control characters.

---
## wrap
```python
from utils import wrap
```



---
## __format__
```python
from utils import __format__
```



---
## __lt__
```python
from utils import __lt__
```



---
## __le__
```python
from utils import __le__
```



---
## __eq__
```python
from utils import __eq__
```



---
## __ne__
```python
from utils import __ne__
```



---
## __gt__
```python
from utils import __gt__
```



---
## __ge__
```python
from utils import __ge__
```



---
## __setattr__
```python
from utils import __setattr__
```



---
## wrapper_getattr
```python
from utils import wrapper_getattr
```

Actual `self.getattr` rather than self._wrapped.getattr

---
## wrapper_setattr
```python
from utils import wrapper_setattr
```

Actual `self.setattr` rather than self._wrapped.setattr

---
## write
```python
from utils import write
```



---
## disable_on_exception
```python
from utils import disable_on_exception
```

Quietly set `tqdm_instance.miniters=inf` if `func` raises `errno=5`.

---
## inner
```python
from utils import inner
```



---
## read
```python
from utils import read
```



---
## __name__
```python
from _tqdm import __name__
```



---
## __name__
```python
from _tqdm_pandas import __name__
```



---
## tqdm_pandas
```python
from _tqdm_pandas import tqdm_pandas
```

Registers the given `tqdm` instance with
`pandas.core.groupby.DataFrameGroupBy.progress_apply`.

---
## __name__
```python
from autonotebook import __name__
```

Automatically choose between `tqdm.notebook` and `tqdm.std`.

Usage:
>>> from tqdm.autonotebook import trange, tqdm
>>> for i in trange(10):
...     ...

---
## __name__
```python
from notebook import __name__
```

IPython/Jupyter Notebook progressbar decorator for iterators.
Includes a default `range` iterator printing to `stderr`.

Usage:
>>> from tqdm.notebook import trange, tqdm
>>> for i in trange(10):
...     ...

---
## TqdmHBox
```python
from notebook import TqdmHBox
```

`ipywidgets.HBox` with a pretty representation

---
## tqdm_notebook
```python
from notebook import tqdm_notebook
```

Experimental IPython/Jupyter Notebook widget using tqdm!

---
## tnrange
```python
from notebook import tnrange
```

Shortcut for `tqdm.notebook.tqdm(range(*args), **kwargs)`.

---
## _json_
```python
from notebook import _json_
```



---
## __repr__
```python
from notebook import __repr__
```



---
## _repr_pretty_
```python
from notebook import _repr_pretty_
```



---
## status_printer
```python
from notebook import status_printer
```

Manage the printing of an IPython/Jupyter Notebook progress bar widget.

---
## display
```python
from notebook import display
```



---
## colour
```python
from notebook import colour
```



---
## __init__
```python
from notebook import __init__
```

Supports the usual `tqdm.tqdm` parameters as well as those listed below.

Parameters
----------
display  : Whether to call `display(self.container)` immediately
    [default: True].

---
## __iter__
```python
from notebook import __iter__
```



---
## update
```python
from notebook import update
```



---
## close
```python
from notebook import close
```



---
## clear
```python
from notebook import clear
```



---
## reset
```python
from notebook import reset
```

Resets to 0 iterations for repeated use.

Consider combining with `leave=True`.

Parameters
----------
total  : int or float, optional. Total to use for the new bar.

---
## tqdm_gui
```python
from gui import tqdm_gui
```

Experimental Matplotlib GUI version of tqdm!

---
## tgrange
```python
from gui import tgrange
```

Shortcut for `tqdm.gui.tqdm(range(*args), **kwargs)`.

---
## close
```python
from gui import close
```



---
## display
```python
from gui import display
```



---
## __name__
```python
from auto import __name__
```



---
## trange
```python
from auto import trange
```

A shortcut for `tqdm.auto.tqdm(range(*args), **kwargs)`.

---
## tqdm
```python
from auto import tqdm
```



---
## __name__
```python
from backend import __name__
```



---
## KeyringBackendMeta
```python
from backend import KeyringBackendMeta
```

Specialized subclass behavior.

Keeps a registry of all (non-abstract) types.

Wraps set_password to validate the username.

---
## KeyringBackend
```python
from backend import KeyringBackend
```

The abstract base class of the keyring, every backend must implement
this interface.

---
## Crypter
```python
from backend import Crypter
```

Base class providing encryption and decryption

---
## NullCrypter
```python
from backend import NullCrypter
```

A crypter that does nothing

---
## _load_plugins
```python
from backend import _load_plugins
```

Locate all setuptools entry points by the name 'keyring backends'
and initialize them.
Any third-party library may register an entry point by adding the
following to their setup.cfg::

    [options.entry_points]
    keyring.backends =
        plugin_name = mylib.mymodule:initialize_func

`plugin_name` can be anything, and is only used to display the name
of the plugin at initialization time.

`initialize_func` is optional, but will be invoked if callable.

---
## get_all_keyring
```python
from backend import get_all_keyring
```

Return a list of all implemented keyrings that can be constructed without
parameters.

---
## SchemeSelectable
```python
from backend import SchemeSelectable
```

Allow a backend to select different "schemes" for the
username and service.

>>> backend = SchemeSelectable()
>>> backend._query('contoso', 'alice')
{'username': 'alice', 'service': 'contoso'}
>>> backend._query('contoso')
{'service': 'contoso'}
>>> backend.scheme = 'KeePassXC'
>>> backend._query('contoso', 'alice')
{'UserName': 'alice', 'Title': 'contoso'}
>>> backend._query('contoso', 'alice', foo='bar')
{'UserName': 'alice', 'Title': 'contoso', 'foo': 'bar'}

---
## __init__
```python
from backend import __init__
```



---
## _register
```python
from backend import _register
```



---
## _validate_username_in_set_password
```python
from backend import _validate_username_in_set_password
```

Wrap ``set_password`` such to validate the passed username.

---
## priority
```python
from backend import priority
```

Each backend class must supply a priority, a number (float or integer)
indicating the priority of the backend relative to all other backends.
The priority need not be static -- it may (and should) vary based
attributes of the environment in which is runs (platform, available
packages, etc.).

A higher number indicates a higher priority. The priority should raise
a RuntimeError with a message indicating the underlying cause if the
backend is not suitable for the current environment.

As a rule of thumb, a priority between zero but less than one is
suitable, but a priority of one or greater is recommended.

---
## viable
```python
from backend import viable
```



---
## get_viable_backends
```python
from backend import get_viable_backends
```

Return all subclasses deemed viable.

---
## name
```python
from backend import name
```

The keyring name, suitable for display.

The name is derived from module and class name.

---
## __str__
```python
from backend import __str__
```



---
## get_password
```python
from backend import get_password
```

Get password of the username for the service

---
## _validate_username
```python
from backend import _validate_username
```

Ensure the username is not empty.

---
## set_password
```python
from backend import set_password
```



---
## delete_password
```python
from backend import delete_password
```

Delete the password for the username of the service.

If the backend cannot delete passwords, raise
PasswordDeleteError.

---
## get_credential
```python
from backend import get_credential
```

Gets the username and password for the service.
Returns a Credential instance.

The *username* argument is optional and may be omitted by
the caller or ignored by the backend. Callers must use the
returned username.

---
## set_properties_from_env
```python
from backend import set_properties_from_env
```

For all KEYRING_PROPERTY_* env var, set that property.

---
## with_properties
```python
from backend import with_properties
```



---
## encrypt
```python
from backend import encrypt
```



---
## decrypt
```python
from backend import decrypt
```



---
## _query
```python
from backend import _query
```



---
## wrapper
```python
from backend import wrapper
```



---
## parse
```python
from backend import parse
```



---
## __name__
```python
from completion import __name__
```



---
## _MissingCompletionAction
```python
from completion import _MissingCompletionAction
```



---
## add_completion_notice
```python
from completion import add_completion_notice
```

Add completion argument to parser.

---
## get_action
```python
from completion import get_action
```



---
## install_completion
```python
from completion import install_completion
```



---
## install
```python
from completion import install
```



---
## __call__
```python
from completion import __call__
```



---
## __name__
```python
from credentials import __name__
```



---
## Credential
```python
from credentials import Credential
```

Abstract class to manage credentials

---
## SimpleCredential
```python
from credentials import SimpleCredential
```

Simple credentials implementation

---
## AnonymousCredential
```python
from credentials import AnonymousCredential
```



---
## EnvironCredential
```python
from credentials import EnvironCredential
```

Source credentials from environment variables.

Actual sourcing is deferred until requested.

Supports comparison by equality.

>>> e1 = EnvironCredential('a', 'b')
>>> e2 = EnvironCredential('a', 'b')
>>> e3 = EnvironCredential('a', 'c')
>>> e1 == e2
True
>>> e2 == e3
False

---
## username
```python
from credentials import username
```



---
## password
```python
from credentials import password
```



---
## _vars
```python
from credentials import _vars
```



---
## __init__
```python
from credentials import __init__
```



---
## __eq__
```python
from credentials import __eq__
```



---
## _get_env
```python
from credentials import _get_env
```

Helper to read an environment variable

---
## set_keyring
```python
from core import set_keyring
```

Set current keyring backend.

---
## get_keyring
```python
from core import get_keyring
```

Get current keyring backend.

---
## disable
```python
from core import disable
```

Configure the null keyring as the default.

>>> fs = getfixture('fs')
>>> disable()
>>> disable()
Traceback (most recent call last):
...
RuntimeError: Refusing to overwrite...

---
## get_password
```python
from core import get_password
```

Get password from the specified service.

---
## set_password
```python
from core import set_password
```

Set password for the user in the specified service.

---
## delete_password
```python
from core import delete_password
```

Delete the password for the user in the specified service.

---
## get_credential
```python
from core import get_credential
```

Get a Credential for the specified service.

---
## recommended
```python
from core import recommended
```



---
## init_backend
```python
from core import init_backend
```

Load a detected backend.

---
## _detect_backend
```python
from core import _detect_backend
```

Return a keyring specified in the config file or infer the best available.

Limit, if supplied, should be a callable taking a backend and returning
True if that backend should be included for consideration.

---
## _load_keyring_class
```python
from core import _load_keyring_class
```

Load the keyring class indicated by name.

These popular names are tested to ensure their presence.

>>> popular_names = [
...      'keyring.backends.Windows.WinVaultKeyring',
...      'keyring.backends.macOS.Keyring',
...      'keyring.backends.kwallet.DBusKeyring',
...      'keyring.backends.SecretService.Keyring',
...  ]
>>> list(map(_load_keyring_class, popular_names))
[...]

---
## load_keyring
```python
from core import load_keyring
```

Load the specified keyring by name (a fully-qualified name to the
keyring, such as 'keyring.backends.file.PlaintextKeyring')

---
## load_env
```python
from core import load_env
```

Load a keyring configured in the environment variable.

---
## _config_path
```python
from core import _config_path
```



---
## _ensure_path
```python
from core import _ensure_path
```



---
## load_config
```python
from core import load_config
```

Load a keyring using the config file in the config root.

---
## _load_keyring_path
```python
from core import _load_keyring_path
```

load the keyring-path option (if present)

---
## CommandLineTool
```python
from cli import CommandLineTool
```



---
## __init__
```python
from cli import __init__
```



---
## _check_args
```python
from cli import _check_args
```



---
## do_get
```python
from cli import do_get
```



---
## _emit_json
```python
from cli import _emit_json
```



---
## _emit_plain
```python
from cli import _emit_plain
```



---
## _get_creds
```python
from cli import _get_creds
```



---
## _get_password
```python
from cli import _get_password
```



---
## do_set
```python
from cli import do_set
```



---
## do_del
```python
from cli import do_del
```



---
## diagnose
```python
from cli import diagnose
```



---
## invalid_op
```python
from cli import invalid_op
```



---
## _load_spec_backend
```python
from cli import _load_spec_backend
```



---
## input_password
```python
from cli import input_password
```

Retrieve password from input.

---
## pass_from_pipe
```python
from cli import pass_from_pipe
```

Return password from pipe if not on TTY, else False.

---
## strip_last_newline
```python
from cli import strip_last_newline
```

Strip one last newline, if present.

>>> CommandLineTool.strip_last_newline('foo')
'foo'
>>> CommandLineTool.strip_last_newline('foo\n')
'foo'

---
## PasswordMgr
```python
from http import PasswordMgr
```



---
## get_username
```python
from http import get_username
```



---
## add_password
```python
from http import add_password
```



---
## find_user_password
```python
from http import find_user_password
```



---
## clear_password
```python
from http import clear_password
```



---
## KeyringError
```python
from errors import KeyringError
```

Base class for exceptions in keyring

---
## PasswordSetError
```python
from errors import PasswordSetError
```

Raised when the password can't be set.

---
## PasswordDeleteError
```python
from errors import PasswordDeleteError
```

Raised when the password can't be deleted.

---
## InitError
```python
from errors import InitError
```

Raised when the keyring could not be initialised

---
## KeyringLocked
```python
from errors import KeyringLocked
```

Raised when the keyring failed unlocking

---
## NoKeyringError
```python
from errors import NoKeyringError
```

Raised when there is no keyring backend

---
## ExceptionRaisedContext
```python
from errors import ExceptionRaisedContext
```

An exception-trapping context that indicates whether an exception was
raised.

---
## ExceptionInfo
```python
from errors import ExceptionInfo
```



---
## __enter__
```python
from errors import __enter__
```



---
## __exit__
```python
from errors import __exit__
```



---
## __bool__
```python
from errors import __bool__
```

Return True if an exception occurred

---
## __name__
```python
from devpi_client import __name__
```



---
## restore_signature
```python
from devpi_client import restore_signature
```



---
## devpiclient_get_password
```python
from devpi_client import devpiclient_get_password
```

>>> pluggy._hooks.varnames(devpiclient_get_password)
(('url', 'username'), ())
>>>

---
## wrapper
```python
from devpi_client import wrapper
```



---
## __name__
```python
from erasetype import __name__
```



---
## erase_type
```python
from erasetype import erase_type
```

Erase any type variables from a type.

Also replace tuple types with the corresponding concrete types.

Examples:
  A -> A
  B[X] -> B[Any]
  Tuple[A, B] -> tuple
  Callable[[A1, A2, ...], R] -> Callable[..., Any]
  Type[X] -> Type[Any]

---
## EraseTypeVisitor
```python
from erasetype import EraseTypeVisitor
```



---
## erase_typevars
```python
from erasetype import erase_typevars
```

Replace all type variables in a type with any,
or just the ones in the provided collection.

---
## replace_meta_vars
```python
from erasetype import replace_meta_vars
```

Replace unification variables in a type with the target type.

---
## TypeVarEraser
```python
from erasetype import TypeVarEraser
```

Implementation of type erasure

---
## remove_instance_last_known_values
```python
from erasetype import remove_instance_last_known_values
```



---
## LastKnownValueEraser
```python
from erasetype import LastKnownValueEraser
```

Removes the Literal[...] type that may be associated with any
Instance types.

---
## visit_unbound_type
```python
from erasetype import visit_unbound_type
```



---
## visit_any
```python
from erasetype import visit_any
```



---
## visit_none_type
```python
from erasetype import visit_none_type
```



---
## visit_uninhabited_type
```python
from erasetype import visit_uninhabited_type
```



---
## visit_erased_type
```python
from erasetype import visit_erased_type
```



---
## visit_partial_type
```python
from erasetype import visit_partial_type
```



---
## visit_deleted_type
```python
from erasetype import visit_deleted_type
```



---
## visit_instance
```python
from erasetype import visit_instance
```



---
## visit_type_var
```python
from erasetype import visit_type_var
```



---
## visit_param_spec
```python
from erasetype import visit_param_spec
```



---
## visit_parameters
```python
from erasetype import visit_parameters
```



---
## visit_type_var_tuple
```python
from erasetype import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from erasetype import visit_unpack_type
```



---
## visit_callable_type
```python
from erasetype import visit_callable_type
```



---
## visit_overloaded
```python
from erasetype import visit_overloaded
```



---
## visit_tuple_type
```python
from erasetype import visit_tuple_type
```



---
## visit_typeddict_type
```python
from erasetype import visit_typeddict_type
```



---
## visit_literal_type
```python
from erasetype import visit_literal_type
```



---
## visit_union_type
```python
from erasetype import visit_union_type
```



---
## visit_type_type
```python
from erasetype import visit_type_type
```



---
## visit_type_alias_type
```python
from erasetype import visit_type_alias_type
```



---
## erase_id
```python
from erasetype import erase_id
```



---
## __init__
```python
from erasetype import __init__
```



---
## __name__
```python
from fastparse import __name__
```



---
## ast3_parse
```python
from fastparse import ast3_parse
```



---
## parse
```python
from fastparse import parse
```

Parse a source file, without doing any semantic analysis.

Return the parse tree. If errors is not provided, raise ParseError
on failure. Otherwise, use the errors object to report parse errors.

---
## parse_type_ignore_tag
```python
from fastparse import parse_type_ignore_tag
```

Parse optional "[code, ...]" tag after "# type: ignore".

Return:
 * [] if no tag was found (ignore all errors)
 * list of ignored error codes if a tag was found
 * None if the tag was invalid.

---
## parse_type_comment
```python
from fastparse import parse_type_comment
```

Parse type portion of a type comment (+ optional type ignore).

Return (ignore info, parsed type).

---
## parse_type_string
```python
from fastparse import parse_type_string
```

Parses a type that was originally present inside of an explicit string.

For example, suppose we have the type `Foo["blah"]`. We should parse the
string expression "blah" using this function.

---
## is_no_type_check_decorator
```python
from fastparse import is_no_type_check_decorator
```



---
## ASTConverter
```python
from fastparse import ASTConverter
```



---
## TypeConverter
```python
from fastparse import TypeConverter
```



---
## stringify_name
```python
from fastparse import stringify_name
```



---
## FindAttributeAssign
```python
from fastparse import FindAttributeAssign
```

Check if an AST contains attribute assignments (e.g. self.x = 0).

---
## FindYield
```python
from fastparse import FindYield
```

Check if an AST contains yields or yield froms.

---
## is_possible_trivial_body
```python
from fastparse import is_possible_trivial_body
```

Could the statements form a "trivial" function body, such as 'pass'?

This mimics mypy.semanal.is_trivial_body, but this runs before
semantic analysis so some checks must be conservative.

---
## __init__
```python
from fastparse import __init__
```



---
## note
```python
from fastparse import note
```



---
## fail
```python
from fastparse import fail
```



---
## fail_merge_overload
```python
from fastparse import fail_merge_overload
```



---
## visit
```python
from fastparse import visit
```

Modified visit -- keep track of the stack of nodes

---
## set_line
```python
from fastparse import set_line
```



---
## translate_opt_expr_list
```python
from fastparse import translate_opt_expr_list
```



---
## translate_expr_list
```python
from fastparse import translate_expr_list
```



---
## get_lineno
```python
from fastparse import get_lineno
```



---
## translate_stmt_list
```python
from fastparse import translate_stmt_list
```



---
## translate_type_comment
```python
from fastparse import translate_type_comment
```



---
## from_operator
```python
from fastparse import from_operator
```



---
## from_comp_operator
```python
from fastparse import from_comp_operator
```



---
## set_block_lines
```python
from fastparse import set_block_lines
```



---
## as_block
```python
from fastparse import as_block
```



---
## as_required_block
```python
from fastparse import as_required_block
```



---
## fix_function_overloads
```python
from fastparse import fix_function_overloads
```



---
## _check_ifstmt_for_overloads
```python
from fastparse import _check_ifstmt_for_overloads
```

Check if IfStmt contains only overloads with the same name.
Return overload_name if found, None otherwise.

---
## _get_executable_if_block_with_overloads
```python
from fastparse import _get_executable_if_block_with_overloads
```

Return block from IfStmt that will get executed.

Return
    0 -> A block if sure that alternative blocks are unreachable.
    1 -> An IfStmt if the reachability of it can't be inferred,
         i.e. the truth value is unknown.

---
## _strip_contents_from_if_stmt
```python
from fastparse import _strip_contents_from_if_stmt
```

Remove contents from IfStmt.

Needed to still be able to check the conditions after the contents
have been merged with the surrounding function overloads.

---
## _is_stripped_if_stmt
```python
from fastparse import _is_stripped_if_stmt
```

Check stmt to make sure it is a stripped IfStmt.

See also: _strip_contents_from_if_stmt

---
## translate_module_id
```python
from fastparse import translate_module_id
```

Return the actual, internal module id for a source text id.

---
## visit_Module
```python
from fastparse import visit_Module
```



---
## visit_FunctionDef
```python
from fastparse import visit_FunctionDef
```



---
## visit_AsyncFunctionDef
```python
from fastparse import visit_AsyncFunctionDef
```



---
## do_func_def
```python
from fastparse import do_func_def
```

Helper shared between visit_FunctionDef and visit_AsyncFunctionDef.

---
## set_type_optional
```python
from fastparse import set_type_optional
```



---
## transform_args
```python
from fastparse import transform_args
```



---
## make_argument
```python
from fastparse import make_argument
```



---
## fail_arg
```python
from fastparse import fail_arg
```



---
## visit_ClassDef
```python
from fastparse import visit_ClassDef
```



---
## translate_type_params
```python
from fastparse import translate_type_params
```



---
## visit_Return
```python
from fastparse import visit_Return
```



---
## visit_Delete
```python
from fastparse import visit_Delete
```



---
## visit_Assign
```python
from fastparse import visit_Assign
```



---
## visit_AnnAssign
```python
from fastparse import visit_AnnAssign
```



---
## visit_AugAssign
```python
from fastparse import visit_AugAssign
```



---
## visit_For
```python
from fastparse import visit_For
```



---
## visit_AsyncFor
```python
from fastparse import visit_AsyncFor
```



---
## visit_While
```python
from fastparse import visit_While
```



---
## visit_If
```python
from fastparse import visit_If
```



---
## visit_With
```python
from fastparse import visit_With
```



---
## visit_AsyncWith
```python
from fastparse import visit_AsyncWith
```



---
## visit_Raise
```python
from fastparse import visit_Raise
```



---
## visit_Try
```python
from fastparse import visit_Try
```



---
## visit_TryStar
```python
from fastparse import visit_TryStar
```



---
## visit_Assert
```python
from fastparse import visit_Assert
```



---
## visit_Import
```python
from fastparse import visit_Import
```



---
## visit_ImportFrom
```python
from fastparse import visit_ImportFrom
```



---
## visit_Global
```python
from fastparse import visit_Global
```



---
## visit_Nonlocal
```python
from fastparse import visit_Nonlocal
```



---
## visit_Expr
```python
from fastparse import visit_Expr
```



---
## visit_Pass
```python
from fastparse import visit_Pass
```



---
## visit_Break
```python
from fastparse import visit_Break
```



---
## visit_Continue
```python
from fastparse import visit_Continue
```



---
## visit_NamedExpr
```python
from fastparse import visit_NamedExpr
```



---
## visit_BoolOp
```python
from fastparse import visit_BoolOp
```



---
## group
```python
from fastparse import group
```



---
## visit_BinOp
```python
from fastparse import visit_BinOp
```



---
## visit_UnaryOp
```python
from fastparse import visit_UnaryOp
```



---
## visit_Lambda
```python
from fastparse import visit_Lambda
```



---
## visit_IfExp
```python
from fastparse import visit_IfExp
```



---
## visit_Dict
```python
from fastparse import visit_Dict
```



---
## visit_Set
```python
from fastparse import visit_Set
```



---
## visit_ListComp
```python
from fastparse import visit_ListComp
```



---
## visit_SetComp
```python
from fastparse import visit_SetComp
```



---
## visit_DictComp
```python
from fastparse import visit_DictComp
```



---
## visit_GeneratorExp
```python
from fastparse import visit_GeneratorExp
```



---
## visit_Await
```python
from fastparse import visit_Await
```



---
## visit_Yield
```python
from fastparse import visit_Yield
```



---
## visit_YieldFrom
```python
from fastparse import visit_YieldFrom
```



---
## visit_Compare
```python
from fastparse import visit_Compare
```



---
## visit_Call
```python
from fastparse import visit_Call
```



---
## visit_Constant
```python
from fastparse import visit_Constant
```



---
## visit_JoinedStr
```python
from fastparse import visit_JoinedStr
```



---
## visit_FormattedValue
```python
from fastparse import visit_FormattedValue
```



---
## visit_Attribute
```python
from fastparse import visit_Attribute
```



---
## visit_Subscript
```python
from fastparse import visit_Subscript
```



---
## visit_Starred
```python
from fastparse import visit_Starred
```



---
## visit_Name
```python
from fastparse import visit_Name
```



---
## visit_List
```python
from fastparse import visit_List
```



---
## visit_Tuple
```python
from fastparse import visit_Tuple
```



---
## visit_Slice
```python
from fastparse import visit_Slice
```



---
## visit_ExtSlice
```python
from fastparse import visit_ExtSlice
```



---
## visit_Index
```python
from fastparse import visit_Index
```



---
## visit_Match
```python
from fastparse import visit_Match
```



---
## visit_MatchValue
```python
from fastparse import visit_MatchValue
```



---
## visit_MatchSingleton
```python
from fastparse import visit_MatchSingleton
```



---
## visit_MatchSequence
```python
from fastparse import visit_MatchSequence
```



---
## visit_MatchStar
```python
from fastparse import visit_MatchStar
```



---
## visit_MatchMapping
```python
from fastparse import visit_MatchMapping
```



---
## visit_MatchClass
```python
from fastparse import visit_MatchClass
```



---
## visit_MatchAs
```python
from fastparse import visit_MatchAs
```



---
## visit_MatchOr
```python
from fastparse import visit_MatchOr
```



---
## visit_TypeAlias
```python
from fastparse import visit_TypeAlias
```



---
## convert_column
```python
from fastparse import convert_column
```

Apply column override if defined; otherwise return column.

Column numbers are sometimes incorrect in the AST and the column
override can be used to work around that.

---
## invalid_type
```python
from fastparse import invalid_type
```

Constructs a type representing some expression that normally forms an invalid type.
For example, if we see a type hint that says "3 + 4", we would transform that
expression into a RawExpressionType.

The semantic analysis layer will report an "Invalid type" error when it
encounters this type, along with the given note if one is provided.

See RawExpressionType's docstring for more details on how it's used.

---
## parent
```python
from fastparse import parent
```

Return the AST node above the one we are processing

---
## translate_argument_list
```python
from fastparse import translate_argument_list
```



---
## _extract_argument_name
```python
from fastparse import _extract_argument_name
```



---
## numeric_type
```python
from fastparse import numeric_type
```



---
## visit_assignment_stmt
```python
from fastparse import visit_assignment_stmt
```



---
## visit_with_stmt
```python
from fastparse import visit_with_stmt
```



---
## visit_for_stmt
```python
from fastparse import visit_for_stmt
```



---
## visit_expression_stmt
```python
from fastparse import visit_expression_stmt
```



---
## visit_call_expr
```python
from fastparse import visit_call_expr
```



---
## visit_index_expr
```python
from fastparse import visit_index_expr
```



---
## visit_member_expr
```python
from fastparse import visit_member_expr
```



---
## visit_yield_expr
```python
from fastparse import visit_yield_expr
```



---
## visit_yield_from_expr
```python
from fastparse import visit_yield_from_expr
```



---
## __name__
```python
from evalexpr import __name__
```

Evaluate an expression.

Used by stubtest; in a separate file because things break if we don't
put it in a mypyc-compiled file.

---
## _NodeEvaluator
```python
from evalexpr import _NodeEvaluator
```



---
## evaluate_expression
```python
from evalexpr import evaluate_expression
```

Evaluate an expression at runtime.

Return the result of the expression, or UNKNOWN if the expression cannot be
evaluated.

---
## visit_int_expr
```python
from evalexpr import visit_int_expr
```



---
## visit_str_expr
```python
from evalexpr import visit_str_expr
```



---
## visit_bytes_expr
```python
from evalexpr import visit_bytes_expr
```



---
## visit_float_expr
```python
from evalexpr import visit_float_expr
```



---
## visit_complex_expr
```python
from evalexpr import visit_complex_expr
```



---
## visit_ellipsis
```python
from evalexpr import visit_ellipsis
```



---
## visit_star_expr
```python
from evalexpr import visit_star_expr
```



---
## visit_name_expr
```python
from evalexpr import visit_name_expr
```



---
## visit_member_expr
```python
from evalexpr import visit_member_expr
```



---
## visit_yield_from_expr
```python
from evalexpr import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from evalexpr import visit_yield_expr
```



---
## visit_call_expr
```python
from evalexpr import visit_call_expr
```



---
## visit_op_expr
```python
from evalexpr import visit_op_expr
```



---
## visit_comparison_expr
```python
from evalexpr import visit_comparison_expr
```



---
## visit_cast_expr
```python
from evalexpr import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from evalexpr import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from evalexpr import visit_reveal_expr
```



---
## visit_super_expr
```python
from evalexpr import visit_super_expr
```



---
## visit_unary_expr
```python
from evalexpr import visit_unary_expr
```



---
## visit_assignment_expr
```python
from evalexpr import visit_assignment_expr
```



---
## visit_list_expr
```python
from evalexpr import visit_list_expr
```



---
## visit_dict_expr
```python
from evalexpr import visit_dict_expr
```



---
## visit_tuple_expr
```python
from evalexpr import visit_tuple_expr
```



---
## visit_set_expr
```python
from evalexpr import visit_set_expr
```



---
## visit_index_expr
```python
from evalexpr import visit_index_expr
```



---
## visit_type_application
```python
from evalexpr import visit_type_application
```



---
## visit_lambda_expr
```python
from evalexpr import visit_lambda_expr
```



---
## visit_list_comprehension
```python
from evalexpr import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from evalexpr import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from evalexpr import visit_dictionary_comprehension
```



---
## visit_generator_expr
```python
from evalexpr import visit_generator_expr
```



---
## visit_slice_expr
```python
from evalexpr import visit_slice_expr
```



---
## visit_conditional_expr
```python
from evalexpr import visit_conditional_expr
```



---
## visit_type_var_expr
```python
from evalexpr import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from evalexpr import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from evalexpr import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from evalexpr import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from evalexpr import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from evalexpr import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from evalexpr import visit_typeddict_expr
```



---
## visit_newtype_expr
```python
from evalexpr import visit_newtype_expr
```



---
## visit__promote_expr
```python
from evalexpr import visit__promote_expr
```



---
## visit_await_expr
```python
from evalexpr import visit_await_expr
```



---
## visit_temp_node
```python
from evalexpr import visit_temp_node
```



---
## BuildResult
```python
from build import BuildResult
```

The result of a successful build.

Attributes:
  manager: The build manager.
  files:   Dictionary from module name to related AST node.
  types:   Dictionary from parse tree node to its inferred type.
  used_cache: Whether the build took advantage of a pre-existing cache
  errors:  List of error messages.

---
## build
```python
from build import build
```

Perform a full site build.

---
## _build
```python
from build import _build
```



---
## default_data_dir
```python
from build import default_data_dir
```

Returns directory containing typeshed directory.

---
## normpath
```python
from build import normpath
```

Convert path to absolute; but to relative in bazel mode.

(Bazel's distributed cache doesn't like filesystem metadata to
end up in output files.)

---
## CacheMeta
```python
from build import CacheMeta
```



---
## FgDepMeta
```python
from build import FgDepMeta
```



---
## cache_meta_from_dict
```python
from build import cache_meta_from_dict
```

Build a CacheMeta object from a json metadata dictionary

Args:
  meta: JSON metadata read from the metadata cache file
  data_json: Path to the .data.json file containing the AST trees

---
## import_priority
```python
from build import import_priority
```

Compute import priority from an import node.

---
## load_plugins_from_config
```python
from build import load_plugins_from_config
```

Load all configured plugins.

Return a list of all the loaded plugins from the config file.
The second return value is a snapshot of versions/hashes of loaded user
plugins (for cache validation).

---
## load_plugins
```python
from build import load_plugins
```

Load all configured plugins.

Return a plugin that encapsulates all plugins chained together. Always
at least include the default plugin (it's last in the chain).
The second return value is a snapshot of versions/hashes of loaded user
plugins (for cache validation).

---
## take_module_snapshot
```python
from build import take_module_snapshot
```

Take plugin module snapshot by recording its version and hash.

We record _both_ hash and the version to detect more possible changes
(e.g. if there is a change in modules imported by a plugin).

---
## find_config_file_line_number
```python
from build import find_config_file_line_number
```

Return the approximate location of setting_name within mypy config file.

Return -1 if can't determine the line unambiguously.

---
## BuildManager
```python
from build import BuildManager
```

This class holds shared state for building a mypy program.

It is used to coordinate parsing, import processing, semantic
analysis and type checking.  The actual build steps are carried
out by dispatch().

Attributes:
  data_dir:        Mypy data directory (contains stubs)
  search_paths:    SearchPaths instance indicating where to look for modules
  modules:         Mapping of module ID to MypyFile (shared by the passes)
  semantic_analyzer:
                   Semantic analyzer, pass 2
  all_types:       Map {Expression: Type} from all modules (enabled by export_types)
  options:         Build options
  missing_modules: Set of modules that could not be imported encountered so far
  stale_modules:   Set of modules that needed to be rechecked (only used by tests)
  fg_deps_meta:    Metadata for fine-grained dependencies caches associated with modules
  fg_deps:         A fine-grained dependency map
  version_id:      The current mypy version (based on commit id when possible)
  plugin:          Active mypy plugin(s)
  plugins_snapshot:
                   Snapshot of currently active user plugins (versions and hashes)
  old_plugins_snapshot:
                   Plugins snapshot from previous incremental run (or None in
                   non-incremental mode and if cache was not found)
  errors:          Used for reporting all errors
  flush_errors:    A function for processing errors after each SCC
  cache_enabled:   Whether cache is being read. This is set based on options,
                   but is disabled if fine-grained cache loading fails
                   and after an initial fine-grained load. This doesn't
                   determine whether we write cache files or not.
  quickstart_state:
                   A cache of filename -> mtime/size/hash info used to avoid
                   needing to hash source files when using a cache with mismatching mtimes
  stats:           Dict with various instrumentation numbers, it is used
                   not only for debugging, but also required for correctness,
                   in particular to check consistency of the fine-grained dependency cache.
  fscache:         A file system cacher
  ast_cache:       AST cache to speed up mypy daemon

---
## deps_to_json
```python
from build import deps_to_json
```



---
## write_deps_cache
```python
from build import write_deps_cache
```

Write cache files for fine-grained dependencies.

Serialize fine-grained dependencies map for fine grained mode.

Dependencies on some module 'm' is stored in the dependency cache
file m.deps.json.  This entails some spooky action at a distance:
if module 'n' depends on 'm', that produces entries in m.deps.json.
When there is a dependency on a module that does not exist in the
build, it is stored with its first existing parent module. If no
such module exists, it is stored with the fake module FAKE_ROOT_MODULE.

This means that the validity of the fine-grained dependency caches
are a global property, so we store validity checking information for
fine-grained dependencies in a global cache file:
 * We take a snapshot of current sources to later check consistency
   between the fine-grained dependency cache and module cache metadata
 * We store the mtime of all of the dependency files to verify they
   haven't changed

---
## invert_deps
```python
from build import invert_deps
```

Splits fine-grained dependencies based on the module of the trigger.

Returns a dictionary from module ids to all dependencies on that
module. Dependencies not associated with a module in the build will be
associated with the nearest parent module that is in the build, or the
fake module FAKE_ROOT_MODULE if none are.

---
## generate_deps_for_cache
```python
from build import generate_deps_for_cache
```

Generate fine-grained dependencies into a form suitable for serializing.

This does a couple things:
1. Splits fine-grained deps based on the module of the trigger
2. For each module we generated fine-grained deps for, load any previous
   deps and merge them in.

Returns a dictionary from module ids to all dependencies on that
module. Dependencies not associated with a module in the build will be
associated with the nearest parent module that is in the build, or the
fake module FAKE_ROOT_MODULE if none are.

---
## write_plugins_snapshot
```python
from build import write_plugins_snapshot
```

Write snapshot of versions and hashes of currently active plugins.

---
## read_plugins_snapshot
```python
from build import read_plugins_snapshot
```

Read cached snapshot of versions and hashes of plugins from previous run.

---
## read_quickstart_file
```python
from build import read_quickstart_file
```



---
## read_deps_cache
```python
from build import read_deps_cache
```

Read and validate the fine-grained dependencies cache.

See the write_deps_cache documentation for more information on
the details of the cache.

Returns None if the cache was invalid in some way.

---
## _load_json_file
```python
from build import _load_json_file
```

A simple helper to read a JSON file with logging.

---
## _cache_dir_prefix
```python
from build import _cache_dir_prefix
```

Get current cache directory (or file if id is given).

---
## add_catch_all_gitignore
```python
from build import add_catch_all_gitignore
```

Add catch-all .gitignore to an existing directory.

No-op if the .gitignore already exists.

---
## exclude_from_backups
```python
from build import exclude_from_backups
```

Exclude the directory from various archives and backups supporting CACHEDIR.TAG.

If the CACHEDIR.TAG file exists the function is a no-op.

---
## create_metastore
```python
from build import create_metastore
```

Create the appropriate metadata store.

---
## get_cache_names
```python
from build import get_cache_names
```

Return the file names for the cache files.

Args:
  id: module ID
  path: module path
  cache_dir: cache directory
  pyversion: Python version (major, minor)

Returns:
  A tuple with the file names to be used for the meta JSON, the
  data JSON, and the fine-grained deps JSON, respectively.

---
## find_cache_meta
```python
from build import find_cache_meta
```

Find cache data for a module.

Args:
  id: module ID
  path: module path
  manager: the build manager (for pyversion, log/trace, and build options)

Returns:
  A CacheMeta instance if the cache data was found and appears
  valid; otherwise None.

---
## validate_meta
```python
from build import validate_meta
```

Checks whether the cached AST of this module can be used.

Returns:
  None, if the cached AST is unusable.
  Original meta, if mtime/size matched.
  Meta with mtime updated to match source file, if hash/size matched but mtime/path didn't.

---
## compute_hash
```python
from build import compute_hash
```



---
## json_dumps
```python
from build import json_dumps
```



---
## write_cache
```python
from build import write_cache
```



---
## delete_cache
```python
from build import delete_cache
```

Delete cache files for a module.

The cache files for a module are deleted when mypy finds errors there.
This avoids inconsistent states with cache files from different mypy runs,
see #4043 for an example.

---
## ModuleNotFound
```python
from build import ModuleNotFound
```

Control flow exception to signal that a module was not found.

---
## State
```python
from build import State
```

The state for a module.

The source is only used for the -c command line option; in that
case path is None.  Otherwise source is None and path isn't.

---
## find_module_and_diagnose
```python
from build import find_module_and_diagnose
```

Find a module by name, respecting follow_imports and producing diagnostics.

If the module is not found, then the ModuleNotFound exception is raised.

Args:
  id: module to find
  options: the options for the module being loaded
  caller_state: the state of the importing module, if applicable
  caller_line: the line number of the import
  ancestor_for: the child module this is an ancestor of, if applicable
  root_source: whether this source was specified on the command line
  skip_diagnose: skip any error diagnosis and reporting (but ModuleNotFound is
      still raised if the module is missing)

The specified value of follow_imports for a module can be overridden
if the module is specified on the command line or if it is a stub,
so we compute and return the "effective" follow_imports of the module.

Returns a tuple containing (file path, target's effective follow_imports setting)

---
## exist_added_packages
```python
from build import exist_added_packages
```

Find if there are any newly added packages that were previously suppressed.

Exclude everything not in build for follow-imports=skip.

---
## find_module_simple
```python
from build import find_module_simple
```

Find a filesystem path for module `id` or `None` if not found.

---
## find_module_with_reason
```python
from build import find_module_with_reason
```

Find a filesystem path for module `id` or the reason it can't be found.

---
## in_partial_package
```python
from build import in_partial_package
```

Check if a missing module can potentially be a part of a package.

This checks if there is any existing parent __init__.pyi stub that
defines a module-level __getattr__ (a.k.a. partial stub package).

---
## module_not_found
```python
from build import module_not_found
```



---
## skipping_module
```python
from build import skipping_module
```

Produce an error for an import ignored due to --follow_imports=error

---
## skipping_ancestor
```python
from build import skipping_ancestor
```

Produce an error for an ancestor ignored due to --follow_imports=error

---
## log_configuration
```python
from build import log_configuration
```

Output useful configuration information to LOG and TRACE

---
## dispatch
```python
from build import dispatch
```



---
## NodeInfo
```python
from build import NodeInfo
```

Some info about a node in the graph of SCCs.

---
## dump_timing_stats
```python
from build import dump_timing_stats
```

Dump timing stats for each file in the given graph.

---
## dump_line_checking_stats
```python
from build import dump_line_checking_stats
```

Dump per-line expression type checking stats.

---
## dump_graph
```python
from build import dump_graph
```

Dump the graph as a JSON string to stdout.

This copies some of the work by process_graph()
(sorted_components() and order_ascc()).

---
## load_graph
```python
from build import load_graph
```

Given some source files, load the full dependency graph.

If an old_graph is passed in, it is used as the starting point and
modified during graph loading.

If a new_modules is passed in, any modules that are loaded are
added to the list. This is an argument and not a return value
so that the caller can access it even if load_graph fails.

As this may need to parse files, this can raise CompileError in case
there are syntax errors.

---
## process_graph
```python
from build import process_graph
```

Process everything in dependency order.

---
## order_ascc
```python
from build import order_ascc
```

Come up with the ideal processing order within an SCC.

Using the priorities assigned by all_imported_modules_in_file(),
try to reduce the cycle to a DAG, by omitting arcs representing
dependencies of lower priority.

In the simplest case, if we have A <--> B where A has a top-level
"import B" (medium priority) but B only has the reverse "import A"
inside a function (low priority), we turn the cycle into a DAG by
dropping the B --> A arc, which leaves only A --> B.

If all arcs have the same priority, we fall back to sorting by
reverse global order (the order in which modules were first
encountered).

The algorithm is recursive, as follows: when as arcs of different
priorities are present, drop all arcs of the lowest priority,
identify SCCs in the resulting graph, and apply the algorithm to
each SCC thus found.  The recursion is bounded because at each
recursion the spread in priorities is (at least) one less.

In practice there are only a few priority levels (less than a
dozen) and in the worst case we just carry out the same algorithm
for finding SCCs N times.  Thus the complexity is no worse than
the complexity of the original SCC-finding algorithm -- see
strongly_connected_components() below for a reference.

---
## process_fresh_modules
```python
from build import process_fresh_modules
```

Process the modules in one group of modules from their cached data.

This can be used to process an SCC of modules
This involves loading the tree from JSON and then doing various cleanups.

---
## process_stale_scc
```python
from build import process_stale_scc
```

Process the modules in one SCC from source code.

Exception: If quick_and_dirty is set, use the cache for fresh modules.

---
## sorted_components
```python
from build import sorted_components
```

Return the graph's SCCs, topologically sorted by dependencies.

The sort order is from leaves (nodes without dependencies) to
roots (nodes on which no other nodes depend).

This works for a subset of the full dependency graph too;
dependencies that aren't present in graph.keys() are ignored.

---
## deps_filtered
```python
from build import deps_filtered
```

Filter dependencies for id with pri < pri_max.

---
## missing_stubs_file
```python
from build import missing_stubs_file
```



---
## record_missing_stub_packages
```python
from build import record_missing_stub_packages
```

Write a file containing missing stub packages.

This allows a subsequent "mypy --install-types" run (without other arguments)
to install missing stub packages.

---
## is_silent_import_module
```python
from build import is_silent_import_module
```



---
## write_undocumented_ref_info
```python
from build import write_undocumented_ref_info
```



---
## __init__
```python
from build import __init__
```



---
## default_flush_errors
```python
from build import default_flush_errors
```



---
## plugin_error
```python
from build import plugin_error
```



---
## dump_stats
```python
from build import dump_stats
```



---
## use_fine_grained_cache
```python
from build import use_fine_grained_cache
```



---
## maybe_swap_for_shadow_path
```python
from build import maybe_swap_for_shadow_path
```



---
## get_stat
```python
from build import get_stat
```



---
## getmtime
```python
from build import getmtime
```

Return a file's mtime; but 0 in bazel mode.

(Bazel's distributed cache doesn't like filesystem metadata to
end up in output files.)

---
## all_imported_modules_in_file
```python
from build import all_imported_modules_in_file
```

Find all reachable import statements in a file.

Return list of tuples (priority, module id, import line number)
for all modules imported in file; lower numbers == higher priority.

Can generate blocking errors on bogus relative imports.

---
## is_module
```python
from build import is_module
```

Is there a file in the file system corresponding to module id?

---
## parse_file
```python
from build import parse_file
```

Parse file and run first pass of semantic analysis.

Everything done here is local to the file. Don't depend on imported
modules in any way. Also record module dependencies based on imports.

---
## load_fine_grained_deps
```python
from build import load_fine_grained_deps
```



---
## report_file
```python
from build import report_file
```



---
## verbosity
```python
from build import verbosity
```



---
## log
```python
from build import log
```



---
## log_fine_grained
```python
from build import log_fine_grained
```



---
## trace
```python
from build import trace
```



---
## add_stats
```python
from build import add_stats
```



---
## stats_summary
```python
from build import stats_summary
```



---
## xmeta
```python
from build import xmeta
```



---
## add_ancestors
```python
from build import add_ancestors
```



---
## is_fresh
```python
from build import is_fresh
```

Return whether the cache data for this file is fresh.

---
## is_interface_fresh
```python
from build import is_interface_fresh
```



---
## mark_as_rechecked
```python
from build import mark_as_rechecked
```

Marks this module as having been fully re-analyzed by the type-checker.

---
## mark_interface_stale
```python
from build import mark_interface_stale
```

Marks this module as having a stale public interface, and discards the cache data.

---
## check_blockers
```python
from build import check_blockers
```

Raise CompileError if a blocking error is detected.

---
## wrap_context
```python
from build import wrap_context
```

Temporarily change the error import context to match this state.

Also report an internal error if an unexpected exception was raised
and raise an exception on a blocking error, unless
check_blockers is False. Skipping blocking error reporting is used
in the semantic analyzer so that we can report all blocking errors
for a file (across multiple targets) to maintain backward
compatibility.

---
## load_tree
```python
from build import load_tree
```



---
## fix_cross_refs
```python
from build import fix_cross_refs
```



---
## parse_inline_configuration
```python
from build import parse_inline_configuration
```

Check for inline mypy: options directive and parse them.

---
## semantic_analysis_pass1
```python
from build import semantic_analysis_pass1
```

Perform pass 1 of semantic analysis, which happens immediately after parsing.

This pass can't assume that any other modules have been processed yet.

---
## add_dependency
```python
from build import add_dependency
```



---
## suppress_dependency
```python
from build import suppress_dependency
```



---
## compute_dependencies
```python
from build import compute_dependencies
```

Compute a module's dependencies after parsing it.

This is used when we parse a file that we didn't have
up-to-date cache information for. When we have an up-to-date
cache, we just use the cached info.

---
## type_check_first_pass
```python
from build import type_check_first_pass
```



---
## type_checker
```python
from build import type_checker
```



---
## type_map
```python
from build import type_map
```



---
## type_check_second_pass
```python
from build import type_check_second_pass
```



---
## detect_possibly_undefined_vars
```python
from build import detect_possibly_undefined_vars
```



---
## finish_passes
```python
from build import finish_passes
```



---
## free_state
```python
from build import free_state
```



---
## _patch_indirect_dependencies
```python
from build import _patch_indirect_dependencies
```



---
## compute_fine_grained_deps
```python
from build import compute_fine_grained_deps
```



---
## update_fine_grained_deps
```python
from build import update_fine_grained_deps
```



---
## valid_references
```python
from build import valid_references
```



---
## verify_dependencies
```python
from build import verify_dependencies
```

Report errors for import targets in modules that don't exist.

If suppressed_only is set, only check suppressed dependencies.

---
## dependency_priorities
```python
from build import dependency_priorities
```



---
## dependency_lines
```python
from build import dependency_lines
```



---
## generate_unused_ignore_notes
```python
from build import generate_unused_ignore_notes
```



---
## generate_ignore_without_code_notes
```python
from build import generate_ignore_without_code_notes
```



---
## dumps
```python
from build import dumps
```

Convert to JSON string.

---
## correct_rel_imp
```python
from build import correct_rel_imp
```

Function to correct for relative imports.

---
## BuildType
```python
from options import BuildType
```



---
## Options
```python
from options import Options
```



---
## use_lowercase_names
```python
from options import use_lowercase_names
```



---
## use_or_syntax
```python
from options import use_or_syntax
```



---
## use_star_unpack
```python
from options import use_star_unpack
```



---
## new_semantic_analyzer
```python
from options import new_semantic_analyzer
```



---
## snapshot
```python
from options import snapshot
```

Produce a comparable snapshot of this Option

---
## __repr__
```python
from options import __repr__
```



---
## apply_changes
```python
from options import apply_changes
```



---
## compare_stable
```python
from options import compare_stable
```

Compare options in a way that is stable for snapshot() -> apply_changes() roundtrip.

This is needed because apply_changes() has non-trivial effects for some flags, so
Options().apply_changes(options.snapshot()) may result in a (slightly) different object.

---
## build_per_module_cache
```python
from options import build_per_module_cache
```



---
## clone_for_module
```python
from options import clone_for_module
```

Create an Options object that incorporates per-module options.

NOTE: Once this method is called all Options objects should be
considered read-only, else the caching might be incorrect.

---
## compile_glob
```python
from options import compile_glob
```



---
## select_options_affecting_cache
```python
from options import select_options_affecting_cache
```



---
## __name__
```python
from moduleinspect import __name__
```

Basic introspection of modules.

---
## ModuleProperties
```python
from moduleinspect import ModuleProperties
```



---
## is_c_module
```python
from moduleinspect import is_c_module
```



---
## is_pyc_only
```python
from moduleinspect import is_pyc_only
```



---
## InspectError
```python
from moduleinspect import InspectError
```



---
## get_package_properties
```python
from moduleinspect import get_package_properties
```

Return some properties of a module/package using runtime introspection.

Raise InspectError if the target couldn't be imported.

---
## worker
```python
from moduleinspect import worker
```

The main loop of a worker introspection process.

---
## ModuleInspect
```python
from moduleinspect import ModuleInspect
```

Perform runtime introspection of modules in a separate process.

Reuse the process for multiple modules for efficiency. However, if there is an
error, retry using a fresh process to avoid cross-contamination of state between
modules.

We use a separate process to isolate us from many side effects. For example, the
import of a module may kill the current process, and we want to recover from that.

Always use in a with statement for proper clean-up:

  with ModuleInspect() as m:
      p = m.get_package_properties('urllib.parse')

---
## __init__
```python
from moduleinspect import __init__
```



---
## _start
```python
from moduleinspect import _start
```



---
## close
```python
from moduleinspect import close
```

Free any resources used.

---
## _get_from_queue
```python
from moduleinspect import _get_from_queue
```

Get value from the queue.

Return the value read from the queue, or None if the process unexpectedly died.

---
## __enter__
```python
from moduleinspect import __enter__
```



---
## __exit__
```python
from moduleinspect import __exit__
```



---
## __name__
```python
from dmypy_os import __name__
```



---
## alive
```python
from dmypy_os import alive
```

Is the process alive?

---
## kill
```python
from dmypy_os import kill
```

Kill the process.

---
## __name__
```python
from git import __name__
```



---
## is_git_repo
```python
from git import is_git_repo
```

Is the given directory version-controlled with git?

---
## have_git
```python
from git import have_git
```

Can we run the git executable?

---
## git_revision
```python
from git import git_revision
```

Get the SHA-1 of the HEAD of a git repository.

---
## is_dirty
```python
from git import is_dirty
```

Check whether a git repository has uncommitted changes.

---
## __name__
```python
from message_registry import __name__
```

Message constants for generating error messages during type checking.

Literal messages should be defined as constants in this module so they won't get out of sync
if used in more than one place, and so that they can be easily introspected. These messages are
ultimately consumed by messages.MessageBuilder.fail(). For more non-trivial message generation,
add a method to MessageBuilder and call this instead.

---
## ErrorMessage
```python
from message_registry import ErrorMessage
```



---
## format
```python
from message_registry import format
```



---
## with_additional_msg
```python
from message_registry import with_additional_msg
```



---
## __name__
```python
from expandtype import __name__
```



---
## expand_type
```python
from expandtype import expand_type
```

Substitute any type variable references in a type given by a type
environment.

---
## expand_type_by_instance
```python
from expandtype import expand_type_by_instance
```

Substitute type variables in type using values from an Instance.
Type variables are considered to be bound by the class declaration.

---
## freshen_function_type_vars
```python
from expandtype import freshen_function_type_vars
```

Substitute fresh type variables for generic function type variables.

---
## HasGenericCallable
```python
from expandtype import HasGenericCallable
```



---
## freshen_all_functions_type_vars
```python
from expandtype import freshen_all_functions_type_vars
```



---
## FreshenCallableVisitor
```python
from expandtype import FreshenCallableVisitor
```



---
## ExpandTypeVisitor
```python
from expandtype import ExpandTypeVisitor
```

Visitor that substitutes type variables with values.

---
## expand_self_type
```python
from expandtype import expand_self_type
```

Expand appearances of Self type in a variable type.

---
## remove_trivial
```python
from expandtype import remove_trivial
```

Make trivial simplifications on a list of types without calling is_subtype().

This makes following simplifications:
    * Remove bottom types (taking into account strict optional setting)
    * Remove everything else if there is an `object`
    * Remove strict duplicate types

---
## __init__
```python
from expandtype import __init__
```



---
## visit_callable_type
```python
from expandtype import visit_callable_type
```



---
## visit_type_alias_type
```python
from expandtype import visit_type_alias_type
```



---
## visit_unbound_type
```python
from expandtype import visit_unbound_type
```



---
## visit_any
```python
from expandtype import visit_any
```



---
## visit_none_type
```python
from expandtype import visit_none_type
```



---
## visit_uninhabited_type
```python
from expandtype import visit_uninhabited_type
```



---
## visit_deleted_type
```python
from expandtype import visit_deleted_type
```



---
## visit_erased_type
```python
from expandtype import visit_erased_type
```



---
## visit_instance
```python
from expandtype import visit_instance
```



---
## visit_type_var
```python
from expandtype import visit_type_var
```



---
## visit_param_spec
```python
from expandtype import visit_param_spec
```



---
## visit_type_var_tuple
```python
from expandtype import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from expandtype import visit_unpack_type
```



---
## expand_unpack
```python
from expandtype import expand_unpack
```



---
## visit_parameters
```python
from expandtype import visit_parameters
```



---
## interpolate_args_for_unpack
```python
from expandtype import interpolate_args_for_unpack
```



---
## visit_overloaded
```python
from expandtype import visit_overloaded
```



---
## expand_types_with_unpack
```python
from expandtype import expand_types_with_unpack
```

Expands a list of types that has an unpack.

---
## visit_tuple_type
```python
from expandtype import visit_tuple_type
```



---
## visit_typeddict_type
```python
from expandtype import visit_typeddict_type
```



---
## visit_literal_type
```python
from expandtype import visit_literal_type
```



---
## visit_union_type
```python
from expandtype import visit_union_type
```



---
## visit_partial_type
```python
from expandtype import visit_partial_type
```



---
## visit_type_type
```python
from expandtype import visit_type_type
```



---
## expand_types
```python
from expandtype import expand_types
```



---
## __name__
```python
from stubgen import __name__
```

Generator of dynamically typed draft stubs for arbitrary modules.

The logic of this script can be split in three steps:
* parsing options and finding sources:
  - use runtime imports be default (to find also C modules)
  - or use mypy's mechanisms, if importing is prohibited
* (optionally) semantically analysing the sources using mypy (as a single set)
* emitting the stubs text:
  - for Python modules: from ASTs using ASTStubGenerator
  - for C modules using runtime introspection and (optionally) Sphinx docs

During first and third steps some problematic files can be skipped, but any
blocking error during second step will cause the whole program to stop.

Basic usage:

  $ stubgen foo.py bar.py some_directory
  => Generate out/foo.pyi, out/bar.pyi, and stubs for some_directory (recursively).

  $ stubgen -m urllib.parse
  => Generate out/urllib/parse.pyi.

  $ stubgen -p urllib
  => Generate stubs for whole urllib package (recursively).

For C modules, you can get more precise function signatures by parsing .rst (Sphinx)
documentation for extra information. For this, use the --doc-dir option:

  $ stubgen --doc-dir <DIR>/Python-3.4.2/Doc/library -m curses

Note: The generated stubs should be verified manually.

TODO:
 - maybe use .rst docs also for Python modules
 - maybe export more imported names if there is no __all__ (this affects ssl.SSLError, for example)
   - a quick and dirty heuristic would be to turn this on if a module has something like
     'from x import y as _y'
 - we don't seem to always detect properties ('closed' in 'io', for example)

---
## Options
```python
from stubgen import Options
```

Represents stubgen options.

This class is mutable to simplify testing.

---
## StubSource
```python
from stubgen import StubSource
```

A single source for stub: can be a Python or C module.

A simple extension of BuildSource that also carries the AST and
the value of __all__ detected at runtime.

---
## AliasPrinter
```python
from stubgen import AliasPrinter
```

Visitor used to collect type aliases _and_ type variable definitions.

Visit r.h.s of the definition to get the string representation of type alias.

---
## find_defined_names
```python
from stubgen import find_defined_names
```



---
## get_assigned_names
```python
from stubgen import get_assigned_names
```



---
## DefinitionFinder
```python
from stubgen import DefinitionFinder
```

Find names of things defined at the top level of a module.

---
## find_referenced_names
```python
from stubgen import find_referenced_names
```



---
## is_none_expr
```python
from stubgen import is_none_expr
```



---
## ReferenceFinder
```python
from stubgen import ReferenceFinder
```

Find all name references (both local and global).

---
## ASTStubGenerator
```python
from stubgen import ASTStubGenerator
```

Generate stub text from a mypy AST.

---
## find_method_names
```python
from stubgen import find_method_names
```



---
## SelfTraverser
```python
from stubgen import SelfTraverser
```



---
## find_self_initializers
```python
from stubgen import find_self_initializers
```

Find attribute initializers in a method.

Return a list of pairs (attribute name, r.h.s. expression).

---
## get_qualified_name
```python
from stubgen import get_qualified_name
```



---
## remove_blacklisted_modules
```python
from stubgen import remove_blacklisted_modules
```



---
## split_pyc_from_py
```python
from stubgen import split_pyc_from_py
```



---
## is_blacklisted_path
```python
from stubgen import is_blacklisted_path
```



---
## normalize_path_separators
```python
from stubgen import normalize_path_separators
```



---
## collect_build_targets
```python
from stubgen import collect_build_targets
```

Collect files for which we need to generate stubs.

Return list of py modules, pyc modules, and C modules.

---
## find_module_paths_using_imports
```python
from stubgen import find_module_paths_using_imports
```

Find path and runtime value of __all__ (if possible) for modules and packages.

This function uses runtime Python imports to get the information.

---
## is_non_library_module
```python
from stubgen import is_non_library_module
```

Does module look like a test module or a script?

---
## translate_module_name
```python
from stubgen import translate_module_name
```



---
## find_module_paths_using_search
```python
from stubgen import find_module_paths_using_search
```

Find sources for modules and packages requested.

This function just looks for source files at the file system level.
This is used if user passes --no-import, and will not find C modules.
Exit if some of the modules or packages can't be found.

---
## mypy_options
```python
from stubgen import mypy_options
```

Generate mypy options using the flag passed by user.

---
## parse_source_file
```python
from stubgen import parse_source_file
```

Parse a source file.

On success, store AST in the corresponding attribute of the stub source.
If there are syntax errors, print them and exit.

---
## generate_asts_for_modules
```python
from stubgen import generate_asts_for_modules
```

Use mypy to parse (and optionally analyze) source files.

---
## generate_stub_for_py_module
```python
from stubgen import generate_stub_for_py_module
```

Use analysed (or just parsed) AST to generate type stub for single file.

If directory for target doesn't exist it will created. Existing stub
will be overwritten.

---
## generate_stubs
```python
from stubgen import generate_stubs
```

Main entry point for the program.

---
## parse_options
```python
from stubgen import parse_options
```



---
## main
```python
from stubgen import main
```



---
## __init__
```python
from stubgen import __init__
```



---
## __repr__
```python
from stubgen import __repr__
```



---
## module
```python
from stubgen import module
```



---
## path
```python
from stubgen import path
```



---
## visit_call_expr
```python
from stubgen import visit_call_expr
```



---
## _visit_ref_expr
```python
from stubgen import _visit_ref_expr
```



---
## visit_name_expr
```python
from stubgen import visit_name_expr
```



---
## visit_member_expr
```python
from stubgen import visit_member_expr
```



---
## visit_str_expr
```python
from stubgen import visit_str_expr
```



---
## visit_index_expr
```python
from stubgen import visit_index_expr
```



---
## visit_tuple_expr
```python
from stubgen import visit_tuple_expr
```



---
## visit_list_expr
```python
from stubgen import visit_list_expr
```



---
## visit_dict_expr
```python
from stubgen import visit_dict_expr
```



---
## visit_ellipsis
```python
from stubgen import visit_ellipsis
```



---
## visit_op_expr
```python
from stubgen import visit_op_expr
```



---
## visit_star_expr
```python
from stubgen import visit_star_expr
```



---
## visit_class_def
```python
from stubgen import visit_class_def
```



---
## visit_func_def
```python
from stubgen import visit_func_def
```



---
## visit_assignment_stmt
```python
from stubgen import visit_assignment_stmt
```



---
## visit_block
```python
from stubgen import visit_block
```



---
## visit_instance
```python
from stubgen import visit_instance
```



---
## visit_unbound_type
```python
from stubgen import visit_unbound_type
```



---
## visit_tuple_type
```python
from stubgen import visit_tuple_type
```



---
## visit_callable_type
```python
from stubgen import visit_callable_type
```



---
## add_ref
```python
from stubgen import add_ref
```



---
## visit_mypy_file
```python
from stubgen import visit_mypy_file
```



---
## visit_overloaded_func_def
```python
from stubgen import visit_overloaded_func_def
```

@property with setters and getters, @overload chain and some others.

---
## get_default_function_sig
```python
from stubgen import get_default_function_sig
```



---
## _get_func_args
```python
from stubgen import _get_func_args
```



---
## _get_func_return
```python
from stubgen import _get_func_return
```



---
## _get_func_docstring
```python
from stubgen import _get_func_docstring
```



---
## visit_decorator
```python
from stubgen import visit_decorator
```



---
## process_decorator
```python
from stubgen import process_decorator
```

Process a series of decorators.

Only preserve certain special decorators such as @abstractmethod.

---
## get_fullname
```python
from stubgen import get_fullname
```

Return the expression's full name.

---
## get_base_types
```python
from stubgen import get_base_types
```

Get list of base classes for a class.

---
## get_class_decorators
```python
from stubgen import get_class_decorators
```



---
## is_dataclass
```python
from stubgen import is_dataclass
```



---
## is_namedtuple
```python
from stubgen import is_namedtuple
```



---
## is_typed_namedtuple
```python
from stubgen import is_typed_namedtuple
```



---
## _get_namedtuple_fields
```python
from stubgen import _get_namedtuple_fields
```



---
## process_namedtuple
```python
from stubgen import process_namedtuple
```



---
## is_typeddict
```python
from stubgen import is_typeddict
```



---
## process_typeddict
```python
from stubgen import process_typeddict
```



---
## annotate_as_incomplete
```python
from stubgen import annotate_as_incomplete
```



---
## is_alias_expression
```python
from stubgen import is_alias_expression
```

Return True for things that look like target for an alias.

Used to know if assignments look like type aliases, function alias,
or module alias.

---
## process_typealias
```python
from stubgen import process_typealias
```



---
## visit_if_stmt
```python
from stubgen import visit_if_stmt
```



---
## visit_import_all
```python
from stubgen import visit_import_all
```



---
## visit_import_from
```python
from stubgen import visit_import_from
```



---
## visit_import
```python
from stubgen import visit_import
```



---
## get_init
```python
from stubgen import get_init
```

Return initializer for a variable.

Return None if we've generated one already or if the variable is internal.

---
## get_assign_initializer
```python
from stubgen import get_assign_initializer
```

Does this rvalue need some special initializer value?

---
## add_decorator
```python
from stubgen import add_decorator
```



---
## clear_decorators
```python
from stubgen import clear_decorators
```



---
## is_private_member
```python
from stubgen import is_private_member
```



---
## get_str_type_of_node
```python
from stubgen import get_str_type_of_node
```



---
## maybe_unwrap_unary_expr
```python
from stubgen import maybe_unwrap_unary_expr
```

Unwrap (possibly nested) unary expressions.

But, some unary expressions can change the type of expression.
While we want to preserve it. For example, `~True` is `int`.
So, we only allow a subset of unary expressions to be unwrapped.

---
## get_str_default_of_node
```python
from stubgen import get_str_default_of_node
```

Get a string representation of the default value of a node.

Returns a 2-tuple of the default and whether or not it is valid.

---
## should_reexport
```python
from stubgen import should_reexport
```



---
## __name__
```python
from suggestions import __name__
```

Mechanisms for inferring function types based on callsites.

Currently works by collecting all argument types at callsites,
synthesizing a list of possible function types from that, trying them
all, and picking the one with the fewest errors that we think is the
"best".

Can return JSON that pyannotate can use to apply the annotations to code.

There are a bunch of TODOs here:
 * Maybe want a way to surface the choices not selected??
 * We can generate an exponential number of type suggestions, and probably want
   a way to not always need to check them all.
 * Our heuristics for what types to try are primitive and not yet
   supported by real practice.
 * More!

Other things:
 * This is super brute force. Could we integrate with the typechecker
   more to understand more about what is going on?
 * Like something with tracking constraints/unification variables?
 * No understanding of type variables at *all*

---
## PyAnnotateSignature
```python
from suggestions import PyAnnotateSignature
```



---
## Callsite
```python
from suggestions import Callsite
```



---
## SuggestionPlugin
```python
from suggestions import SuggestionPlugin
```

Plugin that records all calls to a given target.

---
## ReturnFinder
```python
from suggestions import ReturnFinder
```

Visitor for finding all types returned from a function.

---
## get_return_types
```python
from suggestions import get_return_types
```

Find all the types returned by return statements in func.

---
## ArgUseFinder
```python
from suggestions import ArgUseFinder
```

Visitor for finding all the types of arguments that each arg is passed to.

This is extremely simple minded but might be effective anyways.

---
## get_arg_uses
```python
from suggestions import get_arg_uses
```

Find all the types of arguments that each arg is passed to.

For example, given
  def foo(x: int) -> None: ...
  def bar(x: str) -> None: ...
  def test(x, y):
      foo(x)
      bar(y)

this will return [[int], [str]].

---
## SuggestionFailure
```python
from suggestions import SuggestionFailure
```



---
## is_explicit_any
```python
from suggestions import is_explicit_any
```



---
## is_implicit_any
```python
from suggestions import is_implicit_any
```



---
## SuggestionEngine
```python
from suggestions import SuggestionEngine
```

Engine for finding call sites and suggesting signatures.

---
## any_score_type
```python
from suggestions import any_score_type
```

Generate a very made up number representing the Anyness of a type.

Higher is better, 1.0 is max

---
## any_score_callable
```python
from suggestions import any_score_callable
```



---
## is_tricky_callable
```python
from suggestions import is_tricky_callable
```

Is t a callable that we need to put a ... in for syntax reasons?

---
## TypeFormatter
```python
from suggestions import TypeFormatter
```

Visitor used to format types

---
## make_suggestion_anys
```python
from suggestions import make_suggestion_anys
```

Make all anys in the type as coming from the suggestion engine.

This keeps those Anys from influencing constraint generation,
which allows us to do better when refining types.

---
## MakeSuggestionAny
```python
from suggestions import MakeSuggestionAny
```



---
## generate_type_combinations
```python
from suggestions import generate_type_combinations
```

Generate possible combinations of a list of types.

mypy essentially supports two different ways to do this: joining the types
and unioning the types. We try both.

---
## count_errors
```python
from suggestions import count_errors
```



---
## refine_type
```python
from suggestions import refine_type
```

Refine `ti` by replacing Anys in it with information taken from `si`

This basically works by, when the types have the same structure,
traversing both of them in parallel and replacing Any on the left
with whatever the type on the right is. If the types don't have the
same structure (or aren't supported), the left type is chosen.

For example:
  refine(Any, T) = T,  for all T
  refine(float, int) = float
  refine(List[Any], List[int]) = List[int]
  refine(Dict[int, Any], Dict[Any, int]) = Dict[int, int]
  refine(Tuple[int, Any], Tuple[Any, int]) = Tuple[int, int]

  refine(Callable[[Any], Any], Callable[[int], int]) = Callable[[int], int]
  refine(Callable[..., int], Callable[[int, float], Any]) = Callable[[int, float], int]

  refine(Optional[Any], int) = Optional[int]
  refine(Optional[Any], Optional[int]) = Optional[int]
  refine(Optional[Any], Union[int, str]) = Optional[Union[int, str]]
  refine(Optional[List[Any]], List[int]) = List[int]

---
## refine_union
```python
from suggestions import refine_union
```

Refine a union type based on another type.

This is done by refining every component of the union against the
right hand side type (or every component of its union if it is
one). If an element of the union is successfully refined, we drop it
from the union in favor of the refined versions.

---
## refine_callable
```python
from suggestions import refine_callable
```

Refine a callable based on another.

See comments for refine_type.

---
## dedup
```python
from suggestions import dedup
```



---
## __init__
```python
from suggestions import __init__
```



---
## get_function_hook
```python
from suggestions import get_function_hook
```



---
## get_method_hook
```python
from suggestions import get_method_hook
```



---
## log
```python
from suggestions import log
```



---
## visit_return_stmt
```python
from suggestions import visit_return_stmt
```



---
## visit_func_def
```python
from suggestions import visit_func_def
```



---
## visit_call_expr
```python
from suggestions import visit_call_expr
```



---
## suggest
```python
from suggestions import suggest
```

Suggest an inferred type for function.

---
## suggest_callsites
```python
from suggestions import suggest_callsites
```

Find a list of call sites of function.

---
## restore_after
```python
from suggestions import restore_after
```

Context manager that reloads a module after executing the body.

This should undo any damage done to the module state while mucking around.

---
## with_export_types
```python
from suggestions import with_export_types
```

Context manager that enables the export_types flag in the body.

This causes type information to be exported into the manager's all_types variable.

---
## get_trivial_type
```python
from suggestions import get_trivial_type
```

Generate a trivial callable type from a func def, with all Anys

---
## get_starting_type
```python
from suggestions import get_starting_type
```



---
## get_args
```python
from suggestions import get_args
```

Produce a list of type suggestions for each argument type.

---
## get_default_arg_types
```python
from suggestions import get_default_arg_types
```



---
## get_guesses
```python
from suggestions import get_guesses
```

Compute a list of guesses for a function's type.

This focuses just on the argument types, and doesn't change the provided return type.

---
## get_callsites
```python
from suggestions import get_callsites
```

Find all call sites of a function.

---
## filter_options
```python
from suggestions import filter_options
```

Apply any configured filters to the possible guesses.

Currently the only option is filtering based on Any prevalance.

---
## find_best
```python
from suggestions import find_best
```

From a list of possible function types, find the best one.

For best, we want the fewest errors, then the best "score" from score_callable.

---
## get_guesses_from_parent
```python
from suggestions import get_guesses_from_parent
```

Try to get a guess of a method type from a parent class.

---
## get_suggestion
```python
from suggestions import get_suggestion
```

Compute a suggestion for a function.

Return the type and whether the first argument should be ignored.

---
## format_args
```python
from suggestions import format_args
```



---
## find_node
```python
from suggestions import find_node
```

From a target name, return module/target names and the func def.

The 'key' argument can be in one of two formats:
* As the function full name, e.g., package.module.Cls.method
* As the function location as file and line separated by column,
  e.g., path/to/file.py:42

---
## find_node_by_module_and_name
```python
from suggestions import find_node_by_module_and_name
```

Find symbol node by module id and qualified name.

Raise SuggestionFailure if can't find one.

---
## find_node_by_file_and_line
```python
from suggestions import find_node_by_file_and_line
```

Find symbol node by path to file and line number.

Find the first function declared *before or on* the line number.

Return module id and the node found. Raise SuggestionFailure if can't find one.

---
## extract_from_decorator
```python
from suggestions import extract_from_decorator
```



---
## try_type
```python
from suggestions import try_type
```

Recheck a function while assuming it has type typ.

Return all error messages.

---
## reload
```python
from suggestions import reload
```

Recheck the module given by state.

---
## ensure_loaded
```python
from suggestions import ensure_loaded
```

Make sure that the module represented by state is fully loaded.

---
## named_type
```python
from suggestions import named_type
```



---
## json_suggestion
```python
from suggestions import json_suggestion
```

Produce a json blob for a suggestion suitable for application by pyannotate.

---
## pyannotate_signature
```python
from suggestions import pyannotate_signature
```

Format a callable type as a pyannotate dict

---
## format_signature
```python
from suggestions import format_signature
```

Format a callable type in a way suitable as an annotation... kind of

---
## format_type
```python
from suggestions import format_type
```



---
## score_type
```python
from suggestions import score_type
```

Generate a score for a type that we use to pick which type to use.

Lower is better, prefer non-union/non-any types. Don't penalize optionals.

---
## score_callable
```python
from suggestions import score_callable
```



---
## visit_any
```python
from suggestions import visit_any
```



---
## visit_instance
```python
from suggestions import visit_instance
```



---
## visit_tuple_type
```python
from suggestions import visit_tuple_type
```



---
## visit_uninhabited_type
```python
from suggestions import visit_uninhabited_type
```



---
## visit_typeddict_type
```python
from suggestions import visit_typeddict_type
```



---
## visit_union_type
```python
from suggestions import visit_union_type
```



---
## visit_callable_type
```python
from suggestions import visit_callable_type
```



---
## visit_type_alias_type
```python
from suggestions import visit_type_alias_type
```



---
## __name__
```python
from exprtotype import __name__
```

Translate an Expression to a Type value.

---
## TypeTranslationError
```python
from exprtotype import TypeTranslationError
```

Exception raised when an expression is not valid as a type.

---
## _extract_argument_name
```python
from exprtotype import _extract_argument_name
```



---
## expr_to_unanalyzed_type
```python
from exprtotype import expr_to_unanalyzed_type
```

Translate an expression to the corresponding type.

The result is not semantically analyzed. It can be UnboundType or TypeList.
Raise TypeTranslationError if the expression cannot represent a type.

If allow_new_syntax is True, allow all type syntax independent of the target
Python version (used in stubs).

---
## __name__
```python
from patterns import __name__
```

:module: watchdog.utils.patterns
:synopsis: Common wildcard searching/filtering functionality for files.
:author: boris.staletic@gmail.com (Boris Staletic)
:author: yesudeep@gmail.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

---
## Pattern
```python
from patterns import Pattern
```

A pattern node.

---
## AsPattern
```python
from patterns import AsPattern
```

The pattern <pattern> as <name>

---
## OrPattern
```python
from patterns import OrPattern
```

The pattern <pattern> | <pattern> | ...

---
## ValuePattern
```python
from patterns import ValuePattern
```

The pattern x.y (or x.y.z, ...)

---
## SingletonPattern
```python
from patterns import SingletonPattern
```



---
## SequencePattern
```python
from patterns import SequencePattern
```

The pattern [<pattern>, ...]

---
## StarredPattern
```python
from patterns import StarredPattern
```



---
## MappingPattern
```python
from patterns import MappingPattern
```



---
## ClassPattern
```python
from patterns import ClassPattern
```

The pattern Cls(...)

---
## accept
```python
from patterns import accept
```



---
## __init__
```python
from patterns import __init__
```



---
## __name__
```python
from errorcodes import __name__
```

Classification of possible errors mypy can detect.

These can be used for filtering specific errors.

---
## ErrorCode
```python
from errorcodes import ErrorCode
```



---
## __init__
```python
from errorcodes import __init__
```



---
## __str__
```python
from errorcodes import __str__
```



---
## __eq__
```python
from errorcodes import __eq__
```



---
## __hash__
```python
from errorcodes import __hash__
```



---
## __name__
```python
from config_parser import __name__
```



---
## parse_version
```python
from config_parser import parse_version
```



---
## try_split
```python
from config_parser import try_split
```

Split and trim a str or list of str into a list of str

---
## validate_codes
```python
from config_parser import validate_codes
```



---
## validate_package_allow_list
```python
from config_parser import validate_package_allow_list
```



---
## expand_path
```python
from config_parser import expand_path
```

Expand the user home directory and any environment variables contained within
the provided path.

---
## str_or_array_as_list
```python
from config_parser import str_or_array_as_list
```



---
## split_and_match_files_list
```python
from config_parser import split_and_match_files_list
```

Take a list of files/directories (with support for globbing through the glob library).

Where a path/glob matches no file, we still include the raw path in the resulting list.

Returns a list of file paths

---
## split_and_match_files
```python
from config_parser import split_and_match_files
```

Take a string representing a list of files/directories (with support for globbing
through the glob library).

Where a path/glob matches no file, we still include the raw path in the resulting list.

Returns a list of file paths

---
## check_follow_imports
```python
from config_parser import check_follow_imports
```



---
## check_junit_format
```python
from config_parser import check_junit_format
```



---
## split_commas
```python
from config_parser import split_commas
```



---
## parse_config_file
```python
from config_parser import parse_config_file
```

Parse a config file into an Options object.

Errors are written to stderr but are not fatal.

If filename is None, fall back to default config files.

---
## get_prefix
```python
from config_parser import get_prefix
```



---
## is_toml
```python
from config_parser import is_toml
```



---
## destructure_overrides
```python
from config_parser import destructure_overrides
```

Take the new [[tool.mypy.overrides]] section array in the pyproject.toml file,
and convert it back to a flatter structure that the existing config_parser can handle.

E.g. the following pyproject.toml file:

    [[tool.mypy.overrides]]
    module = [
        "a.b",
        "b.*"
    ]
    disallow_untyped_defs = true

    [[tool.mypy.overrides]]
    module = 'c'
    disallow_untyped_defs = false

Would map to the following config dict that it would have gotten from parsing an equivalent
ini file:

    {
        "mypy-a.b": {
            disallow_untyped_defs = true,
        },
        "mypy-b.*": {
            disallow_untyped_defs = true,
        },
        "mypy-c": {
            disallow_untyped_defs: false,
        },
    }

---
## parse_section
```python
from config_parser import parse_section
```

Parse one section of a config file.

Returns a dict of option values encountered, and a dict of report directories.

---
## convert_to_boolean
```python
from config_parser import convert_to_boolean
```

Return a boolean value translating from other types if necessary.

---
## split_directive
```python
from config_parser import split_directive
```

Split s on commas, except during quoted sections.

Returns the parts and a list of error messages.

---
## mypy_comments_to_config_map
```python
from config_parser import mypy_comments_to_config_map
```

Rewrite the mypy comment syntax into ini file syntax.

---
## parse_mypy_comments
```python
from config_parser import parse_mypy_comments
```

Parse a collection of inline mypy: configuration comments.

Returns a dictionary of options to be applied and a list of error messages
generated.

---
## get_config_module_names
```python
from config_parser import get_config_module_names
```



---
## ConfigTOMLValueError
```python
from config_parser import ConfigTOMLValueError
```



---
## set_strict_flags
```python
from config_parser import set_strict_flags
```



---
## __name__
```python
from pyinfo import __name__
```



---
## getsitepackages
```python
from pyinfo import getsitepackages
```



---
## getsyspath
```python
from pyinfo import getsyspath
```



---
## getsearchdirs
```python
from pyinfo import getsearchdirs
```



---
## __name__
```python
from semanal_namedtuple import __name__
```

Semantic analysis of named tuple definitions.

This is conceptually part of mypy.semanal.

---
## NamedTupleAnalyzer
```python
from semanal_namedtuple import NamedTupleAnalyzer
```



---
## __init__
```python
from semanal_namedtuple import __init__
```



---
## analyze_namedtuple_classdef
```python
from semanal_namedtuple import analyze_namedtuple_classdef
```

Analyze if given class definition can be a named tuple definition.

Return a tuple where first item indicates whether this can possibly be a named tuple,
and the second item is the corresponding TypeInfo (may be None if not ready and should be
deferred).

---
## check_namedtuple_classdef
```python
from semanal_namedtuple import check_namedtuple_classdef
```

Parse and validate fields in named tuple class definition.

Return a four tuple:
  * field names
  * field types
  * field default values
  * valid statements
or None, if any of the types are not ready.

---
## check_namedtuple
```python
from semanal_namedtuple import check_namedtuple
```

Check if a call defines a namedtuple.

The optional var_name argument is the name of the variable to
which this is assigned, if any.

Return a tuple of two items:
  * Internal name of the named tuple (e.g. the name passed as an argument to namedtuple)
    or None if it is not a valid named tuple
  * Corresponding TypeInfo, or None if not ready.

If the definition is invalid but looks like a namedtuple,
report errors but return (some) TypeInfo.

---
## store_namedtuple_info
```python
from semanal_namedtuple import store_namedtuple_info
```



---
## parse_namedtuple_args
```python
from semanal_namedtuple import parse_namedtuple_args
```

Parse a namedtuple() call into data needed to construct a type.

Returns a 6-tuple:
- List of argument names
- List of argument types
- List of default values
- First argument of namedtuple
- All typevars found in the field definition
- Whether all types are ready.

Return None if the definition didn't typecheck.

---
## parse_namedtuple_fields_with_types
```python
from semanal_namedtuple import parse_namedtuple_fields_with_types
```

Parse typed named tuple fields.

Return (names, types, defaults, whether types are all ready), or None if error occurred.

---
## build_namedtuple_typeinfo
```python
from semanal_namedtuple import build_namedtuple_typeinfo
```



---
## save_namedtuple_body
```python
from semanal_namedtuple import save_namedtuple_body
```

Preserve the generated body of class-based named tuple and then restore it.

Temporarily clear the names dict so we don't get errors about duplicate names
that were already set in build_namedtuple_typeinfo (we already added the tuple
field names while generating the TypeInfo, and actual duplicates are
already reported).

---
## check_namedtuple_field_name
```python
from semanal_namedtuple import check_namedtuple_field_name
```

Return None for valid fields, a string description for invalid ones.

---
## fail
```python
from semanal_namedtuple import fail
```



---
## add_field
```python
from semanal_namedtuple import add_field
```



---
## add_method
```python
from semanal_namedtuple import add_method
```



---
## make_init_arg
```python
from semanal_namedtuple import make_init_arg
```



---
## __name__
```python
from bogus_type import __name__
```

A Bogus[T] type alias for marking when we subvert the type system

We need this for compiling with mypyc, which inserts runtime
typechecks that cause problems when we subvert the type system. So
when compiling with mypyc, we turn those places into Any, while
keeping the types around for normal typechecks.

Since this causes the runtime types to be Any, this is best used
in places where efficient access to properties is not important.
For those cases some other technique should be used.

---
## __name__
```python
from checkmember import __name__
```

Type checking of attribute access

---
## MemberContext
```python
from checkmember import MemberContext
```

Information and objects needed to type check attribute access.

Look at the docstring of analyze_member_access for more information.

---
## analyze_member_access
```python
from checkmember import analyze_member_access
```

Return the type of attribute 'name' of 'typ'.

The actual implementation is in '_analyze_member_access' and this docstring
also applies to it.

This is a general operation that supports various different variations:

  1. lvalue or non-lvalue access (setter or getter access)
  2. supertype access when using super() (is_super == True and
     'override_info' should refer to the supertype)

'original_type' is the most precise inferred or declared type of the base object
that we have available. When looking for an attribute of 'typ', we may perform
recursive calls targeting the fallback type, and 'typ' may become some supertype
of 'original_type'. 'original_type' is always preserved as the 'typ' type used in
the initial, non-recursive call. The 'self_type' is a component of 'original_type'
to which generic self should be bound (a narrower type that has a fallback to instance).
Currently this is used only for union types.

'module_symbol_table' is passed to this function if 'typ' is actually a module
and we want to keep track of the available attributes of the module (since they
are not available via the type object directly)

---
## _analyze_member_access
```python
from checkmember import _analyze_member_access
```



---
## may_be_awaitable_attribute
```python
from checkmember import may_be_awaitable_attribute
```

Check if the given type has the attribute when awaited.

---
## report_missing_attribute
```python
from checkmember import report_missing_attribute
```



---
## analyze_instance_member_access
```python
from checkmember import analyze_instance_member_access
```



---
## validate_super_call
```python
from checkmember import validate_super_call
```



---
## analyze_type_callable_member_access
```python
from checkmember import analyze_type_callable_member_access
```



---
## analyze_type_type_member_access
```python
from checkmember import analyze_type_type_member_access
```



---
## analyze_union_member_access
```python
from checkmember import analyze_union_member_access
```



---
## analyze_none_member_access
```python
from checkmember import analyze_none_member_access
```



---
## analyze_member_var_access
```python
from checkmember import analyze_member_var_access
```

Analyse attribute access that does not target a method.

This is logically part of analyze_member_access and the arguments are similar.

original_type is the type of E in the expression E.var

---
## check_final_member
```python
from checkmember import check_final_member
```

Give an error if the name being assigned was declared as final.

---
## analyze_descriptor_access
```python
from checkmember import analyze_descriptor_access
```

Type check descriptor access.

Arguments:
    descriptor_type: The type of the descriptor attribute being accessed
        (the type of ``f`` in ``a.f`` when ``f`` is a descriptor).
    mx: The current member access context.
Return:
    The return type of the appropriate ``__get__`` overload for the descriptor.

---
## is_instance_var
```python
from checkmember import is_instance_var
```

Return if var is an instance variable according to PEP 526.

---
## analyze_var
```python
from checkmember import analyze_var
```

Analyze access to an attribute via a Var node.

This is conceptually part of analyze_member_access and the arguments are similar.
itype is the instance type in which attribute should be looked up
original_type is the type of E in the expression E.var
if implicit is True, the original Var was created as an assignment to self

---
## expand_self_type_if_needed
```python
from checkmember import expand_self_type_if_needed
```

Expand special Self type in a backwards compatible manner.

This should ensure that mixing old-style and new-style self-types work
seamlessly. Also, re-bind new style self-types in subclasses if needed.

---
## freeze_all_type_vars
```python
from checkmember import freeze_all_type_vars
```



---
## FreezeTypeVarsVisitor
```python
from checkmember import FreezeTypeVarsVisitor
```



---
## lookup_member_var_or_accessor
```python
from checkmember import lookup_member_var_or_accessor
```

Find the attribute/accessor node that refers to a member of a type.

---
## check_self_arg
```python
from checkmember import check_self_arg
```

Check that an instance has a valid type for a method with annotated 'self'.

For example if the method is defined as:
    class A:
        def f(self: S) -> T: ...
then for 'x.f' we check that meet(type(x), A) <: S. If the method is overloaded, we
select only overloads items that satisfy this requirement. If there are no matching
overloads, an error is generated.

Note: dispatched_arg_type uses a meet to select a relevant item in case if the
original type of 'x' is a union. This is done because several special methods
treat union types in ad-hoc manner, so we can't use MemberContext.self_type yet.

---
## analyze_class_attribute_access
```python
from checkmember import analyze_class_attribute_access
```

Analyze access to an attribute on a class object.

itype is the return type of the class object callable, original_type is the type
of E in the expression E.var, original_vars are type variables of the class callable
(for generic classes).

---
## apply_class_attr_hook
```python
from checkmember import apply_class_attr_hook
```



---
## analyze_enum_class_attribute_access
```python
from checkmember import analyze_enum_class_attribute_access
```



---
## analyze_typeddict_access
```python
from checkmember import analyze_typeddict_access
```



---
## add_class_tvars
```python
from checkmember import add_class_tvars
```

Instantiate type variables during analyze_class_attribute_access,
e.g T and Q in the following:

class A(Generic[T]):
    @classmethod
    def foo(cls: Type[Q]) -> Tuple[T, Q]: ...

class B(A[str]): pass
B.foo()

Args:
    t: Declared type of the method (or property)
    isuper: Current instance mapped to the superclass where method was defined, this
        is usually done by map_instance_to_supertype()
    is_classmethod: True if this method is decorated with @classmethod
    is_staticmethod: True if this method is decorated with @staticmethod
    original_type: The value of the type B in the expression B.foo() or the corresponding
        component in case of a union (this is used to bind the self-types)
    original_vars: Type variables of the class callable on which the method was accessed
Returns:
    Expanded method type with added type variables (when needed).

---
## type_object_type
```python
from checkmember import type_object_type
```

Return the type of a type object.

For a generic type G with type variables T and S the type is generally of form

  Callable[..., G[T, S]]

where ... are argument types for the __init__/__new__ method (without the self
argument). Also, the fallback type will be 'type' instead of 'function'.

---
## analyze_decorator_or_funcbase_access
```python
from checkmember import analyze_decorator_or_funcbase_access
```

Analyzes the type behind method access.

The function itself can possibly be decorated.
See: https://github.com/python/mypy/issues/10409

---
## is_valid_constructor
```python
from checkmember import is_valid_constructor
```

Does this node represents a valid constructor method?

This includes normal functions, overloaded functions, and decorators
that return a callable type.

---
## __init__
```python
from checkmember import __init__
```



---
## named_type
```python
from checkmember import named_type
```



---
## not_ready_callback
```python
from checkmember import not_ready_callback
```



---
## copy_modified
```python
from checkmember import copy_modified
```



---
## visit_callable_type
```python
from checkmember import visit_callable_type
```



---
## __name__
```python
from refinfo import __name__
```

Find line-level reference information from a mypy AST (undocumented feature)

---
## RefInfoVisitor
```python
from refinfo import RefInfoVisitor
```



---
## type_fullname
```python
from refinfo import type_fullname
```



---
## get_undocumented_ref_info_json
```python
from refinfo import get_undocumented_ref_info_json
```



---
## __init__
```python
from refinfo import __init__
```



---
## visit_name_expr
```python
from refinfo import visit_name_expr
```



---
## visit_member_expr
```python
from refinfo import visit_member_expr
```



---
## visit_func_def
```python
from refinfo import visit_func_def
```



---
## record_ref_expr
```python
from refinfo import record_ref_expr
```



---
## __name__
```python
from modulefinder import __name__
```

Low-level infrastructure to find modules.

This builds on fscache.py; find_sources.py builds on top of this.

---
## SearchPaths
```python
from modulefinder import SearchPaths
```



---
## ModuleNotFoundReason
```python
from modulefinder import ModuleNotFoundReason
```



---
## BuildSource
```python
from modulefinder import BuildSource
```

A single source file.

---
## BuildSourceSet
```python
from modulefinder import BuildSourceSet
```

Helper to efficiently test a file's membership in a set of build sources.

---
## FindModuleCache
```python
from modulefinder import FindModuleCache
```

Module finder with integrated cache.

Module locations and some intermediate results are cached internally
and can be cleared with the clear() method.

All file system accesses are performed through a FileSystemCache,
which is not ever cleared by this class. If necessary it must be
cleared by client code.

---
## matches_exclude
```python
from modulefinder import matches_exclude
```



---
## is_init_file
```python
from modulefinder import is_init_file
```



---
## verify_module
```python
from modulefinder import verify_module
```

Check that all packages containing id have a __init__ file.

---
## highest_init_level
```python
from modulefinder import highest_init_level
```

Compute the highest level where an __init__ file is found.

---
## mypy_path
```python
from modulefinder import mypy_path
```



---
## default_lib_path
```python
from modulefinder import default_lib_path
```

Return default standard library search paths.

---
## get_search_dirs
```python
from modulefinder import get_search_dirs
```

Find package directories for given python.

This runs a subprocess call, which generates a list of the directories in sys.path.
To avoid repeatedly calling a subprocess (which can be slow!) we
lru_cache the results.

---
## compute_search_paths
```python
from modulefinder import compute_search_paths
```

Compute the search paths as specified in PEP 561.

There are the following 4 members created:
- User code (from `sources`)
- MYPYPATH (set either via config or environment variable)
- installed package directories (which will later be split into stub-only and inline)
- typeshed

---
## load_stdlib_py_versions
```python
from modulefinder import load_stdlib_py_versions
```

Return dict with minimum and maximum Python versions of stdlib modules.

The contents look like
{..., 'secrets': ((3, 6), None), 'symbol': ((2, 7), (3, 9)), ...}

None means there is no maximum version.

---
## parse_version
```python
from modulefinder import parse_version
```



---
## typeshed_py_version
```python
from modulefinder import typeshed_py_version
```

Return Python version used for checking whether module supports typeshed.

---
## error_message_templates
```python
from modulefinder import error_message_templates
```



---
## __init__
```python
from modulefinder import __init__
```



---
## __repr__
```python
from modulefinder import __repr__
```



---
## is_source
```python
from modulefinder import is_source
```



---
## clear
```python
from modulefinder import clear
```



---
## find_module_via_source_set
```python
from modulefinder import find_module_via_source_set
```

Fast path to find modules by looking through the input sources

This is only used when --fast-module-lookup is passed on the command line.

---
## find_lib_path_dirs
```python
from modulefinder import find_lib_path_dirs
```

Find which elements of a lib_path have the directory a module needs to exist.

This is run for the python_path, mypy_path, and typeshed_path search paths.

---
## get_toplevel_possibilities
```python
from modulefinder import get_toplevel_possibilities
```

Find which elements of lib_path could contain a particular top-level module.

In practice, almost all modules can be routed to the correct entry in
lib_path by looking at just the first component of the module name.

We take advantage of this by enumerating the contents of all of the
directories on the lib_path and building a map of which entries in
the lib_path could contain each potential top-level module that appears.

---
## find_module
```python
from modulefinder import find_module
```

Return the path of the module source file or why it wasn't found.

If fast_path is True, prioritize performance over generating detailed
error descriptions.

---
## _typeshed_has_version
```python
from modulefinder import _typeshed_has_version
```



---
## _find_module_non_stub_helper
```python
from modulefinder import _find_module_non_stub_helper
```



---
## _update_ns_ancestors
```python
from modulefinder import _update_ns_ancestors
```



---
## _can_find_module_in_parent_dir
```python
from modulefinder import _can_find_module_in_parent_dir
```

Test if a module can be found by checking the parent directories
of the current working directory.

---
## _find_module
```python
from modulefinder import _find_module
```



---
## find_modules_recursive
```python
from modulefinder import find_modules_recursive
```



---
## __name__
```python
from split_namespace import __name__
```

Split namespace for argparse to allow separating options by prefix.

We use this to direct some options to an Options object and some to a
regular namespace.

---
## SplitNamespace
```python
from split_namespace import SplitNamespace
```



---
## __init__
```python
from split_namespace import __init__
```



---
## _get
```python
from split_namespace import _get
```



---
## __setattr__
```python
from split_namespace import __setattr__
```



---
## __getattr__
```python
from split_namespace import __getattr__
```



---
## __name__
```python
from ipc import __name__
```



---
## IPCException
```python
from ipc import IPCException
```

Exception for IPC issues.

---
## IPCBase
```python
from ipc import IPCBase
```

Base class for communication between the dmypy client and server.

This contains logic shared between the client and server, such as reading
and writing.
We want to be able to send multiple "messages" over a single connection and
to be able to separate the messages. We do this by encoding the messages
in an alphabet that does not contain spaces, then adding a space for
separation. The last framed message is also followed by a space.

---
## IPCClient
```python
from ipc import IPCClient
```

The client side of an IPC connection.

---
## IPCServer
```python
from ipc import IPCServer
```



---
## __init__
```python
from ipc import __init__
```



---
## frame_from_buffer
```python
from ipc import frame_from_buffer
```

Return a full frame from the bytes we have in the buffer.

---
## read
```python
from ipc import read
```

Read bytes from an IPC connection until we have a full frame.

---
## write
```python
from ipc import write
```

Write to an IPC connection.

---
## close
```python
from ipc import close
```



---
## __enter__
```python
from ipc import __enter__
```



---
## __exit__
```python
from ipc import __exit__
```



---
## cleanup
```python
from ipc import cleanup
```



---
## connection_name
```python
from ipc import connection_name
```



---
## is_dunder
```python
from util import is_dunder
```

Returns whether name is a dunder name.

Args:
    exclude_special: Whether to return False for a couple special dunder methods.

---
## is_sunder
```python
from util import is_sunder
```



---
## split_module_names
```python
from util import split_module_names
```

Return the module and all parent module names.

So, if `mod_name` is 'a.b.c', this function will return
['a.b.c', 'a.b', and 'a'].

---
## module_prefix
```python
from util import module_prefix
```



---
## split_target
```python
from util import split_target
```



---
## short_type
```python
from util import short_type
```

Return the last component of the type name of an object.

If obj is None, return 'nil'. For example, if obj is 1, return 'int'.

---
## find_python_encoding
```python
from util import find_python_encoding
```

PEP-263 for detecting Python file encoding

---
## bytes_to_human_readable_repr
```python
from util import bytes_to_human_readable_repr
```

Converts bytes into some human-readable representation. Unprintable
    bytes such as the nul byte are escaped. For example:

        >>> b = bytes([102, 111, 111, 10, 0])
        >>> s = bytes_to_human_readable_repr(b)
        >>> print(s)
        foo

        >>> print(repr(s))
        'foo\n\x00'
    

---
## DecodeError
```python
from util import DecodeError
```

Exception raised when a file cannot be decoded due to an unknown encoding type.

Essentially a wrapper for the LookupError raised by `bytearray.decode`

---
## decode_python_encoding
```python
from util import decode_python_encoding
```

Read the Python file with while obeying PEP-263 encoding detection.

Returns the source as a string.

---
## read_py_file
```python
from util import read_py_file
```

Try reading a Python file as list of source lines.

Return None if something goes wrong.

---
## trim_source_line
```python
from util import trim_source_line
```

Trim a line of source code to fit into max_len.

Show 'min_width' characters on each side of 'col' (an error location). If either
start or end is trimmed, this is indicated by adding '...' there.
A typical result looks like this:
    ...some_variable = function_to_call(one_arg, other_arg) or...

Return the trimmed string and the column offset to to adjust error location.

---
## get_mypy_comments
```python
from util import get_mypy_comments
```



---
## _generate_junit_contents
```python
from util import _generate_junit_contents
```



---
## write_junit_xml
```python
from util import write_junit_xml
```



---
## IdMapper
```python
from util import IdMapper
```

Generate integer ids for objects.

Unlike id(), these start from 0 and increment by 1, and ids won't
get reused across the life-time of IdMapper.

Assume objects don't redefine __eq__ or __hash__.

---
## get_prefix
```python
from util import get_prefix
```

Drop the final component of a qualified name (e.g. ('x.y' -> 'x').

---
## correct_relative_import
```python
from util import correct_relative_import
```



---
## get_class_descriptors
```python
from util import get_class_descriptors
```



---
## replace_object_state
```python
from util import replace_object_state
```

Copy state of old node to the new node.

This handles cases where there is __dict__ and/or attribute descriptors
(either from slots or because the type is defined in a C extension module).

Assume that both objects have the same __class__.

---
## is_sub_path
```python
from util import is_sub_path
```

Given two paths, return if path1 is a sub-path of path2.

---
## hard_exit
```python
from util import hard_exit
```

Kill the current process without fully cleaning up.

This can be quite a bit faster than a normal exit() since objects are not freed.

---
## unmangle
```python
from util import unmangle
```

Remove internal suffixes from a short name.

---
## get_unique_redefinition_name
```python
from util import get_unique_redefinition_name
```

Get a simple redefinition name not present among existing.

For example, for name 'foo' we try 'foo-redefinition', 'foo-redefinition2',
'foo-redefinition3', etc. until we find one that is not in existing.

---
## check_python_version
```python
from util import check_python_version
```

Report issues with the Python used to run mypy, dmypy, or stubgen

---
## count_stats
```python
from util import count_stats
```

Count total number of errors, notes and error_files in message list.

---
## split_words
```python
from util import split_words
```

Split line of text into words (but not within quoted groups).

---
## get_terminal_width
```python
from util import get_terminal_width
```

Get current terminal width if possible, otherwise return the default one.

---
## soft_wrap
```python
from util import soft_wrap
```

Wrap a long error message into few lines.

Breaks will only happen between words, and never inside a quoted group
(to avoid breaking types such as "Union[int, str]"). The 'first_offset' is
the width before the start of first line.

Pad every next line with 'num_indent' spaces. Every line will be at most 'max_len'
characters, except if it is a single word or quoted group.

For example:
           first_offset
    ------------------------
    path/to/file: error: 58: Some very long error message
        that needs to be split in separate lines.
        "Long[Type, Names]" are never split.
    ^^^^--------------------------------------------------
    num_indent           max_len

---
## hash_digest
```python
from util import hash_digest
```

Compute a hash digest of some data.

We use a cryptographic hash because we want a low probability of
accidental collision, but we don't really care about any of the
cryptographic properties.

---
## parse_gray_color
```python
from util import parse_gray_color
```

Reproduce a gray color in ANSI escape sequence

---
## should_force_color
```python
from util import should_force_color
```



---
## FancyFormatter
```python
from util import FancyFormatter
```

Apply color and bold font to terminal output.

This currently only works on Linux and Mac.

---
## is_typeshed_file
```python
from util import is_typeshed_file
```



---
## is_stub_package_file
```python
from util import is_stub_package_file
```



---
## unnamed_function
```python
from util import unnamed_function
```



---
## time_spent_us
```python
from util import time_spent_us
```



---
## plural_s
```python
from util import plural_s
```



---
## quote_docstring
```python
from util import quote_docstring
```

Returns docstring correctly encapsulated in a single or double quoted form.

---
## id
```python
from util import id
```



---
## initialize_vt100_colors
```python
from util import initialize_vt100_colors
```

Return True if initialization was successful and we can use colors, False otherwise

---
## initialize_win_colors
```python
from util import initialize_win_colors
```

Return True if initialization was successful and we can use colors, False otherwise

---
## initialize_unix_colors
```python
from util import initialize_unix_colors
```

Return True if initialization was successful and we can use colors, False otherwise

---
## style
```python
from util import style
```

Apply simple color and style (underlined or bold).

---
## fit_in_terminal
```python
from util import fit_in_terminal
```

Improve readability by wrapping error messages and trimming source code.

---
## colorize
```python
from util import colorize
```

Colorize an output line by highlighting the status and error code.

---
## highlight_quote_groups
```python
from util import highlight_quote_groups
```

Make groups quoted with double quotes bold (including quotes).

This is used to highlight types, attribute names etc.

---
## underline_link
```python
from util import underline_link
```

Underline a link in a note message (if any).

This assumes there is at most one link in the message.

---
## format_success
```python
from util import format_success
```

Format short summary in case of success.

n_sources is total number of files passed directly on command line,
i.e. excluding stubs and followed imports.

---
## format_error
```python
from util import format_error
```

Format a short summary in case of errors.

---
## __name__
```python
from type_visitor import __name__
```

Type visitor classes.

This module defines the type visitors that are intended to be
subclassed by other code.  They have been separated out into their own
module to ease converting mypy to run under mypyc, since currently
mypyc-extension classes can extend interpreted classes but not the
other way around. Separating them out, then, allows us to compile
types before we can compile everything that uses a TypeVisitor.

The visitors are all re-exported from mypy.types and that is how
other modules refer to them.

---
## TypeVisitor
```python
from type_visitor import TypeVisitor
```

Visitor class for types (Type subclasses).

The parameter T is the return type of the visit methods.

---
## SyntheticTypeVisitor
```python
from type_visitor import SyntheticTypeVisitor
```

A TypeVisitor that also knows how to visit synthetic AST constructs.

Not just real types.

---
## TypeTranslator
```python
from type_visitor import TypeTranslator
```

Identity type transformation.

Subclass this and override some methods to implement a non-trivial
transformation.

---
## TypeQuery
```python
from type_visitor import TypeQuery
```

Visitor for performing queries of types.

strategy is used to combine results for a series of types,
common use cases involve a boolean query using `any` or `all`.

Note: this visitor keeps an internal state (tracks type aliases to avoid
recursion), so it should *never* be re-used for querying different types,
create a new visitor instance instead.

# TODO: check that we don't have existing violations of this rule.

---
## BoolTypeQuery
```python
from type_visitor import BoolTypeQuery
```

Visitor for performing recursive queries of types with a bool result.

Use TypeQuery if you need non-bool results.

'strategy' is used to combine results for a series of types. It must
be ANY_STRATEGY or ALL_STRATEGY.

Note: This visitor keeps an internal state (tracks type aliases to avoid
recursion), so it should *never* be re-used for querying different types
unless you call reset() first.

---
## visit_unbound_type
```python
from type_visitor import visit_unbound_type
```



---
## visit_any
```python
from type_visitor import visit_any
```



---
## visit_none_type
```python
from type_visitor import visit_none_type
```



---
## visit_uninhabited_type
```python
from type_visitor import visit_uninhabited_type
```



---
## visit_erased_type
```python
from type_visitor import visit_erased_type
```



---
## visit_deleted_type
```python
from type_visitor import visit_deleted_type
```



---
## visit_type_var
```python
from type_visitor import visit_type_var
```



---
## visit_param_spec
```python
from type_visitor import visit_param_spec
```



---
## visit_parameters
```python
from type_visitor import visit_parameters
```



---
## visit_type_var_tuple
```python
from type_visitor import visit_type_var_tuple
```



---
## visit_instance
```python
from type_visitor import visit_instance
```



---
## visit_callable_type
```python
from type_visitor import visit_callable_type
```



---
## visit_overloaded
```python
from type_visitor import visit_overloaded
```



---
## visit_tuple_type
```python
from type_visitor import visit_tuple_type
```



---
## visit_typeddict_type
```python
from type_visitor import visit_typeddict_type
```



---
## visit_literal_type
```python
from type_visitor import visit_literal_type
```



---
## visit_union_type
```python
from type_visitor import visit_union_type
```



---
## visit_partial_type
```python
from type_visitor import visit_partial_type
```



---
## visit_type_type
```python
from type_visitor import visit_type_type
```



---
## visit_type_alias_type
```python
from type_visitor import visit_type_alias_type
```



---
## visit_unpack_type
```python
from type_visitor import visit_unpack_type
```



---
## visit_type_list
```python
from type_visitor import visit_type_list
```



---
## visit_callable_argument
```python
from type_visitor import visit_callable_argument
```



---
## visit_ellipsis_type
```python
from type_visitor import visit_ellipsis_type
```



---
## visit_raw_expression_type
```python
from type_visitor import visit_raw_expression_type
```



---
## visit_placeholder_type
```python
from type_visitor import visit_placeholder_type
```



---
## translate_types
```python
from type_visitor import translate_types
```



---
## translate_variables
```python
from type_visitor import translate_variables
```



---
## __init__
```python
from type_visitor import __init__
```



---
## query_types
```python
from type_visitor import query_types
```

Perform a query for a sequence of types using the strategy to combine the results.

---
## reset
```python
from type_visitor import reset
```

Clear mutable state (but preserve strategy).

This *must* be called if you want to reuse the visitor.

---
## __name__
```python
from mro import __name__
```



---
## calculate_mro
```python
from mro import calculate_mro
```

Calculate and set mro (method resolution order).

Raise MroError if cannot determine mro.

---
## MroError
```python
from mro import MroError
```

Raised if a consistent mro cannot be determined for a class.

---
## linearize_hierarchy
```python
from mro import linearize_hierarchy
```



---
## merge
```python
from mro import merge
```



---
## __name__
```python
from fswatcher import __name__
```

Watch parts of the file system for changes.

---
## FileData
```python
from fswatcher import FileData
```



---
## FileSystemWatcher
```python
from fswatcher import FileSystemWatcher
```

Watcher for file system changes among specific paths.

All file system access is performed using FileSystemCache. We
detect changed files by stat()ing them all and comparing hashes
of potentially changed files. If a file has both size and mtime
unmodified, the file is assumed to be unchanged.

An important goal of this class is to make it easier to eventually
use file system events to detect file changes.

Note: This class doesn't flush the file system cache. If you don't
manually flush it, changes won't be seen.

---
## __init__
```python
from fswatcher import __init__
```



---
## dump_file_data
```python
from fswatcher import dump_file_data
```



---
## set_file_data
```python
from fswatcher import set_file_data
```



---
## add_watched_paths
```python
from fswatcher import add_watched_paths
```



---
## remove_watched_paths
```python
from fswatcher import remove_watched_paths
```



---
## _update
```python
from fswatcher import _update
```



---
## _find_changed
```python
from fswatcher import _find_changed
```



---
## find_changed
```python
from fswatcher import find_changed
```

Return paths that have changes since the last call, in the watched set.

---
## update_changed
```python
from fswatcher import update_changed
```

Alternative to find_changed() given explicit changes.

This only calls self.fs.stat() on added or updated files, not
on all files.  It believes all other files are unchanged!

Implies add_watched_paths() for add and update, and
remove_watched_paths() for remove.

---
## __name__
```python
from checkstrformat import __name__
```

Format expression type checker.

This file is conceptually part of ExpressionChecker and TypeChecker. Main functionality
is located in StringFormatterChecker.check_str_format_call() for '{}'.format(), and in
StringFormatterChecker.check_str_interpolation() for printf-style % interpolation.

Note that although at runtime format strings are parsed using custom parsers,
here we use a regexp-based approach. This way we 99% match runtime behaviour while keeping
implementation simple.

---
## compile_format_re
```python
from checkstrformat import compile_format_re
```

Construct regexp to match format conversion specifiers in % interpolation.

See https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting
The regexp is intentionally a bit wider to report better errors.

---
## compile_new_format_re
```python
from checkstrformat import compile_new_format_re
```

Construct regexps to match format conversion specifiers in str.format() calls.

See After https://docs.python.org/3/library/string.html#formatspec for
specifications. The regexps are intentionally wider, to report better errors,
instead of just not matching.

---
## ConversionSpecifier
```python
from checkstrformat import ConversionSpecifier
```



---
## parse_conversion_specifiers
```python
from checkstrformat import parse_conversion_specifiers
```

Parse c-printf-style format string into list of conversion specifiers.

---
## parse_format_value
```python
from checkstrformat import parse_format_value
```

Parse format string into list of conversion specifiers.

The specifiers may be nested (two levels maximum), in this case they are ordered as
'{0:{1}}, {2:{3}{4}}'. Return None in case of an error.

---
## find_non_escaped_targets
```python
from checkstrformat import find_non_escaped_targets
```

Return list of raw (un-parsed) format specifiers in format string.

Format specifiers don't include enclosing braces. We don't use regexp for
this because they don't work well with nested/repeated patterns
(both greedy and non-greedy), and these are heavily used internally for
representation of f-strings.

Return None in case of an error.

---
## StringFormatterChecker
```python
from checkstrformat import StringFormatterChecker
```

String interpolation/formatter type checker.

This class works closely together with checker.ExpressionChecker.

---
## has_type_component
```python
from checkstrformat import has_type_component
```

Is this a specific instance type, or a union that contains it?

We use this ad-hoc function instead of a proper visitor or subtype check
because some str vs bytes errors are strictly speaking not runtime errors,
but rather highly counter-intuitive behavior. This is similar to what is used for
--strict-equality.

---
## __init__
```python
from checkstrformat import __init__
```

Construct an expression type checker.

---
## has_key
```python
from checkstrformat import has_key
```



---
## has_star
```python
from checkstrformat import has_star
```



---
## check_str_format_call
```python
from checkstrformat import check_str_format_call
```

Perform more precise checks for str.format() calls when possible.

Currently the checks are performed for:
  * Actual string literals
  * Literal types with string values
  * Final names with string values

The checks that we currently perform:
  * Check generic validity (e.g. unmatched { or }, and {} in invalid positions)
  * Check consistency of specifiers' auto-numbering
  * Verify that replacements can be found for all conversion specifiers,
    and all arguments were used
  * Non-standard format specs are only allowed for types with custom __format__
  * Type check replacements with accessors applied (if any).
  * Verify that specifier type is known and matches replacement type
  * Perform special checks for some specifier types:
    - 'c' requires a single character string
    - 's' must not accept bytes
    - non-empty flags are only allowed for numeric types

---
## check_specs_in_format_call
```python
from checkstrformat import check_specs_in_format_call
```

Perform pairwise checks for conversion specifiers vs their replacements.

The core logic for format checking is implemented in this method.

---
## perform_special_format_checks
```python
from checkstrformat import perform_special_format_checks
```



---
## find_replacements_in_call
```python
from checkstrformat import find_replacements_in_call
```

Find replacement expression for every specifier in str.format() call.

In case of an error use TempNode(AnyType).

---
## get_expr_by_position
```python
from checkstrformat import get_expr_by_position
```

Get positional replacement expression from '{0}, {1}'.format(x, y, ...) call.

If the type is from *args, return TempNode(<item type>). Return None in case of
an error.

---
## get_expr_by_name
```python
from checkstrformat import get_expr_by_name
```

Get named replacement expression from '{name}'.format(name=...) call.

If the type is from **kwargs, return TempNode(<item type>). Return None in case of
an error.

---
## auto_generate_keys
```python
from checkstrformat import auto_generate_keys
```

Translate '{} {name} {}' to '{0} {name} {1}'.

Return True if generation was successful, otherwise report an error and return false.

---
## apply_field_accessors
```python
from checkstrformat import apply_field_accessors
```

Transform and validate expr in '{.attr[item]}'.format(expr) into expr.attr['item'].

If validation fails, return TempNode(AnyType).

---
## validate_and_transform_accessors
```python
from checkstrformat import validate_and_transform_accessors
```

Validate and transform (in-place) format field accessors.

On error, report it and return False. The transformations include replacing the dummy
variable with actual replacement expression and translating any name expressions in an
index into strings, so that this will work:

    class User(TypedDict):
        name: str
        id: int
    u: User
    '{[id]:d} -> {[name]}'.format(u)

---
## check_str_interpolation
```python
from checkstrformat import check_str_interpolation
```

Check the types of the 'replacements' in a string interpolation
expression: str % replacements.

---
## analyze_conversion_specifiers
```python
from checkstrformat import analyze_conversion_specifiers
```



---
## check_simple_str_interpolation
```python
from checkstrformat import check_simple_str_interpolation
```

Check % string interpolation with positional specifiers '%s, %d' % ('yes, 42').

---
## check_mapping_str_interpolation
```python
from checkstrformat import check_mapping_str_interpolation
```

Check % string interpolation with names specifiers '%(name)s' % {'name': 'John'}.

---
## build_dict_type
```python
from checkstrformat import build_dict_type
```

Build expected mapping type for right operand in % formatting.

---
## build_replacement_checkers
```python
from checkstrformat import build_replacement_checkers
```



---
## replacement_checkers
```python
from checkstrformat import replacement_checkers
```

Returns a list of tuples of two functions that check whether a replacement is
of the right type for the specifier. The first function takes a node and checks
its type in the right type context. The second function just checks a type.

---
## checkers_for_star
```python
from checkstrformat import checkers_for_star
```

Returns a tuple of check functions that check whether, respectively,
a node or a type is compatible with a star in a conversion specifier.

---
## check_placeholder_type
```python
from checkstrformat import check_placeholder_type
```



---
## checkers_for_regular_type
```python
from checkstrformat import checkers_for_regular_type
```

Returns a tuple of check functions that check whether, respectively,
a node or a type is compatible with 'type'. Return None in case of an error.

---
## check_s_special_cases
```python
from checkstrformat import check_s_special_cases
```

Additional special cases for %s in bytes vs string context.

---
## checkers_for_c_type
```python
from checkstrformat import checkers_for_c_type
```

Returns a tuple of check functions that check whether, respectively,
a node or a type is compatible with 'type' that is a character type.

---
## conversion_type
```python
from checkstrformat import conversion_type
```

Return the type that is accepted for a string interpolation conversion specifier type.

Note that both Python's float (e.g. %f) and integer (e.g. %d)
specifier types accept both float and integers.

The 'format_call' argument indicates whether this type came from % interpolation or from
a str.format() call, the meaning of few formatting types are different.

---
## named_type
```python
from checkstrformat import named_type
```

Return an instance type with type given by the name and no type
arguments. Alias for TypeChecker.named_type.

---
## accept
```python
from checkstrformat import accept
```

Type check a node. Alias for TypeChecker.accept.

---
## check_type
```python
from checkstrformat import check_type
```



---
## check_expr
```python
from checkstrformat import check_expr
```

int, or str with length 1

---
## __name__
```python
from inspections import __name__
```



---
## node_starts_after
```python
from inspections import node_starts_after
```



---
## node_ends_before
```python
from inspections import node_ends_before
```



---
## expr_span
```python
from inspections import expr_span
```

Format expression span as in mypy error messages.

---
## get_instance_fallback
```python
from inspections import get_instance_fallback
```

Returns the Instance fallback for this type if one exists or None.

---
## find_node
```python
from inspections import find_node
```

Find the node defining member 'name' in given TypeInfo.

---
## find_module_by_fullname
```python
from inspections import find_module_by_fullname
```

Find module by a node fullname.

This logic mimics the one we use in fixup, so should be good enough.

---
## SearchVisitor
```python
from inspections import SearchVisitor
```

Visitor looking for an expression whose span matches given one exactly.

---
## find_by_location
```python
from inspections import find_by_location
```

Find an expression matching given span, or None if not found.

---
## SearchAllVisitor
```python
from inspections import SearchAllVisitor
```

Visitor looking for all expressions whose spans enclose given position.

---
## find_all_by_location
```python
from inspections import find_all_by_location
```

Find all expressions enclosing given position starting from innermost.

---
## InspectionEngine
```python
from inspections import InspectionEngine
```

Engine for locating and statically inspecting expressions.

---
## parse_location
```python
from inspections import parse_location
```



---
## __init__
```python
from inspections import __init__
```



---
## visit
```python
from inspections import visit
```



---
## reload_module
```python
from inspections import reload_module
```

Reload given module while temporary exporting types.

---
## expr_type
```python
from inspections import expr_type
```

Format type for an expression using current options.

If type is known, second item returned is True. If type is not known, an error
message is returned instead, and second item returned is False.

---
## object_type
```python
from inspections import object_type
```



---
## collect_attrs
```python
from inspections import collect_attrs
```

Collect attributes from all union/typevar variants.

---
## _fill_from_dict
```python
from inspections import _fill_from_dict
```



---
## expr_attrs
```python
from inspections import expr_attrs
```

Format attributes that are valid for a given expression.

If expression type is not an Instance, try using fallback. Attributes are
returned as a JSON (ordered by MRO) that maps base class name to list of
attributes. Attributes may appear in multiple bases if overridden (we simply
follow usual mypy logic for creating new Vars etc).

---
## format_node
```python
from inspections import format_node
```



---
## collect_nodes
```python
from inspections import collect_nodes
```

Collect nodes that can be referred to by an expression.

Note: it can be more than one for example in case of a union attribute.

---
## modules_for_nodes
```python
from inspections import modules_for_nodes
```

Gather modules where given nodes where defined.

Also check if they need to be refreshed (cached nodes may have
lines/columns missing).

---
## expression_def
```python
from inspections import expression_def
```

Find and format definition location for an expression.

If it is not a RefExpr, it is effectively skipped by returning an
empty result.

---
## missing_type
```python
from inspections import missing_type
```



---
## missing_node
```python
from inspections import missing_node
```



---
## add_prefixes
```python
from inspections import add_prefixes
```



---
## run_inspection_by_exact_location
```python
from inspections import run_inspection_by_exact_location
```

Get type of an expression matching a span.

Type or error is returned as a standard daemon response dict.

---
## run_inspection_by_position
```python
from inspections import run_inspection_by_position
```

Get types of all expressions enclosing a position.

Types and/or errors are returned as a standard daemon response dict.

---
## find_module
```python
from inspections import find_module
```

Find module by path, or return a suitable error message.

Note we don't use exceptions to simplify handling 1 vs 2 statuses.

---
## run_inspection
```python
from inspections import run_inspection
```

Top-level logic to inspect expression(s) at a location.

This can be re-used by various simple inspections.

---
## get_type
```python
from inspections import get_type
```

Get types of expression(s) at a location.

---
## get_attrs
```python
from inspections import get_attrs
```

Get attributes of expression(s) at a location.

---
## get_definition
```python
from inspections import get_definition
```

Get symbol definitions of expression(s) at a location.

---
## item_attrs
```python
from inspections import item_attrs
```



---
## cmp_types
```python
from inspections import cmp_types
```



---
## __name__
```python
from stubinfo import __name__
```



---
## is_legacy_bundled_package
```python
from stubinfo import is_legacy_bundled_package
```



---
## approved_stub_package_exists
```python
from stubinfo import approved_stub_package_exists
```



---
## stub_distribution_name
```python
from stubinfo import stub_distribution_name
```



---
## __name__
```python
from treetransform import __name__
```

Base visitor that implements an identity AST transform.

Subclass TransformVisitor to perform non-trivial transformations.

---
## TransformVisitor
```python
from treetransform import TransformVisitor
```

Transform a semantically analyzed AST (or subtree) to an identical copy.

Use the node() method to transform an AST node.

Subclass to perform a non-identity transform.

Notes:

 * This can only be used to transform functions or classes, not top-level
   statements, and/or modules as a whole.
 * Do not duplicate TypeInfo nodes. This would generally not be desirable.
 * Only update some name binding cross-references, but only those that
   refer to Var, Decorator or FuncDef nodes, not those targeting ClassDef or
   TypeInfo nodes.
 * Types are not transformed, but you can override type() to also perform
   type transformation.

TODO nested classes and functions have not been tested well enough

---
## FuncMapInitializer
```python
from treetransform import FuncMapInitializer
```

This traverser creates mappings from nested FuncDefs to placeholder FuncDefs.

The placeholders will later be replaced with transformed nodes.

---
## __init__
```python
from treetransform import __init__
```



---
## visit_mypy_file
```python
from treetransform import visit_mypy_file
```



---
## visit_import
```python
from treetransform import visit_import
```



---
## visit_import_from
```python
from treetransform import visit_import_from
```



---
## visit_import_all
```python
from treetransform import visit_import_all
```



---
## copy_argument
```python
from treetransform import copy_argument
```



---
## visit_func_def
```python
from treetransform import visit_func_def
```



---
## visit_lambda_expr
```python
from treetransform import visit_lambda_expr
```



---
## copy_function_attributes
```python
from treetransform import copy_function_attributes
```



---
## visit_overloaded_func_def
```python
from treetransform import visit_overloaded_func_def
```



---
## visit_class_def
```python
from treetransform import visit_class_def
```



---
## visit_global_decl
```python
from treetransform import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from treetransform import visit_nonlocal_decl
```



---
## visit_block
```python
from treetransform import visit_block
```



---
## visit_decorator
```python
from treetransform import visit_decorator
```



---
## visit_var
```python
from treetransform import visit_var
```



---
## visit_expression_stmt
```python
from treetransform import visit_expression_stmt
```



---
## visit_assignment_stmt
```python
from treetransform import visit_assignment_stmt
```



---
## duplicate_assignment
```python
from treetransform import duplicate_assignment
```



---
## visit_operator_assignment_stmt
```python
from treetransform import visit_operator_assignment_stmt
```



---
## visit_while_stmt
```python
from treetransform import visit_while_stmt
```



---
## visit_for_stmt
```python
from treetransform import visit_for_stmt
```



---
## visit_return_stmt
```python
from treetransform import visit_return_stmt
```



---
## visit_assert_stmt
```python
from treetransform import visit_assert_stmt
```



---
## visit_del_stmt
```python
from treetransform import visit_del_stmt
```



---
## visit_if_stmt
```python
from treetransform import visit_if_stmt
```



---
## visit_break_stmt
```python
from treetransform import visit_break_stmt
```



---
## visit_continue_stmt
```python
from treetransform import visit_continue_stmt
```



---
## visit_pass_stmt
```python
from treetransform import visit_pass_stmt
```



---
## visit_raise_stmt
```python
from treetransform import visit_raise_stmt
```



---
## visit_try_stmt
```python
from treetransform import visit_try_stmt
```



---
## visit_with_stmt
```python
from treetransform import visit_with_stmt
```



---
## visit_as_pattern
```python
from treetransform import visit_as_pattern
```



---
## visit_or_pattern
```python
from treetransform import visit_or_pattern
```



---
## visit_value_pattern
```python
from treetransform import visit_value_pattern
```



---
## visit_singleton_pattern
```python
from treetransform import visit_singleton_pattern
```



---
## visit_sequence_pattern
```python
from treetransform import visit_sequence_pattern
```



---
## visit_starred_pattern
```python
from treetransform import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from treetransform import visit_mapping_pattern
```



---
## visit_class_pattern
```python
from treetransform import visit_class_pattern
```



---
## visit_match_stmt
```python
from treetransform import visit_match_stmt
```



---
## visit_star_expr
```python
from treetransform import visit_star_expr
```



---
## visit_int_expr
```python
from treetransform import visit_int_expr
```



---
## visit_str_expr
```python
from treetransform import visit_str_expr
```



---
## visit_bytes_expr
```python
from treetransform import visit_bytes_expr
```



---
## visit_float_expr
```python
from treetransform import visit_float_expr
```



---
## visit_complex_expr
```python
from treetransform import visit_complex_expr
```



---
## visit_ellipsis
```python
from treetransform import visit_ellipsis
```



---
## visit_name_expr
```python
from treetransform import visit_name_expr
```



---
## duplicate_name
```python
from treetransform import duplicate_name
```



---
## visit_member_expr
```python
from treetransform import visit_member_expr
```



---
## copy_ref
```python
from treetransform import copy_ref
```



---
## visit_yield_from_expr
```python
from treetransform import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from treetransform import visit_yield_expr
```



---
## visit_await_expr
```python
from treetransform import visit_await_expr
```



---
## visit_call_expr
```python
from treetransform import visit_call_expr
```



---
## visit_op_expr
```python
from treetransform import visit_op_expr
```



---
## visit_comparison_expr
```python
from treetransform import visit_comparison_expr
```



---
## visit_cast_expr
```python
from treetransform import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from treetransform import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from treetransform import visit_reveal_expr
```



---
## visit_super_expr
```python
from treetransform import visit_super_expr
```



---
## visit_assignment_expr
```python
from treetransform import visit_assignment_expr
```



---
## visit_unary_expr
```python
from treetransform import visit_unary_expr
```



---
## visit_list_expr
```python
from treetransform import visit_list_expr
```



---
## visit_dict_expr
```python
from treetransform import visit_dict_expr
```



---
## visit_tuple_expr
```python
from treetransform import visit_tuple_expr
```



---
## visit_set_expr
```python
from treetransform import visit_set_expr
```



---
## visit_index_expr
```python
from treetransform import visit_index_expr
```



---
## visit_type_application
```python
from treetransform import visit_type_application
```



---
## visit_list_comprehension
```python
from treetransform import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from treetransform import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from treetransform import visit_dictionary_comprehension
```



---
## visit_generator_expr
```python
from treetransform import visit_generator_expr
```



---
## duplicate_generator
```python
from treetransform import duplicate_generator
```



---
## visit_slice_expr
```python
from treetransform import visit_slice_expr
```



---
## visit_conditional_expr
```python
from treetransform import visit_conditional_expr
```



---
## visit_type_var_expr
```python
from treetransform import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from treetransform import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from treetransform import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from treetransform import visit_type_alias_expr
```



---
## visit_newtype_expr
```python
from treetransform import visit_newtype_expr
```



---
## visit_namedtuple_expr
```python
from treetransform import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from treetransform import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from treetransform import visit_typeddict_expr
```



---
## visit__promote_expr
```python
from treetransform import visit__promote_expr
```



---
## visit_temp_node
```python
from treetransform import visit_temp_node
```



---
## node
```python
from treetransform import node
```



---
## mypyfile
```python
from treetransform import mypyfile
```



---
## expr
```python
from treetransform import expr
```



---
## stmt
```python
from treetransform import stmt
```



---
## pattern
```python
from treetransform import pattern
```



---
## optional_expr
```python
from treetransform import optional_expr
```



---
## block
```python
from treetransform import block
```



---
## optional_block
```python
from treetransform import optional_block
```



---
## statements
```python
from treetransform import statements
```



---
## expressions
```python
from treetransform import expressions
```



---
## optional_expressions
```python
from treetransform import optional_expressions
```



---
## blocks
```python
from treetransform import blocks
```



---
## names
```python
from treetransform import names
```



---
## optional_names
```python
from treetransform import optional_names
```



---
## type
```python
from treetransform import type
```



---
## optional_type
```python
from treetransform import optional_type
```



---
## types
```python
from treetransform import types
```



---
## __name__
```python
from maptype import __name__
```



---
## map_instance_to_supertype
```python
from maptype import map_instance_to_supertype
```

Produce a supertype of `instance` that is an Instance
of `superclass`, mapping type arguments up the chain of bases.

If `superclass` is not a nominal superclass of `instance.type`,
then all type arguments are mapped to 'Any'.

---
## map_instance_to_supertypes
```python
from maptype import map_instance_to_supertypes
```



---
## class_derivation_paths
```python
from maptype import class_derivation_paths
```

Return an array of non-empty paths of direct base classes from
type to supertype.  Return [] if no such path could be found.

  InterfaceImplementationPaths(A, B) == [[B]] if A inherits B
  InterfaceImplementationPaths(A, C) == [[B, C]] if A inherits B and
                                                    B inherits C

---
## map_instance_to_direct_supertypes
```python
from maptype import map_instance_to_direct_supertypes
```



---
## __name__
```python
from indirection import __name__
```



---
## extract_module_names
```python
from indirection import extract_module_names
```

Returns the module names of a fully qualified type name.

---
## TypeIndirectionVisitor
```python
from indirection import TypeIndirectionVisitor
```

Returns all module references within a particular type.

---
## __init__
```python
from indirection import __init__
```



---
## find_modules
```python
from indirection import find_modules
```



---
## _visit
```python
from indirection import _visit
```



---
## visit_unbound_type
```python
from indirection import visit_unbound_type
```



---
## visit_any
```python
from indirection import visit_any
```



---
## visit_none_type
```python
from indirection import visit_none_type
```



---
## visit_uninhabited_type
```python
from indirection import visit_uninhabited_type
```



---
## visit_erased_type
```python
from indirection import visit_erased_type
```



---
## visit_deleted_type
```python
from indirection import visit_deleted_type
```



---
## visit_type_var
```python
from indirection import visit_type_var
```



---
## visit_param_spec
```python
from indirection import visit_param_spec
```



---
## visit_type_var_tuple
```python
from indirection import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from indirection import visit_unpack_type
```



---
## visit_parameters
```python
from indirection import visit_parameters
```



---
## visit_instance
```python
from indirection import visit_instance
```



---
## visit_callable_type
```python
from indirection import visit_callable_type
```



---
## visit_overloaded
```python
from indirection import visit_overloaded
```



---
## visit_tuple_type
```python
from indirection import visit_tuple_type
```



---
## visit_typeddict_type
```python
from indirection import visit_typeddict_type
```



---
## visit_literal_type
```python
from indirection import visit_literal_type
```



---
## visit_union_type
```python
from indirection import visit_union_type
```



---
## visit_partial_type
```python
from indirection import visit_partial_type
```



---
## visit_type_type
```python
from indirection import visit_type_type
```



---
## visit_type_alias_type
```python
from indirection import visit_type_alias_type
```



---
## __name__
```python
from constant_fold import __name__
```

Constant folding of IR values.

For example, 3 + 5 can be constant folded into 8.

This is mostly like mypy.constant_fold, but we can bind some additional
NameExpr and MemberExpr references here, since we have more knowledge
about which definitions can be trusted -- we constant fold only references
to other compiled modules in the same compilation unit.

---
## constant_fold_expr
```python
from constant_fold import constant_fold_expr
```

Return the constant value of an expression for supported operations.

Return None otherwise.

---
## constant_fold_binary_op
```python
from constant_fold import constant_fold_binary_op
```



---
## constant_fold_binary_int_op
```python
from constant_fold import constant_fold_binary_int_op
```



---
## constant_fold_binary_float_op
```python
from constant_fold import constant_fold_binary_float_op
```



---
## constant_fold_unary_op
```python
from constant_fold import constant_fold_unary_op
```



---
## __name__
```python
from lookup import __name__
```

This is a module for various lookup functions:
functions that will find a semantic node by its name.

---
## lookup_fully_qualified
```python
from lookup import lookup_fully_qualified
```

Find a symbol using it fully qualified name.

The algorithm has two steps: first we try splitting the name on '.' to find
the module, then iteratively look for each next chunk after a '.' (e.g. for
nested classes).

This function should *not* be used to find a module. Those should be looked
in the modules dictionary.

---
## __name__
```python
from graph_utils import __name__
```

Helpers for manipulations with graphs.

---
## strongly_connected_components
```python
from graph_utils import strongly_connected_components
```

Compute Strongly Connected Components of a directed graph.

Args:
  vertices: the labels for the vertices
  edges: for each vertex, gives the target vertices of its outgoing edges

Returns:
  An iterator yielding strongly connected components, each
  represented as a set of vertices.  Each input vertex will occur
  exactly once; vertices not part of a SCC are returned as
  singleton sets.

From https://code.activestate.com/recipes/578507/.

---
## prepare_sccs
```python
from graph_utils import prepare_sccs
```

Use original edges to organize SCCs in a graph by dependencies between them.

---
## topsort
```python
from graph_utils import topsort
```

Topological sort.

Args:
  data: A map from vertices to all vertices that it has an edge
        connecting it to.  NOTE: This data structure
        is modified in place -- for normalization purposes,
        self-dependencies are removed and entries representing
        orphans are added.

Returns:
  An iterator yielding sets of vertices that have an equivalent
  ordering.

Example:
  Suppose the input has the following structure:

    {A: {B, C}, B: {D}, C: {D}}

  This is normalized to:

    {A: {B, C}, B: {D}, C: {D}, D: {}}

  The algorithm will yield the following values:

    {D}
    {B, C}
    {A}

From https://code.activestate.com/recipes/577413/.

---
## dfs
```python
from graph_utils import dfs
```



---
## __name__
```python
from memprofile import __name__
```

Utility for dumping memory usage stats.

This is tailored to mypy and knows (a little) about which list objects are
owned by particular AST nodes, etc.

---
## collect_memory_stats
```python
from memprofile import collect_memory_stats
```

Return stats about memory use.

Return a tuple with these items:
  - Dict from object kind to number of instances of that kind
  - Dict from object kind to total bytes used by all instances of that kind

---
## print_memory_profile
```python
from memprofile import print_memory_profile
```



---
## find_recursive_objects
```python
from memprofile import find_recursive_objects
```

Find additional objects referenced by objs and append them to objs.

We use this since gc.get_objects() does not return objects without pointers
in them such as strings.

---
## visit
```python
from memprofile import visit
```



---
## __name__
```python
from meet import __name__
```



---
## trivial_meet
```python
from meet import trivial_meet
```

Return one of types (expanded) if it is a subtype of other, otherwise bottom type.

---
## meet_types
```python
from meet import meet_types
```

Return the greatest lower bound of two types.

---
## narrow_declared_type
```python
from meet import narrow_declared_type
```

Return the declared type narrowed down to another type.

---
## get_possible_variants
```python
from meet import get_possible_variants
```

This function takes any "Union-like" type and returns a list of the available "options".

Specifically, there are currently exactly three different types that can have
"variants" or are "union-like":

- Unions
- TypeVars with value restrictions
- Overloads

This function will return a list of each "option" present in those types.

If this function receives any other type, we return a list containing just that
original type. (E.g. pretend the type was contained within a singleton union).

The only current exceptions are regular TypeVars and ParamSpecs. For these "TypeVarLike"s,
we return a list containing that TypeVarLike's upper bound.

This function is useful primarily when checking to see if two types are overlapping:
the algorithm to check if two unions are overlapping is fundamentally the same as
the algorithm for checking if two overloads are overlapping.

Normalizing both kinds of types in the same way lets us reuse the same algorithm
for both.

---
## is_enum_overlapping_union
```python
from meet import is_enum_overlapping_union
```

Return True if x is an Enum, and y is an Union with at least one Literal from x

---
## is_literal_in_union
```python
from meet import is_literal_in_union
```

Return True if x is a Literal and y is an Union that includes x

---
## is_object
```python
from meet import is_object
```



---
## is_overlapping_types
```python
from meet import is_overlapping_types
```

Can a value of type 'left' also be of type 'right' or vice-versa?

If 'ignore_promotions' is True, we ignore promotions while checking for overlaps.
If 'prohibit_none_typevar_overlap' is True, we disallow None from overlapping with
TypeVars (in both strict-optional and non-strict-optional mode).
If 'overlap_for_overloads' is True, we check for overlaps more strictly (to avoid false
positives), for example: None only overlaps with explicitly optional types, Any
doesn't overlap with anything except object, we don't ignore positional argument names.

---
## is_overlapping_erased_types
```python
from meet import is_overlapping_erased_types
```

The same as 'is_overlapping_erased_types', except the types are erased first.

---
## are_typed_dicts_overlapping
```python
from meet import are_typed_dicts_overlapping
```

Returns 'true' if left and right are overlapping TypeDictTypes.

---
## are_tuples_overlapping
```python
from meet import are_tuples_overlapping
```

Returns true if left and right are overlapping tuples.

---
## expand_tuple_if_possible
```python
from meet import expand_tuple_if_possible
```



---
## adjust_tuple
```python
from meet import adjust_tuple
```

Find out if `left` is a Tuple[A, ...], and adjust its length to `right`

---
## is_tuple
```python
from meet import is_tuple
```



---
## TypeMeetVisitor
```python
from meet import TypeMeetVisitor
```



---
## meet_similar_callables
```python
from meet import meet_similar_callables
```



---
## meet_type_list
```python
from meet import meet_type_list
```



---
## typed_dict_mapping_pair
```python
from meet import typed_dict_mapping_pair
```

Is this a pair where one type is a TypedDict and another one is an instance of Mapping?

This case requires a precise/principled consideration because there are two use cases
that push the boundary the opposite ways: we need to avoid spurious overlaps to avoid
false positives for overloads, but we also need to avoid spuriously non-overlapping types
to avoid false positives with --strict-equality.

---
## typed_dict_mapping_overlap
```python
from meet import typed_dict_mapping_overlap
```

Check if a TypedDict type is overlapping with a Mapping.

The basic logic here consists of two rules:

* A TypedDict with some required keys is overlapping with Mapping[str, <some type>]
  if and only if every key type is overlapping with <some type>. For example:

  - TypedDict(x=int, y=str) overlaps with Dict[str, Union[str, int]]
  - TypedDict(x=int, y=str) doesn't overlap with Dict[str, int]

  Note that any additional non-required keys can't change the above result.

* A TypedDict with no required keys overlaps with Mapping[str, <some type>] if and
  only if at least one of key types overlaps with <some type>. For example:

  - TypedDict(x=str, y=str, total=False) overlaps with Dict[str, str]
  - TypedDict(x=str, y=str, total=False) doesn't overlap with Dict[str, int]
  - TypedDict(x=int, y=str, total=False) overlaps with Dict[str, str]

As usual empty, dictionaries lie in a gray area. In general, List[str] and List[str]
are considered non-overlapping despite empty list belongs to both. However, List[int]
and List[Never] are considered overlapping.

So here we follow the same logic: a TypedDict with no required keys is considered
non-overlapping with Mapping[str, <some type>], but is considered overlapping with
Mapping[Never, Never]. This way we avoid false positives for overloads, and also
avoid false positives for comparisons like SomeTypedDict == {} under --strict-equality.

---
## _is_overlapping_types
```python
from meet import _is_overlapping_types
```

Encode the kind of overlapping check to perform.

This function mostly exists, so we don't have to repeat keyword arguments everywhere.

---
## is_none_object_overlap
```python
from meet import is_none_object_overlap
```



---
## _is_subtype
```python
from meet import _is_subtype
```



---
## is_none_typevarlike_overlap
```python
from meet import is_none_typevarlike_overlap
```



---
## _type_object_overlap
```python
from meet import _type_object_overlap
```

Special cases for type object types overlaps.

---
## __init__
```python
from meet import __init__
```



---
## visit_unbound_type
```python
from meet import visit_unbound_type
```



---
## visit_any
```python
from meet import visit_any
```



---
## visit_union_type
```python
from meet import visit_union_type
```



---
## visit_none_type
```python
from meet import visit_none_type
```



---
## visit_uninhabited_type
```python
from meet import visit_uninhabited_type
```



---
## visit_deleted_type
```python
from meet import visit_deleted_type
```



---
## visit_erased_type
```python
from meet import visit_erased_type
```



---
## visit_type_var
```python
from meet import visit_type_var
```



---
## visit_param_spec
```python
from meet import visit_param_spec
```



---
## visit_type_var_tuple
```python
from meet import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from meet import visit_unpack_type
```



---
## visit_parameters
```python
from meet import visit_parameters
```



---
## visit_instance
```python
from meet import visit_instance
```



---
## visit_callable_type
```python
from meet import visit_callable_type
```



---
## visit_overloaded
```python
from meet import visit_overloaded
```



---
## meet_tuples
```python
from meet import meet_tuples
```

Meet two tuple types while handling variadic entries.

This is surprisingly tricky, and we don't handle some tricky corner cases.
Most of the trickiness comes from the variadic tuple items like *tuple[X, ...]
since they can have arbitrary partial overlaps (while *Ts can't be split). This
function is roughly a mirror of join_tuples() w.r.t. to the fact that fixed
tuples are subtypes of variadic ones but not vice versa.

---
## visit_tuple_type
```python
from meet import visit_tuple_type
```



---
## visit_typeddict_type
```python
from meet import visit_typeddict_type
```



---
## visit_literal_type
```python
from meet import visit_literal_type
```



---
## visit_partial_type
```python
from meet import visit_partial_type
```



---
## visit_type_type
```python
from meet import visit_type_type
```



---
## visit_type_alias_type
```python
from meet import visit_type_alias_type
```



---
## meet
```python
from meet import meet
```



---
## default
```python
from meet import default
```



---
## __name__
```python
from semanal_newtype import __name__
```

Semantic analysis of NewType definitions.

This is conceptually part of mypy.semanal (semantic analyzer pass 2).

---
## NewTypeAnalyzer
```python
from semanal_newtype import NewTypeAnalyzer
```



---
## __init__
```python
from semanal_newtype import __init__
```



---
## process_newtype_declaration
```python
from semanal_newtype import process_newtype_declaration
```

Check if s declares a NewType; if yes, store it in symbol table.

Return True if it's a NewType declaration. The current target may be
deferred as a side effect if the base type is not ready, even if
the return value is True.

The logic in this function mostly copies the logic for visit_class_def()
with a single (non-Generic) base.

---
## analyze_newtype_declaration
```python
from semanal_newtype import analyze_newtype_declaration
```

Return the NewType call expression if `s` is a newtype declaration or None otherwise.

---
## check_newtype_args
```python
from semanal_newtype import check_newtype_args
```

Ananlyze base type in NewType call.

Return a tuple (type, should defer).

---
## build_newtype_typeinfo
```python
from semanal_newtype import build_newtype_typeinfo
```



---
## make_argument
```python
from semanal_newtype import make_argument
```



---
## fail
```python
from semanal_newtype import fail
```



---
## TypeOfAny
```python
from types import TypeOfAny
```

This class describes different types of Any. Each 'Any' can be of only one type at a time.

---
## deserialize_type
```python
from types import deserialize_type
```



---
## Type
```python
from types import Type
```

Abstract base class for all types.

---
## TypeAliasType
```python
from types import TypeAliasType
```

A type alias to another type.

To support recursive type aliases we don't immediately expand a type alias
during semantic analysis, but create an instance of this type that records the target alias
definition node (mypy.nodes.TypeAlias) and type arguments (for generic aliases).

This is very similar to how TypeInfo vs Instance interact, where a recursive class-based
structure like
    class Node:
        value: int
        children: List[Node]
can be represented in a tree-like manner.

---
## TypeGuardedType
```python
from types import TypeGuardedType
```

Only used by find_isinstance_check() etc.

---
## RequiredType
```python
from types import RequiredType
```

Required[T] or NotRequired[T]. Only usable at top-level of a TypedDict definition.

---
## ProperType
```python
from types import ProperType
```

Not a type alias.

Every type except TypeAliasType must inherit from this type.

---
## TypeVarId
```python
from types import TypeVarId
```



---
## TypeVarLikeType
```python
from types import TypeVarLikeType
```



---
## TypeVarType
```python
from types import TypeVarType
```

Type that refers to a type variable.

---
## ParamSpecFlavor
```python
from types import ParamSpecFlavor
```



---
## ParamSpecType
```python
from types import ParamSpecType
```

Type that refers to a ParamSpec.

A ParamSpec is a type variable that represents the parameter
types, names and kinds of a callable (i.e., the signature without
the return type).

This can be one of these forms
 * P (ParamSpecFlavor.BARE)
 * P.args (ParamSpecFlavor.ARGS)
 * P.kwargs (ParamSpecFLavor.KWARGS)

The upper_bound is really used as a fallback type -- it's shared
with TypeVarType for simplicity. It can't be specified by the user
and the value is directly derived from the flavor (currently
always just 'object').

---
## TypeVarTupleType
```python
from types import TypeVarTupleType
```

Type that refers to a TypeVarTuple.

See PEP646 for more information.

---
## UnboundType
```python
from types import UnboundType
```

Instance type that has not been bound during semantic analysis.

---
## CallableArgument
```python
from types import CallableArgument
```

Represents a Arg(type, 'name') inside a Callable's type list.

Note that this is a synthetic type for helping parse ASTs, not a real type.

---
## TypeList
```python
from types import TypeList
```

Information about argument types and names [...].

This is used for the arguments of a Callable type, i.e. for
[arg, ...] in Callable[[arg, ...], ret]. This is not a real type
but a syntactic AST construct. UnboundTypes can also have TypeList
types before they are processed into Callable types.

---
## UnpackType
```python
from types import UnpackType
```

Type operator Unpack from PEP646. Can be either with Unpack[]
or unpacking * syntax.

The inner type should be either a TypeVarTuple, or a variable length tuple.
In an exceptional case of callable star argument it can be a fixed length tuple.

Note: the above restrictions are only guaranteed by normalizations after semantic
analysis, if your code needs to handle UnpackType *during* semantic analysis, it is
wild west, technically anything can be present in the wrapped type.

---
## AnyType
```python
from types import AnyType
```

The type 'Any'.

---
## UninhabitedType
```python
from types import UninhabitedType
```

This type has no members.

This type is the bottom type.
With strict Optional checking, it is the only common subtype between all
other types, which allows `meet` to be well defined.  Without strict
Optional checking, NoneType fills this role.

In general, for any type T:
    join(UninhabitedType, T) = T
    meet(UninhabitedType, T) = UninhabitedType
    is_subtype(UninhabitedType, T) = True

---
## NoneType
```python
from types import NoneType
```

The type of 'None'.

This type can be written by users as 'None'.

---
## ErasedType
```python
from types import ErasedType
```

Placeholder for an erased type.

This is used during type inference. This has the special property that
it is ignored during type inference.

---
## DeletedType
```python
from types import DeletedType
```

Type of deleted variables.

These can be used as lvalues but not rvalues.

---
## ExtraAttrs
```python
from types import ExtraAttrs
```

Summary of module attributes and types.

This is used for instances of types.ModuleType, because they can have different
attributes per instance, and for type narrowing with hasattr() checks.

---
## Instance
```python
from types import Instance
```

An instance type of form C[T1, ..., Tn].

The list of type variables may be empty.

Several types have fallbacks to `Instance`, because in Python everything is an object
and this concept is impossible to express without intersection types. We therefore use
fallbacks for all "non-special" (like UninhabitedType, ErasedType etc) types.

---
## FunctionLike
```python
from types import FunctionLike
```

Abstract base class for function types.

---
## FormalArgument
```python
from types import FormalArgument
```



---
## Parameters
```python
from types import Parameters
```

Type that represents the parameters to a function.

Used for ParamSpec analysis. Note that by convention we handle this
type as a Callable without return type, not as a "tuple with names",
so that it behaves contravariantly, in particular [x: int] <: [int].

---
## CallableType
```python
from types import CallableType
```

Type of a non-overloaded callable object (such as function).

---
## Overloaded
```python
from types import Overloaded
```

Overloaded function type T1, ... Tn, where each Ti is CallableType.

The variant to call is chosen based on static argument
types. Overloaded function types can only be defined in stub
files, and thus there is no explicit runtime dispatch
implementation.

---
## TupleType
```python
from types import TupleType
```

The tuple type Tuple[T1, ..., Tn] (at least one type argument).

Instance variables:
    items: Tuple item types
    partial_fallback: The (imprecise) underlying instance type that is used
        for non-tuple methods. This is generally builtins.tuple[Any, ...] for
        regular tuples, but it's different for named tuples and classes with
        a tuple base class. Use mypy.typeops.tuple_fallback to calculate the
        precise fallback type derived from item types.
    implicit: If True, derived from a tuple expression (t,....) instead of Tuple[t, ...]

---
## TypedDictType
```python
from types import TypedDictType
```

Type of TypedDict object {'k1': v1, ..., 'kn': vn}.

A TypedDict object is a dictionary with specific string (literal) keys. Each
key has a value with a distinct type that depends on the key. TypedDict objects
are normal dict objects at runtime.

A TypedDictType can be either named or anonymous. If it's anonymous, its
fallback will be typing_extensions._TypedDict (Instance). _TypedDict is a subclass
of Mapping[str, object] and defines all non-mapping dict methods that TypedDict
supports. Some dict methods are unsafe and not supported. _TypedDict isn't defined
at runtime.

If a TypedDict is named, its fallback will be an Instance of the named type
(ex: "Point") whose TypeInfo has a typeddict_type that is anonymous. This
is similar to how named tuples work.

TODO: The fallback structure is perhaps overly complicated.

---
## RawExpressionType
```python
from types import RawExpressionType
```

A synthetic type representing some arbitrary expression that does not cleanly
translate into a type.

This synthetic type is only used at the beginning stages of semantic analysis
and should be completely removing during the process for mapping UnboundTypes to
actual types: we either turn it into a LiteralType or an AnyType.

For example, suppose `Foo[1]` is initially represented as the following:

    UnboundType(
        name='Foo',
        args=[
            RawExpressionType(value=1, base_type_name='builtins.int'),
        ],
    )

As we perform semantic analysis, this type will transform into one of two
possible forms.

If 'Foo' was an alias for 'Literal' all along, this type is transformed into:

    LiteralType(value=1, fallback=int_instance_here)

Alternatively, if 'Foo' is an unrelated class, we report an error and instead
produce something like this:

    Instance(type=typeinfo_for_foo, args=[AnyType(TypeOfAny.from_error))

If the "note" field is not None, the provided note will be reported alongside the
error at this point.

Note: if "literal_value" is None, that means this object is representing some
expression that cannot possibly be a parameter of Literal[...]. For example,
"Foo[3j]" would be represented as:

    UnboundType(
        name='Foo',
        args=[
            RawExpressionType(value=None, base_type_name='builtins.complex'),
        ],
    )

---
## LiteralType
```python
from types import LiteralType
```

The type of a Literal instance. Literal[Value]

A Literal always consists of:

1. A native Python object corresponding to the contained inner value
2. A fallback for this Literal. The fallback also corresponds to the
   parent type this Literal subtypes.

For example, 'Literal[42]' is represented as
'LiteralType(value=42, fallback=instance_of_int)'

As another example, `Literal[Color.RED]` (where Color is an enum) is
represented as `LiteralType(value="RED", fallback=instance_of_color)'.

---
## UnionType
```python
from types import UnionType
```

The union type Union[T1, ..., Tn] (at least one type argument).

---
## PartialType
```python
from types import PartialType
```

Type such as List[?] where type arguments are unknown, or partial None type.

These are used for inferring types in multiphase initialization such as this:

  x = []       # x gets a partial type List[?], as item type is unknown
  x.append(1)  # partial type gets replaced with normal type List[int]

Or with None:

  x = None  # x gets a partial type None
  if c:
      x = 1  # Infer actual type int for x

---
## EllipsisType
```python
from types import EllipsisType
```

The type ... (ellipsis).

This is not a real type but a syntactic AST construct, used in Callable[..., T], for example.

A semantically analyzed type will never have ellipsis types.

---
## TypeType
```python
from types import TypeType
```

For types like Type[User].

This annotates variables that are class objects, constrained by
the type argument.  See PEP 484 for more details.

We may encounter expressions whose values are specific classes;
those are represented as callables (possibly overloaded)
corresponding to the class's constructor's signature and returning
an instance of that class.  The difference with Type[C] is that
those callables always represent the exact class given as the
return type; Type[C] represents any class that's a subclass of C,
and C may also be a type variable or a union (or Any).

Many questions around subtype relationships between Type[C1] and
def(...) -> C2 are answered by looking at the subtype
relationships between C1 and C2, since Type[] is considered
covariant.

There's an unsolved problem with constructor signatures (also
unsolved in PEP 484): calling a variable whose type is Type[C]
assumes the constructor signature for C, even though a subclass of
C might completely change the constructor signature.  For now we
just assume that users of Type[C] are careful not to do that (in
the future we might detect when they are violating that
assumption).

---
## PlaceholderType
```python
from types import PlaceholderType
```

Temporary, yet-unknown type during semantic analysis.

This is needed when there's a reference to a type before the real symbol
table entry of the target type is available (specifically, we use a
temporary PlaceholderNode symbol node). Consider this example:

  class str(Sequence[str]): ...

We use a PlaceholderType for the 'str' in 'Sequence[str]' since we can't create
a TypeInfo for 'str' until all base classes have been resolved. We'll soon
perform another analysis iteration which replaces the base class with a complete
type without any placeholders. After semantic analysis, no placeholder types must
exist.

---
## get_proper_type
```python
from types import get_proper_type
```

Get the expansion of a type alias type.

If the type is already a proper type, this is a no-op. Use this function
wherever a decision is made on a call like e.g. 'if isinstance(typ, UnionType): ...',
because 'typ' in this case may be an alias to union. Note: if after making the decision
on the isinstance() call you pass on the original type (and not one of its components)
it is recommended to *always* pass on the unexpanded alias.

---
## get_proper_types
```python
from types import get_proper_types
```



---
## TypeStrVisitor
```python
from types import TypeStrVisitor
```

Visitor for pretty-printing types into strings.

This is mostly for debugging/testing.

Do not preserve original formatting.

Notes:
 - Represent unbound types as Foo? or Foo?[...].
 - Represent the NoneType type as None.

---
## TrivialSyntheticTypeTranslator
```python
from types import TrivialSyntheticTypeTranslator
```

A base class for type translators that need to be run during semantic analysis.

---
## UnrollAliasVisitor
```python
from types import UnrollAliasVisitor
```



---
## is_named_instance
```python
from types import is_named_instance
```



---
## LocationSetter
```python
from types import LocationSetter
```



---
## HasTypeVars
```python
from types import HasTypeVars
```



---
## has_type_vars
```python
from types import has_type_vars
```

Check if a type contains any type variables (recursively).

---
## HasRecursiveType
```python
from types import HasRecursiveType
```



---
## has_recursive_types
```python
from types import has_recursive_types
```

Check if a type contains any recursive aliases (recursively).

---
## split_with_prefix_and_suffix
```python
from types import split_with_prefix_and_suffix
```



---
## extend_args_for_prefix_and_suffix
```python
from types import extend_args_for_prefix_and_suffix
```

Extend list of types by eating out from variadic tuple to satisfy prefix and suffix.

---
## flatten_nested_unions
```python
from types import flatten_nested_unions
```

Flatten nested unions in a type list.

---
## find_unpack_in_list
```python
from types import find_unpack_in_list
```



---
## flatten_nested_tuples
```python
from types import flatten_nested_tuples
```

Recursively flatten TupleTypes nested with Unpack.

For example this will transform
    Tuple[A, Unpack[Tuple[B, Unpack[Tuple[C, D]]]]]
into
    Tuple[A, B, C, D]

---
## is_literal_type
```python
from types import is_literal_type
```

Check if this type is a LiteralType with the given fallback type and value.

---
## callable_with_ellipsis
```python
from types import callable_with_ellipsis
```

Construct type Callable[..., ret_type].

---
## remove_dups
```python
from types import remove_dups
```



---
## type_vars_as_args
```python
from types import type_vars_as_args
```

Represent type variables as they would appear in a type argument list.

---
## InstantiateAliasVisitor
```python
from types import InstantiateAliasVisitor
```



---
## can_be_true
```python
from types import can_be_true
```



---
## can_be_false
```python
from types import can_be_false
```



---
## can_be_true_default
```python
from types import can_be_true_default
```



---
## can_be_false_default
```python
from types import can_be_false_default
```



---
## accept
```python
from types import accept
```



---
## str_with_options
```python
from types import str_with_options
```



---
## serialize
```python
from types import serialize
```



---
## deserialize
```python
from types import deserialize
```



---
## is_singleton_type
```python
from types import is_singleton_type
```



---
## _expand_once
```python
from types import _expand_once
```

Expand to the target type exactly once.

This doesn't do full expansion, i.e. the result can contain another
(or even this same) type alias. Use this internal helper only when really needed,
its public wrapper mypy.types.get_proper_type() is preferred.

---
## _partial_expansion
```python
from types import _partial_expansion
```



---
## expand_all_if_possible
```python
from types import expand_all_if_possible
```

Attempt a full expansion of the type alias (including nested aliases).

If the expansion is not possible, i.e. the alias is (mutually-)recursive,
return None. If nothing_args is True, replace all type arguments with an
UninhabitedType() (used to detect recursively defined aliases).

---
## is_recursive
```python
from types import is_recursive
```

Whether this type alias is recursive.

Note this doesn't check generic alias arguments, but only if this alias
*definition* is recursive. The property value thus can be cached on the
underlying TypeAlias node. If you want to include all nested types, use
has_recursive_types() function.

---
## __hash__
```python
from types import __hash__
```



---
## __eq__
```python
from types import __eq__
```



---
## copy_modified
```python
from types import copy_modified
```



---
## new
```python
from types import new
```



---
## __ne__
```python
from types import __ne__
```



---
## is_meta_var
```python
from types import is_meta_var
```



---
## is_self
```python
from types import is_self
```



---
## new_unification_variable
```python
from types import new_unification_variable
```



---
## has_default
```python
from types import has_default
```



---
## with_flavor
```python
from types import with_flavor
```



---
## name_with_suffix
```python
from types import name_with_suffix
```



---
## is_from_error
```python
from types import is_from_error
```



---
## copy
```python
from types import copy
```



---
## copy_with_extra_attr
```python
from types import copy_with_extra_attr
```



---
## get_enum_values
```python
from types import get_enum_values
```

Return the list of values for an Enum.

---
## is_type_obj
```python
from types import is_type_obj
```



---
## type_object
```python
from types import type_object
```



---
## items
```python
from types import items
```



---
## with_name
```python
from types import with_name
```



---
## get_name
```python
from types import get_name
```



---
## var_arg
```python
from types import var_arg
```

The formal argument for *args.

---
## kw_arg
```python
from types import kw_arg
```

The formal argument for **kwargs.

---
## formal_arguments
```python
from types import formal_arguments
```

Return a list of the formal arguments of this callable, ignoring *arg and **kwargs.

To handle *args and **kwargs, use the 'callable.var_args' and 'callable.kw_args' fields,
if they are not None.

If you really want to include star args in the yielded output, set the
'include_star_args' parameter to 'True'.

---
## argument_by_name
```python
from types import argument_by_name
```



---
## argument_by_position
```python
from types import argument_by_position
```



---
## try_synthesizing_arg_from_kwarg
```python
from types import try_synthesizing_arg_from_kwarg
```



---
## try_synthesizing_arg_from_vararg
```python
from types import try_synthesizing_arg_from_vararg
```



---
## is_var_arg
```python
from types import is_var_arg
```

Does this callable have a *args argument?

---
## is_kw_arg
```python
from types import is_kw_arg
```

Does this callable have a **kwargs argument?

---
## max_possible_positional_args
```python
from types import max_possible_positional_args
```

Returns maximum number of positional arguments this method could possibly accept.

This takes into account *arg and **kwargs but excludes keyword-only args.

---
## is_generic
```python
from types import is_generic
```



---
## type_var_ids
```python
from types import type_var_ids
```



---
## param_spec
```python
from types import param_spec
```

Return ParamSpec if callable can be called with one.

A Callable accepting ParamSpec P args (*args, **kwargs) must have the
two final parameters like this: *args: P.args, **kwargs: P.kwargs.

---
## normalize_trivial_unpack
```python
from types import normalize_trivial_unpack
```



---
## with_unpacked_kwargs
```python
from types import with_unpacked_kwargs
```



---
## with_normalized_var_args
```python
from types import with_normalized_var_args
```



---
## can_be_any_bool
```python
from types import can_be_any_bool
```



---
## length
```python
from types import length
```



---
## slice
```python
from types import slice
```



---
## is_final
```python
from types import is_final
```



---
## is_anonymous
```python
from types import is_anonymous
```



---
## as_anonymous
```python
from types import as_anonymous
```



---
## create_anonymous_fallback
```python
from types import create_anonymous_fallback
```



---
## names_are_wider_than
```python
from types import names_are_wider_than
```



---
## zip
```python
from types import zip
```



---
## zipall
```python
from types import zipall
```



---
## simple_name
```python
from types import simple_name
```



---
## is_enum_literal
```python
from types import is_enum_literal
```



---
## value_repr
```python
from types import value_repr
```

Returns the string representation of the underlying type.

This function is almost equivalent to running `repr(self.value)`,
except it includes some additional logic to correctly handle cases
where the value is a string, byte string, a unicode string, or an enum.

---
## make_union
```python
from types import make_union
```



---
## relevant_items
```python
from types import relevant_items
```

Removes NoneTypes from Unions when strict Optional checking is off.

---
## make_normalized
```python
from types import make_normalized
```



---
## visit_unbound_type
```python
from types import visit_unbound_type
```



---
## visit_type_list
```python
from types import visit_type_list
```



---
## visit_callable_argument
```python
from types import visit_callable_argument
```



---
## visit_any
```python
from types import visit_any
```



---
## visit_none_type
```python
from types import visit_none_type
```



---
## visit_uninhabited_type
```python
from types import visit_uninhabited_type
```



---
## visit_erased_type
```python
from types import visit_erased_type
```



---
## visit_deleted_type
```python
from types import visit_deleted_type
```



---
## visit_instance
```python
from types import visit_instance
```



---
## visit_type_var
```python
from types import visit_type_var
```



---
## visit_param_spec
```python
from types import visit_param_spec
```



---
## visit_parameters
```python
from types import visit_parameters
```



---
## visit_type_var_tuple
```python
from types import visit_type_var_tuple
```



---
## visit_callable_type
```python
from types import visit_callable_type
```



---
## visit_overloaded
```python
from types import visit_overloaded
```



---
## visit_tuple_type
```python
from types import visit_tuple_type
```



---
## visit_typeddict_type
```python
from types import visit_typeddict_type
```



---
## visit_raw_expression_type
```python
from types import visit_raw_expression_type
```



---
## visit_literal_type
```python
from types import visit_literal_type
```



---
## visit_union_type
```python
from types import visit_union_type
```



---
## visit_partial_type
```python
from types import visit_partial_type
```



---
## visit_ellipsis_type
```python
from types import visit_ellipsis_type
```



---
## visit_type_type
```python
from types import visit_type_type
```



---
## visit_placeholder_type
```python
from types import visit_placeholder_type
```



---
## visit_type_alias_type
```python
from types import visit_type_alias_type
```



---
## visit_unpack_type
```python
from types import visit_unpack_type
```



---
## list_str
```python
from types import list_str
```

Convert items of an array to strings (pretty-print types)
and join the results with commas.

---
## item_str
```python
from types import item_str
```



---
## __name__
```python
from literals import __name__
```



---
## literal
```python
from literals import literal
```



---
## subkeys
```python
from literals import subkeys
```



---
## literal_hash
```python
from literals import literal_hash
```



---
## extract_var_from_literal_hash
```python
from literals import extract_var_from_literal_hash
```

If key refers to a Var node, return it.

Return None otherwise.

---
## _Hasher
```python
from literals import _Hasher
```



---
## visit_int_expr
```python
from literals import visit_int_expr
```



---
## visit_str_expr
```python
from literals import visit_str_expr
```



---
## visit_bytes_expr
```python
from literals import visit_bytes_expr
```



---
## visit_float_expr
```python
from literals import visit_float_expr
```



---
## visit_complex_expr
```python
from literals import visit_complex_expr
```



---
## visit_star_expr
```python
from literals import visit_star_expr
```



---
## visit_name_expr
```python
from literals import visit_name_expr
```



---
## visit_member_expr
```python
from literals import visit_member_expr
```



---
## visit_op_expr
```python
from literals import visit_op_expr
```



---
## visit_comparison_expr
```python
from literals import visit_comparison_expr
```



---
## visit_unary_expr
```python
from literals import visit_unary_expr
```



---
## seq_expr
```python
from literals import seq_expr
```



---
## visit_list_expr
```python
from literals import visit_list_expr
```



---
## visit_dict_expr
```python
from literals import visit_dict_expr
```



---
## visit_tuple_expr
```python
from literals import visit_tuple_expr
```



---
## visit_set_expr
```python
from literals import visit_set_expr
```



---
## visit_index_expr
```python
from literals import visit_index_expr
```



---
## visit_assignment_expr
```python
from literals import visit_assignment_expr
```



---
## visit_call_expr
```python
from literals import visit_call_expr
```



---
## visit_slice_expr
```python
from literals import visit_slice_expr
```



---
## visit_cast_expr
```python
from literals import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from literals import visit_assert_type_expr
```



---
## visit_conditional_expr
```python
from literals import visit_conditional_expr
```



---
## visit_ellipsis
```python
from literals import visit_ellipsis
```



---
## visit_yield_from_expr
```python
from literals import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from literals import visit_yield_expr
```



---
## visit_reveal_expr
```python
from literals import visit_reveal_expr
```



---
## visit_super_expr
```python
from literals import visit_super_expr
```



---
## visit_type_application
```python
from literals import visit_type_application
```



---
## visit_lambda_expr
```python
from literals import visit_lambda_expr
```



---
## visit_list_comprehension
```python
from literals import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from literals import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from literals import visit_dictionary_comprehension
```



---
## visit_generator_expr
```python
from literals import visit_generator_expr
```



---
## visit_type_var_expr
```python
from literals import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from literals import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from literals import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from literals import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from literals import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from literals import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from literals import visit_typeddict_expr
```



---
## visit_newtype_expr
```python
from literals import visit_newtype_expr
```



---
## visit__promote_expr
```python
from literals import visit__promote_expr
```



---
## visit_await_expr
```python
from literals import visit_await_expr
```



---
## visit_temp_node
```python
from literals import visit_temp_node
```



---
## __name__
```python
from join import __name__
```

Calculation of the least upper bound types (joins).

---
## InstanceJoiner
```python
from join import InstanceJoiner
```



---
## join_simple
```python
from join import join_simple
```

Return a simple least upper bound given the declared type.

This function should be only used by binder, and should not recurse.
For all other uses, use `join_types()`.

---
## trivial_join
```python
from join import trivial_join
```

Return one of types (expanded) if it is a supertype of other, otherwise top type.

---
## join_types
```python
from join import join_types
```

Return the least upper bound of s and t.

For example, the join of 'int' and 'object' is 'object'.

---
## TypeJoinVisitor
```python
from join import TypeJoinVisitor
```

Implementation of the least upper bound algorithm.

Attributes:
  s: The other (left) type operand.

---
## is_better
```python
from join import is_better
```



---
## normalize_callables
```python
from join import normalize_callables
```



---
## is_similar_callables
```python
from join import is_similar_callables
```

Return True if t and s have identical numbers of
arguments, default arguments and varargs.

---
## update_callable_ids
```python
from join import update_callable_ids
```



---
## match_generic_callables
```python
from join import match_generic_callables
```



---
## join_similar_callables
```python
from join import join_similar_callables
```



---
## safe_join
```python
from join import safe_join
```



---
## safe_meet
```python
from join import safe_meet
```



---
## combine_similar_callables
```python
from join import combine_similar_callables
```



---
## combine_arg_names
```python
from join import combine_arg_names
```

Produces a list of argument names compatible with both callables.

For example, suppose 't' and 's' have the following signatures:

- t: (a: int, b: str, X: str) -> None
- s: (a: int, b: str, Y: str) -> None

This function would return ["a", "b", None]. This information
is then used above to compute the join of t and s, which results
in a signature of (a: int, b: str, str) -> None.

Note that the third argument's name is omitted and 't' and 's'
are both valid subtypes of this inferred signature.

Precondition: is_similar_types(t, s) is true.

---
## object_from_instance
```python
from join import object_from_instance
```

Construct the type 'builtins.object' from an instance type.

---
## object_or_any_from_type
```python
from join import object_or_any_from_type
```



---
## join_type_list
```python
from join import join_type_list
```



---
## unpack_callback_protocol
```python
from join import unpack_callback_protocol
```



---
## __init__
```python
from join import __init__
```



---
## join_instances
```python
from join import join_instances
```



---
## join_instances_via_supertype
```python
from join import join_instances_via_supertype
```



---
## visit_unbound_type
```python
from join import visit_unbound_type
```



---
## visit_union_type
```python
from join import visit_union_type
```



---
## visit_any
```python
from join import visit_any
```



---
## visit_none_type
```python
from join import visit_none_type
```



---
## visit_uninhabited_type
```python
from join import visit_uninhabited_type
```



---
## visit_deleted_type
```python
from join import visit_deleted_type
```



---
## visit_erased_type
```python
from join import visit_erased_type
```



---
## visit_type_var
```python
from join import visit_type_var
```



---
## visit_param_spec
```python
from join import visit_param_spec
```



---
## visit_type_var_tuple
```python
from join import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from join import visit_unpack_type
```



---
## visit_parameters
```python
from join import visit_parameters
```



---
## visit_instance
```python
from join import visit_instance
```



---
## visit_callable_type
```python
from join import visit_callable_type
```



---
## visit_overloaded
```python
from join import visit_overloaded
```



---
## join_tuples
```python
from join import join_tuples
```

Join two tuple types while handling variadic entries.

This is surprisingly tricky, and we don't handle some tricky corner cases.
Most of the trickiness comes from the variadic tuple items like *tuple[X, ...]
since they can have arbitrary partial overlaps (while *Ts can't be split).

---
## visit_tuple_type
```python
from join import visit_tuple_type
```



---
## visit_typeddict_type
```python
from join import visit_typeddict_type
```



---
## visit_literal_type
```python
from join import visit_literal_type
```



---
## visit_partial_type
```python
from join import visit_partial_type
```



---
## visit_type_type
```python
from join import visit_type_type
```



---
## visit_type_alias_type
```python
from join import visit_type_alias_type
```



---
## default
```python
from join import default
```



---
## __name__
```python
from tvar_scope import __name__
```



---
## TypeVarLikeNamespaceSetter
```python
from tvar_scope import TypeVarLikeNamespaceSetter
```

Set namespace for all TypeVarLikeTypes types.

---
## TypeVarLikeScope
```python
from tvar_scope import TypeVarLikeScope
```

Scope that holds bindings for type variables and parameter specifications.

Node fullname -> TypeVarLikeType.

---
## __init__
```python
from tvar_scope import __init__
```

Initializer for TypeVarLikeScope

Parameters:
  parent: the outer scope for this scope
  is_class_scope: True if this represents a generic class
  prohibited: Type variables that aren't strictly in scope exactly,
              but can't be bound because they're part of an outer class's scope.

---
## visit_type_var
```python
from tvar_scope import visit_type_var
```



---
## visit_param_spec
```python
from tvar_scope import visit_param_spec
```



---
## visit_type_var_tuple
```python
from tvar_scope import visit_type_var_tuple
```



---
## get_function_scope
```python
from tvar_scope import get_function_scope
```

Get the nearest parent that's a function scope, not a class scope

---
## allow_binding
```python
from tvar_scope import allow_binding
```



---
## method_frame
```python
from tvar_scope import method_frame
```

A new scope frame for binding a method

---
## class_frame
```python
from tvar_scope import class_frame
```

A new scope frame for binding a class. Prohibits *this* class's tvars

---
## new_unique_func_id
```python
from tvar_scope import new_unique_func_id
```

Used by plugin-like code that needs to make synthetic generic functions.

---
## bind_new
```python
from tvar_scope import bind_new
```



---
## bind_existing
```python
from tvar_scope import bind_existing
```



---
## get_binding
```python
from tvar_scope import get_binding
```



---
## __str__
```python
from tvar_scope import __str__
```



---
## __name__
```python
from semanal_pass1 import __name__
```

Block/import reachability analysis.

---
## SemanticAnalyzerPreAnalysis
```python
from semanal_pass1 import SemanticAnalyzerPreAnalysis
```

Analyze reachability of blocks and imports and other local things.

This runs before semantic analysis, so names have not been bound. Imports are
also not resolved yet, so we can only access the current module.

This determines static reachability of blocks and imports due to version and
platform checks, among others.

The main entry point is 'visit_file'.

Reachability of imports needs to be determined very early in the build since
this affects which modules will ultimately be processed.

Consider this example:

  import sys

  def do_stuff() -> None:
      if sys.version_info >= (3, 10):
          import xyz  # Only available in Python 3.10+
          xyz.whatever()
      ...

The block containing 'import xyz' is unreachable in Python 3 mode. The import
shouldn't be processed in Python 3 mode, even if the module happens to exist.

---
## visit_file
```python
from semanal_pass1 import visit_file
```



---
## visit_func_def
```python
from semanal_pass1 import visit_func_def
```



---
## visit_class_def
```python
from semanal_pass1 import visit_class_def
```



---
## visit_import_from
```python
from semanal_pass1 import visit_import_from
```



---
## visit_import_all
```python
from semanal_pass1 import visit_import_all
```



---
## visit_import
```python
from semanal_pass1 import visit_import
```



---
## visit_if_stmt
```python
from semanal_pass1 import visit_if_stmt
```



---
## visit_block
```python
from semanal_pass1 import visit_block
```



---
## visit_match_stmt
```python
from semanal_pass1 import visit_match_stmt
```



---
## visit_assignment_stmt
```python
from semanal_pass1 import visit_assignment_stmt
```



---
## visit_expression_stmt
```python
from semanal_pass1 import visit_expression_stmt
```



---
## visit_return_stmt
```python
from semanal_pass1 import visit_return_stmt
```



---
## visit_for_stmt
```python
from semanal_pass1 import visit_for_stmt
```



---
## __name__
```python
from types_utils import __name__
```

This module is for (more basic) type operations that should not depend on is_subtype(),
meet_types(), join_types() etc. We don't want to keep them in mypy/types.py for two reasons:
* Reduce the size of that module.
* Reduce use of get_proper_type() in types.py to avoid cyclic imports
  expand_type <-> types, if we move get_proper_type() to the former.

---
## flatten_types
```python
from types_utils import flatten_types
```



---
## strip_type
```python
from types_utils import strip_type
```

Make a copy of type without 'debugging info' (function name).

---
## is_invalid_recursive_alias
```python
from types_utils import is_invalid_recursive_alias
```

Flag aliases like A = Union[int, A], T = tuple[int, *T] (and similar mutual aliases).

Such aliases don't make much sense, and cause problems in later phases.

---
## is_bad_type_type_item
```python
from types_utils import is_bad_type_type_item
```

Prohibit types like Type[Type[...]].

Such types are explicitly prohibited by PEP 484. Also, they cause problems
with recursive types like T = Type[T], because internal representation of
TypeType item is normalized (i.e. always a proper type).

---
## is_union_with_any
```python
from types_utils import is_union_with_any
```

Is this a union with Any or a plain Any type?

---
## is_generic_instance
```python
from types_utils import is_generic_instance
```



---
## is_overlapping_none
```python
from types_utils import is_overlapping_none
```



---
## remove_optional
```python
from types_utils import remove_optional
```



---
## is_self_type_like
```python
from types_utils import is_self_type_like
```

Does this look like a self-type annotation?

---
## store_argument_type
```python
from types_utils import store_argument_type
```



---
## __name__
```python
from typeanal import __name__
```

Semantic analysis of types

---
## analyze_type_alias
```python
from typeanal import analyze_type_alias
```

Analyze r.h.s. of a (potential) type alias definition.

If `node` is valid as a type alias rvalue, return the resulting type and a set of
full names of type aliases it depends on (directly or indirectly).
'node' must have been semantically analyzed.

---
## no_subscript_builtin_alias
```python
from typeanal import no_subscript_builtin_alias
```



---
## TypeAnalyser
```python
from typeanal import TypeAnalyser
```

Semantic analyzer for types.

Converts unbound types into bound types. This is a no-op for already
bound types.

If an incomplete reference is encountered, this does a defer. The
caller never needs to defer.

---
## MsgCallback
```python
from typeanal import MsgCallback
```



---
## get_omitted_any
```python
from typeanal import get_omitted_any
```



---
## fix_type_var_tuple_argument
```python
from typeanal import fix_type_var_tuple_argument
```



---
## fix_instance
```python
from typeanal import fix_instance
```

Fix a malformed instance by replacing all type arguments with TypeVar default or Any.

Also emit a suitable error if this is not due to implicit Any's.

---
## instantiate_type_alias
```python
from typeanal import instantiate_type_alias
```

Create an instance of a (generic) type alias from alias node and type arguments.

We are following the rules outlined in TypeAlias docstring.
Here:
    node: type alias node (definition)
    args: type arguments (types to be substituted in place of type variables
          when expanding the alias)
    fail: error reporter callback
    no_args: whether original definition used a bare generic `A = List`
    ctx: context where expansion happens
    unexpanded_type, disallow_any, use_standard_error: used to customize error messages

---
## set_any_tvars
```python
from typeanal import set_any_tvars
```



---
## flatten_tvars
```python
from typeanal import flatten_tvars
```



---
## DivergingAliasDetector
```python
from typeanal import DivergingAliasDetector
```

See docstring of detect_diverging_alias() for details.

---
## detect_diverging_alias
```python
from typeanal import detect_diverging_alias
```

This detects type aliases that will diverge during type checking.

For example F = Something[..., F[List[T]]]. At each expansion step this will produce
*new* type aliases: e.g. F[List[int]], F[List[List[int]]], etc. So we can't detect
recursion. It is a known problem in the literature, recursive aliases and generic types
don't always go well together. It looks like there is no known systematic solution yet.

# TODO: should we handle such aliases using type_recursion counter and some large limit?
They may be handy in rare cases, e.g. to express a union of non-mixed nested lists:
Nested = Union[T, Nested[List[T]]] ~> Union[T, List[T], List[List[T]], ...]

---
## check_for_explicit_any
```python
from typeanal import check_for_explicit_any
```



---
## has_explicit_any
```python
from typeanal import has_explicit_any
```

Whether this type is or type it contains is an Any coming from explicit type annotation

---
## HasExplicitAny
```python
from typeanal import HasExplicitAny
```



---
## has_any_from_unimported_type
```python
from typeanal import has_any_from_unimported_type
```

Return true if this type is Any because an import was not followed.

If type t is such Any type or has type arguments that contain such Any type
this function will return true.

---
## HasAnyFromUnimportedType
```python
from typeanal import HasAnyFromUnimportedType
```



---
## collect_all_inner_types
```python
from typeanal import collect_all_inner_types
```

Return all types that `t` contains

---
## CollectAllInnerTypesQuery
```python
from typeanal import CollectAllInnerTypesQuery
```



---
## make_optional_type
```python
from typeanal import make_optional_type
```

Return the type corresponding to Optional[t].

Note that we can't use normal union simplification, since this function
is called during semantic analysis and simplification only works during
type checking.

---
## validate_instance
```python
from typeanal import validate_instance
```

Check if this is a well-formed instance with respect to argument count/positions.

---
## find_self_type
```python
from typeanal import find_self_type
```



---
## HasSelfType
```python
from typeanal import HasSelfType
```



---
## unknown_unpack
```python
from typeanal import unknown_unpack
```

Check if a given type is an unpack of an unknown type.

Unfortunately, there is no robust way to distinguish forward references from
genuine undefined names here. But this worked well so far, although it looks
quite fragile.

---
## FindTypeVarVisitor
```python
from typeanal import FindTypeVarVisitor
```

Type visitor that looks for type variable types and self types.

---
## TypeVarDefaultTranslator
```python
from typeanal import TypeVarDefaultTranslator
```

Type translate visitor that replaces UnboundTypes with in-scope TypeVars.

---
## __init__
```python
from typeanal import __init__
```



---
## lookup_qualified
```python
from typeanal import lookup_qualified
```



---
## lookup_fully_qualified
```python
from typeanal import lookup_fully_qualified
```



---
## visit_unbound_type
```python
from typeanal import visit_unbound_type
```



---
## not_declared_in_type_params
```python
from typeanal import not_declared_in_type_params
```



---
## visit_unbound_type_nonoptional
```python
from typeanal import visit_unbound_type_nonoptional
```



---
## pack_paramspec_args
```python
from typeanal import pack_paramspec_args
```



---
## cannot_resolve_type
```python
from typeanal import cannot_resolve_type
```



---
## apply_concatenate_operator
```python
from typeanal import apply_concatenate_operator
```



---
## try_analyze_special_unbound_type
```python
from typeanal import try_analyze_special_unbound_type
```

Bind special type that is recognized through magic name such as 'typing.Any'.

Return the bound type if successful, and return None if the type is a normal type.

---
## analyze_type_with_type_info
```python
from typeanal import analyze_type_with_type_info
```

Bind unbound type when were able to find target TypeInfo.

This handles simple cases like 'int', 'modname.UserClass[str]', etc.

---
## analyze_unbound_type_without_type_info
```python
from typeanal import analyze_unbound_type_without_type_info
```

Figure out what an unbound type that doesn't refer to a TypeInfo node means.

This is something unusual. We try our best to find out what it is.

---
## visit_any
```python
from typeanal import visit_any
```



---
## visit_none_type
```python
from typeanal import visit_none_type
```



---
## visit_uninhabited_type
```python
from typeanal import visit_uninhabited_type
```



---
## visit_erased_type
```python
from typeanal import visit_erased_type
```



---
## visit_deleted_type
```python
from typeanal import visit_deleted_type
```



---
## visit_type_list
```python
from typeanal import visit_type_list
```



---
## visit_callable_argument
```python
from typeanal import visit_callable_argument
```



---
## visit_instance
```python
from typeanal import visit_instance
```



---
## visit_type_alias_type
```python
from typeanal import visit_type_alias_type
```



---
## visit_type_var
```python
from typeanal import visit_type_var
```



---
## visit_param_spec
```python
from typeanal import visit_param_spec
```



---
## visit_type_var_tuple
```python
from typeanal import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from typeanal import visit_unpack_type
```



---
## visit_parameters
```python
from typeanal import visit_parameters
```



---
## visit_callable_type
```python
from typeanal import visit_callable_type
```



---
## anal_type_guard
```python
from typeanal import anal_type_guard
```



---
## anal_type_guard_arg
```python
from typeanal import anal_type_guard_arg
```



---
## anal_type_is
```python
from typeanal import anal_type_is
```



---
## anal_type_is_arg
```python
from typeanal import anal_type_is_arg
```



---
## anal_star_arg_type
```python
from typeanal import anal_star_arg_type
```

Analyze signature argument type for *args and **kwargs argument.

---
## visit_overloaded
```python
from typeanal import visit_overloaded
```



---
## visit_tuple_type
```python
from typeanal import visit_tuple_type
```



---
## visit_typeddict_type
```python
from typeanal import visit_typeddict_type
```



---
## visit_raw_expression_type
```python
from typeanal import visit_raw_expression_type
```



---
## visit_literal_type
```python
from typeanal import visit_literal_type
```



---
## visit_union_type
```python
from typeanal import visit_union_type
```



---
## visit_partial_type
```python
from typeanal import visit_partial_type
```



---
## visit_ellipsis_type
```python
from typeanal import visit_ellipsis_type
```



---
## visit_type_type
```python
from typeanal import visit_type_type
```



---
## visit_placeholder_type
```python
from typeanal import visit_placeholder_type
```



---
## analyze_callable_args_for_paramspec
```python
from typeanal import analyze_callable_args_for_paramspec
```

Construct a 'Callable[P, RET]', where P is ParamSpec, return None if we cannot.

---
## analyze_callable_args_for_concatenate
```python
from typeanal import analyze_callable_args_for_concatenate
```

Construct a 'Callable[C, RET]', where C is Concatenate[..., P], returning None if we
cannot.

---
## analyze_callable_type
```python
from typeanal import analyze_callable_type
```



---
## refers_to_full_names
```python
from typeanal import refers_to_full_names
```



---
## analyze_callable_args
```python
from typeanal import analyze_callable_args
```



---
## analyze_literal_type
```python
from typeanal import analyze_literal_type
```



---
## analyze_literal_param
```python
from typeanal import analyze_literal_param
```



---
## analyze_type
```python
from typeanal import analyze_type
```



---
## fail
```python
from typeanal import fail
```



---
## note
```python
from typeanal import note
```



---
## tvar_scope_frame
```python
from typeanal import tvar_scope_frame
```



---
## find_type_var_likes
```python
from typeanal import find_type_var_likes
```



---
## infer_type_variables
```python
from typeanal import infer_type_variables
```

Infer type variables from a callable.

Return tuple with these items:
 - list of unique type variables referred to in a callable
 - whether there is a reference to the Self type

---
## bind_function_type_variables
```python
from typeanal import bind_function_type_variables
```

Find the type variables of the function type and bind them in our tvar_scope

---
## is_defined_type_var
```python
from typeanal import is_defined_type_var
```



---
## anal_array
```python
from typeanal import anal_array
```



---
## anal_type
```python
from typeanal import anal_type
```



---
## anal_var_def
```python
from typeanal import anal_var_def
```



---
## anal_var_defs
```python
from typeanal import anal_var_defs
```



---
## named_type
```python
from typeanal import named_type
```



---
## check_unpacks_in_list
```python
from typeanal import check_unpacks_in_list
```



---
## tuple_type
```python
from typeanal import tuple_type
```



---
## __call__
```python
from typeanal import __call__
```



---
## query_types
```python
from typeanal import query_types
```



---
## combine_lists_strategy
```python
from typeanal import combine_lists_strategy
```



---
## _seems_like_callable
```python
from typeanal import _seems_like_callable
```



---
## process_types
```python
from typeanal import process_types
```



---
## __name__
```python
from stubgenc import __name__
```

Stub generator for C modules.

The public interface is via the mypy.stubgen module.

---
## ExternalSignatureGenerator
```python
from stubgenc import ExternalSignatureGenerator
```



---
## DocstringSignatureGenerator
```python
from stubgenc import DocstringSignatureGenerator
```



---
## is_pybind11_overloaded_function_docstring
```python
from stubgenc import is_pybind11_overloaded_function_docstring
```



---
## generate_stub_for_c_module
```python
from stubgenc import generate_stub_for_c_module
```

Generate stub for C module.

Signature generators are called in order until a list of signatures is returned.  The order
is:
- signatures inferred from .rst documentation (if given)
- simple runtime introspection (looking for docstrings and attributes
  with simple builtin types)
- fallback based special method names or "(*args, **kwargs)"

If directory for target doesn't exist it will be created. Existing stub
will be overwritten.

---
## CFunctionStub
```python
from stubgenc import CFunctionStub
```

Class that mimics a C function in order to provide parseable docstrings.

---
## InspectionStubGenerator
```python
from stubgenc import InspectionStubGenerator
```

Stub generator that does not parse code.

Generation is performed by inspecting the module's contents, and thus works
for highly dynamic modules, pyc files, and C modules (via the CStubGenerator
subclass).

---
## method_name_sort_key
```python
from stubgenc import method_name_sort_key
```

Sort methods in classes in a typical order.

I.e.: constructor, normal methods, special methods.

---
## is_pybind_skipped_attribute
```python
from stubgenc import is_pybind_skipped_attribute
```



---
## infer_c_method_args
```python
from stubgenc import infer_c_method_args
```



---
## __init__
```python
from stubgenc import __init__
```



---
## from_doc_dir
```python
from stubgenc import from_doc_dir
```

Instantiate from a directory of .rst files.

---
## get_function_sig
```python
from stubgenc import get_function_sig
```



---
## get_property_type
```python
from stubgenc import get_property_type
```

Infer property type from docstring or docstring signature.

---
## _from_sig
```python
from stubgenc import _from_sig
```



---
## _from_sigs
```python
from stubgenc import _from_sigs
```



---
## __get__
```python
from stubgenc import __get__
```

This exists to make this object look like a method descriptor and thus
return true for CStubGenerator.ismethod()

---
## get_default_function_sig
```python
from stubgenc import get_default_function_sig
```



---
## get_sig_generators
```python
from stubgenc import get_sig_generators
```



---
## strip_or_import
```python
from stubgenc import strip_or_import
```

Strips unnecessary module names from typ.

If typ represents a type that is inside module or is a type coming from builtins, remove
module declaration from it. Return stripped name of the type.

Arguments:
    typ: name of the type

---
## get_obj_module
```python
from stubgenc import get_obj_module
```

Return module name of the object.

---
## is_defined_in_module
```python
from stubgenc import is_defined_in_module
```

Check if object is considered defined in the current module.

---
## generate_module
```python
from stubgenc import generate_module
```



---
## is_skipped_attribute
```python
from stubgenc import is_skipped_attribute
```



---
## get_members
```python
from stubgenc import get_members
```



---
## get_type_annotation
```python
from stubgenc import get_type_annotation
```

Given an instance, return a string representation of its type that is valid
to use as a type annotation.

---
## is_function
```python
from stubgenc import is_function
```



---
## is_method
```python
from stubgenc import is_method
```



---
## is_classmethod
```python
from stubgenc import is_classmethod
```



---
## is_staticmethod
```python
from stubgenc import is_staticmethod
```



---
## is_abstract_method
```python
from stubgenc import is_abstract_method
```



---
## is_property
```python
from stubgenc import is_property
```



---
## is_property_readonly
```python
from stubgenc import is_property_readonly
```



---
## is_static_property
```python
from stubgenc import is_static_property
```

For c-modules, whether the property behaves like an attribute

---
## process_inferred_sigs
```python
from stubgenc import process_inferred_sigs
```



---
## generate_function_stub
```python
from stubgenc import generate_function_stub
```

Generate stub for a single function or method.

The result (always a single line) will be appended to 'output'.
If necessary, any required names will be added to 'imports'.
The 'class_name' is used to find signature of __init__ or __new__ in
'class_sigs'.

---
## _indent_docstring
```python
from stubgenc import _indent_docstring
```

Fix indentation of docstring extracted from pybind11 or other binding generators.

---
## _fix_iter
```python
from stubgenc import _fix_iter
```

Ensure that objects which implement old-style iteration via __getitem__
are considered iterable.

---
## generate_property_stub
```python
from stubgenc import generate_property_stub
```

Generate property stub using introspection of 'obj'.

Try to infer type from docstring, append resulting lines to 'output'.

raw_obj : object before evaluation of descriptor (if any)
obj : object after evaluation of descriptor

---
## get_type_fullname
```python
from stubgenc import get_type_fullname
```

Given a type, return a string representation

---
## get_base_types
```python
from stubgenc import get_base_types
```



---
## generate_class_stub
```python
from stubgenc import generate_class_stub
```

Generate stub for a single class using runtime introspection.

The result lines will be appended to 'output'. If necessary, any
required names will be added to 'imports'.

---
## generate_variable_stub
```python
from stubgenc import generate_variable_stub
```

Generate stub for a single variable using runtime introspection.

The result lines will be appended to 'output'. If necessary, any
required names will be added to 'imports'.

---
## get_annotation
```python
from stubgenc import get_annotation
```



---
## __name__
```python
from semanal_typeddict import __name__
```

Semantic analysis of TypedDict definitions.

---
## TypedDictAnalyzer
```python
from semanal_typeddict import TypedDictAnalyzer
```



---
## __init__
```python
from semanal_typeddict import __init__
```



---
## analyze_typeddict_classdef
```python
from semanal_typeddict import analyze_typeddict_classdef
```

Analyze a class that may define a TypedDict.

Assume that base classes have been analyzed already.

Note: Unlike normal classes, we won't create a TypeInfo until
the whole definition of the TypeDict (including the body and all
key names and types) is complete.  This is mostly because we
store the corresponding TypedDictType in the TypeInfo.

Return (is this a TypedDict, new TypeInfo). Specifics:
 * If we couldn't finish due to incomplete reference anywhere in
   the definition, return (True, None).
 * If this is not a TypedDict, return (False, None).

---
## add_keys_and_types_from_base
```python
from semanal_typeddict import add_keys_and_types_from_base
```



---
## analyze_base_args
```python
from semanal_typeddict import analyze_base_args
```

Analyze arguments of base type expressions as types.

We need to do this, because normal base class processing happens after
the TypedDict special-casing (plus we get a custom error message).

---
## map_items_to_base
```python
from semanal_typeddict import map_items_to_base
```

Map item types to how they would look in their base with type arguments applied.

Note it is safe to use expand_type() during semantic analysis, because it should never
(indirectly) call is_subtype().

---
## analyze_typeddict_classdef_fields
```python
from semanal_typeddict import analyze_typeddict_classdef_fields
```

Analyze fields defined in a TypedDict class definition.

This doesn't consider inherited fields (if any). Also consider totality,
if given.

Return tuple with these items:
 * List of keys (or None if found an incomplete reference --> deferral)
 * List of types for each key
 * List of statements from defn.defs.body that are legally allowed to be a
   part of a TypedDict definition
 * Set of required keys

---
## check_typeddict
```python
from semanal_typeddict import check_typeddict
```

Check if a call defines a TypedDict.

The optional var_name argument is the name of the variable to
which this is assigned, if any.

Return a pair (is it a typed dict, corresponding TypeInfo).

If the definition is invalid but looks like a TypedDict,
report errors but return (some) TypeInfo. If some type is not ready,
return (True, None).

---
## parse_typeddict_args
```python
from semanal_typeddict import parse_typeddict_args
```

Parse typed dict call expression.

Return names, types, totality, was there an error during parsing.
If some type is not ready, return None.

---
## parse_typeddict_fields_with_types
```python
from semanal_typeddict import parse_typeddict_fields_with_types
```

Parse typed dict items passed as pairs (name expression, type expression).

Return names, types, was there an error. If some type is not ready, return None.

---
## fail_typeddict_arg
```python
from semanal_typeddict import fail_typeddict_arg
```



---
## build_typeddict_typeinfo
```python
from semanal_typeddict import build_typeddict_typeinfo
```



---
## is_typeddict
```python
from semanal_typeddict import is_typeddict
```



---
## fail
```python
from semanal_typeddict import fail
```



---
## note
```python
from semanal_typeddict import note
```



---
## __name__
```python
from semanal_enum import __name__
```

Semantic analysis of call-based Enum definitions.

This is conceptually part of mypy.semanal (semantic analyzer pass 2).

---
## EnumCallAnalyzer
```python
from semanal_enum import EnumCallAnalyzer
```



---
## __init__
```python
from semanal_enum import __init__
```



---
## process_enum_call
```python
from semanal_enum import process_enum_call
```

Check if s defines an Enum; if yes, store the definition in symbol table.

Return True if this looks like an Enum definition (but maybe with errors),
otherwise return False.

---
## check_enum_call
```python
from semanal_enum import check_enum_call
```

Check if a call defines an Enum.

Example:

  A = enum.Enum('A', 'foo bar')

is equivalent to:

  class A(enum.Enum):
      foo = 1
      bar = 2

---
## build_enum_call_typeinfo
```python
from semanal_enum import build_enum_call_typeinfo
```



---
## parse_enum_call_args
```python
from semanal_enum import parse_enum_call_args
```

Parse arguments of an Enum call.

Return a tuple of fields, values, was there an error.

---
## fail_enum_call_arg
```python
from semanal_enum import fail_enum_call_arg
```



---
## fail
```python
from semanal_enum import fail
```



---
## _run
```python
from api import _run
```



---
## run
```python
from api import run
```



---
## run_dmypy
```python
from api import run_dmypy
```



---
## f
```python
from api import f
```



---
## __name__
```python
from partially_defined import __name__
```



---
## BranchState
```python
from partially_defined import BranchState
```

BranchState contains information about variable definition at the end of a branching statement.
`if` and `match` are examples of branching statements.

`may_be_defined` contains variables that were defined in only some branches.
`must_be_defined` contains variables that were defined in all branches.

---
## BranchStatement
```python
from partially_defined import BranchStatement
```



---
## ScopeType
```python
from partially_defined import ScopeType
```



---
## Scope
```python
from partially_defined import Scope
```



---
## DefinedVariableTracker
```python
from partially_defined import DefinedVariableTracker
```

DefinedVariableTracker manages the state and scope for the UndefinedVariablesVisitor.

---
## Loop
```python
from partially_defined import Loop
```



---
## PossiblyUndefinedVariableVisitor
```python
from partially_defined import PossiblyUndefinedVariableVisitor
```

Detects the following cases:
- A variable that's defined only part of the time.
- If a variable is used before definition

An example of a partial definition:
if foo():
    x = 1
print(x)  # Error: "x" may be undefined.

Example of a used before definition:
x = y
y: int = 2

Note that this code does not detect variables not defined in any of the branches -- that is
handled by the semantic analyzer.

---
## __init__
```python
from partially_defined import __init__
```



---
## copy
```python
from partially_defined import copy
```



---
## next_branch
```python
from partially_defined import next_branch
```



---
## record_definition
```python
from partially_defined import record_definition
```



---
## delete_var
```python
from partially_defined import delete_var
```



---
## record_nested_branch
```python
from partially_defined import record_nested_branch
```



---
## skip_branch
```python
from partially_defined import skip_branch
```



---
## is_possibly_undefined
```python
from partially_defined import is_possibly_undefined
```



---
## is_undefined
```python
from partially_defined import is_undefined
```



---
## is_defined_in_a_branch
```python
from partially_defined import is_defined_in_a_branch
```



---
## done
```python
from partially_defined import done
```



---
## record_undefined_ref
```python
from partially_defined import record_undefined_ref
```

Records an undefined reference. These can later be retrieved via `pop_undefined_ref`.

---
## pop_undefined_ref
```python
from partially_defined import pop_undefined_ref
```

If name has previously been reported as undefined, the NameExpr that was called will be returned.

---
## _scope
```python
from partially_defined import _scope
```



---
## enter_scope
```python
from partially_defined import enter_scope
```



---
## exit_scope
```python
from partially_defined import exit_scope
```



---
## in_scope
```python
from partially_defined import in_scope
```



---
## start_branch_statement
```python
from partially_defined import start_branch_statement
```



---
## end_branch_statement
```python
from partially_defined import end_branch_statement
```



---
## is_defined_in_different_branch
```python
from partially_defined import is_defined_in_different_branch
```

This will return true if a variable is defined in a branch that's not the current branch.

---
## var_used_before_def
```python
from partially_defined import var_used_before_def
```



---
## variable_may_be_undefined
```python
from partially_defined import variable_may_be_undefined
```



---
## process_definition
```python
from partially_defined import process_definition
```



---
## visit_global_decl
```python
from partially_defined import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from partially_defined import visit_nonlocal_decl
```



---
## process_lvalue
```python
from partially_defined import process_lvalue
```



---
## visit_assignment_stmt
```python
from partially_defined import visit_assignment_stmt
```



---
## visit_assignment_expr
```python
from partially_defined import visit_assignment_expr
```



---
## visit_if_stmt
```python
from partially_defined import visit_if_stmt
```



---
## visit_match_stmt
```python
from partially_defined import visit_match_stmt
```



---
## visit_func_def
```python
from partially_defined import visit_func_def
```



---
## visit_func
```python
from partially_defined import visit_func
```



---
## visit_generator_expr
```python
from partially_defined import visit_generator_expr
```



---
## visit_dictionary_comprehension
```python
from partially_defined import visit_dictionary_comprehension
```



---
## visit_for_stmt
```python
from partially_defined import visit_for_stmt
```



---
## visit_return_stmt
```python
from partially_defined import visit_return_stmt
```



---
## visit_lambda_expr
```python
from partially_defined import visit_lambda_expr
```



---
## visit_assert_stmt
```python
from partially_defined import visit_assert_stmt
```



---
## visit_raise_stmt
```python
from partially_defined import visit_raise_stmt
```



---
## visit_continue_stmt
```python
from partially_defined import visit_continue_stmt
```



---
## visit_break_stmt
```python
from partially_defined import visit_break_stmt
```



---
## visit_expression_stmt
```python
from partially_defined import visit_expression_stmt
```



---
## visit_try_stmt
```python
from partially_defined import visit_try_stmt
```

Note that finding undefined vars in `finally` requires different handling from
the rest of the code. In particular, we want to disallow skipping branches due to jump
statements in except/else clauses for finally but not for other cases. Imagine a case like:
def f() -> int:
    try:
        x = 1
    except:
        # This jump statement needs to be handled differently depending on whether or
        # not we're trying to process `finally` or not.
        return 0
    finally:
        # `x` may be undefined here.
        pass
    # `x` is always defined here.
    return x

---
## process_try_stmt
```python
from partially_defined import process_try_stmt
```

Processes try statement decomposing it into the following:
if ...:
    body
    else_body
elif ...:
    except 1
elif ...:
    except 2
else:
    except n
finally

---
## visit_while_stmt
```python
from partially_defined import visit_while_stmt
```



---
## visit_as_pattern
```python
from partially_defined import visit_as_pattern
```



---
## visit_starred_pattern
```python
from partially_defined import visit_starred_pattern
```



---
## visit_name_expr
```python
from partially_defined import visit_name_expr
```



---
## visit_with_stmt
```python
from partially_defined import visit_with_stmt
```



---
## visit_class_def
```python
from partially_defined import visit_class_def
```



---
## visit_import
```python
from partially_defined import visit_import
```



---
## visit_import_from
```python
from partially_defined import visit_import_from
```



---
## visit_type_alias_stmt
```python
from partially_defined import visit_type_alias_stmt
```



---
## __name__
```python
from semanal_classprop import __name__
```

Calculate some properties of classes.

These happen after semantic analysis and before type checking.

---
## calculate_class_abstract_status
```python
from semanal_classprop import calculate_class_abstract_status
```

Calculate abstract status of a class.

Set is_abstract of the type to True if the type has an unimplemented
abstract attribute.  Also compute a list of abstract attributes.
Report error is required ABCMeta metaclass is missing.

---
## check_protocol_status
```python
from semanal_classprop import check_protocol_status
```

Check that all classes in MRO of a protocol are protocols

---
## calculate_class_vars
```python
from semanal_classprop import calculate_class_vars
```

Try to infer additional class variables.

Subclass attribute assignments with no type annotation are assumed
to be classvar if overriding a declared classvar from the base
class.

This must happen after the main semantic analysis pass, since
this depends on base class bodies having been fully analyzed.

---
## add_type_promotion
```python
from semanal_classprop import add_type_promotion
```

Setup extra, ad-hoc subtyping relationships between classes (promotion).

This includes things like 'int' being compatible with 'float'.

---
## report
```python
from semanal_classprop import report
```



---
## ExpressionVisitor
```python
from visitor import ExpressionVisitor
```



---
## StatementVisitor
```python
from visitor import StatementVisitor
```



---
## PatternVisitor
```python
from visitor import PatternVisitor
```



---
## visit_int_expr
```python
from visitor import visit_int_expr
```



---
## visit_str_expr
```python
from visitor import visit_str_expr
```



---
## visit_bytes_expr
```python
from visitor import visit_bytes_expr
```



---
## visit_float_expr
```python
from visitor import visit_float_expr
```



---
## visit_complex_expr
```python
from visitor import visit_complex_expr
```



---
## visit_ellipsis
```python
from visitor import visit_ellipsis
```



---
## visit_star_expr
```python
from visitor import visit_star_expr
```



---
## visit_name_expr
```python
from visitor import visit_name_expr
```



---
## visit_member_expr
```python
from visitor import visit_member_expr
```



---
## visit_yield_from_expr
```python
from visitor import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from visitor import visit_yield_expr
```



---
## visit_call_expr
```python
from visitor import visit_call_expr
```



---
## visit_op_expr
```python
from visitor import visit_op_expr
```



---
## visit_comparison_expr
```python
from visitor import visit_comparison_expr
```



---
## visit_cast_expr
```python
from visitor import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from visitor import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from visitor import visit_reveal_expr
```



---
## visit_super_expr
```python
from visitor import visit_super_expr
```



---
## visit_unary_expr
```python
from visitor import visit_unary_expr
```



---
## visit_assignment_expr
```python
from visitor import visit_assignment_expr
```



---
## visit_list_expr
```python
from visitor import visit_list_expr
```



---
## visit_dict_expr
```python
from visitor import visit_dict_expr
```



---
## visit_tuple_expr
```python
from visitor import visit_tuple_expr
```



---
## visit_set_expr
```python
from visitor import visit_set_expr
```



---
## visit_index_expr
```python
from visitor import visit_index_expr
```



---
## visit_type_application
```python
from visitor import visit_type_application
```



---
## visit_lambda_expr
```python
from visitor import visit_lambda_expr
```



---
## visit_list_comprehension
```python
from visitor import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from visitor import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from visitor import visit_dictionary_comprehension
```



---
## visit_generator_expr
```python
from visitor import visit_generator_expr
```



---
## visit_slice_expr
```python
from visitor import visit_slice_expr
```



---
## visit_conditional_expr
```python
from visitor import visit_conditional_expr
```



---
## visit_type_var_expr
```python
from visitor import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from visitor import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from visitor import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from visitor import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from visitor import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from visitor import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from visitor import visit_typeddict_expr
```



---
## visit_newtype_expr
```python
from visitor import visit_newtype_expr
```



---
## visit__promote_expr
```python
from visitor import visit__promote_expr
```



---
## visit_await_expr
```python
from visitor import visit_await_expr
```



---
## visit_temp_node
```python
from visitor import visit_temp_node
```



---
## visit_assignment_stmt
```python
from visitor import visit_assignment_stmt
```



---
## visit_for_stmt
```python
from visitor import visit_for_stmt
```



---
## visit_with_stmt
```python
from visitor import visit_with_stmt
```



---
## visit_del_stmt
```python
from visitor import visit_del_stmt
```



---
## visit_func_def
```python
from visitor import visit_func_def
```



---
## visit_overloaded_func_def
```python
from visitor import visit_overloaded_func_def
```



---
## visit_class_def
```python
from visitor import visit_class_def
```



---
## visit_global_decl
```python
from visitor import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from visitor import visit_nonlocal_decl
```



---
## visit_decorator
```python
from visitor import visit_decorator
```



---
## visit_import
```python
from visitor import visit_import
```



---
## visit_import_from
```python
from visitor import visit_import_from
```



---
## visit_import_all
```python
from visitor import visit_import_all
```



---
## visit_block
```python
from visitor import visit_block
```



---
## visit_expression_stmt
```python
from visitor import visit_expression_stmt
```



---
## visit_operator_assignment_stmt
```python
from visitor import visit_operator_assignment_stmt
```



---
## visit_while_stmt
```python
from visitor import visit_while_stmt
```



---
## visit_return_stmt
```python
from visitor import visit_return_stmt
```



---
## visit_assert_stmt
```python
from visitor import visit_assert_stmt
```



---
## visit_if_stmt
```python
from visitor import visit_if_stmt
```



---
## visit_break_stmt
```python
from visitor import visit_break_stmt
```



---
## visit_continue_stmt
```python
from visitor import visit_continue_stmt
```



---
## visit_pass_stmt
```python
from visitor import visit_pass_stmt
```



---
## visit_raise_stmt
```python
from visitor import visit_raise_stmt
```



---
## visit_try_stmt
```python
from visitor import visit_try_stmt
```



---
## visit_match_stmt
```python
from visitor import visit_match_stmt
```



---
## visit_type_alias_stmt
```python
from visitor import visit_type_alias_stmt
```



---
## visit_as_pattern
```python
from visitor import visit_as_pattern
```



---
## visit_or_pattern
```python
from visitor import visit_or_pattern
```



---
## visit_value_pattern
```python
from visitor import visit_value_pattern
```



---
## visit_singleton_pattern
```python
from visitor import visit_singleton_pattern
```



---
## visit_sequence_pattern
```python
from visitor import visit_sequence_pattern
```



---
## visit_starred_pattern
```python
from visitor import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from visitor import visit_mapping_pattern
```



---
## visit_class_pattern
```python
from visitor import visit_class_pattern
```



---
## visit_mypy_file
```python
from visitor import visit_mypy_file
```



---
## visit_var
```python
from visitor import visit_var
```



---
## visit_type_alias
```python
from visitor import visit_type_alias
```



---
## visit_placeholder_node
```python
from visitor import visit_placeholder_node
```



---
## __name__
```python
from gclogger import __name__
```



---
## GcLogger
```python
from gclogger import GcLogger
```

Context manager to log GC stats and overall time.

---
## __enter__
```python
from gclogger import __enter__
```



---
## gc_callback
```python
from gclogger import gc_callback
```



---
## __exit__
```python
from gclogger import __exit__
```



---
## get_stats
```python
from gclogger import get_stats
```



---
## __name__
```python
from reachability import __name__
```

Utilities related to determining the reachability of code (in semantic analysis).

---
## infer_reachability_of_if_statement
```python
from reachability import infer_reachability_of_if_statement
```



---
## infer_reachability_of_match_statement
```python
from reachability import infer_reachability_of_match_statement
```



---
## assert_will_always_fail
```python
from reachability import assert_will_always_fail
```



---
## infer_condition_value
```python
from reachability import infer_condition_value
```

Infer whether the given condition is always true/false.

Return ALWAYS_TRUE if always true, ALWAYS_FALSE if always false,
MYPY_TRUE if true under mypy and false at runtime, MYPY_FALSE if
false under mypy and true at runtime, else TRUTH_VALUE_UNKNOWN.

---
## infer_pattern_value
```python
from reachability import infer_pattern_value
```



---
## consider_sys_version_info
```python
from reachability import consider_sys_version_info
```

Consider whether expr is a comparison involving sys.version_info.

Return ALWAYS_TRUE, ALWAYS_FALSE, or TRUTH_VALUE_UNKNOWN.

---
## consider_sys_platform
```python
from reachability import consider_sys_platform
```

Consider whether expr is a comparison involving sys.platform.

Return ALWAYS_TRUE, ALWAYS_FALSE, or TRUTH_VALUE_UNKNOWN.

---
## fixed_comparison
```python
from reachability import fixed_comparison
```



---
## contains_int_or_tuple_of_ints
```python
from reachability import contains_int_or_tuple_of_ints
```



---
## contains_sys_version_info
```python
from reachability import contains_sys_version_info
```



---
## is_sys_attr
```python
from reachability import is_sys_attr
```



---
## mark_block_unreachable
```python
from reachability import mark_block_unreachable
```



---
## MarkImportsUnreachableVisitor
```python
from reachability import MarkImportsUnreachableVisitor
```

Visitor that flags all imports nested within a node as unreachable.

---
## mark_block_mypy_only
```python
from reachability import mark_block_mypy_only
```



---
## MarkImportsMypyOnlyVisitor
```python
from reachability import MarkImportsMypyOnlyVisitor
```

Visitor that sets is_mypy_only (which affects priority).

---
## visit_import
```python
from reachability import visit_import
```



---
## visit_import_from
```python
from reachability import visit_import_from
```



---
## visit_import_all
```python
from reachability import visit_import_all
```



---
## visit_func_def
```python
from reachability import visit_func_def
```



---
## __name__
```python
from semanal_main import __name__
```

Top-level logic for the semantic analyzer.

The semantic analyzer binds names, resolves imports, detects various
special constructs that don't have dedicated AST nodes after parse
(such as 'cast' which looks like a call), populates symbol tables, and
performs various simple consistency checks.

Semantic analysis of each SCC (strongly connected component; import
cycle) is performed in one unit. Each module is analyzed as multiple
separate *targets*; the module top level is one target and each function
is a target. Nested functions are not separate targets, however. This is
mostly identical to targets used by mypy daemon (but classes aren't
targets in semantic analysis).

We first analyze each module top level in an SCC. If we encounter some
names that we can't bind because the target of the name may not have
been processed yet, we *defer* the current target for further
processing. Deferred targets will be analyzed additional times until
everything can be bound, or we reach a maximum number of iterations.

We keep track of a set of incomplete namespaces, i.e. namespaces that we
haven't finished populating yet. References to these namespaces cause a
deferral if they can't be satisfied. Initially every module in the SCC
will be incomplete.

---
## semantic_analysis_for_scc
```python
from semanal_main import semantic_analysis_for_scc
```

Perform semantic analysis for all modules in a SCC (import cycle).

Assume that reachability analysis has already been performed.

The scc will be processed roughly in the order the modules are included
in the list.

---
## cleanup_builtin_scc
```python
from semanal_main import cleanup_builtin_scc
```

Remove imported names from builtins namespace.

This way names imported from typing in builtins.pyi aren't available
by default (without importing them). We can only do this after processing
the whole SCC is finished, when the imported names aren't needed for
processing builtins.pyi itself.

---
## semantic_analysis_for_targets
```python
from semanal_main import semantic_analysis_for_targets
```

Semantically analyze only selected nodes in a given module.

This essentially mirrors the logic of semantic_analysis_for_scc()
except that we process only some targets. This is used in fine grained
incremental mode, when propagating an update.

The saved_attrs are implicitly declared instance attributes (attributes
defined on self) removed by AST stripper that may need to be reintroduced
here.  They must be added before any methods are analyzed.

---
## restore_saved_attrs
```python
from semanal_main import restore_saved_attrs
```

Restore instance variables removed during AST strip that haven't been added yet.

---
## process_top_levels
```python
from semanal_main import process_top_levels
```



---
## process_functions
```python
from semanal_main import process_functions
```



---
## process_top_level_function
```python
from semanal_main import process_top_level_function
```

Analyze single top-level function or method.

Process the body of the function (including nested functions) again and again,
until all names have been resolved (or iteration limit reached).

---
## get_all_leaf_targets
```python
from semanal_main import get_all_leaf_targets
```

Return all leaf targets in a symbol table (module-level and methods).

---
## semantic_analyze_target
```python
from semanal_main import semantic_analyze_target
```

Semantically analyze a single target.

Return tuple with these items:
- list of deferred targets
- was some definition incomplete (need to run another pass)
- were any new names defined (or placeholders replaced)

---
## check_type_arguments
```python
from semanal_main import check_type_arguments
```



---
## check_type_arguments_in_targets
```python
from semanal_main import check_type_arguments_in_targets
```

Check type arguments against type variable bounds and restrictions.

This mirrors the logic in check_type_arguments() except that we process only
some targets. This is used in fine grained incremental mode.

---
## apply_class_plugin_hooks
```python
from semanal_main import apply_class_plugin_hooks
```

Apply class plugin hooks within a SCC.

We run these after to the main semantic analysis so that the hooks
don't need to deal with incomplete definitions such as placeholder
types.

Note that some hooks incorrectly run during the main semantic
analysis pass, for historical reasons.

---
## apply_hooks_to_class
```python
from semanal_main import apply_hooks_to_class
```



---
## calculate_class_properties
```python
from semanal_main import calculate_class_properties
```



---
## check_blockers
```python
from semanal_main import check_blockers
```



---
## __name__
```python
from typevars import __name__
```



---
## fill_typevars
```python
from typevars import fill_typevars
```

For a non-generic type, return instance type representing the type.

For a generic G type with parameters T1, .., Tn, return G[T1, ..., Tn].

---
## fill_typevars_with_any
```python
from typevars import fill_typevars_with_any
```

Apply a correct number of Any's as type arguments to a type.

---
## has_no_typevars
```python
from typevars import has_no_typevars
```



---
## __name__
```python
from copytype import __name__
```



---
## copy_type
```python
from copytype import copy_type
```

Create a shallow copy of a type.

This can be used to mutate the copy with truthiness information.

Classes compiled with mypyc don't support copy.copy(), so we need
a custom implementation.

---
## TypeShallowCopier
```python
from copytype import TypeShallowCopier
```



---
## visit_unbound_type
```python
from copytype import visit_unbound_type
```



---
## visit_any
```python
from copytype import visit_any
```



---
## visit_none_type
```python
from copytype import visit_none_type
```



---
## visit_uninhabited_type
```python
from copytype import visit_uninhabited_type
```



---
## visit_erased_type
```python
from copytype import visit_erased_type
```



---
## visit_deleted_type
```python
from copytype import visit_deleted_type
```



---
## visit_instance
```python
from copytype import visit_instance
```



---
## visit_type_var
```python
from copytype import visit_type_var
```



---
## visit_param_spec
```python
from copytype import visit_param_spec
```



---
## visit_parameters
```python
from copytype import visit_parameters
```



---
## visit_type_var_tuple
```python
from copytype import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from copytype import visit_unpack_type
```



---
## visit_partial_type
```python
from copytype import visit_partial_type
```



---
## visit_callable_type
```python
from copytype import visit_callable_type
```



---
## visit_tuple_type
```python
from copytype import visit_tuple_type
```



---
## visit_typeddict_type
```python
from copytype import visit_typeddict_type
```



---
## visit_literal_type
```python
from copytype import visit_literal_type
```



---
## visit_union_type
```python
from copytype import visit_union_type
```



---
## visit_overloaded
```python
from copytype import visit_overloaded
```



---
## visit_type_type
```python
from copytype import visit_type_type
```



---
## visit_type_alias_type
```python
from copytype import visit_type_alias_type
```



---
## copy_common
```python
from copytype import copy_common
```



---
## __name__
```python
from dmypy_util import __name__
```

Shared code between dmypy.py and dmypy_server.py.

This should be pretty lightweight and not depend on other mypy code (other than ipc).

---
## receive
```python
from dmypy_util import receive
```

Receive single JSON data frame from a connection.

Raise OSError if the data received is not valid JSON or if it is
not a dict.

---
## send
```python
from dmypy_util import send
```

Send data to a connection encoded and framed.

The data must be JSON-serializable. We assume that a single send call is a
single frame to be sent on the connect.

---
## WriteToConn
```python
from dmypy_util import WriteToConn
```

Helper class to write to a connection instead of standard output.

---
## __init__
```python
from dmypy_util import __init__
```



---
## __enter__
```python
from dmypy_util import __enter__
```



---
## __exit__
```python
from dmypy_util import __exit__
```



---
## __iter__
```python
from dmypy_util import __iter__
```



---
## __next__
```python
from dmypy_util import __next__
```



---
## close
```python
from dmypy_util import close
```



---
## fileno
```python
from dmypy_util import fileno
```



---
## flush
```python
from dmypy_util import flush
```



---
## isatty
```python
from dmypy_util import isatty
```



---
## read
```python
from dmypy_util import read
```



---
## readable
```python
from dmypy_util import readable
```



---
## readline
```python
from dmypy_util import readline
```



---
## readlines
```python
from dmypy_util import readlines
```



---
## seek
```python
from dmypy_util import seek
```



---
## seekable
```python
from dmypy_util import seekable
```



---
## tell
```python
from dmypy_util import tell
```



---
## truncate
```python
from dmypy_util import truncate
```



---
## write
```python
from dmypy_util import write
```



---
## writable
```python
from dmypy_util import writable
```



---
## writelines
```python
from dmypy_util import writelines
```



---
## __name__
```python
from typeops import __name__
```

Miscellaneous type operations and helpers for use during type checking.

NOTE: These must not be accessed from mypy.nodes or mypy.types to avoid import
      cycles. These must not be called from the semantic analysis main pass
      since these may assume that MROs are ready.

---
## is_recursive_pair
```python
from typeops import is_recursive_pair
```

Is this a pair of recursive types?

There may be more cases, and we may be forced to use e.g. has_recursive_types()
here, but this function is called in very hot code, so we try to keep it simple
and return True only in cases we know may have problems.

---
## tuple_fallback
```python
from typeops import tuple_fallback
```

Return fallback type for a tuple.

---
## get_self_type
```python
from typeops import get_self_type
```



---
## type_object_type_from_function
```python
from typeops import type_object_type_from_function
```



---
## class_callable
```python
from typeops import class_callable
```

Create a type object type based on the signature of __init__.

---
## map_type_from_supertype
```python
from typeops import map_type_from_supertype
```

Map type variables in a type defined in a supertype context to be valid
in the subtype context. Assume that the result is unique; if more than
one type is possible, return one of the alternatives.

For example, assume

  class D(Generic[S]): ...
  class C(D[E[T]], Generic[T]): ...

Now S in the context of D would be mapped to E[T] in the context of C.

---
## supported_self_type
```python
from typeops import supported_self_type
```

Is this a supported kind of explicit self-types?

Currently, this means an X or Type[X], where X is an instance or
a type variable with an instance upper bound.

---
## bind_self
```python
from typeops import bind_self
```

Return a copy of `method`, with the type of its first parameter (usually
self or cls) bound to original_type.

If the type of `self` is a generic type (T, or Type[T] for classmethods),
instantiate every occurrence of type with original_type in the rest of the
signature and in the return type.

original_type is the type of E in the expression E.copy(). It is None in
compatibility checks. In this case we treat it as the erasure of the
declared type of self.

This way we can express "the type of self". For example:

T = TypeVar('T', bound='A')
class A:
    def copy(self: T) -> T: ...

class B(A): pass

b = B().copy()  # type: B

---
## erase_to_bound
```python
from typeops import erase_to_bound
```



---
## callable_corresponding_argument
```python
from typeops import callable_corresponding_argument
```

Return the argument a function that corresponds to `model`

---
## simple_literal_type
```python
from typeops import simple_literal_type
```

Extract the underlying fallback Instance type for a simple Literal

---
## is_simple_literal
```python
from typeops import is_simple_literal
```



---
## make_simplified_union
```python
from typeops import make_simplified_union
```

Build union type with redundant union items removed.

If only a single item remains, this may return a non-union type.

Examples:

* [int, str] -> Union[int, str]
* [int, object] -> object
* [int, int] -> int
* [int, Any] -> Union[int, Any] (Any types are not simplified away!)
* [Any, Any] -> Any
* [int, Union[bytes, str]] -> Union[int, bytes, str]

Note: This must NOT be used during semantic analysis, since TypeInfos may not
      be fully initialized.

The keep_erased flag is used for type inference against union types
containing type variables. If set to True, keep all ErasedType items.

The contract_literals flag indicates whether we need to contract literal types
back into a sum type. Set it to False when called by try_expanding_sum_type_
to_union().

---
## _remove_redundant_union_items
```python
from typeops import _remove_redundant_union_items
```



---
## _get_type_method_ret_type
```python
from typeops import _get_type_method_ret_type
```



---
## true_only
```python
from typeops import true_only
```

Restricted version of t with only True-ish values

---
## false_only
```python
from typeops import false_only
```

Restricted version of t with only False-ish values

---
## true_or_false
```python
from typeops import true_or_false
```

Unrestricted version of t with both True-ish and False-ish values

---
## erase_def_to_union_or_bound
```python
from typeops import erase_def_to_union_or_bound
```



---
## erase_to_union_or_bound
```python
from typeops import erase_to_union_or_bound
```



---
## function_type
```python
from typeops import function_type
```



---
## callable_type
```python
from typeops import callable_type
```



---
## try_getting_str_literals
```python
from typeops import try_getting_str_literals
```

If the given expression or type corresponds to a string literal
or a union of string literals, returns a list of the underlying strings.
Otherwise, returns None.

Specifically, this function is guaranteed to return a list with
one or more strings if one of the following is true:

1. 'expr' is a StrExpr
2. 'typ' is a LiteralType containing a string
3. 'typ' is a UnionType containing only LiteralType of strings

---
## try_getting_str_literals_from_type
```python
from typeops import try_getting_str_literals_from_type
```

If the given expression or type corresponds to a string Literal
or a union of string Literals, returns a list of the underlying strings.
Otherwise, returns None.

For example, if we had the type 'Literal["foo", "bar"]' as input, this function
would return a list of strings ["foo", "bar"].

---
## try_getting_int_literals_from_type
```python
from typeops import try_getting_int_literals_from_type
```

If the given expression or type corresponds to an int Literal
or a union of int Literals, returns a list of the underlying ints.
Otherwise, returns None.

For example, if we had the type 'Literal[1, 2, 3]' as input, this function
would return a list of ints [1, 2, 3].

---
## try_getting_literals_from_type
```python
from typeops import try_getting_literals_from_type
```

If the given expression or type corresponds to a Literal or
union of Literals where the underlying values correspond to the given
target type, returns a list of those underlying values. Otherwise,
returns None.

---
## is_literal_type_like
```python
from typeops import is_literal_type_like
```

Returns 'true' if the given type context is potentially either a LiteralType,
a Union of LiteralType, or something similar.

---
## is_singleton_type
```python
from typeops import is_singleton_type
```

Returns 'true' if this type is a "singleton type" -- if there exists
exactly only one runtime value associated with this type.

That is, given two values 'a' and 'b' that have the same type 't',
'is_singleton_type(t)' returns True if and only if the expression 'a is b' is
always true.

Currently, this returns True when given NoneTypes, enum LiteralTypes,
enum types with a single value and ... (Ellipses).

Note that other kinds of LiteralTypes cannot count as singleton types. For
example, suppose we do 'a = 100000 + 1' and 'b = 100001'. It is not guaranteed
that 'a is b' will always be true -- some implementations of Python will end up
constructing two distinct instances of 100001.

---
## try_expanding_sum_type_to_union
```python
from typeops import try_expanding_sum_type_to_union
```

Attempts to recursively expand any enum Instances with the given target_fullname
into a Union of all of its component LiteralTypes.

For example, if we have:

    class Color(Enum):
        RED = 1
        BLUE = 2
        YELLOW = 3

    class Status(Enum):
        SUCCESS = 1
        FAILURE = 2
        UNKNOWN = 3

...and if we call `try_expanding_enum_to_union(Union[Color, Status], 'module.Color')`,
this function will return Literal[Color.RED, Color.BLUE, Color.YELLOW, Status].

---
## try_contracting_literals_in_union
```python
from typeops import try_contracting_literals_in_union
```

Contracts any literal types back into a sum type if possible.

Will replace the first instance of the literal with the sum type and
remove all others.

If we call `try_contracting_union(Literal[Color.RED, Color.BLUE, Color.YELLOW])`,
this function will return Color.

We also treat `Literal[True, False]` as `bool`.

---
## coerce_to_literal
```python
from typeops import coerce_to_literal
```

Recursively converts any Instances that have a last_known_value or are
instances of enum types with a single value into the corresponding LiteralType.

---
## get_type_vars
```python
from typeops import get_type_vars
```



---
## get_all_type_vars
```python
from typeops import get_all_type_vars
```



---
## TypeVarExtractor
```python
from typeops import TypeVarExtractor
```



---
## custom_special_method
```python
from typeops import custom_special_method
```

Does this type have a custom special method such as __format__() or __eq__()?

If check_all is True ensure all items of a union have a custom method, not just some.

---
## separate_union_literals
```python
from typeops import separate_union_literals
```

Separate literals from other members in a union type.

---
## try_getting_instance_fallback
```python
from typeops import try_getting_instance_fallback
```

Returns the Instance fallback for this type if one exists or None.

---
## fixup_partial_type
```python
from typeops import fixup_partial_type
```

Convert a partial type that we couldn't resolve into something concrete.

This means, for None we make it Optional[Any], and for anything else we
fill in all of the type arguments with Any.

---
## get_protocol_member
```python
from typeops import get_protocol_member
```



---
## __init__
```python
from typeops import __init__
```



---
## _merge
```python
from typeops import _merge
```



---
## visit_type_var
```python
from typeops import visit_type_var
```



---
## visit_param_spec
```python
from typeops import visit_param_spec
```



---
## visit_type_var_tuple
```python
from typeops import visit_type_var_tuple
```



---
## named_type
```python
from typeops import named_type
```



---
## __name__
```python
from stats import __name__
```

Utilities for calculating and reporting statistics about types.

---
## StatisticsVisitor
```python
from stats import StatisticsVisitor
```



---
## dump_type_stats
```python
from stats import dump_type_stats
```



---
## is_special_module
```python
from stats import is_special_module
```



---
## is_imprecise
```python
from stats import is_imprecise
```



---
## HasAnyQuery
```python
from stats import HasAnyQuery
```



---
## is_imprecise2
```python
from stats import is_imprecise2
```



---
## HasAnyQuery2
```python
from stats import HasAnyQuery2
```



---
## is_generic
```python
from stats import is_generic
```



---
## is_complex
```python
from stats import is_complex
```



---
## is_special_form_any
```python
from stats import is_special_form_any
```



---
## get_original_any
```python
from stats import get_original_any
```



---
## __init__
```python
from stats import __init__
```



---
## visit_mypy_file
```python
from stats import visit_mypy_file
```



---
## visit_import_from
```python
from stats import visit_import_from
```



---
## visit_import_all
```python
from stats import visit_import_all
```



---
## process_import
```python
from stats import process_import
```



---
## visit_import
```python
from stats import visit_import
```



---
## visit_func_def
```python
from stats import visit_func_def
```



---
## enter_scope
```python
from stats import enter_scope
```



---
## is_checked_scope
```python
from stats import is_checked_scope
```



---
## visit_class_def
```python
from stats import visit_class_def
```



---
## visit_type_application
```python
from stats import visit_type_application
```



---
## visit_assignment_stmt
```python
from stats import visit_assignment_stmt
```



---
## visit_expression_stmt
```python
from stats import visit_expression_stmt
```



---
## visit_pass_stmt
```python
from stats import visit_pass_stmt
```



---
## visit_break_stmt
```python
from stats import visit_break_stmt
```



---
## visit_continue_stmt
```python
from stats import visit_continue_stmt
```



---
## visit_name_expr
```python
from stats import visit_name_expr
```



---
## visit_yield_from_expr
```python
from stats import visit_yield_from_expr
```



---
## visit_call_expr
```python
from stats import visit_call_expr
```



---
## record_call_target_precision
```python
from stats import record_call_target_precision
```

Record precision of formal argument types used in a call.

---
## record_callable_target_precision
```python
from stats import record_callable_target_precision
```

Record imprecision caused by callee argument types.

This only considers arguments passed in a call expression. Arguments
with default values that aren't provided in a call arguably don't
contribute to typing imprecision at the *call site* (but they
contribute at the function definition).

---
## visit_member_expr
```python
from stats import visit_member_expr
```



---
## visit_op_expr
```python
from stats import visit_op_expr
```



---
## visit_comparison_expr
```python
from stats import visit_comparison_expr
```



---
## visit_index_expr
```python
from stats import visit_index_expr
```



---
## visit_assignment_expr
```python
from stats import visit_assignment_expr
```



---
## visit_unary_expr
```python
from stats import visit_unary_expr
```



---
## visit_str_expr
```python
from stats import visit_str_expr
```



---
## visit_bytes_expr
```python
from stats import visit_bytes_expr
```



---
## visit_int_expr
```python
from stats import visit_int_expr
```



---
## visit_float_expr
```python
from stats import visit_float_expr
```



---
## visit_complex_expr
```python
from stats import visit_complex_expr
```



---
## visit_ellipsis
```python
from stats import visit_ellipsis
```



---
## process_node
```python
from stats import process_node
```



---
## record_precise_if_checked_scope
```python
from stats import record_precise_if_checked_scope
```



---
## type
```python
from stats import type
```



---
## log
```python
from stats import log
```



---
## record_line
```python
from stats import record_line
```



---
## visit_any
```python
from stats import visit_any
```



---
## visit_callable_type
```python
from stats import visit_callable_type
```



---
## __name__
```python
from error_formatter import __name__
```

Defines the different custom formats in which mypy can output.

---
## ErrorFormatter
```python
from error_formatter import ErrorFormatter
```

Base class to define how errors are formatted before being printed.

---
## JSONFormatter
```python
from error_formatter import JSONFormatter
```

Formatter for basic JSON output format.

---
## report_error
```python
from error_formatter import report_error
```

Prints out the errors as simple, static JSON lines.

---
## __name__
```python
from dmypy_server import __name__
```

Server for mypy daemon mode.

This implements a daemon process which keeps useful state in memory
to enable fine-grained incremental reprocessing of changes.

---
## process_start_options
```python
from dmypy_server import process_start_options
```



---
## ignore_suppressed_imports
```python
from dmypy_server import ignore_suppressed_imports
```

Can we skip looking for newly unsuppressed imports to module?

---
## Server
```python
from dmypy_server import Server
```



---
## get_meminfo
```python
from dmypy_server import get_meminfo
```



---
## find_all_sources_in_build
```python
from dmypy_server import find_all_sources_in_build
```



---
## add_all_sources_to_changed
```python
from dmypy_server import add_all_sources_to_changed
```

Add all (explicit) sources to the list changed files in place.

Use this when re-processing of unchanged files is needed (e.g. for
the purpose of exporting types for inspections).

---
## fix_module_deps
```python
from dmypy_server import fix_module_deps
```

After an incremental update, update module dependencies to reflect the new state.

This can make some suppressed dependencies non-suppressed, and vice versa (if modules
have been added to or removed from the build).

---
## filter_out_missing_top_level_packages
```python
from dmypy_server import filter_out_missing_top_level_packages
```

Quickly filter out obviously missing top-level packages.

Return packages with entries that can't be found removed.

This is approximate: some packages that aren't actually valid may be
included. However, all potentially valid packages must be returned.

---
## daemonize
```python
from dmypy_server import daemonize
```

Run the mypy daemon in a grandchild of the current process

Return 0 for success, exit status for failure, negative if
subprocess killed by signal.

---
## _daemonize_cb
```python
from dmypy_server import _daemonize_cb
```

Arrange to call func() in a grandchild of the current process.

Return 0 for success, exit status for failure, negative if
subprocess killed by signal.

---
## __init__
```python
from dmypy_server import __init__
```

Initialize the server with the desired mypy flags.

---
## _response_metadata
```python
from dmypy_server import _response_metadata
```



---
## serve
```python
from dmypy_server import serve
```

Serve requests, synchronously (no thread or fork).

---
## run_command
```python
from dmypy_server import run_command
```

Run a specific command from the registry.

---
## cmd_status
```python
from dmypy_server import cmd_status
```

Return daemon status.

---
## cmd_stop
```python
from dmypy_server import cmd_stop
```

Stop daemon.

---
## cmd_run
```python
from dmypy_server import cmd_run
```

Check a list of files, triggering a restart if needed.

---
## cmd_check
```python
from dmypy_server import cmd_check
```

Check a list of files.

---
## cmd_recheck
```python
from dmypy_server import cmd_recheck
```

Check the same list of files we checked most recently.

If remove/update is given, they modify the previous list;
if all are None, stat() is called for each file in the previous list.

---
## check
```python
from dmypy_server import check
```

Check using fine-grained incremental mode.

If is_tty is True format the output nicely with colors and summary line
(unless disabled in self.options). Also pass the terminal_width to formatter.

---
## flush_caches
```python
from dmypy_server import flush_caches
```



---
## update_stats
```python
from dmypy_server import update_stats
```



---
## following_imports
```python
from dmypy_server import following_imports
```

Are we following imports?

---
## initialize_fine_grained
```python
from dmypy_server import initialize_fine_grained
```



---
## fine_grained_increment
```python
from dmypy_server import fine_grained_increment
```

Perform a fine-grained type checking increment.

If remove and update are None, determine changed paths by using
fswatcher. Otherwise, assume that only these files have changes.

Args:
    sources: sources passed on the command line
    remove: paths of files that have been removed
    update: paths of files that have been changed or created
    explicit_export_types: --export-type was passed in a check command
      (as opposite to being set in dmypy start)

---
## fine_grained_increment_follow_imports
```python
from dmypy_server import fine_grained_increment_follow_imports
```

Like fine_grained_increment, but follow imports.

---
## find_reachable_changed_modules
```python
from dmypy_server import find_reachable_changed_modules
```

Follow imports within graph from given sources until hitting changed modules.

If we find a changed module, we can't continue following imports as the imports
may have changed.

Args:
    roots: modules where to start search from
    graph: module graph to use for the search
    seen: modules we've seen before that won't be visited (mutated here!!)
    changed_paths: which paths have changed (stop search here and return any found)

Return (encountered reachable changed modules,
        unchanged files not in sources_set traversed).

---
## direct_imports
```python
from dmypy_server import direct_imports
```

Return the direct imports of module not included in seen.

---
## find_added_suppressed
```python
from dmypy_server import find_added_suppressed
```

Find suppressed modules that have been added (and not included in seen).

Args:
    seen: reachable modules we've seen before (mutated here!!)

Return suppressed, added modules.

---
## increment_output
```python
from dmypy_server import increment_output
```



---
## pretty_messages
```python
from dmypy_server import pretty_messages
```



---
## update_sources
```python
from dmypy_server import update_sources
```



---
## update_changed
```python
from dmypy_server import update_changed
```



---
## find_changed
```python
from dmypy_server import find_changed
```



---
## _find_changed
```python
from dmypy_server import _find_changed
```



---
## cmd_inspect
```python
from dmypy_server import cmd_inspect
```

Locate and inspect expression(s).

---
## cmd_suggest
```python
from dmypy_server import cmd_suggest
```

Suggest a signature for a function.

---
## cmd_hang
```python
from dmypy_server import cmd_hang
```

Hang for 100 seconds, as a debug hack.

---
## refresh_file
```python
from dmypy_server import refresh_file
```



---
## __name__
```python
from messages import __name__
```



---
## MessageBuilder
```python
from messages import MessageBuilder
```

Helper class for reporting type checker error messages with parameters.

The methods of this class need to be provided with the context within a
file; the errors member manages the wider context.

IDEA: Support a 'verbose mode' that includes full information about types
      in error messages and that may otherwise produce more detailed error
      messages.

---
## quote_type_string
```python
from messages import quote_type_string
```

Quotes a type representation for use in messages.

---
## format_callable_args
```python
from messages import format_callable_args
```

Format a bunch of Callable arguments into a string

---
## format_type_inner
```python
from messages import format_type_inner
```

Convert a type to a relatively short string suitable for error messages.

Args:
  verbosity: a coarse grained control on the verbosity of the type
  fullnames: a set of names that should be printed in full

---
## collect_all_named_types
```python
from messages import collect_all_named_types
```

Return all instances/aliases/type variables that `t` contains (including `t`).

This is similar to collect_all_inner_types from typeanal but only
returns instances and will recurse into fallbacks.

---
## CollectAllNamedTypesQuery
```python
from messages import CollectAllNamedTypesQuery
```



---
## scoped_type_var_name
```python
from messages import scoped_type_var_name
```



---
## find_type_overlaps
```python
from messages import find_type_overlaps
```

Return a set of fullnames that share a short name and appear in either type.

This is used to ensure that distinct types with the same short name are printed
with their fullname.

---
## format_type
```python
from messages import format_type
```

Convert a type to a relatively short string suitable for error messages.

`verbosity` is a coarse-grained control on the verbosity of the type

This function returns a string appropriate for unmodified use in error
messages; this means that it will be quoted in most cases.  If
modification of the formatted string is required, callers should use
format_type_bare.

---
## format_type_bare
```python
from messages import format_type_bare
```

Convert a type to a relatively short string suitable for error messages.

`verbosity` is a coarse-grained control on the verbosity of the type
`fullnames` specifies a set of names that should be printed in full

This function will return an unquoted string.  If a caller doesn't need to
perform post-processing on the string output, format_type should be used
instead.  (The caller may want to use quote_type_string after
processing has happened, to maintain consistent quoting in messages.)

---
## format_type_distinctly
```python
from messages import format_type_distinctly
```

Jointly format types to distinct strings.

Increase the verbosity of the type strings until they become distinct
while also requiring that distinct types with the same short name are
formatted distinctly.

By default, the returned strings are created using format_type() and will be
quoted accordingly. If ``bare`` is True, the returned strings will not
be quoted; callers who need to do post-processing of the strings before
quoting them (such as prepending * or **) should use this.

---
## pretty_class_or_static_decorator
```python
from messages import pretty_class_or_static_decorator
```

Return @classmethod or @staticmethod, if any, for the given callable type.

---
## pretty_callable
```python
from messages import pretty_callable
```

Return a nice easily-readable representation of a callable type.
For example:
    def [T <: int] f(self, x: int, y: T) -> None

If skip_self is True, print an actual callable type, as it would appear
when bound on an instance/class, rather than how it would appear in the
defining statement.

---
## variance_string
```python
from messages import variance_string
```



---
## get_missing_protocol_members
```python
from messages import get_missing_protocol_members
```

Find all protocol members of 'right' that are not implemented
(i.e. completely missing) in 'left'.

---
## get_conflict_protocol_types
```python
from messages import get_conflict_protocol_types
```

Find members that are defined in 'left' but have incompatible types.
Return them as a list of ('member', 'got', 'expected').

---
## get_bad_protocol_flags
```python
from messages import get_bad_protocol_flags
```

Return all incompatible attribute flags for members that are present in both
'left' and 'right'.

---
## capitalize
```python
from messages import capitalize
```

Capitalize the first character of a string.

---
## extract_type
```python
from messages import extract_type
```

If the argument is the name of a method (of form C.m), return
the type portion in quotes (e.g. "y"). Otherwise, return the string
unmodified.

---
## strip_quotes
```python
from messages import strip_quotes
```

Strip a double quote at the beginning and end of the string, if any.

---
## format_string_list
```python
from messages import format_string_list
```



---
## format_item_name_list
```python
from messages import format_item_name_list
```



---
## callable_name
```python
from messages import callable_name
```



---
## for_function
```python
from messages import for_function
```



---
## wrong_type_arg_count
```python
from messages import wrong_type_arg_count
```



---
## find_defining_module
```python
from messages import find_defining_module
```



---
## _real_quick_ratio
```python
from messages import _real_quick_ratio
```



---
## best_matches
```python
from messages import best_matches
```



---
## pretty_seq
```python
from messages import pretty_seq
```



---
## append_invariance_notes
```python
from messages import append_invariance_notes
```

Explain that the type is invariant and give notes for how to solve the issue.

---
## append_union_note
```python
from messages import append_union_note
```

Point to specific union item(s) that may cause failure in subtype check.

---
## append_numbers_notes
```python
from messages import append_numbers_notes
```

Explain if an unsupported type from "numbers" is used in a subtype check.

---
## make_inferred_type_note
```python
from messages import make_inferred_type_note
```

Explain that the user may have forgotten to type a variable.

The user does not expect an error if the inferred container type is the same as the return
type of a function and the argument type(s) are a subtype of the argument type(s) of the
return type. This note suggests that they add a type annotation with the return type instead
of relying on the inferred type.

---
## format_key_list
```python
from messages import format_key_list
```



---
## ignore_last_known_values
```python
from messages import ignore_last_known_values
```

This will avoid types like str | str in error messages.

last_known_values are kept during union simplification, but may cause
weird formatting for e.g. tuples of literals.

---
## __init__
```python
from messages import __init__
```



---
## filter_errors
```python
from messages import filter_errors
```



---
## add_errors
```python
from messages import add_errors
```

Add errors in messages to this builder.

---
## disable_type_names
```python
from messages import disable_type_names
```



---
## are_type_names_disabled
```python
from messages import are_type_names_disabled
```



---
## prefer_simple_messages
```python
from messages import prefer_simple_messages
```

Should we generate simple/fast error messages?

If errors aren't shown to the user, we don't want to waste cyles producing
complex error messages.

---
## report
```python
from messages import report
```

Report an error or note (unless disabled).

Note that context controls where error is reported, while origin controls
where # type: ignore comments have effect.

---
## fail
```python
from messages import fail
```

Report an error message (unless disabled).

---
## note
```python
from messages import note
```

Report a note (unless disabled).

---
## note_multiline
```python
from messages import note_multiline
```

Report as many notes as lines in the message (unless disabled).

---
## has_no_attr
```python
from messages import has_no_attr
```

Report a missing or non-accessible member.

original_type is the top-level type on which the error occurred.
typ is the actual type that is missing the member. These can be
different, e.g., in a union, original_type will be the union and typ
will be the specific item in the union that does not have the member
attribute.

'module_symbol_table' is passed to this function if the type for which we
are trying to get a member was originally a module. The SymbolTable allows
us to look up and suggests attributes of the module since they are not
directly available on original_type

If member corresponds to an operator, use the corresponding operator
name in the messages. Return the error code that was produced, if any.

---
## unsupported_operand_types
```python
from messages import unsupported_operand_types
```

Report unsupported operand types for a binary operation.

Types can be Type objects or strings.

---
## unsupported_left_operand
```python
from messages import unsupported_left_operand
```



---
## not_callable
```python
from messages import not_callable
```



---
## untyped_function_call
```python
from messages import untyped_function_call
```



---
## incompatible_argument
```python
from messages import incompatible_argument
```

Report an error about an incompatible argument type.

The argument type is arg_type, argument number is n and the
callee type is 'callee'. If the callee represents a method
that corresponds to an operator, use the corresponding
operator name in the messages.

Return the error code that used for the argument (multiple error
codes are possible).

---
## incompatible_argument_note
```python
from messages import incompatible_argument_note
```



---
## maybe_note_concatenate_pos_args
```python
from messages import maybe_note_concatenate_pos_args
```



---
## invalid_index_type
```python
from messages import invalid_index_type
```



---
## too_few_arguments
```python
from messages import too_few_arguments
```



---
## missing_named_argument
```python
from messages import missing_named_argument
```



---
## too_many_arguments
```python
from messages import too_many_arguments
```



---
## too_many_arguments_from_typed_dict
```python
from messages import too_many_arguments_from_typed_dict
```



---
## too_many_positional_arguments
```python
from messages import too_many_positional_arguments
```



---
## maybe_note_about_special_args
```python
from messages import maybe_note_about_special_args
```



---
## unexpected_keyword_argument_for_function
```python
from messages import unexpected_keyword_argument_for_function
```



---
## unexpected_keyword_argument
```python
from messages import unexpected_keyword_argument
```



---
## duplicate_argument_value
```python
from messages import duplicate_argument_value
```



---
## does_not_return_value
```python
from messages import does_not_return_value
```

Report an error about use of an unusable type.

---
## deleted_as_rvalue
```python
from messages import deleted_as_rvalue
```

Report an error about using an deleted type as an rvalue.

---
## deleted_as_lvalue
```python
from messages import deleted_as_lvalue
```

Report an error about using an deleted type as an lvalue.

Currently, this only occurs when trying to assign to an
exception variable outside the local except: blocks.

---
## no_variant_matches_arguments
```python
from messages import no_variant_matches_arguments
```



---
## wrong_number_values_to_unpack
```python
from messages import wrong_number_values_to_unpack
```



---
## unpacking_strings_disallowed
```python
from messages import unpacking_strings_disallowed
```



---
## type_not_iterable
```python
from messages import type_not_iterable
```



---
## possible_missing_await
```python
from messages import possible_missing_await
```



---
## incompatible_operator_assignment
```python
from messages import incompatible_operator_assignment
```



---
## overload_signature_incompatible_with_supertype
```python
from messages import overload_signature_incompatible_with_supertype
```



---
## signature_incompatible_with_supertype
```python
from messages import signature_incompatible_with_supertype
```



---
## pretty_callable_or_overload
```python
from messages import pretty_callable_or_overload
```



---
## argument_incompatible_with_supertype
```python
from messages import argument_incompatible_with_supertype
```



---
## comparison_method_example_msg
```python
from messages import comparison_method_example_msg
```



---
## return_type_incompatible_with_supertype
```python
from messages import return_type_incompatible_with_supertype
```



---
## override_target
```python
from messages import override_target
```



---
## incompatible_type_application
```python
from messages import incompatible_type_application
```



---
## could_not_infer_type_arguments
```python
from messages import could_not_infer_type_arguments
```



---
## invalid_var_arg
```python
from messages import invalid_var_arg
```



---
## invalid_keyword_var_arg
```python
from messages import invalid_keyword_var_arg
```



---
## undefined_in_superclass
```python
from messages import undefined_in_superclass
```



---
## variable_may_be_undefined
```python
from messages import variable_may_be_undefined
```



---
## var_used_before_def
```python
from messages import var_used_before_def
```



---
## first_argument_for_super_must_be_type
```python
from messages import first_argument_for_super_must_be_type
```



---
## unsafe_super
```python
from messages import unsafe_super
```



---
## too_few_string_formatting_arguments
```python
from messages import too_few_string_formatting_arguments
```



---
## too_many_string_formatting_arguments
```python
from messages import too_many_string_formatting_arguments
```



---
## unsupported_placeholder
```python
from messages import unsupported_placeholder
```



---
## string_interpolation_with_star_and_key
```python
from messages import string_interpolation_with_star_and_key
```



---
## requires_int_or_single_byte
```python
from messages import requires_int_or_single_byte
```



---
## requires_int_or_char
```python
from messages import requires_int_or_char
```



---
## key_not_in_mapping
```python
from messages import key_not_in_mapping
```



---
## string_interpolation_mixing_key_and_non_keys
```python
from messages import string_interpolation_mixing_key_and_non_keys
```



---
## cannot_determine_type
```python
from messages import cannot_determine_type
```



---
## cannot_determine_type_in_base
```python
from messages import cannot_determine_type_in_base
```



---
## no_formal_self
```python
from messages import no_formal_self
```



---
## incompatible_self_argument
```python
from messages import incompatible_self_argument
```



---
## incompatible_conditional_function_def
```python
from messages import incompatible_conditional_function_def
```



---
## cannot_instantiate_abstract_class
```python
from messages import cannot_instantiate_abstract_class
```



---
## base_class_definitions_incompatible
```python
from messages import base_class_definitions_incompatible
```



---
## cant_assign_to_method
```python
from messages import cant_assign_to_method
```



---
## cant_assign_to_classvar
```python
from messages import cant_assign_to_classvar
```



---
## no_overridable_method
```python
from messages import no_overridable_method
```



---
## explicit_override_decorator_missing
```python
from messages import explicit_override_decorator_missing
```



---
## final_cant_override_writable
```python
from messages import final_cant_override_writable
```



---
## cant_override_final
```python
from messages import cant_override_final
```



---
## cant_assign_to_final
```python
from messages import cant_assign_to_final
```

Warn about a prohibited assignment to a final attribute.

Pass `attr_assign=True` if the assignment assigns to an attribute.

---
## protocol_members_cant_be_final
```python
from messages import protocol_members_cant_be_final
```



---
## final_without_value
```python
from messages import final_without_value
```



---
## read_only_property
```python
from messages import read_only_property
```



---
## incompatible_typevar_value
```python
from messages import incompatible_typevar_value
```



---
## dangerous_comparison
```python
from messages import dangerous_comparison
```



---
## overload_inconsistently_applies_decorator
```python
from messages import overload_inconsistently_applies_decorator
```



---
## overloaded_signatures_overlap
```python
from messages import overloaded_signatures_overlap
```



---
## overloaded_signature_will_never_match
```python
from messages import overloaded_signature_will_never_match
```



---
## overloaded_signatures_typevar_specific
```python
from messages import overloaded_signatures_typevar_specific
```



---
## overloaded_signatures_arg_specific
```python
from messages import overloaded_signatures_arg_specific
```



---
## overloaded_signatures_ret_specific
```python
from messages import overloaded_signatures_ret_specific
```



---
## warn_both_operands_are_from_unions
```python
from messages import warn_both_operands_are_from_unions
```



---
## warn_operand_was_from_union
```python
from messages import warn_operand_was_from_union
```



---
## operator_method_signatures_overlap
```python
from messages import operator_method_signatures_overlap
```



---
## forward_operator_not_callable
```python
from messages import forward_operator_not_callable
```



---
## signatures_incompatible
```python
from messages import signatures_incompatible
```



---
## yield_from_invalid_operand_type
```python
from messages import yield_from_invalid_operand_type
```



---
## invalid_signature
```python
from messages import invalid_signature
```



---
## invalid_signature_for_special_method
```python
from messages import invalid_signature_for_special_method
```



---
## reveal_type
```python
from messages import reveal_type
```



---
## reveal_locals
```python
from messages import reveal_locals
```



---
## unsupported_type_type
```python
from messages import unsupported_type_type
```



---
## redundant_cast
```python
from messages import redundant_cast
```



---
## assert_type_fail
```python
from messages import assert_type_fail
```



---
## unimported_type_becomes_any
```python
from messages import unimported_type_becomes_any
```



---
## need_annotation_for_var
```python
from messages import need_annotation_for_var
```



---
## explicit_any
```python
from messages import explicit_any
```



---
## unsupported_target_for_star_typeddict
```python
from messages import unsupported_target_for_star_typeddict
```



---
## non_required_keys_absent_with_star
```python
from messages import non_required_keys_absent_with_star
```



---
## unexpected_typeddict_keys
```python
from messages import unexpected_typeddict_keys
```



---
## typeddict_key_must_be_string_literal
```python
from messages import typeddict_key_must_be_string_literal
```



---
## typeddict_key_not_found
```python
from messages import typeddict_key_not_found
```

Handle error messages for TypedDicts that have unknown keys.

Note, that we differentiate in between reading a value and setting a
value.
Setting a value on a TypedDict is an 'unknown-key' error, whereas
reading it is the more serious/general 'item' error.

---
## typeddict_context_ambiguous
```python
from messages import typeddict_context_ambiguous
```



---
## typeddict_key_cannot_be_deleted
```python
from messages import typeddict_key_cannot_be_deleted
```



---
## typeddict_setdefault_arguments_inconsistent
```python
from messages import typeddict_setdefault_arguments_inconsistent
```



---
## type_arguments_not_allowed
```python
from messages import type_arguments_not_allowed
```



---
## disallowed_any_type
```python
from messages import disallowed_any_type
```



---
## incorrectly_returning_any
```python
from messages import incorrectly_returning_any
```



---
## incorrect__exit__return
```python
from messages import incorrect__exit__return
```



---
## untyped_decorated_function
```python
from messages import untyped_decorated_function
```



---
## typed_function_untyped_decorator
```python
from messages import typed_function_untyped_decorator
```



---
## bad_proto_variance
```python
from messages import bad_proto_variance
```



---
## concrete_only_assign
```python
from messages import concrete_only_assign
```



---
## concrete_only_call
```python
from messages import concrete_only_call
```



---
## cannot_use_function_with_type
```python
from messages import cannot_use_function_with_type
```



---
## report_non_method_protocol
```python
from messages import report_non_method_protocol
```



---
## note_call
```python
from messages import note_call
```



---
## unreachable_statement
```python
from messages import unreachable_statement
```



---
## redundant_left_operand
```python
from messages import redundant_left_operand
```

Indicates that the left operand of a boolean expression is redundant:
it does not change the truth value of the entire condition as a whole.
'op_name' should either be the string "and" or the string "or".

---
## unreachable_right_operand
```python
from messages import unreachable_right_operand
```

Indicates that the right operand of a boolean expression is redundant:
it does not change the truth value of the entire condition as a whole.
'op_name' should either be the string "and" or the string "or".

---
## redundant_condition_in_comprehension
```python
from messages import redundant_condition_in_comprehension
```



---
## redundant_condition_in_if
```python
from messages import redundant_condition_in_if
```



---
## redundant_expr
```python
from messages import redundant_expr
```



---
## impossible_intersection
```python
from messages import impossible_intersection
```



---
## tvar_without_default_type
```python
from messages import tvar_without_default_type
```



---
## report_protocol_problems
```python
from messages import report_protocol_problems
```

Report possible protocol conflicts between 'subtype' and 'supertype'.

This includes missing members, incompatible types, and incompatible
attribute flags, such as settable vs read-only or class variable vs
instance variable.

---
## pretty_overload
```python
from messages import pretty_overload
```



---
## print_more
```python
from messages import print_more
```



---
## try_report_long_tuple_assignment_error
```python
from messages import try_report_long_tuple_assignment_error
```

Try to generate meaningful error message for very long tuple assignment

Returns a bool: True when generating long tuple assignment error,
False when no such error reported

---
## format_long_tuple_type
```python
from messages import format_long_tuple_type
```

Format very long tuple type using an ellipsis notation

---
## generate_incompatible_tuple_error
```python
from messages import generate_incompatible_tuple_error
```

Generate error message for individual incompatible tuple pairs

---
## add_fixture_note
```python
from messages import add_fixture_note
```



---
## annotation_in_unchecked_function
```python
from messages import annotation_in_unchecked_function
```



---
## type_parameters_should_be_declared
```python
from messages import type_parameters_should_be_declared
```



---
## format
```python
from messages import format
```



---
## format_list
```python
from messages import format_list
```



---
## format_union_items
```python
from messages import format_union_items
```



---
## format_union
```python
from messages import format_union
```



---
## format_literal_value
```python
from messages import format_literal_value
```



---
## visit_instance
```python
from messages import visit_instance
```



---
## visit_type_alias_type
```python
from messages import visit_type_alias_type
```



---
## visit_type_var
```python
from messages import visit_type_var
```



---
## visit_type_var_tuple
```python
from messages import visit_type_var_tuple
```



---
## visit_param_spec
```python
from messages import visit_param_spec
```



---
## span_from_context
```python
from messages import span_from_context
```

This determines where a type: ignore for a given context has effect.

Current logic is a bit tricky, to keep as much backwards compatibility as
possible. We may reconsider this to always be a single line (or otherwise
simplify it) when we drop Python 3.7.

TODO: address this in follow up PR

---
## __name__
```python
from semanal_typeargs import __name__
```

Verify properties of type arguments, like 'int' in C[int] being valid.

This must happen after semantic analysis since there can be placeholder
types until the end of semantic analysis, and these break various type
operations, including subtype checks.

---
## TypeArgumentAnalyzer
```python
from semanal_typeargs import TypeArgumentAnalyzer
```



---
## __init__
```python
from semanal_typeargs import __init__
```



---
## visit_mypy_file
```python
from semanal_typeargs import visit_mypy_file
```



---
## visit_func
```python
from semanal_typeargs import visit_func
```



---
## visit_class_def
```python
from semanal_typeargs import visit_class_def
```



---
## visit_block
```python
from semanal_typeargs import visit_block
```



---
## visit_type_alias_type
```python
from semanal_typeargs import visit_type_alias_type
```



---
## visit_tuple_type
```python
from semanal_typeargs import visit_tuple_type
```



---
## visit_callable_type
```python
from semanal_typeargs import visit_callable_type
```



---
## visit_instance
```python
from semanal_typeargs import visit_instance
```



---
## validate_args
```python
from semanal_typeargs import validate_args
```



---
## visit_unpack_type
```python
from semanal_typeargs import visit_unpack_type
```



---
## check_type_var_values
```python
from semanal_typeargs import check_type_var_values
```



---
## fail
```python
from semanal_typeargs import fail
```



---
## note
```python
from semanal_typeargs import note
```



---
## __name__
```python
from stubdoc import __name__
```

Parsing/inferring signatures from documentation.

This module provides several functions to generate better stubs using
docstrings and Sphinx docs (.rst files).

---
## is_valid_type
```python
from stubdoc import is_valid_type
```

Try to determine whether a string might be a valid type annotation.

---
## ArgSig
```python
from stubdoc import ArgSig
```

Signature info for a single argument.

---
## FunctionSig
```python
from stubdoc import FunctionSig
```



---
## DocStringParser
```python
from stubdoc import DocStringParser
```

Parse function signatures in documentation.

---
## infer_sig_from_docstring
```python
from stubdoc import infer_sig_from_docstring
```

Convert function signature to list of FunctionSig

Look for function signatures of function in docstring. Signature is a string of
the format <function_name>(<signature>) -> <return type> or perhaps without
the return type.

Returns empty list, when no signature is found, one signature in typical case,
multiple signatures, if docstring specifies multiple signatures for overload functions.
Return None if the docstring is empty.

Arguments:
    * docstr: docstring
    * name: name of function for which signatures are to be found

---
## infer_arg_sig_from_anon_docstring
```python
from stubdoc import infer_arg_sig_from_anon_docstring
```

Convert signature in form of "(self: TestClass, arg0: str='ada')" to List[TypedArgList].

---
## infer_ret_type_sig_from_docstring
```python
from stubdoc import infer_ret_type_sig_from_docstring
```

Convert signature in form of "func(self: TestClass, arg0) -> int" to their return type.

---
## infer_ret_type_sig_from_anon_docstring
```python
from stubdoc import infer_ret_type_sig_from_anon_docstring
```

Convert signature in form of "(self: TestClass, arg0) -> int" to their return type.

---
## parse_signature
```python
from stubdoc import parse_signature
```

Split function signature into its name, positional an optional arguments.

The expected format is "func_name(arg, opt_arg=False)". Return the name of function
and lists of positional and optional argument names.

---
## build_signature
```python
from stubdoc import build_signature
```

Build function signature from lists of positional and optional argument names.

---
## parse_all_signatures
```python
from stubdoc import parse_all_signatures
```

Parse all signatures in a given reST document.

Return lists of found signatures for functions and classes.

---
## find_unique_signatures
```python
from stubdoc import find_unique_signatures
```

Remove names with duplicate found signatures.

---
## infer_prop_type_from_docstring
```python
from stubdoc import infer_prop_type_from_docstring
```

Check for Google/Numpy style docstring type annotation for a property.

The docstring has the format "<type>: <descriptions>".
In the type string, we allow the following characters:
* dot: because sometimes classes are annotated using full path
* brackets: to allow type hints like List[int]
* comma/space: things like Tuple[int, int]

---
## __init__
```python
from stubdoc import __init__
```



---
## is_star_arg
```python
from stubdoc import is_star_arg
```



---
## is_star_kwarg
```python
from stubdoc import is_star_kwarg
```



---
## __repr__
```python
from stubdoc import __repr__
```



---
## __eq__
```python
from stubdoc import __eq__
```



---
## is_special_method
```python
from stubdoc import is_special_method
```



---
## has_catchall_args
```python
from stubdoc import has_catchall_args
```

Return if this signature has catchall args: (*args, **kwargs)

---
## is_catchall_signature
```python
from stubdoc import is_catchall_signature
```

Return if this signature is the catchall identity: (*args, **kwargs) -> Any

---
## format_sig
```python
from stubdoc import format_sig
```



---
## add_token
```python
from stubdoc import add_token
```

Process next token from the token stream.

---
## reset
```python
from stubdoc import reset
```



---
## get_signatures
```python
from stubdoc import get_signatures
```

Return sorted copy of the list of signatures found so far.

---
## is_unique_args
```python
from stubdoc import is_unique_args
```

return true if function argument names are unique

---
## has_arg
```python
from stubdoc import has_arg
```



---
## args_kwargs
```python
from stubdoc import args_kwargs
```



---
## TypeAnalyzerPluginInterface
```python
from plugin import TypeAnalyzerPluginInterface
```

Interface for accessing semantic analyzer functionality in plugins.

Methods docstrings contain only basic info. Look for corresponding implementation
docstrings in typeanal.py for more details.

---
## AnalyzeTypeContext
```python
from plugin import AnalyzeTypeContext
```



---
## CommonPluginApi
```python
from plugin import CommonPluginApi
```

A common plugin API (shared between semantic analysis and type checking phases)
that all plugin hooks get independently of the context.

---
## CheckerPluginInterface
```python
from plugin import CheckerPluginInterface
```

Interface for accessing type checker functionality in plugins.

Methods docstrings contain only basic info. Look for corresponding implementation
docstrings in checker.py for more details.

---
## SemanticAnalyzerPluginInterface
```python
from plugin import SemanticAnalyzerPluginInterface
```

Interface for accessing semantic analyzer functionality in plugins.

Methods docstrings contain only basic info. Look for corresponding implementation
docstrings in semanal.py for more details.

# TODO: clean-up lookup functions.

---
## ReportConfigContext
```python
from plugin import ReportConfigContext
```



---
## FunctionSigContext
```python
from plugin import FunctionSigContext
```



---
## FunctionContext
```python
from plugin import FunctionContext
```



---
## MethodSigContext
```python
from plugin import MethodSigContext
```



---
## MethodContext
```python
from plugin import MethodContext
```



---
## AttributeContext
```python
from plugin import AttributeContext
```



---
## ClassDefContext
```python
from plugin import ClassDefContext
```



---
## DynamicClassDefContext
```python
from plugin import DynamicClassDefContext
```



---
## Plugin
```python
from plugin import Plugin
```

Base class of all type checker plugins.

This defines a no-op plugin.  Subclasses can override some methods to
provide some actual functionality.

All get_ methods are treated as pure functions (you should assume that
results might be cached). A plugin should return None from a get_ method
to give way to other plugins.

Look at the comments of various *Context objects for additional information on
various hooks.

---
## ChainedPlugin
```python
from plugin import ChainedPlugin
```

A plugin that represents a sequence of chained plugins.

Each lookup method returns the hook for the first plugin that
reports a match.

This class should not be subclassed -- use Plugin as the base class
for all plugins.

---
## fail
```python
from plugin import fail
```

Emit an error message at given location.

---
## named_type
```python
from plugin import named_type
```

Construct an instance of a builtin type with given type arguments.

---
## analyze_type
```python
from plugin import analyze_type
```

Analyze an unbound type using the default mypy logic.

---
## analyze_callable_args
```python
from plugin import analyze_callable_args
```

Find types, kinds, and names of arguments from extended callable syntax.

---
## lookup_fully_qualified
```python
from plugin import lookup_fully_qualified
```



---
## type_context
```python
from plugin import type_context
```

Return the type context of the plugin

---
## named_generic_type
```python
from plugin import named_generic_type
```

Construct an instance of a generic type with given type arguments.

---
## get_expression_type
```python
from plugin import get_expression_type
```

Checks the type of the given expression.

---
## builtin_type
```python
from plugin import builtin_type
```

Legacy function -- use named_type() instead.

---
## named_type_or_none
```python
from plugin import named_type_or_none
```

Construct an instance of a type with given type arguments.

Return None if a type could not be constructed for the qualified
type name. This is possible when the qualified name includes a
module name and the module has not been imported.

---
## basic_new_typeinfo
```python
from plugin import basic_new_typeinfo
```



---
## parse_bool
```python
from plugin import parse_bool
```

Parse True/False literals.

---
## parse_str_literal
```python
from plugin import parse_str_literal
```

Parse string literals.

---
## anal_type
```python
from plugin import anal_type
```

Analyze an unbound type.

Return None if some part of the type is not ready yet. In this
case the current target being analyzed will be deferred and
analyzed again.

---
## class_type
```python
from plugin import class_type
```

Generate type of first argument of class methods from type of self.

---
## lookup_fully_qualified_or_none
```python
from plugin import lookup_fully_qualified_or_none
```

Lookup a symbol by its fully qualified name.

Return None if not found.

---
## lookup_qualified
```python
from plugin import lookup_qualified
```

Lookup symbol using a name in current scope.

This follows Python local->non-local->global->builtins rules.

---
## add_plugin_dependency
```python
from plugin import add_plugin_dependency
```

Specify semantic dependencies for generated methods/variables.

If the symbol with full name given by trigger is found to be stale by mypy,
then the body of node with full name given by target will be re-checked.
By default, this is the node that is currently analyzed.

For example, the dataclass plugin adds a generated __init__ method with
a signature that depends on types of attributes in ancestor classes. If any
attribute in an ancestor class gets stale (modified), we need to reprocess
the subclasses (and thus regenerate __init__ methods).

This is used by fine-grained incremental mode (mypy daemon). See mypy/server/deps.py
for more details.

---
## add_symbol_table_node
```python
from plugin import add_symbol_table_node
```

Add node to global symbol table (or to nearest class if there is one).

---
## qualified_name
```python
from plugin import qualified_name
```

Make qualified name using current module and enclosing class (if any).

---
## defer
```python
from plugin import defer
```

Call this to defer the processing of the current node.

This will request an additional iteration of semantic analysis.

---
## final_iteration
```python
from plugin import final_iteration
```

Is this the final iteration of semantic analysis?

---
## is_stub_file
```python
from plugin import is_stub_file
```



---
## analyze_simple_literal_type
```python
from plugin import analyze_simple_literal_type
```



---
## __init__
```python
from plugin import __init__
```

Initialize chained plugin.

Assume that the child plugins aren't mutated (results may be cached).

---
## set_modules
```python
from plugin import set_modules
```



---
## report_config_data
```python
from plugin import report_config_data
```



---
## get_additional_deps
```python
from plugin import get_additional_deps
```



---
## get_type_analyze_hook
```python
from plugin import get_type_analyze_hook
```



---
## get_function_signature_hook
```python
from plugin import get_function_signature_hook
```



---
## get_function_hook
```python
from plugin import get_function_hook
```



---
## get_method_signature_hook
```python
from plugin import get_method_signature_hook
```



---
## get_method_hook
```python
from plugin import get_method_hook
```



---
## get_attribute_hook
```python
from plugin import get_attribute_hook
```



---
## get_class_attribute_hook
```python
from plugin import get_class_attribute_hook
```



---
## get_class_decorator_hook
```python
from plugin import get_class_decorator_hook
```



---
## get_class_decorator_hook_2
```python
from plugin import get_class_decorator_hook_2
```



---
## get_metaclass_hook
```python
from plugin import get_metaclass_hook
```



---
## get_base_class_hook
```python
from plugin import get_base_class_hook
```



---
## get_customize_class_mro_hook
```python
from plugin import get_customize_class_mro_hook
```



---
## get_dynamic_class_hook
```python
from plugin import get_dynamic_class_hook
```



---
## _find_hook
```python
from plugin import _find_hook
```



---
## __name__
```python
from infer import __name__
```

Utilities for type argument inference.

---
## ArgumentInferContext
```python
from infer import ArgumentInferContext
```

Type argument inference context.

We need this because we pass around ``Mapping`` and ``Iterable`` types.
These types are only known by ``TypeChecker`` itself.
It is required for ``*`` and ``**`` argument inference.

https://github.com/python/mypy/issues/11144

---
## infer_function_type_arguments
```python
from infer import infer_function_type_arguments
```

Infer the type arguments of a generic function.

Return an array of lower bound types for the type variables -1 (at
index 0), -2 (at index 1), etc. A lower bound is None if a value
could not be inferred.

Arguments:
  callee_type: the target generic function
  arg_types: argument types at the call site (each optional; if None,
             we are not considering this argument in the current pass)
  arg_kinds: nodes.ARG_* values for arg_types
  formal_to_actual: mapping from formal to actual variable indices

---
## infer_type_arguments
```python
from infer import infer_type_arguments
```



---
## __name__
```python
from traverser import __name__
```

Generic node traverser visitor

---
## TraverserVisitor
```python
from traverser import TraverserVisitor
```

A parse tree visitor that traverses the parse tree during visiting.

It does not perform any actions outside the traversal. Subclasses
should override visit methods to perform actions during
traversal. Calling the superclass method allows reusing the
traversal implementation.

---
## ExtendedTraverserVisitor
```python
from traverser import ExtendedTraverserVisitor
```

This is a more flexible traverser.

In addition to the base traverser it:
    * has visit_ methods for leaf nodes
    * has common method that is called for all nodes
    * allows to skip recursing into a node

Note that this traverser still doesn't visit some internal
mypy constructs like _promote expression and Var.

---
## ReturnSeeker
```python
from traverser import ReturnSeeker
```



---
## has_return_statement
```python
from traverser import has_return_statement
```

Find if a function has a non-trivial return statement.

Plain 'return' and 'return None' don't count.

---
## FuncCollectorBase
```python
from traverser import FuncCollectorBase
```



---
## YieldSeeker
```python
from traverser import YieldSeeker
```



---
## has_yield_expression
```python
from traverser import has_yield_expression
```



---
## YieldFromSeeker
```python
from traverser import YieldFromSeeker
```



---
## has_yield_from_expression
```python
from traverser import has_yield_from_expression
```



---
## AwaitSeeker
```python
from traverser import AwaitSeeker
```



---
## has_await_expression
```python
from traverser import has_await_expression
```



---
## ReturnCollector
```python
from traverser import ReturnCollector
```



---
## all_return_statements
```python
from traverser import all_return_statements
```



---
## YieldCollector
```python
from traverser import YieldCollector
```



---
## all_yield_expressions
```python
from traverser import all_yield_expressions
```



---
## YieldFromCollector
```python
from traverser import YieldFromCollector
```



---
## all_yield_from_expressions
```python
from traverser import all_yield_from_expressions
```



---
## __init__
```python
from traverser import __init__
```



---
## visit_mypy_file
```python
from traverser import visit_mypy_file
```



---
## visit_block
```python
from traverser import visit_block
```



---
## visit_func
```python
from traverser import visit_func
```



---
## visit_func_def
```python
from traverser import visit_func_def
```



---
## visit_overloaded_func_def
```python
from traverser import visit_overloaded_func_def
```



---
## visit_class_def
```python
from traverser import visit_class_def
```



---
## visit_decorator
```python
from traverser import visit_decorator
```



---
## visit_expression_stmt
```python
from traverser import visit_expression_stmt
```



---
## visit_assignment_stmt
```python
from traverser import visit_assignment_stmt
```



---
## visit_operator_assignment_stmt
```python
from traverser import visit_operator_assignment_stmt
```



---
## visit_while_stmt
```python
from traverser import visit_while_stmt
```



---
## visit_for_stmt
```python
from traverser import visit_for_stmt
```



---
## visit_return_stmt
```python
from traverser import visit_return_stmt
```



---
## visit_assert_stmt
```python
from traverser import visit_assert_stmt
```



---
## visit_del_stmt
```python
from traverser import visit_del_stmt
```



---
## visit_if_stmt
```python
from traverser import visit_if_stmt
```



---
## visit_raise_stmt
```python
from traverser import visit_raise_stmt
```



---
## visit_try_stmt
```python
from traverser import visit_try_stmt
```



---
## visit_with_stmt
```python
from traverser import visit_with_stmt
```



---
## visit_match_stmt
```python
from traverser import visit_match_stmt
```



---
## visit_type_alias_stmt
```python
from traverser import visit_type_alias_stmt
```



---
## visit_member_expr
```python
from traverser import visit_member_expr
```



---
## visit_yield_from_expr
```python
from traverser import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from traverser import visit_yield_expr
```



---
## visit_call_expr
```python
from traverser import visit_call_expr
```



---
## visit_op_expr
```python
from traverser import visit_op_expr
```



---
## visit_comparison_expr
```python
from traverser import visit_comparison_expr
```



---
## visit_slice_expr
```python
from traverser import visit_slice_expr
```



---
## visit_cast_expr
```python
from traverser import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from traverser import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from traverser import visit_reveal_expr
```



---
## visit_assignment_expr
```python
from traverser import visit_assignment_expr
```



---
## visit_unary_expr
```python
from traverser import visit_unary_expr
```



---
## visit_list_expr
```python
from traverser import visit_list_expr
```



---
## visit_tuple_expr
```python
from traverser import visit_tuple_expr
```



---
## visit_dict_expr
```python
from traverser import visit_dict_expr
```



---
## visit_set_expr
```python
from traverser import visit_set_expr
```



---
## visit_index_expr
```python
from traverser import visit_index_expr
```



---
## visit_generator_expr
```python
from traverser import visit_generator_expr
```



---
## visit_dictionary_comprehension
```python
from traverser import visit_dictionary_comprehension
```



---
## visit_list_comprehension
```python
from traverser import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from traverser import visit_set_comprehension
```



---
## visit_conditional_expr
```python
from traverser import visit_conditional_expr
```



---
## visit_type_application
```python
from traverser import visit_type_application
```



---
## visit_lambda_expr
```python
from traverser import visit_lambda_expr
```



---
## visit_star_expr
```python
from traverser import visit_star_expr
```



---
## visit_await_expr
```python
from traverser import visit_await_expr
```



---
## visit_super_expr
```python
from traverser import visit_super_expr
```



---
## visit_as_pattern
```python
from traverser import visit_as_pattern
```



---
## visit_or_pattern
```python
from traverser import visit_or_pattern
```



---
## visit_value_pattern
```python
from traverser import visit_value_pattern
```



---
## visit_sequence_pattern
```python
from traverser import visit_sequence_pattern
```



---
## visit_starred_pattern
```python
from traverser import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from traverser import visit_mapping_pattern
```



---
## visit_class_pattern
```python
from traverser import visit_class_pattern
```



---
## visit_import
```python
from traverser import visit_import
```



---
## visit_import_from
```python
from traverser import visit_import_from
```



---
## visit
```python
from traverser import visit
```



---
## visit_import_all
```python
from traverser import visit_import_all
```



---
## visit_global_decl
```python
from traverser import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from traverser import visit_nonlocal_decl
```



---
## visit_type_alias
```python
from traverser import visit_type_alias
```



---
## visit_break_stmt
```python
from traverser import visit_break_stmt
```



---
## visit_continue_stmt
```python
from traverser import visit_continue_stmt
```



---
## visit_pass_stmt
```python
from traverser import visit_pass_stmt
```



---
## visit_int_expr
```python
from traverser import visit_int_expr
```



---
## visit_str_expr
```python
from traverser import visit_str_expr
```



---
## visit_bytes_expr
```python
from traverser import visit_bytes_expr
```



---
## visit_float_expr
```python
from traverser import visit_float_expr
```



---
## visit_complex_expr
```python
from traverser import visit_complex_expr
```



---
## visit_ellipsis
```python
from traverser import visit_ellipsis
```



---
## visit_name_expr
```python
from traverser import visit_name_expr
```



---
## visit_type_var_expr
```python
from traverser import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from traverser import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from traverser import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from traverser import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from traverser import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from traverser import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from traverser import visit_typeddict_expr
```



---
## visit_newtype_expr
```python
from traverser import visit_newtype_expr
```



---
## visit_singleton_pattern
```python
from traverser import visit_singleton_pattern
```



---
## __name__
```python
from typetraverser import __name__
```



---
## TypeTraverserVisitor
```python
from typetraverser import TypeTraverserVisitor
```

Visitor that traverses all components of a type

---
## visit_any
```python
from typetraverser import visit_any
```



---
## visit_uninhabited_type
```python
from typetraverser import visit_uninhabited_type
```



---
## visit_none_type
```python
from typetraverser import visit_none_type
```



---
## visit_erased_type
```python
from typetraverser import visit_erased_type
```



---
## visit_deleted_type
```python
from typetraverser import visit_deleted_type
```



---
## visit_type_var
```python
from typetraverser import visit_type_var
```



---
## visit_param_spec
```python
from typetraverser import visit_param_spec
```



---
## visit_parameters
```python
from typetraverser import visit_parameters
```



---
## visit_type_var_tuple
```python
from typetraverser import visit_type_var_tuple
```



---
## visit_literal_type
```python
from typetraverser import visit_literal_type
```



---
## visit_instance
```python
from typetraverser import visit_instance
```



---
## visit_callable_type
```python
from typetraverser import visit_callable_type
```



---
## visit_tuple_type
```python
from typetraverser import visit_tuple_type
```



---
## visit_typeddict_type
```python
from typetraverser import visit_typeddict_type
```



---
## visit_union_type
```python
from typetraverser import visit_union_type
```



---
## visit_overloaded
```python
from typetraverser import visit_overloaded
```



---
## visit_type_type
```python
from typetraverser import visit_type_type
```



---
## visit_callable_argument
```python
from typetraverser import visit_callable_argument
```



---
## visit_unbound_type
```python
from typetraverser import visit_unbound_type
```



---
## visit_type_list
```python
from typetraverser import visit_type_list
```



---
## visit_ellipsis_type
```python
from typetraverser import visit_ellipsis_type
```



---
## visit_placeholder_type
```python
from typetraverser import visit_placeholder_type
```



---
## visit_partial_type
```python
from typetraverser import visit_partial_type
```



---
## visit_raw_expression_type
```python
from typetraverser import visit_raw_expression_type
```



---
## visit_type_alias_type
```python
from typetraverser import visit_type_alias_type
```



---
## visit_unpack_type
```python
from typetraverser import visit_unpack_type
```



---
## traverse_types
```python
from typetraverser import traverse_types
```



---
## __name__
```python
from renaming import __name__
```



---
## VariableRenameVisitor
```python
from renaming import VariableRenameVisitor
```

Rename variables to allow redefinition of variables.

For example, consider this code:

  x = 0
  f(x)

  x = "a"
  g(x)

It will be transformed like this:

  x' = 0
  f(x')

  x = "a"
  g(x)

There will be two independent variables (x' and x) that will have separate
inferred types. The publicly exposed variant will get the non-suffixed name.
This is the last definition at module top level and the first definition
(argument) within a function.

Renaming only happens for assignments within the same block. Renaming is
performed before semantic analysis, immediately after parsing.

The implementation performs a rudimentary static analysis. The analysis is
overly conservative to keep things simple.

---
## LimitedVariableRenameVisitor
```python
from renaming import LimitedVariableRenameVisitor
```

Perform some limited variable renaming in with statements.

This allows reusing a variable in multiple with statements with
different types. For example, the two instances of 'x' can have
incompatible types:

   with C() as x:
       f(x)
   with D() as x:
       g(x)

The above code gets renamed conceptually into this (not valid Python!):

   with C() as x':
       f(x')
   with D() as x:
       g(x)

If there's a reference to a variable defined in 'with' outside the
statement, or if there's any trickiness around variable visibility
(e.g. function definitions), we give up and won't perform renaming.

The main use case is to allow binding both readable and writable
binary files into the same variable. These have different types:

    with open(fnam, 'rb') as f: ...
    with open(fnam, 'wb') as f: ...

---
## rename_refs
```python
from renaming import rename_refs
```



---
## __init__
```python
from renaming import __init__
```



---
## visit_mypy_file
```python
from renaming import visit_mypy_file
```

Rename variables within a file.

This is the main entry point to this class.

---
## visit_func_def
```python
from renaming import visit_func_def
```



---
## visit_class_def
```python
from renaming import visit_class_def
```



---
## visit_block
```python
from renaming import visit_block
```



---
## visit_while_stmt
```python
from renaming import visit_while_stmt
```



---
## visit_for_stmt
```python
from renaming import visit_for_stmt
```



---
## visit_break_stmt
```python
from renaming import visit_break_stmt
```



---
## visit_continue_stmt
```python
from renaming import visit_continue_stmt
```



---
## visit_try_stmt
```python
from renaming import visit_try_stmt
```



---
## visit_with_stmt
```python
from renaming import visit_with_stmt
```



---
## visit_import
```python
from renaming import visit_import
```



---
## visit_import_from
```python
from renaming import visit_import_from
```



---
## visit_assignment_stmt
```python
from renaming import visit_assignment_stmt
```



---
## visit_match_stmt
```python
from renaming import visit_match_stmt
```



---
## visit_capture_pattern
```python
from renaming import visit_capture_pattern
```



---
## analyze_lvalue
```python
from renaming import analyze_lvalue
```



---
## visit_name_expr
```python
from renaming import visit_name_expr
```



---
## handle_arg
```python
from renaming import handle_arg
```

Store function argument.

---
## handle_def
```python
from renaming import handle_def
```

Store new name definition.

---
## handle_refine
```python
from renaming import handle_refine
```

Store assignment to an existing name (that replaces previous value, if any).

---
## handle_ref
```python
from renaming import handle_ref
```

Store reference to defined name.

---
## flush_refs
```python
from renaming import flush_refs
```



---
## clear
```python
from renaming import clear
```



---
## enter_block
```python
from renaming import enter_block
```



---
## enter_try
```python
from renaming import enter_try
```



---
## enter_loop
```python
from renaming import enter_loop
```



---
## current_block
```python
from renaming import current_block
```



---
## enter_scope
```python
from renaming import enter_scope
```



---
## is_nested
```python
from renaming import is_nested
```



---
## reject_redefinition_of_vars_in_scope
```python
from renaming import reject_redefinition_of_vars_in_scope
```



---
## reject_redefinition_of_vars_in_loop
```python
from renaming import reject_redefinition_of_vars_in_loop
```

Reject redefinition of variables in the innermost loop.

If there is an early exit from a loop, there may be ambiguity about which
value may escape the loop. Example where this matters:

  while f():
      x = 0
      if g():
          break
      x = ''  # Error -- not a redefinition
  reveal_type(x)  # int

This method ensures that the second assignment to 'x' doesn't introduce a new
variable.

---
## record_assignment
```python
from renaming import record_assignment
```

Record assignment to given name and return True if it defines a new variable.

Args:
    can_be_redefined: If True, allows assignment in the same block to redefine
        this name (if this is a new definition)

---
## visit_import_all
```python
from renaming import visit_import_all
```



---
## record_skipped
```python
from renaming import record_skipped
```



---
## __name__
```python
from applytype import __name__
```



---
## get_target_type
```python
from applytype import get_target_type
```



---
## apply_generic_arguments
```python
from applytype import apply_generic_arguments
```

Apply generic type arguments to a callable type.

For example, applying [int] to 'def [T] (T) -> T' results in
'def (int) -> int'.

Note that each type can be None; in this case, it will not be applied.

If `skip_unsatisfied` is True, then just skip the types that don't satisfy type variable
bound or constraints, instead of giving an error.

---
## apply_poly
```python
from applytype import apply_poly
```

Make free type variables generic in the type if possible.

This will translate the type `tp` while trying to create valid bindings for
type variables `poly_tvars` while traversing the type. This follows the same rules
as we do during semantic analysis phase, examples:
  * Callable[Callable[[T], T], T] -> def [T] (def (T) -> T) -> T
  * Callable[[], Callable[[T], T]] -> def () -> def [T] (T -> T)
  * List[T] -> None (not possible)

---
## PolyTranslationError
```python
from applytype import PolyTranslationError
```



---
## PolyTranslator
```python
from applytype import PolyTranslator
```

Make free type variables generic in the type if possible.

See docstring for apply_poly() for details.

---
## __init__
```python
from applytype import __init__
```



---
## collect_vars
```python
from applytype import collect_vars
```



---
## visit_callable_type
```python
from applytype import visit_callable_type
```



---
## visit_type_var
```python
from applytype import visit_type_var
```



---
## visit_param_spec
```python
from applytype import visit_param_spec
```



---
## visit_type_var_tuple
```python
from applytype import visit_type_var_tuple
```



---
## visit_type_alias_type
```python
from applytype import visit_type_alias_type
```



---
## visit_instance
```python
from applytype import visit_instance
```



---
## __name__
```python
from solve import __name__
```

Type inference constraint solving

---
## solve_constraints
```python
from solve import solve_constraints
```

Solve type constraints.

Return the best type(s) for type variables; each type can be None if the value of
the variable could not be solved.

If a variable has no constraints, if strict=True then arbitrarily
pick UninhabitedType as the value of the type variable. If strict=False, pick AnyType.
If allow_polymorphic=True, then use the full algorithm that can potentially return
free type variables in solutions (these require special care when applying). Otherwise,
use a simplified algorithm that just solves each type variable individually if possible.

The skip_unsatisfied flag matches the same one in applytype.apply_generic_arguments().

---
## solve_with_dependent
```python
from solve import solve_with_dependent
```

Solve set of constraints that may depend on each other, like T <: List[S].

The whole algorithm consists of five steps:
  * Propagate via linear constraints and use secondary constraints to get transitive closure
  * Find dependencies between type variables, group them in SCCs, and sort topologically
  * Check that all SCC are intrinsically linear, we can't solve (express) T <: List[T]
  * Variables in leaf SCCs that don't have constant bounds are free (choose one per SCC)
  * Solve constraints iteratively starting from leafs, updating bounds after each step.

---
## solve_iteratively
```python
from solve import solve_iteratively
```

Solve transitive closure sequentially, updating upper/lower bounds after each step.

Transitive closure is represented as a linear graph plus lower/upper bounds for each
type variable, see transitive_closure() docstring for details.

We solve for type variables that appear in `batch`. If a bound is not constant (i.e. it
looks like T :> F[S, ...]), we substitute solutions found so far in the target F[S, ...]
after solving the batch.

Importantly, after solving each variable in a batch, we move it from linear graph to
upper/lower bounds, this way we can guarantee consistency of solutions (see comment below
for an example when this is important).

---
## solve_one
```python
from solve import solve_one
```

Solve constraints by finding by using meets of upper bounds, and joins of lower bounds.

---
## choose_free
```python
from solve import choose_free
```

Choose the best solution for an SCC containing only type variables.

This is needed to preserve e.g. the upper bound in a situation like this:
    def dec(f: Callable[[T], S]) -> Callable[[T], S]: ...

    @dec
    def test(x: U) -> U: ...

where U <: A.

---
## is_trivial_bound
```python
from solve import is_trivial_bound
```



---
## find_linear
```python
from solve import find_linear
```

Find out if this constraint represent a linear relationship, return target id if yes.

---
## transitive_closure
```python
from solve import transitive_closure
```

Find transitive closure for given constraints on type variables.

Transitive closure gives maximal set of lower/upper bounds for each type variable,
such that we cannot deduce any further bounds by chaining other existing bounds.

The transitive closure is represented by:
  * A set of lower and upper bounds for each type variable, where only constant and
    non-linear terms are included in the bounds.
  * A graph of linear constraints between type variables (represented as a set of pairs)
Such separation simplifies reasoning, and allows an efficient and simple incremental
transitive closure algorithm that we use here.

For example if we have initial constraints [T <: S, S <: U, U <: int], the transitive
closure is given by:
  * {} <: T <: {int}
  * {} <: S <: {int}
  * {} <: U <: {int}
  * {T <: S, S <: U, T <: U}

---
## add_secondary_constraints
```python
from solve import add_secondary_constraints
```

Add secondary constraints inferred between lower and upper (in place).

---
## compute_dependencies
```python
from solve import compute_dependencies
```

Compute dependencies between type variables induced by constraints.

If we have a constraint like T <: List[S], we say that T depends on S, since
we will need to solve for S first before we can solve for T.

---
## check_linear
```python
from solve import check_linear
```

Check there are only linear constraints between type variables in SCC.

Linear are constraints like T <: S (while T <: F[S] are non-linear).

---
## skip_reverse_union_constraints
```python
from solve import skip_reverse_union_constraints
```

Avoid ambiguities for constraints inferred from unions during polymorphic inference.

Polymorphic inference implicitly relies on assumption that a reverse of a linear constraint
is a linear constraint. This is however not true in presence of union types, for example
T :> Union[S, int] vs S <: T. Trying to solve such constraints would be detected ambiguous
as (T, S) form a non-linear SCC. However, simply removing the linear part results in a valid
solution T = Union[S, int], S = <free>. A similar scenario is when we get T <: Union[T, int],
such constraints carry no information, and will equally confuse linearity check.

TODO: a cleaner solution may be to avoid inferring such constraints in first place, but
this would require passing around a flag through all infer_constraints() calls.

---
## get_vars
```python
from solve import get_vars
```

Find type variables for which we are solving in a target type.

---
## pre_validate_solutions
```python
from solve import pre_validate_solutions
```

Check is each solution satisfies the upper bound of the corresponding type variable.

If it doesn't satisfy the bound, check if bound itself satisfies all constraints, and
if yes, use it instead as a fallback solution.

---
## __name__
```python
from constraints import __name__
```

Type inference constraints.

---
## Constraint
```python
from constraints import Constraint
```

A representation of a type constraint.

It can be either T <: type or T :> type (T is a type variable).

---
## infer_constraints_for_callable
```python
from constraints import infer_constraints_for_callable
```

Infer type variable constraints for a callable and actual arguments.

Return a list of constraints.

---
## infer_constraints
```python
from constraints import infer_constraints
```

Infer type constraints.

Match a template type, which may contain type variable references,
recursively against a type which does not contain (the same) type
variable references. The result is a list of type constrains of
form 'T is a supertype/subtype of x', where T is a type variable
present in the template and x is a type without reference to type
variables present in the template.

Assume T and S are type variables. Now the following results can be
calculated (read as '(template, actual) --> result'):

  (T, X)            -->  T :> X
  (X[T], X[Y])      -->  T <: Y and T :> Y
  ((T, T), (X, Y))  -->  T :> X and T :> Y
  ((T, S), (X, Y))  -->  T :> X and S :> Y
  (X[T], Any)       -->  T <: Any and T :> Any

The constraints are represented as Constraint objects. If skip_neg_op == True,
then skip adding reverse (polymorphic) constraints (since this is already a call
to infer such constraints).

---
## _infer_constraints
```python
from constraints import _infer_constraints
```



---
## infer_constraints_if_possible
```python
from constraints import infer_constraints_if_possible
```

Like infer_constraints, but return None if the input relation is
known to be unsatisfiable, for example if template=List[T] and actual=int.
(In this case infer_constraints would return [], just like it would for
an automatically satisfied relation like template=List[T] and actual=object.)

---
## select_trivial
```python
from constraints import select_trivial
```

Select only those lists where each item is a constraint against Any.

---
## merge_with_any
```python
from constraints import merge_with_any
```

Transform a constraint target into a union with given Any type.

---
## handle_recursive_union
```python
from constraints import handle_recursive_union
```



---
## any_constraints
```python
from constraints import any_constraints
```

Deduce what we can from a collection of constraint lists.

It's a given that at least one of the lists must be satisfied. A
None element in the list of options represents an unsatisfiable
constraint and is ignored.  Ignore empty constraint lists if eager
is true -- they are always trivially satisfiable.

---
## filter_satisfiable
```python
from constraints import filter_satisfiable
```

Keep only constraints that can possibly be satisfied.

Currently, we filter out constraints where target is not a subtype of the upper bound.
Since those can be never satisfied. We may add more cases in future if it improves type
inference.

---
## is_same_constraints
```python
from constraints import is_same_constraints
```



---
## is_same_constraint
```python
from constraints import is_same_constraint
```



---
## is_similar_constraints
```python
from constraints import is_similar_constraints
```

Check that two lists of constraints have similar structure.

This means that each list has same type variable plus direction pairs (i.e we
ignore the target). Except for constraints where target is Any type, there
we ignore direction as well.

---
## _is_similar_constraints
```python
from constraints import _is_similar_constraints
```

Check that every constraint in the first list has a similar one in the second.

See docstring above for definition of similarity.

---
## simplify_away_incomplete_types
```python
from constraints import simplify_away_incomplete_types
```



---
## is_complete_type
```python
from constraints import is_complete_type
```

Is a type complete?

A complete doesn't have uninhabited type components or (when not in strict
optional mode) None components.

---
## CompleteTypeVisitor
```python
from constraints import CompleteTypeVisitor
```



---
## ConstraintBuilderVisitor
```python
from constraints import ConstraintBuilderVisitor
```

Visitor class for inferring type constraints.

---
## neg_op
```python
from constraints import neg_op
```

Map SubtypeOf to SupertypeOf and vice versa.

---
## find_matching_overload_item
```python
from constraints import find_matching_overload_item
```

Disambiguate overload item against a template.

---
## find_matching_overload_items
```python
from constraints import find_matching_overload_items
```

Like find_matching_overload_item, but return all matches, not just the first.

---
## get_tuple_fallback_from_unpack
```python
from constraints import get_tuple_fallback_from_unpack
```

Get builtins.tuple type from available types to construct homogeneous tuples.

---
## repack_callable_args
```python
from constraints import repack_callable_args
```

Present callable with star unpack in a normalized form.

Since positional arguments cannot follow star argument, they are packed in a suffix,
while prefix is represented as individual positional args. We want to put all in a single
list with unpack in the middle, and prefix/suffix on the sides (as they would appear
in e.g. a TupleType).

---
## build_constraints_for_simple_unpack
```python
from constraints import build_constraints_for_simple_unpack
```

Infer constraints between two lists of types with variadic items.

This function is only supposed to be called when a variadic item is present in templates.
If there is no variadic item the actuals, we simply use split_with_prefix_and_suffix()
and infer prefix <: prefix, suffix <: suffix, variadic <: middle. If there is a variadic
item in the actuals we need to be more careful, only common prefix/suffix can generate
constraints, also we can only infer constraints for variadic template item, if template
prefix/suffix are shorter that actual ones, otherwise there may be partial overlap
between variadic items, for example if template prefix is longer:

    templates: T1, T2, Ts, Ts, Ts, ...
    actuals:   A1, As, As, As, ...

Note: this function can only be called for builtin variadic constructors: Tuple and Callable.
For instances, you should first find correct type argument mapping.

---
## infer_directed_arg_constraints
```python
from constraints import infer_directed_arg_constraints
```

Infer constraints between two arguments using direction between original callables.

---
## infer_callable_arguments_constraints
```python
from constraints import infer_callable_arguments_constraints
```

Infer constraints between argument types of two callables.

This function essentially extracts four steps from are_parameters_compatible() in
subtypes.py that involve subtype checks between argument types. We keep the argument
matching logic, but ignore various strictness flags present there, and checks that
do not involve subtyping. Then in place of every subtype check we put an infer_constraints()
call for the same types.

---
## filter_imprecise_kinds
```python
from constraints import filter_imprecise_kinds
```

For each ParamSpec remove all imprecise constraints, if at least one precise available.

---
## __init__
```python
from constraints import __init__
```



---
## __repr__
```python
from constraints import __repr__
```



---
## __hash__
```python
from constraints import __hash__
```



---
## __eq__
```python
from constraints import __eq__
```



---
## visit_uninhabited_type
```python
from constraints import visit_uninhabited_type
```



---
## visit_unbound_type
```python
from constraints import visit_unbound_type
```



---
## visit_any
```python
from constraints import visit_any
```



---
## visit_none_type
```python
from constraints import visit_none_type
```



---
## visit_erased_type
```python
from constraints import visit_erased_type
```



---
## visit_deleted_type
```python
from constraints import visit_deleted_type
```



---
## visit_literal_type
```python
from constraints import visit_literal_type
```



---
## visit_partial_type
```python
from constraints import visit_partial_type
```



---
## visit_type_var
```python
from constraints import visit_type_var
```



---
## visit_param_spec
```python
from constraints import visit_param_spec
```



---
## visit_type_var_tuple
```python
from constraints import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from constraints import visit_unpack_type
```



---
## visit_parameters
```python
from constraints import visit_parameters
```



---
## visit_instance
```python
from constraints import visit_instance
```



---
## infer_constraints_from_protocol_members
```python
from constraints import infer_constraints_from_protocol_members
```

Infer constraints for situations where either 'template' or 'instance' is a protocol.

The 'protocol' is the one of two that is an instance of protocol type, 'subtype'
is the type used to bind self during inference. Currently, we just infer constrains for
every protocol member type (both ways for settable members).

---
## visit_callable_type
```python
from constraints import visit_callable_type
```



---
## infer_against_overloaded
```python
from constraints import infer_against_overloaded
```



---
## visit_tuple_type
```python
from constraints import visit_tuple_type
```



---
## visit_typeddict_type
```python
from constraints import visit_typeddict_type
```



---
## visit_union_type
```python
from constraints import visit_union_type
```



---
## visit_type_alias_type
```python
from constraints import visit_type_alias_type
```



---
## infer_against_any
```python
from constraints import infer_against_any
```



---
## visit_overloaded
```python
from constraints import visit_overloaded
```



---
## visit_type_type
```python
from constraints import visit_type_type
```



---
## __name__
```python
from binder import __name__
```



---
## Frame
```python
from binder import Frame
```

A Frame represents a specific point in the execution of a program.
It carries information about the current types of expressions at
that point, arising either from assignments to those expressions
or the result of isinstance checks. It also records whether it is
possible to reach that point at all.

This information is not copied into a new Frame when it is pushed
onto the stack, so a given Frame only has information about types
that were assigned in that frame.

---
## ConditionalTypeBinder
```python
from binder import ConditionalTypeBinder
```

Keep track of conditional types of variables.

NB: Variables are tracked by literal expression, so it is possible
to confuse the binder; for example,

```
class A:
    a: Union[int, str] = None
x = A()
lst = [x]
reveal_type(x.a)      # Union[int, str]
x.a = 1
reveal_type(x.a)      # int
reveal_type(lst[0].a) # Union[int, str]
lst[0].a = 'a'
reveal_type(x.a)      # int
reveal_type(lst[0].a) # str
```

---
## get_declaration
```python
from binder import get_declaration
```



---
## collapse_variadic_union
```python
from binder import collapse_variadic_union
```

Simplify a union involving variadic tuple if possible.

This will collapse a type like e.g.
    tuple[X, Z] | tuple[X, Y, Z] | tuple[X, Y, Y, *tuple[Y, ...], Z]
back to
    tuple[X, *tuple[Y, ...], Z]
which is equivalent, but much simpler form of the same type.

---
## __init__
```python
from binder import __init__
```



---
## __repr__
```python
from binder import __repr__
```



---
## _get_id
```python
from binder import _get_id
```



---
## _add_dependencies
```python
from binder import _add_dependencies
```



---
## push_frame
```python
from binder import push_frame
```

Push a new frame into the binder.

---
## _put
```python
from binder import _put
```



---
## _get
```python
from binder import _get
```



---
## put
```python
from binder import put
```



---
## unreachable
```python
from binder import unreachable
```



---
## suppress_unreachable_warnings
```python
from binder import suppress_unreachable_warnings
```



---
## get
```python
from binder import get
```



---
## is_unreachable
```python
from binder import is_unreachable
```



---
## is_unreachable_warning_suppressed
```python
from binder import is_unreachable_warning_suppressed
```



---
## cleanse
```python
from binder import cleanse
```

Remove all references to a Node from the binder.

---
## _cleanse_key
```python
from binder import _cleanse_key
```

Remove all references to a key from the binder.

---
## update_from_options
```python
from binder import update_from_options
```

Update the frame to reflect that each key will be updated
as in one of the frames.  Return whether any item changes.

If a key is declared as AnyType, only update it if all the
options are the same.

---
## pop_frame
```python
from binder import pop_frame
```

Pop a frame and return it.

See frame_context() for documentation of fall_through.

---
## accumulate_type_assignments
```python
from binder import accumulate_type_assignments
```

Push a new map to collect assigned types in multiassign from union.

If this map is not None, actual binding is deferred until all items in
the union are processed (a union of collected items is later bound
manually by the caller).

---
## assign_type
```python
from binder import assign_type
```



---
## invalidate_dependencies
```python
from binder import invalidate_dependencies
```

Invalidate knowledge of types that include expr, but not expr itself.

For example, when expr is foo.bar, invalidate foo.bar.baz.

It is overly conservative: it invalidates globally, including
in code paths unreachable from here.

---
## most_recent_enclosing_type
```python
from binder import most_recent_enclosing_type
```



---
## allow_jump
```python
from binder import allow_jump
```



---
## handle_break
```python
from binder import handle_break
```



---
## handle_continue
```python
from binder import handle_continue
```



---
## frame_context
```python
from binder import frame_context
```

Return a context manager that pushes/pops frames on enter/exit.

If can_skip is True, control flow is allowed to bypass the
newly-created frame.

If fall_through > 0, then it will allow control flow that
falls off the end of the frame to escape to its ancestor
`fall_through` levels higher. Otherwise control flow ends
at the end of the frame.

If break_frame > 0, then 'break' statements within this frame
will jump out to the frame break_frame levels higher than the
frame created by this call to frame_context. Similarly for
continue_frame and 'continue' statements.

If try_frame is true, then execution is allowed to jump at any
point within the newly created frame (or its descendants) to
its parent (i.e., to the frame that was on top before this
call to frame_context).

After the context manager exits, self.last_pop_changed indicates
whether any types changed in the newly-topmost frame as a result
of popping this frame.

---
## top_frame_context
```python
from binder import top_frame_context
```

A variant of frame_context for use at the top level of
a namespace (module, function, or class).

---
## ErrorInfo
```python
from errors import ErrorInfo
```

Representation of a single error message.

---
## ErrorWatcher
```python
from errors import ErrorWatcher
```

Context manager that can be used to keep track of new errors recorded
around a given operation.

Errors maintain a stack of such watchers. The handler is called starting
at the top of the stack, and is propagated down the stack unless filtered
out by one of the ErrorWatcher instances.

---
## CompileError
```python
from errors import CompileError
```

Exception raised when there is a compile error.

It can be a parse, semantic analysis, type check or other
compilation-related error.

CompileErrors raised from an errors object carry all of the
messages that have not been reported out by error streaming.
This is patched up by build.build to contain either all error
messages (if errors were streamed) or none (if they were not).

---
## remove_path_prefix
```python
from errors import remove_path_prefix
```

If path starts with prefix, return copy of path with the prefix removed.
Otherwise, return path. If path is None, return None.

---
## report_internal_error
```python
from errors import report_internal_error
```

Report internal error and exit.

This optionally starts pdb or shows a traceback.

---
## MypyError
```python
from errors import MypyError
```



---
## create_errors
```python
from errors import create_errors
```



---
## on_error
```python
from errors import on_error
```

Handler called when a new error is recorded.

The default implementation just sets the has_new_errors flag

Return True to filter out the error, preventing it from being seen by other
ErrorWatcher further down the stack and from being recorded by Errors

---
## has_new_errors
```python
from errors import has_new_errors
```



---
## filtered_errors
```python
from errors import filtered_errors
```



---
## initialize
```python
from errors import initialize
```



---
## reset
```python
from errors import reset
```



---
## set_ignore_prefix
```python
from errors import set_ignore_prefix
```

Set path prefix that will be removed from all paths.

---
## simplify_path
```python
from errors import simplify_path
```



---
## set_file
```python
from errors import set_file
```

Set the path and module id of the current file.

---
## set_file_ignored_lines
```python
from errors import set_file_ignored_lines
```



---
## set_skipped_lines
```python
from errors import set_skipped_lines
```



---
## current_target
```python
from errors import current_target
```

Retrieves the current target from the associated scope.

If there is no associated scope, use the target module.

---
## current_module
```python
from errors import current_module
```



---
## import_context
```python
from errors import import_context
```

Return a copy of the import context.

---
## set_import_context
```python
from errors import set_import_context
```

Replace the entire import context with a new value.

---
## report
```python
from errors import report
```

Report message at the given line using the current error context.

Args:
    line: line number of error
    column: column number of error
    message: message to report
    code: error code (defaults to 'misc'; not shown for notes)
    blocker: if True, don't continue analysis after this error
    severity: 'error' or 'note'
    file: if non-None, override current file as context
    only_once: if True, only report this exact message once per build
    allow_dups: if True, allow duplicate copies of this message (ignored if only_once)
    origin_span: if non-None, override current context as origin
                 (type: ignores have effect here)
    end_line: if non-None, override current context as end

---
## _add_error_info
```python
from errors import _add_error_info
```



---
## _filter_error
```python
from errors import _filter_error
```

process ErrorWatcher stack from top to bottom,
stopping early if error needs to be filtered out

---
## add_error_info
```python
from errors import add_error_info
```



---
## has_many_errors
```python
from errors import has_many_errors
```



---
## report_hidden_errors
```python
from errors import report_hidden_errors
```



---
## is_ignored_error
```python
from errors import is_ignored_error
```



---
## is_error_code_enabled
```python
from errors import is_error_code_enabled
```



---
## clear_errors_in_targets
```python
from errors import clear_errors_in_targets
```

Remove errors in specific fine-grained targets within a file.

---
## generate_unused_ignore_errors
```python
from errors import generate_unused_ignore_errors
```



---
## generate_ignore_without_code_errors
```python
from errors import generate_ignore_without_code_errors
```



---
## num_messages
```python
from errors import num_messages
```

Return the number of generated messages.

---
## is_errors
```python
from errors import is_errors
```

Are there any generated messages?

---
## is_blockers
```python
from errors import is_blockers
```

Are the any errors that are blockers?

---
## blocker_module
```python
from errors import blocker_module
```

Return the module with a blocking error, or None if not possible.

---
## is_errors_for_file
```python
from errors import is_errors_for_file
```

Are there any errors for the given file?

---
## prefer_simple_messages
```python
from errors import prefer_simple_messages
```

Should we generate simple/fast error messages?

Return True if errors are not shown to user, i.e. errors are ignored
or they are collected for internal use only.

If True, we should prefer to generate a simple message quickly.
All normal errors should still be reported.

---
## raise_error
```python
from errors import raise_error
```

Raise a CompileError with the generated messages.

Render the messages suitable for displaying.

---
## format_messages
```python
from errors import format_messages
```

Return a string list that represents the error messages.

Use a form suitable for displaying to the user. If self.pretty
is True also append a relevant trimmed source code line (only for
severity 'error').

---
## file_messages
```python
from errors import file_messages
```

Return a string list of new error messages from a given file.

Use a form suitable for displaying to the user.

---
## targets
```python
from errors import targets
```

Return a set of all targets that contain errors.

---
## render_messages
```python
from errors import render_messages
```

Translate the messages into a sequence of tuples.

Each tuple is of form (path, line, col, severity, message, allow_dups, code).
The rendered sequence includes information about error contexts.
The path item may be None. If the line item is negative, the
line number is not defined for the tuple.

---
## sort_messages
```python
from errors import sort_messages
```

Sort an array of error messages locally by line number.

I.e., sort a run of consecutive messages with the same
context by line number, but otherwise retain the general
ordering of the messages.

---
## sort_within_context
```python
from errors import sort_within_context
```

For the same location decide which messages to show first/last.

Currently, we only compare within the same error code, to decide the
order of various additional notes.

---
## remove_duplicates
```python
from errors import remove_duplicates
```

Remove duplicates from a sorted error list.

---
## __name__
```python
from stubutil import __name__
```

Utilities for mypy.stubgen, mypy.stubgenc, and mypy.stubdoc modules.

---
## CantImport
```python
from stubutil import CantImport
```



---
## walk_packages
```python
from stubutil import walk_packages
```

Iterates through all packages and sub-packages in the given list.

This uses runtime imports (in another process) to find both Python and C modules.
For Python packages we simply pass the __path__ attribute to pkgutil.walk_packages() to
get the content of the package (all subpackages and modules).  However, packages in C
extensions do not have this attribute, so we have to roll out our own logic: recursively
find all modules imported in the package that have matching names.

---
## find_module_path_using_sys_path
```python
from stubutil import find_module_path_using_sys_path
```



---
## find_module_path_and_all_py3
```python
from stubutil import find_module_path_and_all_py3
```

Find module and determine __all__ for a Python 3 module.

Return None if the module is a C or pyc-only module.
Return (module_path, __all__) if it is a Python module.
Raise CantImport if import failed.

---
## generate_guarded
```python
from stubutil import generate_guarded
```

Ignore or report errors during stub generation.

Optionally report success.

---
## report_missing
```python
from stubutil import report_missing
```



---
## fail_missing
```python
from stubutil import fail_missing
```



---
## remove_misplaced_type_comments
```python
from stubutil import remove_misplaced_type_comments
```

Remove comments from source that could be understood as misplaced type comments.

Normal comments may look like misplaced type comments, and since they cause blocking
parse errors, we want to avoid them.

---
## common_dir_prefix
```python
from stubutil import common_dir_prefix
```



---
## AnnotationPrinter
```python
from stubutil import AnnotationPrinter
```

Visitor used to print existing annotations in a file.

The main difference from TypeStrVisitor is a better treatment of
unbound types.

Notes:
* This visitor doesn't add imports necessary for annotations, this is done separately
  by ImportTracker.
* It can print all kinds of types, but the generated strings may not be valid (notably
  callable types) since it prints the same string that reveal_type() does.
* For Instance types it prints the fully qualified names.

---
## ClassInfo
```python
from stubutil import ClassInfo
```



---
## FunctionContext
```python
from stubutil import FunctionContext
```



---
## infer_method_ret_type
```python
from stubutil import infer_method_ret_type
```

Infer return types for known special methods

---
## infer_method_arg_types
```python
from stubutil import infer_method_arg_types
```

Infer argument types for known special methods

---
## SignatureGenerator
```python
from stubutil import SignatureGenerator
```

Abstract base class for extracting a list of FunctionSigs for each function.

---
## ImportTracker
```python
from stubutil import ImportTracker
```

Record necessary imports during stub generation.

---
## BaseStubGenerator
```python
from stubutil import BaseStubGenerator
```



---
## __init__
```python
from stubutil import __init__
```



---
## visit_any
```python
from stubutil import visit_any
```



---
## visit_unbound_type
```python
from stubutil import visit_unbound_type
```



---
## visit_none_type
```python
from stubutil import visit_none_type
```



---
## visit_type_list
```python
from stubutil import visit_type_list
```



---
## visit_union_type
```python
from stubutil import visit_union_type
```



---
## args_str
```python
from stubutil import args_str
```

Convert an array of arguments to strings and join the results with commas.

The main difference from list_str is the preservation of quotes for string
arguments

---
## fullname
```python
from stubutil import fullname
```



---
## remove_self_type
```python
from stubutil import remove_self_type
```

Remove type annotation from self/cls argument

---
## get_function_sig
```python
from stubutil import get_function_sig
```

Return a list of signatures for the given function.

If no signature can be found, return None. If all of the registered SignatureGenerators
for the stub generator return None, then the default_sig will be used.

---
## get_property_type
```python
from stubutil import get_property_type
```



---
## add_import_from
```python
from stubutil import add_import_from
```



---
## add_import
```python
from stubutil import add_import
```



---
## require_name
```python
from stubutil import require_name
```



---
## reexport
```python
from stubutil import reexport
```

Mark a given non qualified name as needed in __all__.

This means that in case it comes from a module, it should be
imported with an alias even if the alias is the same as the name.

---
## import_lines
```python
from stubutil import import_lines
```

The list of required import lines (as strings with python code).

In order for a module be included in this output, an identifier must be both
'required' via require_name() and 'imported' via add_import_from()
or add_import()

---
## get_sig_generators
```python
from stubutil import get_sig_generators
```



---
## resolve_name
```python
from stubutil import resolve_name
```

Return the full name resolving imports and import aliases.

---
## add_name
```python
from stubutil import add_name
```

Add a name to be imported and return the name reference.

The import will be internal to the stub (i.e don't reexport).

---
## add_import_line
```python
from stubutil import add_import_line
```

Add a line of text to the import section, unless it's already there.

---
## get_imports
```python
from stubutil import get_imports
```

Return the import statements for the stub.

---
## output
```python
from stubutil import output
```

Return the text for the stub.

---
## get_dunder_all
```python
from stubutil import get_dunder_all
```

Return the __all__ list for the stub.

---
## add
```python
from stubutil import add
```

Add text to generated stub.

---
## is_top_level
```python
from stubutil import is_top_level
```

Are we processing the top level of a file?

---
## indent
```python
from stubutil import indent
```

Add one level of indentation.

---
## dedent
```python
from stubutil import dedent
```

Remove one level of indentation.

---
## record_name
```python
from stubutil import record_name
```

Mark a name as defined.

This only does anything if at the top level of a module.

---
## is_recorded_name
```python
from stubutil import is_recorded_name
```

Has this name been recorded previously?

---
## set_defined_names
```python
from stubutil import set_defined_names
```



---
## check_undefined_names
```python
from stubutil import check_undefined_names
```



---
## get_signatures
```python
from stubutil import get_signatures
```



---
## format_func_def
```python
from stubutil import format_func_def
```



---
## print_annotation
```python
from stubutil import print_annotation
```



---
## is_not_in_all
```python
from stubutil import is_not_in_all
```



---
## is_private_name
```python
from stubutil import is_private_name
```



---
## should_reexport
```python
from stubutil import should_reexport
```



---
## __name__
```python
from metastore import __name__
```

Interfaces for accessing metadata.

We provide two implementations.
 * The "classic" file system implementation, which uses a directory
   structure of files.
 * A hokey sqlite backed implementation, which basically simulates
   the file system in an effort to work around poor file system performance
   on OS X.

---
## MetadataStore
```python
from metastore import MetadataStore
```

Generic interface for metadata storage.

---
## random_string
```python
from metastore import random_string
```



---
## FilesystemMetadataStore
```python
from metastore import FilesystemMetadataStore
```



---
## connect_db
```python
from metastore import connect_db
```



---
## SqliteMetadataStore
```python
from metastore import SqliteMetadataStore
```



---
## getmtime
```python
from metastore import getmtime
```



---
## read
```python
from metastore import read
```



---
## write
```python
from metastore import write
```



---
## remove
```python
from metastore import remove
```



---
## commit
```python
from metastore import commit
```



---
## list_all
```python
from metastore import list_all
```



---
## __init__
```python
from metastore import __init__
```



---
## _query
```python
from metastore import _query
```



---
## __name__
```python
from parse import __name__
```



---
## parse
```python
from parse import parse
```

Parse a source file, without doing any semantic analysis.

Return the parse tree. If errors is not provided, raise ParseError
on failure. Otherwise, use the errors object to report parse errors.

The python_version (major, minor) option determines the Python syntax variant.

---
## __name__
```python
from freetree import __name__
```

Generic node traverser visitor

---
## TreeFreer
```python
from freetree import TreeFreer
```



---
## free_tree
```python
from freetree import free_tree
```

Free all the ASTs associated with a module.

This needs to be done recursively, since symbol tables contain
references to definitions, so those won't be freed but we want their
contents to be.

---
## visit_block
```python
from freetree import visit_block
```



---
## Context
```python
from nodes import Context
```

Base type for objects that are valid as error message locations.

---
## get_nongen_builtins
```python
from nodes import get_nongen_builtins
```



---
## Statement
```python
from nodes import Statement
```

A statement node.

---
## Expression
```python
from nodes import Expression
```

An expression node.

---
## FakeExpression
```python
from nodes import FakeExpression
```

A dummy expression.

We need a dummy expression in one place, and can't instantiate Expression
because it is a trait and mypyc barfs.

---
## SymbolNode
```python
from nodes import SymbolNode
```

Nodes that can be stored in a symbol table.

---
## MypyFile
```python
from nodes import MypyFile
```

The abstract syntax tree of a single source file.

---
## ImportBase
```python
from nodes import ImportBase
```

Base class for all import statements.

---
## ImportFrom
```python
from nodes import ImportFrom
```

from m import x [as y], ...

---
## ImportAll
```python
from nodes import ImportAll
```

from m import *

---
## FuncBase
```python
from nodes import FuncBase
```

Abstract base class for function-like nodes.

N.B: Although this has SymbolNode subclasses (FuncDef,
OverloadedFuncDef), avoid calling isinstance(..., FuncBase) on
something that is typed as SymbolNode.  This is to work around
mypy bug #3603, in which mypy doesn't understand multiple
inheritance very well, and will assume that a SymbolNode
cannot be a FuncBase.

Instead, test against SYMBOL_FUNCBASE_TYPES, which enumerates
SymbolNode subclasses that are also FuncBase subclasses.

---
## OverloadedFuncDef
```python
from nodes import OverloadedFuncDef
```

A logical node representing all the variants of a multi-declaration function.

A multi-declaration function is often an @overload, but can also be a
@property with a setter and a/or a deleter.

This node has no explicit representation in the source program.
Overloaded variants must be consecutive in the source file.

---
## Argument
```python
from nodes import Argument
```

A single argument in a FuncItem.

---
## TypeParam
```python
from nodes import TypeParam
```



---
## FuncItem
```python
from nodes import FuncItem
```

Base class for nodes usable as overloaded function items.

---
## FuncDef
```python
from nodes import FuncDef
```

Function definition.

This is a non-lambda function defined using 'def'.

---
## Decorator
```python
from nodes import Decorator
```

A decorated function.

A single Decorator object can include any number of function decorators.

---
## Var
```python
from nodes import Var
```

A variable.

It can refer to global/local variable or a data attribute.

---
## ClassDef
```python
from nodes import ClassDef
```

Class definition

---
## GlobalDecl
```python
from nodes import GlobalDecl
```

Declaration global x, y, ...

---
## NonlocalDecl
```python
from nodes import NonlocalDecl
```

Declaration nonlocal x, y, ...

---
## ExpressionStmt
```python
from nodes import ExpressionStmt
```

An expression as a statement, such as print(s).

---
## AssignmentStmt
```python
from nodes import AssignmentStmt
```

Assignment statement.

The same node class is used for single assignment, multiple assignment
(e.g. x, y = z) and chained assignment (e.g. x = y = z), assignments
that define new names, and assignments with explicit types ("# type: t"
or "x: t [= ...]").

An lvalue can be NameExpr, TupleExpr, ListExpr, MemberExpr, or IndexExpr.

---
## OperatorAssignmentStmt
```python
from nodes import OperatorAssignmentStmt
```

Operator assignment statement such as x += 1

---
## WhileStmt
```python
from nodes import WhileStmt
```



---
## ForStmt
```python
from nodes import ForStmt
```



---
## ReturnStmt
```python
from nodes import ReturnStmt
```



---
## AssertStmt
```python
from nodes import AssertStmt
```



---
## DelStmt
```python
from nodes import DelStmt
```



---
## BreakStmt
```python
from nodes import BreakStmt
```



---
## ContinueStmt
```python
from nodes import ContinueStmt
```



---
## PassStmt
```python
from nodes import PassStmt
```



---
## IfStmt
```python
from nodes import IfStmt
```



---
## RaiseStmt
```python
from nodes import RaiseStmt
```



---
## TryStmt
```python
from nodes import TryStmt
```



---
## WithStmt
```python
from nodes import WithStmt
```



---
## MatchStmt
```python
from nodes import MatchStmt
```



---
## TypeAliasStmt
```python
from nodes import TypeAliasStmt
```



---
## IntExpr
```python
from nodes import IntExpr
```

Integer literal

---
## StrExpr
```python
from nodes import StrExpr
```

String literal

---
## is_StrExpr_list
```python
from nodes import is_StrExpr_list
```



---
## BytesExpr
```python
from nodes import BytesExpr
```

Bytes literal

---
## FloatExpr
```python
from nodes import FloatExpr
```

Float literal

---
## ComplexExpr
```python
from nodes import ComplexExpr
```

Complex literal

---
## EllipsisExpr
```python
from nodes import EllipsisExpr
```

Ellipsis (...)

---
## StarExpr
```python
from nodes import StarExpr
```

Star expression

---
## RefExpr
```python
from nodes import RefExpr
```

Abstract base class for name-like constructs

---
## NameExpr
```python
from nodes import NameExpr
```

Name expression

This refers to a local name, global name or a module.

---
## MemberExpr
```python
from nodes import MemberExpr
```

Member access expression x.y

---
## ArgKind
```python
from nodes import ArgKind
```



---
## CallExpr
```python
from nodes import CallExpr
```

Call expression.

This can also represent several special forms that are syntactically calls
such as cast(...) and None  # type: ....

---
## YieldFromExpr
```python
from nodes import YieldFromExpr
```



---
## YieldExpr
```python
from nodes import YieldExpr
```



---
## IndexExpr
```python
from nodes import IndexExpr
```

Index expression x[y].

Also wraps type application such as List[int] as a special form.

---
## AssignmentExpr
```python
from nodes import AssignmentExpr
```

Assignment expressions in Python 3.8+, like "a := 2".

---
## OpExpr
```python
from nodes import OpExpr
```

Binary operation.

The dot (.), [] and comparison operators have more specific nodes.

---
## ComparisonExpr
```python
from nodes import ComparisonExpr
```

Comparison expression (e.g. a < b > c < d).

---
## SliceExpr
```python
from nodes import SliceExpr
```

Slice expression (e.g. 'x:y', 'x:', '::2' or ':').

This is only valid as index in index expressions.

---
## CastExpr
```python
from nodes import CastExpr
```

Cast expression cast(type, expr).

---
## AssertTypeExpr
```python
from nodes import AssertTypeExpr
```

Represents a typing.assert_type(expr, type) call.

---
## RevealExpr
```python
from nodes import RevealExpr
```

Reveal type expression reveal_type(expr) or reveal_locals() expression.

---
## SuperExpr
```python
from nodes import SuperExpr
```

Expression super().name

---
## LambdaExpr
```python
from nodes import LambdaExpr
```

Lambda expression

---
## ListExpr
```python
from nodes import ListExpr
```

List literal expression [...].

---
## DictExpr
```python
from nodes import DictExpr
```

Dictionary literal expression {key: value, ...}.

---
## TupleExpr
```python
from nodes import TupleExpr
```

Tuple literal expression (..., ...)

Also lvalue sequences (..., ...) and [..., ...]

---
## SetExpr
```python
from nodes import SetExpr
```

Set literal expression {value, ...}.

---
## GeneratorExpr
```python
from nodes import GeneratorExpr
```

Generator expression ... for ... in ... [ for ...  in ... ] [ if ... ].

---
## ListComprehension
```python
from nodes import ListComprehension
```

List comprehension (e.g. [x + 1 for x in a])

---
## SetComprehension
```python
from nodes import SetComprehension
```

Set comprehension (e.g. {x + 1 for x in a})

---
## DictionaryComprehension
```python
from nodes import DictionaryComprehension
```

Dictionary comprehension (e.g. {k: v for k, v in a}

---
## ConditionalExpr
```python
from nodes import ConditionalExpr
```

Conditional expression (e.g. x if y else z)

---
## TypeApplication
```python
from nodes import TypeApplication
```

Type application expr[type, ...]

---
## TypeVarLikeExpr
```python
from nodes import TypeVarLikeExpr
```

Base class for TypeVarExpr, ParamSpecExpr and TypeVarTupleExpr.

Note that they are constructed by the semantic analyzer.

---
## TypeVarExpr
```python
from nodes import TypeVarExpr
```

Type variable expression TypeVar(...).

This is also used to represent type variables in symbol tables.

A type variable is not valid as a type unless bound in a TypeVarLikeScope.
That happens within:

 1. a generic class that uses the type variable as a type argument or
 2. a generic function that refers to the type variable in its signature.

---
## ParamSpecExpr
```python
from nodes import ParamSpecExpr
```



---
## TypeVarTupleExpr
```python
from nodes import TypeVarTupleExpr
```

Type variable tuple expression TypeVarTuple(...).

---
## TypeAliasExpr
```python
from nodes import TypeAliasExpr
```

Type alias expression (rvalue).

---
## NamedTupleExpr
```python
from nodes import NamedTupleExpr
```

Named tuple expression namedtuple(...) or NamedTuple(...).

---
## TypedDictExpr
```python
from nodes import TypedDictExpr
```

Typed dict expression TypedDict(...).

---
## EnumCallExpr
```python
from nodes import EnumCallExpr
```

Named tuple expression Enum('name', 'val1 val2 ...').

---
## PromoteExpr
```python
from nodes import PromoteExpr
```

Ducktype class decorator expression _promote(...).

---
## NewTypeExpr
```python
from nodes import NewTypeExpr
```

NewType expression NewType(...).

---
## AwaitExpr
```python
from nodes import AwaitExpr
```

Await expression (await ...).

---
## TempNode
```python
from nodes import TempNode
```

Temporary dummy node used during type checking.

This node is not present in the original program; it is just an artifact
of the type checker implementation. It only represents an opaque node with
some fixed type.

---
## TypeInfo
```python
from nodes import TypeInfo
```

The type structure of a single class.

Each TypeInfo corresponds one-to-one to a ClassDef, which
represents the AST of the class.

In type-theory terms, this is a "type constructor", and if the
class is generic then it will be a type constructor of higher kind.
Where the class is used in an actual type, it's in the form of an
Instance, which amounts to a type application of the tycon to
the appropriate number of arguments.

---
## FakeInfo
```python
from nodes import FakeInfo
```



---
## TypeAlias
```python
from nodes import TypeAlias
```

A symbol node representing a type alias.

Type alias is a static concept, in contrast to variables with types
like Type[...]. Namely:
    * type aliases
        - can be used in type context (annotations)
        - cannot be re-assigned
    * variables with type Type[...]
        - cannot be used in type context
        - but can be re-assigned

An alias can be defined only by an assignment to a name (not any other lvalues).

Such assignment defines an alias by default. To define a variable,
an explicit Type[...] annotation is required. As an exception,
at non-global scope non-subscripted rvalue creates a variable even without
an annotation. This exception exists to accommodate the common use case of
class-valued attributes. See SemanticAnalyzerPass2.check_and_set_up_type_alias
for details.

Aliases can be generic. We use bound type variables for generic aliases, similar
to classes. Essentially, type aliases work as macros that expand textually.
The definition and expansion rules are following:

    1. An alias targeting a generic class without explicit variables act as
    the given class (this doesn't apply to TypedDict, Tuple and Callable, which
    are not proper classes but special type constructors):

        A = List
        AA = List[Any]

        x: A  # same as List[Any]
        x: A[int]  # same as List[int]

        x: AA  # same as List[Any]
        x: AA[int]  # Error!

        C = Callable  # Same as Callable[..., Any]
        T = Tuple  # Same as Tuple[Any, ...]

    2. An alias using explicit type variables in its rvalue expects
    replacements (type arguments) for these variables. If missing, they
    are treated as Any, like for other generics:

        B = List[Tuple[T, T]]

        x: B  # same as List[Tuple[Any, Any]]
        x: B[int]  # same as List[Tuple[int, int]]

        def f(x: B[T]) -> T: ...  # without T, Any would be used here

    3. An alias can be defined using another aliases. In the definition
    rvalue the Any substitution doesn't happen for top level unsubscripted
    generic classes:

        A = List
        B = A  # here A is expanded to List, _not_ List[Any],
               # to match the Python runtime behaviour
        x: B[int]  # same as List[int]
        C = List[A]  # this expands to List[List[Any]]

        AA = List[T]
        D = AA  # here AA expands to List[Any]
        x: D[int]  # Error!

Note: the fact that we support aliases like `A = List` means that the target
type will be initially an instance type with wrong number of type arguments.
Such instances are all fixed either during or after main semantic analysis passes.
We therefore store the difference between `List` and `List[Any]` rvalues (targets)
using the `no_args` flag. See also TypeAliasExpr.no_args.

Meaning of other fields:

target: The target type. For generic aliases contains bound type variables
    as nested types (currently TypeVar and ParamSpec are supported).
_fullname: Qualified name of this type alias. This is used in particular
    to track fine grained dependencies from aliases.
alias_tvars: Type variables used to define this alias.
normalized: Used to distinguish between `A = List`, and `A = list`. Both
    are internally stored using `builtins.list` (because `typing.List` is
    itself an alias), while the second cannot be subscripted because of
    Python runtime limitation.
line and column: Line and column on the original alias definition.
eager: If True, immediately expand alias when referred to (useful for aliases
    within functions that can't be looked up from the symbol table)

---
## PlaceholderNode
```python
from nodes import PlaceholderNode
```

Temporary symbol node that will later become a real SymbolNode.

These are only present during semantic analysis when using the new
semantic analyzer. These are created if some essential dependencies
of a definition are not yet complete.

A typical use is for names imported from a module which is still
incomplete (within an import cycle):

  from m import f  # Initially may create PlaceholderNode

This is particularly important if the imported shadows a name from
an enclosing scope or builtins:

  from m import int  # Placeholder avoids mixups with builtins.int

Another case where this is useful is when there is another definition
or assignment:

  from m import f
  def f() -> None: ...

In the above example, the presence of PlaceholderNode allows us to
handle the second definition as a redefinition.

They are also used to create PlaceholderType instances for types
that refer to incomplete types. Example:

  class C(Sequence[C]): ...

We create a PlaceholderNode (with becomes_typeinfo=True) for C so
that the type C in Sequence[C] can be bound.

Attributes:

  fullname: Full name of the PlaceholderNode.
  node: AST node that contains the definition that caused this to
      be created. This is useful for tracking order of incomplete definitions
      and for debugging.
  becomes_typeinfo: If True, this refers something that could later
      become a TypeInfo. It can't be used with type variables, in
      particular, as this would cause issues with class type variable
      detection.

The long-term purpose of placeholder nodes/types is to evolve into
something that can support general recursive types.

---
## SymbolTableNode
```python
from nodes import SymbolTableNode
```

Description of a name binding in a symbol table.

These are only used as values in module (global), function (local)
and class symbol tables (see SymbolTable). The name that is bound is
the key in SymbolTable.

Symbol tables don't contain direct references to AST nodes primarily
because there can be multiple symbol table references to a single
AST node (due to imports and aliases), and different references can
behave differently. This class describes the unique properties of
each reference.

The most fundamental attribute is 'node', which is the AST node that
the name refers to.

The kind is usually one of LDEF, GDEF or MDEF, depending on the scope
of the definition. These three kinds can usually be used
interchangeably and the difference between local, global and class
scopes is mostly descriptive, with no semantic significance.
However, some tools that consume mypy ASTs may care about these so
they should be correct.

Attributes:
    node: AST node of definition. Among others, this can be one of
        FuncDef, Var, TypeInfo, TypeVarExpr or MypyFile -- or None
        for cross_ref that hasn't been fixed up yet.
    kind: Kind of node. Possible values:
           - LDEF: local definition
           - GDEF: global (module-level) definition
           - MDEF: class member definition
           - UNBOUND_IMPORTED: temporary kind for imported names (we
             don't know the final kind yet)
    module_public: If False, this name won't be imported via
        'from <module> import *'. This has no effect on names within
        classes.
    module_hidden: If True, the name will be never exported (needed for
        stub files)
    cross_ref: For deserialized MypyFile nodes, the referenced module
        name; for other nodes, optionally the name of the referenced object.
    implicit: Was this defined by assignment to self attribute?
    plugin_generated: Was this symbol generated by a plugin?
        (And therefore needs to be removed in aststrip.)
    no_serialize: Do not serialize this node if True. This is used to prevent
        keys in the cache that refer to modules on which this file does not
        depend. Currently this can happen if there is a module not in build
        used e.g. like this:
            import a.b.c # type: ignore
        This will add a submodule symbol to parent module `a` symbol table,
        but `a.b` is _not_ added as its dependency. Therefore, we should
        not serialize these symbols as they may not be found during fixup
        phase, instead they will be re-added during subsequent patch parents
        phase.
        TODO: Refactor build.py to make dependency tracking more transparent
        and/or refactor look-up functions to not require parent patching.

NOTE: No other attributes should be added to this class unless they
are shared by all node kinds.

---
## SymbolTable
```python
from nodes import SymbolTable
```

Static representation of a namespace dictionary.

This is used for module, class and function namespaces.

---
## DataclassTransformSpec
```python
from nodes import DataclassTransformSpec
```

Specifies how a dataclass-like transform should be applied. The fields here are based on the
parameters accepted by `typing.dataclass_transform`.

---
## get_flags
```python
from nodes import get_flags
```



---
## set_flags
```python
from nodes import set_flags
```



---
## get_member_expr_fullname
```python
from nodes import get_member_expr_fullname
```

Return the qualified name representation of a member expression.

Return a string of form foo.bar, foo.bar.baz, or similar, or None if the
argument cannot be represented in this form.

---
## check_arg_kinds
```python
from nodes import check_arg_kinds
```



---
## check_arg_names
```python
from nodes import check_arg_names
```



---
## is_class_var
```python
from nodes import is_class_var
```

Return whether the expression is ClassVar[...]

---
## is_final_node
```python
from nodes import is_final_node
```

Check whether `node` corresponds to a final attribute.

---
## local_definitions
```python
from nodes import local_definitions
```

Return all definitions within the module (including nested).

This doesn't include imported definitions.

---
## set_line
```python
from nodes import set_line
```



---
## str_with_options
```python
from nodes import str_with_options
```



---
## accept
```python
from nodes import accept
```



---
## name
```python
from nodes import name
```



---
## fullname
```python
from nodes import fullname
```



---
## serialize
```python
from nodes import serialize
```



---
## deserialize
```python
from nodes import deserialize
```



---
## is_package_init_file
```python
from nodes import is_package_init_file
```



---
## is_future_flag_set
```python
from nodes import is_future_flag_set
```



---
## is_typeshed_file
```python
from nodes import is_typeshed_file
```



---
## is_dynamic
```python
from nodes import is_dynamic
```



---
## max_fixed_argc
```python
from nodes import max_fixed_argc
```



---
## is_final
```python
from nodes import is_final
```



---
## info
```python
from nodes import info
```



---
## type
```python
from nodes import type
```



---
## is_generic
```python
from nodes import is_generic
```

Is the type generic (i.e. does it have type variables)?

---
## is_positional
```python
from nodes import is_positional
```



---
## is_named
```python
from nodes import is_named
```



---
## is_required
```python
from nodes import is_required
```



---
## is_optional
```python
from nodes import is_optional
```



---
## is_star
```python
from nodes import is_star
```



---
## pairwise
```python
from nodes import pairwise
```

If this comparison expr is "a < b is c == d", yields the sequence
("<", a, b), ("is", b, c), ("==", c, d)

---
## expr
```python
from nodes import expr
```

Return the expression (the body) of the lambda.

---
## add_type_vars
```python
from nodes import add_type_vars
```



---
## get_containing_type_info
```python
from nodes import get_containing_type_info
```



---
## protocol_members
```python
from nodes import protocol_members
```



---
## has_readable_member
```python
from nodes import has_readable_member
```



---
## get_method
```python
from nodes import get_method
```



---
## calculate_metaclass_type
```python
from nodes import calculate_metaclass_type
```



---
## is_metaclass
```python
from nodes import is_metaclass
```



---
## has_base
```python
from nodes import has_base
```

Return True if type has a base type with the specified name.

This can be either via extension or via implementation.

---
## direct_base_classes
```python
from nodes import direct_base_classes
```

Return a direct base classes.

Omit base classes of other base classes.

---
## update_tuple_type
```python
from nodes import update_tuple_type
```

Update tuple_type and special_alias as needed.

---
## update_typeddict_type
```python
from nodes import update_typeddict_type
```

Update typeddict_type and special_alias as needed.

---
## __getattribute__
```python
from nodes import __getattribute__
```



---
## from_tuple_type
```python
from nodes import from_tuple_type
```

Generate an alias to the tuple type described by a given TypeInfo.

NOTE: this doesn't set type alias type variables (for generic tuple types),
they must be set by the caller (when fully analyzed).

---
## from_typeddict_type
```python
from nodes import from_typeddict_type
```

Generate an alias to the TypedDict type described by a given TypeInfo.

NOTE: this doesn't set type alias type variables (for generic TypedDicts),
they must be set by the caller (when fully analyzed).

---
## has_param_spec_type
```python
from nodes import has_param_spec_type
```



---
## type_str
```python
from nodes import type_str
```



---
## __name__
```python
from operators import __name__
```

Information about Python operators

---
## stat_proxy
```python
from main import stat_proxy
```



---
## run_build
```python
from main import run_build
```



---
## show_messages
```python
from main import show_messages
```



---
## AugmentedHelpFormatter
```python
from main import AugmentedHelpFormatter
```



---
## invert_flag_name
```python
from main import invert_flag_name
```



---
## PythonExecutableInferenceError
```python
from main import PythonExecutableInferenceError
```

Represents a failure to infer the version or executable while searching.

---
## python_executable_prefix
```python
from main import python_executable_prefix
```



---
## _python_executable_from_version
```python
from main import _python_executable_from_version
```



---
## infer_python_executable
```python
from main import infer_python_executable
```

Infer the Python executable from the given version.

This function mutates options based on special_opts to infer the correct Python executable
to use.

---
## CapturableArgumentParser
```python
from main import CapturableArgumentParser
```

Override ArgumentParser methods that use sys.stdout/sys.stderr directly.

This is needed because hijacking sys.std* is not thread-safe,
yet output must be captured to properly support mypy.api.run.

---
## CapturableVersionAction
```python
from main import CapturableVersionAction
```

Supplement CapturableArgumentParser to handle --version.

This is nearly identical to argparse._VersionAction except,
like CapturableArgumentParser, it allows output to be captured.

Another notable difference is that version is mandatory.
This allows removing a line in __call__ that falls back to parser.version
(which does not appear to exist).

---
## process_options
```python
from main import process_options
```

Parse command line arguments.

If a FileSystemCache is passed in, and package_root options are given,
call fscache.set_package_root() to set the cache's package root.

---
## process_package_roots
```python
from main import process_package_roots
```

Validate and normalize package_root.

---
## process_cache_map
```python
from main import process_cache_map
```

Validate cache_map and copy into options.cache_map.

---
## maybe_write_junit_xml
```python
from main import maybe_write_junit_xml
```



---
## fail
```python
from main import fail
```

Fail with a serious error.

---
## read_types_packages_to_install
```python
from main import read_types_packages_to_install
```



---
## install_types
```python
from main import install_types
```

Install stub packages using pip if some missing stubs were detected.

---
## flush_errors
```python
from main import flush_errors
```



---
## _fill_text
```python
from main import _fill_text
```



---
## print_usage
```python
from main import print_usage
```



---
## print_help
```python
from main import print_help
```



---
## _print_message
```python
from main import _print_message
```



---
## exit
```python
from main import exit
```



---
## error
```python
from main import error
```

error(message: string)

Prints a usage message incorporating the message to stderr and
exits.

If you override this in a subclass, it should not return -- it
should either exit or raise an exception.

---
## __call__
```python
from main import __call__
```



---
## add_invertible_flag
```python
from main import add_invertible_flag
```



---
## set_strict_flags
```python
from main import set_strict_flags
```



---
## __name__
```python
from checkexpr import __name__
```

Expression type checker. This file is conceptually part of TypeChecker.

---
## TooManyUnions
```python
from checkexpr import TooManyUnions
```

Indicates that we need to stop splitting unions in an attempt
to match an overload in order to save performance.

---
## allow_fast_container_literal
```python
from checkexpr import allow_fast_container_literal
```



---
## extract_refexpr_names
```python
from checkexpr import extract_refexpr_names
```

Recursively extracts all module references from a reference expression.

Note that currently, the only two subclasses of RefExpr are NameExpr and
MemberExpr.

---
## Finished
```python
from checkexpr import Finished
```

Raised if we can terminate overload argument check early (no match).

---
## UseReverse
```python
from checkexpr import UseReverse
```

Used in `visit_op_expr` to enable or disable reverse method checks.

---
## ExpressionChecker
```python
from checkexpr import ExpressionChecker
```

Expression type checker.

This class works closely together with checker.TypeChecker.

---
## has_any_type
```python
from checkexpr import has_any_type
```

Whether t contains an Any type

---
## HasAnyType
```python
from checkexpr import HasAnyType
```



---
## has_coroutine_decorator
```python
from checkexpr import has_coroutine_decorator
```

Whether t came from a function decorated with `@coroutine`.

---
## is_async_def
```python
from checkexpr import is_async_def
```

Whether t came from a function defined using `async def`.

---
## is_non_empty_tuple
```python
from checkexpr import is_non_empty_tuple
```



---
## is_duplicate_mapping
```python
from checkexpr import is_duplicate_mapping
```



---
## replace_callable_return_type
```python
from checkexpr import replace_callable_return_type
```

Return a copy of a callable type with a different return type.

---
## ArgInferSecondPassQuery
```python
from checkexpr import ArgInferSecondPassQuery
```

Query whether an argument type should be inferred in the second pass.

The result is True if the type has a type variable in a callable return
type anywhere. For example, the result for Callable[[], T] is True if t is
a type variable.

---
## HasTypeVarQuery
```python
from checkexpr import HasTypeVarQuery
```

Visitor for querying whether a type has a type variable component.

---
## has_erased_component
```python
from checkexpr import has_erased_component
```



---
## HasErasedComponentsQuery
```python
from checkexpr import HasErasedComponentsQuery
```

Visitor for querying whether a type has an erased component.

---
## has_uninhabited_component
```python
from checkexpr import has_uninhabited_component
```



---
## HasUninhabitedComponentsQuery
```python
from checkexpr import HasUninhabitedComponentsQuery
```

Visitor for querying whether a type has an UninhabitedType component.

---
## arg_approximate_similarity
```python
from checkexpr import arg_approximate_similarity
```

Return if caller argument (actual) is roughly compatible with signature arg (formal).

This function is deliberately loose and will report two types are similar
as long as their "shapes" are plausibly the same.

This is useful when we're doing error reporting: for example, if we're trying
to select an overload alternative and there's no exact match, we can use
this function to help us identify which alternative the user might have
*meant* to match.

---
## any_causes_overload_ambiguity
```python
from checkexpr import any_causes_overload_ambiguity
```

May an argument containing 'Any' cause ambiguous result type on call to overloaded function?

Note that this sometimes returns True even if there is no ambiguity, since a correct
implementation would be complex (and the call would be imprecisely typed due to Any
types anyway).

Args:
    items: Overload items matching the actual arguments
    arg_types: Actual argument types
    arg_kinds: Actual argument kinds
    arg_names: Actual argument names

---
## all_same_types
```python
from checkexpr import all_same_types
```



---
## merge_typevars_in_callables_by_name
```python
from checkexpr import merge_typevars_in_callables_by_name
```

Takes all the typevars present in the callables and 'combines' the ones with the same name.

For example, suppose we have two callables with signatures "f(x: T, y: S) -> T" and
"f(x: List[Tuple[T, S]]) -> Tuple[T, S]". Both callables use typevars named "T" and
"S", but we treat them as distinct, unrelated typevars. (E.g. they could both have
distinct ids.)

If we pass in both callables into this function, it returns a list containing two
new callables that are identical in signature, but use the same underlying TypeVarType
for T and S.

This is useful if we want to take the output lists and "merge" them into one callable
in some way -- for example, when unioning together overloads.

Returns both the new list of callables and a list of all distinct TypeVarType objects used.

---
## try_getting_literal
```python
from checkexpr import try_getting_literal
```

If possible, get a more precise literal type for a given type.

---
## is_expr_literal_type
```python
from checkexpr import is_expr_literal_type
```

Returns 'true' if the given node is a Literal

---
## has_bytes_component
```python
from checkexpr import has_bytes_component
```

Is this one of builtin byte types, or a union that contains it?

---
## type_info_from_type
```python
from checkexpr import type_info_from_type
```

Gets the TypeInfo for a type, indirecting through things like type variables and tuples.

---
## is_operator_method
```python
from checkexpr import is_operator_method
```



---
## get_partial_instance_type
```python
from checkexpr import get_partial_instance_type
```



---
## __init__
```python
from checkexpr import __init__
```



---
## reset
```python
from checkexpr import reset
```



---
## visit_name_expr
```python
from checkexpr import visit_name_expr
```

Type check a name expression.

It can be of any kind: local, member or global.

---
## analyze_ref_expr
```python
from checkexpr import analyze_ref_expr
```



---
## analyze_var_ref
```python
from checkexpr import analyze_var_ref
```



---
## module_type
```python
from checkexpr import module_type
```



---
## visit_call_expr
```python
from checkexpr import visit_call_expr
```

Type check a call expression.

---
## refers_to_typeddict
```python
from checkexpr import refers_to_typeddict
```



---
## visit_call_expr_inner
```python
from checkexpr import visit_call_expr_inner
```



---
## check_str_format_call
```python
from checkexpr import check_str_format_call
```

More precise type checking for str.format() calls on literals.

---
## method_fullname
```python
from checkexpr import method_fullname
```

Convert a method name to a fully qualified name, based on the type of the object that
it is invoked on. Return `None` if the name of `object_type` cannot be determined.

---
## always_returns_none
```python
from checkexpr import always_returns_none
```

Check if `node` refers to something explicitly annotated as only returning None.

---
## defn_returns_none
```python
from checkexpr import defn_returns_none
```

Check if `defn` can _only_ return None.

---
## check_runtime_protocol_test
```python
from checkexpr import check_runtime_protocol_test
```



---
## check_protocol_issubclass
```python
from checkexpr import check_protocol_issubclass
```



---
## check_typeddict_call
```python
from checkexpr import check_typeddict_call
```



---
## validate_typeddict_kwargs
```python
from checkexpr import validate_typeddict_kwargs
```



---
## validate_star_typeddict_item
```python
from checkexpr import validate_star_typeddict_item
```

Update keys/expressions from a ** expression in TypedDict constructor.

Note `result` and `always_present_keys` are updated in place. Return true if the
expression `item_arg` may valid in `callee` TypedDict context.

---
## valid_unpack_fallback_item
```python
from checkexpr import valid_unpack_fallback_item
```



---
## match_typeddict_call_with_dict
```python
from checkexpr import match_typeddict_call_with_dict
```



---
## check_typeddict_call_with_dict
```python
from checkexpr import check_typeddict_call_with_dict
```



---
## typeddict_callable
```python
from checkexpr import typeddict_callable
```

Construct a reasonable type for a TypedDict type in runtime context.

If it appears as a callee, it will be special-cased anyway, e.g. it is
also allowed to accept a single positional argument if it is a dict literal.

Note it is not safe to move this to type_object_type() since it will crash
on plugin-generated TypedDicts, that may not have the special_alias.

---
## typeddict_callable_from_context
```python
from checkexpr import typeddict_callable_from_context
```



---
## check_typeddict_call_with_kwargs
```python
from checkexpr import check_typeddict_call_with_kwargs
```



---
## get_partial_self_var
```python
from checkexpr import get_partial_self_var
```

Get variable node for a partial self attribute.

If the expression is not a self attribute, or attribute is not variable,
or variable is not partial, return None.

---
## try_infer_partial_type
```python
from checkexpr import try_infer_partial_type
```

Try to make partial type precise from a call.

---
## get_partial_var
```python
from checkexpr import get_partial_var
```



---
## try_infer_partial_value_type_from_call
```python
from checkexpr import try_infer_partial_value_type_from_call
```

Try to make partial type precise from a call such as 'x.append(y)'.

---
## apply_function_plugin
```python
from checkexpr import apply_function_plugin
```

Use special case logic to infer the return type of a specific named function/method.

Caller must ensure that a plugin hook exists. There are two different cases:

- If object_type is None, the caller must ensure that a function hook exists
  for fullname.
- If object_type is not None, the caller must ensure that a method hook exists
  for fullname.

Return the inferred return type.

---
## apply_signature_hook
```python
from checkexpr import apply_signature_hook
```

Helper to apply a signature hook for either a function or method

---
## apply_function_signature_hook
```python
from checkexpr import apply_function_signature_hook
```

Apply a plugin hook that may infer a more precise signature for a function.

---
## apply_method_signature_hook
```python
from checkexpr import apply_method_signature_hook
```

Apply a plugin hook that may infer a more precise signature for a method.

---
## transform_callee_type
```python
from checkexpr import transform_callee_type
```

Attempt to determine a more accurate signature for a method call.

This is done by looking up and applying a method signature hook (if one exists for the
given method name).

If no matching method signature hook is found, callee is returned unmodified. The same
happens if the arguments refer to a non-method callable (this is allowed so that the code
calling transform_callee_type needs to perform fewer boilerplate checks).

Note: this method is *not* called automatically as part of check_call, because in some
cases check_call is called multiple times while checking a single call (for example when
dealing with overloads). Instead, this method needs to be called explicitly
(if appropriate) before the signature is passed to check_call.

---
## is_generic_decorator_overload_call
```python
from checkexpr import is_generic_decorator_overload_call
```

Check if this looks like an application of a generic function to overload argument.

---
## handle_decorator_overload_call
```python
from checkexpr import handle_decorator_overload_call
```

Type-check application of a generic callable to an overload.

We check call on each individual overload item, and then combine results into a new
overload. This function should be only used if callee_type takes and returns a Callable.

---
## check_call_expr_with_callee_type
```python
from checkexpr import check_call_expr_with_callee_type
```

Type check call expression.

The callee_type should be used as the type of callee expression. In particular,
in case of a union type this can be a particular item of the union, so that we can
apply plugin hooks to each item.

The 'member', 'callable_name' and 'object_type' are only used to call plugin hooks.
If 'callable_name' is None but 'member' is not None (member call), try constructing
'callable_name' using 'object_type' (the base type on which the method is called),
for example 'typing.Mapping.get'.

---
## check_union_call_expr
```python
from checkexpr import check_union_call_expr
```

Type check calling a member expression where the base type is a union.

---
## check_call
```python
from checkexpr import check_call
```

Type check a call.

Also infer type arguments if the callee is a generic function.

Return (result type, inferred callee type).

Arguments:
    callee: type of the called value
    args: actual argument expressions
    arg_kinds: contains nodes.ARG_* constant for each argument in args
         describing whether the argument is positional, *arg, etc.
    context: current expression context, used for inference.
    arg_names: names of arguments (optional)
    callable_node: associate the inferred callable type to this node,
        if specified
    callable_name: Fully-qualified name of the function/method to call,
        or None if unavailable (examples: 'builtins.open', 'typing.Mapping.get')
    object_type: If callable_name refers to a method, the type of the object
        on which the method is being called

---
## check_callable_call
```python
from checkexpr import check_callable_call
```

Type check a call that targets a callable value.

See the docstring of check_call for more information.

---
## can_return_none
```python
from checkexpr import can_return_none
```

Is the given attribute a method with a None-compatible return type?

Overloads are only checked if there is an implementation.

---
## analyze_type_type_callee
```python
from checkexpr import analyze_type_type_callee
```

Analyze the callee X in X(...) where X is Type[item].

Return a Y that we can pass to check_call(Y, ...).

---
## infer_arg_types_in_empty_context
```python
from checkexpr import infer_arg_types_in_empty_context
```

Infer argument expression types in an empty context.

In short, we basically recurse on each argument without considering
in what context the argument was called.

---
## infer_more_unions_for_recursive_type
```python
from checkexpr import infer_more_unions_for_recursive_type
```

Adjust type inference of unions if type context has a recursive type.

Return the old state. The caller must assign it to type_state.infer_unions
afterwards.

This is a hack to better support inference for recursive types.

Note: This is performance-sensitive and must not be a context manager
until mypyc supports them better.

---
## infer_arg_types_in_context
```python
from checkexpr import infer_arg_types_in_context
```

Infer argument expression types using a callable type as context.

For example, if callee argument 2 has type List[int], infer the
argument expression with List[int] type context.

Returns the inferred types of *actual arguments*.

---
## infer_function_type_arguments_using_context
```python
from checkexpr import infer_function_type_arguments_using_context
```

Unify callable return type to type context to infer type vars.

For example, if the return type is set[t] where 't' is a type variable
of callable, and if the context is set[int], return callable modified
by substituting 't' with 'int'.

---
## infer_function_type_arguments
```python
from checkexpr import infer_function_type_arguments
```

Infer the type arguments for a generic callee type.

Infer based on the types of arguments.

Return a derived callable type that has the arguments applied.

---
## infer_function_type_arguments_pass2
```python
from checkexpr import infer_function_type_arguments_pass2
```

Perform second pass of generic function type argument inference.

The second pass is needed for arguments with types such as Callable[[T], S],
where both T and S are type variables, when the actual argument is a
lambda with inferred types.  The idea is to infer the type variable T
in the first pass (based on the types of other arguments).  This lets
us infer the argument and return type of the lambda expression and
thus also the type variable S in this second pass.

Return (the callee with type vars applied, inferred actual arg types).

---
## argument_infer_context
```python
from checkexpr import argument_infer_context
```



---
## get_arg_infer_passes
```python
from checkexpr import get_arg_infer_passes
```

Return pass numbers for args for two-pass argument type inference.

For each actual, the pass number is either 1 (first pass) or 2 (second
pass).

Two-pass argument type inference primarily lets us infer types of
lambdas more effectively.

---
## apply_inferred_arguments
```python
from checkexpr import apply_inferred_arguments
```

Apply inferred values of type arguments to a generic function.

Inferred_args contains the values of function type arguments.

---
## check_argument_count
```python
from checkexpr import check_argument_count
```

Check that there is a value for all required arguments to a function.

Also check that there are no duplicate values for arguments. Report found errors
using 'messages' if it's not None. If 'messages' is given, 'context' must also be given.

Return False if there were any errors. Otherwise return True

---
## check_for_extra_actual_arguments
```python
from checkexpr import check_for_extra_actual_arguments
```

Check for extra actual arguments.

Return tuple (was everything ok,
              was there an extra keyword argument error [used to avoid duplicate errors]).

---
## missing_classvar_callable_note
```python
from checkexpr import missing_classvar_callable_note
```



---
## check_argument_types
```python
from checkexpr import check_argument_types
```

Check argument types against a callable type.

Report errors if the argument types are not compatible.

The check_call docstring describes some of the arguments.

---
## check_arg
```python
from checkexpr import check_arg
```



---
## check_overload_call
```python
from checkexpr import check_overload_call
```

Checks a call to an overloaded function.

---
## plausible_overload_call_targets
```python
from checkexpr import plausible_overload_call_targets
```

Returns all overload call targets that having matching argument counts.

If the given args contains a star-arg (*arg or **kwarg argument), this method
will ensure all star-arg overloads appear at the start of the list, instead
of their usual location.

The only exception is if the starred argument is something like a Tuple or a
NamedTuple, which has a definitive "shape". If so, we don't move the corresponding
alternative to the front since we can infer a more precise match using the original
order.

---
## infer_overload_return_type
```python
from checkexpr import infer_overload_return_type
```

Attempts to find the first matching callable from the given list.

If a match is found, returns a tuple containing the result type and the inferred
callee type. (This tuple is meant to be eventually returned by check_call.)
If multiple targets match due to ambiguous Any parameters, returns (AnyType, AnyType).
If no targets match, returns None.

Assumes all of the given targets have argument counts compatible with the caller.

---
## overload_erased_call_targets
```python
from checkexpr import overload_erased_call_targets
```

Returns a list of all targets that match the caller after erasing types.

Assumes all of the given targets have argument counts compatible with the caller.

---
## possible_none_type_var_overlap
```python
from checkexpr import possible_none_type_var_overlap
```

Heuristic to determine whether we need to try forcing union math.

This is needed to avoid greedy type variable match in situations like this:
    @overload
    def foo(x: None) -> None: ...
    @overload
    def foo(x: T) -> list[T]: ...

    x: int | None
    foo(x)
we want this call to infer list[int] | None, not list[int | None].

---
## union_overload_result
```python
from checkexpr import union_overload_result
```

Accepts a list of overload signatures and attempts to match calls by destructuring
the first union.

Return a list of (<return type>, <inferred variant type>) if call succeeds for every
item of the desctructured union. Returns None if there is no match.

---
## real_union
```python
from checkexpr import real_union
```



---
## type_overrides_set
```python
from checkexpr import type_overrides_set
```

Set _temporary_ type overrides for given expressions.

---
## combine_function_signatures
```python
from checkexpr import combine_function_signatures
```

Accepts a list of function signatures and attempts to combine them together into a
new CallableType consisting of the union of all of the given arguments and return types.

If there is at least one non-callable type, return Any (this can happen if there is
an ambiguity because of Any in arguments).

---
## erased_signature_similarity
```python
from checkexpr import erased_signature_similarity
```

Determine whether arguments could match the signature at runtime, after
erasing types.

---
## apply_generic_arguments
```python
from checkexpr import apply_generic_arguments
```

Simple wrapper around mypy.applytype.apply_generic_arguments.

---
## check_any_type_call
```python
from checkexpr import check_any_type_call
```



---
## check_union_call
```python
from checkexpr import check_union_call
```



---
## visit_member_expr
```python
from checkexpr import visit_member_expr
```

Visit member expression (of form e.id).

---
## analyze_ordinary_member_access
```python
from checkexpr import analyze_ordinary_member_access
```

Analyse member expression or member lvalue.

---
## analyze_external_member_access
```python
from checkexpr import analyze_external_member_access
```

Analyse member access that is external, i.e. it cannot
refer to private definitions. Return the result type.

---
## is_literal_context
```python
from checkexpr import is_literal_context
```



---
## infer_literal_expr_type
```python
from checkexpr import infer_literal_expr_type
```

Analyzes the given literal expression and determines if we should be
inferring an Instance type, a Literal[...] type, or an Instance that
remembers the original literal. We...

1. ...Infer a normal Instance in most circumstances.

2. ...Infer a Literal[...] if we're in a literal context. For example, if we
   were analyzing the "3" in "foo(3)" where "foo" has a signature of
   "def foo(Literal[3]) -> None", we'd want to infer that the "3" has a
   type of Literal[3] instead of Instance.

3. ...Infer an Instance that remembers the original Literal if we're declaring
   a Final variable with an inferred type -- for example, "bar" in "bar: Final = 3"
   would be assigned an Instance that remembers it originated from a '3'. See
   the comments in Instance's constructor for more details.

---
## concat_tuples
```python
from checkexpr import concat_tuples
```

Concatenate two fixed length tuples.

---
## visit_int_expr
```python
from checkexpr import visit_int_expr
```

Type check an integer literal (trivial).

---
## visit_str_expr
```python
from checkexpr import visit_str_expr
```

Type check a string literal (trivial).

---
## visit_bytes_expr
```python
from checkexpr import visit_bytes_expr
```

Type check a bytes literal (trivial).

---
## visit_float_expr
```python
from checkexpr import visit_float_expr
```

Type check a float literal (trivial).

---
## visit_complex_expr
```python
from checkexpr import visit_complex_expr
```

Type check a complex literal.

---
## visit_ellipsis
```python
from checkexpr import visit_ellipsis
```

Type check '...'.

---
## visit_op_expr
```python
from checkexpr import visit_op_expr
```

Type check a binary operator expression.

---
## visit_comparison_expr
```python
from checkexpr import visit_comparison_expr
```

Type check a comparison expression.

Comparison expressions are type checked consecutive-pair-wise
That is, 'a < b > c == d' is check as 'a < b and b > c and c == d'

---
## find_partial_type_ref_fast_path
```python
from checkexpr import find_partial_type_ref_fast_path
```

If expression has a partial generic type, return it without additional checks.

In particular, this does not generate an error about a missing annotation.

Otherwise, return None.

---
## dangerous_comparison
```python
from checkexpr import dangerous_comparison
```

Check for dangerous non-overlapping comparisons like 42 == 'no'.

The original_container is the original container type for 'in' checks
(and None for equality checks).

Rules:
    * X and None are overlapping even in strict-optional mode. This is to allow
    'assert x is not None' for x defined as 'x = None  # type: str' in class body
    (otherwise mypy itself would have couple dozen errors because of this).
    * Optional[X] and Optional[Y] are non-overlapping if X and Y are
    non-overlapping, although technically None is overlap, it is most
    likely an error.
    * Any overlaps with everything, i.e. always safe.
    * Special case: b'abc' in b'cde' is safe.

---
## check_method_call_by_name
```python
from checkexpr import check_method_call_by_name
```

Type check a call to a named method on an object.

Return tuple (result type, inferred method type). The 'original_type'
is used for error messages.

---
## check_union_method_call_by_name
```python
from checkexpr import check_union_method_call_by_name
```

Type check a call to a named method on an object with union type.

This essentially checks the call using check_method_call_by_name() for each
union item and unions the result. We do this to allow plugins to act on
individual union items.

---
## check_method_call
```python
from checkexpr import check_method_call
```

Type check a call to a method with the given name and type on an object.

Return tuple (result type, inferred method type).

---
## check_op_reversible
```python
from checkexpr import check_op_reversible
```



---
## check_op
```python
from checkexpr import check_op
```

Type check a binary operation which maps to a method call.

Return tuple (result type, inferred operator method type).

---
## check_boolean_op
```python
from checkexpr import check_boolean_op
```

Type check a boolean operation ('and' or 'or').

---
## check_list_multiply
```python
from checkexpr import check_list_multiply
```

Type check an expression of form '[...] * e'.

Type inference is special-cased for this common construct.

---
## visit_assignment_expr
```python
from checkexpr import visit_assignment_expr
```



---
## visit_unary_expr
```python
from checkexpr import visit_unary_expr
```

Type check an unary operation ('not', '-', '+' or '~').

---
## visit_index_expr
```python
from checkexpr import visit_index_expr
```

Type check an index expression (base[index]).

It may also represent type application.

---
## visit_index_expr_helper
```python
from checkexpr import visit_index_expr_helper
```



---
## visit_index_with_type
```python
from checkexpr import visit_index_with_type
```

Analyze type of an index expression for a given type of base expression.

The 'original_type' is used for error messages (currently used for union types).

---
## min_tuple_length
```python
from checkexpr import min_tuple_length
```



---
## visit_tuple_index_helper
```python
from checkexpr import visit_tuple_index_helper
```



---
## visit_tuple_slice_helper
```python
from checkexpr import visit_tuple_slice_helper
```



---
## try_getting_int_literals
```python
from checkexpr import try_getting_int_literals
```

If the given expression or type corresponds to an int literal
or a union of int literals, returns a list of the underlying ints.
Otherwise, returns None.

Specifically, this function is guaranteed to return a list with
one or more ints if one the following is true:

1. 'expr' is a IntExpr or a UnaryExpr backed by an IntExpr
2. 'typ' is a LiteralType containing an int
3. 'typ' is a UnionType containing only LiteralType of ints

---
## nonliteral_tuple_index_helper
```python
from checkexpr import nonliteral_tuple_index_helper
```



---
## union_tuple_fallback_item
```python
from checkexpr import union_tuple_fallback_item
```



---
## visit_typeddict_index_expr
```python
from checkexpr import visit_typeddict_index_expr
```



---
## visit_enum_index_expr
```python
from checkexpr import visit_enum_index_expr
```



---
## visit_cast_expr
```python
from checkexpr import visit_cast_expr
```

Type check a cast expression.

---
## visit_assert_type_expr
```python
from checkexpr import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from checkexpr import visit_reveal_expr
```

Type check a reveal_type expression.

---
## check_reveal_imported
```python
from checkexpr import check_reveal_imported
```



---
## visit_type_application
```python
from checkexpr import visit_type_application
```

Type check a type application (expr[type, ...]).

There are two different options here, depending on whether expr refers
to a type alias or directly to a generic class. In the first case we need
to use a dedicated function typeanal.instantiate_type_alias(). This
is due to slight differences in how type arguments are applied and checked.

---
## visit_type_alias_expr
```python
from checkexpr import visit_type_alias_expr
```

Right hand side of a type alias definition.

It has the same type as if the alias itself was used in a runtime context.
For example, here:

    A = reveal_type(List[T])
    reveal_type(A)

both `reveal_type` instances will reveal the same type `def (...) -> builtins.list[Any]`.
Note that type variables are implicitly substituted with `Any`.

---
## alias_type_in_runtime_context
```python
from checkexpr import alias_type_in_runtime_context
```

Get type of a type alias (could be generic) in a runtime expression.

Note that this function can be called only if the alias appears _not_
as a target of type application, which is treated separately in the
visit_type_application method. Some examples where this method is called are
casts and instantiation:

    class LongName(Generic[T]): ...
    A = LongName[int]

    x = A()
    y = cast(A, ...)

---
## split_for_callable
```python
from checkexpr import split_for_callable
```

Handle directly applying type arguments to a variadic Callable.

This is needed in situations where e.g. variadic class object appears in
runtime context. For example:
    class C(Generic[T, Unpack[Ts]]): ...
    x = C[int, str]()

We simply group the arguments that need to go into Ts variable into a TupleType,
similar to how it is done in other places using split_with_prefix_and_suffix().

---
## apply_type_arguments_to_callable
```python
from checkexpr import apply_type_arguments_to_callable
```

Apply type arguments to a generic callable type coming from a type object.

This will first perform type arguments count checks, report the
error as needed, and return the correct kind of Any. As a special
case this returns Any for non-callable types, because if type object type
is not callable, then an error should be already reported.

---
## visit_list_expr
```python
from checkexpr import visit_list_expr
```

Type check a list expression [...].

---
## visit_set_expr
```python
from checkexpr import visit_set_expr
```



---
## fast_container_type
```python
from checkexpr import fast_container_type
```

Fast path to determine the type of a list or set literal,
based on the list of entries. This mostly impacts large
module-level constant definitions.

Limitations:
 - no active type context
 - no star expressions
 - the joined type of all entries must be an Instance or Tuple type

---
## check_lst_expr
```python
from checkexpr import check_lst_expr
```



---
## tuple_context_matches
```python
from checkexpr import tuple_context_matches
```



---
## visit_tuple_expr
```python
from checkexpr import visit_tuple_expr
```

Type check a tuple expression.

---
## fast_dict_type
```python
from checkexpr import fast_dict_type
```

Fast path to determine the type of a dict literal,
based on the list of entries. This mostly impacts large
module-level constant definitions.

Limitations:
 - no active type context
 - only supported star expressions are other dict instances
 - the joined types of all keys and values must be Instance or Tuple types

---
## check_typeddict_literal_in_context
```python
from checkexpr import check_typeddict_literal_in_context
```



---
## visit_dict_expr
```python
from checkexpr import visit_dict_expr
```

Type check a dict expression.

Translate it into a call to dict(), with provisions for **expr.

---
## find_typeddict_context
```python
from checkexpr import find_typeddict_context
```



---
## visit_lambda_expr
```python
from checkexpr import visit_lambda_expr
```

Type check lambda expression.

---
## infer_lambda_type_using_context
```python
from checkexpr import infer_lambda_type_using_context
```

Try to infer lambda expression type using context.

Return None if could not infer type.
The second item in the return type is the type_override parameter for check_func_item.

---
## visit_super_expr
```python
from checkexpr import visit_super_expr
```

Type check a super expression (non-lvalue).

---
## _super_arg_types
```python
from checkexpr import _super_arg_types
```

Computes the types of the type and instance expressions in super(T, instance), or the
implicit ones for zero-argument super() expressions.  Returns a single type for the whole
super expression when possible (for errors, anys), otherwise the pair of computed types.

---
## visit_slice_expr
```python
from checkexpr import visit_slice_expr
```



---
## visit_list_comprehension
```python
from checkexpr import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from checkexpr import visit_set_comprehension
```



---
## visit_generator_expr
```python
from checkexpr import visit_generator_expr
```



---
## check_generator_or_comprehension
```python
from checkexpr import check_generator_or_comprehension
```

Type check a generator expression or a list comprehension.

---
## visit_dictionary_comprehension
```python
from checkexpr import visit_dictionary_comprehension
```

Type check a dictionary comprehension.

---
## check_for_comp
```python
from checkexpr import check_for_comp
```

Check the for_comp part of comprehensions. That is the part from 'for':
... for x in y if z

Note: This adds the type information derived from the condlists to the current binder.

---
## visit_conditional_expr
```python
from checkexpr import visit_conditional_expr
```



---
## analyze_cond_branch
```python
from checkexpr import analyze_cond_branch
```



---
## accept
```python
from checkexpr import accept
```

Type check a node in the given type context.  If allow_none_return
is True and this expression is a call, allow it to return None.  This
applies only to this expression and not any subexpressions.

---
## named_type
```python
from checkexpr import named_type
```

Return an instance type with type given by the name and no type
arguments. Alias for TypeChecker.named_type.

---
## type_alias_type_type
```python
from checkexpr import type_alias_type_type
```

Returns a `typing.TypeAliasType` or `typing_extensions.TypeAliasType`.

---
## is_valid_var_arg
```python
from checkexpr import is_valid_var_arg
```

Is a type valid as a *args argument?

---
## is_valid_keyword_var_arg
```python
from checkexpr import is_valid_keyword_var_arg
```

Is a type valid as a **kwargs argument?

---
## has_member
```python
from checkexpr import has_member
```

Does type have member with the given name?

---
## not_ready_callback
```python
from checkexpr import not_ready_callback
```

Called when we can't infer the type of a variable because it's not ready yet.

Either defer type checking of the enclosing function to the next
pass or report an error.

---
## visit_yield_expr
```python
from checkexpr import visit_yield_expr
```



---
## visit_await_expr
```python
from checkexpr import visit_await_expr
```



---
## check_awaitable_expr
```python
from checkexpr import check_awaitable_expr
```

Check the argument to `await` and extract the type of value.

Also used by `async for` and `async with`.

---
## visit_yield_from_expr
```python
from checkexpr import visit_yield_from_expr
```



---
## visit_temp_node
```python
from checkexpr import visit_temp_node
```



---
## visit_type_var_expr
```python
from checkexpr import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from checkexpr import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from checkexpr import visit_type_var_tuple_expr
```



---
## visit_newtype_expr
```python
from checkexpr import visit_newtype_expr
```



---
## visit_namedtuple_expr
```python
from checkexpr import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from checkexpr import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from checkexpr import visit_typeddict_expr
```



---
## visit__promote_expr
```python
from checkexpr import visit__promote_expr
```



---
## visit_star_expr
```python
from checkexpr import visit_star_expr
```



---
## object_type
```python
from checkexpr import object_type
```

Return instance type 'object'.

---
## bool_type
```python
from checkexpr import bool_type
```

Return instance type 'bool'.

---
## narrow_type_from_binder
```python
from checkexpr import narrow_type_from_binder
```

Narrow down a known type of expression using information in conditional type binder.

If 'skip_non_overlapping' is True, return None if the type and restriction are
non-overlapping.

---
## has_abstract_type_part
```python
from checkexpr import has_abstract_type_part
```



---
## has_abstract_type
```python
from checkexpr import has_abstract_type
```



---
## visit_any
```python
from checkexpr import visit_any
```



---
## visit_callable_type
```python
from checkexpr import visit_callable_type
```



---
## visit_type_var
```python
from checkexpr import visit_type_var
```



---
## visit_param_spec
```python
from checkexpr import visit_param_spec
```



---
## visit_type_var_tuple
```python
from checkexpr import visit_type_var_tuple
```



---
## visit_erased_type
```python
from checkexpr import visit_erased_type
```



---
## visit_uninhabited_type
```python
from checkexpr import visit_uninhabited_type
```



---
## is_typetype_like
```python
from checkexpr import is_typetype_like
```



---
## has_shape
```python
from checkexpr import has_shape
```



---
## lookup_operator
```python
from checkexpr import lookup_operator
```

Looks up the given operator and returns the corresponding type,
if it exists.

---
## lookup_definer
```python
from checkexpr import lookup_definer
```

Returns the name of the class that contains the actual definition of attr_name.

So if class A defines foo and class B subclasses A, running
'get_class_defined_in(B, "foo")` would return the full name of A.

However, if B were to override and redefine foo, that method call would
return the full name of B instead.

If the attr name is not present in the given class or its MRO, returns None.

---
## __name__
```python
from semanal_shared import __name__
```

Shared definitions used by different parts of semantic analysis.

---
## SemanticAnalyzerCoreInterface
```python
from semanal_shared import SemanticAnalyzerCoreInterface
```

A core abstract interface to generic semantic analyzer functionality.

This is implemented by both semantic analyzer passes 2 and 3.

---
## SemanticAnalyzerInterface
```python
from semanal_shared import SemanticAnalyzerInterface
```

A limited abstract interface to some generic semantic analyzer pass 2 functionality.

We use this interface for various reasons:

* Looser coupling
* Cleaner import graph
* Less need to pass around callback functions

---
## set_callable_name
```python
from semanal_shared import set_callable_name
```



---
## calculate_tuple_fallback
```python
from semanal_shared import calculate_tuple_fallback
```

Calculate a precise item type for the fallback of a tuple type.

This must be called only after the main semantic analysis pass, since joins
aren't available before that.

Note that there is an apparent chicken and egg problem with respect
to verifying type arguments against bounds. Verifying bounds might
require fallbacks, but we might use the bounds to calculate the
fallbacks. In practice this is not a problem, since the worst that
can happen is that we have invalid type argument values, and these
can happen in later stages as well (they will generate errors, but
we don't prevent their existence).

---
## _NamedTypeCallback
```python
from semanal_shared import _NamedTypeCallback
```



---
## paramspec_args
```python
from semanal_shared import paramspec_args
```



---
## paramspec_kwargs
```python
from semanal_shared import paramspec_kwargs
```



---
## HasPlaceholders
```python
from semanal_shared import HasPlaceholders
```



---
## has_placeholder
```python
from semanal_shared import has_placeholder
```

Check if a type contains any placeholder types (recursively).

---
## find_dataclass_transform_spec
```python
from semanal_shared import find_dataclass_transform_spec
```

Find the dataclass transform spec for the given node, if any exists.

Per PEP 681 (https://peps.python.org/pep-0681/#the-dataclass-transform-decorator), dataclass
transforms can be specified in multiple ways, including decorator functions and
metaclasses/base classes. This function resolves the spec from any of these variants.

---
## require_bool_literal_argument
```python
from semanal_shared import require_bool_literal_argument
```

Attempt to interpret an expression as a boolean literal, and fail analysis if we can't.

---
## parse_bool
```python
from semanal_shared import parse_bool
```



---
## lookup_qualified
```python
from semanal_shared import lookup_qualified
```



---
## lookup_fully_qualified
```python
from semanal_shared import lookup_fully_qualified
```



---
## lookup_fully_qualified_or_none
```python
from semanal_shared import lookup_fully_qualified_or_none
```



---
## fail
```python
from semanal_shared import fail
```



---
## note
```python
from semanal_shared import note
```



---
## incomplete_feature_enabled
```python
from semanal_shared import incomplete_feature_enabled
```



---
## record_incomplete_ref
```python
from semanal_shared import record_incomplete_ref
```



---
## defer
```python
from semanal_shared import defer
```



---
## is_incomplete_namespace
```python
from semanal_shared import is_incomplete_namespace
```

Is a module or class namespace potentially missing some definitions?

---
## final_iteration
```python
from semanal_shared import final_iteration
```

Is this the final iteration of semantic analysis?

---
## is_future_flag_set
```python
from semanal_shared import is_future_flag_set
```

Is the specific __future__ feature imported

---
## is_stub_file
```python
from semanal_shared import is_stub_file
```



---
## is_func_scope
```python
from semanal_shared import is_func_scope
```



---
## type
```python
from semanal_shared import type
```



---
## lookup
```python
from semanal_shared import lookup
```



---
## named_type
```python
from semanal_shared import named_type
```



---
## named_type_or_none
```python
from semanal_shared import named_type_or_none
```



---
## accept
```python
from semanal_shared import accept
```



---
## anal_type
```python
from semanal_shared import anal_type
```



---
## get_and_bind_all_tvars
```python
from semanal_shared import get_and_bind_all_tvars
```



---
## basic_new_typeinfo
```python
from semanal_shared import basic_new_typeinfo
```



---
## schedule_patch
```python
from semanal_shared import schedule_patch
```



---
## add_symbol_table_node
```python
from semanal_shared import add_symbol_table_node
```

Add node to the current symbol table.

---
## current_symbol_table
```python
from semanal_shared import current_symbol_table
```

Get currently active symbol table.

May be module, class, or local namespace.

---
## add_symbol
```python
from semanal_shared import add_symbol
```

Add symbol to the current symbol table.

---
## add_symbol_skip_local
```python
from semanal_shared import add_symbol_skip_local
```

Add symbol to the current symbol table, skipping locals.

This is used to store symbol nodes in a symbol table that
is going to be serialized (local namespaces are not serialized).
See implementation docstring for more details.

---
## qualified_name
```python
from semanal_shared import qualified_name
```



---
## is_typeshed_stub_file
```python
from semanal_shared import is_typeshed_stub_file
```



---
## process_placeholder
```python
from semanal_shared import process_placeholder
```



---
## __call__
```python
from semanal_shared import __call__
```



---
## __init__
```python
from semanal_shared import __init__
```



---
## visit_placeholder_type
```python
from semanal_shared import visit_placeholder_type
```



---
## __name__
```python
from semanal_infer import __name__
```

Simple type inference for decorated functions during semantic analysis.

---
## infer_decorator_signature_if_simple
```python
from semanal_infer import infer_decorator_signature_if_simple
```

Try to infer the type of the decorated function.

This lets us resolve additional references to decorated functions
during type checking. Otherwise the type might not be available
when we need it, since module top levels can't be deferred.

This basically uses a simple special-purpose type inference
engine just for decorators.

---
## is_identity_signature
```python
from semanal_infer import is_identity_signature
```

Is type a callable of form T -> T (where T is a type variable)?

---
## calculate_return_type
```python
from semanal_infer import calculate_return_type
```

Return the return type if we can calculate it.

This only uses information available during semantic analysis so this
will sometimes return None because of insufficient information (as
type inference hasn't run yet).

---
## find_fixed_callable_return
```python
from semanal_infer import find_fixed_callable_return
```

Return the return type, if expression refers to a callable that returns a callable.

But only do this if the return type has no type variables. Return None otherwise.
This approximates things a lot as this is supposed to be called before type checking
when full type information is not available yet.

---
## __name__
```python
from typestate import __name__
```

A shared state for all TypeInfos that holds global cache and dependency information,
and potentially other mutable TypeInfo state. This module contains mutable global state.

---
## TypeState
```python
from typestate import TypeState
```

This class provides subtype caching to improve performance of subtype checks.
It also holds protocol fine grained dependencies.

Note: to avoid leaking global state, 'reset_all_subtype_caches()' should be called
after a build has finished and after a daemon shutdown. This subtype cache only exists for
performance reasons, resetting subtype caches for a class has no semantic effect.
The protocol dependencies however are only stored here, and shouldn't be deleted unless
not needed any more (e.g. during daemon shutdown).

---
## reset_global_state
```python
from typestate import reset_global_state
```

Reset most existing global state.

Currently most of it is in this module. Few exceptions are strict optional status
and functools.lru_cache.

---
## __init__
```python
from typestate import __init__
```



---
## is_assumed_subtype
```python
from typestate import is_assumed_subtype
```



---
## is_assumed_proper_subtype
```python
from typestate import is_assumed_proper_subtype
```



---
## get_assumptions
```python
from typestate import get_assumptions
```



---
## reset_all_subtype_caches
```python
from typestate import reset_all_subtype_caches
```

Completely reset all known subtype caches.

---
## reset_subtype_caches_for
```python
from typestate import reset_subtype_caches_for
```

Reset subtype caches (if any) for a given supertype TypeInfo.

---
## reset_all_subtype_caches_for
```python
from typestate import reset_all_subtype_caches_for
```

Reset subtype caches (if any) for a given supertype TypeInfo and its MRO.

---
## is_cached_subtype_check
```python
from typestate import is_cached_subtype_check
```



---
## is_cached_negative_subtype_check
```python
from typestate import is_cached_negative_subtype_check
```



---
## record_subtype_cache_entry
```python
from typestate import record_subtype_cache_entry
```



---
## record_negative_subtype_cache_entry
```python
from typestate import record_negative_subtype_cache_entry
```



---
## reset_protocol_deps
```python
from typestate import reset_protocol_deps
```

Reset dependencies after a full run or before a daemon shutdown.

---
## record_protocol_subtype_check
```python
from typestate import record_protocol_subtype_check
```



---
## _snapshot_protocol_deps
```python
from typestate import _snapshot_protocol_deps
```

Collect protocol attribute dependencies found so far from registered subtype checks.

There are three kinds of protocol dependencies. For example, after a subtype check:

    x: Proto = C()

the following dependencies will be generated:
    1. ..., <SuperProto[wildcard]>, <Proto[wildcard]> -> <Proto>
    2. ..., <B.attr>, <C.attr> -> <C> [for every attr in Proto members]
    3. <C> -> Proto  # this one to invalidate the subtype cache

The first kind is generated immediately per-module in deps.py (see also an example there
for motivation why it is needed). While two other kinds are generated here after all
modules are type checked and we have recorded all the subtype checks. To understand these
two kinds, consider a simple example:

    class A:
        def __iter__(self) -> Iterator[int]:
            ...

    it: Iterable[int] = A()

We add <a.A.__iter__> -> <a.A> to invalidate the assignment (module target in this case),
whenever the signature of a.A.__iter__ changes. We also add <a.A> -> typing.Iterable,
to invalidate the subtype caches of the latter. (Note that the same logic applies to
proper subtype checks, and calculating meets and joins, if this involves calling
'subtypes.is_protocol_implementation').

---
## update_protocol_deps
```python
from typestate import update_protocol_deps
```

Update global protocol dependency map.

We update the global map incrementally, using a snapshot only from recently
type checked types. If second_map is given, update it as well. This is currently used
by FineGrainedBuildManager that maintains normal (non-protocol) dependencies.

---
## add_all_protocol_deps
```python
from typestate import add_all_protocol_deps
```

Add all known protocol dependencies to deps.

This is used by tests and debug output, and also when collecting
all collected or loaded dependencies as part of build.

---
## __name__
```python
from strconv import __name__
```

Conversion of parse tree nodes to strings.

---
## StrConv
```python
from strconv import StrConv
```

Visitor for converting a node to a human-readable string.

For example, an MypyFile node from program '1' is converted into
something like this:

  MypyFile:1(
    fnam
    ExpressionStmt:1(
      IntExpr(1)))

---
## dump_tagged
```python
from strconv import dump_tagged
```

Convert an array into a pretty-printed multiline string representation.

The format is
  tag(
    item1..
    itemN)
Individual items are formatted like this:
 - arrays are flattened
 - pairs (str, array) are converted recursively, so that str is the tag
 - other items are converted to strings and indented

---
## indent
```python
from strconv import indent
```

Indent all the lines in s (separated by newlines) by n spaces.

---
## __init__
```python
from strconv import __init__
```



---
## stringify_type
```python
from strconv import stringify_type
```



---
## get_id
```python
from strconv import get_id
```



---
## format_id
```python
from strconv import format_id
```



---
## dump
```python
from strconv import dump
```

Convert a list of items to a multiline pretty-printed string.

The tag is produced from the type name of obj and its line
number. See mypy.util.dump_tagged for a description of the nodes
argument.

---
## func_helper
```python
from strconv import func_helper
```

Return a list in a format suitable for dump() that represents the
arguments and the body of a function. The caller can then decorate the
array with information specific to methods, global functions or
anonymous functions.

---
## visit_mypy_file
```python
from strconv import visit_mypy_file
```



---
## visit_import
```python
from strconv import visit_import
```



---
## visit_import_from
```python
from strconv import visit_import_from
```



---
## visit_import_all
```python
from strconv import visit_import_all
```



---
## visit_func_def
```python
from strconv import visit_func_def
```



---
## visit_overloaded_func_def
```python
from strconv import visit_overloaded_func_def
```



---
## visit_class_def
```python
from strconv import visit_class_def
```



---
## visit_var
```python
from strconv import visit_var
```



---
## visit_global_decl
```python
from strconv import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from strconv import visit_nonlocal_decl
```



---
## visit_decorator
```python
from strconv import visit_decorator
```



---
## visit_block
```python
from strconv import visit_block
```



---
## visit_expression_stmt
```python
from strconv import visit_expression_stmt
```



---
## visit_assignment_stmt
```python
from strconv import visit_assignment_stmt
```



---
## visit_operator_assignment_stmt
```python
from strconv import visit_operator_assignment_stmt
```



---
## visit_while_stmt
```python
from strconv import visit_while_stmt
```



---
## visit_for_stmt
```python
from strconv import visit_for_stmt
```



---
## visit_return_stmt
```python
from strconv import visit_return_stmt
```



---
## visit_if_stmt
```python
from strconv import visit_if_stmt
```



---
## visit_break_stmt
```python
from strconv import visit_break_stmt
```



---
## visit_continue_stmt
```python
from strconv import visit_continue_stmt
```



---
## visit_pass_stmt
```python
from strconv import visit_pass_stmt
```



---
## visit_raise_stmt
```python
from strconv import visit_raise_stmt
```



---
## visit_assert_stmt
```python
from strconv import visit_assert_stmt
```



---
## visit_await_expr
```python
from strconv import visit_await_expr
```



---
## visit_del_stmt
```python
from strconv import visit_del_stmt
```



---
## visit_try_stmt
```python
from strconv import visit_try_stmt
```



---
## visit_with_stmt
```python
from strconv import visit_with_stmt
```



---
## visit_match_stmt
```python
from strconv import visit_match_stmt
```



---
## visit_type_alias_stmt
```python
from strconv import visit_type_alias_stmt
```



---
## type_param
```python
from strconv import type_param
```



---
## visit_int_expr
```python
from strconv import visit_int_expr
```



---
## visit_str_expr
```python
from strconv import visit_str_expr
```



---
## visit_bytes_expr
```python
from strconv import visit_bytes_expr
```



---
## str_repr
```python
from strconv import str_repr
```



---
## visit_float_expr
```python
from strconv import visit_float_expr
```



---
## visit_complex_expr
```python
from strconv import visit_complex_expr
```



---
## visit_ellipsis
```python
from strconv import visit_ellipsis
```



---
## visit_star_expr
```python
from strconv import visit_star_expr
```



---
## visit_name_expr
```python
from strconv import visit_name_expr
```



---
## pretty_name
```python
from strconv import pretty_name
```



---
## visit_member_expr
```python
from strconv import visit_member_expr
```



---
## visit_yield_expr
```python
from strconv import visit_yield_expr
```



---
## visit_yield_from_expr
```python
from strconv import visit_yield_from_expr
```



---
## visit_call_expr
```python
from strconv import visit_call_expr
```



---
## visit_op_expr
```python
from strconv import visit_op_expr
```



---
## visit_comparison_expr
```python
from strconv import visit_comparison_expr
```



---
## visit_cast_expr
```python
from strconv import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from strconv import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from strconv import visit_reveal_expr
```



---
## visit_assignment_expr
```python
from strconv import visit_assignment_expr
```



---
## visit_unary_expr
```python
from strconv import visit_unary_expr
```



---
## visit_list_expr
```python
from strconv import visit_list_expr
```



---
## visit_dict_expr
```python
from strconv import visit_dict_expr
```



---
## visit_set_expr
```python
from strconv import visit_set_expr
```



---
## visit_tuple_expr
```python
from strconv import visit_tuple_expr
```



---
## visit_index_expr
```python
from strconv import visit_index_expr
```



---
## visit_super_expr
```python
from strconv import visit_super_expr
```



---
## visit_type_application
```python
from strconv import visit_type_application
```



---
## visit_type_var_expr
```python
from strconv import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from strconv import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from strconv import visit_type_var_tuple_expr
```



---
## visit_type_alias_expr
```python
from strconv import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from strconv import visit_namedtuple_expr
```



---
## visit_enum_call_expr
```python
from strconv import visit_enum_call_expr
```



---
## visit_typeddict_expr
```python
from strconv import visit_typeddict_expr
```



---
## visit__promote_expr
```python
from strconv import visit__promote_expr
```



---
## visit_newtype_expr
```python
from strconv import visit_newtype_expr
```



---
## visit_lambda_expr
```python
from strconv import visit_lambda_expr
```



---
## visit_generator_expr
```python
from strconv import visit_generator_expr
```



---
## visit_list_comprehension
```python
from strconv import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from strconv import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from strconv import visit_dictionary_comprehension
```



---
## visit_conditional_expr
```python
from strconv import visit_conditional_expr
```



---
## visit_slice_expr
```python
from strconv import visit_slice_expr
```



---
## visit_temp_node
```python
from strconv import visit_temp_node
```



---
## visit_as_pattern
```python
from strconv import visit_as_pattern
```



---
## visit_or_pattern
```python
from strconv import visit_or_pattern
```



---
## visit_value_pattern
```python
from strconv import visit_value_pattern
```



---
## visit_singleton_pattern
```python
from strconv import visit_singleton_pattern
```



---
## visit_sequence_pattern
```python
from strconv import visit_sequence_pattern
```



---
## visit_starred_pattern
```python
from strconv import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from strconv import visit_mapping_pattern
```



---
## visit_class_pattern
```python
from strconv import visit_class_pattern
```



---
## console_entry
```python
from __main__ import console_entry
```



---
## __name__
```python
from scope import __name__
```

Module for scope operations

---
## Scope
```python
from scope import Scope
```

Object to hold scope, with a few bells to deal with some custom syntax
and contexts added by pandas.

Parameters
----------
level : int
global_dict : dict or None, optional, default None
local_dict : dict or Scope or None, optional, default None
resolvers : list-like or None, optional, default None
target : object

Attributes
----------
level : int
scope : DeepChainMap
target : object
temps : dict

---
## __init__
```python
from scope import __init__
```



---
## current_module_id
```python
from scope import current_module_id
```



---
## current_target
```python
from scope import current_target
```

Return the current target (non-class; for a class return enclosing module).

---
## current_full_target
```python
from scope import current_full_target
```

Return the current target (may be a class).

---
## current_type_name
```python
from scope import current_type_name
```

Return the current type's short name if it exists

---
## current_function_name
```python
from scope import current_function_name
```

Return the current function's short name if it exists

---
## module_scope
```python
from scope import module_scope
```



---
## function_scope
```python
from scope import function_scope
```



---
## outer_functions
```python
from scope import outer_functions
```



---
## enter_class
```python
from scope import enter_class
```

Enter a class target scope.

---
## leave_class
```python
from scope import leave_class
```

Leave a class target scope.

---
## class_scope
```python
from scope import class_scope
```



---
## save
```python
from scope import save
```

Produce a saved scope that can be entered with saved_scope()

---
## saved_scope
```python
from scope import saved_scope
```



---
## Reports
```python
from report import Reports
```



---
## AbstractReporter
```python
from report import AbstractReporter
```



---
## register_reporter
```python
from report import register_reporter
```



---
## alias_reporter
```python
from report import alias_reporter
```



---
## should_skip_path
```python
from report import should_skip_path
```



---
## iterate_python_lines
```python
from report import iterate_python_lines
```

Return an iterator over (line number, line text) from a Python file.

---
## FuncCounterVisitor
```python
from report import FuncCounterVisitor
```



---
## LineCountReporter
```python
from report import LineCountReporter
```



---
## AnyExpressionsReporter
```python
from report import AnyExpressionsReporter
```

Report frequencies of different kinds of Any types.

---
## LineCoverageVisitor
```python
from report import LineCoverageVisitor
```



---
## LineCoverageReporter
```python
from report import LineCoverageReporter
```

Exact line coverage reporter.

This reporter writes a JSON dictionary with one field 'lines' to
the file 'coverage.json' in the specified report directory. The
value of that field is a dictionary which associates to each
source file's absolute pathname the list of line numbers that
belong to typed functions in that file.

---
## FileInfo
```python
from report import FileInfo
```



---
## MemoryXmlReporter
```python
from report import MemoryXmlReporter
```

Internal reporter that generates XML in memory.

This is used by all other XML-based reporters to avoid duplication.

---
## get_line_rate
```python
from report import get_line_rate
```



---
## CoberturaPackage
```python
from report import CoberturaPackage
```

Container for XML and statistics mapping python modules to Cobertura package.

---
## CoberturaXmlReporter
```python
from report import CoberturaXmlReporter
```

Reporter for generating Cobertura compliant XML.

---
## AbstractXmlReporter
```python
from report import AbstractXmlReporter
```

Internal abstract class for reporters that work via XML.

---
## XmlReporter
```python
from report import XmlReporter
```

Public reporter that exports XML.

The produced XML files contain a reference to the absolute path
of the html transform, so they will be locally viewable in a browser.

However, there is a bug in Chrome and all other WebKit-based browsers
that makes it fail from file:// URLs but work on http:// URLs.

---
## XsltHtmlReporter
```python
from report import XsltHtmlReporter
```

Public reporter that exports HTML via XSLT.

This is slightly different than running `xsltproc` on the .xml files,
because it passes a parameter to rewrite the links.

---
## XsltTxtReporter
```python
from report import XsltTxtReporter
```

Public reporter that exports TXT via XSLT.

Currently this only does the summary, not the individual reports.

---
## LinePrecisionReporter
```python
from report import LinePrecisionReporter
```

Report per-module line counts for typing precision.

Each line is classified into one of these categories:

* precise (fully type checked)
* imprecise (Any types in a type component, such as List[Any])
* any (something with an Any type, implicit or explicit)
* empty (empty line, comment or docstring)
* unanalyzed (mypy considers line unreachable)

The meaning of these categories varies slightly depending on
context.

---
## __init__
```python
from report import __init__
```



---
## add_report
```python
from report import add_report
```



---
## file
```python
from report import file
```



---
## finish
```python
from report import finish
```



---
## on_file
```python
from report import on_file
```



---
## on_finish
```python
from report import on_finish
```



---
## visit_func_def
```python
from report import visit_func_def
```



---
## _write_out_report
```python
from report import _write_out_report
```



---
## _report_any_exprs
```python
from report import _report_any_exprs
```



---
## _report_types_of_anys
```python
from report import _report_types_of_anys
```



---
## indentation_level
```python
from report import indentation_level
```

Return the indentation of a line of the source (specified by
zero-indexed line number). Returns None for blank lines or comments.

---
## total
```python
from report import total
```



---
## attrib
```python
from report import attrib
```



---
## _get_any_info_for_line
```python
from report import _get_any_info_for_line
```



---
## as_xml
```python
from report import as_xml
```



---
## add_packages
```python
from report import add_packages
```



---
## __name__
```python
from fixup import __name__
```

Fix up various things after deserialization.

---
## fixup_module
```python
from fixup import fixup_module
```



---
## NodeFixer
```python
from fixup import NodeFixer
```



---
## TypeFixer
```python
from fixup import TypeFixer
```



---
## lookup_fully_qualified_typeinfo
```python
from fixup import lookup_fully_qualified_typeinfo
```



---
## lookup_fully_qualified_alias
```python
from fixup import lookup_fully_qualified_alias
```



---
## missing_info
```python
from fixup import missing_info
```



---
## missing_alias
```python
from fixup import missing_alias
```



---
## __init__
```python
from fixup import __init__
```



---
## visit_type_info
```python
from fixup import visit_type_info
```



---
## visit_symbol_table
```python
from fixup import visit_symbol_table
```



---
## visit_func_def
```python
from fixup import visit_func_def
```



---
## visit_overloaded_func_def
```python
from fixup import visit_overloaded_func_def
```



---
## visit_decorator
```python
from fixup import visit_decorator
```



---
## visit_class_def
```python
from fixup import visit_class_def
```



---
## visit_type_var_expr
```python
from fixup import visit_type_var_expr
```



---
## visit_paramspec_expr
```python
from fixup import visit_paramspec_expr
```



---
## visit_type_var_tuple_expr
```python
from fixup import visit_type_var_tuple_expr
```



---
## visit_var
```python
from fixup import visit_var
```



---
## visit_type_alias
```python
from fixup import visit_type_alias
```



---
## visit_instance
```python
from fixup import visit_instance
```



---
## visit_type_alias_type
```python
from fixup import visit_type_alias_type
```



---
## visit_any
```python
from fixup import visit_any
```



---
## visit_callable_type
```python
from fixup import visit_callable_type
```



---
## visit_overloaded
```python
from fixup import visit_overloaded
```



---
## visit_erased_type
```python
from fixup import visit_erased_type
```



---
## visit_deleted_type
```python
from fixup import visit_deleted_type
```



---
## visit_none_type
```python
from fixup import visit_none_type
```



---
## visit_uninhabited_type
```python
from fixup import visit_uninhabited_type
```



---
## visit_partial_type
```python
from fixup import visit_partial_type
```



---
## visit_tuple_type
```python
from fixup import visit_tuple_type
```



---
## visit_typeddict_type
```python
from fixup import visit_typeddict_type
```



---
## visit_literal_type
```python
from fixup import visit_literal_type
```



---
## visit_type_var
```python
from fixup import visit_type_var
```



---
## visit_param_spec
```python
from fixup import visit_param_spec
```



---
## visit_type_var_tuple
```python
from fixup import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from fixup import visit_unpack_type
```



---
## visit_parameters
```python
from fixup import visit_parameters
```



---
## visit_unbound_type
```python
from fixup import visit_unbound_type
```



---
## visit_union_type
```python
from fixup import visit_union_type
```



---
## visit_type_type
```python
from fixup import visit_type_type
```



---
## __name__
```python
from checker import __name__
```

Mypy type checker.

---
## DeferredNode
```python
from checker import DeferredNode
```



---
## FineGrainedDeferredNode
```python
from checker import FineGrainedDeferredNode
```



---
## TypeRange
```python
from checker import TypeRange
```



---
## PartialTypeScope
```python
from checker import PartialTypeScope
```



---
## TypeChecker
```python
from checker import TypeChecker
```

Mypy type checker.

Type check mypy source files that have been semantically analyzed.

You must create a separate instance for each source file.

---
## CollectArgTypeVarTypes
```python
from checker import CollectArgTypeVarTypes
```

Collects the non-nested argument types in a set.

---
## conditional_types
```python
from checker import conditional_types
```

Takes in the current type and a proposed type of an expression.

Returns a 2-tuple: The first element is the proposed type, if the expression
can be the proposed type. The second element is the type it would hold
if it was not the proposed type, if any. UninhabitedType means unreachable.
None means no new information can be inferred. If default is set it is returned
instead.

---
## conditional_types_to_typemaps
```python
from checker import conditional_types_to_typemaps
```



---
## gen_unique_name
```python
from checker import gen_unique_name
```

Generate a name that does not appear in table by appending numbers to base.

---
## is_true_literal
```python
from checker import is_true_literal
```

Returns true if this expression is the 'True' literal/keyword.

---
## is_false_literal
```python
from checker import is_false_literal
```

Returns true if this expression is the 'False' literal/keyword.

---
## is_literal_none
```python
from checker import is_literal_none
```

Returns true if this expression is the 'None' literal/keyword.

---
## is_literal_not_implemented
```python
from checker import is_literal_not_implemented
```



---
## _is_empty_generator_function
```python
from checker import _is_empty_generator_function
```

Checks whether a function's body is 'return; yield' (the yield being added only
to promote the function into a generator function).

---
## builtin_item_type
```python
from checker import builtin_item_type
```

Get the item type of a builtin container.

If 'tp' is not one of the built containers (these includes NamedTuple and TypedDict)
or if the container is not parameterized (like List or List[Any])
return None. This function is used to narrow optional types in situations like this:

    x: Optional[int]
    if x in (1, 2, 3):
        x + 42  # OK

Note: this is only OK for built-in containers, where we know the behavior
of __contains__.

---
## and_conditional_maps
```python
from checker import and_conditional_maps
```

Calculate what information we can learn from the truth of (e1 and e2)
in terms of the information that we can learn from the truth of e1 and
the truth of e2.

---
## or_conditional_maps
```python
from checker import or_conditional_maps
```

Calculate what information we can learn from the truth of (e1 or e2)
in terms of the information that we can learn from the truth of e1 and
the truth of e2. If coalesce_any is True, consider Any a supertype when
joining restrictions.

---
## reduce_conditional_maps
```python
from checker import reduce_conditional_maps
```

Reduces a list containing pairs of if/else TypeMaps into a single pair.

We "and" together all of the if TypeMaps and "or" together the else TypeMaps. So
for example, if we had the input:

    [
        ({x: TypeIfX, shared: TypeIfShared1}, {x: TypeElseX, shared: TypeElseShared1}),
        ({y: TypeIfY, shared: TypeIfShared2}, {y: TypeElseY, shared: TypeElseShared2}),
    ]

...we'd return the output:

    (
        {x: TypeIfX,   y: TypeIfY,   shared: PseudoIntersection[TypeIfShared1, TypeIfShared2]},
        {shared: Union[TypeElseShared1, TypeElseShared2]},
    )

...where "PseudoIntersection[X, Y] == Y" because mypy actually doesn't understand intersections
yet, so we settle for just arbitrarily picking the right expr's type.

We only retain the shared expression in the 'else' case because we don't actually know
whether x was refined or y was refined -- only just that one of the two was refined.

---
## convert_to_typetype
```python
from checker import convert_to_typetype
```



---
## flatten
```python
from checker import flatten
```

Flatten a nested sequence of tuples/lists into one list of nodes.

---
## flatten_types
```python
from checker import flatten_types
```

Flatten a nested sequence of tuples into one list of nodes.

---
## expand_func
```python
from checker import expand_func
```



---
## TypeTransformVisitor
```python
from checker import TypeTransformVisitor
```



---
## are_argument_counts_overlapping
```python
from checker import are_argument_counts_overlapping
```

Can a single call match both t and s, based just on positional argument counts?

---
## expand_callable_variants
```python
from checker import expand_callable_variants
```

Expand a generic callable using all combinations of type variables' values/bounds.

---
## is_unsafe_overlapping_overload_signatures
```python
from checker import is_unsafe_overlapping_overload_signatures
```

Check if two overloaded signatures are unsafely overlapping or partially overlapping.

We consider two functions 's' and 't' to be unsafely overlapping if three
conditions hold:

1.  s's parameters are partially overlapping with t's. i.e. there are calls that are
    valid for both signatures.
2.  for these common calls, some of t's parameters types are wider that s's.
3.  s's return type is NOT a subset of t's.

Note that we use subset rather than subtype relationship in these checks because:
* Overload selection happens at runtime, not statically.
* This results in more lenient behavior.
This can cause false negatives (e.g. if overloaded function returns an externally
visible attribute with invariant type), but such situations are rare. In general,
overloads in Python are generally unsafe, so we intentionally try to avoid giving
non-actionable errors (see more details in comments below).

Assumes that 'signature' appears earlier in the list of overload
alternatives then 'other' and that their argument counts are overlapping.

---
## detach_callable
```python
from checker import detach_callable
```

Ensures that the callable's type variables are 'detached' and independent of the context.

A callable normally keeps track of the type variables it uses within its 'variables' field.
However, if the callable is from a method and that method is using a class type variable,
the callable will not keep track of that type variable since it belongs to the class.

---
## overload_can_never_match
```python
from checker import overload_can_never_match
```

Check if the 'other' method can never be matched due to 'signature'.

This can happen if signature's parameters are all strictly broader then
other's parameters.

Assumes that both signatures have overlapping argument counts.

---
## is_more_general_arg_prefix
```python
from checker import is_more_general_arg_prefix
```

Does t have wider arguments than s?

---
## is_same_arg_prefix
```python
from checker import is_same_arg_prefix
```



---
## infer_operator_assignment_method
```python
from checker import infer_operator_assignment_method
```

Determine if operator assignment on given value type is in-place, and the method name.

For example, if operator is '+', return (True, '__iadd__') or (False, '__add__')
depending on which method is supported by the type.

---
## _find_inplace_method
```python
from checker import _find_inplace_method
```



---
## is_valid_inferred_type
```python
from checker import is_valid_inferred_type
```

Is an inferred type valid and needs no further refinement?

Examples of invalid types include the None type (when we are not assigning
None to a final lvalue) or List[<uninhabited>].

When not doing strict Optional checking, all types containing None are
invalid.  When doing strict Optional checking, only None and types that are
incompletely defined (i.e. contain UninhabitedType) are invalid.

---
## InvalidInferredTypes
```python
from checker import InvalidInferredTypes
```

Find type components that are not valid for an inferred type.

These include <Erased> type, and any uninhabited types resulting from failed
(ambiguous) type inference.

---
## SetNothingToAny
```python
from checker import SetNothingToAny
```

Replace all ambiguous Uninhabited types with Any (to avoid spurious extra errors).

---
## is_node_static
```python
from checker import is_node_static
```

Find out if a node describes a static function method.

---
## CheckerScope
```python
from checker import CheckerScope
```



---
## DisjointDict
```python
from checker import DisjointDict
```

An variation of the union-find algorithm/data structure where instead of keeping
track of just disjoint sets, we keep track of disjoint dicts -- keep track of multiple
Set[Key] -> Set[Value] mappings, where each mapping's keys are guaranteed to be disjoint.

This data structure is currently used exclusively by 'group_comparison_operands' below
to merge chains of '==' and 'is' comparisons when two or more chains use the same expression
in best-case O(n), where n is the number of operands.

Specifically, the `add_mapping()` function and `items()` functions will take on average
O(k + v) and O(n) respectively, where k and v are the number of keys and values we're adding
for a given chain. Note that k <= n and v <= n.

We hit these average/best-case scenarios for most user code: e.g. when the user has just
a single chain like 'a == b == c == d == ...' or multiple disjoint chains like
'a==b < c==d < e==f < ...'. (Note that a naive iterative merging would be O(n^2) for
the latter case).

In comparison, this data structure will make 'group_comparison_operands' have a worst-case
runtime of O(n*log(n)): 'add_mapping()' and 'items()' are worst-case O(k*log(n) + v) and
O(k*log(n)) respectively. This happens only in the rare case where the user keeps repeatedly
making disjoint mappings before merging them in a way that persistently dodges the path
compression optimization in '_lookup_root_id', which would end up constructing a single
tree of height log_2(n). This makes root lookups no longer amoritized constant time when we
finally call 'items()'.

---
## group_comparison_operands
```python
from checker import group_comparison_operands
```

Group a series of comparison operands together chained by any operand
in the 'operators_to_group' set. All other pairwise operands are kept in
groups of size 2.

For example, suppose we have the input comparison expression:

    x0 == x1 == x2 < x3 < x4 is x5 is x6 is not x7 is not x8

If we get these expressions in a pairwise way (e.g. by calling ComparisionExpr's
'pairwise()' method), we get the following as input:

    [('==', x0, x1), ('==', x1, x2), ('<', x2, x3), ('<', x3, x4),
     ('is', x4, x5), ('is', x5, x6), ('is not', x6, x7), ('is not', x7, x8)]

If `operators_to_group` is the set {'==', 'is'}, this function will produce
the following "simplified operator list":

   [("==", [0, 1, 2]), ("<", [2, 3]), ("<", [3, 4]),
    ("is", [4, 5, 6]), ("is not", [6, 7]), ("is not", [7, 8])]

Note that (a) we yield *indices* to the operands rather then the operand
expressions themselves and that (b) operands used in a consecutive chain
of '==' or 'is' are grouped together.

If two of these chains happen to contain operands with the same underlying
literal hash (e.g. are assignable and correspond to the same expression),
we combine those chains together. For example, if we had:

    same == x < y == same

...and if 'operand_to_literal_hash' contained the same values for the indices
0 and 3, we'd produce the following output:

    [("==", [0, 1, 2, 3]), ("<", [1, 2])]

But if the 'operand_to_literal_hash' did *not* contain an entry, we'd instead
default to returning:

    [("==", [0, 1]), ("<", [1, 2]), ("==", [2, 3])]

This function is currently only used to assist with type-narrowing refinements
and is extracted out to a helper function so we can unit test it.

---
## is_typed_callable
```python
from checker import is_typed_callable
```



---
## is_untyped_decorator
```python
from checker import is_untyped_decorator
```



---
## is_static
```python
from checker import is_static
```



---
## is_property
```python
from checker import is_property
```



---
## get_property_type
```python
from checker import get_property_type
```



---
## is_subset_no_promote
```python
from checker import is_subset_no_promote
```



---
## is_overlapping_types_for_overload
```python
from checker import is_overlapping_types_for_overload
```



---
## is_private
```python
from checker import is_private
```

Check if node is private to class definition.

---
## is_string_literal
```python
from checker import is_string_literal
```



---
## has_bool_item
```python
from checker import has_bool_item
```

Return True if type is 'bool' or a union with a 'bool' item.

---
## collapse_walrus
```python
from checker import collapse_walrus
```

If an expression is an AssignmentExpr, pull out the assignment target.

We don't make any attempt to pull out all the targets in code like `x := (y := z)`.
We could support narrowing those if that sort of code turns out to be common.

---
## find_last_var_assignment_line
```python
from checker import find_last_var_assignment_line
```

Find the highest line number of a potential assignment to variable within node.

This supports local and global variables.

Return -1 if no assignment was found.

---
## VarAssignVisitor
```python
from checker import VarAssignVisitor
```



---
## __init__
```python
from checker import __init__
```



---
## type_context
```python
from checker import type_context
```



---
## reset
```python
from checker import reset
```

Cleanup stale state that might be left over from a typechecking run.

This allows us to reuse TypeChecker objects in fine-grained
incremental mode.

---
## check_first_pass
```python
from checker import check_first_pass
```

Type check the entire file, but defer functions with unresolved references.

Unresolved references are forward references to variables
whose types haven't been inferred yet.  They may occur later
in the same file or in a different file that's being processed
later (usually due to an import cycle).

Deferred functions will be processed by check_second_pass().

---
## check_second_pass
```python
from checker import check_second_pass
```

Run second or following pass of type checking.

This goes through deferred nodes, returning True if there were any.

---
## check_partial
```python
from checker import check_partial
```



---
## check_top_level
```python
from checker import check_top_level
```

Check only the top-level of a module, skipping function definitions.

---
## defer_node
```python
from checker import defer_node
```

Defer a node for processing during next type-checking pass.

Args:
    node: function/method being deferred
    enclosing_class: for methods, the class where the method is defined
NOTE: this can't handle nested functions/methods.

---
## handle_cannot_determine_type
```python
from checker import handle_cannot_determine_type
```



---
## accept
```python
from checker import accept
```

Type check a node in the given type context.

---
## accept_loop
```python
from checker import accept_loop
```

Repeatedly type check a loop body until the frame doesn't change.
If exit_condition is set, assume it must be False on exit from the loop.

Then check the else_body.

---
## visit_overloaded_func_def
```python
from checker import visit_overloaded_func_def
```



---
## _visit_overloaded_func_def
```python
from checker import _visit_overloaded_func_def
```



---
## extract_callable_type
```python
from checker import extract_callable_type
```

Get type as seen by an overload item caller.

---
## check_overlapping_overloads
```python
from checker import check_overlapping_overloads
```



---
## is_generator_return_type
```python
from checker import is_generator_return_type
```

Is `typ` a valid type for a generator/coroutine?

True if `typ` is a *supertype* of Generator or Awaitable.
Also true it it's *exactly* AwaitableGenerator (modulo type parameters).

---
## is_async_generator_return_type
```python
from checker import is_async_generator_return_type
```

Is `typ` a valid type for an async generator?

True if `typ` is a supertype of AsyncGenerator.

---
## get_generator_yield_type
```python
from checker import get_generator_yield_type
```

Given the declared return type of a generator (t), return the type it yields (ty).

---
## get_generator_receive_type
```python
from checker import get_generator_receive_type
```

Given a declared generator return type (t), return the type its yield receives (tc).

---
## get_coroutine_return_type
```python
from checker import get_coroutine_return_type
```



---
## get_generator_return_type
```python
from checker import get_generator_return_type
```

Given the declared return type of a generator (t), return the type it returns (tr).

---
## visit_func_def
```python
from checker import visit_func_def
```



---
## _visit_func_def
```python
from checker import _visit_func_def
```

Type check a function definition.

---
## check_func_item
```python
from checker import check_func_item
```

Type check a function.

If type_override is provided, use it as the function type.

---
## enter_attribute_inference_context
```python
from checker import enter_attribute_inference_context
```



---
## check_func_def
```python
from checker import check_func_def
```

Type check a function definition.

---
## is_var_redefined_in_outer_context
```python
from checker import is_var_redefined_in_outer_context
```

Can the variable be assigned to at module top level or outer function?

Note that this doesn't do a full CFG analysis but uses a line number based
heuristic that isn't correct in some (rare) cases.

---
## check_unbound_return_typevar
```python
from checker import check_unbound_return_typevar
```

Fails when the return typevar is not defined in arguments.

---
## check_default_args
```python
from checker import check_default_args
```



---
## is_forward_op_method
```python
from checker import is_forward_op_method
```



---
## is_reverse_op_method
```python
from checker import is_reverse_op_method
```



---
## check_for_missing_annotations
```python
from checker import check_for_missing_annotations
```



---
## check___new___signature
```python
from checker import check___new___signature
```



---
## check_reverse_op_method
```python
from checker import check_reverse_op_method
```

Check a reverse operator method such as __radd__.

---
## check_overlapping_op_methods
```python
from checker import check_overlapping_op_methods
```

Check for overlapping method and reverse method signatures.

This function assumes that:

-   The reverse method has valid argument count and kinds.
-   If the reverse operator method accepts some argument of type
    X, the forward operator method also belong to class X.

    For example, if we have the reverse operator `A.__radd__(B)`, then the
    corresponding forward operator must have the type `B.__add__(...)`.

---
## is_unsafe_overlapping_op
```python
from checker import is_unsafe_overlapping_op
```



---
## check_inplace_operator_method
```python
from checker import check_inplace_operator_method
```

Check an inplace operator method such as __iadd__.

They cannot arbitrarily overlap with __add__.

---
## check_getattr_method
```python
from checker import check_getattr_method
```



---
## check_setattr_method
```python
from checker import check_setattr_method
```



---
## check_slots_definition
```python
from checker import check_slots_definition
```

Check the type of __slots__.

---
## check_match_args
```python
from checker import check_match_args
```

Check that __match_args__ contains literal strings

---
## expand_typevars
```python
from checker import expand_typevars
```



---
## check_explicit_override_decorator
```python
from checker import check_explicit_override_decorator
```



---
## check_method_override
```python
from checker import check_method_override
```

Check if function definition is compatible with base classes.

This may defer the method if a signature is not available in at least one base class.
Return ``None`` if that happens.

Return a list of base classes which contain an attribute with the method name.

---
## check_method_or_accessor_override_for_base
```python
from checker import check_method_or_accessor_override_for_base
```

Check if method definition is compatible with a base class.

Return ``None`` if the node was deferred because one of the corresponding
superclass nodes is not ready.

Return ``True`` if an attribute with the method name was found in the base class.

---
## check_method_override_for_base_with_name
```python
from checker import check_method_override_for_base_with_name
```

Check if overriding an attribute `name` of `base` with `defn` is valid.

Return True if the supertype node was not analysed yet, and `defn` was deferred.

---
## bind_and_map_method
```python
from checker import bind_and_map_method
```

Bind self-type and map type variables for a method.

Arguments:
    sym: a symbol that points to method definition
    typ: method type on the definition
    sub_info: class where the method is used
    super_info: class where the method was defined

---
## get_op_other_domain
```python
from checker import get_op_other_domain
```



---
## check_override
```python
from checker import check_override
```

Check a method override with given signatures.

Arguments:
  override:                 The signature of the overriding method.
  original:                 The signature of the original supertype method.
  name:                     The name of the overriding method.
                            Used primarily for generating error messages.
  name_in_super:            The name of the overridden in the superclass.
                            Used for generating error messages only.
  supertype:                The name of the supertype.
  original_class_or_static: Indicates whether the original method (from the superclass)
                            is either a class method or a static method.
  override_class_or_static: Indicates whether the overriding method (from the subclass)
                            is either a class method or a static method.
  node:                     Context node.

---
## check__exit__return_type
```python
from checker import check__exit__return_type
```

Generate error if the return type of __exit__ is problematic.

If __exit__ always returns False but the return type is declared
as bool, mypy thinks that a with statement may "swallow"
exceptions even though this is not the case, resulting in
invalid reachability inference.

---
## visit_class_def
```python
from checker import visit_class_def
```

Type check a class definition.

---
## check_final_deletable
```python
from checker import check_final_deletable
```



---
## check_init_subclass
```python
from checker import check_init_subclass
```

Check that keywords in a class definition are valid arguments for __init_subclass__().

In this example:
    1   class Base:
    2       def __init_subclass__(cls, thing: int):
    3           pass
    4   class Child(Base, thing=5):
    5       def __init_subclass__(cls):
    6           pass
    7   Child()

Base.__init_subclass__(thing=5) is called at line 4. This is what we simulate here.
Child.__init_subclass__ is never called.

---
## check_enum
```python
from checker import check_enum
```



---
## check_final_enum
```python
from checker import check_final_enum
```



---
## is_final_enum_value
```python
from checker import is_final_enum_value
```



---
## check_enum_bases
```python
from checker import check_enum_bases
```

Non-enum mixins cannot appear after enum bases; this is disallowed at runtime:

    class Foo: ...
    class Bar(enum.Enum, Foo): ...

But any number of enum mixins can appear in a class definition
(even if multiple enum bases define __new__). So this is fine:

    class Foo(enum.Enum):
        def __new__(cls, val): ...
    class Bar(enum.Enum):
        def __new__(cls, val): ...
    class Baz(int, Foo, Bar, enum.Flag): ...

---
## check_enum_new
```python
from checker import check_enum_new
```



---
## check_protocol_variance
```python
from checker import check_protocol_variance
```

Check that protocol definition is compatible with declared
variances of type variables.

Note that we also prohibit declaring protocol classes as invariant
if they are actually covariant/contravariant, since this may break
transitivity of subtyping, see PEP 544.

---
## check_multiple_inheritance
```python
from checker import check_multiple_inheritance
```

Check for multiple inheritance related errors.

---
## determine_type_of_member
```python
from checker import determine_type_of_member
```



---
## check_compatibility
```python
from checker import check_compatibility
```

Check if attribute name in base1 is compatible with base2 in multiple inheritance.

Assume base1 comes before base2 in the MRO, and that base1 and base2 don't have
a direct subclass relationship (i.e., the compatibility requirement only derives from
multiple inheritance).

This check verifies that a definition taken from base1 (and mapped to the current
class ctx), is type compatible with the definition taken from base2 (also mapped), so
that unsafe subclassing like this can be detected:
    class A(Generic[T]):
        def foo(self, x: T) -> None: ...

    class B:
        def foo(self, x: str) -> None: ...

    class C(B, A[int]): ...  # this is unsafe because...

    x: A[int] = C()
    x.foo  # ...runtime type is (str) -> None, while static type is (int) -> None

---
## check_metaclass_compatibility
```python
from checker import check_metaclass_compatibility
```

Ensures that metaclasses of all parent types are compatible.

---
## visit_import_from
```python
from checker import visit_import_from
```



---
## visit_import_all
```python
from checker import visit_import_all
```



---
## visit_import
```python
from checker import visit_import
```



---
## check_import
```python
from checker import check_import
```



---
## visit_block
```python
from checker import visit_block
```



---
## should_report_unreachable_issues
```python
from checker import should_report_unreachable_issues
```



---
## is_noop_for_reachability
```python
from checker import is_noop_for_reachability
```

Returns 'true' if the given statement either throws an error of some kind
or is a no-op.

We use this function while handling the '--warn-unreachable' flag. When
that flag is present, we normally report an error on any unreachable statement.
But if that statement is just something like a 'pass' or a just-in-case 'assert False',
reporting an error would be annoying.

---
## visit_assignment_stmt
```python
from checker import visit_assignment_stmt
```



---
## check_type_alias_rvalue
```python
from checker import check_type_alias_rvalue
```



---
## check_assignment
```python
from checker import check_assignment
```

Type check a single assignment: lvalue = rvalue.

---
## get_variable_type_context
```python
from checker import get_variable_type_context
```



---
## try_infer_partial_generic_type_from_assignment
```python
from checker import try_infer_partial_generic_type_from_assignment
```

Try to infer a precise type for partial generic type from assignment.

'op' is '=' for normal assignment and a binary operator ('+', ...) for
augmented assignment.

Example where this happens:

    x = []
    if foo():
        x = [1]  # Infer List[int] as type of 'x'

---
## check_compatibility_all_supers
```python
from checker import check_compatibility_all_supers
```



---
## check_compatibility_super
```python
from checker import check_compatibility_super
```



---
## lvalue_type_from_base
```python
from checker import lvalue_type_from_base
```

For a NameExpr that is part of a class, walk all base classes and try
to find the first class that defines a Type for the same name.

---
## check_compatibility_classvar_super
```python
from checker import check_compatibility_classvar_super
```



---
## check_compatibility_final_super
```python
from checker import check_compatibility_final_super
```

Check if an assignment overrides a final attribute in a base class.

This only checks situations where either a node in base class is not a variable
but a final method, or where override is explicitly declared as final.
In these cases we give a more detailed error message. In addition, we check that
a final variable doesn't override writeable attribute, which is not safe.

Other situations are checked in `check_final()`.

---
## check_if_final_var_override_writable
```python
from checker import check_if_final_var_override_writable
```

Check that a final variable doesn't override writeable attribute.

This is done to prevent situations like this:
    class C:
        attr = 1
    class D(C):
        attr: Final = 2

    x: C = D()
    x.attr = 3  # Oops!

---
## get_final_context
```python
from checker import get_final_context
```

Check whether we a currently checking a final declaration.

---
## enter_final_context
```python
from checker import enter_final_context
```

Store whether the current checked assignment is a final declaration.

---
## check_final
```python
from checker import check_final
```

Check if this assignment does not assign to a final attribute.

This function performs the check only for name assignments at module
and class scope. The assignments to `obj.attr` and `Cls.attr` are checked
in checkmember.py.

---
## check_assignment_to_slots
```python
from checker import check_assignment_to_slots
```



---
## is_assignable_slot
```python
from checker import is_assignable_slot
```



---
## flatten_rvalues
```python
from checker import flatten_rvalues
```

Flatten expression list by expanding those * items that have tuple type.

For each regular type item in the tuple type use a TempNode(), for an Unpack
item use a corresponding StarExpr(TempNode()).

---
## check_assignment_to_multiple_lvalues
```python
from checker import check_assignment_to_multiple_lvalues
```



---
## check_rvalue_count_in_assignment
```python
from checker import check_rvalue_count_in_assignment
```



---
## check_multi_assignment
```python
from checker import check_multi_assignment
```

Check the assignment of one rvalue to a number of lvalues.

---
## check_multi_assignment_from_union
```python
from checker import check_multi_assignment_from_union
```

Check assignment to multiple lvalue targets when rvalue type is a Union[...].
For example:

    t: Union[Tuple[int, int], Tuple[str, str]]
    x, y = t
    reveal_type(x)  # Union[int, str]

The idea in this case is to process the assignment for every item of the union.
Important note: the types are collected in two places, 'union_types' contains
inferred types for first assignments, 'assignments' contains the narrowed types
for binder.

---
## flatten_lvalues
```python
from checker import flatten_lvalues
```



---
## check_multi_assignment_from_tuple
```python
from checker import check_multi_assignment_from_tuple
```



---
## lvalue_type_for_inference
```python
from checker import lvalue_type_for_inference
```



---
## split_around_star
```python
from checker import split_around_star
```

Splits a list of items in three to match another list of length 'length'
that contains a starred expression at 'star_index' in the following way:

star_index = 2, length = 5 (i.e., [a,b,*,c,d]), items = [1,2,3,4,5,6,7]
returns in: ([1,2], [3,4,5], [6,7])

---
## type_is_iterable
```python
from checker import type_is_iterable
```



---
## check_multi_assignment_from_iterable
```python
from checker import check_multi_assignment_from_iterable
```



---
## check_lvalue
```python
from checker import check_lvalue
```



---
## is_definition
```python
from checker import is_definition
```



---
## infer_variable_type
```python
from checker import infer_variable_type
```

Infer the type of initialized variables from initializer type.

---
## infer_partial_type
```python
from checker import infer_partial_type
```



---
## is_valid_defaultdict_partial_value_type
```python
from checker import is_valid_defaultdict_partial_value_type
```

Check if t can be used as the basis for a partial defaultdict value type.

Examples:

  * t is 'int' --> True
  * t is 'list[Never]' --> True
  * t is 'dict[...]' --> False (only generic types with a single type
    argument supported)

---
## set_inferred_type
```python
from checker import set_inferred_type
```

Store inferred variable type.

Store the type to both the variable node and the expression node that
refers to the variable (lvalue). If var is None, do nothing.

---
## set_inference_error_fallback_type
```python
from checker import set_inference_error_fallback_type
```

Store best known type for variable if type inference failed.

If a program ignores error on type inference error, the variable should get some
inferred type so that if can used later on in the program. Example:

  x = []  # type: ignore
  x.append(1)   # Should be ok!

We implement this here by giving x a valid type (replacing inferred Never with Any).

---
## inference_error_fallback_type
```python
from checker import inference_error_fallback_type
```



---
## simple_rvalue
```python
from checker import simple_rvalue
```

Returns True for expressions for which inferred type should not depend on context.

Note that this function can still return False for some expressions where inferred type
does not depend on context. It only exists for performance optimizations.

---
## check_simple_assignment
```python
from checker import check_simple_assignment
```



---
## check_member_assignment
```python
from checker import check_member_assignment
```

Type member assignment.

This defers to check_simple_assignment, unless the member expression
is a descriptor, in which case this checks descriptor semantics as well.

Return the inferred rvalue_type, inferred lvalue_type, and whether to use the binder
for this assignment.

Note: this method exists here and not in checkmember.py, because we need to take
care about interaction between binder and __set__().

---
## check_indexed_assignment
```python
from checker import check_indexed_assignment
```

Type check indexed assignment base[index] = rvalue.

The lvalue argument is the base[index] expression.

---
## try_infer_partial_type_from_indexed_assignment
```python
from checker import try_infer_partial_type_from_indexed_assignment
```



---
## type_requires_usage
```python
from checker import type_requires_usage
```

Some types require usage in all cases. The classic example is
an unused coroutine.

In the case that it does require usage, returns a note to attach
to the error message.

---
## visit_expression_stmt
```python
from checker import visit_expression_stmt
```



---
## visit_return_stmt
```python
from checker import visit_return_stmt
```

Type check a return statement.

---
## check_return_stmt
```python
from checker import check_return_stmt
```



---
## visit_if_stmt
```python
from checker import visit_if_stmt
```

Type check an if statement.

---
## visit_while_stmt
```python
from checker import visit_while_stmt
```

Type check a while statement.

---
## visit_operator_assignment_stmt
```python
from checker import visit_operator_assignment_stmt
```

Type check an operator assignment statement, e.g. x += 1.

---
## visit_assert_stmt
```python
from checker import visit_assert_stmt
```



---
## visit_raise_stmt
```python
from checker import visit_raise_stmt
```

Type check a raise statement.

---
## type_check_raise
```python
from checker import type_check_raise
```



---
## visit_try_stmt
```python
from checker import visit_try_stmt
```

Type check a try statement.

---
## visit_try_without_finally
```python
from checker import visit_try_without_finally
```

Type check a try statement, ignoring the finally block.

On entry, the top frame should receive all flow that exits the
try block abnormally (i.e., such that the else block does not
execute), and its parent should receive all flow that exits
the try block normally.

---
## check_except_handler_test
```python
from checker import check_except_handler_test
```

Type check an exception handler test clause.

---
## default_exception_type
```python
from checker import default_exception_type
```

Exception type to return in case of a previous type error.

---
## wrap_exception_group
```python
from checker import wrap_exception_group
```

Transform except* variable type into an appropriate exception group.

---
## get_types_from_except_handler
```python
from checker import get_types_from_except_handler
```

Helper for check_except_handler_test to retrieve handler types.

---
## visit_for_stmt
```python
from checker import visit_for_stmt
```



---
## analyze_async_iterable_item_type
```python
from checker import analyze_async_iterable_item_type
```

Analyse async iterable expression and return iterator and iterator item types.

---
## analyze_iterable_item_type
```python
from checker import analyze_iterable_item_type
```

Analyse iterable expression and return iterator and iterator item types.

---
## analyze_iterable_item_type_without_expression
```python
from checker import analyze_iterable_item_type_without_expression
```

Analyse iterable type and return iterator and iterator item types.

---
## analyze_range_native_int_type
```python
from checker import analyze_range_native_int_type
```

Try to infer native int item type from arguments to range(...).

For example, return i64 if the expression is "range(0, i64(n))".

Return None if unsuccessful.

---
## analyze_container_item_type
```python
from checker import analyze_container_item_type
```

Check if a type is a nominal container of a union of such.

Return the corresponding container item type.

---
## analyze_index_variables
```python
from checker import analyze_index_variables
```

Type check or infer for loop or list comprehension index vars.

---
## visit_del_stmt
```python
from checker import visit_del_stmt
```



---
## visit_decorator
```python
from checker import visit_decorator
```



---
## visit_decorator_inner
```python
from checker import visit_decorator_inner
```



---
## check_for_untyped_decorator
```python
from checker import check_for_untyped_decorator
```



---
## check_incompatible_property_override
```python
from checker import check_incompatible_property_override
```



---
## visit_with_stmt
```python
from checker import visit_with_stmt
```



---
## check_untyped_after_decorator
```python
from checker import check_untyped_after_decorator
```



---
## check_async_with_item
```python
from checker import check_async_with_item
```



---
## check_with_item
```python
from checker import check_with_item
```



---
## visit_break_stmt
```python
from checker import visit_break_stmt
```



---
## visit_continue_stmt
```python
from checker import visit_continue_stmt
```



---
## visit_match_stmt
```python
from checker import visit_match_stmt
```



---
## _get_recursive_sub_patterns_map
```python
from checker import _get_recursive_sub_patterns_map
```



---
## infer_variable_types_from_type_maps
```python
from checker import infer_variable_types_from_type_maps
```



---
## remove_capture_conflicts
```python
from checker import remove_capture_conflicts
```



---
## visit_type_alias_stmt
```python
from checker import visit_type_alias_stmt
```



---
## make_fake_typeinfo
```python
from checker import make_fake_typeinfo
```



---
## intersect_instances
```python
from checker import intersect_instances
```

Try creating an ad-hoc intersection of the given instances.

Note that this function does *not* try and create a full-fledged
intersection type. Instead, it returns an instance of a new ad-hoc
subclass of the given instances.

This is mainly useful when you need a way of representing some
theoretical subclass of the instances the user may be trying to use
the generated intersection can serve as a placeholder.

This function will create a fresh subclass every time you call it,
even if you pass in the exact same arguments. So this means calling
`self.intersect_intersection([inst_1, inst_2], ctx)` twice will result
in instances of two distinct subclasses of inst_1 and inst_2.

This is by design: we want each ad-hoc intersection to be unique since
they're supposed represent some other unknown subclass.

Returns None if creating the subclass is impossible (e.g. due to
MRO errors or incompatible signatures). If we do successfully create
a subclass, its TypeInfo will automatically be added to the global scope.

---
## intersect_instance_callable
```python
from checker import intersect_instance_callable
```

Creates a fake type that represents the intersection of an Instance and a CallableType.

It operates by creating a bare-minimum dummy TypeInfo that
subclasses type and adds a __call__ method matching callable_type.

---
## make_fake_callable
```python
from checker import make_fake_callable
```

Produce a new type that makes type Callable with a generic callable type.

---
## partition_by_callable
```python
from checker import partition_by_callable
```

Partitions a type into callable subtypes and uncallable subtypes.

Thus, given:
`callables, uncallables = partition_by_callable(type)`

If we assert `callable(type)` then `type` has type Union[*callables], and
If we assert `not callable(type)` then `type` has type Union[*uncallables]

If unsound_partition is set, assume that anything that is not
clearly callable is in fact not callable. Otherwise we generate a
new subtype that *is* callable.

Guaranteed to not return [], [].

---
## conditional_callable_type_map
```python
from checker import conditional_callable_type_map
```

Takes in an expression and the current type of the expression.

Returns a 2-tuple: The first element is a map from the expression to
the restricted type if it were callable. The second element is a
map from the expression to the type it would hold if it weren't
callable.

---
## conditional_types_for_iterable
```python
from checker import conditional_types_for_iterable
```

Narrows the type of `iterable_type` based on the type of `item_type`.
For now, we only support narrowing unions of TypedDicts based on left operand being literal string(s).

---
## _is_truthy_type
```python
from checker import _is_truthy_type
```



---
## _check_for_truthy_type
```python
from checker import _check_for_truthy_type
```



---
## find_type_equals_check
```python
from checker import find_type_equals_check
```

Narrow types based on any checks of the type ``type(x) == T``

Args:
    node: The node that might contain the comparison
    expr_indices: The list of indices of expressions in ``node`` that are being
        compared

---
## find_isinstance_check
```python
from checker import find_isinstance_check
```

Find any isinstance checks (within a chain of ands).  Includes
implicit and explicit checks for None and calls to callable.
Also includes TypeGuard and TypeIs functions.

Return value is a map of variables to their types if the condition
is true and a map of variables to their types if the condition is false.

If either of the values in the tuple is None, then that particular
branch can never occur.

If `in_boolean_context=True` is passed, it means that we handle
a walrus expression. We treat rhs values
in expressions like `(a := A())` specially:
for example, some errors are suppressed.

May return {}, {}.
Can return None, None in situations involving NoReturn.

---
## find_isinstance_check_helper
```python
from checker import find_isinstance_check_helper
```



---
## propagate_up_typemap_info
```python
from checker import propagate_up_typemap_info
```

Attempts refining parent expressions of any MemberExpr or IndexExprs in new_types.

Specifically, this function accepts two mappings of expression to original types:
the original mapping (existing_types), and a new mapping (new_types) intended to
update the original.

This function iterates through new_types and attempts to use the information to try
refining any parent types that happen to be unions.

For example, suppose there are two types "A = Tuple[int, int]" and "B = Tuple[str, str]".
Next, suppose that 'new_types' specifies the expression 'foo[0]' has a refined type
of 'int' and that 'foo' was previously deduced to be of type Union[A, B].

Then, this function will observe that since A[0] is an int and B[0] is not, the type of
'foo' can be further refined from Union[A, B] into just B.

We perform this kind of "parent narrowing" for member lookup expressions and indexing
expressions into tuples, namedtuples, and typeddicts. We repeat this narrowing
recursively if the parent is also a "lookup expression". So for example, if we have
the expression "foo['bar'].baz[0]", we'd potentially end up refining types for the
expressions "foo", "foo['bar']", and "foo['bar'].baz".

We return the newly refined map. This map is guaranteed to be a superset of 'new_types'.

---
## refine_parent_types
```python
from checker import refine_parent_types
```

Checks if the given expr is a 'lookup operation' into a union and iteratively refines
the parent types based on the 'expr_type'.

For example, if 'expr' is an expression like 'a.b.c.d', we'll potentially return refined
types for expressions 'a', 'a.b', and 'a.b.c'.

For more details about what a 'lookup operation' is and how we use the expr_type to refine
the parent types of lookup_expr, see the docstring in 'propagate_up_typemap_info'.

---
## refine_identity_comparison_expression
```python
from checker import refine_identity_comparison_expression
```

Produce conditional type maps refining expressions by an identity/equality comparison.

The 'operands' and 'operand_types' lists should be the full list of operands used
in the overall comparison expression. The 'chain_indices' list is the list of indices
actually used within this identity comparison chain.

So if we have the expression:

    a <= b is c is d <= e

...then 'operands' and 'operand_types' would be lists of length 5 and 'chain_indices'
would be the list [1, 2, 3].

The 'narrowable_operand_indices' parameter is the set of all indices we are allowed
to refine the types of: that is, all operands that will potentially be a part of
the output TypeMaps.

Although this function could theoretically try setting the types of the operands
in the chains to the meet, doing that causes too many issues in real-world code.
Instead, we use 'is_valid_target' to identify which of the given chain types
we could plausibly use as the refined type for the expressions in the chain.

Similarly, 'coerce_only_in_literal_context' controls whether we should try coercing
expressions in the chain to a Literal type. Performing this coercion is sometimes
too aggressive of a narrowing, depending on context.

---
## refine_away_none_in_comparison
```python
from checker import refine_away_none_in_comparison
```

Produces conditional type maps refining away None in an identity/equality chain.

For more details about what the different arguments mean, see the
docstring of 'refine_identity_comparison_expression' up above.

---
## is_len_of_tuple
```python
from checker import is_len_of_tuple
```

Is this expression a `len(x)` call where x is a tuple or union of tuples?

---
## can_be_narrowed_with_len
```python
from checker import can_be_narrowed_with_len
```

Is this a type that can benefit from length check type restrictions?

Currently supported types are TupleTypes, Instances of builtins.tuple, and
unions involving such types.

---
## literal_int_expr
```python
from checker import literal_int_expr
```

Is this expression an int literal, or a reference to an int constant?

If yes, return the corresponding int value, otherwise return None.

---
## find_tuple_len_narrowing
```python
from checker import find_tuple_len_narrowing
```

Top-level logic to find type restrictions from a length check on tuples.

We try to detect `if` checks like the following:
    x: tuple[int, int] | tuple[int, int, int]
    y: tuple[int, int] | tuple[int, int, int]
    if len(x) == len(y) == 2:
        a, b = x  # OK
        c, d = y  # OK

    z: tuple[int, ...]
    if 1 < len(z) < 4:
        x = z  # OK
and report corresponding type restrictions to the binder.

---
## narrow_with_len
```python
from checker import narrow_with_len
```

Dispatch tuple type narrowing logic depending on the kind of type we got.

---
## refine_tuple_type_with_len
```python
from checker import refine_tuple_type_with_len
```

Narrow a TupleType using length restrictions.

---
## refine_instance_type_with_len
```python
from checker import refine_instance_type_with_len
```

Narrow a homogeneous tuple using length restrictions.

---
## check_subtype
```python
from checker import check_subtype
```

Generate an error if the subtype is not compatible with supertype.

---
## get_precise_awaitable_type
```python
from checker import get_precise_awaitable_type
```

If type implements Awaitable[X] with non-Any X, return X.

In all other cases return None. This method must be called in context
of local_errors.

---
## checking_await_set
```python
from checker import checking_await_set
```



---
## check_possible_missing_await
```python
from checker import check_possible_missing_await
```

Check if the given type becomes a subtype when awaited.

---
## named_type
```python
from checker import named_type
```

Return an instance type with given name and implicit Any type args.

For example, named_type('builtins.object') produces the 'object' type.

---
## named_generic_type
```python
from checker import named_generic_type
```

Return an instance with the given name and type arguments.

Assume that the number of arguments is correct.  Assume that
the name refers to a compatible generic type.

---
## lookup_typeinfo
```python
from checker import lookup_typeinfo
```



---
## type_type
```python
from checker import type_type
```

Return instance type 'type'.

---
## str_type
```python
from checker import str_type
```

Return instance type 'str'.

---
## store_type
```python
from checker import store_type
```

Store the type of a node in the type map.

---
## has_type
```python
from checker import has_type
```



---
## lookup_type_or_none
```python
from checker import lookup_type_or_none
```



---
## lookup_type
```python
from checker import lookup_type
```



---
## store_types
```python
from checker import store_types
```



---
## local_type_map
```python
from checker import local_type_map
```

Store inferred types into a temporary type map (returned).

This can be used to perform type checking "experiments" without
affecting exported types (which are used by mypyc).

---
## in_checked_function
```python
from checker import in_checked_function
```

Should we type-check the current function?

- Yes if --check-untyped-defs is set.
- Yes outside functions.
- Yes in annotated functions.
- No otherwise.

---
## lookup
```python
from checker import lookup
```

Look up a definition from the symbol table with the given name.

---
## lookup_qualified
```python
from checker import lookup_qualified
```



---
## enter_partial_types
```python
from checker import enter_partial_types
```

Enter a new scope for collecting partial types.

Also report errors for (some) variables which still have partial
types, i.e. we couldn't infer a complete type.

---
## handle_partial_var_type
```python
from checker import handle_partial_var_type
```

Handle a reference to a partial type through a var.

(Used by checkexpr and checkmember.)

---
## is_defined_in_base_class
```python
from checker import is_defined_in_base_class
```



---
## find_partial_types
```python
from checker import find_partial_types
```

Look for an active partial type scope containing variable.

A scope is active if assignments in the current context can refine a partial
type originally defined in the scope. This is affected by the local_partial_types
configuration option.

---
## find_partial_types_in_all_scopes
```python
from checker import find_partial_types_in_all_scopes
```

Look for partial type scope containing variable.

Return tuple (is the scope active, is the scope a local scope, scope).

---
## temp_node
```python
from checker import temp_node
```

Create a temporary node with the given, fixed type.

---
## fail
```python
from checker import fail
```

Produce an error message.

---
## note
```python
from checker import note
```

Produce a note.

---
## iterable_item_type
```python
from checker import iterable_item_type
```



---
## function_type
```python
from checker import function_type
```



---
## push_type_map
```python
from checker import push_type_map
```



---
## infer_issubclass_maps
```python
from checker import infer_issubclass_maps
```

Infer type restrictions for an expression in issubclass call.

---
## conditional_types_with_intersection
```python
from checker import conditional_types_with_intersection
```



---
## is_writable_attribute
```python
from checker import is_writable_attribute
```

Check if an attribute is writable

---
## get_isinstance_type
```python
from checker import get_isinstance_type
```



---
## is_literal_enum
```python
from checker import is_literal_enum
```

Returns true if this expression (with the given type context) is an Enum literal.

For example, if we had an enum:

    class Foo(Enum):
        A = 1
        B = 2

...and if the expression 'Foo' referred to that enum within the current type context,
then the expression 'Foo.A' would be a literal enum. However, if we did 'a = Foo.A',
then the variable 'a' would *not* be a literal enum.

We occasionally special-case expressions like 'Foo.A' and treat them as a single primitive
unit for the same reasons we sometimes treat 'True', 'False', or 'None' as a single
primitive unit.

---
## add_any_attribute_to_type
```python
from checker import add_any_attribute_to_type
```

Inject an extra attribute with Any type using fallbacks.

---
## hasattr_type_maps
```python
from checker import hasattr_type_maps
```

Simple support for hasattr() checks.

Essentially the logic is following:
    * In the if branch, keep types that already has a valid attribute as is,
      for other inject an attribute with `Any` type.
    * In the else branch, remove types that already have a valid attribute,
      while keeping the rest.

---
## partition_union_by_attr
```python
from checker import partition_union_by_attr
```



---
## has_valid_attribute
```python
from checker import has_valid_attribute
```



---
## get_expression_type
```python
from checker import get_expression_type
```



---
## visit_type_var
```python
from checker import visit_type_var
```



---
## type
```python
from checker import type
```



---
## visit_uninhabited_type
```python
from checker import visit_uninhabited_type
```



---
## visit_erased_type
```python
from checker import visit_erased_type
```



---
## visit_type_alias_type
```python
from checker import visit_type_alias_type
```



---
## top_function
```python
from checker import top_function
```



---
## top_non_lambda_function
```python
from checker import top_non_lambda_function
```



---
## active_class
```python
from checker import active_class
```



---
## enclosing_class
```python
from checker import enclosing_class
```

Is there a class *directly* enclosing this function?

---
## active_self_type
```python
from checker import active_self_type
```

An instance or tuple type representing the current class.

This returns None unless we are in class body or in a method.
In particular, inside a function nested in method this returns None.

---
## push_function
```python
from checker import push_function
```



---
## push_class
```python
from checker import push_class
```



---
## add_mapping
```python
from checker import add_mapping
```

Adds a 'Set[TKey] -> Set[TValue]' mapping. If there already exists a mapping
containing one or more of the given keys, we merge the input mapping with the old one.

Note that the given set of keys must be non-empty -- otherwise, nothing happens.

---
## items
```python
from checker import items
```

Returns all disjoint mappings in key-value pairs.

---
## _lookup_or_make_root_id
```python
from checker import _lookup_or_make_root_id
```



---
## _lookup_root_id
```python
from checker import _lookup_root_id
```



---
## visit_name_expr
```python
from checker import visit_name_expr
```



---
## visit_member_expr
```python
from checker import visit_member_expr
```



---
## visit_index_expr
```python
from checker import visit_index_expr
```



---
## visit_assignment_expr
```python
from checker import visit_assignment_expr
```



---
## visit_as_pattern
```python
from checker import visit_as_pattern
```



---
## visit_starred_pattern
```python
from checker import visit_starred_pattern
```



---
## is_unannotated_any
```python
from checker import is_unannotated_any
```



---
## has_readable_member
```python
from checker import has_readable_member
```



---
## has_new_method
```python
from checker import has_new_method
```



---
## append_types_for_inference
```python
from checker import append_types_for_inference
```



---
## _get_base_classes
```python
from checker import _get_base_classes
```



---
## _make_fake_typeinfo_and_full_name
```python
from checker import _make_fake_typeinfo_and_full_name
```



---
## format_expr_type
```python
from checker import format_expr_type
```



---
## get_expr_name
```python
from checker import get_expr_name
```



---
## is_type_call
```python
from checker import is_type_call
```

Is expr a call to type with one argument?

---
## combine_maps
```python
from checker import combine_maps
```

Combine all typemaps in list_maps into one typemap

---
## should_coerce_inner
```python
from checker import should_coerce_inner
```



---
## erase_override
```python
from checker import erase_override
```



---
## replay_lookup
```python
from checker import replay_lookup
```



---
## is_exactly_literal_type
```python
from checker import is_exactly_literal_type
```



---
## has_no_custom_eq_checks
```python
from checker import has_no_custom_eq_checks
```



---
## __name__
```python
from fscache import __name__
```

Interface for accessing the file system with automatic caching.

The idea is to cache the results of any file system state reads during
a single transaction. This has two main benefits:

* This avoids redundant syscalls, as we won't perform the same OS
  operations multiple times.

* This makes it easier to reason about concurrent FS updates, as different
  operations targeting the same paths can't report different state during
  a transaction.

Note that this only deals with reading state, not writing.

Properties maintained by the API:

* The contents of the file are always from the same or later time compared
  to the reported mtime of the file, even if mtime is queried after reading
  a file.

* Repeating an operation produces the same result as the first one during
  a transaction.

* Call flush() to start a new transaction (flush the caches).

The API is a bit limited. It's easy to add new cached operations, however.
You should perform all file system reads through the API to actually take
advantage of the benefits.

---
## FileSystemCache
```python
from fscache import FileSystemCache
```



---
## copy_os_error
```python
from fscache import copy_os_error
```



---
## __init__
```python
from fscache import __init__
```



---
## set_package_root
```python
from fscache import set_package_root
```



---
## flush
```python
from fscache import flush
```

Start another transaction and empty all caches.

---
## stat
```python
from fscache import stat
```



---
## init_under_package_root
```python
from fscache import init_under_package_root
```

Is this path an __init__.py under a package root?

This is used to detect packages that don't contain __init__.py
files, which is needed to support Bazel.  The function should
only be called for non-existing files.

It will return True if it refers to a __init__.py file that
Bazel would create, so that at runtime Python would think the
directory containing it is a package.  For this to work you
must pass one or more package roots using the --package-root
flag.

As an exceptional case, any directory that is a package root
itself will not be considered to contain a __init__.py file.
This is different from the rules Bazel itself applies, but is
necessary for mypy to properly distinguish packages from other
directories.

See https://docs.bazel.build/versions/master/be/python.html,
where this behavior is described under legacy_create_init.

---
## _fake_init
```python
from fscache import _fake_init
```

Prime the cache with a fake __init__.py file.

This makes code that looks for path believe an empty file by
that name exists.  Should only be called after
init_under_package_root() returns True.

---
## listdir
```python
from fscache import listdir
```



---
## isfile
```python
from fscache import isfile
```



---
## isfile_case
```python
from fscache import isfile_case
```

Return whether path exists and is a file.

On case-insensitive filesystems (like Mac or Windows) this returns
False if the case of path's last component does not exactly match
the case found in the filesystem.

We check also the case of other path components up to prefix.
For example, if path is 'user-stubs/pack/mod.pyi' and prefix is 'user-stubs',
we check that the case of 'pack' and 'mod.py' matches exactly, 'user-stubs' will be
case insensitive on case insensitive filesystems.

The caller must ensure that prefix is a valid file system prefix of path.

---
## exists_case
```python
from fscache import exists_case
```

Return whether path exists - checking path components in case sensitive
fashion, up to prefix.

---
## isdir
```python
from fscache import isdir
```



---
## exists
```python
from fscache import exists
```



---
## read
```python
from fscache import read
```



---
## hash_digest
```python
from fscache import hash_digest
```



---
## samefile
```python
from fscache import samefile
```



---
## __name__
```python
from state import __name__
```

gr.State() component.

---
## StrictOptionalState
```python
from state import StrictOptionalState
```



---
## __init__
```python
from state import __init__
```



---
## strict_optional_set
```python
from state import strict_optional_set
```



---
## __name__
```python
from semanal import __name__
```

The semantic analyzer.

Bind names to definitions and do various other simple consistency
checks.  Populate symbol tables.  The semantic analyzer also detects
special forms which reuse generic syntax such as NamedTuple and
cast().  Multiple analysis iterations may be needed to analyze forward
references and import cycles. Each iteration "fills in" additional
bindings and references until everything has been bound.

For example, consider this program:

  x = 1
  y = x

Here semantic analysis would detect that the assignment 'x = 1'
defines a new variable, the type of which is to be inferred (in a
later pass; type inference or type checking is not part of semantic
analysis).  Also, it would bind both references to 'x' to the same
module-level variable (Var) node.  The second assignment would also
be analyzed, and the type of 'y' marked as being inferred.

Semantic analysis of types is implemented in typeanal.py.

See semanal_main.py for the top-level logic.

Some important properties:

* After semantic analysis is complete, no PlaceholderNode and
  PlaceholderType instances should remain. During semantic analysis,
  if we encounter one of these, the current target should be deferred.

* A TypeInfo is only created once we know certain basic information about
  a type, such as the MRO, existence of a Tuple base class (e.g., for named
  tuples), and whether we have a TypedDict. We use a temporary
  PlaceholderNode node in the symbol table if some such information is
  missing.

* For assignments, we only add a non-placeholder symbol table entry once
  we know the sort of thing being defined (variable, NamedTuple, type alias,
  etc.).

* Every part of the analysis step must support multiple iterations over
  the same AST nodes, and each iteration must be able to fill in arbitrary
  things that were missing or incomplete in previous iterations.

* Changes performed by the analysis need to be reversible, since mypy
  daemon strips and reuses existing ASTs (to improve performance and/or
  reduce memory use).

---
## SemanticAnalyzer
```python
from semanal import SemanticAnalyzer
```

Semantically analyze parsed mypy files.

The analyzer binds names and does various consistency checks for an
AST. Note that type checking is performed as a separate pass.

---
## replace_implicit_first_type
```python
from semanal import replace_implicit_first_type
```



---
## refers_to_fullname
```python
from semanal import refers_to_fullname
```

Is node a name or member expression with the given full name?

---
## refers_to_class_or_function
```python
from semanal import refers_to_class_or_function
```

Does semantically analyzed node refer to a class?

---
## find_duplicate
```python
from semanal import find_duplicate
```

If the list has duplicates, return one of the duplicates.

Otherwise, return None.

---
## remove_imported_names_from_symtable
```python
from semanal import remove_imported_names_from_symtable
```

Remove all imported names from the symbol table of a module.

---
## make_any_non_explicit
```python
from semanal import make_any_non_explicit
```

Replace all Any types within in with Any that has attribute 'explicit' set to False

---
## MakeAnyNonExplicit
```python
from semanal import MakeAnyNonExplicit
```



---
## make_any_non_unimported
```python
from semanal import make_any_non_unimported
```

Replace all Any types that come from unimported types with special form Any.

---
## MakeAnyNonUnimported
```python
from semanal import MakeAnyNonUnimported
```



---
## apply_semantic_analyzer_patches
```python
from semanal import apply_semantic_analyzer_patches
```

Call patch callbacks in the right order.

This should happen after semantic analyzer pass 3.

---
## names_modified_by_assignment
```python
from semanal import names_modified_by_assignment
```

Return all unqualified (short) names assigned to in an assignment statement.

---
## names_modified_in_lvalue
```python
from semanal import names_modified_in_lvalue
```

Return all NameExpr assignment targets in an Lvalue.

---
## is_same_var_from_getattr
```python
from semanal import is_same_var_from_getattr
```

Do n1 and n2 refer to the same Var derived from module-level __getattr__?

---
## dummy_context
```python
from semanal import dummy_context
```



---
## is_valid_replacement
```python
from semanal import is_valid_replacement
```

Can symbol table node replace an existing one?

These are the only valid cases:

1. Placeholder gets replaced with a non-placeholder
2. Placeholder that isn't known to become type replaced with a
   placeholder that can become a type

---
## is_same_symbol
```python
from semanal import is_same_symbol
```



---
## is_trivial_body
```python
from semanal import is_trivial_body
```

Returns 'true' if the given body is "trivial" -- if it contains just a "pass",
"..." (ellipsis), or "raise NotImplementedError()". A trivial body may also
start with a statement containing just a string (e.g. a docstring).

Note: Functions that raise other kinds of exceptions do not count as
"trivial". We use this function to help us determine when it's ok to
relax certain checks on body, but functions that raise arbitrary exceptions
are more likely to do non-trivial work. For example:

   def halt(self, reason: str = ...) -> NoReturn:
       raise MyCustomError("Fatal error: " + reason, self.line, self.context)

A function that raises just NotImplementedError is much less likely to be
this complex.

Note: If you update this, you may also need to update
mypy.fastparse.is_possible_trivial_body!

---
## __init__
```python
from semanal import __init__
```

Construct semantic analyzer.

We reuse the same semantic analyzer instance across multiple modules.

Args:
    modules: Global modules dictionary
    missing_modules: Modules that could not be imported encountered so far
    incomplete_namespaces: Namespaces that are being populated during semantic analysis
        (can contain modules and classes within the current SCC; mutated by the caller)
    errors: Report analysis errors using this instance

---
## type
```python
from semanal import type
```



---
## is_stub_file
```python
from semanal import is_stub_file
```



---
## is_typeshed_stub_file
```python
from semanal import is_typeshed_stub_file
```



---
## final_iteration
```python
from semanal import final_iteration
```



---
## allow_unbound_tvars_set
```python
from semanal import allow_unbound_tvars_set
```



---
## prepare_file
```python
from semanal import prepare_file
```

Prepare a freshly parsed file for semantic analysis.

---
## prepare_typing_namespace
```python
from semanal import prepare_typing_namespace
```

Remove dummy alias definitions such as List = TypeAlias(object) from typing.

They will be replaced with real aliases when corresponding targets are ready.

---
## prepare_builtins_namespace
```python
from semanal import prepare_builtins_namespace
```

Add certain special-cased definitions to the builtins module.

Some definitions are too special or fundamental to be processed
normally from the AST.

---
## refresh_partial
```python
from semanal import refresh_partial
```

Refresh a stale target in fine-grained incremental mode.

---
## refresh_top_level
```python
from semanal import refresh_top_level
```

Reanalyze a stale module top-level in fine-grained incremental mode.

---
## add_implicit_module_attrs
```python
from semanal import add_implicit_module_attrs
```

Manually add implicit definitions of module '__name__' etc.

---
## add_builtin_aliases
```python
from semanal import add_builtin_aliases
```

Add builtin type aliases to typing module.

For historical reasons, the aliases like `List = list` are not defined
in typeshed stubs for typing module. Instead we need to manually add the
corresponding nodes on the fly. We explicitly mark these aliases as normalized,
so that a user can write `typing.List[int]`.

---
## add_typing_extension_aliases
```python
from semanal import add_typing_extension_aliases
```

Typing extensions module does contain some type aliases.

We need to analyze them as such, because in typeshed
they are just defined as `_Alias()` call.
Which is not supported natively.

---
## create_alias
```python
from semanal import create_alias
```



---
## adjust_public_exports
```python
from semanal import adjust_public_exports
```

Adjust the module visibility of globals due to __all__.

---
## file_context
```python
from semanal import file_context
```

Configure analyzer for analyzing targets within a file/class.

Args:
    file_node: target file
    options: options specific to the file
    active_type: must be the surrounding class to analyze method targets

---
## visit_func_def
```python
from semanal import visit_func_def
```



---
## function_fullname
```python
from semanal import function_fullname
```



---
## analyze_func_def
```python
from semanal import analyze_func_def
```



---
## remove_unpack_kwargs
```python
from semanal import remove_unpack_kwargs
```



---
## prepare_method_signature
```python
from semanal import prepare_method_signature
```

Check basic signature validity and tweak annotation of self/cls argument.

---
## is_expected_self_type
```python
from semanal import is_expected_self_type
```

Does this (analyzed or not) type represent the expected Self type for a method?

---
## set_original_def
```python
from semanal import set_original_def
```

If 'new' conditionally redefine 'previous', set 'previous' as original

We reject straight redefinitions of functions, as they are usually
a programming error. For example:

  def f(): ...
  def f(): ...  # Error: 'f' redefined

---
## update_function_type_variables
```python
from semanal import update_function_type_variables
```

Make any type variables in the signature of defn explicit.

Update the signature of defn to contain type variable definitions
if defn is generic. Return True, if the signature contains typing.Self
type, or False otherwise.

---
## setup_self_type
```python
from semanal import setup_self_type
```

Setup a (shared) Self type variable for current class.

We intentionally don't add it to the class symbol table,
so it can be accessed only by mypy and will not cause
clashes with user defined names.

---
## visit_overloaded_func_def
```python
from semanal import visit_overloaded_func_def
```



---
## overload_item_set
```python
from semanal import overload_item_set
```



---
## analyze_overloaded_func_def
```python
from semanal import analyze_overloaded_func_def
```



---
## process_overload_impl
```python
from semanal import process_overload_impl
```

Set flags for an overload implementation.

Currently, this checks for a trivial body in protocols classes,
where it makes the method implicitly abstract.

---
## analyze_overload_sigs_and_impl
```python
from semanal import analyze_overload_sigs_and_impl
```

Find overload signatures, the implementation, and items with missing @overload.

Assume that the first was already analyzed. As a side effect:
analyzes remaining items and updates 'is_overload' flags.

---
## handle_missing_overload_decorators
```python
from semanal import handle_missing_overload_decorators
```

Generate errors for overload items without @overload.

Side effect: remote non-overload items.

---
## handle_missing_overload_implementation
```python
from semanal import handle_missing_overload_implementation
```

Generate error about missing overload implementation (only if needed).

---
## process_final_in_overload
```python
from semanal import process_final_in_overload
```

Detect the @final status of an overloaded function (and perform checks).

---
## process_static_or_class_method_in_overload
```python
from semanal import process_static_or_class_method_in_overload
```



---
## analyze_property_with_multi_part_definition
```python
from semanal import analyze_property_with_multi_part_definition
```

Analyze a property defined using multiple methods (e.g., using @x.setter).

Assume that the first method (@property) has already been analyzed.

---
## add_function_to_symbol_table
```python
from semanal import add_function_to_symbol_table
```



---
## analyze_arg_initializers
```python
from semanal import analyze_arg_initializers
```



---
## analyze_function_body
```python
from semanal import analyze_function_body
```



---
## check_classvar_in_signature
```python
from semanal import check_classvar_in_signature
```



---
## check_function_signature
```python
from semanal import check_function_signature
```



---
## check_paramspec_definition
```python
from semanal import check_paramspec_definition
```



---
## visit_decorator
```python
from semanal import visit_decorator
```



---
## check_decorated_function_is_method
```python
from semanal import check_decorated_function_is_method
```



---
## visit_class_def
```python
from semanal import visit_class_def
```



---
## push_type_args
```python
from semanal import push_type_args
```



---
## is_defined_type_param
```python
from semanal import is_defined_type_param
```



---
## analyze_type_param
```python
from semanal import analyze_type_param
```



---
## pop_type_args
```python
from semanal import pop_type_args
```



---
## analyze_class
```python
from semanal import analyze_class
```



---
## setup_type_vars
```python
from semanal import setup_type_vars
```



---
## setup_alias_type_vars
```python
from semanal import setup_alias_type_vars
```



---
## is_core_builtin_class
```python
from semanal import is_core_builtin_class
```



---
## analyze_class_body_common
```python
from semanal import analyze_class_body_common
```

Parts of class body analysis that are common to all kinds of class defs.

---
## analyze_typeddict_classdef
```python
from semanal import analyze_typeddict_classdef
```



---
## analyze_namedtuple_classdef
```python
from semanal import analyze_namedtuple_classdef
```

Check if this class can define a named tuple.

---
## apply_class_plugin_hooks
```python
from semanal import apply_class_plugin_hooks
```

Apply a plugin hook that may infer a more precise definition for a class.

---
## get_fullname_for_hook
```python
from semanal import get_fullname_for_hook
```



---
## analyze_class_keywords
```python
from semanal import analyze_class_keywords
```



---
## enter_class
```python
from semanal import enter_class
```



---
## leave_class
```python
from semanal import leave_class
```

Restore analyzer state.

---
## analyze_class_decorator
```python
from semanal import analyze_class_decorator
```



---
## analyze_class_decorator_common
```python
from semanal import analyze_class_decorator_common
```

Common method for applying class decorators.

Called on regular classes, typeddicts, and namedtuples.

---
## clean_up_bases_and_infer_type_variables
```python
from semanal import clean_up_bases_and_infer_type_variables
```

Remove extra base classes such as Generic and infer type vars.

For example, consider this class:

  class Foo(Bar, Generic[T]): ...

Now we will remove Generic[T] from bases of Foo and infer that the
type variable 'T' is a type argument of Foo.

Note that this is performed *before* semantic analysis.

Returns (remaining base expressions, inferred type variables, is protocol).

---
## analyze_class_typevar_declaration
```python
from semanal import analyze_class_typevar_declaration
```

Analyze type variables declared using Generic[...] or Protocol[...].

Args:
    base: Non-analyzed base class

Return None if the base class does not declare type variables. Otherwise,
return the type variables.

---
## analyze_unbound_tvar
```python
from semanal import analyze_unbound_tvar
```



---
## analyze_unbound_tvar_impl
```python
from semanal import analyze_unbound_tvar_impl
```



---
## find_type_var_likes
```python
from semanal import find_type_var_likes
```



---
## get_all_bases_tvars
```python
from semanal import get_all_bases_tvars
```

Return all type variable references in bases.

---
## get_and_bind_all_tvars
```python
from semanal import get_and_bind_all_tvars
```

Return all type variable references in item type expressions.

This is a helper for generic TypedDicts and NamedTuples. Essentially it is
a simplified version of the logic we use for ClassDef bases. We duplicate
some amount of code, because it is hard to refactor common pieces.

---
## prepare_class_def
```python
from semanal import prepare_class_def
```

Prepare for the analysis of a class definition.

Create an empty TypeInfo and store it in a symbol table, or if the 'info'
argument is provided, store it instead (used for magic type definitions).

---
## make_empty_type_info
```python
from semanal import make_empty_type_info
```



---
## get_name_repr_of_expr
```python
from semanal import get_name_repr_of_expr
```

Try finding a short simplified textual representation of a base class expression.

---
## analyze_base_classes
```python
from semanal import analyze_base_classes
```

Analyze base class types.

Return None if some definition was incomplete. Otherwise, return a tuple
with these items:

 * List of (analyzed type, original expression) tuples
 * Boolean indicating whether one of the bases had a semantic analysis error

---
## configure_base_classes
```python
from semanal import configure_base_classes
```

Set up base classes.

This computes several attributes on the corresponding TypeInfo defn.info
related to the base classes: defn.info.bases, defn.info.mro, and
miscellaneous others (at least tuple_type, fallback_to_any, and is_enum.)

---
## configure_tuple_base_class
```python
from semanal import configure_tuple_base_class
```



---
## set_dummy_mro
```python
from semanal import set_dummy_mro
```



---
## set_any_mro
```python
from semanal import set_any_mro
```



---
## calculate_class_mro
```python
from semanal import calculate_class_mro
```

Calculate method resolution order for a class.

`obj_type` exists just to fill in empty base class list in case of an error.

---
## infer_metaclass_and_bases_from_compat_helpers
```python
from semanal import infer_metaclass_and_bases_from_compat_helpers
```

Lookup for special metaclass declarations, and update defn fields accordingly.

* six.with_metaclass(M, B1, B2, ...)
* @six.add_metaclass(M)
* future.utils.with_metaclass(M, B1, B2, ...)
* past.utils.with_metaclass(M, B1, B2, ...)

---
## verify_base_classes
```python
from semanal import verify_base_classes
```



---
## verify_duplicate_base_classes
```python
from semanal import verify_duplicate_base_classes
```



---
## is_base_class
```python
from semanal import is_base_class
```

Determine if t is a base class of s (but do not use mro).

---
## get_declared_metaclass
```python
from semanal import get_declared_metaclass
```

Get declared metaclass from metaclass expression.

Returns a tuple of three values:
  * A metaclass instance or None
  * A boolean indicating whether we should defer
  * A boolean indicating whether we should set metaclass Any fallback
    (either for Any metaclass or invalid/dynamic metaclass).

The two boolean flags can only be True if instance is None.

---
## recalculate_metaclass
```python
from semanal import recalculate_metaclass
```



---
## visit_import
```python
from semanal import visit_import
```



---
## visit_import_from
```python
from semanal import visit_import_from
```



---
## process_imported_symbol
```python
from semanal import process_imported_symbol
```



---
## report_missing_module_attribute
```python
from semanal import report_missing_module_attribute
```



---
## process_import_over_existing_name
```python
from semanal import process_import_over_existing_name
```



---
## correct_relative_import
```python
from semanal import correct_relative_import
```



---
## visit_import_all
```python
from semanal import visit_import_all
```



---
## visit_assignment_expr
```python
from semanal import visit_assignment_expr
```



---
## check_valid_comprehension
```python
from semanal import check_valid_comprehension
```

Check that assignment expression is not nested within comprehension at class scope.

class C:
    [(j := i) for i in [1, 2, 3]]
is a syntax error that is not enforced by Python parser, but at later steps.

---
## visit_assignment_stmt
```python
from semanal import visit_assignment_stmt
```



---
## analyze_identity_global_assignment
```python
from semanal import analyze_identity_global_assignment
```

Special case 'X = X' in global scope.

This allows supporting some important use cases.

Return true if special casing was applied.

---
## should_wait_rhs
```python
from semanal import should_wait_rhs
```

Can we already classify this r.h.s. of an assignment or should we wait?

This returns True if we don't have enough information to decide whether
an assignment is just a normal variable definition or a special form.
Always return False if this is a final iteration. This will typically cause
the lvalue to be classified as a variable plus emit an error.

---
## can_be_type_alias
```python
from semanal import can_be_type_alias
```

Is this a valid r.h.s. for an alias definition?

Note: this function should be only called for expressions where self.should_wait_rhs()
returns False.

---
## can_possibly_be_type_form
```python
from semanal import can_possibly_be_type_form
```

Like can_be_type_alias(), but simpler and doesn't require fully analyzed rvalue.

Instead, use lvalues/annotations structure to figure out whether this can potentially be
a type alias definition, NamedTuple, or TypedDict. Another difference from above function
is that we are only interested IndexExpr, CallExpr and OpExpr rvalues, since only those
can be potentially recursive (things like `A = A` are never valid).

---
## can_possibly_be_typevarlike_declaration
```python
from semanal import can_possibly_be_typevarlike_declaration
```

Check if r.h.s. can be a TypeVarLike declaration.

---
## is_type_ref
```python
from semanal import is_type_ref
```

Does this expression refer to a type?

This includes:
  * Special forms, like Any or Union
  * Classes (except subscripted enums)
  * Other type aliases
  * PlaceholderNodes with becomes_typeinfo=True (these can be not ready class
    definitions, and not ready aliases).

If bare is True, this is not a base of an index expression, so some special
forms are not valid (like a bare Union).

Note: This method should be only used in context of a type alias definition.
This method can only return True for RefExprs, to check if C[int] is a valid
target for type alias call this method on expr.base (i.e. on C in C[int]).
See also can_be_type_alias().

---
## is_none_alias
```python
from semanal import is_none_alias
```

Is this a r.h.s. for a None alias?

We special case the assignments like Void = type(None), to allow using
Void in type annotations.

---
## record_special_form_lvalue
```python
from semanal import record_special_form_lvalue
```

Record minimal necessary information about l.h.s. of a special form.

This exists mostly for compatibility with the old semantic analyzer.

---
## analyze_enum_assign
```python
from semanal import analyze_enum_assign
```

Check if s defines an Enum.

---
## analyze_namedtuple_assign
```python
from semanal import analyze_namedtuple_assign
```

Check if s defines a namedtuple.

---
## analyze_typeddict_assign
```python
from semanal import analyze_typeddict_assign
```

Check if s defines a typed dict.

---
## analyze_lvalues
```python
from semanal import analyze_lvalues
```



---
## apply_dynamic_class_hook
```python
from semanal import apply_dynamic_class_hook
```



---
## unwrap_final
```python
from semanal import unwrap_final
```

Strip Final[...] if present in an assignment.

This is done to invoke type inference during type checking phase for this
assignment. Also, Final[...] doesn't affect type in any way -- it is rather an
access qualifier for given `Var`.

Also perform various consistency checks.

Returns True if Final[...] was present.

---
## check_final_implicit_def
```python
from semanal import check_final_implicit_def
```

Do basic checks for final declaration on self in __init__.

Additional re-definition checks are performed by `analyze_lvalue`.

---
## store_final_status
```python
from semanal import store_final_status
```

If this is a locally valid final declaration, set the corresponding flag on `Var`.

---
## flatten_lvalues
```python
from semanal import flatten_lvalues
```



---
## process_type_annotation
```python
from semanal import process_type_annotation
```

Analyze type annotation or infer simple literal type.

---
## is_annotated_protocol_member
```python
from semanal import is_annotated_protocol_member
```

Check whether a protocol member is annotated.

There are some exceptions that can be left unannotated, like ``__slots__``.

---
## analyze_simple_literal_type
```python
from semanal import analyze_simple_literal_type
```

Return builtins.int if rvalue is an int literal, etc.

If this is a 'Final' context, we return "Literal[...]" instead.

---
## analyze_alias
```python
from semanal import analyze_alias
```

Check if 'rvalue' is a valid type allowed for aliasing (e.g. not a type variable).

If yes, return the corresponding type, a list of
qualified type variable names for generic aliases, a set of names the alias depends on,
and a list of type variables if the alias is generic.
A schematic example for the dependencies:
    A = int
    B = str
    analyze_alias(Dict[A, B])[2] == {'__main__.A', '__main__.B'}

---
## is_pep_613
```python
from semanal import is_pep_613
```



---
## check_and_set_up_type_alias
```python
from semanal import check_and_set_up_type_alias
```

Check if assignment creates a type alias and set it up as needed.

Return True if it is a type alias (even if the target is not ready),
or False otherwise.

Note: the resulting types for subscripted (including generic) aliases
are also stored in rvalue.analyzed.

---
## check_type_alias_type_call
```python
from semanal import check_type_alias_type_call
```



---
## analyze_type_alias_type_params
```python
from semanal import analyze_type_alias_type_params
```

Analyze type_params of TypeAliasType.

Returns declared unbound type variable expressions and a list of all decalred type
variable names for error reporting.

---
## disable_invalid_recursive_aliases
```python
from semanal import disable_invalid_recursive_aliases
```

Prohibit and fix recursive type aliases that are invalid/unsupported.

---
## analyze_lvalue
```python
from semanal import analyze_lvalue
```

Analyze an lvalue or assignment target.

Args:
    lval: The target lvalue
    nested: If true, the lvalue is within a tuple or list lvalue expression
    explicit_type: Assignment has type annotation
    escape_comprehensions: If we are inside a comprehension, set the variable
        in the enclosing scope instead. This implements
        https://www.python.org/dev/peps/pep-0572/#scope-of-the-target

---
## analyze_name_lvalue
```python
from semanal import analyze_name_lvalue
```

Analyze an lvalue that targets a name expression.

Arguments are similar to "analyze_lvalue".

---
## is_final_redefinition
```python
from semanal import is_final_redefinition
```



---
## is_alias_for_final_name
```python
from semanal import is_alias_for_final_name
```



---
## make_name_lvalue_var
```python
from semanal import make_name_lvalue_var
```

Return a Var node for an lvalue that is a name expression.

---
## make_name_lvalue_point_to_existing_def
```python
from semanal import make_name_lvalue_point_to_existing_def
```

Update an lvalue to point to existing definition in the same scope.

Arguments are similar to "analyze_lvalue".

Assume that an existing name exists.

---
## analyze_tuple_or_list_lvalue
```python
from semanal import analyze_tuple_or_list_lvalue
```

Analyze an lvalue or assignment target that is a list or tuple.

---
## analyze_member_lvalue
```python
from semanal import analyze_member_lvalue
```

Analyze lvalue that is a member expression.

Arguments:
    lval: The target lvalue
    explicit_type: Assignment has type annotation
    is_final: Is the target final

---
## is_self_member_ref
```python
from semanal import is_self_member_ref
```

Does memberexpr to refer to an attribute of self?

---
## check_lvalue_validity
```python
from semanal import check_lvalue_validity
```



---
## store_declared_types
```python
from semanal import store_declared_types
```



---
## process_typevar_declaration
```python
from semanal import process_typevar_declaration
```

Check if s declares a TypeVar; it yes, store it in symbol table.

Return True if this looks like a type variable declaration (but maybe
with errors), otherwise return False.

---
## check_typevarlike_name
```python
from semanal import check_typevarlike_name
```

Checks that the name of a TypeVar or ParamSpec matches its variable.

---
## get_typevarlike_declaration
```python
from semanal import get_typevarlike_declaration
```

Returns the call expression if `s` is a declaration of `typevarlike_type`
(TypeVar or ParamSpec), or None otherwise.

---
## process_typevar_parameters
```python
from semanal import process_typevar_parameters
```



---
## get_typevarlike_argument
```python
from semanal import get_typevarlike_argument
```



---
## extract_typevarlike_name
```python
from semanal import extract_typevarlike_name
```



---
## process_paramspec_declaration
```python
from semanal import process_paramspec_declaration
```

Checks if s declares a ParamSpec; if yes, store it in symbol table.

Return True if this looks like a ParamSpec (maybe with errors), otherwise return False.

In the future, ParamSpec may accept bounds and variance arguments, in which
case more aggressive sharing of code with process_typevar_declaration should be pursued.

---
## process_typevartuple_declaration
```python
from semanal import process_typevartuple_declaration
```

Checks if s declares a TypeVarTuple; if yes, store it in symbol table.

Return True if this looks like a TypeVarTuple (maybe with errors), otherwise return False.

---
## basic_new_typeinfo
```python
from semanal import basic_new_typeinfo
```



---
## analyze_value_types
```python
from semanal import analyze_value_types
```

Analyze types from values expressions in type variable definition.

---
## check_classvar
```python
from semanal import check_classvar
```

Check if assignment defines a class variable.

---
## is_classvar
```python
from semanal import is_classvar
```



---
## is_final_type
```python
from semanal import is_final_type
```



---
## fail_invalid_classvar
```python
from semanal import fail_invalid_classvar
```



---
## process_module_assignment
```python
from semanal import process_module_assignment
```

Propagate module references across assignments.

Recursively handles the simple form of iterable unpacking; doesn't
handle advanced unpacking with *rest, dictionary unpacking, etc.

In an expression like x = y = z, z is the rval and lvals will be [x,
y].

---
## process__all__
```python
from semanal import process__all__
```

Export names if argument is a __all__ assignment.

---
## process__deletable__
```python
from semanal import process__deletable__
```



---
## process__slots__
```python
from semanal import process__slots__
```

Processing ``__slots__`` if defined in type.

See: https://docs.python.org/3/reference/datamodel.html#slots

---
## visit_block
```python
from semanal import visit_block
```



---
## visit_block_maybe
```python
from semanal import visit_block_maybe
```



---
## visit_expression_stmt
```python
from semanal import visit_expression_stmt
```



---
## visit_return_stmt
```python
from semanal import visit_return_stmt
```



---
## visit_raise_stmt
```python
from semanal import visit_raise_stmt
```



---
## visit_assert_stmt
```python
from semanal import visit_assert_stmt
```



---
## visit_operator_assignment_stmt
```python
from semanal import visit_operator_assignment_stmt
```



---
## visit_while_stmt
```python
from semanal import visit_while_stmt
```



---
## visit_for_stmt
```python
from semanal import visit_for_stmt
```



---
## visit_break_stmt
```python
from semanal import visit_break_stmt
```



---
## visit_continue_stmt
```python
from semanal import visit_continue_stmt
```



---
## visit_if_stmt
```python
from semanal import visit_if_stmt
```



---
## visit_try_stmt
```python
from semanal import visit_try_stmt
```



---
## analyze_try_stmt
```python
from semanal import analyze_try_stmt
```



---
## visit_with_stmt
```python
from semanal import visit_with_stmt
```



---
## visit_del_stmt
```python
from semanal import visit_del_stmt
```



---
## is_valid_del_target
```python
from semanal import is_valid_del_target
```



---
## visit_global_decl
```python
from semanal import visit_global_decl
```



---
## visit_nonlocal_decl
```python
from semanal import visit_nonlocal_decl
```



---
## visit_match_stmt
```python
from semanal import visit_match_stmt
```



---
## visit_type_alias_stmt
```python
from semanal import visit_type_alias_stmt
```



---
## visit_name_expr
```python
from semanal import visit_name_expr
```



---
## bind_name_expr
```python
from semanal import bind_name_expr
```

Bind name expression to a symbol table node.

---
## visit_super_expr
```python
from semanal import visit_super_expr
```



---
## visit_tuple_expr
```python
from semanal import visit_tuple_expr
```



---
## visit_list_expr
```python
from semanal import visit_list_expr
```



---
## visit_set_expr
```python
from semanal import visit_set_expr
```



---
## visit_dict_expr
```python
from semanal import visit_dict_expr
```



---
## visit_star_expr
```python
from semanal import visit_star_expr
```



---
## visit_yield_from_expr
```python
from semanal import visit_yield_from_expr
```



---
## visit_call_expr
```python
from semanal import visit_call_expr
```

Analyze a call expression.

Some call expressions are recognized as special forms, including
cast(...).

---
## translate_dict_call
```python
from semanal import translate_dict_call
```

Translate 'dict(x=y, ...)' to {'x': y, ...} and 'dict()' to {}.

For other variants of dict(...), return None.

---
## check_fixed_args
```python
from semanal import check_fixed_args
```

Verify that expr has specified number of positional args.

Return True if the arguments are valid.

---
## visit_member_expr
```python
from semanal import visit_member_expr
```



---
## visit_op_expr
```python
from semanal import visit_op_expr
```



---
## visit_comparison_expr
```python
from semanal import visit_comparison_expr
```



---
## visit_unary_expr
```python
from semanal import visit_unary_expr
```



---
## visit_index_expr
```python
from semanal import visit_index_expr
```



---
## analyze_type_application
```python
from semanal import analyze_type_application
```

Analyze special form -- type application (either direct or via type aliasing).

---
## analyze_type_application_args
```python
from semanal import analyze_type_application_args
```

Analyze type arguments (index) in a type application.

Return None if anything was incomplete.

---
## visit_slice_expr
```python
from semanal import visit_slice_expr
```



---
## visit_cast_expr
```python
from semanal import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from semanal import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from semanal import visit_reveal_expr
```



---
## visit_type_application
```python
from semanal import visit_type_application
```



---
## visit_list_comprehension
```python
from semanal import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from semanal import visit_set_comprehension
```



---
## visit_dictionary_comprehension
```python
from semanal import visit_dictionary_comprehension
```



---
## visit_generator_expr
```python
from semanal import visit_generator_expr
```



---
## analyze_comp_for
```python
from semanal import analyze_comp_for
```

Analyses the 'comp_for' part of comprehensions (part 1).

That is the part after 'for' in (x for x in l if p). This analyzes
variables and conditions which are analyzed in a local scope.

---
## analyze_comp_for_2
```python
from semanal import analyze_comp_for_2
```

Analyses the 'comp_for' part of comprehensions (part 2).

That is the part after 'for' in (x for x in l if p). This analyzes
the 'l' part which is analyzed in the surrounding scope.

---
## visit_lambda_expr
```python
from semanal import visit_lambda_expr
```



---
## visit_conditional_expr
```python
from semanal import visit_conditional_expr
```



---
## visit__promote_expr
```python
from semanal import visit__promote_expr
```



---
## visit_yield_expr
```python
from semanal import visit_yield_expr
```



---
## visit_await_expr
```python
from semanal import visit_await_expr
```



---
## visit_as_pattern
```python
from semanal import visit_as_pattern
```



---
## visit_or_pattern
```python
from semanal import visit_or_pattern
```



---
## visit_value_pattern
```python
from semanal import visit_value_pattern
```



---
## visit_sequence_pattern
```python
from semanal import visit_sequence_pattern
```



---
## visit_starred_pattern
```python
from semanal import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from semanal import visit_mapping_pattern
```



---
## visit_class_pattern
```python
from semanal import visit_class_pattern
```



---
## lookup
```python
from semanal import lookup
```

Look up an unqualified (no dots) name in all active namespaces.

Note that the result may contain a PlaceholderNode. The caller may
want to defer in that case.

Generate an error if the name is not defined unless suppress_errors
is true or the current namespace is incomplete. In the latter case
defer.

---
## is_active_symbol_in_class_body
```python
from semanal import is_active_symbol_in_class_body
```

Can a symbol defined in class body accessed at current statement?

Only allow access to class attributes textually after
the definition, so that it's possible to fall back to the
outer scope. Example:

    class X: ...

    class C:
        X = X  # Initializer refers to outer scope

Nested classes are an exception, since we want to support
arbitrary forward references in type annotations. Also, we
allow forward references to type aliases to support recursive
types.

---
## is_textually_before_statement
```python
from semanal import is_textually_before_statement
```

Check if a node is defined textually before the current statement

Note that decorated functions' line number are the same as
the top decorator.

---
## is_overloaded_item
```python
from semanal import is_overloaded_item
```

Check whether the function belongs to the overloaded variants

---
## is_defined_in_current_module
```python
from semanal import is_defined_in_current_module
```



---
## lookup_qualified
```python
from semanal import lookup_qualified
```

Lookup a qualified name in all activate namespaces.

Note that the result may contain a PlaceholderNode. The caller may
want to defer in that case.

Generate an error if the name is not defined unless suppress_errors
is true or the current namespace is incomplete. In the latter case
defer.

---
## lookup_type_node
```python
from semanal import lookup_type_node
```



---
## get_module_symbol
```python
from semanal import get_module_symbol
```

Look up a symbol from a module.

Return None if no matching symbol could be bound.

---
## is_missing_module
```python
from semanal import is_missing_module
```



---
## implicit_symbol
```python
from semanal import implicit_symbol
```

Create symbol for a qualified name reference through Any type.

---
## create_getattr_var
```python
from semanal import create_getattr_var
```

Create a dummy variable using module-level __getattr__ return type.

If not possible, return None.

Note that multiple Var nodes can be created for a single name. We
can use the from_module_getattr and the fullname attributes to
check if two dummy Var nodes refer to the same thing. Reusing Var
nodes would require non-local mutable state, which we prefer to
avoid.

---
## lookup_fully_qualified
```python
from semanal import lookup_fully_qualified
```



---
## lookup_fully_qualified_or_none
```python
from semanal import lookup_fully_qualified_or_none
```

Lookup a fully qualified name that refers to a module-level definition.

Don't assume that the name is defined. This happens in the global namespace --
the local module namespace is ignored. This does not dereference indirect
refs.

Note that this can't be used for names nested in class namespaces.

---
## object_type
```python
from semanal import object_type
```



---
## str_type
```python
from semanal import str_type
```



---
## named_type
```python
from semanal import named_type
```



---
## named_type_or_none
```python
from semanal import named_type_or_none
```



---
## builtin_type
```python
from semanal import builtin_type
```

Legacy function -- use named_type() instead.

---
## lookup_current_scope
```python
from semanal import lookup_current_scope
```



---
## add_symbol
```python
from semanal import add_symbol
```

Add symbol to the currently active symbol table.

Generally additions to symbol table should go through this method or
one of the methods below so that kinds, redefinitions, conditional
definitions, and skipped names are handled consistently.

Return True if we actually added the symbol, or False if we refused to do so
(because something is not ready).

If can_defer is True, defer current target if adding a placeholder.

---
## add_symbol_skip_local
```python
from semanal import add_symbol_skip_local
```

Same as above, but skipping the local namespace.

This doesn't check for previous definition and is only used
for serialization of method-level classes.

Classes defined within methods can be exposed through an
attribute type, but method-level symbol tables aren't serialized.
This method can be used to add such classes to an enclosing,
serialized symbol table.

---
## add_symbol_table_node
```python
from semanal import add_symbol_table_node
```

Add symbol table node to the currently active symbol table.

Return True if we actually added the symbol, or False if we refused
to do so (because something is not ready or it was a no-op).

Generate an error if there is an invalid redefinition.

If context is None, unconditionally add node, since we can't report
an error. Note that this is used by plugins to forcibly replace nodes!

TODO: Prevent plugins from replacing nodes, as it could cause problems?

Args:
    name: short name of symbol
    symbol: Node to add
    can_defer: if True, defer current target if adding a placeholder
    context: error context (see above about None value)

---
## add_redefinition
```python
from semanal import add_redefinition
```

Add a symbol table node that reflects a redefinition as a function or a class.

Redefinitions need to be added to the symbol table so that they can be found
through AST traversal, but they have dummy names of form 'name-redefinition[N]',
where N ranges over 2, 3, ... (omitted for the first redefinition).

Note: we always store redefinitions independently of whether they are valid or not
(so they will be semantically analyzed), the caller should give an error for invalid
redefinitions (such as e.g. variable redefined as a class).

---
## add_local
```python
from semanal import add_local
```

Add local variable or function.

---
## _get_node_for_class_scoped_import
```python
from semanal import _get_node_for_class_scoped_import
```



---
## add_imported_symbol
```python
from semanal import add_imported_symbol
```

Add an alias to an existing symbol through import.

---
## add_unknown_imported_symbol
```python
from semanal import add_unknown_imported_symbol
```

Add symbol that we don't know what it points to because resolving an import failed.

This can happen if a module is missing, or it is present, but doesn't have
the imported attribute. The `target_name` is the name of symbol in the namespace
it is imported from. For example, for 'from mod import x as y' the target_name is
'mod.x'. This is currently used only to track logical dependencies.

---
## tvar_scope_frame
```python
from semanal import tvar_scope_frame
```



---
## defer
```python
from semanal import defer
```

Defer current analysis target to be analyzed again.

This must be called if something in the current target is
incomplete or has a placeholder node. However, this must *not*
be called during the final analysis iteration! Instead, an error
should be generated. Often 'process_placeholder' is a good
way to either defer or generate an error.

NOTE: Some methods, such as 'anal_type', 'mark_incomplete' and
      'record_incomplete_ref', call this implicitly, or when needed.
      They are usually preferable to a direct defer() call.

---
## track_incomplete_refs
```python
from semanal import track_incomplete_refs
```

Return tag that can be used for tracking references to incomplete names.

---
## found_incomplete_ref
```python
from semanal import found_incomplete_ref
```

Have we encountered an incomplete reference since starting tracking?

---
## record_incomplete_ref
```python
from semanal import record_incomplete_ref
```

Record the encounter of an incomplete reference and defer current analysis target.

---
## mark_incomplete
```python
from semanal import mark_incomplete
```

Mark a definition as incomplete (and defer current analysis target).

Also potentially mark the current namespace as incomplete.

Args:
    name: The name that we weren't able to define (or '*' if the name is unknown)
    node: The node that refers to the name (definition or lvalue)
    becomes_typeinfo: Pass this to PlaceholderNode (used by special forms like
        named tuples that will create TypeInfos).

---
## is_incomplete_namespace
```python
from semanal import is_incomplete_namespace
```

Is a module or class namespace potentially missing some definitions?

If a name is missing from an incomplete namespace, we'll need to defer the
current analysis target.

---
## process_placeholder
```python
from semanal import process_placeholder
```

Process a reference targeting placeholder node.

If this is not a final iteration, defer current node,
otherwise report an error.

The 'kind' argument indicates if this a name or attribute expression
(used for better error message).

---
## cannot_resolve_name
```python
from semanal import cannot_resolve_name
```



---
## qualified_name
```python
from semanal import qualified_name
```



---
## enter
```python
from semanal import enter
```

Enter a function, generator or comprehension scope.

---
## is_func_scope
```python
from semanal import is_func_scope
```



---
## is_nested_within_func_scope
```python
from semanal import is_nested_within_func_scope
```

Are we underneath a function scope, even if we are in a nested class also?

---
## is_class_scope
```python
from semanal import is_class_scope
```



---
## is_module_scope
```python
from semanal import is_module_scope
```



---
## current_symbol_kind
```python
from semanal import current_symbol_kind
```



---
## current_symbol_table
```python
from semanal import current_symbol_table
```



---
## is_global_or_nonlocal
```python
from semanal import is_global_or_nonlocal
```



---
## add_exports
```python
from semanal import add_exports
```



---
## name_not_defined
```python
from semanal import name_not_defined
```



---
## already_defined
```python
from semanal import already_defined
```



---
## name_already_defined
```python
from semanal import name_already_defined
```



---
## attribute_already_defined
```python
from semanal import attribute_already_defined
```



---
## is_local_name
```python
from semanal import is_local_name
```

Does name look like reference to a definition in the current module?

---
## in_checked_function
```python
from semanal import in_checked_function
```

Should we type-check the current function?

- Yes if --check-untyped-defs is set.
- Yes outside functions.
- Yes in annotated functions.
- No otherwise.

---
## fail
```python
from semanal import fail
```



---
## note
```python
from semanal import note
```



---
## incomplete_feature_enabled
```python
from semanal import incomplete_feature_enabled
```



---
## accept
```python
from semanal import accept
```



---
## expr_to_analyzed_type
```python
from semanal import expr_to_analyzed_type
```



---
## analyze_type_expr
```python
from semanal import analyze_type_expr
```



---
## type_analyzer
```python
from semanal import type_analyzer
```



---
## expr_to_unanalyzed_type
```python
from semanal import expr_to_unanalyzed_type
```



---
## anal_type
```python
from semanal import anal_type
```

Semantically analyze a type.

Args:
    typ: Type to analyze (if already analyzed, this is a no-op)
    allow_placeholder: If True, may return PlaceholderType if
        encountering an incomplete definition

Return None only if some part of the type couldn't be bound *and* it
referred to an incomplete namespace or definition. In this case also
defer as needed. During a final iteration this won't return None;
instead report an error if the type can't be analyzed and return
AnyType.

In case of other errors, report an error message and return AnyType.

NOTE: The caller shouldn't defer even if this returns None or a
      placeholder type.

---
## class_type
```python
from semanal import class_type
```



---
## schedule_patch
```python
from semanal import schedule_patch
```



---
## report_hang
```python
from semanal import report_hang
```



---
## add_plugin_dependency
```python
from semanal import add_plugin_dependency
```

Add dependency from trigger to a target.

If the target is not given explicitly, use the current target.

---
## add_type_alias_deps
```python
from semanal import add_type_alias_deps
```

Add full names of type aliases on which the current node depends.

This is used by fine-grained incremental mode to re-check the corresponding nodes.
If `target` is None, then the target node used will be the current scope.

---
## is_mangled_global
```python
from semanal import is_mangled_global
```



---
## is_initial_mangled_global
```python
from semanal import is_initial_mangled_global
```



---
## parse_bool
```python
from semanal import parse_bool
```



---
## parse_str_literal
```python
from semanal import parse_str_literal
```

Attempt to find the string literal value of the given expression. Returns `None` if no
literal value can be found.

---
## set_future_import_flags
```python
from semanal import set_future_import_flags
```



---
## is_future_flag_set
```python
from semanal import is_future_flag_set
```



---
## parse_dataclass_transform_spec
```python
from semanal import parse_dataclass_transform_spec
```

Build a DataclassTransformSpec from the arguments passed to the given call to
typing.dataclass_transform.

---
## parse_dataclass_transform_field_specifiers
```python
from semanal import parse_dataclass_transform_field_specifiers
```



---
## visit_any
```python
from semanal import visit_any
```



---
## visit_type_alias_type
```python
from semanal import visit_type_alias_type
```



---
## helper
```python
from semanal import helper
```



---
## __name__
```python
from checkpattern import __name__
```

Pattern checker. This file is conceptually part of TypeChecker.

---
## PatternType
```python
from checkpattern import PatternType
```



---
## PatternChecker
```python
from checkpattern import PatternChecker
```

Pattern checker.

This class checks if a pattern can match a type, what the type can be narrowed to, and what
type capture patterns should be inferred as.

---
## get_match_arg_names
```python
from checkpattern import get_match_arg_names
```



---
## get_var
```python
from checkpattern import get_var
```

Warning: this in only true for expressions captured by a match statement.
Don't call it from anywhere else

---
## get_type_range
```python
from checkpattern import get_type_range
```



---
## is_uninhabited
```python
from checkpattern import is_uninhabited
```



---
## __init__
```python
from checkpattern import __init__
```



---
## accept
```python
from checkpattern import accept
```



---
## visit_as_pattern
```python
from checkpattern import visit_as_pattern
```



---
## visit_or_pattern
```python
from checkpattern import visit_or_pattern
```



---
## visit_value_pattern
```python
from checkpattern import visit_value_pattern
```



---
## visit_singleton_pattern
```python
from checkpattern import visit_singleton_pattern
```



---
## visit_sequence_pattern
```python
from checkpattern import visit_sequence_pattern
```



---
## get_sequence_type
```python
from checkpattern import get_sequence_type
```



---
## contract_starred_pattern_types
```python
from checkpattern import contract_starred_pattern_types
```

Contracts a list of types in a sequence pattern depending on the position of a starred
capture pattern.

For example if the sequence pattern [a, *b, c] is matched against types [bool, int, str,
bytes] the contracted types are [bool, Union[int, str], bytes].

If star_pos in None the types are returned unchanged.

---
## expand_starred_pattern_types
```python
from checkpattern import expand_starred_pattern_types
```

Undoes the contraction done by contract_starred_pattern_types.

For example if the sequence pattern is [a, *b, c] and types [bool, int, str] are extended
to length 4 the result is [bool, int, int, str].

---
## visit_starred_pattern
```python
from checkpattern import visit_starred_pattern
```



---
## visit_mapping_pattern
```python
from checkpattern import visit_mapping_pattern
```



---
## get_mapping_item_type
```python
from checkpattern import get_mapping_item_type
```



---
## get_simple_mapping_item_type
```python
from checkpattern import get_simple_mapping_item_type
```



---
## visit_class_pattern
```python
from checkpattern import visit_class_pattern
```



---
## should_self_match
```python
from checkpattern import should_self_match
```



---
## can_match_sequence
```python
from checkpattern import can_match_sequence
```



---
## generate_types_from_names
```python
from checkpattern import generate_types_from_names
```



---
## update_type_map
```python
from checkpattern import update_type_map
```



---
## construct_sequence_child
```python
from checkpattern import construct_sequence_child
```

If outer_type is a child class of typing.Sequence returns a new instance of
outer_type, that is a Sequence of inner_type. If outer_type is not a child class of
typing.Sequence just returns a Sequence of inner_type

For example:
construct_sequence_child(List[int], str) = List[str]

TODO: this doesn't make sense. For example if one has class S(Sequence[int], Generic[T])
or class T(Sequence[Tuple[T, T]]), there is no way any of those can map to Sequence[str].

---
## early_non_match
```python
from checkpattern import early_non_match
```



---
## __name__
```python
from mixedtraverser import __name__
```



---
## MixedTraverserVisitor
```python
from mixedtraverser import MixedTraverserVisitor
```

Recursive traversal of both Node and Type objects.

---
## __init__
```python
from mixedtraverser import __init__
```



---
## visit_var
```python
from mixedtraverser import visit_var
```



---
## visit_func
```python
from mixedtraverser import visit_func
```



---
## visit_class_def
```python
from mixedtraverser import visit_class_def
```



---
## visit_type_alias_expr
```python
from mixedtraverser import visit_type_alias_expr
```



---
## visit_type_var_expr
```python
from mixedtraverser import visit_type_var_expr
```



---
## visit_typeddict_expr
```python
from mixedtraverser import visit_typeddict_expr
```



---
## visit_namedtuple_expr
```python
from mixedtraverser import visit_namedtuple_expr
```



---
## visit__promote_expr
```python
from mixedtraverser import visit__promote_expr
```



---
## visit_newtype_expr
```python
from mixedtraverser import visit_newtype_expr
```



---
## visit_assignment_stmt
```python
from mixedtraverser import visit_assignment_stmt
```



---
## visit_for_stmt
```python
from mixedtraverser import visit_for_stmt
```



---
## visit_with_stmt
```python
from mixedtraverser import visit_with_stmt
```



---
## visit_cast_expr
```python
from mixedtraverser import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from mixedtraverser import visit_assert_type_expr
```



---
## visit_type_application
```python
from mixedtraverser import visit_type_application
```



---
## visit_optional_type
```python
from mixedtraverser import visit_optional_type
```



---
## __name__
```python
from subtypes import __name__
```



---
## SubtypeContext
```python
from subtypes import SubtypeContext
```



---
## is_subtype
```python
from subtypes import is_subtype
```

Is 'left' subtype of 'right'?

Also consider Any to be a subtype of any type, and vice versa. This
recursively applies to components of composite types (List[int] is subtype
of List[Any], for example).

type_parameter_checker is used to check the type parameters (for example,
A with B in is_subtype(C[A], C[B]). The default checks for subtype relation
between the type arguments (e.g., A and B), taking the variance of the
type var into account.

---
## is_proper_subtype
```python
from subtypes import is_proper_subtype
```

Is left a proper subtype of right?

For proper subtypes, there's no need to rely on compatibility due to
Any types. Every usable type is a proper subtype of itself.

If erase_instances is True, erase left instance *after* mapping it to supertype
(this is useful for runtime isinstance() checks). If keep_erased_types is True,
do not consider ErasedType a subtype of all types (used by type inference against unions).

---
## is_equivalent
```python
from subtypes import is_equivalent
```



---
## is_same_type
```python
from subtypes import is_same_type
```

Are these types proper subtypes of each other?

This means types may have different representation (e.g. an alias, or
a non-simplified union) but are semantically exchangeable in all contexts.

---
## _is_subtype
```python
from subtypes import _is_subtype
```



---
## check_type_parameter
```python
from subtypes import check_type_parameter
```



---
## SubtypeVisitor
```python
from subtypes import SubtypeVisitor
```



---
## pop_on_exit
```python
from subtypes import pop_on_exit
```



---
## is_protocol_implementation
```python
from subtypes import is_protocol_implementation
```

Check whether 'left' implements the protocol 'right'.

If 'proper_subtype' is True, then check for a proper subtype.
Treat recursive protocols by using the 'assuming' structural subtype matrix
(in sparse representation, i.e. as a list of pairs (subtype, supertype)),
see also comment in nodes.TypeInfo. When we enter a check for classes
(A, P), defined as following::

  class P(Protocol):
      def f(self) -> P: ...
  class A:
      def f(self) -> A: ...

this results in A being a subtype of P without infinite recursion.
On every false result, we pop the assumption, thus avoiding an infinite recursion
as well.

---
## find_member
```python
from subtypes import find_member
```

Find the type of member by 'name' in 'itype's TypeInfo.

Find the member type after applying type arguments from 'itype', and binding
'self' to 'subtype'. Return None if member was not found.

---
## get_member_flags
```python
from subtypes import get_member_flags
```

Detect whether a member 'name' is settable, whether it is an
instance or class variable, and whether it is class or static method.

The flags are defined as following:
* IS_SETTABLE: whether this attribute can be set, not set for methods and
  non-settable properties;
* IS_CLASSVAR: set if the variable is annotated as 'x: ClassVar[t]';
* IS_CLASS_OR_STATIC: set for methods decorated with @classmethod or
  with @staticmethod.

---
## find_node_type
```python
from subtypes import find_node_type
```

Find type of a variable or method 'node' (maybe also a decorated method).
Apply type arguments from 'itype', and bind 'self' to 'subtype'.

---
## non_method_protocol_members
```python
from subtypes import non_method_protocol_members
```

Find all non-callable members of a protocol.

---
## is_callable_compatible
```python
from subtypes import is_callable_compatible
```

Is the left compatible with the right, using the provided compatibility check?

is_compat:
    The check we want to run against the parameters.

is_compat_return:
    The check we want to run against the return type.
    If None, use the 'is_compat' check.

check_args_covariantly:
    If true, check if the left's args is compatible with the right's
    instead of the other way around (contravariantly).

    This function is mostly used to check if the left is a subtype of the right which
    is why the default is to check the args contravariantly. However, it's occasionally
    useful to check the args using some other check, so we leave the variance
    configurable.

    For example, when checking the validity of overloads, it's useful to see if
    the first overload alternative has more precise arguments than the second.
    We would want to check the arguments covariantly in that case.

    Note! The following two function calls are NOT equivalent:

        is_callable_compatible(f, g, is_compat=is_subtype, check_args_covariantly=False)
        is_callable_compatible(g, f, is_compat=is_subtype, check_args_covariantly=True)

    The two calls are similar in that they both check the function arguments in
    the same direction: they both run `is_subtype(argument_from_g, argument_from_f)`.

    However, the two calls differ in which direction they check things like
    keyword arguments. For example, suppose f and g are defined like so:

        def f(x: int, *y: int) -> int: ...
        def g(x: int) -> int: ...

    In this case, the first call will succeed and the second will fail: f is a
    valid stand-in for g but not vice-versa.

allow_partial_overlap:
    By default this function returns True if and only if *all* calls to left are
    also calls to right (with respect to the provided 'is_compat' function).

    If this parameter is set to 'True', we return True if *there exists at least one*
    call to left that's also a call to right.

    In other words, we perform an existential check instead of a universal one;
    we require left to only overlap with right instead of being a subset.

    For example, suppose we set 'is_compat' to some subtype check and compare following:

        f(x: float, y: str = "...", *args: bool) -> str
        g(*args: int) -> str

    This function would normally return 'False': f is not a subtype of g.
    However, we would return True if this parameter is set to 'True': the two
    calls are compatible if the user runs "f_or_g(3)". In the context of that
    specific call, the two functions effectively have signatures of:

        f2(float) -> str
        g2(int) -> str

    Here, f2 is a valid subtype of g2 so we return True.

    Specifically, if this parameter is set this function will:

    -   Ignore optional arguments on either the left or right that have no
        corresponding match.
    -   No longer mandate optional arguments on either side are also optional
        on the other.
    -   No longer mandate that if right has a *arg or **kwarg that left must also
        have the same.

    Note: when this argument is set to True, this function becomes "symmetric" --
    the following calls are equivalent:

        is_callable_compatible(f, g,
                               is_compat=some_check,
                               check_args_covariantly=False,
                               allow_partial_overlap=True)
        is_callable_compatible(g, f,
                               is_compat=some_check,
                               check_args_covariantly=True,
                               allow_partial_overlap=True)

    If the 'some_check' function is also symmetric, the two calls would be equivalent
    whether or not we check the args covariantly.

---
## are_trivial_parameters
```python
from subtypes import are_trivial_parameters
```



---
## is_trivial_suffix
```python
from subtypes import is_trivial_suffix
```



---
## are_parameters_compatible
```python
from subtypes import are_parameters_compatible
```

Helper function for is_callable_compatible, used for Parameter compatibility

---
## are_args_compatible
```python
from subtypes import are_args_compatible
```



---
## flip_compat_check
```python
from subtypes import flip_compat_check
```



---
## unify_generic_callable
```python
from subtypes import unify_generic_callable
```

Try to unify a generic callable type with another callable type.

Return unified CallableType if successful; otherwise, return None.

---
## try_restrict_literal_union
```python
from subtypes import try_restrict_literal_union
```

Return the items of t, excluding any occurrence of s, if and only if
  - t only contains simple literals
  - s is a simple literal

Otherwise, returns None

---
## restrict_subtype_away
```python
from subtypes import restrict_subtype_away
```

Return t minus s for runtime type assertions.

If we can't determine a precise result, return a supertype of the
ideal result (just t is a valid result).

This is used for type inference of runtime type checks such as
isinstance(). Currently, this just removes elements of a union type.

---
## covers_at_runtime
```python
from subtypes import covers_at_runtime
```

Will isinstance(item, supertype) always return True at runtime?

---
## is_more_precise
```python
from subtypes import is_more_precise
```

Check if left is a more precise type than right.

A left is a proper subtype of right, left is also more precise than
right. Also, if right is Any, left is more precise than right, for
any left.

---
## all_non_object_members
```python
from subtypes import all_non_object_members
```



---
## infer_variance
```python
from subtypes import infer_variance
```

Infer the variance of the ith type variable of a generic class.

Return True if successful. This can fail if some inferred types aren't ready.

---
## infer_class_variances
```python
from subtypes import infer_class_variances
```



---
## __init__
```python
from subtypes import __init__
```



---
## check_context
```python
from subtypes import check_context
```



---
## build_subtype_kind
```python
from subtypes import build_subtype_kind
```



---
## visit_unbound_type
```python
from subtypes import visit_unbound_type
```



---
## visit_any
```python
from subtypes import visit_any
```



---
## visit_none_type
```python
from subtypes import visit_none_type
```



---
## visit_uninhabited_type
```python
from subtypes import visit_uninhabited_type
```



---
## visit_erased_type
```python
from subtypes import visit_erased_type
```



---
## visit_deleted_type
```python
from subtypes import visit_deleted_type
```



---
## visit_instance
```python
from subtypes import visit_instance
```



---
## visit_type_var
```python
from subtypes import visit_type_var
```



---
## visit_param_spec
```python
from subtypes import visit_param_spec
```



---
## visit_type_var_tuple
```python
from subtypes import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from subtypes import visit_unpack_type
```



---
## visit_parameters
```python
from subtypes import visit_parameters
```



---
## visit_callable_type
```python
from subtypes import visit_callable_type
```



---
## visit_tuple_type
```python
from subtypes import visit_tuple_type
```



---
## variadic_tuple_subtype
```python
from subtypes import variadic_tuple_subtype
```

Check subtyping between two potentially variadic tuples.

Most non-trivial cases here are due to variadic unpacks like *tuple[X, ...],
we handle such unpacks as infinite unions Tuple[()] | Tuple[X] | Tuple[X, X] | ...

Note: the cases where right is fixed or has *Ts unpack should be handled
by the caller.

---
## visit_typeddict_type
```python
from subtypes import visit_typeddict_type
```



---
## visit_literal_type
```python
from subtypes import visit_literal_type
```



---
## visit_overloaded
```python
from subtypes import visit_overloaded
```



---
## visit_union_type
```python
from subtypes import visit_union_type
```



---
## visit_partial_type
```python
from subtypes import visit_partial_type
```



---
## visit_type_type
```python
from subtypes import visit_type_type
```



---
## visit_type_alias_type
```python
from subtypes import visit_type_alias_type
```



---
## _incompatible
```python
from subtypes import _incompatible
```



---
## is_different
```python
from subtypes import is_different
```

Checks if the left and right items are different.

If the right item is unspecified (e.g. if the right callable doesn't care
about what name or position its arg has), we default to returning False.

If we're allowing partial overlap, we also default to returning False
if the left callable also doesn't care.

---
## new_is_compat
```python
from subtypes import new_is_compat
```



---
## report
```python
from subtypes import report
```



---
## __name__
```python
from typevartuples import __name__
```

Helpers for interacting with type var tuples.

---
## split_with_instance
```python
from typevartuples import split_with_instance
```



---
## extract_unpack
```python
from typevartuples import extract_unpack
```

Given a list of types, extracts either a single type from an unpack, or returns None.

---
## __name__
```python
from sharedparse import __name__
```



---
## special_function_elide_names
```python
from sharedparse import special_function_elide_names
```



---
## argument_elide_name
```python
from sharedparse import argument_elide_name
```



---
## __name__
```python
from argmap import __name__
```

Utilities for mapping between actual and formal arguments (and their types).

---
## map_actuals_to_formals
```python
from argmap import map_actuals_to_formals
```

Calculate mapping between actual (caller) args and formals.

The result contains a list of caller argument indexes mapping to each
callee argument index, indexed by callee index.

The caller_arg_type argument should evaluate to the type of the actual
argument type with the given index.

---
## map_formals_to_actuals
```python
from argmap import map_formals_to_actuals
```

Calculate the reverse mapping of map_actuals_to_formals.

---
## ArgTypeExpander
```python
from argmap import ArgTypeExpander
```

Utility class for mapping actual argument types to formal arguments.

One of the main responsibilities is to expand caller tuple *args and TypedDict
**kwargs, and to keep track of which tuple/TypedDict items have already been
consumed.

Example:

   def f(x: int, *args: str) -> None: ...
   f(*(1, 'x', 1.1))

We'd call expand_actual_type three times:

  1. The first call would provide 'int' as the actual type of 'x' (from '1').
  2. The second call would provide 'str' as one of the actual types for '*args'.
  2. The third call would provide 'float' as one of the actual types for '*args'.

A single instance can process all the arguments for a single call. Each call
needs a separate instance since instances have per-call state.

---
## __init__
```python
from argmap import __init__
```



---
## expand_actual_type
```python
from argmap import expand_actual_type
```

Return the actual (caller) type(s) of a formal argument with the given kinds.

If the actual argument is a tuple *args, return the next individual tuple item that
maps to the formal arg.

If the actual argument is a TypedDict **kwargs, return the next matching typed dict
value type based on formal argument name and kind.

This is supposed to be called for each formal, in order. Call multiple times per
formal if multiple actuals map to a formal.

---
## __name__
```python
from find_sources import __name__
```

Routines for finding the sources that mypy will check

---
## InvalidSourceList
```python
from find_sources import InvalidSourceList
```

Exception indicating a problem in the list of sources given to mypy.

---
## create_source_list
```python
from find_sources import create_source_list
```

From a list of source files/directories, makes a list of BuildSources.

Raises InvalidSourceList on errors.

---
## keyfunc
```python
from find_sources import keyfunc
```

Determines sort order for directory listing.

The desirable properties are:
1) foo < foo.pyi < foo.py
2) __init__.py[i] < foo

---
## normalise_package_base
```python
from find_sources import normalise_package_base
```



---
## get_explicit_package_bases
```python
from find_sources import get_explicit_package_bases
```

Returns explicit package bases to use if the option is enabled, or None if disabled.

We currently use MYPYPATH and the current directory as the package bases. In the future,
when --namespace-packages is the default could also use the values passed with the
--package-root flag, see #9632.

Values returned are normalised so we can use simple string comparisons in
SourceFinder.is_explicit_package_base

---
## SourceFinder
```python
from find_sources import SourceFinder
```



---
## module_join
```python
from find_sources import module_join
```

Join module ids, accounting for a possibly empty parent.

---
## strip_py
```python
from find_sources import strip_py
```

Strip a trailing .py or .pyi suffix.

Return None if no such suffix is found.

---
## __init__
```python
from find_sources import __init__
```



---
## is_explicit_package_base
```python
from find_sources import is_explicit_package_base
```



---
## find_sources_in_dir
```python
from find_sources import find_sources_in_dir
```



---
## crawl_up
```python
from find_sources import crawl_up
```

Given a .py[i] filename, return module and base directory.

For example, given "xxx/yyy/foo/bar.py", we might return something like:
("foo.bar", "xxx/yyy")

If namespace packages is off, we crawl upwards until we find a directory without
an __init__.py

If namespace packages is on, we crawl upwards until the nearest explicit base directory.
Failing that, we return one past the highest directory containing an __init__.py

We won't crawl past directories with invalid package names.
The base directory returned is an absolute path.

---
## crawl_up_dir
```python
from find_sources import crawl_up_dir
```



---
## _crawl_up_helper
```python
from find_sources import _crawl_up_helper
```

Given a directory, maybe returns module and base directory.

We return a non-None value if we were able to find something clearly intended as a base
directory (as adjudicated by being an explicit base directory or by containing a package
with __init__.py).

This distinction is necessary for namespace packages, so that we know when to treat
ourselves as a subpackage.

---
## get_init_file
```python
from find_sources import get_init_file
```

Check whether a directory contains a file named __init__.py[i].

If so, return the file's name (with dir prefixed).  If not, return None.

This prefers .pyi over .py (because of the ordering of PY_EXTENSIONS).

---
## __name__
```python
from stubtest import __name__
```

Tests for stubs.

Verify that various things in stubs are consistent with how things behave at runtime.

---
## Missing
```python
from stubtest import Missing
```

Marker object for things that are missing (from a stub or the runtime).

---
## Unrepresentable
```python
from stubtest import Unrepresentable
```

Marker object for unrepresentable parameter defaults.

---
## _style
```python
from stubtest import _style
```

Wrapper around mypy.util for fancy formatting.

---
## _truncate
```python
from stubtest import _truncate
```



---
## StubtestFailure
```python
from stubtest import StubtestFailure
```



---
## Error
```python
from stubtest import Error
```



---
## silent_import_module
```python
from stubtest import silent_import_module
```



---
## test_module
```python
from stubtest import test_module
```

Tests a given module's stub against introspecting it at runtime.

Requires the stub to have been built already, accomplished by a call to ``build_stubs``.

:param module_name: The module to test

---
## verify
```python
from stubtest import verify
```

Entry point for comparing a stub to a runtime object.

We use single dispatch based on the type of ``stub``.

:param stub: The mypy node representing a part of the stub
:param runtime: The runtime object corresponding to ``stub``

---
## _verify_exported_names
```python
from stubtest import _verify_exported_names
```



---
## _module_symbol_table
```python
from stubtest import _module_symbol_table
```

Retrieve the symbol table for the module (or None on failure).

1) Use inspect to retrieve the source code of the module
2) Use symtable to parse the source (and use what symtable knows for its purposes)

---
## verify_mypyfile
```python
from stubtest import verify_mypyfile
```



---
## _verify_final
```python
from stubtest import _verify_final
```



---
## _verify_metaclass
```python
from stubtest import _verify_metaclass
```



---
## verify_typeinfo
```python
from stubtest import verify_typeinfo
```



---
## _static_lookup_runtime
```python
from stubtest import _static_lookup_runtime
```



---
## _verify_static_class_methods
```python
from stubtest import _verify_static_class_methods
```



---
## _verify_arg_name
```python
from stubtest import _verify_arg_name
```

Checks whether argument names match.

---
## _verify_arg_default_value
```python
from stubtest import _verify_arg_default_value
```

Checks whether argument default values are compatible.

---
## maybe_strip_cls
```python
from stubtest import maybe_strip_cls
```



---
## Signature
```python
from stubtest import Signature
```



---
## _verify_signature
```python
from stubtest import _verify_signature
```



---
## _is_private_parameter
```python
from stubtest import _is_private_parameter
```



---
## verify_funcitem
```python
from stubtest import verify_funcitem
```



---
## verify_none
```python
from stubtest import verify_none
```



---
## verify_var
```python
from stubtest import verify_var
```



---
## verify_overloadedfuncdef
```python
from stubtest import verify_overloadedfuncdef
```



---
## verify_typevarexpr
```python
from stubtest import verify_typevarexpr
```



---
## verify_paramspecexpr
```python
from stubtest import verify_paramspecexpr
```



---
## _verify_readonly_property
```python
from stubtest import _verify_readonly_property
```



---
## _verify_abstract_status
```python
from stubtest import _verify_abstract_status
```



---
## _verify_final_method
```python
from stubtest import _verify_final_method
```



---
## _resolve_funcitem_from_decorator
```python
from stubtest import _resolve_funcitem_from_decorator
```

Returns a FuncItem that corresponds to the output of the decorator.

Returns None if we can't figure out what that would be. For convenience, this function also
accepts FuncItems.

---
## verify_decorator
```python
from stubtest import verify_decorator
```



---
## verify_typealias
```python
from stubtest import verify_typealias
```



---
## is_probably_private
```python
from stubtest import is_probably_private
```



---
## is_probably_a_function
```python
from stubtest import is_probably_a_function
```



---
## is_read_only_property
```python
from stubtest import is_read_only_property
```



---
## safe_inspect_signature
```python
from stubtest import safe_inspect_signature
```



---
## describe_runtime_callable
```python
from stubtest import describe_runtime_callable
```



---
## is_subtype_helper
```python
from stubtest import is_subtype_helper
```

Checks whether ``left`` is a subtype of ``right``.

---
## get_mypy_type_of_runtime_value
```python
from stubtest import get_mypy_type_of_runtime_value
```

Returns a mypy type object representing the type of ``runtime``.

Returns None if we can't find something that works.

---
## build_stubs
```python
from stubtest import build_stubs
```

Uses mypy to construct stub objects for the given modules.

This sets global state that ``get_stub`` can access.

Returns all modules we might want to check. If ``find_submodules`` is False, this is equal
to ``modules``.

:param modules: List of modules to build stubs for.
:param options: Mypy options for finding and building stubs.
:param find_submodules: Whether to attempt to find submodules of the given modules as well.

---
## get_stub
```python
from stubtest import get_stub
```

Returns a stub object for the given module, if we've built one.

---
## get_typeshed_stdlib_modules
```python
from stubtest import get_typeshed_stdlib_modules
```

Returns a list of stdlib modules in typeshed (for current Python version).

---
## get_importable_stdlib_modules
```python
from stubtest import get_importable_stdlib_modules
```

Return all importable stdlib modules at runtime.

---
## get_allowlist_entries
```python
from stubtest import get_allowlist_entries
```



---
## _Arguments
```python
from stubtest import _Arguments
```



---
## test_stubs
```python
from stubtest import test_stubs
```

This is stubtest! It's time to test the stubs!

---
## parse_options
```python
from stubtest import parse_options
```



---
## main
```python
from stubtest import main
```



---
## __repr__
```python
from stubtest import __repr__
```



---
## __init__
```python
from stubtest import __init__
```



---
## is_missing_stub
```python
from stubtest import is_missing_stub
```

Whether or not the error is for something missing from the stub.

---
## is_positional_only_related
```python
from stubtest import is_positional_only_related
```

Whether or not the error is for something being (or not being) positional-only.

---
## get_description
```python
from stubtest import get_description
```

Returns a description of the error.

:param concise: Whether to return a concise, one-line description

---
## _belongs_to_runtime
```python
from stubtest import _belongs_to_runtime
```

Heuristics to determine whether a name originates from another module.

---
## strip_prefix
```python
from stubtest import strip_prefix
```



---
## names_approx_match
```python
from stubtest import names_approx_match
```



---
## __str__
```python
from stubtest import __str__
```



---
## from_funcitem
```python
from stubtest import from_funcitem
```



---
## from_inspect_signature
```python
from stubtest import from_inspect_signature
```



---
## from_overloadedfuncdef
```python
from stubtest import from_overloadedfuncdef
```

Returns a Signature from an OverloadedFuncDef.

If life were simple, to verify_overloadedfuncdef, we'd just verify_funcitem for each of its
items. Unfortunately, life isn't simple and overloads are pretty deceitful. So instead, we
try and combine the overload's items into a single signature that is compatible with any
lies it might try to tell.

---
## apply_decorator_to_funcitem
```python
from stubtest import apply_decorator_to_funcitem
```



---
## anytype
```python
from stubtest import anytype
```



---
## exists_in_version
```python
from stubtest import exists_in_version
```



---
## strip_comments
```python
from stubtest import strip_comments
```



---
## SubClass
```python
from stubtest import SubClass
```



---
## get_name
```python
from stubtest import get_name
```



---
## get_type
```python
from stubtest import get_type
```



---
## has_default
```python
from stubtest import has_default
```



---
## get_desc
```python
from stubtest import get_desc
```



---
## get_position
```python
from stubtest import get_position
```



---
## get_kind
```python
from stubtest import get_kind
```



---
## set_strict_flags
```python
from stubtest import set_strict_flags
```



---
## __name__
```python
from jinja2glue import __name__
```

Glue code for the jinja2 templating engine.

---
## _tobool
```python
from jinja2glue import _tobool
```



---
## _toint
```python
from jinja2glue import _toint
```



---
## _todim
```python
from jinja2glue import _todim
```

Make val a css dimension. In particular the following transformations
are performed:

- None -> 'initial' (default CSS value)
- 0 -> '0'
- ints and string representations of ints are interpreted as pixels.

Everything else is returned unchanged.

---
## _slice_index
```python
from jinja2glue import _slice_index
```



---
## accesskey
```python
from jinja2glue import accesskey
```

Helper to output each access key only once.

---
## idgen
```python
from jinja2glue import idgen
```



---
## warning
```python
from jinja2glue import warning
```



---
## SphinxFileSystemLoader
```python
from jinja2glue import SphinxFileSystemLoader
```

FileSystemLoader subclass that is not so strict about '..'  entries in
template names.

---
## BuiltinTemplateLoader
```python
from jinja2glue import BuiltinTemplateLoader
```

Interfaces the rendering environment of jinja2 for use in Sphinx.

---
## __init__
```python
from jinja2glue import __init__
```



---
## current
```python
from jinja2glue import current
```



---
## __next__
```python
from jinja2glue import __next__
```



---
## get_source
```python
from jinja2glue import get_source
```



---
## init
```python
from jinja2glue import init
```



---
## render
```python
from jinja2glue import render
```



---
## render_string
```python
from jinja2glue import render_string
```



---
## newest_template_mtime
```python
from jinja2glue import newest_template_mtime
```



---
## uptodate
```python
from jinja2glue import uptodate
```



---
## __name__
```python
from theming import __name__
```

Theming support for LaTeX builder.

---
## Theme
```python
from theming import Theme
```

A set of LaTeX configurations.

---
## HTMLThemeFactory
```python
from theming import HTMLThemeFactory
```

A factory class for HTML Themes.

---
## _is_archived_theme
```python
from theming import _is_archived_theme
```

Check whether the specified file is an archived theme file or not.

---
## _load_theme_with_ancestors
```python
from theming import _load_theme_with_ancestors
```



---
## _load_theme
```python
from theming import _load_theme
```



---
## _extract_zip
```python
from theming import _extract_zip
```

Extract zip file to target directory.

---
## _load_theme_toml
```python
from theming import _load_theme_toml
```



---
## _validate_theme_toml
```python
from theming import _validate_theme_toml
```



---
## _convert_theme_toml
```python
from theming import _convert_theme_toml
```



---
## _load_theme_conf
```python
from theming import _load_theme_conf
```



---
## _validate_theme_conf
```python
from theming import _validate_theme_conf
```



---
## _convert_theme_conf
```python
from theming import _convert_theme_conf
```



---
## _ConfigFile
```python
from theming import _ConfigFile
```



---
## _migrate_conf_to_toml
```python
from theming import _migrate_conf_to_toml
```



---
## _ThemeToml
```python
from theming import _ThemeToml
```



---
## _ThemeTomlTheme
```python
from theming import _ThemeTomlTheme
```



---
## _ThemeTomlThemePygments
```python
from theming import _ThemeTomlThemePygments
```



---
## __init__
```python
from theming import __init__
```



---
## get_theme_dirs
```python
from theming import get_theme_dirs
```

Return a list of theme directories, beginning with this theme's,
then the base theme's, then that one's base theme's, etc.

---
## get_config
```python
from theming import get_config
```

Return the value for a theme configuration setting, searching the
base theme chain.

---
## get_options
```python
from theming import get_options
```

Return a dictionary of theme options and their values.

---
## _cleanup
```python
from theming import _cleanup
```

Remove temporary directories.

---
## _load_builtin_themes
```python
from theming import _load_builtin_themes
```

Load built-in themes.

---
## _load_additional_themes
```python
from theming import _load_additional_themes
```

Load additional themes placed at specified directories.

---
## _load_entry_point_themes
```python
from theming import _load_entry_point_themes
```

Try to load a theme with the specified name.

This uses the ``sphinx.html_themes`` entry point from package metadata.

---
## _find_themes
```python
from theming import _find_themes
```

Search themes from specified directory.

---
## create
```python
from theming import create
```

Create an instance of theme.

---
## __repr__
```python
from theming import __repr__
```



---
## __eq__
```python
from theming import __eq__
```



---
## __hash__
```python
from theming import __hash__
```



---
## _load_theme_closure
```python
from theming import _load_theme_closure
```



---
## ConfigValue
```python
from config import ConfigValue
```



---
## is_serializable
```python
from config import is_serializable
```

Check if an object is serializable or not.

---
## ENUM
```python
from config import ENUM
```

Represents the candidates which a config value should be one of.

Example:
    app.add_config_value('latex_show_urls', 'no', None, ENUM('no', 'footnote', 'inline'))

---
## _Opt
```python
from config import _Opt
```



---
## eval_config_file
```python
from config import eval_config_file
```

Evaluate a config file.

---
## _validate_valid_types
```python
from config import _validate_valid_types
```



---
## convert_source_suffix
```python
from config import convert_source_suffix
```

Convert old styled source_suffix to new styled one.

* old style: str or list
* new style: a dict which maps from fileext to filetype

---
## convert_highlight_options
```python
from config import convert_highlight_options
```

Convert old styled highlight_options to new styled one.

* old style: options
* new style: a dict which maps from language name to options

---
## init_numfig_format
```python
from config import init_numfig_format
```

Initialize :confval:`numfig_format`.

---
## correct_copyright_year
```python
from config import correct_copyright_year
```

Correct values of copyright year that are not coherent with
the SOURCE_DATE_EPOCH environment variable (if set)

See https://reproducible-builds.org/specs/source-date-epoch/

---
## _substitute_copyright_year
```python
from config import _substitute_copyright_year
```

Replace the year in a single copyright line.

Legal formats are:

* ``YYYY``
* ``YYYY,``
* ``YYYY ``
* ``YYYY-YYYY,``
* ``YYYY-YYYY ``

The final year in the string is replaced with ``replace_year``.

---
## check_confval_types
```python
from config import check_confval_types
```

Check all values for deviation from the default value's type, since
that can result in TypeErrors all over the place NB.

---
## check_primary_domain
```python
from config import check_primary_domain
```



---
## check_root_doc
```python
from config import check_root_doc
```

Adjust root_doc to 'contents' to support an old project which does not have
any root_doc setting.

---
## setup
```python
from config import setup
```



---
## match
```python
from config import match
```



---
## __repr__
```python
from config import __repr__
```



---
## __eq__
```python
from config import __eq__
```



---
## __lt__
```python
from config import __lt__
```



---
## __hash__
```python
from config import __hash__
```



---
## __setattr__
```python
from config import __setattr__
```



---
## __delattr__
```python
from config import __delattr__
```



---
## __getstate__
```python
from config import __getstate__
```

Obtains serializable data for pickling.

---
## __setstate__
```python
from config import __setstate__
```



---
## values
```python
from config import values
```



---
## overrides
```python
from config import overrides
```



---
## read
```python
from config import read
```

Create a Config object from configuration file.

---
## convert_overrides
```python
from config import convert_overrides
```



---
## pre_init_values
```python
from config import pre_init_values
```



---
## init_values
```python
from config import init_values
```



---
## _report_override_warnings
```python
from config import _report_override_warnings
```



---
## __getattr__
```python
from config import __getattr__
```



---
## __contains__
```python
from config import __contains__
```



---
## add
```python
from config import add
```



---
## filter
```python
from config import filter
```



---
## __name__
```python
from roles import __name__
```

Custom roles for the Matplotlib documentation.

.. warning::

    These roles are considered semi-public. They are only intended to be used in
    the Matplotlib documentation.

However, it can happen that downstream packages end up pulling these roles into
their documentation, which will result in documentation build errors. The following
describes the exact mechanism and how to fix the errors.

There are two ways, Matplotlib docstrings can end up in downstream documentation.
You have to subclass a Matplotlib class and either use the ``:inherited-members:``
option in your autodoc configuration, or you have to override a method without
specifying a new docstring; the new method will inherit the original docstring and
still render in your autodoc. If the docstring contains one of the custom sphinx
roles, you'll see one of the following error messages:

.. code-block:: none

    Unknown interpreted text role "mpltype".
    Unknown interpreted text role "rc".

To fix this, you can add this module as extension to your sphinx :file:`conf.py`::

    extensions = [
        'matplotlib.sphinxext.roles',
        # Other extensions.
    ]

.. warning::

    Direct use of these roles in other packages is not officially supported. We
    reserve the right to modify or remove these roles without prior notification.

---
## XRefRole
```python
from roles import XRefRole
```

A generic cross-referencing role.  To create a callable that can be used as
a role function, create an instance of this class.

The general features of this role are:

* Automatic creation of a reference and a content node.
* Optional separation of title and target with `title <target>`.
* The implementation is a class rather than a function to make
  customization easier.

Customization can be done in two ways:

* Supplying constructor parameters:
  * `fix_parens` to normalize parentheses (strip from target, and add to
    title if configured)
  * `lowercase` to lowercase the target
  * `nodeclass` and `innernodeclass` select the node classes for
    the reference and the content node

* Subclassing and overwriting `process_link()` and/or `result_nodes()`.

---
## AnyXRefRole
```python
from roles import AnyXRefRole
```



---
## PEP
```python
from roles import PEP
```



---
## RFC
```python
from roles import RFC
```



---
## GUILabel
```python
from roles import GUILabel
```



---
## MenuSelection
```python
from roles import MenuSelection
```



---
## EmphasizedLiteral
```python
from roles import EmphasizedLiteral
```



---
## Abbreviation
```python
from roles import Abbreviation
```



---
## Manpage
```python
from roles import Manpage
```



---
## code_role
```python
from roles import code_role
```



---
## setup
```python
from roles import setup
```



---
## __init__
```python
from roles import __init__
```



---
## update_title_and_target
```python
from roles import update_title_and_target
```



---
## run
```python
from roles import run
```



---
## create_non_xref_node
```python
from roles import create_non_xref_node
```



---
## create_xref_node
```python
from roles import create_xref_node
```



---
## process_link
```python
from roles import process_link
```



---
## result_nodes
```python
from roles import result_nodes
```

Called before returning the finished nodes.  *node* is the reference
node if one was created (*is_ref* is then true), else the content node.
This method can add other nodes and must return a ``(nodes, messages)``
tuple (the usual return value of a role function).

---
## build_uri
```python
from roles import build_uri
```



---
## parse
```python
from roles import parse
```



---
## RemovedInSphinx90Warning
```python
from deprecation import RemovedInSphinx90Warning
```



---
## RemovedInSphinx10Warning
```python
from deprecation import RemovedInSphinx10Warning
```



---
## _deprecation_warning
```python
from deprecation import _deprecation_warning
```

Helper function for module-level deprecations using ``__getattr__``.

:param module: The module containing a deprecated object.
:param attribute: The name of the deprecated object.
:param canonical_name: Optional fully-qualified name for its replacement.
:param remove: Target version for removal.
:param raises: Indicate whether to raise an exception instead of a warning.

When *raises* is ``True``, an :exc:`AttributeError` is raised instead
of emitting a warning so that it is easy to locate deprecated objects
in tests that could suppress deprecation warnings.

Usage::

   # deprecated name -> (object to return, canonical path or empty string, removal version)
   _DEPRECATED_OBJECTS = {
       'deprecated_name': (object_to_return, 'fully_qualified_replacement_name', (9, 0)),
   }


   def __getattr__(name: str) -> Any:
       if name not in _DEPRECATED_OBJECTS:
           msg = f'module {__name__!r} has no attribute {name!r}'
           raise AttributeError(msg)

       from sphinx.deprecation import _deprecation_warning

       deprecated_object, canonical_name, remove = _DEPRECATED_OBJECTS[name]
       _deprecation_warning(__name__, name, canonical_name, remove=remove)
       return deprecated_object

---
## SphinxComponentRegistry
```python
from registry import SphinxComponentRegistry
```



---
## merge_source_suffix
```python
from registry import merge_source_suffix
```

Merge any user-specified source_suffix with any added by extensions.

---
## setup
```python
from registry import setup
```



---
## __init__
```python
from registry import __init__
```



---
## add_builder
```python
from registry import add_builder
```



---
## preload_builder
```python
from registry import preload_builder
```



---
## create_builder
```python
from registry import create_builder
```



---
## add_domain
```python
from registry import add_domain
```



---
## has_domain
```python
from registry import has_domain
```



---
## create_domains
```python
from registry import create_domains
```



---
## add_directive_to_domain
```python
from registry import add_directive_to_domain
```



---
## add_role_to_domain
```python
from registry import add_role_to_domain
```



---
## add_index_to_domain
```python
from registry import add_index_to_domain
```



---
## add_object_type
```python
from registry import add_object_type
```



---
## add_crossref_type
```python
from registry import add_crossref_type
```



---
## add_source_suffix
```python
from registry import add_source_suffix
```



---
## add_source_parser
```python
from registry import add_source_parser
```



---
## get_source_parser
```python
from registry import get_source_parser
```



---
## get_source_parsers
```python
from registry import get_source_parsers
```



---
## create_source_parser
```python
from registry import create_source_parser
```



---
## add_translator
```python
from registry import add_translator
```



---
## add_translation_handlers
```python
from registry import add_translation_handlers
```



---
## get_translator_class
```python
from registry import get_translator_class
```



---
## create_translator
```python
from registry import create_translator
```



---
## add_transform
```python
from registry import add_transform
```



---
## get_transforms
```python
from registry import get_transforms
```



---
## add_post_transform
```python
from registry import add_post_transform
```



---
## get_post_transforms
```python
from registry import get_post_transforms
```



---
## add_documenter
```python
from registry import add_documenter
```



---
## add_autodoc_attrgetter
```python
from registry import add_autodoc_attrgetter
```



---
## add_css_files
```python
from registry import add_css_files
```



---
## add_js_file
```python
from registry import add_js_file
```



---
## has_latex_package
```python
from registry import has_latex_package
```



---
## add_latex_package
```python
from registry import add_latex_package
```



---
## add_enumerable_node
```python
from registry import add_enumerable_node
```



---
## add_html_math_renderer
```python
from registry import add_html_math_renderer
```



---
## add_html_theme
```python
from registry import add_html_theme
```



---
## load_extension
```python
from registry import load_extension
```

Load a Sphinx extension.

---
## get_envversion
```python
from registry import get_envversion
```



---
## get_publisher
```python
from registry import get_publisher
```



---
## EventManager
```python
from events import EventManager
```

Event manager for Sphinx.

---
## add
```python
from events import add
```

Register a custom Sphinx event.

---
## connect
```python
from events import connect
```

Connect a handler to specific event.

---
## disconnect
```python
from events import disconnect
```

Disconnect a handler.

---
## emit
```python
from events import emit
```

Emit a Sphinx event.

---
## emit_firstresult
```python
from events import emit_firstresult
```

Emit a Sphinx event and returns first result.

This returns the result of the first handler that doesn't return ``None``.

---
## SphinxBaseReader
```python
from io import SphinxBaseReader
```

A base class of readers for Sphinx.

This replaces reporter by Sphinx's on generating document.

---
## SphinxStandaloneReader
```python
from io import SphinxStandaloneReader
```

A basic document reader for Sphinx.

---
## SphinxI18nReader
```python
from io import SphinxI18nReader
```

A document reader for i18n.

This returns the source line number of original text as current source line number
to let users know where the error happened.
Because the translated texts are partial and they don't have correct line numbers.

---
## SphinxDummyWriter
```python
from io import SphinxDummyWriter
```

Dummy writer module used for generating doctree.

---
## SphinxDummySourceClass
```python
from io import SphinxDummySourceClass
```

Bypass source object as is to cheat Publisher.

---
## SphinxFileInput
```python
from io import SphinxFileInput
```

A basic FileInput for Sphinx.

---
## create_publisher
```python
from io import create_publisher
```



---
## setup
```python
from io import setup
```



---
## get_transforms
```python
from io import get_transforms
```



---
## new_document
```python
from io import new_document
```

Creates a new document object which has a special reporter object good
for logging.

---
## read_source
```python
from io import read_source
```

Read content from source and do post-process.

---
## translate
```python
from io import translate
```



---
## __name__
```python
from addnodes import __name__
```

Document tree nodes that Sphinx defines on top of those in Docutils.

---
## document
```python
from addnodes import document
```

The document root element patched by Sphinx.

This fixes that document.set_id() does not support a node having multiple node Ids.
see https://sourceforge.net/p/docutils/patches/167/

.. important:: This is only for Sphinx internal use.  Please don't use this
               in your extensions.  It will be removed without deprecation period.

---
## translatable
```python
from addnodes import translatable
```

Node which supports translation.

The translation goes forward with following steps:

1. Preserve original translatable messages
2. Apply translated messages from message catalog
3. Extract preserved messages (for gettext builder)

The translatable nodes MUST preserve original messages.
And these messages should not be overridden at applying step.
Because they are used at final step; extraction.

---
## not_smartquotable
```python
from addnodes import not_smartquotable
```

A node which does not support smart-quotes.

---
## toctree
```python
from addnodes import toctree
```

Node for inserting a "TOC tree".

---
## _desc_classes_injector
```python
from addnodes import _desc_classes_injector
```

Helper base class for injecting a fixed list of classes.

Use as the first base class.

---
## desc
```python
from addnodes import desc
```

Node for a list of object signatures and a common description of them.

Contains one or more :py:class:`desc_signature` nodes
and then a single :py:class:`desc_content` node.

This node always has two classes:

- The name of the domain it belongs to, e.g., ``py`` or ``cpp``.
- The name of the object type in the domain, e.g., ``function``.

---
## desc_signature
```python
from addnodes import desc_signature
```

Node for a single object signature.

As default the signature is a single-line signature.
Set ``is_multiline = True`` to describe a multi-line signature.
In that case all child nodes must be :py:class:`desc_signature_line` nodes.

This node always has the classes ``sig``, ``sig-object``, and the domain it belongs to.

---
## desc_signature_line
```python
from addnodes import desc_signature_line
```

Node for a line in a multi-line object signature.

It should only be used as a child of a :py:class:`desc_signature`
with ``is_multiline`` set to ``True``.
Set ``add_permalink = True`` for the line that should get the permalink.

---
## desc_content
```python
from addnodes import desc_content
```

Node for object description content.

Must be the last child node in a :py:class:`desc` node.

---
## desc_inline
```python
from addnodes import desc_inline
```

Node for a signature fragment in inline text.

This is for example used for roles like :rst:role:`cpp:expr`.

This node always has the classes ``sig``, ``sig-inline``,
and the name of the domain it belongs to.

---
## desc_name
```python
from addnodes import desc_name
```

Node for the main object name.

For example, in the declaration of a Python class ``MyModule.MyClass``,
the main name is ``MyClass``.

This node always has the class ``sig-name``.

---
## desc_addname
```python
from addnodes import desc_addname
```

Node for additional name parts for an object.

For example, in the declaration of a Python class ``MyModule.MyClass``,
the additional name part is ``MyModule.``.

This node always has the class ``sig-prename``.

---
## desc_type
```python
from addnodes import desc_type
```

Node for return types or object type names.

---
## desc_returns
```python
from addnodes import desc_returns
```

Node for a "returns" annotation (a la -> in Python).

---
## desc_parameterlist
```python
from addnodes import desc_parameterlist
```

Node for a general parameter list.

As default the parameter list is written in line with the rest of the signature.
Set ``multi_line_parameter_list = True`` to describe a multi-line parameter list.
In that case each parameter will then be written on its own, indented line.

---
## desc_type_parameter_list
```python
from addnodes import desc_type_parameter_list
```

Node for a general type parameter list.

As default the type parameters list is written in line with the rest of the signature.
Set ``multi_line_parameter_list = True`` to describe a multi-line type parameters list.
In that case each type parameter will then be written on its own, indented line.

---
## desc_parameter
```python
from addnodes import desc_parameter
```

Node for a single parameter.

---
## desc_type_parameter
```python
from addnodes import desc_type_parameter
```

Node for a single type parameter.

---
## desc_optional
```python
from addnodes import desc_optional
```

Node for marking optional parts of the parameter list.

---
## desc_annotation
```python
from addnodes import desc_annotation
```

Node for signature annotations (not Python 3-style annotations).

---
## desc_sig_element
```python
from addnodes import desc_sig_element
```

Common parent class of nodes for inline text of a signature.

---
## desc_sig_space
```python
from addnodes import desc_sig_space
```

Node for a space in a signature.

---
## desc_sig_name
```python
from addnodes import desc_sig_name
```

Node for an identifier in a signature.

---
## desc_sig_operator
```python
from addnodes import desc_sig_operator
```

Node for an operator in a signature.

---
## desc_sig_punctuation
```python
from addnodes import desc_sig_punctuation
```

Node for punctuation in a signature.

---
## desc_sig_keyword
```python
from addnodes import desc_sig_keyword
```

Node for a general keyword in a signature.

---
## desc_sig_keyword_type
```python
from addnodes import desc_sig_keyword_type
```

Node for a keyword which is a built-in type in a signature.

---
## desc_sig_literal_number
```python
from addnodes import desc_sig_literal_number
```

Node for a numeric literal in a signature.

---
## desc_sig_literal_string
```python
from addnodes import desc_sig_literal_string
```

Node for a string literal in a signature.

---
## desc_sig_literal_char
```python
from addnodes import desc_sig_literal_char
```

Node for a character literal in a signature.

---
## versionmodified
```python
from addnodes import versionmodified
```

Node for version change entries.

Currently used for "versionadded", "versionchanged", "deprecated"
and "versionremoved" directives.

---
## seealso
```python
from addnodes import seealso
```

Custom "see also" admonition.

---
## productionlist
```python
from addnodes import productionlist
```

Node for grammar production lists.

Contains ``production`` nodes.

---
## production
```python
from addnodes import production
```

Node for a single grammar production rule.

---
## index
```python
from addnodes import index
```

Node for index entries.

This node is created by the ``index`` directive and has one attribute,
``entries``.  Its value is a list of 5-tuples of ``(entrytype, entryname,
target, ignored, key)``.

*entrytype* is one of "single", "pair", "double", "triple".

*key* is categorization characters (usually a single character) for
general index page. For the details of this, please see also:
:rst:dir:`glossary` and issue #2320.

---
## centered
```python
from addnodes import centered
```

Deprecated.

---
## acks
```python
from addnodes import acks
```

Special node for "acks" lists.

---
## hlist
```python
from addnodes import hlist
```

Node for "horizontal lists", i.e. lists that should be compressed to
take up less vertical space.

---
## hlistcol
```python
from addnodes import hlistcol
```

Node for one column in a horizontal list.

---
## compact_paragraph
```python
from addnodes import compact_paragraph
```

Node for a compact paragraph (which never makes a <p> node).

---
## glossary
```python
from addnodes import glossary
```

Node to insert a glossary.

---
## only
```python
from addnodes import only
```

Node for "only" directives (conditional inclusion based on tags).

---
## start_of_file
```python
from addnodes import start_of_file
```

Node to mark start of a new file, used in the LaTeX builder only.

---
## highlightlang
```python
from addnodes import highlightlang
```

Inserted to set the highlight language and line number options for
subsequent code blocks.

---
## tabular_col_spec
```python
from addnodes import tabular_col_spec
```

Node for specifying tabular columns, used for LaTeX output.

---
## pending_xref
```python
from addnodes import pending_xref
```

Node for cross-references that cannot be resolved without complete
information about all documents.

These nodes are resolved before writing output, in
BuildEnvironment.resolve_references.

---
## pending_xref_condition
```python
from addnodes import pending_xref_condition
```

Node representing a potential way to create a cross-reference and the
condition in which this way should be used.

This node is only allowed to be placed under a :py:class:`pending_xref`
node.  A **pending_xref** node must contain either no **pending_xref_condition**
nodes or it must only contains **pending_xref_condition** nodes.

The cross-reference resolver will replace a :py:class:`pending_xref` which
contains **pending_xref_condition** nodes by the content of exactly one of
those **pending_xref_condition** nodes' content. It uses the **condition**
attribute to decide which **pending_xref_condition** node's content to
use. For example, let us consider how the cross-reference resolver acts on::

    <pending_xref refdomain="py" reftarget="io.StringIO ...>
        <pending_xref_condition condition="resolved">
            <literal>
                StringIO
        <pending_xref_condition condition="*">
            <literal>
                io.StringIO

If the cross-reference resolver successfully resolves the cross-reference,
then it rewrites the **pending_xref** as::

    <reference>
        <literal>
            StringIO

Otherwise, if the cross-reference resolution failed, it rewrites the
**pending_xref** as::

    <reference>
        <literal>
            io.StringIO

The **pending_xref_condition** node should have **condition** attribute.
Domains can be store their individual conditions into the attribute to
filter contents on resolving phase.  As a reserved condition name,
``condition="*"`` is used for the fallback of resolution failure.
Additionally, as a recommended condition name, ``condition="resolved"``
represents a resolution success in the intersphinx module.

.. versionadded:: 4.0

---
## number_reference
```python
from addnodes import number_reference
```

Node for number references, similar to pending_xref.

---
## download_reference
```python
from addnodes import download_reference
```

Node for download references, similar to pending_xref.

---
## literal_emphasis
```python
from addnodes import literal_emphasis
```

Node that behaves like `emphasis`, but further text processors are not
applied (e.g. smartypants for HTML output).

---
## literal_strong
```python
from addnodes import literal_strong
```

Node that behaves like `strong`, but further text processors are not
applied (e.g. smartypants for HTML output).

---
## manpage
```python
from addnodes import manpage
```

Node for references to manpages.

---
## setup
```python
from addnodes import setup
```



---
## set_id
```python
from addnodes import set_id
```



---
## preserve_original_messages
```python
from addnodes import preserve_original_messages
```



---
## apply_translated_message
```python
from addnodes import apply_translated_message
```



---
## extract_original_messages
```python
from addnodes import extract_original_messages
```



---
## __init__
```python
from addnodes import __init__
```



---
## child_text_separator
```python
from addnodes import child_text_separator
```



---
## astext
```python
from addnodes import astext
```



---
## __init_subclass__
```python
from addnodes import __init_subclass__
```



---
## __name__
```python
from parsers import __name__
```

pygments.lexers.parsers
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for parser generators.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Parser
```python
from parsers import Parser
```

A base class of source parsers.  The additional parsers should inherit this class instead
of ``docutils.parsers.Parser``.  Compared with ``docutils.parsers.Parser``, this class
improves accessibility to Sphinx APIs.

The subclasses can access sphinx core runtime objects (app, config and env).

---
## RSTParser
```python
from parsers import RSTParser
```

A reST parser for Sphinx.

---
## setup
```python
from parsers import setup
```



---
## set_application
```python
from parsers import set_application
```

set_application will be called from Sphinx to set app and other instance variables

:param sphinx.application.Sphinx app: Sphinx application object

---
## get_transforms
```python
from parsers import get_transforms
```

Sphinx's reST parser replaces a transform class for smart-quotes by its own

refs: sphinx.io.SphinxStandaloneReader

---
## parse
```python
from parsers import parse
```

Parse text and generate a document tree.

---
## decorate
```python
from parsers import decorate
```

Preprocess reST content before parsing.

---
## __name__
```python
from application import __name__
```

Sphinx application class and extensibility interface.

Gracefully adapted from the TextPress system by Armin.

---
## Sphinx
```python
from application import Sphinx
```

The main application class and extensibility interface.

:ivar srcdir: Directory containing source.
:ivar confdir: Directory containing ``conf.py``.
:ivar doctreedir: Directory for storing pickled doctrees.
:ivar outdir: Directory for storing build documents.

---
## TemplateBridge
```python
from application import TemplateBridge
```

This class defines the interface for a "template bridge", that is, a class
that renders templates given a template name and a context.

---
## __init__
```python
from application import __init__
```

Initialize the Sphinx application.

:param srcdir: The path to the source directory.
:param confdir: The path to the configuration directory.
    If not given, it is assumed to be the same as ``srcdir``.
:param outdir: Directory for storing build documents.
:param doctreedir: Directory for caching pickled doctrees.
:param buildername: The name of the builder to use.
:param confoverrides: A dictionary of configuration settings that override the
    settings in the configuration file.
:param status: A file-like object to write status messages to.
:param warning: A file-like object to write warnings to.
:param freshenv: If true, clear the cached environment.
:param warningiserror: If true, warnings become errors.
:param tags: A list of tags to apply.
:param verbosity: The verbosity level.
:param parallel: The maximum number of parallel jobs to use
    when reading/writing documents.
:param keep_going: If true, continue processing when an error occurs.
:param pdb: If true, enable the Python debugger on an exception.

---
## fresh_env_used
```python
from application import fresh_env_used
```

True/False as to whether a new environment was created for this build,
or None if the environment has not been initialised yet.

---
## _init_i18n
```python
from application import _init_i18n
```

Load translated strings from the configured localedirs if enabled in
the configuration.

---
## _init_env
```python
from application import _init_env
```



---
## _create_fresh_env
```python
from application import _create_fresh_env
```



---
## _load_existing_env
```python
from application import _load_existing_env
```



---
## _post_init_env
```python
from application import _post_init_env
```



---
## preload_builder
```python
from application import preload_builder
```



---
## create_builder
```python
from application import create_builder
```



---
## _init_builder
```python
from application import _init_builder
```



---
## build
```python
from application import build
```



---
## setup_extension
```python
from application import setup_extension
```

Import and setup a Sphinx extension module.

Load the extension given by the module *name*.  Use this if your
extension needs the features provided by another extension.  No-op if
called twice.

---
## require_sphinx
```python
from application import require_sphinx
```

Check the Sphinx version if requested.

Compare *version* with the version of the running Sphinx, and abort the
build when it is too old.

:param version: The required version in the form of ``major.minor`` or
                ``(major, minor)``.

.. versionadded:: 1.0
.. versionchanged:: 7.1
   Type of *version* now allows ``(major, minor)`` form.

---
## connect
```python
from application import connect
```

Register *callback* to be called when *event* is emitted.

For details on available core events and the arguments of callback
functions, please see :ref:`events`.

:param event: The name of target event
:param callback: Callback function for the event
:param priority: The priority of the callback.  The callbacks will be invoked
                 in order of *priority* (ascending).
:return: A listener ID.  It can be used for :meth:`disconnect`.

.. versionchanged:: 3.0

   Support *priority*

---
## disconnect
```python
from application import disconnect
```

Unregister callback by *listener_id*.

:param listener_id: A listener_id that :meth:`connect` returns

---
## emit
```python
from application import emit
```

Emit *event* and pass *arguments* to the callback functions.

Return the return values of all callbacks as a list.  Do not emit core
Sphinx events in extensions!

:param event: The name of event that will be emitted
:param args: The arguments for the event
:param allowed_exceptions: The list of exceptions that are allowed in the callbacks

.. versionchanged:: 3.1

   Added *allowed_exceptions* to specify path-through exceptions

---
## emit_firstresult
```python
from application import emit_firstresult
```

Emit *event* and pass *arguments* to the callback functions.

Return the result of the first callback that doesn't return ``None``.

:param event: The name of event that will be emitted
:param args: The arguments for the event
:param allowed_exceptions: The list of exceptions that are allowed in the callbacks

.. versionadded:: 0.5
.. versionchanged:: 3.1

   Added *allowed_exceptions* to specify path-through exceptions

---
## add_builder
```python
from application import add_builder
```

Register a new builder.

:param builder: A builder class
:param override: If true, install the builder forcedly even if another builder
                 is already installed as the same name

.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_config_value
```python
from application import add_config_value
```

Register a configuration value.

This is necessary for Sphinx to recognize new values and set default
values accordingly.


:param name: The name of the configuration value.  It is recommended to be prefixed
             with the extension name (ex. ``html_logo``, ``epub_title``)
:param default: The default value of the configuration.
:param rebuild: The condition of rebuild.  It must be one of those values:

                * ``'env'`` if a change in the setting only takes effect when a
                  document is parsed -- this means that the whole environment must be
                  rebuilt.
                * ``'html'`` if a change in the setting needs a full rebuild of HTML
                  documents.
                * ``''`` if a change in the setting will not need any special rebuild.
:param types: The type of configuration value.  A list of types can be specified.  For
              example, ``[str]`` is used to describe a configuration that takes string
              value.
:param description: A short description of the configuration value.

.. versionchanged:: 0.4
   If the *default* value is a callable, it will be called with the
   config object as its argument in order to get the default value.
   This can be used to implement config values whose default depends on
   other values.

.. versionchanged:: 0.6
   Changed *rebuild* from a simple boolean (equivalent to ``''`` or
   ``'env'``) to a string.  However, booleans are still accepted and
   converted internally.

.. versionadded:: 7.4
   The *description* parameter.

---
## add_event
```python
from application import add_event
```

Register an event called *name*.

This is needed to be able to emit it.

:param name: The name of the event

---
## set_translator
```python
from application import set_translator
```

Register or override a Docutils translator class.

This is used to register a custom output translator or to replace a
builtin translator.  This allows extensions to use a custom translator
and define custom nodes for the translator (see :meth:`add_node`).

:param name: The name of the builder for the translator
:param translator_class: A translator class
:param override: If true, install the translator forcedly even if another translator
                 is already installed as the same name

.. versionadded:: 1.3
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_node
```python
from application import add_node
```

Register a Docutils node class.

This is necessary for Docutils internals.  It may also be used in the
future to validate nodes in the parsed documents.

:param node: A node class
:param kwargs: Visitor functions for each builder (see below)
:param override: If true, install the node forcedly even if another node is already
                 installed as the same name

Node visitor functions for the Sphinx HTML, LaTeX, text and manpage
writers can be given as keyword arguments: the keyword should be one or
more of ``'html'``, ``'latex'``, ``'text'``, ``'man'``, ``'texinfo'``
or any other supported translators, the value a 2-tuple of ``(visit,
depart)`` methods.  ``depart`` can be ``None`` if the ``visit``
function raises :exc:`docutils.nodes.SkipNode`.  Example:

.. code-block:: python

   class math(docutils.nodes.Element): pass

   def visit_math_html(self, node):
       self.body.append(self.starttag(node, 'math'))
   def depart_math_html(self, node):
       self.body.append('</math>')

   app.add_node(math, html=(visit_math_html, depart_math_html))

Obviously, translators for which you don't specify visitor methods will
choke on the node when encountered in a document to translate.

.. versionchanged:: 0.5
   Added the support for keyword arguments giving visit functions.

---
## add_enumerable_node
```python
from application import add_enumerable_node
```

Register a Docutils node class as a numfig target.

Sphinx numbers the node automatically. And then the users can refer it
using :rst:role:`numref`.

:param node: A node class
:param figtype: The type of enumerable nodes.  Each figtype has individual numbering
                sequences.  As system figtypes, ``figure``, ``table`` and
                ``code-block`` are defined.  It is possible to add custom nodes to
                these default figtypes.  It is also possible to define new custom
                figtype if a new figtype is given.
:param title_getter: A getter function to obtain the title of node.  It takes an
                     instance of the enumerable node, and it must return its title as
                     string.  The title is used to the default title of references for
                     :rst:role:`ref`.  By default, Sphinx searches
                     ``docutils.nodes.caption`` or ``docutils.nodes.title`` from the
                     node as a title.
:param kwargs: Visitor functions for each builder (same as :meth:`add_node`)
:param override: If true, install the node forcedly even if another node is already
                 installed as the same name

.. versionadded:: 1.4

---
## add_directive
```python
from application import add_directive
```

Register a Docutils directive.

:param name: The name of the directive
:param cls: A directive class
:param override: If false, do not install it if another directive
                 is already installed as the same name
                 If true, unconditionally install the directive.

For example, a custom directive named ``my-directive`` would be added
like this:

.. code-block:: python

   from docutils.parsers.rst import Directive, directives

   class MyDirective(Directive):
       has_content = True
       required_arguments = 1
       optional_arguments = 0
       final_argument_whitespace = True
       option_spec = {
           'class': directives.class_option,
           'name': directives.unchanged,
       }

       def run(self):
           ...

   def setup(app):
       app.add_directive('my-directive', MyDirective)

For more details, see `the Docutils docs
<https://docutils.sourceforge.io/docs/howto/rst-directives.html>`__ .

.. versionchanged:: 0.6
   Docutils 0.5-style directive classes are now supported.
.. deprecated:: 1.8
   Docutils 0.4-style (function based) directives support is deprecated.
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_role
```python
from application import add_role
```

Register a Docutils role.

:param name: The name of role
:param role: A role function
:param override: If false, do not install it if another role
                 is already installed as the same name
                 If true, unconditionally install the role.

For more details about role functions, see `the Docutils docs
<https://docutils.sourceforge.io/docs/howto/rst-roles.html>`__ .

.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_generic_role
```python
from application import add_generic_role
```

Register a generic Docutils role.

Register a Docutils role that does nothing but wrap its contents in the
node given by *nodeclass*.

:param override: If false, do not install it if another role
                 is already installed as the same name
                 If true, unconditionally install the role.

.. versionadded:: 0.6
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_domain
```python
from application import add_domain
```

Register a domain.

:param domain: A domain class
:param override: If false, do not install it if another domain
                 is already installed as the same name
                 If true, unconditionally install the domain.

.. versionadded:: 1.0
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_directive_to_domain
```python
from application import add_directive_to_domain
```

Register a Docutils directive in a domain.

Like :meth:`add_directive`, but the directive is added to the domain
named *domain*.

:param domain: The name of target domain
:param name: A name of directive
:param cls: A directive class
:param override: If false, do not install it if another directive
                 is already installed as the same name
                 If true, unconditionally install the directive.

.. versionadded:: 1.0
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_role_to_domain
```python
from application import add_role_to_domain
```

Register a Docutils role in a domain.

Like :meth:`add_role`, but the role is added to the domain named
*domain*.

:param domain: The name of the target domain
:param name: The name of the role
:param role: The role function
:param override: If false, do not install it if another role
                 is already installed as the same name
                 If true, unconditionally install the role.

.. versionadded:: 1.0
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_index_to_domain
```python
from application import add_index_to_domain
```

Register a custom index for a domain.

Add a custom *index* class to the domain named *domain*.

:param domain: The name of the target domain
:param index: The index class
:param override: If false, do not install it if another index
                 is already installed as the same name
                 If true, unconditionally install the index.

.. versionadded:: 1.0
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_object_type
```python
from application import add_object_type
```

Register a new object type.

This method is a very convenient way to add a new :term:`object` type
that can be cross-referenced.  It will do this:

- Create a new directive (called *directivename*) for documenting an
  object.  It will automatically add index entries if *indextemplate*
  is nonempty; if given, it must contain exactly one instance of
  ``%s``.  See the example below for how the template will be
  interpreted.
- Create a new role (called *rolename*) to cross-reference to these
  object descriptions.
- If you provide *parse_node*, it must be a function that takes a
  string and a docutils node, and it must populate the node with
  children parsed from the string.  It must then return the name of the
  item to be used in cross-referencing and index entries.  See the
  :file:`conf.py` file in the source for this documentation for an
  example.
- The *objname* (if not given, will default to *directivename*) names
  the type of object.  It is used when listing objects, e.g. in search
  results.

For example, if you have this call in a custom Sphinx extension::

   app.add_object_type('directive', 'dir', 'pair: %s; directive')

you can use this markup in your documents::

   .. rst:directive:: function

      Document a function.

   <...>

   See also the :rst:dir:`function` directive.

For the directive, an index entry will be generated as if you had prepended ::

   .. index:: pair: function; directive

The reference node will be of class ``literal`` (so it will be rendered
in a proportional font, as appropriate for code) unless you give the
*ref_nodeclass* argument, which must be a docutils node class.  Most
useful are ``docutils.nodes.emphasis`` or ``docutils.nodes.strong`` --
you can also use ``docutils.nodes.generated`` if you want no further
text decoration.  If the text should be treated as literal (e.g. no
smart quote replacement), but not have typewriter styling, use
``sphinx.addnodes.literal_emphasis`` or
``sphinx.addnodes.literal_strong``.

For the role content, you have the same syntactical possibilities as
for standard Sphinx roles (see :ref:`xref-syntax`).

If *override* is True, the given object_type is forcedly installed even if
an object_type having the same name is already installed.

.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_crossref_type
```python
from application import add_crossref_type
```

Register a new crossref object type.

This method is very similar to :meth:`~Sphinx.add_object_type` except that the
directive it generates must be empty, and will produce no output.

That means that you can add semantic targets to your sources, and refer
to them using custom roles instead of generic ones (like
:rst:role:`ref`).  Example call::

   app.add_crossref_type('topic', 'topic', 'single: %s',
                         docutils.nodes.emphasis)

Example usage::

   .. topic:: application API

   The application API
   -------------------

   Some random text here.

   See also :topic:`this section <application API>`.

(Of course, the element following the ``topic`` directive needn't be a
section.)


:param override: If false, do not install it if another cross-reference type
                 is already installed as the same name
                 If true, unconditionally install the cross-reference type.

.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_transform
```python
from application import add_transform
```

Register a Docutils transform to be applied after parsing.

Add the standard docutils :class:`~docutils.transforms.Transform`
subclass *transform* to the list of transforms that are applied after
Sphinx parses a reST document.

:param transform: A transform class

.. list-table:: priority range categories for Sphinx transforms
   :widths: 20,80

   * - Priority
     - Main purpose in Sphinx
   * - 0-99
     - Fix invalid nodes by docutils. Translate a doctree.
   * - 100-299
     - Preparation
   * - 300-399
     - early
   * - 400-699
     - main
   * - 700-799
     - Post processing. Deadline to modify text and referencing.
   * - 800-899
     - Collect referencing and referenced nodes. Domain processing.
   * - 900-999
     - Finalize and clean up.

refs: `Transform Priority Range Categories`__

__ https://docutils.sourceforge.io/docs/ref/transforms.html#transform-priority-range-categories

---
## add_post_transform
```python
from application import add_post_transform
```

Register a Docutils transform to be applied before writing.

Add the standard docutils :class:`~docutils.transforms.Transform`
subclass *transform* to the list of transforms that are applied before
Sphinx writes a document.

:param transform: A transform class

---
## add_js_file
```python
from application import add_js_file
```

Register a JavaScript file to include in the HTML output.

:param filename: The name of a JavaScript file that the default HTML
                 template will include. It must be relative to the HTML
                 static path, or a full URI with scheme, or ``None`` .
                 The ``None`` value is used to create an inline
                 ``<script>`` tag.  See the description of *kwargs*
                 below.
:param priority: Files are included in ascending order of priority. If
                 multiple JavaScript files have the same priority,
                 those files will be included in order of registration.
                 See list of "priority range for JavaScript files" below.
:param loading_method: The loading method for the JavaScript file.
                       Either ``'async'`` or ``'defer'`` are allowed.
:param kwargs: Extra keyword arguments are included as attributes of the
               ``<script>`` tag.  If the special keyword argument
               ``body`` is given, its value will be added as the content
               of the  ``<script>`` tag.

Example::

    app.add_js_file('example.js')
    # => <script src="_static/example.js"></script>

    app.add_js_file('example.js', loading_method="async")
    # => <script src="_static/example.js" async="async"></script>

    app.add_js_file(None, body="var myVariable = 'foo';")
    # => <script>var myVariable = 'foo';</script>

.. list-table:: priority range for JavaScript files
   :widths: 20,80

   * - Priority
     - Main purpose in Sphinx
   * - 200
     - default priority for built-in JavaScript files
   * - 500
     - default priority for extensions
   * - 800
     - default priority for :confval:`html_js_files`

A JavaScript file can be added to the specific HTML page when an extension
calls this method on :event:`html-page-context` event.

.. versionadded:: 0.5

.. versionchanged:: 1.8
   Renamed from ``app.add_javascript()``.
   And it allows keyword arguments as attributes of script tag.

.. versionchanged:: 3.5
   Take priority argument.  Allow to add a JavaScript file to the specific page.
.. versionchanged:: 4.4
   Take loading_method argument.  Allow to change the loading method of the
   JavaScript file.

---
## add_css_file
```python
from application import add_css_file
```

Register a stylesheet to include in the HTML output.

:param filename: The name of a CSS file that the default HTML
                 template will include. It must be relative to the HTML
                 static path, or a full URI with scheme.
:param priority: Files are included in ascending order of priority. If
                 multiple CSS files have the same priority,
                 those files will be included in order of registration.
                 See list of "priority range for CSS files" below.
:param kwargs: Extra keyword arguments are included as attributes of the
               ``<link>`` tag.

Example::

    app.add_css_file('custom.css')
    # => <link rel="stylesheet" href="_static/custom.css" type="text/css" />

    app.add_css_file('print.css', media='print')
    # => <link rel="stylesheet" href="_static/print.css"
    #          type="text/css" media="print" />

    app.add_css_file('fancy.css', rel='alternate stylesheet', title='fancy')
    # => <link rel="alternate stylesheet" href="_static/fancy.css"
    #          type="text/css" title="fancy" />

.. list-table:: priority range for CSS files
   :widths: 20,80

   * - Priority
     - Main purpose in Sphinx
   * - 200
     - default priority for built-in CSS files
   * - 500
     - default priority for extensions
   * - 800
     - default priority for :confval:`html_css_files`

A CSS file can be added to the specific HTML page when an extension calls
this method on :event:`html-page-context` event.

.. versionadded:: 1.0

.. versionchanged:: 1.6
   Optional ``alternate`` and/or ``title`` attributes can be supplied
   with the arguments *alternate* (a Boolean) and *title* (a string).
   The default is no title and *alternate* = ``False``. For
   more information, refer to the `documentation
   <https://mdn.io/Web/CSS/Alternative_style_sheets>`__.

.. versionchanged:: 1.8
   Renamed from ``app.add_stylesheet()``.
   And it allows keyword arguments as attributes of link tag.

.. versionchanged:: 3.5
   Take priority argument.  Allow to add a CSS file to the specific page.

---
## add_latex_package
```python
from application import add_latex_package
```

Register a package to include in the LaTeX source code.

Add *packagename* to the list of packages that LaTeX source code will
include.  If you provide *options*, it will be taken to the `\usepackage`
declaration.  If you set *after_hyperref* truthy, the package will be
loaded after ``hyperref`` package.

.. code-block:: python

   app.add_latex_package('mypackage')
   # => \usepackage{mypackage}
   app.add_latex_package('mypackage', 'foo,bar')
   # => \usepackage[foo,bar]{mypackage}

.. versionadded:: 1.3
.. versionadded:: 3.1

   *after_hyperref* option.

---
## add_lexer
```python
from application import add_lexer
```

Register a new lexer for source code.

Use *lexer* to highlight code blocks with the given language *alias*.

.. versionadded:: 0.6
.. versionchanged:: 2.1
   Take a lexer class as an argument.
.. versionchanged:: 4.0
   Removed support for lexer instances as an argument.

---
## add_autodocumenter
```python
from application import add_autodocumenter
```

Register a new documenter class for the autodoc extension.

Add *cls* as a new documenter class for the :mod:`sphinx.ext.autodoc`
extension.  It must be a subclass of
:class:`sphinx.ext.autodoc.Documenter`.  This allows auto-documenting
new types of objects.  See the source of the autodoc module for
examples on how to subclass :class:`~sphinx.ext.autodoc.Documenter`.

If *override* is True, the given *cls* is forcedly installed even if
a documenter having the same name is already installed.

See :ref:`autodoc_ext_tutorial`.

.. versionadded:: 0.6
.. versionchanged:: 2.2
   Add *override* keyword.

---
## add_autodoc_attrgetter
```python
from application import add_autodoc_attrgetter
```

Register a new ``getattr``-like function for the autodoc extension.

Add *getter*, which must be a function with an interface compatible to
the :func:`getattr` builtin, as the autodoc attribute getter for
objects that are instances of *typ*.  All cases where autodoc needs to
get an attribute of a type are then handled by this function instead of
:func:`getattr`.

.. versionadded:: 0.6

---
## add_search_language
```python
from application import add_search_language
```

Register a new language for the HTML search index.

Add *cls*, which must be a subclass of
:class:`sphinx.search.SearchLanguage`, as a support language for
building the HTML full-text search index.  The class must have a *lang*
attribute that indicates the language it should be used for.  See
:confval:`html_search_language`.

.. versionadded:: 1.1

---
## add_source_suffix
```python
from application import add_source_suffix
```

Register a suffix of source files.

Same as :confval:`source_suffix`.  The users can override this
using the config setting.

:param override: If false, do not install it the same suffix
                 is already installed.
                 If true, unconditionally install the suffix.

.. versionadded:: 1.8

---
## add_source_parser
```python
from application import add_source_parser
```

Register a parser class.

:param override: If false, do not install it if another parser
                 is already installed for the same suffix.
                 If true, unconditionally install the parser.

.. versionadded:: 1.4
.. versionchanged:: 1.8
   *suffix* argument is deprecated.  It only accepts *parser* argument.
   Use :meth:`add_source_suffix` API to register suffix instead.
.. versionchanged:: 1.8
   Add *override* keyword.

---
## add_env_collector
```python
from application import add_env_collector
```

Register an environment collector class.

Refer to :ref:`collector-api`.

.. versionadded:: 1.6

---
## add_html_theme
```python
from application import add_html_theme
```

Register a HTML Theme.

The *name* is a name of theme, and *theme_path* is a full path to the
theme (refs: :ref:`distribute-your-theme`).

.. versionadded:: 1.6

---
## add_html_math_renderer
```python
from application import add_html_math_renderer
```

Register a math renderer for HTML.

The *name* is a name of math renderer.  Both *inline_renderers* and
*block_renderers* are used as visitor functions for the HTML writer:
the former for inline math node (``nodes.math``), the latter for
block math node (``nodes.math_block``).  Regarding visitor functions,
see :meth:`add_node` for details.

.. versionadded:: 1.8

---
## add_message_catalog
```python
from application import add_message_catalog
```

Register a message catalog.

:param catalog: The name of the catalog
:param locale_dir: The base path of the message catalog

For more details, see :func:`sphinx.locale.get_translation()`.

.. versionadded:: 1.8

---
## is_parallel_allowed
```python
from application import is_parallel_allowed
```

Check whether parallel processing is allowed or not.

:param typ: A type of processing; ``'read'`` or ``'write'``.

---
## set_html_assets_policy
```python
from application import set_html_assets_policy
```

Set the policy to include assets in HTML pages.

- always: include the assets in all the pages
- per_page: include the assets only in pages where they are used

.. versionadded: 4.1

---
## init
```python
from application import init
```

Called by the builder to initialize the template system.

*builder* is the builder object; you'll probably want to look at the
value of ``builder.config.templates_path``.

*theme* is a :class:`sphinx.theming.Theme` object or None; in the latter
case, *dirs* can be list of fixed directories to look for templates.

---
## newest_template_mtime
```python
from application import newest_template_mtime
```

Called by the builder to determine if output files are outdated
because of template changes.  Return the mtime of the newest template
file that was changed.  The default implementation returns ``0``.

---
## render
```python
from application import render
```

Called by the builder to render a template given as a filename with
a specified context (a Python dictionary).

---
## render_string
```python
from application import render_string
```

Called by the builder to render a template given as a string with a
specified context (a Python dictionary).

---
## __name__
```python
from extension import __name__
```

Shared methods for Index subclasses backed by ExtensionArray.

---
## Extension
```python
from extension import Extension
```



---
## verify_needs_extensions
```python
from extension import verify_needs_extensions
```

Check that extensions mentioned in :confval:`needs_extensions` satisfy the version
requirement, and warn if an extension is not loaded.

Warns if an extension in :confval:`needs_extension` is not loaded.

:raises VersionRequirementError: if the version of an extension in
:confval:`needs_extension` is unknown or older than the required version.

---
## setup
```python
from extension import setup
```



---
## __init__
```python
from extension import __init__
```



---
## __name__
```python
from versioning import __name__
```

Implements the low-level algorithms Sphinx uses for versioning doctrees.

---
## add_uids
```python
from versioning import add_uids
```

Add a unique id to every node in the `doctree` which matches the
condition and yield the nodes.

:param doctree:
    A :class:`docutils.nodes.document` instance.

:param condition:
    A callable which returns either ``True`` or ``False`` for a given node.

---
## merge_doctrees
```python
from versioning import merge_doctrees
```

Merge the `old` doctree with the `new` one while looking at nodes
matching the `condition`.

Each node which replaces another one or has been added to the `new` doctree
will be yielded.

:param condition:
    A callable which returns either ``True`` or ``False`` for a given node.

---
## get_ratio
```python
from versioning import get_ratio
```

Return a "similarity ratio" (in percent) representing the similarity
between the two strings where 0 is equal and anything above less than equal.

---
## levenshtein_distance
```python
from versioning import levenshtein_distance
```

Return the Levenshtein edit distance between two strings *a* and *b*.

---
## UIDTransform
```python
from versioning import UIDTransform
```

Add UIDs to doctree for versioning.

---
## setup
```python
from versioning import setup
```



---
## apply
```python
from versioning import apply
```



---
## SphinxError
```python
from errors import SphinxError
```

Base class for Sphinx errors.

This is the base class for "nice" exceptions.  When such an exception is
raised, Sphinx will abort the build and present the exception category and
message to the user.

Extensions are encouraged to derive from this exception for their custom
errors.

Exceptions *not* derived from :exc:`SphinxError` are treated as unexpected
and shown to the user with a part of the traceback (and the full traceback
saved in a temporary file).

.. attribute:: category

   Description of the exception "category", used in converting the
   exception to a string ("category: message").  Should be set accordingly
   in subclasses.

---
## SphinxWarning
```python
from errors import SphinxWarning
```

Warning, treated as error.

---
## ApplicationError
```python
from errors import ApplicationError
```

Application initialization error.

---
## ExtensionError
```python
from errors import ExtensionError
```

Extension error.

---
## BuildEnvironmentError
```python
from errors import BuildEnvironmentError
```

BuildEnvironment error.

---
## ConfigError
```python
from errors import ConfigError
```



---
## DocumentError
```python
from errors import DocumentError
```

Document error.

---
## ThemeError
```python
from errors import ThemeError
```

Theme error.

---
## VersionRequirementError
```python
from errors import VersionRequirementError
```

Incompatible Sphinx version error.

---
## SphinxParallelError
```python
from errors import SphinxParallelError
```

Sphinx parallel build error.

---
## PycodeError
```python
from errors import PycodeError
```

Pycode Python source code analyser error.

---
## NoUri
```python
from errors import NoUri
```

Raised by builder.get_relative_uri() or from missing-reference handlers
if there is no URI available.

---
## FiletypeNotFoundError
```python
from errors import FiletypeNotFoundError
```

Raised by get_filetype() if a filename matches no source suffix.

---
## category
```python
from errors import category
```



---
## __repr__
```python
from errors import __repr__
```



---
## __str__
```python
from errors import __str__
```



---
## __name__
```python
from highlighting import __name__
```

Highlight code blocks using Pygments.

---
## PygmentsBridge
```python
from highlighting import PygmentsBridge
```



---
## __init__
```python
from highlighting import __init__
```



---
## get_style
```python
from highlighting import get_style
```



---
## get_formatter
```python
from highlighting import get_formatter
```



---
## get_lexer
```python
from highlighting import get_lexer
```



---
## highlight_block
```python
from highlighting import highlight_block
```



---
## get_stylesheet
```python
from highlighting import get_stylesheet
```



---
## __name__
```python
from pygments_styles import __name__
```

Sphinx theme specific highlighting styles.

---
## NoneStyle
```python
from pygments_styles import NoneStyle
```

Style without any styling.

---
## SphinxStyle
```python
from pygments_styles import SphinxStyle
```

Like friendly, but a bit darker to enhance contrast on the green
background.

---
## PyramidStyle
```python
from pygments_styles import PyramidStyle
```

Pylons/pyramid pygments style based on friendly style, by Blaise Laflamme.

---
## __name__
```python
from project import __name__
```

Utility function and classes for Sphinx projects.

---
## Project
```python
from project import Project
```

A project is the source code set of the Sphinx document(s).

---
## __init__
```python
from project import __init__
```



---
## restore
```python
from project import restore
```

Take over a result of last build.

---
## discover
```python
from project import discover
```

Find all document files in the source directory and put them in
:attr:`docnames`.

---
## path2doc
```python
from project import path2doc
```

Return the docname for the filename if the file is a document.

*filename* should be absolute or relative to the source directory.

---
## doc2path
```python
from project import doc2path
```

Return the filename for the document name.

If *absolute* is True, return as an absolute path.
Else, return as a relative path to the source directory.

---
## BadRequiredStrength
```python
from exceptions import BadRequiredStrength
```



---
## DuplicateConstraint
```python
from exceptions import DuplicateConstraint
```



---
## DuplicateEditVariable
```python
from exceptions import DuplicateEditVariable
```



---
## UnknownConstraint
```python
from exceptions import UnknownConstraint
```



---
## UnknownEditVariable
```python
from exceptions import UnknownEditVariable
```



---
## UnsatisfiableConstraint
```python
from exceptions import UnsatisfiableConstraint
```



---
## __name__
```python
from english_stemmer import __name__
```



---
## EnglishStemmer
```python
from english_stemmer import EnglishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from english_stemmer import lab0
```



---
## lab1
```python
from english_stemmer import lab1
```



---
## lab2
```python
from english_stemmer import lab2
```



---
## lab3
```python
from english_stemmer import lab3
```



---
## lab4
```python
from english_stemmer import lab4
```



---
## lab5
```python
from english_stemmer import lab5
```



---
## __r_prelude
```python
from english_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from english_stemmer import __r_mark_regions
```



---
## __r_shortv
```python
from english_stemmer import __r_shortv
```



---
## __r_R1
```python
from english_stemmer import __r_R1
```



---
## __r_R2
```python
from english_stemmer import __r_R2
```



---
## __r_Step_1a
```python
from english_stemmer import __r_Step_1a
```



---
## __r_Step_1b
```python
from english_stemmer import __r_Step_1b
```



---
## __r_Step_1c
```python
from english_stemmer import __r_Step_1c
```



---
## __r_Step_2
```python
from english_stemmer import __r_Step_2
```



---
## __r_Step_3
```python
from english_stemmer import __r_Step_3
```



---
## __r_Step_4
```python
from english_stemmer import __r_Step_4
```



---
## __r_Step_5
```python
from english_stemmer import __r_Step_5
```



---
## __r_exception2
```python
from english_stemmer import __r_exception2
```



---
## __r_exception1
```python
from english_stemmer import __r_exception1
```



---
## __r_postlude
```python
from english_stemmer import __r_postlude
```



---
## _stem
```python
from english_stemmer import _stem
```



---
## __name__
```python
from finnish_stemmer import __name__
```



---
## FinnishStemmer
```python
from finnish_stemmer import FinnishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from finnish_stemmer import lab0
```



---
## lab1
```python
from finnish_stemmer import lab1
```



---
## lab2
```python
from finnish_stemmer import lab2
```



---
## lab3
```python
from finnish_stemmer import lab3
```



---
## lab4
```python
from finnish_stemmer import lab4
```



---
## lab5
```python
from finnish_stemmer import lab5
```



---
## __r_mark_regions
```python
from finnish_stemmer import __r_mark_regions
```



---
## __r_R2
```python
from finnish_stemmer import __r_R2
```



---
## __r_particle_etc
```python
from finnish_stemmer import __r_particle_etc
```



---
## __r_possessive
```python
from finnish_stemmer import __r_possessive
```



---
## __r_LONG
```python
from finnish_stemmer import __r_LONG
```



---
## __r_VI
```python
from finnish_stemmer import __r_VI
```



---
## __r_case_ending
```python
from finnish_stemmer import __r_case_ending
```



---
## __r_other_endings
```python
from finnish_stemmer import __r_other_endings
```



---
## __r_i_plural
```python
from finnish_stemmer import __r_i_plural
```



---
## __r_t_plural
```python
from finnish_stemmer import __r_t_plural
```



---
## __r_tidy
```python
from finnish_stemmer import __r_tidy
```



---
## _stem
```python
from finnish_stemmer import _stem
```



---
## __name__
```python
from hungarian_stemmer import __name__
```



---
## HungarianStemmer
```python
from hungarian_stemmer import HungarianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from hungarian_stemmer import lab0
```



---
## lab1
```python
from hungarian_stemmer import lab1
```



---
## lab2
```python
from hungarian_stemmer import lab2
```



---
## lab3
```python
from hungarian_stemmer import lab3
```



---
## __r_mark_regions
```python
from hungarian_stemmer import __r_mark_regions
```



---
## __r_R1
```python
from hungarian_stemmer import __r_R1
```



---
## __r_v_ending
```python
from hungarian_stemmer import __r_v_ending
```



---
## __r_double
```python
from hungarian_stemmer import __r_double
```



---
## __r_undouble
```python
from hungarian_stemmer import __r_undouble
```



---
## __r_instrum
```python
from hungarian_stemmer import __r_instrum
```



---
## __r_case
```python
from hungarian_stemmer import __r_case
```



---
## __r_case_special
```python
from hungarian_stemmer import __r_case_special
```



---
## __r_case_other
```python
from hungarian_stemmer import __r_case_other
```



---
## __r_factive
```python
from hungarian_stemmer import __r_factive
```



---
## __r_plural
```python
from hungarian_stemmer import __r_plural
```



---
## __r_owned
```python
from hungarian_stemmer import __r_owned
```



---
## __r_sing_owner
```python
from hungarian_stemmer import __r_sing_owner
```



---
## __r_plur_owner
```python
from hungarian_stemmer import __r_plur_owner
```



---
## _stem
```python
from hungarian_stemmer import _stem
```



---
## __name__
```python
from yiddish_stemmer import __name__
```



---
## YiddishStemmer
```python
from yiddish_stemmer import YiddishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from yiddish_stemmer import lab0
```



---
## lab1
```python
from yiddish_stemmer import lab1
```



---
## lab2
```python
from yiddish_stemmer import lab2
```



---
## lab3
```python
from yiddish_stemmer import lab3
```



---
## lab4
```python
from yiddish_stemmer import lab4
```



---
## lab5
```python
from yiddish_stemmer import lab5
```



---
## lab6
```python
from yiddish_stemmer import lab6
```



---
## lab7
```python
from yiddish_stemmer import lab7
```



---
## lab8
```python
from yiddish_stemmer import lab8
```



---
## lab9
```python
from yiddish_stemmer import lab9
```



---
## lab10
```python
from yiddish_stemmer import lab10
```



---
## lab11
```python
from yiddish_stemmer import lab11
```



---
## lab12
```python
from yiddish_stemmer import lab12
```



---
## lab13
```python
from yiddish_stemmer import lab13
```



---
## lab14
```python
from yiddish_stemmer import lab14
```



---
## lab15
```python
from yiddish_stemmer import lab15
```



---
## lab16
```python
from yiddish_stemmer import lab16
```



---
## __r_prelude
```python
from yiddish_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from yiddish_stemmer import __r_mark_regions
```



---
## __r_R1
```python
from yiddish_stemmer import __r_R1
```



---
## __r_R1plus3
```python
from yiddish_stemmer import __r_R1plus3
```



---
## __r_standard_suffix
```python
from yiddish_stemmer import __r_standard_suffix
```



---
## _stem
```python
from yiddish_stemmer import _stem
```



---
## __name__
```python
from basque_stemmer import __name__
```



---
## BasqueStemmer
```python
from basque_stemmer import BasqueStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from basque_stemmer import lab0
```



---
## lab1
```python
from basque_stemmer import lab1
```



---
## lab2
```python
from basque_stemmer import lab2
```



---
## lab3
```python
from basque_stemmer import lab3
```



---
## lab4
```python
from basque_stemmer import lab4
```



---
## lab5
```python
from basque_stemmer import lab5
```



---
## lab6
```python
from basque_stemmer import lab6
```



---
## lab7
```python
from basque_stemmer import lab7
```



---
## __r_mark_regions
```python
from basque_stemmer import __r_mark_regions
```



---
## __r_RV
```python
from basque_stemmer import __r_RV
```



---
## __r_R2
```python
from basque_stemmer import __r_R2
```



---
## __r_R1
```python
from basque_stemmer import __r_R1
```



---
## __r_aditzak
```python
from basque_stemmer import __r_aditzak
```



---
## __r_izenak
```python
from basque_stemmer import __r_izenak
```



---
## __r_adjetiboak
```python
from basque_stemmer import __r_adjetiboak
```



---
## _stem
```python
from basque_stemmer import _stem
```



---
## __name__
```python
from irish_stemmer import __name__
```



---
## IrishStemmer
```python
from irish_stemmer import IrishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from irish_stemmer import lab0
```



---
## __r_mark_regions
```python
from irish_stemmer import __r_mark_regions
```



---
## __r_initial_morph
```python
from irish_stemmer import __r_initial_morph
```



---
## __r_RV
```python
from irish_stemmer import __r_RV
```



---
## __r_R1
```python
from irish_stemmer import __r_R1
```



---
## __r_R2
```python
from irish_stemmer import __r_R2
```



---
## __r_noun_sfx
```python
from irish_stemmer import __r_noun_sfx
```



---
## __r_deriv
```python
from irish_stemmer import __r_deriv
```



---
## __r_verb_sfx
```python
from irish_stemmer import __r_verb_sfx
```



---
## _stem
```python
from irish_stemmer import _stem
```



---
## __name__
```python
from norwegian_stemmer import __name__
```



---
## NorwegianStemmer
```python
from norwegian_stemmer import NorwegianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from norwegian_stemmer import lab0
```



---
## lab1
```python
from norwegian_stemmer import lab1
```



---
## __r_mark_regions
```python
from norwegian_stemmer import __r_mark_regions
```



---
## __r_main_suffix
```python
from norwegian_stemmer import __r_main_suffix
```



---
## __r_consonant_pair
```python
from norwegian_stemmer import __r_consonant_pair
```



---
## __r_other_suffix
```python
from norwegian_stemmer import __r_other_suffix
```



---
## _stem
```python
from norwegian_stemmer import _stem
```



---
## __name__
```python
from tamil_stemmer import __name__
```



---
## TamilStemmer
```python
from tamil_stemmer import TamilStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from tamil_stemmer import lab0
```



---
## lab1
```python
from tamil_stemmer import lab1
```



---
## lab2
```python
from tamil_stemmer import lab2
```



---
## lab3
```python
from tamil_stemmer import lab3
```



---
## lab4
```python
from tamil_stemmer import lab4
```



---
## lab5
```python
from tamil_stemmer import lab5
```



---
## lab6
```python
from tamil_stemmer import lab6
```



---
## lab7
```python
from tamil_stemmer import lab7
```



---
## lab8
```python
from tamil_stemmer import lab8
```



---
## lab9
```python
from tamil_stemmer import lab9
```



---
## lab10
```python
from tamil_stemmer import lab10
```



---
## lab11
```python
from tamil_stemmer import lab11
```



---
## lab12
```python
from tamil_stemmer import lab12
```



---
## lab13
```python
from tamil_stemmer import lab13
```



---
## lab14
```python
from tamil_stemmer import lab14
```



---
## lab15
```python
from tamil_stemmer import lab15
```



---
## lab16
```python
from tamil_stemmer import lab16
```



---
## lab17
```python
from tamil_stemmer import lab17
```



---
## lab18
```python
from tamil_stemmer import lab18
```



---
## lab19
```python
from tamil_stemmer import lab19
```



---
## lab20
```python
from tamil_stemmer import lab20
```



---
## lab21
```python
from tamil_stemmer import lab21
```



---
## lab22
```python
from tamil_stemmer import lab22
```



---
## lab23
```python
from tamil_stemmer import lab23
```



---
## lab24
```python
from tamil_stemmer import lab24
```



---
## lab25
```python
from tamil_stemmer import lab25
```



---
## lab26
```python
from tamil_stemmer import lab26
```



---
## lab27
```python
from tamil_stemmer import lab27
```



---
## lab28
```python
from tamil_stemmer import lab28
```



---
## lab29
```python
from tamil_stemmer import lab29
```



---
## lab30
```python
from tamil_stemmer import lab30
```



---
## lab31
```python
from tamil_stemmer import lab31
```



---
## lab32
```python
from tamil_stemmer import lab32
```



---
## lab33
```python
from tamil_stemmer import lab33
```



---
## lab34
```python
from tamil_stemmer import lab34
```



---
## lab35
```python
from tamil_stemmer import lab35
```



---
## lab36
```python
from tamil_stemmer import lab36
```



---
## lab37
```python
from tamil_stemmer import lab37
```



---
## lab38
```python
from tamil_stemmer import lab38
```



---
## lab39
```python
from tamil_stemmer import lab39
```



---
## lab40
```python
from tamil_stemmer import lab40
```



---
## lab41
```python
from tamil_stemmer import lab41
```



---
## lab42
```python
from tamil_stemmer import lab42
```



---
## lab43
```python
from tamil_stemmer import lab43
```



---
## lab44
```python
from tamil_stemmer import lab44
```



---
## lab45
```python
from tamil_stemmer import lab45
```



---
## lab46
```python
from tamil_stemmer import lab46
```



---
## lab47
```python
from tamil_stemmer import lab47
```



---
## lab48
```python
from tamil_stemmer import lab48
```



---
## lab49
```python
from tamil_stemmer import lab49
```



---
## lab50
```python
from tamil_stemmer import lab50
```



---
## lab51
```python
from tamil_stemmer import lab51
```



---
## lab52
```python
from tamil_stemmer import lab52
```



---
## lab53
```python
from tamil_stemmer import lab53
```



---
## lab54
```python
from tamil_stemmer import lab54
```



---
## lab55
```python
from tamil_stemmer import lab55
```



---
## lab56
```python
from tamil_stemmer import lab56
```



---
## lab57
```python
from tamil_stemmer import lab57
```



---
## __r_has_min_length
```python
from tamil_stemmer import __r_has_min_length
```



---
## __r_fix_va_start
```python
from tamil_stemmer import __r_fix_va_start
```



---
## __r_fix_endings
```python
from tamil_stemmer import __r_fix_endings
```



---
## __r_remove_question_prefixes
```python
from tamil_stemmer import __r_remove_question_prefixes
```



---
## __r_fix_ending
```python
from tamil_stemmer import __r_fix_ending
```



---
## __r_remove_pronoun_prefixes
```python
from tamil_stemmer import __r_remove_pronoun_prefixes
```



---
## __r_remove_plural_suffix
```python
from tamil_stemmer import __r_remove_plural_suffix
```



---
## __r_remove_question_suffixes
```python
from tamil_stemmer import __r_remove_question_suffixes
```



---
## __r_remove_command_suffixes
```python
from tamil_stemmer import __r_remove_command_suffixes
```



---
## __r_remove_um
```python
from tamil_stemmer import __r_remove_um
```



---
## __r_remove_common_word_endings
```python
from tamil_stemmer import __r_remove_common_word_endings
```



---
## __r_remove_vetrumai_urupukal
```python
from tamil_stemmer import __r_remove_vetrumai_urupukal
```



---
## __r_remove_tense_suffixes
```python
from tamil_stemmer import __r_remove_tense_suffixes
```



---
## __r_remove_tense_suffix
```python
from tamil_stemmer import __r_remove_tense_suffix
```



---
## _stem
```python
from tamil_stemmer import _stem
```



---
## __name__
```python
from among import __name__
```



---
## Among
```python
from among import Among
```



---
## __init__
```python
from among import __init__
```

@ivar s search string
@ivar substring index to longest matching substring
@ivar result of the lookup
@ivar method method to use if substring matches

---
## __name__
```python
from basestemmer import __name__
```



---
## BaseStemmer
```python
from basestemmer import BaseStemmer
```



---
## __init__
```python
from basestemmer import __init__
```



---
## set_current
```python
from basestemmer import set_current
```

Set the self.current string.

---
## get_current
```python
from basestemmer import get_current
```

Get the self.current string.

---
## copy_from
```python
from basestemmer import copy_from
```



---
## in_grouping
```python
from basestemmer import in_grouping
```



---
## go_in_grouping
```python
from basestemmer import go_in_grouping
```



---
## in_grouping_b
```python
from basestemmer import in_grouping_b
```



---
## go_in_grouping_b
```python
from basestemmer import go_in_grouping_b
```



---
## out_grouping
```python
from basestemmer import out_grouping
```



---
## go_out_grouping
```python
from basestemmer import go_out_grouping
```



---
## out_grouping_b
```python
from basestemmer import out_grouping_b
```



---
## go_out_grouping_b
```python
from basestemmer import go_out_grouping_b
```



---
## eq_s
```python
from basestemmer import eq_s
```



---
## eq_s_b
```python
from basestemmer import eq_s_b
```



---
## find_among
```python
from basestemmer import find_among
```



---
## find_among_b
```python
from basestemmer import find_among_b
```

find_among_b is for backwards processing. Same comments apply

---
## replace_s
```python
from basestemmer import replace_s
```

to replace chars between c_bra and c_ket in self.current by the
chars in s.

@type c_bra int
@type c_ket int
@type s: string

---
## slice_check
```python
from basestemmer import slice_check
```



---
## slice_from
```python
from basestemmer import slice_from
```

@type s string

---
## slice_del
```python
from basestemmer import slice_del
```



---
## insert
```python
from basestemmer import insert
```

@type c_bra int
@type c_ket int
@type s: string

---
## slice_to
```python
from basestemmer import slice_to
```

Return the slice as a string.

---
## assign_to
```python
from basestemmer import assign_to
```

Return the current string up to the limit.

---
## stemWord
```python
from basestemmer import stemWord
```



---
## stemWords
```python
from basestemmer import stemWords
```



---
## __name__
```python
from french_stemmer import __name__
```



---
## FrenchStemmer
```python
from french_stemmer import FrenchStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from french_stemmer import lab0
```



---
## lab1
```python
from french_stemmer import lab1
```



---
## lab2
```python
from french_stemmer import lab2
```



---
## lab3
```python
from french_stemmer import lab3
```



---
## lab4
```python
from french_stemmer import lab4
```



---
## lab5
```python
from french_stemmer import lab5
```



---
## lab6
```python
from french_stemmer import lab6
```



---
## lab7
```python
from french_stemmer import lab7
```



---
## lab8
```python
from french_stemmer import lab8
```



---
## lab9
```python
from french_stemmer import lab9
```



---
## lab10
```python
from french_stemmer import lab10
```



---
## lab11
```python
from french_stemmer import lab11
```



---
## lab12
```python
from french_stemmer import lab12
```



---
## lab13
```python
from french_stemmer import lab13
```



---
## lab14
```python
from french_stemmer import lab14
```



---
## lab15
```python
from french_stemmer import lab15
```



---
## __r_prelude
```python
from french_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from french_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from french_stemmer import __r_postlude
```



---
## __r_RV
```python
from french_stemmer import __r_RV
```



---
## __r_R1
```python
from french_stemmer import __r_R1
```



---
## __r_R2
```python
from french_stemmer import __r_R2
```



---
## __r_standard_suffix
```python
from french_stemmer import __r_standard_suffix
```



---
## __r_i_verb_suffix
```python
from french_stemmer import __r_i_verb_suffix
```



---
## __r_verb_suffix
```python
from french_stemmer import __r_verb_suffix
```



---
## __r_residual_suffix
```python
from french_stemmer import __r_residual_suffix
```



---
## __r_un_double
```python
from french_stemmer import __r_un_double
```



---
## __r_un_accent
```python
from french_stemmer import __r_un_accent
```



---
## _stem
```python
from french_stemmer import _stem
```



---
## __name__
```python
from romanian_stemmer import __name__
```



---
## RomanianStemmer
```python
from romanian_stemmer import RomanianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from romanian_stemmer import lab0
```



---
## lab1
```python
from romanian_stemmer import lab1
```



---
## lab2
```python
from romanian_stemmer import lab2
```



---
## lab3
```python
from romanian_stemmer import lab3
```



---
## lab4
```python
from romanian_stemmer import lab4
```



---
## lab5
```python
from romanian_stemmer import lab5
```



---
## lab6
```python
from romanian_stemmer import lab6
```



---
## lab7
```python
from romanian_stemmer import lab7
```



---
## __r_prelude
```python
from romanian_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from romanian_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from romanian_stemmer import __r_postlude
```



---
## __r_RV
```python
from romanian_stemmer import __r_RV
```



---
## __r_R1
```python
from romanian_stemmer import __r_R1
```



---
## __r_R2
```python
from romanian_stemmer import __r_R2
```



---
## __r_step_0
```python
from romanian_stemmer import __r_step_0
```



---
## __r_combo_suffix
```python
from romanian_stemmer import __r_combo_suffix
```



---
## __r_standard_suffix
```python
from romanian_stemmer import __r_standard_suffix
```



---
## __r_verb_suffix
```python
from romanian_stemmer import __r_verb_suffix
```



---
## __r_vowel_suffix
```python
from romanian_stemmer import __r_vowel_suffix
```



---
## _stem
```python
from romanian_stemmer import _stem
```



---
## algorithms
```python
from __init__ import algorithms
```



---
## stemmer
```python
from __init__ import stemmer
```



---
## __name__
```python
from portuguese_stemmer import __name__
```



---
## PortugueseStemmer
```python
from portuguese_stemmer import PortugueseStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from portuguese_stemmer import lab0
```



---
## lab1
```python
from portuguese_stemmer import lab1
```



---
## lab2
```python
from portuguese_stemmer import lab2
```



---
## lab3
```python
from portuguese_stemmer import lab3
```



---
## lab4
```python
from portuguese_stemmer import lab4
```



---
## lab5
```python
from portuguese_stemmer import lab5
```



---
## lab6
```python
from portuguese_stemmer import lab6
```



---
## lab7
```python
from portuguese_stemmer import lab7
```



---
## __r_prelude
```python
from portuguese_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from portuguese_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from portuguese_stemmer import __r_postlude
```



---
## __r_RV
```python
from portuguese_stemmer import __r_RV
```



---
## __r_R1
```python
from portuguese_stemmer import __r_R1
```



---
## __r_R2
```python
from portuguese_stemmer import __r_R2
```



---
## __r_standard_suffix
```python
from portuguese_stemmer import __r_standard_suffix
```



---
## __r_verb_suffix
```python
from portuguese_stemmer import __r_verb_suffix
```



---
## __r_residual_suffix
```python
from portuguese_stemmer import __r_residual_suffix
```



---
## __r_residual_form
```python
from portuguese_stemmer import __r_residual_form
```



---
## _stem
```python
from portuguese_stemmer import _stem
```



---
## __name__
```python
from hindi_stemmer import __name__
```



---
## HindiStemmer
```python
from hindi_stemmer import HindiStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from hindi_stemmer import lab0
```



---
## __r_CONSONANT
```python
from hindi_stemmer import __r_CONSONANT
```



---
## _stem
```python
from hindi_stemmer import _stem
```



---
## __name__
```python
from russian_stemmer import __name__
```



---
## RussianStemmer
```python
from russian_stemmer import RussianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from russian_stemmer import lab0
```



---
## lab1
```python
from russian_stemmer import lab1
```



---
## lab2
```python
from russian_stemmer import lab2
```



---
## lab3
```python
from russian_stemmer import lab3
```



---
## lab4
```python
from russian_stemmer import lab4
```



---
## lab5
```python
from russian_stemmer import lab5
```



---
## lab6
```python
from russian_stemmer import lab6
```



---
## lab7
```python
from russian_stemmer import lab7
```



---
## lab8
```python
from russian_stemmer import lab8
```



---
## lab9
```python
from russian_stemmer import lab9
```



---
## lab10
```python
from russian_stemmer import lab10
```



---
## lab11
```python
from russian_stemmer import lab11
```



---
## __r_mark_regions
```python
from russian_stemmer import __r_mark_regions
```



---
## __r_R2
```python
from russian_stemmer import __r_R2
```



---
## __r_perfective_gerund
```python
from russian_stemmer import __r_perfective_gerund
```



---
## __r_adjective
```python
from russian_stemmer import __r_adjective
```



---
## __r_adjectival
```python
from russian_stemmer import __r_adjectival
```



---
## __r_reflexive
```python
from russian_stemmer import __r_reflexive
```



---
## __r_verb
```python
from russian_stemmer import __r_verb
```



---
## __r_noun
```python
from russian_stemmer import __r_noun
```



---
## __r_derivational
```python
from russian_stemmer import __r_derivational
```



---
## __r_tidy_up
```python
from russian_stemmer import __r_tidy_up
```



---
## _stem
```python
from russian_stemmer import _stem
```



---
## __name__
```python
from armenian_stemmer import __name__
```



---
## ArmenianStemmer
```python
from armenian_stemmer import ArmenianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from armenian_stemmer import lab0
```



---
## __r_mark_regions
```python
from armenian_stemmer import __r_mark_regions
```



---
## __r_R2
```python
from armenian_stemmer import __r_R2
```



---
## __r_adjective
```python
from armenian_stemmer import __r_adjective
```



---
## __r_verb
```python
from armenian_stemmer import __r_verb
```



---
## __r_noun
```python
from armenian_stemmer import __r_noun
```



---
## __r_ending
```python
from armenian_stemmer import __r_ending
```



---
## _stem
```python
from armenian_stemmer import _stem
```



---
## __name__
```python
from nepali_stemmer import __name__
```



---
## NepaliStemmer
```python
from nepali_stemmer import NepaliStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from nepali_stemmer import lab0
```



---
## lab1
```python
from nepali_stemmer import lab1
```



---
## lab2
```python
from nepali_stemmer import lab2
```



---
## lab3
```python
from nepali_stemmer import lab3
```



---
## __r_remove_category_1
```python
from nepali_stemmer import __r_remove_category_1
```



---
## __r_check_category_2
```python
from nepali_stemmer import __r_check_category_2
```



---
## __r_remove_category_2
```python
from nepali_stemmer import __r_remove_category_2
```



---
## __r_remove_category_3
```python
from nepali_stemmer import __r_remove_category_3
```



---
## _stem
```python
from nepali_stemmer import _stem
```



---
## __name__
```python
from italian_stemmer import __name__
```



---
## ItalianStemmer
```python
from italian_stemmer import ItalianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from italian_stemmer import lab0
```



---
## lab1
```python
from italian_stemmer import lab1
```



---
## lab2
```python
from italian_stemmer import lab2
```



---
## lab3
```python
from italian_stemmer import lab3
```



---
## lab4
```python
from italian_stemmer import lab4
```



---
## lab5
```python
from italian_stemmer import lab5
```



---
## lab6
```python
from italian_stemmer import lab6
```



---
## lab7
```python
from italian_stemmer import lab7
```



---
## __r_prelude
```python
from italian_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from italian_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from italian_stemmer import __r_postlude
```



---
## __r_RV
```python
from italian_stemmer import __r_RV
```



---
## __r_R1
```python
from italian_stemmer import __r_R1
```



---
## __r_R2
```python
from italian_stemmer import __r_R2
```



---
## __r_attached_pronoun
```python
from italian_stemmer import __r_attached_pronoun
```



---
## __r_standard_suffix
```python
from italian_stemmer import __r_standard_suffix
```



---
## __r_verb_suffix
```python
from italian_stemmer import __r_verb_suffix
```



---
## __r_vowel_suffix
```python
from italian_stemmer import __r_vowel_suffix
```



---
## _stem
```python
from italian_stemmer import _stem
```



---
## __name__
```python
from danish_stemmer import __name__
```



---
## DanishStemmer
```python
from danish_stemmer import DanishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from danish_stemmer import lab0
```



---
## __r_mark_regions
```python
from danish_stemmer import __r_mark_regions
```



---
## __r_main_suffix
```python
from danish_stemmer import __r_main_suffix
```



---
## __r_consonant_pair
```python
from danish_stemmer import __r_consonant_pair
```



---
## __r_other_suffix
```python
from danish_stemmer import __r_other_suffix
```



---
## __r_undouble
```python
from danish_stemmer import __r_undouble
```



---
## _stem
```python
from danish_stemmer import _stem
```



---
## __name__
```python
from lithuanian_stemmer import __name__
```



---
## LithuanianStemmer
```python
from lithuanian_stemmer import LithuanianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from lithuanian_stemmer import lab0
```



---
## lab1
```python
from lithuanian_stemmer import lab1
```



---
## __r_R1
```python
from lithuanian_stemmer import __r_R1
```



---
## __r_step1
```python
from lithuanian_stemmer import __r_step1
```



---
## __r_step2
```python
from lithuanian_stemmer import __r_step2
```



---
## __r_fix_conflicts
```python
from lithuanian_stemmer import __r_fix_conflicts
```



---
## __r_fix_chdz
```python
from lithuanian_stemmer import __r_fix_chdz
```



---
## __r_fix_gd
```python
from lithuanian_stemmer import __r_fix_gd
```



---
## _stem
```python
from lithuanian_stemmer import _stem
```



---
## __name__
```python
from greek_stemmer import __name__
```



---
## GreekStemmer
```python
from greek_stemmer import GreekStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from greek_stemmer import lab0
```



---
## lab1
```python
from greek_stemmer import lab1
```



---
## lab2
```python
from greek_stemmer import lab2
```



---
## lab3
```python
from greek_stemmer import lab3
```



---
## __r_has_min_length
```python
from greek_stemmer import __r_has_min_length
```



---
## __r_tolower
```python
from greek_stemmer import __r_tolower
```



---
## __r_step1
```python
from greek_stemmer import __r_step1
```



---
## __r_steps1
```python
from greek_stemmer import __r_steps1
```



---
## __r_steps2
```python
from greek_stemmer import __r_steps2
```



---
## __r_steps3
```python
from greek_stemmer import __r_steps3
```



---
## __r_steps4
```python
from greek_stemmer import __r_steps4
```



---
## __r_steps5
```python
from greek_stemmer import __r_steps5
```



---
## __r_steps6
```python
from greek_stemmer import __r_steps6
```



---
## __r_steps7
```python
from greek_stemmer import __r_steps7
```



---
## __r_steps8
```python
from greek_stemmer import __r_steps8
```



---
## __r_steps9
```python
from greek_stemmer import __r_steps9
```



---
## __r_steps10
```python
from greek_stemmer import __r_steps10
```



---
## __r_step2a
```python
from greek_stemmer import __r_step2a
```



---
## __r_step2b
```python
from greek_stemmer import __r_step2b
```



---
## __r_step2c
```python
from greek_stemmer import __r_step2c
```



---
## __r_step2d
```python
from greek_stemmer import __r_step2d
```



---
## __r_step3
```python
from greek_stemmer import __r_step3
```



---
## __r_step4
```python
from greek_stemmer import __r_step4
```



---
## __r_step5a
```python
from greek_stemmer import __r_step5a
```



---
## __r_step5b
```python
from greek_stemmer import __r_step5b
```



---
## __r_step5c
```python
from greek_stemmer import __r_step5c
```



---
## __r_step5d
```python
from greek_stemmer import __r_step5d
```



---
## __r_step5e
```python
from greek_stemmer import __r_step5e
```



---
## __r_step5f
```python
from greek_stemmer import __r_step5f
```



---
## __r_step5g
```python
from greek_stemmer import __r_step5g
```



---
## __r_step5h
```python
from greek_stemmer import __r_step5h
```



---
## __r_step5i
```python
from greek_stemmer import __r_step5i
```



---
## __r_step5j
```python
from greek_stemmer import __r_step5j
```



---
## __r_step5k
```python
from greek_stemmer import __r_step5k
```



---
## __r_step5l
```python
from greek_stemmer import __r_step5l
```



---
## __r_step5m
```python
from greek_stemmer import __r_step5m
```



---
## __r_step6
```python
from greek_stemmer import __r_step6
```



---
## __r_step7
```python
from greek_stemmer import __r_step7
```



---
## _stem
```python
from greek_stemmer import _stem
```



---
## __name__
```python
from arabic_stemmer import __name__
```



---
## ArabicStemmer
```python
from arabic_stemmer import ArabicStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from arabic_stemmer import lab0
```



---
## lab1
```python
from arabic_stemmer import lab1
```



---
## lab2
```python
from arabic_stemmer import lab2
```



---
## lab3
```python
from arabic_stemmer import lab3
```



---
## lab4
```python
from arabic_stemmer import lab4
```



---
## lab5
```python
from arabic_stemmer import lab5
```



---
## lab6
```python
from arabic_stemmer import lab6
```



---
## lab7
```python
from arabic_stemmer import lab7
```



---
## lab8
```python
from arabic_stemmer import lab8
```



---
## lab9
```python
from arabic_stemmer import lab9
```



---
## lab10
```python
from arabic_stemmer import lab10
```



---
## lab11
```python
from arabic_stemmer import lab11
```



---
## lab12
```python
from arabic_stemmer import lab12
```



---
## lab13
```python
from arabic_stemmer import lab13
```



---
## lab14
```python
from arabic_stemmer import lab14
```



---
## lab15
```python
from arabic_stemmer import lab15
```



---
## lab16
```python
from arabic_stemmer import lab16
```



---
## lab17
```python
from arabic_stemmer import lab17
```



---
## lab18
```python
from arabic_stemmer import lab18
```



---
## lab19
```python
from arabic_stemmer import lab19
```



---
## lab20
```python
from arabic_stemmer import lab20
```



---
## lab21
```python
from arabic_stemmer import lab21
```



---
## lab22
```python
from arabic_stemmer import lab22
```



---
## lab23
```python
from arabic_stemmer import lab23
```



---
## lab24
```python
from arabic_stemmer import lab24
```



---
## lab25
```python
from arabic_stemmer import lab25
```



---
## lab26
```python
from arabic_stemmer import lab26
```



---
## lab27
```python
from arabic_stemmer import lab27
```



---
## lab28
```python
from arabic_stemmer import lab28
```



---
## lab29
```python
from arabic_stemmer import lab29
```



---
## lab30
```python
from arabic_stemmer import lab30
```



---
## lab31
```python
from arabic_stemmer import lab31
```



---
## lab32
```python
from arabic_stemmer import lab32
```



---
## __r_Normalize_pre
```python
from arabic_stemmer import __r_Normalize_pre
```



---
## __r_Normalize_post
```python
from arabic_stemmer import __r_Normalize_post
```



---
## __r_Checks1
```python
from arabic_stemmer import __r_Checks1
```



---
## __r_Prefix_Step1
```python
from arabic_stemmer import __r_Prefix_Step1
```



---
## __r_Prefix_Step2
```python
from arabic_stemmer import __r_Prefix_Step2
```



---
## __r_Prefix_Step3a_Noun
```python
from arabic_stemmer import __r_Prefix_Step3a_Noun
```



---
## __r_Prefix_Step3b_Noun
```python
from arabic_stemmer import __r_Prefix_Step3b_Noun
```



---
## __r_Prefix_Step3_Verb
```python
from arabic_stemmer import __r_Prefix_Step3_Verb
```



---
## __r_Prefix_Step4_Verb
```python
from arabic_stemmer import __r_Prefix_Step4_Verb
```



---
## __r_Suffix_Noun_Step1a
```python
from arabic_stemmer import __r_Suffix_Noun_Step1a
```



---
## __r_Suffix_Noun_Step1b
```python
from arabic_stemmer import __r_Suffix_Noun_Step1b
```



---
## __r_Suffix_Noun_Step2a
```python
from arabic_stemmer import __r_Suffix_Noun_Step2a
```



---
## __r_Suffix_Noun_Step2b
```python
from arabic_stemmer import __r_Suffix_Noun_Step2b
```



---
## __r_Suffix_Noun_Step2c1
```python
from arabic_stemmer import __r_Suffix_Noun_Step2c1
```



---
## __r_Suffix_Noun_Step2c2
```python
from arabic_stemmer import __r_Suffix_Noun_Step2c2
```



---
## __r_Suffix_Noun_Step3
```python
from arabic_stemmer import __r_Suffix_Noun_Step3
```



---
## __r_Suffix_Verb_Step1
```python
from arabic_stemmer import __r_Suffix_Verb_Step1
```



---
## __r_Suffix_Verb_Step2a
```python
from arabic_stemmer import __r_Suffix_Verb_Step2a
```



---
## __r_Suffix_Verb_Step2b
```python
from arabic_stemmer import __r_Suffix_Verb_Step2b
```



---
## __r_Suffix_Verb_Step2c
```python
from arabic_stemmer import __r_Suffix_Verb_Step2c
```



---
## __r_Suffix_All_alef_maqsura
```python
from arabic_stemmer import __r_Suffix_All_alef_maqsura
```



---
## _stem
```python
from arabic_stemmer import _stem
```



---
## __name__
```python
from german_stemmer import __name__
```



---
## GermanStemmer
```python
from german_stemmer import GermanStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from german_stemmer import lab0
```



---
## lab1
```python
from german_stemmer import lab1
```



---
## lab2
```python
from german_stemmer import lab2
```



---
## lab3
```python
from german_stemmer import lab3
```



---
## lab4
```python
from german_stemmer import lab4
```



---
## lab5
```python
from german_stemmer import lab5
```



---
## lab6
```python
from german_stemmer import lab6
```



---
## lab7
```python
from german_stemmer import lab7
```



---
## lab8
```python
from german_stemmer import lab8
```



---
## lab9
```python
from german_stemmer import lab9
```



---
## lab10
```python
from german_stemmer import lab10
```



---
## __r_prelude
```python
from german_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from german_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from german_stemmer import __r_postlude
```



---
## __r_R1
```python
from german_stemmer import __r_R1
```



---
## __r_R2
```python
from german_stemmer import __r_R2
```



---
## __r_standard_suffix
```python
from german_stemmer import __r_standard_suffix
```



---
## _stem
```python
from german_stemmer import _stem
```



---
## __name__
```python
from catalan_stemmer import __name__
```



---
## CatalanStemmer
```python
from catalan_stemmer import CatalanStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from catalan_stemmer import lab0
```



---
## lab1
```python
from catalan_stemmer import lab1
```



---
## lab2
```python
from catalan_stemmer import lab2
```



---
## __r_mark_regions
```python
from catalan_stemmer import __r_mark_regions
```



---
## __r_cleaning
```python
from catalan_stemmer import __r_cleaning
```



---
## __r_R1
```python
from catalan_stemmer import __r_R1
```



---
## __r_R2
```python
from catalan_stemmer import __r_R2
```



---
## __r_attached_pronoun
```python
from catalan_stemmer import __r_attached_pronoun
```



---
## __r_standard_suffix
```python
from catalan_stemmer import __r_standard_suffix
```



---
## __r_verb_suffix
```python
from catalan_stemmer import __r_verb_suffix
```



---
## __r_residual_suffix
```python
from catalan_stemmer import __r_residual_suffix
```



---
## _stem
```python
from catalan_stemmer import _stem
```



---
## __name__
```python
from dutch_stemmer import __name__
```



---
## DutchStemmer
```python
from dutch_stemmer import DutchStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from dutch_stemmer import lab0
```



---
## lab1
```python
from dutch_stemmer import lab1
```



---
## lab2
```python
from dutch_stemmer import lab2
```



---
## lab3
```python
from dutch_stemmer import lab3
```



---
## lab4
```python
from dutch_stemmer import lab4
```



---
## lab5
```python
from dutch_stemmer import lab5
```



---
## lab6
```python
from dutch_stemmer import lab6
```



---
## lab7
```python
from dutch_stemmer import lab7
```



---
## lab8
```python
from dutch_stemmer import lab8
```



---
## __r_prelude
```python
from dutch_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from dutch_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from dutch_stemmer import __r_postlude
```



---
## __r_R1
```python
from dutch_stemmer import __r_R1
```



---
## __r_R2
```python
from dutch_stemmer import __r_R2
```



---
## __r_undouble
```python
from dutch_stemmer import __r_undouble
```



---
## __r_e_ending
```python
from dutch_stemmer import __r_e_ending
```



---
## __r_en_ending
```python
from dutch_stemmer import __r_en_ending
```



---
## __r_standard_suffix
```python
from dutch_stemmer import __r_standard_suffix
```



---
## _stem
```python
from dutch_stemmer import _stem
```



---
## __name__
```python
from spanish_stemmer import __name__
```



---
## SpanishStemmer
```python
from spanish_stemmer import SpanishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from spanish_stemmer import lab0
```



---
## lab1
```python
from spanish_stemmer import lab1
```



---
## lab2
```python
from spanish_stemmer import lab2
```



---
## lab3
```python
from spanish_stemmer import lab3
```



---
## lab4
```python
from spanish_stemmer import lab4
```



---
## lab5
```python
from spanish_stemmer import lab5
```



---
## lab6
```python
from spanish_stemmer import lab6
```



---
## lab7
```python
from spanish_stemmer import lab7
```



---
## __r_mark_regions
```python
from spanish_stemmer import __r_mark_regions
```



---
## __r_postlude
```python
from spanish_stemmer import __r_postlude
```



---
## __r_RV
```python
from spanish_stemmer import __r_RV
```



---
## __r_R1
```python
from spanish_stemmer import __r_R1
```



---
## __r_R2
```python
from spanish_stemmer import __r_R2
```



---
## __r_attached_pronoun
```python
from spanish_stemmer import __r_attached_pronoun
```



---
## __r_standard_suffix
```python
from spanish_stemmer import __r_standard_suffix
```



---
## __r_y_verb_suffix
```python
from spanish_stemmer import __r_y_verb_suffix
```



---
## __r_verb_suffix
```python
from spanish_stemmer import __r_verb_suffix
```



---
## __r_residual_suffix
```python
from spanish_stemmer import __r_residual_suffix
```



---
## _stem
```python
from spanish_stemmer import _stem
```



---
## __name__
```python
from indonesian_stemmer import __name__
```



---
## IndonesianStemmer
```python
from indonesian_stemmer import IndonesianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from indonesian_stemmer import lab0
```



---
## lab1
```python
from indonesian_stemmer import lab1
```



---
## lab2
```python
from indonesian_stemmer import lab2
```



---
## lab3
```python
from indonesian_stemmer import lab3
```



---
## lab4
```python
from indonesian_stemmer import lab4
```



---
## lab5
```python
from indonesian_stemmer import lab5
```



---
## __r_remove_particle
```python
from indonesian_stemmer import __r_remove_particle
```



---
## __r_remove_possessive_pronoun
```python
from indonesian_stemmer import __r_remove_possessive_pronoun
```



---
## __r_SUFFIX_KAN_OK
```python
from indonesian_stemmer import __r_SUFFIX_KAN_OK
```



---
## __r_SUFFIX_AN_OK
```python
from indonesian_stemmer import __r_SUFFIX_AN_OK
```



---
## __r_SUFFIX_I_OK
```python
from indonesian_stemmer import __r_SUFFIX_I_OK
```



---
## __r_remove_suffix
```python
from indonesian_stemmer import __r_remove_suffix
```



---
## __r_VOWEL
```python
from indonesian_stemmer import __r_VOWEL
```



---
## __r_KER
```python
from indonesian_stemmer import __r_KER
```



---
## __r_remove_first_order_prefix
```python
from indonesian_stemmer import __r_remove_first_order_prefix
```



---
## __r_remove_second_order_prefix
```python
from indonesian_stemmer import __r_remove_second_order_prefix
```



---
## _stem
```python
from indonesian_stemmer import _stem
```



---
## __name__
```python
from porter_stemmer import __name__
```



---
## PorterStemmer
```python
from porter_stemmer import PorterStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from porter_stemmer import lab0
```



---
## lab1
```python
from porter_stemmer import lab1
```



---
## lab2
```python
from porter_stemmer import lab2
```



---
## lab3
```python
from porter_stemmer import lab3
```



---
## lab4
```python
from porter_stemmer import lab4
```



---
## lab5
```python
from porter_stemmer import lab5
```



---
## lab6
```python
from porter_stemmer import lab6
```



---
## lab7
```python
from porter_stemmer import lab7
```



---
## lab8
```python
from porter_stemmer import lab8
```



---
## lab9
```python
from porter_stemmer import lab9
```



---
## __r_shortv
```python
from porter_stemmer import __r_shortv
```



---
## __r_R1
```python
from porter_stemmer import __r_R1
```



---
## __r_R2
```python
from porter_stemmer import __r_R2
```



---
## __r_Step_1a
```python
from porter_stemmer import __r_Step_1a
```



---
## __r_Step_1b
```python
from porter_stemmer import __r_Step_1b
```



---
## __r_Step_1c
```python
from porter_stemmer import __r_Step_1c
```



---
## __r_Step_2
```python
from porter_stemmer import __r_Step_2
```



---
## __r_Step_3
```python
from porter_stemmer import __r_Step_3
```



---
## __r_Step_4
```python
from porter_stemmer import __r_Step_4
```



---
## __r_Step_5a
```python
from porter_stemmer import __r_Step_5a
```



---
## __r_Step_5b
```python
from porter_stemmer import __r_Step_5b
```



---
## _stem
```python
from porter_stemmer import _stem
```



---
## __name__
```python
from serbian_stemmer import __name__
```



---
## SerbianStemmer
```python
from serbian_stemmer import SerbianStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from serbian_stemmer import lab0
```



---
## lab1
```python
from serbian_stemmer import lab1
```



---
## lab2
```python
from serbian_stemmer import lab2
```



---
## lab3
```python
from serbian_stemmer import lab3
```



---
## lab4
```python
from serbian_stemmer import lab4
```



---
## lab5
```python
from serbian_stemmer import lab5
```



---
## lab6
```python
from serbian_stemmer import lab6
```



---
## lab7
```python
from serbian_stemmer import lab7
```



---
## lab8
```python
from serbian_stemmer import lab8
```



---
## lab9
```python
from serbian_stemmer import lab9
```



---
## lab10
```python
from serbian_stemmer import lab10
```



---
## lab11
```python
from serbian_stemmer import lab11
```



---
## __r_cyr_to_lat
```python
from serbian_stemmer import __r_cyr_to_lat
```



---
## __r_prelude
```python
from serbian_stemmer import __r_prelude
```



---
## __r_mark_regions
```python
from serbian_stemmer import __r_mark_regions
```



---
## __r_R1
```python
from serbian_stemmer import __r_R1
```



---
## __r_Step_1
```python
from serbian_stemmer import __r_Step_1
```



---
## __r_Step_2
```python
from serbian_stemmer import __r_Step_2
```



---
## __r_Step_3
```python
from serbian_stemmer import __r_Step_3
```



---
## _stem
```python
from serbian_stemmer import _stem
```



---
## __name__
```python
from swedish_stemmer import __name__
```



---
## SwedishStemmer
```python
from swedish_stemmer import SwedishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from swedish_stemmer import lab0
```



---
## __r_mark_regions
```python
from swedish_stemmer import __r_mark_regions
```



---
## __r_main_suffix
```python
from swedish_stemmer import __r_main_suffix
```



---
## __r_consonant_pair
```python
from swedish_stemmer import __r_consonant_pair
```



---
## __r_other_suffix
```python
from swedish_stemmer import __r_other_suffix
```



---
## _stem
```python
from swedish_stemmer import _stem
```



---
## __name__
```python
from turkish_stemmer import __name__
```



---
## TurkishStemmer
```python
from turkish_stemmer import TurkishStemmer
```

This class implements the stemming algorithm defined by a snowball script.
Generated by Snowball 2.2.0 - https://snowballstem.org/

---
## lab0
```python
from turkish_stemmer import lab0
```



---
## lab1
```python
from turkish_stemmer import lab1
```



---
## lab2
```python
from turkish_stemmer import lab2
```



---
## lab3
```python
from turkish_stemmer import lab3
```



---
## lab4
```python
from turkish_stemmer import lab4
```



---
## lab5
```python
from turkish_stemmer import lab5
```



---
## lab6
```python
from turkish_stemmer import lab6
```



---
## lab7
```python
from turkish_stemmer import lab7
```



---
## lab8
```python
from turkish_stemmer import lab8
```



---
## lab9
```python
from turkish_stemmer import lab9
```



---
## lab10
```python
from turkish_stemmer import lab10
```



---
## lab11
```python
from turkish_stemmer import lab11
```



---
## lab12
```python
from turkish_stemmer import lab12
```



---
## lab13
```python
from turkish_stemmer import lab13
```



---
## lab14
```python
from turkish_stemmer import lab14
```



---
## lab15
```python
from turkish_stemmer import lab15
```



---
## lab16
```python
from turkish_stemmer import lab16
```



---
## lab17
```python
from turkish_stemmer import lab17
```



---
## lab18
```python
from turkish_stemmer import lab18
```



---
## lab19
```python
from turkish_stemmer import lab19
```



---
## lab20
```python
from turkish_stemmer import lab20
```



---
## lab21
```python
from turkish_stemmer import lab21
```



---
## lab22
```python
from turkish_stemmer import lab22
```



---
## lab23
```python
from turkish_stemmer import lab23
```



---
## lab24
```python
from turkish_stemmer import lab24
```



---
## lab25
```python
from turkish_stemmer import lab25
```



---
## lab26
```python
from turkish_stemmer import lab26
```



---
## lab27
```python
from turkish_stemmer import lab27
```



---
## lab28
```python
from turkish_stemmer import lab28
```



---
## lab29
```python
from turkish_stemmer import lab29
```



---
## lab30
```python
from turkish_stemmer import lab30
```



---
## lab31
```python
from turkish_stemmer import lab31
```



---
## lab32
```python
from turkish_stemmer import lab32
```



---
## lab33
```python
from turkish_stemmer import lab33
```



---
## lab34
```python
from turkish_stemmer import lab34
```



---
## lab35
```python
from turkish_stemmer import lab35
```



---
## lab36
```python
from turkish_stemmer import lab36
```



---
## lab37
```python
from turkish_stemmer import lab37
```



---
## lab38
```python
from turkish_stemmer import lab38
```



---
## lab39
```python
from turkish_stemmer import lab39
```



---
## lab40
```python
from turkish_stemmer import lab40
```



---
## lab41
```python
from turkish_stemmer import lab41
```



---
## lab42
```python
from turkish_stemmer import lab42
```



---
## lab43
```python
from turkish_stemmer import lab43
```



---
## lab44
```python
from turkish_stemmer import lab44
```



---
## lab45
```python
from turkish_stemmer import lab45
```



---
## lab46
```python
from turkish_stemmer import lab46
```



---
## lab47
```python
from turkish_stemmer import lab47
```



---
## lab48
```python
from turkish_stemmer import lab48
```



---
## lab49
```python
from turkish_stemmer import lab49
```



---
## lab50
```python
from turkish_stemmer import lab50
```



---
## lab51
```python
from turkish_stemmer import lab51
```



---
## lab52
```python
from turkish_stemmer import lab52
```



---
## lab53
```python
from turkish_stemmer import lab53
```



---
## __r_check_vowel_harmony
```python
from turkish_stemmer import __r_check_vowel_harmony
```



---
## __r_mark_suffix_with_optional_n_consonant
```python
from turkish_stemmer import __r_mark_suffix_with_optional_n_consonant
```



---
## __r_mark_suffix_with_optional_s_consonant
```python
from turkish_stemmer import __r_mark_suffix_with_optional_s_consonant
```



---
## __r_mark_suffix_with_optional_y_consonant
```python
from turkish_stemmer import __r_mark_suffix_with_optional_y_consonant
```



---
## __r_mark_suffix_with_optional_U_vowel
```python
from turkish_stemmer import __r_mark_suffix_with_optional_U_vowel
```



---
## __r_mark_possessives
```python
from turkish_stemmer import __r_mark_possessives
```



---
## __r_mark_sU
```python
from turkish_stemmer import __r_mark_sU
```



---
## __r_mark_lArI
```python
from turkish_stemmer import __r_mark_lArI
```



---
## __r_mark_yU
```python
from turkish_stemmer import __r_mark_yU
```



---
## __r_mark_nU
```python
from turkish_stemmer import __r_mark_nU
```



---
## __r_mark_nUn
```python
from turkish_stemmer import __r_mark_nUn
```



---
## __r_mark_yA
```python
from turkish_stemmer import __r_mark_yA
```



---
## __r_mark_nA
```python
from turkish_stemmer import __r_mark_nA
```



---
## __r_mark_DA
```python
from turkish_stemmer import __r_mark_DA
```



---
## __r_mark_ndA
```python
from turkish_stemmer import __r_mark_ndA
```



---
## __r_mark_DAn
```python
from turkish_stemmer import __r_mark_DAn
```



---
## __r_mark_ndAn
```python
from turkish_stemmer import __r_mark_ndAn
```



---
## __r_mark_ylA
```python
from turkish_stemmer import __r_mark_ylA
```



---
## __r_mark_ki
```python
from turkish_stemmer import __r_mark_ki
```



---
## __r_mark_ncA
```python
from turkish_stemmer import __r_mark_ncA
```



---
## __r_mark_yUm
```python
from turkish_stemmer import __r_mark_yUm
```



---
## __r_mark_sUn
```python
from turkish_stemmer import __r_mark_sUn
```



---
## __r_mark_yUz
```python
from turkish_stemmer import __r_mark_yUz
```



---
## __r_mark_sUnUz
```python
from turkish_stemmer import __r_mark_sUnUz
```



---
## __r_mark_lAr
```python
from turkish_stemmer import __r_mark_lAr
```



---
## __r_mark_nUz
```python
from turkish_stemmer import __r_mark_nUz
```



---
## __r_mark_DUr
```python
from turkish_stemmer import __r_mark_DUr
```



---
## __r_mark_cAsInA
```python
from turkish_stemmer import __r_mark_cAsInA
```



---
## __r_mark_yDU
```python
from turkish_stemmer import __r_mark_yDU
```



---
## __r_mark_ysA
```python
from turkish_stemmer import __r_mark_ysA
```



---
## __r_mark_ymUs_
```python
from turkish_stemmer import __r_mark_ymUs_
```



---
## __r_mark_yken
```python
from turkish_stemmer import __r_mark_yken
```



---
## __r_stem_nominal_verb_suffixes
```python
from turkish_stemmer import __r_stem_nominal_verb_suffixes
```



---
## __r_stem_suffix_chain_before_ki
```python
from turkish_stemmer import __r_stem_suffix_chain_before_ki
```



---
## __r_stem_noun_suffixes
```python
from turkish_stemmer import __r_stem_noun_suffixes
```



---
## __r_post_process_last_consonants
```python
from turkish_stemmer import __r_post_process_last_consonants
```



---
## __r_append_U_to_stems_ending_with_d_or_g
```python
from turkish_stemmer import __r_append_U_to_stems_ending_with_d_or_g
```



---
## __r_is_reserved_word
```python
from turkish_stemmer import __r_is_reserved_word
```



---
## __r_more_than_one_syllable_word
```python
from turkish_stemmer import __r_more_than_one_syllable_word
```



---
## __r_postlude
```python
from turkish_stemmer import __r_postlude
```



---
## _stem
```python
from turkish_stemmer import _stem
```



---
## __name__
```python
from mergedeep import __name__
```



---
## Strategy
```python
from mergedeep import Strategy
```



---
## _handle_merge_replace
```python
from mergedeep import _handle_merge_replace
```



---
## _handle_merge_additive
```python
from mergedeep import _handle_merge_additive
```



---
## _handle_merge_typesafe
```python
from mergedeep import _handle_merge_typesafe
```



---
## _is_recursive_merge
```python
from mergedeep import _is_recursive_merge
```



---
## _deepmerge
```python
from mergedeep import _deepmerge
```



---
## merge
```python
from mergedeep import merge
```

A deep merge function for 🐍.

:param destination: The destination mapping.
:param sources: The source mappings.
:param strategy: The merge strategy.
:return:

---
## __name__
```python
from test_mergedeep import __name__
```

mergedeep test module

---
## test_mergedeep
```python
from test_mergedeep import test_mergedeep
```

mergedeep function tests.

---
## test_should_merge_3_dicts_into_new_dict_using_replace_strategy_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_replace_strategy_and_only_mutate_target
```



---
## test_should_merge_2_dicts_into_existing_dict_using_replace_strategy_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_2_dicts_into_existing_dict_using_replace_strategy_and_only_mutate_target
```



---
## test_should_have_default_strategy_of_replace
```python
from test_mergedeep import test_should_have_default_strategy_of_replace
```



---
## test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_lists_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_lists_and_only_mutate_target
```



---
## test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_sets_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_sets_and_only_mutate_target
```



---
## test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_tuples_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_tuples_and_only_mutate_target
```



---
## test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_counters_and_only_mutate_target
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_additive_strategy_on_counters_and_only_mutate_target
```



---
## test_should_not_copy_references
```python
from test_mergedeep import test_should_not_copy_references
```



---
## test_should_raise_TypeError_using_typesafe_strategy_if_types_differ
```python
from test_mergedeep import test_should_raise_TypeError_using_typesafe_strategy_if_types_differ
```



---
## test_should_raise_TypeError_using_typesafe_replace_strategy_if_types_differ
```python
from test_mergedeep import test_should_raise_TypeError_using_typesafe_replace_strategy_if_types_differ
```



---
## test_should_merge_3_dicts_into_new_dict_using_typesafe_strategy_and_only_mutate_target_if_types_are_compatible
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_typesafe_strategy_and_only_mutate_target_if_types_are_compatible
```



---
## test_should_merge_3_dicts_into_new_dict_using_typesafe_replace_strategy_and_only_mutate_target_if_types_are_compatible
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_typesafe_replace_strategy_and_only_mutate_target_if_types_are_compatible
```



---
## test_should_raise_TypeError_using_typesafe_additive_strategy_if_types_differ
```python
from test_mergedeep import test_should_raise_TypeError_using_typesafe_additive_strategy_if_types_differ
```



---
## test_should_merge_3_dicts_into_new_dict_using_typesafe_additive_strategy_and_only_mutate_target_if_types_are_compatible
```python
from test_mergedeep import test_should_merge_3_dicts_into_new_dict_using_typesafe_additive_strategy_and_only_mutate_target_if_types_are_compatible
```



---
## __name__
```python
from array_ops import __name__
```

Functions for arithmetic and comparison operations on NumPy arrays and
ExtensionArrays.

---
## ScalarAccess
```python
from array_ops import ScalarAccess
```



---
## setUp
```python
from array_ops import setUp
```



---
## time_getitem
```python
from array_ops import time_getitem
```



---
## time_as_py
```python
from array_ops import time_as_py
```



---
## __name__
```python
from convert_builtins import __name__
```



---
## ConvertPyListToArray
```python
from convert_builtins import ConvertPyListToArray
```

Benchmark pa.array(list of values, type=...)

---
## InferPyListToArray
```python
from convert_builtins import InferPyListToArray
```

Benchmark pa.array(list of values) with type inference

---
## ConvertArrayToPyList
```python
from convert_builtins import ConvertArrayToPyList
```

Benchmark pa.array.to_pylist()

---
## setup
```python
from convert_builtins import setup
```



---
## time_convert
```python
from convert_builtins import time_convert
```



---
## time_infer
```python
from convert_builtins import time_infer
```



---
## ParquetWriteBinary
```python
from parquet import ParquetWriteBinary
```



---
## generate_dict_strings
```python
from parquet import generate_dict_strings
```



---
## generate_dict_table
```python
from parquet import generate_dict_table
```



---
## ParquetWriteDictionaries
```python
from parquet import ParquetWriteDictionaries
```



---
## ParquetManyColumns
```python
from parquet import ParquetManyColumns
```



---
## setup
```python
from parquet import setup
```



---
## time_write_binary_table
```python
from parquet import time_write_binary_table
```



---
## time_write_binary_table_uncompressed
```python
from parquet import time_write_binary_table_uncompressed
```



---
## time_write_binary_table_no_dictionary
```python
from parquet import time_write_binary_table_no_dictionary
```



---
## time_convert_pandas_and_write_binary_table
```python
from parquet import time_convert_pandas_and_write_binary_table
```



---
## time_write_random_order
```python
from parquet import time_write_random_order
```



---
## time_write_sequential
```python
from parquet import time_write_sequential
```



---
## time_write
```python
from parquet import time_write
```



---
## time_read
```python
from parquet import time_read
```



---
## HighLatencyReader
```python
from io import HighLatencyReader
```



---
## HighLatencyWriter
```python
from io import HighLatencyWriter
```



---
## BufferedIOHighLatency
```python
from io import BufferedIOHighLatency
```

Benchmark creating a parquet manifest.

---
## closed
```python
from io import closed
```



---
## time_buffered_writes
```python
from io import time_buffered_writes
```



---
## time_buffered_reads
```python
from io import time_buffered_reads
```



---
## __name__
```python
from microbenchmarks import __name__
```



---
## PandasObjectIsNull
```python
from microbenchmarks import PandasObjectIsNull
```



---
## setup
```python
from microbenchmarks import setup
```



---
## time_PandasObjectIsNull
```python
from microbenchmarks import time_PandasObjectIsNull
```



---
## __name__
```python
from convert_pandas import __name__
```



---
## PandasConversionsBase
```python
from convert_pandas import PandasConversionsBase
```



---
## PandasConversionsToArrow
```python
from convert_pandas import PandasConversionsToArrow
```



---
## PandasConversionsFromArrow
```python
from convert_pandas import PandasConversionsFromArrow
```



---
## ToPandasStrings
```python
from convert_pandas import ToPandasStrings
```



---
## SerializeDeserializePandas
```python
from convert_pandas import SerializeDeserializePandas
```



---
## TableFromPandasMicroperformance
```python
from convert_pandas import TableFromPandasMicroperformance
```



---
## setup
```python
from convert_pandas import setup
```



---
## time_from_series
```python
from convert_pandas import time_from_series
```



---
## time_to_series
```python
from convert_pandas import time_to_series
```



---
## time_to_pandas_dedup
```python
from convert_pandas import time_to_pandas_dedup
```



---
## time_to_pandas_no_dedup
```python
from convert_pandas import time_to_pandas_no_dedup
```



---
## time_serialize_pandas
```python
from convert_pandas import time_serialize_pandas
```



---
## time_deserialize_pandas
```python
from convert_pandas import time_deserialize_pandas
```



---
## time_Table_from_pandas
```python
from convert_pandas import time_Table_from_pandas
```



---
## _multiplicate_sequence
```python
from common import _multiplicate_sequence
```



---
## get_random_bytes
```python
from common import get_random_bytes
```

Generate a random bytes object of size *n*.
Note the result might be compressible.

---
## get_random_ascii
```python
from common import get_random_ascii
```

Get a random ASCII-only unicode string of size *n*.

---
## _random_unicode_letters
```python
from common import _random_unicode_letters
```

Generate a string of random unicode letters (slow).

---
## get_random_unicode
```python
from common import get_random_unicode
```

Get a random non-ASCII unicode string of size *n*.

---
## BuiltinsGenerator
```python
from common import BuiltinsGenerator
```



---
## _get_more_candidates
```python
from common import _get_more_candidates
```



---
## __init__
```python
from common import __init__
```



---
## sprinkle
```python
from common import sprinkle
```

Sprinkle *value* entries in list *lst* with likelihood *prob*.

---
## sprinkle_nones
```python
from common import sprinkle_nones
```

Sprinkle None entries in list *lst* with likelihood *prob*.

---
## generate_int_list
```python
from common import generate_int_list
```

Generate a list of Python ints with *none_prob* probability of
an entry being None.

---
## generate_float_list
```python
from common import generate_float_list
```

Generate a list of Python floats with *none_prob* probability of
an entry being None (or NaN if *use_nan* is true).

---
## generate_bool_list
```python
from common import generate_bool_list
```

Generate a list of Python bools with *none_prob* probability of
an entry being None.

---
## generate_decimal_list
```python
from common import generate_decimal_list
```

Generate a list of Python Decimals with *none_prob* probability of
an entry being None (or NaN if *use_nan* is true).

---
## generate_object_list
```python
from common import generate_object_list
```

Generate a list of generic Python objects with *none_prob*
probability of an entry being None.

---
## _generate_varying_sequences
```python
from common import _generate_varying_sequences
```

Generate a list of *n* sequences of varying size between *min_size*
and *max_size*, with *none_prob* probability of an entry being None.
The base material for each sequence is obtained by calling
`random_factory(<some size>)`

---
## generate_fixed_binary_list
```python
from common import generate_fixed_binary_list
```

Generate a list of bytestrings with a fixed *size*.

---
## generate_varying_binary_list
```python
from common import generate_varying_binary_list
```

Generate a list of bytestrings with a random size between
*min_size* and *max_size*.

---
## generate_ascii_string_list
```python
from common import generate_ascii_string_list
```

Generate a list of ASCII strings with a random size between
*min_size* and *max_size*.

---
## generate_unicode_string_list
```python
from common import generate_unicode_string_list
```

Generate a list of unicode strings with a random size between
*min_size* and *max_size*.

---
## generate_int_list_list
```python
from common import generate_int_list_list
```

Generate a list of lists of Python ints with a random size between
*min_size* and *max_size*.

---
## generate_tuple_list
```python
from common import generate_tuple_list
```

Generate a list of tuples with random values.
Each tuple has the form `(int value, float value, bool value)`

---
## generate_dict_list
```python
from common import generate_dict_list
```

Generate a list of dicts with random values.
Each dict has the form

    `{'u': int value, 'v': float value, 'w': bool value}`

---
## get_type_and_builtins
```python
from common import get_type_and_builtins
```

Return a `(arrow type, list)` tuple where the arrow type
corresponds to the given logical *type_name*, and the list
is a list of *n* random-generated Python objects compatible
with the arrow type.

---
## generate_chunks
```python
from streaming import generate_chunks
```



---
## StreamReader
```python
from streaming import StreamReader
```

Benchmark in-memory streaming to a Pandas dataframe.

---
## make_column
```python
from streaming import make_column
```



---
## setup
```python
from streaming import setup
```



---
## time_read_to_dataframe
```python
from streaming import time_read_to_dataframe
```



---
## ParamTypes
```python
from params import ParamTypes
```



---
## Param
```python
from params import Param
```



---
## Path
```python
from params import Path
```



---
## Query
```python
from params import Query
```



---
## Header
```python
from params import Header
```



---
## Cookie
```python
from params import Cookie
```



---
## Body
```python
from params import Body
```



---
## Form
```python
from params import Form
```



---
## File
```python
from params import File
```



---
## Depends
```python
from params import Depends
```



---
## Security
```python
from params import Security
```



---
## __init__
```python
from params import __init__
```



---
## __repr__
```python
from params import __repr__
```



---
## UJSONResponse
```python
from responses import UJSONResponse
```

JSON response using the high-performance ujson library to serialize data to JSON.

Read more about it in the
[FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).

---
## ORJSONResponse
```python
from responses import ORJSONResponse
```

JSON response using the high-performance orjson library to serialize data to JSON.

Read more about it in the
[FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).

---
## __name__
```python
from exception_handlers import __name__
```



---
## FastAPI
```python
from applications import FastAPI
```

`FastAPI` app class, the main entrypoint to use FastAPI.

Read more in the
[FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/).

## Example

```python
from fastapi import FastAPI

app = FastAPI()
```

---
## openapi
```python
from applications import openapi
```

Generate the OpenAPI schema of the application. This is called by FastAPI
internally.

The first time it is called it stores the result in the attribute
`app.openapi_schema`, and next times it is called, it just returns that same
result. To avoid the cost of generating the schema every time.

If you need to modify the generated OpenAPI schema, you could modify it.

Read more in the
[FastAPI docs for OpenAPI](https://fastapi.tiangolo.com/how-to/extending-openapi/).

---
## setup
```python
from applications import setup
```



---
## add_api_route
```python
from applications import add_api_route
```



---
## api_route
```python
from applications import api_route
```



---
## add_api_websocket_route
```python
from applications import add_api_websocket_route
```



---
## websocket
```python
from applications import websocket
```

Decorate a WebSocket function.

Read more about it in the
[FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).

**Example**

```python
from fastapi import FastAPI, WebSocket

app = FastAPI()

@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
    await websocket.accept()
    while True:
        data = await websocket.receive_text()
        await websocket.send_text(f"Message text was: {data}")
```

---
## include_router
```python
from applications import include_router
```

Include an `APIRouter` in the same app.

Read more about it in the
[FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/).

## Example

```python
from fastapi import FastAPI

from .users import users_router

app = FastAPI()

app.include_router(users_router)
```

---
## get
```python
from applications import get
```

Add a *path operation* using an HTTP GET operation.

## Example

```python
from fastapi import FastAPI

app = FastAPI()

@app.get("/items/")
def read_items():
    return [{"name": "Empanada"}, {"name": "Arepa"}]
```

---
## put
```python
from applications import put
```

Add a *path operation* using an HTTP PUT operation.

## Example

```python
from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()

@app.put("/items/{item_id}")
def replace_item(item_id: str, item: Item):
    return {"message": "Item replaced", "id": item_id}
```

---
## post
```python
from applications import post
```

Add a *path operation* using an HTTP POST operation.

## Example

```python
from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()

@app.post("/items/")
def create_item(item: Item):
    return {"message": "Item created"}
```

---
## delete
```python
from applications import delete
```

Add a *path operation* using an HTTP DELETE operation.

## Example

```python
from fastapi import FastAPI

app = FastAPI()

@app.delete("/items/{item_id}")
def delete_item(item_id: str):
    return {"message": "Item deleted"}
```

---
## options
```python
from applications import options
```

Add a *path operation* using an HTTP OPTIONS operation.

## Example

```python
from fastapi import FastAPI

app = FastAPI()

@app.options("/items/")
def get_item_options():
    return {"additions": ["Aji", "Guacamole"]}
```

---
## head
```python
from applications import head
```

Add a *path operation* using an HTTP HEAD operation.

## Example

```python
from fastapi import FastAPI, Response

app = FastAPI()

@app.head("/items/", status_code=204)
def get_items_headers(response: Response):
    response.headers["X-Cat-Dog"] = "Alone in the world"
```

---
## patch
```python
from applications import patch
```

Add a *path operation* using an HTTP PATCH operation.

## Example

```python
from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()

@app.patch("/items/")
def update_item(item: Item):
    return {"message": "Item updated in place"}
```

---
## trace
```python
from applications import trace
```

Add a *path operation* using an HTTP TRACE operation.

## Example

```python
from fastapi import FastAPI

app = FastAPI()

@app.put("/items/{item_id}")
def trace_item(item_id: str):
    return None
```

---
## __name__
```python
from encoders import __name__
```



---
## isoformat
```python
from encoders import isoformat
```



---
## decimal_encoder
```python
from encoders import decimal_encoder
```

Encodes a Decimal as int of there's no exponent, otherwise float

This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
where a integer (but not int typed) is used. Encoding this as a float
results in failed round-tripping between encode and parse.
Our Id type is a prime example of this.

>>> decimal_encoder(Decimal("1.0"))
1.0

>>> decimal_encoder(Decimal("1"))
1

---
## generate_encoders_by_class_tuples
```python
from encoders import generate_encoders_by_class_tuples
```



---
## jsonable_encoder
```python
from encoders import jsonable_encoder
```

Convert any object to something that can be encoded in JSON.

This is used internally by FastAPI to make sure anything you return can be
encoded as JSON before it is sent to the client.

You can also use it yourself, for example to convert objects before saving them
in a database that supports only JSON.

Read more about it in the
[FastAPI docs for JSON Compatible Encoder](https://fastapi.tiangolo.com/tutorial/encoder/).

---
## is_body_allowed_for_status_code
```python
from utils import is_body_allowed_for_status_code
```



---
## get_path_param_names
```python
from utils import get_path_param_names
```



---
## create_model_field
```python
from utils import create_model_field
```



---
## create_cloned_field
```python
from utils import create_cloned_field
```



---
## generate_operation_id_for_path
```python
from utils import generate_operation_id_for_path
```



---
## generate_unique_id
```python
from utils import generate_unique_id
```



---
## deep_dict_update
```python
from utils import deep_dict_update
```



---
## get_value_or_default
```python
from utils import get_value_or_default
```

Pass items or `DefaultPlaceholder`s by descending priority.

The first one to _not_ be a `DefaultPlaceholder` will be returned.

Otherwise, the first item (a `DefaultPlaceholder`) will be returned.

---
## _prepare_response_content
```python
from routing import _prepare_response_content
```



---
## _merge_lifespan_context
```python
from routing import _merge_lifespan_context
```



---
## get_request_handler
```python
from routing import get_request_handler
```



---
## get_websocket_app
```python
from routing import get_websocket_app
```



---
## APIWebSocketRoute
```python
from routing import APIWebSocketRoute
```



---
## APIRoute
```python
from routing import APIRoute
```



---
## APIRouter
```python
from routing import APIRouter
```

`APIRouter` class, used to group *path operations*, for example to structure
an app in multiple files. It would then be included in the `FastAPI` app, or
in another `APIRouter` (ultimately included in the app).

Read more about it in the
[FastAPI docs for Bigger Applications - Multiple Files](https://fastapi.tiangolo.com/tutorial/bigger-applications/).

## Example

```python
from fastapi import APIRouter, FastAPI

app = FastAPI()
router = APIRouter()


@router.get("/users/", tags=["users"])
async def read_users():
    return [{"username": "Rick"}, {"username": "Morty"}]


app.include_router(router)
```

---
## get_route_handler
```python
from routing import get_route_handler
```



---
## add_api_route
```python
from routing import add_api_route
```



---
## api_route
```python
from routing import api_route
```



---
## add_api_websocket_route
```python
from routing import add_api_websocket_route
```



---
## websocket
```python
from routing import websocket
```

Decorate a WebSocket function.

Read more about it in the
[FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).

**Example**

## Example

```python
from fastapi import APIRouter, FastAPI, WebSocket

app = FastAPI()
router = APIRouter()

@router.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
    await websocket.accept()
    while True:
        data = await websocket.receive_text()
        await websocket.send_text(f"Message text was: {data}")

app.include_router(router)
```

---
## include_router
```python
from routing import include_router
```

Include another `APIRouter` in the same current `APIRouter`.

Read more about it in the
[FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/).

## Example

```python
from fastapi import APIRouter, FastAPI

app = FastAPI()
internal_router = APIRouter()
users_router = APIRouter()

@users_router.get("/users/")
def read_users():
    return [{"name": "Rick"}, {"name": "Morty"}]

internal_router.include_router(users_router)
app.include_router(internal_router)
```

---
## get
```python
from routing import get
```

Add a *path operation* using an HTTP GET operation.

## Example

```python
from fastapi import APIRouter, FastAPI

app = FastAPI()
router = APIRouter()

@router.get("/items/")
def read_items():
    return [{"name": "Empanada"}, {"name": "Arepa"}]

app.include_router(router)
```

---
## put
```python
from routing import put
```

Add a *path operation* using an HTTP PUT operation.

## Example

```python
from fastapi import APIRouter, FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()
router = APIRouter()

@router.put("/items/{item_id}")
def replace_item(item_id: str, item: Item):
    return {"message": "Item replaced", "id": item_id}

app.include_router(router)
```

---
## post
```python
from routing import post
```

Add a *path operation* using an HTTP POST operation.

## Example

```python
from fastapi import APIRouter, FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()
router = APIRouter()

@router.post("/items/")
def create_item(item: Item):
    return {"message": "Item created"}

app.include_router(router)
```

---
## delete
```python
from routing import delete
```

Add a *path operation* using an HTTP DELETE operation.

## Example

```python
from fastapi import APIRouter, FastAPI

app = FastAPI()
router = APIRouter()

@router.delete("/items/{item_id}")
def delete_item(item_id: str):
    return {"message": "Item deleted"}

app.include_router(router)
```

---
## options
```python
from routing import options
```

Add a *path operation* using an HTTP OPTIONS operation.

## Example

```python
from fastapi import APIRouter, FastAPI

app = FastAPI()
router = APIRouter()

@router.options("/items/")
def get_item_options():
    return {"additions": ["Aji", "Guacamole"]}

app.include_router(router)
```

---
## head
```python
from routing import head
```

Add a *path operation* using an HTTP HEAD operation.

## Example

```python
from fastapi import APIRouter, FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()
router = APIRouter()

@router.head("/items/", status_code=204)
def get_items_headers(response: Response):
    response.headers["X-Cat-Dog"] = "Alone in the world"

app.include_router(router)
```

---
## patch
```python
from routing import patch
```

Add a *path operation* using an HTTP PATCH operation.

## Example

```python
from fastapi import APIRouter, FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()
router = APIRouter()

@router.patch("/items/")
def update_item(item: Item):
    return {"message": "Item updated in place"}

app.include_router(router)
```

---
## trace
```python
from routing import trace
```

Add a *path operation* using an HTTP TRACE operation.

## Example

```python
from fastapi import APIRouter, FastAPI
from pydantic import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

app = FastAPI()
router = APIRouter()

@router.trace("/items/{item_id}")
def trace_item(item_id: str):
    return None

app.include_router(router)
```

---
## FastAPIError
```python
from exceptions import FastAPIError
```

A generic, FastAPI-specific error.

---
## ValidationException
```python
from exceptions import ValidationException
```



---
## RequestValidationError
```python
from exceptions import RequestValidationError
```



---
## WebSocketRequestValidationError
```python
from exceptions import WebSocketRequestValidationError
```



---
## ResponseValidationError
```python
from exceptions import ResponseValidationError
```



---
## errors
```python
from exceptions import errors
```



---
## __name__
```python
from param_functions import __name__
```



---
## Path
```python
from param_functions import Path
```

Declare a path parameter for a *path operation*.

Read more about it in the
[FastAPI docs for Path Parameters and Numeric Validations](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/).

```python
from typing import Annotated

from fastapi import FastAPI, Path

app = FastAPI()


@app.get("/items/{item_id}")
async def read_items(
    item_id: Annotated[int, Path(title="The ID of the item to get")],
):
    return {"item_id": item_id}
```

---
## Query
```python
from param_functions import Query
```



---
## Header
```python
from param_functions import Header
```



---
## Cookie
```python
from param_functions import Cookie
```



---
## Body
```python
from param_functions import Body
```



---
## Form
```python
from param_functions import Form
```



---
## File
```python
from param_functions import File
```



---
## Depends
```python
from param_functions import Depends
```

Declare a FastAPI dependency.

It takes a single "dependable" callable (like a function).

Don't call it directly, FastAPI will call it for you.

Read more about it in the
[FastAPI docs for Dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/).

**Example**

```python
from typing import Annotated

from fastapi import Depends, FastAPI

app = FastAPI()


async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100):
    return {"q": q, "skip": skip, "limit": limit}


@app.get("/items/")
async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
    return commons
```

---
## Security
```python
from param_functions import Security
```

Declare a FastAPI Security dependency.

The only difference with a regular dependency is that it can declare OAuth2
scopes that will be integrated with OpenAPI and the automatic UI docs (by default
at `/docs`).

It takes a single "dependable" callable (like a function).

Don't call it directly, FastAPI will call it for you.

Read more about it in the
[FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/) and
in the
[FastAPI docs for OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/).

**Example**

```python
from typing import Annotated

from fastapi import Security, FastAPI

from .db import User
from .security import get_current_active_user

app = FastAPI()

@app.get("/users/me/items/")
async def read_own_items(
    current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])]
):
    return [{"item_id": "Foo", "owner": current_user.username}]
```

---
## _regenerate_error_with_loc
```python
from _compat import _regenerate_error_with_loc
```



---
## _annotation_is_sequence
```python
from _compat import _annotation_is_sequence
```



---
## field_annotation_is_sequence
```python
from _compat import field_annotation_is_sequence
```



---
## value_is_sequence
```python
from _compat import value_is_sequence
```



---
## _annotation_is_complex
```python
from _compat import _annotation_is_complex
```



---
## field_annotation_is_complex
```python
from _compat import field_annotation_is_complex
```



---
## field_annotation_is_scalar
```python
from _compat import field_annotation_is_scalar
```



---
## field_annotation_is_scalar_sequence
```python
from _compat import field_annotation_is_scalar_sequence
```



---
## is_bytes_or_nonable_bytes_annotation
```python
from _compat import is_bytes_or_nonable_bytes_annotation
```



---
## is_uploadfile_or_nonable_uploadfile_annotation
```python
from _compat import is_uploadfile_or_nonable_uploadfile_annotation
```



---
## is_bytes_sequence_annotation
```python
from _compat import is_bytes_sequence_annotation
```



---
## is_uploadfile_sequence_annotation
```python
from _compat import is_uploadfile_sequence_annotation
```



---
## get_cached_model_fields
```python
from _compat import get_cached_model_fields
```



---
## BaseConfig
```python
from _compat import BaseConfig
```



---
## ErrorWrapper
```python
from _compat import ErrorWrapper
```



---
## ModelField
```python
from _compat import ModelField
```



---
## get_annotation_from_field_info
```python
from _compat import get_annotation_from_field_info
```



---
## _normalize_errors
```python
from _compat import _normalize_errors
```



---
## _model_rebuild
```python
from _compat import _model_rebuild
```



---
## _model_dump
```python
from _compat import _model_dump
```



---
## _get_model_config
```python
from _compat import _get_model_config
```



---
## get_schema_from_model_field
```python
from _compat import get_schema_from_model_field
```



---
## get_compat_model_name_map
```python
from _compat import get_compat_model_name_map
```



---
## get_definitions
```python
from _compat import get_definitions
```



---
## is_scalar_field
```python
from _compat import is_scalar_field
```



---
## is_sequence_field
```python
from _compat import is_sequence_field
```



---
## is_scalar_sequence_field
```python
from _compat import is_scalar_sequence_field
```



---
## is_bytes_field
```python
from _compat import is_bytes_field
```



---
## is_bytes_sequence_field
```python
from _compat import is_bytes_sequence_field
```



---
## copy_field_info
```python
from _compat import copy_field_info
```



---
## serialize_sequence_value
```python
from _compat import serialize_sequence_value
```



---
## get_missing_field_error
```python
from _compat import get_missing_field_error
```



---
## create_body_model
```python
from _compat import create_body_model
```



---
## get_model_fields
```python
from _compat import get_model_fields
```



---
## GenerateJsonSchema
```python
from _compat import GenerateJsonSchema
```



---
## PydanticSchemaGenerationError
```python
from _compat import PydanticSchemaGenerationError
```



---
## with_info_plain_validator_function
```python
from _compat import with_info_plain_validator_function
```



---
## get_model_definitions
```python
from _compat import get_model_definitions
```



---
## is_pv1_scalar_field
```python
from _compat import is_pv1_scalar_field
```



---
## is_pv1_scalar_sequence_field
```python
from _compat import is_pv1_scalar_sequence_field
```



---
## alias
```python
from _compat import alias
```



---
## required
```python
from _compat import required
```



---
## default
```python
from _compat import default
```



---
## type_
```python
from _compat import type_
```



---
## __post_init__
```python
from _compat import __post_init__
```



---
## get_default
```python
from _compat import get_default
```



---
## validate
```python
from _compat import validate
```



---
## serialize
```python
from _compat import serialize
```



---
## __hash__
```python
from _compat import __hash__
```



---
## DefaultPlaceholder
```python
from datastructures import DefaultPlaceholder
```

You shouldn't use this class directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.

---
## Default
```python
from datastructures import Default
```

You shouldn't use this function directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.

---
## __get_validators__
```python
from datastructures import __get_validators__
```



---
## validate
```python
from datastructures import validate
```



---
## _validate
```python
from datastructures import _validate
```



---
## __get_pydantic_json_schema__
```python
from datastructures import __get_pydantic_json_schema__
```



---
## __get_pydantic_core_schema__
```python
from datastructures import __get_pydantic_core_schema__
```



---
## __modify_schema__
```python
from datastructures import __modify_schema__
```



---
## PtyProcessError
```python
from util import PtyProcessError
```

Generic error class for this package.

---
## which
```python
from util import which
```

Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.

`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.

---
## _access_check
```python
from util import _access_check
```



---
## __name__
```python
from _fork_pty import __name__
```

Substitute for the forkpty system call, to support Solaris.

---
## fork_pty
```python
from _fork_pty import fork_pty
```

This implements a substitute for the forkpty system call. This
should be more portable than the pty.fork() function. Specifically,
this should work on Solaris.

Modified 10.06.05 by Geoff Marshall: Implemented __fork_pty() method to
resolve the issue with Python's pty.fork() not supporting Solaris,
particularly ssh. Based on patch to posixmodule.c authored by Noah
Spurrier::

    http://mail.python.org/pipermail/python-dev/2003-May/035281.html

---
## pty_make_controlling_tty
```python
from _fork_pty import pty_make_controlling_tty
```

This makes the pseudo-terminal the controlling tty. This should be
more portable than the pty.fork() function. Specifically, this should
work on Solaris. 

---
## __name__
```python
from ptyprocess import __name__
```



---
## _make_eof_intr
```python
from ptyprocess import _make_eof_intr
```

Set constants _EOF and _INTR.

This avoids doing potentially costly operations on module load.

---
## _setecho
```python
from ptyprocess import _setecho
```



---
## _setwinsize
```python
from ptyprocess import _setwinsize
```



---
## PtyProcess
```python
from ptyprocess import PtyProcess
```

This class represents a process running in a pseudoterminal.

The main constructor is the :meth:`spawn` classmethod.

---
## PtyProcessUnicode
```python
from ptyprocess import PtyProcessUnicode
```

Unicode wrapper around a process running in a pseudoterminal.

This class exposes a similar interface to :class:`PtyProcess`, but its read
methods return unicode, and its :meth:`write` accepts unicode.

---
## _byte
```python
from ptyprocess import _byte
```



---
## FileNotFoundError
```python
from ptyprocess import FileNotFoundError
```



---
## TimeoutError
```python
from ptyprocess import TimeoutError
```



---
## __init__
```python
from ptyprocess import __init__
```



---
## spawn
```python
from ptyprocess import spawn
```

Start the given command in a child process in a pseudo terminal.

This does all the fork/exec type of stuff for a pty, and returns an
instance of PtyProcess.

If preexec_fn is supplied, it will be called with no arguments in the
child process before exec-ing the specified command.
It may, for instance, set signal handlers to SIG_DFL or SIG_IGN.

Dimensions of the psuedoterminal used for the subprocess can be
specified as a tuple (rows, cols), or the default (24, 80) will be used.

By default, all file descriptors except 0, 1 and 2 are closed. This
behavior can be overridden with pass_fds, a list of file descriptors to
keep open between the parent and the child.

---
## __repr__
```python
from ptyprocess import __repr__
```



---
## _coerce_send_string
```python
from ptyprocess import _coerce_send_string
```



---
## _coerce_read_string
```python
from ptyprocess import _coerce_read_string
```



---
## __del__
```python
from ptyprocess import __del__
```

This makes sure that no system resources are left open. Python only
garbage collects Python objects. OS file descriptors are not Python
objects, so they must be handled explicitly. If the child file
descriptor was opened outside of this class (passed to the constructor)
then this does not close it. 

---
## fileno
```python
from ptyprocess import fileno
```

This returns the file descriptor of the pty for the child.
        

---
## close
```python
from ptyprocess import close
```

This closes the connection with the child application. Note that
calling close() more than once is valid. This emulates standard Python
behavior with files. Set force to True if you want to make sure that
the child is terminated (SIGKILL is sent if the child ignores SIGHUP
and SIGINT). 

---
## flush
```python
from ptyprocess import flush
```

This does nothing. It is here to support the interface for a
File-like object. 

---
## isatty
```python
from ptyprocess import isatty
```

This returns True if the file descriptor is open and connected to a
tty(-like) device, else False.

On SVR4-style platforms implementing streams, such as SunOS and HP-UX,
the child pty may not appear as a terminal device.  This means
methods such as setecho(), setwinsize(), getwinsize() may raise an
IOError. 

---
## waitnoecho
```python
from ptyprocess import waitnoecho
```

This waits until the terminal ECHO flag is set False. This returns
True if the echo mode is off. This returns False if the ECHO flag was
not set False before the timeout. This can be used to detect when the
child is waiting for a password. Usually a child application will turn
off echo mode when it is waiting for the user to enter a password. For
example, instead of expecting the "password:" prompt you can wait for
the child to set ECHO off::

    p = pexpect.spawn('ssh user@example.com')
    p.waitnoecho()
    p.sendline(mypassword)

If timeout==None then this method to block until ECHO flag is False.

---
## getecho
```python
from ptyprocess import getecho
```

This returns the terminal echo mode. This returns True if echo is
on or False if echo is off. Child applications that are expecting you
to enter a password often set ECHO False. See waitnoecho().

Not supported on platforms where ``isatty()`` returns False.  

---
## setecho
```python
from ptyprocess import setecho
```

This sets the terminal echo mode on or off. Note that anything the
child sent before the echo will be lost, so you should be sure that
your input buffer is empty before you call setecho(). For example, the
following will work as expected::

    p = pexpect.spawn('cat') # Echo is on by default.
    p.sendline('1234') # We expect see this twice from the child...
    p.expect(['1234']) # ... once from the tty echo...
    p.expect(['1234']) # ... and again from cat itself.
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['abcd'])
    p.expect(['wxyz'])

The following WILL NOT WORK because the lines sent before the setecho
will be lost::

    p = pexpect.spawn('cat')
    p.sendline('1234')
    p.setecho(False) # Turn off tty echo
    p.sendline('abcd') # We will set this only once (echoed by cat).
    p.sendline('wxyz') # We will set this only once (echoed by cat)
    p.expect(['1234'])
    p.expect(['1234'])
    p.expect(['abcd'])
    p.expect(['wxyz'])


Not supported on platforms where ``isatty()`` returns False.

---
## read
```python
from ptyprocess import read
```

Read at most ``size`` bytes from the pty, return them as unicode.

Can block if there is nothing to read. Raises :exc:`EOFError` if the
terminal was closed.

The size argument still refers to bytes, not unicode code points.

---
## readline
```python
from ptyprocess import readline
```

Read one line from the pseudoterminal, and return it as unicode.

Can block if there is nothing to read. Raises :exc:`EOFError` if the
terminal was closed.

---
## _writeb
```python
from ptyprocess import _writeb
```



---
## write
```python
from ptyprocess import write
```

Write the unicode string ``s`` to the pseudoterminal.

Returns the number of bytes written.

---
## sendcontrol
```python
from ptyprocess import sendcontrol
```

Helper method that wraps send() with mnemonic access for sending control
character to the child (such as Ctrl-C or Ctrl-D).  For example, to send
Ctrl-G (ASCII 7, bell, '')::

    child.sendcontrol('g')

See also, sendintr() and sendeof().

---
## sendeof
```python
from ptyprocess import sendeof
```

This sends an EOF to the child. This sends a character which causes
the pending parent output buffer to be sent to the waiting child
program without waiting for end-of-line. If it is the first character
of the line, the read() in the user program returns 0, which signifies
end-of-file. This means to work as expected a sendeof() has to be
called at the beginning of a line. This method does not send a newline.
It is the responsibility of the caller to ensure the eof is sent at the
beginning of a line. 

---
## sendintr
```python
from ptyprocess import sendintr
```

This sends a SIGINT to the child. It does not require
the SIGINT to be the first character on a line. 

---
## eof
```python
from ptyprocess import eof
```

This returns True if the EOF exception was ever raised.
        

---
## terminate
```python
from ptyprocess import terminate
```

This forces a child process to terminate. It starts nicely with
SIGHUP and SIGINT. If "force" is True then moves onto SIGKILL. This
returns True if the child was terminated. This returns False if the
child could not be terminated. 

---
## wait
```python
from ptyprocess import wait
```

This waits until the child exits. This is a blocking call. This will
not read any data from the child, so this will block forever if the
child has unread output and has terminated. In other words, the child
may have printed output then called exit(), but, the child is
technically still alive until its output is read by the parent. 

---
## isalive
```python
from ptyprocess import isalive
```

This tests if the child process is running or not. This is
non-blocking. If the child was terminated then this will read the
exitstatus or signalstatus of the child. This returns True if the child
process appears to be running or False if not. It can take literally
SECONDS for Solaris to return the right status. 

---
## kill
```python
from ptyprocess import kill
```

Send the given signal to the child application.

In keeping with UNIX tradition it has a misleading name. It does not
necessarily kill the child unless you send the right signal. See the
:mod:`signal` module for constants representing signal numbers.

---
## getwinsize
```python
from ptyprocess import getwinsize
```

Return the window size of the pseudoterminal as a tuple (rows, cols).
        

---
## setwinsize
```python
from ptyprocess import setwinsize
```

Set the terminal window size of the child tty.

This will cause a SIGWINCH signal to be sent to the child. This does not
change the physical window size. It changes the size reported to
TTY-aware applications like vi or curses -- applications that respond to
the SIGWINCH signal.

---
## write_to_stdout
```python
from ptyprocess import write_to_stdout
```



---
## __name__
```python
from test_imports import __name__
```



---
## __name__
```python
from test_leak import __name__
```



---
## assert_does_not_leak
```python
from test_leak import assert_does_not_leak
```



---
## test_leak1
```python
from test_leak import test_leak1
```



---
## test_leak2
```python
from test_leak import test_leak2
```



---
## test_leak3
```python
from test_leak import test_leak3
```



---
## test_ARROW_8801
```python
from test_leak import test_ARROW_8801
```



---
## func
```python
from test_leak import func
```



---
## __name__
```python
from run_emscripten_tests import __name__
```



---
## TemplateOverrider
```python
from run_emscripten_tests import TemplateOverrider
```



---
## run_server_thread
```python
from run_emscripten_tests import run_server_thread
```



---
## launch_server
```python
from run_emscripten_tests import launch_server
```



---
## NodeDriver
```python
from run_emscripten_tests import NodeDriver
```



---
## BrowserDriver
```python
from run_emscripten_tests import BrowserDriver
```



---
## ChromeDriver
```python
from run_emscripten_tests import ChromeDriver
```



---
## FirefoxDriver
```python
from run_emscripten_tests import FirefoxDriver
```



---
## _load_pyarrow_in_runner
```python
from run_emscripten_tests import _load_pyarrow_in_runner
```



---
## log_request
```python
from run_emscripten_tests import log_request
```



---
## do_GET
```python
from run_emscripten_tests import do_GET
```



---
## end_headers
```python
from run_emscripten_tests import end_headers
```



---
## __init__
```python
from run_emscripten_tests import __init__
```



---
## load_pyodide
```python
from run_emscripten_tests import load_pyodide
```



---
## clear_logs
```python
from run_emscripten_tests import clear_logs
```



---
## write_stdin
```python
from run_emscripten_tests import write_stdin
```



---
## execute_js
```python
from run_emscripten_tests import execute_js
```



---
## load_arrow
```python
from run_emscripten_tests import load_arrow
```



---
## execute_python
```python
from run_emscripten_tests import execute_python
```



---
## wait_for_done
```python
from run_emscripten_tests import wait_for_done
```



---
## __name__
```python
from themes import __name__
```



---
## Screen
```python
from screen import Screen
```

A renderable that fills the terminal screen and crops excess.

Args:
    renderable (RenderableType): Child renderable.
    style (StyleType, optional): Optional background style. Defaults to None.

---
## __rich_console__
```python
from screen import __rich_console__
```



---
## RichHandler
```python
from logging import RichHandler
```

A logging handler that renders output with Rich. The time / level / message and file are displayed in columns.
The level is color coded, and the message is syntax highlighted.

Note:
    Be careful when enabling console markup in log messages if you have configured logging for libraries not
    under your control. If a dependency writes messages containing square brackets, it may not produce the intended output.

Args:
    level (Union[int, str], optional): Log level. Defaults to logging.NOTSET.
    console (:class:`~rich.console.Console`, optional): Optional console instance to write logs.
        Default will use a global console instance writing to stdout.
    show_time (bool, optional): Show a column for the time. Defaults to True.
    omit_repeated_times (bool, optional): Omit repetition of the same time. Defaults to True.
    show_level (bool, optional): Show a column for the level. Defaults to True.
    show_path (bool, optional): Show the path to the original log call. Defaults to True.
    enable_link_path (bool, optional): Enable terminal link of path column to file. Defaults to True.
    highlighter (Highlighter, optional): Highlighter to style log messages, or None to use ReprHighlighter. Defaults to None.
    markup (bool, optional): Enable console markup in log messages. Defaults to False.
    rich_tracebacks (bool, optional): Enable rich tracebacks with syntax highlighting and formatting. Defaults to False.
    tracebacks_width (Optional[int], optional): Number of characters used to render tracebacks, or None for full width. Defaults to None.
    tracebacks_extra_lines (int, optional): Additional lines of code to render tracebacks, or None for full width. Defaults to None.
    tracebacks_theme (str, optional): Override pygments theme used in traceback.
    tracebacks_word_wrap (bool, optional): Enable word wrapping of long tracebacks lines. Defaults to True.
    tracebacks_show_locals (bool, optional): Enable display of locals in tracebacks. Defaults to False.
    tracebacks_suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%x %X] ".
    keywords (List[str], optional): List of words to highlight instead of ``RichHandler.KEYWORDS``.

---
## __init__
```python
from logging import __init__
```



---
## get_level_text
```python
from logging import get_level_text
```

Get the level name from the record.

Args:
    record (LogRecord): LogRecord instance.

Returns:
    Text: A tuple of the style and level name.

---
## emit
```python
from logging import emit
```



---
## render_message
```python
from logging import render_message
```

Render message text in to Text.

Args:
    record (LogRecord): logging Record.
    message (str): String containing log message.

Returns:
    ConsoleRenderable: Renderable to display log message.

---
## render
```python
from logging import render
```

Render log for display.

Args:
    record (LogRecord): logging Record.
    traceback (Optional[Traceback]): Traceback instance or None for no Traceback.
    message_renderable (ConsoleRenderable): Renderable (typically Text) containing log message contents.

Returns:
    ConsoleRenderable: Renderable to display log.

---
## divide
```python
from logging import divide
```



---
## __name__
```python
from measure import __name__
```



---
## Measurement
```python
from measure import Measurement
```

Stores the minimum and maximum widths (in characters) required to render an object.

---
## measure_renderables
```python
from measure import measure_renderables
```

Get a measurement that would fit a number of renderables.

Args:
    console (~rich.console.Console): Console instance.
    options (~rich.console.ConsoleOptions): Console options.
    renderables (Iterable[RenderableType]): One or more renderable objects.

Returns:
    Measurement: Measurement object containing range of character widths required to
        contain all given renderables.

---
## span
```python
from measure import span
```

Get difference between maximum and minimum.

---
## normalize
```python
from measure import normalize
```

Get measurement that ensures that minimum <= maximum and minimum >= 0

Returns:
    Measurement: A normalized measurement.

---
## with_maximum
```python
from measure import with_maximum
```

Get a RenderableWith where the widths are <= width.

Args:
    width (int): Maximum desired width.

Returns:
    Measurement: New Measurement object.

---
## with_minimum
```python
from measure import with_minimum
```

Get a RenderableWith where the widths are >= width.

Args:
    width (int): Minimum desired width.

Returns:
    Measurement: New Measurement object.

---
## clamp
```python
from measure import clamp
```

Clamp a measurement within the specified range.

Args:
    min_width (int): Minimum desired width, or ``None`` for no minimum. Defaults to None.
    max_width (int): Maximum desired width, or ``None`` for no maximum. Defaults to None.

Returns:
    Measurement: New Measurement object.

---
## get
```python
from measure import get
```

Get a measurement for a renderable.

Args:
    console (~rich.console.Console): Console instance.
    options (~rich.console.ConsoleOptions): Console options.
    renderable (RenderableType): An object that may be rendered with Rich.

Raises:
    errors.NotRenderableError: If the object is not renderable.

Returns:
    Measurement: Measurement object containing range of character widths required to render the object.

---
## Tree
```python
from tree import Tree
```

A renderable for a tree structure.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (bool, optional): Highlight renderable (if str). Defaults to False.

---
## add
```python
from tree import add
```

Add a child tree.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.

Returns:
    Tree: A new child Tree, which may be further modified.

---
## __rich_console__
```python
from tree import __rich_console__
```



---
## __rich_measure__
```python
from tree import __rich_measure__
```



---
## make_guide
```python
from tree import make_guide
```

Make a Segment for a level of the guide lines.

---
## NoChange
```python
from console import NoChange
```



---
## ConsoleDimensions
```python
from console import ConsoleDimensions
```

Size of the terminal.

---
## ConsoleOptions
```python
from console import ConsoleOptions
```

Options for __rich_console__ method.

---
## RichCast
```python
from console import RichCast
```

An object that may be 'cast' to a console renderable.

---
## ConsoleRenderable
```python
from console import ConsoleRenderable
```

An object that supports the console protocol.

---
## CaptureError
```python
from console import CaptureError
```

An error in the Capture context manager.

---
## NewLine
```python
from console import NewLine
```

A renderable to generate new line(s)

---
## ScreenUpdate
```python
from console import ScreenUpdate
```

Render a list of lines at a given offset.

---
## Capture
```python
from console import Capture
```

Context manager to capture the result of printing to the console.
See :meth:`~rich.console.Console.capture` for how to use.

Args:
    console (Console): A console instance to capture output.

---
## ThemeContext
```python
from console import ThemeContext
```

A context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage.

---
## PagerContext
```python
from console import PagerContext
```

A context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage.

---
## ScreenContext
```python
from console import ScreenContext
```

A context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage.

---
## Group
```python
from console import Group
```

Takes a group of renderables and returns a renderable object that renders the group.

Args:
    renderables (Iterable[RenderableType]): An iterable of renderable objects.
    fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.

---
## group
```python
from console import group
```

A decorator that turns an iterable of renderables in to a group.

Args:
    fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.

---
## _is_jupyter
```python
from console import _is_jupyter
```

Check if we're running in a Jupyter notebook.

---
## ConsoleThreadLocals
```python
from console import ConsoleThreadLocals
```

Thread local values for Console context.

---
## RenderHook
```python
from console import RenderHook
```

Provides hooks in to the render process.

---
## get_windows_console_features
```python
from console import get_windows_console_features
```



---
## detect_legacy_windows
```python
from console import detect_legacy_windows
```

Detect legacy Windows.

---
## Console
```python
from console import Console
```

A high level console interface.

Args:
    color_system (str, optional): The color system supported by your terminal,
        either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect.
    force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None.
    force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None.
    force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None.
    soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False.
    theme (Theme, optional): An optional style theme object, or ``None`` for default theme.
    stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False.
    file (IO, optional): A file object where the console should write to. Defaults to stdout.
    quiet (bool, Optional): Boolean to suppress all output. Defaults to False.
    width (int, optional): The width of the terminal. Leave as default to auto-detect width.
    height (int, optional): The height of the terminal. Leave as default to auto-detect height.
    style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None.
    no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None.
    tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8.
    record (bool, optional): Boolean to enable recording of terminal output,
        required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False.
    markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True.
    emoji (bool, optional): Enable emoji code. Defaults to True.
    emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
    highlight (bool, optional): Enable automatic highlighting. Defaults to True.
    log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True.
    log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True.
    log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ".
    highlighter (HighlighterType, optional): Default highlighter.
    legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``.
    safe_box (bool, optional): Restrict box options that don't render on legacy Windows.
    get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log),
        or None for datetime.now.
    get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic.

---
## _svg_hash
```python
from console import _svg_hash
```

Returns a unique hash for the given SVG main code.

Args:
    svg_main_code (str): The content we're going to inject in the SVG envelope.

Returns:
    str: a hash of the given content

---
## ascii_only
```python
from console import ascii_only
```

Check if renderables should use ascii only.

---
## copy
```python
from console import copy
```

Return a copy of the options.

Returns:
    ConsoleOptions: a copy of self.

---
## update
```python
from console import update
```

Update the screen.

Args:
    renderable (RenderableType, optional): Optional renderable to replace current renderable,
        or None for no change. Defaults to None.
    style: (Style, optional): Replacement style, or None for no change. Defaults to None.

---
## update_width
```python
from console import update_width
```

Update just the width, return a copy.

Args:
    width (int): New width (sets both min_width and max_width)

Returns:
    ~ConsoleOptions: New console options instance.

---
## update_height
```python
from console import update_height
```

Update the height, and return a copy.

Args:
    height (int): New height

Returns:
    ~ConsoleOptions: New Console options instance.

---
## reset_height
```python
from console import reset_height
```

Return a copy of the options with height set to ``None``.

Returns:
    ~ConsoleOptions: New console options instance.

---
## update_dimensions
```python
from console import update_dimensions
```

Update the width and height, and return a copy.

Args:
    width (int): New width (sets both min_width and max_width).
    height (int): New height.

Returns:
    ~ConsoleOptions: New console options instance.

---
## __rich__
```python
from console import __rich__
```



---
## __rich_console__
```python
from console import __rich_console__
```



---
## __init__
```python
from console import __init__
```



---
## __enter__
```python
from console import __enter__
```

Own context manager to enter buffer context.

---
## __exit__
```python
from console import __exit__
```

Exit buffer context.

---
## get
```python
from console import get
```

Get the result of the capture.

---
## renderables
```python
from console import renderables
```



---
## __rich_measure__
```python
from console import __rich_measure__
```



---
## decorator
```python
from console import decorator
```

Convert a method that returns an iterable of renderables in to a Group.

---
## process_renderables
```python
from console import process_renderables
```

Called with a list of objects to render.

This method can return a new list of renderables, or modify and return the same list.

Args:
    renderables (List[ConsoleRenderable]): A number of renderable objects.

Returns:
    List[ConsoleRenderable]: A replacement list of renderables.

---
## __repr__
```python
from console import __repr__
```



---
## file
```python
from console import file
```

Set a new file object.

---
## _buffer
```python
from console import _buffer
```

Get a thread local buffer.

---
## _buffer_index
```python
from console import _buffer_index
```



---
## _theme_stack
```python
from console import _theme_stack
```

Get the thread local theme stack.

---
## _detect_color_system
```python
from console import _detect_color_system
```

Detect color system from env vars.

---
## _enter_buffer
```python
from console import _enter_buffer
```

Enter in to a buffer context, and buffer all output.

---
## _exit_buffer
```python
from console import _exit_buffer
```

Leave buffer context, and render content if required.

---
## set_live
```python
from console import set_live
```

Set Live instance. Used by Live context manager.

Args:
    live (Live): Live instance using this Console.

Raises:
    errors.LiveError: If this Console has a Live context currently active.

---
## clear_live
```python
from console import clear_live
```

Clear the Live instance.

---
## push_render_hook
```python
from console import push_render_hook
```

Add a new render hook to the stack.

Args:
    hook (RenderHook): Render hook instance.

---
## pop_render_hook
```python
from console import pop_render_hook
```

Pop the last renderhook from the stack.

---
## begin_capture
```python
from console import begin_capture
```

Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.

---
## end_capture
```python
from console import end_capture
```

End capture mode and return captured string.

Returns:
    str: Console output.

---
## push_theme
```python
from console import push_theme
```

Push a new theme on to the top of the stack, replacing the styles from the previous theme.
Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather
than calling this method directly.

Args:
    theme (Theme): A theme instance.
    inherit (bool, optional): Inherit existing styles. Defaults to True.

---
## pop_theme
```python
from console import pop_theme
```

Remove theme from top of stack, restoring previous theme.

---
## use_theme
```python
from console import use_theme
```

Use a different theme for the duration of the context manager.

Args:
    theme (Theme): Theme instance to user.
    inherit (bool, optional): Inherit existing console styles. Defaults to True.

Returns:
    ThemeContext: [description]

---
## color_system
```python
from console import color_system
```

Get color system string.

Returns:
    Optional[str]: "standard", "256" or "truecolor".

---
## encoding
```python
from console import encoding
```

Get the encoding of the console file, e.g. ``"utf-8"``.

Returns:
    str: A standard encoding string.

---
## is_terminal
```python
from console import is_terminal
```

Check if the console is writing to a terminal.

Returns:
    bool: True if the console writing to a device capable of
    understanding terminal codes, otherwise False.

---
## is_dumb_terminal
```python
from console import is_dumb_terminal
```

Detect dumb terminal.

Returns:
    bool: True if writing to a dumb terminal, otherwise False.

---
## options
```python
from console import options
```

Get default console options.

---
## size
```python
from console import size
```

Set a new size for the terminal.

Args:
    new_size (Tuple[int, int]): New width and height.

---
## width
```python
from console import width
```

Set width.

Args:
    width (int): New width.

---
## height
```python
from console import height
```

Set height.

Args:
    height (int): new height.

---
## bell
```python
from console import bell
```

Play a 'bell' sound (if supported by the terminal).

---
## capture
```python
from console import capture
```

A context manager to *capture* the result of print() or log() in a string,
rather than writing it to the console.

Example:
    >>> from rich.console import Console
    >>> console = Console()
    >>> with console.capture() as capture:
    ...     console.print("[bold magenta]Hello World[/]")
    >>> print(capture.get())

Returns:
    Capture: Context manager with disables writing to the terminal.

---
## pager
```python
from console import pager
```

A context manager to display anything printed within a "pager". The pager application
is defined by the system and will typically support at least pressing a key to scroll.

Args:
    pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None.
    styles (bool, optional): Show styles in pager. Defaults to False.
    links (bool, optional): Show links in pager. Defaults to False.

Example:
    >>> from rich.console import Console
    >>> from rich.__main__ import make_test_card
    >>> console = Console()
    >>> with console.pager():
            console.print(make_test_card())

Returns:
    PagerContext: A context manager.

---
## line
```python
from console import line
```

Write new line(s).

Args:
    count (int, optional): Number of new lines. Defaults to 1.

---
## clear
```python
from console import clear
```

Clear the screen.

Args:
    home (bool, optional): Also move the cursor to 'home' position. Defaults to True.

---
## status
```python
from console import status
```

Display a status and spinner.

Args:
    status (RenderableType): A status renderable (str or Text typically).
    spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
    spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
    speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
    refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.

Returns:
    Status: A Status object that may be used as a context manager.

---
## show_cursor
```python
from console import show_cursor
```

Show or hide the cursor.

Args:
    show (bool, optional): Set visibility of the cursor.

---
## set_alt_screen
```python
from console import set_alt_screen
```

Enables alternative screen mode.

Note, if you enable this mode, you should ensure that is disabled before
the application exits. See :meth:`~rich.Console.screen` for a context manager
that handles this for you.

Args:
    enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True.

Returns:
    bool: True if the control codes were written.

---
## is_alt_screen
```python
from console import is_alt_screen
```

Check if the alt screen was enabled.

Returns:
    bool: True if the alt screen was enabled, otherwise False.

---
## set_window_title
```python
from console import set_window_title
```

Set the title of the console terminal window.

Warning: There is no means within Rich of "resetting" the window title to its
previous value, meaning the title you set will persist even after your application
exits.

``fish`` shell resets the window title before and after each command by default,
negating this issue. Windows Terminal and command prompt will also reset the title for you.
Most other shells and terminals, however, do not do this.

Some terminals may require configuration changes before you can set the title.
Some terminals may not support setting the title at all.

Other software (including the terminal itself, the shell, custom prompts, plugins, etc.)
may also set the terminal window title. This could result in whatever value you write
using this method being overwritten.

Args:
    title (str): The new title of the terminal window.

Returns:
    bool: True if the control code to change the terminal title was
        written, otherwise False. Note that a return value of True
        does not guarantee that the window title has actually changed,
        since the feature may be unsupported/disabled in some terminals.

---
## screen
```python
from console import screen
```

Context manager to enable and disable 'alternative screen' mode.

Args:
    hide_cursor (bool, optional): Also hide the cursor. Defaults to False.
    style (Style, optional): Optional style for screen. Defaults to None.

Returns:
    ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit.

---
## measure
```python
from console import measure
```

Measure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains
information regarding the number of characters required to print the renderable.

Args:
    renderable (RenderableType): Any renderable or string.
    options (Optional[ConsoleOptions], optional): Options to use when measuring, or None
        to use default options. Defaults to None.

Returns:
    Measurement: A measurement of the renderable.

---
## render
```python
from console import render
```

Render an object in to an iterable of `Segment` instances.

This method contains the logic for rendering objects with the console protocol.
You are unlikely to need to use it directly, unless you are extending the library.

Args:
    renderable (RenderableType): An object supporting the console protocol, or
        an object that may be converted to a string.
    options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None.

Returns:
    Iterable[Segment]: An iterable of segments that may be rendered.

---
## render_lines
```python
from console import render_lines
```

Render objects in to a list of lines.

        The output of render_lines is useful when further formatting of rendered console text
        is required, such as the Panel class which draws a border around any renderable object.

        Args:
            renderable (RenderableType): Any object renderable in the console.
            options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``.
            style (Style, optional): Optional style to apply to renderables. Defaults to ``None``.
            pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``.
            new_lines (bool, optional): Include "
" characters at end of lines.

        Returns:
            List[List[Segment]]: A list of lines, where a line is a list of Segment objects.
        

---
## render_str
```python
from console import render_str
```

Convert a string to a Text instance. This is called automatically if
you print or log a string.

Args:
    text (str): Text to render.
    style (Union[str, Style], optional): Style to apply to rendered text.
    justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``.
    overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``.
    emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default.
    markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default.
    highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default.
    highlighter (HighlighterType, optional): Optional highlighter to apply.
Returns:
    ConsoleRenderable: Renderable object.

---
## get_style
```python
from console import get_style
```

Get a Style instance by its theme name or parse a definition.

Args:
    name (str): The name of a style or a style definition.

Returns:
    Style: A Style object.

Raises:
    MissingStyle: If no style could be parsed from name.

---
## _collect_renderables
```python
from console import _collect_renderables
```

Combine a number of renderables and text into one renderable.

Args:
    objects (Iterable[Any]): Anything that Rich can render.
    sep (str): String to write between print data.
    end (str): String to write at end of print data.
    justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
    emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default.
    markup (Optional[bool], optional): Enable markup, or ``None`` to use console default.
    highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default.

Returns:
    List[ConsoleRenderable]: A list of things to render.

---
## rule
```python
from console import rule
```

Draw a line with optional centered title.

Args:
    title (str, optional): Text to render over the rule. Defaults to "".
    characters (str, optional): Character(s) to form the line. Defaults to "─".
    style (str, optional): Style of line. Defaults to "rule.line".
    align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".

---
## control
```python
from console import control
```

Insert non-printing control codes.

Args:
    control_codes (str): Control codes, such as those that may move the cursor.

---
## out
```python
from console import out
```

Output to the terminal. This is a low-level way of writing to the terminal which unlike
:meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will
optionally apply highlighting and a basic style.

Args:
    sep (str, optional): String to write between print data. Defaults to " ".
    end (str, optional): String to write at end of print data. Defaults to "\\n".
    style (Union[str, Style], optional): A style to apply to output. Defaults to None.
    highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use
        console default. Defaults to ``None``.

---
## print
```python
from console import print
```

Print to the console.

Args:
    objects (positional args): Objects to log to the terminal.
    sep (str, optional): String to write between print data. Defaults to " ".
    end (str, optional): String to write at end of print data. Defaults to "\\n".
    style (Union[str, Style], optional): A style to apply to output. Defaults to None.
    justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``.
    overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None.
    no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None.
    emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``.
    markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``.
    highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``.
    width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``.
    crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True.
    soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for
        Console default. Defaults to ``None``.
    new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``.

---
## print_json
```python
from console import print_json
```

Pretty prints JSON. Output will be valid JSON.

Args:
    json (Optional[str]): A string containing JSON.
    data (Any): If json is not supplied, then encode this data.
    indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2.
    highlight (bool, optional): Enable highlighting of output: Defaults to True.
    skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
    ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
    check_circular (bool, optional): Check for circular references. Defaults to True.
    allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
    default (Callable, optional): A callable that converts values that can not be encoded
        in to something that can be JSON encoded. Defaults to None.
    sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

---
## update_screen
```python
from console import update_screen
```

Update the screen at a given offset.

Args:
    renderable (RenderableType): A Rich renderable.
    region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None.
    x (int, optional): x offset. Defaults to 0.
    y (int, optional): y offset. Defaults to 0.

Raises:
    errors.NoAltScreen: If the Console isn't in alt screen mode.

---
## update_screen_lines
```python
from console import update_screen_lines
```

Update lines of the screen at a given offset.

Args:
    lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`).
    x (int, optional): x offset (column no). Defaults to 0.
    y (int, optional): y offset (column no). Defaults to 0.

Raises:
    errors.NoAltScreen: If the Console isn't in alt screen mode.

---
## print_exception
```python
from console import print_exception
```

Prints a rich render of the last exception and traceback.

Args:
    width (Optional[int], optional): Number of characters used to render code. Defaults to 100.
    extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
    theme (str, optional): Override pygments theme used in traceback
    word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
    show_locals (bool, optional): Enable display of local variables. Defaults to False.
    suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

---
## _caller_frame_info
```python
from console import _caller_frame_info
```

Get caller frame information.

Args:
    offset (int): the caller offset within the current frame stack.
    currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to
        retrieve the current frame. Defaults to ``inspect.currentframe``.

Returns:
    Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and
        the dictionary of local variables associated with the caller frame.

Raises:
    RuntimeError: If the stack offset is invalid.

---
## log
```python
from console import log
```

Log rich content to the terminal.

Args:
    objects (positional args): Objects to log to the terminal.
    sep (str, optional): String to write between print data. Defaults to " ".
    end (str, optional): String to write at end of print data. Defaults to "\\n".
    style (Union[str, Style], optional): A style to apply to output. Defaults to None.
    justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
    emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None.
    markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None.
    highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None.
    log_locals (bool, optional): Boolean to enable logging of locals where ``log()``
        was called. Defaults to False.
    _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1.

---
## on_broken_pipe
```python
from console import on_broken_pipe
```

This function is called when a `BrokenPipeError` is raised.

This can occur when piping Textual output in Linux and macOS.
The default implementation is to exit the app, but you could implement
this method in a subclass to change the behavior.

See https://docs.python.org/3/library/signal.html#note-on-sigpipe for details.

---
## _check_buffer
```python
from console import _check_buffer
```

Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False)
Rendering is supported on Windows, Unix and Jupyter environments. For
legacy Windows consoles, the win32 API is called directly.
This method will also record what it renders if recording is enabled via Console.record.

---
## _write_buffer
```python
from console import _write_buffer
```

Write the buffer to the output file.

---
## _render_buffer
```python
from console import _render_buffer
```

Render buffered output, and clear buffer.

---
## input
```python
from console import input
```

Displays a prompt and waits for input from the user. The prompt may contain color / style.

It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded.

Args:
    prompt (Union[str, Text]): Text to render in the prompt.
    markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True.
    emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True.
    password: (bool, optional): Hide typed text. Defaults to False.
    stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None.

Returns:
    str: Text read from stdin.

---
## export_text
```python
from console import export_text
```

Generate text from console contents (requires record=True argument in constructor).

Args:
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
    styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text.
        Defaults to ``False``.

Returns:
    str: String containing console contents.

---
## save_text
```python
from console import save_text
```

Generate text from console and save to a given location (requires record=True argument in constructor).

Args:
    path (str): Path to write text files.
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
    styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text.
        Defaults to ``False``.

---
## export_html
```python
from console import export_html
```

Generate HTML from console contents (requires record=True argument in constructor).

Args:
    theme (TerminalTheme, optional): TerminalTheme object containing console colors.
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
    code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
        '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
    inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
        larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
        Defaults to False.

Returns:
    str: String containing console contents as HTML.

---
## save_html
```python
from console import save_html
```

Generate HTML from console contents and write to a file (requires record=True argument in constructor).

Args:
    path (str): Path to write html file.
    theme (TerminalTheme, optional): TerminalTheme object containing console colors.
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
    code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
        '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
    inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
        larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
        Defaults to False.

---
## export_svg
```python
from console import export_svg
```

Generate an SVG from the console contents (requires record=True in Console constructor).

Args:
    title (str, optional): The title of the tab in the output image
    theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
    code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
        into the string in order to form the final SVG output. The default template used and the variables
        injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
    font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
        string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
        If you aren't specifying a different font inside ``code_format``, you probably don't need this.
    unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
        ids). If not set, this defaults to a computed value based on the recorded content.

---
## save_svg
```python
from console import save_svg
```

Generate an SVG file from the console contents (requires record=True in Console constructor).

Args:
    path (str): The path to write the SVG to.
    title (str, optional): The title of the tab in the output image
    theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
    clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
    code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
        into the string in order to form the final SVG output. The default template used and the variables
        injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
    font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
        string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
        If you aren't specifying a different font inside ``code_format``, you probably don't need this.
    unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
        ids). If not set, this defaults to a computed value based on the recorded content.

---
## _replace
```python
from console import _replace
```



---
## check_text
```python
from console import check_text
```



---
## get_svg_style
```python
from console import get_svg_style
```

Convert a Style to CSS rules for SVG.

---
## escape_text
```python
from console import escape_text
```

HTML escape text and replace spaces with nbsp.

---
## make_tag
```python
from console import make_tag
```

Make a tag from name, content, and attributes.

---
## align_append
```python
from console import align_append
```



---
## stringify
```python
from console import stringify
```



---
## __name__
```python
from live_render import __name__
```



---
## LiveRender
```python
from live_render import LiveRender
```

Creates a renderable that may be updated.

Args:
    renderable (RenderableType): Any renderable object.
    style (StyleType, optional): An optional style to apply to the renderable. Defaults to "".

---
## __init__
```python
from live_render import __init__
```



---
## set_renderable
```python
from live_render import set_renderable
```

Set a new renderable.

Args:
    renderable (RenderableType): Any renderable object, including str.

---
## position_cursor
```python
from live_render import position_cursor
```

Get control codes to move cursor to beginning of live render.

Returns:
    Control: A control instance that may be printed.

---
## restore_cursor
```python
from live_render import restore_cursor
```

Get control codes to clear the render and restore the cursor to its previous position.

Returns:
    Control: A Control instance that may be printed.

---
## __rich_console__
```python
from live_render import __rich_console__
```



---
## __name__
```python
from _emoji_codes import __name__
```



---
## __name__
```python
from box import __name__
```



---
## Box
```python
from box import Box
```

Defines characters to render boxes.

┌─┬┐ top
│ ││ head
├─┼┤ head_row
│ ││ mid
├─┼┤ row
├─┼┤ foot_row
│ ││ foot
└─┴┘ bottom

Args:
    box (str): Characters making up box.
    ascii (bool, optional): True if this box uses ascii characters only. Default is False.

---
## __init__
```python
from box import __init__
```



---
## __repr__
```python
from box import __repr__
```



---
## __str__
```python
from box import __str__
```



---
## substitute
```python
from box import substitute
```

Substitute this box for another if it won't render due to platform issues.

Args:
    options (ConsoleOptions): Console options used in rendering.
    safe (bool, optional): Substitute this for another Box if there are known problems
        displaying on the platform (currently only relevant on Windows). Default is True.

Returns:
    Box: A different Box or the same Box.

---
## get_plain_headed_box
```python
from box import get_plain_headed_box
```

If this box uses special characters for the borders of the header, then
return the equivalent box that does not.

Returns:
    Box: The most similar Box that doesn't use header-specific box characters.
        If the current Box already satisfies this criterion, then it's returned.

---
## get_top
```python
from box import get_top
```

Get the top of a simple box.

Args:
    widths (List[int]): Widths of columns.

Returns:
    str: A string of box characters.

---
## get_row
```python
from box import get_row
```

Get the top of a simple box.

Args:
    width (List[int]): Widths of columns.

Returns:
    str: A string of box characters.

---
## get_bottom
```python
from box import get_bottom
```

Get the bottom of a simple box.

Args:
    widths (List[int]): Widths of columns.

Returns:
    str: A string of box characters.

---
## __name__
```python
from color import __name__
```

Color definitions are  used as per CSS3 specification:
http://www.w3.org/TR/css3-color/#svg-color

A few colors have multiple names referring to the sames colors, eg. `grey` and `gray` or `aqua` and `cyan`.

In these cases the LAST color when sorted alphabetically takes preferences,
eg. Color((0, 255, 255)).as_named() == 'cyan' because "cyan" comes after "aqua".

---
## ColorSystem
```python
from color import ColorSystem
```

One of the 3 color system supported by terminals.

---
## ColorType
```python
from color import ColorType
```

Type of color stored in Color class.

---
## ColorParseError
```python
from color import ColorParseError
```

The color could not be parsed.

---
## Color
```python
from color import Color
```



---
## parse_rgb_hex
```python
from color import parse_rgb_hex
```

Parse six hex characters in to RGB triplet.

---
## blend_rgb
```python
from color import blend_rgb
```

Blend one RGB color in to another.

---
## __repr__
```python
from color import __repr__
```



---
## __str__
```python
from color import __str__
```



---
## __rich__
```python
from color import __rich__
```

Displays the actual color if Rich printed.

---
## __rich_repr__
```python
from color import __rich_repr__
```



---
## system
```python
from color import system
```

Get the native color system for this color.

---
## is_system_defined
```python
from color import is_system_defined
```

Check if the color is ultimately defined by the system.

---
## is_default
```python
from color import is_default
```

Check if the color is a default color.

---
## get_truecolor
```python
from color import get_truecolor
```

Get an equivalent color triplet for this color.

Args:
    theme (TerminalTheme, optional): Optional terminal theme, or None to use default. Defaults to None.
    foreground (bool, optional): True for a foreground color, or False for background. Defaults to True.

Returns:
    ColorTriplet: A color triplet containing RGB components.

---
## from_ansi
```python
from color import from_ansi
```

Create a Color number from it's 8-bit ansi number.

Args:
    number (int): A number between 0-255 inclusive.

Returns:
    Color: A new Color instance.

---
## from_triplet
```python
from color import from_triplet
```

Create a truecolor RGB color from a triplet of values.

Args:
    triplet (ColorTriplet): A color triplet containing red, green and blue components.

Returns:
    Color: A new color object.

---
## from_rgb
```python
from color import from_rgb
```

Create a truecolor from three color components in the range(0->255).

Args:
    red (float): Red component in range 0-255.
    green (float): Green component in range 0-255.
    blue (float): Blue component in range 0-255.

Returns:
    Color: A new color object.

---
## default
```python
from color import default
```

Get a Color instance representing the default color.

Returns:
    Color: Default color.

---
## parse
```python
from color import parse
```

Parse a color definition.

---
## get_ansi_codes
```python
from color import get_ansi_codes
```

Get the ANSI escape codes for this color.

---
## downgrade
```python
from color import downgrade
```

Downgrade a color system to a system with fewer colors.

---
## __name__
```python
from _timer import __name__
```

Timer context manager, only used in debug.

---
## timer
```python
from _timer import timer
```

print the elapsed time. (only used in debugging)

---
## __name__
```python
from _fileno import __name__
```



---
## get_fileno
```python
from _fileno import get_fileno
```

Get fileno() from a file, accounting for poorly implemented file-like objects.

Args:
    file_like (IO): A file-like object.

Returns:
    int | None: The result of fileno if available, or None if operation failed.

---
## __name__
```python
from align import __name__
```

Core eval alignment algorithms.

---
## Align
```python
from align import Align
```

Align a renderable by adding spaces if necessary.

Args:
    renderable (RenderableType): A console renderable.
    align (AlignMethod): One of "left", "center", or "right""
    style (StyleType, optional): An optional style to apply to the background.
    vertical (Optional[VerticalAlignMethod], optional): Optional vertical align, one of "top", "middle", or "bottom". Defaults to None.
    pad (bool, optional): Pad the right with spaces. Defaults to True.
    width (int, optional): Restrict contents to given width, or None to use default width. Defaults to None.
    height (int, optional): Set height of align renderable, or None to fit to contents. Defaults to None.

Raises:
    ValueError: if ``align`` is not one of the expected values.

---
## VerticalCenter
```python
from align import VerticalCenter
```

Vertically aligns a renderable.

Warn:
    This class is deprecated and may be removed in a future version. Use Align class with
    `vertical="middle"`.

Args:
    renderable (RenderableType): A renderable object.

---
## __init__
```python
from align import __init__
```



---
## __repr__
```python
from align import __repr__
```



---
## left
```python
from align import left
```

Align a renderable to the left.

---
## center
```python
from align import center
```

Align a renderable to the center.

---
## right
```python
from align import right
```

Align a renderable to the right.

---
## __rich_console__
```python
from align import __rich_console__
```



---
## __rich_measure__
```python
from align import __rich_measure__
```



---
## generate_segments
```python
from align import generate_segments
```



---
## blank_lines
```python
from align import blank_lines
```



---
## __name__
```python
from theme import __name__
```



---
## Theme
```python
from theme import Theme
```

A container for style information, used by :class:`~rich.console.Console`.

Args:
    styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
    inherit (bool, optional): Inherit default styles. Defaults to True.

---
## ThemeStackError
```python
from theme import ThemeStackError
```

Base exception for errors related to the theme stack.

---
## ThemeStack
```python
from theme import ThemeStack
```

A stack of themes.

Args:
    theme (Theme): A theme instance

---
## __init__
```python
from theme import __init__
```



---
## config
```python
from theme import config
```

Get contents of a config file for this theme.

---
## from_file
```python
from theme import from_file
```

Load a theme from a text mode file.

Args:
    config_file (IO[str]): An open conf file.
    source (str, optional): The filename of the open file. Defaults to None.
    inherit (bool, optional): Inherit default styles. Defaults to True.

Returns:
    Theme: A New theme instance.

---
## read
```python
from theme import read
```

Read a theme from a path.

Args:
    path (str): Path to a config file readable by Python configparser module.
    inherit (bool, optional): Inherit default styles. Defaults to True.
    encoding (str, optional): Encoding of the config file. Defaults to None.

Returns:
    Theme: A new theme instance.

---
## push_theme
```python
from theme import push_theme
```

Push a theme on the top of the stack.

Args:
    theme (Theme): A Theme instance.
    inherit (boolean, optional): Inherit styles from current top of stack.

---
## pop_theme
```python
from theme import pop_theme
```

Pop (and discard) the top-most theme.

---
## _Bit
```python
from style import _Bit
```

A descriptor to get/set a style attribute bit.

---
## StyleStack
```python
from style import StyleStack
```

A stack of styles.

---
## __init__
```python
from style import __init__
```



---
## __get__
```python
from style import __get__
```



---
## null
```python
from style import null
```

Create an 'null' style, equivalent to Style(), but more performant.

---
## from_color
```python
from style import from_color
```

Create a new style with colors and no attributes.

Returns:
    color (Optional[Color]): A (foreground) color, or None for no color. Defaults to None.
    bgcolor (Optional[Color]): A (background) color, or None for no color. Defaults to None.

---
## from_meta
```python
from style import from_meta
```

Create a new style with meta data.

Returns:
    meta (Optional[Dict[str, Any]]): A dictionary of meta data. Defaults to None.

---
## on
```python
from style import on
```

Create a blank style with meta information.

Example:
    style = Style.on(click=self.on_click)

Args:
    meta (Optional[Dict[str, Any]], optional): An optional dict of meta information.
    **handlers (Any): Keyword arguments are translated in to handlers.

Returns:
    Style: A Style with meta information attached.

---
## link_id
```python
from style import link_id
```

Get a link id, used in ansi code for links.

---
## __str__
```python
from style import __str__
```

Re-generate style definition from attributes.

---
## __bool__
```python
from style import __bool__
```

A Style is false if it has no attributes, colors, or links.

---
## _make_ansi_codes
```python
from style import _make_ansi_codes
```

Generate ANSI codes for this style.

Args:
    color_system (ColorSystem): Color system.

Returns:
    str: String containing codes.

---
## normalize
```python
from style import normalize
```

Normalize a style definition so that styles with the same effect have the same string
representation.

Args:
    style (str): A style definition.

Returns:
    str: Normal form of style definition.

---
## pick_first
```python
from style import pick_first
```

Pick first non-None style.

---
## __rich_repr__
```python
from style import __rich_repr__
```



---
## __eq__
```python
from style import __eq__
```



---
## __ne__
```python
from style import __ne__
```



---
## __hash__
```python
from style import __hash__
```



---
## color
```python
from style import color
```

The foreground color or None if it is not set.

---
## bgcolor
```python
from style import bgcolor
```

The background color or None if it is not set.

---
## link
```python
from style import link
```

Link text, if set.

---
## transparent_background
```python
from style import transparent_background
```

Check if the style specified a transparent background.

---
## background_style
```python
from style import background_style
```

A Style with background only.

---
## meta
```python
from style import meta
```

Get meta information (can not be changed after construction).

---
## without_color
```python
from style import without_color
```

Get a copy of the style with color removed.

---
## parse
```python
from style import parse
```

Parse a style definition.

Args:
    style_definition (str): A string containing a style.

Raises:
    errors.StyleSyntaxError: If the style definition syntax is invalid.

Returns:
    `Style`: A Style instance.

---
## get_html_style
```python
from style import get_html_style
```

Get a CSS style rule.

---
## combine
```python
from style import combine
```

Combine styles and get result.

Args:
    styles (Iterable[Style]): Styles to combine.

Returns:
    Style: A new style instance.

---
## chain
```python
from style import chain
```

Combine styles from positional argument in to a single style.

Args:
    *styles (Iterable[Style]): Styles to combine.

Returns:
    Style: A new style instance.

---
## copy
```python
from style import copy
```

Get a copy of this style.

Returns:
    Style: A new Style instance with identical attributes.

---
## clear_meta_and_links
```python
from style import clear_meta_and_links
```

Get a copy of this style with link and meta information removed.

Returns:
    Style: New style object.

---
## update_link
```python
from style import update_link
```

Get a copy with a different value for link.

Args:
    link (str, optional): New value for link. Defaults to None.

Returns:
    Style: A new Style instance.

---
## render
```python
from style import render
```

Render the ANSI codes for the style.

Args:
    text (str, optional): A string to style. Defaults to "".
    color_system (Optional[ColorSystem], optional): Color system to render to. Defaults to ColorSystem.TRUECOLOR.

Returns:
    str: A string containing ANSI style codes.

---
## test
```python
from style import test
```

Write text with style directly to terminal.

This method is for testing purposes only.

Args:
    text (Optional[str], optional): Text to style or None for style name.

---
## _add
```python
from style import _add
```



---
## __add__
```python
from style import __add__
```



---
## __repr__
```python
from style import __repr__
```



---
## current
```python
from style import current
```

Get the Style at the top of the stack.

---
## push
```python
from style import push
```

Push a new style on to the stack.

Args:
    style (Style): New style to combine with current style.

---
## pop
```python
from style import pop
```

Pop last style and discard.

Returns:
    Style: New current style (also available as stack.current)

---
## _make_color
```python
from style import _make_color
```



---
## __name__
```python
from default_styles import __name__
```



---
## __name__
```python
from _wrap import __name__
```



---
## words
```python
from _wrap import words
```

Yields each word from the text as a tuple
containing (start_index, end_index, word). A "word" in this context may
include the actual word and any whitespace to the right.

---
## divide_line
```python
from _wrap import divide_line
```

Given a string of text, and a width (measured in cells), return a list
of cell offsets which the string should be split at in order for it to fit
within the given width.

Args:
    text: The text to examine.
    width: The available cell width.
    fold: If True, words longer than `width` will be folded onto a new line.

Returns:
    A list of indices to break the line at.

---
## __name__
```python
from _log_render import __name__
```



---
## LogRender
```python
from _log_render import LogRender
```



---
## __init__
```python
from _log_render import __init__
```



---
## __call__
```python
from _log_render import __call__
```



---
## __name__
```python
from emoji import __name__
```



---
## NoEmoji
```python
from emoji import NoEmoji
```

No emoji by that name.

---
## Emoji
```python
from emoji import Emoji
```



---
## __init__
```python
from emoji import __init__
```

A single emoji character.

Args:
    name (str): Name of emoji.
    style (Union[str, Style], optional): Optional style. Defaults to None.

Raises:
    NoEmoji: If the emoji doesn't exist.

---
## replace
```python
from emoji import replace
```

Replace emoji markup with corresponding unicode characters.

Args:
    text (str): A string with emojis codes, e.g. "Hello :smiley:!"

Returns:
    str: A string with emoji codes replaces with actual emoji.

---
## __repr__
```python
from emoji import __repr__
```



---
## __str__
```python
from emoji import __str__
```



---
## __rich_console__
```python
from emoji import __rich_console__
```



---
## __name__
```python
from layout import __name__
```



---
## LayoutRender
```python
from layout import LayoutRender
```

An individual layout render.

---
## LayoutError
```python
from layout import LayoutError
```

Layout related error.

---
## NoSplitter
```python
from layout import NoSplitter
```

Requested splitter does not exist.

---
## _Placeholder
```python
from layout import _Placeholder
```

An internal renderable used as a Layout placeholder.

---
## Splitter
```python
from layout import Splitter
```

Base class for a splitter.

---
## RowSplitter
```python
from layout import RowSplitter
```

Split a layout region in to rows.

---
## ColumnSplitter
```python
from layout import ColumnSplitter
```

Split a layout region in to columns.

---
## Layout
```python
from layout import Layout
```

A renderable to divide a fixed height in to rows or columns.

Args:
    renderable (RenderableType, optional): Renderable content, or None for placeholder. Defaults to None.
    name (str, optional): Optional identifier for Layout. Defaults to None.
    size (int, optional): Optional fixed size of layout. Defaults to None.
    minimum_size (int, optional): Minimum size of layout. Defaults to 1.
    ratio (int, optional): Optional ratio for flexible layout. Defaults to 1.
    visible (bool, optional): Visibility of layout. Defaults to True.

---
## __init__
```python
from layout import __init__
```



---
## __rich_console__
```python
from layout import __rich_console__
```



---
## get_tree_icon
```python
from layout import get_tree_icon
```



---
## divide
```python
from layout import divide
```



---
## __rich_repr__
```python
from layout import __rich_repr__
```



---
## renderable
```python
from layout import renderable
```

Layout renderable.

---
## children
```python
from layout import children
```

Gets (visible) layout children.

---
## map
```python
from layout import map
```

Get a map of the last render.

---
## get
```python
from layout import get
```

Get a named layout, or None if it doesn't exist.

Args:
    name (str): Name of layout.

Returns:
    Optional[Layout]: Layout instance or None if no layout was found.

---
## __getitem__
```python
from layout import __getitem__
```



---
## tree
```python
from layout import tree
```

Get a tree renderable to show layout structure.

---
## split
```python
from layout import split
```

Split the layout in to multiple sub-layouts.

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.
    splitter (Union[Splitter, str]): Splitter instance or name of splitter.

---
## add_split
```python
from layout import add_split
```

Add a new layout(s) to existing split.

Args:
    *layouts (Union[Layout, RenderableType]): Positional arguments should be renderables or (sub) Layout instances.

---
## split_row
```python
from layout import split_row
```

Split the layout in to a row (layouts side by side).

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.

---
## split_column
```python
from layout import split_column
```

Split the layout in to a column (layouts stacked on top of each other).

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.

---
## unsplit
```python
from layout import unsplit
```

Reset splits to initial state.

---
## update
```python
from layout import update
```

Update renderable.

Args:
    renderable (RenderableType): New renderable object.

---
## refresh_screen
```python
from layout import refresh_screen
```

Refresh a sub-layout.

Args:
    console (Console): Console instance where Layout is to be rendered.
    layout_name (str): Name of layout.

---
## _make_region_map
```python
from layout import _make_region_map
```

Create a dict that maps layout on to Region.

---
## render
```python
from layout import render
```

Render the sub_layouts.

Args:
    console (Console): Console instance.
    options (ConsoleOptions): Console options.

Returns:
    RenderMap: A dict that maps Layout on to a tuple of Region, lines

---
## summary
```python
from layout import summary
```



---
## recurse
```python
from layout import recurse
```



---
## __name__
```python
from containers import __name__
```



---
## Renderables
```python
from containers import Renderables
```

A list subclass which renders its contents to the console.

---
## Lines
```python
from containers import Lines
```

A list subclass which can render to the console.

---
## __init__
```python
from containers import __init__
```



---
## __rich_console__
```python
from containers import __rich_console__
```

Console render method to insert line-breaks.

---
## __rich_measure__
```python
from containers import __rich_measure__
```



---
## append
```python
from containers import append
```



---
## __iter__
```python
from containers import __iter__
```



---
## __repr__
```python
from containers import __repr__
```



---
## __getitem__
```python
from containers import __getitem__
```



---
## __setitem__
```python
from containers import __setitem__
```



---
## __len__
```python
from containers import __len__
```



---
## extend
```python
from containers import extend
```



---
## pop
```python
from containers import pop
```



---
## justify
```python
from containers import justify
```

Justify and overflow text to a given width.

Args:
    console (Console): Console instance.
    width (int): Number of cells available per line.
    justify (str, optional): Default justify method for text: "left", "center", "full" or "right". Defaults to "left".
    overflow (str, optional): Default overflow for text: "crop", "fold", or "ellipsis". Defaults to "fold".

---
## __name__
```python
from _emoji_replace import __name__
```



---
## _emoji_replace
```python
from _emoji_replace import _emoji_replace
```

Replace emoji code in text.

---
## do_replace
```python
from _emoji_replace import do_replace
```



---
## __name__
```python
from traceback import __name__
```



---
## install
```python
from traceback import install
```

Install a rich traceback handler.

Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.


Args:
    console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
    width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
    extra_lines (int, optional): Extra lines of code. Defaults to 3.
    theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
        a theme appropriate for the platform.
    word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
    show_locals (bool, optional): Enable display of local variables. Defaults to False.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
    locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
    indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
    suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.

Returns:
    Callable: The previous exception handler that was replaced.

---
## Frame
```python
from traceback import Frame
```



---
## _SyntaxError
```python
from traceback import _SyntaxError
```



---
## Stack
```python
from traceback import Stack
```



---
## Trace
```python
from traceback import Trace
```



---
## PathHighlighter
```python
from traceback import PathHighlighter
```



---
## Traceback
```python
from traceback import Traceback
```

A Console renderable that renders a traceback.

Args:
    trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
        the last exception.
    width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
    extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
    theme (str, optional): Override pygments theme used in traceback.
    word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
    show_locals (bool, optional): Enable display of local variables. Defaults to False.
    indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
    locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
    suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

---
## excepthook
```python
from traceback import excepthook
```



---
## ipy_excepthook_closure
```python
from traceback import ipy_excepthook_closure
```



---
## __init__
```python
from traceback import __init__
```



---
## from_exception
```python
from traceback import from_exception
```

Create a traceback from exception info

Args:
    exc_type (Type[BaseException]): Exception type.
    exc_value (BaseException): Exception value.
    traceback (TracebackType): Python Traceback object.
    width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
    extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
    theme (str, optional): Override pygments theme used in traceback.
    word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
    show_locals (bool, optional): Enable display of local variables. Defaults to False.
    indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
    locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
    suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

Returns:
    Traceback: A Traceback instance that may be printed.

---
## extract
```python
from traceback import extract
```

Extract traceback information.

Args:
    exc_type (Type[BaseException]): Exception type.
    exc_value (BaseException): Exception value.
    traceback (TracebackType): Python Traceback object.
    show_locals (bool, optional): Enable display of local variables. Defaults to False.
    locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to 10.
    locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
    locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
    locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.

Returns:
    Trace: A Trace instance which you can use to construct a `Traceback`.

---
## __rich_console__
```python
from traceback import __rich_console__
```



---
## _render_syntax_error
```python
from traceback import _render_syntax_error
```



---
## _guess_lexer
```python
from traceback import _guess_lexer
```



---
## _render_stack
```python
from traceback import _render_stack
```



---
## bar
```python
from traceback import bar
```



---
## foo
```python
from traceback import foo
```



---
## error
```python
from traceback import error
```



---
## ipy_show_traceback
```python
from traceback import ipy_show_traceback
```

wrap the default ip.showtraceback to store info for ip._showtraceback

---
## ipy_display_traceback
```python
from traceback import ipy_display_traceback
```

Internally called traceback from ip._showtraceback

---
## safe_str
```python
from traceback import safe_str
```

Don't allow exceptions from __str__ to propagate.

---
## read_code
```python
from traceback import read_code
```

Read files, and cache results on filename.

Args:
    filename (str): Filename to read

Returns:
    str: Contents of file

---
## render_locals
```python
from traceback import render_locals
```



---
## get_locals
```python
from traceback import get_locals
```

Extract locals from an iterator of key pairs.

---
## __name__
```python
from region import __name__
```



---
## Region
```python
from region import Region
```

Defines a rectangular region of the screen.

---
## is_renderable
```python
from protocol import is_renderable
```

Check if an object may be rendered by Rich.

---
## rich_cast
```python
from protocol import rich_cast
```

Cast an object to a renderable by calling __rich__ if present.

Args:
    renderable (object): A potentially renderable object

Returns:
    object: The result of recursively calling __rich__.

---
## __name__
```python
from _loop import __name__
```



---
## loop_first
```python
from _loop import loop_first
```

Iterate and generate a tuple with a flag for first value.

---
## loop_last
```python
from _loop import loop_last
```

Iterate and generate a tuple with a flag for last value.

---
## loop_first_last
```python
from _loop import loop_first_last
```

Iterate and generate a tuple with a flag for first and last value.

---
## __name__
```python
from control import __name__
```



---
## Control
```python
from control import Control
```

A renderable that inserts a control code (non printable but may move cursor).

Args:
    *codes (str): Positional arguments are either a :class:`~rich.segment.ControlType` enum or a
        tuple of ControlType and an integer parameter

---
## strip_control_codes
```python
from control import strip_control_codes
```

Remove control codes from text.

Args:
    text (str): A string possibly contain control codes.

Returns:
    str: String with control codes removed.

---
## escape_control_codes
```python
from control import escape_control_codes
```

Replace control codes with their "escaped" equivalent in the given text.
(e.g. "" becomes "\b")

Args:
    text (str): A string possibly containing control codes.

Returns:
    str: String with control codes replaced with their escaped version.

---
## __init__
```python
from control import __init__
```



---
## bell
```python
from control import bell
```

Ring the 'bell'.

---
## home
```python
from control import home
```

Move cursor to 'home' position.

---
## move
```python
from control import move
```

Move cursor relative to current position.

Args:
    x (int): X offset.
    y (int): Y offset.

Returns:
    ~Control: Control object.

---
## move_to_column
```python
from control import move_to_column
```

Move to the given column, optionally add offset to row.

Returns:
    x (int): absolute x (column)
    y (int): optional y offset (row)

Returns:
    ~Control: Control object.

---
## move_to
```python
from control import move_to
```

Move cursor to absolute position.

Args:
    x (int): x offset (column)
    y (int): y offset (row)

Returns:
    ~Control: Control object.

---
## clear
```python
from control import clear
```

Clear the screen.

---
## show_cursor
```python
from control import show_cursor
```

Show or hide the cursor.

---
## alt_screen
```python
from control import alt_screen
```

Enable or disable alt screen.

---
## title
```python
from control import title
```

Set the terminal window title

Args:
    title (str): The new terminal window title

---
## __str__
```python
from control import __str__
```



---
## __rich_console__
```python
from control import __rich_console__
```



---
## get_codes
```python
from control import get_codes
```



---
## __name__
```python
from filesize import __name__
```

Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2

The functions declared in this module should cover the different
use cases needed to generate a string representation of a file size
using several different units. Since there are many standards regarding
file size units, three different functions have been implemented.

See Also:
    * `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_

---
## _to_str
```python
from filesize import _to_str
```



---
## pick_unit_and_suffix
```python
from filesize import pick_unit_and_suffix
```

Pick a suffix and base for the given size.

---
## decimal
```python
from filesize import decimal
```

Convert a filesize in to a string (powers of 1000, SI prefixes).

In this convention, ``1000 B = 1 kB``.

This is typically the format used to advertise the storage
capacity of USB flash drives and the like (*256 MB* meaning
actually a storage capacity of more than *256 000 000 B*),
or used by **Mac OS X** since v10.6 to report file sizes.

Arguments:
    int (size): A file size.
    int (precision): The number of decimal places to include (default = 1).
    str (separator): The string to separate the value from the units (default = " ").

Returns:
    `str`: A string containing a abbreviated file size and units.

Example:
    >>> filesize.decimal(30000)
    '30.0 kB'
    >>> filesize.decimal(30000, precision=2, separator="")
    '30.00kB'

---
## __name__
```python
from _null_file import __name__
```



---
## NullFile
```python
from _null_file import NullFile
```



---
## close
```python
from _null_file import close
```



---
## isatty
```python
from _null_file import isatty
```



---
## read
```python
from _null_file import read
```



---
## readable
```python
from _null_file import readable
```



---
## readline
```python
from _null_file import readline
```



---
## readlines
```python
from _null_file import readlines
```



---
## seek
```python
from _null_file import seek
```



---
## seekable
```python
from _null_file import seekable
```



---
## tell
```python
from _null_file import tell
```



---
## truncate
```python
from _null_file import truncate
```



---
## writable
```python
from _null_file import writable
```



---
## writelines
```python
from _null_file import writelines
```



---
## __next__
```python
from _null_file import __next__
```



---
## __iter__
```python
from _null_file import __iter__
```



---
## __enter__
```python
from _null_file import __enter__
```



---
## __exit__
```python
from _null_file import __exit__
```



---
## write
```python
from _null_file import write
```



---
## flush
```python
from _null_file import flush
```



---
## fileno
```python
from _null_file import fileno
```



---
## __name__
```python
from _palettes import __name__
```



---
## get_console
```python
from __init__ import get_console
```

Get a global :class:`~rich.console.Console` instance. This function is used when Rich requires a Console,
and hasn't been explicitly given one.

Returns:
    Console: A console instance.

---
## reconfigure
```python
from __init__ import reconfigure
```

Reconfigures the global console by replacing it with another.

Args:
    *args (Any): Positional arguments for the replacement :class:`~rich.console.Console`.
    **kwargs (Any): Keyword arguments for the replacement :class:`~rich.console.Console`.

---
## print
```python
from __init__ import print
```

Print object(s) supplied via positional arguments.
This function has an identical signature to the built-in print.
For more advanced features, see the :class:`~rich.console.Console` class.

Args:
    sep (str, optional): Separator between printed objects. Defaults to " ".
    end (str, optional): Character to write at end of output. Defaults to "\\n".
    file (IO[str], optional): File to write to, or None for stdout. Defaults to None.
    flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False.

---
## print_json
```python
from __init__ import print_json
```

Pretty prints JSON. Output will be valid JSON.

Args:
    json (str): A string containing JSON.
    data (Any): If json is not supplied, then encode this data.
    indent (int, optional): Number of spaces to indent. Defaults to 2.
    highlight (bool, optional): Enable highlighting of output: Defaults to True.
    skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
    ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
    check_circular (bool, optional): Check for circular references. Defaults to True.
    allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
    default (Callable, optional): A callable that converts values that can not be encoded
        in to something that can be JSON encoded. Defaults to None.
    sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

---
## inspect
```python
from __init__ import inspect
```

Inspect any Python object.

* inspect(<OBJECT>) to see summarized info.
* inspect(<OBJECT>, methods=True) to see methods.
* inspect(<OBJECT>, help=True) to see full (non-abbreviated) help.
* inspect(<OBJECT>, private=True) to see private attributes (single underscore).
* inspect(<OBJECT>, dunder=True) to see attributes beginning with double underscore.
* inspect(<OBJECT>, all=True) to see all attributes.

Args:
    obj (Any): An object to inspect.
    title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
    help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
    methods (bool, optional): Enable inspection of callables. Defaults to False.
    docs (bool, optional): Also render doc strings. Defaults to True.
    private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
    dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
    sort (bool, optional): Sort attributes alphabetically. Defaults to True.
    all (bool, optional): Show all attributes. Defaults to False.
    value (bool, optional): Pretty print value. Defaults to True.

---
## __name__
```python
from _pick import __name__
```



---
## pick_bool
```python
from _pick import pick_bool
```

Pick the first non-none bool or return the last value.

Args:
    *values (bool): Any number of boolean or None values.

Returns:
    bool: First non-none boolean.

---
## __name__
```python
from file_proxy import __name__
```



---
## FileProxy
```python
from file_proxy import FileProxy
```

Wraps a file (e.g. sys.stdout) and redirects writes to a console.

---
## __init__
```python
from file_proxy import __init__
```



---
## rich_proxied_file
```python
from file_proxy import rich_proxied_file
```

Get proxied file.

---
## __getattr__
```python
from file_proxy import __getattr__
```



---
## write
```python
from file_proxy import write
```



---
## flush
```python
from file_proxy import flush
```



---
## fileno
```python
from file_proxy import fileno
```



---
## __name__
```python
from palette import __name__
```



---
## Palette
```python
from palette import Palette
```

A palette of available colors.

---
## __init__
```python
from palette import __init__
```



---
## __getitem__
```python
from palette import __getitem__
```



---
## __rich__
```python
from palette import __rich__
```



---
## match
```python
from palette import match
```

Find a color from a palette that most closely matches a given color.

Args:
    color (Tuple[int, int, int]): RGB components in range 0 > 255.

Returns:
    int: Index of closes matching color.

---
## ColorBox
```python
from palette import ColorBox
```



---
## get_color_distance
```python
from palette import get_color_distance
```

Get the distance to a color.

---
## __rich_console__
```python
from palette import __rich_console__
```



---
## __name__
```python
from markup import __name__
```



---
## Tag
```python
from markup import Tag
```

A tag in console markup.

---
## escape
```python
from markup import escape
```

Escapes text so that it won't be interpreted as markup.

Args:
    markup (str): Content to be inserted in to markup.

Returns:
    str: Markup with square brackets escaped.

---
## _parse
```python
from markup import _parse
```

Parse markup in to an iterable of tuples of (position, text, tag).

Args:
    markup (str): A string containing console markup

---
## render
```python
from markup import render
```

Render console markup in to a Text instance.

Args:
    markup (str): A string containing console markup.
    style: (Union[str, Style]): The style to use.
    emoji (bool, optional): Also render emoji code. Defaults to True.
    emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.


Raises:
    MarkupError: If there is a syntax error in the markup.

Returns:
    Text: A test instance.

---
## __str__
```python
from markup import __str__
```



---
## markup
```python
from markup import markup
```

Get the string representation of this tag.

---
## escape_backslashes
```python
from markup import escape_backslashes
```

Called by re.sub replace matches.

---
## pop_style
```python
from markup import pop_style
```

Pop tag matching given style name.

---
## __name__
```python
from _ratio import __name__
```



---
## Edge
```python
from _ratio import Edge
```

Any object that defines an edge (such as Layout).

---
## ratio_resolve
```python
from _ratio import ratio_resolve
```

Divide total space to satisfy size, ratio, and minimum_size, constraints.

The returned list of integers should add up to total in most cases, unless it is
impossible to satisfy all the constraints. For instance, if there are two edges
with a minimum size of 20 each and `total` is 30 then the returned list will be
greater than total. In practice, this would mean that a Layout object would
clip the rows that would overflow the screen height.

Args:
    total (int): Total number of characters.
    edges (List[Edge]): Edges within total space.

Returns:
    List[int]: Number of characters for each edge.

---
## ratio_reduce
```python
from _ratio import ratio_reduce
```

Divide an integer total in to parts based on ratios.

Args:
    total (int): The total to divide.
    ratios (List[int]): A list of integer ratios.
    maximums (List[int]): List of maximums values for each slot.
    values (List[int]): List of values

Returns:
    List[int]: A list of integers guaranteed to sum to total.

---
## ratio_distribute
```python
from _ratio import ratio_distribute
```

Distribute an integer total in to parts based on ratios.

Args:
    total (int): The total to divide.
    ratios (List[int]): A list of integer ratios.
    minimums (List[int]): List of minimum values for each slot.

Returns:
    List[int]: A list of integers guaranteed to sum to total.

---
## E
```python
from _ratio import E
```



---
## __name__
```python
from repr import __name__
```



---
## ReprError
```python
from repr import ReprError
```

An error occurred when attempting to build a repr.

---
## auto
```python
from repr import auto
```

Class decorator to create __repr__ from __rich_repr__

---
## rich_repr
```python
from repr import rich_repr
```



---
## do_replace
```python
from repr import do_replace
```



---
## Foo
```python
from repr import Foo
```



---
## auto_repr
```python
from repr import auto_repr
```

Create repr string from __rich_repr__

---
## auto_rich_repr
```python
from repr import auto_rich_repr
```

Auto generate __rich_rep__ from signature of __init__

---
## __rich_repr__
```python
from repr import __rich_repr__
```



---
## __name__
```python
from constrain import __name__
```



---
## Constrain
```python
from constrain import Constrain
```

Constrain the width of a renderable to a given number of characters.

Args:
    renderable (RenderableType): A renderable object.
    width (int, optional): The maximum width (in characters) to render. Defaults to 80.

---
## __init__
```python
from constrain import __init__
```



---
## __rich_console__
```python
from constrain import __rich_console__
```



---
## __rich_measure__
```python
from constrain import __rich_measure__
```



---
## _is_attr_object
```python
from pretty import _is_attr_object
```

Check if an object was created with attrs module.

---
## _get_attr_fields
```python
from pretty import _get_attr_fields
```

Get fields for an attrs object.

---
## _is_dataclass_repr
```python
from pretty import _is_dataclass_repr
```

Check if an instance of a dataclass contains the default repr.

Args:
    obj (object): A dataclass instance.

Returns:
    bool: True if the default repr is used, False if there is a custom repr.

---
## _has_default_namedtuple_repr
```python
from pretty import _has_default_namedtuple_repr
```

Check if an instance of namedtuple contains the default repr

Args:
    obj (object): A namedtuple

Returns:
    bool: True if the default repr is used, False if there's a custom repr.

---
## _ipy_display_hook
```python
from pretty import _ipy_display_hook
```



---
## _safe_isinstance
```python
from pretty import _safe_isinstance
```

isinstance can fail in rare cases, for example types with no __class__

---
## install
```python
from pretty import install
```

Install automatic pretty printing in the Python REPL.

Args:
    console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
    overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
    crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.

---
## Pretty
```python
from pretty import Pretty
```

A rich renderable that pretty prints an object.

Args:
    _object (Any): An object to pretty print.
    highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
    indent_size (int, optional): Number of spaces in indent. Defaults to 4.
    justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
    overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
    no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
    insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.

---
## _get_braces_for_defaultdict
```python
from pretty import _get_braces_for_defaultdict
```



---
## _get_braces_for_deque
```python
from pretty import _get_braces_for_deque
```



---
## _get_braces_for_array
```python
from pretty import _get_braces_for_array
```



---
## is_expandable
```python
from pretty import is_expandable
```

Check if an object may be expanded by pretty print.

---
## Node
```python
from pretty import Node
```

A node in a repr tree. May be atomic or a container.

---
## _Line
```python
from pretty import _Line
```

A line in repr output.

---
## _is_namedtuple
```python
from pretty import _is_namedtuple
```

Checks if an object is most likely a namedtuple. It is possible
to craft an object that passes this check and isn't a namedtuple, but
there is only a minuscule chance of this happening unintentionally.

Args:
    obj (Any): The object to test

Returns:
    bool: True if the object is a namedtuple. False otherwise.

---
## traverse
```python
from pretty import traverse
```

Traverse object and generate a tree.

Args:
    _object (Any): Object to be traversed.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
        Defaults to None.

Returns:
    Node: The root of a tree structure which can be used to render a pretty repr.

---
## pretty_repr
```python
from pretty import pretty_repr
```

Prettify repr string by expanding on to new lines to fit within a given width.

Args:
    _object (Any): Object to repr.
    max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
    indent_size (int, optional): Number of spaces to indent. Defaults to 4.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
        Defaults to None.
    expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

Returns:
    str: A possibly multi-line representation of the object.

---
## pprint
```python
from pretty import pprint
```

A convenience function for pretty printing.

Args:
    _object (Any): Object to pretty print.
    console (Console, optional): Console instance, or None to use default. Defaults to None.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
    indent_guides (bool, optional): Enable indentation guides. Defaults to True.
    expand_all (bool, optional): Expand all containers. Defaults to False.

---
## display_hook
```python
from pretty import display_hook
```

Replacement sys.displayhook which prettifies objects with Rich.

---
## __init__
```python
from pretty import __init__
```



---
## __rich_console__
```python
from pretty import __rich_console__
```



---
## __rich_measure__
```python
from pretty import __rich_measure__
```



---
## iter_tokens
```python
from pretty import iter_tokens
```

Generate tokens for this node.

---
## check_length
```python
from pretty import check_length
```

Check this line fits within a given number of cells.

---
## __str__
```python
from pretty import __str__
```



---
## render
```python
from pretty import render
```

Render the node to a pretty repr.

Args:
    max_width (int, optional): Maximum width of the repr. Defaults to 80.
    indent_size (int, optional): Size of indents. Defaults to 4.
    expand_all (bool, optional): Expand all levels. Defaults to False.

Returns:
    str: A repr string of the original object.

---
## expandable
```python
from pretty import expandable
```

Check if the line may be expanded.

---
## expand
```python
from pretty import expand
```

Expand this line by adding children on their own line.

---
## to_repr
```python
from pretty import to_repr
```

Get repr string for an object, but catch errors.

---
## _traverse
```python
from pretty import _traverse
```

Walk the object depth first.

---
## BrokenRepr
```python
from pretty import BrokenRepr
```



---
## StockKeepingUnit
```python
from pretty import StockKeepingUnit
```



---
## Thing
```python
from pretty import Thing
```



---
## RichFormatter
```python
from pretty import RichFormatter
```



---
## iter_rich_args
```python
from pretty import iter_rich_args
```



---
## __repr__
```python
from pretty import __repr__
```



---
## __call__
```python
from pretty import __call__
```



---
## iter_attrs
```python
from pretty import iter_attrs
```

Iterate over attr fields and values.

---
## report
```python
from diagnose import report
```

Print a report to the terminal with debugging information

---
## __name__
```python
from columns import __name__
```



---
## Columns
```python
from columns import Columns
```

Display renderables in neat columns.

Args:
    renderables (Iterable[RenderableType]): Any number of Rich renderables (including str).
    width (int, optional): The desired width of the columns, or None to auto detect. Defaults to None.
    padding (PaddingDimensions, optional): Optional padding around cells. Defaults to (0, 1).
    expand (bool, optional): Expand columns to full width. Defaults to False.
    equal (bool, optional): Arrange in to equal sized columns. Defaults to False.
    column_first (bool, optional): Align items from top to bottom (rather than left to right). Defaults to False.
    right_to_left (bool, optional): Start column from right hand side. Defaults to False.
    align (str, optional): Align value ("left", "right", or "center") or None for default. Defaults to None.
    title (TextType, optional): Optional title for Columns.

---
## __init__
```python
from columns import __init__
```



---
## add_renderable
```python
from columns import add_renderable
```

Add a renderable to the columns.

Args:
    renderable (RenderableType): Any renderable object.

---
## __rich_console__
```python
from columns import __rich_console__
```



---
## iter_renderables
```python
from columns import iter_renderables
```



---
## __name__
```python
from rule import __name__
```



---
## Rule
```python
from rule import Rule
```

A console renderable to draw a horizontal rule (line).

Args:
    title (Union[str, Text], optional): Text to render in the rule. Defaults to "".
    characters (str, optional): Character(s) used to draw the line. Defaults to "─".
    style (StyleType, optional): Style of Rule. Defaults to "rule.line".
    end (str, optional): Character at end of Rule. defaults to "\\n"
    align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".

---
## __init__
```python
from rule import __init__
```



---
## __repr__
```python
from rule import __repr__
```



---
## __rich_console__
```python
from rule import __rich_console__
```



---
## _rule_line
```python
from rule import _rule_line
```



---
## __rich_measure__
```python
from rule import __rich_measure__
```



---
## __name__
```python
from _inspect import __name__
```



---
## _first_paragraph
```python
from _inspect import _first_paragraph
```

Get the first paragraph from a docstring.

---
## Inspect
```python
from _inspect import Inspect
```

A renderable to inspect any Python Object.

Args:
    obj (Any): An object to inspect.
    title (str, optional): Title to display over inspect result, or None use type. Defaults to None.
    help (bool, optional): Show full help text rather than just first paragraph. Defaults to False.
    methods (bool, optional): Enable inspection of callables. Defaults to False.
    docs (bool, optional): Also render doc strings. Defaults to True.
    private (bool, optional): Show private attributes (beginning with underscore). Defaults to False.
    dunder (bool, optional): Show attributes starting with double underscore. Defaults to False.
    sort (bool, optional): Sort attributes alphabetically. Defaults to True.
    all (bool, optional): Show all attributes. Defaults to False.
    value (bool, optional): Pretty print value of object. Defaults to True.

---
## get_object_types_mro
```python
from _inspect import get_object_types_mro
```

Returns the MRO of an object's class, or of the object itself if it's a class.

---
## get_object_types_mro_as_strings
```python
from _inspect import get_object_types_mro_as_strings
```

Returns the MRO of an object's class as full qualified names, or of the object itself if it's a class.

Examples:
    `object_types_mro_as_strings(JSONDecoder)` will return `['json.decoder.JSONDecoder', 'builtins.object']`

---
## is_object_one_of_types
```python
from _inspect import is_object_one_of_types
```

Returns `True` if the given object's class (or the object itself, if it's a class) has one of the
fully qualified names in its MRO.

---
## __init__
```python
from _inspect import __init__
```



---
## _make_title
```python
from _inspect import _make_title
```

Make a default title.

---
## __rich__
```python
from _inspect import __rich__
```



---
## _get_signature
```python
from _inspect import _get_signature
```

Get a signature for a callable.

---
## _render
```python
from _inspect import _render
```

Render object.

---
## _get_formatted_doc
```python
from _inspect import _get_formatted_doc
```

Extract the docstring of an object, process it and returns it.
The processing consists in cleaning up the doctring's indentation,
taking only its 1st paragraph if `self.help` is not True,
and escape its control codes.

Args:
    object_ (Any): the object to get the docstring from.

Returns:
    Optional[str]: the processed docstring, or None if no docstring was found.

---
## sort_items
```python
from _inspect import sort_items
```



---
## safe_getattr
```python
from _inspect import safe_getattr
```

Get attribute or any exception.

---
## MarkdownElement
```python
from markdown import MarkdownElement
```



---
## UnknownElement
```python
from markdown import UnknownElement
```

An unknown element.

Hopefully there will be no unknown elements, and we will have a MarkdownElement for
everything in the document.

---
## TextElement
```python
from markdown import TextElement
```

Base class for elements that render text.

---
## Paragraph
```python
from markdown import Paragraph
```

A Paragraph.

---
## Heading
```python
from markdown import Heading
```

A heading.

---
## CodeBlock
```python
from markdown import CodeBlock
```

A code block with syntax highlighting.

---
## BlockQuote
```python
from markdown import BlockQuote
```

A block quote.

---
## HorizontalRule
```python
from markdown import HorizontalRule
```

A horizontal rule to divide sections.

---
## TableElement
```python
from markdown import TableElement
```

MarkdownElement corresponding to `table_open`.

---
## TableHeaderElement
```python
from markdown import TableHeaderElement
```

MarkdownElement corresponding to `thead_open` and `thead_close`.

---
## TableBodyElement
```python
from markdown import TableBodyElement
```

MarkdownElement corresponding to `tbody_open` and `tbody_close`.

---
## TableRowElement
```python
from markdown import TableRowElement
```

MarkdownElement corresponding to `tr_open` and `tr_close`.

---
## TableDataElement
```python
from markdown import TableDataElement
```

MarkdownElement corresponding to `td_open` and `td_close`
and `th_open` and `th_close`.

---
## ListElement
```python
from markdown import ListElement
```

A list element.

---
## ListItem
```python
from markdown import ListItem
```

An item in a list.

---
## Link
```python
from markdown import Link
```



---
## ImageItem
```python
from markdown import ImageItem
```

Renders a placeholder for an image.

---
## MarkdownContext
```python
from markdown import MarkdownContext
```

Manages the console render state.

---
## Markdown
```python
from markdown import Markdown
```

Used to render arbitrary Markdown output. Can also render latex enclosed by dollar signs.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a valid {str} that can be rendered as Markdown.

Demos: blocks_hello, blocks_kinematics
Guides: key-features

---
## create
```python
from markdown import create
```

Factory to create markdown element,

Args:
    markdown (Markdown): The parent Markdown object.
    token (Any): A token from markdown-it.

Returns:
    MarkdownElement: A new markdown element

---
## on_enter
```python
from markdown import on_enter
```



---
## on_text
```python
from markdown import on_text
```

Called when the parser visits text.

---
## on_leave
```python
from markdown import on_leave
```



---
## on_child_close
```python
from markdown import on_child_close
```



---
## __rich_console__
```python
from markdown import __rich_console__
```

Render markdown to the console.

---
## __init__
```python
from markdown import __init__
```

Parameters:
value: Value to show in Markdown component. If callable, the function will be called whenever the app loads to set the initial value of the component.
rtl: If True, sets the direction of the rendered text to right-to-left. Default is False, which renders text left-to-right.
latex_delimiters: A list of dicts of the form {"left": open delimiter (str), "right": close delimiter (str), "display": whether to display in newline (bool)} that will be used to render LaTeX expressions. If not provided, `latex_delimiters` is set to `[{ "left": "$", "right": "$", "display": False }]`, so only expressions enclosed in $ delimiters will be rendered as LaTeX, and in the same line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html).
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
sanitize_html: If False, will disable HTML sanitization when converted from markdown. This is not recommended, as it can lead to security vulnerabilities.
line_breaks: If True, will enable Github-flavored Markdown line breaks in chatbot messages. If False (default), single new lines will be ignored.

---
## render_bullet
```python
from markdown import render_bullet
```



---
## render_number
```python
from markdown import render_number
```



---
## current_style
```python
from markdown import current_style
```

Current style which is the product of all styles on the stack.

---
## enter_style
```python
from markdown import enter_style
```

Enter a style context.

---
## leave_style
```python
from markdown import leave_style
```

Leave a style context.

---
## _flatten_tokens
```python
from markdown import _flatten_tokens
```

Flattens the token stream.

---
## __name__
```python
from pager import __name__
```



---
## Pager
```python
from pager import Pager
```

Base class for a pager.

---
## SystemPager
```python
from pager import SystemPager
```

Uses the pager installed on the system.

---
## show
```python
from pager import show
```

Use the same pager used by pydoc.

---
## _pager
```python
from pager import _pager
```



---
## __name__
```python
from text import __name__
```



---
## Span
```python
from text import Span
```

A marked up region in some text.

---
## Text
```python
from text import Text
```



---
## __repr__
```python
from text import __repr__
```



---
## __bool__
```python
from text import __bool__
```



---
## split
```python
from text import split
```



---
## move
```python
from text import move
```

Move start and end by a given offset.

Args:
    offset (int): Number of characters to add to start and end.

Returns:
    TextSpan: A new TextSpan with adjusted position.

---
## right_crop
```python
from text import right_crop
```

Remove a number of characters from the end of the text.

---
## extend
```python
from text import extend
```

Extend the span by the given number of cells.

Args:
    cells (int): Additional space to add to end of span.

Returns:
    Span: A span.

---
## __init__
```python
from text import __init__
```



---
## __len__
```python
from text import __len__
```



---
## __str__
```python
from text import __str__
```



---
## __add__
```python
from text import __add__
```



---
## __eq__
```python
from text import __eq__
```



---
## __contains__
```python
from text import __contains__
```



---
## __getitem__
```python
from text import __getitem__
```



---
## cell_len
```python
from text import cell_len
```

Get the number of cells required to render this text.

---
## markup
```python
from text import markup
```

Get console markup to render this Text.

Returns:
    str: A string potentially creating markup tags.

---
## from_markup
```python
from text import from_markup
```

Create Text instance from markup.

Args:
    text (str): A string containing console markup.
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    emoji (bool, optional): Also render emoji code. Defaults to True.
    emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".

Returns:
    Text: A Text instance with markup rendered.

---
## from_ansi
```python
from text import from_ansi
```

Create a Text object from a string containing ANSI escape codes.

Args:
    text (str): A string containing escape codes.
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".
    tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.

---
## styled
```python
from text import styled
```

Construct a Text instance with a pre-applied styled. A style applied in this way won't be used
to pad the text when it is justified.

Args:
    text (str): A string containing console markup.
    style (Union[str, Style]): Style to apply to the text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.

Returns:
    Text: A text instance with a style applied to the entire string.

---
## assemble
```python
from text import assemble
```

Construct a text instance by combining a sequence of strings with optional styles.
The positional arguments should be either strings, or a tuple of string + style.

Args:
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".
    tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
    meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None

Returns:
    Text: A new text instance.

---
## plain
```python
from text import plain
```

Set the text to a new value.

---
## spans
```python
from text import spans
```

Set spans.

---
## blank_copy
```python
from text import blank_copy
```

Return a new Text instance with copied metadata (but not the string or spans).

---
## copy
```python
from text import copy
```

Return a copy of this instance.

---
## stylize
```python
from text import stylize
```

Apply a style to the text, or a portion of the text.

Args:
    style (Union[str, Style]): Style instance or style definition to apply.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

---
## stylize_before
```python
from text import stylize_before
```

Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.

Args:
    style (Union[str, Style]): Style instance or style definition to apply.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

---
## apply_meta
```python
from text import apply_meta
```

Apply metadata to the text, or a portion of the text.

Args:
    meta (Dict[str, Any]): A dict of meta information.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

---
## on
```python
from text import on
```

Apply event handlers (used by Textual project).

Example:
    >>> from rich.text import Text
    >>> text = Text("hello world")
    >>> text.on(click="view.toggle('world')")

Args:
    meta (Dict[str, Any]): Mapping of meta information.
    **handlers: Keyword args are prefixed with "@" to defined handlers.

Returns:
    Text: Self is returned to method may be chained.

---
## remove_suffix
```python
from text import remove_suffix
```

Remove a suffix if it exists.

Args:
    suffix (str): Suffix to remove.

---
## get_style_at_offset
```python
from text import get_style_at_offset
```

Get the style of a character at give offset.

Args:
    console (~Console): Console where text will be rendered.
    offset (int): Offset in to text (negative indexing supported)

Returns:
    Style: A Style instance.

---
## extend_style
```python
from text import extend_style
```

Extend the Text given number of spaces where the spaces have the same style as the last character.

Args:
    spaces (int): Number of spaces to add to the Text.

---
## highlight_regex
```python
from text import highlight_regex
```

Highlight text with a regular expression, where group names are
translated to styles.

Args:
    re_highlight (str): A regular expression.
    style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
        which accepts the matched text and returns a style. Defaults to None.
    style_prefix (str, optional): Optional prefix to add to style group names.

Returns:
    int: Number of regex matches

---
## highlight_words
```python
from text import highlight_words
```

Highlight words with a style.

Args:
    words (Iterable[str]): Words to highlight.
    style (Union[str, Style]): Style to apply.
    case_sensitive (bool, optional): Enable case sensitive matching. Defaults to True.

Returns:
    int: Number of words highlighted.

---
## rstrip
```python
from text import rstrip
```

Strip whitespace from end of text.

---
## rstrip_end
```python
from text import rstrip_end
```

Remove whitespace beyond a certain width at the end of the text.

Args:
    size (int): The desired size of the text.

---
## set_length
```python
from text import set_length
```

Set new length of the text, clipping or padding is required.

---
## __rich_console__
```python
from text import __rich_console__
```



---
## __rich_measure__
```python
from text import __rich_measure__
```



---
## render
```python
from text import render
```

Render the text as Segments.

Args:
    console (Console): Console instance.
    end (Optional[str], optional): Optional end character.

Returns:
    Iterable[Segment]: Result of render that may be written to the console.

---
## join
```python
from text import join
```

Join text together with this instance as the separator.

Args:
    lines (Iterable[Text]): An iterable of Text instances to join.

Returns:
    Text: A new text instance containing join text.

---
## expand_tabs
```python
from text import expand_tabs
```

Converts tabs to spaces.

Args:
    tab_size (int, optional): Size of tabs. Defaults to 8.

---
## truncate
```python
from text import truncate
```

Truncate text if it is longer that a given width.

Args:
    max_width (int): Maximum number of characters in text.
    overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
    pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.

---
## _trim_spans
```python
from text import _trim_spans
```

Remove or modify any spans that are over the end of the text.

---
## pad
```python
from text import pad
```

Pad left and right with a given number of characters.

Args:
    count (int): Width of padding.
    character (str): The character to pad with. Must be a string of length 1.

---
## pad_left
```python
from text import pad_left
```

Pad the left with a given character.

Args:
    count (int): Number of characters to pad.
    character (str, optional): Character to pad with. Defaults to " ".

---
## pad_right
```python
from text import pad_right
```

Pad the right with a given character.

Args:
    count (int): Number of characters to pad.
    character (str, optional): Character to pad with. Defaults to " ".

---
## align
```python
from text import align
```

Align text to a given width.

Args:
    align (AlignMethod): One of "left", "center", or "right".
    width (int): Desired width.
    character (str, optional): Character to pad with. Defaults to " ".

---
## append
```python
from text import append
```

Add text with an optional style.

Args:
    text (Union[Text, str]): A str or Text to append.
    style (str, optional): A style name. Defaults to None.

Returns:
    Text: Returns self for chaining.

---
## append_text
```python
from text import append_text
```

Append another Text instance. This method is more performant that Text.append, but
only works for Text.

Args:
    text (Text): The Text instance to append to this instance.

Returns:
    Text: Returns self for chaining.

---
## append_tokens
```python
from text import append_tokens
```

Append iterable of str and style. Style may be a Style instance or a str style definition.

Args:
    tokens (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.

Returns:
    Text: Returns self for chaining.

---
## copy_styles
```python
from text import copy_styles
```

Copy styles from another Text instance.

Args:
    text (Text): A Text instance to copy styles from, must be the same length.

---
## divide
```python
from text import divide
```

Divide text in to a number of lines at given offsets.

Args:
    offsets (Iterable[int]): Offsets used to divide text.

Returns:
    Lines: New RichText instances between offsets.

---
## wrap
```python
from text import wrap
```



---
## fit
```python
from text import fit
```

Fit the text in to given width by chopping in to lines.

Args:
    width (int): Maximum characters in a line.

Returns:
    Lines: Lines container.

---
## detect_indentation
```python
from text import detect_indentation
```

Auto-detect indentation of code.

Returns:
    int: Number of spaces used to indent code.

---
## with_indent_guides
```python
from text import with_indent_guides
```

Adds indent guide lines to text.

Args:
    indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
    character (str, optional): Character to use for indentation. Defaults to "│".
    style (Union[Style, str], optional): Style of indent guides.

Returns:
    Text: New text with indentation guides.

---
## get_text_at
```python
from text import get_text_at
```



---
## get_current_style
```python
from text import get_current_style
```

Construct current style from stack.

---
## iter_text
```python
from text import iter_text
```



---
## flatten_spans
```python
from text import flatten_spans
```



---
## __name__
```python
from highlighter import __name__
```



---
## _combine_regex
```python
from highlighter import _combine_regex
```

Combine a number of regexes in to a single regex.

Returns:
    str: New regex with all regexes ORed together.

---
## Highlighter
```python
from highlighter import Highlighter
```

Abstract base class for highlighters.

---
## NullHighlighter
```python
from highlighter import NullHighlighter
```

A highlighter object that doesn't highlight.

May be used to disable highlighting entirely.

---
## RegexHighlighter
```python
from highlighter import RegexHighlighter
```

Applies highlighting from a list of regular expressions.

---
## ReprHighlighter
```python
from highlighter import ReprHighlighter
```

Highlights the text typically produced from ``__repr__`` methods.

---
## JSONHighlighter
```python
from highlighter import JSONHighlighter
```

Highlights JSON

---
## ISO8601Highlighter
```python
from highlighter import ISO8601Highlighter
```

Highlights the ISO8601 date time strings.
Regex reference: https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s07.html

---
## __call__
```python
from highlighter import __call__
```

Highlight a str or Text instance.

Args:
    text (Union[str, ~Text]): Text to highlight.

Raises:
    TypeError: If not called with text or str.

Returns:
    Text: A test instance with highlighting applied.

---
## highlight
```python
from highlighter import highlight
```



---
## __name__
```python
from _spinners import __name__
```

Spinners are from:
* cli-spinners:
    MIT License
    Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights to
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    the Software, and to permit persons to whom the Software is furnished to do so,
    subject to the following conditions:
    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
    INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
    PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
    FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
    ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
    IN THE SOFTWARE.

---
## __name__
```python
from terminal_theme import __name__
```



---
## TerminalTheme
```python
from terminal_theme import TerminalTheme
```

A color theme used when exporting console content.

Args:
    background (Tuple[int, int, int]): The background color.
    foreground (Tuple[int, int, int]): The foreground (text) color.
    normal (List[Tuple[int, int, int]]): A list of 8 normal intensity colors.
    bright (List[Tuple[int, int, int]], optional): A list of 8 bright colors, or None
        to repeat normal intensity. Defaults to None.

---
## __init__
```python
from terminal_theme import __init__
```



---
## __name__
```python
from bar import __name__
```



---
## Bar
```python
from bar import Bar
```

Renders a solid block bar.

Args:
    size (float): Value for the end of the bar.
    begin (float): Begin point (between 0 and size, inclusive).
    end (float): End point (between 0 and size, inclusive).
    width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
    color (Union[Color, str], optional): Color of the bar. Defaults to "default".
    bgcolor (Union[Color, str], optional): Color of bar background. Defaults to "default".

---
## __init__
```python
from bar import __init__
```



---
## __repr__
```python
from bar import __repr__
```



---
## __rich_console__
```python
from bar import __rich_console__
```



---
## __rich_measure__
```python
from bar import __rich_measure__
```



---
## __name__
```python
from live import __name__
```



---
## _RefreshThread
```python
from live import _RefreshThread
```

A thread that calls refresh() at regular intervals.

---
## Live
```python
from live import Live
```

Renders an auto-updating live display of any given renderable.

Args:
    renderable (RenderableType, optional): The renderable to live display. Defaults to displaying nothing.
    console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
    screen (bool, optional): Enable alternate screen mode. Defaults to False.
    auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()` or `update()` with refresh flag. Defaults to True
    refresh_per_second (float, optional): Number of times per second to refresh the live display. Defaults to 4.
    transient (bool, optional): Clear the renderable on exit (has no effect when screen=True). Defaults to False.
    redirect_stdout (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
    redirect_stderr (bool, optional): Enable redirection of stderr. Defaults to True.
    vertical_overflow (VerticalOverflowMethod, optional): How to handle renderable when it is too tall for the console. Defaults to "ellipsis".
    get_renderable (Callable[[], RenderableType], optional): Optional callable to get renderable. Defaults to None.

---
## __init__
```python
from live import __init__
```



---
## stop
```python
from live import stop
```

Stop live rendering display.

---
## run
```python
from live import run
```



---
## is_started
```python
from live import is_started
```

Check if live display has been started.

---
## get_renderable
```python
from live import get_renderable
```



---
## start
```python
from live import start
```

Start live rendering display.

Args:
    refresh (bool, optional): Also refresh. Defaults to False.

---
## __enter__
```python
from live import __enter__
```



---
## __exit__
```python
from live import __exit__
```



---
## _enable_redirect_io
```python
from live import _enable_redirect_io
```

Enable redirecting of stdout / stderr.

---
## _disable_redirect_io
```python
from live import _disable_redirect_io
```

Disable redirecting of stdout / stderr.

---
## renderable
```python
from live import renderable
```

Get the renderable that is being displayed

Returns:
    RenderableType: Displayed renderable.

---
## update
```python
from live import update
```

Update the renderable that is being displayed

Args:
    renderable (RenderableType): New renderable to use.
    refresh (bool, optional): Refresh the display. Defaults to False.

---
## refresh
```python
from live import refresh
```

Update the display of the Live Render.

---
## process_renderables
```python
from live import process_renderables
```

Process renderables to restore cursor and display progress.

---
## __name__
```python
from syntax import __name__
```



---
## SyntaxTheme
```python
from syntax import SyntaxTheme
```

Base class for a syntax theme.

---
## PygmentsSyntaxTheme
```python
from syntax import PygmentsSyntaxTheme
```

Syntax theme that delegates to Pygments theme.

---
## ANSISyntaxTheme
```python
from syntax import ANSISyntaxTheme
```

Syntax theme to use standard colors.

---
## _SyntaxHighlightRange
```python
from syntax import _SyntaxHighlightRange
```

A range to highlight in a Syntax object.
`start` and `end` are 2-integers tuples, where the first integer is the line number
(starting from 1) and the second integer is the column index (starting from 0).

---
## Syntax
```python
from syntax import Syntax
```

Construct a Syntax object to render syntax highlighted code.

Args:
    code (str): Code to highlight.
    lexer (Lexer | str): Lexer to use (see https://pygments.org/docs/lexers/)
    theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "monokai".
    dedent (bool, optional): Enable stripping of initial whitespace. Defaults to False.
    line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
    start_line (int, optional): Starting number for line numbers. Defaults to 1.
    line_range (Tuple[int | None, int | None], optional): If given should be a tuple of the start and end line to render.
        A value of None in the tuple indicates the range is open in that direction.
    highlight_lines (Set[int]): A set of line numbers to highlight.
    code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
    tab_size (int, optional): Size of tabs. Defaults to 4.
    word_wrap (bool, optional): Enable word wrapping.
    background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
    indent_guides (bool, optional): Show indent guides. Defaults to False.
    padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).

---
## _get_code_index_for_syntax_position
```python
from syntax import _get_code_index_for_syntax_position
```

Returns the index of the code string for the given positions.

Args:
    newlines_offsets (Sequence[int]): The offset of each newline character found in the code snippet.
    position (SyntaxPosition): The position to search for.

Returns:
    Optional[int]: The index of the code string for this position, or `None`
        if the given position's line number is out of range (if it's the column that is out of range
        we silently clamp its value so that it reaches the end of the line)

---
## get_style_for_token
```python
from syntax import get_style_for_token
```

Look up style in the style map.

---
## get_background_style
```python
from syntax import get_background_style
```



---
## __init__
```python
from syntax import __init__
```



---
## get_theme
```python
from syntax import get_theme
```

Get a syntax theme instance.

---
## from_path
```python
from syntax import from_path
```

Construct a Syntax object from a file.

Args:
    path (str): Path to file to highlight.
    encoding (str): Encoding of file.
    lexer (str | Lexer, optional): Lexer to use. If None, lexer will be auto-detected from path/file content.
    theme (str, optional): Color theme, aka Pygments style (see https://pygments.org/docs/styles/#getting-a-list-of-available-styles). Defaults to "emacs".
    dedent (bool, optional): Enable stripping of initial whitespace. Defaults to True.
    line_numbers (bool, optional): Enable rendering of line numbers. Defaults to False.
    start_line (int, optional): Starting number for line numbers. Defaults to 1.
    line_range (Tuple[int, int], optional): If given should be a tuple of the start and end line to render.
    highlight_lines (Set[int]): A set of line numbers to highlight.
    code_width: Width of code to render (not including line numbers), or ``None`` to use all available width.
    tab_size (int, optional): Size of tabs. Defaults to 4.
    word_wrap (bool, optional): Enable word wrapping of code.
    background_color (str, optional): Optional background color, or None to use theme color. Defaults to None.
    indent_guides (bool, optional): Show indent guides. Defaults to False.
    padding (PaddingDimensions): Padding to apply around the syntax. Defaults to 0 (no padding).

Returns:
    [Syntax]: A Syntax object that may be printed to the console

---
## guess_lexer
```python
from syntax import guess_lexer
```

Guess the alias of the Pygments lexer to use based on a path and an optional string of code.
If code is supplied, it will use a combination of the code and the filename to determine the
best lexer to use. For example, if the file is ``index.html`` and the file contains Django
templating syntax, then "html+django" will be returned. If the file is ``index.html``, and no
templating language is used, the "html" lexer will be used. If no string of code
is supplied, the lexer will be chosen based on the file extension..

Args:
     path (AnyStr): The path to the file containing the code you wish to know the lexer for.
     code (str, optional): Optional string of code that will be used as a fallback if no lexer
        is found for the supplied path.

Returns:
    str: The name of the Pygments lexer that best matches the supplied path/code.

---
## _get_base_style
```python
from syntax import _get_base_style
```

Get the base style.

---
## _get_token_color
```python
from syntax import _get_token_color
```

Get a color (if any) for the given token.

Args:
    token_type (TokenType): A token type tuple from Pygments.

Returns:
    Optional[Color]: Color from theme, or None for no color.

---
## lexer
```python
from syntax import lexer
```

The lexer for this syntax, or None if no lexer was found.

Tries to find the lexer by name if a string was passed to the constructor.

---
## default_lexer
```python
from syntax import default_lexer
```

A Pygments Lexer to use if one is not specified or invalid.

---
## highlight
```python
from syntax import highlight
```

Highlight code and return a Text instance.

Args:
    code (str): Code to highlight.
    line_range(Tuple[int, int], optional): Optional line range to highlight.

Returns:
    Text: A text instance containing highlighted syntax.

---
## stylize_range
```python
from syntax import stylize_range
```

Adds a custom style on a part of the code, that will be applied to the syntax display when it's rendered.
Line numbers are 1-based, while column indexes are 0-based.

Args:
    style (StyleType): The style to apply.
    start (Tuple[int, int]): The start of the range, in the form `[line number, column index]`.
    end (Tuple[int, int]): The end of the range, in the form `[line number, column index]`.

---
## _get_line_numbers_color
```python
from syntax import _get_line_numbers_color
```



---
## _numbers_column_width
```python
from syntax import _numbers_column_width
```

Get the number of characters used to render the numbers column.

---
## _get_number_styles
```python
from syntax import _get_number_styles
```

Get background, number, and highlight styles for line numbers.

---
## __rich_measure__
```python
from syntax import __rich_measure__
```



---
## __rich_console__
```python
from syntax import __rich_console__
```



---
## _get_syntax
```python
from syntax import _get_syntax
```

Get the Segments for the Syntax object, excluding any vertical/horizontal padding

---
## _apply_stylized_ranges
```python
from syntax import _apply_stylized_ranges
```

Apply stylized ranges to a text instance,
using the given code to determine the right portion to apply the style to.

Args:
    text (Text): Text instance to apply the style to.

---
## _process_code
```python
from syntax import _process_code
```

Applies various processing to a raw code string
(normalises it so it always ends with a line return, dedents it if necessary, etc.)

Args:
    code (str): The raw code string to process

Returns:
    Tuple[bool, str]: the boolean indicates whether the raw code ends with a line return,
        while the string is the processed code.

---
## line_tokenize
```python
from syntax import line_tokenize
```

Split tokens to one per line.

---
## tokens_to_spans
```python
from syntax import tokens_to_spans
```

Convert tokens to spans.

---
## Column
```python
from table import Column
```

Defines a column within a ~Table.

Args:
    title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
    caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
    width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
    min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
    box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
    safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
    padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
    pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
    show_header (bool, optional): Show a header row. Defaults to True.
    show_footer (bool, optional): Show a footer row. Defaults to False.
    show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
    show_lines (bool, optional): Draw lines between every row. Defaults to False.
    leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
    style (Union[str, Style], optional): Default style for the table. Defaults to "none".
    row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
    header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
    footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
    border_style (Union[str, Style], optional): Style of the border. Defaults to None.
    title_style (Union[str, Style], optional): Style of the title. Defaults to None.
    caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
    title_justify (str, optional): Justify method for title. Defaults to "center".
    caption_justify (str, optional): Justify method for caption. Defaults to "center".
    highlight (bool, optional): Highlight cell contents (if str). Defaults to False.

---
## Row
```python
from table import Row
```

Information regarding a row.

---
## _Cell
```python
from table import _Cell
```

A single cell in a table.

---
## copy
```python
from table import copy
```

Return a copy of this Column.

---
## cells
```python
from table import cells
```

Get all cells in the column, not including header.

---
## flexible
```python
from table import flexible
```

Check if this column is flexible.

---
## grid
```python
from table import grid
```

Get a table with no lines, headers, or footer.

Args:
    *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
    padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
    pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.

Returns:
    Table: A table instance.

---
## expand
```python
from table import expand
```

Set expand.

---
## _extra_width
```python
from table import _extra_width
```

Get extra width to add to cell content.

---
## row_count
```python
from table import row_count
```

Get the current number of rows.

---
## get_row_style
```python
from table import get_row_style
```

Get the current row style.

---
## __rich_measure__
```python
from table import __rich_measure__
```



---
## padding
```python
from table import padding
```

Set cell padding.

---
## add_row
```python
from table import add_row
```

Add a row of renderables.

Args:
    *renderables (None or renderable): Each cell in a row must be a renderable object (including str),
        or ``None`` for a blank cell.
    style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.
    end_section (bool, optional): End a section and draw a line. Defaults to False.

Raises:
    errors.NotRenderableError: If you add something that can't be rendered.

---
## add_section
```python
from table import add_section
```

Add a new section (draw a line after current row).

---
## __rich_console__
```python
from table import __rich_console__
```



---
## _calculate_column_widths
```python
from table import _calculate_column_widths
```

Calculate the widths of each column, including padding, not including borders.

---
## _collapse_widths
```python
from table import _collapse_widths
```

Reduce widths so that the total is under max_width.

Args:
    widths (List[int]): List of widths.
    wrapable (List[bool]): List of booleans that indicate if a column may shrink.
    max_width (int): Maximum width to reduce to.

Returns:
    List[int]: A new list of widths.

---
## _get_cells
```python
from table import _get_cells
```

Get all the cells with padding and optional header.

---
## _get_padding_width
```python
from table import _get_padding_width
```

Get extra width from padding.

---
## _measure_column
```python
from table import _measure_column
```

Get the minimum and maximum width of the column.

---
## _render
```python
from table import _render
```



---
## add_cell
```python
from table import add_cell
```



---
## render_annotation
```python
from table import render_annotation
```



---
## get_padding
```python
from table import get_padding
```



---
## header
```python
from table import header
```



---
## align_cell
```python
from table import align_cell
```



---
## __name__
```python
from _export_format import __name__
```



---
## __name__
```python
from progress_bar import __name__
```



---
## ProgressBar
```python
from progress_bar import ProgressBar
```

Renders a (progress) bar. Used by rich.progress.

Args:
    total (float, optional): Number of steps in the bar. Defaults to 100. Set to None to render a pulsing animation.
    completed (float, optional): Number of steps completed. Defaults to 0.
    width (int, optional): Width of the bar, or ``None`` for maximum width. Defaults to None.
    pulse (bool, optional): Enable pulse effect. Defaults to False. Will pulse if a None total was passed.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    animation_time (Optional[float], optional): Time in seconds to use for animation, or None to use system time.

---
## __init__
```python
from progress_bar import __init__
```



---
## __repr__
```python
from progress_bar import __repr__
```



---
## percentage_completed
```python
from progress_bar import percentage_completed
```

Calculate percentage complete.

---
## _get_pulse_segments
```python
from progress_bar import _get_pulse_segments
```

Get a list of segments to render a pulse animation.

Returns:
    List[Segment]: A list of segments, one segment per character.

---
## update
```python
from progress_bar import update
```

Update progress with new values.

Args:
    completed (float): Number of steps completed.
    total (float, optional): Total number of steps, or ``None`` to not change. Defaults to None.

---
## _render_pulse
```python
from progress_bar import _render_pulse
```

Renders the pulse animation.

Args:
    console (Console): Console instance.
    width (int): Width in characters of pulse animation.

Returns:
    RenderResult: [description]

Yields:
    Iterator[Segment]: Segments to render pulse

---
## __rich_console__
```python
from progress_bar import __rich_console__
```



---
## __rich_measure__
```python
from progress_bar import __rich_measure__
```



---
## ConsoleError
```python
from errors import ConsoleError
```

An error in console operation.

---
## StyleError
```python
from errors import StyleError
```

An error in styles.

---
## StyleSyntaxError
```python
from errors import StyleSyntaxError
```

Style was badly formatted.

---
## MissingStyle
```python
from errors import MissingStyle
```

No such style.

---
## StyleStackError
```python
from errors import StyleStackError
```

Style stack is invalid.

---
## NotRenderableError
```python
from errors import NotRenderableError
```

Object is not renderable.

---
## MarkupError
```python
from errors import MarkupError
```

Markup was badly formatted.

---
## LiveError
```python
from errors import LiveError
```

Error related to Live display.

---
## NoAltScreen
```python
from errors import NoAltScreen
```

Alt screen mode was required.

---
## __name__
```python
from prompt import __name__
```



---
## PromptError
```python
from prompt import PromptError
```

Exception base class for prompt related errors.

---
## InvalidResponse
```python
from prompt import InvalidResponse
```

Exception to indicate a response was invalid. Raise this within process_response() to indicate an error
and provide an error message.

Args:
    message (Union[str, Text]): Error message.

---
## PromptBase
```python
from prompt import PromptBase
```

Ask the user for input until a valid response is received. This is the base class, see one of
the concrete classes for examples.

Args:
    prompt (TextType, optional): Prompt text. Defaults to "".
    console (Console, optional): A Console instance or None to use global console. Defaults to None.
    password (bool, optional): Enable password input. Defaults to False.
    choices (List[str], optional): A list of valid choices. Defaults to None.
    show_default (bool, optional): Show default in prompt. Defaults to True.
    show_choices (bool, optional): Show choices in prompt. Defaults to True.

---
## Prompt
```python
from prompt import Prompt
```

A prompt that returns a str.

Example:
    >>> name = Prompt.ask("Enter your name")

---
## IntPrompt
```python
from prompt import IntPrompt
```

A prompt that returns an integer.

Example:
    >>> burrito_count = IntPrompt.ask("How many burritos do you want to order")

---
## FloatPrompt
```python
from prompt import FloatPrompt
```

A prompt that returns a float.

Example:
    >>> temperature = FloatPrompt.ask("Enter desired temperature")

---
## Confirm
```python
from prompt import Confirm
```

A yes / no confirmation prompt.

Example:
    >>> if Confirm.ask("Continue"):
            run_job()

---
## __init__
```python
from prompt import __init__
```



---
## __rich__
```python
from prompt import __rich__
```



---
## ask
```python
from prompt import ask
```

Shortcut to construct and run a prompt loop and return the result.

Example:
    >>> filename = Prompt.ask("Enter a filename")

Args:
    prompt (TextType, optional): Prompt text. Defaults to "".
    console (Console, optional): A Console instance or None to use global console. Defaults to None.
    password (bool, optional): Enable password input. Defaults to False.
    choices (List[str], optional): A list of valid choices. Defaults to None.
    show_default (bool, optional): Show default in prompt. Defaults to True.
    show_choices (bool, optional): Show choices in prompt. Defaults to True.
    stream (TextIO, optional): Optional text file open for reading to get input. Defaults to None.

---
## render_default
```python
from prompt import render_default
```

Render the default as (y) or (n) rather than True/False.

---
## make_prompt
```python
from prompt import make_prompt
```

Make prompt text.

Args:
    default (DefaultType): Default value.

Returns:
    Text: Text to display in prompt.

---
## get_input
```python
from prompt import get_input
```

Get input from user.

Args:
    console (Console): Console instance.
    prompt (TextType): Prompt text.
    password (bool): Enable password entry.

Returns:
    str: String from user.

---
## check_choice
```python
from prompt import check_choice
```

Check value is in the list of valid choices.

Args:
    value (str): Value entered by user.

Returns:
    bool: True if choice was valid, otherwise False.

---
## process_response
```python
from prompt import process_response
```

Convert choices to a bool.

---
## on_validate_error
```python
from prompt import on_validate_error
```

Called to handle validation error.

Args:
    value (str): String entered by user.
    error (InvalidResponse): Exception instance the initiated the error.

---
## pre_prompt
```python
from prompt import pre_prompt
```

Hook to display something before the prompt.

---
## __call__
```python
from prompt import __call__
```

Run the prompt loop.

Args:
    default (Any, optional): Optional default value.

Returns:
    PromptType: Processed value.

---
## __name__
```python
from segment import __name__
```



---
## ControlType
```python
from segment import ControlType
```

Non-printable control codes which typically translate to ANSI codes.

---
## Segment
```python
from segment import Segment
```

A piece of text with associated style. Segments are produced by the Console render process and
are ultimately converted in to strings to be written to the terminal.

Args:
    text (str): A piece of text.
    style (:class:`~rich.style.Style`, optional): An optional style to apply to the text.
    control (Tuple[ControlCode], optional): Optional sequence of control codes.

Attributes:
    cell_length (int): The cell length of this Segment.

---
## Segments
```python
from segment import Segments
```

A simple renderable to render an iterable of segments. This class may be useful if
you want to print segments outside of a __rich_console__ method.

Args:
    segments (Iterable[Segment]): An iterable of segments.
    new_lines (bool, optional): Add new lines between segments. Defaults to False.

---
## SegmentLines
```python
from segment import SegmentLines
```



---
## cell_length
```python
from segment import cell_length
```

The number of terminal cells required to display self.text.

Returns:
    int: A number of cells.

---
## __rich_repr__
```python
from segment import __rich_repr__
```



---
## __bool__
```python
from segment import __bool__
```

Check if the segment contains text.

---
## is_control
```python
from segment import is_control
```

Check if the segment contains control codes.

---
## _split_cells
```python
from segment import _split_cells
```



---
## split_cells
```python
from segment import split_cells
```

Split segment in to two segments at the specified column.

If the cut point falls in the middle of a 2-cell wide character then it is replaced
by two spaces, to preserve the display width of the parent segment.

Returns:
    Tuple[Segment, Segment]: Two segments.

---
## line
```python
from segment import line
```

Make a new line segment.

---
## apply_style
```python
from segment import apply_style
```

Apply style(s) to an iterable of segments.

Returns an iterable of segments where the style is replaced by ``style + segment.style + post_style``.

Args:
    segments (Iterable[Segment]): Segments to process.
    style (Style, optional): Base style. Defaults to None.
    post_style (Style, optional): Style to apply on top of segment style. Defaults to None.

Returns:
    Iterable[Segments]: A new iterable of segments (possibly the same iterable).

---
## filter_control
```python
from segment import filter_control
```

Filter segments by ``is_control`` attribute.

Args:
    segments (Iterable[Segment]): An iterable of Segment instances.
    is_control (bool, optional): is_control flag to match in search.

Returns:
    Iterable[Segment]: And iterable of Segment instances.

---
## split_lines
```python
from segment import split_lines
```

Split a sequence of segments in to a list of lines.

Args:
    segments (Iterable[Segment]): Segments potentially containing line feeds.

Yields:
    Iterable[List[Segment]]: Iterable of segment lists, one per line.

---
## split_and_crop_lines
```python
from segment import split_and_crop_lines
```

Split segments in to lines, and crop lines greater than a given length.

Args:
    segments (Iterable[Segment]): An iterable of segments, probably
        generated from console.render.
    length (int): Desired line length.
    style (Style, optional): Style to use for any padding.
    pad (bool): Enable padding of lines that are less than `length`.

Returns:
    Iterable[List[Segment]]: An iterable of lines of segments.

---
## adjust_line_length
```python
from segment import adjust_line_length
```

Adjust a line to a given width (cropping or padding as required).

Args:
    segments (Iterable[Segment]): A list of segments in a single line.
    length (int): The desired width of the line.
    style (Style, optional): The style of padding if used (space on the end). Defaults to None.
    pad (bool, optional): Pad lines with spaces if they are shorter than `length`. Defaults to True.

Returns:
    List[Segment]: A line of segments with the desired length.

---
## get_line_length
```python
from segment import get_line_length
```

Get the length of list of segments.

Args:
    line (List[Segment]): A line encoded as a list of Segments (assumes no '\\n' characters),

Returns:
    int: The length of the line.

---
## get_shape
```python
from segment import get_shape
```

Get the shape (enclosing rectangle) of a list of lines.

Args:
    lines (List[List[Segment]]): A list of lines (no '\\n' characters).

Returns:
    Tuple[int, int]: Width and height in characters.

---
## set_shape
```python
from segment import set_shape
```

Set the shape of a list of lines (enclosing rectangle).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style, optional): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        

---
## align_top
```python
from segment import align_top
```

Aligns lines to top (adds extra lines to bottom as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        

---
## align_bottom
```python
from segment import align_bottom
```

Aligns render to bottom (adds extra lines above as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added. Defaults to None.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        

---
## align_middle
```python
from segment import align_middle
```

Aligns lines to middle (adds extra lines to above and below as required).

        Args:
            lines (List[List[Segment]]): A list of lines.
            width (int): Desired width.
            height (int, optional): Desired height or None for no change.
            style (Style): Style of any padding added.
            new_lines (bool, optional): Padded lines should include "
". Defaults to False.

        Returns:
            List[List[Segment]]: New list of lines.
        

---
## simplify
```python
from segment import simplify
```

Simplify an iterable of segments by combining contiguous segments with the same style.

Args:
    segments (Iterable[Segment]): An iterable of segments.

Returns:
    Iterable[Segment]: A possibly smaller iterable of segments that will render the same way.

---
## strip_links
```python
from segment import strip_links
```

Remove all links from an iterable of styles.

Args:
    segments (Iterable[Segment]): An iterable segments.

Yields:
    Segment: Segments with link removed.

---
## strip_styles
```python
from segment import strip_styles
```

Remove all styles from an iterable of segments.

Args:
    segments (Iterable[Segment]): An iterable segments.

Yields:
    Segment: Segments with styles replace with None

---
## remove_color
```python
from segment import remove_color
```

Remove all color from an iterable of segments.

Args:
    segments (Iterable[Segment]): An iterable segments.

Yields:
    Segment: Segments with colorless style.

---
## divide
```python
from segment import divide
```

Divides an iterable of segments in to portions.

Args:
    cuts (Iterable[int]): Cell positions where to divide.

Yields:
    [Iterable[List[Segment]]]: An iterable of Segments in List.

---
## __init__
```python
from segment import __init__
```

A simple renderable containing a number of lines of segments. May be used as an intermediate
in rendering process.

Args:
    lines (Iterable[List[Segment]]): Lists of segments forming lines.
    new_lines (bool, optional): Insert new lines after each line. Defaults to False.

---
## __rich_console__
```python
from segment import __rich_console__
```



---
## __name__
```python
from ansi import __name__
```



---
## _AnsiToken
```python
from ansi import _AnsiToken
```

Result of ansi tokenized string.

---
## _ansi_tokenize
```python
from ansi import _ansi_tokenize
```

Tokenize a string in to plain text and ANSI codes.

Args:
    ansi_text (str): A String containing ANSI codes.

Yields:
    AnsiToken: A named tuple of (plain, sgr, osc)

---
## AnsiDecoder
```python
from ansi import AnsiDecoder
```

Translate ANSI code in to styled Text.

---
## __init__
```python
from ansi import __init__
```



---
## decode
```python
from ansi import decode
```

Decode ANSI codes in an iterable of lines.

Args:
    lines (Iterable[str]): An iterable of lines of terminal output.

Yields:
    Text: Marked up Text.

---
## decode_line
```python
from ansi import decode_line
```

Decode a line containing ansi codes.

Args:
    line (str): A line of terminal output.

Returns:
    Text: A Text instance marked up according to ansi codes.

---
## read
```python
from ansi import read
```



---
## __name__
```python
from progress import __name__
```



---
## _TrackThread
```python
from progress import _TrackThread
```

A thread to periodically update progress.

---
## track
```python
from progress import track
```

Track progress by iterating over a sequence.

Args:
    sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress.
    total: (float, optional): Total number of steps. Default is len(sequence).
    task_id: (TaskID): Task to track. Default is new task.
    description: (str, optional): Description of task, if new task is created.
    update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.

Returns:
    Iterable[ProgressType]: An iterable of values taken from the provided sequence.

---
## _Reader
```python
from progress import _Reader
```

A reader that tracks progress while it's being read from.

---
## _ReadContext
```python
from progress import _ReadContext
```

A utility class to handle a context for both a reader and a progress.

---
## wrap_file
```python
from progress import wrap_file
```

Track progress file reading from a binary file.

Args:
    file (BinaryIO): A file-like object opened in binary mode.
    total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
    task_id (TaskID): Task to track. Default is new task.
    description (str, optional): Description of task, if new task is created.

Returns:
    BinaryIO: A readable file-like object in binary mode.

Raises:
    ValueError: When no total value can be extracted from the arguments or the task.

---
## open
```python
from progress import open
```

Track progress while reading from a binary file.

Args:
    path (Union[str, PathLike[str]]): The path to the file to read.
    mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
    buffering (int): The buffering strategy to use, see :func:`io.open`.
    encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
    errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
    newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
    total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
    task_id (TaskID): Task to track. Default is new task.
    description (str, optional): Description of task, if new task is created.

Returns:
    BinaryIO: A readable file-like object in binary mode.

Raises:
    ValueError: When an invalid mode is given.

---
## ProgressColumn
```python
from progress import ProgressColumn
```

Base class for a widget to use in progress display.

---
## RenderableColumn
```python
from progress import RenderableColumn
```

A column to insert an arbitrary column.

Args:
    renderable (RenderableType, optional): Any renderable. Defaults to empty string.

---
## SpinnerColumn
```python
from progress import SpinnerColumn
```

A column with a 'spinner' animation.

Args:
    spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
    style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
    speed (float, optional): Speed factor of spinner. Defaults to 1.0.
    finished_text (TextType, optional): Text used when task is finished. Defaults to " ".

---
## TextColumn
```python
from progress import TextColumn
```

A column containing text.

---
## BarColumn
```python
from progress import BarColumn
```

Renders a visual progress bar.

Args:
    bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".

---
## TimeElapsedColumn
```python
from progress import TimeElapsedColumn
```

Renders time elapsed.

---
## TaskProgressColumn
```python
from progress import TaskProgressColumn
```

Show task progress as a percentage.

Args:
    text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
    text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
    style (StyleType, optional): Style of output. Defaults to "none".
    justify (JustifyMethod, optional): Text justification. Defaults to "left".
    markup (bool, optional): Enable markup. Defaults to True.
    highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
    table_column (Optional[Column], optional): Table Column to use. Defaults to None.
    show_speed (bool, optional): Show speed if total is unknown. Defaults to False.

---
## TimeRemainingColumn
```python
from progress import TimeRemainingColumn
```

Renders estimated time remaining.

Args:
    compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
    elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.

---
## FileSizeColumn
```python
from progress import FileSizeColumn
```

Renders completed filesize.

---
## TotalFileSizeColumn
```python
from progress import TotalFileSizeColumn
```

Renders total filesize.

---
## MofNCompleteColumn
```python
from progress import MofNCompleteColumn
```

Renders completed count/total, e.g. '  10/1000'.

Best for bounded tasks with int quantities.

Space pads the completed count so that progress length does not change as task progresses
past powers of 10.

Args:
    separator (str, optional): Text to separate completed and total values. Defaults to "/".

---
## DownloadColumn
```python
from progress import DownloadColumn
```

Renders file size downloaded and total, e.g. '0.5/2.3 GB'.

Args:
    binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.

---
## TransferSpeedColumn
```python
from progress import TransferSpeedColumn
```

Renders human readable transfer speed.

---
## ProgressSample
```python
from progress import ProgressSample
```

Sample of progress for a given time.

---
## Task
```python
from progress import Task
```

Information regarding a progress task.

This object should be considered read-only outside of the :class:`~Progress` class.

---
## Progress
```python
from progress import Progress
```

Renders an auto-updating progress bar(s).

Args:
    console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
    auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
    refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
    speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
    transient: (bool, optional): Clear the progress on exit. Defaults to False.
    redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
    redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
    get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
    disable (bool, optional): Disable progress display. Defaults to False
    expand (bool, optional): Expand tasks table to fit width. Defaults to False.

---
## __init__
```python
from progress import __init__
```



---
## run
```python
from progress import run
```



---
## __enter__
```python
from progress import __enter__
```



---
## __exit__
```python
from progress import __exit__
```



---
## __iter__
```python
from progress import __iter__
```



---
## __next__
```python
from progress import __next__
```



---
## closed
```python
from progress import closed
```



---
## fileno
```python
from progress import fileno
```



---
## isatty
```python
from progress import isatty
```



---
## mode
```python
from progress import mode
```



---
## name
```python
from progress import name
```



---
## readable
```python
from progress import readable
```



---
## seekable
```python
from progress import seekable
```



---
## writable
```python
from progress import writable
```



---
## read
```python
from progress import read
```



---
## readinto
```python
from progress import readinto
```



---
## readline
```python
from progress import readline
```



---
## readlines
```python
from progress import readlines
```



---
## close
```python
from progress import close
```



---
## seek
```python
from progress import seek
```



---
## tell
```python
from progress import tell
```



---
## write
```python
from progress import write
```



---
## writelines
```python
from progress import writelines
```



---
## get_table_column
```python
from progress import get_table_column
```

Get a table column, used to build tasks table.

---
## __call__
```python
from progress import __call__
```

Called by the Progress object to return a renderable for the given task.

Args:
    task (Task): An object containing information regarding the task.

Returns:
    RenderableType: Anything renderable (including str).

---
## render
```python
from progress import render
```

Show data transfer speed.

---
## set_spinner
```python
from progress import set_spinner
```

Set a new spinner.

Args:
    spinner_name (str): Spinner name, see python -m rich.spinner.
    spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
    speed (float, optional): Speed factor of spinner. Defaults to 1.0.

---
## render_speed
```python
from progress import render_speed
```

Render the speed in iterations per second.

Args:
    task (Task): A Task object.

Returns:
    Text: Text object containing the task speed.

---
## get_time
```python
from progress import get_time
```

float: Get the current time, in seconds.

---
## started
```python
from progress import started
```

bool: Check if the task as started.

---
## remaining
```python
from progress import remaining
```

Optional[float]: Get the number of steps remaining, if a non-None total was set.

---
## elapsed
```python
from progress import elapsed
```

Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.

---
## finished
```python
from progress import finished
```

Check if all tasks have been completed.

---
## percentage
```python
from progress import percentage
```

float: Get progress of task as a percentage. If a None total was set, returns 0

---
## speed
```python
from progress import speed
```

Optional[float]: Get the estimated speed in steps per second.

---
## time_remaining
```python
from progress import time_remaining
```

Optional[float]: Get estimated time to completion, or ``None`` if no data.

---
## _reset
```python
from progress import _reset
```

Reset progress.

---
## get_default_columns
```python
from progress import get_default_columns
```

Get the default columns used for a new Progress instance:
   - a text column for the description (TextColumn)
   - the bar itself (BarColumn)
   - a text column showing completion percentage (TextColumn)
   - an estimated-time-remaining column (TimeRemainingColumn)
If the Progress instance is created without passing a columns argument,
the default columns defined here will be used.

You can also create a Progress instance using custom columns before
and/or after the defaults, as in this example:

    progress = Progress(
        SpinnerColumn(),
        *Progress.get_default_columns(),
        "Elapsed:",
        TimeElapsedColumn(),
    )

This code shows the creation of a Progress display, containing
a spinner to the left, the default columns, and a labeled elapsed
time column.

---
## console
```python
from progress import console
```



---
## tasks
```python
from progress import tasks
```

Get a list of Task instances.

---
## task_ids
```python
from progress import task_ids
```

A list of task IDs.

---
## start
```python
from progress import start
```

Start the progress display.

---
## stop
```python
from progress import stop
```

Stop the progress display.

---
## start_task
```python
from progress import start_task
```

Start a task.

Starts a task (used when calculating elapsed time). You may need to call this manually,
if you called ``add_task`` with ``start=False``.

Args:
    task_id (TaskID): ID of task.

---
## stop_task
```python
from progress import stop_task
```

Stop a task.

This will freeze the elapsed time on the task.

Args:
    task_id (TaskID): ID of task.

---
## update
```python
from progress import update
```

Update information associated with a task.

Args:
    task_id (TaskID): Task id (returned by add_task).
    total (float, optional): Updates task.total if not None.
    completed (float, optional): Updates task.completed if not None.
    advance (float, optional): Add a value to task.completed if not None.
    description (str, optional): Change task description if not None.
    visible (bool, optional): Set visible flag if not None.
    refresh (bool): Force a refresh of progress information. Default is False.
    **fields (Any): Additional data fields required for rendering.

---
## reset
```python
from progress import reset
```

Reset a task so completed is 0 and the clock is reset.

Args:
    task_id (TaskID): ID of task.
    start (bool, optional): Start the task after reset. Defaults to True.
    total (float, optional): New total steps in task, or None to use current total. Defaults to None.
    completed (int, optional): Number of steps completed. Defaults to 0.
    visible (bool, optional): Enable display of the task. Defaults to True.
    description (str, optional): Change task description if not None. Defaults to None.
    **fields (str): Additional data fields required for rendering.

---
## advance
```python
from progress import advance
```

Advance task by a number of steps.

Args:
    task_id (TaskID): ID of task.
    advance (float): Number of steps to advance. Default is 1.

---
## refresh
```python
from progress import refresh
```

Refresh (render) the progress information.

---
## get_renderable
```python
from progress import get_renderable
```

Get a renderable for the progress display.

---
## get_renderables
```python
from progress import get_renderables
```

Get a number of renderables for the progress display.

---
## make_tasks_table
```python
from progress import make_tasks_table
```

Get a table to render the Progress display.

Args:
    tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.

Returns:
    Table: A table instance.

---
## __rich__
```python
from progress import __rich__
```

Makes the Progress class itself renderable.

---
## add_task
```python
from progress import add_task
```

Add a new 'task' to the Progress display.

Args:
    description (str): A description of the task.
    start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
        you will need to call `start` manually. Defaults to True.
    total (float, optional): Number of total steps in the progress if known.
        Set to None to render a pulsing animation. Defaults to 100.
    completed (int, optional): Number of steps completed so far. Defaults to 0.
    visible (bool, optional): Enable display of the task. Defaults to True.
    **fields (str): Additional data fields required for rendering.

Returns:
    TaskID: An ID you can use when calling `update`.

---
## remove_task
```python
from progress import remove_task
```

Delete a task if it exists.

Args:
    task_id (TaskID): A task ID.

---
## __name__
```python
from _stack import __name__
```



---
## Stack
```python
from _stack import Stack
```

A small shim over builtin list.

---
## top
```python
from _stack import top
```

Get top of stack.

---
## push
```python
from _stack import push
```

Push an item on to the stack (append in stack nomenclature).

---
## WindowsConsoleFeatures
```python
from _windows import WindowsConsoleFeatures
```

Windows features available.

---
## get_windows_console_features
```python
from _windows import get_windows_console_features
```



---
## __name__
```python
from _cell_widths import __name__
```



---
## __name__
```python
from cells import __name__
```



---
## cached_cell_len
```python
from cells import cached_cell_len
```

Get the number of cells required to display text.

This method always caches, which may use up a lot of memory. It is recommended to use
`cell_len` over this method.

Args:
    text (str): Text to display.

Returns:
    int: Get the number of cells required to display text.

---
## cell_len
```python
from cells import cell_len
```

Get the number of cells required to display text.

Args:
    text (str): Text to display.

Returns:
    int: Get the number of cells required to display text.

---
## get_character_cell_size
```python
from cells import get_character_cell_size
```

Get the cell size of a character.

Args:
    character (str): A single character.

Returns:
    int: Number of cells (0, 1 or 2) occupied by that character.

---
## _get_codepoint_cell_size
```python
from cells import _get_codepoint_cell_size
```

Get the cell size of a character.

Args:
    codepoint (int): Codepoint of a character.

Returns:
    int: Number of cells (0, 1 or 2) occupied by that character.

---
## set_cell_size
```python
from cells import set_cell_size
```

Set the length of a string to fit within given number of cells.

---
## chop_cells
```python
from cells import chop_cells
```

Split text into lines such that each line fits within the available (cell) width.

Args:
    text: The text to fold such that it fits in the given width.
    width: The width available (number of cells).

Returns:
    A list of strings such that each string in the list has cell width
    less than or equal to the available width.

---
## __name__
```python
from _win32_console import __name__
```

Light wrapper around the Win32 Console API - this module should only be imported on Windows

The API that this module wraps is documented at https://docs.microsoft.com/en-us/windows/console/console-functions

---
## LegacyWindowsError
```python
from _win32_console import LegacyWindowsError
```



---
## WindowsCoordinates
```python
from _win32_console import WindowsCoordinates
```

Coordinates in the Windows Console API are (y, x), not (x, y).
This class is intended to prevent that confusion.
Rows and columns are indexed from 0.
This class can be used in place of wintypes._COORD in arguments and argtypes.

---
## CONSOLE_SCREEN_BUFFER_INFO
```python
from _win32_console import CONSOLE_SCREEN_BUFFER_INFO
```



---
## CONSOLE_CURSOR_INFO
```python
from _win32_console import CONSOLE_CURSOR_INFO
```



---
## GetStdHandle
```python
from _win32_console import GetStdHandle
```

Retrieves a handle to the specified standard device (standard input, standard output, or standard error).

Args:
    handle (int): Integer identifier for the handle. Defaults to -11 (stdout).

Returns:
    wintypes.HANDLE: The handle

---
## GetConsoleMode
```python
from _win32_console import GetConsoleMode
```

Retrieves the current input mode of a console's input buffer
or the current output mode of a console screen buffer.

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

Raises:
    LegacyWindowsError: If any error occurs while calling the Windows console API.

Returns:
    int: Value representing the current console mode as documented at
        https://docs.microsoft.com/en-us/windows/console/getconsolemode#parameters

---
## FillConsoleOutputCharacter
```python
from _win32_console import FillConsoleOutputCharacter
```

Writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    char (str): The character to write. Must be a string of length 1.
    length (int): The number of times to write the character.
    start (WindowsCoordinates): The coordinates to start writing at.

Returns:
    int: The number of characters written.

---
## FillConsoleOutputAttribute
```python
from _win32_console import FillConsoleOutputAttribute
```

Sets the character attributes for a specified number of character cells,
beginning at the specified coordinates in a screen buffer.

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    attributes (int): Integer value representing the foreground and background colours of the cells.
    length (int): The number of cells to set the output attribute of.
    start (WindowsCoordinates): The coordinates of the first cell whose attributes are to be set.

Returns:
    int: The number of cells whose attributes were actually set.

---
## SetConsoleTextAttribute
```python
from _win32_console import SetConsoleTextAttribute
```

Set the colour attributes for all text written after this function is called.

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    attributes (int): Integer value representing the foreground and background colours.


Returns:
    bool: True if the attribute was set successfully, otherwise False.

---
## GetConsoleScreenBufferInfo
```python
from _win32_console import GetConsoleScreenBufferInfo
```

Retrieves information about the specified console screen buffer.

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.

Returns:
    CONSOLE_SCREEN_BUFFER_INFO: A CONSOLE_SCREEN_BUFFER_INFO ctype struct contain information about
        screen size, cursor position, colour attributes, and more.

---
## SetConsoleCursorPosition
```python
from _win32_console import SetConsoleCursorPosition
```

Set the position of the cursor in the console screen

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    coords (WindowsCoordinates): The coordinates to move the cursor to.

Returns:
    bool: True if the function succeeds, otherwise False.

---
## GetConsoleCursorInfo
```python
from _win32_console import GetConsoleCursorInfo
```

Get the cursor info - used to get cursor visibility and width

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct that receives information
        about the console's cursor.

Returns:
      bool: True if the function succeeds, otherwise False.

---
## SetConsoleCursorInfo
```python
from _win32_console import SetConsoleCursorInfo
```

Set the cursor info - used for adjusting cursor visibility and width

Args:
    std_handle (wintypes.HANDLE): A handle to the console input buffer or the console screen buffer.
    cursor_info (CONSOLE_CURSOR_INFO): CONSOLE_CURSOR_INFO ctype struct containing the new cursor info.

Returns:
      bool: True if the function succeeds, otherwise False.

---
## SetConsoleTitle
```python
from _win32_console import SetConsoleTitle
```

Sets the title of the current console window

Args:
    title (str): The new title of the console window.

Returns:
    bool: True if the function succeeds, otherwise False.

---
## LegacyWindowsTerm
```python
from _win32_console import LegacyWindowsTerm
```

This class allows interaction with the legacy Windows Console API. It should only be used in the context
of environments where virtual terminal processing is not available. However, if it is used in a Windows environment,
the entire API should work.

Args:
    file (IO[str]): The file which the Windows Console API HANDLE is retrieved from, defaults to sys.stdout.

---
## from_param
```python
from _win32_console import from_param
```

Converts a WindowsCoordinates into a wintypes _COORD structure.
This classmethod is internally called by ctypes to perform the conversion.

Args:
    value (WindowsCoordinates): The input coordinates to convert.

Returns:
    wintypes._COORD: The converted coordinates struct.

---
## __init__
```python
from _win32_console import __init__
```



---
## cursor_position
```python
from _win32_console import cursor_position
```

Returns the current position of the cursor (0-based)

Returns:
    WindowsCoordinates: The current cursor position.

---
## screen_size
```python
from _win32_console import screen_size
```

Returns the current size of the console screen buffer, in character columns and rows

Returns:
    WindowsCoordinates: The width and height of the screen as WindowsCoordinates.

---
## write_text
```python
from _win32_console import write_text
```

Write text directly to the terminal without any modification of styles

Args:
    text (str): The text to write to the console

---
## write_styled
```python
from _win32_console import write_styled
```

Write styled text to the terminal.

Args:
    text (str): The text to write
    style (Style): The style of the text

---
## move_cursor_to
```python
from _win32_console import move_cursor_to
```

Set the position of the cursor

Args:
    new_position (WindowsCoordinates): The WindowsCoordinates representing the new position of the cursor.

---
## erase_line
```python
from _win32_console import erase_line
```

Erase all content on the line the cursor is currently located at

---
## erase_end_of_line
```python
from _win32_console import erase_end_of_line
```

Erase all content from the cursor position to the end of that line

---
## erase_start_of_line
```python
from _win32_console import erase_start_of_line
```

Erase all content from the cursor position to the start of that line

---
## move_cursor_up
```python
from _win32_console import move_cursor_up
```

Move the cursor up a single cell

---
## move_cursor_down
```python
from _win32_console import move_cursor_down
```

Move the cursor down a single cell

---
## move_cursor_forward
```python
from _win32_console import move_cursor_forward
```

Move the cursor forward a single cell. Wrap to the next line if required.

---
## move_cursor_to_column
```python
from _win32_console import move_cursor_to_column
```

Move cursor to the column specified by the zero-based column index, staying on the same row

Args:
    column (int): The zero-based column index to move the cursor to.

---
## move_cursor_backward
```python
from _win32_console import move_cursor_backward
```

Move the cursor backward a single cell. Wrap to the previous line if required.

---
## hide_cursor
```python
from _win32_console import hide_cursor
```

Hide the cursor

---
## show_cursor
```python
from _win32_console import show_cursor
```

Show the cursor

---
## set_title
```python
from _win32_console import set_title
```

Set the title of the terminal window

Args:
    title (str): The new title of the console window

---
## _get_cursor_size
```python
from _win32_console import _get_cursor_size
```

Get the percentage of the character cell that is filled by the cursor

---
## Panel
```python
from panel import Panel
```

A console renderable that draws a border around its contents.

Example:
    >>> console.print(Panel("Hello, World!"))

Args:
    renderable (RenderableType): A console renderable object.
    box (Box, optional): A Box instance that defines the look of the border (see :ref:`appendix_box`.
        Defaults to box.ROUNDED.
    safe_box (bool, optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
    expand (bool, optional): If True the panel will stretch to fill the console
        width, otherwise it will be sized to fit the contents. Defaults to True.
    style (str, optional): The style of the panel (border and contents). Defaults to "none".
    border_style (str, optional): The style of the border. Defaults to "none".
    width (Optional[int], optional): Optional width of panel. Defaults to None to auto-detect.
    height (Optional[int], optional): Optional height of panel. Defaults to None to auto-detect.
    padding (Optional[PaddingDimensions]): Optional padding around renderable. Defaults to 0.
    highlight (bool, optional): Enable automatic highlighting of panel title (if str). Defaults to False.

---
## fit
```python
from panel import fit
```

An alternative constructor that sets expand=False.

---
## _title
```python
from panel import _title
```



---
## _subtitle
```python
from panel import _subtitle
```



---
## __rich_console__
```python
from panel import __rich_console__
```



---
## __rich_measure__
```python
from panel import __rich_measure__
```



---
## align_text
```python
from panel import align_text
```

Gets new aligned text.

Args:
    text (Text): Title or subtitle text.
    width (int): Desired width.
    align (str): Alignment.
    character (str): Character for alignment.
    style (Style): Border style

Returns:
    Text: New text instance

---
## __name__
```python
from styled import __name__
```



---
## Styled
```python
from styled import Styled
```

Apply a style to a renderable.

Args:
    renderable (RenderableType): Any renderable.
    style (StyleType): A style to apply across the entire renderable.

---
## __init__
```python
from styled import __init__
```



---
## __rich_console__
```python
from styled import __rich_console__
```



---
## __rich_measure__
```python
from styled import __rich_measure__
```



---
## __name__
```python
from spinner import __name__
```



---
## Spinner
```python
from spinner import Spinner
```

A spinner animation.

Args:
    name (str): Name of spinner (run python -m rich.spinner).
    text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
    style (StyleType, optional): Style for spinner animation. Defaults to None.
    speed (float, optional): Speed factor for animation. Defaults to 1.0.

Raises:
    KeyError: If name isn't one of the supported spinner animations.

---
## __init__
```python
from spinner import __init__
```



---
## __rich_console__
```python
from spinner import __rich_console__
```



---
## __rich_measure__
```python
from spinner import __rich_measure__
```



---
## render
```python
from spinner import render
```

Render the spinner for a given time.

Args:
    time (float): Time in seconds.

Returns:
    RenderableType: A renderable containing animation frame.

---
## update
```python
from spinner import update
```

Updates attributes of a spinner after it has been started.

Args:
    text (RenderableType, optional): A renderable to display at the right of the spinner (str or Text typically). Defaults to "".
    style (StyleType, optional): Style for spinner animation. Defaults to None.
    speed (float, optional): Speed factor for animation. Defaults to None.

---
## __name__
```python
from _windows_renderer import __name__
```



---
## legacy_windows_render
```python
from _windows_renderer import legacy_windows_render
```

Makes appropriate Windows Console API calls based on the segments in the buffer.

Args:
    buffer (Iterable[Segment]): Iterable of Segments to convert to Win32 API calls.
    term (LegacyWindowsTerm): Used to call the Windows Console API.

---
## JSON
```python
from json import JSON
```

A renderable which pretty prints JSON.

Args:
    json (str): JSON encoded data.
    indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
    highlight (bool, optional): Enable highlighting. Defaults to True.
    skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
    ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
    check_circular (bool, optional): Check for circular references. Defaults to True.
    allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
    default (Callable, optional): A callable that converts values that can not be encoded
        in to something that can be JSON encoded. Defaults to None.
    sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

---
## from_data
```python
from json import from_data
```

Encodes a JSON object from arbitrary data.

Args:
    data (Any): An object that may be encoded in to JSON
    indent (Union[None, int, str], optional): Number of characters to indent by. Defaults to 2.
    highlight (bool, optional): Enable highlighting. Defaults to True.
    default (Callable, optional): Optional callable which will be called for objects that cannot be serialized. Defaults to None.
    skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
    ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
    check_circular (bool, optional): Check for circular references. Defaults to True.
    allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
    default (Callable, optional): A callable that converts values that can not be encoded
        in to something that can be JSON encoded. Defaults to None.
    sort_keys (bool, optional): Sort dictionary keys. Defaults to False.

Returns:
    JSON: New JSON object from the given data.

---
## __rich__
```python
from json import __rich__
```



---
## __name__
```python
from padding import __name__
```



---
## Padding
```python
from padding import Padding
```

Draw space around content.

Example:
    >>> print(Padding("Hello", (2, 4), style="on blue"))

Args:
    renderable (RenderableType): String or other renderable.
    pad (Union[int, Tuple[int]]): Padding for top, right, bottom, and left borders.
        May be specified with 1, 2, or 4 integers (CSS style).
    style (Union[str, Style], optional): Style for padding characters. Defaults to "none".
    expand (bool, optional): Expand padding to fit available width. Defaults to True.

---
## __init__
```python
from padding import __init__
```



---
## indent
```python
from padding import indent
```

Make padding instance to render an indent.

Args:
    renderable (RenderableType): String or other renderable.
    level (int): Number of characters to indent.

Returns:
    Padding: A Padding instance.

---
## unpack
```python
from padding import unpack
```

Unpack padding specified in CSS style.

---
## __repr__
```python
from padding import __repr__
```



---
## __rich_console__
```python
from padding import __rich_console__
```



---
## __rich_measure__
```python
from padding import __rich_measure__
```



---
## ColorBox
```python
from __main__ import ColorBox
```



---
## make_test_card
```python
from __main__ import make_test_card
```

Get a renderable that demonstrates a number of features.

---
## __rich_console__
```python
from __main__ import __rich_console__
```



---
## __rich_measure__
```python
from __main__ import __rich_measure__
```



---
## comparison
```python
from __main__ import comparison
```



---
## render_scope
```python
from scope import render_scope
```

Render python variables in a given scope.

Args:
    scope (Mapping): A mapping containing variable names and values.
    title (str, optional): Optional title. Defaults to None.
    sort_keys (bool, optional): Enable sorting of items. Defaults to True.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.

Returns:
    ConsoleRenderable: A renderable object.

---
## sort_items
```python
from scope import sort_items
```

Sort special variables first, then alphabetically.

---
## test
```python
from scope import test
```



---
## __name__
```python
from _extension import __name__
```



---
## load_ipython_extension
```python
from _extension import load_ipython_extension
```



---
## Status
```python
from status import Status
```

Displays a status indicator with a 'spinner' animation.

Args:
    status (RenderableType): A status renderable (str or Text typically).
    console (Console, optional): Console instance to use, or None for global console. Defaults to None.
    spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
    spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
    speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
    refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.

---
## __init__
```python
from status import __init__
```



---
## renderable
```python
from status import renderable
```



---
## console
```python
from status import console
```

Get the Console used by the Status objects.

---
## update
```python
from status import update
```

Update status.

Args:
    status (Optional[RenderableType], optional): New status renderable or None for no change. Defaults to None.
    spinner (Optional[str], optional): New spinner or None for no change. Defaults to None.
    spinner_style (Optional[StyleType], optional): New spinner style or None for no change. Defaults to None.
    speed (Optional[float], optional): Speed factor for spinner animation or None for no change. Defaults to None.

---
## start
```python
from status import start
```

Start the status animation.

---
## stop
```python
from status import stop
```

Stop the spinner animation.

---
## __rich__
```python
from status import __rich__
```



---
## __enter__
```python
from status import __enter__
```



---
## __exit__
```python
from status import __exit__
```



---
## RichRenderable
```python
from abc import RichRenderable
```

An abstract base class for Rich renderables.

Note that there is no need to extend this class, the intended use is to check if an
object supports the Rich renderable protocol. For example::

    if isinstance(my_object, RichRenderable):
        console.print(my_object)

---
## __subclasshook__
```python
from abc import __subclasshook__
```

Check if this class supports the rich render protocol.

---
## Foo
```python
from abc import Foo
```



---
## __name__
```python
from jupyter import __name__
```



---
## JupyterRenderable
```python
from jupyter import JupyterRenderable
```

A shim to write html to Jupyter notebook.

---
## JupyterMixin
```python
from jupyter import JupyterMixin
```

Add to an Rich renderable to make it render in Jupyter notebook.

---
## _render_segments
```python
from jupyter import _render_segments
```



---
## display
```python
from jupyter import display
```

Render segments to Jupyter.

---
## print
```python
from jupyter import print
```

Proxy for Console print.

---
## __init__
```python
from jupyter import __init__
```



---
## _repr_mimebundle_
```python
from jupyter import _repr_mimebundle_
```



---
## escape
```python
from jupyter import escape
```

Escape html.

---
## __name__
```python
from color_triplet import __name__
```



---
## ColorTriplet
```python
from color_triplet import ColorTriplet
```

The red, green, and blue components of a color.

---
## hex
```python
from color_triplet import hex
```

get the color triplet in CSS style.

---
## rgb
```python
from color_triplet import rgb
```

The color in RGB format.

Returns:
    str: An rgb color, e.g. ``"rgb(100,23,255)"``.

---
## normalized
```python
from color_triplet import normalized
```

Convert components into floats between 0 and 1.

Returns:
    Tuple[float, float, float]: A tuple of three normalized colour components.

---
## __name__
```python
from _tracing import __name__
```

Tracing utils

---
## TagTracer
```python
from _tracing import TagTracer
```



---
## TagTracerSub
```python
from _tracing import TagTracerSub
```



---
## __init__
```python
from _tracing import __init__
```



---
## get
```python
from _tracing import get
```



---
## _format_message
```python
from _tracing import _format_message
```



---
## _processmessage
```python
from _tracing import _processmessage
```



---
## setwriter
```python
from _tracing import setwriter
```



---
## setprocessor
```python
from _tracing import setprocessor
```



---
## __call__
```python
from _tracing import __call__
```



---
## __name__
```python
from _callers import __name__
```

Call loop machinery

---
## _raise_wrapfail
```python
from _callers import _raise_wrapfail
```



---
## _warn_teardown_exception
```python
from _callers import _warn_teardown_exception
```



---
## _multicall
```python
from _callers import _multicall
```

Execute a call into multiple python functions/methods and return the
result(s).

``caller_kwargs`` comes from HookCaller.__call__().

---
## __name__
```python
from _warnings import __name__
```



---
## PluggyWarning
```python
from _warnings import PluggyWarning
```

Base class for all warnings emitted by pluggy.

---
## PluggyTeardownRaisedWarning
```python
from _warnings import PluggyTeardownRaisedWarning
```

A plugin raised an exception during an :ref:`old-style hookwrapper
<old_style_hookwrappers>` teardown.

Such exceptions are not handled by pluggy, and may cause subsequent
teardowns to be executed at unexpected times, or be skipped entirely.

This is an issue in the plugin implementation.

If the exception is unintended, fix the underlying cause.

If the exception is intended, switch to :ref:`new-style hook wrappers
<hookwrappers>`, or use :func:`result.force_exception()
<pluggy.Result.force_exception>` to set the exception instead of raising.

---
## __name__
```python
from _hooks import __name__
```

Internal hook annotation, representation and calling machinery.

---
## HookspecOpts
```python
from _hooks import HookspecOpts
```

Options for a hook specification.

---
## HookimplOpts
```python
from _hooks import HookimplOpts
```

Options for a hook implementation.

---
## HookspecMarker
```python
from _hooks import HookspecMarker
```

Decorator for marking functions as hook specifications.

Instantiate it with a project_name to get a decorator.
Calling :meth:`PluginManager.add_hookspecs` later will discover all marked
functions if the :class:`PluginManager` uses the same project name.

---
## HookimplMarker
```python
from _hooks import HookimplMarker
```

Decorator for marking functions as hook implementations.

Instantiate it with a ``project_name`` to get a decorator.
Calling :meth:`PluginManager.register` later will discover all marked
functions if the :class:`PluginManager` uses the same project name.

---
## normalize_hookimpl_opts
```python
from _hooks import normalize_hookimpl_opts
```



---
## varnames
```python
from _hooks import varnames
```

Return tuple of positional and keywrord argument names for a function,
method, class or callable.

In case of a class, its ``__init__`` method is considered.
For methods the ``self`` parameter is not included.

---
## HookRelay
```python
from _hooks import HookRelay
```

Hook holder object for performing 1:N hook calls where N is the number
of registered plugins.

---
## HookCaller
```python
from _hooks import HookCaller
```

A caller of all registered implementations of a hook specification.

---
## _SubsetHookCaller
```python
from _hooks import _SubsetHookCaller
```

A proxy to another HookCaller which manages calls to all registered
plugins except the ones from remove_plugins.

---
## HookImpl
```python
from _hooks import HookImpl
```

A hook implementation in a :class:`HookCaller`.

---
## HookSpec
```python
from _hooks import HookSpec
```



---
## __init__
```python
from _hooks import __init__
```



---
## __call__
```python
from _hooks import __call__
```

Call the hook.

Only accepts keyword arguments, which should match the hook
specification.

Returns the result(s) of calling all registered plugins, see
:ref:`calling`.

---
## has_spec
```python
from _hooks import has_spec
```



---
## set_specification
```python
from _hooks import set_specification
```



---
## is_historic
```python
from _hooks import is_historic
```

Whether this caller is :ref:`historic <historic>`.

---
## _remove_plugin
```python
from _hooks import _remove_plugin
```



---
## get_hookimpls
```python
from _hooks import get_hookimpls
```

Get all registered hook implementations for this hook.

---
## _add_hookimpl
```python
from _hooks import _add_hookimpl
```

Add an implementation to the callback chain.

---
## __repr__
```python
from _hooks import __repr__
```



---
## _verify_all_args_are_provided
```python
from _hooks import _verify_all_args_are_provided
```



---
## call_historic
```python
from _hooks import call_historic
```

Call the hook with given ``kwargs`` for all registered plugins and
for all plugins which will be registered afterwards, see
:ref:`historic`.

:param result_callback:
    If provided, will be called for each non-``None`` result obtained
    from a hook implementation.

---
## call_extra
```python
from _hooks import call_extra
```

Call the hook with some additional temporarily participating
methods using the specified ``kwargs`` as call parameters, see
:ref:`call_extra`.

---
## _maybe_apply_history
```python
from _hooks import _maybe_apply_history
```

Apply call history to a new hookimpl if it is marked as historic.

---
## _hookimpls
```python
from _hooks import _hookimpls
```



---
## spec
```python
from _hooks import spec
```



---
## _call_history
```python
from _hooks import _call_history
```



---
## setattr_hookspec_opts
```python
from _hooks import setattr_hookspec_opts
```



---
## setattr_hookimpl_opts
```python
from _hooks import setattr_hookimpl_opts
```



---
## __getattr__
```python
from _hooks import __getattr__
```



---
## __name__
```python
from _result import __name__
```

Hook wrapper "result" utilities.

---
## HookCallError
```python
from _result import HookCallError
```

Hook was called incorrectly.

---
## Result
```python
from _result import Result
```

An object used to inspect and set the result in a :ref:`hook wrapper
<hookwrappers>`.

---
## __init__
```python
from _result import __init__
```

:meta private:

---
## excinfo
```python
from _result import excinfo
```

:meta private:

---
## exception
```python
from _result import exception
```

:meta private:

---
## from_call
```python
from _result import from_call
```

:meta private:

---
## force_result
```python
from _result import force_result
```

Force the result(s) to ``result``.

If the hook was marked as a ``firstresult`` a single value should
be set, otherwise set a (modified) list of results. Any exceptions
found during invocation will be deleted.

This overrides any previous result or exception.

---
## force_exception
```python
from _result import force_exception
```

Force the result to fail with ``exception``.

This overrides any previous result or exception.

.. versionadded:: 1.1.0

---
## get_result
```python
from _result import get_result
```

Get the result(s) for this hook call.

If the hook was marked as a ``firstresult`` only a single value
will be returned, otherwise a list of results.

---
## __name__
```python
from _manager import __name__
```



---
## _warn_for_function
```python
from _manager import _warn_for_function
```



---
## PluginValidationError
```python
from _manager import PluginValidationError
```

Plugin failed validation.

:param plugin: The plugin which failed validation.
:param message: Error message.

---
## DistFacade
```python
from _manager import DistFacade
```

Emulate a pkg_resources Distribution

---
## PluginManager
```python
from _manager import PluginManager
```

Core class which manages registration of plugin objects and 1:N hook
calling.

You can register new hooks by calling :meth:`add_hookspecs(module_or_class)
<PluginManager.add_hookspecs>`.

You can register plugin objects (which contain hook implementations) by
calling :meth:`register(plugin) <PluginManager.register>`.

For debugging purposes you can call :meth:`PluginManager.enable_tracing`
which will subsequently send debug information to the trace helper.

:param project_name:
    The short project name. Prefer snake case. Make sure it's unique!

---
## _formatdef
```python
from _manager import _formatdef
```



---
## __init__
```python
from _manager import __init__
```



---
## project_name
```python
from _manager import project_name
```



---
## __getattr__
```python
from _manager import __getattr__
```



---
## __dir__
```python
from _manager import __dir__
```



---
## _hookexec
```python
from _manager import _hookexec
```



---
## register
```python
from _manager import register
```

Register a plugin and return its name.

:param name:
    The name under which to register the plugin. If not specified, a
    name is generated using :func:`get_canonical_name`.

:returns:
    The plugin name. If the name is blocked from registering, returns
    ``None``.

If the plugin is already registered, raises a :exc:`ValueError`.

---
## parse_hookimpl_opts
```python
from _manager import parse_hookimpl_opts
```

Try to obtain a hook implementation from an item with the given name
in the given plugin which is being searched for hook impls.

:returns:
    The parsed hookimpl options, or None to skip the given item.

This method can be overridden by ``PluginManager`` subclasses to
customize how hook implementation are picked up. By default, returns the
options for items decorated with :class:`HookimplMarker`.

---
## unregister
```python
from _manager import unregister
```

Unregister a plugin and all of its hook implementations.

The plugin can be specified either by the plugin object or the plugin
name. If both are specified, they must agree.

Returns the unregistered plugin, or ``None`` if not found.

---
## set_blocked
```python
from _manager import set_blocked
```

Block registrations of the given name, unregister if already registered.

---
## is_blocked
```python
from _manager import is_blocked
```

Return whether the given plugin name is blocked.

---
## unblock
```python
from _manager import unblock
```

Unblocks a name.

Returns whether the name was actually blocked.

---
## add_hookspecs
```python
from _manager import add_hookspecs
```

Add new hook specifications defined in the given ``module_or_class``.

Functions are recognized as hook specifications if they have been
decorated with a matching :class:`HookspecMarker`.

---
## parse_hookspec_opts
```python
from _manager import parse_hookspec_opts
```

Try to obtain a hook specification from an item with the given name
in the given module or class which is being searched for hook specs.

:returns:
    The parsed hookspec options for defining a hook, or None to skip the
    given item.

This method can be overridden by ``PluginManager`` subclasses to
customize how hook specifications are picked up. By default, returns the
options for items decorated with :class:`HookspecMarker`.

---
## get_plugins
```python
from _manager import get_plugins
```

Return a set of all registered plugin objects.

---
## is_registered
```python
from _manager import is_registered
```

Return whether the plugin is already registered.

---
## get_canonical_name
```python
from _manager import get_canonical_name
```

Return a canonical name for a plugin object.

Note that a plugin may be registered under a different name
specified by the caller of :meth:`register(plugin, name) <register>`.
To obtain the name of a registered plugin use :meth:`get_name(plugin)
<get_name>` instead.

---
## get_plugin
```python
from _manager import get_plugin
```

Return the plugin registered under the given name, if any.

---
## has_plugin
```python
from _manager import has_plugin
```

Return whether a plugin with the given name is registered.

---
## get_name
```python
from _manager import get_name
```

Return the name the plugin is registered under, or ``None`` if
is isn't.

---
## _verify_hook
```python
from _manager import _verify_hook
```



---
## check_pending
```python
from _manager import check_pending
```

Verify that all hooks which have not been verified against a
hook specification are optional, otherwise raise
:exc:`PluginValidationError`.

---
## load_setuptools_entrypoints
```python
from _manager import load_setuptools_entrypoints
```

Load modules from querying the specified setuptools ``group``.

:param group:
    Entry point group to load plugins.
:param name:
    If given, loads only plugins with the given ``name``.

:return:
    The number of plugins loaded by this call.

---
## list_plugin_distinfo
```python
from _manager import list_plugin_distinfo
```

Return a list of (plugin, distinfo) pairs for all
setuptools-registered plugins.

---
## list_name_plugin
```python
from _manager import list_name_plugin
```

Return a list of (name, plugin) pairs for all registered plugins.

---
## get_hookcallers
```python
from _manager import get_hookcallers
```

Get all hook callers for the specified plugin.

:returns:
    The hook callers, or ``None`` if ``plugin`` is not registered in
    this plugin manager.

---
## add_hookcall_monitoring
```python
from _manager import add_hookcall_monitoring
```

Add before/after tracing functions for all hooks.

Returns an undo function which, when called, removes the added tracers.

``before(hook_name, hook_impls, kwargs)`` will be called ahead
of all hook calls and receive a hookcaller instance, a list
of HookImpl instances and the keyword arguments for the hook call.

``after(outcome, hook_name, hook_impls, kwargs)`` receives the
same arguments as ``before`` but also a :class:`~pluggy.Result` object
which represents the result of the overall hook call.

---
## enable_tracing
```python
from _manager import enable_tracing
```

Enable tracing of hook calls.

Returns an undo function which, when called, removes the added tracing.

---
## subset_hook_caller
```python
from _manager import subset_hook_caller
```

Return a proxy :class:`~pluggy.HookCaller` instance for the named
method which manages calls to all registered plugins except the ones
from remove_plugins.

---
## traced_hookexec
```python
from _manager import traced_hookexec
```



---
## undo
```python
from _manager import undo
```



---
## before
```python
from _manager import before
```



---
## after
```python
from _manager import after
```



---
## __name__
```python
from _tight_layout import __name__
```

Routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels, Axes
titles and offsetboxes that are anchored to Axes are currently considered.

Internally, this module assumes that the margins (left margin, etc.) which are
differences between ``Axes.get_tightbbox`` and ``Axes.bbox`` are independent of
Axes position. This may fail if ``Axes.adjustable`` is ``datalim`` as well as
such cases as when left or right margin are affected by xlabel.

---
## _auto_adjust_subplotpars
```python
from _tight_layout import _auto_adjust_subplotpars
```

Return a dict of subplot parameters to adjust spacing between subplots
or ``None`` if resulting Axes would have zero height or width.

Note that this function ignores geometry information of subplot itself, but
uses what is given by the *shape* and *subplot_list* parameters.  Also, the
results could be incorrect if some subplots have ``adjustable=datalim``.

Parameters
----------
shape : tuple[int, int]
    Number of rows and columns of the grid.
span_pairs : list[tuple[slice, slice]]
    List of rowspans and colspans occupied by each subplot.
subplot_list : list of subplots
    List of subplots that will be used to calculate optimal subplot_params.
pad : float
    Padding between the figure edge and the edges of subplots, as a
    fraction of the font size.
h_pad, w_pad : float
    Padding (height/width) between edges of adjacent subplots, as a
    fraction of the font size.  Defaults to *pad*.
rect : tuple
    (left, bottom, right, top), default: None.

---
## get_subplotspec_list
```python
from _tight_layout import get_subplotspec_list
```

Return a list of subplotspec from the given list of Axes.

For an instance of Axes that does not support subplotspec, None is inserted
in the list.

If grid_spec is given, None is inserted for those not from the given
grid_spec.

---
## get_tight_layout_figure
```python
from _tight_layout import get_tight_layout_figure
```

Return subplot parameters for tight-layouted-figure with specified padding.

Parameters
----------
fig : Figure
axes_list : list of Axes
subplotspec_list : list of `.SubplotSpec`
    The subplotspecs of each Axes.
renderer : renderer
pad : float
    Padding between the figure edge and the edges of subplots, as a
    fraction of the font size.
h_pad, w_pad : float
    Padding (height/width) between edges of adjacent subplots.  Defaults to
    *pad*.
rect : tuple (left, bottom, right, top), default: None.
    rectangle in normalized figure coordinates
    that the whole subplots area (including labels) will fit into.
    Defaults to using the entire figure.

Returns
-------
subplotspec or None
    subplotspec kwargs to be passed to `.Figure.subplots_adjust` or
    None if tight_layout could not be accomplished.

---
## __name__
```python
from hatch import __name__
```

Contains classes for generating hatch patterns.

---
## HatchPatternBase
```python
from hatch import HatchPatternBase
```

The base class for a hatch pattern.

---
## HorizontalHatch
```python
from hatch import HorizontalHatch
```



---
## VerticalHatch
```python
from hatch import VerticalHatch
```



---
## NorthEastHatch
```python
from hatch import NorthEastHatch
```



---
## SouthEastHatch
```python
from hatch import SouthEastHatch
```



---
## Shapes
```python
from hatch import Shapes
```



---
## Circles
```python
from hatch import Circles
```



---
## SmallCircles
```python
from hatch import SmallCircles
```



---
## LargeCircles
```python
from hatch import LargeCircles
```



---
## SmallFilledCircles
```python
from hatch import SmallFilledCircles
```



---
## Stars
```python
from hatch import Stars
```



---
## _validate_hatch_pattern
```python
from hatch import _validate_hatch_pattern
```



---
## get_path
```python
from hatch import get_path
```

Given a hatch specifier, *hatchpattern*, generates Path to render
the hatch in a unit square.  *density* is the number of lines per
unit square.

---
## __init__
```python
from hatch import __init__
```



---
## set_vertices_and_codes
```python
from hatch import set_vertices_and_codes
```



---
## __name__
```python
from transforms import __name__
```

transforms.py is for shape-preserving functions.

---
## _make_str_method
```python
from transforms import _make_str_method
```

Generate a ``__str__`` method for a `.Transform` subclass.

After ::

    class T:
        __str__ = _make_str_method("attr", key="other")

``str(T(...))`` will be

.. code-block:: text

    {type(T).__name__}(
        {self.attr},
        key={self.other})

---
## TransformNode
```python
from transforms import TransformNode
```

The base class for anything that participates in the transform tree
and needs to invalidate its parents or be invalidated.  This includes
classes that are not really transforms, such as bounding boxes, since some
transforms depend on bounding boxes to compute their values.

---
## BboxBase
```python
from transforms import BboxBase
```

The base class of all bounding boxes.

This class is immutable; `Bbox` is a mutable subclass.

The canonical representation is as two points, with no
restrictions on their ordering.  Convenience properties are
provided to get the left, bottom, right and top edges and width
and height, but these are not stored explicitly.

---
## Bbox
```python
from transforms import Bbox
```

A mutable bounding box.

Examples
--------
**Create from known bounds**

The default constructor takes the boundary "points" ``[[xmin, ymin],
[xmax, ymax]]``.

    >>> Bbox([[1, 1], [3, 7]])
    Bbox([[1.0, 1.0], [3.0, 7.0]])

Alternatively, a Bbox can be created from the flattened points array, the
so-called "extents" ``(xmin, ymin, xmax, ymax)``

    >>> Bbox.from_extents(1, 1, 3, 7)
    Bbox([[1.0, 1.0], [3.0, 7.0]])

or from the "bounds" ``(xmin, ymin, width, height)``.

    >>> Bbox.from_bounds(1, 1, 2, 6)
    Bbox([[1.0, 1.0], [3.0, 7.0]])

**Create from collections of points**

The "empty" object for accumulating Bboxs is the null bbox, which is a
stand-in for the empty set.

    >>> Bbox.null()
    Bbox([[inf, inf], [-inf, -inf]])

Adding points to the null bbox will give you the bbox of those points.

    >>> box = Bbox.null()
    >>> box.update_from_data_xy([[1, 1]])
    >>> box
    Bbox([[1.0, 1.0], [1.0, 1.0]])
    >>> box.update_from_data_xy([[2, 3], [3, 2]], ignore=False)
    >>> box
    Bbox([[1.0, 1.0], [3.0, 3.0]])

Setting ``ignore=True`` is equivalent to starting over from a null bbox.

    >>> box.update_from_data_xy([[1, 1]], ignore=True)
    >>> box
    Bbox([[1.0, 1.0], [1.0, 1.0]])

.. warning::

    It is recommended to always specify ``ignore`` explicitly.  If not, the
    default value of ``ignore`` can be changed at any time by code with
    access to your Bbox, for example using the method `~.Bbox.ignore`.

**Properties of the ``null`` bbox**

.. note::

    The current behavior of `Bbox.null()` may be surprising as it does
    not have all of the properties of the "empty set", and as such does
    not behave like a "zero" object in the mathematical sense. We may
    change that in the future (with a deprecation period).

The null bbox is the identity for intersections

    >>> Bbox.intersection(Bbox([[1, 1], [3, 7]]), Bbox.null())
    Bbox([[1.0, 1.0], [3.0, 7.0]])

except with itself, where it returns the full space.

    >>> Bbox.intersection(Bbox.null(), Bbox.null())
    Bbox([[-inf, -inf], [inf, inf]])

A union containing null will always return the full space (not the other
set!)

    >>> Bbox.union([Bbox([[0, 0], [0, 0]]), Bbox.null()])
    Bbox([[-inf, -inf], [inf, inf]])

---
## TransformedBbox
```python
from transforms import TransformedBbox
```

A `Bbox` that is automatically transformed by a given
transform.  When either the child bounding box or transform
changes, the bounds of this bbox will update accordingly.

---
## LockableBbox
```python
from transforms import LockableBbox
```

A `Bbox` where some elements may be locked at certain values.

When the child bounding box changes, the bounds of this bbox will update
accordingly with the exception of the locked elements.

---
## Transform
```python
from transforms import Transform
```

The base class of all `TransformNode` instances that
actually perform a transformation.

All non-affine transformations should be subclasses of this class.
New affine transformations should be subclasses of `Affine2D`.

Subclasses of this class should override the following members (at
minimum):

- :attr:`input_dims`
- :attr:`output_dims`
- :meth:`transform`
- :meth:`inverted` (if an inverse exists)

The following attributes may be overridden if the default is unsuitable:

- :attr:`is_separable` (defaults to True for 1D -> 1D transforms, False
  otherwise)
- :attr:`has_inverse` (defaults to True if :meth:`inverted` is overridden,
  False otherwise)

If the transform needs to do something non-standard with
`matplotlib.path.Path` objects, such as adding curves
where there were once line segments, it should override:

- :meth:`transform_path`

---
## TransformWrapper
```python
from transforms import TransformWrapper
```

A helper class that holds a single child transform and acts
equivalently to it.

This is useful if a node of the transform tree must be replaced at
run time with a transform of a different type.  This class allows
that replacement to correctly trigger invalidation.

`TransformWrapper` instances must have the same input and output dimensions
during their entire lifetime, so the child transform may only be replaced
with another child transform of the same dimensions.

---
## AffineBase
```python
from transforms import AffineBase
```

The base class of all affine transformations of any number of dimensions.

---
## Affine2DBase
```python
from transforms import Affine2DBase
```

The base class of all 2D affine transformations.

2D affine transformations are performed using a 3x3 numpy array::

    a c e
    b d f
    0 0 1

This class provides the read-only interface.  For a mutable 2D
affine transformation, use `Affine2D`.

Subclasses of this class will generally only need to override a
constructor and `~.Transform.get_matrix` that generates a custom 3x3 matrix.

---
## Affine2D
```python
from transforms import Affine2D
```

A mutable 2D affine transformation.

---
## IdentityTransform
```python
from transforms import IdentityTransform
```

A special class that does one thing, the identity transform, in a
fast way.

---
## _BlendedMixin
```python
from transforms import _BlendedMixin
```

Common methods for `BlendedGenericTransform` and `BlendedAffine2D`.

---
## BlendedGenericTransform
```python
from transforms import BlendedGenericTransform
```

A "blended" transform uses one transform for the *x*-direction, and
another transform for the *y*-direction.

This "generic" version can handle any given child transform in the
*x*- and *y*-directions.

---
## BlendedAffine2D
```python
from transforms import BlendedAffine2D
```

A "blended" transform uses one transform for the *x*-direction, and
another transform for the *y*-direction.

This version is an optimization for the case where both child
transforms are of type `Affine2DBase`.

---
## blended_transform_factory
```python
from transforms import blended_transform_factory
```

Create a new "blended" transform using *x_transform* to transform
the *x*-axis and *y_transform* to transform the *y*-axis.

A faster version of the blended transform is returned for the case
where both child transforms are affine.

---
## CompositeGenericTransform
```python
from transforms import CompositeGenericTransform
```

A composite transform formed by applying transform *a* then
transform *b*.

This "generic" version can handle any two arbitrary
transformations.

---
## CompositeAffine2D
```python
from transforms import CompositeAffine2D
```

A composite transform formed by applying transform *a* then transform *b*.

This version is an optimization that handles the case where both *a*
and *b* are 2D affines.

---
## composite_transform_factory
```python
from transforms import composite_transform_factory
```

Create a new composite transform that is the result of applying
transform a then transform b.

Shortcut versions of the blended transform are provided for the
case where both child transforms are affine, or one or the other
is the identity transform.

Composite transforms may also be created using the '+' operator,
e.g.::

  c = a + b

---
## BboxTransform
```python
from transforms import BboxTransform
```

`BboxTransform` linearly transforms points from one `Bbox` to another.

---
## BboxTransformTo
```python
from transforms import BboxTransformTo
```

`BboxTransformTo` is a transformation that linearly transforms points from
the unit bounding box to a given `Bbox`.

---
## BboxTransformToMaxOnly
```python
from transforms import BboxTransformToMaxOnly
```

`BboxTransformToMaxOnly` is a transformation that linearly transforms points from
the unit bounding box to a given `Bbox` with a fixed upper left of (0, 0).

---
## BboxTransformFrom
```python
from transforms import BboxTransformFrom
```

`BboxTransformFrom` linearly transforms points from a given `Bbox` to the
unit bounding box.

---
## ScaledTranslation
```python
from transforms import ScaledTranslation
```

A transformation that translates by *xt* and *yt*, after *xt* and *yt*
have been transformed by *scale_trans*.

---
## AffineDeltaTransform
```python
from transforms import AffineDeltaTransform
```

A transform wrapper for transforming displacements between pairs of points.

This class is intended to be used to transform displacements ("position
deltas") between pairs of points (e.g., as the ``offset_transform``
of `.Collection`\s): given a transform ``t`` such that ``t =
AffineDeltaTransform(t) + offset``, ``AffineDeltaTransform``
satisfies ``AffineDeltaTransform(a - b) == AffineDeltaTransform(a) -
AffineDeltaTransform(b)``.

This is implemented by forcing the offset components of the transform
matrix to zero.

This class is experimental as of 3.3, and the API may change.

---
## TransformedPath
```python
from transforms import TransformedPath
```

A `TransformedPath` caches a non-affine transformed copy of the
`~.path.Path`.  This cached copy is automatically updated when the
non-affine part of the transform changes.

.. note::

    Paths are considered immutable by this class. Any update to the
    path's vertices/codes will not trigger a transform recomputation.

---
## TransformedPatchPath
```python
from transforms import TransformedPatchPath
```

A `TransformedPatchPath` caches a non-affine transformed copy of the
`~.patches.Patch`. This cached copy is automatically updated when the
non-affine part of the transform or the patch changes.

---
## nonsingular
```python
from transforms import nonsingular
```

Modify the endpoints of a range as needed to avoid singularities.

Parameters
----------
vmin, vmax : float
    The initial endpoints.
expander : float, default: 0.001
    Fractional amount by which *vmin* and *vmax* are expanded if
    the original interval is too small, based on *tiny*.
tiny : float, default: 1e-15
    Threshold for the ratio of the interval to the maximum absolute
    value of its endpoints.  If the interval is smaller than
    this, it will be expanded.  This value should be around
    1e-15 or larger; otherwise the interval will be approaching
    the double precision resolution limit.
increasing : bool, default: True
    If True, swap *vmin*, *vmax* if *vmin* > *vmax*.

Returns
-------
vmin, vmax : float
    Endpoints, expanded and/or swapped if necessary.
    If either input is inf or NaN, or if both inputs are 0 or very
    close to zero, it returns -*expander*, *expander*.

---
## interval_contains
```python
from transforms import interval_contains
```

Check, inclusively, whether an interval includes a given value.

Parameters
----------
interval : (float, float)
    The endpoints of the interval.
val : float
    Value to check is within interval.

Returns
-------
bool
    Whether *val* is within the *interval*.

---
## _interval_contains_close
```python
from transforms import _interval_contains_close
```

Check, inclusively, whether an interval includes a given value, with the
interval expanded by a small tolerance to admit floating point errors.

Parameters
----------
interval : (float, float)
    The endpoints of the interval.
val : float
    Value to check is within interval.
rtol : float, default: 1e-10
    Relative tolerance slippage allowed outside of the interval.
    For an interval ``[a, b]``, values
    ``a - rtol * (b - a) <= val <= b + rtol * (b - a)`` are considered
    inside the interval.

Returns
-------
bool
    Whether *val* is within the *interval* (with tolerance).

---
## interval_contains_open
```python
from transforms import interval_contains_open
```

Check, excluding endpoints, whether an interval includes a given value.

Parameters
----------
interval : (float, float)
    The endpoints of the interval.
val : float
    Value to check is within interval.

Returns
-------
bool
    Whether *val* is within the *interval*.

---
## offset_copy
```python
from transforms import offset_copy
```

Return a new transform with an added offset.

Parameters
----------
trans : `Transform` subclass
    Any transform, to which offset will be applied.
fig : `~matplotlib.figure.Figure`, default: None
    Current figure. It can be None if *units* are 'dots'.
x, y : float, default: 0.0
    The offset to apply.
units : {'inches', 'points', 'dots'}, default: 'inches'
    Units of the offset.

Returns
-------
`Transform` subclass
    Transform with applied offset.

---
## strrepr
```python
from transforms import strrepr
```



---
## __init__
```python
from transforms import __init__
```



---
## __getstate__
```python
from transforms import __getstate__
```



---
## __setstate__
```python
from transforms import __setstate__
```



---
## __copy__
```python
from transforms import __copy__
```



---
## invalidate
```python
from transforms import invalidate
```



---
## _invalidate_internal
```python
from transforms import _invalidate_internal
```



---
## set_children
```python
from transforms import set_children
```

Set the children of the transform, to let the invalidation
system know which transforms can invalidate this transform.
Should be called from the constructor of any transforms that
depend on other transforms.

---
## frozen
```python
from transforms import frozen
```



---
## __array__
```python
from transforms import __array__
```



---
## x0
```python
from transforms import x0
```



---
## y0
```python
from transforms import y0
```



---
## x1
```python
from transforms import x1
```



---
## y1
```python
from transforms import y1
```



---
## p0
```python
from transforms import p0
```



---
## p1
```python
from transforms import p1
```



---
## xmin
```python
from transforms import xmin
```

The left edge of the bounding box.

---
## ymin
```python
from transforms import ymin
```

The bottom edge of the bounding box.

---
## xmax
```python
from transforms import xmax
```

The right edge of the bounding box.

---
## ymax
```python
from transforms import ymax
```

The top edge of the bounding box.

---
## min
```python
from transforms import min
```

The bottom-left corner of the bounding box.

---
## max
```python
from transforms import max
```

The top-right corner of the bounding box.

---
## intervalx
```python
from transforms import intervalx
```



---
## intervaly
```python
from transforms import intervaly
```



---
## width
```python
from transforms import width
```

The (signed) width of the bounding box.

---
## height
```python
from transforms import height
```

The (signed) height of the bounding box.

---
## size
```python
from transforms import size
```

The (signed) width and height of the bounding box.

---
## bounds
```python
from transforms import bounds
```



---
## extents
```python
from transforms import extents
```

Return (:attr:`x0`, :attr:`y0`, :attr:`x1`, :attr:`y1`).

---
## get_points
```python
from transforms import get_points
```



---
## containsx
```python
from transforms import containsx
```

Return whether *x* is in the closed (:attr:`x0`, :attr:`x1`) interval.

---
## containsy
```python
from transforms import containsy
```

Return whether *y* is in the closed (:attr:`y0`, :attr:`y1`) interval.

---
## contains
```python
from transforms import contains
```



---
## overlaps
```python
from transforms import overlaps
```

Return whether this bounding box overlaps with the other bounding box.

Parameters
----------
other : `.BboxBase`

---
## fully_containsx
```python
from transforms import fully_containsx
```

Return whether *x* is in the open (:attr:`x0`, :attr:`x1`) interval.

---
## fully_containsy
```python
from transforms import fully_containsy
```

Return whether *y* is in the open (:attr:`y0`, :attr:`y1`) interval.

---
## fully_contains
```python
from transforms import fully_contains
```



---
## fully_overlaps
```python
from transforms import fully_overlaps
```

Return whether this bounding box overlaps with the other bounding box,
not including the edges.

Parameters
----------
other : `.BboxBase`

---
## transformed
```python
from transforms import transformed
```

Construct a `Bbox` by statically transforming this one by *transform*.

---
## anchored
```python
from transforms import anchored
```

Return a copy of the `Bbox` anchored to *c* within *container*.

Parameters
----------
c : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
    Either an (*x*, *y*) pair of relative coordinates (0 is left or
    bottom, 1 is right or top), 'C' (center), or a cardinal direction
    ('SW', southwest, is bottom left, etc.).
container : `Bbox`, optional
    The box within which the `Bbox` is positioned.

See Also
--------
.Axes.set_anchor

---
## shrunk
```python
from transforms import shrunk
```

Return a copy of the `Bbox`, shrunk by the factor *mx*
in the *x* direction and the factor *my* in the *y* direction.
The lower left corner of the box remains unchanged.  Normally
*mx* and *my* will be less than 1, but this is not enforced.

---
## shrunk_to_aspect
```python
from transforms import shrunk_to_aspect
```

Return a copy of the `Bbox`, shrunk so that it is as
large as it can be while having the desired aspect ratio,
*box_aspect*.  If the box coordinates are relative (i.e.
fractions of a larger box such as a figure) then the
physical aspect ratio of that figure is specified with
*fig_aspect*, so that *box_aspect* can also be given as a
ratio of the absolute dimensions, not the relative dimensions.

---
## splitx
```python
from transforms import splitx
```

Return a list of new `Bbox` objects formed by splitting the original
one with vertical lines at fractional positions given by *args*.

---
## splity
```python
from transforms import splity
```

Return a list of new `Bbox` objects formed by splitting the original
one with horizontal lines at fractional positions given by *args*.

---
## count_contains
```python
from transforms import count_contains
```

Count the number of vertices contained in the `Bbox`.
Any vertices with a non-finite x or y value are ignored.

Parameters
----------
vertices : (N, 2) array

---
## count_overlaps
```python
from transforms import count_overlaps
```

Count the number of bounding boxes that overlap this one.

Parameters
----------
bboxes : sequence of `.BboxBase`

---
## expanded
```python
from transforms import expanded
```

Construct a `Bbox` by expanding this one around its center by the
factors *sw* and *sh*.

---
## padded
```python
from transforms import padded
```

Construct a `Bbox` by padding this one on all four sides.

Parameters
----------
w_pad : float
    Width pad
h_pad : float, optional
    Height pad.  Defaults to *w_pad*.

---
## translated
```python
from transforms import translated
```

Construct a `Bbox` by translating this one by *tx* and *ty*.

---
## corners
```python
from transforms import corners
```

Return the corners of this rectangle as an array of points.

Specifically, this returns the array
``[[x0, y0], [x0, y1], [x1, y0], [x1, y1]]``.

---
## rotated
```python
from transforms import rotated
```

Return the axes-aligned bounding box that bounds the result of rotating
this `Bbox` by an angle of *radians*.

---
## union
```python
from transforms import union
```

Return a `Bbox` that contains all of the given *bboxes*.

---
## intersection
```python
from transforms import intersection
```

Return the intersection of *bbox1* and *bbox2* if they intersect, or
None if they don't.

---
## unit
```python
from transforms import unit
```

Create a new unit `Bbox` from (0, 0) to (1, 1).

---
## null
```python
from transforms import null
```

Create a new null `Bbox` from (inf, inf) to (-inf, -inf).

---
## from_bounds
```python
from transforms import from_bounds
```

Create a new `Bbox` from *x0*, *y0*, *width* and *height*.

*width* and *height* may be negative.

---
## from_extents
```python
from transforms import from_extents
```

Create a new Bbox from *left*, *bottom*, *right* and *top*.

The *y*-axis increases upwards.

Parameters
----------
left, bottom, right, top : float
    The four extents of the bounding box.
minpos : float or None
    If this is supplied, the Bbox will have a minimum positive value
    set. This is useful when dealing with logarithmic scales and other
    scales where negative bounds result in floating point errors.

---
## __format__
```python
from transforms import __format__
```



---
## __str__
```python
from transforms import __str__
```



---
## __repr__
```python
from transforms import __repr__
```



---
## ignore
```python
from transforms import ignore
```

Set whether the existing bounds of the box should be ignored
by subsequent calls to :meth:`update_from_data_xy`.

value : bool
    - When ``True``, subsequent calls to `update_from_data_xy` will
      ignore the existing bounds of the `Bbox`.
    - When ``False``, subsequent calls to `update_from_data_xy` will
      include the existing bounds of the `Bbox`.

---
## update_from_path
```python
from transforms import update_from_path
```

Update the bounds of the `Bbox` to contain the vertices of the
provided path. After updating, the bounds will have positive *width*
and *height*; *x0* and *y0* will be the minimal values.

Parameters
----------
path : `~matplotlib.path.Path`
ignore : bool, optional
   - When ``True``, ignore the existing bounds of the `Bbox`.
   - When ``False``, include the existing bounds of the `Bbox`.
   - When ``None``, use the last value passed to :meth:`ignore`.
updatex, updatey : bool, default: True
    When ``True``, update the x/y values.

---
## update_from_data_x
```python
from transforms import update_from_data_x
```

Update the x-bounds of the `Bbox` based on the passed in data. After
updating, the bounds will have positive *width*, and *x0* will be the
minimal value.

Parameters
----------
x : `~numpy.ndarray`
    Array of x-values.
ignore : bool, optional
   - When ``True``, ignore the existing bounds of the `Bbox`.
   - When ``False``, include the existing bounds of the `Bbox`.
   - When ``None``, use the last value passed to :meth:`ignore`.

---
## update_from_data_y
```python
from transforms import update_from_data_y
```

Update the y-bounds of the `Bbox` based on the passed in data. After
updating, the bounds will have positive *height*, and *y0* will be the
minimal value.

Parameters
----------
y : `~numpy.ndarray`
    Array of y-values.
ignore : bool, optional
    - When ``True``, ignore the existing bounds of the `Bbox`.
    - When ``False``, include the existing bounds of the `Bbox`.
    - When ``None``, use the last value passed to :meth:`ignore`.

---
## update_from_data_xy
```python
from transforms import update_from_data_xy
```

Update the `Bbox` bounds based on the passed in *xy* coordinates.

After updating, the bounds will have positive *width* and *height*;
*x0* and *y0* will be the minimal values.

Parameters
----------
xy : (N, 2) array-like
    The (x, y) coordinates.
ignore : bool, optional
    - When ``True``, ignore the existing bounds of the `Bbox`.
    - When ``False``, include the existing bounds of the `Bbox`.
    - When ``None``, use the last value passed to :meth:`ignore`.
updatex, updatey : bool, default: True
     When ``True``, update the x/y values.

---
## minpos
```python
from transforms import minpos
```



---
## minposx
```python
from transforms import minposx
```



---
## minposy
```python
from transforms import minposy
```



---
## set_points
```python
from transforms import set_points
```

Set the points of the bounding box directly from an array of the form
``[[x0, y0], [x1, y1]]``.  No error checking is performed, as this
method is mainly for internal use.

---
## set
```python
from transforms import set
```

Set this transformation from the frozen copy of another
`Affine2DBase` object.

---
## mutated
```python
from transforms import mutated
```

Return whether the bbox has changed since init.

---
## mutatedx
```python
from transforms import mutatedx
```

Return whether the x-limits have changed since init.

---
## mutatedy
```python
from transforms import mutatedy
```

Return whether the y-limits have changed since init.

---
## locked_x0
```python
from transforms import locked_x0
```



---
## locked_y0
```python
from transforms import locked_y0
```



---
## locked_x1
```python
from transforms import locked_x1
```



---
## locked_y1
```python
from transforms import locked_y1
```



---
## __init_subclass__
```python
from transforms import __init_subclass__
```



---
## __add__
```python
from transforms import __add__
```

Compose two transforms together so that *self* is followed by *other*.

``A + B`` returns a transform ``C`` so that
``C.transform(x) == B.transform(A.transform(x))``.

---
## _iter_break_from_left_to_right
```python
from transforms import _iter_break_from_left_to_right
```



---
## depth
```python
from transforms import depth
```



---
## contains_branch
```python
from transforms import contains_branch
```



---
## contains_branch_seperately
```python
from transforms import contains_branch_seperately
```



---
## __sub__
```python
from transforms import __sub__
```

Compose *self* with the inverse of *other*, cancelling identical terms
if any::

    # In general:
    A - B == A + B.inverted()
    # (but see note regarding frozen transforms below).

    # If A "ends with" B (i.e. A == A' + B for some A') we can cancel
    # out B:
    (A' + B) - B == A'

    # Likewise, if B "starts with" A (B = A + B'), we can cancel out A:
    A - (A + B') == B'.inverted() == B'^-1

Cancellation (rather than naively returning ``A + B.inverted()``) is
important for multiple reasons:

- It avoids floating-point inaccuracies when computing the inverse of
  B: ``B - B`` is guaranteed to cancel out exactly (resulting in the
  identity transform), whereas ``B + B.inverted()`` may differ by a
  small epsilon.
- ``B.inverted()`` always returns a frozen transform: if one computes
  ``A + B + B.inverted()`` and later mutates ``B``, then
  ``B.inverted()`` won't be updated and the last two terms won't cancel
  out anymore; on the other hand, ``A + B - B`` will always be equal to
  ``A`` even if ``B`` is mutated.

---
## transform
```python
from transforms import transform
```



---
## transform_affine
```python
from transforms import transform_affine
```



---
## transform_non_affine
```python
from transforms import transform_non_affine
```



---
## transform_bbox
```python
from transforms import transform_bbox
```

Transform the given bounding box.

For smarter transforms including caching (a common requirement in
Matplotlib), see `TransformedBbox`.

---
## get_affine
```python
from transforms import get_affine
```



---
## get_matrix
```python
from transforms import get_matrix
```



---
## transform_point
```python
from transforms import transform_point
```

Return a transformed point.

This function is only kept for backcompatibility; the more general
`.transform` method is capable of transforming both a list of points
and a single point.

The point is given as a sequence of length :attr:`input_dims`.
The transformed point is returned as a sequence of length
:attr:`output_dims`.

---
## transform_path
```python
from transforms import transform_path
```



---
## transform_path_affine
```python
from transforms import transform_path_affine
```



---
## transform_path_non_affine
```python
from transforms import transform_path_non_affine
```



---
## transform_angles
```python
from transforms import transform_angles
```

Transform a set of angles anchored at specific locations.

Parameters
----------
angles : (N,) array-like
    The angles to transform.
pts : (N, 2) array-like
    The points where the angles are anchored.
radians : bool, default: False
    Whether *angles* are radians or degrees.
pushoff : float
    For each point in *pts* and angle in *angles*, the transformed
    angle is computed by transforming a segment of length *pushoff*
    starting at that point and making that angle relative to the
    horizontal axis, and measuring the angle between the horizontal
    axis and the transformed segment.

Returns
-------
(N,) array

---
## inverted
```python
from transforms import inverted
```



---
## __eq__
```python
from transforms import __eq__
```



---
## is_separable
```python
from transforms import is_separable
```



---
## to_values
```python
from transforms import to_values
```

Return the values of the matrix as an ``(a, b, c, d, e, f)`` tuple.

---
## from_values
```python
from transforms import from_values
```

Create a new Affine2D instance from the given values::

  a c e
  b d f
  0 0 1

.

---
## set_matrix
```python
from transforms import set_matrix
```

Set the underlying transformation matrix from a 3x3 array::

  a c e
  b d f
  0 0 1

.

---
## clear
```python
from transforms import clear
```

Reset the underlying matrix to the identity transform.

---
## rotate
```python
from transforms import rotate
```

Add a rotation (in radians) to this transform in place.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## rotate_deg
```python
from transforms import rotate_deg
```

Add a rotation (in degrees) to this transform in place.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## rotate_around
```python
from transforms import rotate_around
```

Add a rotation (in radians) around the point (x, y) in place.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## rotate_deg_around
```python
from transforms import rotate_deg_around
```

Add a rotation (in degrees) around the point (x, y) in place.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## translate
```python
from transforms import translate
```

Add a translation in place.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## scale
```python
from transforms import scale
```

Add a scale in place.

If *sy* is None, the same scale is applied in both the *x*- and
*y*-directions.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## skew
```python
from transforms import skew
```

Add a skew in place.

*xShear* and *yShear* are the shear angles along the *x*- and
*y*-axes, respectively, in radians.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## skew_deg
```python
from transforms import skew_deg
```

Add a skew in place.

*xShear* and *yShear* are the shear angles along the *x*- and
*y*-axes, respectively, in degrees.

Returns *self*, so this method can easily be chained with more
calls to :meth:`rotate`, :meth:`rotate_deg`, :meth:`translate`
and :meth:`scale`.

---
## _revalidate
```python
from transforms import _revalidate
```



---
## get_transformed_points_and_affine
```python
from transforms import get_transformed_points_and_affine
```

Return a copy of the child path, with the non-affine part of
the transform already applied, along with the affine part of
the path necessary to complete the transformation.  Unlike
:meth:`get_transformed_path_and_affine`, no interpolation will
be performed.

---
## get_transformed_path_and_affine
```python
from transforms import get_transformed_path_and_affine
```

Return a copy of the child path, with the non-affine part of
the transform already applied, along with the affine part of
the path necessary to complete the transformation.

---
## get_fully_transformed_path
```python
from transforms import get_fully_transformed_path
```

Return a fully-transformed copy of the child path.

---
## _check
```python
from transforms import _check
```



---
## __name__
```python
from legend_handler import __name__
```

Default legend handlers.

.. important::

    This is a low-level legend API, which most end users do not need.

    We recommend that you are familiar with the :ref:`legend guide
    <legend_guide>` before reading this documentation.

Legend handlers are expected to be a callable object with a following
signature::

    legend_handler(legend, orig_handle, fontsize, handlebox)

Where *legend* is the legend itself, *orig_handle* is the original
plot, *fontsize* is the fontsize in pixels, and *handlebox* is an
`.OffsetBox` instance. Within the call, you should create relevant
artists (using relevant properties from the *legend* and/or
*orig_handle*) and add them into the *handlebox*. The artists need to
be scaled according to the *fontsize* (note that the size is in pixels,
i.e., this is dpi-scaled value).

This module includes definition of several legend handler classes
derived from the base class (HandlerBase) with the following method::

    def legend_artist(self, legend, orig_handle, fontsize, handlebox)

---
## update_from_first_child
```python
from legend_handler import update_from_first_child
```



---
## HandlerBase
```python
from legend_handler import HandlerBase
```

A base class for default legend handlers.

The derived classes are meant to override *create_artists* method, which
has the following signature::

  def create_artists(self, legend, orig_handle,
                     xdescent, ydescent, width, height, fontsize,
                     trans):

The overridden method needs to create artists of the given
transform that fits in the given dimension (xdescent, ydescent,
width, height) that are scaled by fontsize if necessary.

---
## HandlerNpoints
```python
from legend_handler import HandlerNpoints
```

A legend handler that shows *numpoints* points in the legend entry.

---
## HandlerNpointsYoffsets
```python
from legend_handler import HandlerNpointsYoffsets
```

A legend handler that shows *numpoints* in the legend, and allows them to
be individually offset in the y-direction.

---
## HandlerLine2DCompound
```python
from legend_handler import HandlerLine2DCompound
```

Original handler for `.Line2D` instances, that relies on combining
a line-only with a marker-only artist.  May be deprecated in the future.

---
## HandlerLine2D
```python
from legend_handler import HandlerLine2D
```

Handler for `.Line2D` instances.

See Also
--------
HandlerLine2DCompound : An earlier handler implementation, which used one
                        artist for the line and another for the marker(s).

---
## HandlerPatch
```python
from legend_handler import HandlerPatch
```

Handler for `.Patch` instances.

---
## HandlerStepPatch
```python
from legend_handler import HandlerStepPatch
```

Handler for `~.matplotlib.patches.StepPatch` instances.

---
## HandlerLineCollection
```python
from legend_handler import HandlerLineCollection
```

Handler for `.LineCollection` instances.

---
## HandlerRegularPolyCollection
```python
from legend_handler import HandlerRegularPolyCollection
```

Handler for `.RegularPolyCollection`\s.

---
## HandlerPathCollection
```python
from legend_handler import HandlerPathCollection
```

Handler for `.PathCollection`\s, which are used by `~.Axes.scatter`.

---
## HandlerCircleCollection
```python
from legend_handler import HandlerCircleCollection
```

Handler for `.CircleCollection`\s.

---
## HandlerErrorbar
```python
from legend_handler import HandlerErrorbar
```

Handler for Errorbars.

---
## HandlerStem
```python
from legend_handler import HandlerStem
```

Handler for plots produced by `~.Axes.stem`.

---
## HandlerTuple
```python
from legend_handler import HandlerTuple
```

Handler for Tuple.

---
## HandlerPolyCollection
```python
from legend_handler import HandlerPolyCollection
```

Handler for `.PolyCollection` used in `~.Axes.fill_between` and
`~.Axes.stackplot`.

---
## __init__
```python
from legend_handler import __init__
```

Parameters
----------
ndivide : int or None, default: 1
    The number of sections to divide the legend area into.  If None,
    use the length of the input tuple.
pad : float, default: :rc:`legend.borderpad`
    Padding in units of fraction of font size.
**kwargs
    Keyword arguments forwarded to `.HandlerBase`.

---
## _update_prop
```python
from legend_handler import _update_prop
```



---
## _default_update_prop
```python
from legend_handler import _default_update_prop
```



---
## update_prop
```python
from legend_handler import update_prop
```



---
## adjust_drawing_area
```python
from legend_handler import adjust_drawing_area
```



---
## legend_artist
```python
from legend_handler import legend_artist
```

Return the artist that this HandlerBase generates for the given
original artist/handle.

Parameters
----------
legend : `~matplotlib.legend.Legend`
    The legend for which these legend artists are being created.
orig_handle : :class:`matplotlib.artist.Artist` or similar
    The object for which these legend artists are being created.
fontsize : int
    The fontsize in pixels. The artists being created should
    be scaled according to the given fontsize.
handlebox : `~matplotlib.offsetbox.OffsetBox`
    The box which has been created to hold this legend entry's
    artists. Artists created in the `legend_artist` method must
    be added to this handlebox inside this method.

---
## create_artists
```python
from legend_handler import create_artists
```



---
## get_numpoints
```python
from legend_handler import get_numpoints
```



---
## get_xdata
```python
from legend_handler import get_xdata
```



---
## get_ydata
```python
from legend_handler import get_ydata
```



---
## _create_patch
```python
from legend_handler import _create_patch
```



---
## _create_line
```python
from legend_handler import _create_line
```



---
## get_sizes
```python
from legend_handler import get_sizes
```



---
## create_collection
```python
from legend_handler import create_collection
```



---
## get_err_size
```python
from legend_handler import get_err_size
```



---
## _copy_collection_props
```python
from legend_handler import _copy_collection_props
```

Copy properties from the `.LineCollection` *orig_handle* to the
`.Line2D` *legend_handle*.

---
## first_color
```python
from legend_handler import first_color
```



---
## get_first
```python
from legend_handler import get_first
```



---
## __name__
```python
from axis import __name__
```

Classes for the ticks and x- and y-axis.

---
## Tick
```python
from axis import Tick
```

Abstract base class for the axis ticks, grid lines and labels.

Ticks mark a position on an Axis. They contain two lines as markers and
two labels; one each for the bottom and top positions (in case of an
`.XAxis`) or for the left and right positions (in case of a `.YAxis`).

Attributes
----------
tick1line : `~matplotlib.lines.Line2D`
    The left/bottom tick marker.
tick2line : `~matplotlib.lines.Line2D`
    The right/top tick marker.
gridline : `~matplotlib.lines.Line2D`
    The grid line associated with the label position.
label1 : `~matplotlib.text.Text`
    The left/bottom tick label.
label2 : `~matplotlib.text.Text`
    The right/top tick label.

---
## XTick
```python
from axis import XTick
```

Contains all the Artists needed to make an x tick - the tick line,
the label text and the grid line

---
## YTick
```python
from axis import YTick
```

Contains all the Artists needed to make a Y tick - the tick line,
the label text and the grid line

---
## Ticker
```python
from axis import Ticker
```

A container for the objects defining tick position and format.

Attributes
----------
locator : `~matplotlib.ticker.Locator` subclass
    Determines the positions of the ticks.
formatter : `~matplotlib.ticker.Formatter` subclass
    Determines the format of the tick labels.

---
## _LazyTickList
```python
from axis import _LazyTickList
```

A descriptor for lazy instantiation of tick lists.

See comment above definition of the ``majorTicks`` and ``minorTicks``
attributes.

---
## Axis
```python
from axis import Axis
```

Base class for `.XAxis` and `.YAxis`.

Attributes
----------
isDefault_label : bool

axes : `~matplotlib.axes.Axes`
    The `~.axes.Axes` to which the Axis belongs.
major : `~matplotlib.axis.Ticker`
    Determines the major tick positions and their label format.
minor : `~matplotlib.axis.Ticker`
    Determines the minor tick positions and their label format.
callbacks : `~matplotlib.cbook.CallbackRegistry`

label : `~matplotlib.text.Text`
    The axis label.
labelpad : float
    The distance between the axis label and the tick labels.
    Defaults to :rc:`axes.labelpad` = 4.
offsetText : `~matplotlib.text.Text`
    A `.Text` object containing the data offset of the ticks (if any).
pickradius : float
    The acceptance radius for containment tests. See also `.Axis.contains`.
majorTicks : list of `.Tick`
    The major ticks.

    .. warning::

        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that changes to individual ticks will not
        survive if you work on the figure further (including also
        panning/zooming on a displayed figure).

        Working on the individual ticks is a method of last resort.
        Use `.set_tick_params` instead if possible.

minorTicks : list of `.Tick`
    The minor ticks.

---
## _make_getset_interval
```python
from axis import _make_getset_interval
```

Helper to generate ``get_{data,view}_interval`` and
``set_{data,view}_interval`` implementations.

---
## XAxis
```python
from axis import XAxis
```



---
## YAxis
```python
from axis import YAxis
```



---
## __init__
```python
from axis import __init__
```



---
## _set_labelrotation
```python
from axis import _set_labelrotation
```



---
## _pad
```python
from axis import _pad
```



---
## _apply_tickdir
```python
from axis import _apply_tickdir
```



---
## get_tickdir
```python
from axis import get_tickdir
```



---
## get_tick_padding
```python
from axis import get_tick_padding
```



---
## get_children
```python
from axis import get_children
```



---
## set_clip_path
```python
from axis import set_clip_path
```



---
## contains
```python
from axis import contains
```



---
## set_pad
```python
from axis import set_pad
```

Set the tick label pad in points

Parameters
----------
val : float

---
## get_pad
```python
from axis import get_pad
```

Get the value of the tick label pad in points.

---
## get_loc
```python
from axis import get_loc
```

Return the tick location (data coords) as a scalar.

---
## draw
```python
from axis import draw
```



---
## set_label1
```python
from axis import set_label1
```

Set the label1 text.

Parameters
----------
s : str

---
## set_label2
```python
from axis import set_label2
```

Set the label2 text.

Parameters
----------
s : str

---
## set_url
```python
from axis import set_url
```

Set the url of label1 and label2.

Parameters
----------
url : str

---
## _set_artist_props
```python
from axis import _set_artist_props
```



---
## get_view_interval
```python
from axis import get_view_interval
```

Return the ``(min, max)`` view limits of this axis.

---
## _apply_params
```python
from axis import _apply_params
```



---
## update_position
```python
from axis import update_position
```

Set the location of tick in data coords with scalar *loc*.

---
## _get_text1_transform
```python
from axis import _get_text1_transform
```



---
## _get_text2_transform
```python
from axis import _get_text2_transform
```



---
## locator
```python
from axis import locator
```



---
## formatter
```python
from axis import formatter
```



---
## __get__
```python
from axis import __get__
```



---
## __str__
```python
from axis import __str__
```



---
## isDefault_majloc
```python
from axis import isDefault_majloc
```



---
## isDefault_majfmt
```python
from axis import isDefault_majfmt
```



---
## isDefault_minloc
```python
from axis import isDefault_minloc
```



---
## isDefault_minfmt
```python
from axis import isDefault_minfmt
```



---
## _get_shared_axes
```python
from axis import _get_shared_axes
```

Return Grouper of shared Axes for current axis.

---
## _get_shared_axis
```python
from axis import _get_shared_axis
```

Return list of shared axis for current axis.

---
## _get_axis_name
```python
from axis import _get_axis_name
```

Return the axis name.

---
## get_remove_overlapping_locs
```python
from axis import get_remove_overlapping_locs
```



---
## set_remove_overlapping_locs
```python
from axis import set_remove_overlapping_locs
```



---
## set_label_coords
```python
from axis import set_label_coords
```

Set the coordinates of the label.

By default, the x coordinate of the y label and the y coordinate of the
x label are determined by the tick label bounding boxes, but this can
lead to poor alignment of multiple labels if there are multiple Axes.

You can also specify the coordinate system of the label with the
transform.  If None, the default coordinate system will be the axes
coordinate system: (0, 0) is bottom left, (0.5, 0.5) is center, etc.

---
## get_transform
```python
from axis import get_transform
```

Return the transform used in the Axis' scale

---
## get_scale
```python
from axis import get_scale
```

Return this Axis' scale (as a str).

---
## _set_scale
```python
from axis import _set_scale
```



---
## _set_axes_scale
```python
from axis import _set_axes_scale
```

Set this Axis' scale.

Parameters
----------
value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
    The axis scale type to apply.

**kwargs
    Different keyword arguments are accepted, depending on the scale.
    See the respective class keyword arguments:

    - `matplotlib.scale.LinearScale`
    - `matplotlib.scale.LogScale`
    - `matplotlib.scale.SymmetricalLogScale`
    - `matplotlib.scale.LogitScale`
    - `matplotlib.scale.FuncScale`
    - `matplotlib.scale.AsinhScale`

Notes
-----
By default, Matplotlib supports the above-mentioned scales.
Additionally, custom scales may be registered using
`matplotlib.scale.register_scale`. These scales can then also
be used here.

---
## limit_range_for_scale
```python
from axis import limit_range_for_scale
```



---
## _get_autoscale_on
```python
from axis import _get_autoscale_on
```

Return whether this Axis is autoscaled.

---
## _set_autoscale_on
```python
from axis import _set_autoscale_on
```

Set whether this Axis is autoscaled when drawing or by
`.Axes.autoscale_view`. If b is None, then the value is not changed.

Parameters
----------
b : bool

---
## _reset_major_tick_kw
```python
from axis import _reset_major_tick_kw
```



---
## _reset_minor_tick_kw
```python
from axis import _reset_minor_tick_kw
```



---
## clear
```python
from axis import clear
```

Clear the axis.

This resets axis properties to their default values:

- the label
- the scale
- locators, formatters and ticks
- major and minor grid
- units
- registered callbacks

---
## reset_ticks
```python
from axis import reset_ticks
```

Re-initialize the major and minor Tick lists.

Each list starts with a single fresh Tick.

---
## minorticks_on
```python
from axis import minorticks_on
```

Display default minor ticks on the Axis, depending on the scale
(`~.axis.Axis.get_scale`).

Scales use specific minor locators:

- log: `~.LogLocator`
- symlog: `~.SymmetricalLogLocator`
- asinh: `~.AsinhLocator`
- logit: `~.LogitLocator`
- default: `~.AutoMinorLocator`

Displaying minor ticks may reduce performance; you may turn them off
using `minorticks_off()` if drawing speed is a problem.

---
## minorticks_off
```python
from axis import minorticks_off
```

Remove minor ticks from the Axis.

---
## set_tick_params
```python
from axis import set_tick_params
```

Set appearance parameters for ticks, ticklabels, and gridlines.

For documentation of keyword arguments, see
:meth:`matplotlib.axes.Axes.tick_params`.

See Also
--------
.Axis.get_tick_params
    View the current style settings for ticks, ticklabels, and
    gridlines.

---
## get_tick_params
```python
from axis import get_tick_params
```

Get appearance parameters for ticks, ticklabels, and gridlines.

.. versionadded:: 3.7

Parameters
----------
which : {'major', 'minor'}, default: 'major'
    The group of ticks for which the parameters are retrieved.

Returns
-------
dict
    Properties for styling tick elements added to the axis.

Notes
-----
This method returns the appearance parameters for styling *new*
elements added to this axis and may be different from the values
on current elements if they were modified directly by the user
(e.g., via ``set_*`` methods on individual tick objects).

Examples
--------
::

    >>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red',
    ...                          direction='out', which='major')
    >>> ax.yaxis.get_tick_params(which='major')
    {'direction': 'out',
    'left': True,
    'right': False,
    'labelleft': True,
    'labelright': False,
    'gridOn': False,
    'labelsize': 30,
    'labelcolor': 'red'}
    >>> ax.yaxis.get_tick_params(which='minor')
    {'left': True,
    'right': False,
    'labelleft': True,
    'labelright': False,
    'gridOn': False}

---
## _translate_tick_params
```python
from axis import _translate_tick_params
```

Translate the kwargs supported by `.Axis.set_tick_params` to kwargs
supported by `.Tick._apply_params`.

In particular, this maps axis specific names like 'top', 'left'
to the generic tick1, tick2 logic of the axis. Additionally, there
are some other name translations.

Returns a new dict of translated kwargs.

Note: Use reverse=True to translate from those supported by
`.Tick._apply_params` back to those supported by
`.Axis.set_tick_params`.

---
## set_view_interval
```python
from axis import set_view_interval
```

Set the axis view limits.  This method is for internal use; Matplotlib
users should typically use e.g. `~.Axes.set_xlim` or `~.Axes.set_ylim`.

If *ignore* is False (the default), this method will never reduce the
preexisting view limits, only expand them if *vmin* or *vmax* are not
within them.  Moreover, the order of *vmin* and *vmax* does not matter;
the orientation of the axis will not change.

If *ignore* is True, the view limits will be set exactly to ``(vmin,
vmax)`` in that order.

---
## get_data_interval
```python
from axis import get_data_interval
```

Return the ``(min, max)`` data limits of this axis.

---
## set_data_interval
```python
from axis import set_data_interval
```

Set the axis data limits.  This method is for internal use.

If *ignore* is False (the default), this method will never reduce the
preexisting data limits, only expand them if *vmin* or *vmax* are not
within them.  Moreover, the order of *vmin* and *vmax* does not matter;
the orientation of the axis will not change.

If *ignore* is True, the data limits will be set exactly to ``(vmin,
vmax)`` in that order.

---
## get_inverted
```python
from axis import get_inverted
```

Return whether this Axis is oriented in the "inverse" direction.

The "normal" direction is increasing to the right for the x-axis and to
the top for the y-axis; the "inverse" direction is increasing to the
left for the x-axis and to the bottom for the y-axis.

---
## set_inverted
```python
from axis import set_inverted
```

Set whether this Axis is oriented in the "inverse" direction.

The "normal" direction is increasing to the right for the x-axis and to
the top for the y-axis; the "inverse" direction is increasing to the
left for the x-axis and to the bottom for the y-axis.

---
## set_default_intervals
```python
from axis import set_default_intervals
```



---
## _set_lim
```python
from axis import _set_lim
```

Set view limits.

This method is a helper for the Axes ``set_xlim``, ``set_ylim``, and
``set_zlim`` methods.

Parameters
----------
v0, v1 : float
    The view limits.  (Passing *v0* as a (low, high) pair is not
    supported; normalization must occur in the Axes setters.)
emit : bool, default: True
    Whether to notify observers of limit change.
auto : bool or None, default: False
    Whether to turn on autoscaling of the x-axis. True turns on, False
    turns off, None leaves unchanged.

---
## _update_ticks
```python
from axis import _update_ticks
```

Update ticks (position and labels) using the current data interval of
the axes.  Return the list of ticks that will be drawn.

---
## _get_ticklabel_bboxes
```python
from axis import _get_ticklabel_bboxes
```

Return lists of bboxes for ticks' label1's and label2's.

---
## get_tightbbox
```python
from axis import get_tightbbox
```

Return a bounding box that encloses the axis. It only accounts
tick labels, axis label, and offsetText.

If *for_layout_only* is True, then the width of the label (if this
is an x-axis) or the height of the label (if this is a y-axis) is
collapsed to near zero.  This allows tight/constrained_layout to ignore
too-long labels when doing their layout.

---
## get_gridlines
```python
from axis import get_gridlines
```

Return this Axis' grid lines as a list of `.Line2D`\s.

---
## get_label
```python
from axis import get_label
```

Return the axis label as a Text instance.

---
## get_offset_text
```python
from axis import get_offset_text
```

Return the axis offsetText as a Text instance.

---
## get_pickradius
```python
from axis import get_pickradius
```

Return the depth of the axis used by the picker.

---
## get_majorticklabels
```python
from axis import get_majorticklabels
```

Return this Axis' major tick labels, as a list of `~.text.Text`.

---
## get_minorticklabels
```python
from axis import get_minorticklabels
```

Return this Axis' minor tick labels, as a list of `~.text.Text`.

---
## get_ticklabels
```python
from axis import get_ticklabels
```

Get this Axis' tick labels.

Parameters
----------
minor : bool
   Whether to return the minor or the major ticklabels.

which : None, ('minor', 'major', 'both')
   Overrides *minor*.

   Selects which ticklabels to return

Returns
-------
list of `~matplotlib.text.Text`

---
## get_majorticklines
```python
from axis import get_majorticklines
```

Return this Axis' major tick lines as a list of `.Line2D`\s.

---
## get_minorticklines
```python
from axis import get_minorticklines
```

Return this Axis' minor tick lines as a list of `.Line2D`\s.

---
## get_ticklines
```python
from axis import get_ticklines
```

Return this Axis' tick lines as a list of `.Line2D`\s.

---
## get_majorticklocs
```python
from axis import get_majorticklocs
```

Return this Axis' major tick locations in data coordinates.

---
## get_minorticklocs
```python
from axis import get_minorticklocs
```

Return this Axis' minor tick locations in data coordinates.

---
## get_ticklocs
```python
from axis import get_ticklocs
```

Return this Axis' tick locations in data coordinates.

The locations are not clipped to the current axis limits and hence
may contain locations that are not visible in the output.

Parameters
----------
minor : bool, default: False
    True to return the minor tick directions,
    False to return the major tick directions.

Returns
-------
array of tick locations

---
## get_ticks_direction
```python
from axis import get_ticks_direction
```

Return an array of this Axis' tick directions.

Parameters
----------
minor : bool, default: False
    True to return the minor tick directions,
    False to return the major tick directions.

Returns
-------
array of tick directions

---
## _get_tick
```python
from axis import _get_tick
```

Return the default tick instance.

---
## _get_tick_label_size
```python
from axis import _get_tick_label_size
```

Return the text size of tick labels for this Axis.

This is a convenience function to avoid having to create a `Tick` in
`.get_tick_space`, since it is expensive.

---
## _copy_tick_props
```python
from axis import _copy_tick_props
```

Copy the properties from *src* tick to *dest* tick.

---
## get_label_text
```python
from axis import get_label_text
```

Get the text of the label.

---
## get_major_locator
```python
from axis import get_major_locator
```

Get the locator of the major ticker.

---
## get_minor_locator
```python
from axis import get_minor_locator
```

Get the locator of the minor ticker.

---
## get_major_formatter
```python
from axis import get_major_formatter
```

Get the formatter of the major ticker.

---
## get_minor_formatter
```python
from axis import get_minor_formatter
```

Get the formatter of the minor ticker.

---
## get_major_ticks
```python
from axis import get_major_ticks
```

Return the list of major `.Tick`\s.

.. warning::

    Ticks are not guaranteed to be persistent. Various operations
    can create, delete and modify the Tick instances. There is an
    imminent risk that changes to individual ticks will not
    survive if you work on the figure further (including also
    panning/zooming on a displayed figure).

    Working on the individual ticks is a method of last resort.
    Use `.set_tick_params` instead if possible.

---
## get_minor_ticks
```python
from axis import get_minor_ticks
```

Return the list of minor `.Tick`\s.

.. warning::

    Ticks are not guaranteed to be persistent. Various operations
    can create, delete and modify the Tick instances. There is an
    imminent risk that changes to individual ticks will not
    survive if you work on the figure further (including also
    panning/zooming on a displayed figure).

    Working on the individual ticks is a method of last resort.
    Use `.set_tick_params` instead if possible.

---
## grid
```python
from axis import grid
```

Configure the grid lines.

Parameters
----------
visible : bool or None
    Whether to show the grid lines.  If any *kwargs* are supplied, it
    is assumed you want the grid on and *visible* will be set to True.

    If *visible* is *None* and there are no *kwargs*, this toggles the
    visibility of the lines.

which : {'major', 'minor', 'both'}
    The grid lines to apply the changes on.

**kwargs : `~matplotlib.lines.Line2D` properties
    Define the line properties of the grid, e.g.::

        grid(color='r', linestyle='-', linewidth=2)

---
## update_units
```python
from axis import update_units
```

Introspect *data* for units converter and update the
``axis.converter`` instance if necessary. Return *True*
if *data* is registered for unit conversion.

---
## _update_axisinfo
```python
from axis import _update_axisinfo
```

Check the axis converter for the stored units to see if the
axis info needs to be updated.

---
## have_units
```python
from axis import have_units
```



---
## convert_units
```python
from axis import convert_units
```



---
## set_units
```python
from axis import set_units
```

Set the units for axis.

Parameters
----------
u : units tag

Notes
-----
The units of any shared axis will also be updated.

---
## get_units
```python
from axis import get_units
```

Return the units for axis.

---
## set_label_text
```python
from axis import set_label_text
```

Set the text value of the axis label.

Parameters
----------
label : str
    Text string.
fontdict : dict
    Text properties.

    .. admonition:: Discouraged

       The use of *fontdict* is discouraged. Parameters should be passed as
       individual keyword arguments or using dictionary-unpacking
       ``set_label_text(..., **fontdict)``.

**kwargs
    Merged into fontdict.

---
## set_major_formatter
```python
from axis import set_major_formatter
```

Set the formatter of the major ticker.

In addition to a `~matplotlib.ticker.Formatter` instance,
this also accepts a ``str`` or function.

For a ``str`` a `~matplotlib.ticker.StrMethodFormatter` is used.
The field used for the value must be labeled ``'x'`` and the field used
for the position must be labeled ``'pos'``.
See the  `~matplotlib.ticker.StrMethodFormatter` documentation for
more information.

For a function, a `~matplotlib.ticker.FuncFormatter` is used.
The function must take two inputs (a tick value ``x`` and a
position ``pos``), and return a string containing the corresponding
tick label.
See the  `~matplotlib.ticker.FuncFormatter` documentation for
more information.

Parameters
----------
formatter : `~matplotlib.ticker.Formatter`, ``str``, or function

---
## set_minor_formatter
```python
from axis import set_minor_formatter
```

Set the formatter of the minor ticker.

In addition to a `~matplotlib.ticker.Formatter` instance,
this also accepts a ``str`` or function.
See `.Axis.set_major_formatter` for more information.

Parameters
----------
formatter : `~matplotlib.ticker.Formatter`, ``str``, or function

---
## _set_formatter
```python
from axis import _set_formatter
```



---
## set_major_locator
```python
from axis import set_major_locator
```

Set the locator of the major ticker.

Parameters
----------
locator : `~matplotlib.ticker.Locator`

---
## set_minor_locator
```python
from axis import set_minor_locator
```

Set the locator of the minor ticker.

Parameters
----------
locator : `~matplotlib.ticker.Locator`

---
## set_pickradius
```python
from axis import set_pickradius
```

Set the depth of the axis used by the picker.

Parameters
----------
pickradius : float
    The acceptance radius for containment tests.
    See also `.Axis.contains`.

---
## _format_with_dict
```python
from axis import _format_with_dict
```



---
## set_ticklabels
```python
from axis import set_ticklabels
```

[*Discouraged*] Set this Axis' tick labels with list of string labels.

.. admonition:: Discouraged

    The use of this method is discouraged, because of the dependency on
    tick positions. In most cases, you'll want to use
    ``Axes.set_[x/y/z]ticks(positions, labels)`` or ``Axis.set_ticks``
    instead.

    If you are using this method, you should always fix the tick
    positions before, e.g. by using `.Axis.set_ticks` or by explicitly
    setting a `~.ticker.FixedLocator`. Otherwise, ticks are free to
    move and the labels may end up in unexpected positions.

Parameters
----------
labels : sequence of str or of `.Text`\s
    Texts for labeling each tick location in the sequence set by
    `.Axis.set_ticks`; the number of labels must match the number of locations.
    The labels are used as is, via a `.FixedFormatter` (without further
    formatting).

minor : bool
    If True, set minor ticks instead of major ticks.

fontdict : dict, optional

    .. admonition:: Discouraged

       The use of *fontdict* is discouraged. Parameters should be passed as
       individual keyword arguments or using dictionary-unpacking
       ``set_ticklabels(..., **fontdict)``.

    A dictionary controlling the appearance of the ticklabels.
    The default *fontdict* is::

       {'fontsize': rcParams['axes.titlesize'],
        'fontweight': rcParams['axes.titleweight'],
        'verticalalignment': 'baseline',
        'horizontalalignment': loc}

**kwargs
    Text properties.

    .. warning::

        This only sets the properties of the current ticks, which is
        only sufficient for static plots.

        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that these settings can get lost if you work on
        the figure further (including also panning/zooming on a
        displayed figure).

        Use `.set_tick_params` instead if possible.

Returns
-------
list of `.Text`\s
    For each tick, includes ``tick.label1`` if it is visible, then
    ``tick.label2`` if it is visible, in that order.

---
## _set_tick_locations
```python
from axis import _set_tick_locations
```



---
## set_ticks
```python
from axis import set_ticks
```

Set this Axis' tick locations and optionally tick labels.

If necessary, the view limits of the Axis are expanded so that all
given ticks are visible.

Parameters
----------
ticks : 1D array-like
    Array of tick locations (either floats or in axis units). The axis
    `.Locator` is replaced by a `~.ticker.FixedLocator`.

    Pass an empty list (``set_ticks([])``) to remove all ticks.

    Some tick formatters will not label arbitrary tick positions;
    e.g. log formatters only label decade ticks by default. In
    such a case you can set a formatter explicitly on the axis
    using `.Axis.set_major_formatter` or provide formatted
    *labels* yourself.

labels : list of str, optional
    Tick labels for each location in *ticks*; must have the same length as
    *ticks*. If set, the labels are used as is, via a `.FixedFormatter`.
    If not set, the labels are generated using the axis tick `.Formatter`.

minor : bool, default: False
    If ``False``, set only the major ticks; if ``True``, only the minor ticks.

**kwargs
    `.Text` properties for the labels. Using these is only allowed if
    you pass *labels*. In other cases, please use `~.Axes.tick_params`.

Notes
-----
The mandatory expansion of the view limits is an intentional design
choice to prevent the surprise of a non-visible tick. If you need
other limits, you should set the limits explicitly after setting the
ticks.

---
## _get_tick_boxes_siblings
```python
from axis import _get_tick_boxes_siblings
```

Get the bounding boxes for this `.axis` and its siblings
as set by `.Figure.align_xlabels` or  `.Figure.align_ylabels`.

By default, it just gets bboxes for *self*.

---
## _update_label_position
```python
from axis import _update_label_position
```

Update the label position based on the bounding box enclosing
all the ticklabels and axis spine

---
## _update_offset_text_position
```python
from axis import _update_offset_text_position
```

Update the offset_text position based on the sequence of bounding
boxes of all the ticklabels

---
## axis_date
```python
from axis import axis_date
```

Set up axis ticks and labels to treat data along this Axis as dates.

Parameters
----------
tz : str or `datetime.tzinfo`, default: :rc:`timezone`
    The timezone used to create date labels.

---
## get_tick_space
```python
from axis import get_tick_space
```



---
## _get_ticks_position
```python
from axis import _get_ticks_position
```

Helper for `XAxis.get_ticks_position` and `YAxis.get_ticks_position`.

Check the visibility of tick1line, label1, tick2line, and label2 on
the first major and the first minor ticks, and return

- 1 if only tick1line and label1 are visible (which corresponds to
  "bottom" for the x-axis and "left" for the y-axis);
- 2 if only tick2line and label2 are visible (which corresponds to
  "top" for the x-axis and "right" for the y-axis);
- "default" if only tick1line, tick2line and label1 are visible;
- "unknown" otherwise.

---
## get_label_position
```python
from axis import get_label_position
```

Return the label position (top or bottom)

---
## set_label_position
```python
from axis import set_label_position
```

Set the label position (left or right)

Parameters
----------
position : {'left', 'right'}

---
## get_minpos
```python
from axis import get_minpos
```



---
## getter
```python
from axis import getter
```



---
## setter
```python
from axis import setter
```



---
## _init
```python
from axis import _init
```

Initialize the label and offsetText instance values and
`label_position` / `offset_text_position`.

---
## set_ticks_position
```python
from axis import set_ticks_position
```

Set the ticks position.

Parameters
----------
position : {'left', 'right', 'both', 'default', 'none'}
    'both' sets the ticks to appear on both positions, but does not
    change the tick labels.  'default' resets the tick positions to
    the default: ticks on both positions, labels at left.  'none'
    can be used if you don't want any ticks. 'none' and 'both'
    affect only the ticks, not the labels.

---
## tick_top
```python
from axis import tick_top
```

Move ticks and ticklabels (if present) to the top of the Axes.

---
## tick_bottom
```python
from axis import tick_bottom
```

Move ticks and ticklabels (if present) to the bottom of the Axes.

---
## get_ticks_position
```python
from axis import get_ticks_position
```

Return the ticks position ("left", "right", "default", or "unknown").

---
## set_offset_position
```python
from axis import set_offset_position
```

Parameters
----------
position : {'left', 'right'}

---
## tick_right
```python
from axis import tick_right
```

Move ticks and ticklabels (if present) to the right of the Axes.

---
## tick_left
```python
from axis import tick_left
```

Move ticks and ticklabels (if present) to the left of the Axes.

---
## __name__
```python
from _tight_bbox import __name__
```

Helper module for the *bbox_inches* parameter in `.Figure.savefig`.

---
## adjust_bbox
```python
from _tight_bbox import adjust_bbox
```

Temporarily adjust the figure so that only the specified area
(bbox_inches) is saved.

It modifies fig.bbox, fig.bbox_inches,
fig.transFigure._boxout, and fig.patch.  While the figure size
changes, the scale of the original figure is conserved.  A
function which restores the original values are returned.

---
## process_figure_for_rasterizing
```python
from _tight_bbox import process_figure_for_rasterizing
```

A function that needs to be called when figure dpi changes during the
drawing (e.g., rasterizing).  It recovers the bbox and re-adjust it with
the new dpi.

---
## restore_bbox
```python
from _tight_bbox import restore_bbox
```



---
## __name__
```python
from textpath import __name__
```



---
## TextToPath
```python
from textpath import TextToPath
```

A class that converts strings to paths.

---
## TextPath
```python
from textpath import TextPath
```

Create a path from the text.

---
## __init__
```python
from textpath import __init__
```

Create a path from the text. Note that it simply is a path,
not an artist. You need to use the `.PathPatch` (or other artists)
to draw this path onto the canvas.

Parameters
----------
xy : tuple or array of two float values
    Position of the text. For no offset, use ``xy=(0, 0)``.

s : str
    The text to convert to a path.

size : float, optional
    Font size in points. Defaults to the size specified via the font
    properties *prop*.

prop : `~matplotlib.font_manager.FontProperties`, optional
    Font property. If not provided, will use a default
    `.FontProperties` with parameters from the
    :ref:`rcParams<customizing-with-dynamic-rc-settings>`.

_interpolation_steps : int, optional
    (Currently ignored)

usetex : bool, default: False
    Whether to use tex rendering.

Examples
--------
The following creates a path from the string "ABC" with Helvetica
font face; and another path from the latex fraction 1/2::

    from matplotlib.text import TextPath
    from matplotlib.font_manager import FontProperties

    fp = FontProperties(family="Helvetica", style="italic")
    path1 = TextPath((12, 12), "ABC", size=12, prop=fp)
    path2 = TextPath((0, 0), r"$\frac{1}{2}$", size=12, usetex=True)

Also see :doc:`/gallery/text_labels_and_annotations/demo_text_path`.

---
## _get_font
```python
from textpath import _get_font
```

Find the `FT2Font` matching font properties *prop*, with its size set.

---
## _get_hinting_flag
```python
from textpath import _get_hinting_flag
```



---
## _get_char_id
```python
from textpath import _get_char_id
```

Return a unique id for the given font and character-code set.

---
## get_text_width_height_descent
```python
from textpath import get_text_width_height_descent
```



---
## get_text_path
```python
from textpath import get_text_path
```

Convert text *s* to path (a tuple of vertices and codes for
matplotlib.path.Path).

Parameters
----------
prop : `~matplotlib.font_manager.FontProperties`
    The font properties for the text.
s : str
    The text to be converted.
ismath : {False, True, "TeX"}
    If True, use mathtext parser.  If "TeX", use tex for rendering.

Returns
-------
verts : list
    A list of arrays containing the (x, y) coordinates of the vertices.
codes : list
    A list of path codes.

Examples
--------
Create a list of vertices and codes from a text, and create a `.Path`
from those::

    from matplotlib.path import Path
    from matplotlib.text import TextToPath
    from matplotlib.font_manager import FontProperties

    fp = FontProperties(family="Comic Neue", style="italic")
    verts, codes = TextToPath().get_text_path(fp, "ABC")
    path = Path(verts, codes, closed=False)

Also see `TextPath` for a more direct way to create a path from a text.

---
## get_glyphs_with_font
```python
from textpath import get_glyphs_with_font
```

Convert string *s* to vertices and codes using the provided ttf font.

---
## get_glyphs_mathtext
```python
from textpath import get_glyphs_mathtext
```

Parse mathtext string *s* and convert it to a (vertices, codes) pair.

---
## get_glyphs_tex
```python
from textpath import get_glyphs_tex
```

Convert the string *s* to vertices and codes using usetex mode.

---
## _select_native_charmap
```python
from textpath import _select_native_charmap
```



---
## set_size
```python
from textpath import set_size
```

Set the text size.

---
## get_size
```python
from textpath import get_size
```

Get the text size.

---
## vertices
```python
from textpath import vertices
```

Return the cached path after updating it if necessary.

---
## codes
```python
from textpath import codes
```

Return the codes

---
## _revalidate_path
```python
from textpath import _revalidate_path
```

Update the path if necessary.

The path for the text is initially create with the font size of
`.FONT_SCALE`, and this path is rescaled to other size when necessary.

---
## __name__
```python
from quiver import __name__
```

Support for plotting vector fields.

Presently this contains Quiver and Barb. Quiver plots an arrow in the
direction of the vector, with the size of the arrow related to the
magnitude of the vector.

Barbs are like quiver in that they point along a vector, but
the magnitude of the vector is given schematically by the presence of barbs
or flags on the barb.

This will also become a home for things such as standard
deviation ellipses, which can and will be derived very easily from
the Quiver code.

---
## QuiverKey
```python
from quiver import QuiverKey
```

Labelled arrow for use as a quiver plot scale key.

---
## _parse_args
```python
from quiver import _parse_args
```

Helper function to parse positional parameters for colored vector plots.

This is currently used for Quiver and Barbs.

Parameters
----------
*args : list
    list of 2-5 arguments. Depending on their number they are parsed to::

        U, V
        U, V, C
        X, Y, U, V
        X, Y, U, V, C

caller_name : str
    Name of the calling method (used in error messages).

---
## _check_consistent_shapes
```python
from quiver import _check_consistent_shapes
```



---
## Quiver
```python
from quiver import Quiver
```

Specialized PolyCollection for arrows.

The only API method is set_UVC(), which can be used
to change the size, orientation, and color of the
arrows; their locations are fixed when the class is
instantiated.  Possibly this method will be useful
in animations.

Much of the work in this class is done in the draw()
method so that as much information as possible is available
about the plot.  In subsequent draw() calls, recalculation
is limited to things that might have changed, so there
should be no performance penalty from putting the calculations
in the draw() method.

---
## Barbs
```python
from quiver import Barbs
```

Specialized PolyCollection for barbs.

The only API method is :meth:`set_UVC`, which can be used to
change the size, orientation, and color of the arrows.  Locations
are changed using the :meth:`set_offsets` collection method.
Possibly this method will be useful in animations.

There is one internal function :meth:`_find_tails` which finds
exactly what should be put on the barb given the vector magnitude.
From there :meth:`_make_barbs` is used to find the vertices of the
polygon to represent the barb based on this information.

---
## __init__
```python
from quiver import __init__
```

The constructor takes one required argument, an Axes
instance, followed by the args and kwargs described
by the following pyplot interface documentation:
%(barbs_doc)s

---
## labelsep
```python
from quiver import labelsep
```



---
## _init
```python
from quiver import _init
```

Initialization delayed until first draw;
allow time for axes setup.

---
## _text_shift
```python
from quiver import _text_shift
```



---
## draw
```python
from quiver import draw
```



---
## _set_transform
```python
from quiver import _set_transform
```

Set the PolyCollection transform to go
from arrow width units to pixels.

---
## set_figure
```python
from quiver import set_figure
```



---
## contains
```python
from quiver import contains
```



---
## get_datalim
```python
from quiver import get_datalim
```



---
## set_UVC
```python
from quiver import set_UVC
```



---
## _dots_per_unit
```python
from quiver import _dots_per_unit
```

Return a scale factor for converting from units to pixels.

---
## _angles_lengths
```python
from quiver import _angles_lengths
```



---
## _make_verts
```python
from quiver import _make_verts
```



---
## _h_arrows
```python
from quiver import _h_arrows
```

Length is in arrow width units.

---
## _find_tails
```python
from quiver import _find_tails
```

Find how many of each of the tail pieces is necessary.

Parameters
----------
mag : `~numpy.ndarray`
    Vector magnitudes; must be non-negative (and an actual ndarray).
rounding : bool, default: True
    Whether to round or to truncate to the nearest half-barb.
half, full, flag : float, defaults: 5, 10, 50
    Increments for a half-barb, a barb, and a flag.

Returns
-------
n_flags, n_barbs : int array
    For each entry in *mag*, the number of flags and barbs.
half_flag : bool array
    For each entry in *mag*, whether a half-barb is needed.
empty_flag : bool array
    For each entry in *mag*, whether nothing is drawn.

---
## _make_barbs
```python
from quiver import _make_barbs
```

Create the wind barbs.

Parameters
----------
u, v
    Components of the vector in the x and y directions, respectively.

nflags, nbarbs, half_barb, empty_flag
    Respectively, the number of flags, number of barbs, flag for
    half a barb, and flag for empty barb, ostensibly obtained from
    :meth:`_find_tails`.

length
    The length of the barb staff in points.

pivot : {"tip", "middle"} or number
    The point on the barb around which the entire barb should be
    rotated.  If a number, the start of the barb is shifted by that
    many points from the origin.

sizes : dict
    Coefficients specifying the ratio of a given feature to the length
    of the barb. These features include:

    - *spacing*: space between features (flags, full/half barbs).
    - *height*: distance from shaft of top of a flag or full barb.
    - *width*: width of a flag, twice the width of a full barb.
    - *emptybarb*: radius of the circle used for low magnitudes.

fill_empty : bool
    Whether the circle representing an empty barb should be filled or
    not (this changes the drawing of the polygon).

flip : list of bool
    Whether the features should be flipped to the other side of the
    barb (useful for winds in the southern hemisphere).

Returns
-------
list of arrays of vertices
    Polygon vertices for each of the wind barbs.  These polygons have
    been rotated to properly align with the vector direction.

---
## set_offsets
```python
from quiver import set_offsets
```

Set the offsets for the barb polygons.  This saves the offsets passed
in and masks them as appropriate for the existing U/V data.

Parameters
----------
xy : sequence of pairs of floats

---
## __name__
```python
from backend_bases import __name__
```

Abstract base classes define the primitives that renderers and
graphics contexts must implement to serve as a Matplotlib backend.

`RendererBase`
    An abstract base class to handle drawing/rendering operations.

`FigureCanvasBase`
    The abstraction layer that separates the `.Figure` from the backend
    specific details like a user interface drawing area.

`GraphicsContextBase`
    An abstract base class that provides color, line styles, etc.

`Event`
    The base class for all of the Matplotlib event handling.  Derived classes
    such as `KeyEvent` and `MouseEvent` store the meta data like keys and
    buttons pressed, x and y locations in pixel and `~.axes.Axes` coordinates.

`ShowBase`
    The base class for the ``Show`` class of each interactive backend; the
    'show' callable is then set to ``Show.__call__``.

`ToolContainerBase`
    The base class for the Toolbar class of each interactive backend.

---
## register_backend
```python
from backend_bases import register_backend
```

Register a backend for saving to a given file format.

Parameters
----------
format : str
    File extension
backend : module string or canvas class
    Backend for handling file output
description : str, default: ""
    Description of the file type.

---
## get_registered_canvas_class
```python
from backend_bases import get_registered_canvas_class
```

Return the registered default canvas for given file format.
Handles deferred import of required backend.

---
## RendererBase
```python
from backend_bases import RendererBase
```

An abstract base class to handle drawing/rendering operations.

The following methods must be implemented in the backend for full
functionality (though just implementing `draw_path` alone would give a
highly capable backend):

* `draw_path`
* `draw_image`
* `draw_gouraud_triangles`

The following methods *should* be implemented in the backend for
optimization reasons:

* `draw_text`
* `draw_markers`
* `draw_path_collection`
* `draw_quad_mesh`

---
## GraphicsContextBase
```python
from backend_bases import GraphicsContextBase
```

An abstract base class that provides color, line styles, etc.

---
## TimerBase
```python
from backend_bases import TimerBase
```

A base class for providing timer events, useful for things animations.
Backends need to implement a few specific methods in order to use their
own timing mechanisms so that the timer events are integrated into their
event loops.

Subclasses must override the following methods:

- ``_timer_start``: Backend-specific code for starting the timer.
- ``_timer_stop``: Backend-specific code for stopping the timer.

Subclasses may additionally override the following methods:

- ``_timer_set_single_shot``: Code for setting the timer to single shot
  operating mode, if supported by the timer object.  If not, the `Timer`
  class itself will store the flag and the ``_on_timer`` method should be
  overridden to support such behavior.

- ``_timer_set_interval``: Code for setting the interval on the timer, if
  there is a method for doing so on the timer object.

- ``_on_timer``: The internal function that any timer object should call,
  which will handle the task of running all callbacks that have been set.

---
## Event
```python
from backend_bases import Event
```

A Matplotlib event.

The following attributes are defined and shown with their default values.
Subclasses may define additional attributes.

Attributes
----------
name : str
    The event name.
canvas : `FigureCanvasBase`
    The backend-specific canvas instance generating the event.
guiEvent
    The GUI event that triggered the Matplotlib event.

---
## DrawEvent
```python
from backend_bases import DrawEvent
```

An event triggered by a draw operation on the canvas.

In most backends, callbacks subscribed to this event will be fired after
the rendering is complete but before the screen is updated. Any extra
artists drawn to the canvas's renderer will be reflected without an
explicit call to ``blit``.

.. warning::

   Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may
   not be safe with all backends and may cause infinite recursion.

A DrawEvent has a number of special attributes in addition to those defined
by the parent `Event` class.

Attributes
----------
renderer : `RendererBase`
    The renderer for the draw event.

---
## ResizeEvent
```python
from backend_bases import ResizeEvent
```

An event triggered by a canvas resize.

A ResizeEvent has a number of special attributes in addition to those
defined by the parent `Event` class.

Attributes
----------
width : int
    Width of the canvas in pixels.
height : int
    Height of the canvas in pixels.

---
## CloseEvent
```python
from backend_bases import CloseEvent
```

An event triggered by a figure being closed.

---
## LocationEvent
```python
from backend_bases import LocationEvent
```

An event that has a screen location.

A LocationEvent has a number of special attributes in addition to those
defined by the parent `Event` class.

Attributes
----------
x, y : int or None
    Event location in pixels from bottom left of canvas.
inaxes : `~matplotlib.axes.Axes` or None
    The `~.axes.Axes` instance over which the mouse is, if any.
xdata, ydata : float or None
    Data coordinates of the mouse within *inaxes*, or *None* if the mouse
    is not over an Axes.
modifiers : frozenset
    The keyboard modifiers currently being pressed (except for KeyEvent).

---
## MouseButton
```python
from backend_bases import MouseButton
```



---
## MouseEvent
```python
from backend_bases import MouseEvent
```

A mouse event ('button_press_event', 'button_release_event', 'scroll_event', 'motion_notify_event').

A MouseEvent has a number of special attributes in addition to those
defined by the parent `Event` and `LocationEvent` classes.

Attributes
----------
button : None or `MouseButton` or {'up', 'down'}
    The button pressed. 'up' and 'down' are used for scroll events.

    Note that LEFT and RIGHT actually refer to the "primary" and
    "secondary" buttons, i.e. if the user inverts their left and right
    buttons ("left-handed setting") then the LEFT button will be the one
    physically on the right.

    If this is unset, *name* is "scroll_event", and *step* is nonzero, then
    this will be set to "up" or "down" depending on the sign of *step*.

key : None or str
    The key pressed when the mouse event triggered, e.g. 'shift'.
    See `KeyEvent`.

    .. warning::
       This key is currently obtained from the last 'key_press_event' or
       'key_release_event' that occurred within the canvas.  Thus, if the
       last change of keyboard state occurred while the canvas did not have
       focus, this attribute will be wrong.  On the other hand, the
       ``modifiers`` attribute should always be correct, but it can only
       report on modifier keys.

step : float
    The number of scroll steps (positive for 'up', negative for 'down').
    This applies only to 'scroll_event' and defaults to 0 otherwise.

dblclick : bool
    Whether the event is a double-click. This applies only to
    'button_press_event' and is False otherwise. In particular, it's
    not used in 'button_release_event'.

Examples
--------
::

    def on_press(event):
        print('you pressed', event.button, event.xdata, event.ydata)

    cid = fig.canvas.mpl_connect('button_press_event', on_press)

---
## PickEvent
```python
from backend_bases import PickEvent
```

A pick event.

This event is fired when the user picks a location on the canvas
sufficiently close to an artist that has been made pickable with
`.Artist.set_picker`.

A PickEvent has a number of special attributes in addition to those defined
by the parent `Event` class.

Attributes
----------
mouseevent : `MouseEvent`
    The mouse event that generated the pick.
artist : `~matplotlib.artist.Artist`
    The picked artist.  Note that artists are not pickable by default
    (see `.Artist.set_picker`).
other
    Additional attributes may be present depending on the type of the
    picked object; e.g., a `.Line2D` pick may define different extra
    attributes than a `.PatchCollection` pick.

Examples
--------
Bind a function ``on_pick()`` to pick events, that prints the coordinates
of the picked data point::

    ax.plot(np.rand(100), 'o', picker=5)  # 5 points tolerance

    def on_pick(event):
        line = event.artist
        xdata, ydata = line.get_data()
        ind = event.ind
        print(f'on pick line: {xdata[ind]:.3f}, {ydata[ind]:.3f}')

    cid = fig.canvas.mpl_connect('pick_event', on_pick)

---
## KeyEvent
```python
from backend_bases import KeyEvent
```

A key event (key press, key release).

A KeyEvent has a number of special attributes in addition to those defined
by the parent `Event` and `LocationEvent` classes.

Attributes
----------
key : None or str
    The key(s) pressed. Could be *None*, a single case sensitive Unicode
    character ("g", "G", "#", etc.), a special key ("control", "shift",
    "f1", "up", etc.) or a combination of the above (e.g., "ctrl+alt+g",
    "ctrl+alt+G").

Notes
-----
Modifier keys will be prefixed to the pressed key and will be in the order
"ctrl", "alt", "super". The exception to this rule is when the pressed key
is itself a modifier key, therefore "ctrl+alt" and "alt+control" can both
be valid key values.

Examples
--------
::

    def on_key(event):
        print('you pressed', event.key, event.xdata, event.ydata)

    cid = fig.canvas.mpl_connect('key_press_event', on_key)

---
## _key_handler
```python
from backend_bases import _key_handler
```



---
## _mouse_handler
```python
from backend_bases import _mouse_handler
```



---
## _get_renderer
```python
from backend_bases import _get_renderer
```

Get the renderer that would be used to save a `.Figure`.

If you need a renderer without any active draw methods use
renderer._draw_disabled to temporary patch them out at your call site.

---
## _no_output_draw
```python
from backend_bases import _no_output_draw
```



---
## _is_non_interactive_terminal_ipython
```python
from backend_bases import _is_non_interactive_terminal_ipython
```

Return whether we are in a terminal IPython, but non interactive.

When in _terminal_ IPython, ip.parent will have and `interact` attribute,
if this attribute is False we do not setup eventloop integration as the
user will _not_ interact with IPython. In all other case (ZMQKernel, or is
interactive), we do.

---
## _allow_interrupt
```python
from backend_bases import _allow_interrupt
```

A context manager that allows terminating a plot by sending a SIGINT.  It
is necessary because the running backend prevents the Python interpreter
from running and processing signals (i.e., to raise a KeyboardInterrupt).
To solve this, one needs to somehow wake up the interpreter and make it
close the plot window.  We do this by using the signal.set_wakeup_fd()
function which organizes a write of the signal number into a socketpair.
A backend-specific function, *prepare_notifier*, arranges to listen to
the pair's read socket while the event loop is running.  (If it returns a
notifier object, that object is kept alive while the context manager runs.)

If SIGINT was indeed caught, after exiting the on_signal() function the
interpreter reacts to the signal according to the handler function which
had been set up by a signal.signal() call; here, we arrange to call the
backend-specific *handle_sigint* function.  Finally, we call the old SIGINT
handler with the same arguments that were given to our custom handler.

We do this only if the old handler for SIGINT was not None, which means
that a non-python handler was installed, i.e. in Julia, and not SIG_IGN
which means we should ignore the interrupts.

Parameters
----------
prepare_notifier : Callable[[socket.socket], object]
handle_sigint : Callable[[], object]

---
## FigureCanvasBase
```python
from backend_bases import FigureCanvasBase
```

The canvas the figure renders into.

Attributes
----------
figure : `~matplotlib.figure.Figure`
    A high-level figure instance.

---
## key_press_handler
```python
from backend_bases import key_press_handler
```

Implement the default Matplotlib key bindings for the canvas and toolbar
described at :ref:`key-event-handling`.

Parameters
----------
event : `KeyEvent`
    A key press/release event.
canvas : `FigureCanvasBase`, default: ``event.canvas``
    The backend-specific canvas instance.  This parameter is kept for
    back-compatibility, but, if set, should always be equal to
    ``event.canvas``.
toolbar : `NavigationToolbar2`, default: ``event.canvas.toolbar``
    The navigation cursor toolbar.  This parameter is kept for
    back-compatibility, but, if set, should always be equal to
    ``event.canvas.toolbar``.

---
## button_press_handler
```python
from backend_bases import button_press_handler
```

The default Matplotlib button actions for extra mouse buttons.

Parameters are as for `key_press_handler`, except that *event* is a
`MouseEvent`.

---
## NonGuiException
```python
from backend_bases import NonGuiException
```

Raised when trying show a figure in a non-GUI backend.

---
## FigureManagerBase
```python
from backend_bases import FigureManagerBase
```

A backend-independent abstraction of a figure container and controller.

The figure manager is used by pyplot to interact with the window in a
backend-independent way. It's an adapter for the real (GUI) framework that
represents the visual figure on screen.

The figure manager is connected to a specific canvas instance, which in turn
is connected to a specific figure instance. To access a figure manager for
a given figure in user code, you typically use ``fig.canvas.manager``.

GUI backends derive from this class to translate common operations such
as *show* or *resize* to the GUI-specific code. Non-GUI backends do not
support these operations and can just use the base class.

This following basic operations are accessible:

**Window operations**

- `~.FigureManagerBase.show`
- `~.FigureManagerBase.destroy`
- `~.FigureManagerBase.full_screen_toggle`
- `~.FigureManagerBase.resize`
- `~.FigureManagerBase.get_window_title`
- `~.FigureManagerBase.set_window_title`

**Key and mouse button press handling**

The figure manager sets up default key and mouse button press handling by
hooking up the `.key_press_handler` to the matplotlib event system. This
ensures the same shortcuts and mouse actions across backends.

**Other operations**

Subclasses will have additional attributes and functions to access
additional functionality. This is of course backend-specific. For example,
most GUI backends have ``window`` and ``toolbar`` attributes that give
access to the native GUI widgets of the respective framework.

Attributes
----------
canvas : `FigureCanvasBase`
    The backend-specific canvas instance.

num : int or str
    The figure number.

key_press_handler_id : int
    The default key handler cid, when using the toolmanager.
    To disable the default key press handling use::

        figure.canvas.mpl_disconnect(
            figure.canvas.manager.key_press_handler_id)

button_press_handler_id : int
    The default mouse button handler cid, when using the toolmanager.
    To disable the default button press handling use::

        figure.canvas.mpl_disconnect(
            figure.canvas.manager.button_press_handler_id)

---
## _Mode
```python
from backend_bases import _Mode
```



---
## NavigationToolbar2
```python
from backend_bases import NavigationToolbar2
```

Base class for the navigation cursor, version 2.

Backends must implement a canvas that handles connections for
'button_press_event' and 'button_release_event'.  See
:meth:`FigureCanvasBase.mpl_connect` for more information.

They must also define

:meth:`save_figure`
    Save the current figure.

:meth:`draw_rubberband` (optional)
    Draw the zoom to rect "rubberband" rectangle.

:meth:`set_message` (optional)
    Display message.

:meth:`set_history_buttons` (optional)
    You can change the history back / forward buttons to indicate disabled / enabled
    state.

and override ``__init__`` to set up the toolbar -- without forgetting to
call the base-class init.  Typically, ``__init__`` needs to set up toolbar
buttons connected to the `home`, `back`, `forward`, `pan`, `zoom`, and
`save_figure` methods and using standard icons in the "images" subdirectory
of the data path.

That's it, we'll do the rest!

---
## ToolContainerBase
```python
from backend_bases import ToolContainerBase
```

Base class for all tool containers, e.g. toolbars.

Attributes
----------
toolmanager : `.ToolManager`
    The tools with which this `ToolContainer` wants to communicate.

---
## _Backend
```python
from backend_bases import _Backend
```



---
## ShowBase
```python
from backend_bases import ShowBase
```

Simple base class to generate a ``show()`` function in backends.

Subclass must override ``mainloop()`` method.

---
## __init__
```python
from backend_bases import __init__
```



---
## open_group
```python
from backend_bases import open_group
```

Open a grouping element with label *s* and *gid* (if set) as id.

Only used by the SVG renderer.

---
## close_group
```python
from backend_bases import close_group
```

Close a grouping element with label *s*.

Only used by the SVG renderer.

---
## draw_path
```python
from backend_bases import draw_path
```

Draw a `~.path.Path` instance using the given affine transform.

---
## draw_markers
```python
from backend_bases import draw_markers
```

Draw a marker at each of *path*'s vertices (excluding control points).

The base (fallback) implementation makes multiple calls to `draw_path`.
Backends may want to override this method in order to draw the marker
only once and reuse it multiple times.

Parameters
----------
gc : `.GraphicsContextBase`
    The graphics context.
marker_path : `~matplotlib.path.Path`
    The path for the marker.
marker_trans : `~matplotlib.transforms.Transform`
    An affine transform applied to the marker.
path : `~matplotlib.path.Path`
    The locations to draw the markers.
trans : `~matplotlib.transforms.Transform`
    An affine transform applied to the path.
rgbFace : :mpltype:`color`, optional

---
## draw_path_collection
```python
from backend_bases import draw_path_collection
```

Draw a collection of *paths*.

Each path is first transformed by the corresponding entry
in *all_transforms* (a list of (3, 3) matrices) and then by
*master_transform*.  They are then translated by the corresponding
entry in *offsets*, which has been first transformed by *offset_trans*.

*facecolors*, *edgecolors*, *linewidths*, *linestyles*, and
*antialiased* are lists that set the corresponding properties.

*offset_position* is unused now, but the argument is kept for
backwards compatibility.

The base (fallback) implementation makes multiple calls to `draw_path`.
Backends may want to override this in order to render each set of
path data only once, and then reference that path multiple times with
the different offsets, colors, styles etc.  The generator methods
`_iter_collection_raw_paths` and `_iter_collection` are provided to
help with (and standardize) the implementation across backends.  It
is highly recommended to use those generators, so that changes to the
behavior of `draw_path_collection` can be made globally.

---
## draw_quad_mesh
```python
from backend_bases import draw_quad_mesh
```

Draw a quadmesh.

The base (fallback) implementation converts the quadmesh to paths and
then calls `draw_path_collection`.

---
## draw_gouraud_triangles
```python
from backend_bases import draw_gouraud_triangles
```

Draw a series of Gouraud triangles.

Parameters
----------
gc : `.GraphicsContextBase`
    The graphics context.
triangles_array : (N, 3, 2) array-like
    Array of *N* (x, y) points for the triangles.
colors_array : (N, 3, 4) array-like
    Array of *N* RGBA colors for each point of the triangles.
transform : `~matplotlib.transforms.Transform`
    An affine transform to apply to the points.

---
## _iter_collection_raw_paths
```python
from backend_bases import _iter_collection_raw_paths
```

Helper method (along with `_iter_collection`) to implement
`draw_path_collection` in a memory-efficient manner.

This method yields all of the base path/transform combinations, given a
master transform, a list of paths and list of transforms.

The arguments should be exactly what is passed in to
`draw_path_collection`.

The backend should take each yielded path and transform and create an
object that can be referenced (reused) later.

---
## _iter_collection_uses_per_path
```python
from backend_bases import _iter_collection_uses_per_path
```

Compute how many times each raw path object returned by
`_iter_collection_raw_paths` would be used when calling
`_iter_collection`. This is intended for the backend to decide
on the tradeoff between using the paths in-line and storing
them once and reusing. Rounds up in case the number of uses
is not the same for every path.

---
## _iter_collection
```python
from backend_bases import _iter_collection
```

Helper method (along with `_iter_collection_raw_paths`) to implement
`draw_path_collection` in a memory-efficient manner.

This method yields all of the path, offset and graphics context
combinations to draw the path collection.  The caller should already
have looped over the results of `_iter_collection_raw_paths` to draw
this collection.

The arguments should be the same as that passed into
`draw_path_collection`, with the exception of *path_ids*, which is a
list of arbitrary objects that the backend will use to reference one of
the paths created in the `_iter_collection_raw_paths` stage.

Each yielded result is of the form::

   xo, yo, path_id, gc, rgbFace

where *xo*, *yo* is an offset; *path_id* is one of the elements of
*path_ids*; *gc* is a graphics context and *rgbFace* is a color to
use for filling the path.

---
## get_image_magnification
```python
from backend_bases import get_image_magnification
```

Get the factor by which to magnify images passed to `draw_image`.
Allows a backend to have images at a different resolution to other
artists.

---
## draw_image
```python
from backend_bases import draw_image
```

Draw an RGBA image.

Parameters
----------
gc : `.GraphicsContextBase`
    A graphics context with clipping information.

x : scalar
    The distance in physical units (i.e., dots or pixels) from the left
    hand side of the canvas.

y : scalar
    The distance in physical units (i.e., dots or pixels) from the
    bottom side of the canvas.

im : (N, M, 4) array of `numpy.uint8`
    An array of RGBA pixels.

transform : `~matplotlib.transforms.Affine2DBase`
    If and only if the concrete backend is written such that
    `option_scale_image` returns ``True``, an affine transformation
    (i.e., an `.Affine2DBase`) *may* be passed to `draw_image`.  The
    translation vector of the transformation is given in physical units
    (i.e., dots or pixels). Note that the transformation does not
    override *x* and *y*, and has to be applied *before* translating
    the result by *x* and *y* (this can be accomplished by adding *x*
    and *y* to the translation vector defined by *transform*).

---
## option_image_nocomposite
```python
from backend_bases import option_image_nocomposite
```

Return whether image composition by Matplotlib should be skipped.

Raster backends should usually return False (letting the C-level
rasterizer take care of image composition); vector backends should
usually return ``not rcParams["image.composite_image"]``.

---
## option_scale_image
```python
from backend_bases import option_scale_image
```

Return whether arbitrary affine transformations in `draw_image` are
supported (True for most vector backends).

---
## draw_tex
```python
from backend_bases import draw_tex
```

Draw a TeX instance.

Parameters
----------
gc : `.GraphicsContextBase`
    The graphics context.
x : float
    The x location of the text in display coords.
y : float
    The y location of the text baseline in display coords.
s : str
    The TeX text string.
prop : `~matplotlib.font_manager.FontProperties`
    The font properties.
angle : float
    The rotation angle in degrees anti-clockwise.
mtext : `~matplotlib.text.Text`
    The original text object to be rendered.

---
## draw_text
```python
from backend_bases import draw_text
```

Draw a text instance.

Parameters
----------
gc : `.GraphicsContextBase`
    The graphics context.
x : float
    The x location of the text in display coords.
y : float
    The y location of the text baseline in display coords.
s : str
    The text string.
prop : `~matplotlib.font_manager.FontProperties`
    The font properties.
angle : float
    The rotation angle in degrees anti-clockwise.
ismath : bool or "TeX"
    If True, use mathtext parser. If "TeX", use tex for rendering.
mtext : `~matplotlib.text.Text`
    The original text object to be rendered.

---
## _get_text_path_transform
```python
from backend_bases import _get_text_path_transform
```

Return the text path and transform.

Parameters
----------
x : float
    The x location of the text in display coords.
y : float
    The y location of the text baseline in display coords.
s : str
    The text to be converted.
prop : `~matplotlib.font_manager.FontProperties`
    The font property.
angle : float
    Angle in degrees to render the text at.
ismath : bool or "TeX"
    If True, use mathtext parser. If "TeX", use tex for rendering.

---
## _draw_text_as_path
```python
from backend_bases import _draw_text_as_path
```

Draw the text by converting them to paths using `.TextToPath`.

Parameters
----------
gc : `.GraphicsContextBase`
    The graphics context.
x : float
    The x location of the text in display coords.
y : float
    The y location of the text baseline in display coords.
s : str
    The text to be converted.
prop : `~matplotlib.font_manager.FontProperties`
    The font property.
angle : float
    Angle in degrees to render the text at.
ismath : bool or "TeX"
    If True, use mathtext parser. If "TeX", use tex for rendering.

---
## get_text_width_height_descent
```python
from backend_bases import get_text_width_height_descent
```

Get the width, height, and descent (offset from the bottom to the baseline), in
display coords, of the string *s* with `.FontProperties` *prop*.

Whitespace at the start and the end of *s* is included in the reported width.

---
## flipy
```python
from backend_bases import flipy
```

Return whether y values increase from top to bottom.

Note that this only affects drawing of texts.

---
## get_canvas_width_height
```python
from backend_bases import get_canvas_width_height
```

Return the canvas width and height in display coords.

---
## get_texmanager
```python
from backend_bases import get_texmanager
```

Return the `.TexManager` instance.

---
## new_gc
```python
from backend_bases import new_gc
```

Return an instance of a `.GraphicsContextBase`.

---
## points_to_pixels
```python
from backend_bases import points_to_pixels
```

Convert points to display units.

You need to override this function (unless your backend
doesn't have a dpi, e.g., postscript or svg).  Some imaging
systems assume some value for pixels per inch::

    points to pixels = points * pixels_per_inch/72 * dpi/72

Parameters
----------
points : float or array-like

Returns
-------
Points converted to pixels

---
## start_rasterizing
```python
from backend_bases import start_rasterizing
```

Switch to the raster renderer.

Used by `.MixedModeRenderer`.

---
## stop_rasterizing
```python
from backend_bases import stop_rasterizing
```

Switch back to the vector renderer and draw the contents of the raster
renderer as an image on the vector renderer.

Used by `.MixedModeRenderer`.

---
## start_filter
```python
from backend_bases import start_filter
```

Switch to a temporary renderer for image filtering effects.

Currently only supported by the agg renderer.

---
## stop_filter
```python
from backend_bases import stop_filter
```

Switch back to the original renderer.  The contents of the temporary
renderer is processed with the *filter_func* and is drawn on the
original renderer as an image.

Currently only supported by the agg renderer.

---
## _draw_disabled
```python
from backend_bases import _draw_disabled
```

Context manager to temporary disable drawing.

This is used for getting the drawn size of Artists.  This lets us
run the draw process to update any Python state but does not pay the
cost of the draw_XYZ calls on the canvas.

---
## copy_properties
```python
from backend_bases import copy_properties
```

Copy properties from *gc* to self.

---
## restore
```python
from backend_bases import restore
```

Restore the graphics context from the stack - needed only
for backends that save graphics contexts on a stack.

---
## get_alpha
```python
from backend_bases import get_alpha
```

Return the alpha value used for blending - not supported on all
backends.

---
## get_antialiased
```python
from backend_bases import get_antialiased
```

Return whether the object should try to do antialiased rendering.

---
## get_capstyle
```python
from backend_bases import get_capstyle
```

Return the `.CapStyle`.

---
## get_clip_rectangle
```python
from backend_bases import get_clip_rectangle
```

Return the clip rectangle as a `~matplotlib.transforms.Bbox` instance.

---
## get_clip_path
```python
from backend_bases import get_clip_path
```

Return the clip path in the form (path, transform), where path
is a `~.path.Path` instance, and transform is
an affine transform to apply to the path before clipping.

---
## get_dashes
```python
from backend_bases import get_dashes
```

Return the dash style as an (offset, dash-list) pair.

See `.set_dashes` for details.

Default value is (None, None).

---
## get_forced_alpha
```python
from backend_bases import get_forced_alpha
```

Return whether the value given by get_alpha() should be used to
override any other alpha-channel values.

---
## get_joinstyle
```python
from backend_bases import get_joinstyle
```

Return the `.JoinStyle`.

---
## get_linewidth
```python
from backend_bases import get_linewidth
```

Return the line width in points.

---
## get_rgb
```python
from backend_bases import get_rgb
```

Return a tuple of three or four floats from 0-1.

---
## get_url
```python
from backend_bases import get_url
```

Return a url if one is set, None otherwise.

---
## get_gid
```python
from backend_bases import get_gid
```

Return the object identifier if one is set, None otherwise.

---
## get_snap
```python
from backend_bases import get_snap
```

Return the snap setting, which can be:

* True: snap vertices to the nearest pixel center
* False: leave vertices as-is
* None: (auto) If the path contains only rectilinear line segments,
  round to the nearest pixel center

---
## set_alpha
```python
from backend_bases import set_alpha
```

Set the alpha value used for blending - not supported on all backends.

If ``alpha=None`` (the default), the alpha components of the
foreground and fill colors will be used to set their respective
transparencies (where applicable); otherwise, ``alpha`` will override
them.

---
## set_antialiased
```python
from backend_bases import set_antialiased
```

Set whether object should be drawn with antialiased rendering.

---
## set_capstyle
```python
from backend_bases import set_capstyle
```

Set how to draw endpoints of lines.

Parameters
----------
cs : `.CapStyle` or %(CapStyle)s

---
## set_clip_rectangle
```python
from backend_bases import set_clip_rectangle
```

Set the clip rectangle to a `.Bbox` or None.

---
## set_clip_path
```python
from backend_bases import set_clip_path
```

Set the clip path to a `.TransformedPath` or None.

---
## set_dashes
```python
from backend_bases import set_dashes
```

Set the dash style for the gc.

Parameters
----------
dash_offset : float
    Distance, in points, into the dash pattern at which to
    start the pattern. It is usually set to 0.
dash_list : array-like or None
    The on-off sequence as points.  None specifies a solid line. All
    values must otherwise be non-negative (:math:`\ge 0`).

Notes
-----
See p. 666 of the PostScript
`Language Reference
<https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf>`_
for more info.

---
## set_foreground
```python
from backend_bases import set_foreground
```

Set the foreground color.

Parameters
----------
fg : :mpltype:`color`
isRGBA : bool
    If *fg* is known to be an ``(r, g, b, a)`` tuple, *isRGBA* can be
    set to True to improve performance.

---
## set_joinstyle
```python
from backend_bases import set_joinstyle
```

Set how to draw connections between line segments.

Parameters
----------
js : `.JoinStyle` or %(JoinStyle)s

---
## set_linewidth
```python
from backend_bases import set_linewidth
```

Set the linewidth in points.

---
## set_url
```python
from backend_bases import set_url
```

Set the url for links in compatible backends.

---
## set_gid
```python
from backend_bases import set_gid
```

Set the id.

---
## set_snap
```python
from backend_bases import set_snap
```

Set the snap setting which may be:

* True: snap vertices to the nearest pixel center
* False: leave vertices as-is
* None: (auto) If the path contains only rectilinear line segments,
  round to the nearest pixel center

---
## set_hatch
```python
from backend_bases import set_hatch
```

Set the hatch style (for fills).

---
## get_hatch
```python
from backend_bases import get_hatch
```

Get the current hatch style.

---
## get_hatch_path
```python
from backend_bases import get_hatch_path
```

Return a `.Path` for the current hatch.

---
## get_hatch_color
```python
from backend_bases import get_hatch_color
```

Get the hatch color.

---
## set_hatch_color
```python
from backend_bases import set_hatch_color
```

Set the hatch color.

---
## get_hatch_linewidth
```python
from backend_bases import get_hatch_linewidth
```

Get the hatch linewidth.

---
## get_sketch_params
```python
from backend_bases import get_sketch_params
```

Return the sketch parameters for the artist.

Returns
-------
tuple or `None`

    A 3-tuple with the following elements:

    * ``scale``: The amplitude of the wiggle perpendicular to the
      source line.
    * ``length``: The length of the wiggle along the line.
    * ``randomness``: The scale factor by which the length is
      shrunken or expanded.

    May return `None` if no sketch parameters were set.

---
## set_sketch_params
```python
from backend_bases import set_sketch_params
```

Set the sketch parameters.

Parameters
----------
scale : float, optional
    The amplitude of the wiggle perpendicular to the source line, in
    pixels.  If scale is `None`, or not provided, no sketch filter will
    be provided.
length : float, default: 128
    The length of the wiggle along the line, in pixels.
randomness : float, default: 16
    The scale factor by which the length is shrunken or expanded.

---
## __del__
```python
from backend_bases import __del__
```

Need to stop timer and possibly disconnect timer.

---
## start
```python
from backend_bases import start
```

Start the timer object.

Parameters
----------
interval : int, optional
    Timer interval in milliseconds; overrides a previously set interval
    if provided.

---
## stop
```python
from backend_bases import stop
```

Stop the timer.

---
## _timer_start
```python
from backend_bases import _timer_start
```



---
## _timer_stop
```python
from backend_bases import _timer_stop
```



---
## interval
```python
from backend_bases import interval
```



---
## single_shot
```python
from backend_bases import single_shot
```



---
## add_callback
```python
from backend_bases import add_callback
```

Register *func* to be called by timer when the event fires. Any
additional arguments provided will be passed to *func*.

This function returns *func*, which makes it possible to use it as a
decorator.

---
## remove_callback
```python
from backend_bases import remove_callback
```

Remove *func* from list of callbacks.

*args* and *kwargs* are optional and used to distinguish between copies
of the same function registered to be called with different arguments.
This behavior is deprecated.  In the future, ``*args, **kwargs`` won't
be considered anymore; to keep a specific callback removable by itself,
pass it to `add_callback` as a `functools.partial` object.

---
## _timer_set_interval
```python
from backend_bases import _timer_set_interval
```

Used to set interval on underlying timer object.

---
## _timer_set_single_shot
```python
from backend_bases import _timer_set_single_shot
```

Used to set single shot on underlying timer object.

---
## _on_timer
```python
from backend_bases import _on_timer
```

Runs all function that have been registered as callbacks. Functions
can return False (or 0) if they should not be called any more. If there
are no callbacks, the timer is automatically stopped.

---
## _process
```python
from backend_bases import _process
```

Process this event on ``self.canvas``, then unset ``guiEvent``.

---
## guiEvent
```python
from backend_bases import guiEvent
```



---
## _set_inaxes
```python
from backend_bases import _set_inaxes
```



---
## __str__
```python
from backend_bases import __str__
```



---
## Done
```python
from backend_bases import Done
```



---
## _draw
```python
from backend_bases import _draw
```



---
## save_args_and_handle_sigint
```python
from backend_bases import save_args_and_handle_sigint
```



---
## supports_blit
```python
from backend_bases import supports_blit
```

If this Canvas sub-class supports blitting.

---
## _fix_ipython_backend2gui
```python
from backend_bases import _fix_ipython_backend2gui
```



---
## new_manager
```python
from backend_bases import new_manager
```

Create a new figure manager for *figure*, using this canvas class.

Notes
-----
This method should not be reimplemented in subclasses.  If
custom manager creation logic is needed, please reimplement
``FigureManager.create_with_canvas``.

---
## _idle_draw_cntx
```python
from backend_bases import _idle_draw_cntx
```



---
## is_saving
```python
from backend_bases import is_saving
```

Return whether the renderer is in the process of saving
to a file, rather than rendering for an on-screen buffer.

---
## blit
```python
from backend_bases import blit
```

Blit the canvas in bbox (default entire canvas).

---
## inaxes
```python
from backend_bases import inaxes
```

Return the topmost visible `~.axes.Axes` containing the point *xy*.

Parameters
----------
xy : (float, float)
    (x, y) pixel positions from left/bottom of the canvas.

Returns
-------
`~matplotlib.axes.Axes` or None
    The topmost visible Axes containing the point, or None if there
    is no Axes at the point.

---
## grab_mouse
```python
from backend_bases import grab_mouse
```

Set the child `~.axes.Axes` which is grabbing the mouse events.

Usually called by the widgets themselves. It is an error to call this
if the mouse is already grabbed by another Axes.

---
## release_mouse
```python
from backend_bases import release_mouse
```

Release the mouse grab held by the `~.axes.Axes` *ax*.

Usually called by the widgets. It is ok to call this even if *ax*
doesn't have the mouse grab currently.

---
## set_cursor
```python
from backend_bases import set_cursor
```

Set the current cursor.

This may have no effect if the backend does not display anything.

If required by the backend, this method should trigger an update in
the backend event loop after the cursor is set, as this method may be
called e.g. before a long-running task during which the GUI is not
updated.

Parameters
----------
cursor : `.Cursors`
    The cursor to display over the canvas. Note: some backends may
    change the cursor for the entire window.

---
## draw
```python
from backend_bases import draw
```

Render the `.Figure`.

This method must walk the artist tree, even if no output is produced,
because it triggers deferred work that users may want to access
before saving output to disk. For example computing limits,
auto-limits, and tick values.

---
## draw_idle
```python
from backend_bases import draw_idle
```

Request a widget redraw once control returns to the GUI event loop.

Even if multiple calls to `draw_idle` occur before control returns
to the GUI event loop, the figure will only be rendered once.

Notes
-----
Backends may choose to override the method and implement their own
strategy to prevent multiple renderings.

---
## device_pixel_ratio
```python
from backend_bases import device_pixel_ratio
```

The ratio of physical to logical pixels used for the canvas on screen.

By default, this is 1, meaning physical and logical pixels are the same
size. Subclasses that support High DPI screens may set this property to
indicate that said ratio is different. All Matplotlib interaction,
unless working directly with the canvas, remains in logical pixels.

---
## _set_device_pixel_ratio
```python
from backend_bases import _set_device_pixel_ratio
```

Set the ratio of physical to logical pixels used for the canvas.

Subclasses that support High DPI screens can set this property to
indicate that said ratio is different. The canvas itself will be
created at the physical size, while the client side will use the
logical size. Thus the DPI of the Figure will change to be scaled by
this ratio. Implementations that support High DPI screens should use
physical pixels for events so that transforms back to Axes space are
correct.

By default, this is 1, meaning physical and logical pixels are the same
size.

Parameters
----------
ratio : float
    The ratio of logical to physical pixels used for the canvas.

Returns
-------
bool
    Whether the ratio has changed. Backends may interpret this as a
    signal to resize the window, repaint the canvas, or change any
    other relevant properties.

---
## get_width_height
```python
from backend_bases import get_width_height
```

Return the figure width and height in integral points or pixels.

When the figure is used on High DPI screens (and the backend supports
it), the truncation to integers occurs after scaling by the device
pixel ratio.

Parameters
----------
physical : bool, default: False
    Whether to return true physical pixels or logical pixels. Physical
    pixels may be used by backends that support HiDPI, but still
    configure the canvas using its actual size.

Returns
-------
width, height : int
    The size of the figure, in points or pixels, depending on the
    backend.

---
## get_supported_filetypes
```python
from backend_bases import get_supported_filetypes
```

Return dict of savefig file formats supported by this backend.

---
## get_supported_filetypes_grouped
```python
from backend_bases import get_supported_filetypes_grouped
```

Return a dict of savefig file formats supported by this backend,
where the keys are a file type name, such as 'Joint Photographic
Experts Group', and the values are a list of filename extensions used
for that filetype, such as ['jpg', 'jpeg'].

---
## _switch_canvas_and_return_print_method
```python
from backend_bases import _switch_canvas_and_return_print_method
```

Context manager temporarily setting the canvas for saving the figure::

    with canvas._switch_canvas_and_return_print_method(fmt, backend) \
            as print_method:
        # ``print_method`` is a suitable ``print_{fmt}`` method, and
        # the figure's canvas is temporarily switched to the method's
        # canvas within the with... block.  ``print_method`` is also
        # wrapped to suppress extra kwargs passed by ``print_figure``.

Parameters
----------
fmt : str
    If *backend* is None, then determine a suitable canvas class for
    saving to format *fmt* -- either the current canvas class, if it
    supports *fmt*, or whatever `get_registered_canvas_class` returns;
    switch the figure canvas to that canvas class.
backend : str or None, default: None
    If not None, switch the figure canvas to the ``FigureCanvas`` class
    of the given backend.

---
## print_figure
```python
from backend_bases import print_figure
```

Render the figure to hardcopy. Set the figure patch face and edge
colors.  This is useful because some of the GUIs have a gray figure
face color background and you'll probably want to override this on
hardcopy.

Parameters
----------
filename : str or path-like or file-like
    The file where the figure is saved.

dpi : float, default: :rc:`savefig.dpi`
    The dots per inch to save the figure in.

facecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.facecolor`
    The facecolor of the figure.  If 'auto', use the current figure
    facecolor.

edgecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.edgecolor`
    The edgecolor of the figure.  If 'auto', use the current figure
    edgecolor.

orientation : {'landscape', 'portrait'}, default: 'portrait'
    Only currently applies to PostScript printing.

format : str, optional
    Force a specific file format. If not given, the format is inferred
    from the *filename* extension, and if that fails from
    :rc:`savefig.format`.

bbox_inches : 'tight' or `.Bbox`, default: :rc:`savefig.bbox`
    Bounding box in inches: only the given portion of the figure is
    saved.  If 'tight', try to figure out the tight bbox of the figure.

pad_inches : float or 'layout', default: :rc:`savefig.pad_inches`
    Amount of padding in inches around the figure when bbox_inches is
    'tight'. If 'layout' use the padding from the constrained or
    compressed layout engine; ignored if one of those engines is not in
    use.

bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
    A list of extra artists that will be considered when the
    tight bbox is calculated.

backend : str, optional
    Use a non-default backend to render the file, e.g. to render a
    png file with the "cairo" backend rather than the default "agg",
    or a pdf file with the "pgf" backend rather than the default
    "pdf".  Note that the default backend is normally sufficient.  See
    :ref:`the-builtin-backends` for a list of valid backends for each
    file format.  Custom backends can be referenced as "module://...".

---
## get_default_filetype
```python
from backend_bases import get_default_filetype
```

Return the default savefig file format as specified in
:rc:`savefig.format`.

The returned string does not include a period. This method is
overridden in backends that only support a single file type.

---
## get_default_filename
```python
from backend_bases import get_default_filename
```

Return a string, which includes extension, suitable for use as
a default filename.

---
## switch_backends
```python
from backend_bases import switch_backends
```

Instantiate an instance of FigureCanvasClass

This is used for backend switching, e.g., to instantiate a
FigureCanvasPS from a FigureCanvasGTK.  Note, deep copying is
not done, so any changes to one of the instances (e.g., setting
figure size or line props), will be reflected in the other

---
## mpl_connect
```python
from backend_bases import mpl_connect
```

Bind function *func* to event *s*.

Parameters
----------
s : str
    One of the following events ids:

    - 'button_press_event'
    - 'button_release_event'
    - 'draw_event'
    - 'key_press_event'
    - 'key_release_event'
    - 'motion_notify_event'
    - 'pick_event'
    - 'resize_event'
    - 'scroll_event'
    - 'figure_enter_event',
    - 'figure_leave_event',
    - 'axes_enter_event',
    - 'axes_leave_event'
    - 'close_event'.

func : callable
    The callback function to be executed, which must have the
    signature::

        def func(event: Event) -> Any

    For the location events (button and key press/release), if the
    mouse is over the Axes, the ``inaxes`` attribute of the event will
    be set to the `~matplotlib.axes.Axes` the event occurs is over, and
    additionally, the variables ``xdata`` and ``ydata`` attributes will
    be set to the mouse location in data coordinates.  See `.KeyEvent`
    and `.MouseEvent` for more info.

    .. note::

        If func is a method, this only stores a weak reference to the
        method. Thus, the figure does not influence the lifetime of
        the associated object. Usually, you want to make sure that the
        object is kept alive throughout the lifetime of the figure by
        holding a reference to it.

Returns
-------
cid
    A connection id that can be used with
    `.FigureCanvasBase.mpl_disconnect`.

Examples
--------
::

    def on_press(event):
        print('you pressed', event.button, event.xdata, event.ydata)

    cid = canvas.mpl_connect('button_press_event', on_press)

---
## mpl_disconnect
```python
from backend_bases import mpl_disconnect
```

Disconnect the callback with id *cid*.

Examples
--------
::

    cid = canvas.mpl_connect('button_press_event', on_press)
    # ... later
    canvas.mpl_disconnect(cid)

---
## new_timer
```python
from backend_bases import new_timer
```

Create a new backend-specific subclass of `.Timer`.

This is useful for getting periodic events through the backend's native
event loop.  Implemented only for backends with GUIs.

Parameters
----------
interval : int
    Timer interval in milliseconds.

callbacks : list[tuple[callable, tuple, dict]]
    Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
    will be executed by the timer every *interval*.

    Callbacks which return ``False`` or ``0`` will be removed from the
    timer.

Examples
--------
>>> timer = fig.canvas.new_timer(callbacks=[(f1, (1,), {'a': 3})])

---
## flush_events
```python
from backend_bases import flush_events
```

Flush the GUI events for the figure.

Interactive backends need to reimplement this method.

---
## start_event_loop
```python
from backend_bases import start_event_loop
```

Start a blocking event loop.

Such an event loop is used by interactive functions, such as
`~.Figure.ginput` and `~.Figure.waitforbuttonpress`, to wait for
events.

The event loop blocks until a callback function triggers
`stop_event_loop`, or *timeout* is reached.

If *timeout* is 0 or negative, never timeout.

Only interactive backends need to reimplement this method and it relies
on `flush_events` being properly implemented.

Interactive backends should implement this in a more native way.

---
## stop_event_loop
```python
from backend_bases import stop_event_loop
```

Stop the current blocking event loop.

Interactive backends need to reimplement this to match
`start_event_loop`

---
## _get_uniform_gridstate
```python
from backend_bases import _get_uniform_gridstate
```



---
## create_with_canvas
```python
from backend_bases import create_with_canvas
```

Create a manager for a given *figure* using a specific *canvas_class*.

Backends should override this method if they have specific needs for
setting up the canvas or the manager.

---
## start_main_loop
```python
from backend_bases import start_main_loop
```

Start the main event loop.

This method is called by `.FigureManagerBase.pyplot_show`, which is the
implementation of `.pyplot.show`.  To customize the behavior of
`.pyplot.show`, interactive backends should usually override
`~.FigureManagerBase.start_main_loop`; if more customized logic is
necessary, `~.FigureManagerBase.pyplot_show` can also be overridden.

---
## pyplot_show
```python
from backend_bases import pyplot_show
```

Show all figures.  This method is the implementation of `.pyplot.show`.

To customize the behavior of `.pyplot.show`, interactive backends
should usually override `~.FigureManagerBase.start_main_loop`; if more
customized logic is necessary, `~.FigureManagerBase.pyplot_show` can
also be overridden.

Parameters
----------
block : bool, optional
    Whether to block by calling ``start_main_loop``.  The default,
    None, means to block if we are neither in IPython's ``%pylab`` mode
    nor in ``interactive`` mode.

---
## show
```python
from backend_bases import show
```

Show all figures.

`show` blocks by calling `mainloop` if *block* is ``True``, or if it is
``None`` and we are not in `interactive` mode and if IPython's
``%matplotlib`` integration has not been activated.

---
## destroy
```python
from backend_bases import destroy
```



---
## full_screen_toggle
```python
from backend_bases import full_screen_toggle
```



---
## resize
```python
from backend_bases import resize
```

For GUI backends, resize the window (in physical pixels).

---
## get_window_title
```python
from backend_bases import get_window_title
```

Return the title text of the window containing the figure, or None
if there is no window (e.g., a PS backend).

---
## set_window_title
```python
from backend_bases import set_window_title
```

Set the title text of the window containing the figure.

This has no effect for non-GUI (e.g., PS) backends.

Examples
--------
>>> fig = plt.figure()
>>> fig.canvas.manager.set_window_title('My figure')

---
## _navigate_mode
```python
from backend_bases import _navigate_mode
```



---
## set_message
```python
from backend_bases import set_message
```

Display a message on the toolbar.

Parameters
----------
s : str
    Message text.

---
## draw_rubberband
```python
from backend_bases import draw_rubberband
```

Draw a rectangle rubberband to indicate zoom limits.

Note that it is not guaranteed that ``x0 <= x1`` and ``y0 <= y1``.

---
## remove_rubberband
```python
from backend_bases import remove_rubberband
```

Remove the rubberband.

---
## home
```python
from backend_bases import home
```

Restore the original view.

For convenience of being directly connected as a GUI callback, which
often get passed additional parameters, this method accepts arbitrary
parameters, but does not use them.

---
## back
```python
from backend_bases import back
```

Move back up the view lim stack.

For convenience of being directly connected as a GUI callback, which
often get passed additional parameters, this method accepts arbitrary
parameters, but does not use them.

---
## forward
```python
from backend_bases import forward
```

Move forward in the view lim stack.

For convenience of being directly connected as a GUI callback, which
often get passed additional parameters, this method accepts arbitrary
parameters, but does not use them.

---
## _update_cursor
```python
from backend_bases import _update_cursor
```

Update the cursor after a mouse move event or a tool (de)activation.

---
## _wait_cursor_for_draw_cm
```python
from backend_bases import _wait_cursor_for_draw_cm
```

Set the cursor to a wait cursor when drawing the canvas.

In order to avoid constantly changing the cursor when the canvas
changes frequently, do nothing if this context was triggered during the
last second.  (Optimally we'd prefer only setting the wait cursor if
the *current* draw takes too long, but the current draw blocks the GUI
thread).

---
## _mouse_event_to_message
```python
from backend_bases import _mouse_event_to_message
```



---
## mouse_move
```python
from backend_bases import mouse_move
```



---
## _zoom_pan_handler
```python
from backend_bases import _zoom_pan_handler
```



---
## _start_event_axes_interaction
```python
from backend_bases import _start_event_axes_interaction
```



---
## pan
```python
from backend_bases import pan
```

Toggle the pan/zoom tool.

Pan with left button, zoom with right.

---
## press_pan
```python
from backend_bases import press_pan
```

Callback for mouse button press in pan/zoom mode.

---
## drag_pan
```python
from backend_bases import drag_pan
```

Callback for dragging in pan/zoom mode.

---
## release_pan
```python
from backend_bases import release_pan
```

Callback for mouse button release in pan/zoom mode.

---
## zoom
```python
from backend_bases import zoom
```



---
## press_zoom
```python
from backend_bases import press_zoom
```

Callback for mouse button press in zoom to rect mode.

---
## drag_zoom
```python
from backend_bases import drag_zoom
```

Callback for dragging in zoom mode.

---
## release_zoom
```python
from backend_bases import release_zoom
```

Callback for mouse button release in zoom to rect mode.

---
## push_current
```python
from backend_bases import push_current
```

Push the current view limits and position onto the stack.

---
## _update_view
```python
from backend_bases import _update_view
```

Update the viewlim and position from the view and position stack for
each Axes.

---
## configure_subplots
```python
from backend_bases import configure_subplots
```



---
## save_figure
```python
from backend_bases import save_figure
```

Save the current figure.

---
## update
```python
from backend_bases import update
```

Reset the Axes stack.

---
## set_history_buttons
```python
from backend_bases import set_history_buttons
```

Enable or disable the back/forward button.

---
## _tool_toggled_cbk
```python
from backend_bases import _tool_toggled_cbk
```

Capture the 'tool_trigger_[name]'

This only gets used for toggled tools.

---
## add_tool
```python
from backend_bases import add_tool
```

Add a tool to this container.

Parameters
----------
tool : tool_like
    The tool to add, see `.ToolManager.get_tool`.
group : str
    The name of the group to add this tool to.
position : int, default: -1
    The position within the group to place this tool.

---
## _get_image_filename
```python
from backend_bases import _get_image_filename
```

Resolve a tool icon's filename.

---
## trigger_tool
```python
from backend_bases import trigger_tool
```

Trigger the tool.

Parameters
----------
name : str
    Name (id) of the tool triggered from within the container.

---
## add_toolitem
```python
from backend_bases import add_toolitem
```

A hook to add a toolitem to the container.

This hook must be implemented in each backend and contains the
backend-specific code to add an element to the toolbar.

.. warning::
    This is part of the backend implementation and should
    not be called by end-users.  They should instead call
    `.ToolContainerBase.add_tool`.

The callback associated with the button click event
must be *exactly* ``self.trigger_tool(name)``.

Parameters
----------
name : str
    Name of the tool to add, this gets used as the tool's ID and as the
    default label of the buttons.
group : str
    Name of the group that this tool belongs to.
position : int
    Position of the tool within its group, if -1 it goes at the end.
image : str
    Filename of the image for the button or `None`.
description : str
    Description of the tool, used for the tooltips.
toggle : bool
    * `True` : The button is a toggle (change the pressed/unpressed
      state between consecutive clicks).
    * `False` : The button is a normal button (returns to unpressed
      state after release).

---
## toggle_toolitem
```python
from backend_bases import toggle_toolitem
```

A hook to toggle a toolitem without firing an event.

This hook must be implemented in each backend and contains the
backend-specific code to silently toggle a toolbar element.

.. warning::
    This is part of the backend implementation and should
    not be called by end-users.  They should instead call
    `.ToolManager.trigger_tool` or `.ToolContainerBase.trigger_tool`
    (which are equivalent).

Parameters
----------
name : str
    Id of the tool to toggle.
toggled : bool
    Whether to set this tool as toggled or not.

---
## remove_toolitem
```python
from backend_bases import remove_toolitem
```

A hook to remove a toolitem from the container.

This hook must be implemented in each backend and contains the
backend-specific code to remove an element from the toolbar; it is
called when `.ToolManager` emits a `tool_removed_event`.

Because some tools are present only on the `.ToolManager` but not on
the `ToolContainer`, this method must be a no-op when called on a tool
absent from the container.

.. warning::
    This is part of the backend implementation and should
    not be called by end-users.  They should instead call
    `.ToolManager.remove_tool`.

Parameters
----------
name : str
    Name of the tool to remove.

---
## new_figure_manager
```python
from backend_bases import new_figure_manager
```

Create a new figure manager instance.

---
## new_figure_manager_given_figure
```python
from backend_bases import new_figure_manager_given_figure
```

Create a new figure manager instance for the given figure.

---
## draw_if_interactive
```python
from backend_bases import draw_if_interactive
```



---
## export
```python
from backend_bases import export
```



---
## __call__
```python
from backend_bases import __call__
```



---
## cycle_or_default
```python
from backend_bases import cycle_or_default
```



---
## notify_axes_change
```python
from backend_bases import notify_axes_change
```



---
## _ax_filter
```python
from backend_bases import _ax_filter
```



---
## _capture_events
```python
from backend_bases import _capture_events
```



---
## on_tool_fig_close
```python
from backend_bases import on_tool_fig_close
```



---
## Show
```python
from backend_bases import Show
```



---
## mainloop
```python
from backend_bases import mainloop
```



---
## ConversionError
```python
from units import ConversionError
```



---
## _is_natively_supported
```python
from units import _is_natively_supported
```

Return whether *x* is of a type that Matplotlib natively supports or an
array of objects of such types.

---
## AxisInfo
```python
from units import AxisInfo
```

Information to support default axis labeling, tick labeling, and limits.

An instance of this class must be returned by
`ConversionInterface.axisinfo`.

---
## ConversionInterface
```python
from units import ConversionInterface
```

The minimal interface for a converter to take custom data types (or
sequences) and convert them to values Matplotlib can use.

---
## DecimalConverter
```python
from units import DecimalConverter
```

Converter for decimal.Decimal data to float.

---
## Registry
```python
from units import Registry
```

Register types with conversion interface.

---
## axisinfo
```python
from units import axisinfo
```

Return an `.AxisInfo` for the axis with the specified units.

---
## default_units
```python
from units import default_units
```

Return the default unit for *x* or ``None`` for the given axis.

---
## convert
```python
from units import convert
```

Convert Decimals to floats.

The *unit* and *axis* arguments are not used.

Parameters
----------
value : decimal.Decimal or iterable
    Decimal or list of Decimal need to be converted

---
## get_converter
```python
from units import get_converter
```

Get the converter interface instance for *x*, or None.

---
## __name__
```python
from colorbar import __name__
```

Colorbars are a visualization of the mapping from scalar values to colors.
In Matplotlib they are drawn into a dedicated `~.axes.Axes`.

.. note::
   Colorbars are typically created through `.Figure.colorbar` or its pyplot
   wrapper `.pyplot.colorbar`, which internally use `.Colorbar` together with
   `.make_axes_gridspec` (for `.GridSpec`-positioned Axes) or `.make_axes` (for
   non-`.GridSpec`-positioned Axes).

   End-users most likely won't need to directly use this module's API.

---
## _set_ticks_on_axis_warn
```python
from colorbar import _set_ticks_on_axis_warn
```



---
## _ColorbarSpine
```python
from colorbar import _ColorbarSpine
```



---
## _ColorbarAxesLocator
```python
from colorbar import _ColorbarAxesLocator
```

Shrink the Axes if there are triangular or rectangular extends.

---
## Colorbar
```python
from colorbar import Colorbar
```

Draw a colorbar in an existing Axes.

Typically, colorbars are created using `.Figure.colorbar` or
`.pyplot.colorbar` and associated with `.ScalarMappable`\s (such as an
`.AxesImage` generated via `~.axes.Axes.imshow`).

In order to draw a colorbar not associated with other elements in the
figure, e.g. when showing a colormap by itself, one can create an empty
`.ScalarMappable`, or directly pass *cmap* and *norm* instead of *mappable*
to `Colorbar`.

Useful public methods are :meth:`set_label` and :meth:`add_lines`.

Attributes
----------
ax : `~matplotlib.axes.Axes`
    The `~.axes.Axes` instance in which the colorbar is drawn.
lines : list
    A list of `.LineCollection` (empty if no lines were drawn).
dividers : `.LineCollection`
    A LineCollection (empty if *drawedges* is ``False``).

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The `~.axes.Axes` instance in which the colorbar is drawn.

mappable : `.ScalarMappable`
    The mappable whose colormap and norm will be used.

    To show the under- and over- value colors, the mappable's norm should
    be specified as ::

        norm = colors.Normalize(clip=False)

    To show the colors versus index instead of on a 0-1 scale, use::

        norm=colors.NoNorm()

cmap : `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
    The colormap to use.  This parameter is ignored, unless *mappable* is
    None.

norm : `~matplotlib.colors.Normalize`
    The normalization to use.  This parameter is ignored, unless *mappable*
    is None.

alpha : float
    The colorbar transparency between 0 (transparent) and 1 (opaque).

orientation : None or {'vertical', 'horizontal'}
    If None, use the value determined by *location*. If both
    *orientation* and *location* are None then defaults to 'vertical'.

ticklocation : {'auto', 'left', 'right', 'top', 'bottom'}
    The location of the colorbar ticks. The *ticklocation* must match
    *orientation*. For example, a horizontal colorbar can only have ticks
    at the top or the bottom. If 'auto', the ticks will be the same as
    *location*, so a colorbar to the left will have ticks to the left. If
    *location* is None, the ticks will be at the bottom for a horizontal
    colorbar and at the right for a vertical.

%(_colormap_kw_doc)s

location : None or {'left', 'right', 'top', 'bottom'}
    Set the *orientation* and *ticklocation* of the colorbar using a
    single argument. Colorbars on the left and right are vertical,
    colorbars at the top and bottom are horizontal. The *ticklocation* is
    the same as *location*, so if *location* is 'top', the ticks are on
    the top. *orientation* and/or *ticklocation* can be provided as well
    and overrides the value set by *location*, but there will be an error
    for incompatible combinations.

    .. versionadded:: 3.7

---
## _normalize_location_orientation
```python
from colorbar import _normalize_location_orientation
```



---
## _get_orientation_from_location
```python
from colorbar import _get_orientation_from_location
```



---
## _get_ticklocation_from_orientation
```python
from colorbar import _get_ticklocation_from_orientation
```



---
## make_axes
```python
from colorbar import make_axes
```

Create an `~.axes.Axes` suitable for a colorbar.

The Axes is placed in the figure of the *parents* Axes, by resizing and
repositioning *parents*.

Parameters
----------
parents : `~matplotlib.axes.Axes` or iterable or `numpy.ndarray` of `~.axes.Axes`
    The Axes to use as parents for placing the colorbar.
%(_make_axes_kw_doc)s

Returns
-------
cax : `~matplotlib.axes.Axes`
    The child Axes.
kwargs : dict
    The reduced keyword dictionary to be passed when creating the colorbar
    instance.

---
## make_axes_gridspec
```python
from colorbar import make_axes_gridspec
```

Create an `~.axes.Axes` suitable for a colorbar.

The Axes is placed in the figure of the *parent* Axes, by resizing and
repositioning *parent*.

This function is similar to `.make_axes` and mostly compatible with it.
Primary differences are

- `.make_axes_gridspec` requires the *parent* to have a subplotspec.
- `.make_axes` positions the Axes in figure coordinates;
  `.make_axes_gridspec` positions it using a subplotspec.
- `.make_axes` updates the position of the parent.  `.make_axes_gridspec`
  replaces the parent gridspec with a new one.

Parameters
----------
parent : `~matplotlib.axes.Axes`
    The Axes to use as parent for placing the colorbar.
%(_make_axes_kw_doc)s

Returns
-------
cax : `~matplotlib.axes.Axes`
    The child Axes.
kwargs : dict
    The reduced keyword dictionary to be passed when creating the colorbar
    instance.

---
## __init__
```python
from colorbar import __init__
```



---
## get_window_extent
```python
from colorbar import get_window_extent
```



---
## set_xy
```python
from colorbar import set_xy
```



---
## draw
```python
from colorbar import draw
```



---
## __call__
```python
from colorbar import __call__
```



---
## get_subplotspec
```python
from colorbar import get_subplotspec
```



---
## locator
```python
from colorbar import locator
```



---
## minorlocator
```python
from colorbar import minorlocator
```



---
## formatter
```python
from colorbar import formatter
```



---
## minorformatter
```python
from colorbar import minorformatter
```



---
## _cbar_cla
```python
from colorbar import _cbar_cla
```

Function to clear the interactive colorbar state.

---
## update_normal
```python
from colorbar import update_normal
```

Update solid patches, lines, etc.

This is meant to be called when the norm of the image or contour plot
to which this colorbar belongs changes.

If the norm on the mappable is different than before, this resets the
locator and formatter for the axis, so if these have been customized,
they will need to be customized again.  However, if the norm only
changes values of *vmin*, *vmax* or *cmap* then the old formatter
and locator will be preserved.

---
## _draw_all
```python
from colorbar import _draw_all
```

Calculate any free parameters based on the current cmap and norm,
and do all the drawing.

---
## _add_solids
```python
from colorbar import _add_solids
```

Draw the colors; optionally add separators.

---
## _update_dividers
```python
from colorbar import _update_dividers
```



---
## _add_solids_patches
```python
from colorbar import _add_solids_patches
```



---
## _do_extends
```python
from colorbar import _do_extends
```

Add the extend tri/rectangles on the outside of the Axes.

ax is unused, but required due to the callbacks on xlim/ylim changed

---
## add_lines
```python
from colorbar import add_lines
```

Draw lines on the colorbar.

The lines are appended to the list :attr:`lines`.

Parameters
----------
levels : array-like
    The positions of the lines.
colors : :mpltype:`color` or list of :mpltype:`color`
    Either a single color applying to all lines or one color value for
    each line.
linewidths : float or array-like
    Either a single linewidth applying to all lines or one linewidth
    for each line.
erase : bool, default: True
    Whether to remove any previously added lines.

Notes
-----
Alternatively, this method can also be called with the signature
``colorbar.add_lines(contour_set, erase=True)``, in which case
*levels*, *colors*, and *linewidths* are taken from *contour_set*.

---
## update_ticks
```python
from colorbar import update_ticks
```

Set up the ticks and ticklabels. This should not be needed by users.

---
## _get_ticker_locator_formatter
```python
from colorbar import _get_ticker_locator_formatter
```

Return the ``locator`` and ``formatter`` of the colorbar.

If they have not been defined (i.e. are *None*), the formatter and
locator are retrieved from the axis, or from the value of the
boundaries for a boundary norm.

Called by update_ticks...

---
## set_ticks
```python
from colorbar import set_ticks
```

Set tick locations.

Parameters
----------
ticks : 1D array-like
    List of tick locations.
labels : list of str, optional
    List of tick labels. If not set, the labels show the data value.
minor : bool, default: False
    If ``False``, set the major ticks; if ``True``, the minor ticks.
**kwargs
    `.Text` properties for the labels. These take effect only if you
    pass *labels*. In other cases, please use `~.Axes.tick_params`.

---
## get_ticks
```python
from colorbar import get_ticks
```

Return the ticks as a list of locations.

Parameters
----------
minor : boolean, default: False
    if True return the minor ticks.

---
## set_ticklabels
```python
from colorbar import set_ticklabels
```

[*Discouraged*] Set tick labels.

.. admonition:: Discouraged

    The use of this method is discouraged, because of the dependency
    on tick positions. In most cases, you'll want to use
    ``set_ticks(positions, labels=labels)`` instead.

    If you are using this method, you should always fix the tick
    positions before, e.g. by using `.Colorbar.set_ticks` or by
    explicitly setting a `~.ticker.FixedLocator` on the long axis
    of the colorbar. Otherwise, ticks are free to move and the
    labels may end up in unexpected positions.

Parameters
----------
ticklabels : sequence of str or of `.Text`
    Texts for labeling each tick location in the sequence set by
    `.Colorbar.set_ticks`; the number of labels must match the number
    of locations.

update_ticks : bool, default: True
    This keyword argument is ignored and will be removed.
    Deprecated

minor : bool
    If True, set minor ticks instead of major ticks.

**kwargs
    `.Text` properties for the labels.

---
## minorticks_on
```python
from colorbar import minorticks_on
```

Turn on colorbar minor ticks.

---
## minorticks_off
```python
from colorbar import minorticks_off
```

Turn the minor ticks of the colorbar off.

---
## set_label
```python
from colorbar import set_label
```

Add a label to the long axis of the colorbar.

Parameters
----------
label : str
    The label text.
loc : str, optional
    The location of the label.

    - For horizontal orientation one of {'left', 'center', 'right'}
    - For vertical orientation one of {'bottom', 'center', 'top'}

    Defaults to :rc:`xaxis.labellocation` or :rc:`yaxis.labellocation`
    depending on the orientation.
**kwargs
    Keyword arguments are passed to `~.Axes.set_xlabel` /
    `~.Axes.set_ylabel`.
    Supported keywords are *labelpad* and `.Text` properties.

---
## set_alpha
```python
from colorbar import set_alpha
```

Set the transparency between 0 (transparent) and 1 (opaque).

If an array is provided, *alpha* will be set to None to use the
transparency values associated with the colormap.

---
## _set_scale
```python
from colorbar import _set_scale
```

Set the colorbar long axis scale.

Parameters
----------
scale : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
    The axis scale type to apply.

**kwargs
    Different keyword arguments are accepted, depending on the scale.
    See the respective class keyword arguments:

    - `matplotlib.scale.LinearScale`
    - `matplotlib.scale.LogScale`
    - `matplotlib.scale.SymmetricalLogScale`
    - `matplotlib.scale.LogitScale`
    - `matplotlib.scale.FuncScale`
    - `matplotlib.scale.AsinhScale`

Notes
-----
By default, Matplotlib supports the above-mentioned scales.
Additionally, custom scales may be registered using
`matplotlib.scale.register_scale`. These scales can then also
be used here.

---
## remove
```python
from colorbar import remove
```

Remove this colorbar from the figure.

If the colorbar was created with ``use_gridspec=True`` the previous
gridspec is restored.

---
## _process_values
```python
from colorbar import _process_values
```

Set `_boundaries` and `_values` based on the self.boundaries and
self.values if not None, or based on the size of the colormap and
the vmin/vmax of the norm.

---
## _mesh
```python
from colorbar import _mesh
```

Return the coordinate arrays for the colorbar pcolormesh/patches.

These are scaled between vmin and vmax, and already handle colorbar
orientation.

---
## _forward_boundaries
```python
from colorbar import _forward_boundaries
```



---
## _inverse_boundaries
```python
from colorbar import _inverse_boundaries
```



---
## _reset_locator_formatter_scale
```python
from colorbar import _reset_locator_formatter_scale
```

Reset the locator et al to defaults.  Any user-hardcoded changes
need to be re-entered if this gets called (either at init, or when
the mappable normal gets changed: Colorbar.update_normal)

---
## _locate
```python
from colorbar import _locate
```

Given a set of color data values, return their
corresponding colorbar data coordinates.

---
## _uniform_y
```python
from colorbar import _uniform_y
```

Return colorbar data coordinates for *N* uniformly
spaced boundaries, plus extension lengths if required.

---
## _proportional_y
```python
from colorbar import _proportional_y
```

Return colorbar data coordinates for the boundaries of
a proportional colorbar, plus extension lengths if required:

---
## _get_extension_lengths
```python
from colorbar import _get_extension_lengths
```

Return the lengths of colorbar extensions.

This is a helper method for _uniform_y and _proportional_y.

---
## _extend_lower
```python
from colorbar import _extend_lower
```

Return whether the lower limit is open ended.

---
## _extend_upper
```python
from colorbar import _extend_upper
```

Return whether the upper limit is open ended.

---
## _long_axis
```python
from colorbar import _long_axis
```

Return the long axis

---
## _short_axis
```python
from colorbar import _short_axis
```

Return the short axis

---
## _get_view
```python
from colorbar import _get_view
```



---
## _set_view
```python
from colorbar import _set_view
```



---
## _set_view_from_bbox
```python
from colorbar import _set_view_from_bbox
```



---
## drag_pan
```python
from colorbar import drag_pan
```



---
## __name__
```python
from _cm import __name__
```

Nothing here but dictionaries for generating LinearSegmentedColormaps,
and a dictionary of these dictionaries.

Documentation for each is in pyplot.colormaps().  Please update this
with the purpose and type of your colormap if you add data for one here.

---
## _flag_red
```python
from _cm import _flag_red
```



---
## _flag_green
```python
from _cm import _flag_green
```



---
## _flag_blue
```python
from _cm import _flag_blue
```



---
## _prism_red
```python
from _cm import _prism_red
```



---
## _prism_green
```python
from _cm import _prism_green
```



---
## _prism_blue
```python
from _cm import _prism_blue
```



---
## _ch_helper
```python
from _cm import _ch_helper
```

Helper function for generating picklable cubehelix colormaps.

---
## cubehelix
```python
from _cm import cubehelix
```

Return custom data dictionary of (r, g, b) conversion functions, which can
be used with `.ColormapRegistry.register`, for the cubehelix color scheme.

Unlike most other color schemes cubehelix was designed by D.A. Green to
be monotonically increasing in terms of perceived brightness.
Also, when printed on a black and white postscript printer, the scheme
results in a greyscale with monotonically increasing brightness.
This color scheme is named cubehelix because the (r, g, b) values produced
can be visualised as a squashed helix around the diagonal in the
(r, g, b) color cube.

For a unit color cube (i.e. 3D coordinates for (r, g, b) each in the
range 0 to 1) the color scheme starts at (r, g, b) = (0, 0, 0), i.e. black,
and finishes at (r, g, b) = (1, 1, 1), i.e. white. For some fraction *x*,
between 0 and 1, the color is the corresponding grey value at that
fraction along the black to white diagonal (x, x, x) plus a color
element. This color element is calculated in a plane of constant
perceived intensity and controlled by the following parameters.

Parameters
----------
gamma : float, default: 1
    Gamma factor emphasizing either low intensity values (gamma < 1), or
    high intensity values (gamma > 1).
s : float, default: 0.5 (purple)
    The starting color.
r : float, default: -1.5
    The number of r, g, b rotations in color that are made from the start
    to the end of the color scheme.  The default of -1.5 corresponds to ->
    B -> G -> R -> B.
h : float, default: 1
    The hue, i.e. how saturated the colors are. If this parameter is zero
    then the color scheme is purely a greyscale.

---
## _g0
```python
from _cm import _g0
```



---
## _g1
```python
from _cm import _g1
```



---
## _g2
```python
from _cm import _g2
```



---
## _g3
```python
from _cm import _g3
```



---
## _g4
```python
from _cm import _g4
```



---
## _g5
```python
from _cm import _g5
```



---
## _g6
```python
from _cm import _g6
```



---
## _g7
```python
from _cm import _g7
```



---
## _g8
```python
from _cm import _g8
```



---
## _g9
```python
from _cm import _g9
```



---
## _g10
```python
from _cm import _g10
```



---
## _g11
```python
from _cm import _g11
```



---
## _g12
```python
from _cm import _g12
```



---
## _g13
```python
from _cm import _g13
```



---
## _g14
```python
from _cm import _g14
```



---
## _g15
```python
from _cm import _g15
```



---
## _g16
```python
from _cm import _g16
```



---
## _g17
```python
from _cm import _g17
```



---
## _g18
```python
from _cm import _g18
```



---
## _g19
```python
from _cm import _g19
```



---
## _g20
```python
from _cm import _g20
```



---
## _g21
```python
from _cm import _g21
```



---
## _g22
```python
from _cm import _g22
```



---
## _g23
```python
from _cm import _g23
```



---
## _g24
```python
from _cm import _g24
```



---
## _g25
```python
from _cm import _g25
```



---
## _g26
```python
from _cm import _g26
```



---
## _g27
```python
from _cm import _g27
```



---
## _g28
```python
from _cm import _g28
```



---
## _g29
```python
from _cm import _g29
```



---
## _g30
```python
from _cm import _g30
```



---
## _g31
```python
from _cm import _g31
```



---
## _g32
```python
from _cm import _g32
```



---
## _g33
```python
from _cm import _g33
```



---
## _g34
```python
from _cm import _g34
```



---
## _g35
```python
from _cm import _g35
```



---
## _g36
```python
from _cm import _g36
```



---
## _gist_heat_red
```python
from _cm import _gist_heat_red
```



---
## _gist_heat_green
```python
from _cm import _gist_heat_green
```



---
## _gist_heat_blue
```python
from _cm import _gist_heat_blue
```



---
## _gist_yarg
```python
from _cm import _gist_yarg
```



---
## __name__
```python
from backend_managers import __name__
```



---
## ToolEvent
```python
from backend_managers import ToolEvent
```

Event for tool manipulation (add/remove).

---
## ToolTriggerEvent
```python
from backend_managers import ToolTriggerEvent
```

Event to inform that a tool has been triggered.

---
## ToolManagerMessageEvent
```python
from backend_managers import ToolManagerMessageEvent
```

Event carrying messages from toolmanager.

Messages usually get displayed to the user by the toolbar.

---
## ToolManager
```python
from backend_managers import ToolManager
```

Manager for actions triggered by user interactions (key press, toolbar
clicks, ...) on a Figure.

Attributes
----------
figure : `.Figure`
keypresslock : `~matplotlib.widgets.LockDraw`
    `.LockDraw` object to know if the `canvas` key_press_event is locked.
messagelock : `~matplotlib.widgets.LockDraw`
    `.LockDraw` object to know if the message is available to write.

---
## __init__
```python
from backend_managers import __init__
```



---
## canvas
```python
from backend_managers import canvas
```

Canvas managed by FigureManager.

---
## figure
```python
from backend_managers import figure
```



---
## set_figure
```python
from backend_managers import set_figure
```

Bind the given figure to the tools.

Parameters
----------
figure : `.Figure`
update_tools : bool, default: True
    Force tools to update figure.

---
## toolmanager_connect
```python
from backend_managers import toolmanager_connect
```

Connect event with string *s* to *func*.

Parameters
----------
s : str
    The name of the event. The following events are recognized:

    - 'tool_message_event'
    - 'tool_removed_event'
    - 'tool_added_event'

    For every tool added a new event is created

    - 'tool_trigger_TOOLNAME', where TOOLNAME is the id of the tool.

func : callable
    Callback function for the toolmanager event with signature::

        def func(event: ToolEvent) -> Any

Returns
-------
cid
    The callback id for the connection. This can be used in
    `.toolmanager_disconnect`.

---
## toolmanager_disconnect
```python
from backend_managers import toolmanager_disconnect
```

Disconnect callback id *cid*.

Example usage::

    cid = toolmanager.toolmanager_connect('tool_trigger_zoom', onpress)
    #...later
    toolmanager.toolmanager_disconnect(cid)

---
## message_event
```python
from backend_managers import message_event
```

Emit a `ToolManagerMessageEvent`.

---
## active_toggle
```python
from backend_managers import active_toggle
```

Currently toggled tools.

---
## get_tool_keymap
```python
from backend_managers import get_tool_keymap
```

Return the keymap associated with the specified tool.

Parameters
----------
name : str
    Name of the Tool.

Returns
-------
list of str
    List of keys associated with the tool.

---
## _remove_keys
```python
from backend_managers import _remove_keys
```



---
## update_keymap
```python
from backend_managers import update_keymap
```

Set the keymap to associate with the specified tool.

Parameters
----------
name : str
    Name of the Tool.
key : str or list of str
    Keys to associate with the tool.

---
## remove_tool
```python
from backend_managers import remove_tool
```

Remove tool named *name*.

Parameters
----------
name : str
    Name of the tool.

---
## add_tool
```python
from backend_managers import add_tool
```

Add *tool* to `ToolManager`.

If successful, adds a new event ``tool_trigger_{name}`` where
``{name}`` is the *name* of the tool; the event is fired every time the
tool is triggered.

Parameters
----------
name : str
    Name of the tool, treated as the ID, has to be unique.
tool : type
    Class of the tool to be added.  A subclass will be used
    instead if one was registered for the current canvas class.
*args, **kwargs
    Passed to the *tool*'s constructor.

See Also
--------
matplotlib.backend_tools.ToolBase : The base class for tools.

---
## _handle_toggle
```python
from backend_managers import _handle_toggle
```

Toggle tools, need to untoggle prior to using other Toggle tool.
Called from trigger_tool.

Parameters
----------
tool : `.ToolBase`
canvasevent : Event
    Original Canvas event or None.
data : object
    Extra data to pass to the tool when triggering.

---
## trigger_tool
```python
from backend_managers import trigger_tool
```

Trigger a tool and emit the ``tool_trigger_{name}`` event.

Parameters
----------
name : str
    Name of the tool.
sender : object
    Object that wishes to trigger the tool.
canvasevent : Event
    Original Canvas event or None.
data : object
    Extra data to pass to the tool when triggering.

---
## _key_press
```python
from backend_managers import _key_press
```



---
## tools
```python
from backend_managers import tools
```

A dict mapping tool name -> controlled tool.

---
## get_tool
```python
from backend_managers import get_tool
```

Return the tool object with the given name.

For convenience, this passes tool objects through.

Parameters
----------
name : str or `.ToolBase`
    Name of the tool, or the tool itself.
warn : bool, default: True
    Whether a warning should be emitted it no tool with the given name
    exists.

Returns
-------
`.ToolBase` or None
    The tool or None if no tool with the given name exists.

---
## __name__
```python
from cbook import __name__
```

A collection of utility functions and classes.  Originally, many
(but not all) were from the Python Cookbook -- hence the name cbook.

---
## _get_running_interactive_framework
```python
from cbook import _get_running_interactive_framework
```

Return the interactive framework whose event loop is currently running, if
any, or "headless" if no event loop can be started, or None.

Returns
-------
Optional[str]
    One of the following values: "qt", "gtk3", "gtk4", "wx", "tk",
    "macosx", "headless", ``None``.

---
## _exception_printer
```python
from cbook import _exception_printer
```



---
## _StrongRef
```python
from cbook import _StrongRef
```

Wrapper similar to a weakref, but keeping a strong reference to the object.

---
## _weak_or_strong_ref
```python
from cbook import _weak_or_strong_ref
```

Return a `WeakMethod` wrapping *func* if possible, else a `_StrongRef`.

---
## CallbackRegistry
```python
from cbook import CallbackRegistry
```

Handle registering, processing, blocking, and disconnecting
for a set of signals and callbacks:

    >>> def oneat(x):
    ...     print('eat', x)
    >>> def ondrink(x):
    ...     print('drink', x)

    >>> from matplotlib.cbook import CallbackRegistry
    >>> callbacks = CallbackRegistry()

    >>> id_eat = callbacks.connect('eat', oneat)
    >>> id_drink = callbacks.connect('drink', ondrink)

    >>> callbacks.process('drink', 123)
    drink 123
    >>> callbacks.process('eat', 456)
    eat 456
    >>> callbacks.process('be merry', 456)   # nothing will be called

    >>> callbacks.disconnect(id_eat)
    >>> callbacks.process('eat', 456)        # nothing will be called

    >>> with callbacks.blocked(signal='drink'):
    ...     callbacks.process('drink', 123)  # nothing will be called
    >>> callbacks.process('drink', 123)
    drink 123

In practice, one should always disconnect all callbacks when they are
no longer needed to avoid dangling references (and thus memory leaks).
However, real code in Matplotlib rarely does so, and due to its design,
it is rather difficult to place this kind of code.  To get around this,
and prevent this class of memory leaks, we instead store weak references
to bound methods only, so when the destination object needs to die, the
CallbackRegistry won't keep it alive.

Parameters
----------
exception_handler : callable, optional
   If not None, *exception_handler* must be a function that takes an
   `Exception` as single parameter.  It gets called with any `Exception`
   raised by the callbacks during `CallbackRegistry.process`, and may
   either re-raise the exception or handle it in another manner.

   The default handler prints the exception (with `traceback.print_exc`) if
   an interactive event loop is running; it re-raises the exception if no
   interactive event loop is running.

signals : list, optional
    If not None, *signals* is a list of signals that this registry handles:
    attempting to `process` or to `connect` to a signal not in the list
    throws a `ValueError`.  The default, None, does not restrict the
    handled signals.

---
## silent_list
```python
from cbook import silent_list
```

A list with a short ``repr()``.

This is meant to be used for a homogeneous list of artists, so that they
don't cause long, meaningless output.

Instead of ::

    [<matplotlib.lines.Line2D object at 0x7f5749fed3c8>,
     <matplotlib.lines.Line2D object at 0x7f5749fed4e0>,
     <matplotlib.lines.Line2D object at 0x7f5758016550>]

one will get ::

    <a list of 3 Line2D objects>

If ``self.type`` is None, the type name is obtained from the first item in
the list (if any).

---
## _local_over_kwdict
```python
from cbook import _local_over_kwdict
```



---
## strip_math
```python
from cbook import strip_math
```

Remove latex formatting from mathtext.

Only handles fully math and fully non-math strings.

---
## _strip_comment
```python
from cbook import _strip_comment
```

Strip everything from the first unquoted #.

---
## is_writable_file_like
```python
from cbook import is_writable_file_like
```

Return whether *obj* looks like a file object with a *write* method.

---
## file_requires_unicode
```python
from cbook import file_requires_unicode
```

Return whether the given writable file-like object requires Unicode to be
written to it.

---
## to_filehandle
```python
from cbook import to_filehandle
```

Convert a path to an open file handle or pass-through a file-like object.

Consider using `open_file_cm` instead, as it allows one to properly close
newly created file objects more easily.

Parameters
----------
fname : str or path-like or file-like
    If `str` or `os.PathLike`, the file is opened using the flags specified
    by *flag* and *encoding*.  If a file-like object, it is passed through.
flag : str, default: 'r'
    Passed as the *mode* argument to `open` when *fname* is `str` or
    `os.PathLike`; ignored if *fname* is file-like.
return_opened : bool, default: False
    If True, return both the file object and a boolean indicating whether
    this was a new file (that the caller needs to close).  If False, return
    only the new file.
encoding : str or None, default: None
    Passed as the *mode* argument to `open` when *fname* is `str` or
    `os.PathLike`; ignored if *fname* is file-like.

Returns
-------
fh : file-like
opened : bool
    *opened* is only returned if *return_opened* is True.

---
## open_file_cm
```python
from cbook import open_file_cm
```

Pass through file objects and context-manage path-likes.

---
## is_scalar_or_string
```python
from cbook import is_scalar_or_string
```

Return whether the given object is a scalar or string like.

---
## get_sample_data
```python
from cbook import get_sample_data
```

Return a sample data file.  *fname* is a path relative to the
:file:`mpl-data/sample_data` directory.  If *asfileobj* is `True`
return a file object, otherwise just a file path.

Sample data files are stored in the 'mpl-data/sample_data' directory within
the Matplotlib package.

If the filename ends in .gz, the file is implicitly ungzipped.  If the
filename ends with .npy or .npz, and *asfileobj* is `True`, the file is
loaded with `numpy.load`.

---
## _get_data_path
```python
from cbook import _get_data_path
```

Return the `pathlib.Path` to a resource file provided by Matplotlib.

``*args`` specify a path relative to the base data path.

---
## flatten
```python
from cbook import flatten
```

Return a generator of flattened nested containers.

For example:

    >>> from matplotlib.cbook import flatten
    >>> l = (('John', ['Hunter']), (1, 23), [[([42, (5, 23)], )]])
    >>> print(list(flatten(l)))
    ['John', 'Hunter', 1, 23, 42, 5, 23]

By: Composite of Holger Krekel and Luther Blissett
From: https://code.activestate.com/recipes/121294/
and Recipe 1.12 in cookbook

---
## Stack
```python
from cbook import Stack
```

Stack of elements with a movable cursor.

Mimics home/back/forward in a web browser.

---
## _Stack
```python
from cbook import _Stack
```

Stack of elements with a movable cursor.

Mimics home/back/forward in a web browser.

---
## safe_masked_invalid
```python
from cbook import safe_masked_invalid
```



---
## print_cycles
```python
from cbook import print_cycles
```

Print loops of cyclic references in the given *objects*.

It is often useful to pass in ``gc.garbage`` to find the cycles that are
preventing some objects from being garbage collected.

Parameters
----------
objects
    A list of objects to find cycles in.
outstream
    The stream for output.
show_progress : bool
    If True, print the number of objects reached as they are found.

---
## Grouper
```python
from cbook import Grouper
```

A disjoint-set data structure.

Objects can be joined using :meth:`join`, tested for connectedness
using :meth:`joined`, and all disjoint sets can be retrieved by
using the object as an iterator.

The objects being joined must be hashable and weak-referenceable.

Examples
--------
>>> from matplotlib.cbook import Grouper
>>> class Foo:
...     def __init__(self, s):
...         self.s = s
...     def __repr__(self):
...         return self.s
...
>>> a, b, c, d, e, f = [Foo(x) for x in 'abcdef']
>>> grp = Grouper()
>>> grp.join(a, b)
>>> grp.join(b, c)
>>> grp.join(d, e)
>>> list(grp)
[[a, b, c], [d, e]]
>>> grp.joined(a, b)
True
>>> grp.joined(a, c)
True
>>> grp.joined(a, d)
False

---
## GrouperView
```python
from cbook import GrouperView
```

Immutable view over a `.Grouper`.

---
## simple_linear_interpolation
```python
from cbook import simple_linear_interpolation
```

Resample an array with ``steps - 1`` points between original point pairs.

Along each column of *a*, ``(steps - 1)`` points are introduced between
each original values; the values are linearly interpolated.

Parameters
----------
a : array, shape (n, ...)
steps : int

Returns
-------
array
    shape ``((n - 1) * steps + 1, ...)``

---
## delete_masked_points
```python
from cbook import delete_masked_points
```

Find all masked and/or non-finite points in a set of arguments,
and return the arguments with only the unmasked points remaining.

Arguments can be in any of 5 categories:

1) 1-D masked arrays
2) 1-D ndarrays
3) ndarrays with more than one dimension
4) other non-string iterables
5) anything else

The first argument must be in one of the first four categories;
any argument with a length differing from that of the first
argument (and hence anything in category 5) then will be
passed through unchanged.

Masks are obtained from all arguments of the correct length
in categories 1, 2, and 4; a point is bad if masked in a masked
array or if it is a nan or inf.  No attempt is made to
extract a mask from categories 2, 3, and 4 if `numpy.isfinite`
does not yield a Boolean array.

All input arguments that are not passed unchanged are returned
as ndarrays after removing the points or rows corresponding to
masks in any of the arguments.

A vastly simpler version of this function was originally
written as a helper for Axes.scatter().

---
## _combine_masks
```python
from cbook import _combine_masks
```

Find all masked and/or non-finite points in a set of arguments,
and return the arguments as masked arrays with a common mask.

Arguments can be in any of 5 categories:

1) 1-D masked arrays
2) 1-D ndarrays
3) ndarrays with more than one dimension
4) other non-string iterables
5) anything else

The first argument must be in one of the first four categories;
any argument with a length differing from that of the first
argument (and hence anything in category 5) then will be
passed through unchanged.

Masks are obtained from all arguments of the correct length
in categories 1, 2, and 4; a point is bad if masked in a masked
array or if it is a nan or inf.  No attempt is made to
extract a mask from categories 2 and 4 if `numpy.isfinite`
does not yield a Boolean array.  Category 3 is included to
support RGB or RGBA ndarrays, which are assumed to have only
valid values and which are passed through unchanged.

All input arguments that are not passed unchanged are returned
as masked arrays if any masked points are found, otherwise as
ndarrays.

---
## _broadcast_with_masks
```python
from cbook import _broadcast_with_masks
```

Broadcast inputs, combining all masked arrays.

Parameters
----------
*args : array-like
    The inputs to broadcast.
compress : bool, default: False
    Whether to compress the masked arrays. If False, the masked values
    are replaced by NaNs.

Returns
-------
list of array-like
    The broadcasted and masked inputs.

---
## boxplot_stats
```python
from cbook import boxplot_stats
```

Return a list of dictionaries of statistics used to draw a series of box
and whisker plots using `~.Axes.bxp`.

Parameters
----------
X : array-like
    Data that will be represented in the boxplots. Should have 2 or
    fewer dimensions.

whis : float or (float, float), default: 1.5
    The position of the whiskers.

    If a float, the lower whisker is at the lowest datum above
    ``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum below
    ``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and third
    quartiles.  The default value of ``whis = 1.5`` corresponds to Tukey's
    original definition of boxplots.

    If a pair of floats, they indicate the percentiles at which to draw the
    whiskers (e.g., (5, 95)).  In particular, setting this to (0, 100)
    results in whiskers covering the whole range of the data.

    In the edge case where ``Q1 == Q3``, *whis* is automatically set to
    (0, 100) (cover the whole range of the data) if *autorange* is True.

    Beyond the whiskers, data are considered outliers and are plotted as
    individual points.

bootstrap : int, optional
    Number of times the confidence intervals around the median
    should be bootstrapped (percentile method).

labels : list of str, optional
    Labels for each dataset. Length must be compatible with
    dimensions of *X*.

autorange : bool, optional (False)
    When `True` and the data are distributed such that the 25th and 75th
    percentiles are equal, ``whis`` is set to (0, 100) such that the
    whisker ends are at the minimum and maximum of the data.

Returns
-------
list of dict
    A list of dictionaries containing the results for each column
    of data. Keys of each dictionary are the following:

    ========   ===================================
    Key        Value Description
    ========   ===================================
    label      tick label for the boxplot
    mean       arithmetic mean value
    med        50th percentile
    q1         first quartile (25th percentile)
    q3         third quartile (75th percentile)
    iqr        interquartile range
    cilo       lower notch around the median
    cihi       upper notch around the median
    whislo     end of the lower whisker
    whishi     end of the upper whisker
    fliers     outliers
    ========   ===================================

Notes
-----
Non-bootstrapping approach to confidence interval uses Gaussian-based
asymptotic approximation:

.. math::

    \mathrm{med} \pm 1.57 \times \frac{\mathrm{iqr}}{\sqrt{N}}

General approach from:
McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of
Boxplots", The American Statistician, 32:12-16.

---
## contiguous_regions
```python
from cbook import contiguous_regions
```

Return a list of (ind0, ind1) such that ``mask[ind0:ind1].all()`` is
True and we cover all such regions.

---
## is_math_text
```python
from cbook import is_math_text
```

Return whether the string *s* contains math expressions.

This is done by checking whether *s* contains an even number of
non-escaped dollar signs.

---
## _to_unmasked_float_array
```python
from cbook import _to_unmasked_float_array
```

Convert a sequence to a float array; if input was a masked array, masked
values are converted to nans.

---
## _check_1d
```python
from cbook import _check_1d
```

Convert scalars to 1D arrays; pass-through arrays as is.

---
## _reshape_2D
```python
from cbook import _reshape_2D
```

Use Fortran ordering to convert ndarrays and lists of iterables to lists of
1D arrays.

Lists of iterables are converted by applying `numpy.asanyarray` to each of
their elements.  1D ndarrays are returned in a singleton list containing
them.  2D ndarrays are converted to the list of their *columns*.

*name* is used to generate the error message for invalid inputs.

---
## violin_stats
```python
from cbook import violin_stats
```

Return a list of dictionaries of data which can be used to draw a series
of violin plots.

See the ``Returns`` section below to view the required keys of the
dictionary.

Users can skip this function and pass a user-defined set of dictionaries
with the same keys to `~.axes.Axes.violinplot` instead of using Matplotlib
to do the calculations. See the *Returns* section below for the keys
that must be present in the dictionaries.

Parameters
----------
X : array-like
    Sample data that will be used to produce the gaussian kernel density
    estimates. Must have 2 or fewer dimensions.

method : callable
    The method used to calculate the kernel density estimate for each
    column of data. When called via ``method(v, coords)``, it should
    return a vector of the values of the KDE evaluated at the values
    specified in coords.

points : int, default: 100
    Defines the number of points to evaluate each of the gaussian kernel
    density estimates at.

quantiles : array-like, default: None
    Defines (if not None) a list of floats in interval [0, 1] for each
    column of data, which represents the quantiles that will be rendered
    for that column of data. Must have 2 or fewer dimensions. 1D array will
    be treated as a singleton list containing them.

Returns
-------
list of dict
    A list of dictionaries containing the results for each column of data.
    The dictionaries contain at least the following:

    - coords: A list of scalars containing the coordinates this particular
      kernel density estimate was evaluated at.
    - vals: A list of scalars containing the values of the kernel density
      estimate at each of the coordinates given in *coords*.
    - mean: The mean value for this column of data.
    - median: The median value for this column of data.
    - min: The minimum value for this column of data.
    - max: The maximum value for this column of data.
    - quantiles: The quantile values for this column of data.

---
## pts_to_prestep
```python
from cbook import pts_to_prestep
```

Convert continuous line to pre-steps.

Given a set of ``N`` points, convert to ``2N - 1`` points, which when
connected linearly give a step function which changes values at the
beginning of the intervals.

Parameters
----------
x : array
    The x location of the steps. May be empty.

y1, ..., yp : array
    y arrays to be turned into steps; all must be the same length as ``x``.

Returns
-------
array
    The x and y values converted to steps in the same order as the input;
    can be unpacked as ``x_out, y1_out, ..., yp_out``.  If the input is
    length ``N``, each of these arrays will be length ``2N + 1``. For
    ``N=0``, the length will be 0.

Examples
--------
>>> x_s, y1_s, y2_s = pts_to_prestep(x, y1, y2)

---
## pts_to_poststep
```python
from cbook import pts_to_poststep
```

Convert continuous line to post-steps.

Given a set of ``N`` points convert to ``2N + 1`` points, which when
connected linearly give a step function which changes values at the end of
the intervals.

Parameters
----------
x : array
    The x location of the steps. May be empty.

y1, ..., yp : array
    y arrays to be turned into steps; all must be the same length as ``x``.

Returns
-------
array
    The x and y values converted to steps in the same order as the input;
    can be unpacked as ``x_out, y1_out, ..., yp_out``.  If the input is
    length ``N``, each of these arrays will be length ``2N + 1``. For
    ``N=0``, the length will be 0.

Examples
--------
>>> x_s, y1_s, y2_s = pts_to_poststep(x, y1, y2)

---
## pts_to_midstep
```python
from cbook import pts_to_midstep
```

Convert continuous line to mid-steps.

Given a set of ``N`` points convert to ``2N`` points which when connected
linearly give a step function which changes values at the middle of the
intervals.

Parameters
----------
x : array
    The x location of the steps. May be empty.

y1, ..., yp : array
    y arrays to be turned into steps; all must be the same length as
    ``x``.

Returns
-------
array
    The x and y values converted to steps in the same order as the input;
    can be unpacked as ``x_out, y1_out, ..., yp_out``.  If the input is
    length ``N``, each of these arrays will be length ``2N``.

Examples
--------
>>> x_s, y1_s, y2_s = pts_to_midstep(x, y1, y2)

---
## index_of
```python
from cbook import index_of
```

A helper function to create reasonable x values for the given *y*.

This is used for plotting (x, y) if x values are not explicitly given.

First try ``y.index`` (assuming *y* is a `pandas.Series`), if that
fails, use ``range(len(y))``.

This will be extended in the future to deal with more types of
labeled data.

Parameters
----------
y : float or array-like

Returns
-------
x, y : ndarray
   The x and y values to plot.

---
## safe_first_element
```python
from cbook import safe_first_element
```

Return the first element in *obj*.

This is a type-independent way of obtaining the first element,
supporting both index access and the iterator protocol.

---
## _safe_first_finite
```python
from cbook import _safe_first_finite
```

Return the first finite element in *obj* if one is available and skip_nonfinite is
True. Otherwise, return the first element.

This is a method for internal use.

This is a type-independent way of obtaining the first finite element, supporting
both index access and the iterator protocol.

---
## sanitize_sequence
```python
from cbook import sanitize_sequence
```

Convert dictview objects to list. Other inputs are returned unchanged.

---
## normalize_kwargs
```python
from cbook import normalize_kwargs
```

Helper function to normalize kwarg inputs.

Parameters
----------
kw : dict or None
    A dict of keyword arguments.  None is explicitly supported and treated
    as an empty dict, to support functions with an optional parameter of
    the form ``props=None``.

alias_mapping : dict or Artist subclass or Artist instance, optional
    A mapping between a canonical name to a list of aliases, in order of
    precedence from lowest to highest.

    If the canonical value is not in the list it is assumed to have the
    highest priority.

    If an Artist subclass or instance is passed, use its properties alias
    mapping.

Raises
------
TypeError
    To match what Python raises if invalid arguments/keyword arguments are
    passed to a callable.

---
## _lock_path
```python
from cbook import _lock_path
```

Context manager for locking a path.

Usage::

    with _lock_path(path):
        ...

Another thread or process that attempts to lock the same path will wait
until this context manager is exited.

The lock is implemented by creating a temporary file in the parent
directory, so that directory must exist and be writable.

---
## _topmost_artist
```python
from cbook import _topmost_artist
```

Get the topmost artist of a list.

In case of a tie, return the *last* of the tied artists, as it will be
drawn on top of the others. `max` returns the first maximum in case of
ties, so we need to iterate over the list in reverse order.

---
## _str_equal
```python
from cbook import _str_equal
```

Return whether *obj* is a string equal to string *s*.

This helper solely exists to handle the case where *obj* is a numpy array,
because in such cases, a naive ``obj == s`` would yield an array, which
cannot be used in a boolean context.

---
## _str_lower_equal
```python
from cbook import _str_lower_equal
```

Return whether *obj* is a string equal, when lowercased, to string *s*.

This helper solely exists to handle the case where *obj* is a numpy array,
because in such cases, a naive ``obj == s`` would yield an array, which
cannot be used in a boolean context.

---
## _array_perimeter
```python
from cbook import _array_perimeter
```

Get the elements on the perimeter of *arr*.

Parameters
----------
arr : ndarray, shape (M, N)
    The input array.

Returns
-------
ndarray, shape (2*(M - 1) + 2*(N - 1),)
    The elements on the perimeter of the array::

       [arr[0, 0], ..., arr[0, -1], ..., arr[-1, -1], ..., arr[-1, 0], ...]

Examples
--------
>>> i, j = np.ogrid[:3, :4]
>>> a = i*10 + j
>>> a
array([[ 0,  1,  2,  3],
       [10, 11, 12, 13],
       [20, 21, 22, 23]])
>>> _array_perimeter(a)
array([ 0,  1,  2,  3, 13, 23, 22, 21, 20, 10])

---
## _unfold
```python
from cbook import _unfold
```

Append an extra dimension containing sliding windows along *axis*.

All windows are of size *size* and begin with every *step* elements.

Parameters
----------
arr : ndarray, shape (N_1, ..., N_k)
    The input array
axis : int
    Axis along which the windows are extracted
size : int
    Size of the windows
step : int
    Stride between first elements of subsequent windows.

Returns
-------
ndarray, shape (N_1, ..., 1 + (N_axis-size)/step, ..., N_k, size)

Examples
--------
>>> i, j = np.ogrid[:3, :7]
>>> a = i*10 + j
>>> a
array([[ 0,  1,  2,  3,  4,  5,  6],
       [10, 11, 12, 13, 14, 15, 16],
       [20, 21, 22, 23, 24, 25, 26]])
>>> _unfold(a, axis=1, size=3, step=2)
array([[[ 0,  1,  2],
        [ 2,  3,  4],
        [ 4,  5,  6]],
       [[10, 11, 12],
        [12, 13, 14],
        [14, 15, 16]],
       [[20, 21, 22],
        [22, 23, 24],
        [24, 25, 26]]])

---
## _array_patch_perimeters
```python
from cbook import _array_patch_perimeters
```

Extract perimeters of patches from *arr*.

Extracted patches are of size (*rstride* + 1) x (*cstride* + 1) and
share perimeters with their neighbors. The ordering of the vertices matches
that returned by ``_array_perimeter``.

Parameters
----------
x : ndarray, shape (N, M)
    Input array
rstride : int
    Vertical (row) stride between corresponding elements of each patch
cstride : int
    Horizontal (column) stride between corresponding elements of each patch

Returns
-------
ndarray, shape (N/rstride * M/cstride, 2 * (rstride + cstride))

---
## _setattr_cm
```python
from cbook import _setattr_cm
```

Temporarily set some attributes; restore original state at context exit.

---
## _OrderedSet
```python
from cbook import _OrderedSet
```



---
## _premultiplied_argb32_to_unmultiplied_rgba8888
```python
from cbook import _premultiplied_argb32_to_unmultiplied_rgba8888
```

Convert a premultiplied ARGB32 buffer to an unmultiplied RGBA8888 buffer.

---
## _unmultiplied_rgba8888_to_premultiplied_argb32
```python
from cbook import _unmultiplied_rgba8888_to_premultiplied_argb32
```

Convert an unmultiplied RGBA8888 buffer to a premultiplied ARGB32 buffer.

---
## _get_nonzero_slices
```python
from cbook import _get_nonzero_slices
```

Return the bounds of the nonzero region of a 2D array as a pair of slices.

``buf[_get_nonzero_slices(buf)]`` is the smallest sub-rectangle in *buf*
that encloses all non-zero entries in *buf*.  If *buf* is fully zero, then
``(slice(0, 0), slice(0, 0))`` is returned.

---
## _pformat_subprocess
```python
from cbook import _pformat_subprocess
```

Pretty-format a subprocess command for printing/logging purposes.

---
## _check_and_log_subprocess
```python
from cbook import _check_and_log_subprocess
```

Run *command*, returning its stdout output if it succeeds.

If it fails (exits with nonzero return code), raise an exception whose text
includes the failed command and captured stdout and stderr output.

Regardless of the return code, the command is logged at DEBUG level on
*logger*.  In case of success, the output is likewise logged.

---
## _setup_new_guiapp
```python
from cbook import _setup_new_guiapp
```

Perform OS-dependent setup when Matplotlib creates a new GUI application.

---
## _format_approx
```python
from cbook import _format_approx
```

Format the number with at most the number of decimals given as precision.
Remove trailing zeros and possibly the decimal point.

---
## _g_sig_digits
```python
from cbook import _g_sig_digits
```

Return the number of significant digits to %g-format *value*, assuming that
it is known with an error of *delta*.

---
## _unikey_or_keysym_to_mplkey
```python
from cbook import _unikey_or_keysym_to_mplkey
```

Convert a Unicode key or X keysym to a Matplotlib key name.

The Unicode key is checked first; this avoids having to list most printable
keysyms such as ``EuroSign``.

---
## _make_class_factory
```python
from cbook import _make_class_factory
```

Return a function that creates picklable classes inheriting from a mixin.

After ::

    factory = _make_class_factory(FooMixin, fmt, attr_name)
    FooAxes = factory(Axes)

``Foo`` is a class that inherits from ``FooMixin`` and ``Axes`` and **is
picklable** (picklability is what differentiates this from a plain call to
`type`).  Its ``__name__`` is set to ``fmt.format(Axes.__name__)`` and the
base class is stored in the ``attr_name`` attribute, if not None.

Moreover, the return value of ``factory`` is memoized: calls with the same
``Axes`` class always return the same subclass.

---
## _picklable_class_constructor
```python
from cbook import _picklable_class_constructor
```

Internal helper for _make_class_factory.

---
## _is_torch_array
```python
from cbook import _is_torch_array
```

Check if 'x' is a PyTorch Tensor.

---
## _is_jax_array
```python
from cbook import _is_jax_array
```

Check if 'x' is a JAX Array.

---
## _unpack_to_numpy
```python
from cbook import _unpack_to_numpy
```

Internal helper to extract data from e.g. pandas and xarray objects.

---
## _auto_format_str
```python
from cbook import _auto_format_str
```

Apply *value* to the format string *fmt*.

This works both with unnamed %-style formatting and
unnamed {}-style formatting. %-style formatting has priority.
If *fmt* is %-style formattable that will be used. Otherwise,
{}-formatting is applied. Strings without formatting placeholders
are passed through as is.

Examples
--------
>>> _auto_format_str('%.2f m', 0.2)
'0.20 m'
>>> _auto_format_str('{} m', 0.2)
'0.2 m'
>>> _auto_format_str('const', 0.2)
'const'
>>> _auto_format_str('%d or {}', 0.2)
'0 or {}'

---
## __init__
```python
from cbook import __init__
```



---
## __call__
```python
from cbook import __call__
```

Return the current element, or None.

---
## __eq__
```python
from cbook import __eq__
```



---
## __hash__
```python
from cbook import __hash__
```



---
## __getstate__
```python
from cbook import __getstate__
```



---
## __setstate__
```python
from cbook import __setstate__
```



---
## connect
```python
from cbook import connect
```

Register *func* to be called when signal *signal* is generated.

---
## _connect_picklable
```python
from cbook import _connect_picklable
```

Like `.connect`, but the callback is kept when pickling/unpickling.

Currently internal-use only.

---
## _remove_proxy
```python
from cbook import _remove_proxy
```



---
## disconnect
```python
from cbook import disconnect
```

Disconnect the callback registered with callback id *cid*.

No error is raised if such a callback does not exist.

---
## process
```python
from cbook import process
```

Process signal *s*.

All of the functions registered to receive callbacks on *s* will be
called with ``*args`` and ``**kwargs``.

---
## blocked
```python
from cbook import blocked
```

Block callback signals from being processed.

A context manager to temporarily block/disable callback signals
from being processed by the registered listeners.

Parameters
----------
signal : str, optional
    The callback signal to block. The default is to block all signals.

---
## __repr__
```python
from cbook import __repr__
```



---
## __len__
```python
from cbook import __len__
```



---
## __getitem__
```python
from cbook import __getitem__
```



---
## forward
```python
from cbook import forward
```

Move the position forward and return the current element.

---
## back
```python
from cbook import back
```

Move the position back and return the current element.

---
## push
```python
from cbook import push
```

Push *o* to the stack after the current position, and return *o*.

Discard all later elements.

---
## home
```python
from cbook import home
```

Push the first element onto the top of the stack.

The first element is returned.

---
## empty
```python
from cbook import empty
```

Return whether the stack is empty.

---
## clear
```python
from cbook import clear
```

Empty the stack.

---
## bubble
```python
from cbook import bubble
```

Raise all references of *o* to the top of the stack, and return it.

Raises
------
ValueError
    If *o* is not in the stack.

---
## remove
```python
from cbook import remove
```

Remove *a* from the grouper, doing nothing if it is not there.

---
## print_path
```python
from cbook import print_path
```



---
## recurse
```python
from cbook import recurse
```



---
## __contains__
```python
from cbook import __contains__
```



---
## clean
```python
from cbook import clean
```

Clean dead weak references from the dictionary.

---
## join
```python
from cbook import join
```

Join given arguments into the same set.  Accepts one or more arguments.

---
## joined
```python
from cbook import joined
```



---
## __iter__
```python
from cbook import __iter__
```



---
## get_siblings
```python
from cbook import get_siblings
```



---
## _bootstrap_median
```python
from cbook import _bootstrap_median
```



---
## _compute_conf_interval
```python
from cbook import _compute_conf_interval
```



---
## safe_isfinite
```python
from cbook import safe_isfinite
```



---
## add
```python
from cbook import add
```



---
## discard
```python
from cbook import discard
```



---
## class_factory
```python
from cbook import class_factory
```



---
## subcls
```python
from cbook import subcls
```



---
## __reduce__
```python
from cbook import __reduce__
```



---
## __name__
```python
from mathtext import __name__
```

A module for parsing a subset of the TeX math syntax and rendering it to a
Matplotlib backend.

For a tutorial of its usage, see :ref:`mathtext`.  This
document is primarily concerned with implementation details.

The module uses pyparsing_ to parse the TeX expression.

.. _pyparsing: https://pypi.org/project/pyparsing/

The Bakoma distribution of the TeX Computer Modern fonts, and STIX
fonts are supported.  There is experimental support for using
arbitrary fonts, but results may vary without proper tweaking and
metrics for those fonts.

---
## MathTextParser
```python
from mathtext import MathTextParser
```



---
## math_to_image
```python
from mathtext import math_to_image
```

Given a math expression, renders it in a closely-clipped bounding
box to an image file.

Parameters
----------
s : str
    A math expression.  The math portion must be enclosed in dollar signs.
filename_or_obj : str or path-like or file-like
    Where to write the image data.
prop : `.FontProperties`, optional
    The size and style of the text.
dpi : float, optional
    The output dpi.  If not set, the dpi is determined as for
    `.Figure.savefig`.
format : str, optional
    The output format, e.g., 'svg', 'pdf', 'ps' or 'png'.  If not set, the
    format is determined as for `.Figure.savefig`.
color : str, optional
    Foreground color, defaults to :rc:`text.color`.

---
## __init__
```python
from mathtext import __init__
```

Create a MathTextParser for the given backend *output*.

Parameters
----------
output : {"path", "agg"}
    Whether to return a `VectorParse` ("path") or a
    `RasterParse` ("agg", or its synonym "macosx").

---
## parse
```python
from mathtext import parse
```

Parse the given math expression *s* at the given *dpi*.  If *prop* is
provided, it is a `.FontProperties` object specifying the "default"
font to use in the math expression, used for all non-math text.

The results are cached, so multiple calls to `parse`
with the same expression should be fast.

Depending on the *output* type, this returns either a `VectorParse` or
a `RasterParse`.

---
## _parse_cached
```python
from mathtext import _parse_cached
```



---
## __name__
```python
from _fontconfig_pattern import __name__
```

A module for parsing and generating `fontconfig patterns`_.

.. _fontconfig patterns:
   https://www.freedesktop.org/software/fontconfig/fontconfig-user.html

---
## _make_fontconfig_parser
```python
from _fontconfig_pattern import _make_fontconfig_parser
```



---
## parse_fontconfig_pattern
```python
from _fontconfig_pattern import parse_fontconfig_pattern
```

Parse a fontconfig *pattern* into a dict that can initialize a
`.font_manager.FontProperties` object.

---
## generate_fontconfig_pattern
```python
from _fontconfig_pattern import generate_fontconfig_pattern
```

Convert a `.FontProperties` to a fontconfig pattern string.

---
## comma_separated
```python
from _fontconfig_pattern import comma_separated
```



---
## __name__
```python
from font_manager import __name__
```

A module for finding, managing, and using fonts across platforms.

This module provides a single `FontManager` instance, ``fontManager``, that can
be shared across backends and platforms.  The `findfont`
function returns the best TrueType (TTF) font file in the local or
system font path that matches the specified `FontProperties`
instance.  The `FontManager` also handles Adobe Font Metrics
(AFM) font files for use by the PostScript backend.
The `FontManager.addfont` function adds a custom font from a file without
installing it into your operating system.

The design is based on the `W3C Cascading Style Sheet, Level 1 (CSS1)
font specification <http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_.
Future versions may implement the Level 2 or 2.1 specifications.

---
## get_fontext_synonyms
```python
from font_manager import get_fontext_synonyms
```

Return a list of file extensions that are synonyms for
the given file extension *fileext*.

---
## list_fonts
```python
from font_manager import list_fonts
```

Return a list of all fonts matching any of the extensions, found
recursively under the directory.

---
## win32FontDirectory
```python
from font_manager import win32FontDirectory
```

Return the user-specified font directory for Win32.  This is
looked up from the registry key ::

  \\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Fonts

If the key is not found, ``%WINDIR%\Fonts`` will be returned.

---
## _get_win32_installed_fonts
```python
from font_manager import _get_win32_installed_fonts
```

List the font paths known to the Windows registry.

---
## _get_fontconfig_fonts
```python
from font_manager import _get_fontconfig_fonts
```

Cache and list the font paths known to ``fc-list``.

---
## _get_macos_fonts
```python
from font_manager import _get_macos_fonts
```

Cache and list the font paths known to ``system_profiler SPFontsDataType``.

---
## findSystemFonts
```python
from font_manager import findSystemFonts
```

Search for fonts in the specified font paths.  If no paths are
given, will use a standard set of system paths, as well as the
list of fonts tracked by fontconfig if fontconfig is installed and
available.  A list of TrueType fonts are returned by default with
AFM fonts as an option.

---
## FontEntry
```python
from font_manager import FontEntry
```

A class for storing Font properties.

It is used when populating the font lookup dictionary.

---
## ttfFontProperty
```python
from font_manager import ttfFontProperty
```

Extract information from a TrueType font file.

Parameters
----------
font : `.FT2Font`
    The TrueType font file from which information will be extracted.

Returns
-------
`FontEntry`
    The extracted font properties.

---
## afmFontProperty
```python
from font_manager import afmFontProperty
```

Extract information from an AFM font file.

Parameters
----------
fontpath : str
    The filename corresponding to *font*.
font : AFM
    The AFM font file from which information will be extracted.

Returns
-------
`FontEntry`
    The extracted font properties.

---
## FontProperties
```python
from font_manager import FontProperties
```

A class for storing and manipulating font properties.

The font properties are the six properties described in the
`W3C Cascading Style Sheet, Level 1
<http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_ font
specification and *math_fontfamily* for math fonts:

- family: A list of font names in decreasing order of priority.
  The items may include a generic font family name, either 'sans-serif',
  'serif', 'cursive', 'fantasy', or 'monospace'.  In that case, the actual
  font to be used will be looked up from the associated rcParam during the
  search process in `.findfont`. Default: :rc:`font.family`

- style: Either 'normal', 'italic' or 'oblique'.
  Default: :rc:`font.style`

- variant: Either 'normal' or 'small-caps'.
  Default: :rc:`font.variant`

- stretch: A numeric value in the range 0-1000 or one of
  'ultra-condensed', 'extra-condensed', 'condensed',
  'semi-condensed', 'normal', 'semi-expanded', 'expanded',
  'extra-expanded' or 'ultra-expanded'. Default: :rc:`font.stretch`

- weight: A numeric value in the range 0-1000 or one of
  'ultralight', 'light', 'normal', 'regular', 'book', 'medium',
  'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy',
  'extra bold', 'black'. Default: :rc:`font.weight`

- size: Either a relative value of 'xx-small', 'x-small',
  'small', 'medium', 'large', 'x-large', 'xx-large' or an
  absolute font size, e.g., 10. Default: :rc:`font.size`

- math_fontfamily: The family of fonts used to render math text.
  Supported values are: 'dejavusans', 'dejavuserif', 'cm',
  'stix', 'stixsans' and 'custom'. Default: :rc:`mathtext.fontset`

Alternatively, a font may be specified using the absolute path to a font
file, by using the *fname* kwarg.  However, in this case, it is typically
simpler to just pass the path (as a `pathlib.Path`, not a `str`) to the
*font* kwarg of the `.Text` object.

The preferred usage of font sizes is to use the relative values,
e.g.,  'large', instead of absolute font sizes, e.g., 12.  This
approach allows all text sizes to be made larger or smaller based
on the font manager's default font size.

This class will also accept a fontconfig_ pattern_, if it is the only
argument provided.  This support does not depend on fontconfig; we are
merely borrowing its pattern syntax for use here.

.. _fontconfig: https://www.freedesktop.org/wiki/Software/fontconfig/
.. _pattern:
   https://www.freedesktop.org/software/fontconfig/fontconfig-user.html

Note that Matplotlib's internal font manager and fontconfig use a
different algorithm to lookup fonts, so the results of the same pattern
may be different in Matplotlib than in other applications that use
fontconfig.

---
## _JSONEncoder
```python
from font_manager import _JSONEncoder
```



---
## _json_decode
```python
from font_manager import _json_decode
```



---
## json_dump
```python
from font_manager import json_dump
```

Dump `FontManager` *data* as JSON to the file named *filename*.

See Also
--------
json_load

Notes
-----
File paths that are children of the Matplotlib data path (typically, fonts
shipped with Matplotlib) are stored relative to that data path (to remain
valid across virtualenvs).

This function temporarily locks the output file to prevent multiple
processes from overwriting one another's output.

---
## json_load
```python
from font_manager import json_load
```

Load a `FontManager` from the JSON file named *filename*.

See Also
--------
json_dump

---
## FontManager
```python
from font_manager import FontManager
```

On import, the `FontManager` singleton instance creates a list of ttf and
afm fonts and caches their `FontProperties`.  The `FontManager.findfont`
method does a nearest neighbor search to find the font that most closely
matches the specification.  If no good enough match is found, the default
font is returned.

Fonts added with the `FontManager.addfont` method will not persist in the
cache; therefore, `addfont` will need to be called every time Matplotlib is
imported. This method should only be used if and when a font cannot be
installed on your operating system by other means.

Notes
-----
The `FontManager.addfont` method must be called on the global `FontManager`
instance.

Example usage::

    import matplotlib.pyplot as plt
    from matplotlib import font_manager

    font_dirs = ["/resources/fonts"]  # The path to the custom font file.
    font_files = font_manager.findSystemFonts(fontpaths=font_dirs)

    for font_file in font_files:
        font_manager.fontManager.addfont(font_file)

---
## is_opentype_cff_font
```python
from font_manager import is_opentype_cff_font
```

Return whether the given font is a Postscript Compact Font Format Font
embedded in an OpenType wrapper.  Used by the PostScript and PDF backends
that cannot subset these fonts.

---
## _get_font
```python
from font_manager import _get_font
```



---
## _cached_realpath
```python
from font_manager import _cached_realpath
```



---
## get_font
```python
from font_manager import get_font
```

Get an `.ft2font.FT2Font` object given a list of file paths.

Parameters
----------
font_filepaths : Iterable[str, Path, bytes], str, Path, bytes
    Relative or absolute paths to the font files to be used.

    If a single string, bytes, or `pathlib.Path`, then it will be treated
    as a list with that entry only.

    If more than one filepath is passed, then the returned FT2Font object
    will fall back through the fonts, in the order given, to find a needed
    glyph.

Returns
-------
`.ft2font.FT2Font`

---
## _load_fontmanager
```python
from font_manager import _load_fontmanager
```



---
## _repr_html_
```python
from font_manager import _repr_html_
```



---
## _repr_png_
```python
from font_manager import _repr_png_
```



---
## get_weight
```python
from font_manager import get_weight
```

Set the font weight.  Options are: A numeric value in the
range 0-1000 or one of 'light', 'normal', 'regular', 'book',
'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold',
'heavy', 'extra bold', 'black'

---
## __init__
```python
from font_manager import __init__
```



---
## _from_any
```python
from font_manager import _from_any
```

Generic constructor which can build a `.FontProperties` from any of the
following:

- a `.FontProperties`: it is passed through as is;
- `None`: a `.FontProperties` using rc values is used;
- an `os.PathLike`: it is used as path to the font file;
- a `str`: it is parsed as a fontconfig pattern;
- a `dict`: it is passed as ``**kwargs`` to `.FontProperties`.

---
## __hash__
```python
from font_manager import __hash__
```



---
## __eq__
```python
from font_manager import __eq__
```



---
## __str__
```python
from font_manager import __str__
```



---
## get_family
```python
from font_manager import get_family
```

Return a list of individual font family names or generic family names.

The font families or generic font families (which will be resolved
from their respective rcParams when searching for a matching font) in
the order of preference.

---
## get_name
```python
from font_manager import get_name
```

Return the name of the font that best matches the font properties.

---
## get_style
```python
from font_manager import get_style
```

Return the font style.  Values are: 'normal', 'italic' or 'oblique'.

---
## get_variant
```python
from font_manager import get_variant
```

Return the font variant.  Values are: 'normal' or 'small-caps'.

---
## get_stretch
```python
from font_manager import get_stretch
```

Return the font stretch or width.  Options are: 'ultra-condensed',
'extra-condensed', 'condensed', 'semi-condensed', 'normal',
'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'.

---
## get_size
```python
from font_manager import get_size
```

Return the font size.

---
## get_file
```python
from font_manager import get_file
```

Return the filename of the associated font.

---
## get_fontconfig_pattern
```python
from font_manager import get_fontconfig_pattern
```

Get a fontconfig_ pattern_ suitable for looking up the font as
specified with fontconfig's ``fc-match`` utility.

This support does not depend on fontconfig; we are merely borrowing its
pattern syntax for use here.

---
## set_family
```python
from font_manager import set_family
```

Change the font family.  Can be either an alias (generic name
is CSS parlance), such as: 'serif', 'sans-serif', 'cursive',
'fantasy', or 'monospace', a real font name or a list of real
font names.  Real font names are not supported when
:rc:`text.usetex` is `True`. Default: :rc:`font.family`

---
## set_style
```python
from font_manager import set_style
```

Set the font style.

Parameters
----------
style : {'normal', 'italic', 'oblique'}, default: :rc:`font.style`

---
## set_variant
```python
from font_manager import set_variant
```

Set the font variant.

Parameters
----------
variant : {'normal', 'small-caps'}, default: :rc:`font.variant`

---
## set_weight
```python
from font_manager import set_weight
```

Set the font weight.

Parameters
----------
weight : int or {'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}, default: :rc:`font.weight`
    If int, must be in the range  0-1000.

---
## set_stretch
```python
from font_manager import set_stretch
```

Set the font stretch or width.

Parameters
----------
stretch : int or {'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}, default: :rc:`font.stretch`
    If int, must be in the range  0-1000.

---
## set_size
```python
from font_manager import set_size
```

Set the font size.

Parameters
----------
size : float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}, default: :rc:`font.size`
    If a float, the font size in points. The string values denote
    sizes relative to the default font size.

---
## set_file
```python
from font_manager import set_file
```

Set the filename of the fontfile to use.  In this case, all
other properties will be ignored.

---
## set_fontconfig_pattern
```python
from font_manager import set_fontconfig_pattern
```

Set the properties by parsing a fontconfig_ *pattern*.

This support does not depend on fontconfig; we are merely borrowing its
pattern syntax for use here.

---
## get_math_fontfamily
```python
from font_manager import get_math_fontfamily
```

Return the name of the font family used for math text.

The default font is :rc:`mathtext.fontset`.

---
## set_math_fontfamily
```python
from font_manager import set_math_fontfamily
```

Set the font family for text in math mode.

If not set explicitly, :rc:`mathtext.fontset` will be used.

Parameters
----------
fontfamily : str
    The name of the font family.

    Available font families are defined in the
    :ref:`default matplotlibrc file <customizing-with-matplotlibrc-files>`.

See Also
--------
.text.Text.get_math_fontfamily

---
## copy
```python
from font_manager import copy
```

Return a copy of self.

---
## default
```python
from font_manager import default
```



---
## addfont
```python
from font_manager import addfont
```

Cache the properties of the font at *path* to make it available to the
`FontManager`.  The type of font is inferred from the path suffix.

Parameters
----------
path : str or path-like

Notes
-----
This method is useful for adding a custom font without installing it in
your operating system. See the `FontManager` singleton instance for
usage and caveats about this function.

---
## defaultFont
```python
from font_manager import defaultFont
```



---
## get_default_weight
```python
from font_manager import get_default_weight
```

Return the default font weight.

---
## get_default_size
```python
from font_manager import get_default_size
```

Return the default font size.

---
## set_default_weight
```python
from font_manager import set_default_weight
```

Set the default font weight.  The initial value is 'normal'.

---
## _expand_aliases
```python
from font_manager import _expand_aliases
```



---
## score_family
```python
from font_manager import score_family
```

Return a match score between the list of font families in
*families* and the font family name *family2*.

An exact match at the head of the list returns 0.0.

A match further down the list will return between 0 and 1.

No match will return 1.0.

---
## score_style
```python
from font_manager import score_style
```

Return a match score between *style1* and *style2*.

An exact match returns 0.0.

A match between 'italic' and 'oblique' returns 0.1.

No match returns 1.0.

---
## score_variant
```python
from font_manager import score_variant
```

Return a match score between *variant1* and *variant2*.

An exact match returns 0.0, otherwise 1.0.

---
## score_stretch
```python
from font_manager import score_stretch
```

Return a match score between *stretch1* and *stretch2*.

The result is the absolute value of the difference between the
CSS numeric values of *stretch1* and *stretch2*, normalized
between 0.0 and 1.0.

---
## score_weight
```python
from font_manager import score_weight
```

Return a match score between *weight1* and *weight2*.

The result is 0.0 if both weight1 and weight 2 are given as strings
and have the same value.

Otherwise, the result is the absolute value of the difference between
the CSS numeric values of *weight1* and *weight2*, normalized between
0.05 and 1.0.

---
## score_size
```python
from font_manager import score_size
```

Return a match score between *size1* and *size2*.

If *size2* (the size specified in the font file) is 'scalable', this
function always returns 0.0, since any font size can be generated.

Otherwise, the result is the absolute distance between *size1* and
*size2*, normalized so that the usual range of font sizes (6pt -
72pt) will lie between 0.0 and 1.0.

---
## findfont
```python
from font_manager import findfont
```

Find the path to the font file most closely matching the given font properties.

Parameters
----------
prop : str or `~matplotlib.font_manager.FontProperties`
    The font properties to search for. This can be either a
    `.FontProperties` object or a string defining a
    `fontconfig patterns`_.

fontext : {'ttf', 'afm'}, default: 'ttf'
    The extension of the font file:

    - 'ttf': TrueType and OpenType fonts (.ttf, .ttc, .otf)
    - 'afm': Adobe Font Metrics (.afm)

directory : str, optional
    If given, only search this directory and its subdirectories.

fallback_to_default : bool
    If True, will fall back to the default font family (usually
    "DejaVu Sans" or "Helvetica") if the first lookup hard-fails.

rebuild_if_missing : bool
    Whether to rebuild the font cache and search again if the first
    match appears to point to a nonexisting font (i.e., the font cache
    contains outdated entries).

Returns
-------
str
    The filename of the best matching font.

Notes
-----
This performs a nearest neighbor search.  Each font is given a
similarity score to the target font properties.  The first font with
the highest score is returned.  If no matches below a certain
threshold are found, the default font (usually DejaVu Sans) is
returned.

The result is cached, so subsequent lookups don't have to
perform the O(n) nearest neighbor search.

See the `W3C Cascading Style Sheet, Level 1
<http://www.w3.org/TR/1998/REC-CSS2-19980512/>`_ documentation
for a description of the font finding algorithm.

.. _fontconfig patterns:
   https://www.freedesktop.org/software/fontconfig/fontconfig-user.html

---
## get_font_names
```python
from font_manager import get_font_names
```

Return the list of available fonts.

---
## _find_fonts_by_props
```python
from font_manager import _find_fonts_by_props
```

Find the paths to the font files most closely matching the given properties.

Parameters
----------
prop : str or `~matplotlib.font_manager.FontProperties`
    The font properties to search for. This can be either a
    `.FontProperties` object or a string defining a
    `fontconfig patterns`_.

fontext : {'ttf', 'afm'}, default: 'ttf'
    The extension of the font file:

    - 'ttf': TrueType and OpenType fonts (.ttf, .ttc, .otf)
    - 'afm': Adobe Font Metrics (.afm)

directory : str, optional
    If given, only search this directory and its subdirectories.

fallback_to_default : bool
    If True, will fall back to the default font family (usually
    "DejaVu Sans" or "Helvetica") if none of the families were found.

rebuild_if_missing : bool
    Whether to rebuild the font cache and search again if the first
    match appears to point to a nonexisting font (i.e., the font cache
    contains outdated entries).

Returns
-------
list[str]
    The paths of the fonts found.

Notes
-----
This is an extension/wrapper of the original findfont API, which only
returns a single font for given font properties. Instead, this API
returns a list of filepaths of multiple fonts which closely match the
given font properties.  Since this internally uses the original API,
there's no change to the logic of performing the nearest neighbor
search.  See `findfont` for more details.

---
## _findfont_cached
```python
from font_manager import _findfont_cached
```



---
## __name__
```python
from bezier import __name__
```

A module providing some utility functions regarding Bézier path manipulation.

---
## _comb
```python
from bezier import _comb
```



---
## NonIntersectingPathException
```python
from bezier import NonIntersectingPathException
```



---
## get_intersection
```python
from bezier import get_intersection
```

Return the intersection between the line through (*cx1*, *cy1*) at angle
*t1* and the line through (*cx2*, *cy2*) at angle *t2*.

---
## get_normal_points
```python
from bezier import get_normal_points
```

For a line passing through (*cx*, *cy*) and having an angle *t*, return
locations of the two points located along its perpendicular line at the
distance of *length*.

---
## _de_casteljau1
```python
from bezier import _de_casteljau1
```



---
## split_de_casteljau
```python
from bezier import split_de_casteljau
```

Split a Bézier segment defined by its control points *beta* into two
separate segments divided at *t* and return their control points.

---
## find_bezier_t_intersecting_with_closedpath
```python
from bezier import find_bezier_t_intersecting_with_closedpath
```

Find the intersection of the Bézier curve with a closed path.

The intersection point *t* is approximated by two parameters *t0*, *t1*
such that *t0* <= *t* <= *t1*.

Search starts from *t0* and *t1* and uses a simple bisecting algorithm
therefore one of the end points must be inside the path while the other
doesn't. The search stops when the distance of the points parametrized by
*t0* and *t1* gets smaller than the given *tolerance*.

Parameters
----------
bezier_point_at_t : callable
    A function returning x, y coordinates of the Bézier at parameter *t*.
    It must have the signature::

        bezier_point_at_t(t: float) -> tuple[float, float]

inside_closedpath : callable
    A function returning True if a given point (x, y) is inside the
    closed path. It must have the signature::

        inside_closedpath(point: tuple[float, float]) -> bool

t0, t1 : float
    Start parameters for the search.

tolerance : float
    Maximal allowed distance between the final points.

Returns
-------
t0, t1 : float
    The Bézier path parameters.

---
## BezierSegment
```python
from bezier import BezierSegment
```

A d-dimensional Bézier segment.

Parameters
----------
control_points : (N, d) array
    Location of the *N* control points.

---
## split_bezier_intersecting_with_closedpath
```python
from bezier import split_bezier_intersecting_with_closedpath
```

Split a Bézier curve into two at the intersection with a closed path.

Parameters
----------
bezier : (N, 2) array-like
    Control points of the Bézier segment. See `.BezierSegment`.
inside_closedpath : callable
    A function returning True if a given point (x, y) is inside the
    closed path. See also `.find_bezier_t_intersecting_with_closedpath`.
tolerance : float
    The tolerance for the intersection. See also
    `.find_bezier_t_intersecting_with_closedpath`.

Returns
-------
left, right
    Lists of control points for the two Bézier segments.

---
## split_path_inout
```python
from bezier import split_path_inout
```

Divide a path into two segments at the point where ``inside(x, y)`` becomes
False.

---
## inside_circle
```python
from bezier import inside_circle
```

Return a function that checks whether a point is in a circle with center
(*cx*, *cy*) and radius *r*.

The returned function has the signature::

    f(xy: tuple[float, float]) -> bool

---
## get_cos_sin
```python
from bezier import get_cos_sin
```



---
## check_if_parallel
```python
from bezier import check_if_parallel
```

Check if two lines are parallel.

Parameters
----------
dx1, dy1, dx2, dy2 : float
    The gradients *dy*/*dx* of the two lines.
tolerance : float
    The angular tolerance in radians up to which the lines are considered
    parallel.

Returns
-------
is_parallel
    - 1 if two lines are parallel in same direction.
    - -1 if two lines are parallel in opposite direction.
    - False otherwise.

---
## get_parallels
```python
from bezier import get_parallels
```

Given the quadratic Bézier control points *bezier2*, returns
control points of quadratic Bézier lines roughly parallel to given
one separated by *width*.

---
## find_control_points
```python
from bezier import find_control_points
```

Find control points of the Bézier curve passing through (*c1x*, *c1y*),
(*mmx*, *mmy*), and (*c2x*, *c2y*), at parametric values 0, 0.5, and 1.

---
## make_wedged_bezier2
```python
from bezier import make_wedged_bezier2
```

Being similar to `get_parallels`, returns control points of two quadratic
Bézier lines having a width roughly parallel to given one separated by
*width*.

---
## __init__
```python
from bezier import __init__
```



---
## __call__
```python
from bezier import __call__
```

Evaluate the Bézier curve at point(s) *t* in [0, 1].

Parameters
----------
t : (k,) array-like
    Points at which to evaluate the curve.

Returns
-------
(k, d) array
    Value of the curve for each point in *t*.

---
## point_at_t
```python
from bezier import point_at_t
```

Evaluate the curve at a single point, returning a tuple of *d* floats.

---
## control_points
```python
from bezier import control_points
```

The control points of the curve.

---
## dimension
```python
from bezier import dimension
```

The dimension of the curve.

---
## degree
```python
from bezier import degree
```

Degree of the polynomial. One less the number of control points.

---
## polynomial_coefficients
```python
from bezier import polynomial_coefficients
```

The polynomial coefficients of the Bézier curve.

.. warning:: Follows opposite convention from `numpy.polyval`.

Returns
-------
(n+1, d) array
    Coefficients after expanding in polynomial basis, where :math:`n`
    is the degree of the Bézier curve and :math:`d` its dimension.
    These are the numbers (:math:`C_j`) such that the curve can be
    written :math:`\sum_{j=0}^n C_j t^j`.

Notes
-----
The coefficients are calculated as

.. math::

    {n \choose j} \sum_{i=0}^j (-1)^{i+j} {j \choose i} P_i

where :math:`P_i` are the control points of the curve.

---
## axis_aligned_extrema
```python
from bezier import axis_aligned_extrema
```

Return the dimension and location of the curve's interior extrema.

The extrema are the points along the curve where one of its partial
derivatives is zero.

Returns
-------
dims : array of int
    Index :math:`i` of the partial derivative which is zero at each
    interior extrema.
dzeros : array of float
    Of same size as dims. The :math:`t` such that :math:`d/dx_i B(t) =
    0`

---
## _f
```python
from bezier import _f
```



---
## __name__
```python
from _afm import __name__
```

A python interface to Adobe Font Metrics Files.

Although a number of other Python implementations exist, and may be more
complete than this, it was decided not to go with them because they were
either:

1) copyrighted or used a non-BSD compatible license
2) had too many dependencies and a free standing lib was needed
3) did more than needed and it was easier to write afresh rather than
   figure out how to get just what was needed.

It is pretty easy to use, and has no external dependencies:

>>> import matplotlib as mpl
>>> from pathlib import Path
>>> afm_path = Path(mpl.get_data_path(), 'fonts', 'afm', 'ptmr8a.afm')
>>>
>>> from matplotlib.afm import AFM
>>> with afm_path.open('rb') as fh:
...     afm = AFM(fh)
>>> afm.string_width_height('What the heck?')
(6220.0, 694)
>>> afm.get_fontname()
'Times-Roman'
>>> afm.get_kern_dist('A', 'f')
0
>>> afm.get_kern_dist('A', 'y')
-92.0
>>> afm.get_bbox_char('!')
[130, -9, 238, 676]

As in the Adobe Font Metrics File Format Specification, all dimensions
are given in units of 1/1000 of the scale factor (point size) of the font
being used.

---
## _to_int
```python
from _afm import _to_int
```



---
## _to_float
```python
from _afm import _to_float
```



---
## _to_str
```python
from _afm import _to_str
```



---
## _to_list_of_ints
```python
from _afm import _to_list_of_ints
```



---
## _to_list_of_floats
```python
from _afm import _to_list_of_floats
```



---
## _to_bool
```python
from _afm import _to_bool
```



---
## _parse_header
```python
from _afm import _parse_header
```

Read the font metrics header (up to the char metrics) and returns
a dictionary mapping *key* to *val*.  *val* will be converted to the
appropriate python type as necessary; e.g.:

    * 'False'->False
    * '0'->0
    * '-168 -218 1000 898'-> [-168, -218, 1000, 898]

Dictionary keys are

  StartFontMetrics, FontName, FullName, FamilyName, Weight,
  ItalicAngle, IsFixedPitch, FontBBox, UnderlinePosition,
  UnderlineThickness, Version, Notice, EncodingScheme, CapHeight,
  XHeight, Ascender, Descender, StartCharMetrics

---
## _parse_char_metrics
```python
from _afm import _parse_char_metrics
```

Parse the given filehandle for character metrics information and return
the information as dicts.

It is assumed that the file cursor is on the line behind
'StartCharMetrics'.

Returns
-------
ascii_d : dict
     A mapping "ASCII num of the character" to `.CharMetrics`.
name_d : dict
     A mapping "character name" to `.CharMetrics`.

Notes
-----
This function is incomplete per the standard, but thus far parses
all the sample afm files tried.

---
## _parse_kern_pairs
```python
from _afm import _parse_kern_pairs
```

Return a kern pairs dictionary; keys are (*char1*, *char2*) tuples and
values are the kern pair value.  For example, a kern pairs line like
``KPX A y -50``

will be represented as::

  d[ ('A', 'y') ] = -50

---
## _parse_composites
```python
from _afm import _parse_composites
```

Parse the given filehandle for composites information return them as a
dict.

It is assumed that the file cursor is on the line behind 'StartComposites'.

Returns
-------
dict
    A dict mapping composite character names to a parts list. The parts
    list is a list of `.CompositePart` entries describing the parts of
    the composite.

Examples
--------
A composite definition line::

  CC Aacute 2 ; PCC A 0 0 ; PCC acute 160 170 ;

will be represented as::

  composites['Aacute'] = [CompositePart(name='A', dx=0, dy=0),
                          CompositePart(name='acute', dx=160, dy=170)]

---
## _parse_optional
```python
from _afm import _parse_optional
```

Parse the optional fields for kern pair data and composites.

Returns
-------
kern_data : dict
    A dict containing kerning information. May be empty.
    See `._parse_kern_pairs`.
composites : dict
    A dict containing composite information. May be empty.
    See `._parse_composites`.

---
## AFM
```python
from _afm import AFM
```



---
## __init__
```python
from _afm import __init__
```

Parse the AFM file in file object *fh*.

---
## get_bbox_char
```python
from _afm import get_bbox_char
```



---
## string_width_height
```python
from _afm import string_width_height
```

Return the string width (including kerning) and string height
as a (*w*, *h*) tuple.

---
## get_str_bbox_and_descent
```python
from _afm import get_str_bbox_and_descent
```

Return the string bounding box and the maximal descent.

---
## get_str_bbox
```python
from _afm import get_str_bbox
```

Return the string bounding box.

---
## get_name_char
```python
from _afm import get_name_char
```

Get the name of the character, i.e., ';' is 'semicolon'.

---
## get_width_char
```python
from _afm import get_width_char
```

Get the width of the character from the character metric WX field.

---
## get_width_from_char_name
```python
from _afm import get_width_from_char_name
```

Get the width of the character from a type1 character name.

---
## get_height_char
```python
from _afm import get_height_char
```

Get the bounding box (ink) height of character *c* (space is 0).

---
## get_kern_dist
```python
from _afm import get_kern_dist
```

Return the kerning pair distance (possibly 0) for chars *c1* and *c2*.

---
## get_kern_dist_from_name
```python
from _afm import get_kern_dist_from_name
```

Return the kerning pair distance (possibly 0) for chars
*name1* and *name2*.

---
## get_fontname
```python
from _afm import get_fontname
```

Return the font name, e.g., 'Times-Roman'.

---
## postscript_name
```python
from _afm import postscript_name
```



---
## get_fullname
```python
from _afm import get_fullname
```

Return the font full name, e.g., 'Times-Roman'.

---
## get_familyname
```python
from _afm import get_familyname
```

Return the font family name, e.g., 'Times'.

---
## family_name
```python
from _afm import family_name
```

The font family name, e.g., 'Times'.

---
## get_weight
```python
from _afm import get_weight
```

Return the font weight, e.g., 'Bold' or 'Roman'.

---
## get_angle
```python
from _afm import get_angle
```

Return the fontangle as float.

---
## get_capheight
```python
from _afm import get_capheight
```

Return the cap height as float.

---
## get_xheight
```python
from _afm import get_xheight
```

Return the xheight as float.

---
## get_underline_thickness
```python
from _afm import get_underline_thickness
```

Return the underline thickness as float.

---
## get_horizontal_stem_width
```python
from _afm import get_horizontal_stem_width
```

Return the standard horizontal stem width as float, or *None* if
not specified in AFM file.

---
## get_vertical_stem_width
```python
from _afm import get_vertical_stem_width
```

Return the standard vertical stem width as float, or *None* if
not specified in AFM file.

---
## __name__
```python
from cm import __name__
```

Builtin colormaps, colormap handling utilities, and the `ScalarMappable` mixin.

.. seealso::

  :doc:`/gallery/color/colormap_reference` for a list of builtin colormaps.

  :ref:`colormap-manipulation` for examples of how to make
  colormaps.

  :ref:`colormaps` an in-depth discussion of choosing
  colormaps.

  :ref:`colormapnorms` for more details about data normalization.

---
## _gen_cmap_registry
```python
from cm import _gen_cmap_registry
```

Generate a dict mapping standard colormap names to standard colormaps, as
well as the reversed colormaps.

---
## ColormapRegistry
```python
from cm import ColormapRegistry
```

Container for colormaps that are known to Matplotlib by name.

The universal registry instance is `matplotlib.colormaps`. There should be
no need for users to instantiate `.ColormapRegistry` themselves.

Read access uses a dict-like interface mapping names to `.Colormap`\s::

    import matplotlib as mpl
    cmap = mpl.colormaps['viridis']

Returned `.Colormap`\s are copies, so that their modification does not
change the global definition of the colormap.

Additional colormaps can be added via `.ColormapRegistry.register`::

    mpl.colormaps.register(my_colormap)

To get a list of all registered colormaps, you can do::

    from matplotlib import colormaps
    list(colormaps)

---
## get_cmap
```python
from cm import get_cmap
```

Return the `.Colormap` instance.

---
## _auto_norm_from_scale
```python
from cm import _auto_norm_from_scale
```

Automatically generate a norm class from *scale_cls*.

This differs from `.colors.make_norm_from_scale` in the following points:

- This function is not a class decorator, but directly returns a norm class
  (as if decorating `.Normalize`).
- The scale is automatically constructed with ``nonpositive="mask"``, if it
  supports such a parameter, to work around the difference in defaults
  between standard scales (which use "clip") and norms (which use "mask").

Note that ``make_norm_from_scale`` caches the generated norm classes
(not the instances) and reuses them for later calls.  For example,
``type(_auto_norm_from_scale("log")) == LogNorm``.

---
## ScalarMappable
```python
from cm import ScalarMappable
```

A mixin class to map scalar data to RGBA.

The ScalarMappable applies data normalization before returning RGBA colors
from the given colormap.

---
## _ensure_cmap
```python
from cm import _ensure_cmap
```

Ensure that we have a `.Colormap` object.

For internal use to preserve type stability of errors.

Parameters
----------
cmap : None, str, Colormap

    - if a `Colormap`, return it
    - if a string, look it up in mpl.colormaps
    - if None, look up the default color map in mpl.colormaps

Returns
-------
Colormap

---
## __init__
```python
from cm import __init__
```

Parameters
----------
norm : `.Normalize` (or subclass thereof) or str or None
    The normalizing object which scales data, typically into the
    interval ``[0, 1]``.
    If a `str`, a `.Normalize` subclass is dynamically generated based
    on the scale with the corresponding name.
    If *None*, *norm* defaults to a *colors.Normalize* object which
    initializes its scaling based on the first data processed.
cmap : str or `~matplotlib.colors.Colormap`
    The colormap used to map normalized data values to RGBA colors.

---
## __getitem__
```python
from cm import __getitem__
```



---
## __iter__
```python
from cm import __iter__
```



---
## __len__
```python
from cm import __len__
```



---
## __str__
```python
from cm import __str__
```



---
## __call__
```python
from cm import __call__
```

Return a list of the registered colormap names.

This exists only for backward-compatibility in `.pyplot` which had a
``plt.colormaps()`` method. The recommended way to get this list is
now ``list(colormaps)``.

---
## register
```python
from cm import register
```

Register a new colormap.

The colormap name can then be used as a string argument to any ``cmap``
parameter in Matplotlib. It is also available in ``pyplot.get_cmap``.

The colormap registry stores a copy of the given colormap, so that
future changes to the original colormap instance do not affect the
registered colormap. Think of this as the registry taking a snapshot
of the colormap at registration.

Parameters
----------
cmap : matplotlib.colors.Colormap
    The colormap to register.

name : str, optional
    The name for the colormap. If not given, ``cmap.name`` is used.

force : bool, default: False
    If False, a ValueError is raised if trying to overwrite an already
    registered name. True supports overwriting registered colormaps
    other than the builtin colormaps.

---
## unregister
```python
from cm import unregister
```

Remove a colormap from the registry.

You cannot remove built-in colormaps.

If the named colormap is not registered, returns with no error, raises
if you try to de-register a default colormap.

.. warning::

    Colormap names are currently a shared namespace that may be used
    by multiple packages. Use `unregister` only if you know you
    have registered that name before. In particular, do not
    unregister just in case to clean the name before registering a
    new colormap.

Parameters
----------
name : str
    The name of the colormap to be removed.

Raises
------
ValueError
    If you try to remove a default built-in colormap.

---
## _scale_norm
```python
from cm import _scale_norm
```

Helper for initial scaling.

Used by public functions that create a ScalarMappable and support
parameters *vmin*, *vmax* and *norm*. This makes sure that a *norm*
will take precedence over *vmin*, *vmax*.

Note that this method does not set the norm.

---
## to_rgba
```python
from cm import to_rgba
```

Return a normalized RGBA array corresponding to *x*.

In the normal case, *x* is a 1D or 2D sequence of scalars, and
the corresponding `~numpy.ndarray` of RGBA values will be returned,
based on the norm and colormap set for this ScalarMappable.

There is one special case, for handling images that are already
RGB or RGBA, such as might have been read from an image file.
If *x* is an `~numpy.ndarray` with 3 dimensions,
and the last dimension is either 3 or 4, then it will be
treated as an RGB or RGBA array, and no mapping will be done.
The array can be `~numpy.uint8`, or it can be floats with
values in the 0-1 range; otherwise a ValueError will be raised.
Any NaNs or masked elements will be set to 0 alpha.
If the last dimension is 3, the *alpha* kwarg (defaulting to 1)
will be used to fill in the transparency.  If the last dimension
is 4, the *alpha* kwarg is ignored; it does not
replace the preexisting alpha.  A ValueError will be raised
if the third dimension is other than 3 or 4.

In either case, if *bytes* is *False* (default), the RGBA
array will be floats in the 0-1 range; if it is *True*,
the returned RGBA array will be `~numpy.uint8` in the 0 to 255 range.

If norm is False, no normalization of the input data is
performed, and it is assumed to be in the range (0-1).

---
## set_array
```python
from cm import set_array
```

Set the value array from array-like *A*.

Parameters
----------
A : array-like or None
    The values that are mapped to colors.

    The base class `.ScalarMappable` does not make any assumptions on
    the dimensionality and shape of the value array *A*.

---
## get_array
```python
from cm import get_array
```

Return the array of values, that are mapped to colors.

The base class `.ScalarMappable` does not make any assumptions on
the dimensionality and shape of the array.

---
## get_clim
```python
from cm import get_clim
```

Return the values (min, max) that are mapped to the colormap limits.

---
## set_clim
```python
from cm import set_clim
```

Set the norm limits for image scaling.

Parameters
----------
vmin, vmax : float
     The limits.

     The limits may also be passed as a tuple (*vmin*, *vmax*) as a
     single positional argument.

     .. ACCEPTS: (vmin: float, vmax: float)

---
## get_alpha
```python
from cm import get_alpha
```

Returns
-------
float
    Always returns 1.

---
## set_cmap
```python
from cm import set_cmap
```

Set the colormap for luminance data.

Parameters
----------
cmap : `.Colormap` or str or None

---
## norm
```python
from cm import norm
```



---
## set_norm
```python
from cm import set_norm
```

Set the normalization instance.

Parameters
----------
norm : `.Normalize` or str or None

Notes
-----
If there are any colorbars using the mappable for this norm, setting
the norm of the mappable will reset the norm, locator, and formatters
on the colorbar to default.

---
## autoscale
```python
from cm import autoscale
```

Autoscale the scalar limits on the norm instance using the
current array

---
## autoscale_None
```python
from cm import autoscale_None
```

Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None

---
## changed
```python
from cm import changed
```

Call this whenever the mappable is changed to notify all the
callbackSM listeners to the 'changed' signal.

---
## __name__
```python
from legend import __name__
```

The legend module defines the Legend class, which is responsible for
drawing legends associated with Axes and/or figures.

.. important::

    It is unlikely that you would ever create a Legend instance manually.
    Most users would normally create a legend via the `~.Axes.legend`
    function. For more details on legends there is also a :ref:`legend guide
    <legend_guide>`.

The `Legend` class is a container of legend handles and legend texts.

The legend handler map specifies how to create legend handles from artists
(lines, patches, etc.) in the Axes or figures. Default legend handlers are
defined in the :mod:`~matplotlib.legend_handler` module. While not all artist
types are covered by the default legend handlers, custom legend handlers can be
defined to support arbitrary objects.

See the :ref`<legend_guide>` for more
information.

---
## DraggableLegend
```python
from legend import DraggableLegend
```



---
## Legend
```python
from legend import Legend
```

Place a legend on the figure/axes.

---
## _get_legend_handles
```python
from legend import _get_legend_handles
```

Yield artists that can be used as handles in a legend.

---
## _get_legend_handles_labels
```python
from legend import _get_legend_handles_labels
```

Return handles and labels for legend.

---
## _parse_legend_args
```python
from legend import _parse_legend_args
```

Get the handles and labels from the calls to either ``figure.legend``
or ``axes.legend``.

The parser is a bit involved because we support::

    legend()
    legend(labels)
    legend(handles, labels)
    legend(labels=labels)
    legend(handles=handles)
    legend(handles=handles, labels=labels)

The behavior for a mixture of positional and keyword handles and labels
is undefined and issues a warning; it will be an error in the future.

Parameters
----------
axs : list of `.Axes`
    If handles are not given explicitly, the artists in these Axes are
    used as handles.
*args : tuple
    Positional parameters passed to ``legend()``.
handles
    The value of the keyword argument ``legend(handles=...)``, or *None*
    if that keyword argument was not used.
labels
    The value of the keyword argument ``legend(labels=...)``, or *None*
    if that keyword argument was not used.
**kwargs
    All other keyword arguments passed to ``legend()``.

Returns
-------
handles : list of (`.Artist` or tuple of `.Artist`)
    The legend handles.
labels : list of str
    The legend labels.
kwargs : dict
    *kwargs* with keywords handles and labels removed.

---
## __init__
```python
from legend import __init__
```

Parameters
----------
parent : `~matplotlib.axes.Axes` or `.Figure`
    The artist that contains the legend.

handles : list of (`.Artist` or tuple of `.Artist`)
    A list of Artists (lines, patches) to be added to the legend.

labels : list of str
    A list of labels to show next to the artists. The length of handles
    and labels should be the same. If they are not, they are truncated
    to the length of the shorter list.

Other Parameters
----------------
%(_legend_kw_doc)s

Attributes
----------
legend_handles
    List of `.Artist` objects added as legend entries.

    .. versionadded:: 3.7

---
## finalize_offset
```python
from legend import finalize_offset
```



---
## _update_loc
```python
from legend import _update_loc
```



---
## _update_bbox_to_anchor
```python
from legend import _update_bbox_to_anchor
```



---
## __str__
```python
from legend import __str__
```



---
## _set_artist_props
```python
from legend import _set_artist_props
```

Set the boilerplate props for artists added to Axes.

---
## set_loc
```python
from legend import set_loc
```

Set the location of the legend.

.. versionadded:: 3.8

Parameters
----------
%(_legend_kw_set_loc_doc)s

---
## _set_loc
```python
from legend import _set_loc
```



---
## set_ncols
```python
from legend import set_ncols
```

Set the number of columns.

---
## _get_loc
```python
from legend import _get_loc
```



---
## _findoffset
```python
from legend import _findoffset
```

Helper function to locate the legend.

---
## draw
```python
from legend import draw
```



---
## get_default_handler_map
```python
from legend import get_default_handler_map
```

Return the global default handler map, shared by all legends.

---
## set_default_handler_map
```python
from legend import set_default_handler_map
```

Set the global default handler map, shared by all legends.

---
## update_default_handler_map
```python
from legend import update_default_handler_map
```

Update the global default handler map, shared by all legends.

---
## get_legend_handler_map
```python
from legend import get_legend_handler_map
```

Return this legend instance's handler map.

---
## get_legend_handler
```python
from legend import get_legend_handler
```

Return a legend handler from *legend_handler_map* that
corresponds to *orig_handler*.

*legend_handler_map* should be a dictionary object (that is
returned by the get_legend_handler_map method).

It first checks if the *orig_handle* itself is a key in the
*legend_handler_map* and return the associated value.
Otherwise, it checks for each of the classes in its
method-resolution-order. If no matching key is found, it
returns ``None``.

---
## _init_legend_box
```python
from legend import _init_legend_box
```

Initialize the legend_box. The legend_box is an instance of
the OffsetBox, which is packed with legend handles and
texts. Once packed, their location is calculated during the
drawing time.

---
## _auto_legend_data
```python
from legend import _auto_legend_data
```

Return display coordinates for hit testing for "best" positioning.

Returns
-------
bboxes
    List of bounding boxes of all patches.
lines
    List of `.Path` corresponding to each line.
offsets
    List of (x, y) offsets of all collection.

---
## get_children
```python
from legend import get_children
```



---
## get_frame
```python
from legend import get_frame
```

Return the `~.patches.Rectangle` used to frame the legend.

---
## get_lines
```python
from legend import get_lines
```

Return the list of `~.lines.Line2D`\s in the legend.

---
## get_patches
```python
from legend import get_patches
```

Return the list of `~.patches.Patch`\s in the legend.

---
## get_texts
```python
from legend import get_texts
```

Return the list of `~.text.Text`\s in the legend.

---
## set_alignment
```python
from legend import set_alignment
```

Set the alignment of the legend title and the box of entries.

The entries are aligned as a single block, so that markers always
lined up.

Parameters
----------
alignment : {'center', 'left', 'right'}.

---
## get_alignment
```python
from legend import get_alignment
```

Get the alignment value of the legend box

---
## set_title
```python
from legend import set_title
```

Set legend title and title style.

Parameters
----------
title : str
    The legend title.

prop : `.font_manager.FontProperties` or `str` or `pathlib.Path`
    The font properties of the legend title.
    If a `str`, it is interpreted as a fontconfig pattern parsed by
    `.FontProperties`.  If a `pathlib.Path`, it is interpreted as the
    absolute path to a font file.

---
## get_title
```python
from legend import get_title
```

Return the `.Text` instance for the legend title.

---
## get_window_extent
```python
from legend import get_window_extent
```



---
## get_tightbbox
```python
from legend import get_tightbbox
```



---
## get_frame_on
```python
from legend import get_frame_on
```

Get whether the legend box patch is drawn.

---
## set_frame_on
```python
from legend import set_frame_on
```

Set whether the legend box patch is drawn.

Parameters
----------
b : bool

---
## get_bbox_to_anchor
```python
from legend import get_bbox_to_anchor
```

Return the bbox that the legend will be anchored to.

---
## set_bbox_to_anchor
```python
from legend import set_bbox_to_anchor
```

Set the bbox that the legend will be anchored to.

Parameters
----------
bbox : `~matplotlib.transforms.BboxBase` or tuple
    The bounding box can be specified in the following ways:

    - A `.BboxBase` instance
    - A tuple of ``(left, bottom, width, height)`` in the given
      transform (normalized axes coordinate if None)
    - A tuple of ``(left, bottom)`` where the width and height will be
      assumed to be zero.
    - *None*, to remove the bbox anchoring, and use the parent bbox.

transform : `~matplotlib.transforms.Transform`, optional
    A transform to apply to the bounding box. If not specified, this
    will use a transform to the bounding box of the parent.

---
## _get_anchored_bbox
```python
from legend import _get_anchored_bbox
```

Place the *bbox* inside the *parentbbox* according to a given
location code. Return the (x, y) coordinate of the bbox.

Parameters
----------
loc : int
    A location code in range(1, 11). This corresponds to the possible
    values for ``self._loc``, excluding "best".
bbox : `~matplotlib.transforms.Bbox`
    bbox to be placed, in display coordinates.
parentbbox : `~matplotlib.transforms.Bbox`
    A parent box which will contain the bbox, in display coordinates.

---
## _find_best_position
```python
from legend import _find_best_position
```

Determine the best location to place the legend.

---
## contains
```python
from legend import contains
```



---
## set_draggable
```python
from legend import set_draggable
```

Enable or disable mouse dragging support of the legend.

Parameters
----------
state : bool
    Whether mouse dragging is enabled.
use_blit : bool, optional
    Use blitting for faster image composition. For details see
    :ref:`func-animation`.
update : {'loc', 'bbox'}, optional
    The legend parameter to be changed when dragged:

    - 'loc': update the *loc* parameter of the legend
    - 'bbox': update the *bbox_to_anchor* parameter of the legend

Returns
-------
`.DraggableLegend` or *None*
    If *state* is ``True`` this returns the `.DraggableLegend` helper
    instance. Otherwise this returns *None*.

---
## get_draggable
```python
from legend import get_draggable
```

Return ``True`` if the legend is draggable, ``False`` otherwise.

---
## __name__
```python
from figure import __name__
```

`matplotlib.figure` implements the following classes:

`Figure`
    Top level `~matplotlib.artist.Artist`, which holds all plot elements.
    Many methods are implemented in `FigureBase`.

`SubFigure`
    A logical figure inside a figure, usually added to a figure (or parent
    `SubFigure`) with `Figure.add_subfigure` or `Figure.subfigures` methods
    (provisional API v3.4).

Figures are typically created using pyplot methods `~.pyplot.figure`,
`~.pyplot.subplots`, and `~.pyplot.subplot_mosaic`.

.. plot::
    :include-source:

    fig, ax = plt.subplots(figsize=(2, 2), facecolor='lightskyblue',
                           layout='constrained')
    fig.suptitle('Figure')
    ax.set_title('Axes', loc='left', fontstyle='oblique', fontsize='medium')

Some situations call for directly instantiating a `~.figure.Figure` class,
usually inside an application of some sort (see :ref:`user_interfaces` for a
list of examples) .  More information about Figures can be found at
:ref:`figure-intro`.

---
## _stale_figure_callback
```python
from figure import _stale_figure_callback
```



---
## _AxesStack
```python
from figure import _AxesStack
```

Helper class to track Axes in a figure.

Axes are tracked both in the order in which they have been added
(``self._axes`` insertion/iteration order) and in the separate "gca" stack
(which is the index to which they map in the ``self._axes`` dict).

---
## FigureBase
```python
from figure import FigureBase
```

Base class for `.Figure` and `.SubFigure` containing the methods that add
artists to the figure or subfigure, create Axes, etc.

---
## SubFigure
```python
from figure import SubFigure
```

Logical figure that can be placed inside a figure.

See :ref:`figure-api-subfigure` for an index of methods on this class.
Typically instantiated using `.Figure.add_subfigure` or
`.SubFigure.add_subfigure`, or `.SubFigure.subfigures`.  A subfigure has
the same methods as a figure except for those particularly tied to the size
or dpi of the figure, and is confined to a prescribed region of the figure.
For example the following puts two subfigures side-by-side::

    fig = plt.figure()
    sfigs = fig.subfigures(1, 2)
    axsL = sfigs[0].subplots(1, 2)
    axsR = sfigs[1].subplots(2, 1)

See :doc:`/gallery/subplots_axes_and_figures/subfigures`

.. note::
    The *subfigure* concept is new in v3.4, and the API is still provisional.

---
## Figure
```python
from figure import Figure
```

The top level container for all the plot elements.

See `matplotlib.figure` for an index of class methods.

Attributes
----------
patch
    The `.Rectangle` instance representing the figure background patch.

suppressComposite
    For multiple images, the figure will make composite images
    depending on the renderer option_image_nocomposite function.  If
    *suppressComposite* is a boolean, this will override the renderer.

---
## figaspect
```python
from figure import figaspect
```

Calculate the width and height for a figure with a specified aspect ratio.

While the height is taken from :rc:`figure.figsize`, the width is
adjusted to match the desired aspect ratio. Additionally, it is ensured
that the width is in the range [4., 16.] and the height is in the range
[2., 16.]. If necessary, the default height is adjusted to ensure this.

Parameters
----------
arg : float or 2D array
    If a float, this defines the aspect ratio (i.e. the ratio height /
    width).
    In case of an array the aspect ratio is number of rows / number of
    columns, so that the array could be fitted in the figure undistorted.

Returns
-------
width, height : float
    The figure size in inches.

Notes
-----
If you want to create an Axes within the figure, that still preserves the
aspect ratio, be sure to create it with equal width and height. See
examples below.

Thanks to Fernando Perez for this function.

Examples
--------
Make a figure twice as tall as it is wide::

    w, h = figaspect(2.)
    fig = Figure(figsize=(w, h))
    ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
    ax.imshow(A, **kwargs)

Make a figure with the proper aspect for an array::

    A = rand(5, 3)
    w, h = figaspect(A)
    fig = Figure(figsize=(w, h))
    ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
    ax.imshow(A, **kwargs)

---
## __init__
```python
from figure import __init__
```

Parameters
----------
figsize : 2-tuple of floats, default: :rc:`figure.figsize`
    Figure dimension ``(width, height)`` in inches.

dpi : float, default: :rc:`figure.dpi`
    Dots per inch.

facecolor : default: :rc:`figure.facecolor`
    The figure patch facecolor.

edgecolor : default: :rc:`figure.edgecolor`
    The figure patch edge color.

linewidth : float
    The linewidth of the frame (i.e. the edge linewidth of the figure
    patch).

frameon : bool, default: :rc:`figure.frameon`
    If ``False``, suppress drawing the figure background patch.

subplotpars : `~matplotlib.gridspec.SubplotParams`
    Subplot parameters. If not given, the default subplot
    parameters :rc:`figure.subplot.*` are used.

tight_layout : bool or dict, default: :rc:`figure.autolayout`
    Whether to use the tight layout mechanism. See `.set_tight_layout`.

    .. admonition:: Discouraged

        The use of this parameter is discouraged. Please use
        ``layout='tight'`` instead for the common case of
        ``tight_layout=True`` and use `.set_tight_layout` otherwise.

constrained_layout : bool, default: :rc:`figure.constrained_layout.use`
    This is equal to ``layout='constrained'``.

    .. admonition:: Discouraged

        The use of this parameter is discouraged. Please use
        ``layout='constrained'`` instead.

layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, default: None
    The layout mechanism for positioning of plot elements to avoid
    overlapping Axes decorations (labels, ticks, etc). Note that
    layout managers can have significant performance penalties.

    - 'constrained': The constrained layout solver adjusts Axes sizes
      to avoid overlapping Axes decorations.  Can handle complex plot
      layouts and colorbars, and is thus recommended.

      See :ref:`constrainedlayout_guide` for examples.

    - 'compressed': uses the same algorithm as 'constrained', but
      removes extra space between fixed-aspect-ratio Axes.  Best for
      simple grids of Axes.

    - 'tight': Use the tight layout mechanism. This is a relatively
      simple algorithm that adjusts the subplot parameters so that
      decorations do not overlap.

      See :ref:`tight_layout_guide` for examples.

    - 'none': Do not use a layout engine.

    - A `.LayoutEngine` instance. Builtin layout classes are
      `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily
      accessible by 'constrained' and 'tight'.  Passing an instance
      allows third parties to provide their own layout engine.

    If not given, fall back to using the parameters *tight_layout* and
    *constrained_layout*, including their config defaults
    :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`.

Other Parameters
----------------
**kwargs : `.Figure` properties, optional

    %(Figure:kwdoc)s

---
## as_list
```python
from figure import as_list
```

List the Axes that have been added to the figure.

---
## remove
```python
from figure import remove
```

Remove the Axes from the stack.

---
## bubble
```python
from figure import bubble
```

Move an Axes, which must already exist in the stack, to the top.

---
## add
```python
from figure import add
```

Add an Axes to the stack, ignoring it if already present.

---
## current
```python
from figure import current
```

Return the active Axes, or None if the stack is empty.

---
## __getstate__
```python
from figure import __getstate__
```



---
## __setstate__
```python
from figure import __setstate__
```



---
## _get_draw_artists
```python
from figure import _get_draw_artists
```

Also runs apply_aspect

---
## autofmt_xdate
```python
from figure import autofmt_xdate
```

Date ticklabels often overlap, so it is useful to rotate them
and right align them.  Also, a common use case is a number of
subplots with shared x-axis where the x-axis is date data.  The
ticklabels are often long, and it helps to rotate them on the
bottom subplot and turn them off on other subplots, as well as
turn off xlabels.

Parameters
----------
bottom : float, default: 0.2
    The bottom of the subplots for `subplots_adjust`.
rotation : float, default: 30 degrees
    The rotation angle of the xtick labels in degrees.
ha : {'left', 'center', 'right'}, default: 'right'
    The horizontal alignment of the xticklabels.
which : {'major', 'minor', 'both'}, default: 'major'
    Selects which ticklabels to rotate.

---
## get_children
```python
from figure import get_children
```

Get a list of artists contained in the figure.

---
## contains
```python
from figure import contains
```

Test whether the mouse event occurred on the figure.

Returns
-------
    bool, {}

---
## get_window_extent
```python
from figure import get_window_extent
```



---
## _suplabels
```python
from figure import _suplabels
```

Add a centered %(name)s to the figure.

Parameters
----------
t : str
    The %(name)s text.
x : float, default: %(x0)s
    The x location of the text in figure coordinates.
y : float, default: %(y0)s
    The y location of the text in figure coordinates.
horizontalalignment, ha : {'center', 'left', 'right'}, default: %(ha)s
    The horizontal alignment of the text relative to (*x*, *y*).
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, default: %(va)s
    The vertical alignment of the text relative to (*x*, *y*).
fontsize, size : default: :rc:`figure.%(rc)ssize`
    The font size of the text. See `.Text.set_size` for possible
    values.
fontweight, weight : default: :rc:`figure.%(rc)sweight`
    The font weight of the text. See `.Text.set_weight` for possible
    values.

Returns
-------
text
    The `.Text` instance of the %(name)s.

Other Parameters
----------------
fontproperties : None or dict, optional
    A dict of font properties. If *fontproperties* is given the
    default values for font size and weight are taken from the
    `.FontProperties` defaults. :rc:`figure.%(rc)ssize` and
    :rc:`figure.%(rc)sweight` are ignored in this case.

**kwargs
    Additional kwargs are `matplotlib.text.Text` properties.

---
## suptitle
```python
from figure import suptitle
```



---
## get_suptitle
```python
from figure import get_suptitle
```

Return the suptitle as string or an empty string if not set.

---
## supxlabel
```python
from figure import supxlabel
```



---
## get_supxlabel
```python
from figure import get_supxlabel
```

Return the supxlabel as string or an empty string if not set.

---
## supylabel
```python
from figure import supylabel
```



---
## get_supylabel
```python
from figure import get_supylabel
```

Return the supylabel as string or an empty string if not set.

---
## get_edgecolor
```python
from figure import get_edgecolor
```

Get the edge color of the Figure rectangle.

---
## get_facecolor
```python
from figure import get_facecolor
```

Get the face color of the Figure rectangle.

---
## get_frameon
```python
from figure import get_frameon
```

Return the figure's background patch visibility, i.e.
whether the figure background will be drawn. Equivalent to
``Figure.patch.get_visible()``.

---
## set_linewidth
```python
from figure import set_linewidth
```

Set the line width of the Figure rectangle.

Parameters
----------
linewidth : number

---
## get_linewidth
```python
from figure import get_linewidth
```

Get the line width of the Figure rectangle.

---
## set_edgecolor
```python
from figure import set_edgecolor
```

Set the edge color of the Figure rectangle.

Parameters
----------
color : :mpltype:`color`

---
## set_facecolor
```python
from figure import set_facecolor
```

Set the face color of the Figure rectangle.

Parameters
----------
color : :mpltype:`color`

---
## set_frameon
```python
from figure import set_frameon
```

Set the figure's background patch visibility, i.e.
whether the figure background will be drawn. Equivalent to
``Figure.patch.set_visible()``.

Parameters
----------
b : bool

---
## add_artist
```python
from figure import add_artist
```

Add an `.Artist` to the figure.

Usually artists are added to `~.axes.Axes` objects using
`.Axes.add_artist`; this method can be used in the rare cases where
one needs to add artists directly to the figure instead.

Parameters
----------
artist : `~matplotlib.artist.Artist`
    The artist to add to the figure. If the added artist has no
    transform previously set, its transform will be set to
    ``figure.transSubfigure``.
clip : bool, default: False
    Whether the added artist should be clipped by the figure patch.

Returns
-------
`~matplotlib.artist.Artist`
    The added artist.

---
## add_axes
```python
from figure import add_axes
```

Add an `~.axes.Axes` to the figure.

Call signatures::

    add_axes(rect, projection=None, polar=False, **kwargs)
    add_axes(ax)

Parameters
----------
rect : tuple (left, bottom, width, height)
    The dimensions (left, bottom, width, height) of the new
    `~.axes.Axes`. All quantities are in fractions of figure width and
    height.

projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
    The projection type of the `~.axes.Axes`. *str* is the name of
    a custom projection, see `~matplotlib.projections`. The default
    None results in a 'rectilinear' projection.

polar : bool, default: False
    If True, equivalent to projection='polar'.

axes_class : subclass type of `~.axes.Axes`, optional
    The `.axes.Axes` subclass that is instantiated.  This parameter
    is incompatible with *projection* and *polar*.  See
    :ref:`axisartist_users-guide-index` for examples.

sharex, sharey : `~matplotlib.axes.Axes`, optional
    Share the x or y `~matplotlib.axis` with sharex and/or sharey.
    The axis will have the same limits, ticks, and scale as the axis
    of the shared Axes.

label : str
    A label for the returned Axes.

Returns
-------
`~.axes.Axes`, or a subclass of `~.axes.Axes`
    The returned Axes class depends on the projection used. It is
    `~.axes.Axes` if rectilinear projection is used and
    `.projections.polar.PolarAxes` if polar projection is used.

Other Parameters
----------------
**kwargs
    This method also takes the keyword arguments for
    the returned Axes class. The keyword arguments for the
    rectilinear Axes class `~.axes.Axes` can be found in
    the following table but there might also be other keyword
    arguments if another projection is used, see the actual Axes
    class.

    %(Axes:kwdoc)s

Notes
-----
In rare circumstances, `.add_axes` may be called with a single
argument, an Axes instance already created in the present figure but
not in the figure's list of Axes.

See Also
--------
.Figure.add_subplot
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.pyplot.subplots

Examples
--------
Some simple examples::

    rect = l, b, w, h
    fig = plt.figure()
    fig.add_axes(rect)
    fig.add_axes(rect, frameon=False, facecolor='g')
    fig.add_axes(rect, polar=True)
    ax = fig.add_axes(rect, projection='polar')
    fig.delaxes(ax)
    fig.add_axes(ax)

---
## add_subplot
```python
from figure import add_subplot
```

Add an `~.axes.Axes` to the figure as part of a subplot arrangement.

Call signatures::

   add_subplot(nrows, ncols, index, **kwargs)
   add_subplot(pos, **kwargs)
   add_subplot(ax)
   add_subplot()

Parameters
----------
*args : int, (int, int, *index*), or `.SubplotSpec`, default: (1, 1, 1)
    The position of the subplot described by one of

    - Three integers (*nrows*, *ncols*, *index*). The subplot will
      take the *index* position on a grid with *nrows* rows and
      *ncols* columns. *index* starts at 1 in the upper left corner
      and increases to the right.  *index* can also be a two-tuple
      specifying the (*first*, *last*) indices (1-based, and including
      *last*) of the subplot, e.g., ``fig.add_subplot(3, 1, (1, 2))``
      makes a subplot that spans the upper 2/3 of the figure.
    - A 3-digit integer. The digits are interpreted as if given
      separately as three single-digit integers, i.e.
      ``fig.add_subplot(235)`` is the same as
      ``fig.add_subplot(2, 3, 5)``. Note that this can only be used
      if there are no more than 9 subplots.
    - A `.SubplotSpec`.

    In rare circumstances, `.add_subplot` may be called with a single
    argument, a subplot Axes instance already created in the
    present figure but not in the figure's list of Axes.

projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
    The projection type of the subplot (`~.axes.Axes`). *str* is the
    name of a custom projection, see `~matplotlib.projections`. The
    default None results in a 'rectilinear' projection.

polar : bool, default: False
    If True, equivalent to projection='polar'.

axes_class : subclass type of `~.axes.Axes`, optional
    The `.axes.Axes` subclass that is instantiated.  This parameter
    is incompatible with *projection* and *polar*.  See
    :ref:`axisartist_users-guide-index` for examples.

sharex, sharey : `~matplotlib.axes.Axes`, optional
    Share the x or y `~matplotlib.axis` with sharex and/or sharey.
    The axis will have the same limits, ticks, and scale as the axis
    of the shared Axes.

label : str
    A label for the returned Axes.

Returns
-------
`~.axes.Axes`

    The Axes of the subplot. The returned Axes can actually be an
    instance of a subclass, such as `.projections.polar.PolarAxes` for
    polar projections.

Other Parameters
----------------
**kwargs
    This method also takes the keyword arguments for the returned Axes
    base class; except for the *figure* argument. The keyword arguments
    for the rectilinear base class `~.axes.Axes` can be found in
    the following table but there might also be other keyword
    arguments if another projection is used.

    %(Axes:kwdoc)s

See Also
--------
.Figure.add_axes
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.pyplot.subplots

Examples
--------
::

    fig = plt.figure()

    fig.add_subplot(231)
    ax1 = fig.add_subplot(2, 3, 1)  # equivalent but more general

    fig.add_subplot(232, frameon=False)  # subplot with no frame
    fig.add_subplot(233, projection='polar')  # polar subplot
    fig.add_subplot(234, sharex=ax1)  # subplot sharing x-axis with ax1
    fig.add_subplot(235, facecolor="red")  # red subplot

    ax1.remove()  # delete ax1 from the figure
    fig.add_subplot(ax1)  # add ax1 back to the figure

---
## _add_axes_internal
```python
from figure import _add_axes_internal
```

Private helper for `add_axes` and `add_subplot`.

---
## subplots
```python
from figure import subplots
```

Add a set of subplots to this figure.

This utility wrapper makes it convenient to create common layouts of
subplots in a single call.

Parameters
----------
nrows, ncols : int, default: 1
    Number of rows/columns of the subplot grid.

sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False
    Controls sharing of x-axis (*sharex*) or y-axis (*sharey*):

    - True or 'all': x- or y-axis will be shared among all subplots.
    - False or 'none': each subplot x- or y-axis will be independent.
    - 'row': each subplot row will share an x- or y-axis.
    - 'col': each subplot column will share an x- or y-axis.

    When subplots have a shared x-axis along a column, only the x tick
    labels of the bottom subplot are created. Similarly, when subplots
    have a shared y-axis along a row, only the y tick labels of the
    first column subplot are created. To later turn other subplots'
    ticklabels on, use `~matplotlib.axes.Axes.tick_params`.

    When subplots have a shared axis that has units, calling
    `.Axis.set_units` will update each axis with the new units.

    Note that it is not possible to unshare axes.

squeeze : bool, default: True
    - If True, extra dimensions are squeezed out from the returned
      array of Axes:

      - if only one subplot is constructed (nrows=ncols=1), the
        resulting single Axes object is returned as a scalar.
      - for Nx1 or 1xM subplots, the returned object is a 1D numpy
        object array of Axes objects.
      - for NxM, subplots with N>1 and M>1 are returned as a 2D array.

    - If False, no squeezing at all is done: the returned Axes object
      is always a 2D array containing Axes instances, even if it ends
      up being 1x1.

width_ratios : array-like of length *ncols*, optional
    Defines the relative widths of the columns. Each column gets a
    relative width of ``width_ratios[i] / sum(width_ratios)``.
    If not given, all columns will have the same width.  Equivalent
    to ``gridspec_kw={'width_ratios': [...]}``.

height_ratios : array-like of length *nrows*, optional
    Defines the relative heights of the rows. Each row gets a
    relative height of ``height_ratios[i] / sum(height_ratios)``.
    If not given, all rows will have the same height. Equivalent
    to ``gridspec_kw={'height_ratios': [...]}``.

subplot_kw : dict, optional
    Dict with keywords passed to the `.Figure.add_subplot` call used to
    create each subplot.

gridspec_kw : dict, optional
    Dict with keywords passed to the
    `~matplotlib.gridspec.GridSpec` constructor used to create
    the grid the subplots are placed on.

Returns
-------
`~.axes.Axes` or array of Axes
    Either a single `~matplotlib.axes.Axes` object or an array of Axes
    objects if more than one subplot was created. The dimensions of the
    resulting array can be controlled with the *squeeze* keyword, see
    above.

See Also
--------
.pyplot.subplots
.Figure.add_subplot
.pyplot.subplot

Examples
--------
::

    # First create some toy data:
    x = np.linspace(0, 2*np.pi, 400)
    y = np.sin(x**2)

    # Create a figure
    fig = plt.figure()

    # Create a subplot
    ax = fig.subplots()
    ax.plot(x, y)
    ax.set_title('Simple plot')

    # Create two subplots and unpack the output array immediately
    ax1, ax2 = fig.subplots(1, 2, sharey=True)
    ax1.plot(x, y)
    ax1.set_title('Sharing Y axis')
    ax2.scatter(x, y)

    # Create four polar Axes and access them through the returned array
    axes = fig.subplots(2, 2, subplot_kw=dict(projection='polar'))
    axes[0, 0].plot(x, y)
    axes[1, 1].scatter(x, y)

    # Share an X-axis with each column of subplots
    fig.subplots(2, 2, sharex='col')

    # Share a Y-axis with each row of subplots
    fig.subplots(2, 2, sharey='row')

    # Share both X- and Y-axes with all subplots
    fig.subplots(2, 2, sharex='all', sharey='all')

    # Note that this is the same as
    fig.subplots(2, 2, sharex=True, sharey=True)

---
## delaxes
```python
from figure import delaxes
```

Remove the `~.axes.Axes` *ax* from the figure; update the current Axes.

---
## _remove_axes
```python
from figure import _remove_axes
```

Common helper for removal of standard Axes (via delaxes) and of child Axes.

Parameters
----------
ax : `~.AxesBase`
    The Axes to remove.
owners
    List of objects (list or _AxesStack) "owning" the Axes, from which the Axes
    will be remove()d.

---
## clear
```python
from figure import clear
```



---
## clf
```python
from figure import clf
```

[*Discouraged*] Alias for the `clear()` method.

.. admonition:: Discouraged

    The use of ``clf()`` is discouraged. Use ``clear()`` instead.

Parameters
----------
keep_observers : bool, default: False
    Set *keep_observers* to True if, for example,
    a gui widget is tracking the Axes in the figure.

---
## legend
```python
from figure import legend
```

Place a legend on the figure.

Call signatures::

    legend()
    legend(handles, labels)
    legend(handles=handles)
    legend(labels)

The call signatures correspond to the following different ways to use
this method:

**1. Automatic detection of elements to be shown in the legend**

The elements to be added to the legend are automatically determined,
when you do not pass in any extra arguments.

In this case, the labels are taken from the artist. You can specify
them either at artist creation or by calling the
:meth:`~.Artist.set_label` method on the artist::

    ax.plot([1, 2, 3], label='Inline label')
    fig.legend()

or::

    line, = ax.plot([1, 2, 3])
    line.set_label('Label via method')
    fig.legend()

Specific lines can be excluded from the automatic legend element
selection by defining a label starting with an underscore.
This is default for all artists, so calling `.Figure.legend` without
any arguments and without setting the labels manually will result in
no legend being drawn.


**2. Explicitly listing the artists and labels in the legend**

For full control of which artists have a legend entry, it is possible
to pass an iterable of legend artists followed by an iterable of
legend labels respectively::

    fig.legend([line1, line2, line3], ['label1', 'label2', 'label3'])


**3. Explicitly listing the artists in the legend**

This is similar to 2, but the labels are taken from the artists'
label properties. Example::

    line1, = ax1.plot([1, 2, 3], label='label1')
    line2, = ax2.plot([1, 2, 3], label='label2')
    fig.legend(handles=[line1, line2])


**4. Labeling existing plot elements**

.. admonition:: Discouraged

    This call signature is discouraged, because the relation between
    plot elements and labels is only implicit by their order and can
    easily be mixed up.

To make a legend for all artists on all Axes, call this function with
an iterable of strings, one for each legend item. For example::

    fig, (ax1, ax2) = plt.subplots(1, 2)
    ax1.plot([1, 3, 5], color='blue')
    ax2.plot([2, 4, 6], color='red')
    fig.legend(['the blues', 'the reds'])


Parameters
----------
handles : list of `.Artist`, optional
    A list of Artists (lines, patches) to be added to the legend.
    Use this together with *labels*, if you need full control on what
    is shown in the legend and the automatic mechanism described above
    is not sufficient.

    The length of handles and labels should be the same in this
    case. If they are not, they are truncated to the smaller length.

labels : list of str, optional
    A list of labels to show next to the artists.
    Use this together with *handles*, if you need full control on what
    is shown in the legend and the automatic mechanism described above
    is not sufficient.

Returns
-------
`~matplotlib.legend.Legend`

Other Parameters
----------------
%(_legend_kw_figure)s

See Also
--------
.Axes.legend

Notes
-----
Some artists are not supported by this function.  See
:ref:`legend_guide` for details.

---
## text
```python
from figure import text
```

Add text to figure.

Parameters
----------
x, y : float
    The position to place the text. By default, this is in figure
    coordinates, floats in [0, 1]. The coordinate system can be changed
    using the *transform* keyword.

s : str
    The text string.

fontdict : dict, optional
    A dictionary to override the default text properties. If not given,
    the defaults are determined by :rc:`font.*`. Properties passed as
    *kwargs* override the corresponding ones given in *fontdict*.

Returns
-------
`~.text.Text`

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    Other miscellaneous text parameters.

    %(Text:kwdoc)s

See Also
--------
.Axes.text
.pyplot.text

---
## colorbar
```python
from figure import colorbar
```

Add a colorbar to a plot.

Parameters
----------
mappable
    The `matplotlib.cm.ScalarMappable` (i.e., `.AxesImage`,
    `.ContourSet`, etc.) described by this colorbar.  This argument is
    mandatory for the `.Figure.colorbar` method but optional for the
    `.pyplot.colorbar` function, which sets the default to the current
    image.

    Note that one can create a `.ScalarMappable` "on-the-fly" to
    generate colorbars not attached to a previously drawn artist, e.g.
    ::

        fig.colorbar(cm.ScalarMappable(norm=norm, cmap=cmap), ax=ax)

cax : `~matplotlib.axes.Axes`, optional
    Axes into which the colorbar will be drawn.  If `None`, then a new
    Axes is created and the space for it will be stolen from the Axes(s)
    specified in *ax*.

ax : `~matplotlib.axes.Axes` or iterable or `numpy.ndarray` of Axes, optional
    The one or more parent Axes from which space for a new colorbar Axes
    will be stolen. This parameter is only used if *cax* is not set.

    Defaults to the Axes that contains the mappable used to create the
    colorbar.

use_gridspec : bool, optional
    If *cax* is ``None``, a new *cax* is created as an instance of
    Axes.  If *ax* is positioned with a subplotspec and *use_gridspec*
    is ``True``, then *cax* is also positioned with a subplotspec.

Returns
-------
colorbar : `~matplotlib.colorbar.Colorbar`

Other Parameters
----------------
%(_make_axes_kw_doc)s
%(_colormap_kw_doc)s

Notes
-----
If *mappable* is a `~.contour.ContourSet`, its *extend* kwarg is
included automatically.

The *shrink* kwarg provides a simple way to scale the colorbar with
respect to the Axes. Note that if *cax* is specified, it determines the
size of the colorbar, and *shrink* and *aspect* are ignored.

For more precise control, you can manually specify the positions of the
axes objects in which the mappable and the colorbar are drawn.  In this
case, do not use any of the Axes properties kwargs.

It is known that some vector graphics viewers (svg and pdf) render
white gaps between segments of the colorbar.  This is due to bugs in
the viewers, not Matplotlib.  As a workaround, the colorbar can be
rendered with overlapping segments::

    cbar = colorbar()
    cbar.solids.set_edgecolor("face")
    draw()

However, this has negative consequences in other circumstances, e.g.
with semi-transparent images (alpha < 1) and colorbar extensions;
therefore, this workaround is not used by default (see issue #1188).

---
## subplots_adjust
```python
from figure import subplots_adjust
```

Adjust the subplot layout parameters.

Unset parameters are left unmodified; initial values are given by
:rc:`figure.subplot.[name]`.

Parameters
----------
left : float, optional
    The position of the left edge of the subplots,
    as a fraction of the figure width.
right : float, optional
    The position of the right edge of the subplots,
    as a fraction of the figure width.
bottom : float, optional
    The position of the bottom edge of the subplots,
    as a fraction of the figure height.
top : float, optional
    The position of the top edge of the subplots,
    as a fraction of the figure height.
wspace : float, optional
    The width of the padding between subplots,
    as a fraction of the average Axes width.
hspace : float, optional
    The height of the padding between subplots,
    as a fraction of the average Axes height.

---
## align_xlabels
```python
from figure import align_xlabels
```

Align the xlabels of subplots in the same subplot row if label
alignment is being done automatically (i.e. the label position is
not manually set).

Alignment persists for draw events after this is called.

If a label is on the bottom, it is aligned with labels on Axes that
also have their label on the bottom and that have the same
bottom-most subplot row.  If the label is on the top,
it is aligned with labels on Axes with the same top-most row.

Parameters
----------
axs : list of `~matplotlib.axes.Axes`
    Optional list of (or `~numpy.ndarray`) `~matplotlib.axes.Axes`
    to align the xlabels.
    Default is to align all Axes on the figure.

See Also
--------
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_titles
matplotlib.figure.Figure.align_labels

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Example with rotated xtick labels::

    fig, axs = plt.subplots(1, 2)
    for tick in axs[0].get_xticklabels():
        tick.set_rotation(55)
    axs[0].set_xlabel('XLabel 0')
    axs[1].set_xlabel('XLabel 1')
    fig.align_xlabels()

---
## align_ylabels
```python
from figure import align_ylabels
```

Align the ylabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).

Alignment persists for draw events after this is called.

If a label is on the left, it is aligned with labels on Axes that
also have their label on the left and that have the same
left-most subplot column.  If the label is on the right,
it is aligned with labels on Axes with the same right-most column.

Parameters
----------
axs : list of `~matplotlib.axes.Axes`
    Optional list (or `~numpy.ndarray`) of `~matplotlib.axes.Axes`
    to align the ylabels.
    Default is to align all Axes on the figure.

See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_titles
matplotlib.figure.Figure.align_labels

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Example with large yticks labels::

    fig, axs = plt.subplots(2, 1)
    axs[0].plot(np.arange(0, 1000, 50))
    axs[0].set_ylabel('YLabel 0')
    axs[1].set_ylabel('YLabel 1')
    fig.align_ylabels()

---
## align_titles
```python
from figure import align_titles
```

Align the titles of subplots in the same subplot row if title
alignment is being done automatically (i.e. the title position is
not manually set).

Alignment persists for draw events after this is called.

Parameters
----------
axs : list of `~matplotlib.axes.Axes`
    Optional list of (or ndarray) `~matplotlib.axes.Axes`
    to align the titles.
    Default is to align all Axes on the figure.

See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_labels

Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.

Examples
--------
Example with titles::

    fig, axs = plt.subplots(1, 2)
    axs[0].set_aspect('equal')
    axs[0].set_title('Title 0')
    axs[1].set_title('Title 1')
    fig.align_titles()

---
## align_labels
```python
from figure import align_labels
```

Align the xlabels and ylabels of subplots with the same subplots
row or column (respectively) if label alignment is being
done automatically (i.e. the label position is not manually set).

Alignment persists for draw events after this is called.

Parameters
----------
axs : list of `~matplotlib.axes.Axes`
    Optional list (or `~numpy.ndarray`) of `~matplotlib.axes.Axes`
    to align the labels.
    Default is to align all Axes on the figure.

See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_titles

---
## add_gridspec
```python
from figure import add_gridspec
```

Low-level API for creating a `.GridSpec` that has this figure as a parent.

This is a low-level API, allowing you to create a gridspec and
subsequently add subplots based on the gridspec. Most users do
not need that freedom and should use the higher-level methods
`~.Figure.subplots` or `~.Figure.subplot_mosaic`.

Parameters
----------
nrows : int, default: 1
    Number of rows in grid.

ncols : int, default: 1
    Number of columns in grid.

Returns
-------
`.GridSpec`

Other Parameters
----------------
**kwargs
    Keyword arguments are passed to `.GridSpec`.

See Also
--------
matplotlib.pyplot.subplots

Examples
--------
Adding a subplot that spans two rows::

    fig = plt.figure()
    gs = fig.add_gridspec(2, 2)
    ax1 = fig.add_subplot(gs[0, 0])
    ax2 = fig.add_subplot(gs[1, 0])
    # spans two rows:
    ax3 = fig.add_subplot(gs[:, 1])

---
## subfigures
```python
from figure import subfigures
```

Add a set of subfigures to this figure or subfigure.

A subfigure has the same artist methods as a figure, and is logically
the same as a figure, but cannot print itself.
See :doc:`/gallery/subplots_axes_and_figures/subfigures`.

.. note::
    The *subfigure* concept is new in v3.4, and the API is still provisional.

Parameters
----------
nrows, ncols : int, default: 1
    Number of rows/columns of the subfigure grid.

squeeze : bool, default: True
    If True, extra dimensions are squeezed out from the returned
    array of subfigures.

wspace, hspace : float, default: None
    The amount of width/height reserved for space between subfigures,
    expressed as a fraction of the average subfigure width/height.
    If not given, the values will be inferred from rcParams if using
    constrained layout (see `~.ConstrainedLayoutEngine`), or zero if
    not using a layout engine.

width_ratios : array-like of length *ncols*, optional
    Defines the relative widths of the columns. Each column gets a
    relative width of ``width_ratios[i] / sum(width_ratios)``.
    If not given, all columns will have the same width.

height_ratios : array-like of length *nrows*, optional
    Defines the relative heights of the rows. Each row gets a
    relative height of ``height_ratios[i] / sum(height_ratios)``.
    If not given, all rows will have the same height.

---
## add_subfigure
```python
from figure import add_subfigure
```

Add a `.SubFigure` to the figure as part of a subplot arrangement.

Parameters
----------
subplotspec : `.gridspec.SubplotSpec`
    Defines the region in a parent gridspec where the subfigure will
    be placed.

Returns
-------
`.SubFigure`

Other Parameters
----------------
**kwargs
    Are passed to the `.SubFigure` object.

See Also
--------
.Figure.subfigures

---
## sca
```python
from figure import sca
```

Set the current Axes to be *a* and return *a*.

---
## gca
```python
from figure import gca
```

Get the current Axes.

If there is currently no Axes on this Figure, a new one is created
using `.Figure.add_subplot`.  (To test whether there is currently an
Axes on a Figure, check whether ``figure.axes`` is empty.  To test
whether there is currently a Figure on the pyplot figure stack, check
whether `.pyplot.get_fignums()` is empty.)

---
## _gci
```python
from figure import _gci
```

Get the current colorable artist.

Specifically, returns the current `.ScalarMappable` instance (`.Image`
created by `imshow` or `figimage`, `.Collection` created by `pcolor` or
`scatter`, etc.), or *None* if no such instance has been defined.

The current image is an attribute of the current Axes, or the nearest
earlier Axes in the current figure that contains an image.

Notes
-----
Historically, the only colorable artists were images; hence the name
``gci`` (get current image).

---
## _process_projection_requirements
```python
from figure import _process_projection_requirements
```

Handle the args/kwargs to add_axes/add_subplot/gca, returning::

    (axes_proj_class, proj_class_kwargs)

which can be used for new Axes initialization/identification.

---
## get_default_bbox_extra_artists
```python
from figure import get_default_bbox_extra_artists
```

Return a list of Artists typically used in `.Figure.get_tightbbox`.

---
## get_tightbbox
```python
from figure import get_tightbbox
```

Return a (tight) bounding box of the figure *in inches*.

Note that `.FigureBase` differs from all other artists, which return
their `.Bbox` in pixels.

Artists that have ``artist.set_in_layout(False)`` are not included
in the bbox.

Parameters
----------
renderer : `.RendererBase` subclass
    Renderer that will be used to draw the figures (i.e.
    ``fig.canvas.get_renderer()``)

bbox_extra_artists : list of `.Artist` or ``None``
    List of artists to include in the tight bounding box.  If
    ``None`` (default), then all artist children of each Axes are
    included in the tight bounding box.

Returns
-------
`.BboxBase`
    containing the bounding box (in figure inches).

---
## _norm_per_subplot_kw
```python
from figure import _norm_per_subplot_kw
```



---
## _normalize_grid_string
```python
from figure import _normalize_grid_string
```



---
## subplot_mosaic
```python
from figure import subplot_mosaic
```

Build a layout of Axes based on ASCII art or nested lists.

This is a helper function to build complex GridSpec layouts visually.

See :ref:`mosaic`
for an example and full API documentation

Parameters
----------
mosaic : list of list of {hashable or nested} or str

    A visual layout of how you want your Axes to be arranged
    labeled as strings.  For example ::

       x = [['A panel', 'A panel', 'edge'],
            ['C panel', '.',       'edge']]

    produces 4 Axes:

    - 'A panel' which is 1 row high and spans the first two columns
    - 'edge' which is 2 rows high and is on the right edge
    - 'C panel' which in 1 row and 1 column wide in the bottom left
    - a blank space 1 row and 1 column wide in the bottom center

    Any of the entries in the layout can be a list of lists
    of the same form to create nested layouts.

    If input is a str, then it can either be a multi-line string of
    the form ::

      '''
      AAE
      C.E
      '''

    where each character is a column and each line is a row. Or it
    can be a single-line string where rows are separated by ``;``::

      'AB;CC'

    The string notation allows only single character Axes labels and
    does not support nesting but is very terse.

    The Axes identifiers may be `str` or a non-iterable hashable
    object (e.g. `tuple` s may not be used).

sharex, sharey : bool, default: False
    If True, the x-axis (*sharex*) or y-axis (*sharey*) will be shared
    among all subplots.  In that case, tick label visibility and axis
    units behave as for `subplots`.  If False, each subplot's x- or
    y-axis will be independent.

width_ratios : array-like of length *ncols*, optional
    Defines the relative widths of the columns. Each column gets a
    relative width of ``width_ratios[i] / sum(width_ratios)``.
    If not given, all columns will have the same width.  Equivalent
    to ``gridspec_kw={'width_ratios': [...]}``. In the case of nested
    layouts, this argument applies only to the outer layout.

height_ratios : array-like of length *nrows*, optional
    Defines the relative heights of the rows. Each row gets a
    relative height of ``height_ratios[i] / sum(height_ratios)``.
    If not given, all rows will have the same height. Equivalent
    to ``gridspec_kw={'height_ratios': [...]}``. In the case of nested
    layouts, this argument applies only to the outer layout.

subplot_kw : dict, optional
    Dictionary with keywords passed to the `.Figure.add_subplot` call
    used to create each subplot.  These values may be overridden by
    values in *per_subplot_kw*.

per_subplot_kw : dict, optional
    A dictionary mapping the Axes identifiers or tuples of identifiers
    to a dictionary of keyword arguments to be passed to the
    `.Figure.add_subplot` call used to create each subplot.  The values
    in these dictionaries have precedence over the values in
    *subplot_kw*.

    If *mosaic* is a string, and thus all keys are single characters,
    it is possible to use a single string instead of a tuple as keys;
    i.e. ``"AB"`` is equivalent to ``("A", "B")``.

    .. versionadded:: 3.7

gridspec_kw : dict, optional
    Dictionary with keywords passed to the `.GridSpec` constructor used
    to create the grid the subplots are placed on. In the case of
    nested layouts, this argument applies only to the outer layout.
    For more complex layouts, users should use `.Figure.subfigures`
    to create the nesting.

empty_sentinel : object, optional
    Entry in the layout to mean "leave this space empty".  Defaults
    to ``'.'``. Note, if *layout* is a string, it is processed via
    `inspect.cleandoc` to remove leading white space, which may
    interfere with using white-space as the empty sentinel.

Returns
-------
dict[label, Axes]
   A dictionary mapping the labels to the Axes objects.  The order of
   the Axes is left-to-right and top-to-bottom of their position in the
   total layout.

---
## _set_artist_props
```python
from figure import _set_artist_props
```



---
## canvas
```python
from figure import canvas
```



---
## dpi
```python
from figure import dpi
```



---
## get_dpi
```python
from figure import get_dpi
```

Return the resolution in dots per inch as a float.

---
## set_dpi
```python
from figure import set_dpi
```

Set the resolution of the figure in dots-per-inch.

Parameters
----------
val : float

---
## _get_renderer
```python
from figure import _get_renderer
```



---
## _redo_transform_rel_fig
```python
from figure import _redo_transform_rel_fig
```

Make the transSubfigure bbox relative to Figure transform.

Parameters
----------
bbox : bbox or None
    If not None, then the bbox is used for relative bounding box.
    Otherwise, it is calculated from the subplotspec.

---
## get_constrained_layout
```python
from figure import get_constrained_layout
```

Return whether constrained layout is being used.

See :ref:`constrainedlayout_guide`.

---
## get_constrained_layout_pads
```python
from figure import get_constrained_layout_pads
```

Get padding for ``constrained_layout``.

Returns a list of ``w_pad, h_pad`` in inches and
``wspace`` and ``hspace`` as fractions of the subplot.
All values are None if ``constrained_layout`` is not used.

See :ref:`constrainedlayout_guide`.

Parameters
----------
relative : bool
    If `True`, then convert from inches to figure relative.

---
## get_layout_engine
```python
from figure import get_layout_engine
```



---
## axes
```python
from figure import axes
```

List of Axes in the Figure. You can access and modify the Axes in the
Figure through this list.

Do not modify the list itself. Instead, use `~Figure.add_axes`,
`~.Figure.add_subplot` or `~.Figure.delaxes` to add or remove an Axes.

Note: The `.Figure.axes` property and `~.Figure.get_axes` method are
equivalent.

---
## draw
```python
from figure import draw
```



---
## __str__
```python
from figure import __str__
```



---
## __repr__
```python
from figure import __repr__
```



---
## pick
```python
from figure import pick
```



---
## _check_layout_engines_compat
```python
from figure import _check_layout_engines_compat
```

Helper for set_layout engine

If the figure has used the old engine and added a colorbar then the
value of colorbar_gridspec must be the same on the new engine.

---
## set_layout_engine
```python
from figure import set_layout_engine
```

Set the layout engine for this figure.

Parameters
----------
layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}

    - 'constrained' will use `~.ConstrainedLayoutEngine`
    - 'compressed' will also use `~.ConstrainedLayoutEngine`, but with
      a correction that attempts to make a good layout for fixed-aspect
      ratio Axes.
    - 'tight' uses `~.TightLayoutEngine`
    - 'none' removes layout engine.

    If a `.LayoutEngine` instance, that instance will be used.

    If `None`, the behavior is controlled by :rc:`figure.autolayout`
    (which if `True` behaves as if 'tight' was passed) and
    :rc:`figure.constrained_layout.use` (which if `True` behaves as if
    'constrained' was passed).  If both are `True`,
    :rc:`figure.autolayout` takes priority.

    Users and libraries can define their own layout engines and pass
    the instance directly as well.

**kwargs
    The keyword arguments are passed to the layout engine to set things
    like padding and margin sizes.  Only used if *layout* is a string.

---
## _repr_html_
```python
from figure import _repr_html_
```



---
## show
```python
from figure import show
```

If using a GUI backend with pyplot, display the figure window.

If the figure was not created using `~.pyplot.figure`, it will lack
a `~.backend_bases.FigureManagerBase`, and this method will raise an
AttributeError.

.. warning::

    This does not manage an GUI event loop. Consequently, the figure
    may only be shown briefly or not shown at all if you or your
    environment are not managing an event loop.

    Use cases for `.Figure.show` include running this from a GUI
    application (where there is persistently an event loop running) or
    from a shell, like IPython, that install an input hook to allow the
    interactive shell to accept input while the figure is also being
    shown and interactive.  Some, but not all, GUI toolkits will
    register an input hook on import.  See :ref:`cp_integration` for
    more details.

    If you're in a shell without input hook integration or executing a
    python script, you should use `matplotlib.pyplot.show` with
    ``block=True`` instead, which takes care of starting and running
    the event loop for you.

Parameters
----------
warn : bool, default: True
    If ``True`` and we are not running headless (i.e. on Linux with an
    unset DISPLAY), issue warning when called on a non-GUI backend.

---
## _get_dpi
```python
from figure import _get_dpi
```



---
## _set_dpi
```python
from figure import _set_dpi
```

Parameters
----------
dpi : float

forward : bool
    Passed on to `~.Figure.set_size_inches`

---
## get_tight_layout
```python
from figure import get_tight_layout
```

Return whether `.Figure.tight_layout` is called when drawing.

---
## set_tight_layout
```python
from figure import set_tight_layout
```

Set whether and how `.Figure.tight_layout` is called when drawing.

Parameters
----------
tight : bool or dict with keys "pad", "w_pad", "h_pad", "rect" or None
    If a bool, sets whether to call `.Figure.tight_layout` upon drawing.
    If ``None``, use :rc:`figure.autolayout` instead.
    If a dict, pass it as kwargs to `.Figure.tight_layout`, overriding the
    default paddings.

---
## set_constrained_layout
```python
from figure import set_constrained_layout
```

Set whether ``constrained_layout`` is used upon drawing.

If None, :rc:`figure.constrained_layout.use` value will be used.

When providing a dict containing the keys ``w_pad``, ``h_pad``
the default ``constrained_layout`` paddings will be
overridden.  These pads are in inches and default to 3.0/72.0.
``w_pad`` is the width padding and ``h_pad`` is the height padding.

Parameters
----------
constrained : bool or dict or None

---
## set_constrained_layout_pads
```python
from figure import set_constrained_layout_pads
```

Set padding for ``constrained_layout``.

Tip: The parameters can be passed from a dictionary by using
``fig.set_constrained_layout(**pad_dict)``.

See :ref:`constrainedlayout_guide`.

Parameters
----------
w_pad : float, default: :rc:`figure.constrained_layout.w_pad`
    Width padding in inches.  This is the pad around Axes
    and is meant to make sure there is enough room for fonts to
    look good.  Defaults to 3 pts = 0.04167 inches

h_pad : float, default: :rc:`figure.constrained_layout.h_pad`
    Height padding in inches. Defaults to 3 pts.

wspace : float, default: :rc:`figure.constrained_layout.wspace`
    Width padding between subplots, expressed as a fraction of the
    subplot width.  The total padding ends up being w_pad + wspace.

hspace : float, default: :rc:`figure.constrained_layout.hspace`
    Height padding between subplots, expressed as a fraction of the
    subplot width. The total padding ends up being h_pad + hspace.

---
## set_canvas
```python
from figure import set_canvas
```

Set the canvas that contains the figure

Parameters
----------
canvas : FigureCanvas

---
## figimage
```python
from figure import figimage
```

Add a non-resampled image to the figure.

The image is attached to the lower or upper left corner depending on
*origin*.

Parameters
----------
X
    The image data. This is an array of one of the following shapes:

    - (M, N): an image with scalar data.  Color-mapping is controlled
      by *cmap*, *norm*, *vmin*, and *vmax*.
    - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
    - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
      i.e. including transparency.

xo, yo : int
    The *x*/*y* image offset in pixels.

alpha : None or float
    The alpha blending value.

%(cmap_doc)s

    This parameter is ignored if *X* is RGB(A).

%(norm_doc)s

    This parameter is ignored if *X* is RGB(A).

%(vmin_vmax_doc)s

    This parameter is ignored if *X* is RGB(A).

origin : {'upper', 'lower'}, default: :rc:`image.origin`
    Indicates where the [0, 0] index of the array is in the upper left
    or lower left corner of the Axes.

resize : bool
    If *True*, resize the figure to match the given image size.

Returns
-------
`matplotlib.image.FigureImage`

Other Parameters
----------------
**kwargs
    Additional kwargs are `.Artist` kwargs passed on to `.FigureImage`.

Notes
-----
figimage complements the Axes image (`~matplotlib.axes.Axes.imshow`)
which will be resampled to fit the current Axes.  If you want
a resampled image to fill the entire figure, you can define an
`~matplotlib.axes.Axes` with extent [0, 0, 1, 1].

Examples
--------
::

    f = plt.figure()
    nx = int(f.get_figwidth() * f.dpi)
    ny = int(f.get_figheight() * f.dpi)
    data = np.random.random((ny, nx))
    f.figimage(data)
    plt.show()

---
## set_size_inches
```python
from figure import set_size_inches
```

Set the figure size in inches.

Call signatures::

     fig.set_size_inches(w, h)  # OR
     fig.set_size_inches((w, h))

Parameters
----------
w : (float, float) or float
    Width and height in inches (if height not specified as a separate
    argument) or width.
h : float
    Height in inches.
forward : bool, default: True
    If ``True``, the canvas size is automatically updated, e.g.,
    you can resize the figure window from the shell.

See Also
--------
matplotlib.figure.Figure.get_size_inches
matplotlib.figure.Figure.set_figwidth
matplotlib.figure.Figure.set_figheight

Notes
-----
To transform from pixels to inches divide by `Figure.dpi`.

---
## get_size_inches
```python
from figure import get_size_inches
```

Return the current size of the figure in inches.

Returns
-------
ndarray
   The size (width, height) of the figure in inches.

See Also
--------
matplotlib.figure.Figure.set_size_inches
matplotlib.figure.Figure.get_figwidth
matplotlib.figure.Figure.get_figheight

Notes
-----
The size in pixels can be obtained by multiplying with `Figure.dpi`.

---
## get_figwidth
```python
from figure import get_figwidth
```

Return the figure width in inches.

---
## get_figheight
```python
from figure import get_figheight
```

Return the figure height in inches.

---
## set_figwidth
```python
from figure import set_figwidth
```

Set the width of the figure in inches.

Parameters
----------
val : float
forward : bool
    See `set_size_inches`.

See Also
--------
matplotlib.figure.Figure.set_figheight
matplotlib.figure.Figure.set_size_inches

---
## set_figheight
```python
from figure import set_figheight
```

Set the height of the figure in inches.

Parameters
----------
val : float
forward : bool
    See `set_size_inches`.

See Also
--------
matplotlib.figure.Figure.set_figwidth
matplotlib.figure.Figure.set_size_inches

---
## draw_without_rendering
```python
from figure import draw_without_rendering
```

Draw the figure with no output.  Useful to get the final size of
artists that require a draw before their size is known (e.g. text).

---
## draw_artist
```python
from figure import draw_artist
```

Draw `.Artist` *a* only.

---
## add_axobserver
```python
from figure import add_axobserver
```

Whenever the Axes state change, ``func(self)`` will be called.

---
## savefig
```python
from figure import savefig
```

Save the current figure as an image or vector graphic to a file.

Call signature::

  savefig(fname, *, transparent=None, dpi='figure', format=None,
          metadata=None, bbox_inches=None, pad_inches=0.1,
          facecolor='auto', edgecolor='auto', backend=None,
          **kwargs
         )

The available output formats depend on the backend being used.

Parameters
----------
fname : str or path-like or binary file-like
    A path, or a Python file-like object, or
    possibly some backend-dependent object such as
    `matplotlib.backends.backend_pdf.PdfPages`.

    If *format* is set, it determines the output format, and the file
    is saved as *fname*.  Note that *fname* is used verbatim, and there
    is no attempt to make the extension, if any, of *fname* match
    *format*, and no extension is appended.

    If *format* is not set, then the format is inferred from the
    extension of *fname*, if there is one.  If *format* is not
    set and *fname* has no extension, then the file is saved with
    :rc:`savefig.format` and the appropriate extension is appended to
    *fname*.

Other Parameters
----------------
transparent : bool, default: :rc:`savefig.transparent`
    If *True*, the Axes patches will all be transparent; the
    Figure patch will also be transparent unless *facecolor*
    and/or *edgecolor* are specified via kwargs.

    If *False* has no effect and the color of the Axes and
    Figure patches are unchanged (unless the Figure patch
    is specified via the *facecolor* and/or *edgecolor* keyword
    arguments in which case those colors are used).

    The transparency of these patches will be restored to their
    original values upon exit of this function.

    This is useful, for example, for displaying
    a plot on top of a colored background on a web page.

dpi : float or 'figure', default: :rc:`savefig.dpi`
    The resolution in dots per inch.  If 'figure', use the figure's
    dpi value.

format : str
    The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when
    this is unset is documented under *fname*.

metadata : dict, optional
    Key/value pairs to store in the image metadata. The supported keys
    and defaults depend on the image format and backend:

    - 'png' with Agg backend: See the parameter ``metadata`` of
      `~.FigureCanvasAgg.print_png`.
    - 'pdf' with pdf backend: See the parameter ``metadata`` of
      `~.backend_pdf.PdfPages`.
    - 'svg' with svg backend: See the parameter ``metadata`` of
      `~.FigureCanvasSVG.print_svg`.
    - 'eps' and 'ps' with PS backend: Only 'Creator' is supported.

    Not supported for 'pgf', 'raw', and 'rgba' as those formats do not support
    embedding metadata.
    Does not currently support 'jpg', 'tiff', or 'webp', but may include
    embedding EXIF metadata in the future.

bbox_inches : str or `.Bbox`, default: :rc:`savefig.bbox`
    Bounding box in inches: only the given portion of the figure is
    saved.  If 'tight', try to figure out the tight bbox of the figure.

pad_inches : float or 'layout', default: :rc:`savefig.pad_inches`
    Amount of padding in inches around the figure when bbox_inches is
    'tight'. If 'layout' use the padding from the constrained or
    compressed layout engine; ignored if one of those engines is not in
    use.

facecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.facecolor`
    The facecolor of the figure.  If 'auto', use the current figure
    facecolor.

edgecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.edgecolor`
    The edgecolor of the figure.  If 'auto', use the current figure
    edgecolor.

backend : str, optional
    Use a non-default backend to render the file, e.g. to render a
    png file with the "cairo" backend rather than the default "agg",
    or a pdf file with the "pgf" backend rather than the default
    "pdf".  Note that the default backend is normally sufficient.  See
    :ref:`the-builtin-backends` for a list of valid backends for each
    file format.  Custom backends can be referenced as "module://...".

orientation : {'landscape', 'portrait'}
    Currently only supported by the postscript backend.

papertype : str
    One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
    'a10', 'b0' through 'b10'. Only supported for postscript
    output.

bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
    A list of extra artists that will be considered when the
    tight bbox is calculated.

pil_kwargs : dict, optional
    Additional keyword arguments that are passed to
    `PIL.Image.Image.save` when saving the figure.

---
## ginput
```python
from figure import ginput
```

Blocking call to interact with a figure.

Wait until the user clicks *n* times on the figure, and return the
coordinates of each click in a list.

There are three possible interactions:

- Add a point.
- Remove the most recently added point.
- Stop the interaction and return the points added so far.

The actions are assigned to mouse buttons via the arguments
*mouse_add*, *mouse_pop* and *mouse_stop*.

Parameters
----------
n : int, default: 1
    Number of mouse clicks to accumulate. If negative, accumulate
    clicks until the input is terminated manually.
timeout : float, default: 30 seconds
    Number of seconds to wait before timing out. If zero or negative
    will never time out.
show_clicks : bool, default: True
    If True, show a red cross at the location of each click.
mouse_add : `.MouseButton` or None, default: `.MouseButton.LEFT`
    Mouse button used to add points.
mouse_pop : `.MouseButton` or None, default: `.MouseButton.RIGHT`
    Mouse button used to remove the most recently added point.
mouse_stop : `.MouseButton` or None, default: `.MouseButton.MIDDLE`
    Mouse button used to stop input.

Returns
-------
list of tuples
    A list of the clicked (x, y) coordinates.

Notes
-----
The keyboard can also be used to select points in case your mouse
does not have one or more of the buttons.  The delete and backspace
keys act like right-clicking (i.e., remove last point), the enter key
terminates input and any other key (not already used by the window
manager) selects a point.

---
## waitforbuttonpress
```python
from figure import waitforbuttonpress
```

Blocking call to interact with the figure.

Wait for user input and return True if a key was pressed, False if a
mouse button was pressed and None if no input was given within
*timeout* seconds.  Negative values deactivate *timeout*.

---
## tight_layout
```python
from figure import tight_layout
```

Adjust the padding between and around subplots.

To exclude an artist on the Axes from the bounding box calculation
that determines the subplot parameters (i.e. legend, or annotation),
set ``a.set_in_layout(False)`` for that artist.

Parameters
----------
pad : float, default: 1.08
    Padding between the figure edge and the edges of subplots,
    as a fraction of the font size.
h_pad, w_pad : float, default: *pad*
    Padding (height/width) between edges of adjacent subplots,
    as a fraction of the font size.
rect : tuple (left, bottom, right, top), default: (0, 0, 1, 1)
    A rectangle in normalized figure coordinates into which the whole
    subplots area (including labels) will fit.

See Also
--------
.Figure.set_layout_engine
.pyplot.tight_layout

---
## _make_array
```python
from figure import _make_array
```

Convert input into 2D array

We need to have this internal function rather than
``np.asarray(..., dtype=object)`` so that a list of lists
of lists does not get converted to an array of dimension > 2.

Returns
-------
2D object array

---
## _identify_keys_and_nested
```python
from figure import _identify_keys_and_nested
```

Given a 2D object array, identify unique IDs and nested mosaics

Parameters
----------
mosaic : 2D object array

Returns
-------
unique_ids : tuple
    The unique non-sub mosaic entries in this mosaic
nested : dict[tuple[int, int], 2D object array]

---
## _do_layout
```python
from figure import _do_layout
```

Recursively do the mosaic.

Parameters
----------
gs : GridSpec
mosaic : 2D object array
    The input converted to a 2D array for this level.
unique_ids : tuple
    The identified scalar labels at this level of nesting.
nested : dict[tuple[int, int]], 2D object array
    The identified nested mosaics, if any.

Returns
-------
dict[label, Axes]
    A flat dict of all of the Axes created.

---
## handler
```python
from figure import handler
```



---
## _recursively_make_subfig_transparent
```python
from figure import _recursively_make_subfig_transparent
```



---
## _recursively_make_axes_transparent
```python
from figure import _recursively_make_axes_transparent
```



---
## _parse_to_version_info
```python
from __init__ import _parse_to_version_info
```

Parse a version string to a namedtuple analogous to sys.version_info.

See:
https://packaging.pypa.io/en/latest/version.html#packaging.version.parse
https://docs.python.org/3/library/sys.html#sys.version_info

---
## _get_version
```python
from __init__ import _get_version
```



---
## _check_versions
```python
from __init__ import _check_versions
```



---
## _ensure_handler
```python
from __init__ import _ensure_handler
```

The first time this function is called, attach a `StreamHandler` using the
same format as `logging.basicConfig` to the Matplotlib root logger.

Return this handler every time this function is called.

---
## set_loglevel
```python
from __init__ import set_loglevel
```

Configure Matplotlib's logging levels.

Matplotlib uses the standard library `logging` framework under the root
logger 'matplotlib'.  This is a helper function to:

- set Matplotlib's root logger level
- set the root logger handler's level, creating the handler
  if it does not exist yet

Typically, one should call ``set_loglevel("info")`` or
``set_loglevel("debug")`` to get additional debugging information.

Users or applications that are installing their own logging handlers
may want to directly manipulate ``logging.getLogger('matplotlib')`` rather
than use this function.

Parameters
----------
level : {"notset", "debug", "info", "warning", "error", "critical"}
    The log level of the handler.

Notes
-----
The first time this function is called, an additional handler is attached
to Matplotlib's root handler; this handler is reused every time and this
function simply manipulates the logger and handler's level.

---
## _logged_cached
```python
from __init__ import _logged_cached
```

Decorator that logs a function's return value, and memoizes that value.

After ::

    @_logged_cached(fmt)
    def func(): ...

the first call to *func* will log its return value at the DEBUG level using
%-format string *fmt*, and memoize it; later calls to *func* will directly
return that value.

---
## ExecutableNotFoundError
```python
from __init__ import ExecutableNotFoundError
```

Error raised when an executable that Matplotlib optionally
depends on can't be found.

---
## _get_executable_info
```python
from __init__ import _get_executable_info
```

Get the version of some executable that Matplotlib optionally depends on.

.. warning::
   The list of executables that this function supports is set according to
   Matplotlib's internal needs, and may change without notice.

Parameters
----------
name : str
    The executable to query.  The following values are currently supported:
    "dvipng", "gs", "inkscape", "magick", "pdftocairo", "pdftops".  This
    list is subject to change without notice.

Returns
-------
tuple
    A namedtuple with fields ``executable`` (`str`) and ``version``
    (`packaging.Version`, or ``None`` if the version cannot be determined).

Raises
------
ExecutableNotFoundError
    If the executable is not found or older than the oldest version
    supported by Matplotlib.  For debugging purposes, it is also
    possible to "hide" an executable from Matplotlib by adding it to the
    :envvar:`_MPLHIDEEXECUTABLES` environment variable (a comma-separated
    list), which must be set prior to any calls to this function.
ValueError
    If the executable is not one that we know how to query.

---
## _get_xdg_config_dir
```python
from __init__ import _get_xdg_config_dir
```

Return the XDG configuration directory, according to the XDG base
directory spec:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

---
## _get_xdg_cache_dir
```python
from __init__ import _get_xdg_cache_dir
```

Return the XDG cache directory, according to the XDG base directory spec:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

---
## _get_config_or_cache_dir
```python
from __init__ import _get_config_or_cache_dir
```



---
## get_configdir
```python
from __init__ import get_configdir
```

Return the string path of the configuration directory.

The directory is chosen as follows:

1. If the MPLCONFIGDIR environment variable is supplied, choose that.
2. On Linux, follow the XDG specification and look first in
   ``$XDG_CONFIG_HOME``, if defined, or ``$HOME/.config``.  On other
   platforms, choose ``$HOME/.matplotlib``.
3. If the chosen directory exists and is writable, use that as the
   configuration directory.
4. Else, create a temporary directory, and use it as the configuration
   directory.

---
## get_cachedir
```python
from __init__ import get_cachedir
```

Return the string path of the cache directory.

The procedure used to find the directory is the same as for
`get_configdir`, except using ``$XDG_CACHE_HOME``/``$HOME/.cache`` instead.

---
## get_data_path
```python
from __init__ import get_data_path
```

Return the path to Matplotlib data.

---
## matplotlib_fname
```python
from __init__ import matplotlib_fname
```

Get the location of the config file.

The file location is determined in the following order

- ``$PWD/matplotlibrc``
- ``$MATPLOTLIBRC`` if it is not a directory
- ``$MATPLOTLIBRC/matplotlibrc``
- ``$MPLCONFIGDIR/matplotlibrc``
- On Linux,
    - ``$XDG_CONFIG_HOME/matplotlib/matplotlibrc`` (if ``$XDG_CONFIG_HOME``
      is defined)
    - or ``$HOME/.config/matplotlib/matplotlibrc`` (if ``$XDG_CONFIG_HOME``
      is not defined)
- On other platforms,
  - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
  exist.

---
## RcParams
```python
from __init__ import RcParams
```

A dict-like key-value store for config parameters, including validation.

Validating functions are defined and associated with rc parameters in
:mod:`matplotlib.rcsetup`.

The list of rcParams is:

%s

See Also
--------
:ref:`customizing-with-matplotlibrc-files`

---
## rc_params
```python
from __init__ import rc_params
```

Construct a `RcParams` instance from the default Matplotlib rc file.

---
## _get_ssl_context
```python
from __init__ import _get_ssl_context
```



---
## _open_file_or_url
```python
from __init__ import _open_file_or_url
```



---
## _rc_params_in_file
```python
from __init__ import _rc_params_in_file
```

Construct a `RcParams` instance from file *fname*.

Unlike `rc_params_from_file`, the configuration class only contains the
parameters specified in the file (i.e. default values are not filled in).

Parameters
----------
fname : path-like
    The loaded file.
transform : callable, default: the identity function
    A function called on each individual line of the file to transform it,
    before further parsing.
fail_on_error : bool, default: False
    Whether invalid entries should result in an exception or a warning.

---
## rc_params_from_file
```python
from __init__ import rc_params_from_file
```

Construct a `RcParams` from file *fname*.

Parameters
----------
fname : str or path-like
    A file with Matplotlib rc settings.
fail_on_error : bool
    If True, raise an error when the parser fails to convert a parameter.
use_default_template : bool
    If True, initialize with default parameters before updating with those
    in the given file. If False, the configuration class only contains the
    parameters specified in the file. (Useful for updating dicts.)

---
## rc
```python
from __init__ import rc
```

Set the current `.rcParams`.  *group* is the grouping for the rc, e.g.,
for ``lines.linewidth`` the group is ``lines``, for
``axes.facecolor``, the group is ``axes``, and so on.  Group may
also be a list or tuple of group names, e.g., (*xtick*, *ytick*).
*kwargs* is a dictionary attribute name/value pairs, e.g.,::

  rc('lines', linewidth=2, color='r')

sets the current `.rcParams` and is equivalent to::

  rcParams['lines.linewidth'] = 2
  rcParams['lines.color'] = 'r'

The following aliases are available to save typing for interactive users:

=====   =================
Alias   Property
=====   =================
'lw'    'linewidth'
'ls'    'linestyle'
'c'     'color'
'fc'    'facecolor'
'ec'    'edgecolor'
'mew'   'markeredgewidth'
'aa'    'antialiased'
=====   =================

Thus you could abbreviate the above call as::

      rc('lines', lw=2, c='r')

Note you can use python's kwargs dictionary facility to store
dictionaries of default parameters.  e.g., you can customize the
font rc as follows::

  font = {'family' : 'monospace',
          'weight' : 'bold',
          'size'   : 'larger'}
  rc('font', **font)  # pass in the font dict as kwargs

This enables you to easily switch between several configurations.  Use
``matplotlib.style.use('default')`` or :func:`~matplotlib.rcdefaults` to
restore the default `.rcParams` after changes.

Notes
-----
Similar functionality is available by using the normal dict interface, i.e.
``rcParams.update({"lines.linewidth": 2, ...})`` (but ``rcParams.update``
does not support abbreviations or grouping).

---
## rcdefaults
```python
from __init__ import rcdefaults
```

Restore the `.rcParams` from Matplotlib's internal default style.

Style-blacklisted `.rcParams` (defined in
``matplotlib.style.core.STYLE_BLACKLIST``) are not updated.

See Also
--------
matplotlib.rc_file_defaults
    Restore the `.rcParams` from the rc file originally loaded by
    Matplotlib.
matplotlib.style.use
    Use a specific style file.  Call ``style.use('default')`` to restore
    the default style.

---
## rc_file_defaults
```python
from __init__ import rc_file_defaults
```

Restore the `.rcParams` from the original rc file loaded by Matplotlib.

Style-blacklisted `.rcParams` (defined in
``matplotlib.style.core.STYLE_BLACKLIST``) are not updated.

---
## rc_file
```python
from __init__ import rc_file
```

Update `.rcParams` from file.

Style-blacklisted `.rcParams` (defined in
``matplotlib.style.core.STYLE_BLACKLIST``) are not updated.

Parameters
----------
fname : str or path-like
    A file with Matplotlib rc settings.

use_default_template : bool
    If True, initialize with default parameters before updating with those
    in the given file. If False, the current configuration persists
    and only the parameters specified in the file are updated.

---
## rc_context
```python
from __init__ import rc_context
```

Return a context manager for temporarily changing rcParams.

The :rc:`backend` will not be reset by the context manager.

rcParams changed both through the context manager invocation and
in the body of the context will be reset on context exit.

Parameters
----------
rc : dict
    The rcParams to temporarily set.
fname : str or path-like
    A file with Matplotlib rc settings. If both *fname* and *rc* are given,
    settings from *rc* take precedence.

See Also
--------
:ref:`customizing-with-matplotlibrc-files`

Examples
--------
Passing explicit values via a dict::

    with mpl.rc_context({'interactive': False}):
        fig, ax = plt.subplots()
        ax.plot(range(3), range(3))
        fig.savefig('example.png')
        plt.close(fig)

Loading settings from a file::

     with mpl.rc_context(fname='print.rc'):
         plt.plot(x, y)  # uses 'print.rc'

Setting in the context body::

    with mpl.rc_context():
        # will be reset
        mpl.rcParams['lines.linewidth'] = 5
        plt.plot(x, y)

---
## use
```python
from __init__ import use
```

Select the backend used for rendering and GUI integration.

If pyplot is already imported, `~matplotlib.pyplot.switch_backend` is used
and if the new backend is different than the current backend, all Figures
will be closed.

Parameters
----------
backend : str
    The backend to switch to.  This can either be one of the standard
    backend names, which are case-insensitive:

    - interactive backends:
      GTK3Agg, GTK3Cairo, GTK4Agg, GTK4Cairo, MacOSX, nbAgg, notebook, QtAgg,
      QtCairo, TkAgg, TkCairo, WebAgg, WX, WXAgg, WXCairo, Qt5Agg, Qt5Cairo

    - non-interactive backends:
      agg, cairo, pdf, pgf, ps, svg, template

    or a string of the form: ``module://my.module.name``.

    notebook is a synonym for nbAgg.

    Switching to an interactive backend is not possible if an unrelated
    event loop has already been started (e.g., switching to GTK3Agg if a
    TkAgg window has already been opened).  Switching to a non-interactive
    backend is always possible.

force : bool, default: True
    If True (the default), raise an `ImportError` if the backend cannot be
    set up (either because it fails to import, or because an incompatible
    GUI interactive framework is already running); if False, silently
    ignore the failure.

See Also
--------
:ref:`backends`
matplotlib.get_backend
matplotlib.pyplot.switch_backend

---
## get_backend
```python
from __init__ import get_backend
```

Return the name of the current backend.

See Also
--------
matplotlib.use

---
## interactive
```python
from __init__ import interactive
```

Set whether to redraw after every plotting command (e.g. `.pyplot.xlabel`).

---
## is_interactive
```python
from __init__ import is_interactive
```

Return whether to redraw after every plotting command.

.. note::

    This function is only intended for use in backends. End users should
    use `.pyplot.isinteractive` instead.

---
## _val_or_rc
```python
from __init__ import _val_or_rc
```

If *val* is None, return ``mpl.rcParams[rc_name]``, otherwise return val.

---
## _init_tests
```python
from __init__ import _init_tests
```



---
## _replacer
```python
from __init__ import _replacer
```

Either returns ``data[value]`` or passes ``data`` back, converts either to
a sequence.

---
## _label_from_arg
```python
from __init__ import _label_from_arg
```



---
## _add_data_doc
```python
from __init__ import _add_data_doc
```

Add documentation for a *data* field to the given docstring.

Parameters
----------
docstring : str
    The input docstring.
replace_names : list of str or None
    The list of parameter names which arguments should be replaced by
    ``data[name]`` (if ``data[name]`` does not throw an exception).  If
    None, replacement is attempted for all arguments.

Returns
-------
str
    The augmented docstring.

---
## _preprocess_data
```python
from __init__ import _preprocess_data
```

A decorator to add a 'data' kwarg to a function.

When applied::

    @_preprocess_data()
    def func(ax, *args, **kwargs): ...

the signature is modified to ``decorated(ax, *args, data=None, **kwargs)``
with the following behavior:

- if called with ``data=None``, forward the other arguments to ``func``;
- otherwise, *data* must be a mapping; for any argument passed in as a
  string ``name``, replace the argument by ``data[name]`` (if this does not
  throw an exception), then forward the arguments to ``func``.

In either case, any argument that is a `MappingView` is also converted to a
list.

Parameters
----------
replace_names : list of str or None, default: None
    The list of parameter names for which lookup into *data* should be
    attempted. If None, replacement is attempted for all arguments.
label_namer : str, default: None
    If set e.g. to "namer" (which must be a kwarg in the function's
    signature -- not as ``**kwargs``), if the *namer* argument passed in is
    a (string) key of *data* and no *label* kwarg is passed, then use the
    (string) value of the *namer* as *label*. ::

        @_preprocess_data(label_namer="foo")
        def func(foo, label=None): ...

        func("key", data={"key": value})
        # is equivalent to
        func.__wrapped__(value, label="key")

---
## wrapper
```python
from __init__ import wrapper
```



---
## impl
```python
from __init__ import impl
```



---
## gen_candidates
```python
from __init__ import gen_candidates
```



---
## _set
```python
from __init__ import _set
```

Directly write data bypassing deprecation and validation logic.

Notes
-----
As end user or downstream library you almost always should use
``rcParams[key] = val`` and not ``_set()``.

There are only very few special cases that need direct data access.
These cases previously used ``dict.__setitem__(rcParams, key, val)``,
which is now deprecated and replaced by ``rcParams._set(key, val)``.

Even though private, we guarantee API stability for ``rcParams._set``,
i.e. it is subject to Matplotlib's API and deprecation policy.

:meta public:

---
## _get
```python
from __init__ import _get
```



---
## _get_backend_or_none
```python
from __init__ import _get_backend_or_none
```

Get the requested backend, if any, without triggering resolution.

---
## find_all
```python
from __init__ import find_all
```

Return the subset of this RcParams dictionary whose keys match,
using :func:`re.search`, the given ``pattern``.

.. note::

    Changes to the returned dictionary are *not* propagated to
    the parent RcParams dictionary.

---
## copy
```python
from __init__ import copy
```



---
## inner
```python
from __init__ import inner
```



---
## __name__
```python
from _mathtext import __name__
```

Implementation details for :mod:`.mathtext`.

---
## get_unicode_index
```python
from _mathtext import get_unicode_index
```

Return the integer index (from the Unicode table) of *symbol*.

Parameters
----------
symbol : str
    A single (Unicode) character, a TeX command (e.g. r'\pi') or a Type1
    symbol name (e.g. 'phi').

---
## VectorParse
```python
from _mathtext import VectorParse
```

The namedtuple type returned by ``MathTextParser("path").parse(...)``.

Attributes
----------
width, height, depth : float
    The global metrics.
glyphs : list
    The glyphs including their positions.
rect : list
    The list of rectangles.

---
## RasterParse
```python
from _mathtext import RasterParse
```

The namedtuple type returned by ``MathTextParser("agg").parse(...)``.

Attributes
----------
ox, oy : float
    The offsets are always zero.
width, height, depth : float
    The global metrics.
image : FT2Image
    A raster image.

---
## Output
```python
from _mathtext import Output
```

Result of `ship`\ping a box: lists of positioned glyphs and rectangles.

This class is not exposed to end users, but converted to a `VectorParse` or
a `RasterParse` by `.MathTextParser.parse`.

---
## FontMetrics
```python
from _mathtext import FontMetrics
```

Metrics of a font.

Attributes
----------
advance : float
    The advance distance (in points) of the glyph.
height : float
    The height of the glyph in points.
width : float
    The width of the glyph in points.
xmin, xmax, ymin, ymax : float
    The ink rectangle of the glyph.
iceberg : float
    The distance from the baseline to the top of the glyph. (This corresponds to
    TeX's definition of "height".)
slanted : bool
    Whether the glyph should be considered as "slanted" (currently used for kerning
    sub/superscripts).

---
## FontInfo
```python
from _mathtext import FontInfo
```



---
## Fonts
```python
from _mathtext import Fonts
```

An abstract base class for a system of fonts to use for mathtext.

The class must be able to take symbol keys and font file names and
return the character metrics.  It also delegates to a backend class
to do the actual drawing.

---
## TruetypeFonts
```python
from _mathtext import TruetypeFonts
```

A generic base class for all font setups that use Truetype fonts
(through FT2Font).

---
## BakomaFonts
```python
from _mathtext import BakomaFonts
```

Use the Bakoma TrueType fonts for rendering.

Symbols are strewn about a number of font files, each of which has
its own proprietary 8-bit encoding.

---
## UnicodeFonts
```python
from _mathtext import UnicodeFonts
```

An abstract base class for handling Unicode fonts.

While some reasonably complete Unicode fonts (such as DejaVu) may
work in some situations, the only Unicode font I'm aware of with a
complete set of math symbols is STIX.

This class will "fallback" on the Bakoma fonts when a required
symbol cannot be found in the font.

---
## DejaVuFonts
```python
from _mathtext import DejaVuFonts
```



---
## DejaVuSerifFonts
```python
from _mathtext import DejaVuSerifFonts
```

A font handling class for the DejaVu Serif fonts

If a glyph is not found it will fallback to Stix Serif

---
## DejaVuSansFonts
```python
from _mathtext import DejaVuSansFonts
```

A font handling class for the DejaVu Sans fonts

If a glyph is not found it will fallback to Stix Sans

---
## StixFonts
```python
from _mathtext import StixFonts
```

A font handling class for the STIX fonts.

In addition to what UnicodeFonts provides, this class:

- supports "virtual fonts" which are complete alpha numeric
  character sets with different font styles at special Unicode
  code points, such as "Blackboard".

- handles sized alternative characters for the STIXSizeX fonts.

---
## StixSansFonts
```python
from _mathtext import StixSansFonts
```

A font handling class for the STIX fonts (that uses sans-serif
characters by default).

---
## FontConstantsBase
```python
from _mathtext import FontConstantsBase
```

A set of constants that controls how certain things, such as sub-
and superscripts are laid out.  These are all metrics that can't
be reliably retrieved from the font metrics in the font itself.

---
## ComputerModernFontConstants
```python
from _mathtext import ComputerModernFontConstants
```



---
## STIXFontConstants
```python
from _mathtext import STIXFontConstants
```



---
## STIXSansFontConstants
```python
from _mathtext import STIXSansFontConstants
```



---
## DejaVuSerifFontConstants
```python
from _mathtext import DejaVuSerifFontConstants
```



---
## DejaVuSansFontConstants
```python
from _mathtext import DejaVuSansFontConstants
```



---
## _get_font_constant_set
```python
from _mathtext import _get_font_constant_set
```



---
## Node
```python
from _mathtext import Node
```

A node in the TeX box model.

---
## Box
```python
from _mathtext import Box
```

A node with a physical location.

---
## Vbox
```python
from _mathtext import Vbox
```

A box with only height (zero width).

---
## Hbox
```python
from _mathtext import Hbox
```

A box with only width (zero height and depth).

---
## Char
```python
from _mathtext import Char
```

A single character.

Unlike TeX, the font information and metrics are stored with each `Char`
to make it easier to lookup the font metrics when needed.  Note that TeX
boxes have a width, height, and depth, unlike Type1 and TrueType which use
a full bounding box and an advance in the x-direction.  The metrics must
be converted to the TeX model, and the advance (if different from width)
must be converted into a `Kern` node when the `Char` is added to its parent
`Hlist`.

---
## Accent
```python
from _mathtext import Accent
```

The font metrics need to be dealt with differently for accents,
since they are already offset correctly from the baseline in
TrueType fonts.

---
## List
```python
from _mathtext import List
```

A list of nodes (either horizontal or vertical).

---
## Hlist
```python
from _mathtext import Hlist
```

A horizontal list of boxes.

---
## Vlist
```python
from _mathtext import Vlist
```

A vertical list of boxes.

---
## Rule
```python
from _mathtext import Rule
```

A solid black rectangle.

It has *width*, *depth*, and *height* fields just as in an `Hlist`.
However, if any of these dimensions is inf, the actual value will be
determined by running the rule up to the boundary of the innermost
enclosing box.  This is called a "running dimension".  The width is never
running in an `Hlist`; the height and depth are never running in a `Vlist`.

---
## Hrule
```python
from _mathtext import Hrule
```

Convenience class to create a horizontal rule.

---
## Vrule
```python
from _mathtext import Vrule
```

Convenience class to create a vertical rule.

---
## _GlueSpec
```python
from _mathtext import _GlueSpec
```



---
## Glue
```python
from _mathtext import Glue
```

Most of the information in this object is stored in the underlying
``_GlueSpec`` class, which is shared between multiple glue objects.
(This is a memory optimization which probably doesn't matter anymore, but
it's easier to stick to what TeX does.)

---
## HCentered
```python
from _mathtext import HCentered
```

A convenience class to create an `Hlist` whose contents are
centered within its enclosing box.

---
## VCentered
```python
from _mathtext import VCentered
```

A convenience class to create a `Vlist` whose contents are
centered within its enclosing box.

---
## Kern
```python
from _mathtext import Kern
```

A `Kern` node has a width field to specify a (normally
negative) amount of spacing. This spacing correction appears in
horizontal lists between letters like A and V when the font
designer said that it looks better to move them closer together or
further apart. A kern node can also appear in a vertical list,
when its *width* denotes additional spacing in the vertical
direction.

---
## AutoHeightChar
```python
from _mathtext import AutoHeightChar
```

A character as close to the given height and depth as possible.

When using a font with multiple height versions of some characters (such as
the BaKoMa fonts), the correct glyph will be selected, otherwise this will
always just return a scaled version of the glyph.

---
## AutoWidthChar
```python
from _mathtext import AutoWidthChar
```

A character as close to the given width as possible.

When using a font with multiple width versions of some characters (such as
the BaKoMa fonts), the correct glyph will be selected, otherwise this will
always just return a scaled version of the glyph.

---
## ship
```python
from _mathtext import ship
```

Ship out *box* at offset *xy*, converting it to an `Output`.

Since boxes can be inside of boxes inside of boxes, the main work of `ship`
is done by two mutually recursive routines, `hlist_out` and `vlist_out`,
which traverse the `Hlist` nodes and `Vlist` nodes inside of horizontal
and vertical boxes.  The global variables used in TeX to store state as it
processes have become local variables here.

---
## Error
```python
from _mathtext import Error
```

Helper class to raise parser errors.

---
## ParserState
```python
from _mathtext import ParserState
```

Parser state.

States are pushed and popped from a stack as necessary, and the "current"
state is always at the top of the stack.

Upon entering and leaving a group { } or math/non-math, the stack is pushed
and popped accordingly.

---
## cmd
```python
from _mathtext import cmd
```

Helper to define TeX commands.

``cmd("\cmd", args)`` is equivalent to
``"\cmd" - (args | Error("Expected \cmd{arg}{...}"))`` where the names in
the error message are taken from element names in *args*.  If *expr*
already includes arguments (e.g. "\cmd{arg}{...}"), then they are stripped
when constructing the parse element, but kept (and *expr* is used as is) in
the error message.

---
## Parser
```python
from _mathtext import Parser
```

A pyparsing-based parser for strings containing math expressions.

Raw text may also appear outside of pairs of ``$``.

The grammar is based directly on that in TeX, though it cuts a few corners.

---
## __init__
```python
from _mathtext import __init__
```



---
## to_vector
```python
from _mathtext import to_vector
```



---
## to_raster
```python
from _mathtext import to_raster
```



---
## get_kern
```python
from _mathtext import get_kern
```



---
## _get_font
```python
from _mathtext import _get_font
```



---
## _get_info
```python
from _mathtext import _get_info
```



---
## get_metrics
```python
from _mathtext import get_metrics
```

Parameters
----------
font : str
    One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf",
    "default", "regular", "bb", "frak", "scr".  "default" and "regular"
    are synonyms and use the non-math font.
font_class : str
    One of the TeX font names (as for *font*), but **not** "bb",
    "frak", or "scr".  This is used to combine two font classes.  The
    only supported combination currently is ``get_metrics("frak", "bf",
    ...)``.
sym : str
    A symbol in raw TeX form, e.g., "1", "x", or "\sigma".
fontsize : float
    Font size in points.
dpi : float
    Rendering dots-per-inch.

Returns
-------
FontMetrics

---
## render_glyph
```python
from _mathtext import render_glyph
```

At position (*ox*, *oy*), draw the glyph specified by the remaining
parameters (see `get_metrics` for their detailed description).

---
## render_rect_filled
```python
from _mathtext import render_rect_filled
```

Draw a filled rectangle from (*x1*, *y1*) to (*x2*, *y2*).

---
## get_xheight
```python
from _mathtext import get_xheight
```



---
## get_underline_thickness
```python
from _mathtext import get_underline_thickness
```



---
## get_sized_alternatives_for_symbol
```python
from _mathtext import get_sized_alternatives_for_symbol
```



---
## _get_offset
```python
from _mathtext import _get_offset
```



---
## _get_glyph
```python
from _mathtext import _get_glyph
```



---
## _map_virtual_font
```python
from _mathtext import _map_virtual_font
```



---
## __repr__
```python
from _mathtext import __repr__
```



---
## get_kerning
```python
from _mathtext import get_kerning
```

Return the amount of kerning between this and the given character.

This method is called when characters are strung together into `Hlist`
to create `Kern` nodes.

---
## shrink
```python
from _mathtext import shrink
```



---
## render
```python
from _mathtext import render
```



---
## _update_metrics
```python
from _mathtext import _update_metrics
```



---
## is_slanted
```python
from _mathtext import is_slanted
```



---
## _set_glue
```python
from _mathtext import _set_glue
```



---
## kern
```python
from _mathtext import kern
```

Insert `Kern` nodes between `Char` nodes to set kerning.

The `Char` nodes themselves determine the amount of kerning they need
(in `~Char.get_kerning`), and this function just creates the correct
linked list.

---
## hpack
```python
from _mathtext import hpack
```

Compute the dimensions of the resulting boxes, and adjust the glue if
one of those dimensions is pre-specified.  The computed sizes normally
enclose all of the material inside the new box; but some items may
stick out if negative glue is used, if the box is overfull, or if a
``\vbox`` includes other boxes that have been shifted left.

Parameters
----------
w : float, default: 0
    A width.
m : {'exactly', 'additional'}, default: 'additional'
    Whether to produce a box whose width is 'exactly' *w*; or a box
    with the natural width of the contents, plus *w* ('additional').

Notes
-----
The defaults produce a box with the natural width of the contents.

---
## vpack
```python
from _mathtext import vpack
```

Compute the dimensions of the resulting boxes, and to adjust the glue
if one of those dimensions is pre-specified.

Parameters
----------
h : float, default: 0
    A height.
m : {'exactly', 'additional'}, default: 'additional'
    Whether to produce a box whose height is 'exactly' *h*; or a box
    with the natural height of the contents, plus *h* ('additional').
l : float, default: np.inf
    The maximum height.

Notes
-----
The defaults produce a box with the natural height of the contents.

---
## clamp
```python
from _mathtext import clamp
```



---
## hlist_out
```python
from _mathtext import hlist_out
```



---
## vlist_out
```python
from _mathtext import vlist_out
```



---
## raise_error
```python
from _mathtext import raise_error
```



---
## copy
```python
from _mathtext import copy
```



---
## font
```python
from _mathtext import font
```



---
## get_current_underline_thickness
```python
from _mathtext import get_current_underline_thickness
```

Return the underline thickness for this state.

---
## names
```python
from _mathtext import names
```



---
## _MathStyle
```python
from _mathtext import _MathStyle
```



---
## parse
```python
from _mathtext import parse
```

Parse expression *s* using the given *fonts_object* for
output, at the given *fontsize* and *dpi*.

Returns the parse tree of `Node` instances.

---
## get_state
```python
from _mathtext import get_state
```

Get the current `State` of the parser.

---
## pop_state
```python
from _mathtext import pop_state
```

Pop a `State` off of the stack.

---
## push_state
```python
from _mathtext import push_state
```

Push a new `State` onto the stack, copying the current state.

---
## main
```python
from _mathtext import main
```



---
## math_string
```python
from _mathtext import math_string
```



---
## math
```python
from _mathtext import math
```



---
## non_math
```python
from _mathtext import non_math
```



---
## text
```python
from _mathtext import text
```



---
## _make_space
```python
from _mathtext import _make_space
```



---
## space
```python
from _mathtext import space
```



---
## customspace
```python
from _mathtext import customspace
```



---
## symbol
```python
from _mathtext import symbol
```



---
## unknown_symbol
```python
from _mathtext import unknown_symbol
```



---
## accent
```python
from _mathtext import accent
```



---
## function
```python
from _mathtext import function
```



---
## operatorname
```python
from _mathtext import operatorname
```



---
## start_group
```python
from _mathtext import start_group
```



---
## group
```python
from _mathtext import group
```



---
## required_group
```python
from _mathtext import required_group
```



---
## end_group
```python
from _mathtext import end_group
```



---
## unclosed_group
```python
from _mathtext import unclosed_group
```



---
## is_overunder
```python
from _mathtext import is_overunder
```



---
## is_dropsub
```python
from _mathtext import is_dropsub
```



---
## subsuper
```python
from _mathtext import subsuper
```



---
## _genfrac
```python
from _mathtext import _genfrac
```



---
## style_literal
```python
from _mathtext import style_literal
```



---
## genfrac
```python
from _mathtext import genfrac
```



---
## frac
```python
from _mathtext import frac
```



---
## dfrac
```python
from _mathtext import dfrac
```



---
## binom
```python
from _mathtext import binom
```



---
## _genset
```python
from _mathtext import _genset
```



---
## sqrt
```python
from _mathtext import sqrt
```



---
## overline
```python
from _mathtext import overline
```



---
## _auto_sized_delimiter
```python
from _mathtext import _auto_sized_delimiter
```



---
## auto_delim
```python
from _mathtext import auto_delim
```



---
## boldsymbol
```python
from _mathtext import boldsymbol
```



---
## substack
```python
from _mathtext import substack
```



---
## set_names_and_parse_actions
```python
from _mathtext import set_names_and_parse_actions
```



---
## csnames
```python
from _mathtext import csnames
```



---
## __name__
```python
from _enums import __name__
```

Enums representing sets of strings that Matplotlib uses as input parameters.

Matplotlib often uses simple data types like strings or tuples to define a
concept; e.g. the line capstyle can be specified as one of 'butt', 'round',
or 'projecting'. The classes in this module are used internally and serve to
document these concepts formally.

As an end-user you will not use these classes directly, but only the values
they define.

---
## _AutoStringNameEnum
```python
from _enums import _AutoStringNameEnum
```

Automate the ``name = 'name'`` part of making a (str, Enum).

---
## JoinStyle
```python
from _enums import JoinStyle
```

Define how the connection between two line segments is drawn.

For a visual impression of each *JoinStyle*, `view these docs online
<JoinStyle>`, or run `JoinStyle.demo`.

Lines in Matplotlib are typically defined by a 1D `~.path.Path` and a
finite ``linewidth``, where the underlying 1D `~.path.Path` represents the
center of the stroked line.

By default, `~.backend_bases.GraphicsContextBase` defines the boundaries of
a stroked line to simply be every point within some radius,
``linewidth/2``, away from any point of the center line. However, this
results in corners appearing "rounded", which may not be the desired
behavior if you are drawing, for example, a polygon or pointed star.

**Supported values:**

.. rst-class:: value-list

    'miter'
        the "arrow-tip" style. Each boundary of the filled-in area will
        extend in a straight line parallel to the tangent vector of the
        centerline at the point it meets the corner, until they meet in a
        sharp point.
    'round'
        stokes every point within a radius of ``linewidth/2`` of the center
        lines.
    'bevel'
        the "squared-off" style. It can be thought of as a rounded corner
        where the "circular" part of the corner has been cut off.

.. note::

    Very long miter tips are cut off (to form a *bevel*) after a
    backend-dependent limit called the "miter limit", which specifies the
    maximum allowed ratio of miter length to line width. For example, the
    PDF backend uses the default value of 10 specified by the PDF standard,
    while the SVG backend does not even specify the miter limit, resulting
    in a default value of 4 per the SVG specification. Matplotlib does not
    currently allow the user to adjust this parameter.

    A more detailed description of the effect of a miter limit can be found
    in the `Mozilla Developer Docs
    <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-miterlimit>`_

.. plot::
    :alt: Demo of possible JoinStyle's

    from matplotlib._enums import JoinStyle
    JoinStyle.demo()

---
## CapStyle
```python
from _enums import CapStyle
```

Define how the two endpoints (caps) of an unclosed line are drawn.

How to draw the start and end points of lines that represent a closed curve
(i.e. that end in a `~.path.Path.CLOSEPOLY`) is controlled by the line's
`JoinStyle`. For all other lines, how the start and end points are drawn is
controlled by the *CapStyle*.

For a visual impression of each *CapStyle*, `view these docs online
<CapStyle>` or run `CapStyle.demo`.

By default, `~.backend_bases.GraphicsContextBase` draws a stroked line as
squared off at its endpoints.

**Supported values:**

.. rst-class:: value-list

    'butt'
        the line is squared off at its endpoint.
    'projecting'
        the line is squared off as in *butt*, but the filled in area
        extends beyond the endpoint a distance of ``linewidth/2``.
    'round'
        like *butt*, but a semicircular cap is added to the end of the
        line, of radius ``linewidth/2``.

.. plot::
    :alt: Demo of possible CapStyle's

    from matplotlib._enums import CapStyle
    CapStyle.demo()

---
## _generate_next_value_
```python
from _enums import _generate_next_value_
```



---
## __hash__
```python
from _enums import __hash__
```



---
## demo
```python
from _enums import demo
```

Demonstrate how each CapStyle looks for a thick line segment.

---
## plot_angle
```python
from _enums import plot_angle
```



---
## __name__
```python
from offsetbox import __name__
```

Container classes for `.Artist`\s.

`OffsetBox`
    The base of all container artists defined in this module.

`AnchoredOffsetbox`, `AnchoredText`
    Anchor and align an arbitrary `.Artist` or a text relative to the parent
    axes or a specific anchor point.

`DrawingArea`
    A container with fixed width and height. Children have a fixed position
    inside the container and may be clipped.

`HPacker`, `VPacker`
    Containers for layouting their children vertically or horizontally.

`PaddedBox`
    A container to add a padding around an `.Artist`.

`TextArea`
    Contains a single `.Text` instance.

---
## _compat_get_offset
```python
from offsetbox import _compat_get_offset
```

Decorator for the get_offset method of OffsetBox and subclasses, that
allows supporting both the new signature (self, bbox, renderer) and the old
signature (self, width, height, xdescent, ydescent, renderer).

---
## _bbox_artist
```python
from offsetbox import _bbox_artist
```



---
## _get_packed_offsets
```python
from offsetbox import _get_packed_offsets
```

Pack boxes specified by their *widths*.

For simplicity of the description, the terminology used here assumes a
horizontal layout, but the function works equally for a vertical layout.

There are three packing *mode*\s:

- 'fixed': The elements are packed tight to the left with a spacing of
  *sep* in between. If *total* is *None* the returned total will be the
  right edge of the last box. A non-*None* total will be passed unchecked
  to the output. In particular this means that right edge of the last
  box may be further to the right than the returned total.

- 'expand': Distribute the boxes with equal spacing so that the left edge
  of the first box is at 0, and the right edge of the last box is at
  *total*. The parameter *sep* is ignored in this mode. A total of *None*
  is accepted and considered equal to 1. The total is returned unchanged
  (except for the conversion *None* to 1). If the total is smaller than
  the sum of the widths, the laid out boxes will overlap.

- 'equal': If *total* is given, the total space is divided in N equal
  ranges and each box is left-aligned within its subspace.
  Otherwise (*total* is *None*), *sep* must be provided and each box is
  left-aligned in its subspace of width ``(max(widths) + sep)``. The
  total width is then calculated to be ``N * (max(widths) + sep)``.

Parameters
----------
widths : list of float
    Widths of boxes to be packed.
total : float or None
    Intended total length. *None* if not used.
sep : float or None
    Spacing between boxes.
mode : {'fixed', 'expand', 'equal'}
    The packing mode.

Returns
-------
total : float
    The total width needed to accommodate the laid out boxes.
offsets : array of float
    The left offsets of the boxes.

---
## _get_aligned_offsets
```python
from offsetbox import _get_aligned_offsets
```

Align boxes each specified by their ``(y0, y1)`` spans.

For simplicity of the description, the terminology used here assumes a
horizontal layout (i.e., vertical alignment), but the function works
equally for a vertical layout.

Parameters
----------
yspans
    List of (y0, y1) spans of boxes to be aligned.
height : float or None
    Intended total height. If None, the maximum of the heights
    (``y1 - y0``) in *yspans* is used.
align : {'baseline', 'left', 'top', 'right', 'bottom', 'center'}
    The alignment anchor of the boxes.

Returns
-------
(y0, y1)
    y range spanned by the packing.  If a *height* was originally passed
    in, then for all alignments other than "baseline", a span of ``(0,
    height)`` is used without checking that it is actually large enough).
descent
    The descent of the packing.
offsets
    The bottom offsets of the boxes.

---
## OffsetBox
```python
from offsetbox import OffsetBox
```

The OffsetBox is a simple container artist.

The child artists are meant to be drawn at a relative position to its
parent.

Being an artist itself, all parameters are passed on to `.Artist`.

---
## PackerBase
```python
from offsetbox import PackerBase
```



---
## VPacker
```python
from offsetbox import VPacker
```

VPacker packs its children vertically, automatically adjusting their
relative positions at draw time.

---
## HPacker
```python
from offsetbox import HPacker
```

HPacker packs its children horizontally, automatically adjusting their
relative positions at draw time.

---
## PaddedBox
```python
from offsetbox import PaddedBox
```

A container to add a padding around an `.Artist`.

The `.PaddedBox` contains a `.FancyBboxPatch` that is used to visualize
it when rendering.

---
## DrawingArea
```python
from offsetbox import DrawingArea
```

The DrawingArea can contain any Artist as a child. The DrawingArea
has a fixed width and height. The position of children relative to
the parent is fixed. The children can be clipped at the
boundaries of the parent.

---
## TextArea
```python
from offsetbox import TextArea
```

The TextArea is a container artist for a single Text instance.

The text is placed at (0, 0) with baseline+left alignment, by default. The
width and height of the TextArea instance is the width and height of its
child text.

---
## AuxTransformBox
```python
from offsetbox import AuxTransformBox
```

Offset Box with the aux_transform. Its children will be
transformed with the aux_transform first then will be
offsetted. The absolute coordinate of the aux_transform is meaning
as it will be automatically adjust so that the left-lower corner
of the bounding box of children will be set to (0, 0) before the
offset transform.

It is similar to drawing area, except that the extent of the box
is not predetermined but calculated from the window extent of its
children. Furthermore, the extent of the children will be
calculated in the transformed coordinate.

---
## AnchoredOffsetbox
```python
from offsetbox import AnchoredOffsetbox
```

An offset box placed according to location *loc*.

AnchoredOffsetbox has a single child.  When multiple children are needed,
use an extra OffsetBox to enclose them.  By default, the offset box is
anchored against its parent Axes. You may explicitly specify the
*bbox_to_anchor*.

---
## _get_anchored_bbox
```python
from offsetbox import _get_anchored_bbox
```

Return the (x, y) position of the *bbox* anchored at the *parentbbox* with
the *loc* code with the *borderpad*.

---
## AnchoredText
```python
from offsetbox import AnchoredText
```

AnchoredOffsetbox with Text.

---
## OffsetImage
```python
from offsetbox import OffsetImage
```



---
## AnnotationBbox
```python
from offsetbox import AnnotationBbox
```

Container for an `OffsetBox` referring to a specific position *xy*.

Optionally an arrow pointing from the offsetbox to *xy* can be drawn.

This is like `.Annotation`, but with `OffsetBox` instead of `.Text`.

---
## DraggableBase
```python
from offsetbox import DraggableBase
```

Helper base class for a draggable artist (legend, offsetbox).

Derived classes must override the following methods::

    def save_offset(self):
        '''
        Called when the object is picked for dragging; should save the
        reference position of the artist.
        '''

    def update_offset(self, dx, dy):
        '''
        Called during the dragging; (*dx*, *dy*) is the pixel offset from
        the point where the mouse drag started.
        '''

Optionally, you may override the following method::

    def finalize_offset(self):
        '''Called when the mouse is released.'''

In the current implementation of `.DraggableLegend` and
`DraggableAnnotation`, `update_offset` places the artists in display
coordinates, and `finalize_offset` recalculates their position in axes
coordinate and set a relevant attribute.

---
## DraggableOffsetBox
```python
from offsetbox import DraggableOffsetBox
```



---
## DraggableAnnotation
```python
from offsetbox import DraggableAnnotation
```



---
## get_offset
```python
from offsetbox import get_offset
```

Return offset of the container.

---
## __init__
```python
from offsetbox import __init__
```



---
## set_figure
```python
from offsetbox import set_figure
```



---
## axes
```python
from offsetbox import axes
```



---
## contains
```python
from offsetbox import contains
```



---
## set_offset
```python
from offsetbox import set_offset
```

Set the offset of the container.

Parameters
----------
xy : (float, float)
    The (x, y) coordinates of the offset in display units.

---
## set_width
```python
from offsetbox import set_width
```

Set the width of the box.

Parameters
----------
width : float

---
## set_height
```python
from offsetbox import set_height
```

Set the height of the box.

Parameters
----------
height : float

---
## get_visible_children
```python
from offsetbox import get_visible_children
```

Return a list of the visible child `.Artist`\s.

---
## get_children
```python
from offsetbox import get_children
```



---
## _get_bbox_and_child_offsets
```python
from offsetbox import _get_bbox_and_child_offsets
```



---
## get_bbox
```python
from offsetbox import get_bbox
```



---
## get_window_extent
```python
from offsetbox import get_window_extent
```



---
## draw
```python
from offsetbox import draw
```



---
## update_frame
```python
from offsetbox import update_frame
```



---
## draw_frame
```python
from offsetbox import draw_frame
```



---
## clip_children
```python
from offsetbox import clip_children
```



---
## get_transform
```python
from offsetbox import get_transform
```

Return the :class:`~matplotlib.transforms.Transform` applied
to the children

---
## set_transform
```python
from offsetbox import set_transform
```

set_transform is ignored.

---
## add_artist
```python
from offsetbox import add_artist
```

Add an `.Artist` to the container box.

---
## set_text
```python
from offsetbox import set_text
```

Set the text of this area as a string.

---
## get_text
```python
from offsetbox import get_text
```

Return the string representation of this area's text.

---
## set_multilinebaseline
```python
from offsetbox import set_multilinebaseline
```

Set multilinebaseline.

If True, the baseline for multiline text is adjusted so that it is
(approximately) center-aligned with single-line text.  This is used
e.g. by the legend implementation so that single-line labels are
baseline-aligned, but multiline labels are "center"-aligned with them.

---
## get_multilinebaseline
```python
from offsetbox import get_multilinebaseline
```

Get multilinebaseline.

---
## set_child
```python
from offsetbox import set_child
```

Set the child to be anchored.

---
## get_child
```python
from offsetbox import get_child
```

Return the child.

---
## get_bbox_to_anchor
```python
from offsetbox import get_bbox_to_anchor
```

Return the bbox that the box is anchored to.

---
## set_bbox_to_anchor
```python
from offsetbox import set_bbox_to_anchor
```

Set the bbox that the box is anchored to.

*bbox* can be a Bbox instance, a list of [left, bottom, width,
height], or a list of [left, bottom] where the width and
height will be assumed to be zero. The bbox will be
transformed to display coordinate by the given transform.

---
## set_data
```python
from offsetbox import set_data
```



---
## get_data
```python
from offsetbox import get_data
```



---
## set_zoom
```python
from offsetbox import set_zoom
```



---
## get_zoom
```python
from offsetbox import get_zoom
```



---
## __str__
```python
from offsetbox import __str__
```



---
## xyann
```python
from offsetbox import xyann
```



---
## anncoords
```python
from offsetbox import anncoords
```



---
## set_fontsize
```python
from offsetbox import set_fontsize
```

Set the fontsize in points.

If *s* is not given, reset to :rc:`legend.fontsize`.

---
## get_fontsize
```python
from offsetbox import get_fontsize
```

Return the fontsize in points.

---
## get_tightbbox
```python
from offsetbox import get_tightbbox
```



---
## update_positions
```python
from offsetbox import update_positions
```

Update pixel positions for the annotated point, the text, and the arrow.

---
## on_motion
```python
from offsetbox import on_motion
```



---
## on_pick
```python
from offsetbox import on_pick
```



---
## on_release
```python
from offsetbox import on_release
```



---
## _check_still_parented
```python
from offsetbox import _check_still_parented
```



---
## disconnect
```python
from offsetbox import disconnect
```

Disconnect the callbacks.

---
## save_offset
```python
from offsetbox import save_offset
```



---
## update_offset
```python
from offsetbox import update_offset
```



---
## finalize_offset
```python
from offsetbox import finalize_offset
```



---
## get_loc_in_canvas
```python
from offsetbox import get_loc_in_canvas
```



---
## __name__
```python
from container import __name__
```



---
## Container
```python
from container import Container
```

A container for items within a TOMLDocument.

This class implements the `dict` interface with copy/deepcopy protocol.

---
## BarContainer
```python
from container import BarContainer
```

Container for the artists of bar plots (e.g. created by `.Axes.bar`).

The container can be treated as a tuple of the *patches* themselves.
Additionally, you can access these and further parameters by the
attributes.

Attributes
----------
patches : list of :class:`~matplotlib.patches.Rectangle`
    The artists of the bars.

errorbar : None or :class:`~matplotlib.container.ErrorbarContainer`
    A container for the error bar artists if error bars are present.
    *None* otherwise.

datavalues : None or array-like
    The underlying data values corresponding to the bars.

orientation : {'vertical', 'horizontal'}, default: None
    If 'vertical', the bars are assumed to be vertical.
    If 'horizontal', the bars are assumed to be horizontal.

---
## ErrorbarContainer
```python
from container import ErrorbarContainer
```

Container for the artists of error bars (e.g. created by `.Axes.errorbar`).

The container can be treated as the *lines* tuple itself.
Additionally, you can access these and further parameters by the
attributes.

Attributes
----------
lines : tuple
    Tuple of ``(data_line, caplines, barlinecols)``.

    - data_line : A `~matplotlib.lines.Line2D` instance of x, y plot markers
      and/or line.
    - caplines : A tuple of `~matplotlib.lines.Line2D` instances of the error
      bar caps.
    - barlinecols : A tuple of `~matplotlib.collections.LineCollection` with the
      horizontal and vertical error ranges.

has_xerr, has_yerr : bool
    ``True`` if the errorbar has x/y errors.

---
## StemContainer
```python
from container import StemContainer
```

Container for the artists created in a :meth:`.Axes.stem` plot.

The container can be treated like a namedtuple ``(markerline, stemlines,
baseline)``.

Attributes
----------
markerline : `~matplotlib.lines.Line2D`
    The artist of the markers at the stem heads.

stemlines : `~matplotlib.collections.LineCollection`
    The artists of the vertical lines for all stems.

baseline : `~matplotlib.lines.Line2D`
    The artist of the horizontal baseline.

---
## __repr__
```python
from container import __repr__
```



---
## __new__
```python
from container import __new__
```



---
## __init__
```python
from container import __init__
```



---
## remove
```python
from container import remove
```

Remove a key from the container.

---
## get_children
```python
from container import get_children
```



---
## __name__
```python
from gridspec import __name__
```

:mod:`~matplotlib.gridspec` contains classes that help to layout multiple
`~.axes.Axes` in a grid-like pattern within a figure.

The `GridSpec` specifies the overall grid structure. Individual cells within
the grid are referenced by `SubplotSpec`\s.

Often, users need not access this module directly, and can use higher-level
methods like `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` and
`~.Figure.subfigures`. See the tutorial :ref:`arranging_axes` for a guide.

---
## GridSpecBase
```python
from gridspec import GridSpecBase
```

A base class of GridSpec that specifies the geometry of the grid
that a subplot will be placed.

---
## GridSpec
```python
from gridspec import GridSpec
```

A grid layout to place subplots within a figure.

The location of the grid cells is determined in a similar way to
`.SubplotParams` using *left*, *right*, *top*, *bottom*, *wspace*
and *hspace*.

Indexing a GridSpec instance returns a `.SubplotSpec`.

---
## GridSpecFromSubplotSpec
```python
from gridspec import GridSpecFromSubplotSpec
```

GridSpec whose subplot layout parameters are inherited from the
location specified by a given SubplotSpec.

---
## SubplotSpec
```python
from gridspec import SubplotSpec
```

The location of a subplot in a `GridSpec`.

.. note::

    Likely, you will never instantiate a `SubplotSpec` yourself. Instead,
    you will typically obtain one from a `GridSpec` using item-access.

Parameters
----------
gridspec : `~matplotlib.gridspec.GridSpec`
    The GridSpec, which the subplot is referencing.
num1, num2 : int
    The subplot will occupy the *num1*-th cell of the given
    *gridspec*.  If *num2* is provided, the subplot will span between
    *num1*-th cell and *num2*-th cell **inclusive**.

    The index starts from 0.

---
## SubplotParams
```python
from gridspec import SubplotParams
```

Parameters defining the positioning of a subplots grid in a figure.

---
## __init__
```python
from gridspec import __init__
```

Defaults are given by :rc:`figure.subplot.[name]`.

Parameters
----------
left : float
    The position of the left edge of the subplots,
    as a fraction of the figure width.
right : float
    The position of the right edge of the subplots,
    as a fraction of the figure width.
bottom : float
    The position of the bottom edge of the subplots,
    as a fraction of the figure height.
top : float
    The position of the top edge of the subplots,
    as a fraction of the figure height.
wspace : float
    The width of the padding between subplots,
    as a fraction of the average Axes width.
hspace : float
    The height of the padding between subplots,
    as a fraction of the average Axes height.

---
## __repr__
```python
from gridspec import __repr__
```



---
## get_geometry
```python
from gridspec import get_geometry
```

Return the subplot geometry as tuple ``(n_rows, n_cols, start, stop)``.

The indices *start* and *stop* define the range of the subplot within
the `GridSpec`. *stop* is inclusive (i.e. for a single cell
``start == stop``).

---
## get_subplot_params
```python
from gridspec import get_subplot_params
```

Return a dictionary of subplot layout parameters.

---
## new_subplotspec
```python
from gridspec import new_subplotspec
```

Create and return a `.SubplotSpec` instance.

Parameters
----------
loc : (int, int)
    The position of the subplot in the grid as
    ``(row_index, column_index)``.
rowspan, colspan : int, default: 1
    The number of rows and columns the subplot should span in the grid.

---
## set_width_ratios
```python
from gridspec import set_width_ratios
```

Set the relative widths of the columns.

*width_ratios* must be of length *ncols*. Each column gets a relative
width of ``width_ratios[i] / sum(width_ratios)``.

---
## get_width_ratios
```python
from gridspec import get_width_ratios
```

Return the width ratios.

This is *None* if no width ratios have been set explicitly.

---
## set_height_ratios
```python
from gridspec import set_height_ratios
```

Set the relative heights of the rows.

*height_ratios* must be of length *nrows*. Each row gets a relative
height of ``height_ratios[i] / sum(height_ratios)``.

---
## get_height_ratios
```python
from gridspec import get_height_ratios
```

Return the height ratios.

This is *None* if no height ratios have been set explicitly.

---
## get_grid_positions
```python
from gridspec import get_grid_positions
```

Return the positions of the grid cells in figure coordinates.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The figure the grid should be applied to. The subplot parameters
    (margins and spacing between subplots) are taken from *fig*.

Returns
-------
bottoms, tops, lefts, rights : array
    The bottom, top, left, right positions of the grid cells in
    figure coordinates.

---
## _check_gridspec_exists
```python
from gridspec import _check_gridspec_exists
```

Check if the figure already has a gridspec with these dimensions,
or create a new one

---
## __getitem__
```python
from gridspec import __getitem__
```

Create and return a `.SubplotSpec` instance.

---
## subplots
```python
from gridspec import subplots
```

Add all subplots specified by this `GridSpec` to its parent figure.

See `.Figure.subplots` for detailed documentation.

---
## update
```python
from gridspec import update
```

Update the dimensions of the passed parameters. *None* means unchanged.

---
## locally_modified_subplot_params
```python
from gridspec import locally_modified_subplot_params
```

Return a list of the names of the subplot parameters explicitly set
in the GridSpec.

This is a subset of the attributes of `.SubplotParams`.

---
## tight_layout
```python
from gridspec import tight_layout
```

Adjust subplot parameters to give specified padding.

Parameters
----------
figure : `.Figure`
    The figure.
renderer :  `.RendererBase` subclass, optional
    The renderer to be used.
pad : float
    Padding between the figure edge and the edges of subplots, as a
    fraction of the font-size.
h_pad, w_pad : float, optional
    Padding (height/width) between edges of adjacent subplots.
    Defaults to *pad*.
rect : tuple (left, bottom, right, top), default: None
    (left, bottom, right, top) rectangle in normalized figure
    coordinates that the whole subplots area (including labels) will
    fit into. Default (None) is the whole figure.

---
## get_topmost_subplotspec
```python
from gridspec import get_topmost_subplotspec
```

Return the topmost `SubplotSpec` instance associated with the subplot.

---
## _from_subplot_args
```python
from gridspec import _from_subplot_args
```

Construct a `.SubplotSpec` from a parent `.Figure` and either

- a `.SubplotSpec` -- returned as is;
- one or three numbers -- a MATLAB-style subplot specifier.

---
## num2
```python
from gridspec import num2
```



---
## get_gridspec
```python
from gridspec import get_gridspec
```



---
## rowspan
```python
from gridspec import rowspan
```

The rows spanned by this subplot, as a `range` object.

---
## colspan
```python
from gridspec import colspan
```

The columns spanned by this subplot, as a `range` object.

---
## is_first_row
```python
from gridspec import is_first_row
```



---
## is_last_row
```python
from gridspec import is_last_row
```



---
## is_first_col
```python
from gridspec import is_first_col
```



---
## is_last_col
```python
from gridspec import is_last_col
```



---
## get_position
```python
from gridspec import get_position
```

Update the subplot position from ``figure.subplotpars``.

---
## __eq__
```python
from gridspec import __eq__
```

Two SubplotSpecs are considered equal if they refer to the same
position(s) in the same `GridSpec`.

---
## __hash__
```python
from gridspec import __hash__
```



---
## subgridspec
```python
from gridspec import subgridspec
```

Create a GridSpec within this subplot.

The created `.GridSpecFromSubplotSpec` will have this `SubplotSpec` as
a parent.

Parameters
----------
nrows : int
    Number of rows in grid.

ncols : int
    Number of columns in grid.

Returns
-------
`.GridSpecFromSubplotSpec`

Other Parameters
----------------
**kwargs
    All other parameters are passed to `.GridSpecFromSubplotSpec`.

See Also
--------
matplotlib.pyplot.subplots

Examples
--------
Adding three subplots in the space occupied by a single subplot::

    fig = plt.figure()
    gs0 = fig.add_gridspec(3, 1)
    ax1 = fig.add_subplot(gs0[0])
    ax2 = fig.add_subplot(gs0[1])
    gssub = gs0[2].subgridspec(1, 3)
    for i in range(3):
        fig.add_subplot(gssub[0, i])

---
## _normalize
```python
from gridspec import _normalize
```



---
## __name__
```python
from lines import __name__
```

2D lines with support for a variety of line styles, markers, colors, etc.

---
## _get_dash_pattern
```python
from lines import _get_dash_pattern
```

Convert linestyle to dash pattern.

---
## _get_inverse_dash_pattern
```python
from lines import _get_inverse_dash_pattern
```

Return the inverse of the given dash pattern, for filling the gaps.

---
## _scale_dashes
```python
from lines import _scale_dashes
```



---
## segment_hits
```python
from lines import segment_hits
```

Return the indices of the segments in the polyline with coordinates (*cx*,
*cy*) that are within a distance *radius* of the point (*x*, *y*).

---
## _mark_every_path
```python
from lines import _mark_every_path
```

Helper function that sorts out how to deal the input
`markevery` and returns the points where markers should be drawn.

Takes in the `markevery` value and the line path and returns the
sub-sampled path.

---
## Line2D
```python
from lines import Line2D
```

A line - the line can have both a solid linestyle connecting all
the vertices, and a marker at each vertex.  Additionally, the
drawing of the solid line is influenced by the drawstyle, e.g., one
can create "stepped" lines in various styles.

---
## AxLine
```python
from lines import AxLine
```

A helper class that implements `~.Axes.axline`, by recomputing the artist
transform at draw time.

---
## VertexSelector
```python
from lines import VertexSelector
```

Manage the callbacks to maintain a list of selected vertices for `.Line2D`.
Derived classes should override the `process_selected` method to do
something with the picks.

Here is an example which highlights the selected verts with red circles::

    import numpy as np
    import matplotlib.pyplot as plt
    import matplotlib.lines as lines

    class HighlightSelected(lines.VertexSelector):
        def __init__(self, line, fmt='ro', **kwargs):
            super().__init__(line)
            self.markers, = self.axes.plot([], [], fmt, **kwargs)

        def process_selected(self, ind, xs, ys):
            self.markers.set_data(xs, ys)
            self.canvas.draw()

    fig, ax = plt.subplots()
    x, y = np.random.rand(2, 30)
    line, = ax.plot(x, y, 'bs-', picker=5)

    selector = HighlightSelected(line)
    plt.show()

---
## _slice_or_none
```python
from lines import _slice_or_none
```

Helper function to cope with `codes` being an ndarray or `None`.

---
## __str__
```python
from lines import __str__
```



---
## __init__
```python
from lines import __init__
```

Parameters
----------
line : `~matplotlib.lines.Line2D`
    The line must already have been added to an `~.axes.Axes` and must
    have its picker property set.

---
## contains
```python
from lines import contains
```

Test whether *mouseevent* occurred on the line.

An event is deemed to have occurred "on" the line if it is less
than ``self.pickradius`` (default: 5 points) away from it.  Use
`~.Line2D.get_pickradius` or `~.Line2D.set_pickradius` to get or set
the pick radius.

Parameters
----------
mouseevent : `~matplotlib.backend_bases.MouseEvent`

Returns
-------
contains : bool
    Whether any values are within the radius.
details : dict
    A dictionary ``{'ind': pointlist}``, where *pointlist* is a
    list of points of the line that are within the pickradius around
    the event position.

    TODO: sort returned indices by distance

---
## get_pickradius
```python
from lines import get_pickradius
```

Return the pick radius used for containment tests.

See `.contains` for more details.

---
## set_pickradius
```python
from lines import set_pickradius
```

Set the pick radius used for containment tests.

See `.contains` for more details.

Parameters
----------
pickradius : float
    Pick radius, in points.

---
## get_fillstyle
```python
from lines import get_fillstyle
```

Return the marker fill style.

See also `~.Line2D.set_fillstyle`.

---
## set_fillstyle
```python
from lines import set_fillstyle
```

Set the marker fill style.

Parameters
----------
fs : {'full', 'left', 'right', 'bottom', 'top', 'none'}
    Possible values:

    - 'full': Fill the whole marker with the *markerfacecolor*.
    - 'left', 'right', 'bottom', 'top': Fill the marker half at
      the given side with the *markerfacecolor*. The other
      half of the marker is filled with *markerfacecoloralt*.
    - 'none': No filling.

    For examples see :ref:`marker_fill_styles`.

---
## set_markevery
```python
from lines import set_markevery
```

Set the markevery property to subsample the plot when using markers.

e.g., if ``every=5``, every 5-th marker will be plotted.

Parameters
----------
every : None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool]
    Which markers to plot.

    - ``every=None``: every point will be plotted.
    - ``every=N``: every N-th marker will be plotted starting with
      marker 0.
    - ``every=(start, N)``: every N-th marker, starting at index
      *start*, will be plotted.
    - ``every=slice(start, end, N)``: every N-th marker, starting at
      index *start*, up to but not including index *end*, will be
      plotted.
    - ``every=[i, j, m, ...]``: only markers at the given indices
      will be plotted.
    - ``every=[True, False, True, ...]``: only positions that are True
      will be plotted. The list must have the same length as the data
      points.
    - ``every=0.1``, (i.e. a float): markers will be spaced at
      approximately equal visual distances along the line; the distance
      along the line between markers is determined by multiplying the
      display-coordinate distance of the Axes bounding-box diagonal
      by the value of *every*.
    - ``every=(0.5, 0.1)`` (i.e. a length-2 tuple of float): similar
      to ``every=0.1`` but the first marker will be offset along the
      line by 0.5 multiplied by the
      display-coordinate-diagonal-distance along the line.

    For examples see
    :doc:`/gallery/lines_bars_and_markers/markevery_demo`.

Notes
-----
Setting *markevery* will still only draw markers at actual data points.
While the float argument form aims for uniform visual spacing, it has
to coerce from the ideal spacing to the nearest available data point.
Depending on the number and distribution of data points, the result
may still not look evenly spaced.

When using a start offset to specify the first marker, the offset will
be from the first data point which may be different from the first
the visible data point if the plot is zoomed in.

If zooming in on a plot when using float arguments then the actual
data points that have markers will change because the distance between
markers is always determined from the display-coordinates
axes-bounding-box-diagonal regardless of the actual axes data limits.

---
## get_markevery
```python
from lines import get_markevery
```

Return the markevery setting for marker subsampling.

See also `~.Line2D.set_markevery`.

---
## set_picker
```python
from lines import set_picker
```

Set the event picker details for the line.

Parameters
----------
p : float or callable[[Artist, Event], tuple[bool, dict]]
    If a float, it is used as the pick radius in points.

---
## get_bbox
```python
from lines import get_bbox
```

Get the bounding box of this line.

---
## get_window_extent
```python
from lines import get_window_extent
```



---
## set_data
```python
from lines import set_data
```

Set the x and y data.

Parameters
----------
*args : (2, N) array or two 1D arrays

See Also
--------
set_xdata
set_ydata

---
## recache_always
```python
from lines import recache_always
```



---
## recache
```python
from lines import recache
```



---
## _transform_path
```python
from lines import _transform_path
```

Put a TransformedPath instance at self._transformed_path;
all invalidation of the transform is then handled by the
TransformedPath instance.

---
## _get_transformed_path
```python
from lines import _get_transformed_path
```

Return this line's `~matplotlib.transforms.TransformedPath`.

---
## set_transform
```python
from lines import set_transform
```



---
## draw
```python
from lines import draw
```



---
## get_antialiased
```python
from lines import get_antialiased
```

Return whether antialiased rendering is used.

---
## get_color
```python
from lines import get_color
```

Return the line color.

See also `~.Line2D.set_color`.

---
## get_drawstyle
```python
from lines import get_drawstyle
```

Return the drawstyle.

See also `~.Line2D.set_drawstyle`.

---
## get_gapcolor
```python
from lines import get_gapcolor
```

Return the line gapcolor.

See also `~.Line2D.set_gapcolor`.

---
## get_linestyle
```python
from lines import get_linestyle
```

Return the linestyle.

See also `~.Line2D.set_linestyle`.

---
## get_linewidth
```python
from lines import get_linewidth
```

Return the linewidth in points.

See also `~.Line2D.set_linewidth`.

---
## get_marker
```python
from lines import get_marker
```

Return the line marker.

See also `~.Line2D.set_marker`.

---
## get_markeredgecolor
```python
from lines import get_markeredgecolor
```

Return the marker edge color.

See also `~.Line2D.set_markeredgecolor`.

---
## get_markeredgewidth
```python
from lines import get_markeredgewidth
```

Return the marker edge width in points.

See also `~.Line2D.set_markeredgewidth`.

---
## _get_markerfacecolor
```python
from lines import _get_markerfacecolor
```



---
## get_markerfacecolor
```python
from lines import get_markerfacecolor
```

Return the marker face color.

See also `~.Line2D.set_markerfacecolor`.

---
## get_markerfacecoloralt
```python
from lines import get_markerfacecoloralt
```

Return the alternate marker face color.

See also `~.Line2D.set_markerfacecoloralt`.

---
## get_markersize
```python
from lines import get_markersize
```

Return the marker size in points.

See also `~.Line2D.set_markersize`.

---
## get_data
```python
from lines import get_data
```

Return the line data as an ``(xdata, ydata)`` pair.

If *orig* is *True*, return the original data.

---
## get_xdata
```python
from lines import get_xdata
```

Return the xdata.

If *orig* is *True*, return the original data, else the
processed data.

---
## get_ydata
```python
from lines import get_ydata
```

Return the ydata.

If *orig* is *True*, return the original data, else the
processed data.

---
## get_path
```python
from lines import get_path
```

Return the `~matplotlib.path.Path` associated with this line.

---
## get_xydata
```python
from lines import get_xydata
```

Return the *xy* data as a (N, 2) array.

---
## set_antialiased
```python
from lines import set_antialiased
```

Set whether to use antialiased rendering.

Parameters
----------
b : bool

---
## set_color
```python
from lines import set_color
```

Set the color of the line.

Parameters
----------
color : :mpltype:`color`

---
## set_drawstyle
```python
from lines import set_drawstyle
```

Set the drawstyle of the plot.

The drawstyle determines how the points are connected.

Parameters
----------
drawstyle : {'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default'
    For 'default', the points are connected with straight lines.

    The steps variants connect the points with step-like lines,
    i.e. horizontal lines with vertical steps. They differ in the
    location of the step:

    - 'steps-pre': The step is at the beginning of the line segment,
      i.e. the line will be at the y-value of point to the right.
    - 'steps-mid': The step is halfway between the points.
    - 'steps-post: The step is at the end of the line segment,
      i.e. the line will be at the y-value of the point to the left.
    - 'steps' is equal to 'steps-pre' and is maintained for
      backward-compatibility.

    For examples see :doc:`/gallery/lines_bars_and_markers/step_demo`.

---
## set_gapcolor
```python
from lines import set_gapcolor
```

Set a color to fill the gaps in the dashed line style.

.. note::

    Striped lines are created by drawing two interleaved dashed lines.
    There can be overlaps between those two, which may result in
    artifacts when using transparency.

    This functionality is experimental and may change.

Parameters
----------
gapcolor : :mpltype:`color` or None
    The color with which to fill the gaps. If None, the gaps are
    unfilled.

---
## set_linewidth
```python
from lines import set_linewidth
```

Set the line width in points.

Parameters
----------
w : float
    Line width, in points.

---
## set_linestyle
```python
from lines import set_linestyle
```

Set the linestyle of the line.

Parameters
----------
ls : {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
    Possible values:

    - A string:

      ==========================================  =================
      linestyle                                   description
      ==========================================  =================
      ``'-'`` or ``'solid'``                      solid line
      ``'--'`` or  ``'dashed'``                   dashed line
      ``'-.'`` or  ``'dashdot'``                  dash-dotted line
      ``':'`` or ``'dotted'``                     dotted line
      ``'none'``, ``'None'``, ``' '``, or ``''``  draw nothing
      ==========================================  =================

    - Alternatively a dash tuple of the following form can be
      provided::

          (offset, onoffseq)

      where ``onoffseq`` is an even length tuple of on and off ink
      in points. See also :meth:`set_dashes`.

    For examples see :doc:`/gallery/lines_bars_and_markers/linestyles`.

---
## set_marker
```python
from lines import set_marker
```

Set the line marker.

Parameters
----------
marker : marker style string, `~.path.Path` or `~.markers.MarkerStyle`
    See `~matplotlib.markers` for full description of possible
    arguments.

---
## _set_markercolor
```python
from lines import _set_markercolor
```



---
## set_markeredgecolor
```python
from lines import set_markeredgecolor
```

Set the marker edge color.

Parameters
----------
ec : :mpltype:`color`

---
## set_markerfacecolor
```python
from lines import set_markerfacecolor
```

Set the marker face color.

Parameters
----------
fc : :mpltype:`color`

---
## set_markerfacecoloralt
```python
from lines import set_markerfacecoloralt
```

Set the alternate marker face color.

Parameters
----------
fc : :mpltype:`color`

---
## set_markeredgewidth
```python
from lines import set_markeredgewidth
```

Set the marker edge width in points.

Parameters
----------
ew : float
     Marker edge width, in points.

---
## set_markersize
```python
from lines import set_markersize
```

Set the marker size in points.

Parameters
----------
sz : float
     Marker size, in points.

---
## set_xdata
```python
from lines import set_xdata
```

Set the data array for x.

Parameters
----------
x : 1D array

See Also
--------
set_data
set_ydata

---
## set_ydata
```python
from lines import set_ydata
```

Set the data array for y.

Parameters
----------
y : 1D array

See Also
--------
set_data
set_xdata

---
## set_dashes
```python
from lines import set_dashes
```

Set the dash sequence.

The dash sequence is a sequence of floats of even length describing
the length of dashes and spaces in points.

For example, (5, 2, 1, 2) describes a sequence of 5 point and 1 point
dashes separated by 2 point spaces.

See also `~.Line2D.set_gapcolor`, which allows those spaces to be
filled with a color.

Parameters
----------
seq : sequence of floats (on/off ink in points) or (None, None)
    If *seq* is empty or ``(None, None)``, the linestyle will be set
    to solid.

---
## update_from
```python
from lines import update_from
```

Copy properties from *other* to self.

---
## set_dash_joinstyle
```python
from lines import set_dash_joinstyle
```

How to join segments of the line if it `~Line2D.is_dashed`.

The default joinstyle is :rc:`lines.dash_joinstyle`.

Parameters
----------
s : `.JoinStyle` or %(JoinStyle)s

---
## set_solid_joinstyle
```python
from lines import set_solid_joinstyle
```

How to join segments if the line is solid (not `~Line2D.is_dashed`).

The default joinstyle is :rc:`lines.solid_joinstyle`.

Parameters
----------
s : `.JoinStyle` or %(JoinStyle)s

---
## get_dash_joinstyle
```python
from lines import get_dash_joinstyle
```

Return the `.JoinStyle` for dashed lines.

See also `~.Line2D.set_dash_joinstyle`.

---
## get_solid_joinstyle
```python
from lines import get_solid_joinstyle
```

Return the `.JoinStyle` for solid lines.

See also `~.Line2D.set_solid_joinstyle`.

---
## set_dash_capstyle
```python
from lines import set_dash_capstyle
```

How to draw the end caps if the line is `~Line2D.is_dashed`.

The default capstyle is :rc:`lines.dash_capstyle`.

Parameters
----------
s : `.CapStyle` or %(CapStyle)s

---
## set_solid_capstyle
```python
from lines import set_solid_capstyle
```

How to draw the end caps if the line is solid (not `~Line2D.is_dashed`)

The default capstyle is :rc:`lines.solid_capstyle`.

Parameters
----------
s : `.CapStyle` or %(CapStyle)s

---
## get_dash_capstyle
```python
from lines import get_dash_capstyle
```

Return the `.CapStyle` for dashed lines.

See also `~.Line2D.set_dash_capstyle`.

---
## get_solid_capstyle
```python
from lines import get_solid_capstyle
```

Return the `.CapStyle` for solid lines.

See also `~.Line2D.set_solid_capstyle`.

---
## is_dashed
```python
from lines import is_dashed
```

Return whether line has a dashed linestyle.

A custom linestyle is assumed to be dashed, we do not inspect the
``onoffseq`` directly.

See also `~.Line2D.set_linestyle`.

---
## get_transform
```python
from lines import get_transform
```



---
## get_xy1
```python
from lines import get_xy1
```

Return the *xy1* value of the line.

---
## get_xy2
```python
from lines import get_xy2
```

Return the *xy2* value of the line.

---
## get_slope
```python
from lines import get_slope
```

Return the *slope* value of the line.

---
## set_xy1
```python
from lines import set_xy1
```

Set the *xy1* value of the line.

Parameters
----------
x, y : float
    Points for the line to pass through.

---
## set_xy2
```python
from lines import set_xy2
```

Set the *xy2* value of the line.

Parameters
----------
x, y : float
    Points for the line to pass through.

---
## set_slope
```python
from lines import set_slope
```

Set the *slope* value of the line.

Parameters
----------
slope : float
    The slope of the line.

---
## process_selected
```python
from lines import process_selected
```

Default "do nothing" implementation of the `process_selected` method.

Parameters
----------
ind : list of int
    The indices of the selected vertices.
xs, ys : array-like
    The coordinates of the selected vertices.

---
## onpick
```python
from lines import onpick
```

When the line is picked, update the set of selected indices.

---
## __name__
```python
from widgets import __name__
```

========================
Widget testing utilities
========================

See also :mod:`matplotlib.tests.test_widgets`.

---
## LockDraw
```python
from widgets import LockDraw
```

Some widgets, like the cursor, draw onto the canvas, and this is not
desirable under all circumstances, like when the toolbar is in zoom-to-rect
mode and drawing a rectangle.  To avoid this, a widget can acquire a
canvas' lock with ``canvas.widgetlock(widget)`` before drawing on the
canvas; this will prevent other widgets from doing so at the same time (if
they also try to acquire the lock first).

---
## Widget
```python
from widgets import Widget
```

Abstract base class for GUI neutral widgets.

---
## AxesWidget
```python
from widgets import AxesWidget
```

Widget connected to a single `~matplotlib.axes.Axes`.

To guarantee that the widget remains responsive and not garbage-collected,
a reference to the object should be maintained by the user.

This is necessary because the callback registry
maintains only weak-refs to the functions, which are member
functions of the widget.  If there are no references to the widget
object it may be garbage collected which will disconnect the callbacks.

Attributes
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
canvas : `~matplotlib.backend_bases.FigureCanvasBase`
    The parent figure canvas for the widget.
active : bool
    If False, the widget does not respond to events.

---
## Button
```python
from widgets import Button
```

A GUI neutral button.

For the button to remain responsive you must keep a reference to it.
Call `.on_clicked` to connect to the button.

Attributes
----------
ax
    The `~.axes.Axes` the button renders into.
label
    A `.Text` instance.
color
    The color of the button when not hovering.
hovercolor
    The color of the button when hovering.

---
## SliderBase
```python
from widgets import SliderBase
```

The base class for constructing Slider widgets. Not intended for direct
usage.

For the slider to remain responsive you must maintain a reference to it.

---
## Slider
```python
from widgets import Slider
```

A slider representing a floating point range.

Create a slider from *valmin* to *valmax* in Axes *ax*. For the slider to
remain responsive you must maintain a reference to it. Call
:meth:`on_changed` to connect to the slider event.

Attributes
----------
val : float
    Slider value.

---
## RangeSlider
```python
from widgets import RangeSlider
```

A slider representing a range of floating point values. Defines the min and
max of the range via the *val* attribute as a tuple of (min, max).

Create a slider that defines a range contained within [*valmin*, *valmax*]
in Axes *ax*. For the slider to remain responsive you must maintain a
reference to it. Call :meth:`on_changed` to connect to the slider event.

Attributes
----------
val : tuple of float
    Slider value.

---
## _expand_text_props
```python
from widgets import _expand_text_props
```



---
## CheckButtons
```python
from widgets import CheckButtons
```

A GUI neutral set of check buttons.

For the check buttons to remain responsive you must keep a
reference to this object.

Connect to the CheckButtons with the `.on_clicked` method.

Attributes
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
labels : list of `~matplotlib.text.Text`
    The text label objects of the check buttons.

---
## TextBox
```python
from widgets import TextBox
```

A GUI neutral text input box.

For the text box to remain responsive you must keep a reference to it.

Call `.on_text_change` to be updated whenever the text changes.

Call `.on_submit` to be updated whenever the user hits enter or
leaves the text entry field.

Attributes
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
label : `~matplotlib.text.Text`

color : :mpltype:`color`
    The color of the text box when not hovering.
hovercolor : :mpltype:`color`
    The color of the text box when hovering.

---
## RadioButtons
```python
from widgets import RadioButtons
```

A GUI neutral radio button.

For the buttons to remain responsive you must keep a reference to this
object.

Connect to the RadioButtons with the `.on_clicked` method.

Attributes
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
activecolor : :mpltype:`color`
    The color of the selected button.
labels : list of `.Text`
    The button labels.
value_selected : str
    The label text of the currently selected button.
index_selected : int
    The index of the selected button.

---
## SubplotTool
```python
from widgets import SubplotTool
```

A tool to adjust the subplot params of a `.Figure`.

---
## Cursor
```python
from widgets import Cursor
```

A crosshair cursor that spans the Axes and moves with mouse cursor.

For the cursor to remain responsive you must keep a reference to it.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The `~.axes.Axes` to attach the cursor to.
horizOn : bool, default: True
    Whether to draw the horizontal line.
vertOn : bool, default: True
    Whether to draw the vertical line.
useblit : bool, default: False
    Use blitting for faster drawing if supported by the backend.
    See the tutorial :ref:`blitting` for details.

Other Parameters
----------------
**lineprops
    `.Line2D` properties that control the appearance of the lines.
    See also `~.Axes.axhline`.

Examples
--------
See :doc:`/gallery/widgets/cursor`.

---
## MultiCursor
```python
from widgets import MultiCursor
```

Provide a vertical (default) and/or horizontal line cursor shared between
multiple Axes.

For the cursor to remain responsive you must keep a reference to it.

Parameters
----------
canvas : object
    This parameter is entirely unused and only kept for back-compatibility.

axes : list of `~matplotlib.axes.Axes`
    The `~.axes.Axes` to attach the cursor to.

useblit : bool, default: True
    Use blitting for faster drawing if supported by the backend.
    See the tutorial :ref:`blitting`
    for details.

horizOn : bool, default: False
    Whether to draw the horizontal line.

vertOn : bool, default: True
    Whether to draw the vertical line.

Other Parameters
----------------
**lineprops
    `.Line2D` properties that control the appearance of the lines.
    See also `~.Axes.axhline`.

Examples
--------
See :doc:`/gallery/widgets/multicursor`.

---
## _SelectorWidget
```python
from widgets import _SelectorWidget
```



---
## SpanSelector
```python
from widgets import SpanSelector
```

Visually select a min/max range on a single axis and call a function with
those values.

To guarantee that the selector remains responsive, keep a reference to it.

In order to turn off the SpanSelector, set ``span_selector.active`` to
False.  To turn it back on, set it to True.

Press and release events triggered at the same coordinates outside the
selection will clear the selector, except when
``ignore_event_outside=True``.

Parameters
----------
ax : `~matplotlib.axes.Axes`

onselect : callable with signature ``func(min: float, max: float)``
    A callback function that is called after a release event and the
    selection is created, changed or removed.

direction : {"horizontal", "vertical"}
    The direction along which to draw the span selector.

minspan : float, default: 0
    If selection is less than or equal to *minspan*, the selection is
    removed (when already existing) or cancelled.

useblit : bool, default: False
    If True, use the backend-dependent blitting features for faster
    canvas updates. See the tutorial :ref:`blitting` for details.

props : dict, default: {'facecolor': 'red', 'alpha': 0.5}
    Dictionary of `.Patch` properties.

onmove_callback : callable with signature ``func(min: float, max: float)``, optional
    Called on mouse move while the span is being selected.

interactive : bool, default: False
    Whether to draw a set of handles that allow interaction with the
    widget after it is drawn.

button : `.MouseButton` or list of `.MouseButton`, default: all buttons
    The mouse buttons which activate the span selector.

handle_props : dict, default: None
    Properties of the handle lines at the edges of the span. Only used
    when *interactive* is True. See `.Line2D` for valid properties.

grab_range : float, default: 10
    Distance in pixels within which the interactive tool handles can be activated.

state_modifier_keys : dict, optional
    Keyboard modifiers which affect the widget's behavior.  Values
    amend the defaults, which are:

    - "clear": Clear the current shape, default: "escape".

drag_from_anywhere : bool, default: False
    If `True`, the widget can be moved by clicking anywhere within its bounds.

ignore_event_outside : bool, default: False
    If `True`, the event triggered outside the span selector will be ignored.

snap_values : 1D array-like, optional
    Snap the selector edges to the given values.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> import matplotlib.widgets as mwidgets
>>> fig, ax = plt.subplots()
>>> ax.plot([1, 2, 3], [10, 50, 100])
>>> def onselect(vmin, vmax):
...     print(vmin, vmax)
>>> span = mwidgets.SpanSelector(ax, onselect, 'horizontal',
...                              props=dict(facecolor='blue', alpha=0.5))
>>> fig.show()

See also: :doc:`/gallery/widgets/span_selector`

---
## ToolLineHandles
```python
from widgets import ToolLineHandles
```

Control handles for canvas tools.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    Matplotlib Axes where tool handles are displayed.
positions : 1D array
    Positions of handles in data coordinates.
direction : {"horizontal", "vertical"}
    Direction of handles, either 'vertical' or 'horizontal'
line_props : dict, optional
    Additional line properties. See `.Line2D`.
useblit : bool, default: True
    Whether to use blitting for faster drawing (if supported by the
    backend). See the tutorial :ref:`blitting`
    for details.

---
## ToolHandles
```python
from widgets import ToolHandles
```

Control handles for canvas tools.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    Matplotlib Axes where tool handles are displayed.
x, y : 1D arrays
    Coordinates of control handles.
marker : str, default: 'o'
    Shape of marker used to display handle. See `~.pyplot.plot`.
marker_props : dict, optional
    Additional marker properties. See `.Line2D`.
useblit : bool, default: True
    Whether to use blitting for faster drawing (if supported by the
    backend). See the tutorial :ref:`blitting`
    for details.

---
## RectangleSelector
```python
from widgets import RectangleSelector
```

Select a rectangular region of an Axes.

For the cursor to remain responsive you must keep a reference to it.

Press and release events triggered at the same coordinates outside the
selection will clear the selector, except when
``ignore_event_outside=True``.

%s

Examples
--------
>>> import matplotlib.pyplot as plt
>>> import matplotlib.widgets as mwidgets
>>> fig, ax = plt.subplots()
>>> ax.plot([1, 2, 3], [10, 50, 100])
>>> def onselect(eclick, erelease):
...     print(eclick.xdata, eclick.ydata)
...     print(erelease.xdata, erelease.ydata)
>>> props = dict(facecolor='blue', alpha=0.5)
>>> rect = mwidgets.RectangleSelector(ax, onselect, interactive=True,
...                                   props=props)
>>> fig.show()
>>> rect.add_state('square')

See also: :doc:`/gallery/widgets/rectangle_selector`

---
## EllipseSelector
```python
from widgets import EllipseSelector
```

Select an elliptical region of an Axes.

For the cursor to remain responsive you must keep a reference to it.

Press and release events triggered at the same coordinates outside the
selection will clear the selector, except when
``ignore_event_outside=True``.

%s

Examples
--------
:doc:`/gallery/widgets/rectangle_selector`

---
## LassoSelector
```python
from widgets import LassoSelector
```

Selection curve of an arbitrary shape.

For the selector to remain responsive you must keep a reference to it.

The selected path can be used in conjunction with `~.Path.contains_point`
to select data points from an image.

In contrast to `Lasso`, `LassoSelector` is written with an interface
similar to `RectangleSelector` and `SpanSelector`, and will continue to
interact with the Axes until disconnected.

Example usage::

    ax = plt.subplot()
    ax.plot(x, y)

    def onselect(verts):
        print(verts)
    lasso = LassoSelector(ax, onselect)

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
onselect : function
    Whenever the lasso is released, the *onselect* function is called and
    passed the vertices of the selected path.
useblit : bool, default: True
    Whether to use blitting for faster drawing (if supported by the
    backend). See the tutorial :ref:`blitting`
    for details.
props : dict, optional
    Properties with which the line is drawn, see `.Line2D`
    for valid properties. Default values are defined in ``mpl.rcParams``.
button : `.MouseButton` or list of `.MouseButton`, optional
    The mouse buttons used for rectangle selection.  Default is ``None``,
    which corresponds to all buttons.

---
## PolygonSelector
```python
from widgets import PolygonSelector
```

Select a polygon region of an Axes.

Place vertices with each mouse click, and make the selection by completing
the polygon (clicking on the first vertex). Once drawn individual vertices
can be moved by clicking and dragging with the left mouse button, or
removed by clicking the right mouse button.

In addition, the following modifier keys can be used:

- Hold *ctrl* and click and drag a vertex to reposition it before the
  polygon has been completed.
- Hold the *shift* key and click and drag anywhere in the Axes to move
  all vertices.
- Press the *esc* key to start a new polygon.

For the selector to remain responsive you must keep a reference to it.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.

onselect : function
    When a polygon is completed or modified after completion,
    the *onselect* function is called and passed a list of the vertices as
    ``(xdata, ydata)`` tuples.

useblit : bool, default: False
    Whether to use blitting for faster drawing (if supported by the
    backend). See the tutorial :ref:`blitting`
    for details.

props : dict, optional
    Properties with which the line is drawn, see `.Line2D` for valid properties.
    Default::

        dict(color='k', linestyle='-', linewidth=2, alpha=0.5)

handle_props : dict, optional
    Artist properties for the markers drawn at the vertices of the polygon.
    See the marker arguments in `.Line2D` for valid
    properties.  Default values are defined in ``mpl.rcParams`` except for
    the default value of ``markeredgecolor`` which will be the same as the
    ``color`` property in *props*.

grab_range : float, default: 10
    A vertex is selected (to complete the polygon or to move a vertex) if
    the mouse click is within *grab_range* pixels of the vertex.

draw_bounding_box : bool, optional
    If `True`, a bounding box will be drawn around the polygon selector
    once it is complete. This box can be used to move and resize the
    selector.

box_handle_props : dict, optional
    Properties to set for the box handles. See the documentation for the
    *handle_props* argument to `RectangleSelector` for more info.

box_props : dict, optional
    Properties to set for the box. See the documentation for the *props*
    argument to `RectangleSelector` for more info.

Examples
--------
:doc:`/gallery/widgets/polygon_selector_simple`
:doc:`/gallery/widgets/polygon_selector_demo`

Notes
-----
If only one point remains after removing points, the selector reverts to an
incomplete state and you can start drawing a new polygon from the existing
point.

---
## Lasso
```python
from widgets import Lasso
```

Selection curve of an arbitrary shape.

The selected path can be used in conjunction with
`~matplotlib.path.Path.contains_point` to select data points from an image.

Unlike `LassoSelector`, this must be initialized with a starting
point *xy*, and the `Lasso` events are destroyed upon release.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The parent Axes for the widget.
xy : (float, float)
    Coordinates of the start of the lasso.
callback : callable
    Whenever the lasso is released, the *callback* function is called and
    passed the vertices of the selected path.
useblit : bool, default: True
    Whether to use blitting for faster drawing (if supported by the
    backend). See the tutorial :ref:`blitting`
    for details.
props: dict, optional
    Lasso line properties. See `.Line2D` for valid properties.
    Default *props* are::

        {'linestyle' : '-', 'color' : 'black', 'lw' : 2}

    .. versionadded:: 3.9

---
## __init__
```python
from widgets import __init__
```



---
## __call__
```python
from widgets import __call__
```

Reserve the lock for *o*.

---
## release
```python
from widgets import release
```

Button release event handler and validator.

---
## available
```python
from widgets import available
```

Return whether drawing is available to *o*.

---
## isowner
```python
from widgets import isowner
```

Return whether *o* owns this lock.

---
## locked
```python
from widgets import locked
```

Return whether the lock is currently held by an owner.

---
## set_active
```python
from widgets import set_active
```



---
## get_active
```python
from widgets import get_active
```

Get whether the widget is active.

---
## ignore
```python
from widgets import ignore
```



---
## connect_event
```python
from widgets import connect_event
```

Connect a callback function with an event.

This should be used in lieu of ``figure.canvas.mpl_connect`` since this
function stores callback ids for later clean up.

---
## disconnect_events
```python
from widgets import disconnect_events
```

Disconnect all events created by this widget.

---
## _get_data_coords
```python
from widgets import _get_data_coords
```

Return *event*'s data coordinates in this widget's Axes.

---
## _click
```python
from widgets import _click
```



---
## _release
```python
from widgets import _release
```

Button release event handler.

---
## _motion
```python
from widgets import _motion
```



---
## on_clicked
```python
from widgets import on_clicked
```

Connect the callback function *func* to button click events.

Parameters
----------
func : callable
    When the button is clicked, call *func* with button label.
    When all buttons are cleared, call *func* with None.
    The callback func must have the signature::

        def func(label: str | None) -> Any

    Return values may exist, but are ignored.

Returns
-------
A connection id, which can be used to disconnect the callback.

---
## disconnect
```python
from widgets import disconnect
```

Disconnect events.

---
## _stepped_value
```python
from widgets import _stepped_value
```

Return *val* coerced to closest number in the ``valstep`` grid.

---
## reset
```python
from widgets import reset
```

Reset the slider to the initial value.

---
## _value_in_bounds
```python
from widgets import _value_in_bounds
```

Clip min, max values to the bounds.

---
## _update
```python
from widgets import _update
```

Update the slider position.

---
## _format
```python
from widgets import _format
```

Pretty-print *val*.

---
## set_val
```python
from widgets import set_val
```



---
## on_changed
```python
from widgets import on_changed
```

Connect *func* as callback function to changes of the slider value.

Parameters
----------
func : callable
    Function to call when slider is changed. The function
    must accept a 2-tuple of floats as its argument.

Returns
-------
int
    Connection id (which can be used to disconnect *func*).

---
## _update_selection_poly
```python
from widgets import _update_selection_poly
```

Update the vertices of the *self.poly* slider in-place
to cover the data range *vmin*, *vmax*.

---
## _min_in_bounds
```python
from widgets import _min_in_bounds
```

Ensure the new min value is between valmin and self.val[1].

---
## _max_in_bounds
```python
from widgets import _max_in_bounds
```

Ensure the new max value is between valmax and self.val[0].

---
## _update_val_from_pos
```python
from widgets import _update_val_from_pos
```

Update the slider value based on a given position.

---
## set_min
```python
from widgets import set_min
```

Set the lower value of the slider to *min*.

Parameters
----------
min : float

---
## set_max
```python
from widgets import set_max
```

Set the lower value of the slider to *max*.

Parameters
----------
max : float

---
## _clear
```python
from widgets import _clear
```

Internal event handler to clear the buttons.

---
## _clicked
```python
from widgets import _clicked
```



---
## set_label_props
```python
from widgets import set_label_props
```

Set properties of the `.Text` labels.

.. versionadded:: 3.7

Parameters
----------
props : dict
    Dictionary of `.Text` properties to be used for the labels.

---
## set_frame_props
```python
from widgets import set_frame_props
```

Set properties of the check button frames.

.. versionadded:: 3.7

Parameters
----------
props : dict
    Dictionary of `.Collection` properties to be used for the check
    button frames.

---
## set_check_props
```python
from widgets import set_check_props
```

Set properties of the check button checks.

.. versionadded:: 3.7

Parameters
----------
props : dict
    Dictionary of `.Collection` properties to be used for the check
    button check.

---
## _init_status
```python
from widgets import _init_status
```

Initialize properties to match active status.

The user may have passed custom colours in *check_props* to the
constructor, or to `.set_check_props`, so we need to modify the
visibility after getting whatever the user set.

---
## clear
```python
from widgets import clear
```

Clear the selection and set the selector ready to make a new one.

---
## get_status
```python
from widgets import get_status
```

Return a list of the status (True/False) of all of the check buttons.

---
## get_checked_labels
```python
from widgets import get_checked_labels
```

Return a list of labels currently checked by user.

---
## text
```python
from widgets import text
```



---
## _rendercursor
```python
from widgets import _rendercursor
```



---
## _keypress
```python
from widgets import _keypress
```



---
## begin_typing
```python
from widgets import begin_typing
```



---
## stop_typing
```python
from widgets import stop_typing
```



---
## _resize
```python
from widgets import _resize
```



---
## on_text_change
```python
from widgets import on_text_change
```

When the text changes, call this *func* with event.

A connection id is returned which can be used to disconnect.

---
## on_submit
```python
from widgets import on_submit
```

When the user hits enter or leaves the submission box, call this
*func* with event.

A connection id is returned which can be used to disconnect.

---
## set_radio_props
```python
from widgets import set_radio_props
```

Set properties of the `.Text` labels.

.. versionadded:: 3.7

Parameters
----------
props : dict
    Dictionary of `.Collection` properties to be used for the radio
    buttons.

---
## activecolor
```python
from widgets import activecolor
```



---
## _on_slider_changed
```python
from widgets import _on_slider_changed
```



---
## _on_reset
```python
from widgets import _on_reset
```



---
## onmove
```python
from widgets import onmove
```



---
## connect
```python
from widgets import connect
```

Connect events.

---
## _get_animated_artists
```python
from widgets import _get_animated_artists
```

Convenience method to get all animated artists of the figure containing
this widget, excluding those already present in self.artists.
The returned tuple is not sorted by 'z_order': z_order sorting is
valid only when considering all artists and not only a subset of all
artists.

---
## update_background
```python
from widgets import update_background
```

Force an update of the background.

---
## connect_default_events
```python
from widgets import connect_default_events
```



---
## update
```python
from widgets import update
```

Draw using blit() or draw_idle(), depending on ``self.useblit``.

---
## _get_data
```python
from widgets import _get_data
```

Get the xdata and ydata for event, with limits.

---
## _clean_event
```python
from widgets import _clean_event
```

Preprocess an event:

- Replace *event* by the previous event if *event* has no ``xdata``.
- Get ``xdata`` and ``ydata`` from this widget's Axes, and clip them to the axes
  limits.
- Update the previous event.

---
## press
```python
from widgets import press
```

Button press handler and validator.

---
## _press
```python
from widgets import _press
```

Button press event handler.

---
## _onmove
```python
from widgets import _onmove
```

Cursor move event handler.

---
## on_scroll
```python
from widgets import on_scroll
```

Mouse scroll event handler and validator.

---
## _on_scroll
```python
from widgets import _on_scroll
```

Mouse scroll event handler.

---
## on_key_press
```python
from widgets import on_key_press
```

Key press event handler and validator for all selection widgets.

---
## _on_key_press
```python
from widgets import _on_key_press
```

Key press event handler.

---
## on_key_release
```python
from widgets import on_key_release
```

Key release event handler and validator.

---
## _on_key_release
```python
from widgets import _on_key_release
```

Key release event handler.

---
## set_visible
```python
from widgets import set_visible
```



---
## get_visible
```python
from widgets import get_visible
```

Get the visibility of the selector artists.

---
## visible
```python
from widgets import visible
```



---
## _clear_without_update
```python
from widgets import _clear_without_update
```



---
## artists
```python
from widgets import artists
```



---
## set_props
```python
from widgets import set_props
```

Set the properties of the selector artist.

See the *props* argument in the selector docstring to know which properties are
supported.

---
## set_handle_props
```python
from widgets import set_handle_props
```

Set the properties of the handles selector artist. See the
`handle_props` argument in the selector docstring to know which
properties are supported.

---
## _validate_state
```python
from widgets import _validate_state
```



---
## add_state
```python
from widgets import add_state
```

Add a state to define the widget's behavior. See the
`state_modifier_keys` parameters for details.

Parameters
----------
state : str
    Must be a supported state of the selector. See the
    `state_modifier_keys` parameters for details.

Raises
------
ValueError
    When the state is not supported by the selector.

---
## remove_state
```python
from widgets import remove_state
```

Remove a state to define the widget's behavior. See the
`state_modifier_keys` parameters for details.

Parameters
----------
state : str
    Must be a supported state of the selector. See the
    `state_modifier_keys` parameters for details.

Raises
------
ValueError
    When the state is not supported by the selector.

---
## new_axes
```python
from widgets import new_axes
```

Set SpanSelector to operate on a new Axes.

---
## _setup_edge_handles
```python
from widgets import _setup_edge_handles
```



---
## _handles_artists
```python
from widgets import _handles_artists
```



---
## _set_cursor
```python
from widgets import _set_cursor
```

Update the canvas cursor based on direction of the selector.

---
## direction
```python
from widgets import direction
```

Direction of the handle: 'vertical' or 'horizontal'.

---
## _hover
```python
from widgets import _hover
```

Update the canvas cursor if it's over a handle.

---
## _draw_shape
```python
from widgets import _draw_shape
```



---
## _set_active_handle
```python
from widgets import _set_active_handle
```

Set active handle based on the location of the mouse event.

---
## _contains
```python
from widgets import _contains
```

Return True if event is within the patch.

---
## _snap
```python
from widgets import _snap
```

Snap values to a given array values (snap_values).

---
## extents
```python
from widgets import extents
```



---
## _set_extents
```python
from widgets import _set_extents
```



---
## positions
```python
from widgets import positions
```

Positions of the handle in data coordinates.

---
## set_data
```python
from widgets import set_data
```

Set x and y positions of handles.

---
## set_animated
```python
from widgets import set_animated
```



---
## remove
```python
from widgets import remove
```

Remove the handles artist from the figure.

---
## closest
```python
from widgets import closest
```

Return index and pixel distance to closest index.

---
## x
```python
from widgets import x
```



---
## y
```python
from widgets import y
```



---
## _init_shape
```python
from widgets import _init_shape
```



---
## _rect_bbox
```python
from widgets import _rect_bbox
```



---
## _set_aspect_ratio_correction
```python
from widgets import _set_aspect_ratio_correction
```



---
## _get_rotation_transform
```python
from widgets import _get_rotation_transform
```



---
## corners
```python
from widgets import corners
```

Corners of rectangle in data coordinates from lower left,
moving clockwise.

---
## edge_centers
```python
from widgets import edge_centers
```

Midpoint of rectangle edges in data coordinates from left,
moving anti-clockwise.

---
## center
```python
from widgets import center
```

Center of rectangle in data coordinates.

---
## rotation
```python
from widgets import rotation
```



---
## geometry
```python
from widgets import geometry
```

Return an array of shape (2, 5) containing the
x (``RectangleSelector.geometry[1, :]``) and
y (``RectangleSelector.geometry[0, :]``) data coordinates of the four
corners of the rectangle starting and ending in the top left corner.

---
## _get_bbox
```python
from widgets import _get_bbox
```



---
## _add_box
```python
from widgets import _add_box
```



---
## _remove_box
```python
from widgets import _remove_box
```



---
## _update_box
```python
from widgets import _update_box
```



---
## _scale_polygon
```python
from widgets import _scale_polygon
```

Scale the polygon selector points when the bounding box is moved or
scaled.

This is set as a callback on the bounding box RectangleSelector.

---
## _remove_vertex
```python
from widgets import _remove_vertex
```

Remove vertex with index i.

---
## _draw_polygon_without_update
```python
from widgets import _draw_polygon_without_update
```

Redraw the polygon based on new vertex positions, no update().

---
## _draw_polygon
```python
from widgets import _draw_polygon
```

Redraw the polygon based on the new vertex positions.

---
## verts
```python
from widgets import verts
```

Set the polygon vertices.

This will remove any preexisting vertices, creating a complete polygon
with the new vertices.

---
## onrelease
```python
from widgets import onrelease
```



---
## __name__
```python
from dviread import __name__
```

A module for reading dvi files output by TeX. Several limitations make
this not (currently) useful as a general-purpose dvi preprocessor, but
it is currently used by the pdf backend for processing usetex text.

Interface::

  with Dvi(filename, 72) as dvi:
      # iterate over pages:
      for page in dvi:
          w, h, d = page.width, page.height, page.descent
          for x, y, font, glyph, width in page.text:
              fontname = font.texname
              pointsize = font.size
              ...
          for x, y, height, width in page.boxes:
              ...

---
## Text
```python
from dviread import Text
```

A glyph in the dvi file.

The *x* and *y* attributes directly position the glyph.  The *font*,
*glyph*, and *width* attributes are kept public for back-compatibility,
but users wanting to draw the glyph themselves are encouraged to instead
load the font specified by `font_path` at `font_size`, warp it with the
effects specified by `font_effects`, and load the glyph specified by
`glyph_name_or_index`.

---
## _dispatch
```python
from dviread import _dispatch
```

Decorator for dispatch by opcode. Sets the values in *table*
from *min* to *max* to this method, adds a check that the Dvi state
matches *state* if not None, reads arguments from the file according
to *args*.

Parameters
----------
table : dict[int, callable]
    The dispatch table to be filled in.

min, max : int
    Range of opcodes that calls the registered function; *max* defaults to
    *min*.

state : _dvistate, optional
    State of the Dvi object in which these opcodes are allowed.

args : list[str], default: ['raw']
    Sequence of argument specifications:

    - 'raw': opcode minus minimum
    - 'u1': read one unsigned byte
    - 'u4': read four bytes, treat as an unsigned number
    - 's4': read four bytes, treat as a signed number
    - 'slen': read (opcode - minimum) bytes, treat as signed
    - 'slen1': read (opcode - minimum + 1) bytes, treat as signed
    - 'ulen1': read (opcode - minimum + 1) bytes, treat as unsigned
    - 'olen1': read (opcode - minimum + 1) bytes, treat as unsigned
      if under four bytes, signed if four bytes

---
## Dvi
```python
from dviread import Dvi
```

A reader for a dvi ("device-independent") file, as produced by TeX.

The current implementation can only iterate through pages in order,
and does not even attempt to verify the postamble.

This class can be used as a context manager to close the underlying
file upon exit. Pages can be read via iteration. Here is an overly
simple way to extract text without trying to detect whitespace::

    >>> with matplotlib.dviread.Dvi('input.dvi', 72) as dvi:
    ...     for page in dvi:
    ...         print(''.join(chr(t.glyph) for t in page.text))

---
## DviFont
```python
from dviread import DviFont
```

Encapsulation of a font that a DVI file can refer to.

This class holds a font's texname and size, supports comparison,
and knows the widths of glyphs in the same units as the AFM file.
There are also internal attributes (for use by dviread.py) that
are *not* used for comparison.

The size is in Adobe points (converted from TeX points).

Parameters
----------
scale : float
    Factor by which the font is scaled from its natural size.
tfm : Tfm
    TeX font metrics for this font
texname : bytes
   Name of the font as used internally by TeX and friends, as an ASCII
   bytestring.  This is usually very different from any external font
   names; `PsfontsMap` can be used to find the external name of the font.
vf : Vf
   A TeX "virtual font" file, or None if this font is not virtual.

Attributes
----------
texname : bytes
size : float
   Size of the font in Adobe points, converted from the slightly
   smaller TeX points.
widths : list
   Widths of glyphs in glyph-space units, typically 1/1000ths of
   the point size.

---
## Vf
```python
from dviread import Vf
```

A virtual font (\*.vf file) containing subroutines for dvi files.

Parameters
----------
filename : str or path-like

Notes
-----
The virtual font format is a derivative of dvi:
http://mirrors.ctan.org/info/knuth/virtual-fonts
This class reuses some of the machinery of `Dvi`
but replaces the `_read` loop and dispatch mechanism.

Examples
--------
::

    vf = Vf(filename)
    glyph = vf[code]
    glyph.text, glyph.boxes, glyph.width

---
## _mul2012
```python
from dviread import _mul2012
```

Multiply two numbers in 20.12 fixed point format.

---
## Tfm
```python
from dviread import Tfm
```

A TeX Font Metric file.

This implementation covers only the bare minimum needed by the Dvi class.

Parameters
----------
filename : str or path-like

Attributes
----------
checksum : int
   Used for verifying against the dvi file.
design_size : int
   Design size of the font (unknown units)
width, height, depth : dict
   Dimensions of each character, need to be scaled by the factor
   specified in the dvi file. These are dicts because indexing may
   not start from 0.

---
## PsfontsMap
```python
from dviread import PsfontsMap
```

A psfonts.map formatted file, mapping TeX fonts to PS fonts.

Parameters
----------
filename : str or path-like

Notes
-----
For historical reasons, TeX knows many Type-1 fonts by different
names than the outside world. (For one thing, the names have to
fit in eight characters.) Also, TeX's native fonts are not Type-1
but Metafont, which is nontrivial to convert to PostScript except
as a bitmap. While high-quality conversions to Type-1 format exist
and are shipped with modern TeX distributions, we need to know
which Type-1 fonts are the counterparts of which native fonts. For
these reasons a mapping is needed from internal font names to font
file names.

A texmf tree typically includes mapping files called e.g.
:file:`psfonts.map`, :file:`pdftex.map`, or :file:`dvipdfm.map`.
The file :file:`psfonts.map` is used by :program:`dvips`,
:file:`pdftex.map` by :program:`pdfTeX`, and :file:`dvipdfm.map`
by :program:`dvipdfm`. :file:`psfonts.map` might avoid embedding
the 35 PostScript fonts (i.e., have no filename for them, as in
the Times-Bold example above), while the pdf-related files perhaps
only avoid the "Base 14" pdf fonts. But the user may have
configured these files differently.

Examples
--------
>>> map = PsfontsMap(find_tex_file('pdftex.map'))
>>> entry = map[b'ptmbo8r']
>>> entry.texname
b'ptmbo8r'
>>> entry.psname
b'Times-Bold'
>>> entry.encoding
'/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc'
>>> entry.effects
{'slant': 0.16700000000000001}
>>> entry.filename

---
## _parse_enc
```python
from dviread import _parse_enc
```

Parse a \*.enc file referenced from a psfonts.map style file.

The format supported by this function is a tiny subset of PostScript.

Parameters
----------
path : `os.PathLike`

Returns
-------
list
    The nth entry of the list is the PostScript glyph name of the nth
    glyph.

---
## _LuatexKpsewhich
```python
from dviread import _LuatexKpsewhich
```



---
## find_tex_file
```python
from dviread import find_tex_file
```

Find a file in the texmf tree using kpathsea_.

The kpathsea library, provided by most existing TeX distributions, both
on Unix-like systems and on Windows (MikTeX), is invoked via a long-lived
luatex process if luatex is installed, or via kpsewhich otherwise.

.. _kpathsea: https://www.tug.org/kpathsea/

Parameters
----------
filename : str or path-like

Raises
------
FileNotFoundError
    If the file is not found.

---
## _fontfile
```python
from dviread import _fontfile
```



---
## _get_pdftexmap_entry
```python
from dviread import _get_pdftexmap_entry
```



---
## font_path
```python
from dviread import font_path
```

The `~pathlib.Path` to the font for this glyph.

---
## font_size
```python
from dviread import font_size
```

The font size.

---
## font_effects
```python
from dviread import font_effects
```

The "font effects" dict for this glyph.

This dict contains the values for this glyph of SlantFont and
ExtendFont (if any), read off :file:`pdftex.map`.

---
## glyph_name_or_index
```python
from dviread import glyph_name_or_index
```

Either the glyph name or the native charmap glyph index.

If :file:`pdftex.map` specifies an encoding for this glyph's font, that
is a mapping of glyph indices to Adobe glyph names; use it to convert
dvi indices to glyph names.  Callers can then convert glyph names to
glyph indices (with FT_Get_Name_Index/get_name_index), and load the
glyph using FT_Load_Glyph/load_glyph.

If :file:`pdftex.map` specifies no encoding, the indices directly map
to the font's "native" charmap; glyphs should directly load using
FT_Load_Char/load_char after selecting the native charmap.

---
## decorate
```python
from dviread import decorate
```



---
## __init__
```python
from dviread import __init__
```



---
## __enter__
```python
from dviread import __enter__
```

Context manager enter method, does nothing.

---
## __exit__
```python
from dviread import __exit__
```

Context manager exit method, closes the underlying file if it is open.

---
## __iter__
```python
from dviread import __iter__
```

Iterate through the pages of the file.

Yields
------
Page
    Details of all the text and box objects on the page.
    The Page tuple contains lists of Text and Box tuples and
    the page dimensions, and the Text and Box tuples contain
    coordinates transformed into a standard Cartesian
    coordinate system at the dpi value given when initializing.
    The coordinates are floating point numbers, but otherwise
    precision is not lost and coordinate values are not clipped to
    integers.

---
## close
```python
from dviread import close
```

Close the underlying file if it is open.

---
## _output
```python
from dviread import _output
```

Output the text and boxes belonging to the most recent page.
page = dvi._output()

---
## _read
```python
from dviread import _read
```

Read one page from the file. Return True if successful,
False if there were no more pages.

---
## _arg
```python
from dviread import _arg
```

Read and return a big-endian integer *nbytes* long.
Signedness is determined by the *signed* keyword.

---
## _set_char_immediate
```python
from dviread import _set_char_immediate
```



---
## _set_char
```python
from dviread import _set_char
```



---
## _set_rule
```python
from dviread import _set_rule
```



---
## _put_char
```python
from dviread import _put_char
```



---
## _put_char_real
```python
from dviread import _put_char_real
```



---
## _put_rule
```python
from dviread import _put_rule
```



---
## _put_rule_real
```python
from dviread import _put_rule_real
```



---
## _nop
```python
from dviread import _nop
```



---
## _bop
```python
from dviread import _bop
```



---
## _eop
```python
from dviread import _eop
```



---
## _push
```python
from dviread import _push
```



---
## _pop
```python
from dviread import _pop
```



---
## _right
```python
from dviread import _right
```



---
## _right_w
```python
from dviread import _right_w
```



---
## _right_x
```python
from dviread import _right_x
```



---
## _down
```python
from dviread import _down
```



---
## _down_y
```python
from dviread import _down_y
```



---
## _down_z
```python
from dviread import _down_z
```



---
## _fnt_num_immediate
```python
from dviread import _fnt_num_immediate
```



---
## _fnt_num
```python
from dviread import _fnt_num
```



---
## _xxx
```python
from dviread import _xxx
```



---
## _fnt_def
```python
from dviread import _fnt_def
```



---
## _fnt_def_real
```python
from dviread import _fnt_def_real
```



---
## _pre
```python
from dviread import _pre
```



---
## _post
```python
from dviread import _post
```



---
## _post_post
```python
from dviread import _post_post
```



---
## _malformed
```python
from dviread import _malformed
```



---
## __eq__
```python
from dviread import __eq__
```



---
## __ne__
```python
from dviread import __ne__
```



---
## __repr__
```python
from dviread import __repr__
```



---
## _width_of
```python
from dviread import _width_of
```

Width of char in dvi units.

---
## _height_depth_of
```python
from dviread import _height_depth_of
```

Height and depth of char in dvi units.

---
## __getitem__
```python
from dviread import __getitem__
```



---
## _init_packet
```python
from dviread import _init_packet
```



---
## _finalize_packet
```python
from dviread import _finalize_packet
```



---
## __new__
```python
from dviread import __new__
```



---
## _parse_and_cache_line
```python
from dviread import _parse_and_cache_line
```

Parse a line in the font mapping file.

The format is (partially) documented at
http://mirrors.ctan.org/systems/doc/pdftex/manual/pdftex-a.pdf
https://tug.org/texinfohtml/dvips.html#psfonts_002emap
Each line can have the following fields:

- tfmname (first, only required field),
- psname (defaults to tfmname, must come immediately after tfmname if
  present),
- fontflags (integer, must come immediately after psname if present,
  ignored by us),
- special (SlantFont and ExtendFont, only field that is double-quoted),
- fontfile, encodingfile (optional, prefixed by <, <<, or <[; << always
  precedes a font, <[ always precedes an encoding, < can precede either
  but then an encoding file must have extension .enc; < and << also
  request different font subsetting behaviors but we ignore that; < can
  be separated from the filename by whitespace).

special, fontfile, and encodingfile can appear in any order.

---
## _new_proc
```python
from dviread import _new_proc
```



---
## search
```python
from dviread import search
```



---
## wrapper
```python
from dviread import wrapper
```



---
## __name__
```python
from animation import __name__
```



---
## adjusted_figsize
```python
from animation import adjusted_figsize
```

Compute figure size so that pixels are a multiple of n.

Parameters
----------
w, h : float
    Size in inches.

dpi : float
    The dpi.

n : int
    The target multiple.

Returns
-------
wnew, hnew : float
    The new figure size in inches.

---
## MovieWriterRegistry
```python
from animation import MovieWriterRegistry
```

Registry of available writer classes by human readable name.

---
## AbstractMovieWriter
```python
from animation import AbstractMovieWriter
```

Abstract base class for writing movies, providing a way to grab frames by
calling `~AbstractMovieWriter.grab_frame`.

`setup` is called to start the process and `finish` is called afterwards.
`saving` is provided as a context manager to facilitate this process as ::

    with moviewriter.saving(fig, outfile='myfile.mp4', dpi=100):
        # Iterate over frames
        moviewriter.grab_frame(**savefig_kwargs)

The use of the context manager ensures that `setup` and `finish` are
performed as necessary.

An instance of a concrete subclass of this class can be given as the
``writer`` argument of `Animation.save()`.

---
## MovieWriter
```python
from animation import MovieWriter
```

Base class for writing movies.

This is a base class for MovieWriter subclasses that write a movie frame
data to a pipe. You cannot instantiate this class directly.
See examples for how to use its subclasses.

Attributes
----------
frame_format : str
    The format used in writing frame data, defaults to 'rgba'.
fig : `~matplotlib.figure.Figure`
    The figure to capture data from.
    This must be provided by the subclasses.

---
## FileMovieWriter
```python
from animation import FileMovieWriter
```

`MovieWriter` for writing to individual files and stitching at the end.

This must be sub-classed to be useful.

---
## PillowWriter
```python
from animation import PillowWriter
```



---
## FFMpegBase
```python
from animation import FFMpegBase
```

Mixin class for FFMpeg output.

This is a base class for the concrete `FFMpegWriter` and `FFMpegFileWriter`
classes.

---
## FFMpegWriter
```python
from animation import FFMpegWriter
```

Pipe-based ffmpeg writer.

Frames are streamed directly to ffmpeg via a pipe and written in a single pass.

This effectively works as a slideshow input to ffmpeg with the fps passed as
``-framerate``, so see also `their notes on frame rates`_ for further details.

.. _their notes on frame rates: https://trac.ffmpeg.org/wiki/Slideshow#Framerates

---
## FFMpegFileWriter
```python
from animation import FFMpegFileWriter
```

File-based ffmpeg writer.

Frames are written to temporary files on disk and then stitched together at the end.

This effectively works as a slideshow input to ffmpeg with the fps passed as
``-framerate``, so see also `their notes on frame rates`_ for further details.

.. _their notes on frame rates: https://trac.ffmpeg.org/wiki/Slideshow#Framerates

---
## ImageMagickBase
```python
from animation import ImageMagickBase
```

Mixin class for ImageMagick output.

This is a base class for the concrete `ImageMagickWriter` and
`ImageMagickFileWriter` classes, which define an ``input_names`` attribute
(or property) specifying the input names passed to ImageMagick.

---
## ImageMagickWriter
```python
from animation import ImageMagickWriter
```

Pipe-based animated gif writer.

Frames are streamed directly to ImageMagick via a pipe and written
in a single pass.

---
## ImageMagickFileWriter
```python
from animation import ImageMagickFileWriter
```

File-based animated gif writer.

Frames are written to temporary files on disk and then stitched
together at the end.

---
## _included_frames
```python
from animation import _included_frames
```



---
## _embedded_frames
```python
from animation import _embedded_frames
```

frame_list should be a list of base64-encoded png files

---
## HTMLWriter
```python
from animation import HTMLWriter
```

Writer for JavaScript-based HTML movies.

---
## Animation
```python
from animation import Animation
```

A base class for Animations.

This class is not usable as is, and should be subclassed to provide needed
behavior.

.. note::

    You must store the created Animation in a variable that lives as long
    as the animation should run. Otherwise, the Animation object will be
    garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The figure object used to get needed events, such as draw or resize.

event_source : object, optional
    A class that can run a callback when desired events
    are generated, as well as be stopped and started.

    Examples include timers (see `TimedAnimation`) and file
    system notifications.

blit : bool, default: False
    Whether blitting is used to optimize drawing.  If the backend does not
    support blitting, then this parameter has no effect.

See Also
--------
FuncAnimation,  ArtistAnimation

---
## TimedAnimation
```python
from animation import TimedAnimation
```

`Animation` subclass for time-based animation.

A new frame is drawn every *interval* milliseconds.

.. note::

    You must store the created Animation in a variable that lives as long
    as the animation should run. Otherwise, the Animation object will be
    garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The figure object used to get needed events, such as draw or resize.
interval : int, default: 200
    Delay between frames in milliseconds.
repeat_delay : int, default: 0
    The delay in milliseconds between consecutive animation runs, if
    *repeat* is True.
repeat : bool, default: True
    Whether the animation repeats when the sequence of frames is completed.
blit : bool, default: False
    Whether blitting is used to optimize drawing.

---
## ArtistAnimation
```python
from animation import ArtistAnimation
```

`TimedAnimation` subclass that creates an animation by using a fixed
set of `.Artist` objects.

Before creating an instance, all plotting should have taken place
and the relevant artists saved.

.. note::

    You must store the created Animation in a variable that lives as long
    as the animation should run. Otherwise, the Animation object will be
    garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The figure object used to get needed events, such as draw or resize.
artists : list
    Each list entry is a collection of `.Artist` objects that are made
    visible on the corresponding frame.  Other artists are made invisible.
interval : int, default: 200
    Delay between frames in milliseconds.
repeat_delay : int, default: 0
    The delay in milliseconds between consecutive animation runs, if
    *repeat* is True.
repeat : bool, default: True
    Whether the animation repeats when the sequence of frames is completed.
blit : bool, default: False
    Whether blitting is used to optimize drawing.

---
## FuncAnimation
```python
from animation import FuncAnimation
```

`TimedAnimation` subclass that makes an animation by repeatedly calling
a function *func*.

.. note::

    You must store the created Animation in a variable that lives as long
    as the animation should run. Otherwise, the Animation object will be
    garbage-collected and the animation stops.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The figure object used to get needed events, such as draw or resize.

func : callable
    The function to call at each frame.  The first argument will
    be the next value in *frames*.   Any additional positional
    arguments can be supplied using `functools.partial` or via the *fargs*
    parameter.

    The required signature is::

        def func(frame, *fargs) -> iterable_of_artists

    It is often more convenient to provide the arguments using
    `functools.partial`. In this way it is also possible to pass keyword
    arguments. To pass a function with both positional and keyword
    arguments, set all arguments as keyword arguments, just leaving the
    *frame* argument unset::

        def func(frame, art, *, y=None):
            ...

        ani = FuncAnimation(fig, partial(func, art=ln, y='foo'))

    If ``blit == True``, *func* must return an iterable of all artists
    that were modified or created. This information is used by the blitting
    algorithm to determine which parts of the figure have to be updated.
    The return value is unused if ``blit == False`` and may be omitted in
    that case.

frames : iterable, int, generator function, or None, optional
    Source of data to pass *func* and each frame of the animation

    - If an iterable, then simply use the values provided.  If the
      iterable has a length, it will override the *save_count* kwarg.

    - If an integer, then equivalent to passing ``range(frames)``

    - If a generator function, then must have the signature::

         def gen_function() -> obj

    - If *None*, then equivalent to passing ``itertools.count``.

    In all of these cases, the values in *frames* is simply passed through
    to the user-supplied *func* and thus can be of any type.

init_func : callable, optional
    A function used to draw a clear frame. If not given, the results of
    drawing from the first item in the frames sequence will be used. This
    function will be called once before the first frame.

    The required signature is::

        def init_func() -> iterable_of_artists

    If ``blit == True``, *init_func* must return an iterable of artists
    to be re-drawn. This information is used by the blitting algorithm to
    determine which parts of the figure have to be updated.  The return
    value is unused if ``blit == False`` and may be omitted in that case.

fargs : tuple or None, optional
    Additional arguments to pass to each call to *func*. Note: the use of
    `functools.partial` is preferred over *fargs*. See *func* for details.

save_count : int, optional
    Fallback for the number of values from *frames* to cache. This is
    only used if the number of frames cannot be inferred from *frames*,
    i.e. when it's an iterator without length or a generator.

interval : int, default: 200
    Delay between frames in milliseconds.

repeat_delay : int, default: 0
    The delay in milliseconds between consecutive animation runs, if
    *repeat* is True.

repeat : bool, default: True
    Whether the animation repeats when the sequence of frames is completed.

blit : bool, default: False
    Whether blitting is used to optimize drawing.  Note: when using
    blitting, any animated artists will be drawn according to their zorder;
    however, they will be drawn on top of any previous artists, regardless
    of their zorder.

cache_frame_data : bool, default: True
    Whether frame data is cached.  Disabling cache might be helpful when
    frames contain large objects.

---
## _validate_grabframe_kwargs
```python
from animation import _validate_grabframe_kwargs
```



---
## correct_roundoff
```python
from animation import correct_roundoff
```



---
## __init__
```python
from animation import __init__
```



---
## register
```python
from animation import register
```

Decorator for registering a class under a name.

Example use::

    @registry.register(name)
    class Foo:
        pass

---
## is_available
```python
from animation import is_available
```

Check if given writer is available by name.

Parameters
----------
name : str

Returns
-------
bool

---
## __iter__
```python
from animation import __iter__
```

Iterate over names of available writer class.

---
## list
```python
from animation import list
```

Get a list of available MovieWriters.

---
## __getitem__
```python
from animation import __getitem__
```

Get an available writer class from its name.

---
## setup
```python
from animation import setup
```



---
## frame_size
```python
from animation import frame_size
```

A tuple ``(width, height)`` in pixels of a movie frame.

---
## grab_frame
```python
from animation import grab_frame
```



---
## finish
```python
from animation import finish
```



---
## saving
```python
from animation import saving
```

Context manager to facilitate writing the movie file.

``*args, **kw`` are any parameters that should be passed to `setup`.

---
## _adjust_frame_size
```python
from animation import _adjust_frame_size
```



---
## _run
```python
from animation import _run
```



---
## _args
```python
from animation import _args
```



---
## bin_path
```python
from animation import bin_path
```



---
## isAvailable
```python
from animation import isAvailable
```



---
## __del__
```python
from animation import __del__
```



---
## frame_format
```python
from animation import frame_format
```



---
## _base_temp_name
```python
from animation import _base_temp_name
```



---
## output_args
```python
from animation import output_args
```



---
## _start
```python
from animation import _start
```

Starts interactive animation. Adds the draw frame command to the GUI
handler, calls show to start the event loop.

---
## _stop
```python
from animation import _stop
```



---
## save
```python
from animation import save
```

Save the animation as a movie file by drawing every frame.

Parameters
----------
filename : str
    The output filename, e.g., :file:`mymovie.mp4`.

writer : `MovieWriter` or str, default: :rc:`animation.writer`
    A `MovieWriter` instance to use or a key that identifies a
    class to use, such as 'ffmpeg'.

fps : int, optional
    Movie frame rate (per second).  If not set, the frame rate from the
    animation's frame interval.

dpi : float, default: :rc:`savefig.dpi`
    Controls the dots per inch for the movie frames.  Together with
    the figure's size in inches, this controls the size of the movie.

codec : str, default: :rc:`animation.codec`.
    The video codec to use.  Not all codecs are supported by a given
    `MovieWriter`.

bitrate : int, default: :rc:`animation.bitrate`
    The bitrate of the movie, in kilobits per second.  Higher values
    means higher quality movies, but increase the file size.  A value
    of -1 lets the underlying movie encoder select the bitrate.

extra_args : list of str or None, optional
    Extra command-line arguments passed to the underlying movie encoder. These
    arguments are passed last to the encoder, just before the output filename.
    The default, None, means to use :rc:`animation.[name-of-encoder]_args` for
    the builtin writers.

metadata : dict[str, str], default: {}
    Dictionary of keys and values for metadata to include in
    the output file. Some keys that may be of use include:
    title, artist, genre, subject, copyright, srcform, comment.

extra_anim : list, default: []
    Additional `Animation` objects that should be included
    in the saved movie file. These need to be from the same
    `.Figure` instance. Also, animation frames will
    just be simply combined, so there should be a 1:1 correspondence
    between the frames from the different animations.

savefig_kwargs : dict, default: {}
    Keyword arguments passed to each `~.Figure.savefig` call used to
    save the individual frames.

progress_callback : function, optional
    A callback function that will be called for every frame to notify
    the saving progress. It must have the signature ::

        def func(current_frame: int, total_frames: int) -> Any

    where *current_frame* is the current frame number and *total_frames* is the
    total number of frames to be saved. *total_frames* is set to None, if the
    total number of frames cannot be determined. Return values may exist but are
    ignored.

    Example code to write the progress to stdout::

        progress_callback = lambda i, n: print(f'Saving frame {i}/{n}')

Notes
-----
*fps*, *codec*, *bitrate*, *extra_args* and *metadata* are used to
construct a `.MovieWriter` instance and can only be passed if
*writer* is a string.  If they are passed as non-*None* and *writer*
is a `.MovieWriter`, a `RuntimeError` will be raised.

---
## _step
```python
from animation import _step
```

Handler for getting events.

---
## new_frame_seq
```python
from animation import new_frame_seq
```



---
## new_saved_frame_seq
```python
from animation import new_saved_frame_seq
```



---
## _draw_next_frame
```python
from animation import _draw_next_frame
```



---
## _init_draw
```python
from animation import _init_draw
```



---
## _pre_draw
```python
from animation import _pre_draw
```

Clears artists from the last frame.

---
## _draw_frame
```python
from animation import _draw_frame
```



---
## _post_draw
```python
from animation import _post_draw
```



---
## _blit_draw
```python
from animation import _blit_draw
```



---
## _blit_clear
```python
from animation import _blit_clear
```



---
## _setup_blit
```python
from animation import _setup_blit
```



---
## _on_resize
```python
from animation import _on_resize
```



---
## _end_redraw
```python
from animation import _end_redraw
```



---
## to_html5_video
```python
from animation import to_html5_video
```

Convert the animation to an HTML5 ``<video>`` tag.

This saves the animation as an h264 video, encoded in base64
directly into the HTML5 video tag. This respects :rc:`animation.writer`
and :rc:`animation.bitrate`. This also makes use of the
*interval* to control the speed, and uses the *repeat*
parameter to decide whether to loop.

Parameters
----------
embed_limit : float, optional
    Limit, in MB, of the returned animation. No animation is created
    if the limit is exceeded.
    Defaults to :rc:`animation.embed_limit` = 20.0.

Returns
-------
str
    An HTML5 video tag with the animation embedded as base64 encoded
    h264 video.
    If the *embed_limit* is exceeded, this returns the string
    "Video too large to embed."

---
## to_jshtml
```python
from animation import to_jshtml
```

Generate HTML representation of the animation.

Parameters
----------
fps : int, optional
    Movie frame rate (per second). If not set, the frame rate from
    the animation's frame interval.
embed_frames : bool, optional
default_mode : str, optional
    What to do when the animation ends. Must be one of ``{'loop',
    'once', 'reflect'}``. Defaults to ``'loop'`` if the *repeat*
    parameter is True, otherwise ``'once'``.

---
## _repr_html_
```python
from animation import _repr_html_
```

IPython display hook for rendering.

---
## pause
```python
from animation import pause
```

Pause the animation.

---
## resume
```python
from animation import resume
```

Resume the animation.

---
## wrapper
```python
from animation import wrapper
```



---
## _pre_composite_to_white
```python
from animation import _pre_composite_to_white
```



---
## gen
```python
from animation import gen
```



---
## iter_frames
```python
from animation import iter_frames
```



---
## __name__
```python
from _mathtext_data import __name__
```

font data tables for truetype and afm computer modern fonts

---
## _normalize_stix_fontcodes
```python
from _mathtext_data import _normalize_stix_fontcodes
```



---
## __name__
```python
from artist import __name__
```



---
## _prevent_rasterization
```python
from artist import _prevent_rasterization
```



---
## allow_rasterization
```python
from artist import allow_rasterization
```

Decorator for Artist.draw method. Provides routines
that run before and after the draw call. The before and after functions
are useful for changing artist-dependent renderer attributes or making
other setup function calls, such as starting and flushing a mixed-mode
renderer.

---
## _finalize_rasterization
```python
from artist import _finalize_rasterization
```

Decorator for Artist.draw method. Needed on the outermost artist, i.e.
Figure, to finish up if the render is still in rasterized mode.

---
## _stale_axes_callback
```python
from artist import _stale_axes_callback
```



---
## _Unset
```python
from artist import _Unset
```



---
## Artist
```python
from artist import Artist
```

Abstract base class for objects that render into a FigureCanvas.

Typically, all visible elements in a figure are subclasses of Artist.

---
## _get_tightbbox_for_layout_only
```python
from artist import _get_tightbbox_for_layout_only
```

Matplotlib's `.Axes.get_tightbbox` and `.Axis.get_tightbbox` support a
*for_layout_only* kwarg; this helper tries to use the kwarg but skips it
when encountering third-party subclasses that do not support it.

---
## ArtistInspector
```python
from artist import ArtistInspector
```

A helper class to inspect an `~matplotlib.artist.Artist` and return
information about its settable properties and their current values.

---
## getp
```python
from artist import getp
```

Return the value of an `.Artist`'s *property*, or print all of them.

Parameters
----------
obj : `~matplotlib.artist.Artist`
    The queried artist; e.g., a `.Line2D`, a `.Text`, or an `~.axes.Axes`.

property : str or None, default: None
    If *property* is 'somename', this function returns
    ``obj.get_somename()``.

    If it's None (or unset), it *prints* all gettable properties from
    *obj*.  Many properties have aliases for shorter typing, e.g. 'lw' is
    an alias for 'linewidth'.  In the output, aliases and full property
    names will be listed as:

      property or alias = value

    e.g.:

      linewidth or lw = 2

See Also
--------
setp

---
## setp
```python
from artist import setp
```

Set one or more properties on an `.Artist`, or list allowed values.

Parameters
----------
obj : `~matplotlib.artist.Artist` or list of `.Artist`
    The artist(s) whose properties are being set or queried.  When setting
    properties, all artists are affected; when querying the allowed values,
    only the first instance in the sequence is queried.

    For example, two lines can be made thicker and red with a single call:

    >>> x = arange(0, 1, 0.01)
    >>> lines = plot(x, sin(2*pi*x), x, sin(4*pi*x))
    >>> setp(lines, linewidth=2, color='r')

file : file-like, default: `sys.stdout`
    Where `setp` writes its output when asked to list allowed values.

    >>> with open('output.log') as file:
    ...     setp(line, file=file)

    The default, ``None``, means `sys.stdout`.

*args, **kwargs
    The properties to set.  The following combinations are supported:

    - Set the linestyle of a line to be dashed:

      >>> line, = plot([1, 2, 3])
      >>> setp(line, linestyle='--')

    - Set multiple properties at once:

      >>> setp(line, linewidth=2, color='r')

    - List allowed values for a line's linestyle:

      >>> setp(line, 'linestyle')
      linestyle: {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}

    - List all properties that can be set, and their allowed values:

      >>> setp(line)
      agg_filter: a filter function, ...
      [long output listing omitted]

    `setp` also supports MATLAB style string/value pairs.  For example, the
    following are equivalent:

    >>> setp(lines, 'linewidth', 2, 'color', 'r')  # MATLAB style
    >>> setp(lines, linewidth=2, color='r')        # Python style

See Also
--------
getp

---
## kwdoc
```python
from artist import kwdoc
```

Inspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and
return information about its settable properties and their current values.

Parameters
----------
artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s

Returns
-------
str
    The settable properties of *artist*, as plain text if
    :rc:`docstring.hardcopy` is False and as a rst table (intended for
    use in Sphinx) if it is True.

---
## draw_wrapper
```python
from artist import draw_wrapper
```



---
## __repr__
```python
from artist import __repr__
```



---
## __init_subclass__
```python
from artist import __init_subclass__
```



---
## _update_set_signature_and_docstring
```python
from artist import _update_set_signature_and_docstring
```

Update the signature of the set function to list all properties
as keyword arguments.

Property aliases are not listed in the signature for brevity, but
are still accepted as keyword arguments.

---
## __init__
```python
from artist import __init__
```

Initialize the artist inspector with an `Artist` or an iterable of
`Artist`\s.  If an iterable is used, we assume it is a homogeneous
sequence (all `Artist`\s are of the same type) and it is your
responsibility to make sure this is so.

---
## __getstate__
```python
from artist import __getstate__
```



---
## remove
```python
from artist import remove
```

Remove the artist from the figure if possible.

The effect will not be visible until the figure is redrawn, e.g.,
with `.FigureCanvasBase.draw_idle`.  Call `~.axes.Axes.relim` to
update the Axes limits if desired.

Note: `~.axes.Axes.relim` will not see collections even if the
collection was added to the Axes with *autolim* = True.

Note: there is no support for removing the artist's legend entry.

---
## have_units
```python
from artist import have_units
```

Return whether units are set on any axis.

---
## convert_xunits
```python
from artist import convert_xunits
```

Convert *x* using the unit type of the xaxis.

If the artist is not contained in an Axes or if the xaxis does not
have units, *x* itself is returned.

---
## convert_yunits
```python
from artist import convert_yunits
```

Convert *y* using the unit type of the yaxis.

If the artist is not contained in an Axes or if the yaxis does not
have units, *y* itself is returned.

---
## axes
```python
from artist import axes
```



---
## stale
```python
from artist import stale
```



---
## get_window_extent
```python
from artist import get_window_extent
```

Get the artist's bounding box in display space.

The bounding box' width and height are nonnegative.

Subclasses should override for inclusion in the bounding box
"tight" calculation. Default is to return an empty bounding
box at 0, 0.

Be careful when using this function, the results will not update
if the artist window extent of the artist changes.  The extent
can change due to any changes in the transform stack, such as
changing the Axes limits, the figure size, or the canvas used
(as is done when saving a figure).  This can lead to unexpected
behavior where interactive figures will look fine on the screen,
but will save incorrectly.

---
## get_tightbbox
```python
from artist import get_tightbbox
```

Like `.Artist.get_window_extent`, but includes any clipping.

Parameters
----------
renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional
    renderer that will be used to draw the figures (i.e.
    ``fig.canvas.get_renderer()``)

Returns
-------
`.Bbox` or None
    The enclosing bounding box (in figure pixel coordinates).
    Returns None if clipping results in no intersection.

---
## add_callback
```python
from artist import add_callback
```

Add a callback function that will be called whenever one of the
`.Artist`'s properties changes.

Parameters
----------
func : callable
    The callback function. It must have the signature::

        def func(artist: Artist) -> Any

    where *artist* is the calling `.Artist`. Return values may exist
    but are ignored.

Returns
-------
int
    The observer id associated with the callback. This id can be
    used for removing the callback with `.remove_callback` later.

See Also
--------
remove_callback

---
## remove_callback
```python
from artist import remove_callback
```

Remove a callback based on its observer id.

See Also
--------
add_callback

---
## pchanged
```python
from artist import pchanged
```

Call all of the registered callbacks.

This function is triggered internally when a property is changed.

See Also
--------
add_callback
remove_callback

---
## is_transform_set
```python
from artist import is_transform_set
```

Return whether the Artist has an explicitly set transform.

This is *True* after `.set_transform` has been called.

---
## set_transform
```python
from artist import set_transform
```

Set the artist transform.

Parameters
----------
t : `~matplotlib.transforms.Transform`

---
## get_transform
```python
from artist import get_transform
```

Return the `.Transform` instance used by this artist.

---
## get_children
```python
from artist import get_children
```

Return a list of the child `.Artist`\s of this `.Artist`.

---
## _different_canvas
```python
from artist import _different_canvas
```

Check whether an *event* occurred on a canvas other that this artist's canvas.

If this method returns True, the event definitely occurred on a different
canvas; if it returns False, either it occurred on the same canvas, or we may
not have enough information to know.

Subclasses should start their definition of `contains` as follows::

    if self._different_canvas(mouseevent):
        return False, {}
    # subclass-specific implementation follows

---
## contains
```python
from artist import contains
```

Test whether the artist contains the mouse event.

Parameters
----------
mouseevent : `~matplotlib.backend_bases.MouseEvent`

Returns
-------
contains : bool
    Whether any values are within the radius.
details : dict
    An artist-specific dictionary of details of the event context,
    such as which points are contained in the pick radius. See the
    individual Artist subclasses for details.

---
## pickable
```python
from artist import pickable
```

Return whether the artist is pickable.

See Also
--------
.Artist.set_picker, .Artist.get_picker, .Artist.pick

---
## pick
```python
from artist import pick
```

Process a pick event.

Each child artist will fire a pick event if *mouseevent* is over
the artist and the artist has picker set.

See Also
--------
.Artist.set_picker, .Artist.get_picker, .Artist.pickable

---
## set_picker
```python
from artist import set_picker
```

Define the picking behavior of the artist.

Parameters
----------
picker : None or bool or float or callable
    This can be one of the following:

    - *None*: Picking is disabled for this artist (default).

    - A boolean: If *True* then picking will be enabled and the
      artist will fire a pick event if the mouse event is over
      the artist.

    - A float: If picker is a number it is interpreted as an
      epsilon tolerance in points and the artist will fire
      off an event if its data is within epsilon of the mouse
      event.  For some artists like lines and patch collections,
      the artist may provide additional data to the pick event
      that is generated, e.g., the indices of the data within
      epsilon of the pick event

    - A function: If picker is callable, it is a user supplied
      function which determines whether the artist is hit by the
      mouse event::

        hit, props = picker(artist, mouseevent)

      to determine the hit test.  if the mouse event is over the
      artist, return *hit=True* and props is a dictionary of
      properties you want added to the PickEvent attributes.

---
## get_picker
```python
from artist import get_picker
```

Return the picking behavior of the artist.

The possible values are described in `.Artist.set_picker`.

See Also
--------
.Artist.set_picker, .Artist.pickable, .Artist.pick

---
## get_url
```python
from artist import get_url
```

Return the url.

---
## set_url
```python
from artist import set_url
```

Set the url for the artist.

Parameters
----------
url : str

---
## get_gid
```python
from artist import get_gid
```

Return the group id.

---
## set_gid
```python
from artist import set_gid
```

Set the (group) id for the artist.

Parameters
----------
gid : str

---
## get_snap
```python
from artist import get_snap
```

Return the snap setting.

See `.set_snap` for details.

---
## set_snap
```python
from artist import set_snap
```

Set the snapping behavior.

Snapping aligns positions with the pixel grid, which results in
clearer images. For example, if a black line of 1px width was
defined at a position in between two pixels, the resulting image
would contain the interpolated value of that line in the pixel grid,
which would be a grey value on both adjacent pixel positions. In
contrast, snapping will move the line to the nearest integer pixel
value, so that the resulting image will really contain a 1px wide
black line.

Snapping is currently only supported by the Agg and MacOSX backends.

Parameters
----------
snap : bool or None
    Possible values:

    - *True*: Snap vertices to the nearest pixel center.
    - *False*: Do not modify vertex positions.
    - *None*: (auto) If the path contains only rectilinear line
      segments, round to the nearest pixel center.

---
## get_sketch_params
```python
from artist import get_sketch_params
```

Return the sketch parameters for the artist.

Returns
-------
tuple or None

    A 3-tuple with the following elements:

    - *scale*: The amplitude of the wiggle perpendicular to the
      source line.
    - *length*: The length of the wiggle along the line.
    - *randomness*: The scale factor by which the length is
      shrunken or expanded.

    Returns *None* if no sketch parameters were set.

---
## set_sketch_params
```python
from artist import set_sketch_params
```

Set the sketch parameters.

Parameters
----------
scale : float, optional
    The amplitude of the wiggle perpendicular to the source
    line, in pixels.  If scale is `None`, or not provided, no
    sketch filter will be provided.
length : float, optional
     The length of the wiggle along the line, in pixels
     (default 128.0)
randomness : float, optional
    The scale factor by which the length is shrunken or
    expanded (default 16.0)

    The PGF backend uses this argument as an RNG seed and not as
    described above. Using the same seed yields the same random shape.

    .. ACCEPTS: (scale: float, length: float, randomness: float)

---
## set_path_effects
```python
from artist import set_path_effects
```

Set the path effects.

Parameters
----------
path_effects : list of `.AbstractPathEffect`

---
## get_path_effects
```python
from artist import get_path_effects
```



---
## get_figure
```python
from artist import get_figure
```

Return the `.Figure` instance the artist belongs to.

---
## set_figure
```python
from artist import set_figure
```

Set the `.Figure` instance the artist belongs to.

Parameters
----------
fig : `~matplotlib.figure.Figure`

---
## set_clip_box
```python
from artist import set_clip_box
```

Set the artist's clip `.Bbox`.

Parameters
----------
clipbox : `~matplotlib.transforms.BboxBase` or None
    Will typically be created from a `.TransformedBbox`. For instance,
    ``TransformedBbox(Bbox([[0, 0], [1, 1]]), ax.transAxes)`` is the default
    clipping for an artist added to an Axes.

---
## set_clip_path
```python
from artist import set_clip_path
```

Set the artist's clip path.

Parameters
----------
path : `~matplotlib.patches.Patch` or `.Path` or `.TransformedPath` or None
    The clip path. If given a `.Path`, *transform* must be provided as
    well. If *None*, a previously set clip path is removed.
transform : `~matplotlib.transforms.Transform`, optional
    Only used if *path* is a `.Path`, in which case the given `.Path`
    is converted to a `.TransformedPath` using *transform*.

Notes
-----
For efficiency, if *path* is a `.Rectangle` this method will set the
clipping box to the corresponding rectangle and set the clipping path
to ``None``.

For technical reasons (support of `~.Artist.set`), a tuple
(*path*, *transform*) is also accepted as a single positional
parameter.

.. ACCEPTS: Patch or (Path, Transform) or None

---
## get_alpha
```python
from artist import get_alpha
```

Return the alpha value used for blending - not supported on all
backends.

---
## get_visible
```python
from artist import get_visible
```

Return the visibility.

---
## get_animated
```python
from artist import get_animated
```

Return whether the artist is animated.

---
## get_in_layout
```python
from artist import get_in_layout
```

Return boolean flag, ``True`` if artist is included in layout
calculations.

E.g. :ref:`constrainedlayout_guide`,
`.Figure.tight_layout()`, and
``fig.savefig(fname, bbox_inches='tight')``.

---
## _fully_clipped_to_axes
```python
from artist import _fully_clipped_to_axes
```

Return a boolean flag, ``True`` if the artist is clipped to the Axes
and can thus be skipped in layout calculations. Requires `get_clip_on`
is True, one of `clip_box` or `clip_path` is set, ``clip_box.extents``
is equivalent to ``ax.bbox.extents`` (if set), and ``clip_path._patch``
is equivalent to ``ax.patch`` (if set).

---
## get_clip_on
```python
from artist import get_clip_on
```

Return whether the artist uses clipping.

---
## get_clip_box
```python
from artist import get_clip_box
```

Return the clipbox.

---
## get_clip_path
```python
from artist import get_clip_path
```

Return the clip path.

---
## get_transformed_clip_path_and_affine
```python
from artist import get_transformed_clip_path_and_affine
```

Return the clip path with the non-affine part of its
transformation applied, and the remaining affine part of its
transformation.

---
## set_clip_on
```python
from artist import set_clip_on
```

Set whether the artist uses clipping.

When False, artists will be visible outside the Axes which
can lead to unexpected results.

Parameters
----------
b : bool

---
## _set_gc_clip
```python
from artist import _set_gc_clip
```

Set the clip properly for the gc.

---
## get_rasterized
```python
from artist import get_rasterized
```

Return whether the artist is to be rasterized.

---
## set_rasterized
```python
from artist import set_rasterized
```

Force rasterized (bitmap) drawing for vector graphics output.

Rasterized drawing is not supported by all artists. If you try to
enable this on an artist that does not support it, the command has no
effect and a warning will be issued.

This setting is ignored for pixel-based output.

See also :doc:`/gallery/misc/rasterization_demo`.

Parameters
----------
rasterized : bool

---
## get_agg_filter
```python
from artist import get_agg_filter
```

Return filter function to be used for agg filter.

---
## set_agg_filter
```python
from artist import set_agg_filter
```

Set the agg filter.

Parameters
----------
filter_func : callable
    A filter function, which takes a (m, n, depth) float array
    and a dpi value, and returns a (m, n, depth) array and two
    offsets from the bottom left corner of the image

    .. ACCEPTS: a filter function, which takes a (m, n, 3) float array
        and a dpi value, and returns a (m, n, 3) array and two offsets
        from the bottom left corner of the image

---
## draw
```python
from artist import draw
```

Draw the Artist (and its children) using the given renderer.

This has no effect if the artist is not visible (`.Artist.get_visible`
returns False).

Parameters
----------
renderer : `~matplotlib.backend_bases.RendererBase` subclass.

Notes
-----
This method is overridden in the Artist subclasses.

---
## set_alpha
```python
from artist import set_alpha
```

Set the alpha value used for blending - not supported on all backends.

Parameters
----------
alpha : scalar or None
    *alpha* must be within the 0-1 range, inclusive.

---
## _set_alpha_for_array
```python
from artist import _set_alpha_for_array
```

Set the alpha value used for blending - not supported on all backends.

Parameters
----------
alpha : array-like or scalar or None
    All values must be within the 0-1 range, inclusive.
    Masked values and nans are not supported.

---
## set_visible
```python
from artist import set_visible
```

Set the artist's visibility.

Parameters
----------
b : bool

---
## set_animated
```python
from artist import set_animated
```

Set whether the artist is intended to be used in an animation.

If True, the artist is excluded from regular drawing of the figure.
You have to call `.Figure.draw_artist` / `.Axes.draw_artist`
explicitly on the artist. This approach is used to speed up animations
using blitting.

See also `matplotlib.animation` and
:ref:`blitting`.

Parameters
----------
b : bool

---
## set_in_layout
```python
from artist import set_in_layout
```

Set if artist is to be included in layout calculations,
E.g. :ref:`constrainedlayout_guide`,
`.Figure.tight_layout()`, and
``fig.savefig(fname, bbox_inches='tight')``.

Parameters
----------
in_layout : bool

---
## get_label
```python
from artist import get_label
```

Return the label used for this artist in the legend.

---
## set_label
```python
from artist import set_label
```

Set a label that will be displayed in the legend.

Parameters
----------
s : object
    *s* will be converted to a string by calling `str`.

---
## get_zorder
```python
from artist import get_zorder
```

Return the artist's zorder.

---
## set_zorder
```python
from artist import set_zorder
```

Set the zorder for the artist.  Artists with lower zorder
values are drawn first.

Parameters
----------
level : float

---
## sticky_edges
```python
from artist import sticky_edges
```

``x`` and ``y`` sticky edge lists for autoscaling.

When performing autoscaling, if a data limit coincides with a value in
the corresponding sticky_edges list, then no margin will be added--the
view limit "sticks" to the edge. A typical use case is histograms,
where one usually expects no margin on the bottom edge (0) of the
histogram.

Moreover, margin expansion "bumps" against sticky edges and cannot
cross them.  For example, if the upper data limit is 1.0, the upper
view limit computed by simple margin application is 1.2, but there is a
sticky edge at 1.1, then the actual upper view limit will be 1.1.

This attribute cannot be assigned to; however, the ``x`` and ``y``
lists can be modified in place as needed.

Examples
--------
>>> artist.sticky_edges.x[:] = (xmin, xmax)
>>> artist.sticky_edges.y[:] = (ymin, ymax)

---
## update_from
```python
from artist import update_from
```

Copy properties from *other* to *self*.

---
## properties
```python
from artist import properties
```

Return a dictionary mapping property name -> value.

---
## _update_props
```python
from artist import _update_props
```

Helper for `.Artist.set` and `.Artist.update`.

*errfmt* is used to generate error messages for invalid property
names; it gets formatted with ``type(self)`` and the property name.

---
## update
```python
from artist import update
```

Update this artist's properties from the dict *props*.

Parameters
----------
props : dict

---
## _internal_update
```python
from artist import _internal_update
```

Update artist properties without prenormalizing them, but generating
errors as if calling `set`.

The lack of prenormalization is to maintain backcompatibility.

---
## set
```python
from artist import set
```



---
## _cm_set
```python
from artist import _cm_set
```

`.Artist.set` context-manager that restores original values at exit.

---
## findobj
```python
from artist import findobj
```

Find artist objects.

Recursively find all `.Artist` instances contained in the artist.

Parameters
----------
match
    A filter criterion for the matches. This can be

    - *None*: Return all objects contained in artist.
    - A function with signature ``def match(artist: Artist) -> bool``.
      The result will only contain artists for which the function
      returns *True*.
    - A class instance: e.g., `.Line2D`. The result will only contain
      artists of this class or its subclasses (``isinstance`` check).

include_self : bool
    Include *self* in the list to be checked for a match.

Returns
-------
list of `.Artist`

---
## get_cursor_data
```python
from artist import get_cursor_data
```

Return the cursor data for a given event.

.. note::
    This method is intended to be overridden by artist subclasses.
    As an end-user of Matplotlib you will most likely not call this
    method yourself.

Cursor data can be used by Artists to provide additional context
information for a given event. The default implementation just returns
*None*.

Subclasses can override the method and return arbitrary data. However,
when doing so, they must ensure that `.format_cursor_data` can convert
the data to a string representation.

The only current use case is displaying the z-value of an `.AxesImage`
in the status bar of a plot window, while moving the mouse.

Parameters
----------
event : `~matplotlib.backend_bases.MouseEvent`

See Also
--------
format_cursor_data

---
## format_cursor_data
```python
from artist import format_cursor_data
```

Return a string representation of *data*.

.. note::
    This method is intended to be overridden by artist subclasses.
    As an end-user of Matplotlib you will most likely not call this
    method yourself.

The default implementation converts ints and floats and arrays of ints
and floats into a comma-separated string enclosed in square brackets,
unless the artist has an associated colorbar, in which case scalar
values are formatted using the colorbar's formatter.

See Also
--------
get_cursor_data

---
## get_mouseover
```python
from artist import get_mouseover
```

Return whether this artist is queried for custom context information
when the mouse cursor moves over it.

---
## set_mouseover
```python
from artist import set_mouseover
```

Set whether this artist is queried for custom context information when
the mouse cursor moves over it.

Parameters
----------
mouseover : bool

See Also
--------
get_cursor_data
.ToolCursorPosition
.NavigationToolbar2

---
## get_aliases
```python
from artist import get_aliases
```

Get a dict mapping property fullnames to sets of aliases for each alias
in the :class:`~matplotlib.artist.ArtistInspector`.

e.g., for lines::

  {'markerfacecolor': {'mfc'},
   'linewidth'      : {'lw'},
  }

---
## get_valid_values
```python
from artist import get_valid_values
```

Get the legal arguments for the setter associated with *attr*.

This is done by querying the docstring of the setter for a line that
begins with "ACCEPTS:" or ".. ACCEPTS:", and then by looking for a
numpydoc-style documentation for the setter's first argument.

---
## _replace_path
```python
from artist import _replace_path
```

Changes the full path to the public API path that is used
in sphinx. This is needed for links to work.

---
## get_setters
```python
from artist import get_setters
```

Get the attribute strings with setters for object.

For example, for a line, return ``['markerfacecolor', 'linewidth',
....]``.

---
## number_of_parameters
```python
from artist import number_of_parameters
```

Return number of parameters of the callable *func*.

---
## is_alias
```python
from artist import is_alias
```

Return whether the object *method* is an alias for another method.

---
## aliased_name
```python
from artist import aliased_name
```

Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME'.

For example, for the line markerfacecolor property, which has an
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'.

---
## aliased_name_rest
```python
from artist import aliased_name_rest
```

Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME',
formatted for reST.

For example, for the line markerfacecolor property, which has an
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'.

---
## pprint_setters
```python
from artist import pprint_setters
```

If *prop* is *None*, return a list of strings of all settable
properties and their valid values.

If *prop* is not *None*, it is a valid property name and that
property will be returned as a string of property : valid
values.

---
## pprint_setters_rest
```python
from artist import pprint_setters_rest
```

If *prop* is *None*, return a list of reST-formatted strings of all
settable properties and their valid values.

If *prop* is not *None*, it is a valid property name and that
property will be returned as a string of "property : valid"
values.

---
## pprint_getters
```python
from artist import pprint_getters
```

Return the getters and actual values as list of strings.

---
## matchfunc
```python
from artist import matchfunc
```



---
## __name__
```python
from backend_tools import __name__
```

Abstract base classes define the primitives for Tools.
These tools are used by `matplotlib.backend_managers.ToolManager`

:class:`ToolBase`
    Simple stateless tool

:class:`ToolToggleBase`
    Tool that has two states, only one Toggle tool can be
    active at any given time for the same
    `matplotlib.backend_managers.ToolManager`

---
## Cursors
```python
from backend_tools import Cursors
```

Backend-independent cursor types.

---
## _register_tool_class
```python
from backend_tools import _register_tool_class
```

Decorator registering *tool_cls* as a tool class for *canvas_cls*.

---
## _find_tool_class
```python
from backend_tools import _find_tool_class
```

Find a subclass of *tool_cls* registered for *canvas_cls*.

---
## ToolBase
```python
from backend_tools import ToolBase
```

Base tool class.

A base tool, only implements `trigger` method or no method at all.
The tool is instantiated by `matplotlib.backend_managers.ToolManager`.

---
## ToolToggleBase
```python
from backend_tools import ToolToggleBase
```

Toggleable tool.

Every time it is triggered, it switches between enable and disable.

Parameters
----------
``*args``
    Variable length argument to be used by the Tool.
``**kwargs``
    `toggled` if present and True, sets the initial state of the Tool
    Arbitrary keyword arguments to be consumed by the Tool

---
## ToolSetCursor
```python
from backend_tools import ToolSetCursor
```

Change to the current cursor while inaxes.

This tool, keeps track of all `ToolToggleBase` derived tools, and updates
the cursor when a tool gets triggered.

---
## ToolCursorPosition
```python
from backend_tools import ToolCursorPosition
```

Send message with the current pointer position.

This tool runs in the background reporting the position of the cursor.

---
## RubberbandBase
```python
from backend_tools import RubberbandBase
```

Draw and remove a rubberband.

---
## ToolQuit
```python
from backend_tools import ToolQuit
```

Tool to call the figure manager destroy method.

---
## ToolQuitAll
```python
from backend_tools import ToolQuitAll
```

Tool to call the figure manager destroy method.

---
## ToolGrid
```python
from backend_tools import ToolGrid
```

Tool to toggle the major grids of the figure.

---
## ToolMinorGrid
```python
from backend_tools import ToolMinorGrid
```

Tool to toggle the major and minor grids of the figure.

---
## ToolFullScreen
```python
from backend_tools import ToolFullScreen
```

Tool to toggle full screen.

---
## AxisScaleBase
```python
from backend_tools import AxisScaleBase
```

Base Tool to toggle between linear and logarithmic.

---
## ToolYScale
```python
from backend_tools import ToolYScale
```

Tool to toggle between linear and logarithmic scales on the Y axis.

---
## ToolXScale
```python
from backend_tools import ToolXScale
```

Tool to toggle between linear and logarithmic scales on the X axis.

---
## ToolViewsPositions
```python
from backend_tools import ToolViewsPositions
```

Auxiliary Tool to handle changes in views and positions.

Runs in the background and should get used by all the tools that
need to access the figure's history of views and positions, e.g.

* `ToolZoom`
* `ToolPan`
* `ToolHome`
* `ToolBack`
* `ToolForward`

---
## ViewsPositionsBase
```python
from backend_tools import ViewsPositionsBase
```

Base class for `ToolHome`, `ToolBack` and `ToolForward`.

---
## ToolHome
```python
from backend_tools import ToolHome
```

Restore the original view limits.

---
## ToolBack
```python
from backend_tools import ToolBack
```

Move back up the view limits stack.

---
## ToolForward
```python
from backend_tools import ToolForward
```

Move forward in the view lim stack.

---
## ConfigureSubplotsBase
```python
from backend_tools import ConfigureSubplotsBase
```

Base tool for the configuration of subplots.

---
## SaveFigureBase
```python
from backend_tools import SaveFigureBase
```

Base tool for figure saving.

---
## ZoomPanBase
```python
from backend_tools import ZoomPanBase
```

Base class for `ToolZoom` and `ToolPan`.

---
## ToolZoom
```python
from backend_tools import ToolZoom
```

A Tool for zooming using a rectangle selector.

---
## ToolPan
```python
from backend_tools import ToolPan
```

Pan Axes with left mouse, zoom with right.

---
## ToolHelpBase
```python
from backend_tools import ToolHelpBase
```



---
## ToolCopyToClipboardBase
```python
from backend_tools import ToolCopyToClipboardBase
```

Tool to copy the figure to the clipboard.

---
## add_tools_to_manager
```python
from backend_tools import add_tools_to_manager
```

Add multiple tools to a `.ToolManager`.

Parameters
----------
toolmanager : `.backend_managers.ToolManager`
    Manager to which the tools are added.
tools : {str: class_like}, optional
    The tools to add in a {name: tool} dict, see
    `.backend_managers.ToolManager.add_tool` for more info.

---
## add_tools_to_container
```python
from backend_tools import add_tools_to_container
```

Add multiple tools to the container.

Parameters
----------
container : Container
    `.backend_bases.ToolContainerBase` object that will get the tools
    added.
tools : list, optional
    List in the form ``[[group1, [tool1, tool2 ...]], [group2, [...]]]``
    where the tools ``[tool1, tool2, ...]`` will display in group1.
    See `.backend_bases.ToolContainerBase.add_tool` for details.

---
## __init__
```python
from backend_tools import __init__
```



---
## set_figure
```python
from backend_tools import set_figure
```



---
## _make_classic_style_pseudo_toolbar
```python
from backend_tools import _make_classic_style_pseudo_toolbar
```

Return a placeholder object with a single `canvas` attribute.

This is useful to reuse the implementations of tools already provided
by the classic Toolbars.

---
## trigger
```python
from backend_tools import trigger
```



---
## enable
```python
from backend_tools import enable
```

Connect press/release events and lock the canvas.

---
## disable
```python
from backend_tools import disable
```

Release the canvas and disconnect press/release events.

---
## toggled
```python
from backend_tools import toggled
```

State of the toggled tool.

---
## _tool_trigger_cbk
```python
from backend_tools import _tool_trigger_cbk
```



---
## _add_tool
```python
from backend_tools import _add_tool
```

Set the cursor when the tool is triggered.

---
## _add_tool_cbk
```python
from backend_tools import _add_tool_cbk
```

Process every newly added tool.

---
## _set_cursor_cbk
```python
from backend_tools import _set_cursor_cbk
```



---
## send_message
```python
from backend_tools import send_message
```

Call `matplotlib.backend_managers.ToolManager.message_event`.

---
## draw_rubberband
```python
from backend_tools import draw_rubberband
```

Draw rubberband.

This method must get implemented per backend.

---
## remove_rubberband
```python
from backend_tools import remove_rubberband
```

Remove rubberband.

This method should get implemented per backend.

---
## set_scale
```python
from backend_tools import set_scale
```



---
## add_figure
```python
from backend_tools import add_figure
```

Add the current figure to the stack of views and positions.

---
## clear
```python
from backend_tools import clear
```

Reset the Axes stack.

---
## update_view
```python
from backend_tools import update_view
```

Update the view limits and position for each Axes from the current
stack position. If any Axes are present in the figure that aren't in
the current stack position, use the home view limits for those Axes and
don't update *any* positions.

---
## push_current
```python
from backend_tools import push_current
```

Push the current view limits and position onto their respective stacks.

---
## _axes_pos
```python
from backend_tools import _axes_pos
```

Return the original and modified positions for the specified Axes.

Parameters
----------
ax : matplotlib.axes.Axes
    The `.Axes` to get the positions for.

Returns
-------
original_position, modified_position
    A tuple of the original and modified positions.

---
## update_home_views
```python
from backend_tools import update_home_views
```

Make sure that ``self.home_views`` has an entry for all Axes present
in the figure.

---
## home
```python
from backend_tools import home
```

Recall the first view and position from the stack.

---
## back
```python
from backend_tools import back
```

Back one step in the stack of views and positions.

---
## forward
```python
from backend_tools import forward
```

Forward one step in the stack of views and positions.

---
## scroll_zoom
```python
from backend_tools import scroll_zoom
```



---
## _cancel_action
```python
from backend_tools import _cancel_action
```



---
## _press
```python
from backend_tools import _press
```



---
## _switch_on_zoom_mode
```python
from backend_tools import _switch_on_zoom_mode
```



---
## _switch_off_zoom_mode
```python
from backend_tools import _switch_off_zoom_mode
```



---
## _mouse_move
```python
from backend_tools import _mouse_move
```



---
## _release
```python
from backend_tools import _release
```



---
## format_shortcut
```python
from backend_tools import format_shortcut
```

Convert a shortcut string from the notation used in rc config to the
standard notation for displaying shortcuts, e.g. 'ctrl+a' -> 'Ctrl+A'.

---
## _format_tool_keymap
```python
from backend_tools import _format_tool_keymap
```



---
## _get_help_entries
```python
from backend_tools import _get_help_entries
```



---
## _get_help_text
```python
from backend_tools import _get_help_text
```



---
## _get_help_html
```python
from backend_tools import _get_help_html
```



---
## graphviz_dump_transform
```python
from _internal_utils import graphviz_dump_transform
```

Generate a graphical representation of the transform tree for *transform*
using the :program:`dot` program (which this function depends on).  The
output format (png, dot, etc.) is determined from the suffix of *dest*.

Parameters
----------
transform : `~matplotlib.transform.Transform`
    The represented transform.
dest : str
    Output filename.  The extension must be one of the formats supported
    by :program:`dot`, e.g. png, svg, dot, ...
    (see https://www.graphviz.org/doc/info/output.html).
highlight : list of `~matplotlib.transform.Transform` or None
    The transforms in the tree to be drawn in bold.
    If *None*, *transform* is highlighted.

---
## recurse
```python
from _internal_utils import recurse
```



---
## __name__
```python
from _color_data import __name__
```



---
## __name__
```python
from texmanager import __name__
```

Support for embedded TeX expressions in Matplotlib.

Requirements:

* LaTeX.
* \*Agg backends: dvipng>=1.6.
* PS backend: PSfrag, dvips, and Ghostscript>=9.0.
* PDF and SVG backends: if LuaTeX is present, it will be used to speed up some
  post-processing steps, but note that it is not used to parse the TeX string
  itself (only LaTeX is supported).

To enable TeX rendering of all text in your Matplotlib figure, set
:rc:`text.usetex` to True.

TeX and dvipng/dvips processing results are cached
in ~/.matplotlib/tex.cache for reuse between sessions.

`TexManager.get_rgba` can also be used to directly obtain raster output as RGBA
NumPy arrays.

---
## _usepackage_if_not_loaded
```python
from texmanager import _usepackage_if_not_loaded
```

Output LaTeX code that loads a package (possibly with an option) if it
hasn't been loaded yet.

LaTeX cannot load twice a package with different options, so this helper
can be used to protect against users loading arbitrary packages/options in
their custom preamble.

---
## TexManager
```python
from texmanager import TexManager
```

Convert strings to dvi files using TeX, caching the results to a directory.

The cache directory is called ``tex.cache`` and is located in the directory
returned by `.get_cachedir`.

Repeated calls to this constructor always return the same instance.

---
## __new__
```python
from texmanager import __new__
```



---
## _get_font_family_and_reduced
```python
from texmanager import _get_font_family_and_reduced
```

Return the font family name and whether the font is reduced.

---
## _get_font_preamble_and_command
```python
from texmanager import _get_font_preamble_and_command
```



---
## get_basefile
```python
from texmanager import get_basefile
```

Return a filename based on a hash of the string, fontsize, and dpi.

---
## get_font_preamble
```python
from texmanager import get_font_preamble
```

Return a string containing font configuration for the tex preamble.

---
## get_custom_preamble
```python
from texmanager import get_custom_preamble
```

Return a string containing user additions to the tex preamble.

---
## _get_tex_source
```python
from texmanager import _get_tex_source
```

Return the complete TeX source for processing a TeX string.

---
## make_tex
```python
from texmanager import make_tex
```

Generate a tex file to render the tex string at a specific font size.

Return the file name.

---
## _run_checked_subprocess
```python
from texmanager import _run_checked_subprocess
```



---
## make_dvi
```python
from texmanager import make_dvi
```

Generate a dvi file containing latex's layout of tex string.

Return the file name.

---
## make_png
```python
from texmanager import make_png
```

Generate a png file containing latex's rendering of tex string.

Return the file name.

---
## get_grey
```python
from texmanager import get_grey
```

Return the alpha channel.

---
## get_rgba
```python
from texmanager import get_rgba
```

Return latex's rendering of the tex string as an RGBA array.

Examples
--------
>>> texmanager = TexManager()
>>> s = r"\TeX\ is $\displaystyle\sum_n\frac{-e^{i\pi}}{2^n}$!"
>>> Z = texmanager.get_rgba(s, fontsize=12, dpi=80, rgb=(1, 0, 0))

---
## get_text_width_height_descent
```python
from texmanager import get_text_width_height_descent
```

Return width, height and descent of the text.

---
## __name__
```python
from patches import __name__
```



---
## Patch
```python
from patches import Patch
```

A patch is a 2D artist with a face color and an edge color.

If any of *edgecolor*, *facecolor*, *linewidth*, or *antialiased*
are *None*, they default to their rc params setting.

---
## Shadow
```python
from patches import Shadow
```



---
## Rectangle
```python
from patches import Rectangle
```

A rectangle defined via an anchor point *xy* and its *width* and *height*.

The rectangle extends from ``xy[0]`` to ``xy[0] + width`` in x-direction
and from ``xy[1]`` to ``xy[1] + height`` in y-direction. ::

  :                +------------------+
  :                |                  |
  :              height               |
  :                |                  |
  :               (xy)---- width -----+

One may picture *xy* as the bottom left corner, but which corner *xy* is
actually depends on the direction of the axis and the sign of *width*
and *height*; e.g. *xy* would be the bottom right corner if the x-axis
was inverted or if *width* was negative.

---
## RegularPolygon
```python
from patches import RegularPolygon
```

A regular polygon patch.

---
## PathPatch
```python
from patches import PathPatch
```

A general polycurve path patch.

---
## StepPatch
```python
from patches import StepPatch
```

A path patch describing a stepwise constant function.

By default, the path is not closed and starts and stops at
baseline value.

---
## Polygon
```python
from patches import Polygon
```

A general polygon patch.

---
## Wedge
```python
from patches import Wedge
```

Wedge(?) shape. Only works with a quadratic Bézier curve.  The
start point has a width of the *tail_width* and the end point has a
width of 0. At the middle, the width is *shrink_factor*x*tail_width*.

---
## Arrow
```python
from patches import Arrow
```

An arrow patch.

---
## FancyArrow
```python
from patches import FancyArrow
```

Like Arrow, but lets you set head width and head height independently.

---
## CirclePolygon
```python
from patches import CirclePolygon
```

A polygon-approximation of a circle patch.

---
## Ellipse
```python
from patches import Ellipse
```

An elliptical box.

.. versionadded:: 3.7

---
## Annulus
```python
from patches import Annulus
```

An elliptical annulus.

---
## Circle
```python
from patches import Circle
```

A circular box.

---
## Arc
```python
from patches import Arc
```

Creates a piecewise continuous quadratic Bézier path between two
points. The path can have two passing-through points, a
point placed at the distance of *armA* and angle of *angleA* from
point A, another point with respect to point B. The edges are
rounded with *rad*.

---
## bbox_artist
```python
from patches import bbox_artist
```

A debug function to draw a rectangle around the bounding
box returned by an artist's `.Artist.get_window_extent`
to test whether the artist is returning the correct bbox.

*props* is a dict of rectangle props with the additional property
'pad' that sets the padding around the bbox in points.

---
## draw_bbox
```python
from patches import draw_bbox
```

A debug function to draw a rectangle around the bounding
box returned by an artist's `.Artist.get_window_extent`
to test whether the artist is returning the correct bbox.

---
## _Style
```python
from patches import _Style
```

A base class for the Styles. It is meant to be a container class,
where actual styles are declared as subclass of it, and it
provides some helper functions.

---
## _register_style
```python
from patches import _register_style
```

Class decorator that stashes a class in a (style) dictionary.

---
## BoxStyle
```python
from patches import BoxStyle
```

`BoxStyle` is a container class which defines several
boxstyle classes, which are used for `FancyBboxPatch`.

A style object can be created as::

       BoxStyle.Round(pad=0.2)

or::

       BoxStyle("Round", pad=0.2)

or::

       BoxStyle("Round, pad=0.2")

The following boxstyle classes are defined.

%(BoxStyle:table)s

An instance of a boxstyle class is a callable object, with the signature ::

   __call__(self, x0, y0, width, height, mutation_size) -> Path

*x0*, *y0*, *width* and *height* specify the location and size of the box
to be drawn; *mutation_size* scales the outline properties such as padding.

---
## ConnectionStyle
```python
from patches import ConnectionStyle
```

`ConnectionStyle` is a container class which defines
several connectionstyle classes, which is used to create a path
between two points.  These are mainly used with `FancyArrowPatch`.

A connectionstyle object can be either created as::

       ConnectionStyle.Arc3(rad=0.2)

or::

       ConnectionStyle("Arc3", rad=0.2)

or::

       ConnectionStyle("Arc3, rad=0.2")

The following classes are defined

%(ConnectionStyle:table)s

An instance of any connection style class is a callable object,
whose call signature is::

    __call__(self, posA, posB,
             patchA=None, patchB=None,
             shrinkA=2., shrinkB=2.)

and it returns a `.Path` instance. *posA* and *posB* are
tuples of (x, y) coordinates of the two points to be
connected. *patchA* (or *patchB*) is given, the returned path is
clipped so that it start (or end) from the boundary of the
patch. The path is further shrunk by *shrinkA* (or *shrinkB*)
which is given in points.

---
## _point_along_a_line
```python
from patches import _point_along_a_line
```

Return the point on the line connecting (*x0*, *y0*) -- (*x1*, *y1*) whose
distance from (*x0*, *y0*) is *d*.

---
## ArrowStyle
```python
from patches import ArrowStyle
```

`ArrowStyle` is a container class which defines several
arrowstyle classes, which is used to create an arrow path along a
given path.  These are mainly used with `FancyArrowPatch`.

An arrowstyle object can be either created as::

       ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)

or::

       ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)

or::

       ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")

The following classes are defined

%(ArrowStyle:table)s

For an overview of the visual appearance, see
:doc:`/gallery/text_labels_and_annotations/fancyarrow_demo`.

An instance of any arrow style class is a callable object,
whose call signature is::

    __call__(self, path, mutation_size, linewidth, aspect_ratio=1.)

and it returns a tuple of a `.Path` instance and a boolean
value. *path* is a `.Path` instance along which the arrow
will be drawn. *mutation_size* and *aspect_ratio* have the same
meaning as in `BoxStyle`. *linewidth* is a line width to be
stroked. This is meant to be used to correct the location of the
head so that it does not overshoot the destination point, but not all
classes support it.

Notes
-----
*angleA* and *angleB* specify the orientation of the bracket, as either a
clockwise or counterclockwise angle depending on the arrow type. 0 degrees
means perpendicular to the line connecting the arrow's head and tail.

.. plot:: gallery/text_labels_and_annotations/angles_on_bracket_arrows.py

---
## FancyBboxPatch
```python
from patches import FancyBboxPatch
```

A fancy box around a rectangle with lower left at *xy* = (*x*, *y*)
with specified width and height.

`.FancyBboxPatch` is similar to `.Rectangle`, but it draws a fancy box
around the rectangle. The transformation of the rectangle box to the
fancy box is delegated to the style classes defined in `.BoxStyle`.

---
## FancyArrowPatch
```python
from patches import FancyArrowPatch
```

A fancy arrow patch.

It draws an arrow using the `ArrowStyle`. It is primarily used by the
`~.axes.Axes.annotate` method.  For most purposes, use the annotate method for
drawing arrows.

The head and tail positions are fixed at the specified start and end points
of the arrow, but the size and shape (in display coordinates) of the arrow
does not change when the axis is moved or zoomed.

---
## ConnectionPatch
```python
from patches import ConnectionPatch
```

A patch that connects two points (possibly in different Axes).

---
## __init__
```python
from patches import __init__
```

Parameters
----------
tail_width : float, default: 0.3
    Width of the tail.

shrink_factor : float, default: 0.5
    Fraction of the arrow width at the middle point.

---
## get_verts
```python
from patches import get_verts
```

Return a copy of the vertices used in this patch.

If the patch contains Bézier curves, the curves will be interpolated by
line segments.  To access the curves as curves, use `get_path`.

---
## _process_radius
```python
from patches import _process_radius
```



---
## contains
```python
from patches import contains
```

Test whether the mouse event occurred in the patch.

Parameters
----------
mouseevent : `~matplotlib.backend_bases.MouseEvent`
    Where the user clicked.

radius : float, optional
    Additional margin on the patch in target coordinates of
    `.Patch.get_transform`. See `.Path.contains_point` for further
    details.

    If `None`, the default value depends on the state of the object:

    - If `.Artist.get_picker` is a number, the default
      is that value.  This is so that picking works as expected.
    - Otherwise if the edge color has a non-zero alpha, the default
      is half of the linewidth.  This is so that all the colored
      pixels are "in" the patch.
    - Finally, if the edge has 0 alpha, the default is 0.  This is
      so that patches without a stroked edge do not have points
      outside of the filled region report as "in" due to an
      invisible edge.


Returns
-------
(bool, empty dict)

---
## contains_point
```python
from patches import contains_point
```

Return whether the given point is inside the patch.

Parameters
----------
point : (float, float)
    The point (x, y) to check, in target coordinates of
    ``.Patch.get_transform()``. These are display coordinates for patches
    that are added to a figure or Axes.
radius : float, optional
    Additional margin on the patch in target coordinates of
    `.Patch.get_transform`. See `.Path.contains_point` for further
    details.

    If `None`, the default value depends on the state of the object:

    - If `.Artist.get_picker` is a number, the default
      is that value.  This is so that picking works as expected.
    - Otherwise if the edge color has a non-zero alpha, the default
      is half of the linewidth.  This is so that all the colored
      pixels are "in" the patch.
    - Finally, if the edge has 0 alpha, the default is 0.  This is
      so that patches without a stroked edge do not have points
      outside of the filled region report as "in" due to an
      invisible edge.

Returns
-------
bool

Notes
-----
The proper use of this method depends on the transform of the patch.
Isolated patches do not have a transform. In this case, the patch
creation coordinates and the point coordinates match. The following
example checks that the center of a circle is within the circle

>>> center = 0, 0
>>> c = Circle(center, radius=1)
>>> c.contains_point(center)
True

The convention of checking against the transformed patch stems from
the fact that this method is predominantly used to check if display
coordinates (e.g. from mouse events) are within the patch. If you want
to do the above check with data coordinates, you have to properly
transform them first:

>>> center = 0, 0
>>> c = Circle(center, radius=3)
>>> plt.gca().add_patch(c)
>>> transformed_interior_point = c.get_data_transform().transform((0, 2))
>>> c.contains_point(transformed_interior_point)
True

---
## contains_points
```python
from patches import contains_points
```

Return whether the given points are inside the patch.

Parameters
----------
points : (N, 2) array
    The points to check, in target coordinates of
    ``self.get_transform()``. These are display coordinates for patches
    that are added to a figure or Axes. Columns contain x and y values.
radius : float, optional
    Additional margin on the patch in target coordinates of
    `.Patch.get_transform`. See `.Path.contains_point` for further
    details.

    If `None`, the default value depends on the state of the object:

    - If `.Artist.get_picker` is a number, the default
      is that value.  This is so that picking works as expected.
    - Otherwise if the edge color has a non-zero alpha, the default
      is half of the linewidth.  This is so that all the colored
      pixels are "in" the patch.
    - Finally, if the edge has 0 alpha, the default is 0.  This is
      so that patches without a stroked edge do not have points
      outside of the filled region report as "in" due to an
      invisible edge.

Returns
-------
length-N bool array

Notes
-----
The proper use of this method depends on the transform of the patch.
See the notes on `.Patch.contains_point`.

---
## update_from
```python
from patches import update_from
```



---
## get_extents
```python
from patches import get_extents
```

Return the `Patch`'s axis-aligned extents as a `~.transforms.Bbox`.

---
## get_transform
```python
from patches import get_transform
```

Return the `~.transforms.Transform` applied to the `Patch`.

---
## get_data_transform
```python
from patches import get_data_transform
```

Return the `~.transforms.Transform` mapping data coordinates to
physical coordinates.

---
## get_patch_transform
```python
from patches import get_patch_transform
```



---
## get_antialiased
```python
from patches import get_antialiased
```

Return whether antialiasing is used for drawing.

---
## get_edgecolor
```python
from patches import get_edgecolor
```

Return the edge color.

---
## get_facecolor
```python
from patches import get_facecolor
```

Return the face color.

---
## get_linewidth
```python
from patches import get_linewidth
```

Return the line width in points.

---
## get_linestyle
```python
from patches import get_linestyle
```

Return the linestyle.

---
## set_antialiased
```python
from patches import set_antialiased
```

Set whether to use antialiased rendering.

Parameters
----------
aa : bool or None

---
## _set_edgecolor
```python
from patches import _set_edgecolor
```



---
## set_edgecolor
```python
from patches import set_edgecolor
```

Set the patch edge color.

Parameters
----------
color : :mpltype:`color` or None

---
## _set_facecolor
```python
from patches import _set_facecolor
```



---
## set_facecolor
```python
from patches import set_facecolor
```

Set the patch face color.

Parameters
----------
color : :mpltype:`color` or None

---
## set_color
```python
from patches import set_color
```

Set both the edgecolor and the facecolor.

Parameters
----------
c : :mpltype:`color`

See Also
--------
Patch.set_facecolor, Patch.set_edgecolor
    For setting the edge or face color individually.

---
## set_alpha
```python
from patches import set_alpha
```



---
## set_linewidth
```python
from patches import set_linewidth
```

Set the patch linewidth in points.

Parameters
----------
w : float or None

---
## set_linestyle
```python
from patches import set_linestyle
```

Set the patch linestyle.

==========================================  =================
linestyle                                   description
==========================================  =================
``'-'`` or ``'solid'``                      solid line
``'--'`` or  ``'dashed'``                   dashed line
``'-.'`` or  ``'dashdot'``                  dash-dotted line
``':'`` or ``'dotted'``                     dotted line
``'none'``, ``'None'``, ``' '``, or ``''``  draw nothing
==========================================  =================

Alternatively a dash tuple of the following form can be provided::

    (offset, onoffseq)

where ``onoffseq`` is an even length tuple of on and off ink in points.

Parameters
----------
ls : {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
    The line style.

---
## set_fill
```python
from patches import set_fill
```

Set whether to fill the patch.

Parameters
----------
b : bool

---
## get_fill
```python
from patches import get_fill
```

Return whether the patch is filled.

---
## set_capstyle
```python
from patches import set_capstyle
```

Set the `.CapStyle`.

The default capstyle is 'round' for `.FancyArrowPatch` and 'butt' for
all other patches.

Parameters
----------
s : `.CapStyle` or %(CapStyle)s

---
## get_capstyle
```python
from patches import get_capstyle
```

Return the capstyle.

---
## set_joinstyle
```python
from patches import set_joinstyle
```

Set the `.JoinStyle`.

The default joinstyle is 'round' for `.FancyArrowPatch` and 'miter' for
all other patches.

Parameters
----------
s : `.JoinStyle` or %(JoinStyle)s

---
## get_joinstyle
```python
from patches import get_joinstyle
```

Return the joinstyle.

---
## set_hatch
```python
from patches import set_hatch
```

Set the hatching pattern.

*hatch* can be one of::

  /   - diagonal hatching
  \   - back diagonal
  |   - vertical
  -   - horizontal
  +   - crossed
  x   - crossed diagonal
  o   - small circle
  O   - large circle
  .   - dots
  *   - stars

Letters can be combined, in which case all the specified
hatchings are done.  If same letter repeats, it increases the
density of hatching of that pattern.

Parameters
----------
hatch : {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

---
## get_hatch
```python
from patches import get_hatch
```

Return the hatching pattern.

---
## _draw_paths_with_artist_properties
```python
from patches import _draw_paths_with_artist_properties
```

``draw()`` helper factored out for sharing with `FancyArrowPatch`.

Configure *renderer* and the associated graphics context *gc*
from the artist properties, then repeatedly call
``renderer.draw_path(gc, *draw_path_args)`` for each tuple
*draw_path_args* in *draw_path_args_list*.

---
## draw
```python
from patches import draw
```



---
## get_path
```python
from patches import get_path
```

Return the path of the arrow in the data coordinates.

---
## get_window_extent
```python
from patches import get_window_extent
```



---
## _convert_xy_units
```python
from patches import _convert_xy_units
```

Convert x and y units for a tuple (x, y).

---
## __str__
```python
from patches import __str__
```



---
## _update_transform
```python
from patches import _update_transform
```



---
## _convert_units
```python
from patches import _convert_units
```

Convert bounds of the rectangle.

---
## rotation_point
```python
from patches import rotation_point
```



---
## get_x
```python
from patches import get_x
```

Return the left coord of the rectangle.

---
## get_y
```python
from patches import get_y
```

Return the bottom coord of the rectangle.

---
## get_xy
```python
from patches import get_xy
```

Get the vertices of the path.

Returns
-------
(N, 2) array
    The coordinates of the vertices.

---
## get_corners
```python
from patches import get_corners
```

Return the corners of the ellipse bounding box.

The bounding box orientation is moving anti-clockwise from the
lower left corner defined before rotation.

---
## get_center
```python
from patches import get_center
```

Return the center of the annulus.

---
## get_width
```python
from patches import get_width
```

Return the width of the rectangle.

---
## get_height
```python
from patches import get_height
```

Return the height of the rectangle.

---
## get_angle
```python
from patches import get_angle
```

Return the angle of the annulus.

---
## set_x
```python
from patches import set_x
```

Set the left coord of the rectangle.

Parameters
----------
x : float

---
## set_y
```python
from patches import set_y
```

Set the bottom coord of the rectangle.

Parameters
----------
y : float

---
## set_angle
```python
from patches import set_angle
```

Set the tilt angle of the annulus.

Parameters
----------
angle : float

---
## set_xy
```python
from patches import set_xy
```

Set the vertices of the polygon.

Parameters
----------
xy : (N, 2) array-like
    The coordinates of the vertices.

Notes
-----
Unlike `.Path`, we do not ignore the last input vertex. If the
polygon is meant to be closed, and the last point of the polygon is not
equal to the first, we assume that the user has not explicitly passed a
``CLOSEPOLY`` vertex, and add it ourselves.

---
## set_width
```python
from patches import set_width
```

Set the rectangle width.

Parameters
----------
w : float

---
## set_height
```python
from patches import set_height
```

Set the rectangle height.

Parameters
----------
h : float

---
## set_bounds
```python
from patches import set_bounds
```

Set the bounds of the rectangle.

Call signatures::

    set_bounds(left, bottom, width, height)
    set_bounds((left, bottom, width, height))

Parameters
----------
left, bottom : float
    The coordinates of the bottom left corner of the rectangle.
width, height : float
    The width/height of the rectangle.

---
## get_bbox
```python
from patches import get_bbox
```

Return the `.Bbox`.

---
## set_path
```python
from patches import set_path
```



---
## _update_path
```python
from patches import _update_path
```



---
## get_data
```python
from patches import get_data
```

Get `.StepPatch` values, edges and baseline as namedtuple.

---
## set_data
```python
from patches import set_data
```

Set `.FancyArrow` x, y, dx, dy, width, head_with, and head_length.
Values left as None will not be updated.

Parameters
----------
x, y : float or None, default: None
    The x and y coordinates of the arrow base.

dx, dy : float or None, default: None
    The length of the arrow along x and y direction.

width : float or None, default: None
    Width of full arrow tail.

head_width : float or None, default: None
    Total width of the full arrow head.

head_length : float or None, default: None
    Length of arrow head.

---
## get_closed
```python
from patches import get_closed
```

Return whether the polygon is closed.

---
## set_closed
```python
from patches import set_closed
```

Set whether the polygon is closed.

Parameters
----------
closed : bool
    True if the polygon is closed

---
## _recompute_path
```python
from patches import _recompute_path
```



---
## set_center
```python
from patches import set_center
```

Set the center of the annulus.

Parameters
----------
xy : (float, float)

---
## set_radius
```python
from patches import set_radius
```

Set the radius of the circle.

Parameters
----------
radius : float

---
## set_theta1
```python
from patches import set_theta1
```



---
## set_theta2
```python
from patches import set_theta2
```



---
## _make_verts
```python
from patches import _make_verts
```



---
## _recompute_transform
```python
from patches import _recompute_transform
```

Notes
-----
This cannot be called until after this has been added to an Axes,
otherwise unit conversion will fail. This makes it very important to
call the accessor method and not directly access the transformation
member variable.

---
## get_vertices
```python
from patches import get_vertices
```

Return the vertices coordinates of the ellipse.

The definition can be found `here <https://en.wikipedia.org/wiki/Ellipse>`_

.. versionadded:: 3.8

---
## get_co_vertices
```python
from patches import get_co_vertices
```

Return the co-vertices coordinates of the ellipse.

The definition can be found `here <https://en.wikipedia.org/wiki/Ellipse>`_

.. versionadded:: 3.8

---
## set_semimajor
```python
from patches import set_semimajor
```

Set the semi-major axis *a* of the annulus.

Parameters
----------
a : float

---
## set_semiminor
```python
from patches import set_semiminor
```

Set the semi-minor axis *b* of the annulus.

Parameters
----------
b : float

---
## set_radii
```python
from patches import set_radii
```

Set the semi-major (*a*) and semi-minor radii (*b*) of the annulus.

Parameters
----------
r : float or (float, float)
    The radius, or semi-axes:

    - If float: radius of the outer circle.
    - If two floats: semi-major and -minor axes of outer ellipse.

---
## get_radii
```python
from patches import get_radii
```

Return the semi-major and semi-minor radii of the annulus.

---
## _transform_verts
```python
from patches import _transform_verts
```



---
## get_radius
```python
from patches import get_radius
```

Return the radius of the circle.

---
## _theta_stretch
```python
from patches import _theta_stretch
```



---
## __init_subclass__
```python
from patches import __init_subclass__
```



---
## __new__
```python
from patches import __new__
```

Return the instance of the subclass with the given style name.

---
## get_styles
```python
from patches import get_styles
```

Return a dictionary of available styles.

---
## pprint_styles
```python
from patches import pprint_styles
```

Return the available styles as pretty-printed string.

---
## register
```python
from patches import register
```

Register a new style.

---
## Square
```python
from patches import Square
```

A square box.

---
## LArrow
```python
from patches import LArrow
```

A box in the shape of a left-pointing arrow.

---
## RArrow
```python
from patches import RArrow
```

A box in the shape of a right-pointing arrow.

---
## DArrow
```python
from patches import DArrow
```

A box in the shape of a two-way arrow.

---
## Round
```python
from patches import Round
```

A box with round corners.

---
## Round4
```python
from patches import Round4
```

A box with rounded edges.

---
## Sawtooth
```python
from patches import Sawtooth
```

A box with a sawtooth outline.

---
## Roundtooth
```python
from patches import Roundtooth
```

A box with a rounded sawtooth outline.

---
## _Base
```python
from patches import _Base
```

Arrow Transmuter Base class

ArrowTransmuterBase and its derivatives are used to make a fancy
arrow around a given path. The __call__ method returns a path
(which will be used to create a PathPatch instance) and a boolean
value indicating the path is open therefore is not fillable.  This
class is not an artist and actual drawing of the fancy arrow is
done by the FancyArrowPatch class.

---
## Arc3
```python
from patches import Arc3
```

Creates a simple quadratic Bézier curve between two
points. The curve is created so that the middle control point
(C1) is located at the same distance from the start (C0) and
end points(C2) and the distance of the C1 to the line
connecting C0-C2 is *rad* times the distance of C0-C2.

---
## Angle3
```python
from patches import Angle3
```

Creates a simple quadratic Bézier curve between two points. The middle
control point is placed at the intersecting point of two lines which
cross the start and end point, and have a slope of *angleA* and
*angleB*, respectively.

---
## Angle
```python
from patches import Angle
```

Creates a piecewise continuous quadratic Bézier path between two
points. The path has a one passing-through point placed at the
intersecting point of two lines which cross the start and end point,
and have a slope of *angleA* and *angleB*, respectively.
The connecting edges are rounded with *rad*.

---
## Bar
```python
from patches import Bar
```

A line with *angle* between A and B with *armA* and *armB*. One of the
arms is extended so that they are connected in a right angle. The
length of *armA* is determined by (*armA* + *fraction* x AB distance).
Same for *armB*.

---
## _Curve
```python
from patches import _Curve
```

A simple arrow which will work with any path instance. The
returned path is the concatenation of the original path, and at
most two paths representing the arrow head or bracket at the start
point and at the end point. The arrow heads can be either open
or closed.

---
## Curve
```python
from patches import Curve
```

A simple curve without any arrow head.

---
## CurveA
```python
from patches import CurveA
```

An arrow with a head at its start point.

---
## CurveB
```python
from patches import CurveB
```

An arrow with a head at its end point.

---
## CurveAB
```python
from patches import CurveAB
```

An arrow with heads both at the start and the end point.

---
## CurveFilledA
```python
from patches import CurveFilledA
```

An arrow with filled triangle head at the start.

---
## CurveFilledB
```python
from patches import CurveFilledB
```

An arrow with filled triangle head at the end.

---
## CurveFilledAB
```python
from patches import CurveFilledAB
```

An arrow with filled triangle heads at both ends.

---
## BracketA
```python
from patches import BracketA
```

An arrow with an outward square bracket at its start.

---
## BracketB
```python
from patches import BracketB
```

An arrow with an outward square bracket at its end.

---
## BracketAB
```python
from patches import BracketAB
```

An arrow with outward square brackets at both ends.

---
## BarAB
```python
from patches import BarAB
```

An arrow with vertical bars ``|`` at both ends.

---
## BracketCurve
```python
from patches import BracketCurve
```

An arrow with an outward square bracket at its start and a head at
the end.

---
## CurveBracket
```python
from patches import CurveBracket
```

An arrow with an outward square bracket at its end and a head at
the start.

---
## Simple
```python
from patches import Simple
```

A simple arrow. Only works with a quadratic Bézier curve.

---
## Fancy
```python
from patches import Fancy
```

A fancy arrow. Only works with a quadratic Bézier curve.

---
## set_boxstyle
```python
from patches import set_boxstyle
```

Set the box style, possibly with further attributes.

Attributes from the previous box style are not reused.

Without argument (or with ``boxstyle=None``), the available box styles
are returned as a human-readable string.

Parameters
----------
boxstyle : str or `~matplotlib.patches.BoxStyle`
    The style of the box: either a `.BoxStyle` instance, or a string,
    which is the style name and optionally comma separated attributes
    (e.g. "Round,pad=0.2"). Such a string is used to construct a
    `.BoxStyle` object, as documented in that class.

    The following box styles are available:

    %(BoxStyle:table_and_accepts)s

**kwargs
    Additional attributes for the box style. See the table above for
    supported parameters.

Examples
--------
::

    set_boxstyle("Round,pad=0.2")
    set_boxstyle("round", pad=0.2)

---
## get_boxstyle
```python
from patches import get_boxstyle
```

Return the boxstyle object.

---
## set_mutation_scale
```python
from patches import set_mutation_scale
```

Set the mutation scale.

Parameters
----------
scale : float

---
## get_mutation_scale
```python
from patches import get_mutation_scale
```

Return the mutation scale.

Returns
-------
scalar

---
## set_mutation_aspect
```python
from patches import set_mutation_aspect
```

Set the aspect ratio of the bbox mutation.

Parameters
----------
aspect : float

---
## get_mutation_aspect
```python
from patches import get_mutation_aspect
```

Return the aspect ratio of the bbox mutation.

---
## set_positions
```python
from patches import set_positions
```

Set the start and end positions of the connecting path.

Parameters
----------
posA, posB : None, tuple
    (x, y) coordinates of arrow tail and arrow head respectively. If
    `None` use current value.

---
## set_patchA
```python
from patches import set_patchA
```

Set the tail patch.

Parameters
----------
patchA : `.patches.Patch`

---
## set_patchB
```python
from patches import set_patchB
```

Set the head patch.

Parameters
----------
patchB : `.patches.Patch`

---
## set_connectionstyle
```python
from patches import set_connectionstyle
```

Set the connection style, possibly with further attributes.

Attributes from the previous connection style are not reused.

Without argument (or with ``connectionstyle=None``), the available box
styles are returned as a human-readable string.

Parameters
----------
connectionstyle : str or `~matplotlib.patches.ConnectionStyle`
    The style of the connection: either a `.ConnectionStyle` instance,
    or a string, which is the style name and optionally comma separated
    attributes (e.g. "Arc,armA=30,rad=10"). Such a string is used to
    construct a `.ConnectionStyle` object, as documented in that class.

    The following connection styles are available:

    %(ConnectionStyle:table_and_accepts)s

**kwargs
    Additional attributes for the connection style. See the table above
    for supported parameters.

Examples
--------
::

    set_connectionstyle("Arc,armA=30,rad=10")
    set_connectionstyle("arc", armA=30, rad=10)

---
## get_connectionstyle
```python
from patches import get_connectionstyle
```

Return the `ConnectionStyle` used.

---
## set_arrowstyle
```python
from patches import set_arrowstyle
```

Set the arrow style, possibly with further attributes.

Attributes from the previous arrow style are not reused.

Without argument (or with ``arrowstyle=None``), the available box
styles are returned as a human-readable string.

Parameters
----------
arrowstyle : str or `~matplotlib.patches.ArrowStyle`
    The style of the arrow: either a `.ArrowStyle` instance, or a
    string, which is the style name and optionally comma separated
    attributes (e.g. "Fancy,head_length=0.2"). Such a string is used to
    construct a `.ArrowStyle` object, as documented in that class.

    The following arrow styles are available:

    %(ArrowStyle:table_and_accepts)s

**kwargs
    Additional attributes for the arrow style. See the table above for
    supported parameters.

Examples
--------
::

    set_arrowstyle("Fancy,head_length=0.2")
    set_arrowstyle("fancy", head_length=0.2)

---
## get_arrowstyle
```python
from patches import get_arrowstyle
```

Return the arrowstyle object.

---
## _get_path_in_displaycoord
```python
from patches import _get_path_in_displaycoord
```

Return the mutated path of the arrow in display coordinates.

---
## _get_xy
```python
from patches import _get_xy
```

Calculate the pixel position of given point.

---
## set_annotation_clip
```python
from patches import set_annotation_clip
```

Set the annotation's clipping behavior.

Parameters
----------
b : bool or None
    - True: The annotation will be clipped when ``self.xy`` is
      outside the Axes.
    - False: The annotation will always be drawn.
    - None: The annotation will be clipped when ``self.xy`` is
      outside the Axes and ``self.xycoords == "data"``.

---
## get_annotation_clip
```python
from patches import get_annotation_clip
```

Return the clipping behavior.

See `.set_annotation_clip` for the meaning of the return value.

---
## _check_xy
```python
from patches import _check_xy
```

Check whether the annotation needs to be drawn.

---
## line_circle_intersect
```python
from patches import line_circle_intersect
```



---
## segment_circle_intersect
```python
from patches import segment_circle_intersect
```



---
## theta_stretch
```python
from patches import theta_stretch
```



---
## __call__
```python
from patches import __call__
```

The __call__ method is a thin wrapper around the transmute method
and takes care of the aspect ratio.

---
## _get_sawtooth_vertices
```python
from patches import _get_sawtooth_vertices
```



---
## _in_patch
```python
from patches import _in_patch
```

Return a predicate function testing whether a point *xy* is
contained in *patch*.

---
## _clip
```python
from patches import _clip
```

Clip *path* at its start by the region where *in_start* returns
True, and at its stop by the region where *in_stop* returns True.

The original path is assumed to start in the *in_start* region and
to stop in the *in_stop* region.

---
## connect
```python
from patches import connect
```



---
## ensure_quadratic_bezier
```python
from patches import ensure_quadratic_bezier
```

Some ArrowStyle classes only works with a simple quadratic
Bézier curve (created with `.ConnectionStyle.Arc3` or
`.ConnectionStyle.Angle3`). This static method checks if the
provided path is a simple quadratic Bézier curve and returns its
control points if true.

---
## transmute
```python
from patches import transmute
```



---
## _get_arrow_wedge
```python
from patches import _get_arrow_wedge
```

Return the paths for arrow heads. Since arrow lines are
drawn with capstyle=projected, The arrow goes beyond the
desired point. This method also returns the amount of the path
to be shrunken so that it does not overshoot.

---
## _get_bracket
```python
from patches import _get_bracket
```



---
## __name__
```python
from stackplot import __name__
```

Stacked area plot for 1D arrays inspired by Douglas Y'barbo's stackoverflow
answer:
https://stackoverflow.com/q/2225995/

(https://stackoverflow.com/users/66549/doug)

---
## stackplot
```python
from stackplot import stackplot
```

Draw a stacked area plot or a streamgraph.

Parameters
----------
x : (N,) array-like

y : (M, N) array-like
    The data is assumed to be unstacked. Each of the following
    calls is legal::

        stackplot(x, y)           # where y has shape (M, N)
        stackplot(x, y1, y2, y3)  # where y1, y2, y3, y4 have length N

baseline : {'zero', 'sym', 'wiggle', 'weighted_wiggle'}
    Method used to calculate the baseline:

    - ``'zero'``: Constant zero baseline, i.e. a simple stacked plot.
    - ``'sym'``:  Symmetric around zero and is sometimes called
      'ThemeRiver'.
    - ``'wiggle'``: Minimizes the sum of the squared slopes.
    - ``'weighted_wiggle'``: Does the same but weights to account for
      size of each layer. It is also called 'Streamgraph'-layout. More
      details can be found at http://leebyron.com/streamgraph/.

labels : list of str, optional
    A sequence of labels to assign to each data series. If unspecified,
    then no labels will be applied to artists.

colors : list of :mpltype:`color`, optional
    A sequence of colors to be cycled through and used to color the stacked
    areas. The sequence need not be exactly the same length as the number
    of provided *y*, in which case the colors will repeat from the
    beginning.

    If not specified, the colors from the Axes property cycle will be used.

hatch : list of str, default: None
    A sequence of hatching styles.  See
    :doc:`/gallery/shapes_and_collections/hatch_style_reference`.
    The sequence will be cycled through for filling the
    stacked areas from bottom to top.
    It need not be exactly the same length as the number
    of provided *y*, in which case the styles will repeat from the
    beginning.

    .. versionadded:: 3.9
       Support for list input

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    All other keyword arguments are passed to `.Axes.fill_between`.

Returns
-------
list of `.PolyCollection`
    A list of `.PolyCollection` instances, one for each element in the
    stacked area plot.

---
## __name__
```python
from collections import __name__
```

Classes for the efficient drawing of large collections of objects that
share most properties, e.g., a large number of line segments or
polygons.

The classes are not meant to be as flexible as their single element
counterparts (e.g., you may not be able to select all line styles) but
they are meant to be fast for common use cases (e.g., a large set of solid
line segments).

---
## Collection
```python
from collections import Collection
```

Base class for Collections. Must be subclassed to be usable.

A Collection represents a sequence of `.Patch`\es that can be drawn
more efficiently together than individually. For example, when a single
path is being drawn repeatedly at different offsets, the renderer can
typically execute a ``draw_marker()`` call much more efficiently than a
series of repeated calls to ``draw_path()`` with the offsets put in
one-by-one.

Most properties of a collection can be configured per-element. Therefore,
Collections have "plural" versions of many of the properties of a `.Patch`
(e.g. `.Collection.get_paths` instead of `.Patch.get_path`). Exceptions are
the *zorder*, *hatch*, *pickradius*, *capstyle* and *joinstyle* properties,
which can only be set globally for the whole collection.

Besides these exceptions, all properties can be specified as single values
(applying to all elements) or sequences of values. The property of the
``i``\th element of the collection is::

  prop[i % len(prop)]

Each Collection can optionally be used as its own `.ScalarMappable` by
passing the *norm* and *cmap* parameters to its constructor. If the
Collection's `.ScalarMappable` matrix ``_A`` has been set (via a call
to `.Collection.set_array`), then at draw time this internal scalar
mappable will be used to set the ``facecolors`` and ``edgecolors``,
ignoring those that were manually passed in.

---
## _CollectionWithSizes
```python
from collections import _CollectionWithSizes
```

Base class for collections that have an array of sizes.

---
## PathCollection
```python
from collections import PathCollection
```

A collection of `~.path.Path`\s, as created by e.g. `~.Axes.scatter`.

---
## PolyCollection
```python
from collections import PolyCollection
```



---
## RegularPolyCollection
```python
from collections import RegularPolyCollection
```

A collection of n-sided regular polygons.

---
## StarPolygonCollection
```python
from collections import StarPolygonCollection
```

Draw a collection of regular stars with *numsides* points.

---
## AsteriskPolygonCollection
```python
from collections import AsteriskPolygonCollection
```

Draw a collection of regular asterisks with *numsides* points.

---
## LineCollection
```python
from collections import LineCollection
```

Represents a sequence of `.Line2D`\s that should be drawn together.

This class extends `.Collection` to represent a sequence of
`.Line2D`\s instead of just a sequence of `.Patch`\s.
Just as in `.Collection`, each property of a *LineCollection* may be either
a single value or a list of values. This list is then used cyclically for
each element of the LineCollection, so the property of the ``i``\th element
of the collection is::

  prop[i % len(prop)]

The properties of each member of a *LineCollection* default to their values
in :rc:`lines.*` instead of :rc:`patch.*`, and the property *colors* is
added in place of *edgecolors*.

---
## EventCollection
```python
from collections import EventCollection
```

A collection of locations along a single axis at which an "event" occurred.

The events are given by a 1-dimensional array. They do not have an
amplitude and are displayed as parallel lines.

---
## CircleCollection
```python
from collections import CircleCollection
```

A collection of circles, drawn using splines.

---
## EllipseCollection
```python
from collections import EllipseCollection
```

A collection of ellipses, drawn using splines.

---
## PatchCollection
```python
from collections import PatchCollection
```

A generic collection of patches.

PatchCollection draws faster than a large number of equivalent individual
Patches. It also makes it easier to assign a colormap to a heterogeneous
collection of patches.

---
## TriMesh
```python
from collections import TriMesh
```

Class for the efficient drawing of a triangular mesh using Gouraud shading.

A triangular mesh is a `~matplotlib.tri.Triangulation` object.

---
## _MeshData
```python
from collections import _MeshData
```

Class for managing the two dimensional coordinates of Quadrilateral meshes
and the associated data with them. This class is a mixin and is intended to
be used with another collection that will implement the draw separately.

A quadrilateral mesh is a grid of M by N adjacent quadrilaterals that are
defined via a (M+1, N+1) grid of vertices. The quadrilateral (m, n) is
defined by the vertices ::

           (m+1, n) ----------- (m+1, n+1)
              /                   /
             /                 /
            /               /
        (m, n) -------- (m, n+1)

The mesh need not be regular and the polygons need not be convex.

Parameters
----------
coordinates : (M+1, N+1, 2) array-like
    The vertices. ``coordinates[m, n]`` specifies the (x, y) coordinates
    of vertex (m, n).

shading : {'flat', 'gouraud'}, default: 'flat'

---
## QuadMesh
```python
from collections import QuadMesh
```

Class for the efficient drawing of a quadrilateral mesh.

A quadrilateral mesh is a grid of M by N adjacent quadrilaterals that are
defined via a (M+1, N+1) grid of vertices. The quadrilateral (m, n) is
defined by the vertices ::

           (m+1, n) ----------- (m+1, n+1)
              /                   /
             /                 /
            /               /
        (m, n) -------- (m, n+1)

The mesh need not be regular and the polygons need not be convex.

Parameters
----------
coordinates : (M+1, N+1, 2) array-like
    The vertices. ``coordinates[m, n]`` specifies the (x, y) coordinates
    of vertex (m, n).

antialiased : bool, default: True

shading : {'flat', 'gouraud'}, default: 'flat'

Notes
-----
Unlike other `.Collection`\s, the default *pickradius* of `.QuadMesh` is 0,
i.e. `~.Artist.contains` checks whether the test point is within any of the
mesh quadrilaterals.

---
## PolyQuadMesh
```python
from collections import PolyQuadMesh
```

Class for drawing a quadrilateral mesh as individual Polygons.

A quadrilateral mesh is a grid of M by N adjacent quadrilaterals that are
defined via a (M+1, N+1) grid of vertices. The quadrilateral (m, n) is
defined by the vertices ::

           (m+1, n) ----------- (m+1, n+1)
              /                   /
             /                 /
            /               /
        (m, n) -------- (m, n+1)

The mesh need not be regular and the polygons need not be convex.

Parameters
----------
coordinates : (M+1, N+1, 2) array-like
    The vertices. ``coordinates[m, n]`` specifies the (x, y) coordinates
    of vertex (m, n).

Notes
-----
Unlike `.QuadMesh`, this class will draw each cell as an individual Polygon.
This is significantly slower, but allows for more flexibility when wanting
to add additional properties to the cells, such as hatching.

Another difference from `.QuadMesh` is that if any of the vertices or data
of a cell are masked, that Polygon will **not** be drawn and it won't be in
the list of paths returned.

---
## __init__
```python
from collections import __init__
```



---
## get_paths
```python
from collections import get_paths
```



---
## set_paths
```python
from collections import set_paths
```



---
## get_transforms
```python
from collections import get_transforms
```



---
## get_offset_transform
```python
from collections import get_offset_transform
```

Return the `.Transform` instance used by this artist offset.

---
## set_offset_transform
```python
from collections import set_offset_transform
```

Set the artist offset transform.

Parameters
----------
offset_transform : `.Transform`

---
## get_datalim
```python
from collections import get_datalim
```



---
## get_window_extent
```python
from collections import get_window_extent
```



---
## _prepare_points
```python
from collections import _prepare_points
```



---
## draw
```python
from collections import draw
```



---
## set_pickradius
```python
from collections import set_pickradius
```

Set the pick radius used for containment tests.

Parameters
----------
pickradius : float
    Pick radius, in points.

---
## get_pickradius
```python
from collections import get_pickradius
```



---
## contains
```python
from collections import contains
```

Test whether the mouse event occurred in the collection.

Returns ``bool, dict(ind=itemlist)``, where every item in itemlist
contains the event.

---
## set_urls
```python
from collections import set_urls
```

Parameters
----------
urls : list of str or None

Notes
-----
URLs are currently only implemented by the SVG backend. They are
ignored by all other backends.

---
## get_urls
```python
from collections import get_urls
```

Return a list of URLs, one for each element of the collection.

The list contains *None* for elements without a URL. See
:doc:`/gallery/misc/hyperlinks_sgskip` for an example.

---
## set_hatch
```python
from collections import set_hatch
```

Set the hatching pattern

*hatch* can be one of::

  /   - diagonal hatching
  \   - back diagonal
  |   - vertical
  -   - horizontal
  +   - crossed
  x   - crossed diagonal
  o   - small circle
  O   - large circle
  .   - dots
  *   - stars

Letters can be combined, in which case all the specified
hatchings are done.  If same letter repeats, it increases the
density of hatching of that pattern.

Unlike other properties such as linewidth and colors, hatching
can only be specified for the collection as a whole, not separately
for each member.

Parameters
----------
hatch : {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

---
## get_hatch
```python
from collections import get_hatch
```

Return the current hatching pattern.

---
## set_offsets
```python
from collections import set_offsets
```

Set the offsets for the collection.

Parameters
----------
offsets : (N, 2) or (2,) array-like

---
## get_offsets
```python
from collections import get_offsets
```

Return the offsets for the collection.

---
## _get_default_linewidth
```python
from collections import _get_default_linewidth
```



---
## set_linewidth
```python
from collections import set_linewidth
```

Set the linewidth(s) for the collection.  *lw* can be a scalar
or a sequence; if it is a sequence the patches will cycle
through the sequence

Parameters
----------
lw : float or list of floats

---
## set_linestyle
```python
from collections import set_linestyle
```

Set the linestyle(s) for the collection.

===========================   =================
linestyle                     description
===========================   =================
``'-'`` or ``'solid'``        solid line
``'--'`` or  ``'dashed'``     dashed line
``'-.'`` or  ``'dashdot'``    dash-dotted line
``':'`` or ``'dotted'``       dotted line
===========================   =================

Alternatively a dash tuple of the following form can be provided::

    (offset, onoffseq),

where ``onoffseq`` is an even length tuple of on and off ink in points.

Parameters
----------
ls : str or tuple or list thereof
    Valid values for individual linestyles include {'-', '--', '-.',
    ':', '', (offset, on-off-seq)}. See `.Line2D.set_linestyle` for a
    complete description.

---
## set_capstyle
```python
from collections import set_capstyle
```

Set the `.CapStyle` for the collection (for all its elements).

Parameters
----------
cs : `.CapStyle` or %(CapStyle)s

---
## get_capstyle
```python
from collections import get_capstyle
```

Return the cap style for the collection (for all its elements).

Returns
-------
%(CapStyle)s or None

---
## set_joinstyle
```python
from collections import set_joinstyle
```

Set the `.JoinStyle` for the collection (for all its elements).

Parameters
----------
js : `.JoinStyle` or %(JoinStyle)s

---
## get_joinstyle
```python
from collections import get_joinstyle
```

Return the join style for the collection (for all its elements).

Returns
-------
%(JoinStyle)s or None

---
## _bcast_lwls
```python
from collections import _bcast_lwls
```

Internal helper function to broadcast + scale ls/lw

In the collection drawing code, the linewidth and linestyle are cycled
through as circular buffers (via ``v[i % len(v)]``).  Thus, if we are
going to scale the dash pattern at set time (not draw time) we need to
do the broadcasting now and expand both lists to be the same length.

Parameters
----------
linewidths : list
    line widths of collection
dashes : list
    dash specification (offset, (dash pattern tuple))

Returns
-------
linewidths, dashes : list
    Will be the same length, dashes are scaled by paired linewidth

---
## get_antialiased
```python
from collections import get_antialiased
```

Get the antialiasing state for rendering.

Returns
-------
array of bools

---
## set_antialiased
```python
from collections import set_antialiased
```

Set the antialiasing state for rendering.

Parameters
----------
aa : bool or list of bools

---
## _get_default_antialiased
```python
from collections import _get_default_antialiased
```



---
## set_color
```python
from collections import set_color
```

Set the edgecolor(s) of the LineCollection.

Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color`
    Single color (all lines have same color), or a
    sequence of RGBA tuples; if it is a sequence the lines will
    cycle through the sequence.

---
## _get_default_facecolor
```python
from collections import _get_default_facecolor
```



---
## _set_facecolor
```python
from collections import _set_facecolor
```



---
## set_facecolor
```python
from collections import set_facecolor
```

Set the facecolor(s) of the collection. *c* can be a color (all patches
have same color), or a sequence of colors; if it is a sequence the
patches will cycle through the sequence.

If *c* is 'none', the patch will not be filled.

Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color`

---
## get_facecolor
```python
from collections import get_facecolor
```



---
## get_edgecolor
```python
from collections import get_edgecolor
```



---
## _get_default_edgecolor
```python
from collections import _get_default_edgecolor
```



---
## _set_edgecolor
```python
from collections import _set_edgecolor
```



---
## set_edgecolor
```python
from collections import set_edgecolor
```

Set the edgecolor(s) of the collection.

Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color` or 'face'
    The collection edgecolor(s).  If a sequence, the patches cycle
    through it.  If 'face', match the facecolor.

---
## set_alpha
```python
from collections import set_alpha
```



---
## get_linewidth
```python
from collections import get_linewidth
```

Get the width of the lines used to mark each event.

---
## get_linestyle
```python
from collections import get_linestyle
```



---
## _set_mappable_flags
```python
from collections import _set_mappable_flags
```

Determine whether edges and/or faces are color-mapped.

This is a helper for update_scalarmappable.
It sets Boolean flags '_edge_is_mapped' and '_face_is_mapped'.

Returns
-------
mapping_change : bool
    True if either flag is True, or if a flag has changed.

---
## update_scalarmappable
```python
from collections import update_scalarmappable
```

Update colors from the scalar mappable array, if any.

Assign colors to edges and faces based on the array and/or
colors that were directly set, as appropriate.

---
## get_fill
```python
from collections import get_fill
```

Return whether face is colored.

---
## update_from
```python
from collections import update_from
```

Copy properties from other to self.

---
## get_sizes
```python
from collections import get_sizes
```

Return the sizes ('areas') of the elements in the collection.

Returns
-------
array
    The 'area' of each element.

---
## set_sizes
```python
from collections import set_sizes
```

Set the sizes of each member of the collection.

Parameters
----------
sizes : `numpy.ndarray` or None
    The size to set for each element of the collection.  The
    value is the 'area' of the element.
dpi : float, default: 72
    The dpi of the canvas.

---
## legend_elements
```python
from collections import legend_elements
```

Create legend handles and labels for a PathCollection.

Each legend handle is a `.Line2D` representing the Path that was drawn,
and each label is a string that represents the Path.

This is useful for obtaining a legend for a `~.Axes.scatter` plot;
e.g.::

    scatter = plt.scatter([1, 2, 3],  [4, 5, 6],  c=[7, 2, 3], num=None)
    plt.legend(*scatter.legend_elements())

creates three legend elements, one for each color with the numerical
values passed to *c* as the labels.

Also see the :ref:`automatedlegendcreation` example.

Parameters
----------
prop : {"colors", "sizes"}, default: "colors"
    If "colors", the legend handles will show the different colors of
    the collection. If "sizes", the legend will show the different
    sizes. To set both, use *kwargs* to directly edit the `.Line2D`
    properties.
num : int, None, "auto" (default), array-like, or `~.ticker.Locator`
    Target number of elements to create.
    If None, use all unique elements of the mappable array. If an
    integer, target to use *num* elements in the normed range.
    If *"auto"*, try to determine which option better suits the nature
    of the data.
    The number of created elements may slightly deviate from *num* due
    to a `~.ticker.Locator` being used to find useful locations.
    If a list or array, use exactly those elements for the legend.
    Finally, a `~.ticker.Locator` can be provided.
fmt : str, `~matplotlib.ticker.Formatter`, or None (default)
    The format or formatter to use for the labels. If a string must be
    a valid input for a `.StrMethodFormatter`. If None (the default),
    use a `.ScalarFormatter`.
func : function, default: ``lambda x: x``
    Function to calculate the labels.  Often the size (or color)
    argument to `~.Axes.scatter` will have been pre-processed by the
    user using a function ``s = f(x)`` to make the markers visible;
    e.g. ``size = np.log10(x)``.  Providing the inverse of this
    function here allows that pre-processing to be inverted, so that
    the legend labels have the correct values; e.g. ``func = lambda
    x: 10**x``.
**kwargs
    Allowed keyword arguments are *color* and *size*. E.g. it may be
    useful to set the color of the markers if *prop="sizes"* is used;
    similarly to set the size of the markers if *prop="colors"* is
    used. Any further parameters are passed onto the `.Line2D`
    instance. This may be useful to e.g. specify a different
    *markeredgecolor* or *alpha* for the legend handles.

Returns
-------
handles : list of `.Line2D`
    Visual representation of each element of the legend.
labels : list of str
    The string labels for elements of the legend.

---
## set_verts
```python
from collections import set_verts
```

Set the vertices of the polygons.

Parameters
----------
verts : list of array-like
    The sequence of polygons [*verts0*, *verts1*, ...] where each
    element *verts_i* defines the vertices of polygon *i* as a 2D
    array-like of shape (M, 2).
closed : bool, default: True
    Whether the polygon should be closed by adding a CLOSEPOLY
    connection at the end.

---
## set_verts_and_codes
```python
from collections import set_verts_and_codes
```

Initialize vertices with path codes.

---
## get_numsides
```python
from collections import get_numsides
```



---
## get_rotation
```python
from collections import get_rotation
```



---
## set_segments
```python
from collections import set_segments
```



---
## get_segments
```python
from collections import get_segments
```

Returns
-------
list
    List of segments in the LineCollection. Each list item contains an
    array of vertices.

---
## get_color
```python
from collections import get_color
```

Return the color of the lines used to mark each event.

---
## set_gapcolor
```python
from collections import set_gapcolor
```

Set a color to fill the gaps in the dashed line style.

.. note::

    Striped lines are created by drawing two interleaved dashed lines.
    There can be overlaps between those two, which may result in
    artifacts when using transparency.

    This functionality is experimental and may change.

Parameters
----------
gapcolor : :mpltype:`color` or list of :mpltype:`color` or None
    The color with which to fill the gaps. If None, the gaps are
    unfilled.

---
## _set_gapcolor
```python
from collections import _set_gapcolor
```



---
## get_gapcolor
```python
from collections import get_gapcolor
```



---
## _get_inverse_paths_linestyles
```python
from collections import _get_inverse_paths_linestyles
```

Returns the path and pattern for the gaps in the non-solid lines.

This path and pattern is the inverse of the path and pattern used to
construct the non-solid lines. For solid lines, we set the inverse path
to nans to prevent drawing an inverse line.

---
## get_positions
```python
from collections import get_positions
```

Return an array containing the floating-point values of the positions.

---
## set_positions
```python
from collections import set_positions
```

Set the positions of the events.

---
## add_positions
```python
from collections import add_positions
```

Add one or more events at the specified positions.

---
## is_horizontal
```python
from collections import is_horizontal
```

True if the eventcollection is horizontal, False if vertical.

---
## get_orientation
```python
from collections import get_orientation
```

Return the orientation of the event line ('horizontal' or 'vertical').

---
## switch_orientation
```python
from collections import switch_orientation
```

Switch the orientation of the event line, either from vertical to
horizontal or vice versus.

---
## set_orientation
```python
from collections import set_orientation
```

Set the orientation of the event line.

Parameters
----------
orientation : {'horizontal', 'vertical'}

---
## get_linelength
```python
from collections import get_linelength
```

Return the length of the lines used to mark each event.

---
## set_linelength
```python
from collections import set_linelength
```

Set the length of the lines used to mark each event.

---
## get_lineoffset
```python
from collections import get_lineoffset
```

Return the offset of the lines used to mark each event.

---
## set_lineoffset
```python
from collections import set_lineoffset
```

Set the offset of the lines used to mark each event.

---
## get_linewidths
```python
from collections import get_linewidths
```



---
## _set_transforms
```python
from collections import _set_transforms
```

Calculate transforms immediately before drawing.

---
## set_widths
```python
from collections import set_widths
```

Set the lengths of the first axes (e.g., major axis).

---
## set_heights
```python
from collections import set_heights
```

Set the lengths of second axes (e.g., minor axes).

---
## set_angles
```python
from collections import set_angles
```

Set the angles of the first axes, degrees CCW from the x-axis.

---
## get_widths
```python
from collections import get_widths
```

Get the lengths of the first axes (e.g., major axis).

---
## get_heights
```python
from collections import get_heights
```

Set the lengths of second axes (e.g., minor axes).

---
## get_angles
```python
from collections import get_angles
```

Get the angles of the first axes, degrees CCW from the x-axis.

---
## convert_mesh_to_paths
```python
from collections import convert_mesh_to_paths
```

Convert a given mesh into a sequence of `.Path` objects.

This function is primarily of use to implementers of backends that do
not directly support meshes.

---
## set_array
```python
from collections import set_array
```



---
## get_coordinates
```python
from collections import get_coordinates
```

Return the vertices of the mesh as an (M+1, N+1, 2) array.

M, N are the number of quadrilaterals in the rows / columns of the
mesh, corresponding to (M+1, N+1) vertices.
The last dimension specifies the components (x, y).

---
## _convert_mesh_to_paths
```python
from collections import _convert_mesh_to_paths
```

Convert a given mesh into a sequence of `.Path` objects.

This function is primarily of use to implementers of backends that do
not directly support quadmeshes.

---
## _convert_mesh_to_triangles
```python
from collections import _convert_mesh_to_triangles
```

Convert a given mesh into a sequence of triangles, each point
with its own color.  The result can be used to construct a call to
`~.RendererBase.draw_gouraud_triangles`.

---
## get_cursor_data
```python
from collections import get_cursor_data
```



---
## _get_unmasked_polys
```python
from collections import _get_unmasked_polys
```

Get the unmasked regions using the coordinates and array

---
## _set_unmasked_verts
```python
from collections import _set_unmasked_verts
```



---
## get_array
```python
from collections import get_array
```



---
## determine_facecolor
```python
from collections import determine_facecolor
```



---
## __name__
```python
from spines import __name__
```



---
## Spine
```python
from spines import Spine
```

An axis spine -- the line noting the data area boundaries.

Spines are the lines connecting the axis tick marks and noting the
boundaries of the data area. They can be placed at arbitrary
positions. See `~.Spine.set_position` for more information.

The default position is ``('outward', 0)``.

Spines are subclasses of `.Patch`, and inherit much of their behavior.

Spines draw a line, a circle, or an arc depending on if
`~.Spine.set_patch_line`, `~.Spine.set_patch_circle`, or
`~.Spine.set_patch_arc` has been called. Line-like is the default.

For examples see :ref:`spines_examples`.

---
## SpinesProxy
```python
from spines import SpinesProxy
```

A proxy to broadcast ``set_*()`` and ``set()`` method calls to contained `.Spines`.

The proxy cannot be used for any other operations on its members.

The supported methods are determined dynamically based on the contained
spines. If not all spines support a given method, it's executed only on
the subset of spines that support it.

---
## Spines
```python
from spines import Spines
```

The container of all `.Spine`\s in an Axes.

The interface is dict-like mapping names (e.g. 'left') to `.Spine` objects.
Additionally, it implements some pandas.Series-like features like accessing
elements by attribute::

    spines['top'].set_visible(False)
    spines.top.set_visible(False)

Multiple spines can be addressed simultaneously by passing a list::

    spines[['top', 'right']].set_visible(False)

Use an open slice to address all spines::

    spines[:].set_visible(False)

The latter two indexing methods will return a `SpinesProxy` that broadcasts all
``set_*()`` and ``set()`` calls to its members, but cannot be used for any other
operation.

---
## __str__
```python
from spines import __str__
```



---
## __init__
```python
from spines import __init__
```



---
## set_patch_arc
```python
from spines import set_patch_arc
```

Set the spine to be arc-like.

---
## set_patch_circle
```python
from spines import set_patch_circle
```

Set the spine to be circular.

---
## set_patch_line
```python
from spines import set_patch_line
```

Set the spine to be linear.

---
## _recompute_transform
```python
from spines import _recompute_transform
```

Notes
-----
This cannot be called until after this has been added to an Axes,
otherwise unit conversion will fail. This makes it very important to
call the accessor method and not directly access the transformation
member variable.

---
## get_patch_transform
```python
from spines import get_patch_transform
```



---
## get_window_extent
```python
from spines import get_window_extent
```

Return the window extent of the spines in display space, including
padding for ticks (but not their labels)

See Also
--------
matplotlib.axes.Axes.get_tightbbox
matplotlib.axes.Axes.get_window_extent

---
## get_path
```python
from spines import get_path
```



---
## _ensure_position_is_set
```python
from spines import _ensure_position_is_set
```



---
## register_axis
```python
from spines import register_axis
```

Register an axis.

An axis should be registered with its corresponding spine from
the Axes instance. This allows the spine to clear any axis
properties when needed.

---
## clear
```python
from spines import clear
```

Clear the current spine.

---
## _clear
```python
from spines import _clear
```

Clear things directly related to the spine.

In this way it is possible to avoid clearing the Axis as well when calling
from library code where it is known that the Axis is cleared separately.

---
## _adjust_location
```python
from spines import _adjust_location
```

Automatically set spine bounds to the view interval.

---
## draw
```python
from spines import draw
```



---
## set_position
```python
from spines import set_position
```

Set the position of the spine.

Spine position is specified by a 2 tuple of (position type,
amount). The position types are:

* 'outward': place the spine out from the data area by the specified
  number of points. (Negative values place the spine inwards.)
* 'axes': place the spine at the specified Axes coordinate (0 to 1).
* 'data': place the spine at the specified data coordinate.

Additionally, shorthand notations define a special positions:

* 'center' -> ``('axes', 0.5)``
* 'zero' -> ``('data', 0.0)``

Examples
--------
:doc:`/gallery/spines/spine_placement_demo`

---
## get_position
```python
from spines import get_position
```

Return the spine position.

---
## get_spine_transform
```python
from spines import get_spine_transform
```

Return the spine transform.

---
## set_bounds
```python
from spines import set_bounds
```

Set the spine bounds.

Parameters
----------
low : float or None, optional
    The lower spine bound. Passing *None* leaves the limit unchanged.

    The bounds may also be passed as the tuple (*low*, *high*) as the
    first positional argument.

    .. ACCEPTS: (low: float, high: float)

high : float or None, optional
    The higher spine bound. Passing *None* leaves the limit unchanged.

---
## get_bounds
```python
from spines import get_bounds
```

Get the bounds of the spine.

---
## linear_spine
```python
from spines import linear_spine
```

Create and return a linear `Spine`.

---
## arc_spine
```python
from spines import arc_spine
```

Create and return an arc `Spine`.

---
## circular_spine
```python
from spines import circular_spine
```

Create and return a circular `Spine`.

---
## set_color
```python
from spines import set_color
```

Set the edgecolor.

Parameters
----------
c : :mpltype:`color`

Notes
-----
This method does not modify the facecolor (which defaults to "none"),
unlike the `.Patch.set_color` method defined in the parent class.  Use
`.Patch.set_facecolor` to set the facecolor.

---
## __getattr__
```python
from spines import __getattr__
```



---
## __dir__
```python
from spines import __dir__
```



---
## from_dict
```python
from spines import from_dict
```



---
## __getstate__
```python
from spines import __getstate__
```



---
## __setstate__
```python
from spines import __setstate__
```



---
## __getitem__
```python
from spines import __getitem__
```



---
## __setitem__
```python
from spines import __setitem__
```



---
## __delitem__
```python
from spines import __delitem__
```



---
## __iter__
```python
from spines import __iter__
```



---
## __len__
```python
from spines import __len__
```



---
## x
```python
from spines import x
```



---
## __name__
```python
from _text_helpers import __name__
```

Low-level text helper utilities.

---
## LayoutItem
```python
from _text_helpers import LayoutItem
```



---
## warn_on_missing_glyph
```python
from _text_helpers import warn_on_missing_glyph
```



---
## layout
```python
from _text_helpers import layout
```

Render *string* with *font*.

For each character in *string*, yield a LayoutItem instance. When such an instance
is yielded, the font's glyph is set to the corresponding character.

Parameters
----------
string : str
    The string to be rendered.
font : FT2Font
    The font.
kern_mode : int
    A FreeType kerning mode.

Yields
------
LayoutItem

---
## _get_textbox
```python
from text import _get_textbox
```

Calculate the bounding box of the text.

The bbox position takes text rotation into account, but the width and
height are those of the unrotated box (unlike `.Text.get_window_extent`).

---
## _get_text_metrics_with_cache
```python
from text import _get_text_metrics_with_cache
```

Call ``renderer.get_text_width_height_descent``, caching the results.

---
## _get_text_metrics_with_cache_impl
```python
from text import _get_text_metrics_with_cache_impl
```



---
## OffsetFrom
```python
from text import OffsetFrom
```

Callable helper class for working with `Annotation`.

---
## _AnnotationBase
```python
from text import _AnnotationBase
```



---
## Annotation
```python
from text import Annotation
```

An `.Annotation` is a `.Text` that can refer to a specific position *xy*.
Optionally an arrow pointing from the text to *xy* can be drawn.

Attributes
----------
xy
    The annotated position.
xycoords
    The coordinate system for *xy*.
arrow_patch
    A `.FancyArrowPatch` to point from *xytext* to *xy*.

---
## _reset_visual_defaults
```python
from text import _reset_visual_defaults
```



---
## update
```python
from text import update
```



---
## __getstate__
```python
from text import __getstate__
```



---
## contains
```python
from text import contains
```

Return boolean specifying if x is a valid member of this space.

---
## _get_xy_display
```python
from text import _get_xy_display
```

Get the (possibly unit converted) transformed x, y in display coords.

---
## _get_multialignment
```python
from text import _get_multialignment
```



---
## _char_index_at
```python
from text import _char_index_at
```

Calculate the index closest to the coordinate x in display space.

The position of text[index] is assumed to be the sum of the widths
of all preceding characters text[:index].

This works only on single line texts.

---
## get_rotation
```python
from text import get_rotation
```

Return the text angle in degrees between 0 and 360.

---
## get_transform_rotates_text
```python
from text import get_transform_rotates_text
```

Return whether rotations of the transform affect the text direction.

---
## set_rotation_mode
```python
from text import set_rotation_mode
```

Set text rotation mode.

Parameters
----------
m : {None, 'default', 'anchor'}
    If ``"default"``, the text will be first rotated, then aligned according
    to their horizontal and vertical alignments.  If ``"anchor"``, then
    alignment occurs before rotation. Passing ``None`` will set the rotation
    mode to ``"default"``.

---
## get_rotation_mode
```python
from text import get_rotation_mode
```

Return the text rotation mode.

---
## set_antialiased
```python
from text import set_antialiased
```

Set whether to use antialiased rendering.

Parameters
----------
antialiased : bool

Notes
-----
Antialiasing will be determined by :rc:`text.antialiased`
and the parameter *antialiased* will have no effect if the text contains
math expressions.

---
## get_antialiased
```python
from text import get_antialiased
```

Return whether antialiased rendering is used.

---
## update_from
```python
from text import update_from
```



---
## _get_layout
```python
from text import _get_layout
```

Return the extent (bbox) of the text together with
multiple-alignment information. Note that it returns an extent
of a rotated text when necessary.

---
## set_bbox
```python
from text import set_bbox
```

Draw a bounding box around self.

Parameters
----------
rectprops : dict with properties for `.patches.FancyBboxPatch`
     The default boxstyle is 'square'. The mutation
     scale of the `.patches.FancyBboxPatch` is set to the fontsize.

Examples
--------
::

    t.set_bbox(dict(facecolor='red', alpha=0.5))

---
## get_bbox_patch
```python
from text import get_bbox_patch
```

Return the bbox Patch, or None if the `.patches.FancyBboxPatch`
is not made.

---
## update_bbox_position_size
```python
from text import update_bbox_position_size
```

Update the location and the size of the bbox.

This method should be used when the position and size of the bbox needs
to be updated before actually drawing the bbox.

---
## _update_clip_properties
```python
from text import _update_clip_properties
```



---
## set_clip_box
```python
from text import set_clip_box
```



---
## set_clip_path
```python
from text import set_clip_path
```



---
## set_clip_on
```python
from text import set_clip_on
```



---
## get_wrap
```python
from text import get_wrap
```

Return whether the text can be wrapped.

---
## set_wrap
```python
from text import set_wrap
```

Set whether the text can be wrapped.

Wrapping makes sure the text is confined to the (sub)figure box. It
does not take into account any other artists.

Parameters
----------
wrap : bool

Notes
-----
Wrapping does not work together with
``savefig(..., bbox_inches='tight')`` (which is also used internally
by ``%matplotlib inline`` in IPython/Jupyter). The 'tight' setting
rescales the canvas to accommodate all content and happens before
wrapping.

---
## _get_wrap_line_width
```python
from text import _get_wrap_line_width
```

Return the maximum line width for wrapping text based on the current
orientation.

---
## _get_dist_to_box
```python
from text import _get_dist_to_box
```

Return the distance from the given points to the boundaries of a
rotated box, in pixels.

---
## _get_rendered_text_width
```python
from text import _get_rendered_text_width
```

Return the width of a given text string, in pixels.

---
## _get_wrapped_text
```python
from text import _get_wrapped_text
```

Return a copy of the text string with new lines added so that the text
is wrapped relative to the parent figure (if `get_wrap` is True).

---
## draw
```python
from text import draw
```



---
## get_color
```python
from text import get_color
```

Return the color of the text.

---
## get_fontproperties
```python
from text import get_fontproperties
```

Return the `.font_manager.FontProperties`.

---
## get_fontfamily
```python
from text import get_fontfamily
```

Return the list of font families used for font lookup.

See Also
--------
.font_manager.FontProperties.get_family

---
## get_fontname
```python
from text import get_fontname
```

Return the font name as a string.

See Also
--------
.font_manager.FontProperties.get_name

---
## get_fontstyle
```python
from text import get_fontstyle
```

Return the font style as a string.

See Also
--------
.font_manager.FontProperties.get_style

---
## get_fontsize
```python
from text import get_fontsize
```

Return the font size as an integer.

See Also
--------
.font_manager.FontProperties.get_size_in_points

---
## get_fontvariant
```python
from text import get_fontvariant
```

Return the font variant as a string.

See Also
--------
.font_manager.FontProperties.get_variant

---
## get_fontweight
```python
from text import get_fontweight
```

Return the font weight as a string or a number.

See Also
--------
.font_manager.FontProperties.get_weight

---
## get_stretch
```python
from text import get_stretch
```

Return the font stretch as a string or a number.

See Also
--------
.font_manager.FontProperties.get_stretch

---
## get_horizontalalignment
```python
from text import get_horizontalalignment
```

Return the horizontal alignment as a string.  Will be one of
'left', 'center' or 'right'.

---
## get_unitless_position
```python
from text import get_unitless_position
```

Return the (x, y) unitless position of the text.

---
## get_position
```python
from text import get_position
```

Return the (x, y) position of the text.

---
## get_text
```python
from text import get_text
```

Return the text string.

---
## get_verticalalignment
```python
from text import get_verticalalignment
```

Return the vertical alignment as a string.  Will be one of
'top', 'center', 'bottom', 'baseline' or 'center_baseline'.

---
## get_window_extent
```python
from text import get_window_extent
```



---
## set_backgroundcolor
```python
from text import set_backgroundcolor
```

Set the background color of the text by updating the bbox.

Parameters
----------
color : :mpltype:`color`

See Also
--------
.set_bbox : To change the position of the bounding box

---
## set_color
```python
from text import set_color
```

Set the foreground color of the text

Parameters
----------
color : :mpltype:`color`

---
## set_horizontalalignment
```python
from text import set_horizontalalignment
```

Set the horizontal alignment relative to the anchor point.

See also :doc:`/gallery/text_labels_and_annotations/text_alignment`.

Parameters
----------
align : {'left', 'center', 'right'}

---
## set_multialignment
```python
from text import set_multialignment
```

Set the text alignment for multiline texts.

The layout of the bounding box of all the lines is determined by the
horizontalalignment and verticalalignment properties. This property
controls the alignment of the text lines within that box.

Parameters
----------
align : {'left', 'right', 'center'}

---
## set_linespacing
```python
from text import set_linespacing
```

Set the line spacing as a multiple of the font size.

The default line spacing is 1.2.

Parameters
----------
spacing : float (multiple of font size)

---
## set_fontfamily
```python
from text import set_fontfamily
```

Set the font family.  Can be either a single string, or a list of
strings in decreasing priority.  Each string may be either a real font
name or a generic font class name.  If the latter, the specific font
names will be looked up in the corresponding rcParams.

If a `Text` instance is constructed with ``fontfamily=None``, then the
font is set to :rc:`font.family`, and the
same is done when `set_fontfamily()` is called on an existing
`Text` instance.

Parameters
----------
fontname : {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}

See Also
--------
.font_manager.FontProperties.set_family

---
## set_fontvariant
```python
from text import set_fontvariant
```

Set the font variant.

Parameters
----------
variant : {'normal', 'small-caps'}

See Also
--------
.font_manager.FontProperties.set_variant

---
## set_fontstyle
```python
from text import set_fontstyle
```

Set the font style.

Parameters
----------
fontstyle : {'normal', 'italic', 'oblique'}

See Also
--------
.font_manager.FontProperties.set_style

---
## set_fontsize
```python
from text import set_fontsize
```

Set the font size.

Parameters
----------
fontsize : float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
    If a float, the fontsize in points. The string values denote sizes
    relative to the default font size.

See Also
--------
.font_manager.FontProperties.set_size

---
## get_math_fontfamily
```python
from text import get_math_fontfamily
```

Return the font family name for math text rendered by Matplotlib.

The default value is :rc:`mathtext.fontset`.

See Also
--------
set_math_fontfamily

---
## set_math_fontfamily
```python
from text import set_math_fontfamily
```

Set the font family for math text rendered by Matplotlib.

This does only affect Matplotlib's own math renderer. It has no effect
when rendering with TeX (``usetex=True``).

Parameters
----------
fontfamily : str
    The name of the font family.

    Available font families are defined in the
    :ref:`default matplotlibrc file
    <customizing-with-matplotlibrc-files>`.

See Also
--------
get_math_fontfamily

---
## set_fontweight
```python
from text import set_fontweight
```

Set the font weight.

Parameters
----------
weight : {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}

See Also
--------
.font_manager.FontProperties.set_weight

---
## set_fontstretch
```python
from text import set_fontstretch
```

Set the font stretch (horizontal condensation or expansion).

Parameters
----------
stretch : {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}

See Also
--------
.font_manager.FontProperties.set_stretch

---
## set_position
```python
from text import set_position
```

Set the (*x*, *y*) position of the text.

Parameters
----------
xy : (float, float)

---
## set_x
```python
from text import set_x
```

Set the *x* position of the text.

Parameters
----------
x : float

---
## set_y
```python
from text import set_y
```

Set the *y* position of the text.

Parameters
----------
y : float

---
## set_rotation
```python
from text import set_rotation
```

Set the rotation of the text.

Parameters
----------
s : float or {'vertical', 'horizontal'}
    The rotation angle in degrees in mathematically positive direction
    (counterclockwise). 'horizontal' equals 0, 'vertical' equals 90.

---
## set_transform_rotates_text
```python
from text import set_transform_rotates_text
```

Whether rotations of the transform affect the text direction.

Parameters
----------
t : bool

---
## set_verticalalignment
```python
from text import set_verticalalignment
```

Set the vertical alignment relative to the anchor point.

See also :doc:`/gallery/text_labels_and_annotations/text_alignment`.

Parameters
----------
align : {'baseline', 'bottom', 'center', 'center_baseline', 'top'}

---
## set_text
```python
from text import set_text
```

Set the text string *s*.

It may contain newlines (``\n``) or math in LaTeX syntax.

Parameters
----------
s : object
    Any object gets converted to its `str` representation, except for
    ``None`` which is converted to an empty string.

---
## _preprocess_math
```python
from text import _preprocess_math
```

Return the string *s* after mathtext preprocessing, and the kind of
mathtext support needed.

- If *self* is configured to use TeX, return *s* unchanged except that
  a single space gets escaped, and the flag "TeX".
- Otherwise, if *s* is mathtext (has an even number of unescaped dollar
  signs) and ``parse_math`` is not set to False, return *s* and the
  flag True.
- Otherwise, return *s* with dollar signs unescaped, and the flag
  False.

---
## set_fontproperties
```python
from text import set_fontproperties
```

Set the font properties that control the text.

Parameters
----------
fp : `.font_manager.FontProperties` or `str` or `pathlib.Path`
    If a `str`, it is interpreted as a fontconfig pattern parsed by
    `.FontProperties`.  If a `pathlib.Path`, it is interpreted as the
    absolute path to a font file.

---
## set_usetex
```python
from text import set_usetex
```

Parameters
----------
usetex : bool or None
    Whether to render using TeX, ``None`` means to use
    :rc:`text.usetex`.

---
## get_usetex
```python
from text import get_usetex
```

Return whether this `Text` object uses TeX for rendering.

---
## set_parse_math
```python
from text import set_parse_math
```

Override switch to disable any mathtext parsing for this `Text`.

Parameters
----------
parse_math : bool
    If False, this `Text` will never use mathtext.  If True, mathtext
    will be used if there is an even number of unescaped dollar signs.

---
## get_parse_math
```python
from text import get_parse_math
```

Return whether mathtext parsing is considered for this `Text`.

---
## set_fontname
```python
from text import set_fontname
```

Alias for `set_fontfamily`.

One-way alias only: the getter differs.

Parameters
----------
fontname : {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}

See Also
--------
.font_manager.FontProperties.set_family

---
## set_unit
```python
from text import set_unit
```

Set the unit for input to the transform used by ``__call__``.

Parameters
----------
unit : {'points', 'pixels'}

---
## get_unit
```python
from text import get_unit
```

Return the unit for input to the transform used by ``__call__``.

---
## __call__
```python
from text import __call__
```

Return the offset transform.

Parameters
----------
renderer : `RendererBase`
    The renderer to use to compute the offset

Returns
-------
`Transform`
    Maps (x, y) in pixel or point units to screen units
    relative to the given artist.

---
## _get_xy
```python
from text import _get_xy
```



---
## _get_xy_transform
```python
from text import _get_xy_transform
```



---
## set_annotation_clip
```python
from text import set_annotation_clip
```

Set the annotation's clipping behavior.

Parameters
----------
b : bool or None
    - True: The annotation will be clipped when ``self.xy`` is
      outside the Axes.
    - False: The annotation will always be drawn.
    - None: The annotation will be clipped when ``self.xy`` is
      outside the Axes and ``self.xycoords == "data"``.

---
## get_annotation_clip
```python
from text import get_annotation_clip
```

Return the annotation's clipping behavior.

See `set_annotation_clip` for the meaning of return values.

---
## _get_position_xy
```python
from text import _get_position_xy
```

Return the pixel position of the annotated point.

---
## _check_xy
```python
from text import _check_xy
```

Check whether the annotation at *xy_pixel* should be drawn.

---
## draggable
```python
from text import draggable
```

Set whether the annotation is draggable with the mouse.

Parameters
----------
state : bool or None
    - True or False: set the draggability.
    - None: toggle the draggability.
use_blit : bool, default: False
    Use blitting for faster image composition. For details see
    :ref:`func-animation`.

Returns
-------
DraggableAnnotation or None
    If the annotation is draggable, the corresponding
    `.DraggableAnnotation` helper is returned.

---
## xycoords
```python
from text import xycoords
```



---
## xyann
```python
from text import xyann
```



---
## get_anncoords
```python
from text import get_anncoords
```

Return the coordinate system to use for `.Annotation.xyann`.

See also *xycoords* in `.Annotation`.

---
## set_anncoords
```python
from text import set_anncoords
```

Set the coordinate system to use for `.Annotation.xyann`.

See also *xycoords* in `.Annotation`.

---
## set_figure
```python
from text import set_figure
```



---
## update_positions
```python
from text import update_positions
```

Update the pixel positions of the annotation text and the arrow patch.

---
## get_tightbbox
```python
from text import get_tightbbox
```



---
## is_offset
```python
from text import is_offset
```



---
## MarkerStyle
```python
from markers import MarkerStyle
```

A class representing marker types.

Instances are immutable. If you need to change anything, create a new
instance.

Attributes
----------
markers : dict
    All known markers.
filled_markers : tuple
    All known filled markers. This is a subset of *markers*.
fillstyles : tuple
    The supported fillstyles.

---
## _recache
```python
from markers import _recache
```



---
## __bool__
```python
from markers import __bool__
```



---
## is_filled
```python
from markers import is_filled
```



---
## get_fillstyle
```python
from markers import get_fillstyle
```



---
## _set_fillstyle
```python
from markers import _set_fillstyle
```

Set the fillstyle.

Parameters
----------
fillstyle : {'full', 'left', 'right', 'bottom', 'top', 'none'}
    The part of the marker surface that is colored with
    markerfacecolor.

---
## get_joinstyle
```python
from markers import get_joinstyle
```



---
## get_capstyle
```python
from markers import get_capstyle
```



---
## get_marker
```python
from markers import get_marker
```



---
## _set_marker
```python
from markers import _set_marker
```

Set the marker.

Parameters
----------
marker : str, array-like, Path, MarkerStyle
    - Another instance of `MarkerStyle` copies the details of that *marker*.
    - For other possible marker values see the module docstring
      `matplotlib.markers`.

---
## get_path
```python
from markers import get_path
```

Return a `.Path` for the primary part of the marker.

For unfilled markers this is the whole marker, for filled markers,
this is the area to be drawn with *markerfacecolor*.

---
## get_transform
```python
from markers import get_transform
```

Return the transform to be applied to the `.Path` from
`MarkerStyle.get_path()`.

---
## get_alt_path
```python
from markers import get_alt_path
```

Return a `.Path` for the alternate part of the marker.

For unfilled markers, this is *None*; for filled markers, this is the
area to be drawn with *markerfacecoloralt*.

---
## get_alt_transform
```python
from markers import get_alt_transform
```

Return the transform to be applied to the `.Path` from
`MarkerStyle.get_alt_path()`.

---
## get_snap_threshold
```python
from markers import get_snap_threshold
```



---
## get_user_transform
```python
from markers import get_user_transform
```

Return user supplied part of marker transform.

---
## transformed
```python
from markers import transformed
```

Return a new version of this marker with the transform applied.

Parameters
----------
transform : `~matplotlib.transforms.Affine2D`
    Transform will be combined with current user supplied transform.

---
## rotated
```python
from markers import rotated
```

Return a new version of this marker rotated by specified angle.

Parameters
----------
deg : float, optional
    Rotation angle in degrees.

rad : float, optional
    Rotation angle in radians.

.. note:: You must specify exactly one of deg or rad.

---
## scaled
```python
from markers import scaled
```

Return new marker scaled by specified scale factors.

If *sy* is not given, the same scale is applied in both the *x*- and
*y*-directions.

Parameters
----------
sx : float
    *X*-direction scaling factor.
sy : float, optional
    *Y*-direction scaling factor.

---
## _set_nothing
```python
from markers import _set_nothing
```



---
## _set_custom_marker
```python
from markers import _set_custom_marker
```



---
## _set_path_marker
```python
from markers import _set_path_marker
```



---
## _set_vertices
```python
from markers import _set_vertices
```



---
## _set_tuple_marker
```python
from markers import _set_tuple_marker
```



---
## _set_mathtext_path
```python
from markers import _set_mathtext_path
```

Draw mathtext markers '$...$' using `.TextPath` object.

Submitted by tcb

---
## _half_fill
```python
from markers import _half_fill
```



---
## _set_circle
```python
from markers import _set_circle
```



---
## _set_point
```python
from markers import _set_point
```



---
## _set_pixel
```python
from markers import _set_pixel
```



---
## _set_triangle
```python
from markers import _set_triangle
```



---
## _set_triangle_up
```python
from markers import _set_triangle_up
```



---
## _set_triangle_down
```python
from markers import _set_triangle_down
```



---
## _set_triangle_left
```python
from markers import _set_triangle_left
```



---
## _set_triangle_right
```python
from markers import _set_triangle_right
```



---
## _set_square
```python
from markers import _set_square
```



---
## _set_diamond
```python
from markers import _set_diamond
```



---
## _set_thin_diamond
```python
from markers import _set_thin_diamond
```



---
## _set_pentagon
```python
from markers import _set_pentagon
```



---
## _set_star
```python
from markers import _set_star
```



---
## _set_hexagon1
```python
from markers import _set_hexagon1
```



---
## _set_hexagon2
```python
from markers import _set_hexagon2
```



---
## _set_octagon
```python
from markers import _set_octagon
```



---
## _set_vline
```python
from markers import _set_vline
```



---
## _set_hline
```python
from markers import _set_hline
```



---
## _set_tickleft
```python
from markers import _set_tickleft
```



---
## _set_tickright
```python
from markers import _set_tickright
```



---
## _set_tickup
```python
from markers import _set_tickup
```



---
## _set_tickdown
```python
from markers import _set_tickdown
```



---
## _set_tri_down
```python
from markers import _set_tri_down
```



---
## _set_tri_up
```python
from markers import _set_tri_up
```



---
## _set_tri_left
```python
from markers import _set_tri_left
```



---
## _set_tri_right
```python
from markers import _set_tri_right
```



---
## _set_caretdown
```python
from markers import _set_caretdown
```



---
## _set_caretup
```python
from markers import _set_caretup
```



---
## _set_caretleft
```python
from markers import _set_caretleft
```



---
## _set_caretright
```python
from markers import _set_caretright
```



---
## _set_caretdownbase
```python
from markers import _set_caretdownbase
```



---
## _set_caretupbase
```python
from markers import _set_caretupbase
```



---
## _set_caretleftbase
```python
from markers import _set_caretleftbase
```



---
## _set_caretrightbase
```python
from markers import _set_caretrightbase
```



---
## _set_plus
```python
from markers import _set_plus
```



---
## _set_x
```python
from markers import _set_x
```



---
## _set_plus_filled
```python
from markers import _set_plus_filled
```



---
## _set_x_filled
```python
from markers import _set_x_filled
```



---
## __name__
```python
from mlab import __name__
```

Numerical Python functions written for compatibility with MATLAB
commands with the same names. Most numerical Python functions can be found in
the `NumPy`_ and `SciPy`_ libraries. What remains here is code for performing
spectral computations and kernel density estimations.

.. _NumPy: https://numpy.org
.. _SciPy: https://www.scipy.org

Spectral functions
------------------

`cohere`
    Coherence (normalized cross spectral density)

`csd`
    Cross spectral density using Welch's average periodogram

`detrend`
    Remove the mean or best fit line from an array

`psd`
    Power spectral density using Welch's average periodogram

`specgram`
    Spectrogram (spectrum over segments of time)

`complex_spectrum`
    Return the complex-valued frequency spectrum of a signal

`magnitude_spectrum`
    Return the magnitude of the frequency spectrum of a signal

`angle_spectrum`
    Return the angle (wrapped phase) of the frequency spectrum of a signal

`phase_spectrum`
    Return the phase (unwrapped angle) of the frequency spectrum of a signal

`detrend_mean`
    Remove the mean from a line.

`detrend_linear`
    Remove the best fit line from a line.

`detrend_none`
    Return the original line.

---
## window_hanning
```python
from mlab import window_hanning
```

Return *x* times the Hanning (or Hann) window of len(*x*).

See Also
--------
window_none : Another window algorithm.

---
## window_none
```python
from mlab import window_none
```

No window function; simply return *x*.

See Also
--------
window_hanning : Another window algorithm.

---
## detrend
```python
from mlab import detrend
```

Return *x* with its trend removed.

Parameters
----------
x : array or sequence
    Array or sequence containing the data.

key : {'default', 'constant', 'mean', 'linear', 'none'} or function
    The detrending algorithm to use. 'default', 'mean', and 'constant' are
    the same as `detrend_mean`. 'linear' is the same as `detrend_linear`.
    'none' is the same as `detrend_none`. The default is 'mean'. See the
    corresponding functions for more details regarding the algorithms. Can
    also be a function that carries out the detrend operation.

axis : int
    The axis along which to do the detrending.

See Also
--------
detrend_mean : Implementation of the 'mean' algorithm.
detrend_linear : Implementation of the 'linear' algorithm.
detrend_none : Implementation of the 'none' algorithm.

---
## detrend_mean
```python
from mlab import detrend_mean
```

Return *x* minus the mean(*x*).

Parameters
----------
x : array or sequence
    Array or sequence containing the data
    Can have any dimensionality

axis : int
    The axis along which to take the mean.  See `numpy.mean` for a
    description of this argument.

See Also
--------
detrend_linear : Another detrend algorithm.
detrend_none : Another detrend algorithm.
detrend : A wrapper around all the detrend algorithms.

---
## detrend_none
```python
from mlab import detrend_none
```

Return *x*: no detrending.

Parameters
----------
x : any object
    An object containing the data

axis : int
    This parameter is ignored.
    It is included for compatibility with detrend_mean

See Also
--------
detrend_mean : Another detrend algorithm.
detrend_linear : Another detrend algorithm.
detrend : A wrapper around all the detrend algorithms.

---
## detrend_linear
```python
from mlab import detrend_linear
```

Return *x* minus best fit line; 'linear' detrending.

Parameters
----------
y : 0-D or 1-D array or sequence
    Array or sequence containing the data

See Also
--------
detrend_mean : Another detrend algorithm.
detrend_none : Another detrend algorithm.
detrend : A wrapper around all the detrend algorithms.

---
## _spectral_helper
```python
from mlab import _spectral_helper
```

Private helper implementing the common parts between the psd, csd,
spectrogram and complex, magnitude, angle, and phase spectrums.

---
## _single_spectrum_helper
```python
from mlab import _single_spectrum_helper
```

Private helper implementing the commonality between the complex, magnitude,
angle, and phase spectrums.

---
## psd
```python
from mlab import psd
```

Compute the power spectral density.

The power spectral density :math:`P_{xx}` by Welch's average
periodogram method.  The vector *x* is divided into *NFFT* length
segments.  Each segment is detrended by function *detrend* and
windowed by function *window*.  *noverlap* gives the length of
the overlap between segments.  The :math:`|\mathrm{fft}(i)|^2`
of each segment :math:`i` are averaged to compute :math:`P_{xx}`.

If len(*x*) < *NFFT*, it will be zero padded to *NFFT*.

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data

%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between segments.

Returns
-------
Pxx : 1-D array
    The values for the power spectrum :math:`P_{xx}` (real valued)

freqs : 1-D array
    The frequencies corresponding to the elements in *Pxx*

References
----------
Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John
Wiley & Sons (1986)

See Also
--------
specgram
    `specgram` differs in the default overlap; in not returning the mean of
    the segment periodograms; and in returning the times of the segments.

magnitude_spectrum : returns the magnitude spectrum.

csd : returns the spectral density between two signals.

---
## csd
```python
from mlab import csd
```

Compute the cross-spectral density.

The cross spectral density :math:`P_{xy}` by Welch's average
periodogram method.  The vectors *x* and *y* are divided into
*NFFT* length segments.  Each segment is detrended by function
*detrend* and windowed by function *window*.  *noverlap* gives
the length of the overlap between segments.  The product of
the direct FFTs of *x* and *y* are averaged over each segment
to compute :math:`P_{xy}`, with a scaling to correct for power
loss due to windowing.

If len(*x*) < *NFFT* or len(*y*) < *NFFT*, they will be zero
padded to *NFFT*.

Parameters
----------
x, y : 1-D arrays or sequences
    Arrays or sequences containing the data

%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between segments.

Returns
-------
Pxy : 1-D array
    The values for the cross spectrum :math:`P_{xy}` before scaling (real
    valued)

freqs : 1-D array
    The frequencies corresponding to the elements in *Pxy*

References
----------
Bendat & Piersol -- Random Data: Analysis and Measurement Procedures, John
Wiley & Sons (1986)

See Also
--------
psd : equivalent to setting ``y = x``.

---
## specgram
```python
from mlab import specgram
```

Compute a spectrogram.

Compute and plot a spectrogram of data in *x*.  Data are split into
*NFFT* length segments and the spectrum of each section is
computed.  The windowing function *window* is applied to each
segment, and the amount of overlap of each segment is
specified with *noverlap*.

Parameters
----------
x : array-like
    1-D array or sequence.

%(Spectral)s

%(PSD)s

noverlap : int, default: 128
    The number of points of overlap between blocks.
mode : str, default: 'psd'
    What sort of spectrum to use:
        'psd'
            Returns the power spectral density.
        'complex'
            Returns the complex-valued frequency spectrum.
        'magnitude'
            Returns the magnitude spectrum.
        'angle'
            Returns the phase spectrum without unwrapping.
        'phase'
            Returns the phase spectrum with unwrapping.

Returns
-------
spectrum : array-like
    2D array, columns are the periodograms of successive segments.

freqs : array-like
    1-D array, frequencies corresponding to the rows in *spectrum*.

t : array-like
    1-D array, the times corresponding to midpoints of segments
    (i.e the columns in *spectrum*).

See Also
--------
psd : differs in the overlap and in the return values.
complex_spectrum : similar, but with complex valued frequencies.
magnitude_spectrum : similar single segment when *mode* is 'magnitude'.
angle_spectrum : similar to single segment when *mode* is 'angle'.
phase_spectrum : similar to single segment when *mode* is 'phase'.

Notes
-----
*detrend* and *scale_by_freq* only apply when *mode* is set to 'psd'.

---
## cohere
```python
from mlab import cohere
```

The coherence between *x* and *y*.  Coherence is the normalized
cross spectral density:

.. math::

    C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}

Parameters
----------
x, y
    Array or sequence containing the data

%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between segments.

Returns
-------
Cxy : 1-D array
    The coherence vector.
freqs : 1-D array
        The frequencies for the elements in *Cxy*.

See Also
--------
:func:`psd`, :func:`csd` :
    For information about the methods used to compute :math:`P_{xy}`,
    :math:`P_{xx}` and :math:`P_{yy}`.

---
## GaussianKDE
```python
from mlab import GaussianKDE
```

Representation of a kernel-density estimate using Gaussian kernels.

Parameters
----------
dataset : array-like
    Datapoints to estimate from. In case of univariate data this is a 1-D
    array, otherwise a 2D array with shape (# of dims, # of data).
bw_method : {'scott', 'silverman'} or float or callable, optional
    The method used to calculate the estimator bandwidth.  If a
    float, this will be used directly as `kde.factor`.  If a
    callable, it should take a `GaussianKDE` instance as only
    parameter and return a float. If None (default), 'scott' is used.

Attributes
----------
dataset : ndarray
    The dataset passed to the constructor.
dim : int
    Number of dimensions.
num_dp : int
    Number of datapoints.
factor : float
    The bandwidth factor, obtained from `kde.covariance_factor`, with which
    the covariance matrix is multiplied.
covariance : ndarray
    The covariance matrix of *dataset*, scaled by the calculated bandwidth
    (`kde.factor`).
inv_cov : ndarray
    The inverse of *covariance*.

Methods
-------
kde.evaluate(points) : ndarray
    Evaluate the estimated pdf on a provided set of points.
kde(points) : ndarray
    Same as kde.evaluate(points)

---
## __init__
```python
from mlab import __init__
```



---
## scotts_factor
```python
from mlab import scotts_factor
```



---
## silverman_factor
```python
from mlab import silverman_factor
```



---
## evaluate
```python
from mlab import evaluate
```

Evaluate the estimated pdf on a set of points.

Parameters
----------
points : (# of dimensions, # of points)-array
    Alternatively, a (# of dimensions,) vector can be passed in and
    treated as a single point.

Returns
-------
(# of points,)-array
    The values at each point.

Raises
------
ValueError : if the dimensionality of the input points is different
             than the dimensionality of the KDE.

---
## __name__
```python
from layout_engine import __name__
```

Classes to layout elements in a `.Figure`.

Figures have a ``layout_engine`` property that holds a subclass of
`~.LayoutEngine` defined here (or *None* for no layout).  At draw time
``figure.get_layout_engine().execute()`` is called, the goal of which is
usually to rearrange Axes on the figure to produce a pleasing layout. This is
like a ``draw`` callback but with two differences.  First, when printing we
disable the layout engine for the final draw. Second, it is useful to know the
layout engine while the figure is being created.  In particular, colorbars are
made differently with different layout engines (for historical reasons).

Matplotlib supplies two layout engines, `.TightLayoutEngine` and
`.ConstrainedLayoutEngine`.  Third parties can create their own layout engine
by subclassing `.LayoutEngine`.

---
## LayoutEngine
```python
from layout_engine import LayoutEngine
```

Base class for Matplotlib layout engines.

A layout engine can be passed to a figure at instantiation or at any time
with `~.figure.Figure.set_layout_engine`.  Once attached to a figure, the
layout engine ``execute`` function is called at draw time by
`~.figure.Figure.draw`, providing a special draw-time hook.

.. note::

   However, note that layout engines affect the creation of colorbars, so
   `~.figure.Figure.set_layout_engine` should be called before any
   colorbars are created.

Currently, there are two properties of `LayoutEngine` classes that are
consulted while manipulating the figure:

- ``engine.colorbar_gridspec`` tells `.Figure.colorbar` whether to make the
   axes using the gridspec method (see `.colorbar.make_axes_gridspec`) or
   not (see `.colorbar.make_axes`);
- ``engine.adjust_compatible`` stops `.Figure.subplots_adjust` from being
    run if it is not compatible with the layout engine.

To implement a custom `LayoutEngine`:

1. override ``_adjust_compatible`` and ``_colorbar_gridspec``
2. override `LayoutEngine.set` to update *self._params*
3. override `LayoutEngine.execute` with your implementation

---
## PlaceHolderLayoutEngine
```python
from layout_engine import PlaceHolderLayoutEngine
```

This layout engine does not adjust the figure layout at all.

The purpose of this `.LayoutEngine` is to act as a placeholder when the user removes
a layout engine to ensure an incompatible `.LayoutEngine` cannot be set later.

Parameters
----------
adjust_compatible, colorbar_gridspec : bool
    Allow the PlaceHolderLayoutEngine to mirror the behavior of whatever
    layout engine it is replacing.

---
## TightLayoutEngine
```python
from layout_engine import TightLayoutEngine
```

Implements the ``tight_layout`` geometry management.  See
:ref:`tight_layout_guide` for details.

---
## ConstrainedLayoutEngine
```python
from layout_engine import ConstrainedLayoutEngine
```

Implements the ``constrained_layout`` geometry management.  See
:ref:`constrainedlayout_guide` for details.

---
## __init__
```python
from layout_engine import __init__
```

Initialize ``constrained_layout`` settings.

Parameters
----------
h_pad, w_pad : float
    Padding around the Axes elements in inches.
    Default to :rc:`figure.constrained_layout.h_pad` and
    :rc:`figure.constrained_layout.w_pad`.
hspace, wspace : float
    Fraction of the figure to dedicate to space between the
    axes.  These are evenly spread between the gaps between the Axes.
    A value of 0.2 for a three-column layout would have a space
    of 0.1 of the figure width between each column.
    If h/wspace < h/w_pad, then the pads are used instead.
    Default to :rc:`figure.constrained_layout.hspace` and
    :rc:`figure.constrained_layout.wspace`.
rect : tuple of 4 floats
    Rectangle in figure coordinates to perform constrained layout in
    (left, bottom, width, height), each from 0-1.
compress : bool
    Whether to shift Axes so that white space in between them is
    removed. This is useful for simple grids of fixed-aspect Axes (e.g.
    a grid of images).  See :ref:`compressed_layout`.

---
## set
```python
from layout_engine import set
```

Set the pads for constrained_layout.

Parameters
----------
h_pad, w_pad : float
    Padding around the Axes elements in inches.
    Default to :rc:`figure.constrained_layout.h_pad` and
    :rc:`figure.constrained_layout.w_pad`.
hspace, wspace : float
    Fraction of the figure to dedicate to space between the
    axes.  These are evenly spread between the gaps between the Axes.
    A value of 0.2 for a three-column layout would have a space
    of 0.1 of the figure width between each column.
    If h/wspace < h/w_pad, then the pads are used instead.
    Default to :rc:`figure.constrained_layout.hspace` and
    :rc:`figure.constrained_layout.wspace`.
rect : tuple of 4 floats
    Rectangle in figure coordinates to perform constrained layout in
    (left, bottom, width, height), each from 0-1.

---
## colorbar_gridspec
```python
from layout_engine import colorbar_gridspec
```

Return a boolean if the layout engine creates colorbars using a
gridspec.

---
## adjust_compatible
```python
from layout_engine import adjust_compatible
```

Return a boolean if the layout engine is compatible with
`~.Figure.subplots_adjust`.

---
## get
```python
from layout_engine import get
```

Return copy of the parameters for the layout engine.

---
## execute
```python
from layout_engine import execute
```

Perform constrained_layout and move and resize Axes accordingly.

Parameters
----------
fig : `.Figure` to perform layout on.

---
## __name__
```python
from _blocking_input import __name__
```



---
## blocking_input_loop
```python
from _blocking_input import blocking_input_loop
```

Run *figure*'s event loop while listening to interactive events.

The events listed in *event_names* are passed to *handler*.

This function is used to implement `.Figure.waitforbuttonpress`,
`.Figure.ginput`, and `.Axes.clabel`.

Parameters
----------
figure : `~matplotlib.figure.Figure`
event_names : list of str
    The names of the events passed to *handler*.
timeout : float
    If positive, the event loop is stopped after *timeout* seconds.
handler : Callable[[Event], Any]
    Function called for each event; it can force an early exit of the event
    loop by calling ``canvas.stop_event_loop()``.

---
## __name__
```python
from _pylab_helpers import __name__
```

Manage figures for the pyplot interface.

---
## Gcf
```python
from _pylab_helpers import Gcf
```

Singleton to maintain the relation between figures and their managers, and
keep track of and "active" figure and manager.

The canvas of a figure created through pyplot is associated with a figure
manager, which handles the interaction between the figure and the backend.
pyplot keeps track of figure managers using an identifier, the "figure
number" or "manager number" (which can actually be any hashable value);
this number is available as the :attr:`number` attribute of the manager.

This class is never instantiated; it consists of an `OrderedDict` mapping
figure/manager numbers to managers, and a set of class methods that
manipulate this `OrderedDict`.

Attributes
----------
figs : OrderedDict
    `OrderedDict` mapping numbers to managers; the active manager is at the
    end.

---
## get_fig_manager
```python
from _pylab_helpers import get_fig_manager
```

If manager number *num* exists, make it the active one and return it;
otherwise return *None*.

---
## destroy
```python
from _pylab_helpers import destroy
```

Destroy manager *num* -- either a manager instance or a manager number.

In the interactive backends, this is bound to the window "destroy" and
"delete" events.

It is recommended to pass a manager instance, to avoid confusion when
two managers share the same number.

---
## destroy_fig
```python
from _pylab_helpers import destroy_fig
```

Destroy figure *fig*.

---
## destroy_all
```python
from _pylab_helpers import destroy_all
```

Destroy all figures.

---
## has_fignum
```python
from _pylab_helpers import has_fignum
```

Return whether figure number *num* exists.

---
## get_all_fig_managers
```python
from _pylab_helpers import get_all_fig_managers
```

Return a list of figure managers.

---
## get_num_fig_managers
```python
from _pylab_helpers import get_num_fig_managers
```

Return the number of figures being managed.

---
## get_active
```python
from _pylab_helpers import get_active
```

Return the active manager, or *None* if there is no manager.

---
## _set_new_active_manager
```python
from _pylab_helpers import _set_new_active_manager
```

Adopt *manager* into pyplot and make it the active manager.

---
## set_active
```python
from _pylab_helpers import set_active
```

Make *manager* the active manager.

---
## draw_all
```python
from _pylab_helpers import draw_all
```

Redraw all stale managed figures, or, if *force* is True, all managed
figures.

---
## __name__
```python
from _cm_listed import __name__
```



---
## _get_tzinfo
```python
from dates import _get_tzinfo
```

Generate `~datetime.tzinfo` from a string or return `~datetime.tzinfo`.
If None, retrieve the preferred timezone from the rcParams dictionary.

---
## _reset_epoch_test_example
```python
from dates import _reset_epoch_test_example
```

Reset the Matplotlib date epoch so it can be set again.

Only for use in tests and examples.

---
## set_epoch
```python
from dates import set_epoch
```

Set the epoch (origin for dates) for datetime calculations.

The default epoch is :rc:`dates.epoch` (by default 1970-01-01T00:00).

If microsecond accuracy is desired, the date being plotted needs to be
within approximately 70 years of the epoch. Matplotlib internally
represents dates as days since the epoch, so floating point dynamic
range needs to be within a factor of 2^52.

`~.dates.set_epoch` must be called before any dates are converted
(i.e. near the import section) or a RuntimeError will be raised.

See also :doc:`/gallery/ticks/date_precision_and_epochs`.

Parameters
----------
epoch : str
    valid UTC date parsable by `numpy.datetime64` (do not include
    timezone).

---
## get_epoch
```python
from dates import get_epoch
```

Get the epoch used by `.dates`.

Returns
-------
epoch : str
    String for the epoch (parsable by `numpy.datetime64`).

---
## _dt64_to_ordinalf
```python
from dates import _dt64_to_ordinalf
```

Convert `numpy.datetime64` or an `numpy.ndarray` of those types to
Gregorian date as UTC float relative to the epoch (see `.get_epoch`).
Roundoff is float64 precision.  Practically: microseconds for dates
between 290301 BC, 294241 AD, milliseconds for larger dates
(see `numpy.datetime64`).

---
## _from_ordinalf
```python
from dates import _from_ordinalf
```

Convert Gregorian float of the date, preserving hours, minutes,
seconds and microseconds.  Return value is a `.datetime`.

The input date *x* is a float in ordinal days at UTC, and the output will
be the specified `.datetime` object corresponding to that time in
timezone *tz*, or if *tz* is ``None``, in the timezone specified in
:rc:`timezone`.

---
## datestr2num
```python
from dates import datestr2num
```

Convert a date string to a datenum using `dateutil.parser.parse`.

Parameters
----------
d : str or sequence of str
    The dates to convert.

default : datetime.datetime, optional
    The default date to use when fields are missing in *d*.

---
## date2num
```python
from dates import date2num
```

Convert datetime objects to Matplotlib dates.

Parameters
----------
d : `datetime.datetime` or `numpy.datetime64` or sequences of these

Returns
-------
float or sequence of floats
    Number of days since the epoch.  See `.get_epoch` for the
    epoch, which can be changed by :rc:`date.epoch` or `.set_epoch`.  If
    the epoch is "1970-01-01T00:00:00" (default) then noon Jan 1 1970
    ("1970-01-01T12:00:00") returns 0.5.

Notes
-----
The Gregorian calendar is assumed; this is not universal practice.
For details see the module docstring.

---
## num2date
```python
from dates import num2date
```

Convert Matplotlib dates to `~datetime.datetime` objects.

Parameters
----------
x : float or sequence of floats
    Number of days (fraction part represents hours, minutes, seconds)
    since the epoch.  See `.get_epoch` for the
    epoch, which can be changed by :rc:`date.epoch` or `.set_epoch`.
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
    Timezone of *x*. If a string, *tz* is passed to `dateutil.tz`.

Returns
-------
`~datetime.datetime` or sequence of `~datetime.datetime`
    Dates are returned in timezone *tz*.

    If *x* is a sequence, a sequence of `~datetime.datetime` objects will
    be returned.

Notes
-----
The Gregorian calendar is assumed; this is not universal practice.
For details, see the module docstring.

---
## num2timedelta
```python
from dates import num2timedelta
```

Convert number of days to a `~datetime.timedelta` object.

If *x* is a sequence, a sequence of `~datetime.timedelta` objects will
be returned.

Parameters
----------
x : float, sequence of floats
    Number of days. The fraction part represents hours, minutes, seconds.

Returns
-------
`datetime.timedelta` or list[`datetime.timedelta`]

---
## drange
```python
from dates import drange
```

Return a sequence of equally spaced Matplotlib dates.

The dates start at *dstart* and reach up to, but not including *dend*.
They are spaced by *delta*.

Parameters
----------
dstart, dend : `~datetime.datetime`
    The date limits.
delta : `datetime.timedelta`
    Spacing of the dates.

Returns
-------
`numpy.array`
    A list floats representing Matplotlib dates.

---
## _wrap_in_tex
```python
from dates import _wrap_in_tex
```



---
## DateFormatter
```python
from dates import DateFormatter
```

Format a tick (in days since the epoch) with a
`~datetime.datetime.strftime` format string.

---
## ConciseDateFormatter
```python
from dates import ConciseDateFormatter
```

A `.Formatter` which attempts to figure out the best format to use for the
date, and to make it as compact as possible, but still be complete. This is
most useful when used with the `AutoDateLocator`::

>>> locator = AutoDateLocator()
>>> formatter = ConciseDateFormatter(locator)

Parameters
----------
locator : `.ticker.Locator`
    Locator that this axis is using.

tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
    Ticks timezone, passed to `.dates.num2date`.

formats : list of 6 strings, optional
    Format strings for 6 levels of tick labelling: mostly years,
    months, days, hours, minutes, and seconds.  Strings use
    the same format codes as `~datetime.datetime.strftime`.  Default is
    ``['%Y', '%b', '%d', '%H:%M', '%H:%M', '%S.%f']``

zero_formats : list of 6 strings, optional
    Format strings for tick labels that are "zeros" for a given tick
    level.  For instance, if most ticks are months, ticks around 1 Jan 2005
    will be labeled "Dec", "2005", "Feb".  The default is
    ``['', '%Y', '%b', '%b-%d', '%H:%M', '%H:%M']``

offset_formats : list of 6 strings, optional
    Format strings for the 6 levels that is applied to the "offset"
    string found on the right side of an x-axis, or top of a y-axis.
    Combined with the tick labels this should completely specify the
    date.  The default is::

        ['', '%Y', '%Y-%b', '%Y-%b-%d', '%Y-%b-%d', '%Y-%b-%d %H:%M']

show_offset : bool, default: True
    Whether to show the offset or not.

usetex : bool, default: :rc:`text.usetex`
    To enable/disable the use of TeX's math mode for rendering the results
    of the formatter.

Examples
--------
See :doc:`/gallery/ticks/date_concise_formatter`

.. plot::

    import datetime
    import matplotlib.dates as mdates

    base = datetime.datetime(2005, 2, 1)
    dates = np.array([base + datetime.timedelta(hours=(2 * i))
                      for i in range(732)])
    N = len(dates)
    np.random.seed(19680801)
    y = np.cumsum(np.random.randn(N))

    fig, ax = plt.subplots(constrained_layout=True)
    locator = mdates.AutoDateLocator()
    formatter = mdates.ConciseDateFormatter(locator)
    ax.xaxis.set_major_locator(locator)
    ax.xaxis.set_major_formatter(formatter)

    ax.plot(dates, y)
    ax.set_title('Concise Date Formatter')

---
## AutoDateFormatter
```python
from dates import AutoDateFormatter
```

A `.Formatter` which attempts to figure out the best format to use.  This
is most useful when used with the `AutoDateLocator`.

`.AutoDateFormatter` has a ``.scale`` dictionary that maps tick scales (the
interval in days between one major tick) to format strings; this dictionary
defaults to ::

    self.scaled = {
        DAYS_PER_YEAR: rcParams['date.autoformatter.year'],
        DAYS_PER_MONTH: rcParams['date.autoformatter.month'],
        1: rcParams['date.autoformatter.day'],
        1 / HOURS_PER_DAY: rcParams['date.autoformatter.hour'],
        1 / MINUTES_PER_DAY: rcParams['date.autoformatter.minute'],
        1 / SEC_PER_DAY: rcParams['date.autoformatter.second'],
        1 / MUSECONDS_PER_DAY: rcParams['date.autoformatter.microsecond'],
    }

The formatter uses the format string corresponding to the lowest key in
the dictionary that is greater or equal to the current scale.  Dictionary
entries can be customized::

    locator = AutoDateLocator()
    formatter = AutoDateFormatter(locator)
    formatter.scaled[1/(24*60)] = '%M:%S' # only show min and sec

Custom callables can also be used instead of format strings.  The following
example shows how to use a custom format function to strip trailing zeros
from decimal seconds and adds the date to the first ticklabel::

    def my_format_function(x, pos=None):
        x = matplotlib.dates.num2date(x)
        if pos == 0:
            fmt = '%D %H:%M:%S.%f'
        else:
            fmt = '%H:%M:%S.%f'
        label = x.strftime(fmt)
        label = label.rstrip("0")
        label = label.rstrip(".")
        return label

    formatter.scaled[1/(24*60)] = my_format_function

---
## rrulewrapper
```python
from dates import rrulewrapper
```

A simple wrapper around a `dateutil.rrule` allowing flexible
date tick specifications.

---
## DateLocator
```python
from dates import DateLocator
```

Determines the tick locations when plotting dates.

This class is subclassed by other Locators and
is not meant to be used on its own.

---
## RRuleLocator
```python
from dates import RRuleLocator
```



---
## AutoDateLocator
```python
from dates import AutoDateLocator
```

On autoscale, this class picks the best `DateLocator` to set the view
limits and the tick locations.

Attributes
----------
intervald : dict

    Mapping of tick frequencies to multiples allowed for that ticking.
    The default is ::

        self.intervald = {
            YEARLY  : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500,
                       1000, 2000, 4000, 5000, 10000],
            MONTHLY : [1, 2, 3, 4, 6],
            DAILY   : [1, 2, 3, 7, 14, 21],
            HOURLY  : [1, 2, 3, 4, 6, 12],
            MINUTELY: [1, 5, 10, 15, 30],
            SECONDLY: [1, 5, 10, 15, 30],
            MICROSECONDLY: [1, 2, 5, 10, 20, 50, 100, 200, 500,
                            1000, 2000, 5000, 10000, 20000, 50000,
                            100000, 200000, 500000, 1000000],
        }

    where the keys are defined in `dateutil.rrule`.

    The interval is used to specify multiples that are appropriate for
    the frequency of ticking. For instance, every 7 days is sensible
    for daily ticks, but for minutes/seconds, 15 or 30 make sense.

    When customizing, you should only modify the values for the existing
    keys. You should not add or delete entries.

    Example for forcing ticks every 3 hours::

        locator = AutoDateLocator()
        locator.intervald[HOURLY] = [3]  # only show every 3 hours

---
## YearLocator
```python
from dates import YearLocator
```

Make ticks on a given day of each year that is a multiple of base.

Examples::

  # Tick every year on Jan 1st
  locator = YearLocator()

  # Tick every 5 years on July 4th
  locator = YearLocator(5, month=7, day=4)

---
## MonthLocator
```python
from dates import MonthLocator
```

Make ticks on occurrences of each month, e.g., 1, 3, 12.

---
## WeekdayLocator
```python
from dates import WeekdayLocator
```

Make ticks on occurrences of each weekday.

---
## DayLocator
```python
from dates import DayLocator
```

Make ticks on occurrences of each day of the month.  For example,
1, 15, 30.

---
## HourLocator
```python
from dates import HourLocator
```

Make ticks on occurrences of each hour.

---
## MinuteLocator
```python
from dates import MinuteLocator
```

Make ticks on occurrences of each minute.

---
## SecondLocator
```python
from dates import SecondLocator
```

Make ticks on occurrences of each second.

---
## MicrosecondLocator
```python
from dates import MicrosecondLocator
```

Make ticks on regular intervals of one or more microsecond(s).

.. note::

    By default, Matplotlib uses a floating point representation of time in
    days since the epoch, so plotting data with
    microsecond time resolution does not work well for
    dates that are far (about 70 years) from the epoch (check with
    `~.dates.get_epoch`).

    If you want sub-microsecond resolution time plots, it is strongly
    recommended to use floating point seconds, not datetime-like
    time representation.

    If you really must use datetime.datetime() or similar and still
    need microsecond precision, change the time origin via
    `.dates.set_epoch` to something closer to the dates being plotted.
    See :doc:`/gallery/ticks/date_precision_and_epochs`.

---
## DateConverter
```python
from dates import DateConverter
```

Converter for `datetime.date` and `datetime.datetime` data, or for
date/time data represented as it would be converted by `date2num`.

The 'unit' tag for such data is None or a `~datetime.tzinfo` instance.

---
## ConciseDateConverter
```python
from dates import ConciseDateConverter
```



---
## _SwitchableDateConverter
```python
from dates import _SwitchableDateConverter
```

Helper converter-like object that generates and dispatches to
temporary ConciseDateConverter or DateConverter instances based on
:rc:`date.converter` and :rc:`date.interval_multiples`.

---
## __call__
```python
from dates import __call__
```



---
## set_tzinfo
```python
from dates import set_tzinfo
```

Set timezone info.

Parameters
----------
tz : str or `~datetime.tzinfo`, default: :rc:`timezone`
    Ticks timezone. If a string, *tz* is passed to `dateutil.tz`.

---
## format_ticks
```python
from dates import format_ticks
```



---
## get_offset
```python
from dates import get_offset
```



---
## format_data_short
```python
from dates import format_data_short
```



---
## _set_locator
```python
from dates import _set_locator
```



---
## set
```python
from dates import set
```

Set parameters for an existing wrapper.

---
## _update_rrule
```python
from dates import _update_rrule
```



---
## _attach_tzinfo
```python
from dates import _attach_tzinfo
```



---
## _aware_return_wrapper
```python
from dates import _aware_return_wrapper
```

Decorator function that allows rrule methods to handle tzinfo.

---
## __getattr__
```python
from dates import __getattr__
```



---
## __setstate__
```python
from dates import __setstate__
```



---
## datalim_to_dt
```python
from dates import datalim_to_dt
```

Convert axis data interval to datetime objects.

---
## viewlim_to_dt
```python
from dates import viewlim_to_dt
```

Convert the view interval to datetime objects.

---
## _get_unit
```python
from dates import _get_unit
```



---
## _get_interval
```python
from dates import _get_interval
```



---
## nonsingular
```python
from dates import nonsingular
```



---
## tick_values
```python
from dates import tick_values
```



---
## _create_rrule
```python
from dates import _create_rrule
```



---
## get_unit_generic
```python
from dates import get_unit_generic
```



---
## get_locator
```python
from dates import get_locator
```

Pick the best locator based on a distance.

---
## set_axis
```python
from dates import set_axis
```



---
## axisinfo
```python
from dates import axisinfo
```



---
## convert
```python
from dates import convert
```



---
## default_units
```python
from dates import default_units
```



---
## _get_converter
```python
from dates import _get_converter
```



---
## normalize_arg
```python
from dates import normalize_arg
```



---
## normalize_args
```python
from dates import normalize_args
```



---
## inner_func
```python
from dates import inner_func
```



---
## Cell
```python
from table import Cell
```

A cell is a `.Rectangle` with some associated `.Text`.

As a user, you'll most likely not creates cells yourself. Instead, you
should use either the `~matplotlib.table.table` factory function or
`.Table.add_cell`.

---
## table
```python
from table import table
```



---
## set_transform
```python
from table import set_transform
```



---
## set_figure
```python
from table import set_figure
```



---
## get_text
```python
from table import get_text
```

Return the cell `.Text` instance.

---
## set_fontsize
```python
from table import set_fontsize
```

Set the font size, in points, of the cell text.

Parameters
----------
size : float

Notes
-----
As long as auto font size has not been disabled, the value will be
clipped such that the text fits horizontally into the cell.

You can disable this behavior using `.auto_set_font_size`.

>>> the_table.auto_set_font_size(False)
>>> the_table.set_fontsize(20)

However, there is no automatic scaling of the row height so that the
text may exceed the cell boundary.

---
## get_fontsize
```python
from table import get_fontsize
```

Return the cell fontsize.

---
## auto_set_font_size
```python
from table import auto_set_font_size
```

Automatically set font size.

---
## draw
```python
from table import draw
```



---
## _set_text_position
```python
from table import _set_text_position
```

Set text up so it is drawn in the right place.

---
## get_text_bounds
```python
from table import get_text_bounds
```

Return the text bounds as *(x, y, width, height)* in table coordinates.

---
## get_required_width
```python
from table import get_required_width
```

Return the minimal required width for the cell.

---
## set_text_props
```python
from table import set_text_props
```

Update the text properties.

Valid keyword arguments are:

%(Text:kwdoc)s

---
## visible_edges
```python
from table import visible_edges
```



---
## get_path
```python
from table import get_path
```

Return a `.Path` for the `.visible_edges`.

---
## __setitem__
```python
from table import __setitem__
```

Set a custom cell in a given position.

---
## edges
```python
from table import edges
```



---
## _approx_text_height
```python
from table import _approx_text_height
```



---
## _get_grid_bbox
```python
from table import _get_grid_bbox
```

Get a bbox, in axes coordinates for the cells.

Only include those in the range (0, 0) to (maxRow, maxCol).

---
## contains
```python
from table import contains
```



---
## get_children
```python
from table import get_children
```

Return the Artists contained by the table.

---
## get_window_extent
```python
from table import get_window_extent
```



---
## _do_cell_alignment
```python
from table import _do_cell_alignment
```

Calculate row heights and column widths; position cells accordingly.

---
## auto_set_column_width
```python
from table import auto_set_column_width
```

Automatically set the widths of given columns to optimal sizes.

Parameters
----------
col : int or sequence of ints
    The indices of the columns to auto-scale.

---
## _auto_set_column_width
```python
from table import _auto_set_column_width
```

Automatically set width for column.

---
## _auto_set_font_size
```python
from table import _auto_set_font_size
```



---
## scale
```python
from table import scale
```

Scale column widths by *xscale* and row heights by *yscale*.

---
## _offset
```python
from table import _offset
```

Move all the artists by ox, oy (axes coords).

---
## _update_positions
```python
from table import _update_positions
```



---
## get_celld
```python
from table import get_celld
```

Return a dict of cells in the table mapping *(row, column)* to
`.Cell`\s.

Notes
-----
You can also directly index into the Table object to access individual
cells::

    cell = table[row, col]

---
## __name__
```python
from _animation_data import __name__
```



---
## __name__
```python
from pyplot import __name__
```

`matplotlib.pyplot` is a state-based interface to matplotlib. It provides
an implicit,  MATLAB-like, way of plotting.  It also opens figures on your
screen, and acts as the figure GUI manager.

pyplot is mainly intended for interactive plots and simple cases of
programmatic plot generation::

    import numpy as np
    import matplotlib.pyplot as plt

    x = np.arange(0, 5, 0.1)
    y = np.sin(x)
    plt.plot(x, y)

The explicit object-oriented API is recommended for complex plots, though
pyplot is still usually used to create the figure and often the Axes in the
figure. See `.pyplot.figure`, `.pyplot.subplots`, and
`.pyplot.subplot_mosaic` to create figures, and
:doc:`Axes API </api/axes_api>` for the plotting methods on an Axes::

    import numpy as np
    import matplotlib.pyplot as plt

    x = np.arange(0, 5, 0.1)
    y = np.sin(x)
    fig, ax = plt.subplots()
    ax.plot(x, y)


See :ref:`api_interfaces` for an explanation of the tradeoffs between the
implicit and explicit interfaces.

---
## _copy_docstring_and_deprecators
```python
from pyplot import _copy_docstring_and_deprecators
```



---
## _add_pyplot_note
```python
from pyplot import _add_pyplot_note
```

Add a note to the docstring of *func* that it is a pyplot wrapper.

The note is added to the "Notes" section of the docstring. If that does
not exist, a "Notes" section is created. In numpydoc, the "Notes"
section is the third last possible section, only potentially followed by
"References" and "Examples".

---
## _draw_all_if_interactive
```python
from pyplot import _draw_all_if_interactive
```



---
## install_repl_displayhook
```python
from pyplot import install_repl_displayhook
```

Connect to the display hook of the current shell.

The display hook gets called when the read-evaluate-print-loop (REPL) of
the shell has finished the execution of a command. We use this callback
to be able to automatically update a figure in interactive mode.

This works both with IPython and with vanilla python shells.

---
## uninstall_repl_displayhook
```python
from pyplot import uninstall_repl_displayhook
```

Disconnect from the display hook of the current shell.

---
## set_loglevel
```python
from pyplot import set_loglevel
```



---
## findobj
```python
from pyplot import findobj
```



---
## _get_backend_mod
```python
from pyplot import _get_backend_mod
```

Ensure that a backend is selected and return it.

This is currently private, but may be made public in the future.

---
## switch_backend
```python
from pyplot import switch_backend
```

Set the pyplot backend.

Switching to an interactive backend is possible only if no event loop for
another interactive backend has started.  Switching to and from
non-interactive backends is always possible.

If the new backend is different than the current backend then all open
Figures will be closed via ``plt.close('all')``.

Parameters
----------
newbackend : str
    The case-insensitive name of the backend to use.

---
## _warn_if_gui_out_of_main_thread
```python
from pyplot import _warn_if_gui_out_of_main_thread
```



---
## new_figure_manager
```python
from pyplot import new_figure_manager
```



---
## draw_if_interactive
```python
from pyplot import draw_if_interactive
```



---
## show
```python
from pyplot import show
```

Display all open figures.

Parameters
----------
block : bool, optional
    Whether to wait for all figures to be closed before returning.

    If `True` block and run the GUI main loop until all figure windows
    are closed.

    If `False` ensure that all figure windows are displayed and return
    immediately.  In this case, you are responsible for ensuring
    that the event loop is running to have responsive figures.

    Defaults to True in non-interactive mode and to False in interactive
    mode (see `.pyplot.isinteractive`).

See Also
--------
ion : Enable interactive mode, which shows / updates the figure after
      every plotting command, so that calling ``show()`` is not necessary.
ioff : Disable interactive mode.
savefig : Save the figure to an image file instead of showing it on screen.

Notes
-----
**Saving figures to file and showing a window at the same time**

If you want an image file as well as a user interface window, use
`.pyplot.savefig` before `.pyplot.show`. At the end of (a blocking)
``show()`` the figure is closed and thus unregistered from pyplot. Calling
`.pyplot.savefig` afterwards would save a new and thus empty figure. This
limitation of command order does not apply if the show is non-blocking or
if you keep a reference to the figure and use `.Figure.savefig`.

**Auto-show in jupyter notebooks**

The jupyter backends (activated via ``%matplotlib inline``,
``%matplotlib notebook``, or ``%matplotlib widget``), call ``show()`` at
the end of every cell by default. Thus, you usually don't have to call it
explicitly there.

---
## isinteractive
```python
from pyplot import isinteractive
```

Return whether plots are updated after every plotting command.

The interactive mode is mainly useful if you build plots from the command
line and want to see the effect of each command while you are building the
figure.

In interactive mode:

- newly created figures will be shown immediately;
- figures will automatically redraw on change;
- `.pyplot.show` will not block by default.

In non-interactive mode:

- newly created figures and changes to figures will not be reflected until
  explicitly asked to be;
- `.pyplot.show` will block by default.

See Also
--------
ion : Enable interactive mode.
ioff : Disable interactive mode.
show : Show all figures (and maybe block).
pause : Show all figures, and block for a time.

---
## ioff
```python
from pyplot import ioff
```

Disable interactive mode.

See `.pyplot.isinteractive` for more details.

See Also
--------
ion : Enable interactive mode.
isinteractive : Whether interactive mode is enabled.
show : Show all figures (and maybe block).
pause : Show all figures, and block for a time.

Notes
-----
For a temporary change, this can be used as a context manager::

    # if interactive mode is on
    # then figures will be shown on creation
    plt.ion()
    # This figure will be shown immediately
    fig = plt.figure()

    with plt.ioff():
        # interactive mode will be off
        # figures will not automatically be shown
        fig2 = plt.figure()
        # ...

To enable optional usage as a context manager, this function returns a
context manager object, which is not intended to be stored or
accessed by the user.

---
## ion
```python
from pyplot import ion
```

Enable interactive mode.

See `.pyplot.isinteractive` for more details.

See Also
--------
ioff : Disable interactive mode.
isinteractive : Whether interactive mode is enabled.
show : Show all figures (and maybe block).
pause : Show all figures, and block for a time.

Notes
-----
For a temporary change, this can be used as a context manager::

    # if interactive mode is off
    # then figures will not be shown on creation
    plt.ioff()
    # This figure will not be shown immediately
    fig = plt.figure()

    with plt.ion():
        # interactive mode will be on
        # figures will automatically be shown
        fig2 = plt.figure()
        # ...

To enable optional usage as a context manager, this function returns a
context manager object, which is not intended to be stored or
accessed by the user.

---
## pause
```python
from pyplot import pause
```

Run the GUI event loop for *interval* seconds.

If there is an active figure, it will be updated and displayed before the
pause, and the GUI event loop (if any) will run during the pause.

This can be used for crude animation.  For more complex animation use
:mod:`matplotlib.animation`.

If there is no active figure, sleep for *interval* seconds instead.

See Also
--------
matplotlib.animation : Proper animations
show : Show all figures and optional block until all figures are closed.

---
## rc
```python
from pyplot import rc
```



---
## rc_context
```python
from pyplot import rc_context
```



---
## rcdefaults
```python
from pyplot import rcdefaults
```



---
## getp
```python
from pyplot import getp
```



---
## get
```python
from pyplot import get
```



---
## setp
```python
from pyplot import setp
```



---
## xkcd
```python
from pyplot import xkcd
```

Turn on `xkcd <https://xkcd.com/>`_ sketch-style drawing mode.

This will only have an effect on things drawn after this function is called.

For best results, install the `xkcd script <https://github.com/ipython/xkcd-font/>`_
font; xkcd fonts are not packaged with Matplotlib.

Parameters
----------
scale : float, optional
    The amplitude of the wiggle perpendicular to the source line.
length : float, optional
    The length of the wiggle along the line.
randomness : float, optional
    The scale factor by which the length is shrunken or expanded.

Notes
-----
This function works by a number of rcParams, so it will probably
override others you have set before.

If you want the effects of this function to be temporary, it can
be used as a context manager, for example::

    with plt.xkcd():
        # This figure will be in XKCD-style
        fig1 = plt.figure()
        # ...

    # This figure will be in regular style
    fig2 = plt.figure()

---
## figure
```python
from pyplot import figure
```

Create a new figure, or activate an existing figure.

Parameters
----------
num : int or str or `.Figure` or `.SubFigure`, optional
    A unique identifier for the figure.

    If a figure with that identifier already exists, this figure is made
    active and returned. An integer refers to the ``Figure.number``
    attribute, a string refers to the figure label.

    If there is no figure with the identifier or *num* is not given, a new
    figure is created, made active and returned.  If *num* is an int, it
    will be used for the ``Figure.number`` attribute, otherwise, an
    auto-generated integer value is used (starting at 1 and incremented
    for each new figure). If *num* is a string, the figure label and the
    window title is set to this value.  If num is a ``SubFigure``, its
    parent ``Figure`` is activated.

figsize : (float, float), default: :rc:`figure.figsize`
    Width, height in inches.

dpi : float, default: :rc:`figure.dpi`
    The resolution of the figure in dots-per-inch.

facecolor : :mpltype:`color`, default: :rc:`figure.facecolor`
    The background color.

edgecolor : :mpltype:`color`, default: :rc:`figure.edgecolor`
    The border color.

frameon : bool, default: True
    If False, suppress drawing the figure frame.

FigureClass : subclass of `~matplotlib.figure.Figure`
    If set, an instance of this subclass will be created, rather than a
    plain `.Figure`.

clear : bool, default: False
    If True and the figure already exists, then it is cleared.

layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, default: None
    The layout mechanism for positioning of plot elements to avoid
    overlapping Axes decorations (labels, ticks, etc). Note that layout
    managers can measurably slow down figure display.

    - 'constrained': The constrained layout solver adjusts Axes sizes
      to avoid overlapping Axes decorations.  Can handle complex plot
      layouts and colorbars, and is thus recommended.

      See :ref:`constrainedlayout_guide`
      for examples.

    - 'compressed': uses the same algorithm as 'constrained', but
      removes extra space between fixed-aspect-ratio Axes.  Best for
      simple grids of Axes.

    - 'tight': Use the tight layout mechanism. This is a relatively
      simple algorithm that adjusts the subplot parameters so that
      decorations do not overlap. See `.Figure.set_tight_layout` for
      further details.

    - 'none': Do not use a layout engine.

    - A `.LayoutEngine` instance. Builtin layout classes are
      `.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily
      accessible by 'constrained' and 'tight'.  Passing an instance
      allows third parties to provide their own layout engine.

    If not given, fall back to using the parameters *tight_layout* and
    *constrained_layout*, including their config defaults
    :rc:`figure.autolayout` and :rc:`figure.constrained_layout.use`.

**kwargs
    Additional keyword arguments are passed to the `.Figure` constructor.

Returns
-------
`~matplotlib.figure.Figure`

Notes
-----
A newly created figure is passed to the `~.FigureCanvasBase.new_manager`
method or the `new_figure_manager` function provided by the current
backend, which install a canvas and a manager on the figure.

Once this is done, :rc:`figure.hooks` are called, one at a time, on the
figure; these hooks allow arbitrary customization of the figure (e.g.,
attaching callbacks) or of associated elements (e.g., modifying the
toolbar).  See :doc:`/gallery/user_interfaces/mplcvd` for an example of
toolbar customization.

If you are creating many figures, make sure you explicitly call
`.pyplot.close` on the figures you are not using, because this will
enable pyplot to properly clean up the memory.

`~matplotlib.rcParams` defines the default values, which can be modified
in the matplotlibrc file.

---
## _auto_draw_if_interactive
```python
from pyplot import _auto_draw_if_interactive
```

An internal helper function for making sure that auto-redrawing
works as intended in the plain python repl.

Parameters
----------
fig : Figure
    A figure object which is assumed to be associated with a canvas

---
## gcf
```python
from pyplot import gcf
```

Get the current figure.

If there is currently no figure on the pyplot figure stack, a new one is
created using `~.pyplot.figure()`.  (To test whether there is currently a
figure on the pyplot figure stack, check whether `~.pyplot.get_fignums()`
is empty.)

---
## fignum_exists
```python
from pyplot import fignum_exists
```

Return whether the figure with the given id exists.

Parameters
----------
num : int or str
    A figure identifier.

Returns
-------
bool
    Whether or not a figure with id *num* exists.

---
## get_fignums
```python
from pyplot import get_fignums
```

Return a list of existing figure numbers.

---
## get_figlabels
```python
from pyplot import get_figlabels
```

Return a list of existing figure labels.

---
## get_current_fig_manager
```python
from pyplot import get_current_fig_manager
```

Return the figure manager of the current figure.

The figure manager is a container for the actual backend-depended window
that displays the figure on screen.

If no current figure exists, a new one is created, and its figure
manager is returned.

Returns
-------
`.FigureManagerBase` or backend-dependent subclass thereof

---
## connect
```python
from pyplot import connect
```



---
## disconnect
```python
from pyplot import disconnect
```



---
## close
```python
from pyplot import close
```

Close a figure window.

Parameters
----------
fig : None or int or str or `.Figure`
    The figure to close. There are a number of ways to specify this:

    - *None*: the current figure
    - `.Figure`: the given `.Figure` instance
    - ``int``: a figure number
    - ``str``: a figure name
    - 'all': all figures

---
## clf
```python
from pyplot import clf
```

Clear the current figure.

---
## draw
```python
from pyplot import draw
```

Redraw the current figure.

This is used to update a figure that has been altered, but not
automatically re-drawn.  If interactive mode is on (via `.ion()`), this
should be only rarely needed, but there may be ways to modify the state of
a figure without marking it as "stale".  Please report these cases as bugs.

This is equivalent to calling ``fig.canvas.draw_idle()``, where ``fig`` is
the current figure.

See Also
--------
.FigureCanvasBase.draw_idle
.FigureCanvasBase.draw

---
## savefig
```python
from pyplot import savefig
```



---
## figlegend
```python
from pyplot import figlegend
```



---
## axes
```python
from pyplot import axes
```

Add an Axes to the current figure and make it the current Axes.

Call signatures::

    plt.axes()
    plt.axes(rect, projection=None, polar=False, **kwargs)
    plt.axes(ax)

Parameters
----------
arg : None or 4-tuple
    The exact behavior of this function depends on the type:

    - *None*: A new full window Axes is added using
      ``subplot(**kwargs)``.
    - 4-tuple of floats *rect* = ``(left, bottom, width, height)``.
      A new Axes is added with dimensions *rect* in normalized
      (0, 1) units using `~.Figure.add_axes` on the current figure.

projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
    The projection type of the `~.axes.Axes`. *str* is the name of
    a custom projection, see `~matplotlib.projections`. The default
    None results in a 'rectilinear' projection.

polar : bool, default: False
    If True, equivalent to projection='polar'.

sharex, sharey : `~matplotlib.axes.Axes`, optional
    Share the x or y `~matplotlib.axis` with sharex and/or sharey.
    The axis will have the same limits, ticks, and scale as the axis
    of the shared Axes.

label : str
    A label for the returned Axes.

Returns
-------
`~.axes.Axes`, or a subclass of `~.axes.Axes`
    The returned Axes class depends on the projection used. It is
    `~.axes.Axes` if rectilinear projection is used and
    `.projections.polar.PolarAxes` if polar projection is used.

Other Parameters
----------------
**kwargs
    This method also takes the keyword arguments for
    the returned Axes class. The keyword arguments for the
    rectilinear Axes class `~.axes.Axes` can be found in
    the following table but there might also be other keyword
    arguments if another projection is used, see the actual Axes
    class.

    %(Axes:kwdoc)s

See Also
--------
.Figure.add_axes
.pyplot.subplot
.Figure.add_subplot
.Figure.subplots
.pyplot.subplots

Examples
--------
::

    # Creating a new full window Axes
    plt.axes()

    # Creating a new Axes with specified dimensions and a grey background
    plt.axes((left, bottom, width, height), facecolor='grey')

---
## delaxes
```python
from pyplot import delaxes
```

Remove an `~.axes.Axes` (defaulting to the current Axes) from its figure.

---
## sca
```python
from pyplot import sca
```

Set the current Axes to *ax* and the current Figure to the parent of *ax*.

---
## cla
```python
from pyplot import cla
```

Clear the current Axes.

---
## subplot
```python
from pyplot import subplot
```

Add an Axes to the current figure or retrieve an existing Axes.

This is a wrapper of `.Figure.add_subplot` which provides additional
behavior when working with the implicit API (see the notes section).

Call signatures::

   subplot(nrows, ncols, index, **kwargs)
   subplot(pos, **kwargs)
   subplot(**kwargs)
   subplot(ax)

Parameters
----------
*args : int, (int, int, *index*), or `.SubplotSpec`, default: (1, 1, 1)
    The position of the subplot described by one of

    - Three integers (*nrows*, *ncols*, *index*). The subplot will take the
      *index* position on a grid with *nrows* rows and *ncols* columns.
      *index* starts at 1 in the upper left corner and increases to the
      right. *index* can also be a two-tuple specifying the (*first*,
      *last*) indices (1-based, and including *last*) of the subplot, e.g.,
      ``fig.add_subplot(3, 1, (1, 2))`` makes a subplot that spans the
      upper 2/3 of the figure.
    - A 3-digit integer. The digits are interpreted as if given separately
      as three single-digit integers, i.e. ``fig.add_subplot(235)`` is the
      same as ``fig.add_subplot(2, 3, 5)``. Note that this can only be used
      if there are no more than 9 subplots.
    - A `.SubplotSpec`.

projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
    The projection type of the subplot (`~.axes.Axes`). *str* is the name
    of a custom projection, see `~matplotlib.projections`. The default
    None results in a 'rectilinear' projection.

polar : bool, default: False
    If True, equivalent to projection='polar'.

sharex, sharey : `~matplotlib.axes.Axes`, optional
    Share the x or y `~matplotlib.axis` with sharex and/or sharey. The
    axis will have the same limits, ticks, and scale as the axis of the
    shared Axes.

label : str
    A label for the returned Axes.

Returns
-------
`~.axes.Axes`

    The Axes of the subplot. The returned Axes can actually be an instance
    of a subclass, such as `.projections.polar.PolarAxes` for polar
    projections.

Other Parameters
----------------
**kwargs
    This method also takes the keyword arguments for the returned Axes
    base class; except for the *figure* argument. The keyword arguments
    for the rectilinear base class `~.axes.Axes` can be found in
    the following table but there might also be other keyword
    arguments if another projection is used.

    %(Axes:kwdoc)s

Notes
-----
Creating a new Axes will delete any preexisting Axes that
overlaps with it beyond sharing a boundary::

    import matplotlib.pyplot as plt
    # plot a line, implicitly creating a subplot(111)
    plt.plot([1, 2, 3])
    # now create a subplot which represents the top plot of a grid
    # with 2 rows and 1 column. Since this subplot will overlap the
    # first, the plot (and its Axes) previously created, will be removed
    plt.subplot(211)

If you do not want this behavior, use the `.Figure.add_subplot` method
or the `.pyplot.axes` function instead.

If no *kwargs* are passed and there exists an Axes in the location
specified by *args* then that Axes will be returned rather than a new
Axes being created.

If *kwargs* are passed and there exists an Axes in the location
specified by *args*, the projection type is the same, and the
*kwargs* match with the existing Axes, then the existing Axes is
returned.  Otherwise a new Axes is created with the specified
parameters.  We save a reference to the *kwargs* which we use
for this comparison.  If any of the values in *kwargs* are
mutable we will not detect the case where they are mutated.
In these cases we suggest using `.Figure.add_subplot` and the
explicit Axes API rather than the implicit pyplot API.

See Also
--------
.Figure.add_subplot
.pyplot.subplots
.pyplot.axes
.Figure.subplots

Examples
--------
::

    plt.subplot(221)

    # equivalent but more general
    ax1 = plt.subplot(2, 2, 1)

    # add a subplot with no frame
    ax2 = plt.subplot(222, frameon=False)

    # add a polar subplot
    plt.subplot(223, projection='polar')

    # add a red subplot that shares the x-axis with ax1
    plt.subplot(224, sharex=ax1, facecolor='red')

    # delete ax2 from the figure
    plt.delaxes(ax2)

    # add ax2 to the figure again
    plt.subplot(ax2)

    # make the first Axes "current" again
    plt.subplot(221)

---
## subplots
```python
from pyplot import subplots
```

Create a figure and a set of subplots.

This utility wrapper makes it convenient to create common layouts of
subplots, including the enclosing figure object, in a single call.

Parameters
----------
nrows, ncols : int, default: 1
    Number of rows/columns of the subplot grid.

sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False
    Controls sharing of properties among x (*sharex*) or y (*sharey*)
    axes:

    - True or 'all': x- or y-axis will be shared among all subplots.
    - False or 'none': each subplot x- or y-axis will be independent.
    - 'row': each subplot row will share an x- or y-axis.
    - 'col': each subplot column will share an x- or y-axis.

    When subplots have a shared x-axis along a column, only the x tick
    labels of the bottom subplot are created. Similarly, when subplots
    have a shared y-axis along a row, only the y tick labels of the first
    column subplot are created. To later turn other subplots' ticklabels
    on, use `~matplotlib.axes.Axes.tick_params`.

    When subplots have a shared axis that has units, calling
    `.Axis.set_units` will update each axis with the new units.

    Note that it is not possible to unshare axes.

squeeze : bool, default: True
    - If True, extra dimensions are squeezed out from the returned
      array of `~matplotlib.axes.Axes`:

      - if only one subplot is constructed (nrows=ncols=1), the
        resulting single Axes object is returned as a scalar.
      - for Nx1 or 1xM subplots, the returned object is a 1D numpy
        object array of Axes objects.
      - for NxM, subplots with N>1 and M>1 are returned as a 2D array.

    - If False, no squeezing at all is done: the returned Axes object is
      always a 2D array containing Axes instances, even if it ends up
      being 1x1.

width_ratios : array-like of length *ncols*, optional
    Defines the relative widths of the columns. Each column gets a
    relative width of ``width_ratios[i] / sum(width_ratios)``.
    If not given, all columns will have the same width.  Equivalent
    to ``gridspec_kw={'width_ratios': [...]}``.

height_ratios : array-like of length *nrows*, optional
    Defines the relative heights of the rows. Each row gets a
    relative height of ``height_ratios[i] / sum(height_ratios)``.
    If not given, all rows will have the same height. Convenience
    for ``gridspec_kw={'height_ratios': [...]}``.

subplot_kw : dict, optional
    Dict with keywords passed to the
    `~matplotlib.figure.Figure.add_subplot` call used to create each
    subplot.

gridspec_kw : dict, optional
    Dict with keywords passed to the `~matplotlib.gridspec.GridSpec`
    constructor used to create the grid the subplots are placed on.

**fig_kw
    All additional keyword arguments are passed to the
    `.pyplot.figure` call.

Returns
-------
fig : `.Figure`

ax : `~matplotlib.axes.Axes` or array of Axes
    *ax* can be either a single `~.axes.Axes` object, or an array of Axes
    objects if more than one subplot was created.  The dimensions of the
    resulting array can be controlled with the squeeze keyword, see above.

    Typical idioms for handling the return value are::

        # using the variable ax for single a Axes
        fig, ax = plt.subplots()

        # using the variable axs for multiple Axes
        fig, axs = plt.subplots(2, 2)

        # using tuple unpacking for multiple Axes
        fig, (ax1, ax2) = plt.subplots(1, 2)
        fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)

    The names ``ax`` and pluralized ``axs`` are preferred over ``axes``
    because for the latter it's not clear if it refers to a single
    `~.axes.Axes` instance or a collection of these.

See Also
--------
.pyplot.figure
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.Figure.add_subplot

Examples
--------
::

    # First create some toy data:
    x = np.linspace(0, 2*np.pi, 400)
    y = np.sin(x**2)

    # Create just a figure and only one subplot
    fig, ax = plt.subplots()
    ax.plot(x, y)
    ax.set_title('Simple plot')

    # Create two subplots and unpack the output array immediately
    f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
    ax1.plot(x, y)
    ax1.set_title('Sharing Y axis')
    ax2.scatter(x, y)

    # Create four polar Axes and access them through the returned array
    fig, axs = plt.subplots(2, 2, subplot_kw=dict(projection="polar"))
    axs[0, 0].plot(x, y)
    axs[1, 1].scatter(x, y)

    # Share a X axis with each column of subplots
    plt.subplots(2, 2, sharex='col')

    # Share a Y axis with each row of subplots
    plt.subplots(2, 2, sharey='row')

    # Share both X and Y axes with all subplots
    plt.subplots(2, 2, sharex='all', sharey='all')

    # Note that this is the same as
    plt.subplots(2, 2, sharex=True, sharey=True)

    # Create figure number 10 with a single subplot
    # and clears it if it already exists.
    fig, ax = plt.subplots(num=10, clear=True)

---
## subplot_mosaic
```python
from pyplot import subplot_mosaic
```

Build a layout of Axes based on ASCII art or nested lists.

This is a helper function to build complex GridSpec layouts visually.

See :ref:`mosaic`
for an example and full API documentation

Parameters
----------
mosaic : list of list of {hashable or nested} or str

    A visual layout of how you want your Axes to be arranged
    labeled as strings.  For example ::

       x = [['A panel', 'A panel', 'edge'],
            ['C panel', '.',       'edge']]

    produces 4 Axes:

    - 'A panel' which is 1 row high and spans the first two columns
    - 'edge' which is 2 rows high and is on the right edge
    - 'C panel' which in 1 row and 1 column wide in the bottom left
    - a blank space 1 row and 1 column wide in the bottom center

    Any of the entries in the layout can be a list of lists
    of the same form to create nested layouts.

    If input is a str, then it must be of the form ::

      '''
      AAE
      C.E
      '''

    where each character is a column and each line is a row.
    This only allows only single character Axes labels and does
    not allow nesting but is very terse.

sharex, sharey : bool, default: False
    If True, the x-axis (*sharex*) or y-axis (*sharey*) will be shared
    among all subplots.  In that case, tick label visibility and axis units
    behave as for `subplots`.  If False, each subplot's x- or y-axis will
    be independent.

width_ratios : array-like of length *ncols*, optional
    Defines the relative widths of the columns. Each column gets a
    relative width of ``width_ratios[i] / sum(width_ratios)``.
    If not given, all columns will have the same width.  Convenience
    for ``gridspec_kw={'width_ratios': [...]}``.

height_ratios : array-like of length *nrows*, optional
    Defines the relative heights of the rows. Each row gets a
    relative height of ``height_ratios[i] / sum(height_ratios)``.
    If not given, all rows will have the same height. Convenience
    for ``gridspec_kw={'height_ratios': [...]}``.

empty_sentinel : object, optional
    Entry in the layout to mean "leave this space empty".  Defaults
    to ``'.'``. Note, if *layout* is a string, it is processed via
    `inspect.cleandoc` to remove leading white space, which may
    interfere with using white-space as the empty sentinel.

subplot_kw : dict, optional
    Dictionary with keywords passed to the `.Figure.add_subplot` call
    used to create each subplot.  These values may be overridden by
    values in *per_subplot_kw*.

per_subplot_kw : dict, optional
    A dictionary mapping the Axes identifiers or tuples of identifiers
    to a dictionary of keyword arguments to be passed to the
    `.Figure.add_subplot` call used to create each subplot.  The values
    in these dictionaries have precedence over the values in
    *subplot_kw*.

    If *mosaic* is a string, and thus all keys are single characters,
    it is possible to use a single string instead of a tuple as keys;
    i.e. ``"AB"`` is equivalent to ``("A", "B")``.

    .. versionadded:: 3.7

gridspec_kw : dict, optional
    Dictionary with keywords passed to the `.GridSpec` constructor used
    to create the grid the subplots are placed on.

**fig_kw
    All additional keyword arguments are passed to the
    `.pyplot.figure` call.

Returns
-------
fig : `.Figure`
   The new figure

dict[label, Axes]
   A dictionary mapping the labels to the Axes objects.  The order of
   the Axes is left-to-right and top-to-bottom of their position in the
   total layout.

---
## subplot2grid
```python
from pyplot import subplot2grid
```

Create a subplot at a specific location inside a regular grid.

Parameters
----------
shape : (int, int)
    Number of rows and of columns of the grid in which to place axis.
loc : (int, int)
    Row number and column number of the axis location within the grid.
rowspan : int, default: 1
    Number of rows for the axis to span downwards.
colspan : int, default: 1
    Number of columns for the axis to span to the right.
fig : `.Figure`, optional
    Figure to place the subplot in. Defaults to the current figure.
**kwargs
    Additional keyword arguments are handed to `~.Figure.add_subplot`.

Returns
-------
`~.axes.Axes`

    The Axes of the subplot. The returned Axes can actually be an instance
    of a subclass, such as `.projections.polar.PolarAxes` for polar
    projections.

Notes
-----
The following call ::

    ax = subplot2grid((nrows, ncols), (row, col), rowspan, colspan)

is identical to ::

    fig = gcf()
    gs = fig.add_gridspec(nrows, ncols)
    ax = fig.add_subplot(gs[row:row+rowspan, col:col+colspan])

---
## twinx
```python
from pyplot import twinx
```

Make and return a second Axes that shares the *x*-axis.  The new Axes will
overlay *ax* (or the current Axes if *ax* is *None*), and its ticks will be
on the right.

Examples
--------
:doc:`/gallery/subplots_axes_and_figures/two_scales`

---
## twiny
```python
from pyplot import twiny
```

Make and return a second Axes that shares the *y*-axis.  The new Axes will
overlay *ax* (or the current Axes if *ax* is *None*), and its ticks will be
on the top.

Examples
--------
:doc:`/gallery/subplots_axes_and_figures/two_scales`

---
## subplot_tool
```python
from pyplot import subplot_tool
```

Launch a subplot tool window for a figure.

Returns
-------
`matplotlib.widgets.SubplotTool`

---
## box
```python
from pyplot import box
```

Turn the Axes box on or off on the current Axes.

Parameters
----------
on : bool or None
    The new `~matplotlib.axes.Axes` box state. If ``None``, toggle
    the state.

See Also
--------
:meth:`matplotlib.axes.Axes.set_frame_on`
:meth:`matplotlib.axes.Axes.get_frame_on`

---
## xlim
```python
from pyplot import xlim
```

Get or set the x limits of the current Axes.

Call signatures::

    left, right = xlim()  # return the current xlim
    xlim((left, right))   # set the xlim to left, right
    xlim(left, right)     # set the xlim to left, right

If you do not specify args, you can pass *left* or *right* as kwargs,
i.e.::

    xlim(right=3)  # adjust the right leaving left unchanged
    xlim(left=1)  # adjust the left leaving right unchanged

Setting limits turns autoscaling off for the x-axis.

Returns
-------
left, right
    A tuple of the new x-axis limits.

Notes
-----
Calling this function with no arguments (e.g. ``xlim()``) is the pyplot
equivalent of calling `~.Axes.get_xlim` on the current Axes.
Calling this function with arguments is the pyplot equivalent of calling
`~.Axes.set_xlim` on the current Axes. All arguments are passed though.

---
## ylim
```python
from pyplot import ylim
```

Get or set the y-limits of the current Axes.

Call signatures::

    bottom, top = ylim()  # return the current ylim
    ylim((bottom, top))   # set the ylim to bottom, top
    ylim(bottom, top)     # set the ylim to bottom, top

If you do not specify args, you can alternatively pass *bottom* or
*top* as kwargs, i.e.::

    ylim(top=3)  # adjust the top leaving bottom unchanged
    ylim(bottom=1)  # adjust the bottom leaving top unchanged

Setting limits turns autoscaling off for the y-axis.

Returns
-------
bottom, top
    A tuple of the new y-axis limits.

Notes
-----
Calling this function with no arguments (e.g. ``ylim()``) is the pyplot
equivalent of calling `~.Axes.get_ylim` on the current Axes.
Calling this function with arguments is the pyplot equivalent of calling
`~.Axes.set_ylim` on the current Axes. All arguments are passed though.

---
## xticks
```python
from pyplot import xticks
```

Get or set the current tick locations and labels of the x-axis.

Pass no arguments to return the current values without modifying them.

Parameters
----------
ticks : array-like, optional
    The list of xtick locations.  Passing an empty list removes all xticks.
labels : array-like, optional
    The labels to place at the given *ticks* locations.  This argument can
    only be passed if *ticks* is passed as well.
minor : bool, default: False
    If ``False``, get/set the major ticks/labels; if ``True``, the minor
    ticks/labels.
**kwargs
    `.Text` properties can be used to control the appearance of the labels.

    .. warning::

        This only sets the properties of the current ticks, which is
        only sufficient if you either pass *ticks*, resulting in a
        fixed list of ticks, or if the plot is static.

        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that these settings can get lost if you work on
        the figure further (including also panning/zooming on a
        displayed figure).

        Use `~.pyplot.tick_params` instead if possible.


Returns
-------
locs
    The list of xtick locations.
labels
    The list of xlabel `.Text` objects.

Notes
-----
Calling this function with no arguments (e.g. ``xticks()``) is the pyplot
equivalent of calling `~.Axes.get_xticks` and `~.Axes.get_xticklabels` on
the current Axes.
Calling this function with arguments is the pyplot equivalent of calling
`~.Axes.set_xticks` and `~.Axes.set_xticklabels` on the current Axes.

Examples
--------
>>> locs, labels = xticks()  # Get the current locations and labels.
>>> xticks(np.arange(0, 1, step=0.2))  # Set label locations.
>>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue'])  # Set text labels.
>>> xticks([0, 1, 2], ['January', 'February', 'March'],
...        rotation=20)  # Set text labels and properties.
>>> xticks([])  # Disable xticks.

---
## yticks
```python
from pyplot import yticks
```

Get or set the current tick locations and labels of the y-axis.

Pass no arguments to return the current values without modifying them.

Parameters
----------
ticks : array-like, optional
    The list of ytick locations.  Passing an empty list removes all yticks.
labels : array-like, optional
    The labels to place at the given *ticks* locations.  This argument can
    only be passed if *ticks* is passed as well.
minor : bool, default: False
    If ``False``, get/set the major ticks/labels; if ``True``, the minor
    ticks/labels.
**kwargs
    `.Text` properties can be used to control the appearance of the labels.

    .. warning::

        This only sets the properties of the current ticks, which is
        only sufficient if you either pass *ticks*, resulting in a
        fixed list of ticks, or if the plot is static.

        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that these settings can get lost if you work on
        the figure further (including also panning/zooming on a
        displayed figure).

        Use `~.pyplot.tick_params` instead if possible.

Returns
-------
locs
    The list of ytick locations.
labels
    The list of ylabel `.Text` objects.

Notes
-----
Calling this function with no arguments (e.g. ``yticks()``) is the pyplot
equivalent of calling `~.Axes.get_yticks` and `~.Axes.get_yticklabels` on
the current Axes.
Calling this function with arguments is the pyplot equivalent of calling
`~.Axes.set_yticks` and `~.Axes.set_yticklabels` on the current Axes.

Examples
--------
>>> locs, labels = yticks()  # Get the current locations and labels.
>>> yticks(np.arange(0, 1, step=0.2))  # Set label locations.
>>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue'])  # Set text labels.
>>> yticks([0, 1, 2], ['January', 'February', 'March'],
...        rotation=45)  # Set text labels and properties.
>>> yticks([])  # Disable yticks.

---
## rgrids
```python
from pyplot import rgrids
```

Get or set the radial gridlines on the current polar plot.

Call signatures::

 lines, labels = rgrids()
 lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)

When called with no arguments, `.rgrids` simply returns the tuple
(*lines*, *labels*). When called with arguments, the labels will
appear at the specified radial distances and angle.

Parameters
----------
radii : tuple with floats
    The radii for the radial gridlines

labels : tuple with strings or None
    The labels to use at each radial gridline. The
    `matplotlib.ticker.ScalarFormatter` will be used if None.

angle : float
    The angular position of the radius labels in degrees.

fmt : str or None
    Format string used in `matplotlib.ticker.FormatStrFormatter`.
    For example '%f'.

Returns
-------
lines : list of `.lines.Line2D`
    The radial gridlines.

labels : list of `.text.Text`
    The tick labels.

Other Parameters
----------------
**kwargs
    *kwargs* are optional `.Text` properties for the labels.

See Also
--------
.pyplot.thetagrids
.projections.polar.PolarAxes.set_rgrids
.Axis.get_gridlines
.Axis.get_ticklabels

Examples
--------
::

  # set the locations of the radial gridlines
  lines, labels = rgrids( (0.25, 0.5, 1.0) )

  # set the locations and labels of the radial gridlines
  lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' ))

---
## thetagrids
```python
from pyplot import thetagrids
```

Get or set the theta gridlines on the current polar plot.

Call signatures::

 lines, labels = thetagrids()
 lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs)

When called with no arguments, `.thetagrids` simply returns the tuple
(*lines*, *labels*). When called with arguments, the labels will
appear at the specified angles.

Parameters
----------
angles : tuple with floats, degrees
    The angles of the theta gridlines.

labels : tuple with strings or None
    The labels to use at each radial gridline. The
    `.projections.polar.ThetaFormatter` will be used if None.

fmt : str or None
    Format string used in `matplotlib.ticker.FormatStrFormatter`.
    For example '%f'. Note that the angle in radians will be used.

Returns
-------
lines : list of `.lines.Line2D`
    The theta gridlines.

labels : list of `.text.Text`
    The tick labels.

Other Parameters
----------------
**kwargs
    *kwargs* are optional `.Text` properties for the labels.

See Also
--------
.pyplot.rgrids
.projections.polar.PolarAxes.set_thetagrids
.Axis.get_gridlines
.Axis.get_ticklabels

Examples
--------
::

  # set the locations of the angular gridlines
  lines, labels = thetagrids(range(45, 360, 90))

  # set the locations and labels of the angular gridlines
  lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE'))

---
## get_plot_commands
```python
from pyplot import get_plot_commands
```

Get a sorted list of all of the plotting commands.

---
## _get_pyplot_commands
```python
from pyplot import _get_pyplot_commands
```



---
## colorbar
```python
from pyplot import colorbar
```



---
## clim
```python
from pyplot import clim
```

Set the color limits of the current image.

If either *vmin* or *vmax* is None, the image min/max respectively
will be used for color scaling.

If you want to set the clim of multiple images, use
`~.ScalarMappable.set_clim` on every image, for example::

  for im in gca().get_images():
      im.set_clim(0, 0.5)

---
## get_cmap
```python
from pyplot import get_cmap
```

Get a colormap instance, defaulting to rc values if *name* is None.

Parameters
----------
name : `~matplotlib.colors.Colormap` or str or None, default: None
    If a `.Colormap` instance, it will be returned. Otherwise, the name of
    a colormap known to Matplotlib, which will be resampled by *lut*. The
    default, None, means :rc:`image.cmap`.
lut : int or None, default: None
    If *name* is not already a Colormap instance and *lut* is not None, the
    colormap will be resampled to have *lut* entries in the lookup table.

Returns
-------
Colormap

---
## set_cmap
```python
from pyplot import set_cmap
```

Set the default colormap, and applies it to the current image if any.

Parameters
----------
cmap : `~matplotlib.colors.Colormap` or str
    A colormap instance or the name of a registered colormap.

See Also
--------
colormaps
get_cmap

---
## imread
```python
from pyplot import imread
```



---
## imsave
```python
from pyplot import imsave
```



---
## matshow
```python
from pyplot import matshow
```

Display a 2D array as a matrix in a new figure window.

The origin is set at the upper left hand corner.
The indexing is ``(row, column)`` so that the first index runs vertically
and the second index runs horizontally in the figure:

.. code-block:: none

    A[0, 0]   ⋯ A[0, M-1]
       ⋮             ⋮
    A[N-1, 0] ⋯ A[N-1, M-1]

The aspect ratio of the figure window is that of the array,
unless this would make an excessively short or narrow figure.

Tick labels for the xaxis are placed on top.

Parameters
----------
A : 2D array-like
    The matrix to be displayed.

fignum : None or int
    If *None*, create a new, appropriately sized figure window.

    If 0, use the current Axes (creating one if there is none, without ever
    adjusting the figure size).

    Otherwise, create a new Axes on the figure with the given number
    (creating it at the appropriate size if it does not exist, but not
    adjusting the figure size otherwise).  Note that this will be drawn on
    top of any preexisting Axes on the figure.

Returns
-------
`~matplotlib.image.AxesImage`

Other Parameters
----------------
**kwargs : `~matplotlib.axes.Axes.imshow` arguments

---
## polar
```python
from pyplot import polar
```

Make a polar plot.

call signature::

  polar(theta, r, **kwargs)

Multiple *theta*, *r* arguments are supported, with format strings, as in
`plot`.

---
## figimage
```python
from pyplot import figimage
```



---
## figtext
```python
from pyplot import figtext
```



---
## gca
```python
from pyplot import gca
```



---
## gci
```python
from pyplot import gci
```



---
## ginput
```python
from pyplot import ginput
```



---
## subplots_adjust
```python
from pyplot import subplots_adjust
```



---
## suptitle
```python
from pyplot import suptitle
```



---
## tight_layout
```python
from pyplot import tight_layout
```



---
## waitforbuttonpress
```python
from pyplot import waitforbuttonpress
```



---
## acorr
```python
from pyplot import acorr
```



---
## angle_spectrum
```python
from pyplot import angle_spectrum
```



---
## annotate
```python
from pyplot import annotate
```



---
## arrow
```python
from pyplot import arrow
```



---
## autoscale
```python
from pyplot import autoscale
```



---
## axhline
```python
from pyplot import axhline
```



---
## axhspan
```python
from pyplot import axhspan
```



---
## axis
```python
from pyplot import axis
```



---
## axline
```python
from pyplot import axline
```



---
## axvline
```python
from pyplot import axvline
```



---
## axvspan
```python
from pyplot import axvspan
```



---
## bar
```python
from pyplot import bar
```



---
## barbs
```python
from pyplot import barbs
```



---
## barh
```python
from pyplot import barh
```



---
## bar_label
```python
from pyplot import bar_label
```



---
## boxplot
```python
from pyplot import boxplot
```



---
## broken_barh
```python
from pyplot import broken_barh
```



---
## clabel
```python
from pyplot import clabel
```



---
## cohere
```python
from pyplot import cohere
```



---
## contour
```python
from pyplot import contour
```



---
## contourf
```python
from pyplot import contourf
```



---
## csd
```python
from pyplot import csd
```



---
## ecdf
```python
from pyplot import ecdf
```



---
## errorbar
```python
from pyplot import errorbar
```



---
## eventplot
```python
from pyplot import eventplot
```



---
## fill
```python
from pyplot import fill
```



---
## fill_between
```python
from pyplot import fill_between
```



---
## fill_betweenx
```python
from pyplot import fill_betweenx
```



---
## grid
```python
from pyplot import grid
```



---
## hexbin
```python
from pyplot import hexbin
```



---
## hist
```python
from pyplot import hist
```



---
## stairs
```python
from pyplot import stairs
```



---
## hist2d
```python
from pyplot import hist2d
```



---
## hlines
```python
from pyplot import hlines
```



---
## imshow
```python
from pyplot import imshow
```



---
## legend
```python
from pyplot import legend
```



---
## locator_params
```python
from pyplot import locator_params
```



---
## loglog
```python
from pyplot import loglog
```



---
## magnitude_spectrum
```python
from pyplot import magnitude_spectrum
```



---
## margins
```python
from pyplot import margins
```



---
## minorticks_off
```python
from pyplot import minorticks_off
```



---
## minorticks_on
```python
from pyplot import minorticks_on
```



---
## pcolor
```python
from pyplot import pcolor
```



---
## pcolormesh
```python
from pyplot import pcolormesh
```



---
## phase_spectrum
```python
from pyplot import phase_spectrum
```



---
## pie
```python
from pyplot import pie
```



---
## plot
```python
from pyplot import plot
```



---
## plot_date
```python
from pyplot import plot_date
```



---
## psd
```python
from pyplot import psd
```



---
## quiver
```python
from pyplot import quiver
```



---
## quiverkey
```python
from pyplot import quiverkey
```



---
## scatter
```python
from pyplot import scatter
```



---
## semilogx
```python
from pyplot import semilogx
```



---
## semilogy
```python
from pyplot import semilogy
```



---
## specgram
```python
from pyplot import specgram
```



---
## spy
```python
from pyplot import spy
```



---
## stackplot
```python
from pyplot import stackplot
```



---
## stem
```python
from pyplot import stem
```



---
## step
```python
from pyplot import step
```



---
## streamplot
```python
from pyplot import streamplot
```



---
## table
```python
from pyplot import table
```



---
## text
```python
from pyplot import text
```



---
## tick_params
```python
from pyplot import tick_params
```



---
## ticklabel_format
```python
from pyplot import ticklabel_format
```



---
## tricontour
```python
from pyplot import tricontour
```



---
## tricontourf
```python
from pyplot import tricontourf
```



---
## tripcolor
```python
from pyplot import tripcolor
```



---
## triplot
```python
from pyplot import triplot
```



---
## violinplot
```python
from pyplot import violinplot
```



---
## vlines
```python
from pyplot import vlines
```



---
## xcorr
```python
from pyplot import xcorr
```



---
## sci
```python
from pyplot import sci
```



---
## title
```python
from pyplot import title
```



---
## xlabel
```python
from pyplot import xlabel
```



---
## ylabel
```python
from pyplot import ylabel
```



---
## xscale
```python
from pyplot import xscale
```



---
## yscale
```python
from pyplot import yscale
```



---
## autumn
```python
from pyplot import autumn
```

Set the colormap to 'autumn'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## bone
```python
from pyplot import bone
```

Set the colormap to 'bone'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## cool
```python
from pyplot import cool
```

Set the colormap to 'cool'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## copper
```python
from pyplot import copper
```

Set the colormap to 'copper'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## flag
```python
from pyplot import flag
```

Set the colormap to 'flag'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## gray
```python
from pyplot import gray
```

Set the colormap to 'gray'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## hot
```python
from pyplot import hot
```

Set the colormap to 'hot'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## hsv
```python
from pyplot import hsv
```

Set the colormap to 'hsv'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## jet
```python
from pyplot import jet
```

Set the colormap to 'jet'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## pink
```python
from pyplot import pink
```

Set the colormap to 'pink'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## prism
```python
from pyplot import prism
```

Set the colormap to 'prism'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## spring
```python
from pyplot import spring
```

Set the colormap to 'spring'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## summer
```python
from pyplot import summer
```

Set the colormap to 'summer'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## winter
```python
from pyplot import winter
```

Set the colormap to 'winter'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## magma
```python
from pyplot import magma
```

Set the colormap to 'magma'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## inferno
```python
from pyplot import inferno
```

Set the colormap to 'inferno'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## plasma
```python
from pyplot import plasma
```

Set the colormap to 'plasma'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## viridis
```python
from pyplot import viridis
```

Set the colormap to 'viridis'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## nipy_spectral
```python
from pyplot import nipy_spectral
```

Set the colormap to 'nipy_spectral'.

This changes the default colormap as well as the colormap of the current
image if there is one. See ``help(colormaps)`` for more information.

---
## backend_mod
```python
from pyplot import backend_mod
```



---
## new_figure_manager_given_figure
```python
from pyplot import new_figure_manager_given_figure
```



---
## __name__
```python
from _type1font import __name__
```

A class representing a Type 1 font.

This version reads pfa and pfb files and splits them for embedding in
pdf files. It also supports SlantFont and ExtendFont transformations,
similarly to pdfTeX and friends. There is no support yet for subsetting.

Usage::

    font = Type1Font(filename)
    clear_part, encrypted_part, finale = font.parts
    slanted_font = font.transform({'slant': 0.167})
    extended_font = font.transform({'extend': 1.2})

Sources:

* Adobe Technical Note #5040, Supporting Downloadable PostScript
  Language Fonts.

* Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing,
  v1.1, 1993. ISBN 0-201-57044-0.

---
## _Token
```python
from _type1font import _Token
```

A token in a PostScript stream.

Attributes
----------
pos : int
    Position, i.e. offset from the beginning of the data.
raw : str
    Raw text of the token.
kind : str
    Description of the token (for debugging or testing).

---
## _NameToken
```python
from _type1font import _NameToken
```



---
## _BooleanToken
```python
from _type1font import _BooleanToken
```



---
## _KeywordToken
```python
from _type1font import _KeywordToken
```



---
## _DelimiterToken
```python
from _type1font import _DelimiterToken
```



---
## _WhitespaceToken
```python
from _type1font import _WhitespaceToken
```



---
## _StringToken
```python
from _type1font import _StringToken
```



---
## _BinaryToken
```python
from _type1font import _BinaryToken
```



---
## _NumberToken
```python
from _type1font import _NumberToken
```



---
## _tokenize
```python
from _type1font import _tokenize
```

A generator that produces _Token instances from Type-1 font code.

The consumer of the generator may send an integer to the tokenizer to
indicate that the next token should be _BinaryToken of the given length.

Parameters
----------
data : bytes
    The data of the font to tokenize.

skip_ws : bool
    If true, the generator will drop any _WhitespaceTokens from the output.

---
## _BalancedExpression
```python
from _type1font import _BalancedExpression
```



---
## _expression
```python
from _type1font import _expression
```

Consume some number of tokens and return a balanced PostScript expression.

Parameters
----------
initial : _Token
    The token that triggered parsing a balanced expression.
tokens : iterator of _Token
    Following tokens.
data : bytes
    Underlying data that the token positions point to.

Returns
-------
_BalancedExpression

---
## Type1Font
```python
from _type1font import Type1Font
```

A class representing a Type-1 font, for use by backends.

Attributes
----------
parts : tuple
    A 3-tuple of the cleartext part, the encrypted part, and the finale of
    zeros.

decrypted : bytes
    The decrypted form of ``parts[1]``.

prop : dict[str, Any]
    A dictionary of font properties. Noteworthy keys include:

    - FontName: PostScript name of the font
    - Encoding: dict from numeric codes to glyph names
    - FontMatrix: bytes object encoding a matrix
    - UniqueID: optional font identifier, dropped when modifying the font
    - CharStrings: dict from glyph names to byte code
    - Subrs: array of byte code subroutines
    - OtherSubrs: bytes object encoding some PostScript code

---
## __init__
```python
from _type1font import __init__
```

Initialize a Type-1 font.

Parameters
----------
input : str or 3-tuple
    Either a pfb file name, or a 3-tuple of already-decoded Type-1
    font `~.Type1Font.parts`.

---
## __str__
```python
from _type1font import __str__
```



---
## endpos
```python
from _type1font import endpos
```

Position one past the end of the token

---
## is_keyword
```python
from _type1font import is_keyword
```



---
## is_slash_name
```python
from _type1font import is_slash_name
```



---
## is_delim
```python
from _type1font import is_delim
```



---
## is_number
```python
from _type1font import is_number
```



---
## value
```python
from _type1font import value
```



---
## opposite
```python
from _type1font import opposite
```



---
## _escape
```python
from _type1font import _escape
```



---
## _read
```python
from _type1font import _read
```

Read the font from a file, decoding into usable parts.

---
## _split
```python
from _type1font import _split
```

Split the Type 1 font into its three main parts.

The three parts are: (1) the cleartext part, which ends in a
eexec operator; (2) the encrypted part; (3) the fixed part,
which contains 512 ASCII zeros possibly divided on various
lines, a cleartomark operator, and possibly something else.

---
## _decrypt
```python
from _type1font import _decrypt
```

Decrypt ciphertext using the Type-1 font algorithm.

The algorithm is described in Adobe's "Adobe Type 1 Font Format".
The key argument can be an integer, or one of the strings
'eexec' and 'charstring', which map to the key specified for the
corresponding part of Type-1 fonts.

The ndiscard argument should be an integer, usually 4.
That number of bytes is discarded from the beginning of plaintext.

---
## _encrypt
```python
from _type1font import _encrypt
```

Encrypt plaintext using the Type-1 font algorithm.

The algorithm is described in Adobe's "Adobe Type 1 Font Format".
The key argument can be an integer, or one of the strings
'eexec' and 'charstring', which map to the key specified for the
corresponding part of Type-1 fonts.

The ndiscard argument should be an integer, usually 4. That
number of bytes is prepended to the plaintext before encryption.
This function prepends NUL bytes for reproducibility, even though
the original algorithm uses random bytes, presumably to avoid
cryptanalysis.

---
## _parse
```python
from _type1font import _parse
```

Find the values of various font properties. This limited kind
of parsing is described in Chapter 10 "Adobe Type Manager
Compatibility" of the Type-1 spec.

---
## _parse_subrs
```python
from _type1font import _parse_subrs
```



---
## _parse_charstrings
```python
from _type1font import _parse_charstrings
```



---
## _parse_encoding
```python
from _type1font import _parse_encoding
```



---
## _parse_othersubrs
```python
from _type1font import _parse_othersubrs
```



---
## transform
```python
from _type1font import transform
```

Return a new font that is slanted and/or extended.

Parameters
----------
effects : dict
    A dict with optional entries:

    - 'slant' : float, default: 0
        Tangent of the angle that the font is to be slanted to the
        right. Negative values slant to the left.
    - 'extend' : float, default: 1
        Scaling factor for the font width. Values less than 1 condense
        the glyphs.

Returns
-------
`Type1Font`

---
## __name__
```python
from rcsetup import __name__
```

The rcsetup module contains the validation code for customization using
Matplotlib's rc settings.

Each rc setting is assigned a function used to validate any attempted changes
to that setting.  The validation functions are defined in the rcsetup module,
and are used to construct the rcParams global object which stores the settings
and is referenced throughout Matplotlib.

The default values of the rc settings are set in the default matplotlibrc file.
Any additions or deletions to the parameter set listed here should also be
propagated to the :file:`lib/matplotlib/mpl-data/matplotlibrc` in Matplotlib's
root source directory.

---
## __getattr__
```python
from rcsetup import __getattr__
```



---
## ValidateInStrings
```python
from rcsetup import ValidateInStrings
```



---
## _listify_validator
```python
from rcsetup import _listify_validator
```



---
## validate_any
```python
from rcsetup import validate_any
```



---
## _validate_date
```python
from rcsetup import _validate_date
```



---
## validate_bool
```python
from rcsetup import validate_bool
```

Convert b to ``bool`` or raise.

---
## validate_axisbelow
```python
from rcsetup import validate_axisbelow
```



---
## validate_dpi
```python
from rcsetup import validate_dpi
```

Confirm s is string 'figure' or convert s to float or raise.

---
## _make_type_validator
```python
from rcsetup import _make_type_validator
```

Return a validator that converts inputs to *cls* or raises (and possibly
allows ``None`` as well).

---
## _validate_marker
```python
from rcsetup import _validate_marker
```



---
## _validate_pathlike
```python
from rcsetup import _validate_pathlike
```



---
## validate_fonttype
```python
from rcsetup import validate_fonttype
```

Confirm that this is a Postscript or PDF font type that we know how to
convert to.

---
## validate_backend
```python
from rcsetup import validate_backend
```



---
## _validate_toolbar
```python
from rcsetup import _validate_toolbar
```



---
## validate_color_or_inherit
```python
from rcsetup import validate_color_or_inherit
```

Return a valid color arg.

---
## validate_color_or_auto
```python
from rcsetup import validate_color_or_auto
```



---
## validate_color_for_prop_cycle
```python
from rcsetup import validate_color_for_prop_cycle
```



---
## _validate_color_or_linecolor
```python
from rcsetup import _validate_color_or_linecolor
```



---
## validate_color
```python
from rcsetup import validate_color
```

Return a valid color arg.

---
## _validate_cmap
```python
from rcsetup import _validate_cmap
```



---
## validate_aspect
```python
from rcsetup import validate_aspect
```



---
## validate_fontsize_None
```python
from rcsetup import validate_fontsize_None
```



---
## validate_fontsize
```python
from rcsetup import validate_fontsize
```



---
## validate_fontweight
```python
from rcsetup import validate_fontweight
```



---
## validate_fontstretch
```python
from rcsetup import validate_fontstretch
```



---
## validate_font_properties
```python
from rcsetup import validate_font_properties
```



---
## _validate_mathtext_fallback
```python
from rcsetup import _validate_mathtext_fallback
```



---
## validate_whiskers
```python
from rcsetup import validate_whiskers
```



---
## validate_ps_distiller
```python
from rcsetup import validate_ps_distiller
```



---
## _validate_papersize
```python
from rcsetup import _validate_papersize
```



---
## _validate_linestyle
```python
from rcsetup import _validate_linestyle
```

A validator for all possible line styles, the named ones *and*
the on-off ink sequences.

---
## validate_markevery
```python
from rcsetup import validate_markevery
```

Validate the markevery property of a Line2D object.

Parameters
----------
s : None, int, (int, int), slice, float, (float, float), or list[int]

Returns
-------
None, int, (int, int), slice, float, (float, float), or list[int]

---
## validate_bbox
```python
from rcsetup import validate_bbox
```



---
## validate_sketch
```python
from rcsetup import validate_sketch
```



---
## _validate_greaterthan_minushalf
```python
from rcsetup import _validate_greaterthan_minushalf
```



---
## _validate_greaterequal0_lessequal1
```python
from rcsetup import _validate_greaterequal0_lessequal1
```



---
## _validate_int_greaterequal0
```python
from rcsetup import _validate_int_greaterequal0
```



---
## validate_hatch
```python
from rcsetup import validate_hatch
```

Validate a hatch pattern.
A hatch pattern string can have any sequence of the following
characters: ``\ / | - + * . x o O``.

---
## _validate_minor_tick_ndivs
```python
from rcsetup import _validate_minor_tick_ndivs
```

Validate ndiv parameter related to the minor ticks.
It controls the number of minor ticks to be placed between
two major ticks.

---
## cycler
```python
from rcsetup import cycler
```

Create a `~cycler.Cycler` object much like :func:`cycler.cycler`,
but includes input validation.

Call signatures::

  cycler(cycler)
  cycler(label=values[, label2=values2[, ...]])
  cycler(label, values)

Form 1 copies a given `~cycler.Cycler` object.

Form 2 creates a `~cycler.Cycler` which cycles over one or more
properties simultaneously. If multiple properties are given, their
value lists must have the same length.

Form 3 creates a `~cycler.Cycler` for a single property. This form
exists for compatibility with the original cycler. Its use is
discouraged in favor of the kwarg form, i.e. ``cycler(label=values)``.

Parameters
----------
cycler : Cycler
    Copy constructor for Cycler.

label : str
    The property key. Must be a valid `.Artist` property.
    For example, 'color' or 'linestyle'. Aliases are allowed,
    such as 'c' for 'color' and 'lw' for 'linewidth'.

values : iterable
    Finite-length iterable of the property values. These values
    are validated and will raise a ValueError if invalid.

Returns
-------
Cycler
    A new :class:`~cycler.Cycler` for the given properties.

Examples
--------
Creating a cycler for a single property:

>>> c = cycler(color=['red', 'green', 'blue'])

Creating a cycler for simultaneously cycling over multiple properties
(e.g. red circle, green plus, blue cross):

>>> c = cycler(color=['red', 'green', 'blue'],
...            marker=['o', '+', 'x'])

---
## _DunderChecker
```python
from rcsetup import _DunderChecker
```



---
## _validate_legend_loc
```python
from rcsetup import _validate_legend_loc
```

Confirm that loc is a type which rc.Params["legend.loc"] supports.

.. versionadded:: 3.8

Parameters
----------
loc : str | int | (float, float) | str((float, float))
    The location of the legend.

Returns
-------
loc : str | int | (float, float) or raise ValueError exception
    The location of the legend.

---
## validate_cycler
```python
from rcsetup import validate_cycler
```

Return a Cycler object from a string repr or the object itself.

---
## validate_hist_bins
```python
from rcsetup import validate_hist_bins
```



---
## _ignorecase
```python
from rcsetup import _ignorecase
```

A marker class indicating that a list-of-str is case-insensitive.

---
## _convert_validator_spec
```python
from rcsetup import _convert_validator_spec
```



---
## interactive_bk
```python
from rcsetup import interactive_bk
```



---
## non_interactive_bk
```python
from rcsetup import non_interactive_bk
```



---
## all_backends
```python
from rcsetup import all_backends
```



---
## __init__
```python
from rcsetup import __init__
```

*valid* is a list of legal strings.

---
## __call__
```python
from rcsetup import __call__
```



---
## f
```python
from rcsetup import f
```



---
## validator
```python
from rcsetup import validator
```



---
## _is_iterable_not_string_like
```python
from rcsetup import _is_iterable_not_string_like
```



---
## visit_Attribute
```python
from rcsetup import visit_Attribute
```



---
## func
```python
from rcsetup import func
```



---
## __name__
```python
from ticker import __name__
```

Tick locating and formatting
============================

This module contains classes for configuring tick locating and formatting.
Generic tick locators and formatters are provided, as well as domain specific
custom ones.

Although the locators know nothing about major or minor ticks, they are used
by the Axis class to support major and minor tick locating and formatting.

.. _tick_locating:
.. _locators:

Tick locating
-------------

The Locator class is the base class for all tick locators. The locators
handle autoscaling of the view limits based on the data limits, and the
choosing of tick locations. A useful semi-automatic tick locator is
`MultipleLocator`. It is initialized with a base, e.g., 10, and it picks
axis limits and ticks that are multiples of that base.

The Locator subclasses defined here are:

======================= =======================================================
`AutoLocator`           `MaxNLocator` with simple defaults. This is the default
                        tick locator for most plotting.
`MaxNLocator`           Finds up to a max number of intervals with ticks at
                        nice locations.
`LinearLocator`         Space ticks evenly from min to max.
`LogLocator`            Space ticks logarithmically from min to max.
`MultipleLocator`       Ticks and range are a multiple of base; either integer
                        or float.
`FixedLocator`          Tick locations are fixed.
`IndexLocator`          Locator for index plots (e.g., where
                        ``x = range(len(y))``).
`NullLocator`           No ticks.
`SymmetricalLogLocator` Locator for use with the symlog norm; works like
                        `LogLocator` for the part outside of the threshold and
                        adds 0 if inside the limits.
`AsinhLocator`          Locator for use with the asinh norm, attempting to
                        space ticks approximately uniformly.
`LogitLocator`          Locator for logit scaling.
`AutoMinorLocator`      Locator for minor ticks when the axis is linear and the
                        major ticks are uniformly spaced. Subdivides the major
                        tick interval into a specified number of minor
                        intervals, defaulting to 4 or 5 depending on the major
                        interval.
======================= =======================================================

There are a number of locators specialized for date locations - see
the :mod:`.dates` module.

You can define your own locator by deriving from Locator. You must
override the ``__call__`` method, which returns a sequence of locations,
and you will probably want to override the autoscale method to set the
view limits from the data limits.

If you want to override the default locator, use one of the above or a custom
locator and pass it to the x- or y-axis instance. The relevant methods are::

  ax.xaxis.set_major_locator(xmajor_locator)
  ax.xaxis.set_minor_locator(xminor_locator)
  ax.yaxis.set_major_locator(ymajor_locator)
  ax.yaxis.set_minor_locator(yminor_locator)

The default minor locator is `NullLocator`, i.e., no minor ticks on by default.

.. note::
    `Locator` instances should not be used with more than one
    `~matplotlib.axis.Axis` or `~matplotlib.axes.Axes`. So instead of::

        locator = MultipleLocator(5)
        ax.xaxis.set_major_locator(locator)
        ax2.xaxis.set_major_locator(locator)

    do the following instead::

        ax.xaxis.set_major_locator(MultipleLocator(5))
        ax2.xaxis.set_major_locator(MultipleLocator(5))

.. _formatters:

Tick formatting
---------------

Tick formatting is controlled by classes derived from Formatter. The formatter
operates on a single tick value and returns a string to the axis.

========================= =====================================================
`NullFormatter`           No labels on the ticks.
`FixedFormatter`          Set the strings manually for the labels.
`FuncFormatter`           User defined function sets the labels.
`StrMethodFormatter`      Use string `format` method.
`FormatStrFormatter`      Use an old-style sprintf format string.
`ScalarFormatter`         Default formatter for scalars: autopick the format
                          string.
`LogFormatter`            Formatter for log axes.
`LogFormatterExponent`    Format values for log axis using
                          ``exponent = log_base(value)``.
`LogFormatterMathtext`    Format values for log axis using
                          ``exponent = log_base(value)`` using Math text.
`LogFormatterSciNotation` Format values for log axis using scientific notation.
`LogitFormatter`          Probability formatter.
`EngFormatter`            Format labels in engineering notation.
`PercentFormatter`        Format labels as a percentage.
========================= =====================================================

You can derive your own formatter from the Formatter base class by
simply overriding the ``__call__`` method. The formatter class has
access to the axis view and data limits.

To control the major and minor tick label formats, use one of the
following methods::

  ax.xaxis.set_major_formatter(xmajor_formatter)
  ax.xaxis.set_minor_formatter(xminor_formatter)
  ax.yaxis.set_major_formatter(ymajor_formatter)
  ax.yaxis.set_minor_formatter(yminor_formatter)

In addition to a `.Formatter` instance, `~.Axis.set_major_formatter` and
`~.Axis.set_minor_formatter` also accept a ``str`` or function.  ``str`` input
will be internally replaced with an autogenerated `.StrMethodFormatter` with
the input ``str``. For function input, a `.FuncFormatter` with the input
function will be generated and used.

See :doc:`/gallery/ticks/major_minor_demo` for an example of setting major
and minor ticks. See the :mod:`matplotlib.dates` module for more information
and examples of using date locators and formatters.

---
## _DummyAxis
```python
from ticker import _DummyAxis
```



---
## TickHelper
```python
from ticker import TickHelper
```



---
## Formatter
```python
from ticker import Formatter
```

Create a string based on a tick value and location.

---
## NullFormatter
```python
from ticker import NullFormatter
```

Always return the empty string.

---
## FixedFormatter
```python
from ticker import FixedFormatter
```

Return fixed strings for tick labels based only on position, not value.

.. note::
    `.FixedFormatter` should only be used together with `.FixedLocator`.
    Otherwise, the labels may end up in unexpected positions.

---
## FuncFormatter
```python
from ticker import FuncFormatter
```

Use a user-defined function for formatting.

The function should take in two inputs (a tick value ``x`` and a
position ``pos``), and return a string containing the corresponding
tick label.

---
## FormatStrFormatter
```python
from ticker import FormatStrFormatter
```

Use an old-style ('%' operator) format string to format the tick.

The format string should have a single variable format (%) in it.
It will be applied to the value (not the position) of the tick.

Negative numeric values (e.g., -1) will use a dash, not a Unicode minus;
use mathtext to get a Unicode minus by wrapping the format specifier with $
(e.g. "$%g$").

---
## _UnicodeMinusFormat
```python
from ticker import _UnicodeMinusFormat
```

A specialized string formatter so that `.StrMethodFormatter` respects
:rc:`axes.unicode_minus`.  This implementation relies on the fact that the
format string is only ever called with kwargs *x* and *pos*, so it blindly
replaces dashes by unicode minuses without further checking.

---
## StrMethodFormatter
```python
from ticker import StrMethodFormatter
```

Use a new-style format string (as used by `str.format`) to format the tick.

The field used for the tick value must be labeled *x* and the field used
for the tick position must be labeled *pos*.

The formatter will respect :rc:`axes.unicode_minus` when formatting
negative numeric values.

It is typically unnecessary to explicitly construct `.StrMethodFormatter`
objects, as `~.Axis.set_major_formatter` directly accepts the format string
itself.

---
## ScalarFormatter
```python
from ticker import ScalarFormatter
```

Format tick values as a number.

Parameters
----------
useOffset : bool or float, default: :rc:`axes.formatter.useoffset`
    Whether to use offset notation. See `.set_useOffset`.
useMathText : bool, default: :rc:`axes.formatter.use_mathtext`
    Whether to use fancy math formatting. See `.set_useMathText`.
useLocale : bool, default: :rc:`axes.formatter.use_locale`.
    Whether to use locale settings for decimal sign and positive sign.
    See `.set_useLocale`.

Notes
-----
In addition to the parameters above, the formatting of scientific vs.
floating point representation can be configured via `.set_scientific`
and `.set_powerlimits`).

**Offset notation and scientific notation**

Offset notation and scientific notation look quite similar at first sight.
Both split some information from the formatted tick values and display it
at the end of the axis.

- The scientific notation splits up the order of magnitude, i.e. a
  multiplicative scaling factor, e.g. ``1e6``.

- The offset notation separates an additive constant, e.g. ``+1e6``. The
  offset notation label is always prefixed with a ``+`` or ``-`` sign
  and is thus distinguishable from the order of magnitude label.

The following plot with x limits ``1_000_000`` to ``1_000_010`` illustrates
the different formatting. Note the labels at the right edge of the x axis.

.. plot::

    lim = (1_000_000, 1_000_010)

    fig, (ax1, ax2, ax3) = plt.subplots(3, 1, gridspec_kw={'hspace': 2})
    ax1.set(title='offset_notation', xlim=lim)
    ax2.set(title='scientific notation', xlim=lim)
    ax2.xaxis.get_major_formatter().set_useOffset(False)
    ax3.set(title='floating point notation', xlim=lim)
    ax3.xaxis.get_major_formatter().set_useOffset(False)
    ax3.xaxis.get_major_formatter().set_scientific(False)

---
## LogFormatter
```python
from ticker import LogFormatter
```

Base class for formatting ticks on a log or symlog scale.

It may be instantiated directly, or subclassed.

Parameters
----------
base : float, default: 10.
    Base of the logarithm used in all calculations.

labelOnlyBase : bool, default: False
    If True, label ticks only at integer powers of base.
    This is normally True for major ticks and False for
    minor ticks.

minor_thresholds : (subset, all), default: (1, 0.4)
    If labelOnlyBase is False, these two numbers control
    the labeling of ticks that are not at integer powers of
    base; normally these are the minor ticks. The controlling
    parameter is the log of the axis data range.  In the typical
    case where base is 10 it is the number of decades spanned
    by the axis, so we can call it 'numdec'. If ``numdec <= all``,
    all minor ticks will be labeled.  If ``all < numdec <= subset``,
    then only a subset of minor ticks will be labeled, so as to
    avoid crowding. If ``numdec > subset`` then no minor ticks will
    be labeled.

linthresh : None or float, default: None
    If a symmetric log scale is in use, its ``linthresh``
    parameter must be supplied here.

Notes
-----
The `set_locs` method must be called to enable the subsetting
logic controlled by the ``minor_thresholds`` parameter.

In some cases such as the colorbar, there is no distinction between
major and minor ticks; the tick locations might be set manually,
or by a locator that puts ticks at integer powers of base and
at intermediate locations.  For this situation, disable the
minor_thresholds logic by using ``minor_thresholds=(np.inf, np.inf)``,
so that all ticks will be labeled.

To disable labeling of minor ticks when 'labelOnlyBase' is False,
use ``minor_thresholds=(0, 0)``.  This is the default for the
"classic" style.

Examples
--------
To label a subset of minor ticks when the view limits span up
to 2 decades, and all of the ticks when zoomed in to 0.5 decades
or less, use ``minor_thresholds=(2, 0.5)``.

To label all minor ticks when the view limits span up to 1.5
decades, use ``minor_thresholds=(1.5, 1.5)``.

---
## LogFormatterExponent
```python
from ticker import LogFormatterExponent
```

Format values for log axis using ``exponent = log_base(value)``.

---
## LogFormatterMathtext
```python
from ticker import LogFormatterMathtext
```

Format values for log axis using ``exponent = log_base(value)``.

---
## LogFormatterSciNotation
```python
from ticker import LogFormatterSciNotation
```

Format values following scientific notation in a logarithmic axis.

---
## LogitFormatter
```python
from ticker import LogitFormatter
```

Probability formatter (using Math text).

---
## EngFormatter
```python
from ticker import EngFormatter
```

Format axis values using engineering prefixes to represent powers
of 1000, plus a specified unit, e.g., 10 MHz instead of 1e7.

---
## PercentFormatter
```python
from ticker import PercentFormatter
```

Format numbers as a percentage.

Parameters
----------
xmax : float
    Determines how the number is converted into a percentage.
    *xmax* is the data value that corresponds to 100%.
    Percentages are computed as ``x / xmax * 100``. So if the data is
    already scaled to be percentages, *xmax* will be 100. Another common
    situation is where *xmax* is 1.0.

decimals : None or int
    The number of decimal places to place after the point.
    If *None* (the default), the number will be computed automatically.

symbol : str or None
    A string that will be appended to the label. It may be
    *None* or empty to indicate that no symbol should be used. LaTeX
    special characters are escaped in *symbol* whenever latex mode is
    enabled, unless *is_latex* is *True*.

is_latex : bool
    If *False*, reserved LaTeX characters in *symbol* will be escaped.

---
## Locator
```python
from ticker import Locator
```

Determine tick locations.

Note that the same locator should not be used across multiple
`~matplotlib.axis.Axis` because the locator stores references to the Axis
data and view limits.

---
## IndexLocator
```python
from ticker import IndexLocator
```

Place ticks at every nth point plotted.

IndexLocator assumes index plotting; i.e., that the ticks are placed at integer
values in the range between 0 and len(data) inclusive.

---
## FixedLocator
```python
from ticker import FixedLocator
```

Place ticks at a set of fixed values.

If *nbins* is None ticks are placed at all values. Otherwise, the *locs* array of
possible positions will be subsampled to keep the number of ticks <=
:math:`nbins* +1`. The subsampling will be done to include the smallest absolute
value; for example, if zero is included in the array of possibilities, then it of
the chosen ticks.

---
## NullLocator
```python
from ticker import NullLocator
```

No ticks

---
## LinearLocator
```python
from ticker import LinearLocator
```

Place ticks at evenly spaced values.

The first time this function is called it will try to set the
number of ticks to make a nice tick partitioning.  Thereafter, the
number of ticks will be fixed so that interactive navigation will
be nice

---
## MultipleLocator
```python
from ticker import MultipleLocator
```

Place ticks at every integer multiple of a base plus an offset.

---
## scale_range
```python
from ticker import scale_range
```



---
## _Edge_integer
```python
from ticker import _Edge_integer
```

Helper for `.MaxNLocator`, `.MultipleLocator`, etc.

Take floating-point precision limitations into account when calculating
tick locations as integer multiples of a step.

---
## MaxNLocator
```python
from ticker import MaxNLocator
```

Place evenly spaced ticks, with a cap on the total number of ticks.

Finds nice tick locations with no more than :math:`nbins + 1` ticks being within the
view limits. Locations beyond the limits are added to support autoscaling.

---
## _is_decade
```python
from ticker import _is_decade
```

Return True if *x* is an integer power of *base*.

---
## _decade_less_equal
```python
from ticker import _decade_less_equal
```

Return the largest integer power of *base* that's less or equal to *x*.

If *x* is negative, the exponent will be *greater*.

---
## _decade_greater_equal
```python
from ticker import _decade_greater_equal
```

Return the smallest integer power of *base* that's greater or equal to *x*.

If *x* is negative, the exponent will be *smaller*.

---
## _decade_less
```python
from ticker import _decade_less
```

Return the largest integer power of *base* that's less than *x*.

If *x* is negative, the exponent will be *greater*.

---
## _decade_greater
```python
from ticker import _decade_greater
```

Return the smallest integer power of *base* that's greater than *x*.

If *x* is negative, the exponent will be *smaller*.

---
## _is_close_to_int
```python
from ticker import _is_close_to_int
```



---
## LogLocator
```python
from ticker import LogLocator
```

Place logarithmically spaced ticks.

Places ticks at the values ``subs[j] * base**i``.

---
## SymmetricalLogLocator
```python
from ticker import SymmetricalLogLocator
```

Place ticks spaced linearly near zero and spaced logarithmically beyond a threshold.

---
## AsinhLocator
```python
from ticker import AsinhLocator
```

Place ticks spaced evenly on an inverse-sinh scale.

Generally used with the `~.scale.AsinhScale` class.

.. note::

   This API is provisional and may be revised in the future
   based on early user feedback.

---
## LogitLocator
```python
from ticker import LogitLocator
```

Place ticks spaced evenly on a logit scale.

---
## AutoLocator
```python
from ticker import AutoLocator
```

Place evenly spaced ticks, with the step size and maximum number of ticks chosen
automatically.

This is a subclass of `~matplotlib.ticker.MaxNLocator`, with parameters
*nbins = 'auto'* and *steps = [1, 2, 2.5, 5, 10]*.

---
## AutoMinorLocator
```python
from ticker import AutoMinorLocator
```

Place evenly spaced minor ticks, with the step size and maximum number of ticks
chosen automatically.

The Axis scale must be linear with evenly spaced major ticks .

---
## __init__
```python
from ticker import __init__
```

*n* is the number of subdivisions of the interval between
major ticks; e.g., n=2 will place a single minor tick midway
between major ticks.

If *n* is omitted or None, the value stored in rcParams will be used.
In case *n* is set to 'auto', it will be set to 4 or 5. If the distance
between the major ticks equals 1, 2.5, 5 or 10 it can be perfectly
divided in 5 equidistant sub-intervals with a length multiple of
0.05. Otherwise it is divided in 4 sub-intervals.

---
## get_view_interval
```python
from ticker import get_view_interval
```



---
## set_view_interval
```python
from ticker import set_view_interval
```



---
## get_minpos
```python
from ticker import get_minpos
```



---
## get_data_interval
```python
from ticker import get_data_interval
```



---
## set_data_interval
```python
from ticker import set_data_interval
```



---
## get_tick_space
```python
from ticker import get_tick_space
```



---
## set_axis
```python
from ticker import set_axis
```



---
## create_dummy_axis
```python
from ticker import create_dummy_axis
```



---
## __call__
```python
from ticker import __call__
```



---
## format_ticks
```python
from ticker import format_ticks
```

Return the tick labels for all the ticks at once.

---
## format_data
```python
from ticker import format_data
```



---
## format_data_short
```python
from ticker import format_data_short
```



---
## get_offset
```python
from ticker import get_offset
```

Return scientific notation, plus offset.

---
## set_locs
```python
from ticker import set_locs
```



---
## fix_minus
```python
from ticker import fix_minus
```

Some classes may want to replace a hyphen for minus with the proper
Unicode symbol (U+2212) for typographical correctness.  This is a
helper method to perform such a replacement when it is enabled via
:rc:`axes.unicode_minus`.

---
## _set_locator
```python
from ticker import _set_locator
```

Subclasses may want to override this to set a locator.

---
## set_offset_string
```python
from ticker import set_offset_string
```



---
## format_field
```python
from ticker import format_field
```



---
## get_useOffset
```python
from ticker import get_useOffset
```

Return whether automatic mode for offset notation is active.

This returns True if ``set_useOffset(True)``; it returns False if an
explicit offset was set, e.g. ``set_useOffset(1000)``.

See Also
--------
ScalarFormatter.set_useOffset

---
## set_useOffset
```python
from ticker import set_useOffset
```

Set whether to use offset notation.

When formatting a set numbers whose value is large compared to their
range, the formatter can separate an additive constant. This can
shorten the formatted numbers so that they are less likely to overlap
when drawn on an axis.

Parameters
----------
val : bool or float
    - If False, do not use offset notation.
    - If True (=automatic mode), use offset notation if it can make
      the residual numbers significantly shorter. The exact behavior
      is controlled by :rc:`axes.formatter.offset_threshold`.
    - If a number, force an offset of the given value.

Examples
--------
With active offset notation, the values

``100_000, 100_002, 100_004, 100_006, 100_008``

will be formatted as ``0, 2, 4, 6, 8`` plus an offset ``+1e5``, which
is written to the edge of the axis.

---
## get_useLocale
```python
from ticker import get_useLocale
```

Return whether locale settings are used for formatting.

See Also
--------
ScalarFormatter.set_useLocale

---
## set_useLocale
```python
from ticker import set_useLocale
```

Set whether to use locale settings for decimal sign and positive sign.

Parameters
----------
val : bool or None
    *None* resets to :rc:`axes.formatter.use_locale`.

---
## _format_maybe_minus_and_locale
```python
from ticker import _format_maybe_minus_and_locale
```

Format *arg* with *fmt*, applying Unicode minus and locale if desired.

---
## get_useMathText
```python
from ticker import get_useMathText
```



---
## set_useMathText
```python
from ticker import set_useMathText
```



---
## set_scientific
```python
from ticker import set_scientific
```

Turn scientific notation on or off.

See Also
--------
ScalarFormatter.set_powerlimits

---
## set_powerlimits
```python
from ticker import set_powerlimits
```

Set size thresholds for scientific notation.

Parameters
----------
lims : (int, int)
    A tuple *(min_exp, max_exp)* containing the powers of 10 that
    determine the switchover threshold. For a number representable as
    :math:`a \times 10^\mathrm{exp}` with :math:`1 <= |a| < 10`,
    scientific notation will be used if ``exp <= min_exp`` or
    ``exp >= max_exp``.

    The default limits are controlled by :rc:`axes.formatter.limits`.

    In particular numbers with *exp* equal to the thresholds are
    written in scientific notation.

    Typically, *min_exp* will be negative and *max_exp* will be
    positive.

    For example, ``formatter.set_powerlimits((-3, 4))`` will provide
    the following formatting:
    :math:`1 \times 10^{-3}, 9.9 \times 10^{-3}, 0.01,`
    :math:`9999, 1 \times 10^4`.

See Also
--------
ScalarFormatter.set_scientific

---
## _compute_offset
```python
from ticker import _compute_offset
```



---
## _set_order_of_magnitude
```python
from ticker import _set_order_of_magnitude
```



---
## _set_format
```python
from ticker import _set_format
```



---
## set_base
```python
from ticker import set_base
```

Change the *base* for labeling.

.. warning::
   Should always match the base used for :class:`LogLocator`

---
## set_label_minor
```python
from ticker import set_label_minor
```

Switch minor tick labeling on or off.

Parameters
----------
labelOnlyBase : bool
    If True, label ticks only at integer powers of base.

---
## _num_to_string
```python
from ticker import _num_to_string
```



---
## _pprint_val
```python
from ticker import _pprint_val
```



---
## _non_decade_format
```python
from ticker import _non_decade_format
```

Return string for non-decade locations.

---
## use_overline
```python
from ticker import use_overline
```

Switch display mode with overline for labelling p>1/2.

Parameters
----------
use_overline : bool, default: False
    If x > 1/2, with x = 1-v, indicate if x should be displayed as
    $\overline{v}$. The default is to display $1-v$.

---
## set_one_half
```python
from ticker import set_one_half
```

Set the way one half is displayed.

one_half : str, default: r"\frac{1}{2}"
    The string used to represent 1/2.

---
## set_minor_threshold
```python
from ticker import set_minor_threshold
```

Set the threshold for labelling minors ticks.

Parameters
----------
minor_threshold : int
    Maximum number of locations for labelling some minor ticks. This
    parameter have no effect if minor is False.

---
## set_minor_number
```python
from ticker import set_minor_number
```

Set the number of minor ticks to label when some minor ticks are
labelled.

Parameters
----------
minor_number : int
    Number of ticks which are labelled when the number of ticks is
    below the threshold.

---
## _format_value
```python
from ticker import _format_value
```



---
## _one_minus
```python
from ticker import _one_minus
```



---
## get_usetex
```python
from ticker import get_usetex
```



---
## set_usetex
```python
from ticker import set_usetex
```



---
## format_eng
```python
from ticker import format_eng
```

Format a number in engineering notation, appending a letter
representing the power of 1000 of the original number.
Some examples:

>>> format_eng(0)        # for self.places = 0
'0'

>>> format_eng(1000000)  # for self.places = 1
'1.0 M'

>>> format_eng(-1e-6)  # for self.places = 2
'-1.00 µ'

---
## format_pct
```python
from ticker import format_pct
```

Format the number as a percentage number with the correct
number of decimals and adds the percent symbol, if any.

If ``self.decimals`` is `None`, the number of digits after the
decimal point is set based on the *display_range* of the axis
as follows:

============= ======== =======================
display_range decimals sample
============= ======== =======================
>50           0        ``x = 34.5`` => 35%
>5            1        ``x = 34.5`` => 34.5%
>0.5          2        ``x = 34.5`` => 34.50%
...           ...      ...
============= ======== =======================

This method will not be very good for tiny axis ranges or
extremely large ones. It assumes that the values on the chart
are percentages displayed on a reasonable scale.

---
## convert_to_pct
```python
from ticker import convert_to_pct
```



---
## symbol
```python
from ticker import symbol
```



---
## tick_values
```python
from ticker import tick_values
```



---
## set_params
```python
from ticker import set_params
```

Set parameters within this locator.

---
## raise_if_exceeds
```python
from ticker import raise_if_exceeds
```

Log at WARNING level if *locs* is longer than `Locator.MAXTICKS`.

This is intended to be called immediately before returning *locs* from
``__call__`` to inform users in case their Locator returns a huge
number of ticks, causing Matplotlib to run out of memory.

The "strange" name of this method dates back to when it would raise an
exception instead of emitting a log.

---
## nonsingular
```python
from ticker import nonsingular
```



---
## view_limits
```python
from ticker import view_limits
```

Try to choose the view limits intelligently.

---
## numticks
```python
from ticker import numticks
```



---
## closeto
```python
from ticker import closeto
```



---
## le
```python
from ticker import le
```

Return the largest n: n*step <= x.

---
## ge
```python
from ticker import ge
```

Return the smallest n: n*step >= x.

---
## _validate_steps
```python
from ticker import _validate_steps
```



---
## _staircase
```python
from ticker import _staircase
```



---
## _raw_ticks
```python
from ticker import _raw_ticks
```

Generate a list of tick locations including the range *vmin* to
*vmax*.  In some applications, one or both of the end locations
will not be needed, in which case they are trimmed off
elsewhere.

---
## _set_subs
```python
from ticker import _set_subs
```

Set the minor ticks for the log scaling every ``base**i*subs[j]``.

---
## minor
```python
from ticker import minor
```



---
## get_log_range
```python
from ticker import get_log_range
```



---
## ideal_ticks
```python
from ticker import ideal_ticks
```



---
## __name__
```python
from _docstring import __name__
```



---
## kwarg_doc
```python
from _docstring import kwarg_doc
```

Decorator for defining the kwdoc documentation of artist properties.

This decorator can be applied to artist property setter methods.
The given text is stored in a private attribute ``_kwarg_doc`` on
the method.  It is used to overwrite auto-generated documentation
in the *kwdoc list* for artists. The kwdoc list is used to document
``**kwargs`` when they are properties of an artist. See e.g. the
``**kwargs`` section in `.Axes.text`.

The text should contain the supported types, as well as the default
value if applicable, e.g.:

    @_docstring.kwarg_doc("bool, default: :rc:`text.usetex`")
    def set_usetex(self, usetex):

See Also
--------
matplotlib.artist.kwdoc

---
## Substitution
```python
from _docstring import Substitution
```

A decorator that performs %-substitution on an object's docstring.

This decorator should be robust even if ``obj.__doc__`` is None (for
example, if -OO was passed to the interpreter).

Usage: construct a docstring.Substitution with a sequence or dictionary
suitable for performing substitution; then decorate a suitable function
with the constructed object, e.g.::

    sub_author_name = Substitution(author='Jason')

    @sub_author_name
    def some_function(x):
        "%(author)s wrote this function"

    # note that some_function.__doc__ is now "Jason wrote this function"

One can also use positional arguments::

    sub_first_last_names = Substitution('Edgar Allen', 'Poe')

    @sub_first_last_names
    def some_function(x):
        "%s %s wrote the Raven"

---
## _ArtistKwdocLoader
```python
from _docstring import _ArtistKwdocLoader
```



---
## _ArtistPropertiesSubstitution
```python
from _docstring import _ArtistPropertiesSubstitution
```

A `.Substitution` with two additional features:

- Substitutions of the form ``%(classname:kwdoc)s`` (ending with the
  literal ":kwdoc" suffix) trigger lookup of an Artist subclass with the
  given *classname*, and are substituted with the `.kwdoc` of that class.
- Decorating a class triggers substitution both on the class docstring and
  on the class' ``__init__`` docstring (which is a commonly required
  pattern for Artist subclasses).

---
## copy
```python
from _docstring import copy
```

Copy a docstring from another source function (if present).

---
## decorator
```python
from _docstring import decorator
```



---
## __init__
```python
from _docstring import __init__
```



---
## __call__
```python
from _docstring import __call__
```



---
## update
```python
from _docstring import update
```

Update ``self.params`` (which must be a dict) with the supplied args.

---
## __missing__
```python
from _docstring import __missing__
```



---
## do_copy
```python
from _docstring import do_copy
```



---
## __name__
```python
from path import __name__
```

local path implementation.

---
## Path
```python
from path import Path
```

A series of possibly disconnected, possibly closed, line and curve
segments.

The underlying storage is made up of two parallel numpy arrays:

- *vertices*: an (N, 2) float array of vertices
- *codes*: an N-length `numpy.uint8` array of path codes, or None

These two arrays always have the same length in the first
dimension.  For example, to represent a cubic curve, you must
provide three vertices and three `CURVE4` codes.

The code types are:

- `STOP`   :  1 vertex (ignored)
    A marker for the end of the entire path (currently not required and
    ignored)

- `MOVETO` :  1 vertex
    Pick up the pen and move to the given vertex.

- `LINETO` :  1 vertex
    Draw a line from the current position to the given vertex.

- `CURVE3` :  1 control point, 1 endpoint
    Draw a quadratic Bézier curve from the current position, with the given
    control point, to the given end point.

- `CURVE4` :  2 control points, 1 endpoint
    Draw a cubic Bézier curve from the current position, with the given
    control points, to the given end point.

- `CLOSEPOLY` : 1 vertex (ignored)
    Draw a line segment to the start point of the current polyline.

If *codes* is None, it is interpreted as a `MOVETO` followed by a series
of `LINETO`.

Users of Path objects should not access the vertices and codes arrays
directly.  Instead, they should use `iter_segments` or `cleaned` to get the
vertex/code pairs.  This helps, in particular, to consistently handle the
case of *codes* being None.

Some behavior of Path objects can be controlled by rcParams. See the
rcParams whose keys start with 'path.'.

.. note::

    The vertices and codes arrays should be treated as
    immutable -- there are a number of optimizations and assumptions
    made up front in the constructor that will not change when the
    data changes.

---
## get_path_collection_extents
```python
from path import get_path_collection_extents
```

Get bounding box of a `.PathCollection`\s internal objects.

That is, given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as found
in a `.PathCollection`, return the bounding box that encapsulates all of them.

Parameters
----------
master_transform : `~matplotlib.transforms.Transform`
    Global transformation applied to all paths.
paths : list of `Path`
transforms : list of `~matplotlib.transforms.Affine2DBase`
    If non-empty, this overrides *master_transform*.
offsets : (N, 2) array-like
offset_transform : `~matplotlib.transforms.Affine2DBase`
    Transform applied to the offsets before offsetting the path.

Notes
-----
The way that *paths*, *transforms* and *offsets* are combined follows the same
method as for collections: each is iterated over independently, so if you have 3
paths (A, B, C), 2 transforms (α, β) and 1 offset (O), their combinations are as
follows:

- (A, α, O)
- (B, β, O)
- (C, α, O)

---
## __init__
```python
from path import __init__
```

Initialize and return a local Path instance.

Path can be relative to the current directory.
If path is None it defaults to the current working directory.
If expanduser is True, tilde-expansion is performed.
Note that Path instances always carry an absolute path.
Note also that passing in a local path object will simply return
the exact same path object. Use new() to get a new copy.

---
## _fast_from_codes_and_verts
```python
from path import _fast_from_codes_and_verts
```

Create a Path instance without the expense of calling the constructor.

Parameters
----------
verts : array-like
codes : array
internals_from : Path or None
    If not None, another `Path` from which the attributes
    ``should_simplify``, ``simplify_threshold``, and
    ``interpolation_steps`` will be copied.  Note that ``readonly`` is
    never copied, and always set to ``False`` by this constructor.

---
## _create_closed
```python
from path import _create_closed
```

Create a closed polygonal path going through *vertices*.

Unlike ``Path(..., closed=True)``, *vertices* should **not** end with
an entry for the CLOSEPATH; this entry is added by `._create_closed`.

---
## _update_values
```python
from path import _update_values
```



---
## vertices
```python
from path import vertices
```



---
## codes
```python
from path import codes
```



---
## simplify_threshold
```python
from path import simplify_threshold
```



---
## should_simplify
```python
from path import should_simplify
```



---
## readonly
```python
from path import readonly
```

`True` if the `Path` is read-only.

---
## copy
```python
from path import copy
```

Copy path to target.

If mode is True, will copy permission from path to target.
If stat is True, copy permission, last modification
time, last access time, and flags from path to target.

---
## __deepcopy__
```python
from path import __deepcopy__
```

Return a deepcopy of the `Path`.  The `Path` will not be
readonly, even if the source `Path` is.

---
## make_compound_path_from_polys
```python
from path import make_compound_path_from_polys
```

Make a compound `Path` object to draw a number of polygons with equal
numbers of sides.

.. plot:: gallery/misc/histogram_path.py

Parameters
----------
XY : (numpolys, numsides, 2) array

---
## make_compound_path
```python
from path import make_compound_path
```

Concatenate a list of `Path`\s into a single `Path`, removing all `STOP`\s.

---
## __repr__
```python
from path import __repr__
```



---
## __len__
```python
from path import __len__
```



---
## iter_segments
```python
from path import iter_segments
```

Iterate over all curve segments in the path.

Each iteration returns a pair ``(vertices, code)``, where ``vertices``
is a sequence of 1-3 coordinate pairs, and ``code`` is a `Path` code.

Additionally, this method can provide a number of standard cleanups and
conversions to the path.

Parameters
----------
transform : None or :class:`~matplotlib.transforms.Transform`
    If not None, the given affine transformation will be applied to the
    path.
remove_nans : bool, optional
    Whether to remove all NaNs from the path and skip over them using
    MOVETO commands.
clip : None or (float, float, float, float), optional
    If not None, must be a four-tuple (x1, y1, x2, y2)
    defining a rectangle in which to clip the path.
snap : None or bool, optional
    If True, snap all nodes to pixels; if False, don't snap them.
    If None, snap if the path contains only segments
    parallel to the x or y axes, and no more than 1024 of them.
stroke_width : float, optional
    The width of the stroke being drawn (used for path snapping).
simplify : None or bool, optional
    Whether to simplify the path by removing vertices
    that do not affect its appearance.  If None, use the
    :attr:`should_simplify` attribute.  See also :rc:`path.simplify`
    and :rc:`path.simplify_threshold`.
curves : bool, optional
    If True, curve segments will be returned as curve segments.
    If False, all curves will be converted to line segments.
sketch : None or sequence, optional
    If not None, must be a 3-tuple of the form
    (scale, length, randomness), representing the sketch parameters.

---
## iter_bezier
```python
from path import iter_bezier
```

Iterate over each Bézier curve (lines included) in a `Path`.

Parameters
----------
**kwargs
    Forwarded to `.iter_segments`.

Yields
------
B : `~matplotlib.bezier.BezierSegment`
    The Bézier curves that make up the current path. Note in particular
    that freestanding points are Bézier curves of order 0, and lines
    are Bézier curves of order 1 (with two control points).
code : `~matplotlib.path.Path.code_type`
    The code describing what kind of curve is being returned.
    `MOVETO`, `LINETO`, `CURVE3`, and `CURVE4` correspond to
    Bézier curves with 1, 2, 3, and 4 control points (respectively).
    `CLOSEPOLY` is a `LINETO` with the control points correctly
    chosen based on the start/end points of the current stroke.

---
## _iter_connected_components
```python
from path import _iter_connected_components
```

Return subpaths split at MOVETOs.

---
## cleaned
```python
from path import cleaned
```

Return a new `Path` with vertices and codes cleaned according to the
parameters.

See Also
--------
Path.iter_segments : for details of the keyword arguments.

---
## transformed
```python
from path import transformed
```

Return a transformed copy of the path.

See Also
--------
matplotlib.transforms.TransformedPath
    A specialized path class that will cache the transformed result and
    automatically update when the transform changes.

---
## contains_point
```python
from path import contains_point
```

Return whether the area enclosed by the path contains the given point.

The path is always treated as closed; i.e. if the last code is not
`CLOSEPOLY` an implicit segment connecting the last vertex to the first
vertex is assumed.

Parameters
----------
point : (float, float)
    The point (x, y) to check.
transform : `~matplotlib.transforms.Transform`, optional
    If not ``None``, *point* will be compared to ``self`` transformed
    by *transform*; i.e. for a correct check, *transform* should
    transform the path into the coordinate system of *point*.
radius : float, default: 0
    Additional margin on the path in coordinates of *point*.
    The path is extended tangentially by *radius/2*; i.e. if you would
    draw the path with a linewidth of *radius*, all points on the line
    would still be considered to be contained in the area. Conversely,
    negative values shrink the area: Points on the imaginary line
    will be considered outside the area.

Returns
-------
bool

Notes
-----
The current algorithm has some limitations:

- The result is undefined for points exactly at the boundary
  (i.e. at the path shifted by *radius/2*).
- The result is undefined if there is no enclosed area, i.e. all
  vertices are on a straight line.
- If bounding lines start to cross each other due to *radius* shift,
  the result is not guaranteed to be correct.

---
## contains_points
```python
from path import contains_points
```

Return whether the area enclosed by the path contains the given points.

The path is always treated as closed; i.e. if the last code is not
`CLOSEPOLY` an implicit segment connecting the last vertex to the first
vertex is assumed.

Parameters
----------
points : (N, 2) array
    The points to check. Columns contain x and y values.
transform : `~matplotlib.transforms.Transform`, optional
    If not ``None``, *points* will be compared to ``self`` transformed
    by *transform*; i.e. for a correct check, *transform* should
    transform the path into the coordinate system of *points*.
radius : float, default: 0
    Additional margin on the path in coordinates of *points*.
    The path is extended tangentially by *radius/2*; i.e. if you would
    draw the path with a linewidth of *radius*, all points on the line
    would still be considered to be contained in the area. Conversely,
    negative values shrink the area: Points on the imaginary line
    will be considered outside the area.

Returns
-------
length-N bool array

Notes
-----
The current algorithm has some limitations:

- The result is undefined for points exactly at the boundary
  (i.e. at the path shifted by *radius/2*).
- The result is undefined if there is no enclosed area, i.e. all
  vertices are on a straight line.
- If bounding lines start to cross each other due to *radius* shift,
  the result is not guaranteed to be correct.

---
## contains_path
```python
from path import contains_path
```

Return whether this (closed) path completely contains the given path.

If *transform* is not ``None``, the path will be transformed before
checking for containment.

---
## get_extents
```python
from path import get_extents
```

Get Bbox of the path.

Parameters
----------
transform : `~matplotlib.transforms.Transform`, optional
    Transform to apply to path before computing extents, if any.
**kwargs
    Forwarded to `.iter_bezier`.

Returns
-------
matplotlib.transforms.Bbox
    The extents of the path Bbox([[xmin, ymin], [xmax, ymax]])

---
## intersects_path
```python
from path import intersects_path
```

Return whether if this path intersects another given path.

If *filled* is True, then this also returns True if one path completely
encloses the other (i.e., the paths are treated as filled).

---
## intersects_bbox
```python
from path import intersects_bbox
```

Return whether this path intersects a given `~.transforms.Bbox`.

If *filled* is True, then this also returns True if the path completely
encloses the `.Bbox` (i.e., the path is treated as filled).

The bounding box is always considered filled.

---
## interpolated
```python
from path import interpolated
```

Return a new path resampled to length N x *steps*.

Codes other than `LINETO` are not handled correctly.

---
## to_polygons
```python
from path import to_polygons
```

Convert this path to a list of polygons or polylines.  Each
polygon/polyline is an (N, 2) array of vertices.  In other words,
each polygon has no `MOVETO` instructions or curves.  This
is useful for displaying in backends that do not support
compound paths or Bézier curves.

If *width* and *height* are both non-zero then the lines will
be simplified so that vertices outside of (0, 0), (width,
height) will be clipped.

The resulting polygons will be simplified if the
:attr:`Path.should_simplify` attribute of the path is `True`.

If *closed_only* is `True` (default), only closed polygons,
with the last point being the same as the first point, will be
returned.  Any unclosed polylines in the path will be
explicitly closed.  If *closed_only* is `False`, any unclosed
polygons in the path will be returned as unclosed polygons,
and the closed polygons will be returned explicitly closed by
setting the last point to the same as the first point.

---
## unit_rectangle
```python
from path import unit_rectangle
```

Return a `Path` instance of the unit rectangle from (0, 0) to (1, 1).

---
## unit_regular_polygon
```python
from path import unit_regular_polygon
```

Return a :class:`Path` instance for a unit regular polygon with the
given *numVertices* such that the circumscribing circle has radius 1.0,
centered at (0, 0).

---
## unit_regular_star
```python
from path import unit_regular_star
```

Return a :class:`Path` for a unit regular star with the given
numVertices and radius of 1.0, centered at (0, 0).

---
## unit_regular_asterisk
```python
from path import unit_regular_asterisk
```

Return a :class:`Path` for a unit regular asterisk with the given
numVertices and radius of 1.0, centered at (0, 0).

---
## unit_circle
```python
from path import unit_circle
```

Return the readonly :class:`Path` of the unit circle.

For most cases, :func:`Path.circle` will be what you want.

---
## circle
```python
from path import circle
```

Return a `Path` representing a circle of a given radius and center.

Parameters
----------
center : (float, float), default: (0, 0)
    The center of the circle.
radius : float, default: 1
    The radius of the circle.
readonly : bool
    Whether the created path should have the "readonly" argument
    set when creating the Path instance.

Notes
-----
The circle is approximated using 8 cubic Bézier curves, as described in

  Lancaster, Don.  `Approximating a Circle or an Ellipse Using Four
  Bezier Cubic Splines <https://www.tinaja.com/glib/ellipse4.pdf>`_.

---
## unit_circle_righthalf
```python
from path import unit_circle_righthalf
```

Return a `Path` of the right half of a unit circle.

See `Path.circle` for the reference on the approximation used.

---
## arc
```python
from path import arc
```

Return a `Path` for the unit circle arc from angles *theta1* to
*theta2* (in degrees).

*theta2* is unwrapped to produce the shortest arc within 360 degrees.
That is, if *theta2* > *theta1* + 360, the arc will be from *theta1* to
*theta2* - 360 and not a full circle plus some extra overlap.

If *n* is provided, it is the number of spline segments to make.
If *n* is not provided, the number of spline segments is
determined based on the delta between *theta1* and *theta2*.

   Masionobe, L.  2003.  `Drawing an elliptical arc using
   polylines, quadratic or cubic Bezier curves
   <https://web.archive.org/web/20190318044212/http://www.spaceroots.org/documents/ellipse/index.html>`_.

---
## wedge
```python
from path import wedge
```

Return a `Path` for the unit circle wedge from angles *theta1* to
*theta2* (in degrees).

*theta2* is unwrapped to produce the shortest wedge within 360 degrees.
That is, if *theta2* > *theta1* + 360, the wedge will be from *theta1*
to *theta2* - 360 and not a full circle plus some extra overlap.

If *n* is provided, it is the number of spline segments to make.
If *n* is not provided, the number of spline segments is
determined based on the delta between *theta1* and *theta2*.

See `Path.arc` for the reference on the approximation used.

---
## hatch
```python
from path import hatch
```

Given a hatch specifier, *hatchpattern*, generates a `Path` that
can be used in a repeated hatching pattern.  *density* is the
number of lines per unit square.

---
## clip_to_bbox
```python
from path import clip_to_bbox
```

Clip the path to the given bounding box.

The path must be made up of one or more closed polygons.  This
algorithm will not behave correctly for unclosed paths.

If *inside* is `True`, clip to the inside of the box, otherwise
to the outside of the box.

---
## __name__
```python
from _layoutgrid import __name__
```

A layoutgrid is a nrows by ncols set of boxes, meant to be used by
`._constrained_layout`, each box is analogous to a subplotspec element of
a gridspec.

Each box is defined by left[ncols], right[ncols], bottom[nrows] and top[nrows],
and by two editable margins for each side.  The main margin gets its value
set by the size of ticklabels, titles, etc on each Axes that is in the figure.
The outer margin is the padding around the Axes, and space for any
colorbars.

The "inner" widths and heights of these boxes are then constrained to be the
same (relative the values of `width_ratios[ncols]` and `height_ratios[nrows]`).

The layoutgrid is then constrained to be contained within a parent layoutgrid,
its column(s) and row(s) specified when it is created.

---
## LayoutGrid
```python
from _layoutgrid import LayoutGrid
```

Analogous to a gridspec, and contained in another LayoutGrid.

---
## seq_id
```python
from _layoutgrid import seq_id
```

Generate a short sequential id for layoutbox objects.

---
## plot_children
```python
from _layoutgrid import plot_children
```

Simple plotting to show where boxes are.

---
## __init__
```python
from _layoutgrid import __init__
```



---
## __repr__
```python
from _layoutgrid import __repr__
```



---
## reset_margins
```python
from _layoutgrid import reset_margins
```

Reset all the margins to zero.  Must do this after changing
figure size, for instance, because the relative size of the
axes labels etc changes.

---
## add_constraints
```python
from _layoutgrid import add_constraints
```



---
## hard_constraints
```python
from _layoutgrid import hard_constraints
```

These are the redundant constraints, plus ones that make the
rest of the code easier.

---
## add_child
```python
from _layoutgrid import add_child
```



---
## parent_constraints
```python
from _layoutgrid import parent_constraints
```



---
## grid_constraints
```python
from _layoutgrid import grid_constraints
```



---
## edit_margin
```python
from _layoutgrid import edit_margin
```

Change the size of the margin for one cell.

Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
    margin to alter.

size : float
    Size of the margin.  If it is larger than the existing minimum it
    updates the margin size. Fraction of figure size.

cell : int
    Cell column or row to edit.

---
## edit_margin_min
```python
from _layoutgrid import edit_margin_min
```

Change the minimum size of the margin for one cell.

Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
    margin to alter.

size : float
    Minimum size of the margin .  If it is larger than the
    existing minimum it updates the margin size. Fraction of
    figure size.

cell : int
    Cell column or row to edit.

---
## edit_margins
```python
from _layoutgrid import edit_margins
```

Change the size of all the margin of all the cells in the layout grid.

Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
    margin to alter.

size : float
    Size to set the margins.  Fraction of figure size.

---
## edit_all_margins_min
```python
from _layoutgrid import edit_all_margins_min
```

Change the minimum size of all the margin of all
the cells in the layout grid.

Parameters
----------
todo : {'left', 'right', 'bottom', 'top'}
    The margin to alter.

size : float
    Minimum size of the margin.  If it is larger than the
    existing minimum it updates the margin size. Fraction of
    figure size.

---
## edit_outer_margin_mins
```python
from _layoutgrid import edit_outer_margin_mins
```

Edit all four margin minimums in one statement.

Parameters
----------
margin : dict
    size of margins in a dict with keys 'left', 'right', 'bottom',
    'top'

ss : SubplotSpec
    defines the subplotspec these margins should be applied to

---
## get_margins
```python
from _layoutgrid import get_margins
```

Return the margin at this position

---
## get_outer_bbox
```python
from _layoutgrid import get_outer_bbox
```

Return the outer bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## get_inner_bbox
```python
from _layoutgrid import get_inner_bbox
```

Return the inner bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## get_bbox_for_cb
```python
from _layoutgrid import get_bbox_for_cb
```

Return the bounding box that includes the
decorations but, *not* the colorbar...

---
## get_left_margin_bbox
```python
from _layoutgrid import get_left_margin_bbox
```

Return the left margin bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## get_bottom_margin_bbox
```python
from _layoutgrid import get_bottom_margin_bbox
```

Return the left margin bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## get_right_margin_bbox
```python
from _layoutgrid import get_right_margin_bbox
```

Return the left margin bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## get_top_margin_bbox
```python
from _layoutgrid import get_top_margin_bbox
```

Return the left margin bounding box of the subplot specs
given by rows and cols.  rows and cols can be spans.

---
## update_variables
```python
from _layoutgrid import update_variables
```

Update the variables for the solver attached to this layoutgrid.

---
## __name__
```python
from contour import __name__
```

Classes to support contour plotting and labelling for the Axes class.

---
## _contour_labeler_event_handler
```python
from contour import _contour_labeler_event_handler
```



---
## ContourLabeler
```python
from contour import ContourLabeler
```

Mixin to provide labelling capability to `.ContourSet`.

---
## _is_closed_polygon
```python
from contour import _is_closed_polygon
```

Return whether first and last object in a sequence are the same. These are
presumably coordinates on a polygonal curve, in which case this function
tests if that curve is closed.

---
## _find_closest_point_on_path
```python
from contour import _find_closest_point_on_path
```

Parameters
----------
xys : (N, 2) array-like
    Coordinates of vertices.
p : (float, float)
    Coordinates of point.

Returns
-------
d2min : float
    Minimum square distance of *p* to *xys*.
proj : (float, float)
    Projection of *p* onto *xys*.
imin : (int, int)
    Consecutive indices of vertices of segment in *xys* where *proj* is.
    Segments are considered as including their end-points; i.e. if the
    closest point on the path is a node in *xys* with index *i*, this
    returns ``(i-1, i)``.  For the special case where *xys* is a single
    point, this returns ``(0, 0)``.

---
## ContourSet
```python
from contour import ContourSet
```

Store a set of contour lines or filled regions.

User-callable method: `~.Axes.clabel`

Parameters
----------
ax : `~matplotlib.axes.Axes`

levels : [level0, level1, ..., leveln]
    A list of floating point numbers indicating the contour levels.

allsegs : [level0segs, level1segs, ...]
    List of all the polygon segments for all the *levels*.
    For contour lines ``len(allsegs) == len(levels)``, and for
    filled contour regions ``len(allsegs) = len(levels)-1``. The lists
    should look like ::

        level0segs = [polygon0, polygon1, ...]
        polygon0 = [[x0, y0], [x1, y1], ...]

allkinds : ``None`` or [level0kinds, level1kinds, ...]
    Optional list of all the polygon vertex kinds (code types), as
    described and used in Path. This is used to allow multiply-
    connected paths such as holes within filled polygons.
    If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
    should look like ::

        level0kinds = [polygon0kinds, ...]
        polygon0kinds = [vertexcode0, vertexcode1, ...]

    If *allkinds* is not ``None``, usually all polygons for a
    particular contour level are grouped together so that
    ``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.

**kwargs
    Keyword arguments are as described in the docstring of
    `~.Axes.contour`.

%(contour_set_attributes)s

---
## QuadContourSet
```python
from contour import QuadContourSet
```

Create and store a set of contour lines or filled regions.

This class is typically not instantiated directly by the user but by
`~.Axes.contour` and `~.Axes.contourf`.

%(contour_set_attributes)s

---
## clabel
```python
from contour import clabel
```

Label a contour plot.

Adds labels to line contours in this `.ContourSet` (which inherits from
this mixin class).

Parameters
----------
levels : array-like, optional
    A list of level values, that should be labeled. The list must be
    a subset of ``cs.levels``. If not given, all levels are labeled.

fontsize : str or float, default: :rc:`font.size`
    Size in points or relative size e.g., 'smaller', 'x-large'.
    See `.Text.set_size` for accepted string values.

colors : :mpltype:`color` or colors or None, default: None
    The label colors:

    - If *None*, the color of each label matches the color of
      the corresponding contour.

    - If one string color, e.g., *colors* = 'r' or *colors* =
      'red', all labels will be plotted in this color.

    - If a tuple of colors (string, float, RGB, etc), different labels
      will be plotted in different colors in the order specified.

inline : bool, default: True
    If ``True`` the underlying contour is removed where the label is
    placed.

inline_spacing : float, default: 5
    Space in pixels to leave on each side of label when placing inline.

    This spacing will be exact for labels at locations where the
    contour is straight, less so for labels on curved contours.

fmt : `.Formatter` or str or callable or dict, optional
    How the levels are formatted:

    - If a `.Formatter`, it is used to format all levels at once, using
      its `.Formatter.format_ticks` method.
    - If a str, it is interpreted as a %-style format string.
    - If a callable, it is called with one level at a time and should
      return the corresponding label.
    - If a dict, it should directly map levels to labels.

    The default is to use a standard `.ScalarFormatter`.

manual : bool or iterable, default: False
    If ``True``, contour labels will be placed manually using
    mouse clicks. Click the first button near a contour to
    add a label, click the second button (or potentially both
    mouse buttons at once) to finish adding labels. The third
    button can be used to remove the last label added, but
    only if labels are not inline. Alternatively, the keyboard
    can be used to select label locations (enter to end label
    placement, delete or backspace act like the third mouse button,
    and any other key will select a label location).

    *manual* can also be an iterable object of (x, y) tuples.
    Contour labels will be created as if mouse is clicked at each
    (x, y) position.

rightside_up : bool, default: True
    If ``True``, label rotations will always be plus
    or minus 90 degrees from level.

use_clabeltext : bool, default: False
    If ``True``, use `.Text.set_transform_rotates_text` to ensure that
    label rotation is updated whenever the Axes aspect changes.

zorder : float or None, default: ``(2 + contour.get_zorder())``
    zorder of the contour labels.

Returns
-------
labels
    A list of `.Text` instances for the labels.

---
## print_label
```python
from contour import print_label
```

Return whether a contour is long enough to hold a label.

---
## too_close
```python
from contour import too_close
```

Return whether a label is already near this location.

---
## _get_nth_label_width
```python
from contour import _get_nth_label_width
```

Return the width of the *nth* label, in pixels.

---
## get_text
```python
from contour import get_text
```

Get the text of the label.

---
## locate_label
```python
from contour import locate_label
```

Find good place to draw a label (relatively flat part of the contour).

---
## _split_path_and_get_label_rotation
```python
from contour import _split_path_and_get_label_rotation
```

Prepare for insertion of a label at index *idx* of *path*.

Parameters
----------
path : Path
    The path where the label will be inserted, in data space.
idx : int
    The vertex index after which the label will be inserted.
screen_pos : (float, float)
    The position where the label will be inserted, in screen space.
lw : float
    The label width, in screen space.
spacing : float
    Extra spacing around the label, in screen space.

Returns
-------
path : Path
    The path, broken so that the label can be drawn over it.
angle : float
    The rotation of the label.

Notes
-----
Both tasks are done together to avoid calculating path lengths multiple times,
which is relatively costly.

The method used here involves computing the path length along the contour in
pixel coordinates and then looking (label width / 2) away from central point to
determine rotation and then to break contour if desired.  The extra spacing is
taken into account when breaking the path, but not when computing the angle.

---
## calc_label_rot_and_inline
```python
from contour import calc_label_rot_and_inline
```

Calculate the appropriate label rotation given the linecontour
coordinates in screen units, the index of the label location and the
label width.

If *lc* is not None or empty, also break contours and compute
inlining.

*spacing* is the empty space to leave around the label, in pixels.

Both tasks are done together to avoid calculating path lengths
multiple times, which is relatively costly.

The method used here involves computing the path length along the
contour in pixel coordinates and then looking approximately (label
width / 2) away from central point to determine rotation and then to
break contour if desired.

---
## add_label
```python
from contour import add_label
```

Add a contour label, respecting whether *use_clabeltext* was set.

---
## add_label_clabeltext
```python
from contour import add_label_clabeltext
```

Add contour label with `.Text.set_transform_rotates_text`.

---
## add_label_near
```python
from contour import add_label_near
```

Add a label near the point ``(x, y)``.

Parameters
----------
x, y : float
    The approximate location of the label.
inline : bool, default: True
    If *True* remove the segment of the contour beneath the label.
inline_spacing : int, default: 5
    Space in pixels to leave on each side of label when placing
    inline. This spacing will be exact for labels at locations where
    the contour is straight, less so for labels on curved contours.
transform : `.Transform` or `False`, default: ``self.axes.transData``
    A transform applied to ``(x, y)`` before labeling.  The default
    causes ``(x, y)`` to be interpreted as data coordinates.  `False`
    is a synonym for `.IdentityTransform`; i.e. ``(x, y)`` should be
    interpreted as display coordinates.

---
## pop_label
```python
from contour import pop_label
```

Defaults to removing last label, but any index can be supplied

---
## labels
```python
from contour import labels
```



---
## remove
```python
from contour import remove
```



---
## __init__
```python
from contour import __init__
```

Draw contour lines or filled regions, depending on
whether keyword arg *filled* is ``False`` (default) or ``True``.

Call signature::

    ContourSet(ax, levels, allsegs, [allkinds], **kwargs)

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The `~.axes.Axes` object to draw on.

levels : [level0, level1, ..., leveln]
    A list of floating point numbers indicating the contour
    levels.

allsegs : [level0segs, level1segs, ...]
    List of all the polygon segments for all the *levels*.
    For contour lines ``len(allsegs) == len(levels)``, and for
    filled contour regions ``len(allsegs) = len(levels)-1``. The lists
    should look like ::

        level0segs = [polygon0, polygon1, ...]
        polygon0 = [[x0, y0], [x1, y1], ...]

allkinds : [level0kinds, level1kinds, ...], optional
    Optional list of all the polygon vertex kinds (code types), as
    described and used in Path. This is used to allow multiply-
    connected paths such as holes within filled polygons.
    If not ``None``, ``len(allkinds) == len(allsegs)``. The lists
    should look like ::

        level0kinds = [polygon0kinds, ...]
        polygon0kinds = [vertexcode0, vertexcode1, ...]

    If *allkinds* is not ``None``, usually all polygons for a
    particular contour level are grouped together so that
    ``level0segs = [polygon0]`` and ``level0kinds = [polygon0kinds]``.

**kwargs
    Keyword arguments are as described in the docstring of
    `~.Axes.contour`.

---
## antialiased
```python
from contour import antialiased
```



---
## collections
```python
from contour import collections
```



---
## get_transform
```python
from contour import get_transform
```

Return the `.Transform` instance used by this ContourSet.

---
## __getstate__
```python
from contour import __getstate__
```



---
## legend_elements
```python
from contour import legend_elements
```

Return a list of artists and labels suitable for passing through
to `~.Axes.legend` which represent this ContourSet.

The labels have the form "0 < x <= 1" stating the data ranges which
the artists represent.

Parameters
----------
variable_name : str
    The string used inside the inequality used on the labels.
str_format : function: float -> str
    Function used to format the numbers in the labels.

Returns
-------
artists : list[`.Artist`]
    A list of the artists.
labels : list[str]
    A list of the labels.

---
## _process_args
```python
from contour import _process_args
```

Process args and kwargs.

---
## _make_paths_from_contour_generator
```python
from contour import _make_paths_from_contour_generator
```

Compute ``paths`` using C extension.

---
## _get_lowers_and_uppers
```python
from contour import _get_lowers_and_uppers
```

Return ``(lowers, uppers)`` for filled contours.

---
## changed
```python
from contour import changed
```



---
## _autolev
```python
from contour import _autolev
```

Select contour levels to span the data.

The target number of levels, *N*, is used only when the
scale is not log and default locator is used.

We need two more levels for filled contours than for
line contours, because for the latter we need to specify
the lower and upper boundary of each range. For example,
a single contour boundary, say at z = 0, requires only
one contour line, but two filled regions, and therefore
three levels to provide boundaries for both regions.

---
## _process_contour_level_args
```python
from contour import _process_contour_level_args
```

Determine the contour levels and store in self.levels.

---
## _process_levels
```python
from contour import _process_levels
```

Assign values to :attr:`layers` based on :attr:`levels`,
adding extended layers as needed if contours are filled.

For line contours, layers simply coincide with levels;
a line is a thin layer.  No extended levels are needed
with line contours.

---
## _process_colors
```python
from contour import _process_colors
```

Color argument processing for contouring.

Note that we base the colormapping on the contour levels
and layers, not on the actual range of the Z values.  This
means we don't have to worry about bad values in Z, and we
always have the full dynamic range available for the selected
levels.

The color is based on the midpoint of the layer, except for
extended end layers.  By default, the norm vmin and vmax
are the extreme values of the non-extended levels.  Hence,
the layer color extremes are not the extreme values of
the colormap itself, but approach those values as the number
of levels increases.  An advantage of this scheme is that
line contours, when added to filled contours, take on
colors that are consistent with those of the filled regions;
for example, a contour line on the boundary between two
regions will have a color intermediate between those
of the regions.

---
## _process_linewidths
```python
from contour import _process_linewidths
```



---
## _process_linestyles
```python
from contour import _process_linestyles
```



---
## _find_nearest_contour
```python
from contour import _find_nearest_contour
```

Find the point in the unfilled contour plot that is closest (in screen
space) to point *xy*.

Parameters
----------
xy : tuple[float, float]
    The reference point (in screen space).
indices : list of int or None, default: None
    Indices of contour levels to consider.  If None (the default), all levels
    are considered.

Returns
-------
idx_level_min : int
    The index of the contour level closest to *xy*.
idx_vtx_min : int
    The index of the `.Path` segment closest to *xy* (at that level).
proj : (float, float)
    The point in the contour plot closest to *xy*.

---
## find_nearest_contour
```python
from contour import find_nearest_contour
```

Find the point in the contour plot that is closest to ``(x, y)``.

This method does not support filled contours.

Parameters
----------
x, y : float
    The reference point.
indices : list of int or None, default: None
    Indices of contour levels to consider.  If None (the default), all
    levels are considered.
pixel : bool, default: True
    If *True*, measure distance in pixel (screen) space, which is
    useful for manual contour labeling; else, measure distance in axes
    space.

Returns
-------
path : int
    The index of the path that is closest to ``(x, y)``.  Each path corresponds
    to one contour level.
subpath : int
    The index within that closest path of the subpath that is closest to
    ``(x, y)``.  Each subpath corresponds to one unbroken contour line.
index : int
    The index of the vertices within that subpath that are closest to
    ``(x, y)``.
xmin, ymin : float
    The point in the contour plot that is closest to ``(x, y)``.
d2 : float
    The squared distance from ``(xmin, ymin)`` to ``(x, y)``.

---
## draw
```python
from contour import draw
```



---
## _contour_args
```python
from contour import _contour_args
```



---
## _check_xyz
```python
from contour import _check_xyz
```

Check that the shapes of the input arrays match; if x and y are 1D,
convert them to 2D using meshgrid.

---
## _initialize_x_y
```python
from contour import _initialize_x_y
```

Return X, Y arrays such that contour(Z) will match imshow(Z)
if origin is not None.
The center of pixel Z[i, j] depends on origin:
if origin is None, x = j, y = i;
if origin is 'lower', x = j + 0.5, y = i + 0.5;
if origin is 'upper', x = j + 0.5, y = Nrows - i - 0.5
If extent is not None, x and y will be scaled to match,
as in imshow.
If origin is None and extent is not None, then extent
will give the minimum and maximum values of x and y.

---
## interp_vec
```python
from contour import interp_vec
```



---
## __name__
```python
from image import __name__
```



---
## composite_images
```python
from image import composite_images
```

Composite a number of RGBA images into one.  The images are
composited in the order in which they appear in the *images* list.

Parameters
----------
images : list of Images
    Each must have a `make_image` method.  For each image,
    `can_composite` should return `True`, though this is not
    enforced by this function.  Each image must have a purely
    affine transformation with no shear.

renderer : `.RendererBase`

magnification : float, default: 1
    The additional magnification to apply for the renderer in use.

Returns
-------
image : (M, N, 4) `numpy.uint8` array
    The composited RGBA image.
offset_x, offset_y : float
    The (left, bottom) offset where the composited image should be placed
    in the output figure.

---
## _draw_list_compositing_images
```python
from image import _draw_list_compositing_images
```

Draw a sorted list of artists, compositing images into a single
image where possible.

For internal Matplotlib use only: It is here to reduce duplication
between `Figure.draw` and `Axes.draw`, but otherwise should not be
generally useful.

---
## _resample
```python
from image import _resample
```

Convenience wrapper around `._image.resample` to resample *data* to
*out_shape* (with a third dimension if *data* is RGBA) that takes care of
allocating the output array and fetching the relevant properties from the
Image object *image_obj*.

---
## _rgb_to_rgba
```python
from image import _rgb_to_rgba
```

Convert an RGB image to RGBA, as required by the image resample C++
extension.

---
## _ImageBase
```python
from image import _ImageBase
```

Base class for images.

interpolation and cmap default to their rc settings

cmap is a colors.Colormap instance
norm is a colors.Normalize instance to map luminance to 0-1

extent is data axes (left, right, bottom, top) for making image plots
registered with data plots.  Default is to label the pixel
centers with the zero-based row and column indices.

Additional kwargs are matplotlib.artist properties

---
## AxesImage
```python
from image import AxesImage
```

An image attached to an Axes.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The Axes the image will belong to.
cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
    The Colormap instance or registered colormap name used to map scalar
    data to colors.
norm : str or `~matplotlib.colors.Normalize`
    Maps luminance to 0-1.
interpolation : str, default: :rc:`image.interpolation`
    Supported values are 'none', 'antialiased', 'nearest', 'bilinear',
    'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite',
    'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell',
    'sinc', 'lanczos', 'blackman'.
interpolation_stage : {'data', 'rgba'}, default: 'data'
    If 'data', interpolation
    is carried out on the data provided by the user.  If 'rgba', the
    interpolation is carried out after the colormapping has been
    applied (visual interpolation).
origin : {'upper', 'lower'}, default: :rc:`image.origin`
    Place the [0, 0] index of the array in the upper left or lower left
    corner of the Axes. The convention 'upper' is typically used for
    matrices and images.
extent : tuple, optional
    The data axes (left, right, bottom, top) for making image plots
    registered with data plots.  Default is to label the pixel
    centers with the zero-based row and column indices.
filternorm : bool, default: True
    A parameter for the antigrain image resize filter
    (see the antigrain documentation).
    If filternorm is set, the filter normalizes integer values and corrects
    the rounding errors. It doesn't do anything with the source floating
    point values, it corrects only integers according to the rule of 1.0
    which means that any sum of pixel weights must be equal to 1.0. So,
    the filter function must produce a graph of the proper shape.
filterrad : float > 0, default: 4
    The filter radius for filters that have a radius parameter, i.e. when
    interpolation is one of: 'sinc', 'lanczos' or 'blackman'.
resample : bool, default: False
    When True, use a full resampling method. When False, only resample when
    the output image is larger than the input image.
**kwargs : `~matplotlib.artist.Artist` properties

---
## NonUniformImage
```python
from image import NonUniformImage
```



---
## PcolorImage
```python
from image import PcolorImage
```

Make a pcolor-style plot with an irregular rectangular grid.

This uses a variation of the original irregular image code,
and it is used by pcolorfast for the corresponding grid type.

---
## FigureImage
```python
from image import FigureImage
```

An image attached to a figure.

---
## BboxImage
```python
from image import BboxImage
```

The Image class whose size is determined by the given bbox.

---
## imread
```python
from image import imread
```

Read an image from a file into an array.

.. note::

    This function exists for historical reasons.  It is recommended to
    use `PIL.Image.open` instead for loading images.

Parameters
----------
fname : str or file-like
    The image file to read: a filename, a URL or a file-like object opened
    in read-binary mode.

    Passing a URL is deprecated.  Please open the URL
    for reading and pass the result to Pillow, e.g. with
    ``np.array(PIL.Image.open(urllib.request.urlopen(url)))``.
format : str, optional
    The image file format assumed for reading the data.  The image is
    loaded as a PNG file if *format* is set to "png", if *fname* is a path
    or opened file with a ".png" extension, or if it is a URL.  In all
    other cases, *format* is ignored and the format is auto-detected by
    `PIL.Image.open`.

Returns
-------
`numpy.array`
    The image data. The returned array has shape

    - (M, N) for grayscale images.
    - (M, N, 3) for RGB images.
    - (M, N, 4) for RGBA images.

    PNG images are returned as float arrays (0-1).  All other formats are
    returned as int arrays, with a bit depth determined by the file's
    contents.

---
## imsave
```python
from image import imsave
```

Colormap and save an array as an image file.

RGB(A) images are passed through.  Single channel images will be
colormapped according to *cmap* and *norm*.

.. note::

   If you want to save a single channel image as gray scale please use an
   image I/O library (such as pillow, tifffile, or imageio) directly.

Parameters
----------
fname : str or path-like or file-like
    A path or a file-like object to store the image in.
    If *format* is not set, then the output format is inferred from the
    extension of *fname*, if any, and from :rc:`savefig.format` otherwise.
    If *format* is set, it determines the output format.
arr : array-like
    The image data. The shape can be one of
    MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA).
vmin, vmax : float, optional
    *vmin* and *vmax* set the color scaling for the image by fixing the
    values that map to the colormap color limits. If either *vmin*
    or *vmax* is None, that limit is determined from the *arr*
    min/max value.
cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
    A Colormap instance or registered colormap name. The colormap
    maps scalar data to colors. It is ignored for RGB(A) data.
format : str, optional
    The file format, e.g. 'png', 'pdf', 'svg', ...  The behavior when this
    is unset is documented under *fname*.
origin : {'upper', 'lower'}, default: :rc:`image.origin`
    Indicates whether the ``(0, 0)`` index of the array is in the upper
    left or lower left corner of the Axes.
dpi : float
    The DPI to store in the metadata of the file.  This does not affect the
    resolution of the output image.  Depending on file format, this may be
    rounded to the nearest integer.
metadata : dict, optional
    Metadata in the image file.  The supported keys depend on the output
    format, see the documentation of the respective backends for more
    information.
    Currently only supported for "png", "pdf", "ps", "eps", and "svg".
pil_kwargs : dict, optional
    Keyword arguments passed to `PIL.Image.Image.save`.  If the 'pnginfo'
    key is present, it completely overrides *metadata*, including the
    default 'Software' key.

---
## pil_to_array
```python
from image import pil_to_array
```

Load a `PIL image`_ and return it as a numpy int array.

.. _PIL image: https://pillow.readthedocs.io/en/latest/reference/Image.html

Returns
-------
numpy.array

    The array shape depends on the image type:

    - (M, N) for grayscale images.
    - (M, N, 3) for RGB images.
    - (M, N, 4) for RGBA images.

---
## _pil_png_to_float_array
```python
from image import _pil_png_to_float_array
```

Convert a PIL `PNGImageFile` to a 0-1 float array.

---
## thumbnail
```python
from image import thumbnail
```

Make a thumbnail of image in *infile* with output filename *thumbfile*.

See :doc:`/gallery/misc/image_thumbnail_sgskip`.

Parameters
----------
infile : str or file-like
    The image file. Matplotlib relies on Pillow_ for image reading, and
    thus supports a wide range of file formats, including PNG, JPG, TIFF
    and others.

    .. _Pillow: https://python-pillow.org/

thumbfile : str or file-like
    The thumbnail filename.

scale : float, default: 0.1
    The scale factor for the thumbnail.

interpolation : str, default: 'bilinear'
    The interpolation scheme used in the resampling. See the
    *interpolation* parameter of `~.Axes.imshow` for possible values.

preview : bool, default: False
    If True, the default backend (presumably a user interface
    backend) will be used which will cause a figure to be raised if
    `~matplotlib.pyplot.show` is called.  If it is False, the figure is
    created using `.FigureCanvasBase` and the drawing backend is selected
    as `.Figure.savefig` would normally do.

Returns
-------
`.Figure`
    The figure instance containing the thumbnail.

---
## __init__
```python
from image import __init__
```

Parameters:
value: A PIL Image, numpy array, path or URL for the default value that Image component is going to take. If callable, the function will be called whenever the app loads to set the initial value of the component.
shape: (width, height) shape to crop and resize image when passed to function. If None, matches input image size. Pass None for either width or height to only crop and resize the other.
height: Height of the displayed image in pixels.
width: Width of the displayed image in pixels.
image_mode: "RGB" if color, or "L" if black and white. See https://pillow.readthedocs.io/en/stable/handbook/concepts.html for other supported image modes and their meaning.
invert_colors: whether to invert the image as a preprocessing step.
source: Source of image. "upload" creates a box where user can drop an image file, "webcam" allows user to take snapshot from their webcam, "canvas" defaults to a white image that can be edited and drawn upon with tools.
tool: Tools used for editing. "editor" allows a full screen editor (and is the default if source is "upload" or "webcam"), "select" provides a cropping and zoom tool, "sketch" allows you to create a binary sketch (and is the default if source="canvas"), and "color-sketch" allows you to created a sketch in different colors. "color-sketch" can be used with source="upload" or "webcam" to allow sketching on an image. "sketch" can also be used with "upload" or "webcam" to create a mask over an image and in that case both the image and mask are passed into the function as a dictionary with keys "image" and "mask" respectively.
type: The format the image is converted to before being passed into the prediction function. "numpy" converts the image to a numpy array with shape (height, width, 3) and values from 0 to 255, "pil" converts the image to a PIL image object, "filepath" passes a str path to a temporary file containing the image.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
show_download_button: If True, will display button to download image.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will allow users to upload and edit an image; if False, can only be used to display images. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
streaming: If True when used in a `live` interface, will automatically stream webcam feed. Only valid is source is 'webcam'.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
mirror_webcam: If True webcam will be mirrored. Default is True.
brush_radius: Size of the brush for Sketch. Default is None which chooses a sensible default
brush_color: Color of the brush for Sketch as hex string. Default is "#000000".
mask_opacity: Opacity of mask drawn on image, as a value between 0 and 1.
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.

---
## __str__
```python
from image import __str__
```



---
## __getstate__
```python
from image import __getstate__
```



---
## get_size
```python
from image import get_size
```

Return the size of the image as tuple (numrows, numcols).

---
## get_shape
```python
from image import get_shape
```

Return the shape of the image as tuple (numrows, numcols, channels).

---
## set_alpha
```python
from image import set_alpha
```

Set the alpha value used for blending - not supported on all backends.

Parameters
----------
alpha : float or 2D array-like or None

---
## _get_scalar_alpha
```python
from image import _get_scalar_alpha
```

Get a scalar alpha value to be applied to the artist as a whole.

If the alpha value is a matrix, the method returns 1.0 because pixels
have individual alpha values (see `~._ImageBase._make_image` for
details). If the alpha value is a scalar, the method returns said value
to be applied to the artist as a whole because pixels do not have
individual alpha values.

---
## changed
```python
from image import changed
```

Call this whenever the mappable is changed so observers can update.

---
## _make_image
```python
from image import _make_image
```

Normalize, rescale, and colormap the image *A* from the given *in_bbox*
(in data space), to the given *out_bbox* (in pixel space) clipped to
the given *clip_bbox* (also in pixel space), and magnified by the
*magnification* factor.

*A* may be a greyscale image (M, N) with a dtype of `~numpy.float32`,
`~numpy.float64`, `~numpy.float128`, `~numpy.uint16` or `~numpy.uint8`,
or an (M, N, 4) RGBA image with a dtype of `~numpy.float32`,
`~numpy.float64`, `~numpy.float128`, or `~numpy.uint8`.

If *unsampled* is True, the image will not be scaled, but an
appropriate affine transformation will be returned instead.

If *round_to_pixel_border* is True, the output image size will be
rounded to the nearest pixel boundary.  This makes the images align
correctly with the Axes.  It should not be used if exact scaling is
needed, such as for `FigureImage`.

Returns
-------
image : (M, N, 4) `numpy.uint8` array
    The RGBA image, resampled unless *unsampled* is True.
x, y : float
    The upper left corner where the image should be drawn, in pixel
    space.
trans : `~matplotlib.transforms.Affine2D`
    The affine transformation from image to pixel space.

---
## make_image
```python
from image import make_image
```



---
## _check_unsampled_image
```python
from image import _check_unsampled_image
```



---
## draw
```python
from image import draw
```



---
## contains
```python
from image import contains
```

Test whether the mouse event occurred within the image.

---
## write_png
```python
from image import write_png
```

Write the image to png file *fname*.

---
## _normalize_image_array
```python
from image import _normalize_image_array
```

Check validity of image-like input *A* and normalize it to a format suitable for
Image subclasses.

---
## set_data
```python
from image import set_data
```

Set the image array.

---
## set_array
```python
from image import set_array
```



---
## get_interpolation
```python
from image import get_interpolation
```

Return the interpolation method the image uses when resizing.

One of 'antialiased', 'nearest', 'bilinear', 'bicubic', 'spline16',
'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos',
or 'none'.

---
## set_interpolation
```python
from image import set_interpolation
```

Parameters
----------
s : {'nearest', 'bilinear'} or None
    If None, use :rc:`image.interpolation`.

---
## get_interpolation_stage
```python
from image import get_interpolation_stage
```

Return when interpolation happens during the transform to RGBA.

One of 'data', 'rgba'.

---
## set_interpolation_stage
```python
from image import set_interpolation_stage
```

Set when interpolation happens during the transform to RGBA.

Parameters
----------
s : {'data', 'rgba'} or None
    Whether to apply up/downsampling interpolation in data or RGBA
    space.  If None, use :rc:`image.interpolation_stage`.

---
## can_composite
```python
from image import can_composite
```

Return whether the image can be composited with its neighbors.

---
## set_resample
```python
from image import set_resample
```

Set whether image resampling is used.

Parameters
----------
v : bool or None
    If None, use :rc:`image.resample`.

---
## get_resample
```python
from image import get_resample
```

Return whether image resampling is used.

---
## set_filternorm
```python
from image import set_filternorm
```



---
## get_filternorm
```python
from image import get_filternorm
```

Return whether the resize filter normalizes the weights.

---
## set_filterrad
```python
from image import set_filterrad
```



---
## get_filterrad
```python
from image import get_filterrad
```

Return the filterrad setting.

---
## get_window_extent
```python
from image import get_window_extent
```



---
## set_extent
```python
from image import set_extent
```

Set the image extent.

Parameters
----------
extent : 4-tuple of float
    The position and size of the image as tuple
    ``(left, right, bottom, top)`` in data coordinates.
**kwargs
    Other parameters from which unit info (i.e., the *xunits*,
    *yunits*, *zunits* (for 3D Axes), *runits* and *thetaunits* (for
    polar Axes) entries are applied, if present.

Notes
-----
This updates ``ax.dataLim``, and, if autoscaling, sets ``ax.viewLim``
to tightly fit the image, regardless of ``dataLim``.  Autoscaling
state is not changed, so following this with ``ax.autoscale_view()``
will redo the autoscaling in accord with ``dataLim``.

---
## get_extent
```python
from image import get_extent
```

Return the image extent as tuple (left, right, bottom, top).

---
## get_cursor_data
```python
from image import get_cursor_data
```



---
## set_norm
```python
from image import set_norm
```



---
## set_cmap
```python
from image import set_cmap
```



---
## flush_images
```python
from image import flush_images
```



---
## __name__
```python
from scale import __name__
```

Scales define the distribution of data values on an axis, e.g. a log scaling.
They are defined as subclasses of `ScaleBase`.

See also `.axes.Axes.set_xscale` and the scales examples in the documentation.

See :doc:`/gallery/scales/custom_scale` for a full example of defining a custom
scale.

Matplotlib also supports non-separable transformations that operate on both
`~.axis.Axis` at the same time.  They are known as projections, and defined in
`matplotlib.projections`.

---
## ScaleBase
```python
from scale import ScaleBase
```

The base class for all scales.

Scales are separable transformations, working on a single dimension.

Subclasses should override

:attr:`name`
    The scale's name.
:meth:`get_transform`
    A method returning a `.Transform`, which converts data coordinates to
    scaled coordinates.  This transform should be invertible, so that e.g.
    mouse positions can be converted back to data coordinates.
:meth:`set_default_locators_and_formatters`
    A method that sets default locators and formatters for an `~.axis.Axis`
    that uses this scale.
:meth:`limit_range_for_scale`
    An optional method that "fixes" the axis range to acceptable values,
    e.g. restricting log-scaled axes to positive values.

---
## LinearScale
```python
from scale import LinearScale
```

The default linear scale.

---
## FuncTransform
```python
from scale import FuncTransform
```

A simple transform that takes and arbitrary function for the
forward and inverse transform.

---
## FuncScale
```python
from scale import FuncScale
```

Provide an arbitrary scale with user-supplied function for the axis.

---
## LogTransform
```python
from scale import LogTransform
```



---
## InvertedLogTransform
```python
from scale import InvertedLogTransform
```



---
## LogScale
```python
from scale import LogScale
```

A standard logarithmic scale.  Care is taken to only plot positive values.

---
## FuncScaleLog
```python
from scale import FuncScaleLog
```

Provide an arbitrary scale with user-supplied function for the axis and
then put on a logarithmic axes.

---
## SymmetricalLogTransform
```python
from scale import SymmetricalLogTransform
```



---
## InvertedSymmetricalLogTransform
```python
from scale import InvertedSymmetricalLogTransform
```



---
## SymmetricalLogScale
```python
from scale import SymmetricalLogScale
```

The symmetrical logarithmic scale is logarithmic in both the
positive and negative directions from the origin.

Since the values close to zero tend toward infinity, there is a
need to have a range around zero that is linear.  The parameter
*linthresh* allows the user to specify the size of this range
(-*linthresh*, *linthresh*).

Parameters
----------
base : float, default: 10
    The base of the logarithm.

linthresh : float, default: 2
    Defines the range ``(-x, x)``, within which the plot is linear.
    This avoids having the plot go to infinity around zero.

subs : sequence of int
    Where to place the subticks between each major tick.
    For example, in a log10 scale: ``[2, 3, 4, 5, 6, 7, 8, 9]`` will place
    8 logarithmically spaced minor ticks between each major tick.

linscale : float, optional
    This allows the linear range ``(-linthresh, linthresh)`` to be
    stretched relative to the logarithmic range. Its value is the number of
    decades to use for each half of the linear range. For example, when
    *linscale* == 1.0 (the default), the space used for the positive and
    negative halves of the linear range will be equal to one decade in
    the logarithmic range.

---
## AsinhTransform
```python
from scale import AsinhTransform
```

Inverse hyperbolic-sine transformation used by `.AsinhScale`

---
## InvertedAsinhTransform
```python
from scale import InvertedAsinhTransform
```

Hyperbolic sine transformation used by `.AsinhScale`

---
## AsinhScale
```python
from scale import AsinhScale
```

A quasi-logarithmic scale based on the inverse hyperbolic sine (asinh)

For values close to zero, this is essentially a linear scale,
but for large magnitude values (either positive or negative)
it is asymptotically logarithmic. The transition between these
linear and logarithmic regimes is smooth, and has no discontinuities
in the function gradient in contrast to
the `.SymmetricalLogScale` ("symlog") scale.

Specifically, the transformation of an axis coordinate :math:`a` is
:math:`a \rightarrow a_0 \sinh^{-1} (a / a_0)` where :math:`a_0`
is the effective width of the linear region of the transformation.
In that region, the transformation is
:math:`a \rightarrow a + \mathcal{O}(a^3)`.
For large values of :math:`a` the transformation behaves as
:math:`a \rightarrow a_0 \, \mathrm{sgn}(a) \ln |a| + \mathcal{O}(1)`.

.. note::

   This API is provisional and may be revised in the future
   based on early user feedback.

---
## LogitTransform
```python
from scale import LogitTransform
```



---
## LogisticTransform
```python
from scale import LogisticTransform
```



---
## LogitScale
```python
from scale import LogitScale
```

Logit scale for data between zero and one, both excluded.

This scale is similar to a log scale close to zero and to one, and almost
linear around 0.5. It maps the interval ]0, 1[ onto ]-infty, +infty[.

---
## get_scale_names
```python
from scale import get_scale_names
```

Return the names of the available scales.

---
## scale_factory
```python
from scale import scale_factory
```

Return a scale class by name.

Parameters
----------
scale : {%(names)s}
axis : `~matplotlib.axis.Axis`

---
## register_scale
```python
from scale import register_scale
```

Register a new kind of scale.

Parameters
----------
scale_class : subclass of `ScaleBase`
    The scale to register.

---
## _get_scale_docs
```python
from scale import _get_scale_docs
```

Helper function for generating docstrings related to scales.

---
## __init__
```python
from scale import __init__
```

Parameters
----------
axis : `~matplotlib.axis.Axis`
    Currently unused.
nonpositive : {'mask', 'clip'}
    Determines the behavior for values beyond the open interval ]0, 1[.
    They can either be masked as invalid, or clipped to a number very
    close to 0 or 1.
use_overline : bool, default: False
    Indicate the usage of survival notation (\overline{x}) in place of
    standard notation (1-x) for probability close to one.
one_half : str, default: r"\frac{1}{2}"
    The string used for ticks formatter to represent 1/2.

---
## get_transform
```python
from scale import get_transform
```

Return the `.LogitTransform` associated with this scale.

---
## set_default_locators_and_formatters
```python
from scale import set_default_locators_and_formatters
```



---
## limit_range_for_scale
```python
from scale import limit_range_for_scale
```

Limit the domain to values between 0 and 1 (excluded).

---
## transform_non_affine
```python
from scale import transform_non_affine
```

logistic transform (base 10)

---
## inverted
```python
from scale import inverted
```



---
## __str__
```python
from scale import __str__
```



---
## base
```python
from scale import base
```



---
## __name__
```python
from category import __name__
```



---
## StrCategoryConverter
```python
from category import StrCategoryConverter
```



---
## StrCategoryLocator
```python
from category import StrCategoryLocator
```

Tick at every integer mapping of the string data.

---
## StrCategoryFormatter
```python
from category import StrCategoryFormatter
```

String representation of the data at every tick.

---
## UnitData
```python
from category import UnitData
```



---
## convert
```python
from category import convert
```

Convert strings in *value* to floats using mapping information stored
in the *unit* object.

Parameters
----------
value : str or iterable
    Value or list of values to be converted.
unit : `.UnitData`
    An object mapping strings to integers.
axis : `~matplotlib.axis.Axis`
    The axis on which the converted value is plotted.

    .. note:: *axis* is unused.

Returns
-------
float or `~numpy.ndarray` of float

---
## axisinfo
```python
from category import axisinfo
```

Set the default axis ticks and labels.

Parameters
----------
unit : `.UnitData`
    object string unit information for value
axis : `~matplotlib.axis.Axis`
    axis for which information is being set

    .. note:: *axis* is not used

Returns
-------
`~matplotlib.units.AxisInfo`
    Information to support default tick labeling

---
## default_units
```python
from category import default_units
```

Set and update the `~matplotlib.axis.Axis` units.

Parameters
----------
data : str or iterable of str
axis : `~matplotlib.axis.Axis`
    axis on which the data is plotted

Returns
-------
`.UnitData`
    object storing string to integer mapping

---
## _validate_unit
```python
from category import _validate_unit
```



---
## __init__
```python
from category import __init__
```

Create mapping between unique categorical values and integer ids.

Parameters
----------
data : iterable
    sequence of string values

---
## __call__
```python
from category import __call__
```



---
## tick_values
```python
from category import tick_values
```



---
## format_ticks
```python
from category import format_ticks
```



---
## _text
```python
from category import _text
```

Convert text values into utf-8 or ascii strings.

---
## _str_is_convertible
```python
from category import _str_is_convertible
```

Helper method to check whether a string can be parsed as float or date.

---
## update
```python
from category import update
```

Map new values to integer identifiers.

Parameters
----------
data : iterable of str or bytes

Raises
------
TypeError
    If elements in *data* are neither str nor bytes.

---
## __name__
```python
from _constrained_layout import __name__
```

Adjust subplot layouts so that there are no overlapping Axes or Axes
decorations.  All Axes decorations are dealt with (labels, ticks, titles,
ticklabels) and some dependent artists are also dealt with (colorbar,
suptitle).

Layout is done via `~matplotlib.gridspec`, with one constraint per gridspec,
so it is possible to have overlapping Axes if the gridspecs overlap (i.e.
using `~matplotlib.gridspec.GridSpecFromSubplotSpec`).  Axes placed using
``figure.subplots()`` or ``figure.add_subplots()`` will participate in the
layout.  Axes manually placed via ``figure.add_axes()`` will not.

See Tutorial: :ref:`constrainedlayout_guide`

General idea:
-------------

First, a figure has a gridspec that divides the figure into nrows and ncols,
with heights and widths set by ``height_ratios`` and ``width_ratios``,
often just set to 1 for an equal grid.

Subplotspecs that are derived from this gridspec can contain either a
``SubPanel``, a ``GridSpecFromSubplotSpec``, or an ``Axes``.  The ``SubPanel``
and ``GridSpecFromSubplotSpec`` are dealt with recursively and each contain an
analogous layout.

Each ``GridSpec`` has a ``_layoutgrid`` attached to it.  The ``_layoutgrid``
has the same logical layout as the ``GridSpec``.   Each row of the grid spec
has a top and bottom "margin" and each column has a left and right "margin".
The "inner" height of each row is constrained to be the same (or as modified
by ``height_ratio``), and the "inner" width of each column is
constrained to be the same (as modified by ``width_ratio``), where "inner"
is the width or height of each column/row minus the size of the margins.

Then the size of the margins for each row and column are determined as the
max width of the decorators on each Axes that has decorators in that margin.
For instance, a normal Axes would have a left margin that includes the
left ticklabels, and the ylabel if it exists.  The right margin may include a
colorbar, the bottom margin the xaxis decorations, and the top margin the
title.

With these constraints, the solver then finds appropriate bounds for the
columns and rows.  It's possible that the margins take up the whole figure,
in which case the algorithm is not applied and a warning is raised.

See the tutorial :ref:`constrainedlayout_guide`
for more discussion of the algorithm with examples.

---
## do_constrained_layout
```python
from _constrained_layout import do_constrained_layout
```

Do the constrained_layout.  Called at draw time in
 ``figure.constrained_layout()``

Parameters
----------
fig : `~matplotlib.figure.Figure`
    `.Figure` instance to do the layout in.

h_pad, w_pad : float
  Padding around the Axes elements in figure-normalized units.

hspace, wspace : float
   Fraction of the figure to dedicate to space between the
   Axes.  These are evenly spread between the gaps between the Axes.
   A value of 0.2 for a three-column layout would have a space
   of 0.1 of the figure width between each column.
   If h/wspace < h/w_pad, then the pads are used instead.

rect : tuple of 4 floats
    Rectangle in figure coordinates to perform constrained layout in
    [left, bottom, width, height], each from 0-1.

compress : bool
    Whether to shift Axes so that white space in between them is
    removed. This is useful for simple grids of fixed-aspect Axes (e.g.
    a grid of images).

Returns
-------
layoutgrid : private debugging structure

---
## make_layoutgrids
```python
from _constrained_layout import make_layoutgrids
```

Make the layoutgrid tree.

(Sub)Figures get a layoutgrid so we can have figure margins.

Gridspecs that are attached to Axes get a layoutgrid so Axes
can have margins.

---
## make_layoutgrids_gs
```python
from _constrained_layout import make_layoutgrids_gs
```

Make the layoutgrid for a gridspec (and anything nested in the gridspec)

---
## check_no_collapsed_axes
```python
from _constrained_layout import check_no_collapsed_axes
```

Check that no Axes have collapsed to zero size.

---
## compress_fixed_aspect
```python
from _constrained_layout import compress_fixed_aspect
```



---
## get_margin_from_padding
```python
from _constrained_layout import get_margin_from_padding
```



---
## make_layout_margins
```python
from _constrained_layout import make_layout_margins
```

For each Axes, make a margin between the *pos* layoutbox and the
*axes* layoutbox be a minimum size that can accommodate the
decorations on the axis.

Then make room for colorbars.

Parameters
----------
layoutgrids : dict
fig : `~matplotlib.figure.Figure`
    `.Figure` instance to do the layout in.
renderer : `~matplotlib.backend_bases.RendererBase` subclass.
    The renderer to use.
w_pad, h_pad : float, default: 0
    Width and height padding (in fraction of figure).
hspace, wspace : float, default: 0
    Width and height padding as fraction of figure size divided by
    number of columns or rows.

---
## make_margin_suptitles
```python
from _constrained_layout import make_margin_suptitles
```



---
## match_submerged_margins
```python
from _constrained_layout import match_submerged_margins
```

Make the margins that are submerged inside an Axes the same size.

    This allows Axes that span two columns (or rows) that are offset
    from one another to have the same size.

    This gives the proper layout for something like::
        fig = plt.figure(constrained_layout=True)
        axs = fig.subplot_mosaic("AAAB
CCDD")

    Without this routine, the Axes D will be wider than C, because the
    margin width between the two columns in C has no width by default,
    whereas the margins between the two columns of D are set by the
    width of the margin between A and B. However, obviously the user would
    like C and D to be the same size, so we need to add constraints to these
    "submerged" margins.

    This routine makes all the interior margins the same, and the spacing
    between the three columns in A and the two column in C are all set to the
    margins between the two columns of D.

    See test_constrained_layout::test_constrained_layout12 for an example.
    

---
## get_cb_parent_spans
```python
from _constrained_layout import get_cb_parent_spans
```

Figure out which subplotspecs this colorbar belongs to.

Parameters
----------
cbax : `~matplotlib.axes.Axes`
    Axes for the colorbar.

---
## get_pos_and_bbox
```python
from _constrained_layout import get_pos_and_bbox
```

Get the position and the bbox for the Axes.

Parameters
----------
ax : `~matplotlib.axes.Axes`
renderer : `~matplotlib.backend_bases.RendererBase` subclass.

Returns
-------
pos : `~matplotlib.transforms.Bbox`
    Position in figure coordinates.
bbox : `~matplotlib.transforms.Bbox`
    Tight bounding box in figure coordinates.

---
## reposition_axes
```python
from _constrained_layout import reposition_axes
```

Reposition all the Axes based on the new inner bounding box.

---
## reposition_colorbar
```python
from _constrained_layout import reposition_colorbar
```

Place the colorbar in its new place.

Parameters
----------
layoutgrids : dict
cbax : `~matplotlib.axes.Axes`
    Axes for the colorbar.
renderer : `~matplotlib.backend_bases.RendererBase` subclass.
    The renderer to use.
offset : array-like
    Offset the colorbar needs to be pushed to in order to
    account for multiple colorbars.

---
## reset_margins
```python
from _constrained_layout import reset_margins
```

Reset the margins in the layoutboxes of *fig*.

Margins are usually set as a minimum, so if the figure gets smaller
the minimum needs to be zero in order for it to grow again.

---
## colorbar_get_pad
```python
from _constrained_layout import colorbar_get_pad
```



---
## __name__
```python
from sankey import __name__
```

Module for creating Sankey diagrams using Matplotlib.

---
## Sankey
```python
from sankey import Sankey
```

Sankey diagram.

Sankey diagrams are a specific type of flow diagram, in which
the width of the arrows is shown proportionally to the flow
quantity.  They are typically used to visualize energy or
material or cost transfers between processes.
`Wikipedia (6/1/2011) <https://en.wikipedia.org/wiki/Sankey_diagram>`_

---
## __init__
```python
from sankey import __init__
```

Create a new Sankey instance.

The optional arguments listed below are applied to all subdiagrams so
that there is consistent alignment and formatting.

In order to draw a complex Sankey diagram, create an instance of
`Sankey` by calling it without any kwargs::

    sankey = Sankey()

Then add simple Sankey sub-diagrams::

    sankey.add() # 1
    sankey.add() # 2
    #...
    sankey.add() # n

Finally, create the full diagram::

    sankey.finish()

Or, instead, simply daisy-chain those calls::

    Sankey().add().add...  .add().finish()

Other Parameters
----------------
ax : `~matplotlib.axes.Axes`
    Axes onto which the data should be plotted.  If *ax* isn't
    provided, new Axes will be created.
scale : float
    Scaling factor for the flows.  *scale* sizes the width of the paths
    in order to maintain proper layout.  The same scale is applied to
    all subdiagrams.  The value should be chosen such that the product
    of the scale and the sum of the inputs is approximately 1.0 (and
    the product of the scale and the sum of the outputs is
    approximately -1.0).
unit : str
    The physical unit associated with the flow quantities.  If *unit*
    is None, then none of the quantities are labeled.
format : str or callable
    A Python number formatting string or callable used to label the
    flows with their quantities (i.e., a number times a unit, where the
    unit is given). If a format string is given, the label will be
    ``format % quantity``. If a callable is given, it will be called
    with ``quantity`` as an argument.
gap : float
    Space between paths that break in/break away to/from the top or
    bottom.
radius : float
    Inner radius of the vertical paths.
shoulder : float
    Size of the shoulders of output arrows.
offset : float
    Text offset (from the dip or tip of the arrow).
head_angle : float
    Angle, in degrees, of the arrow heads (and negative of the angle of
    the tails).
margin : float
    Minimum space between Sankey outlines and the edge of the plot
    area.
tolerance : float
    Acceptable maximum of the magnitude of the sum of flows.  The
    magnitude of the sum of connected flows cannot be greater than
    *tolerance*.
**kwargs
    Any additional keyword arguments will be passed to `add`, which
    will create the first subdiagram.

See Also
--------
Sankey.add
Sankey.finish

Examples
--------
.. plot:: gallery/specialty_plots/sankey_basics.py

---
## _arc
```python
from sankey import _arc
```

Return the codes and vertices for a rotated, scaled, and translated
90 degree arc.

Other Parameters
----------------
quadrant : {0, 1, 2, 3}, default: 0
    Uses 0-based indexing (0, 1, 2, or 3).
cw : bool, default: True
    If True, the arc vertices are produced clockwise; counter-clockwise
    otherwise.
radius : float, default: 1
    The radius of the arc.
center : (float, float), default: (0, 0)
    (x, y) tuple of the arc's center.

---
## _add_input
```python
from sankey import _add_input
```

Add an input to a path and return its tip and label locations.

---
## _add_output
```python
from sankey import _add_output
```

Append an output to a path and return its tip and label locations.

.. note:: *flow* is negative for an output.

---
## _revert
```python
from sankey import _revert
```

A path is not simply reversible by path[::-1] since the code
specifies an action to take from the **previous** point.

---
## add
```python
from sankey import add
```

Add a simple Sankey diagram with flows at the same hierarchical level.

Parameters
----------
patchlabel : str
    Label to be placed at the center of the diagram.
    Note that *label* (not *patchlabel*) can be passed as keyword
    argument to create an entry in the legend.

flows : list of float
    Array of flow values.  By convention, inputs are positive and
    outputs are negative.

    Flows are placed along the top of the diagram from the inside out
    in order of their index within *flows*.  They are placed along the
    sides of the diagram from the top down and along the bottom from
    the outside in.

    If the sum of the inputs and outputs is
    nonzero, the discrepancy will appear as a cubic Bézier curve along
    the top and bottom edges of the trunk.

orientations : list of {-1, 0, 1}
    List of orientations of the flows (or a single orientation to be
    used for all flows).  Valid values are 0 (inputs from
    the left, outputs to the right), 1 (from and to the top) or -1
    (from and to the bottom).

labels : list of (str or None)
    List of labels for the flows (or a single label to be used for all
    flows).  Each label may be *None* (no label), or a labeling string.
    If an entry is a (possibly empty) string, then the quantity for the
    corresponding flow will be shown below the string.  However, if
    the *unit* of the main diagram is None, then quantities are never
    shown, regardless of the value of this argument.

trunklength : float
    Length between the bases of the input and output groups (in
    data-space units).

pathlengths : list of float
    List of lengths of the vertical arrows before break-in or after
    break-away.  If a single value is given, then it will be applied to
    the first (inside) paths on the top and bottom, and the length of
    all other arrows will be justified accordingly.  The *pathlengths*
    are not applied to the horizontal inputs and outputs.

prior : int
    Index of the prior diagram to which this diagram should be
    connected.

connect : (int, int)
    A (prior, this) tuple indexing the flow of the prior diagram and
    the flow of this diagram which should be connected.  If this is the
    first diagram or *prior* is *None*, *connect* will be ignored.

rotation : float
    Angle of rotation of the diagram in degrees.  The interpretation of
    the *orientations* argument will be rotated accordingly (e.g., if
    *rotation* == 90, an *orientations* entry of 1 means to/from the
    left).  *rotation* is ignored if this diagram is connected to an
    existing one (using *prior* and *connect*).

Returns
-------
Sankey
    The current `.Sankey` instance.

Other Parameters
----------------
**kwargs
   Additional keyword arguments set `matplotlib.patches.PathPatch`
   properties, listed below.  For example, one may want to use
   ``fill=False`` or ``label="A legend entry"``.

%(Patch:kwdoc)s

See Also
--------
Sankey.finish

---
## finish
```python
from sankey import finish
```

Adjust the Axes and return a list of information about the Sankey
subdiagram(s).

Returns a list of subdiagrams with the following fields:

========  =============================================================
Field     Description
========  =============================================================
*patch*   Sankey outline (a `~matplotlib.patches.PathPatch`).
*flows*   Flow values (positive for input, negative for output).
*angles*  List of angles of the arrows [deg/90].
          For example, if the diagram has not been rotated,
          an input to the top side has an angle of 3 (DOWN),
          and an output from the top side has an angle of 1 (UP).
          If a flow has been skipped (because its magnitude is less
          than *tolerance*), then its angle will be *None*.
*tips*    (N, 2)-array of the (x, y) positions of the tips (or "dips")
          of the flow paths.
          If the magnitude of a flow is less the *tolerance* of this
          `Sankey` instance, the flow is skipped and its tip will be at
          the center of the diagram.
*text*    `.Text` instance for the diagram label.
*texts*   List of `.Text` instances for the flow labels.
========  =============================================================

See Also
--------
Sankey.add

---
## _get_angle
```python
from sankey import _get_angle
```



---
## __name__
```python
from patheffects import __name__
```

Defines classes for path effects. The path effects are supported in `.Text`,
`.Line2D` and `.Patch`.

.. seealso::
   :ref:`patheffects_guide`

---
## AbstractPathEffect
```python
from patheffects import AbstractPathEffect
```

A base class for path effects.

Subclasses should override the ``draw_path`` method to add effect
functionality.

---
## PathEffectRenderer
```python
from patheffects import PathEffectRenderer
```

Implements a Renderer which contains another renderer.

This proxy then intercepts draw calls, calling the appropriate
:class:`AbstractPathEffect` draw method.

.. note::
    Not all methods have been overridden on this RendererBase subclass.
    It may be necessary to add further methods to extend the PathEffects
    capabilities further.

---
## Normal
```python
from patheffects import Normal
```

The "identity" PathEffect.

The Normal PathEffect's sole purpose is to draw the original artist with
no special path effect.

---
## _subclass_with_normal
```python
from patheffects import _subclass_with_normal
```

Create a PathEffect class combining *effect_class* and a normal draw.

---
## Stroke
```python
from patheffects import Stroke
```

A line based PathEffect which re-draws a stroke.

---
## SimplePatchShadow
```python
from patheffects import SimplePatchShadow
```

A simple shadow via a filled patch.

---
## SimpleLineShadow
```python
from patheffects import SimpleLineShadow
```

A simple shadow via a line.

---
## PathPatchEffect
```python
from patheffects import PathPatchEffect
```

Draws a `.PathPatch` instance whose Path comes from the original
PathEffect artist.

---
## TickedStroke
```python
from patheffects import TickedStroke
```

A line-based PathEffect which draws a path with a ticked style.

This line style is frequently used to represent constraints in
optimization.  The ticks may be used to indicate that one side
of the line is invalid or to represent a closed boundary of a
domain (i.e. a wall or the edge of a pipe).

The spacing, length, and angle of ticks can be controlled.

This line style is sometimes referred to as a hatched line.

See also the :doc:`/gallery/misc/tickedstroke_demo` example.

---
## __init__
```python
from patheffects import __init__
```

Parameters
----------
offset : (float, float), default: (0, 0)
    The (x, y) offset to apply to the path, in points.
spacing : float, default: 10.0
    The spacing between ticks in points.
angle : float, default: 45.0
    The angle between the path and the tick in degrees.  The angle
    is measured as if you were an ant walking along the curve, with
    zero degrees pointing directly ahead, 90 to your left, -90
    to your right, and 180 behind you. To change side of the ticks,
    change sign of the angle.
length : float, default: 1.414
    The length of the tick relative to spacing.
    Recommended length = 1.414 (sqrt(2)) when angle=45, length=1.0
    when angle=90 and length=2.0 when angle=60.
**kwargs
    Extra keywords are stored and passed through to
    :meth:`AbstractPathEffect._update_gc`.

Examples
--------
See :doc:`/gallery/misc/tickedstroke_demo`.

---
## _offset_transform
```python
from patheffects import _offset_transform
```

Apply the offset to the given transform.

---
## _update_gc
```python
from patheffects import _update_gc
```

Update the given GraphicsContext with the given dict of properties.

The keys in the dictionary are used to identify the appropriate
``set_`` method on the *gc*.

---
## draw_path
```python
from patheffects import draw_path
```



---
## copy_with_path_effect
```python
from patheffects import copy_with_path_effect
```



---
## draw_markers
```python
from patheffects import draw_markers
```



---
## draw_path_collection
```python
from patheffects import draw_path_collection
```



---
## _draw_text_as_path
```python
from patheffects import _draw_text_as_path
```



---
## __getattribute__
```python
from patheffects import __getattribute__
```



---
## open_group
```python
from patheffects import open_group
```



---
## close_group
```python
from patheffects import close_group
```



---
## withEffect
```python
from patheffects import withEffect
```



---
## __name__
```python
from streamplot import __name__
```

Streamline plotting for 2D vector fields.

---
## streamplot
```python
from streamplot import streamplot
```

Draw streamlines of a vector flow.

Parameters
----------
x, y : 1D/2D arrays
    Evenly spaced strictly increasing arrays to make a grid.  If 2D, all
    rows of *x* must be equal and all columns of *y* must be equal; i.e.,
    they must be as if generated by ``np.meshgrid(x_1d, y_1d)``.
u, v : 2D arrays
    *x* and *y*-velocities. The number of rows and columns must match
    the length of *y* and *x*, respectively.
density : float or (float, float)
    Controls the closeness of streamlines. When ``density = 1``, the domain
    is divided into a 30x30 grid. *density* linearly scales this grid.
    Each cell in the grid can have, at most, one traversing streamline.
    For different densities in each direction, use a tuple
    (density_x, density_y).
linewidth : float or 2D array
    The width of the streamlines. With a 2D array the line width can be
    varied across the grid. The array must have the same shape as *u*
    and *v*.
color : :mpltype:`color` or 2D array
    The streamline color. If given an array, its values are converted to
    colors using *cmap* and *norm*.  The array must have the same shape
    as *u* and *v*.
cmap, norm
    Data normalization and colormapping parameters for *color*; only used
    if *color* is an array of floats. See `~.Axes.imshow` for a detailed
    description.
arrowsize : float
    Scaling factor for the arrow size.
arrowstyle : str
    Arrow style specification.
    See `~matplotlib.patches.FancyArrowPatch`.
minlength : float
    Minimum length of streamline in axes coordinates.
start_points : (N, 2) array
    Coordinates of starting points for the streamlines in data coordinates
    (the same coordinates as the *x* and *y* arrays).
zorder : float
    The zorder of the streamlines and arrows.
    Artists with lower zorder values are drawn first.
maxlength : float
    Maximum length of streamline in axes coordinates.
integration_direction : {'forward', 'backward', 'both'}, default: 'both'
    Integrate the streamline in forward, backward or both directions.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
broken_streamlines : boolean, default: True
    If False, forces streamlines to continue until they
    leave the plot domain.  If True, they may be terminated if they
    come too close to another streamline.

Returns
-------
StreamplotSet
    Container object with attributes

    - ``lines``: `.LineCollection` of streamlines

    - ``arrows``: `.PatchCollection` containing `.FancyArrowPatch`
      objects representing the arrows half-way along streamlines.

    This container will probably change in the future to allow changes
    to the colormap, alpha, etc. for both lines and arrows, but these
    changes should be backward compatible.

---
## StreamplotSet
```python
from streamplot import StreamplotSet
```



---
## DomainMap
```python
from streamplot import DomainMap
```

Map representing different coordinate systems.

Coordinate definitions:

* axes-coordinates goes from 0 to 1 in the domain.
* data-coordinates are specified by the input x-y coordinates.
* grid-coordinates goes from 0 to N and 0 to M for an N x M grid,
  where N and M match the shape of the input data.
* mask-coordinates goes from 0 to N and 0 to M for an N x M mask,
  where N and M are user-specified to control the density of streamlines.

This class also has methods for adding trajectories to the StreamMask.
Before adding a trajectory, run `start_trajectory` to keep track of regions
crossed by a given trajectory. Later, if you decide the trajectory is bad
(e.g., if the trajectory is very short) just call `undo_trajectory`.

---
## Grid
```python
from streamplot import Grid
```

Grid of data.

---
## StreamMask
```python
from streamplot import StreamMask
```

Mask to keep track of discrete regions crossed by streamlines.

The resolution of this grid determines the approximate spacing between
trajectories. Streamlines are only allowed to pass through zeroed cells:
When a streamline enters a cell, that cell is set to 1, and no new
streamlines are allowed to enter.

---
## InvalidIndexError
```python
from streamplot import InvalidIndexError
```



---
## TerminateTrajectory
```python
from streamplot import TerminateTrajectory
```



---
## _get_integrator
```python
from streamplot import _get_integrator
```



---
## OutOfBounds
```python
from streamplot import OutOfBounds
```



---
## _integrate_rk12
```python
from streamplot import _integrate_rk12
```

2nd-order Runge-Kutta algorithm with adaptive step size.

This method is also referred to as the improved Euler's method, or Heun's
method. This method is favored over higher-order methods because:

1. To get decent looking trajectories and to sample every mask cell
   on the trajectory we need a small timestep, so a lower order
   solver doesn't hurt us unless the data is *very* high resolution.
   In fact, for cases where the user inputs
   data smaller or of similar grid size to the mask grid, the higher
   order corrections are negligible because of the very fast linear
   interpolation used in `interpgrid`.

2. For high resolution input data (i.e. beyond the mask
   resolution), we must reduce the timestep. Therefore, an adaptive
   timestep is more suited to the problem as this would be very hard
   to judge automatically otherwise.

This integrator is about 1.5 - 2x as fast as RK4 and RK45 solvers (using
similar Python implementations) in most setups.

---
## _euler_step
```python
from streamplot import _euler_step
```

Simple Euler integration step that extends streamline to boundary.

---
## interpgrid
```python
from streamplot import interpgrid
```

Fast 2D, linear interpolation on an integer grid

---
## _gen_starting_points
```python
from streamplot import _gen_starting_points
```

Yield starting points for streamlines.

Trying points on the boundary first gives higher quality streamlines.
This algorithm starts with a point on the mask corner and spirals inward.
This algorithm is inefficient, but fast compared to rest of streamplot.

---
## __init__
```python
from streamplot import __init__
```



---
## grid2mask
```python
from streamplot import grid2mask
```

Return nearest space in mask-coords from given grid-coords.

---
## mask2grid
```python
from streamplot import mask2grid
```



---
## data2grid
```python
from streamplot import data2grid
```



---
## grid2data
```python
from streamplot import grid2data
```



---
## start_trajectory
```python
from streamplot import start_trajectory
```



---
## reset_start_point
```python
from streamplot import reset_start_point
```



---
## update_trajectory
```python
from streamplot import update_trajectory
```



---
## undo_trajectory
```python
from streamplot import undo_trajectory
```



---
## shape
```python
from streamplot import shape
```



---
## within_grid
```python
from streamplot import within_grid
```

Return whether (*xi*, *yi*) is a valid index of the grid.

---
## __getitem__
```python
from streamplot import __getitem__
```



---
## _start_trajectory
```python
from streamplot import _start_trajectory
```

Start recording streamline trajectory

---
## _undo_trajectory
```python
from streamplot import _undo_trajectory
```

Remove current trajectory from mask

---
## _update_trajectory
```python
from streamplot import _update_trajectory
```

Update current trajectory position in mask.

If the new position has already been filled, raise `InvalidIndexError`.

---
## forward_time
```python
from streamplot import forward_time
```



---
## backward_time
```python
from streamplot import backward_time
```



---
## integrate
```python
from streamplot import integrate
```

Return x, y grid-coordinates of trajectory based on starting point.

Integrate both forward and backward in time from starting point in
grid coordinates.

Integration is terminated when a trajectory reaches a domain boundary
or when it crosses into an already occupied cell in the StreamMask. The
resulting trajectory is None if it is shorter than `minlength`.

---
## __name__
```python
from colors import __name__
```



---
## _ColorMapping
```python
from colors import _ColorMapping
```



---
## get_named_colors_mapping
```python
from colors import get_named_colors_mapping
```

Return the global mapping of names to named colors.

---
## ColorSequenceRegistry
```python
from colors import ColorSequenceRegistry
```

Container for sequences of colors that are known to Matplotlib by name.

The universal registry instance is `matplotlib.color_sequences`. There
should be no need for users to instantiate `.ColorSequenceRegistry`
themselves.

Read access uses a dict-like interface mapping names to lists of colors::

    import matplotlib as mpl
    cmap = mpl.color_sequences['tab10']

The returned lists are copies, so that their modification does not change
the global definition of the color sequence.

Additional color sequences can be added via
`.ColorSequenceRegistry.register`::

    mpl.color_sequences.register('rgb', ['r', 'g', 'b'])

---
## _sanitize_extrema
```python
from colors import _sanitize_extrema
```



---
## _is_nth_color
```python
from colors import _is_nth_color
```

Return whether *c* can be interpreted as an item in the color cycle.

---
## is_color_like
```python
from colors import is_color_like
```

Return whether *c* can be interpreted as an RGB(A) color.

---
## _has_alpha_channel
```python
from colors import _has_alpha_channel
```

Return whether *c* is a color with an alpha channel.

---
## _check_color_like
```python
from colors import _check_color_like
```

For each *key, value* pair in *kwargs*, check that *value* is color-like.

---
## same_color
```python
from colors import same_color
```

Return whether the colors *c1* and *c2* are the same.

*c1*, *c2* can be single colors or lists/arrays of colors.

---
## to_rgba
```python
from colors import to_rgba
```

Convert *c* to an RGBA color.

Parameters
----------
c : Matplotlib color or ``np.ma.masked``

alpha : float, optional
    If *alpha* is given, force the alpha value of the returned RGBA tuple
    to *alpha*.

    If None, the alpha value from *c* is used. If *c* does not have an
    alpha channel, then alpha defaults to 1.

    *alpha* is ignored for the color value ``"none"`` (case-insensitive),
    which always maps to ``(0, 0, 0, 0)``.

Returns
-------
tuple
    Tuple of floats ``(r, g, b, a)``, where each channel (red, green, blue,
    alpha) can assume values between 0 and 1.

---
## _to_rgba_no_colorcycle
```python
from colors import _to_rgba_no_colorcycle
```

Convert *c* to an RGBA color, with no support for color-cycle syntax.

If *alpha* is given, force the alpha value of the returned RGBA tuple
to *alpha*. Otherwise, the alpha value from *c* is used, if it has alpha
information, or defaults to 1.

*alpha* is ignored for the color value ``"none"`` (case-insensitive),
which always maps to ``(0, 0, 0, 0)``.

---
## to_rgba_array
```python
from colors import to_rgba_array
```

Convert *c* to a (n, 4) array of RGBA colors.

Parameters
----------
c : Matplotlib color or array of colors
    If *c* is a masked array, an `~numpy.ndarray` is returned with a
    (0, 0, 0, 0) row for each masked value or row in *c*.

alpha : float or sequence of floats, optional
    If *alpha* is given, force the alpha value of the returned RGBA tuple
    to *alpha*.

    If None, the alpha value from *c* is used. If *c* does not have an
    alpha channel, then alpha defaults to 1.

    *alpha* is ignored for the color value ``"none"`` (case-insensitive),
    which always maps to ``(0, 0, 0, 0)``.

    If *alpha* is a sequence and *c* is a single color, *c* will be
    repeated to match the length of *alpha*.

Returns
-------
array
    (n, 4) array of RGBA colors,  where each channel (red, green, blue,
    alpha) can assume values between 0 and 1.

---
## to_rgb
```python
from colors import to_rgb
```

Convert *c* to an RGB color, silently dropping the alpha channel.

---
## to_hex
```python
from colors import to_hex
```

Convert *c* to a hex color.

Parameters
----------
c : :ref:`color <colors_def>` or `numpy.ma.masked`

keep_alpha : bool, default: False
  If False, use the ``#rrggbb`` format, otherwise use ``#rrggbbaa``.

Returns
-------
str
  ``#rrggbb`` or ``#rrggbbaa`` hex color string

---
## ColorConverter
```python
from colors import ColorConverter
```

A class only kept for backwards compatibility.

Its functionality is entirely provided by module-level functions.

---
## _create_lookup_table
```python
from colors import _create_lookup_table
```

Create an *N* -element 1D lookup table.

This assumes a mapping :math:`f : [0, 1] \rightarrow [0, 1]`. The returned
data is an array of N values :math:`y = f(x)` where x is sampled from
[0, 1].

By default (*gamma* = 1) x is equidistantly sampled from [0, 1]. The
*gamma* correction factor :math:`\gamma` distorts this equidistant
sampling by :math:`x \rightarrow x^\gamma`.

Parameters
----------
N : int
    The number of elements of the created lookup table; at least 1.

data : (M, 3) array-like or callable
    Defines the mapping :math:`f`.

    If a (M, 3) array-like, the rows define values (x, y0, y1).  The x
    values must start with x=0, end with x=1, and all x values be in
    increasing order.

    A value between :math:`x_i` and :math:`x_{i+1}` is mapped to the range
    :math:`y^1_{i-1} \ldots y^0_i` by linear interpolation.

    For the simple case of a y-continuous mapping, y0 and y1 are identical.

    The two values of y are to allow for discontinuous mapping functions.
    E.g. a sawtooth with a period of 0.2 and an amplitude of 1 would be::

        [(0, 1, 0), (0.2, 1, 0), (0.4, 1, 0), ..., [(1, 1, 0)]

    In the special case of ``N == 1``, by convention the returned value
    is y0 for x == 1.

    If *data* is a callable, it must accept and return numpy arrays::

       data(x : ndarray) -> ndarray

    and map values between 0 - 1 to 0 - 1.

gamma : float
    Gamma correction factor for input distribution x of the mapping.

    See also https://en.wikipedia.org/wiki/Gamma_correction.

Returns
-------
array
    The lookup table where ``lut[x * (N-1)]`` gives the closest value
    for values of x between 0 and 1.

Notes
-----
This function is internally used for `.LinearSegmentedColormap`.

---
## Colormap
```python
from colors import Colormap
```

Baseclass for all scalar to RGBA mappings.

Typically, Colormap instances are used to convert data values (floats)
from the interval ``[0, 1]`` to the RGBA color that the respective
Colormap represents. For scaling of data into the ``[0, 1]`` interval see
`matplotlib.colors.Normalize`. Subclasses of `matplotlib.cm.ScalarMappable`
make heavy use of this ``data -> normalize -> map-to-color`` processing
chain.

---
## LinearSegmentedColormap
```python
from colors import LinearSegmentedColormap
```

Colormap objects based on lookup tables using linear segments.

The lookup table is generated using linear interpolation for each
primary color, with the 0-1 domain divided into any number of
segments.

---
## ListedColormap
```python
from colors import ListedColormap
```

Colormap object generated from a list of colors.

This may be most useful when indexing directly into a colormap,
but it can also be used to generate special colormaps for ordinary
mapping.

Parameters
----------
colors : list, array
    Sequence of Matplotlib color specifications (color names or RGB(A)
    values).
name : str, optional
    String to identify the colormap.
N : int, optional
    Number of entries in the map. The default is *None*, in which case
    there is one colormap entry for each element in the list of colors.
    If ::

        N < len(colors)

    the list will be truncated at *N*. If ::

        N > len(colors)

    the list will be extended by repetition.

---
## Normalize
```python
from colors import Normalize
```

A class which, when called, maps values within the interval
``[vmin, vmax]`` linearly to the interval ``[0.0, 1.0]``. The mapping of
values outside ``[vmin, vmax]`` depends on *clip*.

Examples
--------
::

    x = [-2, -1, 0, 1, 2]

    norm = mpl.colors.Normalize(vmin=-1, vmax=1, clip=False)
    norm(x)  # [-0.5, 0., 0.5, 1., 1.5]
    norm = mpl.colors.Normalize(vmin=-1, vmax=1, clip=True)
    norm(x)  # [0., 0., 0.5, 1., 1.]

See Also
--------
:ref:`colormapnorms`

---
## TwoSlopeNorm
```python
from colors import TwoSlopeNorm
```



---
## CenteredNorm
```python
from colors import CenteredNorm
```



---
## make_norm_from_scale
```python
from colors import make_norm_from_scale
```

Decorator for building a `.Normalize` subclass from a `~.scale.ScaleBase`
subclass.

After ::

    @make_norm_from_scale(scale_cls)
    class norm_cls(Normalize):
        ...

*norm_cls* is filled with methods so that normalization computations are
forwarded to *scale_cls* (i.e., *scale_cls* is the scale that would be used
for the colorbar of a mappable normalized with *norm_cls*).

If *init* is not passed, then the constructor signature of *norm_cls*
will be ``norm_cls(vmin=None, vmax=None, clip=False)``; these three
parameters will be forwarded to the base class (``Normalize.__init__``),
and a *scale_cls* object will be initialized with no arguments (other than
a dummy axis).

If the *scale_cls* constructor takes additional parameters, then *init*
should be passed to `make_norm_from_scale`.  It is a callable which is
*only* used for its signature.  First, this signature will become the
signature of *norm_cls*.  Second, the *norm_cls* constructor will bind the
parameters passed to it using this signature, extract the bound *vmin*,
*vmax*, and *clip* values, pass those to ``Normalize.__init__``, and
forward the remaining bound values (including any defaults defined by the
signature) to the *scale_cls* constructor.

---
## _make_norm_from_scale
```python
from colors import _make_norm_from_scale
```

Helper for `make_norm_from_scale`.

This function is split out to enable caching (in particular so that
different unpickles reuse the same class).  In order to do so,

- ``functools.partial`` *scale_cls* is expanded into ``func, args, kwargs``
  to allow memoizing returned norms (partial instances always compare
  unequal, but we can check identity based on ``func, args, kwargs``;
- *init* is replaced by *init_signature*, as signatures are picklable,
  unlike to arbitrary lambdas.

---
## _create_empty_object_of_class
```python
from colors import _create_empty_object_of_class
```



---
## _picklable_norm_constructor
```python
from colors import _picklable_norm_constructor
```



---
## FuncNorm
```python
from colors import FuncNorm
```

Arbitrary normalization using functions for the forward and inverse.

Parameters
----------
functions : (callable, callable)
    two-tuple of the forward and inverse functions for the normalization.
    The forward function must be monotonic.

    Both functions must have the signature ::

       def forward(values: array-like) -> array-like

vmin, vmax : float or None
    If *vmin* and/or *vmax* is not given, they are initialized from the
    minimum and maximum value, respectively, of the first input
    processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.

clip : bool, default: False
    Determines the behavior for mapping values outside the range
    ``[vmin, vmax]``.

    If clipping is off, values outside the range ``[vmin, vmax]`` are also
    transformed by the function, resulting in values outside ``[0, 1]``.
    This behavior is usually desirable, as colormaps can mark these *under*
    and *over* values with specific colors.

    If clipping is on, values below *vmin* are mapped to 0 and values above
    *vmax* are mapped to 1. Such values become indistinguishable from
    regular boundary values, which may cause misinterpretation of the data.

---
## SymLogNorm
```python
from colors import SymLogNorm
```

The symmetrical logarithmic scale is logarithmic in both the
positive and negative directions from the origin.

Since the values close to zero tend toward infinity, there is a
need to have a range around zero that is linear.  The parameter
*linthresh* allows the user to specify the size of this range
(-*linthresh*, *linthresh*).

Parameters
----------
linthresh : float
    The range within which the plot is linear (to avoid having the plot
    go to infinity around zero).
linscale : float, default: 1
    This allows the linear range (-*linthresh* to *linthresh*) to be
    stretched relative to the logarithmic range. Its value is the
    number of decades to use for each half of the linear range. For
    example, when *linscale* == 1.0 (the default), the space used for
    the positive and negative halves of the linear range will be equal
    to one decade in the logarithmic range.
base : float, default: 10

---
## AsinhNorm
```python
from colors import AsinhNorm
```

The inverse hyperbolic sine scale is approximately linear near
the origin, but becomes logarithmic for larger positive
or negative values. Unlike the `SymLogNorm`, the transition between
these linear and logarithmic regions is smooth, which may reduce
the risk of visual artifacts.

.. note::

   This API is provisional and may be revised in the future
   based on early user feedback.

Parameters
----------
linear_width : float, default: 1
    The effective width of the linear region, beyond which
    the transformation becomes asymptotically logarithmic

---
## PowerNorm
```python
from colors import PowerNorm
```

Linearly map a given value to the 0-1 range and then apply
a power-law normalization over that range.

Parameters
----------
gamma : float
    Power law exponent.
vmin, vmax : float or None
    If *vmin* and/or *vmax* is not given, they are initialized from the
    minimum and maximum value, respectively, of the first input
    processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
clip : bool, default: False
    Determines the behavior for mapping values outside the range
    ``[vmin, vmax]``.

    If clipping is off, values above *vmax* are transformed by the power
    function, resulting in values above 1, and values below *vmin* are linearly
    transformed resulting in values below 0. This behavior is usually desirable, as
    colormaps can mark these *under* and *over* values with specific colors.

    If clipping is on, values below *vmin* are mapped to 0 and values above
    *vmax* are mapped to 1. Such values become indistinguishable from
    regular boundary values, which may cause misinterpretation of the data.

Notes
-----
The normalization formula is

.. math::

    \left ( \frac{x - v_{min}}{v_{max}  - v_{min}} \right )^{\gamma}

For input values below *vmin*, gamma is set to one.

---
## BoundaryNorm
```python
from colors import BoundaryNorm
```

Generate a colormap index based on discrete intervals.

Unlike `Normalize` or `LogNorm`, `BoundaryNorm` maps values to integers
instead of to the interval 0-1.

---
## NoNorm
```python
from colors import NoNorm
```

Dummy replacement for `Normalize`, for the case where we want to use
indices directly in a `~matplotlib.cm.ScalarMappable`.

---
## rgb_to_hsv
```python
from colors import rgb_to_hsv
```

Convert an array of float RGB values (in the range [0, 1]) to HSV values.

Parameters
----------
arr : (..., 3) array-like
   All values must be in the range [0, 1]

Returns
-------
(..., 3) `~numpy.ndarray`
   Colors converted to HSV values in range [0, 1]

---
## hsv_to_rgb
```python
from colors import hsv_to_rgb
```

Convert HSV values to RGB.

Parameters
----------
hsv : (..., 3) array-like
   All values assumed to be in range [0, 1]

Returns
-------
(..., 3) `~numpy.ndarray`
   Colors converted to RGB values in range [0, 1]

---
## _vector_magnitude
```python
from colors import _vector_magnitude
```



---
## LightSource
```python
from colors import LightSource
```

Create a light source coming from the specified azimuth and elevation.
Angles are in degrees, with the azimuth measured
clockwise from north and elevation up from the zero plane of the surface.

`shade` is used to produce "shaded" RGB values for a data array.
`shade_rgb` can be used to combine an RGB image with an elevation map.
`hillshade` produces an illumination map of a surface.

---
## from_levels_and_colors
```python
from colors import from_levels_and_colors
```

A helper routine to generate a cmap and a norm instance which
behave similar to contourf's levels and colors arguments.

Parameters
----------
levels : sequence of numbers
    The quantization levels used to construct the `BoundaryNorm`.
    Value ``v`` is quantized to level ``i`` if ``lev[i] <= v < lev[i+1]``.
colors : sequence of colors
    The fill color to use for each level. If *extend* is "neither" there
    must be ``n_level - 1`` colors. For an *extend* of "min" or "max" add
    one extra color, and for an *extend* of "both" add two colors.
extend : {'neither', 'min', 'max', 'both'}, optional
    The behaviour when a value falls out of range of the given levels.
    See `~.Axes.contourf` for details.

Returns
-------
cmap : `~matplotlib.colors.Colormap`
norm : `~matplotlib.colors.Normalize`

---
## __init__
```python
from colors import __init__
```



---
## __setitem__
```python
from colors import __setitem__
```



---
## __delitem__
```python
from colors import __delitem__
```



---
## __getitem__
```python
from colors import __getitem__
```



---
## __iter__
```python
from colors import __iter__
```



---
## __len__
```python
from colors import __len__
```



---
## __str__
```python
from colors import __str__
```



---
## register
```python
from colors import register
```

Register a new color sequence.

The color sequence registry stores a copy of the given *color_list*, so
that future changes to the original list do not affect the registered
color sequence. Think of this as the registry taking a snapshot
of *color_list* at registration.

Parameters
----------
name : str
    The name for the color sequence.

color_list : list of :mpltype:`color`
    An iterable returning valid Matplotlib colors when iterating over.
    Note however that the returned color sequence will always be a
    list regardless of the input type.

---
## unregister
```python
from colors import unregister
```

Remove a sequence from the registry.

You cannot remove built-in color sequences.

If the name is not registered, returns with no error.

---
## __call__
```python
from colors import __call__
```



---
## __copy__
```python
from colors import __copy__
```



---
## __eq__
```python
from colors import __eq__
```



---
## get_bad
```python
from colors import get_bad
```

Get the color for masked values.

---
## set_bad
```python
from colors import set_bad
```

Set the color for masked values.

---
## get_under
```python
from colors import get_under
```

Get the color for low out-of-range values.

---
## set_under
```python
from colors import set_under
```

Set the color for low out-of-range values.

---
## get_over
```python
from colors import get_over
```

Get the color for high out-of-range values.

---
## set_over
```python
from colors import set_over
```

Set the color for high out-of-range values.

---
## set_extremes
```python
from colors import set_extremes
```

Set the colors for masked (*bad*) values and, when ``norm.clip =
False``, low (*under*) and high (*over*) out-of-range values.

---
## with_extremes
```python
from colors import with_extremes
```

Return a copy of the colormap, for which the colors for masked (*bad*)
values and, when ``norm.clip = False``, low (*under*) and high (*over*)
out-of-range values, have been set accordingly.

---
## _set_extremes
```python
from colors import _set_extremes
```



---
## _init
```python
from colors import _init
```



---
## is_gray
```python
from colors import is_gray
```

Return whether the colormap is grayscale.

---
## resampled
```python
from colors import resampled
```

Return a new colormap with *lutsize* entries.

---
## reversed
```python
from colors import reversed
```

Return a reversed instance of the Colormap.

Parameters
----------
name : str, optional
    The name for the reversed colormap. If None, the
    name is set to ``self.name + "_r"``.

Returns
-------
ListedColormap
    A reversed instance of the colormap.

---
## _repr_png_
```python
from colors import _repr_png_
```

Generate a PNG representation of the Colormap.

---
## _repr_html_
```python
from colors import _repr_html_
```

Generate an HTML representation of the Colormap.

---
## copy
```python
from colors import copy
```

Return a copy of the colormap.

---
## set_gamma
```python
from colors import set_gamma
```

Set a new gamma value and regenerate colormap.

---
## from_list
```python
from colors import from_list
```

Create a `LinearSegmentedColormap` from a list of colors.

Parameters
----------
name : str
    The name of the colormap.
colors : list of :mpltype:`color` or list of (value, color)
    If only colors are given, they are equidistantly mapped from the
    range :math:`[0, 1]`; i.e. 0 maps to ``colors[0]`` and 1 maps to
    ``colors[-1]``.
    If (value, color) pairs are given, the mapping is from *value*
    to *color*. This can be used to divide the range unevenly.
N : int
    The number of RGB quantization levels.
gamma : float

---
## _reverser
```python
from colors import _reverser
```



---
## vmin
```python
from colors import vmin
```



---
## vmax
```python
from colors import vmax
```



---
## clip
```python
from colors import clip
```



---
## _changed
```python
from colors import _changed
```

Call this whenever the norm is changed to notify all the
callback listeners to the 'changed' signal.

---
## process_value
```python
from colors import process_value
```

Homogenize the input *value* for easy and efficient normalization.

*value* can be a scalar or sequence.

Parameters
----------
value
    Data to normalize.

Returns
-------
result : masked array
    Masked array with the same shape as *value*.
is_scalar : bool
    Whether *value* is a scalar.

Notes
-----
Float dtypes are preserved; integer types with two bytes or smaller are
converted to np.float32, and larger types are converted to np.float64.
Preserving float32 when possible, and using in-place operations,
greatly improves speed for large arrays.

---
## inverse
```python
from colors import inverse
```



---
## autoscale
```python
from colors import autoscale
```

Set *halfrange* to ``max(abs(A-vcenter))``, then set *vmin* and *vmax*.

---
## autoscale_None
```python
from colors import autoscale_None
```



---
## scaled
```python
from colors import scaled
```

Return whether *vmin* and *vmax* are both set.

---
## vcenter
```python
from colors import vcenter
```



---
## halfrange
```python
from colors import halfrange
```



---
## Norm
```python
from colors import Norm
```



---
## linthresh
```python
from colors import linthresh
```



---
## linear_width
```python
from colors import linear_width
```



---
## direction
```python
from colors import direction
```

The unit vector direction towards the light source.

---
## hillshade
```python
from colors import hillshade
```

Calculate the illumination intensity for a surface using the defined
azimuth and elevation for the light source.

This computes the normal vectors for the surface, and then passes them
on to `shade_normals`

Parameters
----------
elevation : 2D array-like
    The height values used to generate an illumination map
vert_exag : number, optional
    The amount to exaggerate the elevation values by when calculating
    illumination. This can be used either to correct for differences in
    units between the x-y coordinate system and the elevation
    coordinate system (e.g. decimal degrees vs. meters) or to
    exaggerate or de-emphasize topographic effects.
dx : number, optional
    The x-spacing (columns) of the input *elevation* grid.
dy : number, optional
    The y-spacing (rows) of the input *elevation* grid.
fraction : number, optional
    Increases or decreases the contrast of the hillshade.  Values
    greater than one will cause intermediate values to move closer to
    full illumination or shadow (and clipping any values that move
    beyond 0 or 1). Note that this is not visually or mathematically
    the same as vertical exaggeration.

Returns
-------
`~numpy.ndarray`
    A 2D array of illumination values between 0-1, where 0 is
    completely in shadow and 1 is completely illuminated.

---
## shade_normals
```python
from colors import shade_normals
```

Calculate the illumination intensity for the normal vectors of a
surface using the defined azimuth and elevation for the light source.

Imagine an artificial sun placed at infinity in some azimuth and
elevation position illuminating our surface. The parts of the surface
that slope toward the sun should brighten while those sides facing away
should become darker.

Parameters
----------
fraction : number, optional
    Increases or decreases the contrast of the hillshade.  Values
    greater than one will cause intermediate values to move closer to
    full illumination or shadow (and clipping any values that move
    beyond 0 or 1). Note that this is not visually or mathematically
    the same as vertical exaggeration.

Returns
-------
`~numpy.ndarray`
    A 2D array of illumination values between 0-1, where 0 is
    completely in shadow and 1 is completely illuminated.

---
## shade
```python
from colors import shade
```

Combine colormapped data values with an illumination intensity map
(a.k.a.  "hillshade") of the values.

Parameters
----------
data : 2D array-like
    The height values used to generate a shaded map.
cmap : `~matplotlib.colors.Colormap`
    The colormap used to color the *data* array. Note that this must be
    a `~matplotlib.colors.Colormap` instance.  For example, rather than
    passing in ``cmap='gist_earth'``, use
    ``cmap=plt.get_cmap('gist_earth')`` instead.
norm : `~matplotlib.colors.Normalize` instance, optional
    The normalization used to scale values before colormapping. If
    None, the input will be linearly scaled between its min and max.
blend_mode : {'hsv', 'overlay', 'soft'} or callable, optional
    The type of blending used to combine the colormapped data
    values with the illumination intensity.  Default is
    "overlay".  Note that for most topographic surfaces,
    "overlay" or "soft" appear more visually realistic. If a
    user-defined function is supplied, it is expected to
    combine an (M, N, 3) RGB array of floats (ranging 0 to 1) with
    an (M, N, 1) hillshade array (also 0 to 1).  (Call signature
    ``func(rgb, illum, **kwargs)``) Additional kwargs supplied
    to this function will be passed on to the *blend_mode*
    function.
vmin : float or None, optional
    The minimum value used in colormapping *data*. If *None* the
    minimum value in *data* is used. If *norm* is specified, then this
    argument will be ignored.
vmax : float or None, optional
    The maximum value used in colormapping *data*. If *None* the
    maximum value in *data* is used. If *norm* is specified, then this
    argument will be ignored.
vert_exag : number, optional
    The amount to exaggerate the elevation values by when calculating
    illumination. This can be used either to correct for differences in
    units between the x-y coordinate system and the elevation
    coordinate system (e.g. decimal degrees vs. meters) or to
    exaggerate or de-emphasize topography.
dx : number, optional
    The x-spacing (columns) of the input *elevation* grid.
dy : number, optional
    The y-spacing (rows) of the input *elevation* grid.
fraction : number, optional
    Increases or decreases the contrast of the hillshade.  Values
    greater than one will cause intermediate values to move closer to
    full illumination or shadow (and clipping any values that move
    beyond 0 or 1). Note that this is not visually or mathematically
    the same as vertical exaggeration.
**kwargs
    Additional kwargs are passed on to the *blend_mode* function.

Returns
-------
`~numpy.ndarray`
    An (M, N, 4) array of floats ranging between 0-1.

---
## shade_rgb
```python
from colors import shade_rgb
```

Use this light source to adjust the colors of the *rgb* input array to
give the impression of a shaded relief map with the given *elevation*.

Parameters
----------
rgb : array-like
    An (M, N, 3) RGB array, assumed to be in the range of 0 to 1.
elevation : array-like
    An (M, N) array of the height values used to generate a shaded map.
fraction : number
    Increases or decreases the contrast of the hillshade.  Values
    greater than one will cause intermediate values to move closer to
    full illumination or shadow (and clipping any values that move
    beyond 0 or 1). Note that this is not visually or mathematically
    the same as vertical exaggeration.
blend_mode : {'hsv', 'overlay', 'soft'} or callable, optional
    The type of blending used to combine the colormapped data values
    with the illumination intensity.  For backwards compatibility, this
    defaults to "hsv". Note that for most topographic surfaces,
    "overlay" or "soft" appear more visually realistic. If a
    user-defined function is supplied, it is expected to combine an
    (M, N, 3) RGB array of floats (ranging 0 to 1) with an (M, N, 1)
    hillshade array (also 0 to 1).  (Call signature
    ``func(rgb, illum, **kwargs)``)
    Additional kwargs supplied to this function will be passed on to
    the *blend_mode* function.
vert_exag : number, optional
    The amount to exaggerate the elevation values by when calculating
    illumination. This can be used either to correct for differences in
    units between the x-y coordinate system and the elevation
    coordinate system (e.g. decimal degrees vs. meters) or to
    exaggerate or de-emphasize topography.
dx : number, optional
    The x-spacing (columns) of the input *elevation* grid.
dy : number, optional
    The y-spacing (rows) of the input *elevation* grid.
**kwargs
    Additional kwargs are passed on to the *blend_mode* function.

Returns
-------
`~numpy.ndarray`
    An (m, n, 3) array of floats ranging between 0-1.

---
## blend_hsv
```python
from colors import blend_hsv
```

Take the input data array, convert to HSV values in the given colormap,
then adjust those color values to give the impression of a shaded
relief map with a specified light source.  RGBA values are returned,
which can then be used to plot the shaded image with imshow.

The color of the resulting image will be darkened by moving the (s, v)
values (in HSV colorspace) toward (hsv_min_sat, hsv_min_val) in the
shaded regions, or lightened by sliding (s, v) toward (hsv_max_sat,
hsv_max_val) in regions that are illuminated.  The default extremes are
chose so that completely shaded points are nearly black (s = 1, v = 0)
and completely illuminated points are nearly white (s = 0, v = 1).

Parameters
----------
rgb : `~numpy.ndarray`
    An (M, N, 3) RGB array of floats ranging from 0 to 1 (color image).
intensity : `~numpy.ndarray`
    An (M, N, 1) array of floats ranging from 0 to 1 (grayscale image).
hsv_max_sat : number, optional
    The maximum saturation value that the *intensity* map can shift the output
    image to. If not provided, use the value provided upon initialization.
hsv_min_sat : number, optional
    The minimum saturation value that the *intensity* map can shift the output
    image to. If not provided, use the value provided upon initialization.
hsv_max_val : number, optional
    The maximum value ("v" in "hsv") that the *intensity* map can shift the
    output image to. If not provided, use the value provided upon
    initialization.
hsv_min_val : number, optional
    The minimum value ("v" in "hsv") that the *intensity* map can shift the
    output image to. If not provided, use the value provided upon
    initialization.

Returns
-------
`~numpy.ndarray`
    An (M, N, 3) RGB array representing the combined images.

---
## blend_soft_light
```python
from colors import blend_soft_light
```

Combine an RGB image with an intensity map using "soft light" blending,
using the "pegtop" formula.

Parameters
----------
rgb : `~numpy.ndarray`
    An (M, N, 3) RGB array of floats ranging from 0 to 1 (color image).
intensity : `~numpy.ndarray`
    An (M, N, 1) array of floats ranging from 0 to 1 (grayscale image).

Returns
-------
`~numpy.ndarray`
    An (M, N, 3) RGB array representing the combined images.

---
## blend_overlay
```python
from colors import blend_overlay
```

Combine an RGB image with an intensity map using "overlay" blending.

Parameters
----------
rgb : `~numpy.ndarray`
    An (M, N, 3) RGB array of floats ranging from 0 to 1 (color image).
intensity : `~numpy.ndarray`
    An (M, N, 1) array of floats ranging from 0 to 1 (grayscale image).

Returns
-------
ndarray
    An (M, N, 3) RGB array representing the combined images.

---
## color_block
```python
from colors import color_block
```



---
## init
```python
from colors import init
```



---
## __reduce__
```python
from colors import __reduce__
```



---
## ScannerError
```python
from scanner import ScannerError
```



---
## SimpleKey
```python
from scanner import SimpleKey
```



---
## check_token
```python
from scanner import check_token
```



---
## peek_token
```python
from scanner import peek_token
```



---
## get_token
```python
from scanner import get_token
```



---
## need_more_tokens
```python
from scanner import need_more_tokens
```



---
## fetch_more_tokens
```python
from scanner import fetch_more_tokens
```



---
## next_possible_simple_key
```python
from scanner import next_possible_simple_key
```



---
## stale_possible_simple_keys
```python
from scanner import stale_possible_simple_keys
```



---
## save_possible_simple_key
```python
from scanner import save_possible_simple_key
```



---
## remove_possible_simple_key
```python
from scanner import remove_possible_simple_key
```



---
## unwind_indent
```python
from scanner import unwind_indent
```



---
## add_indent
```python
from scanner import add_indent
```



---
## fetch_stream_start
```python
from scanner import fetch_stream_start
```



---
## fetch_stream_end
```python
from scanner import fetch_stream_end
```



---
## fetch_directive
```python
from scanner import fetch_directive
```



---
## fetch_document_start
```python
from scanner import fetch_document_start
```



---
## fetch_document_end
```python
from scanner import fetch_document_end
```



---
## fetch_document_indicator
```python
from scanner import fetch_document_indicator
```



---
## fetch_flow_sequence_start
```python
from scanner import fetch_flow_sequence_start
```



---
## fetch_flow_mapping_start
```python
from scanner import fetch_flow_mapping_start
```



---
## fetch_flow_collection_start
```python
from scanner import fetch_flow_collection_start
```



---
## fetch_flow_sequence_end
```python
from scanner import fetch_flow_sequence_end
```



---
## fetch_flow_mapping_end
```python
from scanner import fetch_flow_mapping_end
```



---
## fetch_flow_collection_end
```python
from scanner import fetch_flow_collection_end
```



---
## fetch_flow_entry
```python
from scanner import fetch_flow_entry
```



---
## fetch_block_entry
```python
from scanner import fetch_block_entry
```



---
## fetch_key
```python
from scanner import fetch_key
```



---
## fetch_value
```python
from scanner import fetch_value
```



---
## fetch_alias
```python
from scanner import fetch_alias
```



---
## fetch_anchor
```python
from scanner import fetch_anchor
```



---
## fetch_tag
```python
from scanner import fetch_tag
```



---
## fetch_literal
```python
from scanner import fetch_literal
```



---
## fetch_folded
```python
from scanner import fetch_folded
```



---
## fetch_block_scalar
```python
from scanner import fetch_block_scalar
```



---
## fetch_single
```python
from scanner import fetch_single
```



---
## fetch_double
```python
from scanner import fetch_double
```



---
## fetch_flow_scalar
```python
from scanner import fetch_flow_scalar
```



---
## fetch_plain
```python
from scanner import fetch_plain
```



---
## check_directive
```python
from scanner import check_directive
```



---
## check_document_start
```python
from scanner import check_document_start
```



---
## check_document_end
```python
from scanner import check_document_end
```



---
## check_block_entry
```python
from scanner import check_block_entry
```



---
## check_key
```python
from scanner import check_key
```



---
## check_value
```python
from scanner import check_value
```



---
## check_plain
```python
from scanner import check_plain
```



---
## scan_to_next_token
```python
from scanner import scan_to_next_token
```



---
## scan_directive
```python
from scanner import scan_directive
```



---
## scan_directive_name
```python
from scanner import scan_directive_name
```



---
## scan_yaml_directive_value
```python
from scanner import scan_yaml_directive_value
```



---
## scan_yaml_directive_number
```python
from scanner import scan_yaml_directive_number
```



---
## scan_tag_directive_value
```python
from scanner import scan_tag_directive_value
```



---
## scan_tag_directive_handle
```python
from scanner import scan_tag_directive_handle
```



---
## scan_tag_directive_prefix
```python
from scanner import scan_tag_directive_prefix
```



---
## scan_directive_ignored_line
```python
from scanner import scan_directive_ignored_line
```



---
## scan_anchor
```python
from scanner import scan_anchor
```



---
## scan_tag
```python
from scanner import scan_tag
```



---
## scan_block_scalar
```python
from scanner import scan_block_scalar
```



---
## scan_block_scalar_indicators
```python
from scanner import scan_block_scalar_indicators
```



---
## scan_block_scalar_ignored_line
```python
from scanner import scan_block_scalar_ignored_line
```



---
## scan_block_scalar_indentation
```python
from scanner import scan_block_scalar_indentation
```



---
## scan_block_scalar_breaks
```python
from scanner import scan_block_scalar_breaks
```



---
## scan_flow_scalar
```python
from scanner import scan_flow_scalar
```



---
## scan_flow_scalar_non_spaces
```python
from scanner import scan_flow_scalar_non_spaces
```



---
## scan_flow_scalar_spaces
```python
from scanner import scan_flow_scalar_spaces
```



---
## scan_flow_scalar_breaks
```python
from scanner import scan_flow_scalar_breaks
```



---
## scan_plain
```python
from scanner import scan_plain
```



---
## scan_plain_spaces
```python
from scanner import scan_plain_spaces
```



---
## scan_tag_handle
```python
from scanner import scan_tag_handle
```



---
## scan_tag_uri
```python
from scanner import scan_tag_uri
```



---
## scan_uri_escapes
```python
from scanner import scan_uri_escapes
```

The roundtripscanner doesn't do URI escaping

---
## scan_line_break
```python
from scanner import scan_line_break
```



---
## Mark
```python
from error import Mark
```



---
## YAMLError
```python
from error import YAMLError
```



---
## MarkedYAMLError
```python
from error import MarkedYAMLError
```



---
## get_snippet
```python
from error import get_snippet
```



---
## __name__
```python
from constructor import __name__
```



---
## ConstructorError
```python
from constructor import ConstructorError
```



---
## BaseConstructor
```python
from constructor import BaseConstructor
```



---
## SafeConstructor
```python
from constructor import SafeConstructor
```



---
## FullConstructor
```python
from constructor import FullConstructor
```



---
## UnsafeConstructor
```python
from constructor import UnsafeConstructor
```



---
## Constructor
```python
from constructor import Constructor
```



---
## __init__
```python
from constructor import __init__
```



---
## check_data
```python
from constructor import check_data
```



---
## check_state_key
```python
from constructor import check_state_key
```

Block special attributes/methods from being set in a newly created
object, to prevent user-controlled methods from being called during
deserialization

---
## get_data
```python
from constructor import get_data
```



---
## get_single_data
```python
from constructor import get_single_data
```



---
## construct_document
```python
from constructor import construct_document
```



---
## construct_object
```python
from constructor import construct_object
```

deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction

---
## construct_scalar
```python
from constructor import construct_scalar
```



---
## construct_sequence
```python
from constructor import construct_sequence
```

deep is True when creating an object/mapping recursively,
in that case want the underlying elements available during construction

---
## construct_mapping
```python
from constructor import construct_mapping
```



---
## construct_pairs
```python
from constructor import construct_pairs
```



---
## add_constructor
```python
from constructor import add_constructor
```



---
## add_multi_constructor
```python
from constructor import add_multi_constructor
```



---
## flatten_mapping
```python
from constructor import flatten_mapping
```

This implements the merge key feature http://yaml.org/type/merge.html
by inserting keys from the merge dict/list of dicts if not yet
available in this node

---
## construct_yaml_null
```python
from constructor import construct_yaml_null
```



---
## construct_yaml_bool
```python
from constructor import construct_yaml_bool
```



---
## construct_yaml_int
```python
from constructor import construct_yaml_int
```



---
## construct_yaml_float
```python
from constructor import construct_yaml_float
```



---
## construct_yaml_binary
```python
from constructor import construct_yaml_binary
```



---
## construct_yaml_timestamp
```python
from constructor import construct_yaml_timestamp
```



---
## construct_yaml_omap
```python
from constructor import construct_yaml_omap
```



---
## construct_yaml_pairs
```python
from constructor import construct_yaml_pairs
```



---
## construct_yaml_set
```python
from constructor import construct_yaml_set
```



---
## construct_yaml_str
```python
from constructor import construct_yaml_str
```



---
## construct_yaml_seq
```python
from constructor import construct_yaml_seq
```



---
## construct_yaml_map
```python
from constructor import construct_yaml_map
```



---
## construct_yaml_object
```python
from constructor import construct_yaml_object
```



---
## construct_undefined
```python
from constructor import construct_undefined
```



---
## get_state_keys_blacklist
```python
from constructor import get_state_keys_blacklist
```



---
## get_state_keys_blacklist_regexp
```python
from constructor import get_state_keys_blacklist_regexp
```



---
## construct_python_str
```python
from constructor import construct_python_str
```



---
## construct_python_unicode
```python
from constructor import construct_python_unicode
```



---
## construct_python_bytes
```python
from constructor import construct_python_bytes
```



---
## construct_python_long
```python
from constructor import construct_python_long
```



---
## construct_python_complex
```python
from constructor import construct_python_complex
```



---
## construct_python_tuple
```python
from constructor import construct_python_tuple
```



---
## find_python_module
```python
from constructor import find_python_module
```



---
## find_python_name
```python
from constructor import find_python_name
```



---
## construct_python_name
```python
from constructor import construct_python_name
```



---
## construct_python_module
```python
from constructor import construct_python_module
```



---
## make_python_instance
```python
from constructor import make_python_instance
```



---
## set_python_instance_state
```python
from constructor import set_python_instance_state
```



---
## construct_python_object
```python
from constructor import construct_python_object
```



---
## construct_python_object_apply
```python
from constructor import construct_python_object_apply
```



---
## construct_python_object_new
```python
from constructor import construct_python_object_new
```



---
## __name__
```python
from composer import __name__
```



---
## ComposerError
```python
from composer import ComposerError
```



---
## Composer
```python
from composer import Composer
```



---
## __init__
```python
from composer import __init__
```



---
## check_node
```python
from composer import check_node
```



---
## get_node
```python
from composer import get_node
```



---
## get_single_node
```python
from composer import get_single_node
```



---
## compose_document
```python
from composer import compose_document
```



---
## compose_node
```python
from composer import compose_node
```



---
## compose_scalar_node
```python
from composer import compose_scalar_node
```



---
## compose_sequence_node
```python
from composer import compose_sequence_node
```



---
## compose_mapping_node
```python
from composer import compose_mapping_node
```



---
## Event
```python
from events import Event
```



---
## NodeEvent
```python
from events import NodeEvent
```



---
## CollectionStartEvent
```python
from events import CollectionStartEvent
```



---
## CollectionEndEvent
```python
from events import CollectionEndEvent
```



---
## StreamStartEvent
```python
from events import StreamStartEvent
```



---
## StreamEndEvent
```python
from events import StreamEndEvent
```



---
## DocumentStartEvent
```python
from events import DocumentStartEvent
```



---
## DocumentEndEvent
```python
from events import DocumentEndEvent
```



---
## AliasEvent
```python
from events import AliasEvent
```



---
## ScalarEvent
```python
from events import ScalarEvent
```



---
## SequenceStartEvent
```python
from events import SequenceStartEvent
```



---
## SequenceEndEvent
```python
from events import SequenceEndEvent
```



---
## MappingStartEvent
```python
from events import MappingStartEvent
```



---
## MappingEndEvent
```python
from events import MappingEndEvent
```



---
## __repr__
```python
from events import __repr__
```



---
## warnings
```python
from __init__ import warnings
```



---
## scan
```python
from __init__ import scan
```

Scan `search_path` for distributions usable in this environment

Any distributions found are added to the environment.
`search_path` should be a sequence of ``sys.path`` items.  If not
supplied, ``sys.path`` is used.  Only distributions conforming to
the platform/python version defined at initialization are added.

---
## parse
```python
from __init__ import parse
```



---
## compose
```python
from __init__ import compose
```

Compose any number of unary functions into a single unary function.

Comparable to
`function composition <https://en.wikipedia.org/wiki/Function_composition>`_
in mathematics:

``h = g ∘ f`` implies ``h(x) = g(f(x))``.

In Python, ``h = compose(g, f)``.

>>> import textwrap
>>> expected = str.strip(textwrap.dedent(compose.__doc__))
>>> strip_and_dedent = compose(str.strip, textwrap.dedent)
>>> strip_and_dedent(compose.__doc__) == expected
True

Compose also allows the innermost function to take arbitrary arguments.

>>> round_three = lambda x: round(x, ndigits=3)
>>> f = compose(round_three, int.__truediv__)
>>> [f(3*x, x+1) for x in range(1,10)]
[1.5, 2.0, 2.25, 2.4, 2.5, 2.571, 2.625, 2.667, 2.7]

---
## compose_all
```python
from __init__ import compose_all
```

Parse all YAML documents in a stream
and produce corresponding representation trees.

---
## load_all
```python
from __init__ import load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.

---
## full_load
```python
from __init__ import full_load
```

Parse the first YAML document in a stream
and produce the corresponding Python object.

Resolve all tags except those known to be
unsafe on untrusted input.

---
## full_load_all
```python
from __init__ import full_load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.

Resolve all tags except those known to be
unsafe on untrusted input.

---
## safe_load
```python
from __init__ import safe_load
```

Parse the first YAML document in a stream
and produce the corresponding Python object.

Resolve only basic YAML tags. This is known
to be safe for untrusted input.

---
## safe_load_all
```python
from __init__ import safe_load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.

Resolve only basic YAML tags. This is known
to be safe for untrusted input.

---
## unsafe_load
```python
from __init__ import unsafe_load
```

Parse the first YAML document in a stream
and produce the corresponding Python object.

Resolve all tags, even those known to be
unsafe on untrusted input.

---
## unsafe_load_all
```python
from __init__ import unsafe_load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.

Resolve all tags, even those known to be
unsafe on untrusted input.

---
## emit
```python
from __init__ import emit
```



---
## serialize_all
```python
from __init__ import serialize_all
```

Serialize a sequence of representation trees into a YAML stream.
If stream is None, return the produced string instead.

---
## serialize
```python
from __init__ import serialize
```



---
## dump_all
```python
from __init__ import dump_all
```

Serialize a sequence of Python objects into a YAML stream.
If stream is None, return the produced string instead.

---
## dump
```python
from __init__ import dump
```



---
## safe_dump_all
```python
from __init__ import safe_dump_all
```

Serialize a sequence of Python objects into a YAML stream.
Produce only basic YAML tags.
If stream is None, return the produced string instead.

---
## safe_dump
```python
from __init__ import safe_dump
```

Serialize a Python object into a YAML stream.
Produce only basic YAML tags.
If stream is None, return the produced string instead.

---
## add_implicit_resolver
```python
from __init__ import add_implicit_resolver
```

Add an implicit scalar detector.
If an implicit scalar value matches the given regexp,
the corresponding tag is assigned to the scalar.
first is a sequence of possible initial characters or None.

---
## add_path_resolver
```python
from __init__ import add_path_resolver
```

Add a path based resolver for the given tag.
A path is a list of keys that forms a path
to a node in the representation tree.
Keys can be string values, integers, or None.

---
## add_constructor
```python
from __init__ import add_constructor
```

Add a constructor for the given tag.
Constructor is a function that accepts a Loader instance
and a node object and produces the corresponding Python object.

---
## add_multi_constructor
```python
from __init__ import add_multi_constructor
```

Add a multi-constructor for the given tag prefix.
Multi-constructor is called for a node if its tag starts with tag_prefix.
Multi-constructor accepts a Loader instance, a tag suffix,
and a node object and produces the corresponding Python object.

---
## add_representer
```python
from __init__ import add_representer
```

Add a representer for the given type.
Representer is a function accepting a Dumper instance
and an instance of the given data type
and producing the corresponding representation node.

---
## add_multi_representer
```python
from __init__ import add_multi_representer
```

Add a representer for the given type.
Multi-representer is a function accepting a Dumper instance
and an instance of the given data type or subtype
and producing the corresponding representation node.

---
## YAMLObjectMetaclass
```python
from __init__ import YAMLObjectMetaclass
```

The metaclass for YAMLObject.

---
## YAMLObject
```python
from __init__ import YAMLObject
```

An object that can dump itself to a YAML stream
and load itself from a YAML stream.

---
## from_yaml
```python
from __init__ import from_yaml
```

Convert a representation node to a Python object.

---
## to_yaml
```python
from __init__ import to_yaml
```

Convert a Python object to a representation node.

---
## __name__
```python
from representer import __name__
```



---
## RepresenterError
```python
from representer import RepresenterError
```



---
## BaseRepresenter
```python
from representer import BaseRepresenter
```



---
## SafeRepresenter
```python
from representer import SafeRepresenter
```



---
## Representer
```python
from representer import Representer
```



---
## __init__
```python
from representer import __init__
```



---
## represent
```python
from representer import represent
```



---
## represent_data
```python
from representer import represent_data
```



---
## add_representer
```python
from representer import add_representer
```



---
## add_multi_representer
```python
from representer import add_multi_representer
```



---
## represent_scalar
```python
from representer import represent_scalar
```



---
## represent_sequence
```python
from representer import represent_sequence
```



---
## represent_mapping
```python
from representer import represent_mapping
```



---
## ignore_aliases
```python
from representer import ignore_aliases
```



---
## represent_none
```python
from representer import represent_none
```



---
## represent_str
```python
from representer import represent_str
```



---
## represent_binary
```python
from representer import represent_binary
```



---
## represent_bool
```python
from representer import represent_bool
```



---
## represent_int
```python
from representer import represent_int
```



---
## represent_float
```python
from representer import represent_float
```



---
## represent_list
```python
from representer import represent_list
```



---
## represent_dict
```python
from representer import represent_dict
```

write out tag if saved on loading

---
## represent_set
```python
from representer import represent_set
```



---
## represent_date
```python
from representer import represent_date
```



---
## represent_datetime
```python
from representer import represent_datetime
```



---
## represent_yaml_object
```python
from representer import represent_yaml_object
```



---
## represent_undefined
```python
from representer import represent_undefined
```



---
## represent_complex
```python
from representer import represent_complex
```



---
## represent_tuple
```python
from representer import represent_tuple
```



---
## represent_name
```python
from representer import represent_name
```



---
## represent_module
```python
from representer import represent_module
```



---
## represent_object
```python
from representer import represent_object
```



---
## represent_ordered_dict
```python
from representer import represent_ordered_dict
```



---
## __name__
```python
from tokens import __name__
```



---
## Token
```python
from tokens import Token
```



---
## DirectiveToken
```python
from tokens import DirectiveToken
```



---
## DocumentStartToken
```python
from tokens import DocumentStartToken
```



---
## DocumentEndToken
```python
from tokens import DocumentEndToken
```



---
## StreamStartToken
```python
from tokens import StreamStartToken
```



---
## StreamEndToken
```python
from tokens import StreamEndToken
```



---
## BlockSequenceStartToken
```python
from tokens import BlockSequenceStartToken
```



---
## BlockMappingStartToken
```python
from tokens import BlockMappingStartToken
```



---
## BlockEndToken
```python
from tokens import BlockEndToken
```



---
## FlowSequenceStartToken
```python
from tokens import FlowSequenceStartToken
```



---
## FlowMappingStartToken
```python
from tokens import FlowMappingStartToken
```



---
## FlowSequenceEndToken
```python
from tokens import FlowSequenceEndToken
```



---
## FlowMappingEndToken
```python
from tokens import FlowMappingEndToken
```



---
## KeyToken
```python
from tokens import KeyToken
```



---
## ValueToken
```python
from tokens import ValueToken
```



---
## BlockEntryToken
```python
from tokens import BlockEntryToken
```



---
## FlowEntryToken
```python
from tokens import FlowEntryToken
```



---
## AliasToken
```python
from tokens import AliasToken
```



---
## AnchorToken
```python
from tokens import AnchorToken
```



---
## TagToken
```python
from tokens import TagToken
```



---
## ScalarToken
```python
from tokens import ScalarToken
```



---
## __init__
```python
from tokens import __init__
```



---
## __repr__
```python
from tokens import __repr__
```



---
## __name__
```python
from dumper import __name__
```



---
## BaseDumper
```python
from dumper import BaseDumper
```



---
## SafeDumper
```python
from dumper import SafeDumper
```



---
## Dumper
```python
from dumper import Dumper
```



---
## __init__
```python
from dumper import __init__
```



---
## __name__
```python
from cyaml import __name__
```



---
## CBaseLoader
```python
from cyaml import CBaseLoader
```



---
## CSafeLoader
```python
from cyaml import CSafeLoader
```



---
## CFullLoader
```python
from cyaml import CFullLoader
```



---
## CUnsafeLoader
```python
from cyaml import CUnsafeLoader
```



---
## CLoader
```python
from cyaml import CLoader
```



---
## CBaseDumper
```python
from cyaml import CBaseDumper
```



---
## CSafeDumper
```python
from cyaml import CSafeDumper
```



---
## CDumper
```python
from cyaml import CDumper
```



---
## __init__
```python
from cyaml import __init__
```



---
## ParserError
```python
from parser import ParserError
```



---
## dispose
```python
from parser import dispose
```



---
## check_event
```python
from parser import check_event
```



---
## peek_event
```python
from parser import peek_event
```



---
## get_event
```python
from parser import get_event
```



---
## parse_stream_start
```python
from parser import parse_stream_start
```



---
## parse_implicit_document_start
```python
from parser import parse_implicit_document_start
```



---
## parse_document_start
```python
from parser import parse_document_start
```



---
## parse_document_end
```python
from parser import parse_document_end
```



---
## parse_document_content
```python
from parser import parse_document_content
```



---
## process_directives
```python
from parser import process_directives
```



---
## parse_block_node
```python
from parser import parse_block_node
```



---
## parse_flow_node
```python
from parser import parse_flow_node
```



---
## parse_block_node_or_indentless_sequence
```python
from parser import parse_block_node_or_indentless_sequence
```



---
## parse_node
```python
from parser import parse_node
```



---
## parse_block_sequence_first_entry
```python
from parser import parse_block_sequence_first_entry
```



---
## parse_block_sequence_entry
```python
from parser import parse_block_sequence_entry
```



---
## parse_indentless_sequence_entry
```python
from parser import parse_indentless_sequence_entry
```



---
## parse_block_mapping_first_key
```python
from parser import parse_block_mapping_first_key
```



---
## parse_block_mapping_key
```python
from parser import parse_block_mapping_key
```



---
## parse_block_mapping_value
```python
from parser import parse_block_mapping_value
```



---
## parse_flow_sequence_first_entry
```python
from parser import parse_flow_sequence_first_entry
```



---
## parse_flow_sequence_entry
```python
from parser import parse_flow_sequence_entry
```



---
## parse_flow_sequence_entry_mapping_key
```python
from parser import parse_flow_sequence_entry_mapping_key
```



---
## parse_flow_sequence_entry_mapping_value
```python
from parser import parse_flow_sequence_entry_mapping_value
```



---
## parse_flow_sequence_entry_mapping_end
```python
from parser import parse_flow_sequence_entry_mapping_end
```



---
## parse_flow_mapping_first_key
```python
from parser import parse_flow_mapping_first_key
```



---
## parse_flow_mapping_key
```python
from parser import parse_flow_mapping_key
```



---
## parse_flow_mapping_value
```python
from parser import parse_flow_mapping_value
```



---
## parse_flow_mapping_empty_value
```python
from parser import parse_flow_mapping_empty_value
```



---
## process_empty_scalar
```python
from parser import process_empty_scalar
```



---
## __name__
```python
from reader import __name__
```



---
## ReaderError
```python
from reader import ReaderError
```



---
## Reader
```python
from reader import Reader
```



---
## __init__
```python
from reader import __init__
```



---
## __str__
```python
from reader import __str__
```



---
## peek
```python
from reader import peek
```



---
## prefix
```python
from reader import prefix
```



---
## forward
```python
from reader import forward
```



---
## get_mark
```python
from reader import get_mark
```



---
## determine_encoding
```python
from reader import determine_encoding
```



---
## check_printable
```python
from reader import check_printable
```



---
## update
```python
from reader import update
```



---
## update_raw
```python
from reader import update_raw
```



---
## __name__
```python
from loader import __name__
```



---
## BaseLoader
```python
from loader import BaseLoader
```



---
## FullLoader
```python
from loader import FullLoader
```



---
## SafeLoader
```python
from loader import SafeLoader
```



---
## Loader
```python
from loader import Loader
```



---
## UnsafeLoader
```python
from loader import UnsafeLoader
```



---
## __init__
```python
from loader import __init__
```



---
## ResolverError
```python
from resolver import ResolverError
```



---
## BaseResolver
```python
from resolver import BaseResolver
```



---
## Resolver
```python
from resolver import Resolver
```



---
## add_implicit_resolver
```python
from resolver import add_implicit_resolver
```



---
## add_path_resolver
```python
from resolver import add_path_resolver
```



---
## descend_resolver
```python
from resolver import descend_resolver
```



---
## ascend_resolver
```python
from resolver import ascend_resolver
```



---
## check_resolver_prefix
```python
from resolver import check_resolver_prefix
```



---
## resolve
```python
from resolver import resolve
```



---
## __name__
```python
from serializer import __name__
```



---
## SerializerError
```python
from serializer import SerializerError
```



---
## Serializer
```python
from serializer import Serializer
```



---
## __init__
```python
from serializer import __init__
```



---
## open
```python
from serializer import open
```



---
## close
```python
from serializer import close
```



---
## serialize
```python
from serializer import serialize
```



---
## anchor_node
```python
from serializer import anchor_node
```



---
## generate_anchor
```python
from serializer import generate_anchor
```



---
## serialize_node
```python
from serializer import serialize_node
```



---
## ScalarNode
```python
from nodes import ScalarNode
```

styles:
? -> set() ? key, no value
- -> suppressable null value in set
" -> double quoted
' -> single quoted
| -> literal style
> -> folding style

---
## CollectionNode
```python
from nodes import CollectionNode
```



---
## SequenceNode
```python
from nodes import SequenceNode
```



---
## MappingNode
```python
from nodes import MappingNode
```



---
## __name__
```python
from emitter import __name__
```



---
## EmitterError
```python
from emitter import EmitterError
```



---
## ScalarAnalysis
```python
from emitter import ScalarAnalysis
```



---
## Emitter
```python
from emitter import Emitter
```



---
## __init__
```python
from emitter import __init__
```



---
## dispose
```python
from emitter import dispose
```



---
## emit
```python
from emitter import emit
```



---
## need_more_events
```python
from emitter import need_more_events
```



---
## need_events
```python
from emitter import need_events
```



---
## increase_indent
```python
from emitter import increase_indent
```



---
## expect_stream_start
```python
from emitter import expect_stream_start
```



---
## expect_nothing
```python
from emitter import expect_nothing
```



---
## expect_first_document_start
```python
from emitter import expect_first_document_start
```



---
## expect_document_start
```python
from emitter import expect_document_start
```



---
## expect_document_end
```python
from emitter import expect_document_end
```



---
## expect_document_root
```python
from emitter import expect_document_root
```



---
## expect_node
```python
from emitter import expect_node
```



---
## expect_alias
```python
from emitter import expect_alias
```



---
## expect_scalar
```python
from emitter import expect_scalar
```



---
## expect_flow_sequence
```python
from emitter import expect_flow_sequence
```



---
## expect_first_flow_sequence_item
```python
from emitter import expect_first_flow_sequence_item
```



---
## expect_flow_sequence_item
```python
from emitter import expect_flow_sequence_item
```



---
## expect_flow_mapping
```python
from emitter import expect_flow_mapping
```



---
## expect_first_flow_mapping_key
```python
from emitter import expect_first_flow_mapping_key
```



---
## expect_flow_mapping_key
```python
from emitter import expect_flow_mapping_key
```



---
## expect_flow_mapping_simple_value
```python
from emitter import expect_flow_mapping_simple_value
```



---
## expect_flow_mapping_value
```python
from emitter import expect_flow_mapping_value
```



---
## expect_block_sequence
```python
from emitter import expect_block_sequence
```



---
## expect_first_block_sequence_item
```python
from emitter import expect_first_block_sequence_item
```



---
## expect_block_sequence_item
```python
from emitter import expect_block_sequence_item
```



---
## expect_block_mapping
```python
from emitter import expect_block_mapping
```



---
## expect_first_block_mapping_key
```python
from emitter import expect_first_block_mapping_key
```



---
## expect_block_mapping_key
```python
from emitter import expect_block_mapping_key
```



---
## expect_block_mapping_simple_value
```python
from emitter import expect_block_mapping_simple_value
```



---
## expect_block_mapping_value
```python
from emitter import expect_block_mapping_value
```



---
## check_empty_sequence
```python
from emitter import check_empty_sequence
```



---
## check_empty_mapping
```python
from emitter import check_empty_mapping
```



---
## check_empty_document
```python
from emitter import check_empty_document
```



---
## check_simple_key
```python
from emitter import check_simple_key
```



---
## process_anchor
```python
from emitter import process_anchor
```



---
## process_tag
```python
from emitter import process_tag
```



---
## choose_scalar_style
```python
from emitter import choose_scalar_style
```



---
## process_scalar
```python
from emitter import process_scalar
```



---
## prepare_version
```python
from emitter import prepare_version
```



---
## prepare_tag_handle
```python
from emitter import prepare_tag_handle
```



---
## prepare_tag_prefix
```python
from emitter import prepare_tag_prefix
```



---
## prepare_tag
```python
from emitter import prepare_tag
```



---
## prepare_anchor
```python
from emitter import prepare_anchor
```



---
## analyze_scalar
```python
from emitter import analyze_scalar
```



---
## flush_stream
```python
from emitter import flush_stream
```



---
## write_stream_start
```python
from emitter import write_stream_start
```



---
## write_stream_end
```python
from emitter import write_stream_end
```



---
## write_indicator
```python
from emitter import write_indicator
```



---
## write_indent
```python
from emitter import write_indent
```



---
## write_line_break
```python
from emitter import write_line_break
```



---
## write_version_directive
```python
from emitter import write_version_directive
```



---
## write_tag_directive
```python
from emitter import write_tag_directive
```



---
## write_single_quoted
```python
from emitter import write_single_quoted
```



---
## write_double_quoted
```python
from emitter import write_double_quoted
```



---
## determine_block_hints
```python
from emitter import determine_block_hints
```



---
## write_folded
```python
from emitter import write_folded
```



---
## write_literal
```python
from emitter import write_literal
```



---
## write_plain
```python
from emitter import write_plain
```



---
## __name__
```python
from compress_pickle import __name__
```

A thin wrapper of standard ``pickle`` with standard compression libraries

---
## dump
```python
from compress_pickle import dump
```

Serialize an object and write it to a file-like object.

It is possible to specify a desired serialization method and a compression protocol to use.
For example, if ``gzip`` compression is specified, the object is serialized using the standard
:func:`pickle.dump` and compressed using gzip.

Behind the scenes, this function only instantiates
:class:`~compress_pickle.compressers.base.BaseCompresser` and
:class:`~compress_pickle.picklers.base.BasePicklerIO` instances depending on the supplied
names, and then calls :func:`~compress_pickle.io.base.compress_and_pickle` with them.

Parameters
----------
obj : Any
    The object that will be serialized
path : Union[PathType, FileType]
    A path-like object (``str``, ``bytes``, ``os.PathType``) or a file-like object
    (``io.BaseIO`` instances). The path to which to dump the ``obj``.
compression : Optional[str]
    The compression protocol to use. By default, the compression is inferred from the path's
    extension. This compression name passed to
    :func:`~compress_pickle.compressers.registry.get_compresser` to create a
    :class:`~compress_pickle.compressers.base.BaseCompresser` instance. This instance will be
    used to create a file-like object onto which to write the serialized binary representation
    of ``obj``.
    To see available compression protocols refer to
    :func:`~compress_pickle.compressers.registry.get_known_compressions`.
pickler_method : str
    The name of the serialization method to use. This method name is passed to
    :func:`~compress_pickle.picklers.registry.get_pickler` to create a
    :class:`~compress_pickle.picklers.base.BasePicklerIO` instance. The default method is
    ``"pickle"``, which means that a :class:`~compress_pickle.picklers.pickle.BuiltinPicklerIO`
    will be created by default, and its
    :meth:`~compress_pickle.picklers.pickle.BuiltinPicklerIO.dump` will be used for
    serializing the ``obj``.
    Refer to :func:`~compress_pickle.picklers.registry.get_known_picklers` to see the available
    serialization methods.
pickler_kwargs : Optional[Dict[str, Any]]
    An optional dictionary of keyword arguments to pass to
    :meth:`~compress_pickle.picklers.base.BasePicklerIO.dump` when ``obj`` is serialized. For
    example, this could be ``{"protocol": -1, "fix_imports": True}`` when the default
    ``"pickle"`` serialization method is used.
mode : Optional[str]
    Mode with which to open the file buffer. The default changes according to the compression
    protocol. Refer to :func:`~compress_pickle.compressers.registry.get_compression_write_mode`
    to see the defaults.
set_default_extension : bool
    If ``True``, the default extension given the provided compression protocol is set to the
    supplied ``path``. Refer to
    :func:`~compress_pickle.compressers.registry.get_default_compression_mapping` for the
    default extension registered to each compression method.
kwargs :
    Any extra keyword arguments are passed to
    :func:`compress_pickle.utils.instantiate_compresser`, which in turn creates the
    compresser instance that will be used.

Notes
-----
If the supplied ``path`` is a file-like object, ``dump`` does not close it before exiting.
The users must handle the closing on their own. If the supplied ``path`` is a path-like object,
``dump`` opens and then closes the file after the writting process finishes.

---
## dumps
```python
from compress_pickle import dumps
```

Serialize an object and return its binary representation.

It is possible to specify a desired serialization method and a compression protocol to use.
For example, if ``gzip`` compression is specified, the serialized object is compressed using
gzip.

Behind the scenes, this function only instantiates
:class:`~compress_pickle.compressers.base.BaseCompresser` around a ``io.BinaryIO`` and
:class:`~compress_pickle.picklers.base.BasePicklerIO` instances depending on the supplied
names, and then calls :func:`~compress_pickle.io.base.compress_and_pickle` with them. The
contents of the ``io.BinaryIO`` are then returned.

Parameters
----------
obj : Any
    The object that will be serialized.
compression : Optional[str]
    The compression protocol to use. By default, the compression is inferred from the path's
    extension. This compression name passed to
    :func:`~compress_pickle.compressers.registry.get_compresser` to create a
    :class:`~compress_pickle.compressers.base.BaseCompresser` instance. This instance will be
    used to create a file-like object onto which to write the serialized binary representation
    of ``obj``.
    To see available compression protocols refer to
    :func:`~compress_pickle.compressers.registry.get_known_compressions`.
pickler_method : str
    The name of the serialization method to use. This method name is passed to
    :func:`~compress_pickle.picklers.registry.get_pickler` to create a
    :class:`~compress_pickle.picklers.base.BasePicklerIO` instance. The default method is
    ``"pickle"``, which means that a :class:`~compress_pickle.picklers.pickle.BuiltinPicklerIO`
    will be created by default, and its
    :meth:`~compress_pickle.picklers.pickle.BuiltinPicklerIO.dump` will be used for
    serializing the ``obj``.
    Refer to :func:`~compress_pickle.picklers.registry.get_known_picklers` to see the available
    serialization methods.
pickler_kwargs : Optional[Dict[str, Any]]
    An optional dictionary of keyword arguments to pass to
    :meth:`~compress_pickle.picklers.base.BasePicklerIO.dump` when ``obj`` is serialized. For
    example, this could be ``{"protocol": -1, "fix_imports": True}`` when the default
    ``"pickle"`` serialization method is used.

Returns
-------
bytes
    The resulting bytes of the serialized ``obj`` after being compressed.

Notes
-----
The ``compression`` argument is mandatory because it cannot be inferred.

---
## load
```python
from compress_pickle import load
```

Load an object from its serialized binary representation stored in a file-like object.

It is possible to specify a desired serialization method and a compression protocol to use.
For example, if ``gzip`` compression is specified, the contents of the supplied file-like
object are uncompressed using gzip and then loaded using standard :func:`pickle.load`.

Behind the scenes, this function only instantiates
:class:`~compress_pickle.compressers.base.BaseCompresser` and
:class:`~compress_pickle.picklers.base.BasePicklerIO` instances depending on the supplied
names, and then calls :func:`~compress_pickle.io.base.uncompress_and_unpickle` with them.

Parameters
----------
path : Union[PathType, FileType]
    A path-like object (``str``, ``bytes``, ``os.PathType``) or a file-like object
    (``io.BaseIO`` instances). The path to which to dump the ``obj``.
compression : Optional[str]
    The compression protocol to use. By default, the compression is inferred from the path's
    extension. This compression name passed to
    :func:`~compress_pickle.compressers.registry.get_compresser` to create a
    :class:`~compress_pickle.compressers.base.BaseCompresser` instance. This instance will be
    used to open a file-like object from which to read the serialized binary representation
    of ``obj``.
    To see available compression protocols refer to
    :func:`~compress_pickle.compressers.registry.get_known_compressions`.
pickler_method : str
    The name of the serialization method to use. This method name is passed to
    :func:`~compress_pickle.picklers.registry.get_pickler` to create a
    :class:`~compress_pickle.picklers.base.BasePicklerIO` instance. The default method is
    ``"pickle"``, which means that a :class:`~compress_pickle.picklers.pickle.BuiltinPicklerIO`
    will be created by default, and its
    :meth:`~compress_pickle.picklers.pickle.BuiltinPicklerIO.load` will be used for
    unserializing the ``obj``.
    Refer to :func:`~compress_pickle.picklers.registry.get_known_picklers` to see the available
    serialization methods.
pickler_kwargs : Optional[Dict[str, Any]]
    An optional dictionary of keyword arguments to pass to
    :meth:`~compress_pickle.picklers.base.BasePicklerIO.load` when the ``obj`` is loaded. For
    example, this could be ``{"fix_imports": True}`` when the default ``"pickle"``
    serialization method is used.
mode : Optional[str]
    Mode with which to open the file buffer. The default changes according to the compression
    protocol. Refer to :func:`~compress_pickle.compressers.registry.get_compression_read_mode`
    to see the defaults.
set_default_extension : bool
    If ``True``, the default extension given the provided compression protocol is set to the
    supplied ``path``. Refer to
    :func:`~compress_pickle.compressers.registry.get_default_compression_mapping` for the
    default extension registered to each compression method.
kwargs :
    Any extra keyword arguments are passed to
    :func:`compress_pickle.utils.instantiate_compresser`, which in turn creates the
    compresser instance that will be used.

Returns
-------
obj : Any
    The object that is loaded from its compressed binary representation.

Notes
-----
If the supplied ``path`` is a file-like object, ``load`` does not close it before exiting.
The users must handle the closing on their own. If the supplied ``path`` is a path-like object,
``load`` opens and then closes the file after the writting process finishes.

---
## loads
```python
from compress_pickle import loads
```

Load an object from its serialized binary representation.

It is possible to specify a desired serialization method and a compression protocol to use.
For example, if ``gzip`` compression is specified, the supplied binary data is uncompressed with
gzip and then loaded using standard :func:`pickle.load`.

Behind the scenes, this function only instantiates
:class:`~compress_pickle.compressers.base.BaseCompresser` around a ``io.BinaryIO(data)`` stream
and :class:`~compress_pickle.picklers.base.BasePicklerIO` instances depending on the supplied
names, and then calls :func:`~compress_pickle.io.base.uncompress_and_unpickle` with them.

Parameters
----------
data : bytes
    The bytes that contain the compressed serialized binary representation of the object that
    must be loaded.
compression : Optional[str]
    The compression protocol to use. By default, the compression is inferred from the path's
    extension. This compression name passed to
    :func:`~compress_pickle.compressers.registry.get_compresser` to create a
    :class:`~compress_pickle.compressers.base.BaseCompresser` instance. This instance will be
    used to open a file-like object from which to read the serialized binary representation
    of ``obj``.
    To see available compression protocols refer to
    :func:`~compress_pickle.compressers.registry.get_known_compressions`.
pickler_method : str
    The name of the serialization method to use. This method name is passed to
    :func:`~compress_pickle.picklers.registry.get_pickler` to create a
    :class:`~compress_pickle.picklers.base.BasePicklerIO` instance. The default method is
    ``"pickle"``, which means that a :class:`~compress_pickle.picklers.pickle.BuiltinPicklerIO`
    will be created by default, and its
    :meth:`~compress_pickle.picklers.pickle.BuiltinPicklerIO.load` will be used for
    unserializing the ``obj``.
    Refer to :func:`~compress_pickle.picklers.registry.get_known_picklers` to see the available
    serialization methods.
pickler_kwargs : Optional[Dict[str, Any]]
    An optional dictionary of keyword arguments to pass to
    :meth:`~compress_pickle.picklers.base.BasePicklerIO.load` when the ``obj`` is loaded. For
    example, this could be ``{"fix_imports": True}`` when the default ``"pickle"``
    serialization method is used.
kwargs :
    Any extra keyword arguments are passed to
    :func:`compress_pickle.utils.instantiate_compresser`, which in turn creates the
    compresser instance that will be used.

Returns
-------
obj : Any
    The object that is loaded from its compressed binary representation.

Notes
-----
The ``compression`` argument is mandatory because it cannot be inferred.

---
## _stringyfy_path
```python
from utils import _stringyfy_path
```

Convert a path that is a PATH_TYPES instance to a string.

Parameters
----------
path : PathType
    If ``path`` is a ``string`` instance, it is returned as is.
    If ``path`` is a ``bytes`` instance, it is decoded with utf8 codec.
    If it is ``os.PathLike`` or ``pathlib.PurePath`` then it is converted
    to a string with ``str(path)``.

Returns
-------
path_string : str
    The string representation of the ``path``.

Raises
------
TypeError
    If the supplied ``path`` is not a ``PATH_TYPES`` instance.

---
## instantiate_compresser
```python
from utils import instantiate_compresser
```

Initialize the compresser instance for the supplied path and compression.

Initiate a :class:`compress_pickle.compressers.base.BaseCompresser` instance based on the
supplied (or inferred) ``compression`` method. This instance will open a file like object
with supplied ``mode``, using the provided ``path``. Furthermore, when the ``path`` is not
a binary stream, this function can also potentially set the path's extension to the default
extension registered to the used compression method.

Parameters
----------
compression : Optional[str]
    The compression method name. Refer to
    :func:`~compress_pickle.compressers.registry.get_known_compressions` for a list of the
    known compression methods. If ``"infer"``, the compression method is inferred from the
    ``path`` extension. This can be done if ``path`` is a ``PathType`` instance, or if
    ``path`` has a ``name`` attribute that is not ``None``. Refer to
    :func:`~compress_pickle.compressers.registry.get_registered_extensions` for the mapping
    between extensions and compression methods.
path : Union[PathType, FileType]
    A path-like object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (``io.BaseIO`` instances) that will be passed to the
    :class:`compress_pickle.compressers.base.BaseCompresser` class.
mode : str
    Mode with which to open the file-like stream. Only used if the ``path`` is a
    ``PathType``. If "read", the default read mode is automatically assigned by
    :func:`~compress_pickle.compressers.registry.get_compression_read_mode` based on the used
    compression method. If "write", the default write mode is automatically assigned from
    :func:`~compress_pickle.compressers.registry.get_compression_write_mode` based on the used
    compression method.
set_default_extension : bool
    If ``True``, the default extension given the provided compression protocol is set to the
    supplied ``path``. Refer to
    :func:`~compress_pickle.compressers.registry.get_default_compression_mapping` for the
    default extension registered to each compression method.
**kwargs
    Any extra keyword arguments are passed to the
    :class:`compress_pickle.compressers.base.BaseCompresser` initialization.

Returns
-------
BaseCompresser
    The compresser instance that will be used to create the byte stream from which a
    :class:`compress_pickle.picklers.base.BasePicklerIO` will read or write serialized objects.

Raises
------
TypeError
    If the supplied ``path`` is not a ``PATH_TYPES`` instance and the ``compression`` is "infer".

---
## _infer_compression_from_path
```python
from utils import _infer_compression_from_path
```



---
## _set_default_extension
```python
from utils import _set_default_extension
```



---
## __name__
```python
from _better_exceptions import __name__
```



---
## SyntaxHighlighter
```python
from _better_exceptions import SyntaxHighlighter
```



---
## ExceptionFormatter
```python
from _better_exceptions import ExceptionFormatter
```



---
## is_exception_group
```python
from _better_exceptions import is_exception_group
```



---
## __init__
```python
from _better_exceptions import __init__
```



---
## highlight
```python
from _better_exceptions import highlight
```



---
## tokenize
```python
from _better_exceptions import tokenize
```



---
## _get_lib_dirs
```python
from _better_exceptions import _get_lib_dirs
```



---
## _indent
```python
from _better_exceptions import _indent
```



---
## _get_char
```python
from _better_exceptions import _get_char
```



---
## _is_file_mine
```python
from _better_exceptions import _is_file_mine
```



---
## _extract_frames
```python
from _better_exceptions import _extract_frames
```



---
## _get_relevant_values
```python
from _better_exceptions import _get_relevant_values
```



---
## _format_relevant_values
```python
from _better_exceptions import _format_relevant_values
```



---
## _format_value
```python
from _better_exceptions import _format_value
```



---
## _format_locations
```python
from _better_exceptions import _format_locations
```



---
## _format_exception
```python
from _better_exceptions import _format_exception
```



---
## format_exception
```python
from _better_exceptions import format_exception
```



---
## is_valid
```python
from _better_exceptions import is_valid
```



---
## get_info
```python
from _better_exceptions import get_info
```



---
## __name__
```python
from _colorizer import __name__
```



---
## Style
```python
from _colorizer import Style
```



---
## Fore
```python
from _colorizer import Fore
```



---
## Back
```python
from _colorizer import Back
```



---
## ansi_escape
```python
from _colorizer import ansi_escape
```



---
## TokenType
```python
from _colorizer import TokenType
```



---
## AnsiParser
```python
from _colorizer import AnsiParser
```



---
## ColoringMessage
```python
from _colorizer import ColoringMessage
```



---
## ColoredMessage
```python
from _colorizer import ColoredMessage
```



---
## ColoredFormat
```python
from _colorizer import ColoredFormat
```



---
## Colorizer
```python
from _colorizer import Colorizer
```



---
## __init__
```python
from _colorizer import __init__
```



---
## strip
```python
from _colorizer import strip
```



---
## colorize
```python
from _colorizer import colorize
```



---
## wrap
```python
from _colorizer import wrap
```



---
## feed
```python
from _colorizer import feed
```



---
## done
```python
from _colorizer import done
```



---
## current_color_tokens
```python
from _colorizer import current_color_tokens
```



---
## _get_ansicode
```python
from _colorizer import _get_ansicode
```



---
## __format__
```python
from _colorizer import __format__
```



---
## make_coloring_message
```python
from _colorizer import make_coloring_message
```



---
## prepare_format
```python
from _colorizer import prepare_format
```



---
## prepare_message
```python
from _colorizer import prepare_message
```



---
## prepare_simple_message
```python
from _colorizer import prepare_simple_message
```



---
## ansify
```python
from _colorizer import ansify
```



---
## _parse_with_formatting
```python
from _colorizer import _parse_with_formatting
```



---
## _parse_without_formatting
```python
from _colorizer import _parse_without_formatting
```



---
## __name__
```python
from _handler import __name__
```



---
## prepare_colored_format
```python
from _handler import prepare_colored_format
```



---
## prepare_stripped_format
```python
from _handler import prepare_stripped_format
```



---
## memoize
```python
from _handler import memoize
```



---
## Message
```python
from _handler import Message
```



---
## Handler
```python
from _handler import Handler
```



---
## __init__
```python
from _handler import __init__
```



---
## __repr__
```python
from _handler import __repr__
```



---
## _protected_lock
```python
from _handler import _protected_lock
```

Acquire the lock, but fail fast if its already acquired by the current thread.

---
## emit
```python
from _handler import emit
```



---
## stop
```python
from _handler import stop
```



---
## complete_queue
```python
from _handler import complete_queue
```



---
## tasks_to_complete
```python
from _handler import tasks_to_complete
```



---
## update_format
```python
from _handler import update_format
```



---
## levelno
```python
from _handler import levelno
```



---
## _serialize_record
```python
from _handler import _serialize_record
```



---
## _queued_writer
```python
from _handler import _queued_writer
```



---
## __getstate__
```python
from _handler import __getstate__
```



---
## __setstate__
```python
from _handler import __setstate__
```



---
## __name__
```python
from _file_sink import __name__
```



---
## generate_rename_path
```python
from _file_sink import generate_rename_path
```



---
## FileDateFormatter
```python
from _file_sink import FileDateFormatter
```



---
## Compression
```python
from _file_sink import Compression
```



---
## Retention
```python
from _file_sink import Retention
```



---
## Rotation
```python
from _file_sink import Rotation
```



---
## FileSink
```python
from _file_sink import FileSink
```



---
## __init__
```python
from _file_sink import __init__
```



---
## __format__
```python
from _file_sink import __format__
```



---
## add_compress
```python
from _file_sink import add_compress
```



---
## write_compress
```python
from _file_sink import write_compress
```



---
## copy_compress
```python
from _file_sink import copy_compress
```



---
## compression
```python
from _file_sink import compression
```



---
## retention_count
```python
from _file_sink import retention_count
```



---
## retention_age
```python
from _file_sink import retention_age
```



---
## forward_day
```python
from _file_sink import forward_day
```



---
## forward_weekday
```python
from _file_sink import forward_weekday
```



---
## forward_interval
```python
from _file_sink import forward_interval
```



---
## rotation_size
```python
from _file_sink import rotation_size
```



---
## RotationTime
```python
from _file_sink import RotationTime
```



---
## write
```python
from _file_sink import write
```



---
## stop
```python
from _file_sink import stop
```



---
## tasks_to_complete
```python
from _file_sink import tasks_to_complete
```



---
## _create_path
```python
from _file_sink import _create_path
```



---
## _create_dirs
```python
from _file_sink import _create_dirs
```



---
## _create_file
```python
from _file_sink import _create_file
```



---
## _close_file
```python
from _file_sink import _close_file
```



---
## _reopen_if_needed
```python
from _file_sink import _reopen_if_needed
```



---
## _terminate_file
```python
from _file_sink import _terminate_file
```



---
## _make_glob_patterns
```python
from _file_sink import _make_glob_patterns
```



---
## _make_rotation_function
```python
from _file_sink import _make_rotation_function
```



---
## _make_retention_function
```python
from _file_sink import _make_retention_function
```



---
## _make_compression_function
```python
from _file_sink import _make_compression_function
```



---
## key_log
```python
from _file_sink import key_log
```



---
## __call__
```python
from _file_sink import __call__
```



---
## __name__
```python
from _contextvars import __name__
```



---
## load_contextvar_class
```python
from _contextvars import load_contextvar_class
```



---
## __name__
```python
from _locks_machinery import __name__
```



---
## create_logger_lock
```python
from _locks_machinery import create_logger_lock
```



---
## create_handler_lock
```python
from _locks_machinery import create_handler_lock
```



---
## acquire_locks
```python
from _locks_machinery import acquire_locks
```



---
## release_locks
```python
from _locks_machinery import release_locks
```



---
## __name__
```python
from _colorama import __name__
```



---
## should_colorize
```python
from _colorama import should_colorize
```



---
## should_wrap
```python
from _colorama import should_wrap
```



---
## wrap
```python
from _colorama import wrap
```



---
## __name__
```python
from _defaults import __name__
```



---
## env
```python
from _defaults import env
```



---
## __name__
```python
from _logger import __name__
```

.. References and links rendered by Sphinx are kept here as "module documentation" so that they can
   be used in the ``Logger`` docstrings but do not pollute ``help(logger)`` output.

.. |Logger| replace:: :class:`~Logger`
.. |add| replace:: :meth:`~Logger.add()`
.. |remove| replace:: :meth:`~Logger.remove()`
.. |complete| replace:: :meth:`~Logger.complete()`
.. |catch| replace:: :meth:`~Logger.catch()`
.. |bind| replace:: :meth:`~Logger.bind()`
.. |contextualize| replace:: :meth:`~Logger.contextualize()`
.. |patch| replace:: :meth:`~Logger.patch()`
.. |opt| replace:: :meth:`~Logger.opt()`
.. |log| replace:: :meth:`~Logger.log()`
.. |level| replace:: :meth:`~Logger.level()`
.. |enable| replace:: :meth:`~Logger.enable()`
.. |disable| replace:: :meth:`~Logger.disable()`

.. |Any| replace:: :obj:`~typing.Any`
.. |str| replace:: :class:`str`
.. |int| replace:: :class:`int`
.. |bool| replace:: :class:`bool`
.. |tuple| replace:: :class:`tuple`
.. |namedtuple| replace:: :func:`namedtuple<collections.namedtuple>`
.. |list| replace:: :class:`list`
.. |dict| replace:: :class:`dict`
.. |str.format| replace:: :meth:`str.format()`
.. |Path| replace:: :class:`pathlib.Path`
.. |match.groupdict| replace:: :meth:`re.Match.groupdict()`
.. |Handler| replace:: :class:`logging.Handler`
.. |sys.stderr| replace:: :data:`sys.stderr`
.. |sys.exc_info| replace:: :func:`sys.exc_info()`
.. |time| replace:: :class:`datetime.time`
.. |datetime| replace:: :class:`datetime.datetime`
.. |timedelta| replace:: :class:`datetime.timedelta`
.. |open| replace:: :func:`open()`
.. |logging| replace:: :mod:`logging`
.. |signal| replace:: :mod:`signal`
.. |contextvars| replace:: :mod:`contextvars`
.. |multiprocessing| replace:: :mod:`multiprocessing`
.. |Thread.run| replace:: :meth:`Thread.run()<threading.Thread.run()>`
.. |Exception| replace:: :class:`Exception`
.. |AbstractEventLoop| replace:: :class:`AbstractEventLoop<asyncio.AbstractEventLoop>`
.. |asyncio.get_running_loop| replace:: :func:`asyncio.get_running_loop()`
.. |asyncio.run| replace:: :func:`asyncio.run()`
.. |loop.run_until_complete| replace::
    :meth:`loop.run_until_complete()<asyncio.loop.run_until_complete()>`
.. |loop.create_task| replace:: :meth:`loop.create_task()<asyncio.loop.create_task()>`

.. |logger.trace| replace:: :meth:`logger.trace()<Logger.trace()>`
.. |logger.debug| replace:: :meth:`logger.debug()<Logger.debug()>`
.. |logger.info| replace:: :meth:`logger.info()<Logger.info()>`
.. |logger.success| replace:: :meth:`logger.success()<Logger.success()>`
.. |logger.warning| replace:: :meth:`logger.warning()<Logger.warning()>`
.. |logger.error| replace:: :meth:`logger.error()<Logger.error()>`
.. |logger.critical| replace:: :meth:`logger.critical()<Logger.critical()>`

.. |file-like object| replace:: ``file-like object``
.. _file-like object: https://docs.python.org/3/glossary.html#term-file-object
.. |callable| replace:: ``callable``
.. _callable: https://docs.python.org/3/library/functions.html#callable
.. |coroutine function| replace:: ``coroutine function``
.. _coroutine function: https://docs.python.org/3/glossary.html#term-coroutine-function
.. |re.Pattern| replace:: ``re.Pattern``
.. _re.Pattern: https://docs.python.org/3/library/re.html#re-objects
.. |multiprocessing.Context| replace:: ``multiprocessing.Context``
.. _multiprocessing.Context:
   https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

.. |better_exceptions| replace:: ``better_exceptions``
.. _better_exceptions: https://github.com/Qix-/better-exceptions

.. |loguru-config| replace:: ``loguru-config``
.. _loguru-config: https://github.com/erezinman/loguru-config

.. _Pendulum: https://pendulum.eustace.io/docs/#tokens

.. _@Qix-: https://github.com/Qix-
.. _@erezinman: https://github.com/erezinman
.. _@sdispater: https://github.com/sdispater

.. _formatting directives: https://docs.python.org/3/library/string.html#format-string-syntax
.. _reentrant: https://en.wikipedia.org/wiki/Reentrancy_(computing)

---
## Core
```python
from _logger import Core
```



---
## Logger
```python
from _logger import Logger
```

An object to dispatch logging messages to configured handlers.

The |Logger| is the core object of ``loguru``, every logging configuration and usage pass
through a call to one of its methods. There is only one logger, so there is no need to retrieve
one before usage.

Once the ``logger`` is imported, it can be used to write messages about events happening in your
code. By reading the output logs of your application, you gain a better understanding of the
flow of your program and you more easily track and debug unexpected behaviors.

Handlers to which the logger sends log messages are added using the |add| method. Note that you
can use the |Logger| right after import as it comes pre-configured (logs are emitted to
|sys.stderr| by default). Messages can be logged with different severity levels and they can be
formatted using curly braces (it uses |str.format| under the hood).

When a message is logged, a "record" is associated with it. This record is a dict which contains
information about the logging context: time, function, file, line, thread, level... It also
contains the ``__name__`` of the module, this is why you don't need named loggers.

You should not instantiate a |Logger| by yourself, use ``from loguru import logger`` instead.

---
## __init__
```python
from _logger import __init__
```



---
## __getstate__
```python
from _logger import __getstate__
```



---
## __setstate__
```python
from _logger import __setstate__
```



---
## __repr__
```python
from _logger import __repr__
```



---
## add
```python
from _logger import add
```

Add a handler sending log messages to a sink adequately configured.

Parameters
----------
sink : |file-like object|_, |str|, |Path|, |callable|_, |coroutine function|_ or |Handler|
    An object in charge of receiving formatted logging messages and propagating them to an
    appropriate endpoint.
level : |int| or |str|, optional
    The minimum severity level from which logged messages should be sent to the sink.
format : |str| or |callable|_, optional
    The template used to format logged messages before being sent to the sink.
filter : |callable|_, |str| or |dict|, optional
    A directive optionally used to decide for each logged message whether it should be sent
    to the sink or not.
colorize : |bool|, optional
    Whether the color markups contained in the formatted message should be converted to ansi
    codes for terminal coloration, or stripped otherwise. If ``None``, the choice is
    automatically made based on the sink being a tty or not.
serialize : |bool|, optional
    Whether the logged message and its records should be first converted to a JSON string
    before being sent to the sink.
backtrace : |bool|, optional
    Whether the exception trace formatted should be extended upward, beyond the catching
    point, to show the full stacktrace which generated the error.
diagnose : |bool|, optional
    Whether the exception trace should display the variables values to eases the debugging.
    This should be set to ``False`` in production to avoid leaking sensitive data.
enqueue : |bool|, optional
    Whether the messages to be logged should first pass through a multiprocessing-safe queue
    before reaching the sink. This is useful while logging to a file through multiple
    processes. This also has the advantage of making logging calls non-blocking.
context : |multiprocessing.Context| or |str|, optional
    A context object or name that will be used for all tasks involving internally the
    |multiprocessing| module, in particular when ``enqueue=True``. If ``None``, the default
    context is used.
catch : |bool|, optional
    Whether errors occurring while sink handles logs messages should be automatically
    caught. If ``True``, an exception message is displayed on |sys.stderr| but the exception
    is not propagated to the caller, preventing your app to crash.
**kwargs
    Additional parameters that are only valid to configure a coroutine or file sink (see
    below).


If and only if the sink is a coroutine function, the following parameter applies:

Parameters
----------
loop : |AbstractEventLoop|, optional
    The event loop in which the asynchronous logging task will be scheduled and executed. If
    ``None``, the loop used is the one returned by |asyncio.get_running_loop| at the time of
    the logging call (task is discarded if there is no loop currently running).


If and only if the sink is a file path, the following parameters apply:

Parameters
----------
rotation : |str|, |int|, |time|, |timedelta| or |callable|_, optional
    A condition indicating whenever the current logged file should be closed and a new one
    started.
retention : |str|, |int|, |timedelta| or |callable|_, optional
    A directive filtering old files that should be removed during rotation or end of
    program.
compression : |str| or |callable|_, optional
    A compression or archive format to which log files should be converted at closure.
delay : |bool|, optional
    Whether the file should be created as soon as the sink is configured, or delayed until
    first logged message. It defaults to ``False``.
watch : |bool|, optional
    Whether or not the file should be watched and re-opened when deleted or changed (based
    on its device and inode properties) by an external program. It defaults to ``False``.
mode : |str|, optional
    The opening mode as for built-in |open| function. It defaults to ``"a"`` (open the
    file in appending mode).
buffering : |int|, optional
    The buffering policy as for built-in |open| function. It defaults to ``1`` (line
    buffered file).
encoding : |str|, optional
    The file encoding as for built-in |open| function. It defaults to ``"utf8"``.
**kwargs
    Others parameters are passed to the built-in |open| function.

Returns
-------
:class:`int`
    An identifier associated with the added sink and which should be used to
    |remove| it.

Raises
------
ValueError
    If any of the arguments passed to configure the sink is invalid.

Notes
-----
Extended summary follows.

.. _sink:

.. rubric:: The sink parameter

The ``sink`` handles incoming log messages and proceed to their writing somewhere and
somehow. A sink can take many forms:

- A |file-like object|_ like ``sys.stderr`` or ``open("file.log", "w")``. Anything with
  a ``.write()`` method is considered as a file-like object. Custom handlers may also
  implement ``flush()`` (called after each logged message), ``stop()`` (called at sink
  termination) and ``complete()`` (awaited by the eponymous method).
- A file path as |str| or |Path|. It can be parametrized with some additional parameters,
  see below.
- A |callable|_ (such as a simple function) like ``lambda msg: print(msg)``. This
  allows for logging procedure entirely defined by user preferences and needs.
- A asynchronous |coroutine function|_ defined with the ``async def`` statement. The
  coroutine object returned by such function will be added to the event loop using
  |loop.create_task|. The tasks should be awaited before ending the loop by using
  |complete|.
- A built-in |Handler| like ``logging.StreamHandler``. In such a case, the `Loguru` records
  are automatically converted to the structure expected by the |logging| module.

Note that the logging functions are not `reentrant`_. This means you should avoid using
the ``logger`` inside any of your sinks or from within |signal| handlers. Otherwise, you
may face deadlock if the module's sink was not explicitly disabled.

.. _message:

.. rubric:: The logged message

The logged message passed to all added sinks is nothing more than a string of the
formatted log, to which a special attribute is associated: the ``.record`` which is a dict
containing all contextual information possibly needed (see below).

Logged messages are formatted according to the ``format`` of the added sink. This format
is usually a string containing braces fields to display attributes from the record dict.

If fine-grained control is needed, the ``format`` can also be a function which takes the
record as parameter and return the format template string. However, note that in such a
case, you should take care of appending the line ending and exception field to the returned
format, while ``"\n{exception}"`` is automatically appended for convenience if ``format`` is
a string.

The ``filter`` attribute can be used to control which messages are effectively passed to the
sink and which one are ignored. A function can be used, accepting the record as an
argument, and returning ``True`` if the message should be logged, ``False`` otherwise. If
a string is used, only the records with the same ``name`` and its children will be allowed.
One can also pass a ``dict`` mapping module names to minimum required level. In such case,
each log record will search for it's closest parent in the ``dict`` and use the associated
level as the filter. The ``dict`` values can be ``int`` severity, ``str`` level name or
``True`` and ``False`` to respectively authorize and discard all module logs
unconditionally. In order to set a default level, the ``""`` module name should be used as
it is the parent of all modules (it does not suppress global ``level`` threshold, though).

Note that while calling a logging method, the keyword arguments (if any) are automatically
added to the ``extra`` dict for convenient contextualization (in addition to being used for
formatting).

.. _levels:

.. rubric:: The severity levels

Each logged message is associated with a severity level. These levels make it possible to
prioritize messages and to choose the verbosity of the logs according to usages. For
example, it allows to display some debugging information to a developer, while hiding it to
the end user running the application.

The ``level`` attribute of every added sink controls the minimum threshold from which log
messages are allowed to be emitted. While using the ``logger``, you are in charge of
configuring the appropriate granularity of your logs. It is possible to add even more custom
levels by using the |level| method.

Here are the standard levels with their default severity value, each one is associated with
a logging method of the same name:

+----------------------+------------------------+------------------------+
| Level name           | Severity value         | Logger method          |
+======================+========================+========================+
| ``TRACE``            | 5                      | |logger.trace|         |
+----------------------+------------------------+------------------------+
| ``DEBUG``            | 10                     | |logger.debug|         |
+----------------------+------------------------+------------------------+
| ``INFO``             | 20                     | |logger.info|          |
+----------------------+------------------------+------------------------+
| ``SUCCESS``          | 25                     | |logger.success|       |
+----------------------+------------------------+------------------------+
| ``WARNING``          | 30                     | |logger.warning|       |
+----------------------+------------------------+------------------------+
| ``ERROR``            | 40                     | |logger.error|         |
+----------------------+------------------------+------------------------+
| ``CRITICAL``         | 50                     | |logger.critical|      |
+----------------------+------------------------+------------------------+

.. _record:

.. rubric:: The record dict

The record is just a Python dict, accessible from sinks by ``message.record``. It contains
all contextual information of the logging call (time, function, file, line, level, etc.).

Each of the record keys can be used in the handler's ``format`` so the corresponding value
is properly displayed in the logged message (e.g. ``"{level}"`` will return ``"INFO"``).
Some records' values are objects with two or more attributes. These can be formatted with
``"{key.attr}"`` (``"{key}"`` would display one by default).

Note that you can use any `formatting directives`_ available in Python's ``str.format()``
method (e.g. ``"{key: >3}"`` will right-align and pad to a width of 3 characters). This is
particularly useful for time formatting (see below).

+------------+---------------------------------+----------------------------+
| Key        | Description                     | Attributes                 |
+============+=================================+============================+
| elapsed    | The time elapsed since the      | See |timedelta|            |
|            | start of the program            |                            |
+------------+---------------------------------+----------------------------+
| exception  | The formatted exception if any, | ``type``, ``value``,       |
|            | ``None`` otherwise              | ``traceback``              |
+------------+---------------------------------+----------------------------+
| extra      | The dict of attributes          | None                       |
|            | bound by the user (see |bind|)  |                            |
+------------+---------------------------------+----------------------------+
| file       | The file where the logging call | ``name`` (default),        |
|            | was made                        | ``path``                   |
+------------+---------------------------------+----------------------------+
| function   | The function from which the     | None                       |
|            | logging call was made           |                            |
+------------+---------------------------------+----------------------------+
| level      | The severity used to log the    | ``name`` (default),        |
|            | message                         | ``no``, ``icon``           |
+------------+---------------------------------+----------------------------+
| line       | The line number in the source   | None                       |
|            | code                            |                            |
+------------+---------------------------------+----------------------------+
| message    | The logged message (not yet     | None                       |
|            | formatted)                      |                            |
+------------+---------------------------------+----------------------------+
| module     | The module where the logging    | None                       |
|            | call was made                   |                            |
+------------+---------------------------------+----------------------------+
| name       | The ``__name__`` where the      | None                       |
|            | logging call was made           |                            |
+------------+---------------------------------+----------------------------+
| process    | The process in which the        | ``name``, ``id`` (default) |
|            | logging call was made           |                            |
+------------+---------------------------------+----------------------------+
| thread     | The thread in which the         | ``name``, ``id`` (default) |
|            | logging call was made           |                            |
+------------+---------------------------------+----------------------------+
| time       | The aware local time when the   | See |datetime|             |
|            | logging call was made           |                            |
+------------+---------------------------------+----------------------------+

.. _time:

.. rubric:: The time formatting

To use your favorite time representation, you can set it directly in the time formatter
specifier of your handler format, like for example ``format="{time:HH:mm:ss} {message}"``.
Note that this datetime represents your local time, and it is also made timezone-aware,
so you can display the UTC offset to avoid ambiguities.

The time field can be formatted using more human-friendly tokens. These constitute a subset
of the one used by the `Pendulum`_ library of `@sdispater`_. To escape a token, just add
square brackets around it, for example ``"[YY]"`` would display literally ``"YY"``.

If you prefer to display UTC rather than local time, you can add ``"!UTC"`` at the very end
of the time format, like ``{time:HH:mm:ss!UTC}``. Doing so will convert the ``datetime``
to UTC before formatting.

If no time formatter specifier is used, like for example if ``format="{time} {message}"``,
the default one will use ISO 8601.

+------------------------+---------+----------------------------------------+
|                        | Token   | Output                                 |
+========================+=========+========================================+
| Year                   | YYYY    | 2000, 2001, 2002 ... 2012, 2013        |
|                        +---------+----------------------------------------+
|                        | YY      | 00, 01, 02 ... 12, 13                  |
+------------------------+---------+----------------------------------------+
| Quarter                | Q       | 1 2 3 4                                |
+------------------------+---------+----------------------------------------+
| Month                  | MMMM    | January, February, March ...           |
|                        +---------+----------------------------------------+
|                        | MMM     | Jan, Feb, Mar ...                      |
|                        +---------+----------------------------------------+
|                        | MM      | 01, 02, 03 ... 11, 12                  |
|                        +---------+----------------------------------------+
|                        | M       | 1, 2, 3 ... 11, 12                     |
+------------------------+---------+----------------------------------------+
| Day of Year            | DDDD    | 001, 002, 003 ... 364, 365             |
|                        +---------+----------------------------------------+
|                        | DDD     | 1, 2, 3 ... 364, 365                   |
+------------------------+---------+----------------------------------------+
| Day of Month           | DD      | 01, 02, 03 ... 30, 31                  |
|                        +---------+----------------------------------------+
|                        | D       | 1, 2, 3 ... 30, 31                     |
+------------------------+---------+----------------------------------------+
| Day of Week            | dddd    | Monday, Tuesday, Wednesday ...         |
|                        +---------+----------------------------------------+
|                        | ddd     | Mon, Tue, Wed ...                      |
|                        +---------+----------------------------------------+
|                        | d       | 0, 1, 2 ... 6                          |
+------------------------+---------+----------------------------------------+
| Days of ISO Week       | E       | 1, 2, 3 ... 7                          |
+------------------------+---------+----------------------------------------+
| Hour                   | HH      | 00, 01, 02 ... 23, 24                  |
|                        +---------+----------------------------------------+
|                        | H       | 0, 1, 2 ... 23, 24                     |
|                        +---------+----------------------------------------+
|                        | hh      | 01, 02, 03 ... 11, 12                  |
|                        +---------+----------------------------------------+
|                        | h       | 1, 2, 3 ... 11, 12                     |
+------------------------+---------+----------------------------------------+
| Minute                 | mm      | 00, 01, 02 ... 58, 59                  |
|                        +---------+----------------------------------------+
|                        | m       | 0, 1, 2 ... 58, 59                     |
+------------------------+---------+----------------------------------------+
| Second                 | ss      | 00, 01, 02 ... 58, 59                  |
|                        +---------+----------------------------------------+
|                        | s       | 0, 1, 2 ... 58, 59                     |
+------------------------+---------+----------------------------------------+
| Fractional Second      | S       | 0 1 ... 8 9                            |
|                        +---------+----------------------------------------+
|                        | SS      | 00, 01, 02 ... 98, 99                  |
|                        +---------+----------------------------------------+
|                        | SSS     | 000 001 ... 998 999                    |
|                        +---------+----------------------------------------+
|                        | SSSS... | 000[0..] 001[0..] ... 998[0..] 999[0..]|
|                        +---------+----------------------------------------+
|                        | SSSSSS  | 000000 000001 ... 999998 999999        |
+------------------------+---------+----------------------------------------+
| AM / PM                | A       | AM, PM                                 |
+------------------------+---------+----------------------------------------+
| Timezone               | Z       | -07:00, -06:00 ... +06:00, +07:00      |
|                        +---------+----------------------------------------+
|                        | ZZ      | -0700, -0600 ... +0600, +0700          |
|                        +---------+----------------------------------------+
|                        | zz      | EST CST ... MST PST                    |
+------------------------+---------+----------------------------------------+
| Seconds timestamp      | X       | 1381685817, 1234567890.123             |
+------------------------+---------+----------------------------------------+
| Microseconds timestamp | x       | 1234567890123                          |
+------------------------+---------+----------------------------------------+

.. _file:

.. rubric:: The file sinks

If the sink is a |str| or a |Path|, the corresponding file will be opened for writing logs.
The path can also contain a special ``"{time}"`` field that will be formatted with the
current date at file creation. The file is closed at sink stop, i.e. when the application
ends or the handler is removed.

The ``rotation`` check is made before logging each message. If there is already an existing
file with the same name that the file to be created, then the existing file is renamed by
appending the date to its basename to prevent file overwriting. This parameter accepts:

- an |int| which corresponds to the maximum file size in bytes before that the current
  logged file is closed and a new one started over.
- a |timedelta| which indicates the frequency of each new rotation.
- a |time| which specifies the hour when the daily rotation should occur.
- a |str| for human-friendly parametrization of one of the previously enumerated types.
  Examples: ``"100 MB"``, ``"0.5 GB"``, ``"1 month 2 weeks"``, ``"4 days"``, ``"10h"``,
  ``"monthly"``, ``"18:00"``, ``"sunday"``, ``"w0"``, ``"monday at 12:00"``, ...
- a |callable|_ which will be invoked before logging. It should accept two arguments: the
  logged message and the file object, and it should return ``True`` if the rotation should
  happen now, ``False`` otherwise.

The ``retention`` occurs at rotation or at sink stop if rotation is ``None``. Files
resulting from previous sessions or rotations are automatically collected from disk. A file
is selected if it matches the pattern ``"basename(.*).ext(.*)"`` (possible time fields are
beforehand replaced with ``.*``) based on the configured sink. Afterwards, the list is
processed to determine files to be retained. This parameter accepts:

- an |int| which indicates the number of log files to keep, while older files are deleted.
- a |timedelta| which specifies the maximum age of files to keep.
- a |str| for human-friendly parametrization of the maximum age of files to keep.
  Examples: ``"1 week, 3 days"``, ``"2 months"``, ...
- a |callable|_ which will be invoked before the retention process. It should accept the
  list of log files as argument and process to whatever it wants (moving files, removing
  them, etc.).

The ``compression`` happens at rotation or at sink stop if rotation is ``None``. This
parameter accepts:

- a |str| which corresponds to the compressed or archived file extension. This can be one
  of: ``"gz"``, ``"bz2"``, ``"xz"``, ``"lzma"``, ``"tar"``, ``"tar.gz"``, ``"tar.bz2"``,
  ``"tar.xz"``, ``"zip"``.
- a |callable|_ which will be invoked before file termination. It should accept the path of
  the log file as argument and process to whatever it wants (custom compression, network
  sending, removing it, etc.).

Either way, if you use a custom function designed according to your preferences, you must be
very careful not to use the ``logger`` within your function. Otherwise, there is a risk that
your program hang because of a deadlock.

.. _color:

.. rubric:: The color markups

To add colors to your logs, you just have to enclose your format string with the appropriate
tags (e.g. ``<red>some message</red>``). These tags are automatically removed if the sink
doesn't support ansi codes. For convenience, you can use ``</>`` to close the last opening
tag without repeating its name (e.g. ``<red>another message</>``).

The special tag ``<level>`` (abbreviated with ``<lvl>``) is transformed according to
the configured color of the logged message level.

Tags which are not recognized will raise an exception during parsing, to inform you about
possible misuse. If you wish to display a markup tag literally, you can escape it by
prepending a ``\`` like for example ``\<blue>``. If, for some reason, you need to escape a
string programmatically, note that the regex used internally to parse markup tags is
``r"\\?</?((?:[fb]g\s)?[^<>\s]*)>"``.

Note that when logging a message with ``opt(colors=True)``, color tags present in the
formatting arguments (``args`` and ``kwargs``) are completely ignored. This is important if
you need to log strings containing markups that might interfere with the color tags (in this
case, do not use f-string).

Here are the available tags (note that compatibility may vary depending on terminal):

+------------------------------------+--------------------------------------+
| Color (abbr)                       | Styles (abbr)                        |
+====================================+======================================+
| Black (k)                          | Bold (b)                             |
+------------------------------------+--------------------------------------+
| Blue (e)                           | Dim (d)                              |
+------------------------------------+--------------------------------------+
| Cyan (c)                           | Normal (n)                           |
+------------------------------------+--------------------------------------+
| Green (g)                          | Italic (i)                           |
+------------------------------------+--------------------------------------+
| Magenta (m)                        | Underline (u)                        |
+------------------------------------+--------------------------------------+
| Red (r)                            | Strike (s)                           |
+------------------------------------+--------------------------------------+
| White (w)                          | Reverse (v)                          |
+------------------------------------+--------------------------------------+
| Yellow (y)                         | Blink (l)                            |
+------------------------------------+--------------------------------------+
|                                    | Hide (h)                             |
+------------------------------------+--------------------------------------+

Usage:

+-----------------+-------------------------------------------------------------------+
| Description     | Examples                                                          |
|                 +---------------------------------+---------------------------------+
|                 | Foreground                      | Background                      |
+=================+=================================+=================================+
| Basic colors    | ``<red>``, ``<r>``              | ``<GREEN>``, ``<G>``            |
+-----------------+---------------------------------+---------------------------------+
| Light colors    | ``<light-blue>``, ``<le>``      | ``<LIGHT-CYAN>``, ``<LC>``      |
+-----------------+---------------------------------+---------------------------------+
| 8-bit colors    | ``<fg 86>``, ``<fg 255>``       | ``<bg 42>``, ``<bg 9>``         |
+-----------------+---------------------------------+---------------------------------+
| Hex colors      | ``<fg #00005f>``, ``<fg #EE1>`` | ``<bg #AF5FD7>``, ``<bg #fff>`` |
+-----------------+---------------------------------+---------------------------------+
| RGB colors      | ``<fg 0,95,0>``                 | ``<bg 72,119,65>``              |
+-----------------+---------------------------------+---------------------------------+
| Stylizing       | ``<bold>``, ``<b>``,  ``<underline>``, ``<u>``                    |
+-----------------+-------------------------------------------------------------------+

.. _env:

.. rubric:: The environment variables

The default values of sink parameters can be entirely customized. This is particularly
useful if you don't like the log format of the pre-configured sink.

Each of the |add| default parameter can be modified by setting the ``LOGURU_[PARAM]``
environment variable. For example on Linux: ``export LOGURU_FORMAT="{time} - {message}"``
or ``export LOGURU_DIAGNOSE=NO``.

The default levels' attributes can also be modified by setting the ``LOGURU_[LEVEL]_[ATTR]``
environment variable. For example, on Windows: ``setx LOGURU_DEBUG_COLOR "<blue>"``
or ``setx LOGURU_TRACE_ICON "🚀"``. If you use the ``set`` command, do not include quotes
but escape special symbol as needed, e.g. ``set LOGURU_DEBUG_COLOR=^<blue^>``.

If you want to disable the pre-configured sink, you can set the ``LOGURU_AUTOINIT``
variable to ``False``.

On Linux, you will probably need to edit the ``~/.profile`` file to make this persistent. On
Windows, don't forget to restart your terminal for the change to be taken into account.

Examples
--------
>>> logger.add(sys.stdout, format="{time} - {level} - {message}", filter="sub.module")

>>> logger.add("file_{time}.log", level="TRACE", rotation="100 MB")

>>> def debug_only(record):
...     return record["level"].name == "DEBUG"
...
>>> logger.add("debug.log", filter=debug_only)  # Other levels are filtered out

>>> def my_sink(message):
...     record = message.record
...     update_db(message, time=record["time"], level=record["level"])
...
>>> logger.add(my_sink)

>>> level_per_module = {
...     "": "DEBUG",
...     "third.lib": "WARNING",
...     "anotherlib": False
... }
>>> logger.add(lambda m: print(m, end=""), filter=level_per_module, level=0)

>>> async def publish(message):
...     await api.post(message)
...
>>> logger.add(publish, serialize=True)

>>> from logging import StreamHandler
>>> logger.add(StreamHandler(sys.stderr), format="{message}")

>>> class RandomStream:
...     def __init__(self, seed, threshold):
...         self.threshold = threshold
...         random.seed(seed)
...     def write(self, message):
...         if random.random() > self.threshold:
...             print(message)
...
>>> stream_object = RandomStream(seed=12345, threshold=0.25)
>>> logger.add(stream_object, level="INFO")

---
## remove
```python
from _logger import remove
```

Remove a previously added handler and stop sending logs to its sink.

Parameters
----------
handler_id : |int| or ``None``
    The id of the sink to remove, as it was returned by the |add| method. If ``None``, all
    handlers are removed. The pre-configured handler is guaranteed to have the index ``0``.

Raises
------
ValueError
    If ``handler_id`` is not ``None`` but there is no active handler with such id.

Examples
--------
>>> i = logger.add(sys.stderr, format="{message}")
>>> logger.info("Logging")
Logging
>>> logger.remove(i)
>>> logger.info("No longer logging")

---
## complete
```python
from _logger import complete
```

Wait for the end of enqueued messages and asynchronous tasks scheduled by handlers.

This method proceeds in two steps: first it waits for all logging messages added to handlers
with ``enqueue=True`` to be processed, then it returns an object that can be awaited to
finalize all logging tasks added to the event loop by coroutine sinks.

It can be called from non-asynchronous code. This is especially recommended when the
``logger`` is utilized with ``multiprocessing`` to ensure messages put to the internal
queue have been properly transmitted before leaving a child process.

The returned object should be awaited before the end of a coroutine executed by
|asyncio.run| or |loop.run_until_complete| to ensure all asynchronous logging messages are
processed. The function |asyncio.get_running_loop| is called beforehand, only tasks
scheduled in the same loop that the current one will be awaited by the method.

Returns
-------
:term:`awaitable`
    An awaitable object which ensures all asynchronous logging calls are completed when
    awaited.

Examples
--------
>>> async def sink(message):
...     await asyncio.sleep(0.1)  # IO processing...
...     print(message, end="")
...
>>> async def work():
...     logger.info("Start")
...     logger.info("End")
...     await logger.complete()
...
>>> logger.add(sink)
1
>>> asyncio.run(work())
Start
End

>>> def process():
...     logger.info("Message sent from the child")
...     logger.complete()
...
>>> logger.add(sys.stderr, enqueue=True)
1
>>> process = multiprocessing.Process(target=process)
>>> process.start()
>>> process.join()
Message sent from the child

---
## catch
```python
from _logger import catch
```

Return a decorator to automatically log possibly caught error in wrapped function.

This is useful to ensure unexpected exceptions are logged, the entire program can be
wrapped by this method. This is also very useful to decorate |Thread.run| methods while
using threads to propagate errors to the main logger thread.

Note that the visibility of variables values (which uses the great |better_exceptions|_
library from `@Qix-`_) depends on the ``diagnose`` option of each configured sink.

The returned object can also be used as a context manager.

Parameters
----------
exception : |Exception|, optional
    The type of exception to intercept. If several types should be caught, a tuple of
    exceptions can be used too.
level : |str| or |int|, optional
    The level name or severity with which the message should be logged.
reraise : |bool|, optional
    Whether the exception should be raised again and hence propagated to the caller.
onerror : |callable|_, optional
    A function that will be called if an error occurs, once the message has been logged.
    It should accept the exception instance as it sole argument.
exclude : |Exception|, optional
    A type of exception (or a tuple of types) that will be purposely ignored and hence
    propagated to the caller without being logged.
default : |Any|, optional
    The value to be returned by the decorated function if an error occurred without being
    re-raised.
message : |str|, optional
    The message that will be automatically logged if an exception occurs. Note that it will
    be formatted with the ``record`` attribute.

Returns
-------
:term:`decorator` / :term:`context manager`
    An object that can be used to decorate a function or as a context manager to log
    exceptions possibly caught.

Examples
--------
>>> @logger.catch
... def f(x):
...     100 / x
...
>>> def g():
...     f(10)
...     f(0)
...
>>> g()
ERROR - An error has been caught in function 'g', process 'Main' (367), thread 'ch1' (1398):
Traceback (most recent call last):
  File "program.py", line 12, in <module>
    g()
    └ <function g at 0x7f225fe2bc80>
> File "program.py", line 10, in g
    f(0)
    └ <function f at 0x7f225fe2b9d8>
  File "program.py", line 6, in f
    100 / x
          └ 0
ZeroDivisionError: division by zero

>>> with logger.catch(message="Because we never know..."):
...    main()  # No exception, no logs

>>> # Use 'onerror' to prevent the program exit code to be 0 (if 'reraise=False') while
>>> # also avoiding the stacktrace to be duplicated on stderr (if 'reraise=True').
>>> @logger.catch(onerror=lambda _: sys.exit(1))
... def main():
...     1 / 0

---
## opt
```python
from _logger import opt
```

Parametrize a logging call to slightly change generated log message.

Note that it's not possible to chain |opt| calls, the last one takes precedence over the
others as it will "reset" the options to their default values.

Parameters
----------
exception : |bool|, |tuple| or |Exception|, optional
    If it does not evaluate as ``False``, the passed exception is formatted and added to the
    log message. It could be an |Exception| object or a ``(type, value, traceback)`` tuple,
    otherwise the exception information is retrieved from |sys.exc_info|.
record : |bool|, optional
    If ``True``, the record dict contextualizing the logging call can be used to format the
    message by using ``{record[key]}`` in the log message.
lazy : |bool|, optional
    If ``True``, the logging call attribute to format the message should be functions which
    will be called only if the level is high enough. This can be used to avoid expensive
    functions if not necessary.
colors : |bool|, optional
    If ``True``, logged message will be colorized according to the markups it possibly
    contains.
raw : |bool|, optional
    If ``True``, the formatting of each sink will be bypassed and the message will be sent
    as is.
capture : |bool|, optional
    If ``False``, the ``**kwargs`` of logged message will not automatically populate
    the ``extra`` dict (although they are still used for formatting).
depth : |int|, optional
    Specify which stacktrace should be used to contextualize the logged message. This is
    useful while using the logger from inside a wrapped function to retrieve worthwhile
    information.
ansi : |bool|, optional
    Deprecated since version 0.4.1: the ``ansi`` parameter will be removed in Loguru 1.0.0,
    it is replaced by ``colors`` which is a more appropriate name.

Returns
-------
:class:`~Logger`
    A logger wrapping the core logger, but transforming logged message adequately before
    sending.

Examples
--------
>>> try:
...     1 / 0
... except ZeroDivisionError:
...    logger.opt(exception=True).debug("Exception logged with debug level:")
...
[18:10:02] DEBUG in '<module>' - Exception logged with debug level:
Traceback (most recent call last, catch point marked):
> File "<stdin>", line 2, in <module>
ZeroDivisionError: division by zero

>>> logger.opt(record=True).info("Current line is: {record[line]}")
[18:10:33] INFO in '<module>' - Current line is: 1

>>> logger.opt(lazy=True).debug("If sink <= DEBUG: {x}", x=lambda: math.factorial(2**5))
[18:11:19] DEBUG in '<module>' - If sink <= DEBUG: 263130836933693530167218012160000000

>>> logger.opt(colors=True).warning("We got a <red>BIG</red> problem")
[18:11:30] WARNING in '<module>' - We got a BIG problem

>>> logger.opt(raw=True).debug("No formatting\n")
No formatting

>>> logger.opt(capture=False).info("Displayed but not captured: {value}", value=123)
[18:11:41] Displayed but not captured: 123

>>> def wrapped():
...     logger.opt(depth=1).info("Get parent context")
...
>>> def func():
...     wrapped()
...
>>> func()
[18:11:54] DEBUG in 'func' - Get parent context

---
## bind
```python
from _logger import bind
```

Bind attributes to the ``extra`` dict of each logged message record.

This is used to add custom context to each logging call.

Parameters
----------
**kwargs
    Mapping between keys and values that will be added to the ``extra`` dict.

Returns
-------
:class:`~Logger`
    A logger wrapping the core logger, but which sends record with the customized ``extra``
    dict.

Examples
--------
>>> logger.add(sys.stderr, format="{extra[ip]} - {message}")
>>> class Server:
...     def __init__(self, ip):
...         self.ip = ip
...         self.logger = logger.bind(ip=ip)
...     def call(self, message):
...         self.logger.info(message)
...
>>> instance_1 = Server("192.168.0.200")
>>> instance_2 = Server("127.0.0.1")
>>> instance_1.call("First instance")
192.168.0.200 - First instance
>>> instance_2.call("Second instance")
127.0.0.1 - Second instance

---
## contextualize
```python
from _logger import contextualize
```

Bind attributes to the context-local ``extra`` dict while inside the ``with`` block.

Contrary to |bind| there is no ``logger`` returned, the ``extra`` dict is modified in-place
and updated globally. Most importantly, it uses |contextvars| which means that
contextualized values are unique to each threads and asynchronous tasks.

The ``extra`` dict will retrieve its initial state once the context manager is exited.

Parameters
----------
**kwargs
    Mapping between keys and values that will be added to the context-local ``extra`` dict.

Returns
-------
:term:`context manager` / :term:`decorator`
    A context manager (usable as a decorator too) that will bind the attributes once entered
    and restore the initial state of the ``extra`` dict while exited.

Examples
--------
>>> logger.add(sys.stderr, format="{message} | {extra}")
1
>>> def task():
...     logger.info("Processing!")
...
>>> with logger.contextualize(task_id=123):
...     task()
...
Processing! | {'task_id': 123}
>>> logger.info("Done.")
Done. | {}

---
## patch
```python
from _logger import patch
```

Attach a function to modify the record dict created by each logging call.

The ``patcher`` may be used to update the record on-the-fly before it's propagated to the
handlers. This allows the "extra" dict to be populated with dynamic values and also permits
advanced modifications of the record emitted while logging a message. The function is called
once before sending the log message to the different handlers.

It is recommended to apply modification on the ``record["extra"]`` dict rather than on the
``record`` dict itself, as some values are used internally by `Loguru`, and modify them may
produce unexpected results.

The logger can be patched multiple times. In this case, the functions are called in the
same order as they are added.

Parameters
----------
patcher: |callable|_
    The function to which the record dict will be passed as the sole argument. This function
    is in charge of updating the record in-place, the function does not need to return any
    value, the modified record object will be re-used.

Returns
-------
:class:`~Logger`
    A logger wrapping the core logger, but which records are passed through the ``patcher``
    function before being sent to the added handlers.

Examples
--------
>>> logger.add(sys.stderr, format="{extra[utc]} {message}")
>>> logger = logger.patch(lambda record: record["extra"].update(utc=datetime.utcnow())
>>> logger.info("That's way, you can log messages with time displayed in UTC")

>>> def wrapper(func):
...     @functools.wraps(func)
...     def wrapped(*args, **kwargs):
...         logger.patch(lambda r: r.update(function=func.__name__)).info("Wrapped!")
...         return func(*args, **kwargs)
...     return wrapped

>>> def recv_record_from_network(pipe):
...     record = pickle.loads(pipe.read())
...     level, message = record["level"], record["message"]
...     logger.patch(lambda r: r.update(record)).log(level, message)

---
## level
```python
from _logger import level
```

Add, update or retrieve a logging level.

Logging levels are defined by their ``name`` to which a severity ``no``, an ansi ``color``
tag and an ``icon`` are associated and possibly modified at run-time. To |log| to a custom
level, you should necessarily use its name, the severity number is not linked back to levels
name (this implies that several levels can share the same severity).

To add a new level, its ``name`` and its ``no`` are required. A ``color`` and an ``icon``
can also be specified or will be empty by default.

To update an existing level, pass its ``name`` with the parameters to be changed. It is not
possible to modify the ``no`` of a level once it has been added.

To retrieve level information, the ``name`` solely suffices.

Parameters
----------
name : |str|
    The name of the logging level.
no : |int|
    The severity of the level to be added or updated.
color : |str|
    The color markup of the level to be added or updated.
icon : |str|
    The icon of the level to be added or updated.

Returns
-------
``Level``
    A |namedtuple| containing information about the level.

Raises
------
ValueError
    If there is no level registered with such ``name``.

Examples
--------
>>> level = logger.level("ERROR")
>>> print(level)
Level(name='ERROR', no=40, color='<red><bold>', icon='❌')
>>> logger.add(sys.stderr, format="{level.no} {level.icon} {message}")
1
>>> logger.level("CUSTOM", no=15, color="<blue>", icon="@")
Level(name='CUSTOM', no=15, color='<blue>', icon='@')
>>> logger.log("CUSTOM", "Logging...")
15 @ Logging...
>>> logger.level("WARNING", icon=r"/!\")
Level(name='WARNING', no=30, color='<yellow><bold>', icon='/!\\')
>>> logger.warning("Updated!")
30 /!\ Updated!

---
## disable
```python
from _logger import disable
```

Disable logging of messages coming from ``name`` module and its children.

Developers of library using `Loguru` should absolutely disable it to avoid disrupting
users with unrelated logs messages.

Note that in some rare circumstances, it is not possible for `Loguru` to
determine the module's ``__name__`` value. In such situation, ``record["name"]`` will be
equal to ``None``, this is why ``None`` is also a valid argument.

Parameters
----------
name : |str| or ``None``
    The name of the parent module to disable.

Examples
--------
>>> logger.info("Allowed message by default")
[22:21:55] Allowed message by default
>>> logger.disable("my_library")
>>> logger.info("While publishing a library, don't forget to disable logging")

---
## enable
```python
from _logger import enable
```

Enable logging of messages coming from ``name`` module and its children.

Logging is generally disabled by imported library using `Loguru`, hence this function
allows users to receive these messages anyway.

To enable all logs regardless of the module they are coming from, an empty string ``""`` can
be passed.

Parameters
----------
name : |str| or ``None``
    The name of the parent module to re-allow.

Examples
--------
>>> logger.disable("__main__")
>>> logger.info("Disabled, so nothing is logged.")
>>> logger.enable("__main__")
>>> logger.info("Re-enabled, messages are logged.")
[22:46:12] Re-enabled, messages are logged.

---
## configure
```python
from _logger import configure
```

Configure the core logger.

It should be noted that ``extra`` values set using this function are available across all
modules, so this is the best way to set overall default values.

To load the configuration directly from a file, such as JSON or YAML, it is also possible to
use the |loguru-config|_ library developed by `@erezinman`_.

Parameters
----------
handlers : |list| of |dict|, optional
    A list of each handler to be added. The list should contain dicts of params passed to
    the |add| function as keyword arguments. If not ``None``, all previously added
    handlers are first removed.
levels : |list| of |dict|, optional
    A list of each level to be added or updated. The list should contain dicts of params
    passed to the |level| function as keyword arguments. This will never remove previously
    created levels.
extra : |dict|, optional
    A dict containing additional parameters bound to the core logger, useful to share
    common properties if you call |bind| in several of your files modules. If not ``None``,
    this will remove previously configured ``extra`` dict.
patcher : |callable|_, optional
    A function that will be applied to the record dict of each logged messages across all
    modules using the logger. It should modify the dict in-place without returning anything.
    The function is executed prior to the one possibly added by the |patch| method. If not
    ``None``, this will replace previously configured ``patcher`` function.
activation : |list| of |tuple|, optional
    A list of ``(name, state)`` tuples which denotes which loggers should be enabled (if
    ``state`` is ``True``) or disabled (if ``state`` is ``False``). The calls to |enable|
    and |disable| are made accordingly to the list order. This will not modify previously
    activated loggers, so if you need a fresh start prepend your list with ``("", False)``
    or ``("", True)``.

Returns
-------
:class:`list` of :class:`int`
    A list containing the identifiers of added sinks (if any).

Examples
--------
>>> logger.configure(
...     handlers=[
...         dict(sink=sys.stderr, format="[{time}] {message}"),
...         dict(sink="file.log", enqueue=True, serialize=True),
...     ],
...     levels=[dict(name="NEW", no=13, icon="¤", color="")],
...     extra={"common_to_all": "default"},
...     patcher=lambda record: record["extra"].update(some_value=42),
...     activation=[("my_module.secret", False), ("another_library.module", True)],
... )
[1, 2]

>>> # Set a default "extra" dict to logger across all modules, without "bind()"
>>> extra = {"context": "foo"}
>>> logger.configure(extra=extra)
>>> logger.add(sys.stderr, format="{extra[context]} - {message}")
>>> logger.info("Context without bind")
>>> # => "foo - Context without bind"
>>> logger.bind(context="bar").info("Suppress global context")
>>> # => "bar - Suppress global context"

---
## _change_activation
```python
from _logger import _change_activation
```



---
## parse
```python
from _logger import parse
```

Parse raw logs and extract each entry as a |dict|.

The logging format has to be specified as the regex ``pattern``, it will then be
used to parse the ``file`` and retrieve each entry based on the named groups present
in the regex.

Parameters
----------
file : |str|, |Path| or |file-like object|_
    The path of the log file to be parsed, or an already opened file object.
pattern : |str| or |re.Pattern|_
    The regex to use for logs parsing, it should contain named groups which will be included
    in the returned dict.
cast : |callable|_ or |dict|, optional
    A function that should convert in-place the regex groups parsed (a dict of string
    values) to more appropriate types. If a dict is passed, it should be a mapping between
    keys of parsed log dict and the function that should be used to convert the associated
    value.
chunk : |int|, optional
    The number of bytes read while iterating through the logs, this avoids having to load
    the whole file in memory.

Yields
------
:class:`dict`
    The dict mapping regex named groups to matched values, as returned by |match.groupdict|
    and optionally converted according to ``cast`` argument.

Examples
--------
>>> reg = r"(?P<lvl>[0-9]+): (?P<msg>.*)"    # If log format is "{level.no} - {message}"
>>> for e in logger.parse("file.log", reg):  # A file line could be "10 - A debug message"
...     print(e)                             # => {'lvl': '10', 'msg': 'A debug message'}

>>> caster = dict(lvl=int)                   # Parse 'lvl' key as an integer
>>> for e in logger.parse("file.log", reg, cast=caster):
...     print(e)                             # => {'lvl': 10, 'msg': 'A debug message'}

>>> def cast(groups):
...     if "date" in groups:
...         groups["date"] = datetime.strptime(groups["date"], "%Y-%m-%d %H:%M:%S")
...
>>> with open("file.log") as file:
...     for log in logger.parse(file, reg, cast=cast):
...         print(log["date"], log["something_else"])

---
## _find_iter
```python
from _logger import _find_iter
```



---
## _log
```python
from _logger import _log
```



---
## trace
```python
from _logger import trace
```

Log ``message.format(*args, **kwargs)`` with severity ``'TRACE'``.

---
## debug
```python
from _logger import debug
```

Log ``message.format(*args, **kwargs)`` with severity ``'DEBUG'``.

---
## info
```python
from _logger import info
```

Log ``message.format(*args, **kwargs)`` with severity ``'INFO'``.

---
## success
```python
from _logger import success
```

Log ``message.format(*args, **kwargs)`` with severity ``'SUCCESS'``.

---
## warning
```python
from _logger import warning
```

Log ``message.format(*args, **kwargs)`` with severity ``'WARNING'``.

---
## error
```python
from _logger import error
```

Log ``message.format(*args, **kwargs)`` with severity ``'ERROR'``.

---
## critical
```python
from _logger import critical
```

Log ``message.format(*args, **kwargs)`` with severity ``'CRITICAL'``.

---
## exception
```python
from _logger import exception
```

Convenience method for logging an ``'ERROR'`` with exception information.

---
## log
```python
from _logger import log
```

Log ``message.format(*args, **kwargs)`` with severity ``level``.

---
## start
```python
from _logger import start
```

Deprecated function to |add| a new handler.

Warnings
--------
.. deprecated:: 0.2.2
  ``start()`` will be removed in Loguru 1.0.0, it is replaced by ``add()`` which is a less
  confusing name.

---
## stop
```python
from _logger import stop
```

Deprecated function to |remove| an existing handler.

Warnings
--------
.. deprecated:: 0.2.2
  ``stop()`` will be removed in Loguru 1.0.0, it is replaced by ``remove()`` which is a less
  confusing name.

---
## AwaitableCompleter
```python
from _logger import AwaitableCompleter
```



---
## Catcher
```python
from _logger import Catcher
```



---
## __await__
```python
from _logger import __await__
```



---
## __enter__
```python
from _logger import __enter__
```



---
## __exit__
```python
from _logger import __exit__
```



---
## __call__
```python
from _logger import __call__
```



---
## cast_function
```python
from _logger import cast_function
```



---
## modules_depth
```python
from _logger import modules_depth
```



---
## catch_wrapper
```python
from _logger import catch_wrapper
```



---
## __name__
```python
from _asyncio_loop import __name__
```



---
## load_loop_functions
```python
from _asyncio_loop import load_loop_functions
```



---
## get_task_loop
```python
from _asyncio_loop import get_task_loop
```



---
## get_running_loop
```python
from _asyncio_loop import get_running_loop
```



---
## __name__
```python
from _simple_sinks import __name__
```



---
## StreamSink
```python
from _simple_sinks import StreamSink
```



---
## StandardSink
```python
from _simple_sinks import StandardSink
```



---
## AsyncSink
```python
from _simple_sinks import AsyncSink
```



---
## CallableSink
```python
from _simple_sinks import CallableSink
```



---
## __init__
```python
from _simple_sinks import __init__
```



---
## write
```python
from _simple_sinks import write
```



---
## stop
```python
from _simple_sinks import stop
```



---
## tasks_to_complete
```python
from _simple_sinks import tasks_to_complete
```



---
## __getstate__
```python
from _simple_sinks import __getstate__
```



---
## __setstate__
```python
from _simple_sinks import __setstate__
```



---
## check_exception
```python
from _simple_sinks import check_exception
```



---
## __name__
```python
from _string_parsers import __name__
```



---
## Frequencies
```python
from _string_parsers import Frequencies
```



---
## parse_size
```python
from _string_parsers import parse_size
```



---
## parse_duration
```python
from _string_parsers import parse_duration
```



---
## parse_frequency
```python
from _string_parsers import parse_frequency
```



---
## parse_day
```python
from _string_parsers import parse_day
```



---
## parse_time
```python
from _string_parsers import parse_time
```



---
## parse_daytime
```python
from _string_parsers import parse_daytime
```



---
## hourly
```python
from _string_parsers import hourly
```



---
## daily
```python
from _string_parsers import daily
```



---
## weekly
```python
from _string_parsers import weekly
```



---
## monthly
```python
from _string_parsers import monthly
```



---
## yearly
```python
from _string_parsers import yearly
```



---
## __name__
```python
from _error_interceptor import __name__
```



---
## ErrorInterceptor
```python
from _error_interceptor import ErrorInterceptor
```



---
## __init__
```python
from _error_interceptor import __init__
```



---
## should_catch
```python
from _error_interceptor import should_catch
```



---
## print
```python
from _error_interceptor import print
```



---
## __name__
```python
from _get_frame import __name__
```



---
## get_frame_fallback
```python
from _get_frame import get_frame_fallback
```



---
## load_get_frame_function
```python
from _get_frame import load_get_frame_function
```



---
## __name__
```python
from _filters import __name__
```



---
## filter_none
```python
from _filters import filter_none
```



---
## filter_by_name
```python
from _filters import filter_by_name
```



---
## filter_by_level
```python
from _filters import filter_by_level
```



---
## __name__
```python
from _datetime import __name__
```

Contains utilities to handle datetimes in Huggingface Hub.

---
## datetime
```python
from _datetime import datetime
```



---
## aware_now
```python
from _datetime import aware_now
```



---
## __format__
```python
from _datetime import __format__
```



---
## get
```python
from _datetime import get
```



---
## __name__
```python
from _recattrs import __name__
```



---
## RecordLevel
```python
from _recattrs import RecordLevel
```



---
## RecordFile
```python
from _recattrs import RecordFile
```



---
## RecordThread
```python
from _recattrs import RecordThread
```



---
## RecordProcess
```python
from _recattrs import RecordProcess
```



---
## RecordException
```python
from _recattrs import RecordException
```



---
## __init__
```python
from _recattrs import __init__
```



---
## __repr__
```python
from _recattrs import __repr__
```



---
## __format__
```python
from _recattrs import __format__
```



---
## __reduce__
```python
from _recattrs import __reduce__
```



---
## _from_pickled_value
```python
from _recattrs import _from_pickled_value
```



---
## __name__
```python
from _ctime_functions import __name__
```



---
## load_ctime_functions
```python
from _ctime_functions import load_ctime_functions
```



---
## get_ctime_fallback
```python
from _ctime_functions import get_ctime_fallback
```



---
## set_ctime_fallback
```python
from _ctime_functions import set_ctime_fallback
```



---
## get_ctime_windows
```python
from _ctime_functions import get_ctime_windows
```



---
## set_ctime_windows
```python
from _ctime_functions import set_ctime_windows
```



---
## get_ctime_macos
```python
from _ctime_functions import get_ctime_macos
```



---
## set_ctime_macos
```python
from _ctime_functions import set_ctime_macos
```



---
## get_ctime_linux
```python
from _ctime_functions import get_ctime_linux
```



---
## set_ctime_linux
```python
from _ctime_functions import set_ctime_linux
```



---
## __name__
```python
from _constants import __name__
```

_constants
======

Constants relevant for the Python implementation.

---
## RequestOptions
```python
from _types import RequestOptions
```



---
## NotGiven
```python
from _types import NotGiven
```

A sentinel singleton class used to distinguish omitted keyword arguments
from those passed in with the value None (which may have different behavior).

For example:

```py
def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ...


get(timeout=1)  # 1s timeout
get(timeout=None)  # No timeout
get()  # Default timeout behavior, which may not be statically known at the method definition.
```

---
## Omit
```python
from _types import Omit
```

In certain situations you need to be able to represent a case where a default value has
to be explicitly removed and `None` is not an appropriate substitute, for example:

```py
# as the default `Content-Type` header is `application/json` that will be sent
client.post("/upload/files", files={"file": b"my raw file content"})

# you can't explicitly override the header as it has to be dynamically generated
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
client.post(..., headers={"Content-Type": "multipart/form-data"})

# instead you can remove the default `application/json` header by passing Omit
client.post(..., headers={"Content-Type": Omit()})
```

---
## ModelBuilderProtocol
```python
from _types import ModelBuilderProtocol
```



---
## HeadersLikeProtocol
```python
from _types import HeadersLikeProtocol
```



---
## InheritsGeneric
```python
from _types import InheritsGeneric
```

Represents a type that has inherited from `Generic`

The `__orig_bases__` property can be used to determine the resolved
type variable for a given base class.

---
## _GenericAlias
```python
from _types import _GenericAlias
```



---
## HttpxSendArgs
```python
from _types import HttpxSendArgs
```



---
## __bool__
```python
from _types import __bool__
```



---
## build
```python
from _types import build
```



---
## get
```python
from _types import get
```



---
## __name__
```python
from _base_client import __name__
```



---
## PageInfo
```python
from _base_client import PageInfo
```

Stores the necessary information to build the request to retrieve the next page.

Either `url` or `params` must be set.

---
## BasePage
```python
from _base_client import BasePage
```

Defines the core interface for pagination.

Type Args:
    ModelT: The pydantic model that represents an item in the response.

Methods:
    has_next_page(): Check if there is another page available
    next_page_info(): Get the necessary information to make a request for the next page

---
## BaseSyncPage
```python
from _base_client import BaseSyncPage
```



---
## AsyncPaginator
```python
from _base_client import AsyncPaginator
```



---
## BaseAsyncPage
```python
from _base_client import BaseAsyncPage
```



---
## BaseClient
```python
from _base_client import BaseClient
```



---
## _DefaultHttpxClient
```python
from _base_client import _DefaultHttpxClient
```



---
## SyncHttpxClientWrapper
```python
from _base_client import SyncHttpxClientWrapper
```



---
## SyncAPIClient
```python
from _base_client import SyncAPIClient
```



---
## _DefaultAsyncHttpxClient
```python
from _base_client import _DefaultAsyncHttpxClient
```



---
## AsyncHttpxClientWrapper
```python
from _base_client import AsyncHttpxClientWrapper
```



---
## AsyncAPIClient
```python
from _base_client import AsyncAPIClient
```



---
## make_request_options
```python
from _base_client import make_request_options
```

Create a dict of type RequestOptions without keys of NotGiven values.

---
## ForceMultipartDict
```python
from _base_client import ForceMultipartDict
```



---
## OtherPlatform
```python
from _base_client import OtherPlatform
```



---
## get_platform
```python
from _base_client import get_platform
```



---
## platform_headers
```python
from _base_client import platform_headers
```



---
## OtherArch
```python
from _base_client import OtherArch
```



---
## get_python_runtime
```python
from _base_client import get_python_runtime
```



---
## get_python_version
```python
from _base_client import get_python_version
```



---
## get_architecture
```python
from _base_client import get_architecture
```



---
## _merge_mappings
```python
from _base_client import _merge_mappings
```

Merge two mappings of the same type, removing any values that are instances of `Omit`.

In cases with duplicate keys the second mapping takes precedence.

---
## __init__
```python
from _base_client import __init__
```



---
## has_next_page
```python
from _base_client import has_next_page
```



---
## next_page_info
```python
from _base_client import next_page_info
```



---
## _get_page_items
```python
from _base_client import _get_page_items
```



---
## _params_from_url
```python
from _base_client import _params_from_url
```



---
## _info_to_options
```python
from _base_client import _info_to_options
```



---
## _set_private_attributes
```python
from _base_client import _set_private_attributes
```



---
## __iter__
```python
from _base_client import __iter__
```



---
## iter_pages
```python
from _base_client import iter_pages
```



---
## get_next_page
```python
from _base_client import get_next_page
```



---
## __await__
```python
from _base_client import __await__
```



---
## _enforce_trailing_slash
```python
from _base_client import _enforce_trailing_slash
```



---
## _make_status_error_from_response
```python
from _base_client import _make_status_error_from_response
```



---
## _make_status_error
```python
from _base_client import _make_status_error
```



---
## _build_headers
```python
from _base_client import _build_headers
```



---
## _prepare_url
```python
from _base_client import _prepare_url
```

Merge a URL argument together with any 'base_url' on the client,
to create the URL used for the outgoing request.

---
## _make_sse_decoder
```python
from _base_client import _make_sse_decoder
```



---
## _build_request
```python
from _base_client import _build_request
```



---
## _serialize_multipartform
```python
from _base_client import _serialize_multipartform
```



---
## _maybe_override_cast_to
```python
from _base_client import _maybe_override_cast_to
```



---
## _should_stream_response_body
```python
from _base_client import _should_stream_response_body
```



---
## _process_response_data
```python
from _base_client import _process_response_data
```



---
## qs
```python
from _base_client import qs
```



---
## custom_auth
```python
from _base_client import custom_auth
```



---
## auth_headers
```python
from _base_client import auth_headers
```



---
## default_headers
```python
from _base_client import default_headers
```



---
## default_query
```python
from _base_client import default_query
```



---
## _validate_headers
```python
from _base_client import _validate_headers
```

Validate the given default headers and custom headers.

Does nothing by default.

---
## user_agent
```python
from _base_client import user_agent
```



---
## base_url
```python
from _base_client import base_url
```



---
## _parse_retry_after_header
```python
from _base_client import _parse_retry_after_header
```

Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified.

About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
See also  https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#syntax

---
## _calculate_retry_timeout
```python
from _base_client import _calculate_retry_timeout
```



---
## _should_retry
```python
from _base_client import _should_retry
```



---
## _idempotency_key
```python
from _base_client import _idempotency_key
```



---
## __del__
```python
from _base_client import __del__
```



---
## is_closed
```python
from _base_client import is_closed
```



---
## close
```python
from _base_client import close
```

Close the underlying HTTPX client.

The client will *not* be usable after this.

---
## __enter__
```python
from _base_client import __enter__
```



---
## __exit__
```python
from _base_client import __exit__
```



---
## _prepare_options
```python
from _base_client import _prepare_options
```

Hook for mutating the given options

---
## _prepare_request
```python
from _base_client import _prepare_request
```

This method is used as a callback for mutating the `Request` object
after it has been constructed.
This is useful for cases where you want to add certain headers based off of
the request properties, e.g. `url`, `method` etc.

---
## request
```python
from _base_client import request
```



---
## _request
```python
from _base_client import _request
```



---
## _retry_request
```python
from _base_client import _retry_request
```



---
## _process_response
```python
from _base_client import _process_response
```



---
## _request_api_list
```python
from _base_client import _request_api_list
```



---
## get
```python
from _base_client import get
```



---
## post
```python
from _base_client import post
```



---
## patch
```python
from _base_client import patch
```



---
## put
```python
from _base_client import put
```



---
## delete
```python
from _base_client import delete
```



---
## get_api_list
```python
from _base_client import get_api_list
```



---
## __bool__
```python
from _base_client import __bool__
```



---
## __str__
```python
from _base_client import __str__
```



---
## _parser
```python
from _base_client import _parser
```



---
## __name__
```python
from _response import __name__
```



---
## BaseAPIResponse
```python
from _response import BaseAPIResponse
```



---
## APIResponse
```python
from _response import APIResponse
```



---
## AsyncAPIResponse
```python
from _response import AsyncAPIResponse
```



---
## BinaryAPIResponse
```python
from _response import BinaryAPIResponse
```

Subclass of APIResponse providing helpers for dealing with binary data.

Note: If you want to stream the response data instead of eagerly reading it
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `.with_streaming_response.get_binary_response()`

---
## AsyncBinaryAPIResponse
```python
from _response import AsyncBinaryAPIResponse
```

Subclass of APIResponse providing helpers for dealing with binary data.

Note: If you want to stream the response data instead of eagerly reading it
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `.with_streaming_response.get_binary_response()`

---
## StreamedBinaryAPIResponse
```python
from _response import StreamedBinaryAPIResponse
```



---
## AsyncStreamedBinaryAPIResponse
```python
from _response import AsyncStreamedBinaryAPIResponse
```



---
## MissingStreamClassError
```python
from _response import MissingStreamClassError
```



---
## StreamAlreadyConsumed
```python
from _response import StreamAlreadyConsumed
```

Attempted to read or stream content, but the content has already
been streamed.

This can happen if you use a method like `.iter_lines()` and then attempt
to read th entire response body afterwards, e.g.

```py
response = await client.post(...)
async for line in response.iter_lines():
    ...  # do something with `line`

content = await response.read()
# ^ error
```

If you want this behaviour you'll need to either manually accumulate the response
content or call `await response.read()` before iterating over the stream.

---
## ResponseContextManager
```python
from _response import ResponseContextManager
```

Context manager for ensuring that a request is not made
until it is entered and that the response will always be closed
when the context manager exits

---
## AsyncResponseContextManager
```python
from _response import AsyncResponseContextManager
```

Context manager for ensuring that a request is not made
until it is entered and that the response will always be closed
when the context manager exits

---
## to_streamed_response_wrapper
```python
from _response import to_streamed_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support streaming and returning the raw `APIResponse` object directly.

---
## async_to_streamed_response_wrapper
```python
from _response import async_to_streamed_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support streaming and returning the raw `APIResponse` object directly.

---
## to_custom_streamed_response_wrapper
```python
from _response import to_custom_streamed_response_wrapper
```

Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support streaming and returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`

---
## async_to_custom_streamed_response_wrapper
```python
from _response import async_to_custom_streamed_response_wrapper
```

Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support streaming and returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`

---
## to_raw_response_wrapper
```python
from _response import to_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support returning the raw `APIResponse` object directly.

---
## async_to_raw_response_wrapper
```python
from _response import async_to_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support returning the raw `APIResponse` object directly.

---
## to_custom_raw_response_wrapper
```python
from _response import to_custom_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`

---
## async_to_custom_raw_response_wrapper
```python
from _response import async_to_custom_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`

---
## extract_response_type
```python
from _response import extract_response_type
```

Given a type like `APIResponse[T]`, returns the generic type variable `T`.

This also handles the case where a concrete subclass is given, e.g.
```py
class MyResponse(APIResponse[bytes]):
    ...

extract_response_type(MyResponse) -> bytes
```

---
## __init__
```python
from _response import __init__
```



---
## headers
```python
from _response import headers
```



---
## http_request
```python
from _response import http_request
```

Returns the httpx Request instance associated with the current response.

---
## status_code
```python
from _response import status_code
```



---
## url
```python
from _response import url
```

Returns the URL for which the request was made.

---
## method
```python
from _response import method
```



---
## http_version
```python
from _response import http_version
```



---
## elapsed
```python
from _response import elapsed
```

The time taken for the complete request/response cycle to complete.

---
## is_closed
```python
from _response import is_closed
```

Whether or not the response body has been closed.

If this is False then there is response data that has not been read yet.
You must either fully consume the response body or call `.close()`
before discarding the response to prevent resource leaks.

---
## __repr__
```python
from _response import __repr__
```



---
## _parse
```python
from _response import _parse
```



---
## request_id
```python
from _response import request_id
```



---
## parse
```python
from _response import parse
```

Returns the rich python representation of this response's data.

For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

You can customise the type that the response is parsed into through
the `to` argument, e.g.

```py
from openai import BaseModel


class MyModel(BaseModel):
    foo: str


obj = response.parse(to=MyModel)
print(obj.foo)
```

We support parsing:
  - `BaseModel`
  - `dict`
  - `list`
  - `Union`
  - `str`
  - `int`
  - `float`
  - `httpx.Response`

---
## read
```python
from _response import read
```

Read and return the binary response content.

---
## text
```python
from _response import text
```

Read and decode the response content into a string.

---
## json
```python
from _response import json
```

Read and decode the JSON response content.

---
## close
```python
from _response import close
```

Close the response and release the connection.

Automatically called if the response body is read to completion.

---
## iter_bytes
```python
from _response import iter_bytes
```

A byte-iterator over the decoded response content.

This automatically handles gzip, deflate and brotli encoded responses.

---
## iter_text
```python
from _response import iter_text
```

A str-iterator over the decoded response content
that handles both gzip, deflate, etc but also detects the content's
string encoding.

---
## iter_lines
```python
from _response import iter_lines
```

Like `iter_text()` but will only yield chunks for each line

---
## write_to_file
```python
from _response import write_to_file
```

Write the output to the given file.

Accepts a filename or any path-like object, e.g. pathlib.Path

Note: if you want to stream the data to the file instead of writing
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `.with_streaming_response.get_binary_response()`

---
## stream_to_file
```python
from _response import stream_to_file
```

Streams the output to the given file.

Accepts a filename or any path-like object, e.g. pathlib.Path

---
## __enter__
```python
from _response import __enter__
```



---
## __exit__
```python
from _response import __exit__
```



---
## wrapped
```python
from _response import wrapped
```



---
## __name__
```python
from _legacy_response import __name__
```



---
## LegacyAPIResponse
```python
from _legacy_response import LegacyAPIResponse
```

This is a legacy class as it will be replaced by `APIResponse`
and `AsyncAPIResponse` in the `_response.py` file in the next major
release.

For the sync client this will mostly be the same with the exception
of `content` & `text` will be methods instead of properties. In the
async client, all methods will be async.

A migration script will be provided & the migration in general should
be smooth.

---
## MissingStreamClassError
```python
from _legacy_response import MissingStreamClassError
```



---
## to_raw_response_wrapper
```python
from _legacy_response import to_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support returning the raw `APIResponse` object directly.

---
## async_to_raw_response_wrapper
```python
from _legacy_response import async_to_raw_response_wrapper
```

Higher order function that takes one of our bound API methods and wraps it
to support returning the raw `APIResponse` object directly.

---
## HttpxBinaryResponseContent
```python
from _legacy_response import HttpxBinaryResponseContent
```



---
## __init__
```python
from _legacy_response import __init__
```



---
## request_id
```python
from _legacy_response import request_id
```



---
## parse
```python
from _legacy_response import parse
```

Returns the rich python representation of this response's data.

NOTE: For the async client: this will become a coroutine in the next major version.

For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

You can customise the type that the response is parsed into through
the `to` argument, e.g.

```py
from openai import BaseModel


class MyModel(BaseModel):
    foo: str


obj = response.parse(to=MyModel)
print(obj.foo)
```

We support parsing:
  - `BaseModel`
  - `dict`
  - `list`
  - `Union`
  - `str`
  - `int`
  - `float`
  - `httpx.Response`

---
## headers
```python
from _legacy_response import headers
```



---
## http_request
```python
from _legacy_response import http_request
```



---
## status_code
```python
from _legacy_response import status_code
```



---
## url
```python
from _legacy_response import url
```



---
## method
```python
from _legacy_response import method
```



---
## content
```python
from _legacy_response import content
```



---
## text
```python
from _legacy_response import text
```



---
## http_version
```python
from _legacy_response import http_version
```



---
## is_closed
```python
from _legacy_response import is_closed
```



---
## elapsed
```python
from _legacy_response import elapsed
```

The time taken for the complete request/response cycle to complete.

---
## _parse
```python
from _legacy_response import _parse
```



---
## __repr__
```python
from _legacy_response import __repr__
```



---
## wrapped
```python
from _legacy_response import wrapped
```



---
## encoding
```python
from _legacy_response import encoding
```



---
## charset_encoding
```python
from _legacy_response import charset_encoding
```



---
## json
```python
from _legacy_response import json
```



---
## read
```python
from _legacy_response import read
```



---
## iter_bytes
```python
from _legacy_response import iter_bytes
```



---
## iter_text
```python
from _legacy_response import iter_text
```



---
## iter_lines
```python
from _legacy_response import iter_lines
```



---
## iter_raw
```python
from _legacy_response import iter_raw
```



---
## write_to_file
```python
from _legacy_response import write_to_file
```

Write the output to the given file.

Accepts a filename or any path-like object, e.g. pathlib.Path

Note: if you want to stream the data to the file instead of writing
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')`

---
## stream_to_file
```python
from _legacy_response import stream_to_file
```



---
## close
```python
from _legacy_response import close
```



---
## __name__
```python
from _resource import __name__
```



---
## SyncAPIResource
```python
from _resource import SyncAPIResource
```



---
## AsyncAPIResource
```python
from _resource import AsyncAPIResource
```



---
## __init__
```python
from _resource import __init__
```



---
## _sleep
```python
from _resource import _sleep
```



---
## __name__
```python
from _files import __name__
```



---
## is_base64_file_input
```python
from _files import is_base64_file_input
```



---
## is_file_content
```python
from _files import is_file_content
```



---
## assert_is_file_content
```python
from _files import assert_is_file_content
```



---
## to_httpx_files
```python
from _files import to_httpx_files
```



---
## _transform_file
```python
from _files import _transform_file
```



---
## _read_file_content
```python
from _files import _read_file_content
```



---
## __name__
```python
from _streaming import __name__
```



---
## _SyncStreamMeta
```python
from _streaming import _SyncStreamMeta
```



---
## Stream
```python
from _streaming import Stream
```

Provides the core interface to iterate over a synchronous stream response.

---
## _AsyncStreamMeta
```python
from _streaming import _AsyncStreamMeta
```



---
## AsyncStream
```python
from _streaming import AsyncStream
```

Provides the core interface to iterate over an asynchronous stream response.

---
## ServerSentEvent
```python
from _streaming import ServerSentEvent
```



---
## SSEDecoder
```python
from _streaming import SSEDecoder
```



---
## SSEBytesDecoder
```python
from _streaming import SSEBytesDecoder
```



---
## is_stream_class_type
```python
from _streaming import is_stream_class_type
```

TypeGuard for determining whether or not the given type is a subclass of `Stream` / `AsyncStream`

---
## extract_stream_chunk_type
```python
from _streaming import extract_stream_chunk_type
```

Given a type like `Stream[T]`, returns the generic type variable `T`.

This also handles the case where a concrete subclass is given, e.g.
```py
class MyStream(Stream[bytes]):
    ...

extract_stream_chunk_type(MyStream) -> bytes
```

---
## __instancecheck__
```python
from _streaming import __instancecheck__
```



---
## __init__
```python
from _streaming import __init__
```



---
## __next__
```python
from _streaming import __next__
```



---
## __iter__
```python
from _streaming import __iter__
```



---
## _iter_events
```python
from _streaming import _iter_events
```



---
## __stream__
```python
from _streaming import __stream__
```



---
## __enter__
```python
from _streaming import __enter__
```



---
## __exit__
```python
from _streaming import __exit__
```



---
## close
```python
from _streaming import close
```

Close the response and release the connection.

Automatically called if the response body is read to completion.

---
## event
```python
from _streaming import event
```



---
## id
```python
from _streaming import id
```



---
## retry
```python
from _streaming import retry
```



---
## data
```python
from _streaming import data
```



---
## json
```python
from _streaming import json
```



---
## __repr__
```python
from _streaming import __repr__
```



---
## iter_bytes
```python
from _streaming import iter_bytes
```

Given an iterator that yields raw binary data, iterate over it & yield every event encountered

---
## _iter_chunks
```python
from _streaming import _iter_chunks
```

Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks

---
## decode
```python
from _streaming import decode
```



---
## aiter_bytes
```python
from _streaming import aiter_bytes
```

Given an async iterator that yields raw binary data, iterate over it & yield every event encountered

---
## __name__
```python
from _tokenizers import __name__
```



---
## _get_tokenizer_cache_path
```python
from _tokenizers import _get_tokenizer_cache_path
```



---
## _load_tokenizer
```python
from _tokenizers import _load_tokenizer
```



---
## sync_get_tokenizer
```python
from _tokenizers import sync_get_tokenizer
```



---
## Anthropic
```python
from _client import Anthropic
```



---
## AsyncAnthropic
```python
from _client import AsyncAnthropic
```



---
## AnthropicWithRawResponse
```python
from _client import AnthropicWithRawResponse
```



---
## AsyncAnthropicWithRawResponse
```python
from _client import AsyncAnthropicWithRawResponse
```



---
## AnthropicWithStreamedResponse
```python
from _client import AnthropicWithStreamedResponse
```



---
## AsyncAnthropicWithStreamedResponse
```python
from _client import AsyncAnthropicWithStreamedResponse
```



---
## qs
```python
from _client import qs
```



---
## auth_headers
```python
from _client import auth_headers
```



---
## _api_key_auth
```python
from _client import _api_key_auth
```



---
## _bearer_auth
```python
from _client import _bearer_auth
```



---
## default_headers
```python
from _client import default_headers
```



---
## _validate_headers
```python
from _client import _validate_headers
```



---
## copy
```python
from _client import copy
```

Create a new client instance re-using the same options given to the current client with optional overriding.

---
## count_tokens
```python
from _client import count_tokens
```

Count the number of tokens in a given string.

Note that this is only accurate for older models, e.g. `claude-2.1`. For newer
models this can only be used as a _very_ rough estimate, instead you should rely
on the `usage` property in the response for exact counts.

---
## get_tokenizer
```python
from _client import get_tokenizer
```



---
## _make_status_error
```python
from _client import _make_status_error
```



---
## __name__
```python
from _qs import __name__
```



---
## Querystring
```python
from _qs import Querystring
```



---
## Options
```python
from _qs import Options
```



---
## __init__
```python
from _qs import __init__
```



---
## parse
```python
from _qs import parse
```



---
## stringify
```python
from _qs import stringify
```



---
## stringify_items
```python
from _qs import stringify_items
```



---
## _stringify_item
```python
from _qs import _stringify_item
```



---
## _primitive_value_to_str
```python
from _qs import _primitive_value_to_str
```



---
## _ConfigProtocol
```python
from _models import _ConfigProtocol
```



---
## BaseModel
```python
from _models import BaseModel
```



---
## _construct_field
```python
from _models import _construct_field
```



---
## is_basemodel
```python
from _models import is_basemodel
```

Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`

---
## is_basemodel_type
```python
from _models import is_basemodel_type
```



---
## build
```python
from _models import build
```

Construct a BaseModel class without validation.

This is useful for cases where you need to instantiate a `BaseModel`
from an API response as this provides type-safe params which isn't supported
by helpers like `construct_type()`.

```py
build(MyModel, my_field_a="foo", my_field_b=123)
```

---
## construct_type_unchecked
```python
from _models import construct_type_unchecked
```

Loose coercion to the expected type with construction of nested values.

Note: the returned value from this function is not guaranteed to match the
given type.

---
## construct_type
```python
from _models import construct_type
```

Loose coercion to the expected type with construction of nested values.

If the given value does not match the expected type then it is returned as-is.

---
## CachedDiscriminatorType
```python
from _models import CachedDiscriminatorType
```



---
## DiscriminatorDetails
```python
from _models import DiscriminatorDetails
```



---
## _build_discriminated_union_meta
```python
from _models import _build_discriminated_union_meta
```



---
## _extract_field_schema_pv2
```python
from _models import _extract_field_schema_pv2
```



---
## validate_type
```python
from _models import validate_type
```

Strict validation that the given value matches the expected type

---
## set_pydantic_config
```python
from _models import set_pydantic_config
```

Add a pydantic config for the given type.

Note: this is a no-op on Pydantic v1.

---
## FinalRequestOptionsInput
```python
from _models import FinalRequestOptionsInput
```



---
## FinalRequestOptions
```python
from _models import FinalRequestOptions
```



---
## to_dict
```python
from _models import to_dict
```

Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

By default, fields that were not set by the API will not be included,
and keys will match the API response, *not* the property names from the model.

For example, if the API responds with `"fooBar": true` but we've defined a `foo_bar: bool` property,
the output will use the `"fooBar"` key (unless `use_api_names=False` is passed).

Args:
    mode:
        If mode is 'json', the dictionary will only contain JSON serializable types. e.g. `datetime` will be turned into a string, `"2024-3-22T18:11:19.117000Z"`.
        If mode is 'python', the dictionary may contain any Python objects. e.g. `datetime(2024, 3, 22)`

    use_api_names: Whether to use the key that the API responded with or the property name. Defaults to `True`.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value from the output.
    exclude_none: Whether to exclude fields that have a value of `None` from the output.
    warnings: Whether to log warnings when invalid fields are encountered. This is only supported in Pydantic v2.

---
## to_json
```python
from _models import to_json
```

Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation).

By default, fields that were not set by the API will not be included,
and keys will match the API response, *not* the property names from the model.

For example, if the API responds with `"fooBar": true` but we've defined a `foo_bar: bool` property,
the output will use the `"fooBar"` key (unless `use_api_names=False` is passed).

Args:
    indent: Indentation to use in the JSON output. If `None` is passed, the output will be compact. Defaults to `2`
    use_api_names: Whether to use the key that the API responded with or the property name. Defaults to `True`.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that have the default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    warnings: Whether to show any warnings that occurred during serialization. This is only supported in Pydantic v2.

---
## construct
```python
from _models import construct
```



---
## GenericModel
```python
from _models import GenericModel
```



---
## _validate_non_model_type
```python
from _models import _validate_non_model_type
```



---
## get_max_retries
```python
from _models import get_max_retries
```



---
## _strip_raw_response_header
```python
from _models import _strip_raw_response_header
```



---
## model_fields_set
```python
from _models import model_fields_set
```



---
## Config
```python
from _models import Config
```



---
## model_dump
```python
from _models import model_dump
```

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the dictionary will only contain JSON serializable types.
        If mode is 'python', the dictionary may contain any Python objects.
    include: A list of fields to include in the output.
    exclude: A list of fields to exclude from the output.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that are unset or None from the output.
    exclude_defaults: Whether to exclude fields that are set to their default value from the output.
    exclude_none: Whether to exclude fields that have a value of `None` from the output.
    round_trip: Whether to enable serialization and deserialization round-trip support.
    warnings: Whether to log warnings when invalid fields are encountered.

Returns:
    A dictionary representation of the model.

---
## model_dump_json
```python
from _models import model_dump_json
```

Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output. Can take either a string or set of strings.
    exclude: Field(s) to exclude from the JSON output. Can take either a string or set of strings.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that have the default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: Whether to use serialization/deserialization between JSON and class instance.
    warnings: Whether to show any warnings that occurred during serialization.

Returns:
    A JSON string representation of the model.

---
## RootModel
```python
from _models import RootModel
```

Used as a placeholder to easily convert runtime types to a Pydantic format
to provide validation.

For example:
```py
validated = RootModel[int](__root__="5").__root__
# validated: 5
```

---
## _create_pydantic_model
```python
from _models import _create_pydantic_model
```



---
## parse_obj
```python
from _compat import parse_obj
```



---
## field_is_required
```python
from _compat import field_is_required
```



---
## field_get_default
```python
from _compat import field_get_default
```



---
## field_outer_type
```python
from _compat import field_outer_type
```



---
## get_model_config
```python
from _compat import get_model_config
```



---
## model_copy
```python
from _compat import model_copy
```



---
## model_json
```python
from _compat import model_json
```



---
## model_dump
```python
from _compat import model_dump
```



---
## model_parse
```python
from _compat import model_parse
```



---
## parse_date
```python
from _compat import parse_date
```



---
## parse_datetime
```python
from _compat import parse_datetime
```



---
## get_args
```python
from _compat import get_args
```



---
## is_union
```python
from _compat import is_union
```



---
## get_origin
```python
from _compat import get_origin
```



---
## is_literal_type
```python
from _compat import is_literal_type
```



---
## is_typeddict
```python
from _compat import is_typeddict
```



---
## GenericModel
```python
from _compat import GenericModel
```



---
## typed_cached_property
```python
from _compat import typed_cached_property
```



---
## __get__
```python
from _compat import __get__
```



---
## __set_name__
```python
from _compat import __set_name__
```



---
## __set__
```python
from _compat import __set__
```



---
## AnthropicError
```python
from _exceptions import AnthropicError
```



---
## APIError
```python
from _exceptions import APIError
```



---
## APIResponseValidationError
```python
from _exceptions import APIResponseValidationError
```



---
## APIStatusError
```python
from _exceptions import APIStatusError
```

Raised when an API response has a status code of 4xx or 5xx.

---
## APIConnectionError
```python
from _exceptions import APIConnectionError
```



---
## APITimeoutError
```python
from _exceptions import APITimeoutError
```



---
## BadRequestError
```python
from _exceptions import BadRequestError
```



---
## AuthenticationError
```python
from _exceptions import AuthenticationError
```



---
## PermissionDeniedError
```python
from _exceptions import PermissionDeniedError
```



---
## NotFoundError
```python
from _exceptions import NotFoundError
```



---
## ConflictError
```python
from _exceptions import ConflictError
```



---
## UnprocessableEntityError
```python
from _exceptions import UnprocessableEntityError
```



---
## RateLimitError
```python
from _exceptions import RateLimitError
```



---
## InternalServerError
```python
from _exceptions import InternalServerError
```



---
## ColourizedFormatter
```python
from logging import ColourizedFormatter
```

A custom log formatter class that:

* Outputs the LOG_LEVEL with an appropriate color.
* If a log call includes an `extras={"color_message": ...}` it will be used
  for formatting the output, instead of the plain text message.

---
## DefaultFormatter
```python
from logging import DefaultFormatter
```



---
## AccessFormatter
```python
from logging import AccessFormatter
```



---
## color_level_name
```python
from logging import color_level_name
```



---
## should_use_colors
```python
from logging import should_use_colors
```



---
## formatMessage
```python
from logging import formatMessage
```



---
## get_status_code
```python
from logging import get_status_code
```



---
## default
```python
from logging import default
```



---
## ASGIVersions
```python
from _types import ASGIVersions
```



---
## HTTPScope
```python
from _types import HTTPScope
```



---
## WebSocketScope
```python
from _types import WebSocketScope
```



---
## LifespanScope
```python
from _types import LifespanScope
```



---
## HTTPRequestEvent
```python
from _types import HTTPRequestEvent
```



---
## HTTPResponseDebugEvent
```python
from _types import HTTPResponseDebugEvent
```



---
## HTTPResponseStartEvent
```python
from _types import HTTPResponseStartEvent
```



---
## HTTPResponseBodyEvent
```python
from _types import HTTPResponseBodyEvent
```



---
## HTTPResponseTrailersEvent
```python
from _types import HTTPResponseTrailersEvent
```



---
## HTTPServerPushEvent
```python
from _types import HTTPServerPushEvent
```



---
## HTTPDisconnectEvent
```python
from _types import HTTPDisconnectEvent
```



---
## WebSocketConnectEvent
```python
from _types import WebSocketConnectEvent
```



---
## WebSocketAcceptEvent
```python
from _types import WebSocketAcceptEvent
```



---
## _WebSocketReceiveEventBytes
```python
from _types import _WebSocketReceiveEventBytes
```



---
## _WebSocketReceiveEventText
```python
from _types import _WebSocketReceiveEventText
```



---
## _WebSocketSendEventBytes
```python
from _types import _WebSocketSendEventBytes
```



---
## _WebSocketSendEventText
```python
from _types import _WebSocketSendEventText
```



---
## WebSocketResponseStartEvent
```python
from _types import WebSocketResponseStartEvent
```



---
## WebSocketResponseBodyEvent
```python
from _types import WebSocketResponseBodyEvent
```



---
## WebSocketDisconnectEvent
```python
from _types import WebSocketDisconnectEvent
```



---
## WebSocketCloseEvent
```python
from _types import WebSocketCloseEvent
```



---
## LifespanStartupEvent
```python
from _types import LifespanStartupEvent
```



---
## LifespanShutdownEvent
```python
from _types import LifespanShutdownEvent
```



---
## LifespanStartupCompleteEvent
```python
from _types import LifespanStartupCompleteEvent
```



---
## LifespanStartupFailedEvent
```python
from _types import LifespanStartupFailedEvent
```



---
## LifespanShutdownCompleteEvent
```python
from _types import LifespanShutdownCompleteEvent
```



---
## LifespanShutdownFailedEvent
```python
from _types import LifespanShutdownFailedEvent
```



---
## ASGI2Protocol
```python
from _types import ASGI2Protocol
```



---
## __init__
```python
from _types import __init__
```



---
## ServerState
```python
from server import ServerState
```

Shared servers state that is available between all protocol instances.

---
## Server
```python
from server import Server
```



---
## run
```python
from server import run
```



---
## _log_started_message
```python
from server import _log_started_message
```



---
## capture_signals
```python
from server import capture_signals
```



---
## handle_exit
```python
from server import handle_exit
```



---
## create_protocol
```python
from server import create_protocol
```



---
## _share_socket
```python
from server import _share_socket
```



---
## create_ssl_context
```python
from config import create_ssl_context
```



---
## is_dir
```python
from config import is_dir
```



---
## resolve_reload_patterns
```python
from config import resolve_reload_patterns
```



---
## _normalize_dirs
```python
from config import _normalize_dirs
```



---
## asgi_version
```python
from config import asgi_version
```



---
## is_ssl
```python
from config import is_ssl
```



---
## use_subprocess
```python
from config import use_subprocess
```



---
## configure_logging
```python
from config import configure_logging
```



---
## load
```python
from config import load
```



---
## setup_event_loop
```python
from config import setup_event_loop
```



---
## bind_socket
```python
from config import bind_socket
```



---
## should_reload
```python
from config import should_reload
```



---
## __name__
```python
from importer import __name__
```

Importer utilities for autodoc

---
## ImportFromStringError
```python
from importer import ImportFromStringError
```



---
## import_from_string
```python
from importer import import_from_string
```



---
## __name__
```python
from _subprocess import __name__
```

Contains utilities to easily handle subprocesses in `huggingface_hub`.

---
## get_subprocess
```python
from _subprocess import get_subprocess
```

Called in the parent process, to instantiate a new child process instance.
The child is not yet started at this point.

* config - The Uvicorn configuration instance.
* target - A callable that accepts a list of sockets. In practice this will
           be the `Server.run()` method.
* sockets - A list of sockets to pass to the server. Sockets are bound once
            by the parent process, and then passed to the child processes.

---
## subprocess_started
```python
from _subprocess import subprocess_started
```

Called when the child process starts.

* config - The Uvicorn configuration instance.
* target - A callable that accepts a list of sockets. In practice this will
           be the `Server.run()` method.
* sockets - A list of sockets to pass to the server. Sockets are bound once
            by the parent process, and then passed to the child processes.
* stdin_fileno - The file number of sys.stdin, so that it can be reattached
                 to the child process.

---
## __name__
```python
from workers import __name__
```



---
## UvicornWorker
```python
from workers import UvicornWorker
```

A worker class for Gunicorn that interfaces with an ASGI consumer callable,
rather than a WSGI callable.

---
## UvicornH11Worker
```python
from workers import UvicornH11Worker
```



---
## __init__
```python
from workers import __init__
```



---
## init_process
```python
from workers import init_process
```



---
## init_signals
```python
from workers import init_signals
```



---
## _install_sigquit_handler
```python
from workers import _install_sigquit_handler
```

Install a SIGQUIT handler on workers.

- https://github.com/encode/uvicorn/issues/1116
- https://github.com/benoitc/gunicorn/issues/2604

---
## run
```python
from workers import run
```



---
## print_version
```python
from main import print_version
```



---
## run
```python
from main import run
```



---
## __name__
```python
from plugins import __name__
```

Implements the plugin API for MkDocs.

---
## get_plugins
```python
from plugins import get_plugins
```

Return a dict of all installed Plugins as {name: EntryPoint}.

---
## BasePlugin
```python
from plugins import BasePlugin
```

Plugin base class.

All plugins should subclass this class.

---
## event_priority
```python
from plugins import event_priority
```

A decorator to set an event priority for an event handler method.

Recommended priority values:
`100` "first", `50` "early", `0` "default", `-50` "late", `-100` "last".
As different plugins discover more precise relations to each other, the values should be further tweaked.

Usage example:

```python
@plugins.event_priority(-100)  # Wishing to run this after all other plugins' `on_files` events.
def on_files(self, files, config, **kwargs):
    ...
```

New in MkDocs 1.4.
Recommended shim for backwards compatibility:

```python
try:
    from mkdocs.plugins import event_priority
except ImportError:
    event_priority = lambda priority: lambda f: f  # No-op fallback
```

---
## CombinedEvent
```python
from plugins import CombinedEvent
```

A descriptor that allows defining multiple event handlers and declaring them under one event's name.

Usage example:

```python
@plugins.event_priority(100)
def _on_page_markdown_1(self, markdown: str, **kwargs):
    ...

@plugins.event_priority(-50)
def _on_page_markdown_2(self, markdown: str, **kwargs):
    ...

on_page_markdown = plugins.CombinedEvent(_on_page_markdown_1, _on_page_markdown_2)
```

NOTE: The names of the sub-methods **can't** start with `on_`;
instead they can start with `_on_` like in the the above example, or anything else.

---
## PluginCollection
```python
from plugins import PluginCollection
```

A collection of plugins.

In addition to being a dict of Plugin instances, each event method is registered
upon being added. All registered methods for a given event can then be run in order
by calling `run_event`.

---
## PrefixedLogger
```python
from plugins import PrefixedLogger
```

A logger adapter to prefix log messages.

---
## get_plugin_logger
```python
from plugins import get_plugin_logger
```

Return a logger for plugins.

Arguments:
    name: The name to use with `logging.getLogger`.

Returns:
    A logger configured to work well in MkDocs,
        prefixing each message with the plugin package name.

Example:
    ```python
    from mkdocs.plugins import get_plugin_logger

    log = get_plugin_logger(__name__)
    log.info("My plugin message")
    ```

---
## __class_getitem__
```python
from plugins import __class_getitem__
```

Eliminates the need to write `config_class = FooConfig` when subclassing BasePlugin[FooConfig].

---
## __init_subclass__
```python
from plugins import __init_subclass__
```



---
## load_config
```python
from plugins import load_config
```

Load config from a dict of options. Returns a tuple of (errors, warnings).

---
## on_startup
```python
from plugins import on_startup
```



---
## on_shutdown
```python
from plugins import on_shutdown
```



---
## on_serve
```python
from plugins import on_serve
```



---
## on_config
```python
from plugins import on_config
```



---
## on_pre_build
```python
from plugins import on_pre_build
```



---
## on_files
```python
from plugins import on_files
```



---
## on_nav
```python
from plugins import on_nav
```



---
## on_env
```python
from plugins import on_env
```



---
## on_post_build
```python
from plugins import on_post_build
```



---
## on_build_error
```python
from plugins import on_build_error
```



---
## on_pre_template
```python
from plugins import on_pre_template
```



---
## on_template_context
```python
from plugins import on_template_context
```



---
## on_post_template
```python
from plugins import on_post_template
```



---
## on_pre_page
```python
from plugins import on_pre_page
```



---
## on_page_read_source
```python
from plugins import on_page_read_source
```



---
## on_page_markdown
```python
from plugins import on_page_markdown
```



---
## on_page_content
```python
from plugins import on_page_content
```



---
## on_page_context
```python
from plugins import on_page_context
```



---
## on_post_page
```python
from plugins import on_post_page
```



---
## decorator
```python
from plugins import decorator
```



---
## __init__
```python
from plugins import __init__
```

Initialize the logger adapter.

Arguments:
    prefix: The string to insert in front of every message.
    logger: The logger instance.

---
## __call__
```python
from plugins import __call__
```



---
## __get__
```python
from plugins import __get__
```



---
## _register_event
```python
from plugins import _register_event
```

Register a method for an event.

---
## __getitem__
```python
from plugins import __getitem__
```



---
## __setitem__
```python
from plugins import __setitem__
```



---
## run_event
```python
from plugins import run_event
```

Run all registered methods of an event.

`item` is the object to be modified or replaced and returned by the event method.
If it isn't given the event method creates a new object to be returned.
All other keywords are variables for context, but would not generally
be modified by the event method.

---
## process
```python
from plugins import process
```

Process the message.

Arguments:
    msg: The message:
    kwargs: Remaining arguments.

Returns:
    The processed message.

---
## locale
```python
from theme import locale
```



---
## custom_dir
```python
from theme import custom_dir
```



---
## _vars
```python
from theme import _vars
```



---
## __repr__
```python
from theme import __repr__
```



---
## __getitem__
```python
from theme import __getitem__
```



---
## __setitem__
```python
from theme import __setitem__
```



---
## __delitem__
```python
from theme import __delitem__
```



---
## __contains__
```python
from theme import __contains__
```



---
## __len__
```python
from theme import __len__
```



---
## __iter__
```python
from theme import __iter__
```



---
## _load_theme_config
```python
from theme import _load_theme_config
```

Recursively load theme and any parent themes.

---
## get_env
```python
from theme import get_env
```

Return a Jinja environment for the theme.

---
## __name__
```python
from localization import __name__
```

Helpers for configuring locale settings.

Name `localization` is chosen to avoid overlap with builtin `locale` module.

---
## NoBabelExtension
```python
from localization import NoBabelExtension
```



---
## parse_locale
```python
from localization import parse_locale
```



---
## install_translations
```python
from localization import install_translations
```



---
## _get_merged_translations
```python
from localization import _get_merged_translations
```



---
## __init__
```python
from localization import __init__
```



---
## MkDocsException
```python
from exceptions import MkDocsException
```

The base class which all MkDocs exceptions inherit from. This should
not be raised directly. One of the subclasses should be raised instead.

---
## ConfigurationError
```python
from exceptions import ConfigurationError
```

General exception in configuration

---
## BuildError
```python
from exceptions import BuildError
```

This error may be raised by MkDocs during the build process. Plugins should
not raise this error.

---
## PluginError
```python
from exceptions import PluginError
```

A subclass of [`mkdocs.exceptions.BuildError`][] which can be raised by plugin
events.

---
## _showwarning
```python
from __main__ import _showwarning
```



---
## _enable_warnings
```python
from __main__ import _enable_warnings
```



---
## ColorFormatter
```python
from __main__ import ColorFormatter
```



---
## State
```python
from __main__ import State
```

Maintain logging level.

---
## add_options
```python
from __main__ import add_options
```



---
## verbose_option
```python
from __main__ import verbose_option
```



---
## quiet_option
```python
from __main__ import quiet_option
```



---
## color_option
```python
from __main__ import color_option
```



---
## serve_command
```python
from __main__ import serve_command
```

Run the builtin development server.

---
## build_command
```python
from __main__ import build_command
```

Build the MkDocs documentation.

---
## gh_deploy_command
```python
from __main__ import gh_deploy_command
```

Deploy your documentation to GitHub Pages.

---
## get_deps_command
```python
from __main__ import get_deps_command
```

Show required PyPI packages inferred from plugins in mkdocs.yml.

---
## new_command
```python
from __main__ import new_command
```

Create a new MkDocs project.

---
## format
```python
from __main__ import format
```



---
## __init__
```python
from __main__ import __init__
```



---
## __del__
```python
from __main__ import __del__
```



---
## inner
```python
from __main__ import inner
```



---
## callback
```python
from __main__ import callback
```



---
## __name__
```python
from documentation import __name__
```

Contains methods that generate documentation for Gradio functions and classes.

---
## set_documentation_group
```python
from documentation import set_documentation_group
```



---
## extract_instance_attr_doc
```python
from documentation import extract_instance_attr_doc
```



---
## document
```python
from documentation import document
```

Defines the @document decorator which adds classes or functions to the Gradio
documentation at www.gradio.app/docs.

Usage examples:
- Put @document() above a class to document the class and its constructor.
- Put @document("fn1", "fn2") above a class to also document methods fn1 and fn2.
- Put @document("*fn3") with an asterisk above a class to document the instance attribute methods f3.

---
## document_fn
```python
from documentation import document_fn
```

Generates documentation for any function.
Parameters:
    fn: Function to document
Returns:
    description: General description of fn
    parameters: A list of dicts for each parameter, storing data for the parameter name, annotation and doc
    return: A dict storing data for the returned annotation and doc
    example: Code for an example use of the fn

---
## document_cls
```python
from documentation import document_cls
```



---
## generate_documentation
```python
from documentation import generate_documentation
```



---
## inner_doc
```python
from documentation import inner_doc
```



---
## __name__
```python
from serializing import __name__
```



---
## Serializable
```python
from serializing import Serializable
```



---
## SimpleSerializable
```python
from serializing import SimpleSerializable
```

General class that does not perform any serialization or deserialization.

---
## StringSerializable
```python
from serializing import StringSerializable
```

Expects a string as input/output but performs no serialization.

---
## ListStringSerializable
```python
from serializing import ListStringSerializable
```

Expects a list of strings as input/output but performs no serialization.

---
## BooleanSerializable
```python
from serializing import BooleanSerializable
```

Expects a boolean as input/output but performs no serialization.

---
## NumberSerializable
```python
from serializing import NumberSerializable
```

Expects a number (int/float) as input/output but performs no serialization.

---
## ImgSerializable
```python
from serializing import ImgSerializable
```

Expects a base64 string as input/output which is serialized to a filepath.

---
## FileSerializable
```python
from serializing import FileSerializable
```

Expects a dict with base64 representation of object as input/output which is serialized to a filepath.

---
## VideoSerializable
```python
from serializing import VideoSerializable
```



---
## JSONSerializable
```python
from serializing import JSONSerializable
```



---
## GallerySerializable
```python
from serializing import GallerySerializable
```



---
## serialized_info
```python
from serializing import serialized_info
```



---
## api_info
```python
from serializing import api_info
```



---
## example_inputs
```python
from serializing import example_inputs
```



---
## input_api_info
```python
from serializing import input_api_info
```



---
## output_api_info
```python
from serializing import output_api_info
```



---
## serialize
```python
from serializing import serialize
```



---
## deserialize
```python
from serializing import deserialize
```



---
## __init__
```python
from serializing import __init__
```



---
## _single_file_api_info
```python
from serializing import _single_file_api_info
```



---
## _single_file_serialized_info
```python
from serializing import _single_file_serialized_info
```



---
## _multiple_file_serialized_info
```python
from serializing import _multiple_file_serialized_info
```



---
## _multiple_file_api_info
```python
from serializing import _multiple_file_api_info
```



---
## _single_file_example_inputs
```python
from serializing import _single_file_example_inputs
```



---
## _multiple_file_example_inputs
```python
from serializing import _multiple_file_example_inputs
```



---
## _serialize_single
```python
from serializing import _serialize_single
```



---
## _setup_stream
```python
from serializing import _setup_stream
```



---
## _deserialize_single
```python
from serializing import _deserialize_single
```



---
## Endpoint
```python
from client import Endpoint
```

Helper class for storing all the information about a single API endpoint.

---
## Job
```python
from client import Job
```

A Job is a wrapper over the Future class that represents a prediction call that has been
submitted by the Gradio client. This class is not meant to be instantiated directly, but rather
is created by the Client.submit() method.

A Job object includes methods to get the status of the prediction call, as well to get the outputs of
the prediction call. Job objects are also iterable, and can be used in a loop to get the outputs
of prediction calls as they become available for generator endpoints.

---
## duplicate
```python
from client import duplicate
```

Duplicates a Hugging Face Space under your account and returns a Client object
for the new Space. No duplication is created if the Space already exists in your
account (to override this, provide a new name for the new Space using `to_id`).
To use this method, you must provide an `hf_token` or be logged in via the Hugging
Face Hub CLI.

The new Space will be private by default and use the same hardware as the original
Space. This can be changed by using the `private` and `hardware` parameters. For
hardware upgrades (beyond the basic CPU tier), you may be required to provide
billing information on Hugging Face: https://huggingface.co/settings/billing

Parameters:
    from_id: The name of the Hugging Face Space to duplicate in the format "{username}/{space_id}", e.g. "gradio/whisper".
    to_id: The name of the new Hugging Face Space to create, e.g. "abidlabs/whisper-duplicate". If not provided, the new Space will be named "{your_HF_username}/{space_id}".
    hf_token: The Hugging Face token to use to access private Spaces. Automatically fetched if you are logged in via the Hugging Face Hub CLI. Obtain from: https://huggingface.co/settings/token
    private: Whether the new Space should be private (True) or public (False). Defaults to True.
    hardware: The hardware tier to use for the new Space. Defaults to the same hardware tier as the original Space. Options include "cpu-basic", "cpu-upgrade", "t4-small", "t4-medium", "a10g-small", "a10g-large", "a100-large", subject to availability.
    secrets: A dictionary of (secret key, secret value) to pass to the new Space. Defaults to None. Secrets are only used when the Space is duplicated for the first time, and are not updated if the duplicated Space already exists.
    sleep_timeout: The number of minutes after which the duplicate Space will be puased if no requests are made to it (to minimize billing charges). Defaults to 5 minutes.
    max_workers: The maximum number of thread workers that can be used to make requests to the remote Gradio app simultaneously.
    verbose: Whether the client should print statements to the console.
Example:
    import os
    from gradio_client import Client
    HF_TOKEN = os.environ.get("HF_TOKEN")
    client = Client.duplicate("abidlabs/whisper", hf_token=HF_TOKEN)
    client.predict("audio_sample.wav")
    >> "This is a test of the whisper speech recognition model."

---
## _get_space_state
```python
from client import _get_space_state
```



---
## predict
```python
from client import predict
```

Calls the Gradio API and returns the result (this is a blocking call).

Parameters:
    args: The arguments to pass to the remote API. The order of the arguments must match the order of the inputs in the Gradio app.
    api_name: The name of the API endpoint to call starting with a leading slash, e.g. "/predict". Does not need to be provided if the Gradio app has only one named API endpoint.
    fn_index: As an alternative to api_name, this parameter takes the index of the API endpoint to call, e.g. 0. Both api_name and fn_index can be provided, but if they conflict, api_name will take precedence.
Returns:
    The result of the API call. Will be a Tuple if the API has multiple outputs.
Example:
    from gradio_client import Client
    client = Client(src="gradio/calculator")
    client.predict(5, "add", 4, api_name="/predict")
    >> 9.0

---
## submit
```python
from client import submit
```

Creates and returns a Job object which calls the Gradio API in a background thread. The job can be used to retrieve the status and result of the remote API call.

Parameters:
    args: The arguments to pass to the remote API. The order of the arguments must match the order of the inputs in the Gradio app.
    api_name: The name of the API endpoint to call starting with a leading slash, e.g. "/predict". Does not need to be provided if the Gradio app has only one named API endpoint.
    fn_index: As an alternative to api_name, this parameter takes the index of the API endpoint to call, e.g. 0. Both api_name and fn_index can be provided, but if they conflict, api_name will take precedence.
    result_callbacks: A callback function, or list of callback functions, to be called when the result is ready. If a list of functions is provided, they will be called in order. The return values from the remote API are provided as separate parameters into the callback. If None, no callback will be called.
Returns:
    A Job object that can be used to retrieve the status and result of the remote API call.
Example:
    from gradio_client import Client
    client = Client(src="gradio/calculator")
    job = client.submit(5, "add", 4, api_name="/predict")
    job.status()
    >> <Status.STARTING: 'STARTING'>
    job.result()  # blocking call
    >> 9.0

---
## view_api
```python
from client import view_api
```

Prints the usage info for the API. If the Gradio app has multiple API endpoints, the usage info for each endpoint will be printed separately. If return_format="dict" the info is returned in dictionary format, as shown in the example below.

Parameters:
    all_endpoints: If True, prints information for both named and unnamed endpoints in the Gradio app. If False, will only print info about named endpoints. If None (default), will print info about named endpoints, unless there aren't any -- in which it will print info about unnamed endpoints.
    print_info: If True, prints the usage info to the console. If False, does not print the usage info.
    return_format: If None, nothing is returned. If "str", returns the same string that would be printed to the console. If "dict", returns the usage info as a dictionary that can be programmatically parsed, and *all endpoints are returned in the dictionary* regardless of the value of `all_endpoints`. The format of the dictionary is in the docstring of this method.
Example:
    from gradio_client import Client
    client = Client(src="gradio/calculator")
    client.view_api(return_format="dict")
    >> {
        'named_endpoints': {
            '/predict': {
                'parameters': [
                    {
                        'label': 'num1',
                        'type_python': 'int | float',
                        'type_description': 'numeric value',
                        'component': 'Number',
                        'example_input': '5'
                    },
                    {
                        'label': 'operation',
                        'type_python': 'str',
                        'type_description': 'string value',
                        'component': 'Radio',
                        'example_input': 'add'
                    },
                    {
                        'label': 'num2',
                        'type_python': 'int | float',
                        'type_description': 'numeric value',
                        'component': 'Number',
                        'example_input': '5'
                    },
                ],
                'returns': [
                    {
                        'label': 'output',
                        'type_python': 'int | float',
                        'type_description': 'numeric value',
                        'component': 'Number',
                    },
                ]
            },
            '/flag': {
                'parameters': [
                    ...
                    ],
                'returns': [
                    ...
                    ]
                }
            }
        'unnamed_endpoints': {
            2: {
                'parameters': [
                    ...
                    ],
                'returns': [
                    ...
                    ]
                }
            }
        }
    }

---
## reset_session
```python
from client import reset_session
```



---
## _render_endpoints_info
```python
from client import _render_endpoints_info
```



---
## __repr__
```python
from client import __repr__
```



---
## __str__
```python
from client import __str__
```



---
## _telemetry_thread
```python
from client import _telemetry_thread
```



---
## _infer_fn_index
```python
from client import _infer_fn_index
```



---
## _space_name_to_src
```python
from client import _space_name_to_src
```



---
## _get_config
```python
from client import _get_config
```



---
## deploy_discord
```python
from client import deploy_discord
```

Deploy the upstream app as a discord bot. Currently only supports gr.ChatInterface.
Parameters:
    discord_bot_token: This is the "password" needed to be able to launch the bot. Users can get a token by creating a bot app on the discord website. If run the method without specifying a token, the space will explain how to get one. See here: https://huggingface.co/spaces/freddyaboulton/test-discord-bot-v1.
    api_names: The api_names of the app to turn into bot commands. This parameter currently has no effect as ChatInterface only has one api_name ('/chat').
    to_id: The name of the space hosting the discord bot. If None, the name will be gradio-discord-bot-{random-substring}
    hf_token: HF api token with write priviledges in order to upload the files to HF space. Can be ommitted if logged in via the HuggingFace CLI, unless the upstream space is private. Obtain from: https://huggingface.co/settings/token
    private: Whether the space hosting the discord bot is private. The visibility of the discord bot itself is set via the discord website. See https://huggingface.co/spaces/freddyaboulton/test-discord-bot-v1

---
## make_end_to_end_fn
```python
from client import make_end_to_end_fn
```



---
## make_predict
```python
from client import make_predict
```



---
## _predict_resolve
```python
from client import _predict_resolve
```

Needed for gradio.load(), which has a slightly different signature for serializing/deserializing

---
## _upload
```python
from client import _upload
```



---
## _add_uploaded_files_to_data
```python
from client import _add_uploaded_files_to_data
```

Helper function to modify the input data with the uploaded files.

---
## insert_state
```python
from client import insert_state
```



---
## remove_skipped_components
```python
from client import remove_skipped_components
```



---
## reduce_singleton_output
```python
from client import reduce_singleton_output
```



---
## serialize
```python
from client import serialize
```



---
## deserialize
```python
from client import deserialize
```



---
## process_predictions
```python
from client import process_predictions
```



---
## _setup_serializers
```python
from client import _setup_serializers
```



---
## _use_websocket
```python
from client import _use_websocket
```



---
## __next__
```python
from client import __next__
```



---
## result
```python
from client import result
```

Return the result of the call that the future represents. Raises CancelledError: If the future was cancelled, TimeoutError: If the future didn't finish executing before the given timeout, and Exception: If the call raised then that exception will be raised.

Parameters:
    timeout: The number of seconds to wait for the result if the future isn't done. If None, then there is no limit on the wait time.
Returns:
    The result of the call that the future represents. For generator functions, it will return the final iteration.
Example:
    from gradio_client import Client
    calculator = Client(src="gradio/calculator")
    job = calculator.submit("foo", "add", 4, fn_index=0)
    job.result(timeout=5)
    >> 9

---
## outputs
```python
from client import outputs
```

Returns a list containing the latest outputs from the Job.

If the endpoint has multiple output components, the list will contain
a tuple of results. Otherwise, it will contain the results without storing them
in tuples.

For endpoints that are queued, this list will contain the final job output even
if that endpoint does not use a generator function.

Example:
    from gradio_client import Client
    client = Client(src="gradio/count_generator")
    job = client.submit(3, api_name="/count")
    while not job.done():
        time.sleep(0.1)
    job.outputs()
    >> ['0', '1', '2']

---
## status
```python
from client import status
```

Returns the latest status update from the Job in the form of a StatusUpdate
object, which contains the following fields: code, rank, queue_size, success, time, eta, and progress_data.

progress_data is a list of updates emitted by the gr.Progress() tracker of the event handler. Each element
of the list has the following fields: index, length, unit, progress, desc. If the event handler does not have
a gr.Progress() tracker, the progress_data field will be None.

Example:
    from gradio_client import Client
    client = Client(src="gradio/calculator")
    job = client.submit(5, "add", 4, api_name="/predict")
    job.status()
    >> <Status.STARTING: 'STARTING'>
    job.status().eta
    >> 43.241  # seconds

---
## __getattr__
```python
from client import __getattr__
```

Forwards any properties to the Future class.

---
## cancel
```python
from client import cancel
```

Cancels the job as best as possible.

If the app you are connecting to has the gradio queue enabled, the job
will be cancelled locally as soon as possible. For apps that do not use the
queue, the job cannot be cancelled if it's been sent to the local executor
(for the time being).

Note: In general, this DOES not stop the process from running in the upstream server
except for the following situations:

1. If the job is queued upstream, it will be removed from the queue and the server will not run the job
2. If the job has iterative outputs, the job will finish as soon as the current iteration finishes running
3. If the job has not been picked up by the queue yet, the queue will not pick up the job

---
## _inner
```python
from client import _inner
```



---
## _predict
```python
from client import _predict
```



---
## create_fn
```python
from client import create_fn
```



---
## fn
```python
from client import fn
```



---
## __name__
```python
from media_data import __name__
```



---
## TooManyRequestsError
```python
from utils import TooManyRequestsError
```

Raised when the API returns a 429 status code.

---
## QueueError
```python
from utils import QueueError
```

Raised when the queue is full or there is an issue adding a job to the queue.

---
## InvalidAPIEndpointError
```python
from utils import InvalidAPIEndpointError
```

Raised when the API endpoint is invalid.

---
## SpaceDuplicationError
```python
from utils import SpaceDuplicationError
```

Raised when something goes wrong with a Space Duplication.

---
## Status
```python
from utils import Status
```

Status codes presented to client users.

---
## ProgressUnit
```python
from utils import ProgressUnit
```



---
## StatusUpdate
```python
from utils import StatusUpdate
```

Update message sent from the worker thread to the Job on the main thread.

---
## create_initial_status_update
```python
from utils import create_initial_status_update
```



---
## JobStatus
```python
from utils import JobStatus
```

The job status.

Keeps track of the latest status update and intermediate outputs (not yet implements).

---
## Communicator
```python
from utils import Communicator
```

Helper class to help communicate between the worker thread and main thread.

---
## is_http_url_like
```python
from utils import is_http_url_like
```

Check if the given string looks like an HTTP(S) URL.

---
## probe_url
```python
from utils import probe_url
```

Probe the given URL to see if it responds with a 200 status code (to HEAD, then to GET).

---
## is_valid_url
```python
from utils import is_valid_url
```

Check if the given string is a valid URL.

---
## download_tmp_copy_of_file
```python
from utils import download_tmp_copy_of_file
```



---
## create_tmp_copy_of_file
```python
from utils import create_tmp_copy_of_file
```



---
## get_mimetype
```python
from utils import get_mimetype
```



---
## get_extension
```python
from utils import get_extension
```



---
## encode_file_to_base64
```python
from utils import encode_file_to_base64
```



---
## encode_url_to_base64
```python
from utils import encode_url_to_base64
```



---
## encode_url_or_file_to_base64
```python
from utils import encode_url_or_file_to_base64
```



---
## download_byte_stream
```python
from utils import download_byte_stream
```



---
## decode_base64_to_binary
```python
from utils import decode_base64_to_binary
```



---
## strip_invalid_filename_characters
```python
from utils import strip_invalid_filename_characters
```

Strips invalid characters from a filename and ensures that the file_length is less than `max_bytes` bytes.

---
## sanitize_parameter_names
```python
from utils import sanitize_parameter_names
```

Cleans up a Python parameter name to make the API info more readable.

---
## decode_base64_to_file
```python
from utils import decode_base64_to_file
```



---
## dict_or_str_to_json_file
```python
from utils import dict_or_str_to_json_file
```



---
## file_to_json
```python
from utils import file_to_json
```



---
## set_space_timeout
```python
from utils import set_space_timeout
```



---
## synchronize_async
```python
from utils import synchronize_async
```

Runs async functions in sync scopes. Can be used in any scope.

Example:
    if inspect.iscoroutinefunction(block_fn.fn):
        predictions = utils.synchronize_async(block_fn.fn, *processed_input)

Args:
    func:
    *args:
    **kwargs:

---
## APIInfoParseError
```python
from utils import APIInfoParseError
```



---
## get_type
```python
from utils import get_type
```



---
## json_schema_to_python_type
```python
from utils import json_schema_to_python_type
```

Convert the json schema into a python type hint

---
## ordering
```python
from utils import ordering
```

Order of messages. Helpful for testing.

---
## msg_to_status
```python
from utils import msg_to_status
```

Map the raw message from the backend to the status code presented to users.

---
## from_ws_msg
```python
from utils import from_ws_msg
```



---
## SerializationSetupError
```python
from exceptions import SerializationSetupError
```

Raised when a serializers cannot be set up correctly.

---
## FileData
```python
from data_classes import FileData
```



---
## __name__
```python
from filepost import __name__
```



---
## choose_boundary
```python
from filepost import choose_boundary
```

Our embarrassingly-simple replacement for mimetools.choose_boundary.

---
## iter_field_objects
```python
from filepost import iter_field_objects
```

Iterate over fields.

Supports list of (k, v) tuples and dicts, and lists of
:class:`~urllib3.fields.RequestField`.

---
## encode_multipart_formdata
```python
from filepost import encode_multipart_formdata
```

Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

:param fields:
    Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

:param boundary:
    If not specified, then a random boundary will be generated using
    :func:`urllib3.filepost.choose_boundary`.

---
## __name__
```python
from fields import __name__
```



---
## guess_content_type
```python
from fields import guess_content_type
```

Guess the "Content-Type" of a file.

:param filename:
    The filename to guess the "Content-Type" of using :mod:`mimetypes`.
:param default:
    If no "Content-Type" can be guessed, default to `default`.

---
## format_header_param_rfc2231
```python
from fields import format_header_param_rfc2231
```

Helper function to format and quote a single header parameter using the
strategy defined in RFC 2231.

Particularly useful for header parameters which might contain
non-ASCII values, like file names. This follows
`RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.

:param name:
    The name of the parameter, a string expected to be ASCII only.
:param value:
    The value of the parameter, provided as ``bytes`` or `str``.
:ret:
    An RFC-2231-formatted unicode string.

---
## format_multipart_header_param
```python
from fields import format_multipart_header_param
```

Format and quote a single multipart header parameter.

This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching
the behavior of current browser and curl versions. Values are
assumed to be UTF-8. The ``\n``, ``\r``, and ``"`` characters are
percent encoded.

.. _WHATWG HTML Standard:
    https://html.spec.whatwg.org/multipage/
    form-control-infrastructure.html#multipart-form-data

:param name:
    The name of the parameter, an ASCII-only ``str``.
:param value:
    The value of the parameter, a ``str`` or UTF-8 encoded
    ``bytes``.
:returns:
    A string ``name="value"`` with the escaped value.

.. versionchanged:: 2.0.0
    Matches the WHATWG HTML Standard as of 2021/06/10. Control
    characters are no longer percent encoded.

.. versionchanged:: 2.0.0
    Renamed from ``format_header_param_html5`` and
    ``format_header_param``. The old names will be removed in
    urllib3 v2.1.0.

---
## format_header_param_html5
```python
from fields import format_header_param_html5
```

Helper function to format and quote a single header parameter using the
HTML5 strategy.

Particularly useful for header parameters which might contain
non-ASCII values, like file names. This follows the `HTML5 Working Draft
Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.

.. _HTML5 Working Draft Section 4.10.22.7:
    https://w3c.github.io/html/sec-forms.html#multipart-form-data

:param name:
    The name of the parameter, a string expected to be ASCII only.
:param value:
    The value of the parameter, provided as ``bytes`` or `str``.
:ret:
    A unicode string, stripped of troublesome characters.

---
## format_header_param
```python
from fields import format_header_param
```

.. deprecated:: 2.0.0
Renamed to :func:`format_multipart_header_param`. Will be
removed in urllib3 v2.1.0.

---
## RequestField
```python
from fields import RequestField
```

A data container for request body parameters.

:param name:
    The name of this request field. Must be unicode.
:param data:
    The data/value body.
:param filename:
    An optional filename of the request field. Must be unicode.
:param headers:
    An optional dict-like object of headers to initially use for the field.
:param header_formatter:
    An optional callable that is used to encode and format the headers. By
    default, this is :func:`format_header_param_html5`.

---
## __init__
```python
from fields import __init__
```



---
## from_tuples
```python
from fields import from_tuples
```

A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

Supports constructing :class:`~urllib3.fields.RequestField` from
parameter of key/value strings AND key/filetuple. A filetuple is a
(filename, data, MIME type) tuple where the MIME type is optional.
For example::

    'foo': 'bar',
    'fakefile': ('foofile.txt', 'contents of foofile'),
    'realfile': ('barfile.txt', open('realfile').read()),
    'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
    'nonamefile': 'contents of nonamefile field',

Field names and filenames must be unicode.

---
## _render_part
```python
from fields import _render_part
```

Overridable helper function to format a single header parameter. By
default, this calls ``self.header_formatter``.

:param name:
    The name of the parameter, a string expected to be ASCII only.
:param value:
    The value of the parameter, provided as a unicode string.

---
## _render_parts
```python
from fields import _render_parts
```

Helper function to format and quote a single header.

Useful for single headers that are composed of multiple items. E.g.,
'Content-Disposition' fields.

:param header_parts:
    A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
    as `k1="v1"; k2="v2"; ...`.

---
## render_headers
```python
from fields import render_headers
```

Renders the headers for this request field.

---
## make_multipart
```python
from fields import make_multipart
```

Makes this request field into a multipart request field.

This method overrides "Content-Disposition", "Content-Type" and
"Content-Location" headers to the request parameter.

:param content_type:
    The 'Content-Type' of the request body.
:param content_location:
    The 'Content-Location' of the request body.

---
## __name__
```python
from _base_connection import __name__
```



---
## ProxyConfig
```python
from _base_connection import ProxyConfig
```



---
## _ResponseOptions
```python
from _base_connection import _ResponseOptions
```



---
## BaseHTTPConnection
```python
from _base_connection import BaseHTTPConnection
```



---
## BaseHTTPSConnection
```python
from _base_connection import BaseHTTPSConnection
```



---
## __init__
```python
from _base_connection import __init__
```



---
## set_tunnel
```python
from _base_connection import set_tunnel
```



---
## connect
```python
from _base_connection import connect
```



---
## request
```python
from _base_connection import request
```



---
## getresponse
```python
from _base_connection import getresponse
```



---
## close
```python
from _base_connection import close
```



---
## is_closed
```python
from _base_connection import is_closed
```

Whether the connection either is brand new or has been previously closed.
If this property is True then both ``is_connected`` and ``has_connected_to_proxy``
properties must be False.

---
## is_connected
```python
from _base_connection import is_connected
```

Whether the connection is actively connected to any origin (proxy or target)

---
## has_connected_to_proxy
```python
from _base_connection import has_connected_to_proxy
```

Whether the connection has successfully connected to its proxy.
This returns False if no proxy is in use. Used to determine whether
errors are coming from the proxy layer or from tunnelling to the target origin.

---
## add_stderr_logger
```python
from __init__ import add_stderr_logger
```

Helper for quickly adding a StreamHandler to the logger. Useful for
debugging.

Returns the handler after adding it.

---
## disable_warnings
```python
from __init__ import disable_warnings
```

Helper for quickly disabling all urllib3 warnings.

---
## request
```python
from __init__ import request
```

A convenience, top-level request method. It uses a module-global ``PoolManager`` instance.
Therefore, its side effects could be shared across dependencies relying on it.
To avoid side effects create a new ``PoolManager`` instance and use it instead.
The method does not accept low-level ``**urlopen_kw`` keyword arguments.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param body:
    Data to send in the request body, either :class:`str`, :class:`bytes`,
    an iterable of :class:`str`/:class:`bytes`, or a file-like object.

:param fields:
    Data to encode and send in the request body.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc.

:param bool preload_content:
    If True, the response's body will be preloaded into memory.

:param bool decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.

:param redirect:
    If True, automatically handle redirects (status codes 301, 302,
    303, 307, 308). Each redirect counts as a retry. Disabling retries
    will disable redirect, too.

:param retries:
    Configure the number of retries to allow before raising a
    :class:`~urllib3.exceptions.MaxRetryError` exception.

    If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. Pass a
    :class:`~urllib3.util.retry.Retry` object for fine-grained control
    over different types of retries.
    Pass an integer number to retry connection errors that many times,
    but no other types of errors. Pass zero to never retry.

    If ``False``, then retries are disabled and any exception is raised
    immediately. Also, instead of raising a MaxRetryError on redirects,
    the redirect response will be returned.

:type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

:param timeout:
    If specified, overrides the default timeout for this one
    request. It may be a float (in seconds) or an instance of
    :class:`urllib3.util.Timeout`.

:param json:
    Data to encode and send as JSON with UTF-encoded in the request body.
    The ``"Content-Type"`` header will be set to ``"application/json"``
    unless specified otherwise.

---
## __name__
```python
from poolmanager import __name__
```



---
## PoolKey
```python
from poolmanager import PoolKey
```

All known keyword arguments that could be provided to the pool manager, its
pools, or the underlying connections.

All custom key schemes should include the fields in this key at a minimum.

---
## _default_key_normalizer
```python
from poolmanager import _default_key_normalizer
```

Create a pool key out of a request context dictionary.

According to RFC 3986, both the scheme and host are case-insensitive.
Therefore, this function normalizes both before constructing the pool
key for an HTTPS request. If you wish to change this behaviour, provide
alternate callables to ``key_fn_by_scheme``.

:param key_class:
    The class to use when constructing the key. This should be a namedtuple
    with the ``scheme`` and ``host`` keys at a minimum.
:type  key_class: namedtuple
:param request_context:
    A dictionary-like object that contain the context for a request.
:type  request_context: dict

:return: A namedtuple that can be used as a connection pool key.
:rtype:  PoolKey

---
## PoolManager
```python
from poolmanager import PoolManager
```

Allows for arbitrary requests while transparently keeping track of
necessary connection pools for you.

:param num_pools:
    Number of connection pools to cache before discarding the least
    recently used pool.

:param headers:
    Headers to include with all requests, unless other headers are given
    explicitly.

:param \**connection_pool_kw:
    Additional parameters are used to create fresh
    :class:`urllib3.connectionpool.ConnectionPool` instances.

Example::

    >>> manager = PoolManager(num_pools=2)
    >>> r = manager.request('GET', 'http://google.com/')
    >>> r = manager.request('GET', 'http://google.com/mail')
    >>> r = manager.request('GET', 'http://yahoo.com/')
    >>> len(manager.pools)
    2

---
## ProxyManager
```python
from poolmanager import ProxyManager
```

Behaves just like :class:`PoolManager`, but sends all requests through
the defined proxy, using the CONNECT method for HTTPS URLs.

:param proxy_url:
    The URL of the proxy to be used.

:param proxy_headers:
    A dictionary containing headers that will be sent to the proxy. In case
    of HTTP they are being sent with each request, while in the
    HTTPS/CONNECT case they are sent only once. Could be used for proxy
    authentication.

:param proxy_ssl_context:
    The proxy SSL context is used to establish the TLS connection to the
    proxy when using HTTPS proxies.

:param use_forwarding_for_https:
    (Defaults to False) If set to True will forward requests to the HTTPS
    proxy to be made on behalf of the client instead of creating a TLS
    tunnel via the CONNECT method. **Enabling this flag means that request
    and response headers and content will be visible from the HTTPS proxy**
    whereas tunneling keeps request and response headers and content
    private.  IP address, target hostname, SNI, and port are always visible
    to an HTTPS proxy even when this flag is disabled.

Example:
    >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
    >>> r1 = proxy.request('GET', 'http://google.com/')
    >>> r2 = proxy.request('GET', 'http://httpbin.org/')
    >>> len(proxy.pools)
    1
    >>> r3 = proxy.request('GET', 'https://httpbin.org/')
    >>> r4 = proxy.request('GET', 'https://twitter.com/')
    >>> len(proxy.pools)
    3

---
## proxy_from_url
```python
from poolmanager import proxy_from_url
```



---
## __init__
```python
from poolmanager import __init__
```



---
## __enter__
```python
from poolmanager import __enter__
```



---
## __exit__
```python
from poolmanager import __exit__
```



---
## _new_pool
```python
from poolmanager import _new_pool
```

Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
any additional pool keyword arguments.

If ``request_context`` is provided, it is provided as keyword arguments
to the pool class used. This method is used to actually create the
connection pools handed out by :meth:`connection_from_url` and
companion methods. It is intended to be overridden for customization.

---
## clear
```python
from poolmanager import clear
```

Empty our store of pools and direct them all to close.

This will not affect in-flight connections, but they will not be
re-used after completion.

---
## connection_from_host
```python
from poolmanager import connection_from_host
```



---
## connection_from_context
```python
from poolmanager import connection_from_context
```

Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.

``request_context`` must at least contain the ``scheme`` key and its
value must be a key in ``key_fn_by_scheme`` instance variable.

---
## connection_from_pool_key
```python
from poolmanager import connection_from_pool_key
```

Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.

``pool_key`` should be a namedtuple that only contains immutable
objects. At a minimum it must have the ``scheme``, ``host``, and
``port`` fields.

---
## connection_from_url
```python
from poolmanager import connection_from_url
```

Similar to :func:`urllib3.connectionpool.connection_from_url`.

If ``pool_kwargs`` is not provided and a new pool needs to be
constructed, ``self.connection_pool_kw`` is used to initialize
the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
is provided, it is used instead. Note that if a new pool does not
need to be created for the request, the provided ``pool_kwargs`` are
not used.

---
## _merge_pool_kwargs
```python
from poolmanager import _merge_pool_kwargs
```

Merge a dictionary of override values for self.connection_pool_kw.

This does not modify self.connection_pool_kw and returns a new dict.
Any keys in the override dictionary with a value of ``None`` are
removed from the merged dictionary.

---
## _proxy_requires_url_absolute_form
```python
from poolmanager import _proxy_requires_url_absolute_form
```

Indicates if the proxy requires the complete destination URL in the
request.  Normally this is only needed when not using an HTTP CONNECT
tunnel.

---
## urlopen
```python
from poolmanager import urlopen
```

Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.

---
## _set_proxy_headers
```python
from poolmanager import _set_proxy_headers
```

Sets headers needed by proxies: specifically, the Accept and Host
headers. Only sets headers not provided by the user.

---
## __name__
```python
from response import __name__
```



---
## ContentDecoder
```python
from response import ContentDecoder
```



---
## DeflateDecoder
```python
from response import DeflateDecoder
```



---
## GzipDecoderState
```python
from response import GzipDecoderState
```



---
## GzipDecoder
```python
from response import GzipDecoder
```



---
## MultiDecoder
```python
from response import MultiDecoder
```

From RFC7231:
If one or more encodings have been applied to a representation, the
sender that applied the encodings MUST generate a Content-Encoding
header field that lists the content codings in the order in which
they were applied.

---
## _get_decoder
```python
from response import _get_decoder
```



---
## BytesQueueBuffer
```python
from response import BytesQueueBuffer
```

Memory-efficient bytes buffer

To return decoded data in read() and still follow the BufferedIOBase API, we need a
buffer to always return the correct amount of bytes.

This buffer should be filled using calls to put()

Our maximum memory usage is determined by the sum of the size of:

 * self.buffer, which contains the full data
 * the largest chunk that we will copy in get()

The worst case scenario is a single chunk, in which case we'll make a full copy of
the data inside get().

---
## BaseHTTPResponse
```python
from response import BaseHTTPResponse
```



---
## HTTPResponse
```python
from response import HTTPResponse
```

HTTP Response container.

Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is
loaded and decoded on-demand when the ``data`` property is accessed.  This
class is also compatible with the Python standard library's :mod:`io`
module, and can hence be treated as a readable object in the context of that
framework.

Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`:

:param preload_content:
    If True, the response's body will be preloaded during construction.

:param decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.

:param original_response:
    When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse`
    object, it's convenient to include the original for debug purposes. It's
    otherwise unused.

:param retries:
    The retries contains the last :class:`~urllib3.util.retry.Retry` that
    was used during the request.

:param enforce_content_length:
    Enforce content length checking. Body returned by server must match
    value of Content-Length header, if present. Otherwise, raise error.

---
## decompress
```python
from response import decompress
```



---
## flush
```python
from response import flush
```



---
## __init__
```python
from response import __init__
```



---
## BrotliDecoder
```python
from response import BrotliDecoder
```



---
## ZstdDecoder
```python
from response import ZstdDecoder
```



---
## __len__
```python
from response import __len__
```



---
## put
```python
from response import put
```



---
## get
```python
from response import get
```



---
## get_all
```python
from response import get_all
```



---
## get_redirect_location
```python
from response import get_redirect_location
```

Should we redirect and where to?

:returns: Truthy redirect location string if we got a redirect status
    code and valid location. ``None`` if redirect status and no
    location. ``False`` if not a redirect status code.

---
## data
```python
from response import data
```



---
## json
```python
from response import json
```

Deserializes the body of the HTTP response as a Python object.

The body of the HTTP response must be encoded using UTF-8, as per
`RFC 8529 Section 8.1 <https://www.rfc-editor.org/rfc/rfc8259#section-8.1>`_.

To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
your custom decoder instead.

If the body of the HTTP response is not decodable to UTF-8, a
`UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
valid JSON document, a `json.JSONDecodeError` will be raised.

Read more :ref:`here <json_content>`.

:returns: The body of the HTTP response as a Python object.

---
## url
```python
from response import url
```



---
## connection
```python
from response import connection
```



---
## retries
```python
from response import retries
```



---
## stream
```python
from response import stream
```

A generator wrapper for the read() method. A call will block until
``amt`` bytes have been read from the connection or until the
connection is closed.

:param amt:
    How much of the content to read. The generator will return up to
    much data per iteration, but may return less. This is particularly
    likely when using compressed data. However, the empty string will
    never be returned.

:param decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.

---
## read
```python
from response import read
```



---
## read1
```python
from response import read1
```

Similar to ``http.client.HTTPResponse.read1`` and documented
in :meth:`io.BufferedReader.read1`, but with an additional parameter:
``decode_content``.

:param amt:
    How much of the content to read.

:param decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.

---
## read_chunked
```python
from response import read_chunked
```



---
## release_conn
```python
from response import release_conn
```



---
## drain_conn
```python
from response import drain_conn
```



---
## close
```python
from response import close
```



---
## _init_decoder
```python
from response import _init_decoder
```

Set-up the _decoder attribute if necessary.

---
## _decode
```python
from response import _decode
```

Decode the data passed in and potentially flush the decoder.

---
## _flush_decoder
```python
from response import _flush_decoder
```

Flushes the decoder. Should only be called if the decoder is actually
being used.

---
## readinto
```python
from response import readinto
```



---
## getheaders
```python
from response import getheaders
```



---
## getheader
```python
from response import getheader
```



---
## info
```python
from response import info
```



---
## geturl
```python
from response import geturl
```

Returns the URL that was the source of this response.
If the request that generated this response redirected, this method
will return the final redirect location.

---
## isclosed
```python
from response import isclosed
```



---
## tell
```python
from response import tell
```

Obtain the number of bytes pulled over the wire so far. May differ from
the amount of content returned by :meth:``urllib3.response.HTTPResponse.read``
if bytes are encoded on the wire (e.g, compressed).

---
## _init_length
```python
from response import _init_length
```



---
## _error_catcher
```python
from response import _error_catcher
```

Catch Emscripten specific exceptions thrown by fetch.py,
instead re-raising urllib3 variants, so that low-level exceptions
are not leaked in the high-level api.

On exit, release the connection back to the pool.

---
## _fp_read
```python
from response import _fp_read
```

Read a response with the thought that reading the number of bytes
larger than can fit in a 32-bit int at a time via SSL in some
known cases leads to an overflow error that has to be prevented
if `amt` or `self.length_remaining` indicate that a problem may
happen.

The known cases:
  * 3.8 <= CPython < 3.9.7 because of a bug
    https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
  * urllib3 injected with pyOpenSSL-backed SSL-support.
  * CPython < 3.10 only when `amt` does not fit 32-bit int.

---
## _raw_read
```python
from response import _raw_read
```

Reads `amt` of bytes from the socket.

---
## readable
```python
from response import readable
```



---
## closed
```python
from response import closed
```



---
## fileno
```python
from response import fileno
```



---
## supports_chunked_reads
```python
from response import supports_chunked_reads
```

Checks if the underlying file-like object looks like a
:class:`http.client.HTTPResponse` object. We do this by testing for
the fp attribute. If it is present we assume it returns raw chunks as
processed by read_chunked().

---
## _update_chunk_length
```python
from response import _update_chunk_length
```



---
## _handle_chunk
```python
from response import _handle_chunk
```



---
## __iter__
```python
from response import __iter__
```



---
## HTTPConnection
```python
from connection import HTTPConnection
```

Based on :class:`http.client.HTTPConnection` but provides an extra constructor
backwards-compatibility layer between older and newer Pythons.

Additional keyword parameters are used to configure attributes of the connection.
Accepted parameters include:

- ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool`
- ``source_address``: Set the source address for the current connection.
- ``socket_options``: Set specific options on the underlying socket. If not specified, then
  defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling
  Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy.

  For example, if you wish to enable TCP Keep Alive in addition to the defaults,
  you might pass:

  .. code-block:: python

     HTTPConnection.default_socket_options + [
         (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
     ]

  Or you may want to disable the defaults by passing an empty list (e.g., ``[]``).

---
## HTTPSConnection
```python
from connection import HTTPSConnection
```

Many of the parameters to this constructor are passed to the underlying SSL
socket by means of :py:func:`urllib3.util.ssl_wrap_socket`.

---
## _WrappedAndVerifiedSocket
```python
from connection import _WrappedAndVerifiedSocket
```

Wrapped socket and whether the connection is
verified after the TLS handshake

---
## _ssl_wrap_socket_and_match_hostname
```python
from connection import _ssl_wrap_socket_and_match_hostname
```

Logic for constructing an SSLContext from all TLS parameters, passing
that down into ssl_wrap_socket, and then doing certificate verification
either via hostname or fingerprint. This function exists to guarantee
that both proxies and targets have the same behavior when connecting via TLS.

---
## _match_hostname
```python
from connection import _match_hostname
```



---
## _wrap_proxy_error
```python
from connection import _wrap_proxy_error
```



---
## _get_default_user_agent
```python
from connection import _get_default_user_agent
```



---
## DummyConnection
```python
from connection import DummyConnection
```

Used to detect a failed ConnectionCls import.

---
## _url_from_connection
```python
from connection import _url_from_connection
```

Returns the URL from a given connection. This is mainly used for testing and logging.

---
## host
```python
from connection import host
```

Setter for the `host` property.

We assume that only urllib3 uses the _dns_host attribute; httplib itself
only uses `host`, and it seems reasonable that other libraries follow suit.

---
## _new_conn
```python
from connection import _new_conn
```

Establish a socket connection and set nodelay settings on it.

:return: New socket connection.

---
## set_tunnel
```python
from connection import set_tunnel
```



---
## connect
```python
from connection import connect
```



---
## is_closed
```python
from connection import is_closed
```

Whether the connection either is brand new or has been previously closed.
If this property is True then both ``is_connected`` and ``has_connected_to_proxy``
properties must be False.

---
## is_connected
```python
from connection import is_connected
```

Whether the connection is actively connected to any origin (proxy or target)

---
## has_connected_to_proxy
```python
from connection import has_connected_to_proxy
```

Whether the connection has successfully connected to its proxy.
This returns False if no proxy is in use. Used to determine whether
errors are coming from the proxy layer or from tunnelling to the target origin.

---
## proxy_is_forwarding
```python
from connection import proxy_is_forwarding
```

Return True if a forwarding proxy is configured, else return False

---
## putrequest
```python
from connection import putrequest
```

putrequest
This deviates from the HTTPConnection method signature since we never need to override
sending accept-encoding headers or the host header.

---
## putheader
```python
from connection import putheader
```



---
## request
```python
from connection import request
```



---
## request_chunked
```python
from connection import request_chunked
```

Alternative to the common request method, which sends the
body with chunked encoding and not as one block

---
## getresponse
```python
from connection import getresponse
```



---
## set_cert
```python
from connection import set_cert
```



---
## _connect_tls_proxy
```python
from connection import _connect_tls_proxy
```

Establish a TLS connection to the proxy using the provided SSL context.

---
## BaseSSLError
```python
from connection import BaseSSLError
```



---
## _tunnel
```python
from connection import _tunnel
```



---
## _Sentinel
```python
from _collections import _Sentinel
```



---
## ensure_can_construct_http_header_dict
```python
from _collections import ensure_can_construct_http_header_dict
```



---
## RecentlyUsedContainer
```python
from _collections import RecentlyUsedContainer
```

Provides a thread-safe dict-like container which maintains up to
``maxsize`` keys while throwing away the least-recently-used keys beyond
``maxsize``.

:param maxsize:
    Maximum number of recent elements to retain.

:param dispose_func:
    Every time an item is evicted from the container,
    ``dispose_func(value)`` is called.  Callback which will get called

---
## HTTPHeaderDictItemView
```python
from _collections import HTTPHeaderDictItemView
```

HTTPHeaderDict is unusual for a Mapping[str, str] in that it has two modes of
address.

If we directly try to get an item with a particular name, we will get a string
back that is the concatenated version of all the values:

>>> d['X-Header-Name']
'Value1, Value2, Value3'

However, if we iterate over an HTTPHeaderDict's items, we will optionally combine
these values based on whether combine=True was called when building up the dictionary

>>> d = HTTPHeaderDict({"A": "1", "B": "foo"})
>>> d.add("A", "2", combine=True)
>>> d.add("B", "bar")
>>> list(d.items())
[
    ('A', '1, 2'),
    ('B', 'foo'),
    ('B', 'bar'),
]

This class conforms to the interface required by the MutableMapping ABC while
also giving us the nonstandard iteration behavior we want; items with duplicate
keys, ordered by time of first insertion.

---
## HTTPHeaderDict
```python
from _collections import HTTPHeaderDict
```

:param headers:
    An iterable of field-value pairs. Must not contain multiple field names
    when compared case-insensitively.

:param kwargs:
    Additional field-value pairs to pass in to ``dict.update``.

A ``dict`` like container for storing HTTP Headers.

Field names are stored and compared case-insensitively in compliance with
RFC 7230. Iteration provides the first case-sensitive key seen for each
case-insensitive pair.

Using ``__setitem__`` syntax overwrites fields that compare equal
case-insensitively in order to maintain ``dict``'s api. For fields that
compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
in a loop.

If multiple fields that are equal case-insensitively are passed to the
constructor or ``.update``, the behavior is undefined and some will be
lost.

>>> headers = HTTPHeaderDict()
>>> headers.add('Set-Cookie', 'foo=bar')
>>> headers.add('set-cookie', 'baz=quxx')
>>> headers['content-length'] = '7'
>>> headers['SET-cookie']
'foo=bar, baz=quxx'
>>> headers['Content-Length']
'7'

---
## HasGettableStringKeys
```python
from _collections import HasGettableStringKeys
```



---
## __init__
```python
from _collections import __init__
```



---
## __getitem__
```python
from _collections import __getitem__
```



---
## __setitem__
```python
from _collections import __setitem__
```



---
## __delitem__
```python
from _collections import __delitem__
```



---
## __len__
```python
from _collections import __len__
```



---
## __iter__
```python
from _collections import __iter__
```



---
## clear
```python
from _collections import clear
```



---
## keys
```python
from _collections import keys
```



---
## __contains__
```python
from _collections import __contains__
```



---
## setdefault
```python
from _collections import setdefault
```



---
## __eq__
```python
from _collections import __eq__
```



---
## __ne__
```python
from _collections import __ne__
```



---
## discard
```python
from _collections import discard
```



---
## add
```python
from _collections import add
```

Adds a (name, value) pair, doesn't overwrite the value if it already
exists.

>>> headers = HTTPHeaderDict(foo='bar')
>>> headers.add('Foo', 'baz')
>>> headers['foo']
'bar, baz'

---
## extend
```python
from _collections import extend
```

Generic import function for any type of header-like object.
Adapted version of MutableMapping.update in order to insert items
with self.add instead of self.__setitem__

---
## getlist
```python
from _collections import getlist
```

Returns a list of all the values for the named field. Returns an
empty list if the key doesn't exist.

---
## _prepare_for_method_change
```python
from _collections import _prepare_for_method_change
```

Remove content-specific header fields before changing the request
method to GET or HEAD according to RFC 9110, Section 15.4.

---
## __repr__
```python
from _collections import __repr__
```



---
## _copy_from
```python
from _collections import _copy_from
```



---
## copy
```python
from _collections import copy
```



---
## iteritems
```python
from _collections import iteritems
```

Iterate over all header lines, including duplicate ones.

---
## itermerged
```python
from _collections import itermerged
```

Iterate over all headers, merging duplicate ones together.

---
## items
```python
from _collections import items
```



---
## _has_value_for_header
```python
from _collections import _has_value_for_header
```



---
## __ior__
```python
from _collections import __ior__
```



---
## __or__
```python
from _collections import __or__
```



---
## __ror__
```python
from _collections import __ror__
```



---
## HTTPWarning
```python
from exceptions import HTTPWarning
```

Base warning used by this module.

---
## PoolError
```python
from exceptions import PoolError
```

Base exception for errors caused within a pool.

---
## RequestError
```python
from exceptions import RequestError
```

Base exception for PoolErrors that have associated URLs.

---
## MaxRetryError
```python
from exceptions import MaxRetryError
```

Raised when the maximum number of retries is exceeded.

:param pool: The connection pool
:type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
:param string url: The requested Url
:param exceptions.Exception reason: The underlying error

---
## HostChangedError
```python
from exceptions import HostChangedError
```

Raised when an existing pool gets a request for a foreign host.

---
## TimeoutStateError
```python
from exceptions import TimeoutStateError
```

Raised when passing an invalid state to a timeout

---
## TimeoutError
```python
from exceptions import TimeoutError
```

Raised when a socket timeout error occurs.

Catching this error will catch both :exc:`ReadTimeoutErrors
<ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.

---
## ReadTimeoutError
```python
from exceptions import ReadTimeoutError
```

Raised when a socket timeout occurs while receiving data from a server

---
## ConnectTimeoutError
```python
from exceptions import ConnectTimeoutError
```

Raised when a socket timeout occurs while connecting to a server

---
## NewConnectionError
```python
from exceptions import NewConnectionError
```

Raised when we fail to establish a new connection. Usually ECONNREFUSED.

---
## NameResolutionError
```python
from exceptions import NameResolutionError
```

Raised when host name resolution fails.

---
## EmptyPoolError
```python
from exceptions import EmptyPoolError
```

Raised when a pool runs out of connections and no more are allowed.

---
## FullPoolError
```python
from exceptions import FullPoolError
```

Raised when we try to add a connection to a full pool in blocking mode.

---
## ClosedPoolError
```python
from exceptions import ClosedPoolError
```

Raised when a request enters a pool after the pool has been closed.

---
## LocationValueError
```python
from exceptions import LocationValueError
```

Raised when there is something wrong with a given URL input.

---
## LocationParseError
```python
from exceptions import LocationParseError
```

Raised when get_host or similar fails to parse the URL input.

---
## URLSchemeUnknown
```python
from exceptions import URLSchemeUnknown
```

Raised when a URL input has an unsupported scheme.

---
## ResponseError
```python
from exceptions import ResponseError
```

Used as a container for an error reason supplied in a MaxRetryError.

---
## SecurityWarning
```python
from exceptions import SecurityWarning
```

Warned when performing security reducing actions

---
## InsecureRequestWarning
```python
from exceptions import InsecureRequestWarning
```

Warned when making an unverified HTTPS request.

---
## NotOpenSSLWarning
```python
from exceptions import NotOpenSSLWarning
```

Warned when using unsupported SSL library

---
## SystemTimeWarning
```python
from exceptions import SystemTimeWarning
```

Warned when system time is suspected to be wrong

---
## InsecurePlatformWarning
```python
from exceptions import InsecurePlatformWarning
```

Warned when certain TLS/SSL configuration is not available on a platform.

---
## DependencyWarning
```python
from exceptions import DependencyWarning
```

Warned when an attempt is made to import a module with missing optional
dependencies.

---
## ResponseNotChunked
```python
from exceptions import ResponseNotChunked
```

Response needs to be chunked in order to read it as chunks.

---
## BodyNotHttplibCompatible
```python
from exceptions import BodyNotHttplibCompatible
```

Body should be :class:`http.client.HTTPResponse` like
(have an fp attribute which returns raw chunks) for read_chunked().

---
## IncompleteRead
```python
from exceptions import IncompleteRead
```

Response length doesn't match expected Content-Length

Subclass of :class:`http.client.IncompleteRead` to allow int value
for ``partial`` to avoid creating large objects on streamed reads.

---
## InvalidChunkLength
```python
from exceptions import InvalidChunkLength
```

Invalid chunk length in a chunked response.

---
## ProxySchemeUnknown
```python
from exceptions import ProxySchemeUnknown
```

ProxyManager does not support the supplied scheme

---
## ProxySchemeUnsupported
```python
from exceptions import ProxySchemeUnsupported
```

Fetching HTTPS resources through HTTPS proxies is unsupported

---
## HeaderParsingError
```python
from exceptions import HeaderParsingError
```

Raised by assert_header_parsing, but we convert it to a log.warning statement.

---
## pool
```python
from exceptions import pool
```



---
## __name__
```python
from _request_methods import __name__
```



---
## RequestMethods
```python
from _request_methods import RequestMethods
```

Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`urllib3.HTTPConnectionPool` and
:class:`urllib3.PoolManager`.

Provides behavior for making common types of HTTP request methods and
decides which type of request field encoding to use.

Specifically,

:meth:`.request_encode_url` is for sending requests whose fields are
encoded in the URL (such as GET, HEAD, DELETE).

:meth:`.request_encode_body` is for sending requests whose fields are
encoded in the *body* of the request using multipart or www-form-urlencoded
(such as for POST, PUT, PATCH).

:meth:`.request` is for making any kind of request, it will look up the
appropriate encoding format and use one of the above two methods to make
the request.

Initializer parameters:

:param headers:
    Headers to include with all requests, unless other headers are given
    explicitly.

---
## __init__
```python
from _request_methods import __init__
```



---
## urlopen
```python
from _request_methods import urlopen
```



---
## request
```python
from _request_methods import request
```

Make a request using :meth:`urlopen` with the appropriate encoding of
``fields`` based on the ``method`` used.

This is a convenience method that requires the least amount of manual
effort. It can be used in most situations, while still having the
option to drop down to more specific methods when necessary, such as
:meth:`request_encode_url`, :meth:`request_encode_body`,
or even the lowest level :meth:`urlopen`.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param body:
    Data to send in the request body, either :class:`str`, :class:`bytes`,
    an iterable of :class:`str`/:class:`bytes`, or a file-like object.

:param fields:
    Data to encode and send in the URL or request body, depending on ``method``.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc. If None, pool headers are used. If provided,
    these headers completely replace any pool-specific headers.

:param json:
    Data to encode and send as JSON with UTF-encoded in the request body.
    The ``"Content-Type"`` header will be set to ``"application/json"``
    unless specified otherwise.

---
## request_encode_url
```python
from _request_methods import request_encode_url
```

Make a request using :meth:`urlopen` with the ``fields`` encoded in
the url. This is useful for request methods like GET, HEAD, DELETE, etc.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param fields:
    Data to encode and send in the URL.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc. If None, pool headers are used. If provided,
    these headers completely replace any pool-specific headers.

---
## request_encode_body
```python
from _request_methods import request_encode_body
```

Make a request using :meth:`urlopen` with the ``fields`` encoded in
the body. This is useful for request methods like POST, PUT, PATCH, etc.

When ``encode_multipart=True`` (default), then
:func:`urllib3.encode_multipart_formdata` is used to encode
the payload with the appropriate content type. Otherwise
:func:`urllib.parse.urlencode` is used with the
'application/x-www-form-urlencoded' content type.

Multipart encoding must be used when posting files, and it's reasonably
safe to use it in other times too. However, it may break request
signing, such as with OAuth.

Supports an optional ``fields`` parameter of key/value strings AND
key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
the MIME type is optional. For example::

    fields = {
        'foo': 'bar',
        'fakefile': ('foofile.txt', 'contents of foofile'),
        'realfile': ('barfile.txt', open('realfile').read()),
        'typedfile': ('bazfile.bin', open('bazfile').read(),
                      'image/jpeg'),
        'nonamefile': 'contents of nonamefile field',
    }

When uploading a file, providing a filename (the first parameter of the
tuple) is optional but recommended to best mimic behavior of browsers.

Note that if ``headers`` are supplied, the 'Content-Type' header will
be overwritten because it depends on the dynamic random boundary string
which is used to compose the body of the request. The random boundary
string can be explicitly set with the ``multipart_boundary`` parameter.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param fields:
    Data to encode and send in the request body.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc. If None, pool headers are used. If provided,
    these headers completely replace any pool-specific headers.

:param encode_multipart:
    If True, encode the ``fields`` using the multipart/form-data MIME
    format.

:param multipart_boundary:
    If not specified, then a random boundary will be generated using
    :func:`urllib3.filepost.choose_boundary`.

---
## __name__
```python
from connectionpool import __name__
```



---
## ConnectionPool
```python
from connectionpool import ConnectionPool
```

Base class for all connection pools, such as
:class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.

.. note::
   ConnectionPool.urlopen() does not normalize or percent-encode target URIs
   which is useful if your target server doesn't support percent-encoded
   target URIs.

---
## HTTPConnectionPool
```python
from connectionpool import HTTPConnectionPool
```

Thread-safe connection pool for one host.

:param host:
    Host used for this HTTP Connection (e.g. "localhost"), passed into
    :class:`http.client.HTTPConnection`.

:param port:
    Port used for this HTTP Connection (None is equivalent to 80), passed
    into :class:`http.client.HTTPConnection`.

:param strict:
    Causes BadStatusLine to be raised if the status line can't be parsed
    as a valid HTTP/1.0 or 1.1 status line, passed into
    :class:`http.client.HTTPConnection`.

    .. note::
       Only works in Python 2. This parameter is ignored in Python 3.

:param timeout:
    Socket timeout in seconds for each individual connection. This can
    be a float or integer, which sets the timeout for the HTTP request,
    or an instance of :class:`urllib3.util.Timeout` which gives you more
    fine-grained control over request timeouts. After the constructor has
    been parsed, this is always a `urllib3.util.Timeout` object.

:param maxsize:
    Number of connections to save that can be reused. More than 1 is useful
    in multithreaded situations. If ``block`` is set to False, more
    connections will be created but they will not be saved once they've
    been used.

:param block:
    If set to True, no more than ``maxsize`` connections will be used at
    a time. When no free connections are available, the call will block
    until a connection has been released. This is a useful side effect for
    particular multithreaded situations where one does not want to use more
    than maxsize connections per host to prevent flooding.

:param headers:
    Headers to include with all requests, unless other headers are given
    explicitly.

:param retries:
    Retry configuration to use by default with requests in this pool.

:param _proxy:
    Parsed proxy URL, should not be used directly, instead, see
    :class:`urllib3.ProxyManager`

:param _proxy_headers:
    A dictionary with proxy headers, should not be used directly,
    instead, see :class:`urllib3.ProxyManager`

:param \**conn_kw:
    Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
    :class:`urllib3.connection.HTTPSConnection` instances.

---
## HTTPSConnectionPool
```python
from connectionpool import HTTPSConnectionPool
```

Same as :class:`.HTTPConnectionPool`, but HTTPS.

:class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
``assert_hostname`` and ``host`` in this order to verify connections.
If ``assert_hostname`` is False, no verification is done.

The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
the connection socket into an SSL socket.

---
## connection_from_url
```python
from connectionpool import connection_from_url
```

Given a url, return an :class:`.ConnectionPool` instance of its host.

This is a shortcut for not having to parse out the scheme, host, and port
of the url before creating an :class:`.ConnectionPool` instance.

:param url:
    Absolute URL string that must include the scheme. Port is optional.

:param \**kw:
    Passes additional parameters to the constructor of the appropriate
    :class:`.ConnectionPool`. Useful for specifying things like
    timeout, maxsize, headers, etc.

Example::

    >>> conn = connection_from_url('http://google.com/')
    >>> r = conn.request('GET', '/')

---
## _normalize_host
```python
from connectionpool import _normalize_host
```

Normalize hosts for comparisons and use with sockets.

---
## _url_from_pool
```python
from connectionpool import _url_from_pool
```

Returns the URL from a given connection pool. This is mainly used for testing and logging.

---
## _close_pool_connections
```python
from connectionpool import _close_pool_connections
```

Drains a queue of connections and closes each one.

---
## __init__
```python
from connectionpool import __init__
```



---
## __str__
```python
from connectionpool import __str__
```



---
## __enter__
```python
from connectionpool import __enter__
```



---
## __exit__
```python
from connectionpool import __exit__
```



---
## close
```python
from connectionpool import close
```

Close all pooled connections and disable the pool.

---
## _new_conn
```python
from connectionpool import _new_conn
```

Return a fresh :class:`http.client.HTTPSConnection`.

---
## _get_conn
```python
from connectionpool import _get_conn
```

Get a connection. Will return a pooled connection if one is available.

If no connections are available and :prop:`.block` is ``False``, then a
fresh connection is returned.

:param timeout:
    Seconds to wait before giving up and raising
    :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
    :prop:`.block` is ``True``.

---
## _put_conn
```python
from connectionpool import _put_conn
```

Put a connection back into the pool.

:param conn:
    Connection object for the current host and port as returned by
    :meth:`._new_conn` or :meth:`._get_conn`.

If the pool is already full, the connection is closed and discarded
because we exceeded maxsize. If connections are discarded frequently,
then maxsize should be increased.

If the pool is closed, then the connection will be closed and discarded.

---
## _validate_conn
```python
from connectionpool import _validate_conn
```

Called right before a request is made, after the socket is created.

---
## _prepare_proxy
```python
from connectionpool import _prepare_proxy
```

Establishes a tunnel connection through HTTP CONNECT.

Tunnel connection is established early because otherwise httplib would
improperly set Host: header to proxy's IP:port.

---
## _get_timeout
```python
from connectionpool import _get_timeout
```

Helper that always returns a :class:`urllib3.util.Timeout`

---
## _raise_timeout
```python
from connectionpool import _raise_timeout
```

Is the error actually a timeout? Will raise a ReadTimeout or pass

---
## _make_request
```python
from connectionpool import _make_request
```

Perform a request on a given urllib connection object taken from our
pool.

:param conn:
    a connection from one of our connection pools

:param timeout:
    Socket timeout in seconds for the request. This can be a
    float or integer, which will set the same timeout value for
    the socket connect and the socket read, or an instance of
    :class:`urllib3.util.Timeout`, which gives you more fine-grained
    control over your timeouts.

---
## is_same_host
```python
from connectionpool import is_same_host
```

Check if the given ``url`` is a member of the same host as this
connection pool.

---
## urlopen
```python
from connectionpool import urlopen
```

Get a connection from the pool and perform an HTTP request. This is the
lowest level call for making a request, so you'll need to specify all
the raw details.

.. note::

   More commonly, it's appropriate to use a convenience method provided
   by :class:`.RequestMethods`, such as :meth:`request`.

.. note::

   `release_conn` will only behave as expected if
   `preload_content=False` because we want to make
   `preload_content=False` the default behaviour someday soon without
   breaking backwards compatibility.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param body:
    Data to send in the request body, either :class:`str`, :class:`bytes`,
    an iterable of :class:`str`/:class:`bytes`, or a file-like object.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc. If None, pool headers are used. If provided,
    these headers completely replace any pool-specific headers.

:param retries:
    Configure the number of retries to allow before raising a
    :class:`~urllib3.exceptions.MaxRetryError` exception.

    Pass ``None`` to retry until you receive a response. Pass a
    :class:`~urllib3.util.retry.Retry` object for fine-grained control
    over different types of retries.
    Pass an integer number to retry connection errors that many times,
    but no other types of errors. Pass zero to never retry.

    If ``False``, then retries are disabled and any exception is raised
    immediately. Also, instead of raising a MaxRetryError on redirects,
    the redirect response will be returned.

:type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

:param redirect:
    If True, automatically handle redirects (status codes 301, 302,
    303, 307, 308). Each redirect counts as a retry. Disabling retries
    will disable redirect, too.

:param assert_same_host:
    If ``True``, will make sure that the host of the pool requests is
    consistent else will raise HostChangedError. When ``False``, you can
    use the pool on an HTTP proxy and request foreign hosts.

:param timeout:
    If specified, overrides the default timeout for this one
    request. It may be a float (in seconds) or an instance of
    :class:`urllib3.util.Timeout`.

:param pool_timeout:
    If set and the pool is set to block=True, then this method will
    block for ``pool_timeout`` seconds and raise EmptyPoolError if no
    connection is available within the time period.

:param release_conn:
    If False, then the urlopen call will not release the connection
    back into the pool once a response is received (but will release if
    you read the entire contents of the response such as when
    `preload_content=True`). This is useful if you're not preloading
    the response's content immediately. You will need to call
    ``r.release_conn()`` on the response ``r`` to return the connection
    back into the pool. If None, it takes the value of
    ``response_kw.get('preload_content', True)``.

:param chunked:
    If True, urllib3 will send the body using chunked transfer
    encoding. Otherwise, urllib3 will send the body using the standard
    content-length form. Defaults to False.

:param int body_pos:
    Position to seek to in file-like body in the event of a retry or
    redirect. Typically this won't need to be set because urllib3 will
    auto-populate the value when needed.

:param \**response_kw:
    Additional parameters are passed to
    :meth:`urllib3.response.HTTPResponse.from_httplib`

---
## _schemas
```python
from _core import _schemas
```

All schemas we ship.

---
## __name__
```python
from patch import __name__
```

The command line interface.

---
## _PatchedRichCommand
```python
from patch import _PatchedRichCommand
```



---
## _PatchedRichMultiCommand
```python
from patch import _PatchedRichMultiCommand
```



---
## _PatchedRichCommandCollection
```python
from patch import _PatchedRichCommandCollection
```



---
## _PatchedRichGroup
```python
from patch import _PatchedRichGroup
```



---
## rich_command
```python
from patch import rich_command
```



---
## rich_group
```python
from patch import rich_group
```



---
## patch
```python
from patch import patch
```

Patch Click internals to use rich-click types.

---
## __name__
```python
from rich_click import __name__
```



---
## __getattr__
```python
from rich_click import __getattr__
```



---
## __name__
```python
from rich_context import __name__
```



---
## RichContext
```python
from rich_context import RichContext
```

Click Context class endowed with Rich superpowers.

---
## __init__
```python
from rich_context import __init__
```

Create Rich Context instance.

Args:
----
    *args: Args that get passed to click.Context.
    rich_console: Rich Console. Defaults to None.
    rich_help_config: Rich help configuration.  Defaults to None.
    **kwargs: Kwargs that get passed to click.Context.

---
## make_formatter
```python
from rich_context import make_formatter
```

Create the Rich Help Formatter.

---
## exit
```python
from rich_context import exit
```



---
## __enter__
```python
from rich_context import __enter__
```



---
## __exit__
```python
from rich_context import __exit__
```



---
## __name__
```python
from _compat_click import __name__
```



---
## __name__
```python
from rich_help_configuration import __name__
```



---
## force_terminal_default
```python
from rich_help_configuration import force_terminal_default
```

Use as the default factory for `force_terminal`.

---
## terminal_width_default
```python
from rich_help_configuration import terminal_width_default
```

Use as the default factory for `width` and `max_width`.

---
## RichHelpConfiguration
```python
from rich_help_configuration import RichHelpConfiguration
```

Rich Help Configuration class.

When merging multiple RichHelpConfigurations together, user-defined values always
take precedence over the class's defaults. When there are multiple user-defined values
for a given field, the right-most field is used.

---
## __getattr__
```python
from rich_help_configuration import __getattr__
```



---
## __post_init__
```python
from rich_help_configuration import __post_init__
```



---
## load_from_globals
```python
from rich_help_configuration import load_from_globals
```

Build a RichHelpConfiguration from globals in rich_click.rich_click.

When building from globals, all fields are treated as having been set by the user,
meaning they will overwrite other fields when "merged".

---
## dump_to_globals
```python
from rich_help_configuration import dump_to_globals
```



---
## OptionHighlighter
```python
from rich_help_configuration import OptionHighlighter
```

Highlights our special options.

---
## __name__
```python
from rich_command import __name__
```



---
## RichCommand
```python
from rich_command import RichCommand
```

Richly formatted click Command.

Inherits click.Command and overrides help and error methods
to print richly formatted output.

This class can be used as a mixin for other click command objects.

---
## RichMultiCommand
```python
from rich_command import RichMultiCommand
```

Richly formatted click MultiCommand.

Inherits click.MultiCommand and overrides help and error methods
to print richly formatted output.

---
## RichGroup
```python
from rich_command import RichGroup
```

Richly formatted click Group.

Inherits click.Group and overrides help and error methods
to print richly formatted output.

---
## RichCommandCollection
```python
from rich_command import RichCommandCollection
```

Richly formatted click CommandCollection.

Inherits click.CommandCollection and overrides help and error methods
to print richly formatted output.

---
## prevent_incompatible_overrides
```python
from rich_command import prevent_incompatible_overrides
```

For use by the rich-click CLI.

---
## __init__
```python
from rich_command import __init__
```

Initialize RichCommandCollection class.

---
## _register_rich_context_settings_from_callback
```python
from rich_command import _register_rich_context_settings_from_callback
```



---
## console
```python
from rich_command import console
```

Rich Console.

This is a separate instance from the help formatter that allows full control of the
console configuration.

See `rich_config` decorator for how to apply the settings.

---
## help_config
```python
from rich_command import help_config
```

Rich Help Configuration.

---
## _generate_rich_help_config
```python
from rich_command import _generate_rich_help_config
```

Use for error handling when a Context is not available.

If the Context is available, then the help configuration in the Context
should be preferred.

---
## main
```python
from rich_command import main
```



---
## format_help
```python
from rich_command import format_help
```



---
## format_help_text
```python
from rich_command import format_help_text
```



---
## format_options
```python
from rich_command import format_options
```



---
## format_epilog
```python
from rich_command import format_epilog
```



---
## make_context
```python
from rich_command import make_context
```



---
## format_commands
```python
from rich_command import format_commands
```



---
## command
```python
from rich_command import command
```



---
## group
```python
from rich_command import group
```



---
## __call__
```python
from rich_command import __call__
```

Alias for :meth:`main`.

---
## entry_points
```python
from cli import entry_points
```

entry_points function that is compatible with Python 3.7+.

---
## patch
```python
from cli import patch
```



---
## _RichHelpConfigurationParamType
```python
from cli import _RichHelpConfigurationParamType
```



---
## _get_module_path_and_function_name
```python
from cli import _get_module_path_and_function_name
```



---
## __repr__
```python
from cli import __repr__
```



---
## convert
```python
from cli import convert
```



---
## truthy
```python
from utils import truthy
```

Check if string or other obj is truthy.

---
## method_is_from_subclass_of
```python
from utils import method_is_from_subclass_of
```

Check to see whether a class's method comes from a subclass of some base class.

This is used under the hood to see whether we would expect a patched RichCommand's help text
methods to be compatible or incompatible with rich-click or not.

---
## CommandGroupDict
```python
from utils import CommandGroupDict
```

Specification for command groups.

---
## OptionGroupDict
```python
from utils import OptionGroupDict
```

Specification for option groups.

---
## __name__
```python
from rich_group import __name__
```



---
## __name__
```python
from rich_help_formatter import __name__
```



---
## create_console
```python
from rich_help_formatter import create_console
```

Create a Rich Console configured from Rich Help Configuration.

Args:
----
    config: Rich Help Configuration instance
    file: Optional IO stream to write Rich Console output
        Defaults to None.

---
## RichHelpFormatter
```python
from rich_help_formatter import RichHelpFormatter
```

Rich Help Formatter.

This class is a container for the help configuration and Rich Console that
are used internally by the help and error printing methods.

---
## __init__
```python
from rich_help_formatter import __init__
```

Create Rich Help Formatter.

Args:
----
    indent_increment: Passed to click.HelpFormatter.
    width: Passed to click.HelpFormatter. Overrides config.width if not None.
    max_width: Passed to click.HelpFormatter. Overrides config.max_width if not None.
    *args: Args passed to click.HelpFormatter.
    console: Use an external console.
    config: RichHelpConfiguration. If None, then build config from globals.
    file: Stream to output to in the Rich Console. If None, use stdout.
    **kwargs: Kwargs passed to click.HelpFormatter.

---
## highlighter
```python
from rich_help_formatter import highlighter
```



---
## write
```python
from rich_help_formatter import write
```



---
## write_usage
```python
from rich_help_formatter import write_usage
```



---
## write_abort
```python
from rich_help_formatter import write_abort
```

Print richly formatted abort error.

---
## HighlighterClass
```python
from rich_help_formatter import HighlighterClass
```



---
## __name__
```python
from rich_help_rendering import __name__
```



---
## _make_rich_rext
```python
from rich_help_rendering import _make_rich_rext
```

Take a string, remove indentations, and return styled text.
By default, return the text as a Rich Text with the request style.
If config.use_rich_markup is True, also parse the text for Rich markup strings.
If config.use_markdown is True, parse as Markdown.
Only one of config.use_markdown or config.use_rich_markup can be True.
If both are True, config.use_markdown takes precedence.

Args:
----
    text (str): Text to style.
    style (StyleType): Rich style to apply.
    formatter: formatter object.

Returns:
-------
    MarkdownElement or Text: Styled text object

---
## _get_help_text
```python
from rich_help_rendering import _get_help_text
```

Build primary help text for a click command or group.
Returns the prose help text for a command or group, rendered either as a
Rich Text object or as Markdown.
If the command is marked as depreciated, the depreciated string will be prepended.

Args:
----
    obj (click.Command or click.Group): Command or group to build help text for.
    formatter: formatter object.

Yields:
------
    Text or Markdown: Multiple styled objects (depreciated, usage)

---
## _get_option_help
```python
from rich_help_rendering import _get_option_help
```

Build primary help text for a click option or argument.
Returns the prose help text for an option or argument, rendered either
as a Rich Text object or as Markdown.
Additional elements are appended to show the default and required status if applicable.

Args:
----
    param (click.Argument or click.Option): Parameter to build help text for.
    ctx (click.Context): Click Context object.
    formatter (RichHelpFormatter): formatter object.

Returns:
-------
    Columns: A columns element with multiple styled objects (help, default, required)

---
## _make_command_help
```python
from rich_help_rendering import _make_command_help
```

Build cli help text for a click group command.
That is, when calling help on groups with multiple subcommands
(not the main help text when calling the subcommand help).
Returns the first paragraph of help text for a command, rendered either as a
Rich Text object or as Markdown.
Ignores single newlines as paragraph markers, looks for double only.

Args:
----
    help_text (str): Help text
    formatter: formatter object
    is_deprecated (bool): Object marked by user as deprecated.

Returns:
-------
    Text or Markdown: Styled object

---
## get_rich_usage
```python
from rich_help_rendering import get_rich_usage
```

Richly render usage text.

---
## get_rich_help_text
```python
from rich_help_rendering import get_rich_help_text
```

Write rich help text to the formatter if it exists.

---
## _resolve_groups
```python
from rich_help_rendering import _resolve_groups
```

Logic for resolving the groups.

---
## get_rich_options
```python
from rich_help_rendering import get_rich_options
```

Richly render a click Command's options.

---
## get_rich_commands
```python
from rich_help_rendering import get_rich_commands
```

Richly render a click Command's options.

---
## get_rich_epilog
```python
from rich_help_rendering import get_rich_epilog
```

Richly render a click Command's epilog if it exists.

---
## rich_format_error
```python
from rich_help_rendering import rich_format_error
```

Print richly formatted click errors.

Called by custom exception handler to print richly formatted click errors.
Mimics original click.ClickException.echo() function but with rich formatting.

Args:
----
    self (click.ClickException): Click exception to format.
    formatter: formatter object.

---
## rich_abort_error
```python
from rich_help_rendering import rich_abort_error
```

Print richly formatted abort error.

---
## UsageHighlighter
```python
from rich_help_rendering import UsageHighlighter
```



---
## MetavarHighlighter
```python
from rich_help_rendering import MetavarHighlighter
```



---
## NotSupportedError
```python
from decorators import NotSupportedError
```

Not Supported Error.

---
## rich_config
```python
from decorators import rich_config
```

Use decorator to configure Rich Click settings.

Args:
----
    help_config: Rich help configuration that is used internally to format help messages and exceptions
        Defaults to None.
    console: A Rich Console that will be accessible from the `RichContext`, `RichCommand`, and `RichGroup` instances
        Defaults to None.

---
## decorator_with_warning
```python
from decorators import decorator_with_warning
```



---
## __name__
```python
from functional_validators import __name__
```

This module contains related classes and functions for validation.

---
## AfterValidator
```python
from functional_validators import AfterValidator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#annotated-validators

A metadata class that indicates that a validation should be applied **after** the inner validation logic.

Attributes:
    func: The validator function.

Example:
    ```py
    from typing_extensions import Annotated

    from pydantic import AfterValidator, BaseModel, ValidationError

    MyInt = Annotated[int, AfterValidator(lambda v: v + 1)]

    class Model(BaseModel):
        a: MyInt

    print(Model(a=1).a)
    #> 2

    try:
        Model(a='a')
    except ValidationError as e:
        print(e.json(indent=2))
        '''
        [
          {
            "type": "int_parsing",
            "loc": [
              "a"
            ],
            "msg": "Input should be a valid integer, unable to parse string as an integer",
            "input": "a",
            "url": "https://errors.pydantic.dev/2/v/int_parsing"
          }
        ]
        '''
    ```

---
## BeforeValidator
```python
from functional_validators import BeforeValidator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#annotated-validators

A metadata class that indicates that a validation should be applied **before** the inner validation logic.

Attributes:
    func: The validator function.
    json_schema_input_type: The input type of the function. This is only used to generate the appropriate
        JSON Schema (in validation mode).

Example:
    ```py
    from typing_extensions import Annotated

    from pydantic import BaseModel, BeforeValidator

    MyInt = Annotated[int, BeforeValidator(lambda v: v + 1)]

    class Model(BaseModel):
        a: MyInt

    print(Model(a=1).a)
    #> 2

    try:
        Model(a='a')
    except TypeError as e:
        print(e)
        #> can only concatenate str (not "int") to str
    ```

---
## PlainValidator
```python
from functional_validators import PlainValidator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#annotated-validators

A metadata class that indicates that a validation should be applied **instead** of the inner validation logic.

Attributes:
    func: The validator function.
    json_schema_input_type: The input type of the function. This is only used to generate the appropriate
        JSON Schema (in validation mode). If not provided, will default to `Any`.

Example:
    ```py
    from typing_extensions import Annotated

    from pydantic import BaseModel, PlainValidator

    MyInt = Annotated[int, PlainValidator(lambda v: int(v) + 1)]

    class Model(BaseModel):
        a: MyInt

    print(Model(a='1').a)
    #> 2
    ```

---
## WrapValidator
```python
from functional_validators import WrapValidator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#annotated-validators

A metadata class that indicates that a validation should be applied **around** the inner validation logic.

Attributes:
    func: The validator function.
    json_schema_input_type: The input type of the function. This is only used to generate the appropriate
        JSON Schema (in validation mode).

```py
from datetime import datetime

from typing_extensions import Annotated

from pydantic import BaseModel, ValidationError, WrapValidator

def validate_timestamp(v, handler):
    if v == 'now':
        # we don't want to bother with further validation, just return the new value
        return datetime.now()
    try:
        return handler(v)
    except ValidationError:
        # validation failed, in this case we want to return a default value
        return datetime(2000, 1, 1)

MyTimestamp = Annotated[datetime, WrapValidator(validate_timestamp)]

class Model(BaseModel):
    a: MyTimestamp

print(Model(a='now').a)
#> 2032-01-02 03:04:05.000006
print(Model(a='invalid').a)
#> 2000-01-01 00:00:00
```

---
## field_validator
```python
from functional_validators import field_validator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#field-validators

Decorate methods on the class indicating that they should be used to validate fields.

Example usage:
```py
from typing import Any

from pydantic import (
    BaseModel,
    ValidationError,
    field_validator,
)

class Model(BaseModel):
    a: str

    @field_validator('a')
    @classmethod
    def ensure_foobar(cls, v: Any):
        if 'foobar' not in v:
            raise ValueError('"foobar" not found in a')
        return v

print(repr(Model(a='this is foobar good')))
#> Model(a='this is foobar good')

try:
    Model(a='snap')
except ValidationError as exc_info:
    print(exc_info)
    '''
    1 validation error for Model
    a
      Value error, "foobar" not found in a [type=value_error, input_value='snap', input_type=str]
    '''
```

For more in depth examples, see [Field Validators](../concepts/validators.md#field-validators).

Args:
    field: The first field the `field_validator` should be called on; this is separate
        from `fields` to ensure an error is raised if you don't pass at least one.
    *fields: Additional field(s) the `field_validator` should be called on.
    mode: Specifies whether to validate the fields before or after validation.
    check_fields: Whether to check that the fields actually exist on the model.
    json_schema_input_type: The input type of the function. This is only used to generate
        the appropriate JSON Schema (in validation mode) and can only specified
        when `mode` is either `'before'`, `'plain'` or `'wrap'`.

Returns:
    A decorator that can be used to decorate a function to be used as a field_validator.

Raises:
    PydanticUserError:
        - If `@field_validator` is used bare (with no fields).
        - If the args passed to `@field_validator` as fields are not strings.
        - If `@field_validator` applied to instance methods.

---
## ModelWrapValidatorHandler
```python
from functional_validators import ModelWrapValidatorHandler
```

`@model_validator` decorated function handler argument type. This is used when `mode='wrap'`.

---
## ModelWrapValidatorWithoutInfo
```python
from functional_validators import ModelWrapValidatorWithoutInfo
```

A `@model_validator` decorated function signature.
This is used when `mode='wrap'` and the function does not have info argument.

---
## ModelWrapValidator
```python
from functional_validators import ModelWrapValidator
```

A `@model_validator` decorated function signature. This is used when `mode='wrap'`.

---
## FreeModelBeforeValidatorWithoutInfo
```python
from functional_validators import FreeModelBeforeValidatorWithoutInfo
```

A `@model_validator` decorated function signature.
This is used when `mode='before'` and the function does not have info argument.

---
## ModelBeforeValidatorWithoutInfo
```python
from functional_validators import ModelBeforeValidatorWithoutInfo
```

A `@model_validator` decorated function signature.
This is used when `mode='before'` and the function does not have info argument.

---
## FreeModelBeforeValidator
```python
from functional_validators import FreeModelBeforeValidator
```

A `@model_validator` decorated function signature. This is used when `mode='before'`.

---
## ModelBeforeValidator
```python
from functional_validators import ModelBeforeValidator
```

A `@model_validator` decorated function signature. This is used when `mode='before'`.

---
## model_validator
```python
from functional_validators import model_validator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validators/#model-validators

Decorate model methods for validation purposes.

Example usage:
```py
from typing_extensions import Self

from pydantic import BaseModel, ValidationError, model_validator

class Square(BaseModel):
    width: float
    height: float

    @model_validator(mode='after')
    def verify_square(self) -> Self:
        if self.width != self.height:
            raise ValueError('width and height do not match')
        return self

s = Square(width=1, height=1)
print(repr(s))
#> Square(width=1.0, height=1.0)

try:
    Square(width=1, height=2)
except ValidationError as e:
    print(e)
    '''
    1 validation error for Square
      Value error, width and height do not match [type=value_error, input_value={'width': 1, 'height': 2}, input_type=dict]
    '''
```

For more in depth examples, see [Model Validators](../concepts/validators.md#model-validators).

Args:
    mode: A required string literal that specifies the validation mode.
        It can be one of the following: 'wrap', 'before', or 'after'.

Returns:
    A decorator that can be used to decorate a function to be used as a model validator.

---
## __get_pydantic_core_schema__
```python
from functional_validators import __get_pydantic_core_schema__
```



---
## _from_decorator
```python
from functional_validators import _from_decorator
```



---
## _OnlyValueValidatorClsMethod
```python
from functional_validators import _OnlyValueValidatorClsMethod
```



---
## _V2ValidatorClsMethod
```python
from functional_validators import _V2ValidatorClsMethod
```



---
## _OnlyValueWrapValidatorClsMethod
```python
from functional_validators import _OnlyValueWrapValidatorClsMethod
```



---
## _V2WrapValidatorClsMethod
```python
from functional_validators import _V2WrapValidatorClsMethod
```



---
## dec
```python
from functional_validators import dec
```



---
## __call__
```python
from functional_validators import __call__
```



---
## InstanceOf
```python
from functional_validators import InstanceOf
```

Generic type for annotating a type that is an instance of a given class.

Example:
    ```py
    from pydantic import BaseModel, InstanceOf

    class Foo:
        ...

    class Bar(BaseModel):
        foo: InstanceOf[Foo]

    Bar(foo=Foo())
    try:
        Bar(foo=42)
    except ValidationError as e:
        print(e)
        """
        [
        │   {
        │   │   'type': 'is_instance_of',
        │   │   'loc': ('foo',),
        │   │   'msg': 'Input should be an instance of Foo',
        │   │   'input': 42,
        │   │   'ctx': {'class': 'Foo'},
        │   │   'url': 'https://errors.pydantic.dev/0.38.0/v/is_instance_of'
        │   }
        ]
        """
    ```

---
## SkipValidation
```python
from functional_validators import SkipValidation
```

If this is applied as an annotation (e.g., via `x: Annotated[int, SkipValidation]`), validation will be
    skipped. You can also use `SkipValidation[int]` as a shorthand for `Annotated[int, SkipValidation]`.

This can be useful if you want to use a type annotation for documentation/IDE/type-checking purposes,
and know that it is safe to skip validation for one or more of the fields.

Because this converts the validation schema to `any_schema`, subsequent annotation-applied transformations
may not have the expected effects. Therefore, when used, this annotation should generally be the final
annotation applied to a type.

---
## __class_getitem__
```python
from functional_validators import __class_getitem__
```



---
## __name__
```python
from alias_generators import __name__
```

Alias generators for converting between different capitalization conventions.

---
## to_pascal
```python
from alias_generators import to_pascal
```

Convert a snake_case string to PascalCase.

Args:
    snake: The string to convert.

Returns:
    The PascalCase string.

---
## to_camel
```python
from alias_generators import to_camel
```

Convert a snake_case string to camelCase.

Args:
    snake: The string to convert.

Returns:
    The converted camelCase string.

---
## to_snake
```python
from alias_generators import to_snake
```

Convert a PascalCase, camelCase, or kebab-case string to snake_case.

Args:
    camel: The string to convert.

Returns:
    The converted string in snake_case.

---
## RGBA
```python
from color import RGBA
```

Internal use only as a representation of a color.

---
## parse_tuple
```python
from color import parse_tuple
```

Parse a tuple or list as a color.

---
## parse_str
```python
from color import parse_str
```

Parse a string to an RGBA tuple, trying the following formats (in this order):
* named color, see COLORS_BY_NAME below
* hex short eg. `<prefix>fff` (prefix can be `#`, `0x` or nothing)
* hex long eg. `<prefix>ffffff` (prefix can be `#`, `0x` or nothing)
* `rgb(<r>, <g>, <b>) `
* `rgba(<r>, <g>, <b>, <a>)`

---
## ints_to_rgba
```python
from color import ints_to_rgba
```



---
## parse_color_value
```python
from color import parse_color_value
```

Parse a value checking it's a valid int in the range 0 to max_val and divide by max_val to give a number
in the range 0 to 1

---
## parse_float_alpha
```python
from color import parse_float_alpha
```

Parse a value checking it's a valid float in the range 0 to 1

---
## parse_hsl
```python
from color import parse_hsl
```

Parse raw hue, saturation, lightness and alpha values and convert to RGBA.

---
## float_to_255
```python
from color import float_to_255
```



---
## __init__
```python
from color import __init__
```



---
## __getitem__
```python
from color import __getitem__
```



---
## __get_pydantic_json_schema__
```python
from color import __get_pydantic_json_schema__
```



---
## original
```python
from color import original
```

Original value passed to Color

---
## as_named
```python
from color import as_named
```



---
## as_hex
```python
from color import as_hex
```

Hex string representing the color can be 3, 4, 6 or 8 characters depending on whether the string
a "short" representation of the color is possible and whether there's an alpha channel.

---
## as_rgb
```python
from color import as_rgb
```

Color as an rgb(<r>, <g>, <b>) or rgba(<r>, <g>, <b>, <a>) string.

---
## as_rgb_tuple
```python
from color import as_rgb_tuple
```

Color as an RGB or RGBA tuple; red, green and blue are in the range 0 to 255, alpha if included is
in the range 0 to 1.

:param alpha: whether to include the alpha channel, options are
  None - (default) include alpha only if it's set (e.g. not None)
  True - always include alpha,
  False - always omit alpha,

---
## as_hsl
```python
from color import as_hsl
```

Color as an hsl(<h>, <s>, <l>) or hsl(<h>, <s>, <l>, <a>) string.

---
## as_hsl_tuple
```python
from color import as_hsl_tuple
```

Color as an HSL or HSLA tuple, e.g. hue, saturation, lightness and optionally alpha; all elements are in
the range 0 to 1.

NOTE: this is HSL as used in HTML and most other places, not HLS as used in python's colorsys.

:param alpha: whether to include the alpha channel, options are
  None - (default) include alpha only if it's set (e.g. not None)
  True - always include alpha,
  False - always omit alpha,

---
## _alpha_float
```python
from color import _alpha_float
```



---
## __get_pydantic_core_schema__
```python
from color import __get_pydantic_core_schema__
```



---
## _validate
```python
from color import _validate
```



---
## __repr_args__
```python
from color import __repr_args__
```



---
## __eq__
```python
from color import __eq__
```



---
## __hash__
```python
from color import __hash__
```



---
## ConfigDict
```python
from config import ConfigDict
```



---
## with_config
```python
from config import with_config
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/config/#configuration-with-dataclass-from-the-standard-library-or-typeddict

A convenience decorator to set a [Pydantic configuration](config.md) on a `TypedDict` or a `dataclass` from the standard library.

Although the configuration can be set using the `__pydantic_config__` attribute, it does not play well with type checkers,
especially with `TypedDict`.

!!! example "Usage"

    ```py
    from typing_extensions import TypedDict

    from pydantic import ConfigDict, TypeAdapter, with_config

    @with_config(ConfigDict(str_to_lower=True))
    class Model(TypedDict):
        x: str

    ta = TypeAdapter(Model)

    print(ta.validate_python({'x': 'ABC'}))
    #> {'x': 'abc'}
    ```

---
## inner
```python
from config import inner
```



---
## version_short
```python
from version import version_short
```

Return the `major.minor` part of Pydantic version.

It returns '2.1' if Pydantic version is '2.1.1'.

---
## version_info
```python
from version import version_info
```



---
## parse_mypy_version
```python
from version import parse_mypy_version
```

Parse mypy string version to tuple of ints.

It parses normal version like `0.930` and extra info followed by a `+` sign
like `0.940+dev.04cac4b5d911c4f9529e6ce86a27b44f28846f5d.dirty`.

Args:
    version: The mypy version string.

Returns:
    A tuple of ints. e.g. (0, 930).

---
## _FromFieldInfoInputs
```python
from fields import _FromFieldInfoInputs
```

This class exists solely to add type checking for the `**kwargs` in `FieldInfo.from_field`.

---
## _FieldInfoInputs
```python
from fields import _FieldInfoInputs
```

This class exists solely to add type checking for the `**kwargs` in `FieldInfo.__init__`.

---
## FieldInfo
```python
from fields import FieldInfo
```

Captures extra information about a field.

---
## _EmptyKwargs
```python
from fields import _EmptyKwargs
```

This class exists solely to ensure that type checking warns about passing `**extra` in `Field`.

---
## Field
```python
from fields import Field
```

Used to provide extra information about a field, either for the model schema or complex validation. Some arguments
apply only to number fields (``int``, ``float``, ``Decimal``) and some apply only to ``str``.

:param default: since this is replacing the field’s default, its first argument is used
  to set the default, use ellipsis (``...``) to indicate the field is required
:param default_factory: callable that will be called when a default value is needed for this field
  If both `default` and `default_factory` are set, an error is raised.
:param alias: the public name of the field
:param title: can be any string, used in the schema
:param description: can be any string, used in the schema
:param exclude: exclude this field while dumping.
  Takes same values as the ``include`` and ``exclude`` arguments on the ``.dict`` method.
:param include: include this field while dumping.
  Takes same values as the ``include`` and ``exclude`` arguments on the ``.dict`` method.
:param const: this field is required and *must* take it's default value
:param gt: only applies to numbers, requires the field to be "greater than". The schema
  will have an ``exclusiveMinimum`` validation keyword
:param ge: only applies to numbers, requires the field to be "greater than or equal to". The
  schema will have a ``minimum`` validation keyword
:param lt: only applies to numbers, requires the field to be "less than". The schema
  will have an ``exclusiveMaximum`` validation keyword
:param le: only applies to numbers, requires the field to be "less than or equal to". The
  schema will have a ``maximum`` validation keyword
:param multiple_of: only applies to numbers, requires the field to be "a multiple of". The
  schema will have a ``multipleOf`` validation keyword
:param allow_inf_nan: only applies to numbers, allows the field to be NaN or infinity (+inf or -inf),
    which is a valid Python float. Default True, set to False for compatibility with JSON.
:param max_digits: only applies to Decimals, requires the field to have a maximum number
  of digits within the decimal. It does not include a zero before the decimal point or trailing decimal zeroes.
:param decimal_places: only applies to Decimals, requires the field to have at most a number of decimal places
  allowed. It does not include trailing decimal zeroes.
:param min_items: only applies to lists, requires the field to have a minimum number of
  elements. The schema will have a ``minItems`` validation keyword
:param max_items: only applies to lists, requires the field to have a maximum number of
  elements. The schema will have a ``maxItems`` validation keyword
:param unique_items: only applies to lists, requires the field not to have duplicated
  elements. The schema will have a ``uniqueItems`` validation keyword
:param min_length: only applies to strings, requires the field to have a minimum length. The
  schema will have a ``minLength`` validation keyword
:param max_length: only applies to strings, requires the field to have a maximum length. The
  schema will have a ``maxLength`` validation keyword
:param allow_mutation: a boolean which defaults to True. When False, the field raises a TypeError if the field is
  assigned on an instance.  The BaseModel Config must set validate_assignment to True
:param regex: only applies to strings, requires the field match against a regular expression
  pattern string. The schema will have a ``pattern`` validation keyword
:param discriminator: only useful with a (discriminated a.k.a. tagged) `Union` of sub models with a common field.
  The `discriminator` is the name of this common field to shorten validation and improve generated schema
:param repr: show this field in the representation
:param **extra: any additional keyword arguments will be added as is to the schema

---
## ModelPrivateAttr
```python
from fields import ModelPrivateAttr
```



---
## PrivateAttr
```python
from fields import PrivateAttr
```

Indicates that attribute is only used internally and never mixed with regular fields.

Types or values of private attrs are not checked by pydantic and it's up to you to keep them relevant.

Private attrs are stored in model __slots__.

:param default: the attribute’s default value
:param default_factory: callable that will be called when a default value is needed for this attribute
  If both `default` and `default_factory` are set, an error is raised.

---
## ComputedFieldInfo
```python
from fields import ComputedFieldInfo
```

A container for data from `@computed_field` so that we can access it while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@computed_field'.
    wrapped_property: The wrapped computed field property.
    return_type: The type of the computed field property's return value.
    alias: The alias of the property to be used during serialization.
    alias_priority: The priority of the alias. This affects whether an alias generator is used.
    title: Title of the computed field to include in the serialization JSON schema.
    field_title_generator: A callable that takes a field name and returns title for it.
    description: Description of the computed field to include in the serialization JSON schema.
    deprecated: A deprecation message, an instance of `warnings.deprecated` or the `typing_extensions.deprecated` backport,
        or a boolean. If `True`, a default deprecation message will be emitted when accessing the field.
    examples: Example values of the computed field to include in the serialization JSON schema.
    json_schema_extra: A dict or callable to provide extra JSON schema properties.
    repr: A boolean indicating whether to include the field in the __repr__ output.

---
## _wrapped_property_is_private
```python
from fields import _wrapped_property_is_private
```

Returns true if provided property is private, False otherwise.

---
## computed_field
```python
from fields import computed_field
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/fields#the-computed_field-decorator

Decorator to include `property` and `cached_property` when serializing models or dataclasses.

This is useful for fields that are computed from other fields, or for fields that are expensive to compute and should be cached.

```py
from pydantic import BaseModel, computed_field

class Rectangle(BaseModel):
    width: int
    length: int

    @computed_field
    @property
    def area(self) -> int:
        return self.width * self.length

print(Rectangle(width=3, length=2).model_dump())
#> {'width': 3, 'length': 2, 'area': 6}
```

If applied to functions not yet decorated with `@property` or `@cached_property`, the function is
automatically wrapped with `property`. Although this is more concise, you will lose IntelliSense in your IDE,
and confuse static type checkers, thus explicit use of `@property` is recommended.

!!! warning "Mypy Warning"
    Even with the `@property` or `@cached_property` applied to your function before `@computed_field`,
    mypy may throw a `Decorated property not supported` error.
    See [mypy issue #1362](https://github.com/python/mypy/issues/1362), for more information.
    To avoid this error message, add `# type: ignore[misc]` to the `@computed_field` line.

    [pyright](https://github.com/microsoft/pyright) supports `@computed_field` without error.

```py
import random

from pydantic import BaseModel, computed_field

class Square(BaseModel):
    width: float

    @computed_field
    def area(self) -> float:  # converted to a `property` by `computed_field`
        return round(self.width**2, 2)

    @area.setter
    def area(self, new_area: float) -> None:
        self.width = new_area**0.5

    @computed_field(alias='the magic number', repr=False)
    def random_number(self) -> int:
        return random.randint(0, 1_000)

square = Square(width=1.3)

# `random_number` does not appear in representation
print(repr(square))
#> Square(width=1.3, area=1.69)

print(square.random_number)
#> 3

square.area = 4

print(square.model_dump_json(by_alias=True))
#> {"width":2.0,"area":4.0,"the magic number":3}
```

!!! warning "Overriding with `computed_field`"
    You can't override a field from a parent class with a `computed_field` in the child class.
    `mypy` complains about this behavior if allowed, and `dataclasses` doesn't allow this pattern either.
    See the example below:

```py
from pydantic import BaseModel, computed_field

class Parent(BaseModel):
    a: str

try:

    class Child(Parent):
        @computed_field
        @property
        def a(self) -> str:
            return 'new a'

except ValueError as e:
    print(repr(e))
    #> ValueError("you can't override a field with a computed field")
```

Private properties decorated with `@computed_field` have `repr=False` by default.

```py
from functools import cached_property

from pydantic import BaseModel, computed_field

class Model(BaseModel):
    foo: int

    @computed_field
    @cached_property
    def _private_cached_property(self) -> int:
        return -self.foo

    @computed_field
    @property
    def _private_property(self) -> int:
        return -self.foo

m = Model(foo=1)
print(repr(m))
#> M(foo=1)
```

Args:
    func: the function to wrap.
    alias: alias to use when serializing this computed field, only used when `by_alias=True`
    alias_priority: priority of the alias. This affects whether an alias generator is used
    title: Title to use when including this computed field in JSON Schema
    field_title_generator: A callable that takes a field name and returns title for it.
    description: Description to use when including this computed field in JSON Schema, defaults to the function's
        docstring
    deprecated: A deprecation message (or an instance of `warnings.deprecated` or the `typing_extensions.deprecated` backport).
        to be emitted when accessing the field. Or a boolean. This will automatically be set if the property is decorated with the
        `deprecated` decorator.
    examples: Example values to use when including this computed field in JSON Schema
    json_schema_extra: A dict or callable to provide extra JSON schema properties.
    repr: whether to include this computed field in model repr.
        Default is `False` for private properties and `True` for public properties.
    return_type: optional return for serialization logic to expect when serializing to JSON, if included
        this must be correct, otherwise a `TypeError` is raised.
        If you don't include a return type Any is used, which does runtime introspection to handle arbitrary
        objects.

Returns:
    A proxy wrapper for the property.

---
## from_field
```python
from fields import from_field
```

Create a new `FieldInfo` object with the `Field` function.

Args:
    default: The default value for the field. Defaults to Undefined.
    **kwargs: Additional arguments dictionary.

Raises:
    TypeError: If 'annotation' is passed as a keyword argument.

Returns:
    A new FieldInfo object with the given parameters.

Example:
    This is how you can create a field with default value like this:

    ```python
    import pydantic

    class MyModel(pydantic.BaseModel):
        foo: int = pydantic.Field(4)
    ```

---
## from_annotation
```python
from fields import from_annotation
```

Creates a `FieldInfo` instance from a bare annotation.

This function is used internally to create a `FieldInfo` from a bare annotation like this:

```python
import pydantic

class MyModel(pydantic.BaseModel):
    foo: int  # <-- like this
```

We also account for the case where the annotation can be an instance of `Annotated` and where
one of the (not first) arguments in `Annotated` is an instance of `FieldInfo`, e.g.:

```python
import annotated_types
from typing_extensions import Annotated

import pydantic

class MyModel(pydantic.BaseModel):
    foo: Annotated[int, annotated_types.Gt(42)]
    bar: Annotated[int, pydantic.Field(gt=42)]
```

Args:
    annotation: An annotation object.

Returns:
    An instance of the field metadata.

---
## from_annotated_attribute
```python
from fields import from_annotated_attribute
```

Create `FieldInfo` from an annotation with a default value.

This is used in cases like the following:

```python
import annotated_types
from typing_extensions import Annotated

import pydantic

class MyModel(pydantic.BaseModel):
    foo: int = 4  # <-- like this
    bar: Annotated[int, annotated_types.Gt(4)] = 4  # <-- or this
    spam: Annotated[int, pydantic.Field(gt=4)] = 4  # <-- or this
```

Args:
    annotation: The type annotation of the field.
    default: The default value of the field.

Returns:
    A field object with the passed values.

---
## merge_field_infos
```python
from fields import merge_field_infos
```

Merge `FieldInfo` instances keeping only explicitly set attributes.

Later `FieldInfo` instances override earlier ones.

Returns:
    FieldInfo: A merged FieldInfo instance.

---
## _from_dataclass_field
```python
from fields import _from_dataclass_field
```

Return a new `FieldInfo` instance from a `dataclasses.Field` instance.

Args:
    dc_field: The `dataclasses.Field` instance to convert.

Returns:
    The corresponding `FieldInfo` instance.

Raises:
    TypeError: If any of the `FieldInfo` kwargs does not match the `dataclass.Field` kwargs.

---
## _extract_metadata
```python
from fields import _extract_metadata
```

Tries to extract metadata/constraints from an annotation if it uses `Annotated`.

Args:
    annotation: The type hint annotation for which metadata has to be extracted.

Returns:
    A tuple containing the extracted metadata type and the list of extra arguments.

---
## _collect_metadata
```python
from fields import _collect_metadata
```

Collect annotations from kwargs.

Args:
    kwargs: Keyword arguments passed to the function.

Returns:
    A list of metadata objects - a combination of `annotated_types.BaseMetadata` and
        `PydanticMetadata`.

---
## deprecation_message
```python
from fields import deprecation_message
```

The deprecation message to be emitted, or `None` if not set.

---
## get_default
```python
from fields import get_default
```



---
## is_required
```python
from fields import is_required
```

Check if the field is required (i.e., does not have a default value or factory).

Returns:
    `True` if the field is required, `False` otherwise.

---
## rebuild_annotation
```python
from fields import rebuild_annotation
```

Attempts to rebuild the original annotation for use in function signatures.

If metadata is present, it adds it to the original annotation using
`Annotated`. Otherwise, it returns the original annotation as-is.

Note that because the metadata has been flattened, the original annotation
may not be reconstructed exactly as originally provided, e.g. if the original
type had unrecognized annotations, or was annotated with a call to `pydantic.Field`.

Returns:
    The rebuilt annotation.

---
## apply_typevars_map
```python
from fields import apply_typevars_map
```

Apply a `typevars_map` to the annotation.

This method is used when analyzing parametrized generic types to replace typevars with their concrete types.

This method applies the `typevars_map` to the annotation in place.

Args:
    typevars_map: A dictionary mapping type variables to their concrete types.
    types_namespace (dict | None): A dictionary containing related types to the annotated type.

See Also:
    pydantic._internal._generics.replace_types is used for replacing the typevars with
        their concrete types.

---
## __repr_args__
```python
from fields import __repr_args__
```



---
## __set_name__
```python
from fields import __set_name__
```

Preserve `__set_name__` protocol defined in https://peps.python.org/pep-0487.

---
## __eq__
```python
from fields import __eq__
```



---
## dec
```python
from fields import dec
```



---
## __getattr__
```python
from fields import __getattr__
```

This function improves compatibility with custom descriptors by ensuring delegation happens
as expected when the default value of a private attribute is a descriptor.

---
## __name__
```python
from error_wrappers import __name__
```



---
## __name__
```python
from decorator import __name__
```



---
## __name__
```python
from warnings import __name__
```



---
## PydanticDeprecationWarning
```python
from warnings import PydanticDeprecationWarning
```

A Pydantic specific deprecation warning.

This warning is raised when using deprecated functionality in Pydantic. It provides information on when the
deprecation was introduced and the expected version in which the corresponding functionality will be removed.

Attributes:
    message: Description of the warning.
    since: Pydantic version in what the deprecation was introduced.
    expected_removal: Pydantic version in what the corresponding functionality expected to be removed.

---
## PydanticDeprecatedSince20
```python
from warnings import PydanticDeprecatedSince20
```

A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.0.

---
## PydanticDeprecatedSince26
```python
from warnings import PydanticDeprecatedSince26
```

A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.

---
## PydanticDeprecatedSince29
```python
from warnings import PydanticDeprecatedSince29
```

A specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.9.

---
## GenericBeforeBaseModelWarning
```python
from warnings import GenericBeforeBaseModelWarning
```



---
## PydanticExperimentalWarning
```python
from warnings import PydanticExperimentalWarning
```

A Pydantic specific experimental functionality warning.

This warning is raised when using experimental functionality in Pydantic.
It is raised to warn users that the functionality may change or be removed in future versions of Pydantic.

---
## __init__
```python
from warnings import __init__
```



---
## __str__
```python
from warnings import __str__
```



---
## __name__
```python
from tools import __name__
```



---
## __name__
```python
from env_settings import __name__
```



---
## __name__
```python
from mypy import __name__
```



---
## plugin
```python
from mypy import plugin
```

`version` is the mypy version string

We might want to use this to print a warning if the mypy version being used is
newer, or especially older, than we expect (or need).

---
## PydanticPlugin
```python
from mypy import PydanticPlugin
```



---
## PydanticPluginConfig
```python
from mypy import PydanticPluginConfig
```



---
## from_attributes_callback
```python
from mypy import from_attributes_callback
```

Raise an error if from_attributes is not enabled.

---
## PydanticModelField
```python
from mypy import PydanticModelField
```



---
## PydanticModelClassVar
```python
from mypy import PydanticModelClassVar
```

Based on mypy.plugins.dataclasses.DataclassAttribute.

ClassVars are ignored by subclasses.

Attributes:
    name: the ClassVar name

---
## PydanticModelTransformer
```python
from mypy import PydanticModelTransformer
```



---
## ModelConfigData
```python
from mypy import ModelConfigData
```



---
## error_from_attributes
```python
from mypy import error_from_attributes
```

Emits an error when the model does not have `from_attributes=True`.

---
## error_invalid_config_value
```python
from mypy import error_invalid_config_value
```



---
## error_required_dynamic_aliases
```python
from mypy import error_required_dynamic_aliases
```



---
## error_unexpected_behavior
```python
from mypy import error_unexpected_behavior
```



---
## error_untyped_fields
```python
from mypy import error_untyped_fields
```



---
## error_extra_fields_on_root_model
```python
from mypy import error_extra_fields_on_root_model
```

Emits an error when there is more than just a root field defined for a subclass of RootModel.

---
## error_default_and_default_factory_specified
```python
from mypy import error_default_and_default_factory_specified
```



---
## add_method
```python
from mypy import add_method
```

Adds a new method to a class.

This can be dropped if/when https://github.com/python/mypy/issues/7301 is merged

---
## parse_toml
```python
from mypy import parse_toml
```



---
## __init__
```python
from mypy import __init__
```



---
## get_base_class_hook
```python
from mypy import get_base_class_hook
```



---
## get_metaclass_hook
```python
from mypy import get_metaclass_hook
```



---
## get_function_hook
```python
from mypy import get_function_hook
```



---
## get_method_hook
```python
from mypy import get_method_hook
```



---
## get_class_decorator_hook
```python
from mypy import get_class_decorator_hook
```

Mark pydantic.dataclasses as dataclass.

Mypy version 1.1.1 added support for `@dataclass_transform` decorator.

---
## report_config_data
```python
from mypy import report_config_data
```

Return all plugin config data.

Used by mypy to determine if cache needs to be discarded.

---
## _pydantic_model_class_maker_callback
```python
from mypy import _pydantic_model_class_maker_callback
```



---
## _pydantic_model_metaclass_marker_callback
```python
from mypy import _pydantic_model_metaclass_marker_callback
```

Reset dataclass_transform_spec attribute of ModelMetaclass.

Let the plugin handle it. This behavior can be disabled
if 'debug_dataclass_transform' is set to True', for testing purposes.

---
## _pydantic_field_callback
```python
from mypy import _pydantic_field_callback
```

Extract the type of the `default` argument from the Field function, and use it as the return type.

In particular:
* Check whether the default and default_factory argument is specified.
* Output an error if both are specified.
* Retrieve the type of the argument which is specified, and use it as return type for the function.

---
## to_data
```python
from mypy import to_data
```



---
## to_argument
```python
from mypy import to_argument
```



---
## expand_type
```python
from mypy import expand_type
```

Based on mypy.plugins.dataclasses.DataclassAttribute.expand_type.

---
## to_var
```python
from mypy import to_var
```



---
## serialize
```python
from mypy import serialize
```



---
## deserialize
```python
from mypy import deserialize
```



---
## expand_typevar_from_subtype
```python
from mypy import expand_typevar_from_subtype
```

Expands type vars in the context of a subtype when an attribute is inherited
from a generic super type.

---
## transform
```python
from mypy import transform
```

Configures the BaseModel subclass according to the plugin settings.

In particular:
* determines the model config and fields,
* adds a fields-aware signature for the initializer and construct methods
* freezes the class if allow_mutation = False or frozen = True
* stores the fields, config, and if the class is settings in the mypy metadata for access by subclasses

---
## adjust_decorator_signatures
```python
from mypy import adjust_decorator_signatures
```

When we decorate a function `f` with `pydantic.validator(...)`, `pydantic.field_validator`
or `pydantic.serializer(...)`, mypy sees `f` as a regular method taking a `self` instance,
even though pydantic internally wraps `f` with `classmethod` if necessary.

Teach mypy this by marking any function whose outermost decorator is a `validator()`,
`field_validator()` or `serializer()` call as a `classmethod`.

---
## collect_config
```python
from mypy import collect_config
```

Collects the values of the config attributes that are used by the plugin, accounting for parent classes.

---
## collect_fields_and_class_vars
```python
from mypy import collect_fields_and_class_vars
```

Collects the fields for the model, accounting for parent classes.

---
## _get_assignment_statements_from_if_statement
```python
from mypy import _get_assignment_statements_from_if_statement
```



---
## _get_assignment_statements_from_block
```python
from mypy import _get_assignment_statements_from_block
```



---
## collect_field_or_class_var_from_stmt
```python
from mypy import collect_field_or_class_var_from_stmt
```

Get pydantic model field from statement.

Args:
    stmt: The statement.
    model_config: Configuration settings for the model.
    class_vars: ClassVars already known to be defined on the model.

Returns:
    A pydantic model field if it could find the field in statement. Otherwise, `None`.

---
## _infer_dataclass_attr_init_type
```python
from mypy import _infer_dataclass_attr_init_type
```

Infer __init__ argument type for an attribute.

In particular, possibly use the signature of __set__.

---
## add_initializer
```python
from mypy import add_initializer
```

Adds a fields-aware `__init__` method to the class.

The added `__init__` will be annotated with types vs. all `Any` depending on the plugin settings.

---
## add_model_construct_method
```python
from mypy import add_model_construct_method
```

Adds a fully typed `model_construct` classmethod to the class.

Similar to the fields-aware __init__ method, but always uses the field names (not aliases),
and does not treat settings fields as optional.

---
## set_frozen
```python
from mypy import set_frozen
```

Marks all fields as properties so that attempts to set them trigger mypy errors.

This is the same approach used by the attrs and dataclasses plugins.

---
## get_config_update
```python
from mypy import get_config_update
```

Determines the config update due to a single statement in the Config class definition.

Warns if a tracked config attribute is set to a value the plugin doesn't know how to interpret (e.g., an int)

---
## get_has_default
```python
from mypy import get_has_default
```

Returns a boolean indicating whether the field defined in `stmt` is a required field.

---
## get_strict
```python
from mypy import get_strict
```

Returns a the `strict` value of a field if defined, otherwise `None`.

---
## get_alias_info
```python
from mypy import get_alias_info
```

Returns a pair (alias, has_dynamic_alias), extracted from the declaration of the field defined in `stmt`.

`has_dynamic_alias` is True if and only if an alias is provided, but not as a string literal.
If `has_dynamic_alias` is True, `alias` will be None.

---
## is_field_frozen
```python
from mypy import is_field_frozen
```

Returns whether the field is frozen, extracted from the declaration of the field defined in `stmt`.

Note that this is only whether the field was declared to be frozen in a `<field_name> = Field(frozen=True)`
sense; this does not determine whether the field is frozen because the entire model is frozen; that is
handled separately.

---
## get_field_arguments
```python
from mypy import get_field_arguments
```

Helper function used during the construction of the `__init__` and `construct` method signatures.

Returns a list of mypy Argument instances for use in the generated signatures.

---
## should_init_forbid_extra
```python
from mypy import should_init_forbid_extra
```

Indicates whether the generated `__init__` should get a `**kwargs` at the end of its signature

We disallow arbitrary kwargs if the extra config setting is "forbid", or if the plugin config says to,
*unless* a required dynamic alias is present (since then we can't determine a valid signature).

---
## is_dynamic_alias_present
```python
from mypy import is_dynamic_alias_present
```

Returns whether any fields on the model have a "dynamic alias", i.e., an alias that cannot be
determined during static analysis.

---
## get_values_dict
```python
from mypy import get_values_dict
```

Returns a dict of Pydantic model config names to their values.

It includes the config if config value is not `None`.

---
## update
```python
from mypy import update
```



---
## setdefault
```python
from mypy import setdefault
```



---
## Strict
```python
from types import Strict
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/strict_mode/#strict-mode-with-annotated-strict

A field metadata class to indicate that a field should be validated in strict mode.
Use this class as an annotation via [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated), as seen below.

Attributes:
    strict: Whether to validate the field in strict mode.

Example:
    ```python
    from typing_extensions import Annotated

    from pydantic.types import Strict

    StrictBool = Annotated[bool, Strict()]
    ```

---
## conint
```python
from types import conint
```



---
## AllowInfNan
```python
from types import AllowInfNan
```

A field metadata class to indicate that a field should allow `-inf`, `inf`, and `nan`.

Use this class as an annotation via [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated), as seen below.

Attributes:
    allow_inf_nan: Whether to allow `-inf`, `inf`, and `nan`. Defaults to `True`.

Example:
    ```python
    from typing_extensions import Annotated

    from pydantic.types import AllowInfNan

    LaxFloat = Annotated[float, AllowInfNan()]

---
## confloat
```python
from types import confloat
```



---
## conbytes
```python
from types import conbytes
```



---
## StringConstraints
```python
from types import StringConstraints
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/fields/#string-constraints

A field metadata class to apply constraints to `str` types.
Use this class as an annotation via [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated), as seen below.

Attributes:
    strip_whitespace: Whether to remove leading and trailing whitespace.
    to_upper: Whether to convert the string to uppercase.
    to_lower: Whether to convert the string to lowercase.
    strict: Whether to validate the string in strict mode.
    min_length: The minimum length of the string.
    max_length: The maximum length of the string.
    pattern: A regex pattern that the string must match.

Example:
    ```python
    from typing_extensions import Annotated

    from pydantic.types import StringConstraints

    ConstrainedStr = Annotated[str, StringConstraints(min_length=1, max_length=10)]

---
## constr
```python
from types import constr
```



---
## conset
```python
from types import conset
```



---
## confrozenset
```python
from types import confrozenset
```



---
## conlist
```python
from types import conlist
```



---
## condecimal
```python
from types import condecimal
```



---
## UuidVersion
```python
from types import UuidVersion
```

A field metadata class to indicate a [UUID](https://docs.python.org/3/library/uuid.html) version.

Use this class as an annotation via [`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated), as seen below.

Attributes:
    uuid_version: The version of the UUID. Must be one of 1, 3, 4, or 5.

Example:
    ```python
    from typing_extensions import Annotated
    from uuid import UUID

    from pydantic.types import UuidVersion

    UUID1 = Annotated[UUID, UuidVersion(1)]
    ```

---
## PathType
```python
from types import PathType
```



---
## _SecretBase
```python
from types import _SecretBase
```



---
## Secret
```python
from types import Secret
```

A generic base class used for defining a field with sensitive information that you do not want to be visible in logging or tracebacks.

You may either directly parametrize `Secret` with a type, or subclass from `Secret` with a parametrized type. The benefit of subclassing
is that you can define a custom `_display` method, which will be used for `repr()` and `str()` methods. The examples below demonstrate both
ways of using `Secret` to create a new secret type.

1. Directly parametrizing `Secret` with a type:

```py
from pydantic import BaseModel, Secret

SecretBool = Secret[bool]

class Model(BaseModel):
    secret_bool: SecretBool

m = Model(secret_bool=True)
print(m.model_dump())
#> {'secret_bool': Secret('**********')}

print(m.model_dump_json())
#> {"secret_bool":"**********"}

print(m.secret_bool.get_secret_value())
#> True
```

2. Subclassing from parametrized `Secret`:

```py
from datetime import date

from pydantic import BaseModel, Secret

class SecretDate(Secret[date]):
    def _display(self) -> str:
        return '****/**/**'

class Model(BaseModel):
    secret_date: SecretDate

m = Model(secret_date=date(2022, 1, 1))
print(m.model_dump())
#> {'secret_date': SecretDate('****/**/**')}

print(m.model_dump_json())
#> {"secret_date":"****/**/**"}

print(m.secret_date.get_secret_value())
#> 2022-01-01
```

The value returned by the `_display` method will be used for `repr()` and `str()`.

---
## _secret_display
```python
from types import _secret_display
```



---
## _SecretField
```python
from types import _SecretField
```



---
## SecretStr
```python
from types import SecretStr
```



---
## SecretBytes
```python
from types import SecretBytes
```



---
## PaymentCardBrand
```python
from types import PaymentCardBrand
```



---
## PaymentCardNumber
```python
from types import PaymentCardNumber
```

Based on: https://en.wikipedia.org/wiki/Payment_card_number

---
## ByteSize
```python
from types import ByteSize
```



---
## _check_annotated_type
```python
from types import _check_annotated_type
```



---
## condate
```python
from types import condate
```



---
## EncoderProtocol
```python
from types import EncoderProtocol
```

Protocol for encoding and decoding data to and from bytes.

---
## Base64Encoder
```python
from types import Base64Encoder
```

Standard (non-URL-safe) Base64 encoder.

---
## Base64UrlEncoder
```python
from types import Base64UrlEncoder
```

URL-safe Base64 encoder.

---
## EncodedBytes
```python
from types import EncodedBytes
```

A bytes type that is encoded and decoded using the specified encoder.

`EncodedBytes` needs an encoder that implements `EncoderProtocol` to operate.

```py
from typing_extensions import Annotated

from pydantic import BaseModel, EncodedBytes, EncoderProtocol, ValidationError

class MyEncoder(EncoderProtocol):
    @classmethod
    def decode(cls, data: bytes) -> bytes:
        if data == b'**undecodable**':
            raise ValueError('Cannot decode data')
        return data[13:]

    @classmethod
    def encode(cls, value: bytes) -> bytes:
        return b'**encoded**: ' + value

    @classmethod
    def get_json_format(cls) -> str:
        return 'my-encoder'

MyEncodedBytes = Annotated[bytes, EncodedBytes(encoder=MyEncoder)]

class Model(BaseModel):
    my_encoded_bytes: MyEncodedBytes

# Initialize the model with encoded data
m = Model(my_encoded_bytes=b'**encoded**: some bytes')

# Access decoded value
print(m.my_encoded_bytes)
#> b'some bytes'

# Serialize into the encoded form
print(m.model_dump())
#> {'my_encoded_bytes': b'**encoded**: some bytes'}

# Validate encoded data
try:
    Model(my_encoded_bytes=b'**undecodable**')
except ValidationError as e:
    print(e)
    '''
    1 validation error for Model
    my_encoded_bytes
      Value error, Cannot decode data [type=value_error, input_value=b'**undecodable**', input_type=bytes]
    '''
```

---
## EncodedStr
```python
from types import EncodedStr
```

A str type that is encoded and decoded using the specified encoder.

`EncodedStr` needs an encoder that implements `EncoderProtocol` to operate.

```py
from typing_extensions import Annotated

from pydantic import BaseModel, EncodedStr, EncoderProtocol, ValidationError

class MyEncoder(EncoderProtocol):
    @classmethod
    def decode(cls, data: bytes) -> bytes:
        if data == b'**undecodable**':
            raise ValueError('Cannot decode data')
        return data[13:]

    @classmethod
    def encode(cls, value: bytes) -> bytes:
        return b'**encoded**: ' + value

    @classmethod
    def get_json_format(cls) -> str:
        return 'my-encoder'

MyEncodedStr = Annotated[str, EncodedStr(encoder=MyEncoder)]

class Model(BaseModel):
    my_encoded_str: MyEncodedStr

# Initialize the model with encoded data
m = Model(my_encoded_str='**encoded**: some str')

# Access decoded value
print(m.my_encoded_str)
#> some str

# Serialize into the encoded form
print(m.model_dump())
#> {'my_encoded_str': '**encoded**: some str'}

# Validate encoded data
try:
    Model(my_encoded_str='**undecodable**')
except ValidationError as e:
    print(e)
    '''
    1 validation error for Model
    my_encoded_str
      Value error, Cannot decode data [type=value_error, input_value='**undecodable**', input_type=str]
    '''
```

---
## GetPydanticSchema
```python
from types import GetPydanticSchema
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/types/#using-getpydanticschema-to-reduce-boilerplate

A convenience class for creating an annotation that provides pydantic custom type hooks.

This class is intended to eliminate the need to create a custom "marker" which defines the
 `__get_pydantic_core_schema__` and `__get_pydantic_json_schema__` custom hook methods.

For example, to have a field treated by type checkers as `int`, but by pydantic as `Any`, you can do:
```python
from typing import Any

from typing_extensions import Annotated

from pydantic import BaseModel, GetPydanticSchema

HandleAsAny = GetPydanticSchema(lambda _s, h: h(Any))

class Model(BaseModel):
    x: Annotated[int, HandleAsAny]  # pydantic sees `x: Any`

print(repr(Model(x='abc').x))
#> 'abc'
```

---
## Tag
```python
from types import Tag
```

Provides a way to specify the expected tag to use for a case of a (callable) discriminated union.

Also provides a way to label a union case in error messages.

When using a callable `Discriminator`, attach a `Tag` to each case in the `Union` to specify the tag that
should be used to identify that case. For example, in the below example, the `Tag` is used to specify that
if `get_discriminator_value` returns `'apple'`, the input should be validated as an `ApplePie`, and if it
returns `'pumpkin'`, the input should be validated as a `PumpkinPie`.

The primary role of the `Tag` here is to map the return value from the callable `Discriminator` function to
the appropriate member of the `Union` in question.

```py
from typing import Any, Union

from typing_extensions import Annotated, Literal

from pydantic import BaseModel, Discriminator, Tag

class Pie(BaseModel):
    time_to_cook: int
    num_ingredients: int

class ApplePie(Pie):
    fruit: Literal['apple'] = 'apple'

class PumpkinPie(Pie):
    filling: Literal['pumpkin'] = 'pumpkin'

def get_discriminator_value(v: Any) -> str:
    if isinstance(v, dict):
        return v.get('fruit', v.get('filling'))
    return getattr(v, 'fruit', getattr(v, 'filling', None))

class ThanksgivingDinner(BaseModel):
    dessert: Annotated[
        Union[
            Annotated[ApplePie, Tag('apple')],
            Annotated[PumpkinPie, Tag('pumpkin')],
        ],
        Discriminator(get_discriminator_value),
    ]

apple_variation = ThanksgivingDinner.model_validate(
    {'dessert': {'fruit': 'apple', 'time_to_cook': 60, 'num_ingredients': 8}}
)
print(repr(apple_variation))
'''
ThanksgivingDinner(dessert=ApplePie(time_to_cook=60, num_ingredients=8, fruit='apple'))
'''

pumpkin_variation = ThanksgivingDinner.model_validate(
    {
        'dessert': {
            'filling': 'pumpkin',
            'time_to_cook': 40,
            'num_ingredients': 6,
        }
    }
)
print(repr(pumpkin_variation))
'''
ThanksgivingDinner(dessert=PumpkinPie(time_to_cook=40, num_ingredients=6, filling='pumpkin'))
'''
```

!!! note
    You must specify a `Tag` for every case in a `Tag` that is associated with a
    callable `Discriminator`. Failing to do so will result in a `PydanticUserError` with code
    [`callable-discriminator-no-tag`](../errors/usage_errors.md#callable-discriminator-no-tag).

See the [Discriminated Unions] concepts docs for more details on how to use `Tag`s.

[Discriminated Unions]: ../concepts/unions.md#discriminated-unions

---
## Discriminator
```python
from types import Discriminator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/unions/#discriminated-unions-with-callable-discriminator

Provides a way to use a custom callable as the way to extract the value of a union discriminator.

This allows you to get validation behavior like you'd get from `Field(discriminator=<field_name>)`,
but without needing to have a single shared field across all the union choices. This also makes it
possible to handle unions of models and primitive types with discriminated-union-style validation errors.
Finally, this allows you to use a custom callable as the way to identify which member of a union a value
belongs to, while still seeing all the performance benefits of a discriminated union.

Consider this example, which is much more performant with the use of `Discriminator` and thus a `TaggedUnion`
than it would be as a normal `Union`.

```py
from typing import Any, Union

from typing_extensions import Annotated, Literal

from pydantic import BaseModel, Discriminator, Tag

class Pie(BaseModel):
    time_to_cook: int
    num_ingredients: int

class ApplePie(Pie):
    fruit: Literal['apple'] = 'apple'

class PumpkinPie(Pie):
    filling: Literal['pumpkin'] = 'pumpkin'

def get_discriminator_value(v: Any) -> str:
    if isinstance(v, dict):
        return v.get('fruit', v.get('filling'))
    return getattr(v, 'fruit', getattr(v, 'filling', None))

class ThanksgivingDinner(BaseModel):
    dessert: Annotated[
        Union[
            Annotated[ApplePie, Tag('apple')],
            Annotated[PumpkinPie, Tag('pumpkin')],
        ],
        Discriminator(get_discriminator_value),
    ]

apple_variation = ThanksgivingDinner.model_validate(
    {'dessert': {'fruit': 'apple', 'time_to_cook': 60, 'num_ingredients': 8}}
)
print(repr(apple_variation))
'''
ThanksgivingDinner(dessert=ApplePie(time_to_cook=60, num_ingredients=8, fruit='apple'))
'''

pumpkin_variation = ThanksgivingDinner.model_validate(
    {
        'dessert': {
            'filling': 'pumpkin',
            'time_to_cook': 40,
            'num_ingredients': 6,
        }
    }
)
print(repr(pumpkin_variation))
'''
ThanksgivingDinner(dessert=PumpkinPie(time_to_cook=40, num_ingredients=6, filling='pumpkin'))
'''
```

See the [Discriminated Unions] concepts docs for more details on how to use `Discriminator`s.

[Discriminated Unions]: ../concepts/unions.md#discriminated-unions

---
## _get_type_name
```python
from types import _get_type_name
```



---
## _AllowAnyJson
```python
from types import _AllowAnyJson
```



---
## _OnErrorOmit
```python
from types import _OnErrorOmit
```



---
## FailFast
```python
from types import FailFast
```

A `FailFast` annotation can be used to specify that validation should stop at the first error.

This can be useful when you want to validate a large amount of data and you only need to know if it's valid or not.

You might want to enable this setting if you want to validate your data faster (basically, if you use this,
validation will be more performant with the caveat that you get less information).

```py
from typing import List
from typing_extensions import Annotated
from pydantic import BaseModel, FailFast, ValidationError

class Model(BaseModel):
    x: Annotated[List[int], FailFast()]

# This will raise a single error for the first invalid value and stop validation
try:
    obj = Model(x=[1, 2, 'a', 4, 5, 'b', 7, 8, 9, 'c'])
except ValidationError as e:
    print(e)
    '''
    1 validation error for Model
    x.2
      Input should be a valid integer, unable to parse string as an integer [type=int_parsing, input_value='a', input_type=str]
    '''
```

---
## __iter__
```python
from types import __iter__
```



---
## ImportString
```python
from types import ImportString
```

A type that can be used to import a type from a string.

`ImportString` expects a string and loads the Python object importable at that dotted path.
Attributes of modules may be separated from the module by `:` or `.`, e.g. if `'math:cos'` was provided,
the resulting field value would be the function`cos`. If a `.` is used and both an attribute and submodule
are present at the same path, the module will be preferred.

On model instantiation, pointers will be evaluated and imported. There is
some nuance to this behavior, demonstrated in the examples below.

**Good behavior:**
```py
import math

from pydantic import BaseModel, Field, ImportString, ValidationError

class ImportThings(BaseModel):
    obj: ImportString

# A string value will cause an automatic import
my_cos = ImportThings(obj='math.cos')

# You can use the imported function as you would expect
cos_of_0 = my_cos.obj(0)
assert cos_of_0 == 1

# A string whose value cannot be imported will raise an error
try:
    ImportThings(obj='foo.bar')
except ValidationError as e:
    print(e)
    '''
    1 validation error for ImportThings
    obj
      Invalid python path: No module named 'foo.bar' [type=import_error, input_value='foo.bar', input_type=str]
    '''

# Actual python objects can be assigned as well
my_cos = ImportThings(obj=math.cos)
my_cos_2 = ImportThings(obj='math.cos')
my_cos_3 = ImportThings(obj='math:cos')
assert my_cos == my_cos_2 == my_cos_3

# You can set default field value either as Python object:
class ImportThingsDefaultPyObj(BaseModel):
    obj: ImportString = math.cos

# or as a string value (but only if used with `validate_default=True`)
class ImportThingsDefaultString(BaseModel):
    obj: ImportString = Field(default='math.cos', validate_default=True)

my_cos_default1 = ImportThingsDefaultPyObj()
my_cos_default2 = ImportThingsDefaultString()
assert my_cos_default1.obj == my_cos_default2.obj == math.cos

# note: this will not work!
class ImportThingsMissingValidateDefault(BaseModel):
    obj: ImportString = 'math.cos'

my_cos_default3 = ImportThingsMissingValidateDefault()
assert my_cos_default3.obj == 'math.cos'  # just string, not evaluated
```

Serializing an `ImportString` type to json is also possible.

```py lint="skip"
from pydantic import BaseModel, ImportString

class ImportThings(BaseModel):
    obj: ImportString

# Create an instance
m = ImportThings(obj='math.cos')
print(m)
#> obj=<built-in function cos>
print(m.model_dump_json())
#> {"obj":"math.cos"}
```

---
## __get_pydantic_json_schema__
```python
from types import __get_pydantic_json_schema__
```



---
## __get_pydantic_core_schema__
```python
from types import __get_pydantic_core_schema__
```



---
## validate_file
```python
from types import validate_file
```



---
## validate_directory
```python
from types import validate_directory
```



---
## validate_new
```python
from types import validate_new
```



---
## Json
```python
from types import Json
```



---
## get_secret_value
```python
from types import get_secret_value
```



---
## __str__
```python
from types import __str__
```



---
## _display
```python
from types import _display
```



---
## __len__
```python
from types import __len__
```



---
## validate
```python
from types import validate
```



---
## masked
```python
from types import masked
```



---
## validate_digits
```python
from types import validate_digits
```



---
## validate_luhn_check_digit
```python
from types import validate_luhn_check_digit
```

Based on: https://en.wikipedia.org/wiki/Luhn_algorithm

---
## validate_brand
```python
from types import validate_brand
```

Validate length based on BIN for major brands:
https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN).

---
## _validate
```python
from types import _validate
```



---
## human_readable
```python
from types import human_readable
```



---
## to
```python
from types import to
```



---
## PastDate
```python
from types import PastDate
```



---
## FutureDate
```python
from types import FutureDate
```



---
## AwareDatetime
```python
from types import AwareDatetime
```

A datetime that requires timezone info.

---
## NaiveDatetime
```python
from types import NaiveDatetime
```

A datetime that doesn't require timezone info.

---
## PastDatetime
```python
from types import PastDatetime
```

A datetime that must be in the past.

---
## FutureDatetime
```python
from types import FutureDatetime
```

A datetime that must be in the future.

---
## decode
```python
from types import decode
```

Decode the data using the specified encoder.

Args:
    data: The data to decode.

Returns:
    The decoded data.

---
## encode
```python
from types import encode
```

Encode the data using the specified encoder.

Args:
    value: The data to encode.

Returns:
    The encoded data.

---
## get_json_format
```python
from types import get_json_format
```

Get the JSON format for the encoded data.

Returns:
    The JSON format for the encoded data.

---
## decode_str
```python
from types import decode_str
```

Decode the data using the specified encoder.

Args:
    data: The data to decode.

Returns:
    The decoded data.

---
## encode_str
```python
from types import encode_str
```

Encode the data using the specified encoder.

Args:
    value: The data to encode.

Returns:
    The encoded data.

---
## _convert_schema
```python
from types import _convert_schema
```



---
## __class_getitem__
```python
from types import __class_getitem__
```



---
## _serialize
```python
from types import _serialize
```



---
## validate_secret_value
```python
from types import validate_secret_value
```



---
## get_json_schema
```python
from types import get_json_schema
```



---
## get_secret_schema
```python
from types import get_secret_schema
```



---
## __getattr__
```python
from types import __getattr__
```

Use this rather than defining `__get_pydantic_core_schema__` etc. to reduce the number of nested calls.

---
## __name__
```python
from class_validators import __name__
```

Old `@validator` and `@root_validator` function validators from V1.

---
## __name__
```python
from aliases import __name__
```

Support for alias configurations.

---
## AliasPath
```python
from aliases import AliasPath
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/alias#aliaspath-and-aliaschoices

A data class used by `validation_alias` as a convenience to create aliases.

Attributes:
    path: A list of string or integer aliases.

---
## AliasChoices
```python
from aliases import AliasChoices
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/alias#aliaspath-and-aliaschoices

A data class used by `validation_alias` as a convenience to create aliases.

Attributes:
    choices: A list containing a string or `AliasPath`.

---
## AliasGenerator
```python
from aliases import AliasGenerator
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/alias#using-an-aliasgenerator

A data class used by `alias_generator` as a convenience to create various aliases.

Attributes:
    alias: A callable that takes a field name and returns an alias for it.
    validation_alias: A callable that takes a field name and returns a validation alias for it.
    serialization_alias: A callable that takes a field name and returns a serialization alias for it.

---
## __init__
```python
from aliases import __init__
```



---
## convert_to_aliases
```python
from aliases import convert_to_aliases
```

Converts arguments to a list of lists containing string or integer aliases.

Returns:
    The list of aliases.

---
## search_dict_for_path
```python
from aliases import search_dict_for_path
```

Searches a dictionary for the path specified by the alias.

Returns:
    The value at the specified path, or `PydanticUndefined` if the path is not found.

---
## _generate_alias
```python
from aliases import _generate_alias
```

Generate an alias of the specified kind. Returns None if the alias generator is None.

Raises:
    TypeError: If the alias generator produces an invalid type.

---
## generate_aliases
```python
from aliases import generate_aliases
```

Generate `alias`, `validation_alias`, and `serialization_alias` for a field.

Returns:
    A tuple of three aliases - validation, alias, and serialization.

---
## __name__
```python
from json_schema import __name__
```

Usage docs: https://docs.pydantic.dev/2.5/concepts/json_schema/

The `json_schema` module contains classes and functions to allow the way [JSON Schema](https://json-schema.org/)
is generated to be customized.

In general you shouldn't need to use this module directly; instead, you can use
[`BaseModel.model_json_schema`][pydantic.BaseModel.model_json_schema] and
[`TypeAdapter.json_schema`][pydantic.TypeAdapter.json_schema].

---
## update_json_schema
```python
from json_schema import update_json_schema
```

Update a JSON schema in-place by providing a dictionary of updates.

This function sets the provided key-value pairs in the schema and returns the updated schema.

Args:
    schema: The JSON schema to update.
    updates: A dictionary of key-value pairs to set in the schema.

Returns:
    The updated JSON schema.

---
## PydanticJsonSchemaWarning
```python
from json_schema import PydanticJsonSchemaWarning
```

This class is used to emit warnings produced during JSON schema generation.
See the [`GenerateJsonSchema.emit_warning`][pydantic.json_schema.GenerateJsonSchema.emit_warning] and
[`GenerateJsonSchema.render_warning_message`][pydantic.json_schema.GenerateJsonSchema.render_warning_message]
methods for more details; these can be overridden to control warning behavior.

---
## _DefinitionsRemapping
```python
from json_schema import _DefinitionsRemapping
```



---
## GenerateJsonSchema
```python
from json_schema import GenerateJsonSchema
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json_schema/#customizing-the-json-schema-generation-process

A class for generating JSON schemas.

This class generates JSON schemas based on configured parameters. The default schema dialect
is [https://json-schema.org/draft/2020-12/schema](https://json-schema.org/draft/2020-12/schema).
The class uses `by_alias` to configure how fields with
multiple names are handled and `ref_template` to format reference names.

Attributes:
    schema_dialect: The JSON schema dialect used to generate the schema. See
        [Declaring a Dialect](https://json-schema.org/understanding-json-schema/reference/schema.html#id4)
        in the JSON Schema documentation for more information about dialects.
    ignored_warning_kinds: Warnings to ignore when generating the schema. `self.render_warning_message` will
        do nothing if its argument `kind` is in `ignored_warning_kinds`;
        this value can be modified on subclasses to easily control which warnings are emitted.
    by_alias: Whether to use field aliases when generating the schema.
    ref_template: The format string used when generating reference names.
    core_to_json_refs: A mapping of core refs to JSON refs.
    core_to_defs_refs: A mapping of core refs to definition refs.
    defs_to_core_refs: A mapping of definition refs to core refs.
    json_to_defs_refs: A mapping of JSON refs to definition refs.
    definitions: Definitions in the schema.

Args:
    by_alias: Whether to use field aliases in the generated schemas.
    ref_template: The format string to use when generating reference names.

Raises:
    JsonSchemaError: If the instance of the class is inadvertently re-used after generating a schema.

---
## model_json_schema
```python
from json_schema import model_json_schema
```

Utility function to generate a JSON Schema for a model.

Args:
    cls: The model class to generate a JSON Schema for.
    by_alias: If `True` (the default), fields will be serialized according to their alias.
        If `False`, fields will be serialized according to their attribute name.
    ref_template: The template to use for generating JSON Schema references.
    schema_generator: The class to use for generating the JSON Schema.
    mode: The mode to use for generating the JSON Schema. It can be one of the following:

        - 'validation': Generate a JSON Schema for validating data.
        - 'serialization': Generate a JSON Schema for serializing data.

Returns:
    The generated JSON Schema.

---
## models_json_schema
```python
from json_schema import models_json_schema
```

Utility function to generate a JSON Schema for multiple models.

Args:
    models: A sequence of tuples of the form (model, mode).
    by_alias: Whether field aliases should be used as keys in the generated JSON Schema.
    title: The title of the generated JSON Schema.
    description: The description of the generated JSON Schema.
    ref_template: The reference template to use for generating JSON Schema references.
    schema_generator: The schema generator to use for generating the JSON Schema.

Returns:
    A tuple where:
        - The first element is a dictionary whose keys are tuples of JSON schema key type and JSON mode, and
            whose values are the JSON schema corresponding to that pair of inputs. (These schemas may have
            JsonRef references to definitions that are defined in the second returned element.)
        - The second element is a JSON schema containing all definitions referenced in the first returned
                element, along with the optional title and description keys.

---
## _deduplicate_schemas
```python
from json_schema import _deduplicate_schemas
```



---
## _make_json_hashable
```python
from json_schema import _make_json_hashable
```



---
## _sort_json_schema
```python
from json_schema import _sort_json_schema
```



---
## WithJsonSchema
```python
from json_schema import WithJsonSchema
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json_schema/#withjsonschema-annotation

Add this as an annotation on a field to override the (base) JSON schema that would be generated for that field.
This provides a way to set a JSON schema for types that would otherwise raise errors when producing a JSON schema,
such as Callable, or types that have an is-instance core schema, without needing to go so far as creating a
custom subclass of pydantic.json_schema.GenerateJsonSchema.
Note that any _modifications_ to the schema that would normally be made (such as setting the title for model fields)
will still be performed.

If `mode` is set this will only apply to that schema generation mode, allowing you
to set different json schemas for validation and serialization.

---
## Examples
```python
from json_schema import Examples
```

Add examples to a JSON schema.

If the JSON Schema already contains examples, the provided examples
will be appended.

If `mode` is set this will only apply to that schema generation mode,
allowing you to add different examples for validation and serialization.

---
## _get_all_json_refs
```python
from json_schema import _get_all_json_refs
```

Get all the definitions references from a JSON schema.

---
## _get_typed_dict_config
```python
from json_schema import _get_typed_dict_config
```



---
## from_prioritized_choices
```python
from json_schema import from_prioritized_choices
```

This function should produce a remapping that replaces complex DefsRef with the simpler ones from the
prioritized_choices such that applying the name remapping would result in an equivalent JSON schema.

---
## remap_defs_ref
```python
from json_schema import remap_defs_ref
```



---
## remap_json_ref
```python
from json_schema import remap_json_ref
```



---
## remap_json_schema
```python
from json_schema import remap_json_schema
```

Recursively update the JSON schema replacing all $refs

---
## __init__
```python
from json_schema import __init__
```



---
## _config
```python
from json_schema import _config
```



---
## mode
```python
from json_schema import mode
```



---
## build_schema_type_to_method
```python
from json_schema import build_schema_type_to_method
```

Builds a dictionary mapping fields to methods for generating JSON schemas.

Returns:
    A dictionary containing the mapping of `CoreSchemaOrFieldType` to a handler method.

Raises:
    TypeError: If no method has been defined for generating a JSON schema for a given pydantic core schema type.

---
## generate_definitions
```python
from json_schema import generate_definitions
```

Generates JSON schema definitions from a list of core schemas, pairing the generated definitions with a
mapping that links the input keys to the definition references.

Args:
    inputs: A sequence of tuples, where:

        - The first element is a JSON schema key type.
        - The second element is the JSON mode: either 'validation' or 'serialization'.
        - The third element is a core schema.

Returns:
    A tuple where:

        - The first element is a dictionary whose keys are tuples of JSON schema key type and JSON mode, and
            whose values are the JSON schema corresponding to that pair of inputs. (These schemas may have
            JsonRef references to definitions that are defined in the second returned element.)
        - The second element is a dictionary whose keys are definition references for the JSON schemas
            from the first returned element, and whose values are the actual JSON schema definitions.

Raises:
    PydanticUserError: Raised if the JSON schema generator has already been used to generate a JSON schema.

---
## generate
```python
from json_schema import generate
```

Generates a JSON schema for a specified schema in a specified mode.

Args:
    schema: A Pydantic model.
    mode: The mode in which to generate the schema. Defaults to 'validation'.

Returns:
    A JSON schema representing the specified schema.

Raises:
    PydanticUserError: If the JSON schema generator has already been used to generate a JSON schema.

---
## generate_inner
```python
from json_schema import generate_inner
```

Generates a JSON schema for a given core schema.

Args:
    schema: The given core schema.

Returns:
    The generated JSON schema.

---
## any_schema
```python
from json_schema import any_schema
```

Generates a JSON schema that matches any value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## none_schema
```python
from json_schema import none_schema
```

Generates a JSON schema that matches `None`.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## bool_schema
```python
from json_schema import bool_schema
```

Generates a JSON schema that matches a bool value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## int_schema
```python
from json_schema import int_schema
```

Generates a JSON schema that matches an int value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## float_schema
```python
from json_schema import float_schema
```

Generates a JSON schema that matches a float value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## decimal_schema
```python
from json_schema import decimal_schema
```

Generates a JSON schema that matches a decimal value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## str_schema
```python
from json_schema import str_schema
```

Generates a JSON schema that matches a string value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## bytes_schema
```python
from json_schema import bytes_schema
```

Generates a JSON schema that matches a bytes value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## date_schema
```python
from json_schema import date_schema
```

Generates a JSON schema that matches a date value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## time_schema
```python
from json_schema import time_schema
```

Generates a JSON schema that matches a time value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## datetime_schema
```python
from json_schema import datetime_schema
```

Generates a JSON schema that matches a datetime value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## timedelta_schema
```python
from json_schema import timedelta_schema
```

Generates a JSON schema that matches a timedelta value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## literal_schema
```python
from json_schema import literal_schema
```

Generates a JSON schema that matches a literal value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## enum_schema
```python
from json_schema import enum_schema
```

Generates a JSON schema that matches an Enum value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## is_instance_schema
```python
from json_schema import is_instance_schema
```

Handles JSON schema generation for a core schema that checks if a value is an instance of a class.

Unless overridden in a subclass, this raises an error.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## is_subclass_schema
```python
from json_schema import is_subclass_schema
```

Handles JSON schema generation for a core schema that checks if a value is a subclass of a class.

For backwards compatibility with v1, this does not raise an error, but can be overridden to change this.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## callable_schema
```python
from json_schema import callable_schema
```

Generates a JSON schema that matches a callable value.

Unless overridden in a subclass, this raises an error.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## list_schema
```python
from json_schema import list_schema
```

Returns a schema that matches a list schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## tuple_positional_schema
```python
from json_schema import tuple_positional_schema
```

Replaced by `tuple_schema`.

---
## tuple_variable_schema
```python
from json_schema import tuple_variable_schema
```

Replaced by `tuple_schema`.

---
## tuple_schema
```python
from json_schema import tuple_schema
```

Generates a JSON schema that matches a tuple schema e.g. `Tuple[int,
str, bool]` or `Tuple[int, ...]`.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## set_schema
```python
from json_schema import set_schema
```

Generates a JSON schema that matches a set schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## frozenset_schema
```python
from json_schema import frozenset_schema
```

Generates a JSON schema that matches a frozenset schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## _common_set_schema
```python
from json_schema import _common_set_schema
```



---
## generator_schema
```python
from json_schema import generator_schema
```

Returns a JSON schema that represents the provided GeneratorSchema.

Args:
    schema: The schema.

Returns:
    The generated JSON schema.

---
## dict_schema
```python
from json_schema import dict_schema
```

Generates a JSON schema that matches a dict schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## function_before_schema
```python
from json_schema import function_before_schema
```

Generates a JSON schema that matches a function-before schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## function_after_schema
```python
from json_schema import function_after_schema
```

Generates a JSON schema that matches a function-after schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## function_plain_schema
```python
from json_schema import function_plain_schema
```

Generates a JSON schema that matches a function-plain schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## function_wrap_schema
```python
from json_schema import function_wrap_schema
```

Generates a JSON schema that matches a function-wrap schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## default_schema
```python
from json_schema import default_schema
```

Generates a JSON schema that matches a schema with a default value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## nullable_schema
```python
from json_schema import nullable_schema
```

Generates a JSON schema that matches a schema that allows null values.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## union_schema
```python
from json_schema import union_schema
```

Generates a JSON schema that matches a schema that allows values matching any of the given schemas.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## tagged_union_schema
```python
from json_schema import tagged_union_schema
```

Generates a JSON schema that matches a schema that allows values matching any of the given schemas, where
the schemas are tagged with a discriminator field that indicates which schema should be used to validate
the value.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## _extract_discriminator
```python
from json_schema import _extract_discriminator
```

Extract a compatible OpenAPI discriminator from the schema and one_of choices that end up in the final
schema.

---
## chain_schema
```python
from json_schema import chain_schema
```

Generates a JSON schema that matches a core_schema.ChainSchema.

When generating a schema for validation, we return the validation JSON schema for the first step in the chain.
For serialization, we return the serialization JSON schema for the last step in the chain.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## lax_or_strict_schema
```python
from json_schema import lax_or_strict_schema
```

Generates a JSON schema that matches a schema that allows values matching either the lax schema or the
strict schema.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## json_or_python_schema
```python
from json_schema import json_or_python_schema
```

Generates a JSON schema that matches a schema that allows values matching either the JSON schema or the
Python schema.

The JSON schema is used instead of the Python schema. If you want to use the Python schema, you should override
this method.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## typed_dict_schema
```python
from json_schema import typed_dict_schema
```

Generates a JSON schema that matches a schema that defines a typed dict.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## _name_required_computed_fields
```python
from json_schema import _name_required_computed_fields
```



---
## _named_required_fields_schema
```python
from json_schema import _named_required_fields_schema
```



---
## _get_alias_name
```python
from json_schema import _get_alias_name
```



---
## typed_dict_field_schema
```python
from json_schema import typed_dict_field_schema
```

Generates a JSON schema that matches a schema that defines a typed dict field.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## dataclass_field_schema
```python
from json_schema import dataclass_field_schema
```

Generates a JSON schema that matches a schema that defines a dataclass field.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## model_field_schema
```python
from json_schema import model_field_schema
```

Generates a JSON schema that matches a schema that defines a model field.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## computed_field_schema
```python
from json_schema import computed_field_schema
```

Generates a JSON schema that matches a schema that defines a computed field.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## model_schema
```python
from json_schema import model_schema
```

Generates a JSON schema that matches a schema that defines a model.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## _update_class_schema
```python
from json_schema import _update_class_schema
```



---
## resolve_schema_to_update
```python
from json_schema import resolve_schema_to_update
```

Resolve a JsonSchemaValue to the non-ref schema if it is a $ref schema.

Args:
    json_schema: The schema to resolve.

Returns:
    The resolved schema.

---
## model_fields_schema
```python
from json_schema import model_fields_schema
```

Generates a JSON schema that matches a schema that defines a model's fields.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## field_is_present
```python
from json_schema import field_is_present
```

Whether the field should be included in the generated JSON schema.

Args:
    field: The schema for the field itself.

Returns:
    `True` if the field should be included in the generated JSON schema, `False` otherwise.

---
## field_is_required
```python
from json_schema import field_is_required
```

Whether the field should be marked as required in the generated JSON schema.
(Note that this is irrelevant if the field is not present in the JSON schema.).

Args:
    field: The schema for the field itself.
    total: Only applies to `TypedDictField`s.
        Indicates if the `TypedDict` this field belongs to is total, in which case any fields that don't
        explicitly specify `required=False` are required.

Returns:
    `True` if the field should be marked as required in the generated JSON schema, `False` otherwise.

---
## dataclass_args_schema
```python
from json_schema import dataclass_args_schema
```

Generates a JSON schema that matches a schema that defines a dataclass's constructor arguments.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## dataclass_schema
```python
from json_schema import dataclass_schema
```

Generates a JSON schema that matches a schema that defines a dataclass.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## arguments_schema
```python
from json_schema import arguments_schema
```

Generates a JSON schema that matches a schema that defines a function's arguments.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## kw_arguments_schema
```python
from json_schema import kw_arguments_schema
```

Generates a JSON schema that matches a schema that defines a function's keyword arguments.

Args:
    arguments: The core schema.

Returns:
    The generated JSON schema.

---
## p_arguments_schema
```python
from json_schema import p_arguments_schema
```

Generates a JSON schema that matches a schema that defines a function's positional arguments.

Args:
    arguments: The core schema.

Returns:
    The generated JSON schema.

---
## get_argument_name
```python
from json_schema import get_argument_name
```

Retrieves the name of an argument.

Args:
    argument: The core schema.

Returns:
    The name of the argument.

---
## call_schema
```python
from json_schema import call_schema
```

Generates a JSON schema that matches a schema that defines a function call.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## custom_error_schema
```python
from json_schema import custom_error_schema
```

Generates a JSON schema that matches a schema that defines a custom error.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## json_schema
```python
from json_schema import json_schema
```

Generates a JSON schema that matches a schema that defines a JSON object.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## url_schema
```python
from json_schema import url_schema
```

Generates a JSON schema that matches a schema that defines a URL.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## multi_host_url_schema
```python
from json_schema import multi_host_url_schema
```

Generates a JSON schema that matches a schema that defines a URL that can be used with multiple hosts.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## uuid_schema
```python
from json_schema import uuid_schema
```

Generates a JSON schema that matches a UUID.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## definitions_schema
```python
from json_schema import definitions_schema
```

Generates a JSON schema that matches a schema that defines a JSON object with definitions.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## definition_ref_schema
```python
from json_schema import definition_ref_schema
```

Generates a JSON schema that matches a schema that references a definition.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## ser_schema
```python
from json_schema import ser_schema
```

Generates a JSON schema that matches a schema that defines a serialized object.

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## complex_schema
```python
from json_schema import complex_schema
```

Generates a JSON schema that matches a complex number.

JSON has no standard way to represent complex numbers. Complex number is not a numeric
type. Here we represent complex number as strings following the rule defined by Python.
For instance, '1+2j' is an accepted complex string. Details can be found in
[Python's `complex` documentation][complex].

Args:
    schema: The core schema.

Returns:
    The generated JSON schema.

---
## get_title_from_name
```python
from json_schema import get_title_from_name
```

Retrieves a title from a name.

Args:
    name: The name to retrieve a title from.

Returns:
    The title.

---
## field_title_should_be_set
```python
from json_schema import field_title_should_be_set
```

Returns true if a field with the given schema should have a title set based on the field name.

Intuitively, we want this to return true for schemas that wouldn't otherwise provide their own title
(e.g., int, float, str), and false for those that would (e.g., BaseModel subclasses).

Args:
    schema: The schema to check.

Returns:
    `True` if the field should have a title set, `False` otherwise.

---
## normalize_name
```python
from json_schema import normalize_name
```

Normalizes a name to be used as a key in a dictionary.

Args:
    name: The name to normalize.

Returns:
    The normalized name.

---
## get_defs_ref
```python
from json_schema import get_defs_ref
```

Override this method to change the way that definitions keys are generated from a core reference.

Args:
    core_mode_ref: The core reference.

Returns:
    The definitions key.

---
## get_cache_defs_ref_schema
```python
from json_schema import get_cache_defs_ref_schema
```

This method wraps the get_defs_ref method with some cache-lookup/population logic,
and returns both the produced defs_ref and the JSON schema that will refer to the right definition.

Args:
    core_ref: The core reference to get the definitions reference for.

Returns:
    A tuple of the definitions reference and the JSON schema that will refer to it.

---
## handle_ref_overrides
```python
from json_schema import handle_ref_overrides
```

Remove any sibling keys that are redundant with the referenced schema.

Args:
    json_schema: The schema to remove redundant sibling keys from.

Returns:
    The schema with redundant sibling keys removed.

---
## get_schema_from_definitions
```python
from json_schema import get_schema_from_definitions
```



---
## encode_default
```python
from json_schema import encode_default
```

Encode a default value to a JSON-serializable value.

This is used to encode default values for fields in the generated JSON schema.

Args:
    dft: The default value to encode.

Returns:
    The encoded default value.

---
## update_with_validations
```python
from json_schema import update_with_validations
```

Update the json_schema with the corresponding validations specified in the core_schema,
using the provided mapping to translate keys in core_schema to the appropriate keys for a JSON schema.

Args:
    json_schema: The JSON schema to update.
    core_schema: The core schema to get the validations from.
    mapping: A mapping from core_schema attribute names to the corresponding JSON schema attribute names.

---
## ValidationsMapping
```python
from json_schema import ValidationsMapping
```

This class just contains mappings from core_schema attribute names to the corresponding
JSON schema attribute names. While I suspect it is unlikely to be necessary, you can in
principle override this class in a subclass of GenerateJsonSchema (by inheriting from
GenerateJsonSchema.ValidationsMapping) to change these mappings.

---
## get_flattened_anyof
```python
from json_schema import get_flattened_anyof
```



---
## get_json_ref_counts
```python
from json_schema import get_json_ref_counts
```

Get all values corresponding to the key '$ref' anywhere in the json_schema.

---
## handle_invalid_for_json_schema
```python
from json_schema import handle_invalid_for_json_schema
```



---
## emit_warning
```python
from json_schema import emit_warning
```

This method simply emits PydanticJsonSchemaWarnings based on handling in the `warning_message` method.

---
## render_warning_message
```python
from json_schema import render_warning_message
```

This method is responsible for ignoring warnings as desired, and for formatting the warning messages.

You can override the value of `ignored_warning_kinds` in a subclass of GenerateJsonSchema
to modify what warnings are generated. If you want more control, you can override this method;
just return None in situations where you don't want warnings to be emitted.

Args:
    kind: The kind of warning to render. It can be one of the following:

        - 'skipped-choice': A choice field was skipped because it had no valid choices.
        - 'non-serializable-default': A default value was skipped because it was not JSON-serializable.
    detail: A string with additional details about the warning.

Returns:
    The formatted warning message, or `None` if no warning should be emitted.

---
## _build_definitions_remapping
```python
from json_schema import _build_definitions_remapping
```



---
## _garbage_collect_definitions
```python
from json_schema import _garbage_collect_definitions
```



---
## __get_pydantic_json_schema__
```python
from json_schema import __get_pydantic_json_schema__
```



---
## __hash__
```python
from json_schema import __hash__
```



---
## SkipJsonSchema
```python
from json_schema import SkipJsonSchema
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json_schema/#skipjsonschema-annotation

Add this as an annotation on a field to skip generating a JSON schema for that field.

Example:
    ```py
    from typing import Union

    from pydantic import BaseModel
    from pydantic.json_schema import SkipJsonSchema

    from pprint import pprint


    class Model(BaseModel):
        a: Union[int, None] = None  # (1)!
        b: Union[int, SkipJsonSchema[None]] = None  # (2)!
        c: SkipJsonSchema[Union[int, None]] = None  # (3)!


    pprint(Model.model_json_schema())
    '''
    {
        'properties': {
            'a': {
                'anyOf': [
                    {'type': 'integer'},
                    {'type': 'null'}
                ],
                'default': None,
                'title': 'A'
            },
            'b': {
                'default': None,
                'title': 'B',
                'type': 'integer'
            }
        },
        'title': 'Model',
        'type': 'object'
    }
    '''
    ```

    1. The integer and null types are both included in the schema for `a`.
    2. The integer type is the only type included in the schema for `b`.
    3. The entirety of the `c` field is omitted from the schema.

---
## populate_defs
```python
from json_schema import populate_defs
```



---
## handler_func
```python
from json_schema import handler_func
```

Generate a JSON schema based on the input schema.

Args:
    schema_or_field: The core schema to generate a JSON schema from.

Returns:
    The generated JSON schema.

Raises:
    TypeError: If an unexpected schema type is encountered.

---
## _add_json_refs
```python
from json_schema import _add_json_refs
```



---
## __class_getitem__
```python
from json_schema import __class_getitem__
```



---
## new_handler_func
```python
from json_schema import new_handler_func
```



---
## __name__
```python
from _migration import __name__
```



---
## getattr_migration
```python
from _migration import getattr_migration
```

Implement PEP 562 for objects that were either moved or removed on the migration
to V2.

Args:
    module: The module name.

Returns:
    A callable that will raise an error if the object is not found.

---
## wrapper
```python
from _migration import wrapper
```

Raise an error if the object is not found, or warn if it was moved.

In case it was moved, it still returns the object.

Args:
    name: The object name.

Returns:
    The object.

---
## __name__
```python
from networks import __name__
```



---
## UrlConstraints
```python
from networks import UrlConstraints
```

Url constraints.

Attributes:
    max_length: The maximum length of the url. Defaults to `None`.
    allowed_schemes: The allowed schemes. Defaults to `None`.
    host_required: Whether the host is required. Defaults to `None`.
    default_host: The default host. Defaults to `None`.
    default_port: The default port. Defaults to `None`.
    default_path: The default path. Defaults to `None`.

---
## import_email_validator
```python
from networks import import_email_validator
```



---
## NameEmail
```python
from networks import NameEmail
```



---
## _build_pretty_email_regex
```python
from networks import _build_pretty_email_regex
```



---
## validate_email
```python
from networks import validate_email
```

Email address validation using https://pypi.org/project/email-validator/
Notes:
* raw ip address (literal) domain parts are not allowed.
* "John Doe <local_part@domain.com>" style "pretty" email addresses are processed
* spaces are striped from the beginning and end of addresses but no error is raised

---
## __hash__
```python
from networks import __hash__
```



---
## EmailStr
```python
from networks import EmailStr
```



---
## __init__
```python
from networks import __init__
```



---
## __eq__
```python
from networks import __eq__
```



---
## __get_pydantic_json_schema__
```python
from networks import __get_pydantic_json_schema__
```



---
## __get_pydantic_core_schema__
```python
from networks import __get_pydantic_core_schema__
```



---
## _validate
```python
from networks import _validate
```



---
## __str__
```python
from networks import __str__
```



---
## IPvAnyAddress
```python
from networks import IPvAnyAddress
```



---
## IPvAnyInterface
```python
from networks import IPvAnyInterface
```



---
## IPvAnyNetwork
```python
from networks import IPvAnyNetwork
```



---
## __new__
```python
from networks import __new__
```



---
## __name__
```python
from root_model import __name__
```

RootModel class and type definitions.

---
## RootModel
```python
from root_model import RootModel
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/models/#rootmodel-and-custom-root-types

A Pydantic `BaseModel` for the root object of the model.

Attributes:
    root: The root object of the model.
    __pydantic_root_model__: Whether the model is a RootModel.
    __pydantic_private__: Private fields in the model.
    __pydantic_extra__: Extra fields in the model.

---
## _RootModelMetaclass
```python
from root_model import _RootModelMetaclass
```



---
## __init_subclass__
```python
from root_model import __init_subclass__
```



---
## __init__
```python
from root_model import __init__
```



---
## model_construct
```python
from root_model import model_construct
```

Create a new model using the provided root object and update fields set.

Args:
    root: The root object of the model.
    _fields_set: The set of fields to be updated.

Returns:
    The new model.

Raises:
    NotImplemented: If the model is not a subclass of `RootModel`.

---
## __getstate__
```python
from root_model import __getstate__
```



---
## __setstate__
```python
from root_model import __setstate__
```



---
## __copy__
```python
from root_model import __copy__
```

Returns a shallow copy of the model.

---
## __deepcopy__
```python
from root_model import __deepcopy__
```

Returns a deep copy of the model.

---
## __eq__
```python
from root_model import __eq__
```



---
## __repr_args__
```python
from root_model import __repr_args__
```



---
## model_dump
```python
from root_model import model_dump
```

This method is included just to get a more accurate return type for type checkers.
It is included in this `if TYPE_CHECKING:` block since no override is actually necessary.

See the documentation of `BaseModel.model_dump` for more details about the arguments.

Generally, this method will have a return type of `RootModelRootType`, assuming that `RootModelRootType` is
not a `BaseModel` subclass. If `RootModelRootType` is a `BaseModel` subclass, then the return
type will likely be `dict[str, Any]`, as `model_dump` calls are recursive. The return type could
even be something different, in the case of a custom serializer.
Thus, `Any` is used here to catch all of these cases.

---
## __name__
```python
from type_adapter import __name__
```

Type adapter specification.

---
## _get_schema
```python
from type_adapter import _get_schema
```

`BaseModel` uses its own `__module__` to find out where it was defined
and then looks for symbols to resolve forward references in those globals.
On the other hand this function can be called with arbitrary objects,
including type aliases, where `__module__` (always `typing.py`) is not useful.
So instead we look at the globals in our parent stack frame.

This works for the case where this function is called in a module that
has the target of forward references in its scope, but
does not always work for more complex cases.

For example, take the following:

a.py
```python
from typing import Dict, List

IntList = List[int]
OuterDict = Dict[str, 'IntList']
```

b.py
```python test="skip"
from a import OuterDict

from pydantic import TypeAdapter

IntList = int  # replaces the symbol the forward reference is looking for
v = TypeAdapter(OuterDict)
v({'x': 1})  # should fail but doesn't
```

If `OuterDict` were a `BaseModel`, this would work because it would resolve
the forward reference within the `a.py` namespace.
But `TypeAdapter(OuterDict)` can't determine what module `OuterDict` came from.

In other words, the assumption that _all_ forward references exist in the
module we are being called from is not technically always true.
Although most of the time it is and it works fine for recursive models and such,
`BaseModel`'s behavior isn't perfect either and _can_ break in similar ways,
so there is no right or wrong between the two.

But at the very least this behavior is _subtly_ different from `BaseModel`'s.

---
## _getattr_no_parents
```python
from type_adapter import _getattr_no_parents
```

Returns the attribute value without attempting to look up attributes from parent types.

---
## _type_has_config
```python
from type_adapter import _type_has_config
```

Returns whether the type has config.

---
## _frame_depth
```python
from type_adapter import _frame_depth
```



---
## TypeAdapter
```python
from type_adapter import TypeAdapter
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/type_adapter/

Type adapters provide a flexible way to perform validation and serialization based on a Python type.

A `TypeAdapter` instance exposes some of the functionality from `BaseModel` instance methods
for types that do not have such methods (such as dataclasses, primitive types, and more).

**Note:** `TypeAdapter` instances are not types, and cannot be used as type annotations for fields.

**Note:** By default, `TypeAdapter` does not respect the
[`defer_build=True`][pydantic.config.ConfigDict.defer_build] setting in the
[`model_config`][pydantic.BaseModel.model_config] or in the `TypeAdapter` constructor `config`. You need to also
explicitly set [`experimental_defer_build_mode=('model', 'type_adapter')`][pydantic.config.ConfigDict.experimental_defer_build_mode] of the
config to defer the model validator and serializer construction. Thus, this feature is opt-in to ensure backwards
compatibility.

Attributes:
    core_schema: The core schema for the type.
    validator (SchemaValidator): The schema validator for the type.
    serializer: The schema serializer for the type.

---
## wrapper
```python
from type_adapter import wrapper
```



---
## __init__
```python
from type_adapter import __init__
```

Initializes the TypeAdapter object.

Args:
    type: The type associated with the `TypeAdapter`.
    config: Configuration for the `TypeAdapter`, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict].
    _parent_depth: depth at which to search the parent namespace to construct the local namespace.
    module: The module that passes to plugin if provided.

!!! note
    You cannot use the `config` argument when instantiating a `TypeAdapter` if the type you're using has its own
    config that cannot be overridden (ex: `BaseModel`, `TypedDict`, and `dataclass`). A
    [`type-adapter-config-unused`](../errors/usage_errors.md#type-adapter-config-unused) error will be raised in this case.

!!! note
    The `_parent_depth` argument is named with an underscore to suggest its private nature and discourage use.
    It may be deprecated in a minor version, so we only recommend using it if you're
    comfortable with potential change in behavior / support.

??? tip "Compatibility with `mypy`"
    Depending on the type used, `mypy` might raise an error when instantiating a `TypeAdapter`. As a workaround, you can explicitly
    annotate your variable:

    ```py
    from typing import Union

    from pydantic import TypeAdapter

    ta: TypeAdapter[Union[str, int]] = TypeAdapter(Union[str, int])  # type: ignore[arg-type]
    ```

Returns:
    A type adapter configured for the specified `type`.

---
## _with_frame_depth
```python
from type_adapter import _with_frame_depth
```



---
## _init_core_attrs
```python
from type_adapter import _init_core_attrs
```



---
## core_schema
```python
from type_adapter import core_schema
```

The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.

---
## validator
```python
from type_adapter import validator
```

The pydantic-core SchemaValidator used to validate instances of the model.

---
## serializer
```python
from type_adapter import serializer
```

The pydantic-core SchemaSerializer used to dump instances of the model.

---
## _defer_build
```python
from type_adapter import _defer_build
```



---
## _model_config
```python
from type_adapter import _model_config
```



---
## _is_defer_build_config
```python
from type_adapter import _is_defer_build_config
```



---
## validate_python
```python
from type_adapter import validate_python
```

Validate a Python object against the model.

Args:
    object: The Python object to validate against the model.
    strict: Whether to strictly check types.
    from_attributes: Whether to extract data from object attributes.
    context: Additional context to pass to the validator.

!!! note
    When using `TypeAdapter` with a Pydantic `dataclass`, the use of the `from_attributes`
    argument is not supported.

Returns:
    The validated object.

---
## validate_json
```python
from type_adapter import validate_json
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json/#json-parsing

Validate a JSON string or bytes against the model.

Args:
    data: The JSON data to validate against the model.
    strict: Whether to strictly check types.
    context: Additional context to use during validation.

Returns:
    The validated object.

---
## validate_strings
```python
from type_adapter import validate_strings
```

Validate object contains string data against the model.

Args:
    obj: The object contains string data to validate.
    strict: Whether to strictly check types.
    context: Additional context to use during validation.

Returns:
    The validated object.

---
## get_default_value
```python
from type_adapter import get_default_value
```

Get the default value for the wrapped type.

Args:
    strict: Whether to strictly check types.
    context: Additional context to pass to the validator.

Returns:
    The default value wrapped in a `Some` if there is one or None if not.

---
## dump_python
```python
from type_adapter import dump_python
```

Dump an instance of the adapted type to a Python object.

Args:
    instance: The Python object to serialize.
    mode: The output format.
    include: Fields to include in the output.
    exclude: Fields to exclude from the output.
    by_alias: Whether to use alias names for field names.
    exclude_unset: Whether to exclude unset fields.
    exclude_defaults: Whether to exclude fields with default values.
    exclude_none: Whether to exclude fields with None values.
    round_trip: Whether to output the serialized data in a way that is compatible with deserialization.
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
    context: Additional context to pass to the serializer.

Returns:
    The serialized object.

---
## dump_json
```python
from type_adapter import dump_json
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json/#json-serialization

Serialize an instance of the adapted type to JSON.

Args:
    instance: The instance to be serialized.
    indent: Number of spaces for JSON indentation.
    include: Fields to include.
    exclude: Fields to exclude.
    by_alias: Whether to use alias names for field names.
    exclude_unset: Whether to exclude unset fields.
    exclude_defaults: Whether to exclude fields with default values.
    exclude_none: Whether to exclude fields with a value of `None`.
    round_trip: Whether to serialize and deserialize the instance to ensure round-tripping.
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.
    context: Additional context to pass to the serializer.

Returns:
    The JSON representation of the given instance as bytes.

---
## json_schema
```python
from type_adapter import json_schema
```

Generate a JSON schema for the adapted type.

Args:
    by_alias: Whether to use alias names for field names.
    ref_template: The format string used for generating $ref strings.
    schema_generator: The generator class used for creating the schema.
    mode: The mode to use for schema generation.

Returns:
    The JSON schema for the model as a dictionary.

---
## json_schemas
```python
from type_adapter import json_schemas
```

Generate a JSON schema including definitions from multiple type adapters.

Args:
    inputs: Inputs to schema generation. The first two items will form the keys of the (first)
        output mapping; the type adapters will provide the core schemas that get converted into
        definitions in the output JSON schema.
    by_alias: Whether to use alias names.
    title: The title for the schema.
    description: The description for the schema.
    ref_template: The format string used for generating $ref strings.
    schema_generator: The generator class used for creating the schema.

Returns:
    A tuple where:

        - The first element is a dictionary whose keys are tuples of JSON schema key type and JSON mode, and
            whose values are the JSON schema corresponding to that pair of inputs. (These schemas may have
            JsonRef references to definitions that are defined in the second returned element.)
        - The second element is a JSON schema containing all definitions referenced in the first returned
            element, along with the optional title and description keys.

---
## wrapped
```python
from type_adapter import wrapped
```



---
## __name__
```python
from functional_serializers import __name__
```

This module contains related classes and functions for serialization.

---
## PlainSerializer
```python
from functional_serializers import PlainSerializer
```

Plain serializers use a function to modify the output of serialization.

This is particularly helpful when you want to customize the serialization for annotated types.
Consider an input of `list`, which will be serialized into a space-delimited string.

```python
from typing import List

from typing_extensions import Annotated

from pydantic import BaseModel, PlainSerializer

CustomStr = Annotated[
    List, PlainSerializer(lambda x: ' '.join(x), return_type=str)
]

class StudentModel(BaseModel):
    courses: CustomStr

student = StudentModel(courses=['Math', 'Chemistry', 'English'])
print(student.model_dump())
#> {'courses': 'Math Chemistry English'}
```

Attributes:
    func: The serializer function.
    return_type: The return type for the function. If omitted it will be inferred from the type annotation.
    when_used: Determines when this serializer should be used. Accepts a string with values `'always'`,
        `'unless-none'`, `'json'`, and `'json-unless-none'`. Defaults to 'always'.

---
## WrapSerializer
```python
from functional_serializers import WrapSerializer
```

Wrap serializers receive the raw inputs along with a handler function that applies the standard serialization
logic, and can modify the resulting value before returning it as the final output of serialization.

For example, here's a scenario in which a wrap serializer transforms timezones to UTC **and** utilizes the existing `datetime` serialization logic.

```python
from datetime import datetime, timezone
from typing import Any, Dict

from typing_extensions import Annotated

from pydantic import BaseModel, WrapSerializer

class EventDatetime(BaseModel):
    start: datetime
    end: datetime

def convert_to_utc(value: Any, handler, info) -> Dict[str, datetime]:
    # Note that `handler` can actually help serialize the `value` for
    # further custom serialization in case it's a subclass.
    partial_result = handler(value, info)
    if info.mode == 'json':
        return {
            k: datetime.fromisoformat(v).astimezone(timezone.utc)
            for k, v in partial_result.items()
        }
    return {k: v.astimezone(timezone.utc) for k, v in partial_result.items()}

UTCEventDatetime = Annotated[EventDatetime, WrapSerializer(convert_to_utc)]

class EventModel(BaseModel):
    event_datetime: UTCEventDatetime

dt = EventDatetime(
    start='2024-01-01T07:00:00-08:00', end='2024-01-03T20:00:00+06:00'
)
event = EventModel(event_datetime=dt)
print(event.model_dump())
'''
{
    'event_datetime': {
        'start': datetime.datetime(
            2024, 1, 1, 15, 0, tzinfo=datetime.timezone.utc
        ),
        'end': datetime.datetime(
            2024, 1, 3, 14, 0, tzinfo=datetime.timezone.utc
        ),
    }
}
'''

print(event.model_dump_json())
'''
{"event_datetime":{"start":"2024-01-01T15:00:00Z","end":"2024-01-03T14:00:00Z"}}
'''
```

Attributes:
    func: The serializer function to be wrapped.
    return_type: The return type for the function. If omitted it will be inferred from the type annotation.
    when_used: Determines when this serializer should be used. Accepts a string with values `'always'`,
        `'unless-none'`, `'json'`, and `'json-unless-none'`. Defaults to 'always'.

---
## field_serializer
```python
from functional_serializers import field_serializer
```

Decorator that enables custom field serialization.

In the below example, a field of type `set` is used to mitigate duplication. A `field_serializer` is used to serialize the data as a sorted list.

```python
from typing import Set

from pydantic import BaseModel, field_serializer

class StudentModel(BaseModel):
    name: str = 'Jane'
    courses: Set[str]

    @field_serializer('courses', when_used='json')
    def serialize_courses_in_order(self, courses: Set[str]):
        return sorted(courses)

student = StudentModel(courses={'Math', 'Chemistry', 'English'})
print(student.model_dump_json())
#> {"name":"Jane","courses":["Chemistry","English","Math"]}
```

See [Custom serializers](../concepts/serialization.md#custom-serializers) for more information.

Four signatures are supported:

- `(self, value: Any, info: FieldSerializationInfo)`
- `(self, value: Any, nxt: SerializerFunctionWrapHandler, info: FieldSerializationInfo)`
- `(value: Any, info: SerializationInfo)`
- `(value: Any, nxt: SerializerFunctionWrapHandler, info: SerializationInfo)`

Args:
    fields: Which field(s) the method should be called on.
    mode: The serialization mode.

        - `plain` means the function will be called instead of the default serialization logic,
        - `wrap` means the function will be called with an argument to optionally call the
           default serialization logic.
    return_type: Optional return type for the function, if omitted it will be inferred from the type annotation.
    when_used: Determines the serializer will be used for serialization.
    check_fields: Whether to check that the fields actually exist on the model.

Returns:
    The decorator function.

---
## model_serializer
```python
from functional_serializers import model_serializer
```

Decorator that enables custom model serialization.

This is useful when a model need to be serialized in a customized manner, allowing for flexibility beyond just specific fields.

An example would be to serialize temperature to the same temperature scale, such as degrees Celsius.

```python
from typing import Literal

from pydantic import BaseModel, model_serializer

class TemperatureModel(BaseModel):
    unit: Literal['C', 'F']
    value: int

    @model_serializer()
    def serialize_model(self):
        if self.unit == 'F':
            return {'unit': 'C', 'value': int((self.value - 32) / 1.8)}
        return {'unit': self.unit, 'value': self.value}

temperature = TemperatureModel(unit='F', value=212)
print(temperature.model_dump())
#> {'unit': 'C', 'value': 100}
```

Two signatures are supported for `mode='plain'`, which is the default:

- `(self)`
- `(self, info: SerializationInfo)`

And two other signatures for `mode='wrap'`:

- `(self, nxt: SerializerFunctionWrapHandler)`
- `(self, nxt: SerializerFunctionWrapHandler, info: SerializationInfo)`

    See [Custom serializers](../concepts/serialization.md#custom-serializers) for more information.

Args:
    f: The function to be decorated.
    mode: The serialization mode.

        - `'plain'` means the function will be called instead of the default serialization logic
        - `'wrap'` means the function will be called with an argument to optionally call the default
            serialization logic.
    when_used: Determines when this serializer should be used.
    return_type: The return type for the function. If omitted it will be inferred from the type annotation.

Returns:
    The decorator function.

---
## __get_pydantic_core_schema__
```python
from functional_serializers import __get_pydantic_core_schema__
```



---
## dec
```python
from functional_serializers import dec
```



---
## SerializeAsAny
```python
from functional_serializers import SerializeAsAny
```



---
## __class_getitem__
```python
from functional_serializers import __class_getitem__
```



---
## __name__
```python
from validate_call_decorator import __name__
```

Decorator for validating function calls.

---
## validate_call
```python
from validate_call_decorator import validate_call
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/validation_decorator/

Returns a decorated wrapper around the function that validates the arguments and, optionally, the return value.

Usage may be either as a plain decorator `@validate_call` or with arguments `@validate_call(...)`.

Args:
    func: The function to be decorated.
    config: The configuration dictionary.
    validate_return: Whether to validate the return value.

Returns:
    The decorated function.

---
## validate
```python
from validate_call_decorator import validate
```



---
## wrapper_function
```python
from validate_call_decorator import wrapper_function
```



---
## PydanticErrorMixin
```python
from errors import PydanticErrorMixin
```



---
## PydanticUserError
```python
from errors import PydanticUserError
```

An error raised due to incorrect use of Pydantic.

---
## PydanticUndefinedAnnotation
```python
from errors import PydanticUndefinedAnnotation
```

A subclass of `NameError` raised when handling undefined annotations during `CoreSchema` generation.

Attributes:
    name: Name of the error.
    message: Description of the error.

---
## PydanticImportError
```python
from errors import PydanticImportError
```

An error raised when an import fails due to module changes between V1 and V2.

Attributes:
    message: Description of the error.

---
## PydanticSchemaGenerationError
```python
from errors import PydanticSchemaGenerationError
```

An error raised during failures to generate a `CoreSchema` for some type.

Attributes:
    message: Description of the error.

---
## PydanticInvalidForJsonSchema
```python
from errors import PydanticInvalidForJsonSchema
```

An error raised during failures to generate a JSON schema for some `CoreSchema`.

Attributes:
    message: Description of the error.

---
## from_name_error
```python
from errors import from_name_error
```

Convert a `NameError` to a `PydanticUndefinedAnnotation` error.

Args:
    name_error: `NameError` to be converted.

Returns:
    Converted `PydanticUndefinedAnnotation` error.

---
## __name__
```python
from dataclasses import __name__
```

The main purpose is to enhance stdlib dataclasses by adding validation
A pydantic dataclass can be generated from scratch or from a stdlib one.

Behind the scene, a pydantic dataclass is just like a regular one on which we attach
a `BaseModel` and magic methods to trigger the validation of the data.
`__init__` and `__post_init__` are hence overridden and have extra logic to be
able to validate input data.

When a pydantic dataclass is generated from scratch, it's just a plain dataclass
with validation triggered at initialization

The tricky part if for stdlib dataclasses that are converted after into pydantic ones e.g.

```py
@dataclasses.dataclass
class M:
    x: int

ValidatedM = pydantic.dataclasses.dataclass(M)
```

We indeed still want to support equality, hashing, repr, ... as if it was the stdlib one!

```py
assert isinstance(ValidatedM(x=1), M)
assert ValidatedM(x=1) == M(x=1)
```

This means we **don't want to create a new dataclass that inherits from it**
The trick is to create a wrapper around `M` that will act as a proxy to trigger
validation without altering default `M` behaviour.

---
## dataclass
```python
from dataclasses import dataclass
```



---
## rebuild_dataclass
```python
from dataclasses import rebuild_dataclass
```

Try to rebuild the pydantic-core schema for the dataclass.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
the initial attempt to build the schema, and automatic rebuilding fails.

This is analogous to `BaseModel.model_rebuild`.

Args:
    cls: The class to rebuild the pydantic-core schema for.
    force: Whether to force the rebuilding of the schema, defaults to `False`.
    raise_errors: Whether to raise errors, defaults to `True`.
    _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
    _types_namespace: The types namespace, defaults to `None`.

Returns:
    Returns `None` if the schema is already "complete" and rebuilding was not required.
    If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.

---
## is_pydantic_dataclass
```python
from dataclasses import is_pydantic_dataclass
```

Whether a class is a pydantic dataclass.

Args:
    class_: The class.

Returns:
    `True` if the class is a pydantic dataclass, `False` otherwise.

---
## make_pydantic_fields_compatible
```python
from dataclasses import make_pydantic_fields_compatible
```

Make sure that stdlib `dataclasses` understands `Field` kwargs like `kw_only`
To do that, we simply change
  `x: int = pydantic.Field(..., kw_only=True)`
into
  `x: int = dataclasses.field(default=pydantic.Field(..., kw_only=True), kw_only=True)`

---
## create_dataclass
```python
from dataclasses import create_dataclass
```

Create a Pydantic dataclass from a regular dataclass.

Args:
    cls: The class to create the Pydantic dataclass from.

Returns:
    A Pydantic dataclass.

---
## _call_initvar
```python
from dataclasses import _call_initvar
```

This function does nothing but raise an error that is as similar as possible to what you'd get
if you were to try calling `InitVar[int]()` without this monkeypatch. The whole purpose is just
to ensure typing._type_check does not error if the type hint evaluates to `InitVar[<parameter>]`.

---
## BaseModel
```python
from main import BaseModel
```



---
## create_model
```python
from main import create_model
```

Dynamically create a model.
:param __model_name: name of the created model
:param __config__: config class to use for the new model
:param __base__: base class for the new model to inherit from
:param __module__: module of the created model
:param __validators__: a dict of method names and @validator class methods
:param __cls_kwargs__: a dict for class creation
:param __slots__: Deprecated, `__slots__` should not be passed to `create_model`
:param field_definitions: fields of the model (or extra fields if a base is supplied)
    in the format `<name>=(<type>, <default default>)` or `<name>=<default value>, e.g.
    `foobar=(str, ...)` or `foobar=123`, or, for complex use-cases, in the format
    `<name>=<Field>` or `<name>=(<type>, <FieldInfo>)`, e.g.
    `foo=Field(datetime, default_factory=datetime.utcnow, alias='bar')` or
    `foo=(str, FieldInfo(title='Foo'))`

---
## model_extra
```python
from main import model_extra
```

Get extra fields set during validation.

Returns:
    A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---
## model_fields_set
```python
from main import model_fields_set
```

Returns the set of fields that have been explicitly set on this model instance.

Returns:
    A set of strings representing the fields that have been set,
        i.e. that were not filled from defaults.

---
## model_construct
```python
from main import model_construct
```

Creates a new instance of the `Model` class with validated data.

Creates a new model setting `__dict__` and `__pydantic_fields_set__` from trusted or pre-validated data.
Default values are respected, but no other validation is performed.

!!! note
    `model_construct()` generally respects the `model_config.extra` setting on the provided model.
    That is, if `model_config.extra == 'allow'`, then all extra passed values are added to the model instance's `__dict__`
    and `__pydantic_extra__` fields. If `model_config.extra == 'ignore'` (the default), then all extra passed values are ignored.
    Because no validation is performed with a call to `model_construct()`, having `model_config.extra == 'forbid'` does not result in
    an error if extra values are passed, but they will be ignored.

Args:
    _fields_set: A set of field names that were originally explicitly set during instantiation. If provided,
        this is directly used for the [`model_fields_set`][pydantic.BaseModel.model_fields_set] attribute.
        Otherwise, the field names from the `values` argument will be used.
    values: Trusted or pre-validated data dictionary.

Returns:
    A new instance of the `Model` class with validated data.

---
## model_copy
```python
from main import model_copy
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/serialization/#model_copy

Returns a copy of the model.

Args:
    update: Values to change/add in the new model. Note: the data is not validated
        before creating the new model. You should trust this data.
    deep: Set to `True` to make a deep copy of the model.

Returns:
    New model instance.

---
## model_dump
```python
from main import model_dump
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/serialization/#modelmodel_dump

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

Args:
    mode: The mode in which `to_python` should run.
        If mode is 'json', the output will only contain JSON serializable types.
        If mode is 'python', the output may contain non-JSON-serializable Python objects.
    include: A set of fields to include in the output.
    exclude: A set of fields to exclude from the output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to use the field's alias in the dictionary key if defined.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A dictionary representation of the model.

---
## model_dump_json
```python
from main import model_dump_json
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/serialization/#modelmodel_dump_json

Generates a JSON representation of the model using Pydantic's `to_json` method.

Args:
    indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
    include: Field(s) to include in the JSON output.
    exclude: Field(s) to exclude from the JSON output.
    context: Additional context to pass to the serializer.
    by_alias: Whether to serialize using field aliases.
    exclude_unset: Whether to exclude fields that have not been explicitly set.
    exclude_defaults: Whether to exclude fields that are set to their default value.
    exclude_none: Whether to exclude fields that have a value of `None`.
    round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
    warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors,
        "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError].
    serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

Returns:
    A JSON string representation of the model.

---
## model_json_schema
```python
from main import model_json_schema
```

Generates a JSON schema for a model class.

Args:
    by_alias: Whether to use attribute aliases or not.
    ref_template: The reference template.
    schema_generator: To override the logic used to generate the JSON schema, as a subclass of
        `GenerateJsonSchema` with your desired modifications
    mode: The mode in which to generate the schema.

Returns:
    The JSON schema for the given model class.

---
## model_parametrized_name
```python
from main import model_parametrized_name
```

Compute the class name for parametrizations of generic classes.

This method can be overridden to achieve a custom naming scheme for generic BaseModels.

Args:
    params: Tuple of types of the class. Given a generic class
        `Model` with 2 type variables and a concrete model `Model[str, int]`,
        the value `(str, int)` would be passed to `params`.

Returns:
    String representing the new class where `params` are passed to `cls` as type variables.

Raises:
    TypeError: Raised when trying to generate concrete names for non-generic models.

---
## model_post_init
```python
from main import model_post_init
```

Override this method to perform additional initialization after `__init__` and `model_construct`.
This is useful if you want to do some validation that requires the entire model to be initialized.

---
## model_rebuild
```python
from main import model_rebuild
```

Try to rebuild the pydantic-core schema for the model.

This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
the initial attempt to build the schema, and automatic rebuilding fails.

Args:
    force: Whether to force the rebuilding of the model schema, defaults to `False`.
    raise_errors: Whether to raise errors, defaults to `True`.
    _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
    _types_namespace: The types namespace, defaults to `None`.

Returns:
    Returns `None` if the schema is already "complete" and rebuilding was not required.
    If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.

---
## model_validate
```python
from main import model_validate
```

Validate a pydantic model instance.

Args:
    obj: The object to validate.
    strict: Whether to enforce types strictly.
    from_attributes: Whether to extract data from object attributes.
    context: Additional context to pass to the validator.

Raises:
    ValidationError: If the object could not be validated.

Returns:
    The validated model instance.

---
## model_validate_json
```python
from main import model_validate_json
```

Usage docs: https://docs.pydantic.dev/2.9/concepts/json/#json-parsing

Validate the given JSON data against the Pydantic model.

Args:
    json_data: The JSON data to validate.
    strict: Whether to enforce types strictly.
    context: Extra variables to pass to the validator.

Returns:
    The validated Pydantic model.

Raises:
    ValidationError: If `json_data` is not a JSON string or the object could not be validated.

---
## model_validate_strings
```python
from main import model_validate_strings
```

Validate the given object with string data against the Pydantic model.

Args:
    obj: The object containing string data to validate.
    strict: Whether to enforce types strictly.
    context: Extra variables to pass to the validator.

Returns:
    The validated Pydantic model.

---
## __get_pydantic_core_schema__
```python
from main import __get_pydantic_core_schema__
```

Hook into generating the model's CoreSchema.

Args:
    source: The class we are generating a schema for.
        This will generally be the same as the `cls` argument if this is a classmethod.
    handler: A callable that calls into Pydantic's internal CoreSchema generation logic.

Returns:
    A `pydantic-core` `CoreSchema`.

---
## __get_pydantic_json_schema__
```python
from main import __get_pydantic_json_schema__
```

Hook into generating the model's JSON schema.

Args:
    core_schema: A `pydantic-core` CoreSchema.
        You can ignore this argument and call the handler with a new CoreSchema,
        wrap this CoreSchema (`{'type': 'nullable', 'schema': current_schema}`),
        or just call the handler with the original schema.
    handler: Call into Pydantic's internal JSON schema generation.
        This will raise a `pydantic.errors.PydanticInvalidForJsonSchema` if JSON schema
        generation fails.
        Since this gets called by `BaseModel.model_json_schema` you can override the
        `schema_generator` argument to that function to change JSON schema generation globally
        for a type.

Returns:
    A JSON schema, as a Python object.

---
## __pydantic_init_subclass__
```python
from main import __pydantic_init_subclass__
```

This is intended to behave just like `__init_subclass__`, but is called by `ModelMetaclass`
only after the class is actually fully initialized. In particular, attributes like `model_fields` will
be present when this is called.

This is necessary because `__init_subclass__` will always be called by `type.__new__`,
and it would require a prohibitively large refactor to the `ModelMetaclass` to ensure that
`type.__new__` was called in such a manner that the class would already be sufficiently initialized.

This will receive the same `kwargs` that would be passed to the standard `__init_subclass__`, namely,
any kwargs passed to the class definition that aren't used internally by pydantic.

Args:
    **kwargs: Any keyword arguments passed to the class definition that aren't used internally
        by pydantic.

---
## __class_getitem__
```python
from main import __class_getitem__
```



---
## __copy__
```python
from main import __copy__
```

Returns a shallow copy of the model.

---
## __deepcopy__
```python
from main import __deepcopy__
```

Returns a deep copy of the model.

---
## _check_frozen
```python
from main import _check_frozen
```



---
## __getstate__
```python
from main import __getstate__
```



---
## __setstate__
```python
from main import __setstate__
```



---
## __iter__
```python
from main import __iter__
```

so `dict(model)` works

---
## __repr_args__
```python
from main import __repr_args__
```



---
## __str__
```python
from main import __str__
```



---
## __fields__
```python
from main import __fields__
```



---
## __fields_set__
```python
from main import __fields_set__
```



---
## json
```python
from main import json
```

Generate a JSON representation of the model, `include` and `exclude` arguments as per `dict()`.

`encoder` is an optional function to supply as `default` to json.dumps(), other arguments as per `json.dumps()`.

---
## parse_obj
```python
from main import parse_obj
```



---
## parse_raw
```python
from main import parse_raw
```



---
## parse_file
```python
from main import parse_file
```



---
## from_orm
```python
from main import from_orm
```



---
## construct
```python
from main import construct
```

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if `Config.extra = 'allow'` was set since it adds all passed values

---
## copy
```python
from main import copy
```

Duplicate a model, optionally choose which fields to include, exclude and change.

:param include: fields to include in new model
:param exclude: fields to exclude from new model, as with values this takes precedence over include
:param update: values to change/add in the new model. Note: the data is not validated before creating
    the new model: you should trust this data
:param deep: set to `True` to make a deep copy of the model
:return: new model instance

---
## schema
```python
from main import schema
```



---
## schema_json
```python
from main import schema_json
```



---
## validate
```python
from main import validate
```



---
## update_forward_refs
```python
from main import update_forward_refs
```

Try to update ForwardRefs on fields based on this Model, globalns and localns.

---
## _iter
```python
from main import _iter
```



---
## _copy_and_set_values
```python
from main import _copy_and_set_values
```



---
## _get_value
```python
from main import _get_value
```



---
## _calculate_keys
```python
from main import _calculate_keys
```



---
## __getattr__
```python
from main import __getattr__
```



---
## __setattr__
```python
from main import __setattr__
```



---
## __delattr__
```python
from main import __delattr__
```



---
## __eq__
```python
from main import __eq__
```



---
## __init_subclass__
```python
from main import __init_subclass__
```

This signature is included purely to help type-checkers check arguments to class declaration, which
provides a way to conveniently set model_config key/value pairs.

```py
from pydantic import BaseModel

class MyModel(BaseModel, extra='allow'): ...
```

However, this may be deceiving, since the _actual_ calls to `__init_subclass__` will not receive any
of the config arguments, and will only receive any keyword arguments passed during class initialization
that are _not_ expected keys in ConfigDict. (This is due to the way `ModelMetaclass.__new__` works.)

Args:
    **kwargs: Keyword arguments passed to the class definition, which set model_config

Note:
    You may want to override `__pydantic_init_subclass__` instead, which behaves similarly but is called
    *after* the class is fully initialized.

---
## __name__
```python
from datetime_parse import __name__
```

Functions to parse datetime objects.

We're using regular expressions rather than time.strptime because:
- They provide both validation and parsing.
- They're more flexible for datetimes.
- The date/datetime/time constructors produce friendlier error messages.

Stolen from https://raw.githubusercontent.com/django/django/main/django/utils/dateparse.py at
9718fa2e8abe430c3526a9278dd976443d4ae3c6

Changed to:
* use standard python datetime types not django.utils.timezone
* raise ValueError when regex doesn't match rather than returning None
* support parsing unix timestamps for dates and datetimes

---
## __name__
```python
from annotated_handlers import __name__
```

Type annotations to use with `__get_pydantic_core_schema__` and `__get_pydantic_json_schema__`.

---
## GetJsonSchemaHandler
```python
from annotated_handlers import GetJsonSchemaHandler
```

Handler to call into the next JSON schema generation function.

Attributes:
    mode: Json schema mode, can be `validation` or `serialization`.

---
## GetCoreSchemaHandler
```python
from annotated_handlers import GetCoreSchemaHandler
```

Handler to call into the next CoreSchema schema generation function.

---
## __call__
```python
from annotated_handlers import __call__
```

Call the inner handler and get the CoreSchema it returns.
This will call the next CoreSchema modifying function up until it calls
into Pydantic's internal schema generation machinery, which will raise a
`pydantic.errors.PydanticSchemaGenerationError` error if it cannot generate
a CoreSchema for the given source type.

Args:
    source_type: The input type.

Returns:
    CoreSchema: The `pydantic-core` CoreSchema generated.

---
## resolve_ref_schema
```python
from annotated_handlers import resolve_ref_schema
```

Get the real schema for a `definition-ref` schema.
If the schema given is not a `definition-ref` schema, it will be returned as is.
This means you don't have to check before calling this function.

Args:
    maybe_ref_schema: A `CoreSchema`, `ref`-based or not.

Raises:
    LookupError: If the `ref` is not found.

Returns:
    A concrete `CoreSchema`.

---
## generate_schema
```python
from annotated_handlers import generate_schema
```

Generate a schema unrelated to the current context.
Use this function if e.g. you are handling schema generation for a sequence
and want to generate a schema for its items.
Otherwise, you may end up doing something like applying a `min_length` constraint
that was intended for the sequence itself to its items!

Args:
    source_type: The input type.

Returns:
    CoreSchema: The `pydantic-core` CoreSchema generated.

---
## field_name
```python
from annotated_handlers import field_name
```

Get the name of the closest field to this validator.

---
## _get_types_namespace
```python
from annotated_handlers import _get_types_namespace
```

Internal method used during type resolution for serializer annotations.

---
## __name__
```python
from generics import __name__
```



---
## __name__
```python
from einops import __name__
```



---
## _product
```python
from einops import _product
```

minimalistic product that works both with numbers and symbols. Supports empty lists

---
## _reduce_axes
```python
from einops import _reduce_axes
```



---
## _optimize_transformation
```python
from einops import _optimize_transformation
```



---
## TransformRecipe
```python
from einops import TransformRecipe
```

Recipe describes actual computation pathway.
Recipe can be applied to a tensor or variable.

---
## _reconstruct_from_shape_uncached
```python
from einops import _reconstruct_from_shape_uncached
```

Reconstruct all actual parameters using shape.
Shape is a tuple that may contain integers, shape symbols (tf, theano) and UnknownSize (tf, previously mxnet)
known axes can be integers or symbols, but not Nones.

---
## _apply_recipe
```python
from einops import _apply_recipe
```



---
## _apply_recipe_array_api
```python
from einops import _apply_recipe_array_api
```



---
## _prepare_transformation_recipe
```python
from einops import _prepare_transformation_recipe
```

Perform initial parsing of pattern and provided supplementary info
axes_lengths is a tuple of tuples (axis_name, axis_length)

---
## _prepare_recipes_for_all_dims
```python
from einops import _prepare_recipes_for_all_dims
```

Internal function, used in layers.
Layer makes all recipe creation when it is initialized, thus to keep recipes simple we pre-compute for all dims

---
## reduce
```python
from einops import reduce
```

einops.reduce provides combination of reordering and reduction using reader-friendly notation.

Examples for reduce operation:

```python
>>> x = np.random.randn(100, 32, 64)

# perform max-reduction on the first axis
>>> y = reduce(x, 't b c -> b c', 'max')

# same as previous, but with clearer axes meaning
>>> y = reduce(x, 'time batch channel -> batch channel', 'max')

>>> x = np.random.randn(10, 20, 30, 40)

# 2d max-pooling with kernel size = 2 * 2 for image processing
>>> y1 = reduce(x, 'b c (h1 h2) (w1 w2) -> b c h1 w1', 'max', h2=2, w2=2)

# if one wants to go back to the original height and width, depth-to-space trick can be applied
>>> y2 = rearrange(y1, 'b (c h2 w2) h1 w1 -> b c (h1 h2) (w1 w2)', h2=2, w2=2)
>>> assert parse_shape(x, 'b _ h w') == parse_shape(y2, 'b _ h w')

# Adaptive 2d max-pooling to 3 * 4 grid
>>> reduce(x, 'b c (h1 h2) (w1 w2) -> b c h1 w1', 'max', h1=3, w1=4).shape
(10, 20, 3, 4)

# Global average pooling
>>> reduce(x, 'b c h w -> b c', 'mean').shape
(10, 20)

# Subtracting mean over batch for each channel
>>> y = x - reduce(x, 'b c h w -> () c () ()', 'mean')

# Subtracting per-image mean for each channel
>>> y = x - reduce(x, 'b c h w -> b c () ()', 'mean')

```

Parameters:
    tensor: tensor: tensor of any supported library (e.g. numpy.ndarray, tensorflow, pytorch).
        list of tensors is also accepted, those should be of the same type and shape
    pattern: string, reduction pattern
    reduction: one of available reductions ('min', 'max', 'sum', 'mean', 'prod'), case-sensitive
        alternatively, a callable f(tensor, reduced_axes) -> tensor can be provided.
        This allows using various reductions, examples: np.max, tf.reduce_logsumexp, torch.var, etc.
    axes_lengths: any additional specifications for dimensions

Returns:
    tensor of the same type as input

---
## rearrange
```python
from einops import rearrange
```

einops.rearrange is a reader-friendly smart element reordering for multidimensional tensors.
This operation includes functionality of transpose (axes permutation), reshape (view), squeeze, unsqueeze,
stack, concatenate and other operations.

Examples for rearrange operation:

```python
# suppose we have a set of 32 images in "h w c" format (height-width-channel)
>>> images = [np.random.randn(30, 40, 3) for _ in range(32)]

# stack along first (batch) axis, output is a single array
>>> rearrange(images, 'b h w c -> b h w c').shape
(32, 30, 40, 3)

# concatenate images along height (vertical axis), 960 = 32 * 30
>>> rearrange(images, 'b h w c -> (b h) w c').shape
(960, 40, 3)

# concatenated images along horizontal axis, 1280 = 32 * 40
>>> rearrange(images, 'b h w c -> h (b w) c').shape
(30, 1280, 3)

# reordered axes to "b c h w" format for deep learning
>>> rearrange(images, 'b h w c -> b c h w').shape
(32, 3, 30, 40)

# flattened each image into a vector, 3600 = 30 * 40 * 3
>>> rearrange(images, 'b h w c -> b (c h w)').shape
(32, 3600)

# split each image into 4 smaller (top-left, top-right, bottom-left, bottom-right), 128 = 32 * 2 * 2
>>> rearrange(images, 'b (h1 h) (w1 w) c -> (b h1 w1) h w c', h1=2, w1=2).shape
(128, 15, 20, 3)

# space-to-depth operation
>>> rearrange(images, 'b (h h1) (w w1) c -> b h w (c h1 w1)', h1=2, w1=2).shape
(32, 15, 20, 12)

```

When composing axes, C-order enumeration used (consecutive elements have different last axis)
Find more examples in einops tutorial.

Parameters:
    tensor: tensor of any supported library (e.g. numpy.ndarray, tensorflow, pytorch).
            list of tensors is also accepted, those should be of the same type and shape
    pattern: string, rearrangement pattern
    axes_lengths: any additional specifications for dimensions

Returns:
    tensor of the same type as input. If possible, a view to the original tensor is returned.

---
## repeat
```python
from einops import repeat
```

einops.repeat allows reordering elements and repeating them in arbitrary combinations.
This operation includes functionality of repeat, tile, broadcast functions.

Examples for repeat operation:

```python
# a grayscale image (of shape height x width)
>>> image = np.random.randn(30, 40)

# change it to RGB format by repeating in each channel
>>> repeat(image, 'h w -> h w c', c=3).shape
(30, 40, 3)

# repeat image 2 times along height (vertical axis)
>>> repeat(image, 'h w -> (repeat h) w', repeat=2).shape
(60, 40)

# repeat image 2 time along height and 3 times along width
>>> repeat(image, 'h w -> (h2 h) (w3 w)', h2=2, w3=3).shape
(60, 120)

# convert each pixel to a small square 2x2. Upsample image by 2x
>>> repeat(image, 'h w -> (h h2) (w w2)', h2=2, w2=2).shape
(60, 80)

# pixelate image first by downsampling by 2x, then upsampling
>>> downsampled = reduce(image, '(h h2) (w w2) -> h w', 'mean', h2=2, w2=2)
>>> repeat(downsampled, 'h w -> (h h2) (w w2)', h2=2, w2=2).shape
(30, 40)

```

When composing axes, C-order enumeration used (consecutive elements have different last axis)
Find more examples in einops tutorial.

Parameters:
    tensor: tensor of any supported library (e.g. numpy.ndarray, tensorflow, pytorch).
        list of tensors is also accepted, those should be of the same type and shape
    pattern: string, rearrangement pattern
    axes_lengths: any additional specifications for dimensions

Returns:
    Tensor of the same type as input. If possible, a view to the original tensor is returned.

---
## parse_shape
```python
from einops import parse_shape
```

Parse a tensor shape to dictionary mapping axes names to their lengths.

```python
# Use underscore to skip the dimension in parsing.
>>> x = np.zeros([2, 3, 5, 7])
>>> parse_shape(x, 'batch _ h w')
{'batch': 2, 'h': 5, 'w': 7}

# `parse_shape` output can be used to specify axes_lengths for other operations:
>>> y = np.zeros([700])
>>> rearrange(y, '(b c h w) -> b c h w', **parse_shape(x, 'b _ h w')).shape
(2, 10, 5, 7)

```

For symbolic frameworks may return symbols, not integers.

Parameters:
    x: tensor of any supported framework
    pattern: str, space separated names for axes, underscore means skip axis

Returns:
    dict, maps axes names to their lengths

---
## _enumerate_directions
```python
from einops import _enumerate_directions
```

For an n-dimensional tensor, returns tensors to enumerate each axis.
```python
x = np.zeros([2, 3, 4]) # or any other tensor
i, j, k = _enumerate_directions(x)
result = i + 2*j + 3*k
```

`result[i, j, k] = i + 2j + 3k`, and also has the same shape as result
Works very similarly to numpy.ogrid (open indexing grid)

---
## asnumpy
```python
from einops import asnumpy
```

Convert a tensor of an imperative framework (i.e. numpy/cupy/torch/jax/etc.) to `numpy.ndarray`

Parameters:
    tensor: tensor of any known imperative framework

Returns:
    `numpy.ndarray`, converted to numpy

---
## _validate_einsum_axis_name
```python
from einops import _validate_einsum_axis_name
```



---
## _compactify_pattern_for_einsum
```python
from einops import _compactify_pattern_for_einsum
```



---
## einsum
```python
from einops import einsum
```

einops.einsum calls einsum operations with einops-style named
axes indexing, computing tensor products with an arbitrary
number of tensors. Unlike typical einsum syntax, here you must
pass tensors first, and then the pattern.

Also, note that rearrange operations such as `"(batch chan) out"`,
or singleton axes `()`, are not currently supported.

Examples:

For a given pattern such as:
```python
>>> x, y, z = np.random.randn(3, 20, 20, 20)
>>> output = einsum(x, y, z, "a b c, c b d, a g k -> a b k")

```
the following formula is computed:
```tex
output[a, b, k] =
    \sum_{c, d, g} x[a, b, c] * y[c, b, d] * z[a, g, k]
```
where the summation over `c`, `d`, and `g` is performed
because those axes names do not appear on the right-hand side.

Let's see some additional examples:
```python
# Filter a set of images:
>>> batched_images = np.random.randn(128, 16, 16)
>>> filters = np.random.randn(16, 16, 30)
>>> result = einsum(batched_images, filters,
...                 "batch h w, h w channel -> batch channel")
>>> result.shape
(128, 30)

# Matrix multiplication, with an unknown input shape:
>>> batch_shape = (50, 30)
>>> data = np.random.randn(*batch_shape, 20)
>>> weights = np.random.randn(10, 20)
>>> result = einsum(weights, data,
...                 "out_dim in_dim, ... in_dim -> ... out_dim")
>>> result.shape
(50, 30, 10)

# Matrix trace on a single tensor:
>>> matrix = np.random.randn(10, 10)
>>> result = einsum(matrix, "i i ->")
>>> result.shape
()

```

Parameters:
    tensors_and_pattern:
        tensors: tensors of any supported library (numpy, tensorflow, pytorch, jax).
        pattern: string, einsum pattern, with commas
            separating specifications for each tensor.
            pattern should be provided after all tensors.

Returns:
    Tensor of the same type as input, after processing with einsum.

---
## build_mapping
```python
from einops import build_mapping
```



---
## __init__
```python
from einops import __init__
```



---
## __name__
```python
from array_api import __name__
```



---
## reduce
```python
from array_api import reduce
```



---
## repeat
```python
from array_api import repeat
```



---
## rearrange
```python
from array_api import rearrange
```



---
## asnumpy
```python
from array_api import asnumpy
```



---
## pack
```python
from array_api import pack
```



---
## unpack
```python
from array_api import unpack
```



---
## __name__
```python
from parsing import __name__
```

:func:`~pandas.eval` source string parsing functions

---
## AnonymousAxis
```python
from parsing import AnonymousAxis
```

Important thing: all instances of this class are not equal to each other

---
## ParsedExpression
```python
from parsing import ParsedExpression
```

non-mutable structure that contains information about one side of expression (e.g. 'b c (h w)')
and keeps some information important for downstream

---
## __init__
```python
from parsing import __init__
```



---
## __repr__
```python
from parsing import __repr__
```



---
## flat_axes_order
```python
from parsing import flat_axes_order
```



---
## has_composed_axes
```python
from parsing import has_composed_axes
```



---
## check_axis_name_return_reason
```python
from parsing import check_axis_name_return_reason
```



---
## check_axis_name
```python
from parsing import check_axis_name
```

Valid axes names are python identifiers except keywords,
and additionally should not start or end with underscore

---
## add_axis_name
```python
from parsing import add_axis_name
```



---
## EinopsError
```python
from __init__ import EinopsError
```

Runtime error thrown by einops

---
## __name__
```python
from packing import __name__
```



---
## analyze_pattern
```python
from packing import analyze_pattern
```



---
## pack
```python
from packing import pack
```

Packs several tensors into one.
See einops tutorial for introduction into packing (and how it replaces stack and concatenation).

Parameters:
    tensors: tensors to be packed, can be of different dimensionality
    pattern: pattern that is shared for all inputs and output, e.g. "i j * k" or "batch seq *"

Returns:
    (packed_tensor, packed_shapes aka PS)

Example:
```python
>>> from numpy import zeros as Z
>>> inputs = [Z([2, 3, 5]), Z([2, 3, 7, 5]), Z([2, 3, 7, 9, 5])]
>>> packed, ps = pack(inputs, 'i j * k')
>>> packed.shape, ps
((2, 3, 71, 5), [(), (7,), (7, 9)])
```

In this example, axes were matched to: i=2, j=3, k=5 based on order (first, second, and last).
All other axes were 'packed' and concatenated.
PS (packed shapes) contains information about axes that were matched to '*' in every input.
Resulting tensor has as many elements as all inputs in total.

Packing can be reversed with unpack, which additionally needs PS (packed shapes) to reconstruct order.

```python
>>> inputs_unpacked = unpack(packed, ps, 'i j * k')
>>> [x.shape for x in inputs_unpacked]
[(2, 3, 5), (2, 3, 7, 5), (2, 3, 7, 9, 5)]
```

Read the tutorial for introduction and application scenarios.

---
## prod
```python
from packing import prod
```



---
## unpack
```python
from packing import unpack
```

Unpacks a single tensor into several by splitting over a selected axes.
See einops tutorial for introduction into packing (and how it replaces stack and concatenation).

Parameters:
    tensor: tensor to be unpacked
    packed_shapes: packed_shapes (aka PS) is a list of shapes that take place of '*' in each output.
        output will contain a single tensor for every provided shape
    pattern: pattern that is shared for input and all outputs, e.g. "i j * k" or "batch seq *",
        where * designates an axis to be unpacked

Returns:
    list of tensors

If framework supports views, results are views to the original tensor.

Example:
```python
>>> from numpy import zeros as Z
>>> inputs = [Z([2, 3, 5]), Z([2, 3, 7, 5]), Z([2, 3, 7, 9, 5])]
>>> packed, ps = pack(inputs, 'i j * k')
>>> packed.shape, ps
((2, 3, 71, 5), [(), (7,), (7, 9)])
```

In this example, axes were matched to: i=2, j=3, k=5 based on order (first, second, and last).
All other axes were 'packed' and concatenated.
PS (packed shapes) contains information about axes that were matched to '*' in every input.
Resulting tensor has as many elements as all inputs in total.

Packing can be reversed with unpack, which additionally needs PS (packed shapes) to reconstruct order.

```python
>>> inputs_unpacked = unpack(packed, ps, 'i j * k')
>>> [x.shape for x in inputs_unpacked]
[(2, 3, 5), (2, 3, 7, 5), (2, 3, 7, 9, 5)]
```

Read the tutorial for introduction and application scenarios.

---
## __name__
```python
from _torch_specific import __name__
```

Specialization of einops for torch.

Unfortunately, torch's jit scripting mechanism isn't strong enough,
and to have scripting supported at least for layers,
a number of additional moves is needed.

Design of main operations (dynamic resolution by lookup) is unlikely
to be implemented by torch.jit.script,
but torch.compile seems to work with operations just fine.

---
## TorchJitBackend
```python
from _torch_specific import TorchJitBackend
```

Completely static backend that mimics part of normal backend functionality
but restricted to be within torchscript.

---
## apply_for_scriptable_torch
```python
from _torch_specific import apply_for_scriptable_torch
```



---
## allow_ops_in_compiled_graph
```python
from _torch_specific import allow_ops_in_compiled_graph
```



---
## reduce
```python
from _torch_specific import reduce
```



---
## transpose
```python
from _torch_specific import transpose
```



---
## stack_on_zeroth_dimension
```python
from _torch_specific import stack_on_zeroth_dimension
```



---
## tile
```python
from _torch_specific import tile
```



---
## add_axes
```python
from _torch_specific import add_axes
```



---
## is_float_type
```python
from _torch_specific import is_float_type
```



---
## shape
```python
from _torch_specific import shape
```



---
## reshape
```python
from _torch_specific import reshape
```



---
## __name__
```python
from _backends import __name__
```

Backends in `einops` are organized to meet the following requirements
- backends are not imported unless those are actually needed, because
    - backends may not be installed
    - importing all available backends will drive to significant memory footprint
    - backends may be present but installed with errors (but never used),
      importing may drive to crashes
- backend should be either symbolic or imperative
    - this determines which methods (from_numpy/to_numpy or create_symbol/eval_symbol) should be defined
- if backend can't provide symbols for shape dimensions, UnknownSize objects are used

---
## get_backend
```python
from _backends import get_backend
```

Takes a correct backend (e.g. numpy backend if tensor is numpy.ndarray) for a tensor.
If needed, imports package and creates backend

---
## AbstractBackend
```python
from _backends import AbstractBackend
```

Base backend class, major part of methods are only for debugging purposes.

---
## UnknownSize
```python
from _backends import UnknownSize
```

pseudo-symbol for symbolic frameworks which do not provide symbols for shape elements

---
## NumpyBackend
```python
from _backends import NumpyBackend
```



---
## JaxBackend
```python
from _backends import JaxBackend
```



---
## TorchBackend
```python
from _backends import TorchBackend
```



---
## CupyBackend
```python
from _backends import CupyBackend
```



---
## ChainerBackend
```python
from _backends import ChainerBackend
```



---
## HashableTuple
```python
from _backends import HashableTuple
```

Overcomes non-hashability of symbolic elements

---
## TensorflowBackend
```python
from _backends import TensorflowBackend
```



---
## TFKerasBackend
```python
from _backends import TFKerasBackend
```



---
## OneFlowBackend
```python
from _backends import OneFlowBackend
```



---
## PaddleBackend
```python
from _backends import PaddleBackend
```



---
## TinygradBackend
```python
from _backends import TinygradBackend
```



---
## is_appropriate_type
```python
from _backends import is_appropriate_type
```



---
## from_numpy
```python
from _backends import from_numpy
```



---
## to_numpy
```python
from _backends import to_numpy
```



---
## create_symbol
```python
from _backends import create_symbol
```



---
## eval_symbol
```python
from _backends import eval_symbol
```



---
## arange
```python
from _backends import arange
```



---
## shape
```python
from _backends import shape
```



---
## reshape
```python
from _backends import reshape
```



---
## transpose
```python
from _backends import transpose
```



---
## reduce
```python
from _backends import reduce
```



---
## stack_on_zeroth_dimension
```python
from _backends import stack_on_zeroth_dimension
```



---
## add_axis
```python
from _backends import add_axis
```



---
## add_axes
```python
from _backends import add_axes
```



---
## tile
```python
from _backends import tile
```



---
## concat
```python
from _backends import concat
```



---
## is_float_type
```python
from _backends import is_float_type
```



---
## layers
```python
from _backends import layers
```



---
## __repr__
```python
from _backends import __repr__
```



---
## einsum
```python
from _backends import einsum
```



---
## __floordiv__
```python
from _backends import __floordiv__
```



---
## __eq__
```python
from _backends import __eq__
```



---
## __mul__
```python
from _backends import __mul__
```



---
## __rmul__
```python
from _backends import __rmul__
```



---
## __hash__
```python
from _backends import __hash__
```



---
## __init__
```python
from _backends import __init__
```



---
## __iter__
```python
from _backends import __iter__
```



---
## __len__
```python
from _backends import __len__
```



---
## __getitem__
```python
from _backends import __getitem__
```



---
## default_export
```python
from __init__ import default_export
```

Assign a function to a module's __call__ attr

Args:
    funk: function to be made callable
    key (str): module name as it would appear in sys.modules

Returns:
    Callable[..., T]: the function passed in

Raises:
    AttributeError: if key is None and exported obj no __module__ attr
    ValueError: if key is not in sys.modules

---
## funkify
```python
from __init__ import funkify
```

Assign a function to a module's __call__ attr

Args:
    funk: function to be made callable
    key (str): module name as it would appear in sys.modules

Returns:
    Callable[..., T]: the function passed in

---
## ModuleCls
```python
from __init__ import ModuleCls
```



---
## ModuleClsStaticValue
```python
from __init__ import ModuleClsStaticValue
```



---
## SectionWrapper
```python
from __init__ import SectionWrapper
```



---
## IniConfig
```python
from __init__ import IniConfig
```



---
## lineof
```python
from __init__ import lineof
```



---
## get
```python
from __init__ import get
```

Wrapper for :func:`ZoneInfoFile.zones.get`. This is a convenience method
for retrieving zones from the zone dictionary.

:param name:
    The name of the zone to retrieve. (Generally IANA zone names)

:param default:
    The value to return in the event of a missing key.

.. versionadded:: 2.6.0

---
## items
```python
from __init__ import items
```



---
## _ParsedLine
```python
from _parse import _ParsedLine
```



---
## parse_lines
```python
from _parse import parse_lines
```



---
## _parseline
```python
from _parse import _parseline
```



---
## iscommentline
```python
from _parse import iscommentline
```



---
## __name__
```python
from package import __name__
```



---
## _safe_name
```python
from package import _safe_name
```

Convert an arbitrary string to a standard distribution name.

Any runs of non-alphanumeric/. characters are replaced with a single '-'.

Copied from pkg_resources.safe_name for compatibility with warehouse.
See https://github.com/pypa/twine/issues/743.

---
## PackageFile
```python
from package import PackageFile
```



---
## Hexdigest
```python
from package import Hexdigest
```



---
## HashManager
```python
from package import HashManager
```

Manage our hashing objects for simplicity.

This will also allow us to better test this logic.

---
## __init__
```python
from package import __init__
```

Initialize our manager and hasher objects.

---
## from_filename
```python
from package import from_filename
```



---
## metadata_dictionary
```python
from package import metadata_dictionary
```

Merge multiple sources of metadata into a single dictionary.

Includes values from filename, PKG-INFO, hashers, and signature.

---
## add_attestations
```python
from package import add_attestations
```



---
## add_gpg_signature
```python
from package import add_gpg_signature
```



---
## sign
```python
from package import sign
```



---
## run_gpg
```python
from package import run_gpg
```



---
## _md5_update
```python
from package import _md5_update
```



---
## _md5_hexdigest
```python
from package import _md5_hexdigest
```



---
## _sha2_update
```python
from package import _sha2_update
```



---
## _sha2_hexdigest
```python
from package import _sha2_hexdigest
```



---
## _blake_update
```python
from package import _blake_update
```



---
## _blake_hexdigest
```python
from package import _blake_hexdigest
```



---
## hash
```python
from package import hash
```

Hash the file contents.

---
## hexdigest
```python
from package import hexdigest
```

Return the hexdigest for the file.

---
## CredentialInput
```python
from auth import CredentialInput
```



---
## Resolver
```python
from auth import Resolver
```



---
## Private
```python
from auth import Private
```



---
## choose
```python
from auth import choose
```



---
## username
```python
from auth import username
```



---
## password
```python
from auth import password
```



---
## system
```python
from auth import system
```



---
## get_username_from_keyring
```python
from auth import get_username_from_keyring
```



---
## get_password_from_keyring
```python
from auth import get_password_from_keyring
```



---
## username_from_keyring_or_prompt
```python
from auth import username_from_keyring_or_prompt
```



---
## password_from_keyring_or_prompt
```python
from auth import password_from_keyring_or_prompt
```



---
## prompt
```python
from auth import prompt
```



---
## configure_output
```python
from cli import configure_output
```



---
## list_dependencies_and_versions
```python
from cli import list_dependencies_and_versions
```



---
## dep_versions
```python
from cli import dep_versions
```



---
## dispatch
```python
from cli import dispatch
```



---
## __name__
```python
from wininst import __name__
```



---
## WinInst
```python
from wininst import WinInst
```



---
## __init__
```python
from wininst import __init__
```



---
## py_version
```python
from wininst import py_version
```



---
## read
```python
from wininst import read
```



---
## read_file
```python
from wininst import read_file
```



---
## get_config
```python
from utils import get_config
```

Read repository configuration from a file (i.e. ~/.pypirc).

Format: https://packaging.python.org/specifications/pypirc/

If the default config file doesn't exist, return a default configuration for
pypyi and testpypi.

---
## sanitize_url
```python
from utils import sanitize_url
```

Sanitize a URL.

Sanitize URLs, removing any user:password combinations and replacing them with
asterisks.  Returns the original URL if the string is a non-matching pattern.

:param url:
    str containing a URL to sanitize.

return:
    str either sanitized or as entered depending on pattern match.

---
## _validate_repository_url
```python
from utils import _validate_repository_url
```

Validate the given url for allowed schemes and components.

---
## get_repository_from_config
```python
from utils import get_repository_from_config
```

Get repository config command-line values or the .pypirc file.

---
## _config_from_repository_url
```python
from utils import _config_from_repository_url
```



---
## normalize_repository_url
```python
from utils import normalize_repository_url
```



---
## get_file_size
```python
from utils import get_file_size
```

Return the size of a file in KB, or MB if >= 1024 KB.

---
## check_status_code
```python
from utils import check_status_code
```

Generate a helpful message based on the response from the repository.

Raise a custom exception for recognized errors. Otherwise, print the
response content (based on the verbose option) before re-raising the
HTTPError.

---
## get_userpass_value
```python
from utils import get_userpass_value
```

Get a credential (e.g. a username or password) from the configuration.

Uses the following rules:

1. If ``cli_value`` is specified, use that.
2. If ``config[key]`` is specified, use that.
3. If ``prompt_strategy`` is specified, use its return value.
4. Otherwise return ``None``

:param cli_value:
    The value supplied from the command line.
:param config:
    A dictionary of repository configuration values.
:param key:
    The credential to look up in ``config``, e.g. ``"username"`` or ``"password"``.
:param prompt_strategy:
    An argumentless function to get the value, e.g. from keyring or by prompting
    the user.

:return:
    The credential value, i.e. the username or password.

---
## EnvironmentDefault
```python
from utils import EnvironmentDefault
```

Get values from environment variable.

---
## EnvironmentFlag
```python
from utils import EnvironmentFlag
```

Set boolean flag from environment variable.

---
## bool_from_env
```python
from utils import bool_from_env
```

Allow '0' and 'false' and 'no' to be False.

---
## __name__
```python
from settings import __name__
```

global settings for Pickler

---
## Settings
```python
from settings import Settings
```

Object that manages the configuration for Twine.

This object can only be instantiated with keyword arguments.

For example,

.. code-block:: python

    Settings(True, username='fakeusername')

Will raise a :class:`TypeError`. Instead, you would want

.. code-block:: python

    Settings(sign=True, username='fakeusername')

---
## __init__
```python
from settings import __init__
```

Initialize our settings instance.

:param attestations:
    Whether the package file should be uploaded with attestations.
:param sign:
    Configure whether the package file should be signed.
:param sign_with:
    The name of the executable used to sign the package with.
:param identity:
    The GPG identity that should be used to sign the package file.
:param username:
    The username used to authenticate to the repository (package
    index).
:param password:
    The password used to authenticate to the repository (package
    index).
:param non_interactive:
    Do not interactively prompt for username/password if the required
    credentials are missing.
:param comment:
    The comment to include with each distribution file.
:param config_file:
    The path to the configuration file to use.
:param skip_existing:
    Specify whether twine should continue uploading files if one
    of them already exists. This primarily supports PyPI. Other
    package indexes may not be supported.
:param cacert:
    The path to the bundle of certificates used to verify the TLS
    connection to the package index.
:param client_cert:
    The path to the client certificate used to perform authentication to the
    index. This must be a single file that contains both the private key and
    the PEM-encoded certificate.
:param repository_name:
    The name of the repository (package index) to interact with. This
    should correspond to a section in the config file.
:param repository_url:
    The URL of the repository (package index) to interact with. This
    will override the settings inferred from ``repository_name``.
:param verbose:
    Show verbose output.
:param disable_progress_bar:
    Disable the progress bar.

---
## username
```python
from settings import username
```



---
## password
```python
from settings import password
```



---
## _allow_noninteractive
```python
from settings import _allow_noninteractive
```

Bypass NonInteractive error when client cert is present.

---
## verbose
```python
from settings import verbose
```

Initialize a logger based on the --verbose option.

---
## register_argparse_arguments
```python
from settings import register_argparse_arguments
```

Register the arguments for argparse.

---
## from_argparse
```python
from settings import from_argparse
```

Generate the Settings from parsed arguments.

---
## _handle_package_signing
```python
from settings import _handle_package_signing
```



---
## _handle_repository_options
```python
from settings import _handle_repository_options
```



---
## _handle_certificates
```python
from settings import _handle_certificates
```



---
## check_repository_url
```python
from settings import check_repository_url
```

Verify we are not using legacy PyPI.

:raises twine.exceptions.UploadToDeprecatedPyPIDetected:
    The configured repository URL is for legacy PyPI.

---
## create_repository
```python
from settings import create_repository
```

Create a new repository for uploading.

---
## TwineException
```python
from exceptions import TwineException
```

Base class for all exceptions raised by twine.

---
## RedirectDetected
```python
from exceptions import RedirectDetected
```

A redirect was detected that the user needs to resolve.

In some cases, requests refuses to issue a new POST request after a
redirect. In order to prevent a confusing user experience, we raise this
exception to allow users to know the index they're uploading to is
redirecting them.

---
## PackageNotFound
```python
from exceptions import PackageNotFound
```

A package file was provided that could not be found on the file system.

This is only used when attempting to register a package_file.

---
## UploadToDeprecatedPyPIDetected
```python
from exceptions import UploadToDeprecatedPyPIDetected
```

An upload attempt was detected to deprecated PyPI domains.

The sites pypi.python.org and testpypi.python.org are deprecated.

---
## UnreachableRepositoryURLDetected
```python
from exceptions import UnreachableRepositoryURLDetected
```

An upload attempt was detected to a URL without a protocol prefix.

All repository URLs must have a protocol (e.g., ``https://``).

---
## InvalidSigningConfiguration
```python
from exceptions import InvalidSigningConfiguration
```

Both the sign and identity parameters must be present.

---
## InvalidSigningExecutable
```python
from exceptions import InvalidSigningExecutable
```

Signing executable must be installed on system.

---
## InvalidConfiguration
```python
from exceptions import InvalidConfiguration
```

Raised when configuration is invalid.

---
## InvalidDistribution
```python
from exceptions import InvalidDistribution
```

Raised when a distribution is invalid.

---
## NonInteractive
```python
from exceptions import NonInteractive
```

Raised in non-interactive mode when credentials could not be found.

---
## InvalidPyPIUploadURL
```python
from exceptions import InvalidPyPIUploadURL
```

Repository configuration tries to use PyPI with an incorrect URL.

For example, https://pypi.org instead of https://upload.pypi.org/legacy.

---
## from_args
```python
from exceptions import from_args
```

Return an UploadToDeprecatedPyPIDetected instance.

---
## _make_adapter_with_retries
```python
from repository import _make_adapter_with_retries
```



---
## _make_user_agent_string
```python
from repository import _make_user_agent_string
```



---
## close
```python
from repository import close
```



---
## _convert_data_to_list_of_tuples
```python
from repository import _convert_data_to_list_of_tuples
```



---
## set_certificate_authority
```python
from repository import set_certificate_authority
```



---
## set_client_certificate
```python
from repository import set_client_certificate
```



---
## register
```python
from repository import register
```



---
## _upload
```python
from repository import _upload
```



---
## upload
```python
from repository import upload
```



---
## package_is_uploaded
```python
from repository import package_is_uploaded
```



---
## release_urls
```python
from repository import release_urls
```



---
## verify_package_integrity
```python
from repository import verify_package_integrity
```



---
## __name__
```python
from wheel import __name__
```



---
## Wheel
```python
from wheel import Wheel
```

Class to build and install from Wheel files (PEP 427).

---
## __init__
```python
from wheel import __init__
```

Initialise an instance using a (valid) filename.

---
## py_version
```python
from wheel import py_version
```



---
## find_candidate_metadata_files
```python
from wheel import find_candidate_metadata_files
```

Filter files that may be METADATA files.

---
## read
```python
from wheel import read
```



---
## parse
```python
from wheel import parse
```



---
## read_file
```python
from wheel import read_file
```



---
## CacheInfo
```python
from _url import CacheInfo
```

Host encoding cache.

---
## _SplitResultDict
```python
from _url import _SplitResultDict
```



---
## _InternalURLCache
```python
from _url import _InternalURLCache
```



---
## rewrite_module
```python
from _url import rewrite_module
```



---
## _normalize_path_segments
```python
from _url import _normalize_path_segments
```

Drop '.' and '..' from a sequence of str segments

---
## _human_quote
```python
from _url import _human_quote
```



---
## _idna_decode
```python
from _url import _idna_decode
```



---
## _idna_encode
```python
from _url import _idna_encode
```



---
## _ip_compressed_version
```python
from _url import _ip_compressed_version
```

Return compressed version of IP address and its version.

---
## _host_validate
```python
from _url import _host_validate
```

Validate an ascii host name.

---
## cache_clear
```python
from _url import cache_clear
```

Clear all LRU caches.

---
## cache_info
```python
from _url import cache_info
```

Report cache statistics.

---
## cache_configure
```python
from _url import cache_configure
```

Configure LRU cache sizes.

---
## __new__
```python
from _url import __new__
```



---
## build
```python
from _url import build
```

Creates and returns a new URL

---
## __init_subclass__
```python
from _url import __init_subclass__
```



---
## __str__
```python
from _url import __str__
```



---
## __repr__
```python
from _url import __repr__
```



---
## __bytes__
```python
from _url import __bytes__
```



---
## __eq__
```python
from _url import __eq__
```



---
## __hash__
```python
from _url import __hash__
```



---
## __le__
```python
from _url import __le__
```



---
## __lt__
```python
from _url import __lt__
```



---
## __ge__
```python
from _url import __ge__
```



---
## __gt__
```python
from _url import __gt__
```



---
## __truediv__
```python
from _url import __truediv__
```



---
## __mod__
```python
from _url import __mod__
```



---
## __bool__
```python
from _url import __bool__
```



---
## __getstate__
```python
from _url import __getstate__
```



---
## __setstate__
```python
from _url import __setstate__
```



---
## _cache_netloc
```python
from _url import _cache_netloc
```

Cache the netloc parts of the URL.

---
## is_absolute
```python
from _url import is_absolute
```

A check for absolute URLs.

Return True for absolute ones (having scheme or starting
with //), False otherwise.

Is is preferred to call the .absolute property instead
as it is cached.

---
## is_default_port
```python
from _url import is_default_port
```

A check for default port.

Return True if port is default for specified scheme,
e.g. 'http://python.org' or 'http://python.org:80', False
otherwise.

Return False for relative URLs.

---
## origin
```python
from _url import origin
```

Return an URL with scheme, host and port parts only.

user, password, path, query and fragment are removed.

---
## relative
```python
from _url import relative
```

Return a relative part of the URL.

scheme, user, password, host and port are removed.

---
## absolute
```python
from _url import absolute
```

A check for absolute URLs.

Return True for absolute ones (having scheme or starting
with //), False otherwise.

---
## scheme
```python
from _url import scheme
```

Scheme for absolute URLs.

Empty string for relative URLs or URLs starting with //

---
## raw_authority
```python
from _url import raw_authority
```

Encoded authority part of URL.

Empty string for relative URLs.

---
## _default_port
```python
from _url import _default_port
```

Default port for the scheme or None if not known.

---
## _port_not_default
```python
from _url import _port_not_default
```

The port part of URL normalized to None if its the default port.

---
## authority
```python
from _url import authority
```

Decoded authority part of URL.

Empty string for relative URLs.

---
## raw_user
```python
from _url import raw_user
```

Encoded user part of URL.

None if user is missing.

---
## user
```python
from _url import user
```

Decoded user part of URL.

None if user is missing.

---
## raw_password
```python
from _url import raw_password
```

Encoded password part of URL.

None if password is missing.

---
## password
```python
from _url import password
```

Decoded password part of URL.

None if password is missing.

---
## raw_host
```python
from _url import raw_host
```

Encoded host part of URL.

None for relative URLs.

When working with IPv6 addresses, use the `host_subcomponent` property instead
as it will return the host subcomponent with brackets.

---
## host
```python
from _url import host
```

Decoded host part of URL.

None for relative URLs.

---
## host_subcomponent
```python
from _url import host_subcomponent
```

Return the host subcomponent part of URL.

None for relative URLs.

https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2

`IP-literal = "[" ( IPv6address / IPvFuture  ) "]"`

Examples:
- `http://example.com:8080` -> `example.com`
- `http://example.com:80` -> `example.com`
- `https://127.0.0.1:8443` -> `127.0.0.1`
- `https://[::1]:8443` -> `[::1]`
- `http://[::1]` -> `[::1]`

---
## port
```python
from _url import port
```

Port part of URL, with scheme-based fallback.

None for relative URLs or URLs without explicit port and
scheme without default port substitution.

---
## explicit_port
```python
from _url import explicit_port
```

Port part of URL, without scheme-based fallback.

None for relative URLs or URLs without explicit port.

---
## raw_path
```python
from _url import raw_path
```

Encoded path of URL.

/ for absolute URLs without path part.

---
## path
```python
from _url import path
```

Decoded path of URL.

/ for absolute URLs without path part.

---
## path_safe
```python
from _url import path_safe
```

Decoded path of URL.

/ for absolute URLs without path part.

/ (%2F) and % (%25) are not decoded

---
## _parsed_query
```python
from _url import _parsed_query
```

Parse query part of URL.

---
## query
```python
from _url import query
```

A MultiDictProxy representing parsed query parameters in decoded
representation.

Empty value if URL has no query part.

---
## raw_query_string
```python
from _url import raw_query_string
```

Encoded query part of URL.

Empty string if query is missing.

---
## query_string
```python
from _url import query_string
```

Decoded query part of URL.

Empty string if query is missing.

---
## path_qs
```python
from _url import path_qs
```

Decoded path of URL with query.

---
## raw_path_qs
```python
from _url import raw_path_qs
```

Encoded path of URL with query.

---
## raw_fragment
```python
from _url import raw_fragment
```

Encoded fragment part of URL.

Empty string if fragment is missing.

---
## fragment
```python
from _url import fragment
```

Decoded fragment part of URL.

Empty string if fragment is missing.

---
## raw_parts
```python
from _url import raw_parts
```

A tuple containing encoded *path* parts.

('/',) for absolute URLs if *path* is missing.

---
## parts
```python
from _url import parts
```

A tuple containing decoded *path* parts.

('/',) for absolute URLs if *path* is missing.

---
## parent
```python
from _url import parent
```

A new URL with last part of path removed and cleaned up query and
fragment.

---
## raw_name
```python
from _url import raw_name
```

The last part of raw_parts.

---
## name
```python
from _url import name
```

The last part of parts.

---
## raw_suffix
```python
from _url import raw_suffix
```



---
## suffix
```python
from _url import suffix
```



---
## raw_suffixes
```python
from _url import raw_suffixes
```



---
## suffixes
```python
from _url import suffixes
```



---
## _validate_authority_uri_abs_path
```python
from _url import _validate_authority_uri_abs_path
```

Ensure that path in URL with authority starts with a leading slash.

Raise ValueError if not.

---
## _make_child
```python
from _url import _make_child
```

add paths to self._val.path, accounting for absolute vs relative paths,
keep existing, but do not create new, empty segments

---
## _normalize_path
```python
from _url import _normalize_path
```



---
## _encode_host
```python
from _url import _encode_host
```



---
## _make_netloc
```python
from _url import _make_netloc
```



---
## _split_netloc
```python
from _url import _split_netloc
```

Split netloc into username, password, host and port.

---
## with_scheme
```python
from _url import with_scheme
```

Return a new URL with scheme replaced.

---
## with_user
```python
from _url import with_user
```

Return a new URL with user replaced.

Autoencode user if needed.

Clear user/password if user is None.

---
## with_password
```python
from _url import with_password
```

Return a new URL with password replaced.

Autoencode password if needed.

Clear password if argument is None.

---
## with_host
```python
from _url import with_host
```

Return a new URL with host replaced.

Autoencode host if needed.

Changing host for relative URLs is not allowed, use .join()
instead.

---
## with_port
```python
from _url import with_port
```

Return a new URL with port replaced.

Clear port to default if None is passed.

---
## with_path
```python
from _url import with_path
```

Return a new URL with path replaced.

---
## _query_seq_pairs
```python
from _url import _query_seq_pairs
```



---
## _query_var
```python
from _url import _query_var
```



---
## _get_str_query_from_iterable
```python
from _url import _get_str_query_from_iterable
```

Return a query string from an iterable.

---
## _get_str_query
```python
from _url import _get_str_query
```



---
## with_query
```python
from _url import with_query
```

Return a new URL with query part replaced.

Accepts any Mapping (e.g. dict, multidict.MultiDict instances)
or str, autoencode the argument if needed.

A sequence of (key, value) pairs is supported as well.

It also can take an arbitrary number of keyword arguments.

Clear query if None is passed.

---
## extend_query
```python
from _url import extend_query
```

Return a new URL with query part combined with the existing.

This method will not remove existing query parameters.

Example:
>>> url = URL('http://example.com/?a=1&b=2')
>>> url.extend_query(a=3, c=4)
URL('http://example.com/?a=1&b=2&a=3&c=4')

---
## update_query
```python
from _url import update_query
```

Return a new URL with query part updated.

This method will overwrite existing query parameters.

Example:
>>> url = URL('http://example.com/?a=1&b=2')
>>> url.update_query(a=3, c=4)
URL('http://example.com/?a=3&b=2&c=4')

---
## without_query_params
```python
from _url import without_query_params
```

Remove some keys from query part and return new URL.

---
## with_fragment
```python
from _url import with_fragment
```

Return a new URL with fragment replaced.

Autoencode fragment if needed.

Clear fragment to default if None is passed.

---
## with_name
```python
from _url import with_name
```

Return a new URL with name (last part of path) replaced.

Query and fragment parts are cleaned up.

Name is encoded if needed.

---
## with_suffix
```python
from _url import with_suffix
```

Return a new URL with suffix (file extension of name) replaced.

Query and fragment parts are cleaned up.

suffix is encoded if needed.

---
## join
```python
from _url import join
```

Join URLs

Construct a full (“absolute”) URL by combining a “base URL”
(self) with another URL (url).

Informally, this uses components of the base URL, in
particular the addressing scheme, the network location and
(part of) the path, to provide missing components in the
relative URL.

---
## joinpath
```python
from _url import joinpath
```

Return a new URL with the elements in other appended to the path.

---
## human_repr
```python
from _url import human_repr
```

Return decoded human readable string for URL representation.

---
## __name__
```python
from _quoting_py import __name__
```



---
## _Quoter
```python
from _quoting_py import _Quoter
```



---
## _Unquoter
```python
from _quoting_py import _Unquoter
```



---
## __init__
```python
from _quoting_py import __init__
```



---
## __call__
```python
from _quoting_py import __call__
```



---
## __name__
```python
from _quoting import __name__
```



---
## __name__
```python
from _helpers_py import __name__
```

Various helper functions.

---
## _TSelf
```python
from _helpers_py import _TSelf
```



---
## cached_property
```python
from _helpers_py import cached_property
```

Use as a class method decorator.

It operates almost exactly like
the Python `@property` decorator, but it puts the result of the
method it decorates into the instance dict after the first call,
effectively replacing the function it decorates with an instance
variable.  It is, in Python parlance, a data descriptor.

---
## __init__
```python
from _helpers_py import __init__
```



---
## __get__
```python
from _helpers_py import __get__
```



---
## __set__
```python
from _helpers_py import __set__
```



---
## __name__
```python
from _helpers import __name__
```



---
## __name__
```python
from __diff import __name__
```

Module to show if an object has changed since it was memorised

---
## get_attrs
```python
from __diff import get_attrs
```

Gets all the attributes of an object though its __dict__ or return None

---
## get_seq
```python
from __diff import get_seq
```

Gets all the items in a sequence or return None

---
## memorise
```python
from __diff import memorise
```

Adds an object to the memo, and recursively adds all the objects
attributes, and if it is a container, its items. Use force=True to update
an object already in the memo. Updating is not recursively done.

---
## release_gone
```python
from __diff import release_gone
```



---
## whats_changed
```python
from __diff import whats_changed
```

Check an object against the memo. Returns a list in the form
(attribute changes, container changed). Attribute changes is a dict of
attribute name to attribute value. container changed is a boolean.
If simple is true, just returns a boolean. None for either item means
that it has not been checked yet

---
## has_changed
```python
from __diff import has_changed
```



---
## _imp
```python
from __diff import _imp
```

Replaces the default __import__, to allow a module to be memorised
before the user can change it

---
## __name__
```python
from pointers import __name__
```



---
## parent
```python
from pointers import parent
```

>>> listiter = iter([4,5,6,7])
>>> obj = parent(listiter, list)
>>> obj == [4,5,6,7]  # actually 'is', but don't have handle any longer
True

NOTE: objtype can be a single type (e.g. int or list) or a tuple of types.

WARNING: if obj is a sequence (e.g. list), may produce unexpected results.
Parent finds *one* parent (e.g. the last member of the sequence).
    

---
## parents
```python
from pointers import parents
```

Find the chain of referents for obj. Chain will end with obj.

objtype: an object type or tuple of types to search for
depth: search depth (e.g. depth=2 is 'grandparents')
ignore: an object or tuple of objects to ignore in the search

---
## children
```python
from pointers import children
```

Find the chain of referrers for obj. Chain will start with obj.

objtype: an object type or tuple of types to search for
depth: search depth (e.g. depth=2 is 'grandchildren')
ignore: an object or tuple of objects to ignore in the search

NOTE: a common thing to ignore is all globals, 'ignore=(globals(),)'

NOTE: repeated calls may yield different results, as python stores
the last value in the special variable '_'; thus, it is often good
to execute something to replace '_' (e.g. >>> 1+1).

---
## find_chain
```python
from pointers import find_chain
```



---
## __name__
```python
from session import __name__
```

PipSession and supporting code, containing all pip-specific
network request configuration and behavior.

---
## _module_map
```python
from session import _module_map
```

get map of imported modules

---
## _lookup_module
```python
from session import _lookup_module
```

lookup name or id of obj if module is imported

---
## _stash_modules
```python
from session import _stash_modules
```



---
## _restore_modules
```python
from session import _restore_modules
```



---
## dump_module
```python
from session import dump_module
```

Pickle the current state of :py:mod:`__main__` or another module to a file.

Save the contents of :py:mod:`__main__` (e.g. from an interactive
interpreter session), an imported module, or a module-type object (e.g.
built with :py:class:`~types.ModuleType`), to a file. The pickled
module can then be restored with the function :py:func:`load_module`.

Args:
    filename: a path-like object or a writable stream. If `None`
        (the default), write to a named file in a temporary directory.
    module: a module object or the name of an importable module. If `None`
        (the default), :py:mod:`__main__` is saved.
    refimported: if `True`, all objects identified as having been imported
        into the module's namespace are saved by reference. *Note:* this is
        similar but independent from ``dill.settings[`byref`]``, as
        ``refimported`` refers to virtually all imported objects, while
        ``byref`` only affects select objects.
    **kwds: extra keyword arguments passed to :py:class:`Pickler()`.

Raises:
   :py:exc:`PicklingError`: if pickling fails.

Examples:

    - Save current interpreter session state:

      >>> import dill
      >>> squared = lambda x: x*x
      >>> dill.dump_module() # save state of __main__ to /tmp/session.pkl

    - Save the state of an imported/importable module:

      >>> import dill
      >>> import pox
      >>> pox.plus_one = lambda x: x+1
      >>> dill.dump_module('pox_session.pkl', module=pox)

    - Save the state of a non-importable, module-type object:

      >>> import dill
      >>> from types import ModuleType
      >>> foo = ModuleType('foo')
      >>> foo.values = [1,2,3]
      >>> import math
      >>> foo.sin = math.sin
      >>> dill.dump_module('foo_session.pkl', module=foo, refimported=True)

    - Restore the state of the saved modules:

      >>> import dill
      >>> dill.load_module()
      >>> squared(2)
      4
      >>> pox = dill.load_module('pox_session.pkl')
      >>> pox.plus_one(1)
      2
      >>> foo = dill.load_module('foo_session.pkl')
      >>> [foo.sin(x) for x in foo.values]
      [0.8414709848078965, 0.9092974268256817, 0.1411200080598672]

    - Use `refimported` to save imported objects by reference:

      >>> import dill
      >>> from html.entities import html5
      >>> type(html5), len(html5)
      (dict, 2231)
      >>> import io
      >>> buf = io.BytesIO()
      >>> dill.dump_module(buf) # saves __main__, with html5 saved by value
      >>> len(buf.getvalue()) # pickle size in bytes
      71665
      >>> buf = io.BytesIO()
      >>> dill.dump_module(buf, refimported=True) # html5 saved by reference
      >>> len(buf.getvalue())
      438

*Changed in version 0.3.6:* Function ``dump_session()`` was renamed to
``dump_module()``.  Parameters ``main`` and ``byref`` were renamed to
``module`` and ``refimported``, respectively.

Note:
    Currently, ``dill.settings['byref']`` and ``dill.settings['recurse']``
    don't apply to this function.

---
## dump_session
```python
from session import dump_session
```



---
## _PeekableReader
```python
from session import _PeekableReader
```

lightweight stream wrapper that implements peek()

---
## _make_peekable
```python
from session import _make_peekable
```

return stream as an object with a peek() method

---
## _identify_module
```python
from session import _identify_module
```

identify the name of the module stored in the given file-type object

---
## load_module
```python
from session import load_module
```

Update the selected module (default is :py:mod:`__main__`) with
the state saved at ``filename``.

Restore a module to the state saved with :py:func:`dump_module`. The
saved module can be :py:mod:`__main__` (e.g. an interpreter session),
an imported module, or a module-type object (e.g. created with
:py:class:`~types.ModuleType`).

When restoring the state of a non-importable module-type object, the
current instance of this module may be passed as the argument ``main``.
Otherwise, a new instance is created with :py:class:`~types.ModuleType`
and returned.

Args:
    filename: a path-like object or a readable stream. If `None`
        (the default), read from a named file in a temporary directory.
    module: a module object or the name of an importable module;
        the module name and kind (i.e. imported or non-imported) must
        match the name and kind of the module stored at ``filename``.
    **kwds: extra keyword arguments passed to :py:class:`Unpickler()`.

Raises:
    :py:exc:`UnpicklingError`: if unpickling fails.
    :py:exc:`ValueError`: if the argument ``main`` and module saved
        at ``filename`` are incompatible.

Returns:
    A module object, if the saved module is not :py:mod:`__main__` or
    a module instance wasn't provided with the argument ``main``.

Examples:

    - Save the state of some modules:

      >>> import dill
      >>> squared = lambda x: x*x
      >>> dill.dump_module() # save state of __main__ to /tmp/session.pkl
      >>>
      >>> import pox # an imported module
      >>> pox.plus_one = lambda x: x+1
      >>> dill.dump_module('pox_session.pkl', module=pox)
      >>>
      >>> from types import ModuleType
      >>> foo = ModuleType('foo') # a module-type object
      >>> foo.values = [1,2,3]
      >>> import math
      >>> foo.sin = math.sin
      >>> dill.dump_module('foo_session.pkl', module=foo, refimported=True)

    - Restore the state of the interpreter:

      >>> import dill
      >>> dill.load_module() # updates __main__ from /tmp/session.pkl
      >>> squared(2)
      4

    - Load the saved state of an importable module:

      >>> import dill
      >>> pox = dill.load_module('pox_session.pkl')
      >>> pox.plus_one(1)
      2
      >>> import sys
      >>> pox in sys.modules.values()
      True

    - Load the saved state of a non-importable module-type object:

      >>> import dill
      >>> foo = dill.load_module('foo_session.pkl')
      >>> [foo.sin(x) for x in foo.values]
      [0.8414709848078965, 0.9092974268256817, 0.1411200080598672]
      >>> import math
      >>> foo.sin is math.sin # foo.sin was saved by reference
      True
      >>> import sys
      >>> foo in sys.modules.values()
      False

    - Update the state of a non-importable module-type object:

      >>> import dill
      >>> from types import ModuleType
      >>> foo = ModuleType('foo')
      >>> foo.values = ['a','b']
      >>> foo.sin = lambda x: x*x
      >>> dill.load_module('foo_session.pkl', module=foo)
      >>> [foo.sin(x) for x in foo.values]
      [0.8414709848078965, 0.9092974268256817, 0.1411200080598672]

*Changed in version 0.3.6:* Function ``load_session()`` was renamed to
``load_module()``. Parameter ``main`` was renamed to ``module``.

See also:
    :py:func:`load_module_asdict` to load the contents of module saved
    with :py:func:`dump_module` into a dictionary.

---
## load_session
```python
from session import load_session
```



---
## load_module_asdict
```python
from session import load_module_asdict
```

Load the contents of a saved module into a dictionary.

``load_module_asdict()`` is the near-equivalent of::

    lambda filename: vars(dill.load_module(filename)).copy()

however, does not alter the original module. Also, the path of
the loaded module is stored in the ``__session__`` attribute.

Args:
    filename: a path-like object or a readable stream. If `None`
        (the default), read from a named file in a temporary directory.
    update: if `True`, initialize the dictionary with the current state
        of the module prior to loading the state stored at filename.
    **kwds: extra keyword arguments passed to :py:class:`Unpickler()`

Raises:
    :py:exc:`UnpicklingError`: if unpickling fails

Returns:
    A copy of the restored module's dictionary.

Note:
    If ``update`` is True, the corresponding module may first be imported
    into the current namespace before the saved state is loaded from
    filename to the dictionary. Note that any module that is imported into
    the current namespace as a side-effect of using ``update`` will not be
    modified by loading the saved module in filename to a dictionary.

Example:
    >>> import dill
    >>> alist = [1, 2, 3]
    >>> anum = 42
    >>> dill.dump_module()
    >>> anum = 0
    >>> new_var = 'spam'
    >>> main = dill.load_module_asdict()
    >>> main['__name__'], main['__session__']
    ('__main__', '/tmp/session.pkl')
    >>> main is globals() # loaded objects don't reference globals
    False
    >>> main['alist'] == alist
    True
    >>> main['alist'] is alist # was saved by value
    False
    >>> main['anum'] == anum # changed after the session was saved
    False
    >>> new_var in main # would be True if the option 'update' was set
    False

---
## __init__
```python
from session import __init__
```

:param trusted_hosts: Domains not to emit warnings for when not using
HTTPS.

---
## read
```python
from session import read
```



---
## readline
```python
from session import readline
```



---
## tell
```python
from session import tell
```



---
## close
```python
from session import close
```



---
## peek
```python
from session import peek
```



---
## load_types
```python
from __init__ import load_types
```

load pickleable and/or unpickleable types to ``dill.types``

``dill.types`` is meant to mimic the ``types`` module, providing a
registry of object types.  By default, the module is empty (for import
speed purposes). Use the ``load_types`` function to load selected object
types to the ``dill.types`` module.

Args:
    pickleable (bool, default=True): if True, load pickleable types.
    unpickleable (bool, default=True): if True, load unpickleable types.

Returns:
    None

---
## extend
```python
from __init__ import extend
```

add (or remove) dill types to/from the pickle registry

by default, ``dill`` populates its types to ``pickle.Pickler.dispatch``.
Thus, all ``dill`` types are available upon calling ``'import pickle'``.
To drop all ``dill`` types from the ``pickle`` dispatch, *use_dill=False*.

Args:
    use_dill (bool, default=True): if True, extend the dispatch table.

Returns:
    None

---
## TraceAdapter
```python
from logger import TraceAdapter
```

Tracks object tree depth and calculates pickled object size.

A single instance of this wraps the module's logger, as the logging API
doesn't allow setting it directly with a custom Logger subclass.  The added
'trace()' method receives a pickle instance as the first argument and
creates extra values to be added in the LogRecord from it, then calls
'info()'.

Usage of logger with 'trace()' method:

>>> from dill.logger import adapter as logger  #NOTE: not dill.logger.logger
>>> ...
>>> def save_atype(pickler, obj):
>>>     logger.trace(pickler, "Message with %s and %r etc. placeholders", 'text', obj)
>>>     ...

---
## TraceFormatter
```python
from logger import TraceFormatter
```

Generates message prefix and suffix from record.

This Formatter adds prefix and suffix strings to the log message in trace
mode (an also provides empty string defaults for normal logs).

---
## trace
```python
from logger import trace
```



---
## TraceManager
```python
from logger import TraceManager
```

context manager version of trace(); can redirect the trace to a file

---
## __init__
```python
from logger import __init__
```



---
## addHandler
```python
from logger import addHandler
```



---
## removeHandler
```python
from logger import removeHandler
```



---
## process
```python
from logger import process
```



---
## trace_setup
```python
from logger import trace_setup
```



---
## format
```python
from logger import format
```



---
## __enter__
```python
from logger import __enter__
```



---
## __exit__
```python
from logger import __exit__
```



---
## __name__
```python
from temp import __name__
```

Methods for serialized objects (or source code) stored in temporary files
and file-like objects.

---
## capture
```python
from temp import capture
```

builds a context that temporarily replaces the given stream name

>>> with capture('stdout') as out:
...   print ("foo!")
... 
>>> print (out.getvalue())
foo!

---
## b
```python
from temp import b
```



---
## load_source
```python
from temp import load_source
```

load an object that was stored with dill.temp.dump_source

file: filehandle
alias: string name of stored object
mode: mode to open the file, one of: {'r', 'rb'}

>>> f = lambda x: x**2
>>> pyfile = dill.temp.dump_source(f, alias='_f')
>>> _f = dill.temp.load_source(pyfile)
>>> _f(4)
16

---
## dump_source
```python
from temp import dump_source
```

write object source to a NamedTemporaryFile (instead of dill.dump)
Loads with "import" or "dill.temp.load_source".  Returns the filehandle.

    >>> f = lambda x: x**2
    >>> pyfile = dill.temp.dump_source(f, alias='_f')
    >>> _f = dill.temp.load_source(pyfile)
    >>> _f(4)
    16

    >>> f = lambda x: x**2
    >>> pyfile = dill.temp.dump_source(f, dir='.')
    >>> modulename = os.path.basename(pyfile.name).split('.py')[0]
    >>> exec('from %s import f as _f' % modulename)
    >>> _f(4)
    16

Optional kwds:
    If 'alias' is specified, the object will be renamed to the given string.

    If 'prefix' is specified, the file name will begin with that prefix,
    otherwise a default prefix is used.
    
    If 'dir' is specified, the file will be created in that directory,
    otherwise a default directory is used.
    
    If 'text' is specified and true, the file is opened in text
    mode.  Else (the default) the file is opened in binary mode.  On
    some operating systems, this makes no difference.

NOTE: Keep the return value for as long as you want your file to exist !
    

---
## load
```python
from temp import load
```

load an object that was stored with dill.temp.dump

file: filehandle
mode: mode to open the file, one of: {'r', 'rb'}

>>> dumpfile = dill.temp.dump([1, 2, 3, 4, 5])
>>> dill.temp.load(dumpfile)
[1, 2, 3, 4, 5]

---
## dump
```python
from temp import dump
```

dill.dump of object to a NamedTemporaryFile.
Loads with "dill.temp.load".  Returns the filehandle.

    >>> dumpfile = dill.temp.dump([1, 2, 3, 4, 5])
    >>> dill.temp.load(dumpfile)
    [1, 2, 3, 4, 5]

Optional kwds:
    If 'suffix' is specified, the file name will end with that suffix,
    otherwise there will be no suffix.
    
    If 'prefix' is specified, the file name will begin with that prefix,
    otherwise a default prefix is used.
    
    If 'dir' is specified, the file will be created in that directory,
    otherwise a default directory is used.
    
    If 'text' is specified and true, the file is opened in text
    mode.  Else (the default) the file is opened in binary mode.  On
    some operating systems, this makes no difference.

NOTE: Keep the return value for as long as you want your file to exist !
    

---
## loadIO
```python
from temp import loadIO
```

load an object that was stored with dill.temp.dumpIO

buffer: buffer object

>>> dumpfile = dill.temp.dumpIO([1, 2, 3, 4, 5])
>>> dill.temp.loadIO(dumpfile)
[1, 2, 3, 4, 5]

---
## dumpIO
```python
from temp import dumpIO
```

dill.dump of object to a buffer.
Loads with "dill.temp.loadIO".  Returns the buffer object.

    >>> dumpfile = dill.temp.dumpIO([1, 2, 3, 4, 5])
    >>> dill.temp.loadIO(dumpfile)
    [1, 2, 3, 4, 5]
    

---
## loadIO_source
```python
from temp import loadIO_source
```

load an object that was stored with dill.temp.dumpIO_source

buffer: buffer object
alias: string name of stored object

>>> f = lambda x:x**2
>>> pyfile = dill.temp.dumpIO_source(f, alias='_f')
>>> _f = dill.temp.loadIO_source(pyfile)
>>> _f(4)
16

---
## dumpIO_source
```python
from temp import dumpIO_source
```

write object source to a buffer (instead of dill.dump)
Loads by with dill.temp.loadIO_source.  Returns the buffer object.

    >>> f = lambda x:x**2
    >>> pyfile = dill.temp.dumpIO_source(f, alias='_f')
    >>> _f = dill.temp.loadIO_source(pyfile)
    >>> _f(4)
    16

Optional kwds:
    If 'alias' is specified, the object will be renamed to the given string.
    

---
## __name__
```python
from _objects import __name__
```

all Python Standard Library objects (currently: CH 1-15 @ 2.7)
and some other common objects (i.e. numpy.ndarray)

---
## _class
```python
from _objects import _class
```



---
## _class2
```python
from _objects import _class2
```



---
## _newclass
```python
from _objects import _newclass
```



---
## _newclass2
```python
from _objects import _newclass2
```



---
## _function
```python
from _objects import _function
```



---
## _function2
```python
from _objects import _function2
```



---
## _method
```python
from _objects import _method
```



---
## __call__
```python
from _objects import __call__
```



---
## _Struct
```python
from _objects import _Struct
```



---
## __name__
```python
from _dill import __name__
```

Extends `dill` to support pickling more types and produce more consistent dumps.

---
## __hook__
```python
from _dill import __hook__
```



---
## get_file_type
```python
from _dill import get_file_type
```



---
## Sentinel
```python
from _dill import Sentinel
```

Create a unique sentinel object that is pickled as a constant.

---
## copy
```python
from _dill import copy
```

Use pickling to 'copy' an object (i.e. `loads(dumps(obj))`).

See :func:`dumps` and :func:`loads` for keyword arguments.

---
## dump
```python
from _dill import dump
```

Pickle an object to a file.

---
## dumps
```python
from _dill import dumps
```

Pickle an object to a string.

---
## load
```python
from _dill import load
```



---
## loads
```python
from _dill import loads
```

Unpickle an object from a string.

If *ignore=False* then objects whose class is defined in the module
*__main__* are updated to reference the existing class in *__main__*,
otherwise they are left to refer to the reconstructed type, which may
be different.

Default values for keyword arguments can be set in :mod:`dill.settings`.

---
## MetaCatchingDict
```python
from _dill import MetaCatchingDict
```



---
## PickleWarning
```python
from _dill import PickleWarning
```



---
## PicklingWarning
```python
from _dill import PicklingWarning
```



---
## UnpicklingWarning
```python
from _dill import UnpicklingWarning
```



---
## Pickler
```python
from _dill import Pickler
```



---
## Unpickler
```python
from _dill import Unpickler
```

python's Unpickler extended to interpreter sessions and more types

---
## pickle
```python
from _dill import pickle
```

expose :attr:`~Pickler.dispatch` table for user-created extensions

---
## register
```python
from _dill import register
```

decorator to register types to Pickler's :attr:`~Pickler.dispatch` table

---
## _revert_extension
```python
from _dill import _revert_extension
```

drop dill-registered types from pickle's dispatch table

---
## use_diff
```python
from _dill import use_diff
```

Reduces size of pickles by only including object which have changed.

Decreases pickle size but increases CPU time needed.
Also helps avoid some unpickleable objects.
MUST be called at start of script, otherwise changes will not be recorded.

---
## _create_typemap
```python
from _dill import _create_typemap
```



---
## _unmarshal
```python
from _dill import _unmarshal
```



---
## _load_type
```python
from _dill import _load_type
```



---
## _create_type
```python
from _dill import _create_type
```



---
## _create_function
```python
from _dill import _create_function
```



---
## match
```python
from _dill import match
```

Make avaialable a limited structural pattern matching-like syntax for Python < 3.10

Patterns can be only tuples (without types) currently.
Inspired by the package pattern-matching-PEP634.

Usage:
>>> with match(args) as m:
>>>     if   m.case(('x', 'y')):
>>>         # use m.x and m.y
>>>     elif m.case(('x', 'y', 'z')):
>>>         # use m.x, m.y and m.z

Equivalent native code for Python >= 3.10:
>>> match args:
>>>     case (x, y):
>>>         # use x and y
>>>     case (x, y, z):
>>>         # use x, y and z

---
## _create_code
```python
from _dill import _create_code
```



---
## _create_ftype
```python
from _dill import _create_ftype
```



---
## _create_typing_tuple
```python
from _dill import _create_typing_tuple
```



---
## _create_lock
```python
from _dill import _create_lock
```



---
## _create_rlock
```python
from _dill import _create_rlock
```



---
## _create_filehandle
```python
from _dill import _create_filehandle
```



---
## _create_stringi
```python
from _dill import _create_stringi
```



---
## _create_stringo
```python
from _dill import _create_stringo
```



---
## _itemgetter_helper
```python
from _dill import _itemgetter_helper
```



---
## _attrgetter_helper
```python
from _dill import _attrgetter_helper
```



---
## _dictproxy_helper
```python
from _dill import _dictproxy_helper
```



---
## _create_cell
```python
from _dill import _create_cell
```



---
## _create_weakref
```python
from _dill import _create_weakref
```



---
## _create_weakproxy
```python
from _dill import _create_weakproxy
```



---
## _eval_repr
```python
from _dill import _eval_repr
```



---
## _create_array
```python
from _dill import _create_array
```



---
## _create_dtypemeta
```python
from _dill import _create_dtypemeta
```



---
## _create_namedtuple
```python
from _dill import _create_namedtuple
```



---
## _create_capsule
```python
from _dill import _create_capsule
```



---
## _getattr
```python
from _dill import _getattr
```



---
## _get_attr
```python
from _dill import _get_attr
```



---
## _import_module
```python
from _dill import _import_module
```



---
## _getattribute
```python
from _dill import _getattribute
```



---
## _locate_function
```python
from _dill import _locate_function
```



---
## _setitems
```python
from _dill import _setitems
```



---
## _save_with_postproc
```python
from _dill import _save_with_postproc
```



---
## save_code
```python
from _dill import save_code
```



---
## _repr_dict
```python
from _dill import _repr_dict
```

Make a short string representation of a dictionary.

---
## save_module_dict
```python
from _dill import save_module_dict
```



---
## save_classobj
```python
from _dill import save_classobj
```



---
## save_generic_alias
```python
from _dill import save_generic_alias
```



---
## save_lock
```python
from _dill import save_lock
```



---
## save_rlock
```python
from _dill import save_rlock
```



---
## save_socket
```python
from _dill import save_socket
```



---
## _save_file
```python
from _dill import _save_file
```



---
## save_file
```python
from _dill import save_file
```



---
## save_super
```python
from _dill import save_super
```



---
## save_cell
```python
from _dill import save_cell
```



---
## save_slice
```python
from _dill import save_slice
```



---
## save_singleton
```python
from _dill import save_singleton
```



---
## _proxy_helper
```python
from _dill import _proxy_helper
```

get memory address of proxy's reference object

---
## _locate_object
```python
from _dill import _locate_object
```

get object located at the given memory address (inverse of id(obj))

---
## save_weakref
```python
from _dill import save_weakref
```



---
## save_weakproxy
```python
from _dill import save_weakproxy
```



---
## _is_builtin_module
```python
from _dill import _is_builtin_module
```



---
## _is_imported_module
```python
from _dill import _is_imported_module
```



---
## save_module
```python
from _dill import save_module
```



---
## _get_typedict_type
```python
from _dill import _get_typedict_type
```

Retrieve a copy of the dict of a class without the inherited methods

---
## _get_typedict_abc
```python
from _dill import _get_typedict_abc
```



---
## save_type
```python
from _dill import save_type
```



---
## save_property
```python
from _dill import save_property
```



---
## save_classmethod
```python
from _dill import save_classmethod
```



---
## save_function
```python
from _dill import save_function
```



---
## pickles
```python
from _dill import pickles
```

Quick check if object pickles with dill.

If *exact=True* then an equality test is done to check if the reconstructed
object matches the original object.

If *safe=True* then any exception will raised in copy signal that the
object is not picklable, otherwise only pickling errors will be trapped.

Additional keyword arguments are as :func:`dumps` and :func:`loads`.

---
## check
```python
from _dill import check
```

Check pickling of an object across another process.

*python* is the path to the python interpreter (defaults to sys.executable)

Set *verbose=True* to print the unpickled object in the other process.

Additional keyword arguments are as :func:`dumps` and :func:`loads`.

---
## is_dill
```python
from _dill import is_dill
```

check the dill-ness of your pickler

---
## _extend
```python
from _dill import _extend
```

extend pickle with all of dill's registered types

---
## ndarraysubclassinstance
```python
from _dill import ndarraysubclassinstance
```



---
## numpyufunc
```python
from _dill import numpyufunc
```



---
## numpydtype
```python
from _dill import numpydtype
```



---
## __init__
```python
from _dill import __init__
```



---
## __repr__
```python
from _dill import __repr__
```



---
## __copy__
```python
from _dill import __copy__
```



---
## __deepcopy__
```python
from _dill import __deepcopy__
```



---
## __reduce__
```python
from _dill import __reduce__
```



---
## __reduce_ex__
```python
from _dill import __reduce_ex__
```



---
## get
```python
from _dill import get
```



---
## __missing__
```python
from _dill import __missing__
```



---
## save
```python
from _dill import save
```



---
## find_class
```python
from _dill import find_class
```



---
## proxy
```python
from _dill import proxy
```



---
## __enter__
```python
from _dill import __enter__
```



---
## __exit__
```python
from _dill import __exit__
```



---
## case
```python
from _dill import case
```

just handles tuple patterns

---
## fields
```python
from _dill import fields
```



---
## __getattr__
```python
from _dill import __getattr__
```



---
## __getitem__
```python
from _dill import __getitem__
```



---
## __getattribute__
```python
from _dill import __getattribute__
```



---
## __ror__
```python
from _dill import __ror__
```



---
## save_dict_view
```python
from _dill import save_dict_view
```



---
## save_stringi
```python
from _dill import save_stringi
```



---
## save_stringo
```python
from _dill import save_stringo
```



---
## save_lru_cache
```python
from _dill import save_lru_cache
```



---
## save_instancemethod0
```python
from _dill import save_instancemethod0
```



---
## save_wrapper_descriptor
```python
from _dill import save_wrapper_descriptor
```



---
## save_dictproxy
```python
from _dill import save_dictproxy
```



---
## save_capsule
```python
from _dill import save_capsule
```



---
## save_dataclasses_HAS_DEFAULT_FACTORY_CLASS
```python
from _dill import save_dataclasses_HAS_DEFAULT_FACTORY_CLASS
```



---
## save_dataclasses_MISSING_TYPE
```python
from _dill import save_dataclasses_MISSING_TYPE
```



---
## save_dataclasses_KW_ONLY_TYPE
```python
from _dill import save_dataclasses_KW_ONLY_TYPE
```



---
## save_dataclasses_FIELD_BASE
```python
from _dill import save_dataclasses_FIELD_BASE
```



---
## save_dict_view_for_function
```python
from _dill import save_dict_view_for_function
```



---
## save_dict_keys
```python
from _dill import save_dict_keys
```



---
## save_dict_values
```python
from _dill import save_dict_values
```



---
## save_dict_items
```python
from _dill import save_dict_items
```



---
## _save_dict_view
```python
from _dill import _save_dict_view
```



---
## save_numpy_ufunc
```python
from _dill import save_numpy_ufunc
```



---
## save_numpy_dtype
```python
from _dill import save_numpy_dtype
```



---
## save_numpy_array
```python
from _dill import save_numpy_array
```



---
## __name__
```python
from _shims import __name__
```

Provides shims for compatibility between versions of dill and Python.

Compatibility shims should be provided in this file. Here are two simple example
use cases.

Deprecation of constructor function:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assume that we were transitioning _import_module in _dill.py to
the builtin function importlib.import_module when present.

@move_to(_dill)
def _import_module(import_name):
    ... # code already in _dill.py

_import_module = Getattr(importlib, 'import_module', Getattr(_dill, '_import_module', None))

The code will attempt to find import_module in the importlib module. If not
present, it will use the _import_module function in _dill.

Emulate new Python behavior in older Python versions:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CellType.cell_contents behaves differently in Python 3.6 and 3.7. It is
read-only in Python 3.6 and writable and deletable in 3.7.

if _dill.OLD37 and _dill.HAS_CTYPES and ...:
    @move_to(_dill)
    def _setattr(object, name, value):
        if type(object) is _dill.CellType and name == 'cell_contents':
            _PyCell_Set.argtypes = (ctypes.py_object, ctypes.py_object)
            _PyCell_Set(object, value)
        else:
            setattr(object, name, value)
... # more cases below

_setattr = Getattr(_dill, '_setattr', setattr)

_dill._setattr will be used when present to emulate Python 3.7 functionality in
older versions of Python while defaulting to the standard setattr in 3.7+.

See this PR for the discussion that lead to this system:
https://github.com/uqfoundation/dill/pull/443

---
## Reduce
```python
from _shims import Reduce
```

Reduce objects are wrappers used for compatibility enforcement during
unpickle-time. They should only be used in calls to pickler.save and
other Reduce objects. They are only evaluated within unpickler.load.

Pickling a Reduce object makes the two implementations equivalent:

pickler.save(Reduce(*reduction))

pickler.save_reduce(*reduction, obj=reduction)

---
## _CallableReduce
```python
from _shims import _CallableReduce
```



---
## Getattr
```python
from _shims import Getattr
```

A Reduce object that represents the getattr operation. When unpickled, the
Getattr will access an attribute 'name' of 'object' and return the value
stored there. If the attribute doesn't exist, the default value will be
returned if present.

The following statements are equivalent:

Getattr(collections, 'OrderedDict')
Getattr(collections, 'spam', None)
Getattr(*args)

Reduce(getattr, (collections, 'OrderedDict'))
Reduce(getattr, (collections, 'spam', None))
Reduce(getattr, args)

During unpickling, the first two will result in collections.OrderedDict and
None respectively because the first attribute exists and the second one does
not, forcing it to use the default value given in the third argument.

---
## move_to
```python
from _shims import move_to
```



---
## register_shim
```python
from _shims import register_shim
```

A easier to understand and more compact way of "softly" defining a function.
These two pieces of code are equivalent:

if _dill.OLD3X:
    def _create_class():
        ...
_create_class = register_shim('_create_class', types.new_class)

if _dill.OLD3X:
    @move_to(_dill)
    def _create_class():
        ...
_create_class = Getattr(_dill, '_create_class', types.new_class)

Intuitively, it creates a function or object in the versions of dill/python
that require special reimplementations, and use a core library or default
implementation if that function or object does not exist.

---
## __new__
```python
from _shims import __new__
```

Args:
*reduction: a tuple that matches the format given here:
  https://docs.python.org/3/library/pickle.html#object.__reduce__
is_callable: a bool to indicate that the object created by
  unpickling `reduction` is callable. If true, the current Reduce
  is allowed to be used as the function in further save_reduce calls
  or Reduce objects.

---
## __repr__
```python
from _shims import __repr__
```



---
## __copy__
```python
from _shims import __copy__
```



---
## __deepcopy__
```python
from _shims import __deepcopy__
```



---
## __reduce__
```python
from _shims import __reduce__
```



---
## __reduce_ex__
```python
from _shims import __reduce_ex__
```



---
## __call__
```python
from _shims import __call__
```



---
## decorator
```python
from _shims import decorator
```



---
## __name__
```python
from detect import __name__
```

Methods for detecting objects leading to pickling failures.

---
## getmodule
```python
from detect import getmodule
```

get the module of the object

---
## outermost
```python
from detect import outermost
```

get outermost enclosing object (i.e. the outer function in a closure)

NOTE: this is the object-equivalent of getsource(func, enclosing=True)

---
## nestedcode
```python
from detect import nestedcode
```

get the code objects for any nested functions (e.g. in a closure)

---
## code
```python
from detect import code
```

get the code object for the given function or method

NOTE: use dill.source.getsource(CODEOBJ) to get the source code

---
## referrednested
```python
from detect import referrednested
```

get functions defined inside of func (e.g. inner functions in a closure)

NOTE: results may differ if the function has been executed or not.
If len(nestedcode(func)) > len(referrednested(func)), try calling func().
If possible, python builds code objects, but delays building functions
until func() is called.

---
## freevars
```python
from detect import freevars
```

get objects defined in enclosing code that are referred to by func

returns a dict of {name:object}

---
## nestedglobals
```python
from detect import nestedglobals
```

get the names of any globals found within func

---
## referredglobals
```python
from detect import referredglobals
```

get the names of objects in the global scope referred to by func

---
## globalvars
```python
from detect import globalvars
```

get objects defined in global scope that are referred to by func

return a dict of {name:object}

---
## varnames
```python
from detect import varnames
```

get names of variables defined by func

returns a tuple (local vars, local vars referrenced by nested functions)

---
## baditems
```python
from detect import baditems
```

get items in object that fail to pickle

---
## badobjects
```python
from detect import badobjects
```

get objects that fail to pickle

---
## badtypes
```python
from detect import badtypes
```

get types for objects that fail to pickle

---
## errors
```python
from detect import errors
```

get errors for objects that fail to pickle

---
## get_cell_contents
```python
from detect import get_cell_contents
```



---
## __name__
```python
from source import __name__
```



---
## isfrommain
```python
from source import isfrommain
```

check if object was built in __main__

---
## isdynamic
```python
from source import isdynamic
```

check if object was built in the interpreter

---
## _matchlambda
```python
from source import _matchlambda
```

check if lambda object 'func' matches raw line of code 'line'

---
## findsource
```python
from source import findsource
```



---
## getblocks
```python
from source import getblocks
```

Return a list of source lines and starting line number for an object.
Interactively-defined objects refer to lines in the interpreter's history.

If enclosing=True, then also return any enclosing code.
If lstrip=True, ensure there is no indentation in the first line of code.
If locate=True, then also return the line number for the block of code.

DEPRECATED: use 'getsourcelines' instead

---
## getsourcelines
```python
from source import getsourcelines
```

Return a list of source lines and starting line number for an object.
Interactively-defined objects refer to lines in the interpreter's history.

The argument may be a module, class, method, function, traceback, frame,
or code object.  The source code is returned as a list of the lines
corresponding to the object and the line number indicates where in the
original source file the first line of code was found.  An IOError is
raised if the source code cannot be retrieved, while a TypeError is
raised for objects where the source code is unavailable (e.g. builtins).

If lstrip=True, ensure there is no indentation in the first line of code.
If enclosing=True, then also return any enclosing code.

---
## getsource
```python
from source import getsource
```

Return the text of the source code for an object. The source code for
interactively-defined objects are extracted from the interpreter's history.

The argument may be a module, class, method, function, traceback, frame,
or code object.  The source code is returned as a single string.  An
IOError is raised if the source code cannot be retrieved, while a
TypeError is raised for objects where the source code is unavailable
(e.g. builtins).

If alias is provided, then add a line of code that renames the object.
If lstrip=True, ensure there is no indentation in the first line of code.
If enclosing=True, then also return any enclosing code.
If force=True, catch (TypeError,IOError) and try to use import hooks.
If builtin=True, force an import for any builtins

---
## _hascode
```python
from source import _hascode
```

True if object has an attribute that stores it's __code__

---
## _isinstance
```python
from source import _isinstance
```

True if object is a class instance type (and is not a builtin)

---
## _intypes
```python
from source import _intypes
```

check if object is in the 'types' module

---
## _isstring
```python
from source import _isstring
```

check if object is a string-like type

---
## indent
```python
from source import indent
```

Return a copy of the source object with all lines indented by the
given indent-string.

---
## _outdent
```python
from source import _outdent
```

outdent lines of code, accounting for docs and line continuations

---
## outdent
```python
from source import outdent
```

outdent a block of code (default is to strip all leading whitespace)

---
## _wrap
```python
from source import _wrap
```

encapsulate a function and it's __import__ 

---
## _enclose
```python
from source import _enclose
```

create a function enclosure around the source of some object

---
## dumpsource
```python
from source import dumpsource
```

'dump to source', where the code includes a pickled object.

If new=True and object is a class instance, then create a new
instance using the unpacked class source code. If enclose, then
create the object inside a function enclosure (thus minimizing
any global namespace pollution).

---
## getname
```python
from source import getname
```

get the name of the object. for lambdas, get the name of the pointer 

---
## _namespace
```python
from source import _namespace
```

_namespace(obj); return namespace hierarchy (as a list of names)
for the given object.  For an instance, find the class hierarchy.

For example:

>>> from functools import partial
>>> p = partial(int, base=2)
>>> _namespace(p)
['functools', 'partial']

---
## _getimport
```python
from source import _getimport
```

helper to build a likely import string from head and tail of namespace.
('head','tail') are used in the following context: "from head import tail"

If verify=True, then test the import string before returning it.
If builtin=True, then force an import for builtins where possible.
If alias is provided, then rename the object on import.

---
## getimport
```python
from source import getimport
```

get the likely import string for the given object

obj is the object to inspect
If verify=True, then test the import string before returning it.
If builtin=True, then force an import for builtins where possible.
If enclosing=True, get the import for the outermost enclosing callable.
If alias is provided, then rename the object on import.

---
## _importable
```python
from source import _importable
```

get an import string (or the source code) for the given object

This function will attempt to discover the name of the object, or the repr
of the object, or the source code for the object. To attempt to force
discovery of the source code, use source=True, to attempt to force the
use of an import, use source=False; otherwise an import will be sought
for objects not defined in __main__. The intent is to build a string
that can be imported from a python file. obj is the object to inspect.
If alias is provided, then rename the object with the given alias.

If source=True, use these options:
  If enclosing=True, then also return any enclosing code.
  If force=True, catch (TypeError,IOError) and try to use import hooks.
  If lstrip=True, ensure there is no indentation in the first line of code.

If source=False, use these options:
  If enclosing=True, get the import for the outermost enclosing callable.
  If force=True, then don't test the import string before returning it.
  If builtin=True, then force an import for builtins where possible.

---
## _closuredimport
```python
from source import _closuredimport
```

get import for closured objects; return a dict of 'name' and 'import'

---
## _closuredsource
```python
from source import _closuredsource
```

get source code for closured objects; return a dict of 'name'
and 'code blocks'

---
## importable
```python
from source import importable
```

get an importable string (i.e. source code or the import string)
for the given object, including any required objects from the enclosing
and global scope

This function will attempt to discover the name of the object, or the repr
of the object, or the source code for the object. To attempt to force
discovery of the source code, use source=True, to attempt to force the
use of an import, use source=False; otherwise an import will be sought
for objects not defined in __main__. The intent is to build a string
that can be imported from a python file.

obj is the object to inspect. If alias is provided, then rename the
object with the given alias. If builtin=True, then force an import for
builtins where possible.

---
## getimportable
```python
from source import getimportable
```



---
## likely_import
```python
from source import likely_import
```



---
## _likely_import
```python
from source import _likely_import
```



---
## func
```python
from source import func
```



---
## _code_stitcher
```python
from source import _code_stitcher
```

stitch together the strings in tuple 'block'

---
## __name__
```python
from objtypes import __name__
```

all Python Standard Library object types (currently: CH 1-15 @ 2.7)
and some other common object types (i.e. numpy.ndarray)

to load more objects and types, use dill.load_types()

---
## ErrorDetails
```python
from __init__ import ErrorDetails
```



---
## InitErrorDetails
```python
from __init__ import InitErrorDetails
```



---
## ErrorTypeInfo
```python
from __init__ import ErrorTypeInfo
```

Gives information about errors.

---
## MultiHostHost
```python
from __init__ import MultiHostHost
```

A host part of a multi-host URL.

---
## __name__
```python
from core_schema import __name__
```

This module contains definitions to build schemas which `pydantic_core` can
validate and serialize.

---
## CoreConfig
```python
from core_schema import CoreConfig
```

Base class for schema configuration options.

Attributes:
    title: The name of the configuration.
    strict: Whether the configuration should strictly adhere to specified rules.
    extra_fields_behavior: The behavior for handling extra fields.
    typed_dict_total: Whether the TypedDict should be considered total. Default is `True`.
    from_attributes: Whether to use attributes for models, dataclasses, and tagged union keys.
    loc_by_alias: Whether to use the used alias (or first alias for "field required" errors) instead of
        `field_names` to construct error `loc`s. Default is `True`.
    revalidate_instances: Whether instances of models and dataclasses should re-validate. Default is 'never'.
    validate_default: Whether to validate default values during validation. Default is `False`.
    populate_by_name: Whether an aliased field may be populated by its name as given by the model attribute,
        as well as the alias. (Replaces 'allow_population_by_field_name' in Pydantic v1.) Default is `False`.
    str_max_length: The maximum length for string fields.
    str_min_length: The minimum length for string fields.
    str_strip_whitespace: Whether to strip whitespace from string fields.
    str_to_lower: Whether to convert string fields to lowercase.
    str_to_upper: Whether to convert string fields to uppercase.
    allow_inf_nan: Whether to allow infinity and NaN values for float fields. Default is `True`.
    ser_json_timedelta: The serialization option for `timedelta` values. Default is 'iso8601'.
    ser_json_bytes: The serialization option for `bytes` values. Default is 'utf8'.
    ser_json_inf_nan: The serialization option for infinity and NaN values
        in float fields. Default is 'null'.
    val_json_bytes: The validation option for `bytes` values, complementing ser_json_bytes. Default is 'utf8'.
    hide_input_in_errors: Whether to hide input data from `ValidationError` representation.
    validation_error_cause: Whether to add user-python excs to the __cause__ of a ValidationError.
        Requires exceptiongroup backport pre Python 3.11.
    coerce_numbers_to_str: Whether to enable coercion of any `Number` type to `str` (not applicable in `strict` mode).
    regex_engine: The regex engine to use for regex pattern validation. Default is 'rust-regex'. See `StringSchema`.
    cache_strings: Whether to cache strings. Default is `True`, `True` or `'all'` is required to cache strings
        during general validation since validators don't know if they're in a key or a value.

---
## SerializationInfo
```python
from core_schema import SerializationInfo
```



---
## FieldSerializationInfo
```python
from core_schema import FieldSerializationInfo
```



---
## ValidationInfo
```python
from core_schema import ValidationInfo
```

Argument passed to validation functions.

---
## SimpleSerSchema
```python
from core_schema import SimpleSerSchema
```



---
## simple_ser_schema
```python
from core_schema import simple_ser_schema
```

Returns a schema for serialization with a custom type.

Args:
    type: The type to use for serialization

---
## PlainSerializerFunctionSerSchema
```python
from core_schema import PlainSerializerFunctionSerSchema
```



---
## plain_serializer_function_ser_schema
```python
from core_schema import plain_serializer_function_ser_schema
```

Returns a schema for serialization with a function, can be either a "general" or "field" function.

Args:
    function: The function to use for serialization
    is_field_serializer: Whether the serializer is for a field, e.g. takes `model` as the first argument,
        and `info` includes `field_name`
    info_arg: Whether the function takes an `info` argument
    return_schema: Schema to use for serializing return value
    when_used: When the function should be called

---
## SerializerFunctionWrapHandler
```python
from core_schema import SerializerFunctionWrapHandler
```



---
## WrapSerializerFunctionSerSchema
```python
from core_schema import WrapSerializerFunctionSerSchema
```



---
## wrap_serializer_function_ser_schema
```python
from core_schema import wrap_serializer_function_ser_schema
```

Returns a schema for serialization with a wrap function, can be either a "general" or "field" function.

Args:
    function: The function to use for serialization
    is_field_serializer: Whether the serializer is for a field, e.g. takes `model` as the first argument,
        and `info` includes `field_name`
    info_arg: Whether the function takes an `info` argument
    schema: The schema to use for the inner serialization
    return_schema: Schema to use for serializing return value
    when_used: When the function should be called

---
## FormatSerSchema
```python
from core_schema import FormatSerSchema
```



---
## format_ser_schema
```python
from core_schema import format_ser_schema
```

Returns a schema for serialization using python's `format` method.

Args:
    formatting_string: String defining the format to use
    when_used: Same meaning as for [general_function_plain_ser_schema], but with a different default

---
## ToStringSerSchema
```python
from core_schema import ToStringSerSchema
```



---
## to_string_ser_schema
```python
from core_schema import to_string_ser_schema
```

Returns a schema for serialization using python's `str()` / `__str__` method.

Args:
    when_used: Same meaning as for [general_function_plain_ser_schema], but with a different default

---
## ModelSerSchema
```python
from core_schema import ModelSerSchema
```



---
## model_ser_schema
```python
from core_schema import model_ser_schema
```

Returns a schema for serialization using a model.

Args:
    cls: The expected class type, used to generate warnings if the wrong type is passed
    schema: Internal schema to use to serialize the model dict

---
## ComputedField
```python
from core_schema import ComputedField
```



---
## computed_field
```python
from core_schema import computed_field
```

ComputedFields are properties of a model or dataclass that are included in serialization.

Args:
    property_name: The name of the property on the model or dataclass
    return_schema: The schema used for the type returned by the computed field
    alias: The name to use in the serialized output
    metadata: Any other information you want to include with the schema, not used by pydantic-core

---
## AnySchema
```python
from core_schema import AnySchema
```



---
## any_schema
```python
from core_schema import any_schema
```

Returns a schema that matches any value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.any_schema()
v = SchemaValidator(schema)
assert v.validate_python(1) == 1
```

Args:
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## NoneSchema
```python
from core_schema import NoneSchema
```



---
## none_schema
```python
from core_schema import none_schema
```

Returns a schema that matches a None value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.none_schema()
v = SchemaValidator(schema)
assert v.validate_python(None) is None
```

Args:
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## BoolSchema
```python
from core_schema import BoolSchema
```



---
## bool_schema
```python
from core_schema import bool_schema
```

Returns a schema that matches a bool value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.bool_schema()
v = SchemaValidator(schema)
assert v.validate_python('True') is True
```

Args:
    strict: Whether the value should be a bool or a value that can be converted to a bool
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## IntSchema
```python
from core_schema import IntSchema
```



---
## int_schema
```python
from core_schema import int_schema
```

Returns a schema that matches a int value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.int_schema(multiple_of=2, le=6, ge=2)
v = SchemaValidator(schema)
assert v.validate_python('4') == 4
```

Args:
    multiple_of: The value must be a multiple of this number
    le: The value must be less than or equal to this number
    ge: The value must be greater than or equal to this number
    lt: The value must be strictly less than this number
    gt: The value must be strictly greater than this number
    strict: Whether the value should be a int or a value that can be converted to a int
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## FloatSchema
```python
from core_schema import FloatSchema
```



---
## float_schema
```python
from core_schema import float_schema
```

Returns a schema that matches a float value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.float_schema(le=0.8, ge=0.2)
v = SchemaValidator(schema)
assert v.validate_python('0.5') == 0.5
```

Args:
    allow_inf_nan: Whether to allow inf and nan values
    multiple_of: The value must be a multiple of this number
    le: The value must be less than or equal to this number
    ge: The value must be greater than or equal to this number
    lt: The value must be strictly less than this number
    gt: The value must be strictly greater than this number
    strict: Whether the value should be a float or a value that can be converted to a float
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## DecimalSchema
```python
from core_schema import DecimalSchema
```



---
## decimal_schema
```python
from core_schema import decimal_schema
```

Returns a schema that matches a decimal value, e.g.:

```py
from decimal import Decimal
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.decimal_schema(le=0.8, ge=0.2)
v = SchemaValidator(schema)
assert v.validate_python('0.5') == Decimal('0.5')
```

Args:
    allow_inf_nan: Whether to allow inf and nan values
    multiple_of: The value must be a multiple of this number
    le: The value must be less than or equal to this number
    ge: The value must be greater than or equal to this number
    lt: The value must be strictly less than this number
    gt: The value must be strictly greater than this number
    max_digits: The maximum number of decimal digits allowed
    decimal_places: The maximum number of decimal places allowed
    strict: Whether the value should be a float or a value that can be converted to a float
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## ComplexSchema
```python
from core_schema import ComplexSchema
```



---
## complex_schema
```python
from core_schema import complex_schema
```

Returns a schema that matches a complex value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.complex_schema()
v = SchemaValidator(schema)
assert v.validate_python('1+2j') == complex(1, 2)
assert v.validate_python(complex(1, 2)) == complex(1, 2)
```

Args:
    strict: Whether the value should be a complex object instance or a value that can be converted to a complex object
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## StringSchema
```python
from core_schema import StringSchema
```



---
## str_schema
```python
from core_schema import str_schema
```

Returns a schema that matches a string value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.str_schema(max_length=10, min_length=2)
v = SchemaValidator(schema)
assert v.validate_python('hello') == 'hello'
```

Args:
    pattern: A regex pattern that the value must match
    max_length: The value must be at most this length
    min_length: The value must be at least this length
    strip_whitespace: Whether to strip whitespace from the value
    to_lower: Whether to convert the value to lowercase
    to_upper: Whether to convert the value to uppercase
    regex_engine: The regex engine to use for pattern validation. Default is 'rust-regex'.
        - `rust-regex` uses the [`regex`](https://docs.rs/regex) Rust
          crate, which is non-backtracking and therefore more DDoS
          resistant, but does not support all regex features.
        - `python-re` use the [`re`](https://docs.python.org/3/library/re.html) module,
          which supports all regex features, but may be slower.
    strict: Whether the value should be a string or a value that can be converted to a string
    coerce_numbers_to_str: Whether to enable coercion of any `Number` type to `str` (not applicable in `strict` mode).
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## BytesSchema
```python
from core_schema import BytesSchema
```



---
## bytes_schema
```python
from core_schema import bytes_schema
```

Returns a schema that matches a bytes value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.bytes_schema(max_length=10, min_length=2)
v = SchemaValidator(schema)
assert v.validate_python(b'hello') == b'hello'
```

Args:
    max_length: The value must be at most this length
    min_length: The value must be at least this length
    strict: Whether the value should be a bytes or a value that can be converted to a bytes
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## DateSchema
```python
from core_schema import DateSchema
```



---
## date_schema
```python
from core_schema import date_schema
```

Returns a schema that matches a date value, e.g.:

```py
from datetime import date
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.date_schema(le=date(2020, 1, 1), ge=date(2019, 1, 1))
v = SchemaValidator(schema)
assert v.validate_python(date(2019, 6, 1)) == date(2019, 6, 1)
```

Args:
    strict: Whether the value should be a date or a value that can be converted to a date
    le: The value must be less than or equal to this date
    ge: The value must be greater than or equal to this date
    lt: The value must be strictly less than this date
    gt: The value must be strictly greater than this date
    now_op: The value must be in the past or future relative to the current date
    now_utc_offset: The value must be in the past or future relative to the current date with this utc offset
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## TimeSchema
```python
from core_schema import TimeSchema
```



---
## time_schema
```python
from core_schema import time_schema
```

Returns a schema that matches a time value, e.g.:

```py
from datetime import time
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.time_schema(le=time(12, 0, 0), ge=time(6, 0, 0))
v = SchemaValidator(schema)
assert v.validate_python(time(9, 0, 0)) == time(9, 0, 0)
```

Args:
    strict: Whether the value should be a time or a value that can be converted to a time
    le: The value must be less than or equal to this time
    ge: The value must be greater than or equal to this time
    lt: The value must be strictly less than this time
    gt: The value must be strictly greater than this time
    tz_constraint: The value must be timezone aware or naive, or an int to indicate required tz offset
    microseconds_precision: The behavior when seconds have more than 6 digits or microseconds is too large
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## DatetimeSchema
```python
from core_schema import DatetimeSchema
```



---
## datetime_schema
```python
from core_schema import datetime_schema
```

Returns a schema that matches a datetime value, e.g.:

```py
from datetime import datetime
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.datetime_schema()
v = SchemaValidator(schema)
now = datetime.now()
assert v.validate_python(str(now)) == now
```

Args:
    strict: Whether the value should be a datetime or a value that can be converted to a datetime
    le: The value must be less than or equal to this datetime
    ge: The value must be greater than or equal to this datetime
    lt: The value must be strictly less than this datetime
    gt: The value must be strictly greater than this datetime
    now_op: The value must be in the past or future relative to the current datetime
    tz_constraint: The value must be timezone aware or naive, or an int to indicate required tz offset
        TODO: use of a tzinfo where offset changes based on the datetime is not yet supported
    now_utc_offset: The value must be in the past or future relative to the current datetime with this utc offset
    microseconds_precision: The behavior when seconds have more than 6 digits or microseconds is too large
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## TimedeltaSchema
```python
from core_schema import TimedeltaSchema
```



---
## timedelta_schema
```python
from core_schema import timedelta_schema
```

Returns a schema that matches a timedelta value, e.g.:

```py
from datetime import timedelta
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.timedelta_schema(le=timedelta(days=1), ge=timedelta(days=0))
v = SchemaValidator(schema)
assert v.validate_python(timedelta(hours=12)) == timedelta(hours=12)
```

Args:
    strict: Whether the value should be a timedelta or a value that can be converted to a timedelta
    le: The value must be less than or equal to this timedelta
    ge: The value must be greater than or equal to this timedelta
    lt: The value must be strictly less than this timedelta
    gt: The value must be strictly greater than this timedelta
    microseconds_precision: The behavior when seconds have more than 6 digits or microseconds is too large
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## LiteralSchema
```python
from core_schema import LiteralSchema
```



---
## literal_schema
```python
from core_schema import literal_schema
```

Returns a schema that matches a literal value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.literal_schema(['hello', 'world'])
v = SchemaValidator(schema)
assert v.validate_python('hello') == 'hello'
```

Args:
    expected: The value must be one of these values
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## EnumSchema
```python
from core_schema import EnumSchema
```



---
## enum_schema
```python
from core_schema import enum_schema
```

Returns a schema that matches an enum value, e.g.:

```py
from enum import Enum
from pydantic_core import SchemaValidator, core_schema

class Color(Enum):
    RED = 1
    GREEN = 2
    BLUE = 3

schema = core_schema.enum_schema(Color, list(Color.__members__.values()))
v = SchemaValidator(schema)
assert v.validate_python(2) is Color.GREEN
```

Args:
    cls: The enum class
    members: The members of the enum, generally `list(MyEnum.__members__.values())`
    sub_type: The type of the enum, either 'str' or 'int' or None for plain enums
    missing: A function to use when the value is not found in the enum, from `_missing_`
    strict: Whether to use strict mode, defaults to False
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## IsInstanceSchema
```python
from core_schema import IsInstanceSchema
```



---
## is_instance_schema
```python
from core_schema import is_instance_schema
```

Returns a schema that checks if a value is an instance of a class, equivalent to python's `isinstance` method, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

class A:
    pass

schema = core_schema.is_instance_schema(cls=A)
v = SchemaValidator(schema)
v.validate_python(A())
```

Args:
    cls: The value must be an instance of this class
    cls_repr: If provided this string is used in the validator name instead of `repr(cls)`
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## IsSubclassSchema
```python
from core_schema import IsSubclassSchema
```



---
## is_subclass_schema
```python
from core_schema import is_subclass_schema
```

Returns a schema that checks if a value is a subtype of a class, equivalent to python's `issubclass` method, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

class A:
    pass

class B(A):
    pass

schema = core_schema.is_subclass_schema(cls=A)
v = SchemaValidator(schema)
v.validate_python(B)
```

Args:
    cls: The value must be a subclass of this class
    cls_repr: If provided this string is used in the validator name instead of `repr(cls)`
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## CallableSchema
```python
from core_schema import CallableSchema
```



---
## callable_schema
```python
from core_schema import callable_schema
```

Returns a schema that checks if a value is callable, equivalent to python's `callable` method, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.callable_schema()
v = SchemaValidator(schema)
v.validate_python(min)
```

Args:
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## UuidSchema
```python
from core_schema import UuidSchema
```



---
## uuid_schema
```python
from core_schema import uuid_schema
```



---
## IncExSeqSerSchema
```python
from core_schema import IncExSeqSerSchema
```



---
## filter_seq_schema
```python
from core_schema import filter_seq_schema
```



---
## ListSchema
```python
from core_schema import ListSchema
```



---
## list_schema
```python
from core_schema import list_schema
```

Returns a schema that matches a list value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.list_schema(core_schema.int_schema(), min_length=0, max_length=10)
v = SchemaValidator(schema)
assert v.validate_python(['4']) == [4]
```

Args:
    items_schema: The value must be a list of items that match this schema
    min_length: The value must be a list with at least this many items
    max_length: The value must be a list with at most this many items
    fail_fast: Stop validation on the first error
    strict: The value must be a list with exactly this many items
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## tuple_positional_schema
```python
from core_schema import tuple_positional_schema
```

Returns a schema that matches a tuple of schemas, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.tuple_positional_schema(
    [core_schema.int_schema(), core_schema.str_schema()]
)
v = SchemaValidator(schema)
assert v.validate_python((1, 'hello')) == (1, 'hello')
```

Args:
    items_schema: The value must be a tuple with items that match these schemas
    extras_schema: The value must be a tuple with items that match this schema
        This was inspired by JSON schema's `prefixItems` and `items` fields.
        In python's `typing.Tuple`, you can't specify a type for "extra" items -- they must all be the same type
        if the length is variable. So this field won't be set from a `typing.Tuple` annotation on a pydantic model.
    strict: The value must be a tuple with exactly this many items
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## tuple_variable_schema
```python
from core_schema import tuple_variable_schema
```

Returns a schema that matches a tuple of a given schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.tuple_variable_schema(
    items_schema=core_schema.int_schema(), min_length=0, max_length=10
)
v = SchemaValidator(schema)
assert v.validate_python(('1', 2, 3)) == (1, 2, 3)
```

Args:
    items_schema: The value must be a tuple with items that match this schema
    min_length: The value must be a tuple with at least this many items
    max_length: The value must be a tuple with at most this many items
    strict: The value must be a tuple with exactly this many items
    ref: Optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## TupleSchema
```python
from core_schema import TupleSchema
```



---
## tuple_schema
```python
from core_schema import tuple_schema
```

Returns a schema that matches a tuple of schemas, with an optional variadic item, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.tuple_schema(
    [core_schema.int_schema(), core_schema.str_schema(), core_schema.float_schema()],
    variadic_item_index=1,
)
v = SchemaValidator(schema)
assert v.validate_python((1, 'hello', 'world', 1.5)) == (1, 'hello', 'world', 1.5)
```

Args:
    items_schema: The value must be a tuple with items that match these schemas
    variadic_item_index: The index of the schema in `items_schema` to be treated as variadic (following PEP 646)
    min_length: The value must be a tuple with at least this many items
    max_length: The value must be a tuple with at most this many items
    fail_fast: Stop validation on the first error
    strict: The value must be a tuple with exactly this many items
    ref: Optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## SetSchema
```python
from core_schema import SetSchema
```



---
## set_schema
```python
from core_schema import set_schema
```

Returns a schema that matches a set of a given schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.set_schema(
    items_schema=core_schema.int_schema(), min_length=0, max_length=10
)
v = SchemaValidator(schema)
assert v.validate_python({1, '2', 3}) == {1, 2, 3}
```

Args:
    items_schema: The value must be a set with items that match this schema
    min_length: The value must be a set with at least this many items
    max_length: The value must be a set with at most this many items
    fail_fast: Stop validation on the first error
    strict: The value must be a set with exactly this many items
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## FrozenSetSchema
```python
from core_schema import FrozenSetSchema
```



---
## frozenset_schema
```python
from core_schema import frozenset_schema
```

Returns a schema that matches a frozenset of a given schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.frozenset_schema(
    items_schema=core_schema.int_schema(), min_length=0, max_length=10
)
v = SchemaValidator(schema)
assert v.validate_python(frozenset(range(3))) == frozenset({0, 1, 2})
```

Args:
    items_schema: The value must be a frozenset with items that match this schema
    min_length: The value must be a frozenset with at least this many items
    max_length: The value must be a frozenset with at most this many items
    fail_fast: Stop validation on the first error
    strict: The value must be a frozenset with exactly this many items
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## GeneratorSchema
```python
from core_schema import GeneratorSchema
```



---
## generator_schema
```python
from core_schema import generator_schema
```

Returns a schema that matches a generator value, e.g.:

```py
from typing import Iterator
from pydantic_core import SchemaValidator, core_schema

def gen() -> Iterator[int]:
    yield 1

schema = core_schema.generator_schema(items_schema=core_schema.int_schema())
v = SchemaValidator(schema)
v.validate_python(gen())
```

Unlike other types, validated generators do not raise ValidationErrors eagerly,
but instead will raise a ValidationError when a violating value is actually read from the generator.
This is to ensure that "validated" generators retain the benefit of lazy evaluation.

Args:
    items_schema: The value must be a generator with items that match this schema
    min_length: The value must be a generator that yields at least this many items
    max_length: The value must be a generator that yields at most this many items
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## IncExDictSerSchema
```python
from core_schema import IncExDictSerSchema
```



---
## filter_dict_schema
```python
from core_schema import filter_dict_schema
```



---
## DictSchema
```python
from core_schema import DictSchema
```



---
## dict_schema
```python
from core_schema import dict_schema
```

Returns a schema that matches a dict value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.dict_schema(
    keys_schema=core_schema.str_schema(), values_schema=core_schema.int_schema()
)
v = SchemaValidator(schema)
assert v.validate_python({'a': '1', 'b': 2}) == {'a': 1, 'b': 2}
```

Args:
    keys_schema: The value must be a dict with keys that match this schema
    values_schema: The value must be a dict with values that match this schema
    min_length: The value must be a dict with at least this many items
    max_length: The value must be a dict with at most this many items
    strict: Whether the keys and values should be validated with strict mode
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## NoInfoValidatorFunctionSchema
```python
from core_schema import NoInfoValidatorFunctionSchema
```



---
## WithInfoValidatorFunctionSchema
```python
from core_schema import WithInfoValidatorFunctionSchema
```



---
## _ValidatorFunctionSchema
```python
from core_schema import _ValidatorFunctionSchema
```



---
## BeforeValidatorFunctionSchema
```python
from core_schema import BeforeValidatorFunctionSchema
```



---
## no_info_before_validator_function
```python
from core_schema import no_info_before_validator_function
```

Returns a schema that calls a validator function before validating, no `info` argument is provided, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: bytes) -> str:
    return v.decode() + 'world'

func_schema = core_schema.no_info_before_validator_function(
    function=fn, schema=core_schema.str_schema()
)
schema = core_schema.typed_dict_schema({'a': core_schema.typed_dict_field(func_schema)})

v = SchemaValidator(schema)
assert v.validate_python({'a': b'hello '}) == {'a': 'hello world'}
```

Args:
    function: The validator function to call
    schema: The schema to validate the output of the validator function
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## with_info_before_validator_function
```python
from core_schema import with_info_before_validator_function
```

Returns a schema that calls a validator function before validation, the function is called with
an `info` argument, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: bytes, info: core_schema.ValidationInfo) -> str:
    assert info.data is not None
    assert info.field_name is not None
    return v.decode() + 'world'

func_schema = core_schema.with_info_before_validator_function(
    function=fn, schema=core_schema.str_schema(), field_name='a'
)
schema = core_schema.typed_dict_schema({'a': core_schema.typed_dict_field(func_schema)})

v = SchemaValidator(schema)
assert v.validate_python({'a': b'hello '}) == {'a': 'hello world'}
```

Args:
    function: The validator function to call
    field_name: The name of the field
    schema: The schema to validate the output of the validator function
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## AfterValidatorFunctionSchema
```python
from core_schema import AfterValidatorFunctionSchema
```



---
## no_info_after_validator_function
```python
from core_schema import no_info_after_validator_function
```

Returns a schema that calls a validator function after validating, no `info` argument is provided, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str) -> str:
    return v + 'world'

func_schema = core_schema.no_info_after_validator_function(fn, core_schema.str_schema())
schema = core_schema.typed_dict_schema({'a': core_schema.typed_dict_field(func_schema)})

v = SchemaValidator(schema)
assert v.validate_python({'a': b'hello '}) == {'a': 'hello world'}
```

Args:
    function: The validator function to call after the schema is validated
    schema: The schema to validate before the validator function
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## with_info_after_validator_function
```python
from core_schema import with_info_after_validator_function
```

Returns a schema that calls a validator function after validation, the function is called with
an `info` argument, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str, info: core_schema.ValidationInfo) -> str:
    assert info.data is not None
    assert info.field_name is not None
    return v + 'world'

func_schema = core_schema.with_info_after_validator_function(
    function=fn, schema=core_schema.str_schema(), field_name='a'
)
schema = core_schema.typed_dict_schema({'a': core_schema.typed_dict_field(func_schema)})

v = SchemaValidator(schema)
assert v.validate_python({'a': b'hello '}) == {'a': 'hello world'}
```

Args:
    function: The validator function to call after the schema is validated
    schema: The schema to validate before the validator function
    field_name: The name of the field this validators is applied to, if any
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## ValidatorFunctionWrapHandler
```python
from core_schema import ValidatorFunctionWrapHandler
```



---
## NoInfoWrapValidatorFunctionSchema
```python
from core_schema import NoInfoWrapValidatorFunctionSchema
```



---
## WithInfoWrapValidatorFunctionSchema
```python
from core_schema import WithInfoWrapValidatorFunctionSchema
```



---
## WrapValidatorFunctionSchema
```python
from core_schema import WrapValidatorFunctionSchema
```



---
## no_info_wrap_validator_function
```python
from core_schema import no_info_wrap_validator_function
```

Returns a schema which calls a function with a `validator` callable argument which can
optionally be used to call inner validation with the function logic, this is much like the
"onion" implementation of middleware in many popular web frameworks, no `info` argument is passed, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(
    v: str,
    validator: core_schema.ValidatorFunctionWrapHandler,
) -> str:
    return validator(input_value=v) + 'world'

schema = core_schema.no_info_wrap_validator_function(
    function=fn, schema=core_schema.str_schema()
)
v = SchemaValidator(schema)
assert v.validate_python('hello ') == 'hello world'
```

Args:
    function: The validator function to call
    schema: The schema to validate the output of the validator function
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## with_info_wrap_validator_function
```python
from core_schema import with_info_wrap_validator_function
```

Returns a schema which calls a function with a `validator` callable argument which can
optionally be used to call inner validation with the function logic, this is much like the
"onion" implementation of middleware in many popular web frameworks, an `info` argument is also passed, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(
    v: str,
    validator: core_schema.ValidatorFunctionWrapHandler,
    info: core_schema.ValidationInfo,
) -> str:
    return validator(input_value=v) + 'world'

schema = core_schema.with_info_wrap_validator_function(
    function=fn, schema=core_schema.str_schema()
)
v = SchemaValidator(schema)
assert v.validate_python('hello ') == 'hello world'
```

Args:
    function: The validator function to call
    schema: The schema to validate the output of the validator function
    field_name: The name of the field this validators is applied to, if any
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## PlainValidatorFunctionSchema
```python
from core_schema import PlainValidatorFunctionSchema
```



---
## no_info_plain_validator_function
```python
from core_schema import no_info_plain_validator_function
```

Returns a schema that uses the provided function for validation, no `info` argument is passed, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str) -> str:
    assert 'hello' in v
    return v + 'world'

schema = core_schema.no_info_plain_validator_function(function=fn)
v = SchemaValidator(schema)
assert v.validate_python('hello ') == 'hello world'
```

Args:
    function: The validator function to call
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## with_info_plain_validator_function
```python
from core_schema import with_info_plain_validator_function
```

Returns a schema that uses the provided function for validation, an `info` argument is passed, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str, info: core_schema.ValidationInfo) -> str:
    assert 'hello' in v
    return v + 'world'

schema = core_schema.with_info_plain_validator_function(function=fn)
v = SchemaValidator(schema)
assert v.validate_python('hello ') == 'hello world'
```

Args:
    function: The validator function to call
    field_name: The name of the field this validators is applied to, if any
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## WithDefaultSchema
```python
from core_schema import WithDefaultSchema
```



---
## with_default_schema
```python
from core_schema import with_default_schema
```

Returns a schema that adds a default value to the given schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.with_default_schema(core_schema.str_schema(), default='hello')
wrapper_schema = core_schema.typed_dict_schema(
    {'a': core_schema.typed_dict_field(schema)}
)
v = SchemaValidator(wrapper_schema)
assert v.validate_python({}) == v.validate_python({'a': 'hello'})
```

Args:
    schema: The schema to add a default value to
    default: The default value to use
    default_factory: A function that returns the default value to use
    on_error: What to do if the schema validation fails. One of 'raise', 'omit', 'default'
    validate_default: Whether the default value should be validated
    strict: Whether the underlying schema should be validated with strict mode
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## NullableSchema
```python
from core_schema import NullableSchema
```



---
## nullable_schema
```python
from core_schema import nullable_schema
```

Returns a schema that matches a nullable value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.nullable_schema(core_schema.str_schema())
v = SchemaValidator(schema)
assert v.validate_python(None) is None
```

Args:
    schema: The schema to wrap
    strict: Whether the underlying schema should be validated with strict mode
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## UnionSchema
```python
from core_schema import UnionSchema
```



---
## union_schema
```python
from core_schema import union_schema
```

Returns a schema that matches a union value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.union_schema([core_schema.str_schema(), core_schema.int_schema()])
v = SchemaValidator(schema)
assert v.validate_python('hello') == 'hello'
assert v.validate_python(1) == 1
```

Args:
    choices: The schemas to match. If a tuple, the second item is used as the label for the case.
    auto_collapse: whether to automatically collapse unions with one element to the inner validator, default true
    custom_error_type: The custom error type to use if the validation fails
    custom_error_message: The custom error message to use if the validation fails
    custom_error_context: The custom error context to use if the validation fails
    mode: How to select which choice to return
        * `smart` (default) will try to return the choice which is the closest match to the input value
        * `left_to_right` will return the first choice in `choices` which succeeds validation
    strict: Whether the underlying schemas should be validated with strict mode
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## TaggedUnionSchema
```python
from core_schema import TaggedUnionSchema
```



---
## tagged_union_schema
```python
from core_schema import tagged_union_schema
```

Returns a schema that matches a tagged union value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

apple_schema = core_schema.typed_dict_schema(
    {
        'foo': core_schema.typed_dict_field(core_schema.str_schema()),
        'bar': core_schema.typed_dict_field(core_schema.int_schema()),
    }
)
banana_schema = core_schema.typed_dict_schema(
    {
        'foo': core_schema.typed_dict_field(core_schema.str_schema()),
        'spam': core_schema.typed_dict_field(
            core_schema.list_schema(items_schema=core_schema.int_schema())
        ),
    }
)
schema = core_schema.tagged_union_schema(
    choices={
        'apple': apple_schema,
        'banana': banana_schema,
    },
    discriminator='foo',
)
v = SchemaValidator(schema)
assert v.validate_python({'foo': 'apple', 'bar': '123'}) == {'foo': 'apple', 'bar': 123}
assert v.validate_python({'foo': 'banana', 'spam': [1, 2, 3]}) == {
    'foo': 'banana',
    'spam': [1, 2, 3],
}
```

Args:
    choices: The schemas to match
        When retrieving a schema from `choices` using the discriminator value, if the value is a str,
        it should be fed back into the `choices` map until a schema is obtained
        (This approach is to prevent multiple ownership of a single schema in Rust)
    discriminator: The discriminator to use to determine the schema to use
        * If `discriminator` is a str, it is the name of the attribute to use as the discriminator
        * If `discriminator` is a list of int/str, it should be used as a "path" to access the discriminator
        * If `discriminator` is a list of lists, each inner list is a path, and the first path that exists is used
        * If `discriminator` is a callable, it should return the discriminator when called on the value to validate;
          the callable can return `None` to indicate that there is no matching discriminator present on the input
    custom_error_type: The custom error type to use if the validation fails
    custom_error_message: The custom error message to use if the validation fails
    custom_error_context: The custom error context to use if the validation fails
    strict: Whether the underlying schemas should be validated with strict mode
    from_attributes: Whether to use the attributes of the object to retrieve the discriminator value
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## ChainSchema
```python
from core_schema import ChainSchema
```



---
## chain_schema
```python
from core_schema import chain_schema
```

Returns a schema that chains the provided validation schemas, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str, info: core_schema.ValidationInfo) -> str:
    assert 'hello' in v
    return v + ' world'

fn_schema = core_schema.with_info_plain_validator_function(function=fn)
schema = core_schema.chain_schema(
    [fn_schema, fn_schema, fn_schema, core_schema.str_schema()]
)
v = SchemaValidator(schema)
assert v.validate_python('hello') == 'hello world world world'
```

Args:
    steps: The schemas to chain
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## LaxOrStrictSchema
```python
from core_schema import LaxOrStrictSchema
```



---
## lax_or_strict_schema
```python
from core_schema import lax_or_strict_schema
```

Returns a schema that uses the lax or strict schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

def fn(v: str, info: core_schema.ValidationInfo) -> str:
    assert 'hello' in v
    return v + ' world'

lax_schema = core_schema.int_schema(strict=False)
strict_schema = core_schema.int_schema(strict=True)

schema = core_schema.lax_or_strict_schema(
    lax_schema=lax_schema, strict_schema=strict_schema, strict=True
)
v = SchemaValidator(schema)
assert v.validate_python(123) == 123

schema = core_schema.lax_or_strict_schema(
    lax_schema=lax_schema, strict_schema=strict_schema, strict=False
)
v = SchemaValidator(schema)
assert v.validate_python('123') == 123
```

Args:
    lax_schema: The lax schema to use
    strict_schema: The strict schema to use
    strict: Whether the strict schema should be used
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## JsonOrPythonSchema
```python
from core_schema import JsonOrPythonSchema
```



---
## json_or_python_schema
```python
from core_schema import json_or_python_schema
```

Returns a schema that uses the Json or Python schema depending on the input:

```py
from pydantic_core import SchemaValidator, ValidationError, core_schema

v = SchemaValidator(
    core_schema.json_or_python_schema(
        json_schema=core_schema.int_schema(),
        python_schema=core_schema.int_schema(strict=True),
    )
)

assert v.validate_json('"123"') == 123

try:
    v.validate_python('123')
except ValidationError:
    pass
else:
    raise AssertionError('Validation should have failed')
```

Args:
    json_schema: The schema to use for Json inputs
    python_schema: The schema to use for Python inputs
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## TypedDictField
```python
from core_schema import TypedDictField
```



---
## typed_dict_field
```python
from core_schema import typed_dict_field
```

Returns a schema that matches a typed dict field, e.g.:

```py
from pydantic_core import core_schema

field = core_schema.typed_dict_field(schema=core_schema.int_schema(), required=True)
```

Args:
    schema: The schema to use for the field
    required: Whether the field is required
    validation_alias: The alias(es) to use to find the field in the validation data
    serialization_alias: The alias to use as a key when serializing
    serialization_exclude: Whether to exclude the field when serializing
    metadata: Any other information you want to include with the schema, not used by pydantic-core

---
## TypedDictSchema
```python
from core_schema import TypedDictSchema
```



---
## typed_dict_schema
```python
from core_schema import typed_dict_schema
```

Returns a schema that matches a typed dict, e.g.:

```py
from typing_extensions import TypedDict

from pydantic_core import SchemaValidator, core_schema

class MyTypedDict(TypedDict):
    a: str

wrapper_schema = core_schema.typed_dict_schema(
    {'a': core_schema.typed_dict_field(core_schema.str_schema())}, cls=MyTypedDict
)
v = SchemaValidator(wrapper_schema)
assert v.validate_python({'a': 'hello'}) == {'a': 'hello'}
```

Args:
    fields: The fields to use for the typed dict
    cls: The class to use for the typed dict
    computed_fields: Computed fields to use when serializing the model, only applies when directly inside a model
    strict: Whether the typed dict is strict
    extras_schema: The extra validator to use for the typed dict
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    extra_behavior: The extra behavior to use for the typed dict
    total: Whether the typed dict is total
    populate_by_name: Whether the typed dict should populate by name
    serialization: Custom serialization schema

---
## ModelField
```python
from core_schema import ModelField
```



---
## model_field
```python
from core_schema import model_field
```

Returns a schema for a model field, e.g.:

```py
from pydantic_core import core_schema

field = core_schema.model_field(schema=core_schema.int_schema())
```

Args:
    schema: The schema to use for the field
    validation_alias: The alias(es) to use to find the field in the validation data
    serialization_alias: The alias to use as a key when serializing
    serialization_exclude: Whether to exclude the field when serializing
    frozen: Whether the field is frozen
    metadata: Any other information you want to include with the schema, not used by pydantic-core

---
## ModelFieldsSchema
```python
from core_schema import ModelFieldsSchema
```



---
## model_fields_schema
```python
from core_schema import model_fields_schema
```

Returns a schema that matches a typed dict, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

wrapper_schema = core_schema.model_fields_schema(
    {'a': core_schema.model_field(core_schema.str_schema())}
)
v = SchemaValidator(wrapper_schema)
print(v.validate_python({'a': 'hello'}))
#> ({'a': 'hello'}, None, {'a'})
```

Args:
    fields: The fields to use for the typed dict
    model_name: The name of the model, used for error messages, defaults to "Model"
    computed_fields: Computed fields to use when serializing the model, only applies when directly inside a model
    strict: Whether the typed dict is strict
    extras_schema: The extra validator to use for the typed dict
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    extra_behavior: The extra behavior to use for the typed dict
    populate_by_name: Whether the typed dict should populate by name
    from_attributes: Whether the typed dict should be populated from attributes
    serialization: Custom serialization schema

---
## ModelSchema
```python
from core_schema import ModelSchema
```



---
## model_schema
```python
from core_schema import model_schema
```

A model schema generally contains a typed-dict schema.
It will run the typed dict validator, then create a new class
and set the dict and fields set returned from the typed dict validator
to `__dict__` and `__pydantic_fields_set__` respectively.

Example:

```py
from pydantic_core import CoreConfig, SchemaValidator, core_schema

class MyModel:
    __slots__ = (
        '__dict__',
        '__pydantic_fields_set__',
        '__pydantic_extra__',
        '__pydantic_private__',
    )

schema = core_schema.model_schema(
    cls=MyModel,
    config=CoreConfig(str_max_length=5),
    schema=core_schema.model_fields_schema(
        fields={'a': core_schema.model_field(core_schema.str_schema())},
    ),
)
v = SchemaValidator(schema)
assert v.isinstance_python({'a': 'hello'}) is True
assert v.isinstance_python({'a': 'too long'}) is False
```

Args:
    cls: The class to use for the model
    schema: The schema to use for the model
    custom_init: Whether the model has a custom init method
    root_model: Whether the model is a `RootModel`
    post_init: The call after init to use for the model
    revalidate_instances: whether instances of models and dataclasses (including subclass instances)
        should re-validate defaults to config.revalidate_instances, else 'never'
    strict: Whether the model is strict
    frozen: Whether the model is frozen
    extra_behavior: The extra behavior to use for the model, used in serialization
    config: The config to use for the model
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## DataclassField
```python
from core_schema import DataclassField
```



---
## dataclass_field
```python
from core_schema import dataclass_field
```

Returns a schema for a dataclass field, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

field = core_schema.dataclass_field(
    name='a', schema=core_schema.str_schema(), kw_only=False
)
schema = core_schema.dataclass_args_schema('Foobar', [field])
v = SchemaValidator(schema)
assert v.validate_python({'a': 'hello'}) == ({'a': 'hello'}, None)
```

Args:
    name: The name to use for the argument parameter
    schema: The schema to use for the argument parameter
    kw_only: Whether the field can be set with a positional argument as well as a keyword argument
    init: Whether the field should be validated during initialization
    init_only: Whether the field should be omitted  from `__dict__` and passed to `__post_init__`
    validation_alias: The alias(es) to use to find the field in the validation data
    serialization_alias: The alias to use as a key when serializing
    serialization_exclude: Whether to exclude the field when serializing
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    frozen: Whether the field is frozen

---
## DataclassArgsSchema
```python
from core_schema import DataclassArgsSchema
```



---
## dataclass_args_schema
```python
from core_schema import dataclass_args_schema
```

Returns a schema for validating dataclass arguments, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

field_a = core_schema.dataclass_field(
    name='a', schema=core_schema.str_schema(), kw_only=False
)
field_b = core_schema.dataclass_field(
    name='b', schema=core_schema.bool_schema(), kw_only=False
)
schema = core_schema.dataclass_args_schema('Foobar', [field_a, field_b])
v = SchemaValidator(schema)
assert v.validate_python({'a': 'hello', 'b': True}) == ({'a': 'hello', 'b': True}, None)
```

Args:
    dataclass_name: The name of the dataclass being validated
    fields: The fields to use for the dataclass
    computed_fields: Computed fields to use when serializing the dataclass
    populate_by_name: Whether to populate by name
    collect_init_only: Whether to collect init only fields into a dict to pass to `__post_init__`
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema
    extra_behavior: How to handle extra fields

---
## DataclassSchema
```python
from core_schema import DataclassSchema
```



---
## dataclass_schema
```python
from core_schema import dataclass_schema
```

Returns a schema for a dataclass. As with `ModelSchema`, this schema can only be used as a field within
another schema, not as the root type.

Args:
    cls: The dataclass type, used to perform subclass checks
    schema: The schema to use for the dataclass fields
    fields: Fields of the dataclass, this is used in serialization and in validation during re-validation
        and while validating assignment
    cls_name: The name to use in error locs, etc; this is useful for generics (default: `cls.__name__`)
    post_init: Whether to call `__post_init__` after validation
    revalidate_instances: whether instances of models and dataclasses (including subclass instances)
        should re-validate defaults to config.revalidate_instances, else 'never'
    strict: Whether to require an exact instance of `cls`
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema
    frozen: Whether the dataclass is frozen
    slots: Whether `slots=True` on the dataclass, means each field is assigned independently, rather than
        simply setting `__dict__`, default false

---
## ArgumentsParameter
```python
from core_schema import ArgumentsParameter
```



---
## arguments_parameter
```python
from core_schema import arguments_parameter
```

Returns a schema that matches an argument parameter, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

param = core_schema.arguments_parameter(
    name='a', schema=core_schema.str_schema(), mode='positional_only'
)
schema = core_schema.arguments_schema([param])
v = SchemaValidator(schema)
assert v.validate_python(('hello',)) == (('hello',), {})
```

Args:
    name: The name to use for the argument parameter
    schema: The schema to use for the argument parameter
    mode: The mode to use for the argument parameter
    alias: The alias to use for the argument parameter

---
## ArgumentsSchema
```python
from core_schema import ArgumentsSchema
```



---
## arguments_schema
```python
from core_schema import arguments_schema
```

Returns a schema that matches an arguments schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

param_a = core_schema.arguments_parameter(
    name='a', schema=core_schema.str_schema(), mode='positional_only'
)
param_b = core_schema.arguments_parameter(
    name='b', schema=core_schema.bool_schema(), mode='positional_only'
)
schema = core_schema.arguments_schema([param_a, param_b])
v = SchemaValidator(schema)
assert v.validate_python(('hello', True)) == (('hello', True), {})
```

Args:
    arguments: The arguments to use for the arguments schema
    populate_by_name: Whether to populate by name
    var_args_schema: The variable args schema to use for the arguments schema
    var_kwargs_schema: The variable kwargs schema to use for the arguments schema
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## CallSchema
```python
from core_schema import CallSchema
```



---
## call_schema
```python
from core_schema import call_schema
```

Returns a schema that matches an arguments schema, then calls a function, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

param_a = core_schema.arguments_parameter(
    name='a', schema=core_schema.str_schema(), mode='positional_only'
)
param_b = core_schema.arguments_parameter(
    name='b', schema=core_schema.bool_schema(), mode='positional_only'
)
args_schema = core_schema.arguments_schema([param_a, param_b])

schema = core_schema.call_schema(
    arguments=args_schema,
    function=lambda a, b: a + str(not b),
    return_schema=core_schema.str_schema(),
)
v = SchemaValidator(schema)
assert v.validate_python((('hello', True))) == 'helloFalse'
```

Args:
    arguments: The arguments to use for the arguments schema
    function: The function to use for the call schema
    function_name: The function name to use for the call schema, if not provided `function.__name__` is used
    return_schema: The return schema to use for the call schema
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## CustomErrorSchema
```python
from core_schema import CustomErrorSchema
```



---
## custom_error_schema
```python
from core_schema import custom_error_schema
```

Returns a schema that matches a custom error value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.custom_error_schema(
    schema=core_schema.int_schema(),
    custom_error_type='MyError',
    custom_error_message='Error msg',
)
v = SchemaValidator(schema)
v.validate_python(1)
```

Args:
    schema: The schema to use for the custom error schema
    custom_error_type: The custom error type to use for the custom error schema
    custom_error_message: The custom error message to use for the custom error schema
    custom_error_context: The custom error context to use for the custom error schema
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## JsonSchema
```python
from core_schema import JsonSchema
```



---
## json_schema
```python
from core_schema import json_schema
```

Returns a schema that matches a JSON value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

dict_schema = core_schema.model_fields_schema(
    {
        'field_a': core_schema.model_field(core_schema.str_schema()),
        'field_b': core_schema.model_field(core_schema.bool_schema()),
    },
)

class MyModel:
    __slots__ = (
        '__dict__',
        '__pydantic_fields_set__',
        '__pydantic_extra__',
        '__pydantic_private__',
    )
    field_a: str
    field_b: bool

json_schema = core_schema.json_schema(schema=dict_schema)
schema = core_schema.model_schema(cls=MyModel, schema=json_schema)
v = SchemaValidator(schema)
m = v.validate_python('{"field_a": "hello", "field_b": true}')
assert isinstance(m, MyModel)
```

Args:
    schema: The schema to use for the JSON schema
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## UrlSchema
```python
from core_schema import UrlSchema
```



---
## url_schema
```python
from core_schema import url_schema
```

Returns a schema that matches a URL value, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.url_schema()
v = SchemaValidator(schema)
print(v.validate_python('https://example.com'))
#> https://example.com/
```

Args:
    max_length: The maximum length of the URL
    allowed_schemes: The allowed URL schemes
    host_required: Whether the URL must have a host
    default_host: The default host to use if the URL does not have a host
    default_port: The default port to use if the URL does not have a port
    default_path: The default path to use if the URL does not have a path
    strict: Whether to use strict URL parsing
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## MultiHostUrlSchema
```python
from core_schema import MultiHostUrlSchema
```



---
## multi_host_url_schema
```python
from core_schema import multi_host_url_schema
```

Returns a schema that matches a URL value with possibly multiple hosts, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.multi_host_url_schema()
v = SchemaValidator(schema)
print(v.validate_python('redis://localhost,0.0.0.0,127.0.0.1'))
#> redis://localhost,0.0.0.0,127.0.0.1
```

Args:
    max_length: The maximum length of the URL
    allowed_schemes: The allowed URL schemes
    host_required: Whether the URL must have a host
    default_host: The default host to use if the URL does not have a host
    default_port: The default port to use if the URL does not have a port
    default_path: The default path to use if the URL does not have a path
    strict: Whether to use strict URL parsing
    ref: optional unique identifier of the schema, used to reference the schema in other places
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## DefinitionsSchema
```python
from core_schema import DefinitionsSchema
```



---
## definitions_schema
```python
from core_schema import definitions_schema
```

Build a schema that contains both an inner schema and a list of definitions which can be used
within the inner schema.

```py
from pydantic_core import SchemaValidator, core_schema

schema = core_schema.definitions_schema(
    core_schema.list_schema(core_schema.definition_reference_schema('foobar')),
    [core_schema.int_schema(ref='foobar')],
)
v = SchemaValidator(schema)
assert v.validate_python([1, 2, '3']) == [1, 2, 3]
```

Args:
    schema: The inner schema
    definitions: List of definitions which can be referenced within inner schema

---
## DefinitionReferenceSchema
```python
from core_schema import DefinitionReferenceSchema
```



---
## definition_reference_schema
```python
from core_schema import definition_reference_schema
```

Returns a schema that points to a schema stored in "definitions", this is useful for nested recursive
models and also when you want to define validators separately from the main schema, e.g.:

```py
from pydantic_core import SchemaValidator, core_schema

schema_definition = core_schema.definition_reference_schema('list-schema')
schema = core_schema.definitions_schema(
    schema=schema_definition,
    definitions=[
        core_schema.list_schema(items_schema=schema_definition, ref='list-schema'),
    ],
)
v = SchemaValidator(schema)
assert v.validate_python([()]) == [[]]
```

Args:
    schema_ref: The schema ref to use for the definition reference schema
    metadata: Any other information you want to include with the schema, not used by pydantic-core
    serialization: Custom serialization schema

---
## _dict_not_none
```python
from core_schema import _dict_not_none
```



---
## field_before_validator_function
```python
from core_schema import field_before_validator_function
```



---
## general_before_validator_function
```python
from core_schema import general_before_validator_function
```



---
## field_after_validator_function
```python
from core_schema import field_after_validator_function
```



---
## general_after_validator_function
```python
from core_schema import general_after_validator_function
```



---
## field_wrap_validator_function
```python
from core_schema import field_wrap_validator_function
```



---
## general_wrap_validator_function
```python
from core_schema import general_wrap_validator_function
```



---
## field_plain_validator_function
```python
from core_schema import field_plain_validator_function
```



---
## general_plain_validator_function
```python
from core_schema import general_plain_validator_function
```



---
## __getattr__
```python
from core_schema import __getattr__
```



---
## include
```python
from core_schema import include
```



---
## exclude
```python
from core_schema import exclude
```



---
## context
```python
from core_schema import context
```

Current validation context.

---
## mode
```python
from core_schema import mode
```

The type of input data we are currently validating

---
## by_alias
```python
from core_schema import by_alias
```



---
## exclude_unset
```python
from core_schema import exclude_unset
```



---
## exclude_defaults
```python
from core_schema import exclude_defaults
```



---
## exclude_none
```python
from core_schema import exclude_none
```



---
## serialize_as_any
```python
from core_schema import serialize_as_any
```



---
## round_trip
```python
from core_schema import round_trip
```



---
## mode_is_json
```python
from core_schema import mode_is_json
```



---
## __str__
```python
from core_schema import __str__
```



---
## __repr__
```python
from core_schema import __repr__
```



---
## field_name
```python
from core_schema import field_name
```

The name of the current field being validated if this validator is
attached to a model field.

---
## config
```python
from core_schema import config
```

The CoreConfig that applies to this validation.

---
## data
```python
from core_schema import data
```

The data being validated for this model.

---
## __call__
```python
from core_schema import __call__
```



---
## Signal
```python
from __init__ import Signal
```

Coroutine-based signal implementation.

To connect a callback to a signal, use any list method.

Signals are fired using the send() coroutine, which takes named
arguments.

---
## wrap_method
```python
from _types import wrap_method
```



---
## WrapperType
```python
from _types import WrapperType
```



---
## _CustomList
```python
from _types import _CustomList
```

Adds MutableSequence mixin while pretending to be a builtin list

---
## _CustomDict
```python
from _types import _CustomDict
```

Adds MutableMapping mixin while pretending to be a builtin dict

---
## _CustomInt
```python
from _types import _CustomInt
```

Adds Integral mixin while pretending to be a builtin int

---
## _CustomFloat
```python
from _types import _CustomFloat
```

Adds Real mixin while pretending to be a builtin float

---
## wrapper
```python
from _types import wrapper
```



---
## _new
```python
from _types import _new
```



---
## __add__
```python
from _types import __add__
```



---
## __iadd__
```python
from _types import __iadd__
```



---
## __or__
```python
from _types import __or__
```



---
## __ior__
```python
from _types import __ior__
```



---
## __name__
```python
from toml_file import __name__
```



---
## TOMLFile
```python
from toml_file import TOMLFile
```

Represents a TOML file.

:param path: path to the TOML file

---
## __init__
```python
from toml_file import __init__
```



---
## read
```python
from toml_file import read
```

Read the file content as a :class:`tomlkit.toml_document.TOMLDocument`.

---
## write
```python
from toml_file import write
```

Write the TOMLDocument to the file.

---
## __name__
```python
from toml_document import __name__
```



---
## TOMLDocument
```python
from toml_document import TOMLDocument
```

A TOML document.

---
## OutOfOrderTableProxy
```python
from container import OutOfOrderTableProxy
```



---
## ends_with_whitespace
```python
from container import ends_with_whitespace
```

Returns ``True`` if the given item ``it`` is a ``Table`` or ``AoT`` object
ending with a ``Whitespace``.

---
## body
```python
from container import body
```



---
## unwrap
```python
from container import unwrap
```



---
## value
```python
from container import value
```



---
## parsing
```python
from container import parsing
```



---
## add
```python
from container import add
```

Adds an item to the current Container.

:Example:

>>> # add a key-value pair
>>> doc.add('key', 'value')
>>> # add a comment or whitespace or newline
>>> doc.add(comment('# comment'))

---
## _handle_dotted_key
```python
from container import _handle_dotted_key
```



---
## _get_last_index_before_table
```python
from container import _get_last_index_before_table
```



---
## _validate_out_of_order_table
```python
from container import _validate_out_of_order_table
```



---
## append
```python
from container import append
```

Similar to :meth:`add` but both key and value must be given.

---
## _raw_append
```python
from container import _raw_append
```



---
## _remove_at
```python
from container import _remove_at
```



---
## _insert_after
```python
from container import _insert_after
```



---
## _insert_at
```python
from container import _insert_at
```



---
## item
```python
from container import item
```

Get an item for the given key.

---
## last_item
```python
from container import last_item
```

Get the last item.

---
## as_string
```python
from container import as_string
```

Render as TOML string.

---
## _render_table
```python
from container import _render_table
```



---
## _render_aot
```python
from container import _render_aot
```



---
## _render_aot_table
```python
from container import _render_aot_table
```



---
## _render_simple_item
```python
from container import _render_simple_item
```



---
## __len__
```python
from container import __len__
```



---
## __iter__
```python
from container import __iter__
```



---
## __getitem__
```python
from container import __getitem__
```



---
## __setitem__
```python
from container import __setitem__
```



---
## __delitem__
```python
from container import __delitem__
```



---
## setdefault
```python
from container import setdefault
```



---
## _replace
```python
from container import _replace
```



---
## _replace_at
```python
from container import _replace_at
```



---
## __str__
```python
from container import __str__
```



---
## __eq__
```python
from container import __eq__
```



---
## _getstate
```python
from container import _getstate
```



---
## __reduce__
```python
from container import __reduce__
```



---
## __reduce_ex__
```python
from container import __reduce_ex__
```



---
## __setstate__
```python
from container import __setstate__
```



---
## copy
```python
from container import copy
```



---
## __copy__
```python
from container import __copy__
```



---
## _previous_item_with_index
```python
from container import _previous_item_with_index
```

Find the immediate previous item before index ``idx``

---
## _previous_item
```python
from container import _previous_item
```

Find the immediate previous item before index ``idx``.
If ``idx`` is not given, the last item is returned.

---
## validate
```python
from container import validate
```

Validate out of order tables in the given container

---
## _remove_table
```python
from container import _remove_table
```

Remove table from the parent container

---
## _state
```python
from parser import _state
```



---
## _idx
```python
from parser import _idx
```



---
## _current
```python
from parser import _current
```



---
## _marker
```python
from parser import _marker
```



---
## extract
```python
from parser import extract
```

Extracts the value between marker and index

---
## inc
```python
from parser import inc
```

Increments the parser if the end of the input has not been reached.
Returns whether or not it was able to advance.

---
## inc_n
```python
from parser import inc_n
```

Increments the parser by n characters
if the end of the input has not been reached.

---
## consume
```python
from parser import consume
```

Consume chars until min/max is satisfied is valid.

---
## end
```python
from parser import end
```

Returns True if the parser has reached the end of the input.

---
## mark
```python
from parser import mark
```

Sets the marker to the index's current position

---
## parse_error
```python
from parser import parse_error
```

Creates a generic "parse error" at the current position.

---
## _merge_ws
```python
from parser import _merge_ws
```

Merges the given Item with the last one currently in the given Container if
both are whitespace items.

Returns True if the items were merged.

---
## _is_child
```python
from parser import _is_child
```

Returns whether a key is strictly a child of another key.
AoT siblings are not considered children of one another.

---
## _parse_item
```python
from parser import _parse_item
```

Attempts to parse the next item and returns it, along with its key
if the item is value-like.

---
## _parse_comment_trail
```python
from parser import _parse_comment_trail
```

Returns (comment_ws, comment, trail)
If there is no comment, comment_ws and comment will
simply be empty.

---
## _parse_key_value
```python
from parser import _parse_key_value
```



---
## _parse_key
```python
from parser import _parse_key
```

Parses a Key at the current position;
WS before the key must be exhausted first at the callsite.

---
## _parse_quoted_key
```python
from parser import _parse_quoted_key
```

Parses a key enclosed in either single or double quotes.

---
## _parse_bare_key
```python
from parser import _parse_bare_key
```

Parses a bare key.

---
## _parse_value
```python
from parser import _parse_value
```

Attempts to parse a value at the current position.

---
## _parse_true
```python
from parser import _parse_true
```



---
## _parse_false
```python
from parser import _parse_false
```



---
## _parse_bool
```python
from parser import _parse_bool
```



---
## _parse_array
```python
from parser import _parse_array
```



---
## _parse_inline_table
```python
from parser import _parse_inline_table
```



---
## _parse_number
```python
from parser import _parse_number
```



---
## _parse_literal_string
```python
from parser import _parse_literal_string
```



---
## _parse_basic_string
```python
from parser import _parse_basic_string
```



---
## _parse_escaped_char
```python
from parser import _parse_escaped_char
```



---
## _parse_string
```python
from parser import _parse_string
```



---
## _parse_table
```python
from parser import _parse_table
```

Parses a table element.

---
## _peek_table
```python
from parser import _peek_table
```

Peeks ahead non-intrusively by cloning then restoring the
initial state of the parser.

Returns the name of the table about to be parsed,
as well as whether it is part of an AoT.

---
## _parse_aot
```python
from parser import _parse_aot
```

Parses all siblings of the provided table first and bundles them into
an AoT.

---
## _peek
```python
from parser import _peek
```

Peeks ahead n characters.

n is the max number of characters that will be peeked.

---
## _peek_unicode
```python
from parser import _peek_unicode
```

Peeks ahead non-intrusively by cloning then restoring the
initial state of the parser.

Returns the unicode value is it's a valid one else None.

---
## loads
```python
from api import loads
```

Parses a string into a TOMLDocument.

Alias for parse().

---
## dumps
```python
from api import dumps
```

Dumps a TOMLDocument into a string.

---
## load
```python
from api import load
```

Load toml document from a file-like object.

---
## dump
```python
from api import dump
```

Dump a TOMLDocument into a writable file stream.

:param data: a dict-like object to dump
:param sort_keys: if true, sort the keys in alphabetic order

:Example:

>>> with open("output.toml", "w") as fp:
...     tomlkit.dump(data, fp)

---
## parse
```python
from api import parse
```

Parses a string or bytes into a TOMLDocument.

---
## document
```python
from api import document
```

Returns a new TOMLDocument instance.

---
## integer
```python
from api import integer
```

Create an integer item from a number or string.

---
## float_
```python
from api import float_
```

Create an float item from a number or string.

---
## boolean
```python
from api import boolean
```

Turn `true` or `false` into a boolean item.

---
## string
```python
from api import string
```

Create a string item.

By default, this function will create *single line basic* strings, but
boolean flags (e.g. ``literal=True`` and/or ``multiline=True``)
can be used for personalization.

For more information, please check the spec: `<https://toml.io/en/v1.0.0#string>`__.

Common escaping rules will be applied for basic strings.
This can be controlled by explicitly setting ``escape=False``.
Please note that, if you disable escaping, you will have to make sure that
the given strings don't contain any forbidden character or sequence.

---
## date
```python
from api import date
```

Create a TOML date.

---
## time
```python
from api import time
```

Create a TOML time.

---
## datetime
```python
from api import datetime
```

Create a TOML datetime.

---
## array
```python
from api import array
```

Create an array item for its string representation.

:Example:

>>> array("[1, 2, 3]")  # Create from a string
[1, 2, 3]
>>> a = array()
>>> a.extend([1, 2, 3])  # Create from a list
>>> a
[1, 2, 3]

---
## table
```python
from api import table
```

Create an empty table.

:param is_super_table: if true, the table is a super table

:Example:

>>> doc = document()
>>> foo = table(True)
>>> bar = table()
>>> bar.update({'x': 1})
>>> foo.append('bar', bar)
>>> doc.append('foo', foo)
>>> print(doc.as_string())
[foo.bar]
x = 1

---
## inline_table
```python
from api import inline_table
```

Create an inline table.

:Example:

>>> table = inline_table()
>>> table.update({'x': 1, 'y': 2})
>>> print(table.as_string())
{x = 1, y = 2}

---
## aot
```python
from api import aot
```

Create an array of table.

:Example:

>>> doc = document()
>>> aot = aot()
>>> aot.append(item({'x': 1}))
>>> doc.append('foo', aot)
>>> print(doc.as_string())
[[foo]]
x = 1

---
## key
```python
from api import key
```



---
## value
```python
from api import value
```

Specify a value for use in an encoding.

---
## key_value
```python
from api import key_value
```

Parse a key-value pair from a string.

:Example:

>>> key_value("foo = 1")
(Key('foo'), 1)

---
## ws
```python
from api import ws
```

Create a whitespace from a string.

---
## nl
```python
from api import nl
```

Create a newline item.

---
## comment
```python
from api import comment
```

Create a comment item.

---
## register_encoder
```python
from api import register_encoder
```

Add a custom encoder, which should be a function that will be called
if the value can't otherwise be converted. It should takes a single value
and return a TOMLKit item or raise a ``TypeError``.

---
## unregister_encoder
```python
from api import unregister_encoder
```

Unregister a custom encoder.

---
## TOMLKitError
```python
from exceptions import TOMLKitError
```



---
## MixedArrayTypesError
```python
from exceptions import MixedArrayTypesError
```

An array was found that had two or more element types.

---
## InvalidNumberError
```python
from exceptions import InvalidNumberError
```

A numeric field was improperly specified.

---
## InvalidDateTimeError
```python
from exceptions import InvalidDateTimeError
```

A datetime field was improperly specified.

---
## InvalidDateError
```python
from exceptions import InvalidDateError
```

A date field was improperly specified.

---
## InvalidNumberOrDateError
```python
from exceptions import InvalidNumberOrDateError
```

A numeric or date field was improperly specified.

---
## InvalidUnicodeValueError
```python
from exceptions import InvalidUnicodeValueError
```

A unicode code was improperly specified.

---
## UnexpectedCharError
```python
from exceptions import UnexpectedCharError
```

An unexpected character was found during parsing.

---
## EmptyKeyError
```python
from exceptions import EmptyKeyError
```

An empty key was found during parsing.

---
## EmptyTableNameError
```python
from exceptions import EmptyTableNameError
```

An empty table name was found during parsing.

---
## InvalidCharInStringError
```python
from exceptions import InvalidCharInStringError
```

The string being parsed contains an invalid character.

---
## UnexpectedEofError
```python
from exceptions import UnexpectedEofError
```

The TOML being parsed ended before the end of a statement.

---
## InternalParserError
```python
from exceptions import InternalParserError
```

An error that indicates a bug in the parser.

---
## NonExistentKey
```python
from exceptions import NonExistentKey
```

A non-existent key was used.

---
## KeyAlreadyPresent
```python
from exceptions import KeyAlreadyPresent
```

An already present key was used.

---
## InvalidControlChar
```python
from exceptions import InvalidControlChar
```



---
## InvalidStringError
```python
from exceptions import InvalidStringError
```



---
## ConvertError
```python
from exceptions import ConvertError
```

Raised when item() fails to convert a value.
It should be a TypeError, but due to historical reasons
it needs to subclass ValueError as well.

---
## decode
```python
from _compat import decode
```



---
## __name__
```python
from items import __name__
```



---
## item
```python
from items import item
```

Create a TOML item from a Python object.

:Example:

>>> item(42)
42
>>> item([1, 2, 3])
[1, 2, 3]
>>> item({'a': 1, 'b': 2})
a = 1
b = 2

---
## StringType
```python
from items import StringType
```



---
## BoolType
```python
from items import BoolType
```



---
## Trivia
```python
from items import Trivia
```

Trivia information (aka metadata).

---
## KeyType
```python
from items import KeyType
```

The type of a Key.

Keys can be bare (unquoted), or quoted using basic ("), or literal (')
quotes following the same escaping rules as single-line StringType.

---
## Key
```python
from items import Key
```

Base class for a key

---
## SingleKey
```python
from items import SingleKey
```

A single key

---
## DottedKey
```python
from items import DottedKey
```



---
## Item
```python
from items import Item
```

An item within a TOML document.

---
## Whitespace
```python
from items import Whitespace
```

A whitespace literal.

---
## Comment
```python
from items import Comment
```

A comment literal.

---
## Integer
```python
from items import Integer
```

An integer literal.

---
## Float
```python
from items import Float
```

A float literal.

---
## Bool
```python
from items import Bool
```

A boolean literal.

---
## DateTime
```python
from items import DateTime
```

A datetime literal.

---
## Date
```python
from items import Date
```

A date literal.

---
## Time
```python
from items import Time
```

A time literal.

---
## _ArrayItemGroup
```python
from items import _ArrayItemGroup
```



---
## Array
```python
from items import Array
```

An array literal

---
## AbstractTable
```python
from items import AbstractTable
```

Common behaviour of both :class:`Table` and :class:`InlineTable`

---
## Table
```python
from items import Table
```

A table literal.

---
## InlineTable
```python
from items import InlineTable
```

An inline table literal.

---
## String
```python
from items import String
```

A string literal.

---
## AoT
```python
from items import AoT
```

An array of table literal

---
## Null
```python
from items import Null
```

A null item.

---
## select
```python
from items import select
```



---
## escaped_sequences
```python
from items import escaped_sequences
```



---
## invalid_sequences
```python
from items import invalid_sequences
```



---
## unit
```python
from items import unit
```



---
## is_basic
```python
from items import is_basic
```



---
## is_literal
```python
from items import is_literal
```



---
## is_singleline
```python
from items import is_singleline
```



---
## is_multiline
```python
from items import is_multiline
```



---
## toggle
```python
from items import toggle
```



---
## __bool__
```python
from items import __bool__
```



---
## __iter__
```python
from items import __iter__
```



---
## __len__
```python
from items import __len__
```



---
## copy
```python
from items import copy
```



---
## __hash__
```python
from items import __hash__
```



---
## __eq__
```python
from items import __eq__
```



---
## is_dotted
```python
from items import is_dotted
```

If the key is followed by other keys

---
## concat
```python
from items import concat
```

Concatenate keys into a dotted key

---
## is_multi
```python
from items import is_multi
```

Check if the key contains multiple keys

---
## as_string
```python
from items import as_string
```



---
## __str__
```python
from items import __str__
```



---
## __repr__
```python
from items import __repr__
```



---
## __init__
```python
from items import __init__
```



---
## delimiter
```python
from items import delimiter
```

The delimiter: double quote/single quote/none

---
## is_bare
```python
from items import is_bare
```

Check if the key is bare

---
## trivia
```python
from items import trivia
```



---
## discriminant
```python
from items import discriminant
```



---
## value
```python
from items import value
```



---
## unwrap
```python
from items import unwrap
```



---
## comment
```python
from items import comment
```

Attach a comment to this item

---
## indent
```python
from items import indent
```

Indent the table with given number of spaces.

---
## is_boolean
```python
from items import is_boolean
```



---
## is_table
```python
from items import is_table
```



---
## is_inline_table
```python
from items import is_inline_table
```



---
## is_aot
```python
from items import is_aot
```



---
## _getstate
```python
from items import _getstate
```



---
## __reduce__
```python
from items import __reduce__
```



---
## __reduce_ex__
```python
from items import __reduce_ex__
```



---
## s
```python
from items import s
```



---
## is_fixed
```python
from items import is_fixed
```

If the whitespace is fixed, it can't be merged or discarded from the output.

---
## __new__
```python
from items import __new__
```



---
## _new
```python
from items import _new
```



---
## __rtruediv__
```python
from items import __rtruediv__
```



---
## __truediv__
```python
from items import __truediv__
```



---
## __add__
```python
from items import __add__
```



---
## __sub__
```python
from items import __sub__
```



---
## replace
```python
from items import replace
```



---
## astimezone
```python
from items import astimezone
```



---
## is_whitespace
```python
from items import is_whitespace
```



---
## _group_values
```python
from items import _group_values
```

Group the values into (indent, value, comma, comment) tuples

---
## _iter_items
```python
from items import _iter_items
```



---
## multiline
```python
from items import multiline
```

Change the array to display in multiline or not.

:Example:

>>> a = item([1, 2, 3])
>>> print(a.as_string())
[1, 2, 3]
>>> print(a.multiline(True).as_string())
[
    1,
    2,
    3,
]

---
## _reindex
```python
from items import _reindex
```



---
## add_line
```python
from items import add_line
```

Add multiple items in a line to control the format precisely.
When add_comma is True, only accept actual values and
", " will be added between values automatically.

:Example:

>>> a = array()
>>> a.add_line(1, 2, 3)
>>> a.add_line(4, 5, 6)
>>> a.add_line(indent="")
>>> print(a.as_string())
[
    1, 2, 3,
    4, 5, 6,
]

---
## clear
```python
from items import clear
```

Clear the array.

---
## __getitem__
```python
from items import __getitem__
```



---
## __setitem__
```python
from items import __setitem__
```



---
## insert
```python
from items import insert
```



---
## __delitem__
```python
from items import __delitem__
```



---
## append
```python
from items import append
```

Appends a (key, item) to the table.

---
## add
```python
from items import add
```



---
## remove
```python
from items import remove
```



---
## setdefault
```python
from items import setdefault
```



---
## __copy__
```python
from items import __copy__
```



---
## raw_append
```python
from items import raw_append
```

Similar to :meth:`append` but does not copy indentation.

---
## is_aot_element
```python
from items import is_aot_element
```

True if the table is the direct child of an AOT element.

---
## is_super_table
```python
from items import is_super_table
```

A super table is the intermediate parent of a nested table as in [a.b.c].
If true, it won't appear in the TOML representation.

---
## invalidate_display_name
```python
from items import invalidate_display_name
```

Call ``invalidate_display_name`` on the contained tables

---
## from_raw
```python
from items import from_raw
```



---
## body
```python
from items import body
```



---
## _State
```python
from source import _State
```



---
## _StateHandler
```python
from source import _StateHandler
```

State preserver for the Parser.

---
## Source
```python
from source import Source
```

An immutable object holding a source code fragment.

When using Source(...), the source lines are deindented.

---
## __init__
```python
from source import __init__
```



---
## __enter__
```python
from source import __enter__
```



---
## __exit__
```python
from source import __exit__
```



---
## __call__
```python
from source import __call__
```



---
## reset
```python
from source import reset
```



---
## state
```python
from source import state
```



---
## idx
```python
from source import idx
```



---
## current
```python
from source import current
```



---
## marker
```python
from source import marker
```



---
## extract
```python
from source import extract
```

Extracts the value between marker and index

---
## inc
```python
from source import inc
```

Increments the parser if the end of the input has not been reached.
Returns whether or not it was able to advance.

---
## inc_n
```python
from source import inc_n
```

Increments the parser by n characters
if the end of the input has not been reached.

---
## consume
```python
from source import consume
```

Consume chars until min/max is satisfied is valid.

---
## end
```python
from source import end
```

Returns True if the parser has reached the end of the input.

---
## mark
```python
from source import mark
```

Sets the marker to the index's current position

---
## parse_error
```python
from source import parse_error
```

Creates a generic "parse error" at the current position.

---
## _to_linecol
```python
from source import _to_linecol
```



---
## parse_rfc3339
```python
from _utils import parse_rfc3339
```



---
## _unicode_escape
```python
from _utils import _unicode_escape
```



---
## escape_string
```python
from _utils import escape_string
```



---
## merge_dicts
```python
from _utils import merge_dicts
```



---
## flush
```python
from _utils import flush
```



---
## __name__
```python
from toml_char import __name__
```



---
## TOMLChar
```python
from toml_char import TOMLChar
```



---
## __init__
```python
from toml_char import __init__
```



---
## is_bare_key_char
```python
from toml_char import is_bare_key_char
```

Whether the character is a valid bare key name or not.

---
## is_kv_sep
```python
from toml_char import is_kv_sep
```

Whether the character is a valid key/value separator or not.

---
## is_int_float_char
```python
from toml_char import is_int_float_char
```

Whether the character if a valid integer or float value character or not.

---
## is_ws
```python
from toml_char import is_ws
```

Whether the character is a whitespace character or not.

---
## is_nl
```python
from toml_char import is_nl
```

Whether the character is a new line character or not.

---
## is_spaces
```python
from toml_char import is_spaces
```

Whether the character is a space or not

---
## np_general_all_close
```python
from util import np_general_all_close
```

Data type agnostic function to define if two numpy array have elements that are close

Parameters
----------
arr_a: npt.NDArray
arr_b: npt.NDArray
rtol: float
    See np.allclose
atol: float
    See np.allclose

Returns
-------
Bool

---
## _np_general_all_close
```python
from util import _np_general_all_close
```



---
## __name__
```python
from model import __name__
```



---
## MultiArrayNumpyFile
```python
from model import MultiArrayNumpyFile
```



---
## NumpyModel
```python
from model import NumpyModel
```



---
## model_agnostic_load
```python
from model import model_agnostic_load
```

Provided an Iterable containing possible models, and the directory where they have been dumped. Load the first
instance of model that matches the provided object ID.

Parameters
----------
output_directory: DirectoryPath
    The root directory where all model instances of interest are stored
object_id: String
    The ID of the model instance
models: Iterable[type[NumpyModel]]
    All NumpyModel instances of interest, note that they should have differing names
not_found_error: bool
    If True, throw error when the respective model instance was not found
load_kwargs
    Key-word arguments to pass to the load function

Returns
-------
NumpyModel instance if found

---
## _cached_np_array_load
```python
from model import _cached_np_array_load
```

Store the loaded numpy object within LRU cache in case we need it several times

Parameters
----------
path: FilePath
    Path to the numpy file

Returns
-------
Same as np.load

---
## _compare_np_array_dicts
```python
from model import _compare_np_array_dicts
```

Compare two dictionaries containing numpy arrays as values.

Parameters:
dict_a, dict_b: dictionaries to compare. They should have same keys.
rtol, atol: relative and absolute tolerances for np.isclose()

Returns:
Boolean value for each key, True if corresponding arrays are close, else False.

---
## load
```python
from model import load
```

Load NumpyModel instance

Parameters
----------
output_directory: DirectoryPath
    The root directory where all model instances of interest are stored
object_id: String
    The ID of the model instance
pre_load_modifier: Callable[[dict[str, Any]], dict[str, Any]] | None
    Optional function that modifies the loaded arrays

Returns
-------
NumpyModel instance

---
## __eq__
```python
from model import __eq__
```



---
## model_directory_path
```python
from model import model_directory_path
```



---
## dump
```python
from model import dump
```



---
## _dump_numpy_split_dict
```python
from model import _dump_numpy_split_dict
```



---
## _dump_compressed_pickle_file_name
```python
from model import _dump_compressed_pickle_file_name
```



---
## _dump_pickle_file_name
```python
from model import _dump_pickle_file_name
```



---
## _dump_non_array_yaml_name
```python
from model import _dump_non_array_yaml_name
```



---
## ignore_doctest_warning
```python
from conftest import ignore_doctest_warning
```

Ignore doctest warning.

Parameters
----------
item : pytest.Item
    pytest test item.
path : str
    Module path to Python object, e.g. "pandas.core.frame.DataFrame.append". A
    warning will be filtered when item.name ends with in given path. So it is
    sufficient to specify e.g. "DataFrame.append".
message : str
    Message to be filtered.

---
## pytest_collection_modifyitems
```python
from conftest import pytest_collection_modifyitems
```



---
## add_doctest_imports
```python
from conftest import add_doctest_imports
```

Make `np` and `pd` names available for doctests.

---
## configure_tests
```python
from conftest import configure_tests
```

Configure settings for all tests and test modules.

---
## axis
```python
from conftest import axis
```

Fixture for returning the axis numbers of a DataFrame.

---
## axis_1
```python
from conftest import axis_1
```

Fixture for returning aliases of axis 1 of a DataFrame.

---
## observed
```python
from conftest import observed
```



---
## ordered
```python
from conftest import ordered
```

Boolean 'ordered' parameter for Categorical.

---
## skipna
```python
from conftest import skipna
```

Boolean 'skipna' parameter.

---
## keep
```python
from conftest import keep
```

Valid values for the 'keep' parameter used in
.duplicated or .drop_duplicates

---
## inclusive_endpoints_fixture
```python
from conftest import inclusive_endpoints_fixture
```

Fixture for trying all interval 'inclusive' parameters.

---
## closed
```python
from conftest import closed
```

Fixture for trying all interval closed parameters.

---
## other_closed
```python
from conftest import other_closed
```

Secondary closed fixture to allow parametrizing over all pairs of closed.

---
## compression
```python
from conftest import compression
```

Fixture for trying common compression types in compression tests.

---
## compression_only
```python
from conftest import compression_only
```

Fixture for trying common compression types in compression tests excluding
uncompressed case.

---
## writable
```python
from conftest import writable
```

Fixture that an array is writable.

---
## join_type
```python
from conftest import join_type
```

Fixture for trying all types of join operations.

---
## nselect_method
```python
from conftest import nselect_method
```

Fixture for trying all nselect methods.

---
## nulls_fixture
```python
from conftest import nulls_fixture
```

Fixture for each null type in pandas.

---
## unique_nulls_fixture
```python
from conftest import unique_nulls_fixture
```

Fixture for each null type in pandas, each null type exactly once.

---
## np_nat_fixture
```python
from conftest import np_nat_fixture
```

Fixture for each NaT type in numpy.

---
## frame_or_series
```python
from conftest import frame_or_series
```

Fixture to parametrize over DataFrame and Series.

---
## index_or_series
```python
from conftest import index_or_series
```

Fixture to parametrize over Index and Series, made necessary by a mypy
bug, giving an error:

List item 0 has incompatible type "Type[Series]"; expected "Type[PandasObject]"

See GH#29725

---
## index_or_series_or_array
```python
from conftest import index_or_series_or_array
```

Fixture to parametrize over Index, Series, and ExtensionArray

---
## box_with_array
```python
from conftest import box_with_array
```

Fixture to test behavior for Index, Series, DataFrame, and pandas Array
classes

---
## dict_subclass
```python
from conftest import dict_subclass
```

Fixture for a dictionary subclass.

---
## non_dict_mapping_subclass
```python
from conftest import non_dict_mapping_subclass
```

Fixture for a non-mapping dictionary subclass.

---
## multiindex_year_month_day_dataframe_random_data
```python
from conftest import multiindex_year_month_day_dataframe_random_data
```

DataFrame with 3 level MultiIndex (year, month, day) covering
first 100 business days from 2000-01-01 with random data

---
## lexsorted_two_level_string_multiindex
```python
from conftest import lexsorted_two_level_string_multiindex
```

2-level MultiIndex, lexsorted, with string names.

---
## multiindex_dataframe_random_data
```python
from conftest import multiindex_dataframe_random_data
```

DataFrame with 2 level MultiIndex with random data

---
## _create_multiindex
```python
from conftest import _create_multiindex
```

MultiIndex used to test the general functionality of this object

---
## _create_mi_with_dt64tz_level
```python
from conftest import _create_mi_with_dt64tz_level
```

MultiIndex with a level that is a tzaware DatetimeIndex.

---
## index
```python
from conftest import index
```

Fixture for parametrization of date_range, period_range and
timedelta_range indexes

---
## index_flat
```python
from conftest import index_flat
```

index fixture, but excluding MultiIndex cases.

---
## index_with_missing
```python
from conftest import index_with_missing
```

Fixture for indices with missing values.

Integer-dtype and empty cases are excluded because they cannot hold missing
values.

MultiIndex is excluded because isna() is not defined for MultiIndex.

---
## string_series
```python
from conftest import string_series
```

Fixture for Series of floats with Index of unique strings

---
## object_series
```python
from conftest import object_series
```

Fixture for Series of dtype object with Index of unique strings

---
## datetime_series
```python
from conftest import datetime_series
```

Fixture for Series of floats with DatetimeIndex

---
## _create_series
```python
from conftest import _create_series
```

Helper for the _series dict

---
## series_with_simple_index
```python
from conftest import series_with_simple_index
```

Fixture for tests on series with changing types of indices.

---
## index_or_series_obj
```python
from conftest import index_or_series_obj
```

Fixture for tests on indexes, series and series with a narrow dtype
copy to avoid mutation, e.g. setting .name

---
## index_or_series_memory_obj
```python
from conftest import index_or_series_memory_obj
```

Fixture for tests on indexes, series, series with a narrow dtype and
series with empty objects type
copy to avoid mutation, e.g. setting .name

---
## int_frame
```python
from conftest import int_frame
```

Fixture for DataFrame of ints with index of unique strings

Columns are ['A', 'B', 'C', 'D']

---
## float_frame
```python
from conftest import float_frame
```

Fixture for DataFrame of floats with index of unique strings

Columns are ['A', 'B', 'C', 'D'].

---
## rand_series_with_duplicate_datetimeindex
```python
from conftest import rand_series_with_duplicate_datetimeindex
```

Fixture for Series with a DatetimeIndex that has duplicates.

---
## ea_scalar_and_dtype
```python
from conftest import ea_scalar_and_dtype
```



---
## all_arithmetic_operators
```python
from conftest import all_arithmetic_operators
```

Fixture for dunder names for common arithmetic operations.

---
## all_binary_operators
```python
from conftest import all_binary_operators
```

Fixture for operator and roperator arithmetic, comparison, and logical ops.

---
## all_arithmetic_functions
```python
from conftest import all_arithmetic_functions
```

Fixture for operator and roperator arithmetic functions.

Notes
-----
This includes divmod and rdivmod, whereas all_arithmetic_operators
does not.

---
## all_numeric_reductions
```python
from conftest import all_numeric_reductions
```

Fixture for numeric reduction names.

---
## all_boolean_reductions
```python
from conftest import all_boolean_reductions
```

Fixture for boolean reduction names.

---
## all_reductions
```python
from conftest import all_reductions
```

Fixture for all (boolean + numeric) reduction names.

---
## comparison_op
```python
from conftest import comparison_op
```

Fixture for operator module comparison functions.

---
## compare_operators_no_eq_ne
```python
from conftest import compare_operators_no_eq_ne
```

Fixture for dunder names for compare operations except == and !=

* >=
* >
* <
* <=

---
## all_logical_operators
```python
from conftest import all_logical_operators
```

Fixture for dunder names for common logical operations

* |
* &
* ^

---
## all_numeric_accumulations
```python
from conftest import all_numeric_accumulations
```

Fixture for numeric accumulation names

---
## strict_data_files
```python
from conftest import strict_data_files
```

Returns the configuration for the test setting `--no-strict-data-files`.

---
## datapath
```python
from conftest import datapath
```

Get the path to a data file.

Parameters
----------
path : str
    Path to the file, relative to ``pandas/tests/``

Returns
-------
path including ``pandas/tests``.

Raises
------
ValueError
    If the path doesn't exist and the --no-strict-data-files option is not set.

---
## tz_naive_fixture
```python
from conftest import tz_naive_fixture
```

Fixture for trying timezones including default (None): {0}

---
## tz_aware_fixture
```python
from conftest import tz_aware_fixture
```

Fixture for trying explicit timezones: {0}

---
## utc_fixture
```python
from conftest import utc_fixture
```

Fixture to provide variants of UTC timezone strings and tzinfo objects.

---
## unit
```python
from conftest import unit
```

datetime64 units we support.

---
## string_dtype
```python
from conftest import string_dtype
```

Parametrized fixture for string dtypes.

* str
* 'str'
* 'U'

---
## nullable_string_dtype
```python
from conftest import nullable_string_dtype
```

Parametrized fixture for string dtypes.

* 'string[python]'
* 'string[pyarrow]'

---
## string_storage
```python
from conftest import string_storage
```

Parametrized fixture for pd.options.mode.string_storage.

* 'python'
* 'pyarrow'

---
## dtype_backend
```python
from conftest import dtype_backend
```

Parametrized fixture for pd.options.mode.string_storage.

* 'python'
* 'pyarrow'

---
## bytes_dtype
```python
from conftest import bytes_dtype
```

Parametrized fixture for bytes dtypes.

* bytes
* 'bytes'

---
## object_dtype
```python
from conftest import object_dtype
```

Parametrized fixture for object dtypes.

* object
* 'object'

---
## any_string_dtype
```python
from conftest import any_string_dtype
```

Parametrized fixture for string dtypes.
* 'object'
* 'string[python]'
* 'string[pyarrow]'

---
## datetime64_dtype
```python
from conftest import datetime64_dtype
```

Parametrized fixture for datetime64 dtypes.

* 'datetime64[ns]'
* 'M8[ns]'

---
## timedelta64_dtype
```python
from conftest import timedelta64_dtype
```

Parametrized fixture for timedelta64 dtypes.

* 'timedelta64[ns]'
* 'm8[ns]'

---
## fixed_now_ts
```python
from conftest import fixed_now_ts
```

Fixture emits fixed Timestamp.now()

---
## float_numpy_dtype
```python
from conftest import float_numpy_dtype
```

Parameterized fixture for float dtypes.

* float
* 'float32'
* 'float64'

---
## float_ea_dtype
```python
from conftest import float_ea_dtype
```

Parameterized fixture for float dtypes.

* 'Float32'
* 'Float64'

---
## any_float_dtype
```python
from conftest import any_float_dtype
```

Parameterized fixture for float dtypes.

* float
* 'float32'
* 'float64'
* 'Float32'
* 'Float64'

---
## complex_dtype
```python
from conftest import complex_dtype
```

Parameterized fixture for complex dtypes.

* complex
* 'complex64'
* 'complex128'

---
## complex_or_float_dtype
```python
from conftest import complex_or_float_dtype
```

Parameterized fixture for complex and numpy float dtypes.

* complex
* 'complex64'
* 'complex128'
* float
* 'float32'
* 'float64'

---
## any_signed_int_numpy_dtype
```python
from conftest import any_signed_int_numpy_dtype
```

Parameterized fixture for signed integer dtypes.

* int
* 'int8'
* 'int16'
* 'int32'
* 'int64'

---
## any_unsigned_int_numpy_dtype
```python
from conftest import any_unsigned_int_numpy_dtype
```

Parameterized fixture for unsigned integer dtypes.

* 'uint8'
* 'uint16'
* 'uint32'
* 'uint64'

---
## any_int_numpy_dtype
```python
from conftest import any_int_numpy_dtype
```

Parameterized fixture for any integer dtype.

* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'

---
## any_int_ea_dtype
```python
from conftest import any_int_ea_dtype
```

Parameterized fixture for any nullable integer dtype.

* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'

---
## any_int_dtype
```python
from conftest import any_int_dtype
```

Parameterized fixture for any nullable integer dtype.

* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'
* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'

---
## any_numeric_ea_dtype
```python
from conftest import any_numeric_ea_dtype
```

Parameterized fixture for any nullable integer dtype and
any float ea dtypes.

* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'
* 'Float32'
* 'Float64'

---
## any_numeric_ea_and_arrow_dtype
```python
from conftest import any_numeric_ea_and_arrow_dtype
```

Parameterized fixture for any nullable integer dtype and
any float ea dtypes.

* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'
* 'Float32'
* 'Float64'
* 'uint8[pyarrow]'
* 'int8[pyarrow]'
* 'uint16[pyarrow]'
* 'int16[pyarrow]'
* 'uint32[pyarrow]'
* 'int32[pyarrow]'
* 'uint64[pyarrow]'
* 'int64[pyarrow]'
* 'float32[pyarrow]'
* 'float64[pyarrow]'

---
## any_signed_int_ea_dtype
```python
from conftest import any_signed_int_ea_dtype
```

Parameterized fixture for any signed nullable integer dtype.

* 'Int8'
* 'Int16'
* 'Int32'
* 'Int64'

---
## any_real_numpy_dtype
```python
from conftest import any_real_numpy_dtype
```

Parameterized fixture for any (purely) real numeric dtype.

* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'
* float
* 'float32'
* 'float64'

---
## any_real_numeric_dtype
```python
from conftest import any_real_numeric_dtype
```

Parameterized fixture for any (purely) real numeric dtype.

* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'
* float
* 'float32'
* 'float64'

and associated ea dtypes.

---
## any_numpy_dtype
```python
from conftest import any_numpy_dtype
```

Parameterized fixture for all numpy dtypes.

* bool
* 'bool'
* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'
* float
* 'float32'
* 'float64'
* complex
* 'complex64'
* 'complex128'
* str
* 'str'
* 'U'
* bytes
* 'bytes'
* 'datetime64[ns]'
* 'M8[ns]'
* 'timedelta64[ns]'
* 'm8[ns]'
* object
* 'object'

---
## any_real_nullable_dtype
```python
from conftest import any_real_nullable_dtype
```

Parameterized fixture for all real dtypes that can hold NA.

* float
* 'float32'
* 'float64'
* 'Float32'
* 'Float64'
* 'UInt8'
* 'UInt16'
* 'UInt32'
* 'UInt64'
* 'Int8'
* 'Int16'
* 'Int32'
* 'Int64'
* 'uint8[pyarrow]'
* 'uint16[pyarrow]'
* 'uint32[pyarrow]'
* 'uint64[pyarrow]'
* 'int8[pyarrow]'
* 'int16[pyarrow]'
* 'int32[pyarrow]'
* 'int64[pyarrow]'
* 'float[pyarrow]'
* 'double[pyarrow]'

---
## any_numeric_dtype
```python
from conftest import any_numeric_dtype
```

Parameterized fixture for all numeric dtypes.

* int
* 'int8'
* 'uint8'
* 'int16'
* 'uint16'
* 'int32'
* 'uint32'
* 'int64'
* 'uint64'
* float
* 'float32'
* 'float64'
* complex
* 'complex64'
* 'complex128'
* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'
* 'Float32'
* 'Float64'

---
## any_skipna_inferred_dtype
```python
from conftest import any_skipna_inferred_dtype
```

Fixture for all inferred dtypes from _libs.lib.infer_dtype

The covered (inferred) types are:
* 'string'
* 'empty'
* 'bytes'
* 'mixed'
* 'mixed-integer'
* 'mixed-integer-float'
* 'floating'
* 'integer'
* 'decimal'
* 'boolean'
* 'datetime64'
* 'datetime'
* 'date'
* 'timedelta'
* 'time'
* 'period'
* 'interval'

Returns
-------
inferred_dtype : str
    The string for the inferred dtype from _libs.lib.infer_dtype
values : np.ndarray
    An array of object dtype that will be inferred to have
    `inferred_dtype`

Examples
--------
>>> from pandas._libs import lib
>>>
>>> def test_something(any_skipna_inferred_dtype):
...     inferred_dtype, values = any_skipna_inferred_dtype
...     # will pass
...     assert lib.infer_dtype(values, skipna=True) == inferred_dtype

---
## ip
```python
from conftest import ip
```

Get an instance of IPython.InteractiveShell.

Will raise a skip if IPython is not installed.

---
## spmatrix
```python
from conftest import spmatrix
```

Yields scipy sparse matrix classes.

---
## tick_classes
```python
from conftest import tick_classes
```

Fixture for Tick based datetime offsets available for a time series.

---
## sort_by_key
```python
from conftest import sort_by_key
```

Simple fixture for testing keys in sorting methods.
Tests None (no key) and the identity key.

---
## names
```python
from conftest import names
```

A 3-tuple of names, the first two for operands, the last for a result.

---
## indexer_sli
```python
from conftest import indexer_sli
```

Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__

---
## indexer_li
```python
from conftest import indexer_li
```

Parametrize over loc.__getitem__, iloc.__getitem__

---
## indexer_si
```python
from conftest import indexer_si
```

Parametrize over __setitem__, iloc.__setitem__

---
## indexer_sl
```python
from conftest import indexer_sl
```

Parametrize over __setitem__, loc.__setitem__

---
## indexer_al
```python
from conftest import indexer_al
```

Parametrize over at.__setitem__, loc.__setitem__

---
## indexer_ial
```python
from conftest import indexer_ial
```

Parametrize over iat.__setitem__, iloc.__setitem__

---
## using_array_manager
```python
from conftest import using_array_manager
```

Fixture to check if the array manager is being used.

---
## using_copy_on_write
```python
from conftest import using_copy_on_write
```

Fixture to check if Copy-on-Write is enabled.

---
## warn_copy_on_write
```python
from conftest import warn_copy_on_write
```

Fixture to check if Copy-on-Write is in warning mode.

---
## using_infer_string
```python
from conftest import using_infer_string
```

Fixture to check if infer string option is enabled.

---
## warsaw
```python
from conftest import warsaw
```

tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.

---
## arrow_string_storage
```python
from conftest import arrow_string_storage
```



---
## TestSubDict
```python
from conftest import TestSubDict
```



---
## TestNonDictMapping
```python
from conftest import TestNonDictMapping
```



---
## deco
```python
from conftest import deco
```



---
## __init__
```python
from conftest import __init__
```



---
## __getitem__
```python
from conftest import __getitem__
```



---
## __iter__
```python
from conftest import __iter__
```



---
## __len__
```python
from conftest import __len__
```



---
## SequenceNotStr
```python
from _typing import SequenceNotStr
```



---
## BaseBuffer
```python
from _typing import BaseBuffer
```



---
## ReadBuffer
```python
from _typing import ReadBuffer
```



---
## WriteBuffer
```python
from _typing import WriteBuffer
```



---
## ReadPickleBuffer
```python
from _typing import ReadPickleBuffer
```



---
## WriteExcelBuffer
```python
from _typing import WriteExcelBuffer
```



---
## ReadCsvBuffer
```python
from _typing import ReadCsvBuffer
```



---
## __getitem__
```python
from _typing import __getitem__
```



---
## __contains__
```python
from _typing import __contains__
```



---
## __len__
```python
from _typing import __len__
```



---
## __iter__
```python
from _typing import __iter__
```



---
## index
```python
from _typing import index
```



---
## count
```python
from _typing import count
```



---
## __reversed__
```python
from _typing import __reversed__
```



---
## mode
```python
from _typing import mode
```



---
## seek
```python
from _typing import seek
```



---
## seekable
```python
from _typing import seekable
```



---
## tell
```python
from _typing import tell
```



---
## write
```python
from _typing import write
```



---
## flush
```python
from _typing import flush
```



---
## readline
```python
from _typing import readline
```



---
## truncate
```python
from _typing import truncate
```



---
## fileno
```python
from _typing import fileno
```



---
## closed
```python
from _typing import closed
```



---
## get_keywords
```python
from _version import get_keywords
```

Get the keywords needed to look up the version information.

---
## VersioneerConfig
```python
from _version import VersioneerConfig
```

Container for Versioneer configuration parameters.

---
## get_config
```python
from _version import get_config
```

Create, populate and return the VersioneerConfig() object.

---
## NotThisMethod
```python
from _version import NotThisMethod
```

Exception raised if a method is not valid for the current scenario.

---
## register_vcs_handler
```python
from _version import register_vcs_handler
```

Create decorator to mark a method as the handler of a VCS.

---
## run_command
```python
from _version import run_command
```

Call the given command(s).

---
## versions_from_parentdir
```python
from _version import versions_from_parentdir
```

Try to determine the version from the parent directory name.

Source tarballs conventionally unpack into a directory that includes both
the project name and a version string. We will also support searching up
two directory levels for an appropriately named parent directory

---
## git_get_keywords
```python
from _version import git_get_keywords
```

Extract version information from the given file.

---
## git_versions_from_keywords
```python
from _version import git_versions_from_keywords
```

Get version information from git keywords.

---
## git_pieces_from_vcs
```python
from _version import git_pieces_from_vcs
```

Get version from 'git describe' in the root of the source tree.

This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
version string, meaning we're inside a checked out source tree.

---
## plus_or_dot
```python
from _version import plus_or_dot
```

Return a + if we don't already have one, else return a .

---
## render_pep440
```python
from _version import render_pep440
```

Build up version string, with post-release "local version identifier".

Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty

Exceptions:
1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]

---
## render_pep440_branch
```python
from _version import render_pep440_branch
```

TAG[[.dev0]+DISTANCE.gHEX[.dirty]] .

The ".dev0" means not master branch. Note that .dev0 sorts backwards
(a feature branch will appear "older" than the master branch).

Exceptions:
1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty]

---
## pep440_split_post
```python
from _version import pep440_split_post
```

Split pep440 version string at the post-release segment.

Returns the release segments before the post-release and the
post-release version number (or -1 if no post-release segment is present).

---
## render_pep440_pre
```python
from _version import render_pep440_pre
```

TAG[.postN.devDISTANCE] -- No -dirty.

Exceptions:
1: no tags. 0.post0.devDISTANCE

---
## render_pep440_post
```python
from _version import render_pep440_post
```

TAG[.postDISTANCE[.dev0]+gHEX] .

The ".dev0" means dirty. Note that .dev0 sorts backwards
(a dirty tree will appear "older" than the corresponding clean one),
but you shouldn't be releasing software with -dirty anyways.

Exceptions:
1: no tags. 0.postDISTANCE[.dev0]

---
## render_pep440_post_branch
```python
from _version import render_pep440_post_branch
```

TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] .

The ".dev0" means not master branch.

Exceptions:
1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty]

---
## render_pep440_old
```python
from _version import render_pep440_old
```

TAG[.postDISTANCE[.dev0]] .

The ".dev0" means dirty.

Exceptions:
1: no tags. 0.postDISTANCE[.dev0]

---
## render_git_describe
```python
from _version import render_git_describe
```

TAG[-DISTANCE-gHEX][-dirty].

Like 'git describe --tags --dirty --always'.

Exceptions:
1: no tags. HEX[-dirty]  (note: no 'g' prefix)

---
## render_git_describe_long
```python
from _version import render_git_describe_long
```

TAG-DISTANCE-gHEX[-dirty].

Like 'git describe --tags --dirty --always -long'.
The distance/hash is unconditional.

Exceptions:
1: no tags. HEX[-dirty]  (note: no 'g' prefix)

---
## render
```python
from _version import render
```

Render the given version pieces into the requested style.

---
## decorate
```python
from _version import decorate
```

Store f in HANDLERS[vcs][method].

---
## __name__
```python
from _version_meson import __name__
```



---
## __name__
```python
from relativedelta import __name__
```



---
## relativedelta
```python
from relativedelta import relativedelta
```

The relativedelta type is designed to be applied to an existing datetime and
can replace specific components of that datetime, or represents an interval
of time.

It is based on the specification of the excellent work done by M.-A. Lemburg
in his
`mx.DateTime <https://www.egenix.com/products/python/mxBase/mxDateTime/>`_ extension.
However, notice that this type does *NOT* implement the same algorithm as
his work. Do *NOT* expect it to behave like mx.DateTime's counterpart.

There are two different ways to build a relativedelta instance. The
first one is passing it two date/datetime classes::

    relativedelta(datetime1, datetime2)

The second one is passing it any number of the following keyword arguments::

    relativedelta(arg1=x,arg2=y,arg3=z...)

    year, month, day, hour, minute, second, microsecond:
        Absolute information (argument is singular); adding or subtracting a
        relativedelta with absolute information does not perform an arithmetic
        operation, but rather REPLACES the corresponding value in the
        original datetime with the value(s) in relativedelta.

    years, months, weeks, days, hours, minutes, seconds, microseconds:
        Relative information, may be negative (argument is plural); adding
        or subtracting a relativedelta with relative information performs
        the corresponding arithmetic operation on the original datetime value
        with the information in the relativedelta.

    weekday:
        One of the weekday instances (MO, TU, etc) available in the
        relativedelta module. These instances may receive a parameter N,
        specifying the Nth weekday, which could be positive or negative
        (like MO(+1) or MO(-2)). Not specifying it is the same as specifying
        +1. You can also use an integer, where 0=MO. This argument is always
        relative e.g. if the calculated date is already Monday, using MO(1)
        or MO(-1) won't change the day. To effectively make it absolute, use
        it in combination with the day argument (e.g. day=1, MO(1) for first
        Monday of the month).

    leapdays:
        Will add given days to the date found, if year is a leap
        year, and the date found is post 28 of february.

    yearday, nlyearday:
        Set the yearday or the non-leap year day (jump leap days).
        These are converted to day/month/leapdays information.

There are relative and absolute forms of the keyword
arguments. The plural is relative, and the singular is
absolute. For each argument in the order below, the absolute form
is applied first (by setting each attribute to that value) and
then the relative form (by adding the value to the attribute).

The order of attributes considered when this relativedelta is
added to a datetime is:

1. Year
2. Month
3. Day
4. Hours
5. Minutes
6. Seconds
7. Microseconds

Finally, weekday is applied, using the rule described above.

For example

>>> from datetime import datetime
>>> from dateutil.relativedelta import relativedelta, MO
>>> dt = datetime(2018, 4, 9, 13, 37, 0)
>>> delta = relativedelta(hours=25, day=1, weekday=MO(1))
>>> dt + delta
datetime.datetime(2018, 4, 2, 14, 37)

First, the day is set to 1 (the first of the month), then 25 hours
are added, to get to the 2nd day and 14th hour, finally the
weekday is applied, but since the 2nd is already a Monday there is
no effect.

---
## _sign
```python
from relativedelta import _sign
```



---
## __init__
```python
from relativedelta import __init__
```



---
## _fix
```python
from relativedelta import _fix
```



---
## weeks
```python
from relativedelta import weeks
```



---
## _set_months
```python
from relativedelta import _set_months
```



---
## normalized
```python
from relativedelta import normalized
```

Return a version of this object represented entirely using integer
values for the relative attributes.

>>> relativedelta(days=1.5, hours=2).normalized()
relativedelta(days=+1, hours=+14)

:return:
    Returns a :class:`dateutil.relativedelta.relativedelta` object.

---
## __add__
```python
from relativedelta import __add__
```



---
## __radd__
```python
from relativedelta import __radd__
```



---
## __rsub__
```python
from relativedelta import __rsub__
```



---
## __sub__
```python
from relativedelta import __sub__
```



---
## __abs__
```python
from relativedelta import __abs__
```



---
## __neg__
```python
from relativedelta import __neg__
```



---
## __bool__
```python
from relativedelta import __bool__
```



---
## __mul__
```python
from relativedelta import __mul__
```



---
## __eq__
```python
from relativedelta import __eq__
```



---
## __hash__
```python
from relativedelta import __hash__
```



---
## __ne__
```python
from relativedelta import __ne__
```



---
## __div__
```python
from relativedelta import __div__
```



---
## __repr__
```python
from relativedelta import __repr__
```



---
## weekday
```python
from _common import weekday
```



---
## __init__
```python
from _common import __init__
```



---
## __call__
```python
from _common import __call__
```



---
## __eq__
```python
from _common import __eq__
```



---
## __hash__
```python
from _common import __hash__
```



---
## __ne__
```python
from _common import __ne__
```



---
## __repr__
```python
from _common import __repr__
```



---
## __name__
```python
from tzwin import __name__
```



---
## __name__
```python
from rrule import __name__
```

The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <https://tools.ietf.org/html/rfc5545>`_,
including support for caching of results.

---
## weekday
```python
from rrule import weekday
```

This version of weekday does not allow n = 0.

---
## _invalidates_cache
```python
from rrule import _invalidates_cache
```

Decorator for rruleset methods which may invalidate the
cached length.

---
## rrulebase
```python
from rrule import rrulebase
```



---
## rrule
```python
from rrule import rrule
```

Include the given :py:class:`rrule` instance in the recurrence set
generation. 

---
## _iterinfo
```python
from rrule import _iterinfo
```



---
## rruleset
```python
from rrule import rruleset
```

The rruleset type allows more complex recurrence setups, mixing
multiple rules, dates, exclusion rules, and exclusion dates. The type
constructor takes the following keyword arguments:

:param cache: If True, caching of results will be enabled, improving
              performance of multiple queries considerably. 

---
## _rrulestr
```python
from rrule import _rrulestr
```

Parses a string representation of a recurrence rule or set of
recurrence rules.

:param s:
    Required, a string defining one or more recurrence rules.

:param dtstart:
    If given, used as the default recurrence start if not specified in the
    rule string.

:param cache:
    If set ``True`` caching of results will be enabled, improving
    performance of multiple queries considerably.

:param unfold:
    If set ``True`` indicates that a rule string is split over more
    than one line and should be joined before processing.

:param forceset:
    If set ``True`` forces a :class:`dateutil.rrule.rruleset` to
    be returned.

:param compatible:
    If set ``True`` forces ``unfold`` and ``forceset`` to be ``True``.

:param ignoretz:
    If set ``True``, time zones in parsed strings are ignored and a naive
    :class:`datetime.datetime` object is returned.

:param tzids:
    If given, a callable or mapping used to retrieve a
    :class:`datetime.tzinfo` from a string representation.
    Defaults to :func:`dateutil.tz.gettz`.

:param tzinfos:
    Additional time zone names / aliases which may be present in a string
    representation.  See :func:`dateutil.parser.parse` for more
    information.

:return:
    Returns a :class:`dateutil.rrule.rruleset` or
    :class:`dateutil.rrule.rrule`

---
## __init__
```python
from rrule import __init__
```



---
## inner_func
```python
from rrule import inner_func
```



---
## __iter__
```python
from rrule import __iter__
```



---
## _invalidate_cache
```python
from rrule import _invalidate_cache
```



---
## _iter_cached
```python
from rrule import _iter_cached
```



---
## __getitem__
```python
from rrule import __getitem__
```



---
## __contains__
```python
from rrule import __contains__
```



---
## count
```python
from rrule import count
```

Returns the number of recurrences in this set. It will have go
through the whole recurrence, if this hasn't been done before. 

---
## before
```python
from rrule import before
```

Returns the last recurrence before the given datetime instance. The
inc keyword defines what happens if dt is an occurrence. With
inc=True, if dt itself is an occurrence, it will be returned. 

---
## after
```python
from rrule import after
```

Returns the first recurrence after the given datetime instance. The
inc keyword defines what happens if dt is an occurrence. With
inc=True, if dt itself is an occurrence, it will be returned.  

---
## xafter
```python
from rrule import xafter
```

Generator which yields up to `count` recurrences after the given
datetime instance, equivalent to `after`.

:param dt:
    The datetime at which to start generating recurrences.

:param count:
    The maximum number of recurrences to generate. If `None` (default),
    dates are generated until the recurrence rule is exhausted.

:param inc:
    If `dt` is an instance of the rule and `inc` is `True`, it is
    included in the output.

:yields: Yields a sequence of `datetime` objects.

---
## between
```python
from rrule import between
```

Returns all the occurrences of the rrule between after and before.
The inc keyword defines what happens if after and/or before are
themselves occurrences. With inc=True, they will be included in the
list, if they are found in the recurrence set. 

---
## __str__
```python
from rrule import __str__
```

Output a string that would generate this RRULE if passed to rrulestr.
This is mostly compatible with RFC5545, except for the
dateutil-specific extension BYEASTER.

---
## replace
```python
from rrule import replace
```

Return new rrule with same attributes except for those attributes given new
values by whichever keyword arguments are specified.

---
## _iter
```python
from rrule import _iter
```



---
## __construct_byset
```python
from rrule import __construct_byset
```

If a `BYXXX` sequence is passed to the constructor at the same level as
`FREQ` (e.g. `FREQ=HOURLY,BYHOUR={2,4,7},INTERVAL=3`), there are some
specifications which cannot be reached given some starting conditions.

This occurs whenever the interval is not coprime with the base of a
given unit and the difference between the starting position and the
ending position is not coprime with the greatest common denominator
between the interval and the base. For example, with a FREQ of hourly
starting at 17:00 and an interval of 4, the only valid values for
BYHOUR would be {21, 1, 5, 9, 13, 17}, because 4 and 24 are not
coprime.

:param start:
    Specifies the starting position.
:param byxxx:
    An iterable containing the list of allowed values.
:param base:
    The largest allowable value for the specified frequency (e.g.
    24 hours, 60 minutes).

This does not preserve the type of the iterable, returning a set, since
the values should be unique and the order is irrelevant, this will
speed up later lookups.

In the event of an empty set, raises a :exception:`ValueError`, as this
results in an empty rrule.

---
## __mod_distance
```python
from rrule import __mod_distance
```

Calculates the next value in a sequence where the `FREQ` parameter is
specified along with a `BYXXX` parameter at the same "level"
(e.g. `HOURLY` specified with `BYHOUR`).

:param value:
    The old value of the component.
:param byxxx:
    The `BYXXX` set, which should have been generated by
    `rrule._construct_byset`, or something else which checks that a
    valid rule is present.
:param base:
    The largest allowable value for the specified frequency (e.g.
    24 hours, 60 minutes).

If a valid value is not found after `base` iterations (the maximum
number before the sequence would start to repeat), this raises a
:exception:`ValueError`, as no valid values were found.

This returns a tuple of `divmod(n*interval, base)`, where `n` is the
smallest number of `interval` repetitions until the next specified
value in `byxxx` is found.

---
## rebuild
```python
from rrule import rebuild
```



---
## ydayset
```python
from rrule import ydayset
```



---
## mdayset
```python
from rrule import mdayset
```



---
## wdayset
```python
from rrule import wdayset
```



---
## ddayset
```python
from rrule import ddayset
```



---
## htimeset
```python
from rrule import htimeset
```



---
## mtimeset
```python
from rrule import mtimeset
```



---
## stimeset
```python
from rrule import stimeset
```



---
## _genitem
```python
from rrule import _genitem
```



---
## rdate
```python
from rrule import rdate
```

Include the given :py:class:`datetime` instance in the recurrence
set generation. 

---
## exrule
```python
from rrule import exrule
```

Include the given rrule instance in the recurrence set exclusion
list. Dates which are part of the given recurrence rules will not
be generated, even if some inclusive rrule or rdate matches them.

---
## exdate
```python
from rrule import exdate
```

Include the given datetime instance in the recurrence set
exclusion list. Dates included that way will not be generated,
even if some inclusive rrule or rdate matches them. 

---
## _handle_int
```python
from rrule import _handle_int
```



---
## _handle_int_list
```python
from rrule import _handle_int_list
```



---
## _handle_FREQ
```python
from rrule import _handle_FREQ
```



---
## _handle_UNTIL
```python
from rrule import _handle_UNTIL
```



---
## _handle_WKST
```python
from rrule import _handle_WKST
```



---
## _handle_BYWEEKDAY
```python
from rrule import _handle_BYWEEKDAY
```

Two ways to specify this: +1MO or MO(+1)

---
## _parse_rfc_rrule
```python
from rrule import _parse_rfc_rrule
```



---
## _parse_date_value
```python
from rrule import _parse_date_value
```



---
## _parse_rfc
```python
from rrule import _parse_rfc
```



---
## __call__
```python
from rrule import __call__
```



---
## __next__
```python
from rrule import __next__
```



---
## __lt__
```python
from rrule import __lt__
```



---
## __gt__
```python
from rrule import __gt__
```



---
## __eq__
```python
from rrule import __eq__
```



---
## __ne__
```python
from rrule import __ne__
```



---
## today
```python
from utils import today
```

Returns a :py:class:`datetime` representing the current day at midnight

:param tzinfo:
    The time zone to attach (also used to determine the current day).

:return:
    A :py:class:`datetime.datetime` object representing the current day
    at midnight.

---
## default_tzinfo
```python
from utils import default_tzinfo
```

Sets the ``tzinfo`` parameter on naive datetimes only

This is useful for example when you are provided a datetime that may have
either an implicit or explicit time zone, such as when parsing a time zone
string.

.. doctest::

    >>> from dateutil.tz import tzoffset
    >>> from dateutil.parser import parse
    >>> from dateutil.utils import default_tzinfo
    >>> dflt_tz = tzoffset("EST", -18000)
    >>> print(default_tzinfo(parse('2014-01-01 12:30 UTC'), dflt_tz))
    2014-01-01 12:30:00+00:00
    >>> print(default_tzinfo(parse('2014-01-01 12:30'), dflt_tz))
    2014-01-01 12:30:00-05:00

:param dt:
    The datetime on which to replace the time zone

:param tzinfo:
    The :py:class:`datetime.tzinfo` subclass instance to assign to
    ``dt`` if (and only if) it is naive.

:return:
    Returns an aware :py:class:`datetime.datetime`.

---
## within_delta
```python
from utils import within_delta
```

Useful for comparing two datetimes that may have a negligible difference
to be considered equal.

---
## __name__
```python
from easter import __name__
```

This module offers a generic Easter computing method for any given year, using
Western, Orthodox or Julian algorithms.

---
## easter
```python
from easter import easter
```

This method was ported from the work done by GM Arts,
on top of the algorithm by Claus Tondering, which was
based in part on the algorithm of Ouding (1940), as
quoted in "Explanatory Supplement to the Astronomical
Almanac", P.  Kenneth Seidelmann, editor.

This algorithm implements three different Easter
calculation methods:

1. Original calculation in Julian calendar, valid in
   dates after 326 AD
2. Original method, with date converted to Gregorian
   calendar, valid in years 1583 to 4099
3. Revised method, in Gregorian calendar, valid in
   years 1583 to 4099 as well

These methods are represented by the constants:

* ``EASTER_JULIAN   = 1``
* ``EASTER_ORTHODOX = 2``
* ``EASTER_WESTERN  = 3``

The default method is method 3.

More about the algorithm may be found at:

`GM Arts: Easter Algorithms <http://www.gmarts.org/index.php?go=415>`_

and

`The Calendar FAQ: Easter <https://www.tondering.dk/claus/cal/easter.php>`_

---
## addr_to_addr_infos
```python
from utils import addr_to_addr_infos
```

Convert an address tuple to a list of addr_info tuples.

---
## pop_addr_infos_interleave
```python
from utils import pop_addr_infos_interleave
```

Pop addr_info from the list of addr_infos by family up to interleave times.

The interleave parameter is used to know how many addr_infos for
each family should be popped of the top of the list.

---
## _addr_tuple_to_ip_address
```python
from utils import _addr_tuple_to_ip_address
```

Convert an address tuple to an IPv4Address.

---
## remove_addr_infos
```python
from utils import remove_addr_infos
```

Remove an address from the list of addr_infos.

The addr value is typically the return value of
sock.getpeername().

---
## __name__
```python
from impl import __name__
```

Base implementation.

---
## _interleave_addrinfos
```python
from impl import _interleave_addrinfos
```

Interleave list of addrinfo tuples by family.

---
## __name__
```python
from _staggered import __name__
```



---
## _set_result
```python
from _staggered import _set_result
```

Set the result of a future if it is not already done.

---
## _on_completion
```python
from _staggered import _on_completion
```



---
## _ModuleClient
```python
from __init__ import _ModuleClient
```



---
## _AzureModuleClient
```python
from __init__ import _AzureModuleClient
```



---
## _AmbiguousModuleClientUsageError
```python
from __init__ import _AmbiguousModuleClientUsageError
```



---
## _has_openai_credentials
```python
from __init__ import _has_openai_credentials
```



---
## _has_azure_credentials
```python
from __init__ import _has_azure_credentials
```



---
## _has_azure_ad_credentials
```python
from __init__ import _has_azure_ad_credentials
```



---
## _load_client
```python
from __init__ import _load_client
```



---
## _reset_client
```python
from __init__ import _reset_client
```



---
## api_key
```python
from __init__ import api_key
```



---
## organization
```python
from __init__ import organization
```



---
## project
```python
from __init__ import project
```



---
## base_url
```python
from __init__ import base_url
```



---
## timeout
```python
from __init__ import timeout
```



---
## max_retries
```python
from __init__ import max_retries
```



---
## _custom_headers
```python
from __init__ import _custom_headers
```



---
## _custom_query
```python
from __init__ import _custom_query
```



---
## _client
```python
from __init__ import _client
```



---
## OpenAI
```python
from _client import OpenAI
```



---
## AsyncOpenAI
```python
from _client import AsyncOpenAI
```



---
## OpenAIWithRawResponse
```python
from _client import OpenAIWithRawResponse
```



---
## AsyncOpenAIWithRawResponse
```python
from _client import AsyncOpenAIWithRawResponse
```



---
## OpenAIWithStreamedResponse
```python
from _client import OpenAIWithStreamedResponse
```



---
## AsyncOpenAIWithStreamedResponse
```python
from _client import AsyncOpenAIWithStreamedResponse
```



---
## add_request_id
```python
from _models import add_request_id
```



---
## __repr_args__
```python
from _models import __repr_args__
```



---
## __name__
```python
from pagination import __name__
```



---
## CursorPageItem
```python
from pagination import CursorPageItem
```



---
## SyncPage
```python
from pagination import SyncPage
```

Note: no pagination actually occurs yet, this is for forwards-compatibility.

---
## AsyncPage
```python
from pagination import AsyncPage
```

Note: no pagination actually occurs yet, this is for forwards-compatibility.

---
## SyncCursorPage
```python
from pagination import SyncCursorPage
```



---
## AsyncCursorPage
```python
from pagination import AsyncCursorPage
```



---
## _get_page_items
```python
from pagination import _get_page_items
```



---
## next_page_info
```python
from pagination import next_page_info
```



---
## model_parse_json
```python
from _compat import model_parse_json
```



---
## model_json_schema
```python
from _compat import model_json_schema
```



---
## OpenAIError
```python
from _exceptions import OpenAIError
```



---
## LengthFinishReasonError
```python
from _exceptions import LengthFinishReasonError
```



---
## ContentFilterFinishReasonError
```python
from _exceptions import ContentFilterFinishReasonError
```



---
## __name__
```python
from _module_client import __name__
```



---
## ChatProxy
```python
from _module_client import ChatProxy
```



---
## BetaProxy
```python
from _module_client import BetaProxy
```



---
## FilesProxy
```python
from _module_client import FilesProxy
```



---
## AudioProxy
```python
from _module_client import AudioProxy
```



---
## ImagesProxy
```python
from _module_client import ImagesProxy
```



---
## ModelsProxy
```python
from _module_client import ModelsProxy
```



---
## BatchesProxy
```python
from _module_client import BatchesProxy
```



---
## EmbeddingsProxy
```python
from _module_client import EmbeddingsProxy
```



---
## CompletionsProxy
```python
from _module_client import CompletionsProxy
```



---
## ModerationsProxy
```python
from _module_client import ModerationsProxy
```



---
## FineTuningProxy
```python
from _module_client import FineTuningProxy
```



---
## __load__
```python
from _module_client import __load__
```



---
## __name__
```python
from skipping import __name__
```

Support for skip/xfail functions and markers.

---
## pytest_addoption
```python
from skipping import pytest_addoption
```



---
## pytest_configure
```python
from skipping import pytest_configure
```



---
## evaluate_condition
```python
from skipping import evaluate_condition
```

Evaluate a single skipif/xfail condition.

If an old-style string condition is given, it is eval()'d, otherwise the
condition is bool()'d. If this fails, an appropriately formatted pytest.fail
is raised.

Returns (result, reason). The reason is only relevant if the result is True.

---
## Skip
```python
from skipping import Skip
```

The result of evaluate_skip_marks().

---
## evaluate_skip_marks
```python
from skipping import evaluate_skip_marks
```

Evaluate skip and skipif marks on item, returning Skip if triggered.

---
## Xfail
```python
from skipping import Xfail
```

The result of evaluate_xfail_marks().

---
## evaluate_xfail_marks
```python
from skipping import evaluate_xfail_marks
```

Evaluate xfail marks on item, returning Xfail if triggered.

---
## pytest_runtest_setup
```python
from skipping import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from skipping import pytest_runtest_call
```



---
## pytest_runtest_makereport
```python
from skipping import pytest_runtest_makereport
```



---
## pytest_report_teststatus
```python
from skipping import pytest_report_teststatus
```



---
## nop
```python
from skipping import nop
```



---
## _remove_ansi_escape_sequences
```python
from logging import _remove_ansi_escape_sequences
```



---
## DatetimeFormatter
```python
from logging import DatetimeFormatter
```

A logging formatter which formats record with
:func:`datetime.datetime.strftime` formatter instead of
:func:`time.strftime` in case of microseconds in format string.

---
## ColoredLevelFormatter
```python
from logging import ColoredLevelFormatter
```

A logging formatter which colorizes the %(levelname)..s part of the
log format passed to __init__.

---
## PercentStyleMultiline
```python
from logging import PercentStyleMultiline
```

A logging style with special support for multiline messages.

If the message of a record consists of multiple lines, this style
formats the message as if each line were logged separately.

---
## get_option_ini
```python
from logging import get_option_ini
```



---
## pytest_addoption
```python
from logging import pytest_addoption
```

Add options to control log capturing.

---
## catching_logs
```python
from logging import catching_logs
```

Context manager that prepares the whole logging machinery properly.

---
## LogCaptureHandler
```python
from logging import LogCaptureHandler
```

A logging handler that stores log records and the log text.

---
## LogCaptureFixture
```python
from logging import LogCaptureFixture
```

Provides access and control of log capturing.

---
## caplog
```python
from logging import caplog
```

Access and control log capturing.

Captured logs are available through the following properties/methods::

* caplog.messages        -> list of format-interpolated log messages
* caplog.text            -> string containing formatted log output
* caplog.records         -> list of logging.LogRecord instances
* caplog.record_tuples   -> list of (logger_name, level, message) tuples
* caplog.clear()         -> clear captured records and formatted log output string

---
## get_log_level_for_setting
```python
from logging import get_log_level_for_setting
```



---
## pytest_configure
```python
from logging import pytest_configure
```



---
## LoggingPlugin
```python
from logging import LoggingPlugin
```

Attaches to the logging module and captures log messages for each test.

---
## _FileHandler
```python
from logging import _FileHandler
```

A logging FileHandler with pytest tweaks.

---
## _LiveLoggingStreamHandler
```python
from logging import _LiveLoggingStreamHandler
```

A logging StreamHandler used by the live logging feature: it will
write a newline before the first log message in each test.

During live logging we must also explicitly disable stdout/stderr
capturing otherwise it will get captured and won't appear in the
terminal.

---
## _LiveLoggingNullHandler
```python
from logging import _LiveLoggingNullHandler
```

A logging handler used when live logging is disabled.

---
## formatTime
```python
from logging import formatTime
```



---
## add_color_level
```python
from logging import add_color_level
```

Add or update color opts for a log level.

:param level:
    Log level to apply a style to, e.g. ``logging.INFO``.
:param color_opts:
    ANSI escape sequence color options. Capitalized colors indicates
    background color, i.e. ``'green', 'Yellow', 'bold'`` will give bold
    green text on yellow background.

.. warning::
    This is an experimental API.

---
## format
```python
from logging import format
```



---
## _get_auto_indent
```python
from logging import _get_auto_indent
```

Determine the current auto indentation setting.

Specify auto indent behavior (on/off/fixed) by passing in
extra={"auto_indent": [value]} to the call to logging.log() or
using a --log-auto-indent [value] command line or the
log_auto_indent [value] config option.

Default behavior is auto-indent off.

Using the string "True" or "on" or the boolean True as the value
turns auto indent on, using the string "False" or "off" or the
boolean False or the int 0 turns it off, and specifying a
positive integer fixes the indentation position to the value
specified.

Any other values for the option are invalid, and will silently be
converted to the default.

:param None|bool|int|str auto_indent_option:
    User specified option for indentation from command line, config
    or extra kwarg. Accepts int, bool or str. str option accepts the
    same range of values as boolean config options, as well as
    positive integers represented in str form.

:returns:
    Indentation value, which can be
    -1 (automatically determine indentation) or
    0 (auto-indent turned off) or
    >0 (explicitly set indentation position).

---
## add_option_ini
```python
from logging import add_option_ini
```



---
## __enter__
```python
from logging import __enter__
```



---
## __exit__
```python
from logging import __exit__
```



---
## reset
```python
from logging import reset
```



---
## clear
```python
from logging import clear
```



---
## handleError
```python
from logging import handleError
```

Called when logging is unable to log some output.

---
## _finalize
```python
from logging import _finalize
```

Finalize the fixture.

This restores the log levels and the disabled logging levels changed by :meth:`set_level`.

---
## handler
```python
from logging import handler
```

Get the logging handler used by the fixture.

---
## get_records
```python
from logging import get_records
```

Get the logging records for one of the possible test phases.

:param when:
    Which test phase to obtain the records from.
    Valid values are: "setup", "call" and "teardown".

:returns: The list of captured records at the given stage.

.. versionadded:: 3.4

---
## text
```python
from logging import text
```

The formatted log text.

---
## records
```python
from logging import records
```

The list of log records.

---
## record_tuples
```python
from logging import record_tuples
```

A list of a stripped down version of log records intended
for use in assertion comparison.

The format of the tuple is:

    (logger_name, log_level, message)

---
## messages
```python
from logging import messages
```

A list of format-interpolated log messages.

Unlike 'records', which contains the format string and parameters for
interpolation, log messages in this list are all interpolated.

Unlike 'text', which contains the output from the handler, log
messages in this list are unadorned with levels, timestamps, etc,
making exact comparisons more reliable.

Note that traceback or stack info (from :func:`logging.exception` or
the `exc_info` or `stack_info` arguments to the logging functions) is
not included, as this is added by the formatter in the handler.

.. versionadded:: 3.7

---
## _force_enable_logging
```python
from logging import _force_enable_logging
```

Enable the desired logging level if the global level was disabled via ``logging.disabled``.

Only enables logging levels greater than or equal to the requested ``level``.

Does nothing if the desired ``level`` wasn't disabled.

:param level:
    The logger level caplog should capture.
    All logging is enabled if a non-standard logging level string is supplied.
    Valid level strings are in :data:`logging._nameToLevel`.
:param logger_obj: The logger object to check.

:return: The original disabled logging level.

---
## set_level
```python
from logging import set_level
```

Set the threshold level of a logger for the duration of a test.

Logging messages which are less severe than this level will not be captured.

.. versionchanged:: 3.4
    The levels of the loggers changed by this function will be
    restored to their initial values at the end of the test.

Will enable the requested logging level if it was disabled via :func:`logging.disable`.

:param level: The level.
:param logger: The logger to update. If not given, the root logger.

---
## at_level
```python
from logging import at_level
```

Context manager that sets the level for capturing of logs. After
the end of the 'with' statement the level is restored to its original
value.

Will enable the requested logging level if it was disabled via :func:`logging.disable`.

:param level: The level.
:param logger: The logger to update. If not given, the root logger.

---
## filtering
```python
from logging import filtering
```

Context manager that temporarily adds the given filter to the caplog's
:meth:`handler` for the 'with' statement block, and removes that filter at the
end of the block.

:param filter_: A custom :class:`logging.Filter` object.

.. versionadded:: 7.5

---
## _disable_loggers
```python
from logging import _disable_loggers
```



---
## _create_formatter
```python
from logging import _create_formatter
```



---
## set_log_path
```python
from logging import set_log_path
```

Set the filename parameter for Logging.FileHandler().

Creates parent directory if it does not exist.

.. warning::
    This is an experimental API.

---
## _log_cli_enabled
```python
from logging import _log_cli_enabled
```

Return whether live logging is enabled.

---
## pytest_sessionstart
```python
from logging import pytest_sessionstart
```



---
## pytest_collection
```python
from logging import pytest_collection
```



---
## pytest_runtestloop
```python
from logging import pytest_runtestloop
```



---
## pytest_runtest_logstart
```python
from logging import pytest_runtest_logstart
```



---
## pytest_runtest_logreport
```python
from logging import pytest_runtest_logreport
```



---
## _runtest_for
```python
from logging import _runtest_for
```

Implement the internals of the pytest_runtest_xxx() hooks.

---
## pytest_runtest_setup
```python
from logging import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from logging import pytest_runtest_call
```



---
## pytest_runtest_teardown
```python
from logging import pytest_runtest_teardown
```



---
## pytest_runtest_logfinish
```python
from logging import pytest_runtest_logfinish
```



---
## pytest_sessionfinish
```python
from logging import pytest_sessionfinish
```



---
## pytest_unconfigure
```python
from logging import pytest_unconfigure
```



---
## set_when
```python
from logging import set_when
```



---
## __name__
```python
from unittest import __name__
```

Discover and run std-library "unittest" style tests.

---
## pytest_pycollect_makeitem
```python
from unittest import pytest_pycollect_makeitem
```



---
## UnitTestCase
```python
from unittest import UnitTestCase
```



---
## TestCaseFunction
```python
from unittest import TestCaseFunction
```



---
## pytest_runtest_makereport
```python
from unittest import pytest_runtest_makereport
```



---
## pytest_runtest_protocol
```python
from unittest import pytest_runtest_protocol
```



---
## _is_skipped
```python
from unittest import _is_skipped
```

Return True if the given object has been marked with @unittest.skip.

---
## newinstance
```python
from unittest import newinstance
```



---
## collect
```python
from unittest import collect
```



---
## _register_unittest_setup_class_fixture
```python
from unittest import _register_unittest_setup_class_fixture
```

Register an auto-use fixture to invoke setUpClass and
tearDownClass (#517).

---
## _register_unittest_setup_method_fixture
```python
from unittest import _register_unittest_setup_method_fixture
```

Register an auto-use fixture to invoke setup_method and
teardown_method (#517).

---
## _getinstance
```python
from unittest import _getinstance
```



---
## _testcase
```python
from unittest import _testcase
```



---
## setup
```python
from unittest import setup
```



---
## teardown
```python
from unittest import teardown
```



---
## startTest
```python
from unittest import startTest
```



---
## _addexcinfo
```python
from unittest import _addexcinfo
```



---
## addError
```python
from unittest import addError
```



---
## addFailure
```python
from unittest import addFailure
```



---
## addSkip
```python
from unittest import addSkip
```



---
## addExpectedFailure
```python
from unittest import addExpectedFailure
```



---
## addUnexpectedSuccess
```python
from unittest import addUnexpectedSuccess
```



---
## addSuccess
```python
from unittest import addSuccess
```



---
## stopTest
```python
from unittest import stopTest
```



---
## addDuration
```python
from unittest import addDuration
```



---
## runtest
```python
from unittest import runtest
```



---
## _traceback_filter
```python
from unittest import _traceback_filter
```



---
## process_teardown_exceptions
```python
from unittest import process_teardown_exceptions
```



---
## unittest_setup_class_fixture
```python
from unittest import unittest_setup_class_fixture
```



---
## unittest_setup_method_fixture
```python
from unittest import unittest_setup_method_fixture
```



---
## excstore
```python
from unittest import excstore
```



---
## __name__
```python
from python_path import __name__
```



---
## pytest_addoption
```python
from python_path import pytest_addoption
```



---
## pytest_load_initial_conftests
```python
from python_path import pytest_load_initial_conftests
```



---
## pytest_unconfigure
```python
from python_path import pytest_unconfigure
```



---
## __name__
```python
from runner import __name__
```

Basic collect and runtest protocol implementations.

---
## pytest_addoption
```python
from runner import pytest_addoption
```



---
## pytest_terminal_summary
```python
from runner import pytest_terminal_summary
```



---
## pytest_sessionstart
```python
from runner import pytest_sessionstart
```



---
## pytest_sessionfinish
```python
from runner import pytest_sessionfinish
```



---
## pytest_runtest_protocol
```python
from runner import pytest_runtest_protocol
```



---
## runtestprotocol
```python
from runner import runtestprotocol
```



---
## show_test_item
```python
from runner import show_test_item
```

Show test function, parameters and the fixtures of the test item.

---
## pytest_runtest_setup
```python
from runner import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from runner import pytest_runtest_call
```



---
## pytest_runtest_teardown
```python
from runner import pytest_runtest_teardown
```



---
## _update_current_test_var
```python
from runner import _update_current_test_var
```

Update :envvar:`PYTEST_CURRENT_TEST` to reflect the current item and stage.

If ``when`` is None, delete ``PYTEST_CURRENT_TEST`` from the environment.

---
## pytest_report_teststatus
```python
from runner import pytest_report_teststatus
```



---
## call_and_report
```python
from runner import call_and_report
```



---
## check_interactive_exception
```python
from runner import check_interactive_exception
```

Check whether the call raised an exception that should be reported as
interactive.

---
## CallInfo
```python
from runner import CallInfo
```

Result/Exception info of a function invocation.

---
## pytest_runtest_makereport
```python
from runner import pytest_runtest_makereport
```



---
## pytest_make_collect_report
```python
from runner import pytest_make_collect_report
```



---
## SetupState
```python
from runner import SetupState
```

Shared state for setting up/tearing down test items or collectors
in a session.

Suppose we have a collection tree as follows:

<Session session>
    <Module mod1>
        <Function item1>
    <Module mod2>
        <Function item2>

The SetupState maintains a stack. The stack starts out empty:

    []

During the setup phase of item1, setup(item1) is called. What it does
is:

    push session to stack, run session.setup()
    push mod1 to stack, run mod1.setup()
    push item1 to stack, run item1.setup()

The stack is:

    [session, mod1, item1]

While the stack is in this shape, it is allowed to add finalizers to
each of session, mod1, item1 using addfinalizer().

During the teardown phase of item1, teardown_exact(item2) is called,
where item2 is the next item to item1. What it does is:

    pop item1 from stack, run its teardowns
    pop mod1 from stack, run its teardowns

mod1 was popped because it ended its purpose with item1. The stack is:

    [session]

During the setup phase of item2, setup(item2) is called. What it does
is:

    push mod2 to stack, run mod2.setup()
    push item2 to stack, run item2.setup()

Stack:

    [session, mod2, item2]

During the teardown phase of item2, teardown_exact(None) is called,
because item2 is the last item. What it does is:

    pop item2 from stack, run its teardowns
    pop mod2 from stack, run its teardowns
    pop session from stack, run its teardowns

Stack:

    []

The end!

---
## collect_one_node
```python
from runner import collect_one_node
```



---
## __init__
```python
from runner import __init__
```



---
## result
```python
from runner import result
```

The return value of the call, if it didn't raise.

Can only be accessed if excinfo is None.

---
## from_call
```python
from runner import from_call
```

Call func, wrapping the result in a CallInfo.

:param func:
    The function to call. Called without arguments.
:type func: Callable[[], _pytest.runner.TResult]
:param when:
    The phase in which the function is called.
:param reraise:
    Exception or exceptions that shall propagate if raised by the
    function, instead of being wrapped in the CallInfo.

---
## __repr__
```python
from runner import __repr__
```



---
## collect
```python
from runner import collect
```



---
## setup
```python
from runner import setup
```

Setup objects along the collector chain to the item.

---
## addfinalizer
```python
from runner import addfinalizer
```

Attach a finalizer to the given node.

The node must be currently active in the stack.

---
## teardown_exact
```python
from runner import teardown_exact
```

Teardown the current stack up until reaching nodes that nextitem
also descends from.

When nextitem is None (meaning we're at the last item), the entire
stack is torn down.

---
## __name__
```python
from helpconfig import __name__
```

Version info, help messages, tracing configuration.

---
## HelpAction
```python
from helpconfig import HelpAction
```

An argparse Action that will raise an exception in order to skip the
rest of the argument parsing when --help is passed.

This prevents argparse from quitting due to missing required arguments
when any are defined, for example by ``pytest_addoption``.
This is similar to the way that the builtin argparse --help option is
implemented by raising SystemExit.

---
## pytest_addoption
```python
from helpconfig import pytest_addoption
```



---
## pytest_cmdline_parse
```python
from helpconfig import pytest_cmdline_parse
```



---
## showversion
```python
from helpconfig import showversion
```



---
## pytest_cmdline_main
```python
from helpconfig import pytest_cmdline_main
```



---
## showhelp
```python
from helpconfig import showhelp
```



---
## getpluginversioninfo
```python
from helpconfig import getpluginversioninfo
```



---
## pytest_report_header
```python
from helpconfig import pytest_report_header
```



---
## __init__
```python
from helpconfig import __init__
```



---
## __call__
```python
from helpconfig import __call__
```



---
## unset_tracing
```python
from helpconfig import unset_tracing
```



---
## __name__
```python
from pastebin import __name__
```

Submit failure or test session information to a pastebin service.

---
## pytest_addoption
```python
from pastebin import pytest_addoption
```



---
## pytest_configure
```python
from pastebin import pytest_configure
```



---
## pytest_unconfigure
```python
from pastebin import pytest_unconfigure
```



---
## create_new_paste
```python
from pastebin import create_new_paste
```

Create a new paste using the bpaste.net service.

:contents: Paste contents string.
:returns: URL to the pasted contents, or an error message.

---
## pytest_terminal_summary
```python
from pastebin import pytest_terminal_summary
```



---
## tee_write
```python
from pastebin import tee_write
```



---
## legacy_path
```python
from compat import legacy_path
```

Internal wrapper to prepare lazy proxies for legacy_path instances

---
## NotSetType
```python
from compat import NotSetType
```



---
## is_generator
```python
from compat import is_generator
```



---
## iscoroutinefunction
```python
from compat import iscoroutinefunction
```

Return True if func is a coroutine function (a function defined with async
def syntax, and doesn't contain yield), or a function decorated with
@asyncio.coroutine.

Note: copied and modified from Python 3.5's builtin coroutines.py to avoid
importing asyncio directly, which in turns also initializes the "logging"
module as a side-effect (see issue #8).

---
## is_async_function
```python
from compat import is_async_function
```

Return True if the given function seems to be an async function or
an async generator.

---
## getlocation
```python
from compat import getlocation
```



---
## num_mock_patch_args
```python
from compat import num_mock_patch_args
```

Return number of arguments used up by mock arguments (if any).

---
## getfuncargnames
```python
from compat import getfuncargnames
```

Return the names of a function's mandatory arguments.

Should return the names of all function arguments that:
* Aren't bound to an instance or type as in instance or class methods.
* Don't have default values.
* Aren't bound with functools.partial.
* Aren't replaced with mocks.

The cls arguments indicate that the function should be treated as a bound
method even though it's not unless the function is a static method.

The name parameter should be the original name in which the function was collected.

---
## get_default_arg_names
```python
from compat import get_default_arg_names
```



---
## ascii_escaped
```python
from compat import ascii_escaped
```

If val is pure ASCII, return it as an str, otherwise, escape
bytes objects into a sequence of escaped bytes:

b'\xc3\xb4\xc5\xd6' -> r'\xc3\xb4\xc5\xd6'

and escapes strings into a sequence of escaped unicode ids, e.g.:

r'4\nV\U00043efa\x0eMXWB\x1e\u3028\u15fd\xcd\U0007d944'

Note:
   The obvious "v.decode('unicode-escape')" will return
   valid UTF-8 unicode if it finds them in bytes, but we
   want to return escaped bytes for any byte, even if they match
   a UTF-8 string.

---
## _PytestWrapper
```python
from compat import _PytestWrapper
```

Dummy wrapper around a function object for internal use only.

Used to correctly unwrap the underlying function object when we are
creating fixtures, because we wrap the function object ourselves with a
decorator to issue warnings when the fixture function is called directly.

---
## get_real_func
```python
from compat import get_real_func
```

Get the real function object of the (possibly) wrapped object by
functools.wraps or functools.partial.

---
## get_real_method
```python
from compat import get_real_method
```

Attempt to obtain the real function object that might be wrapping
``obj``, while at the same time returning a bound method to ``holder`` if
the original object was a bound method.

---
## getimfunc
```python
from compat import getimfunc
```



---
## safe_getattr
```python
from compat import safe_getattr
```

Like getattr but return default upon any Exception or any OutcomeException.

Attribute access can potentially fail for 'evil' Python objects.
See issue #214.
It catches OutcomeException because of #2490 (issue #580), new outcomes
are derived from BaseException instead of Exception (for more details
check #2707).

---
## safe_isclass
```python
from compat import safe_isclass
```

Ignore any exception via isinstance on Python 3.

---
## get_user_id
```python
from compat import get_user_id
```

Return the current process's real user id or None if it could not be
determined.

:return: The user id or None if it could not be determined.

---
## assert_never
```python
from compat import assert_never
```



---
## __name__
```python
from terminal import __name__
```

pygments.formatters.terminal
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for terminal output with ANSI sequences.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MoreQuietAction
```python
from terminal import MoreQuietAction
```

A modified copy of the argparse count action which counts down and updates
the legacy quiet attribute at the same time.

Used to unify verbosity handling.

---
## TestShortLogReport
```python
from terminal import TestShortLogReport
```

Used to store the test status result category, shortletter and verbose word.
For example ``"rerun", "R", ("RERUN", {"yellow": True})``.

:ivar category:
    The class of result, for example ``“passed”``, ``“skipped”``, ``“error”``, or the empty string.

:ivar letter:
    The short letter shown as testing progresses, for example ``"."``, ``"s"``, ``"E"``, or the empty string.

:ivar word:
    Verbose word is shown as testing progresses in verbose mode, for example ``"PASSED"``, ``"SKIPPED"``,
    ``"ERROR"``, or the empty string.

---
## pytest_addoption
```python
from terminal import pytest_addoption
```



---
## pytest_configure
```python
from terminal import pytest_configure
```



---
## getreportopt
```python
from terminal import getreportopt
```



---
## pytest_report_teststatus
```python
from terminal import pytest_report_teststatus
```



---
## WarningReport
```python
from terminal import WarningReport
```

Simple structure to hold warnings information captured by ``pytest_warning_recorded``.

:ivar str message:
    User friendly message about the warning.
:ivar str|None nodeid:
    nodeid that generated the warning (see ``get_location``).
:ivar tuple fslocation:
    File system location of the source of the warning (see ``get_location``).

---
## TerminalReporter
```python
from terminal import TerminalReporter
```



---
## _get_node_id_with_markup
```python
from terminal import _get_node_id_with_markup
```



---
## _format_trimmed
```python
from terminal import _format_trimmed
```

Format msg into format, ellipsizing it if doesn't fit in available_width.

Returns None if even the ellipsis can't fit.

---
## _get_line_with_reprcrash_message
```python
from terminal import _get_line_with_reprcrash_message
```

Get summary line for a report, trying to add reprcrash message.

---
## _folded_skips
```python
from terminal import _folded_skips
```



---
## pluralize
```python
from terminal import pluralize
```



---
## _plugin_nameversions
```python
from terminal import _plugin_nameversions
```



---
## format_session_duration
```python
from terminal import format_session_duration
```

Format the given seconds in a human readable manner to show in the final summary.

---
## _get_raw_skip_reason
```python
from terminal import _get_raw_skip_reason
```

Get the reason string of a skip/xfail/xpass test report.

The string is just the part given by the user.

---
## __init__
```python
from terminal import __init__
```



---
## __call__
```python
from terminal import __call__
```



---
## get_location
```python
from terminal import get_location
```

Return the more user-friendly information about the location of a warning, or None.

---
## _determine_show_progress_info
```python
from terminal import _determine_show_progress_info
```

Return whether we should display progress information based on the current config.

---
## verbosity
```python
from terminal import verbosity
```



---
## showheader
```python
from terminal import showheader
```



---
## no_header
```python
from terminal import no_header
```



---
## no_summary
```python
from terminal import no_summary
```



---
## showfspath
```python
from terminal import showfspath
```



---
## showlongtestinfo
```python
from terminal import showlongtestinfo
```



---
## hasopt
```python
from terminal import hasopt
```



---
## write_fspath_result
```python
from terminal import write_fspath_result
```



---
## write_ensure_prefix
```python
from terminal import write_ensure_prefix
```



---
## ensure_newline
```python
from terminal import ensure_newline
```



---
## wrap_write
```python
from terminal import wrap_write
```

Wrap message with margin for progress info.

---
## write
```python
from terminal import write
```



---
## flush
```python
from terminal import flush
```



---
## write_line
```python
from terminal import write_line
```



---
## rewrite
```python
from terminal import rewrite
```

Rewinds the terminal cursor to the beginning and writes the given line.

:param erase:
    If True, will also add spaces until the full terminal width to ensure
    previous lines are properly erased.

The rest of the keyword arguments are markup instructions.

---
## write_sep
```python
from terminal import write_sep
```



---
## section
```python
from terminal import section
```



---
## line
```python
from terminal import line
```



---
## _add_stats
```python
from terminal import _add_stats
```



---
## pytest_internalerror
```python
from terminal import pytest_internalerror
```



---
## pytest_warning_recorded
```python
from terminal import pytest_warning_recorded
```



---
## pytest_plugin_registered
```python
from terminal import pytest_plugin_registered
```



---
## pytest_deselected
```python
from terminal import pytest_deselected
```



---
## pytest_runtest_logstart
```python
from terminal import pytest_runtest_logstart
```



---
## pytest_runtest_logreport
```python
from terminal import pytest_runtest_logreport
```



---
## _is_last_item
```python
from terminal import _is_last_item
```



---
## pytest_runtestloop
```python
from terminal import pytest_runtestloop
```



---
## _get_progress_information_message
```python
from terminal import _get_progress_information_message
```



---
## _write_progress_information_if_past_edge
```python
from terminal import _write_progress_information_if_past_edge
```



---
## _write_progress_information_filling_space
```python
from terminal import _write_progress_information_filling_space
```



---
## _width_of_current_line
```python
from terminal import _width_of_current_line
```

Return the width of the current line.

---
## pytest_collection
```python
from terminal import pytest_collection
```



---
## pytest_collectreport
```python
from terminal import pytest_collectreport
```



---
## report_collect
```python
from terminal import report_collect
```



---
## pytest_sessionstart
```python
from terminal import pytest_sessionstart
```



---
## _write_report_lines_from_hooks
```python
from terminal import _write_report_lines_from_hooks
```



---
## pytest_report_header
```python
from terminal import pytest_report_header
```



---
## pytest_collection_finish
```python
from terminal import pytest_collection_finish
```



---
## _printcollecteditems
```python
from terminal import _printcollecteditems
```



---
## pytest_sessionfinish
```python
from terminal import pytest_sessionfinish
```



---
## pytest_terminal_summary
```python
from terminal import pytest_terminal_summary
```



---
## pytest_keyboard_interrupt
```python
from terminal import pytest_keyboard_interrupt
```



---
## pytest_unconfigure
```python
from terminal import pytest_unconfigure
```



---
## _report_keyboardinterrupt
```python
from terminal import _report_keyboardinterrupt
```



---
## _locationline
```python
from terminal import _locationline
```



---
## _getfailureheadline
```python
from terminal import _getfailureheadline
```



---
## _getcrashline
```python
from terminal import _getcrashline
```



---
## getreports
```python
from terminal import getreports
```



---
## summary_warnings
```python
from terminal import summary_warnings
```



---
## summary_passes
```python
from terminal import summary_passes
```



---
## summary_xpasses
```python
from terminal import summary_xpasses
```



---
## summary_passes_combined
```python
from terminal import summary_passes_combined
```



---
## _get_teardown_reports
```python
from terminal import _get_teardown_reports
```



---
## _handle_teardown_sections
```python
from terminal import _handle_teardown_sections
```



---
## print_teardown_sections
```python
from terminal import print_teardown_sections
```



---
## summary_failures
```python
from terminal import summary_failures
```



---
## summary_xfailures
```python
from terminal import summary_xfailures
```



---
## summary_failures_combined
```python
from terminal import summary_failures_combined
```



---
## summary_errors
```python
from terminal import summary_errors
```



---
## _outrep_summary
```python
from terminal import _outrep_summary
```



---
## summary_stats
```python
from terminal import summary_stats
```



---
## short_test_summary
```python
from terminal import short_test_summary
```



---
## _get_main_color
```python
from terminal import _get_main_color
```



---
## _determine_main_color
```python
from terminal import _determine_main_color
```



---
## _set_main_color
```python
from terminal import _set_main_color
```



---
## build_summary_stats_line
```python
from terminal import build_summary_stats_line
```

Build the parts used in the last summary stats line.

The summary stats line is the line shown at the end, "=== 12 passed, 2 errors in Xs===".

This function builds a list of the "parts" that make up for the text in that line, in
the example above it would be:

    [
        ("12 passed", {"green": True}),
        ("2 errors", {"red": True}
    ]

That last dict for each line is a "markup dictionary", used by TerminalWriter to
color output.

The final color of the line is also determined by this function, and is the second
element of the returned tuple.

---
## _get_reports_to_display
```python
from terminal import _get_reports_to_display
```

Get test/collection reports for the given status key, such as `passed` or `error`.

---
## _build_normal_summary_stats_line
```python
from terminal import _build_normal_summary_stats_line
```



---
## _build_collect_only_summary_stats_line
```python
from terminal import _build_collect_only_summary_stats_line
```



---
## mywriter
```python
from terminal import mywriter
```



---
## mkrel
```python
from terminal import mkrel
```



---
## show_simple
```python
from terminal import show_simple
```



---
## show_xfailed
```python
from terminal import show_xfailed
```



---
## show_xpassed
```python
from terminal import show_xpassed
```



---
## show_skipped_folded
```python
from terminal import show_skipped_folded
```



---
## show_skipped_unfolded
```python
from terminal import show_skipped_unfolded
```



---
## show_skipped
```python
from terminal import show_skipped
```



---
## collapsed_location_report
```python
from terminal import collapsed_location_report
```



---
## pytest_configure
```python
from warnings import pytest_configure
```



---
## catch_warnings_for_item
```python
from warnings import catch_warnings_for_item
```

Context manager that catches warnings generated in the contained execution block.

``item`` can be None if we are not in the context of an item execution.

Each warning captured triggers the ``pytest_warning_recorded`` hook.

---
## warning_record_to_str
```python
from warnings import warning_record_to_str
```

Convert a warnings.WarningMessage to a string.

---
## pytest_runtest_protocol
```python
from warnings import pytest_runtest_protocol
```



---
## pytest_collection
```python
from warnings import pytest_collection
```



---
## pytest_terminal_summary
```python
from warnings import pytest_terminal_summary
```



---
## pytest_sessionfinish
```python
from warnings import pytest_sessionfinish
```



---
## pytest_load_initial_conftests
```python
from warnings import pytest_load_initial_conftests
```



---
## __name__
```python
from pytester_assertions import __name__
```

Helper plugin for pytester; should not be loaded on its own.

---
## assertoutcome
```python
from pytester_assertions import assertoutcome
```



---
## assert_outcomes
```python
from pytester_assertions import assert_outcomes
```

Assert that the specified outcomes appear with the respective
numbers (0 means it didn't occur) in the text output from a test run.

---
## __name__
```python
from deprecated import __name__
```

A collection of functions deprecated in requests.utils.

---
## check_ispytest
```python
from deprecated import check_ispytest
```



---
## __name__
```python
from recwarn import __name__
```

Record warnings during test function execution.

---
## recwarn
```python
from recwarn import recwarn
```

Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.

See https://docs.pytest.org/en/latest/how-to/capture-warnings.html for information
on warning categories.

---
## deprecated_call
```python
from recwarn import deprecated_call
```

Assert that code produces a ``DeprecationWarning`` or ``PendingDeprecationWarning`` or ``FutureWarning``.

This function can be used as a context manager::

    >>> import warnings
    >>> def api_call_v2():
    ...     warnings.warn('use v3 of this api', DeprecationWarning)
    ...     return 200

    >>> import pytest
    >>> with pytest.deprecated_call():
    ...    assert api_call_v2() == 200

It can also be used by passing a function and ``*args`` and ``**kwargs``,
in which case it will ensure calling ``func(*args, **kwargs)`` produces one of
the warnings types above. The return value is the return value of the function.

In the context manager form you may use the keyword argument ``match`` to assert
that the warning matches a text or regex.

The context manager produces a list of :class:`warnings.WarningMessage` objects,
one for each warning raised.

---
## warns
```python
from recwarn import warns
```

Assert that code raises a particular class of warning.

Specifically, the parameter ``expected_warning`` can be a warning class or tuple
of warning classes, and the code inside the ``with`` block must issue at least one
warning of that class or classes.

This helper produces a list of :class:`warnings.WarningMessage` objects, one for
each warning emitted (regardless of whether it is an ``expected_warning`` or not).
Since pytest 8.0, unmatched warnings are also re-emitted when the context closes.

This function can be used as a context manager::

    >>> import pytest
    >>> with pytest.warns(RuntimeWarning):
    ...    warnings.warn("my warning", RuntimeWarning)

In the context manager form you may use the keyword argument ``match`` to assert
that the warning matches a text or regex::

    >>> with pytest.warns(UserWarning, match='must be 0 or None'):
    ...     warnings.warn("value must be 0 or None", UserWarning)

    >>> with pytest.warns(UserWarning, match=r'must be \d+$'):
    ...     warnings.warn("value must be 42", UserWarning)

    >>> with pytest.warns(UserWarning):  # catch re-emitted warning
    ...     with pytest.warns(UserWarning, match=r'must be \d+$'):
    ...         warnings.warn("this is not here", UserWarning)
    Traceback (most recent call last):
      ...
    Failed: DID NOT WARN. No warnings of type ...UserWarning... were emitted...

**Using with** ``pytest.mark.parametrize``

When using :ref:`pytest.mark.parametrize ref` it is possible to parametrize tests
such that some runs raise a warning and others do not.

This could be achieved in the same way as with exceptions, see
:ref:`parametrizing_conditional_raising` for an example.

---
## WarningsRecorder
```python
from recwarn import WarningsRecorder
```

A context manager to record raised warnings.

Each recorded warning is an instance of :class:`warnings.WarningMessage`.

Adapted from `warnings.catch_warnings`.

.. note::
    ``DeprecationWarning`` and ``PendingDeprecationWarning`` are treated
    differently; see :ref:`ensuring_function_triggers`.

---
## WarningsChecker
```python
from recwarn import WarningsChecker
```



---
## __init__
```python
from recwarn import __init__
```



---
## list
```python
from recwarn import list
```

The list of recorded warnings.

---
## __getitem__
```python
from recwarn import __getitem__
```

Get a recorded warning by index.

---
## __iter__
```python
from recwarn import __iter__
```

Iterate through the recorded warnings.

---
## __len__
```python
from recwarn import __len__
```

The number of recorded warnings.

---
## pop
```python
from recwarn import pop
```

Pop the first recorded warning which is an instance of ``cls``,
but not an instance of a child class of any other match.
Raises ``AssertionError`` if there is no match.

---
## clear
```python
from recwarn import clear
```

Clear the list of recorded warnings.

---
## __enter__
```python
from recwarn import __enter__
```



---
## __exit__
```python
from recwarn import __exit__
```



---
## matches
```python
from recwarn import matches
```



---
## found_str
```python
from recwarn import found_str
```



---
## __name__
```python
from tmpdir import __name__
```

Support for providing temporary directories to test functions.

---
## TempPathFactory
```python
from tmpdir import TempPathFactory
```

Factory for temporary directories under the common base temp directory.

The base directory can be configured using the ``--basetemp`` option.

---
## get_user
```python
from tmpdir import get_user
```

Return the current user name, or None if getuser() does not work
in the current environment (see #1010).

---
## pytest_configure
```python
from tmpdir import pytest_configure
```

Create a TempPathFactory and attach it to the config object.

This is to comply with existing plugins which expect the handler to be
available at pytest_configure time, but ideally should be moved entirely
to the tmp_path_factory session fixture.

---
## pytest_addoption
```python
from tmpdir import pytest_addoption
```



---
## tmp_path_factory
```python
from tmpdir import tmp_path_factory
```

Return a :class:`pytest.TempPathFactory` instance for the test session.

---
## _mk_tmp
```python
from tmpdir import _mk_tmp
```



---
## tmp_path
```python
from tmpdir import tmp_path
```

Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.

By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging.
This behavior can be configured with :confval:`tmp_path_retention_count` and
:confval:`tmp_path_retention_policy`.
If ``--basetemp`` is used then it is cleared each session. See
:ref:`temporary directory location and retention`.

The returned object is a :class:`pathlib.Path` object.

---
## pytest_sessionfinish
```python
from tmpdir import pytest_sessionfinish
```

After each session, remove base directory if all the tests passed,
the policy is "failed", and the basetemp is not specified by a user.

---
## pytest_runtest_makereport
```python
from tmpdir import pytest_runtest_makereport
```



---
## __init__
```python
from tmpdir import __init__
```



---
## from_config
```python
from tmpdir import from_config
```

Create a factory according to pytest configuration.

:meta private:

---
## _ensure_relative_to_basetemp
```python
from tmpdir import _ensure_relative_to_basetemp
```



---
## mktemp
```python
from tmpdir import mktemp
```

Create a new temporary directory managed by the factory.

:param basename:
    Directory base name, must be a relative path.

:param numbered:
    If ``True``, ensure the directory is unique by adding a numbered
    suffix greater than any existing one: ``basename="foo-"`` and ``numbered=True``
    means that this function will create directories named ``"foo-0"``,
    ``"foo-1"``, ``"foo-2"`` and so on.

:returns:
    The path to the new directory.

---
## getbasetemp
```python
from tmpdir import getbasetemp
```

Return the base temporary directory, creating it if needed.

:returns:
    The base temporary directory.

---
## __name__
```python
from stash import __name__
```



---
## StashKey
```python
from stash import StashKey
```

``StashKey`` is an object used as a key to a :class:`Stash`.

A ``StashKey`` is associated with the type ``T`` of the value of the key.

A ``StashKey`` is unique and cannot conflict with another key.

.. versionadded:: 7.0

---
## Stash
```python
from stash import Stash
```

``Stash`` is a type-safe heterogeneous mutable mapping that
allows keys and value types to be defined separately from
where it (the ``Stash``) is created.

Usually you will be given an object which has a ``Stash``, for example
:class:`~pytest.Config` or a :class:`~_pytest.nodes.Node`:

.. code-block:: python

    stash: Stash = some_object.stash

If a module or plugin wants to store data in this ``Stash``, it creates
:class:`StashKey`\s for its keys (at the module level):

.. code-block:: python

    # At the top-level of the module
    some_str_key = StashKey[str]()
    some_bool_key = StashKey[bool]()

To store information:

.. code-block:: python

    # Value type must match the key.
    stash[some_str_key] = "value"
    stash[some_bool_key] = True

To retrieve the information:

.. code-block:: python

    # The static type of some_str is str.
    some_str = stash[some_str_key]
    # The static type of some_bool is bool.
    some_bool = stash[some_bool_key]

.. versionadded:: 7.0

---
## __init__
```python
from stash import __init__
```



---
## __setitem__
```python
from stash import __setitem__
```

Set a value for key.

---
## __getitem__
```python
from stash import __getitem__
```

Get the value for key.

Raises ``KeyError`` if the key wasn't set before.

---
## get
```python
from stash import get
```

Get the value for key, or return default if the key wasn't set
before.

---
## setdefault
```python
from stash import setdefault
```

Return the value of key if already set, otherwise set the value
of key to default and return default.

---
## __delitem__
```python
from stash import __delitem__
```

Delete the value for key.

Raises ``KeyError`` if the key wasn't set before.

---
## __contains__
```python
from stash import __contains__
```

Return whether key was set.

---
## __len__
```python
from stash import __len__
```

Return how many items exist in the stash.

---
## __name__
```python
from debugging import __name__
```

Interactive debugging with PDB, the Python Debugger.

---
## _validate_usepdb_cls
```python
from debugging import _validate_usepdb_cls
```

Validate syntax of --pdbcls option.

---
## pytest_addoption
```python
from debugging import pytest_addoption
```



---
## pytest_configure
```python
from debugging import pytest_configure
```



---
## pytestPDB
```python
from debugging import pytestPDB
```

Pseudo PDB that defers to the real pdb.

---
## PdbInvoke
```python
from debugging import PdbInvoke
```



---
## PdbTrace
```python
from debugging import PdbTrace
```



---
## wrap_pytest_function_for_tracing
```python
from debugging import wrap_pytest_function_for_tracing
```

Change the Python function object of the given Function item by a
wrapper which actually enters pdb before calling the python function
itself, effectively leaving the user in the pdb prompt in the first
statement of the function.

---
## maybe_wrap_pytest_function_for_tracing
```python
from debugging import maybe_wrap_pytest_function_for_tracing
```

Wrap the given pytestfunct item for tracing support if --trace was given in
the command line.

---
## _enter_pdb
```python
from debugging import _enter_pdb
```



---
## _postmortem_traceback
```python
from debugging import _postmortem_traceback
```



---
## post_mortem
```python
from debugging import post_mortem
```



---
## fin
```python
from debugging import fin
```



---
## _is_capturing
```python
from debugging import _is_capturing
```



---
## _import_pdb_cls
```python
from debugging import _import_pdb_cls
```



---
## _get_pdb_wrapper_class
```python
from debugging import _get_pdb_wrapper_class
```



---
## _init_pdb
```python
from debugging import _init_pdb
```

Initialize PDB debugging, dropping any IO capturing.

---
## set_trace
```python
from debugging import set_trace
```

Invoke debugging via ``Pdb.set_trace``, dropping any IO capturing.

---
## pytest_exception_interact
```python
from debugging import pytest_exception_interact
```



---
## pytest_internalerror
```python
from debugging import pytest_internalerror
```



---
## pytest_pyfunc_call
```python
from debugging import pytest_pyfunc_call
```



---
## wrapper
```python
from debugging import wrapper
```



---
## PytestPdbWrapper
```python
from debugging import PytestPdbWrapper
```



---
## do_debug
```python
from debugging import do_debug
```



---
## do_continue
```python
from debugging import do_continue
```



---
## do_quit
```python
from debugging import do_quit
```

Raise Exit outcome when quit command is used in pdb.

This is a bit of a hack - it would be better if BdbQuit
could be handled, but this would require to wrap the
whole pytest run, and adjust the report etc.

---
## setup
```python
from debugging import setup
```

Suspend on setup().

Needed after do_continue resumed, and entering another
breakpoint again.

---
## get_stack
```python
from debugging import get_stack
```



---
## __name__
```python
from python_api import __name__
```



---
## _compare_approx
```python
from python_api import _compare_approx
```



---
## ApproxBase
```python
from python_api import ApproxBase
```

Provide shared utilities for making approximate comparisons between
numbers or sequences of numbers.

---
## _recursive_sequence_map
```python
from python_api import _recursive_sequence_map
```

Recursively map a function over a sequence of arbitrary depth

---
## ApproxNumpy
```python
from python_api import ApproxNumpy
```

Perform approximate comparisons where the expected value is numpy array.

---
## ApproxMapping
```python
from python_api import ApproxMapping
```

Perform approximate comparisons where the expected value is a mapping
with numeric values (the keys can be anything).

---
## ApproxSequenceLike
```python
from python_api import ApproxSequenceLike
```

Perform approximate comparisons where the expected value is a sequence of numbers.

---
## ApproxScalar
```python
from python_api import ApproxScalar
```

Perform approximate comparisons where the expected value is a single number.

---
## ApproxDecimal
```python
from python_api import ApproxDecimal
```

Perform approximate comparisons where the expected value is a Decimal.

---
## approx
```python
from python_api import approx
```

Assert that two numbers (or two ordered sequences of numbers) are equal to each other
within some tolerance.

Due to the :doc:`python:tutorial/floatingpoint`, numbers that we
would intuitively expect to be equal are not always so::

    >>> 0.1 + 0.2 == 0.3
    False

This problem is commonly encountered when writing tests, e.g. when making
sure that floating-point values are what you expect them to be.  One way to
deal with this problem is to assert that two floating-point numbers are
equal to within some appropriate tolerance::

    >>> abs((0.1 + 0.2) - 0.3) < 1e-6
    True

However, comparisons like this are tedious to write and difficult to
understand.  Furthermore, absolute comparisons like the one above are
usually discouraged because there's no tolerance that works well for all
situations.  ``1e-6`` is good for numbers around ``1``, but too small for
very big numbers and too big for very small ones.  It's better to express
the tolerance as a fraction of the expected value, but relative comparisons
like that are even more difficult to write correctly and concisely.

The ``approx`` class performs floating-point comparisons using a syntax
that's as intuitive as possible::

    >>> from pytest import approx
    >>> 0.1 + 0.2 == approx(0.3)
    True

The same syntax also works for ordered sequences of numbers::

    >>> (0.1 + 0.2, 0.2 + 0.4) == approx((0.3, 0.6))
    True

``numpy`` arrays::

    >>> import numpy as np                                                          # doctest: +SKIP
    >>> np.array([0.1, 0.2]) + np.array([0.2, 0.4]) == approx(np.array([0.3, 0.6])) # doctest: +SKIP
    True

And for a ``numpy`` array against a scalar::

    >>> import numpy as np                                         # doctest: +SKIP
    >>> np.array([0.1, 0.2]) + np.array([0.2, 0.1]) == approx(0.3) # doctest: +SKIP
    True

Only ordered sequences are supported, because ``approx`` needs
to infer the relative position of the sequences without ambiguity. This means
``sets`` and other unordered sequences are not supported.

Finally, dictionary *values* can also be compared::

    >>> {'a': 0.1 + 0.2, 'b': 0.2 + 0.4} == approx({'a': 0.3, 'b': 0.6})
    True

The comparison will be true if both mappings have the same keys and their
respective values match the expected tolerances.

**Tolerances**

By default, ``approx`` considers numbers within a relative tolerance of
``1e-6`` (i.e. one part in a million) of its expected value to be equal.
This treatment would lead to surprising results if the expected value was
``0.0``, because nothing but ``0.0`` itself is relatively close to ``0.0``.
To handle this case less surprisingly, ``approx`` also considers numbers
within an absolute tolerance of ``1e-12`` of its expected value to be
equal.  Infinity and NaN are special cases.  Infinity is only considered
equal to itself, regardless of the relative tolerance.  NaN is not
considered equal to anything by default, but you can make it be equal to
itself by setting the ``nan_ok`` argument to True.  (This is meant to
facilitate comparing arrays that use NaN to mean "no data".)

Both the relative and absolute tolerances can be changed by passing
arguments to the ``approx`` constructor::

    >>> 1.0001 == approx(1)
    False
    >>> 1.0001 == approx(1, rel=1e-3)
    True
    >>> 1.0001 == approx(1, abs=1e-3)
    True

If you specify ``abs`` but not ``rel``, the comparison will not consider
the relative tolerance at all.  In other words, two numbers that are within
the default relative tolerance of ``1e-6`` will still be considered unequal
if they exceed the specified absolute tolerance.  If you specify both
``abs`` and ``rel``, the numbers will be considered equal if either
tolerance is met::

    >>> 1 + 1e-8 == approx(1)
    True
    >>> 1 + 1e-8 == approx(1, abs=1e-12)
    False
    >>> 1 + 1e-8 == approx(1, rel=1e-6, abs=1e-12)
    True

You can also use ``approx`` to compare nonnumeric types, or dicts and
sequences containing nonnumeric types, in which case it falls back to
strict equality. This can be useful for comparing dicts and sequences that
can contain optional values::

    >>> {"required": 1.0000005, "optional": None} == approx({"required": 1, "optional": None})
    True
    >>> [None, 1.0000005] == approx([None,1])
    True
    >>> ["foo", 1.0000005] == approx([None,1])
    False

If you're thinking about using ``approx``, then you might want to know how
it compares to other good ways of comparing floating-point numbers.  All of
these algorithms are based on relative and absolute tolerances and should
agree for the most part, but they do have meaningful differences:

- ``math.isclose(a, b, rel_tol=1e-9, abs_tol=0.0)``:  True if the relative
  tolerance is met w.r.t. either ``a`` or ``b`` or if the absolute
  tolerance is met.  Because the relative tolerance is calculated w.r.t.
  both ``a`` and ``b``, this test is symmetric (i.e.  neither ``a`` nor
  ``b`` is a "reference value").  You have to specify an absolute tolerance
  if you want to compare to ``0.0`` because there is no tolerance by
  default.  More information: :py:func:`math.isclose`.

- ``numpy.isclose(a, b, rtol=1e-5, atol=1e-8)``: True if the difference
  between ``a`` and ``b`` is less that the sum of the relative tolerance
  w.r.t. ``b`` and the absolute tolerance.  Because the relative tolerance
  is only calculated w.r.t. ``b``, this test is asymmetric and you can
  think of ``b`` as the reference value.  Support for comparing sequences
  is provided by :py:func:`numpy.allclose`.  More information:
  :std:doc:`numpy:reference/generated/numpy.isclose`.

- ``unittest.TestCase.assertAlmostEqual(a, b)``: True if ``a`` and ``b``
  are within an absolute tolerance of ``1e-7``.  No relative tolerance is
  considered , so this function is not appropriate for very large or very
  small numbers.  Also, it's only available in subclasses of ``unittest.TestCase``
  and it's ugly because it doesn't follow PEP8.  More information:
  :py:meth:`unittest.TestCase.assertAlmostEqual`.

- ``a == pytest.approx(b, rel=1e-6, abs=1e-12)``: True if the relative
  tolerance is met w.r.t. ``b`` or if the absolute tolerance is met.
  Because the relative tolerance is only calculated w.r.t. ``b``, this test
  is asymmetric and you can think of ``b`` as the reference value.  In the
  special case that you explicitly specify an absolute tolerance but not a
  relative tolerance, only the absolute tolerance is considered.

.. note::

    ``approx`` can handle numpy arrays, but we recommend the
    specialised test helpers in :std:doc:`numpy:reference/routines.testing`
    if you need support for comparisons, NaNs, or ULP-based tolerances.

    To match strings using regex, you can use
    `Matches <https://github.com/asottile/re-assert#re_assertmatchespattern-str-args-kwargs>`_
    from the
    `re_assert package <https://github.com/asottile/re-assert>`_.

.. warning::

   .. versionchanged:: 3.2

   In order to avoid inconsistent behavior, :py:exc:`TypeError` is
   raised for ``>``, ``>=``, ``<`` and ``<=`` comparisons.
   The example below illustrates the problem::

       assert approx(0.1) > 0.1 + 1e-10  # calls approx(0.1).__gt__(0.1 + 1e-10)
       assert 0.1 + 1e-10 > approx(0.1)  # calls approx(0.1).__lt__(0.1 + 1e-10)

   In the second example one expects ``approx(0.1).__le__(0.1 + 1e-10)``
   to be called. But instead, ``approx(0.1).__lt__(0.1 + 1e-10)`` is used to
   comparison. This is because the call hierarchy of rich comparisons
   follows a fixed behavior. More information: :py:meth:`object.__ge__`

.. versionchanged:: 3.7.1
   ``approx`` raises ``TypeError`` when it encounters a dict value or
   sequence element of nonnumeric type.

.. versionchanged:: 6.1.0
   ``approx`` falls back to strict equality for nonnumeric types instead
   of raising ``TypeError``.

---
## _is_sequence_like
```python
from python_api import _is_sequence_like
```



---
## _is_numpy_array
```python
from python_api import _is_numpy_array
```

Return true if the given object is implicitly convertible to ndarray,
and numpy is already imported.

---
## _as_numpy_array
```python
from python_api import _as_numpy_array
```

Return an ndarray if the given object is implicitly convertible to ndarray,
and numpy is already imported, otherwise None.

---
## raises
```python
from python_api import raises
```

Assert that a code block/function call raises an exception type, or one of its subclasses.

:param expected_exception:
    The expected exception type, or a tuple if one of multiple possible
    exception types are expected. Note that subclasses of the passed exceptions
    will also match.

:kwparam str | re.Pattern[str] | None match:
    If specified, a string containing a regular expression,
    or a regular expression object, that is tested against the string
    representation of the exception and its :pep:`678` `__notes__`
    using :func:`re.search`.

    To match a literal string that may contain :ref:`special characters
    <re-syntax>`, the pattern can first be escaped with :func:`re.escape`.

    (This is only used when ``pytest.raises`` is used as a context manager,
    and passed through to the function otherwise.
    When using ``pytest.raises`` as a function, you can use:
    ``pytest.raises(Exc, func, match="passed on").match("my pattern")``.)

Use ``pytest.raises`` as a context manager, which will capture the exception of the given
type, or any of its subclasses::

    >>> import pytest
    >>> with pytest.raises(ZeroDivisionError):
    ...    1/0

If the code block does not raise the expected exception (:class:`ZeroDivisionError` in the example
above), or no exception at all, the check will fail instead.

You can also use the keyword argument ``match`` to assert that the
exception matches a text or regex::

    >>> with pytest.raises(ValueError, match='must be 0 or None'):
    ...     raise ValueError("value must be 0 or None")

    >>> with pytest.raises(ValueError, match=r'must be \d+$'):
    ...     raise ValueError("value must be 42")

The ``match`` argument searches the formatted exception string, which includes any
`PEP-678 <https://peps.python.org/pep-0678/>`__ ``__notes__``:

    >>> with pytest.raises(ValueError, match=r"had a note added"):  # doctest: +SKIP
    ...     e = ValueError("value must be 42")
    ...     e.add_note("had a note added")
    ...     raise e

The context manager produces an :class:`ExceptionInfo` object which can be used to inspect the
details of the captured exception::

    >>> with pytest.raises(ValueError) as exc_info:
    ...     raise ValueError("value must be 42")
    >>> assert exc_info.type is ValueError
    >>> assert exc_info.value.args[0] == "value must be 42"

.. warning::

   Given that ``pytest.raises`` matches subclasses, be wary of using it to match :class:`Exception` like this::

       with pytest.raises(Exception):  # Careful, this will catch ANY exception raised.
           some_function()

   Because :class:`Exception` is the base class of almost all exceptions, it is easy for this to hide
   real bugs, where the user wrote this expecting a specific exception, but some other exception is being
   raised due to a bug introduced during a refactoring.

   Avoid using ``pytest.raises`` to catch :class:`Exception` unless certain that you really want to catch
   **any** exception raised.

.. note::

   When using ``pytest.raises`` as a context manager, it's worthwhile to
   note that normal context manager rules apply and that the exception
   raised *must* be the final line in the scope of the context manager.
   Lines of code after that, within the scope of the context manager will
   not be executed. For example::

       >>> value = 15
       >>> with pytest.raises(ValueError) as exc_info:
       ...     if value > 10:
       ...         raise ValueError("value must be <= 10")
       ...     assert exc_info.type is ValueError  # This will not execute.

   Instead, the following approach must be taken (note the difference in
   scope)::

       >>> with pytest.raises(ValueError) as exc_info:
       ...     if value > 10:
       ...         raise ValueError("value must be <= 10")
       ...
       >>> assert exc_info.type is ValueError

**Using with** ``pytest.mark.parametrize``

When using :ref:`pytest.mark.parametrize ref`
it is possible to parametrize tests such that
some runs raise an exception and others do not.

See :ref:`parametrizing_conditional_raising` for an example.

.. seealso::

    :ref:`assertraises` for more examples and detailed discussion.

**Legacy form**

It is possible to specify a callable by passing a to-be-called lambda::

    >>> raises(ZeroDivisionError, lambda: 1/0)
    <ExceptionInfo ...>

or you can specify an arbitrary callable with arguments::

    >>> def f(x): return 1/x
    ...
    >>> raises(ZeroDivisionError, f, 0)
    <ExceptionInfo ...>
    >>> raises(ZeroDivisionError, f, x=0)
    <ExceptionInfo ...>

The form above is fully supported but discouraged for new code because the
context manager form is regarded as more readable and less error-prone.

.. note::
    Similar to caught exception objects in Python, explicitly clearing
    local references to returned ``ExceptionInfo`` objects can
    help the Python interpreter speed up its garbage collection.

    Clearing those references breaks a reference cycle
    (``ExceptionInfo`` --> caught exception --> frame stack raising
    the exception --> current frame stack --> local variables -->
    ``ExceptionInfo``) which makes Python keep all objects referenced
    from that cycle (including all local variables in the current
    frame) alive until the next cyclic garbage collection run.
    More detailed information can be found in the official Python
    documentation for :ref:`the try statement <python:try>`.

---
## RaisesContext
```python
from python_api import RaisesContext
```



---
## __init__
```python
from python_api import __init__
```



---
## __repr__
```python
from python_api import __repr__
```

Return a string communicating both the expected value and the
tolerance for the comparison being made.

For example, ``1.0 ± 1e-6``, ``(3+4j) ± 5e-6 ∠ ±180°``.

---
## _repr_compare
```python
from python_api import _repr_compare
```



---
## __eq__
```python
from python_api import __eq__
```

Return whether the given value is equal to the expected value
within the pre-specified tolerance.

---
## __bool__
```python
from python_api import __bool__
```



---
## __ne__
```python
from python_api import __ne__
```



---
## _approx_scalar
```python
from python_api import _approx_scalar
```



---
## _yield_comparisons
```python
from python_api import _yield_comparisons
```



---
## _check_type
```python
from python_api import _check_type
```



---
## tolerance
```python
from python_api import tolerance
```

Return the tolerance for the comparison.

This could be either an absolute tolerance or a relative tolerance,
depending on what the user specified or which would be larger.

---
## __enter__
```python
from python_api import __enter__
```



---
## __exit__
```python
from python_api import __exit__
```



---
## get_value_from_nested_list
```python
from python_api import get_value_from_nested_list
```

Helper function to get the value out of a nested list, given an n-dimensional index.
This mimics numpy's indexing, but for raw nested python lists.

---
## set_default
```python
from python_api import set_default
```



---
## __name__
```python
from _argcomplete import __name__
```

Allow bash-completion for argparse with argcomplete if installed.

Needs argcomplete>=0.5.6 for python 3.2/3.3 (older versions fail
to find the magic string, so _ARGCOMPLETE env. var is never set, and
this does not need special code).

Function try_argcomplete(parser) should be called directly before
the call to ArgumentParser.parse_args().

The filescompleter is what you normally would use on the positional
arguments specification, in order to get "dirname/" after "dirn<TAB>"
instead of the default "dirname ":

   optparser.add_argument(Config._file_or_dir, nargs='*').completer=filescompleter

Other, application specific, completers should go in the file
doing the add_argument calls as they need to be specified as .completer
attributes as well. (If argcomplete is not installed, the function the
attribute points to will not be used).

SPEEDUP
=======

The generic argcomplete script for bash-completion
(/etc/bash_completion.d/python-argcomplete.sh)
uses a python program to determine startup script generated by pip.
You can speed up completion somewhat by changing this script to include
  # PYTHON_ARGCOMPLETE_OK
so the python-argcomplete-check-easy-install-script does not
need to be called to find the entry point of the code and see if that is
marked  with PYTHON_ARGCOMPLETE_OK.

INSTALL/DEBUGGING
=================

To include this support in another application that has setup.py generated
scripts:

- Add the line:
    # PYTHON_ARGCOMPLETE_OK
  near the top of the main python entry point.

- Include in the file calling parse_args():
    from _argcomplete import try_argcomplete, filescompleter
  Call try_argcomplete just before parse_args(), and optionally add
  filescompleter to the positional arguments' add_argument().

If things do not work right away:

- Switch on argcomplete debugging with (also helpful when doing custom
  completers):
    export _ARC_DEBUG=1

- Run:
    python-argcomplete-check-easy-install-script $(which appname)
    echo $?
  will echo 0 if the magic line has been found, 1 if not.

- Sometimes it helps to find early on errors using:
    _ARGCOMPLETE=1 _ARC_DEBUG=1 appname
  which should throw a KeyError: 'COMPLINE' (which is properly set by the
  global argcomplete script).

---
## FastFilesCompleter
```python
from _argcomplete import FastFilesCompleter
```

Fast file completer class.

---
## __init__
```python
from _argcomplete import __init__
```



---
## __call__
```python
from _argcomplete import __call__
```



---
## try_argcomplete
```python
from _argcomplete import try_argcomplete
```



---
## __name__
```python
from unraisableexception import __name__
```



---
## catch_unraisable_exception
```python
from unraisableexception import catch_unraisable_exception
```

Context manager catching unraisable exception using sys.unraisablehook.

Storing the exception value (cm.unraisable.exc_value) creates a reference
cycle. The reference cycle is broken explicitly when the context manager
exits.

Storing the object (cm.unraisable.object) can resurrect it if it is set to
an object which is being finalized. Exiting the context manager clears the
stored object.

Usage:
    with catch_unraisable_exception() as cm:
        # code creating an "unraisable exception"
        ...
        # check the unraisable exception: use cm.unraisable
        ...
    # cm.unraisable attribute no longer exists at this point
    # (to break a reference cycle)

---
## unraisable_exception_runtest_hook
```python
from unraisableexception import unraisable_exception_runtest_hook
```



---
## pytest_runtest_setup
```python
from unraisableexception import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from unraisableexception import pytest_runtest_call
```



---
## pytest_runtest_teardown
```python
from unraisableexception import pytest_runtest_teardown
```



---
## __init__
```python
from unraisableexception import __init__
```



---
## _hook
```python
from unraisableexception import _hook
```



---
## __enter__
```python
from unraisableexception import __enter__
```



---
## __exit__
```python
from unraisableexception import __exit__
```



---
## __name__
```python
from capture import __name__
```

Per-test stdout/stderr capturing mechanism.

---
## pytest_addoption
```python
from capture import pytest_addoption
```



---
## _colorama_workaround
```python
from capture import _colorama_workaround
```

Ensure colorama is imported so that it attaches to the correct stdio
handles on Windows.

colorama uses the terminal on import time. So if something does the
first import of colorama while I/O capture is active, colorama will
fail in various ways.

---
## _windowsconsoleio_workaround
```python
from capture import _windowsconsoleio_workaround
```

Workaround for Windows Unicode console handling.

Python 3.6 implemented Unicode console handling for Windows. This works
by reading/writing to the raw console handle using
``{Read,Write}ConsoleW``.

The problem is that we are going to ``dup2`` over the stdio file
descriptors when doing ``FDCapture`` and this will ``CloseHandle`` the
handles used by Python to write to the console. Though there is still some
weirdness and the console handle seems to only be closed randomly and not
on the first call to ``CloseHandle``, or maybe it gets reopened with the
same handle value when we suspend capturing.

The workaround in this case will reopen stdio with a different fd which
also means a different handle by replicating the logic in
"Py_lifecycle.c:initstdio/create_stdio".

:param stream:
    In practice ``sys.stdout`` or ``sys.stderr``, but given
    here as parameter for unittesting purposes.

See https://github.com/pytest-dev/py/issues/103.

---
## pytest_load_initial_conftests
```python
from capture import pytest_load_initial_conftests
```



---
## EncodedFile
```python
from capture import EncodedFile
```



---
## CaptureIO
```python
from capture import CaptureIO
```



---
## TeeCaptureIO
```python
from capture import TeeCaptureIO
```



---
## DontReadFromInput
```python
from capture import DontReadFromInput
```



---
## CaptureBase
```python
from capture import CaptureBase
```



---
## NoCapture
```python
from capture import NoCapture
```



---
## SysCaptureBase
```python
from capture import SysCaptureBase
```



---
## SysCaptureBinary
```python
from capture import SysCaptureBinary
```



---
## SysCapture
```python
from capture import SysCapture
```



---
## FDCaptureBase
```python
from capture import FDCaptureBase
```



---
## FDCaptureBinary
```python
from capture import FDCaptureBinary
```

Capture IO to/from a given OS-level file descriptor.

snap() produces `bytes`.

---
## FDCapture
```python
from capture import FDCapture
```

Capture IO to/from a given OS-level file descriptor.

snap() produces text.

---
## MultiCapture
```python
from capture import MultiCapture
```



---
## _get_multicapture
```python
from capture import _get_multicapture
```



---
## CaptureManager
```python
from capture import CaptureManager
```

The capture plugin.

Manages that the appropriate capture method is enabled/disabled during
collection and each test phase (setup, call, teardown). After each of
those points, the captured output is obtained and attached to the
collection/runtest report.

There are two levels of capture:

* global: enabled by default and can be suppressed by the ``-s``
  option. This is always enabled/disabled during collection and each test
  phase.

* fixture: when a test function or one of its fixture depend on the
  ``capsys`` or ``capfd`` fixtures. In this case special handling is
  needed to ensure the fixtures take precedence over the global capture.

---
## CaptureFixture
```python
from capture import CaptureFixture
```

Object returned by the :fixture:`capsys`, :fixture:`capsysbinary`,
:fixture:`capfd` and :fixture:`capfdbinary` fixtures.

---
## capsys
```python
from capture import capsys
```

Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.

The captured output is made available via ``capsys.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects.

Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_output(capsys):
        print("hello")
        captured = capsys.readouterr()
        assert captured.out == "hello\n"

---
## capsysbinary
```python
from capture import capsysbinary
```

Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.

The captured output is made available via ``capsysbinary.readouterr()``
method calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``bytes`` objects.

Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_output(capsysbinary):
        print("hello")
        captured = capsysbinary.readouterr()
        assert captured.out == b"hello\n"

---
## capfd
```python
from capture import capfd
```

Enable text capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects.

Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_system_echo(capfd):
        os.system('echo "hello"')
        captured = capfd.readouterr()
        assert captured.out == "hello\n"

---
## capfdbinary
```python
from capture import capfdbinary
```

Enable bytes capturing of writes to file descriptors ``1`` and ``2``.

The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``byte`` objects.

Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.

Example:

.. code-block:: python

    def test_system_echo(capfdbinary):
        os.system('echo "hello"')
        captured = capfdbinary.readouterr()
        assert captured.out == b"hello\n"

---
## _reopen_stdio
```python
from capture import _reopen_stdio
```



---
## name
```python
from capture import name
```



---
## mode
```python
from capture import mode
```



---
## __init__
```python
from capture import __init__
```



---
## getvalue
```python
from capture import getvalue
```



---
## write
```python
from capture import write
```



---
## encoding
```python
from capture import encoding
```



---
## read
```python
from capture import read
```



---
## __next__
```python
from capture import __next__
```



---
## readlines
```python
from capture import readlines
```



---
## __iter__
```python
from capture import __iter__
```



---
## fileno
```python
from capture import fileno
```



---
## flush
```python
from capture import flush
```



---
## isatty
```python
from capture import isatty
```



---
## close
```python
from capture import close
```



---
## readable
```python
from capture import readable
```



---
## seek
```python
from capture import seek
```



---
## seekable
```python
from capture import seekable
```



---
## tell
```python
from capture import tell
```



---
## truncate
```python
from capture import truncate
```



---
## writelines
```python
from capture import writelines
```



---
## writable
```python
from capture import writable
```



---
## __enter__
```python
from capture import __enter__
```



---
## __exit__
```python
from capture import __exit__
```



---
## buffer
```python
from capture import buffer
```



---
## start
```python
from capture import start
```

Start capturing on targetfd using memorized tmpfile.

---
## done
```python
from capture import done
```

Stop capturing, restore streams, return original capture file,
seeked to position zero.

---
## suspend
```python
from capture import suspend
```



---
## resume
```python
from capture import resume
```



---
## writeorg
```python
from capture import writeorg
```

Write to original file descriptor.

---
## snap
```python
from capture import snap
```



---
## repr
```python
from capture import repr
```



---
## __repr__
```python
from capture import __repr__
```



---
## _assert_state
```python
from capture import _assert_state
```



---
## CaptureResult
```python
from capture import CaptureResult
```

The result of :method:`caplog.readouterr() <pytest.CaptureFixture.readouterr>`.

---
## start_capturing
```python
from capture import start_capturing
```



---
## pop_outerr_to_orig
```python
from capture import pop_outerr_to_orig
```

Pop current snapshot out/err capture and flush to orig streams.

---
## suspend_capturing
```python
from capture import suspend_capturing
```



---
## resume_capturing
```python
from capture import resume_capturing
```



---
## stop_capturing
```python
from capture import stop_capturing
```

Stop capturing and reset capturing streams.

---
## is_started
```python
from capture import is_started
```

Whether actively capturing -- not suspended or stopped.

---
## readouterr
```python
from capture import readouterr
```

Read and return the captured output so far, resetting the internal
buffer.

:returns:
    The captured content as a namedtuple with ``out`` and ``err``
    string attributes.

---
## is_capturing
```python
from capture import is_capturing
```



---
## is_globally_capturing
```python
from capture import is_globally_capturing
```



---
## start_global_capturing
```python
from capture import start_global_capturing
```



---
## stop_global_capturing
```python
from capture import stop_global_capturing
```



---
## resume_global_capture
```python
from capture import resume_global_capture
```



---
## suspend_global_capture
```python
from capture import suspend_global_capture
```



---
## read_global_capture
```python
from capture import read_global_capture
```



---
## set_fixture
```python
from capture import set_fixture
```



---
## unset_fixture
```python
from capture import unset_fixture
```



---
## activate_fixture
```python
from capture import activate_fixture
```

If the current item is using ``capsys`` or ``capfd``, activate
them so they take precedence over the global capture.

---
## deactivate_fixture
```python
from capture import deactivate_fixture
```

Deactivate the ``capsys`` or ``capfd`` fixture of this item, if any.

---
## suspend_fixture
```python
from capture import suspend_fixture
```



---
## resume_fixture
```python
from capture import resume_fixture
```



---
## global_and_fixture_disabled
```python
from capture import global_and_fixture_disabled
```

Context manager to temporarily disable global and current fixture capturing.

---
## item_capture
```python
from capture import item_capture
```



---
## pytest_make_collect_report
```python
from capture import pytest_make_collect_report
```



---
## pytest_runtest_setup
```python
from capture import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from capture import pytest_runtest_call
```



---
## pytest_runtest_teardown
```python
from capture import pytest_runtest_teardown
```



---
## pytest_keyboard_interrupt
```python
from capture import pytest_keyboard_interrupt
```



---
## pytest_internalerror
```python
from capture import pytest_internalerror
```



---
## _start
```python
from capture import _start
```



---
## _suspend
```python
from capture import _suspend
```

Suspend this fixture's own capturing temporarily.

---
## _resume
```python
from capture import _resume
```

Resume this fixture's own capturing temporarily.

---
## _is_started
```python
from capture import _is_started
```

Whether actively capturing -- not disabled or closed.

---
## disabled
```python
from capture import disabled
```

Temporarily disable capturing while inside the ``with`` block.

---
## __name__
```python
from hookspec import __name__
```

Hook specifications for pytest plugins which are invoked by pytest itself
and by builtin plugins.

---
## pytest_addhooks
```python
from hookspec import pytest_addhooks
```

Called at plugin registration time to allow adding new hooks via a call to
:func:`pluginmanager.add_hookspecs(module_or_class, prefix) <pytest.PytestPluginManager.add_hookspecs>`.

:param pluginmanager: The pytest plugin manager.

.. note::
    This hook is incompatible with hook wrappers.

Use in conftest plugins
=======================

If a conftest plugin implements this hook, it will be called immediately
when the conftest is registered.

---
## pytest_plugin_registered
```python
from hookspec import pytest_plugin_registered
```

A new pytest plugin got registered.

:param plugin: The plugin module or instance.
:param plugin_name: The name by which the plugin is registered.
:param manager: The pytest plugin manager.

.. note::
    This hook is incompatible with hook wrappers.

Use in conftest plugins
=======================

If a conftest plugin implements this hook, it will be called immediately
when the conftest is registered, once for each plugin registered thus far
(including itself!), and for all plugins thereafter when they are
registered.

---
## pytest_addoption
```python
from hookspec import pytest_addoption
```

Register argparse-style options and ini-style config values,
called once at the beginning of a test run.

:param parser:
    To add command line options, call
    :py:func:`parser.addoption(...) <pytest.Parser.addoption>`.
    To add ini-file values call :py:func:`parser.addini(...)
    <pytest.Parser.addini>`.

:param pluginmanager:
    The pytest plugin manager, which can be used to install :py:func:`~pytest.hookspec`'s
    or :py:func:`~pytest.hookimpl`'s and allow one plugin to call another plugin's hooks
    to change how command line options are added.

Options can later be accessed through the
:py:class:`config <pytest.Config>` object, respectively:

- :py:func:`config.getoption(name) <pytest.Config.getoption>` to
  retrieve the value of a command line option.

- :py:func:`config.getini(name) <pytest.Config.getini>` to retrieve
  a value read from an ini-style file.

The config object is passed around on many internal objects via the ``.config``
attribute or can be retrieved as the ``pytestconfig`` fixture.

.. note::
    This hook is incompatible with hook wrappers.

Use in conftest plugins
=======================

If a conftest plugin implements this hook, it will be called immediately
when the conftest is registered.

This hook is only called for :ref:`initial conftests <pluginorder>`.

---
## pytest_configure
```python
from hookspec import pytest_configure
```

Allow plugins and conftest files to perform initial configuration.

.. note::
    This hook is incompatible with hook wrappers.

:param config: The pytest config object.

Use in conftest plugins
=======================

This hook is called for every :ref:`initial conftest <pluginorder>` file
after command line options have been parsed. After that, the hook is called
for other conftest files as they are registered.

---
## pytest_cmdline_parse
```python
from hookspec import pytest_cmdline_parse
```

Return an initialized :class:`~pytest.Config`, parsing the specified args.

Stops at first non-None result, see :ref:`firstresult`.

.. note::
    This hook is only called for plugin classes passed to the
    ``plugins`` arg when using `pytest.main`_ to perform an in-process
    test run.

:param pluginmanager: The pytest plugin manager.
:param args: List of arguments passed on the command line.
:returns: A pytest config object.

Use in conftest plugins
=======================

This hook is not called for conftest files.

---
## pytest_load_initial_conftests
```python
from hookspec import pytest_load_initial_conftests
```

Called to implement the loading of :ref:`initial conftest files
<pluginorder>` ahead of command line option parsing.

:param early_config: The pytest config object.
:param args: Arguments passed on the command line.
:param parser: To add command line options.

Use in conftest plugins
=======================

This hook is not called for conftest files.

---
## pytest_cmdline_main
```python
from hookspec import pytest_cmdline_main
```

Called for performing the main command line action.

The default implementation will invoke the configure hooks and
:hook:`pytest_runtestloop`.

Stops at first non-None result, see :ref:`firstresult`.

:param config: The pytest config object.
:returns: The exit code.

Use in conftest plugins
=======================

This hook is only called for :ref:`initial conftests <pluginorder>`.

---
## pytest_collection
```python
from hookspec import pytest_collection
```

Perform the collection phase for the given session.

Stops at first non-None result, see :ref:`firstresult`.
The return value is not used, but only stops further processing.

The default collection phase is this (see individual hooks for full details):

1. Starting from ``session`` as the initial collector:

  1. ``pytest_collectstart(collector)``
  2. ``report = pytest_make_collect_report(collector)``
  3. ``pytest_exception_interact(collector, call, report)`` if an interactive exception occurred
  4. For each collected node:

    1. If an item, ``pytest_itemcollected(item)``
    2. If a collector, recurse into it.

  5. ``pytest_collectreport(report)``

2. ``pytest_collection_modifyitems(session, config, items)``

  1. ``pytest_deselected(items)`` for any deselected items (may be called multiple times)

3. ``pytest_collection_finish(session)``
4. Set ``session.items`` to the list of collected items
5. Set ``session.testscollected`` to the number of collected items

You can implement this hook to only perform some action before collection,
for example the terminal plugin uses it to start displaying the collection
counter (and returns `None`).

:param session: The pytest session object.

Use in conftest plugins
=======================

This hook is only called for :ref:`initial conftests <pluginorder>`.

---
## pytest_collection_modifyitems
```python
from hookspec import pytest_collection_modifyitems
```

Called after collection has been performed. May filter or re-order
the items in-place.

When items are deselected (filtered out from ``items``),
the hook :hook:`pytest_deselected` must be called explicitly
with the deselected items to properly notify other plugins,
e.g. with ``config.hook.pytest_deselected(deselected_items)``.

:param session: The pytest session object.
:param config: The pytest config object.
:param items: List of item objects.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_collection_finish
```python
from hookspec import pytest_collection_finish
```

Called after collection has been performed and modified.

:param session: The pytest session object.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_ignore_collect
```python
from hookspec import pytest_ignore_collect
```

Return ``True`` to ignore this path for collection.

Return ``None`` to let other plugins ignore the path for collection.

Returning ``False`` will forcefully *not* ignore this path for collection,
without giving a chance for other plugins to ignore this path.

This hook is consulted for all files and directories prior to calling
more specific hooks.

Stops at first non-None result, see :ref:`firstresult`.

:param collection_path: The path to analyze.
:type collection_path: pathlib.Path
:param path: The path to analyze (deprecated).
:param config: The pytest config object.

.. versionchanged:: 7.0.0
    The ``collection_path`` parameter was added as a :class:`pathlib.Path`
    equivalent of the ``path`` parameter. The ``path`` parameter
    has been deprecated.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collection path, only
conftest files in parent directories of the collection path are consulted
(if the path is a directory, its own conftest file is *not* consulted - a
directory cannot ignore itself!).

---
## pytest_collect_directory
```python
from hookspec import pytest_collect_directory
```

Create a :class:`~pytest.Collector` for the given directory, or None if
not relevant.

.. versionadded:: 8.0

For best results, the returned collector should be a subclass of
:class:`~pytest.Directory`, but this is not required.

The new node needs to have the specified ``parent`` as a parent.

Stops at first non-None result, see :ref:`firstresult`.

:param path: The path to analyze.
:type path: pathlib.Path

See :ref:`custom directory collectors` for a simple example of use of this
hook.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collection path, only
conftest files in parent directories of the collection path are consulted
(if the path is a directory, its own conftest file is *not* consulted - a
directory cannot collect itself!).

---
## pytest_collect_file
```python
from hookspec import pytest_collect_file
```

Create a :class:`~pytest.Collector` for the given path, or None if not relevant.

For best results, the returned collector should be a subclass of
:class:`~pytest.File`, but this is not required.

The new node needs to have the specified ``parent`` as a parent.

:param file_path: The path to analyze.
:type file_path: pathlib.Path
:param path: The path to collect (deprecated).

.. versionchanged:: 7.0.0
    The ``file_path`` parameter was added as a :class:`pathlib.Path`
    equivalent of the ``path`` parameter. The ``path`` parameter
    has been deprecated.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given file path, only
conftest files in parent directories of the file path are consulted.

---
## pytest_collectstart
```python
from hookspec import pytest_collectstart
```

Collector starts collecting.

:param collector:
    The collector.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collector, only
conftest files in the collector's directory and its parent directories are
consulted.

---
## pytest_itemcollected
```python
from hookspec import pytest_itemcollected
```

We just collected a test item.

:param item:
    The item.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_collectreport
```python
from hookspec import pytest_collectreport
```

Collector finished collecting.

:param report:
    The collect report.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collector, only
conftest files in the collector's directory and its parent directories are
consulted.

---
## pytest_deselected
```python
from hookspec import pytest_deselected
```

Called for deselected test items, e.g. by keyword.

Note that this hook has two integration aspects for plugins:

- it can be *implemented* to be notified of deselected items
- it must be *called* from :hook:`pytest_collection_modifyitems`
  implementations when items are deselected (to properly notify other plugins).

May be called multiple times.

:param items:
    The items.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_make_collect_report
```python
from hookspec import pytest_make_collect_report
```

Perform :func:`collector.collect() <pytest.Collector.collect>` and return
a :class:`~pytest.CollectReport`.

Stops at first non-None result, see :ref:`firstresult`.

:param collector:
    The collector.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collector, only
conftest files in the collector's directory and its parent directories are
consulted.

---
## pytest_pycollect_makemodule
```python
from hookspec import pytest_pycollect_makemodule
```

Return a :class:`pytest.Module` collector or None for the given path.

This hook will be called for each matching test module path.
The :hook:`pytest_collect_file` hook needs to be used if you want to
create test modules for files that do not match as a test module.

Stops at first non-None result, see :ref:`firstresult`.

:param module_path: The path of the module to collect.
:type module_path: pathlib.Path
:param path: The path of the module to collect (deprecated).

.. versionchanged:: 7.0.0
    The ``module_path`` parameter was added as a :class:`pathlib.Path`
    equivalent of the ``path`` parameter.

    The ``path`` parameter has been deprecated in favor of ``fspath``.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given parent collector,
only conftest files in the collector's directory and its parent directories
are consulted.

---
## pytest_pycollect_makeitem
```python
from hookspec import pytest_pycollect_makeitem
```

Return a custom item/collector for a Python object in a module, or None.

Stops at first non-None result, see :ref:`firstresult`.

:param collector:
    The module/class collector.
:param name:
    The name of the object in the module/class.
:param obj:
    The object.
:returns:
    The created items/collectors.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given collector, only
conftest files in the collector's directory and its parent directories
are consulted.

---
## pytest_pyfunc_call
```python
from hookspec import pytest_pyfunc_call
```

Call underlying test function.

Stops at first non-None result, see :ref:`firstresult`.

:param pyfuncitem:
    The function item.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only
conftest files in the item's directory and its parent directories
are consulted.

---
## pytest_generate_tests
```python
from hookspec import pytest_generate_tests
```

Generate (multiple) parametrized calls to a test function.

:param metafunc:
    The :class:`~pytest.Metafunc` helper for the test function.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given function definition,
only conftest files in the functions's directory and its parent directories
are consulted.

---
## pytest_make_parametrize_id
```python
from hookspec import pytest_make_parametrize_id
```

Return a user-friendly string representation of the given ``val``
that will be used by @pytest.mark.parametrize calls, or None if the hook
doesn't know about ``val``.

The parameter name is available as ``argname``, if required.

Stops at first non-None result, see :ref:`firstresult`.

:param config: The pytest config object.
:param val: The parametrized value.
:param argname: The automatic parameter name produced by pytest.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_runtestloop
```python
from hookspec import pytest_runtestloop
```

Perform the main runtest loop (after collection finished).

The default hook implementation performs the runtest protocol for all items
collected in the session (``session.items``), unless the collection failed
or the ``collectonly`` pytest option is set.

If at any point :py:func:`pytest.exit` is called, the loop is
terminated immediately.

If at any point ``session.shouldfail`` or ``session.shouldstop`` are set, the
loop is terminated after the runtest protocol for the current item is finished.

:param session: The pytest session object.

Stops at first non-None result, see :ref:`firstresult`.
The return value is not used, but only stops further processing.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_runtest_protocol
```python
from hookspec import pytest_runtest_protocol
```

Perform the runtest protocol for a single test item.

The default runtest protocol is this (see individual hooks for full details):

- ``pytest_runtest_logstart(nodeid, location)``

- Setup phase:
    - ``call = pytest_runtest_setup(item)`` (wrapped in ``CallInfo(when="setup")``)
    - ``report = pytest_runtest_makereport(item, call)``
    - ``pytest_runtest_logreport(report)``
    - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

- Call phase, if the setup passed and the ``setuponly`` pytest option is not set:
    - ``call = pytest_runtest_call(item)`` (wrapped in ``CallInfo(when="call")``)
    - ``report = pytest_runtest_makereport(item, call)``
    - ``pytest_runtest_logreport(report)``
    - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

- Teardown phase:
    - ``call = pytest_runtest_teardown(item, nextitem)`` (wrapped in ``CallInfo(when="teardown")``)
    - ``report = pytest_runtest_makereport(item, call)``
    - ``pytest_runtest_logreport(report)``
    - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

- ``pytest_runtest_logfinish(nodeid, location)``

:param item: Test item for which the runtest protocol is performed.
:param nextitem: The scheduled-to-be-next test item (or None if this is the end my friend).

Stops at first non-None result, see :ref:`firstresult`.
The return value is not used, but only stops further processing.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_runtest_logstart
```python
from hookspec import pytest_runtest_logstart
```

Called at the start of running the runtest protocol for a single item.

See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

:param nodeid: Full node ID of the item.
:param location: A tuple of ``(filename, lineno, testname)``
    where ``filename`` is a file path relative to ``config.rootpath``
    and ``lineno`` is 0-based.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_logfinish
```python
from hookspec import pytest_runtest_logfinish
```

Called at the end of running the runtest protocol for a single item.

See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

:param nodeid: Full node ID of the item.
:param location: A tuple of ``(filename, lineno, testname)``
    where ``filename`` is a file path relative to ``config.rootpath``
    and ``lineno`` is 0-based.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_setup
```python
from hookspec import pytest_runtest_setup
```

Called to perform the setup phase for a test item.

The default implementation runs ``setup()`` on ``item`` and all of its
parents (which haven't been setup yet). This includes obtaining the
values of fixtures required by the item (which haven't been obtained
yet).

:param item:
    The item.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_call
```python
from hookspec import pytest_runtest_call
```

Called to run the test for test item (the call phase).

The default implementation calls ``item.runtest()``.

:param item:
    The item.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_teardown
```python
from hookspec import pytest_runtest_teardown
```

Called to perform the teardown phase for a test item.

The default implementation runs the finalizers and calls ``teardown()``
on ``item`` and all of its parents (which need to be torn down). This
includes running the teardown phase of fixtures required by the item (if
they go out of scope).

:param item:
    The item.
:param nextitem:
    The scheduled-to-be-next test item (None if no further test item is
    scheduled). This argument is used to perform exact teardowns, i.e.
    calling just enough finalizers so that nextitem only needs to call
    setup functions.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_makereport
```python
from hookspec import pytest_runtest_makereport
```

Called to create a :class:`~pytest.TestReport` for each of
the setup, call and teardown runtest phases of a test item.

See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

:param item: The item.
:param call: The :class:`~pytest.CallInfo` for the phase.

Stops at first non-None result, see :ref:`firstresult`.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_runtest_logreport
```python
from hookspec import pytest_runtest_logreport
```

Process the :class:`~pytest.TestReport` produced for each
of the setup, call and teardown runtest phases of an item.

See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_report_to_serializable
```python
from hookspec import pytest_report_to_serializable
```

Serialize the given report object into a data structure suitable for
sending over the wire, e.g. converted to JSON.

:param config: The pytest config object.
:param report: The report.

Use in conftest plugins
=======================

Any conftest file can implement this hook. The exact details may depend
on the plugin which calls the hook.

---
## pytest_report_from_serializable
```python
from hookspec import pytest_report_from_serializable
```

Restore a report object previously serialized with
:hook:`pytest_report_to_serializable`.

:param config: The pytest config object.

Use in conftest plugins
=======================

Any conftest file can implement this hook. The exact details may depend
on the plugin which calls the hook.

---
## pytest_fixture_setup
```python
from hookspec import pytest_fixture_setup
```

Perform fixture setup execution.

:param fixturedef:
    The fixture definition object.
:param request:
    The fixture request object.
:returns:
    The return value of the call to the fixture function.

Stops at first non-None result, see :ref:`firstresult`.

.. note::
    If the fixture function returns None, other implementations of
    this hook function will continue to be called, according to the
    behavior of the :ref:`firstresult` option.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given fixture, only
conftest files in the fixture scope's directory and its parent directories
are consulted.

---
## pytest_fixture_post_finalizer
```python
from hookspec import pytest_fixture_post_finalizer
```

Called after fixture teardown, but before the cache is cleared, so
the fixture result ``fixturedef.cached_result`` is still available (not
``None``).

:param fixturedef:
    The fixture definition object.
:param request:
    The fixture request object.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given fixture, only
conftest files in the fixture scope's directory and its parent directories
are consulted.

---
## pytest_sessionstart
```python
from hookspec import pytest_sessionstart
```

Called after the ``Session`` object has been created and before performing collection
and entering the run test loop.

:param session: The pytest session object.

Use in conftest plugins
=======================

This hook is only called for :ref:`initial conftests <pluginorder>`.

---
## pytest_sessionfinish
```python
from hookspec import pytest_sessionfinish
```

Called after whole test run finished, right before returning the exit status to the system.

:param session: The pytest session object.
:param exitstatus: The status which pytest will return to the system.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_unconfigure
```python
from hookspec import pytest_unconfigure
```

Called before test process is exited.

:param config: The pytest config object.

Use in conftest plugins
=======================

Any conftest file can implement this hook.

---
## pytest_assertrepr_compare
```python
from hookspec import pytest_assertrepr_compare
```

Return explanation for comparisons in failing assert expressions.

Return None for no custom explanation, otherwise return a list
of strings. The strings will be joined by newlines but any newlines
*in* a string will be escaped. Note that all but the first line will
be indented slightly, the intention is for the first line to be a summary.

:param config: The pytest config object.
:param op: The operator, e.g. `"=="`, `"!="`, `"not in"`.
:param left: The left operand.
:param right: The right operand.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_assertion_pass
```python
from hookspec import pytest_assertion_pass
```

Called whenever an assertion passes.

.. versionadded:: 5.0

Use this hook to do some processing after a passing assertion.
The original assertion information is available in the `orig` string
and the pytest introspected assertion information is available in the
`expl` string.

This hook must be explicitly enabled by the ``enable_assertion_pass_hook``
ini-file option:

.. code-block:: ini

    [pytest]
    enable_assertion_pass_hook=true

You need to **clean the .pyc** files in your project directory and interpreter libraries
when enabling this option, as assertions will require to be re-written.

:param item: pytest item object of current test.
:param lineno: Line number of the assert statement.
:param orig: String with the original assertion.
:param expl: String with the assert explanation.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in the item's directory and its parent directories are consulted.

---
## pytest_report_header
```python
from hookspec import pytest_report_header
```

Return a string or list of strings to be displayed as header info for terminal reporting.

:param config: The pytest config object.
:param start_path: The starting dir.
:type start_path: pathlib.Path
:param startdir: The starting dir (deprecated).

.. note::

    Lines returned by a plugin are displayed before those of plugins which
    ran before it.
    If you want to have your line(s) displayed first, use
    :ref:`trylast=True <plugin-hookorder>`.

.. versionchanged:: 7.0.0
    The ``start_path`` parameter was added as a :class:`pathlib.Path`
    equivalent of the ``startdir`` parameter. The ``startdir`` parameter
    has been deprecated.

Use in conftest plugins
=======================

This hook is only called for :ref:`initial conftests <pluginorder>`.

---
## pytest_report_collectionfinish
```python
from hookspec import pytest_report_collectionfinish
```

Return a string or list of strings to be displayed after collection
has finished successfully.

These strings will be displayed after the standard "collected X items" message.

.. versionadded:: 3.2

:param config: The pytest config object.
:param start_path: The starting dir.
:type start_path: pathlib.Path
:param startdir: The starting dir (deprecated).
:param items: List of pytest items that are going to be executed; this list should not be modified.

.. note::

    Lines returned by a plugin are displayed before those of plugins which
    ran before it.
    If you want to have your line(s) displayed first, use
    :ref:`trylast=True <plugin-hookorder>`.

.. versionchanged:: 7.0.0
    The ``start_path`` parameter was added as a :class:`pathlib.Path`
    equivalent of the ``startdir`` parameter. The ``startdir`` parameter
    has been deprecated.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_report_teststatus
```python
from hookspec import pytest_report_teststatus
```

Return result-category, shortletter and verbose word for status
reporting.

The result-category is a category in which to count the result, for
example "passed", "skipped", "error" or the empty string.

The shortletter is shown as testing progresses, for example ".", "s",
"E" or the empty string.

The verbose word is shown as testing progresses in verbose mode, for
example "PASSED", "SKIPPED", "ERROR" or the empty string.

pytest may style these implicitly according to the report outcome.
To provide explicit styling, return a tuple for the verbose word,
for example ``"rerun", "R", ("RERUN", {"yellow": True})``.

:param report: The report object whose status is to be returned.
:param config: The pytest config object.
:returns: The test status.

Stops at first non-None result, see :ref:`firstresult`.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_terminal_summary
```python
from hookspec import pytest_terminal_summary
```

Add a section to terminal summary reporting.

:param terminalreporter: The internal terminal reporter object.
:param exitstatus: The exit status that will be reported back to the OS.
:param config: The pytest config object.

.. versionadded:: 4.2
    The ``config`` parameter.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_warning_recorded
```python
from hookspec import pytest_warning_recorded
```

Process a warning captured by the internal pytest warnings plugin.

:param warning_message:
    The captured warning. This is the same object produced by :class:`warnings.catch_warnings`,
    and contains the same attributes as the parameters of :py:func:`warnings.showwarning`.

:param when:
    Indicates when the warning was captured. Possible values:

    * ``"config"``: during pytest configuration/initialization stage.
    * ``"collect"``: during test collection.
    * ``"runtest"``: during test execution.

:param nodeid:
    Full id of the item. Empty string for warnings that are not specific to
    a particular node.

:param location:
    When available, holds information about the execution context of the captured
    warning (filename, linenumber, function). ``function`` evaluates to <module>
    when the execution context is at the module level.

.. versionadded:: 6.0

Use in conftest plugins
=======================

Any conftest file can implement this hook. If the warning is specific to a
particular node, only conftest files in parent directories of the node are
consulted.

---
## pytest_markeval_namespace
```python
from hookspec import pytest_markeval_namespace
```

Called when constructing the globals dictionary used for
evaluating string conditions in xfail/skipif markers.

This is useful when the condition for a marker requires
objects that are expensive or impossible to obtain during
collection time, which is required by normal boolean
conditions.

.. versionadded:: 6.2

:param config: The pytest config object.
:returns: A dictionary of additional globals to add.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given item, only conftest
files in parent directories of the item are consulted.

---
## pytest_internalerror
```python
from hookspec import pytest_internalerror
```

Called for internal errors.

Return True to suppress the fallback handling of printing an
INTERNALERROR message directly to sys.stderr.

:param excrepr: The exception repr object.
:param excinfo: The exception info.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_keyboard_interrupt
```python
from hookspec import pytest_keyboard_interrupt
```

Called for keyboard interrupt.

:param excinfo: The exception info.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_exception_interact
```python
from hookspec import pytest_exception_interact
```

Called when an exception was raised which can potentially be
interactively handled.

May be called during collection (see :hook:`pytest_make_collect_report`),
in which case ``report`` is a :class:`~pytest.CollectReport`.

May be called during runtest of an item (see :hook:`pytest_runtest_protocol`),
in which case ``report`` is a :class:`~pytest.TestReport`.

This hook is not called if the exception that was raised is an internal
exception like ``skip.Exception``.

:param node:
    The item or collector.
:param call:
    The call information. Contains the exception.
:param report:
    The collection or test report.

Use in conftest plugins
=======================

Any conftest file can implement this hook. For a given node, only conftest
files in parent directories of the node are consulted.

---
## pytest_enter_pdb
```python
from hookspec import pytest_enter_pdb
```

Called upon pdb.set_trace().

Can be used by plugins to take special action just before the python
debugger enters interactive mode.

:param config: The pytest config object.
:param pdb: The Pdb instance.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## pytest_leave_pdb
```python
from hookspec import pytest_leave_pdb
```

Called when leaving pdb (e.g. with continue after pdb.set_trace()).

Can be used by plugins to take special action just after the python
debugger leaves interactive mode.

:param config: The pytest config object.
:param pdb: The Pdb instance.

Use in conftest plugins
=======================

Any conftest plugin can implement this hook.

---
## __name__
```python
from timing import __name__
```

Indirection for time functions.

We intentionally grab some "time" functions internally to avoid tests mocking "time" to affect
pytest runtime information (issue #185).

Fixture "mock_timing" also interacts with this module for pytest's own tests.

---
## __name__
```python
from pytester import __name__
```

(Disabled by default) support for testing pytest and pytest plugins.

PYTEST_DONT_REWRITE

---
## pytest_addoption
```python
from pytester import pytest_addoption
```



---
## pytest_configure
```python
from pytester import pytest_configure
```



---
## LsofFdLeakChecker
```python
from pytester import LsofFdLeakChecker
```



---
## _pytest
```python
from pytester import _pytest
```

Return a helper which offers a gethookrecorder(hook) method which
returns a HookRecorder instance which helps to make assertions about called
hooks.

---
## PytestArg
```python
from pytester import PytestArg
```



---
## get_public_names
```python
from pytester import get_public_names
```

Only return names from iterator values without a leading underscore.

---
## RecordedHookCall
```python
from pytester import RecordedHookCall
```

A recorded call to a hook.

The arguments to the hook call are set as attributes.
For example:

.. code-block:: python

    calls = hook_recorder.getcalls("pytest_runtest_setup")
    # Suppose pytest_runtest_setup was called once with `item=an_item`.
    assert calls[0].item is an_item

---
## HookRecorder
```python
from pytester import HookRecorder
```

Record all hooks called in a plugin manager.

Hook recorders are created by :class:`Pytester`.

This wraps all the hook calls in the plugin manager, recording each call
before propagating the normal calls.

---
## linecomp
```python
from pytester import linecomp
```

A :class: `LineComp` instance for checking that an input linearly
contains a sequence of strings.

---
## LineMatcher_fixture
```python
from pytester import LineMatcher_fixture
```

A reference to the :class: `LineMatcher`.

This is instantiable with a list of lines (without their trailing newlines).
This is useful for testing large texts, such as the output of commands.

---
## pytester
```python
from pytester import pytester
```

Facilities to write tests/configuration files, execute pytest in isolation, and match
against expected output, perfect for black-box testing of pytest plugins.

It attempts to isolate the test run from external factors as much as possible, modifying
the current working directory to ``path`` and environment variables during initialization.

It is particularly useful for testing plugins. It is similar to the :fixture:`tmp_path`
fixture but provides methods which aid in testing pytest itself.

---
## _sys_snapshot
```python
from pytester import _sys_snapshot
```



---
## _config_for_test
```python
from pytester import _config_for_test
```



---
## RunResult
```python
from pytester import RunResult
```

The result of running a command from :class:`~pytest.Pytester`.

---
## SysModulesSnapshot
```python
from pytester import SysModulesSnapshot
```



---
## SysPathsSnapshot
```python
from pytester import SysPathsSnapshot
```



---
## Pytester
```python
from pytester import Pytester
```

Facilities to write tests/configuration files, execute pytest in isolation, and match
against expected output, perfect for black-box testing of pytest plugins.

It attempts to isolate the test run from external factors as much as possible, modifying
the current working directory to :attr:`path` and environment variables during initialization.

---
## LineComp
```python
from pytester import LineComp
```



---
## LineMatcher
```python
from pytester import LineMatcher
```

Flexible matching of text.

This is a convenience class to test large texts like the output of
commands.

The constructor takes a list of lines without their trailing newlines, i.e.
``text.splitlines()``.

---
## get_open_files
```python
from pytester import get_open_files
```



---
## matching_platform
```python
from pytester import matching_platform
```



---
## pytest_runtest_protocol
```python
from pytester import pytest_runtest_protocol
```



---
## __init__
```python
from pytester import __init__
```



---
## gethookrecorder
```python
from pytester import gethookrecorder
```



---
## __repr__
```python
from pytester import __repr__
```



---
## finish_recording
```python
from pytester import finish_recording
```



---
## getcalls
```python
from pytester import getcalls
```

Get all recorded calls to hooks with the given names (or name).

---
## assert_contains
```python
from pytester import assert_contains
```



---
## popcall
```python
from pytester import popcall
```



---
## getcall
```python
from pytester import getcall
```



---
## getreports
```python
from pytester import getreports
```



---
## matchreport
```python
from pytester import matchreport
```

Return a testreport whose dotted import path matches.

---
## getfailures
```python
from pytester import getfailures
```



---
## getfailedcollections
```python
from pytester import getfailedcollections
```



---
## listoutcomes
```python
from pytester import listoutcomes
```



---
## countoutcomes
```python
from pytester import countoutcomes
```



---
## assertoutcome
```python
from pytester import assertoutcome
```



---
## clear
```python
from pytester import clear
```



---
## parseoutcomes
```python
from pytester import parseoutcomes
```

Return a dictionary of outcome noun -> count from parsing the terminal
output that the test process produced.

The returned nouns will always be in plural form::

    ======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====

Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}``.

---
## parse_summary_nouns
```python
from pytester import parse_summary_nouns
```

Extract the nouns from a pytest terminal summary line.

It always returns the plural noun for consistency::

    ======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====

Will return ``{"failed": 1, "passed": 1, "warnings": 1, "errors": 1}``.

---
## assert_outcomes
```python
from pytester import assert_outcomes
```

Assert that the specified outcomes appear with the respective
numbers (0 means it didn't occur) in the text output from a test run.

``warnings`` and ``deselected`` are only checked if not None.

---
## restore
```python
from pytester import restore
```



---
## TimeoutExpired
```python
from pytester import TimeoutExpired
```



---
## path
```python
from pytester import path
```

Temporary directory path used to create files/run tests from, etc.

---
## _finalize
```python
from pytester import _finalize
```

Clean up global state artifacts.

Some methods modify the global interpreter state and this tries to
clean this up. It does not remove the temporary directory however so
it can be looked at after the test run has finished.

---
## __take_sys_modules_snapshot
```python
from pytester import __take_sys_modules_snapshot
```



---
## make_hook_recorder
```python
from pytester import make_hook_recorder
```

Create a new :class:`HookRecorder` for a :class:`PytestPluginManager`.

---
## chdir
```python
from pytester import chdir
```

Cd into the temporary directory.

This is done automatically upon instantiation.

---
## _makefile
```python
from pytester import _makefile
```



---
## makefile
```python
from pytester import makefile
```

Create new text file(s) in the test directory.

:param ext:
    The extension the file(s) should use, including the dot, e.g. `.py`.
:param args:
    All args are treated as strings and joined using newlines.
    The result is written as contents to the file.  The name of the
    file is based on the test function requesting this fixture.
:param kwargs:
    Each keyword is the name of a file, while the value of it will
    be written as contents of the file.
:returns:
    The first created file.

Examples:

.. code-block:: python

    pytester.makefile(".txt", "line1", "line2")

    pytester.makefile(".ini", pytest="[pytest]\naddopts=-rs\n")

To create binary files, use :meth:`pathlib.Path.write_bytes` directly:

.. code-block:: python

    filename = pytester.path.joinpath("foo.bin")
    filename.write_bytes(b"...")

---
## makeconftest
```python
from pytester import makeconftest
```

Write a conftest.py file.

:param source: The contents.
:returns: The conftest.py file.

---
## makeini
```python
from pytester import makeini
```

Write a tox.ini file.

:param source: The contents.
:returns: The tox.ini file.

---
## getinicfg
```python
from pytester import getinicfg
```

Return the pytest section from the tox.ini config file.

---
## makepyprojecttoml
```python
from pytester import makepyprojecttoml
```

Write a pyproject.toml file.

:param source: The contents.
:returns: The pyproject.ini file.

.. versionadded:: 6.0

---
## makepyfile
```python
from pytester import makepyfile
```

Shortcut for .makefile() with a .py extension.

Defaults to the test name with a '.py' extension, e.g test_foobar.py, overwriting
existing files.

Examples:

.. code-block:: python

    def test_something(pytester):
        # Initial file is created test_something.py.
        pytester.makepyfile("foobar")
        # To create multiple files, pass kwargs accordingly.
        pytester.makepyfile(custom="foobar")
        # At this point, both 'test_something.py' & 'custom.py' exist in the test directory.

---
## maketxtfile
```python
from pytester import maketxtfile
```

Shortcut for .makefile() with a .txt extension.

Defaults to the test name with a '.txt' extension, e.g test_foobar.txt, overwriting
existing files.

Examples:

.. code-block:: python

    def test_something(pytester):
        # Initial file is created test_something.txt.
        pytester.maketxtfile("foobar")
        # To create multiple files, pass kwargs accordingly.
        pytester.maketxtfile(custom="foobar")
        # At this point, both 'test_something.txt' & 'custom.txt' exist in the test directory.

---
## syspathinsert
```python
from pytester import syspathinsert
```

Prepend a directory to sys.path, defaults to :attr:`path`.

This is undone automatically when this object dies at the end of each
test.

:param path:
    The path.

---
## mkdir
```python
from pytester import mkdir
```

Create a new (sub)directory.

:param name:
    The name of the directory, relative to the pytester path.
:returns:
    The created directory.
:rtype: pathlib.Path

---
## mkpydir
```python
from pytester import mkpydir
```

Create a new python package.

This creates a (sub)directory with an empty ``__init__.py`` file so it
gets recognised as a Python package.

---
## copy_example
```python
from pytester import copy_example
```

Copy file from project's directory into the testdir.

:param name:
    The name of the file to copy.
:return:
    Path to the copied directory (inside ``self.path``).
:rtype: pathlib.Path

---
## getnode
```python
from pytester import getnode
```

Get the collection node of a file.

:param config:
   A pytest config.
   See :py:meth:`parseconfig` and :py:meth:`parseconfigure` for creating it.
:param arg:
    Path to the file.
:returns:
    The node.

---
## getpathnode
```python
from pytester import getpathnode
```

Return the collection node of a file.

This is like :py:meth:`getnode` but uses :py:meth:`parseconfigure` to
create the (configured) pytest Config instance.

:param path:
    Path to the file.
:returns:
    The node.

---
## genitems
```python
from pytester import genitems
```

Generate all test items from a collection node.

This recurses into the collection node and returns a list of all the
test items contained within.

:param colitems:
    The collection nodes.
:returns:
    The collected items.

---
## runitem
```python
from pytester import runitem
```

Run the "test_func" Item.

The calling test instance (class containing the test method) must
provide a ``.getrunner()`` method which should return a runner which
can run the test protocol for a single item, e.g.
``_pytest.runner.runtestprotocol``.

---
## inline_runsource
```python
from pytester import inline_runsource
```

Run a test module in process using ``pytest.main()``.

This run writes "source" into a temporary file and runs
``pytest.main()`` on it, returning a :py:class:`HookRecorder` instance
for the result.

:param source: The source code of the test module.
:param cmdlineargs: Any extra command line arguments to use.

---
## inline_genitems
```python
from pytester import inline_genitems
```

Run ``pytest.main(['--collect-only'])`` in-process.

Runs the :py:func:`pytest.main` function to run all of pytest inside
the test process itself like :py:meth:`inline_run`, but returns a
tuple of the collected items and a :py:class:`HookRecorder` instance.

---
## inline_run
```python
from pytester import inline_run
```

Run ``pytest.main()`` in-process, returning a HookRecorder.

Runs the :py:func:`pytest.main` function to run all of pytest inside
the test process itself.  This means it can return a
:py:class:`HookRecorder` instance which gives more detailed results
from that run than can be done by matching stdout/stderr from
:py:meth:`runpytest`.

:param args:
    Command line arguments to pass to :py:func:`pytest.main`.
:param plugins:
    Extra plugin instances the ``pytest.main()`` instance should use.
:param no_reraise_ctrlc:
    Typically we reraise keyboard interrupts from the child run. If
    True, the KeyboardInterrupt exception is captured.

---
## runpytest_inprocess
```python
from pytester import runpytest_inprocess
```

Return result of running pytest in-process, providing a similar
interface to what self.runpytest() provides.

---
## runpytest
```python
from pytester import runpytest
```

Run pytest inline or in a subprocess, depending on the command line
option "--runpytest" and return a :py:class:`~pytest.RunResult`.

---
## _ensure_basetemp
```python
from pytester import _ensure_basetemp
```



---
## parseconfig
```python
from pytester import parseconfig
```

Return a new pytest :class:`pytest.Config` instance from given
commandline args.

This invokes the pytest bootstrapping code in _pytest.config to create a
new :py:class:`pytest.PytestPluginManager` and call the
:hook:`pytest_cmdline_parse` hook to create a new :class:`pytest.Config`
instance.

If :attr:`plugins` has been populated they should be plugin modules
to be registered with the plugin manager.

---
## parseconfigure
```python
from pytester import parseconfigure
```

Return a new pytest configured Config instance.

Returns a new :py:class:`pytest.Config` instance like
:py:meth:`parseconfig`, but also calls the :hook:`pytest_configure`
hook.

---
## getitem
```python
from pytester import getitem
```

Return the test item for a test function.

Writes the source to a python file and runs pytest's collection on
the resulting module, returning the test item for the requested
function name.

:param source:
    The module source.
:param funcname:
    The name of the test function for which to return a test item.
:returns:
    The test item.

---
## getitems
```python
from pytester import getitems
```

Return all test items collected from the module.

Writes the source to a Python file and runs pytest's collection on
the resulting module, returning all test items contained within.

---
## getmodulecol
```python
from pytester import getmodulecol
```

Return the module collection node for ``source``.

Writes ``source`` to a file using :py:meth:`makepyfile` and then
runs the pytest collection on it, returning the collection node for the
test module.

:param source:
    The source code of the module to collect.

:param configargs:
    Any extra arguments to pass to :py:meth:`parseconfigure`.

:param withinit:
    Whether to also write an ``__init__.py`` file to the same
    directory to ensure it is a package.

---
## collect_by_name
```python
from pytester import collect_by_name
```

Return the collection node for name from the module collection.

Searches a module collection node for a collection node matching the
given name.

:param modcol: A module collection node; see :py:meth:`getmodulecol`.
:param name: The name of the node to return.

---
## popen
```python
from pytester import popen
```

Invoke :py:class:`subprocess.Popen`.

Calls :py:class:`subprocess.Popen` making sure the current working
directory is in ``PYTHONPATH``.

You probably want to use :py:meth:`run` instead.

---
## run
```python
from pytester import run
```

Run a command with arguments.

Run a process using :py:class:`subprocess.Popen` saving the stdout and
stderr.

:param cmdargs:
    The sequence of arguments to pass to :py:class:`subprocess.Popen`,
    with path-like objects being converted to :py:class:`str`
    automatically.
:param timeout:
    The period in seconds after which to timeout and raise
    :py:class:`Pytester.TimeoutExpired`.
:param stdin:
    Optional standard input.

    - If it is ``CLOSE_STDIN`` (Default), then this method calls
      :py:class:`subprocess.Popen` with ``stdin=subprocess.PIPE``, and
      the standard input is closed immediately after the new command is
      started.

    - If it is of type :py:class:`bytes`, these bytes are sent to the
      standard input of the command.

    - Otherwise, it is passed through to :py:class:`subprocess.Popen`.
      For further information in this case, consult the document of the
      ``stdin`` parameter in :py:class:`subprocess.Popen`.
:type stdin: _pytest.compat.NotSetType | bytes | IO[Any] | int
:returns:
    The result.

---
## _dump_lines
```python
from pytester import _dump_lines
```



---
## _getpytestargs
```python
from pytester import _getpytestargs
```



---
## runpython
```python
from pytester import runpython
```

Run a python script using sys.executable as interpreter.

---
## runpython_c
```python
from pytester import runpython_c
```

Run ``python -c "command"``.

---
## runpytest_subprocess
```python
from pytester import runpytest_subprocess
```

Run pytest as a subprocess with given arguments.

Any plugins added to the :py:attr:`plugins` list will be added using the
``-p`` command line option.  Additionally ``--basetemp`` is used to put
any temporary files and directories in a numbered directory prefixed
with "runpytest-" to not conflict with the normal numbered pytest
location for temporary files and directories.

:param args:
    The sequence of arguments to pass to the pytest subprocess.
:param timeout:
    The period in seconds after which to timeout and raise
    :py:class:`Pytester.TimeoutExpired`.
:returns:
    The result.

---
## spawn_pytest
```python
from pytester import spawn_pytest
```

Run pytest using pexpect.

This makes sure to use the right pytest and sets up the temporary
directory locations.

The pexpect child is returned.

---
## spawn
```python
from pytester import spawn
```

Run a command using pexpect.

The pexpect child is returned.

---
## assert_contains_lines
```python
from pytester import assert_contains_lines
```

Assert that ``lines2`` are contained (linearly) in :attr:`stringio`'s value.

Lines are matched using :func:`LineMatcher.fnmatch_lines <pytest.LineMatcher.fnmatch_lines>`.

---
## __str__
```python
from pytester import __str__
```

Return the entire original text.

.. versionadded:: 6.2
    You can use :meth:`str` in older versions.

---
## _getlines
```python
from pytester import _getlines
```



---
## fnmatch_lines_random
```python
from pytester import fnmatch_lines_random
```

Check lines exist in the output in any order (using :func:`python:fnmatch.fnmatch`).

---
## re_match_lines_random
```python
from pytester import re_match_lines_random
```

Check lines exist in the output in any order (using :func:`python:re.match`).

---
## _match_lines_random
```python
from pytester import _match_lines_random
```



---
## get_lines_after
```python
from pytester import get_lines_after
```

Return all lines following the given line in the text.

The given line can contain glob wildcards.

---
## _log
```python
from pytester import _log
```



---
## _log_text
```python
from pytester import _log_text
```



---
## fnmatch_lines
```python
from pytester import fnmatch_lines
```

Check lines exist in the output (using :func:`python:fnmatch.fnmatch`).

The argument is a list of lines which have to match and can use glob
wildcards.  If they do not match a pytest.fail() is called.  The
matches and non-matches are also shown as part of the error message.

:param lines2: String patterns to match.
:param consecutive: Match lines consecutively?

---
## re_match_lines
```python
from pytester import re_match_lines
```

Check lines exist in the output (using :func:`python:re.match`).

The argument is a list of lines which have to match using ``re.match``.
If they do not match a pytest.fail() is called.

The matches and non-matches are also shown as part of the error message.

:param lines2: string patterns to match.
:param consecutive: match lines consecutively?

---
## _match_lines
```python
from pytester import _match_lines
```

Underlying implementation of ``fnmatch_lines`` and ``re_match_lines``.

:param Sequence[str] lines2:
    List of string patterns to match. The actual format depends on
    ``match_func``.
:param match_func:
    A callable ``match_func(line, pattern)`` where line is the
    captured line from stdout/stderr and pattern is the matching
    pattern.
:param str match_nickname:
    The nickname for the match function that will be logged to stdout
    when a match occurs.
:param consecutive:
    Match lines consecutively?

---
## no_fnmatch_line
```python
from pytester import no_fnmatch_line
```

Ensure captured lines do not match the given pattern, using ``fnmatch.fnmatch``.

:param str pat: The pattern to match lines.

---
## no_re_match_line
```python
from pytester import no_re_match_line
```

Ensure captured lines do not match the given pattern, using ``re.match``.

:param str pat: The regular expression to match lines.

---
## _no_match_line
```python
from pytester import _no_match_line
```

Ensure captured lines does not have a the given pattern, using ``fnmatch.fnmatch``.

:param str pat: The pattern to match lines.

---
## _fail
```python
from pytester import _fail
```



---
## str
```python
from pytester import str
```

Return the entire original text.

---
## isopen
```python
from pytester import isopen
```



---
## __getattr__
```python
from pytester import __getattr__
```



---
## before
```python
from pytester import before
```



---
## after
```python
from pytester import after
```



---
## preserve_module
```python
from pytester import preserve_module
```



---
## to_text
```python
from pytester import to_text
```



---
## Collect
```python
from pytester import Collect
```



---
## handle_timeout
```python
from pytester import handle_timeout
```



---
## reprec
```python
from pytester import reprec
```



---
## __name__
```python
from faulthandler import __name__
```



---
## pytest_addoption
```python
from faulthandler import pytest_addoption
```



---
## pytest_configure
```python
from faulthandler import pytest_configure
```



---
## pytest_unconfigure
```python
from faulthandler import pytest_unconfigure
```



---
## get_stderr_fileno
```python
from faulthandler import get_stderr_fileno
```



---
## get_timeout_config_value
```python
from faulthandler import get_timeout_config_value
```



---
## pytest_runtest_protocol
```python
from faulthandler import pytest_runtest_protocol
```



---
## pytest_enter_pdb
```python
from faulthandler import pytest_enter_pdb
```

Cancel any traceback dumping due to timeout before entering pdb.

---
## pytest_exception_interact
```python
from faulthandler import pytest_exception_interact
```

Cancel any traceback dumping due to an interactive exception being
raised.

---
## __name__
```python
from outcomes import __name__
```

Exception classes and constants handling test outcomes as well as
functions creating them.

---
## OutcomeException
```python
from outcomes import OutcomeException
```

OutcomeException and its subclass instances indicate and contain info
about test and collection outcomes.

---
## Skipped
```python
from outcomes import Skipped
```



---
## Failed
```python
from outcomes import Failed
```

Raised from an explicit call to pytest.fail().

---
## Exit
```python
from outcomes import Exit
```

Raised for immediate program exits (no tracebacks/summaries).

---
## _WithException
```python
from outcomes import _WithException
```



---
## _with_exception
```python
from outcomes import _with_exception
```



---
## exit
```python
from outcomes import exit
```

Exit testing process.

:param reason:
    The message to show as the reason for exiting pytest.  reason has a default value
    only because `msg` is deprecated.

:param returncode:
    Return code to be used when exiting pytest. None means the same as ``0`` (no error), same as :func:`sys.exit`.

:raises pytest.exit.Exception:
    The exception that is raised.

---
## skip
```python
from outcomes import skip
```

Skip an executing test with the given message.

This function should be called only during testing (setup, call or teardown) or
during collection by using the ``allow_module_level`` flag.  This function can
be called in doctests as well.

:param reason:
    The message to show the user as reason for the skip.

:param allow_module_level:
    Allows this function to be called at module level.
    Raising the skip exception at module level will stop
    the execution of the module and prevent the collection of all tests in the module,
    even those defined before the `skip` call.

    Defaults to False.

:raises pytest.skip.Exception:
    The exception that is raised.

.. note::
    It is better to use the :ref:`pytest.mark.skipif ref` marker when
    possible to declare a test to be skipped under certain conditions
    like mismatching platforms or dependencies.
    Similarly, use the ``# doctest: +SKIP`` directive (see :py:data:`doctest.SKIP`)
    to skip a doctest statically.

---
## fail
```python
from outcomes import fail
```

Explicitly fail an executing test with the given message.

:param reason:
    The message to show the user as reason for the failure.

:param pytrace:
    If False, msg represents the full failure information and no
    python traceback will be reported.

:raises pytest.fail.Exception:
    The exception that is raised.

---
## XFailed
```python
from outcomes import XFailed
```

Raised from an explicit call to pytest.xfail().

---
## xfail
```python
from outcomes import xfail
```

Imperatively xfail an executing test or setup function with the given reason.

This function should be called only during testing (setup, call or teardown).

No other code is executed after using ``xfail()`` (it is implemented
internally by raising an exception).

:param reason:
    The message to show the user as reason for the xfail.

.. note::
    It is better to use the :ref:`pytest.mark.xfail ref` marker when
    possible to declare a test to be xfailed under certain conditions
    like known bugs or missing features.

:raises pytest.xfail.Exception:
    The exception that is raised.

---
## importorskip
```python
from outcomes import importorskip
```

Import and return the requested module ``modname``, or skip the
current test if the module cannot be imported.

:param modname:
    The name of the module to import.
:param minversion:
    If given, the imported module's ``__version__`` attribute must be at
    least this minimal version, otherwise the test is still skipped.
:param reason:
    If given, this reason is shown as the message when the module cannot
    be imported.
:param exc_type:
    The exception that should be captured in order to skip modules.
    Must be :py:class:`ImportError` or a subclass.

    If the module can be imported but raises :class:`ImportError`, pytest will
    issue a warning to the user, as often users expect the module not to be
    found (which would raise :class:`ModuleNotFoundError` instead).

    This warning can be suppressed by passing ``exc_type=ImportError`` explicitly.

    See :ref:`import-or-skip-import-error` for details.


:returns:
    The imported module. This should be assigned to its canonical name.

:raises pytest.skip.Exception:
    If the module cannot be imported.

Example::

    docutils = pytest.importorskip("docutils")

.. versionadded:: 8.2

    The ``exc_type`` parameter.

---
## __init__
```python
from outcomes import __init__
```



---
## __repr__
```python
from outcomes import __repr__
```



---
## decorate
```python
from outcomes import decorate
```



---
## __name__
```python
from stepwise import __name__
```



---
## pytest_addoption
```python
from stepwise import pytest_addoption
```



---
## pytest_configure
```python
from stepwise import pytest_configure
```



---
## pytest_sessionfinish
```python
from stepwise import pytest_sessionfinish
```



---
## StepwisePlugin
```python
from stepwise import StepwisePlugin
```



---
## __init__
```python
from stepwise import __init__
```



---
## pytest_sessionstart
```python
from stepwise import pytest_sessionstart
```



---
## pytest_collection_modifyitems
```python
from stepwise import pytest_collection_modifyitems
```



---
## pytest_runtest_logreport
```python
from stepwise import pytest_runtest_logreport
```



---
## pytest_report_collectionfinish
```python
from stepwise import pytest_report_collectionfinish
```



---
## __name__
```python
from junitxml import __name__
```

Report test results in JUnit-XML format, for use with Jenkins and build
integration servers.

Based on initial code from Ross Lawley.

Output conforms to
https://github.com/jenkinsci/xunit-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd

---
## bin_xml_escape
```python
from junitxml import bin_xml_escape
```

Visually escape invalid XML characters.

For example, transforms
    'hello\aworld\b'
into
    'hello#x07world#x08'
Note that the #xABs are *not* XML escapes - missing the ampersand &#xAB.
The idea is to escape visually for the user rather than for XML itself.

---
## merge_family
```python
from junitxml import merge_family
```



---
## _NodeReporter
```python
from junitxml import _NodeReporter
```



---
## _warn_incompatibility_with_xunit2
```python
from junitxml import _warn_incompatibility_with_xunit2
```

Emit a PytestWarning about the given fixture being incompatible with newer xunit revisions.

---
## record_property
```python
from junitxml import record_property
```

Add extra properties to the calling test.

User properties become part of the test report and are available to the
configured reporters, like JUnit XML.

The fixture is callable with ``name, value``. The value is automatically
XML-encoded.

Example::

    def test_function(record_property):
        record_property("example_key", 1)

---
## record_xml_attribute
```python
from junitxml import record_xml_attribute
```

Add extra xml attributes to the tag for the calling test.

The fixture is callable with ``name, value``. The value is
automatically XML-encoded.

---
## _check_record_param_type
```python
from junitxml import _check_record_param_type
```

Used by record_testsuite_property to check that the given parameter name is of the proper
type.

---
## record_testsuite_property
```python
from junitxml import record_testsuite_property
```

Record a new ``<property>`` tag as child of the root ``<testsuite>``.

This is suitable to writing global information regarding the entire test
suite, and is compatible with ``xunit2`` JUnit family.

This is a ``session``-scoped fixture which is called with ``(name, value)``. Example:

.. code-block:: python

    def test_foo(record_testsuite_property):
        record_testsuite_property("ARCH", "PPC")
        record_testsuite_property("STORAGE_TYPE", "CEPH")

:param name:
    The property name.
:param value:
    The property value. Will be converted to a string.

.. warning::

    Currently this fixture **does not work** with the
    `pytest-xdist <https://github.com/pytest-dev/pytest-xdist>`__ plugin. See
    :issue:`7767` for details.

---
## pytest_addoption
```python
from junitxml import pytest_addoption
```



---
## pytest_configure
```python
from junitxml import pytest_configure
```



---
## pytest_unconfigure
```python
from junitxml import pytest_unconfigure
```



---
## mangle_test_address
```python
from junitxml import mangle_test_address
```



---
## LogXML
```python
from junitxml import LogXML
```



---
## repl
```python
from junitxml import repl
```



---
## __init__
```python
from junitxml import __init__
```



---
## append
```python
from junitxml import append
```



---
## add_property
```python
from junitxml import add_property
```



---
## add_attribute
```python
from junitxml import add_attribute
```



---
## make_properties_node
```python
from junitxml import make_properties_node
```

Return a Junit node containing custom properties, if any.

---
## record_testreport
```python
from junitxml import record_testreport
```



---
## to_xml
```python
from junitxml import to_xml
```



---
## _add_simple
```python
from junitxml import _add_simple
```



---
## write_captured_output
```python
from junitxml import write_captured_output
```



---
## _prepare_content
```python
from junitxml import _prepare_content
```



---
## _write_content
```python
from junitxml import _write_content
```



---
## append_pass
```python
from junitxml import append_pass
```



---
## append_failure
```python
from junitxml import append_failure
```



---
## append_collect_error
```python
from junitxml import append_collect_error
```



---
## append_collect_skipped
```python
from junitxml import append_collect_skipped
```



---
## append_error
```python
from junitxml import append_error
```



---
## append_skipped
```python
from junitxml import append_skipped
```



---
## finalize
```python
from junitxml import finalize
```



---
## append_property
```python
from junitxml import append_property
```



---
## add_attr_noop
```python
from junitxml import add_attr_noop
```



---
## record_func
```python
from junitxml import record_func
```

No-op function in case --junit-xml was not passed in the command-line.

---
## node_reporter
```python
from junitxml import node_reporter
```



---
## add_stats
```python
from junitxml import add_stats
```



---
## _opentestcase
```python
from junitxml import _opentestcase
```



---
## pytest_runtest_logreport
```python
from junitxml import pytest_runtest_logreport
```

Handle a setup/call/teardown report, generating the appropriate
XML tags as necessary.

Note: due to plugins like xdist, this hook may be called in interlaced
order with reports from other nodes. For example:

Usual call order:
    -> setup node1
    -> call node1
    -> teardown node1
    -> setup node2
    -> call node2
    -> teardown node2

Possible call order in xdist:
    -> setup node1
    -> call node1
    -> setup node2
    -> call node2
    -> teardown node2
    -> teardown node1

---
## update_testcase_duration
```python
from junitxml import update_testcase_duration
```

Accumulate total duration for nodeid from given report and update
the Junit.testcase with the new total if already created.

---
## pytest_collectreport
```python
from junitxml import pytest_collectreport
```



---
## pytest_internalerror
```python
from junitxml import pytest_internalerror
```



---
## pytest_sessionstart
```python
from junitxml import pytest_sessionstart
```



---
## pytest_sessionfinish
```python
from junitxml import pytest_sessionfinish
```



---
## pytest_terminal_summary
```python
from junitxml import pytest_terminal_summary
```



---
## add_global_property
```python
from junitxml import add_global_property
```



---
## _get_global_properties_node
```python
from junitxml import _get_global_properties_node
```

Return a Junit node containing custom properties, if any.

---
## __name__
```python
from python import __name__
```

pygments.lexers.python
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Python and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## pytest_addoption
```python
from python import pytest_addoption
```



---
## pytest_generate_tests
```python
from python import pytest_generate_tests
```



---
## pytest_configure
```python
from python import pytest_configure
```



---
## async_warn_and_skip
```python
from python import async_warn_and_skip
```



---
## pytest_pyfunc_call
```python
from python import pytest_pyfunc_call
```



---
## pytest_collect_directory
```python
from python import pytest_collect_directory
```



---
## pytest_collect_file
```python
from python import pytest_collect_file
```



---
## path_matches_patterns
```python
from python import path_matches_patterns
```

Return whether path matches any of the patterns in the list of globs given.

---
## pytest_pycollect_makemodule
```python
from python import pytest_pycollect_makemodule
```



---
## pytest_pycollect_makeitem
```python
from python import pytest_pycollect_makeitem
```



---
## PyobjMixin
```python
from python import PyobjMixin
```

this mix-in inherits from Node to carry over the typing information

as its intended to always mix in before a node
its position in the mro is unaffected

---
## _EmptyClass
```python
from python import _EmptyClass
```



---
## PyCollector
```python
from python import PyCollector
```



---
## importtestmodule
```python
from python import importtestmodule
```



---
## Module
```python
from python import Module
```

Collector for test classes and functions in a Python module.

---
## Package
```python
from python import Package
```

Collector for files and directories in a Python packages -- directories
with an `__init__.py` file.

.. note::

    Directories without an `__init__.py` file are instead collected by
    :class:`~pytest.Dir` by default. Both are :class:`~pytest.Directory`
    collectors.

.. versionchanged:: 8.0

    Now inherits from :class:`~pytest.Directory`.

---
## _call_with_optional_argument
```python
from python import _call_with_optional_argument
```

Call the given function with the given argument if func accepts one argument, otherwise
calls func without arguments.

---
## _get_first_non_fixture_func
```python
from python import _get_first_non_fixture_func
```

Return the attribute from the given object to be used as a setup/teardown
xunit-style function, but only if not marked as a fixture to avoid calling it twice.

---
## Class
```python
from python import Class
```

Collector for test methods (and nested classes) in a Python class.

---
## hasinit
```python
from python import hasinit
```



---
## hasnew
```python
from python import hasnew
```



---
## IdMaker
```python
from python import IdMaker
```

Make IDs for a parametrization.

---
## CallSpec2
```python
from python import CallSpec2
```

A planned parameterized invocation of a test function.

Calculated during collection for a given test function's Metafunc.
Once collection is over, each callspec is turned into a single Item
and stored in item.callspec.

---
## get_direct_param_fixture_func
```python
from python import get_direct_param_fixture_func
```



---
## Metafunc
```python
from python import Metafunc
```

Objects passed to the :hook:`pytest_generate_tests` hook.

They help to inspect a test function and to generate tests according to
test configuration or values specified in the class or module where a
test function is defined.

---
## _find_parametrized_scope
```python
from python import _find_parametrized_scope
```

Find the most appropriate scope for a parametrized call based on its arguments.

When there's at least one direct argument, always use "function" scope.

When a test function is parametrized and all its arguments are indirect
(e.g. fixtures), return the most narrow scope based on the fixtures used.

Related to issue #1832, based on code posted by @Kingdread.

---
## _ascii_escaped_by_config
```python
from python import _ascii_escaped_by_config
```



---
## Function
```python
from python import Function
```

Item responsible for setting up and executing a Python test function.

:param name:
    The full function name, including any decorations like those
    added by parametrization (``my_func[my_param]``).
:param parent:
    The parent Node.
:param config:
    The pytest Config object.
:param callspec:
    If given, this function has been parametrized and the callspec contains
    meta information about the parametrization.
:param callobj:
    If given, the object which will be called when the Function is invoked,
    otherwise the callobj will be obtained from ``parent`` using ``originalname``.
:param keywords:
    Keywords bound to the function object for "-k" matching.
:param session:
    The pytest Session object.
:param fixtureinfo:
    Fixture information already resolved at this fixture node..
:param originalname:
    The attribute name to use for accessing the underlying function object.
    Defaults to ``name``. Set this if name is different from the original name,
    for example when it contains decorations like those added by parametrization
    (``my_func[my_param]``).

---
## FunctionDefinition
```python
from python import FunctionDefinition
```

This class is a stop gap solution until we evolve to have actual function
definition nodes and manage to get rid of ``metafunc``.

---
## module
```python
from python import module
```

Python module object this node was collected from (can be None).

---
## cls
```python
from python import cls
```

Python class object this node was collected from (can be None).

---
## instance
```python
from python import instance
```



---
## obj
```python
from python import obj
```



---
## _getobj
```python
from python import _getobj
```



---
## getmodpath
```python
from python import getmodpath
```

Return Python path relative to the containing module.

---
## reportinfo
```python
from python import reportinfo
```



---
## funcnamefilter
```python
from python import funcnamefilter
```



---
## isnosetest
```python
from python import isnosetest
```

Look for the __test__ attribute, which is applied by the
@nose.tools.istest decorator.

---
## classnamefilter
```python
from python import classnamefilter
```



---
## istestfunction
```python
from python import istestfunction
```



---
## istestclass
```python
from python import istestclass
```



---
## _matches_prefix_or_glob_option
```python
from python import _matches_prefix_or_glob_option
```

Check if the given name matches the prefix or glob-pattern defined
in ini configuration.

---
## collect
```python
from python import collect
```



---
## _genfunctions
```python
from python import _genfunctions
```



---
## _register_setup_module_fixture
```python
from python import _register_setup_module_fixture
```

Register an autouse, module-scoped fixture for the collected module object
that invokes setUpModule/tearDownModule if either or both are available.

Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with
other fixtures (#517).

---
## _register_setup_function_fixture
```python
from python import _register_setup_function_fixture
```

Register an autouse, function-scoped fixture for the collected module object
that invokes setup_function/teardown_function if either or both are available.

Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with
other fixtures (#517).

---
## __init__
```python
from python import __init__
```



---
## setup
```python
from python import setup
```



---
## from_parent
```python
from python import from_parent
```

The public constructor.

---
## newinstance
```python
from python import newinstance
```



---
## _register_setup_class_fixture
```python
from python import _register_setup_class_fixture
```

Register an autouse, class scoped fixture into the collected class object
that invokes setup_class/teardown_class if either or both are available.

Using a fixture to invoke this methods ensures we play nicely and unsurprisingly with
other fixtures (#517).

---
## _register_setup_method_fixture
```python
from python import _register_setup_method_fixture
```

Register an autouse, function scoped fixture into the collected class object
that invokes setup_method/teardown_method if either or both are available.

Using a fixture to invoke these methods ensures we play nicely and unsurprisingly with
other fixtures (#517).

---
## make_unique_parameterset_ids
```python
from python import make_unique_parameterset_ids
```

Make a unique identifier for each ParameterSet, that may be used to
identify the parametrization in a node ID.

Format is <prm_1_token>-...-<prm_n_token>[counter], where prm_x_token is
- user-provided id, if given
- else an id derived from the value, applicable for certain types
- else <argname><parameterset index>
The counter suffix is appended only in case a string wouldn't be unique
otherwise.

---
## _resolve_ids
```python
from python import _resolve_ids
```

Resolve IDs for all ParameterSets (may contain duplicates).

---
## _idval
```python
from python import _idval
```

Make an ID for a parameter in a ParameterSet.

---
## _idval_from_function
```python
from python import _idval_from_function
```

Try to make an ID for a parameter in a ParameterSet using the
user-provided id callable, if given.

---
## _idval_from_hook
```python
from python import _idval_from_hook
```

Try to make an ID for a parameter in a ParameterSet by calling the
:hook:`pytest_make_parametrize_id` hook.

---
## _idval_from_value
```python
from python import _idval_from_value
```

Try to make an ID for a parameter in a ParameterSet from its value,
if the value type is supported.

---
## _idval_from_value_required
```python
from python import _idval_from_value_required
```

Like _idval_from_value(), but fails if the type is not supported.

---
## _idval_from_argname
```python
from python import _idval_from_argname
```

Make an ID for a parameter in a ParameterSet from the argument name
and the index of the ParameterSet.

---
## setmulti
```python
from python import setmulti
```



---
## getparam
```python
from python import getparam
```



---
## id
```python
from python import id
```



---
## parametrize
```python
from python import parametrize
```

Add new invocations to the underlying test function using the list
of argvalues for the given argnames. Parametrization is performed
during the collection phase. If you need to setup expensive resources
see about setting indirect to do it rather than at test setup time.

Can be called multiple times per test function (but only on different
argument names), in which case each call parametrizes all previous
parametrizations, e.g.

::

    unparametrized:         t
    parametrize ["x", "y"]: t[x], t[y]
    parametrize [1, 2]:     t[x-1], t[x-2], t[y-1], t[y-2]

:param argnames:
    A comma-separated string denoting one or more argument names, or
    a list/tuple of argument strings.

:param argvalues:
    The list of argvalues determines how often a test is invoked with
    different argument values.

    If only one argname was specified argvalues is a list of values.
    If N argnames were specified, argvalues must be a list of
    N-tuples, where each tuple-element specifies a value for its
    respective argname.
:type argvalues: Iterable[_pytest.mark.structures.ParameterSet | Sequence[object] | object]
:param indirect:
    A list of arguments' names (subset of argnames) or a boolean.
    If True the list contains all names from the argnames. Each
    argvalue corresponding to an argname in this list will
    be passed as request.param to its respective argname fixture
    function so that it can perform more expensive setups during the
    setup phase of a test rather than at collection time.

:param ids:
    Sequence of (or generator for) ids for ``argvalues``,
    or a callable to return part of the id for each argvalue.

    With sequences (and generators like ``itertools.count()``) the
    returned ids should be of type ``string``, ``int``, ``float``,
    ``bool``, or ``None``.
    They are mapped to the corresponding index in ``argvalues``.
    ``None`` means to use the auto-generated id.

    If it is a callable it will be called for each entry in
    ``argvalues``, and the return value is used as part of the
    auto-generated id for the whole set (where parts are joined with
    dashes ("-")).
    This is useful to provide more specific ids for certain items, e.g.
    dates.  Returning ``None`` will use an auto-generated id.

    If no ids are provided they will be generated automatically from
    the argvalues.

:param scope:
    If specified it denotes the scope of the parameters.
    The scope is used for grouping tests by parameter instances.
    It will also override any fixture-function defined scope, allowing
    to set a dynamic scope using test context or configuration.

---
## _resolve_parameter_set_ids
```python
from python import _resolve_parameter_set_ids
```

Resolve the actual ids for the given parameter sets.

:param argnames:
    Argument names passed to ``parametrize()``.
:param ids:
    The `ids` parameter of the ``parametrize()`` call (see docs).
:param parametersets:
    The parameter sets, each containing a set of values corresponding
    to ``argnames``.
:param nodeid str:
    The nodeid of the definition item that generated this
    parametrization.
:returns:
    List with ids for each parameter set given.

---
## _validate_ids
```python
from python import _validate_ids
```



---
## _resolve_args_directness
```python
from python import _resolve_args_directness
```

Resolve if each parametrized argument must be considered an indirect
parameter to a fixture of the same name, or a direct parameter to the
parametrized function, based on the ``indirect`` parameter of the
parametrized() call.

:param argnames:
    List of argument names passed to ``parametrize()``.
:param indirect:
    Same as the ``indirect`` parameter of ``parametrize()``.
:returns
    A dict mapping each arg name to either "indirect" or "direct".

---
## _validate_if_using_arg_names
```python
from python import _validate_if_using_arg_names
```

Check if all argnames are being used, by default values, or directly/indirectly.

:param List[str] argnames: List of argument names passed to ``parametrize()``.
:param indirect: Same as the ``indirect`` parameter of ``parametrize()``.
:raises ValueError: If validation fails.

---
## _initrequest
```python
from python import _initrequest
```



---
## function
```python
from python import function
```

Underlying python 'function' object.

---
## _getinstance
```python
from python import _getinstance
```



---
## _pyfuncitem
```python
from python import _pyfuncitem
```

(compatonly) for code expecting pytest-2.2 style request objects.

---
## runtest
```python
from python import runtest
```



---
## _traceback_filter
```python
from python import _traceback_filter
```



---
## repr_failure
```python
from python import repr_failure
```



---
## xunit_setup_module_fixture
```python
from python import xunit_setup_module_fixture
```



---
## xunit_setup_function_fixture
```python
from python import xunit_setup_function_fixture
```



---
## sort_key
```python
from python import sort_key
```



---
## xunit_setup_class_fixture
```python
from python import xunit_setup_class_fixture
```



---
## xunit_setup_method_fixture
```python
from python import xunit_setup_method_fixture
```



---
## __name__
```python
from reports import __name__
```



---
## getworkerinfoline
```python
from reports import getworkerinfoline
```



---
## BaseReport
```python
from reports import BaseReport
```



---
## _report_unserialization_failure
```python
from reports import _report_unserialization_failure
```



---
## TestReport
```python
from reports import TestReport
```

Basic test report object (also used for setup and teardown calls if
they fail).

Reports can contain arbitrary extra attributes.

---
## CollectReport
```python
from reports import CollectReport
```

Collection report object.

Reports can contain arbitrary extra attributes.

---
## CollectErrorRepr
```python
from reports import CollectErrorRepr
```



---
## pytest_report_to_serializable
```python
from reports import pytest_report_to_serializable
```



---
## pytest_report_from_serializable
```python
from reports import pytest_report_from_serializable
```



---
## _report_to_json
```python
from reports import _report_to_json
```

Return the contents of this report as a dict of builtin entries,
suitable for serialization.

This was originally the serialize_report() function from xdist (ca03269).

---
## _report_kwargs_from_json
```python
from reports import _report_kwargs_from_json
```

Return **kwargs that can be used to construct a TestReport or
CollectReport instance.

This was originally the serialize_report() function from xdist (ca03269).

---
## __init__
```python
from reports import __init__
```



---
## toterminal
```python
from reports import toterminal
```



---
## get_sections
```python
from reports import get_sections
```



---
## longreprtext
```python
from reports import longreprtext
```

Read-only property that returns the full string representation of
``longrepr``.

.. versionadded:: 3.0

---
## caplog
```python
from reports import caplog
```

Return captured log lines, if log capturing is enabled.

.. versionadded:: 3.5

---
## capstdout
```python
from reports import capstdout
```

Return captured text from stdout, if capturing is enabled.

.. versionadded:: 3.0

---
## capstderr
```python
from reports import capstderr
```

Return captured text from stderr, if capturing is enabled.

.. versionadded:: 3.0

---
## passed
```python
from reports import passed
```

Whether the outcome is passed.

---
## failed
```python
from reports import failed
```

Whether the outcome is failed.

---
## skipped
```python
from reports import skipped
```

Whether the outcome is skipped.

---
## fspath
```python
from reports import fspath
```

The path portion of the reported node, as a string.

---
## count_towards_summary
```python
from reports import count_towards_summary
```

**Experimental** Whether this report should be counted towards the
totals shown at the end of the test session: "1 passed, 1 failure, etc".

.. note::

    This function is considered **experimental**, so beware that it is subject to changes
    even in patch releases.

---
## head_line
```python
from reports import head_line
```

**Experimental** The head line shown with longrepr output for this
report, more commonly during traceback representation during
failures::

    ________ Test.foo ________


In the example above, the head_line is "Test.foo".

.. note::

    This function is considered **experimental**, so beware that it is subject to changes
    even in patch releases.

---
## _get_verbose_word_with_markup
```python
from reports import _get_verbose_word_with_markup
```



---
## _to_json
```python
from reports import _to_json
```

Return the contents of this report as a dict of builtin entries,
suitable for serialization.

This was originally the serialize_report() function from xdist (ca03269).

Experimental method.

---
## _from_json
```python
from reports import _from_json
```

Create either a TestReport or CollectReport, depending on the calling class.

It is the callers responsibility to know which class to pass here.

This was originally the serialize_report() function from xdist (ca03269).

Experimental method.

---
## __repr__
```python
from reports import __repr__
```



---
## from_item_and_call
```python
from reports import from_item_and_call
```

Create and fill a TestReport with standard item and call info.

:param item: The item.
:param call: The call info.

---
## location
```python
from reports import location
```



---
## serialize_repr_entry
```python
from reports import serialize_repr_entry
```



---
## serialize_repr_traceback
```python
from reports import serialize_repr_traceback
```



---
## serialize_repr_crash
```python
from reports import serialize_repr_crash
```



---
## serialize_exception_longrepr
```python
from reports import serialize_exception_longrepr
```



---
## deserialize_repr_entry
```python
from reports import deserialize_repr_entry
```



---
## deserialize_repr_traceback
```python
from reports import deserialize_repr_traceback
```



---
## deserialize_repr_crash
```python
from reports import deserialize_repr_crash
```



---
## __getattr__
```python
from reports import __getattr__
```



---
## __name__
```python
from doctest import __name__
```

Mimic doctest in Sphinx.

The extension automatically execute code snippets and checks their results.

---
## pytest_addoption
```python
from doctest import pytest_addoption
```



---
## pytest_unconfigure
```python
from doctest import pytest_unconfigure
```



---
## pytest_collect_file
```python
from doctest import pytest_collect_file
```



---
## _is_setup_py
```python
from doctest import _is_setup_py
```



---
## _is_doctest
```python
from doctest import _is_doctest
```



---
## _is_main_py
```python
from doctest import _is_main_py
```



---
## ReprFailDoctest
```python
from doctest import ReprFailDoctest
```



---
## MultipleDoctestFailures
```python
from doctest import MultipleDoctestFailures
```



---
## _init_runner_class
```python
from doctest import _init_runner_class
```



---
## _get_runner
```python
from doctest import _get_runner
```



---
## DoctestItem
```python
from doctest import DoctestItem
```



---
## _get_flag_lookup
```python
from doctest import _get_flag_lookup
```



---
## get_optionflags
```python
from doctest import get_optionflags
```



---
## _get_continue_on_failure
```python
from doctest import _get_continue_on_failure
```



---
## DoctestTextfile
```python
from doctest import DoctestTextfile
```



---
## _check_all_skipped
```python
from doctest import _check_all_skipped
```

Raise pytest.skip() if all examples in the given DocTest have the SKIP
option set.

---
## _is_mocked
```python
from doctest import _is_mocked
```

Return if an object is possibly a mock object by checking the
existence of a highly improbable attribute.

---
## _patch_unwrap_mock_aware
```python
from doctest import _patch_unwrap_mock_aware
```

Context manager which replaces ``inspect.unwrap`` with a version
that's aware of mock objects and doesn't recurse into them.

---
## DoctestModule
```python
from doctest import DoctestModule
```



---
## _init_checker_class
```python
from doctest import _init_checker_class
```



---
## _get_checker
```python
from doctest import _get_checker
```

Return a doctest.OutputChecker subclass that supports some
additional options:

* ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b''
  prefixes (respectively) in string literals. Useful when the same
  doctest should run in Python 2 and Python 3.

* NUMBER to ignore floating-point differences smaller than the
  precision of the literal number in the doctest.

An inner class is used to avoid importing "doctest" at the module
level.

---
## _get_allow_unicode_flag
```python
from doctest import _get_allow_unicode_flag
```

Register and return the ALLOW_UNICODE flag.

---
## _get_allow_bytes_flag
```python
from doctest import _get_allow_bytes_flag
```

Register and return the ALLOW_BYTES flag.

---
## _get_number_flag
```python
from doctest import _get_number_flag
```

Register and return the NUMBER flag.

---
## _get_report_choice
```python
from doctest import _get_report_choice
```

Return the actual `doctest` module flag value.

We want to do it as late as possible to avoid importing `doctest` and all
its dependencies when parsing options, as it adds overhead and breaks tests.

---
## doctest_namespace
```python
from doctest import doctest_namespace
```

Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests.

Usually this fixture is used in conjunction with another ``autouse`` fixture:

.. code-block:: python

    @pytest.fixture(autouse=True)
    def add_np(doctest_namespace):
        doctest_namespace["np"] = numpy

For more details: :ref:`doctest_namespace`.

---
## __init__
```python
from doctest import __init__
```



---
## toterminal
```python
from doctest import toterminal
```



---
## PytestDoctestRunner
```python
from doctest import PytestDoctestRunner
```

Runner to collect failures.

Note that the out variable in this case is a list instead of a
stdout-like object.

---
## from_parent
```python
from doctest import from_parent
```

The public named constructor.

---
## _initrequest
```python
from doctest import _initrequest
```



---
## setup
```python
from doctest import setup
```



---
## runtest
```python
from doctest import runtest
```



---
## _disable_output_capturing_for_darwin
```python
from doctest import _disable_output_capturing_for_darwin
```

Disable output capturing. Otherwise, stdout is lost to doctest (#985).

---
## repr_failure
```python
from doctest import repr_failure
```



---
## reportinfo
```python
from doctest import reportinfo
```



---
## collect
```python
from doctest import collect
```



---
## _mock_aware_unwrap
```python
from doctest import _mock_aware_unwrap
```



---
## LiteralsOutputChecker
```python
from doctest import LiteralsOutputChecker
```



---
## report_failure
```python
from doctest import report_failure
```



---
## report_unexpected_exception
```python
from doctest import report_unexpected_exception
```



---
## MockAwareDocTestFinder
```python
from doctest import MockAwareDocTestFinder
```



---
## check_output
```python
from doctest import check_output
```



---
## _remove_unwanted_precision
```python
from doctest import _remove_unwanted_precision
```



---
## remove_prefixes
```python
from doctest import remove_prefixes
```



---
## _find_lineno
```python
from doctest import _find_lineno
```

On older Pythons, doctest code does not take into account
`@property`. https://github.com/python/cpython/issues/61648

Moreover, wrapped Doctests need to be unwrapped so the correct
line number is returned. #8796

---
## _find
```python
from doctest import _find
```

Override _find to work around issue in stdlib.

https://github.com/pytest-dev/pytest/issues/3456
https://github.com/python/cpython/issues/69718

---
## _from_module
```python
from doctest import _from_module
```

`cached_property` objects are never considered a part
of the 'current module'. As such they are skipped by doctest.
Here we override `_from_module` to check the underlying
function instead. https://github.com/python/cpython/issues/107995

---
## __name__
```python
from setuponly import __name__
```



---
## pytest_addoption
```python
from setuponly import pytest_addoption
```



---
## pytest_fixture_setup
```python
from setuponly import pytest_fixture_setup
```



---
## pytest_fixture_post_finalizer
```python
from setuponly import pytest_fixture_post_finalizer
```



---
## _show_fixture_action
```python
from setuponly import _show_fixture_action
```



---
## pytest_cmdline_main
```python
from setuponly import pytest_cmdline_main
```



---
## _imply_path
```python
from nodes import _imply_path
```



---
## NodeMeta
```python
from nodes import NodeMeta
```

Metaclass used by :class:`Node` to enforce that direct construction raises
:class:`Failed`.

This behaviour supports the indirection introduced with :meth:`Node.from_parent`,
the named constructor to be used instead of direct construction. The design
decision to enforce indirection with :class:`NodeMeta` was made as a
temporary aid for refactoring the collection tree, which was diagnosed to
have :class:`Node` objects whose creational patterns were overly entangled.
Once the refactoring is complete, this metaclass can be removed.

See https://github.com/pytest-dev/pytest/projects/3 for an overview of the
progress on detangling the :class:`Node` classes.

---
## get_fslocation_from_item
```python
from nodes import get_fslocation_from_item
```

Try to extract the actual location from a node, depending on available attributes:

* "location": a pair (path, lineno)
* "obj": a Python object that the node wraps.
* "path": just a path

:rtype: A tuple of (str|Path, int) with filename and 0-based line number.

---
## Collector
```python
from nodes import Collector
```

Base class of all collectors.

Collector create children through `collect()` and thus iteratively build
the collection tree.

---
## _check_initialpaths_for_relpath
```python
from nodes import _check_initialpaths_for_relpath
```



---
## FSCollector
```python
from nodes import FSCollector
```

Base class for filesystem collectors.

---
## File
```python
from nodes import File
```

Base class for collecting tests from a file.

:ref:`non-python tests`.

---
## Directory
```python
from nodes import Directory
```

Base class for collecting files from a directory.

A basic directory collector does the following: goes over the files and
sub-directories in the directory and creates collectors for them by calling
the hooks :hook:`pytest_collect_directory` and :hook:`pytest_collect_file`,
after checking that they are not ignored using
:hook:`pytest_ignore_collect`.

The default directory collectors are :class:`~pytest.Dir` and
:class:`~pytest.Package`.

.. versionadded:: 8.0

:ref:`custom directory collectors`.

---
## Item
```python
from nodes import Item
```

Base class of all test invocation items.

Note that for a single function there might be multiple test invocation items.

---
## __call__
```python
from nodes import __call__
```



---
## _create
```python
from nodes import _create
```



---
## from_parent
```python
from nodes import from_parent
```

The public constructor.

---
## ihook
```python
from nodes import ihook
```

fspath-sensitive hook proxy used to call pytest hooks.

---
## warn
```python
from nodes import warn
```

Issue a warning for this Node.

Warnings will be displayed after the test session, unless explicitly suppressed.

:param Warning warning:
    The warning instance to issue.

:raises ValueError: If ``warning`` instance is not a subclass of Warning.

Example usage:

.. code-block:: python

    node.warn(PytestWarning("some message"))
    node.warn(UserWarning("some message"))

.. versionchanged:: 6.2
    Any subclass of :class:`Warning` is now accepted, rather than only
    :class:`PytestWarning <pytest.PytestWarning>` subclasses.

---
## nodeid
```python
from nodes import nodeid
```

A ::-separated string denoting its collection tree address.

---
## __hash__
```python
from nodes import __hash__
```



---
## setup
```python
from nodes import setup
```



---
## teardown
```python
from nodes import teardown
```



---
## iter_parents
```python
from nodes import iter_parents
```

Iterate over all parent collectors starting from and including self
up to the root of the collection tree.

.. versionadded:: 8.1

---
## listchain
```python
from nodes import listchain
```

Return a list of all parent collectors starting from the root of the
collection tree down to and including self.

---
## add_marker
```python
from nodes import add_marker
```

Dynamically add a marker object to the node.

:param marker:
    The marker.
:param append:
    Whether to append the marker, or prepend it.

---
## iter_markers
```python
from nodes import iter_markers
```

Iterate over all markers of the node.

:param name: If given, filter the results by the name attribute.
:returns: An iterator of the markers of the node.

---
## iter_markers_with_node
```python
from nodes import iter_markers_with_node
```

Iterate over all markers of the node.

:param name: If given, filter the results by the name attribute.
:returns: An iterator of (node, mark) tuples.

---
## get_closest_marker
```python
from nodes import get_closest_marker
```

Return the first marker matching the name, from closest (for
example function) to farther level (for example module level).

:param default: Fallback return value if no marker was found.
:param name: Name to filter by.

---
## listextrakeywords
```python
from nodes import listextrakeywords
```

Return a set of all extra keywords in self and any parents.

---
## listnames
```python
from nodes import listnames
```



---
## addfinalizer
```python
from nodes import addfinalizer
```

Register a function to be called without arguments when this node is
finalized.

This method can only be called when this node is active
in a setup chain, for example during self.setup().

---
## getparent
```python
from nodes import getparent
```

Get the closest parent node (including self) which is an instance of
the given class.

:param cls: The node class to search for.
:returns: The node, if found.

---
## _traceback_filter
```python
from nodes import _traceback_filter
```



---
## _repr_failure_py
```python
from nodes import _repr_failure_py
```



---
## repr_failure
```python
from nodes import repr_failure
```

Return a representation of a collection failure.

:param excinfo: Exception information for the failure.

---
## CollectError
```python
from nodes import CollectError
```

An error during collection, contains a custom message.

---
## collect
```python
from nodes import collect
```

Collect children (items and collectors) for this collector.

---
## _check_item_and_collector_diamond_inheritance
```python
from nodes import _check_item_and_collector_diamond_inheritance
```

Check if the current type inherits from both File and Collector
at the same time, emitting a warning accordingly (#8447).

---
## runtest
```python
from nodes import runtest
```

Run the test case for this item.

Must be implemented by subclasses.

.. seealso:: :ref:`non-python tests`

---
## add_report_section
```python
from nodes import add_report_section
```

Add a new report section, similar to what's done internally to add
stdout and stderr captured output::

    item.add_report_section("call", "stdout", "report section contents")

:param str when:
    One of the possible capture states, ``"setup"``, ``"call"``, ``"teardown"``.
:param str key:
    Name of the section, can be customized at will. Pytest uses ``"stdout"`` and
    ``"stderr"`` internally.
:param str content:
    The full contents as a string.

---
## reportinfo
```python
from nodes import reportinfo
```

Get location information for this item for test reports.

Returns a tuple with three elements:

- The path of the test (default ``self.path``)
- The 0-based line number of the test (default ``None``)
- A name of the test to be shown (default ``""``)

.. seealso:: :ref:`non-python tests`

---
## location
```python
from nodes import location
```

Returns a tuple of ``(relfspath, lineno, testname)`` for this item
where ``relfspath`` is file path relative to ``config.rootpath``
and lineno is a 0-based line number.

---
## __name__
```python
from threadexception import __name__
```



---
## catch_threading_exception
```python
from threadexception import catch_threading_exception
```

Context manager catching threading.Thread exception using
threading.excepthook.

Storing exc_value using a custom hook can create a reference cycle. The
reference cycle is broken explicitly when the context manager exits.

Storing thread using a custom hook can resurrect it if it is set to an
object which is being finalized. Exiting the context manager clears the
stored object.

Usage:
    with threading_helper.catch_threading_exception() as cm:
        # code spawning a thread which raises an exception
        ...
        # check the thread exception: use cm.args
        ...
    # cm.args attribute no longer exists at this point
    # (to break a reference cycle)

---
## thread_exception_runtest_hook
```python
from threadexception import thread_exception_runtest_hook
```



---
## pytest_runtest_setup
```python
from threadexception import pytest_runtest_setup
```



---
## pytest_runtest_call
```python
from threadexception import pytest_runtest_call
```



---
## pytest_runtest_teardown
```python
from threadexception import pytest_runtest_teardown
```



---
## __init__
```python
from threadexception import __init__
```



---
## _hook
```python
from threadexception import _hook
```



---
## __enter__
```python
from threadexception import __enter__
```



---
## __exit__
```python
from threadexception import __exit__
```



---
## pytest_addoption
```python
from main import pytest_addoption
```



---
## validate_basetemp
```python
from main import validate_basetemp
```



---
## wrap_session
```python
from main import wrap_session
```

Skeleton command line program.

---
## pytest_cmdline_main
```python
from main import pytest_cmdline_main
```



---
## _main
```python
from main import _main
```

Default command line protocol for initialization, session,
running tests and reporting.

---
## pytest_collection
```python
from main import pytest_collection
```



---
## pytest_runtestloop
```python
from main import pytest_runtestloop
```



---
## _in_venv
```python
from main import _in_venv
```

Attempt to detect if ``path`` is the root of a Virtual Environment by
checking for the existence of the pyvenv.cfg file.

[https://peps.python.org/pep-0405/]

For regression protection we also check for conda environments that do not include pyenv.cfg yet --
https://github.com/conda/conda/issues/13337 is the conda issue tracking adding pyenv.cfg.

Checking for the `conda-meta/history` file per https://github.com/pytest-dev/pytest/issues/12652#issuecomment-2246336902.

---
## pytest_ignore_collect
```python
from main import pytest_ignore_collect
```



---
## pytest_collect_directory
```python
from main import pytest_collect_directory
```



---
## pytest_collection_modifyitems
```python
from main import pytest_collection_modifyitems
```



---
## FSHookProxy
```python
from main import FSHookProxy
```



---
## Interrupted
```python
from main import Interrupted
```

Signals that the test run was interrupted.

---
## Failed
```python
from main import Failed
```

Signals a stop as failed test run.

---
## _bestrelpath_cache
```python
from main import _bestrelpath_cache
```



---
## Dir
```python
from main import Dir
```

Collector of files in a file system directory.

.. versionadded:: 8.0

.. note::

    Python directories with an `__init__.py` file are instead collected by
    :class:`~pytest.Package` by default. Both are :class:`~pytest.Directory`
    collectors.

---
## Session
```python
from main import Session
```

The root of the collection tree.

``Session`` collects the initial paths given as arguments to pytest.

---
## search_pypath
```python
from main import search_pypath
```

Search sys.path for the given a dotted module name, and return its file
system path if found.

---
## CollectionArgument
```python
from main import CollectionArgument
```

A resolved collection argument.

---
## resolve_collection_argument
```python
from main import resolve_collection_argument
```

Parse path arguments optionally containing selection parts and return (fspath, names).

Command-line arguments can point to files and/or directories, and optionally contain
parts for specific tests selection, for example:

    "pkg/tests/test_foo.py::TestClass::test_foo"

This function ensures the path exists, and returns a resolved `CollectionArgument`:

    CollectionArgument(
        path=Path("/full/path/to/pkg/tests/test_foo.py"),
        parts=["TestClass", "test_foo"],
        module_name=None,
    )

When as_pypath is True, expects that the command-line argument actually contains
module paths instead of file-system paths:

    "pkg.tests.test_foo::TestClass::test_foo"

In which case we search sys.path for a matching module, and then return the *path* to the
found module, which may look like this:

    CollectionArgument(
        path=Path("/home/u/myvenv/lib/site-packages/pkg/tests/test_foo.py"),
        parts=["TestClass", "test_foo"],
        module_name="pkg.tests.test_foo",
    )

If the path doesn't exist, raise UsageError.
If the path is a directory and selection parts are present, raise UsageError.

---
## is_ancestor
```python
from main import is_ancestor
```

Return whether query is an ancestor of base.

---
## __missing__
```python
from main import __missing__
```



---
## from_parent
```python
from main import from_parent
```

The public constructor.

:param parent: The parent collector of this Dir.
:param path: The directory's path.
:type path: pathlib.Path

---
## collect
```python
from main import collect
```



---
## from_config
```python
from main import from_config
```



---
## shouldstop
```python
from main import shouldstop
```



---
## shouldfail
```python
from main import shouldfail
```



---
## startpath
```python
from main import startpath
```

The path from which pytest was invoked.

.. versionadded:: 7.0.0

---
## _node_location_to_relpath
```python
from main import _node_location_to_relpath
```



---
## pytest_collectstart
```python
from main import pytest_collectstart
```



---
## pytest_runtest_logreport
```python
from main import pytest_runtest_logreport
```



---
## isinitpath
```python
from main import isinitpath
```

Is path an initial path?

An initial path is a path explicitly given to pytest on the command
line.

:param with_parents:
    If set, also return True if the path is a parent of an initial path.

.. versionchanged:: 8.0
    Added the ``with_parents`` parameter.

---
## gethookproxy
```python
from main import gethookproxy
```



---
## _collect_path
```python
from main import _collect_path
```

Create a Collector for the given path.

`path_cache` makes it so the same Collectors are returned for the same
path.

---
## perform_collect
```python
from main import perform_collect
```

Perform the collection phase for this session.

This is called by the default :hook:`pytest_collection` hook
implementation; see the documentation of this hook for more details.
For testing purposes, it may also be called directly on a fresh
``Session``.

This function normally recursively expands any collectors collected
from the session to their items, and only items are returned. For
testing purposes, this may be suppressed by passing ``genitems=False``,
in which case the return value contains these collectors unexpanded,
and ``session.items`` is empty.

---
## _collect_one_node
```python
from main import _collect_one_node
```



---
## genitems
```python
from main import genitems
```



---
## __name__
```python
from monkeypatch import __name__
```

Monkeypatching and mocking functionality.

---
## monkeypatch
```python
from monkeypatch import monkeypatch
```

A convenient fixture for monkey-patching.

The fixture provides these methods to modify objects, dictionaries, or
:data:`os.environ`:

* :meth:`monkeypatch.setattr(obj, name, value, raising=True) <pytest.MonkeyPatch.setattr>`
* :meth:`monkeypatch.delattr(obj, name, raising=True) <pytest.MonkeyPatch.delattr>`
* :meth:`monkeypatch.setitem(mapping, name, value) <pytest.MonkeyPatch.setitem>`
* :meth:`monkeypatch.delitem(obj, name, raising=True) <pytest.MonkeyPatch.delitem>`
* :meth:`monkeypatch.setenv(name, value, prepend=None) <pytest.MonkeyPatch.setenv>`
* :meth:`monkeypatch.delenv(name, raising=True) <pytest.MonkeyPatch.delenv>`
* :meth:`monkeypatch.syspath_prepend(path) <pytest.MonkeyPatch.syspath_prepend>`
* :meth:`monkeypatch.chdir(path) <pytest.MonkeyPatch.chdir>`
* :meth:`monkeypatch.context() <pytest.MonkeyPatch.context>`

All modifications will be undone after the requesting test function or
fixture has finished. The ``raising`` parameter determines if a :class:`KeyError`
or :class:`AttributeError` will be raised if the set/deletion operation does not have the
specified target.

To undo modifications done by the fixture in a contained scope,
use :meth:`context() <pytest.MonkeyPatch.context>`.

---
## resolve
```python
from monkeypatch import resolve
```



---
## annotated_getattr
```python
from monkeypatch import annotated_getattr
```



---
## derive_importpath
```python
from monkeypatch import derive_importpath
```



---
## Notset
```python
from monkeypatch import Notset
```



---
## MonkeyPatch
```python
from monkeypatch import MonkeyPatch
```

Helper to conveniently monkeypatch attributes/items/environment
variables/syspath.

Returned by the :fixture:`monkeypatch` fixture.

.. versionchanged:: 6.2
    Can now also be used directly as `pytest.MonkeyPatch()`, for when
    the fixture is not available. In this case, use
    :meth:`with MonkeyPatch.context() as mp: <context>` or remember to call
    :meth:`undo` explicitly.

---
## __repr__
```python
from monkeypatch import __repr__
```



---
## __init__
```python
from monkeypatch import __init__
```



---
## context
```python
from monkeypatch import context
```

Context manager that returns a new :class:`MonkeyPatch` object
which undoes any patching done inside the ``with`` block upon exit.

Example:

.. code-block:: python

    import functools


    def test_partial(monkeypatch):
        with monkeypatch.context() as m:
            m.setattr(functools, "partial", 3)

Useful in situations where it is desired to undo some patches before the test ends,
such as mocking ``stdlib`` functions that might break pytest itself if mocked (for examples
of this see :issue:`3290`).

---
## setattr
```python
from monkeypatch import setattr
```

Set attribute value on target, memorizing the old value.

For example:

.. code-block:: python

    import os

    monkeypatch.setattr(os, "getcwd", lambda: "/")

The code above replaces the :func:`os.getcwd` function by a ``lambda`` which
always returns ``"/"``.

For convenience, you can specify a string as ``target`` which
will be interpreted as a dotted import path, with the last part
being the attribute name:

.. code-block:: python

    monkeypatch.setattr("os.getcwd", lambda: "/")

Raises :class:`AttributeError` if the attribute does not exist, unless
``raising`` is set to False.

**Where to patch**

``monkeypatch.setattr`` works by (temporarily) changing the object that a name points to with another one.
There can be many names pointing to any individual object, so for patching to work you must ensure
that you patch the name used by the system under test.

See the section :ref:`Where to patch <python:where-to-patch>` in the :mod:`unittest.mock`
docs for a complete explanation, which is meant for :func:`unittest.mock.patch` but
applies to ``monkeypatch.setattr`` as well.

---
## delattr
```python
from monkeypatch import delattr
```

Delete attribute ``name`` from ``target``.

If no ``name`` is specified and ``target`` is a string
it will be interpreted as a dotted import path with the
last part being the attribute name.

Raises AttributeError it the attribute does not exist, unless
``raising`` is set to False.

---
## setitem
```python
from monkeypatch import setitem
```

Set dictionary entry ``name`` to value.

---
## delitem
```python
from monkeypatch import delitem
```

Delete ``name`` from dict.

Raises ``KeyError`` if it doesn't exist, unless ``raising`` is set to
False.

---
## setenv
```python
from monkeypatch import setenv
```

Set environment variable ``name`` to ``value``.

If ``prepend`` is a character, read the current environment variable
value and prepend the ``value`` adjoined with the ``prepend``
character.

---
## delenv
```python
from monkeypatch import delenv
```

Delete ``name`` from the environment.

Raises ``KeyError`` if it does not exist, unless ``raising`` is set to
False.

---
## syspath_prepend
```python
from monkeypatch import syspath_prepend
```

Prepend ``path`` to ``sys.path`` list of import locations.

---
## chdir
```python
from monkeypatch import chdir
```

Change the current working directory to the specified path.

:param path:
    The path to change into.

---
## undo
```python
from monkeypatch import undo
```

Undo previous changes.

This call consumes the undo stack. Calling it a second time has no
effect unless you do more monkeypatching after the undo call.

There is generally no need to call `undo()`, since it is
called automatically during tear-down.

.. note::
    The same `monkeypatch` fixture is used across a
    single test function invocation. If `monkeypatch` is used both by
    the test function itself and one of the test fixtures,
    calling `undo()` will undo all of the changes made in
    both functions.

    Prefer to use :meth:`context() <pytest.MonkeyPatch.context>` instead.

---
## __name__
```python
from legacypath import __name__
```

Add backward compatibility support for the legacy py path type.

---
## Testdir
```python
from legacypath import Testdir
```

Similar to :class:`Pytester`, but this class works with legacy legacy_path objects instead.

All methods just forward to an internal :class:`Pytester` instance, converting results
to `legacy_path` objects as necessary.

---
## LegacyTestdirPlugin
```python
from legacypath import LegacyTestdirPlugin
```



---
## TempdirFactory
```python
from legacypath import TempdirFactory
```

Backward compatibility wrapper that implements ``py.path.local``
for :class:`TempPathFactory`.

.. note::
    These days, it is preferred to use ``tmp_path_factory``.

    :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.

---
## LegacyTmpdirPlugin
```python
from legacypath import LegacyTmpdirPlugin
```



---
## Cache_makedir
```python
from legacypath import Cache_makedir
```

Return a directory path object with the given name.

Same as :func:`mkdir`, but returns a legacy py path instance.

---
## FixtureRequest_fspath
```python
from legacypath import FixtureRequest_fspath
```

(deprecated) The file system path of the test module which collected this test.

---
## TerminalReporter_startdir
```python
from legacypath import TerminalReporter_startdir
```

The directory from which pytest was invoked.

Prefer to use ``startpath`` which is a :class:`pathlib.Path`.

:type: LEGACY_PATH

---
## Config_invocation_dir
```python
from legacypath import Config_invocation_dir
```

The directory from which pytest was invoked.

Prefer to use :attr:`invocation_params.dir <InvocationParams.dir>`,
which is a :class:`pathlib.Path`.

:type: LEGACY_PATH

---
## Config_rootdir
```python
from legacypath import Config_rootdir
```

The path to the :ref:`rootdir <rootdir>`.

Prefer to use :attr:`rootpath`, which is a :class:`pathlib.Path`.

:type: LEGACY_PATH

---
## Config_inifile
```python
from legacypath import Config_inifile
```

The path to the :ref:`configfile <configfiles>`.

Prefer to use :attr:`inipath`, which is a :class:`pathlib.Path`.

:type: Optional[LEGACY_PATH]

---
## Session_startdir
```python
from legacypath import Session_startdir
```

The path from which pytest was invoked.

Prefer to use ``startpath`` which is a :class:`pathlib.Path`.

:type: LEGACY_PATH

---
## Config__getini_unknown_type
```python
from legacypath import Config__getini_unknown_type
```



---
## Node_fspath
```python
from legacypath import Node_fspath
```

(deprecated) returns a legacy_path copy of self.path

---
## Node_fspath_set
```python
from legacypath import Node_fspath_set
```



---
## pytest_load_initial_conftests
```python
from legacypath import pytest_load_initial_conftests
```

Monkeypatch legacy path attributes in several classes, as early as possible.

---
## pytest_configure
```python
from legacypath import pytest_configure
```

Installs the LegacyTmpdirPlugin if the ``tmpdir`` plugin is also installed.

---
## pytest_plugin_registered
```python
from legacypath import pytest_plugin_registered
```



---
## __init__
```python
from legacypath import __init__
```



---
## tmpdir
```python
from legacypath import tmpdir
```

Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.

By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See
:ref:`temporary directory location and retention`.

The returned object is a `legacy_path`_ object.

.. note::
    These days, it is preferred to use ``tmp_path``.

    :ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.

.. _legacy_path: https://py.readthedocs.io/en/latest/path.html

---
## test_tmproot
```python
from legacypath import test_tmproot
```



---
## request
```python
from legacypath import request
```



---
## plugins
```python
from legacypath import plugins
```



---
## monkeypatch
```python
from legacypath import monkeypatch
```



---
## make_hook_recorder
```python
from legacypath import make_hook_recorder
```

See :meth:`Pytester.make_hook_recorder`.

---
## chdir
```python
from legacypath import chdir
```

See :meth:`Pytester.chdir`.

---
## finalize
```python
from legacypath import finalize
```



---
## makefile
```python
from legacypath import makefile
```

See :meth:`Pytester.makefile`.

---
## makeconftest
```python
from legacypath import makeconftest
```

See :meth:`Pytester.makeconftest`.

---
## makeini
```python
from legacypath import makeini
```

See :meth:`Pytester.makeini`.

---
## getinicfg
```python
from legacypath import getinicfg
```

See :meth:`Pytester.getinicfg`.

---
## makepyprojecttoml
```python
from legacypath import makepyprojecttoml
```

See :meth:`Pytester.makepyprojecttoml`.

---
## makepyfile
```python
from legacypath import makepyfile
```

See :meth:`Pytester.makepyfile`.

---
## maketxtfile
```python
from legacypath import maketxtfile
```

See :meth:`Pytester.maketxtfile`.

---
## syspathinsert
```python
from legacypath import syspathinsert
```

See :meth:`Pytester.syspathinsert`.

---
## mkdir
```python
from legacypath import mkdir
```

See :meth:`Pytester.mkdir`.

---
## mkpydir
```python
from legacypath import mkpydir
```

See :meth:`Pytester.mkpydir`.

---
## copy_example
```python
from legacypath import copy_example
```

See :meth:`Pytester.copy_example`.

---
## getnode
```python
from legacypath import getnode
```

See :meth:`Pytester.getnode`.

---
## getpathnode
```python
from legacypath import getpathnode
```

See :meth:`Pytester.getpathnode`.

---
## genitems
```python
from legacypath import genitems
```

See :meth:`Pytester.genitems`.

---
## runitem
```python
from legacypath import runitem
```

See :meth:`Pytester.runitem`.

---
## inline_runsource
```python
from legacypath import inline_runsource
```

See :meth:`Pytester.inline_runsource`.

---
## inline_genitems
```python
from legacypath import inline_genitems
```

See :meth:`Pytester.inline_genitems`.

---
## inline_run
```python
from legacypath import inline_run
```

See :meth:`Pytester.inline_run`.

---
## runpytest_inprocess
```python
from legacypath import runpytest_inprocess
```

See :meth:`Pytester.runpytest_inprocess`.

---
## runpytest
```python
from legacypath import runpytest
```

See :meth:`Pytester.runpytest`.

---
## parseconfig
```python
from legacypath import parseconfig
```

See :meth:`Pytester.parseconfig`.

---
## parseconfigure
```python
from legacypath import parseconfigure
```

See :meth:`Pytester.parseconfigure`.

---
## getitem
```python
from legacypath import getitem
```

See :meth:`Pytester.getitem`.

---
## getitems
```python
from legacypath import getitems
```

See :meth:`Pytester.getitems`.

---
## getmodulecol
```python
from legacypath import getmodulecol
```

See :meth:`Pytester.getmodulecol`.

---
## collect_by_name
```python
from legacypath import collect_by_name
```

See :meth:`Pytester.collect_by_name`.

---
## popen
```python
from legacypath import popen
```

See :meth:`Pytester.popen`.

---
## run
```python
from legacypath import run
```

See :meth:`Pytester.run`.

---
## runpython
```python
from legacypath import runpython
```

See :meth:`Pytester.runpython`.

---
## runpython_c
```python
from legacypath import runpython_c
```

See :meth:`Pytester.runpython_c`.

---
## runpytest_subprocess
```python
from legacypath import runpytest_subprocess
```

See :meth:`Pytester.runpytest_subprocess`.

---
## spawn_pytest
```python
from legacypath import spawn_pytest
```

See :meth:`Pytester.spawn_pytest`.

---
## spawn
```python
from legacypath import spawn
```

See :meth:`Pytester.spawn`.

---
## __repr__
```python
from legacypath import __repr__
```



---
## __str__
```python
from legacypath import __str__
```



---
## testdir
```python
from legacypath import testdir
```

Identical to :fixture:`pytester`, and provides an instance whose methods return
legacy ``LEGACY_PATH`` objects instead when applicable.

New code should avoid using :fixture:`testdir` in favor of :fixture:`pytester`.

---
## mktemp
```python
from legacypath import mktemp
```

Same as :meth:`TempPathFactory.mktemp`, but returns a ``py.path.local`` object.

---
## getbasetemp
```python
from legacypath import getbasetemp
```

Same as :meth:`TempPathFactory.getbasetemp`, but returns a ``py.path.local`` object.

---
## tmpdir_factory
```python
from legacypath import tmpdir_factory
```

Return a :class:`pytest.TempdirFactory` instance for the test session.

---
## __name__
```python
from setupplan import __name__
```



---
## pytest_addoption
```python
from setupplan import pytest_addoption
```



---
## pytest_fixture_setup
```python
from setupplan import pytest_fixture_setup
```



---
## pytest_cmdline_main
```python
from setupplan import pytest_cmdline_main
```



---
## __name__
```python
from pathlib import __name__
```



---
## _ignore_error
```python
from pathlib import _ignore_error
```



---
## get_lock_path
```python
from pathlib import get_lock_path
```



---
## on_rm_rf_error
```python
from pathlib import on_rm_rf_error
```

Handle known read-only errors during rmtree.

The returned value is used only by our own tests.

---
## ensure_extended_length_path
```python
from pathlib import ensure_extended_length_path
```

Get the extended-length version of a path (Windows).

On Windows, by default, the maximum length of a path (MAX_PATH) is 260
characters, and operations on paths longer than that fail. But it is possible
to overcome this by converting the path to "extended-length" form before
performing the operation:
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation

On Windows, this function returns the extended-length absolute version of path.
On other platforms it returns path unchanged.

---
## get_extended_length_path_str
```python
from pathlib import get_extended_length_path_str
```

Convert a path to a Windows extended length path.

---
## rm_rf
```python
from pathlib import rm_rf
```

Remove the path contents recursively, even if some elements
are read-only.

---
## find_prefixed
```python
from pathlib import find_prefixed
```

Find all elements in root that begin with the prefix, case-insensitive.

---
## extract_suffixes
```python
from pathlib import extract_suffixes
```

Return the parts of the paths following the prefix.

:param iter: Iterator over path names.
:param prefix: Expected prefix of the path names.

---
## find_suffixes
```python
from pathlib import find_suffixes
```

Combine find_prefixes and extract_suffixes.

---
## parse_num
```python
from pathlib import parse_num
```

Parse number path suffixes, returns -1 on error.

---
## _force_symlink
```python
from pathlib import _force_symlink
```

Helper to create the current symlink.

It's full of race conditions that are reasonably OK to ignore
for the context of best effort linking to the latest test run.

The presumption being that in case of much parallelism
the inaccuracy is going to be acceptable.

---
## make_numbered_dir
```python
from pathlib import make_numbered_dir
```

Create a directory with an increased number as suffix for the given prefix.

---
## create_cleanup_lock
```python
from pathlib import create_cleanup_lock
```

Create a lock to prevent premature folder cleanup.

---
## register_cleanup_lock_removal
```python
from pathlib import register_cleanup_lock_removal
```

Register a cleanup function for removing a lock, by default on atexit.

---
## maybe_delete_a_numbered_dir
```python
from pathlib import maybe_delete_a_numbered_dir
```

Remove a numbered directory if its lock can be obtained and it does
not seem to be in use.

---
## ensure_deletable
```python
from pathlib import ensure_deletable
```

Check if `path` is deletable based on whether the lock file is expired.

---
## try_cleanup
```python
from pathlib import try_cleanup
```

Try to cleanup a folder if we can ensure it's deletable.

---
## cleanup_candidates
```python
from pathlib import cleanup_candidates
```

List candidates for numbered directories to be removed - follows py.path.

---
## cleanup_dead_symlinks
```python
from pathlib import cleanup_dead_symlinks
```



---
## cleanup_numbered_dir
```python
from pathlib import cleanup_numbered_dir
```

Cleanup for lock driven numbered directories.

---
## make_numbered_dir_with_cleanup
```python
from pathlib import make_numbered_dir_with_cleanup
```

Create a numbered dir with a cleanup lock and remove old ones.

---
## resolve_from_str
```python
from pathlib import resolve_from_str
```



---
## fnmatch_ex
```python
from pathlib import fnmatch_ex
```

A port of FNMatcher from py.path.common which works with PurePath() instances.

The difference between this algorithm and PurePath.match() is that the
latter matches "**" glob expressions for each part of the path, while
this algorithm uses the whole path instead.

For example:
    "tests/foo/bar/doc/test_foo.py" matches pattern "tests/**/doc/test*.py"
    with this algorithm, but not with PurePath.match().

This algorithm was ported to keep backward-compatibility with existing
settings which assume paths match according this logic.

References:
* https://bugs.python.org/issue29249
* https://bugs.python.org/issue34731

---
## parts
```python
from pathlib import parts
```



---
## symlink_or_skip
```python
from pathlib import symlink_or_skip
```

Make a symlink, or skip the test in case symlinks are not supported.

---
## ImportMode
```python
from pathlib import ImportMode
```

Possible values for `mode` parameter of `import_path`.

---
## ImportPathMismatchError
```python
from pathlib import ImportPathMismatchError
```

Raised on import_path() if there is a mismatch of __file__'s.

This can happen when `import_path` is called multiple times with different filenames that has
the same basename but reside in packages
(for example "/tests1/test_foo.py" and "/tests2/test_foo.py").

---
## import_path
```python
from pathlib import import_path
```

Import and return a module from the given path, which can be a file (a module) or
a directory (a package).

:param path:
    Path to the file to import.

:param mode:
    Controls the underlying import mechanism that will be used:

    * ImportMode.prepend: the directory containing the module (or package, taking
      `__init__.py` files into account) will be put at the *start* of `sys.path` before
      being imported with `importlib.import_module`.

    * ImportMode.append: same as `prepend`, but the directory will be appended
      to the end of `sys.path`, if not already in `sys.path`.

    * ImportMode.importlib: uses more fine control mechanisms provided by `importlib`
      to import the module, which avoids having to muck with `sys.path` at all. It effectively
      allows having same-named test modules in different places.

:param root:
    Used as an anchor when mode == ImportMode.importlib to obtain
    a unique name for the module being imported so it can safely be stored
    into ``sys.modules``.

:param consider_namespace_packages:
    If True, consider namespace packages when resolving module names.

:raises ImportPathMismatchError:
    If after importing the given `path` and the module `__file__`
    are different. Only raised in `prepend` and `append` modes.

---
## _import_module_using_spec
```python
from pathlib import _import_module_using_spec
```

Tries to import a module by its canonical name, path to the .py file, and its
parent location.

:param insert_modules:
    If True, will call insert_missing_modules to create empty intermediate modules
    for made-up module names (when importing test files not reachable from sys.path).

---
## spec_matches_module_path
```python
from pathlib import spec_matches_module_path
```

Return true if the given ModuleSpec can be used to import the given module path.

---
## module_name_from_path
```python
from pathlib import module_name_from_path
```

Return a dotted module name based on the given path, anchored on root.

For example: path="projects/src/tests/test_foo.py" and root="/projects", the
resulting module name will be "src.tests.test_foo".

---
## insert_missing_modules
```python
from pathlib import insert_missing_modules
```

Used by ``import_path`` to create intermediate modules when using mode=importlib.

When we want to import a module as "src.tests.test_foo" for example, we need
to create empty modules "src" and "src.tests" after inserting "src.tests.test_foo",
otherwise "src.tests.test_foo" is not importable by ``__import__``.

---
## resolve_package_path
```python
from pathlib import resolve_package_path
```

Return the Python package path by looking for the last
directory upwards which still contains an __init__.py.

Returns None if it cannot be determined.

---
## resolve_pkg_root_and_module_name
```python
from pathlib import resolve_pkg_root_and_module_name
```

Return the path to the directory of the root package that contains the
given Python file, and its module name:

    src/
        app/
            __init__.py
            core/
                __init__.py
                models.py

Passing the full path to `models.py` will yield Path("src") and "app.core.models".

If consider_namespace_packages is True, then we additionally check upwards in the hierarchy
for namespace packages:

https://packaging.python.org/en/latest/guides/packaging-namespace-packages

Raises CouldNotResolvePathError if the given path does not belong to a package (missing any __init__.py files).

---
## is_importable
```python
from pathlib import is_importable
```

Return if the given module path could be imported normally by Python, akin to the user
entering the REPL and importing the corresponding module name directly, and corresponds
to the module_path specified.

:param module_name:
    Full module name that we want to check if is importable.
    For example, "app.models".

:param module_path:
    Full path to the python module/package we want to check if is importable.
    For example, "/projects/src/app/models.py".

---
## compute_module_name
```python
from pathlib import compute_module_name
```

Compute a module name based on a path and a root anchor.

---
## CouldNotResolvePathError
```python
from pathlib import CouldNotResolvePathError
```

Custom exception raised by resolve_pkg_root_and_module_name.

---
## scandir
```python
from pathlib import scandir
```

Scan a directory recursively, in breadth-first order.

The returned entries are sorted according to the given key.
The default is to sort by name.

---
## visit
```python
from pathlib import visit
```

Walk a directory recursively, in breadth-first order.

The `recurse` predicate determines whether a directory is recursed.

Entries at each directory level are sorted.

---
## absolutepath
```python
from pathlib import absolutepath
```

Convert a path to an absolute path using os.path.abspath.

Prefer this over Path.resolve() (see #6523).
Prefer this over Path.absolute() (not public, doesn't normalize).

---
## commonpath
```python
from pathlib import commonpath
```

Return the common part shared with the other path, or None if there is
no common part.

If one path is relative and one is absolute, returns None.

---
## bestrelpath
```python
from pathlib import bestrelpath
```

Return a string which is a relative path from directory to dest such
that directory/bestrelpath == dest.

The paths must be either both absolute or both relative.

If no such path can be determined, returns dest.

---
## safe_exists
```python
from pathlib import safe_exists
```

Like Path.exists(), but account for input arguments that might be too long (#11394).

---
## chmod_rw
```python
from pathlib import chmod_rw
```



---
## cleanup_on_exit
```python
from pathlib import cleanup_on_exit
```



---
## _is_same
```python
from pathlib import _is_same
```



---
## next_lower
```python
from scope import next_lower
```

Return the next lower scope.

---
## next_higher
```python
from scope import next_higher
```

Return the next higher scope.

---
## __lt__
```python
from scope import __lt__
```



---
## from_user
```python
from scope import from_user
```

Given a scope name from the user, return the equivalent Scope enum. Should be used
whenever we want to convert a user provided scope name to its enum object.

If the scope name is invalid, construct a user friendly message and call pytest.fail.

---
## __name__
```python
from freeze_support import __name__
```

Provides a function to report all internal modules for using freezing
tools.

---
## freeze_includes
```python
from freeze_support import freeze_includes
```

Return a list of module names used by pytest that should be
included by cx_freeze.

---
## _iter_all_modules
```python
from freeze_support import _iter_all_modules
```

Iterate over the names of all modules that can be found in the given
package, recursively.

    >>> import _pytest
    >>> list(_iter_all_modules(_pytest))
    ['_pytest._argcomplete', '_pytest._code.code', ...]

---
## __name__
```python
from fixtures import __name__
```

Sphinx test fixtures for pytest

---
## PseudoFixtureDef
```python
from fixtures import PseudoFixtureDef
```



---
## pytest_sessionstart
```python
from fixtures import pytest_sessionstart
```



---
## get_scope_package
```python
from fixtures import get_scope_package
```



---
## get_scope_node
```python
from fixtures import get_scope_node
```



---
## getfixturemarker
```python
from fixtures import getfixturemarker
```

Return fixturemarker or None if it doesn't exist or raised
exceptions.

---
## FixtureArgKey
```python
from fixtures import FixtureArgKey
```



---
## get_parametrized_fixture_argkeys
```python
from fixtures import get_parametrized_fixture_argkeys
```

Return list of keys for all parametrized arguments which match
the specified scope.

---
## reorder_items
```python
from fixtures import reorder_items
```



---
## reorder_items_atscope
```python
from fixtures import reorder_items_atscope
```



---
## FuncFixtureInfo
```python
from fixtures import FuncFixtureInfo
```

Fixture-related information for a fixture-requesting item (e.g. test
function).

This is used to examine the fixtures which an item requests statically
(known during collection). This includes autouse fixtures, fixtures
requested by the `usefixtures` marker, fixtures requested in the function
parameters, and the transitive closure of these.

An item may also request fixtures dynamically (using `request.getfixturevalue`);
these are not reflected here.

---
## FixtureRequest
```python
from fixtures import FixtureRequest
```

The type of the ``request`` fixture.

A request object gives access to the requesting test context and has a
``param`` attribute in case the fixture is parametrized.

---
## TopRequest
```python
from fixtures import TopRequest
```

The type of the ``request`` fixture in a test function.

---
## SubRequest
```python
from fixtures import SubRequest
```

The type of the ``request`` fixture in a fixture function requested
(transitively) by a test function.

---
## FixtureLookupError
```python
from fixtures import FixtureLookupError
```

Could not return a requested fixture (missing or invalid).

---
## FixtureLookupErrorRepr
```python
from fixtures import FixtureLookupErrorRepr
```



---
## call_fixture_func
```python
from fixtures import call_fixture_func
```



---
## _teardown_yield_fixture
```python
from fixtures import _teardown_yield_fixture
```

Execute the teardown of a fixture function by advancing the iterator
after the yield and ensure the iteration ends (if not it means there is
more than one yield in the function).

---
## _eval_scope_callable
```python
from fixtures import _eval_scope_callable
```



---
## FixtureDef
```python
from fixtures import FixtureDef
```

A container for a fixture definition.

Note: At this time, only explicitly documented fields and methods are
considered public stable API.

---
## resolve_fixture_function
```python
from fixtures import resolve_fixture_function
```

Get the actual callable that can be called to obtain the fixture
value.

---
## pytest_fixture_setup
```python
from fixtures import pytest_fixture_setup
```

Execution of fixture setup.

---
## wrap_function_to_error_out_if_called_directly
```python
from fixtures import wrap_function_to_error_out_if_called_directly
```

Wrap the given fixture function so we can raise an error about it being called directly,
instead of used as an argument in a test function.

---
## FixtureFunctionMarker
```python
from fixtures import FixtureFunctionMarker
```



---
## fixture
```python
from fixtures import fixture
```

Decorator to mark a fixture factory function.

This decorator can be used, with or without parameters, to define a
fixture function.

The name of the fixture function can later be referenced to cause its
invocation ahead of running tests: test modules or classes can use the
``pytest.mark.usefixtures(fixturename)`` marker.

Test functions can directly use fixture names as input arguments in which
case the fixture instance returned from the fixture function will be
injected.

Fixtures can provide their values to test functions using ``return`` or
``yield`` statements. When using ``yield`` the code block after the
``yield`` statement is executed as teardown code regardless of the test
outcome, and must yield exactly once.

:param scope:
    The scope for which this fixture is shared; one of ``"function"``
    (default), ``"class"``, ``"module"``, ``"package"`` or ``"session"``.

    This parameter may also be a callable which receives ``(fixture_name, config)``
    as parameters, and must return a ``str`` with one of the values mentioned above.

    See :ref:`dynamic scope` in the docs for more information.

:param params:
    An optional list of parameters which will cause multiple invocations
    of the fixture function and all of the tests using it. The current
    parameter is available in ``request.param``.

:param autouse:
    If True, the fixture func is activated for all tests that can see it.
    If False (the default), an explicit reference is needed to activate
    the fixture.

:param ids:
    Sequence of ids each corresponding to the params so that they are
    part of the test id. If no ids are provided they will be generated
    automatically from the params.

:param name:
    The name of the fixture. This defaults to the name of the decorated
    function. If a fixture is used in the same module in which it is
    defined, the function name of the fixture will be shadowed by the
    function arg that requests the fixture; one way to resolve this is to
    name the decorated function ``fixture_<fixturename>`` and then use
    ``@pytest.fixture(name='<fixturename>')``.

---
## yield_fixture
```python
from fixtures import yield_fixture
```

(Return a) decorator to mark a yield-fixture factory function.

.. deprecated:: 3.0
    Use :py:func:`pytest.fixture` directly instead.

---
## pytestconfig
```python
from fixtures import pytestconfig
```

Session-scoped fixture that returns the session's :class:`pytest.Config`
object.

Example::

    def test_foo(pytestconfig):
        if pytestconfig.get_verbosity() > 0:
            ...

---
## pytest_addoption
```python
from fixtures import pytest_addoption
```



---
## pytest_cmdline_main
```python
from fixtures import pytest_cmdline_main
```



---
## _get_direct_parametrize_args
```python
from fixtures import _get_direct_parametrize_args
```

Return all direct parametrization arguments of a node, so we don't
mistake them for fixtures.

Check https://github.com/pytest-dev/pytest/issues/5036.

These things are done later as well when dealing with parametrization
so this could be improved.

---
## deduplicate_names
```python
from fixtures import deduplicate_names
```

De-duplicate the sequence of names while keeping the original order.

---
## FixtureManager
```python
from fixtures import FixtureManager
```

pytest fixture definitions and information is stored and managed
from this class.

During collection fm.parsefactories() is called multiple times to parse
fixture function definitions into FixtureDef objects and internal
data structures.

During collection of test functions, metafunc-mechanics instantiate
a FuncFixtureInfo object which is cached per node/func-name.
This FuncFixtureInfo object is later retrieved by Function nodes
which themselves offer a fixturenames attribute.

The FuncFixtureInfo object holds information about fixtures and FixtureDefs
relevant for a particular function. An initial list of fixtures is
assembled like this:

- ini-defined usefixtures
- autouse-marked fixtures along the collection chain up from the function
- usefixtures markers at module/class/function level
- test function funcargs

Subsequently the funcfixtureinfo.fixturenames attribute is computed
as the closure of the fixtures needed to setup the initial fixtures,
i.e. fixtures needed by fixture functions themselves are appended
to the fixturenames list.

Upon the test-setup phases all fixturenames are instantiated, retrieved
by a lookup of their FuncFixtureInfo.

---
## show_fixtures_per_test
```python
from fixtures import show_fixtures_per_test
```



---
## _pretty_fixture_path
```python
from fixtures import _pretty_fixture_path
```



---
## _show_fixtures_per_test
```python
from fixtures import _show_fixtures_per_test
```



---
## showfixtures
```python
from fixtures import showfixtures
```



---
## _showfixtures_main
```python
from fixtures import _showfixtures_main
```



---
## write_docstring
```python
from fixtures import write_docstring
```



---
## prune_dependency_tree
```python
from fixtures import prune_dependency_tree
```

Recompute names_closure from initialnames and name2fixturedefs.

Can only reduce names_closure, which means that the new closure will
always be a subset of the old one. The order is preserved.

This method is needed because direct parametrization may shadow some
of the fixtures that were included in the originally built dependency
tree. In this way the dependency tree can get pruned, and the closure
of argnames may get reduced.

---
## __init__
```python
from fixtures import __init__
```



---
## _fixturemanager
```python
from fixtures import _fixturemanager
```



---
## _scope
```python
from fixtures import _scope
```



---
## scope
```python
from fixtures import scope
```

Scope string, one of "function", "class", "module", "package", "session".

---
## _check_scope
```python
from fixtures import _check_scope
```



---
## fixturenames
```python
from fixtures import fixturenames
```

Names of all active fixtures in this request.

---
## node
```python
from fixtures import node
```



---
## config
```python
from fixtures import config
```

The pytest config object associated with this request.

---
## function
```python
from fixtures import function
```

Test function object if the request has a per-function scope.

---
## cls
```python
from fixtures import cls
```

Class (can be None) where the test function was collected.

---
## instance
```python
from fixtures import instance
```

Instance (can be None) on which test function was collected.

---
## module
```python
from fixtures import module
```

Python module object where the test function was collected.

---
## path
```python
from fixtures import path
```

Path where the test function was collected.

---
## keywords
```python
from fixtures import keywords
```

Keywords/markers dictionary for the underlying node.

---
## session
```python
from fixtures import session
```

Pytest session object.

---
## addfinalizer
```python
from fixtures import addfinalizer
```



---
## applymarker
```python
from fixtures import applymarker
```

Apply a marker to a single test function invocation.

This method is useful if you don't want to have a keyword/marker
on all function invocations.

:param marker:
    An object created by a call to ``pytest.mark.NAME(...)``.

---
## raiseerror
```python
from fixtures import raiseerror
```

Raise a FixtureLookupError exception.

:param msg:
    An optional custom error message.

---
## getfixturevalue
```python
from fixtures import getfixturevalue
```

Dynamically run a named fixture function.

Declaring fixtures via function argument is recommended where possible.
But if you can only decide whether to use another fixture at test
setup time, you may use this function to retrieve it inside a fixture
or test function body.

This method can be used during the test setup phase or the test run
phase, but during the test teardown phase a fixture's value may not
be available.

:param argname:
    The fixture name.
:raises pytest.FixtureLookupError:
    If the given fixture could not be found.

---
## _iter_chain
```python
from fixtures import _iter_chain
```

Yield all SubRequests in the chain, from self up.

Note: does *not* yield the TopRequest.

---
## _get_active_fixturedef
```python
from fixtures import _get_active_fixturedef
```



---
## _check_fixturedef_without_param
```python
from fixtures import _check_fixturedef_without_param
```

Check that this request is allowed to execute this fixturedef without
a param.

---
## _get_fixturestack
```python
from fixtures import _get_fixturestack
```



---
## __repr__
```python
from fixtures import __repr__
```



---
## _fillfixtures
```python
from fixtures import _fillfixtures
```



---
## _format_fixturedef_line
```python
from fixtures import _format_fixturedef_line
```



---
## formatrepr
```python
from fixtures import formatrepr
```



---
## toterminal
```python
from fixtures import toterminal
```



---
## finish
```python
from fixtures import finish
```



---
## execute
```python
from fixtures import execute
```

Return the value of this fixture, executing it if not cached.

---
## cache_key
```python
from fixtures import cache_key
```



---
## result
```python
from fixtures import result
```



---
## __post_init__
```python
from fixtures import __post_init__
```



---
## __call__
```python
from fixtures import __call__
```



---
## getfixtureinfo
```python
from fixtures import getfixtureinfo
```

Calculate the :class:`FuncFixtureInfo` for an item.

If ``func`` is None, or if the item sets an attribute
``nofuncargs = True``, then ``func`` is not examined at all.

:param node:
    The item requesting the fixtures.
:param func:
    The item's function.
:param cls:
    If the function is a method, the method's class.

---
## pytest_plugin_registered
```python
from fixtures import pytest_plugin_registered
```



---
## _getautousenames
```python
from fixtures import _getautousenames
```

Return the names of autouse fixtures applicable to node.

---
## _getusefixturesnames
```python
from fixtures import _getusefixturesnames
```

Return the names of usefixtures fixtures applicable to node.

---
## getfixtureclosure
```python
from fixtures import getfixtureclosure
```



---
## pytest_generate_tests
```python
from fixtures import pytest_generate_tests
```

Generate new tests based on parametrized fixtures used by the given metafunc

---
## pytest_collection_modifyitems
```python
from fixtures import pytest_collection_modifyitems
```



---
## _register_fixture
```python
from fixtures import _register_fixture
```

Register a fixture

:param name:
    The fixture's name.
:param func:
    The fixture's implementation function.
:param nodeid:
    The visibility of the fixture. The fixture will be available to the
    node with this nodeid and its children in the collection tree.
    None means that the fixture is visible to the entire collection tree,
    e.g. a fixture defined for general use in a plugin.
:param scope:
    The fixture's scope.
:param params:
    The fixture's parametrization params.
:param ids:
    The fixture's IDs.
:param autouse:
    Whether this is an autouse fixture.

---
## parsefactories
```python
from fixtures import parsefactories
```

Collect fixtures from a collection node or object.

Found fixtures are parsed into `FixtureDef`s and saved.

If `node_or_object` is a collection node (with an underlying Python
object), the node's object is traversed and the node's nodeid is used to
determine the fixtures' visibility. `nodeid` must not be specified in
this case.

If `node_or_object` is an object (e.g. a plugin), the object is
traversed and the given `nodeid` is used to determine the fixtures'
visibility. `nodeid` must be specified in this case; None and "" mean
total visibility.

---
## getfixturedefs
```python
from fixtures import getfixturedefs
```

Get FixtureDefs for a fixture name which are applicable
to a given node.

Returns None if there are no fixtures at all defined with the given
name. (This is different from the case in which there are fixtures
with the given name, but none applicable to the node. In this case,
an empty result is returned).

:param argname: Name of the fixture to search for.
:param node: The requesting Node.

---
## _matchfactories
```python
from fixtures import _matchfactories
```



---
## get_best_relpath
```python
from fixtures import get_best_relpath
```



---
## write_fixture
```python
from fixtures import write_fixture
```



---
## write_item
```python
from fixtures import write_item
```



---
## sort_by_scope
```python
from fixtures import sort_by_scope
```



---
## get_parametrize_mark_argnames
```python
from fixtures import get_parametrize_mark_argnames
```



---
## __name__
```python
from cacheprovider import __name__
```

Implementation of the cache provider.

---
## Cache
```python
from cacheprovider import Cache
```

Instance of the `cache` fixture.

---
## LFPluginCollWrapper
```python
from cacheprovider import LFPluginCollWrapper
```



---
## LFPluginCollSkipfiles
```python
from cacheprovider import LFPluginCollSkipfiles
```



---
## LFPlugin
```python
from cacheprovider import LFPlugin
```

Plugin which implements the --lf (run last-failing) option.

---
## NFPlugin
```python
from cacheprovider import NFPlugin
```

Plugin which implements the --nf (run new-first) option.

---
## pytest_addoption
```python
from cacheprovider import pytest_addoption
```



---
## pytest_cmdline_main
```python
from cacheprovider import pytest_cmdline_main
```



---
## pytest_configure
```python
from cacheprovider import pytest_configure
```



---
## cache
```python
from cacheprovider import cache
```

Return a cache object that can persist state between testing sessions.

cache.get(key, default)
cache.set(key, value)

Keys must be ``/`` separated strings, where the first part is usually the
name of your plugin or application to avoid clashes with other cache users.

Values can be any object handled by the json stdlib module.

---
## pytest_report_header
```python
from cacheprovider import pytest_report_header
```

Display cachedir with --cache-show and if non-default.

---
## cacheshow
```python
from cacheprovider import cacheshow
```



---
## __init__
```python
from cacheprovider import __init__
```



---
## for_config
```python
from cacheprovider import for_config
```

Create the Cache instance for a Config.

:meta private:

---
## clear_cache
```python
from cacheprovider import clear_cache
```

Clear the sub-directories used to hold cached directories and values.

:meta private:

---
## cache_dir_from_config
```python
from cacheprovider import cache_dir_from_config
```

Get the path to the cache directory for a Config.

:meta private:

---
## warn
```python
from cacheprovider import warn
```

Issue a cache warning.

:meta private:

---
## _mkdir
```python
from cacheprovider import _mkdir
```



---
## mkdir
```python
from cacheprovider import mkdir
```

Return a directory path object with the given name.

If the directory does not yet exist, it will be created. You can use
it to manage files to e.g. store/retrieve database dumps across test
sessions.

.. versionadded:: 7.0

:param name:
    Must be a string not containing a ``/`` separator.
    Make sure the name contains your plugin or application
    identifiers to prevent clashes with other cache users.

---
## _getvaluepath
```python
from cacheprovider import _getvaluepath
```



---
## get
```python
from cacheprovider import get
```

Return the cached value for the given key.

If no value was yet cached or the value cannot be read, the specified
default is returned.

:param key:
    Must be a ``/`` separated value. Usually the first
    name is the name of your plugin or your application.
:param default:
    The value to return in case of a cache-miss or invalid cache value.

---
## set
```python
from cacheprovider import set
```

Save value for the given key.

:param key:
    Must be a ``/`` separated value. Usually the first
    name is the name of your plugin or your application.
:param value:
    Must be of any combination of basic python types,
    including nested types like lists of dictionaries.

---
## _ensure_cache_dir_and_supporting_files
```python
from cacheprovider import _ensure_cache_dir_and_supporting_files
```

Create the cache dir and its supporting files.

---
## pytest_make_collect_report
```python
from cacheprovider import pytest_make_collect_report
```



---
## get_last_failed_paths
```python
from cacheprovider import get_last_failed_paths
```

Return a set with all Paths of the previously failed nodeids and
their parents.

---
## pytest_report_collectionfinish
```python
from cacheprovider import pytest_report_collectionfinish
```



---
## pytest_runtest_logreport
```python
from cacheprovider import pytest_runtest_logreport
```



---
## pytest_collectreport
```python
from cacheprovider import pytest_collectreport
```



---
## pytest_collection_modifyitems
```python
from cacheprovider import pytest_collection_modifyitems
```



---
## pytest_sessionfinish
```python
from cacheprovider import pytest_sessionfinish
```



---
## _get_increasing_order
```python
from cacheprovider import _get_increasing_order
```



---
## sort_key
```python
from cacheprovider import sort_key
```



---
## __name__
```python
from warning_types import __name__
```



---
## PytestWarning
```python
from warning_types import PytestWarning
```

Base class for all warnings emitted by pytest.

---
## PytestAssertRewriteWarning
```python
from warning_types import PytestAssertRewriteWarning
```

Warning emitted by the pytest assert rewrite module.

---
## PytestCacheWarning
```python
from warning_types import PytestCacheWarning
```

Warning emitted by the cache plugin in various situations.

---
## PytestConfigWarning
```python
from warning_types import PytestConfigWarning
```

Warning emitted for configuration issues.

---
## PytestCollectionWarning
```python
from warning_types import PytestCollectionWarning
```

Warning emitted when pytest is not able to collect a file or symbol in a module.

---
## PytestDeprecationWarning
```python
from warning_types import PytestDeprecationWarning
```

Warning class for features that will be removed in a future version.

---
## PytestRemovedIn9Warning
```python
from warning_types import PytestRemovedIn9Warning
```

Warning class for features that will be removed in pytest 9.

---
## PytestReturnNotNoneWarning
```python
from warning_types import PytestReturnNotNoneWarning
```

Warning emitted when a test function is returning value other than None.

---
## PytestExperimentalApiWarning
```python
from warning_types import PytestExperimentalApiWarning
```

Warning category used to denote experiments in pytest.

Use sparingly as the API might change or even be removed completely in a
future version.

---
## PytestUnhandledCoroutineWarning
```python
from warning_types import PytestUnhandledCoroutineWarning
```

Warning emitted for an unhandled coroutine.

A coroutine was encountered when collecting test functions, but was not
handled by any async-aware plugin.
Coroutine test functions are not natively supported.

---
## PytestUnknownMarkWarning
```python
from warning_types import PytestUnknownMarkWarning
```

Warning emitted on use of unknown markers.

See :ref:`mark` for details.

---
## PytestUnraisableExceptionWarning
```python
from warning_types import PytestUnraisableExceptionWarning
```

An unraisable exception was reported.

Unraisable exceptions are exceptions raised in :meth:`__del__ <object.__del__>`
implementations and similar situations when the exception cannot be raised
as normal.

---
## PytestUnhandledThreadExceptionWarning
```python
from warning_types import PytestUnhandledThreadExceptionWarning
```

An unhandled exception occurred in a :class:`~threading.Thread`.

Such exceptions don't propagate normally.

---
## UnformattedWarning
```python
from warning_types import UnformattedWarning
```

A warning meant to be formatted during runtime.

This is used to hold warnings that need to format their message at runtime,
as opposed to a direct message.

---
## warn_explicit_for
```python
from warning_types import warn_explicit_for
```

Issue the warning :param:`message` for the definition of the given :param:`method`

this helps to log warnings for functions defined prior to finding an issue with them
(like hook wrappers being marked in a legacy mechanism)

---
## simple
```python
from warning_types import simple
```



---
## format
```python
from warning_types import format
```

Return an instance of the warning category, formatted with given kwargs.

---
## __name__
```python
from silence import __name__
```

Various functions for finding/manipulating silence in AudioSegments

---
## detect_silence
```python
from silence import detect_silence
```

Returns a list of all silent sections [start, end] in milliseconds of audio_segment.
Inverse of detect_nonsilent()

audio_segment - the segment to find silence in
min_silence_len - the minimum length for any silent section
silence_thresh - the upper bound for how quiet is silent in dFBS
seek_step - step size for interating over the segment in ms

---
## detect_nonsilent
```python
from silence import detect_nonsilent
```

Returns a list of all nonsilent sections [start, end] in milliseconds of audio_segment.
Inverse of detect_silent()

audio_segment - the segment to find silence in
min_silence_len - the minimum length for any silent section
silence_thresh - the upper bound for how quiet is silent in dFBS
seek_step - step size for interating over the segment in ms

---
## split_on_silence
```python
from silence import split_on_silence
```

Returns list of audio segments from splitting audio_segment on silent sections

audio_segment - original pydub.AudioSegment() object

min_silence_len - (in ms) minimum length of a silence to be used for
    a split. default: 1000ms

silence_thresh - (in dBFS) anything quieter than this will be
    considered silence. default: -16dBFS

keep_silence - (in ms or True/False) leave some silence at the beginning
    and end of the chunks. Keeps the sound from sounding like it
    is abruptly cut off.
    When the length of the silence is less than the keep_silence duration
    it is split evenly between the preceding and following non-silent
    segments.
    If True is specified, all the silence is kept, if False none is kept.
    default: 100ms

seek_step - step size for interating over the segment in ms

---
## detect_leading_silence
```python
from silence import detect_leading_silence
```

Returns the millisecond/index that the leading silence ends.

audio_segment - the segment to find silence in
silence_threshold - the upper bound for how quiet is silent in dFBS
chunk_size - chunk size for interating over the segment in ms

---
## pairwise
```python
from silence import pairwise
```

s -> (s0,s1), (s1,s2), (s2, s3), ...

---
## __name__
```python
from effects import __name__
```



---
## apply_mono_filter_to_each_channel
```python
from effects import apply_mono_filter_to_each_channel
```



---
## normalize
```python
from effects import normalize
```

headroom is how close to the maximum volume to boost the signal up to (specified in dB)

---
## speedup
```python
from effects import speedup
```



---
## strip_silence
```python
from effects import strip_silence
```



---
## compress_dynamic_range
```python
from effects import compress_dynamic_range
```

Keyword Arguments:
    
    threshold - default: -20.0
        Threshold in dBFS. default of -20.0 means -20dB relative to the
        maximum possible volume. 0dBFS is the maximum possible value so
        all values for this argument sould be negative.

    ratio - default: 4.0
        Compression ratio. Audio louder than the threshold will be 
        reduced to 1/ratio the volume. A ratio of 4.0 is equivalent to
        a setting of 4:1 in a pro-audio compressor like the Waves C1.
    
    attack - default: 5.0
        Attack in milliseconds. How long it should take for the compressor
        to kick in once the audio has exceeded the threshold.

    release - default: 50.0
        Release in milliseconds. How long it should take for the compressor
        to stop compressing after the audio has falled below the threshold.


For an overview of Dynamic Range Compression, and more detailed explanation
of the related terminology, see: 

    http://en.wikipedia.org/wiki/Dynamic_range_compression

---
## invert_phase
```python
from effects import invert_phase
```

channels- specifies which channel (left or right) to reverse the phase of.
Note that mono AudioSegments will become stereo.

---
## low_pass_filter
```python
from effects import low_pass_filter
```

cutoff - Frequency (in Hz) where higher frequency signal will begin to
be reduced by 6dB per octave (doubling in frequency) above this point

---
## high_pass_filter
```python
from effects import high_pass_filter
```

cutoff - Frequency (in Hz) where lower frequency signal will begin to
be reduced by 6dB per octave (doubling in frequency) below this point

---
## pan
```python
from effects import pan
```

pan_amount should be between -1.0 (100% left) and +1.0 (100% right)

When pan_amount == 0.0 the left/right balance is not changed.

Panning does not alter the *perceived* loundness, but since loudness
is decreasing on one side, the other side needs to get louder to
compensate. When panned hard left, the left channel will be 3dB louder.

---
## apply_gain_stereo
```python
from effects import apply_gain_stereo
```

left_gain - amount of gain to apply to the left channel (in dB)
right_gain - amount of gain to apply to the right channel (in dB)

note: mono audio segments will be converted to stereo

---
## rms_at
```python
from effects import rms_at
```



---
## db_over_threshold
```python
from effects import db_over_threshold
```



---
## __name__
```python
from playback import __name__
```

Support for playing AudioSegments. Pyaudio will be used if it's installed,
otherwise will fallback to ffplay. Pyaudio is a *much* nicer solution, but
is tricky to install. See my notes on installing pyaudio in a virtualenv (on
OSX 10.10): https://gist.github.com/jiaaro/9767512210a1d80a8a0d

---
## _play_with_ffplay
```python
from playback import _play_with_ffplay
```



---
## _play_with_pyaudio
```python
from playback import _play_with_pyaudio
```



---
## _play_with_simpleaudio
```python
from playback import _play_with_simpleaudio
```



---
## play
```python
from playback import play
```



---
## __name__
```python
from audio_segment import __name__
```



---
## ClassPropertyDescriptor
```python
from audio_segment import ClassPropertyDescriptor
```



---
## classproperty
```python
from audio_segment import classproperty
```



---
## extract_wav_headers
```python
from audio_segment import extract_wav_headers
```



---
## read_wav_audio
```python
from audio_segment import read_wav_audio
```



---
## fix_wav_headers
```python
from audio_segment import fix_wav_headers
```



---
## AudioSegment
```python
from audio_segment import AudioSegment
```

AudioSegments are *immutable* objects representing segments of audio
that can be manipulated using python code.

AudioSegments are slicable using milliseconds.
for example:
    a = AudioSegment.from_mp3(mp3file)
    first_second = a[:1000] # get the first second of an mp3
    slice = a[5000:10000] # get a slice from 5 to 10 seconds of an mp3

---
## __init__
```python
from audio_segment import __init__
```



---
## __get__
```python
from audio_segment import __get__
```



---
## __set__
```python
from audio_segment import __set__
```



---
## setter
```python
from audio_segment import setter
```



---
## ffmpeg
```python
from audio_segment import ffmpeg
```



---
## raw_data
```python
from audio_segment import raw_data
```

public access to the raw audio data as a bytestring

---
## get_array_of_samples
```python
from audio_segment import get_array_of_samples
```

returns the raw_data as an array of samples

---
## array_type
```python
from audio_segment import array_type
```



---
## __len__
```python
from audio_segment import __len__
```

returns the length of this audio segment in milliseconds

---
## __eq__
```python
from audio_segment import __eq__
```



---
## __hash__
```python
from audio_segment import __hash__
```



---
## __ne__
```python
from audio_segment import __ne__
```



---
## __iter__
```python
from audio_segment import __iter__
```



---
## __getitem__
```python
from audio_segment import __getitem__
```



---
## get_sample_slice
```python
from audio_segment import get_sample_slice
```

Get a section of the audio segment by sample index.

NOTE: Negative indices do *not* address samples backword
from the end of the audio segment like a python list.
This is intentional.

---
## __add__
```python
from audio_segment import __add__
```



---
## __radd__
```python
from audio_segment import __radd__
```

Permit use of sum() builtin with an iterable of AudioSegments

---
## __sub__
```python
from audio_segment import __sub__
```



---
## __mul__
```python
from audio_segment import __mul__
```

If the argument is an AudioSegment, overlay the multiplied audio
segment.

If it's a number, just use the string multiply operation to repeat the
audio.

The following would return an AudioSegment that contains the
audio of audio_seg eight times

`audio_seg * 8`

---
## _spawn
```python
from audio_segment import _spawn
```

Creates a new audio segment using the metadata from the current one
and the data passed in. Should be used whenever an AudioSegment is
being returned by an operation that would alters the current one,
since AudioSegment objects are immutable.

---
## _sync
```python
from audio_segment import _sync
```



---
## _parse_position
```python
from audio_segment import _parse_position
```



---
## empty
```python
from audio_segment import empty
```



---
## silent
```python
from audio_segment import silent
```

Generate a silent audio segment.
duration specified in milliseconds (default duration: 1000ms, default frame_rate: 11025).

---
## from_mono_audiosegments
```python
from audio_segment import from_mono_audiosegments
```



---
## from_file_using_temporary_files
```python
from audio_segment import from_file_using_temporary_files
```



---
## from_file
```python
from audio_segment import from_file
```



---
## from_mp3
```python
from audio_segment import from_mp3
```



---
## from_flv
```python
from audio_segment import from_flv
```



---
## from_ogg
```python
from audio_segment import from_ogg
```



---
## from_wav
```python
from audio_segment import from_wav
```



---
## from_raw
```python
from audio_segment import from_raw
```



---
## _from_safe_wav
```python
from audio_segment import _from_safe_wav
```



---
## export
```python
from audio_segment import export
```

Export an AudioSegment to a file with given options

out_f (string):
    Path to destination audio file. Also accepts os.PathLike objects on
    python >= 3.6

format (string)
    Format for destination audio file.
    ('mp3', 'wav', 'raw', 'ogg' or other ffmpeg/avconv supported files)

codec (string)
    Codec used to encode the destination file.

bitrate (string)
    Bitrate used when encoding destination file. (64, 92, 128, 256, 312k...)
    Each codec accepts different bitrate arguments so take a look at the
    ffmpeg documentation for details (bitrate usually shown as -b, -ba or
    -a:b).

parameters (list of strings)
    Aditional ffmpeg/avconv parameters

tags (dict)
    Set metadata information to destination files
    usually used as tags. ({title='Song Title', artist='Song Artist'})

id3v2_version (string)
    Set ID3v2 version for tags. (default: '4')

cover (file)
    Set cover for audio file from image file. (png or jpg)

---
## get_frame
```python
from audio_segment import get_frame
```



---
## frame_count
```python
from audio_segment import frame_count
```

returns the number of frames for the given number of milliseconds, or
if not specified, the number of frames in the whole AudioSegment

---
## set_sample_width
```python
from audio_segment import set_sample_width
```



---
## set_frame_rate
```python
from audio_segment import set_frame_rate
```



---
## set_channels
```python
from audio_segment import set_channels
```



---
## split_to_mono
```python
from audio_segment import split_to_mono
```



---
## rms
```python
from audio_segment import rms
```



---
## dBFS
```python
from audio_segment import dBFS
```



---
## max
```python
from audio_segment import max
```



---
## max_possible_amplitude
```python
from audio_segment import max_possible_amplitude
```



---
## max_dBFS
```python
from audio_segment import max_dBFS
```



---
## duration_seconds
```python
from audio_segment import duration_seconds
```



---
## get_dc_offset
```python
from audio_segment import get_dc_offset
```

Returns a value between -1.0 and 1.0 representing the DC offset of a
channel (1 for left, 2 for right).

---
## remove_dc_offset
```python
from audio_segment import remove_dc_offset
```

Removes DC offset of given channel. Calculates offset if it's not given.
Offset values must be in range -1.0 to 1.0. If channel is None, removes
DC offset from all available channels.

---
## apply_gain
```python
from audio_segment import apply_gain
```



---
## overlay
```python
from audio_segment import overlay
```

Overlay the provided segment on to this segment starting at the
specificed position and using the specfied looping beahvior.

seg (AudioSegment):
    The audio segment to overlay on to this one.

position (optional int):
    The position to start overlaying the provided segment in to this
    one.

loop (optional bool):
    Loop seg as many times as necessary to match this segment's length.
    Overrides loops param.

times (optional int):
    Loop seg the specified number of times or until it matches this
    segment's length. 1 means once, 2 means twice, ... 0 would make the
    call a no-op
gain_during_overlay (optional int):
    Changes this segment's volume by the specified amount during the
    duration of time that seg is overlaid on top of it. When negative,
    this has the effect of 'ducking' the audio under the overlay.

---
## append
```python
from audio_segment import append
```



---
## fade
```python
from audio_segment import fade
```

Fade the volume of this audio segment.

to_gain (float):
    resulting volume_change in db

start (int):
    default = beginning of the segment
    when in this segment to start fading in milliseconds

end (int):
    default = end of the segment
    when in this segment to start fading in milliseconds

duration (int):
    default = until the end of the audio segment
    the duration of the fade

---
## fade_out
```python
from audio_segment import fade_out
```



---
## fade_in
```python
from audio_segment import fade_in
```



---
## reverse
```python
from audio_segment import reverse
```



---
## _repr_html_
```python
from audio_segment import _repr_html_
```



---
## bounded
```python
from audio_segment import bounded
```



---
## is_format
```python
from audio_segment import is_format
```



---
## remove_data_dc
```python
from audio_segment import remove_data_dc
```



---
## __name__
```python
from pyaudioop import __name__
```



---
## error
```python
from pyaudioop import error
```



---
## _check_size
```python
from pyaudioop import _check_size
```



---
## _check_params
```python
from pyaudioop import _check_params
```



---
## _sample_count
```python
from pyaudioop import _sample_count
```



---
## _get_samples
```python
from pyaudioop import _get_samples
```



---
## _struct_format
```python
from pyaudioop import _struct_format
```



---
## _get_sample
```python
from pyaudioop import _get_sample
```



---
## _put_sample
```python
from pyaudioop import _put_sample
```



---
## _get_maxval
```python
from pyaudioop import _get_maxval
```



---
## _get_minval
```python
from pyaudioop import _get_minval
```



---
## _get_clipfn
```python
from pyaudioop import _get_clipfn
```



---
## _overflow
```python
from pyaudioop import _overflow
```



---
## getsample
```python
from pyaudioop import getsample
```



---
## max
```python
from pyaudioop import max
```



---
## minmax
```python
from pyaudioop import minmax
```



---
## avg
```python
from pyaudioop import avg
```



---
## rms
```python
from pyaudioop import rms
```



---
## _sum2
```python
from pyaudioop import _sum2
```



---
## findfit
```python
from pyaudioop import findfit
```



---
## findfactor
```python
from pyaudioop import findfactor
```



---
## findmax
```python
from pyaudioop import findmax
```



---
## avgpp
```python
from pyaudioop import avgpp
```



---
## maxpp
```python
from pyaudioop import maxpp
```



---
## cross
```python
from pyaudioop import cross
```



---
## mul
```python
from pyaudioop import mul
```



---
## tomono
```python
from pyaudioop import tomono
```



---
## tostereo
```python
from pyaudioop import tostereo
```



---
## add
```python
from pyaudioop import add
```



---
## bias
```python
from pyaudioop import bias
```



---
## reverse
```python
from pyaudioop import reverse
```



---
## lin2lin
```python
from pyaudioop import lin2lin
```



---
## ratecv
```python
from pyaudioop import ratecv
```



---
## lin2ulaw
```python
from pyaudioop import lin2ulaw
```



---
## ulaw2lin
```python
from pyaudioop import ulaw2lin
```



---
## lin2alaw
```python
from pyaudioop import lin2alaw
```



---
## alaw2lin
```python
from pyaudioop import alaw2lin
```



---
## lin2adpcm
```python
from pyaudioop import lin2adpcm
```



---
## adpcm2lin
```python
from pyaudioop import adpcm2lin
```



---
## __name__
```python
from scipy_effects import __name__
```

This module provides scipy versions of high_pass_filter, and low_pass_filter
as well as an additional band_pass_filter.

Of course, you will need to install scipy for these to work.

When this module is imported the high and low pass filters from this module
will be used when calling audio_segment.high_pass_filter() and
audio_segment.high_pass_filter() instead of the slower, less powerful versions
provided by pydub.effects.

---
## _mk_butter_filter
```python
from scipy_effects import _mk_butter_filter
```

Args:
    freq: The cutoff frequency for highpass and lowpass filters. For
        band filters, a list of [low_cutoff, high_cutoff]
    type: "lowpass", "highpass", or "band"
    order: nth order butterworth filter (default: 5th order). The
        attenuation is -6dB/octave beyond the cutoff frequency (for 1st
        order). A Higher order filter will have more attenuation, each level
        adding an additional -6dB (so a 3rd order butterworth filter would
        be -18dB/octave).

Returns:
    function which can filter a mono audio segment

---
## band_pass_filter
```python
from scipy_effects import band_pass_filter
```



---
## high_pass_filter
```python
from scipy_effects import high_pass_filter
```



---
## low_pass_filter
```python
from scipy_effects import low_pass_filter
```



---
## _eq
```python
from scipy_effects import _eq
```

Args:
    focus_freq - middle frequency or known frequency of band (in Hz)
    bandwidth - range of the equalizer band
    mode - Mode of Equalization(Peak/Notch(Bell Curve),High Shelf, Low Shelf)
    order - Rolloff factor(1 - 6dB/Octave 2 - 12dB/Octave)

Returns:
    Equalized/Filtered AudioSegment

---
## eq
```python
from scipy_effects import eq
```

Args:
    focus_freq - middle frequency or known frequency of band (in Hz)
    bandwidth - range of the equalizer band
    channel_mode - Select Channels to be affected by the filter.
        L+R - Standard Stereo Filter
        L - Only Left Channel is Filtered
        R - Only Right Channel is Filtered
        M+S - Blumlien Stereo Filter(Mid-Side)
        M - Only Mid Channel is Filtered
        S - Only Side Channel is Filtered
        Mono Audio Segments are completely filtered.
    filter_mode - Mode of Equalization(Peak/Notch(Bell Curve),High Shelf, Low Shelf)
    order - Rolloff factor(1 - 6dB/Octave 2 - 12dB/Octave)

Returns:
    Equalized/Filtered AudioSegment

---
## filter_fn
```python
from scipy_effects import filter_fn
```



---
## __name__
```python
from generators import __name__
```

Each generator will return float samples from -1.0 to 1.0, which can be 
converted to actual audio with 8, 16, 24, or 32 bit depth using the
SiganlGenerator.to_audio_segment() method (on any of it's subclasses).

See Wikipedia's "waveform" page for info on some of the generators included 
here: http://en.wikipedia.org/wiki/Waveform

---
## SignalGenerator
```python
from generators import SignalGenerator
```



---
## Sine
```python
from generators import Sine
```



---
## Pulse
```python
from generators import Pulse
```



---
## Square
```python
from generators import Square
```



---
## Sawtooth
```python
from generators import Sawtooth
```



---
## Triangle
```python
from generators import Triangle
```



---
## WhiteNoise
```python
from generators import WhiteNoise
```



---
## __init__
```python
from generators import __init__
```



---
## to_audio_segment
```python
from generators import to_audio_segment
```

Duration in milliseconds
    (default: 1 second)
Volume in DB relative to maximum amplitude
    (default 0.0 dBFS, which is the maximum value)

---
## generate
```python
from generators import generate
```



---
## get_frame_width
```python
from utils import get_frame_width
```



---
## get_array_type
```python
from utils import get_array_type
```



---
## get_min_max_value
```python
from utils import get_min_max_value
```



---
## _fd_or_path_or_tempfile
```python
from utils import _fd_or_path_or_tempfile
```



---
## db_to_float
```python
from utils import db_to_float
```

Converts the input db to a float, which represents the equivalent
ratio in power.

---
## ratio_to_db
```python
from utils import ratio_to_db
```

Converts the input float to db, which represents the equivalent
to the ratio in power represented by the multiplier passed in.

---
## register_pydub_effect
```python
from utils import register_pydub_effect
```

decorator for adding pydub effects to the AudioSegment objects.
example use:
    @register_pydub_effect
    def normalize(audio_segment):
        ...
or you can specify a name:
    @register_pydub_effect("normalize")
    def normalize_audio_segment(audio_segment):
        ...

---
## make_chunks
```python
from utils import make_chunks
```

Breaks an AudioSegment into chunks that are <chunk_length> milliseconds
long.
if chunk_length is 50 then you'll get a list of 50 millisecond long audio
segments back (except the last one, which can be shorter)

---
## get_encoder_name
```python
from utils import get_encoder_name
```

Return enconder default application for system, either avconv or ffmpeg

---
## get_player_name
```python
from utils import get_player_name
```

Return enconder default application for system, either avconv or ffmpeg

---
## get_prober_name
```python
from utils import get_prober_name
```

Return probe application, either avconv or ffmpeg

---
## fsdecode
```python
from utils import fsdecode
```

Wrapper for os.fsdecode which was introduced in python 3.2 .

---
## get_extra_info
```python
from utils import get_extra_info
```

avprobe sometimes gives more information on stderr than
on the json output. The information has to be extracted
from stderr of the format of:
'    Stream #0:0: Audio: flac, 88200 Hz, stereo, s32 (24 bit)'
or (macOS version):
'    Stream #0:0: Audio: vorbis'
'      44100 Hz, stereo, fltp, 320 kb/s'

:type stderr: str
:rtype: list of dict

---
## mediainfo_json
```python
from utils import mediainfo_json
```

Return json dictionary with media info(codec, duration, size, bitrate...) from filepath
    

---
## mediainfo
```python
from utils import mediainfo
```

Return dictionary with media info(codec, duration, size, bitrate...) from filepath
    

---
## cache_codecs
```python
from utils import cache_codecs
```



---
## get_supported_codecs
```python
from utils import get_supported_codecs
```



---
## get_supported_decoders
```python
from utils import get_supported_decoders
```



---
## get_supported_encoders
```python
from utils import get_supported_encoders
```



---
## stereo_to_ms
```python
from utils import stereo_to_ms
```

Left-Right -> Mid-Side

---
## ms_to_stereo
```python
from utils import ms_to_stereo
```

Mid-Side -> Left-Right

---
## set_property
```python
from utils import set_property
```



---
## PydubException
```python
from exceptions import PydubException
```

Base class for any Pydub exception

---
## TooManyMissingFrames
```python
from exceptions import TooManyMissingFrames
```



---
## InvalidDuration
```python
from exceptions import InvalidDuration
```



---
## InvalidTag
```python
from exceptions import InvalidTag
```



---
## InvalidID3TagVersion
```python
from exceptions import InvalidID3TagVersion
```



---
## CouldntDecodeError
```python
from exceptions import CouldntDecodeError
```



---
## CouldntEncodeError
```python
from exceptions import CouldntEncodeError
```



---
## MissingAudioParameter
```python
from exceptions import MissingAudioParameter
```



---
## __name__
```python
from logging_utils import __name__
```



---
## log_conversion
```python
from logging_utils import log_conversion
```



---
## log_subprocess_output
```python
from logging_utils import log_subprocess_output
```



---
## __name__
```python
from index import __name__
```

Tests for Indexes backed by arbitrary ExtensionArrays.

---
## Index
```python
from index import Index
```



---
## __setitem__
```python
from index import __setitem__
```



---
## add
```python
from index import add
```



---
## __name__
```python
from commandline import __name__
```

Print the metadata for one or more Python package distributions.

Usage:  %prog [options] path+

Each 'path' entry can be one of the following:

o a source distribution:  in this case, 'path' should point to an existing
  archive file (.tar.gz, .tar.bz2, or .zip) as generated by 'setup.py sdist'.

o a binary distribution:  in this case, 'path' should point to an existing
  archive file (.egg)

o a "develop" checkout:  in this case,  'path' should point to a directory
  initialized via 'setup.py develop' (under setuptools).

o an installed package:  in this case, 'path' should be the importable name
  of the package.

---
## _parse_options
```python
from commandline import _parse_options
```



---
## Base
```python
from commandline import Base
```



---
## Simple
```python
from commandline import Simple
```



---
## SingleLine
```python
from commandline import SingleLine
```



---
## CSV
```python
from commandline import CSV
```



---
## INI
```python
from commandline import INI
```



---
## JSON
```python
from commandline import JSON
```



---
## main
```python
from commandline import main
```

Entry point for pkginfo tool
    

---
## __init__
```python
from commandline import __init__
```



---
## finish
```python
from commandline import finish
```



---
## __call__
```python
from commandline import __call__
```



---
## __name__
```python
from sdist import __name__
```



---
## SDist
```python
from sdist import SDist
```



---
## UnpackedSDist
```python
from sdist import UnpackedSDist
```



---
## __init__
```python
from sdist import __init__
```



---
## _get_archive
```python
from sdist import _get_archive
```



---
## read
```python
from sdist import read
```



---
## read_file
```python
from sdist import read_file
```



---
## __name__
```python
from distribution import __name__
```



---
## _must_decode
```python
from distribution import _must_decode
```



---
## parse
```python
from distribution import parse
```



---
## get
```python
from distribution import get
```



---
## get_all
```python
from distribution import get_all
```



---
## _collapse_leading_ws
```python
from distribution import _collapse_leading_ws
```

``Description`` header must preserve newlines; all others need not

---
## Distribution
```python
from distribution import Distribution
```



---
## extractMetadata
```python
from distribution import extractMetadata
```



---
## read
```python
from distribution import read
```



---
## _getHeaderAttrs
```python
from distribution import _getHeaderAttrs
```



---
## __iter__
```python
from distribution import __iter__
```



---
## __name__
```python
from bdist import __name__
```



---
## BDist
```python
from bdist import BDist
```



---
## __init__
```python
from bdist import __init__
```



---
## read
```python
from bdist import read
```



---
## read_file
```python
from bdist import read_file
```



---
## get_metadata
```python
from utils import get_metadata
```

Try to create a Distribution 'path_or_module'.

o 'path_or_module' may be a module object.

o If a string, 'path_or_module' may point to an sdist file, a bdist
  file, an installed package, or a working checkout (if it contains
  PKG-INFO).

o Return None if 'path_or_module' can't be parsed.

---
## __name__
```python
from develop import __name__
```



---
## _gather_py2
```python
from develop import _gather_py2
```



---
## _gather_py3
```python
from develop import _gather_py3
```



---
## Develop
```python
from develop import Develop
```



---
## _filter
```python
from develop import _filter
```



---
## __init__
```python
from develop import __init__
```



---
## read
```python
from develop import read
```



---
## __name__
```python
from installed import __name__
```



---
## Installed
```python
from installed import Installed
```



---
## __init__
```python
from installed import __init__
```



---
## read
```python
from installed import read
```



---
## _add_candidate
```python
from installed import _add_candidate
```



---
## __name__
```python
from orc import __name__
```

orc compat 

---
## ORCFile
```python
from orc import ORCFile
```

Reader interface for a single ORC file

Parameters
----------
source : str or pyarrow.NativeFile
    Readable source. For passing Python file objects or byte buffers,
    see pyarrow.io.PythonFileInterface or pyarrow.io.BufferReader.

---
## ORCWriter
```python
from orc import ORCWriter
```



---
## read_table
```python
from orc import read_table
```



---
## write_table
```python
from orc import write_table
```



---
## __init__
```python
from orc import __init__
```



---
## metadata
```python
from orc import metadata
```

The file metadata, as an arrow KeyValueMetadata

---
## schema
```python
from orc import schema
```

The file schema, as an arrow schema

---
## nrows
```python
from orc import nrows
```

The number of rows in the file

---
## nstripes
```python
from orc import nstripes
```

The number of stripes in the file

---
## file_version
```python
from orc import file_version
```

Format version of the ORC file, must be 0.11 or 0.12

---
## software_version
```python
from orc import software_version
```

Software instance and version that wrote this file

---
## compression
```python
from orc import compression
```

Compression codec of the file

---
## compression_size
```python
from orc import compression_size
```

Number of bytes to buffer for the compression codec in the file

---
## writer
```python
from orc import writer
```

Name of the writer that wrote this file.
If the writer is unknown then its Writer ID
(a number) is returned

---
## writer_version
```python
from orc import writer_version
```

Version of the writer

---
## row_index_stride
```python
from orc import row_index_stride
```

Number of rows per an entry in the row index or 0
if there is no row index

---
## nstripe_statistics
```python
from orc import nstripe_statistics
```

Number of stripe statistics

---
## content_length
```python
from orc import content_length
```

Length of the data stripes in the file in bytes

---
## stripe_statistics_length
```python
from orc import stripe_statistics_length
```

The number of compressed bytes in the file stripe statistics

---
## file_footer_length
```python
from orc import file_footer_length
```

The number of compressed bytes in the file footer

---
## file_postscript_length
```python
from orc import file_postscript_length
```

The number of bytes in the file postscript

---
## file_length
```python
from orc import file_length
```

The number of bytes in the file

---
## _select_names
```python
from orc import _select_names
```



---
## read_stripe
```python
from orc import read_stripe
```

Read a single stripe from the file.

Parameters
----------
n : int
    The stripe index
columns : list
    If not None, only these columns will be read from the stripe. A
    column name may be a prefix of a nested field, e.g. 'a' will select
    'a.b', 'a.c', and 'a.d.e'

Returns
-------
pyarrow.RecordBatch
    Content of the stripe as a RecordBatch.

---
## read
```python
from orc import read
```

Read the whole file.

Parameters
----------
columns : list
    If not None, only these columns will be read from the file. A
    column name may be a prefix of a nested field, e.g. 'a' will select
    'a.b', 'a.c', and 'a.d.e'. Output always follows the
    ordering of the file and not the `columns` list.

Returns
-------
pyarrow.Table
    Content of the file as a Table.

---
## __del__
```python
from orc import __del__
```



---
## __enter__
```python
from orc import __enter__
```



---
## __exit__
```python
from orc import __exit__
```



---
## write
```python
from orc import write
```

Write the table into an ORC file. The schema of the table must
be equal to the schema used when opening the ORC file.

Parameters
----------
table : pyarrow.Table
    The table to be written into the ORC file

---
## close
```python
from orc import close
```

Close the ORC file

---
## pytest_ignore_collect
```python
from conftest import pytest_ignore_collect
```



---
## _docdir
```python
from conftest import _docdir
```



---
## add_fs
```python
from conftest import add_fs
```



---
## unary_func_fixture
```python
from conftest import unary_func_fixture
```

Register a unary scalar function.

---
## unary_agg_func_fixture
```python
from conftest import unary_agg_func_fixture
```

Register a unary aggregate function (mean)

---
## varargs_agg_func_fixture
```python
from conftest import varargs_agg_func_fixture
```

Register a unary aggregate function

---
## unary_function
```python
from conftest import unary_function
```



---
## func
```python
from conftest import func
```



---
## __name__
```python
from _generated_version import __name__
```



---
## __name__
```python
from benchmark import __name__
```

Benchmark the cu2qu algorithm performance.

---
## __name__
```python
from _compute_docstrings import __name__
```

Custom documentation additions for compute functions.

---
## RecordBatchStreamReader
```python
from ipc import RecordBatchStreamReader
```

Reader for the Arrow streaming binary format.

Parameters
----------
source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object
    Either an in-memory buffer, or a readable file object.
    If you want to use memory map use MemoryMappedFile as source.
options : pyarrow.ipc.IpcReadOptions
    Options for IPC deserialization.
    If None, default values will be used.
memory_pool : MemoryPool, default None
    If None, default memory pool is used.

---
## RecordBatchStreamWriter
```python
from ipc import RecordBatchStreamWriter
```



---
## RecordBatchFileReader
```python
from ipc import RecordBatchFileReader
```

Class for reading Arrow record batch data from the Arrow binary file format

Parameters
----------
source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object
    Either an in-memory buffer, or a readable file object.
    If you want to use memory map use MemoryMappedFile as source.
footer_offset : int, default None
    If the file is embedded in some larger file, this is the byte offset to
    the very end of the file data
options : pyarrow.ipc.IpcReadOptions
    Options for IPC serialization.
    If None, default values will be used.
memory_pool : MemoryPool, default None
    If None, default memory pool is used.

---
## RecordBatchFileWriter
```python
from ipc import RecordBatchFileWriter
```



---
## _get_legacy_format_default
```python
from ipc import _get_legacy_format_default
```



---
## _ensure_default_ipc_read_options
```python
from ipc import _ensure_default_ipc_read_options
```



---
## new_stream
```python
from ipc import new_stream
```



---
## open_stream
```python
from ipc import open_stream
```

Create reader for Arrow streaming format.

Parameters
----------
source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object
    Either an in-memory buffer, or a readable file object.
options : pyarrow.ipc.IpcReadOptions
    Options for IPC serialization.
    If None, default values will be used.
memory_pool : MemoryPool, default None
    If None, default memory pool is used.

Returns
-------
reader : RecordBatchStreamReader
    A reader for the given source

---
## new_file
```python
from ipc import new_file
```



---
## open_file
```python
from ipc import open_file
```

Create reader for Arrow file format.

Parameters
----------
source : bytes/buffer-like, pyarrow.NativeFile, or file-like Python object
    Either an in-memory buffer, or a readable file object.
footer_offset : int, default None
    If the file is embedded in some larger file, this is the byte offset to
    the very end of the file data.
options : pyarrow.ipc.IpcReadOptions
    Options for IPC serialization.
    If None, default values will be used.
memory_pool : MemoryPool, default None
    If None, default memory pool is used.

Returns
-------
reader : RecordBatchFileReader
    A reader for the given source

---
## serialize_pandas
```python
from ipc import serialize_pandas
```

Serialize a pandas DataFrame into a buffer protocol compatible object.

Parameters
----------
df : pandas.DataFrame
nthreads : int, default None
    Number of threads to use for conversion to Arrow, default all CPUs.
preserve_index : bool, default None
    The default of None will store the index as a column, except for
    RangeIndex which is stored as metadata only. If True, always
    preserve the pandas index data as a column. If False, no index
    information is saved and the result will have a default RangeIndex.

Returns
-------
buf : buffer
    An object compatible with the buffer protocol.

---
## deserialize_pandas
```python
from ipc import deserialize_pandas
```

Deserialize a buffer protocol compatible object into a pandas DataFrame.

Parameters
----------
buf : buffer
    An object compatible with the buffer protocol.
use_threads : bool, default True
    Whether to parallelize the conversion using multiple threads.

Returns
-------
df : pandas.DataFrame
    The buffer deserialized as pandas DataFrame

---
## doc
```python
from util import doc
```

A decorator that takes docstring templates, concatenates them, and finally
performs string substitution on them.
This decorator will add a variable "_docstring_components" to the wrapped
callable to keep track of the original docstring template for potential future use.
If the docstring is a template, it will be saved as a string.
Otherwise, it will be saved as a callable and the docstring will be obtained via
the __doc__ attribute.
This decorator cannot be used on Cython classes due to a CPython constraint,
which enforces the __doc__ attribute to be read-only.
See https://github.com/python/cpython/issues/91309

Parameters
----------
*docstrings : None, str, or callable
    The string / docstring / docstring template to be prepended in order
    before the default docstring under the callable.
**params
    The key/value pairs used to format the docstring template.

---
## _deprecate_api
```python
from util import _deprecate_api
```



---
## _deprecate_class
```python
from util import _deprecate_class
```

Raise warning if a deprecated class is used in an isinstance check.

---
## _is_path_like
```python
from util import _is_path_like
```



---
## _stringify_path
```python
from util import _stringify_path
```

Convert *path* to a string or unicode path if possible.

---
## product
```python
from util import product
```

Return a product of sequence items.

---
## get_contiguous_span
```python
from util import get_contiguous_span
```

Return a contiguous span of N-D array data.

Parameters
----------
shape : tuple
strides : tuple
itemsize : int
  Specify array shape data

Returns
-------
start, end : int
  The span end points.

---
## find_free_port
```python
from util import find_free_port
```



---
## guid
```python
from util import guid
```



---
## _break_traceback_cycle_from_frame
```python
from util import _break_traceback_cycle_from_frame
```



---
## download_tzdata_on_windows
```python
from util import download_tzdata_on_windows
```

Download and extract latest IANA timezone database into the
location expected by Arrow which is %USERPROFILE%\Downloads\tzdata.

---
## decorator
```python
from util import decorator
```



---
## _DeprecatedMeta
```python
from util import _DeprecatedMeta
```



---
## __instancecheck__
```python
from util import __instancecheck__
```



---
## __name__
```python
from flight import __name__
```



---
## __name__
```python
from cffi import __name__
```



---
## __name__
```python
from substrait import __name__
```



---
## show_versions
```python
from __init__ import show_versions
```

Print various version information, to help with error reporting.

---
## _module_is_available
```python
from __init__ import _module_is_available
```



---
## _filesystem_is_available
```python
from __init__ import _filesystem_is_available
```



---
## show_info
```python
from __init__ import show_info
```

Print detailed version and platform information, for error reporting

---
## get_include
```python
from __init__ import get_include
```

Return the directory that contains the ``fortranobject.c`` and ``.h`` files.

.. note::

    This function is not needed when building an extension with
    `numpy.distutils` directly from ``.f`` and/or ``.pyf`` files
    in one go.

Python extension modules built with f2py-generated code need to use
``fortranobject.c`` as a source file, and include the ``fortranobject.h``
header. This function can be used to obtain the directory containing
both of these files.

Returns
-------
include_path : str
    Absolute path to the directory containing ``fortranobject.c`` and
    ``fortranobject.h``.

Notes
-----
.. versionadded:: 1.21.1

Unless the build system you are using has specific support for f2py,
building a Python extension using a ``.pyf`` signature file is a two-step
process. For a module ``mymod``:

* Step 1: run ``python -m numpy.f2py mymod.pyf --quiet``. This
  generates ``_mymodmodule.c`` and (if needed)
  ``_fblas-f2pywrappers.f`` files next to ``mymod.pyf``.
* Step 2: build your Python extension module. This requires the
  following source files:

  * ``_mymodmodule.c``
  * ``_mymod-f2pywrappers.f`` (if it was generated in Step 1)
  * ``fortranobject.c``

See Also
--------
numpy.get_include : function that returns the numpy include directory

---
## _get_pkg_config_executable
```python
from __init__ import _get_pkg_config_executable
```



---
## _has_pkg_config
```python
from __init__ import _has_pkg_config
```



---
## _read_pkg_config_variable
```python
from __init__ import _read_pkg_config_variable
```



---
## get_libraries
```python
from __init__ import get_libraries
```

Return list of library names to include in the `libraries` argument for C
or Cython extensions using pyarrow

---
## create_library_symlinks
```python
from __init__ import create_library_symlinks
```

With Linux and macOS wheels, the bundled shared libraries have an embedded
ABI version like libarrow.so.17 or libarrow.17.dylib and so linking to them
with -larrow won't work unless we create symlinks at locations like
site-packages/pyarrow/libarrow.so. This unfortunate workaround addresses
prior problems we had with shipping two copies of the shared libraries to
permit third party projects like turbodbc to build their C++ extensions
against the pyarrow wheels.

This function must only be invoked once and only when the shared libraries
are bundled with the Python package, which should only apply to wheel-based
installs. It requires write access to the site-packages/pyarrow directory
and so depending on your system may need to be run with root.

---
## get_library_dirs
```python
from __init__ import get_library_dirs
```

Return lists of directories likely to contain Arrow C++ libraries for
linking C or Cython extensions using pyarrow

---
## print_entry
```python
from __init__ import print_entry
```



---
## append_library_dir
```python
from __init__ import append_library_dir
```



---
## get_symlink_path
```python
from __init__ import get_symlink_path
```



---
## parse_git
```python
from __init__ import parse_git
```

Parse function for setuptools_scm that ignores tags for non-C++
subprojects, e.g. apache-arrow-js-XXX tags.

---
## is_null
```python
from types import is_null
```

Return True if value is an instance of type: {datatype}.

Parameters
----------
t : DataType

---
## is_boolean
```python
from types import is_boolean
```



---
## is_integer
```python
from types import is_integer
```



---
## is_signed_integer
```python
from types import is_signed_integer
```



---
## is_unsigned_integer
```python
from types import is_unsigned_integer
```



---
## is_int8
```python
from types import is_int8
```



---
## is_int16
```python
from types import is_int16
```



---
## is_int32
```python
from types import is_int32
```



---
## is_int64
```python
from types import is_int64
```



---
## is_uint8
```python
from types import is_uint8
```



---
## is_uint16
```python
from types import is_uint16
```



---
## is_uint32
```python
from types import is_uint32
```



---
## is_uint64
```python
from types import is_uint64
```



---
## is_floating
```python
from types import is_floating
```



---
## is_float16
```python
from types import is_float16
```



---
## is_float32
```python
from types import is_float32
```



---
## is_float64
```python
from types import is_float64
```



---
## is_list
```python
from types import is_list
```



---
## is_large_list
```python
from types import is_large_list
```



---
## is_fixed_size_list
```python
from types import is_fixed_size_list
```



---
## is_list_view
```python
from types import is_list_view
```



---
## is_large_list_view
```python
from types import is_large_list_view
```



---
## is_struct
```python
from types import is_struct
```



---
## is_union
```python
from types import is_union
```



---
## is_nested
```python
from types import is_nested
```



---
## is_run_end_encoded
```python
from types import is_run_end_encoded
```



---
## is_temporal
```python
from types import is_temporal
```



---
## is_timestamp
```python
from types import is_timestamp
```



---
## is_duration
```python
from types import is_duration
```



---
## is_time
```python
from types import is_time
```



---
## is_time32
```python
from types import is_time32
```



---
## is_time64
```python
from types import is_time64
```



---
## is_binary
```python
from types import is_binary
```



---
## is_large_binary
```python
from types import is_large_binary
```



---
## is_unicode
```python
from types import is_unicode
```

Alias for {method}.

Parameters
----------
t : DataType

---
## is_string
```python
from types import is_string
```



---
## is_large_unicode
```python
from types import is_large_unicode
```



---
## is_large_string
```python
from types import is_large_string
```



---
## is_fixed_size_binary
```python
from types import is_fixed_size_binary
```



---
## is_binary_view
```python
from types import is_binary_view
```



---
## is_string_view
```python
from types import is_string_view
```



---
## is_date
```python
from types import is_date
```



---
## is_date32
```python
from types import is_date32
```



---
## is_date64
```python
from types import is_date64
```



---
## is_map
```python
from types import is_map
```



---
## is_decimal
```python
from types import is_decimal
```



---
## is_decimal128
```python
from types import is_decimal128
```



---
## is_decimal256
```python
from types import is_decimal256
```



---
## is_dictionary
```python
from types import is_dictionary
```



---
## is_interval
```python
from types import is_interval
```



---
## is_primitive
```python
from types import is_primitive
```



---
## __name__
```python
from dataset import __name__
```

Implements support for high-level dataset access.

---
## __getattr__
```python
from dataset import __getattr__
```



---
## partitioning
```python
from dataset import partitioning
```

Specify a partitioning scheme.

The supported schemes include:

- "DirectoryPartitioning": this scheme expects one segment in the file path
  for each field in the specified schema (all fields are required to be
  present). For example given schema<year:int16, month:int8> the path
  "/2009/11" would be parsed to ("year"_ == 2009 and "month"_ == 11).
- "HivePartitioning": a scheme for "/$key=$value/" nested directories as
  found in Apache Hive. This is a multi-level, directory based partitioning
  scheme. Data is partitioned by static values of a particular column in
  the schema. Partition keys are represented in the form $key=$value in
  directory names. Field order is ignored, as are missing or unrecognized
  field names.
  For example, given schema<year:int16, month:int8, day:int8>, a possible
  path would be "/year=2009/month=11/day=15" (but the field order does not
  need to match).
- "FilenamePartitioning": this scheme expects the partitions will have
  filenames containing the field values separated by "_".
  For example, given schema<year:int16, month:int8, day:int8>, a possible
  partition filename "2009_11_part-0.parquet" would be parsed
  to ("year"_ == 2009 and "month"_ == 11).

Parameters
----------
schema : pyarrow.Schema, default None
    The schema that describes the partitions present in the file path.
    If not specified, and `field_names` and/or `flavor` are specified,
    the schema will be inferred from the file path (and a
    PartitioningFactory is returned).
field_names :  list of str, default None
    A list of strings (field names). If specified, the schema's types are
    inferred from the file paths (only valid for DirectoryPartitioning).
flavor : str, default None
    The default is DirectoryPartitioning. Specify ``flavor="hive"`` for
    a HivePartitioning, and ``flavor="filename"`` for a
    FilenamePartitioning.
dictionaries : dict[str, Array]
    If the type of any field of `schema` is a dictionary type, the
    corresponding entry of `dictionaries` must be an array containing
    every value which may be taken by the corresponding column or an
    error will be raised in parsing. Alternatively, pass `infer` to have
    Arrow discover the dictionary values, in which case a
    PartitioningFactory is returned.

Returns
-------
Partitioning or PartitioningFactory
    The partitioning scheme

Examples
--------

Specify the Schema for paths like "/2009/June":

>>> import pyarrow as pa
>>> import pyarrow.dataset as ds
>>> part = ds.partitioning(pa.schema([("year", pa.int16()),
...                                   ("month", pa.string())]))

or let the types be inferred by only specifying the field names:

>>> part =  ds.partitioning(field_names=["year", "month"])

For paths like "/2009/June", the year will be inferred as int32 while month
will be inferred as string.

Specify a Schema with dictionary encoding, providing dictionary values:

>>> part = ds.partitioning(
...     pa.schema([
...         ("year", pa.int16()),
...         ("month", pa.dictionary(pa.int8(), pa.string()))
...     ]),
...     dictionaries={
...         "month": pa.array(["January", "February", "March"]),
...     })

Alternatively, specify a Schema with dictionary encoding, but have Arrow
infer the dictionary values:

>>> part = ds.partitioning(
...     pa.schema([
...         ("year", pa.int16()),
...         ("month", pa.dictionary(pa.int8(), pa.string()))
...     ]),
...     dictionaries="infer")

Create a Hive scheme for a path like "/year=2009/month=11":

>>> part = ds.partitioning(
...     pa.schema([("year", pa.int16()), ("month", pa.int8())]),
...     flavor="hive")

A Hive scheme can also be discovered from the directory structure (and
types will be inferred):

>>> part = ds.partitioning(flavor="hive")

---
## _ensure_partitioning
```python
from dataset import _ensure_partitioning
```

Validate input and return a Partitioning(Factory).

It passes None through if no partitioning scheme is defined.

---
## _ensure_format
```python
from dataset import _ensure_format
```



---
## _ensure_multiple_sources
```python
from dataset import _ensure_multiple_sources
```

Treat a list of paths as files belonging to a single file system

If the file system is local then also validates that all paths
are referencing existing *files* otherwise any non-file paths will be
silently skipped (for example on a remote filesystem).

Parameters
----------
paths : list of path-like
    Note that URIs are not allowed.
filesystem : FileSystem or str, optional
    If an URI is passed, then its path component will act as a prefix for
    the file paths.

Returns
-------
(FileSystem, list of str)
    File system object and a list of normalized paths.

Raises
------
TypeError
    If the passed filesystem has wrong type.
IOError
    If the file system is local and a referenced path is not available or
    not a file.

---
## _ensure_single_source
```python
from dataset import _ensure_single_source
```

Treat path as either a recursively traversable directory or a single file.

Parameters
----------
path : path-like
filesystem : FileSystem or str, optional
    If an URI is passed, then its path component will act as a prefix for
    the file paths.

Returns
-------
(FileSystem, list of str or fs.Selector)
    File system object and either a single item list pointing to a file or
    an fs.Selector object pointing to a directory.

Raises
------
TypeError
    If the passed filesystem has wrong type.
FileNotFoundError
    If the referenced file or directory doesn't exist.

---
## _filesystem_dataset
```python
from dataset import _filesystem_dataset
```

Create a FileSystemDataset which can be used to build a Dataset.

Parameters are documented in the dataset function.

Returns
-------
FileSystemDataset

---
## _in_memory_dataset
```python
from dataset import _in_memory_dataset
```



---
## _union_dataset
```python
from dataset import _union_dataset
```



---
## parquet_dataset
```python
from dataset import parquet_dataset
```

Create a FileSystemDataset from a `_metadata` file created via
`pyarrow.parquet.write_metadata`.

Parameters
----------
metadata_path : path,
    Path pointing to a single file parquet metadata file
schema : Schema, optional
    Optionally provide the Schema for the Dataset, in which case it will
    not be inferred from the source.
filesystem : FileSystem or URI string, default None
    If a single path is given as source and filesystem is None, then the
    filesystem will be inferred from the path.
    If an URI string is passed, then a filesystem object is constructed
    using the URI's optional path component as a directory prefix. See the
    examples below.
    Note that the URIs on Windows must follow 'file:///C:...' or
    'file:/C:...' patterns.
format : ParquetFileFormat
    An instance of a ParquetFileFormat if special options needs to be
    passed.
partitioning : Partitioning, PartitioningFactory, str, list of str
    The partitioning scheme specified with the ``partitioning()``
    function. A flavor string can be used as shortcut, and with a list of
    field names a DirectoryPartitioning will be inferred.
partition_base_dir : str, optional
    For the purposes of applying the partitioning, paths will be
    stripped of the partition_base_dir. Files not matching the
    partition_base_dir prefix will be skipped for partitioning discovery.
    The ignored files will still be part of the Dataset, but will not
    have partition information.

Returns
-------
FileSystemDataset
    The dataset corresponding to the given metadata

---
## dataset
```python
from dataset import dataset
```

Open a dataset.

Datasets provides functionality to efficiently work with tabular,
potentially larger than memory and multi-file dataset.

- A unified interface for different sources, like Parquet and Feather
- Discovery of sources (crawling directories, handle directory-based
  partitioned datasets, basic schema normalization)
- Optimized reading with predicate pushdown (filtering rows), projection
  (selecting columns), parallel reading or fine-grained managing of tasks.

Note that this is the high-level API, to have more control over the dataset
construction use the low-level API classes (FileSystemDataset,
FilesystemDatasetFactory, etc.)

Parameters
----------
source : path, list of paths, dataset, list of datasets, (list of) RecordBatch or Table, iterable of RecordBatch, RecordBatchReader, or URI
    Path pointing to a single file:
        Open a FileSystemDataset from a single file.
    Path pointing to a directory:
        The directory gets discovered recursively according to a
        partitioning scheme if given.
    List of file paths:
        Create a FileSystemDataset from explicitly given files. The files
        must be located on the same filesystem given by the filesystem
        parameter.
        Note that in contrary of construction from a single file, passing
        URIs as paths is not allowed.
    List of datasets:
        A nested UnionDataset gets constructed, it allows arbitrary
        composition of other datasets.
        Note that additional keyword arguments are not allowed.
    (List of) batches or tables, iterable of batches, or RecordBatchReader:
        Create an InMemoryDataset. If an iterable or empty list is given,
        a schema must also be given. If an iterable or RecordBatchReader
        is given, the resulting dataset can only be scanned once; further
        attempts will raise an error.
schema : Schema, optional
    Optionally provide the Schema for the Dataset, in which case it will
    not be inferred from the source.
format : FileFormat or str
    Currently "parquet", "ipc"/"arrow"/"feather", "csv", "json", and "orc" are
    supported. For Feather, only version 2 files are supported.
filesystem : FileSystem or URI string, default None
    If a single path is given as source and filesystem is None, then the
    filesystem will be inferred from the path.
    If an URI string is passed, then a filesystem object is constructed
    using the URI's optional path component as a directory prefix. See the
    examples below.
    Note that the URIs on Windows must follow 'file:///C:...' or
    'file:/C:...' patterns.
partitioning : Partitioning, PartitioningFactory, str, list of str
    The partitioning scheme specified with the ``partitioning()``
    function. A flavor string can be used as shortcut, and with a list of
    field names a DirectoryPartitioning will be inferred.
partition_base_dir : str, optional
    For the purposes of applying the partitioning, paths will be
    stripped of the partition_base_dir. Files not matching the
    partition_base_dir prefix will be skipped for partitioning discovery.
    The ignored files will still be part of the Dataset, but will not
    have partition information.
exclude_invalid_files : bool, optional (default True)
    If True, invalid files will be excluded (file format specific check).
    This will incur IO for each files in a serial and single threaded
    fashion. Disabling this feature will skip the IO, but unsupported
    files may be present in the Dataset (resulting in an error at scan
    time).
ignore_prefixes : list, optional
    Files matching any of these prefixes will be ignored by the
    discovery process. This is matched to the basename of a path.
    By default this is ['.', '_'].
    Note that discovery happens only if a directory is passed as source.

Returns
-------
dataset : Dataset
    Either a FileSystemDataset or a UnionDataset depending on the source
    parameter.

Examples
--------
Creating an example Table:

>>> import pyarrow as pa
>>> import pyarrow.parquet as pq
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> pq.write_table(table, "file.parquet")

Opening a single file:

>>> import pyarrow.dataset as ds
>>> dataset = ds.dataset("file.parquet", format="parquet")
>>> dataset.to_table()
pyarrow.Table
year: int64
n_legs: int64
animal: string
----
year: [[2020,2022,2021,2022,2019,2021]]
n_legs: [[2,2,4,4,5,100]]
animal: [["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]]

Opening a single file with an explicit schema:

>>> myschema = pa.schema([
...     ('n_legs', pa.int64()),
...     ('animal', pa.string())])
>>> dataset = ds.dataset("file.parquet", schema=myschema, format="parquet")
>>> dataset.to_table()
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[2,2,4,4,5,100]]
animal: [["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]]

Opening a dataset for a single directory:

>>> ds.write_dataset(table, "partitioned_dataset", format="parquet",
...                  partitioning=['year'])
>>> dataset = ds.dataset("partitioned_dataset", format="parquet")
>>> dataset.to_table()
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[5],[2],[4,100],[2,4]]
animal: [["Brittle stars"],["Flamingo"],...["Parrot","Horse"]]

For a single directory from a S3 bucket:

>>> ds.dataset("s3://mybucket/nyc-taxi/",
...            format="parquet") # doctest: +SKIP

Opening a dataset from a list of relatives local paths:

>>> dataset = ds.dataset([
...     "partitioned_dataset/2019/part-0.parquet",
...     "partitioned_dataset/2020/part-0.parquet",
...     "partitioned_dataset/2021/part-0.parquet",
... ], format='parquet')
>>> dataset.to_table()
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[5],[2],[4,100]]
animal: [["Brittle stars"],["Flamingo"],["Dog","Centipede"]]

With filesystem provided:

>>> paths = [
...     'part0/data.parquet',
...     'part1/data.parquet',
...     'part3/data.parquet',
... ]
>>> ds.dataset(paths, filesystem='file:///directory/prefix,
...            format='parquet') # doctest: +SKIP

Which is equivalent with:

>>> fs = SubTreeFileSystem("/directory/prefix",
...                        LocalFileSystem()) # doctest: +SKIP
>>> ds.dataset(paths, filesystem=fs, format='parquet') # doctest: +SKIP

With a remote filesystem URI:

>>> paths = [
...     'nested/directory/part0/data.parquet',
...     'nested/directory/part1/data.parquet',
...     'nested/directory/part3/data.parquet',
... ]
>>> ds.dataset(paths, filesystem='s3://bucket/',
...            format='parquet') # doctest: +SKIP

Similarly to the local example, the directory prefix may be included in the
filesystem URI:

>>> ds.dataset(paths, filesystem='s3://bucket/nested/directory',
...         format='parquet') # doctest: +SKIP

Construction of a nested dataset:

>>> ds.dataset([
...     dataset("s3://old-taxi-data", format="parquet"),
...     dataset("local/path/to/data", format="ipc")
... ]) # doctest: +SKIP

---
## _ensure_write_partitioning
```python
from dataset import _ensure_write_partitioning
```



---
## write_dataset
```python
from dataset import write_dataset
```

Write a dataset to a given format and partitioning.

Parameters
----------
data : Dataset, Table/RecordBatch, RecordBatchReader, list of Table/RecordBatch, or iterable of RecordBatch
    The data to write. This can be a Dataset instance or
    in-memory Arrow data. If an iterable is given, the schema must
    also be given.
base_dir : str
    The root directory where to write the dataset.
basename_template : str, optional
    A template string used to generate basenames of written data files.
    The token '{i}' will be replaced with an automatically incremented
    integer. If not specified, it defaults to
    "part-{i}." + format.default_extname
format : FileFormat or str
    The format in which to write the dataset. Currently supported:
    "parquet", "ipc"/"arrow"/"feather", and "csv". If a FileSystemDataset
    is being written and `format` is not specified, it defaults to the
    same format as the specified FileSystemDataset. When writing a
    Table or RecordBatch, this keyword is required.
partitioning : Partitioning or list[str], optional
    The partitioning scheme specified with the ``partitioning()``
    function or a list of field names. When providing a list of
    field names, you can use ``partitioning_flavor`` to drive which
    partitioning type should be used.
partitioning_flavor : str, optional
    One of the partitioning flavors supported by
    ``pyarrow.dataset.partitioning``. If omitted will use the
    default of ``partitioning()`` which is directory partitioning.
schema : Schema, optional
filesystem : FileSystem, optional
file_options : pyarrow.dataset.FileWriteOptions, optional
    FileFormat specific write options, created using the
    ``FileFormat.make_write_options()`` function.
use_threads : bool, default True
    Write files in parallel. If enabled, then maximum parallelism will be
    used determined by the number of available CPU cores.
max_partitions : int, default 1024
    Maximum number of partitions any batch may be written into.
max_open_files : int, default 1024
    If greater than 0 then this will limit the maximum number of
    files that can be left open. If an attempt is made to open
    too many files then the least recently used file will be closed.
    If this setting is set too low you may end up fragmenting your
    data into many small files.
max_rows_per_file : int, default 0
    Maximum number of rows per file. If greater than 0 then this will
    limit how many rows are placed in any single file. Otherwise there
    will be no limit and one file will be created in each output
    directory unless files need to be closed to respect max_open_files
min_rows_per_group : int, default 0
    Minimum number of rows per group. When the value is greater than 0,
    the dataset writer will batch incoming data and only write the row
    groups to the disk when sufficient rows have accumulated.
max_rows_per_group : int, default 1024 * 1024
    Maximum number of rows per group. If the value is greater than 0,
    then the dataset writer may split up large incoming batches into
    multiple row groups.  If this value is set, then min_rows_per_group
    should also be set. Otherwise it could end up with very small row
    groups.
file_visitor : function
    If set, this function will be called with a WrittenFile instance
    for each file created during the call.  This object will have both
    a path attribute and a metadata attribute.

    The path attribute will be a string containing the path to
    the created file.

    The metadata attribute will be the parquet metadata of the file.
    This metadata will have the file path attribute set and can be used
    to build a _metadata file.  The metadata attribute will be None if
    the format is not parquet.

    Example visitor which simple collects the filenames created::

        visited_paths = []

        def file_visitor(written_file):
            visited_paths.append(written_file.path)
existing_data_behavior : 'error' | 'overwrite_or_ignore' | 'delete_matching'
    Controls how the dataset will handle data that already exists in
    the destination.  The default behavior ('error') is to raise an error
    if any data exists in the destination.

    'overwrite_or_ignore' will ignore any existing data and will
    overwrite files with the same name as an output file.  Other
    existing files will be ignored.  This behavior, in combination
    with a unique basename_template for each write, will allow for
    an append workflow.

    'delete_matching' is useful when you are writing a partitioned
    dataset.  The first time each partition directory is encountered
    the entire directory will be deleted.  This allows you to overwrite
    old partitions completely.
create_dir : bool, default True
    If False, directories will not be created.  This can be useful for
    filesystems that do not require directories.

---
## __name__
```python
from cuda import __name__
```



---
## __name__
```python
from feather import __name__
```



---
## FeatherDataset
```python
from feather import FeatherDataset
```

Encapsulates details of reading a list of Feather files.

Parameters
----------
path_or_paths : List[str]
    A list of file names
validate_schema : bool, default True
    Check that individual file schemas are all the same / compatible

---
## check_chunked_overflow
```python
from feather import check_chunked_overflow
```



---
## write_feather
```python
from feather import write_feather
```

Write a pandas.DataFrame to Feather format.

Parameters
----------
df : pandas.DataFrame or pyarrow.Table
    Data to write out as Feather format.
dest : str
    Local destination path.
compression : string, default None
    Can be one of {"zstd", "lz4", "uncompressed"}. The default of None uses
    LZ4 for V2 files if it is available, otherwise uncompressed.
compression_level : int, default None
    Use a compression level particular to the chosen compressor. If None
    use the default compression level
chunksize : int, default None
    For V2 files, the internal maximum size of Arrow RecordBatch chunks
    when writing the Arrow IPC file format. None means use the default,
    which is currently 64K
version : int, default 2
    Feather file version. Version 2 is the current. Version 1 is the more
    limited legacy format

---
## read_feather
```python
from feather import read_feather
```

Read a pandas.DataFrame from Feather format. To read as pyarrow.Table use
feather.read_table.

Parameters
----------
source : str file path, or file-like object
    You can use MemoryMappedFile as source, for explicitly use memory map.
columns : sequence, optional
    Only read a specific set of columns. If not provided, all columns are
    read.
use_threads : bool, default True
    Whether to parallelize reading using multiple threads. If false the
    restriction is used in the conversion to Pandas as well as in the
    reading from Feather format.
memory_map : boolean, default False
    Use memory mapping when opening file on disk, when source is a str.
**kwargs
    Additional keyword arguments passed on to `pyarrow.Table.to_pandas`.

Returns
-------
df : pandas.DataFrame
    The contents of the Feather file as a pandas.DataFrame

---
## read_table
```python
from feather import read_table
```

Read multiple feather files as a single pyarrow.Table

Parameters
----------
columns : List[str]
    Names of columns to read from the file

Returns
-------
pyarrow.Table
    Content of the file as a table (of columns)

---
## __init__
```python
from feather import __init__
```



---
## validate_schemas
```python
from feather import validate_schemas
```



---
## read_pandas
```python
from feather import read_pandas
```

Read multiple Parquet files as a single pandas DataFrame

Parameters
----------
columns : List[str]
    Names of columns to read from the file
use_threads : bool, default True
    Use multiple threads when converting to pandas

Returns
-------
pandas.DataFrame
    Content of the file as a pandas DataFrame (of columns)

---
## __name__
```python
from pandas_compat import __name__
```



---
## get_logical_type_map
```python
from pandas_compat import get_logical_type_map
```



---
## get_logical_type
```python
from pandas_compat import get_logical_type
```



---
## get_logical_type_from_numpy
```python
from pandas_compat import get_logical_type_from_numpy
```



---
## get_extension_dtype_info
```python
from pandas_compat import get_extension_dtype_info
```



---
## get_column_metadata
```python
from pandas_compat import get_column_metadata
```

Construct the metadata for a given column

Parameters
----------
column : pandas.Series or pandas.Index
name : str
arrow_type : pyarrow.DataType
field_name : str
    Equivalent to `name` when `column` is a `Series`, otherwise if `column`
    is a pandas Index then `field_name` will not be the same as `name`.
    This is the name of the field in the arrow Table's schema.

Returns
-------
dict

---
## construct_metadata
```python
from pandas_compat import construct_metadata
```

Returns a dictionary containing enough metadata to reconstruct a pandas
DataFrame as an Arrow Table, including index columns.

Parameters
----------
columns_to_convert : list[pd.Series]
df : pandas.DataFrame
index_levels : List[pd.Index]
index_descriptors : List[Dict]
preserve_index : bool
types : List[pyarrow.DataType]

Returns
-------
dict

---
## _get_simple_index_descriptor
```python
from pandas_compat import _get_simple_index_descriptor
```



---
## _column_name_to_strings
```python
from pandas_compat import _column_name_to_strings
```

Convert a column name (or level) to either a string or a recursive
collection of strings.

Parameters
----------
name : str or tuple

Returns
-------
value : str or tuple

Examples
--------
>>> name = 'foo'
>>> _column_name_to_strings(name)
'foo'
>>> name = ('foo', 'bar')
>>> _column_name_to_strings(name)
"('foo', 'bar')"
>>> import pandas as pd
>>> name = (1, pd.Timestamp('2017-02-01 00:00:00'))
>>> _column_name_to_strings(name)
"('1', '2017-02-01 00:00:00')"

---
## _index_level_name
```python
from pandas_compat import _index_level_name
```

Return the name of an index level or a default name if `index.name` is
None or is already a column name.

Parameters
----------
index : pandas.Index
i : int

Returns
-------
name : str

---
## _get_columns_to_convert
```python
from pandas_compat import _get_columns_to_convert
```



---
## _get_columns_to_convert_given_schema
```python
from pandas_compat import _get_columns_to_convert_given_schema
```

Specialized version of _get_columns_to_convert in case a Schema is
specified.
In that case, the Schema is used as the single point of truth for the
table structure (types, which columns are included, order of columns, ...).

---
## _get_index_level
```python
from pandas_compat import _get_index_level
```

Get the index level of a DataFrame given 'name' (column name in an arrow
Schema).

---
## _level_name
```python
from pandas_compat import _level_name
```



---
## _get_range_index_descriptor
```python
from pandas_compat import _get_range_index_descriptor
```



---
## _get_index_level_values
```python
from pandas_compat import _get_index_level_values
```



---
## _resolve_columns_of_interest
```python
from pandas_compat import _resolve_columns_of_interest
```



---
## dataframe_to_types
```python
from pandas_compat import dataframe_to_types
```



---
## dataframe_to_arrays
```python
from pandas_compat import dataframe_to_arrays
```



---
## get_datetimetz_type
```python
from pandas_compat import get_datetimetz_type
```



---
## _reconstruct_block
```python
from pandas_compat import _reconstruct_block
```

Construct a pandas Block from the `item` dictionary coming from pyarrow's
serialization or returned by arrow::python::ConvertTableToPandas.

This function takes care of converting dictionary types to pandas
categorical, Timestamp-with-timezones to the proper pandas Block, and
conversion to pandas ExtensionBlock

Parameters
----------
item : dict
    For basic types, this is a dictionary in the form of
    {'block': np.ndarray of values, 'placement': pandas block placement}.
    Additional keys are present for other types (dictionary, timezone,
    object).
columns :
    Column names of the table being constructed, used for extension types
extension_columns : dict
    Dictionary of {column_name: pandas_dtype} that includes all columns
    and corresponding dtypes that will be converted to a pandas
    ExtensionBlock.

Returns
-------
pandas Block

---
## make_datetimetz
```python
from pandas_compat import make_datetimetz
```



---
## table_to_dataframe
```python
from pandas_compat import table_to_dataframe
```



---
## _get_extension_dtypes
```python
from pandas_compat import _get_extension_dtypes
```

Based on the stored column pandas metadata and the extension types
in the arrow schema, infer which columns should be converted to a
pandas extension dtype.

The 'numpy_type' field in the column metadata stores the string
representation of the original pandas dtype (and, despite its name,
not the 'pandas_type' field).
Based on this string representation, a pandas/numpy dtype is constructed
and then we can check if this dtype supports conversion from arrow.

---
## _check_data_column_metadata_consistency
```python
from pandas_compat import _check_data_column_metadata_consistency
```



---
## _deserialize_column_index
```python
from pandas_compat import _deserialize_column_index
```



---
## _reconstruct_index
```python
from pandas_compat import _reconstruct_index
```



---
## _extract_index_level
```python
from pandas_compat import _extract_index_level
```



---
## _backwards_compatible_index_name
```python
from pandas_compat import _backwards_compatible_index_name
```

Compute the name of an index column that is compatible with older
versions of :mod:`pyarrow`.

Parameters
----------
raw_name : str
logical_name : str

Returns
-------
result : str

Notes
-----
* Part of :func:`~pyarrow.pandas_compat.table_to_blockmanager`

---
## _is_generated_index_name
```python
from pandas_compat import _is_generated_index_name
```



---
## _pandas_type_to_numpy_type
```python
from pandas_compat import _pandas_type_to_numpy_type
```

Get the numpy dtype that corresponds to a pandas type.

Parameters
----------
pandas_type : str
    The result of a call to pandas.lib.infer_dtype.

Returns
-------
dtype : np.dtype
    The dtype that corresponds to `pandas_type`.

---
## _reconstruct_columns_from_metadata
```python
from pandas_compat import _reconstruct_columns_from_metadata
```

Construct a pandas MultiIndex from `columns` and column index metadata
in `column_indexes`.

Parameters
----------
columns : List[pd.Index]
    The columns coming from a pyarrow.Table
column_indexes : List[Dict[str, str]]
    The column index metadata deserialized from the JSON schema metadata
    in a :class:`~pyarrow.Table`.

Returns
-------
result : MultiIndex
    The index reconstructed using `column_indexes` metadata with levels of
    the correct type.

Notes
-----
* Part of :func:`~pyarrow.pandas_compat.table_to_blockmanager`

---
## _add_any_metadata
```python
from pandas_compat import _add_any_metadata
```



---
## make_tz_aware
```python
from pandas_compat import make_tz_aware
```

Make a datetime64 Series timezone-aware for the given tz

---
## convert_column
```python
from pandas_compat import convert_column
```



---
## _can_definitely_zero_copy
```python
from pandas_compat import _can_definitely_zero_copy
```



---
## __name__
```python
from fs import __name__
```

FileSystem abstraction to interact with various local and remote filesystems.

---
## __getattr__
```python
from fs import __getattr__
```



---
## _filesystem_from_str
```python
from fs import _filesystem_from_str
```



---
## _ensure_filesystem
```python
from fs import _ensure_filesystem
```



---
## _resolve_filesystem_and_path
```python
from fs import _resolve_filesystem_and_path
```

Return filesystem/path from path which could be an URI or a plain
filesystem path.

---
## copy_files
```python
from fs import copy_files
```

Copy files between FileSystems.

This functions allows you to recursively copy directories of files from
one file system to another, such as from S3 to your local machine.

Parameters
----------
source : string
    Source file path or URI to a single file or directory.
    If a directory, files will be copied recursively from this path.
destination : string
    Destination file path or URI. If `source` is a file, `destination`
    is also interpreted as the destination file (not directory).
    Directories will be created as necessary.
source_filesystem : FileSystem, optional
    Source filesystem, needs to be specified if `source` is not a URI,
    otherwise inferred.
destination_filesystem : FileSystem, optional
    Destination filesystem, needs to be specified if `destination` is not
    a URI, otherwise inferred.
chunk_size : int, default 1MB
    The maximum size of block to read before flushing to the
    destination file. A larger chunk_size will use more memory while
    copying but may help accommodate high latency FileSystems.
use_threads : bool, default True
    Whether to use multiple threads to accelerate copying.

Examples
--------
Inspect an S3 bucket's files:

>>> s3, path = fs.FileSystem.from_uri(
...            "s3://registry.opendata.aws/roda/ndjson/")
>>> selector = fs.FileSelector(path)
>>> s3.get_file_info(selector)
[<FileInfo for 'registry.opendata.aws/roda/ndjson/index.ndjson':...]

Copy one file from S3 bucket to a local directory:

>>> fs.copy_files("s3://registry.opendata.aws/roda/ndjson/index.ndjson",
...               "file:///{}/index_copy.ndjson".format(local_path))

>>> fs.LocalFileSystem().get_file_info(str(local_path)+
...                                    '/index_copy.ndjson')
<FileInfo for '.../index_copy.ndjson': type=FileType.File, size=...>

Copy file using a FileSystem object:

>>> fs.copy_files("registry.opendata.aws/roda/ndjson/index.ndjson",
...               "file:///{}/index_copy.ndjson".format(local_path),
...               source_filesystem=fs.S3FileSystem())

---
## FSSpecHandler
```python
from fs import FSSpecHandler
```

Handler for fsspec-based Python filesystems.

https://filesystem-spec.readthedocs.io/en/latest/index.html

Parameters
----------
fs : FSSpec-compliant filesystem instance

Examples
--------
>>> PyFileSystem(FSSpecHandler(fsspec_fs)) # doctest: +SKIP

---
## __init__
```python
from fs import __init__
```



---
## __eq__
```python
from fs import __eq__
```



---
## __ne__
```python
from fs import __ne__
```



---
## get_type_name
```python
from fs import get_type_name
```



---
## normalize_path
```python
from fs import normalize_path
```



---
## _create_file_info
```python
from fs import _create_file_info
```



---
## get_file_info
```python
from fs import get_file_info
```



---
## get_file_info_selector
```python
from fs import get_file_info_selector
```



---
## create_dir
```python
from fs import create_dir
```



---
## delete_dir
```python
from fs import delete_dir
```



---
## _delete_dir_contents
```python
from fs import _delete_dir_contents
```



---
## delete_dir_contents
```python
from fs import delete_dir_contents
```



---
## delete_root_dir_contents
```python
from fs import delete_root_dir_contents
```



---
## delete_file
```python
from fs import delete_file
```



---
## move
```python
from fs import move
```



---
## copy_file
```python
from fs import copy_file
```



---
## open_input_stream
```python
from fs import open_input_stream
```



---
## open_input_file
```python
from fs import open_input_file
```



---
## open_output_stream
```python
from fs import open_output_stream
```



---
## open_append_stream
```python
from fs import open_append_stream
```



---
## __name__
```python
from acero import __name__
```



---
## _dataset_to_decl
```python
from acero import _dataset_to_decl
```



---
## _perform_join
```python
from acero import _perform_join
```

Perform join of two tables or datasets.

The result will be an output table with the result of the join operation

Parameters
----------
join_type : str
    One of supported join types.
left_operand : Table or Dataset
    The left operand for the join operation.
left_keys : str or list[str]
    The left key (or keys) on which the join operation should be performed.
right_operand : Table or Dataset
    The right operand for the join operation.
right_keys : str or list[str]
    The right key (or keys) on which the join operation should be performed.
left_suffix : str, default None
    Which suffix to add to left column names. This prevents confusion
    when the columns in left and right operands have colliding names.
right_suffix : str, default None
    Which suffix to add to the right column names. This prevents confusion
    when the columns in left and right operands have colliding names.
use_threads : bool, default True
    Whether to use multithreading or not.
coalesce_keys : bool, default False
    If the duplicated keys should be omitted from one of the sides
    in the join result.
output_type: Table or InMemoryDataset
    The output type for the exec plan result.

Returns
-------
result_table : Table or InMemoryDataset

---
## _perform_join_asof
```python
from acero import _perform_join_asof
```

Perform asof join of two tables or datasets.

The result will be an output table with the result of the join operation

Parameters
----------
left_operand : Table or Dataset
    The left operand for the join operation.
left_on : str
    The left key (or keys) on which the join operation should be performed.
left_by: str or list[str]
    The left key (or keys) on which the join operation should be performed.
right_operand : Table or Dataset
    The right operand for the join operation.
right_on : str or list[str]
    The right key (or keys) on which the join operation should be performed.
right_by: str or list[str]
    The right key (or keys) on which the join operation should be performed.
tolerance : int
    The tolerance to use for the asof join. The tolerance is interpreted in
    the same units as the "on" key.
output_type: Table or InMemoryDataset
    The output type for the exec plan result.

Returns
-------
result_table : Table or InMemoryDataset

---
## _filter_table
```python
from acero import _filter_table
```

Filter rows of a table based on the provided expression.

The result will be an output table with only the rows matching
the provided expression.

Parameters
----------
table : Table or RecordBatch
    Table that should be filtered.
expression : Expression
    The expression on which rows should be filtered.

Returns
-------
Table

---
## _sort_source
```python
from acero import _sort_source
```



---
## _group_by
```python
from acero import _group_by
```



---
## DatasetModuleStub
```python
from acero import DatasetModuleStub
```



---
## Dataset
```python
from acero import Dataset
```



---
## InMemoryDataset
```python
from acero import InMemoryDataset
```



---
## __name__
```python
from csv import __name__
```



---
## __name__
```python
from jvm import __name__
```

pygments.lexers.jvm
~~~~~~~~~~~~~~~~~~~

Pygments lexers for JVM languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _JvmBufferNanny
```python
from jvm import _JvmBufferNanny
```

An object that keeps a org.apache.arrow.memory.ArrowBuf's underlying
memory alive.

---
## jvm_buffer
```python
from jvm import jvm_buffer
```

Construct an Arrow buffer from org.apache.arrow.memory.ArrowBuf

Parameters
----------

jvm_buf: org.apache.arrow.memory.ArrowBuf
    Arrow Buffer representation on the JVM.

Returns
-------
pyarrow.Buffer
    Python Buffer that references the JVM memory.

---
## _from_jvm_int_type
```python
from jvm import _from_jvm_int_type
```

Convert a JVM int type to its Python equivalent.

Parameters
----------
jvm_type : org.apache.arrow.vector.types.pojo.ArrowType$Int

Returns
-------
typ : pyarrow.DataType

---
## _from_jvm_float_type
```python
from jvm import _from_jvm_float_type
```

Convert a JVM float type to its Python equivalent.

Parameters
----------
jvm_type: org.apache.arrow.vector.types.pojo.ArrowType$FloatingPoint

Returns
-------
typ: pyarrow.DataType

---
## _from_jvm_time_type
```python
from jvm import _from_jvm_time_type
```

Convert a JVM time type to its Python equivalent.

Parameters
----------
jvm_type: org.apache.arrow.vector.types.pojo.ArrowType$Time

Returns
-------
typ: pyarrow.DataType

---
## _from_jvm_timestamp_type
```python
from jvm import _from_jvm_timestamp_type
```

Convert a JVM timestamp type to its Python equivalent.

Parameters
----------
jvm_type: org.apache.arrow.vector.types.pojo.ArrowType$Timestamp

Returns
-------
typ: pyarrow.DataType

---
## _from_jvm_date_type
```python
from jvm import _from_jvm_date_type
```

Convert a JVM date type to its Python equivalent

Parameters
----------
jvm_type: org.apache.arrow.vector.types.pojo.ArrowType$Date

Returns
-------
typ: pyarrow.DataType

---
## field
```python
from jvm import field
```

Construct a Field from a org.apache.arrow.vector.types.pojo.Field
instance.

Parameters
----------
jvm_field: org.apache.arrow.vector.types.pojo.Field

Returns
-------
pyarrow.Field

---
## schema
```python
from jvm import schema
```

Construct a Schema from a org.apache.arrow.vector.types.pojo.Schema
instance.

Parameters
----------
jvm_schema: org.apache.arrow.vector.types.pojo.Schema

Returns
-------
pyarrow.Schema

---
## array
```python
from jvm import array
```

Construct an (Python) Array from its JVM equivalent.

Parameters
----------
jvm_array : org.apache.arrow.vector.ValueVector

Returns
-------
array : Array

---
## record_batch
```python
from jvm import record_batch
```

Construct a (Python) RecordBatch from a JVM VectorSchemaRoot

Parameters
----------
jvm_vector_schema_root : org.apache.arrow.vector.VectorSchemaRoot

Returns
-------
record_batch: pyarrow.RecordBatch

---
## __init__
```python
from jvm import __init__
```



---
## __del__
```python
from jvm import __del__
```



---
## __name__
```python
from compute import __name__
```



---
## _get_arg_names
```python
from compute import _get_arg_names
```



---
## _scrape_options_class_doc
```python
from compute import _scrape_options_class_doc
```



---
## _decorate_compute_function
```python
from compute import _decorate_compute_function
```



---
## _get_options_class
```python
from compute import _get_options_class
```



---
## _handle_options
```python
from compute import _handle_options
```



---
## _make_generic_wrapper
```python
from compute import _make_generic_wrapper
```



---
## _make_signature
```python
from compute import _make_signature
```



---
## _wrap_function
```python
from compute import _wrap_function
```



---
## _make_global_functions
```python
from compute import _make_global_functions
```

Make global functions wrapping each compute function.

Note that some of the automatically-generated wrappers may be overridden
by custom versions below.

---
## cast
```python
from compute import cast
```

Cast array values to another data type. Can also be invoked as an array
instance method.

Parameters
----------
arr : Array-like
target_type : DataType or str
    Type to cast to
safe : bool, default True
    Check for overflows or other unsafe conversions
options : CastOptions, default None
    Additional checks pass by CastOptions
memory_pool : MemoryPool, optional
    memory pool to use for allocations during function execution.

Examples
--------
>>> from datetime import datetime
>>> import pyarrow as pa
>>> arr = pa.array([datetime(2010, 1, 1), datetime(2015, 1, 1)])
>>> arr.type
TimestampType(timestamp[us])

You can use ``pyarrow.DataType`` objects to specify the target type:

>>> cast(arr, pa.timestamp('ms'))
<pyarrow.lib.TimestampArray object at ...>
[
  2010-01-01 00:00:00.000,
  2015-01-01 00:00:00.000
]

>>> cast(arr, pa.timestamp('ms')).type
TimestampType(timestamp[ms])

Alternatively, it is also supported to use the string aliases for these
types:

>>> arr.cast('timestamp[ms]')
<pyarrow.lib.TimestampArray object at ...>
[
  2010-01-01 00:00:00.000,
  2015-01-01 00:00:00.000
]
>>> arr.cast('timestamp[ms]').type
TimestampType(timestamp[ms])

Returns
-------
casted : Array
    The cast result as a new Array

---
## index
```python
from compute import index
```

Find the index of the first occurrence of a given value.

Parameters
----------
data : Array-like
value : Scalar-like object
    The value to search for.
start : int, optional
end : int, optional
memory_pool : MemoryPool, optional
    If not passed, will allocate memory from the default memory pool.

Returns
-------
index : int
    the index, or -1 if not found

---
## take
```python
from compute import take
```

Select values (or records) from array- or table-like data given integer
selection indices.

The result will be of the same type(s) as the input, with elements taken
from the input array (or record batch / table fields) at the given
indices. If an index is null then the corresponding value in the output
will be null.

Parameters
----------
data : Array, ChunkedArray, RecordBatch, or Table
indices : Array, ChunkedArray
    Must be of integer type
boundscheck : boolean, default True
    Whether to boundscheck the indices. If False and there is an out of
    bounds index, will likely cause the process to crash.
memory_pool : MemoryPool, optional
    If not passed, will allocate memory from the default memory pool.

Returns
-------
result : depends on inputs
    Selected values for the given indices

Examples
--------
>>> import pyarrow as pa
>>> arr = pa.array(["a", "b", "c", None, "e", "f"])
>>> indices = pa.array([0, None, 4, 3])
>>> arr.take(indices)
<pyarrow.lib.StringArray object at ...>
[
  "a",
  null,
  "e",
  null
]

---
## fill_null
```python
from compute import fill_null
```

Replace each null element in values with a corresponding
element from fill_value.

If fill_value is scalar-like, then every null element in values
will be replaced with fill_value. If fill_value is array-like,
then the i-th element in values will be replaced with the i-th
element in fill_value.

The fill_value's type must be the same as that of values, or it
must be able to be implicitly casted to the array's type.

This is an alias for :func:`coalesce`.

Parameters
----------
values : Array, ChunkedArray, or Scalar-like object
    Each null element is replaced with the corresponding value
    from fill_value.
fill_value : Array, ChunkedArray, or Scalar-like object
    If not same type as values, will attempt to cast.

Returns
-------
result : depends on inputs
    Values with all null elements replaced

Examples
--------
>>> import pyarrow as pa
>>> arr = pa.array([1, 2, None, 3], type=pa.int8())
>>> fill_value = pa.scalar(5, type=pa.int8())
>>> arr.fill_null(fill_value)
<pyarrow.lib.Int8Array object at ...>
[
  1,
  2,
  5,
  3
]
>>> arr = pa.array([1, 2, None, 4, None])
>>> arr.fill_null(pa.array([10, 20, 30, 40, 50]))
<pyarrow.lib.Int64Array object at ...>
[
  1,
  2,
  30,
  4,
  50
]

---
## top_k_unstable
```python
from compute import top_k_unstable
```

Select the indices of the top-k ordered elements from array- or table-like
data.

This is a specialization for :func:`select_k_unstable`. Output is not
guaranteed to be stable.

Parameters
----------
values : Array, ChunkedArray, RecordBatch, or Table
    Data to sort and get top indices from.
k : int
    The number of `k` elements to keep.
sort_keys : List-like
    Column key names to order by when input is table-like data.
memory_pool : MemoryPool, optional
    If not passed, will allocate memory from the default memory pool.

Returns
-------
result : Array
    Indices of the top-k ordered elements

Examples
--------
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> arr = pa.array(["a", "b", "c", None, "e", "f"])
>>> pc.top_k_unstable(arr, k=3)
<pyarrow.lib.UInt64Array object at ...>
[
  5,
  4,
  2
]

---
## bottom_k_unstable
```python
from compute import bottom_k_unstable
```

Select the indices of the bottom-k ordered elements from
array- or table-like data.

This is a specialization for :func:`select_k_unstable`. Output is not
guaranteed to be stable.

Parameters
----------
values : Array, ChunkedArray, RecordBatch, or Table
    Data to sort and get bottom indices from.
k : int
    The number of `k` elements to keep.
sort_keys : List-like
    Column key names to order by when input is table-like data.
memory_pool : MemoryPool, optional
    If not passed, will allocate memory from the default memory pool.

Returns
-------
result : Array of indices
    Indices of the bottom-k ordered elements

Examples
--------
>>> import pyarrow as pa
>>> import pyarrow.compute as pc
>>> arr = pa.array(["a", "b", "c", None, "e", "f"])
>>> pc.bottom_k_unstable(arr, k=3)
<pyarrow.lib.UInt64Array object at ...>
[
  0,
  1,
  2
]

---
## random
```python
from compute import random
```

Generate numbers in the range [0, 1).

Generated values are uniformly-distributed, double-precision
in range [0, 1). Algorithm and seed can be changed via RandomOptions.

Parameters
----------
n : int
    Number of values to generate, must be greater than or equal to 0
initializer : int or str
    How to initialize the underlying random generator.
    If an integer is given, it is used as a seed.
    If "system" is given, the random generator is initialized with
    a system-specific source of (hopefully true) randomness.
    Other values are invalid.
options : pyarrow.compute.RandomOptions, optional
    Alternative way of passing options.
memory_pool : pyarrow.MemoryPool, optional
    If not passed, will allocate memory from the default memory pool.

---
## field
```python
from compute import field
```

Reference a column of the dataset.

Stores only the field's name. Type and other information is known only when
the expression is bound to a dataset having an explicit scheme.

Nested references are allowed by passing multiple names or a tuple of
names. For example ``('foo', 'bar')`` references the field named "bar"
inside the field named "foo".

Parameters
----------
*name_or_index : string, multiple strings, tuple or int
    The name or index of the (possibly nested) field the expression
    references to.

Returns
-------
field_expr : Expression
    Reference to the given field

Examples
--------
>>> import pyarrow.compute as pc
>>> pc.field("a")
<pyarrow.compute.Expression a>
>>> pc.field(1)
<pyarrow.compute.Expression FieldPath(1)>
>>> pc.field(("a", "b"))
<pyarrow.compute.Expression FieldRef.Nested(FieldRef.Name(a) ...
>>> pc.field("a", "b")
<pyarrow.compute.Expression FieldRef.Nested(FieldRef.Name(a) ...

---
## scalar
```python
from compute import scalar
```

Expression representing a scalar value.

Parameters
----------
value : bool, int, float or string
    Python value of the scalar. Note that only a subset of types are
    currently supported.

Returns
-------
scalar_expr : Expression
    An Expression representing the scalar value

---
## wrapper
```python
from compute import wrapper
```



---
## __name__
```python
from macos import __name__
```

macOS.

---
## MacOS
```python
from macos import MacOS
```

Platform directories for the macOS operating system.

Follows the guidance from
`Apple documentation <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`,
`version <platformdirs.api.PlatformDirsABC.version>`,
`ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.

---
## user_data_dir
```python
from macos import user_data_dir
```

:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``

---
## site_data_dir
```python
from macos import site_data_dir
```

:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``.
If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory
will be under the Homebrew prefix, e.g. ``/opt/homebrew/share/$appname/$version``.
If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew,
the response is a multi-path string separated by ":", e.g.
``/opt/homebrew/share/$appname/$version:/Library/Application Support/$appname/$version``

---
## site_data_path
```python
from macos import site_data_path
```

:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``

---
## user_config_dir
```python
from macos import user_config_dir
```

:return: config directory tied to the user, same as `user_data_dir`

---
## site_config_dir
```python
from macos import site_config_dir
```

:return: config directory shared by the users, same as `site_data_dir`

---
## user_cache_dir
```python
from macos import user_cache_dir
```

:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``

---
## site_cache_dir
```python
from macos import site_cache_dir
```

:return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``.
If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory
will be under the Homebrew prefix, e.g. ``/opt/homebrew/var/cache/$appname/$version``.
If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew,
the response is a multi-path string separated by ":", e.g.
``/opt/homebrew/var/cache/$appname/$version:/Library/Caches/$appname/$version``

---
## site_cache_path
```python
from macos import site_cache_path
```

:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``

---
## user_state_dir
```python
from macos import user_state_dir
```

:return: state directory tied to the user, same as `user_data_dir`

---
## user_log_dir
```python
from macos import user_log_dir
```

:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``

---
## user_documents_dir
```python
from macos import user_documents_dir
```

:return: documents directory tied to the user, e.g. ``~/Documents``

---
## user_downloads_dir
```python
from macos import user_downloads_dir
```

:return: downloads directory tied to the user, e.g. ``~/Downloads``

---
## user_pictures_dir
```python
from macos import user_pictures_dir
```

:return: pictures directory tied to the user, e.g. ``~/Pictures``

---
## user_videos_dir
```python
from macos import user_videos_dir
```

:return: videos directory tied to the user, e.g. ``~/Movies``

---
## user_music_dir
```python
from macos import user_music_dir
```

:return: music directory tied to the user, e.g. ``~/Music``

---
## user_desktop_dir
```python
from macos import user_desktop_dir
```

:return: desktop directory tied to the user, e.g. ``~/Desktop``

---
## user_runtime_dir
```python
from macos import user_runtime_dir
```

:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``

---
## site_runtime_dir
```python
from macos import site_runtime_dir
```

:return: runtime directory shared by users, same as `user_runtime_dir`

---
## __name__
```python
from unix import __name__
```

Unix.

---
## Unix
```python
from unix import Unix
```

On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-
latest.html>`_.

The spec allows overriding directories with environment variables. The examples shown are the default values,
alongside the name of the environment variable that overrides them. Makes use of the `appname
<platformdirs.api.PlatformDirsABC.appname>`, `version <platformdirs.api.PlatformDirsABC.version>`, `multipath
<platformdirs.api.PlatformDirsABC.multipath>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
<platformdirs.api.PlatformDirsABC.ensure_exists>`.

---
## _get_user_media_dir
```python
from unix import _get_user_media_dir
```



---
## _get_user_dirs_folder
```python
from unix import _get_user_dirs_folder
```

Return directory from user-dirs.dirs config file.

See https://freedesktop.org/wiki/Software/xdg-user-dirs/.

---
## getuid
```python
from unix import getuid
```



---
## user_data_dir
```python
from unix import user_data_dir
```

:return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
``$XDG_DATA_HOME/$appname/$version``

---
## _site_data_dirs
```python
from unix import _site_data_dirs
```



---
## site_data_dir
```python
from unix import site_data_dir
```

:return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
enabled and ``XDG_DATA_DIRS`` is set and a multi path the response is also a multi path separated by the
OS path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``

---
## user_config_dir
```python
from unix import user_config_dir
```

:return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
``$XDG_CONFIG_HOME/$appname/$version``

---
## _site_config_dirs
```python
from unix import _site_config_dirs
```



---
## site_config_dir
```python
from unix import site_config_dir
```

:return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
is enabled and ``XDG_CONFIG_DIRS`` is set and a multi path the response is also a multi path separated by
the OS path separator), e.g. ``/etc/xdg/$appname/$version``

---
## user_cache_dir
```python
from unix import user_cache_dir
```

:return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
``~/$XDG_CACHE_HOME/$appname/$version``

---
## site_cache_dir
```python
from unix import site_cache_dir
```

:return: cache directory shared by users, e.g. ``/var/cache/$appname/$version``

---
## user_state_dir
```python
from unix import user_state_dir
```

:return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
``$XDG_STATE_HOME/$appname/$version``

---
## user_log_dir
```python
from unix import user_log_dir
```

:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it

---
## user_documents_dir
```python
from unix import user_documents_dir
```

:return: documents directory tied to the user, e.g. ``~/Documents``

---
## user_downloads_dir
```python
from unix import user_downloads_dir
```

:return: downloads directory tied to the user, e.g. ``~/Downloads``

---
## user_pictures_dir
```python
from unix import user_pictures_dir
```

:return: pictures directory tied to the user, e.g. ``~/Pictures``

---
## user_videos_dir
```python
from unix import user_videos_dir
```

:return: videos directory tied to the user, e.g. ``~/Videos``

---
## user_music_dir
```python
from unix import user_music_dir
```

:return: music directory tied to the user, e.g. ``~/Music``

---
## user_desktop_dir
```python
from unix import user_desktop_dir
```

:return: desktop directory tied to the user, e.g. ``~/Desktop``

---
## user_runtime_dir
```python
from unix import user_runtime_dir
```

:return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
``$XDG_RUNTIME_DIR/$appname/$version``.

For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
is not set.

---
## site_runtime_dir
```python
from unix import site_runtime_dir
```

:return: runtime directory shared by users, e.g. ``/run/$appname/$version`` or         ``$XDG_RUNTIME_DIR/$appname/$version``.

Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will
fall back to paths associated to the root user instead of a regular logged-in user if it's not set.

If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
instead.

For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.

---
## site_data_path
```python
from unix import site_data_path
```

:return: data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``

---
## site_config_path
```python
from unix import site_config_path
```

:return: config path shared by the users, returns the first item, even if ``multipath`` is set to ``True``

---
## site_cache_path
```python
from unix import site_cache_path
```

:return: cache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``

---
## iter_config_dirs
```python
from unix import iter_config_dirs
```

:yield: all user and site configuration directories.

---
## iter_data_dirs
```python
from unix import iter_data_dirs
```

:yield: all user and site data directories.

---
## _set_platform_dir_class
```python
from __init__ import _set_platform_dir_class
```



---
## user_data_dir
```python
from __init__ import user_data_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: data directory tied to the user

---
## site_data_dir
```python
from __init__ import site_data_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: data directory shared by users

---
## user_config_dir
```python
from __init__ import user_config_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: config directory tied to the user

---
## site_config_dir
```python
from __init__ import site_config_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: config directory shared by the users

---
## user_cache_dir
```python
from __init__ import user_cache_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: cache directory tied to the user

---
## site_cache_dir
```python
from __init__ import site_cache_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: cache directory tied to the user

---
## user_state_dir
```python
from __init__ import user_state_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: state directory tied to the user

---
## user_log_dir
```python
from __init__ import user_log_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: log directory tied to the user

---
## user_documents_dir
```python
from __init__ import user_documents_dir
```

:returns: documents directory tied to the user

---
## user_downloads_dir
```python
from __init__ import user_downloads_dir
```

:returns: downloads directory tied to the user

---
## user_pictures_dir
```python
from __init__ import user_pictures_dir
```

:returns: pictures directory tied to the user

---
## user_videos_dir
```python
from __init__ import user_videos_dir
```

:returns: videos directory tied to the user

---
## user_music_dir
```python
from __init__ import user_music_dir
```

:returns: music directory tied to the user

---
## user_desktop_dir
```python
from __init__ import user_desktop_dir
```

:returns: desktop directory tied to the user

---
## user_runtime_dir
```python
from __init__ import user_runtime_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: runtime directory tied to the user

---
## site_runtime_dir
```python
from __init__ import site_runtime_dir
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: runtime directory shared by users

---
## user_data_path
```python
from __init__ import user_data_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: data path tied to the user

---
## site_data_path
```python
from __init__ import site_data_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: data path shared by users

---
## user_config_path
```python
from __init__ import user_config_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: config path tied to the user

---
## site_config_path
```python
from __init__ import site_config_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: config path shared by the users

---
## site_cache_path
```python
from __init__ import site_cache_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: cache directory tied to the user

---
## user_cache_path
```python
from __init__ import user_cache_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: cache path tied to the user

---
## user_state_path
```python
from __init__ import user_state_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: state path tied to the user

---
## user_log_path
```python
from __init__ import user_log_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: log path tied to the user

---
## user_documents_path
```python
from __init__ import user_documents_path
```

:returns: documents a path tied to the user

---
## user_downloads_path
```python
from __init__ import user_downloads_path
```

:returns: downloads path tied to the user

---
## user_pictures_path
```python
from __init__ import user_pictures_path
```

:returns: pictures path tied to the user

---
## user_videos_path
```python
from __init__ import user_videos_path
```

:returns: videos path tied to the user

---
## user_music_path
```python
from __init__ import user_music_path
```

:returns: music path tied to the user

---
## user_desktop_path
```python
from __init__ import user_desktop_path
```

:returns: desktop path tied to the user

---
## user_runtime_path
```python
from __init__ import user_runtime_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: runtime path tied to the user

---
## site_runtime_path
```python
from __init__ import site_runtime_path
```

:param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
:param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
:param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
:param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
:param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
:returns: runtime path shared by users

---
## PlatformDirsABC
```python
from api import PlatformDirsABC
```

Abstract base class for platform directories.

---
## __init__
```python
from api import __init__
```



---
## _append_app_name_and_version
```python
from api import _append_app_name_and_version
```



---
## _optionally_create_directory
```python
from api import _optionally_create_directory
```



---
## _first_item_as_path_if_multipath
```python
from api import _first_item_as_path_if_multipath
```



---
## user_data_dir
```python
from api import user_data_dir
```

:return: data directory tied to the user

---
## site_data_dir
```python
from api import site_data_dir
```

:return: data directory shared by users

---
## user_config_dir
```python
from api import user_config_dir
```

:return: config directory tied to the user

---
## site_config_dir
```python
from api import site_config_dir
```

:return: config directory shared by the users

---
## user_cache_dir
```python
from api import user_cache_dir
```

:return: cache directory tied to the user

---
## site_cache_dir
```python
from api import site_cache_dir
```

:return: cache directory shared by users

---
## user_state_dir
```python
from api import user_state_dir
```

:return: state directory tied to the user

---
## user_log_dir
```python
from api import user_log_dir
```

:return: log directory tied to the user

---
## user_documents_dir
```python
from api import user_documents_dir
```

:return: documents directory tied to the user

---
## user_downloads_dir
```python
from api import user_downloads_dir
```

:return: downloads directory tied to the user

---
## user_pictures_dir
```python
from api import user_pictures_dir
```

:return: pictures directory tied to the user

---
## user_videos_dir
```python
from api import user_videos_dir
```

:return: videos directory tied to the user

---
## user_music_dir
```python
from api import user_music_dir
```

:return: music directory tied to the user

---
## user_desktop_dir
```python
from api import user_desktop_dir
```

:return: desktop directory tied to the user

---
## user_runtime_dir
```python
from api import user_runtime_dir
```

:return: runtime directory tied to the user

---
## site_runtime_dir
```python
from api import site_runtime_dir
```

:return: runtime directory shared by users

---
## user_data_path
```python
from api import user_data_path
```

:return: data path tied to the user

---
## site_data_path
```python
from api import site_data_path
```

:return: data path shared by users

---
## user_config_path
```python
from api import user_config_path
```

:return: config path tied to the user

---
## site_config_path
```python
from api import site_config_path
```

:return: config path shared by the users

---
## user_cache_path
```python
from api import user_cache_path
```

:return: cache path tied to the user

---
## site_cache_path
```python
from api import site_cache_path
```

:return: cache path shared by users

---
## user_state_path
```python
from api import user_state_path
```

:return: state path tied to the user

---
## user_log_path
```python
from api import user_log_path
```

:return: log path tied to the user

---
## user_documents_path
```python
from api import user_documents_path
```

:return: documents a path tied to the user

---
## user_downloads_path
```python
from api import user_downloads_path
```

:return: downloads path tied to the user

---
## user_pictures_path
```python
from api import user_pictures_path
```

:return: pictures path tied to the user

---
## user_videos_path
```python
from api import user_videos_path
```

:return: videos path tied to the user

---
## user_music_path
```python
from api import user_music_path
```

:return: music path tied to the user

---
## user_desktop_path
```python
from api import user_desktop_path
```

:return: desktop path tied to the user

---
## user_runtime_path
```python
from api import user_runtime_path
```

:return: runtime path tied to the user

---
## site_runtime_path
```python
from api import site_runtime_path
```

:return: runtime path shared by users

---
## iter_config_dirs
```python
from api import iter_config_dirs
```

:yield: all user and site configuration directories.

---
## iter_data_dirs
```python
from api import iter_data_dirs
```

:yield: all user and site data directories.

---
## iter_cache_dirs
```python
from api import iter_cache_dirs
```

:yield: all user and site cache directories.

---
## iter_runtime_dirs
```python
from api import iter_runtime_dirs
```

:yield: all user and site runtime directories.

---
## iter_config_paths
```python
from api import iter_config_paths
```

:yield: all user and site configuration paths.

---
## iter_data_paths
```python
from api import iter_data_paths
```

:yield: all user and site data paths.

---
## iter_cache_paths
```python
from api import iter_cache_paths
```

:yield: all user and site cache paths.

---
## iter_runtime_paths
```python
from api import iter_runtime_paths
```

:yield: all user and site runtime paths.

---
## __name__
```python
from android import __name__
```

Android.

---
## Android
```python
from android import Android
```

Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_.

Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `version
<platformdirs.api.PlatformDirsABC.version>`, `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.

---
## _android_folder
```python
from android import _android_folder
```

:return: base folder for the Android OS or None if it cannot be found

---
## _android_documents_folder
```python
from android import _android_documents_folder
```

:return: documents folder for the Android OS

---
## _android_downloads_folder
```python
from android import _android_downloads_folder
```

:return: downloads folder for the Android OS

---
## _android_pictures_folder
```python
from android import _android_pictures_folder
```

:return: pictures folder for the Android OS

---
## _android_videos_folder
```python
from android import _android_videos_folder
```

:return: videos folder for the Android OS

---
## _android_music_folder
```python
from android import _android_music_folder
```

:return: music folder for the Android OS

---
## user_data_dir
```python
from android import user_data_dir
```

:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``

---
## site_data_dir
```python
from android import site_data_dir
```

:return: data directory shared by users, same as `user_data_dir`

---
## user_config_dir
```python
from android import user_config_dir
```

:return: config directory tied to the user, e.g.         ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``

---
## site_config_dir
```python
from android import site_config_dir
```

:return: config directory shared by the users, same as `user_config_dir`

---
## user_cache_dir
```python
from android import user_cache_dir
```

:return: cache directory tied to the user, e.g.,``/data/user/<userid>/<packagename>/cache/<AppName>``

---
## site_cache_dir
```python
from android import site_cache_dir
```

:return: cache directory shared by users, same as `user_cache_dir`

---
## user_state_dir
```python
from android import user_state_dir
```

:return: state directory tied to the user, same as `user_data_dir`

---
## user_log_dir
```python
from android import user_log_dir
```

:return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``

---
## user_documents_dir
```python
from android import user_documents_dir
```

:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``

---
## user_downloads_dir
```python
from android import user_downloads_dir
```

:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``

---
## user_pictures_dir
```python
from android import user_pictures_dir
```

:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``

---
## user_videos_dir
```python
from android import user_videos_dir
```

:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``

---
## user_music_dir
```python
from android import user_music_dir
```

:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``

---
## user_desktop_dir
```python
from android import user_desktop_dir
```

:return: desktop directory tied to the user e.g. ``/storage/emulated/0/Desktop``

---
## user_runtime_dir
```python
from android import user_runtime_dir
```

:return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``

---
## site_runtime_dir
```python
from android import site_runtime_dir
```

:return: runtime directory shared by users, same as `user_runtime_dir`

---
## __name__
```python
from windows import __name__
```

Windows.

---
## Windows
```python
from windows import Windows
```

`MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.

Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `appauthor
<platformdirs.api.PlatformDirsABC.appauthor>`, `version <platformdirs.api.PlatformDirsABC.version>`, `roaming
<platformdirs.api.PlatformDirsABC.roaming>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
<platformdirs.api.PlatformDirsABC.ensure_exists>`.

---
## get_win_folder_from_env_vars
```python
from windows import get_win_folder_from_env_vars
```

Get folder from environment variables.

---
## get_win_folder_if_csidl_name_not_env_var
```python
from windows import get_win_folder_if_csidl_name_not_env_var
```

Get a folder for a CSIDL name that does not exist as an environment variable.

---
## get_win_folder_from_registry
```python
from windows import get_win_folder_from_registry
```

Get folder from the registry.

This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
for all CSIDL_* names.

---
## get_win_folder_via_ctypes
```python
from windows import get_win_folder_via_ctypes
```

Get folder with ctypes.

---
## _pick_get_win_folder
```python
from windows import _pick_get_win_folder
```



---
## user_data_dir
```python
from windows import user_data_dir
```

:return: data directory tied to the user, e.g.
``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or
``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming)

---
## _append_parts
```python
from windows import _append_parts
```



---
## site_data_dir
```python
from windows import site_data_dir
```

:return: data directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``

---
## user_config_dir
```python
from windows import user_config_dir
```

:return: config directory tied to the user, same as `user_data_dir`

---
## site_config_dir
```python
from windows import site_config_dir
```

:return: config directory shared by the users, same as `site_data_dir`

---
## user_cache_dir
```python
from windows import user_cache_dir
```

:return: cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g.
``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``

---
## site_cache_dir
```python
from windows import site_cache_dir
```

:return: cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``

---
## user_state_dir
```python
from windows import user_state_dir
```

:return: state directory tied to the user, same as `user_data_dir`

---
## user_log_dir
```python
from windows import user_log_dir
```

:return: log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it

---
## user_documents_dir
```python
from windows import user_documents_dir
```

:return: documents directory tied to the user e.g. ``%USERPROFILE%\Documents``

---
## user_downloads_dir
```python
from windows import user_downloads_dir
```

:return: downloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``

---
## user_pictures_dir
```python
from windows import user_pictures_dir
```

:return: pictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``

---
## user_videos_dir
```python
from windows import user_videos_dir
```

:return: videos directory tied to the user e.g. ``%USERPROFILE%\Videos``

---
## user_music_dir
```python
from windows import user_music_dir
```

:return: music directory tied to the user e.g. ``%USERPROFILE%\Music``

---
## user_desktop_dir
```python
from windows import user_desktop_dir
```

:return: desktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``

---
## user_runtime_dir
```python
from windows import user_runtime_dir
```

:return: runtime directory tied to the user, e.g.
``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``

---
## site_runtime_dir
```python
from windows import site_runtime_dir
```

:return: runtime directory shared by users, same as `user_runtime_dir`

---
## __name__
```python
from resize_observation import __name__
```

Wrapper for resizing observations.

---
## ResizeObservation
```python
from resize_observation import ResizeObservation
```

Resize the image observation.

This wrapper works on environments with image observations. More generally,
the input can either be two-dimensional (AxB, e.g. grayscale images) or
three-dimensional (AxBxC, e.g. color images). This resizes the observation
to the shape given by the 2-tuple :attr:`shape`.
The argument :attr:`shape` may also be an integer, in which case, the
observation is scaled to a square of side-length :attr:`shape`.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import ResizeObservation
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> env = ResizeObservation(env, 64)
    >>> env.observation_space.shape
    (64, 64, 3)

---
## __init__
```python
from resize_observation import __init__
```

Resizes image observations to shape given by :attr:`shape`.

Args:
    env: The environment to apply the wrapper
    shape: The shape of the resized observations

---
## observation
```python
from resize_observation import observation
```

Updates the observations by resizing the observation to shape given by :attr:`shape`.

Args:
    observation: The observation to reshape

Returns:
    The reshaped observations

Raises:
    DependencyNotInstalled: opencv-python is not installed

---
## __name__
```python
from human_rendering import __name__
```

A wrapper that adds human-renering functionality to an environment.

---
## HumanRendering
```python
from human_rendering import HumanRendering
```

Performs human rendering for an environment that only supports "rgb_array"rendering.

This wrapper is particularly useful when you have implemented an environment that can produce
RGB images but haven't implemented any code to render the images to the screen.
If you want to use this wrapper with your environments, remember to specify ``"render_fps"``
in the metadata of your environment.

The ``render_mode`` of the wrapped environment must be either ``'rgb_array'`` or ``'rgb_array_list'``.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import HumanRendering
    >>> env = gym.make("LunarLander-v2", render_mode="rgb_array")
    >>> wrapped = HumanRendering(env)
    >>> obs, _ = wrapped.reset()     # This will start rendering to the screen

    The wrapper can also be applied directly when the environment is instantiated, simply by passing
    ``render_mode="human"`` to ``make``. The wrapper will only be applied if the environment does not
    implement human-rendering natively (i.e. ``render_mode`` does not contain ``"human"``).

    >>> env = gym.make("phys2d/CartPole-v1", render_mode="human")      # phys2d/CartPole-v1 doesn't implement human-rendering natively
    >>> obs, _ = env.reset()     # This will start rendering to the screen

    Warning: If the base environment uses ``render_mode="rgb_array_list"``, its (i.e. the *base environment's*) render method
    will always return an empty list:

    >>> env = gym.make("LunarLander-v2", render_mode="rgb_array_list")
    >>> wrapped = HumanRendering(env)
    >>> obs, _ = wrapped.reset()
    >>> env.render()     # env.render() will always return an empty list!
    []

---
## __init__
```python
from human_rendering import __init__
```

Initialize a :class:`HumanRendering` instance.

Args:
    env: The environment that is being wrapped

---
## render_mode
```python
from human_rendering import render_mode
```

Always returns ``'human'``.

---
## step
```python
from human_rendering import step
```

Perform a step in the base environment and render a frame to the screen.

---
## reset
```python
from human_rendering import reset
```

Reset the base environment and render a frame to the screen.

---
## render
```python
from human_rendering import render
```

This method doesn't do much, actual rendering is performed in :meth:`step` and :meth:`reset`.

---
## _render_frame
```python
from human_rendering import _render_frame
```

Fetch the last frame from the base environment and render it to the screen.

---
## close
```python
from human_rendering import close
```

Close the rendering window.

---
## LegacyEnv
```python
from compatibility import LegacyEnv
```

A protocol for environments using the old step API.

---
## EnvCompatibility
```python
from compatibility import EnvCompatibility
```

A wrapper which can transform an environment from the old API to the new API.

Old step API refers to step() method returning (observation, reward, done, info), and reset() only retuning the observation.
New step API refers to step() method returning (observation, reward, terminated, truncated, info) and reset() returning (observation, info).
(Refer to docs for details on the API change)

Known limitations:
- Environments that use `self.np_random` might not work as expected.

---
## reset
```python
from compatibility import reset
```

Resets the environment.

Args:
    seed: the seed to reset the environment with
    options: the options to reset the environment with

Returns:
    (observation, info)

---
## step
```python
from compatibility import step
```

Steps through the environment.

Args:
    action: action to step through the environment with

Returns:
    (observation, reward, terminated, truncated, info)

---
## render
```python
from compatibility import render
```

Renders the environment.

Returns:
    The rendering of the environment, depending on the render mode

---
## close
```python
from compatibility import close
```

Closes the environment.

---
## seed
```python
from compatibility import seed
```

Set the seed for this env's random number generator(s).

---
## __init__
```python
from compatibility import __init__
```

A wrapper which converts old-style envs to valid modern envs.

Some information may be lost in the conversion, so we recommend updating your environment.

Args:
    old_env (LegacyEnv): the env to wrap, implemented with the old API
    render_mode (str): the render mode to use when rendering the environment, passed automatically to env.render

---
## __str__
```python
from compatibility import __str__
```

Returns the wrapper name and the unwrapped environment string.

---
## __repr__
```python
from compatibility import __repr__
```

Returns the string representation of the wrapper.

---
## __name__
```python
from gray_scale_observation import __name__
```

Wrapper that converts a color observation to grayscale.

---
## GrayScaleObservation
```python
from gray_scale_observation import GrayScaleObservation
```

Convert the image observation from RGB to gray scale.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import GrayScaleObservation
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space
    Box(0, 255, (96, 96, 3), uint8)
    >>> env = GrayScaleObservation(gym.make("CarRacing-v2"))
    >>> env.observation_space
    Box(0, 255, (96, 96), uint8)
    >>> env = GrayScaleObservation(gym.make("CarRacing-v2"), keep_dim=True)
    >>> env.observation_space
    Box(0, 255, (96, 96, 1), uint8)

---
## __init__
```python
from gray_scale_observation import __init__
```

Convert the image observation from RGB to gray scale.

Args:
    env (Env): The environment to apply the wrapper
    keep_dim (bool): If `True`, a singleton dimension will be added, i.e. observations are of the shape AxBx1.
        Otherwise, they are of shape AxB.

---
## observation
```python
from gray_scale_observation import observation
```

Converts the colour observation to greyscale.

Args:
    observation: Color observations

Returns:
    Grayscale observations

---
## __name__
```python
from flatten_observation import __name__
```

Wrapper for flattening observations of an environment.

---
## FlattenObservation
```python
from flatten_observation import FlattenObservation
```

Observation wrapper that flattens the observation.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import FlattenObservation
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> env = FlattenObservation(env)
    >>> env.observation_space.shape
    (27648,)
    >>> obs, _ = env.reset()
    >>> obs.shape
    (27648,)

---
## __init__
```python
from flatten_observation import __init__
```

Flattens the observations of an environment.

Args:
    env: The environment to apply the wrapper

---
## observation
```python
from flatten_observation import observation
```

Flattens an observation.

Args:
    observation: The observation to flatten

Returns:
    The flattened observation

---
## __name__
```python
from render_collection import __name__
```

A wrapper that adds render collection mode to an environment.

---
## RenderCollection
```python
from render_collection import RenderCollection
```

Save collection of render frames.

---
## __init__
```python
from render_collection import __init__
```

Initialize a :class:`RenderCollection` instance.

Args:
    env: The environment that is being wrapped
    pop_frames (bool): If true, clear the collection frames after .render() is called.
    Default value is True.
    reset_clean (bool): If true, clear the collection frames when .reset() is called.
    Default value is True.

---
## render_mode
```python
from render_collection import render_mode
```

Returns the collection render_mode name.

---
## step
```python
from render_collection import step
```

Perform a step in the base environment and collect a frame.

---
## reset
```python
from render_collection import reset
```

Reset the base environment, eventually clear the frame_list, and collect a frame.

---
## render
```python
from render_collection import render
```

Returns the collection of frames and, if pop_frames = True, clears it.

---
## __name__
```python
from env_checker import __name__
```

A set of functions for checking an environment details.

This file is originally from the Stable Baselines3 repository hosted on GitHub
(https://github.com/DLR-RM/stable-baselines3/)
Original Author: Antonin Raffin

It also uses some warnings/assertions from the PettingZoo repository hosted on GitHub
(https://github.com/PettingZoo-Team/PettingZoo)
Original Author: J K Terry

This was rewritten and split into "env_checker.py" and "passive_env_checker.py" for invasive and passive environment checking
Original Author: Mark Towers

These projects are covered by the MIT License.

---
## PassiveEnvChecker
```python
from env_checker import PassiveEnvChecker
```

A passive environment checker wrapper that surrounds the step, reset and render functions to check they follow the gymnasium API.

---
## __init__
```python
from env_checker import __init__
```

Initialises the wrapper with the environments, run the observation and action space tests.

---
## step
```python
from env_checker import step
```

Steps through the environment that on the first call will run the `passive_env_step_check`.

---
## reset
```python
from env_checker import reset
```

Resets the environment that on the first call will run the `passive_env_reset_check`.

---
## render
```python
from env_checker import render
```

Renders the environment that on the first call will run the `passive_env_render_check`.

---
## spec
```python
from env_checker import spec
```

Modifies the environment spec to such that `disable_env_checker=False`.

---
## close
```python
from env_checker import close
```

Warns if calling close on a closed environment fails.

---
## __name__
```python
from filter_observation import __name__
```

A wrapper for filtering dictionary observations by their keys.

---
## FilterObservation
```python
from filter_observation import FilterObservation
```

Filter Dict observation space by the keys.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import TransformObservation
    >>> env = gym.make("CartPole-v1")
    >>> env = TransformObservation(env, lambda obs: {'obs': obs, 'time': 0})
    >>> env.observation_space = gym.spaces.Dict(obs=env.observation_space, time=gym.spaces.Discrete(1))
    >>> env.reset(seed=42)
    ({'obs': array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ], dtype=float32), 'time': 0}, {})
    >>> env = FilterObservation(env, filter_keys=['obs'])
    >>> env.reset(seed=42)
    ({'obs': array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ], dtype=float32)}, {})
    >>> env.step(0)
    ({'obs': array([ 0.02727336, -0.20172954,  0.03625453,  0.32351476], dtype=float32)}, 1.0, False, False, {})

---
## __init__
```python
from filter_observation import __init__
```

A wrapper that filters dictionary observations by their keys.

Args:
    env: The environment to apply the wrapper
    filter_keys: List of keys to be included in the observations. If ``None``, observations will not be filtered and this wrapper has no effect

Raises:
    ValueError: If the environment's observation space is not :class:`spaces.Dict`
    ValueError: If any of the `filter_keys` are not included in the original `env`'s observation space

---
## observation
```python
from filter_observation import observation
```

Filters the observations.

Args:
    observation: The observation to filter

Returns:
    The filtered observations

---
## _filter_observation
```python
from filter_observation import _filter_observation
```



---
## __name__
```python
from step_api_compatibility import __name__
```

Contains methods for step compatibility, from old-to-new and new-to-old API.

---
## StepAPICompatibility
```python
from step_api_compatibility import StepAPICompatibility
```

A wrapper which can transform an environment from new step API to old and vice-versa.

Old step API refers to step() method returning (observation, reward, done, info)
New step API refers to step() method returning (observation, reward, terminated, truncated, info)
(Refer to docs for details on the API change)

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import StepAPICompatibility
    >>> env = gym.make("CartPole-v1")
    >>> env # wrapper not applied by default, set to new API
    <TimeLimit<OrderEnforcing<PassiveEnvChecker<CartPoleEnv<CartPole-v1>>>>>
    >>> env = StepAPICompatibility(gym.make("CartPole-v1"))
    >>> env
    <StepAPICompatibility<TimeLimit<OrderEnforcing<PassiveEnvChecker<CartPoleEnv<CartPole-v1>>>>>>

---
## __init__
```python
from step_api_compatibility import __init__
```

A wrapper which can transform an environment from new step API to old and vice-versa.

Args:
    env (gym.Env): the env to wrap. Can be in old or new API
    output_truncation_bool (bool): Whether the wrapper's step method outputs two booleans (new API) or one boolean (old API)

---
## step
```python
from step_api_compatibility import step
```

Steps through the environment, returning 5 or 4 items depending on `output_truncation_bool`.

Args:
    action: action to step through the environment with

Returns:
    (observation, reward, terminated, truncated, info) or (observation, reward, done, info)

---
## __name__
```python
from order_enforcing import __name__
```

Wrapper to enforce the proper ordering of environment operations.

---
## OrderEnforcing
```python
from order_enforcing import OrderEnforcing
```

A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import OrderEnforcing
    >>> env = gym.make("CartPole-v1", render_mode="human")
    >>> env = OrderEnforcing(env)
    >>> env.step(0)
    Traceback (most recent call last):
        ...
    gymnasium.error.ResetNeeded: Cannot call env.step() before calling env.reset()
    >>> env.render()
    Traceback (most recent call last):
        ...
    gymnasium.error.ResetNeeded: Cannot call `env.render()` before calling `env.reset()`, if this is a intended action, set `disable_render_order_enforcing=True` on the OrderEnforcer wrapper.
    >>> _ = env.reset()
    >>> env.render()
    >>> _ = env.step(0)
    >>> env.close()

---
## __init__
```python
from order_enforcing import __init__
```

A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.

Args:
    env: The environment to wrap
    disable_render_order_enforcing: If to disable render order enforcing

---
## step
```python
from order_enforcing import step
```

Steps through the environment with `kwargs`.

---
## reset
```python
from order_enforcing import reset
```

Resets the environment with `kwargs`.

---
## render
```python
from order_enforcing import render
```

Renders the environment with `kwargs`.

---
## has_reset
```python
from order_enforcing import has_reset
```

Returns if the environment has been reset before.

---
## spec
```python
from order_enforcing import spec
```

Modifies the environment spec to add the `order_enforce=True`.

---
## __name__
```python
from autoreset import __name__
```

Wrapper that autoreset environments when `terminated=True` or `truncated=True`.

---
## AutoResetWrapper
```python
from autoreset import AutoResetWrapper
```

A class for providing an automatic reset functionality for gymnasium environments when calling :meth:`self.step`.

When calling step causes :meth:`Env.step` to return `terminated=True` or `truncated=True`, :meth:`Env.reset` is called,
and the return format of :meth:`self.step` is as follows: ``(new_obs, final_reward, final_terminated, final_truncated, info)``
with new step API and ``(new_obs, final_reward, final_done, info)`` with the old step API.

 - ``new_obs`` is the first observation after calling :meth:`self.env.reset`
 - ``final_reward`` is the reward after calling :meth:`self.env.step`, prior to calling :meth:`self.env.reset`.
 - ``final_terminated`` is the terminated value before calling :meth:`self.env.reset`.
 - ``final_truncated`` is the truncated value before calling :meth:`self.env.reset`. Both `final_terminated` and `final_truncated` cannot be False.
 - ``info`` is a dict containing all the keys from the info dict returned by the call to :meth:`self.env.reset`,
   with an additional key "final_observation" containing the observation returned by the last call to :meth:`self.env.step`
   and "final_info" containing the info dict returned by the last call to :meth:`self.env.step`.

Warning:
    When using this wrapper to collect rollouts, note that when :meth:`Env.step` returns `terminated` or `truncated`, a
    new observation from after calling :meth:`Env.reset` is returned by :meth:`Env.step` alongside the
    final reward, terminated and truncated state from the previous episode.
    If you need the final state from the previous episode, you need to retrieve it via the
    "final_observation" key in the info dict.
    Make sure you know what you're doing if you use this wrapper!

---
## __init__
```python
from autoreset import __init__
```

A class for providing an automatic reset functionality for gymnasium environments when calling :meth:`self.step`.

Args:
    env (gym.Env): The environment to apply the wrapper

---
## step
```python
from autoreset import step
```

Steps through the environment with action and resets the environment if a terminated or truncated signal is encountered.

Args:
    action: The action to take

Returns:
    The autoreset environment :meth:`step`

---
## spec
```python
from autoreset import spec
```

Modifies the environment spec to specify the `autoreset=True`.

---
## __name__
```python
from normalize import __name__
```

Normalize input string.

---
## RunningMeanStd
```python
from normalize import RunningMeanStd
```

Tracks the mean, variance and count of values.

---
## update_mean_var_count_from_moments
```python
from normalize import update_mean_var_count_from_moments
```

Updates the mean, var and count using the previous mean, var, count and batch values.

---
## NormalizeObservation
```python
from normalize import NormalizeObservation
```

This wrapper will normalize observations s.t. each coordinate is centered with unit variance.

Note:
    The normalization depends on past trajectories and observations will not be normalized correctly if the wrapper was
    newly instantiated or the policy was changed recently.

---
## NormalizeReward
```python
from normalize import NormalizeReward
```

This wrapper will normalize immediate rewards s.t. their exponential moving average has a fixed variance.

The exponential moving average will have variance :math:`(1 - \gamma)^2`.

Note:
    The scaling depends on past trajectories and rewards will not be scaled correctly if the wrapper was newly
    instantiated or the policy was changed recently.

---
## __init__
```python
from normalize import __init__
```

This wrapper will normalize immediate rewards s.t. their exponential moving average has a fixed variance.

Args:
    env (env): The environment to apply the wrapper
    epsilon (float): A stability parameter
    gamma (float): The discount factor that is used in the exponential moving average.

---
## update
```python
from normalize import update
```

Updates the mean, var and count from a batch of samples.

---
## update_from_moments
```python
from normalize import update_from_moments
```

Updates from batch mean, variance and count moments.

---
## step
```python
from normalize import step
```

Steps through the environment, normalizing the rewards returned.

---
## reset
```python
from normalize import reset
```

Resets the environment and normalizes the observation.

---
## normalize
```python
from normalize import normalize
```



---
## __name__
```python
from clip_action import __name__
```

Wrapper for clipping actions within a valid bound.

---
## ClipAction
```python
from clip_action import ClipAction
```

Clip the continuous action within the valid :class:`Box` observation space bound.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import ClipAction
    >>> env = gym.make("Hopper-v4")
    >>> env = ClipAction(env)
    >>> env.action_space
    Box(-1.0, 1.0, (3,), float32)
    >>> _ = env.reset(seed=42)
    >>> _ = env.step(np.array([5.0, -2.0, 0.0]))
    ... # Executes the action np.array([1.0, -1.0, 0]) in the base environment

---
## __init__
```python
from clip_action import __init__
```

A wrapper for clipping continuous actions within the valid bound.

Args:
    env: The environment to apply the wrapper

---
## action
```python
from clip_action import action
```

Clips the action within the valid bounds.

Args:
    action: The action to clip

Returns:
    The clipped action

---
## __name__
```python
from transform_observation import __name__
```

Wrapper for transforming observations.

---
## TransformObservation
```python
from transform_observation import TransformObservation
```

Transform the observation via an arbitrary function :attr:`f`.

The function :attr:`f` should be defined on the observation space of the base environment, ``env``, and should, ideally, return values in the same space.

If the transformation you wish to apply to observations returns values in a *different* space, you should subclass :class:`ObservationWrapper`, implement the transformation, and set the new observation space accordingly. If you were to use this wrapper instead, the observation space would be set incorrectly.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import TransformObservation
    >>> import numpy as np
    >>> np.random.seed(0)
    >>> env = gym.make("CartPole-v1")
    >>> env = TransformObservation(env, lambda obs: obs + 0.1 * np.random.randn(*obs.shape))
    >>> env.reset(seed=42)
    (array([0.20380084, 0.03390356, 0.13373359, 0.24382612]), {})

---
## __init__
```python
from transform_observation import __init__
```

Initialize the :class:`TransformObservation` wrapper with an environment and a transform function :attr:`f`.

Args:
    env: The environment to apply the wrapper
    f: A function that transforms the observation

---
## observation
```python
from transform_observation import observation
```

Transforms the observations with callable :attr:`f`.

Args:
    observation: The observation to transform

Returns:
    The transformed observation

---
## __name__
```python
from vector_list_info import __name__
```

Wrapper that converts the info format for vec envs into the list format.

---
## VectorListInfo
```python
from vector_list_info import VectorListInfo
```

Converts infos of vectorized environments from dict to List[dict].

This wrapper converts the info format of a
vector environment from a dictionary to a list of dictionaries.
This wrapper is intended to be used around vectorized
environments. If using other wrappers that perform
operation on info like `RecordEpisodeStatistics` this
need to be the outermost wrapper.

i.e. `VectorListInfo(RecordEpisodeStatistics(envs))`

Example:
    >>> # As dict:
    >>> infos = {
    ...     "final_observation": "<array of length num-envs>",
    ...     "_final_observation": "<boolean array of length num-envs>",
    ...     "final_info": "<array of length num-envs>",
    ...     "_final_info": "<boolean array of length num-envs>",
    ...     "episode": {
    ...         "r": "<array of cumulative reward>",
    ...         "l": "<array of episode length>",
    ...         "t": "<array of elapsed time since beginning of episode>"
    ...     },
    ...     "_episode": "<boolean array of length num-envs>"
    ... }
    >>> # As list:
    >>> infos = [
    ...     {
    ...         "episode": {"r": "<cumulative reward>", "l": "<episode length>", "t": "<elapsed time since beginning of episode>"},
    ...         "final_observation": "<observation>",
    ...         "final_info": {},
    ...     },
    ...     ...,
    ... ]

---
## __init__
```python
from vector_list_info import __init__
```

This wrapper will convert the info into the list format.

Args:
    env (Env): The environment to apply the wrapper

---
## step
```python
from vector_list_info import step
```

Steps through the environment, convert dict info to list.

---
## reset
```python
from vector_list_info import reset
```

Resets the environment using kwargs.

---
## _convert_info_to_list
```python
from vector_list_info import _convert_info_to_list
```

Convert the dict info to list.

Convert the dict info of the vectorized environment
into a list of dictionaries where the i-th dictionary
has the info of the i-th environment.

Args:
    infos (dict): info dict coming from the env.

Returns:
    list_info (list): converted info.

---
## _process_episode_statistics
```python
from vector_list_info import _process_episode_statistics
```

Process episode statistics.

`RecordEpisodeStatistics` wrapper add extra
information to the info. This information are in
the form of a dict of dict. This method process these
information and add them to the info.
`RecordEpisodeStatistics` info contains the keys
"r", "l", "t" which represents "cumulative reward",
"episode length", "elapsed time since instantiation of wrapper".

Args:
    infos (dict): infos coming from `RecordEpisodeStatistics`.
    list_info (list): info of the current vectorized environment.

Returns:
    list_info (list): updated info.

---
## __name__
```python
from time_limit import __name__
```

Wrapper for limiting the time steps of an environment.

---
## TimeLimit
```python
from time_limit import TimeLimit
```

This wrapper will issue a `truncated` signal if a maximum number of timesteps is exceeded.

If a truncation is not defined inside the environment itself, this is the only place that the truncation signal is issued.
Critically, this is different from the `terminated` signal that originates from the underlying environment as part of the MDP.

Example:
   >>> import gymnasium as gym
   >>> from gymnasium.wrappers import TimeLimit
   >>> env = gym.make("CartPole-v1")
   >>> env = TimeLimit(env, max_episode_steps=1000)

---
## __init__
```python
from time_limit import __init__
```

Initializes the :class:`TimeLimit` wrapper with an environment and the number of steps after which truncation will occur.

Args:
    env: The environment to apply the wrapper
    max_episode_steps: An optional max episode steps (if ``None``, ``env.spec.max_episode_steps`` is used)

---
## step
```python
from time_limit import step
```

Steps through the environment and if the number of steps elapsed exceeds ``max_episode_steps`` then truncate.

Args:
    action: The environment step action

Returns:
    The environment step ``(observation, reward, terminated, truncated, info)`` with `truncated=True`
    if the number of steps elapsed >= max episode steps

---
## reset
```python
from time_limit import reset
```

Resets the environment with :param:`**kwargs` and sets the number of steps elapsed to zero.

Args:
    **kwargs: The kwargs to reset the environment with

Returns:
    The reset environment

---
## spec
```python
from time_limit import spec
```

Modifies the environment spec to include the `max_episode_steps=self._max_episode_steps`.

---
## __name__
```python
from transform_reward import __name__
```

Wrapper for transforming the reward.

---
## TransformReward
```python
from transform_reward import TransformReward
```

Transform the reward via an arbitrary function.

Warning:
    If the base environment specifies a reward range which is not invariant under :attr:`f`, the :attr:`reward_range` of the wrapped environment will be incorrect.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import TransformReward
    >>> env = gym.make("CartPole-v1")
    >>> env = TransformReward(env, lambda r: 0.01*r)
    >>> _ = env.reset()
    >>> observation, reward, terminated, truncated, info = env.step(env.action_space.sample())
    >>> reward
    0.01

---
## __init__
```python
from transform_reward import __init__
```

Initialize the :class:`TransformReward` wrapper with an environment and reward transform function :attr:`f`.

Args:
    env: The environment to apply the wrapper
    f: A function that transforms the reward

---
## reward
```python
from transform_reward import reward
```

Transforms the reward using callable :attr:`f`.

Args:
    reward: The reward to transform

Returns:
    The transformed reward

---
## __name__
```python
from record_video import __name__
```

Wrapper for recording videos.

---
## capped_cubic_video_schedule
```python
from record_video import capped_cubic_video_schedule
```

The default episode trigger.

This function will trigger recordings at the episode indices 0, 1, 8, 27, ..., :math:`k^3`, ..., 729, 1000, 2000, 3000, ...

Args:
    episode_id: The episode number

Returns:
    If to apply a video schedule number

---
## RecordVideo
```python
from record_video import RecordVideo
```

This wrapper records videos of rollouts.

Usually, you only want to record episodes intermittently, say every hundredth episode.
To do this, you can specify **either** ``episode_trigger`` **or** ``step_trigger`` (not both).
They should be functions returning a boolean that indicates whether a recording should be started at the
current episode or step, respectively.
If neither :attr:`episode_trigger` nor ``step_trigger`` is passed, a default ``episode_trigger`` will be employed.
By default, the recording will be stopped once a `terminated` or `truncated` signal has been emitted by the environment. However, you can
also create recordings of fixed length (possibly spanning several episodes) by passing a strictly positive value for
``video_length``.

---
## __init__
```python
from record_video import __init__
```

Wrapper records videos of rollouts.

Args:
    env: The environment that will be wrapped
    video_folder (str): The folder where the recordings will be stored
    episode_trigger: Function that accepts an integer and returns ``True`` iff a recording should be started at this episode
    step_trigger: Function that accepts an integer and returns ``True`` iff a recording should be started at this step
    video_length (int): The length of recorded episodes. If 0, entire episodes are recorded.
        Otherwise, snippets of the specified length are captured
    name_prefix (str): Will be prepended to the filename of the recordings
    disable_logger (bool): Whether to disable moviepy logger or not.

---
## reset
```python
from record_video import reset
```

Reset the environment using kwargs and then starts recording if video enabled.

---
## start_video_recorder
```python
from record_video import start_video_recorder
```

Starts video recorder using :class:`video_recorder.VideoRecorder`.

---
## _video_enabled
```python
from record_video import _video_enabled
```



---
## step
```python
from record_video import step
```

Steps through the environment using action, recording observations if :attr:`self.recording`.

---
## close_video_recorder
```python
from record_video import close_video_recorder
```

Closes the video recorder if currently recording.

---
## render
```python
from record_video import render
```

Compute the render frames as specified by render_mode attribute during initialization of the environment or as specified in kwargs.

---
## close
```python
from record_video import close
```

Closes the wrapper then the video recorder.

---
## __name__
```python
from time_aware_observation import __name__
```

Wrapper for adding time aware observations to environment observation.

---
## TimeAwareObservation
```python
from time_aware_observation import TimeAwareObservation
```

Augment the observation with the current time step in the episode.

The observation space of the wrapped environment is assumed to be a flat :class:`Box`.
In particular, pixel observations are not supported. This wrapper will append the current timestep within the current episode to the observation.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import TimeAwareObservation
    >>> env = gym.make("CartPole-v1")
    >>> env = TimeAwareObservation(env)
    >>> env.reset(seed=42)
    (array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ,  0.        ]), {})
    >>> _ = env.action_space.seed(42)
    >>> env.step(env.action_space.sample())[0]
    array([ 0.02727336, -0.20172954,  0.03625453,  0.32351476,  1.        ])

---
## __init__
```python
from time_aware_observation import __init__
```

Initialize :class:`TimeAwareObservation` that requires an environment with a flat :class:`Box` observation space.

Args:
    env: The environment to apply the wrapper

---
## observation
```python
from time_aware_observation import observation
```

Adds to the observation with the current time step.

Args:
    observation: The observation to add the time step to

Returns:
    The observation with the time step appended to

---
## step
```python
from time_aware_observation import step
```

Steps through the environment, incrementing the time step.

Args:
    action: The action to take

Returns:
    The environment's step using the action.

---
## reset
```python
from time_aware_observation import reset
```

Reset the environment setting the time to zero.

Args:
    **kwargs: Kwargs to apply to env.reset()

Returns:
    The reset environment

---
## __name__
```python
from pixel_observation import __name__
```

Wrapper for augmenting observations by pixel values.

---
## PixelObservationWrapper
```python
from pixel_observation import PixelObservationWrapper
```

Augment observations by pixel values.

Observations of this wrapper will be dictionaries of images.
You can also choose to add the observation of the base environment to this dictionary.
In that case, if the base environment has an observation space of type :class:`Dict`, the dictionary
of rendered images will be updated with the base environment's observation. If, however, the observation
space is of type :class:`Box`, the base environment's observation (which will be an element of the :class:`Box`
space) will be added to the dictionary under the key "state".

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import PixelObservationWrapper
    >>> env = PixelObservationWrapper(gym.make("CarRacing-v2", render_mode="rgb_array"))
    >>> obs, _ = env.reset()
    >>> obs.keys()
    odict_keys(['pixels'])
    >>> obs['pixels'].shape
    (400, 600, 3)
    >>> env = PixelObservationWrapper(gym.make("CarRacing-v2", render_mode="rgb_array"), pixels_only=False)
    >>> obs, _ = env.reset()
    >>> obs.keys()
    odict_keys(['state', 'pixels'])
    >>> obs['state'].shape
    (96, 96, 3)
    >>> obs['pixels'].shape
    (400, 600, 3)
    >>> env = PixelObservationWrapper(gym.make("CarRacing-v2", render_mode="rgb_array"), pixel_keys=('obs',))
    >>> obs, _ = env.reset()
    >>> obs.keys()
    odict_keys(['obs'])
    >>> obs['obs'].shape
    (400, 600, 3)

---
## __init__
```python
from pixel_observation import __init__
```

Initializes a new pixel Wrapper.

Args:
    env: The environment to wrap.
    pixels_only (bool): If `True` (default), the original observation returned
        by the wrapped environment will be discarded, and a dictionary
        observation will only include pixels. If `False`, the
        observation dictionary will contain both the original
        observations and the pixel observations.
    render_kwargs (dict): Optional dictionary containing that maps elements of `pixel_keys` to
        keyword arguments passed to the :meth:`self.render` method.
    pixel_keys: Optional custom string specifying the pixel
        observation's key in the `OrderedDict` of observations.
        Defaults to `(pixels,)`.

Raises:
    AssertionError: If any of the keys in ``render_kwargs``do not show up in ``pixel_keys``.
    ValueError: If ``env``'s observation space is not compatible with the
        wrapper. Supported formats are a single array, or a dict of
        arrays.
    ValueError: If ``env``'s observation already contains any of the
        specified ``pixel_keys``.
    TypeError: When an unexpected pixel type is used

---
## observation
```python
from pixel_observation import observation
```

Updates the observations with the pixel observations.

Args:
    observation: The observation to add pixel observations for

Returns:
    The updated pixel observations

---
## _add_pixel_observation
```python
from pixel_observation import _add_pixel_observation
```



---
## render
```python
from pixel_observation import render
```

Renders the environment.

---
## _render
```python
from pixel_observation import _render
```



---
## __name__
```python
from atari_preprocessing import __name__
```

Implementation of Atari 2600 Preprocessing following the guidelines of Machado et al., 2018.

---
## AtariPreprocessing
```python
from atari_preprocessing import AtariPreprocessing
```

Atari 2600 preprocessing wrapper.

This class follows the guidelines in Machado et al. (2018),
"Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents".

Specifically, the following preprocess stages applies to the atari environment:

- Noop Reset: Obtains the initial state by taking a random number of no-ops on reset, default max 30 no-ops.
- Frame skipping: The number of frames skipped between steps, 4 by default
- Max-pooling: Pools over the most recent two observations from the frame skips
- Termination signal when a life is lost: When the agent losses a life during the environment, then the environment is terminated.
    Turned off by default. Not recommended by Machado et al. (2018).
- Resize to a square image: Resizes the atari environment original observation shape from 210x180 to 84x84 by default
- Grayscale observation: If the observation is colour or greyscale, by default, greyscale.
- Scale observation: If to scale the observation between [0, 1) or [0, 255), by default, not scaled.

---
## __init__
```python
from atari_preprocessing import __init__
```

Wrapper for Atari 2600 preprocessing.

Args:
    env (Env): The environment to apply the preprocessing
    noop_max (int): For No-op reset, the max number no-ops actions are taken at reset, to turn off, set to 0.
    frame_skip (int): The number of frames between new observation the agents observations effecting the frequency at which the agent experiences the game.
    screen_size (int): resize Atari frame
    terminal_on_life_loss (bool): `if True`, then :meth:`step()` returns `terminated=True` whenever a
        life is lost.
    grayscale_obs (bool): if True, then gray scale observation is returned, otherwise, RGB observation
        is returned.
    grayscale_newaxis (bool): `if True and grayscale_obs=True`, then a channel axis is added to
        grayscale observations to make them 3-dimensional.
    scale_obs (bool): if True, then observation normalized in range [0,1) is returned. It also limits memory
        optimization benefits of FrameStack Wrapper.

Raises:
    DependencyNotInstalled: opencv-python package not installed
    ValueError: Disable frame-skipping in the original env

---
## ale
```python
from atari_preprocessing import ale
```

Make ale as a class property to avoid serialization error.

---
## step
```python
from atari_preprocessing import step
```

Applies the preprocessing for an :meth:`env.step`.

---
## reset
```python
from atari_preprocessing import reset
```

Resets the environment using preprocessing.

---
## _get_obs
```python
from atari_preprocessing import _get_obs
```



---
## __name__
```python
from frame_stack import __name__
```

Wrapper that stacks frames.

---
## LazyFrames
```python
from frame_stack import LazyFrames
```

Ensures common frames are only stored once to optimize memory use.

To further reduce the memory use, it is optionally to turn on lz4 to compress the observations.

Note:
    This object should only be converted to numpy array just before forward pass.

---
## FrameStack
```python
from frame_stack import FrameStack
```

Observation wrapper that stacks the observations in a rolling manner.

For example, if the number of stacks is 4, then the returned observation contains
the most recent 4 observations. For environment 'Pendulum-v1', the original observation
is an array with shape [3], so if we stack 4 observations, the processed observation
has shape [4, 3].

Note:
    - To be memory efficient, the stacked observations are wrapped by :class:`LazyFrame`.
    - The observation space must be :class:`Box` type. If one uses :class:`Dict`
      as observation space, it should apply :class:`FlattenObservation` wrapper first.
    - After :meth:`reset` is called, the frame buffer will be filled with the initial observation.
      I.e. the observation returned by :meth:`reset` will consist of `num_stack` many identical frames.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import FrameStack
    >>> env = gym.make("CarRacing-v2")
    >>> env = FrameStack(env, 4)
    >>> env.observation_space
    Box(0, 255, (4, 96, 96, 3), uint8)
    >>> obs, _ = env.reset()
    >>> obs.shape
    (4, 96, 96, 3)

---
## __init__
```python
from frame_stack import __init__
```

Observation wrapper that stacks the observations in a rolling manner.

Args:
    env (Env): The environment to apply the wrapper
    num_stack (int): The number of frames to stack
    lz4_compress (bool): Use lz4 to compress the frames internally

---
## __array__
```python
from frame_stack import __array__
```

Gets a numpy array of stacked frames with specific dtype.

Args:
    dtype: The dtype of the stacked frames

Returns:
    The array of stacked frames with dtype

---
## __len__
```python
from frame_stack import __len__
```

Returns the number of frame stacks.

Returns:
    The number of frame stacks

---
## __getitem__
```python
from frame_stack import __getitem__
```

Gets the stacked frames for a particular index or slice.

Args:
    int_or_slice: Index or slice to get items for

Returns:
    np.stacked frames for the int or slice

---
## __eq__
```python
from frame_stack import __eq__
```

Checks that the current frames are equal to the other object.

---
## _check_decompress
```python
from frame_stack import _check_decompress
```



---
## observation
```python
from frame_stack import observation
```

Converts the wrappers current frames to lazy frames.

Args:
    observation: Ignored

Returns:
    :class:`LazyFrames` object for the wrapper's frame buffer,  :attr:`self.frames`

---
## step
```python
from frame_stack import step
```

Steps through the environment, appending the observation to the frame buffer.

Args:
    action: The action to step through the environment with

Returns:
    Stacked observations, reward, terminated, truncated, and information from the environment

---
## reset
```python
from frame_stack import reset
```

Reset the environment with kwargs.

Args:
    **kwargs: The kwargs for the environment reset

Returns:
    The stacked observations

---
## __name__
```python
from rescale_action import __name__
```

Wrapper for rescaling actions to within a max and min action.

---
## RescaleAction
```python
from rescale_action import RescaleAction
```

Affinely rescales the continuous action space of the environment to the range [min_action, max_action].

The base environment :attr:`env` must have an action space of type :class:`spaces.Box`. If :attr:`min_action`
or :attr:`max_action` are numpy arrays, the shape must match the shape of the environment's action space.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import RescaleAction
    >>> import numpy as np
    >>> env = gym.make("Hopper-v4")
    >>> _ = env.reset(seed=42)
    >>> obs, _, _, _, _ = env.step(np.array([1,1,1]))
    >>> _ = env.reset(seed=42)
    >>> min_action = -0.5
    >>> max_action = np.array([0.0, 0.5, 0.75])
    >>> wrapped_env = RescaleAction(env, min_action=min_action, max_action=max_action)
    >>> wrapped_env_obs, _, _, _, _ = wrapped_env.step(max_action)
    >>> np.alltrue(obs == wrapped_env_obs)
    True

---
## __init__
```python
from rescale_action import __init__
```

Initializes the :class:`RescaleAction` wrapper.

Args:
    env (Env): The environment to apply the wrapper
    min_action (float, int or np.ndarray): The min values for each action. This may be a numpy array or a scalar.
    max_action (float, int or np.ndarray): The max values for each action. This may be a numpy array or a scalar.

---
## action
```python
from rescale_action import action
```

Rescales the action affinely from  [:attr:`min_action`, :attr:`max_action`] to the action space of the base environment, :attr:`env`.

Args:
    action: The action to rescale

Returns:
    The rescaled action

---
## __name__
```python
from record_episode_statistics import __name__
```

Wrapper that tracks the cumulative rewards and episode lengths.

---
## RecordEpisodeStatistics
```python
from record_episode_statistics import RecordEpisodeStatistics
```

This wrapper will keep track of cumulative rewards and episode lengths.

At the end of an episode, the statistics of the episode will be added to ``info``
using the key ``episode``. If using a vectorized environment also the key
``_episode`` is used which indicates whether the env at the respective index has
the episode statistics.

After the completion of an episode, ``info`` will look like this::

    >>> info = {
    ...     "episode": {
    ...         "r": "<cumulative reward>",
    ...         "l": "<episode length>",
    ...         "t": "<elapsed time since beginning of episode>"
    ...     },
    ... }

For a vectorized environments the output will be in the form of::

    >>> infos = {
    ...     "final_observation": "<array of length num-envs>",
    ...     "_final_observation": "<boolean array of length num-envs>",
    ...     "final_info": "<array of length num-envs>",
    ...     "_final_info": "<boolean array of length num-envs>",
    ...     "episode": {
    ...         "r": "<array of cumulative reward>",
    ...         "l": "<array of episode length>",
    ...         "t": "<array of elapsed time since beginning of episode>"
    ...     },
    ...     "_episode": "<boolean array of length num-envs>"
    ... }

Moreover, the most recent rewards and episode lengths are stored in buffers that can be accessed via
:attr:`wrapped_env.return_queue` and :attr:`wrapped_env.length_queue` respectively.

Attributes:
    return_queue: The cumulative rewards of the last ``deque_size``-many episodes
    length_queue: The lengths of the last ``deque_size``-many episodes

---
## __init__
```python
from record_episode_statistics import __init__
```

This wrapper will keep track of cumulative rewards and episode lengths.

Args:
    env (Env): The environment to apply the wrapper
    deque_size: The size of the buffers :attr:`return_queue` and :attr:`length_queue`

---
## reset
```python
from record_episode_statistics import reset
```

Resets the environment using kwargs and resets the episode returns and lengths.

---
## step
```python
from record_episode_statistics import step
```

Steps through the environment, recording the episode statistics.

---
## __name__
```python
from functional_jax_env import __name__
```

Functional to Environment compatibility.

---
## FunctionalJaxEnv
```python
from functional_jax_env import FunctionalJaxEnv
```

A conversion layer for jax-based environments.

---
## FunctionalJaxVectorEnv
```python
from functional_jax_env import FunctionalJaxVectorEnv
```

A vector env implementation for functional Jax envs.

---
## __init__
```python
from functional_jax_env import __init__
```

Initialize the environment from a FuncEnv.

---
## reset
```python
from functional_jax_env import reset
```

Resets the environment.

---
## step
```python
from functional_jax_env import step
```

Steps through the environment using the action.

---
## render
```python
from functional_jax_env import render
```

Returns the render state if `render_mode` is "rgb_array".

---
## close
```python
from functional_jax_env import close
```

Closes the environments and render state if set.

---
## __name__
```python
from functional import __name__
```

pygments.lexers.functional
~~~~~~~~~~~~~~~~~~~~~~~~~~

Just export lexer classes previously contained in this module.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FuncEnv
```python
from functional import FuncEnv
```

Base class (template) for functional envs.

This API is meant to be used in a stateless manner, with the environment state being passed around explicitly.
That being said, nothing here prevents users from using the environment statefully, it's just not recommended.
A functional env consists of the following functions (in this case, instance methods):
- initial: returns the initial state of the POMDP
- observation: returns the observation in a given state
- transition: returns the next state after taking an action in a given state
- reward: returns the reward for a given (state, action, next_state) tuple
- terminal: returns whether a given state is terminal
- state_info: optional, returns a dict of info about a given state
- step_info: optional, returns a dict of info about a given (state, action, next_state) tuple

The class-based structure serves the purpose of allowing environment constants to be defined in the class,
and then using them by name in the code itself.

For the moment, this is predominantly for internal use. This API is likely to change, but in the future
we intend to flesh it out and officially expose it to end users.

---
## __init__
```python
from functional import __init__
```

Initialize the environment constants.

---
## initial
```python
from functional import initial
```

Initial state.

---
## transition
```python
from functional import transition
```

Transition.

---
## observation
```python
from functional import observation
```

Observation.

---
## reward
```python
from functional import reward
```

Reward.

---
## terminal
```python
from functional import terminal
```

Terminal state.

---
## state_info
```python
from functional import state_info
```

Info dict about a single state.

---
## step_info
```python
from functional import step_info
```

Info dict about a full transition.

---
## transform
```python
from functional import transform
```

Functional transformations.

---
## render_image
```python
from functional import render_image
```

Show the state.

---
## render_init
```python
from functional import render_init
```

Initialize the render state.

---
## render_close
```python
from functional import render_close
```

Close the render state.

---
## __name__
```python
from tuple import __name__
```

Implementation of a space that represents the cartesian product of other spaces.

---
## Tuple
```python
from tuple import Tuple
```

A tuple (more precisely: the cartesian product) of :class:`Space` instances.

Elements of this space are tuples of elements of the constituent spaces.

Example:
    >>> from gymnasium.spaces import Tuple, Box, Discrete
    >>> observation_space = Tuple((Discrete(2), Box(-1, 1, shape=(2,))), seed=42)
    >>> observation_space.sample()
    (0, array([-0.3991573 ,  0.21649833], dtype=float32))

---
## __init__
```python
from tuple import __init__
```

Constructor of :class:`Tuple` space.

The generated instance will represent the cartesian product :math:`\text{spaces}[0] \times ... \times \text{spaces}[-1]`.

Args:
    spaces (Iterable[Space]): The spaces that are involved in the cartesian product.
    seed: Optionally, you can use this argument to seed the RNGs of the ``spaces`` to ensure reproducible sampling.

---
## is_np_flattenable
```python
from tuple import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## seed
```python
from tuple import seed
```

Seed the PRNG of this space and all subspaces.

Depending on the type of seed, the subspaces will be seeded differently

* ``None`` - All the subspaces will use a random initial seed
* ``Int`` - The integer is used to seed the `Tuple` space that is used to generate seed values for each of the subspaces. Warning, this does not guarantee unique seeds for all of the subspaces.
* ``List`` - Values used to seed the subspaces. This allows the seeding of multiple composite subspaces (``List(42, 54, ...``).

Args:
    seed: An optional list of ints or int to seed the (sub-)spaces.

---
## sample
```python
from tuple import sample
```

Generates a single random sample inside this space.

This method draws independent samples from the subspaces.

Args:
    mask: An optional tuple of optional masks for each of the subspace's samples,
        expects the same number of masks as spaces

Returns:
    Tuple of the subspace's samples

---
## contains
```python
from tuple import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __repr__
```python
from tuple import __repr__
```

Gives a string representation of this space.

---
## to_jsonable
```python
from tuple import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from tuple import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __getitem__
```python
from tuple import __getitem__
```

Get the subspace at specific `index`.

---
## __len__
```python
from tuple import __len__
```

Get the number of subspaces that are involved in the cartesian product.

---
## __eq__
```python
from tuple import __eq__
```

Check whether ``other`` is equivalent to this instance.

---
## _short_repr
```python
from box import _short_repr
```

Create a shortened string representation of a numpy array.

If arr is a multiple of the all-ones vector, return a string representation of the multiplier.
Otherwise, return a string representation of the entire array.

Args:
    arr: The array to represent

Returns:
    A short representation of the array

---
## is_float_integer
```python
from box import is_float_integer
```

Checks if a variable is an integer or float.

---
## get_precision
```python
from box import get_precision
```

Get precision of a data type.

---
## _broadcast
```python
from box import _broadcast
```

Handle infinite bounds and broadcast at the same time if needed.

This is needed primarily because:
    >>> import numpy as np
    >>> np.full((2,), np.inf, dtype=np.int32)
    array([-2147483648, -2147483648], dtype=int32)

---
## shape
```python
from box import shape
```

Has stricter type than gym.Space - never None.

---
## is_np_flattenable
```python
from box import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## is_bounded
```python
from box import is_bounded
```

Checks whether the box is bounded in some sense.

Args:
    manner (str): One of ``"both"``, ``"below"``, ``"above"``.

Returns:
    If the space is bounded

Raises:
    ValueError: If `manner` is neither ``"both"`` nor ``"below"`` or ``"above"``

---
## sample
```python
from box import sample
```

Generates a single random sample inside the Box.

In creating a sample of the box, each coordinate is sampled (independently) from a distribution
that is chosen according to the form of the interval:

* :math:`[a, b]` : uniform distribution
* :math:`[a, \infty)` : shifted exponential distribution
* :math:`(-\infty, b]` : shifted negative exponential distribution
* :math:`(-\infty, \infty)` : normal distribution

Args:
    mask: A mask for sampling values from the Box space, currently unsupported.

Returns:
    A sampled value from the Box

---
## contains
```python
from box import contains
```

Return boolean specifying if x is a valid member of this space.

---
## to_jsonable
```python
from box import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from box import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __eq__
```python
from box import __eq__
```

Check whether `other` is equivalent to this instance. Doesn't check dtype equivalence.

---
## __setstate__
```python
from box import __setstate__
```

Sets the state of the box for unpickling a box with legacy support.

---
## __name__
```python
from multi_discrete import __name__
```

Implementation of a space that represents the cartesian product of `Discrete` spaces.

---
## MultiDiscrete
```python
from multi_discrete import MultiDiscrete
```

This represents the cartesian product of arbitrary :class:`Discrete` spaces.

It is useful to represent game controllers or keyboards where each key can be represented as a discrete action space.

Note:
    Some environment wrappers assume a value of 0 always represents the NOOP action.

e.g. Nintendo Game Controller - Can be conceptualized as 3 discrete action spaces:

1. Arrow Keys: Discrete 5  - NOOP[0], UP[1], RIGHT[2], DOWN[3], LEFT[4]  - params: min: 0, max: 4
2. Button A:   Discrete 2  - NOOP[0], Pressed[1] - params: min: 0, max: 1
3. Button B:   Discrete 2  - NOOP[0], Pressed[1] - params: min: 0, max: 1

It can be initialized as ``MultiDiscrete([ 5, 2, 2 ])`` such that a sample might be ``array([3, 1, 0])``.

Although this feature is rarely used, :class:`MultiDiscrete` spaces may also have several axes
if ``nvec`` has several axes:

Example:
    >>> from gymnasium.spaces import MultiDiscrete
    >>> import numpy as np
    >>> observation_space = MultiDiscrete(np.array([[1, 2], [3, 4]]), seed=42)
    >>> observation_space.sample()
    array([[0, 0],
           [2, 2]])

---
## __init__
```python
from multi_discrete import __init__
```

Constructor of :class:`MultiDiscrete` space.

The argument ``nvec`` will determine the number of values each categorical variable can take. If
``start`` is provided, it will define the minimal values corresponding to each categorical variable.

Args:
    nvec: vector of counts of each categorical variable. This will usually be a list of integers. However,
        you may also pass a more complicated numpy array if you'd like the space to have several axes.
    dtype: This should be some kind of integer type.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.
    start: Optionally, the starting value the element of each class will take (defaults to 0).

---
## shape
```python
from multi_discrete import shape
```

Has stricter type than :class:`gym.Space` - never None.

---
## is_np_flattenable
```python
from multi_discrete import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## sample
```python
from multi_discrete import sample
```

Generates a single random sample this space.

Args:
    mask: An optional mask for multi-discrete, expects tuples with a `np.ndarray` mask in the position of each
        action with shape `(n,)` where `n` is the number of actions and `dtype=np.int8`.
        Only mask values == 1 are possible to sample unless all mask values for an action are 0 then the default action `self.start` (the smallest element) is sampled.

Returns:
    An `np.ndarray` of shape `space.shape`

---
## contains
```python
from multi_discrete import contains
```

Return boolean specifying if x is a valid member of this space.

---
## to_jsonable
```python
from multi_discrete import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from multi_discrete import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __repr__
```python
from multi_discrete import __repr__
```

Gives a string representation of this space.

---
## __getitem__
```python
from multi_discrete import __getitem__
```

Extract a subspace from this ``MultiDiscrete`` space.

---
## __len__
```python
from multi_discrete import __len__
```

Gives the ``len`` of samples from this space.

---
## __eq__
```python
from multi_discrete import __eq__
```

Check whether ``other`` is equivalent to this instance.

---
## __setstate__
```python
from multi_discrete import __setstate__
```

Used when loading a pickled space.

This method has to be implemented explicitly to allow for loading of legacy states.

Args:
    state: The new state

---
## _apply_mask
```python
from multi_discrete import _apply_mask
```



---
## __name__
```python
from sequence import __name__
```

Implementation of a space that represents finite-length sequences.

---
## Sequence
```python
from sequence import Sequence
```

This space represent sets of finite-length sequences.

This space represents the set of tuples of the form :math:`(a_0, \dots, a_n)` where the :math:`a_i` belong
to some space that is specified during initialization and the integer :math:`n` is not fixed

Example:
    >>> from gymnasium.spaces import Sequence, Box
    >>> observation_space = Sequence(Box(0, 1), seed=2)
    >>> observation_space.sample()
    (array([0.26161215], dtype=float32),)
    >>> observation_space = Sequence(Box(0, 1), seed=0)
    >>> observation_space.sample()
    (array([0.6369617], dtype=float32), array([0.26978672], dtype=float32), array([0.04097353], dtype=float32))

---
## __init__
```python
from sequence import __init__
```

Constructor of the :class:`Sequence` space.

Args:
    space: Elements in the sequences this space represent must belong to this space.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.
    stack: If `True` then the resulting samples would be stacked.

---
## seed
```python
from sequence import seed
```

Seed the PRNG of this space and the feature space.

---
## is_np_flattenable
```python
from sequence import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## sample
```python
from sequence import sample
```

Generates a single random sample from this space.

Args:
    mask: An optional mask for (optionally) the length of the sequence and (optionally) the values in the sequence.
        If you specify `mask`, it is expected to be a tuple of the form `(length_mask, sample_mask)` where `length_mask`
        is

        * ``None`` The length will be randomly drawn from a geometric distribution
        * ``np.ndarray`` of integers, in which case the length of the sampled sequence is randomly drawn from this array.
        * ``int`` for a fixed length sample

        The second element of the mask tuple `sample` mask specifies a mask that is applied when
        sampling elements from the base space. The mask is applied for each feature space sample.

Returns:
    A tuple of random length with random samples of elements from the :attr:`feature_space`.

---
## contains
```python
from sequence import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __repr__
```python
from sequence import __repr__
```

Gives a string representation of this space.

---
## to_jsonable
```python
from sequence import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from sequence import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __eq__
```python
from sequence import __eq__
```

Check whether ``other`` is equivalent to this instance.

---
## __name__
```python
from graph import __name__
```

pygments.lexers.graph
~~~~~~~~~~~~~~~~~~~~~

Lexers for graph query languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GraphInstance
```python
from graph import GraphInstance
```

A Graph space instance.

* nodes (np.ndarray): an (n x ...) sized array representing the features for n nodes, (...) must adhere to the shape of the node space.
* edges (Optional[np.ndarray]): an (m x ...) sized array representing the features for m edges, (...) must adhere to the shape of the edge space.
* edge_links (Optional[np.ndarray]): an (m x 2) sized array of ints representing the indices of the two nodes that each edge connects.

---
## Graph
```python
from graph import Graph
```

A space representing graph information as a series of `nodes` connected with `edges` according to an adjacency matrix represented as a series of `edge_links`.

Example:
    >>> from gymnasium.spaces import Graph, Box, Discrete
    >>> observation_space = Graph(node_space=Box(low=-100, high=100, shape=(3,)), edge_space=Discrete(3), seed=42)
    >>> observation_space.sample()
    GraphInstance(nodes=array([[-12.224312 ,  71.71958  ,  39.473606 ],
           [-81.16453  ,  95.12447  ,  52.22794  ],
           [ 57.21286  , -74.37727  ,  -9.922812 ],
           [-25.840395 ,  85.353    ,  28.773024 ],
           [ 64.55232  , -11.317161 , -54.552258 ],
           [ 10.916958 , -87.23655  ,  65.52624  ],
           [ 26.33288  ,  51.61755  , -29.094807 ],
           [ 94.1396   ,  78.62422  ,  55.6767   ],
           [-61.072258 ,  -6.6557994, -91.23925  ],
           [-69.142105 ,  36.60979  ,  48.95243  ]], dtype=float32), edges=array([2, 0, 1, 1, 0, 0, 1, 0]), edge_links=array([[7, 5],
           [6, 9],
           [4, 1],
           [8, 6],
           [7, 0],
           [3, 7],
           [8, 4],
           [8, 8]], dtype=int32))

---
## __init__
```python
from graph import __init__
```

Constructor of :class:`Graph`.

The argument ``node_space`` specifies the base space that each node feature will use.
This argument must be either a Box or Discrete instance.

The argument ``edge_space`` specifies the base space that each edge feature will use.
This argument must be either a None, Box or Discrete instance.

Args:
    node_space (Union[Box, Discrete]): space of the node features.
    edge_space (Union[None, Box, Discrete]): space of the edge features.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.

---
## is_np_flattenable
```python
from graph import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## _generate_sample_space
```python
from graph import _generate_sample_space
```



---
## sample
```python
from graph import sample
```

Generates a single sample graph with num_nodes between 1 and 10 sampled from the Graph.

Args:
    mask: An optional tuple of optional node and edge mask that is only possible with Discrete spaces
        (Box spaces don't support sample masks).
        If no `num_edges` is provided then the `edge_mask` is multiplied by the number of edges
    num_nodes: The number of nodes that will be sampled, the default is 10 nodes
    num_edges: An optional number of edges, otherwise, a random number between 0 and `num_nodes` ^ 2

Returns:
    A :class:`GraphInstance` with attributes `.nodes`, `.edges`, and `.edge_links`.

---
## contains
```python
from graph import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __repr__
```python
from graph import __repr__
```

A string representation of this space.

The representation will include node_space and edge_space

Returns:
    A representation of the space

---
## __eq__
```python
from graph import __eq__
```

Check whether `other` is equivalent to this instance.

---
## to_jsonable
```python
from graph import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from graph import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __name__
```python
from discrete import __name__
```

Implementation of a space consisting of finitely many elements.

---
## Discrete
```python
from discrete import Discrete
```

A space consisting of finitely many elements.

This class represents a finite subset of integers, more specifically a set of the form :math:`\{ a, a+1, \dots, a+n-1 \}`.

Example:
    >>> from gymnasium.spaces import Discrete
    >>> observation_space = Discrete(2, seed=42) # {0, 1}
    >>> observation_space.sample()
    0
    >>> observation_space = Discrete(3, start=-1, seed=42)  # {-1, 0, 1}
    >>> observation_space.sample()
    -1

---
## __init__
```python
from discrete import __init__
```

Constructor of :class:`Discrete` space.

This will construct the space :math:`\{\text{start}, ..., \text{start} + n - 1\}`.

Args:
    n (int): The number of elements of this space.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the ``Dict`` space.
    start (int): The smallest element of this space.

---
## is_np_flattenable
```python
from discrete import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## sample
```python
from discrete import sample
```

Generates a single random sample from this space.

A sample will be chosen uniformly at random with the mask if provided

Args:
    mask: An optional mask for if an action can be selected.
        Expected `np.ndarray` of shape `(n,)` and dtype `np.int8` where `1` represents valid actions and `0` invalid / infeasible actions.
        If there are no possible actions (i.e. `np.all(mask == 0)`) then `space.start` will be returned.

Returns:
    A sampled integer from the space

---
## contains
```python
from discrete import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __repr__
```python
from discrete import __repr__
```

Gives a string representation of this space.

---
## __eq__
```python
from discrete import __eq__
```

Check whether ``other`` is equivalent to this instance.

---
## __setstate__
```python
from discrete import __setstate__
```

Used when loading a pickled space.

This method has to be implemented explicitly to allow for loading of legacy states.

Args:
    state: The new state

---
## to_jsonable
```python
from discrete import to_jsonable
```

Converts a list of samples to a list of ints.

---
## from_jsonable
```python
from discrete import from_jsonable
```

Converts a list of json samples to a list of np.int64.

---
## flatdim
```python
from utils import flatdim
```

Return the number of dimensions a flattened equivalent of this space would have.

Args:
    space: The space to return the number of dimensions of the flattened spaces

Returns:
    The number of dimensions for the flattened spaces

Raises:
     NotImplementedError: if the space is not defined in :mod:`gym.spaces`.
     ValueError: if the space cannot be flattened into a :class:`gymnasium.spaces.Box`

Example:
    >>> from gymnasium.spaces import Dict, Discrete
    >>> space = Dict({"position": Discrete(2), "velocity": Discrete(3)})
    >>> flatdim(space)
    5

---
## _flatdim_box_multibinary
```python
from utils import _flatdim_box_multibinary
```



---
## _flatdim_discrete
```python
from utils import _flatdim_discrete
```



---
## _flatdim_multidiscrete
```python
from utils import _flatdim_multidiscrete
```



---
## _flatdim_tuple
```python
from utils import _flatdim_tuple
```



---
## _flatdim_dict
```python
from utils import _flatdim_dict
```



---
## _flatdim_graph
```python
from utils import _flatdim_graph
```



---
## _flatdim_text
```python
from utils import _flatdim_text
```



---
## _flatten_box_multibinary
```python
from utils import _flatten_box_multibinary
```



---
## _flatten_discrete
```python
from utils import _flatten_discrete
```



---
## _flatten_multidiscrete
```python
from utils import _flatten_multidiscrete
```



---
## _flatten_tuple
```python
from utils import _flatten_tuple
```



---
## _flatten_dict
```python
from utils import _flatten_dict
```



---
## _flatten_graph
```python
from utils import _flatten_graph
```

We're not using ``.unflatten()`` for :class:`Box` and :class:`Discrete` because a graph is not a homogeneous space, see `.flatten` docstring.

---
## _flatten_text
```python
from utils import _flatten_text
```



---
## _flatten_sequence
```python
from utils import _flatten_sequence
```



---
## unflatten
```python
from utils import unflatten
```

Unflatten a data point from a space.

This reverses the transformation applied by :func:`flatten`. You must ensure
that the ``space`` argument is the same as for the :func:`flatten` call.

Args:
    space: The space used to unflatten ``x``
    x: The array to unflatten

Returns:
    A point with a structure that matches the space.

Raises:
    NotImplementedError: if the space is not defined in :mod:`gymnasium.spaces`.

---
## _unflatten_box_multibinary
```python
from utils import _unflatten_box_multibinary
```



---
## _unflatten_discrete
```python
from utils import _unflatten_discrete
```



---
## _unflatten_multidiscrete
```python
from utils import _unflatten_multidiscrete
```



---
## _unflatten_tuple
```python
from utils import _unflatten_tuple
```



---
## _unflatten_dict
```python
from utils import _unflatten_dict
```



---
## _unflatten_graph
```python
from utils import _unflatten_graph
```

We're not using `.unflatten() for :class:`Box` and :class:`Discrete` because a graph is not a homogeneous space.

The size of the outcome is actually not fixed, but determined based on the number of
nodes and edges in the graph.

---
## _unflatten_text
```python
from utils import _unflatten_text
```



---
## _unflatten_sequence
```python
from utils import _unflatten_sequence
```



---
## flatten_space
```python
from utils import flatten_space
```

Flatten a space into a space that is as flat as possible.

This function will attempt to flatten ``space`` into a single :class:`gymnasium.spaces.Box` space.
However, this might not be possible when ``space`` is an instance of :class:`gymnasium.spaces.Graph`,
:class:`gymnasium.spaces.Sequence` or a compound space that contains a :class:`gymnasium.spaces.Graph`
or :class:`gymnasium.spaces.Sequence` space.
This is equivalent to :func:`flatten`, but operates on the space itself. The
result for non-graph spaces is always a :class:`gymnasium.spaces.Box` with flat boundaries. While
the result for graph spaces is always a :class:`gymnasium.spaces.Graph` with
:attr:`Graph.node_space` being a ``Box``
with flat boundaries and :attr:`Graph.edge_space` being a ``Box`` with flat boundaries or
``None``. The box has exactly :func:`flatdim` dimensions. Flattening a sample
of the original space has the same effect as taking a sample of the flattened
space. However, sampling from the flattened space is not necessarily reversible.
For example, sampling from a flattened Discrete space is the same as sampling from
a Box, and the results may not be integers or one-hot encodings. This may result in
errors or non-uniform sampling.

Args:
    space: The space to flatten

Returns:
    A flattened Box

Raises:
    NotImplementedError: if the space is not defined in :mod:`gymnasium.spaces`.

Example:
    Flatten spaces.Box:
    >>> from gymnasium.spaces import Box
    >>> box = Box(0.0, 1.0, shape=(3, 4, 5))
    >>> box
    Box(0.0, 1.0, (3, 4, 5), float32)
    >>> flatten_space(box)
    Box(0.0, 1.0, (60,), float32)
    >>> flatten(box, box.sample()) in flatten_space(box)
    True

    Flatten spaces.Discrete:
    >>> from gymnasium.spaces import Discrete
    >>> discrete = Discrete(5)
    >>> flatten_space(discrete)
    Box(0, 1, (5,), int64)
    >>> flatten(discrete, discrete.sample()) in flatten_space(discrete)
    True

    Flatten spaces.Dict:
    >>> from gymnasium.spaces import Dict, Discrete, Box
    >>> space = Dict({"position": Discrete(2), "velocity": Box(0, 1, shape=(2, 2))})
    >>> flatten_space(space)
    Box(0.0, 1.0, (6,), float64)
    >>> flatten(space, space.sample()) in flatten_space(space)
    True

    Flatten spaces.Graph:
    >>> from gymnasium.spaces import Graph, Discrete, Box
    >>> space = Graph(node_space=Box(low=-100, high=100, shape=(3, 4)), edge_space=Discrete(5))
    >>> flatten_space(space)
    Graph(Box(-100.0, 100.0, (12,), float32), Box(0, 1, (5,), int64))
    >>> flatten(space, space.sample()) in flatten_space(space)
    True

---
## _flatten_space_box
```python
from utils import _flatten_space_box
```



---
## _flatten_space_binary
```python
from utils import _flatten_space_binary
```



---
## _flatten_space_tuple
```python
from utils import _flatten_space_tuple
```



---
## _flatten_space_dict
```python
from utils import _flatten_space_dict
```



---
## _flatten_space_graph
```python
from utils import _flatten_space_graph
```



---
## _flatten_space_text
```python
from utils import _flatten_space_text
```



---
## _flatten_space_sequence
```python
from utils import _flatten_space_sequence
```



---
## _graph_unflatten
```python
from utils import _graph_unflatten
```



---
## sample
```python
from text import sample
```

Generates a single random sample from this space with by default a random length between `min_length` and `max_length` and sampled from the `charset`.

Args:
    mask: An optional tuples of length and mask for the text.
        The length is expected to be between the `min_length` and `max_length` otherwise a random integer between `min_length` and `max_length` is selected.
        For the mask, we expect a numpy array of length of the charset passed with `dtype == np.int8`.
        If the charlist mask is all zero then an empty string is returned no matter the `min_length`

Returns:
    A sampled string from the space

---
## character_set
```python
from text import character_set
```

Returns the character set for the space.

---
## character_list
```python
from text import character_list
```

Returns a tuple of characters in the space.

---
## character_index
```python
from text import character_index
```

Returns a unique index for each character in the space's character set.

---
## characters
```python
from text import characters
```

Returns a string with all Text characters.

---
## is_np_flattenable
```python
from text import is_np_flattenable
```

The flattened version is an integer array for each character, padded to the max character length.

---
## __name__
```python
from dict import __name__
```

Implementation of a space that represents the cartesian product of other spaces as a dictionary.

---
## Dict
```python
from dict import Dict
```

A dictionary of :class:`Space` instances.

Elements of this space are (ordered) dictionaries of elements from the constituent spaces.

Example:
    >>> from gymnasium.spaces import Dict, Box, Discrete
    >>> observation_space = Dict({"position": Box(-1, 1, shape=(2,)), "color": Discrete(3)}, seed=42)
    >>> observation_space.sample()
    OrderedDict([('color', 0), ('position', array([-0.3991573 ,  0.21649833], dtype=float32))])

    With a nested dict:

    >>> from gymnasium.spaces import Box, Dict, Discrete, MultiBinary, MultiDiscrete
    >>> Dict(  # doctest: +SKIP
    ...     {
    ...         "ext_controller": MultiDiscrete([5, 2, 2]),
    ...         "inner_state": Dict(
    ...             {
    ...                 "charge": Discrete(100),
    ...                 "system_checks": MultiBinary(10),
    ...                 "job_status": Dict(
    ...                     {
    ...                         "task": Discrete(5),
    ...                         "progress": Box(low=0, high=100, shape=()),
    ...                     }
    ...                 ),
    ...             }
    ...         ),
    ...     }
    ... )

It can be convenient to use :class:`Dict` spaces if you want to make complex observations or actions more human-readable.
Usually, it will not be possible to use elements of this space directly in learning code. However, you can easily
convert `Dict` observations to flat arrays by using a :class:`gymnasium.wrappers.FlattenObservation` wrapper.
Similar wrappers can be implemented to deal with :class:`Dict` actions.

---
## __init__
```python
from dict import __init__
```

Constructor of :class:`Dict` space.

This space can be instantiated in one of two ways: Either you pass a dictionary
of spaces to :meth:`__init__` via the ``spaces`` argument, or you pass the spaces as separate
keyword arguments (where you will need to avoid the keys ``spaces`` and ``seed``)

Args:
    spaces: A dictionary of spaces. This specifies the structure of the :class:`Dict` space
    seed: Optionally, you can use this argument to seed the RNGs of the spaces that make up the :class:`Dict` space.
    **spaces_kwargs: If ``spaces`` is ``None``, you need to pass the constituent spaces as keyword arguments, as described above.

---
## is_np_flattenable
```python
from dict import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## seed
```python
from dict import seed
```

Seed the PRNG of this space and all subspaces.

Depending on the type of seed, the subspaces will be seeded differently

* ``None`` - All the subspaces will use a random initial seed
* ``Int`` - The integer is used to seed the :class:`Dict` space that is used to generate seed values for each of the subspaces. Warning, this does not guarantee unique seeds for all of the subspaces.
* ``Dict`` - Using all the keys in the seed dictionary, the values are used to seed the subspaces. This allows the seeding of multiple composite subspaces (``Dict["space": Dict[...], ...]`` with ``{"space": {...}, ...}``).

Args:
    seed: An optional list of ints or int to seed the (sub-)spaces.

---
## sample
```python
from dict import sample
```

Generates a single random sample from this space.

The sample is an ordered dictionary of independent samples from the constituent spaces.

Args:
    mask: An optional mask for each of the subspaces, expects the same keys as the space

Returns:
    A dictionary with the same key and sampled values from :attr:`self.spaces`

---
## contains
```python
from dict import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __getitem__
```python
from dict import __getitem__
```

Get the space that is associated to `key`.

---
## keys
```python
from dict import keys
```

Returns the keys of the Dict.

---
## __setitem__
```python
from dict import __setitem__
```

Set the space that is associated to `key`.

---
## __iter__
```python
from dict import __iter__
```

Iterator through the keys of the subspaces.

---
## __len__
```python
from dict import __len__
```

Gives the number of simpler spaces that make up the `Dict` space.

---
## __repr__
```python
from dict import __repr__
```

Gives a string representation of this space.

---
## __eq__
```python
from dict import __eq__
```

Check whether `other` is equivalent to this instance.

---
## to_jsonable
```python
from dict import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from dict import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __name__
```python
from space import __name__
```

Implementation of the `Space` metaclass.

---
## Space
```python
from space import Space
```

Superclass that is used to define observation and action spaces.

Spaces are crucially used in Gym to define the format of valid actions and observations.
They serve various purposes:

* They clearly define how to interact with environments, i.e. they specify what actions need to look like
  and what observations will look like
* They allow us to work with highly structured data (e.g. in the form of elements of :class:`Dict` spaces)
  and painlessly transform them into flat arrays that can be used in learning code
* They provide a method to sample random elements. This is especially useful for exploration and debugging.

Different spaces can be combined hierarchically via container spaces (:class:`Tuple` and :class:`Dict`) to build a
more expressive space

Warning:
    Custom observation & action spaces can inherit from the ``Space``
    class. However, most use-cases should be covered by the existing space
    classes (e.g. :class:`Box`, :class:`Discrete`, etc...), and container classes (:class`Tuple` &
    :class:`Dict`). Note that parametrized probability distributions (through the
    :meth:`Space.sample()` method), and batching functions (in :class:`gym.vector.VectorEnv`), are
    only well-defined for instances of spaces provided in gym by default.
    Moreover, some implementations of Reinforcement Learning algorithms might
    not handle custom spaces properly. Use custom spaces with care.

---
## __init__
```python
from space import __init__
```

Constructor of :class:`Space`.

Args:
    shape (Optional[Sequence[int]]): If elements of the space are numpy arrays, this should specify their shape.
    dtype (Optional[Type | str]): If elements of the space are numpy arrays, this should specify their dtype.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space

---
## np_random
```python
from space import np_random
```

Lazily seed the PRNG since this is expensive and only needed if sampling from this space.

As :meth:`seed` is not guaranteed to set the `_np_random` for particular seeds. We add a
check after :meth:`seed` to set a new random number generator.

---
## shape
```python
from space import shape
```

Return the shape of the space as an immutable property.

---
## is_np_flattenable
```python
from space import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`gymnasium.spaces.Box`.

---
## sample
```python
from space import sample
```

Randomly sample an element of this space.

Can be uniform or non-uniform sampling based on boundedness of space.

Args:
    mask: A mask used for sampling, expected ``dtype=np.int8`` and see sample implementation for expected shape.

Returns:
    A sampled actions from the space

---
## seed
```python
from space import seed
```

Seed the PRNG of this space and possibly the PRNGs of subspaces.

---
## contains
```python
from space import contains
```

Return boolean specifying if x is a valid member of this space.

---
## __contains__
```python
from space import __contains__
```

Return boolean specifying if x is a valid member of this space.

---
## __setstate__
```python
from space import __setstate__
```

Used when loading a pickled space.

This method was implemented explicitly to allow for loading of legacy states.

Args:
    state: The updated state value

---
## to_jsonable
```python
from space import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from space import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __name__
```python
from multi_binary import __name__
```

Implementation of a space that consists of binary np.ndarrays of a fixed shape.

---
## MultiBinary
```python
from multi_binary import MultiBinary
```

An n-shape binary space.

Elements of this space are binary arrays of a shape that is fixed during construction.

Example:
    >>> from gymnasium.spaces import MultiBinary
    >>> observation_space = MultiBinary(5, seed=42)
    >>> observation_space.sample()
    array([1, 0, 1, 0, 1], dtype=int8)
    >>> observation_space = MultiBinary([3, 2], seed=42)
    >>> observation_space.sample()
    array([[1, 0],
           [1, 0],
           [1, 1]], dtype=int8)

---
## __init__
```python
from multi_binary import __init__
```

Constructor of :class:`MultiBinary` space.

Args:
    n: This will fix the shape of elements of the space. It can either be an integer (if the space is flat)
        or some sort of sequence (tuple, list or np.ndarray) if there are multiple axes.
    seed: Optionally, you can use this argument to seed the RNG that is used to sample from the space.

---
## shape
```python
from multi_binary import shape
```

Has stricter type than gym.Space - never None.

---
## is_np_flattenable
```python
from multi_binary import is_np_flattenable
```

Checks whether this space can be flattened to a :class:`spaces.Box`.

---
## sample
```python
from multi_binary import sample
```

Generates a single random sample from this space.

A sample is drawn by independent, fair coin tosses (one toss per binary variable of the space).

Args:
    mask: An optional np.ndarray to mask samples with expected shape of ``space.shape``.
        For mask == 0 then the samples will be 0 and mask == 1 then random samples will be generated.
        The expected mask shape is the space shape and mask dtype is `np.int8`.

Returns:
    Sampled values from space

---
## contains
```python
from multi_binary import contains
```

Return boolean specifying if x is a valid member of this space.

---
## to_jsonable
```python
from multi_binary import to_jsonable
```

Convert a batch of samples from this space to a JSONable data type.

---
## from_jsonable
```python
from multi_binary import from_jsonable
```

Convert a JSONable data type to a batch of samples from this space.

---
## __repr__
```python
from multi_binary import __repr__
```

Gives a string representation of this space.

---
## __eq__
```python
from multi_binary import __eq__
```

Check whether `other` is equivalent to this instance.

---
## __name__
```python
from seeding import __name__
```

Set of random number generator functions: seeding, generator, hashing seeds.

---
## np_random
```python
from seeding import np_random
```

Generates a random number generator from the seed and returns the Generator and seed.

Args:
    seed: The seed used to create the generator

Returns:
    The generator and resulting seed

Raises:
    Error: Seed must be a non-negative integer or omitted

---
## __name__
```python
from save_video import __name__
```

Utility functions to save rendering videos.

---
## capped_cubic_video_schedule
```python
from save_video import capped_cubic_video_schedule
```

The default episode trigger.

This function will trigger recordings at the episode indices 0, 1, 4, 8, 27, ..., :math:`k^3`, ..., 729, 1000, 2000, 3000, ...

Args:
    episode_id: The episode number

Returns:
    If to apply a video schedule number

---
## save_video
```python
from save_video import save_video
```

Save videos from rendering frames.

This function extract video from a list of render frame episodes.

Args:
    frames (List[RenderFrame]): A list of frames to compose the video.
    video_folder (str): The folder where the recordings will be stored
    episode_trigger: Function that accepts an integer and returns ``True`` iff a recording should be started at this episode
    step_trigger: Function that accepts an integer and returns ``True`` iff a recording should be started at this step
    video_length (int): The length of recorded episodes. If it isn't specified, the entire episode is recorded.
        Otherwise, snippets of the specified length are captured.
    name_prefix (str): Will be prepended to the filename of the recordings.
    episode_index (int): The index of the current episode.
    step_starting_index (int): The step index of the first frame.
    **kwargs: The kwargs that will be passed to moviepy's ImageSequenceClip.
        You need to specify either fps or duration.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.utils.save_video import save_video
    >>> env = gym.make("FrozenLake-v1", render_mode="rgb_array_list")
    >>> _ = env.reset()
    >>> step_starting_index = 0
    >>> episode_index = 0
    >>> for step_index in range(199): # doctest: +SKIP
    ...    action = env.action_space.sample()
    ...    _, _, terminated, truncated, _ = env.step(action)
    ...
    ...    if terminated or truncated:
    ...       save_video(
    ...          env.render(),
    ...          "videos",
    ...          fps=env.metadata["render_fps"],
    ...          step_starting_index=step_starting_index,
    ...          episode_index=episode_index
    ...       )
    ...       step_starting_index = step_index + 1
    ...       episode_index += 1
    ...       env.reset()
    >>> env.close()

---
## __name__
```python
from env_match import __name__
```

A set of tests to help the desiner of gymansium environments verify that they work correctly.

---
## check_environments_match
```python
from env_match import check_environments_match
```

Checks if the environments `env_a` & `env_b` are identical.

Args:
    env_a: First environment to check.
    env_b: Second environment to check.
    num_steps: number of timesteps to test for, setting to 0 tests only resetting.
    seed: used the seed the reset & actions.
    skip_obs: If `True` it does not check for equivalence of the observation.
    skip_rew: If `True` it does not check for equivalence of the observation.
    skip_terminal: If `True` it does not check for equivalence of the observation.
    skip_truncated: If `True` it does not check for equivalence of the observation.
    skip_info: If `True` it does not check for equivalence of the observation.
    info_comparison: The options are
        If "equivalence" then checks if the `info`s are identical,
        If "superset" checks if `info_b` is a (non-strict) superset of `info_a`
        If "keys-equivalence" checks if the `info`s keys are identical (while ignoring the values).
        If "keys-superset" checks if the `info_b`s keys are a superset of `info_a`'s keys.
        If "skip" no checks are made at the `info`.

---
## data_equivalence
```python
from env_checker import data_equivalence
```

Assert equality between data 1 and 2, i.e observations, actions, info.

Args:
    data_1: data structure 1
    data_2: data structure 2

Returns:
    If observation 1 and 2 are equivalent

---
## check_reset_seed
```python
from env_checker import check_reset_seed
```

Check that the environment can be reset with a seed.

Args:
    env: The environment to check

Raises:
    AssertionError: The environment cannot be reset with a random seed,
        even though `seed` or `kwargs` appear in the signature.

---
## check_reset_options
```python
from env_checker import check_reset_options
```

Check that the environment can be reset with options.

Args:
    env: The environment to check

Raises:
    AssertionError: The environment cannot be reset with options,
        even though `options` or `kwargs` appear in the signature.

---
## check_reset_return_info_deprecation
```python
from env_checker import check_reset_return_info_deprecation
```

Makes sure support for deprecated `return_info` argument is dropped.

Args:
    env: The environment to check
Raises:
    UserWarning

---
## check_seed_deprecation
```python
from env_checker import check_seed_deprecation
```

Makes sure support for deprecated function `seed` is dropped.

Args:
    env: The environment to check
Raises:
    UserWarning

---
## check_reset_return_type
```python
from env_checker import check_reset_return_type
```

Checks that :meth:`reset` correctly returns a tuple of the form `(obs , info)`.

Args:
    env: The environment to check
Raises:
    AssertionError depending on spec violation

---
## check_space_limit
```python
from env_checker import check_space_limit
```

Check the space limit for only the Box space as a test that only runs as part of `check_env`.

---
## check_env
```python
from env_checker import check_env
```

Check that an environment follows Gym API.

This is an invasive function that calls the environment's reset and step.

This is particularly useful when using a custom environment.
Please take a look at https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/
for more information about the API.

Args:
    env: The Gym environment that will be checked
    warn: Ignored
    skip_render_check: Whether to skip the checks for the render method. True by default (useful for the CI)

---
## __name__
```python
from record_constructor import __name__
```

Allows attributes passed to `RecordConstructorArgs` to be saved. This is used by the `Wrapper.spec` to know the constructor arguments of implemented wrappers.

---
## RecordConstructorArgs
```python
from record_constructor import RecordConstructorArgs
```

Records all arguments passed to constructor to `_saved_kwargs`.

This can be used to save and reproduce class constructor arguments.

Note:
    If two class inherit from RecordConstructorArgs then the first class to call `RecordConstructorArgs.__init__(self, ...)` will have
    their kwargs saved will all subsequent `RecordConstructorArgs.__init__` being ignored.

    Therefore, always call `RecordConstructorArgs.__init__` before the `Class.__init__`

---
## __init__
```python
from record_constructor import __init__
```

Records all arguments passed to constructor to `_saved_kwargs`.

Args:
    _disable_deepcopy: If to not deepcopy the kwargs passed
    **kwargs: Arguments to save

---
## convert_to_terminated_truncated_step_api
```python
from step_api_compatibility import convert_to_terminated_truncated_step_api
```

Function to transform step returns to new step API irrespective of input API.

Args:
    step_returns (tuple): Items returned by step(). Can be (obs, rew, done, info) or (obs, rew, terminated, truncated, info)
    is_vector_env (bool): Whether the step_returns are from a vector environment

---
## convert_to_done_step_api
```python
from step_api_compatibility import convert_to_done_step_api
```

Function to transform step returns to old step API irrespective of input API.

Args:
    step_returns (tuple): Items returned by step(). Can be (obs, rew, done, info) or (obs, rew, terminated, truncated, info)
    is_vector_env (bool): Whether the step_returns are from a vector environment

---
## step_api_compatibility
```python
from step_api_compatibility import step_api_compatibility
```

Function to transform step returns to the API specified by `output_truncation_bool` bool.

Done (old) step API refers to step() method returning (observation, reward, done, info)
Terminated Truncated (new) step API refers to step() method returning (observation, reward, terminated, truncated, info)
(Refer to docs for details on the API change)

Args:
    step_returns (tuple): Items returned by step(). Can be (obs, rew, done, info) or (obs, rew, terminated, truncated, info)
    output_truncation_bool (bool): Whether the output should return two booleans (new API) or one (old) (True by default)
    is_vector_env (bool): Whether the step_returns are from a vector environment

Returns:
    step_returns (tuple): Depending on `output_truncation_bool` bool, it can return `(obs, rew, done, info)` or `(obs, rew, terminated, truncated, info)`

Example:
    This function can be used to ensure compatibility in step interfaces with conflicting API. Eg. if env is written in old API,
     wrapper is written in new API, and the final step output is desired to be in old API.

    >>> import gymnasium as gym
    >>> env = gym.make("CartPole-v0")
    >>> _ = env.reset()
    >>> obs, rewards, done, info = step_api_compatibility(env.step(0), output_truncation_bool=False)
    >>> obs, rewards, terminated, truncated, info = step_api_compatibility(env.step(0), output_truncation_bool=True)

    >>> vec_env = gym.vector.make("CartPole-v0")
    >>> _ = vec_env.reset()
    >>> obs, rewards, dones, infos = step_api_compatibility(vec_env.step([0]), is_vector_env=True, output_truncation_bool=False)
    >>> obs, rewards, terminated, truncated, info = step_api_compatibility(vec_env.step([0]), is_vector_env=True, output_truncation_bool=True)

---
## __name__
```python
from passive_env_checker import __name__
```

A set of functions for passively checking environment implementations.

---
## _check_box_observation_space
```python
from passive_env_checker import _check_box_observation_space
```

Checks that a :class:`Box` observation space is defined in a sensible way.

Args:
    observation_space: A box observation space

---
## _check_box_action_space
```python
from passive_env_checker import _check_box_action_space
```

Checks that a :class:`Box` action space is defined in a sensible way.

Args:
    action_space: A box action space

---
## check_space
```python
from passive_env_checker import check_space
```

A passive check of the environment action space that should not affect the environment.

---
## check_obs
```python
from passive_env_checker import check_obs
```

Check that the observation returned by the environment correspond to the declared one.

Args:
    obs: The observation to check
    observation_space: The observation space of the observation
    method_name: The method name that generated the observation

---
## env_reset_passive_checker
```python
from passive_env_checker import env_reset_passive_checker
```

A passive check of the `Env.reset` function investigating the returning reset information and returning the data unchanged.

---
## env_step_passive_checker
```python
from passive_env_checker import env_step_passive_checker
```

A passive check for the environment step, investigating the returning data then returning the data unchanged.

---
## _check_render_return
```python
from passive_env_checker import _check_render_return
```

Produces warning if `render_return` doesn't match `render_mode`.

---
## env_render_passive_checker
```python
from passive_env_checker import env_render_passive_checker
```

A passive check of the `Env.render` that the declared render modes/fps in the metadata of the environment is declared.

---
## __name__
```python
from play import __name__
```

Utilities of visualising an environment.

---
## MissingKeysToAction
```python
from play import MissingKeysToAction
```

Raised when the environment does not have a default ``keys_to_action`` mapping.

---
## PlayableGame
```python
from play import PlayableGame
```

Wraps an environment allowing keyboard inputs to interact with the environment.

---
## display_arr
```python
from play import display_arr
```

Displays a numpy array on screen.

Args:
    screen: The screen to show the array on
    arr: The array to show
    video_size: The video size of the screen
    transpose: If to transpose the array on the screen

---
## play
```python
from play import play
```

Allows one to play the game using keyboard.

Args:
    env: Environment to use for playing.
    transpose: If this is ``True``, the output of observation is transposed. Defaults to ``True``.
    fps: Maximum number of steps of the environment executed every second. If ``None`` (the default),
        ``env.metadata["render_fps""]`` (or 30, if the environment does not specify "render_fps") is used.
    zoom: Zoom the observation in, ``zoom`` amount, should be positive float
    callback: If a callback is provided, it will be executed after every step. It takes the following input:
            obs_t: observation before performing action
            obs_tp1: observation after performing action
            action: action that was executed
            rew: reward that was received
            terminated: whether the environment is terminated or not
            truncated: whether the environment is truncated or not
            info: debug info
    keys_to_action:  Mapping from keys pressed to action performed.
        Different formats are supported: Key combinations can either be expressed as a tuple of unicode code
        points of the keys, as a tuple of characters, or as a string where each character of the string represents
        one key.
        For example if pressing 'w' and space at the same time is supposed
        to trigger action number 2 then ``key_to_action`` dict could look like this:

            >>> key_to_action = {
            ...    # ...
            ...    (ord('w'), ord(' ')): 2
            ...    # ...
            ... }

        or like this:

            >>> key_to_action = {
            ...    # ...
            ...    ("w", " "): 2
            ...    # ...
            ... }

        or like this:

            >>> key_to_action = {
            ...    # ...
            ...    "w ": 2
            ...    # ...
            ... }

        If ``None``, default ``key_to_action`` mapping for that environment is used, if provided.
    seed: Random seed used when resetting the environment. If None, no seed is used.
    noop: The action used when no key input has been entered, or the entered key combination is unknown.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.utils.play import play
    >>> play(gym.make("CarRacing-v2", render_mode="rgb_array"), keys_to_action={  # doctest: +SKIP
    ...                                                "w": np.array([0, 0.7, 0]),
    ...                                                "a": np.array([-1, 0, 0]),
    ...                                                "s": np.array([0, 0, 1]),
    ...                                                "d": np.array([1, 0, 0]),
    ...                                                "wa": np.array([-1, 0.7, 0]),
    ...                                                "dw": np.array([1, 0.7, 0]),
    ...                                                "ds": np.array([1, 0, 1]),
    ...                                                "as": np.array([-1, 0, 1]),
    ...                                               }, noop=np.array([0,0,0]))

    Above code works also if the environment is wrapped, so it's particularly useful in
    verifying that the frame-level preprocessing does not render the game
    unplayable.

    If you wish to plot real time statistics as you play, you can use
    :class:`gym.utils.play.PlayPlot`. Here's a sample code for plotting the reward
    for last 150 steps.

    >>> import gymnasium as gym
    >>> from gymnasium.utils.play import PlayPlot, play
    >>> def callback(obs_t, obs_tp1, action, rew, terminated, truncated, info):
    ...        return [rew,]
    >>> plotter = PlayPlot(callback, 150, ["reward"])             # doctest: +SKIP
    >>> play(gym.make("CartPole-v1"), callback=plotter.callback)  # doctest: +SKIP

---
## PlayPlot
```python
from play import PlayPlot
```

Provides a callback to create live plots of arbitrary metrics when using :func:`play`.

This class is instantiated with a function that accepts information about a single environment transition:
    - obs_t: observation before performing action
    - obs_tp1: observation after performing action
    - action: action that was executed
    - rew: reward that was received
    - terminated: whether the environment is terminated or not
    - truncated: whether the environment is truncated or not
    - info: debug info

It should return a list of metrics that are computed from this data.
For instance, the function may look like this::

    >>> def compute_metrics(obs_t, obs_tp, action, reward, terminated, truncated, info):
    ...     return [reward, info["cumulative_reward"], np.linalg.norm(action)]

:class:`PlayPlot` provides the method :meth:`callback` which will pass its arguments along to that function
and uses the returned values to update live plots of the metrics.

Typically, this :meth:`callback` will be used in conjunction with :func:`play` to see how the metrics evolve as you play::

    >>> plotter = PlayPlot(compute_metrics, horizon_timesteps=200,                               # doctest: +SKIP
    ...                    plot_names=["Immediate Rew.", "Cumulative Rew.", "Action Magnitude"])
    >>> play(your_env, callback=plotter.callback)                                                # doctest: +SKIP

---
## __init__
```python
from play import __init__
```

Constructor of :class:`PlayPlot`.

The function ``callback`` that is passed to this constructor should return
a list of metrics that is of length ``len(plot_names)``.

Args:
    callback: Function that computes metrics from environment transitions
    horizon_timesteps: The time horizon used for the live plots
    plot_names: List of plot titles

Raises:
    DependencyNotInstalled: If matplotlib is not installed

---
## _get_relevant_keys
```python
from play import _get_relevant_keys
```



---
## _get_video_size
```python
from play import _get_video_size
```



---
## process_event
```python
from play import process_event
```

Processes a PyGame event.

In particular, this function is used to keep track of which buttons are currently pressed
and to exit the :func:`play` function when the PyGame window is closed.

Args:
    event: The event to process

---
## callback
```python
from play import callback
```

The callback that calls the provided data callback and adds the data to the plots.

Args:
    obs_t: The observation at time step t
    obs_tp1: The observation at time step t+1
    action: The action
    rew: The reward
    terminated: If the environment is terminated
    truncated: If the environment is truncated
    info: The information from the environment

---
## __name__
```python
from ezpickle import __name__
```

Class for pickling and unpickling objects via their constructor arguments.

---
## EzPickle
```python
from ezpickle import EzPickle
```

Objects that are pickled and unpickled via their constructor arguments.

Example:
    >>> class Animal: pass
    >>> class Dog(Animal, EzPickle):
    ...    def __init__(self, furcolor, tailkind="bushy"):
    ...        Animal.__init__(self)
    ...        EzPickle.__init__(self, furcolor, tailkind)

When this object is unpickled, a new ``Dog`` will be constructed by passing the provided furcolor and tailkind into the constructor.
However, philosophers are still not sure whether it is still the same dog.

This is generally needed only for environments which wrap C/C++ code, such as MuJoCo and Atari.

---
## __init__
```python
from ezpickle import __init__
```

Uses the ``args`` and ``kwargs`` from the object's constructor for pickling.

---
## __getstate__
```python
from ezpickle import __getstate__
```

Returns the object pickle state with args and kwargs.

---
## __setstate__
```python
from ezpickle import __setstate__
```

Sets the object pickle state using d.

---
## __name__
```python
from colorize import __name__
```

A set of common utilities used within the environments.

These are not intended as API functions, and will not remain stable over time.

---
## colorize
```python
from colorize import colorize
```

Returns string surrounded by appropriate terminal colour codes to print colourised text.

Args:
    string: The message to colourise
    color: Literal values are gray, red, green, yellow, blue, magenta, cyan, white, crimson
    bold: If to bold the string
    highlight: If to highlight the string

Returns:
    Colourised string

---
## __name__
```python
from performance import __name__
```

A collection of perofmance bencharks, useful for debugging performance related issues.

---
## benchmark_step
```python
from performance import benchmark_step
```

A benchmark to measure the runtime performance of step for an environment.

example usage:
    ```py
    env_old = ...
    old_throughput = benchmark_step(env_old)
    env_new = ...
    new_throughput = benchmark_step(env_old)
    slowdown = old_throughput / new_throughput
    ```

Args:
    env: the environment to benchmarked.
    target_duration: the duration of the benchmark in seconds (note: it will go slightly over it).
    seed: seeds the environment and action sampled.

Returns: the average steps per second.

---
## benchmark_init
```python
from performance import benchmark_init
```

A benchmark to measure the initialization time and first reset.

Args:
    env_lambda: the function to initialize the environment.
    target_duration: the duration of the benchmark in seconds (note: it will go slightly over it).
    seed: seeds the first reset of the environment.

---
## benchmark_render
```python
from performance import benchmark_render
```

A benchmark to measure the time of render().

Note: does not work with `render_mode='human'`
Args:
    env: the environment to benchmarked (Note: must be renderable).
    target_duration: the duration of the benchmark in seconds (note: it will go slightly over it).

---
## __name__
```python
from registration import __name__
```

Functions for registering environments within gymnasium using public functions ``make``, ``register`` and ``spec``.

---
## EnvCreator
```python
from registration import EnvCreator
```

Function type expected for an environment.

---
## VectorEnvCreator
```python
from registration import VectorEnvCreator
```

Function type expected for an environment.

---
## WrapperSpec
```python
from registration import WrapperSpec
```

A specification for recording wrapper configs.

* name: The name of the wrapper.
* entry_point: The location of the wrapper to create from.
* kwargs: Additional keyword arguments passed to the wrapper. If the wrapper doesn't inherit from EzPickle then this is ``None``

---
## EnvSpec
```python
from registration import EnvSpec
```

A specification for creating environments with :meth:`gymnasium.make`.

* **id**: The string used to create the environment with :meth:`gymnasium.make`
* **entry_point**: A string for the environment location, ``(import path):(environment name)`` or a function that creates the environment.
* **reward_threshold**: The reward threshold for completing the environment.
* **nondeterministic**: If the observation of an environment cannot be repeated with the same initial state, random number generator state and actions.
* **max_episode_steps**: The max number of steps that the environment can take before truncation
* **order_enforce**: If to enforce the order of :meth:`gymnasium.Env.reset` before :meth:`gymnasium.Env.step` and :meth:`gymnasium.Env.render` functions
* **autoreset**: If to automatically reset the environment on episode end
* **disable_env_checker**: If to disable the environment checker wrapper in :meth:`gymnasium.make`, by default False (runs the environment checker)
* **kwargs**: Additional keyword arguments passed to the environment during initialisation
* **additional_wrappers**: A tuple of additional wrappers applied to the environment (WrapperSpec)
* **vector_entry_point**: The location of the vectorized environment to create from

---
## parse_env_id
```python
from registration import parse_env_id
```

Parse environment ID string format - ``[namespace/](env-name)[-v(version)]`` where the namespace and version are optional.

Args:
    env_id: The environment id to parse

Returns:
    A tuple of environment namespace, environment name and version number

Raises:
    Error: If the environment id is not valid environment regex

---
## get_env_id
```python
from registration import get_env_id
```

Get the full env ID given a name and (optional) version and namespace. Inverse of :meth:`parse_env_id`.

Args:
    ns: The environment namespace
    name: The environment name
    version: The environment version

Returns:
    The environment id

---
## find_highest_version
```python
from registration import find_highest_version
```

Finds the highest registered version of the environment given the namespace and name in the registry.

Args:
    ns: The environment namespace
    name: The environment name (id)

Returns:
    The highest version of an environment with matching namespace and name, otherwise ``None`` is returned.

---
## _check_namespace_exists
```python
from registration import _check_namespace_exists
```

Check if a namespace exists. If it doesn't, print a helpful error message.

---
## _check_name_exists
```python
from registration import _check_name_exists
```

Check if an env exists in a namespace. If it doesn't, print a helpful error message.

---
## _check_version_exists
```python
from registration import _check_version_exists
```

Check if an env version exists in a namespace. If it doesn't, print a helpful error message.

This is a complete test whether an environment identifier is valid, and will provide the best available hints.

Args:
    ns: The environment namespace
    name: The environment space
    version: The environment version

Raises:
    DeprecatedEnv: The environment doesn't exist but a default version does
    VersionNotFound: The ``version`` used doesn't exist
    DeprecatedEnv: Environment version is deprecated

---
## _check_spec_register
```python
from registration import _check_spec_register
```

Checks whether the spec is valid to be registered. Helper function for `register`.

---
## _check_metadata
```python
from registration import _check_metadata
```

Check the metadata of an environment.

---
## _find_spec
```python
from registration import _find_spec
```



---
## load_env_creator
```python
from registration import load_env_creator
```

Loads an environment with name of style ``"(import path):(environment name)"`` and returns the environment creation function, normally the environment class type.

Args:
    name: The environment name

Returns:
    The environment constructor for the given environment name.

---
## load_plugin_envs
```python
from registration import load_plugin_envs
```

Load modules (plugins) using the gymnasium entry points in order to register external module's environments on ``import gymnasium``.

Args:
    entry_point: The string for the entry point.

---
## register_envs
```python
from registration import register_envs
```

A No-op function such that it can appear to IDEs that a module is used.

---
## namespace
```python
from registration import namespace
```

Context manager for modifying the current namespace.

---
## register
```python
from registration import register
```

Registers an environment in gymnasium with an ``id`` to use with :meth:`gymnasium.make` with the ``entry_point`` being a string or callable for creating the environment.

The ``id`` parameter corresponds to the name of the environment, with the syntax as follows:
``[namespace/](env_name)[-v(version)]`` where ``namespace`` and ``-v(version)`` is optional.

It takes arbitrary keyword arguments, which are passed to the :class:`EnvSpec` ``kwargs`` parameter.

Args:
    id: The environment id
    entry_point: The entry point for creating the environment
    reward_threshold: The reward threshold considered for an agent to have learnt the environment
    nondeterministic: If the environment is nondeterministic (even with knowledge of the initial seed and all actions, the same state cannot be reached)
    max_episode_steps: The maximum number of episodes steps before truncation. Used by the :class:`gymnasium.wrappers.TimeLimit` wrapper if not ``None``.
    order_enforce: If to enable the order enforcer wrapper to ensure users run functions in the correct order.
        If ``True``, then the :class:`gymnasium.wrappers.OrderEnforcing` is applied to the environment.
    autoreset: If to add the :class:`gymnasium.wrappers.AutoResetWrapper` such that on ``(terminated or truncated) is True``, :meth:`gymnasium.Env.reset` is called.
    disable_env_checker: If to disable the :class:`gymnasium.wrappers.PassiveEnvChecker` to the environment.
    apply_api_compatibility: If to apply the :class:`gymnasium.wrappers.StepAPICompatibility` wrapper to the environment.
        Use if the environment is implemented in the gym v0.21 environment API.
    additional_wrappers: Additional wrappers to apply the environment.
    vector_entry_point: The entry point for creating the vector environment
    **kwargs: arbitrary keyword arguments which are passed to the environment constructor on initialisation.

---
## make
```python
from registration import make
```

Calls ``make`` using the environment spec and any keyword arguments.

---
## make_vec
```python
from registration import make_vec
```

Create a vector environment according to the given ID.

Note:
    This feature is experimental, and is likely to change in future releases.

To find all available environments use `gymnasium.envs.registry.keys()` for all valid ids.

Args:
    id: Name of the environment. Optionally, a module to import can be included, eg. 'module:Env-v0'
    num_envs: Number of environments to create
    vectorization_mode: How to vectorize the environment. Can be either "async", "sync" or "custom"
    vector_kwargs: Additional arguments to pass to the vectorized environment constructor.
    wrappers: A sequence of wrapper functions to apply to the environment. Can only be used in "sync" or "async" mode.
    **kwargs: Additional arguments to pass to the environment constructor.

Returns:
    An instance of the environment.

Raises:
    Error: If the ``id`` doesn't exist then an error is raised

---
## spec
```python
from registration import spec
```

Retrieve the :class:`EnvSpec` for the environment id from the :attr:`registry`.

Args:
    env_id: The environment id with the expected format of ``[(namespace)/]id[-v(version)]``

Returns:
    The environment spec if it exists

Raises:
    Error: If the environment id doesn't exist

---
## pprint_registry
```python
from registration import pprint_registry
```

Pretty prints all environments in the :attr:`registry`.

Note:
    All arguments are keyword only

Args:
    print_registry: Environment registry to be printed. By default, :attr:`registry`
    num_cols: Number of columns to arrange environments in, for display.
    exclude_namespaces: A list of namespaces to be excluded from printing. Helpful if only ALE environments are wanted.
    disable_print: Whether to return a string of all the namespaces and environment IDs
        or to print the string to console.

---
## __call__
```python
from registration import __call__
```



---
## __post_init__
```python
from registration import __post_init__
```

Calls after the spec is created to extract the namespace, name and version from the environment id.

---
## to_json
```python
from registration import to_json
```

Converts the environment spec into a json compatible string.

Returns:
    A jsonifyied string for the environment spec

---
## _check_can_jsonify
```python
from registration import _check_can_jsonify
```

Warns the user about serialisation failing if the spec contains a callable.

Args:
    env_spec: An environment or wrapper specification.

Returns: The specification with lambda functions converted to strings.

---
## from_json
```python
from registration import from_json
```

Converts a JSON string into a specification stack.

Args:
    json_env_spec: A JSON string representing the env specification.

Returns:
    An environment spec

---
## pprint
```python
from registration import pprint
```

Pretty prints the environment spec.

Args:
    disable_print: If to disable print and return the output
    include_entry_points: If to include the entry_points in the output
    print_all: If to print all information, including variables with default values

Returns:
    If ``disable_print is True`` a string otherwise ``None``

---
## _create_env
```python
from registration import _create_env
```



---
## _raise_shimmy_error
```python
from __init__ import _raise_shimmy_error
```



---
## __name__
```python
from sync_vector_env import __name__
```

A synchronous vector environment.

---
## SyncVectorEnv
```python
from sync_vector_env import SyncVectorEnv
```

Vectorized environment that serially runs multiple environments.

Example:
    >>> import gymnasium as gym
    >>> env = gym.vector.SyncVectorEnv([
    ...     lambda: gym.make("Pendulum-v1", g=9.81),
    ...     lambda: gym.make("Pendulum-v1", g=1.62)
    ... ])
    >>> env.reset(seed=42)
    (array([[-0.14995256,  0.9886932 , -0.12224312],
           [ 0.5760367 ,  0.8174238 , -0.91244936]], dtype=float32), {})

---
## __init__
```python
from sync_vector_env import __init__
```

Vectorized environment that serially runs multiple environments.

Args:
    env_fns: iterable of callable functions that create the environments.
    copy: If ``True``, then the :meth:`reset` and :meth:`step` methods return a copy of the observations.

Raises:
    RuntimeError: If the observation space of some sub-environment does not match observation_space
        (or, by default, the observation space of the first sub-environment).

---
## seed
```python
from sync_vector_env import seed
```

Sets the seed in all sub-environments.

Args:
    seed: The seed

---
## reset_wait
```python
from sync_vector_env import reset_wait
```

Waits for the calls triggered by :meth:`reset_async` to finish and returns the results.

Args:
    seed: The reset environment seed
    options: Option information for the environment reset

Returns:
    The reset observation of the environment and reset information

---
## step_async
```python
from sync_vector_env import step_async
```

Sets :attr:`_actions` for use by the :meth:`step_wait` by converting the ``actions`` to an iterable version.

---
## step_wait
```python
from sync_vector_env import step_wait
```

Steps through each of the environments returning the batched results.

Returns:
    The batched environment step results

---
## call
```python
from sync_vector_env import call
```

Calls the method with name and applies args and kwargs.

Args:
    name: The method name
    *args: The method args
    **kwargs: The method kwargs

Returns:
    Tuple of results

---
## set_attr
```python
from sync_vector_env import set_attr
```

Sets an attribute of the sub-environments.

Args:
    name: The property name to change
    values: Values of the property to be set to. If ``values`` is a list or
        tuple, then it corresponds to the values for each individual
        environment, otherwise, a single value is set for all environments.

Raises:
    ValueError: Values must be a list or tuple with length equal to the number of environments.

---
## close_extras
```python
from sync_vector_env import close_extras
```

Close the environments.

---
## _check_spaces
```python
from sync_vector_env import _check_spaces
```



---
## __name__
```python
from vector_env import __name__
```

Base class for vectorized environments.

---
## VectorEnv
```python
from vector_env import VectorEnv
```

Base class for vectorized environments to run multiple independent copies of the same environment in parallel.

Vector environments can provide a linear speed-up in the steps taken per second through sampling multiple
sub-environments at the same time. To prevent terminated environments waiting until all sub-environments have
terminated or truncated, the vector environments autoreset sub-environments after they terminate or truncated.
As a result, the final step's observation and info are overwritten by the reset's observation and info.
Therefore, the observation and info for the final step of a sub-environment is stored in the info parameter,
using `"final_observation"` and `"final_info"` respectively. See :meth:`step` for more information.

The vector environments batch `observations`, `rewards`, `terminations`, `truncations` and `info` for each
parallel environment. In addition, :meth:`step` expects to receive a batch of actions for each parallel environment.

Gymnasium contains two types of Vector environments: :class:`AsyncVectorEnv` and :class:`SyncVectorEnv`.

The Vector Environments have the additional attributes for users to understand the implementation

- :attr:`num_envs` - The number of sub-environment in the vector environment
- :attr:`observation_space` - The batched observation space of the vector environment
- :attr:`single_observation_space` - The observation space of a single sub-environment
- :attr:`action_space` - The batched action space of the vector environment
- :attr:`single_action_space` - The action space of a single sub-environment

Note:
    The info parameter of :meth:`reset` and :meth:`step` was originally implemented before OpenAI Gym v25 was a list
    of dictionary for each sub-environment. However, this was modified in OpenAI Gym v25+ and in Gymnasium to a
    dictionary with a NumPy array for each key. To use the old info style using the :class:`VectorListInfo`.

Note:
    To render the sub-environments, use :meth:`call` with "render" arguments. Remember to set the `render_modes`
    for all the sub-environments during initialization.

Note:
    All parallel environments should share the identical observation and action spaces.
    In other words, a vector of multiple different environments is not supported.

---
## VectorEnvWrapper
```python
from vector_env import VectorEnvWrapper
```

Wraps the vectorized environment to allow a modular transformation.

This class is the base class for all wrappers for vectorized environments. The subclass
could override some methods to change the behavior of the original vectorized environment
without touching the original code.

Note:
    Don't forget to call ``super().__init__(env)`` if the subclass overrides :meth:`__init__`.

---
## __init__
```python
from vector_env import __init__
```

Initialize the vectorized environment wrapper.

---
## reset_async
```python
from vector_env import reset_async
```



---
## reset_wait
```python
from vector_env import reset_wait
```



---
## reset
```python
from vector_env import reset
```

Modifies the observation returned from the environment ``reset`` using the :meth:`observation`.

---
## step_async
```python
from vector_env import step_async
```



---
## step_wait
```python
from vector_env import step_wait
```



---
## step
```python
from vector_env import step
```

Steps through the environment returning a reward modified by :meth:`reward`.

---
## call_async
```python
from vector_env import call_async
```

Calls a method name for each parallel environment asynchronously.

---
## call_wait
```python
from vector_env import call_wait
```

After calling a method in :meth:`call_async`, this function collects the results.

---
## call
```python
from vector_env import call
```



---
## get_attr
```python
from vector_env import get_attr
```

Get a property from each parallel environment.

Args:
    name (str): Name of the property to be get from each individual environment.

Returns:
    The property with name

---
## set_attr
```python
from vector_env import set_attr
```



---
## close_extras
```python
from vector_env import close_extras
```

Close all extra resources.

---
## close
```python
from vector_env import close
```

Close all environments.

---
## _add_info
```python
from vector_env import _add_info
```

Add env info to the info dictionary of the vectorized environment.

Given the `info` of a single environment add it to the `infos` dictionary
which represents all the infos of the vectorized environment.
Every `key` of `info` is paired with a boolean mask `_key` representing
whether or not the i-indexed environment has this `info`.

Args:
    infos (dict): the infos of the vectorized environment
    info (dict): the info coming from the single environment
    env_num (int): the index of the single environment

Returns:
    infos (dict): the (updated) infos of the vectorized environment

---
## _init_info_arrays
```python
from vector_env import _init_info_arrays
```

Initialize the info array.

Initialize the info array. If the dtype is numeric
the info array will have the same dtype, otherwise
will be an array of `None`. Also, a boolean array
of the same length is returned. It will be used for
assessing which environment has info data.

Args:
    dtype (type): data type of the info coming from the env.

Returns:
    array (np.ndarray): the initialized info array.
    array_mask (np.ndarray): the initialized boolean array.

---
## __del__
```python
from vector_env import __del__
```

Close the vectorized environment.

---
## __repr__
```python
from vector_env import __repr__
```

Return the string representation of the vectorized environment.

---
## __getattr__
```python
from vector_env import __getattr__
```

Forward all other attributes to the base environment.

---
## unwrapped
```python
from vector_env import unwrapped
```

Return the base non-wrapped environment.

---
## create_env
```python
from __init__ import create_env
```

Creates an environment that can enable or disable the environment checker.

---
## _make_env
```python
from __init__ import _make_env
```



---
## __name__
```python
from async_vector_env import __name__
```

An async vector environment.

---
## AsyncState
```python
from async_vector_env import AsyncState
```



---
## AsyncVectorEnv
```python
from async_vector_env import AsyncVectorEnv
```

Vectorized environment that runs multiple environments in parallel.

It uses ``multiprocessing`` processes, and pipes for communication.

Example:
    >>> import gymnasium as gym
    >>> env = gym.vector.AsyncVectorEnv([
    ...     lambda: gym.make("Pendulum-v1", g=9.81),
    ...     lambda: gym.make("Pendulum-v1", g=1.62)
    ... ])
    >>> env.reset(seed=42)
    (array([[-0.14995256,  0.9886932 , -0.12224312],
           [ 0.5760367 ,  0.8174238 , -0.91244936]], dtype=float32), {})

---
## _worker
```python
from async_vector_env import _worker
```



---
## _worker_shared_memory
```python
from async_vector_env import _worker_shared_memory
```



---
## __init__
```python
from async_vector_env import __init__
```

Vectorized environment that runs multiple environments in parallel.

Args:
    env_fns: Functions that create the environments.
    shared_memory: If ``True``, then the observations from the worker processes are communicated back through
        shared variables. This can improve the efficiency if the observations are large (e.g. images).
    copy: If ``True``, then the :meth:`~AsyncVectorEnv.reset` and :meth:`~AsyncVectorEnv.step` methods
        return a copy of the observations.
    context: Context for `multiprocessing`_. If ``None``, then the default context is used.
    daemon: If ``True``, then subprocesses have ``daemon`` flag turned on; that is, they will quit if
        the head process quits. However, ``daemon=True`` prevents subprocesses to spawn children,
        so for some environments you may want to have it set to ``False``.
    worker: If set, then use that worker in a subprocess instead of a default one.
        Can be useful to override some inner vector env logic, for instance, how resets on termination or truncation are handled.

Warnings:
    worker is an advanced mode option. It provides a high degree of flexibility and a high chance
    to shoot yourself in the foot; thus, if you are writing your own worker, it is recommended to start
    from the code for ``_worker`` (or ``_worker_shared_memory``) method, and add changes.

Raises:
    RuntimeError: If the observation space of some sub-environment does not match observation_space
        (or, by default, the observation space of the first sub-environment).
    ValueError: If observation_space is a custom space (i.e. not a default space in Gym,
        such as gymnasium.spaces.Box, gymnasium.spaces.Discrete, or gymnasium.spaces.Dict) and shared_memory is True.

---
## reset_async
```python
from async_vector_env import reset_async
```

Send calls to the :obj:`reset` methods of the sub-environments.

To get the results of these calls, you may invoke :meth:`reset_wait`.

Args:
    seed: List of seeds for each environment
    options: The reset option

Raises:
    ClosedEnvironmentError: If the environment was closed (if :meth:`close` was previously called).
    AlreadyPendingCallError: If the environment is already waiting for a pending call to another
        method (e.g. :meth:`step_async`). This can be caused by two consecutive
        calls to :meth:`reset_async`, with no call to :meth:`reset_wait` in between.

---
## reset_wait
```python
from async_vector_env import reset_wait
```

Waits for the calls triggered by :meth:`reset_async` to finish and returns the results.

Args:
    timeout: Number of seconds before the call to `reset_wait` times out. If `None`, the call to `reset_wait` never times out.

Returns:
    A tuple of batched observations and list of dictionaries

Raises:
    ClosedEnvironmentError: If the environment was closed (if :meth:`close` was previously called).
    NoAsyncCallError: If :meth:`reset_wait` was called without any prior call to :meth:`reset_async`.
    TimeoutError: If :meth:`reset_wait` timed out.

---
## step_async
```python
from async_vector_env import step_async
```

Send the calls to :obj:`step` to each sub-environment.

Args:
    actions: Batch of actions. element of :attr:`~VectorEnv.action_space`

Raises:
    ClosedEnvironmentError: If the environment was closed (if :meth:`close` was previously called).
    AlreadyPendingCallError: If the environment is already waiting for a pending call to another
        method (e.g. :meth:`reset_async`). This can be caused by two consecutive
        calls to :meth:`step_async`, with no call to :meth:`step_wait` in
        between.

---
## step_wait
```python
from async_vector_env import step_wait
```

Wait for the calls to :obj:`step` in each sub-environment to finish.

Args:
    timeout: Number of seconds before the call to :meth:`step_wait` times out. If ``None``, the call to :meth:`step_wait` never times out.

Returns:
     The batched environment step information, (obs, reward, terminated, truncated, info)

Raises:
    ClosedEnvironmentError: If the environment was closed (if :meth:`close` was previously called).
    NoAsyncCallError: If :meth:`step_wait` was called without any prior call to :meth:`step_async`.
    TimeoutError: If :meth:`step_wait` timed out.

---
## call_async
```python
from async_vector_env import call_async
```

Calls the method with name asynchronously and apply args and kwargs to the method.

Args:
    name: Name of the method or property to call.
    *args: Arguments to apply to the method call.
    **kwargs: Keyword arguments to apply to the method call.

Raises:
    ClosedEnvironmentError: If the environment was closed (if :meth:`close` was previously called).
    AlreadyPendingCallError: Calling `call_async` while waiting for a pending call to complete

---
## call_wait
```python
from async_vector_env import call_wait
```

Calls all parent pipes and waits for the results.

Args:
    timeout: Number of seconds before the call to `step_wait` times out.
        If `None` (default), the call to `step_wait` never times out.

Returns:
    List of the results of the individual calls to the method or property for each environment.

Raises:
    NoAsyncCallError: Calling `call_wait` without any prior call to `call_async`.
    TimeoutError: The call to `call_wait` has timed out after timeout second(s).

---
## set_attr
```python
from async_vector_env import set_attr
```

Sets an attribute of the sub-environments.

Args:
    name: Name of the property to be set in each individual environment.
    values: Values of the property to be set to. If ``values`` is a list or
        tuple, then it corresponds to the values for each individual
        environment, otherwise a single value is set for all environments.

Raises:
    ValueError: Values must be a list or tuple with length equal to the number of environments.
    AlreadyPendingCallError: Calling `set_attr` while waiting for a pending call to complete.

---
## close_extras
```python
from async_vector_env import close_extras
```

Close the environments & clean up the extra resources (processes and pipes).

Args:
    timeout: Number of seconds before the call to :meth:`close` times out. If ``None``,
        the call to :meth:`close` never times out. If the call to :meth:`close`
        times out, then all processes are terminated.
    terminate: If ``True``, then the :meth:`close` operation is forced and all processes are terminated.

Raises:
    TimeoutError: If :meth:`close` timed out.

---
## _poll
```python
from async_vector_env import _poll
```



---
## _check_spaces
```python
from async_vector_env import _check_spaces
```



---
## _assert_is_running
```python
from async_vector_env import _assert_is_running
```



---
## _raise_if_errors
```python
from async_vector_env import _raise_if_errors
```



---
## __del__
```python
from async_vector_env import __del__
```

On deleting the object, checks that the vector environment is closed.

---
## __name__
```python
from video_recorder import __name__
```

A wrapper for video recording environments by rolling it out, frame by frame.

---
## VideoRecorder
```python
from video_recorder import VideoRecorder
```

VideoRecorder renders a nice movie of a rollout, frame by frame.

It comes with an ``enabled`` option, so you can still use the same code on episodes where you don't want to record video.

Note:
    You are responsible for calling :meth:`close` on a created VideoRecorder, or else you may leak an encoder process.

---
## __init__
```python
from video_recorder import __init__
```

Video recorder renders a nice movie of a rollout, frame by frame.

Args:
    env (Env): Environment to take video of.
    path (Optional[str]): Path to the video file; will be randomly chosen if omitted.
    metadata (Optional[dict]): Contents to save to the metadata file.
    enabled (bool): Whether to actually record video, or just no-op (for convenience)
    base_path (Optional[str]): Alternatively, path to the video file without extension, which will be added.
    disable_logger (bool): Whether to disable moviepy logger or not.

Raises:
    Error: You can pass at most one of `path` or `base_path`
    Error: Invalid path given that must have a particular file extension

---
## functional
```python
from video_recorder import functional
```

Returns if the video recorder is functional, is enabled and not broken.

---
## capture_frame
```python
from video_recorder import capture_frame
```

Render the given `env` and add the resulting frame to the video.

---
## close
```python
from video_recorder import close
```

Flush all data to disk and close any open frame encoders.

---
## write_metadata
```python
from video_recorder import write_metadata
```

Writes metadata to metadata path.

---
## __del__
```python
from video_recorder import __del__
```

Closes the environment correctly when the recorder is deleted.

---
## __name__
```python
from lambda_observation import __name__
```

A collection of observation wrappers using a lambda function.

* ``LambdaObservationV0`` - Transforms the observation with a function
* ``FilterObservationV0`` - Filters a ``Tuple`` or ``Dict`` to only include certain keys
* ``FlattenObservationV0`` - Flattens the observations
* ``GrayscaleObservationV0`` - Converts a RGB observation to a grayscale observation
* ``ResizeObservationV0`` - Resizes an array-based observation (normally a RGB observation)
* ``ReshapeObservationV0`` - Reshapes an array-based observation
* ``RescaleObservationV0`` - Rescales an observation to between a minimum and maximum value
* ``DtypeObservationV0`` - Convert an observation to a dtype
* ``PixelObservationV0`` - Allows the observation to the rendered frame

---
## LambdaObservationV0
```python
from lambda_observation import LambdaObservationV0
```

Transforms an observation via a function provided to the wrapper.

The function :attr:`func` will be applied to all observations.
If the observations from :attr:`func` are outside the bounds of the ``env``'s observation space, provide an :attr:`observation_space`.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import LambdaObservationV0
    >>> import numpy as np
    >>> np.random.seed(0)
    >>> env = gym.make("CartPole-v1")
    >>> env = LambdaObservationV0(env, lambda obs: obs + 0.1 * np.random.random(obs.shape), env.observation_space)
    >>> env.reset(seed=42)
    (array([0.08227695, 0.06540678, 0.09613613, 0.07422512]), {})

---
## FilterObservationV0
```python
from lambda_observation import FilterObservationV0
```

Filters Dict or Tuple observation space by the keys or indexes.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.wrappers import TransformObservation
    >>> from gymnasium.experimental.wrappers import FilterObservationV0
    >>> env = gym.make("CartPole-v1")
    >>> env = gym.wrappers.TransformObservation(env, lambda obs: {'obs': obs, 'time': 0})
    >>> env.observation_space = gym.spaces.Dict(obs=env.observation_space, time=gym.spaces.Discrete(1))
    >>> env.reset(seed=42)
    ({'obs': array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ], dtype=float32), 'time': 0}, {})
    >>> env = FilterObservationV0(env, filter_keys=['time'])
    >>> env.reset(seed=42)
    ({'time': 0}, {})
    >>> env.step(0)
    ({'time': 0}, 1.0, False, False, {})

---
## FlattenObservationV0
```python
from lambda_observation import FlattenObservationV0
```

Observation wrapper that flattens the observation.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import FlattenObservationV0
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> env = FlattenObservationV0(env)
    >>> env.observation_space.shape
    (27648,)
    >>> obs, _ = env.reset()
    >>> obs.shape
    (27648,)

---
## GrayscaleObservationV0
```python
from lambda_observation import GrayscaleObservationV0
```

Observation wrapper that converts an RGB image to grayscale.

The :attr:`keep_dim` will keep the channel dimension

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import GrayscaleObservationV0
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> grayscale_env = GrayscaleObservationV0(env)
    >>> grayscale_env.observation_space.shape
    (96, 96)
    >>> grayscale_env = GrayscaleObservationV0(env, keep_dim=True)
    >>> grayscale_env.observation_space.shape
    (96, 96, 1)

---
## ResizeObservationV0
```python
from lambda_observation import ResizeObservationV0
```

Resizes image observations using OpenCV to shape.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import ResizeObservationV0
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> resized_env = ResizeObservationV0(env, (32, 32))
    >>> resized_env.observation_space.shape
    (32, 32, 3)

---
## ReshapeObservationV0
```python
from lambda_observation import ReshapeObservationV0
```

Reshapes array based observations to shapes.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import ReshapeObservationV0
    >>> env = gym.make("CarRacing-v2")
    >>> env.observation_space.shape
    (96, 96, 3)
    >>> reshape_env = ReshapeObservationV0(env, (24, 4, 96, 1, 3))
    >>> reshape_env.observation_space.shape
    (24, 4, 96, 1, 3)

---
## RescaleObservationV0
```python
from lambda_observation import RescaleObservationV0
```

Linearly rescales observation to between a minimum and maximum value.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import RescaleObservationV0
    >>> env = gym.make("Pendulum-v1")
    >>> env.observation_space
    Box([-1. -1. -8.], [1. 1. 8.], (3,), float32)
    >>> env = RescaleObservationV0(env, np.array([-2, -1, -10], dtype=np.float32), np.array([1, 0, 1], dtype=np.float32))
    >>> env.observation_space
    Box([ -2.  -1. -10.], [1. 0. 1.], (3,), float32)

---
## DtypeObservationV0
```python
from lambda_observation import DtypeObservationV0
```

Observation wrapper for transforming the dtype of an observation.

Note:
    This is only compatible with :class:`Box`, :class:`Discrete`, :class:`MultiDiscrete` and :class:`MultiBinary` observation spaces

---
## PixelObservationV0
```python
from lambda_observation import PixelObservationV0
```

Includes the rendered observations to the environment's observations.

Observations of this wrapper will be dictionaries of images.
You can also choose to add the observation of the base environment to this dictionary.
In that case, if the base environment has an observation space of type :class:`Dict`, the dictionary
of rendered images will be updated with the base environment's observation. If, however, the observation
space is of type :class:`Box`, the base environment's observation (which will be an element of the :class:`Box`
space) will be added to the dictionary under the key "state".

---
## __init__
```python
from lambda_observation import __init__
```

Constructor of the pixel observation wrapper.

Args:
    env: The environment to wrap.
    pixels_only (bool): If ``True`` (default), the original observation returned
        by the wrapped environment will be discarded, and a dictionary
        observation will only include pixels. If ``False``, the
        observation dictionary will contain both the original
        observations and the pixel observations.
    pixels_key: Optional custom string specifying the pixel key. Defaults to "pixels"
    obs_key: Optional custom string specifying the obs key. Defaults to "state"

---
## observation
```python
from lambda_observation import observation
```

Apply function to the observation.

---
## __name__
```python
from rendering import __name__
```



---
## RenderCollectionV0
```python
from rendering import RenderCollectionV0
```

Collect rendered frames of an environment such ``render`` returns a ``list[RenderedFrame]``.

---
## RecordVideoV0
```python
from rendering import RecordVideoV0
```

This wrapper records videos of rollouts.

Usually, you only want to record episodes intermittently, say every hundredth episode.
To do this, you can specify ``episode_trigger`` or ``step_trigger``.
They should be functions returning a boolean that indicates whether a recording should be started at the
current episode or step, respectively.
If neither :attr:`episode_trigger` nor ``step_trigger`` is passed, a default ``episode_trigger`` will be employed,
i.e. capped_cubic_video_schedule. This function starts a video at every episode that is a power of 3 until 1000 and
then every 1000 episodes.
By default, the recording will be stopped once reset is called. However, you can also create recordings of fixed
length (possibly spanning several episodes) by passing a strictly positive value for ``video_length``.

---
## HumanRenderingV0
```python
from rendering import HumanRenderingV0
```

Performs human rendering for an environment that only supports "rgb_array"rendering.

This wrapper is particularly useful when you have implemented an environment that can produce
RGB images but haven't implemented any code to render the images to the screen.
If you want to use this wrapper with your environments, remember to specify ``"render_fps"``
in the metadata of your environment.

The ``render_mode`` of the wrapped environment must be either ``'rgb_array'`` or ``'rgb_array_list'``.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import HumanRenderingV0
    >>> env = gym.make("LunarLander-v2", render_mode="rgb_array")
    >>> wrapped = HumanRenderingV0(env)
    >>> obs, _ = wrapped.reset()     # This will start rendering to the screen

    The wrapper can also be applied directly when the environment is instantiated, simply by passing
    ``render_mode="human"`` to ``make``. The wrapper will only be applied if the environment does not
    implement human-rendering natively (i.e. ``render_mode`` does not contain ``"human"``).

    >>> env = gym.make("phys2d/CartPole-v1", render_mode="human")      # CartPoleJax-v1 doesn't implement human-rendering natively
    >>> obs, _ = env.reset()     # This will start rendering to the screen

    Warning: If the base environment uses ``render_mode="rgb_array_list"``, its (i.e. the *base environment's*) render method
    will always return an empty list:

    >>> env = gym.make("LunarLander-v2", render_mode="rgb_array_list")
    >>> wrapped = HumanRenderingV0(env)
    >>> obs, _ = wrapped.reset()
    >>> env.render() # env.render() will always return an empty list!
    []

---
## __init__
```python
from rendering import __init__
```

Initialize a :class:`HumanRendering` instance.

Args:
    env: The environment that is being wrapped

---
## render_mode
```python
from rendering import render_mode
```

Always returns ``'human'``.

---
## step
```python
from rendering import step
```

Perform a step in the base environment and render a frame to the screen.

---
## reset
```python
from rendering import reset
```

Reset the base environment and render a frame to the screen.

---
## render
```python
from rendering import render
```

This method doesn't do much, actual rendering is performed in :meth:`step` and :meth:`reset`.

---
## _capture_frame
```python
from rendering import _capture_frame
```



---
## start_recording
```python
from rendering import start_recording
```

Start a new recording. If it is already recording, stops the current recording before starting the new one.

---
## stop_recording
```python
from rendering import stop_recording
```

Stop current recording and saves the video.

---
## close
```python
from rendering import close
```

Close the rendering window.

---
## __del__
```python
from rendering import __del__
```

Warn the user in case last video wasn't saved.

---
## _render_frame
```python
from rendering import _render_frame
```

Fetch the last frame from the base environment and render it to the screen.

---
## capped_cubic_video_schedule
```python
from rendering import capped_cubic_video_schedule
```



---
## __name__
```python
from jax_to_torch import __name__
```

Vector wrapper class for converting between PyTorch and Jax.

---
## torch_to_jax
```python
from jax_to_torch import torch_to_jax
```

Converts a PyTorch Tensor into a Jax Array.

---
## _number_torch_to_jax
```python
from jax_to_torch import _number_torch_to_jax
```

Convert a python number (int, float, complex) to a jax array.

---
## _tensor_torch_to_jax
```python
from jax_to_torch import _tensor_torch_to_jax
```

Converts a PyTorch Tensor into a Jax Array.

---
## _mapping_torch_to_jax
```python
from jax_to_torch import _mapping_torch_to_jax
```

Converts a mapping of PyTorch Tensors into a Dictionary of Jax Array.

---
## _iterable_torch_to_jax
```python
from jax_to_torch import _iterable_torch_to_jax
```

Converts an Iterable from PyTorch Tensors to an iterable of Jax Array.

---
## jax_to_torch
```python
from jax_to_torch import jax_to_torch
```

Converts a Jax Array into a PyTorch Tensor.

---
## _devicearray_jax_to_torch
```python
from jax_to_torch import _devicearray_jax_to_torch
```

Converts a Jax Array into a PyTorch Tensor.

---
## _jax_mapping_to_torch
```python
from jax_to_torch import _jax_mapping_to_torch
```

Converts a mapping of Jax Array into a Dictionary of PyTorch Tensors.

---
## _jax_iterable_to_torch
```python
from jax_to_torch import _jax_iterable_to_torch
```

Converts an Iterable from Jax Array to an iterable of PyTorch Tensors.

---
## JaxToTorchV0
```python
from jax_to_torch import JaxToTorchV0
```

Wraps a Jax-based vector environment so that it can be interacted with through PyTorch Tensors.

Actions must be provided as PyTorch Tensors and observations, rewards, terminations and truncations will be returned as PyTorch Tensors.

---
## __init__
```python
from jax_to_torch import __init__
```

Vector wrapper to change inputs and outputs to PyTorch tensors.

Args:
    env: The Jax-based vector environment to wrap
    device: The device the torch Tensors should be moved to

---
## step
```python
from jax_to_torch import step
```

Performs the given action within the environment.

Args:
    actions: The action to perform as a PyTorch Tensor

Returns:
    Torch-based Tensors of the next observation, reward, termination, truncation, and extra info

---
## reset
```python
from jax_to_torch import reset
```

Resets the environment returning PyTorch-based observation and info.

Args:
    seed: The seed for resetting the environment
    options: The options for resetting the environment, these are converted to jax arrays.

Returns:
    PyTorch-based observations and info

---
## render
```python
from jax_to_torch import render
```

Returns the rendered frames as a NumPy array.

---
## __name__
```python
from stateful_reward import __name__
```

A collection of wrappers for modifying the reward with an internal state.

* ``NormalizeRewardV1`` - Normalizes the rewards to a mean and standard deviation

---
## NormalizeRewardV1
```python
from stateful_reward import NormalizeRewardV1
```

This wrapper will normalize immediate rewards s.t. their exponential moving average has a fixed variance.

The exponential moving average will have variance :math:`(1 - \gamma)^2`.

The property `_update_running_mean` allows to freeze/continue the running mean calculation of the reward
statistics. If `True` (default), the `RunningMeanStd` will get updated every time `self.normalize()` is called.
If False, the calculated statistics are used but not updated anymore; this may be used during evaluation.

Note:
    In v0.27, NormalizeReward was updated as the forward discounted reward estimate was incorrect computed in Gym v0.25+.
    For more detail, read [#3154](https://github.com/openai/gym/pull/3152).

Note:
    The scaling depends on past trajectories and rewards will not be scaled correctly if the wrapper was newly
    instantiated or the policy was changed recently.

---
## __init__
```python
from stateful_reward import __init__
```

This wrapper will normalize immediate rewards s.t. their exponential moving average has a fixed variance.

Args:
    env (env): The environment to apply the wrapper
    epsilon (float): A stability parameter
    gamma (float): The discount factor that is used in the exponential moving average.

---
## update_running_mean
```python
from stateful_reward import update_running_mean
```

Sets the property to freeze/continue the running mean calculation of the reward statistics.

---
## step
```python
from stateful_reward import step
```

Steps through the environment, normalizing the reward returned.

---
## normalize
```python
from stateful_reward import normalize
```

Normalizes the rewards with the running mean rewards and their variance.

---
## __name__
```python
from lambda_reward import __name__
```

A collection of wrappers for modifying the reward.

* ``LambdaRewardV0`` - Transforms the reward by a function
* ``ClipRewardV0`` - Clips the reward between a minimum and maximum value

---
## LambdaRewardV0
```python
from lambda_reward import LambdaRewardV0
```

A reward wrapper that allows a custom function to modify the step reward.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import LambdaRewardV0
    >>> env = gym.make("CartPole-v1")
    >>> env = LambdaRewardV0(env, lambda r: 2 * r + 1)
    >>> _ = env.reset()
    >>> _, rew, _, _, _ = env.step(0)
    >>> rew
    3.0

---
## ClipRewardV0
```python
from lambda_reward import ClipRewardV0
```

A wrapper that clips the rewards for an environment between an upper and lower bound.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import ClipRewardV0
    >>> env = gym.make("CartPole-v1")
    >>> env = ClipRewardV0(env, 0, 0.5)
    >>> _ = env.reset()
    >>> _, rew, _, _, _ = env.step(1)
    >>> rew
    0.5

---
## __init__
```python
from lambda_reward import __init__
```

Initialize ClipRewardsV0 wrapper.

Args:
    env (Env): The environment to wrap
    min_reward (Union[float, np.ndarray]): lower bound to apply
    max_reward (Union[float, np.ndarray]): higher bound to apply

---
## reward
```python
from lambda_reward import reward
```

Apply function to reward.

Args:
    reward (Union[float, int, np.ndarray]): environment's reward

---
## __name__
```python
from jax_to_numpy import __name__
```

Vector wrapper for converting between NumPy and Jax.

---
## numpy_to_jax
```python
from jax_to_numpy import numpy_to_jax
```

Converts a value to a Jax Array.

---
## _number_to_jax
```python
from jax_to_numpy import _number_to_jax
```

Converts a number (int, float, etc.) to a Jax Array.

---
## _numpy_array_to_jax
```python
from jax_to_numpy import _numpy_array_to_jax
```

Converts a NumPy Array to a Jax Array with the same dtype (excluding float64 without being enabled).

---
## _mapping_numpy_to_jax
```python
from jax_to_numpy import _mapping_numpy_to_jax
```

Converts a dictionary of numpy arrays to a mapping of Jax Array.

---
## _iterable_numpy_to_jax
```python
from jax_to_numpy import _iterable_numpy_to_jax
```

Converts an Iterable from Numpy Arrays to an iterable of Jax Array.

---
## jax_to_numpy
```python
from jax_to_numpy import jax_to_numpy
```

Converts a value to a numpy array.

---
## _devicearray_jax_to_numpy
```python
from jax_to_numpy import _devicearray_jax_to_numpy
```

Converts a Jax Array to a numpy array.

---
## _mapping_jax_to_numpy
```python
from jax_to_numpy import _mapping_jax_to_numpy
```

Converts a dictionary of Jax Array to a mapping of numpy arrays.

---
## _iterable_jax_to_numpy
```python
from jax_to_numpy import _iterable_jax_to_numpy
```

Converts an Iterable from Numpy arrays to an iterable of Jax Array.

---
## JaxToNumpyV0
```python
from jax_to_numpy import JaxToNumpyV0
```

Wraps a jax vector environment so that it can be interacted with through numpy arrays.

Notes:
    A vectorized version of ``gymnasium.experimental.wrappers.JaxToNumpyV0``

Actions must be provided as numpy arrays and observations, rewards, terminations and truncations will be returned as numpy arrays.

---
## __init__
```python
from jax_to_numpy import __init__
```

Wraps an environment such that the input and outputs are numpy arrays.

Args:
    env: the vector jax environment to wrap

---
## step
```python
from jax_to_numpy import step
```

Transforms the action to a jax array .

Args:
    actions: the action to perform as a numpy array

Returns:
    A tuple containing numpy versions of the next observation, reward, termination, truncation, and extra info.

---
## reset
```python
from jax_to_numpy import reset
```

Resets the environment returning numpy-based observation and info.

Args:
    seed: The seed for resetting the environment
    options: The options for resetting the environment, these are converted to jax arrays.

Returns:
    Numpy-based observations and info

---
## render
```python
from jax_to_numpy import render
```

Returns the rendered frames as a numpy array.

---
## __name__
```python
from stateful_observation import __name__
```

A collection of stateful observation wrappers.

* ``DelayObservationV0`` - A wrapper for delaying the returned observation
* ``TimeAwareObservationV0`` - A wrapper for adding time aware observations to environment observation
* ``FrameStackObservationV0`` - Frame stack the observations
* ``NormalizeObservationV0`` - Normalized the observations to a mean and
* ``MaxAndSkipObservationV0`` - Return only every ``skip``-th frame (frameskipping) and return the max between the two last frames.

---
## DelayObservationV0
```python
from stateful_observation import DelayObservationV0
```

Wrapper which adds a delay to the returned observation.

Before reaching the :attr:`delay` number of timesteps, returned observations is an array of zeros with
the same shape as the observation space.

Example:
    >>> import gymnasium as gym
    >>> env = gym.make("CartPole-v1")
    >>> env.reset(seed=123)
    (array([ 0.01823519, -0.0446179 , -0.02796401, -0.03156282], dtype=float32), {})

    >>> env = DelayObservationV0(env, delay=2)
    >>> env.reset(seed=123)
    (array([0., 0., 0., 0.], dtype=float32), {})
    >>> env.step(env.action_space.sample())
    (array([0., 0., 0., 0.], dtype=float32), 1.0, False, False, {})
    >>> env.step(env.action_space.sample())
    (array([ 0.01823519, -0.0446179 , -0.02796401, -0.03156282], dtype=float32), 1.0, False, False, {})

Note:
    This does not support random delay values, if users are interested, please raise an issue or pull request to add this feature.

---
## TimeAwareObservationV0
```python
from stateful_observation import TimeAwareObservationV0
```

Augment the observation with time information of the episode.

The :attr:`normalize_time` if ``True`` represents time as a normalized value between [0,1]
otherwise if ``False``, the number of timesteps remaining before truncation occurs is an integer.

For environments with ``Dict`` observation spaces, the time information is automatically
added in the key `"time"` (can be changed through :attr:`dict_time_key`) and for environments with ``Tuple``
observation space, the time information is added as the final element in the tuple.
Otherwise, the observation space is transformed into a ``Dict`` observation space with two keys,
`"obs"` for the base environment's observation and `"time"` for the time information.

To flatten the observation, use the :attr:`flatten` parameter which will use the
:func:`gymnasium.spaces.utils.flatten` function.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import TimeAwareObservationV0
    >>> env = gym.make("CartPole-v1")
    >>> env = TimeAwareObservationV0(env)
    >>> env.observation_space
    Dict('obs': Box([-4.8000002e+00 -3.4028235e+38 -4.1887903e-01 -3.4028235e+38], [4.8000002e+00 3.4028235e+38 4.1887903e-01 3.4028235e+38], (4,), float32), 'time': Box(0.0, 1.0, (1,), float32))
    >>> env.reset(seed=42)[0]
    {'obs': array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ], dtype=float32), 'time': array([0.], dtype=float32)}
    >>> _ = env.action_space.seed(42)
    >>> env.step(env.action_space.sample())[0]
    {'obs': array([ 0.02727336, -0.20172954,  0.03625453,  0.32351476], dtype=float32), 'time': array([0.002], dtype=float32)}

Unnormalize time observation space example:
    >>> env = gym.make('CartPole-v1')
    >>> env = TimeAwareObservationV0(env, normalize_time=False)
    >>> env.observation_space
    Dict('obs': Box([-4.8000002e+00 -3.4028235e+38 -4.1887903e-01 -3.4028235e+38], [4.8000002e+00 3.4028235e+38 4.1887903e-01 3.4028235e+38], (4,), float32), 'time': Box(0, 500, (1,), int32))
    >>> env.reset(seed=42)[0]
    {'obs': array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ], dtype=float32), 'time': array([500], dtype=int32)}
    >>> _ = env.action_space.seed(42)[0]
    >>> env.step(env.action_space.sample())[0]
    {'obs': array([ 0.02727336, -0.20172954,  0.03625453,  0.32351476], dtype=float32), 'time': array([499], dtype=int32)}

Flatten observation space example:
    >>> env = gym.make("CartPole-v1")
    >>> env = TimeAwareObservationV0(env, flatten=True)
    >>> env.observation_space
    Box([-4.8000002e+00 -3.4028235e+38 -4.1887903e-01 -3.4028235e+38
      0.0000000e+00], [4.8000002e+00 3.4028235e+38 4.1887903e-01 3.4028235e+38 1.0000000e+00], (5,), float32)
    >>> env.reset(seed=42)[0]
    array([ 0.0273956 , -0.00611216,  0.03585979,  0.0197368 ,  0.        ],
          dtype=float32)
    >>> _ = env.action_space.seed(42)
    >>> env.step(env.action_space.sample())[0]
    array([ 0.02727336, -0.20172954,  0.03625453,  0.32351476,  0.002     ],
          dtype=float32)

---
## FrameStackObservationV0
```python
from stateful_observation import FrameStackObservationV0
```

Observation wrapper that stacks the observations in a rolling manner.

For example, if the number of stacks is 4, then the returned observation contains
the most recent 4 observations. For environment 'Pendulum-v1', the original observation
is an array with shape [3], so if we stack 4 observations, the processed observation
has shape [4, 3].

Note:
    - After :meth:`reset` is called, the frame buffer will be filled with the initial observation.
      I.e. the observation returned by :meth:`reset` will consist of `num_stack` many identical frames.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import FrameStackObservationV0
    >>> env = gym.make("CarRacing-v2")
    >>> env = FrameStackObservationV0(env, 4)
    >>> env.observation_space
    Box(0, 255, (4, 96, 96, 3), uint8)
    >>> obs, _ = env.reset()
    >>> obs.shape
    (4, 96, 96, 3)

---
## NormalizeObservationV0
```python
from stateful_observation import NormalizeObservationV0
```

This wrapper will normalize observations s.t. each coordinate is centered with unit variance.

The property `_update_running_mean` allows to freeze/continue the running mean calculation of the observation
statistics. If `True` (default), the `RunningMeanStd` will get updated every time `self.observation()` is called.
If `False`, the calculated statistics are used but not updated anymore; this may be used during evaluation.

Note:
    The normalization depends on past trajectories and observations will not be normalized correctly if the wrapper was
    newly instantiated or the policy was changed recently.

---
## MaxAndSkipObservationV0
```python
from stateful_observation import MaxAndSkipObservationV0
```

This wrapper will return only every ``skip``-th frame (frameskipping) and return the max between the two last observations.

Note: This wrapper is based on the wrapper from stable-baselines3: https://stable-baselines3.readthedocs.io/en/master/_modules/stable_baselines3/common/atari_wrappers.html#MaxAndSkipEnv

---
## __init__
```python
from stateful_observation import __init__
```

This wrapper will return only every ``skip``-th frame (frameskipping) and return the max between the two last frames.

Args:
    env (Env): The environment to apply the wrapper
    skip: The number of frames to skip

---
## reset
```python
from stateful_observation import reset
```

Reset the environment, returning the stacked observation and info.

Args:
    seed: The environment seed
    options: The reset options

Returns:
    The stacked observations and info

---
## observation
```python
from stateful_observation import observation
```

Normalises the observation using the running mean and variance of the observations.

---
## step
```python
from stateful_observation import step
```

Step the environment with the given action for ``skip`` steps.

Repeat action, sum reward, and max over last observations.

Args:
    action: The action to step through the environment with
Returns:
    Max of the last two observations, reward, terminated, truncated, and info from the environment

---
## update_running_mean
```python
from stateful_observation import update_running_mean
```

Sets the property to freeze/continue the running mean calculation of the observation statistics.

---
## __name__
```python
from numpy_to_torch import __name__
```

Wrapper for converting NumPy environments to PyTorch.

---
## torch_to_numpy
```python
from numpy_to_torch import torch_to_numpy
```

Converts a PyTorch Tensor into a NumPy Array.

---
## _number_torch_to_numpy
```python
from numpy_to_torch import _number_torch_to_numpy
```

Convert a python number (int, float, complex) and torch.Tensor to a numpy array.

---
## _mapping_torch_to_numpy
```python
from numpy_to_torch import _mapping_torch_to_numpy
```

Converts a mapping of PyTorch Tensors into a Dictionary of Jax Array.

---
## _iterable_torch_to_numpy
```python
from numpy_to_torch import _iterable_torch_to_numpy
```

Converts an Iterable from PyTorch Tensors to an iterable of Jax Array.

---
## numpy_to_torch
```python
from numpy_to_torch import numpy_to_torch
```

Converts a Jax Array into a PyTorch Tensor.

---
## _numpy_to_torch
```python
from numpy_to_torch import _numpy_to_torch
```

Converts a Jax Array into a PyTorch Tensor.

---
## _numpy_mapping_to_torch
```python
from numpy_to_torch import _numpy_mapping_to_torch
```

Converts a mapping of Jax Array into a Dictionary of PyTorch Tensors.

---
## _numpy_iterable_to_torch
```python
from numpy_to_torch import _numpy_iterable_to_torch
```

Converts an Iterable from Jax Array to an iterable of PyTorch Tensors.

---
## NumpyToTorchV0
```python
from numpy_to_torch import NumpyToTorchV0
```

Wraps a numpy-based environment so that it can be interacted with through PyTorch Tensors.

---
## __init__
```python
from numpy_to_torch import __init__
```

Wrapper class to change inputs and outputs of environment to PyTorch tensors.

Args:
    env: The Jax-based vector environment to wrap
    device: The device the torch Tensors should be moved to

---
## step
```python
from numpy_to_torch import step
```

Using a PyTorch based action that is converted to NumPy to be used by the environment.

Args:
    action: A PyTorch-based action

Returns:
    The PyTorch-based Tensor next observation, reward, termination, truncation, and extra info

---
## reset
```python
from numpy_to_torch import reset
```

Resets the environment returning PyTorch-based observation and info.

Args:
    seed: The seed for resetting the environment
    options: The options for resetting the environment, these are converted to jax arrays.

Returns:
    PyTorch-based observations and info

---
## AutoresetV0
```python
from common import AutoresetV0
```

A class for providing an automatic reset functionality for gymnasium environments when calling :meth:`self.step`.

---
## PassiveEnvCheckerV0
```python
from common import PassiveEnvCheckerV0
```

A passive environment checker wrapper that surrounds the step, reset and render functions to check they follow the gymnasium API.

---
## OrderEnforcingV0
```python
from common import OrderEnforcingV0
```

A wrapper that will produce an error if :meth:`step` is called before an initial :meth:`reset`.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import OrderEnforcingV0
    >>> env = gym.make("CartPole-v1", render_mode="human")
    >>> env = OrderEnforcingV0(env)
    >>> env.step(0)
    Traceback (most recent call last):
        ...
    gymnasium.error.ResetNeeded: Cannot call env.step() before calling env.reset()
    >>> env.render()
    Traceback (most recent call last):
        ...
    gymnasium.error.ResetNeeded: Cannot call `env.render()` before calling `env.reset()`, if this is a intended action, set `disable_render_order_enforcing=True` on the OrderEnforcer wrapper.
    >>> _ = env.reset()
    >>> env.render()
    >>> _ = env.step(0)
    >>> env.close()

---
## RecordEpisodeStatisticsV0
```python
from common import RecordEpisodeStatisticsV0
```

This wrapper will keep track of cumulative rewards and episode lengths.

At the end of an episode, the statistics of the episode will be added to ``info``
using the key ``episode``. If using a vectorized environment also the key
``_episode`` is used which indicates whether the env at the respective index has
the episode statistics.

After the completion of an episode, ``info`` will look like this::

    >>> info = {
    ...     "episode": {
    ...         "r": "<cumulative reward>",
    ...         "l": "<episode length>",
    ...         "t": "<elapsed time since beginning of episode>"
    ...     },
    ... }

For a vectorized environments the output will be in the form of::

    >>> infos = {
    ...     "final_observation": "<array of length num-envs>",
    ...     "_final_observation": "<boolean array of length num-envs>",
    ...     "final_info": "<array of length num-envs>",
    ...     "_final_info": "<boolean array of length num-envs>",
    ...     "episode": {
    ...         "r": "<array of cumulative reward>",
    ...         "l": "<array of episode length>",
    ...         "t": "<array of elapsed time since beginning of episode>"
    ...     },
    ...     "_episode": "<boolean array of length num-envs>"
    ... }


Moreover, the most recent rewards and episode lengths are stored in buffers that can be accessed via
:attr:`wrapped_env.return_queue` and :attr:`wrapped_env.length_queue` respectively.

Attributes:
    episode_reward_buffer: The cumulative rewards of the last ``deque_size``-many episodes
    episode_length_buffer: The lengths of the last ``deque_size``-many episodes

---
## step
```python
from common import step
```

Steps through the environment, recording the episode statistics.

---
## reset
```python
from common import reset
```

Resets the environment using seed and options and resets the episode rewards and lengths.

---
## render
```python
from common import render
```

Renders the environment with `kwargs`.

---
## has_reset
```python
from common import has_reset
```

Returns if the environment has been reset before.

---
## RunningMeanStd
```python
from utils import RunningMeanStd
```

Tracks the mean, variance and count of values.

---
## update_mean_var_count_from_moments
```python
from utils import update_mean_var_count_from_moments
```

Updates the mean, var and count using the previous mean, var, count and batch values.

---
## create_zero_array
```python
from utils import create_zero_array
```

Creates a zero-based array of a space, this is similar to ``create_empty_array`` except all arrays are valid samples from the space.

As some ``Box`` cases have ``high`` or ``low`` that don't contain zero then the ``create_empty_array`` would in case
create arrays which is not contained in the space.

Args:
    space: The space to create a zero array for

Returns:
    Valid sample from the space that is as close to zero as possible

---
## _create_box_zero_array
```python
from utils import _create_box_zero_array
```



---
## _create_discrete_zero_array
```python
from utils import _create_discrete_zero_array
```



---
## _create_multidiscrete_zero_array
```python
from utils import _create_multidiscrete_zero_array
```



---
## _create_array_zero_array
```python
from utils import _create_array_zero_array
```



---
## _create_tuple_zero_array
```python
from utils import _create_tuple_zero_array
```



---
## _create_dict_zero_array
```python
from utils import _create_dict_zero_array
```



---
## _create_sequence_zero_array
```python
from utils import _create_sequence_zero_array
```



---
## _create_text_zero_array
```python
from utils import _create_text_zero_array
```



---
## _create_graph_zero_array
```python
from utils import _create_graph_zero_array
```



---
## update
```python
from utils import update
```

Updates the mean, var and count from a batch of samples.

---
## update_from_moments
```python
from utils import update_from_moments
```

Updates from batch mean, variance and count moments.

---
## AtariPreprocessingV0
```python
from atari_preprocessing import AtariPreprocessingV0
```

Atari 2600 preprocessing wrapper.

This class follows the guidelines in Machado et al. (2018),
"Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents".

Specifically, the following preprocess stages applies to the atari environment:

- Noop Reset: Obtains the initial state by taking a random number of no-ops on reset, default max 30 no-ops.
- Frame skipping: The number of frames skipped between steps, 4 by default
- Max-pooling: Pools over the most recent two observations from the frame skips
- Termination signal when a life is lost: When the agent losses a life during the environment, then the environment is terminated.
    Turned off by default. Not recommended by Machado et al. (2018).
- Resize to a square image: Resizes the atari environment original observation shape from 210x180 to 84x84 by default
- Grayscale observation: If the observation is colour or greyscale, by default, greyscale.
- Scale observation: If to scale the observation between [0, 1) or [0, 255), by default, not scaled.

---
## __name__
```python
from lambda_action import __name__
```

A collection of wrappers that all use the LambdaAction class.

* ``LambdaActionV0`` - Transforms the actions based on a function
* ``ClipActionV0`` - Clips the action within a bounds
* ``RescaleActionV0`` - Rescales the action within a minimum and maximum actions

---
## LambdaActionV0
```python
from lambda_action import LambdaActionV0
```

A wrapper that provides a function to modify the action passed to :meth:`step`.

---
## ClipActionV0
```python
from lambda_action import ClipActionV0
```

Clip the continuous action within the valid :class:`Box` observation space bound.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import ClipActionV0
    >>> import numpy as np
    >>> env = gym.make("Hopper-v4", disable_env_checker=True)
    >>> env = ClipActionV0(env)
    >>> env.action_space
    Box(-inf, inf, (3,), float32)
    >>> _ = env.reset(seed=42)
    >>> _ = env.step(np.array([5.0, -2.0, 0.0], dtype=np.float32))
    ... # Executes the action np.array([1.0, -1.0, 0]) in the base environment

---
## RescaleActionV0
```python
from lambda_action import RescaleActionV0
```

Affinely rescales the continuous action space of the environment to the range [min_action, max_action].

The base environment :attr:`env` must have an action space of type :class:`spaces.Box`. If :attr:`min_action`
or :attr:`max_action` are numpy arrays, the shape must match the shape of the environment's action space.

Example:
    >>> import gymnasium as gym
    >>> from gymnasium.experimental.wrappers import RescaleActionV0
    >>> import numpy as np
    >>> env = gym.make("Hopper-v4", disable_env_checker=True)
    >>> _ = env.reset(seed=42)
    >>> obs, _, _, _, _ = env.step(np.array([1, 1, 1], dtype=np.float32))
    >>> _ = env.reset(seed=42)
    >>> min_action = -0.5
    >>> max_action = np.array([0.0, 0.5, 0.75], dtype=np.float32)
    >>> wrapped_env = RescaleActionV0(env, min_action=min_action, max_action=max_action)
    >>> wrapped_env_obs, _, _, _, _ = wrapped_env.step(max_action)
    >>> np.alltrue(obs == wrapped_env_obs)
    True

---
## __init__
```python
from lambda_action import __init__
```

Constructor for the Rescale Action wrapper.

Args:
    env (Env): The environment to wrap
    min_action (float, int or np.ndarray): The min values for each action. This may be a numpy array or a scalar.
    max_action (float, int or np.ndarray): The max values for each action. This may be a numpy array or a scalar.

---
## action
```python
from lambda_action import action
```

Apply function to action.

---
## __name__
```python
from stateful_action import __name__
```

``StickyAction`` wrapper - There is a probability that the action is taken again.

---
## StickyActionV0
```python
from stateful_action import StickyActionV0
```

Wrapper which adds a probability of repeating the previous action.

This wrapper follows the implementation proposed by `Machado et al., 2018 <https://arxiv.org/pdf/1709.06009.pdf>`_
in Section 5.2 on page 12.

---
## __init__
```python
from stateful_action import __init__
```

Initialize StickyAction wrapper.

Args:
    env (Env): the wrapped environment
    repeat_action_probability (int | float): a probability of repeating the old action.

---
## reset
```python
from stateful_action import reset
```

Reset the environment.

---
## action
```python
from stateful_action import action
```

Execute the action.

---
## reset
```python
from sync_vector_env import reset
```

Waits for the calls triggered by :meth:`reset_async` to finish and returns the results.

Args:
    seed: The reset environment seed
    options: Option information for the environment reset

Returns:
    The reset observation of the environment and reset information

---
## step
```python
from sync_vector_env import step
```

Steps through each of the environments returning the batched results.

Returns:
    The batched environment step results

---
## get_attr
```python
from sync_vector_env import get_attr
```

Get a property from each parallel environment.

Args:
    name (str): Name of the property to be get from each individual environment.

Returns:
    The property with name

---
## VectorWrapper
```python
from vector_env import VectorWrapper
```

Wraps the vectorized environment to allow a modular transformation.

This class is the base class for all wrappers for vectorized environments. The subclass
could override some methods to change the behavior of the original vectorized environment
without touching the original code.

Note:
    Don't forget to call ``super().__init__(env)`` if the subclass overrides :meth:`__init__`.

---
## VectorObservationWrapper
```python
from vector_env import VectorObservationWrapper
```

Wraps the vectorized environment to allow a modular transformation of the observation. Equivalent to :class:`gym.ObservationWrapper` for vectorized environments.

---
## VectorActionWrapper
```python
from vector_env import VectorActionWrapper
```

Wraps the vectorized environment to allow a modular transformation of the actions. Equivalent of :class:`~gym.ActionWrapper` for vectorized environments.

---
## VectorRewardWrapper
```python
from vector_env import VectorRewardWrapper
```

Wraps the vectorized environment to allow a modular transformation of the reward. Equivalent of :class:`~gym.RewardWrapper` for vectorized environments.

---
## np_random
```python
from vector_env import np_random
```



---
## spec
```python
from vector_env import spec
```

Gets the specification of the wrapped environment.

---
## observation_space
```python
from vector_env import observation_space
```

Sets the observation space of the vector environment.

---
## action_space
```python
from vector_env import action_space
```

Sets the action space of the vector environment.

---
## single_observation_space
```python
from vector_env import single_observation_space
```

Sets the single observation space of the vector environment.

---
## single_action_space
```python
from vector_env import single_action_space
```

Sets the single action space of the vector environment.

---
## num_envs
```python
from vector_env import num_envs
```

Gets the wrapped vector environment's num of the sub-environments.

---
## vector_observation
```python
from vector_env import vector_observation
```

Defines the vector observation transformation.

Args:
    observation: A vector observation from the environment

Returns:
    the transformed observation

---
## single_observation
```python
from vector_env import single_observation
```

Defines the single observation transformation.

Args:
    observation: A single observation from the environment

Returns:
    The transformed observation

---
## update_final_obs
```python
from vector_env import update_final_obs
```

Updates the `final_obs` in the info using `single_observation`.

---
## actions
```python
from vector_env import actions
```

Transform the actions before sending them to the environment.

Args:
    actions (ActType): the actions to transform

Returns:
    ActType: the transformed actions

---
## reward
```python
from vector_env import reward
```

Transform the reward before returning it.

Args:
    reward (array): the reward to transform

Returns:
    array: the transformed reward

---
## reset
```python
from async_vector_env import reset
```

Reset all parallel environments and return a batch of initial observations and info.

Args:
    seed: The environment reset seeds
    options: If to return the options

Returns:
    A batch of observations and info from the vectorized environment.

---
## step
```python
from async_vector_env import step
```

Take an action for each parallel environment.

Args:
    actions: element of :attr:`action_space` Batch of actions.

Returns:
    Batch of (observations, rewards, terminations, truncations, infos)

---
## call
```python
from async_vector_env import call
```

Call a method, or get a property, from each parallel environment.

Args:
    name (str): Name of the method or property to call.
    *args: Arguments to apply to the method call.
    **kwargs: Keyword arguments to apply to the method call.

Returns:
    List of the results of the individual calls to the method or property for each environment.

---
## get_attr
```python
from async_vector_env import get_attr
```

Get a property from each parallel environment.

Args:
    name (str): Name of the property to be get from each individual environment.

Returns:
    The property with name

---
## __name__
```python
from dict_info_to_list import __name__
```

Wrapper that converts the info format for vec envs into the list format.

---
## DictInfoToListV0
```python
from dict_info_to_list import DictInfoToListV0
```

Converts infos of vectorized environments from dict to List[dict].

This wrapper converts the info format of a
vector environment from a dictionary to a list of dictionaries.
This wrapper is intended to be used around vectorized
environments. If using other wrappers that perform
operation on info like `RecordEpisodeStatistics` this
need to be the outermost wrapper.

i.e. ``DictInfoToListV0(RecordEpisodeStatisticsV0(vector_env))``

Example::

    >>> import numpy as np
    >>> dict_info = {
    ...      "k": np.array([0., 0., 0.5, 0.3]),
    ...      "_k": np.array([False, False, True, True])
    ...  }
    >>> list_info = [{}, {}, {"k": 0.5}, {"k": 0.3}]

---
## __init__
```python
from dict_info_to_list import __init__
```

This wrapper will convert the info into the list format.

Args:
    env (Env): The environment to apply the wrapper

---
## step
```python
from dict_info_to_list import step
```

Steps through the environment, convert dict info to list.

---
## reset
```python
from dict_info_to_list import reset
```

Resets the environment using kwargs.

---
## _convert_info_to_list
```python
from dict_info_to_list import _convert_info_to_list
```

Convert the dict info to list.

Convert the dict info of the vectorized environment
into a list of dictionaries where the i-th dictionary
has the info of the i-th environment.

Args:
    infos (dict): info dict coming from the env.

Returns:
    list_info (list): converted info.

---
## __name__
```python
from vectorize_action import __name__
```

Vectorizes action wrappers to work for `VectorEnv`.

---
## LambdaActionV0
```python
from vectorize_action import LambdaActionV0
```

Transforms an action via a function provided to the wrapper.

The function :attr:`func` will be applied to all vector actions.
If the observations from :attr:`func` are outside the bounds of the ``env``'s action space, provide an :attr:`action_space`.

---
## VectorizeLambdaActionV0
```python
from vectorize_action import VectorizeLambdaActionV0
```

Vectorizes a single-agent lambda action wrapper for vector environments.

---
## ClipActionV0
```python
from vectorize_action import ClipActionV0
```

Clip the continuous action within the valid :class:`Box` observation space bound.

---
## RescaleActionV0
```python
from vectorize_action import RescaleActionV0
```

Affinely rescales the continuous action space of the environment to the range [min_action, max_action].

---
## __init__
```python
from vectorize_action import __init__
```

Constructor for the fake environment.

---
## actions
```python
from vectorize_action import actions
```

Applies the wrapper to each of the action.

Args:
    actions: The actions to apply the function to

Returns:
    The updated actions using the wrapper func

---
## VectorizedEnv
```python
from vectorize_action import VectorizedEnv
```

Fake single-agent environment uses for the single-agent wrapper.

---
## __name__
```python
from vectorize_reward import __name__
```

Vectorizes reward function to work with `VectorEnv`.

---
## LambdaRewardV0
```python
from vectorize_reward import LambdaRewardV0
```

A reward wrapper that allows a custom function to modify the step reward.

---
## VectorizeLambdaRewardV0
```python
from vectorize_reward import VectorizeLambdaRewardV0
```

Vectorizes a single-agent lambda reward wrapper for vector environments.

---
## ClipRewardV0
```python
from vectorize_reward import ClipRewardV0
```

A wrapper that clips the rewards for an environment between an upper and lower bound.

---
## __init__
```python
from vectorize_reward import __init__
```

Constructor for ClipReward wrapper.

Args:
    env: The vector environment to wrap
    min_reward: The min reward for each step
    max_reward: the max reward for each step

---
## reward
```python
from vectorize_reward import reward
```

Iterates over the reward updating each with the wrapper func.

---
## RecordEpisodeStatisticsV0
```python
from record_episode_statistics import RecordEpisodeStatisticsV0
```

This wrapper will keep track of cumulative rewards and episode lengths.

At the end of an episode, the statistics of the episode will be added to ``info``
using the key ``episode``. If using a vectorized environment also the key
``_episode`` is used which indicates whether the env at the respective index has
the episode statistics.

After the completion of an episode, ``info`` will look like this::

    >>> info = {  # doctest: +SKIP
    ...     ...
    ...     "episode": {
    ...         "r": "<cumulative reward>",
    ...         "l": "<episode length>",
    ...         "t": "<elapsed time since beginning of episode>"
    ...     },
    ... }

For a vectorized environments the output will be in the form of::

    >>> infos = {  # doctest: +SKIP
    ...     ...
    ...     "episode": {
    ...         "r": "<array of cumulative reward for each done sub-environment>",
    ...         "l": "<array of episode length for each done sub-environment>",
    ...         "t": "<array of elapsed time since beginning of episode for each done sub-environment>"
    ...     },
    ...     "_episode": "<boolean array of length num-envs>"
    ... }

Moreover, the most recent rewards and episode lengths are stored in buffers that can be accessed via
:attr:`wrapped_env.return_queue` and :attr:`wrapped_env.length_queue` respectively.

Attributes:
    return_queue: The cumulative rewards of the last ``deque_size``-many episodes
    length_queue: The lengths of the last ``deque_size``-many episodes

---
## __name__
```python
from vectorize_observation import __name__
```

Vectorizes observation wrappers to works for `VectorEnv`.

---
## LambdaObservationV0
```python
from vectorize_observation import LambdaObservationV0
```

Transforms an observation via a function provided to the wrapper.

The function :attr:`func` will be applied to all vector observations.
If the observations from :attr:`func` are outside the bounds of the ``env``'s observation space, provide an :attr:`observation_space`.

---
## VectorizeLambdaObservationV0
```python
from vectorize_observation import VectorizeLambdaObservationV0
```

Vectori`es a single-agent lambda observation wrapper for vector environments.

---
## FilterObservationV0
```python
from vectorize_observation import FilterObservationV0
```

Vector wrapper for filtering dict or tuple observation spaces.

---
## FlattenObservationV0
```python
from vectorize_observation import FlattenObservationV0
```

Observation wrapper that flattens the observation.

---
## GrayscaleObservationV0
```python
from vectorize_observation import GrayscaleObservationV0
```

Observation wrapper that converts an RGB image to grayscale.

---
## ResizeObservationV0
```python
from vectorize_observation import ResizeObservationV0
```

Resizes image observations using OpenCV to shape.

---
## ReshapeObservationV0
```python
from vectorize_observation import ReshapeObservationV0
```

Reshapes array based observations to shapes.

---
## RescaleObservationV0
```python
from vectorize_observation import RescaleObservationV0
```

Linearly rescales observation to between a minimum and maximum value.

---
## DtypeObservationV0
```python
from vectorize_observation import DtypeObservationV0
```

Observation wrapper for transforming the dtype of an observation.

---
## __init__
```python
from vectorize_observation import __init__
```

Constructor for the fake environment.

---
## vector_observation
```python
from vectorize_observation import vector_observation
```

Iterates over the vector observations applying the single-agent wrapper ``observation`` then concatenates the observations together again.

---
## single_observation
```python
from vectorize_observation import single_observation
```

Transforms a single observation using the wrapper transformation function.

---
## VectorizedEnv
```python
from vectorize_observation import VectorizedEnv
```

Fake single-agent environment uses for the single-agent wrapper.

---
## CloudpickleWrapper
```python
from misc import CloudpickleWrapper
```

Wrapper that uses cloudpickle to pickle and unpickle the result.

---
## clear_mpi_env_vars
```python
from misc import clear_mpi_env_vars
```

Clears the MPI of environment variables.

`from mpi4py import MPI` will call `MPI_Init` by default.
If the child process has MPI environment variables, MPI will think that the child process
is an MPI process just like the parent and do bad things such as hang.

This context manager is a hacky way to clear those environment variables
temporarily such as when we are starting multiprocessing Processes.

Yields:
    Yields for the context manager

---
## __init__
```python
from misc import __init__
```



---
## __getstate__
```python
from misc import __getstate__
```

Get the state using `cloudpickle.dumps(self.fn)`.

---
## __setstate__
```python
from misc import __setstate__
```

Sets the state with obs.

---
## __call__
```python
from misc import __call__
```

Calls the function `self.fn` with no arguments.

---
## create_shared_memory
```python
from shared_memory import create_shared_memory
```

Create a shared memory object, to be shared across processes.

This eventually contains the observations from the vectorized environment.

Args:
    space: Observation space of a single environment in the vectorized environment.
    n: Number of environments in the vectorized environment (i.e. the number of processes).
    ctx: The multiprocess module

Returns:
    shared_memory for the shared object across processes.

Raises:
    CustomSpaceError: Space is not a valid :class:`gymnasium.Space` instance

---
## _create_base_shared_memory
```python
from shared_memory import _create_base_shared_memory
```



---
## _create_tuple_shared_memory
```python
from shared_memory import _create_tuple_shared_memory
```



---
## _create_dict_shared_memory
```python
from shared_memory import _create_dict_shared_memory
```



---
## _create_text_shared_memory
```python
from shared_memory import _create_text_shared_memory
```



---
## _create_dynamic_shared_memory
```python
from shared_memory import _create_dynamic_shared_memory
```



---
## read_from_shared_memory
```python
from shared_memory import read_from_shared_memory
```

Read the batch of observations from shared memory as a numpy array.

..notes::
    The numpy array objects returned by `read_from_shared_memory` shares the
    memory of `shared_memory`. Any changes to `shared_memory` are forwarded
    to `observations`, and vice-versa. To avoid any side-effect, use `np.copy`.

Args:
    space: Observation space of a single environment in the vectorized environment.
    shared_memory: Shared object across processes. This contains the observations from the vectorized environment.
        This object is created with `create_shared_memory`.
    n: Number of environments in the vectorized environment (i.e. the number of processes).

Returns:
    Batch of observations as a (possibly nested) numpy array.

Raises:
    CustomSpaceError: Space is not a valid :class:`gymnasium.Space` instance

---
## _read_base_from_shared_memory
```python
from shared_memory import _read_base_from_shared_memory
```



---
## _read_tuple_from_shared_memory
```python
from shared_memory import _read_tuple_from_shared_memory
```



---
## _read_dict_from_shared_memory
```python
from shared_memory import _read_dict_from_shared_memory
```



---
## _read_text_from_shared_memory
```python
from shared_memory import _read_text_from_shared_memory
```



---
## write_to_shared_memory
```python
from shared_memory import write_to_shared_memory
```

Write the observation of a single environment into shared memory.

Args:
    space: Observation space of a single environment in the vectorized environment.
    index: Index of the environment (must be in `[0, num_envs)`).
    value: Observation of the single environment to write to shared memory.
    shared_memory: Shared object across processes. This contains the observations from the vectorized environment.
        This object is created with `create_shared_memory`.

Raises:
    CustomSpaceError: Space is not a valid :class:`gymnasium.Space` instance

---
## _write_base_to_shared_memory
```python
from shared_memory import _write_base_to_shared_memory
```



---
## _write_tuple_to_shared_memory
```python
from shared_memory import _write_tuple_to_shared_memory
```



---
## _write_dict_to_shared_memory
```python
from shared_memory import _write_dict_to_shared_memory
```



---
## _write_text_to_shared_memory
```python
from shared_memory import _write_text_to_shared_memory
```



---
## __name__
```python
from space_utils import __name__
```

Space-based utility functions for vector environments.

- ``batch_space``: Create a (batched) space, containing multiple copies of a single space.
- ``concatenate``: Concatenate multiple samples from (unbatched) space into a single object.
- ``Iterate``: Iterate over the elements of a (batched) space and items.
- ``create_empty_array``: Create an empty (possibly nested) (normally numpy-based) array, used in conjunction with ``concatenate(..., out=array)``

---
## batch_space
```python
from space_utils import batch_space
```

Create a (batched) space, containing multiple copies of a single space.

Args:
    space: Space (e.g. the observation space) for a single environment in the vectorized environment.
    n: Number of environments in the vectorized environment.

Returns:
    Space (e.g. the observation space) for a batch of environments in the vectorized environment.

Raises:
    ValueError: Cannot batch space does not have a registered function.

Example:

    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ...     'position': Box(low=0, high=1, shape=(3,), dtype=np.float32),
    ...     'velocity': Box(low=0, high=1, shape=(2,), dtype=np.float32)
    ... })
    >>> batch_space(space, n=5)
    Dict('position': Box(0.0, 1.0, (5, 3), float32), 'velocity': Box(0.0, 1.0, (5, 2), float32))

---
## _batch_space_box
```python
from space_utils import _batch_space_box
```



---
## _batch_space_discrete
```python
from space_utils import _batch_space_discrete
```



---
## _batch_space_multidiscrete
```python
from space_utils import _batch_space_multidiscrete
```



---
## _batch_space_multibinary
```python
from space_utils import _batch_space_multibinary
```



---
## _batch_space_tuple
```python
from space_utils import _batch_space_tuple
```



---
## _batch_space_dict
```python
from space_utils import _batch_space_dict
```



---
## _batch_space_custom
```python
from space_utils import _batch_space_custom
```



---
## iterate
```python
from space_utils import iterate
```

Iterate over the elements of a (batched) space.

Args:
    space: Observation space of a single environment in the vectorized environment.
    items: Samples to be concatenated.
    out: The output object. This object is a (possibly nested) numpy array.

Returns:
    The output object. This object is a (possibly nested) numpy array.

Raises:
    ValueError: Space is not an instance of :class:`gym.Space`

Example:
    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ... 'position': Box(low=0, high=1, shape=(2, 3), seed=42, dtype=np.float32),
    ... 'velocity': Box(low=0, high=1, shape=(2, 2), seed=42, dtype=np.float32)})
    >>> items = space.sample()
    >>> it = iterate(space, items)
    >>> next(it)
    OrderedDict([('position', array([0.77395606, 0.43887845, 0.85859793], dtype=float32)), ('velocity', array([0.77395606, 0.43887845], dtype=float32))])
    >>> next(it)
    OrderedDict([('position', array([0.697368  , 0.09417735, 0.97562236], dtype=float32)), ('velocity', array([0.85859793, 0.697368  ], dtype=float32))])
    >>> next(it)
    Traceback (most recent call last):
        ...
    StopIteration

---
## _iterate_discrete
```python
from space_utils import _iterate_discrete
```



---
## _iterate_base
```python
from space_utils import _iterate_base
```



---
## _iterate_tuple
```python
from space_utils import _iterate_tuple
```



---
## _iterate_dict
```python
from space_utils import _iterate_dict
```



---
## concatenate
```python
from space_utils import concatenate
```

Concatenate multiple samples from space into a single object.

Args:
    space: Observation space of a single environment in the vectorized environment.
    items: Samples to be concatenated.
    out: The output object. This object is a (possibly nested) numpy array.

Returns:
    The output object. This object is a (possibly nested) numpy array.

Raises:
    ValueError: Space

Example:
    >>> from gymnasium.spaces import Box
    >>> import numpy as np
    >>> space = Box(low=0, high=1, shape=(3,), seed=42, dtype=np.float32)
    >>> out = np.zeros((2, 3), dtype=np.float32)
    >>> items = [space.sample() for _ in range(2)]
    >>> concatenate(space, items, out)
    array([[0.77395606, 0.43887845, 0.85859793],
           [0.697368  , 0.09417735, 0.97562236]], dtype=float32)

---
## _concatenate_base
```python
from space_utils import _concatenate_base
```



---
## _concatenate_tuple
```python
from space_utils import _concatenate_tuple
```



---
## _concatenate_dict
```python
from space_utils import _concatenate_dict
```



---
## _concatenate_custom
```python
from space_utils import _concatenate_custom
```



---
## create_empty_array
```python
from space_utils import create_empty_array
```

Create an empty (possibly nested) (normally numpy-based) array, used in conjunction with ``concatenate(..., out=array)``.

In most cases, the array will be contained within the batched space, however, this is not guaranteed.

Args:
    space: Observation space of a single environment in the vectorized environment.
    n: Number of environments in the vectorized environment. If `None`, creates an empty sample from `space`.
    fn: Function to apply when creating the empty numpy array. Examples of such functions are `np.empty` or `np.zeros`.

Returns:
    The output object. This object is a (possibly nested) numpy array.

Raises:
    ValueError: Space is not a valid :class:`gym.Space` instance

Example:
    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ... 'position': Box(low=0, high=1, shape=(3,), dtype=np.float32),
    ... 'velocity': Box(low=0, high=1, shape=(2,), dtype=np.float32)})
    >>> create_empty_array(space, n=2, fn=np.zeros)
    OrderedDict([('position', array([[0., 0., 0.],
           [0., 0., 0.]], dtype=float32)), ('velocity', array([[0., 0.],
           [0., 0.]], dtype=float32))])

---
## _create_empty_array_multi
```python
from space_utils import _create_empty_array_multi
```



---
## _create_empty_array_tuple
```python
from space_utils import _create_empty_array_tuple
```



---
## _create_empty_array_dict
```python
from space_utils import _create_empty_array_dict
```



---
## _create_empty_array_graph
```python
from space_utils import _create_empty_array_graph
```



---
## _create_empty_array_text
```python
from space_utils import _create_empty_array_text
```



---
## _create_empty_array_sequence
```python
from space_utils import _create_empty_array_sequence
```



---
## _create_empty_array_custom
```python
from space_utils import _create_empty_array_custom
```



---
## __name__
```python
from cliffwalking import __name__
```

This module provides a CliffWalking functional environment and Gymnasium environment wrapper CliffWalkingJaxEnv.

---
## CliffWalkingEnv
```python
from cliffwalking import CliffWalkingEnv
```

Cliff walking involves crossing a gridworld from start to goal while avoiding falling off a cliff.

## Description
The game starts with the player at location [3, 0] of the 4x12 grid world with the
goal located at [3, 11]. If the player reaches the goal the episode ends.

A cliff runs along [3, 1..10]. If the player moves to a cliff location it
returns to the start location.

The player makes moves until they reach the goal.

Adapted from Example 6.6 (page 132) from Reinforcement Learning: An Introduction
by Sutton and Barto [<a href="#cliffwalk_ref">1</a>].

With inspiration from:
[https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/cliff_walking.py](https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/cliff_walking.py)

## Action Space
The action shape is `(1,)` in the range `{0, 3}` indicating
which direction to move the player.

- 0: Move up
- 1: Move right
- 2: Move down
- 3: Move left

## Observation Space
There are 3 x 12 + 1 possible states. The player cannot be at the cliff, nor at
the goal as the latter results in the end of the episode. What remains are all
the positions of the first 3 rows plus the bottom-left cell.

The observation is a value representing the player's current position as
current_row * nrows + current_col (where both the row and col start at 0).

For example, the stating position can be calculated as follows: 3 * 12 + 0 = 36.

The observation is returned as an `int()`.

## Starting State
The episode starts with the player in state `[36]` (location [3, 0]).

## Reward
Each time step incurs -1 reward, unless the player stepped into the cliff,
which incurs -100 reward.

## Episode End
The episode terminates when the player enters state `[47]` (location [3, 11]).

## Information

`step()` and `reset()` return a dict with the following keys:
- "p" - transition proability for the state.

As cliff walking is not stochastic, the transition probability returned always 1.0.

## Arguments

```python
import gymnasium as gym
gym.make('CliffWalking-v0')
```

## References
<a id="cliffwalk_ref"></a>[1] R. Sutton and A. Barto, “Reinforcement Learning:
An Introduction” 2020. [Online]. Available: [http://www.incompleteideas.net/book/RLbook2020.pdf](http://www.incompleteideas.net/book/RLbook2020.pdf)

## Version History
- v0: Initial version release

---
## __init__
```python
from cliffwalking import __init__
```

Initializes Gym wrapper for cliffwalking functional env.

---
## _limit_coordinates
```python
from cliffwalking import _limit_coordinates
```

Prevent the agent from falling out of the grid world.

---
## _calculate_transition_prob
```python
from cliffwalking import _calculate_transition_prob
```

Determine the outcome for an action. Transition Prob is always 1.0.

Args:
    current: Current position on the grid as (row, col)
    delta: Change in position for transition

Returns:
    Tuple of ``(1.0, new_state, reward, terminated)``

---
## step
```python
from cliffwalking import step
```



---
## reset
```python
from cliffwalking import reset
```



---
## render
```python
from cliffwalking import render
```



---
## _render_gui
```python
from cliffwalking import _render_gui
```



---
## _render_text
```python
from cliffwalking import _render_text
```



---
## __name__
```python
from taxi import __name__
```



---
## TaxiEnv
```python
from taxi import TaxiEnv
```

The Taxi Problem involves navigating to passengers in a grid world, picking them up and dropping them
off at one of four locations.

## Description
There are four designated pick-up and drop-off locations (Red, Green, Yellow and Blue) in the
5x5 grid world. The taxi starts off at a random square and the passenger at one of the
designated locations.

The goal is move the taxi to the passenger's location, pick up the passenger,
move to the passenger's desired destination, and
drop off the passenger. Once the passenger is dropped off, the episode ends.

The player receives positive rewards for successfully dropping-off the passenger at the correct
location. Negative rewards for incorrect attempts to pick-up/drop-off passenger and
for each step where another reward is not received.

Map:

        +---------+
        |R: | : :G|
        | : | : : |
        | : : : : |
        | | : | : |
        |Y| : |B: |
        +---------+

From "Hierarchical Reinforcement Learning with the MAXQ Value Function Decomposition"
by Tom Dietterich [<a href="#taxi_ref">1</a>].

## Action Space
The action shape is `(1,)` in the range `{0, 5}` indicating
which direction to move the taxi or to pickup/drop off passengers.

- 0: Move south (down)
- 1: Move north (up)
- 2: Move east (right)
- 3: Move west (left)
- 4: Pickup passenger
- 5: Drop off passenger

## Observation Space
There are 500 discrete states since there are 25 taxi positions, 5 possible
locations of the passenger (including the case when the passenger is in the
taxi), and 4 destination locations.

Destination on the map are represented with the first letter of the color.

Passenger locations:
- 0: Red
- 1: Green
- 2: Yellow
- 3: Blue
- 4: In taxi

Destinations:
- 0: Red
- 1: Green
- 2: Yellow
- 3: Blue

An observation is returned as an `int()` that encodes the corresponding state, calculated by
`((taxi_row * 5 + taxi_col) * 5 + passenger_location) * 4 + destination`

Note that there are 400 states that can actually be reached during an
episode. The missing states correspond to situations in which the passenger
is at the same location as their destination, as this typically signals the
end of an episode. Four additional states can be observed right after a
successful episodes, when both the passenger and the taxi are at the destination.
This gives a total of 404 reachable discrete states.

## Starting State
The episode starts with the player in a random state.

## Rewards
- -1 per step unless other reward is triggered.
- +20 delivering passenger.
- -10  executing "pickup" and "drop-off" actions illegally.

An action that results a noop, like moving into a wall, will incur the time step
penalty. Noops can be avoided by sampling the `action_mask` returned in `info`.

## Episode End
The episode ends if the following happens:

- Termination:
        1. The taxi drops off the passenger.

- Truncation (when using the time_limit wrapper):
        1. The length of the episode is 200.

## Information

`step()` and `reset()` return a dict with the following keys:
- p - transition proability for the state.
- action_mask - if actions will cause a transition to a new state.

As taxi is not stochastic, the transition probability is always 1.0. Implementing
a transitional probability in line with the Dietterich paper ('The fickle taxi task')
is a TODO.

For some cases, taking an action will have no effect on the state of the episode.
In v0.25.0, ``info["action_mask"]`` contains a np.ndarray for each of the actions specifying
if the action will change the state.

To sample a modifying action, use ``action = env.action_space.sample(info["action_mask"])``
Or with a Q-value based algorithm ``action = np.argmax(q_values[obs, np.where(info["action_mask"] == 1)[0]])``.


## Arguments

```python
import gymnasium as gym
gym.make('Taxi-v3')
```

## References
<a id="taxi_ref"></a>[1] T. G. Dietterich, “Hierarchical Reinforcement Learning with the MAXQ Value Function Decomposition,”
Journal of Artificial Intelligence Research, vol. 13, pp. 227–303, Nov. 2000, doi: 10.1613/jair.639.

## Version History
* v3: Map Correction + Cleaner Domain Description, v0.25.0 action masking added to the reset and step information
* v2: Disallow Taxi start location = goal location, Update Taxi observations in the rollout, Update Taxi reward threshold.
* v1: Remove (3,2) from locs, add passidx<4 check
* v0: Initial version release

---
## __init__
```python
from taxi import __init__
```



---
## encode
```python
from taxi import encode
```



---
## decode
```python
from taxi import decode
```



---
## action_mask
```python
from taxi import action_mask
```

Computes an action mask for the action space using the state information.

---
## step
```python
from taxi import step
```



---
## reset
```python
from taxi import reset
```



---
## render
```python
from taxi import render
```



---
## _render_gui
```python
from taxi import _render_gui
```



---
## get_surf_loc
```python
from taxi import get_surf_loc
```



---
## _render_text
```python
from taxi import _render_text
```



---
## close
```python
from taxi import close
```



---
## ul
```python
from taxi import ul
```



---
## __name__
```python
from frozen_lake import __name__
```



---
## is_valid
```python
from frozen_lake import is_valid
```



---
## generate_random_map
```python
from frozen_lake import generate_random_map
```

Generates a random valid map (one that has a path from start to goal)

Args:
    size: size of each side of the grid
    p: probability that a tile is frozen
    seed: optional seed to ensure the generation of reproducible maps

Returns:
    A random valid map

---
## FrozenLakeEnv
```python
from frozen_lake import FrozenLakeEnv
```

Frozen lake involves crossing a frozen lake from start to goal without falling into any holes
by walking over the frozen lake.
The player may not always move in the intended direction due to the slippery nature of the frozen lake.

## Description
The game starts with the player at location [0,0] of the frozen lake grid world with the
goal located at far extent of the world e.g. [3,3] for the 4x4 environment.

Holes in the ice are distributed in set locations when using a pre-determined map
or in random locations when a random map is generated.

The player makes moves until they reach the goal or fall in a hole.

The lake is slippery (unless disabled) so the player may move perpendicular
to the intended direction sometimes (see <a href="#is_slippy">`is_slippery`</a>).

Randomly generated worlds will always have a path to the goal.

Elf and stool from [https://franuka.itch.io/rpg-snow-tileset](https://franuka.itch.io/rpg-snow-tileset).
All other assets by Mel Tillery [http://www.cyaneus.com/](http://www.cyaneus.com/).

## Action Space
The action shape is `(1,)` in the range `{0, 3}` indicating
which direction to move the player.

- 0: Move left
- 1: Move down
- 2: Move right
- 3: Move up

## Observation Space
The observation is a value representing the player's current position as
current_row * nrows + current_col (where both the row and col start at 0).

For example, the goal position in the 4x4 map can be calculated as follows: 3 * 4 + 3 = 15.
The number of possible observations is dependent on the size of the map.

The observation is returned as an `int()`.

## Starting State
The episode starts with the player in state `[0]` (location [0, 0]).

## Rewards

Reward schedule:
- Reach goal: +1
- Reach hole: 0
- Reach frozen: 0

## Episode End
The episode ends if the following happens:

- Termination:
    1. The player moves into a hole.
    2. The player reaches the goal at `max(nrow) * max(ncol) - 1` (location `[max(nrow)-1, max(ncol)-1]`).

- Truncation (when using the time_limit wrapper):
    1. The length of the episode is 100 for 4x4 environment, 200 for FrozenLake8x8-v1 environment.

## Information

`step()` and `reset()` return a dict with the following keys:
- p - transition probability for the state.

See <a href="#is_slippy">`is_slippery`</a> for transition probability information.


## Arguments

```python
import gymnasium as gym
gym.make('FrozenLake-v1', desc=None, map_name="4x4", is_slippery=True)
```

`desc=None`: Used to specify maps non-preloaded maps.

Specify a custom map.
```
    desc=["SFFF", "FHFH", "FFFH", "HFFG"].
```

A random generated map can be specified by calling the function `generate_random_map`.
```
from gymnasium.envs.toy_text.frozen_lake import generate_random_map

gym.make('FrozenLake-v1', desc=generate_random_map(size=8))
```

`map_name="4x4"`: ID to use any of the preloaded maps.
```
    "4x4":[
        "SFFF",
        "FHFH",
        "FFFH",
        "HFFG"
        ]

    "8x8": [
        "SFFFFFFF",
        "FFFFFFFF",
        "FFFHFFFF",
        "FFFFFHFF",
        "FFFHFFFF",
        "FHHFFFHF",
        "FHFFHFHF",
        "FFFHFFFG",
    ]
```

If `desc=None` then `map_name` will be used. If both `desc` and `map_name` are
`None` a random 8x8 map with 80% of locations frozen will be generated.

<a id="is_slippy"></a>`is_slippery=True`: If true the player will move in intended direction with
probability of 1/3 else will move in either perpendicular direction with
equal probability of 1/3 in both directions.

For example, if action is left and is_slippery is True, then:
- P(move left)=1/3
- P(move up)=1/3
- P(move down)=1/3


## Version History
* v1: Bug fixes to rewards
* v0: Initial version release

---
## __init__
```python
from frozen_lake import __init__
```



---
## step
```python
from frozen_lake import step
```



---
## reset
```python
from frozen_lake import reset
```



---
## render
```python
from frozen_lake import render
```



---
## _render_gui
```python
from frozen_lake import _render_gui
```



---
## _center_small_rect
```python
from frozen_lake import _center_small_rect
```



---
## _render_text
```python
from frozen_lake import _render_text
```



---
## close
```python
from frozen_lake import close
```



---
## to_s
```python
from frozen_lake import to_s
```



---
## inc
```python
from frozen_lake import inc
```



---
## update_probability_matrix
```python
from frozen_lake import update_probability_matrix
```



---
## categorical_sample
```python
from utils import categorical_sample
```

Sample from categorical distribution where each row specifies class probabilities.

---
## __name__
```python
from blackjack import __name__
```

This module provides a Blackjack functional environment and Gymnasium environment wrapper BlackJackJaxEnv.

---
## cmp
```python
from blackjack import cmp
```

Returns 1 if a > b, otherwise returns -1.

---
## draw_card
```python
from blackjack import draw_card
```

Draws a new card and adds it to a hand.

---
## draw_hand
```python
from blackjack import draw_hand
```

Draws a starting hand of two random cards.

---
## usable_ace
```python
from blackjack import usable_ace
```

Checks to se if a hand has a usable ace.

---
## sum_hand
```python
from blackjack import sum_hand
```

Returns the total points in a hand.

---
## is_bust
```python
from blackjack import is_bust
```

Returns whether or not the hand is a bust.

---
## score
```python
from blackjack import score
```

Returns the score for a hand(0 if a bust).

---
## is_natural
```python
from blackjack import is_natural
```

Returns if the hand is a natural blackjack.

---
## BlackjackEnv
```python
from blackjack import BlackjackEnv
```

Blackjack is a card game where the goal is to beat the dealer by obtaining cards
that sum to closer to 21 (without going over 21) than the dealers cards.

## Description
The game starts with the dealer having one face up and one face down card,
while the player has two face up cards. All cards are drawn from an infinite deck
(i.e. with replacement).

The card values are:
- Face cards (Jack, Queen, King) have a point value of 10.
- Aces can either count as 11 (called a 'usable ace') or 1.
- Numerical cards (2-9) have a value equal to their number.

The player has the sum of cards held. The player can request
additional cards (hit) until they decide to stop (stick) or exceed 21 (bust,
immediate loss).

After the player sticks, the dealer reveals their facedown card, and draws cards
until their sum is 17 or greater. If the dealer goes bust, the player wins.

If neither the player nor the dealer busts, the outcome (win, lose, draw) is
decided by whose sum is closer to 21.

This environment corresponds to the version of the blackjack problem
described in Example 5.1 in Reinforcement Learning: An Introduction
by Sutton and Barto [<a href="#blackjack_ref">1</a>].

## Action Space
The action shape is `(1,)` in the range `{0, 1}` indicating
whether to stick or hit.

- 0: Stick
- 1: Hit

## Observation Space
The observation consists of a 3-tuple containing: the player's current sum,
the value of the dealer's one showing card (1-10 where 1 is ace),
and whether the player holds a usable ace (0 or 1).

The observation is returned as `(int(), int(), int())`.

## Starting State
The starting state is initialised in the following range.

| Observation               | Min  | Max  |
|---------------------------|------|------|
| Player current sum        |  4   |  12  |
| Dealer showing card value |  2   |  11  |
| Usable Ace                |  0   |  1   |

## Rewards
- win game: +1
- lose game: -1
- draw game: 0
- win game with natural blackjack:
+1.5 (if <a href="#nat">natural</a> is True)
+1 (if <a href="#nat">natural</a> is False)

## Episode End
The episode ends if the following happens:

- Termination:
1. The player hits and the sum of hand exceeds 21.
2. The player sticks.

An ace will always be counted as usable (11) unless it busts the player.

## Information

No additional information is returned.

## Arguments

```python
import gymnasium as gym
gym.make('Blackjack-v1', natural=False, sab=False)
```

<a id="nat"></a>`natural=False`: Whether to give an additional reward for
starting with a natural blackjack, i.e. starting with an ace and ten (sum is 21).

<a id="sab"></a>`sab=False`: Whether to follow the exact rules outlined in the book by
Sutton and Barto. If `sab` is `True`, the keyword argument `natural` will be ignored.
If the player achieves a natural blackjack and the dealer does not, the player
will win (i.e. get a reward of +1). The reverse rule does not apply.
If both the player and the dealer get a natural, it will be a draw (i.e. reward 0).

## References
<a id="blackjack_ref"></a>[1] R. Sutton and A. Barto, “Reinforcement Learning:
An Introduction” 2020. [Online]. Available: [http://www.incompleteideas.net/book/RLbook2020.pdf](http://www.incompleteideas.net/book/RLbook2020.pdf)

## Version History
* v1: Fix the natural handling in Blackjack
* v0: Initial version release

---
## __init__
```python
from blackjack import __init__
```

Initializes Gym wrapper for blackjack functional env.

---
## step
```python
from blackjack import step
```



---
## _get_obs
```python
from blackjack import _get_obs
```



---
## reset
```python
from blackjack import reset
```



---
## render
```python
from blackjack import render
```



---
## close
```python
from blackjack import close
```



---
## get_image
```python
from blackjack import get_image
```



---
## get_font
```python
from blackjack import get_font
```



---
## scale_card_img
```python
from blackjack import scale_card_img
```



---
## RenderStateType
```python
from cliffwalking import RenderStateType
```

A named tuple which contains the full render state of the Cliffwalking Env. This is static during the episode.

---
## EnvState
```python
from cliffwalking import EnvState
```

A named tuple which contains the full state of the Cliffwalking game.

---
## fell_off
```python
from cliffwalking import fell_off
```

Checks to see if the player_position means the player has fallen of the cliff.

---
## CliffWalkingFunctional
```python
from cliffwalking import CliffWalkingFunctional
```

Cliff walking involves crossing a gridworld from start to goal while avoiding falling off a cliff.

## Description
The game starts with the player at location [3, 0] of the 4x12 grid world with the
goal located at [3, 11]. If the player reaches the goal the episode ends.

A cliff runs along [3, 1..10]. If the player moves to a cliff location it
returns to the start location.

The player makes moves until they reach the goal.

Adapted from Example 6.6 (page 132) from Reinforcement Learning: An Introduction
by Sutton and Barto [<a href="#cliffwalk_ref">1</a>].

With inspiration from:
[https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/cliff_walking.py](https://github.com/dennybritz/reinforcement-learning/blob/master/lib/envs/cliff_walking.py)

## Action Space
The action shape is `(1,)` in the range `{0, 3}` indicating
which direction to move the player.

- 0: Move up
- 1: Move right
- 2: Move down
- 3: Move left

## Observation Space
There are 3 x 12 + 1 possible states. The player cannot be at the cliff, nor at
the goal as the latter results in the end of the episode. What remains are all
the positions of the first 3 rows plus the bottom-left cell.

The observation is a value representing the player's current position as
current_row * nrows + current_col (where both the row and col start at 0).

For example, the stating position can be calculated as follows: 3 * 12 + 0 = 36.

The observation is returned as an `numpy.ndarray` with shape `(1,)` and dtype `numpy.int32` .

## Starting State
The episode starts with the player in state `[36]` (location [3, 0]).

## Reward
Each time step incurs -1 reward, unless the player stepped into the cliff,
which incurs -100 reward.

## Episode End
The episode terminates when the player enters state `[47]` (location [3, 11]).


## Arguments

```python
import gymnasium as gym
gym.make('tablular/CliffWalking-v0')
```

## References
<a id="cliffwalk_ref"></a>[1] R. Sutton and A. Barto, “Reinforcement Learning:
An Introduction” 2020. [Online]. Available: [http://www.incompleteideas.net/book/RLbook2020.pdf](http://www.incompleteideas.net/book/RLbook2020.pdf)

## Version History
- v0: Initial version release

---
## CliffWalkingJaxEnv
```python
from cliffwalking import CliffWalkingJaxEnv
```

A Gymnasium Env wrapper for the functional cliffwalking env.

---
## transition
```python
from cliffwalking import transition
```

The Cliffwalking environment's state transition function.

---
## initial
```python
from cliffwalking import initial
```

Cliffwalking initial observation function.

---
## observation
```python
from cliffwalking import observation
```

Cliffwalking observation.

---
## terminal
```python
from cliffwalking import terminal
```

Determines if a particular Cliffwalking observation is terminal.

---
## reward
```python
from cliffwalking import reward
```

Calculates reward from a state.

---
## render_init
```python
from cliffwalking import render_init
```

Returns an initial render state.

---
## render_image
```python
from cliffwalking import render_image
```

Renders an image from a state.

---
## render_close
```python
from cliffwalking import render_close
```

Closes the render state.

---
## EnvState
```python
from blackjack import EnvState
```

A named tuple which contains the full state of the blackjack game.

---
## random_card
```python
from blackjack import random_card
```

Draws a randowm card (with replacement).

---
## take
```python
from blackjack import take
```

This function is called if the player has decided to take a card.

---
## dealer_stop
```python
from blackjack import dealer_stop
```

This function determines if the dealer should stop drawing.

---
## draw_card_wrapper
```python
from blackjack import draw_card_wrapper
```

Wrapper function for draw_card.

---
## notake
```python
from blackjack import notake
```

This function is called if the player has decided to not take a card.

Calling this function ends the active portion
of the game and turns control over to the dealer.

---
## BlackjackFunctional
```python
from blackjack import BlackjackFunctional
```

Blackjack is a card game where the goal is to beat the dealer by obtaining cards that sum to closer to 21 (without going over 21) than the dealers cards.

### Description
Card Values:

- Face cards (Jack, Queen, King) have a point value of 10.
- Aces can either count as 11 (called a 'usable ace') or 1.
- Numerical cards (2-9) have a value equal to their number.

This game is played with an infinite deck (or with replacement).
The game starts with the dealer having one face up and one face down card,
while the player has two face up cards.

The player can request additional cards (hit, action=1) until they decide to stop (stick, action=0)
or exceed 21 (bust, immediate loss).
After the player sticks, the dealer reveals their facedown card, and draws
until their sum is 17 or greater.  If the dealer goes bust, the player wins.
If neither the player nor the dealer busts, the outcome (win, lose, draw) is
decided by whose sum is closer to 21.

### Action Space
There are two actions: stick (0), and hit (1).

### Observation Space
The observation consists of a 3-tuple containing: the player's current sum,
the value of the dealer's one showing card (1-10 where 1 is ace),
and whether the player holds a usable ace (0 or 1).

This environment corresponds to the version of the blackjack problem
described in Example 5.1 in Reinforcement Learning: An Introduction
by Sutton and Barto (http://incompleteideas.net/book/the-book-2nd.html).

### Rewards
- win game: +1
- lose game: -1
- draw game: 0
- win game with natural blackjack:

    +1.5 (if <a href="#nat">natural</a> is True)

    +1 (if <a href="#nat">natural</a> is False)

### Arguments

```
gym.make('Jax-Blackjack-v0', natural=False, sutton_and_barto=False)
```

<a id="nat">`natural=False`</a>: Whether to give an additional reward for
starting with a natural blackjack, i.e. starting with an ace and ten (sum is 21).

<a id="sutton_and_barto">`sutton_and_barto=False`</a>: Whether to follow the exact rules outlined in the book by
Sutton and Barto. If `sutton_and_barto` is `True`, the keyword argument `natural` will be ignored.
If the player achieves a natural blackjack and the dealer does not, the player
will win (i.e. get a reward of +1). The reverse rule does not apply.
If both the player and the dealer get a natural, it will be a draw (i.e. reward 0).

### Version History
* v0: Initial version release (0.0.0), adapted from original gym blackjack v1

---
## BlackJackJaxEnv
```python
from blackjack import BlackJackJaxEnv
```

A Gymnasium Env wrapper for the functional blackjack env.

---
## transition
```python
from blackjack import transition
```

The blackjack environment's state transition function.

---
## initial
```python
from blackjack import initial
```

Blackjack initial observataion function.

---
## observation
```python
from blackjack import observation
```

Blackjack observation.

---
## terminal
```python
from blackjack import terminal
```

Determines if a particular Blackjack observation is terminal.

---
## reward
```python
from blackjack import reward
```

Calculates reward from a state.

---
## render_init
```python
from blackjack import render_init
```

Returns an initial render state.

---
## render_image
```python
from blackjack import render_image
```

Renders an image from a state.

---
## render_close
```python
from blackjack import render_close
```

Closes the render state.

---
## __name__
```python
from reacher_v4 import __name__
```



---
## ReacherEnv
```python
from reacher_v4 import ReacherEnv
```

## Description
"Reacher" is a two-jointed robot arm. The goal is to move the robot's end effector (called *fingertip*) close to a
target that is spawned at a random position.

## Action Space
The action space is a `Box(-1, 1, (2,), float32)`. An action `(a, b)` represents the torques applied at the hinge joints.

| Num | Action                                                                          | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit |
|-----|---------------------------------------------------------------------------------|-------------|-------------|--------------------------|-------|------|
| 0   | Torque applied at the first hinge (connecting the link to the point of fixture) | -1 | 1 | joint0  | hinge | torque (N m) |
| 1   |  Torque applied at the second hinge (connecting the two links)                  | -1 | 1 | joint1  | hinge | torque (N m) |

## Observation Space
Observations consist of

- The cosine of the angles of the two arms
- The sine of the angles of the two arms
- The coordinates of the target
- The angular velocities of the arms
- The vector between the target and the reacher's fingertip (3 dimensional with the last element being 0)

The observation is a `Box(-Inf, Inf, (11,), float64)` where the elements correspond to the following:

| Num | Observation                                                                                    | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | ---------------------------------------------------------------------------------------------- | ---- | --- | -------------------------------- | ----- | ------------------------ |
| 0   | cosine of the angle of the first arm                                                           | -Inf | Inf | cos(joint0)                      | hinge | unitless                 |
| 1   | cosine of the angle of the second arm                                                          | -Inf | Inf | cos(joint1)                      | hinge | unitless                 |
| 2   | sine of the angle of the first arm                                                             | -Inf | Inf | sin(joint0)                      | hinge | unitless                 |
| 3   | sine of the angle of the second arm                                                            | -Inf | Inf | sin(joint1)                      | hinge | unitless                 |
| 4   | x-coordinate of the target                                                                     | -Inf | Inf | target_x                         | slide | position (m)             |
| 5   | y-coordinate of the target                                                                     | -Inf | Inf | target_y                         | slide | position (m)             |
| 6   | angular velocity of the first arm                                                              | -Inf | Inf | joint0                           | hinge | angular velocity (rad/s) |
| 7   | angular velocity of the second arm                                                             | -Inf | Inf | joint1                           | hinge | angular velocity (rad/s) |
| 8   | x-value of position_fingertip - position_target                                                | -Inf | Inf | NA                               | slide | position (m)             |
| 9   | y-value of position_fingertip - position_target                                                | -Inf | Inf | NA                               | slide | position (m)             |
| 10  | z-value of position_fingertip - position_target (constantly 0 since reacher is 2d and z is same for both) | -Inf | Inf | NA                               | slide | position (m)             |


Most Gym environments just return the positions and velocity of the
joints in the `.xml` file as the state of the environment. However, in
reacher the state is created by combining only certain elements of the
position and velocity, and performing some function transformations on them.
If one is to read the `.xml` for reacher then they will find 4 joints:

| Num | Observation                 | Min      | Max      | Name (in corresponding XML file) | Joint | Unit               |
|-----|-----------------------------|----------|----------|----------------------------------|-------|--------------------|
| 0   | angle of the first arm      | -Inf     | Inf      | joint0                           | hinge | angle (rad)        |
| 1   | angle of the second arm     | -Inf     | Inf      | joint1                           | hinge | angle (rad)        |
| 2   | x-coordinate of the target  | -Inf     | Inf      | target_x                         | slide | position (m)       |
| 3   | y-coordinate of the target  | -Inf     | Inf      | target_y                         | slide | position (m)       |


## Rewards
The reward consists of two parts:
- *reward_distance*: This reward is a measure of how far the *fingertip*
of the reacher (the unattached end) is from the target, with a more negative
value assigned for when the reacher's *fingertip* is further away from the
target. It is calculated as the negative vector norm of (position of
the fingertip - position of target), or *-norm("fingertip" - "target")*.
- *reward_control*: A negative reward for penalising the walker if
it takes actions that are too large. It is measured as the negative squared
Euclidean norm of the action, i.e. as *- sum(action<sup>2</sup>)*.

The total reward returned is ***reward*** *=* *reward_distance + reward_control*

Unlike other environments, Reacher does not allow you to specify weights for the individual reward terms.
However, `info` does contain the keys *reward_dist* and *reward_ctrl*. Thus, if you'd like to weight the terms,
you should create a wrapper that computes the weighted reward from `info`.


## Starting State
All observations start in state
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
with a noise added for stochasticity. A uniform noise in the range
[-0.1, 0.1] is added to the positional attributes, while the target position
is selected uniformly at random in a disk of radius 0.2 around the origin.
Independent, uniform noise in the
range of [-0.005, 0.005] is added to the velocities, and the last
element ("fingertip" - "target") is calculated at the end once everything
is set. The default setting has a framerate of 2 and a *dt = 2 * 0.01 = 0.02*

## Episode End

The episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 50 timesteps (with a new random target popping up if the reacher's fingertip reaches it before 50 timesteps)
2. Termination: Any of the state space values is no longer finite.

## Arguments

No additional arguments are currently supported (in v2 and lower),
but modifications can be made to the XML file in the assets folder
(or by changing the path to a modified XML file in another folder)..

```python
import gymnasium as gym
env = gym.make('Reacher-v4')
```

There is no v3 for Reacher, unlike the robot environments where a v3 and
beyond take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks (not including reacher, which has a max_time_steps of 50). Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from reacher_v4 import __init__
```



---
## step
```python
from reacher_v4 import step
```



---
## reset_model
```python
from reacher_v4 import reset_model
```



---
## _get_obs
```python
from reacher_v4 import _get_obs
```



---
## __name__
```python
from pusher import __name__
```



---
## PusherEnv
```python
from pusher import PusherEnv
```



---
## __init__
```python
from pusher import __init__
```



---
## step
```python
from pusher import step
```



---
## viewer_setup
```python
from pusher import viewer_setup
```



---
## reset_model
```python
from pusher import reset_model
```



---
## _get_obs
```python
from pusher import _get_obs
```



---
## __name__
```python
from half_cheetah_v4 import __name__
```



---
## HalfCheetahEnv
```python
from half_cheetah_v4 import HalfCheetahEnv
```

## Description

This environment is based on the work by P. Wawrzyński in
["A Cat-Like Robot Real-Time Learning to Run"](http://staff.elka.pw.edu.pl/~pwawrzyn/pub-s/0812_LSCLRR.pdf).
The HalfCheetah is a 2-dimensional robot consisting of 9 body parts and 8
joints connecting them (including two paws). The goal is to apply a torque
on the joints to make the cheetah run forward (right) as fast as possible,
with a positive reward allocated based on the distance moved forward and a
negative reward allocated for moving backward. The torso and head of the
cheetah are fixed, and the torque can only be applied on the other 6 joints
over the front and back thighs (connecting to the torso), shins
(connecting to the thighs) and feet (connecting to the shins).

## Action Space
The action space is a `Box(-1, 1, (6,), float32)`. An action represents the torques applied at the hinge joints.

| Num | Action                                  | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
| --- | --------------------------------------- | ----------- | ----------- | -------------------------------- | ----- | ------------ |
| 0   | Torque applied on the back thigh rotor  | -1          | 1           | bthigh                           | hinge | torque (N m) |
| 1   | Torque applied on the back shin rotor   | -1          | 1           | bshin                            | hinge | torque (N m) |
| 2   | Torque applied on the back foot rotor   | -1          | 1           | bfoot                            | hinge | torque (N m) |
| 3   | Torque applied on the front thigh rotor | -1          | 1           | fthigh                           | hinge | torque (N m) |
| 4   | Torque applied on the front shin rotor  | -1          | 1           | fshin                            | hinge | torque (N m) |
| 5   | Torque applied on the front foot rotor  | -1          | 1           | ffoot                            | hinge | torque (N m) |


## Observation Space
Observations consist of positional values of different body parts of the
cheetah, followed by the velocities of those individual parts (their derivatives) with all the positions ordered before all the velocities.

By default, observations do not include the cheetah's `rootx`. It may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be a `Box(-Inf, Inf, (18,), float64)` where the first element
represents the `rootx`.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the
will be returned in `info` with key `"x_position"`.

However, by default, the observation is a `Box(-Inf, Inf, (17,), float64)` where the elements correspond to the following:

| Num | Observation                          | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | ------------------------------------ | ---- | --- | -------------------------------- | ----- | ------------------------ |
| 0   | z-coordinate of the front tip        | -Inf | Inf | rootz                            | slide | position (m)             |
| 1   | angle of the front tip               | -Inf | Inf | rooty                            | hinge | angle (rad)              |
| 2   | angle of the second rotor            | -Inf | Inf | bthigh                           | hinge | angle (rad)              |
| 3   | angle of the second rotor            | -Inf | Inf | bshin                            | hinge | angle (rad)              |
| 4   | velocity of the tip along the x-axis | -Inf | Inf | bfoot                            | hinge | angle (rad)              |
| 5   | velocity of the tip along the y-axis | -Inf | Inf | fthigh                           | hinge | angle (rad)              |
| 6   | angular velocity of front tip        | -Inf | Inf | fshin                            | hinge | angle (rad)              |
| 7   | angular velocity of second rotor     | -Inf | Inf | ffoot                            | hinge | angle (rad)              |
| 8   | x-coordinate of the front tip        | -Inf | Inf | rootx                            | slide | velocity (m/s)           |
| 9   | y-coordinate of the front tip        | -Inf | Inf | rootz                            | slide | velocity (m/s)           |
| 10  | angle of the front tip               | -Inf | Inf | rooty                            | hinge | angular velocity (rad/s) |
| 11  | angle of the second rotor            | -Inf | Inf | bthigh                           | hinge | angular velocity (rad/s) |
| 12  | angle of the second rotor            | -Inf | Inf | bshin                            | hinge | angular velocity (rad/s) |
| 13  | velocity of the tip along the x-axis | -Inf | Inf | bfoot                            | hinge | angular velocity (rad/s) |
| 14  | velocity of the tip along the y-axis | -Inf | Inf | fthigh                           | hinge | angular velocity (rad/s) |
| 15  | angular velocity of front tip        | -Inf | Inf | fshin                            | hinge | angular velocity (rad/s) |
| 16  | angular velocity of second rotor     | -Inf | Inf | ffoot                            | hinge | angular velocity (rad/s) |
| excluded |  x-coordinate of the front tip  | -Inf | Inf | rootx                            | slide | position (m)             |

## Rewards
The reward consists of two parts:
- *forward_reward*: A reward of moving forward which is measured
as *`forward_reward_weight` * (x-coordinate before action - x-coordinate after action)/dt*. *dt* is
the time between actions and is dependent on the frame_skip parameter
(fixed to 5), where the frametime is 0.01 - making the
default *dt = 5 * 0.01 = 0.05*. This reward would be positive if the cheetah
runs forward (right).
- *ctrl_cost*: A cost for penalising the cheetah if it takes
actions that are too large. It is measured as *`ctrl_cost_weight` *
sum(action<sup>2</sup>)* where *`ctrl_cost_weight`* is a parameter set for the
control and has a default value of 0.1

The total reward returned is ***reward*** *=* *forward_reward - ctrl_cost* and `info` will also contain the individual reward terms

## Starting State
All observations start in state (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,) with a noise added to the
initial state for stochasticity. As seen before, the first 8 values in the
state are positional and the last 9 values are velocity. A uniform noise in
the range of [-`reset_noise_scale`, `reset_noise_scale`] is added to the positional values while a standard
normal noise with a mean of 0 and standard deviation of `reset_noise_scale` is added to the
initial velocity values of all zeros.

## Episode End
The episode truncates when the episode length is greater than 1000.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
env = gym.make('HalfCheetah-v2')
```

v3 and v4 take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('HalfCheetah-v4', ctrl_cost_weight=0.1, ....)
```

| Parameter                                    | Type      | Default              | Description                                                                                                                                                       |
| -------------------------------------------- | --------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xml_file`                                   | **str**   | `"half_cheetah.xml"` | Path to a MuJoCo model                                                                                                                                            |
| `forward_reward_weight`                      | **float** | `1.0`                | Weight for _forward_reward_ term (see section on reward)                                                                                                          |
| `ctrl_cost_weight`                           | **float** | `0.1`                | Weight for _ctrl_cost_ weight (see section on reward)                                                                                                             |
| `reset_noise_scale`                          | **float** | `0.1`                | Scale of random perturbations of initial position and velocity (see section on Starting State)                                                                    |
| `exclude_current_positions_from_observation` | **bool**  | `True`               | Whether or not to omit the x-coordinate from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies |

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from half_cheetah_v4 import __init__
```



---
## control_cost
```python
from half_cheetah_v4 import control_cost
```



---
## step
```python
from half_cheetah_v4 import step
```



---
## _get_obs
```python
from half_cheetah_v4 import _get_obs
```



---
## reset_model
```python
from half_cheetah_v4 import reset_model
```



---
## __name__
```python
from walker2d_v4 import __name__
```



---
## Walker2dEnv
```python
from walker2d_v4 import Walker2dEnv
```

## Description

This environment builds on the [hopper](https://gymnasium.farama.org/environments/mujoco/hopper/) environment
by adding another set of legs making it possible for the robot to walk forward instead of
hop. Like other Mujoco environments, this environment aims to increase the number of independent state
and control variables as compared to the classic control environments. The walker is a
two-dimensional two-legged figure that consist of seven main body parts - a single torso at the top
(with the two legs splitting after the torso), two thighs in the middle below the torso, two legs
in the bottom below the thighs, and two feet attached to the legs on which the entire body rests.
The goal is to walk in the in the forward (right)
direction by applying torques on the six hinges connecting the seven body parts.

## Action Space
The action space is a `Box(-1, 1, (6,), float32)`. An action represents the torques applied at the hinge joints.

| Num | Action                                 | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
|-----|----------------------------------------|-------------|-------------|----------------------------------|-------|--------------|
| 0   | Torque applied on the thigh rotor      | -1          | 1           | thigh_joint                      | hinge | torque (N m) |
| 1   | Torque applied on the leg rotor        | -1          | 1           | leg_joint                        | hinge | torque (N m) |
| 2   | Torque applied on the foot rotor       | -1          | 1           | foot_joint                       | hinge | torque (N m) |
| 3   | Torque applied on the left thigh rotor | -1          | 1           | thigh_left_joint                 | hinge | torque (N m) |
| 4   | Torque applied on the left leg rotor   | -1          | 1           | leg_left_joint                   | hinge | torque (N m) |
| 5   | Torque applied on the left foot rotor  | -1          | 1           | foot_left_joint                  | hinge | torque (N m) |

## Observation Space
Observations consist of positional values of different body parts of the walker,
followed by the velocities of those individual parts (their derivatives) with all the positions ordered before all the velocities.

By default, observations do not include the x-coordinate of the torso. It may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be `Box(-Inf, Inf, (18,), float64)` where the first observation
represent the x-coordinates of the torso of the walker.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x-coordinate
of the torso will be returned in `info` with key `"x_position"`.

By default, observation is a `Box(-Inf, Inf, (17,), float64)` where the elements correspond to the following:

| Num | Observation                                        | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | -------------------------------------------------- | ---- | --- | -------------------------------- | ----- | ------------------------ |
| excluded | x-coordinate of the torso                     | -Inf | Inf | rootx                            | slide | position (m)             |
| 0   | z-coordinate of the torso (height of Walker2d)     | -Inf | Inf | rootz                            | slide | position (m)             |
| 1   | angle of the torso                                 | -Inf | Inf | rooty                            | hinge | angle (rad)              |
| 2   | angle of the thigh joint                           | -Inf | Inf | thigh_joint                      | hinge | angle (rad)              |
| 3   | angle of the leg joint                             | -Inf | Inf | leg_joint                        | hinge | angle (rad)              |
| 4   | angle of the foot joint                            | -Inf | Inf | foot_joint                       | hinge | angle (rad)              |
| 5   | angle of the left thigh joint                      | -Inf | Inf | thigh_left_joint                 | hinge | angle (rad)              |
| 6   | angle of the left leg joint                        | -Inf | Inf | leg_left_joint                   | hinge | angle (rad)              |
| 7   | angle of the left foot joint                       | -Inf | Inf | foot_left_joint                  | hinge | angle (rad)              |
| 8   | velocity of the x-coordinate of the torso          | -Inf | Inf | rootx                            | slide | velocity (m/s)           |
| 9   | velocity of the z-coordinate (height) of the torso | -Inf | Inf | rootz                            | slide | velocity (m/s)           |
| 10  | angular velocity of the angle of the torso         | -Inf | Inf | rooty                            | hinge | angular velocity (rad/s) |
| 11  | angular velocity of the thigh hinge                | -Inf | Inf | thigh_joint                      | hinge | angular velocity (rad/s) |
| 12  | angular velocity of the leg hinge                  | -Inf | Inf | leg_joint                        | hinge | angular velocity (rad/s) |
| 13  | angular velocity of the foot hinge                 | -Inf | Inf | foot_joint                       | hinge | angular velocity (rad/s) |
| 14  | angular velocity of the thigh hinge                | -Inf | Inf | thigh_left_joint                 | hinge | angular velocity (rad/s) |
| 15  | angular velocity of the leg hinge                  | -Inf | Inf | leg_left_joint                   | hinge | angular velocity (rad/s) |
| 16  | angular velocity of the foot hinge                 | -Inf | Inf | foot_left_joint                  | hinge | angular velocity (rad/s) |

## Rewards
The reward consists of three parts:
- *healthy_reward*: Every timestep that the walker is alive, it receives a fixed reward of value `healthy_reward`,
- *forward_reward*: A reward of walking forward which is measured as
*`forward_reward_weight` * (x-coordinate before action - x-coordinate after action)/dt*.
*dt* is the time between actions and is dependeent on the frame_skip parameter
(default is 4), where the frametime is 0.002 - making the default
*dt = 4 * 0.002 = 0.008*. This reward would be positive if the walker walks forward (positive x direction).
- *ctrl_cost*: A cost for penalising the walker if it
takes actions that are too large. It is measured as
*`ctrl_cost_weight` * sum(action<sup>2</sup>)* where *`ctrl_cost_weight`* is
a parameter set for the control and has a default value of 0.001

The total reward returned is ***reward*** *=* *healthy_reward bonus + forward_reward - ctrl_cost* and `info` will also contain the individual reward terms

## Starting State
All observations start in state
(0.0, 1.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
with a uniform noise in the range of [-`reset_noise_scale`, `reset_noise_scale`] added to the values for stochasticity.

## Episode End
The walker is said to be unhealthy if any of the following happens:

1. Any of the state space values is no longer finite
2. The height of the walker is ***not*** in the closed interval specified by `healthy_z_range`
3. The absolute value of the angle (`observation[1]` if `exclude_current_positions_from_observation=False`, else `observation[2]`) is ***not*** in the closed interval specified by `healthy_angle_range`

If `terminate_when_unhealthy=True` is passed during construction (which is the default),
the episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 1000 timesteps
2. Termination: The walker is unhealthy

If `terminate_when_unhealthy=False` is passed, the episode is ended only when 1000 timesteps are exceeded.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
env = gym.make('Walker2d-v4')
```

v3 and beyond take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Walker2d-v4', ctrl_cost_weight=0.1, ....)
```

| Parameter                                    | Type      | Default          | Description                                                                                                                                                       |
| -------------------------------------------- | --------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xml_file`                                   | **str**   | `"walker2d.xml"` | Path to a MuJoCo model                                                                                                                                            |
| `forward_reward_weight`                      | **float** | `1.0`            | Weight for _forward_reward_ term (see section on reward)                                                                                                          |
| `ctrl_cost_weight`                           | **float** | `1e-3`           | Weight for _ctr_cost_ term (see section on reward)                                                                                                                |
| `healthy_reward`                             | **float** | `1.0`            | Constant reward given if the ant is "healthy" after timestep                                                                                                      |
| `terminate_when_unhealthy`                   | **bool**  | `True`           | If true, issue a done signal if the z-coordinate of the walker is no longer healthy                                                                               |
| `healthy_z_range`                            | **tuple** | `(0.8, 2)`       | The z-coordinate of the torso of the walker must be in this range to be considered healthy                                                                        |
| `healthy_angle_range`                        | **tuple** | `(-1, 1)`        | The angle must be in this range to be considered healthy                                                                                                          |
| `reset_noise_scale`                          | **float** | `5e-3`           | Scale of random perturbations of initial position and velocity (see section on Starting State)                                                                    |
| `exclude_current_positions_from_observation` | **bool**  | `True`           | Whether or not to omit the x-coordinate from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies |


## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from walker2d_v4 import __init__
```



---
## healthy_reward
```python
from walker2d_v4 import healthy_reward
```



---
## control_cost
```python
from walker2d_v4 import control_cost
```



---
## is_healthy
```python
from walker2d_v4 import is_healthy
```



---
## terminated
```python
from walker2d_v4 import terminated
```



---
## _get_obs
```python
from walker2d_v4 import _get_obs
```



---
## step
```python
from walker2d_v4 import step
```



---
## reset_model
```python
from walker2d_v4 import reset_model
```



---
## __name__
```python
from pusher_v4 import __name__
```



---
## PusherEnv
```python
from pusher_v4 import PusherEnv
```

## Description
"Pusher" is a multi-jointed robot arm which is very similar to that of a human.
 The goal is to move a target cylinder (called *object*) to a goal position using the robot's end effector (called *fingertip*).
  The robot consists of shoulder, elbow, forearm, and wrist joints.

## Action Space
The action space is a `Box(-2, 2, (7,), float32)`. An action `(a, b)` represents the torques applied at the hinge joints.

| Num | Action                                                             | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
|-----|--------------------------------------------------------------------|-------------|-------------|----------------------------------|-------|--------------|
| 0    | Rotation of the panning the shoulder                              | -2          | 2           | r_shoulder_pan_joint             | hinge | torque (N m) |
| 1    | Rotation of the shoulder lifting joint                            | -2          | 2           | r_shoulder_lift_joint            | hinge | torque (N m) |
| 2    | Rotation of the shoulder rolling joint                            | -2          | 2           | r_upper_arm_roll_joint           | hinge | torque (N m) |
| 3    | Rotation of hinge joint that flexed the elbow                     | -2          | 2           | r_elbow_flex_joint               | hinge | torque (N m) |
| 4    | Rotation of hinge that rolls the forearm                          | -2          | 2           | r_forearm_roll_joint             | hinge | torque (N m) |
| 5    | Rotation of flexing the wrist                                     | -2          | 2           | r_wrist_flex_joint               | hinge | torque (N m) |
| 6    | Rotation of rolling the wrist                                     | -2          | 2           | r_wrist_roll_joint               | hinge | torque (N m) |

## Observation Space

Observations consist of

- Angle of rotational joints on the pusher
- Angular velocities of rotational joints on the pusher
- The coordinates of the fingertip of the pusher
- The coordinates of the object to be moved
- The coordinates of the goal position

The observation is a `Box(-Inf, Inf, (23,), float64)` where the elements correspond to the table below.
An analogy can be drawn to a human arm in order to help understand the state space, with the words flex and roll meaning the
same as human joints.

| Num | Observation                                              | Min  | Max | Name (in corresponding XML file) | Joint    | Unit                     |
| --- | -------------------------------------------------------- | ---- | --- | -------------------------------- | -------- | ------------------------ |
| 0   | Rotation of the panning the shoulder                     | -Inf | Inf | r_shoulder_pan_joint             | hinge    | angle (rad)              |
| 1   | Rotation of the shoulder lifting joint                   | -Inf | Inf | r_shoulder_lift_joint            | hinge    | angle (rad)              |
| 2   | Rotation of the shoulder rolling joint                   | -Inf | Inf | r_upper_arm_roll_joint           | hinge    | angle (rad)              |
| 3   | Rotation of hinge joint that flexed the elbow            | -Inf | Inf | r_elbow_flex_joint               | hinge    | angle (rad)              |
| 4   | Rotation of hinge that rolls the forearm                 | -Inf | Inf | r_forearm_roll_joint             | hinge    | angle (rad)              |
| 5   | Rotation of flexing the wrist                            | -Inf | Inf | r_wrist_flex_joint               | hinge    | angle (rad)              |
| 6   | Rotation of rolling the wrist                            | -Inf | Inf | r_wrist_roll_joint               | hinge    | angle (rad)              |
| 7   | Rotational velocity of the panning the shoulder          | -Inf | Inf | r_shoulder_pan_joint             | hinge    | angular velocity (rad/s) |
| 8   | Rotational velocity of the shoulder lifting joint        | -Inf | Inf | r_shoulder_lift_joint            | hinge    | angular velocity (rad/s) |
| 9   | Rotational velocity of the shoulder rolling joint        | -Inf | Inf | r_upper_arm_roll_joint           | hinge    | angular velocity (rad/s) |
| 10  | Rotational velocity of hinge joint that flexed the elbow | -Inf | Inf | r_elbow_flex_joint               | hinge    | angular velocity (rad/s) |
| 11  | Rotational velocity of hinge that rolls the forearm      | -Inf | Inf | r_forearm_roll_joint             | hinge    | angular velocity (rad/s) |
| 12  | Rotational velocity of flexing the wrist                 | -Inf | Inf | r_wrist_flex_joint               | hinge    | angular velocity (rad/s) |
| 13  | Rotational velocity of rolling the wrist                 | -Inf | Inf | r_wrist_roll_joint               | hinge    | angular velocity (rad/s) |
| 14  | x-coordinate of the fingertip of the pusher              | -Inf | Inf | tips_arm                         | slide    | position (m)             |
| 15  | y-coordinate of the fingertip of the pusher              | -Inf | Inf | tips_arm                         | slide    | position (m)             |
| 16  | z-coordinate of the fingertip of the pusher              | -Inf | Inf | tips_arm                         | slide    | position (m)             |
| 17  | x-coordinate of the object to be moved                   | -Inf | Inf | object (obj_slidex)              | slide    | position (m)             |
| 18  | y-coordinate of the object to be moved                   | -Inf | Inf | object (obj_slidey)              | slide    | position (m)             |
| 19  | z-coordinate of the object to be moved                   | -Inf | Inf | object                           | cylinder | position (m)             |
| 20  | x-coordinate of the goal position of the object          | -Inf | Inf | goal (goal_slidex)               | slide    | position (m)             |
| 21  | y-coordinate of the goal position of the object          | -Inf | Inf | goal (goal_slidey)               | slide    | position (m)             |
| 22  | z-coordinate of the goal position of the object          | -Inf | Inf | goal                             | sphere   | position (m)             |


## Rewards
The reward consists of two parts:
- *reward_near *: This reward is a measure of how far the *fingertip*
of the pusher (the unattached end) is from the object, with a more negative
value assigned for when the pusher's *fingertip* is further away from the
target. It is calculated as the negative vector norm of (position of
the fingertip - position of target), or *-norm("fingertip" - "target")*.
- *reward_dist *: This reward is a measure of how far the object is from
the target goal position, with a more negative value assigned for object is
further away from the target. It is calculated as the negative vector norm of
(position of the object - position of goal), or *-norm("object" - "target")*.
- *reward_control*: A negative reward for penalising the pusher if
it takes actions that are too large. It is measured as the negative squared
Euclidean norm of the action, i.e. as *- sum(action<sup>2</sup>)*.

The total reward returned is ***reward*** *=* *reward_dist + 0.1 * reward_ctrl + 0.5 * reward_near*

Unlike other environments, Pusher does not allow you to specify weights for the individual reward terms.
However, `info` does contain the keys *reward_dist* and *reward_ctrl*. Thus, if you'd like to weight the terms,
you should create a wrapper that computes the weighted reward from `info`.


## Starting State
All pusher (not including object and goal) states start in
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0). A uniform noise in the range
[-0.005, 0.005] is added to the velocity attributes only. The velocities of
the object and goal are permanently set to 0. The object's x-position is selected uniformly
between [-0.3, 0] while the y-position is selected uniformly between [-0.2, 0.2], and this
process is repeated until the vector norm between the object's (x,y) position and origin is not greater
than 0.17. The goal always have the same position of (0.45, -0.05, -0.323).

The default framerate is 5 with each frame lasting for 0.01, giving rise to a *dt = 5 * 0.01 = 0.05*

## Episode End

The episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 100 timesteps.
2. Termination: Any of the state space values is no longer finite.

## Arguments

No additional arguments are currently supported (in v2 and lower),
but modifications can be made to the XML file in the assets folder
(or by changing the path to a modified XML file in another folder)..

```python
import gymnasium as gym
env = gym.make('Pusher-v4')
```

There is no v3 for Pusher, unlike the robot environments where a v3 and
beyond take `gymnasmium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Pusher-v2')
```

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks (not including reacher, which has a max_time_steps of 50). Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from pusher_v4 import __init__
```



---
## step
```python
from pusher_v4 import step
```



---
## reset_model
```python
from pusher_v4 import reset_model
```



---
## _get_obs
```python
from pusher_v4 import _get_obs
```



---
## __name__
```python
from humanoid_v3 import __name__
```



---
## mass_center
```python
from humanoid_v3 import mass_center
```



---
## HumanoidEnv
```python
from humanoid_v3 import HumanoidEnv
```



---
## __init__
```python
from humanoid_v3 import __init__
```



---
## healthy_reward
```python
from humanoid_v3 import healthy_reward
```



---
## control_cost
```python
from humanoid_v3 import control_cost
```



---
## contact_cost
```python
from humanoid_v3 import contact_cost
```



---
## is_healthy
```python
from humanoid_v3 import is_healthy
```



---
## terminated
```python
from humanoid_v3 import terminated
```



---
## _get_obs
```python
from humanoid_v3 import _get_obs
```



---
## step
```python
from humanoid_v3 import step
```



---
## reset_model
```python
from humanoid_v3 import reset_model
```



---
## viewer_setup
```python
from humanoid_v3 import viewer_setup
```



---
## __name__
```python
from humanoid import __name__
```



---
## mass_center
```python
from humanoid import mass_center
```



---
## HumanoidEnv
```python
from humanoid import HumanoidEnv
```



---
## __init__
```python
from humanoid import __init__
```



---
## _get_obs
```python
from humanoid import _get_obs
```



---
## step
```python
from humanoid import step
```



---
## reset_model
```python
from humanoid import reset_model
```



---
## viewer_setup
```python
from humanoid import viewer_setup
```



---
## __name__
```python
from hopper_v4 import __name__
```



---
## HopperEnv
```python
from hopper_v4 import HopperEnv
```

## Description

This environment is based on the work done by Erez, Tassa, and Todorov in
["Infinite Horizon Model Predictive Control for Nonlinear Periodic Tasks"](http://www.roboticsproceedings.org/rss07/p10.pdf). The environment aims to
increase the number of independent state and control variables as compared to
the classic control environments. The hopper is a two-dimensional
one-legged figure that consist of four main body parts - the torso at the
top, the thigh in the middle, the leg in the bottom, and a single foot on
which the entire body rests. The goal is to make hops that move in the
forward (right) direction by applying torques on the three hinges
connecting the four body parts.

## Action Space
The action space is a `Box(-1, 1, (3,), float32)`. An action represents the torques applied at the hinge joints.

| Num | Action                             | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
|-----|------------------------------------|-------------|-------------|----------------------------------|-------|--------------|
| 0   | Torque applied on the thigh rotor  | -1          | 1           | thigh_joint                      | hinge | torque (N m) |
| 1   | Torque applied on the leg rotor    | -1          | 1           | leg_joint                        | hinge | torque (N m) |
| 2   | Torque applied on the foot rotor   | -1          | 1           | foot_joint                       | hinge | torque (N m) |

## Observation Space
Observations consist of positional values of different body parts of the
hopper, followed by the velocities of those individual parts
(their derivatives) with all the positions ordered before all the velocities.

By default, observations do not include the x-coordinate of the hopper. It may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be `Box(-Inf, Inf, (12,), float64)` where the first observation
represents the x-coordinate of the hopper.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x-coordinate
will be returned in `info` with key `"x_position"`.

However, by default, the observation is a `Box(-Inf, Inf, (11,), float64)` where the elements
correspond to the following:

| Num | Observation                                        | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | -------------------------------------------------- | ---- | --- | -------------------------------- | ----- | ------------------------ |
| 0   | z-coordinate of the torso (height of hopper)       | -Inf | Inf | rootz                            | slide | position (m)             |
| 1   | angle of the torso                                 | -Inf | Inf | rooty                            | hinge | angle (rad)              |
| 2   | angle of the thigh joint                           | -Inf | Inf | thigh_joint                      | hinge | angle (rad)              |
| 3   | angle of the leg joint                             | -Inf | Inf | leg_joint                        | hinge | angle (rad)              |
| 4   | angle of the foot joint                            | -Inf | Inf | foot_joint                       | hinge | angle (rad)              |
| 5   | velocity of the x-coordinate of the torso          | -Inf | Inf | rootx                          | slide | velocity (m/s)           |
| 6   | velocity of the z-coordinate (height) of the torso | -Inf | Inf | rootz                          | slide | velocity (m/s)           |
| 7   | angular velocity of the angle of the torso         | -Inf | Inf | rooty                          | hinge | angular velocity (rad/s) |
| 8   | angular velocity of the thigh hinge                | -Inf | Inf | thigh_joint                      | hinge | angular velocity (rad/s) |
| 9   | angular velocity of the leg hinge                  | -Inf | Inf | leg_joint                        | hinge | angular velocity (rad/s) |
| 10  | angular velocity of the foot hinge                 | -Inf | Inf | foot_joint                       | hinge | angular velocity (rad/s) |
| excluded | x-coordinate of the torso                     | -Inf | Inf | rootx                            | slide | position (m)             |


## Rewards
The reward consists of three parts:
- *healthy_reward*: Every timestep that the hopper is healthy (see definition in section "Episode Termination"), it gets a reward of fixed value `healthy_reward`.
- *forward_reward*: A reward of hopping forward which is measured
as *`forward_reward_weight` * (x-coordinate before action - x-coordinate after action)/dt*. *dt* is
the time between actions and is dependent on the frame_skip parameter
(fixed to 4), where the frametime is 0.002 - making the
default *dt = 4 * 0.002 = 0.008*. This reward would be positive if the hopper
hops forward (positive x direction).
- *ctrl_cost*: A cost for penalising the hopper if it takes
actions that are too large. It is measured as *`ctrl_cost_weight` *
sum(action<sup>2</sup>)* where *`ctrl_cost_weight`* is a parameter set for the
control and has a default value of 0.001

The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost* and `info` will also contain the individual reward terms

## Starting State
All observations start in state
(0.0, 1.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) with a uniform noise
 in the range of [-`reset_noise_scale`, `reset_noise_scale`] added to the values for stochasticity.

## Episode End
The hopper is said to be unhealthy if any of the following happens:

1. An element of `observation[1:]` (if  `exclude_current_positions_from_observation=True`, else `observation[2:]`) is no longer contained in the closed interval specified by the argument `healthy_state_range`
2. The height of the hopper (`observation[0]` if  `exclude_current_positions_from_observation=True`, else `observation[1]`) is no longer contained in the closed interval specified by the argument `healthy_z_range` (usually meaning that it has fallen)
3. The angle (`observation[1]` if  `exclude_current_positions_from_observation=True`, else `observation[2]`) is no longer contained in the closed interval specified by the argument `healthy_angle_range`

If `terminate_when_unhealthy=True` is passed during construction (which is the default),
the episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 1000 timesteps
2. Termination: The hopper is unhealthy

If `terminate_when_unhealthy=False` is passed, the episode is ended only when 1000 timesteps are exceeded.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
env = gym.make('Hopper-v2')
```

v3 and v4 take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Hopper-v4', ctrl_cost_weight=0.1, ....)
```

| Parameter                                    | Type      | Default               | Description                                                                                                                                                                     |
| -------------------------------------------- | --------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xml_file`                                   | **str**   | `"hopper.xml"`        | Path to a MuJoCo model                                                                                                                                                          |
| `forward_reward_weight`                      | **float** | `1.0`                 | Weight for _forward_reward_ term (see section on reward)                                                                                                                        |
| `ctrl_cost_weight`                           | **float** | `0.001`               | Weight for _ctrl_cost_ reward (see section on reward)                                                                                                                           |
| `healthy_reward`                             | **float** | `1`                   | Constant reward given if the ant is "healthy" after timestep                                                                                                                    |
| `terminate_when_unhealthy`                   | **bool**  | `True`                | If true, issue a done signal if the hopper is no longer healthy                                                                                                                 |
| `healthy_state_range`                        | **tuple** | `(-100, 100)`         | The elements of `observation[1:]` (if `exclude_current_positions_from_observation=True`, else `observation[2:]`) must be in this range for the hopper to be considered healthy  |
| `healthy_z_range`                            | **tuple** | `(0.7, float("inf"))` | The z-coordinate must be in this range for the hopper to be considered healthy                                                                                                  |
| `healthy_angle_range`                        | **tuple** | `(-0.2, 0.2)`         | The angle given by `observation[1]` (if `exclude_current_positions_from_observation=True`, else `observation[2]`) must be in this range for the hopper to be considered healthy |
| `reset_noise_scale`                          | **float** | `5e-3`                | Scale of random perturbations of initial position and velocity (see section on Starting State)                                                                                  |
| `exclude_current_positions_from_observation` | **bool**  | `True`                | Whether or not to omit the x-coordinate from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies               |

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from hopper_v4 import __init__
```



---
## healthy_reward
```python
from hopper_v4 import healthy_reward
```



---
## control_cost
```python
from hopper_v4 import control_cost
```



---
## is_healthy
```python
from hopper_v4 import is_healthy
```



---
## terminated
```python
from hopper_v4 import terminated
```



---
## _get_obs
```python
from hopper_v4 import _get_obs
```



---
## step
```python
from hopper_v4 import step
```



---
## reset_model
```python
from hopper_v4 import reset_model
```



---
## __name__
```python
from swimmer_v3 import __name__
```



---
## SwimmerEnv
```python
from swimmer_v3 import SwimmerEnv
```



---
## __init__
```python
from swimmer_v3 import __init__
```



---
## control_cost
```python
from swimmer_v3 import control_cost
```



---
## step
```python
from swimmer_v3 import step
```



---
## _get_obs
```python
from swimmer_v3 import _get_obs
```



---
## reset_model
```python
from swimmer_v3 import reset_model
```



---
## viewer_setup
```python
from swimmer_v3 import viewer_setup
```



---
## __name__
```python
from humanoidstandup import __name__
```



---
## HumanoidStandupEnv
```python
from humanoidstandup import HumanoidStandupEnv
```



---
## __init__
```python
from humanoidstandup import __init__
```



---
## _get_obs
```python
from humanoidstandup import _get_obs
```



---
## step
```python
from humanoidstandup import step
```



---
## reset_model
```python
from humanoidstandup import reset_model
```



---
## viewer_setup
```python
from humanoidstandup import viewer_setup
```



---
## __name__
```python
from reacher import __name__
```



---
## ReacherEnv
```python
from reacher import ReacherEnv
```



---
## __init__
```python
from reacher import __init__
```



---
## step
```python
from reacher import step
```



---
## viewer_setup
```python
from reacher import viewer_setup
```



---
## reset_model
```python
from reacher import reset_model
```



---
## _get_obs
```python
from reacher import _get_obs
```



---
## __name__
```python
from ant_v3 import __name__
```



---
## AntEnv
```python
from ant_v3 import AntEnv
```



---
## __init__
```python
from ant_v3 import __init__
```



---
## healthy_reward
```python
from ant_v3 import healthy_reward
```



---
## control_cost
```python
from ant_v3 import control_cost
```



---
## contact_forces
```python
from ant_v3 import contact_forces
```



---
## contact_cost
```python
from ant_v3 import contact_cost
```



---
## is_healthy
```python
from ant_v3 import is_healthy
```



---
## terminated
```python
from ant_v3 import terminated
```



---
## step
```python
from ant_v3 import step
```



---
## _get_obs
```python
from ant_v3 import _get_obs
```



---
## reset_model
```python
from ant_v3 import reset_model
```



---
## viewer_setup
```python
from ant_v3 import viewer_setup
```



---
## __name__
```python
from inverted_double_pendulum_v4 import __name__
```



---
## InvertedDoublePendulumEnv
```python
from inverted_double_pendulum_v4 import InvertedDoublePendulumEnv
```

## Description

This environment originates from control theory and builds on the cartpole
environment based on the work done by Barto, Sutton, and Anderson in
["Neuronlike adaptive elements that can solve difficult learning control problems"](https://ieeexplore.ieee.org/document/6313077),
powered by the Mujoco physics simulator - allowing for more complex experiments
(such as varying the effects of gravity or constraints). This environment involves a cart that can
moved linearly, with a pole fixed on it and a second pole fixed on the other end of the first one
(leaving the second pole as the only one with one free end). The cart can be pushed left or right,
and the goal is to balance the second pole on top of the first pole, which is in turn on top of the
cart, by applying continuous forces on the cart.

## Action Space
The agent take a 1-element vector for actions.
The action space is a continuous `(action)` in `[-1, 1]`, where `action` represents the
numerical force applied to the cart (with magnitude representing the amount of force and
sign representing the direction)

| Num | Action                    | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit      |
|-----|---------------------------|-------------|-------------|----------------------------------|-------|-----------|
| 0   | Force applied on the cart | -1          | 1           | slider                           | slide | Force (N) |

## Observation Space

The state space consists of positional values of different body parts of the pendulum system,
followed by the velocities of those individual parts (their derivatives) with all the
positions ordered before all the velocities.

The observation is a `ndarray` with shape `(11,)` where the elements correspond to the following:

| Num | Observation                                                       | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | ----------------------------------------------------------------- | ---- | --- | -------------------------------- | ----- | ------------------------ |
| 0   | position of the cart along the linear surface                     | -Inf | Inf | slider                           | slide | position (m)             |
| 1   | sine of the angle between the cart and the first pole             | -Inf | Inf | sin(hinge)                       | hinge | unitless                 |
| 2   | sine of the angle between the two poles                           | -Inf | Inf | sin(hinge2)                      | hinge | unitless                 |
| 3   | cosine of the angle between the cart and the first pole           | -Inf | Inf | cos(hinge)                       | hinge | unitless                 |
| 4   | cosine of the angle between the two poles                         | -Inf | Inf | cos(hinge2)                      | hinge | unitless                 |
| 5   | velocity of the cart                                              | -Inf | Inf | slider                           | slide | velocity (m/s)           |
| 6   | angular velocity of the angle between the cart and the first pole | -Inf | Inf | hinge                            | hinge | angular velocity (rad/s) |
| 7   | angular velocity of the angle between the two poles               | -Inf | Inf | hinge2                           | hinge | angular velocity (rad/s) |
| 8   | constraint force - 1                                              | -Inf | Inf |                                  |       | Force (N)                |
| 9   | constraint force - 2                                              | -Inf | Inf |                                  |       | Force (N)                |
| 10  | constraint force - 3                                              | -Inf | Inf |                                  |       | Force (N)                |


There is physical contact between the robots and their environment - and Mujoco
attempts at getting realistic physics simulations for the possible physical contact
dynamics by aiming for physical accuracy and computational efficiency.

There is one constraint force for contacts for each degree of freedom (3).
The approach and handling of constraints by Mujoco is unique to the simulator
and is based on their research. Once can find more information in their
[*documentation*](https://mujoco.readthedocs.io/en/latest/computation.html)
or in their paper
["Analytically-invertible dynamics with contacts and constraints: Theory and implementation in MuJoCo"](https://homes.cs.washington.edu/~todorov/papers/TodorovICRA14.pdf).


## Rewards

The reward consists of two parts:
- *alive_bonus*: The goal is to make the second inverted pendulum stand upright
(within a certain angle limit) as long as possible - as such a reward of +10 is awarded
 for each timestep that the second pole is upright.
- *distance_penalty*: This reward is a measure of how far the *tip* of the second pendulum
(the only free end) moves, and it is calculated as
*0.01 * x<sup>2</sup> + (y - 2)<sup>2</sup>*, where *x* is the x-coordinate of the tip
and *y* is the y-coordinate of the tip of the second pole.
- *velocity_penalty*: A negative reward for penalising the agent if it moves too
fast *0.001 *  v<sub>1</sub><sup>2</sup> + 0.005 * v<sub>2</sub> <sup>2</sup>*

The total reward returned is ***reward*** *=* *alive_bonus - distance_penalty - velocity_penalty*

## Starting State
All observations start in state
(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) with a uniform noise in the range
of [-0.1, 0.1] added to the positional values (cart position and pole angles) and standard
normal force with a standard deviation of 0.1 added to the velocity values for stochasticity.

## Episode End
The episode ends when any of the following happens:

1.Truncation:  The episode duration reaches 1000 timesteps.
2.Termination: Any of the state space values is no longer finite.
3.Termination: The y_coordinate of the tip of the second pole *is less than or equal* to 1. The maximum standing height of the system is 1.196 m when all the parts are perpendicularly vertical on top of each other).

## Arguments

No additional arguments are currently supported.

```python
import gymnasium as gym
env = gym.make('InvertedDoublePendulum-v4')
```
There is no v3 for InvertedPendulum, unlike the robot environments where a v3 and
beyond take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('InvertedDoublePendulum-v2')
```

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks (including inverted pendulum)
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from inverted_double_pendulum_v4 import __init__
```



---
## step
```python
from inverted_double_pendulum_v4 import step
```



---
## _get_obs
```python
from inverted_double_pendulum_v4 import _get_obs
```



---
## reset_model
```python
from inverted_double_pendulum_v4 import reset_model
```



---
## __name__
```python
from ant import __name__
```



---
## AntEnv
```python
from ant import AntEnv
```



---
## __init__
```python
from ant import __init__
```



---
## step
```python
from ant import step
```



---
## _get_obs
```python
from ant import _get_obs
```



---
## reset_model
```python
from ant import reset_model
```



---
## viewer_setup
```python
from ant import viewer_setup
```



---
## __name__
```python
from inverted_pendulum_v4 import __name__
```



---
## InvertedPendulumEnv
```python
from inverted_pendulum_v4 import InvertedPendulumEnv
```

## Description

This environment is the cartpole environment based on the work done by
Barto, Sutton, and Anderson in ["Neuronlike adaptive elements that can
solve difficult learning control problems"](https://ieeexplore.ieee.org/document/6313077),
just like in the classic environments but now powered by the Mujoco physics simulator -
allowing for more complex experiments (such as varying the effects of gravity).
This environment involves a cart that can moved linearly, with a pole fixed on it
at one end and having another end free. The cart can be pushed left or right, and the
goal is to balance the pole on the top of the cart by applying forces on the cart.

## Action Space
The agent take a 1-element vector for actions.

The action space is a continuous `(action)` in `[-3, 3]`, where `action` represents
the numerical force applied to the cart (with magnitude representing the amount of
force and sign representing the direction)

| Num | Action                    | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit      |
|-----|---------------------------|-------------|-------------|----------------------------------|-------|-----------|
| 0   | Force applied on the cart | -3          | 3           | slider                           | slide | Force (N) |

## Observation Space

The state space consists of positional values of different body parts of
the pendulum system, followed by the velocities of those individual parts (their derivatives)
with all the positions ordered before all the velocities.

The observation is a `ndarray` with shape `(4,)` where the elements correspond to the following:

| Num | Observation                                   | Min  | Max | Name (in corresponding XML file) | Joint | Unit                      |
| --- | --------------------------------------------- | ---- | --- | -------------------------------- | ----- | ------------------------- |
| 0   | position of the cart along the linear surface | -Inf | Inf | slider                           | slide | position (m)              |
| 1   | vertical angle of the pole on the cart        | -Inf | Inf | hinge                            | hinge | angle (rad)               |
| 2   | linear velocity of the cart                   | -Inf | Inf | slider                           | slide | velocity (m/s)            |
| 3   | angular velocity of the pole on the cart      | -Inf | Inf | hinge                            | hinge | anglular velocity (rad/s) |


## Rewards

The goal is to make the inverted pendulum stand upright (within a certain angle limit)
as long as possible - as such a reward of +1 is awarded for each timestep that
the pole is upright.

## Starting State
All observations start in state
(0.0, 0.0, 0.0, 0.0) with a uniform noise in the range
of [-0.01, 0.01] added to the values for stochasticity.

## Episode End
The episode ends when any of the following happens:

1. Truncation: The episode duration reaches 1000 timesteps.
2. Termination: Any of the state space values is no longer finite.
3. Termination: The absolute value of the vertical angle between the pole and the cart is greater than 0.2 radian.

## Arguments

No additional arguments are currently supported.

```python
import gymnasium as gym
env = gym.make('InvertedPendulum-v4')
```
There is no v3 for InvertedPendulum, unlike the robot environments where a
v3 and beyond take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.
```python
import gymnasium as gym
env = gym.make('InvertedPendulum-v2')
```

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks (including inverted pendulum)
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from inverted_pendulum_v4 import __init__
```



---
## step
```python
from inverted_pendulum_v4 import step
```



---
## reset_model
```python
from inverted_pendulum_v4 import reset_model
```



---
## _get_obs
```python
from inverted_pendulum_v4 import _get_obs
```



---
## __name__
```python
from half_cheetah import __name__
```



---
## HalfCheetahEnv
```python
from half_cheetah import HalfCheetahEnv
```



---
## __init__
```python
from half_cheetah import __init__
```



---
## step
```python
from half_cheetah import step
```



---
## _get_obs
```python
from half_cheetah import _get_obs
```



---
## reset_model
```python
from half_cheetah import reset_model
```



---
## viewer_setup
```python
from half_cheetah import viewer_setup
```



---
## __name__
```python
from mujoco_env import __name__
```



---
## BaseMujocoEnv
```python
from mujoco_env import BaseMujocoEnv
```

Superclass for all MuJoCo environments.

---
## MuJocoPyEnv
```python
from mujoco_env import MuJocoPyEnv
```



---
## MujocoEnv
```python
from mujoco_env import MujocoEnv
```

Superclass for MuJoCo environments.

---
## __init__
```python
from mujoco_env import __init__
```



---
## _set_action_space
```python
from mujoco_env import _set_action_space
```



---
## reset_model
```python
from mujoco_env import reset_model
```

Reset the robot degrees of freedom (qpos and qvel).
Implement this in each subclass.

---
## _initialize_simulation
```python
from mujoco_env import _initialize_simulation
```



---
## _reset_simulation
```python
from mujoco_env import _reset_simulation
```



---
## _step_mujoco_simulation
```python
from mujoco_env import _step_mujoco_simulation
```



---
## render
```python
from mujoco_env import render
```



---
## _get_reset_info
```python
from mujoco_env import _get_reset_info
```

Function that generates the `info` that is returned during a `reset()`.

---
## reset
```python
from mujoco_env import reset
```



---
## set_state
```python
from mujoco_env import set_state
```



---
## dt
```python
from mujoco_env import dt
```



---
## do_simulation
```python
from mujoco_env import do_simulation
```

Step the simulation n number of frames and applying a control action.

---
## close
```python
from mujoco_env import close
```



---
## get_body_com
```python
from mujoco_env import get_body_com
```



---
## state_vector
```python
from mujoco_env import state_vector
```

Return the position and velocity joint states of the model

---
## _get_viewer
```python
from mujoco_env import _get_viewer
```



---
## viewer_setup
```python
from mujoco_env import viewer_setup
```

This method is called when the viewer is initialized.
Optionally implement this method, if you need to tinker with camera position and so forth.

---
## __name__
```python
from hopper import __name__
```



---
## HopperEnv
```python
from hopper import HopperEnv
```



---
## __init__
```python
from hopper import __init__
```



---
## step
```python
from hopper import step
```



---
## _get_obs
```python
from hopper import _get_obs
```



---
## reset_model
```python
from hopper import reset_model
```



---
## viewer_setup
```python
from hopper import viewer_setup
```



---
## __name__
```python
from ant_v4 import __name__
```



---
## AntEnv
```python
from ant_v4 import AntEnv
```

## Description

This environment is based on the environment introduced by Schulman,
Moritz, Levine, Jordan and Abbeel in ["High-Dimensional Continuous Control
Using Generalized Advantage Estimation"](https://arxiv.org/abs/1506.02438).
The ant is a 3D robot consisting of one torso (free rotational body) with
four legs attached to it with each leg having two body parts. The goal is to
coordinate the four legs to move in the forward (right) direction by applying
torques on the eight hinges connecting the two body parts of each leg and the torso
(nine body parts and eight hinges).

## Action Space
The action space is a `Box(-1, 1, (8,), float32)`. An action represents the torques applied at the hinge joints.

| Num | Action                                                            | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
| --- | ----------------------------------------------------------------- | ----------- | ----------- | -------------------------------- | ----- | ------------ |
| 0   | Torque applied on the rotor between the torso and back right hip  | -1          | 1           | hip_4 (right_back_leg)           | hinge | torque (N m) |
| 1   | Torque applied on the rotor between the back right two links      | -1          | 1           | angle_4 (right_back_leg)         | hinge | torque (N m) |
| 2   | Torque applied on the rotor between the torso and front left hip  | -1          | 1           | hip_1 (front_left_leg)           | hinge | torque (N m) |
| 3   | Torque applied on the rotor between the front left two links      | -1          | 1           | angle_1 (front_left_leg)         | hinge | torque (N m) |
| 4   | Torque applied on the rotor between the torso and front right hip | -1          | 1           | hip_2 (front_right_leg)          | hinge | torque (N m) |
| 5   | Torque applied on the rotor between the front right two links     | -1          | 1           | angle_2 (front_right_leg)        | hinge | torque (N m) |
| 6   | Torque applied on the rotor between the torso and back left hip   | -1          | 1           | hip_3 (back_leg)                 | hinge | torque (N m) |
| 7   | Torque applied on the rotor between the back left two links       | -1          | 1           | angle_3 (back_leg)               | hinge | torque (N m) |

## Observation Space
Observations consist of positional values of different body parts of the ant,
followed by the velocities of those individual parts (their derivatives) with all
the positions ordered before all the velocities.

By default, observations do not include the x- and y-coordinates of the ant's torso. These may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be a `Box(-Inf, Inf, (29,), float64)` where the first two observations
represent the x- and y- coordinates of the ant's torso.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x- and y-coordinates
of the torso will be returned in `info` with keys `"x_position"` and `"y_position"`, respectively.

However, by default, observation Space is a `Box(-Inf, Inf, (27,), float64)` where the elements correspond to the following:

| Num | Observation                                                  | Min    | Max    | Name (in corresponding XML file)       | Joint | Unit                     |
|-----|--------------------------------------------------------------|--------|--------|----------------------------------------|-------|--------------------------|
| 0   | z-coordinate of the torso (centre)                           | -Inf   | Inf    | torso                                  | free  | position (m)             |
| 1   | x-orientation of the torso (centre)                          | -Inf   | Inf    | torso                                  | free  | angle (rad)              |
| 2   | y-orientation of the torso (centre)                          | -Inf   | Inf    | torso                                  | free  | angle (rad)              |
| 3   | z-orientation of the torso (centre)                          | -Inf   | Inf    | torso                                  | free  | angle (rad)              |
| 4   | w-orientation of the torso (centre)                          | -Inf   | Inf    | torso                                  | free  | angle (rad)              |
| 5   | angle between torso and first link on front left             | -Inf   | Inf    | hip_1 (front_left_leg)                 | hinge | angle (rad)              |
| 6   | angle between the two links on the front left                | -Inf   | Inf    | ankle_1 (front_left_leg)               | hinge | angle (rad)              |
| 7   | angle between torso and first link on front right            | -Inf   | Inf    | hip_2 (front_right_leg)                | hinge | angle (rad)              |
| 8   | angle between the two links on the front right               | -Inf   | Inf    | ankle_2 (front_right_leg)              | hinge | angle (rad)              |
| 9   | angle between torso and first link on back left              | -Inf   | Inf    | hip_3 (back_leg)                       | hinge | angle (rad)              |
| 10  | angle between the two links on the back left                 | -Inf   | Inf    | ankle_3 (back_leg)                     | hinge | angle (rad)              |
| 11  | angle between torso and first link on back right             | -Inf   | Inf    | hip_4 (right_back_leg)                 | hinge | angle (rad)              |
| 12  | angle between the two links on the back right                | -Inf   | Inf    | ankle_4 (right_back_leg)               | hinge | angle (rad)              |
| 13  | x-coordinate velocity of the torso                           | -Inf   | Inf    | torso                                  | free  | velocity (m/s)           |
| 14  | y-coordinate velocity of the torso                           | -Inf   | Inf    | torso                                  | free  | velocity (m/s)           |
| 15  | z-coordinate velocity of the torso                           | -Inf   | Inf    | torso                                  | free  | velocity (m/s)           |
| 16  | x-coordinate angular velocity of the torso                   | -Inf   | Inf    | torso                                  | free  | angular velocity (rad/s) |
| 17  | y-coordinate angular velocity of the torso                   | -Inf   | Inf    | torso                                  | free  | angular velocity (rad/s) |
| 18  | z-coordinate angular velocity of the torso                   | -Inf   | Inf    | torso                                  | free  | angular velocity (rad/s) |
| 19  | angular velocity of angle between torso and front left link  | -Inf   | Inf    | hip_1 (front_left_leg)                 | hinge | angle (rad)              |
| 20  | angular velocity of the angle between front left links       | -Inf   | Inf    | ankle_1 (front_left_leg)               | hinge | angle (rad)              |
| 21  | angular velocity of angle between torso and front right link | -Inf   | Inf    | hip_2 (front_right_leg)                | hinge | angle (rad)              |
| 22  | angular velocity of the angle between front right links      | -Inf   | Inf    | ankle_2 (front_right_leg)              | hinge | angle (rad)              |
| 23  | angular velocity of angle between torso and back left link   | -Inf   | Inf    | hip_3 (back_leg)                       | hinge | angle (rad)              |
| 24  | angular velocity of the angle between back left links        | -Inf   | Inf    | ankle_3 (back_leg)                     | hinge | angle (rad)              |
| 25  | angular velocity of angle between torso and back right link  | -Inf   | Inf    | hip_4 (right_back_leg)                 | hinge | angle (rad)              |
| 26  | angular velocity of the angle between back right links       | -Inf   | Inf    | ankle_4 (right_back_leg)               | hinge | angle (rad)              |
| excluded | x-coordinate of the torso (centre)                      | -Inf   | Inf    | torso                                  | free  | position (m)             |
| excluded | y-coordinate of the torso (centre)                      | -Inf   | Inf    | torso                                  | free  | position (m)             |


If version < `v4` or `use_contact_forces` is `True` then the observation space is extended by 14*6 = 84 elements, which are contact forces
(external forces - force x, y, z and torque x, y, z) applied to the
center of mass of each of the body parts. The 14 body parts are:

| id (for `v2`, `v3`, `v4)` | body parts |
|  ---  |  ------------  |
| 0  | worldbody (note: forces are always full of zeros) |
| 1  | torso |
| 2  | front_left_leg |
| 3  | aux_1 (front left leg) |
| 4  | ankle_1 (front left leg) |
| 5  | front_right_leg |
| 6  | aux_2 (front right leg) |
| 7  | ankle_2 (front right leg) |
| 8  | back_leg (back left leg) |
| 9  | aux_3 (back left leg) |
| 10 | ankle_3 (back left leg) |
| 11 | right_back_leg |
| 12 | aux_4 (back right leg) |
| 13 | ankle_4 (back right leg) |


The (x,y,z) coordinates are translational DOFs while the orientations are rotational
DOFs expressed as quaternions. One can read more about free joints on the [Mujoco Documentation](https://mujoco.readthedocs.io/en/latest/XMLreference.html).


**Note:** Ant-v4 environment no longer has the following contact forces issue.
If using previous Humanoid versions from v4, there have been reported issues that using a Mujoco-Py version > 2.0 results
in the contact forces always being 0. As such we recommend to use a Mujoco-Py version < 2.0
when using the Ant environment if you would like to report results with contact forces (if
contact forces are not used in your experiments, you can use version > 2.0).

## Rewards
The reward consists of three parts:
- *healthy_reward*: Every timestep that the ant is healthy (see definition in section "Episode Termination"), it gets a reward of fixed value `healthy_reward`
- *forward_reward*: A reward of moving forward which is measured as
*(x-coordinate before action - x-coordinate after action)/dt*. *dt* is the time
between actions and is dependent on the `frame_skip` parameter (default is 5),
where the frametime is 0.01 - making the default *dt = 5 * 0.01 = 0.05*.
This reward would be positive if the ant moves forward (in positive x direction).
- *ctrl_cost*: A negative reward for penalising the ant if it takes actions
that are too large. It is measured as *`ctrl_cost_weight` * sum(action<sup>2</sup>)*
where *`ctr_cost_weight`* is a parameter set for the control and has a default value of 0.5.
- *contact_cost*: A negative reward for penalising the ant if the external contact
force is too large. It is calculated *`contact_cost_weight` * sum(clip(external contact
force to `contact_force_range`)<sup>2</sup>)*.

The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost*.

But if `use_contact_forces=True` or version < `v4`
The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost - contact_cost*.

In either case `info` will also contain the individual reward terms.

## Starting State
All observations start in state
(0.0, 0.0,  0.75, 1.0, 0.0  ... 0.0) with a uniform noise in the range
of [-`reset_noise_scale`, `reset_noise_scale`] added to the positional values and standard normal noise
with mean 0 and standard deviation `reset_noise_scale` added to the velocity values for
stochasticity. Note that the initial z coordinate is intentionally selected
to be slightly high, thereby indicating a standing up ant. The initial orientation
is designed to make it face forward as well.

## Episode End
The ant is said to be unhealthy if any of the following happens:

1. Any of the state space values is no longer finite
2. The z-coordinate of the torso is **not** in the closed interval given by `healthy_z_range` (defaults to [0.2, 1.0])

If `terminate_when_unhealthy=True` is passed during construction (which is the default),
the episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 1000 timesteps
2. Termination: The ant is unhealthy

If `terminate_when_unhealthy=False` is passed, the episode is ended only when 1000 timesteps are exceeded.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
env = gym.make('Ant-v2')
```

v3 and v4 take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Ant-v4', ctrl_cost_weight=0.1, ...)
```

| Parameter               | Type       | Default      |Description                    |
|-------------------------|------------|--------------|-------------------------------|
| `xml_file`              | **str**    | `"ant.xml"`  | Path to a MuJoCo model |
| `ctrl_cost_weight`      | **float**  | `0.5`        | Weight for *ctrl_cost* term (see section on reward) |
| `use_contact_forces`    | **bool**  | `False`      | If true, it extends the observation space by adding contact forces (see `Observation Space` section) and includes contact_cost to the reward function (see `Rewards` section) |
| `contact_cost_weight`   | **float**  | `5e-4`       | Weight for *contact_cost* term (see section on reward) |
| `healthy_reward`        | **float**  | `1`          | Constant reward given if the ant is "healthy" after timestep |
| `terminate_when_unhealthy` | **bool**| `True`       | If true, issue a done signal if the z-coordinate of the torso is no longer in the `healthy_z_range` |
| `healthy_z_range`       | **tuple**  | `(0.2, 1)`   | The ant is considered healthy if the z-coordinate of the torso is in this range |
| `contact_force_range`   | **tuple**  | `(-1, 1)`    | Contact forces are clipped to this range in the computation of *contact_cost* |
| `reset_noise_scale`     | **float**  | `0.1`        | Scale of random perturbations of initial position and velocity (see section on Starting State) |
| `exclude_current_positions_from_observation`| **bool** | `True`| Whether or not to omit the x- and y-coordinates from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies |

## Version History
* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3, also removed contact forces from the default observation space (new variable `use_contact_forces=True` can restore them)
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from ant_v4 import __init__
```



---
## healthy_reward
```python
from ant_v4 import healthy_reward
```



---
## control_cost
```python
from ant_v4 import control_cost
```



---
## contact_forces
```python
from ant_v4 import contact_forces
```



---
## contact_cost
```python
from ant_v4 import contact_cost
```



---
## is_healthy
```python
from ant_v4 import is_healthy
```



---
## terminated
```python
from ant_v4 import terminated
```



---
## step
```python
from ant_v4 import step
```



---
## _get_obs
```python
from ant_v4 import _get_obs
```



---
## reset_model
```python
from ant_v4 import reset_model
```



---
## __name__
```python
from hopper_v3 import __name__
```



---
## HopperEnv
```python
from hopper_v3 import HopperEnv
```



---
## __init__
```python
from hopper_v3 import __init__
```



---
## healthy_reward
```python
from hopper_v3 import healthy_reward
```



---
## control_cost
```python
from hopper_v3 import control_cost
```



---
## is_healthy
```python
from hopper_v3 import is_healthy
```



---
## terminated
```python
from hopper_v3 import terminated
```



---
## _get_obs
```python
from hopper_v3 import _get_obs
```



---
## step
```python
from hopper_v3 import step
```



---
## reset_model
```python
from hopper_v3 import reset_model
```



---
## viewer_setup
```python
from hopper_v3 import viewer_setup
```



---
## __name__
```python
from swimmer_v4 import __name__
```



---
## SwimmerEnv
```python
from swimmer_v4 import SwimmerEnv
```

## Description

This environment corresponds to the Swimmer environment described in Rémi Coulom's PhD thesis
["Reinforcement Learning Using Neural Networks, with Applications to Motor Control"](https://tel.archives-ouvertes.fr/tel-00003985/document).
The environment aims to increase the number of independent state and control
variables as compared to the classic control environments. The swimmers
consist of three or more segments ('***links***') and one less articulation
joints ('***rotors***') - one rotor joint connecting exactly two links to
form a linear chain. The swimmer is suspended in a two dimensional pool and
always starts in the same position (subject to some deviation drawn from an
uniform distribution), and the goal is to move as fast as possible towards
the right by applying torque on the rotors and using the fluids friction.

## Notes

The problem parameters are:
Problem parameters:
* *n*: number of body parts
* *m<sub>i</sub>*: mass of part *i* (*i* ∈ {1...n})
* *l<sub>i</sub>*: length of part *i* (*i* ∈ {1...n})
* *k*: viscous-friction coefficient

While the default environment has *n* = 3, *l<sub>i</sub>* = 0.1,
and *k* = 0.1. It is possible to pass a custom MuJoCo XML file during construction to increase the
number of links, or to tweak any of the parameters.

## Action Space
The action space is a `Box(-1, 1, (2,), float32)`. An action represents the torques applied between *links*

| Num | Action                             | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
|-----|------------------------------------|-------------|-------------|----------------------------------|-------|--------------|
| 0   | Torque applied on the first rotor  | -1          | 1           | motor1_rot                       | hinge | torque (N m) |
| 1   | Torque applied on the second rotor | -1          | 1           | motor2_rot                       | hinge | torque (N m) |

## Observation Space
By default, observations consists of:
* θ<sub>i</sub>: angle of part *i* with respect to the *x* axis
* θ<sub>i</sub>': its derivative with respect to time (angular velocity)

In the default case, observations do not include the x- and y-coordinates of the front tip. These may
be included by passing `exclude_current_positions_from_observation=False` during construction.
Then, the observation space will be `Box(-Inf, Inf, (10,), float64)` where the first two observations
represent the x- and y-coordinates of the front tip.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x- and y-coordinates
will be returned in `info` with keys `"x_position"` and `"y_position"`, respectively.

By default, the observation is a `Box(-Inf, Inf, (8,), float64)` where the elements correspond to the following:

| Num | Observation                          | Min  | Max | Name (in corresponding XML file) | Joint | Unit                     |
| --- | ------------------------------------ | ---- | --- | -------------------------------- | ----- | ------------------------ |
| 0   | angle of the front tip               | -Inf | Inf | free_body_rot                    | hinge | angle (rad)              |
| 1   | angle of the first rotor             | -Inf | Inf | motor1_rot                       | hinge | angle (rad)              |
| 2   | angle of the second rotor            | -Inf | Inf | motor2_rot                       | hinge | angle (rad)              |
| 3   | velocity of the tip along the x-axis | -Inf | Inf | slider1                          | slide | velocity (m/s)           |
| 4   | velocity of the tip along the y-axis | -Inf | Inf | slider2                          | slide | velocity (m/s)           |
| 5   | angular velocity of front tip        | -Inf | Inf | free_body_rot                    | hinge | angular velocity (rad/s) |
| 6   | angular velocity of first rotor      | -Inf | Inf | motor1_rot                       | hinge | angular velocity (rad/s) |
| 7   | angular velocity of second rotor     | -Inf | Inf | motor2_rot                       | hinge | angular velocity (rad/s) |
| excluded | position of the tip along the x-axis | -Inf | Inf | slider1                          | slide | position (m)           |
| excluded | position of the tip along the y-axis | -Inf | Inf | slider2                          | slide | position (m)           |

## Rewards
The reward consists of two parts:
- *forward_reward*: A reward of moving forward which is measured
as *`forward_reward_weight` * (x-coordinate before action - x-coordinate after action)/dt*. *dt* is
the time between actions and is dependent on the frame_skip parameter
(default is 4), where the frametime is 0.01 - making the
default *dt = 4 * 0.01 = 0.04*. This reward would be positive if the swimmer
swims right as desired.
- *ctrl_cost*: A cost for penalising the swimmer if it takes
actions that are too large. It is measured as *`ctrl_cost_weight` *
sum(action<sup>2</sup>)* where *`ctrl_cost_weight`* is a parameter set for the
control and has a default value of 1e-4

The total reward returned is ***reward*** *=* *forward_reward - ctrl_cost* and `info` will also contain the individual reward terms

## Starting State
All observations start in state (0,0,0,0,0,0,0,0) with a Uniform noise in the range of [-`reset_noise_scale`, `reset_noise_scale`] is added to the initial state for stochasticity.

## Episode End
The episode truncates when the episode length is greater than 1000.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
gym.make('Swimmer-v4')
```

v3 and v4 take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Swimmer-v4', ctrl_cost_weight=0.1, ....)
```

| Parameter                                    | Type      | Default         | Description                                                                                                                                                               |
| -------------------------------------------- | --------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xml_file`                                   | **str**   | `"swimmer.xml"` | Path to a MuJoCo model                                                                                                                                                    |
| `forward_reward_weight`                      | **float** | `1.0`           | Weight for _forward_reward_ term (see section on reward)                                                                                                                  |
| `ctrl_cost_weight`                           | **float** | `1e-4`          | Weight for _ctrl_cost_ term (see section on reward)                                                                                                                       |
| `reset_noise_scale`                          | **float** | `0.1`           | Scale of random perturbations of initial position and velocity (see section on Starting State)                                                                            |
| `exclude_current_positions_from_observation` | **bool**  | `True`          | Whether or not to omit the x- and y-coordinates from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies |


## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from swimmer_v4 import __init__
```



---
## control_cost
```python
from swimmer_v4 import control_cost
```



---
## step
```python
from swimmer_v4 import step
```



---
## _get_obs
```python
from swimmer_v4 import _get_obs
```



---
## reset_model
```python
from swimmer_v4 import reset_model
```



---
## __name__
```python
from inverted_pendulum import __name__
```



---
## InvertedPendulumEnv
```python
from inverted_pendulum import InvertedPendulumEnv
```



---
## __init__
```python
from inverted_pendulum import __init__
```



---
## step
```python
from inverted_pendulum import step
```



---
## reset_model
```python
from inverted_pendulum import reset_model
```



---
## _get_obs
```python
from inverted_pendulum import _get_obs
```



---
## viewer_setup
```python
from inverted_pendulum import viewer_setup
```



---
## __name__
```python
from humanoidstandup_v4 import __name__
```



---
## HumanoidStandupEnv
```python
from humanoidstandup_v4 import HumanoidStandupEnv
```

## Description

This environment is based on the environment introduced by Tassa, Erez and Todorov
in ["Synthesis and stabilization of complex behaviors through online trajectory optimization"](https://ieeexplore.ieee.org/document/6386025).
The 3D bipedal robot is designed to simulate a human. It has a torso (abdomen) with a
pair of legs and arms. The legs each consist of two links, and so the arms (representing the
knees and elbows respectively). The environment starts with the humanoid laying on the ground,
and then the goal of the environment is to make the humanoid standup and then keep it standing
by applying torques on the various hinges.

## Action Space
The agent take a 17-element vector for actions.

The action space is a continuous `(action, ...)` all in `[-1, 1]`, where `action`
represents the numerical torques applied at the hinge joints.

| Num | Action                                                                             | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit         |
| --- | ---------------------------------------------------------------------------------- | ----------- | ----------- | -------------------------------- | ----- | ------------ |
| 0   | Torque applied on the hinge in the y-coordinate of the abdomen                     | -0.4        | 0.4         | abdomen_y                        | hinge | torque (N m) |
| 1   | Torque applied on the hinge in the z-coordinate of the abdomen                     | -0.4        | 0.4         | abdomen_z                        | hinge | torque (N m) |
| 2   | Torque applied on the hinge in the x-coordinate of the abdomen                     | -0.4        | 0.4         | abdomen_x                        | hinge | torque (N m) |
| 3   | Torque applied on the rotor between torso/abdomen and the right hip (x-coordinate) | -0.4        | 0.4         | right_hip_x (right_thigh)        | hinge | torque (N m) |
| 4   | Torque applied on the rotor between torso/abdomen and the right hip (z-coordinate) | -0.4        | 0.4         | right_hip_z (right_thigh)        | hinge | torque (N m) |
| 5   | Torque applied on the rotor between torso/abdomen and the right hip (y-coordinate) | -0.4        | 0.4         | right_hip_y (right_thigh)        | hinge | torque (N m) |
| 6   | Torque applied on the rotor between the right hip/thigh and the right shin         | -0.4        | 0.4         | right_knee                       | hinge | torque (N m) |
| 7   | Torque applied on the rotor between torso/abdomen and the left hip (x-coordinate)  | -0.4        | 0.4         | left_hip_x (left_thigh)          | hinge | torque (N m) |
| 8   | Torque applied on the rotor between torso/abdomen and the left hip (z-coordinate)  | -0.4        | 0.4         | left_hip_z (left_thigh)          | hinge | torque (N m) |
| 9   | Torque applied on the rotor between torso/abdomen and the left hip (y-coordinate)  | -0.4        | 0.4         | left_hip_y (left_thigh)          | hinge | torque (N m) |
| 10  | Torque applied on the rotor between the left hip/thigh and the left shin           | -0.4        | 0.4         | left_knee                        | hinge | torque (N m) |
| 11  | Torque applied on the rotor between the torso and right upper arm (coordinate -1)  | -0.4        | 0.4         | right_shoulder1                  | hinge | torque (N m) |
| 12  | Torque applied on the rotor between the torso and right upper arm (coordinate -2)  | -0.4        | 0.4         | right_shoulder2                  | hinge | torque (N m) |
| 13  | Torque applied on the rotor between the right upper arm and right lower arm        | -0.4        | 0.4         | right_elbow                      | hinge | torque (N m) |
| 14  | Torque applied on the rotor between the torso and left upper arm (coordinate -1)   | -0.4        | 0.4         | left_shoulder1                   | hinge | torque (N m) |
| 15  | Torque applied on the rotor between the torso and left upper arm (coordinate -2)   | -0.4        | 0.4         | left_shoulder2                   | hinge | torque (N m) |
| 16  | Torque applied on the rotor between the left upper arm and left lower arm          | -0.4        | 0.4         | left_elbow                       | hinge | torque (N m) |

## Observation Space
Observations consist of positional values of different body parts of the Humanoid,
followed by the velocities of those individual parts (their derivatives) with all the
positions ordered before all the velocities.

By default, observations do not include the x- and y-coordinates of the torso. These may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be a `Box(-Inf, Inf, (378,), float64)` where the first two observations
represent the x- and y-coordinates of the torso.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x- and y-coordinates
will be returned in `info` with keys `"x_position"` and `"y_position"`, respectively.

However, by default, the observation is a `Box(-Inf, Inf, (376,), float64)`. The elements correspond to the following:

| Num | Observation                                                                                                     | Min  | Max | Name (in corresponding XML file) | Joint | Unit                       |
| --- | --------------------------------------------------------------------------------------------------------------- | ---- | --- | -------------------------------- | ----- | -------------------------- |
| 0   | z-coordinate of the torso (centre)                                                                              | -Inf | Inf | root                             | free  | position (m)               |
| 1   | x-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 2   | y-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 3   | z-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 4   | w-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 5   | z-angle of the abdomen (in lower_waist)                                                                         | -Inf | Inf | abdomen_z                        | hinge | angle (rad)                |
| 6   | y-angle of the abdomen (in lower_waist)                                                                         | -Inf | Inf | abdomen_y                        | hinge | angle (rad)                |
| 7   | x-angle of the abdomen (in pelvis)                                                                              | -Inf | Inf | abdomen_x                        | hinge | angle (rad)                |
| 8   | x-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_x                      | hinge | angle (rad)                |
| 9   | z-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_z                      | hinge | angle (rad)                |
| 10  | y-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_y                      | hinge | angle (rad)                |
| 11  | angle between right hip and the right shin (in right_knee)                                                      | -Inf | Inf | right_knee                       | hinge | angle (rad)                |
| 12  | x-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_x                       | hinge | angle (rad)                |
| 13  | z-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_z                       | hinge | angle (rad)                |
| 14  | y-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_y                       | hinge | angle (rad)                |
| 15  | angle between left hip and the left shin (in left_knee)                                                         | -Inf | Inf | left_knee                        | hinge | angle (rad)                |
| 16  | coordinate-1 (multi-axis) angle between torso and right arm (in right_upper_arm)                                | -Inf | Inf | right_shoulder1                  | hinge | angle (rad)                |
| 17  | coordinate-2 (multi-axis) angle between torso and right arm (in right_upper_arm)                                | -Inf | Inf | right_shoulder2                  | hinge | angle (rad)                |
| 18  | angle between right upper arm and right_lower_arm                                                               | -Inf | Inf | right_elbow                      | hinge | angle (rad)                |
| 19  | coordinate-1 (multi-axis) angle between torso and left arm (in left_upper_arm)                                  | -Inf | Inf | left_shoulder1                   | hinge | angle (rad)                |
| 20  | coordinate-2 (multi-axis) angle between torso and left arm (in left_upper_arm)                                  | -Inf | Inf | left_shoulder2                   | hinge | angle (rad)                |
| 21  | angle between left upper arm and left_lower_arm                                                                 | -Inf | Inf | left_elbow                       | hinge | angle (rad)                |
| 22  | x-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 23  | y-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 24  | z-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 25  | x-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 26  | y-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 27  | z-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 28  | z-coordinate of angular velocity of the abdomen (in lower_waist)                                                | -Inf | Inf | abdomen_z                        | hinge | anglular velocity (rad/s)  |
| 29  | y-coordinate of angular velocity of the abdomen (in lower_waist)                                                | -Inf | Inf | abdomen_y                        | hinge | anglular velocity (rad/s)  |
| 30  | x-coordinate of angular velocity of the abdomen (in pelvis)                                                     | -Inf | Inf | abdomen_x                        | hinge | aanglular velocity (rad/s) |
| 31  | x-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_x                      | hinge | anglular velocity (rad/s)  |
| 32  | z-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_z                      | hinge | anglular velocity (rad/s)  |
| 33  | y-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_y                      | hinge | anglular velocity (rad/s)  |
| 34  | angular velocity of the angle between right hip and the right shin (in right_knee)                              | -Inf | Inf | right_knee                       | hinge | anglular velocity (rad/s)  |
| 35  | x-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_x                       | hinge | anglular velocity (rad/s)  |
| 36  | z-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_z                       | hinge | anglular velocity (rad/s)  |
| 37  | y-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_y                       | hinge | anglular velocity (rad/s)  |
| 38  | angular velocity of the angle between left hip and the left shin (in left_knee)                                 | -Inf | Inf | left_knee                        | hinge | anglular velocity (rad/s)  |
| 39  | coordinate-1 (multi-axis) of the angular velocity of the angle between torso and right arm (in right_upper_arm) | -Inf | Inf | right_shoulder1                  | hinge | anglular velocity (rad/s)  |
| 40  | coordinate-2 (multi-axis) of the angular velocity of the angle between torso and right arm (in right_upper_arm) | -Inf | Inf | right_shoulder2                  | hinge | anglular velocity (rad/s)  |
| 41  | angular velocity of the angle between right upper arm and right_lower_arm                                       | -Inf | Inf | right_elbow                      | hinge | anglular velocity (rad/s)  |
| 42  | coordinate-1 (multi-axis) of the angular velocity of the angle between torso and left arm (in left_upper_arm)   | -Inf | Inf | left_shoulder1                   | hinge | anglular velocity (rad/s)  |
| 43  | coordinate-2 (multi-axis) of the angular velocity of the angle between torso and left arm (in left_upper_arm)   | -Inf | Inf | left_shoulder2                   | hinge | anglular velocity (rad/s)  |
| 44  | angular velocity of the angle between left upper arm and left_lower_arm                                         | -Inf | Inf | left_elbow                       | hinge | anglular velocity (rad/s)  |
| excluded | x-coordinate of the torso (centre)                                                                         | -Inf | Inf | root                             | free  | position (m)               |
| excluded | y-coordinate of the torso (centre)                                                                         | -Inf | Inf | root                             | free  | position (m)               |

Additionally, after all the positional and velocity based values in the table,
the observation contains (in order):
- *cinert:* Mass and inertia of a single rigid body relative to the center of mass
(this is an intermediate result of transition). It has shape 14*10 (*nbody * 10*)
and hence adds to another 140 elements in the state space.
- *cvel:* Center of mass based velocity. It has shape 14 * 6 (*nbody * 6*) and hence
adds another 84 elements in the state space
- *qfrc_actuator:* Constraint force generated as the actuator force. This has shape
`(23,)`  *(nv * 1)* and hence adds another 23 elements to the state space.
- *cfrc_ext:* This is the center of mass based external force on the body.  It has shape
14 * 6 (*nbody * 6*) and hence adds to another 84 elements in the state space.
where *nbody* stands for the number of bodies in the robot and *nv* stands for the
number of degrees of freedom (*= dim(qvel)*)

The body parts are:

| id (for `v2`,`v3`,`v4`) | body part |
| --- |  ------------  |
| 0   | worldBody (note: all values are constant 0) |
| 1   | torso |
| 2   | lwaist |
| 3   | pelvis |
| 4   | right_thigh |
| 5   | right_sin |
| 6   | right_foot |
| 7   | left_thigh |
| 8   | left_sin |
| 9   | left_foot |
| 10  | right_upper_arm |
| 11  | right_lower_arm |
| 12  | left_upper_arm |
| 13  | left_lower_arm |

The joints are:

| id (for `v2`,`v3`,`v4`) | joint |
| --- |  ------------  |
| 0   | root |
| 1   | root |
| 2   | root |
| 3   | root |
| 4   | root |
| 5   | root |
| 6   | abdomen_z |
| 7   | abdomen_y |
| 8   | abdomen_x |
| 9   | right_hip_x |
| 10  | right_hip_z |
| 11  | right_hip_y |
| 12  | right_knee |
| 13  | left_hip_x |
| 14  | left_hiz_z |
| 15  | left_hip_y |
| 16  | left_knee |
| 17  | right_shoulder1 |
| 18  | right_shoulder2 |
| 19  | right_elbow|
| 20  | left_shoulder1 |
| 21  | left_shoulder2 |
| 22  | left_elfbow |

The (x,y,z) coordinates are translational DOFs while the orientations are rotational
DOFs expressed as quaternions. One can read more about free joints on the
[Mujoco Documentation](https://mujoco.readthedocs.io/en/latest/XMLreference.html).

**Note:** HumanoidStandup-v4 environment no longer has the following contact forces issue.
If using previous HumanoidStandup versions from v4, there have been reported issues that using a Mujoco-Py version > 2.0 results
in the contact forces always being 0. As such we recommend to use a Mujoco-Py version < 2.0
when using the Humanoid environment if you would like to report results with contact forces
(if contact forces are not used in your experiments, you can use version > 2.0).

## Rewards
The reward consists of three parts:
- *uph_cost*: A reward for moving upward (in an attempt to stand up). This is not a relative
reward which measures how much upward it has moved from the last timestep, but it is an
absolute reward which measures how much upward the Humanoid has moved overall. It is
measured as *(z coordinate after action - 0)/(atomic timestep)*, where *z coordinate after
action* is index 0 in the state/index 2 in the table, and *atomic timestep* is the time for
one frame of movement even though the simulation has a framerate of 5 (done in order to inflate
rewards a little for faster learning).
- *quad_ctrl_cost*: A negative reward for penalising the humanoid if it has too large of
a control force. If there are *nu* actuators/controls, then the control has shape  `nu x 1`.
It is measured as *0.1 **x** sum(control<sup>2</sup>)*.
- *quad_impact_cost*: A negative reward for penalising the humanoid if the external
contact force is too large. It is calculated as *min(0.5 * 0.000001 * sum(external
contact force<sup>2</sup>), 10)*.

The total reward returned is ***reward*** *=* *uph_cost + 1 - quad_ctrl_cost - quad_impact_cost*

## Starting State
All observations start in state
(0.0, 0.0,  0.105, 1.0, 0.0  ... 0.0) with a uniform noise in the range of
[-0.01, 0.01] added to the positional and velocity values (values in the table)
for stochasticity. Note that the initial z coordinate is intentionally selected
to be low, thereby indicating a laying down humanoid. The initial orientation is
designed to make it face forward as well.

## Episode End
The episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 1000 timesteps
2. Termination: Any of the state space values is no longer finite

## Arguments

No additional arguments are currently supported.

```python
import gymnasium as gym
env = gym.make('HumanoidStandup-v4')
```

There is no v3 for HumanoidStandup, unlike the robot environments where a v3 and
beyond take gymnasium.make kwargs such as xml_file, ctrl_cost_weight, reset_noise_scale etc.

```python
import gymnasium as gym
env = gym.make('HumanoidStandup-v2')
```

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from humanoidstandup_v4 import __init__
```



---
## _get_obs
```python
from humanoidstandup_v4 import _get_obs
```



---
## step
```python
from humanoidstandup_v4 import step
```



---
## reset_model
```python
from humanoidstandup_v4 import reset_model
```



---
## __name__
```python
from humanoid_v4 import __name__
```



---
## mass_center
```python
from humanoid_v4 import mass_center
```



---
## HumanoidEnv
```python
from humanoid_v4 import HumanoidEnv
```

## Description

This environment is based on the environment introduced by Tassa, Erez and Todorov
in ["Synthesis and stabilization of complex behaviors through online trajectory optimization"](https://ieeexplore.ieee.org/document/6386025).
The 3D bipedal robot is designed to simulate a human. It has a torso (abdomen) with a pair of
legs and arms. The legs each consist of three body parts, and the arms 2 body parts (representing the knees and
elbows respectively). The goal of the environment is to walk forward as fast as possible without falling over.

## Action Space
The action space is a `Box(-1, 1, (17,), float32)`. An action represents the torques applied at the hinge joints.

| Num | Action                    | Control Min | Control Max | Name (in corresponding XML file) | Joint | Unit |
|-----|----------------------|---------------|----------------|---------------------------------------|-------|------|
| 0   | Torque applied on the hinge in the y-coordinate of the abdomen                     | -0.4 | 0.4 | abdomen_y                   | hinge | torque (N m) |
| 1   | Torque applied on the hinge in the z-coordinate of the abdomen                     | -0.4 | 0.4 | abdomen_z                   | hinge | torque (N m) |
| 2   | Torque applied on the hinge in the x-coordinate of the abdomen                     | -0.4 | 0.4 | abdomen_x                   | hinge | torque (N m) |
| 3   | Torque applied on the rotor between torso/abdomen and the right hip (x-coordinate) | -0.4 | 0.4 | right_hip_x (right_thigh)   | hinge | torque (N m) |
| 4   | Torque applied on the rotor between torso/abdomen and the right hip (z-coordinate) | -0.4 | 0.4 | right_hip_z (right_thigh)   | hinge | torque (N m) |
| 5   | Torque applied on the rotor between torso/abdomen and the right hip (y-coordinate) | -0.4 | 0.4 | right_hip_y (right_thigh)   | hinge | torque (N m) |
| 6   | Torque applied on the rotor between the right hip/thigh and the right shin         | -0.4 | 0.4 | right_knee                  | hinge | torque (N m) |
| 7   | Torque applied on the rotor between torso/abdomen and the left hip (x-coordinate)  | -0.4 | 0.4 | left_hip_x (left_thigh)     | hinge | torque (N m) |
| 8   | Torque applied on the rotor between torso/abdomen and the left hip (z-coordinate)  | -0.4 | 0.4 | left_hip_z (left_thigh)     | hinge | torque (N m) |
| 9   | Torque applied on the rotor between torso/abdomen and the left hip (y-coordinate)  | -0.4 | 0.4 | left_hip_y (left_thigh)     | hinge | torque (N m) |
| 10  | Torque applied on the rotor between the left hip/thigh and the left shin           | -0.4 | 0.4 | left_knee                   | hinge | torque (N m) |
| 11  | Torque applied on the rotor between the torso and right upper arm (coordinate -1)  | -0.4 | 0.4 | right_shoulder1             | hinge | torque (N m) |
| 12  | Torque applied on the rotor between the torso and right upper arm (coordinate -2)  | -0.4 | 0.4 | right_shoulder2             | hinge | torque (N m) |
| 13  | Torque applied on the rotor between the right upper arm and right lower arm        | -0.4 | 0.4 | right_elbow                 | hinge | torque (N m) |
| 14  | Torque applied on the rotor between the torso and left upper arm (coordinate -1)   | -0.4 | 0.4 | left_shoulder1              | hinge | torque (N m) |
| 15  | Torque applied on the rotor between the torso and left upper arm (coordinate -2)   | -0.4 | 0.4 | left_shoulder2              | hinge | torque (N m) |
| 16  | Torque applied on the rotor between the left upper arm and left lower arm          | -0.4 | 0.4 | left_elbow                  | hinge | torque (N m) |

## Observation Space
Observations consist of positional values of different body parts of the Humanoid,
followed by the velocities of those individual parts (their derivatives) with all the
positions ordered before all the velocities.

By default, observations do not include the x- and y-coordinates of the torso. These may
be included by passing `exclude_current_positions_from_observation=False` during construction.
In that case, the observation space will be a `Box(-Inf, Inf, (378,), float64)` where the first two observations
represent the x- and y-coordinates of the torso.
Regardless of whether `exclude_current_positions_from_observation` was set to true or false, the x- and y-coordinates
will be returned in `info` with keys `"x_position"` and `"y_position"`, respectively.

However, by default, the observation is a `Box(-Inf, Inf, (376,), float64)`. The elements correspond to the following:

| Num | Observation                                                                                                     | Min  | Max | Name (in corresponding XML file) | Joint | Unit                       |
| --- | --------------------------------------------------------------------------------------------------------------- | ---- | --- | -------------------------------- | ----- | -------------------------- |
| 0   | z-coordinate of the torso (centre)                                                                              | -Inf | Inf | root                             | free  | position (m)               |
| 1   | x-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 2   | y-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 3   | z-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 4   | w-orientation of the torso (centre)                                                                             | -Inf | Inf | root                             | free  | angle (rad)                |
| 5   | z-angle of the abdomen (in lower_waist)                                                                         | -Inf | Inf | abdomen_z                        | hinge | angle (rad)                |
| 6   | y-angle of the abdomen (in lower_waist)                                                                         | -Inf | Inf | abdomen_y                        | hinge | angle (rad)                |
| 7   | x-angle of the abdomen (in pelvis)                                                                              | -Inf | Inf | abdomen_x                        | hinge | angle (rad)                |
| 8   | x-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_x                      | hinge | angle (rad)                |
| 9   | z-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_z                      | hinge | angle (rad)                |
| 10  | y-coordinate of angle between pelvis and right hip (in right_thigh)                                             | -Inf | Inf | right_hip_y                      | hinge | angle (rad)                |
| 11  | angle between right hip and the right shin (in right_knee)                                                      | -Inf | Inf | right_knee                       | hinge | angle (rad)                |
| 12  | x-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_x                       | hinge | angle (rad)                |
| 13  | z-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_z                       | hinge | angle (rad)                |
| 14  | y-coordinate of angle between pelvis and left hip (in left_thigh)                                               | -Inf | Inf | left_hip_y                       | hinge | angle (rad)                |
| 15  | angle between left hip and the left shin (in left_knee)                                                         | -Inf | Inf | left_knee                        | hinge | angle (rad)                |
| 16  | coordinate-1 (multi-axis) angle between torso and right arm (in right_upper_arm)                                | -Inf | Inf | right_shoulder1                  | hinge | angle (rad)                |
| 17  | coordinate-2 (multi-axis) angle between torso and right arm (in right_upper_arm)                                | -Inf | Inf | right_shoulder2                  | hinge | angle (rad)                |
| 18  | angle between right upper arm and right_lower_arm                                                               | -Inf | Inf | right_elbow                      | hinge | angle (rad)                |
| 19  | coordinate-1 (multi-axis) angle between torso and left arm (in left_upper_arm)                                  | -Inf | Inf | left_shoulder1                   | hinge | angle (rad)                |
| 20  | coordinate-2 (multi-axis) angle between torso and left arm (in left_upper_arm)                                  | -Inf | Inf | left_shoulder2                   | hinge | angle (rad)                |
| 21  | angle between left upper arm and left_lower_arm                                                                 | -Inf | Inf | left_elbow                       | hinge | angle (rad)                |
| 22  | x-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 23  | y-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 24  | z-coordinate velocity of the torso (centre)                                                                     | -Inf | Inf | root                             | free  | velocity (m/s)             |
| 25  | x-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 26  | y-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 27  | z-coordinate angular velocity of the torso (centre)                                                             | -Inf | Inf | root                             | free  | anglular velocity (rad/s)  |
| 28  | z-coordinate of angular velocity of the abdomen (in lower_waist)                                                | -Inf | Inf | abdomen_z                        | hinge | anglular velocity (rad/s)  |
| 29  | y-coordinate of angular velocity of the abdomen (in lower_waist)                                                | -Inf | Inf | abdomen_y                        | hinge | anglular velocity (rad/s)  |
| 30  | x-coordinate of angular velocity of the abdomen (in pelvis)                                                     | -Inf | Inf | abdomen_x                        | hinge | aanglular velocity (rad/s) |
| 31  | x-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_x                      | hinge | anglular velocity (rad/s)  |
| 32  | z-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_z                      | hinge | anglular velocity (rad/s)  |
| 33  | y-coordinate of the angular velocity of the angle between pelvis and right hip (in right_thigh)                 | -Inf | Inf | right_hip_y                      | hinge | anglular velocity (rad/s)  |
| 34  | angular velocity of the angle between right hip and the right shin (in right_knee)                              | -Inf | Inf | right_knee                       | hinge | anglular velocity (rad/s)  |
| 35  | x-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_x                       | hinge | anglular velocity (rad/s)  |
| 36  | z-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_z                       | hinge | anglular velocity (rad/s)  |
| 37  | y-coordinate of the angular velocity of the angle between pelvis and left hip (in left_thigh)                   | -Inf | Inf | left_hip_y                       | hinge | anglular velocity (rad/s)  |
| 38  | angular velocity of the angle between left hip and the left shin (in left_knee)                                 | -Inf | Inf | left_knee                        | hinge | anglular velocity (rad/s)  |
| 39  | coordinate-1 (multi-axis) of the angular velocity of the angle between torso and right arm (in right_upper_arm) | -Inf | Inf | right_shoulder1                  | hinge | anglular velocity (rad/s)  |
| 40  | coordinate-2 (multi-axis) of the angular velocity of the angle between torso and right arm (in right_upper_arm) | -Inf | Inf | right_shoulder2                  | hinge | anglular velocity (rad/s)  |
| 41  | angular velocity of the angle between right upper arm and right_lower_arm                                       | -Inf | Inf | right_elbow                      | hinge | anglular velocity (rad/s)  |
| 42  | coordinate-1 (multi-axis) of the angular velocity of the angle between torso and left arm (in left_upper_arm)   | -Inf | Inf | left_shoulder1                   | hinge | anglular velocity (rad/s)  |
| 43  | coordinate-2 (multi-axis) of the angular velocity of the angle between torso and left arm (in left_upper_arm)   | -Inf | Inf | left_shoulder2                   | hinge | anglular velocity (rad/s)  |
| 44  | angular velocity of the angle between left upper arm and left_lower_arm                                         | -Inf | Inf | left_elbow                       | hinge | anglular velocity (rad/s)  |
| excluded | x-coordinate of the torso (centre)                                                                         | -Inf | Inf | root                             | free  | position (m)               |
| excluded | y-coordinate of the torso (centre)                                                                         | -Inf | Inf | root                             | free  | position (m)               |

Additionally, after all the positional and velocity based values in the table,
the observation contains (in order):
- *cinert:* Mass and inertia of a single rigid body relative to the center of mass
(this is an intermediate result of transition). It has shape 14*10 (*nbody * 10*)
and hence adds to another 140 elements in the state space.
- *cvel:* Center of mass based velocity. It has shape 14 * 6 (*nbody * 6*) and hence
adds another 84 elements in the state space
- *qfrc_actuator:* Constraint force generated as the actuator force. This has shape
`(23,)`  *(nv * 1)* and hence adds another 23 elements to the state space.
- *cfrc_ext:* This is the center of mass based external force on the body.  It has shape
14 * 6 (*nbody * 6*) and hence adds to another 84 elements in the state space.
where *nbody* stands for the number of bodies in the robot and *nv* stands for the
number of degrees of freedom (*= dim(qvel)*)

The body parts are:

| id (for `v2`,`v3`,`v4`) | body part |
| --- |  ------------  |
| 0   | worldBody (note: all values are constant 0) |
| 1   | torso |
| 2   | lwaist |
| 3   | pelvis |
| 4   | right_thigh |
| 5   | right_sin |
| 6   | right_foot |
| 7   | left_thigh |
| 8   | left_sin |
| 9   | left_foot |
| 10  | right_upper_arm |
| 11  | right_lower_arm |
| 12  | left_upper_arm |
| 13  | left_lower_arm |

The joints are:

| id (for `v2`,`v3`,`v4`) | joint |
| --- |  ------------  |
| 0   | root |
| 1   | root |
| 2   | root |
| 3   | root |
| 4   | root |
| 5   | root |
| 6   | abdomen_z |
| 7   | abdomen_y |
| 8   | abdomen_x |
| 9   | right_hip_x |
| 10  | right_hip_z |
| 11  | right_hip_y |
| 12  | right_knee |
| 13  | left_hip_x |
| 14  | left_hiz_z |
| 15  | left_hip_y |
| 16  | left_knee |
| 17  | right_shoulder1 |
| 18  | right_shoulder2 |
| 19  | right_elbow|
| 20  | left_shoulder1 |
| 21  | left_shoulder2 |
| 22  | left_elfbow |

The (x,y,z) coordinates are translational DOFs while the orientations are rotational
DOFs expressed as quaternions. One can read more about free joints on the
[Mujoco Documentation](https://mujoco.readthedocs.io/en/latest/XMLreference.html).

**Note:** Humanoid-v4 environment no longer has the following contact forces issue.
If using previous Humanoid versions from v4, there have been reported issues that using a Mujoco-Py version > 2.0
results in the contact forces always being 0. As such we recommend to use a Mujoco-Py
version < 2.0 when using the Humanoid environment if you would like to report results
with contact forces (if contact forces are not used in your experiments, you can use
version > 2.0).

## Rewards
The reward consists of three parts:
- *healthy_reward*: Every timestep that the humanoid is alive (see section Episode Termination for definition), it gets a reward of fixed value `healthy_reward`
- *forward_reward*: A reward of walking forward which is measured as *`forward_reward_weight` *
(average center of mass before action - average center of mass after action)/dt*.
*dt* is the time between actions and is dependent on the frame_skip parameter
(default is 5), where the frametime is 0.003 - making the default *dt = 5 * 0.003 = 0.015*.
This reward would be positive if the humanoid walks forward (in positive x-direction). The calculation
for the center of mass is defined in the `.py` file for the Humanoid.
- *ctrl_cost*: A negative reward for penalising the humanoid if it has too
large of a control force. If there are *nu* actuators/controls, then the control has
shape  `nu x 1`. It is measured as *`ctrl_cost_weight` * sum(control<sup>2</sup>)*.
- *contact_cost*: A negative reward for penalising the humanoid if the external
contact force is too large. It is calculated by clipping
*`contact_cost_weight` * sum(external contact force<sup>2</sup>)* to the interval specified by `contact_cost_range`.

The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost - contact_cost* and `info` will also contain the individual reward terms

## Starting State
All observations start in state
(0.0, 0.0,  1.4, 1.0, 0.0  ... 0.0) with a uniform noise in the range
of [-`reset_noise_scale`, `reset_noise_scale`] added to the positional and velocity values (values in the table)
for stochasticity. Note that the initial z coordinate is intentionally
selected to be high, thereby indicating a standing up humanoid. The initial
orientation is designed to make it face forward as well.

## Episode End
The humanoid is said to be unhealthy if the z-position of the torso is no longer contained in the
closed interval specified by the argument `healthy_z_range`.

If `terminate_when_unhealthy=True` is passed during construction (which is the default),
the episode ends when any of the following happens:

1. Truncation: The episode duration reaches a 1000 timesteps
3. Termination: The humanoid is unhealthy

If `terminate_when_unhealthy=False` is passed, the episode is ended only when 1000 timesteps are exceeded.

## Arguments

No additional arguments are currently supported in v2 and lower.

```python
import gymnasium as gym
env = gym.make('Humanoid-v4')
```

v3 and v4 take `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc.

```python
import gymnasium as gym
env = gym.make('Humanoid-v4', ctrl_cost_weight=0.1, ....)
```

| Parameter                                    | Type      | Default          | Description                                                                                                                                                               |
| -------------------------------------------- | --------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `xml_file`                                   | **str**   | `"humanoid.xml"` | Path to a MuJoCo model                                                                                                                                                    |
| `forward_reward_weight`                      | **float** | `1.25`           | Weight for _forward_reward_ term (see section on reward)                                                                                                                  |
| `ctrl_cost_weight`                           | **float** | `0.1`            | Weight for _ctrl_cost_ term (see section on reward)                                                                                                                       |
| `contact_cost_weight`                        | **float** | `5e-7`           | Weight for _contact_cost_ term (see section on reward)                                                                                                                    |
| `healthy_reward`                             | **float** | `5.0`            | Constant reward given if the humanoid is "healthy" after timestep                                                                                                         |
| `terminate_when_unhealthy`                   | **bool**  | `True`           | If true, issue a done signal if the z-coordinate of the torso is no longer in the `healthy_z_range`                                                                       |
| `healthy_z_range`                            | **tuple** | `(1.0, 2.0)`     | The humanoid is considered healthy if the z-coordinate of the torso is in this range                                                                                      |
| `reset_noise_scale`                          | **float** | `1e-2`           | Scale of random perturbations of initial position and velocity (see section on Starting State)                                                                            |
| `exclude_current_positions_from_observation` | **bool**  | `True`           | Whether or not to omit the x- and y-coordinates from observations. Excluding the position can serve as an inductive bias to induce position-agnostic behavior in policies |

## Version History

* v4: All MuJoCo environments now use the MuJoCo bindings in mujoco >= 2.1.3
* v3: Support for `gymnasium.make` kwargs such as `xml_file`, `ctrl_cost_weight`, `reset_noise_scale`, etc. rgb rendering comes from tracking camera (so agent does not run away from screen)
* v2: All continuous control environments now use mujoco-py >= 1.50
* v1: max_time_steps raised to 1000 for robot based tasks. Added reward_threshold to environments.
* v0: Initial versions release (1.0.0)

---
## __init__
```python
from humanoid_v4 import __init__
```



---
## healthy_reward
```python
from humanoid_v4 import healthy_reward
```



---
## control_cost
```python
from humanoid_v4 import control_cost
```



---
## is_healthy
```python
from humanoid_v4 import is_healthy
```



---
## terminated
```python
from humanoid_v4 import terminated
```



---
## _get_obs
```python
from humanoid_v4 import _get_obs
```



---
## step
```python
from humanoid_v4 import step
```



---
## reset_model
```python
from humanoid_v4 import reset_model
```



---
## __name__
```python
from walker2d_v3 import __name__
```



---
## Walker2dEnv
```python
from walker2d_v3 import Walker2dEnv
```



---
## __init__
```python
from walker2d_v3 import __init__
```



---
## healthy_reward
```python
from walker2d_v3 import healthy_reward
```



---
## control_cost
```python
from walker2d_v3 import control_cost
```



---
## is_healthy
```python
from walker2d_v3 import is_healthy
```



---
## terminated
```python
from walker2d_v3 import terminated
```



---
## _get_obs
```python
from walker2d_v3 import _get_obs
```



---
## step
```python
from walker2d_v3 import step
```



---
## reset_model
```python
from walker2d_v3 import reset_model
```



---
## viewer_setup
```python
from walker2d_v3 import viewer_setup
```



---
## __name__
```python
from walker2d import __name__
```



---
## Walker2dEnv
```python
from walker2d import Walker2dEnv
```



---
## __init__
```python
from walker2d import __init__
```



---
## step
```python
from walker2d import step
```



---
## _get_obs
```python
from walker2d import _get_obs
```



---
## reset_model
```python
from walker2d import reset_model
```



---
## viewer_setup
```python
from walker2d import viewer_setup
```



---
## __name__
```python
from mujoco_rendering import __name__
```



---
## _import_egl
```python
from mujoco_rendering import _import_egl
```



---
## _import_glfw
```python
from mujoco_rendering import _import_glfw
```



---
## _import_osmesa
```python
from mujoco_rendering import _import_osmesa
```



---
## BaseRender
```python
from mujoco_rendering import BaseRender
```



---
## OffScreenViewer
```python
from mujoco_rendering import OffScreenViewer
```

Offscreen rendering class with opengl context.

---
## WindowViewer
```python
from mujoco_rendering import WindowViewer
```

Class for window rendering in all MuJoCo environments.

---
## MujocoRenderer
```python
from mujoco_rendering import MujocoRenderer
```

This is the MuJoCo renderer manager class for every MuJoCo environment.

The class has two main public methods available:
- :meth:`render` - Renders the environment in three possible modes: "human", "rgb_array", or "depth_array"
- :meth:`close` - Closes all contexts initialized with the renderer

---
## __init__
```python
from mujoco_rendering import __init__
```

A wrapper for clipping continuous actions within the valid bound.

Args:
    model: MjModel data structure of the MuJoCo simulation
    data: MjData data structure of the MuJoCo simulation
    default_cam_config: dictionary with attribute values of the viewer's default camera, https://mujoco.readthedocs.io/en/latest/XMLreference.html?highlight=camera#visual-global

---
## _set_mujoco_buffer
```python
from mujoco_rendering import _set_mujoco_buffer
```



---
## make_context_current
```python
from mujoco_rendering import make_context_current
```



---
## add_overlay
```python
from mujoco_rendering import add_overlay
```

Overlays text on the scene.

---
## add_marker
```python
from mujoco_rendering import add_marker
```



---
## _add_marker_to_scene
```python
from mujoco_rendering import _add_marker_to_scene
```



---
## close
```python
from mujoco_rendering import close
```

Close the OpenGL rendering contexts of all viewer modes

---
## _init_camera
```python
from mujoco_rendering import _init_camera
```



---
## _get_opengl_backend
```python
from mujoco_rendering import _get_opengl_backend
```



---
## free
```python
from mujoco_rendering import free
```



---
## __del__
```python
from mujoco_rendering import __del__
```

Eliminate all of the OpenGL glfw contexts and windows

---
## render
```python
from mujoco_rendering import render
```

Renders a frame of the simulation in a specific format and camera view.

Args:
    render_mode: The format to render the frame, it can be: "human", "rgb_array", or "depth_array"
    camera_id: The integer camera id from which to render the frame in the MuJoCo simulation
    camera_name: The string name of the camera from which to render the frame in the MuJoCo simulation. This argument should not be passed if using cameara_id instead and vice versa

Returns:
    If render_mode is "rgb_array" or "depth_arra" it returns a numpy array in the specified format. "human" render mode does not return anything.

---
## _key_callback
```python
from mujoco_rendering import _key_callback
```



---
## _cursor_pos_callback
```python
from mujoco_rendering import _cursor_pos_callback
```



---
## _mouse_button_callback
```python
from mujoco_rendering import _mouse_button_callback
```



---
## _scroll_callback
```python
from mujoco_rendering import _scroll_callback
```



---
## _create_overlay
```python
from mujoco_rendering import _create_overlay
```



---
## _get_viewer
```python
from mujoco_rendering import _get_viewer
```

Initializes and returns a viewer class depending on the render_mode
- `WindowViewer` class for "human" render mode
- `OffScreenViewer` class for "rgb_array" or "depth_array" render mode

---
## _set_cam_config
```python
from mujoco_rendering import _set_cam_config
```

Set the default camera parameters

---
## update
```python
from mujoco_rendering import update
```



---
## __name__
```python
from half_cheetah_v3 import __name__
```



---
## HalfCheetahEnv
```python
from half_cheetah_v3 import HalfCheetahEnv
```



---
## __init__
```python
from half_cheetah_v3 import __init__
```



---
## control_cost
```python
from half_cheetah_v3 import control_cost
```



---
## step
```python
from half_cheetah_v3 import step
```



---
## _get_obs
```python
from half_cheetah_v3 import _get_obs
```



---
## reset_model
```python
from half_cheetah_v3 import reset_model
```



---
## viewer_setup
```python
from half_cheetah_v3 import viewer_setup
```



---
## __name__
```python
from inverted_double_pendulum import __name__
```



---
## InvertedDoublePendulumEnv
```python
from inverted_double_pendulum import InvertedDoublePendulumEnv
```



---
## __init__
```python
from inverted_double_pendulum import __init__
```



---
## step
```python
from inverted_double_pendulum import step
```



---
## _get_obs
```python
from inverted_double_pendulum import _get_obs
```



---
## reset_model
```python
from inverted_double_pendulum import reset_model
```



---
## viewer_setup
```python
from inverted_double_pendulum import viewer_setup
```



---
## __name__
```python
from swimmer import __name__
```



---
## SwimmerEnv
```python
from swimmer import SwimmerEnv
```



---
## __init__
```python
from swimmer import __init__
```



---
## step
```python
from swimmer import step
```



---
## _get_obs
```python
from swimmer import _get_obs
```



---
## reset_model
```python
from swimmer import reset_model
```



---
## __name__
```python
from continuous_mountain_car import __name__
```

@author: Olivier Sigaud

A merge between two sources:

* Adaptation of the MountainCar Environment from the "FAReinforcement" library
of Jose Antonio Martin H. (version 1.0), adapted by  'Tom Schaul, tom@idsia.ch'
and then modified by Arnaud de Broissia

* the gymnasium MountainCar environment
itself from
http://incompleteideas.net/sutton/MountainCar/MountainCar1.cp
permalink: https://perma.cc/6Z2N-PFWC

---
## Continuous_MountainCarEnv
```python
from continuous_mountain_car import Continuous_MountainCarEnv
```

## Description

The Mountain Car MDP is a deterministic MDP that consists of a car placed stochastically
at the bottom of a sinusoidal valley, with the only possible actions being the accelerations
that can be applied to the car in either direction. The goal of the MDP is to strategically
accelerate the car to reach the goal state on top of the right hill. There are two versions
of the mountain car domain in gymnasium: one with discrete actions and one with continuous.
This version is the one with continuous actions.

This MDP first appeared in [Andrew Moore's PhD Thesis (1990)](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-209.pdf)

```
@TECHREPORT{Moore90efficientmemory-based,
    author = {Andrew William Moore},
    title = {Efficient Memory-based Learning for Robot Control},
    institution = {University of Cambridge},
    year = {1990}
}
```

## Observation Space

The observation is a `ndarray` with shape `(2,)` where the elements correspond to the following:

| Num | Observation                          | Min  | Max | Unit         |
|-----|--------------------------------------|------|-----|--------------|
| 0   | position of the car along the x-axis | -Inf | Inf | position (m) |
| 1   | velocity of the car                  | -Inf | Inf | position (m) |

## Action Space

The action is a `ndarray` with shape `(1,)`, representing the directional force applied on the car.
The action is clipped in the range `[-1,1]` and multiplied by a power of 0.0015.

## Transition Dynamics:

Given an action, the mountain car follows the following transition dynamics:

*velocity<sub>t+1</sub> = velocity<sub>t+1</sub> + force * self.power - 0.0025 * cos(3 * position<sub>t</sub>)*

*position<sub>t+1</sub> = position<sub>t</sub> + velocity<sub>t+1</sub>*

where force is the action clipped to the range `[-1,1]` and power is a constant 0.0015.
The collisions at either end are inelastic with the velocity set to 0 upon collision with the wall.
The position is clipped to the range [-1.2, 0.6] and velocity is clipped to the range [-0.07, 0.07].

## Reward

A negative reward of *-0.1 * action<sup>2</sup>* is received at each timestep to penalise for
taking actions of large magnitude. If the mountain car reaches the goal then a positive reward of +100
is added to the negative reward for that timestep.

## Starting State

The position of the car is assigned a uniform random value in `[-0.6 , -0.4]`.
The starting velocity of the car is always assigned to 0.

## Episode End

The episode ends if either of the following happens:
1. Termination: The position of the car is greater than or equal to 0.45 (the goal position on top of the right hill)
2. Truncation: The length of the episode is 999.

## Arguments

```python
import gymnasium as gym
gym.make('MountainCarContinuous-v0')
```

On reset, the `options` parameter allows the user to change the bounds used to determine
the new random state.

## Version History

* v0: Initial versions release (1.0.0)

---
## __init__
```python
from continuous_mountain_car import __init__
```



---
## step
```python
from continuous_mountain_car import step
```



---
## reset
```python
from continuous_mountain_car import reset
```



---
## _height
```python
from continuous_mountain_car import _height
```



---
## render
```python
from continuous_mountain_car import render
```



---
## close
```python
from continuous_mountain_car import close
```



---
## __name__
```python
from cartpole import __name__
```

Implementation of a Jax-accelerated cartpole environment.

---
## CartPoleEnv
```python
from cartpole import CartPoleEnv
```

## Description

This environment corresponds to the version of the cart-pole problem described by Barto, Sutton, and Anderson in
["Neuronlike Adaptive Elements That Can Solve Difficult Learning Control Problem"](https://ieeexplore.ieee.org/document/6313077).
A pole is attached by an un-actuated joint to a cart, which moves along a frictionless track.
The pendulum is placed upright on the cart and the goal is to balance the pole by applying forces
 in the left and right direction on the cart.

## Action Space

The action is a `ndarray` with shape `(1,)` which can take values `{0, 1}` indicating the direction
 of the fixed force the cart is pushed with.

- 0: Push cart to the left
- 1: Push cart to the right

**Note**: The velocity that is reduced or increased by the applied force is not fixed and it depends on the angle
 the pole is pointing. The center of gravity of the pole varies the amount of energy needed to move the cart underneath it

## Observation Space

The observation is a `ndarray` with shape `(4,)` with the values corresponding to the following positions and velocities:

| Num | Observation           | Min                 | Max               |
|-----|-----------------------|---------------------|-------------------|
| 0   | Cart Position         | -4.8                | 4.8               |
| 1   | Cart Velocity         | -Inf                | Inf               |
| 2   | Pole Angle            | ~ -0.418 rad (-24°) | ~ 0.418 rad (24°) |
| 3   | Pole Angular Velocity | -Inf                | Inf               |

**Note:** While the ranges above denote the possible values for observation space of each element,
    it is not reflective of the allowed values of the state space in an unterminated episode. Particularly:
-  The cart x-position (index 0) can be take values between `(-4.8, 4.8)`, but the episode terminates
   if the cart leaves the `(-2.4, 2.4)` range.
-  The pole angle can be observed between  `(-.418, .418)` radians (or **±24°**), but the episode terminates
   if the pole angle is not in the range `(-.2095, .2095)` (or **±12°**)

## Rewards

Since the goal is to keep the pole upright for as long as possible, a reward of `+1` for every step taken,
including the termination step, is allotted. The threshold for rewards is 500 for v1 and 200 for v0.

## Starting State

All observations are assigned a uniformly random value in `(-0.05, 0.05)`

## Episode End

The episode ends if any one of the following occurs:

1. Termination: Pole Angle is greater than ±12°
2. Termination: Cart Position is greater than ±2.4 (center of the cart reaches the edge of the display)
3. Truncation: Episode length is greater than 500 (200 for v0)

## Arguments

```python
import gymnasium as gym
gym.make('CartPole-v1')
```

On reset, the `options` parameter allows the user to change the bounds used to determine
the new random state.

---
## CartPoleVectorEnv
```python
from cartpole import CartPoleVectorEnv
```



---
## __init__
```python
from cartpole import __init__
```

Constructor for the vectorized CartPole where the kwargs are applied to the functional environment.

---
## step
```python
from cartpole import step
```



---
## reset
```python
from cartpole import reset
```



---
## render
```python
from cartpole import render
```



---
## close
```python
from cartpole import close
```



---
## verify_number_and_cast
```python
from utils import verify_number_and_cast
```

Verify parameter is a single number and cast to a float.

---
## maybe_parse_reset_bounds
```python
from utils import maybe_parse_reset_bounds
```

This function can be called during a reset() to customize the sampling
ranges for setting the initial state distributions.

Args:
  options: Options passed in to reset().
  default_low: Default lower limit to use, if none specified in options.
  default_high: Default upper limit to use, if none specified in options.

Returns:
  Tuple of the lower and upper limits.

---
## __name__
```python
from mountain_car import __name__
```

http://incompleteideas.net/MountainCar/MountainCar1.cp
permalink: https://perma.cc/6Z2N-PFWC

---
## MountainCarEnv
```python
from mountain_car import MountainCarEnv
```

## Description

The Mountain Car MDP is a deterministic MDP that consists of a car placed stochastically
at the bottom of a sinusoidal valley, with the only possible actions being the accelerations
that can be applied to the car in either direction. The goal of the MDP is to strategically
accelerate the car to reach the goal state on top of the right hill. There are two versions
of the mountain car domain in gymnasium: one with discrete actions and one with continuous.
This version is the one with discrete actions.

This MDP first appeared in [Andrew Moore's PhD Thesis (1990)](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-209.pdf)

```
@TECHREPORT{Moore90efficientmemory-based,
    author = {Andrew William Moore},
    title = {Efficient Memory-based Learning for Robot Control},
    institution = {University of Cambridge},
    year = {1990}
}
```

## Observation Space

The observation is a `ndarray` with shape `(2,)` where the elements correspond to the following:

| Num | Observation                          | Min   | Max  | Unit         |
|-----|--------------------------------------|-------|------|--------------|
| 0   | position of the car along the x-axis | -1.2  | 0.6  | position (m) |
| 1   | velocity of the car                  | -0.07 | 0.07 | velocity (v) |

## Action Space

There are 3 discrete deterministic actions:

- 0: Accelerate to the left
- 1: Don't accelerate
- 2: Accelerate to the right

## Transition Dynamics:

Given an action, the mountain car follows the following transition dynamics:

*velocity<sub>t+1</sub> = velocity<sub>t</sub> + (action - 1) * force - cos(3 * position<sub>t</sub>) * gravity*

*position<sub>t+1</sub> = position<sub>t</sub> + velocity<sub>t+1</sub>*

where force = 0.001 and gravity = 0.0025. The collisions at either end are inelastic with the velocity set to 0
upon collision with the wall. The position is clipped to the range `[-1.2, 0.6]` and
velocity is clipped to the range `[-0.07, 0.07]`.

## Reward:

The goal is to reach the flag placed on top of the right hill as quickly as possible, as such the agent is
penalised with a reward of -1 for each timestep.

## Starting State

The position of the car is assigned a uniform random value in *[-0.6 , -0.4]*.
The starting velocity of the car is always assigned to 0.

## Episode End

The episode ends if either of the following happens:
1. Termination: The position of the car is greater than or equal to 0.5 (the goal position on top of the right hill)
2. Truncation: The length of the episode is 200.


## Arguments

```python
import gymnasium as gym
gym.make('MountainCar-v0')
```

On reset, the `options` parameter allows the user to change the bounds used to determine
the new random state.

## Version History

* v0: Initial versions release (1.0.0)

---
## __init__
```python
from mountain_car import __init__
```



---
## step
```python
from mountain_car import step
```



---
## reset
```python
from mountain_car import reset
```



---
## _height
```python
from mountain_car import _height
```



---
## render
```python
from mountain_car import render
```



---
## get_keys_to_action
```python
from mountain_car import get_keys_to_action
```



---
## close
```python
from mountain_car import close
```



---
## __name__
```python
from acrobot import __name__
```

classic Acrobot task

---
## AcrobotEnv
```python
from acrobot import AcrobotEnv
```

## Description

The Acrobot environment is based on Sutton's work in
["Generalization in Reinforcement Learning: Successful Examples Using Sparse Coarse Coding"](https://papers.nips.cc/paper/1995/hash/8f1d43620bc6bb580df6e80b0dc05c48-Abstract.html)
and [Sutton and Barto's book](http://www.incompleteideas.net/book/the-book-2nd.html).
The system consists of two links connected linearly to form a chain, with one end of
the chain fixed. The joint between the two links is actuated. The goal is to apply
torques on the actuated joint to swing the free end of the linear chain above a
given height while starting from the initial state of hanging downwards.

As seen in the **Gif**: two blue links connected by two green joints. The joint in
between the two links is actuated. The goal is to swing the free end of the outer-link
to reach the target height (black horizontal line above system) by applying torque on
the actuator.

## Action Space

The action is discrete, deterministic, and represents the torque applied on the actuated
joint between the two links.

| Num | Action                                | Unit         |
|-----|---------------------------------------|--------------|
| 0   | apply -1 torque to the actuated joint | torque (N m) |
| 1   | apply 0 torque to the actuated joint  | torque (N m) |
| 2   | apply 1 torque to the actuated joint  | torque (N m) |

## Observation Space

The observation is a `ndarray` with shape `(6,)` that provides information about the
two rotational joint angles as well as their angular velocities:

| Num | Observation                  | Min                 | Max               |
|-----|------------------------------|---------------------|-------------------|
| 0   | Cosine of `theta1`           | -1                  | 1                 |
| 1   | Sine of `theta1`             | -1                  | 1                 |
| 2   | Cosine of `theta2`           | -1                  | 1                 |
| 3   | Sine of `theta2`             | -1                  | 1                 |
| 4   | Angular velocity of `theta1` | ~ -12.567 (-4 * pi) | ~ 12.567 (4 * pi) |
| 5   | Angular velocity of `theta2` | ~ -28.274 (-9 * pi) | ~ 28.274 (9 * pi) |

where
- `theta1` is the angle of the first joint, where an angle of 0 indicates the first link is pointing directly
downwards.
- `theta2` is ***relative to the angle of the first link.***
    An angle of 0 corresponds to having the same angle between the two links.

The angular velocities of `theta1` and `theta2` are bounded at ±4π, and ±9π rad/s respectively.
A state of `[1, 0, 1, 0, ..., ...]` indicates that both links are pointing downwards.

## Rewards

The goal is to have the free end reach a designated target height in as few steps as possible,
and as such all steps that do not reach the goal incur a reward of -1.
Achieving the target height results in termination with a reward of 0. The reward threshold is -100.

## Starting State

Each parameter in the underlying state (`theta1`, `theta2`, and the two angular velocities) is initialized
uniformly between -0.1 and 0.1. This means both links are pointing downwards with some initial stochasticity.

## Episode End

The episode ends if one of the following occurs:
1. Termination: The free end reaches the target height, which is constructed as:
`-cos(theta1) - cos(theta2 + theta1) > 1.0`
2. Truncation: Episode length is greater than 500 (200 for v0)

## Arguments

No additional arguments are currently supported during construction.

```python
import gymnasium as gym
env = gym.make('Acrobot-v1')
```

On reset, the `options` parameter allows the user to change the bounds used to determine
the new random state.

By default, the dynamics of the acrobot follow those described in Sutton and Barto's book
[Reinforcement Learning: An Introduction](http://incompleteideas.net/book/11/node4.html).
However, a `book_or_nips` parameter can be modified to change the pendulum dynamics to those described
in the original [NeurIPS paper](https://papers.nips.cc/paper/1995/hash/8f1d43620bc6bb580df6e80b0dc05c48-Abstract.html).

```python
# To change the dynamics as described above
env.unwrapped.book_or_nips = 'nips'
```

See the following note for details:

> The dynamics equations were missing some terms in the NIPS paper which
        are present in the book. R. Sutton confirmed in personal correspondence
        that the experimental results shown in the paper and the book were
        generated with the equations shown in the book.
        However, there is the option to run the domain with the paper equations
        by setting `book_or_nips = 'nips'`


## Version History

- v1: Maximum number of steps increased from 200 to 500. The observation space for v0 provided direct readings of
`theta1` and `theta2` in radians, having a range of `[-pi, pi]`. The v1 observation space as described here provides the
sine and cosine of each angle instead.
- v0: Initial versions release (1.0.0) (removed from gymnasium for v1)

## References
- Sutton, R. S. (1996). Generalization in Reinforcement Learning: Successful Examples Using Sparse Coarse Coding.
    In D. Touretzky, M. C. Mozer, & M. Hasselmo (Eds.), Advances in Neural Information Processing Systems (Vol. 8).
    MIT Press. https://proceedings.neurips.cc/paper/1995/file/8f1d43620bc6bb580df6e80b0dc05c48-Paper.pdf
- Sutton, R. S., Barto, A. G. (2018 ). Reinforcement Learning: An Introduction. The MIT Press.

---
## wrap
```python
from acrobot import wrap
```

Wraps ``x`` so m <= x <= M; but unlike ``bound()`` which
truncates, ``wrap()`` wraps x around the coordinate system defined by m,M.

For example, m = -180, M = 180 (degrees), x = 360 --> returns 0.

Args:
    x: a scalar
    m: minimum possible value in range
    M: maximum possible value in range

Returns:
    x: a scalar, wrapped

---
## bound
```python
from acrobot import bound
```

Either have m as scalar, so bound(x,m,M) which returns m <= x <= M *OR*
have m as length 2 vector, bound(x,m, <IGNORED>) returns m[0] <= x <= m[1].

Args:
    x: scalar
    m: The lower bound
    M: The upper bound

Returns:
    x: scalar, bound between min (m) and Max (M)

---
## rk4
```python
from acrobot import rk4
```

Integrate 1-D or N-D system of ODEs using 4-th order Runge-Kutta.

Example for 2D system:

    >>> def derivs(x):
    ...     d1 =  x[0] + 2*x[1]
    ...     d2 =  -3*x[0] + 4*x[1]
    ...     return d1, d2

    >>> dt = 0.0005
    >>> t = np.arange(0.0, 2.0, dt)
    >>> y0 = (1,2)
    >>> yout = rk4(derivs, y0, t)

Args:
    derivs: the derivative of the system and has the signature ``dy = derivs(yi)``
    y0: initial state vector
    t: sample times

Returns:
    yout: Runge-Kutta approximation of the ODE

---
## __init__
```python
from acrobot import __init__
```



---
## reset
```python
from acrobot import reset
```



---
## step
```python
from acrobot import step
```



---
## _get_ob
```python
from acrobot import _get_ob
```



---
## _terminal
```python
from acrobot import _terminal
```



---
## _dsdt
```python
from acrobot import _dsdt
```



---
## render
```python
from acrobot import render
```



---
## close
```python
from acrobot import close
```



---
## __name__
```python
from pendulum import __name__
```

Implementation of a Jax-accelerated pendulum environment.

---
## PendulumEnv
```python
from pendulum import PendulumEnv
```

## Description

The inverted pendulum swingup problem is based on the classic problem in control theory.
The system consists of a pendulum attached at one end to a fixed point, and the other end being free.
The pendulum starts in a random position and the goal is to apply torque on the free end to swing it
into an upright position, with its center of gravity right above the fixed point.

The diagram below specifies the coordinate system used for the implementation of the pendulum's
dynamic equations.

![Pendulum Coordinate System](/_static/diagrams/pendulum.png)

-  `x-y`: cartesian coordinates of the pendulum's end in meters.
- `theta` : angle in radians.
- `tau`: torque in `N m`. Defined as positive _counter-clockwise_.

## Action Space

The action is a `ndarray` with shape `(1,)` representing the torque applied to free end of the pendulum.

| Num | Action | Min  | Max |
|-----|--------|------|-----|
| 0   | Torque | -2.0 | 2.0 |


## Observation Space

The observation is a `ndarray` with shape `(3,)` representing the x-y coordinates of the pendulum's free
end and its angular velocity.

| Num | Observation      | Min  | Max |
|-----|------------------|------|-----|
| 0   | x = cos(theta)   | -1.0 | 1.0 |
| 1   | y = sin(theta)   | -1.0 | 1.0 |
| 2   | Angular Velocity | -8.0 | 8.0 |

## Rewards

The reward function is defined as:

*r = -(theta<sup>2</sup> + 0.1 * theta_dt<sup>2</sup> + 0.001 * torque<sup>2</sup>)*

where `theta` is the pendulum's angle normalized between *[-pi, pi]* (with 0 being in the upright position).
Based on the above equation, the minimum reward that can be obtained is
*-(pi<sup>2</sup> + 0.1 * 8<sup>2</sup> + 0.001 * 2<sup>2</sup>) = -16.2736044*,
while the maximum reward is zero (pendulum is upright with zero velocity and no torque applied).

## Starting State

The starting state is a random angle in *[-pi, pi]* and a random angular velocity in *[-1,1]*.

## Episode Truncation

The episode truncates at 200 time steps.

## Arguments

- `g`: acceleration of gravity measured in *(m s<sup>-2</sup>)* used to calculate the pendulum dynamics.
  The default value is g = 10.0 .

```python
import gymnasium as gym
gym.make('Pendulum-v1', g=9.81)
```

On reset, the `options` parameter allows the user to change the bounds used to determine
the new random state.

## Version History

* v1: Simplify the math equations, no difference in behavior.
* v0: Initial versions release (1.0.0)

---
## angle_normalize
```python
from pendulum import angle_normalize
```



---
## __init__
```python
from pendulum import __init__
```

Constructor for the vectorized CartPole where the kwargs are applied to the functional environment.

---
## step
```python
from pendulum import step
```



---
## reset
```python
from pendulum import reset
```



---
## _get_obs
```python
from pendulum import _get_obs
```



---
## render
```python
from pendulum import render
```



---
## close
```python
from pendulum import close
```



---
## __name__
```python
from car_racing import __name__
```



---
## FrictionDetector
```python
from car_racing import FrictionDetector
```



---
## CarRacing
```python
from car_racing import CarRacing
```

## Description
The easiest control task to learn from pixels - a top-down
racing environment. The generated track is random every episode.

Some indicators are shown at the bottom of the window along with the
state RGB buffer. From left to right: true speed, four ABS sensors,
steering wheel position, and gyroscope.
To play yourself (it's rather fast for humans), type:
```
python gymnasium/envs/box2d/car_racing.py
```
Remember: it's a powerful rear-wheel drive car - don't press the accelerator
and turn at the same time.

## Action Space
If continuous there are 3 actions :
- 0: steering, -1 is full left, +1 is full right
- 1: gas
- 2: breaking

If discrete there are 5 actions:
- 0: do nothing
- 1: steer left
- 2: steer right
- 3: gas
- 4: brake

## Observation Space

A top-down 96x96 RGB image of the car and race track.

## Rewards
The reward is -0.1 every frame and +1000/N for every track tile visited,
where N is the total number of tiles visited in the track. For example,
if you have finished in 732 frames, your reward is
1000 - 0.1*732 = 926.8 points.

## Starting State
The car starts at rest in the center of the road.

## Episode Termination
The episode finishes when all the tiles are visited. The car can also go
outside the playfield - that is, far off the track, in which case it will
receive -100 reward and die.

## Arguments
`lap_complete_percent` dictates the percentage of tiles that must be visited by
the agent before a lap is considered complete.

Passing `domain_randomize=True` enables the domain randomized variant of the environment.
In this scenario, the background and track colours are different on every reset.

Passing `continuous=False` converts the environment to use discrete action space.
The discrete action space has 5 actions: [do nothing, left, right, gas, brake].

## Reset Arguments
Passing the option `options["randomize"] = True` will change the current colour of the environment on demand.
Correspondingly, passing the option `options["randomize"] = False` will not change the current colour of the environment.
`domain_randomize` must be `True` on init for this argument to work.
Example usage:
```python
import gymnasium as gym
env = gym.make("CarRacing-v1", domain_randomize=True)

# normal reset, this changes the colour scheme by default
env.reset()

# reset with colour scheme change
env.reset(options={"randomize": True})

# reset with no colour scheme change
env.reset(options={"randomize": False})
```

## Version History
- v1: Change track completion logic and add domain randomization (0.24.0)
- v0: Original version

## References
- Chris Campbell (2014), http://www.iforce2d.net/b2dtut/top-down-car.

## Credits
Created by Oleg Klimov

---
## __init__
```python
from car_racing import __init__
```



---
## BeginContact
```python
from car_racing import BeginContact
```



---
## EndContact
```python
from car_racing import EndContact
```



---
## _contact
```python
from car_racing import _contact
```



---
## _destroy
```python
from car_racing import _destroy
```



---
## _init_colors
```python
from car_racing import _init_colors
```



---
## _reinit_colors
```python
from car_racing import _reinit_colors
```



---
## _create_track
```python
from car_racing import _create_track
```



---
## reset
```python
from car_racing import reset
```



---
## step
```python
from car_racing import step
```



---
## render
```python
from car_racing import render
```



---
## _render
```python
from car_racing import _render
```



---
## _render_road
```python
from car_racing import _render_road
```



---
## _render_indicators
```python
from car_racing import _render_indicators
```



---
## _draw_colored_polygon
```python
from car_racing import _draw_colored_polygon
```



---
## _create_image_array
```python
from car_racing import _create_image_array
```



---
## close
```python
from car_racing import close
```



---
## register_input
```python
from car_racing import register_input
```



---
## vertical_ind
```python
from car_racing import vertical_ind
```



---
## horiz_ind
```python
from car_racing import horiz_ind
```



---
## render_if_min
```python
from car_racing import render_if_min
```



---
## __name__
```python
from bipedal_walker import __name__
```



---
## ContactDetector
```python
from bipedal_walker import ContactDetector
```



---
## BipedalWalker
```python
from bipedal_walker import BipedalWalker
```

## Description
This is a simple 4-joint walker robot environment.
There are two versions:
- Normal, with slightly uneven terrain.
- Hardcore, with ladders, stumps, pitfalls.

To solve the normal version, you need to get 300 points in 1600 time steps.
To solve the hardcore version, you need 300 points in 2000 time steps.

A heuristic is provided for testing. It's also useful to get demonstrations
to learn from. To run the heuristic:
```
python gymnasium/envs/box2d/bipedal_walker.py
```

## Action Space
Actions are motor speed values in the [-1, 1] range for each of the
4 joints at both hips and knees.

## Observation Space
State consists of hull angle speed, angular velocity, horizontal speed,
vertical speed, position of joints and joints angular speed, legs contact
with ground, and 10 lidar rangefinder measurements. There are no coordinates
in the state vector.

## Rewards
Reward is given for moving forward, totaling 300+ points up to the far end.
If the robot falls, it gets -100. Applying motor torque costs a small
amount of points. A more optimal agent will get a better score.

## Starting State
The walker starts standing at the left end of the terrain with the hull
horizontal, and both legs in the same position with a slight knee angle.

## Episode Termination
The episode will terminate if the hull gets in contact with the ground or
if the walker exceeds the right end of the terrain length.

## Arguments
To use to the _hardcore_ environment, you need to specify the
`hardcore=True` argument like below:
```python
import gymnasium as gym
env = gym.make("BipedalWalker-v3", hardcore=True)
```

## Version History
- v3: Returns the closest lidar trace instead of furthest;
    faster video recording
- v2: Count energy spent
- v1: Legs now report contact with ground; motors have higher torque and
    speed; ground has higher friction; lidar rendered less nervously.
- v0: Initial version


<!-- ## References -->

## Credits
Created by Oleg Klimov

---
## BipedalWalkerHardcore
```python
from bipedal_walker import BipedalWalkerHardcore
```



---
## __init__
```python
from bipedal_walker import __init__
```



---
## BeginContact
```python
from bipedal_walker import BeginContact
```



---
## EndContact
```python
from bipedal_walker import EndContact
```



---
## _destroy
```python
from bipedal_walker import _destroy
```



---
## _generate_terrain
```python
from bipedal_walker import _generate_terrain
```



---
## _generate_clouds
```python
from bipedal_walker import _generate_clouds
```



---
## reset
```python
from bipedal_walker import reset
```



---
## step
```python
from bipedal_walker import step
```



---
## render
```python
from bipedal_walker import render
```



---
## close
```python
from bipedal_walker import close
```



---
## LidarCallback
```python
from bipedal_walker import LidarCallback
```



---
## ReportFixture
```python
from bipedal_walker import ReportFixture
```



---
## __name__
```python
from lunar_lander import __name__
```



---
## ContactDetector
```python
from lunar_lander import ContactDetector
```



---
## LunarLander
```python
from lunar_lander import LunarLander
```

## Description
This environment is a classic rocket trajectory optimization problem.
According to Pontryagin's maximum principle, it is optimal to fire the
engine at full throttle or turn it off. This is the reason why this
environment has discrete actions: engine on or off.

There are two environment versions: discrete or continuous.
The landing pad is always at coordinates (0,0). The coordinates are the
first two numbers in the state vector.
Landing outside of the landing pad is possible. Fuel is infinite, so an agent
can learn to fly and then land on its first attempt.

To see a heuristic landing, run:
```
python gymnasium/envs/box2d/lunar_lander.py
```
<!-- To play yourself, run: -->
<!-- python examples/agents/keyboard_agent.py LunarLander-v2 -->

## Action Space
There are four discrete actions available:
- 0: do nothing
- 1: fire left orientation engine
- 2: fire main engine
- 3: fire right orientation engine

## Observation Space
The state is an 8-dimensional vector: the coordinates of the lander in `x` & `y`, its linear
velocities in `x` & `y`, its angle, its angular velocity, and two booleans
that represent whether each leg is in contact with the ground or not.

## Rewards
After every step a reward is granted. The total reward of an episode is the
sum of the rewards for all the steps within that episode.

For each step, the reward:
- is increased/decreased the closer/further the lander is to the landing pad.
- is increased/decreased the slower/faster the lander is moving.
- is decreased the more the lander is tilted (angle not horizontal).
- is increased by 10 points for each leg that is in contact with the ground.
- is decreased by 0.03 points each frame a side engine is firing.
- is decreased by 0.3 points each frame the main engine is firing.

The episode receive an additional reward of -100 or +100 points for crashing or landing safely respectively.

An episode is considered a solution if it scores at least 200 points.

## Starting State
The lander starts at the top center of the viewport with a random initial
force applied to its center of mass.

## Episode Termination
The episode finishes if:
1) the lander crashes (the lander body gets in contact with the moon);
2) the lander gets outside of the viewport (`x` coordinate is greater than 1);
3) the lander is not awake. From the [Box2D docs](https://box2d.org/documentation/md__d_1__git_hub_box2d_docs_dynamics.html#autotoc_md61),
    a body which is not awake is a body which doesn't move and doesn't
    collide with any other body:
> When Box2D determines that a body (or group of bodies) has come to rest,
> the body enters a sleep state which has very little CPU overhead. If a
> body is awake and collides with a sleeping body, then the sleeping body
> wakes up. Bodies will also wake up if a joint or contact attached to
> them is destroyed.

## Arguments
To use to the _continuous_ environment, you need to specify the
`continuous=True` argument like below:
```python
import gymnasium as gym
env = gym.make(
    "LunarLander-v2",
    continuous: bool = False,
    gravity: float = -10.0,
    enable_wind: bool = False,
    wind_power: float = 15.0,
    turbulence_power: float = 1.5,
)
```
If `continuous=True` is passed, continuous actions (corresponding to the throttle of the engines) will be used and the
action space will be `Box(-1, +1, (2,), dtype=np.float32)`.
The first coordinate of an action determines the throttle of the main engine, while the second
coordinate specifies the throttle of the lateral boosters.
Given an action `np.array([main, lateral])`, the main engine will be turned off completely if
`main < 0` and the throttle scales affinely from 50% to 100% for `0 <= main <= 1` (in particular, the
main engine doesn't work  with less than 50% power).
Similarly, if `-0.5 < lateral < 0.5`, the lateral boosters will not fire at all. If `lateral < -0.5`, the left
booster will fire, and if `lateral > 0.5`, the right booster will fire. Again, the throttle scales affinely
from 50% to 100% between -1 and -0.5 (and 0.5 and 1, respectively).

`gravity` dictates the gravitational constant, this is bounded to be within 0 and -12.

If `enable_wind=True` is passed, there will be wind effects applied to the lander.
The wind is generated using the function `tanh(sin(2 k (t+C)) + sin(pi k (t+C)))`.
`k` is set to 0.01.
`C` is sampled randomly between -9999 and 9999.

`wind_power` dictates the maximum magnitude of linear wind applied to the craft. The recommended value for `wind_power` is between 0.0 and 20.0.
`turbulence_power` dictates the maximum magnitude of rotational wind applied to the craft. The recommended value for `turbulence_power` is between 0.0 and 2.0.

## Version History
- v2: Count energy spent and in v0.24, added turbulence with wind power and turbulence_power parameters
- v1: Legs contact with ground added in state vector; contact with ground
    give +10 reward points, and -10 if then lose contact; reward
    renormalized to 200; harder initial random push.
- v0: Initial version


## Notes

There are several unexpected bugs with the implementation of the environment.

1. The position of the side thursters on the body of the lander changes, depending on the orientation of the lander.
This in turn results in an orientation depentant torque being applied to the lander.

2. The units of the state are not consistent. I.e.
* The angular velocity is in units of 0.4 radians per second. In order to convert to radians per second, the value needs to be multiplied by a factor of 2.5.

For the default values of VIEWPORT_W, VIEWPORT_H, SCALE, and FPS, the scale factors equal:
'x': 10
'y': 6.666
'vx': 5
'vy': 7.5
'angle': 1
'angular velocity': 2.5

After the correction has been made, the units of the state are as follows:
'x': (units)
'y': (units)
'vx': (units/second)
'vy': (units/second)
'angle': (radians)
'angular velocity': (radians/second)


<!-- ## References -->

## Credits
Created by Oleg Klimov

---
## heuristic
```python
from lunar_lander import heuristic
```

The heuristic for
1. Testing
2. Demonstration rollout.

Args:
    env: The environment
    s (list): The state. Attributes:
        s[0] is the horizontal coordinate
        s[1] is the vertical coordinate
        s[2] is the horizontal speed
        s[3] is the vertical speed
        s[4] is the angle
        s[5] is the angular speed
        s[6] 1 if first leg has contact, else 0
        s[7] 1 if second leg has contact, else 0

Returns:
     a: The heuristic to be fed into the step function defined above to determine the next step and reward.

---
## demo_heuristic_lander
```python
from lunar_lander import demo_heuristic_lander
```



---
## LunarLanderContinuous
```python
from lunar_lander import LunarLanderContinuous
```



---
## __init__
```python
from lunar_lander import __init__
```



---
## BeginContact
```python
from lunar_lander import BeginContact
```



---
## EndContact
```python
from lunar_lander import EndContact
```



---
## _destroy
```python
from lunar_lander import _destroy
```



---
## reset
```python
from lunar_lander import reset
```



---
## _create_particle
```python
from lunar_lander import _create_particle
```



---
## _clean_particles
```python
from lunar_lander import _clean_particles
```



---
## step
```python
from lunar_lander import step
```



---
## render
```python
from lunar_lander import render
```



---
## close
```python
from lunar_lander import close
```



---
## __name__
```python
from car_dynamics import __name__
```

Top-down car dynamics simulation.

Some ideas are taken from this great tutorial http://www.iforce2d.net/b2dtut/top-down-car by Chris Campbell.
This simulation is a bit more detailed, with wheels rotation.

Created by Oleg Klimov

---
## Car
```python
from car_dynamics import Car
```



---
## __init__
```python
from car_dynamics import __init__
```



---
## gas
```python
from car_dynamics import gas
```

control: rear wheel drive

Args:
    gas (float): How much gas gets applied. Gets clipped between 0 and 1.

---
## brake
```python
from car_dynamics import brake
```

control: brake

Args:
    b (0..1): Degree to which the brakes are applied. More than 0.9 blocks the wheels to zero rotation

---
## steer
```python
from car_dynamics import steer
```

control: steer

Args:
    s (-1..1): target position, it takes time to rotate steering wheel from side-to-side

---
## step
```python
from car_dynamics import step
```



---
## draw
```python
from car_dynamics import draw
```



---
## _create_particle
```python
from car_dynamics import _create_particle
```



---
## destroy
```python
from car_dynamics import destroy
```



---
## Particle
```python
from car_dynamics import Particle
```



---
## CartPoleFunctional
```python
from cartpole import CartPoleFunctional
```

Cartpole but in jax and functional.

Example:
    >>> import jax
    >>> import jax.numpy as jnp
    >>> from gymnasium.envs.phys2d.cartpole import CartPoleFunctional
    >>> key = jax.random.PRNGKey(0)
    >>> env = CartPoleFunctional({"x_init": 0.5})
    >>> state = env.initial(key)
    >>> print(state)
    [ 0.46532142 -0.27484107  0.13302994 -0.20361817]
    >>> print(env.transition(state, 0))
    [ 0.4598246  -0.6357784   0.12895757  0.1278053 ]
    >>> env.transform(jax.jit)
    >>> state = env.initial(key)
    >>> print(state)
    [ 0.46532142 -0.27484107  0.13302994 -0.20361817]
    >>> print(env.transition(state, 0))
    [ 0.4598246  -0.6357784   0.12895757  0.12780523]
    >>> vkey = jax.random.split(key, 10)
    >>> env.transform(jax.vmap)
    >>> vstate = env.initial(vkey)
    >>> print(vstate)
    [[ 0.25117755 -0.03159595  0.09428263  0.12404168]
     [ 0.231457    0.41420317 -0.13484478  0.29151905]
     [-0.11706758 -0.37130308  0.13587534  0.33141208]
     [-0.4613737   0.36557996  0.3950702   0.3639989 ]
     [-0.14707637 -0.34273267 -0.32374108 -0.48110402]
     [-0.45774353  0.3633288  -0.3157575  -0.03586268]
     [ 0.37344885 -0.279778   -0.33894253  0.07415426]
     [-0.20234215  0.39775252 -0.2556088   0.32877135]
     [-0.2572986  -0.29943776 -0.45600426 -0.35740316]
     [ 0.05436695  0.35021234 -0.36484408  0.2805779 ]]
    >>> print(env.transition(vstate, jnp.array([0 for _ in range(10)])))
    [[ 0.25054562 -0.38763174  0.09676346  0.4448946 ]
     [ 0.23974106  0.09849604 -0.1290144   0.5390002 ]
     [-0.12449364 -0.7323911   0.14250359  0.6634313 ]
     [-0.45406207 -0.01028753  0.4023502   0.7505522 ]
     [-0.15393102 -0.6168968  -0.33336315 -0.30407968]
     [-0.45047694  0.08870795 -0.31647477  0.14311607]
     [ 0.36785328 -0.54895645 -0.33745944  0.24393772]
     [-0.19438711  0.10855066 -0.24903338  0.5316877 ]
     [-0.26328734 -0.5420943  -0.46315232 -0.2344252 ]
     [ 0.06137119  0.08665388 -0.35923252  0.4403924 ]]

---
## CartPoleJaxEnv
```python
from cartpole import CartPoleJaxEnv
```

Jax-based implementation of the CartPole environment.

---
## CartPoleJaxVectorEnv
```python
from cartpole import CartPoleJaxVectorEnv
```

Jax-based implementation of the vectorized CartPole environment.

---
## initial
```python
from cartpole import initial
```

Initial state generation.

---
## transition
```python
from cartpole import transition
```

Cartpole transition.

---
## observation
```python
from cartpole import observation
```

Cartpole observation.

---
## terminal
```python
from cartpole import terminal
```

Checks if the state is terminal.

---
## reward
```python
from cartpole import reward
```

Computes the reward for the state transition using the action.

---
## render_image
```python
from cartpole import render_image
```

Renders an image of the state using the render state.

---
## render_init
```python
from cartpole import render_init
```

Initialises the render state for a screen width and height.

---
## render_close
```python
from cartpole import render_close
```

Closes the render state.

---
## PendulumFunctional
```python
from pendulum import PendulumFunctional
```

Pendulum but in jax and functional structure.

---
## PendulumJaxEnv
```python
from pendulum import PendulumJaxEnv
```

Jax-based pendulum environment using the functional version as base.

---
## PendulumJaxVectorEnv
```python
from pendulum import PendulumJaxVectorEnv
```

Jax-based implementation of the vectorized CartPole environment.

---
## initial
```python
from pendulum import initial
```

Initial state generation.

---
## transition
```python
from pendulum import transition
```

Pendulum transition.

---
## observation
```python
from pendulum import observation
```

Generates an observation based on the state.

---
## reward
```python
from pendulum import reward
```

Generates the reward based on the state, action and next state.

---
## terminal
```python
from pendulum import terminal
```

Determines if the state is a terminal state.

---
## render_image
```python
from pendulum import render_image
```

Renders an RGB image.

---
## render_init
```python
from pendulum import render_init
```

Initialises the render state.

---
## render_close
```python
from pendulum import render_close
```

Closes the render state.

---
## __name__
```python
from numpy_utils import __name__
```

Numpy utility functions: concatenate space samples and create empty array.

---
## concatenate
```python
from numpy_utils import concatenate
```

Concatenate multiple samples from space into a single object.

Args:
    space: Observation space of a single environment in the vectorized environment.
    items: Samples to be concatenated.
    out: The output object. This object is a (possibly nested) numpy array.

Returns:
    The output object. This object is a (possibly nested) numpy array.

Raises:
    ValueError: Space is not a valid :class:`gym.Space` instance

Example:
    >>> from gymnasium.spaces import Box
    >>> import numpy as np
    >>> space = Box(low=0, high=1, shape=(3,), seed=42, dtype=np.float32)
    >>> out = np.zeros((2, 3), dtype=np.float32)
    >>> items = [space.sample() for _ in range(2)]
    >>> concatenate(space, items, out)
    array([[0.77395606, 0.43887845, 0.85859793],
           [0.697368  , 0.09417735, 0.97562236]], dtype=float32)

---
## _concatenate_base
```python
from numpy_utils import _concatenate_base
```



---
## _concatenate_tuple
```python
from numpy_utils import _concatenate_tuple
```



---
## _concatenate_dict
```python
from numpy_utils import _concatenate_dict
```



---
## _concatenate_custom
```python
from numpy_utils import _concatenate_custom
```



---
## create_empty_array
```python
from numpy_utils import create_empty_array
```

Create an empty (possibly nested) numpy array.

Args:
    space: Observation space of a single environment in the vectorized environment.
    n: Number of environments in the vectorized environment. If `None`, creates an empty sample from `space`.
    fn: Function to apply when creating the empty numpy array. Examples of such functions are `np.empty` or `np.zeros`.

Returns:
    The output object. This object is a (possibly nested) numpy array.

Raises:
    ValueError: Space is not a valid :class:`gym.Space` instance

Example:
    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ... 'position': Box(low=0, high=1, shape=(3,), dtype=np.float32),
    ... 'velocity': Box(low=0, high=1, shape=(2,), dtype=np.float32)})
    >>> create_empty_array(space, n=2, fn=np.zeros)
    OrderedDict([('position', array([[0., 0., 0.],
           [0., 0., 0.]], dtype=float32)), ('velocity', array([[0., 0.],
           [0., 0.]], dtype=float32))])

---
## _create_empty_array_base
```python
from numpy_utils import _create_empty_array_base
```



---
## _create_empty_array_tuple
```python
from numpy_utils import _create_empty_array_tuple
```



---
## _create_empty_array_dict
```python
from numpy_utils import _create_empty_array_dict
```



---
## _create_empty_array_custom
```python
from numpy_utils import _create_empty_array_custom
```



---
## __name__
```python
from spaces import __name__
```

Utility functions for gymnasium spaces: batch space and iterator.

---
## batch_space
```python
from spaces import batch_space
```

Create a (batched) space, containing multiple copies of a single space.

Args:
    space: Space (e.g. the observation space) for a single environment in the vectorized environment.
    n: Number of environments in the vectorized environment.

Returns:
    Space (e.g. the observation space) for a batch of environments in the vectorized environment.

Raises:
    ValueError: Cannot batch space that is not a valid :class:`gym.Space` instance

Example:
    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ...     'position': Box(low=0, high=1, shape=(3,), dtype=np.float32),
    ...     'velocity': Box(low=0, high=1, shape=(2,), dtype=np.float32)
    ... })
    >>> batch_space(space, n=5)
    Dict('position': Box(0.0, 1.0, (5, 3), float32), 'velocity': Box(0.0, 1.0, (5, 2), float32))

---
## _batch_space_box
```python
from spaces import _batch_space_box
```



---
## _batch_space_discrete
```python
from spaces import _batch_space_discrete
```



---
## _batch_space_multidiscrete
```python
from spaces import _batch_space_multidiscrete
```



---
## _batch_space_multibinary
```python
from spaces import _batch_space_multibinary
```



---
## _batch_space_tuple
```python
from spaces import _batch_space_tuple
```



---
## _batch_space_dict
```python
from spaces import _batch_space_dict
```



---
## _batch_space_custom
```python
from spaces import _batch_space_custom
```



---
## iterate
```python
from spaces import iterate
```

Iterate over the elements of a (batched) space.

Args:
    space: Space to which `items` belong to.
    items: Items to be iterated over.

Returns:
    Iterator over the elements in `items`.

Raises:
    ValueError: Space is not an instance of :class:`gym.Space`

Example:
    >>> from gymnasium.spaces import Box, Dict
    >>> import numpy as np
    >>> space = Dict({
    ... 'position': Box(low=0, high=1, shape=(2, 3), seed=42, dtype=np.float32),
    ... 'velocity': Box(low=0, high=1, shape=(2, 2), seed=42, dtype=np.float32)})
    >>> items = space.sample()
    >>> it = iterate(space, items)
    >>> next(it)
    OrderedDict([('position', array([0.77395606, 0.43887845, 0.85859793], dtype=float32)), ('velocity', array([0.77395606, 0.43887845], dtype=float32))])
    >>> next(it)
    OrderedDict([('position', array([0.697368  , 0.09417735, 0.97562236], dtype=float32)), ('velocity', array([0.85859793, 0.697368  ], dtype=float32))])
    >>> next(it)
    Traceback (most recent call last):
        ...
    StopIteration

---
## _iterate_discrete
```python
from spaces import _iterate_discrete
```



---
## _iterate_base
```python
from spaces import _iterate_base
```



---
## _iterate_tuple
```python
from spaces import _iterate_tuple
```



---
## _iterate_dict
```python
from spaces import _iterate_dict
```



---
## _iterate_custom
```python
from spaces import _iterate_custom
```



---
## unicode_normalizer_from_str
```python
from __init__ import unicode_normalizer_from_str
```



---
## __name__
```python
from visualizer import __name__
```



---
## Annotation
```python
from visualizer import Annotation
```



---
## CharStateKey
```python
from visualizer import CharStateKey
```



---
## CharState
```python
from visualizer import CharState
```



---
## Aligned
```python
from visualizer import Aligned
```



---
## EncodingVisualizer
```python
from visualizer import EncodingVisualizer
```

Build an EncodingVisualizer

Args:

     tokenizer (:class:`~tokenizers.Tokenizer`):
        A tokenizer instance

     default_to_notebook (:obj:`bool`):
        Whether to render html output in a notebook by default

     annotation_converter (:obj:`Callable`, `optional`):
        An optional (lambda) function that takes an annotation in any format and returns
        an Annotation object

---
## HTMLBody
```python
from visualizer import HTMLBody
```

Generates the full html with css from a list of html spans

Args:
    children (:obj:`List[str]`):
        A list of strings, assumed to be html elements

    css_styles (:obj:`str`, `optional`):
        Optional alternative implementation of the css

Returns:
    :obj:`str`: An HTML string with style markup

---
## __init__
```python
from visualizer import __init__
```



---
## token_ix
```python
from visualizer import token_ix
```



---
## is_multitoken
```python
from visualizer import is_multitoken
```

BPE tokenizers can output more than one token for a char

---
## partition_key
```python
from visualizer import partition_key
```



---
## __call__
```python
from visualizer import __call__
```

Build a visualization of the given text

Args:
    text (:obj:`str`):
        The text to tokenize

    annotations (:obj:`List[Annotation]`, `optional`):
        An optional list of annotations of the text. The can either be an annotation class
        or anything else if you instantiated the visualizer with a converter function

    default_to_notebook (:obj:`bool`, `optional`, defaults to `False`):
        If True, will render the html in a notebook. Otherwise returns an html string.

Returns:
    The HTML string if default_to_notebook is False, otherwise (default) returns None and
    renders the HTML in the notebook

---
## calculate_label_colors
```python
from visualizer import calculate_label_colors
```

Generates a color palette for all the labels in a given set of annotations

Args:
  annotations (:obj:`Annotation`):
    A list of annotations

Returns:
    :obj:`dict`: A dictionary mapping labels to colors in HSL format

---
## consecutive_chars_to_html
```python
from visualizer import consecutive_chars_to_html
```

Converts a list of "consecutive chars" into a single HTML element.
Chars are consecutive if they fall under the same word, token and annotation.
The CharState class is a named tuple with a "partition_key" method that makes it easy to
compare if two chars are consecutive.

Args:
    consecutive_chars_list (:obj:`List[CharState]`):
        A list of CharStates that have been grouped together

    text (:obj:`str`):
        The original text being processed

    encoding (:class:`~tokenizers.Encoding`):
        The encoding returned from the tokenizer

Returns:
    :obj:`str`: The HTML span for a set of consecutive chars

---
## __make_html
```python
from visualizer import __make_html
```



---
## __make_anno_map
```python
from visualizer import __make_anno_map
```

Args:
    text (:obj:`str`):
        The raw text we want to align to

    annotations (:obj:`AnnotationList`):
        A (possibly empty) list of annotations

Returns:
    A list of  length len(text) whose entry at index i is None if there is no annotation on
    charachter i or k, the index of the annotation that covers index i where k is with
    respect to the list of annotations

---
## __make_char_states
```python
from visualizer import __make_char_states
```

For each character in the original text, we emit a tuple representing it's "state":

    * which token_ix it corresponds to
    * which word_ix it corresponds to
    * which annotation_ix it corresponds to

Args:
    text (:obj:`str`):
        The raw text we want to align to

    annotations (:obj:`List[Annotation]`):
        A (possibly empty) list of annotations

    encoding: (:class:`~tokenizers.Encoding`):
        The encoding returned from the tokenizer

Returns:
    :obj:`List[CharState]`: A list of CharStates, indicating for each char in the text what
    it's state is

---
## __name__
```python
from byte_level_bpe import __name__
```



---
## ByteLevelBPETokenizer
```python
from byte_level_bpe import ByteLevelBPETokenizer
```

ByteLevelBPETokenizer

Represents a Byte-level BPE as introduced by OpenAI with their GPT-2 model

---
## __init__
```python
from byte_level_bpe import __init__
```



---
## from_file
```python
from byte_level_bpe import from_file
```



---
## train
```python
from byte_level_bpe import train
```

Train the model using the given files

---
## train_from_iterator
```python
from byte_level_bpe import train_from_iterator
```

Train the model using the given iterator

---
## __name__
```python
from sentencepiece_unigram import __name__
```



---
## SentencePieceUnigramTokenizer
```python
from sentencepiece_unigram import SentencePieceUnigramTokenizer
```

SentencePiece Unigram Tokenizer

Represents the Unigram algorithm, with the pretokenization used by SentencePiece

---
## __init__
```python
from sentencepiece_unigram import __init__
```



---
## train
```python
from sentencepiece_unigram import train
```

Train the model using the given files

Args:
    files (:obj:`List[str]`):
        A list of path to the files that we should use for training
    vocab_size (:obj:`int`):
        The size of the final vocabulary, including all tokens and alphabet.
    show_progress (:obj:`bool`):
        Whether to show progress bars while training.
    special_tokens (:obj:`List[Union[str, AddedToken]]`, `optional`):
        A list of special tokens the model should know of.
    initial_alphabet (:obj:`List[str]`, `optional`):
        A list of characters to include in the initial alphabet, even
        if not seen in the training dataset.
        If the strings contain more than one character, only the first one
        is kept.
    unk_token (:obj:`str`, `optional`):
        The unknown token to be used by the model.

---
## train_from_iterator
```python
from sentencepiece_unigram import train_from_iterator
```

Train the model using the given iterator

Args:
    iterator (:obj:`Union[Iterator[str], Iterator[Iterator[str]]]`):
        Any iterator over strings or list of strings
    vocab_size (:obj:`int`):
        The size of the final vocabulary, including all tokens and alphabet.
    show_progress (:obj:`bool`):
        Whether to show progress bars while training.
    special_tokens (:obj:`List[Union[str, AddedToken]]`, `optional`):
        A list of special tokens the model should know of.
    initial_alphabet (:obj:`List[str]`, `optional`):
        A list of characters to include in the initial alphabet, even
        if not seen in the training dataset.
        If the strings contain more than one character, only the first one
        is kept.
    unk_token (:obj:`str`, `optional`):
        The unknown token to be used by the model.
    length (:obj:`int`, `optional`):
        The total number of sequences in the iterator. This is used to
        provide meaningful progress tracking

---
## from_spm
```python
from sentencepiece_unigram import from_spm
```



---
## __name__
```python
from sentencepiece_bpe import __name__
```



---
## SentencePieceBPETokenizer
```python
from sentencepiece_bpe import SentencePieceBPETokenizer
```

SentencePiece BPE Tokenizer

Represents the BPE algorithm, with the pretokenization used by SentencePiece

---
## __init__
```python
from sentencepiece_bpe import __init__
```



---
## from_file
```python
from sentencepiece_bpe import from_file
```



---
## train
```python
from sentencepiece_bpe import train
```

Train the model using the given files

---
## train_from_iterator
```python
from sentencepiece_bpe import train_from_iterator
```

Train the model using the given iterator

---
## __name__
```python
from base_tokenizer import __name__
```



---
## BaseTokenizer
```python
from base_tokenizer import BaseTokenizer
```



---
## __init__
```python
from base_tokenizer import __init__
```



---
## __repr__
```python
from base_tokenizer import __repr__
```



---
## num_special_tokens_to_add
```python
from base_tokenizer import num_special_tokens_to_add
```

Return the number of special tokens that would be added for single/pair sentences.
:param is_pair: Boolean indicating if the input would be a single sentence or a pair
:return:

---
## get_vocab
```python
from base_tokenizer import get_vocab
```

Returns the vocabulary

Args:
    with_added_tokens: boolean:
        Whether to include the added tokens in the vocabulary

Returns:
    The vocabulary

---
## get_added_tokens_decoder
```python
from base_tokenizer import get_added_tokens_decoder
```

Returns the added reverse vocabulary

Returns:
    The added vocabulary mapping ints to AddedTokens

---
## get_vocab_size
```python
from base_tokenizer import get_vocab_size
```

Return the size of vocabulary, with or without added tokens.

Args:
    with_added_tokens: (`optional`) bool:
        Whether to count in added special tokens or not

Returns:
    Size of vocabulary

---
## enable_padding
```python
from base_tokenizer import enable_padding
```

Change the padding strategy

Args:
    direction: (`optional`) str:
        Can be one of: `right` or `left`

    pad_to_multiple_of: (`optional`) unsigned int:
        If specified, the padding length should always snap to the next multiple of
        the given value. For example if we were going to pad with a length of 250 but
        `pad_to_multiple_of=8` then we will pad to 256.

    pad_id: (`optional`) unsigned int:
        The indice to be used when padding

    pad_type_id: (`optional`) unsigned int:
        The type indice to be used when padding

    pad_token: (`optional`) str:
        The pad token to be used when padding

    length: (`optional`) unsigned int:
        If specified, the length at which to pad. If not specified
        we pad using the size of the longest sequence in a batch

---
## no_padding
```python
from base_tokenizer import no_padding
```

Disable padding

---
## padding
```python
from base_tokenizer import padding
```

Get the current padding parameters

Returns:
    None if padding is disabled, a dict with the currently set parameters
    if the padding is enabled.

---
## enable_truncation
```python
from base_tokenizer import enable_truncation
```

Change the truncation options

Args:
    max_length: unsigned int:
        The maximum length at which to truncate

    stride: (`optional`) unsigned int:
        The length of the previous first sequence to be included
        in the overflowing sequence

    strategy: (`optional`) str:
        Can be one of `longest_first`, `only_first` or `only_second`

---
## no_truncation
```python
from base_tokenizer import no_truncation
```

Disable truncation

---
## truncation
```python
from base_tokenizer import truncation
```

Get the current truncation parameters

Returns:
    None if truncation is disabled, a dict with the current truncation parameters if
    truncation is enabled

---
## add_tokens
```python
from base_tokenizer import add_tokens
```

Add the given tokens to the vocabulary

Args:
    tokens: List[Union[str, AddedToken]]:
        A list of tokens to add to the vocabulary. Each token can either be
        a string, or an instance of AddedToken

Returns:
    The number of tokens that were added to the vocabulary

---
## add_special_tokens
```python
from base_tokenizer import add_special_tokens
```

Add the given special tokens to the vocabulary, and treat them as special tokens.

The special tokens will never be processed by the model, and will be
removed while decoding.

Args:
    tokens: List[Union[str, AddedToken]]:
        A list of special tokens to add to the vocabulary. Each token can either be
        a string, or an instance of AddedToken

Returns:
    The number of tokens that were added to the vocabulary

---
## normalize
```python
from base_tokenizer import normalize
```

Normalize the given sequence

Args:
    sequence: str:
        The sequence to normalize

Returns:
    The normalized string

---
## encode
```python
from base_tokenizer import encode
```

Encode the given sequence and pair. This method can process raw text sequences as well
as already pre-tokenized sequences.

Args:
    sequence: InputSequence:
        The sequence we want to encode. This sequence can be either raw text or
        pre-tokenized, according to the `is_pretokenized` argument:

        - If `is_pretokenized=False`: `InputSequence` is expected to be `str`
        - If `is_pretokenized=True`: `InputSequence` is expected to be
            `Union[List[str], Tuple[str]]`

    is_pretokenized: bool:
        Whether the input is already pre-tokenized.

    add_special_tokens: bool:
        Whether to add the special tokens while encoding.

Returns:
    An Encoding

---
## encode_batch
```python
from base_tokenizer import encode_batch
```

Encode the given inputs. This method accept both raw text sequences as well as already
pre-tokenized sequences.

Args:
    inputs: List[EncodeInput]:
        A list of single sequences or pair sequences to encode. Each `EncodeInput` is
        expected to be of the following form:
            `Union[InputSequence, Tuple[InputSequence, InputSequence]]`

        Each `InputSequence` can either be raw text or pre-tokenized,
        according to the `is_pretokenized` argument:

        - If `is_pretokenized=False`: `InputSequence` is expected to be `str`
        - If `is_pretokenized=True`: `InputSequence` is expected to be
            `Union[List[str], Tuple[str]]`

    is_pretokenized: bool:
        Whether the input is already pre-tokenized.

    add_special_tokens: bool:
        Whether to add the special tokens while encoding.

Returns:
    A list of Encoding

---
## decode
```python
from base_tokenizer import decode
```

Decode the given list of ids to a string sequence

Args:
    ids: List[unsigned int]:
        A list of ids to be decoded

    skip_special_tokens: (`optional`) boolean:
        Whether to remove all the special tokens from the output string

Returns:
    The decoded string

---
## decode_batch
```python
from base_tokenizer import decode_batch
```

Decode the list of sequences to a list of string sequences

Args:
    sequences: List[List[unsigned int]]:
        A list of sequence of ids to be decoded

    skip_special_tokens: (`optional`) boolean:
        Whether to remove all the special tokens from the output strings

Returns:
    A list of decoded strings

---
## token_to_id
```python
from base_tokenizer import token_to_id
```

Convert the given token to its corresponding id

Args:
    token: str:
        The token to convert

Returns:
    The corresponding id if it exists, None otherwise

---
## id_to_token
```python
from base_tokenizer import id_to_token
```

Convert the given token id to its corresponding string

Args:
    token: id:
        The token id to convert

Returns:
    The corresponding string if it exists, None otherwise

---
## save_model
```python
from base_tokenizer import save_model
```

Save the current model to the given directory

Args:
    directory: str:
        A path to the destination directory

    prefix: (Optional) str:
        An optional prefix, used to prefix each file name

---
## save
```python
from base_tokenizer import save
```

Save the current Tokenizer at the given path

Args:
    path: str:
        A path to the destination Tokenizer file

---
## to_str
```python
from base_tokenizer import to_str
```

Get a serialized JSON version of the Tokenizer as a str

Args:
    pretty: bool:
        Whether the JSON string should be prettified

Returns:
    str

---
## post_process
```python
from base_tokenizer import post_process
```

Apply all the post-processing steps to the given encodings.

The various steps are:
    1. Truncate according to global params (provided to `enable_truncation`)
    2. Apply the PostProcessor
    3. Pad according to global params. (provided to `enable_padding`)

Args:
    encoding: Encoding:
        The main Encoding to post process

    pair: Optional[Encoding]:
        An optional pair Encoding

    add_special_tokens: bool:
        Whether to add special tokens

Returns:
    The resulting Encoding

---
## model
```python
from base_tokenizer import model
```



---
## normalizer
```python
from base_tokenizer import normalizer
```



---
## pre_tokenizer
```python
from base_tokenizer import pre_tokenizer
```



---
## post_processor
```python
from base_tokenizer import post_processor
```



---
## decoder
```python
from base_tokenizer import decoder
```



---
## __name__
```python
from char_level_bpe import __name__
```



---
## CharBPETokenizer
```python
from char_level_bpe import CharBPETokenizer
```

Original BPE Tokenizer

Represents the BPE algorithm, as introduced by Rico Sennrich
(https://arxiv.org/abs/1508.07909)

The defaults settings corresponds to OpenAI GPT BPE tokenizers and differs from the original
Sennrich subword-nmt implementation by the following options that you can deactivate:
    - adding a normalizer to clean up the text (deactivate with `bert_normalizer=False`) by:
        * removing any control characters and replacing all whitespaces by the classic one.
        * handle chinese chars by putting spaces around them.
        * strip all accents.
    - spitting on punctuation in addition to whitespaces (deactivate it with
      `split_on_whitespace_only=True`)

---
## __init__
```python
from char_level_bpe import __init__
```



---
## from_file
```python
from char_level_bpe import from_file
```



---
## train
```python
from char_level_bpe import train
```

Train the model using the given files

---
## train_from_iterator
```python
from char_level_bpe import train_from_iterator
```

Train the model using the given iterator

---
## __name__
```python
from bert_wordpiece import __name__
```



---
## BertWordPieceTokenizer
```python
from bert_wordpiece import BertWordPieceTokenizer
```

Bert WordPiece Tokenizer

---
## __init__
```python
from bert_wordpiece import __init__
```



---
## from_file
```python
from bert_wordpiece import from_file
```



---
## train
```python
from bert_wordpiece import train
```

Train the model using the given files

---
## train_from_iterator
```python
from bert_wordpiece import train_from_iterator
```

Train the model using the given iterator

---
## __name__
```python
from sync import __name__
```



---
## TLSinTLSStream
```python
from sync import TLSinTLSStream
```

Because the standard `SSLContext.wrap_socket` method does
not work for `SSLSocket` objects, we need this class
to implement TLS stream using an underlying `SSLObject`
instance in order to support TLS on top of TLS.

---
## SyncStream
```python
from sync import SyncStream
```



---
## SyncBackend
```python
from sync import SyncBackend
```



---
## __init__
```python
from sync import __init__
```



---
## _perform_io
```python
from sync import _perform_io
```



---
## read
```python
from sync import read
```



---
## write
```python
from sync import write
```



---
## close
```python
from sync import close
```



---
## start_tls
```python
from sync import start_tls
```



---
## get_extra_info
```python
from sync import get_extra_info
```



---
## connect_tcp
```python
from sync import connect_tcp
```



---
## connect_unix_socket
```python
from sync import connect_unix_socket
```



---
## __name__
```python
from anyio import __name__
```



---
## AnyIOStream
```python
from anyio import AnyIOStream
```



---
## AnyIOBackend
```python
from anyio import AnyIOBackend
```



---
## __init__
```python
from anyio import __init__
```



---
## get_extra_info
```python
from anyio import get_extra_info
```



---
## __name__
```python
from trio import __name__
```



---
## TrioStream
```python
from trio import TrioStream
```



---
## TrioBackend
```python
from trio import TrioBackend
```



---
## __init__
```python
from trio import __init__
```



---
## get_extra_info
```python
from trio import get_extra_info
```



---
## _get_socket_stream
```python
from trio import _get_socket_stream
```



---
## NetworkStream
```python
from base import NetworkStream
```



---
## NetworkBackend
```python
from base import NetworkBackend
```



---
## AsyncNetworkStream
```python
from base import AsyncNetworkStream
```



---
## AsyncNetworkBackend
```python
from base import AsyncNetworkBackend
```



---
## read
```python
from base import read
```



---
## write
```python
from base import write
```



---
## start_tls
```python
from base import start_tls
```



---
## get_extra_info
```python
from base import get_extra_info
```



---
## connect_tcp
```python
from base import connect_tcp
```



---
## connect_unix_socket
```python
from base import connect_unix_socket
```



---
## sleep
```python
from base import sleep
```



---
## AutoBackend
```python
from auto import AutoBackend
```



---
## __name__
```python
from mock import __name__
```

mock for autodoc

---
## MockSSLObject
```python
from mock import MockSSLObject
```



---
## MockStream
```python
from mock import MockStream
```



---
## MockBackend
```python
from mock import MockBackend
```



---
## AsyncMockStream
```python
from mock import AsyncMockStream
```



---
## AsyncMockBackend
```python
from mock import AsyncMockBackend
```



---
## __init__
```python
from mock import __init__
```



---
## selected_alpn_protocol
```python
from mock import selected_alpn_protocol
```



---
## read
```python
from mock import read
```



---
## write
```python
from mock import write
```



---
## close
```python
from mock import close
```



---
## start_tls
```python
from mock import start_tls
```



---
## get_extra_info
```python
from mock import get_extra_info
```



---
## __repr__
```python
from mock import __repr__
```



---
## connect_tcp
```python
from mock import connect_tcp
```



---
## connect_unix_socket
```python
from mock import connect_unix_socket
```



---
## sleep
```python
from mock import sleep
```



---
## __name__
```python
from interfaces import __name__
```



---
## AsyncRequestInterface
```python
from interfaces import AsyncRequestInterface
```



---
## AsyncConnectionInterface
```python
from interfaces import AsyncConnectionInterface
```



---
## info
```python
from interfaces import info
```



---
## can_handle_request
```python
from interfaces import can_handle_request
```



---
## is_available
```python
from interfaces import is_available
```

Return `True` if the connection is currently able to accept an
outgoing request.

An HTTP/1.1 connection will only be available if it is currently idle.

An HTTP/2 connection will be available so long as the stream ID space is
not yet exhausted, and the connection is not in an error state.

While the connection is being established we may not yet know if it is going
to result in an HTTP/1.1 or HTTP/2 connection. The connection should be
treated as being available, but might ultimately raise `NewConnectionRequired`
required exceptions if multiple requests are attempted over a connection
that ends up being established as HTTP/1.1.

---
## has_expired
```python
from interfaces import has_expired
```

Return `True` if the connection is in a state where it should be closed.

This either means that the connection is idle and it has passed the
expiry time on its keep-alive, or that server has sent an EOF.

---
## is_idle
```python
from interfaces import is_idle
```

Return `True` if the connection is currently idle.

---
## is_closed
```python
from interfaces import is_closed
```

Return `True` if the connection has been closed.

Used when a response is closed to determine if the connection may be
returned to the connection pool or not.

---
## __name__
```python
from http_proxy import __name__
```



---
## merge_headers
```python
from http_proxy import merge_headers
```

Append default_headers and override_headers, de-duplicating if a key exists
in both cases.

---
## build_auth_header
```python
from http_proxy import build_auth_header
```



---
## AsyncHTTPProxy
```python
from http_proxy import AsyncHTTPProxy
```

A connection pool that sends requests via an HTTP proxy.

---
## AsyncForwardHTTPConnection
```python
from http_proxy import AsyncForwardHTTPConnection
```



---
## AsyncTunnelHTTPConnection
```python
from http_proxy import AsyncTunnelHTTPConnection
```



---
## __init__
```python
from http_proxy import __init__
```



---
## create_connection
```python
from http_proxy import create_connection
```



---
## can_handle_request
```python
from http_proxy import can_handle_request
```



---
## info
```python
from http_proxy import info
```



---
## is_available
```python
from http_proxy import is_available
```



---
## has_expired
```python
from http_proxy import has_expired
```



---
## is_idle
```python
from http_proxy import is_idle
```



---
## is_closed
```python
from http_proxy import is_closed
```



---
## __repr__
```python
from http_proxy import __repr__
```



---
## AsyncHTTP2Connection
```python
from __init__ import AsyncHTTP2Connection
```



---
## AsyncSOCKSProxy
```python
from __init__ import AsyncSOCKSProxy
```



---
## __name__
```python
from http2 import __name__
```



---
## has_body_headers
```python
from http2 import has_body_headers
```



---
## HTTPConnectionState
```python
from http2 import HTTPConnectionState
```



---
## AsyncHTTP2Connection
```python
from http2 import AsyncHTTP2Connection
```



---
## HTTP2ConnectionByteStream
```python
from http2 import HTTP2ConnectionByteStream
```



---
## __init__
```python
from http2 import __init__
```



---
## can_handle_request
```python
from http2 import can_handle_request
```



---
## is_available
```python
from http2 import is_available
```



---
## has_expired
```python
from http2 import has_expired
```



---
## is_idle
```python
from http2 import is_idle
```



---
## is_closed
```python
from http2 import is_closed
```



---
## info
```python
from http2 import info
```



---
## __repr__
```python
from http2 import __repr__
```



---
## __name__
```python
from socks_proxy import __name__
```



---
## AsyncSOCKSProxy
```python
from socks_proxy import AsyncSOCKSProxy
```

A connection pool that sends requests via an HTTP proxy.

---
## AsyncSocks5Connection
```python
from socks_proxy import AsyncSocks5Connection
```



---
## __init__
```python
from socks_proxy import __init__
```



---
## create_connection
```python
from socks_proxy import create_connection
```



---
## can_handle_request
```python
from socks_proxy import can_handle_request
```



---
## is_available
```python
from socks_proxy import is_available
```



---
## has_expired
```python
from socks_proxy import has_expired
```



---
## is_idle
```python
from socks_proxy import is_idle
```



---
## is_closed
```python
from socks_proxy import is_closed
```



---
## info
```python
from socks_proxy import info
```



---
## __repr__
```python
from socks_proxy import __repr__
```



---
## HTTPConnectionState
```python
from http11 import HTTPConnectionState
```



---
## AsyncHTTP11Connection
```python
from http11 import AsyncHTTP11Connection
```



---
## HTTP11ConnectionByteStream
```python
from http11 import HTTP11ConnectionByteStream
```



---
## AsyncHTTP11UpgradeStream
```python
from http11 import AsyncHTTP11UpgradeStream
```



---
## __init__
```python
from http11 import __init__
```



---
## can_handle_request
```python
from http11 import can_handle_request
```



---
## is_available
```python
from http11 import is_available
```



---
## has_expired
```python
from http11 import has_expired
```



---
## is_idle
```python
from http11 import is_idle
```



---
## is_closed
```python
from http11 import is_closed
```



---
## info
```python
from http11 import info
```



---
## __repr__
```python
from http11 import __repr__
```



---
## get_extra_info
```python
from http11 import get_extra_info
```



---
## exponential_backoff
```python
from connection import exponential_backoff
```

Generate a geometric sequence that has a ratio of 2 and starts with 0.

For example:
- `factor = 2`: `0, 2, 4, 8, 16, 32, 64, ...`
- `factor = 3`: `0, 3, 6, 12, 24, 48, 96, ...`

---
## AsyncHTTPConnection
```python
from connection import AsyncHTTPConnection
```



---
## can_handle_request
```python
from connection import can_handle_request
```



---
## is_available
```python
from connection import is_available
```



---
## has_expired
```python
from connection import has_expired
```



---
## is_idle
```python
from connection import is_idle
```



---
## info
```python
from connection import info
```



---
## __repr__
```python
from connection import __repr__
```



---
## __name__
```python
from connection_pool import __name__
```



---
## AsyncPoolRequest
```python
from connection_pool import AsyncPoolRequest
```



---
## AsyncConnectionPool
```python
from connection_pool import AsyncConnectionPool
```

A connection pool for making HTTP requests.

---
## PoolByteStream
```python
from connection_pool import PoolByteStream
```



---
## __init__
```python
from connection_pool import __init__
```



---
## assign_to_connection
```python
from connection_pool import assign_to_connection
```



---
## clear_connection
```python
from connection_pool import clear_connection
```



---
## is_queued
```python
from connection_pool import is_queued
```



---
## create_connection
```python
from connection_pool import create_connection
```



---
## connections
```python
from connection_pool import connections
```

Return a list of the connections currently in the pool.

For example:

```python
>>> pool.connections
[
    <HTTPConnection ['https://example.com:443', HTTP/1.1, ACTIVE, Request Count: 6]>,
    <HTTPConnection ['https://example.com:443', HTTP/1.1, IDLE, Request Count: 9]> ,
    <HTTPConnection ['http://example.com:80', HTTP/1.1, IDLE, Request Count: 1]>,
]
```

---
## _assign_requests_to_connections
```python
from connection_pool import _assign_requests_to_connections
```

Manage the state of the connection pool, assigning incoming
requests to connections as available.

Called whenever a new request is added or removed from the pool.

Any closing connections are returned, allowing the I/O for closing
those connections to be handled seperately.

---
## __repr__
```python
from connection_pool import __repr__
```



---
## RequestInterface
```python
from interfaces import RequestInterface
```



---
## ConnectionInterface
```python
from interfaces import ConnectionInterface
```



---
## request
```python
from interfaces import request
```



---
## stream
```python
from interfaces import stream
```



---
## handle_request
```python
from interfaces import handle_request
```



---
## close
```python
from interfaces import close
```



---
## HTTPProxy
```python
from http_proxy import HTTPProxy
```

A connection pool that sends requests via an HTTP proxy.

---
## ForwardHTTPConnection
```python
from http_proxy import ForwardHTTPConnection
```



---
## TunnelHTTPConnection
```python
from http_proxy import TunnelHTTPConnection
```



---
## handle_request
```python
from http_proxy import handle_request
```



---
## close
```python
from http_proxy import close
```



---
## HTTP2Connection
```python
from __init__ import HTTP2Connection
```



---
## SOCKSProxy
```python
from __init__ import SOCKSProxy
```



---
## HTTP2Connection
```python
from http2 import HTTP2Connection
```



---
## handle_request
```python
from http2 import handle_request
```



---
## _send_connection_init
```python
from http2 import _send_connection_init
```

The HTTP/2 connection requires some initial setup before we can start
using individual request/response streams on it.

---
## _send_request_headers
```python
from http2 import _send_request_headers
```

Send the request headers to a given stream ID.

---
## _send_request_body
```python
from http2 import _send_request_body
```

Iterate over the request body sending it to a given stream ID.

---
## _send_stream_data
```python
from http2 import _send_stream_data
```

Send a single chunk of data in one or more data frames.

---
## _send_end_stream
```python
from http2 import _send_end_stream
```

Send an empty data frame on on a given stream ID with the END_STREAM flag set.

---
## _receive_response
```python
from http2 import _receive_response
```

Return the response status code and headers for a given stream ID.

---
## _receive_response_body
```python
from http2 import _receive_response_body
```

Iterator that returns the bytes of the response body for a given stream ID.

---
## _receive_stream_event
```python
from http2 import _receive_stream_event
```

Return the next available event for a given stream ID.

Will read more data from the network if required.

---
## _receive_events
```python
from http2 import _receive_events
```

Read some data from the network until we see one or more events
for a given stream ID.

---
## _receive_remote_settings_change
```python
from http2 import _receive_remote_settings_change
```



---
## _response_closed
```python
from http2 import _response_closed
```



---
## close
```python
from http2 import close
```



---
## _read_incoming_data
```python
from http2 import _read_incoming_data
```



---
## _write_outgoing_data
```python
from http2 import _write_outgoing_data
```



---
## _wait_for_outgoing_flow
```python
from http2 import _wait_for_outgoing_flow
```

Returns the maximum allowable outgoing flow for a given stream.

If the allowable flow is zero, then waits on the network until
WindowUpdated frames have increased the flow rate.
https://tools.ietf.org/html/rfc7540#section-6.9

---
## __enter__
```python
from http2 import __enter__
```



---
## __exit__
```python
from http2 import __exit__
```



---
## __iter__
```python
from http2 import __iter__
```



---
## _init_socks5_connection
```python
from socks_proxy import _init_socks5_connection
```



---
## SOCKSProxy
```python
from socks_proxy import SOCKSProxy
```

A connection pool that sends requests via an HTTP proxy.

---
## Socks5Connection
```python
from socks_proxy import Socks5Connection
```



---
## handle_request
```python
from socks_proxy import handle_request
```



---
## close
```python
from socks_proxy import close
```



---
## HTTP11Connection
```python
from http11 import HTTP11Connection
```



---
## HTTP11UpgradeStream
```python
from http11 import HTTP11UpgradeStream
```



---
## handle_request
```python
from http11 import handle_request
```



---
## _send_request_headers
```python
from http11 import _send_request_headers
```



---
## _send_request_body
```python
from http11 import _send_request_body
```



---
## _send_event
```python
from http11 import _send_event
```



---
## _receive_response_headers
```python
from http11 import _receive_response_headers
```



---
## _receive_response_body
```python
from http11 import _receive_response_body
```



---
## _receive_event
```python
from http11 import _receive_event
```



---
## _response_closed
```python
from http11 import _response_closed
```



---
## close
```python
from http11 import close
```



---
## __enter__
```python
from http11 import __enter__
```



---
## __exit__
```python
from http11 import __exit__
```



---
## __iter__
```python
from http11 import __iter__
```



---
## read
```python
from http11 import read
```



---
## write
```python
from http11 import write
```



---
## start_tls
```python
from http11 import start_tls
```



---
## handle_request
```python
from connection import handle_request
```



---
## _connect
```python
from connection import _connect
```



---
## PoolRequest
```python
from connection_pool import PoolRequest
```



---
## ConnectionPool
```python
from connection_pool import ConnectionPool
```

A connection pool for making HTTP requests.

---
## wait_for_connection
```python
from connection_pool import wait_for_connection
```



---
## handle_request
```python
from connection_pool import handle_request
```

Send an HTTP request, and return an HTTP response.

This is the core implementation that is called into by `.request()` or `.stream()`.

---
## _close_connections
```python
from connection_pool import _close_connections
```



---
## close
```python
from connection_pool import close
```



---
## __enter__
```python
from connection_pool import __enter__
```



---
## __exit__
```python
from connection_pool import __exit__
```



---
## __iter__
```python
from connection_pool import __iter__
```



---
## test_raises
```python
from test_utils import test_raises
```



---
## __name__
```python
from test_curried import __name__
```



---
## test_take
```python
from test_curried import test_take
```



---
## test_first
```python
from test_curried import test_first
```



---
## test_merge
```python
from test_curried import test_merge
```



---
## test_merge_with
```python
from test_curried import test_merge_with
```



---
## test_merge_with_list
```python
from test_curried import test_merge_with_list
```



---
## test_sorted
```python
from test_curried import test_sorted
```



---
## test_reduce
```python
from test_curried import test_reduce
```



---
## test_module_name
```python
from test_curried import test_module_name
```



---
## should_curry
```python
from test_curried import should_curry
```



---
## test_curried_operator
```python
from test_curried import test_curried_operator
```



---
## test_curried_namespace
```python
from test_curried import test_curried_namespace
```



---
## curry_namespace
```python
from test_curried import curry_namespace
```



---
## __name__
```python
from test_compatibility import __name__
```



---
## test_compat_warn
```python
from test_compatibility import test_compat_warn
```



---
## __name__
```python
from test_functoolz import __name__
```



---
## iseven
```python
from test_functoolz import iseven
```



---
## isodd
```python
from test_functoolz import isodd
```



---
## inc
```python
from test_functoolz import inc
```



---
## double
```python
from test_functoolz import double
```



---
## AlwaysEquals
```python
from test_functoolz import AlwaysEquals
```

useful to test correct __eq__ implementation of other objects

---
## NeverEquals
```python
from test_functoolz import NeverEquals
```

useful to test correct __eq__ implementation of other objects

---
## test_apply
```python
from test_functoolz import test_apply
```



---
## test_thread_first
```python
from test_functoolz import test_thread_first
```



---
## test_thread_last
```python
from test_functoolz import test_thread_last
```



---
## test_memoize
```python
from test_functoolz import test_memoize
```



---
## test_memoize_kwargs
```python
from test_functoolz import test_memoize_kwargs
```



---
## test_memoize_curried
```python
from test_functoolz import test_memoize_curried
```



---
## test_memoize_partial
```python
from test_functoolz import test_memoize_partial
```



---
## test_memoize_key_signature
```python
from test_functoolz import test_memoize_key_signature
```



---
## test_memoize_curry_cache
```python
from test_functoolz import test_memoize_curry_cache
```



---
## test_memoize_key
```python
from test_functoolz import test_memoize_key
```



---
## test_memoize_wrapped
```python
from test_functoolz import test_memoize_wrapped
```



---
## test_curry_simple
```python
from test_functoolz import test_curry_simple
```



---
## test_curry_kwargs
```python
from test_functoolz import test_curry_kwargs
```



---
## test_curry_passes_errors
```python
from test_functoolz import test_curry_passes_errors
```



---
## test_curry_docstring
```python
from test_functoolz import test_curry_docstring
```



---
## test_curry_is_like_partial
```python
from test_functoolz import test_curry_is_like_partial
```



---
## test_curry_is_idempotent
```python
from test_functoolz import test_curry_is_idempotent
```



---
## test_curry_attributes_readonly
```python
from test_functoolz import test_curry_attributes_readonly
```



---
## test_curry_attributes_writable
```python
from test_functoolz import test_curry_attributes_writable
```



---
## test_curry_module
```python
from test_functoolz import test_curry_module
```



---
## test_curry_comparable
```python
from test_functoolz import test_curry_comparable
```



---
## test_curry_doesnot_transmogrify
```python
from test_functoolz import test_curry_doesnot_transmogrify
```



---
## test_curry_on_classmethods
```python
from test_functoolz import test_curry_on_classmethods
```



---
## test_memoize_on_classmethods
```python
from test_functoolz import test_memoize_on_classmethods
```



---
## test_curry_call
```python
from test_functoolz import test_curry_call
```



---
## test_curry_bind
```python
from test_functoolz import test_curry_bind
```



---
## test_curry_unknown_args
```python
from test_functoolz import test_curry_unknown_args
```



---
## test_curry_bad_types
```python
from test_functoolz import test_curry_bad_types
```



---
## test_curry_subclassable
```python
from test_functoolz import test_curry_subclassable
```



---
## generate_compose_test_cases
```python
from test_functoolz import generate_compose_test_cases
```

Generate test cases for parametrized tests of the compose function.

---
## test_compose
```python
from test_functoolz import test_compose
```



---
## test_compose_metadata
```python
from test_functoolz import test_compose_metadata
```



---
## generate_compose_left_test_cases
```python
from test_functoolz import generate_compose_left_test_cases
```

Generate test cases for parametrized tests of the compose function.

These are based on, and equivalent to, those produced by
enerate_compose_test_cases().

---
## test_compose_left
```python
from test_functoolz import test_compose_left
```



---
## test_pipe
```python
from test_functoolz import test_pipe
```



---
## test_complement
```python
from test_functoolz import test_complement
```



---
## test_do
```python
from test_functoolz import test_do
```



---
## test_juxt_generator_input
```python
from test_functoolz import test_juxt_generator_input
```



---
## test_flip
```python
from test_functoolz import test_flip
```



---
## test_excepts
```python
from test_functoolz import test_excepts
```



---
## __eq__
```python
from test_functoolz import __eq__
```



---
## __ne__
```python
from test_functoolz import __ne__
```



---
## f
```python
from test_functoolz import f
```



---
## foo
```python
from test_functoolz import foo
```



---
## g
```python
from test_functoolz import g
```



---
## h
```python
from test_functoolz import h
```



---
## bar
```python
from test_functoolz import bar
```



---
## A
```python
from test_functoolz import A
```



---
## add
```python
from test_functoolz import add
```



---
## add3
```python
from test_functoolz import add3
```



---
## mycurry
```python
from test_functoolz import mycurry
```



---
## add_then_multiply
```python
from test_functoolz import add_then_multiply
```



---
## MyClass
```python
from test_functoolz import MyClass
```



---
## myfunc
```python
from test_functoolz import myfunc
```



---
## otherfunc
```python
from test_functoolz import otherfunc
```



---
## idx
```python
from test_functoolz import idx
```

idx docstring
        

---
## handler
```python
from test_functoolz import handler
```

handler docstring
        

---
## getzero
```python
from test_functoolz import getzero
```

getzero docstring
        

---
## raise_
```python
from test_functoolz import raise_
```

A function that raises an instance of the exception type given.
        

---
## __init__
```python
from test_functoolz import __init__
```



---
## addmethod
```python
from test_functoolz import addmethod
```



---
## addclass
```python
from test_functoolz import addclass
```



---
## addstatic
```python
from test_functoolz import addstatic
```



---
## __hash__
```python
from test_functoolz import __hash__
```



---
## __int__
```python
from test_functoolz import __int__
```



---
## __name__
```python
from test_inspect_args import __name__
```



---
## make_func
```python
from test_inspect_args import make_func
```



---
## test_make_func
```python
from test_inspect_args import test_make_func
```



---
## test_is_valid
```python
from test_inspect_args import test_is_valid
```



---
## test_is_valid_py3
```python
from test_inspect_args import test_is_valid_py3
```



---
## test_is_partial
```python
from test_inspect_args import test_is_partial
```



---
## test_is_valid_curry
```python
from test_inspect_args import test_is_valid_curry
```



---
## test_func_keyword
```python
from test_inspect_args import test_func_keyword
```



---
## test_has_unknown_args
```python
from test_inspect_args import test_has_unknown_args
```



---
## test_num_required_args
```python
from test_inspect_args import test_num_required_args
```



---
## test_has_keywords
```python
from test_inspect_args import test_has_keywords
```



---
## test_has_varargs
```python
from test_inspect_args import test_has_varargs
```



---
## test_is_arity
```python
from test_inspect_args import test_is_arity
```



---
## test_introspect_curry_valid_py3
```python
from test_inspect_args import test_introspect_curry_valid_py3
```



---
## test_introspect_curry_partial_py3
```python
from test_inspect_args import test_introspect_curry_partial_py3
```



---
## test_introspect_curry_py3
```python
from test_inspect_args import test_introspect_curry_py3
```



---
## test_introspect_builtin_modules
```python
from test_inspect_args import test_introspect_builtin_modules
```



---
## test_inspect_signature_property
```python
from test_inspect_args import test_inspect_signature_property
```



---
## test_inspect_wrapped_property
```python
from test_inspect_args import test_inspect_wrapped_property
```



---
## RaisesValueError
```python
from test_inspect_args import RaisesValueError
```



---
## check_curry
```python
from test_inspect_args import check_curry
```



---
## f
```python
from test_inspect_args import f
```



---
## add_denylist
```python
from test_inspect_args import add_denylist
```



---
## is_missing
```python
from test_inspect_args import is_missing
```



---
## AddX
```python
from test_inspect_args import AddX
```



---
## Wrapped
```python
from test_inspect_args import Wrapped
```



---
## __call__
```python
from test_inspect_args import __call__
```



---
## __signature__
```python
from test_inspect_args import __signature__
```



---
## __init__
```python
from test_inspect_args import __init__
```



---
## __wrapped__
```python
from test_inspect_args import __wrapped__
```



---
## __name__
```python
from test_tlz import __name__
```



---
## test_tlz
```python
from test_tlz import test_tlz
```



---
## __name__
```python
from test_signatures import __name__
```



---
## test_is_valid
```python
from test_signatures import test_is_valid
```



---
## test_is_partial
```python
from test_signatures import test_is_partial
```



---
## test_for_coverage
```python
from test_signatures import test_for_coverage
```



---
## __name__
```python
from test_recipes import __name__
```



---
## iseven
```python
from test_recipes import iseven
```



---
## test_countby
```python
from test_recipes import test_countby
```



---
## test_partitionby
```python
from test_recipes import test_partitionby
```



---
## __name__
```python
from test_curried_doctests import __name__
```



---
## test_doctests
```python
from test_curried_doctests import test_doctests
```



---
## __name__
```python
from test_dicttoolz import __name__
```



---
## inc
```python
from test_dicttoolz import inc
```



---
## iseven
```python
from test_dicttoolz import iseven
```



---
## TestDict
```python
from test_dicttoolz import TestDict
```

Test typical usage: dict inputs, no factory keyword.

Class attributes:
    D: callable that inputs a dict and creates or returns a MutableMapping
    kw: kwargs dict to specify "factory" keyword (if applicable)

---
## defaultdict
```python
from test_dicttoolz import defaultdict
```



---
## TestDefaultDict
```python
from test_dicttoolz import TestDefaultDict
```

Test defaultdict as input and factory

Class attributes:
    D: callable that inputs a dict and creates or returns a MutableMapping
    kw: kwargs dict to specify "factory" keyword (if applicable)

---
## CustomMapping
```python
from test_dicttoolz import CustomMapping
```

Define methods of the MutableMapping protocol required by dicttoolz

---
## TestCustomMapping
```python
from test_dicttoolz import TestCustomMapping
```

Test CustomMapping as input and factory

Class attributes:
    D: callable that inputs a dict and creates or returns a MutableMapping
    kw: kwargs dict to specify "factory" keyword (if applicable)

---
## test_environ
```python
from test_dicttoolz import test_environ
```



---
## test_merge_with_non_dict_mappings
```python
from test_dicttoolz import test_merge_with_non_dict_mappings
```



---
## test_merge
```python
from test_dicttoolz import test_merge
```



---
## test_merge_iterable_arg
```python
from test_dicttoolz import test_merge_iterable_arg
```



---
## test_merge_with
```python
from test_dicttoolz import test_merge_with
```



---
## test_merge_with_iterable_arg
```python
from test_dicttoolz import test_merge_with_iterable_arg
```



---
## test_valmap
```python
from test_dicttoolz import test_valmap
```



---
## test_keymap
```python
from test_dicttoolz import test_keymap
```



---
## test_itemmap
```python
from test_dicttoolz import test_itemmap
```



---
## test_valfilter
```python
from test_dicttoolz import test_valfilter
```



---
## test_keyfilter
```python
from test_dicttoolz import test_keyfilter
```



---
## test_itemfilter
```python
from test_dicttoolz import test_itemfilter
```



---
## test_assoc
```python
from test_dicttoolz import test_assoc
```



---
## test_dissoc
```python
from test_dicttoolz import test_dissoc
```



---
## test_assoc_in
```python
from test_dicttoolz import test_assoc_in
```



---
## test_update_in
```python
from test_dicttoolz import test_update_in
```



---
## test_factory
```python
from test_dicttoolz import test_factory
```



---
## __eq__
```python
from test_dicttoolz import __eq__
```



---
## D
```python
from test_dicttoolz import D
```



---
## __init__
```python
from test_dicttoolz import __init__
```



---
## __getitem__
```python
from test_dicttoolz import __getitem__
```



---
## __setitem__
```python
from test_dicttoolz import __setitem__
```



---
## __delitem__
```python
from test_dicttoolz import __delitem__
```



---
## __iter__
```python
from test_dicttoolz import __iter__
```



---
## __len__
```python
from test_dicttoolz import __len__
```



---
## __contains__
```python
from test_dicttoolz import __contains__
```



---
## __ne__
```python
from test_dicttoolz import __ne__
```



---
## keys
```python
from test_dicttoolz import keys
```



---
## values
```python
from test_dicttoolz import values
```



---
## items
```python
from test_dicttoolz import items
```



---
## update
```python
from test_dicttoolz import update
```



---
## Foo
```python
from test_dicttoolz import Foo
```



---
## __name__
```python
from test_serialization import __name__
```

Functions to check that serialization round-tripped properly.

---
## test_compose
```python
from test_serialization import test_compose
```



---
## test_curry
```python
from test_serialization import test_curry
```



---
## test_juxt
```python
from test_serialization import test_juxt
```



---
## test_complement
```python
from test_serialization import test_complement
```



---
## test_instanceproperty
```python
from test_serialization import test_instanceproperty
```



---
## f
```python
from test_serialization import f
```



---
## test_flip
```python
from test_serialization import test_flip
```



---
## test_curried_exceptions
```python
from test_serialization import test_curried_exceptions
```



---
## GlobalCurried
```python
from test_serialization import GlobalCurried
```



---
## test_curried_qualname
```python
from test_serialization import test_curried_qualname
```



---
## test_curried_bad_qualname
```python
from test_serialization import test_curried_bad_qualname
```



---
## __init__
```python
from test_serialization import __init__
```



---
## f1
```python
from test_serialization import f1
```



---
## g1
```python
from test_serialization import g1
```



---
## __reduce__
```python
from test_serialization import __reduce__
```

Allow us to serialize instances of NestedCurried

---
## NestedCurried
```python
from test_serialization import NestedCurried
```



---
## Nested
```python
from test_serialization import Nested
```



---
## preserves_identity
```python
from test_serialization import preserves_identity
```



---
## Bad
```python
from test_serialization import Bad
```



---
## f2
```python
from test_serialization import f2
```



---
## g2
```python
from test_serialization import g2
```



---
## f3
```python
from test_serialization import f3
```



---
## g3
```python
from test_serialization import g3
```



---
## __name__
```python
from test_itertoolz import __name__
```



---
## identity
```python
from test_itertoolz import identity
```



---
## iseven
```python
from test_itertoolz import iseven
```



---
## isodd
```python
from test_itertoolz import isodd
```



---
## inc
```python
from test_itertoolz import inc
```



---
## double
```python
from test_itertoolz import double
```



---
## test_remove
```python
from test_itertoolz import test_remove
```



---
## test_groupby
```python
from test_itertoolz import test_groupby
```



---
## test_groupby_non_callable
```python
from test_itertoolz import test_groupby_non_callable
```



---
## test_merge_sorted
```python
from test_itertoolz import test_merge_sorted
```



---
## test_interleave
```python
from test_itertoolz import test_interleave
```



---
## test_unique
```python
from test_itertoolz import test_unique
```



---
## test_isiterable
```python
from test_itertoolz import test_isiterable
```



---
## test_isdistinct
```python
from test_itertoolz import test_isdistinct
```



---
## test_nth
```python
from test_itertoolz import test_nth
```



---
## test_first
```python
from test_itertoolz import test_first
```



---
## test_second
```python
from test_itertoolz import test_second
```



---
## test_last
```python
from test_itertoolz import test_last
```



---
## test_rest
```python
from test_itertoolz import test_rest
```



---
## test_take
```python
from test_itertoolz import test_take
```



---
## test_tail
```python
from test_itertoolz import test_tail
```



---
## test_drop
```python
from test_itertoolz import test_drop
```



---
## test_take_nth
```python
from test_itertoolz import test_take_nth
```



---
## test_get
```python
from test_itertoolz import test_get
```



---
## test_mapcat
```python
from test_itertoolz import test_mapcat
```



---
## test_cons
```python
from test_itertoolz import test_cons
```



---
## test_concat
```python
from test_itertoolz import test_concat
```



---
## test_concatv
```python
from test_itertoolz import test_concatv
```



---
## test_interpose
```python
from test_itertoolz import test_interpose
```



---
## test_frequencies
```python
from test_itertoolz import test_frequencies
```



---
## test_reduceby
```python
from test_itertoolz import test_reduceby
```



---
## test_reduce_by_init
```python
from test_itertoolz import test_reduce_by_init
```



---
## test_reduce_by_callable_default
```python
from test_itertoolz import test_reduce_by_callable_default
```



---
## test_iterate
```python
from test_itertoolz import test_iterate
```



---
## test_accumulate
```python
from test_itertoolz import test_accumulate
```



---
## test_accumulate_works_on_consumable_iterables
```python
from test_itertoolz import test_accumulate_works_on_consumable_iterables
```



---
## test_sliding_window
```python
from test_itertoolz import test_sliding_window
```



---
## test_sliding_window_of_short_iterator
```python
from test_itertoolz import test_sliding_window_of_short_iterator
```



---
## test_partition
```python
from test_itertoolz import test_partition
```



---
## test_partition_all
```python
from test_itertoolz import test_partition_all
```



---
## test_count
```python
from test_itertoolz import test_count
```



---
## test_pluck
```python
from test_itertoolz import test_pluck
```



---
## test_join
```python
from test_itertoolz import test_join
```



---
## test_getter
```python
from test_itertoolz import test_getter
```



---
## test_key_as_getter
```python
from test_itertoolz import test_key_as_getter
```



---
## test_join_double_repeats
```python
from test_itertoolz import test_join_double_repeats
```



---
## test_join_missing_element
```python
from test_itertoolz import test_join_missing_element
```



---
## test_left_outer_join
```python
from test_itertoolz import test_left_outer_join
```



---
## test_right_outer_join
```python
from test_itertoolz import test_right_outer_join
```



---
## test_outer_join
```python
from test_itertoolz import test_outer_join
```



---
## test_diff
```python
from test_itertoolz import test_diff
```



---
## test_topk
```python
from test_itertoolz import test_topk
```



---
## test_topk_is_stable
```python
from test_itertoolz import test_topk_is_stable
```



---
## test_peek
```python
from test_itertoolz import test_peek
```



---
## test_peekn
```python
from test_itertoolz import test_peekn
```



---
## test_random_sample
```python
from test_itertoolz import test_random_sample
```



---
## IterIterable
```python
from test_itertoolz import IterIterable
```



---
## GetItemIterable
```python
from test_itertoolz import GetItemIterable
```



---
## NotIterable
```python
from test_itertoolz import NotIterable
```



---
## NotIterableEvenWithGetItem
```python
from test_itertoolz import NotIterableEvenWithGetItem
```



---
## set_add
```python
from test_itertoolz import set_add
```



---
## binop
```python
from test_itertoolz import binop
```



---
## NoCompare
```python
from test_itertoolz import NoCompare
```



---
## addpair
```python
from test_itertoolz import addpair
```



---
## indollars
```python
from test_itertoolz import indollars
```



---
## __iter__
```python
from test_itertoolz import __iter__
```



---
## __getitem__
```python
from test_itertoolz import __getitem__
```



---
## __eq__
```python
from test_itertoolz import __eq__
```



---
## __name__
```python
from operator import __name__
```



---
## merge_with
```python
from exceptions import merge_with
```



---
## merge
```python
from exceptions import merge
```



---
## EqualityHashKey
```python
from core import EqualityHashKey
```

Create a hash key that uses equality comparisons between items.

This may be used to create hash keys for otherwise unhashable types:

>>> from toolz import curry
>>> EqualityHashDefault = curry(EqualityHashKey, None)
>>> set(map(EqualityHashDefault, [[], (), [1], [1]]))  # doctest: +SKIP
{=[]=, =()=, =[1]=}

**Caution:** adding N ``EqualityHashKey`` items to a hash container
may require O(N**2) operations, not O(N) as for typical hashable types.
Therefore, a suitable key function such as ``tuple`` or ``frozenset``
is usually preferred over using ``EqualityHashKey`` if possible.

The ``key`` argument to ``EqualityHashKey`` should be a function or
index that returns a hashable object that effectively distinguishes
unequal items.  This helps avoid the poor scaling that occurs when
using the default key.  For example, the above example can be improved
by using a key function that distinguishes items by length or type:

>>> EqualityHashLen = curry(EqualityHashKey, len)
>>> EqualityHashType = curry(EqualityHashKey, type)  # this works too
>>> set(map(EqualityHashLen, [[], (), [1], [1]]))  # doctest: +SKIP
{=[]=, =()=, =[1]=}

``EqualityHashKey`` is convenient to use when a suitable key function
is complicated or unavailable.  For example, the following returns all
unique values based on equality:

>>> from toolz import unique
>>> vals = [[], [], (), [1], [1], [2], {}, {}, {}]
>>> list(unique(vals, key=EqualityHashDefault))
[[], (), [1], [2], {}]

**Warning:** don't change the equality value of an item already in a hash
container.  Unhashable types are unhashable for a reason.  For example:

>>> L1 = [1] ; L2 = [2]
>>> s = set(map(EqualityHashDefault, [L1, L2]))
>>> s  # doctest: +SKIP
{=[1]=, =[2]=}

>>> L1[0] = 2  # Don't do this!  ``s`` now has duplicate items!
>>> s  # doctest: +SKIP
{=[2]=, =[2]=}

Although this may appear problematic, immutable data types is a common
idiom in functional programming, and``EqualityHashKey`` easily allows
the same idiom to be used by convention rather than strict requirement.

See Also:
    identity

---
## unzip
```python
from core import unzip
```

Inverse of ``zip``

>>> a, b = unzip([('a', 1), ('b', 2)])
>>> list(a)
['a', 'b']
>>> list(b)
[1, 2]

Unlike the naive implementation ``def unzip(seq): zip(*seq)`` this
implementation can handle an infinite sequence ``seq``.

Caveats:

* The implementation uses ``tee``, and so can use a significant amount
  of auxiliary storage if the resulting iterators are consumed at
  different times.

* The inner sequence cannot be infinite. In Python 3 ``zip(*seq)`` can be
  used if ``seq`` is a finite sequence of infinite sequences.

---
## __name__
```python
from parallel import __name__
```

Parallel building utilities.

---
## _reduce
```python
from parallel import _reduce
```



---
## fold
```python
from parallel import fold
```

Reduce without guarantee of ordered reduction.

Parameters
----------
binops
    Associative operator. The associative property allows us to
    leverage a parallel map to perform reductions in parallel.


inputs:

``binop``     - associative operator. The associative property allows us to
                leverage a parallel map to perform reductions in parallel.

``seq``       - a sequence to be aggregated
``default``   - an identity element like 0 for ``add`` or 1 for mul

``map``       - an implementation of ``map``. This may be parallel and
                determines how work is distributed.
``chunksize`` - Number of elements of ``seq`` that should be handled
                within a single function call
``combine``   - Binary operator to combine two intermediate results.
                If ``binop`` is of type (total, item) -> total
                then ``combine`` is of type (total, total) -> total
                Defaults to ``binop`` for common case of operators like add

Fold chunks up the collection into blocks of size ``chunksize`` and then
feeds each of these to calls to ``reduce``. This work is distributed
with a call to ``map``, gathered back and then refolded to finish the
computation. In this way ``fold`` specifies only how to chunk up data but
leaves the distribution of this work to an externally provided ``map``
function. This function can be sequential or rely on multithreading,
multiprocessing, or even distributed solutions.

If ``map`` intends to serialize functions it should be prepared to accept
and serialize lambdas. Note that the standard ``pickle`` module fails
here.

Example
-------

>>> # Provide a parallel map to accomplish a parallel sum
>>> from operator import add
>>> fold(add, [1, 2, 3, 4], chunksize=2, map=map)
10

---
## __name__
```python
from test_against_stdlib_http import __name__
```



---
## socket_server
```python
from test_against_stdlib_http import socket_server
```



---
## SingleMindedRequestHandler
```python
from test_against_stdlib_http import SingleMindedRequestHandler
```



---
## test_h11_as_client
```python
from test_against_stdlib_http import test_h11_as_client
```



---
## H11RequestHandler
```python
from test_against_stdlib_http import H11RequestHandler
```



---
## test_h11_as_server
```python
from test_against_stdlib_http import test_h11_as_server
```



---
## translate_path
```python
from test_against_stdlib_http import translate_path
```



---
## handle
```python
from test_against_stdlib_http import handle
```



---
## __name__
```python
from test_connection import __name__
```



---
## test__keep_alive
```python
from test_connection import test__keep_alive
```



---
## test__body_framing
```python
from test_connection import test__body_framing
```



---
## test_Connection_basics_and_content_length
```python
from test_connection import test_Connection_basics_and_content_length
```



---
## test_chunked
```python
from test_connection import test_chunked
```



---
## test_chunk_boundaries
```python
from test_connection import test_chunk_boundaries
```



---
## test_client_talking_to_http10_server
```python
from test_connection import test_client_talking_to_http10_server
```



---
## test_server_talking_to_http10_client
```python
from test_connection import test_server_talking_to_http10_client
```



---
## test_automatic_transfer_encoding_in_response
```python
from test_connection import test_automatic_transfer_encoding_in_response
```



---
## test_automagic_connection_close_handling
```python
from test_connection import test_automagic_connection_close_handling
```



---
## test_100_continue
```python
from test_connection import test_100_continue
```



---
## test_max_incomplete_event_size_countermeasure
```python
from test_connection import test_max_incomplete_event_size_countermeasure
```



---
## test_reuse_simple
```python
from test_connection import test_reuse_simple
```



---
## test_pipelining
```python
from test_connection import test_pipelining
```



---
## test_protocol_switch
```python
from test_connection import test_protocol_switch
```



---
## test_close_simple
```python
from test_connection import test_close_simple
```



---
## test_close_different_states
```python
from test_connection import test_close_different_states
```



---
## test_pipelined_close
```python
from test_connection import test_pipelined_close
```



---
## test_sendfile
```python
from test_connection import test_sendfile
```



---
## test_errors
```python
from test_connection import test_errors
```



---
## test_idle_receive_nothing
```python
from test_connection import test_idle_receive_nothing
```



---
## test_connection_drop
```python
from test_connection import test_connection_drop
```



---
## test_408_request_timeout
```python
from test_connection import test_408_request_timeout
```



---
## test_empty_request
```python
from test_connection import test_empty_request
```



---
## test_empty_response
```python
from test_connection import test_empty_response
```



---
## test_early_detection_of_invalid_request
```python
from test_connection import test_early_detection_of_invalid_request
```



---
## test_early_detection_of_invalid_response
```python
from test_connection import test_early_detection_of_invalid_response
```



---
## test_HEAD_framing_headers
```python
from test_connection import test_HEAD_framing_headers
```



---
## test_special_exceptions_for_lost_connection_in_message_body
```python
from test_connection import test_special_exceptions_for_lost_connection_in_message_body
```



---
## headers
```python
from test_connection import headers
```



---
## resp
```python
from test_connection import resp
```



---
## req
```python
from test_connection import req
```



---
## setup
```python
from test_connection import setup
```



---
## SendfilePlaceholder
```python
from test_connection import SendfilePlaceholder
```



---
## conn
```python
from test_connection import conn
```



---
## __len__
```python
from test_connection import __len__
```



---
## __name__
```python
from test_io import __name__
```



---
## dowrite
```python
from test_io import dowrite
```



---
## tw
```python
from test_io import tw
```



---
## makebuf
```python
from test_io import makebuf
```



---
## tr
```python
from test_io import tr
```



---
## test_writers_simple
```python
from test_io import test_writers_simple
```



---
## test_readers_simple
```python
from test_io import test_readers_simple
```



---
## test_writers_unusual
```python
from test_io import test_writers_unusual
```



---
## test_readers_unusual
```python
from test_io import test_readers_unusual
```



---
## test__obsolete_line_fold_bytes
```python
from test_io import test__obsolete_line_fold_bytes
```



---
## _run_reader_iter
```python
from test_io import _run_reader_iter
```



---
## _run_reader
```python
from test_io import _run_reader
```



---
## t_body_reader
```python
from test_io import t_body_reader
```



---
## test_ContentLengthReader
```python
from test_io import test_ContentLengthReader
```



---
## test_Http10Reader
```python
from test_io import test_Http10Reader
```



---
## test_ChunkedReader
```python
from test_io import test_ChunkedReader
```



---
## test_ContentLengthWriter
```python
from test_io import test_ContentLengthWriter
```



---
## test_ChunkedWriter
```python
from test_io import test_ChunkedWriter
```



---
## test_Http10Writer
```python
from test_io import test_Http10Writer
```



---
## test_reject_garbage_after_request_line
```python
from test_io import test_reject_garbage_after_request_line
```



---
## test_reject_garbage_after_response_line
```python
from test_io import test_reject_garbage_after_response_line
```



---
## test_reject_garbage_in_header_line
```python
from test_io import test_reject_garbage_in_header_line
```



---
## test_reject_non_vchar_in_path
```python
from test_io import test_reject_non_vchar_in_path
```



---
## test_allow_some_garbage_in_cookies
```python
from test_io import test_allow_some_garbage_in_cookies
```



---
## test_host_comes_first
```python
from test_io import test_host_comes_first
```



---
## check
```python
from test_io import check
```



---
## __name__
```python
from test_util import __name__
```



---
## test_ProtocolError
```python
from test_util import test_ProtocolError
```



---
## test_LocalProtocolError
```python
from test_util import test_LocalProtocolError
```



---
## test_validate
```python
from test_util import test_validate
```



---
## test_validate_formatting
```python
from test_util import test_validate_formatting
```



---
## test_make_sentinel
```python
from test_util import test_make_sentinel
```



---
## test_bytesify
```python
from test_util import test_bytesify
```



---
## thunk
```python
from test_util import thunk
```



---
## S
```python
from test_util import S
```



---
## S2
```python
from test_util import S2
```



---
## __name__
```python
from test_state import __name__
```



---
## test_ConnectionState
```python
from test_state import test_ConnectionState
```



---
## test_ConnectionState_keep_alive
```python
from test_state import test_ConnectionState_keep_alive
```



---
## test_ConnectionState_keep_alive_in_DONE
```python
from test_state import test_ConnectionState_keep_alive_in_DONE
```



---
## test_ConnectionState_switch_denied
```python
from test_state import test_ConnectionState_switch_denied
```



---
## test_ConnectionState_protocol_switch_accepted
```python
from test_state import test_ConnectionState_protocol_switch_accepted
```



---
## test_ConnectionState_double_protocol_switch
```python
from test_state import test_ConnectionState_double_protocol_switch
```



---
## test_ConnectionState_inconsistent_protocol_switch
```python
from test_state import test_ConnectionState_inconsistent_protocol_switch
```



---
## test_ConnectionState_keepalive_protocol_switch_interaction
```python
from test_state import test_ConnectionState_keepalive_protocol_switch_interaction
```



---
## test_ConnectionState_reuse
```python
from test_state import test_ConnectionState_reuse
```



---
## test_server_request_is_illegal
```python
from test_state import test_server_request_is_illegal
```



---
## __name__
```python
from test_helpers import __name__
```



---
## test_normalize_data_events
```python
from test_helpers import test_normalize_data_events
```



---
## __name__
```python
from test_receivebuffer import __name__
```



---
## test_receivebuffer
```python
from test_receivebuffer import test_receivebuffer
```



---
## test_receivebuffer_for_invalid_delimiter
```python
from test_receivebuffer import test_receivebuffer_for_invalid_delimiter
```



---
## __name__
```python
from test_events import __name__
```



---
## test_events
```python
from test_events import test_events
```



---
## test_intenum_status_code
```python
from test_events import test_intenum_status_code
```



---
## test_header_casing
```python
from test_events import test_header_casing
```



---
## get_all_events
```python
from helpers import get_all_events
```



---
## receive_and_get
```python
from helpers import receive_and_get
```



---
## normalize_data_events
```python
from helpers import normalize_data_events
```



---
## ConnectionPair
```python
from helpers import ConnectionPair
```



---
## conns
```python
from helpers import conns
```



---
## send
```python
from helpers import send
```



---
## __name__
```python
from test_headers import __name__
```



---
## test_normalize_and_validate
```python
from test_headers import test_normalize_and_validate
```



---
## test_get_set_comma_header
```python
from test_headers import test_get_set_comma_header
```



---
## test_has_100_continue
```python
from test_headers import test_has_100_continue
```



---
## __name__
```python
from targets import __name__
```



---
## AssignmentTarget
```python
from targets import AssignmentTarget
```

Abstract base class for assignment targets during IR building.

---
## AssignmentTargetRegister
```python
from targets import AssignmentTargetRegister
```

Register as an assignment target.

This is used for local variables and some temporaries.

---
## AssignmentTargetIndex
```python
from targets import AssignmentTargetIndex
```

base[index] as assignment target

---
## AssignmentTargetAttr
```python
from targets import AssignmentTargetAttr
```

obj.attr as assignment target

---
## AssignmentTargetTuple
```python
from targets import AssignmentTargetTuple
```

x, ..., y as assignment target

---
## __init__
```python
from targets import __init__
```



---
## __name__
```python
from ll_builder import __name__
```

A "low-level" IR builder class.

LowLevelIRBuilder provides core abstractions we use for constructing
IR as well as a number of higher-level ones (accessing attributes,
calling functions and methods, and coercing between types, for
example). The core principle of the low-level IR builder is that all
of its facilities operate solely on the IR level and not the AST
level---it has *no knowledge* of mypy types or expressions.

---
## LowLevelIRBuilder
```python
from ll_builder import LowLevelIRBuilder
```



---
## num_positional_args
```python
from ll_builder import num_positional_args
```



---
## __init__
```python
from ll_builder import __init__
```



---
## set_module
```python
from ll_builder import set_module
```

Set the name and path of the current module.

---
## add
```python
from ll_builder import add
```

Add an op.

---
## goto
```python
from ll_builder import goto
```

Add goto to a basic block.

---
## activate_block
```python
from ll_builder import activate_block
```

Add a basic block and make it the active one (target of adds).

---
## goto_and_activate
```python
from ll_builder import goto_and_activate
```

Add goto a block and make it the active block.

---
## keep_alive
```python
from ll_builder import keep_alive
```



---
## push_error_handler
```python
from ll_builder import push_error_handler
```



---
## pop_error_handler
```python
from ll_builder import pop_error_handler
```



---
## self
```python
from ll_builder import self
```

Return reference to the 'self' argument.

This only works in a method.

---
## flush_keep_alives
```python
from ll_builder import flush_keep_alives
```



---
## box
```python
from ll_builder import box
```



---
## unbox_or_cast
```python
from ll_builder import unbox_or_cast
```



---
## coerce
```python
from ll_builder import coerce
```

Generate a coercion/cast from one type to other (only if needed).

For example, int -> object boxes the source int; int -> int emits nothing;
object -> int unboxes the object. All conversions preserve object value.

If force is true, always generate an op (even if it is just an assignment) so
that the result will have exactly target_type as the type.

Returns the register with the converted value (may be same as src).

---
## coerce_int_to_fixed_width
```python
from ll_builder import coerce_int_to_fixed_width
```



---
## coerce_short_int_to_fixed_width
```python
from ll_builder import coerce_short_int_to_fixed_width
```



---
## coerce_fixed_width_to_int
```python
from ll_builder import coerce_fixed_width_to_int
```



---
## coerce_nullable
```python
from ll_builder import coerce_nullable
```

Generate a coercion from a potentially null value.

---
## get_attr
```python
from ll_builder import get_attr
```

Get a native or Python attribute of an object.

---
## union_get_attr
```python
from ll_builder import union_get_attr
```

Get an attribute of an object with a union type.

---
## py_get_attr
```python
from ll_builder import py_get_attr
```

Get a Python attribute (slow).

Prefer get_attr() which generates optimized code for native classes.

---
## isinstance_helper
```python
from ll_builder import isinstance_helper
```

Fast path for isinstance() that checks against a list of native classes.

---
## get_type_of_obj
```python
from ll_builder import get_type_of_obj
```



---
## type_is_op
```python
from ll_builder import type_is_op
```



---
## isinstance_native
```python
from ll_builder import isinstance_native
```

Fast isinstance() check for a native class.

If there are three or fewer concrete (non-trait) classes among the class
and all its children, use even faster type comparison checks `type(obj)
is typ`.

---
## _construct_varargs
```python
from ll_builder import _construct_varargs
```

Construct *args and **kwargs from a collection of arguments

This is pretty complicated, and almost all of the complication here stems from
one of two things (but mostly the second):
  * The handling of ARG_STAR/ARG_STAR2. We want to create as much of the args/kwargs
    values in one go as we can, so we collect values until our hand is forced, and
    then we emit creation of the list/tuple, and expand it from there if needed.

  * Support potentially nullable argument values. This has very narrow applicability,
    as this will never be done by our compiled Python code, but is critically used
    by gen_glue_method when generating glue methods to mediate between the function
    signature of a parent class and its subclasses.

    For named-only arguments, this is quite simple: if it is
    null, don't put it in the dict.

    For positional-or-named arguments, things are much more complicated.
      * First, anything that was passed as a positional arg
        must be forwarded along as a positional arg. It *must
        not* be converted to a named arg. This is because mypy
        does not enforce that positional-or-named arguments
        have the same name in subclasses, and it is not
        uncommon for code to have different names in
        subclasses (a bunch of mypy's visitors do this, for
        example!). This is arguably a bug in both mypy and code doing
        this, and they ought to be using positional-only arguments, but
        positional-only arguments are new and ugly.

      * On the flip side, we're willing to accept the
        infelicity of sometimes turning an argument that was
        passed by keyword into a positional argument. It's wrong,
        but it's very marginal, and avoiding it would require passing
        a bitmask of which arguments were named with every function call,
        or something similar.
        (See some discussion of this in testComplicatedArgs)

    Thus, our strategy for positional-or-named arguments is to
    always pass them as positional, except in the one
    situation where we can not, and where we can be absolutely
    sure they were passed by name: when an *earlier*
    positional argument was missing its value.

    This means that if we have a method `f(self, x: int=..., y: object=...)`:
      * x and y present:      args=(x, y), kwargs={}
      * x present, y missing: args=(x,),   kwargs={}
      * x missing, y present: args=(),     kwargs={'y': y}

    To implement this, when we have multiple optional
    positional arguments, we maintain a flag in a register
    that tracks whether an argument has been missing, and for
    each such optional argument (except the first), we check
    the flag to determine whether to append the argument to
    the *args list or add it to the **kwargs dict. What a
    mess!

    This is what really makes everything here such a tangle;
    otherwise the *args and **kwargs code could be separated.

The arguments has_star and has_star2 indicate whether the target function
takes an ARG_STAR and ARG_STAR2 argument, respectively.
(These will always be true when making a pycall, and be based
on the actual target signature for a native call.)

---
## py_call
```python
from ll_builder import py_call
```

Call a Python function (non-native and slow).

Use py_call_op or py_call_with_kwargs_op for Python function call.

---
## _py_vector_call
```python
from ll_builder import _py_vector_call
```

Call function using the vectorcall API if possible.

Return the return value if successful. Return None if a non-vectorcall
API should be used instead.

---
## _vectorcall_keywords
```python
from ll_builder import _vectorcall_keywords
```

Return a reference to a tuple literal with keyword argument names.

Return null pointer if there are no keyword arguments.

---
## py_method_call
```python
from ll_builder import py_method_call
```

Call a Python method (non-native and slow).

---
## _py_vector_method_call
```python
from ll_builder import _py_vector_method_call
```

Call method using the vectorcall API if possible.

Return the return value if successful. Return None if a non-vectorcall
API should be used instead.

---
## call
```python
from ll_builder import call
```

Call a native function.

If bitmap_args is given, they override the values of (some) of the bitmap
arguments used to track the presence of values for certain arguments. By
default, the values of the bitmap arguments are inferred from args.

---
## native_args_to_positional
```python
from ll_builder import native_args_to_positional
```

Prepare arguments for a native call.

Given args/kinds/names and a target signature for a native call, map
keyword arguments to their appropriate place in the argument list,
fill in error values for unspecified default arguments,
package arguments that will go into *args/**kwargs into a tuple/dict,
and coerce arguments to the appropriate type.

---
## gen_method_call
```python
from ll_builder import gen_method_call
```

Generate either a native or Python method call.

---
## union_method_call
```python
from ll_builder import union_method_call
```

Generate a method call with a union type for the object.

---
## none
```python
from ll_builder import none
```

Load unboxed None value (type: none_rprimitive).

---
## true
```python
from ll_builder import true
```

Load unboxed True value (type: bool_rprimitive).

---
## false
```python
from ll_builder import false
```

Load unboxed False value (type: bool_rprimitive).

---
## none_object
```python
from ll_builder import none_object
```

Load Python None value (type: object_rprimitive).

---
## load_int
```python
from ll_builder import load_int
```

Load a tagged (Python) integer literal value.

---
## load_float
```python
from ll_builder import load_float
```

Load a float literal value.

---
## load_str
```python
from ll_builder import load_str
```

Load a str literal value.

This is useful for more than just str literals; for example, method calls
also require a PyObject * form for the name of the method.

---
## load_bytes
```python
from ll_builder import load_bytes
```

Load a bytes literal value.

---
## load_complex
```python
from ll_builder import load_complex
```

Load a complex literal value.

---
## load_static_checked
```python
from ll_builder import load_static_checked
```



---
## load_module
```python
from ll_builder import load_module
```



---
## get_native_type
```python
from ll_builder import get_native_type
```

Load native type object.

---
## load_native_type_object
```python
from ll_builder import load_native_type_object
```



---
## binary_op
```python
from ll_builder import binary_op
```

Perform a binary operation.

Generate specialized operations based on operand types, with a fallback
to generic operations.

---
## check_tagged_short_int
```python
from ll_builder import check_tagged_short_int
```

Check if a tagged integer is a short integer.

Return the result of the check (value of type 'bit').

---
## compare_strings
```python
from ll_builder import compare_strings
```

Compare two strings

---
## compare_bytes
```python
from ll_builder import compare_bytes
```



---
## compare_tuples
```python
from ll_builder import compare_tuples
```

Compare two tuples item by item

---
## translate_instance_contains
```python
from ll_builder import translate_instance_contains
```



---
## bool_bitwise_op
```python
from ll_builder import bool_bitwise_op
```



---
## bool_comparison_op
```python
from ll_builder import bool_comparison_op
```



---
## unary_not
```python
from ll_builder import unary_not
```



---
## unary_op
```python
from ll_builder import unary_op
```



---
## make_dict
```python
from ll_builder import make_dict
```



---
## new_list_op_with_length
```python
from ll_builder import new_list_op_with_length
```

This function returns an uninitialized list.

If the length is non-zero, the caller must initialize the list, before
it can be made visible to user code -- otherwise the list object is broken.
You might need further initialization with `new_list_set_item_op` op.

Args:
    length: desired length of the new list. The rtype should be
            c_pyssize_t_rprimitive
    line: line number

---
## new_list_op
```python
from ll_builder import new_list_op
```



---
## new_set_op
```python
from ll_builder import new_set_op
```



---
## setup_rarray
```python
from ll_builder import setup_rarray
```

Declare and initialize a new RArray, returning its address.

---
## shortcircuit_helper
```python
from ll_builder import shortcircuit_helper
```



---
## bool_value
```python
from ll_builder import bool_value
```

Return bool(value).

The result type can be bit_rprimitive or bool_rprimitive.

---
## add_bool_branch
```python
from ll_builder import add_bool_branch
```



---
## call_c
```python
from ll_builder import call_c
```

Call function using C/native calling convention (not a Python callable).

---
## matching_call_c
```python
from ll_builder import matching_call_c
```



---
## primitive_op
```python
from ll_builder import primitive_op
```

Add a primitive op.

---
## matching_primitive_op
```python
from ll_builder import matching_primitive_op
```



---
## int_op
```python
from ll_builder import int_op
```

Generate a native integer binary op.

Use native/C semantics, which sometimes differ from Python
semantics.

Args:
    type: Either int64_rprimitive or int32_rprimitive
    op: IntOp.* constant (e.g. IntOp.ADD)

---
## float_op
```python
from ll_builder import float_op
```

Generate a native float binary arithmetic operation.

This follows Python semantics (e.g. raise exception on division by zero).
Add a FloatOp directly if you want low-level semantics.

Args:
    op: Binary operator (e.g. '+' or '*')

---
## float_mod
```python
from ll_builder import float_mod
```

Perform x % y on floats using Python semantics.

---
## compare_floats
```python
from ll_builder import compare_floats
```



---
## fixed_width_int_op
```python
from ll_builder import fixed_width_int_op
```

Generate a binary op using Python fixed-width integer semantics.

These may differ in overflow/rounding behavior from native/C ops.

Args:
    type: Either int64_rprimitive or int32_rprimitive
    op: IntOp.* constant (e.g. IntOp.ADD)

---
## check_for_zero_division
```python
from ll_builder import check_for_zero_division
```



---
## inline_fixed_width_divide
```python
from ll_builder import inline_fixed_width_divide
```



---
## inline_fixed_width_mod
```python
from ll_builder import inline_fixed_width_mod
```



---
## is_same_native_int_signs
```python
from ll_builder import is_same_native_int_signs
```



---
## is_same_float_signs
```python
from ll_builder import is_same_float_signs
```



---
## comparison_op
```python
from ll_builder import comparison_op
```



---
## builtin_len
```python
from ll_builder import builtin_len
```

Generate len(val).

Return short_int_rprimitive by default.
Return c_pyssize_t if use_pyssize_t is true (unshifted).

---
## new_tuple
```python
from ll_builder import new_tuple
```



---
## new_tuple_with_length
```python
from ll_builder import new_tuple_with_length
```

This function returns an uninitialized tuple.

If the length is non-zero, the caller must initialize the tuple, before
it can be made visible to user code -- otherwise the tuple object is broken.
You might need further initialization with `new_tuple_set_item_op` op.

Args:
    length: desired length of the new tuple. The rtype should be
            c_pyssize_t_rprimitive
    line: line number

---
## int_to_float
```python
from ll_builder import int_to_float
```



---
## decompose_union_helper
```python
from ll_builder import decompose_union_helper
```

Generate isinstance() + specialized operations for union items.

Say, for Union[A, B] generate ops resembling this (pseudocode):

    if isinstance(obj, A):
        result = <result of process_item(cast(A, obj)>
    else:
        result = <result of process_item(cast(B, obj)>

Args:
    obj: value with a union type
    rtype: the union type
    result_type: result of the operation
    process_item: callback to generate op for a single union item (arg is coerced
        to union item type)
    line: line number

---
## translate_special_method_call
```python
from ll_builder import translate_special_method_call
```

Translate a method call which is handled nongenerically.

These are special in the sense that we have code generated specifically for them.
They tend to be method calls which have equivalents in C that are more direct
than calling with the PyObject api.

Return None if no translation found; otherwise return the target register.

---
## translate_eq_cmp
```python
from ll_builder import translate_eq_cmp
```

Add a equality comparison operation.

Args:
    expr_op: either '==' or '!='

---
## translate_is_op
```python
from ll_builder import translate_is_op
```

Create equality comparison operation between object identities

Args:
    expr_op: either 'is' or 'is not'

---
## _create_dict
```python
from ll_builder import _create_dict
```

Create a dictionary(possibly empty) using keys and values

---
## error
```python
from ll_builder import error
```



---
## get_item_attr
```python
from ll_builder import get_item_attr
```



---
## call_union_item
```python
from ll_builder import call_union_item
```



---
## other
```python
from ll_builder import other
```



---
## is_trait_decorator
```python
from util import is_trait_decorator
```



---
## is_trait
```python
from util import is_trait
```



---
## dataclass_decorator_type
```python
from util import dataclass_decorator_type
```



---
## is_dataclass_decorator
```python
from util import is_dataclass_decorator
```



---
## is_dataclass
```python
from util import is_dataclass
```



---
## dataclass_type
```python
from util import dataclass_type
```



---
## get_mypyc_attr_literal
```python
from util import get_mypyc_attr_literal
```

Convert an expression from a mypyc_attr decorator to a value.

Supports a pretty limited range.

---
## get_mypyc_attr_call
```python
from util import get_mypyc_attr_call
```

Check if an expression is a call to mypyc_attr and return it if so.

---
## get_mypyc_attrs
```python
from util import get_mypyc_attrs
```

Collect all the mypyc_attr attributes on a class definition or a function.

---
## is_extension_class
```python
from util import is_extension_class
```



---
## get_func_def
```python
from util import get_func_def
```



---
## concrete_arg_kind
```python
from util import concrete_arg_kind
```

Find the concrete version of an arg kind that is being passed.

---
## is_constant
```python
from util import is_constant
```

Check whether we allow an expression to appear as a default value.

We don't currently properly support storing the evaluated
values for default arguments and default attribute values, so
we restrict what expressions we allow.  We allow literals of
primitives types, None, and references to Final global
variables.

---
## bytes_from_str
```python
from util import bytes_from_str
```

Convert a string representing bytes into actual bytes.

This is needed because the literal characters of BytesExpr (the
characters inside b'') are stored in BytesExpr.value, whose type is
'str' not 'bytes'.

---
## __name__
```python
from vtable import __name__
```

Compute vtables of native (extension) classes.

---
## compute_vtable
```python
from vtable import compute_vtable
```

Compute the vtable structure for a class.

---
## specialize_parent_vtable
```python
from vtable import specialize_parent_vtable
```

Generate the part of a vtable corresponding to a parent class or trait

---
## __name__
```python
from mapper import __name__
```

Maintain a mapping from mypy concepts to IR/compiled concepts.

---
## Mapper
```python
from mapper import Mapper
```

Keep track of mappings from mypy concepts to IR concepts.

For example, we keep track of how the mypy TypeInfos of compiled
classes map to class IR objects.

This state is shared across all modules being compiled in all
compilation groups.

---
## __init__
```python
from mapper import __init__
```



---
## type_to_rtype
```python
from mapper import type_to_rtype
```



---
## get_arg_rtype
```python
from mapper import get_arg_rtype
```



---
## fdef_to_sig
```python
from mapper import fdef_to_sig
```



---
## is_native_module
```python
from mapper import is_native_module
```

Is the given module one compiled by mypyc?

---
## is_native_ref_expr
```python
from mapper import is_native_ref_expr
```



---
## is_native_module_ref_expr
```python
from mapper import is_native_module_ref_expr
```



---
## __name__
```python
from prebuildvisitor import __name__
```



---
## PreBuildVisitor
```python
from prebuildvisitor import PreBuildVisitor
```

Mypy file AST visitor run before building the IR.

This collects various things, including:

* Determine relationships between nested functions and functions that
  contain nested functions
* Find non-local variables (free variables)
* Find property setters
* Find decorators of functions
* Find module import groups

The main IR build pass uses this information.

---
## __init__
```python
from prebuildvisitor import __init__
```



---
## visit
```python
from prebuildvisitor import visit
```



---
## visit_block
```python
from prebuildvisitor import visit_block
```



---
## visit_decorator
```python
from prebuildvisitor import visit_decorator
```



---
## visit_func_def
```python
from prebuildvisitor import visit_func_def
```



---
## visit_lambda_expr
```python
from prebuildvisitor import visit_lambda_expr
```



---
## visit_func
```python
from prebuildvisitor import visit_func
```



---
## visit_import
```python
from prebuildvisitor import visit_import
```



---
## visit_name_expr
```python
from prebuildvisitor import visit_name_expr
```



---
## visit_var
```python
from prebuildvisitor import visit_var
```



---
## visit_symbol_node
```python
from prebuildvisitor import visit_symbol_node
```



---
## is_parent
```python
from prebuildvisitor import is_parent
```



---
## add_free_variable
```python
from prebuildvisitor import add_free_variable
```



---
## __name__
```python
from env_class import __name__
```

Generate classes representing function environments (+ related operations).

If we have a nested function that has non-local (free) variables, access to the
non-locals is via an instance of an environment class. Example:

    def f() -> int:
        x = 0  # Make 'x' an attribute of an environment class instance

        def g() -> int:
            # We have access to the environment class instance to
            # allow accessing 'x'
            return x + 2

        x = x + 1  # Modify the attribute
        return g()

---
## setup_env_class
```python
from env_class import setup_env_class
```

Generate a class representing a function environment.

Note that the variables in the function environment are not
actually populated here. This is because when the environment
class is generated, the function environment has not yet been
visited. This behavior is allowed so that when the compiler visits
nested functions, it can use the returned ClassIR instance to
figure out free variables it needs to access.  The remaining
attributes of the environment class are populated when the
environment registers are loaded.

Return a ClassIR representing an environment for a function
containing a nested function.

---
## finalize_env_class
```python
from env_class import finalize_env_class
```

Generate, instantiate, and set up the environment of an environment class.

---
## instantiate_env_class
```python
from env_class import instantiate_env_class
```

Assign an environment class to a register named after the given function definition.

---
## load_env_registers
```python
from env_class import load_env_registers
```

Load the registers for the current FuncItem being visited.

Adds the arguments of the FuncItem to the environment. If the
FuncItem is nested inside of another function, then this also
loads all of the outer environments of the FuncItem into registers
so that they can be used when accessing free variables.

---
## load_outer_env
```python
from env_class import load_outer_env
```

Load the environment class for a given base into a register.

Additionally, iterates through all of the SymbolNode and
AssignmentTarget instances of the environment at the given index's
symtable, and adds those instances to the environment of the
current environment. This is done so that the current environment
can access outer environment variables without having to reload
all of the environment registers.

Returns the register where the environment class was loaded.

---
## load_outer_envs
```python
from env_class import load_outer_envs
```



---
## num_bitmap_args
```python
from env_class import num_bitmap_args
```



---
## add_args_to_env
```python
from env_class import add_args_to_env
```



---
## setup_func_for_recursive_call
```python
from env_class import setup_func_for_recursive_call
```

Enable calling a nested function (with a callable class) recursively.

Adds the instance of the callable class representing the given
FuncDef to a register in the environment so that the function can
be called recursively. Note that this needs to be done only for
nested functions.

---
## is_free_variable
```python
from env_class import is_free_variable
```



---
## __name__
```python
from format_str_tokenizer import __name__
```

Tokenizers for three string formatting methods

---
## FormatOp
```python
from format_str_tokenizer import FormatOp
```

FormatOp represents conversion operations of string formatting during
compile time.

Compare to ConversionSpecifier, FormatOp has fewer attributes.
For example, to mark a conversion from any object to string,
ConversionSpecifier may have several representations, like '%s', '{}'
or '{:{}}'. However, there would only exist one corresponding FormatOp.

---
## generate_format_ops
```python
from format_str_tokenizer import generate_format_ops
```

Convert ConversionSpecifier to FormatOp.

Different ConversionSpecifiers may share a same FormatOp.

---
## tokenizer_printf_style
```python
from format_str_tokenizer import tokenizer_printf_style
```

Tokenize a printf-style format string using regex.

Return:
    A list of string literals and a list of FormatOps.

---
## tokenizer_format_call
```python
from format_str_tokenizer import tokenizer_format_call
```

Tokenize a str.format() format string.

The core function parse_format_value() is shared with mypy.
With these specifiers, we then parse the literal substrings
of the original format string and convert `ConversionSpecifier`
to `FormatOp`.

Return:
    A list of string literals and a list of FormatOps. The literals
    are interleaved with FormatOps and the length of returned literals
    should be exactly one more than FormatOps.
    Return None if it cannot parse the string.

---
## convert_format_expr_to_str
```python
from format_str_tokenizer import convert_format_expr_to_str
```

Convert expressions into string literal objects with the guidance
of FormatOps. Return None when fails.

---
## join_formatted_strings
```python
from format_str_tokenizer import join_formatted_strings
```

Merge the list of literals and the list of substitutions
alternatively using 'str_build_op'.

`substitutions` is the result value of formatting conversions.

If the `literals` is set to None, we simply join the substitutions;
Otherwise, the `literals` is the literal substrings of the original
format string and its length should be exactly one more than
substitutions.

For example:
(1)    'This is a %s and the value is %d'
    -> literals: ['This is a ', ' and the value is', '']
(2)    '{} and the value is {}'
    -> literals: ['', ' and the value is', '']

---
## convert_format_expr_to_bytes
```python
from format_str_tokenizer import convert_format_expr_to_bytes
```

Convert expressions into bytes literal objects with the guidance
of FormatOps. Return None when fails.

---
## join_formatted_bytes
```python
from format_str_tokenizer import join_formatted_bytes
```

Merge the list of literals and the list of substitutions
alternatively using 'bytes_build_op'.

---
## __name__
```python
from statement import __name__
```

Transform mypy statement ASTs to mypyc IR (Intermediate Representation).

The top-level AST transformation logic is implemented in mypyc.irbuild.visitor
and mypyc.irbuild.builder.

A few statements are transformed in mypyc.irbuild.function (yield, for example).

---
## transform_block
```python
from statement import transform_block
```



---
## transform_expression_stmt
```python
from statement import transform_expression_stmt
```



---
## transform_return_stmt
```python
from statement import transform_return_stmt
```



---
## transform_assignment_stmt
```python
from statement import transform_assignment_stmt
```



---
## is_simple_lvalue
```python
from statement import is_simple_lvalue
```



---
## transform_operator_assignment_stmt
```python
from statement import transform_operator_assignment_stmt
```

Operator assignment statement such as x += 1

---
## import_globals_id_and_name
```python
from statement import import_globals_id_and_name
```

Compute names for updating the globals dict with the appropriate module.

* For 'import foo.bar as baz' we add 'foo.bar' with the name 'baz'
* For 'import foo.bar' we add 'foo' with the name 'foo'

Typically we then ignore these entries and access things directly
via the module static, but we will use the globals version for
modules that mypy couldn't find, since it doesn't analyze module
references from those properly.

---
## transform_import
```python
from statement import transform_import
```



---
## transform_import_from
```python
from statement import transform_import_from
```



---
## transform_import_all
```python
from statement import transform_import_all
```



---
## transform_if_stmt
```python
from statement import transform_if_stmt
```



---
## transform_while_stmt
```python
from statement import transform_while_stmt
```



---
## transform_for_stmt
```python
from statement import transform_for_stmt
```



---
## transform_break_stmt
```python
from statement import transform_break_stmt
```



---
## transform_continue_stmt
```python
from statement import transform_continue_stmt
```



---
## transform_raise_stmt
```python
from statement import transform_raise_stmt
```



---
## transform_try_except
```python
from statement import transform_try_except
```

Generalized try/except/else handling that takes functions to gen the bodies.

The point of this is to also be able to support with.

---
## transform_try_except_stmt
```python
from statement import transform_try_except_stmt
```



---
## try_finally_try
```python
from statement import try_finally_try
```



---
## try_finally_entry_blocks
```python
from statement import try_finally_entry_blocks
```



---
## try_finally_body
```python
from statement import try_finally_body
```



---
## try_finally_resolve_control
```python
from statement import try_finally_resolve_control
```

Resolve the control flow out of a finally block.

This means returning if there was a return, propagating
exceptions, break/continue (soon), or just continuing on.

---
## transform_try_finally_stmt
```python
from statement import transform_try_finally_stmt
```

Generalized try/finally handling that takes functions to gen the bodies.

The point of this is to also be able to support with.

---
## transform_try_stmt
```python
from statement import transform_try_stmt
```



---
## get_sys_exc_info
```python
from statement import get_sys_exc_info
```



---
## transform_with
```python
from statement import transform_with
```



---
## transform_with_stmt
```python
from statement import transform_with_stmt
```



---
## transform_assert_stmt
```python
from statement import transform_assert_stmt
```



---
## transform_del_stmt
```python
from statement import transform_del_stmt
```



---
## transform_del_item
```python
from statement import transform_del_item
```



---
## emit_yield
```python
from statement import emit_yield
```



---
## emit_yield_from_or_await
```python
from statement import emit_yield_from_or_await
```



---
## emit_await
```python
from statement import emit_await
```



---
## transform_yield_expr
```python
from statement import transform_yield_expr
```



---
## transform_yield_from_expr
```python
from statement import transform_yield_from_expr
```



---
## transform_await_expr
```python
from statement import transform_await_expr
```



---
## transform_match_stmt
```python
from statement import transform_match_stmt
```



---
## transform_type_alias_stmt
```python
from statement import transform_type_alias_stmt
```



---
## body
```python
from statement import body
```



---
## else_block
```python
from statement import else_block
```



---
## make_handler
```python
from statement import make_handler
```



---
## make_entry
```python
from statement import make_entry
```



---
## maybe_natively_call_exit
```python
from statement import maybe_natively_call_exit
```



---
## try_body
```python
from statement import try_body
```



---
## except_body
```python
from statement import except_body
```



---
## finally_body
```python
from statement import finally_body
```



---
## generate
```python
from statement import generate
```



---
## else_body
```python
from statement import else_body
```



---
## transform_try_body
```python
from statement import transform_try_body
```



---
## constant_fold_binary_op_extended
```python
from constant_fold import constant_fold_binary_op_extended
```

Like mypy's constant_fold_binary_op(), but includes bytes support.

mypy cannot use constant folded bytes easily so it's simpler to only support them in mypyc.

---
## __name__
```python
from ast_helpers import __name__
```

IRBuilder AST transform helpers shared between expressions and statements.

Shared code that is tightly coupled to mypy ASTs can be put here instead of
making mypyc.irbuild.builder larger.

---
## process_conditional
```python
from ast_helpers import process_conditional
```



---
## maybe_process_conditional_comparison
```python
from ast_helpers import maybe_process_conditional_comparison
```

Transform simple tagged integer comparisons in a conditional context.

Return True if the operation is supported (and was transformed). Otherwise,
do nothing and return False.

Args:
    self: IR form Builder
    e: Arbitrary expression
    true: Branch target if comparison is true
    false: Branch target if comparison is false

---
## is_borrow_friendly_expr
```python
from ast_helpers import is_borrow_friendly_expr
```

Can the result of the expression borrowed temporarily?

Borrowing means keeping a reference without incrementing the reference count.

---
## IRVisitor
```python
from builder import IRVisitor
```



---
## UnsupportedException
```python
from builder import UnsupportedException
```



---
## IRBuilder
```python
from builder import IRBuilder
```



---
## gen_arg_defaults
```python
from builder import gen_arg_defaults
```

Generate blocks for arguments that have default values.

If the passed value is an error value, then assign the default
value to the argument.

---
## remangle_redefinition_name
```python
from builder import remangle_redefinition_name
```

Remangle names produced by mypy when allow-redefinition is used and a name
is used with multiple types within a single block.

We only need to do this for locals, because the name is used as the name of the register;
for globals, the name itself is stored in a register for the purpose of doing dict
lookups.

---
## get_call_target_fullname
```python
from builder import get_call_target_fullname
```



---
## create_type_params
```python
from builder import create_type_params
```

Create objects representing various kinds of Python 3.12 type parameters.

The "typing_mod" argument is the "_typing" module object. The type objects
are looked up from it.

The returned list has one item for each "type_args" item, in the same order.
Each item is either a TypeVar, TypeVarTuple or ParamSpec instance.

---
## set_module
```python
from builder import set_module
```

Set the name and path of the current module.

This must be called before transforming any AST nodes.

---
## accept
```python
from builder import accept
```

Transform an expression or a statement.

If can_borrow is true, prefer to generate a borrowed reference.
Borrowed references are faster since they don't require reference count
manipulation, but they are only safe to use in specific contexts.

---
## flush_keep_alives
```python
from builder import flush_keep_alives
```



---
## add
```python
from builder import add
```



---
## goto
```python
from builder import goto
```



---
## activate_block
```python
from builder import activate_block
```



---
## goto_and_activate
```python
from builder import goto_and_activate
```



---
## self
```python
from builder import self
```



---
## py_get_attr
```python
from builder import py_get_attr
```



---
## load_str
```python
from builder import load_str
```



---
## load_bytes_from_str_literal
```python
from builder import load_bytes_from_str_literal
```

Load bytes object from a string literal.

The literal characters of BytesExpr (the characters inside b'')
are stored in BytesExpr.value, whose type is 'str' not 'bytes'.
Thus we perform a special conversion here.

---
## load_int
```python
from builder import load_int
```



---
## load_float
```python
from builder import load_float
```



---
## unary_op
```python
from builder import unary_op
```



---
## binary_op
```python
from builder import binary_op
```



---
## coerce
```python
from builder import coerce
```



---
## none_object
```python
from builder import none_object
```



---
## none
```python
from builder import none
```



---
## true
```python
from builder import true
```



---
## false
```python
from builder import false
```



---
## new_list_op
```python
from builder import new_list_op
```



---
## new_set_op
```python
from builder import new_set_op
```



---
## translate_is_op
```python
from builder import translate_is_op
```



---
## py_call
```python
from builder import py_call
```



---
## add_bool_branch
```python
from builder import add_bool_branch
```



---
## load_native_type_object
```python
from builder import load_native_type_object
```



---
## gen_method_call
```python
from builder import gen_method_call
```



---
## load_module
```python
from builder import load_module
```



---
## call_c
```python
from builder import call_c
```



---
## int_op
```python
from builder import int_op
```



---
## compare_tuples
```python
from builder import compare_tuples
```



---
## builtin_len
```python
from builder import builtin_len
```



---
## new_tuple
```python
from builder import new_tuple
```



---
## add_to_non_ext_dict
```python
from builder import add_to_non_ext_dict
```



---
## gen_import
```python
from builder import gen_import
```



---
## check_if_module_loaded
```python
from builder import check_if_module_loaded
```

Generate code that checks if the module `id` has been loaded yet.

Arguments:
    id: name of module to check if imported
    line: line number that the import occurs on
    needs_import: the BasicBlock that is run if the module has not been loaded yet
    out: the BasicBlock that is run if the module has already been loaded

---
## get_module
```python
from builder import get_module
```



---
## get_module_attr
```python
from builder import get_module_attr
```

Look up an attribute of a module without storing it in the local namespace.

For example, get_module_attr('typing', 'TypedDict', line) results in
the value of 'typing.TypedDict'.

Import the module if needed.

---
## assign_if_null
```python
from builder import assign_if_null
```

If target is NULL, assign value produced by get_val to it.

---
## assign_if_bitmap_unset
```python
from builder import assign_if_bitmap_unset
```



---
## maybe_add_implicit_return
```python
from builder import maybe_add_implicit_return
```



---
## add_implicit_return
```python
from builder import add_implicit_return
```



---
## add_implicit_unreachable
```python
from builder import add_implicit_unreachable
```



---
## disallow_class_assignments
```python
from builder import disallow_class_assignments
```



---
## non_function_scope
```python
from builder import non_function_scope
```



---
## top_level_fn_info
```python
from builder import top_level_fn_info
```



---
## init_final_static
```python
from builder import init_final_static
```



---
## load_final_static
```python
from builder import load_final_static
```



---
## init_type_var
```python
from builder import init_type_var
```



---
## load_type_var
```python
from builder import load_type_var
```



---
## load_literal_value
```python
from builder import load_literal_value
```

Load value of a final name, class-level attribute, or constant folded expression.

---
## get_assignment_target
```python
from builder import get_assignment_target
```



---
## read
```python
from builder import read
```



---
## assign
```python
from builder import assign
```



---
## coerce_rvalue
```python
from builder import coerce_rvalue
```



---
## process_sequence_assignment
```python
from builder import process_sequence_assignment
```

Process assignment like 'x, y = s', where s is a variable-length list or tuple.

---
## process_iterator_tuple_assignment_helper
```python
from builder import process_iterator_tuple_assignment_helper
```



---
## process_iterator_tuple_assignment
```python
from builder import process_iterator_tuple_assignment
```



---
## push_loop_stack
```python
from builder import push_loop_stack
```



---
## pop_loop_stack
```python
from builder import pop_loop_stack
```



---
## make_spill_target
```python
from builder import make_spill_target
```

Moves a given Value instance into the generator class' environment class.

---
## spill
```python
from builder import spill
```

Moves a given Value instance into the generator class' environment class.

---
## maybe_spill
```python
from builder import maybe_spill
```

Moves a given Value instance into the environment class for generator functions. For
non-generator functions, leaves the Value instance as it is.

Returns an AssignmentTarget associated with the Value for generator functions and the
original Value itself for non-generator functions.

---
## maybe_spill_assignable
```python
from builder import maybe_spill_assignable
```

Moves a given Value instance into the environment class for generator functions. For
non-generator functions, allocate a temporary Register.

Returns an AssignmentTarget associated with the Value for generator functions and an
assignable Register for non-generator functions.

---
## extract_int
```python
from builder import extract_int
```



---
## get_sequence_type
```python
from builder import get_sequence_type
```



---
## get_sequence_type_from_type
```python
from builder import get_sequence_type_from_type
```



---
## get_dict_base_type
```python
from builder import get_dict_base_type
```

Find dict type of a dict-like expression.

This is useful for dict subclasses like SymbolTable.

---
## get_dict_key_type
```python
from builder import get_dict_key_type
```



---
## get_dict_value_type
```python
from builder import get_dict_value_type
```



---
## get_dict_item_type
```python
from builder import get_dict_item_type
```



---
## _analyze_iterable_item_type
```python
from builder import _analyze_iterable_item_type
```

Return the item type given by 'expr' in an iterable context.

---
## is_native_module
```python
from builder import is_native_module
```

Is the given module one compiled by mypyc?

---
## is_native_ref_expr
```python
from builder import is_native_ref_expr
```



---
## is_native_module_ref_expr
```python
from builder import is_native_module_ref_expr
```



---
## is_synthetic_type
```python
from builder import is_synthetic_type
```

Is a type something other than just a class we've created?

---
## get_final_ref
```python
from builder import get_final_ref
```

Check if `expr` is a final attribute.

This needs to be done differently for class and module attributes to
correctly determine fully qualified name. Return a tuple that consists of
the qualified name, the corresponding Var node, and a flag indicating whether
the final name was defined in a compiled module. Return None if `expr` does not
refer to a final attribute.

---
## emit_load_final
```python
from builder import emit_load_final
```

Emit code for loading value of a final name (if possible).

Args:
    final_var: Var corresponding to the final name
    fullname: its qualified name
    name: shorter name to show in errors
    native: whether the name was defined in a compiled module
    typ: its type
    line: line number where loading occurs

---
## is_module_member_expr
```python
from builder import is_module_member_expr
```



---
## call_refexpr_with_args
```python
from builder import call_refexpr_with_args
```



---
## shortcircuit_expr
```python
from builder import shortcircuit_expr
```



---
## flatten_classes
```python
from builder import flatten_classes
```

Flatten classes in isinstance(obj, (A, (B, C))).

If at least one item is not a reference to a native class, return None.

---
## enter
```python
from builder import enter
```



---
## leave
```python
from builder import leave
```



---
## enter_method
```python
from builder import enter_method
```

Generate IR for a method.

If the method takes arguments, you should immediately afterwards call
add_argument() for each non-self argument (self is created implicitly).

Args:
    class_ir: Add method to this class
    name: Short name of the method
    ret_type: Return type of the method
    fn_info: Optionally, additional information about the method
    self_type: If not None, override default type of the implicit 'self'
        argument (by default, derive type from class_ir)

---
## add_argument
```python
from builder import add_argument
```

Declare an argument in the current function.

You should use this instead of directly calling add_local() in new code.

---
## lookup
```python
from builder import lookup
```



---
## add_local
```python
from builder import add_local
```

Add register that represents a symbol to the symbol table.

Args:
    is_arg: is this a function argument

---
## add_local_reg
```python
from builder import add_local_reg
```

Like add_local, but return an assignment target instead of value.

---
## add_self_to_env
```python
from builder import add_self_to_env
```

Low-level function that adds a 'self' argument.

This is only useful if using enter() instead of enter_method().

---
## add_target
```python
from builder import add_target
```



---
## type_to_rtype
```python
from builder import type_to_rtype
```



---
## node_type
```python
from builder import node_type
```



---
## add_var_to_env_class
```python
from builder import add_var_to_env_class
```



---
## is_builtin_ref_expr
```python
from builder import is_builtin_ref_expr
```



---
## load_global
```python
from builder import load_global
```

Loads a Python-level global.

This takes a NameExpr and uses its name as a key to retrieve the corresponding PyObject *
from the _globals dictionary in the C-generated code.

---
## load_global_str
```python
from builder import load_global_str
```



---
## load_globals_dict
```python
from builder import load_globals_dict
```



---
## load_module_attr_by_fullname
```python
from builder import load_module_attr_by_fullname
```



---
## is_native_attr_ref
```python
from builder import is_native_attr_ref
```

Is expr a direct reference to a native (struct) attribute of an instance?

---
## mark_block_unreachable
```python
from builder import mark_block_unreachable
```

Mark statements in the innermost block being processed as unreachable.

This should be called after a statement that unconditionally leaves the
block, such as 'break' or 'return'.

---
## catch_errors
```python
from builder import catch_errors
```



---
## warning
```python
from builder import warning
```



---
## error
```python
from builder import error
```



---
## note
```python
from builder import note
```



---
## add_function
```python
from builder import add_function
```



---
## get_default
```python
from builder import get_default
```



---
## __name__
```python
from classdef import __name__
```

Transform class definitions from the mypy AST form to IR.

---
## transform_class_def
```python
from classdef import transform_class_def
```

Create IR for a class definition.

This can generate both extension (native) and non-extension
classes.  These are generated in very different ways. In the
latter case we construct a Python type object at runtime by doing
the equivalent of "type(name, bases, dict)" in IR. Extension
classes are defined via C structs that are generated later in
mypyc.codegen.emitclass.

This is the main entry point to this module.

---
## ClassBuilder
```python
from classdef import ClassBuilder
```

Create IR for a class definition.

This is an abstract base class.

---
## NonExtClassBuilder
```python
from classdef import NonExtClassBuilder
```



---
## ExtClassBuilder
```python
from classdef import ExtClassBuilder
```



---
## DataClassBuilder
```python
from classdef import DataClassBuilder
```



---
## AttrsClassBuilder
```python
from classdef import AttrsClassBuilder
```

Create IR for an attrs class where auto_attribs=False (the default).

When auto_attribs is enabled, attrs classes behave similarly to dataclasses
(i.e. types are stored as annotations on the class) and are thus handled
by DataClassBuilder, but when auto_attribs is disabled the types are
provided via attr.ib(type=...)

---
## allocate_class
```python
from classdef import allocate_class
```



---
## make_generic_base_class
```python
from classdef import make_generic_base_class
```

Construct Generic[...] base class object for a new-style generic class (Python 3.12).

---
## populate_non_ext_bases
```python
from classdef import populate_non_ext_bases
```

Create base class tuple of a non-extension class.

The tuple is passed to the metaclass constructor.

---
## find_non_ext_metaclass
```python
from classdef import find_non_ext_metaclass
```

Find the metaclass of a class from its defs and bases.

---
## setup_non_ext_dict
```python
from classdef import setup_non_ext_dict
```

Initialize the class dictionary for a non-extension class.

This class dictionary is passed to the metaclass constructor.

---
## add_non_ext_class_attr_ann
```python
from classdef import add_non_ext_class_attr_ann
```

Add a class attribute to __annotations__ of a non-extension class.

---
## add_non_ext_class_attr
```python
from classdef import add_non_ext_class_attr
```

Add a class attribute to __dict__ of a non-extension class.

---
## find_attr_initializers
```python
from classdef import find_attr_initializers
```

Find initializers of attributes in a class body.

If provided, the skip arg should be a callable which will return whether
to skip generating a default for an attribute.  It will be passed the name of
the attribute and the corresponding AssignmentStmt.

---
## generate_attr_defaults_init
```python
from classdef import generate_attr_defaults_init
```

Generate an initialization method for default attr values (from class vars).

---
## check_deletable_declaration
```python
from classdef import check_deletable_declaration
```



---
## create_ne_from_eq
```python
from classdef import create_ne_from_eq
```

Create a "__ne__" method from a "__eq__" method (if only latter exists).

---
## gen_glue_ne_method
```python
from classdef import gen_glue_ne_method
```

Generate a "__ne__" method from a "__eq__" method.

---
## load_non_ext_class
```python
from classdef import load_non_ext_class
```



---
## load_decorated_class
```python
from classdef import load_decorated_class
```

Apply class decorators to create a decorated (non-extension) class object.

Given a decorated ClassDef and a register containing a
non-extension representation of the ClassDef created via the type
constructor, applies the corresponding decorator functions on that
decorated ClassDef and returns a register containing the decorated
ClassDef.

---
## cache_class_attrs
```python
from classdef import cache_class_attrs
```

Add class attributes to be cached to the global cache.

---
## create_mypyc_attrs_tuple
```python
from classdef import create_mypyc_attrs_tuple
```



---
## add_dunders_to_non_ext_dict
```python
from classdef import add_dunders_to_non_ext_dict
```



---
## __init__
```python
from classdef import __init__
```



---
## add_method
```python
from classdef import add_method
```



---
## add_attr
```python
from classdef import add_attr
```



---
## finalize
```python
from classdef import finalize
```

Generate code to finish instantiating a dataclass.

This works by replacing all of the attributes on the class
(which will be descriptors) with whatever they would be in a
non-extension class, calling dataclass, then switching them back.

The resulting class is an extension class and instances of it do not
have a __dict__ (unless something else requires it).
All methods written explicitly in the source are compiled and
may be called through the vtable while the methods generated
by dataclasses are interpreted and may not be.

(If we just called dataclass without doing this, it would think that all
of the descriptors for our attributes are default values and generate an
incorrect constructor. We need to do the switch so that dataclass gets the
appropriate defaults.)

---
## create_non_ext_info
```python
from classdef import create_non_ext_info
```

Set up a NonExtClassInfo to track dataclass attributes.

In addition to setting up a normal extension class for dataclasses,
we also collect its class attributes like a non-extension class so
that we can hand them to the dataclass decorator.

---
## skip_attr_default
```python
from classdef import skip_attr_default
```



---
## get_type_annotation
```python
from classdef import get_type_annotation
```



---
## __name__
```python
from generator import __name__
```



---
## gen_generator_func
```python
from generator import gen_generator_func
```



---
## instantiate_generator_class
```python
from generator import instantiate_generator_class
```



---
## setup_generator_class
```python
from generator import setup_generator_class
```



---
## create_switch_for_generator_class
```python
from generator import create_switch_for_generator_class
```



---
## populate_switch_for_generator_class
```python
from generator import populate_switch_for_generator_class
```



---
## add_raise_exception_blocks_to_generator_class
```python
from generator import add_raise_exception_blocks_to_generator_class
```

Add error handling blocks to a generator class.

Generates blocks to check if error flags are set while calling the
helper method for generator functions, and raises an exception if
those flags are set.

---
## add_methods_to_generator_class
```python
from generator import add_methods_to_generator_class
```



---
## add_helper_to_generator_class
```python
from generator import add_helper_to_generator_class
```

Generates a helper method for a generator class, called by '__next__' and 'throw'.

---
## add_iter_to_generator_class
```python
from generator import add_iter_to_generator_class
```

Generates the '__iter__' method for a generator class.

---
## add_next_to_generator_class
```python
from generator import add_next_to_generator_class
```

Generates the '__next__' method for a generator class.

---
## add_send_to_generator_class
```python
from generator import add_send_to_generator_class
```

Generates the 'send' method for a generator class.

---
## add_throw_to_generator_class
```python
from generator import add_throw_to_generator_class
```

Generates the 'throw' method for a generator class.

---
## add_close_to_generator_class
```python
from generator import add_close_to_generator_class
```

Generates the '__close__' method for a generator class.

---
## add_await_to_generator_class
```python
from generator import add_await_to_generator_class
```

Generates the '__await__' method for a generator class.

---
## setup_env_for_generator_class
```python
from generator import setup_env_for_generator_class
```

Populates the environment for a generator class.

---
## IRBuilderVisitor
```python
from visitor import IRBuilderVisitor
```

Mypy node visitor that dispatches to node transform implementations.

This class should have no non-trivial logic.

This visitor is separated from the rest of code to improve modularity and
to avoid import cycles.

This is based on the visitor pattern
(https://en.wikipedia.org/wiki/Visitor_pattern).

---
## bail
```python
from visitor import bail
```

Reports an error and aborts compilation up until the last accept() call

(accept() catches the UnsupportedException and keeps on
processing. This allows errors to be non-blocking without always
needing to write handling for them.

---
## FuncInfo
```python
from context import FuncInfo
```

Contains information about functions as they are generated.

---
## ImplicitClass
```python
from context import ImplicitClass
```

Contains information regarding implicitly generated classes.

Implicit classes are generated for nested functions and generator
functions. They are not explicitly defined in the source code.

NOTE: This is both a concrete class and used as a base class.

---
## GeneratorClass
```python
from context import GeneratorClass
```

Contains information about implicit generator function classes.

---
## namespaced_name
```python
from context import namespaced_name
```



---
## is_generator
```python
from context import is_generator
```



---
## is_coroutine
```python
from context import is_coroutine
```



---
## callable_class
```python
from context import callable_class
```



---
## env_class
```python
from context import env_class
```



---
## generator_class
```python
from context import generator_class
```



---
## curr_env_reg
```python
from context import curr_env_reg
```



---
## self_reg
```python
from context import self_reg
```



---
## prev_env_reg
```python
from context import prev_env_reg
```



---
## next_label_reg
```python
from context import next_label_reg
```



---
## next_label_target
```python
from context import next_label_target
```



---
## __name__
```python
from nonlocalcontrol import __name__
```

Helpers for dealing with nonlocal control such as 'break' and 'return'.

Model how these behave differently in different contexts.

---
## NonlocalControl
```python
from nonlocalcontrol import NonlocalControl
```

ABC representing a stack frame of constructs that modify nonlocal control flow.

The nonlocal control flow constructs are break, continue, and
return, and their behavior is modified by a number of other
constructs.  The most obvious is loop, which override where break
and continue jump to, but also `except` (which needs to clear
exc_info when left) and (eventually) finally blocks (which need to
ensure that the finally block is always executed when leaving the
try/except blocks).

---
## BaseNonlocalControl
```python
from nonlocalcontrol import BaseNonlocalControl
```

Default nonlocal control outside any statements that affect it.

---
## LoopNonlocalControl
```python
from nonlocalcontrol import LoopNonlocalControl
```

Nonlocal control within a loop.

---
## GeneratorNonlocalControl
```python
from nonlocalcontrol import GeneratorNonlocalControl
```

Default nonlocal control in a generator function outside statements.

---
## CleanupNonlocalControl
```python
from nonlocalcontrol import CleanupNonlocalControl
```

Abstract nonlocal control that runs some cleanup code.

---
## TryFinallyNonlocalControl
```python
from nonlocalcontrol import TryFinallyNonlocalControl
```

Nonlocal control within try/finally.

---
## ExceptNonlocalControl
```python
from nonlocalcontrol import ExceptNonlocalControl
```

Nonlocal control for except blocks.

Just makes sure that sys.exc_info always gets restored when we leave.
This is super annoying.

---
## FinallyNonlocalControl
```python
from nonlocalcontrol import FinallyNonlocalControl
```

Nonlocal control for finally blocks.

Just makes sure that sys.exc_info always gets restored when we
leave and the return register is decrefed if it isn't null.

---
## gen_break
```python
from nonlocalcontrol import gen_break
```



---
## gen_continue
```python
from nonlocalcontrol import gen_continue
```



---
## gen_return
```python
from nonlocalcontrol import gen_return
```



---
## __init__
```python
from nonlocalcontrol import __init__
```



---
## gen_cleanup
```python
from nonlocalcontrol import gen_cleanup
```



---
## __name__
```python
from callable_class import __name__
```

Generate a class that represents a nested function.

The class defines __call__ for calling the function and allows access to
non-local variables defined in outer scopes.

---
## setup_callable_class
```python
from callable_class import setup_callable_class
```

Generate an (incomplete) callable class representing a function.

This can be a nested function or a function within a non-extension
class.  Also set up the 'self' variable for that class.

This takes the most recently visited function and returns a
ClassIR to represent that function. Each callable class contains
an environment attribute which points to another ClassIR
representing the environment class where some of its variables can
be accessed.

Note that some methods, such as '__call__', are not yet
created here. Use additional functions, such as
add_call_to_callable_class(), to add them.

Return a newly constructed ClassIR representing the callable
class for the nested function.

---
## add_call_to_callable_class
```python
from callable_class import add_call_to_callable_class
```

Generate a '__call__' method for a callable class representing a nested function.

This takes the blocks and signature associated with a function
definition and uses those to build the '__call__' method of a
given callable class, used to represent that function.

---
## add_get_to_callable_class
```python
from callable_class import add_get_to_callable_class
```

Generate the '__get__' method for a callable class.

---
## instantiate_callable_class
```python
from callable_class import instantiate_callable_class
```

Create an instance of a callable class for a function.

Calls to the function will actually call this instance.

Note that fn_info refers to the function being assigned, whereas
builder.fn_info refers to the function encapsulating the function
being turned into a callable class.

---
## __name__
```python
from specialize import __name__
```

Special case IR generation of calls to specific builtin functions.

Most special cases should be handled using the data driven "primitive
ops" system, but certain operations require special handling that has
access to the AST/IR directly and can make decisions/optimizations
based on it. These special cases can be implemented here.

For example, we use specializers to statically emit the length of a
fixed length tuple and to emit optimized code for any()/all() calls with
generator comprehensions as the argument.

See comment below for more documentation.

---
## _apply_specialization
```python
from specialize import _apply_specialization
```



---
## apply_function_specialization
```python
from specialize import apply_function_specialization
```

Invoke the Specializer callback for a function if one has been registered

---
## apply_method_specialization
```python
from specialize import apply_method_specialization
```

Invoke the Specializer callback for a method if one has been registered

---
## specialize_function
```python
from specialize import specialize_function
```

Decorator to register a function as being a specializer.

There may exist multiple specializers for one function. When
translating method calls, the earlier appended specializer has
higher priority.

---
## translate_globals
```python
from specialize import translate_globals
```



---
## translate_builtins_with_unary_dunder
```python
from specialize import translate_builtins_with_unary_dunder
```

Specialize calls on native classes that implement the associated dunder.

E.g. i64(x) gets specialized to x.__int__() if x is a native instance.

---
## translate_len
```python
from specialize import translate_len
```



---
## dict_methods_fast_path
```python
from specialize import dict_methods_fast_path
```

Specialize a common case when list() is called on a dictionary
view method call.

For example:
    foo = list(bar.keys())

---
## translate_list_from_generator_call
```python
from specialize import translate_list_from_generator_call
```

Special case for simplest list comprehension.

For example:
    list(f(x) for x in some_list/some_tuple/some_str)
'translate_list_comprehension()' would take care of other cases
if this fails.

---
## translate_tuple_from_generator_call
```python
from specialize import translate_tuple_from_generator_call
```

Special case for simplest tuple creation from a generator.

For example:
    tuple(f(x) for x in some_list/some_tuple/some_str)
'translate_safe_generator_call()' would take care of other cases
if this fails.

---
## translate_set_from_generator_call
```python
from specialize import translate_set_from_generator_call
```

Special case for set creation from a generator.

For example:
    set(f(...) for ... in iterator/nested_generators...)

---
## faster_min_max
```python
from specialize import faster_min_max
```



---
## translate_safe_generator_call
```python
from specialize import translate_safe_generator_call
```

Special cases for things that consume iterators where we know we
can safely compile a generator into a list.

---
## translate_any_call
```python
from specialize import translate_any_call
```



---
## translate_all_call
```python
from specialize import translate_all_call
```



---
## any_all_helper
```python
from specialize import any_all_helper
```



---
## translate_sum_call
```python
from specialize import translate_sum_call
```



---
## translate_dataclasses_field_call
```python
from specialize import translate_dataclasses_field_call
```

Special case for 'dataclasses.field', 'attr.attrib', and 'attr.Factory'
function calls because the results of such calls are type-checked
by mypy using the types of the arguments to their respective
functions, resulting in attempted coercions by mypyc that throw a
runtime error.

---
## translate_next_call
```python
from specialize import translate_next_call
```

Special case for calling next() on a generator expression, an
idiom that shows up some in mypy.

For example, next(x for x in l if x.id == 12, None) will
generate code that searches l for an element where x.id == 12
and produce the first such object, or None if no such element
exists.

---
## translate_isinstance
```python
from specialize import translate_isinstance
```

Special case for builtins.isinstance.

Prevent coercions on the thing we are checking the instance of -
there is no need to coerce something to a new type before checking
what type it is, and the coercion could lead to bugs.

---
## translate_dict_setdefault
```python
from specialize import translate_dict_setdefault
```

Special case for 'dict.setdefault' which would only construct
default empty collection when needed.

The dict_setdefault_spec_init_op checks whether the dict contains
the key and would construct the empty collection only once.

For example, this specializer works for the following cases:
     d.setdefault(key, set()).add(value)
     d.setdefault(key, []).append(value)
     d.setdefault(key, {})[inner_key] = inner_val

---
## translate_str_format
```python
from specialize import translate_str_format
```



---
## translate_fstring
```python
from specialize import translate_fstring
```

Special case for f-string, which is translated into str.join()
in mypy AST.

This specializer optimizes simplest f-strings which don't contain
any format operation.

---
## translate_i64
```python
from specialize import translate_i64
```



---
## translate_i32
```python
from specialize import translate_i32
```



---
## translate_i16
```python
from specialize import translate_i16
```



---
## translate_u8
```python
from specialize import translate_u8
```



---
## truncate_literal
```python
from specialize import truncate_literal
```

If value is an integer literal value, truncate it to given native int rtype.

For example, truncate 256 into 0 if rtype is u8.

---
## translate_int
```python
from specialize import translate_int
```



---
## translate_bool
```python
from specialize import translate_bool
```



---
## translate_float
```python
from specialize import translate_float
```



---
## wrapper
```python
from specialize import wrapper
```



---
## gen_inner_stmts
```python
from specialize import gen_inner_stmts
```



---
## build_ir
```python
from main import build_ir
```

Build basic IR for a set of modules that have been type-checked by mypy.

The returned IR is not complete and requires additional
transformations, such as the insertion of refcount handling.

---
## transform_mypy_file
```python
from main import transform_mypy_file
```

Generate IR for a single module.

---
## __name__
```python
from for_helpers import __name__
```

Helpers for generating for loops and comprehensions.

We special case certain kinds for loops such as "for x in range(...)"
for better efficiency.  Each for loop generator class below deals one
such special case.

---
## for_loop_helper
```python
from for_helpers import for_loop_helper
```

Generate IR for a loop.

Args:
    index: the loop index Lvalue
    expr: the expression to iterate over
    body_insts: a function that generates the body of the loop
    else_insts: a function that generates the else block instructions

---
## for_loop_helper_with_index
```python
from for_helpers import for_loop_helper_with_index
```

Generate IR for a sequence iteration.

This function only works for sequence type. Compared to for_loop_helper,
it would feed iteration index to body_insts.

Args:
    index: the loop index Lvalue
    expr: the expression to iterate over
    body_insts: a function that generates the body of the loop.
                It needs a index as parameter.

---
## sequence_from_generator_preallocate_helper
```python
from for_helpers import sequence_from_generator_preallocate_helper
```

Generate a new tuple or list from a simple generator expression.

Currently we only optimize for simplest generator expression, which means that
there is no condition list in the generator and only one original sequence with
one index is allowed.

e.g.  (1) tuple(f(x) for x in a_list/a_tuple)
      (2) list(f(x) for x in a_list/a_tuple)
      (3) [f(x) for x in a_list/a_tuple]
RTuple as an original sequence is not supported yet.

Args:
    empty_op_llbuilder: A function that can generate an empty sequence op when
        passed in length. See `new_list_op_with_length` and `new_tuple_op_with_length`
        for detailed implementation.
    set_item_op: A primitive that can modify an arbitrary position of a sequence.
        The op should have three arguments:
            - Self
            - Target position
            - New Value
        See `new_list_set_item_op` and `new_tuple_set_item_op` for detailed
        implementation.

---
## translate_list_comprehension
```python
from for_helpers import translate_list_comprehension
```



---
## raise_error_if_contains_unreachable_names
```python
from for_helpers import raise_error_if_contains_unreachable_names
```

Raise a runtime error and return True if generator contains unreachable names.

False is returned if the generator can be safely transformed without crashing.
(It may still be unreachable!)

---
## translate_set_comprehension
```python
from for_helpers import translate_set_comprehension
```



---
## comprehension_helper
```python
from for_helpers import comprehension_helper
```

Helper function for list comprehensions.

Args:
    loop_params: a list of (index, expr, [conditions]) tuples defining nested loops:
        - "index" is the Lvalue indexing that loop;
        - "expr" is the expression for the object to be iterated over;
        - "conditions" is a list of conditions, evaluated in order with short-circuiting,
            that must all be true for the loop body to be executed
    gen_inner_stmts: function to generate the IR for the body of the innermost loop

---
## is_range_ref
```python
from for_helpers import is_range_ref
```



---
## make_for_loop_generator
```python
from for_helpers import make_for_loop_generator
```

Return helper object for generating a for loop over an iterable.

If "nested" is True, this is a nested iterator such as "e" in "enumerate(e)".

---
## ForGenerator
```python
from for_helpers import ForGenerator
```

Abstract base class for generating for loops.

---
## ForIterable
```python
from for_helpers import ForIterable
```

Generate IR for a for loop over an arbitrary iterable (the general case).

---
## ForAsyncIterable
```python
from for_helpers import ForAsyncIterable
```

Generate IR for an async for loop.

---
## unsafe_index
```python
from for_helpers import unsafe_index
```

Emit a potentially unsafe index into a target.

---
## ForSequence
```python
from for_helpers import ForSequence
```

Generate optimized IR for a for loop over a sequence.

Supports iterating in both forward and reverse.

---
## ForDictionaryCommon
```python
from for_helpers import ForDictionaryCommon
```

Generate optimized IR for a for loop over dictionary keys/values.

The logic is pretty straightforward, we use PyDict_Next() API wrapped in
a tuple, so that we can modify only a single register. The layout of the tuple:
  * f0: are there more items (bool)
  * f1: current offset (int)
  * f2: next key (object)
  * f3: next value (object)
For more info see https://docs.python.org/3/c-api/dict.html#c.PyDict_Next.

Note that for subclasses we fall back to generic PyObject_GetIter() logic,
since they may override some iteration methods in subtly incompatible manner.
The fallback logic is implemented in CPy.h via dynamic type check.

---
## ForDictionaryKeys
```python
from for_helpers import ForDictionaryKeys
```

Generate optimized IR for a for loop over dictionary keys.

---
## ForDictionaryValues
```python
from for_helpers import ForDictionaryValues
```

Generate optimized IR for a for loop over dictionary values.

---
## ForDictionaryItems
```python
from for_helpers import ForDictionaryItems
```

Generate optimized IR for a for loop over dictionary items.

---
## ForRange
```python
from for_helpers import ForRange
```

Generate optimized IR for a for loop over an integer range.

---
## ForInfiniteCounter
```python
from for_helpers import ForInfiniteCounter
```

Generate optimized IR for a for loop counting from 0 to infinity.

---
## ForEnumerate
```python
from for_helpers import ForEnumerate
```

Generate optimized IR for a for loop of form "for i, x in enumerate(it)".

---
## ForZip
```python
from for_helpers import ForZip
```

Generate IR for a for loop of form `for x, ... in zip(a, ...)`.

---
## gen_inner_stmts
```python
from for_helpers import gen_inner_stmts
```



---
## handle_loop
```python
from for_helpers import handle_loop
```

Generate IR for a loop.

Given a list of (index, expression, [conditions]) tuples, generate IR
for the nested loops the list defines.

---
## loop_contents
```python
from for_helpers import loop_contents
```

Generate the body of the loop.

Args:
    conds: a list of conditions to be evaluated (in order, with short circuiting)
        to gate the body of the loop
    remaining_loop_params: the parameters for any further nested loops; if it's empty
        we'll instead evaluate the "gen_inner_stmts" function

---
## __init__
```python
from for_helpers import __init__
```



---
## need_cleanup
```python
from for_helpers import need_cleanup
```



---
## add_cleanup
```python
from for_helpers import add_cleanup
```

Add post-loop cleanup, if needed.

---
## gen_condition
```python
from for_helpers import gen_condition
```



---
## begin_body
```python
from for_helpers import begin_body
```



---
## gen_step
```python
from for_helpers import gen_step
```



---
## gen_cleanup
```python
from for_helpers import gen_cleanup
```



---
## load_len
```python
from for_helpers import load_len
```

A helper to get collection length, used by several subclasses.

---
## init
```python
from for_helpers import init
```



---
## except_match
```python
from for_helpers import except_match
```



---
## try_body
```python
from for_helpers import try_body
```



---
## except_body
```python
from for_helpers import except_body
```



---
## set_item
```python
from for_helpers import set_item
```



---
## __name__
```python
from expression import __name__
```

Evaluate match expressions, as used by `-k` and `-m`.

The grammar is:

expression: expr? EOF
expr:       and_expr ('or' and_expr)*
and_expr:   not_expr ('and' not_expr)*
not_expr:   'not' not_expr | '(' expr ')' | ident kwargs?

ident:      (\w|:|\+|-|\.|\[|\]|\\|/)+
kwargs:     ('(' name '=' value ( ', ' name '=' value )*  ')')
name:       a valid ident, but not a reserved keyword
value:      (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None'

The semantics are:

- Empty expression evaluates to False.
- ident evaluates to True or False according to a provided matcher function.
- or/and/not evaluate according to the usual boolean semantics.
- ident with parentheses and keyword arguments evaluates to True or False according to a provided matcher function.

---
## transform_name_expr
```python
from expression import transform_name_expr
```



---
## transform_member_expr
```python
from expression import transform_member_expr
```



---
## check_instance_attribute_access_through_class
```python
from expression import check_instance_attribute_access_through_class
```

Report error if accessing an instance attribute through class object.

---
## transform_super_expr
```python
from expression import transform_super_expr
```



---
## transform_call_expr
```python
from expression import transform_call_expr
```



---
## translate_call
```python
from expression import translate_call
```



---
## translate_refexpr_call
```python
from expression import translate_refexpr_call
```

Translate a non-method call.

---
## translate_method_call
```python
from expression import translate_method_call
```

Generate IR for an arbitrary call of form e.m(...).

This can also deal with calls to module-level functions.

---
## call_classmethod
```python
from expression import call_classmethod
```



---
## translate_super_method_call
```python
from expression import translate_super_method_call
```



---
## translate_cast_expr
```python
from expression import translate_cast_expr
```



---
## transform_unary_expr
```python
from expression import transform_unary_expr
```



---
## transform_op_expr
```python
from expression import transform_op_expr
```



---
## try_optimize_int_floor_divide
```python
from expression import try_optimize_int_floor_divide
```

Replace // with a power of two with a right shift, if possible.

---
## transform_index_expr
```python
from expression import transform_index_expr
```



---
## try_constant_fold
```python
from expression import try_constant_fold
```

Return the constant value of an expression if possible.

Return None otherwise.

---
## try_gen_slice_op
```python
from expression import try_gen_slice_op
```

Generate specialized slice op for some index expressions.

Return None if a specialized op isn't available.

This supports obj[x:y], obj[:x], and obj[x:] for a few types.

---
## transform_conditional_expr
```python
from expression import transform_conditional_expr
```



---
## set_literal_values
```python
from expression import set_literal_values
```



---
## precompute_set_literal
```python
from expression import precompute_set_literal
```

Try to pre-compute a frozenset literal during module initialization.

Return None if it's not possible.

Supported items:
 - Anything supported by irbuild.constant_fold.constant_fold_expr()
 - None, True, and False
 - Tuple literals with only items listed above

---
## transform_comparison_expr
```python
from expression import transform_comparison_expr
```



---
## translate_is_none
```python
from expression import translate_is_none
```



---
## transform_basic_comparison
```python
from expression import transform_basic_comparison
```



---
## translate_printf_style_formatting
```python
from expression import translate_printf_style_formatting
```



---
## transform_int_expr
```python
from expression import transform_int_expr
```



---
## transform_float_expr
```python
from expression import transform_float_expr
```



---
## transform_complex_expr
```python
from expression import transform_complex_expr
```



---
## transform_str_expr
```python
from expression import transform_str_expr
```



---
## transform_bytes_expr
```python
from expression import transform_bytes_expr
```



---
## transform_ellipsis
```python
from expression import transform_ellipsis
```



---
## transform_list_expr
```python
from expression import transform_list_expr
```



---
## _visit_list_display
```python
from expression import _visit_list_display
```



---
## transform_tuple_expr
```python
from expression import transform_tuple_expr
```



---
## _visit_tuple_display
```python
from expression import _visit_tuple_display
```

Create a list, then turn it into a tuple.

---
## transform_dict_expr
```python
from expression import transform_dict_expr
```

First accepts all keys and values, then makes a dict out of them.

---
## transform_set_expr
```python
from expression import transform_set_expr
```



---
## _visit_display
```python
from expression import _visit_display
```



---
## transform_list_comprehension
```python
from expression import transform_list_comprehension
```



---
## transform_set_comprehension
```python
from expression import transform_set_comprehension
```



---
## transform_dictionary_comprehension
```python
from expression import transform_dictionary_comprehension
```



---
## transform_slice_expr
```python
from expression import transform_slice_expr
```



---
## transform_generator_expr
```python
from expression import transform_generator_expr
```



---
## transform_assignment_expr
```python
from expression import transform_assignment_expr
```



---
## transform_math_literal
```python
from expression import transform_math_literal
```



---
## go
```python
from expression import go
```



---
## gen_inner_stmts
```python
from expression import gen_inner_stmts
```



---
## get_arg
```python
from expression import get_arg
```



---
## __name__
```python
from prepare import __name__
```

Prepares a distribution for installation

---
## build_type_map
```python
from prepare import build_type_map
```



---
## is_from_module
```python
from prepare import is_from_module
```



---
## load_type_map
```python
from prepare import load_type_map
```

Populate a Mapper with deserialized IR from a list of modules.

---
## get_module_func_defs
```python
from prepare import get_module_func_defs
```

Collect all of the (non-method) functions declared in a module.

---
## prepare_func_def
```python
from prepare import prepare_func_def
```



---
## prepare_method_def
```python
from prepare import prepare_method_def
```



---
## is_valid_multipart_property_def
```python
from prepare import is_valid_multipart_property_def
```



---
## can_subclass_builtin
```python
from prepare import can_subclass_builtin
```



---
## prepare_class_def
```python
from prepare import prepare_class_def
```

Populate the interface-level information in a class IR.

This includes attribute and method declarations, and the MRO, among other things, but
method bodies are generated in a later pass.

---
## prepare_methods_and_attributes
```python
from prepare import prepare_methods_and_attributes
```

Populate attribute and method declarations.

---
## prepare_implicit_property_accessors
```python
from prepare import prepare_implicit_property_accessors
```



---
## add_property_methods_for_attribute_if_needed
```python
from prepare import add_property_methods_for_attribute_if_needed
```

Add getter and/or setter for attribute if defined as property in a base class.

Only add declarations. The body IR will be synthesized later during irbuild.

---
## add_getter_declaration
```python
from prepare import add_getter_declaration
```



---
## add_setter_declaration
```python
from prepare import add_setter_declaration
```



---
## prepare_init_method
```python
from prepare import prepare_init_method
```



---
## prepare_non_ext_class_def
```python
from prepare import prepare_non_ext_class_def
```



---
## SingledispatchInfo
```python
from prepare import SingledispatchInfo
```



---
## find_singledispatch_register_impls
```python
from prepare import find_singledispatch_register_impls
```



---
## SingledispatchVisitor
```python
from prepare import SingledispatchVisitor
```



---
## RegisteredImpl
```python
from prepare import RegisteredImpl
```



---
## get_singledispatch_register_call_info
```python
from prepare import get_singledispatch_register_call_info
```



---
## registered_impl_from_possible_register_call
```python
from prepare import registered_impl_from_possible_register_call
```



---
## __init__
```python
from prepare import __init__
```



---
## visit_decorator
```python
from prepare import visit_decorator
```



---
## __name__
```python
from function import __name__
```

For compatibility with numpy libraries, pandas functions or methods have to
accept '*args' and '**kwargs' parameters to accommodate numpy arguments that
are not actually used or respected in the pandas implementation.

To ensure that users do not abuse these parameters, validation is performed in
'validators.py' to make sure that any extra parameters passed correspond ONLY
to those in the numpy signature. Part of that validation includes whether or
not the user attempted to pass in non-default values for these extraneous
parameters. As we want to discourage users from relying on these parameters
when calling the pandas implementation, we want them only to pass in the
default values for these parameters.

This module provides a set of commonly used default arguments for functions and
methods that are spread throughout the codebase. This module will make it
easier to adjust to future upstream changes in the analogous numpy signatures.

---
## transform_func_def
```python
from function import transform_func_def
```



---
## transform_overloaded_func_def
```python
from function import transform_overloaded_func_def
```



---
## transform_decorator
```python
from function import transform_decorator
```



---
## transform_lambda_expr
```python
from function import transform_lambda_expr
```



---
## gen_func_item
```python
from function import gen_func_item
```

Generate and return the FuncIR for a given FuncDef.

If the given FuncItem is a nested function, then we generate a
callable class representing the function and use that instead of
the actual function. if the given FuncItem contains a nested
function, then we generate an environment class so that inner
nested functions can access the environment of the given FuncDef.

Consider the following nested function:

    def a() -> None:
        def b() -> None:
            def c() -> None:
                return None
            return None
        return None

The classes generated would look something like the following.

            has pointer to        +-------+
    +-------------------------->  | a_env |
    |                             +-------+
    |                                 ^
    |                                 | has pointer to
+-------+     associated with     +-------+
| b_obj |   ------------------->  | b_env |
+-------+                         +-------+
                                      ^
                                      |
+-------+         has pointer to      |
| c_obj |   --------------------------+
+-------+

---
## has_nested_func_self_reference
```python
from function import has_nested_func_self_reference
```

Does a nested function contain a self-reference in its body?

If a nested function only has references in the surrounding function,
we don't need to add it to the environment.

---
## gen_func_ir
```python
from function import gen_func_ir
```

Generate the FuncIR for a function.

This takes the basic blocks and function info of a particular
function and returns the IR. If the function is nested,
also returns the register containing the instance of the
corresponding callable class.

---
## handle_ext_method
```python
from function import handle_ext_method
```



---
## handle_non_ext_method
```python
from function import handle_non_ext_method
```



---
## calculate_arg_defaults
```python
from function import calculate_arg_defaults
```

Calculate default argument values and store them.

They are stored in statics for top level functions and in
the function objects for nested functions (while constants are
still stored computed on demand).

---
## gen_func_ns
```python
from function import gen_func_ns
```

Generate a namespace for a nested function using its outer function names.

---
## load_decorated_func
```python
from function import load_decorated_func
```

Apply decorators to a function.

Given a decorated FuncDef and an instance of the callable class
representing that FuncDef, apply the corresponding decorator
functions on that decorated FuncDef and return the decorated
function.

---
## is_decorated
```python
from function import is_decorated
```



---
## gen_glue
```python
from function import gen_glue
```

Generate glue methods that mediate between different method types in subclasses.

Works on both properties and methods. See gen_glue_methods below
for more details.

If do_py_ops is True, then the glue methods should use generic
C API operations instead of direct calls, to enable generating
"shadow" glue methods that work with interpreted subclasses.

---
## ArgInfo
```python
from function import ArgInfo
```



---
## get_args
```python
from function import get_args
```



---
## gen_glue_method
```python
from function import gen_glue_method
```

Generate glue methods that mediate between different method types in subclasses.

For example, if we have:

class A:
    def f(builder: IRBuilder, x: int) -> object: ...

then it is totally permissible to have a subclass

class B(A):
    def f(builder: IRBuilder, x: object) -> int: ...

since '(object) -> int' is a subtype of '(int) -> object' by the usual
contra/co-variant function subtyping rules.

The trickiness here is that int and object have different
runtime representations in mypyc, so A.f and B.f have
different signatures at the native C level. To deal with this,
we need to generate glue methods that mediate between the
different versions by coercing the arguments and return
values.

If do_pycall is True, then make the call using the C API
instead of a native call.

---
## check_native_override
```python
from function import check_native_override
```

Report an error if an override changes signature in unsupported ways.

Glue methods can work around many signature changes but not all of them.

---
## gen_glue_property
```python
from function import gen_glue_property
```

Generate glue methods for properties that mediate between different subclass types.

Similarly to methods, properties of derived types can be covariantly subtyped. Thus,
properties also require glue. However, this only requires the return type to change.
Further, instead of a method call, an attribute get is performed.

If do_pygetattr is True, then get the attribute using the Python C
API instead of a native call.

---
## get_func_target
```python
from function import get_func_target
```

Given a FuncDef, return the target for the instance of its callable class.

If the function was not already defined somewhere, then define it
and add it to the current environment.

---
## load_type
```python
from function import load_type
```



---
## load_func
```python
from function import load_func
```



---
## generate_singledispatch_dispatch_function
```python
from function import generate_singledispatch_dispatch_function
```



---
## gen_calls_to_correct_impl
```python
from function import gen_calls_to_correct_impl
```



---
## gen_dispatch_func_ir
```python
from function import gen_dispatch_func_ir
```

Create a dispatch function (a function that checks the first argument type and dispatches
to the correct implementation)

---
## generate_dispatch_glue_native_function
```python
from function import generate_dispatch_glue_native_function
```



---
## generate_singledispatch_callable_class_ctor
```python
from function import generate_singledispatch_callable_class_ctor
```

Create an __init__ that sets registry and dispatch_cache to empty dicts

---
## add_register_method_to_callable_class
```python
from function import add_register_method_to_callable_class
```



---
## load_singledispatch_registry
```python
from function import load_singledispatch_registry
```



---
## singledispatch_main_func_name
```python
from function import singledispatch_main_func_name
```



---
## get_registry_identifier
```python
from function import get_registry_identifier
```



---
## maybe_insert_into_registry_dict
```python
from function import maybe_insert_into_registry_dict
```



---
## get_native_impl_ids
```python
from function import get_native_impl_ids
```

Return a dict of registered implementation to native implementation ID for all
implementations

---
## gen_property_getter_ir
```python
from function import gen_property_getter_ir
```

Generate an implicit trivial property getter for an attribute.

These are used if an attribute can also be accessed as a property.

---
## gen_property_setter_ir
```python
from function import gen_property_setter_ir
```

Generate an implicit trivial property setter for an attribute.

These are used if an attribute can also be accessed as a property.

---
## gen_native_func_call_and_return
```python
from function import gen_native_func_call_and_return
```



---
## __name__
```python
from match import __name__
```



---
## MatchVisitor
```python
from match import MatchVisitor
```



---
## prep_sequence_pattern
```python
from match import prep_sequence_pattern
```



---
## __init__
```python
from match import __init__
```



---
## build_match_body
```python
from match import build_match_body
```



---
## visit_match_stmt
```python
from match import visit_match_stmt
```



---
## visit_value_pattern
```python
from match import visit_value_pattern
```



---
## visit_or_pattern
```python
from match import visit_or_pattern
```



---
## visit_class_pattern
```python
from match import visit_class_pattern
```



---
## visit_as_pattern
```python
from match import visit_as_pattern
```



---
## visit_singleton_pattern
```python
from match import visit_singleton_pattern
```



---
## visit_mapping_pattern
```python
from match import visit_mapping_pattern
```



---
## visit_sequence_pattern
```python
from match import visit_sequence_pattern
```



---
## bind_as_pattern
```python
from match import bind_as_pattern
```



---
## enter_subpattern
```python
from match import enter_subpattern
```



---
## __name__
```python
from setup import __name__
```

Build an example package using the limited Python C API.

---
## build_ext_custom
```python
from setup import build_ext_custom
```



---
## get_library_names
```python
from setup import get_library_names
```



---
## run
```python
from setup import run
```



---
## __name__
```python
from blockfreq import __name__
```

Find basic blocks that are likely to be executed frequently.

For example, this would not include blocks that have exception handlers.

We can use different optimization heuristics for common and rare code. For
example, we can make IR fast to compile instead of fast to execute for rare
code.

---
## frequently_executed_blocks
```python
from blockfreq import frequently_executed_blocks
```



---
## __name__
```python
from ircheck import __name__
```

Utilities for checking that internal ir is valid and consistent.

---
## FnError
```python
from ircheck import FnError
```



---
## check_func_ir
```python
from ircheck import check_func_ir
```

Applies validations to a given function ir and returns a list of errors found.

---
## IrCheckException
```python
from ircheck import IrCheckException
```



---
## assert_func_ir_valid
```python
from ircheck import assert_func_ir_valid
```



---
## check_op_sources_valid
```python
from ircheck import check_op_sources_valid
```



---
## can_coerce_to
```python
from ircheck import can_coerce_to
```

Check if src can be assigned to dest_rtype.

Currently okay to have false positives.

---
## OpChecker
```python
from ircheck import OpChecker
```



---
## __init__
```python
from ircheck import __init__
```



---
## __eq__
```python
from ircheck import __eq__
```



---
## __repr__
```python
from ircheck import __repr__
```



---
## fail
```python
from ircheck import fail
```



---
## check_control_op_targets
```python
from ircheck import check_control_op_targets
```



---
## check_type_coercion
```python
from ircheck import check_type_coercion
```



---
## check_compatibility
```python
from ircheck import check_compatibility
```



---
## expect_float
```python
from ircheck import expect_float
```



---
## expect_non_float
```python
from ircheck import expect_non_float
```



---
## visit_goto
```python
from ircheck import visit_goto
```



---
## visit_branch
```python
from ircheck import visit_branch
```



---
## visit_return
```python
from ircheck import visit_return
```



---
## visit_unreachable
```python
from ircheck import visit_unreachable
```



---
## visit_assign
```python
from ircheck import visit_assign
```



---
## visit_assign_multi
```python
from ircheck import visit_assign_multi
```



---
## visit_load_error_value
```python
from ircheck import visit_load_error_value
```



---
## check_tuple_items_valid_literals
```python
from ircheck import check_tuple_items_valid_literals
```



---
## check_frozenset_items_valid_literals
```python
from ircheck import check_frozenset_items_valid_literals
```



---
## visit_load_literal
```python
from ircheck import visit_load_literal
```



---
## visit_get_attr
```python
from ircheck import visit_get_attr
```



---
## visit_set_attr
```python
from ircheck import visit_set_attr
```



---
## visit_load_static
```python
from ircheck import visit_load_static
```



---
## visit_init_static
```python
from ircheck import visit_init_static
```



---
## visit_tuple_get
```python
from ircheck import visit_tuple_get
```



---
## visit_tuple_set
```python
from ircheck import visit_tuple_set
```



---
## visit_inc_ref
```python
from ircheck import visit_inc_ref
```



---
## visit_dec_ref
```python
from ircheck import visit_dec_ref
```



---
## visit_call
```python
from ircheck import visit_call
```



---
## visit_method_call
```python
from ircheck import visit_method_call
```



---
## visit_cast
```python
from ircheck import visit_cast
```



---
## visit_box
```python
from ircheck import visit_box
```



---
## visit_unbox
```python
from ircheck import visit_unbox
```



---
## visit_raise_standard_error
```python
from ircheck import visit_raise_standard_error
```



---
## visit_call_c
```python
from ircheck import visit_call_c
```



---
## visit_primitive_op
```python
from ircheck import visit_primitive_op
```



---
## visit_truncate
```python
from ircheck import visit_truncate
```



---
## visit_extend
```python
from ircheck import visit_extend
```



---
## visit_load_global
```python
from ircheck import visit_load_global
```



---
## visit_int_op
```python
from ircheck import visit_int_op
```



---
## visit_comparison_op
```python
from ircheck import visit_comparison_op
```



---
## visit_float_op
```python
from ircheck import visit_float_op
```



---
## visit_float_neg
```python
from ircheck import visit_float_neg
```



---
## visit_float_comparison_op
```python
from ircheck import visit_float_comparison_op
```



---
## visit_load_mem
```python
from ircheck import visit_load_mem
```



---
## visit_set_mem
```python
from ircheck import visit_set_mem
```



---
## visit_get_element_ptr
```python
from ircheck import visit_get_element_ptr
```



---
## visit_load_address
```python
from ircheck import visit_load_address
```



---
## visit_keep_alive
```python
from ircheck import visit_keep_alive
```



---
## visit_unborrow
```python
from ircheck import visit_unborrow
```



---
## __name__
```python
from attrdefined import __name__
```

Always defined attribute analysis.

An always defined attribute has some statements in __init__ or the
class body that cause the attribute to be always initialized when an
instance is constructed. It must also not be possible to read the
attribute before initialization, and it can't be deletable.

We can assume that the value is always defined when reading an always
defined attribute. Otherwise we'll need to raise AttributeError if the
value is undefined (i.e. has the error value).

We use data flow analysis to figure out attributes that are always
defined. Example:

  class C:
      def __init__(self) -> None:
          self.x = 0
          if func():
              self.y = 1
          else:
              self.y = 2
              self.z = 3

In this example, the attributes 'x' and 'y' are always defined, but 'z'
is not. The analysis assumes that we know that there won't be any subclasses.

The analysis also works if there is a known, closed set of subclasses.
An attribute defined in a base class can only be always defined if it's
also always defined in all subclasses.

As soon as __init__ contains an op that can 'leak' self to another
function, we will stop inferring always defined attributes, since the
analysis is mostly intra-procedural and only looks at __init__ methods.
The called code could read an uninitialized attribute. Example:

  class C:
      def __init__(self) -> None:
          self.x = self.foo()

      def foo(self) -> int:
          ...

Now we won't infer 'x' as always defined, since 'foo' might read 'x'
before initialization.

As an exception to the above limitation, we perform inter-procedural
analysis of super().__init__ calls, since these are very common.

Our analysis is somewhat optimistic. We assume that nobody calls a
method of a partially uninitialized object through gc.get_objects(), in
particular. Code like this could potentially cause a segfault with a null
pointer dereference. This seems very unlikely to be an issue in practice,
however.

Accessing an attribute via getattr always checks for undefined attributes
and thus works if the object is partially uninitialized. This can be used
as a workaround if somebody ever needs to inspect partially uninitialized
objects via gc.get_objects().

The analysis runs after IR building as a separate pass. Since we only
run this on __init__ methods, this analysis pass will be fairly quick.

---
## analyze_always_defined_attrs
```python
from attrdefined import analyze_always_defined_attrs
```

Find always defined attributes all classes of a compilation unit.

Also tag attribute initialization ops to not decref the previous
value (as this would read a NULL pointer and segfault).

Update the _always_initialized_attrs, _sometimes_initialized_attrs
and init_self_leak attributes in ClassIR instances.

This is the main entry point.

---
## analyze_always_defined_attrs_in_class
```python
from attrdefined import analyze_always_defined_attrs_in_class
```



---
## find_always_defined_attributes
```python
from attrdefined import find_always_defined_attributes
```

Find attributes that are always initialized in some basic blocks.

The analysis results are expected to be up-to-date for the blocks.

Return a set of always defined attributes.

---
## find_sometimes_defined_attributes
```python
from attrdefined import find_sometimes_defined_attributes
```

Find attributes that are sometimes initialized in some basic blocks.

---
## mark_attr_initialiation_ops
```python
from attrdefined import mark_attr_initialiation_ops
```

Tag all SetAttr ops in the basic blocks that initialize attributes.

Initialization ops assume that the previous attribute value is the error value,
so there's no need to decref or check for definedness.

---
## attributes_initialized_by_init_call
```python
from attrdefined import attributes_initialized_by_init_call
```

Calculate attributes that are always initialized by a super().__init__ call.

---
## attributes_maybe_initialized_by_init_call
```python
from attrdefined import attributes_maybe_initialized_by_init_call
```

Calculate attributes that may be initialized by a super().__init__ call.

---
## AttributeMaybeDefinedVisitor
```python
from attrdefined import AttributeMaybeDefinedVisitor
```

Find attributes that may have been defined via some code path.

Consider initializations in class body and assignments to 'self.x'
and calls to base class '__init__'.

---
## analyze_maybe_defined_attrs_in_init
```python
from attrdefined import analyze_maybe_defined_attrs_in_init
```



---
## AttributeMaybeUndefinedVisitor
```python
from attrdefined import AttributeMaybeUndefinedVisitor
```

Find attributes that may be undefined via some code path.

Consider initializations in class body, assignments to 'self.x'
and calls to base class '__init__'.

---
## analyze_maybe_undefined_attrs_in_init
```python
from attrdefined import analyze_maybe_undefined_attrs_in_init
```



---
## update_always_defined_attrs_using_subclasses
```python
from attrdefined import update_always_defined_attrs_using_subclasses
```

Remove attributes not defined in all subclasses from always defined attrs.

---
## detect_undefined_bitmap
```python
from attrdefined import detect_undefined_bitmap
```



---
## __init__
```python
from attrdefined import __init__
```



---
## visit_branch
```python
from attrdefined import visit_branch
```



---
## visit_return
```python
from attrdefined import visit_return
```



---
## visit_unreachable
```python
from attrdefined import visit_unreachable
```



---
## visit_register_op
```python
from attrdefined import visit_register_op
```



---
## visit_assign
```python
from attrdefined import visit_assign
```



---
## visit_assign_multi
```python
from attrdefined import visit_assign_multi
```



---
## visit_set_mem
```python
from attrdefined import visit_set_mem
```



---
## __name__
```python
from selfleaks import __name__
```



---
## SelfLeakedVisitor
```python
from selfleaks import SelfLeakedVisitor
```

Analyze whether 'self' may be seen by arbitrary code in '__init__'.

More formally, the set is not empty if along some path from IR entry point
arbitrary code could have been executed that has access to 'self'.

(We don't consider access via 'gc.get_objects()'.)

---
## analyze_self_leaks
```python
from selfleaks import analyze_self_leaks
```



---
## __init__
```python
from selfleaks import __init__
```



---
## visit_goto
```python
from selfleaks import visit_goto
```



---
## visit_branch
```python
from selfleaks import visit_branch
```



---
## visit_return
```python
from selfleaks import visit_return
```



---
## visit_unreachable
```python
from selfleaks import visit_unreachable
```



---
## visit_assign
```python
from selfleaks import visit_assign
```



---
## visit_assign_multi
```python
from selfleaks import visit_assign_multi
```



---
## visit_set_mem
```python
from selfleaks import visit_set_mem
```



---
## visit_call
```python
from selfleaks import visit_call
```



---
## visit_method_call
```python
from selfleaks import visit_method_call
```



---
## visit_load_error_value
```python
from selfleaks import visit_load_error_value
```



---
## visit_load_literal
```python
from selfleaks import visit_load_literal
```



---
## visit_get_attr
```python
from selfleaks import visit_get_attr
```



---
## visit_set_attr
```python
from selfleaks import visit_set_attr
```



---
## visit_load_static
```python
from selfleaks import visit_load_static
```



---
## visit_init_static
```python
from selfleaks import visit_init_static
```



---
## visit_tuple_get
```python
from selfleaks import visit_tuple_get
```



---
## visit_tuple_set
```python
from selfleaks import visit_tuple_set
```



---
## visit_box
```python
from selfleaks import visit_box
```



---
## visit_unbox
```python
from selfleaks import visit_unbox
```



---
## visit_cast
```python
from selfleaks import visit_cast
```



---
## visit_raise_standard_error
```python
from selfleaks import visit_raise_standard_error
```



---
## visit_call_c
```python
from selfleaks import visit_call_c
```



---
## visit_primitive_op
```python
from selfleaks import visit_primitive_op
```



---
## visit_truncate
```python
from selfleaks import visit_truncate
```



---
## visit_extend
```python
from selfleaks import visit_extend
```



---
## visit_load_global
```python
from selfleaks import visit_load_global
```



---
## visit_int_op
```python
from selfleaks import visit_int_op
```



---
## visit_comparison_op
```python
from selfleaks import visit_comparison_op
```



---
## visit_float_op
```python
from selfleaks import visit_float_op
```



---
## visit_float_neg
```python
from selfleaks import visit_float_neg
```



---
## visit_float_comparison_op
```python
from selfleaks import visit_float_comparison_op
```



---
## visit_load_mem
```python
from selfleaks import visit_load_mem
```



---
## visit_get_element_ptr
```python
from selfleaks import visit_get_element_ptr
```



---
## visit_load_address
```python
from selfleaks import visit_load_address
```



---
## visit_keep_alive
```python
from selfleaks import visit_keep_alive
```



---
## visit_unborrow
```python
from selfleaks import visit_unborrow
```



---
## check_register_op
```python
from selfleaks import check_register_op
```



---
## __name__
```python
from dataflow import __name__
```

Data-flow analyses.

---
## CFG
```python
from dataflow import CFG
```

Control-flow graph.

Node 0 is always assumed to be the entry point. There must be a
non-empty set of exits.

---
## get_cfg
```python
from dataflow import get_cfg
```

Calculate basic block control-flow graph.

The result is a dictionary like this:

     basic block index -> (successors blocks, predecesssor blocks)

---
## get_real_target
```python
from dataflow import get_real_target
```



---
## cleanup_cfg
```python
from dataflow import cleanup_cfg
```

Cleanup the control flow graph.

This eliminates obviously dead basic blocks and eliminates blocks that contain
nothing but a single jump.

There is a lot more that could be done.

---
## AnalysisResult
```python
from dataflow import AnalysisResult
```



---
## BaseAnalysisVisitor
```python
from dataflow import BaseAnalysisVisitor
```



---
## DefinedVisitor
```python
from dataflow import DefinedVisitor
```

Visitor for finding defined registers.

Note that this only deals with registers and not temporaries, on
the assumption that we never access temporaries when they might be
undefined.

If strict_errors is True, then we regard any use of LoadErrorValue
as making a register undefined. Otherwise we only do if
`undefines` is set on the error value.

This lets us only consider the things we care about during
uninitialized variable checking while capturing all possibly
undefined things for refcounting.

---
## analyze_maybe_defined_regs
```python
from dataflow import analyze_maybe_defined_regs
```

Calculate potentially defined registers at each CFG location.

A register is defined if it has a value along some path from the initial location.

---
## analyze_must_defined_regs
```python
from dataflow import analyze_must_defined_regs
```

Calculate always defined registers at each CFG location.

This analysis can work before exception insertion, since it is a
sound assumption that registers defined in a block might not be
initialized in its error handler.

A register is defined if it has a value along all paths from the
initial location.

---
## BorrowedArgumentsVisitor
```python
from dataflow import BorrowedArgumentsVisitor
```



---
## analyze_borrowed_arguments
```python
from dataflow import analyze_borrowed_arguments
```

Calculate arguments that can use references borrowed from the caller.

When assigning to an argument, it no longer is borrowed.

---
## UndefinedVisitor
```python
from dataflow import UndefinedVisitor
```



---
## analyze_undefined_regs
```python
from dataflow import analyze_undefined_regs
```

Calculate potentially undefined registers at each CFG location.

A register is undefined if there is some path from initial block
where it has an undefined value.

Function arguments are assumed to be always defined.

---
## non_trivial_sources
```python
from dataflow import non_trivial_sources
```



---
## LivenessVisitor
```python
from dataflow import LivenessVisitor
```



---
## analyze_live_regs
```python
from dataflow import analyze_live_regs
```

Calculate live registers at each CFG location.

A register is live at a location if it can be read along some CFG path starting
from the location.

---
## run_analysis
```python
from dataflow import run_analysis
```

Run a general set-based data flow analysis.

Args:
    blocks: All basic blocks
    cfg: Control-flow graph for the code
    gen_and_kill: Implementation of gen and kill functions for each op
    initial: Value of analysis for the entry points (for a forward analysis) or the
        exit points (for a backward analysis)
    kind: MUST_ANALYSIS or MAYBE_ANALYSIS
    backward: If False, the analysis is a forward analysis; it's backward otherwise
    universe: For a must analysis, the set of all possible values. This is the starting
        value for the work list algorithm, which will narrow this down until reaching a
        fixed point. For a maybe analysis the iteration always starts from an empty set
        and this argument is ignored.

Return analysis results: (before, after)

---
## __init__
```python
from dataflow import __init__
```



---
## __str__
```python
from dataflow import __str__
```



---
## visit_goto
```python
from dataflow import visit_goto
```



---
## visit_register_op
```python
from dataflow import visit_register_op
```



---
## visit_assign
```python
from dataflow import visit_assign
```



---
## visit_assign_multi
```python
from dataflow import visit_assign_multi
```



---
## visit_set_mem
```python
from dataflow import visit_set_mem
```



---
## visit_call
```python
from dataflow import visit_call
```



---
## visit_method_call
```python
from dataflow import visit_method_call
```



---
## visit_load_error_value
```python
from dataflow import visit_load_error_value
```



---
## visit_load_literal
```python
from dataflow import visit_load_literal
```



---
## visit_get_attr
```python
from dataflow import visit_get_attr
```



---
## visit_set_attr
```python
from dataflow import visit_set_attr
```



---
## visit_load_static
```python
from dataflow import visit_load_static
```



---
## visit_init_static
```python
from dataflow import visit_init_static
```



---
## visit_tuple_get
```python
from dataflow import visit_tuple_get
```



---
## visit_tuple_set
```python
from dataflow import visit_tuple_set
```



---
## visit_box
```python
from dataflow import visit_box
```



---
## visit_unbox
```python
from dataflow import visit_unbox
```



---
## visit_cast
```python
from dataflow import visit_cast
```



---
## visit_raise_standard_error
```python
from dataflow import visit_raise_standard_error
```



---
## visit_call_c
```python
from dataflow import visit_call_c
```



---
## visit_primitive_op
```python
from dataflow import visit_primitive_op
```



---
## visit_truncate
```python
from dataflow import visit_truncate
```



---
## visit_extend
```python
from dataflow import visit_extend
```



---
## visit_load_global
```python
from dataflow import visit_load_global
```



---
## visit_int_op
```python
from dataflow import visit_int_op
```



---
## visit_float_op
```python
from dataflow import visit_float_op
```



---
## visit_float_neg
```python
from dataflow import visit_float_neg
```



---
## visit_comparison_op
```python
from dataflow import visit_comparison_op
```



---
## visit_float_comparison_op
```python
from dataflow import visit_float_comparison_op
```



---
## visit_load_mem
```python
from dataflow import visit_load_mem
```



---
## visit_get_element_ptr
```python
from dataflow import visit_get_element_ptr
```



---
## visit_load_address
```python
from dataflow import visit_load_address
```



---
## visit_keep_alive
```python
from dataflow import visit_keep_alive
```



---
## visit_unborrow
```python
from dataflow import visit_unborrow
```



---
## visit_branch
```python
from dataflow import visit_branch
```



---
## visit_return
```python
from dataflow import visit_return
```



---
## visit_unreachable
```python
from dataflow import visit_unreachable
```



---
## __name__
```python
from test_pprint import __name__
```



---
## register
```python
from test_pprint import register
```



---
## make_block
```python
from test_pprint import make_block
```



---
## TestGenerateNames
```python
from test_pprint import TestGenerateNames
```



---
## test_empty
```python
from test_pprint import test_empty
```



---
## test_arg
```python
from test_pprint import test_arg
```



---
## test_int_op
```python
from test_pprint import test_int_op
```



---
## test_assign
```python
from test_pprint import test_assign
```



---
## __name__
```python
from test_rarray import __name__
```

Unit tests for RArray types.

---
## TestRArray
```python
from test_rarray import TestRArray
```



---
## test_basics
```python
from test_rarray import test_basics
```



---
## test_str_conversion
```python
from test_rarray import test_str_conversion
```



---
## test_eq
```python
from test_rarray import test_eq
```



---
## test_hash
```python
from test_rarray import test_hash
```



---
## test_alignment
```python
from test_rarray import test_alignment
```



---
## test_size
```python
from test_rarray import test_size
```



---
## __name__
```python
from test_lowering import __name__
```

Runner for lowering transform tests.

---
## TestLowering
```python
from test_lowering import TestLowering
```



---
## run_case
```python
from test_lowering import run_case
```



---
## __name__
```python
from test_cheader import __name__
```

Test that C functions used in primitives are declared in a header such as CPy.h.

---
## TestHeaderInclusion
```python
from test_cheader import TestHeaderInclusion
```



---
## test_primitives_included_in_header
```python
from test_cheader import test_primitives_included_in_header
```



---
## check_name
```python
from test_cheader import check_name
```



---
## __name__
```python
from test_commandline import __name__
```



---
## TestCommandLine
```python
from test_commandline import TestCommandLine
```



---
## run_case
```python
from test_commandline import run_case
```



---
## __name__
```python
from test_literals import __name__
```

Test code geneneration for literals.

---
## TestLiterals
```python
from test_literals import TestLiterals
```



---
## test_format_str_literal
```python
from test_literals import test_format_str_literal
```



---
## test_encode_str_values
```python
from test_literals import test_encode_str_values
```



---
## test_encode_bytes_values
```python
from test_literals import test_encode_bytes_values
```



---
## test_encode_int_values
```python
from test_literals import test_encode_int_values
```



---
## test_simple_literal_index
```python
from test_literals import test_simple_literal_index
```



---
## test_tuple_literal
```python
from test_literals import test_tuple_literal
```



---
## __name__
```python
from test_optimizations import __name__
```

Runner for IR optimization tests.

---
## OptimizationSuite
```python
from test_optimizations import OptimizationSuite
```

Base class for IR optimization test suites.

To use this, add a base class and define "files" and "do_optimizations".

---
## TestCopyPropagation
```python
from test_optimizations import TestCopyPropagation
```



---
## TestFlagElimination
```python
from test_optimizations import TestFlagElimination
```



---
## run_case
```python
from test_optimizations import run_case
```



---
## do_optimizations
```python
from test_optimizations import do_optimizations
```



---
## __name__
```python
from test_irbuild import __name__
```

Test cases for IR generation.

---
## TestGenOps
```python
from test_irbuild import TestGenOps
```



---
## run_case
```python
from test_irbuild import run_case
```

Perform a runtime checking transformation test case.

---
## __name__
```python
from test_refcount import __name__
```

Test runner for reference count opcode insertion transform test cases.

The transform inserts needed reference count increment/decrement
operations to IR.

---
## TestRefCountTransform
```python
from test_refcount import TestRefCountTransform
```



---
## run_case
```python
from test_refcount import run_case
```

Perform a runtime checking transformation test case.

---
## __name__
```python
from test_run import __name__
```

Test cases for building an C extension and running it.

---
## run_setup
```python
from test_run import run_setup
```

Run a setup script in a somewhat controlled environment.

This is adapted from code in distutils and our goal here is that is
faster to not need to spin up a python interpreter to run it.

We had to fork it because the real run_setup swallows errors
and KeyboardInterrupt with no way to recover them (!).
The real version has some extra features that we removed since
we weren't using them.

Returns whether the setup succeeded.

---
## chdir_manager
```python
from test_run import chdir_manager
```



---
## TestRun
```python
from test_run import TestRun
```

Test cases that build a C extension and run code.

---
## TestRunMultiFile
```python
from test_run import TestRunMultiFile
```

Run the main multi-module tests in multi-file compilation mode.

In multi-file mode each module gets compiled into a separate C file,
but all modules (C files) are compiled together.

---
## TestRunSeparate
```python
from test_run import TestRunSeparate
```

Run the main multi-module tests in separate compilation mode.

In this mode there are multiple compilation groups, which are compiled
incrementally. Each group is compiled to a separate C file, and these C
files are compiled separately.

Each compiled module is placed into a separate compilation group, unless
overridden by a special comment. Consider this example:

  # separate: [(["other.py", "other_b.py"], "stuff")]

This puts other.py and other_b.py into a compilation group named "stuff".
Any files not mentioned in the comment will get single-file groups.

---
## fix_native_line_number
```python
from test_run import fix_native_line_number
```

Update code locations in test case output to point to the .test file.

The description of the test case is written to native.py, and line numbers
in test case output often are relative to native.py. This translates the
line numbers to be relative to the .test file that contains the test case
description, and also updates the file name to the .test file name.

Args:
    message: message to update
    fnam: path of the .test file
    delta: line number of the beginning of the test case in the .test file

Returns updated message (or original message if we couldn't find anything).

---
## run_case
```python
from test_run import run_case
```



---
## run_case_inner
```python
from test_run import run_case_inner
```



---
## run_case_step
```python
from test_run import run_case_step
```



---
## get_separate
```python
from test_run import get_separate
```



---
## __name__
```python
from test_analysis import __name__
```

Test runner for data-flow analysis test cases.

---
## TestAnalysis
```python
from test_analysis import TestAnalysis
```



---
## run_case
```python
from test_analysis import run_case
```

Perform a data-flow analysis test case.

---
## __name__
```python
from test_exceptions import __name__
```



---
## TestExceptionTransform
```python
from test_exceptions import TestExceptionTransform
```



---
## run_case
```python
from test_exceptions import run_case
```

Perform a runtime checking transformation test case.

---
## __name__
```python
from test_ircheck import __name__
```



---
## assert_has_error
```python
from test_ircheck import assert_has_error
```



---
## assert_no_errors
```python
from test_ircheck import assert_no_errors
```



---
## TestIrcheck
```python
from test_ircheck import TestIrcheck
```



---
## setUp
```python
from test_ircheck import setUp
```



---
## basic_block
```python
from test_ircheck import basic_block
```



---
## func_decl
```python
from test_ircheck import func_decl
```



---
## test_valid_fn
```python
from test_ircheck import test_valid_fn
```



---
## test_block_not_terminated_empty_block
```python
from test_ircheck import test_block_not_terminated_empty_block
```



---
## test_valid_goto
```python
from test_ircheck import test_valid_goto
```



---
## test_invalid_goto
```python
from test_ircheck import test_invalid_goto
```



---
## test_invalid_register_source
```python
from test_ircheck import test_invalid_register_source
```



---
## test_invalid_op_source
```python
from test_ircheck import test_invalid_op_source
```



---
## test_invalid_return_type
```python
from test_ircheck import test_invalid_return_type
```



---
## test_invalid_assign
```python
from test_ircheck import test_invalid_assign
```



---
## test_can_coerce_to
```python
from test_ircheck import test_can_coerce_to
```



---
## test_duplicate_op
```python
from test_ircheck import test_duplicate_op
```



---
## test_pprint
```python
from test_ircheck import test_pprint
```



---
## test_load_address_declares_register
```python
from test_ircheck import test_load_address_declares_register
```



---
## __name__
```python
from test_struct import __name__
```



---
## TestStruct
```python
from test_struct import TestStruct
```



---
## test_struct_offsets
```python
from test_struct import test_struct_offsets
```



---
## test_struct_str
```python
from test_struct import test_struct_str
```



---
## test_runtime_subtype
```python
from test_struct import test_runtime_subtype
```



---
## test_eq_and_hash
```python
from test_struct import test_eq_and_hash
```



---
## __name__
```python
from test_typeops import __name__
```

Test cases for various RType operations.

---
## TestSubtype
```python
from test_typeops import TestSubtype
```



---
## TestRuntimeSubtype
```python
from test_typeops import TestRuntimeSubtype
```



---
## TestUnionSimplification
```python
from test_typeops import TestUnionSimplification
```



---
## test_bit
```python
from test_typeops import test_bit
```



---
## test_bool
```python
from test_typeops import test_bool
```



---
## test_int64
```python
from test_typeops import test_int64
```



---
## test_int32
```python
from test_typeops import test_int32
```



---
## test_int16
```python
from test_typeops import test_int16
```



---
## test_union
```python
from test_typeops import test_union
```



---
## test_simple_type_result
```python
from test_typeops import test_simple_type_result
```



---
## test_remove_duplicate
```python
from test_typeops import test_remove_duplicate
```



---
## test_cannot_simplify
```python
from test_typeops import test_cannot_simplify
```



---
## test_nested
```python
from test_typeops import test_nested
```



---
## __name__
```python
from test_emitclass import __name__
```



---
## TestEmitClass
```python
from test_emitclass import TestEmitClass
```



---
## test_slot_key
```python
from test_emitclass import test_slot_key
```



---
## test_setter_name
```python
from test_emitclass import test_setter_name
```



---
## test_getter_name
```python
from test_emitclass import test_getter_name
```



---
## __name__
```python
from test_emitfunc import __name__
```



---
## TestFunctionEmitterVisitor
```python
from test_emitfunc import TestFunctionEmitterVisitor
```

Test generation of fragments of C from individual IR ops.

---
## TestGenerateFunction
```python
from test_emitfunc import TestGenerateFunction
```



---
## setUp
```python
from test_emitfunc import setUp
```



---
## test_goto
```python
from test_emitfunc import test_goto
```



---
## test_goto_next_block
```python
from test_emitfunc import test_goto_next_block
```



---
## test_return
```python
from test_emitfunc import test_return
```



---
## test_integer
```python
from test_emitfunc import test_integer
```



---
## test_tuple_get
```python
from test_emitfunc import test_tuple_get
```



---
## test_load_None
```python
from test_emitfunc import test_load_None
```



---
## test_assign_int
```python
from test_emitfunc import test_assign_int
```



---
## test_int_add
```python
from test_emitfunc import test_int_add
```



---
## test_int_sub
```python
from test_emitfunc import test_int_sub
```



---
## test_int_neg
```python
from test_emitfunc import test_int_neg
```



---
## test_branch
```python
from test_emitfunc import test_branch
```



---
## test_branch_no_else
```python
from test_emitfunc import test_branch_no_else
```



---
## test_branch_no_else_negated
```python
from test_emitfunc import test_branch_no_else_negated
```



---
## test_branch_is_error
```python
from test_emitfunc import test_branch_is_error
```



---
## test_branch_is_error_next_block
```python
from test_emitfunc import test_branch_is_error_next_block
```



---
## test_branch_rare
```python
from test_emitfunc import test_branch_rare
```



---
## test_call
```python
from test_emitfunc import test_call
```



---
## test_call_two_args
```python
from test_emitfunc import test_call_two_args
```



---
## test_inc_ref
```python
from test_emitfunc import test_inc_ref
```



---
## test_dec_ref
```python
from test_emitfunc import test_dec_ref
```



---
## test_inc_ref_int
```python
from test_emitfunc import test_inc_ref_int
```



---
## test_dec_ref_int
```python
from test_emitfunc import test_dec_ref_int
```



---
## test_dec_ref_tuple
```python
from test_emitfunc import test_dec_ref_tuple
```



---
## test_dec_ref_tuple_nested
```python
from test_emitfunc import test_dec_ref_tuple_nested
```



---
## test_list_get_item
```python
from test_emitfunc import test_list_get_item
```



---
## test_list_set_item
```python
from test_emitfunc import test_list_set_item
```



---
## test_box_int
```python
from test_emitfunc import test_box_int
```



---
## test_unbox_int
```python
from test_emitfunc import test_unbox_int
```



---
## test_box_i64
```python
from test_emitfunc import test_box_i64
```



---
## test_unbox_i64
```python
from test_emitfunc import test_unbox_i64
```



---
## test_list_append
```python
from test_emitfunc import test_list_append
```



---
## test_get_attr
```python
from test_emitfunc import test_get_attr
```



---
## test_get_attr_non_refcounted
```python
from test_emitfunc import test_get_attr_non_refcounted
```



---
## test_get_attr_merged
```python
from test_emitfunc import test_get_attr_merged
```



---
## test_get_attr_with_bitmap
```python
from test_emitfunc import test_get_attr_with_bitmap
```



---
## test_set_attr
```python
from test_emitfunc import test_set_attr
```



---
## test_set_attr_non_refcounted
```python
from test_emitfunc import test_set_attr_non_refcounted
```



---
## test_set_attr_no_error
```python
from test_emitfunc import test_set_attr_no_error
```



---
## test_set_attr_non_refcounted_no_error
```python
from test_emitfunc import test_set_attr_non_refcounted_no_error
```



---
## test_set_attr_with_bitmap
```python
from test_emitfunc import test_set_attr_with_bitmap
```



---
## test_set_attr_init_with_bitmap
```python
from test_emitfunc import test_set_attr_init_with_bitmap
```



---
## test_dict_get_item
```python
from test_emitfunc import test_dict_get_item
```



---
## test_dict_set_item
```python
from test_emitfunc import test_dict_set_item
```



---
## test_dict_update
```python
from test_emitfunc import test_dict_update
```



---
## test_new_dict
```python
from test_emitfunc import test_new_dict
```



---
## test_dict_contains
```python
from test_emitfunc import test_dict_contains
```



---
## test_int_op
```python
from test_emitfunc import test_int_op
```



---
## test_comparison_op
```python
from test_emitfunc import test_comparison_op
```



---
## test_load_mem
```python
from test_emitfunc import test_load_mem
```



---
## test_set_mem
```python
from test_emitfunc import test_set_mem
```



---
## test_get_element_ptr
```python
from test_emitfunc import test_get_element_ptr
```



---
## test_load_address
```python
from test_emitfunc import test_load_address
```



---
## test_assign_multi
```python
from test_emitfunc import test_assign_multi
```



---
## test_long_unsigned
```python
from test_emitfunc import test_long_unsigned
```



---
## test_long_signed
```python
from test_emitfunc import test_long_signed
```



---
## test_cast_and_branch_merge
```python
from test_emitfunc import test_cast_and_branch_merge
```



---
## test_cast_and_branch_no_merge_1
```python
from test_emitfunc import test_cast_and_branch_no_merge_1
```



---
## test_cast_and_branch_no_merge_2
```python
from test_emitfunc import test_cast_and_branch_no_merge_2
```



---
## test_cast_and_branch_no_merge_3
```python
from test_emitfunc import test_cast_and_branch_no_merge_3
```



---
## test_cast_and_branch_no_merge_4
```python
from test_emitfunc import test_cast_and_branch_no_merge_4
```



---
## test_extend
```python
from test_emitfunc import test_extend
```



---
## assert_emit
```python
from test_emitfunc import assert_emit
```



---
## assert_emit_binary_op
```python
from test_emitfunc import assert_emit_binary_op
```



---
## test_simple
```python
from test_emitfunc import test_simple
```



---
## test_register
```python
from test_emitfunc import test_register
```



---
## add_local
```python
from test_emitfunc import add_local
```



---
## __name__
```python
from test_alwaysdefined import __name__
```

Test cases for inferring always defined attributes in classes.

---
## TestAlwaysDefined
```python
from test_alwaysdefined import TestAlwaysDefined
```



---
## run_case
```python
from test_alwaysdefined import run_case
```

Perform a runtime checking transformation test case.

---
## __name__
```python
from test_external import __name__
```

Test cases that run tests as subprocesses.

---
## TestExternal
```python
from test_external import TestExternal
```



---
## test_c_unit_test
```python
from test_external import test_c_unit_test
```

Run C unit tests in a subprocess.

---
## __name__
```python
from test_tuplename import __name__
```



---
## TestTupleNames
```python
from test_tuplename import TestTupleNames
```



---
## setUp
```python
from test_tuplename import setUp
```



---
## test_names
```python
from test_tuplename import test_names
```



---
## __name__
```python
from test_emitwrapper import __name__
```



---
## TestArgCheck
```python
from test_emitwrapper import TestArgCheck
```



---
## setUp
```python
from test_emitwrapper import setUp
```



---
## test_check_list
```python
from test_emitwrapper import test_check_list
```



---
## test_check_int
```python
from test_emitwrapper import test_check_int
```



---
## assert_lines
```python
from test_emitwrapper import assert_lines
```



---
## __name__
```python
from testutil import __name__
```



---
## MypycDataSuite
```python
from testutil import MypycDataSuite
```



---
## builtins_wrapper
```python
from testutil import builtins_wrapper
```

Decorate a function that implements a data-driven test case to copy an
alternative builtins module implementation in place before performing the
test case. Clean up after executing the test case.

---
## use_custom_builtins
```python
from testutil import use_custom_builtins
```



---
## perform_test
```python
from testutil import perform_test
```



---
## build_ir_for_single_file
```python
from testutil import build_ir_for_single_file
```



---
## build_ir_for_single_file2
```python
from testutil import build_ir_for_single_file2
```



---
## update_testcase_output
```python
from testutil import update_testcase_output
```



---
## assert_test_output
```python
from testutil import assert_test_output
```



---
## get_func_names
```python
from testutil import get_func_names
```



---
## remove_comment_lines
```python
from testutil import remove_comment_lines
```

Return a copy of array with comments removed.

Lines starting with '--' (but not with '---') are removed.

---
## print_with_line_numbers
```python
from testutil import print_with_line_numbers
```



---
## heading
```python
from testutil import heading
```



---
## show_c
```python
from testutil import show_c
```



---
## fudge_dir_mtimes
```python
from testutil import fudge_dir_mtimes
```



---
## replace_word_size
```python
from testutil import replace_word_size
```

Replace WORDSIZE with platform specific word sizes

---
## infer_ir_build_options_from_test_name
```python
from testutil import infer_ir_build_options_from_test_name
```

Look for magic substrings in test case name to set compiler options.

Return None if the test case should be skipped (always pass).

Supported naming conventions:

  *_64bit*:
      Run test case only on 64-bit platforms
  *_32bit*:
      Run test caseonly on 32-bit platforms
  *_python3_8* (or for any Python version):
      Use Python 3.8+ C API features (default: lowest supported version)
  *StripAssert*:
      Don't generate code for assert statements

---
## get_dict
```python
from test_serialization import get_dict
```



---
## get_function_dict
```python
from test_serialization import get_function_dict
```

Get a dict of function attributes safe to compare across serialization

---
## assert_blobs_same
```python
from test_serialization import assert_blobs_same
```

Compare two blobs of IR as best we can.

FuncDecls, FuncIRs, and ClassIRs are compared by fullname to avoid
infinite recursion.
(More detailed comparisons should be done manually.)

Types and signatures are compared using mypyc.sametype.

Containers are compared recursively.

Anything else is compared with ==.

The `trail` argument is used in error messages.

---
## assert_modules_same
```python
from test_serialization import assert_modules_same
```

Assert that two module IRs are the same (*).

* Or rather, as much as we care about preserving across
serialization.  We drop the actual IR bodies of functions but try
to preserve everything else.

---
## check_serialization_roundtrip
```python
from test_serialization import check_serialization_roundtrip
```

Check that we can serialize modules out and deserialize them to the same thing.

---
## __name__
```python
from test_emit import __name__
```



---
## TestEmitter
```python
from test_emit import TestEmitter
```



---
## setUp
```python
from test_emit import setUp
```



---
## test_label
```python
from test_emit import test_label
```



---
## test_reg
```python
from test_emit import test_reg
```



---
## test_object_annotation
```python
from test_emit import test_object_annotation
```



---
## test_emit_line
```python
from test_emit import test_emit_line
```



---
## test_emit_undefined_value_for_simple_type
```python
from test_emit import test_emit_undefined_value_for_simple_type
```



---
## test_emit_undefined_value_for_tuple
```python
from test_emit import test_emit_undefined_value_for_tuple
```



---
## __name__
```python
from test_namegen import __name__
```



---
## TestNameGen
```python
from test_namegen import TestNameGen
```



---
## test_candidate_suffixes
```python
from test_namegen import test_candidate_suffixes
```



---
## test_exported_name
```python
from test_namegen import test_exported_name
```



---
## test_make_module_translation_map
```python
from test_namegen import test_make_module_translation_map
```



---
## test_name_generator
```python
from test_namegen import test_name_generator
```



---
## __name__
```python
from rtypes import __name__
```

Types used in the intermediate representation.

These are runtime types (RTypes), as opposed to mypy Type objects.
The latter are only used during type checking and not directly used at
runtime.  Runtime types are derived from mypy types, but there's no
simple one-to-one correspondence. (Here 'runtime' means 'runtime
checked'.)

The generated IR ensures some runtime type safety properties based on
RTypes. Compiled code can assume that the runtime value matches the
static RType of a value. If the RType of a register is 'builtins.str'
(str_rprimitive), for example, the generated IR will ensure that the
register will have a 'str' object.

RTypes are simpler and less expressive than mypy (or PEP 484)
types. For example, all mypy types of form 'list[T]' (for arbitrary T)
are erased to the single RType 'builtins.list' (list_rprimitive).

mypyc.irbuild.mapper.Mapper.type_to_rtype converts mypy Types to mypyc
RTypes.

---
## RType
```python
from rtypes import RType
```

Abstract base class for runtime types (erased, only concrete; no generics).

---
## deserialize_type
```python
from rtypes import deserialize_type
```

Deserialize a JSON-serialized RType.

Arguments:
    data: The decoded JSON of the serialized type
    ctx: The deserialization maps to use

---
## RTypeVisitor
```python
from rtypes import RTypeVisitor
```

Generic visitor over RTypes (uses the visitor design pattern).

---
## RVoid
```python
from rtypes import RVoid
```

The void type (no value).

This is a singleton -- use void_rtype (below) to refer to this instead of
constructing a new instance.

---
## RPrimitive
```python
from rtypes import RPrimitive
```

Primitive type such as 'object' or 'int'.

These often have custom ops associated with them. The 'object'
primitive type can be used to hold arbitrary Python objects.

Different primitive types have different representations, and
primitives may be unboxed or boxed. Primitive types don't need to
directly correspond to Python types, but most do.

NOTE: All supported primitive types are defined below
(e.g. object_rprimitive).

---
## is_tagged
```python
from rtypes import is_tagged
```



---
## is_int_rprimitive
```python
from rtypes import is_int_rprimitive
```



---
## is_short_int_rprimitive
```python
from rtypes import is_short_int_rprimitive
```



---
## is_int16_rprimitive
```python
from rtypes import is_int16_rprimitive
```



---
## is_int32_rprimitive
```python
from rtypes import is_int32_rprimitive
```



---
## is_int64_rprimitive
```python
from rtypes import is_int64_rprimitive
```



---
## is_fixed_width_rtype
```python
from rtypes import is_fixed_width_rtype
```



---
## is_uint8_rprimitive
```python
from rtypes import is_uint8_rprimitive
```



---
## is_uint32_rprimitive
```python
from rtypes import is_uint32_rprimitive
```



---
## is_uint64_rprimitive
```python
from rtypes import is_uint64_rprimitive
```



---
## is_c_py_ssize_t_rprimitive
```python
from rtypes import is_c_py_ssize_t_rprimitive
```



---
## is_pointer_rprimitive
```python
from rtypes import is_pointer_rprimitive
```



---
## is_float_rprimitive
```python
from rtypes import is_float_rprimitive
```



---
## is_bool_rprimitive
```python
from rtypes import is_bool_rprimitive
```



---
## is_bit_rprimitive
```python
from rtypes import is_bit_rprimitive
```



---
## is_object_rprimitive
```python
from rtypes import is_object_rprimitive
```



---
## is_none_rprimitive
```python
from rtypes import is_none_rprimitive
```



---
## is_list_rprimitive
```python
from rtypes import is_list_rprimitive
```



---
## is_dict_rprimitive
```python
from rtypes import is_dict_rprimitive
```



---
## is_set_rprimitive
```python
from rtypes import is_set_rprimitive
```



---
## is_str_rprimitive
```python
from rtypes import is_str_rprimitive
```



---
## is_bytes_rprimitive
```python
from rtypes import is_bytes_rprimitive
```



---
## is_tuple_rprimitive
```python
from rtypes import is_tuple_rprimitive
```



---
## is_range_rprimitive
```python
from rtypes import is_range_rprimitive
```



---
## is_sequence_rprimitive
```python
from rtypes import is_sequence_rprimitive
```



---
## TupleNameVisitor
```python
from rtypes import TupleNameVisitor
```

Produce a tuple name based on the concrete representations of types.

---
## RTuple
```python
from rtypes import RTuple
```

Fixed-length unboxed tuple (represented as a C struct).

These are used to represent mypy TupleType values (fixed-length
Python tuples). Since this is unboxed, the identity of a tuple
object is not preserved within compiled code. If the identity of a
tuple is important, or there is a need to have multiple references
to a single tuple object, a variable-length tuple should be used
(tuple_rprimitive or Tuple[T, ...]  with explicit '...'), as they
are boxed.

These aren't immutable. However, user code won't be able to mutate
individual tuple items.

---
## compute_rtype_alignment
```python
from rtypes import compute_rtype_alignment
```

Compute alignment of a given type based on platform alignment rule

---
## compute_rtype_size
```python
from rtypes import compute_rtype_size
```

Compute unaligned size of rtype

---
## compute_aligned_offsets_and_size
```python
from rtypes import compute_aligned_offsets_and_size
```

Compute offsets and total size of a list of types after alignment

Note that the types argument are types of values that are stored
sequentially with platform default alignment.

---
## RStruct
```python
from rtypes import RStruct
```

C struct type

---
## RInstance
```python
from rtypes import RInstance
```

Instance of user-defined class (compiled to C extension class).

The runtime representation is 'PyObject *', and these are always
boxed and thus reference-counted.

These support fast method calls and fast attribute access using
vtables, and they usually use a dict-free, struct-based
representation of attributes. Method calls and attribute access
can skip the vtable if we know that there is no overriding.

These are also sometimes called 'native' types, since these have
the most efficient representation and ops (along with certain
RPrimitive types and RTuple).

---
## RUnion
```python
from rtypes import RUnion
```

union[x, ..., y]

---
## flatten_nested_unions
```python
from rtypes import flatten_nested_unions
```



---
## optional_value_type
```python
from rtypes import optional_value_type
```

If rtype is the union of none_rprimitive and another type X, return X.

Otherwise return None.

---
## is_optional_type
```python
from rtypes import is_optional_type
```

Is rtype an optional type with exactly two union items?

---
## RArray
```python
from rtypes import RArray
```

Fixed-length C array type (for example, int[5]).

Note that the implementation is a bit limited, and these can basically
be only used for local variables that are initialized in one location.

---
## check_native_int_range
```python
from rtypes import check_native_int_range
```

Is n within the range of a native, fixed-width int type?

Assume the type is a fixed-width int type.

---
## accept
```python
from rtypes import accept
```



---
## short_name
```python
from rtypes import short_name
```



---
## __str__
```python
from rtypes import __str__
```



---
## __repr__
```python
from rtypes import __repr__
```



---
## serialize
```python
from rtypes import serialize
```



---
## visit_rprimitive
```python
from rtypes import visit_rprimitive
```



---
## visit_rinstance
```python
from rtypes import visit_rinstance
```



---
## visit_runion
```python
from rtypes import visit_runion
```



---
## visit_rtuple
```python
from rtypes import visit_rtuple
```



---
## visit_rstruct
```python
from rtypes import visit_rstruct
```



---
## visit_rarray
```python
from rtypes import visit_rarray
```



---
## visit_rvoid
```python
from rtypes import visit_rvoid
```



---
## __eq__
```python
from rtypes import __eq__
```



---
## __hash__
```python
from rtypes import __hash__
```



---
## __init__
```python
from rtypes import __init__
```



---
## deserialize
```python
from rtypes import deserialize
```



---
## struct_name
```python
from rtypes import struct_name
```



---
## getter_index
```python
from rtypes import getter_index
```



---
## setter_index
```python
from rtypes import setter_index
```



---
## method_index
```python
from rtypes import method_index
```



---
## attr_type
```python
from rtypes import attr_type
```



---
## make_simplified_union
```python
from rtypes import make_simplified_union
```

Return a normalized union that covers the given items.

Flatten nested unions and remove duplicate items.

Overlapping items are *not* simplified. For example,
[object, str] will not be simplified.

---
## __name__
```python
from pprint import __name__
```



---
## IRPrettyPrintVisitor
```python
from pprint import IRPrettyPrintVisitor
```

Internal visitor that pretty-prints ops.

---
## format_registers
```python
from pprint import format_registers
```



---
## format_blocks
```python
from pprint import format_blocks
```

Format a list of IR basic blocks into a human-readable form.

---
## format_func
```python
from pprint import format_func
```



---
## format_modules
```python
from pprint import format_modules
```



---
## generate_names_for_ir
```python
from pprint import generate_names_for_ir
```

Generate unique names for IR values.

Give names such as 'r5' to temp values in IR which are useful when
pretty-printing or generating C. Ensure generated names are unique.

---
## __init__
```python
from pprint import __init__
```

Handle pretty printing operations onto a stream using a set of
configured parameters.

indent
    Number of spaces to indent for each level of nesting.

width
    Attempted maximum number of columns in the output.

depth
    The maximum depth to print out nested structures.

---
## visit_goto
```python
from pprint import visit_goto
```



---
## visit_branch
```python
from pprint import visit_branch
```



---
## visit_return
```python
from pprint import visit_return
```



---
## visit_unreachable
```python
from pprint import visit_unreachable
```



---
## visit_assign
```python
from pprint import visit_assign
```



---
## visit_assign_multi
```python
from pprint import visit_assign_multi
```



---
## visit_load_error_value
```python
from pprint import visit_load_error_value
```



---
## visit_load_literal
```python
from pprint import visit_load_literal
```



---
## visit_get_attr
```python
from pprint import visit_get_attr
```



---
## borrow_prefix
```python
from pprint import borrow_prefix
```



---
## visit_set_attr
```python
from pprint import visit_set_attr
```



---
## visit_load_static
```python
from pprint import visit_load_static
```



---
## visit_init_static
```python
from pprint import visit_init_static
```



---
## visit_tuple_get
```python
from pprint import visit_tuple_get
```



---
## visit_tuple_set
```python
from pprint import visit_tuple_set
```



---
## visit_inc_ref
```python
from pprint import visit_inc_ref
```



---
## visit_dec_ref
```python
from pprint import visit_dec_ref
```



---
## visit_call
```python
from pprint import visit_call
```



---
## visit_method_call
```python
from pprint import visit_method_call
```



---
## visit_cast
```python
from pprint import visit_cast
```



---
## visit_box
```python
from pprint import visit_box
```



---
## visit_unbox
```python
from pprint import visit_unbox
```



---
## visit_raise_standard_error
```python
from pprint import visit_raise_standard_error
```



---
## visit_call_c
```python
from pprint import visit_call_c
```



---
## visit_primitive_op
```python
from pprint import visit_primitive_op
```



---
## visit_truncate
```python
from pprint import visit_truncate
```



---
## visit_extend
```python
from pprint import visit_extend
```



---
## visit_load_global
```python
from pprint import visit_load_global
```



---
## visit_int_op
```python
from pprint import visit_int_op
```



---
## visit_comparison_op
```python
from pprint import visit_comparison_op
```



---
## visit_float_op
```python
from pprint import visit_float_op
```



---
## visit_float_neg
```python
from pprint import visit_float_neg
```



---
## visit_float_comparison_op
```python
from pprint import visit_float_comparison_op
```



---
## visit_load_mem
```python
from pprint import visit_load_mem
```



---
## visit_set_mem
```python
from pprint import visit_set_mem
```



---
## visit_get_element_ptr
```python
from pprint import visit_get_element_ptr
```



---
## visit_load_address
```python
from pprint import visit_load_address
```



---
## visit_keep_alive
```python
from pprint import visit_keep_alive
```



---
## visit_unborrow
```python
from pprint import visit_unborrow
```



---
## format
```python
from pprint import format
```

Helper for formatting strings.

These format sequences are supported in fmt:

  %s: arbitrary object converted to string using str()
  %r: name of IR value/register
  %d: int
  %f: float
  %l: BasicBlock (formatted as label 'Ln')
  %t: RType

---
## __name__
```python
from ops import __name__
```



---
## BasicBlock
```python
from ops import BasicBlock
```

IR basic block.

Contains a sequence of Ops and ends with a ControlOp (Goto,
Branch, Return or Unreachable). Only the last op can be a
ControlOp.

All generated Ops live in basic blocks. Basic blocks determine the
order of evaluation and control flow within a function. A basic
block is always associated with a single function/method (FuncIR).

When building the IR, ops that raise exceptions can be included in
the middle of a basic block, but the exceptions aren't checked.
Afterwards we perform a transform that inserts explicit checks for
all error conditions and splits basic blocks accordingly to preserve
the invariant that a jump, branch or return can only ever appear
as the final op in a block. Manually inserting error checking ops
would be boring and error-prone.

BasicBlocks have an error_handler attribute that determines where
to jump if an error occurs. If none is specified, an error will
propagate up out of the function. This is compiled away by the
`exceptions` module.

Block labels are used for pretty printing and emitting C code, and
get filled in by those passes.

Ops that may terminate the program aren't treated as exits.

---
## Value
```python
from ops import Value
```

Abstract base class for all IR values.

These include references to registers, literals, and all
operations (Ops), such as assignments, calls and branches.

Values are often used as inputs of Ops. Register can be used as an
assignment target.

A Value is part of the IR being compiled if it's included in a BasicBlock
that is reachable from a FuncIR (i.e., is part of a function).

See also: Op is a subclass of Value that is the base class of all
operations.

---
## Register
```python
from ops import Register
```

A Register holds a value of a specific type, and it can be read and mutated.

A Register is always local to a function. Each local variable maps
to a Register, and they are also used for some (but not all)
temporary values.

Note that the term 'register' is overloaded and is sometimes used
to refer to arbitrary Values (for example, in RegisterOp).

---
## Integer
```python
from ops import Integer
```

Short integer literal.

Integer literals are treated as constant values and are generally
not included in data flow analyses and such, unlike Register and
Op subclasses.

Integer can represent multiple types:

 * Short tagged integers (short_int_primitive type; the tag bit is clear)
 * Ordinary fixed-width integers (e.g., int32_rprimitive)
 * Values of other unboxed primitive types that are represented as integers
   (none_rprimitive, bool_rprimitive)
 * Null pointers (value 0) of various types, including object_rprimitive

---
## Float
```python
from ops import Float
```

Float literal.

Floating point literals are treated as constant values and are generally
not included in data flow analyses and such, unlike Register and
Op subclasses.

---
## Op
```python
from ops import Op
```

Hold an operator of arbitrary arity.

---
## BaseAssign
```python
from ops import BaseAssign
```

Base class for ops that assign to a register.

---
## Assign
```python
from ops import Assign
```

Assign a value to a Register (dest = src).

---
## AssignMulti
```python
from ops import AssignMulti
```

Assign multiple values to a Register (dest = src1, src2, ...).

This is used to initialize RArray values. It's provided to avoid
very verbose IR for common vectorcall operations.

Note that this interacts atypically with reference counting. We
assume that each RArray register is initialized exactly once
with this op.

---
## ControlOp
```python
from ops import ControlOp
```

Control flow operation.

---
## Goto
```python
from ops import Goto
```

Unconditional jump.

---
## Branch
```python
from ops import Branch
```

Branch based on a value.

If op is BOOL, branch based on a bit/bool value:
   if [not] r1 goto L1 else goto L2

If op is IS_ERROR, branch based on whether there is an error value:
   if [not] is_error(r1) goto L1 else goto L2

---
## Return
```python
from ops import Return
```

Return a value from a function.

---
## Unreachable
```python
from ops import Unreachable
```

Mark the end of basic block as unreachable.

This is sometimes necessary when the end of a basic block is never
reached. This can also be explicitly added to the end of non-None
returning functions (in None-returning function we can just return
None).

Mypy statically guarantees that the end of the function is not
unreachable if there is not a return statement.

This prevents the block formatter from being confused due to lack
of a leave and also leaves a nifty note in the IR. It is not
generally processed by visitors.

---
## RegisterOp
```python
from ops import RegisterOp
```

Abstract base class for operations that can be written as r1 = f(r2, ..., rn).

Takes some values, performs an operation, and generates an output
(unless the 'type' attribute is void_rtype, which is the default).
Other ops can refer to the result of the Op by referring to the Op
instance. This doesn't do any explicit control flow, but can raise an
error.

Note that the operands can be arbitrary Values, not just Register
instances, even though the naming may suggest otherwise.

---
## IncRef
```python
from ops import IncRef
```

Increase reference count (inc_ref src).

---
## DecRef
```python
from ops import DecRef
```

Decrease reference count and free object if zero (dec_ref src).

The is_xdec flag says to use an XDECREF, which checks if the
pointer is NULL first.

---
## Call
```python
from ops import Call
```

Native call f(arg, ...).

The call target can be a module-level function or a class.

---
## MethodCall
```python
from ops import MethodCall
```

Native method call obj.method(arg, ...)

---
## PrimitiveDescription
```python
from ops import PrimitiveDescription
```

Description of a primitive op.

Primitives get lowered into lower-level ops before code generation.

If c_function_name is provided, a primitive will be lowered into a CallC op.
Otherwise custom logic will need to be implemented to transform the
primitive into lower-level ops.

---
## PrimitiveOp
```python
from ops import PrimitiveOp
```

A higher-level primitive operation.

Some of these have special compiler support. These will be lowered
(transformed) into lower-level IR ops before code generation, and after
reference counting op insertion. Others will be transformed into CallC
ops.

Tagged integer equality is a typical primitive op with non-trivial
lowering. It gets transformed into a tag check, followed by different
code paths for short and long representations.

---
## LoadErrorValue
```python
from ops import LoadErrorValue
```

Load an error value.

Each type has one reserved value that signals an error (exception). This
loads the error value for a specific type.

---
## LoadLiteral
```python
from ops import LoadLiteral
```

Load a Python literal object (dest = 'foo' / b'foo' / ...).

This is used to load a static PyObject * value corresponding to
a literal of one of the supported types.

Tuple / frozenset literals must contain only valid literal values as items.

NOTE: You can use this to load boxed (Python) int objects. Use
      Integer to load unboxed, tagged integers or fixed-width,
      low-level integers.

      For int literals, both int_rprimitive (CPyTagged) and
      object_primitive (PyObject *) are supported as rtype. However,
      when using int_rprimitive, the value must *not* be small enough
      to fit in an unboxed integer.

---
## GetAttr
```python
from ops import GetAttr
```

obj.attr (for a native object)

---
## SetAttr
```python
from ops import SetAttr
```

obj.attr = src (for a native object)

Steals the reference to src.

---
## LoadStatic
```python
from ops import LoadStatic
```

Load a static name (name :: static).

Load a C static variable/pointer. The namespace for statics is shared
for the entire compilation group. You can optionally provide a module
name and a sub-namespace identifier for additional namespacing to avoid
name conflicts. The static namespace does not overlap with other C names,
since the final C name will get a prefix, so conflicts only must be
avoided with other statics.

---
## InitStatic
```python
from ops import InitStatic
```

static = value :: static

Initialize a C static variable/pointer. See everything in LoadStatic.

---
## TupleSet
```python
from ops import TupleSet
```

dest = (reg, ...) (for fixed-length tuple)

---
## TupleGet
```python
from ops import TupleGet
```

Get item of a fixed-length tuple (src[index]).

---
## Cast
```python
from ops import Cast
```

cast(type, src)

Perform a runtime type check (no representation or value conversion).

DO NOT increment reference counts.

---
## Box
```python
from ops import Box
```

box(type, src)

This converts from a potentially unboxed representation to a straight Python object.
Only supported for types with an unboxed representation.

---
## Unbox
```python
from ops import Unbox
```

unbox(type, src)

This is similar to a cast, but it also changes to a (potentially) unboxed runtime
representation. Only supported for types with an unboxed representation.

---
## RaiseStandardError
```python
from ops import RaiseStandardError
```

Raise built-in exception with an optional error string.

We have a separate opcode for this for convenience and to
generate smaller, more idiomatic C code.

---
## CallC
```python
from ops import CallC
```

result = function(arg0, arg1, ...)

Call a C function that is not a compiled/native function (for
example, a Python C API function). Use Call to call native
functions.

---
## Truncate
```python
from ops import Truncate
```

result = truncate src from src_type to dst_type

Truncate a value from type with more bits to type with less bits.

dst_type and src_type can be native integer types, bools or tagged
integers. Tagged integers should have the tag bit unset.

---
## Extend
```python
from ops import Extend
```

result = extend src from src_type to dst_type

Extend a value from a type with fewer bits to a type with more bits.

dst_type and src_type can be native integer types, bools or tagged
integers. Tagged integers should have the tag bit unset.

If 'signed' is true, perform sign extension. Otherwise, the result will be
zero extended.

---
## LoadGlobal
```python
from ops import LoadGlobal
```

Load a low-level global variable/pointer.

Note that can't be used to directly load Python module-level
global variable, since they are stored in a globals dictionary
and accessed using dictionary operations.

---
## IntOp
```python
from ops import IntOp
```

Binary arithmetic or bitwise op on integer operands (e.g., r1 = r2 + r3).

These ops are low-level and are similar to the corresponding C
operations.

The left and right values must have low-level integer types with
compatible representations. Fixed-width integers, short_int_rprimitive,
bool_rprimitive and bit_rprimitive are supported.

For tagged (arbitrary-precision) integer ops look at mypyc.primitives.int_ops.

---
## ComparisonOp
```python
from ops import ComparisonOp
```

Low-level comparison op for integers and pointers.

Both unsigned and signed comparisons are supported. Supports
comparisons between fixed-width integer types and pointer types.
The operands should have matching sizes.

The result is always a bit (representing a boolean).

Python semantics, such as calling __eq__, are not supported.

---
## FloatOp
```python
from ops import FloatOp
```

Binary float arithmetic op (e.g., r1 = r2 + r3).

These ops are low-level and are similar to the corresponding C
operations (and somewhat different from Python operations).

The left and right values must be floats.

---
## FloatNeg
```python
from ops import FloatNeg
```

Float negation op (r1 = -r2).

---
## FloatComparisonOp
```python
from ops import FloatComparisonOp
```

Low-level comparison op for floats.

---
## LoadMem
```python
from ops import LoadMem
```

Read a memory location: result = *(type *)src.

Attributes:
  type: Type of the read value
  src: Pointer to memory to read

---
## SetMem
```python
from ops import SetMem
```

Write to a memory location: *(type *)dest = src

Attributes:
  type: Type of the written value
  dest: Pointer to memory to write
  src: Source value

---
## GetElementPtr
```python
from ops import GetElementPtr
```

Get the address of a struct element.

Note that you may need to use KeepAlive to avoid the struct
being freed, if it's reference counted, such as PyObject *.

---
## LoadAddress
```python
from ops import LoadAddress
```

Get the address of a value: result = (type)&src

Attributes:
  type: Type of the loaded address(e.g. ptr/object_ptr)
  src: Source value (str for globals like 'PyList_Type',
       Register for temporary values or locals, LoadStatic
       for statics.)

---
## KeepAlive
```python
from ops import KeepAlive
```

A no-op operation that ensures source values aren't freed.

This is sometimes useful to avoid decref when a reference is still
being held but not seen by the compiler.

A typical use case is like this (C-like pseudocode):

  ptr = &x.item
  r = *ptr
  keep_alive x  # x must not be freed here
  # x may be freed here

If we didn't have "keep_alive x", x could be freed immediately
after taking the address of 'item', resulting in a read after free
on the second line.

If 'steal' is true, the value is considered to be stolen at
this op, i.e. it won't be decref'd. You need to ensure that
the value is freed otherwise, perhaps by using borrowing
followed by Unborrow.

Be careful with steal=True -- this can cause memory leaks.

---
## Unborrow
```python
from ops import Unborrow
```

A no-op op to create a regular reference from a borrowed one.

Borrowed references can only be used temporarily and the reference
counts won't be managed. This value will be refcounted normally.

This is mainly useful if you split an aggregate value, such as
a tuple, into components using borrowed values (to avoid increfs),
and want to treat the components as sharing the original managed
reference. You'll also need to use KeepAlive with steal=True to
"consume" the original tuple reference:

  # t is a 2-tuple
  r0 = borrow t[0]
  r1 = borrow t[1]
  r2 = unborrow r0
  r3 = unborrow r1
  # now (r2, r3) represent the tuple as separate items, and the
  # original tuple can be considered dead and available to be
  # stolen
  keep_alive steal t

Be careful with this -- this can easily cause double freeing.

---
## OpVisitor
```python
from ops import OpVisitor
```

Generic visitor over ops (uses the visitor design pattern).

---
## DeserMaps
```python
from ops import DeserMaps
```



---
## __init__
```python
from ops import __init__
```



---
## terminated
```python
from ops import terminated
```

Does the block end with a jump, branch or return?

This should always be true after the basic block has been fully built, but
this is false during construction.

---
## terminator
```python
from ops import terminator
```

The terminator operation of the block.

---
## is_void
```python
from ops import is_void
```



---
## __repr__
```python
from ops import __repr__
```



---
## numeric_value
```python
from ops import numeric_value
```



---
## can_raise
```python
from ops import can_raise
```



---
## sources
```python
from ops import sources
```



---
## stolen
```python
from ops import stolen
```



---
## unique_sources
```python
from ops import unique_sources
```



---
## accept
```python
from ops import accept
```



---
## targets
```python
from ops import targets
```



---
## set_target
```python
from ops import set_target
```



---
## invert
```python
from ops import invert
```



---
## mark_as_initializer
```python
from ops import mark_as_initializer
```



---
## visit_goto
```python
from ops import visit_goto
```



---
## visit_branch
```python
from ops import visit_branch
```



---
## visit_return
```python
from ops import visit_return
```



---
## visit_unreachable
```python
from ops import visit_unreachable
```



---
## visit_assign
```python
from ops import visit_assign
```



---
## visit_assign_multi
```python
from ops import visit_assign_multi
```



---
## visit_load_error_value
```python
from ops import visit_load_error_value
```



---
## visit_load_literal
```python
from ops import visit_load_literal
```



---
## visit_get_attr
```python
from ops import visit_get_attr
```



---
## visit_set_attr
```python
from ops import visit_set_attr
```



---
## visit_load_static
```python
from ops import visit_load_static
```



---
## visit_init_static
```python
from ops import visit_init_static
```



---
## visit_tuple_get
```python
from ops import visit_tuple_get
```



---
## visit_tuple_set
```python
from ops import visit_tuple_set
```



---
## visit_inc_ref
```python
from ops import visit_inc_ref
```



---
## visit_dec_ref
```python
from ops import visit_dec_ref
```



---
## visit_call
```python
from ops import visit_call
```



---
## visit_method_call
```python
from ops import visit_method_call
```



---
## visit_cast
```python
from ops import visit_cast
```



---
## visit_box
```python
from ops import visit_box
```



---
## visit_unbox
```python
from ops import visit_unbox
```



---
## visit_raise_standard_error
```python
from ops import visit_raise_standard_error
```



---
## visit_call_c
```python
from ops import visit_call_c
```



---
## visit_primitive_op
```python
from ops import visit_primitive_op
```



---
## visit_truncate
```python
from ops import visit_truncate
```



---
## visit_extend
```python
from ops import visit_extend
```



---
## visit_load_global
```python
from ops import visit_load_global
```



---
## visit_int_op
```python
from ops import visit_int_op
```



---
## visit_comparison_op
```python
from ops import visit_comparison_op
```



---
## visit_float_op
```python
from ops import visit_float_op
```



---
## visit_float_neg
```python
from ops import visit_float_neg
```



---
## visit_float_comparison_op
```python
from ops import visit_float_comparison_op
```



---
## visit_load_mem
```python
from ops import visit_load_mem
```



---
## visit_set_mem
```python
from ops import visit_set_mem
```



---
## visit_get_element_ptr
```python
from ops import visit_get_element_ptr
```



---
## visit_load_address
```python
from ops import visit_load_address
```



---
## visit_keep_alive
```python
from ops import visit_keep_alive
```



---
## visit_unborrow
```python
from ops import visit_unborrow
```



---
## __name__
```python
from module_ir import __name__
```

Intermediate representation of modules.

---
## ModuleIR
```python
from module_ir import ModuleIR
```

Intermediate representation of a module.

---
## deserialize_modules
```python
from module_ir import deserialize_modules
```

Deserialize a collection of modules.

The modules can contain dependencies on each other.

Arguments:
    data: A dict containing the modules to deserialize.
    ctx: The deserialization maps to use and to populate.
         They are populated with information from the deserialized
         modules and as a precondition must have been populated by
         deserializing any dependencies of the modules being deserialized
         (outside of dependencies between the modules themselves).

Returns a map containing the deserialized modules.

---
## __init__
```python
from module_ir import __init__
```



---
## serialize
```python
from module_ir import serialize
```



---
## deserialize
```python
from module_ir import deserialize
```



---
## __name__
```python
from class_ir import __name__
```

Intermediate representation of classes.

---
## VTableMethod
```python
from class_ir import VTableMethod
```



---
## ClassIR
```python
from class_ir import ClassIR
```

Intermediate representation of a class.

This also describes the runtime structure of native instances.

---
## NonExtClassInfo
```python
from class_ir import NonExtClassInfo
```

Information needed to construct a non-extension class (Python class).

Includes the class dictionary, a tuple of base classes,
the class annotations dictionary, and the metaclass.

---
## serialize_vtable_entry
```python
from class_ir import serialize_vtable_entry
```



---
## serialize_vtable
```python
from class_ir import serialize_vtable
```



---
## deserialize_vtable_entry
```python
from class_ir import deserialize_vtable_entry
```



---
## deserialize_vtable
```python
from class_ir import deserialize_vtable
```



---
## all_concrete_classes
```python
from class_ir import all_concrete_classes
```

Return all concrete classes among the class itself and its subclasses.

---
## __init__
```python
from class_ir import __init__
```



---
## __repr__
```python
from class_ir import __repr__
```



---
## fullname
```python
from class_ir import fullname
```



---
## real_base
```python
from class_ir import real_base
```

Return the actual concrete base class, if there is one.

---
## vtable_entry
```python
from class_ir import vtable_entry
```



---
## attr_details
```python
from class_ir import attr_details
```



---
## attr_type
```python
from class_ir import attr_type
```



---
## method_decl
```python
from class_ir import method_decl
```



---
## method_sig
```python
from class_ir import method_sig
```



---
## has_method
```python
from class_ir import has_method
```



---
## is_method_final
```python
from class_ir import is_method_final
```



---
## has_attr
```python
from class_ir import has_attr
```



---
## is_deletable
```python
from class_ir import is_deletable
```



---
## is_always_defined
```python
from class_ir import is_always_defined
```



---
## name_prefix
```python
from class_ir import name_prefix
```



---
## struct_name
```python
from class_ir import struct_name
```



---
## get_method_and_class
```python
from class_ir import get_method_and_class
```



---
## get_method
```python
from class_ir import get_method
```



---
## has_method_decl
```python
from class_ir import has_method_decl
```



---
## has_no_subclasses
```python
from class_ir import has_no_subclasses
```



---
## subclasses
```python
from class_ir import subclasses
```

Return all subclasses of this class, both direct and indirect.

Return None if it is impossible to identify all subclasses, for example
because we are performing separate compilation.

---
## concrete_subclasses
```python
from class_ir import concrete_subclasses
```

Return all concrete (i.e. non-trait and non-abstract) subclasses.

Include both direct and indirect subclasses. Place classes with no children first.

---
## is_serializable
```python
from class_ir import is_serializable
```



---
## serialize
```python
from class_ir import serialize
```



---
## deserialize
```python
from class_ir import deserialize
```



---
## __name__
```python
from func_ir import __name__
```

Intermediate representation of functions.

---
## RuntimeArg
```python
from func_ir import RuntimeArg
```

Description of a function argument in IR.

Argument kind is one of ARG_* constants defined in mypy.nodes.

---
## FuncSignature
```python
from func_ir import FuncSignature
```

Signature of a function in IR.

---
## num_bitmap_args
```python
from func_ir import num_bitmap_args
```



---
## FuncDecl
```python
from func_ir import FuncDecl
```

Declaration of a function in IR (without body or implementation).

A function can be a regular module-level function, a method, a
static method, a class method, or a property getter/setter.

---
## FuncIR
```python
from func_ir import FuncIR
```

Intermediate representation of a function with contextual information.

Unlike FuncDecl, this includes the IR of the body (basic blocks).

---
## all_values
```python
from func_ir import all_values
```

Return the set of all values that may be initialized in the blocks.

This omits registers that are only read.

---
## all_values_full
```python
from func_ir import all_values_full
```

Return set of all values that are initialized or accessed.

---
## __init__
```python
from func_ir import __init__
```



---
## optional
```python
from func_ir import optional
```



---
## __repr__
```python
from func_ir import __repr__
```



---
## serialize
```python
from func_ir import serialize
```



---
## deserialize
```python
from func_ir import deserialize
```



---
## real_args
```python
from func_ir import real_args
```

Return arguments without any synthetic bitmap arguments.

---
## bound_sig
```python
from func_ir import bound_sig
```



---
## line
```python
from func_ir import line
```



---
## id
```python
from func_ir import id
```



---
## compute_shortname
```python
from func_ir import compute_shortname
```



---
## shortname
```python
from func_ir import shortname
```



---
## fullname
```python
from func_ir import fullname
```



---
## cname
```python
from func_ir import cname
```



---
## get_id_from_json
```python
from func_ir import get_id_from_json
```

Get the id from the serialized FuncIR associated with this FuncDecl

---
## args
```python
from func_ir import args
```



---
## ret_type
```python
from func_ir import ret_type
```



---
## class_name
```python
from func_ir import class_name
```



---
## sig
```python
from func_ir import sig
```



---
## name
```python
from func_ir import name
```



---
## __name__
```python
from emitclass import __name__
```

Code generation for native classes and related wrappers.

---
## native_slot
```python
from emitclass import native_slot
```



---
## wrapper_slot
```python
from emitclass import wrapper_slot
```



---
## generate_call_wrapper
```python
from emitclass import generate_call_wrapper
```



---
## slot_key
```python
from emitclass import slot_key
```

Map dunder method name to sort key.

Sort reverse operator methods and __delitem__ after others ('x' > '_').

---
## generate_slots
```python
from emitclass import generate_slots
```



---
## generate_class_type_decl
```python
from emitclass import generate_class_type_decl
```



---
## generate_class
```python
from emitclass import generate_class
```

Generate C code for a class.

This is the main entry point to the module.

---
## getter_name
```python
from emitclass import getter_name
```



---
## setter_name
```python
from emitclass import setter_name
```



---
## generate_object_struct
```python
from emitclass import generate_object_struct
```



---
## generate_vtables
```python
from emitclass import generate_vtables
```

Emit the vtables and vtable setup functions for a class.

This includes both the primary vtable and any trait implementation vtables.
The trait vtables go before the main vtable, and have the following layout:
    {
        CPyType_T1,         // pointer to type object
        C_T1_trait_vtable,  // pointer to array of method pointers
        C_T1_offset_table,  // pointer to array of attribute offsets
        CPyType_T2,
        C_T2_trait_vtable,
        C_T2_offset_table,
        ...
    }
The method implementations are calculated at the end of IR pass, attribute
offsets are {offsetof(native__C, _x1), offsetof(native__C, _y1), ...}.

To account for both dynamic loading and dynamic class creation,
vtables are populated dynamically at class creation time, so we
emit empty array definitions to store the vtables and a function to
populate them.

If shadow is True, generate "shadow vtables" that point to the
shadow glue methods (which should dispatch via the Python C-API).

Returns the expression to use to refer to the vtable, which might be
different than the name, if there are trait vtables.

---
## generate_offset_table
```python
from emitclass import generate_offset_table
```

Generate attribute offset row of a trait vtable.

---
## generate_vtable
```python
from emitclass import generate_vtable
```



---
## generate_setup_for_class
```python
from emitclass import generate_setup_for_class
```

Generate a native function that allocates an instance of a class.

---
## generate_constructor_for_class
```python
from emitclass import generate_constructor_for_class
```

Generate a native function that allocates and initializes an instance of a class.

---
## generate_init_for_class
```python
from emitclass import generate_init_for_class
```

Generate an init function suitable for use as tp_init.

tp_init needs to be a function that returns an int, and our
__init__ methods return a PyObject. Translate NULL to -1,
everything else to 0.

---
## generate_new_for_class
```python
from emitclass import generate_new_for_class
```



---
## generate_new_for_trait
```python
from emitclass import generate_new_for_trait
```



---
## generate_traverse_for_class
```python
from emitclass import generate_traverse_for_class
```

Emit function that performs cycle GC traversal of an instance.

---
## generate_clear_for_class
```python
from emitclass import generate_clear_for_class
```



---
## generate_dealloc_for_class
```python
from emitclass import generate_dealloc_for_class
```



---
## generate_methods_table
```python
from emitclass import generate_methods_table
```



---
## generate_side_table_for_class
```python
from emitclass import generate_side_table_for_class
```



---
## generate_getseter_declarations
```python
from emitclass import generate_getseter_declarations
```



---
## generate_getseters_table
```python
from emitclass import generate_getseters_table
```



---
## generate_getseters
```python
from emitclass import generate_getseters
```



---
## generate_getter
```python
from emitclass import generate_getter
```



---
## generate_setter
```python
from emitclass import generate_setter
```



---
## generate_readonly_getter
```python
from emitclass import generate_readonly_getter
```



---
## generate_property_setter
```python
from emitclass import generate_property_setter
```



---
## has_managed_dict
```python
from emitclass import has_managed_dict
```

Should the class get the Py_TPFLAGS_MANAGED_DICT flag?

---
## emit_line
```python
from emitclass import emit_line
```



---
## trait_vtable_name
```python
from emitclass import trait_vtable_name
```



---
## trait_offset_table_name
```python
from emitclass import trait_offset_table_name
```



---
## _is_literal_value
```python
from literals import _is_literal_value
```



---
## Literals
```python
from literals import Literals
```

Collection of literal values used in a compilation group and related helpers.

---
## _encode_str_values
```python
from literals import _encode_str_values
```



---
## _encode_bytes_values
```python
from literals import _encode_bytes_values
```



---
## format_int
```python
from literals import format_int
```

Format an integer using a variable-length binary encoding.

---
## format_str_literal
```python
from literals import format_str_literal
```



---
## _encode_int_values
```python
from literals import _encode_int_values
```

Encode int values into C strings.

Values are stored in base 10 and separated by 0 bytes.

---
## float_to_c
```python
from literals import float_to_c
```

Return C literal representation of a float value.

---
## _encode_float_values
```python
from literals import _encode_float_values
```

Encode float values into a C array values.

The result contains the number of values followed by individual values.

---
## _encode_complex_values
```python
from literals import _encode_complex_values
```

Encode float values into a C array values.

The result contains the number of values followed by pairs of doubles
representing complex numbers.

---
## __init__
```python
from literals import __init__
```



---
## record_literal
```python
from literals import record_literal
```

Ensure that the literal value is available in generated code.

---
## literal_index
```python
from literals import literal_index
```

Return the index to the literals array for given value.

---
## num_literals
```python
from literals import num_literals
```



---
## encoded_str_values
```python
from literals import encoded_str_values
```



---
## encoded_int_values
```python
from literals import encoded_int_values
```



---
## encoded_bytes_values
```python
from literals import encoded_bytes_values
```



---
## encoded_float_values
```python
from literals import encoded_float_values
```



---
## encoded_complex_values
```python
from literals import encoded_complex_values
```



---
## encoded_tuple_values
```python
from literals import encoded_tuple_values
```



---
## encoded_frozenset_values
```python
from literals import encoded_frozenset_values
```



---
## _encode_collection_values
```python
from literals import _encode_collection_values
```

Encode tuple/frozenset values into a C array.

The format of the result is like this:

   <number of collections>
   <length of the first collection>
   <literal index of first item>
   ...
   <literal index of last item>
   <length of the second collection>
   ...

---
## __name__
```python
from emitmodule import __name__
```

Generate C code for a Python C extension module from Python source code.

---
## MarkedDeclaration
```python
from emitmodule import MarkedDeclaration
```

Add a mark, useful for topological sort.

---
## MypycPlugin
```python
from emitmodule import MypycPlugin
```

Plugin for making mypyc interoperate properly with mypy incremental mode.

Basically the point of this plugin is to force mypy to recheck things
based on the demands of mypyc in a couple situations:
  * Any modules in the same group must be compiled together, so we
    tell mypy that modules depend on all their groupmates.
  * If the IR metadata is missing or stale or any of the generated
    C source files associated missing or stale, then we need to
    recompile the module so we mark it as stale.

---
## parse_and_typecheck
```python
from emitmodule import parse_and_typecheck
```



---
## compile_scc_to_ir
```python
from emitmodule import compile_scc_to_ir
```

Compile an SCC into ModuleIRs.

Any modules that this SCC depends on must have either compiled or
loaded from a cache into mapper.

Arguments:
    scc: The list of MypyFiles to compile
    result: The BuildResult from the mypy front-end
    mapper: The Mapper object mapping mypy ASTs to class and func IRs
    compiler_options: The compilation options
    errors: Where to report any errors encountered

Returns the IR of the modules.

---
## compile_modules_to_ir
```python
from emitmodule import compile_modules_to_ir
```

Compile a collection of modules into ModuleIRs.

The modules to compile are specified as part of mapper's group_map.

Returns the IR of the modules.

---
## compile_ir_to_c
```python
from emitmodule import compile_ir_to_c
```

Compile a collection of ModuleIRs to C source text.

Returns a dictionary mapping group names to a list of (file name,
file text) pairs.

---
## get_ir_cache_name
```python
from emitmodule import get_ir_cache_name
```



---
## get_state_ir_cache_name
```python
from emitmodule import get_state_ir_cache_name
```



---
## write_cache
```python
from emitmodule import write_cache
```

Write out the cache information for modules.

Each module has the following cache information written (which is
in addition to the cache information written by mypy itself):
  * A serialized version of its mypyc IR, minus the bodies of
    functions. This allows code that depends on it to use
    these serialized data structures when compiling against it
    instead of needing to recompile it. (Compiling against a
    module requires access to both its mypy and mypyc data
    structures.)
  * The hash of the mypy metadata cache file for the module.
    This is used to ensure that the mypyc cache and the mypy
    cache are in sync and refer to the same version of the code.
    This is particularly important if mypyc crashes/errors/is
    stopped after mypy has written its cache but before mypyc has.
  * The hashes of all of the source file outputs for the group
    the module is in. This is so that the module will be
    recompiled if the source outputs are missing.

---
## load_scc_from_cache
```python
from emitmodule import load_scc_from_cache
```

Load IR for an SCC of modules from the cache.

Arguments and return are as compile_scc_to_ir.

---
## compile_modules_to_c
```python
from emitmodule import compile_modules_to_c
```

Compile Python module(s) to the source of Python C extension modules.

This generates the source code for the "shared library" module
for each group. The shim modules are generated in mypyc.build.
Each shared library module provides, for each module in its group,
a PyCapsule containing an initialization function.
Additionally, it provides a capsule containing an export table of
pointers to all of the group's functions and static variables.

Arguments:
    result: The BuildResult from the mypy front-end
    compiler_options: The compilation options
    errors: Where to report any errors encountered
    groups: The groups that we are compiling. See documentation of Groups type above.

Returns the IR of the modules and a list containing the generated files for each group.

---
## generate_function_declaration
```python
from emitmodule import generate_function_declaration
```



---
## pointerize
```python
from emitmodule import pointerize
```

Given a C decl and its name, modify it to be a declaration to a pointer.

---
## group_dir
```python
from emitmodule import group_dir
```

Given a group name, return the relative directory path for it.

---
## GroupGenerator
```python
from emitmodule import GroupGenerator
```



---
## sort_classes
```python
from emitmodule import sort_classes
```



---
## toposort
```python
from emitmodule import toposort
```

Topologically sort a dict from item to dependencies.

This runs in O(V + E).

---
## is_fastcall_supported
```python
from emitmodule import is_fastcall_supported
```



---
## collect_literals
```python
from emitmodule import collect_literals
```

Store all Python literal object refs in fn.

Collecting literals must happen only after we have the final IR.
This way we won't include literals that have been optimized away.

---
## c_string_array_initializer
```python
from emitmodule import c_string_array_initializer
```



---
## __init__
```python
from emitmodule import __init__
```

Generator for C source for a compilation group.

The code for a compilation group contains an internal and an
external .h file, and then one .c if not in multi_file mode or
one .c file per module if in multi_file mode.)

Arguments:
    modules: (name, ir) pairs for each module in the group
    source_paths: Map from module names to source file paths
    group_name: The name of the group (or None if this is single-module compilation)
    group_map: A map of modules to their group names
    names: The name generator for the compilation
    multi_file: Whether to put each module in its own source file regardless
                of group structure.

---
## report_config_data
```python
from emitmodule import report_config_data
```



---
## get_additional_deps
```python
from emitmodule import get_additional_deps
```



---
## group_suffix
```python
from emitmodule import group_suffix
```



---
## short_group_suffix
```python
from emitmodule import short_group_suffix
```



---
## generate_c_for_modules
```python
from emitmodule import generate_c_for_modules
```



---
## generate_literal_tables
```python
from emitmodule import generate_literal_tables
```

Generate tables containing descriptions of Python literals to construct.

We will store the constructed literals in a single array that contains
literals of all types. This way we can refer to an arbitrary literal by
its index.

---
## generate_export_table
```python
from emitmodule import generate_export_table
```

Generate the declaration and definition of the group's export struct.

To avoid needing to deal with deeply platform specific issues
involving dynamic library linking (and some possibly
insurmountable issues involving cyclic dependencies), compiled
code accesses functions and data in other compilation groups
via an explicit "export struct".

Each group declares a struct type that contains a pointer to
every function and static variable it exports. It then
populates this struct and stores a pointer to it in a capsule
stored as an attribute named 'exports' on the group's shared
library's python module.

On load, a group's init function will import all of its
dependencies' exports tables using the capsule mechanism and
copy the contents into a local copy of the table (to eliminate
the need for a pointer indirection when accessing it).

Then, all calls to functions in another group and accesses to statics
from another group are done indirectly via the export table.

For example, a group containing a module b, where b contains a class B
and a function bar, would declare an export table like:
    struct export_table_b {
        PyTypeObject **CPyType_B;
        PyObject *(*CPyDef_B)(CPyTagged cpy_r_x);
        CPyTagged (*CPyDef_B___foo)(PyObject *cpy_r_self, CPyTagged cpy_r_y);
        tuple_T2OI (*CPyDef_bar)(PyObject *cpy_r_x);
        char (*CPyDef___top_level__)(void);
    };
that would be initialized with:
    static struct export_table_b exports = {
        &CPyType_B,
        &CPyDef_B,
        &CPyDef_B___foo,
        &CPyDef_bar,
        &CPyDef___top_level__,
    };
To call `b.foo`, then, a function in another group would do
`exports_b.CPyDef_bar(...)`.

---
## generate_shared_lib_init
```python
from emitmodule import generate_shared_lib_init
```

Generate the init function for a shared library.

A shared library contains all of the actual code for a
compilation group.

The init function is responsible for creating Capsules that
wrap pointers to the initialization function of all the real
init functions for modules in this shared library as well as
the export table containing all of the exported functions and
values from all the modules.

These capsules are stored in attributes of the shared library.

---
## generate_globals_init
```python
from emitmodule import generate_globals_init
```



---
## generate_module_def
```python
from emitmodule import generate_module_def
```

Emit the PyModuleDef struct for a module and the module init function.

---
## generate_top_level_call
```python
from emitmodule import generate_top_level_call
```

Generate call to function representing module top level.

---
## toposort_declarations
```python
from emitmodule import toposort_declarations
```

Topologically sort the declaration dict by dependencies.

Declarations can require other declarations to come prior in C (such as declaring structs).
In order to guarantee that the C output will compile the declarations will thus need to
be properly ordered. This simple DFS guarantees that we have a proper ordering.

This runs in O(V + E).

---
## declare_global
```python
from emitmodule import declare_global
```



---
## declare_internal_globals
```python
from emitmodule import declare_internal_globals
```



---
## module_internal_static_name
```python
from emitmodule import module_internal_static_name
```



---
## declare_module
```python
from emitmodule import declare_module
```



---
## declare_imports
```python
from emitmodule import declare_imports
```



---
## declare_finals
```python
from emitmodule import declare_finals
```



---
## final_definition
```python
from emitmodule import final_definition
```



---
## declare_static_pyobject
```python
from emitmodule import declare_static_pyobject
```



---
## declare_type_vars
```python
from emitmodule import declare_type_vars
```



---
## visit
```python
from emitmodule import visit
```



---
## _toposort_visit
```python
from emitmodule import _toposort_visit
```



---
## __name__
```python
from emitfunc import __name__
```

Code generation for native function bodies.

---
## native_function_type
```python
from emitfunc import native_function_type
```



---
## native_function_header
```python
from emitfunc import native_function_header
```



---
## generate_native_function
```python
from emitfunc import generate_native_function
```



---
## FunctionEmitterVisitor
```python
from emitfunc import FunctionEmitterVisitor
```



---
## __init__
```python
from emitfunc import __init__
```



---
## temp_name
```python
from emitfunc import temp_name
```



---
## visit_goto
```python
from emitfunc import visit_goto
```



---
## visit_branch
```python
from emitfunc import visit_branch
```



---
## visit_return
```python
from emitfunc import visit_return
```



---
## visit_tuple_set
```python
from emitfunc import visit_tuple_set
```



---
## visit_assign
```python
from emitfunc import visit_assign
```



---
## visit_assign_multi
```python
from emitfunc import visit_assign_multi
```



---
## visit_load_error_value
```python
from emitfunc import visit_load_error_value
```



---
## visit_load_literal
```python
from emitfunc import visit_load_literal
```



---
## get_attr_expr
```python
from emitfunc import get_attr_expr
```

Generate attribute accessor for normal (non-property) access.

This either has a form like obj->attr_name for attributes defined in non-trait
classes, and *(obj + attr_offset) for attributes defined by traits. We also
insert all necessary C casts here.

---
## visit_get_attr
```python
from emitfunc import visit_get_attr
```



---
## next_branch
```python
from emitfunc import next_branch
```



---
## visit_set_attr
```python
from emitfunc import visit_set_attr
```



---
## visit_load_static
```python
from emitfunc import visit_load_static
```



---
## visit_init_static
```python
from emitfunc import visit_init_static
```



---
## visit_tuple_get
```python
from emitfunc import visit_tuple_get
```



---
## get_dest_assign
```python
from emitfunc import get_dest_assign
```



---
## visit_call
```python
from emitfunc import visit_call
```

Call native function.

---
## visit_method_call
```python
from emitfunc import visit_method_call
```

Call native method.

---
## visit_inc_ref
```python
from emitfunc import visit_inc_ref
```



---
## visit_dec_ref
```python
from emitfunc import visit_dec_ref
```



---
## visit_box
```python
from emitfunc import visit_box
```



---
## visit_cast
```python
from emitfunc import visit_cast
```



---
## visit_unbox
```python
from emitfunc import visit_unbox
```



---
## visit_unreachable
```python
from emitfunc import visit_unreachable
```



---
## visit_raise_standard_error
```python
from emitfunc import visit_raise_standard_error
```



---
## visit_call_c
```python
from emitfunc import visit_call_c
```



---
## visit_primitive_op
```python
from emitfunc import visit_primitive_op
```



---
## visit_truncate
```python
from emitfunc import visit_truncate
```



---
## visit_extend
```python
from emitfunc import visit_extend
```



---
## visit_load_global
```python
from emitfunc import visit_load_global
```



---
## visit_int_op
```python
from emitfunc import visit_int_op
```



---
## visit_comparison_op
```python
from emitfunc import visit_comparison_op
```



---
## visit_float_op
```python
from emitfunc import visit_float_op
```



---
## visit_float_neg
```python
from emitfunc import visit_float_neg
```



---
## visit_float_comparison_op
```python
from emitfunc import visit_float_comparison_op
```



---
## visit_load_mem
```python
from emitfunc import visit_load_mem
```



---
## visit_set_mem
```python
from emitfunc import visit_set_mem
```



---
## visit_get_element_ptr
```python
from emitfunc import visit_get_element_ptr
```



---
## visit_load_address
```python
from emitfunc import visit_load_address
```



---
## visit_keep_alive
```python
from emitfunc import visit_keep_alive
```



---
## visit_unborrow
```python
from emitfunc import visit_unborrow
```



---
## label
```python
from emitfunc import label
```



---
## reg
```python
from emitfunc import reg
```



---
## ctype
```python
from emitfunc import ctype
```



---
## c_error_value
```python
from emitfunc import c_error_value
```



---
## c_undefined_value
```python
from emitfunc import c_undefined_value
```



---
## emit_line
```python
from emitfunc import emit_line
```



---
## emit_lines
```python
from emitfunc import emit_lines
```



---
## emit_inc_ref
```python
from emitfunc import emit_inc_ref
```



---
## emit_dec_ref
```python
from emitfunc import emit_dec_ref
```



---
## emit_declaration
```python
from emitfunc import emit_declaration
```



---
## emit_traceback
```python
from emitfunc import emit_traceback
```



---
## emit_attribute_error
```python
from emitfunc import emit_attribute_error
```



---
## emit_signed_int_cast
```python
from emitfunc import emit_signed_int_cast
```



---
## emit_unsigned_int_cast
```python
from emitfunc import emit_unsigned_int_cast
```



---
## __name__
```python
from emit import __name__
```

Utilities for emitting C code.

---
## HeaderDeclaration
```python
from emit import HeaderDeclaration
```

A representation of a declaration in C.

This is used to generate declarations in header files and
(optionally) definitions in source files.

Attributes:
  decl: C source code for the declaration.
  defn: Optionally, C source code for a definition.
  dependencies: The names of any objects that must be declared prior.
  is_type: Whether the declaration is of a C type. (C types will be declared in
           external header files and not marked 'extern'.)
  needs_export: Whether the declared object needs to be exported to
                other modules in the linking table.

---
## EmitterContext
```python
from emit import EmitterContext
```

Shared emitter state for a compilation group.

---
## ErrorHandler
```python
from emit import ErrorHandler
```

Describes handling errors in unbox/cast operations.

---
## AssignHandler
```python
from emit import AssignHandler
```

Assign an error value on error.

---
## GotoHandler
```python
from emit import GotoHandler
```

Goto label on error.

---
## TracebackAndGotoHandler
```python
from emit import TracebackAndGotoHandler
```

Add traceback item and goto label on error.

---
## ReturnHandler
```python
from emit import ReturnHandler
```

Return a constant value on error.

---
## Emitter
```python
from emit import Emitter
```

Helper for C code generation.

---
## c_array_initializer
```python
from emit import c_array_initializer
```

Construct an initializer for a C array variable.

Components are C expressions valid in an initializer.

For example, if components are ["1", "2"], the result
would be "{1, 2}", which can be used like this:

    int a[] = {1, 2};

If the result is long, split it into multiple lines.

---
## __init__
```python
from emit import __init__
```



---
## indent
```python
from emit import indent
```



---
## dedent
```python
from emit import dedent
```



---
## label
```python
from emit import label
```



---
## reg
```python
from emit import reg
```



---
## attr
```python
from emit import attr
```



---
## object_annotation
```python
from emit import object_annotation
```

Build a C comment with an object's string represention.

If the comment exceeds the line length limit, it's wrapped into a
multiline string (with the extra lines indented to be aligned with
the first line's comment).

If it contains illegal characters, an empty string is returned.

---
## emit_line
```python
from emit import emit_line
```



---
## emit_lines
```python
from emit import emit_lines
```



---
## emit_label
```python
from emit import emit_label
```



---
## emit_from_emitter
```python
from emit import emit_from_emitter
```



---
## emit_printf
```python
from emit import emit_printf
```



---
## temp_name
```python
from emit import temp_name
```



---
## new_label
```python
from emit import new_label
```



---
## get_module_group_prefix
```python
from emit import get_module_group_prefix
```

Get the group prefix for a module (relative to the current group).

The prefix should be prepended to the object name whenever
accessing an object from this module.

If the module lives is in the current compilation group, there is
no prefix.  But if it lives in a different group (and hence a separate
extension module), we need to access objects from it indirectly via an
export table.

For example, for code in group `a` to call a function `bar` in group `b`,
it would need to do `exports_b.CPyDef_bar(...)`, while code that is
also in group `b` can simply do `CPyDef_bar(...)`.

Thus the prefix for a module in group `b` is 'exports_b.' if the current
group is *not* b and just '' if it is.

---
## get_group_prefix
```python
from emit import get_group_prefix
```

Get the group prefix for an object.

---
## static_name
```python
from emit import static_name
```

Create name of a C static variable.

These are used for literals and imported modules, among other
things.

The caller should ensure that the (id, module) pair cannot
overlap with other calls to this method within a compilation
group.

---
## type_struct_name
```python
from emit import type_struct_name
```



---
## ctype
```python
from emit import ctype
```



---
## ctype_spaced
```python
from emit import ctype_spaced
```

Adds a space after ctype for non-pointers.

---
## c_undefined_value
```python
from emit import c_undefined_value
```



---
## c_error_value
```python
from emit import c_error_value
```



---
## native_function_name
```python
from emit import native_function_name
```



---
## tuple_c_declaration
```python
from emit import tuple_c_declaration
```



---
## bitmap_field
```python
from emit import bitmap_field
```

Return C field name used for attribute bitmap.

---
## attr_bitmap_expr
```python
from emit import attr_bitmap_expr
```

Return reference to the attribute definedness bitmap.

---
## emit_attr_bitmap_set
```python
from emit import emit_attr_bitmap_set
```

Mark an attribute as defined in the attribute bitmap.

Assumes that the attribute is tracked in the bitmap (only some attributes
use the bitmap). If 'value' is not equal to the error value, do nothing.

---
## emit_attr_bitmap_clear
```python
from emit import emit_attr_bitmap_clear
```

Mark an attribute as undefined in the attribute bitmap.

Unlike emit_attr_bitmap_set, clear unconditionally.

---
## _emit_attr_bitmap_update
```python
from emit import _emit_attr_bitmap_update
```



---
## use_vectorcall
```python
from emit import use_vectorcall
```



---
## emit_undefined_attr_check
```python
from emit import emit_undefined_attr_check
```



---
## error_value_check
```python
from emit import error_value_check
```



---
## tuple_undefined_check_cond
```python
from emit import tuple_undefined_check_cond
```



---
## tuple_undefined_value
```python
from emit import tuple_undefined_value
```

Undefined tuple value suitable in an expression.

---
## c_initializer_undefined_value
```python
from emit import c_initializer_undefined_value
```

Undefined value represented in a form suitable for variable initialization.

---
## declare_tuple_struct
```python
from emit import declare_tuple_struct
```



---
## emit_inc_ref
```python
from emit import emit_inc_ref
```

Increment reference count of C expression `dest`.

For composite unboxed structures (e.g. tuples) recursively
increment reference counts for each component.

If rare is True, optimize for code size and compilation speed.

---
## emit_dec_ref
```python
from emit import emit_dec_ref
```

Decrement reference count of C expression `dest`.

For composite unboxed structures (e.g. tuples) recursively
decrement reference counts for each component.

If rare is True, optimize for code size and compilation speed.

---
## pretty_name
```python
from emit import pretty_name
```



---
## emit_cast
```python
from emit import emit_cast
```

Emit code for casting a value of given type.

Somewhat strangely, this supports unboxed types but only
operates on boxed versions.  This is necessary to properly
handle types such as Optional[int] in compatibility glue.

By default, assign NULL (error value) to dest if the value has
an incompatible type and raise TypeError. These can be customized
using 'error' and 'raise_exception'.

Always copy/steal the reference in 'src'.

Args:
    src: Name of source C variable
    dest: Name of target C variable
    typ: Type of value
    declare_dest: If True, also declare the variable 'dest'
    error: What happens on error
    raise_exception: If True, also raise TypeError on failure
    likely: If the cast is likely to succeed (can be False for unions)

---
## emit_cast_error_handler
```python
from emit import emit_cast_error_handler
```



---
## emit_union_cast
```python
from emit import emit_union_cast
```

Emit cast to a union type.

The arguments are similar to emit_cast.

---
## emit_tuple_cast
```python
from emit import emit_tuple_cast
```

Emit cast to a tuple type.

The arguments are similar to emit_cast.

---
## emit_arg_check
```python
from emit import emit_arg_check
```



---
## emit_unbox
```python
from emit import emit_unbox
```

Emit code for unboxing a value of given type (from PyObject *).

By default, assign error value to dest if the value has an
incompatible type and raise TypeError. These can be customized
using 'error' and 'raise_exception'.

Generate a new reference unless 'borrow' is True.

Args:
    src: Name of source C variable
    dest: Name of target C variable
    typ: Type of value
    declare_dest: If True, also declare the variable 'dest'
    error: What happens on error
    raise_exception: If True, also raise TypeError on failure
    borrow: If True, create a borrowed reference

---
## emit_box
```python
from emit import emit_box
```

Emit code for boxing a value of given type.

Generate a simple assignment if no boxing is needed.

The source reference count is stolen for the result (no need to decref afterwards).

---
## emit_error_check
```python
from emit import emit_error_check
```

Emit code for checking a native function return value for uncaught exception.

---
## emit_gc_visit
```python
from emit import emit_gc_visit
```

Emit code for GC visiting a C variable reference.

Assume that 'target' represents a C expression that refers to a
struct member, such as 'self->x'.

---
## emit_gc_clear
```python
from emit import emit_gc_clear
```

Emit code for clearing a C attribute reference for GC.

Assume that 'target' represents a C expression that refers to a
struct member, such as 'self->x'.

---
## emit_traceback
```python
from emit import emit_traceback
```



---
## emit_type_error_traceback
```python
from emit import emit_type_error_traceback
```



---
## _emit_traceback
```python
from emit import _emit_traceback
```



---
## emit_unbox_failure_with_overlapping_error_value
```python
from emit import emit_unbox_failure_with_overlapping_error_value
```



---
## __name__
```python
from emitwrapper import __name__
```

Generate CPython API wrapper functions for native functions.

The wrapper functions are used by the CPython runtime when calling
native functions from interpreted code, and when the called function
can't be determined statically in compiled code. They validate, match,
unbox and type check function arguments, and box return values as
needed. All wrappers accept and return 'PyObject *' (boxed) values.

The wrappers aren't used for most calls between two native functions
or methods in a single compilation unit.

---
## wrapper_function_header
```python
from emitwrapper import wrapper_function_header
```

Return header of a vectorcall wrapper function.

See comment above for a summary of the arguments.

---
## generate_traceback_code
```python
from emitwrapper import generate_traceback_code
```



---
## make_arg_groups
```python
from emitwrapper import make_arg_groups
```

Group arguments by kind.

---
## reorder_arg_groups
```python
from emitwrapper import reorder_arg_groups
```

Reorder argument groups to match their order in a format string.

---
## make_static_kwlist
```python
from emitwrapper import make_static_kwlist
```



---
## make_format_string
```python
from emitwrapper import make_format_string
```

Return a format string that specifies the accepted arguments.

The format string is an extended subset of what is supported by
PyArg_ParseTupleAndKeywords(). Only the type 'O' is used, and we
also support some extensions:

- Required keyword-only arguments are introduced after '@'
- If the function receives *args or **kwargs, we add a '%' prefix

Each group requires the previous groups' delimiters to be present
first.

These are used by both vectorcall and legacy wrapper functions.

---
## generate_wrapper_function
```python
from emitwrapper import generate_wrapper_function
```

Generate a CPython-compatible vectorcall wrapper for a native function.

In particular, this handles unboxing the arguments, calling the native function, and
then boxing the return value.

---
## legacy_wrapper_function_header
```python
from emitwrapper import legacy_wrapper_function_header
```



---
## generate_legacy_wrapper_function
```python
from emitwrapper import generate_legacy_wrapper_function
```

Generates a CPython-compatible legacy wrapper for a native function.

In particular, this handles unboxing the arguments, calling the native function, and
then boxing the return value.

---
## generate_dunder_wrapper
```python
from emitwrapper import generate_dunder_wrapper
```

Generates a wrapper for native __dunder__ methods to be able to fit into the mapping
protocol slot. This specifically means that the arguments are taken as *PyObjects and returned
as *PyObjects.

---
## generate_ipow_wrapper
```python
from emitwrapper import generate_ipow_wrapper
```

Generate a wrapper for native __ipow__.

Since __ipow__ fills a ternary slot, but almost no one defines __ipow__ to take three
arguments, the wrapper needs to tweaked to force it to accept three arguments.

---
## generate_bin_op_wrapper
```python
from emitwrapper import generate_bin_op_wrapper
```

Generates a wrapper for a native binary dunder method.

The same wrapper that handles the forward method (e.g. __add__) also handles
the corresponding reverse method (e.g. __radd__), if defined.

Both arguments and the return value are PyObject *.

---
## generate_bin_op_forward_only_wrapper
```python
from emitwrapper import generate_bin_op_forward_only_wrapper
```



---
## generate_bin_op_reverse_only_wrapper
```python
from emitwrapper import generate_bin_op_reverse_only_wrapper
```



---
## generate_bin_op_both_wrappers
```python
from emitwrapper import generate_bin_op_both_wrappers
```



---
## generate_bin_op_reverse_dunder_call
```python
from emitwrapper import generate_bin_op_reverse_dunder_call
```



---
## handle_third_pow_argument
```python
from emitwrapper import handle_third_pow_argument
```



---
## generate_richcompare_wrapper
```python
from emitwrapper import generate_richcompare_wrapper
```

Generates a wrapper for richcompare dunder methods.

---
## generate_get_wrapper
```python
from emitwrapper import generate_get_wrapper
```

Generates a wrapper for native __get__ methods.

---
## generate_hash_wrapper
```python
from emitwrapper import generate_hash_wrapper
```

Generates a wrapper for native __hash__ methods.

---
## generate_len_wrapper
```python
from emitwrapper import generate_len_wrapper
```

Generates a wrapper for native __len__ methods.

---
## generate_bool_wrapper
```python
from emitwrapper import generate_bool_wrapper
```

Generates a wrapper for native __bool__ methods.

---
## generate_del_item_wrapper
```python
from emitwrapper import generate_del_item_wrapper
```

Generates a wrapper for native __delitem__.

This is only called from a combined __delitem__/__setitem__ wrapper.

---
## generate_set_del_item_wrapper
```python
from emitwrapper import generate_set_del_item_wrapper
```

Generates a wrapper for native __setitem__ method (also works for __delitem__).

This is used with the mapping protocol slot. Arguments are taken as *PyObjects and we
return a negative C int on error.

Create a separate wrapper function for __delitem__ as needed and have the
__setitem__ wrapper call it if the value is NULL. Return the name
of the outer (__setitem__) wrapper.

---
## generate_set_del_item_wrapper_inner
```python
from emitwrapper import generate_set_del_item_wrapper_inner
```



---
## generate_contains_wrapper
```python
from emitwrapper import generate_contains_wrapper
```

Generates a wrapper for a native __contains__ method.

---
## generate_wrapper_core
```python
from emitwrapper import generate_wrapper_core
```

Generates the core part of a wrapper function for a native function.

This expects each argument as a PyObject * named obj_{arg} as a precondition.
It converts the PyObject *s to the necessary types, checking and unboxing if necessary,
makes the call, then boxes the result if necessary and returns it.

---
## generate_arg_check
```python
from emitwrapper import generate_arg_check
```

Insert a runtime check for argument and unbox if necessary.

The object is named PyObject *obj_{}. This is expected to generate
a value of name arg_{} (unboxed if necessary). For each primitive a runtime
check ensures the correct type.

---
## WrapperGenerator
```python
from emitwrapper import WrapperGenerator
```

Helper that simplifies the generation of wrapper functions.

---
## __init__
```python
from emitwrapper import __init__
```



---
## set_target
```python
from emitwrapper import set_target
```

Set the wrapped function.

It's fine to modify the attributes initialized here later to customize
the wrapper function.

---
## wrapper_name
```python
from emitwrapper import wrapper_name
```

Return the name of the wrapper function.

---
## use_goto
```python
from emitwrapper import use_goto
```

Do we use a goto for error handling (instead of straight return)?

---
## emit_header
```python
from emitwrapper import emit_header
```

Emit the function header of the wrapper implementation.

---
## emit_arg_processing
```python
from emitwrapper import emit_arg_processing
```

Emit validation and unboxing of arguments.

---
## emit_call
```python
from emitwrapper import emit_call
```

Emit call to the wrapper function.

If not_implemented_handler is non-empty, use this C code to handle
a NotImplemented return value (if it's possible based on the return type).

---
## error
```python
from emitwrapper import error
```

Figure out how to deal with errors in the wrapper.

---
## emit_error_handling
```python
from emitwrapper import emit_error_handling
```

Emit error handling block at the end of the wrapper, if needed.

---
## finish
```python
from emitwrapper import finish
```



---
## __name__
```python
from cstring import __name__
```

Encode valid C string literals from Python strings.

If a character is not allowed in C string literals, it is either emitted
as a simple escape sequence (e.g. '\n'), or an octal escape sequence
with exactly three digits ('\oXXX'). Question marks are escaped to
prevent trigraphs in the string literal from being interpreted. Note
that '\?' is an invalid escape sequence in Python.

Consider the string literal "AB\xCDEF". As one would expect, Python
parses it as ['A', 'B', 0xCD, 'E', 'F']. However, the C standard
specifies that all hexadecimal digits immediately following '\x' will
be interpreted as part of the escape sequence. Therefore, it is
unexpectedly parsed as ['A', 'B', 0xCDEF].

Emitting ("AB\xCD" "EF") would avoid this behaviour. However, we opt
for simplicity and use octal escape sequences instead. They do not
suffer from the same issue as they are defined to parse at most three
octal digits.

---
## encode_bytes_as_c_string
```python
from cstring import encode_bytes_as_c_string
```

Produce contents of a C string literal for a byte string, without quotes.

---
## c_string_initializer
```python
from cstring import c_string_initializer
```

Create initializer for a C char[]/ char * variable from a string.

For example, if value if b'foo', the result would be '"foo"'.

---
## __name__
```python
from bytes_ops import __name__
```

Primitive bytes ops.

---
## __name__
```python
from misc_ops import __name__
```



---
## CFunctionDescription
```python
from registry import CFunctionDescription
```



---
## LoadAddressDescription
```python
from registry import LoadAddressDescription
```



---
## method_op
```python
from registry import method_op
```

Define a c function call op that replaces a method call.

This will be automatically generated by matching against the AST.

Args:
    name: short name of the method (for example, 'append')
    arg_types: argument types; the receiver is always the first argument
    return_type: type of the return value. Use void_rtype to represent void.
    c_function_name: name of the C function to call
    error_kind: how errors are represented in the result (one of ERR_*)
    var_arg_type: type of all variable arguments
    truncated_type: type to truncated to(See Truncate for info)
                    if it's defined both return_type and it should be non-referenced
                    integer types or bool type
    ordering: optional ordering of the arguments, if defined,
              reorders the arguments accordingly.
              should never be used together with var_arg_type.
              all the other arguments(such as arg_types) are in the order
              accepted by the python syntax(before reordering)
    extra_int_constants: optional extra integer constants as the last arguments to a C call
    steals: description of arguments that this steals (ref count wise)
    is_borrowed: if True, returned value is borrowed (no need to decrease refcount)
    priority: if multiple ops match, the one with the highest priority is picked
    is_pure: if True, declare that the C function has no side effects, takes immutable
             arguments, and never raises an exception

---
## function_op
```python
from registry import function_op
```

Define a c function call op that replaces a function call.

This will be automatically generated by matching against the AST.

Most arguments are similar to method_op().

Args:
    name: full name of the function
    arg_types: positional argument types for which this applies

---
## binary_op
```python
from registry import binary_op
```

Define a c function call op for a binary operation.

This will be automatically generated by matching against the AST.

Most arguments are similar to method_op(), but exactly two argument types
are expected.

---
## custom_op
```python
from registry import custom_op
```

Create a one-off CallC op that can't be automatically generated from the AST.

Most arguments are similar to method_op().

---
## custom_primitive_op
```python
from registry import custom_primitive_op
```

Define a primitive op that can't be automatically generated based on the AST.

Most arguments are similar to method_op().

---
## unary_op
```python
from registry import unary_op
```

Define a c function call op for an unary operation.

This will be automatically generated by matching against the AST.

Most arguments are similar to method_op(), but exactly one argument type
is expected.

---
## load_address_op
```python
from registry import load_address_op
```



---
## __name__
```python
from float_ops import __name__
```

Primitive float ops.

---
## __name__
```python
from str_ops import __name__
```

Primitive str ops.

---
## __name__
```python
from int_ops import __name__
```

Convert tagged int primitive ops to lower-level ops.

---
## int_binary_primitive
```python
from int_ops import int_binary_primitive
```



---
## int_binary_op
```python
from int_ops import int_binary_op
```



---
## int_unary_op
```python
from int_ops import int_unary_op
```



---
## __name__
```python
from list_ops import __name__
```



---
## __name__
```python
from dict_ops import __name__
```

Primitive dict ops.

---
## __name__
```python
from tuple_ops import __name__
```

Primitive tuple ops for *variable-length* tuples.

Note: Varying-length tuples are represented as boxed Python tuple
objects, i.e. tuple_rprimitive (RPrimitive), not RTuple.

---
## __name__
```python
from generic_ops import __name__
```

Fallback primitive operations that operate on 'object' operands.

These just call the relevant Python C API function or a thin wrapper
around an API function. Most of these also have faster, specialized
ops that operate on some more specific types.

Many of these ops are given a low priority (0) so that specialized ops
will take precedence. If your specialized op doesn't seem to be used,
check that the priorities are configured properly.

---
## __name__
```python
from exc_ops import __name__
```

Exception-related primitive ops.

---
## __name__
```python
from set_ops import __name__
```

Primitive set (and frozenset) ops.

---
## var_object_size
```python
from misc_ops import var_object_size
```



---
## lower_primitive_op
```python
from registry import lower_primitive_op
```

Register a handler that generates low-level IR for a primitive op.

---
## wrapper
```python
from registry import wrapper
```



---
## IntComparisonOpDescription
```python
from int_ops import IntComparisonOpDescription
```



---
## compare_tagged
```python
from int_ops import compare_tagged
```

Compare two tagged integers using given operator (value context).

---
## lower_int_eq
```python
from int_ops import lower_int_eq
```



---
## lower_int_ne
```python
from int_ops import lower_int_ne
```



---
## lower_int_lt
```python
from int_ops import lower_int_lt
```



---
## lower_int_le
```python
from int_ops import lower_int_le
```



---
## lower_int_gt
```python
from int_ops import lower_int_gt
```



---
## lower_int_ge
```python
from int_ops import lower_int_ge
```



---
## buf_init_item
```python
from list_ops import buf_init_item
```

Initialize an item in a buffer of "PyObject *" values at given index.

This can be used to initialize the data buffer of a freshly allocated list
object.

---
## list_items
```python
from list_ops import list_items
```



---
## __name__
```python
from refcount import __name__
```

Transformation for inserting refrecence count inc/dec opcodes.

This transformation happens towards the end of compilation. Before this
transformation, reference count management is not explicitly handled at all.
By postponing this pass, the previous passes are simpler as they don't have
to update reference count opcodes.

The approach is to decrement reference counts soon after a value is no
longer live, to quickly free memory (and call __del__ methods), though
there are no strict guarantees -- other than that local variables are
freed before return from a function.

Function arguments are a little special. They are initially considered
'borrowed' from the caller and their reference counts don't need to be
decremented before returning. An assignment to a borrowed value turns it
into a regular, owned reference that needs to freed before return.

---
## insert_ref_count_opcodes
```python
from refcount import insert_ref_count_opcodes
```

Insert reference count inc/dec opcodes to a function.

This is the entry point to this module.

---
## is_maybe_undefined
```python
from refcount import is_maybe_undefined
```



---
## maybe_append_dec_ref
```python
from refcount import maybe_append_dec_ref
```



---
## maybe_append_inc_ref
```python
from refcount import maybe_append_inc_ref
```



---
## transform_block
```python
from refcount import transform_block
```



---
## insert_branch_inc_and_decrefs
```python
from refcount import insert_branch_inc_and_decrefs
```

Insert inc_refs and/or dec_refs after a branch/goto.

Add dec_refs for registers that become dead after a branch.
Add inc_refs for registers that become unborrowed after a branch or goto.

Branches are special as the true and false targets may have a different
live and borrowed register sets. Add new blocks before the true/false target
blocks that tweak reference counts.

Example where we need to add an inc_ref:

  def f(a: int) -> None
      if a:
          a = 1
      return a  # a is borrowed if condition is false and unborrowed if true

---
## after_branch_decrefs
```python
from refcount import after_branch_decrefs
```



---
## after_branch_increfs
```python
from refcount import after_branch_increfs
```



---
## add_block
```python
from refcount import add_block
```



---
## make_value_ordering
```python
from refcount import make_value_ordering
```

Create a ordering of values that allows them to be sorted.

This omits registers that are only ever read.

---
## __name__
```python
from flag_elimination import __name__
```

Bool register elimination optimization.

Example input:

  L1:
    r0 = f()
    b = r0
    goto L3
  L2:
    r1 = g()
    b = r1
    goto L3
  L3:
    if b goto L4 else goto L5

The register b is redundant and we replace the assignments with two copies of
the branch in L3:

  L1:
    r0 = f()
    if r0 goto L4 else goto L5
  L2:
    r1 = g()
    if r1 goto L4 else goto L5

This helps generate simpler IR for tagged integers comparisons, for example.

---
## do_flag_elimination
```python
from flag_elimination import do_flag_elimination
```



---
## FlagEliminationTransform
```python
from flag_elimination import FlagEliminationTransform
```



---
## __init__
```python
from flag_elimination import __init__
```



---
## visit_assign
```python
from flag_elimination import visit_assign
```



---
## visit_goto
```python
from flag_elimination import visit_goto
```



---
## visit_branch
```python
from flag_elimination import visit_branch
```



---
## __name__
```python
from uninit import __name__
```

Insert checks for uninitialized values.

---
## insert_uninit_checks
```python
from uninit import insert_uninit_checks
```



---
## split_blocks_at_uninits
```python
from uninit import split_blocks_at_uninits
```



---
## check_for_uninit_using_bitmap
```python
from uninit import check_for_uninit_using_bitmap
```

Check if src is defined using a bitmap.

Modifies ops, bitmap_registers and bitmap_backed.

---
## update_register_assignments_to_set_bitmap
```python
from uninit import update_register_assignments_to_set_bitmap
```

Update some assignments to registers to also set a bit in a bitmap.

The bitmaps are used to track if a local variable has been assigned to.

Modifies blocks.

---
## __name__
```python
from ir_transform import __name__
```

Helpers for implementing generic IR to IR transforms.

---
## IRTransform
```python
from ir_transform import IRTransform
```

Identity transform.

Subclass and override to perform changes to IR.

Subclass IRTransform and override any OpVisitor visit_* methods
that perform any IR changes. The default implementations implement
an identity transform.

A visit method can return None to remove ops. In this case the
transform must ensure that no op uses the original removed op
as a source after the transform.

You can retain old BasicBlock and op references in ops. The transform
will automatically patch these for you as needed.

---
## PatchVisitor
```python
from ir_transform import PatchVisitor
```



---
## is_empty_block
```python
from ir_transform import is_empty_block
```



---
## __init__
```python
from ir_transform import __init__
```



---
## transform_blocks
```python
from ir_transform import transform_blocks
```

Transform basic blocks that represent a single function.

The result of the transform will be collected at self.builder.blocks.

---
## add
```python
from ir_transform import add
```



---
## visit_goto
```python
from ir_transform import visit_goto
```



---
## visit_branch
```python
from ir_transform import visit_branch
```



---
## visit_return
```python
from ir_transform import visit_return
```



---
## visit_unreachable
```python
from ir_transform import visit_unreachable
```



---
## visit_assign
```python
from ir_transform import visit_assign
```



---
## visit_assign_multi
```python
from ir_transform import visit_assign_multi
```



---
## visit_load_error_value
```python
from ir_transform import visit_load_error_value
```



---
## visit_load_literal
```python
from ir_transform import visit_load_literal
```



---
## visit_get_attr
```python
from ir_transform import visit_get_attr
```



---
## visit_set_attr
```python
from ir_transform import visit_set_attr
```



---
## visit_load_static
```python
from ir_transform import visit_load_static
```



---
## visit_init_static
```python
from ir_transform import visit_init_static
```



---
## visit_tuple_get
```python
from ir_transform import visit_tuple_get
```



---
## visit_tuple_set
```python
from ir_transform import visit_tuple_set
```



---
## visit_inc_ref
```python
from ir_transform import visit_inc_ref
```



---
## visit_dec_ref
```python
from ir_transform import visit_dec_ref
```



---
## visit_call
```python
from ir_transform import visit_call
```



---
## visit_method_call
```python
from ir_transform import visit_method_call
```



---
## visit_cast
```python
from ir_transform import visit_cast
```



---
## visit_box
```python
from ir_transform import visit_box
```



---
## visit_unbox
```python
from ir_transform import visit_unbox
```



---
## visit_raise_standard_error
```python
from ir_transform import visit_raise_standard_error
```



---
## visit_call_c
```python
from ir_transform import visit_call_c
```



---
## visit_primitive_op
```python
from ir_transform import visit_primitive_op
```



---
## visit_truncate
```python
from ir_transform import visit_truncate
```



---
## visit_extend
```python
from ir_transform import visit_extend
```



---
## visit_load_global
```python
from ir_transform import visit_load_global
```



---
## visit_int_op
```python
from ir_transform import visit_int_op
```



---
## visit_comparison_op
```python
from ir_transform import visit_comparison_op
```



---
## visit_float_op
```python
from ir_transform import visit_float_op
```



---
## visit_float_neg
```python
from ir_transform import visit_float_neg
```



---
## visit_float_comparison_op
```python
from ir_transform import visit_float_comparison_op
```



---
## visit_load_mem
```python
from ir_transform import visit_load_mem
```



---
## visit_set_mem
```python
from ir_transform import visit_set_mem
```



---
## visit_get_element_ptr
```python
from ir_transform import visit_get_element_ptr
```



---
## visit_load_address
```python
from ir_transform import visit_load_address
```



---
## visit_keep_alive
```python
from ir_transform import visit_keep_alive
```



---
## visit_unborrow
```python
from ir_transform import visit_unborrow
```



---
## fix_op
```python
from ir_transform import fix_op
```



---
## fix_block
```python
from ir_transform import fix_block
```



---
## __name__
```python
from lower import __name__
```

Transform IR to lower-level ops.

Higher-level ops are used in earlier compiler passes, as they make
various analyses, optimizations and transforms easier to implement.
Later passes use lower-level ops, as they are easier to generate code
from, and they help with lower-level optimizations.

Lowering of various primitive ops is implemented in the mypyc.lower
package.

---
## lower_ir
```python
from lower import lower_ir
```



---
## LoweringVisitor
```python
from lower import LoweringVisitor
```



---
## visit_primitive_op
```python
from lower import visit_primitive_op
```



---
## insert_exception_handling
```python
from exceptions import insert_exception_handling
```



---
## add_default_handler_block
```python
from exceptions import add_default_handler_block
```



---
## split_blocks_at_errors
```python
from exceptions import split_blocks_at_errors
```



---
## primitive_call
```python
from exceptions import primitive_call
```



---
## adjust_error_kinds
```python
from exceptions import adjust_error_kinds
```

Infer more precise error_kind attributes for ops.

We have access here to more information than what was available
when the IR was initially built.

---
## insert_overlapping_error_value_check
```python
from exceptions import insert_overlapping_error_value_check
```

Append to ops to check for an overlapping error value.

---
## __name__
```python
from copy_propagation import __name__
```

Simple copy propagation optimization.

Example input:

    x = f()
    y = x

The register x is redundant and we can directly assign its value to y:

    y = f()

This can optimize away registers that are assigned to once.

---
## do_copy_propagation
```python
from copy_propagation import do_copy_propagation
```

Perform copy propagation optimization for fn.

---
## CopyPropagationTransform
```python
from copy_propagation import CopyPropagationTransform
```



---
## __init__
```python
from copy_propagation import __init__
```



---
## visit_assign
```python
from copy_propagation import visit_assign
```



---
## __name__
```python
from driver import __name__
```

Default driver for run tests (run-*.test).

This imports the 'native' module (containing the compiled test cases)
and calls each function starting with test_, and reports any
exceptions as failures.

Test cases can provide a custom driver.py that overrides this file.

---
## extract_line
```python
from driver import extract_line
```



---
## __name__
```python
from ir import __name__
```



---
## __SupportsAbs
```python
from ir import __SupportsAbs
```



---
## __SupportsDivMod
```python
from ir import __SupportsDivMod
```



---
## __SupportsRDivMod
```python
from ir import __SupportsRDivMod
```



---
## __SupportsPow2
```python
from ir import __SupportsPow2
```



---
## __SupportsPow3NoneOnly
```python
from ir import __SupportsPow3NoneOnly
```



---
## __SupportsPow3
```python
from ir import __SupportsPow3
```



---
## object
```python
from ir import object
```



---
## type
```python
from ir import type
```



---
## ellipsis
```python
from ir import ellipsis
```



---
## int
```python
from ir import int
```



---
## str
```python
from ir import str
```



---
## float
```python
from ir import float
```



---
## complex
```python
from ir import complex
```



---
## bytes
```python
from ir import bytes
```



---
## bytearray
```python
from ir import bytearray
```



---
## bool
```python
from ir import bool
```



---
## tuple
```python
from ir import tuple
```



---
## function
```python
from ir import function
```



---
## list
```python
from ir import list
```



---
## dict
```python
from ir import dict
```



---
## set
```python
from ir import set
```



---
## frozenset
```python
from ir import frozenset
```



---
## slice
```python
from ir import slice
```



---
## range
```python
from ir import range
```



---
## property
```python
from ir import property
```



---
## BaseException
```python
from ir import BaseException
```



---
## Exception
```python
from ir import Exception
```



---
## Warning
```python
from ir import Warning
```



---
## UserWarning
```python
from ir import UserWarning
```



---
## TypeError
```python
from ir import TypeError
```



---
## ValueError
```python
from ir import ValueError
```



---
## AttributeError
```python
from ir import AttributeError
```



---
## ImportError
```python
from ir import ImportError
```



---
## NameError
```python
from ir import NameError
```



---
## UnboundLocalError
```python
from ir import UnboundLocalError
```



---
## LookupError
```python
from ir import LookupError
```



---
## KeyError
```python
from ir import KeyError
```



---
## IndexError
```python
from ir import IndexError
```



---
## RuntimeError
```python
from ir import RuntimeError
```



---
## UnicodeEncodeError
```python
from ir import UnicodeEncodeError
```



---
## UnicodeDecodeError
```python
from ir import UnicodeDecodeError
```



---
## NotImplementedError
```python
from ir import NotImplementedError
```



---
## StopIteration
```python
from ir import StopIteration
```



---
## ArithmeticError
```python
from ir import ArithmeticError
```



---
## ZeroDivisionError
```python
from ir import ZeroDivisionError
```



---
## OverflowError
```python
from ir import OverflowError
```



---
## GeneratorExit
```python
from ir import GeneratorExit
```



---
## any
```python
from ir import any
```



---
## all
```python
from ir import all
```



---
## sum
```python
from ir import sum
```



---
## reversed
```python
from ir import reversed
```



---
## id
```python
from ir import id
```



---
## len
```python
from ir import len
```



---
## print
```python
from ir import print
```



---
## isinstance
```python
from ir import isinstance
```



---
## iter
```python
from ir import iter
```



---
## next
```python
from ir import next
```



---
## hash
```python
from ir import hash
```



---
## globals
```python
from ir import globals
```



---
## getattr
```python
from ir import getattr
```



---
## setattr
```python
from ir import setattr
```



---
## enumerate
```python
from ir import enumerate
```



---
## zip
```python
from ir import zip
```



---
## eval
```python
from ir import eval
```



---
## abs
```python
from ir import abs
```



---
## divmod
```python
from ir import divmod
```



---
## pow
```python
from ir import pow
```



---
## exit
```python
from ir import exit
```



---
## min
```python
from ir import min
```



---
## max
```python
from ir import max
```



---
## repr
```python
from ir import repr
```



---
## ascii
```python
from ir import ascii
```



---
## ord
```python
from ir import ord
```



---
## chr
```python
from ir import chr
```



---
## classmethod
```python
from ir import classmethod
```



---
## staticmethod
```python
from ir import staticmethod
```



---
## __abs__
```python
from ir import __abs__
```



---
## __divmod__
```python
from ir import __divmod__
```



---
## __rdivmod__
```python
from ir import __rdivmod__
```



---
## __pow__
```python
from ir import __pow__
```



---
## __init__
```python
from ir import __init__
```



---
## __eq__
```python
from ir import __eq__
```



---
## __ne__
```python
from ir import __ne__
```



---
## __or__
```python
from ir import __or__
```



---
## __add__
```python
from ir import __add__
```



---
## __sub__
```python
from ir import __sub__
```



---
## __mul__
```python
from ir import __mul__
```



---
## __floordiv__
```python
from ir import __floordiv__
```



---
## __truediv__
```python
from ir import __truediv__
```



---
## __mod__
```python
from ir import __mod__
```



---
## __neg__
```python
from ir import __neg__
```



---
## __pos__
```python
from ir import __pos__
```



---
## __invert__
```python
from ir import __invert__
```



---
## __and__
```python
from ir import __and__
```



---
## __xor__
```python
from ir import __xor__
```



---
## __lshift__
```python
from ir import __lshift__
```



---
## __rshift__
```python
from ir import __rshift__
```



---
## __lt__
```python
from ir import __lt__
```



---
## __gt__
```python
from ir import __gt__
```



---
## __le__
```python
from ir import __le__
```



---
## __ge__
```python
from ir import __ge__
```



---
## __rmul__
```python
from ir import __rmul__
```



---
## __getitem__
```python
from ir import __getitem__
```



---
## __contains__
```python
from ir import __contains__
```



---
## __iter__
```python
from ir import __iter__
```



---
## split
```python
from ir import split
```



---
## strip
```python
from ir import strip
```



---
## join
```python
from ir import join
```



---
## format
```python
from ir import format
```



---
## upper
```python
from ir import upper
```



---
## startswith
```python
from ir import startswith
```



---
## endswith
```python
from ir import endswith
```



---
## replace
```python
from ir import replace
```



---
## encode
```python
from ir import encode
```



---
## __radd__
```python
from ir import __radd__
```



---
## __rsub__
```python
from ir import __rsub__
```



---
## decode
```python
from ir import decode
```



---
## __setitem__
```python
from ir import __setitem__
```



---
## __len__
```python
from ir import __len__
```



---
## __delitem__
```python
from ir import __delitem__
```



---
## append
```python
from ir import append
```



---
## pop
```python
from ir import pop
```



---
## count
```python
from ir import count
```



---
## extend
```python
from ir import extend
```



---
## insert
```python
from ir import insert
```



---
## sort
```python
from ir import sort
```



---
## reverse
```python
from ir import reverse
```



---
## remove
```python
from ir import remove
```



---
## index
```python
from ir import index
```



---
## update
```python
from ir import update
```



---
## keys
```python
from ir import keys
```



---
## values
```python
from ir import values
```



---
## items
```python
from ir import items
```



---
## clear
```python
from ir import clear
```



---
## copy
```python
from ir import copy
```



---
## setdefault
```python
from ir import setdefault
```



---
## add
```python
from ir import add
```



---
## discard
```python
from ir import discard
```



---
## __next__
```python
from ir import __next__
```



---
## getter
```python
from ir import getter
```



---
## setter
```python
from ir import setter
```



---
## deleter
```python
from ir import deleter
```



---
## __get__
```python
from ir import __get__
```



---
## __set__
```python
from ir import __set__
```



---
## __delete__
```python
from ir import __delete__
```



---
## fget
```python
from ir import fget
```



---
## fset
```python
from ir import fset
```



---
## fdel
```python
from ir import fdel
```



---
## assertRaises
```python
from testutil import assertRaises
```



---
## assertDomainError
```python
from testutil import assertDomainError
```



---
## assertMathRangeError
```python
from testutil import assertMathRangeError
```



---
## run_generator
```python
from testutil import run_generator
```



---
## async_val
```python
from testutil import async_val
```



---
## make_python_function
```python
from testutil import make_python_function
```



---
## __init__
```python
from testutil import __init__
```



---
## __await__
```python
from testutil import __await__
```



---
## g
```python
from testutil import g
```



---
## __name__
```python
from _base import __name__
```



---
## StateDictSplit
```python
from _base import StateDictSplit
```



---
## split_state_dict_into_shards_factory
```python
from _base import split_state_dict_into_shards_factory
```

Split a model state dictionary in shards so that each shard is smaller than a given size.

The shards are determined by iterating through the `state_dict` in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].

<Tip warning={true}>

If one of the model's tensor is bigger than `max_shard_size`, it will end up in its own shard which will have a
size greater than `max_shard_size`.

</Tip>

Args:
    state_dict (`Dict[str, Tensor]`):
        The state dictionary to save.
    get_storage_size (`Callable[[Tensor], int]`):
        A function that returns the size of a tensor when saved on disk in bytes.
    get_storage_id (`Callable[[Tensor], Optional[Any]]`, *optional*):
        A function that returns a unique identifier to a tensor storage. Multiple different tensors can share the
        same underlying storage. This identifier is guaranteed to be unique and constant for this tensor's storage
        during its lifetime. Two tensor storages with non-overlapping lifetimes may have the same id.
    filename_pattern (`str`, *optional*):
        The pattern to generate the files names in which the model will be saved. Pattern must be a string that
        can be formatted with `filename_pattern.format(suffix=...)` and must contain the keyword `suffix`
    max_shard_size (`int` or `str`, *optional*):
        The maximum size of each shard, in bytes. Defaults to 5GB.

Returns:
    [`StateDictSplit`]: A `StateDictSplit` object containing the shards and the index to retrieve them.

---
## parse_size_to_int
```python
from _base import parse_size_to_int
```

Parse a size expressed as a string with digits and unit (like `"5MB"`) to an integer (in bytes).

Supported units are "TB", "GB", "MB", "KB".

Args:
    size_as_str (`str`): The size to convert. Will be directly returned if an `int`.

Example:

```py
>>> parse_size_to_int("5MB")
5000000
```

---
## __post_init__
```python
from _base import __post_init__
```



---
## __name__
```python
from _tensorflow import __name__
```

Contains tensorflow-specific helpers.

---
## split_tf_state_dict_into_shards
```python
from _tensorflow import split_tf_state_dict_into_shards
```

Split a model state dictionary in shards so that each shard is smaller than a given size.

The shards are determined by iterating through the `state_dict` in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].

<Tip warning={true}>

If one of the model's tensor is bigger than `max_shard_size`, it will end up in its own shard which will have a
size greater than `max_shard_size`.

</Tip>

Args:
    state_dict (`Dict[str, Tensor]`):
        The state dictionary to save.
    filename_pattern (`str`, *optional*):
        The pattern to generate the files names in which the model will be saved. Pattern must be a string that
        can be formatted with `filename_pattern.format(suffix=...)` and must contain the keyword `suffix`
        Defaults to `"tf_model{suffix}.h5"`.
    max_shard_size (`int` or `str`, *optional*):
        The maximum size of each shard, in bytes. Defaults to 5GB.

Returns:
    [`StateDictSplit`]: A `StateDictSplit` object containing the shards and the index to retrieve them.

---
## get_tf_storage_size
```python
from _tensorflow import get_tf_storage_size
```



---
## _dtype_byte_size_tf
```python
from _tensorflow import _dtype_byte_size_tf
```

Returns the size (in bytes) occupied by one parameter of type `dtype`.
Taken from https://github.com/huggingface/transformers/blob/74d9d0cebb0263a3f8ab9c280569170cc74651d0/src/transformers/modeling_tf_utils.py#L608.
NOTE: why not `tensor.numpy().nbytes`?
Example:
```py
>>> _dtype_byte_size(tf.float32)
4
```

---
## __name__
```python
from _torch import __name__
```

Contains pytorch-specific helpers.

---
## save_torch_model
```python
from _torch import save_torch_model
```

Saves a given torch model to disk, handling sharding and shared tensors issues.

See also [`save_torch_state_dict`] to save a state dict with more flexibility.

For more information about tensor sharing, check out [this guide](https://huggingface.co/docs/safetensors/torch_shared_tensors).

The model state dictionary is split into shards so that each shard is smaller than a given size. The shards are
saved in the `save_directory` with the given `filename_pattern`. If the model is too big to fit in a single shard,
an index file is saved in the `save_directory` to indicate where each tensor is saved. This helper uses
[`split_torch_state_dict_into_shards`] under the hood. If `safe_serialization` is `True`, the shards are saved as
safetensors (the default). Otherwise, the shards are saved as pickle.

Before saving the model, the `save_directory` is cleaned from any previous shard files.

<Tip warning={true}>

If one of the model's tensor is bigger than `max_shard_size`, it will end up in its own shard which will have a
size greater than `max_shard_size`.

</Tip>

Args:
    model (`torch.nn.Module`):
        The model to save on disk.
    save_directory (`str` or `Path`):
        The directory in which the model will be saved.
    filename_pattern (`str`, *optional*):
        The pattern to generate the files names in which the model will be saved. Pattern must be a string that
        can be formatted with `filename_pattern.format(suffix=...)` and must contain the keyword `suffix`
        Defaults to `"model{suffix}.safetensors"` or `pytorch_model{suffix}.bin` depending on `safe_serialization`
        parameter.
    force_contiguous (`boolean`, *optional*):
        Forcing the state_dict to be saved as contiguous tensors. This has no effect on the correctness of the
        model, but it could potentially change performance if the layout of the tensor was chosen specifically for
        that reason. Defaults to `True`.
    max_shard_size (`int` or `str`, *optional*):
        The maximum size of each shard, in bytes. Defaults to 5GB.
    metadata (`Dict[str, str]`, *optional*):
        Extra information to save along with the model. Some metadata will be added for each dropped tensors.
        This information will not be enough to recover the entire shared structure but might help understanding
        things.
    safe_serialization (`bool`, *optional*):
        Whether to save as safetensors, which is the default behavior. If `False`, the shards are saved as pickle.
        Safe serialization is recommended for security reasons. Saving as pickle is deprecated and will be removed
        in a future version.

Example:

```py
>>> from huggingface_hub import save_torch_model
>>> model = ... # A PyTorch model

# Save state dict to "path/to/folder". The model will be split into shards of 5GB each and saved as safetensors.
>>> save_torch_model(model, "path/to/folder")

# Load model back
>>> from huggingface_hub import load_torch_model  # TODO
>>> load_torch_model(model, "path/to/folder")
>>>
```

---
## save_torch_state_dict
```python
from _torch import save_torch_state_dict
```

Save a model state dictionary to the disk, handling sharding and shared tensors issues.

See also [`save_torch_model`] to directly save a PyTorch model.

For more information about tensor sharing, check out [this guide](https://huggingface.co/docs/safetensors/torch_shared_tensors).

The model state dictionary is split into shards so that each shard is smaller than a given size. The shards are
saved in the `save_directory` with the given `filename_pattern`. If the model is too big to fit in a single shard,
an index file is saved in the `save_directory` to indicate where each tensor is saved. This helper uses
[`split_torch_state_dict_into_shards`] under the hood. If `safe_serialization` is `True`, the shards are saved as
safetensors (the default). Otherwise, the shards are saved as pickle.

Before saving the model, the `save_directory` is cleaned from any previous shard files.

<Tip warning={true}>

If one of the model's tensor is bigger than `max_shard_size`, it will end up in its own shard which will have a
size greater than `max_shard_size`.

</Tip>

Args:
    state_dict (`Dict[str, torch.Tensor]`):
        The state dictionary to save.
    save_directory (`str` or `Path`):
        The directory in which the model will be saved.
    filename_pattern (`str`, *optional*):
        The pattern to generate the files names in which the model will be saved. Pattern must be a string that
        can be formatted with `filename_pattern.format(suffix=...)` and must contain the keyword `suffix`
        Defaults to `"model{suffix}.safetensors"` or `pytorch_model{suffix}.bin` depending on `safe_serialization`
        parameter.
    force_contiguous (`boolean`, *optional*):
        Forcing the state_dict to be saved as contiguous tensors. This has no effect on the correctness of the
        model, but it could potentially change performance if the layout of the tensor was chosen specifically for
        that reason. Defaults to `True`.
    max_shard_size (`int` or `str`, *optional*):
        The maximum size of each shard, in bytes. Defaults to 5GB.
    metadata (`Dict[str, str]`, *optional*):
        Extra information to save along with the model. Some metadata will be added for each dropped tensors.
        This information will not be enough to recover the entire shared structure but might help understanding
        things.
    safe_serialization (`bool`, *optional*):
        Whether to save as safetensors, which is the default behavior. If `False`, the shards are saved as pickle.
        Safe serialization is recommended for security reasons. Saving as pickle is deprecated and will be removed
        in a future version.

Example:

```py
>>> from huggingface_hub import save_torch_state_dict
>>> model = ... # A PyTorch model

# Save state dict to "path/to/folder". The model will be split into shards of 5GB each and saved as safetensors.
>>> state_dict = model_to_save.state_dict()
>>> save_torch_state_dict(state_dict, "path/to/folder")
```

---
## split_torch_state_dict_into_shards
```python
from _torch import split_torch_state_dict_into_shards
```

Split a model state dictionary in shards so that each shard is smaller than a given size.

The shards are determined by iterating through the `state_dict` in the order of its keys. There is no optimization
made to make each shard as close as possible to the maximum size passed. For example, if the limit is 10GB and we
have tensors of sizes [6GB, 6GB, 2GB, 6GB, 2GB, 2GB] they will get sharded as [6GB], [6+2GB], [6+2+2GB] and not
[6+2+2GB], [6+2GB], [6GB].


<Tip>

To save a model state dictionary to the disk, see [`save_torch_state_dict`]. This helper uses
`split_torch_state_dict_into_shards` under the hood.

</Tip>

<Tip warning={true}>

If one of the model's tensor is bigger than `max_shard_size`, it will end up in its own shard which will have a
size greater than `max_shard_size`.

</Tip>

Args:
    state_dict (`Dict[str, torch.Tensor]`):
        The state dictionary to save.
    filename_pattern (`str`, *optional*):
        The pattern to generate the files names in which the model will be saved. Pattern must be a string that
        can be formatted with `filename_pattern.format(suffix=...)` and must contain the keyword `suffix`
        Defaults to `"model{suffix}.safetensors"`.
    max_shard_size (`int` or `str`, *optional*):
        The maximum size of each shard, in bytes. Defaults to 5GB.

Returns:
    [`StateDictSplit`]: A `StateDictSplit` object containing the shards and the index to retrieve them.

Example:
```py
>>> import json
>>> import os
>>> from safetensors.torch import save_file as safe_save_file
>>> from huggingface_hub import split_torch_state_dict_into_shards

>>> def save_state_dict(state_dict: Dict[str, torch.Tensor], save_directory: str):
...     state_dict_split = split_torch_state_dict_into_shards(state_dict)
...     for filename, tensors in state_dict_split.filename_to_tensors.items():
...         shard = {tensor: state_dict[tensor] for tensor in tensors}
...         safe_save_file(
...             shard,
...             os.path.join(save_directory, filename),
...             metadata={"format": "pt"},
...         )
...     if state_dict_split.is_sharded:
...         index = {
...             "metadata": state_dict_split.metadata,
...             "weight_map": state_dict_split.tensor_to_filename,
...         }
...         with open(os.path.join(save_directory, "model.safetensors.index.json"), "w") as f:
...             f.write(json.dumps(index, indent=2))
```

---
## _get_unique_id
```python
from _torch import _get_unique_id
```

Returns a unique id for plain tensor
or a (potentially nested) Tuple of unique id for the flattened Tensor
if the input is a wrapper tensor subclass Tensor

---
## get_torch_storage_id
```python
from _torch import get_torch_storage_id
```

Return unique identifier to a tensor storage.

Multiple different tensors can share the same underlying storage. For
example, "meta" tensors all share the same storage, and thus their identifier will all be equal. This identifier is
guaranteed to be unique and constant for this tensor's storage during its lifetime. Two tensor storages with
non-overlapping lifetimes may have the same id.

Taken from https://github.com/huggingface/transformers/blob/1ecf5f7c982d761b4daaa96719d162c324187c64/src/transformers/pytorch_utils.py#L278.

---
## get_torch_storage_size
```python
from _torch import get_torch_storage_size
```

Taken from https://github.com/huggingface/safetensors/blob/08db34094e9e59e2f9218f2df133b7b4aaff5a99/bindings/python/py_src/safetensors/torch.py#L31C1-L41C59

---
## is_torch_tpu_available
```python
from _torch import is_torch_tpu_available
```

Checks if `torch_xla` is installed and potentially if a TPU is in the environment

Taken from https://github.com/huggingface/transformers/blob/1ecf5f7c982d761b4daaa96719d162c324187c64/src/transformers/utils/import_utils.py#L463.

---
## storage_ptr
```python
from _torch import storage_ptr
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L11.

---
## _clean_state_dict_for_safetensors
```python
from _torch import _clean_state_dict_for_safetensors
```

Remove shared tensors from state_dict and update metadata accordingly (for reloading).

Warning: `state_dict` and `metadata` are mutated in-place!

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L155.

---
## _end_ptr
```python
from _torch import _end_ptr
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L23.

---
## _filter_shared_not_shared
```python
from _torch import _filter_shared_not_shared
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L44

---
## _find_shared_tensors
```python
from _torch import _find_shared_tensors
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L69.

---
## _is_complete
```python
from _torch import _is_complete
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L80

---
## _remove_duplicate_names
```python
from _torch import _remove_duplicate_names
```

Taken from https://github.com/huggingface/safetensors/blob/079781fd0dc455ba0fe851e2b4507c33d0c0d407/bindings/python/py_src/safetensors/torch.py#L80

---
## _get_dtype_size
```python
from _torch import _get_dtype_size
```

Taken from https://github.com/huggingface/safetensors/blob/08db34094e9e59e2f9218f2df133b7b4aaff5a99/bindings/python/py_src/safetensors/torch.py#L344

---
## _get_library_name
```python
from logging import _get_library_name
```



---
## _get_library_root_logger
```python
from logging import _get_library_root_logger
```



---
## _get_default_logging_level
```python
from logging import _get_default_logging_level
```

If DATASETS_VERBOSITY env var is set to one of the valid choices return that as the new default level.
If it is not - fall back to ``_default_log_level``

---
## _configure_library_root_logger
```python
from logging import _configure_library_root_logger
```



---
## _reset_library_root_logger
```python
from logging import _reset_library_root_logger
```



---
## get_logger
```python
from logging import get_logger
```

Return a logger with the specified name.
This function can be used in dataset scripts.

---
## get_verbosity
```python
from logging import get_verbosity
```

Return the current level for the HuggingFace datasets library's root logger.
Returns:
    Logging level, e.g., `datasets.logging.DEBUG` and `datasets.logging.INFO`.

<Tip>

    HuggingFace datasets library has following logging levels:
    - `datasets.logging.CRITICAL`, `datasets.logging.FATAL`
    - `datasets.logging.ERROR`
    - `datasets.logging.WARNING`, `datasets.logging.WARN`
    - `datasets.logging.INFO`
    - `datasets.logging.DEBUG`

</Tip>

---
## set_verbosity
```python
from logging import set_verbosity
```

Set the level for the Hugging Face Datasets library's root logger.
Args:
    verbosity:
        Logging level, e.g., `datasets.logging.DEBUG` and `datasets.logging.INFO`.

---
## set_verbosity_info
```python
from logging import set_verbosity_info
```

Set the level for the Hugging Face datasets library's root logger to `INFO`.

This will display most of the logging information and tqdm bars.

Shortcut to `datasets.logging.set_verbosity(datasets.logging.INFO)`.

---
## set_verbosity_warning
```python
from logging import set_verbosity_warning
```

Set the level for the Hugging Face datasets library's root logger to `WARNING`.

This will display only the warning and errors logging information and tqdm bars.

Shortcut to `datasets.logging.set_verbosity(datasets.logging.WARNING)`.

---
## set_verbosity_debug
```python
from logging import set_verbosity_debug
```

Set the level for the Hugging Face datasets library's root logger to `DEBUG`.

This will display all the logging information and tqdm bars.

Shortcut to `datasets.logging.set_verbosity(datasets.logging.DEBUG)`.

---
## set_verbosity_error
```python
from logging import set_verbosity_error
```

Set the level for the Hugging Face datasets library's root logger to `ERROR`.

This will display only the errors logging information and tqdm bars.

Shortcut to `datasets.logging.set_verbosity(datasets.logging.ERROR)`.

---
## disable_propagation
```python
from logging import disable_propagation
```

Disable propagation of the library log outputs.
Note that log propagation is disabled by default.

---
## enable_propagation
```python
from logging import enable_propagation
```

Enable propagation of the library log outputs.
Please disable the Hugging Face datasets library's default handler to prevent double logging if the root logger has
been configured.

---
## is_jsonable
```python
from _typing import is_jsonable
```

Check if an object is JSON serializable.

This is a weak check, as it does not check for the actual JSON serialization, but only for the types of the object.
It works correctly for basic use cases but do not guarantee an exhaustive check.

Object is considered to be recursively json serializable if:
- it is an instance of int, float, str, bool, or NoneType
- it is a list or tuple and all its items are json serializable
- it is a dict and all its keys are strings and all its values are json serializable

---
## is_simple_optional_type
```python
from _typing import is_simple_optional_type
```

Check if a type is optional, i.e. Optional[Type] or Union[Type, None] or Type | None, where Type is a non-composite type.

---
## unwrap_simple_optional_type
```python
from _typing import unwrap_simple_optional_type
```

Unwraps a simple optional type, i.e. returns Type from Optional[Type].

---
## __name__
```python
from _validators import __name__
```



---
## validate_hf_hub_args
```python
from _validators import validate_hf_hub_args
```

Validate values received as argument for any public method of `huggingface_hub`.

The goal of this decorator is to harmonize validation of arguments reused
everywhere. By default, all defined validators are tested.

Validators:
    - [`~utils.validate_repo_id`]: `repo_id` must be `"repo_name"`
      or `"namespace/repo_name"`. Namespace is a username or an organization.
    - [`~utils.smoothly_deprecate_use_auth_token`]: Use `token` instead of
      `use_auth_token` (only if `use_auth_token` is not expected by the decorated
      function - in practice, always the case in `huggingface_hub`).

Example:
```py
>>> from huggingface_hub.utils import validate_hf_hub_args

>>> @validate_hf_hub_args
... def my_cool_method(repo_id: str):
...     print(repo_id)

>>> my_cool_method(repo_id="valid_repo_id")
valid_repo_id

>>> my_cool_method("other..repo..id")
huggingface_hub.utils._validators.HFValidationError: Cannot have -- or .. in repo_id: 'other..repo..id'.

>>> my_cool_method(repo_id="other..repo..id")
huggingface_hub.utils._validators.HFValidationError: Cannot have -- or .. in repo_id: 'other..repo..id'.

>>> @validate_hf_hub_args
... def my_cool_auth_method(token: str):
...     print(token)

>>> my_cool_auth_method(token="a token")
"a token"

>>> my_cool_auth_method(use_auth_token="a use_auth_token")
"a use_auth_token"

>>> my_cool_auth_method(token="a token", use_auth_token="a use_auth_token")
UserWarning: Both `token` and `use_auth_token` are passed (...)
"a token"
```

Raises:
    [`~utils.HFValidationError`]:
        If an input is not valid.

---
## validate_repo_id
```python
from _validators import validate_repo_id
```

Validate `repo_id` is valid.

This is not meant to replace the proper validation made on the Hub but rather to
avoid local inconsistencies whenever possible (example: passing `repo_type` in the
`repo_id` is forbidden).

Rules:
- Between 1 and 96 characters.
- Either "repo_name" or "namespace/repo_name"
- [a-zA-Z0-9] or "-", "_", "."
- "--" and ".." are forbidden

Valid: `"foo"`, `"foo/bar"`, `"123"`, `"Foo-BAR_foo.bar123"`

Not valid: `"datasets/foo/bar"`, `".repo_id"`, `"foo--bar"`, `"foo.git"`

Example:
```py
>>> from huggingface_hub.utils import validate_repo_id
>>> validate_repo_id(repo_id="valid_repo_id")
>>> validate_repo_id(repo_id="other..repo..id")
huggingface_hub.utils._validators.HFValidationError: Cannot have -- or .. in repo_id: 'other..repo..id'.
```

Discussed in https://github.com/huggingface/huggingface_hub/issues/1008.
In moon-landing (internal repository):
- https://github.com/huggingface/moon-landing/blob/main/server/lib/Names.ts#L27
- https://github.com/huggingface/moon-landing/blob/main/server/views/components/NewRepoForm/NewRepoForm.svelte#L138

---
## smoothly_deprecate_use_auth_token
```python
from _validators import smoothly_deprecate_use_auth_token
```

Smoothly deprecate `use_auth_token` in the `huggingface_hub` codebase.

The long-term goal is to remove any mention of `use_auth_token` in the codebase in
favor of a unique and less verbose `token` argument. This will be done a few steps:

0. Step 0: methods that require a read-access to the Hub use the `use_auth_token`
   argument (`str`, `bool` or `None`). Methods requiring write-access have a `token`
   argument (`str`, `None`). This implicit rule exists to be able to not send the
   token when not necessary (`use_auth_token=False`) even if logged in.

1. Step 1: we want to harmonize everything and use `token` everywhere (supporting
   `token=False` for read-only methods). In order not to break existing code, if
   `use_auth_token` is passed to a function, the `use_auth_token` value is passed
   as `token` instead, without any warning.
   a. Corner case: if both `use_auth_token` and `token` values are passed, a warning
      is thrown and the `use_auth_token` value is ignored.

2. Step 2: Once it is release, we should push downstream libraries to switch from
   `use_auth_token` to `token` as much as possible, but without throwing a warning
   (e.g. manually create issues on the corresponding repos).

3. Step 3: After a transitional period (6 months e.g. until April 2023?), we update
   `huggingface_hub` to throw a warning on `use_auth_token`. Hopefully, very few
   users will be impacted as it would have already been fixed.
   In addition, unit tests in `huggingface_hub` must be adapted to expect warnings
   to be thrown (but still use `use_auth_token` as before).

4. Step 4: After a normal deprecation cycle (3 releases ?), remove this validator.
   `use_auth_token` will definitely not be supported.
   In addition, we update unit tests in `huggingface_hub` to use `token` everywhere.

This has been discussed in:
- https://github.com/huggingface/huggingface_hub/issues/1094.
- https://github.com/huggingface/huggingface_hub/pull/928
- (related) https://github.com/huggingface/huggingface_hub/pull/1064

---
## _inner_fn
```python
from _validators import _inner_fn
```



---
## capture_output
```python
from _subprocess import capture_output
```

Capture output that is printed to terminal.

    Taken from https://stackoverflow.com/a/34738440

    Example:
    ```py
    >>> with capture_output() as output:
    ...     print("hello world")
    >>> assert output.getvalue() == "hello world
"
    ```
    

---
## run_subprocess
```python
from _subprocess import run_subprocess
```

Method to run subprocesses. Calling this will capture the `stderr` and `stdout`,
please call `subprocess.run` manually in case you would like for them not to
be captured.

Args:
    command (`str` or `List[str]`):
        The command to execute as a string or list of strings.
    folder (`str`, *optional*):
        The folder in which to run the command. Defaults to current working
        directory (from `os.getcwd()`).
    check (`bool`, *optional*, defaults to `True`):
        Setting `check` to `True` will raise a `subprocess.CalledProcessError`
        when the subprocess has a non-zero exit code.
    kwargs (`Dict[str]`):
        Keyword arguments to be passed to the `subprocess.run` underlying command.

Returns:
    `subprocess.CompletedProcess`: The completed process.

---
## run_interactive_subprocess
```python
from _subprocess import run_interactive_subprocess
```

Run a subprocess in an interactive mode in a context manager.

    Args:
        command (`str` or `List[str]`):
            The command to execute as a string or list of strings.
        folder (`str`, *optional*):
            The folder in which to run the command. Defaults to current working
            directory (from `os.getcwd()`).
        kwargs (`Dict[str]`):
            Keyword arguments to be passed to the `subprocess.run` underlying command.

    Returns:
        `Tuple[IO[str], IO[str]]`: A tuple with `stdin` and `stdout` to interact
        with the process (input and output are utf-8 encoded).

    Example:
    ```python
    with _interactive_subprocess("git credential-store get") as (stdin, stdout):
        # Write to stdin
        stdin.write("url=hf.co
username=obama
".encode("utf-8"))
        stdin.flush()

        # Read from stdout
        output = stdout.read().decode("utf-8")
    ```
    

---
## __name__
```python
from _telemetry import __name__
```



---
## send_telemetry
```python
from _telemetry import send_telemetry
```

Sends telemetry that helps tracking usage of different HF libraries.

This usage data helps us debug issues and prioritize new features. However, we understand that not everyone wants
to share additional information, and we respect your privacy. You can disable telemetry collection by setting the
`HF_HUB_DISABLE_TELEMETRY=1` as environment variable. Telemetry is also disabled in offline mode (i.e. when setting
`HF_HUB_OFFLINE=1`).

Telemetry collection is run in a separate thread to minimize impact for the user.

Args:
    topic (`str`):
        Name of the topic that is monitored. The topic is directly used to build the URL. If you want to monitor
        subtopics, just use "/" separation. Examples: "gradio", "transformers/examples",...
    library_name (`str`, *optional*):
        The name of the library that is making the HTTP request. Will be added to the user-agent header.
    library_version (`str`, *optional*):
        The version of the library that is making the HTTP request. Will be added to the user-agent header.
    user_agent (`str`, `dict`, *optional*):
        The user agent info in the form of a dictionary or a single string. It will be completed with information about the installed packages.

Example:
```py
>>> from huggingface_hub.utils import send_telemetry

# Send telemetry without library information
>>> send_telemetry("ping")

# Send telemetry to subtopic with library information
>>> send_telemetry("gradio/local_link", library_name="gradio", library_version="3.22.1")

# Send telemetry with additional data
>>> send_telemetry(
...     topic="examples",
...     library_name="transformers",
...     library_version="4.26.0",
...     user_agent={"pipeline": "text_classification", "framework": "flax"},
... )
```

---
## _start_telemetry_thread
```python
from _telemetry import _start_telemetry_thread
```

Start a daemon thread to consume tasks from the telemetry queue.

If the thread is interrupted, start a new one.

---
## _telemetry_worker
```python
from _telemetry import _telemetry_worker
```

Wait for a task and consume it.

---
## _send_telemetry_in_thread
```python
from _telemetry import _send_telemetry_in_thread
```

Contains the actual data sending data to the Hub.

This function is called directly in gradio's analytics because
it is not possible to send telemetry from a daemon thread.

See here: https://github.com/gradio-app/gradio/pull/8180

Please do not rename or remove this function.

---
## __name__
```python
from _fixes import __name__
```



---
## SoftTemporaryDirectory
```python
from _fixes import SoftTemporaryDirectory
```

Context manager to create a temporary directory and safely delete it.

If tmp directory cannot be deleted normally, we set the WRITE permission and retry.
If cleanup still fails, we give up but don't raise an exception. This is equivalent
to  `tempfile.TemporaryDirectory(..., ignore_cleanup_errors=True)` introduced in
Python 3.10.

See https://www.scivision.dev/python-tempfile-permission-error-windows/.

---
## _set_write_permission_and_retry
```python
from _fixes import _set_write_permission_and_retry
```



---
## WeakFileLock
```python
from _fixes import WeakFileLock
```

A filelock with some custom logic.

This filelock is weaker than the default filelock in that:
1. It won't raise an exception if release fails.
2. It will default to a SoftFileLock if the filesystem does not support flock.

An INFO log message is emitted every 10 seconds if the lock is not acquired immediately.

---
## __name__
```python
from _token import __name__
```

Contains an helper to get the token from machine (env variable, secret or config file).

---
## get_token
```python
from _token import get_token
```

Get token if user is logged in.

Note: in most cases, you should use [`huggingface_hub.utils.build_hf_headers`] instead. This method is only useful
      if you want to retrieve the token for other purposes than sending an HTTP request.

Token is retrieved in priority from the `HF_TOKEN` environment variable. Otherwise, we read the token file located
in the Hugging Face home folder. Returns None if user is not logged in. To log in, use [`login`] or
`huggingface-cli login`.

Returns:
    `str` or `None`: The token, `None` if it doesn't exist.

---
## _get_token_from_google_colab
```python
from _token import _get_token_from_google_colab
```

Get token from Google Colab secrets vault using `google.colab.userdata.get(...)`.

Token is read from the vault only once per session and then stored in a global variable to avoid re-requesting
access to the vault.

---
## _get_token_from_environment
```python
from _token import _get_token_from_environment
```



---
## _get_token_from_file
```python
from _token import _get_token_from_file
```



---
## _clean_token
```python
from _token import _clean_token
```

Clean token by removing trailing and leading spaces and newlines.

If token is an empty string, return None.

---
## __name__
```python
from _http import __name__
```

Contains utilities to handle HTTP requests in Huggingface Hub.

---
## UniqueRequestIdAdapter
```python
from _http import UniqueRequestIdAdapter
```



---
## OfflineAdapter
```python
from _http import OfflineAdapter
```



---
## _default_backend_factory
```python
from _http import _default_backend_factory
```



---
## configure_http_backend
```python
from _http import configure_http_backend
```

Configure the HTTP backend by providing a `backend_factory`. Any HTTP calls made by `huggingface_hub` will use a
Session object instantiated by this factory. This can be useful if you are running your scripts in a specific
environment requiring custom configuration (e.g. custom proxy or certifications).

Use [`get_session`] to get a configured Session. Since `requests.Session` is not guaranteed to be thread-safe,
`huggingface_hub` creates 1 Session instance per thread. They are all instantiated using the same `backend_factory`
set in [`configure_http_backend`]. A LRU cache is used to cache the created sessions (and connections) between
calls. Max size is 128 to avoid memory leaks if thousands of threads are spawned.

See [this issue](https://github.com/psf/requests/issues/2766) to know more about thread-safety in `requests`.

Example:
```py
import requests
from huggingface_hub import configure_http_backend, get_session

# Create a factory function that returns a Session with configured proxies
def backend_factory() -> requests.Session:
    session = requests.Session()
    session.proxies = {"http": "http://10.10.1.10:3128", "https": "https://10.10.1.11:1080"}
    return session

# Set it as the default session factory
configure_http_backend(backend_factory=backend_factory)

# In practice, this is mostly done internally in `huggingface_hub`
session = get_session()
```

---
## get_session
```python
from _http import get_session
```

Get a `requests.Session` object, using the session factory from the user.

Use [`get_session`] to get a configured Session. Since `requests.Session` is not guaranteed to be thread-safe,
`huggingface_hub` creates 1 Session instance per thread. They are all instantiated using the same `backend_factory`
set in [`configure_http_backend`]. A LRU cache is used to cache the created sessions (and connections) between
calls. Max size is 128 to avoid memory leaks if thousands of threads are spawned.

See [this issue](https://github.com/psf/requests/issues/2766) to know more about thread-safety in `requests`.

Example:
```py
import requests
from huggingface_hub import configure_http_backend, get_session

# Create a factory function that returns a Session with configured proxies
def backend_factory() -> requests.Session:
    session = requests.Session()
    session.proxies = {"http": "http://10.10.1.10:3128", "https": "https://10.10.1.11:1080"}
    return session

# Set it as the default session factory
configure_http_backend(backend_factory=backend_factory)

# In practice, this is mostly done internally in `huggingface_hub`
session = get_session()
```

---
## reset_sessions
```python
from _http import reset_sessions
```

Reset the cache of sessions.

Mostly used internally when sessions are reconfigured or an SSLError is raised.
See [`configure_http_backend`] for more details.

---
## _get_session_from_cache
```python
from _http import _get_session_from_cache
```

Create a new session per thread using global factory. Using LRU cache (maxsize 128) to avoid memory leaks when
using thousands of threads. Cache is cleared when `configure_http_backend` is called.

---
## http_backoff
```python
from _http import http_backoff
```

Wrapper around requests to retry calls on an endpoint, with exponential backoff.

Endpoint call is retried on exceptions (ex: connection timeout, proxy error,...)
and/or on specific status codes (ex: service unavailable). If the call failed more
than `max_retries`, the exception is thrown or `raise_for_status` is called on the
response object.

Re-implement mechanisms from the `backoff` library to avoid adding an external
dependencies to `hugging_face_hub`. See https://github.com/litl/backoff.

Args:
    method (`Literal["GET", "OPTIONS", "HEAD", "POST", "PUT", "PATCH", "DELETE"]`):
        HTTP method to perform.
    url (`str`):
        The URL of the resource to fetch.
    max_retries (`int`, *optional*, defaults to `5`):
        Maximum number of retries, defaults to 5 (no retries).
    base_wait_time (`float`, *optional*, defaults to `1`):
        Duration (in seconds) to wait before retrying the first time.
        Wait time between retries then grows exponentially, capped by
        `max_wait_time`.
    max_wait_time (`float`, *optional*, defaults to `8`):
        Maximum duration (in seconds) to wait before retrying.
    retry_on_exceptions (`Type[Exception]` or `Tuple[Type[Exception]]`, *optional*):
        Define which exceptions must be caught to retry the request. Can be a single type or a tuple of types.
        By default, retry on `requests.Timeout` and `requests.ConnectionError`.
    retry_on_status_codes (`int` or `Tuple[int]`, *optional*, defaults to `503`):
        Define on which status codes the request must be retried. By default, only
        HTTP 503 Service Unavailable is retried.
    **kwargs (`dict`, *optional*):
        kwargs to pass to `requests.request`.

Example:
```
>>> from huggingface_hub.utils import http_backoff

# Same usage as "requests.request".
>>> response = http_backoff("GET", "https://www.google.com")
>>> response.raise_for_status()

# If you expect a Gateway Timeout from time to time
>>> http_backoff("PUT", upload_url, data=data, retry_on_status_codes=504)
>>> response.raise_for_status()
```

<Tip warning={true}>

When using `requests` it is possible to stream data by passing an iterator to the
`data` argument. On http backoff this is a problem as the iterator is not reset
after a failed call. This issue is mitigated for file objects or any IO streams
by saving the initial position of the cursor (with `data.tell()`) and resetting the
cursor between each call (with `data.seek()`). For arbitrary iterators, http backoff
will fail. If this is a hard constraint for you, please let us know by opening an
issue on [Github](https://github.com/huggingface/huggingface_hub).

</Tip>

---
## fix_hf_endpoint_in_url
```python
from _http import fix_hf_endpoint_in_url
```

Replace the default endpoint in a URL by a custom one.

This is useful when using a proxy and the Hugging Face Hub returns a URL with the default endpoint.

---
## hf_raise_for_status
```python
from _http import hf_raise_for_status
```

Internal version of `response.raise_for_status()` that will refine a
    potential HTTPError. Raised exception will be an instance of `HfHubHTTPError`.

    This helper is meant to be the unique method to raise_for_status when making a call
    to the Hugging Face Hub.


    Example:
    ```py
        import requests
        from huggingface_hub.utils import get_session, hf_raise_for_status, HfHubHTTPError

        response = get_session().post(...)
        try:
            hf_raise_for_status(response)
        except HfHubHTTPError as e:
            print(str(e)) # formatted message
            e.request_id, e.server_message # details returned by server

            # Complete the error message with additional information once it's raised
            e.append_to_message("
`create_commit` expects the repository to exist.")
            raise
    ```

    Args:
        response (`Response`):
            Response from the server.
        endpoint_name (`str`, *optional*):
            Name of the endpoint that has been called. If provided, the error message
            will be more complete.

    <Tip warning={true}>

    Raises when the request has failed:

        - [`~utils.RepositoryNotFoundError`]
            If the repository to download from cannot be found. This may be because it
            doesn't exist, because `repo_type` is not set correctly, or because the repo
            is `private` and you do not have access.
        - [`~utils.GatedRepoError`]
            If the repository exists but is gated and the user is not on the authorized
            list.
        - [`~utils.RevisionNotFoundError`]
            If the repository exists but the revision couldn't be find.
        - [`~utils.EntryNotFoundError`]
            If the repository exists but the entry (e.g. the requested file) couldn't be
            find.
        - [`~utils.BadRequestError`]
            If request failed with a HTTP 400 BadRequest error.
        - [`~utils.HfHubHTTPError`]
            If request failed for a reason not listed above.

    </Tip>
    

---
## _format
```python
from _http import _format
```



---
## add_headers
```python
from _http import add_headers
```



---
## send
```python
from _http import send
```



---
## __name__
```python
from _deprecation import __name__
```



---
## _deprecate_positional_args
```python
from _deprecation import _deprecate_positional_args
```

Decorator for methods that issues warnings for positional arguments.
Using the keyword-only argument syntax in pep 3102, arguments after the
* will issue a warning when passed as a positional argument.

Args:
    version (`str`):
        The version when positional arguments will result in error.

---
## _deprecate_arguments
```python
from _deprecation import _deprecate_arguments
```

Decorator to issue warnings when using deprecated arguments.

TODO: could be useful to be able to set a custom error message.

Args:
    version (`str`):
        The version when deprecated arguments will result in error.
    deprecated_args (`List[str]`):
        List of the arguments to be deprecated.
    custom_message (`str`, *optional*):
        Warning message that is raised. If not passed, a default warning message
        will be created.

---
## _deprecate_method
```python
from _deprecation import _deprecate_method
```

Decorator to issue warnings when using a deprecated method.

Args:
    version (`str`):
        The version when deprecated arguments will result in error.
    message (`str`, *optional*):
        Warning message that is raised. If not passed, a default warning message
        will be created.

---
## _inner_deprecate_positional_args
```python
from _deprecation import _inner_deprecate_positional_args
```



---
## _inner_deprecate_method
```python
from _deprecation import _inner_deprecate_method
```



---
## inner_f
```python
from _deprecation import inner_f
```



---
## __name__
```python
from _chunk_utils import __name__
```

Contains a utility to iterate by chunks over an iterator.

---
## chunk_iterable
```python
from _chunk_utils import chunk_iterable
```

Iterates over an iterator chunk by chunk.

Taken from https://stackoverflow.com/a/8998040.
See also https://github.com/huggingface/huggingface_hub/pull/920#discussion_r938793088.

Args:
    iterable (`Iterable`):
        The iterable on which we want to iterate.
    chunk_size (`int`):
        Size of the chunks. Must be a strictly positive integer (e.g. >0).

Example:

```python
>>> from huggingface_hub.utils import chunk_iterable

>>> for items in chunk_iterable(range(17), chunk_size=8):
...     print(items)
# [0, 1, 2, 3, 4, 5, 6, 7]
# [8, 9, 10, 11, 12, 13, 14, 15]
# [16] # smaller last chunk
```

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If `chunk_size` <= 0.

<Tip warning={true}>
    The last chunk can be smaller than `chunk_size`.
</Tip>

---
## __name__
```python
from _paths import __name__
```

Contains utilities to handle paths in Huggingface Hub.

---
## filter_repo_objects
```python
from _paths import filter_repo_objects
```

Filter repo objects based on an allowlist and a denylist.

Input must be a list of paths (`str` or `Path`) or a list of arbitrary objects.
In the later case, `key` must be provided and specifies a function of one argument
that is used to extract a path from each element in iterable.

Patterns are Unix shell-style wildcards which are NOT regular expressions. See
https://docs.python.org/3/library/fnmatch.html for more details.

Args:
    items (`Iterable`):
        List of items to filter.
    allow_patterns (`str` or `List[str]`, *optional*):
        Patterns constituting the allowlist. If provided, item paths must match at
        least one pattern from the allowlist.
    ignore_patterns (`str` or `List[str]`, *optional*):
        Patterns constituting the denylist. If provided, item paths must not match
        any patterns from the denylist.
    key (`Callable[[T], str]`, *optional*):
        Single-argument function to extract a path from each item. If not provided,
        the `items` must already be `str` or `Path`.

Returns:
    Filtered list of objects, as a generator.

Raises:
    :class:`ValueError`:
        If `key` is not provided and items are not `str` or `Path`.

Example usage with paths:
```python
>>> # Filter only PDFs that are not hidden.
>>> list(filter_repo_objects(
...     ["aaa.PDF", "bbb.jpg", ".ccc.pdf", ".ddd.png"],
...     allow_patterns=["*.pdf"],
...     ignore_patterns=[".*"],
... ))
["aaa.pdf"]
```

Example usage with objects:
```python
>>> list(filter_repo_objects(
... [
...     CommitOperationAdd(path_or_fileobj="/tmp/aaa.pdf", path_in_repo="aaa.pdf")
...     CommitOperationAdd(path_or_fileobj="/tmp/bbb.jpg", path_in_repo="bbb.jpg")
...     CommitOperationAdd(path_or_fileobj="/tmp/.ccc.pdf", path_in_repo=".ccc.pdf")
...     CommitOperationAdd(path_or_fileobj="/tmp/.ddd.png", path_in_repo=".ddd.png")
... ],
... allow_patterns=["*.pdf"],
... ignore_patterns=[".*"],
... key=lambda x: x.repo_in_path
... ))
[CommitOperationAdd(path_or_fileobj="/tmp/aaa.pdf", path_in_repo="aaa.pdf")]
```

---
## _add_wildcard_to_directories
```python
from _paths import _add_wildcard_to_directories
```



---
## _identity
```python
from _paths import _identity
```



---
## __name__
```python
from endpoint_helpers import __name__
```

Helpful utility functions and classes in relation to exploring API endpoints
with the aim for a user-friendly interface.

---
## _is_emission_within_threshold
```python
from endpoint_helpers import _is_emission_within_threshold
```

Checks if a model's emission is within a given threshold.

Args:
    model_info (`ModelInfo`):
        A model info object containing the model's emission information.
    minimum_threshold (`float`):
        A minimum carbon threshold to filter by, such as 1.
    maximum_threshold (`float`):
        A maximum carbon threshold to filter by, such as 10.

Returns:
    `bool`: Whether the model's emission is within the given threshold.

---
## __name__
```python
from _runtime import __name__
```

Check presence of installed packages at runtime.

---
## _get_version
```python
from _runtime import _get_version
```



---
## is_package_available
```python
from _runtime import is_package_available
```



---
## get_python_version
```python
from _runtime import get_python_version
```



---
## get_hf_hub_version
```python
from _runtime import get_hf_hub_version
```



---
## is_aiohttp_available
```python
from _runtime import is_aiohttp_available
```



---
## get_aiohttp_version
```python
from _runtime import get_aiohttp_version
```



---
## is_fastai_available
```python
from _runtime import is_fastai_available
```



---
## get_fastai_version
```python
from _runtime import get_fastai_version
```



---
## is_fastapi_available
```python
from _runtime import is_fastapi_available
```



---
## get_fastapi_version
```python
from _runtime import get_fastapi_version
```



---
## is_fastcore_available
```python
from _runtime import is_fastcore_available
```



---
## get_fastcore_version
```python
from _runtime import get_fastcore_version
```



---
## is_gradio_available
```python
from _runtime import is_gradio_available
```



---
## get_gradio_version
```python
from _runtime import get_gradio_version
```



---
## is_graphviz_available
```python
from _runtime import is_graphviz_available
```



---
## get_graphviz_version
```python
from _runtime import get_graphviz_version
```



---
## is_hf_transfer_available
```python
from _runtime import is_hf_transfer_available
```



---
## get_hf_transfer_version
```python
from _runtime import get_hf_transfer_version
```



---
## is_keras_available
```python
from _runtime import is_keras_available
```



---
## get_keras_version
```python
from _runtime import get_keras_version
```



---
## is_minijinja_available
```python
from _runtime import is_minijinja_available
```



---
## get_minijinja_version
```python
from _runtime import get_minijinja_version
```



---
## is_numpy_available
```python
from _runtime import is_numpy_available
```



---
## get_numpy_version
```python
from _runtime import get_numpy_version
```



---
## is_jinja_available
```python
from _runtime import is_jinja_available
```



---
## get_jinja_version
```python
from _runtime import get_jinja_version
```



---
## is_pillow_available
```python
from _runtime import is_pillow_available
```



---
## get_pillow_version
```python
from _runtime import get_pillow_version
```



---
## is_pydantic_available
```python
from _runtime import is_pydantic_available
```



---
## get_pydantic_version
```python
from _runtime import get_pydantic_version
```



---
## is_pydot_available
```python
from _runtime import is_pydot_available
```



---
## get_pydot_version
```python
from _runtime import get_pydot_version
```



---
## is_tensorboard_available
```python
from _runtime import is_tensorboard_available
```



---
## get_tensorboard_version
```python
from _runtime import get_tensorboard_version
```



---
## is_tf_available
```python
from _runtime import is_tf_available
```



---
## get_tf_version
```python
from _runtime import get_tf_version
```



---
## is_torch_available
```python
from _runtime import is_torch_available
```



---
## get_torch_version
```python
from _runtime import get_torch_version
```



---
## is_safetensors_available
```python
from _runtime import is_safetensors_available
```



---
## is_notebook
```python
from _runtime import is_notebook
```

Return `True` if code is executed in a notebook (Jupyter, Colab, QTconsole).

Taken from https://stackoverflow.com/a/39662359.
Adapted to make it work with Google colab as well.

---
## is_google_colab
```python
from _runtime import is_google_colab
```

Return `True` if code is executed in a Google colab.

Taken from https://stackoverflow.com/a/63519730.

---
## is_colab_enterprise
```python
from _runtime import is_colab_enterprise
```

Return `True` if code is executed in a Google Colab Enterprise environment.

---
## dump_environment_info
```python
from _runtime import dump_environment_info
```

Dump information about the machine to help debugging issues.

Similar helper exist in:
- `datasets` (https://github.com/huggingface/datasets/blob/main/src/datasets/commands/env.py)
- `diffusers` (https://github.com/huggingface/diffusers/blob/main/src/diffusers/commands/env.py)
- `transformers` (https://github.com/huggingface/transformers/blob/main/src/transformers/commands/env.py)

---
## __name__
```python
from tqdm import __name__
```

Utility helpers to handle progress bars in `datasets`.

Example:
    1. Use `datasets.utils.tqdm` as you would use `tqdm.tqdm` or `tqdm.auto.tqdm`.
    2. To disable progress bars, either use `disable_progress_bars()` helper or set the
       environment variable `HF_DATASETS_DISABLE_PROGRESS_BARS` to 1.
    3. To re-enable progress bars, use `enable_progress_bars()`.
    4. To check whether progress bars are disabled, use `are_progress_bars_disabled()`.

NOTE: Environment variable `HF_DATASETS_DISABLE_PROGRESS_BARS` has the priority.

Example:
    ```py
    from datasets.utils import (
        are_progress_bars_disabled,
        disable_progress_bars,
        enable_progress_bars,
        tqdm,
    )

    # Disable progress bars globally
    disable_progress_bars()

    # Use as normal `tqdm`
    for _ in tqdm(range(5)):
       do_something()

    # Still not showing progress bars, as `disable=False` is overwritten to `True`.
    for _ in tqdm(range(5), disable=False):
       do_something()

    are_progress_bars_disabled() # True

    # Re-enable progress bars globally
    enable_progress_bars()

    # Progress bar will be shown !
    for _ in tqdm(range(5)):
       do_something()
    ```

---
## disable_progress_bars
```python
from tqdm import disable_progress_bars
```

Disable globally progress bars used in `datasets` except if `HF_DATASETS_DISABLE_PROGRESS_BAR` environment
variable has been set.

Use [`~utils.enable_progress_bars`] to re-enable them.

---
## enable_progress_bars
```python
from tqdm import enable_progress_bars
```

Enable globally progress bars used in `datasets` except if `HF_DATASETS_DISABLE_PROGRESS_BAR` environment
variable has been set.

Use [`~utils.disable_progress_bars`] to disable them.

---
## are_progress_bars_disabled
```python
from tqdm import are_progress_bars_disabled
```

Return whether progress bars are globally disabled or not.

Progress bars used in `datasets` can be enable or disabled globally using [`~utils.enable_progress_bars`]
and [`~utils.disable_progress_bars`] or by setting `HF_DATASETS_DISABLE_PROGRESS_BAR` as environment variable.

---
## tqdm
```python
from tqdm import tqdm
```

Class to override `disable` argument in case progress bars are globally disabled.

Taken from https://github.com/tqdm/tqdm/issues/619#issuecomment-619639324.

---
## tqdm_stream_file
```python
from tqdm import tqdm_stream_file
```

Open a file as binary and wrap the `read` method to display a progress bar when it's streamed.

First implemented in `transformers` in 2019 but removed when switched to git-lfs. Used in `huggingface_hub` to show
progress bar when uploading an LFS file to the Hub. See github.com/huggingface/transformers/pull/2078#discussion_r354739608
for implementation details.

Note: currently implementation handles only files stored on disk as it is the most common use case. Could be
      extended to stream any `BinaryIO` object but we might have to debug some corner cases.

Example:
```py
>>> with tqdm_stream_file("config.json") as f:
>>>     requests.put(url, data=f)
config.json: 100%|█████████████████████████| 8.19k/8.19k [00:02<00:00, 3.72kB/s]
```

---
## __init__
```python
from tqdm import __init__
```



---
## __delattr__
```python
from tqdm import __delattr__
```

Fix for https://github.com/huggingface/datasets/issues/6066

---
## _inner_read
```python
from tqdm import _inner_read
```



---
## __name__
```python
from insecure_hashlib import __name__
```



---
## __name__
```python
from _hf_folder import __name__
```

Contain helper class to retrieve/store token from/to local cache.

---
## HfFolder
```python
from _hf_folder import HfFolder
```



---
## save_token
```python
from _hf_folder import save_token
```

Save token, creating folder as needed.

Token is saved in the huggingface home folder. You can configure it by setting
the `HF_HOME` environment variable.

Args:
    token (`str`):
        The token to save to the [`HfFolder`]

---
## get_token
```python
from _hf_folder import get_token
```

Get token or None if not existent.

This method is deprecated in favor of [`huggingface_hub.get_token`] but is kept for backward compatibility.
Its behavior is the same as [`huggingface_hub.get_token`].

Returns:
    `str` or `None`: The token, `None` if it doesn't exist.

---
## delete_token
```python
from _hf_folder import delete_token
```

Deletes the token from storage. Does not fail if token does not exist.

---
## _copy_to_new_path_and_warn
```python
from _hf_folder import _copy_to_new_path_and_warn
```



---
## __name__
```python
from _cache_assets import __name__
```



---
## cached_assets_path
```python
from _cache_assets import cached_assets_path
```

Return a folder path to cache arbitrary files.

`huggingface_hub` provides a canonical folder path to store assets. This is the
recommended way to integrate cache in a downstream library as it will benefit from
the builtins tools to scan and delete the cache properly.

The distinction is made between files cached from the Hub and assets. Files from the
Hub are cached in a git-aware manner and entirely managed by `huggingface_hub`. See
[related documentation](https://huggingface.co/docs/huggingface_hub/how-to-cache).
All other files that a downstream library caches are considered to be "assets"
(files downloaded from external sources, extracted from a .tar archive, preprocessed
for training,...).

Once the folder path is generated, it is guaranteed to exist and to be a directory.
The path is based on 3 levels of depth: the library name, a namespace and a
subfolder. Those 3 levels grants flexibility while allowing `huggingface_hub` to
expect folders when scanning/deleting parts of the assets cache. Within a library,
it is expected that all namespaces share the same subset of subfolder names but this
is not a mandatory rule. The downstream library has then full control on which file
structure to adopt within its cache. Namespace and subfolder are optional (would
default to a `"default/"` subfolder) but library name is mandatory as we want every
downstream library to manage its own cache.

Expected tree:
```text
    assets/
    └── datasets/
    │   ├── SQuAD/
    │   │   ├── downloaded/
    │   │   ├── extracted/
    │   │   └── processed/
    │   ├── Helsinki-NLP--tatoeba_mt/
    │       ├── downloaded/
    │       ├── extracted/
    │       └── processed/
    └── transformers/
        ├── default/
        │   ├── something/
        ├── bert-base-cased/
        │   ├── default/
        │   └── training/
    hub/
    └── models--julien-c--EsperBERTo-small/
        ├── blobs/
        │   ├── (...)
        │   ├── (...)
        ├── refs/
        │   └── (...)
        └── [ 128]  snapshots/
            ├── 2439f60ef33a0d46d85da5001d52aeda5b00ce9f/
            │   ├── (...)
            └── bbc77c8132af1cc5cf678da3f1ddf2de43606d48/
                └── (...)
```


Args:
    library_name (`str`):
        Name of the library that will manage the cache folder. Example: `"dataset"`.
    namespace (`str`, *optional*, defaults to "default"):
        Namespace to which the data belongs. Example: `"SQuAD"`.
    subfolder (`str`, *optional*, defaults to "default"):
        Subfolder in which the data will be stored. Example: `extracted`.
    assets_dir (`str`, `Path`, *optional*):
        Path to the folder where assets are cached. This must not be the same folder
        where Hub files are cached. Defaults to `HF_HOME / "assets"` if not provided.
        Can also be set with `HF_ASSETS_CACHE` environment variable.

Returns:
    Path to the cache folder (`Path`).

Example:
```py
>>> from huggingface_hub import cached_assets_path

>>> cached_assets_path(library_name="datasets", namespace="SQuAD", subfolder="download")
PosixPath('/home/wauplin/.cache/huggingface/extra/datasets/SQuAD/download')

>>> cached_assets_path(library_name="datasets", namespace="SQuAD", subfolder="extracted")
PosixPath('/home/wauplin/.cache/huggingface/extra/datasets/SQuAD/extracted')

>>> cached_assets_path(library_name="datasets", namespace="Helsinki-NLP/tatoeba_mt")
PosixPath('/home/wauplin/.cache/huggingface/extra/datasets/Helsinki-NLP--tatoeba_mt/default')

>>> cached_assets_path(library_name="datasets", assets_dir="/tmp/tmp123456")
PosixPath('/tmp/tmp123456/datasets/default/default')
```

---
## __name__
```python
from sha import __name__
```

Utilities to efficiently compute the SHA 256 hash of a bunch of bytes.

---
## sha_fileobj
```python
from sha import sha_fileobj
```

Computes the sha256 hash of the given file object, by chunks of size `chunk_size`.

Args:
    fileobj (file-like object):
        The File object to compute sha256 for, typically obtained with `open(path, "rb")`
    chunk_size (`int`, *optional*):
        The number of bytes to read from `fileobj` at once, defaults to 1MB.

Returns:
    `bytes`: `fileobj`'s sha256 hash as bytes

---
## git_hash
```python
from sha import git_hash
```

Computes the git-sha1 hash of the given bytes, using the same algorithm as git.

This is equivalent to running `git hash-object`. See https://git-scm.com/docs/git-hash-object
for more details.

Note: this method is valid for regular files. For LFS files, the proper git hash is supposed to be computed on the
      pointer file content, not the actual file content. However, for simplicity, we directly compare the sha256 of
      the LFS file content when we want to compare LFS files.

Args:
    data (`bytes`):
        The data to compute the git-hash for.

Returns:
    `str`: the git-hash of `data` as an hexadecimal string.

Example:
```python
>>> from huggingface_hub.utils.sha import git_hash
>>> git_hash(b"Hello, World!")
'b45ef6fec89518d314f546fd6c3025367b721684'
```

---
## __name__
```python
from _experimental import __name__
```

Contains utilities to flag a feature as "experimental" in Huggingface Hub.

---
## experimental
```python
from _experimental import experimental
```

Decorator to flag a feature as experimental.

An experimental feature trigger a warning when used as it might be subject to breaking changes in the future.
Warnings can be disabled by setting the environment variable `HF_EXPERIMENTAL_WARNING` to `0`.

Args:
    fn (`Callable`):
        The function to flag as experimental.

Returns:
    `Callable`: The decorated function.

Example:

```python
>>> from huggingface_hub.utils import experimental

>>> @experimental
... def my_function():
...     print("Hello world!")

>>> my_function()
UserWarning: 'my_function' is experimental and might be subject to breaking changes in the future. You can disable
this warning by setting `HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1` as environment variable.
Hello world!
```

---
## _inner_fn
```python
from _experimental import _inner_fn
```



---
## __name__
```python
from _pagination import __name__
```

Contains utilities to handle pagination on Huggingface Hub.

---
## paginate
```python
from _pagination import paginate
```

Fetch a list of models/datasets/spaces and paginate through results.

This is using the same "Link" header format as GitHub.
See:
- https://requests.readthedocs.io/en/latest/api/#requests.Response.links
- https://docs.github.com/en/rest/guides/traversing-with-pagination#link-header

---
## _get_next_page
```python
from _pagination import _get_next_page
```



---
## __name__
```python
from _lfs import __name__
```

Git LFS related utilities

---
## SliceFileObj
```python
from _lfs import SliceFileObj
```

Utility context manager to read a *slice* of a seekable file-like object as a seekable, file-like object.

This is NOT thread safe

Inspired by stackoverflow.com/a/29838711/593036

Credits to @julien-c

Args:
    fileobj (`BinaryIO`):
        A file-like object to slice. MUST implement `tell()` and `seek()` (and `read()` of course).
        `fileobj` will be reset to its original position when exiting the context manager.
    seek_from (`int`):
        The start of the slice (offset from position 0 in bytes).
    read_limit (`int`):
        The maximum number of bytes to read from the slice.

Attributes:
    previous_position (`int`):
        The previous position

Examples:

Reading 200 bytes with an offset of 128 bytes from a file (ie bytes 128 to 327):
```python
>>> with open("path/to/file", "rb") as file:
...     with SliceFileObj(file, seek_from=128, read_limit=200) as fslice:
...         fslice.read(...)
```

Reading a file in chunks of 512 bytes
```python
>>> import os
>>> chunk_size = 512
>>> file_size = os.getsize("path/to/file")
>>> with open("path/to/file", "rb") as file:
...     for chunk_idx in range(ceil(file_size / chunk_size)):
...         with SliceFileObj(file, seek_from=chunk_idx * chunk_size, read_limit=chunk_size) as fslice:
...             chunk = fslice.read(...)

```

---
## __init__
```python
from _lfs import __init__
```



---
## __enter__
```python
from _lfs import __enter__
```



---
## __exit__
```python
from _lfs import __exit__
```



---
## read
```python
from _lfs import read
```



---
## tell
```python
from _lfs import tell
```



---
## seek
```python
from _lfs import seek
```



---
## __iter__
```python
from _lfs import __iter__
```



---
## build_hf_headers
```python
from _headers import build_hf_headers
```

Build headers dictionary to send in a HF Hub call.

By default, authorization token is always provided either from argument (explicit
use) or retrieved from the cache (implicit use). To explicitly avoid sending the
token to the Hub, set `token=False` or set the `HF_HUB_DISABLE_IMPLICIT_TOKEN`
environment variable.

In case of an API call that requires write access, an error is thrown if token is
`None` or token is an organization token (starting with `"api_org***"`).

In addition to the auth header, a user-agent is added to provide information about
the installed packages (versions of python, huggingface_hub, torch, tensorflow,
fastai and fastcore).

Args:
    token (`str`, `bool`, *optional*):
        The token to be sent in authorization header for the Hub call:
            - if a string, it is used as the Hugging Face token
            - if `True`, the token is read from the machine (cache or env variable)
            - if `False`, authorization header is not set
            - if `None`, the token is read from the machine only except if
              `HF_HUB_DISABLE_IMPLICIT_TOKEN` env variable is set.
    is_write_action (`bool`, default to `False`):
        Set to True if the API call requires a write access. If `True`, the token
        will be validated (cannot be `None`, cannot start by `"api_org***"`).
    library_name (`str`, *optional*):
        The name of the library that is making the HTTP request. Will be added to
        the user-agent header.
    library_version (`str`, *optional*):
        The version of the library that is making the HTTP request. Will be added
        to the user-agent header.
    user_agent (`str`, `dict`, *optional*):
        The user agent info in the form of a dictionary or a single string. It will
        be completed with information about the installed packages.
    headers (`dict`, *optional*):
        Additional headers to include in the request. Those headers take precedence
        over the ones generated by this function.

Returns:
    A `Dict` of headers to pass in your API call.

Example:
```py
    >>> build_hf_headers(token="hf_***") # explicit token
    {"authorization": "Bearer hf_***", "user-agent": ""}

    >>> build_hf_headers(token=True) # explicitly use cached token
    {"authorization": "Bearer hf_***",...}

    >>> build_hf_headers(token=False) # explicitly don't use cached token
    {"user-agent": ...}

    >>> build_hf_headers() # implicit use of the cached token
    {"authorization": "Bearer hf_***",...}

    # HF_HUB_DISABLE_IMPLICIT_TOKEN=True # to set as env variable
    >>> build_hf_headers() # token is not sent
    {"user-agent": ...}

    >>> build_hf_headers(token="api_org_***", is_write_action=True)
    ValueError: You must use your personal account token for write-access methods.

    >>> build_hf_headers(library_name="transformers", library_version="1.2.3")
    {"authorization": ..., "user-agent": "transformers/1.2.3; hf_hub/0.10.2; python/3.10.4; tensorflow/1.55"}
```

Raises:
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If organization token is passed and "write" access is required.
    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
        If "write" access is required but token is not passed and not saved locally.
    [`EnvironmentError`](https://docs.python.org/3/library/exceptions.html#EnvironmentError)
        If `token=True` but token is not saved locally.

---
## get_token_to_send
```python
from _headers import get_token_to_send
```

Select the token to send from either `token` or the cache.

---
## _validate_token_to_send
```python
from _headers import _validate_token_to_send
```



---
## _http_user_agent
```python
from _headers import _http_user_agent
```

Format a user-agent string containing information about the installed packages.

Args:
    library_name (`str`, *optional*):
        The name of the library that is making the HTTP request.
    library_version (`str`, *optional*):
        The version of the library that is making the HTTP request.
    user_agent (`str`, `dict`, *optional*):
        The user agent info in the form of a dictionary or a single string.

Returns:
    The formatted user-agent string.

---
## _deduplicate_user_agent
```python
from _headers import _deduplicate_user_agent
```

Deduplicate redundant information in the generated user-agent.

---
## __name__
```python
from _safetensors import __name__
```



---
## TensorInfo
```python
from _safetensors import TensorInfo
```

Information about a tensor.

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    dtype (`str`):
        The data type of the tensor ("F64", "F32", "F16", "BF16", "I64", "I32", "I16", "I8", "U8", "BOOL").
    shape (`List[int]`):
        The shape of the tensor.
    data_offsets (`Tuple[int, int]`):
        The offsets of the data in the file as a tuple `[BEGIN, END]`.
    parameter_count (`int`):
        The number of parameters in the tensor.

---
## SafetensorsFileMetadata
```python
from _safetensors import SafetensorsFileMetadata
```

Metadata for a Safetensors file hosted on the Hub.

This class is returned by [`parse_safetensors_file_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    metadata (`Dict`):
        The metadata contained in the file.
    tensors (`Dict[str, TensorInfo]`):
        A map of all tensors. Keys are tensor names and values are information about the corresponding tensor, as a
        [`TensorInfo`] object.
    parameter_count (`Dict[str, int]`):
        A map of the number of parameters per data type. Keys are data types and values are the number of parameters
        of that data type.

---
## SafetensorsRepoMetadata
```python
from _safetensors import SafetensorsRepoMetadata
```

Metadata for a Safetensors repo.

A repo is considered to be a Safetensors repo if it contains either a 'model.safetensors' weight file (non-shared
model) or a 'model.safetensors.index.json' index file (sharded model) at its root.

This class is returned by [`get_safetensors_metadata`].

For more details regarding the safetensors format, check out https://huggingface.co/docs/safetensors/index#format.

Attributes:
    metadata (`Dict`, *optional*):
        The metadata contained in the 'model.safetensors.index.json' file, if it exists. Only populated for sharded
        models.
    sharded (`bool`):
        Whether the repo contains a sharded model or not.
    weight_map (`Dict[str, str]`):
        A map of all weights. Keys are tensor names and values are filenames of the files containing the tensors.
    files_metadata (`Dict[str, SafetensorsFileMetadata]`):
        A map of all files metadata. Keys are filenames and values are the metadata of the corresponding file, as
        a [`SafetensorsFileMetadata`] object.
    parameter_count (`Dict[str, int]`):
        A map of the number of parameters per data type. Keys are data types and values are the number of parameters
        of that data type.

---
## __post_init__
```python
from _safetensors import __post_init__
```



---
## parse_datetime
```python
from _datetime import parse_datetime
```

Parses a date_string returned from the server to a datetime object.

This parser is a weak-parser is the sense that it handles only a single format of
date_string. It is expected that the server format will never change. The
implementation depends only on the standard lib to avoid an external dependency
(python-dateutil). See full discussion about this decision on PR:
https://github.com/huggingface/huggingface_hub/pull/999.

Example:
    ```py
    > parse_datetime('2022-08-19T07:19:38.123Z')
    datetime.datetime(2022, 8, 19, 7, 19, 38, 123000, tzinfo=timezone.utc)
    ```

Args:
    date_string (`str`):
        A string representing a datetime returned by the Hub server.
        String is expected to follow '%Y-%m-%dT%H:%M:%S.%fZ' pattern.

Returns:
    A python datetime object.

Raises:
    :class:`ValueError`:
        If `date_string` cannot be parsed.

---
## __name__
```python
from _cache_manager import __name__
```

Contains utilities to manage the HF cache directory.

---
## CachedFileInfo
```python
from _cache_manager import CachedFileInfo
```

Frozen data structure holding information about a single cached file.

Args:
    file_name (`str`):
        Name of the file. Example: `config.json`.
    file_path (`Path`):
        Path of the file in the `snapshots` directory. The file path is a symlink
        referring to a blob in the `blobs` folder.
    blob_path (`Path`):
        Path of the blob file. This is equivalent to `file_path.resolve()`.
    size_on_disk (`int`):
        Size of the blob file in bytes.
    blob_last_accessed (`float`):
        Timestamp of the last time the blob file has been accessed (from any
        revision).
    blob_last_modified (`float`):
        Timestamp of the last time the blob file has been modified/created.

<Tip warning={true}>

`blob_last_accessed` and `blob_last_modified` reliability can depend on the OS you
are using. See [python documentation](https://docs.python.org/3/library/os.html#os.stat_result)
for more details.

</Tip>

---
## CachedRevisionInfo
```python
from _cache_manager import CachedRevisionInfo
```

Frozen data structure holding information about a revision.

A revision correspond to a folder in the `snapshots` folder and is populated with
the exact tree structure as the repo on the Hub but contains only symlinks. A
revision can be either referenced by 1 or more `refs` or be "detached" (no refs).

Args:
    commit_hash (`str`):
        Hash of the revision (unique).
        Example: `"9338f7b671827df886678df2bdd7cc7b4f36dffd"`.
    snapshot_path (`Path`):
        Path to the revision directory in the `snapshots` folder. It contains the
        exact tree structure as the repo on the Hub.
    files: (`FrozenSet[CachedFileInfo]`):
        Set of [`~CachedFileInfo`] describing all files contained in the snapshot.
    refs (`FrozenSet[str]`):
        Set of `refs` pointing to this revision. If the revision has no `refs`, it
        is considered detached.
        Example: `{"main", "2.4.0"}` or `{"refs/pr/1"}`.
    size_on_disk (`int`):
        Sum of the blob file sizes that are symlink-ed by the revision.
    last_modified (`float`):
        Timestamp of the last time the revision has been created/modified.

<Tip warning={true}>

`last_accessed` cannot be determined correctly on a single revision as blob files
are shared across revisions.

</Tip>

<Tip warning={true}>

`size_on_disk` is not necessarily the sum of all file sizes because of possible
duplicated files. Besides, only blobs are taken into account, not the (negligible)
size of folders and symlinks.

</Tip>

---
## CachedRepoInfo
```python
from _cache_manager import CachedRepoInfo
```

Frozen data structure holding information about a cached repository.

Args:
    repo_id (`str`):
        Repo id of the repo on the Hub. Example: `"google/fleurs"`.
    repo_type (`Literal["dataset", "model", "space"]`):
        Type of the cached repo.
    repo_path (`Path`):
        Local path to the cached repo.
    size_on_disk (`int`):
        Sum of the blob file sizes in the cached repo.
    nb_files (`int`):
        Total number of blob files in the cached repo.
    revisions (`FrozenSet[CachedRevisionInfo]`):
        Set of [`~CachedRevisionInfo`] describing all revisions cached in the repo.
    last_accessed (`float`):
        Timestamp of the last time a blob file of the repo has been accessed.
    last_modified (`float`):
        Timestamp of the last time a blob file of the repo has been modified/created.

<Tip warning={true}>

`size_on_disk` is not necessarily the sum of all revisions sizes because of
duplicated files. Besides, only blobs are taken into account, not the (negligible)
size of folders and symlinks.

</Tip>

<Tip warning={true}>

`last_accessed` and `last_modified` reliability can depend on the OS you are using.
See [python documentation](https://docs.python.org/3/library/os.html#os.stat_result)
for more details.

</Tip>

---
## DeleteCacheStrategy
```python
from _cache_manager import DeleteCacheStrategy
```

Frozen data structure holding the strategy to delete cached revisions.

This object is not meant to be instantiated programmatically but to be returned by
[`~utils.HFCacheInfo.delete_revisions`]. See documentation for usage example.

Args:
    expected_freed_size (`float`):
        Expected freed size once strategy is executed.
    blobs (`FrozenSet[Path]`):
        Set of blob file paths to be deleted.
    refs (`FrozenSet[Path]`):
        Set of reference file paths to be deleted.
    repos (`FrozenSet[Path]`):
        Set of entire repo paths to be deleted.
    snapshots (`FrozenSet[Path]`):
        Set of snapshots to be deleted (directory of symlinks).

---
## HFCacheInfo
```python
from _cache_manager import HFCacheInfo
```

Frozen data structure holding information about the entire cache-system.

This data structure is returned by [`scan_cache_dir`] and is immutable.

Args:
    size_on_disk (`int`):
        Sum of all valid repo sizes in the cache-system.
    repos (`FrozenSet[CachedRepoInfo]`):
        Set of [`~CachedRepoInfo`] describing all valid cached repos found on the
        cache-system while scanning.
    warnings (`List[CorruptedCacheException]`):
        List of [`~CorruptedCacheException`] that occurred while scanning the cache.
        Those exceptions are captured so that the scan can continue. Corrupted repos
        are skipped from the scan.

<Tip warning={true}>

Here `size_on_disk` is equal to the sum of all repo sizes (only blobs). However if
some cached repos are corrupted, their sizes are not taken into account.

</Tip>

---
## scan_cache_dir
```python
from _cache_manager import scan_cache_dir
```

Scan the entire HF cache-system and return a [`~HFCacheInfo`] structure.

Use `scan_cache_dir` in order to programmatically scan your cache-system. The cache
will be scanned repo by repo. If a repo is corrupted, a [`~CorruptedCacheException`]
will be thrown internally but captured and returned in the [`~HFCacheInfo`]
structure. Only valid repos get a proper report.

```py
>>> from huggingface_hub import scan_cache_dir

>>> hf_cache_info = scan_cache_dir()
HFCacheInfo(
    size_on_disk=3398085269,
    repos=frozenset({
        CachedRepoInfo(
            repo_id='t5-small',
            repo_type='model',
            repo_path=PosixPath(...),
            size_on_disk=970726914,
            nb_files=11,
            revisions=frozenset({
                CachedRevisionInfo(
                    commit_hash='d78aea13fa7ecd06c29e3e46195d6341255065d5',
                    size_on_disk=970726339,
                    snapshot_path=PosixPath(...),
                    files=frozenset({
                        CachedFileInfo(
                            file_name='config.json',
                            size_on_disk=1197
                            file_path=PosixPath(...),
                            blob_path=PosixPath(...),
                        ),
                        CachedFileInfo(...),
                        ...
                    }),
                ),
                CachedRevisionInfo(...),
                ...
            }),
        ),
        CachedRepoInfo(...),
        ...
    }),
    warnings=[
        CorruptedCacheException("Snapshots dir doesn't exist in cached repo: ..."),
        CorruptedCacheException(...),
        ...
    ],
)
```

You can also print a detailed report directly from the `huggingface-cli` using:
```text
> huggingface-cli scan-cache
REPO ID                     REPO TYPE SIZE ON DISK NB FILES REFS                LOCAL PATH
--------------------------- --------- ------------ -------- ------------------- -------------------------------------------------------------------------
glue                        dataset         116.3K       15 1.17.0, main, 2.4.0 /Users/lucain/.cache/huggingface/hub/datasets--glue
google/fleurs               dataset          64.9M        6 main, refs/pr/1     /Users/lucain/.cache/huggingface/hub/datasets--google--fleurs
Jean-Baptiste/camembert-ner model           441.0M        7 main                /Users/lucain/.cache/huggingface/hub/models--Jean-Baptiste--camembert-ner
bert-base-cased             model             1.9G       13 main                /Users/lucain/.cache/huggingface/hub/models--bert-base-cased
t5-base                     model            10.1K        3 main                /Users/lucain/.cache/huggingface/hub/models--t5-base
t5-small                    model           970.7M       11 refs/pr/1, main     /Users/lucain/.cache/huggingface/hub/models--t5-small

Done in 0.0s. Scanned 6 repo(s) for a total of 3.4G.
Got 1 warning(s) while scanning. Use -vvv to print details.
```

Args:
    cache_dir (`str` or `Path`, `optional`):
        Cache directory to cache. Defaults to the default HF cache directory.

<Tip warning={true}>

Raises:

    `CacheNotFound`
      If the cache directory does not exist.

    [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError)
      If the cache directory is a file, instead of a directory.

</Tip>

Returns: a [`~HFCacheInfo`] object.

---
## _scan_cached_repo
```python
from _cache_manager import _scan_cached_repo
```

Scan a single cache repo and return information about it.

Any unexpected behavior will raise a [`~CorruptedCacheException`].

---
## _format_size
```python
from _cache_manager import _format_size
```

Format size in bytes into a human-readable string.

Taken from https://stackoverflow.com/a/1094933

---
## _format_timesince
```python
from _cache_manager import _format_timesince
```

Format timestamp in seconds into a human-readable string, relative to now.

Vaguely inspired by Django's `timesince` formatter.

---
## _try_delete_path
```python
from _cache_manager import _try_delete_path
```

Try to delete a local file or folder.

If the path does not exists, error is logged as a warning and then ignored.

Args:
    path (`Path`)
        Path to delete. Can be a file or a folder.
    path_type (`str`)
        What path are we deleting ? Only for logging purposes. Example: "snapshot".

---
## blob_last_accessed_str
```python
from _cache_manager import blob_last_accessed_str
```

(property) Timestamp of the last time the blob file has been accessed (from any
revision), returned as a human-readable string.

Example: "2 weeks ago".

---
## blob_last_modified_str
```python
from _cache_manager import blob_last_modified_str
```

(property) Timestamp of the last time the blob file has been modified, returned
as a human-readable string.

Example: "2 weeks ago".

---
## size_on_disk_str
```python
from _cache_manager import size_on_disk_str
```

(property) Sum of all valid repo sizes in the cache-system as a human-readable
string.

Example: "42.2K".

---
## last_modified_str
```python
from _cache_manager import last_modified_str
```

(property) Last time a blob file of the repo has been modified, returned as a
human-readable string.

Example: "2 weeks ago".

---
## nb_files
```python
from _cache_manager import nb_files
```

(property) Total number of files in the revision.

---
## last_accessed_str
```python
from _cache_manager import last_accessed_str
```

(property) Last time a blob file of the repo has been accessed, returned as a
human-readable string.

Example: "2 weeks ago".

---
## refs
```python
from _cache_manager import refs
```

(property) Mapping between `refs` and revision data structures.

---
## expected_freed_size_str
```python
from _cache_manager import expected_freed_size_str
```

(property) Expected size that will be freed as a human-readable string.

Example: "42.2K".

---
## execute
```python
from _cache_manager import execute
```

Execute the defined strategy.

<Tip warning={true}>

If this method is interrupted, the cache might get corrupted. Deletion order is
implemented so that references and symlinks are deleted before the actual blob
files.

</Tip>

<Tip warning={true}>

This method is irreversible. If executed, cached files are erased and must be
downloaded again.

</Tip>

---
## delete_revisions
```python
from _cache_manager import delete_revisions
```

Prepare the strategy to delete one or more revisions cached locally.

Input revisions can be any revision hash. If a revision hash is not found in the
local cache, a warning is thrown but no error is raised. Revisions can be from
different cached repos since hashes are unique across repos,

Examples:
```py
>>> from huggingface_hub import scan_cache_dir
>>> cache_info = scan_cache_dir()
>>> delete_strategy = cache_info.delete_revisions(
...     "81fd1d6e7847c99f5862c9fb81387956d99ec7aa"
... )
>>> print(f"Will free {delete_strategy.expected_freed_size_str}.")
Will free 7.9K.
>>> delete_strategy.execute()
Cache deletion done. Saved 7.9K.
```

```py
>>> from huggingface_hub import scan_cache_dir
>>> scan_cache_dir().delete_revisions(
...     "81fd1d6e7847c99f5862c9fb81387956d99ec7aa",
...     "e2983b237dccf3ab4937c97fa717319a9ca1a96d",
...     "6c0e6080953db56375760c0471a8c5f2929baf11",
... ).execute()
Cache deletion done. Saved 8.6G.
```

<Tip warning={true}>

`delete_revisions` returns a [`~utils.DeleteCacheStrategy`] object that needs to
be executed. The [`~utils.DeleteCacheStrategy`] is not meant to be modified but
allows having a dry run before actually executing the deletion.

</Tip>

---
## export_as_table
```python
from _cache_manager import export_as_table
```

Generate a table from the [`HFCacheInfo`] object.

Pass `verbosity=0` to get a table with a single row per repo, with columns
"repo_id", "repo_type", "size_on_disk", "nb_files", "last_accessed", "last_modified", "refs", "local_path".

Pass `verbosity=1` to get a table with a row per repo and revision (thus multiple rows can appear for a single repo), with columns
"repo_id", "repo_type", "revision", "size_on_disk", "nb_files", "last_modified", "refs", "local_path".

Example:
```py
>>> from huggingface_hub.utils import scan_cache_dir

>>> hf_cache_info = scan_cache_dir()
HFCacheInfo(...)

>>> print(hf_cache_info.export_as_table())
REPO ID                                             REPO TYPE SIZE ON DISK NB FILES LAST_ACCESSED LAST_MODIFIED REFS LOCAL PATH
--------------------------------------------------- --------- ------------ -------- ------------- ------------- ---- --------------------------------------------------------------------------------------------------
roberta-base                                        model             2.7M        5 1 day ago     1 week ago    main ~/.cache/huggingface/hub/models--roberta-base
suno/bark                                           model             8.8K        1 1 week ago    1 week ago    main ~/.cache/huggingface/hub/models--suno--bark
t5-base                                             model           893.8M        4 4 days ago    7 months ago  main ~/.cache/huggingface/hub/models--t5-base
t5-large                                            model             3.0G        4 5 weeks ago   5 months ago  main ~/.cache/huggingface/hub/models--t5-large

>>> print(hf_cache_info.export_as_table(verbosity=1))
REPO ID                                             REPO TYPE REVISION                                 SIZE ON DISK NB FILES LAST_MODIFIED REFS LOCAL PATH
--------------------------------------------------- --------- ---------------------------------------- ------------ -------- ------------- ---- -----------------------------------------------------------------------------------------------------------------------------------------------------
roberta-base                                        model     e2da8e2f811d1448a5b465c236feacd80ffbac7b         2.7M        5 1 week ago    main ~/.cache/huggingface/hub/models--roberta-base/snapshots/e2da8e2f811d1448a5b465c236feacd80ffbac7b
suno/bark                                           model     70a8a7d34168586dc5d028fa9666aceade177992         8.8K        1 1 week ago    main ~/.cache/huggingface/hub/models--suno--bark/snapshots/70a8a7d34168586dc5d028fa9666aceade177992
t5-base                                             model     a9723ea7f1b39c1eae772870f3b547bf6ef7e6c1       893.8M        4 7 months ago  main ~/.cache/huggingface/hub/models--t5-base/snapshots/a9723ea7f1b39c1eae772870f3b547bf6ef7e6c1
t5-large                                            model     150ebc2c4b72291e770f58e6057481c8d2ed331a         3.0G        4 5 months ago  main ~/.cache/huggingface/hub/models--t5-large/snapshots/150ebc2c4b72291e770f58e6057481c8d2ed331a
```

Args:
    verbosity (`int`, *optional*):
        The verbosity level. Defaults to 0.

Returns:
    `str`: The table as a string.

---
## __name__
```python
from _git_credential import __name__
```

Contains utilities to manage Git credentials.

---
## list_credential_helpers
```python
from _git_credential import list_credential_helpers
```

Return the list of git credential helpers configured.

See https://git-scm.com/docs/gitcredentials.

Credentials are saved in all configured helpers (store, cache, macOS keychain,...).
Calls "`git credential approve`" internally. See https://git-scm.com/docs/git-credential.

Args:
    folder (`str`, *optional*):
        The folder in which to check the configured helpers.

---
## set_git_credential
```python
from _git_credential import set_git_credential
```

Save a username/token pair in git credential for HF Hub registry.

Credentials are saved in all configured helpers (store, cache, macOS keychain,...).
Calls "`git credential approve`" internally. See https://git-scm.com/docs/git-credential.

Args:
    username (`str`, defaults to `"hf_user"`):
        A git username. Defaults to `"hf_user"`, the default user used in the Hub.
    token (`str`, defaults to `"hf_user"`):
        A git password. In practice, the User Access Token for the Hub.
        See https://huggingface.co/settings/tokens.
    folder (`str`, *optional*):
        The folder in which to check the configured helpers.

---
## unset_git_credential
```python
from _git_credential import unset_git_credential
```

Erase credentials from git credential for HF Hub registry.

Credentials are erased from the configured helpers (store, cache, macOS
keychain,...), if any. If `username` is not provided, any credential configured for
HF Hub endpoint is erased.
Calls "`git credential erase`" internally. See https://git-scm.com/docs/git-credential.

Args:
    username (`str`, defaults to `"hf_user"`):
        A git username. Defaults to `"hf_user"`, the default user used in the Hub.
    folder (`str`, *optional*):
        The folder in which to check the configured helpers.

---
## _parse_credential_output
```python
from _git_credential import _parse_credential_output
```

Parse the output of `git credential fill` to extract the password.

Args:
    output (`str`):
        The output of `git credential fill`.

---
## __name__
```python
from _templating import __name__
```



---
## _import_minijinja
```python
from _templating import _import_minijinja
```



---
## render_chat_prompt
```python
from _templating import render_chat_prompt
```

Render a chat prompt using a model's chat template.

Args:
    model_id (`str`):
        The model id.
    messages (`List[Dict[str, str]]`):
        The list of messages to render.
    token (`str` or `bool`, *optional*):
        Hugging Face token. Will default to the locally saved token if not provided.

Returns:
    `str`: The rendered chat prompt.

Raises:
    `TemplateError`: If there's any issue while fetching, compiling or rendering the chat template.

---
## _fetch_and_compile_template
```python
from _templating import _fetch_and_compile_template
```

Fetch and compile a model's chat template.

Method is cached to avoid fetching the same model's config multiple times.

Args:
    model_id (`str`):
        The model id.
    token (`str` or `bool`, *optional*):
        Hugging Face token. Will default to the locally saved token if not provided.

Returns:
    `Callable`: A callable that takes a list of messages and returns the rendered chat prompt.

---
## ModelStatus
```python
from _common import ModelStatus
```

This Dataclass represents the the model status in the Hugging Face Inference API.

Args:
    loaded (`bool`):
        If the model is currently loaded into Hugging Face's InferenceAPI. Models
        are loaded on-demand, leading to the user's first request taking longer.
        If a model is loaded, you can be assured that it is in a healthy state.
    state (`str`):
        The current state of the model. This can be 'Loaded', 'Loadable', 'TooBig'.
        If a model's state is 'Loadable', it's not too big and has a supported
        backend. Loadable models are automatically loaded when the user first
        requests inference on the endpoint. This means it is transparent for the
        user to load a model, except that the first call takes longer to complete.
    compute_type (`Dict`):
        Information about the compute resource the model is using or will use, such as 'gpu' type and number of
        replicas.
    framework (`str`):
        The name of the framework that the model was built with, such as 'transformers'
        or 'text-generation-inference'.

---
## _import_aiohttp
```python
from _common import _import_aiohttp
```



---
## _import_numpy
```python
from _common import _import_numpy
```

Make sure `numpy` is installed on the machine.

---
## _import_pil_image
```python
from _common import _import_pil_image
```

Make sure `PIL` is installed on the machine.

---
## _fetch_recommended_models
```python
from _common import _fetch_recommended_models
```



---
## _first_or_none
```python
from _common import _first_or_none
```



---
## _open_as_binary
```python
from _common import _open_as_binary
```

Open `content` as a binary file, either from a URL, a local path, or raw bytes.

Do nothing if `content` is None,

TODO: handle a PIL.Image as input
TODO: handle base64 as input

---
## _b64_encode
```python
from _common import _b64_encode
```

Encode a raw file (image, audio) into base64. Can be byes, an opened file, a path or a URL.

---
## _b64_to_image
```python
from _common import _b64_to_image
```

Parse a base64-encoded string into a PIL Image.

---
## _bytes_to_list
```python
from _common import _bytes_to_list
```

Parse bytes from a Response object into a Python list.

Expects the response body to be JSON-encoded data.

NOTE: This is exactly the same implementation as `_bytes_to_dict` and will not complain if the returned data is a
dictionary. The only advantage of having both is to help the user (and mypy) understand what kind of data to expect.

---
## _bytes_to_dict
```python
from _common import _bytes_to_dict
```

Parse bytes from a Response object into a Python dictionary.

Expects the response body to be JSON-encoded data.

NOTE: This is exactly the same implementation as `_bytes_to_list` and will not complain if the returned data is a
list. The only advantage of having both is to help the user (and mypy) understand what kind of data to expect.

---
## _bytes_to_image
```python
from _common import _bytes_to_image
```

Parse bytes from a Response object into a PIL Image.

Expects the response body to be raw bytes. To deal with b64 encoded images, use `_b64_to_image` instead.

---
## _stream_text_generation_response
```python
from _common import _stream_text_generation_response
```

Used in `InferenceClient.text_generation`.

---
## _format_text_generation_stream_output
```python
from _common import _format_text_generation_stream_output
```



---
## _stream_chat_completion_response
```python
from _common import _stream_chat_completion_response
```

Used in `InferenceClient.chat_completion` if model is served with TGI.

---
## _format_chat_completion_stream_output
```python
from _common import _format_chat_completion_stream_output
```



---
## _set_unsupported_text_generation_kwargs
```python
from _common import _set_unsupported_text_generation_kwargs
```



---
## _get_unsupported_text_generation_kwargs
```python
from _common import _get_unsupported_text_generation_kwargs
```



---
## raise_text_generation_error
```python
from _common import raise_text_generation_error
```

Try to parse text-generation-inference error message and raise HTTPError in any case.

Args:
    error (`HTTPError`):
        The HTTPError that have been raised.

---
## _parse_text_generation_error
```python
from _common import _parse_text_generation_error
```



---
## InferenceClient
```python
from _client import InferenceClient
```

Initialize a new Inference Client.

[`InferenceClient`] aims to provide a unified experience to perform inference. The client can be used
seamlessly with either the (free) Inference API or self-hosted Inference Endpoints.

Args:
    model (`str`, `optional`):
        The model to run inference with. Can be a model id hosted on the Hugging Face Hub, e.g. `meta-llama/Meta-Llama-3-8B-Instruct`
        or a URL to a deployed Inference Endpoint. Defaults to None, in which case a recommended model is
        automatically selected for the task.
        Note: for better compatibility with OpenAI's client, `model` has been aliased as `base_url`. Those 2
        arguments are mutually exclusive. If using `base_url` for chat completion, the `/chat/completions` suffix
        path will be appended to the base URL (see the [TGI Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api)
        documentation for details). When passing a URL as `model`, the client will not append any suffix path to it.
    token (`str` or `bool`, *optional*):
        Hugging Face token. Will default to the locally saved token if not provided.
        Pass `token=False` if you don't want to send your token to the server.
        Note: for better compatibility with OpenAI's client, `token` has been aliased as `api_key`. Those 2
        arguments are mutually exclusive and have the exact same behavior.
    timeout (`float`, `optional`):
        The maximum number of seconds to wait for a response from the server. Loading a new model in Inference
        API can take up to several minutes. Defaults to None, meaning it will loop until the server is available.
    headers (`Dict[str, str]`, `optional`):
        Additional headers to send to the server. By default only the authorization and user-agent headers are sent.
        Values in this dictionary will override the default values.
    cookies (`Dict[str, str]`, `optional`):
        Additional cookies to send to the server.
    proxies (`Any`, `optional`):
        Proxies to use for the request.
    base_url (`str`, `optional`):
        Base URL to run inference. This is a duplicated argument from `model` to make [`InferenceClient`]
        follow the same pattern as `openai.OpenAI` client. Cannot be used if `model` is set. Defaults to None.
    api_key (`str`, `optional`):
        Token to use for authentication. This is a duplicated argument from `token` to make [`InferenceClient`]
        follow the same pattern as `openai.OpenAI` client. Cannot be used if `token` is set. Defaults to None.

---
## _ProxyClient
```python
from _client import _ProxyClient
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## ProxyClientChat
```python
from _client import ProxyClientChat
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## ProxyClientChatCompletions
```python
from _client import ProxyClientChatCompletions
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## __repr__
```python
from _client import __repr__
```



---
## audio_classification
```python
from _client import audio_classification
```

Perform audio classification on the provided audio content.

Args:
    audio (Union[str, Path, bytes, BinaryIO]):
        The audio content to classify. It can be raw audio bytes, a local audio file, or a URL pointing to an
        audio file.
    model (`str`, *optional*):
        The model to use for audio classification. Can be a model ID hosted on the Hugging Face Hub
        or a URL to a deployed Inference Endpoint. If not provided, the default recommended model for
        audio classification will be used.

Returns:
    `List[AudioClassificationOutputElement]`: List of [`AudioClassificationOutputElement`] items containing the predicted labels and their confidence.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.audio_classification("audio.flac")
[
    AudioClassificationOutputElement(score=0.4976358711719513, label='hap'),
    AudioClassificationOutputElement(score=0.3677836060523987, label='neu'),
    ...
]
```

---
## audio_to_audio
```python
from _client import audio_to_audio
```

Performs multiple tasks related to audio-to-audio depending on the model (eg: speech enhancement, source separation).

Args:
    audio (Union[str, Path, bytes, BinaryIO]):
        The audio content for the model. It can be raw audio bytes, a local audio file, or a URL pointing to an
        audio file.
    model (`str`, *optional*):
        The model can be any model which takes an audio file and returns another audio file. Can be a model ID hosted on the Hugging Face Hub
        or a URL to a deployed Inference Endpoint. If not provided, the default recommended model for
        audio_to_audio will be used.

Returns:
    `List[AudioToAudioOutputElement]`: A list of [`AudioToAudioOutputElement`] items containing audios label, content-type, and audio content in blob.

Raises:
    `InferenceTimeoutError`:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> audio_output = client.audio_to_audio("audio.flac")
>>> for i, item in enumerate(audio_output):
>>>     with open(f"output_{i}.flac", "wb") as f:
            f.write(item.blob)
```

---
## automatic_speech_recognition
```python
from _client import automatic_speech_recognition
```

Perform automatic speech recognition (ASR or audio-to-text) on the given audio content.

Args:
    audio (Union[str, Path, bytes, BinaryIO]):
        The content to transcribe. It can be raw audio bytes, local audio file, or a URL to an audio file.
    model (`str`, *optional*):
        The model to use for ASR. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. If not provided, the default recommended model for ASR will be used.

Returns:
    [`AutomaticSpeechRecognitionOutput`]: An item containing the transcribed text and optionally the timestamp chunks.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.automatic_speech_recognition("hello_world.flac").text
"hello world"
```

---
## chat_completion
```python
from _client import chat_completion
```

A method for completing conversations using a specified language model.

        <Tip>

        The `client.chat_completion` method is aliased as `client.chat.completions.create` for compatibility with OpenAI's client.
        Inputs and outputs are strictly the same and using either syntax will yield the same results.
        Check out the [Inference guide](https://huggingface.co/docs/huggingface_hub/guides/inference#openai-compatibility)
        for more details about OpenAI's compatibility.

        </Tip>

        Args:
            messages (List[Union[`SystemMessage`, `UserMessage`, `AssistantMessage`]]):
                Conversation history consisting of roles and content pairs.
            model (`str`, *optional*):
                The model to use for chat-completion. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
                Inference Endpoint. If not provided, the default recommended model for chat-based text-generation will be used.
                See https://huggingface.co/tasks/text-generation for more details.

                If `model` is a model ID, it is passed to the server as the `model` parameter. If you want to define a
                custom URL while setting `model` in the request payload, you must set `base_url` when initializing [`InferenceClient`].
            frequency_penalty (`float`, *optional*):
                Penalizes new tokens based on their existing frequency
                in the text so far. Range: [-2.0, 2.0]. Defaults to 0.0.
            logit_bias (`List[float]`, *optional*):
                Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens
                (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically,
                the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model,
                but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should
                result in a ban or exclusive selection of the relevant token. Defaults to None.
            logprobs (`bool`, *optional*):
                Whether to return log probabilities of the output tokens or not. If true, returns the log
                probabilities of each output token returned in the content of message.
            max_tokens (`int`, *optional*):
                Maximum number of tokens allowed in the response. Defaults to 20.
            n (`int`, *optional*):
                UNUSED.
            presence_penalty (`float`, *optional*):
                Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the
                text so far, increasing the model's likelihood to talk about new topics.
            response_format ([`ChatCompletionInputGrammarType`], *optional*):
                Grammar constraints. Can be either a JSONSchema or a regex.
            seed (Optional[`int`], *optional*):
                Seed for reproducible control flow. Defaults to None.
            stop (Optional[`str`], *optional*):
                Up to four strings which trigger the end of the response.
                Defaults to None.
            stream (`bool`, *optional*):
                Enable realtime streaming of responses. Defaults to False.
            temperature (`float`, *optional*):
                Controls randomness of the generations. Lower values ensure
                less random completions. Range: [0, 2]. Defaults to 1.0.
            top_logprobs (`int`, *optional*):
                An integer between 0 and 5 specifying the number of most likely tokens to return at each token
                position, each with an associated log probability. logprobs must be set to true if this parameter is
                used.
            top_p (`float`, *optional*):
                Fraction of the most likely next words to sample from.
                Must be between 0 and 1. Defaults to 1.0.
            tool_choice ([`ChatCompletionInputToolTypeClass`] or `str`, *optional*):
                The tool to use for the completion. Defaults to "auto".
            tool_prompt (`str`, *optional*):
                A prompt to be appended before the tools.
            tools (List of [`ChatCompletionInputTool`], *optional*):
                A list of tools the model may call. Currently, only functions are supported as a tool. Use this to
                provide a list of functions the model may generate JSON inputs for.

        Returns:
            [`ChatCompletionOutput`] or Iterable of [`ChatCompletionStreamOutput`]:
            Generated text returned from the server:
            - if `stream=False`, the generated text is returned as a [`ChatCompletionOutput`] (default).
            - if `stream=True`, the generated text is returned token by token as a sequence of [`ChatCompletionStreamOutput`].

        Raises:
            [`InferenceTimeoutError`]:
                If the model is unavailable or the request times out.
            `HTTPError`:
                If the request fails with an HTTP error status code other than HTTP 503.

        Example:

        ```py
        >>> from huggingface_hub import InferenceClient
        >>> messages = [{"role": "user", "content": "What is the capital of France?"}]
        >>> client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
        >>> client.chat_completion(messages, max_tokens=100)
        ChatCompletionOutput(
            choices=[
                ChatCompletionOutputComplete(
                    finish_reason='eos_token',
                    index=0,
                    message=ChatCompletionOutputMessage(
                        role='assistant',
                        content='The capital of France is Paris.',
                        name=None,
                        tool_calls=None
                    ),
                    logprobs=None
                )
            ],
            created=1719907176,
            id='',
            model='meta-llama/Meta-Llama-3-8B-Instruct',
            object='text_completion',
            system_fingerprint='2.0.4-sha-f426a33',
            usage=ChatCompletionOutputUsage(
                completion_tokens=8,
                prompt_tokens=17,
                total_tokens=25
            )
        )
        ```

        Example (stream=True):
        ```py
        >>> from huggingface_hub import InferenceClient
        >>> messages = [{"role": "user", "content": "What is the capital of France?"}]
        >>> client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
        >>> for token in client.chat_completion(messages, max_tokens=10, stream=True):
        ...     print(token)
        ChatCompletionStreamOutput(choices=[ChatCompletionStreamOutputChoice(delta=ChatCompletionStreamOutputDelta(content='The', role='assistant'), index=0, finish_reason=None)], created=1710498504)
        ChatCompletionStreamOutput(choices=[ChatCompletionStreamOutputChoice(delta=ChatCompletionStreamOutputDelta(content=' capital', role='assistant'), index=0, finish_reason=None)], created=1710498504)
        (...)
        ChatCompletionStreamOutput(choices=[ChatCompletionStreamOutputChoice(delta=ChatCompletionStreamOutputDelta(content=' may', role='assistant'), index=0, finish_reason=None)], created=1710498504)
        ```

        Example using OpenAI's syntax:
        ```py
        # instead of `from openai import OpenAI`
        from huggingface_hub import InferenceClient

        # instead of `client = OpenAI(...)`
        client = InferenceClient(
            base_url=...,
            api_key=...,
        )

        output = client.chat.completions.create(
            model="meta-llama/Meta-Llama-3-8B-Instruct",
            messages=[
                {"role": "system", "content": "You are a helpful assistant."},
                {"role": "user", "content": "Count to 10"},
            ],
            stream=True,
            max_tokens=1024,
        )

        for chunk in output:
            print(chunk.choices[0].delta.content)
        ```

        Example using tools:
        ```py
        >>> client = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
        >>> messages = [
        ...     {
        ...         "role": "system",
        ...         "content": "Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous.",
        ...     },
        ...     {
        ...         "role": "user",
        ...         "content": "What's the weather like the next 3 days in San Francisco, CA?",
        ...     },
        ... ]
        >>> tools = [
        ...     {
        ...         "type": "function",
        ...         "function": {
        ...             "name": "get_current_weather",
        ...             "description": "Get the current weather",
        ...             "parameters": {
        ...                 "type": "object",
        ...                 "properties": {
        ...                     "location": {
        ...                         "type": "string",
        ...                         "description": "The city and state, e.g. San Francisco, CA",
        ...                     },
        ...                     "format": {
        ...                         "type": "string",
        ...                         "enum": ["celsius", "fahrenheit"],
        ...                         "description": "The temperature unit to use. Infer this from the users location.",
        ...                     },
        ...                 },
        ...                 "required": ["location", "format"],
        ...             },
        ...         },
        ...     },
        ...     {
        ...         "type": "function",
        ...         "function": {
        ...             "name": "get_n_day_weather_forecast",
        ...             "description": "Get an N-day weather forecast",
        ...             "parameters": {
        ...                 "type": "object",
        ...                 "properties": {
        ...                     "location": {
        ...                         "type": "string",
        ...                         "description": "The city and state, e.g. San Francisco, CA",
        ...                     },
        ...                     "format": {
        ...                         "type": "string",
        ...                         "enum": ["celsius", "fahrenheit"],
        ...                         "description": "The temperature unit to use. Infer this from the users location.",
        ...                     },
        ...                     "num_days": {
        ...                         "type": "integer",
        ...                         "description": "The number of days to forecast",
        ...                     },
        ...                 },
        ...                 "required": ["location", "format", "num_days"],
        ...             },
        ...         },
        ...     },
        ... ]

        >>> response = client.chat_completion(
        ...     model="meta-llama/Meta-Llama-3-70B-Instruct",
        ...     messages=messages,
        ...     tools=tools,
        ...     tool_choice="auto",
        ...     max_tokens=500,
        ... )
        >>> response.choices[0].message.tool_calls[0].function
        ChatCompletionOutputFunctionDefinition(
            arguments={
                'location': 'San Francisco, CA',
                'format': 'fahrenheit',
                'num_days': 3
            },
            name='get_n_day_weather_forecast',
            description=None
        )
        ```

        Example using response_format:
        ```py
        >>> from huggingface_hub import InferenceClient
        >>> client = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
        >>> messages = [
        ...     {
        ...         "role": "user",
        ...         "content": "I saw a puppy a cat and a raccoon during my bike ride in the park. What did I saw and when?",
        ...     },
        ... ]
        >>> response_format = {
        ...     "type": "json",
        ...     "value": {
        ...         "properties": {
        ...             "location": {"type": "string"},
        ...             "activity": {"type": "string"},
        ...             "animals_seen": {"type": "integer", "minimum": 1, "maximum": 5},
        ...             "animals": {"type": "array", "items": {"type": "string"}},
        ...         },
        ...         "required": ["location", "activity", "animals_seen", "animals"],
        ...     },
        ... }
        >>> response = client.chat_completion(
        ...     messages=messages,
        ...     response_format=response_format,
        ...     max_tokens=500,
        )
        >>> response.choices[0].message.content
        '{

"activity": "bike ride",
"animals": ["puppy", "cat", "raccoon"],
"animals_seen": 3,
"location": "park"}'
        ```
        

---
## _resolve_chat_completion_url
```python
from _client import _resolve_chat_completion_url
```



---
## document_question_answering
```python
from _client import document_question_answering
```

Answer questions on document images.

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The input image for the context. It can be raw bytes, an image file, or a URL to an online image.
    question (`str`):
        Question to be answered.
    model (`str`, *optional*):
        The model to use for the document question answering task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended document question answering model will be used.
        Defaults to None.

Returns:
    `List[DocumentQuestionAnsweringOutputElement]`: a list of [`DocumentQuestionAnsweringOutputElement`] items containing the predicted label, associated probability, word ids, and page number.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.document_question_answering(image="https://huggingface.co/spaces/impira/docquery/resolve/2359223c1837a7587402bda0f2643382a6eefeab/invoice.png", question="What is the invoice number?")
[DocumentQuestionAnsweringOutputElement(score=0.42515629529953003, answer='us-001', start=16, end=16)]
```

---
## feature_extraction
```python
from _client import feature_extraction
```

Generate embeddings for a given text.

Args:
    text (`str`):
        The text to embed.
    model (`str`, *optional*):
        The model to use for the conversational task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended conversational model will be used.
        Defaults to None.
    normalize (`bool`, *optional*):
        Whether to normalize the embeddings or not. Defaults to None.
        Only available on server powered by Text-Embedding-Inference.
    prompt_name (`str`, *optional*):
        The name of the prompt that should be used by for encoding. If not set, no prompt will be applied.
        Must be a key in the `Sentence Transformers` configuration `prompts` dictionary.
        For example if ``prompt_name`` is "query" and the ``prompts`` is {"query": "query: ",...},
        then the sentence "What is the capital of France?" will be encoded as "query: What is the capital of France?"
        because the prompt text will be prepended before any text to encode.
    truncate (`bool`, *optional*):
        Whether to truncate the embeddings or not. Defaults to None.
        Only available on server powered by Text-Embedding-Inference.
    truncation_direction (`Literal["Left", "Right"]`, *optional*):
        Which side of the input should be truncated when `truncate=True` is passed.

Returns:
    `np.ndarray`: The embedding representing the input text as a float32 numpy array.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.feature_extraction("Hi, who are you?")
array([[ 2.424802  ,  2.93384   ,  1.1750331 , ...,  1.240499, -0.13776633, -0.7889173 ],
[-0.42943227, -0.6364878 , -1.693462  , ...,  0.41978157, -2.4336355 ,  0.6162071 ],
...,
[ 0.28552425, -0.928395  , -1.2077185 , ...,  0.76810825, -2.1069427 ,  0.6236161 ]], dtype=float32)
```

---
## fill_mask
```python
from _client import fill_mask
```

Fill in a hole with a missing word (token to be precise).

Args:
    text (`str`):
        a string to be filled from, must contain the [MASK] token (check model card for exact name of the mask).
    model (`str`, *optional*):
        The model to use for the fill mask task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended fill mask model will be used.
        Defaults to None.

Returns:
    `List[FillMaskOutputElement]`: a list of [`FillMaskOutputElement`] items containing the predicted label, associated
    probability, token reference, and completed text.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.fill_mask("The goal of life is <mask>.")
[
    FillMaskOutputElement(score=0.06897063553333282, token=11098, token_str=' happiness', sequence='The goal of life is happiness.'),
    FillMaskOutputElement(score=0.06554922461509705, token=45075, token_str=' immortality', sequence='The goal of life is immortality.')
]
```

---
## image_classification
```python
from _client import image_classification
```

Perform image classification on the given image using the specified model.

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The image to classify. It can be raw bytes, an image file, or a URL to an online image.
    model (`str`, *optional*):
        The model to use for image classification. Can be a model ID hosted on the Hugging Face Hub or a URL to a
        deployed Inference Endpoint. If not provided, the default recommended model for image classification will be used.

Returns:
    `List[ImageClassificationOutputElement]`: a list of [`ImageClassificationOutputElement`] items containing the predicted label and associated probability.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.image_classification("https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Cute_dog.jpg/320px-Cute_dog.jpg")
[ImageClassificationOutputElement(score=0.9779096841812134, label='Blenheim spaniel'), ...]
```

---
## image_segmentation
```python
from _client import image_segmentation
```

Perform image segmentation on the given image using the specified model.

<Tip warning={true}>

You must have `PIL` installed if you want to work with images (`pip install Pillow`).

</Tip>

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The image to segment. It can be raw bytes, an image file, or a URL to an online image.
    model (`str`, *optional*):
        The model to use for image segmentation. Can be a model ID hosted on the Hugging Face Hub or a URL to a
        deployed Inference Endpoint. If not provided, the default recommended model for image segmentation will be used.

Returns:
    `List[ImageSegmentationOutputElement]`: A list of [`ImageSegmentationOutputElement`] items containing the segmented masks and associated attributes.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.image_segmentation("cat.jpg"):
[ImageSegmentationOutputElement(score=0.989008, label='LABEL_184', mask=<PIL.PngImagePlugin.PngImageFile image mode=L size=400x300 at 0x7FDD2B129CC0>), ...]
```

---
## image_to_image
```python
from _client import image_to_image
```

Perform image-to-image translation using a specified model.

<Tip warning={true}>

You must have `PIL` installed if you want to work with images (`pip install Pillow`).

</Tip>

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The input image for translation. It can be raw bytes, an image file, or a URL to an online image.
    prompt (`str`, *optional*):
        The text prompt to guide the image generation.
    negative_prompt (`str`, *optional*):
        A negative prompt to guide the translation process.
    height (`int`, *optional*):
        The height in pixels of the generated image.
    width (`int`, *optional*):
        The width in pixels of the generated image.
    num_inference_steps (`int`, *optional*):
        The number of denoising steps. More denoising steps usually lead to a higher quality image at the
        expense of slower inference.
    guidance_scale (`float`, *optional*):
        Higher guidance scale encourages to generate images that are closely linked to the text `prompt`,
        usually at the expense of lower image quality.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `Image`: The translated image.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> image = client.image_to_image("cat.jpg", prompt="turn the cat into a tiger")
>>> image.save("tiger.jpg")
```

---
## image_to_text
```python
from _client import image_to_text
```

Takes an input image and return text.

Models can have very different outputs depending on your use case (image captioning, optical character recognition
(OCR), Pix2Struct, etc). Please have a look to the model card to learn more about a model's specificities.

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The input image to caption. It can be raw bytes, an image file, or a URL to an online image..
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    [`ImageToTextOutput`]: The generated text.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.image_to_text("cat.jpg")
'a cat standing in a grassy field '
>>> client.image_to_text("https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Cute_dog.jpg/320px-Cute_dog.jpg")
'a dog laying on the grass next to a flower pot '
```

---
## list_deployed_models
```python
from _client import list_deployed_models
```

List models deployed on the Serverless Inference API service.

This helper checks deployed models framework by framework. By default, it will check the 4 main frameworks that
are supported and account for 95% of the hosted models. However, if you want a complete list of models you can
specify `frameworks="all"` as input. Alternatively, if you know before-hand which framework you are interested
in, you can also restrict to search to this one (e.g. `frameworks="text-generation-inference"`). The more
frameworks are checked, the more time it will take.

<Tip warning={true}>

This endpoint method does not return a live list of all models available for the Serverless Inference API service.
It searches over a cached list of models that were recently available and the list may not be up to date.
If you want to know the live status of a specific model, use [`~InferenceClient.get_model_status`].

</Tip>

<Tip>

This endpoint method is mostly useful for discoverability. If you already know which model you want to use and want to
check its availability, you can directly use [`~InferenceClient.get_model_status`].

</Tip>

Args:
    frameworks (`Literal["all"]` or `List[str]` or `str`, *optional*):
        The frameworks to filter on. By default only a subset of the available frameworks are tested. If set to
        "all", all available frameworks will be tested. It is also possible to provide a single framework or a
        custom set of frameworks to check.

Returns:
    `Dict[str, List[str]]`: A dictionary mapping task names to a sorted list of model IDs.

Example:
```python
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()

# Discover zero-shot-classification models currently deployed
>>> models = client.list_deployed_models()
>>> models["zero-shot-classification"]
['Narsil/deberta-large-mnli-zero-cls', 'facebook/bart-large-mnli', ...]

# List from only 1 framework
>>> client.list_deployed_models("text-generation-inference")
{'text-generation': ['bigcode/starcoder', 'meta-llama/Llama-2-70b-chat-hf', ...], ...}
```

---
## object_detection
```python
from _client import object_detection
```

Perform object detection on the given image using the specified model.

<Tip warning={true}>

You must have `PIL` installed if you want to work with images (`pip install Pillow`).

</Tip>

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The image to detect objects on. It can be raw bytes, an image file, or a URL to an online image.
    model (`str`, *optional*):
        The model to use for object detection. Can be a model ID hosted on the Hugging Face Hub or a URL to a
        deployed Inference Endpoint. If not provided, the default recommended model for object detection (DETR) will be used.

Returns:
    `List[ObjectDetectionOutputElement]`: A list of [`ObjectDetectionOutputElement`] items containing the bounding boxes and associated attributes.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.
    `ValueError`:
        If the request output is not a List.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.object_detection("people.jpg"):
[ObjectDetectionOutputElement(score=0.9486683011054993, label='person', box=ObjectDetectionBoundingBox(xmin=59, ymin=39, xmax=420, ymax=510)), ...]
```

---
## question_answering
```python
from _client import question_answering
```

Retrieve the answer to a question from a given text.

Args:
    question (`str`):
        Question to be answered.
    context (`str`):
        The context of the question.
    model (`str`):
        The model to use for the question answering task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint.

Returns:
    [`QuestionAnsweringOutputElement`]: an question answering output containing the score, start index, end index, and answer.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.question_answering(question="What's my name?", context="My name is Clara and I live in Berkeley.")
QuestionAnsweringOutputElement(score=0.9326562285423279, start=11, end=16, answer='Clara')
```

---
## sentence_similarity
```python
from _client import sentence_similarity
```

Compute the semantic similarity between a sentence and a list of other sentences by comparing their embeddings.

Args:
    sentence (`str`):
        The main sentence to compare to others.
    other_sentences (`List[str]`):
        The list of sentences to compare to.
    model (`str`, *optional*):
        The model to use for the conversational task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended conversational model will be used.
        Defaults to None.

Returns:
    `List[float]`: The embedding representing the input text.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.sentence_similarity(
...     "Machine learning is so easy.",
...     other_sentences=[
...         "Deep learning is so straightforward.",
...         "This is so difficult, like rocket science.",
...         "I can't believe how much I struggled with this.",
...     ],
... )
[0.7785726189613342, 0.45876261591911316, 0.2906220555305481]
```

---
## summarization
```python
from _client import summarization
```

Generate a summary of a given text using a specified model.

Args:
    text (`str`):
        The input text to summarize.
    parameters (`Dict[str, Any]`, *optional*):
        Additional parameters for summarization. Check out this [page](https://huggingface.co/docs/api-inference/detailed_parameters#summarization-task)
        for more details.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    [`SummarizationOutput`]: The generated summary text.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.summarization("The Eiffel tower...")
SummarizationOutput(generated_text="The Eiffel tower is one of the most famous landmarks in the world....")
```

---
## table_question_answering
```python
from _client import table_question_answering
```

Retrieve the answer to a question from information given in a table.

Args:
    table (`str`):
        A table of data represented as a dict of lists where entries are headers and the lists are all the
        values, all lists must have the same size.
    query (`str`):
        The query in plain text that you want to ask the table.
    model (`str`):
        The model to use for the table-question-answering task. Can be a model ID hosted on the Hugging Face
        Hub or a URL to a deployed Inference Endpoint.

Returns:
    [`TableQuestionAnsweringOutputElement`]: a table question answering output containing the answer, coordinates, cells and the aggregator used.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> query = "How many stars does the transformers repository have?"
>>> table = {"Repository": ["Transformers", "Datasets", "Tokenizers"], "Stars": ["36542", "4512", "3934"]}
>>> client.table_question_answering(table, query, model="google/tapas-base-finetuned-wtq")
TableQuestionAnsweringOutputElement(answer='36542', coordinates=[[0, 1]], cells=['36542'], aggregator='AVERAGE')
```

---
## tabular_classification
```python
from _client import tabular_classification
```

Classifying a target category (a group) based on a set of attributes.

Args:
    table (`Dict[str, Any]`):
        Set of attributes to classify.
    model (`str`, *optional*):
        The model to use for the tabular classification task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended tabular classification model will be used.
        Defaults to None.

Returns:
    `List`: a list of labels, one per row in the initial table.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> table = {
...     "fixed_acidity": ["7.4", "7.8", "10.3"],
...     "volatile_acidity": ["0.7", "0.88", "0.32"],
...     "citric_acid": ["0", "0", "0.45"],
...     "residual_sugar": ["1.9", "2.6", "6.4"],
...     "chlorides": ["0.076", "0.098", "0.073"],
...     "free_sulfur_dioxide": ["11", "25", "5"],
...     "total_sulfur_dioxide": ["34", "67", "13"],
...     "density": ["0.9978", "0.9968", "0.9976"],
...     "pH": ["3.51", "3.2", "3.23"],
...     "sulphates": ["0.56", "0.68", "0.82"],
...     "alcohol": ["9.4", "9.8", "12.6"],
... }
>>> client.tabular_classification(table=table, model="julien-c/wine-quality")
["5", "5", "5"]
```

---
## tabular_regression
```python
from _client import tabular_regression
```

Predicting a numerical target value given a set of attributes/features in a table.

Args:
    table (`Dict[str, Any]`):
        Set of attributes stored in a table. The attributes used to predict the target can be both numerical and categorical.
    model (`str`, *optional*):
        The model to use for the tabular regression task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended tabular regression model will be used.
        Defaults to None.

Returns:
    `List`: a list of predicted numerical target values.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> table = {
...     "Height": ["11.52", "12.48", "12.3778"],
...     "Length1": ["23.2", "24", "23.9"],
...     "Length2": ["25.4", "26.3", "26.5"],
...     "Length3": ["30", "31.2", "31.1"],
...     "Species": ["Bream", "Bream", "Bream"],
...     "Width": ["4.02", "4.3056", "4.6961"],
... }
>>> client.tabular_regression(table, model="scikit-learn/Fish-Weight")
[110, 120, 130]
```

---
## text_classification
```python
from _client import text_classification
```

Perform text classification (e.g. sentiment-analysis) on the given text.

Args:
    text (`str`):
        A string to be classified.
    model (`str`, *optional*):
        The model to use for the text classification task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended text classification model will be used.
        Defaults to None.

Returns:
    `List[TextClassificationOutputElement]`: a list of [`TextClassificationOutputElement`] items containing the predicted label and associated probability.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.text_classification("I like you")
[
    TextClassificationOutputElement(label='POSITIVE', score=0.9998695850372314),
    TextClassificationOutputElement(label='NEGATIVE', score=0.0001304351753788069),
]
```

---
## text_generation
```python
from _client import text_generation
```

Given a prompt, generate the following text.

API endpoint is supposed to run with the `text-generation-inference` backend (TGI). This backend is the
go-to solution to run large language models at scale. However, for some smaller models (e.g. "gpt2") the
default `transformers` + `api-inference` solution is still in use. Both approaches have very similar APIs, but
not exactly the same. This method is compatible with both approaches but some parameters are only available for
`text-generation-inference`. If some parameters are ignored, a warning message is triggered but the process
continues correctly.

To learn more about the TGI project, please refer to https://github.com/huggingface/text-generation-inference.

<Tip>

If you want to generate a response from chat messages, you should use the [`InferenceClient.chat_completion`] method.
It accepts a list of messages instead of a single text prompt and handles the chat templating for you.

</Tip>

Args:
    prompt (`str`):
        Input text.
    details (`bool`, *optional*):
        By default, text_generation returns a string. Pass `details=True` if you want a detailed output (tokens,
        probabilities, seed, finish reason, etc.). Only available for models running on with the
        `text-generation-inference` backend.
    stream (`bool`, *optional*):
        By default, text_generation returns the full generated text. Pass `stream=True` if you want a stream of
        tokens to be returned. Only available for models running on with the `text-generation-inference`
        backend.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.
    adapter_id (`str`, *optional*):
        Lora adapter id.
    best_of (`int`, *optional*):
        Generate best_of sequences and return the one if the highest token logprobs.
    decoder_input_details (`bool`, *optional*):
        Return the decoder input token logprobs and ids. You must set `details=True` as well for it to be taken
        into account. Defaults to `False`.
    do_sample (`bool`, *optional*):
        Activate logits sampling
    frequency_penalty (`float`, *optional*):
        Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in
        the text so far, decreasing the model's likelihood to repeat the same line verbatim.
    grammar ([`TextGenerationInputGrammarType`], *optional*):
        Grammar constraints. Can be either a JSONSchema or a regex.
    max_new_tokens (`int`, *optional*):
        Maximum number of generated tokens
    repetition_penalty (`float`, *optional*):
        The parameter for repetition penalty. 1.0 means no penalty. See [this
        paper](https://arxiv.org/pdf/1909.05858.pdf) for more details.
    return_full_text (`bool`, *optional*):
        Whether to prepend the prompt to the generated text
    seed (`int`, *optional*):
        Random sampling seed
    stop (`List[str]`, *optional*):
        Stop generating tokens if a member of `stop` is generated.
    stop_sequences (`List[str]`, *optional*):
        Deprecated argument. Use `stop` instead.
    temperature (`float`, *optional*):
        The value used to module the logits distribution.
    top_n_tokens (`int`, *optional*):
        Return information about the `top_n_tokens` most likely tokens at each generation step, instead of
        just the sampled token.
    top_k (`int`, *optional`):
        The number of highest probability vocabulary tokens to keep for top-k-filtering.
    top_p (`float`, *optional`):
        If set to < 1, only the smallest set of most probable tokens with probabilities that add up to `top_p` or
        higher are kept for generation.
    truncate (`int`, *optional`):
        Truncate inputs tokens to the given size.
    typical_p (`float`, *optional`):
        Typical Decoding mass
        See [Typical Decoding for Natural Language Generation](https://arxiv.org/abs/2202.00666) for more information
    watermark (`bool`, *optional`):
        Watermarking with [A Watermark for Large Language Models](https://arxiv.org/abs/2301.10226)

Returns:
    `Union[str, TextGenerationOutput, Iterable[str], Iterable[TextGenerationStreamOutput]]`:
    Generated text returned from the server:
    - if `stream=False` and `details=False`, the generated text is returned as a `str` (default)
    - if `stream=True` and `details=False`, the generated text is returned token by token as a `Iterable[str]`
    - if `stream=False` and `details=True`, the generated text is returned with more details as a [`~huggingface_hub.TextGenerationOutput`]
    - if `details=True` and `stream=True`, the generated text is returned token by token as a iterable of [`~huggingface_hub.TextGenerationStreamOutput`]

Raises:
    `ValidationError`:
        If input values are not valid. No HTTP call is made to the server.
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()

# Case 1: generate text
>>> client.text_generation("The huggingface_hub library is ", max_new_tokens=12)
'100% open source and built to be easy to use.'

# Case 2: iterate over the generated tokens. Useful for large generation.
>>> for token in client.text_generation("The huggingface_hub library is ", max_new_tokens=12, stream=True):
...     print(token)
100
%
open
source
and
built
to
be
easy
to
use
.

# Case 3: get more details about the generation process.
>>> client.text_generation("The huggingface_hub library is ", max_new_tokens=12, details=True)
TextGenerationOutput(
    generated_text='100% open source and built to be easy to use.',
    details=TextGenerationDetails(
        finish_reason='length',
        generated_tokens=12,
        seed=None,
        prefill=[
            TextGenerationPrefillOutputToken(id=487, text='The', logprob=None),
            TextGenerationPrefillOutputToken(id=53789, text=' hugging', logprob=-13.171875),
            (...)
            TextGenerationPrefillOutputToken(id=204, text=' ', logprob=-7.0390625)
        ],
        tokens=[
            TokenElement(id=1425, text='100', logprob=-1.0175781, special=False),
            TokenElement(id=16, text='%', logprob=-0.0463562, special=False),
            (...)
            TokenElement(id=25, text='.', logprob=-0.5703125, special=False)
        ],
        best_of_sequences=None
    )
)

# Case 4: iterate over the generated tokens with more details.
# Last object is more complete, containing the full generated text and the finish reason.
>>> for details in client.text_generation("The huggingface_hub library is ", max_new_tokens=12, details=True, stream=True):
...     print(details)
...
TextGenerationStreamOutput(token=TokenElement(id=1425, text='100', logprob=-1.0175781, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=16, text='%', logprob=-0.0463562, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=1314, text=' open', logprob=-1.3359375, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=3178, text=' source', logprob=-0.28100586, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=273, text=' and', logprob=-0.5961914, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=3426, text=' built', logprob=-1.9423828, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=271, text=' to', logprob=-1.4121094, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=314, text=' be', logprob=-1.5224609, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=1833, text=' easy', logprob=-2.1132812, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=271, text=' to', logprob=-0.08520508, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(id=745, text=' use', logprob=-0.39453125, special=False), generated_text=None, details=None)
TextGenerationStreamOutput(token=TokenElement(
    id=25,
    text='.',
    logprob=-0.5703125,
    special=False),
    generated_text='100% open source and built to be easy to use.',
    details=TextGenerationStreamOutputStreamDetails(finish_reason='length', generated_tokens=12, seed=None)
)

# Case 5: generate constrained output using grammar
>>> response = client.text_generation(
...     prompt="I saw a puppy a cat and a raccoon during my bike ride in the park",
...     model="HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
...     max_new_tokens=100,
...     repetition_penalty=1.3,
...     grammar={
...         "type": "json",
...         "value": {
...             "properties": {
...                 "location": {"type": "string"},
...                 "activity": {"type": "string"},
...                 "animals_seen": {"type": "integer", "minimum": 1, "maximum": 5},
...                 "animals": {"type": "array", "items": {"type": "string"}},
...             },
...             "required": ["location", "activity", "animals_seen", "animals"],
...         },
...     },
... )
>>> json.loads(response)
{
    "activity": "bike riding",
    "animals": ["puppy", "cat", "raccoon"],
    "animals_seen": 3,
    "location": "park"
}
```

---
## text_to_image
```python
from _client import text_to_image
```

Generate an image based on a given text using a specified model.

<Tip warning={true}>

You must have `PIL` installed if you want to work with images (`pip install Pillow`).

</Tip>

Args:
    prompt (`str`):
        The prompt to generate an image from.
    negative_prompt (`str`, *optional*):
        An optional negative prompt for the image generation.
    height (`float`, *optional*):
        The height in pixels of the image to generate.
    width (`float`, *optional*):
        The width in pixels of the image to generate.
    num_inference_steps (`int`, *optional*):
        The number of denoising steps. More denoising steps usually lead to a higher quality image at the
        expense of slower inference.
    guidance_scale (`float`, *optional*):
        Higher guidance scale encourages to generate images that are closely linked to the text `prompt`,
        usually at the expense of lower image quality.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `Image`: The generated image.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()

>>> image = client.text_to_image("An astronaut riding a horse on the moon.")
>>> image.save("astronaut.png")

>>> image = client.text_to_image(
...     "An astronaut riding a horse on the moon.",
...     negative_prompt="low resolution, blurry",
...     model="stabilityai/stable-diffusion-2-1",
... )
>>> image.save("better_astronaut.png")
```

---
## text_to_speech
```python
from _client import text_to_speech
```

Synthesize an audio of a voice pronouncing a given text.

Args:
    text (`str`):
        The text to synthesize.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `bytes`: The generated audio.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from pathlib import Path
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()

>>> audio = client.text_to_speech("Hello world")
>>> Path("hello_world.flac").write_bytes(audio)
```

---
## token_classification
```python
from _client import token_classification
```

Perform token classification on the given text.
Usually used for sentence parsing, either grammatical, or Named Entity Recognition (NER) to understand keywords contained within text.

Args:
    text (`str`):
        A string to be classified.
    model (`str`, *optional*):
        The model to use for the token classification task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended token classification model will be used.
        Defaults to None.

Returns:
    `List[TokenClassificationOutputElement]`: List of [`TokenClassificationOutputElement`] items containing the entity group, confidence score, word, start and end index.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.token_classification("My name is Sarah Jessica Parker but you can call me Jessica")
[
    TokenClassificationOutputElement(
        entity_group='PER',
        score=0.9971321225166321,
        word='Sarah Jessica Parker',
        start=11,
        end=31,
    ),
    TokenClassificationOutputElement(
        entity_group='PER',
        score=0.9773476123809814,
        word='Jessica',
        start=52,
        end=59,
    )
]
```

---
## translation
```python
from _client import translation
```

Convert text from one language to another.

Check out https://huggingface.co/tasks/translation for more information on how to choose the best model for
your specific use case. Source and target languages usually depend on the model.
However, it is possible to specify source and target languages for certain models. If you are working with one of these models,
you can use `src_lang` and `tgt_lang` arguments to pass the relevant information.
You can find this information in the model card.

Args:
    text (`str`):
        A string to be translated.
    model (`str`, *optional*):
        The model to use for the translation task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended translation model will be used.
        Defaults to None.
    src_lang (`str`, *optional*):
        Source language of the translation task, i.e. input language. Cannot be passed without `tgt_lang`.
    tgt_lang (`str`, *optional*):
        Target language of the translation task, i.e. output language. Cannot be passed without `src_lang`.

Returns:
    [`TranslationOutput`]: The generated translated text.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.
    `ValueError`:
        If only one of the `src_lang` and `tgt_lang` arguments are provided.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.translation("My name is Wolfgang and I live in Berlin")
'Mein Name ist Wolfgang und ich lebe in Berlin.'
>>> client.translation("My name is Wolfgang and I live in Berlin", model="Helsinki-NLP/opus-mt-en-fr")
TranslationOutput(translation_text='Je m'appelle Wolfgang et je vis à Berlin.')
```

Specifying languages:
```py
>>> client.translation("My name is Sarah Jessica Parker but you can call me Jessica", model="facebook/mbart-large-50-many-to-many-mmt", src_lang="en_XX", tgt_lang="fr_XX")
"Mon nom est Sarah Jessica Parker mais vous pouvez m'appeler Jessica"
```

---
## visual_question_answering
```python
from _client import visual_question_answering
```

Answering open-ended questions based on an image.

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The input image for the context. It can be raw bytes, an image file, or a URL to an online image.
    question (`str`):
        Question to be answered.
    model (`str`, *optional*):
        The model to use for the visual question answering task. Can be a model ID hosted on the Hugging Face Hub or a URL to
        a deployed Inference Endpoint. If not provided, the default recommended visual question answering model will be used.
        Defaults to None.

Returns:
    `List[VisualQuestionAnsweringOutputElement]`: a list of [`VisualQuestionAnsweringOutputElement`] items containing the predicted label and associated probability.

Raises:
    `InferenceTimeoutError`:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.visual_question_answering(
...     image="https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg",
...     question="What is the animal doing?"
... )
[
    VisualQuestionAnsweringOutputElement(score=0.778609573841095, answer='laying down'),
    VisualQuestionAnsweringOutputElement(score=0.6957435607910156, answer='sitting'),
]
```

---
## zero_shot_classification
```python
from _client import zero_shot_classification
```

Provide as input a text and a set of candidate labels to classify the input text.

Args:
    text (`str`):
        The input text to classify.
    labels (`List[str]`):
        List of strings. Each string is the verbalization of a possible label for the input text.
    multi_label (`bool`):
        Boolean. If True, the probability for each label is evaluated independently and multiple labels can have a probability close to 1 simultaneously or all probabilities can be close to 0.
        If False, the labels are considered mutually exclusive and the probability over all labels always sums to 1. Defaults to False.
    hypothesis_template (`str`, *optional*):
        A template sentence string with curly brackets to which the label strings are added. The label strings are added at the position of the curly brackets "{}".
        Zero-shot classifiers are based on NLI models, which evaluate if a hypothesis is entailed in another text or not.
        For example, with hypothesis_template="This text is about {}." and labels=["economics", "politics"], the system internally creates the two hypotheses "This text is about economics." and "This text is about politics.".
        The model then evaluates for both hypotheses if they are entailed in the provided `text` or not.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `List[ZeroShotClassificationOutputElement]`: List of [`ZeroShotClassificationOutputElement`] items containing the predicted labels and their confidence.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example with `multi_label=False`:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> text = (
...     "A new model offers an explanation for how the Galilean satellites formed around the solar system's"
...     "largest world. Konstantin Batygin did not set out to solve one of the solar system's most puzzling"
...     " mysteries when he went for a run up a hill in Nice, France."
... )
>>> labels = ["space & cosmos", "scientific discovery", "microbiology", "robots", "archeology"]
>>> client.zero_shot_classification(text, labels)
[
    ZeroShotClassificationOutputElement(label='scientific discovery', score=0.7961668968200684),
    ZeroShotClassificationOutputElement(label='space & cosmos', score=0.18570658564567566),
    ZeroShotClassificationOutputElement(label='microbiology', score=0.00730885099619627),
    ZeroShotClassificationOutputElement(label='archeology', score=0.006258360575884581),
    ZeroShotClassificationOutputElement(label='robots', score=0.004559356719255447),
]
>>> client.zero_shot_classification(text, labels, multi_label=True)
[
    ZeroShotClassificationOutputElement(label='scientific discovery', score=0.9829297661781311),
    ZeroShotClassificationOutputElement(label='space & cosmos', score=0.755190908908844),
    ZeroShotClassificationOutputElement(label='microbiology', score=0.0005462635890580714),
    ZeroShotClassificationOutputElement(label='archeology', score=0.00047131875180639327),
    ZeroShotClassificationOutputElement(label='robots', score=0.00030448526376858354),
]
```

Example with `multi_label=True` and a custom `hypothesis_template`:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.zero_shot_classification(
...    text="I really like our dinner and I'm very happy. I don't like the weather though.",
...    labels=["positive", "negative", "pessimistic", "optimistic"],
...    multi_label=True,
...    hypothesis_template="This text is {} towards the weather"
... )
[
    ZeroShotClassificationOutputElement(label='negative', score=0.9231801629066467),
    ZeroShotClassificationOutputElement(label='pessimistic', score=0.8760990500450134),
    ZeroShotClassificationOutputElement(label='optimistic', score=0.0008674879791215062),
    ZeroShotClassificationOutputElement(label='positive', score=0.0005250611575320363)
]
```

---
## zero_shot_image_classification
```python
from _client import zero_shot_image_classification
```

Provide input image and text labels to predict text labels for the image.

Args:
    image (`Union[str, Path, bytes, BinaryIO]`):
        The input image to caption. It can be raw bytes, an image file, or a URL to an online image.
    labels (`List[str]`):
        List of string possible labels. There must be at least 2 labels.
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `List[ZeroShotImageClassificationOutputElement]`: List of [`ZeroShotImageClassificationOutputElement`] items containing the predicted labels and their confidence.

Raises:
    [`InferenceTimeoutError`]:
        If the model is unavailable or the request times out.
    `HTTPError`:
        If the request fails with an HTTP error status code other than HTTP 503.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()

>>> client.zero_shot_image_classification(
...     "https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Cute_dog.jpg/320px-Cute_dog.jpg",
...     labels=["dog", "cat", "horse"],
... )
[ZeroShotImageClassificationOutputElement(label='dog', score=0.956),...]
```

---
## _resolve_url
```python
from _client import _resolve_url
```



---
## get_recommended_model
```python
from _client import get_recommended_model
```

Get the model Hugging Face recommends for the input task.

Args:
    task (`str`):
        The Hugging Face task to get which model Hugging Face recommends.
        All available tasks can be found [here](https://huggingface.co/tasks).

Returns:
    `str`: Name of the model recommended for the input task.

Raises:
    `ValueError`: If Hugging Face has no recommendation for the input task.

---
## get_endpoint_info
```python
from _client import get_endpoint_info
```

Get information about the deployed endpoint.

This endpoint is only available on endpoints powered by Text-Generation-Inference (TGI) or Text-Embedding-Inference (TEI).
Endpoints powered by `transformers` return an empty payload.

Args:
    model (`str`, *optional*):
        The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
        Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `Dict[str, Any]`: Information about the endpoint.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
>>> client.get_endpoint_info()
{
    'model_id': 'meta-llama/Meta-Llama-3-70B-Instruct',
    'model_sha': None,
    'model_dtype': 'torch.float16',
    'model_device_type': 'cuda',
    'model_pipeline_tag': None,
    'max_concurrent_requests': 128,
    'max_best_of': 2,
    'max_stop_sequences': 4,
    'max_input_length': 8191,
    'max_total_tokens': 8192,
    'waiting_served_ratio': 0.3,
    'max_batch_total_tokens': 1259392,
    'max_waiting_tokens': 20,
    'max_batch_size': None,
    'validation_workers': 32,
    'max_client_batch_size': 4,
    'version': '2.0.2',
    'sha': 'dccab72549635c7eb5ddb17f43f0b7cdff07c214',
    'docker_label': 'sha-dccab72'
}
```

---
## health_check
```python
from _client import health_check
```

Check the health of the deployed endpoint.

Health check is only available with Inference Endpoints powered by Text-Generation-Inference (TGI) or Text-Embedding-Inference (TEI).
For Inference API, please use [`InferenceClient.get_model_status`] instead.

Args:
    model (`str`, *optional*):
        URL of the Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.

Returns:
    `bool`: True if everything is working fine.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient("https://jzgu0buei5.us-east-1.aws.endpoints.huggingface.cloud")
>>> client.health_check()
True
```

---
## get_model_status
```python
from _client import get_model_status
```

Get the status of a model hosted on the Inference API.

<Tip>

This endpoint is mostly useful when you already know which model you want to use and want to check its
availability. If you want to discover already deployed models, you should rather use [`~InferenceClient.list_deployed_models`].

</Tip>

Args:
    model (`str`, *optional*):
        Identifier of the model for witch the status gonna be checked. If model is not provided,
        the model associated with this instance of [`InferenceClient`] will be used. Only InferenceAPI service can be checked so the
        identifier cannot be a URL.


Returns:
    [`ModelStatus`]: An instance of ModelStatus dataclass, containing information,
                 about the state of the model: load, state, compute type and framework.

Example:
```py
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> client.get_model_status("meta-llama/Meta-Llama-3-8B-Instruct")
ModelStatus(loaded=True, state='Loaded', compute_type='gpu', framework='text-generation-inference')
```

---
## chat
```python
from _client import chat
```



---
## completions
```python
from _client import completions
```



---
## create
```python
from _client import create
```



---
## _unpack_response
```python
from _client import _unpack_response
```



---
## __name__
```python
from user import __name__
```



---
## UserCommands
```python
from user import UserCommands
```



---
## BaseUserCommand
```python
from user import BaseUserCommand
```



---
## LoginCommand
```python
from user import LoginCommand
```



---
## LogoutCommand
```python
from user import LogoutCommand
```



---
## WhoamiCommand
```python
from user import WhoamiCommand
```



---
## RepoCreateCommand
```python
from user import RepoCreateCommand
```



---
## register_subcommand
```python
from user import register_subcommand
```



---
## __init__
```python
from user import __init__
```



---
## run
```python
from user import run
```



---
## __name__
```python
from huggingface_cli import __name__
```



---
## main
```python
from huggingface_cli import main
```



---
## VersionCommand
```python
from version import VersionCommand
```



---
## register_subcommand
```python
from version import register_subcommand
```



---
## run
```python
from version import run
```



---
## __name__
```python
from env import __name__
```



---
## EnvironmentCommand
```python
from env import EnvironmentCommand
```



---
## __init__
```python
from env import __init__
```



---
## register_subcommand
```python
from env import register_subcommand
```



---
## run
```python
from env import run
```



---
## __name__
```python
from upload import __name__
```



---
## UploadCommand
```python
from upload import UploadCommand
```



---
## register_subcommand
```python
from upload import register_subcommand
```



---
## __init__
```python
from upload import __init__
```



---
## run
```python
from upload import run
```



---
## _upload
```python
from upload import _upload
```



---
## __name__
```python
from delete_cache import __name__
```

Contains command to delete some revisions from the HF cache directory.

Usage:
    huggingface-cli delete-cache
    huggingface-cli delete-cache --disable-tui
    huggingface-cli delete-cache --dir ~/.cache/huggingface/hub

NOTE:
    This command is based on `InquirerPy` to build the multiselect menu in the terminal.
    This dependency has to be installed with `pip install huggingface_hub[cli]`. Since
    we want to avoid as much as possible cross-platform issues, I chose a library that
    is built on top of `python-prompt-toolkit` which seems to be a reference in terminal
    GUI (actively maintained on both Unix and Windows, 7.9k stars).

    For the moment, the TUI feature is in beta.

    See:
    - https://github.com/kazhala/InquirerPy
    - https://inquirerpy.readthedocs.io/en/latest/
    - https://github.com/prompt-toolkit/python-prompt-toolkit

    Other solutions could have been:
    - `simple_term_menu`: would be good as well for our use case but some issues suggest
      that Windows is less supported.
      See: https://github.com/IngoMeyer441/simple-term-menu
    - `PyInquirer`: very similar to `InquirerPy` but older and not maintained anymore.
      In particular, no support of Python3.10.
      See: https://github.com/CITGuru/PyInquirer
    - `pick` (or `pickpack`): easy to use and flexible but built on top of Python's
      standard library `curses` that is specific to Unix (not implemented on Windows).
      See https://github.com/wong2/pick and https://github.com/anafvana/pickpack.
    - `inquirer`: lot of traction (700 stars) but explicitly states "experimental
      support of Windows". Not built on top of `python-prompt-toolkit`.
      See https://github.com/magmax/python-inquirer

TODO: add support for `huggingface-cli delete-cache aaaaaa bbbbbb cccccc (...)` ?
TODO: add "--keep-last" arg to delete revisions that are not on `main` ref
TODO: add "--filter" arg to filter repositories by name ?
TODO: add "--sort" arg to sort by size ?
TODO: add "--limit" arg to limit to X repos ?
TODO: add "-y" arg for immediate deletion ?
See discussions in https://github.com/huggingface/huggingface_hub/issues/1025.

---
## require_inquirer_py
```python
from delete_cache import require_inquirer_py
```

Decorator to flag methods that require `InquirerPy`.

---
## DeleteCacheCommand
```python
from delete_cache import DeleteCacheCommand
```



---
## _manual_review_tui
```python
from delete_cache import _manual_review_tui
```

Ask the user for a manual review of the revisions to delete.

Displays a multi-select menu in the terminal (TUI).

---
## _ask_for_confirmation_tui
```python
from delete_cache import _ask_for_confirmation_tui
```

Ask for confirmation using Inquirer.

---
## _get_tui_choices_from_scan
```python
from delete_cache import _get_tui_choices_from_scan
```

Build a list of choices from the scanned repos.

Args:
    repos (*Iterable[`CachedRepoInfo`]*):
        List of scanned repos on which we want to delete revisions.
    preselected (*List[`str`]*):
        List of revision hashes that will be preselected.

Return:
    The list of choices to pass to `inquirer.checkbox`.

---
## _manual_review_no_tui
```python
from delete_cache import _manual_review_no_tui
```

Ask the user for a manual review of the revisions to delete.

Used when TUI is disabled. Manual review happens in a separate tmp file that the
user can manually edit.

---
## _ask_for_confirmation_no_tui
```python
from delete_cache import _ask_for_confirmation_no_tui
```

Ask for confirmation using pure-python.

---
## _get_expectations_str
```python
from delete_cache import _get_expectations_str
```

Format a string to display to the user how much space would be saved.

Example:
```
>>> _get_expectations_str(hf_cache_info, selected_hashes)
'7 revisions selected counting for 4.3G.'
```

---
## _read_manual_review_tmp_file
```python
from delete_cache import _read_manual_review_tmp_file
```

Read the manually reviewed instruction file and return a list of revision hash.

Example:
    ```txt
    # This is the tmp file content
    ###

    # Commented out line
    123456789 # revision hash

    # Something else
    #      a_newer_hash # 2 days ago
        an_older_hash # 3 days ago
    ```

    ```py
    >>> _read_manual_review_tmp_file(tmp_path)
    ['123456789', 'an_older_hash']
    ```

---
## _repo_sorting_order
```python
from delete_cache import _repo_sorting_order
```



---
## _revision_sorting_order
```python
from delete_cache import _revision_sorting_order
```



---
## _inner
```python
from delete_cache import _inner
```



---
## register_subcommand
```python
from delete_cache import register_subcommand
```



---
## __init__
```python
from delete_cache import __init__
```



---
## run
```python
from delete_cache import run
```

Run `delete-cache` command with or without TUI.

---
## _update_expectations
```python
from delete_cache import _update_expectations
```



---
## __name__
```python
from _cli_utils import __name__
```

Contains a utility for good-looking prints.

---
## ANSI
```python
from _cli_utils import ANSI
```

Helper for en.wikipedia.org/wiki/ANSI_escape_code

---
## tabulate
```python
from _cli_utils import tabulate
```

Inspired by:

- stackoverflow.com/a/8356620/593036
- stackoverflow.com/questions/9535954/printing-lists-as-tabular-data

---
## bold
```python
from _cli_utils import bold
```



---
## gray
```python
from _cli_utils import gray
```



---
## red
```python
from _cli_utils import red
```



---
## yellow
```python
from _cli_utils import yellow
```



---
## _format
```python
from _cli_utils import _format
```



---
## __name__
```python
from scan_cache import __name__
```

Contains command to scan the HF cache directory.

Usage:
    huggingface-cli scan-cache
    huggingface-cli scan-cache -v
    huggingface-cli scan-cache -vvv
    huggingface-cli scan-cache --dir ~/.cache/huggingface/hub

---
## ScanCacheCommand
```python
from scan_cache import ScanCacheCommand
```



---
## get_table
```python
from scan_cache import get_table
```

Generate a table from the [`HFCacheInfo`] object.

Pass `verbosity=0` to get a table with a single row per repo, with columns
"repo_id", "repo_type", "size_on_disk", "nb_files", "last_accessed", "last_modified", "refs", "local_path".

Pass `verbosity=1` to get a table with a row per repo and revision (thus multiple rows can appear for a single repo), with columns
"repo_id", "repo_type", "revision", "size_on_disk", "nb_files", "last_modified", "refs", "local_path".

Example:
```py
>>> from huggingface_hub.utils import scan_cache_dir
>>> from huggingface_hub.commands.scan_cache import get_table

>>> hf_cache_info = scan_cache_dir()
HFCacheInfo(...)

>>> print(get_table(hf_cache_info, verbosity=0))
REPO ID                                             REPO TYPE SIZE ON DISK NB FILES LAST_ACCESSED LAST_MODIFIED REFS LOCAL PATH
--------------------------------------------------- --------- ------------ -------- ------------- ------------- ---- --------------------------------------------------------------------------------------------------
roberta-base                                        model             2.7M        5 1 day ago     1 week ago    main C:\Users\admin\.cache\huggingface\hub\models--roberta-base
suno/bark                                           model             8.8K        1 1 week ago    1 week ago    main C:\Users\admin\.cache\huggingface\hub\models--suno--bark
t5-base                                             model           893.8M        4 4 days ago    7 months ago  main C:\Users\admin\.cache\huggingface\hub\models--t5-base
t5-large                                            model             3.0G        4 5 weeks ago   5 months ago  main C:\Users\admin\.cache\huggingface\hub\models--t5-large

>>> print(get_table(hf_cache_info, verbosity=1))
REPO ID                                             REPO TYPE REVISION                                 SIZE ON DISK NB FILES LAST_MODIFIED REFS LOCAL PATH
--------------------------------------------------- --------- ---------------------------------------- ------------ -------- ------------- ---- -----------------------------------------------------------------------------------------------------------------------------------------------------
roberta-base                                        model     e2da8e2f811d1448a5b465c236feacd80ffbac7b         2.7M        5 1 week ago    main C:\Users\admin\.cache\huggingface\hub\models--roberta-base\snapshots\e2da8e2f811d1448a5b465c236feacd80ffbac7b
suno/bark                                           model     70a8a7d34168586dc5d028fa9666aceade177992         8.8K        1 1 week ago    main C:\Users\admin\.cache\huggingface\hub\models--suno--bark\snapshots\70a8a7d34168586dc5d028fa9666aceade177992
t5-base                                             model     a9723ea7f1b39c1eae772870f3b547bf6ef7e6c1       893.8M        4 7 months ago  main C:\Users\admin\.cache\huggingface\hub\models--t5-base\snapshots\a9723ea7f1b39c1eae772870f3b547bf6ef7e6c1
t5-large                                            model     150ebc2c4b72291e770f58e6057481c8d2ed331a         3.0G        4 5 months ago  main C:\Users\admin\.cache\huggingface\hub\models--t5-large\snapshots\150ebc2c4b72291e770f58e6057481c8d2ed331a                                                 ```
```

Args:
    hf_cache_info ([`HFCacheInfo`]):
        The HFCacheInfo object to print.
    verbosity (`int`, *optional*):
        The verbosity level. Defaults to 0.

Returns:
    `str`: The table as a string.

---
## register_subcommand
```python
from scan_cache import register_subcommand
```



---
## __init__
```python
from scan_cache import __init__
```



---
## run
```python
from scan_cache import run
```



---
## _print_hf_cache_info_as_table
```python
from scan_cache import _print_hf_cache_info_as_table
```



---
## __name__
```python
from download import __name__
```



---
## DownloadCommand
```python
from download import DownloadCommand
```

Download packages from:

- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.

pip also supports downloading from "requirements files", which provide
an easy way to specify a whole environment to be downloaded.

---
## register_subcommand
```python
from download import register_subcommand
```



---
## __init__
```python
from download import __init__
```



---
## run
```python
from download import run
```



---
## _download
```python
from download import _download
```



---
## BaseHuggingfaceCLICommand
```python
from __init__ import BaseHuggingfaceCLICommand
```



---
## register_subcommand
```python
from __init__ import register_subcommand
```



---
## run
```python
from __init__ import run
```



---
## LfsCommands
```python
from lfs import LfsCommands
```

Implementation of a custom transfer agent for the transfer type "multipart"
for git-lfs. This lets users upload large files >5GB 🔥. Spec for LFS custom
transfer agent is:
https://github.com/git-lfs/git-lfs/blob/master/docs/custom-transfers.md

This introduces two commands to the CLI:

1. $ huggingface-cli lfs-enable-largefiles

This should be executed once for each model repo that contains a model file
>5GB. It's documented in the error message you get if you just try to git
push a 5GB file without having enabled it before.

2. $ huggingface-cli lfs-multipart-upload

This command is called by lfs directly and is not meant to be called by the
user.

---
## LfsEnableCommand
```python
from lfs import LfsEnableCommand
```



---
## write_msg
```python
from lfs import write_msg
```

Write out the message in Line delimited JSON.

---
## read_msg
```python
from lfs import read_msg
```

Read Line delimited JSON from stdin.

---
## LfsUploadCommand
```python
from lfs import LfsUploadCommand
```



---
## register_subcommand
```python
from lfs import register_subcommand
```



---
## __init__
```python
from lfs import __init__
```



---
## run
```python
from lfs import run
```



---
## __name__
```python
from upload_large_folder import __name__
```

Contains command to upload a large folder with the CLI.

---
## UploadLargeFolderCommand
```python
from upload_large_folder import UploadLargeFolderCommand
```



---
## register_subcommand
```python
from upload_large_folder import register_subcommand
```



---
## __init__
```python
from upload_large_folder import __init__
```



---
## run
```python
from upload_large_folder import run
```



---
## __name__
```python
from tag import __name__
```



---
## TagCommands
```python
from tag import TagCommands
```



---
## handle_commands
```python
from tag import handle_commands
```



---
## TagCommand
```python
from tag import TagCommand
```



---
## TagCreateCommand
```python
from tag import TagCreateCommand
```



---
## TagListCommand
```python
from tag import TagListCommand
```



---
## TagDeleteCommand
```python
from tag import TagDeleteCommand
```



---
## register_subcommand
```python
from tag import register_subcommand
```



---
## __init__
```python
from tag import __init__
```



---
## run
```python
from tag import run
```



---
## __name__
```python
from repo_files import __name__
```

Contains command to update or delete files in a repository using the CLI.

Usage:
    # delete all
    huggingface-cli repo-files <repo_id> delete "*"

    # delete single file
    huggingface-cli repo-files <repo_id> delete file.txt

    # delete single folder
    huggingface-cli repo-files <repo_id> delete folder/

    # delete multiple
    huggingface-cli repo-files <repo_id> delete file.txt folder/ file2.txt

    # delete multiple patterns
    huggingface-cli repo-files <repo_id> delete file.txt "*.json" "folder/*.parquet"

    # delete from different revision / repo-type
    huggingface-cli repo-files <repo_id> delete file.txt --revision=refs/pr/1 --repo-type=dataset

---
## DeleteFilesSubCommand
```python
from repo_files import DeleteFilesSubCommand
```



---
## RepoFilesCommand
```python
from repo_files import RepoFilesCommand
```



---
## __init__
```python
from repo_files import __init__
```



---
## run
```python
from repo_files import run
```



---
## register_subcommand
```python
from repo_files import register_subcommand
```



---
## __name__
```python
from _async_client import __name__
```



---
## AsyncInferenceClient
```python
from _async_client import AsyncInferenceClient
```

Initialize a new Inference Client.

[`InferenceClient`] aims to provide a unified experience to perform inference. The client can be used
seamlessly with either the (free) Inference API or self-hosted Inference Endpoints.

Args:
    model (`str`, `optional`):
        The model to run inference with. Can be a model id hosted on the Hugging Face Hub, e.g. `meta-llama/Meta-Llama-3-8B-Instruct`
        or a URL to a deployed Inference Endpoint. Defaults to None, in which case a recommended model is
        automatically selected for the task.
        Note: for better compatibility with OpenAI's client, `model` has been aliased as `base_url`. Those 2
        arguments are mutually exclusive. If using `base_url` for chat completion, the `/chat/completions` suffix
        path will be appended to the base URL (see the [TGI Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api)
        documentation for details). When passing a URL as `model`, the client will not append any suffix path to it.
    token (`str` or `bool`, *optional*):
        Hugging Face token. Will default to the locally saved token if not provided.
        Pass `token=False` if you don't want to send your token to the server.
        Note: for better compatibility with OpenAI's client, `token` has been aliased as `api_key`. Those 2
        arguments are mutually exclusive and have the exact same behavior.
    timeout (`float`, `optional`):
        The maximum number of seconds to wait for a response from the server. Loading a new model in Inference
        API can take up to several minutes. Defaults to None, meaning it will loop until the server is available.
    headers (`Dict[str, str]`, `optional`):
        Additional headers to send to the server. By default only the authorization and user-agent headers are sent.
        Values in this dictionary will override the default values.
    cookies (`Dict[str, str]`, `optional`):
        Additional cookies to send to the server.
    trust_env ('bool', 'optional'):
        Trust environment settings for proxy configuration if the parameter is `True` (`False` by default).
    proxies (`Any`, `optional`):
        Proxies to use for the request.
    base_url (`str`, `optional`):
        Base URL to run inference. This is a duplicated argument from `model` to make [`InferenceClient`]
        follow the same pattern as `openai.OpenAI` client. Cannot be used if `model` is set. Defaults to None.
    api_key (`str`, `optional`):
        Token to use for authentication. This is a duplicated argument from `token` to make [`InferenceClient`]
        follow the same pattern as `openai.OpenAI` client. Cannot be used if `token` is set. Defaults to None.

---
## _ProxyClient
```python
from _async_client import _ProxyClient
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## ProxyClientChat
```python
from _async_client import ProxyClientChat
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## ProxyClientChatCompletions
```python
from _async_client import ProxyClientChatCompletions
```

Proxy class to be able to call `client.chat.completion.create(...)` as OpenAI client.

---
## __init__
```python
from _async_client import __init__
```



---
## __repr__
```python
from _async_client import __repr__
```



---
## __del__
```python
from _async_client import __del__
```



---
## _resolve_chat_completion_url
```python
from _async_client import _resolve_chat_completion_url
```



---
## _get_client_session
```python
from _async_client import _get_client_session
```



---
## _resolve_url
```python
from _async_client import _resolve_url
```



---
## get_recommended_model
```python
from _async_client import get_recommended_model
```

Get the model Hugging Face recommends for the input task.

Args:
    task (`str`):
        The Hugging Face task to get which model Hugging Face recommends.
        All available tasks can be found [here](https://huggingface.co/tasks).

Returns:
    `str`: Name of the model recommended for the input task.

Raises:
    `ValueError`: If Hugging Face has no recommendation for the input task.

---
## chat
```python
from _async_client import chat
```



---
## completions
```python
from _async_client import completions
```



---
## create
```python
from _async_client import create
```



---
## _unpack_response
```python
from _async_client import _unpack_response
```



---
## __name__
```python
from text_to_audio import __name__
```



---
## TextToAudioGenerationParameters
```python
from text_to_audio import TextToAudioGenerationParameters
```

Parametrization of the text generation process
Ad-hoc parametrization of the text generation process

---
## TextToAudioParameters
```python
from text_to_audio import TextToAudioParameters
```

Additional inference parameters
Additional inference parameters for Text To Audio

---
## TextToAudioInput
```python
from text_to_audio import TextToAudioInput
```

Inputs for Text To Audio inference

---
## TextToAudioOutput
```python
from text_to_audio import TextToAudioOutput
```

Outputs of inference for the Text To Audio task

---
## __name__
```python
from question_answering import __name__
```



---
## QuestionAnsweringInputData
```python
from question_answering import QuestionAnsweringInputData
```

One (context, question) pair to answer

---
## QuestionAnsweringParameters
```python
from question_answering import QuestionAnsweringParameters
```

Additional inference parameters
Additional inference parameters for Question Answering

---
## QuestionAnsweringInput
```python
from question_answering import QuestionAnsweringInput
```

Inputs for Question Answering inference

---
## QuestionAnsweringOutputElement
```python
from question_answering import QuestionAnsweringOutputElement
```

Outputs of inference for the Question Answering task

---
## __name__
```python
from text2text_generation import __name__
```



---
## Text2TextGenerationParameters
```python
from text2text_generation import Text2TextGenerationParameters
```

Additional inference parameters
Additional inference parameters for Text2text Generation

---
## Text2TextGenerationInput
```python
from text2text_generation import Text2TextGenerationInput
```

Inputs for Text2text Generation inference

---
## Text2TextGenerationOutput
```python
from text2text_generation import Text2TextGenerationOutput
```

Outputs of inference for the Text2text Generation task

---
## __name__
```python
from image_segmentation import __name__
```



---
## ImageSegmentationParameters
```python
from image_segmentation import ImageSegmentationParameters
```

Additional inference parameters
Additional inference parameters for Image Segmentation

---
## ImageSegmentationInput
```python
from image_segmentation import ImageSegmentationInput
```

Inputs for Image Segmentation inference

---
## ImageSegmentationOutputElement
```python
from image_segmentation import ImageSegmentationOutputElement
```

Outputs of inference for the Image Segmentation task
A predicted mask / segment

---
## __name__
```python
from text_to_image import __name__
```



---
## TextToImageTargetSize
```python
from text_to_image import TextToImageTargetSize
```

The size in pixel of the output image

---
## TextToImageParameters
```python
from text_to_image import TextToImageParameters
```

Additional inference parameters
Additional inference parameters for Text To Image

---
## TextToImageInput
```python
from text_to_image import TextToImageInput
```

Inputs for Text To Image inference

---
## TextToImageOutput
```python
from text_to_image import TextToImageOutput
```

Outputs of inference for the Text To Image task

---
## __name__
```python
from visual_question_answering import __name__
```



---
## VisualQuestionAnsweringInputData
```python
from visual_question_answering import VisualQuestionAnsweringInputData
```

One (image, question) pair to answer

---
## VisualQuestionAnsweringParameters
```python
from visual_question_answering import VisualQuestionAnsweringParameters
```

Additional inference parameters
Additional inference parameters for Visual Question Answering

---
## VisualQuestionAnsweringInput
```python
from visual_question_answering import VisualQuestionAnsweringInput
```

Inputs for Visual Question Answering inference

---
## VisualQuestionAnsweringOutputElement
```python
from visual_question_answering import VisualQuestionAnsweringOutputElement
```

Outputs of inference for the Visual Question Answering task

---
## __name__
```python
from chat_completion import __name__
```



---
## ChatCompletionInputURL
```python
from chat_completion import ChatCompletionInputURL
```



---
## ChatCompletionInputMessageChunk
```python
from chat_completion import ChatCompletionInputMessageChunk
```



---
## ChatCompletionInputMessage
```python
from chat_completion import ChatCompletionInputMessage
```



---
## ChatCompletionInputGrammarType
```python
from chat_completion import ChatCompletionInputGrammarType
```



---
## ChatCompletionInputFunctionName
```python
from chat_completion import ChatCompletionInputFunctionName
```



---
## ChatCompletionInputToolTypeClass
```python
from chat_completion import ChatCompletionInputToolTypeClass
```



---
## ChatCompletionInputFunctionDefinition
```python
from chat_completion import ChatCompletionInputFunctionDefinition
```



---
## ChatCompletionInputTool
```python
from chat_completion import ChatCompletionInputTool
```



---
## ChatCompletionInput
```python
from chat_completion import ChatCompletionInput
```

Chat Completion Input.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## ChatCompletionOutputTopLogprob
```python
from chat_completion import ChatCompletionOutputTopLogprob
```



---
## ChatCompletionOutputLogprob
```python
from chat_completion import ChatCompletionOutputLogprob
```



---
## ChatCompletionOutputLogprobs
```python
from chat_completion import ChatCompletionOutputLogprobs
```



---
## ChatCompletionOutputFunctionDefinition
```python
from chat_completion import ChatCompletionOutputFunctionDefinition
```



---
## ChatCompletionOutputToolCall
```python
from chat_completion import ChatCompletionOutputToolCall
```



---
## ChatCompletionOutputMessage
```python
from chat_completion import ChatCompletionOutputMessage
```



---
## ChatCompletionOutputComplete
```python
from chat_completion import ChatCompletionOutputComplete
```



---
## ChatCompletionOutputUsage
```python
from chat_completion import ChatCompletionOutputUsage
```



---
## ChatCompletionOutput
```python
from chat_completion import ChatCompletionOutput
```

Chat Completion Output.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## ChatCompletionStreamOutputFunction
```python
from chat_completion import ChatCompletionStreamOutputFunction
```



---
## ChatCompletionStreamOutputDeltaToolCall
```python
from chat_completion import ChatCompletionStreamOutputDeltaToolCall
```



---
## ChatCompletionStreamOutputDelta
```python
from chat_completion import ChatCompletionStreamOutputDelta
```



---
## ChatCompletionStreamOutputTopLogprob
```python
from chat_completion import ChatCompletionStreamOutputTopLogprob
```



---
## ChatCompletionStreamOutputLogprob
```python
from chat_completion import ChatCompletionStreamOutputLogprob
```



---
## ChatCompletionStreamOutputLogprobs
```python
from chat_completion import ChatCompletionStreamOutputLogprobs
```



---
## ChatCompletionStreamOutputChoice
```python
from chat_completion import ChatCompletionStreamOutputChoice
```



---
## ChatCompletionStreamOutput
```python
from chat_completion import ChatCompletionStreamOutput
```

Chat Completion Stream Output.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## __name__
```python
from image_classification import __name__
```



---
## ImageClassificationParameters
```python
from image_classification import ImageClassificationParameters
```

Additional inference parameters
Additional inference parameters for Image Classification

---
## ImageClassificationInput
```python
from image_classification import ImageClassificationInput
```

Inputs for Image Classification inference

---
## ImageClassificationOutputElement
```python
from image_classification import ImageClassificationOutputElement
```

Outputs of inference for the Image Classification task

---
## __name__
```python
from fill_mask import __name__
```



---
## FillMaskParameters
```python
from fill_mask import FillMaskParameters
```

Additional inference parameters
Additional inference parameters for Fill Mask

---
## FillMaskInput
```python
from fill_mask import FillMaskInput
```

Inputs for Fill Mask inference

---
## FillMaskOutputElement
```python
from fill_mask import FillMaskOutputElement
```

Outputs of inference for the Fill Mask task

---
## __name__
```python
from image_to_text import __name__
```



---
## ImageToTextGenerationParameters
```python
from image_to_text import ImageToTextGenerationParameters
```

Parametrization of the text generation process
Ad-hoc parametrization of the text generation process

---
## ImageToTextParameters
```python
from image_to_text import ImageToTextParameters
```

Additional inference parameters
Additional inference parameters for Image To Text

---
## ImageToTextInput
```python
from image_to_text import ImageToTextInput
```

Inputs for Image To Text inference

---
## ImageToTextOutput
```python
from image_to_text import ImageToTextOutput
```

Outputs of inference for the Image To Text task

---
## __name__
```python
from audio_classification import __name__
```



---
## AudioClassificationParameters
```python
from audio_classification import AudioClassificationParameters
```

Additional inference parameters
Additional inference parameters for Audio Classification

---
## AudioClassificationInput
```python
from audio_classification import AudioClassificationInput
```

Inputs for Audio Classification inference

---
## AudioClassificationOutputElement
```python
from audio_classification import AudioClassificationOutputElement
```

Outputs for Audio Classification inference

---
## __name__
```python
from video_classification import __name__
```



---
## VideoClassificationParameters
```python
from video_classification import VideoClassificationParameters
```

Additional inference parameters
Additional inference parameters for Video Classification

---
## VideoClassificationInput
```python
from video_classification import VideoClassificationInput
```

Inputs for Video Classification inference

---
## VideoClassificationOutputElement
```python
from video_classification import VideoClassificationOutputElement
```

Outputs of inference for the Video Classification task

---
## __name__
```python
from image_to_image import __name__
```



---
## ImageToImageTargetSize
```python
from image_to_image import ImageToImageTargetSize
```

The size in pixel of the output image

---
## ImageToImageParameters
```python
from image_to_image import ImageToImageParameters
```

Additional inference parameters
Additional inference parameters for Image To Image

---
## ImageToImageInput
```python
from image_to_image import ImageToImageInput
```

Inputs for Image To Image inference

---
## ImageToImageOutput
```python
from image_to_image import ImageToImageOutput
```

Outputs of inference for the Image To Image task

---
## __name__
```python
from sentence_similarity import __name__
```



---
## SentenceSimilarityInputData
```python
from sentence_similarity import SentenceSimilarityInputData
```



---
## SentenceSimilarityInput
```python
from sentence_similarity import SentenceSimilarityInput
```

Inputs for Sentence similarity inference

---
## __name__
```python
from feature_extraction import __name__
```



---
## FeatureExtractionInput
```python
from feature_extraction import FeatureExtractionInput
```

Feature Extraction Input.
Auto-generated from TEI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.

---
## __name__
```python
from depth_estimation import __name__
```



---
## DepthEstimationInput
```python
from depth_estimation import DepthEstimationInput
```

Inputs for Depth Estimation inference

---
## DepthEstimationOutput
```python
from depth_estimation import DepthEstimationOutput
```

Outputs of inference for the Depth Estimation task

---
## __name__
```python
from zero_shot_classification import __name__
```



---
## ZeroShotClassificationInputData
```python
from zero_shot_classification import ZeroShotClassificationInputData
```

The input text data, with candidate labels

---
## ZeroShotClassificationParameters
```python
from zero_shot_classification import ZeroShotClassificationParameters
```

Additional inference parameters
Additional inference parameters for Zero Shot Classification

---
## ZeroShotClassificationInput
```python
from zero_shot_classification import ZeroShotClassificationInput
```

Inputs for Zero Shot Classification inference

---
## ZeroShotClassificationOutputElement
```python
from zero_shot_classification import ZeroShotClassificationOutputElement
```

Outputs of inference for the Zero Shot Classification task

---
## __name__
```python
from text_classification import __name__
```



---
## TextClassificationParameters
```python
from text_classification import TextClassificationParameters
```

Additional inference parameters
Additional inference parameters for Text Classification

---
## TextClassificationInput
```python
from text_classification import TextClassificationInput
```

Inputs for Text Classification inference

---
## TextClassificationOutputElement
```python
from text_classification import TextClassificationOutputElement
```

Outputs of inference for the Text Classification task

---
## __name__
```python
from document_question_answering import __name__
```



---
## DocumentQuestionAnsweringInputData
```python
from document_question_answering import DocumentQuestionAnsweringInputData
```

One (document, question) pair to answer

---
## DocumentQuestionAnsweringParameters
```python
from document_question_answering import DocumentQuestionAnsweringParameters
```

Additional inference parameters
Additional inference parameters for Document Question Answering

---
## DocumentQuestionAnsweringInput
```python
from document_question_answering import DocumentQuestionAnsweringInput
```

Inputs for Document Question Answering inference

---
## DocumentQuestionAnsweringOutputElement
```python
from document_question_answering import DocumentQuestionAnsweringOutputElement
```

Outputs of inference for the Document Question Answering task

---
## __name__
```python
from translation import __name__
```



---
## TranslationGenerationParameters
```python
from translation import TranslationGenerationParameters
```

Additional inference parameters
Additional inference parameters for Text2text Generation

---
## TranslationInput
```python
from translation import TranslationInput
```

Inputs for Translation inference
Inputs for Text2text Generation inference

---
## TranslationOutput
```python
from translation import TranslationOutput
```

Outputs of inference for the Translation task

---
## __name__
```python
from text_generation import __name__
```



---
## TextGenerationInputGrammarType
```python
from text_generation import TextGenerationInputGrammarType
```



---
## TextGenerationInputGenerateParameters
```python
from text_generation import TextGenerationInputGenerateParameters
```



---
## TextGenerationInput
```python
from text_generation import TextGenerationInput
```

Text Generation Input.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## TextGenerationOutputPrefillToken
```python
from text_generation import TextGenerationOutputPrefillToken
```



---
## TextGenerationOutputToken
```python
from text_generation import TextGenerationOutputToken
```



---
## TextGenerationOutputBestOfSequence
```python
from text_generation import TextGenerationOutputBestOfSequence
```



---
## TextGenerationOutputDetails
```python
from text_generation import TextGenerationOutputDetails
```



---
## TextGenerationOutput
```python
from text_generation import TextGenerationOutput
```

Text Generation Output.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## TextGenerationStreamOutputStreamDetails
```python
from text_generation import TextGenerationStreamOutputStreamDetails
```



---
## TextGenerationStreamOutputToken
```python
from text_generation import TextGenerationStreamOutputToken
```



---
## TextGenerationStreamOutput
```python
from text_generation import TextGenerationStreamOutput
```

Text Generation Stream Output.
Auto-generated from TGI specs.
For more details, check out
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.

---
## __name__
```python
from zero_shot_object_detection import __name__
```



---
## ZeroShotObjectDetectionInputData
```python
from zero_shot_object_detection import ZeroShotObjectDetectionInputData
```

The input image data, with candidate labels

---
## ZeroShotObjectDetectionInput
```python
from zero_shot_object_detection import ZeroShotObjectDetectionInput
```

Inputs for Zero Shot Object Detection inference

---
## ZeroShotObjectDetectionBoundingBox
```python
from zero_shot_object_detection import ZeroShotObjectDetectionBoundingBox
```

The predicted bounding box. Coordinates are relative to the top left corner of the input
image.

---
## ZeroShotObjectDetectionOutputElement
```python
from zero_shot_object_detection import ZeroShotObjectDetectionOutputElement
```

Outputs of inference for the Zero Shot Object Detection task

---
## __name__
```python
from automatic_speech_recognition import __name__
```



---
## AutomaticSpeechRecognitionGenerationParameters
```python
from automatic_speech_recognition import AutomaticSpeechRecognitionGenerationParameters
```

Parametrization of the text generation process
Ad-hoc parametrization of the text generation process

---
## AutomaticSpeechRecognitionParameters
```python
from automatic_speech_recognition import AutomaticSpeechRecognitionParameters
```

Additional inference parameters
Additional inference parameters for Automatic Speech Recognition

---
## AutomaticSpeechRecognitionInput
```python
from automatic_speech_recognition import AutomaticSpeechRecognitionInput
```

Inputs for Automatic Speech Recognition inference

---
## AutomaticSpeechRecognitionOutputChunk
```python
from automatic_speech_recognition import AutomaticSpeechRecognitionOutputChunk
```



---
## AutomaticSpeechRecognitionOutput
```python
from automatic_speech_recognition import AutomaticSpeechRecognitionOutput
```

Outputs of inference for the Automatic Speech Recognition task

---
## __name__
```python
from summarization import __name__
```



---
## SummarizationGenerationParameters
```python
from summarization import SummarizationGenerationParameters
```

Additional inference parameters
Additional inference parameters for Text2text Generation

---
## SummarizationInput
```python
from summarization import SummarizationInput
```

Inputs for Summarization inference
Inputs for Text2text Generation inference

---
## SummarizationOutput
```python
from summarization import SummarizationOutput
```

Outputs of inference for the Summarization task

---
## __name__
```python
from zero_shot_image_classification import __name__
```



---
## ZeroShotImageClassificationInputData
```python
from zero_shot_image_classification import ZeroShotImageClassificationInputData
```

The input image data, with candidate labels

---
## ZeroShotImageClassificationParameters
```python
from zero_shot_image_classification import ZeroShotImageClassificationParameters
```

Additional inference parameters
Additional inference parameters for Zero Shot Image Classification

---
## ZeroShotImageClassificationInput
```python
from zero_shot_image_classification import ZeroShotImageClassificationInput
```

Inputs for Zero Shot Image Classification inference

---
## ZeroShotImageClassificationOutputElement
```python
from zero_shot_image_classification import ZeroShotImageClassificationOutputElement
```

Outputs of inference for the Zero Shot Image Classification task

---
## __name__
```python
from object_detection import __name__
```



---
## ObjectDetectionParameters
```python
from object_detection import ObjectDetectionParameters
```

Additional inference parameters
Additional inference parameters for Object Detection

---
## ObjectDetectionInput
```python
from object_detection import ObjectDetectionInput
```

Inputs for Object Detection inference

---
## ObjectDetectionBoundingBox
```python
from object_detection import ObjectDetectionBoundingBox
```

The predicted bounding box. Coordinates are relative to the top left corner of the input
image.

---
## ObjectDetectionOutputElement
```python
from object_detection import ObjectDetectionOutputElement
```

Outputs of inference for the Object Detection task

---
## __name__
```python
from table_question_answering import __name__
```



---
## TableQuestionAnsweringInputData
```python
from table_question_answering import TableQuestionAnsweringInputData
```

One (table, question) pair to answer

---
## TableQuestionAnsweringInput
```python
from table_question_answering import TableQuestionAnsweringInput
```

Inputs for Table Question Answering inference

---
## TableQuestionAnsweringOutputElement
```python
from table_question_answering import TableQuestionAnsweringOutputElement
```

Outputs of inference for the Table Question Answering task

---
## BaseInferenceType
```python
from base import BaseInferenceType
```

Base class for all inference types.

Object is a dataclass and a dict for backward compatibility but plan is to remove the dict part in the future.

Handle parsing from dict, list and json strings in a permissive way to ensure future-compatibility (e.g. all fields
are made optional, and non-expected fields are added as dict attributes).

---
## normalize_key
```python
from base import normalize_key
```



---
## parse_obj_as_list
```python
from base import parse_obj_as_list
```

Alias to parse server response and return a single instance.

See `parse_obj` for more details.

---
## parse_obj_as_instance
```python
from base import parse_obj_as_instance
```

Alias to parse server response and return a single instance.

See `parse_obj` for more details.

---
## parse_obj
```python
from base import parse_obj
```

Parse server response as a dataclass or list of dataclasses.

To enable future-compatibility, we want to handle cases where the server return more fields than expected.
In such cases, we don't want to raise an error but still create the dataclass object. Remaining fields are
added as dict attributes.

---
## __post_init__
```python
from base import __post_init__
```



---
## __setitem__
```python
from base import __setitem__
```



---
## __setattr__
```python
from base import __setattr__
```



---
## __name__
```python
from audio_to_audio import __name__
```



---
## AudioToAudioInput
```python
from audio_to_audio import AudioToAudioInput
```

Inputs for Audio to Audio inference

---
## AudioToAudioOutputElement
```python
from audio_to_audio import AudioToAudioOutputElement
```

Outputs of inference for the Audio To Audio task
A generated audio file with its label.

---
## __name__
```python
from token_classification import __name__
```



---
## TokenClassificationParameters
```python
from token_classification import TokenClassificationParameters
```

Additional inference parameters
Additional inference parameters for Token Classification

---
## TokenClassificationInput
```python
from token_classification import TokenClassificationInput
```

Inputs for Token Classification inference

---
## TokenClassificationOutputElement
```python
from token_classification import TokenClassificationOutputElement
```

Outputs of inference for the Token Classification task

---
## Logger
```python
from __init__ import Logger
```



---
## Handler
```python
from __init__ import Handler
```



---
## patch_logging
```python
from __init__ import patch_logging
```



---
## StdLoggingHandler
```python
from __init__ import StdLoggingHandler
```

Logging intercept handler

---
## _logger_dict
```python
from __init__ import _logger_dict
```



---
## loggers_dict
```python
from __init__ import loggers_dict
```



---
## intercept
```python
from __init__ import intercept
```



---
## intercept_all
```python
from __init__ import intercept_all
```



---
## set_level
```python
from __init__ import set_level
```



---
## is_enabled_for
```python
from __init__ import is_enabled_for
```

snake_case alias for isEnabledFor

---
## get_effective_level
```python
from __init__ import get_effective_level
```

snake_case alias for getEffectiveLevel

---
## get_child
```python
from __init__ import get_child
```

snake_case alias for getChild

---
## find_caller
```python
from __init__ import find_caller
```

snake_case alias for findCaller

---
## add_handler
```python
from __init__ import add_handler
```

snake_case alias for addHandler

---
## remove_handler
```python
from __init__ import remove_handler
```

snake_case alias for removeHandler

---
## make_record
```python
from __init__ import make_record
```



---
## has_handlers
```python
from __init__ import has_handlers
```

snake_case alias for hasHandlers

---
## call_handlers
```python
from __init__ import call_handlers
```

snake_case alias for callHandlers

---
## create_lock
```python
from __init__ import create_lock
```

snake_case alias for createLock

---
## set_formatter
```python
from __init__ import set_formatter
```

snake_case alias for setFormatter

---
## handle_error
```python
from __init__ import handle_error
```

snake_case alias for handleError

---
## DummyProcess
```python
from __init__ import DummyProcess
```



---
## active_children
```python
from __init__ import active_children
```



---
## freeze_support
```python
from __init__ import freeze_support
```



---
## Namespace
```python
from __init__ import Namespace
```



---
## Array
```python
from __init__ import Array
```



---
## Value
```python
from __init__ import Value
```



---
## Manager
```python
from __init__ import Manager
```



---
## shutdown
```python
from __init__ import shutdown
```



---
## Pool
```python
from __init__ import Pool
```



---
## start
```python
from __init__ import start
```



---
## exitcode
```python
from __init__ import exitcode
```



---
## value
```python
from __init__ import value
```



---
## __name__
```python
from mp_preload import __name__
```



---
## f
```python
from mp_preload import f
```



---
## latin
```python
from __init__ import latin
```



---
## close_queue
```python
from __init__ import close_queue
```



---
## join_process
```python
from __init__ import join_process
```



---
## wait_for_handle
```python
from __init__ import wait_for_handle
```



---
## check_enough_semaphores
```python
from __init__ import check_enough_semaphores
```

Check that the system supports enough semaphores to run the test.

---
## only_run_in_spawn_testsuite
```python
from __init__ import only_run_in_spawn_testsuite
```

Returns a decorator: raises SkipTest when SM != spawn at test time.

This can be useful to save overall Python test suite execution time.
"spawn" is the universal mode available on all platforms so this limits the
decorated test to only execute within test_multiprocessing_spawn.

This would not be necessary if we refactored our test suite to split things
into other test files when they are not start method specific to be rerun
under all start methods.

---
## TestInternalDecorators
```python
from __init__ import TestInternalDecorators
```

Logic within a test suite that could errantly skip tests? Test it!

---
## TimingWrapper
```python
from __init__ import TimingWrapper
```



---
## BaseTestCase
```python
from __init__ import BaseTestCase
```



---
## get_value
```python
from __init__ import get_value
```



---
## DummyCallable
```python
from __init__ import DummyCallable
```



---
## _TestProcess
```python
from __init__ import _TestProcess
```



---
## _UpperCaser
```python
from __init__ import _UpperCaser
```



---
## _TestSubclassingProcess
```python
from __init__ import _TestSubclassingProcess
```



---
## queue_empty
```python
from __init__ import queue_empty
```



---
## queue_full
```python
from __init__ import queue_full
```



---
## _TestQueue
```python
from __init__ import _TestQueue
```



---
## _TestLock
```python
from __init__ import _TestLock
```



---
## _TestSemaphore
```python
from __init__ import _TestSemaphore
```



---
## _TestCondition
```python
from __init__ import _TestCondition
```



---
## _TestEvent
```python
from __init__ import _TestEvent
```



---
## _DummyList
```python
from __init__ import _DummyList
```



---
## _wait
```python
from __init__ import _wait
```

Ensure at least 1/max_rate seconds from last call.

---
## Bunch
```python
from __init__ import Bunch
```

A bunch of threads.

---
## AppendTrue
```python
from __init__ import AppendTrue
```



---
## _TestBarrier
```python
from __init__ import _TestBarrier
```

Tests for Barrier objects.

---
## _TestValue
```python
from __init__ import _TestValue
```



---
## _TestArray
```python
from __init__ import _TestArray
```



---
## _TestContainers
```python
from __init__ import _TestContainers
```



---
## sqr
```python
from __init__ import sqr
```



---
## mul
```python
from __init__ import mul
```



---
## raise_large_valuerror
```python
from __init__ import raise_large_valuerror
```



---
## identity
```python
from __init__ import identity
```



---
## CountedObject
```python
from __init__ import CountedObject
```



---
## SayWhenError
```python
from __init__ import SayWhenError
```



---
## exception_throwing_generator
```python
from __init__ import exception_throwing_generator
```



---
## _TestPool
```python
from __init__ import _TestPool
```



---
## raising
```python
from __init__ import raising
```



---
## unpickleable_result
```python
from __init__ import unpickleable_result
```



---
## _TestPoolWorkerErrors
```python
from __init__ import _TestPoolWorkerErrors
```



---
## _TestPoolWorkerLifetime
```python
from __init__ import _TestPoolWorkerLifetime
```



---
## FooBar
```python
from __init__ import FooBar
```



---
## baz
```python
from __init__ import baz
```



---
## IteratorProxy
```python
from __init__ import IteratorProxy
```



---
## MyManager
```python
from __init__ import MyManager
```



---
## _TestMyManager
```python
from __init__ import _TestMyManager
```



---
## get_queue
```python
from __init__ import get_queue
```



---
## QueueManager
```python
from __init__ import QueueManager
```

manager class used by server process

---
## QueueManager2
```python
from __init__ import QueueManager2
```

manager class which specifies the same interface as QueueManager

---
## _TestRemoteManager
```python
from __init__ import _TestRemoteManager
```



---
## _TestManagerRestart
```python
from __init__ import _TestManagerRestart
```



---
## _TestConnection
```python
from __init__ import _TestConnection
```



---
## _TestListener
```python
from __init__ import _TestListener
```



---
## _TestListenerClient
```python
from __init__ import _TestListenerClient
```



---
## _TestPoll
```python
from __init__ import _TestPoll
```



---
## _TestPicklingConnections
```python
from __init__ import _TestPicklingConnections
```



---
## _TestHeap
```python
from __init__ import _TestHeap
```



---
## _Foo
```python
from __init__ import _Foo
```



---
## _TestSharedCTypes
```python
from __init__ import _TestSharedCTypes
```



---
## _TestSharedMemory
```python
from __init__ import _TestSharedMemory
```



---
## _TestFinalize
```python
from __init__ import _TestFinalize
```



---
## _TestImportStar
```python
from __init__ import _TestImportStar
```



---
## _TestLogging
```python
from __init__ import _TestLogging
```



---
## _TestPollEintr
```python
from __init__ import _TestPollEintr
```



---
## TestInvalidHandle
```python
from __init__ import TestInvalidHandle
```



---
## OtherTest
```python
from __init__ import OtherTest
```



---
## ChallengeResponseTest
```python
from __init__ import ChallengeResponseTest
```



---
## initializer
```python
from __init__ import initializer
```



---
## TestInitializers
```python
from __init__ import TestInitializers
```



---
## _this_sub_process
```python
from __init__ import _this_sub_process
```



---
## _test_process
```python
from __init__ import _test_process
```



---
## _afunc
```python
from __init__ import _afunc
```



---
## pool_in_process
```python
from __init__ import pool_in_process
```



---
## _file_like
```python
from __init__ import _file_like
```



---
## TestStdinBadfiledescriptor
```python
from __init__ import TestStdinBadfiledescriptor
```



---
## TestWait
```python
from __init__ import TestWait
```



---
## TestInvalidFamily
```python
from __init__ import TestInvalidFamily
```



---
## TestFlags
```python
from __init__ import TestFlags
```



---
## TestTimeouts
```python
from __init__ import TestTimeouts
```



---
## TestNoForkBomb
```python
from __init__ import TestNoForkBomb
```



---
## TestForkAwareThreadLock
```python
from __init__ import TestForkAwareThreadLock
```



---
## TestCloseFds
```python
from __init__ import TestCloseFds
```



---
## TestIgnoreEINTR
```python
from __init__ import TestIgnoreEINTR
```



---
## TestStartMethod
```python
from __init__ import TestStartMethod
```



---
## TestResourceTracker
```python
from __init__ import TestResourceTracker
```



---
## TestSimpleQueue
```python
from __init__ import TestSimpleQueue
```



---
## TestPoolNotLeakOnFailure
```python
from __init__ import TestPoolNotLeakOnFailure
```



---
## TestSyncManagerTypes
```python
from __init__ import TestSyncManagerTypes
```

Test all the types which can be shared between a parent and a
child process by using a manager which acts as an intermediary
between them.

In the following unit-tests the base type is created in the parent
process, the @classmethod represents the worker process and the
shared object is readable and editable between the two.

# The child.
@classmethod
def _test_list(cls, obj):
    assert obj[0] == 5
    assert obj.append(6)

# The parent.
def test_list(self):
    o = self.manager.list()
    o.append(5)
    self.run_worker(self._test_list, o)
    assert o[1] == 6

---
## TestNamedResource
```python
from __init__ import TestNamedResource
```



---
## MiscTestCase
```python
from __init__ import MiscTestCase
```



---
## BaseMixin
```python
from __init__ import BaseMixin
```



---
## ProcessesMixin
```python
from __init__ import ProcessesMixin
```



---
## ManagerMixin
```python
from __init__ import ManagerMixin
```



---
## ThreadsMixin
```python
from __init__ import ThreadsMixin
```



---
## install_tests_in_module_dict
```python
from __init__ import install_tests_in_module_dict
```



---
## SemLockTests
```python
from __init__ import SemLockTests
```



---
## _resource_unlink
```python
from __init__ import _resource_unlink
```



---
## decorator
```python
from __init__ import decorator
```



---
## test_only_run_in_spawn_testsuite
```python
from __init__ import test_only_run_in_spawn_testsuite
```



---
## assertTimingAlmostEqual
```python
from __init__ import assertTimingAlmostEqual
```



---
## assertReturnsIfImplemented
```python
from __init__ import assertReturnsIfImplemented
```



---
## test_current
```python
from __init__ import test_current
```



---
## test_set_executable
```python
from __init__ import test_set_executable
```



---
## test_args_argument
```python
from __init__ import test_args_argument
```



---
## _test_args
```python
from __init__ import _test_args
```



---
## test_daemon_argument
```python
from __init__ import test_daemon_argument
```



---
## test_parent_process_attributes
```python
from __init__ import test_parent_process_attributes
```



---
## _test_send_parent_process
```python
from __init__ import _test_send_parent_process
```



---
## _test_parent_process
```python
from __init__ import _test_parent_process
```



---
## _test_create_grandchild_process
```python
from __init__ import _test_create_grandchild_process
```



---
## _test_report_parent_status
```python
from __init__ import _test_report_parent_status
```



---
## test_process
```python
from __init__ import test_process
```



---
## test_process_mainthread_native_id
```python
from __init__ import test_process_mainthread_native_id
```



---
## _test_process_mainthread_native_id
```python
from __init__ import _test_process_mainthread_native_id
```



---
## _sleep_some
```python
from __init__ import _sleep_some
```



---
## _test_sleep
```python
from __init__ import _test_sleep
```



---
## _kill_process
```python
from __init__ import _kill_process
```



---
## test_terminate
```python
from __init__ import test_terminate
```



---
## test_kill
```python
from __init__ import test_kill
```



---
## test_cpu_count
```python
from __init__ import test_cpu_count
```



---
## test_active_children
```python
from __init__ import test_active_children
```



---
## _test_recursion
```python
from __init__ import _test_recursion
```



---
## test_recursion
```python
from __init__ import test_recursion
```



---
## _test_sentinel
```python
from __init__ import _test_sentinel
```



---
## test_sentinel
```python
from __init__ import test_sentinel
```



---
## _test_close
```python
from __init__ import _test_close
```



---
## test_close
```python
from __init__ import test_close
```



---
## test_many_processes
```python
from __init__ import test_many_processes
```



---
## test_lose_target_ref
```python
from __init__ import test_lose_target_ref
```



---
## _test_child_fd_inflation
```python
from __init__ import _test_child_fd_inflation
```



---
## test_child_fd_inflation
```python
from __init__ import test_child_fd_inflation
```



---
## _test_wait_for_threads
```python
from __init__ import _test_wait_for_threads
```



---
## test_wait_for_threads
```python
from __init__ import test_wait_for_threads
```



---
## _test_error_on_stdio_flush
```python
from __init__ import _test_error_on_stdio_flush
```



---
## test_error_on_stdio_flush_1
```python
from __init__ import test_error_on_stdio_flush_1
```



---
## test_error_on_stdio_flush_2
```python
from __init__ import test_error_on_stdio_flush_2
```



---
## _sleep_and_set_event
```python
from __init__ import _sleep_and_set_event
```



---
## check_forkserver_death
```python
from __init__ import check_forkserver_death
```



---
## test_forkserver_sigint
```python
from __init__ import test_forkserver_sigint
```



---
## test_forkserver_sigkill
```python
from __init__ import test_forkserver_sigkill
```



---
## submit
```python
from __init__ import submit
```



---
## stop
```python
from __init__ import stop
```



---
## test_subclassing
```python
from __init__ import test_subclassing
```



---
## test_stderr_flush
```python
from __init__ import test_stderr_flush
```



---
## _test_stderr_flush
```python
from __init__ import _test_stderr_flush
```



---
## _test_sys_exit
```python
from __init__ import _test_sys_exit
```



---
## test_sys_exit
```python
from __init__ import test_sys_exit
```



---
## _test_put
```python
from __init__ import _test_put
```



---
## test_put
```python
from __init__ import test_put
```



---
## _test_get
```python
from __init__ import _test_get
```



---
## test_get
```python
from __init__ import test_get
```



---
## _test_fork
```python
from __init__ import _test_fork
```



---
## test_fork
```python
from __init__ import test_fork
```



---
## test_qsize
```python
from __init__ import test_qsize
```



---
## _test_task_done
```python
from __init__ import _test_task_done
```



---
## test_task_done
```python
from __init__ import test_task_done
```



---
## test_no_import_lock_contention
```python
from __init__ import test_no_import_lock_contention
```



---
## test_timeout
```python
from __init__ import test_timeout
```



---
## test_queue_feeder_donot_stop_onexc
```python
from __init__ import test_queue_feeder_donot_stop_onexc
```



---
## test_queue_feeder_on_queue_feeder_error
```python
from __init__ import test_queue_feeder_on_queue_feeder_error
```



---
## test_closed_queue_put_get_exceptions
```python
from __init__ import test_closed_queue_put_get_exceptions
```



---
## test_lock
```python
from __init__ import test_lock
```



---
## test_rlock
```python
from __init__ import test_rlock
```



---
## test_lock_context
```python
from __init__ import test_lock_context
```



---
## _test_semaphore
```python
from __init__ import _test_semaphore
```



---
## test_semaphore
```python
from __init__ import test_semaphore
```



---
## test_bounded_semaphore
```python
from __init__ import test_bounded_semaphore
```



---
## f
```python
from __init__ import f
```



---
## assertReachesEventually
```python
from __init__ import assertReachesEventually
```



---
## check_invariant
```python
from __init__ import check_invariant
```



---
## test_notify
```python
from __init__ import test_notify
```



---
## test_notify_all
```python
from __init__ import test_notify_all
```



---
## test_notify_n
```python
from __init__ import test_notify_n
```



---
## _test_waitfor_f
```python
from __init__ import _test_waitfor_f
```



---
## test_waitfor
```python
from __init__ import test_waitfor
```



---
## _test_waitfor_timeout_f
```python
from __init__ import _test_waitfor_timeout_f
```



---
## test_waitfor_timeout
```python
from __init__ import test_waitfor_timeout
```



---
## _test_wait_result
```python
from __init__ import _test_wait_result
```



---
## test_wait_result
```python
from __init__ import test_wait_result
```



---
## _test_event
```python
from __init__ import _test_event
```



---
## test_event
```python
from __init__ import test_event
```



---
## test_repr
```python
from __init__ import test_repr
```



---
## append
```python
from __init__ import append
```



---
## task
```python
from __init__ import task
```



---
## wait_for_started
```python
from __init__ import wait_for_started
```



---
## wait_for_finished
```python
from __init__ import wait_for_finished
```



---
## do_finish
```python
from __init__ import do_finish
```



---
## close
```python
from __init__ import close
```



---
## setUp
```python
from __init__ import setUp
```



---
## tearDown
```python
from __init__ import tearDown
```



---
## DummyList
```python
from __init__ import DummyList
```



---
## run_threads
```python
from __init__ import run_threads
```



---
## multipass
```python
from __init__ import multipass
```



---
## test_barrier
```python
from __init__ import test_barrier
```



---
## test_barrier_10
```python
from __init__ import test_barrier_10
```

Test that a barrier works for 10 consecutive runs

---
## _test_wait_return_f
```python
from __init__ import _test_wait_return_f
```



---
## test_wait_return
```python
from __init__ import test_wait_return
```

test the return value from barrier.wait

---
## _test_action_f
```python
from __init__ import _test_action_f
```



---
## test_action
```python
from __init__ import test_action
```

Test the 'action' callback

---
## _test_abort_f
```python
from __init__ import _test_abort_f
```



---
## test_abort
```python
from __init__ import test_abort
```

Test that an abort will put the barrier in a broken state

---
## _test_reset_f
```python
from __init__ import _test_reset_f
```



---
## test_reset
```python
from __init__ import test_reset
```

Test that a 'reset' on a barrier frees the waiting threads

---
## _test_abort_and_reset_f
```python
from __init__ import _test_abort_and_reset_f
```



---
## test_abort_and_reset
```python
from __init__ import test_abort_and_reset
```

Test that a barrier can be reset after being broken.

---
## _test_timeout_f
```python
from __init__ import _test_timeout_f
```



---
## _test_default_timeout_f
```python
from __init__ import _test_default_timeout_f
```



---
## test_default_timeout
```python
from __init__ import test_default_timeout
```

Test the barrier's default timeout

---
## test_single_thread
```python
from __init__ import test_single_thread
```



---
## _test_thousand_f
```python
from __init__ import _test_thousand_f
```



---
## test_thousand
```python
from __init__ import test_thousand
```



---
## test_value
```python
from __init__ import test_value
```



---
## test_rawvalue
```python
from __init__ import test_rawvalue
```



---
## test_getobj_getlock
```python
from __init__ import test_getobj_getlock
```



---
## test_array
```python
from __init__ import test_array
```



---
## test_array_from_size
```python
from __init__ import test_array_from_size
```



---
## test_rawarray
```python
from __init__ import test_rawarray
```



---
## test_getobj_getlock_obj
```python
from __init__ import test_getobj_getlock_obj
```



---
## test_list
```python
from __init__ import test_list
```



---
## test_list_iter
```python
from __init__ import test_list_iter
```



---
## test_list_proxy_in_list
```python
from __init__ import test_list_proxy_in_list
```



---
## test_dict
```python
from __init__ import test_dict
```



---
## test_dict_iter
```python
from __init__ import test_dict_iter
```



---
## test_dict_proxy_nested
```python
from __init__ import test_dict_proxy_nested
```



---
## test_nested_queue
```python
from __init__ import test_nested_queue
```



---
## test_namespace
```python
from __init__ import test_namespace
```



---
## __del__
```python
from __init__ import __del__
```



---
## setUpClass
```python
from __init__ import setUpClass
```



---
## tearDownClass
```python
from __init__ import tearDownClass
```



---
## test_apply
```python
from __init__ import test_apply
```



---
## test_map
```python
from __init__ import test_map
```



---
## test_starmap
```python
from __init__ import test_starmap
```



---
## test_starmap_async
```python
from __init__ import test_starmap_async
```



---
## test_map_async
```python
from __init__ import test_map_async
```



---
## test_map_async_callbacks
```python
from __init__ import test_map_async_callbacks
```



---
## test_map_unplicklable
```python
from __init__ import test_map_unplicklable
```



---
## test_map_chunksize
```python
from __init__ import test_map_chunksize
```



---
## test_map_handle_iterable_exception
```python
from __init__ import test_map_handle_iterable_exception
```



---
## test_async
```python
from __init__ import test_async
```



---
## test_async_timeout
```python
from __init__ import test_async_timeout
```



---
## test_imap
```python
from __init__ import test_imap
```



---
## test_imap_handle_iterable_exception
```python
from __init__ import test_imap_handle_iterable_exception
```



---
## test_imap_unordered
```python
from __init__ import test_imap_unordered
```



---
## test_imap_unordered_handle_iterable_exception
```python
from __init__ import test_imap_unordered_handle_iterable_exception
```



---
## test_make_pool
```python
from __init__ import test_make_pool
```



---
## test_empty_iterable
```python
from __init__ import test_empty_iterable
```



---
## test_context
```python
from __init__ import test_context
```



---
## _test_traceback
```python
from __init__ import _test_traceback
```



---
## test_traceback
```python
from __init__ import test_traceback
```



---
## _test_wrapped_exception
```python
from __init__ import _test_wrapped_exception
```



---
## test_wrapped_exception
```python
from __init__ import test_wrapped_exception
```



---
## test_map_no_failfast
```python
from __init__ import test_map_no_failfast
```



---
## test_release_task_refs
```python
from __init__ import test_release_task_refs
```



---
## test_enter
```python
from __init__ import test_enter
```



---
## test_resource_warning
```python
from __init__ import test_resource_warning
```



---
## test_async_error_callback
```python
from __init__ import test_async_error_callback
```



---
## _test_unpickleable_result
```python
from __init__ import _test_unpickleable_result
```



---
## test_pool_worker_lifetime
```python
from __init__ import test_pool_worker_lifetime
```



---
## test_pool_worker_lifetime_early_close
```python
from __init__ import test_pool_worker_lifetime_early_close
```



---
## test_pool_maxtasksperchild_invalid
```python
from __init__ import test_pool_maxtasksperchild_invalid
```



---
## test_worker_finalization_via_atexit_handler_of_multiprocessing
```python
from __init__ import test_worker_finalization_via_atexit_handler_of_multiprocessing
```



---
## g
```python
from __init__ import g
```



---
## _h
```python
from __init__ import _h
```



---
## __next__
```python
from __init__ import __next__
```



---
## test_mymanager
```python
from __init__ import test_mymanager
```



---
## test_mymanager_context
```python
from __init__ import test_mymanager_context
```



---
## test_mymanager_context_prestarted
```python
from __init__ import test_mymanager_context_prestarted
```



---
## common
```python
from __init__ import common
```



---
## _putter
```python
from __init__ import _putter
```



---
## test_remote
```python
from __init__ import test_remote
```



---
## test_rapid_restart
```python
from __init__ import test_rapid_restart
```



---
## _echo
```python
from __init__ import _echo
```



---
## test_connection
```python
from __init__ import test_connection
```



---
## test_duplex_false
```python
from __init__ import test_duplex_false
```



---
## test_spawn_close
```python
from __init__ import test_spawn_close
```



---
## test_sendbytes
```python
from __init__ import test_sendbytes
```



---
## _is_fd_assigned
```python
from __init__ import _is_fd_assigned
```



---
## _writefd
```python
from __init__ import _writefd
```



---
## test_fd_transfer
```python
from __init__ import test_fd_transfer
```



---
## test_large_fd_transfer
```python
from __init__ import test_large_fd_transfer
```



---
## _send_data_without_fd
```python
from __init__ import _send_data_without_fd
```



---
## test_missing_fd_transfer
```python
from __init__ import test_missing_fd_transfer
```



---
## test_multiple_bind
```python
from __init__ import test_multiple_bind
```



---
## test_abstract_socket
```python
from __init__ import test_abstract_socket
```



---
## test_listener_client
```python
from __init__ import test_listener_client
```



---
## test_issue14725
```python
from __init__ import test_issue14725
```



---
## test_issue16955
```python
from __init__ import test_issue16955
```



---
## test_empty_string
```python
from __init__ import test_empty_string
```



---
## _child_strings
```python
from __init__ import _child_strings
```



---
## test_strings
```python
from __init__ import test_strings
```



---
## _child_boundaries
```python
from __init__ import _child_boundaries
```



---
## test_boundaries
```python
from __init__ import test_boundaries
```



---
## _child_dont_merge
```python
from __init__ import _child_dont_merge
```



---
## test_dont_merge
```python
from __init__ import test_dont_merge
```



---
## _listener
```python
from __init__ import _listener
```



---
## _remote
```python
from __init__ import _remote
```



---
## test_pickling
```python
from __init__ import test_pickling
```



---
## child_access
```python
from __init__ import child_access
```



---
## test_access
```python
from __init__ import test_access
```



---
## test_heap
```python
from __init__ import test_heap
```



---
## test_free_from_gc
```python
from __init__ import test_free_from_gc
```



---
## _double
```python
from __init__ import _double
```



---
## test_sharedctypes
```python
from __init__ import test_sharedctypes
```



---
## test_synchronize
```python
from __init__ import test_synchronize
```



---
## test_copy
```python
from __init__ import test_copy
```



---
## _attach_existing_shmem_then_write
```python
from __init__ import _attach_existing_shmem_then_write
```



---
## _new_shm_name
```python
from __init__ import _new_shm_name
```



---
## test_shared_memory_basics
```python
from __init__ import test_shared_memory_basics
```



---
## test_shared_memory_recreate
```python
from __init__ import test_shared_memory_recreate
```



---
## test_invalid_shared_memory_cration
```python
from __init__ import test_invalid_shared_memory_cration
```



---
## test_shared_memory_pickle_unpickle
```python
from __init__ import test_shared_memory_pickle_unpickle
```



---
## test_shared_memory_pickle_unpickle_dead_object
```python
from __init__ import test_shared_memory_pickle_unpickle_dead_object
```



---
## test_shared_memory_across_processes
```python
from __init__ import test_shared_memory_across_processes
```



---
## test_shared_memory_SharedMemoryServer_ignores_sigint
```python
from __init__ import test_shared_memory_SharedMemoryServer_ignores_sigint
```



---
## test_shared_memory_SharedMemoryManager_reuses_resource_tracker
```python
from __init__ import test_shared_memory_SharedMemoryManager_reuses_resource_tracker
```



---
## test_shared_memory_SharedMemoryManager_basics
```python
from __init__ import test_shared_memory_SharedMemoryManager_basics
```



---
## test_shared_memory_ShareableList_basics
```python
from __init__ import test_shared_memory_ShareableList_basics
```



---
## test_shared_memory_ShareableList_pickling
```python
from __init__ import test_shared_memory_ShareableList_pickling
```



---
## test_shared_memory_ShareableList_pickling_dead_object
```python
from __init__ import test_shared_memory_ShareableList_pickling_dead_object
```



---
## test_shared_memory_cleaned_after_process_termination
```python
from __init__ import test_shared_memory_cleaned_after_process_termination
```



---
## _test_finalize
```python
from __init__ import _test_finalize
```



---
## test_finalize
```python
from __init__ import test_finalize
```



---
## test_thread_safety
```python
from __init__ import test_thread_safety
```



---
## get_module_names
```python
from __init__ import get_module_names
```



---
## test_import
```python
from __init__ import test_import
```



---
## test_enable_logging
```python
from __init__ import test_enable_logging
```



---
## _test_level
```python
from __init__ import _test_level
```



---
## test_level
```python
from __init__ import test_level
```



---
## _killer
```python
from __init__ import _killer
```



---
## test_poll_eintr
```python
from __init__ import test_poll_eintr
```



---
## test_invalid_handles
```python
from __init__ import test_invalid_handles
```



---
## test_deliver_challenge_auth_failure
```python
from __init__ import test_deliver_challenge_auth_failure
```



---
## test_answer_challenge_auth_failure
```python
from __init__ import test_answer_challenge_auth_failure
```



---
## create_response
```python
from __init__ import create_response
```



---
## verify_challenge
```python
from __init__ import verify_challenge
```



---
## test_challengeresponse
```python
from __init__ import test_challengeresponse
```



---
## test_manager_initializer
```python
from __init__ import test_manager_initializer
```



---
## test_pool_initializer
```python
from __init__ import test_pool_initializer
```



---
## cache
```python
from __init__ import cache
```



---
## write
```python
from __init__ import write
```



---
## flush
```python
from __init__ import flush
```



---
## test_queue_in_process
```python
from __init__ import test_queue_in_process
```



---
## test_pool_in_process
```python
from __init__ import test_pool_in_process
```



---
## test_flushing
```python
from __init__ import test_flushing
```



---
## _child_test_wait
```python
from __init__ import _child_test_wait
```



---
## test_wait
```python
from __init__ import test_wait
```



---
## _child_test_wait_socket
```python
from __init__ import _child_test_wait_socket
```



---
## test_wait_socket
```python
from __init__ import test_wait_socket
```



---
## test_wait_slow
```python
from __init__ import test_wait_slow
```



---
## test_wait_socket_slow
```python
from __init__ import test_wait_socket_slow
```



---
## test_wait_timeout
```python
from __init__ import test_wait_timeout
```



---
## signal_and_sleep
```python
from __init__ import signal_and_sleep
```



---
## test_wait_integer
```python
from __init__ import test_wait_integer
```



---
## test_neg_timeout
```python
from __init__ import test_neg_timeout
```



---
## test_invalid_family
```python
from __init__ import test_invalid_family
```



---
## test_invalid_family_win32
```python
from __init__ import test_invalid_family_win32
```



---
## run_in_grandchild
```python
from __init__ import run_in_grandchild
```



---
## run_in_child
```python
from __init__ import run_in_child
```



---
## _test_flags
```python
from __init__ import _test_flags
```



---
## _test_timeout
```python
from __init__ import _test_timeout
```



---
## test_noforkbomb
```python
from __init__ import test_noforkbomb
```



---
## child
```python
from __init__ import child
```



---
## get_high_socket_fd
```python
from __init__ import get_high_socket_fd
```



---
## _test_closefds
```python
from __init__ import _test_closefds
```



---
## test_closefd
```python
from __init__ import test_closefd
```



---
## _test_ignore
```python
from __init__ import _test_ignore
```



---
## test_ignore
```python
from __init__ import test_ignore
```



---
## _test_ignore_listener
```python
from __init__ import _test_ignore_listener
```



---
## test_ignore_listener
```python
from __init__ import test_ignore_listener
```



---
## _check_context
```python
from __init__ import _check_context
```



---
## check_context
```python
from __init__ import check_context
```



---
## test_context_check_module_types
```python
from __init__ import test_context_check_module_types
```



---
## test_set_get
```python
from __init__ import test_set_get
```



---
## test_get_all
```python
from __init__ import test_get_all
```



---
## test_preload_resources
```python
from __init__ import test_preload_resources
```



---
## test_mixed_startmethod
```python
from __init__ import test_mixed_startmethod
```



---
## _put_one_in_queue
```python
from __init__ import _put_one_in_queue
```



---
## _put_two_and_nest_once
```python
from __init__ import _put_two_and_nest_once
```



---
## test_nested_startmethod
```python
from __init__ import test_nested_startmethod
```



---
## _test_resource_tracker
```python
from __init__ import _test_resource_tracker
```



---
## check_resource_tracker_death
```python
from __init__ import check_resource_tracker_death
```



---
## test_resource_tracker_sigint
```python
from __init__ import test_resource_tracker_sigint
```



---
## test_resource_tracker_sigterm
```python
from __init__ import test_resource_tracker_sigterm
```



---
## test_resource_tracker_sigkill
```python
from __init__ import test_resource_tracker_sigkill
```



---
## _is_resource_tracker_reused
```python
from __init__ import _is_resource_tracker_reused
```



---
## test_resource_tracker_reused
```python
from __init__ import test_resource_tracker_reused
```



---
## test_too_long_name_resource
```python
from __init__ import test_too_long_name_resource
```



---
## _test_empty
```python
from __init__ import _test_empty
```



---
## test_empty
```python
from __init__ import test_empty
```



---
## test_closed
```python
from __init__ import test_closed
```



---
## test_release_unused_processes
```python
from __init__ import test_release_unused_processes
```



---
## wait_proc_exit
```python
from __init__ import wait_proc_exit
```



---
## run_worker
```python
from __init__ import run_worker
```



---
## _test_lock
```python
from __init__ import _test_lock
```



---
## _test_rlock
```python
from __init__ import _test_rlock
```



---
## _test_condition
```python
from __init__ import _test_condition
```



---
## test_condition
```python
from __init__ import test_condition
```



---
## _test_barrier
```python
from __init__ import _test_barrier
```



---
## _test_pool
```python
from __init__ import _test_pool
```



---
## test_pool
```python
from __init__ import test_pool
```



---
## _test_queue
```python
from __init__ import _test_queue
```



---
## test_queue
```python
from __init__ import test_queue
```



---
## test_joinable_queue
```python
from __init__ import test_joinable_queue
```



---
## _test_list
```python
from __init__ import _test_list
```



---
## _test_dict
```python
from __init__ import _test_dict
```



---
## _test_value
```python
from __init__ import _test_value
```



---
## _test_array
```python
from __init__ import _test_array
```



---
## _test_namespace
```python
from __init__ import _test_namespace
```



---
## test_global_named_resource_spawn
```python
from __init__ import test_global_named_resource_spawn
```



---
## test__all__
```python
from __init__ import test__all__
```



---
## test_spawn_sys_executable_none_allows_import
```python
from __init__ import test_spawn_sys_executable_none_allows_import
```



---
## setUpModule
```python
from __init__ import setUpModule
```



---
## tearDownModule
```python
from __init__ import tearDownModule
```



---
## test_semlock_subclass
```python
from __init__ import test_semlock_subclass
```



---
## spawn_check_wrapper
```python
from __init__ import spawn_check_wrapper
```



---
## func1
```python
from __init__ import func1
```



---
## func2
```python
from __init__ import func2
```



---
## NotSerializable
```python
from __init__ import NotSerializable
```

Mock unserializable object

---
## SafeQueue
```python
from __init__ import SafeQueue
```

Queue with overloaded _on_queue_feeder_error hook

---
## finalize
```python
from __init__ import finalize
```



---
## A
```python
from __init__ import A
```



---
## SpecialIterable
```python
from __init__ import SpecialIterable
```



---
## errback
```python
from __init__ import errback
```



---
## Foo
```python
from __init__ import Foo
```



---
## cb
```python
from __init__ import cb
```



---
## run_finalizers
```python
from __init__ import run_finalizers
```



---
## make_finalizers
```python
from __init__ import make_finalizers
```



---
## record
```python
from __init__ import record
```



---
## _FakeConnection
```python
from __init__ import _FakeConnection
```



---
## handler
```python
from __init__ import handler
```



---
## FailingForkProcess
```python
from __init__ import FailingForkProcess
```



---
## SemLock
```python
from __init__ import SemLock
```



---
## return_four_if_spawn
```python
from __init__ import return_four_if_spawn
```



---
## _on_queue_feeder_error
```python
from __init__ import _on_queue_feeder_error
```



---
## OptionalAttachSharedMemory
```python
from __init__ import OptionalAttachSharedMemory
```



---
## recv_bytes
```python
from __init__ import recv_bytes
```



---
## send_bytes
```python
from __init__ import send_bytes
```



---
## terminate
```python
from __init__ import terminate
```



---
## is_alive
```python
from __init__ import is_alive
```



---
## Temp
```python
from __init__ import Temp
```



---
## __name__
```python
from mp_fork_bomb import __name__
```



---
## foo
```python
from mp_fork_bomb import foo
```



---
## __name__
```python
from test_multiprocessing_main_handling import __name__
```



---
## _make_test_script
```python
from test_multiprocessing_main_handling import _make_test_script
```



---
## _make_test_zip_pkg
```python
from test_multiprocessing_main_handling import _make_test_zip_pkg
```



---
## _make_launch_script
```python
from test_multiprocessing_main_handling import _make_launch_script
```



---
## MultiProcessingCmdLineMixin
```python
from test_multiprocessing_main_handling import MultiProcessingCmdLineMixin
```



---
## SpawnCmdLineTest
```python
from test_multiprocessing_main_handling import SpawnCmdLineTest
```



---
## ForkCmdLineTest
```python
from test_multiprocessing_main_handling import ForkCmdLineTest
```



---
## ForkServerCmdLineTest
```python
from test_multiprocessing_main_handling import ForkServerCmdLineTest
```



---
## tearDownModule
```python
from test_multiprocessing_main_handling import tearDownModule
```



---
## setUp
```python
from test_multiprocessing_main_handling import setUp
```



---
## _check_output
```python
from test_multiprocessing_main_handling import _check_output
```



---
## _check_script
```python
from test_multiprocessing_main_handling import _check_script
```



---
## test_basic_script
```python
from test_multiprocessing_main_handling import test_basic_script
```



---
## test_basic_script_no_suffix
```python
from test_multiprocessing_main_handling import test_basic_script_no_suffix
```



---
## test_ipython_workaround
```python
from test_multiprocessing_main_handling import test_ipython_workaround
```



---
## test_script_compiled
```python
from test_multiprocessing_main_handling import test_script_compiled
```



---
## test_directory
```python
from test_multiprocessing_main_handling import test_directory
```



---
## test_directory_compiled
```python
from test_multiprocessing_main_handling import test_directory_compiled
```



---
## test_zipfile
```python
from test_multiprocessing_main_handling import test_zipfile
```



---
## test_zipfile_compiled
```python
from test_multiprocessing_main_handling import test_zipfile_compiled
```



---
## test_module_in_package
```python
from test_multiprocessing_main_handling import test_module_in_package
```



---
## test_module_in_package_in_zipfile
```python
from test_multiprocessing_main_handling import test_module_in_package_in_zipfile
```



---
## test_module_in_subpackage_in_zipfile
```python
from test_multiprocessing_main_handling import test_module_in_subpackage_in_zipfile
```



---
## test_package
```python
from test_multiprocessing_main_handling import test_package
```



---
## test_package_compiled
```python
from test_multiprocessing_main_handling import test_package_compiled
```



---
## __name__
```python
from test_misc import __name__
```



---
## __name__
```python
from test_processes import __name__
```



---
## __name__
```python
from test_threads import __name__
```



---
## __name__
```python
from test_manager import __name__
```



---
## find_filter_class
```python
from __init__ import find_filter_class
```

Lookup a filter by name. Return None if not found.

---
## get_filter_by_name
```python
from __init__ import get_filter_by_name
```

Return an instantiated filter.

Options are passed to the filter initializer if wanted.
Raise a ClassNotFound if not found.

---
## get_all_filters
```python
from __init__ import get_all_filters
```

Return a generator of all filter names.

---
## _replace_special
```python
from __init__ import _replace_special
```



---
## CodeTagFilter
```python
from __init__ import CodeTagFilter
```

Highlight special code tags in comments and docstrings.

Options accepted:

`codetags` : list of strings
   A list of strings that are flagged as code tags.  The default is to
   highlight ``XXX``, ``TODO``, ``FIXME``, ``BUG`` and ``NOTE``.

.. versionchanged:: 2.13
   Now recognizes ``FIXME`` by default.

---
## SymbolFilter
```python
from __init__ import SymbolFilter
```

Convert mathematical symbols such as \<longrightarrow> in Isabelle
or \longrightarrow in LaTeX into Unicode characters.

This is mostly useful for HTML or console output when you want to
approximate the source rendering you'd see in an IDE.

Options accepted:

`lang` : string
   The symbol language. Must be one of ``'isabelle'`` or
   ``'latex'``.  The default is ``'isabelle'``.

---
## KeywordCaseFilter
```python
from __init__ import KeywordCaseFilter
```

Convert keywords to lowercase or uppercase or capitalize them, which
means first letter uppercase, rest lowercase.

This can be useful e.g. if you highlight Pascal code and want to adapt the
code to your styleguide.

Options accepted:

`case` : string
   The casing to convert keywords to. Must be one of ``'lower'``,
   ``'upper'`` or ``'capitalize'``.  The default is ``'lower'``.

---
## NameHighlightFilter
```python
from __init__ import NameHighlightFilter
```

Highlight a normal Name (and Name.*) token with a different token type.

Example::

    filter = NameHighlightFilter(
        names=['foo', 'bar', 'baz'],
        tokentype=Name.Function,
    )

This would highlight the names "foo", "bar" and "baz"
as functions. `Name.Function` is the default token type.

Options accepted:

`names` : list of strings
  A list of names that should be given the different token type.
  There is no default.
`tokentype` : TokenType or string
  A token type or a string containing a token type name that is
  used for highlighting the strings in `names`.  The default is
  `Name.Function`.

---
## ErrorToken
```python
from __init__ import ErrorToken
```



---
## RaiseOnErrorTokenFilter
```python
from __init__ import RaiseOnErrorTokenFilter
```

Raise an exception when the lexer generates an error token.

Options accepted:

`excclass` : Exception class
  The exception class to raise.
  The default is `pygments.filters.ErrorToken`.

.. versionadded:: 0.8

---
## VisibleWhitespaceFilter
```python
from __init__ import VisibleWhitespaceFilter
```

Convert tabs, newlines and/or spaces to visible characters.

Options accepted:

`spaces` : string or bool
  If this is a one-character string, spaces will be replaces by this string.
  If it is another true value, spaces will be replaced by ``·`` (unicode
  MIDDLE DOT).  If it is a false value, spaces will not be replaced.  The
  default is ``False``.
`tabs` : string or bool
  The same as for `spaces`, but the default replacement character is ``»``
  (unicode RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK).  The default value
  is ``False``.  Note: this will not work if the `tabsize` option for the
  lexer is nonzero, as tabs will already have been expanded then.
`tabsize` : int
  If tabs are to be replaced by this filter (see the `tabs` option), this
  is the total number of characters that a tab should be expanded to.
  The default is ``8``.
`newlines` : string or bool
  The same as for `spaces`, but the default replacement character is ``¶``
  (unicode PILCROW SIGN).  The default value is ``False``.
`wstokentype` : bool
  If true, give whitespace the special `Whitespace` token type.  This allows
  styling the visible whitespace differently (e.g. greyed out), but it can
  disrupt background colors.  The default is ``True``.

.. versionadded:: 0.8

---
## GobbleFilter
```python
from __init__ import GobbleFilter
```

Gobbles source code lines (eats initial characters).

This filter drops the first ``n`` characters off every line of code.  This
may be useful when the source code fed to the lexer is indented by a fixed
amount of space that isn't desired in the output.

Options accepted:

`n` : int
   The number of characters to gobble.

.. versionadded:: 1.2

---
## TokenMergeFilter
```python
from __init__ import TokenMergeFilter
```

Merges consecutive tokens with the same token type in the output
stream of a lexer.

.. versionadded:: 1.2

---
## gobble
```python
from __init__ import gobble
```



---
## replacefunc
```python
from __init__ import replacefunc
```



---
## __name__
```python
from soong import __name__
```

pygments.lexers.soong
~~~~~~~~~~~~~~~~~~~~~

Lexers for Soong (Android.bp Blueprint) files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SoongLexer
```python
from soong import SoongLexer
```



---
## __name__
```python
from c_like import __name__
```

pygments.lexers.c_like
~~~~~~~~~~~~~~~~~~~~~~

Lexers for other C-like languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PikeLexer
```python
from c_like import PikeLexer
```

For `Pike <http://pike.lysator.liu.se/>`_ source code.

---
## NesCLexer
```python
from c_like import NesCLexer
```

For `nesC <https://github.com/tinyos/nesc>`_ source code with preprocessor
directives.

---
## ClayLexer
```python
from c_like import ClayLexer
```

For Clay source.

---
## ECLexer
```python
from c_like import ECLexer
```

For eC source code with preprocessor directives.

---
## ValaLexer
```python
from c_like import ValaLexer
```

For Vala source code with preprocessor directives.

---
## CudaLexer
```python
from c_like import CudaLexer
```

For NVIDIA CUDA™ source.

---
## SwigLexer
```python
from c_like import SwigLexer
```

For `SWIG <http://www.swig.org/>`_ source code.

---
## MqlLexer
```python
from c_like import MqlLexer
```

For `MQL4 <http://docs.mql4.com/>`_ and
`MQL5 <http://www.mql5.com/en/docs>`_ source code.

---
## ArduinoLexer
```python
from c_like import ArduinoLexer
```

For `Arduino(tm) <https://arduino.cc/>`_ source.

This is an extension of the CppLexer, as the Arduino® Language is a superset
of C++

---
## CharmciLexer
```python
from c_like import CharmciLexer
```

For `Charm++ <https://charm.cs.illinois.edu>`_ interface files (.ci).

---
## OmgIdlLexer
```python
from c_like import OmgIdlLexer
```

Lexer for Object Management Group Interface Definition Language.

---
## PromelaLexer
```python
from c_like import PromelaLexer
```

For the Promela language used with SPIN.

---
## get_tokens_unprocessed
```python
from c_like import get_tokens_unprocessed
```



---
## analyse_text
```python
from c_like import analyse_text
```



---
## __name__
```python
from ampl import __name__
```

pygments.lexers.ampl
~~~~~~~~~~~~~~~~~~~~

Lexers for the AMPL language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AmplLexer
```python
from ampl import AmplLexer
```

For AMPL source code.

---
## __name__
```python
from agile import __name__
```

pygments.lexers.agile
~~~~~~~~~~~~~~~~~~~~~

Just export lexer classes previously contained in this module.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from graphics import __name__
```

pygments.lexers.graphics
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for computer graphics and plotting related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GLShaderLexer
```python
from graphics import GLShaderLexer
```

GLSL (OpenGL Shader) lexer.

---
## HLSLShaderLexer
```python
from graphics import HLSLShaderLexer
```

HLSL (Microsoft Direct3D Shader) lexer.

---
## PostScriptLexer
```python
from graphics import PostScriptLexer
```

Lexer for PostScript files.

---
## AsymptoteLexer
```python
from graphics import AsymptoteLexer
```

For Asymptote source code.

---
## _shortened
```python
from graphics import _shortened
```



---
## _shortened_many
```python
from graphics import _shortened_many
```



---
## GnuplotLexer
```python
from graphics import GnuplotLexer
```

For Gnuplot plotting scripts.

---
## PovrayLexer
```python
from graphics import PovrayLexer
```

For Persistence of Vision Raytracer files.

---
## get_tokens_unprocessed
```python
from graphics import get_tokens_unprocessed
```



---
## analyse_text
```python
from graphics import analyse_text
```

POVRAY is similar to JSON/C, but the combination of camera and
light_source is probably not very likely elsewhere. HLSL or GLSL
are similar (GLSL even has #version), but they miss #declare, and
light_source/camera are not keywords anywhere else -- it's fair
to assume though that any POVRAY scene must have a camera and
lightsource.

---
## __name__
```python
from hdl import __name__
```

pygments.lexers.hdl
~~~~~~~~~~~~~~~~~~~

Lexers for hardware descriptor languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VerilogLexer
```python
from hdl import VerilogLexer
```

For verilog source code with preprocessor directives.

---
## SystemVerilogLexer
```python
from hdl import SystemVerilogLexer
```

Extends verilog lexer to recognise all SystemVerilog keywords from IEEE
1800-2009 standard.

---
## VhdlLexer
```python
from hdl import VhdlLexer
```

For VHDL source code.

---
## analyse_text
```python
from hdl import analyse_text
```

Verilog code will use one of reg/wire/assign for sure, and that
is not common elsewhere.

---
## __name__
```python
from ecl import __name__
```

pygments.lexers.ecl
~~~~~~~~~~~~~~~~~~~

Lexers for the ECL language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ECLLexer
```python
from ecl import ECLLexer
```

Lexer for the declarative big-data ECL language.

---
## analyse_text
```python
from ecl import analyse_text
```

This is very difficult to guess relative to other business languages.
-> in conjunction with BEGIN/END seems relatively rare though.

---
## __name__
```python
from futhark import __name__
```

pygments.lexers.futhark
~~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Futhark language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FutharkLexer
```python
from futhark import FutharkLexer
```

A Futhark lexer

---
## __name__
```python
from ada import __name__
```

pygments.lexers.ada
~~~~~~~~~~~~~~~~~~~

Lexers for Ada family languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AdaLexer
```python
from ada import AdaLexer
```

For Ada source code.

---
## __name__
```python
from _postgres_builtins import __name__
```

pygments.lexers._postgres_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Self-updating data files for PostgreSQL lexer.

Run with `python -I` to update itself.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## update_myself
```python
from _postgres_builtins import update_myself
```



---
## parse_keywords
```python
from _postgres_builtins import parse_keywords
```



---
## parse_datatypes
```python
from _postgres_builtins import parse_datatypes
```



---
## parse_pseudos
```python
from _postgres_builtins import parse_pseudos
```



---
## update_consts
```python
from _postgres_builtins import update_consts
```



---
## VCTreeStatusLexer
```python
from console import VCTreeStatusLexer
```

For colorizing output of version control status commands, like "hg
status" or "svn status".

---
## PyPyLogLexer
```python
from console import PyPyLogLexer
```

Lexer for PyPy log files.

---
## __name__
```python
from mime import __name__
```

pygments.lexers.mime
~~~~~~~~~~~~~~~~~~~~

Lexer for Multipurpose Internet Mail Extensions (MIME) data.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MIMELexer
```python
from mime import MIMELexer
```

Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is
designed to process nested multipart data.

It assumes that the given data contains both header and body (and is
split at an empty line). If no valid header is found, then the entire data
will be treated as body.

Additional options accepted:

`MIME-max-level`
    Max recursion level for nested MIME structure. Any negative number
    would treated as unlimited. (default: -1)

`Content-Type`
    Treat the data as a specific content type. Useful when header is
    missing, or this lexer would try to parse from header. (default:
    `text/plain`)

`Multipart-Boundary`
    Set the default multipart boundary delimiter. This option is only used
    when `Content-Type` is `multipart` and header is missing. This lexer
    would try to parse from header by default. (default: None)

`Content-Transfer-Encoding`
    Treat the data as a specific encoding. Or this lexer would try to parse
    from header by default. (default: None)

---
## __init__
```python
from mime import __init__
```



---
## get_header_tokens
```python
from mime import get_header_tokens
```



---
## get_body_tokens
```python
from mime import get_body_tokens
```



---
## get_bodypart_tokens
```python
from mime import get_bodypart_tokens
```



---
## store_content_type
```python
from mime import store_content_type
```



---
## get_content_type_subtokens
```python
from mime import get_content_type_subtokens
```



---
## store_content_transfer_encoding
```python
from mime import store_content_transfer_encoding
```



---
## __name__
```python
from _lua_builtins import __name__
```

pygments.lexers._lua_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file contains the names and modules of lua functions
It is able to re-generate itself, but for adding new functions you
probably have to add some callbacks (see function module_callbacks).

Do not edit the MODULES dict by hand.

Run with `python -I` to regenerate.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## module_callbacks
```python
from _lua_builtins import module_callbacks
```



---
## get_newest_version
```python
from _lua_builtins import get_newest_version
```



---
## get_lua_functions
```python
from _lua_builtins import get_lua_functions
```



---
## get_function_module
```python
from _lua_builtins import get_function_module
```



---
## regenerate
```python
from _lua_builtins import regenerate
```



---
## run
```python
from _lua_builtins import run
```



---
## is_in_coroutine_module
```python
from _lua_builtins import is_in_coroutine_module
```



---
## is_in_modules_module
```python
from _lua_builtins import is_in_modules_module
```



---
## is_in_string_module
```python
from _lua_builtins import is_in_string_module
```



---
## is_in_table_module
```python
from _lua_builtins import is_in_table_module
```



---
## is_in_math_module
```python
from _lua_builtins import is_in_math_module
```



---
## is_in_io_module
```python
from _lua_builtins import is_in_io_module
```



---
## is_in_os_module
```python
from _lua_builtins import is_in_os_module
```



---
## is_in_debug_module
```python
from _lua_builtins import is_in_debug_module
```



---
## __name__
```python
from capnproto import __name__
```

pygments.lexers.capnproto
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Cap'n Proto schema language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CapnProtoLexer
```python
from capnproto import CapnProtoLexer
```

For Cap'n Proto source.

---
## __name__
```python
from nimrod import __name__
```

pygments.lexers.nimrod
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Nim language (formerly known as Nimrod).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NimrodLexer
```python
from nimrod import NimrodLexer
```

For Nim source code.

---
## underscorize
```python
from nimrod import underscorize
```



---
## __name__
```python
from rebol import __name__
```

pygments.lexers.rebol
~~~~~~~~~~~~~~~~~~~~~

Lexers for the REBOL and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RebolLexer
```python
from rebol import RebolLexer
```

A REBOL lexer.

---
## RedLexer
```python
from rebol import RedLexer
```

A Red-language lexer.

---
## word_callback
```python
from rebol import word_callback
```



---
## analyse_text
```python
from rebol import analyse_text
```

Check if code contains REBOL header and so it probably not R code

---
## __name__
```python
from objective import __name__
```

pygments.lexers.objective
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Objective-C family languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## objective
```python
from objective import objective
```

Generate a subclass of baselexer that accepts the Objective-C syntax
extensions.

---
## ObjectiveCLexer
```python
from objective import ObjectiveCLexer
```

For Objective-C source code with preprocessor directives.

---
## ObjectiveCppLexer
```python
from objective import ObjectiveCppLexer
```

For Objective-C++ source code with preprocessor directives.

---
## LogosLexer
```python
from objective import LogosLexer
```

For Logos + Objective-C source code with preprocessor directives.

---
## SwiftLexer
```python
from objective import SwiftLexer
```

For Swift source.

---
## GeneratedObjectiveCVariant
```python
from objective import GeneratedObjectiveCVariant
```

Implements Objective-C syntax on top of an existing C family lexer.

---
## analyse_text
```python
from objective import analyse_text
```



---
## get_tokens_unprocessed
```python
from objective import get_tokens_unprocessed
```



---
## __name__
```python
from sas import __name__
```

pygments.styles.sas
~~~~~~~~~~~~~~~~~~~

Style inspired by SAS' enhanced program editor. Note This is not
meant to be a complete style. It's merely meant to mimic SAS'
program editor syntax highlighting.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SASLexer
```python
from sas import SASLexer
```

For SAS files.

---
## __name__
```python
from _qlik_builtins import __name__
```

pygments.lexers._qlik_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Qlik builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from phix import __name__
```

pygments.lexers.phix
~~~~~~~~~~~~~~~~~~~~

Lexers for Phix.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PhixLexer
```python
from phix import PhixLexer
```

Pygments Lexer for Phix files (.exw).
See http://phix.x10.mx

---
## __name__
```python
from graphql import __name__
```

pygments.lexers.graphql
~~~~~~~~~~~~~~~~~~~~~~~

Lexer for GraphQL, an open-source data query and manipulation
language for APIs.

More information:
https://graphql.org/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GraphQLLexer
```python
from graphql import GraphQLLexer
```

Lexer for GraphQL syntax

---
## __name__
```python
from usd import __name__
```

pygments.lexers.usd
~~~~~~~~~~~~~~~~~~~

The module that parses Pixar's Universal Scene Description file format.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _keywords
```python
from usd import _keywords
```



---
## UsdLexer
```python
from usd import UsdLexer
```

A lexer that parses Pixar's Universal Scene Description file format.

---
## __name__
```python
from crystal import __name__
```

pygments.lexers.crystal
~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Crystal.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CrystalLexer
```python
from crystal import CrystalLexer
```

For Crystal source code.

---
## heredoc_callback
```python
from crystal import heredoc_callback
```



---
## gen_crystalstrings_rules
```python
from crystal import gen_crystalstrings_rules
```



---
## __name__
```python
from verifpal import __name__
```

pygments.lexers.verifpal
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Verifpal languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VerifpalLexer
```python
from verifpal import VerifpalLexer
```

For Verifpal code.

---
## __name__
```python
from _sourcemod_builtins import __name__
```

pygments.lexers._sourcemod_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file contains the names of SourceMod functions.

Do not edit the FUNCTIONS list by hand.

Run with `python -I` to regenerate.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Opener
```python
from _sourcemod_builtins import Opener
```



---
## get_version
```python
from _sourcemod_builtins import get_version
```



---
## get_sm_functions
```python
from _sourcemod_builtins import get_sm_functions
```



---
## regenerate
```python
from _sourcemod_builtins import regenerate
```



---
## run
```python
from _sourcemod_builtins import run
```



---
## __name__
```python
from ldap import __name__
```

pygments.lexers.ldap
~~~~~~~~~~~~~~~~~~~~

Pygments lexers for LDAP.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LdifLexer
```python
from ldap import LdifLexer
```

Lexer for LDIF

---
## LdaprcLexer
```python
from ldap import LdaprcLexer
```

Lexer for OpenLDAP configuration files.

---
## __name__
```python
from verification import __name__
```

pygments.lexers.verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Intermediate Verification Languages (IVLs).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BoogieLexer
```python
from verification import BoogieLexer
```

For Boogie source code.

---
## SilverLexer
```python
from verification import SilverLexer
```

For Silver source code.

---
## __name__
```python
from erlang import __name__
```

pygments.lexers.erlang
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Erlang.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ErlangLexer
```python
from erlang import ErlangLexer
```

For the Erlang functional programming language.

---
## ErlangShellLexer
```python
from erlang import ErlangShellLexer
```

Shell sessions in erl (for Erlang code).

---
## gen_elixir_string_rules
```python
from erlang import gen_elixir_string_rules
```



---
## gen_elixir_sigstr_rules
```python
from erlang import gen_elixir_sigstr_rules
```



---
## ElixirLexer
```python
from erlang import ElixirLexer
```

For the Elixir language.

---
## ElixirConsoleLexer
```python
from erlang import ElixirConsoleLexer
```

For Elixir interactive console (iex) output like:

.. sourcecode:: iex

    iex> [head | tail] = [1,2,3]
    [1,2,3]
    iex> head
    1
    iex> tail
    [2,3]
    iex> [head | tail]
    [1,2,3]
    iex> length [head | tail]
    3

---
## get_tokens_unprocessed
```python
from erlang import get_tokens_unprocessed
```



---
## gen_elixir_sigil_rules
```python
from erlang import gen_elixir_sigil_rules
```



---
## __name__
```python
from apdlexer import __name__
```

pygments.lexers.apdlexer
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for ANSYS Parametric Design Language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## apdlexer
```python
from apdlexer import apdlexer
```

For APDL source code.

---
## __name__
```python
from slash import __name__
```

pygments.lexers.slash
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Slash programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SlashLanguageLexer
```python
from slash import SlashLanguageLexer
```



---
## SlashLexer
```python
from slash import SlashLexer
```

Lexer for the Slash programming language.

---
## move_state
```python
from slash import move_state
```



---
## right_angle_bracket
```python
from slash import right_angle_bracket
```



---
## __init__
```python
from slash import __init__
```



---
## __name__
```python
from boa import __name__
```

pygments.lexers.boa
~~~~~~~~~~~~~~~~~~~

Lexers for the Boa language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BoaLexer
```python
from boa import BoaLexer
```

Lexer for the Boa language.

---
## __name__
```python
from elpi import __name__
```

pygments.lexers.elpi
~~~~~~~~~~~~~~~~~~~~

Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ElpiLexer
```python
from elpi import ElpiLexer
```

Lexer for the Elpi programming language.

---
## __name__
```python
from maxima import __name__
```

pygments.lexers.maxima
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the computer algebra system Maxima.

Derived from pygments/lexers/algebra.py.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MaximaLexer
```python
from maxima import MaximaLexer
```

A Maxima lexer.
Derived from pygments.lexers.MuPADLexer.

---
## analyse_text
```python
from maxima import analyse_text
```



---
## __name__
```python
from chapel import __name__
```

pygments.lexers.chapel
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Chapel language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ChapelLexer
```python
from chapel import ChapelLexer
```

For Chapel source.

---
## __name__
```python
from configs import __name__
```

pygments.lexers.configs
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for configuration file formats.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## IniLexer
```python
from configs import IniLexer
```

Lexer for configuration files in INI style.

---
## DesktopLexer
```python
from configs import DesktopLexer
```

Lexer for .desktop files.

---
## SystemdLexer
```python
from configs import SystemdLexer
```

Lexer for systemd unit files.

---
## RegeditLexer
```python
from configs import RegeditLexer
```

Lexer for Windows Registry files produced by regedit.

---
## PropertiesLexer
```python
from configs import PropertiesLexer
```

Lexer for configuration files in Java's properties format.

Note: trailing whitespace counts as part of the value as per spec

---
## _rx_indent
```python
from configs import _rx_indent
```



---
## KconfigLexer
```python
from configs import KconfigLexer
```

For Linux-style Kconfig files.

---
## Cfengine3Lexer
```python
from configs import Cfengine3Lexer
```

Lexer for CFEngine3 policy files.

---
## ApacheConfLexer
```python
from configs import ApacheConfLexer
```

Lexer for configuration files following the Apache config file
format.

---
## SquidConfLexer
```python
from configs import SquidConfLexer
```

Lexer for squid configuration files.

---
## NginxConfLexer
```python
from configs import NginxConfLexer
```

Lexer for Nginx configuration files.

---
## LighttpdConfLexer
```python
from configs import LighttpdConfLexer
```

Lexer for Lighttpd configuration files.

---
## DockerLexer
```python
from configs import DockerLexer
```

Lexer for Docker configuration files.

---
## TerraformLexer
```python
from configs import TerraformLexer
```

Lexer for terraformi ``.tf`` files.

---
## TermcapLexer
```python
from configs import TermcapLexer
```

Lexer for termcap database source.

This is very simple and minimal.

---
## TerminfoLexer
```python
from configs import TerminfoLexer
```

Lexer for terminfo database source.

This is very simple and minimal.

---
## PkgConfigLexer
```python
from configs import PkgConfigLexer
```

Lexer for pkg-config
(see also `manual page <http://linux.die.net/man/1/pkg-config>`_).

---
## PacmanConfLexer
```python
from configs import PacmanConfLexer
```

Lexer for pacman.conf.

Actually, IniLexer works almost fine for this format,
but it yield error token. It is because pacman.conf has
a form without assignment like:

    UseSyslog
    Color
    TotalDownload
    CheckSpace
    VerbosePkgLists

These are flags to switch on.

---
## AugeasLexer
```python
from configs import AugeasLexer
```

Lexer for Augeas.

---
## TOMLLexer
```python
from configs import TOMLLexer
```

Lexer for TOML, a simple language for config files.

---
## NestedTextLexer
```python
from configs import NestedTextLexer
```

Lexer for *NextedText*, a human-friendly data format.

.. versionchanged:: 2.16
    Added support for *NextedText* v3.0.

---
## SingularityLexer
```python
from configs import SingularityLexer
```

Lexer for Singularity definition files.

---
## UnixConfigLexer
```python
from configs import UnixConfigLexer
```

Lexer for Unix/Linux config files using colon-separated values, e.g.

* ``/etc/group``
* ``/etc/passwd``
* ``/etc/shadow``

---
## analyse_text
```python
from configs import analyse_text
```

This is a quite simple script file, but there are a few keywords
which seem unique to this language.

---
## call_indent
```python
from configs import call_indent
```



---
## do_indent
```python
from configs import do_indent
```



---
## heredoc_callback
```python
from configs import heredoc_callback
```



---
## CleanLexer
```python
from clean import CleanLexer
```

Lexer for the general purpose, state-of-the-art, pure and lazy functional
programming language Clean.

.. versionadded: 2.2

---
## __name__
```python
from mojo import __name__
```

pygments.lexers.mojo
~~~~~~~~~~~~~~~~~~~~

Lexers for Mojo and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MojoLexer
```python
from mojo import MojoLexer
```

For Mojo source code (version 24.2.1).

---
## innerstring_rules
```python
from mojo import innerstring_rules
```



---
## fstring_rules
```python
from mojo import fstring_rules
```



---
## analyse_text
```python
from mojo import analyse_text
```



---
## __name__
```python
from jslt import __name__
```

pygments.lexers.jslt
~~~~~~~~~~~~~~~~~~~~

Lexers for the JSLT language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## JSLTLexer
```python
from jslt import JSLTLexer
```

For JSLT source.

---
## __name__
```python
from ul4 import __name__
```

pygments.lexers.ul4
~~~~~~~~~~~~~~~~~~~

Lexer for the UL4 templating language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## UL4Lexer
```python
from ul4 import UL4Lexer
```

Generic lexer for UL4.

---
## HTMLUL4Lexer
```python
from ul4 import HTMLUL4Lexer
```

Lexer for UL4 embedded in HTML.

---
## XMLUL4Lexer
```python
from ul4 import XMLUL4Lexer
```

Lexer for UL4 embedded in XML.

---
## CSSUL4Lexer
```python
from ul4 import CSSUL4Lexer
```

Lexer for UL4 embedded in CSS.

---
## JavascriptUL4Lexer
```python
from ul4 import JavascriptUL4Lexer
```

Lexer for UL4 embedded in Javascript.

---
## PythonUL4Lexer
```python
from ul4 import PythonUL4Lexer
```

Lexer for UL4 embedded in Python.

---
## __init__
```python
from ul4 import __init__
```



---
## __name__
```python
from qvt import __name__
```

pygments.lexers.qvt
~~~~~~~~~~~~~~~~~~~

Lexer for QVT Operational language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## QVToLexer
```python
from qvt import QVToLexer
```

For the QVT Operational Mapping language.

Reference for implementing this: «Meta Object Facility (MOF) 2.0
Query/View/Transformation Specification», Version 1.1 - January 2011
(https://www.omg.org/spec/QVT/1.1/), see §8.4, «Concrete Syntax» in
particular.

Notable tokens assignments:

- Name.Class is assigned to the identifier following any of the following
  keywords: metamodel, class, exception, primitive, enum, transformation
  or library

- Name.Function is assigned to the names of mappings and queries

- Name.Builtin.Pseudo is assigned to the pre-defined variables 'this',
  'self' and 'result'.

---
## __name__
```python
from inferno import __name__
```

pygments.lexers.inferno
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Inferno os and all the related stuff.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LimboLexer
```python
from inferno import LimboLexer
```

Lexer for Limbo programming language

TODO:
    - maybe implement better var declaration highlighting
    - some simple syntax error highlighting

---
## analyse_text
```python
from inferno import analyse_text
```



---
## __name__
```python
from tlb import __name__
```

pygments.lexers.tlb
~~~~~~~~~~~~~~~~~~~

Lexers for TL-b.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TlbLexer
```python
from tlb import TlbLexer
```

For TL-b source code.

---
## __name__
```python
from nix import __name__
```

pygments.lexers.nix
~~~~~~~~~~~~~~~~~~~

Lexers for the NixOS Nix language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NixLexer
```python
from nix import NixLexer
```

For the Nix language.

---
## analyse_text
```python
from nix import analyse_text
```



---
## __name__
```python
from wren import __name__
```

pygments.lexers.wren
~~~~~~~~~~~~~~~~~~~~

Lexer for Wren.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## WrenLexer
```python
from wren import WrenLexer
```

For Wren source code, version 0.4.0.

---
## __name__
```python
from parasail import __name__
```

pygments.lexers.parasail
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for ParaSail.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ParaSailLexer
```python
from parasail import ParaSailLexer
```

For ParaSail source code.

---
## __name__
```python
from smithy import __name__
```

pygments.lexers.smithy
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Smithy IDL.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SmithyLexer
```python
from smithy import SmithyLexer
```

For Smithy IDL

---
## __name__
```python
from _css_builtins import __name__
```

pygments.lexers._css_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file is autogenerated by scripts/get_css_properties.py

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from graphviz import __name__
```

Allow graphviz-formatted graphs to be included inline in generated documents.

---
## GraphvizLexer
```python
from graphviz import GraphvizLexer
```

For graphviz DOT graph description language.

---
## __name__
```python
from r import __name__
```

pygments.lexers.r
~~~~~~~~~~~~~~~~~

Lexers for the R/S languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RConsoleLexer
```python
from r import RConsoleLexer
```

For R console transcripts or R CMD BATCH output files.

---
## SLexer
```python
from r import SLexer
```

For S, S-plus, and R source code.

---
## RdLexer
```python
from r import RdLexer
```

Pygments Lexer for R documentation (Rd) files

This is a very minimal implementation, highlighting little more
than the macros. A description of Rd syntax is found in `Writing R
Extensions <http://cran.r-project.org/doc/manuals/R-exts.html>`_
and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.

---
## get_tokens_unprocessed
```python
from r import get_tokens_unprocessed
```



---
## analyse_text
```python
from r import analyse_text
```



---
## __name__
```python
from pawn import __name__
```

pygments.lexers.pawn
~~~~~~~~~~~~~~~~~~~~

Lexers for the Pawn languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SourcePawnLexer
```python
from pawn import SourcePawnLexer
```

For SourcePawn source code with preprocessor directives.

---
## PawnLexer
```python
from pawn import PawnLexer
```

For Pawn source code.

---
## __init__
```python
from pawn import __init__
```



---
## get_tokens_unprocessed
```python
from pawn import get_tokens_unprocessed
```



---
## analyse_text
```python
from pawn import analyse_text
```

This is basically C. There is a keyword which doesn't exist in C
though and is nearly unique to this language.

---
## __name__
```python
from dns import __name__
```

pygments.lexers.dns
~~~~~~~~~~~~~~~~~~~

Pygments lexers for DNS

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DnsZoneLexer
```python
from dns import DnsZoneLexer
```

Lexer for DNS zone file

---
## analyse_text
```python
from dns import analyse_text
```



---
## __name__
```python
from idl import __name__
```

pygments.lexers.idl
~~~~~~~~~~~~~~~~~~~

Lexers for IDL.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## IDLLexer
```python
from idl import IDLLexer
```

Pygments Lexer for IDL (Interactive Data Language).

---
## analyse_text
```python
from idl import analyse_text
```

endelse seems to be unique to IDL, endswitch is rare at least.

---
## __name__
```python
from iolang import __name__
```

pygments.lexers.iolang
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Io language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## IoLexer
```python
from iolang import IoLexer
```

For Io (a small, prototype-based programming language) source.

---
## __name__
```python
from amdgpu import __name__
```

pygments.lexers.amdgpu
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the AMDGPU ISA assembly.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AMDGPULexer
```python
from amdgpu import AMDGPULexer
```

For AMD GPU assembly.

---
## __name__
```python
from dsls import __name__
```

pygments.lexers.dsls
~~~~~~~~~~~~~~~~~~~~

Lexers for various domain-specific languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ProtoBufLexer
```python
from dsls import ProtoBufLexer
```

Lexer for Protocol Buffer definition files.

---
## ThriftLexer
```python
from dsls import ThriftLexer
```

For Thrift interface definitions.

---
## ZeekLexer
```python
from dsls import ZeekLexer
```

For Zeek scripts.

---
## PuppetLexer
```python
from dsls import PuppetLexer
```

For Puppet configuration DSL.

---
## RslLexer
```python
from dsls import RslLexer
```

RSL is the formal specification
language used in RAISE (Rigorous Approach to Industrial Software Engineering)
method.

---
## MscgenLexer
```python
from dsls import MscgenLexer
```

For Mscgen files.

---
## VGLLexer
```python
from dsls import VGLLexer
```

For SampleManager VGL source code.

---
## AlloyLexer
```python
from dsls import AlloyLexer
```

For Alloy source code.

---
## PanLexer
```python
from dsls import PanLexer
```

Lexer for pan source files.

Based on tcsh lexer.

---
## CrmshLexer
```python
from dsls import CrmshLexer
```

Lexer for crmsh configuration files for Pacemaker clusters.

---
## FlatlineLexer
```python
from dsls import FlatlineLexer
```

Lexer for Flatline expressions.

---
## SnowballLexer
```python
from dsls import SnowballLexer
```

Lexer for Snowball source code.

---
## analyse_text
```python
from dsls import analyse_text
```

Check for the most common text in the beginning of a RSL file.

---
## __init__
```python
from dsls import __init__
```



---
## _reset_stringescapes
```python
from dsls import _reset_stringescapes
```



---
## _string
```python
from dsls import _string
```



---
## _stringescapes
```python
from dsls import _stringescapes
```



---
## get_tokens_unprocessed
```python
from dsls import get_tokens_unprocessed
```



---
## callback
```python
from dsls import callback
```



---
## __name__
```python
from supercollider import __name__
```

pygments.lexers.supercollider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for SuperCollider

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SuperColliderLexer
```python
from supercollider import SuperColliderLexer
```

For SuperCollider source code.

---
## analyse_text
```python
from supercollider import analyse_text
```

We're searching for a common function and a unique keyword here.

---
## __name__
```python
from comal import __name__
```

pygments.lexers.comal
~~~~~~~~~~~~~~~~~~~~~

Lexer for COMAL-80.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Comal80Lexer
```python
from comal import Comal80Lexer
```

For COMAL-80 source code.

---
## __name__
```python
from solidity import __name__
```

pygments.lexers.solidity
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Solidity.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SolidityLexer
```python
from solidity import SolidityLexer
```

For Solidity source code.

---
## __name__
```python
from _scilab_builtins import __name__
```

pygments.lexers._scilab_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Builtin list for the ScilabLexer.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## extract_completion
```python
from _scilab_builtins import extract_completion
```



---
## __name__
```python
from _lilypond_builtins import __name__
```

pygments.lexers._lilypond_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LilyPond builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from lisp import __name__
```

pygments.lexers.lisp
~~~~~~~~~~~~~~~~~~~~

Lexers for Lispy languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SchemeLexer
```python
from lisp import SchemeLexer
```

A Scheme lexer.

This parser is checked with pastes from the LISP pastebin
at http://paste.lisp.org/ to cover as much syntax as possible.

It supports the full Scheme syntax as defined in R5RS.

---
## CommonLispLexer
```python
from lisp import CommonLispLexer
```

A Common Lisp lexer.

---
## HyLexer
```python
from lisp import HyLexer
```

Lexer for Hy source code.

---
## RacketLexer
```python
from lisp import RacketLexer
```

Lexer for Racket source code (formerly
known as PLT Scheme).

---
## NewLispLexer
```python
from lisp import NewLispLexer
```

For newLISP source code (version 10.3.0).

---
## EmacsLispLexer
```python
from lisp import EmacsLispLexer
```

An ELisp lexer, parsing a stream and outputting the tokens
needed to highlight elisp code.

---
## ShenLexer
```python
from lisp import ShenLexer
```

Lexer for Shen source code.

---
## CPSALexer
```python
from lisp import CPSALexer
```

A CPSA lexer based on the CPSA language as of version 2.2.12

---
## XtlangLexer
```python
from lisp import XtlangLexer
```

An xtlang lexer for the Extempore programming environment.

This is a mixture of Scheme and xtlang, really. Keyword lists are
taken from the Extempore Emacs mode
(https://github.com/extemporelang/extempore-emacs-mode)

---
## FennelLexer
```python
from lisp import FennelLexer
```

A lexer for the Fennel programming language.

Fennel compiles to Lua, so all the Lua builtins are recognized as well
as the special forms that are particular to the Fennel compiler.

---
## JanetLexer
```python
from lisp import JanetLexer
```

A lexer for the Janet programming language.
    

---
## get_tokens_unprocessed
```python
from lisp import get_tokens_unprocessed
```



---
## decimal_cb
```python
from lisp import decimal_cb
```



---
## __init__
```python
from lisp import __init__
```



---
## analyse_text
```python
from lisp import analyse_text
```



---
## _multi_escape
```python
from lisp import _multi_escape
```



---
## _relevant
```python
from lisp import _relevant
```



---
## _process_declarations
```python
from lisp import _process_declarations
```



---
## _process_symbols
```python
from lisp import _process_symbols
```



---
## _process_declaration
```python
from lisp import _process_declaration
```



---
## _process_signature
```python
from lisp import _process_signature
```



---
## __name__
```python
from j import __name__
```

pygments.lexers.j
~~~~~~~~~~~~~~~~~

Lexer for the J programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## JLexer
```python
from j import JLexer
```

For J source code.

---
## __name__
```python
from blueprint import __name__
```

pygments.lexers.blueprint
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Blueprint UI markup language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BlueprintLexer
```python
from blueprint import BlueprintLexer
```

For Blueprint UI markup.

---
## __name__
```python
from mosel import __name__
```

pygments.lexers.mosel
~~~~~~~~~~~~~~~~~~~~~

Lexers for the mosel language.
http://www.fico.com/en/products/fico-xpress-optimization

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MoselLexer
```python
from mosel import MoselLexer
```

For the Mosel optimization language.

---
## __name__
```python
from _vbscript_builtins import __name__
```

pygments.lexers._vbscript_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These are manually translated lists from
http://www.indusoft.com/pdf/VBScript%20Reference.pdf.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from _openedge_builtins import __name__
```

pygments.lexers._openedge_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Builtin list for the OpenEdgeLexer.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from smalltalk import __name__
```

pygments.lexers.smalltalk
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Smalltalk and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SmalltalkLexer
```python
from smalltalk import SmalltalkLexer
```

For Smalltalk syntax.
Contributed by Stefan Matthias Aust.
Rewritten by Nils Winter.

---
## NewspeakLexer
```python
from smalltalk import NewspeakLexer
```

For Newspeak syntax.

---
## __name__
```python
from spice import __name__
```

pygments.lexers.spice
~~~~~~~~~~~~~~~~~~~~~

Lexers for the Spice programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SpiceLexer
```python
from spice import SpiceLexer
```

For Spice source.

---
## __name__
```python
from monte import __name__
```

pygments.lexers.monte
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Monte programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MonteLexer
```python
from monte import MonteLexer
```

Lexer for the Monte programming language.

---
## __name__
```python
from _luau_builtins import __name__
```

pygments.lexers._luau_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Includes the builtins for Luau and Roblox.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from webmisc import __name__
```

pygments.lexers.webmisc
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for misc. web stuff.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DuelLexer
```python
from webmisc import DuelLexer
```

Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks.

---
## XQueryLexer
```python
from webmisc import XQueryLexer
```

An XQuery lexer, parsing a stream and outputting the tokens needed to
highlight xquery code.

---
## QmlLexer
```python
from webmisc import QmlLexer
```

For QML files.

---
## CirruLexer
```python
from webmisc import CirruLexer
```

* using ``()`` for expressions, but restricted in a same line
* using ``""`` for strings, with ``\`` for escaping chars
* using ``$`` as folding operator
* using ``,`` as unfolding operator
* using indentations for nested blocks

---
## SlimLexer
```python
from webmisc import SlimLexer
```

For Slim markup.

---
## punctuation_root_callback
```python
from webmisc import punctuation_root_callback
```



---
## operator_root_callback
```python
from webmisc import operator_root_callback
```



---
## popstate_tag_callback
```python
from webmisc import popstate_tag_callback
```



---
## popstate_xmlcomment_callback
```python
from webmisc import popstate_xmlcomment_callback
```



---
## popstate_kindtest_callback
```python
from webmisc import popstate_kindtest_callback
```



---
## popstate_callback
```python
from webmisc import popstate_callback
```



---
## pushstate_element_content_starttag_callback
```python
from webmisc import pushstate_element_content_starttag_callback
```



---
## pushstate_cdata_section_callback
```python
from webmisc import pushstate_cdata_section_callback
```



---
## pushstate_starttag_callback
```python
from webmisc import pushstate_starttag_callback
```



---
## pushstate_operator_order_callback
```python
from webmisc import pushstate_operator_order_callback
```



---
## pushstate_operator_map_callback
```python
from webmisc import pushstate_operator_map_callback
```



---
## pushstate_operator_root_validate
```python
from webmisc import pushstate_operator_root_validate
```



---
## pushstate_operator_root_validate_withmode
```python
from webmisc import pushstate_operator_root_validate_withmode
```



---
## pushstate_operator_processing_instruction_callback
```python
from webmisc import pushstate_operator_processing_instruction_callback
```



---
## pushstate_element_content_processing_instruction_callback
```python
from webmisc import pushstate_element_content_processing_instruction_callback
```



---
## pushstate_element_content_cdata_section_callback
```python
from webmisc import pushstate_element_content_cdata_section_callback
```



---
## pushstate_operator_cdata_section_callback
```python
from webmisc import pushstate_operator_cdata_section_callback
```



---
## pushstate_element_content_xmlcomment_callback
```python
from webmisc import pushstate_element_content_xmlcomment_callback
```



---
## pushstate_operator_xmlcomment_callback
```python
from webmisc import pushstate_operator_xmlcomment_callback
```



---
## pushstate_kindtest_callback
```python
from webmisc import pushstate_kindtest_callback
```



---
## pushstate_operator_kindtestforpi_callback
```python
from webmisc import pushstate_operator_kindtestforpi_callback
```



---
## pushstate_operator_kindtest_callback
```python
from webmisc import pushstate_operator_kindtest_callback
```



---
## pushstate_occurrenceindicator_kindtest_callback
```python
from webmisc import pushstate_occurrenceindicator_kindtest_callback
```



---
## pushstate_operator_starttag_callback
```python
from webmisc import pushstate_operator_starttag_callback
```



---
## pushstate_operator_root_callback
```python
from webmisc import pushstate_operator_root_callback
```



---
## pushstate_operator_root_construct_callback
```python
from webmisc import pushstate_operator_root_construct_callback
```



---
## pushstate_root_callback
```python
from webmisc import pushstate_root_callback
```



---
## pushstate_operator_attribute_callback
```python
from webmisc import pushstate_operator_attribute_callback
```



---
## __name__
```python
from teal import __name__
```

pygments.lexers.teal
~~~~~~~~~~~~~~~~~~~~

Lexer for TEAL.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TealLexer
```python
from teal import TealLexer
```

For the Transaction Execution Approval Language (TEAL)

For more information about the grammar, see:
https://github.com/algorand/go-algorand/blob/master/data/transactions/logic/assembler.go

---
## __name__
```python
from c_cpp import __name__
```

pygments.lexers.c_cpp
~~~~~~~~~~~~~~~~~~~~~

Lexers for C/C++ languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CFamilyLexer
```python
from c_cpp import CFamilyLexer
```

For C family source code.  This is used as a base class to avoid repetitious
definitions.

---
## CLexer
```python
from c_cpp import CLexer
```

For C source code with preprocessor directives.

Additional options accepted:

`stdlibhighlighting`
    Highlight common types found in the C/C++ standard library (e.g. `size_t`).
    (default: ``True``).

`c99highlighting`
    Highlight common types found in the C99 standard library (e.g. `int8_t`).
    Actually, this includes all fixed-width integer types.
    (default: ``True``).

`c11highlighting`
    Highlight atomic types found in the C11 standard library (e.g. `atomic_bool`).
    (default: ``True``).

`platformhighlighting`
    Highlight common types found in the platform SDK headers (e.g. `clockid_t` on Linux).
    (default: ``True``).

---
## CppLexer
```python
from c_cpp import CppLexer
```

For C++ source code with preprocessor directives.

Additional options accepted:

`stdlibhighlighting`
    Highlight common types found in the C/C++ standard library (e.g. `size_t`).
    (default: ``True``).

`c99highlighting`
    Highlight common types found in the C99 standard library (e.g. `int8_t`).
    Actually, this includes all fixed-width integer types.
    (default: ``True``).

`c11highlighting`
    Highlight atomic types found in the C11 standard library (e.g. `atomic_bool`).
    (default: ``True``).

`platformhighlighting`
    Highlight common types found in the platform SDK headers (e.g. `clockid_t` on Linux).
    (default: ``True``).

---
## __init__
```python
from c_cpp import __init__
```



---
## get_tokens_unprocessed
```python
from c_cpp import get_tokens_unprocessed
```



---
## analyse_text
```python
from c_cpp import analyse_text
```



---
## __name__
```python
from perl import __name__
```

pygments.lexers.perl
~~~~~~~~~~~~~~~~~~~~

Lexers for Perl, Raku and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PerlLexer
```python
from perl import PerlLexer
```

For Perl source code.

---
## Perl6Lexer
```python
from perl import Perl6Lexer
```

For Raku (a.k.a. Perl 6) source code.

---
## analyse_text
```python
from perl import analyse_text
```



---
## _build_word_match
```python
from perl import _build_word_match
```



---
## brackets_callback
```python
from perl import brackets_callback
```



---
## opening_brace_callback
```python
from perl import opening_brace_callback
```



---
## closing_brace_callback
```python
from perl import closing_brace_callback
```



---
## embedded_perl6_callback
```python
from perl import embedded_perl6_callback
```



---
## __init__
```python
from perl import __init__
```



---
## callback
```python
from perl import callback
```



---
## strip_pod
```python
from perl import strip_pod
```



---
## __name__
```python
from robotframework import __name__
```

pygments.lexers.robotframework
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Robot Framework.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## normalize
```python
from robotframework import normalize
```



---
## RobotFrameworkLexer
```python
from robotframework import RobotFrameworkLexer
```

For Robot Framework test data.

Supports both space and pipe separated plain text formats.

---
## VariableTokenizer
```python
from robotframework import VariableTokenizer
```



---
## RowTokenizer
```python
from robotframework import RowTokenizer
```



---
## RowSplitter
```python
from robotframework import RowSplitter
```



---
## Tokenizer
```python
from robotframework import Tokenizer
```



---
## Comment
```python
from robotframework import Comment
```



---
## Setting
```python
from robotframework import Setting
```



---
## ImportSetting
```python
from robotframework import ImportSetting
```



---
## TestCaseSetting
```python
from robotframework import TestCaseSetting
```



---
## KeywordSetting
```python
from robotframework import KeywordSetting
```



---
## Variable
```python
from robotframework import Variable
```



---
## KeywordCall
```python
from robotframework import KeywordCall
```



---
## GherkinTokenizer
```python
from robotframework import GherkinTokenizer
```



---
## TemplatedKeywordCall
```python
from robotframework import TemplatedKeywordCall
```



---
## ForLoop
```python
from robotframework import ForLoop
```



---
## _Table
```python
from robotframework import _Table
```



---
## UnknownTable
```python
from robotframework import UnknownTable
```



---
## VariableTable
```python
from robotframework import VariableTable
```



---
## SettingTable
```python
from robotframework import SettingTable
```



---
## TestCaseTable
```python
from robotframework import TestCaseTable
```



---
## KeywordTable
```python
from robotframework import KeywordTable
```



---
## VariableSplitter
```python
from robotframework import VariableSplitter
```



---
## __init__
```python
from robotframework import __init__
```



---
## get_tokens_unprocessed
```python
from robotframework import get_tokens_unprocessed
```



---
## tokenize
```python
from robotframework import tokenize
```



---
## _tokenize
```python
from robotframework import _tokenize
```



---
## _start_table
```python
from robotframework import _start_table
```



---
## split
```python
from robotframework import split
```



---
## _split_from_spaces
```python
from robotframework import _split_from_spaces
```



---
## _split_from_pipes
```python
from robotframework import _split_from_pipes
```



---
## _is_assign
```python
from robotframework import _is_assign
```



---
## _continues
```python
from robotframework import _continues
```



---
## _is_empty
```python
from robotframework import _is_empty
```



---
## end_row
```python
from robotframework import end_row
```



---
## _tokenizer_class
```python
from robotframework import _tokenizer_class
```



---
## _is_setting
```python
from robotframework import _is_setting
```



---
## _is_template
```python
from robotframework import _is_template
```



---
## _is_for_loop
```python
from robotframework import _is_for_loop
```



---
## set_test_template
```python
from robotframework import set_test_template
```



---
## set_default_template
```python
from robotframework import set_default_template
```



---
## _is_template_set
```python
from robotframework import _is_template_set
```



---
## get_replaced_base
```python
from robotframework import get_replaced_base
```



---
## _finalize
```python
from robotframework import _finalize
```



---
## _has_list_or_dict_variable_index
```python
from robotframework import _has_list_or_dict_variable_index
```



---
## _split
```python
from robotframework import _split
```



---
## _scanning_list_variable_index
```python
from robotframework import _scanning_list_variable_index
```



---
## _find_variable
```python
from robotframework import _find_variable
```



---
## _find_start_index
```python
from robotframework import _find_start_index
```



---
## _start_index_is_ok
```python
from robotframework import _start_index_is_ok
```



---
## _is_escaped
```python
from robotframework import _is_escaped
```



---
## _variable_state
```python
from robotframework import _variable_state
```



---
## _is_list_or_dict_variable
```python
from robotframework import _is_list_or_dict_variable
```



---
## _internal_variable_start_state
```python
from robotframework import _internal_variable_start_state
```



---
## _waiting_list_variable_index_state
```python
from robotframework import _waiting_list_variable_index_state
```



---
## _list_variable_index_state
```python
from robotframework import _list_variable_index_state
```



---
## __name__
```python
from textfmts import __name__
```

pygments.lexers.textfmts
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for various text formats.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## IrcLogsLexer
```python
from textfmts import IrcLogsLexer
```

Lexer for IRC logs in *irssi*, *xchat* or *weechat* style.

---
## GettextLexer
```python
from textfmts import GettextLexer
```

Lexer for Gettext catalog files.

---
## HttpLexer
```python
from textfmts import HttpLexer
```

Lexer for HTTP sessions.

---
## TodotxtLexer
```python
from textfmts import TodotxtLexer
```

Lexer for Todo.txt todo list format.

---
## NotmuchLexer
```python
from textfmts import NotmuchLexer
```

For Notmuch email text format.

Additional options accepted:

`body_lexer`
    If given, highlight the contents of the message body with the specified
    lexer, else guess it according to the body content (default: ``None``).

---
## KernelLogLexer
```python
from textfmts import KernelLogLexer
```

For Linux Kernel log ("dmesg") output.

---
## get_tokens_unprocessed
```python
from textfmts import get_tokens_unprocessed
```

Reset the content-type state.

---
## header_callback
```python
from textfmts import header_callback
```



---
## continuous_header_callback
```python
from textfmts import continuous_header_callback
```



---
## content_callback
```python
from textfmts import content_callback
```



---
## analyse_text
```python
from textfmts import analyse_text
```



---
## _highlight_code
```python
from textfmts import _highlight_code
```



---
## __init__
```python
from textfmts import __init__
```



---
## __name__
```python
from jsonnet import __name__
```

pygments.lexers.jsonnet
~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Jsonnet data templating language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## string_rules
```python
from jsonnet import string_rules
```



---
## quoted_field_name
```python
from jsonnet import quoted_field_name
```



---
## JsonnetLexer
```python
from jsonnet import JsonnetLexer
```

Lexer for Jsonnet source code.

---
## __name__
```python
from cplint import __name__
```

pygments.lexers.cplint
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the cplint language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CplintLexer
```python
from cplint import CplintLexer
```

Lexer for cplint files, including CP-logic, Logic Programs with Annotated
Disjunctions, Distributional Clauses syntax, ProbLog, DTProbLog.

---
## __name__
```python
from jsx import __name__
```

pygments.lexers.jsx
~~~~~~~~~~~~~~~~~~~

Lexers for JSX (React).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## JsxLexer
```python
from jsx import JsxLexer
```

For JavaScript Syntax Extension (JSX).
    

---
## __name__
```python
from prolog import __name__
```

pygments.lexers.prolog
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Prolog and Prolog-like languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PrologLexer
```python
from prolog import PrologLexer
```

Lexer for Prolog files.

---
## LogtalkLexer
```python
from prolog import LogtalkLexer
```

For Logtalk source code.

---
## analyse_text
```python
from prolog import analyse_text
```



---
## __name__
```python
from rnc import __name__
```

pygments.lexers.rnc
~~~~~~~~~~~~~~~~~~~

Lexer for Relax-NG Compact syntax

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RNCCompactLexer
```python
from rnc import RNCCompactLexer
```

For RelaxNG-compact syntax.

---
## __name__
```python
from wowtoc import __name__
```

pygments.lexers.wowtoc
~~~~~~~~~~~~~~~~~~~~~~

Lexer for World of Warcraft TOC files

TOC files describe game addons.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _create_tag_line_pattern
```python
from wowtoc import _create_tag_line_pattern
```



---
## _create_tag_line_token
```python
from wowtoc import _create_tag_line_token
```



---
## WoWTocLexer
```python
from wowtoc import WoWTocLexer
```

Lexer for World of Warcraft TOC files.

---
## analyse_text
```python
from wowtoc import analyse_text
```



---
## __name__
```python
from _julia_builtins import __name__
```

pygments.lexers._julia_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julia builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from algebra import __name__
```

pygments.lexers.algebra
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for computer algebra systems.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GAPLexer
```python
from algebra import GAPLexer
```

For GAP source code.

---
## GAPConsoleLexer
```python
from algebra import GAPConsoleLexer
```

For GAP console sessions. Modeled after JuliaConsoleLexer.

---
## MathematicaLexer
```python
from algebra import MathematicaLexer
```

Lexer for Mathematica source code.

---
## MuPADLexer
```python
from algebra import MuPADLexer
```

A MuPAD lexer.
Contributed by Christopher Creutzig <christopher@creutzig.de>.

---
## BCLexer
```python
from algebra import BCLexer
```

A BC lexer.

---
## analyse_text
```python
from algebra import analyse_text
```



---
## get_tokens_unprocessed
```python
from algebra import get_tokens_unprocessed
```



---
## _multi_escape
```python
from algebra import _multi_escape
```



---
## __name__
```python
from typoscript import __name__
```

pygments.lexers.typoscript
~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for TypoScript

`TypoScriptLexer`
    A TypoScript lexer.

`TypoScriptCssDataLexer`
    Lexer that highlights markers, constants and registers within css.

`TypoScriptHtmlDataLexer`
    Lexer that highlights markers, constants and registers within html tags.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TypoScriptCssDataLexer
```python
from typoscript import TypoScriptCssDataLexer
```

Lexer that highlights markers, constants and registers within css blocks.

---
## TypoScriptHtmlDataLexer
```python
from typoscript import TypoScriptHtmlDataLexer
```

Lexer that highlights markers, constants and registers within html tags.

---
## TypoScriptLexer
```python
from typoscript import TypoScriptLexer
```

Lexer for TypoScript code.

---
## __name__
```python
from automation import __name__
```

pygments.lexers.automation
~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for automation scripting languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AutohotkeyLexer
```python
from automation import AutohotkeyLexer
```

For autohotkey source code.

---
## AutoItLexer
```python
from automation import AutoItLexer
```

For AutoIt files.

AutoIt is a freeware BASIC-like scripting language
designed for automating the Windows GUI and general scripting

---
## __name__
```python
from sieve import __name__
```

pygments.lexers.sieve
~~~~~~~~~~~~~~~~~~~~~

Lexer for Sieve file format.

https://tools.ietf.org/html/rfc5228
https://tools.ietf.org/html/rfc5173
https://tools.ietf.org/html/rfc5229
https://tools.ietf.org/html/rfc5230
https://tools.ietf.org/html/rfc5232
https://tools.ietf.org/html/rfc5235
https://tools.ietf.org/html/rfc5429
https://tools.ietf.org/html/rfc8580

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SieveLexer
```python
from sieve import SieveLexer
```

Lexer for sieve format.

---
## __name__
```python
from esoteric import __name__
```

pygments.lexers.esoteric
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for esoteric languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BrainfuckLexer
```python
from esoteric import BrainfuckLexer
```

Lexer for the esoteric BrainFuck language.

---
## BefungeLexer
```python
from esoteric import BefungeLexer
```

Lexer for the esoteric Befunge language.

---
## CAmkESLexer
```python
from esoteric import CAmkESLexer
```

Basic lexer for the input language for the CAmkES component platform.

---
## CapDLLexer
```python
from esoteric import CapDLLexer
```

Basic lexer for CapDL.

The source of the primary tool that reads such specifications is available
at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this
lexer only supports a subset of the grammar. For example, identifiers can
shadow type names, but these instances are currently incorrectly
highlighted as types. Supporting this would need a stateful lexer that is
considered unnecessarily complex for now.

---
## RedcodeLexer
```python
from esoteric import RedcodeLexer
```

A simple Redcode lexer based on ICWS'94.
Contributed by Adam Blinkinsop <blinks@acm.org>.

---
## AheuiLexer
```python
from esoteric import AheuiLexer
```

Aheui is esoteric language based on Korean alphabets.

---
## analyse_text
```python
from esoteric import analyse_text
```

It's safe to assume that a program which mostly consists of + -
and < > is brainfuck.

---
## CypherLexer
```python
from graph import CypherLexer
```

For Cypher Query Language

For the Cypher version in Neo4j 3.3

---
## __name__
```python
from html import __name__
```

Module for formatting output data in HTML.

---
## HtmlLexer
```python
from html import HtmlLexer
```

For HTML 4 and XHTML 1 markup. Nested JavaScript and CSS is highlighted
by the appropriate lexer.

---
## DtdLexer
```python
from html import DtdLexer
```

A lexer for DTDs (Document Type Definitions).

---
## XmlLexer
```python
from html import XmlLexer
```

Generic lexer for XML (eXtensible Markup Language).

---
## XsltLexer
```python
from html import XsltLexer
```

A lexer for XSLT.

---
## HamlLexer
```python
from html import HamlLexer
```

For Haml markup.

---
## ScamlLexer
```python
from html import ScamlLexer
```

For Scaml markup.  Scaml is Haml for Scala.

---
## PugLexer
```python
from html import PugLexer
```

For Pug markup.
Pug is a variant of Scaml, see:
http://scalate.fusesource.org/documentation/scaml-reference.html

---
## UrlEncodedLexer
```python
from html import UrlEncodedLexer
```

Lexer for urlencoded data

---
## analyse_text
```python
from html import analyse_text
```



---
## get_tokens_unprocessed
```python
from html import get_tokens_unprocessed
```



---
## __name__
```python
from _php_builtins import __name__
```

pygments.lexers._php_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file loads the function names and their modules from the
php webpage and generates itself.

Run with `python -I` to regenerate.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## get_php_functions
```python
from _php_builtins import get_php_functions
```



---
## get_php_references
```python
from _php_builtins import get_php_references
```



---
## regenerate
```python
from _php_builtins import regenerate
```



---
## run
```python
from _php_builtins import run
```



---
## __name__
```python
from shell import __name__
```

pygments.lexers.shell
~~~~~~~~~~~~~~~~~~~~~

Lexers for various shells.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BashLexer
```python
from shell import BashLexer
```

Lexer for (ba|k|z|)sh shell scripts.

---
## SlurmBashLexer
```python
from shell import SlurmBashLexer
```

Lexer for (ba|k|z|)sh Slurm scripts.

---
## ShellSessionBaseLexer
```python
from shell import ShellSessionBaseLexer
```

Base lexer for shell sessions.

.. versionadded:: 2.1

---
## BashSessionLexer
```python
from shell import BashSessionLexer
```

Lexer for Bash shell sessions, i.e. command lines, including a
prompt, interspersed with output.

---
## BatchLexer
```python
from shell import BatchLexer
```

Lexer for the DOS/Windows Batch file format.

---
## MSDOSSessionLexer
```python
from shell import MSDOSSessionLexer
```

Lexer for MS DOS shell sessions, i.e. command lines, including a
prompt, interspersed with output.

---
## TcshLexer
```python
from shell import TcshLexer
```

Lexer for tcsh scripts.

---
## TcshSessionLexer
```python
from shell import TcshSessionLexer
```

Lexer for Tcsh sessions, i.e. command lines, including a
prompt, interspersed with output.

---
## PowerShellLexer
```python
from shell import PowerShellLexer
```

For Windows PowerShell code.

---
## PowerShellSessionLexer
```python
from shell import PowerShellSessionLexer
```

Lexer for PowerShell sessions, i.e. command lines, including a
prompt, interspersed with output.

---
## FishShellLexer
```python
from shell import FishShellLexer
```

Lexer for Fish shell scripts.

---
## ExeclineLexer
```python
from shell import ExeclineLexer
```

Lexer for Laurent Bercot's execline language.

---
## analyse_text
```python
from shell import analyse_text
```



---
## get_tokens_unprocessed
```python
from shell import get_tokens_unprocessed
```



---
## _make_begin_state
```python
from shell import _make_begin_state
```



---
## _make_follow_state
```python
from shell import _make_follow_state
```



---
## _make_arithmetic_state
```python
from shell import _make_arithmetic_state
```



---
## _make_call_state
```python
from shell import _make_call_state
```



---
## _make_label_state
```python
from shell import _make_label_state
```



---
## _make_redirect_state
```python
from shell import _make_redirect_state
```



---
## __name__
```python
from scripting import __name__
```

pygments.lexers.scripting
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for scripting and embedded languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LuaLexer
```python
from scripting import LuaLexer
```

For Lua source code.

Additional options accepted:

`func_name_highlighting`
    If given and ``True``, highlight builtin function names
    (default: ``True``).
`disabled_modules`
    If given, must be a list of module names whose function names
    should not be highlighted. By default all modules are highlighted.

    To get a list of allowed modules have a look into the
    `_lua_builtins` module:

    .. sourcecode:: pycon

        >>> from pygments.lexers._lua_builtins import MODULES
        >>> MODULES.keys()
        ['string', 'coroutine', 'modules', 'io', 'basic', ...]

---
## _luau_make_expression
```python
from scripting import _luau_make_expression
```



---
## _luau_make_expression_special
```python
from scripting import _luau_make_expression_special
```



---
## LuauLexer
```python
from scripting import LuauLexer
```

For Luau source code.

Additional options accepted:

`include_luau_builtins`
    If given and ``True``, automatically highlight Luau builtins
    (default: ``True``).
`include_roblox_builtins`
    If given and ``True``, automatically highlight Roblox-specific builtins
    (default: ``False``).
`additional_builtins`
    If given, must be a list of additional builtins to highlight.
`disabled_builtins`
    If given, must be a list of builtins that will not be highlighted.

---
## MoonScriptLexer
```python
from scripting import MoonScriptLexer
```

For MoonScript source code.

---
## ChaiscriptLexer
```python
from scripting import ChaiscriptLexer
```

For ChaiScript source code.

---
## LSLLexer
```python
from scripting import LSLLexer
```

For Second Life's Linden Scripting Language source code.

---
## AppleScriptLexer
```python
from scripting import AppleScriptLexer
```

For AppleScript source code,
including `AppleScript Studio
<http://developer.apple.com/documentation/AppleScript/
Reference/StudioReference>`_.
Contributed by Andreas Amann <aamann@mac.com>.

---
## RexxLexer
```python
from scripting import RexxLexer
```

Rexx is a scripting language available for
a wide range of different platforms with its roots found on mainframe
systems. It is popular for I/O- and data based tasks and can act as glue
language to bind different applications together.

---
## MOOCodeLexer
```python
from scripting import MOOCodeLexer
```

For MOOCode (the MOO scripting language).

---
## HybrisLexer
```python
from scripting import HybrisLexer
```

For Hybris source code.

---
## EasytrieveLexer
```python
from scripting import EasytrieveLexer
```

Easytrieve Plus is a programming language for extracting, filtering and
converting sequential data. Furthermore it can layout data for reports.
It is mainly used on mainframe platforms and can access several of the
mainframe's native file formats. It is somewhat comparable to awk.

---
## JclLexer
```python
from scripting import JclLexer
```

Job Control Language (JCL)
is a scripting language used on mainframe platforms to instruct the system
on how to run a batch job or start a subsystem. It is somewhat
comparable to MS DOS batch and Unix shell scripts.

---
## MiniScriptLexer
```python
from scripting import MiniScriptLexer
```

For MiniScript source code.

---
## __init__
```python
from scripting import __init__
```



---
## get_tokens_unprocessed
```python
from scripting import get_tokens_unprocessed
```



---
## _c
```python
from scripting import _c
```



---
## analyse_text
```python
from scripting import analyse_text
```

Recognize JCL job by header.

---
## isCommentLine
```python
from scripting import isCommentLine
```



---
## isEmptyLine
```python
from scripting import isEmptyLine
```



---
## __name__
```python
from gsql import __name__
```

pygments.lexers.gsql
~~~~~~~~~~~~~~~~~~~~

Lexers for TigerGraph GSQL graph query language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GSQLLexer
```python
from gsql import GSQLLexer
```

For GSQL queries (version 3.x).

---
## __name__
```python
from gdscript import __name__
```

pygments.lexers.gdscript
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for GDScript.

Modified by Daniel J. Ramirez <djrmuv@gmail.com> based on the original
python.py.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GDScriptLexer
```python
from gdscript import GDScriptLexer
```

For GDScript source code.

---
## innerstring_rules
```python
from gdscript import innerstring_rules
```



---
## analyse_text
```python
from gdscript import analyse_text
```



---
## __name__
```python
from ambient import __name__
```

pygments.lexers.ambient
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for AmbientTalk language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AmbientTalkLexer
```python
from ambient import AmbientTalkLexer
```

Lexer for AmbientTalk source code.

---
## __name__
```python
from arrow import __name__
```



---
## ArrowLexer
```python
from arrow import ArrowLexer
```

Lexer for Arrow

---
## __name__
```python
from oberon import __name__
```

pygments.lexers.oberon
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Oberon family languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ComponentPascalLexer
```python
from oberon import ComponentPascalLexer
```

For Component Pascal source code.

---
## analyse_text
```python
from oberon import analyse_text
```

The only other lexer using .cp is the C++ one, so we check if for
a few common Pascal keywords here. Those are unfortunately quite
common across various business languages as well.

---
## __name__
```python
from _stata_builtins import __name__
```

pygments.lexers._stata_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Builtins for Stata

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from floscript import __name__
```

pygments.lexers.floscript
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for FloScript

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FloScriptLexer
```python
from floscript import FloScriptLexer
```

For FloScript configuration language source code.

---
## innerstring_rules
```python
from floscript import innerstring_rules
```



---
## __name__
```python
from resource import __name__
```

pygments.lexers.resource
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for resource definition files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ResourceLexer
```python
from resource import ResourceLexer
```

Lexer for ICU Resource bundles.
    

---
## analyse_text
```python
from resource import analyse_text
```



---
## _fn_matches
```python
from __init__ import _fn_matches
```

Return whether the supplied file name fn matches pattern filename.

---
## _load_lexers
```python
from __init__ import _load_lexers
```

Load a lexer (and all others in the module too).

---
## get_all_lexers
```python
from __init__ import get_all_lexers
```

Return a generator of tuples in the form ``(name, aliases,
filenames, mimetypes)`` of all know lexers.

If *plugins* is true (the default), plugin lexers supplied by entrypoints
are also returned.  Otherwise, only builtin ones are considered.

---
## find_lexer_class
```python
from __init__ import find_lexer_class
```

Return the `Lexer` subclass that with the *name* attribute as given by
the *name* argument.

---
## find_lexer_class_by_name
```python
from __init__ import find_lexer_class_by_name
```

Return the `Lexer` subclass that has `alias` in its aliases list, without
instantiating it.

Like `get_lexer_by_name`, but does not instantiate the class.

Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
found.

.. versionadded:: 2.2

---
## get_lexer_by_name
```python
from __init__ import get_lexer_by_name
```

Return an instance of a `Lexer` subclass that has `alias` in its
aliases list. The lexer is given the `options` at its
instantiation.

Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is
found.

---
## load_lexer_from_file
```python
from __init__ import load_lexer_from_file
```

Load a lexer from a file.

This method expects a file located relative to the current working
directory, which contains a Lexer class. By default, it expects the
Lexer to be name CustomLexer; you can specify your own class name
as the second argument to this function.

Users should be very careful with the input, because this method
is equivalent to running eval on the input file.

Raises ClassNotFound if there are any problems importing the Lexer.

.. versionadded:: 2.2

---
## find_lexer_class_for_filename
```python
from __init__ import find_lexer_class_for_filename
```

Get a lexer for a filename.

If multiple lexers match the filename pattern, use ``analyse_text()`` to
figure out which one is more appropriate.

Returns None if not found.

---
## get_lexer_for_filename
```python
from __init__ import get_lexer_for_filename
```

Get a lexer for a filename.

Return a `Lexer` subclass instance that has a filename pattern
matching `fn`. The lexer is given the `options` at its
instantiation.

Raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename
is found.

If multiple lexers match the filename pattern, use their ``analyse_text()``
methods to figure out which one is more appropriate.

---
## get_lexer_for_mimetype
```python
from __init__ import get_lexer_for_mimetype
```

Return a `Lexer` subclass instance that has `mime` in its mimetype
list. The lexer is given the `options` at its instantiation.

Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype
is found.

---
## _iter_lexerclasses
```python
from __init__ import _iter_lexerclasses
```

Return an iterator over all lexer classes.

---
## guess_lexer_for_filename
```python
from __init__ import guess_lexer_for_filename
```

As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames`
or `alias_filenames` that matches `filename` are taken into consideration.

:exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
handle the content.

---
## guess_lexer
```python
from __init__ import guess_lexer
```

Return a `Lexer` subclass instance that's guessed from the text in
`text`. For that, the :meth:`.analyse_text()` method of every known lexer
class is called with the text as argument, and the lexer which returned the
highest value will be instantiated and returned.

:exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can
handle the content.

---
## _automodule
```python
from __init__ import _automodule
```

Automatically import formatters.

---
## get_rating
```python
from __init__ import get_rating
```



---
## type_sort
```python
from __init__ import type_sort
```



---
## __name__
```python
from d import __name__
```

pygments.lexers.d
~~~~~~~~~~~~~~~~~

Lexers for D languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DLexer
```python
from d import DLexer
```

For D source.

---
## CrocLexer
```python
from d import CrocLexer
```

For Croc source.

---
## MiniDLexer
```python
from d import MiniDLexer
```

For MiniD source. MiniD is now known as Croc.

---
## __name__
```python
from ruby import __name__
```

pygments.lexers.ruby
~~~~~~~~~~~~~~~~~~~~

Lexers for Ruby and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RubyLexer
```python
from ruby import RubyLexer
```

For Ruby source code.

---
## RubyConsoleLexer
```python
from ruby import RubyConsoleLexer
```

For Ruby interactive console (**irb**) output.

---
## FancyLexer
```python
from ruby import FancyLexer
```

Pygments Lexer For Fancy.

Fancy is a self-hosted, pure object-oriented, dynamic,
class-based, concurrent general-purpose programming language
running on Rubinius, the Ruby VM.

---
## heredoc_callback
```python
from ruby import heredoc_callback
```



---
## gen_rubystrings_rules
```python
from ruby import gen_rubystrings_rules
```



---
## analyse_text
```python
from ruby import analyse_text
```



---
## get_tokens_unprocessed
```python
from ruby import get_tokens_unprocessed
```



---
## intp_regex_callback
```python
from ruby import intp_regex_callback
```



---
## intp_string_callback
```python
from ruby import intp_string_callback
```



---
## __name__
```python
from other import __name__
```



---
## __name__
```python
from pony import __name__
```

pygments.lexers.pony
~~~~~~~~~~~~~~~~~~~~

Lexers for Pony and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PonyLexer
```python
from pony import PonyLexer
```

For Pony source code.

---
## __name__
```python
from matlab import __name__
```

pygments.lexers.matlab
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Matlab and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MatlabLexer
```python
from matlab import MatlabLexer
```

For Matlab source code.

---
## MatlabSessionLexer
```python
from matlab import MatlabSessionLexer
```

For Matlab sessions.  Modeled after PythonConsoleLexer.
Contributed by Ken Schutte <kschutte@csail.mit.edu>.

---
## OctaveLexer
```python
from matlab import OctaveLexer
```

For GNU Octave source code.

---
## ScilabLexer
```python
from matlab import ScilabLexer
```

For Scilab source code.

---
## analyse_text
```python
from matlab import analyse_text
```



---
## get_tokens_unprocessed
```python
from matlab import get_tokens_unprocessed
```



---
## __name__
```python
from felix import __name__
```

pygments.lexers.felix
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Felix language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FelixLexer
```python
from felix import FelixLexer
```

For Felix source code.

---
## __name__
```python
from tnt import __name__
```

pygments.lexers.tnt
~~~~~~~~~~~~~~~~~~~

Lexer for Typographic Number Theory.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TNTLexer
```python
from tnt import TNTLexer
```

Lexer for Typographic Number Theory, as described in the book
Gödel, Escher, Bach, by Douglas R. Hofstadter

---
## __init__
```python
from tnt import __init__
```



---
## whitespace
```python
from tnt import whitespace
```

Tokenize whitespace.

---
## variable
```python
from tnt import variable
```

Tokenize a variable.

---
## term
```python
from tnt import term
```

Tokenize a term.

---
## formula
```python
from tnt import formula
```

Tokenize a formula.

---
## rule
```python
from tnt import rule
```

Tokenize a rule.

---
## lineno
```python
from tnt import lineno
```

Tokenize a line referral.

---
## error_till_line_end
```python
from tnt import error_till_line_end
```

Mark everything from ``start`` to the end of the line as Error.

---
## get_tokens_unprocessed
```python
from tnt import get_tokens_unprocessed
```

Returns a list of TNT tokens.

---
## __name__
```python
from _vim_builtins import __name__
```

pygments.lexers._vim_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file is autogenerated by scripts/get_vimkw.py

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## _getauto
```python
from _vim_builtins import _getauto
```



---
## _getcommand
```python
from _vim_builtins import _getcommand
```



---
## _getoption
```python
from _vim_builtins import _getoption
```



---
## __name__
```python
from freefem import __name__
```

pygments.lexers.freefem
~~~~~~~~~~~~~~~~~~~~~~~

Lexer for FreeFem++ language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FreeFemLexer
```python
from freefem import FreeFemLexer
```

For FreeFem++ source.

This is an extension of the CppLexer, as the FreeFem Language is a superset
of C++.

---
## get_tokens_unprocessed
```python
from freefem import get_tokens_unprocessed
```



---
## __name__
```python
from thingsdb import __name__
```

pygments.lexers.thingsdb
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the ThingsDB language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ThingsDBLexer
```python
from thingsdb import ThingsDBLexer
```

Lexer for the ThingsDB programming language.

---
## __name__
```python
from teraterm import __name__
```

pygments.lexers.teraterm
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Tera Term macro files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TeraTermLexer
```python
from teraterm import TeraTermLexer
```

For Tera Term macro source code.

---
## analyse_text
```python
from teraterm import analyse_text
```



---
## RagelLexer
```python
from parsers import RagelLexer
```

A pure `Ragel <www.colm.net/open-source/ragel>`_ lexer.  Use this
for fragments of Ragel.  For ``.rl`` files, use
:class:`RagelEmbeddedLexer` instead (or one of the
language-specific subclasses).

---
## RagelEmbeddedLexer
```python
from parsers import RagelEmbeddedLexer
```

A lexer for Ragel embedded in a host language file.

This will only highlight Ragel statements. If you want host language
highlighting then call the language-specific Ragel lexer.

---
## RagelRubyLexer
```python
from parsers import RagelRubyLexer
```

A lexer for Ragel in a Ruby host file.

---
## RagelCLexer
```python
from parsers import RagelCLexer
```

A lexer for Ragel in a C host file.

---
## RagelDLexer
```python
from parsers import RagelDLexer
```

A lexer for Ragel in a D host file.

---
## RagelCppLexer
```python
from parsers import RagelCppLexer
```

A lexer for Ragel in a C++ host file.

---
## RagelObjectiveCLexer
```python
from parsers import RagelObjectiveCLexer
```

A lexer for Ragel in an Objective C host file.

---
## RagelJavaLexer
```python
from parsers import RagelJavaLexer
```

A lexer for Ragel in a Java host file.

---
## AntlrLexer
```python
from parsers import AntlrLexer
```

Generic ANTLR Lexer.
Should not be called directly, instead
use DelegatingLexer for your target language.

---
## AntlrCppLexer
```python
from parsers import AntlrCppLexer
```

ANTLR with C++ Target

---
## AntlrObjectiveCLexer
```python
from parsers import AntlrObjectiveCLexer
```

ANTLR with Objective-C Target

---
## AntlrCSharpLexer
```python
from parsers import AntlrCSharpLexer
```

ANTLR with C# Target

---
## AntlrPythonLexer
```python
from parsers import AntlrPythonLexer
```

ANTLR with Python Target

---
## AntlrJavaLexer
```python
from parsers import AntlrJavaLexer
```

ANTLR with Java Target

---
## AntlrRubyLexer
```python
from parsers import AntlrRubyLexer
```

ANTLR with Ruby Target

---
## AntlrPerlLexer
```python
from parsers import AntlrPerlLexer
```

ANTLR with Perl Target

---
## AntlrActionScriptLexer
```python
from parsers import AntlrActionScriptLexer
```

ANTLR with ActionScript Target

---
## TreetopBaseLexer
```python
from parsers import TreetopBaseLexer
```

A base lexer for `Treetop <http://treetop.rubyforge.org/>`_ grammars.
Not for direct use; use :class:`TreetopLexer` instead.

.. versionadded:: 1.6

---
## TreetopLexer
```python
from parsers import TreetopLexer
```

A lexer for Treetop grammars.

---
## EbnfLexer
```python
from parsers import EbnfLexer
```

Lexer for `ISO/IEC 14977 EBNF
<https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form>`_
grammars.

---
## analyse_text
```python
from parsers import analyse_text
```



---
## __init__
```python
from parsers import __init__
```



---
## __name__
```python
from jmespath import __name__
```

pygments.lexers.jmespath
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the JMESPath language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## JMESPathLexer
```python
from jmespath import JMESPathLexer
```

For JMESPath queries.

---
## __name__
```python
from carbon import __name__
```

pygments.lexers.carbon
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Carbon programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CarbonLexer
```python
from carbon import CarbonLexer
```

For Carbon source.

---
## analyse_text
```python
from carbon import analyse_text
```



---
## __name__
```python
from theorem import __name__
```

pygments.lexers.theorem
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for theorem-proving languages.

See also :mod:`pygments.lexers.lean`

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CoqLexer
```python
from theorem import CoqLexer
```

For the Coq theorem prover.

---
## IsabelleLexer
```python
from theorem import IsabelleLexer
```

For the Isabelle proof assistant.

---
## analyse_text
```python
from theorem import analyse_text
```



---
## __name__
```python
from compiled import __name__
```

pygments.lexers.compiled
~~~~~~~~~~~~~~~~~~~~~~~~

Just export lexer classes previously contained in this module.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from int_fiction import __name__
```

pygments.lexers.int_fiction
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for interactive fiction languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Inform6Lexer
```python
from int_fiction import Inform6Lexer
```

For Inform 6 source code.

---
## Inform7Lexer
```python
from int_fiction import Inform7Lexer
```

For Inform 7 source code.

---
## Inform6TemplateLexer
```python
from int_fiction import Inform6TemplateLexer
```

For Inform 6 template code.

---
## Tads3Lexer
```python
from int_fiction import Tads3Lexer
```

For TADS 3 source code.

---
## get_tokens_unprocessed
```python
from int_fiction import get_tokens_unprocessed
```



---
## analyse_text
```python
from int_fiction import analyse_text
```

This is a rather generic descriptive language without strong
identifiers. It looks like a 'GameMainDef' has to be present,
and/or a 'versionInfo' with an 'IFID' field.

---
## __init__
```python
from int_fiction import __init__
```



---
## _make_string_state
```python
from int_fiction import _make_string_state
```



---
## _make_tag_state
```python
from int_fiction import _make_tag_state
```



---
## _make_attribute_value_state
```python
from int_fiction import _make_attribute_value_state
```



---
## __name__
```python
from _cocoa_builtins import __name__
```

pygments.lexers._cocoa_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file defines a set of types used across Cocoa frameworks from Apple.
There is a list of @interfaces, @protocols and some other (structs, unions)

File may be also used as standalone generator for above.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from ncl import __name__
```

pygments.lexers.ncl
~~~~~~~~~~~~~~~~~~~

Lexers for NCAR Command Language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NCLLexer
```python
from ncl import NCLLexer
```

Lexer for NCL code.

---
## __name__
```python
from vyper import __name__
```

pygments.lexers.vyper
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Vyper Smart Contract language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VyperLexer
```python
from vyper import VyperLexer
```

For the Vyper smart contract language.
    

---
## __name__
```python
from lilypond import __name__
```

pygments.styles.lilypond
~~~~~~~~~~~~~~~~~~~~~~~~

LilyPond-specific style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## builtin_words
```python
from lilypond import builtin_words
```



---
## LilyPondLexer
```python
from lilypond import LilyPondLexer
```

Lexer for input to LilyPond, a text-based music typesetter.

.. important::

   This lexer is meant to be used in conjunction with the ``lilypond`` style.

---
## get_tokens_unprocessed
```python
from lilypond import get_tokens_unprocessed
```

Highlight Scheme variables as LilyPond builtins when applicable.

---
## BBCodeLexer
```python
from markup import BBCodeLexer
```

A lexer that highlights BBCode(-like) syntax.

---
## MoinWikiLexer
```python
from markup import MoinWikiLexer
```

For MoinMoin (and Trac) Wiki markup.

---
## RstLexer
```python
from markup import RstLexer
```

For reStructuredText markup.

Additional options accepted:

`handlecodeblocks`
    Highlight the contents of ``.. sourcecode:: language``,
    ``.. code:: language`` and ``.. code-block:: language``
    directives with a lexer for the given language (default:
    ``True``).

    .. versionadded:: 0.8

---
## TexLexer
```python
from markup import TexLexer
```

Lexer for the TeX and LaTeX typesetting languages.

---
## GroffLexer
```python
from markup import GroffLexer
```

Lexer for the (g)roff typesetting language, supporting groff
extensions. Mainly useful for highlighting manpage sources.

---
## MozPreprocHashLexer
```python
from markup import MozPreprocHashLexer
```

Lexer for Mozilla Preprocessor files (with '#' as the marker).

Other data is left untouched.

---
## MozPreprocPercentLexer
```python
from markup import MozPreprocPercentLexer
```

Lexer for Mozilla Preprocessor files (with '%' as the marker).

Other data is left untouched.

---
## MozPreprocXulLexer
```python
from markup import MozPreprocXulLexer
```

Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
`XmlLexer`.

---
## MozPreprocJavascriptLexer
```python
from markup import MozPreprocJavascriptLexer
```

Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
`JavascriptLexer`.

---
## MozPreprocCssLexer
```python
from markup import MozPreprocCssLexer
```

Subclass of the `MozPreprocHashLexer` that highlights unlexed data with the
`CssLexer`.

---
## MarkdownLexer
```python
from markup import MarkdownLexer
```

For Markdown markup.

---
## OrgLexer
```python
from markup import OrgLexer
```

For Org Mode markup.

---
## TiddlyWiki5Lexer
```python
from markup import TiddlyWiki5Lexer
```

For TiddlyWiki5 markup.

---
## WikitextLexer
```python
from markup import WikitextLexer
```

For MediaWiki Wikitext.

Parsing Wikitext is tricky, and results vary between different MediaWiki
installations, so we only highlight common syntaxes (built-in or from
popular extensions), and also assume templates produce no unbalanced
syntaxes.

---
## _handle_sourcecode
```python
from markup import _handle_sourcecode
```



---
## __init__
```python
from markup import __init__
```



---
## analyse_text
```python
from markup import analyse_text
```



---
## _handle_codeblock
```python
from markup import _handle_codeblock
```

match args: 1:backticks, 2:lang_name, 3:newline, 4:code, 5:backticks

---
## _inline
```python
from markup import _inline
```



---
## _handle_cssblock
```python
from markup import _handle_cssblock
```

match args: 1:style tag 2:newline, 3:code, 4:closing style tag

---
## nowiki_tag_rules
```python
from markup import nowiki_tag_rules
```



---
## plaintext_tag_rules
```python
from markup import plaintext_tag_rules
```



---
## delegate_tag_rules
```python
from markup import delegate_tag_rules
```



---
## text_rules
```python
from markup import text_rules
```



---
## handle_syntaxhighlight
```python
from markup import handle_syntaxhighlight
```



---
## handle_score
```python
from markup import handle_score
```



---
## __name__
```python
from _asy_builtins import __name__
```

pygments.lexers._asy_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file contains the asy-function names and asy-variable names of
Asymptote.

Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand.
TODO: perl/python script in Asymptote SVN similar to asy-list.pl but only
for function and variable names.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from igor import __name__
```

pygments.styles.igor
~~~~~~~~~~~~~~~~~~~~

Igor Pro default style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## IgorLexer
```python
from igor import IgorLexer
```

Pygments Lexer for Igor Pro procedure files (.ipf).

---
## __name__
```python
from ml import __name__
```

pygments.lexers.ml
~~~~~~~~~~~~~~~~~~

Lexers for ML family languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SMLLexer
```python
from ml import SMLLexer
```

For the Standard ML language.

---
## OcamlLexer
```python
from ml import OcamlLexer
```

For the OCaml language.

---
## OpaLexer
```python
from ml import OpaLexer
```

Lexer for the Opa language.

---
## ReasonLexer
```python
from ml import ReasonLexer
```

For the ReasonML language.

---
## FStarLexer
```python
from ml import FStarLexer
```

For the F* language.

---
## stringy
```python
from ml import stringy
```



---
## long_id_callback
```python
from ml import long_id_callback
```



---
## end_id_callback
```python
from ml import end_id_callback
```



---
## id_callback
```python
from ml import id_callback
```



---
## __name__
```python
from savi import __name__
```

pygments.lexers.savi
~~~~~~~~~~~~~~~~~~~~

Lexer for Savi.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SaviLexer
```python
from savi import SaviLexer
```

For Savi source code.

.. versionadded: 2.10

---
## __name__
```python
from bqn import __name__
```

pygments.lexers.bqn
~~~~~~~~~~~~~~~~~~~

Lexer for BQN.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BQNLexer
```python
from bqn import BQNLexer
```

A simple BQN lexer.

---
## __name__
```python
from tal import __name__
```

pygments.lexers.tal
~~~~~~~~~~~~~~~~~~~

Lexer for Uxntal

.. versionadded:: 2.12

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TalLexer
```python
from tal import TalLexer
```

For Uxntal source code.

---
## analyse_text
```python
from tal import analyse_text
```



---
## __name__
```python
from tls import __name__
```



---
## TlsLexer
```python
from tls import TlsLexer
```

The TLS presentation language, described in RFC 8446.

---
## ErbLexer
```python
from templates import ErbLexer
```

Generic ERB (Ruby Templating) lexer.

Just highlights ruby code between the preprocessor directives, other data
is left untouched by the lexer.

All options are also forwarded to the `RubyLexer`.

---
## SmartyLexer
```python
from templates import SmartyLexer
```

Generic Smarty template lexer.

Just highlights smarty code between the preprocessor directives, other
data is left untouched by the lexer.

---
## VelocityLexer
```python
from templates import VelocityLexer
```

Generic Velocity template lexer.

Just highlights velocity directives and variable references, other
data is left untouched by the lexer.

---
## VelocityHtmlLexer
```python
from templates import VelocityHtmlLexer
```

Subclass of the `VelocityLexer` that highlights unlexed data
with the `HtmlLexer`.

---
## VelocityXmlLexer
```python
from templates import VelocityXmlLexer
```

Subclass of the `VelocityLexer` that highlights unlexed data
with the `XmlLexer`.

---
## DjangoLexer
```python
from templates import DjangoLexer
```

Generic `Django <https://www.djangoproject.com/documentation/templates/>`_
and `Jinja <https://jinja.palletsprojects.com>`_ template lexer.

It just highlights django/jinja code between the preprocessor directives,
other data is left untouched by the lexer.

---
## MyghtyLexer
```python
from templates import MyghtyLexer
```

Generic myghty templates lexer. Code that isn't Myghty
markup is yielded as `Token.Other`.

---
## MyghtyHtmlLexer
```python
from templates import MyghtyHtmlLexer
```

Subclass of the `MyghtyLexer` that highlights unlexed data
with the `HtmlLexer`.

---
## MyghtyXmlLexer
```python
from templates import MyghtyXmlLexer
```

Subclass of the `MyghtyLexer` that highlights unlexed data
with the `XmlLexer`.

---
## MyghtyJavascriptLexer
```python
from templates import MyghtyJavascriptLexer
```

Subclass of the `MyghtyLexer` that highlights unlexed data
with the `JavascriptLexer`.

---
## MyghtyCssLexer
```python
from templates import MyghtyCssLexer
```

Subclass of the `MyghtyLexer` that highlights unlexed data
with the `CssLexer`.

---
## MasonLexer
```python
from templates import MasonLexer
```

Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't
Mason markup is HTML.

---
## MakoLexer
```python
from templates import MakoLexer
```

Generic mako templates lexer. Code that isn't Mako
markup is yielded as `Token.Other`.

---
## MakoHtmlLexer
```python
from templates import MakoHtmlLexer
```

Subclass of the `MakoLexer` that highlights unlexed data
with the `HtmlLexer`.

---
## MakoXmlLexer
```python
from templates import MakoXmlLexer
```

Subclass of the `MakoLexer` that highlights unlexed data
with the `XmlLexer`.

---
## MakoJavascriptLexer
```python
from templates import MakoJavascriptLexer
```

Subclass of the `MakoLexer` that highlights unlexed data
with the `JavascriptLexer`.

---
## MakoCssLexer
```python
from templates import MakoCssLexer
```

Subclass of the `MakoLexer` that highlights unlexed data
with the `CssLexer`.

---
## CheetahPythonLexer
```python
from templates import CheetahPythonLexer
```

Lexer for handling Cheetah's special $ tokens in Python syntax.

---
## CheetahLexer
```python
from templates import CheetahLexer
```

Generic cheetah templates lexer. Code that isn't Cheetah
markup is yielded as `Token.Other`.  This also works for
`spitfire templates`_ which use the same syntax.

.. _spitfire templates: http://code.google.com/p/spitfire/

---
## CheetahHtmlLexer
```python
from templates import CheetahHtmlLexer
```

Subclass of the `CheetahLexer` that highlights unlexed data
with the `HtmlLexer`.

---
## CheetahXmlLexer
```python
from templates import CheetahXmlLexer
```

Subclass of the `CheetahLexer` that highlights unlexed data
with the `XmlLexer`.

---
## CheetahJavascriptLexer
```python
from templates import CheetahJavascriptLexer
```

Subclass of the `CheetahLexer` that highlights unlexed data
with the `JavascriptLexer`.

---
## GenshiTextLexer
```python
from templates import GenshiTextLexer
```

A lexer that highlights genshi text templates.

---
## GenshiMarkupLexer
```python
from templates import GenshiMarkupLexer
```

Base lexer for Genshi markup, used by `HtmlGenshiLexer` and
`GenshiLexer`.

---
## HtmlGenshiLexer
```python
from templates import HtmlGenshiLexer
```

A lexer that highlights `genshi <https://genshi.edgewall.org/>`_ and
`kid <http://kid-templating.org/>`_ kid HTML templates.

---
## GenshiLexer
```python
from templates import GenshiLexer
```

A lexer that highlights `genshi <https://genshi.edgewall.org/>`_ and
`kid <http://kid-templating.org/>`_ kid XML templates.

---
## JavascriptGenshiLexer
```python
from templates import JavascriptGenshiLexer
```

A lexer that highlights javascript code in genshi text templates.

---
## CssGenshiLexer
```python
from templates import CssGenshiLexer
```

A lexer that highlights CSS definitions in genshi text templates.

---
## RhtmlLexer
```python
from templates import RhtmlLexer
```

Subclass of the ERB lexer that highlights the unlexed data with the
html lexer.

Nested Javascript and CSS is highlighted too.

---
## XmlErbLexer
```python
from templates import XmlErbLexer
```

Subclass of `ErbLexer` which highlights data outside preprocessor
directives with the `XmlLexer`.

---
## CssErbLexer
```python
from templates import CssErbLexer
```

Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.

---
## JavascriptErbLexer
```python
from templates import JavascriptErbLexer
```

Subclass of `ErbLexer` which highlights unlexed data with the
`JavascriptLexer`.

---
## HtmlPhpLexer
```python
from templates import HtmlPhpLexer
```

Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

Nested Javascript and CSS is highlighted too.

---
## XmlPhpLexer
```python
from templates import XmlPhpLexer
```

Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.

---
## CssPhpLexer
```python
from templates import CssPhpLexer
```

Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.

---
## JavascriptPhpLexer
```python
from templates import JavascriptPhpLexer
```

Subclass of `PhpLexer` which highlights unmatched data with the
`JavascriptLexer`.

---
## HtmlSmartyLexer
```python
from templates import HtmlSmartyLexer
```

Subclass of the `SmartyLexer` that highlights unlexed data with the
`HtmlLexer`.

Nested Javascript and CSS is highlighted too.

---
## XmlSmartyLexer
```python
from templates import XmlSmartyLexer
```

Subclass of the `SmartyLexer` that highlights unlexed data with the
`XmlLexer`.

---
## CssSmartyLexer
```python
from templates import CssSmartyLexer
```

Subclass of the `SmartyLexer` that highlights unlexed data with the
`CssLexer`.

---
## JavascriptSmartyLexer
```python
from templates import JavascriptSmartyLexer
```

Subclass of the `SmartyLexer` that highlights unlexed data with the
`JavascriptLexer`.

---
## HtmlDjangoLexer
```python
from templates import HtmlDjangoLexer
```

Subclass of the `DjangoLexer` that highlights unlexed data with the
`HtmlLexer`.

Nested Javascript and CSS is highlighted too.

---
## XmlDjangoLexer
```python
from templates import XmlDjangoLexer
```

Subclass of the `DjangoLexer` that highlights unlexed data with the
`XmlLexer`.

---
## CssDjangoLexer
```python
from templates import CssDjangoLexer
```

Subclass of the `DjangoLexer` that highlights unlexed data with the
`CssLexer`.

---
## JavascriptDjangoLexer
```python
from templates import JavascriptDjangoLexer
```

Subclass of the `DjangoLexer` that highlights unlexed data with the
`JavascriptLexer`.

---
## JspRootLexer
```python
from templates import JspRootLexer
```

Base for the `JspLexer`. Yields `Token.Other` for area outside of
JSP tags.

.. versionadded:: 0.7

---
## JspLexer
```python
from templates import JspLexer
```

Lexer for Java Server Pages.

---
## EvoqueLexer
```python
from templates import EvoqueLexer
```

For files using the Evoque templating system.

---
## EvoqueHtmlLexer
```python
from templates import EvoqueHtmlLexer
```

Subclass of the `EvoqueLexer` that highlights unlexed data with the
`HtmlLexer`.

---
## EvoqueXmlLexer
```python
from templates import EvoqueXmlLexer
```

Subclass of the `EvoqueLexer` that highlights unlexed data with the
`XmlLexer`.

---
## ColdfusionLexer
```python
from templates import ColdfusionLexer
```

Coldfusion statements

---
## ColdfusionMarkupLexer
```python
from templates import ColdfusionMarkupLexer
```

Coldfusion markup only

---
## ColdfusionHtmlLexer
```python
from templates import ColdfusionHtmlLexer
```

Coldfusion markup in html

---
## ColdfusionCFCLexer
```python
from templates import ColdfusionCFCLexer
```

Coldfusion markup/script components

---
## SspLexer
```python
from templates import SspLexer
```

Lexer for Scalate Server Pages.

---
## TeaTemplateRootLexer
```python
from templates import TeaTemplateRootLexer
```

Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
code blocks.

.. versionadded:: 1.5

---
## TeaTemplateLexer
```python
from templates import TeaTemplateLexer
```

Lexer for Tea Templates.

---
## LassoHtmlLexer
```python
from templates import LassoHtmlLexer
```

Subclass of the `LassoLexer` which highlights unhandled data with the
`HtmlLexer`.

Nested JavaScript and CSS is also highlighted.

---
## LassoXmlLexer
```python
from templates import LassoXmlLexer
```

Subclass of the `LassoLexer` which highlights unhandled data with the
`XmlLexer`.

---
## LassoCssLexer
```python
from templates import LassoCssLexer
```

Subclass of the `LassoLexer` which highlights unhandled data with the
`CssLexer`.

---
## LassoJavascriptLexer
```python
from templates import LassoJavascriptLexer
```

Subclass of the `LassoLexer` which highlights unhandled data with the
`JavascriptLexer`.

---
## HandlebarsLexer
```python
from templates import HandlebarsLexer
```

Generic handlebars template lexer.

Highlights only the Handlebars template tags (stuff between `{{` and `}}`).
Everything else is left for a delegating lexer.

---
## HandlebarsHtmlLexer
```python
from templates import HandlebarsHtmlLexer
```

Subclass of the `HandlebarsLexer` that highlights unlexed data with the
`HtmlLexer`.

---
## YamlJinjaLexer
```python
from templates import YamlJinjaLexer
```

Subclass of the `DjangoLexer` that highlights unlexed data with the
`YamlLexer`.

Commonly used in Saltstack salt states.

---
## LiquidLexer
```python
from templates import LiquidLexer
```

Lexer for Liquid templates.

---
## TwigLexer
```python
from templates import TwigLexer
```

Twig template lexer.

It just highlights Twig code between the preprocessor directives,
other data is left untouched by the lexer.

---
## TwigHtmlLexer
```python
from templates import TwigHtmlLexer
```

Subclass of the `TwigLexer` that highlights unlexed data with the
`HtmlLexer`.

---
## Angular2Lexer
```python
from templates import Angular2Lexer
```

Generic angular2 template lexer.

Highlights only the Angular template tags (stuff between `{{` and `}}` and
special attributes: '(event)=', '[property]=', '[(twoWayBinding)]=').
Everything else is left for a delegating lexer.

---
## Angular2HtmlLexer
```python
from templates import Angular2HtmlLexer
```

Subclass of the `Angular2Lexer` that highlights unlexed data with the
`HtmlLexer`.

---
## SqlJinjaLexer
```python
from templates import SqlJinjaLexer
```

Templated SQL lexer.

---
## get_tokens_unprocessed
```python
from templates import get_tokens_unprocessed
```



---
## analyse_text
```python
from templates import analyse_text
```



---
## __name__
```python
from forth import __name__
```

pygments.lexers.forth
~~~~~~~~~~~~~~~~~~~~~

Lexer for the Forth language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ForthLexer
```python
from forth import ForthLexer
```

Lexer for Forth files.

---
## analyse_text
```python
from forth import analyse_text
```

Forth uses : COMMAND ; quite a lot in a single line, so we're trying
to find that.

---
## CssLexer
```python
from css import CssLexer
```

For CSS (Cascading Style Sheets).

---
## _indentation
```python
from css import _indentation
```



---
## _starts_block
```python
from css import _starts_block
```



---
## SassLexer
```python
from css import SassLexer
```

For Sass stylesheets.

---
## ScssLexer
```python
from css import ScssLexer
```

For SCSS stylesheets.

---
## LessCssLexer
```python
from css import LessCssLexer
```

For LESS styleshets.

---
## callback
```python
from css import callback
```



---
## __name__
```python
from asm import __name__
```

pygments.lexers.asm
~~~~~~~~~~~~~~~~~~~

Lexers for assembly languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GasLexer
```python
from asm import GasLexer
```

For Gas (AT&T) assembly code.

---
## _objdump_lexer_tokens
```python
from asm import _objdump_lexer_tokens
```

Common objdump lexer tokens to wrap an ASM lexer.

---
## ObjdumpLexer
```python
from asm import ObjdumpLexer
```

For the output of ``objdump -dr``.

---
## DObjdumpLexer
```python
from asm import DObjdumpLexer
```

For the output of ``objdump -Sr`` on compiled D files.

---
## CppObjdumpLexer
```python
from asm import CppObjdumpLexer
```

For the output of ``objdump -Sr`` on compiled C++ files.

---
## CObjdumpLexer
```python
from asm import CObjdumpLexer
```

For the output of ``objdump -Sr`` on compiled C files.

---
## HsailLexer
```python
from asm import HsailLexer
```

For HSAIL assembly code.

---
## LlvmLexer
```python
from asm import LlvmLexer
```

For LLVM assembly code.

---
## LlvmMirBodyLexer
```python
from asm import LlvmMirBodyLexer
```

For LLVM MIR examples without the YAML wrapper.

---
## LlvmMirLexer
```python
from asm import LlvmMirLexer
```

Lexer for the overall LLVM MIR document format.

MIR is a human readable serialization format that's used to represent LLVM's
machine specific intermediate representation. It allows LLVM's developers to
see the state of the compilation process at various points, as well as test
individual pieces of the compiler.

---
## NasmLexer
```python
from asm import NasmLexer
```

For Nasm (Intel) assembly code.

---
## NasmObjdumpLexer
```python
from asm import NasmObjdumpLexer
```

For the output of ``objdump -d -M intel``.

---
## TasmLexer
```python
from asm import TasmLexer
```

For Tasm (Turbo Assembler) assembly code.

---
## Ca65Lexer
```python
from asm import Ca65Lexer
```

For ca65 assembler sources.

---
## Dasm16Lexer
```python
from asm import Dasm16Lexer
```

For DCPU-16 Assembly.

---
## analyse_text
```python
from asm import analyse_text
```



---
## __init__
```python
from asm import __init__
```



---
## guess_identifier
```python
from asm import guess_identifier
```



---
## __name__
```python
from roboconf import __name__
```

pygments.lexers.roboconf
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Roboconf DSL.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RoboconfGraphLexer
```python
from roboconf import RoboconfGraphLexer
```

Lexer for Roboconf graph files.

---
## RoboconfInstancesLexer
```python
from roboconf import RoboconfInstancesLexer
```

Lexer for Roboconf instances files.

---
## __name__
```python
from _lasso_builtins import __name__
```

pygments.lexers._lasso_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Built-in Lasso types, traits, methods, and members.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from pascal import __name__
```

pygments.lexers.pascal
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Pascal family languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PortugolLexer
```python
from pascal import PortugolLexer
```

For Portugol, a Pascal dialect with keywords in Portuguese.

---
## DelphiLexer
```python
from pascal import DelphiLexer
```

For Delphi (Borland Object Pascal),
Turbo Pascal and Free Pascal source code.

Additional options accepted:

`turbopascal`
    Highlight Turbo Pascal specific keywords (default: ``True``).
`delphi`
    Highlight Borland Delphi specific keywords (default: ``True``).
`freepascal`
    Highlight Free Pascal specific keywords (default: ``True``).
`units`
    A list of units that should be considered builtin, supported are
    ``System``, ``SysUtils``, ``Classes`` and ``Math``.
    Default is to consider all of them builtin.

---
## __init__
```python
from pascal import __init__
```



---
## get_tokens_unprocessed
```python
from pascal import get_tokens_unprocessed
```



---
## __name__
```python
from csound import __name__
```

pygments.lexers.csound
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Csound languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CsoundLexer
```python
from csound import CsoundLexer
```



---
## CsoundScoreLexer
```python
from csound import CsoundScoreLexer
```

For `Csound <https://csound.com>`_ scores.

---
## CsoundOrchestraLexer
```python
from csound import CsoundOrchestraLexer
```

For `Csound <https://csound.com>`_ orchestras.

---
## CsoundDocumentLexer
```python
from csound import CsoundDocumentLexer
```

For Csound documents.

---
## opcode_name_callback
```python
from csound import opcode_name_callback
```



---
## name_callback
```python
from csound import name_callback
```



---
## __name__
```python
from typst import __name__
```

pygments.lexers.typst
~~~~~~~~~~~~~~~~~~~~~

Lexers for Typst language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TypstLexer
```python
from typst import TypstLexer
```

For Typst code.

---
## __name__
```python
from ptx import __name__
```

pygments.lexers.ptx
~~~~~~~~~~~~~~~~~~~

Lexer for other PTX language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PtxLexer
```python
from ptx import PtxLexer
```

For NVIDIA `PTX <https://docs.nvidia.com/cuda/parallel-thread-execution/>`_
source.

---
## __name__
```python
from sgf import __name__
```

pygments.lexers.sgf
~~~~~~~~~~~~~~~~~~~

Lexer for Smart Game Format (sgf) file format.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SmartGameFormatLexer
```python
from sgf import SmartGameFormatLexer
```

Lexer for Smart Game Format (sgf) file format.

The format is used to store game records of board games for two players
(mainly Go game).

---
## __name__
```python
from kusto import __name__
```

pygments.lexers.kusto
~~~~~~~~~~~~~~~~~~~~~

Lexers for Kusto Query Language (KQL).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## KustoLexer
```python
from kusto import KustoLexer
```

For Kusto Query Language source code.
    

---
## __name__
```python
from webassembly import __name__
```

pygments.lexers.webassembly
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the WebAssembly text format.

The grammar can be found at https://github.com/WebAssembly/spec/blob/master/interpreter/README.md
and https://webassembly.github.io/spec/core/text/.


:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## WatLexer
```python
from webassembly import WatLexer
```

Lexer for the WebAssembly text format.
    

---
## __name__
```python
from procfile import __name__
```

pygments.lexers.procfile
~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Procfile file format.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ProcfileLexer
```python
from procfile import ProcfileLexer
```

Lexer for Procfile file format.

The format is used to run processes on Heroku or is used by Foreman or
Honcho tools.

---
## __name__
```python
from textedit import __name__
```

pygments.lexers.textedit
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for languages related to text processing.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AwkLexer
```python
from textedit import AwkLexer
```

For Awk scripts.

---
## SedLexer
```python
from textedit import SedLexer
```

Lexer for Sed script files.

---
## VimLexer
```python
from textedit import VimLexer
```

Lexer for VimL script files.

---
## __init__
```python
from textedit import __init__
```



---
## is_in
```python
from textedit import is_in
```

It's kind of difficult to decide if something might be a keyword
in VimL because it allows you to abbreviate them.  In fact,
'ab[breviate]' is a good example.  :ab, :abbre, or :abbreviate are
valid ways to call it so rather than making really awful regexps
like::

    \bab(?:b(?:r(?:e(?:v(?:i(?:a(?:t(?:e)?)?)?)?)?)?)?)?\b

we match `\b\w+\b` and then call is_in() on those tokens.  See
`scripts/get_vimkw.py` for how the lists are extracted.

---
## get_tokens_unprocessed
```python
from textedit import get_tokens_unprocessed
```



---
## __name__
```python
from installers import __name__
```

pygments.lexers.installers
~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for installer/packager DSLs and formats.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NSISLexer
```python
from installers import NSISLexer
```

For NSIS scripts.

---
## RPMSpecLexer
```python
from installers import RPMSpecLexer
```

For RPM ``.spec`` files.

---
## SourcesListLexer
```python
from installers import SourcesListLexer
```

Lexer that highlights debian sources.list files.

---
## DebianControlLexer
```python
from installers import DebianControlLexer
```

Lexer for Debian ``control`` files and ``apt-cache show <pkg>`` outputs.

---
## analyse_text
```python
from installers import analyse_text
```



---
## __name__
```python
from business import __name__
```

pygments.lexers.business
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for "business-oriented" languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CobolLexer
```python
from business import CobolLexer
```

Lexer for OpenCOBOL code.

---
## CobolFreeformatLexer
```python
from business import CobolFreeformatLexer
```

Lexer for Free format OpenCOBOL code.

---
## ABAPLexer
```python
from business import ABAPLexer
```

Lexer for ABAP, SAP's integrated language.

---
## OpenEdgeLexer
```python
from business import OpenEdgeLexer
```

Lexer for OpenEdge ABL (formerly Progress) source code.

---
## GoodDataCLLexer
```python
from business import GoodDataCLLexer
```

Lexer for GoodData-CL script files.

---
## MaqlLexer
```python
from business import MaqlLexer
```

Lexer for GoodData MAQL scripts.

---
## analyse_text
```python
from business import analyse_text
```

Try to identify OpenEdge ABL based on a few common constructs.

---
## __name__
```python
from tcl import __name__
```

pygments.lexers.tcl
~~~~~~~~~~~~~~~~~~~

Lexers for Tcl and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TclLexer
```python
from tcl import TclLexer
```

For Tcl source code.

---
## _gen_command_rules
```python
from tcl import _gen_command_rules
```



---
## analyse_text
```python
from tcl import analyse_text
```



---
## __name__
```python
from minecraft import __name__
```

pygments.lexers.minecraft
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Minecraft related languages.

SNBT. A data communication format used in Minecraft.
wiki: https://minecraft.wiki/w/NBT_format

MCFunction. The Function file for Minecraft Data packs and Add-ons.
official: https://learn.microsoft.com/en-us/minecraft/creator/documents/functionsintroduction
wiki: https://minecraft.wiki/w/Function

MCSchema. A kind of data Schema for Minecraft Add-on Development.
official: https://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/
community example: https://www.mcbe-dev.net/addons/data-driven/manifest.html

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SNBTLexer
```python
from minecraft import SNBTLexer
```

Lexer for stringified NBT, a data format used in Minecraft
    

---
## MCFunctionLexer
```python
from minecraft import MCFunctionLexer
```

Lexer for the mcfunction scripting language used in Minecraft
Modelled somewhat after the `GitHub mcfunction grammar <https://github.com/Arcensoth/language-mcfunction>`_.

---
## MCSchemaLexer
```python
from minecraft import MCSchemaLexer
```

Lexer for Minecraft Add-ons data Schemas, an interface structure standard used in Minecraft
    

---
## __name__
```python
from vip import __name__
```

pygments.lexers.vip
~~~~~~~~~~~~~~~~~~~

Lexers for Visual Prolog & Grammar files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VisualPrologBaseLexer
```python
from vip import VisualPrologBaseLexer
```



---
## VisualPrologLexer
```python
from vip import VisualPrologLexer
```

Lexer for VisualProlog
    

---
## VisualPrologGrammarLexer
```python
from vip import VisualPrologGrammarLexer
```

Lexer for VisualProlog grammar
    

---
## analyse_text
```python
from vip import analyse_text
```

No competditors (currently)

---
## __name__
```python
from mips import __name__
```

pygments.lexers.mips
~~~~~~~~~~~~~~~~~~~~

Lexers for MIPS assembly.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MIPSLexer
```python
from mips import MIPSLexer
```

A MIPS Assembly Lexer.

Based on the Emacs major mode by hlissner:
https://github.com/hlissner/emacs-mips-mode

---
## __name__
```python
from meson import __name__
```

pygments.lexers.meson
~~~~~~~~~~~~~~~~~~~~~

Pygments lexer for the Meson build system

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MesonLexer
```python
from meson import MesonLexer
```

Meson language lexer.

The grammar definition use to transcribe the syntax was retrieved from
https://mesonbuild.com/Syntax.html#grammar for version 0.58.
Some of those definitions are improperly transcribed, so the Meson++
implementation was also checked: https://github.com/dcbaker/meson-plus-plus.

---
## __name__
```python
from basic import __name__
```

pygments.lexers.basic
~~~~~~~~~~~~~~~~~~~~~

Lexers for BASIC like languages (other than VB.net).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BlitzMaxLexer
```python
from basic import BlitzMaxLexer
```

For BlitzMax source code.

---
## BlitzBasicLexer
```python
from basic import BlitzBasicLexer
```

For BlitzBasic source code.

---
## MonkeyLexer
```python
from basic import MonkeyLexer
```

For Monkey source code.

---
## CbmBasicV2Lexer
```python
from basic import CbmBasicV2Lexer
```

For CBM BASIC V2 sources.

---
## QBasicLexer
```python
from basic import QBasicLexer
```

For QBasic source code.

---
## VBScriptLexer
```python
from basic import VBScriptLexer
```

VBScript is scripting language that is modeled on Visual Basic.

---
## BBCBasicLexer
```python
from basic import BBCBasicLexer
```

BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS.
It is also used by BBC Basic For Windows.

---
## analyse_text
```python
from basic import analyse_text
```



---
## __name__
```python
from _stan_builtins import __name__
```

pygments.lexers._stan_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file contains the names of functions for Stan used by
``pygments.lexers.math.StanLexer. This is for Stan language version 2.29.0.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from prql import __name__
```

pygments.lexers.prql
~~~~~~~~~~~~~~~~~~~~

Lexer for the PRQL query language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PrqlLexer
```python
from prql import PrqlLexer
```

For PRQL source code.

grammar: https://github.com/PRQL/prql/tree/main/grammars

---
## innerstring_rules
```python
from prql import innerstring_rules
```



---
## fstring_rules
```python
from prql import fstring_rules
```



---
## __name__
```python
from eiffel import __name__
```

pygments.lexers.eiffel
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Eiffel language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## EiffelLexer
```python
from eiffel import EiffelLexer
```

For Eiffel source code.

---
## __name__
```python
from scdoc import __name__
```

pygments.lexers.scdoc
~~~~~~~~~~~~~~~~~~~~~

Lexer for scdoc, a simple man page generator.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ScdocLexer
```python
from scdoc import ScdocLexer
```

`scdoc` is a simple man page generator for POSIX systems written in C99.

---
## analyse_text
```python
from scdoc import analyse_text
```

We checks for bold and underline text with * and _. Also
every scdoc file must start with a strictly defined first line.

---
## __name__
```python
from dax import __name__
```

pygments.lexers.dax
~~~~~~~~~~~~~~~~~~~

Lexer for LilyPond.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DaxLexer
```python
from dax import DaxLexer
```

Lexer for Power BI DAX
Referenced from: https://github.com/sql-bi/SyntaxHighlighterBrushDax

---
## __name__
```python
from rdf import __name__
```

pygments.lexers.rdf
~~~~~~~~~~~~~~~~~~~

Lexers for semantic web and RDF query languages and markup.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SparqlLexer
```python
from rdf import SparqlLexer
```

Lexer for SPARQL query language.

---
## TurtleLexer
```python
from rdf import TurtleLexer
```

Lexer for Turtle data language.

---
## ShExCLexer
```python
from rdf import ShExCLexer
```

Lexer for ShExC shape expressions language syntax.

---
## analyse_text
```python
from rdf import analyse_text
```



---
## __name__
```python
from email import __name__
```

pygments.lexers.email
~~~~~~~~~~~~~~~~~~~~~

Lexer for the raw E-mail.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## EmailHeaderLexer
```python
from email import EmailHeaderLexer
```

Sub-lexer for raw E-mail. This lexer only process header part of e-mail.

.. versionadded:: 2.5

---
## EmailLexer
```python
from email import EmailLexer
```

Lexer for raw E-mail.

Additional options accepted:

`highlight-X-header`
    Highlight the fields of ``X-`` user-defined email header. (default:
    ``False``).

---
## __init__
```python
from email import __init__
```



---
## get_x_header_tokens
```python
from email import get_x_header_tokens
```



---
## __name__
```python
from sophia import __name__
```

pygments.lexers.sophia
~~~~~~~~~~~~~~~~~~~~~~

Lexer for Sophia.

Derived from pygments/lexers/reason.py.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SophiaLexer
```python
from sophia import SophiaLexer
```

A Sophia lexer.

---
## __name__
```python
from modula2 import __name__
```

pygments.lexers.modula2
~~~~~~~~~~~~~~~~~~~~~~~

Multi-Dialect Lexer for Modula-2.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Modula2Lexer
```python
from modula2 import Modula2Lexer
```

For Modula-2 source code.

The Modula-2 lexer supports several dialects.  By default, it operates in
fallback mode, recognising the *combined* literals, punctuation symbols
and operators of all supported dialects, and the *combined* reserved words
and builtins of PIM Modula-2, ISO Modula-2 and Modula-2 R10, while not
differentiating between library defined identifiers.

To select a specific dialect, a dialect option may be passed
or a dialect tag may be embedded into a source file.

Dialect Options:

`m2pim`
    Select PIM Modula-2 dialect.
`m2iso`
    Select ISO Modula-2 dialect.
`m2r10`
    Select Modula-2 R10 dialect.
`objm2`
    Select Objective Modula-2 dialect.

The PIM and ISO dialect options may be qualified with a language extension.

Language Extensions:

`+aglet`
    Select Aglet Modula-2 extensions, available with m2iso.
`+gm2`
    Select GNU Modula-2 extensions, available with m2pim.
`+p1`
    Select p1 Modula-2 extensions, available with m2iso.
`+xds`
    Select XDS Modula-2 extensions, available with m2iso.


Passing a Dialect Option via Unix Commandline Interface

Dialect options may be passed to the lexer using the `dialect` key.
Only one such option should be passed. If multiple dialect options are
passed, the first valid option is used, any subsequent options are ignored.

Examples:

`$ pygmentize -O full,dialect=m2iso -f html -o /path/to/output /path/to/input`
    Use ISO dialect to render input to HTML output
`$ pygmentize -O full,dialect=m2iso+p1 -f rtf -o /path/to/output /path/to/input`
    Use ISO dialect with p1 extensions to render input to RTF output


Embedding a Dialect Option within a source file

A dialect option may be embedded in a source file in form of a dialect
tag, a specially formatted comment that specifies a dialect option.

Dialect Tag EBNF::

   dialectTag :
       OpeningCommentDelim Prefix dialectOption ClosingCommentDelim ;

   dialectOption :
       'm2pim' | 'm2iso' | 'm2r10' | 'objm2' |
       'm2iso+aglet' | 'm2pim+gm2' | 'm2iso+p1' | 'm2iso+xds' ;

   Prefix : '!' ;

   OpeningCommentDelim : '(*' ;

   ClosingCommentDelim : '*)' ;

No whitespace is permitted between the tokens of a dialect tag.

In the event that a source file contains multiple dialect tags, the first
tag that contains a valid dialect option will be used and any subsequent
dialect tags will be ignored.  Ideally, a dialect tag should be placed
at the beginning of a source file.

An embedded dialect tag overrides a dialect option set via command line.

Examples:

``(*!m2r10*) DEFINITION MODULE Foobar; ...``
    Use Modula2 R10 dialect to render this source file.
``(*!m2pim+gm2*) DEFINITION MODULE Bazbam; ...``
    Use PIM dialect with GNU extensions to render this source file.


Algol Publication Mode:

In Algol publication mode, source text is rendered for publication of
algorithms in scientific papers and academic texts, following the format
of the Revised Algol-60 Language Report.  It is activated by passing
one of two corresponding styles as an option:

`algol`
    render reserved words lowercase underline boldface
    and builtins lowercase boldface italic
`algol_nu`
    render reserved words lowercase boldface (no underlining)
    and builtins lowercase boldface italic

The lexer automatically performs the required lowercase conversion when
this mode is activated.

Example:

``$ pygmentize -O full,style=algol -f latex -o /path/to/output /path/to/input``
    Render input file in Algol publication mode to LaTeX output.


Rendering Mode of First Class ADT Identifiers:

The rendering of standard library first class ADT identifiers is controlled
by option flag "treat_stdlib_adts_as_builtins".

When this option is turned on, standard library ADT identifiers are rendered
as builtins.  When it is turned off, they are rendered as ordinary library
identifiers.

`treat_stdlib_adts_as_builtins` (default: On)

The option is useful for dialects that support ADTs as first class objects
and provide ADTs in the standard library that would otherwise be built-in.

At present, only Modula-2 R10 supports library ADTs as first class objects
and therefore, no ADT identifiers are defined for any other dialects.

Example:

``$ pygmentize -O full,dialect=m2r10,treat_stdlib_adts_as_builtins=Off ...``
    Render standard library ADTs as ordinary library types.

.. versionchanged:: 2.1
   Added multi-dialect support.

---
## __init__
```python
from modula2 import __init__
```



---
## set_dialect
```python
from modula2 import set_dialect
```



---
## get_dialect_from_dialect_tag
```python
from modula2 import get_dialect_from_dialect_tag
```



---
## get_tokens_unprocessed
```python
from modula2 import get_tokens_unprocessed
```



---
## analyse_text
```python
from modula2 import analyse_text
```

It's Pascal-like, but does not use FUNCTION -- uses PROCEDURE
instead.

---
## __name__
```python
from nit import __name__
```

pygments.lexers.nit
~~~~~~~~~~~~~~~~~~~

Lexer for the Nit language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NitLexer
```python
from nit import NitLexer
```

For nit source.

---
## __name__
```python
from actionscript import __name__
```

pygments.lexers.actionscript
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for ActionScript and MXML.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ActionScriptLexer
```python
from actionscript import ActionScriptLexer
```

For ActionScript source code.

---
## ActionScript3Lexer
```python
from actionscript import ActionScript3Lexer
```

For ActionScript 3 source code.

---
## MxmlLexer
```python
from actionscript import MxmlLexer
```

For MXML markup.
Nested AS3 in <script> tags is highlighted by the appropriate lexer.

---
## analyse_text
```python
from actionscript import analyse_text
```



---
## __name__
```python
from qlik import __name__
```

pygments.lexers.qlik
~~~~~~~~~~~~~~~~~~~~

Lexer for the qlik scripting language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## QlikLexer
```python
from qlik import QlikLexer
```

Lexer for qlik code, including .qvs files

---
## __name__
```python
from apl import __name__
```

pygments.lexers.apl
~~~~~~~~~~~~~~~~~~~

Lexers for APL.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## APLLexer
```python
from apl import APLLexer
```

A simple APL lexer.

---
## __name__
```python
from _cl_builtins import __name__
```

pygments.lexers._cl_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ANSI Common Lisp builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from _mql_builtins import __name__
```

pygments.lexers._mql_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Builtins for the MqlLexer.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from srcinfo import __name__
```

pygments.lexers.srcinfo
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for .SRCINFO files used by Arch Linux Packages.

The description of the format can be found in the wiki:
https://wiki.archlinux.org/title/.SRCINFO

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SrcinfoLexer
```python
from srcinfo import SrcinfoLexer
```

Lexer for .SRCINFO files used by Arch Linux Packages.
    

---
## __name__
```python
from archetype import __name__
```

pygments.lexers.archetype
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Archetype-related syntaxes, including ODIN, ADL and cADL.

For uses of this syntax, see the openEHR archetypes <http://www.openEHR.org/ckm>

Contributed by Thomas Beale <https://github.com/wolandscat>,
<https://bitbucket.org/thomas_beale>.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AtomsLexer
```python
from archetype import AtomsLexer
```

Lexer for Values used in ADL and ODIN.

.. versionadded:: 2.1

---
## OdinLexer
```python
from archetype import OdinLexer
```

Lexer for ODIN syntax.

---
## CadlLexer
```python
from archetype import CadlLexer
```

Lexer for cADL syntax.

---
## AdlLexer
```python
from archetype import AdlLexer
```

Lexer for ADL syntax.

---
## PythonLexer
```python
from python import PythonLexer
```

For Python source code (version 3.x).

.. versionchanged:: 2.5
   This is now the default ``PythonLexer``.  It is still available as the
   alias ``Python3Lexer``.

---
## Python2Lexer
```python
from python import Python2Lexer
```

For Python 2.x source code.

.. versionchanged:: 2.5
   This class has been renamed from ``PythonLexer``.  ``PythonLexer`` now
   refers to the Python 3 variant.  File name patterns like ``*.py`` have
   been moved to Python 3 as well.

---
## _PythonConsoleLexerBase
```python
from python import _PythonConsoleLexerBase
```



---
## PythonConsoleLexer
```python
from python import PythonConsoleLexer
```

For Python console output or doctests, such as:

.. sourcecode:: pycon

    >>> a = 'foo'
    >>> print(a)
    foo
    >>> 1 / 0
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ZeroDivisionError: integer division or modulo by zero

Additional options:

`python3`
    Use Python 3 lexer for code.  Default is ``True``.

    .. versionadded:: 1.0
    .. versionchanged:: 2.5
       Now defaults to ``True``.

---
## PythonTracebackLexer
```python
from python import PythonTracebackLexer
```

For Python 3.x tracebacks, with support for chained exceptions.

.. versionchanged:: 2.5
   This is now the default ``PythonTracebackLexer``.  It is still available
   as the alias ``Python3TracebackLexer``.

---
## Python2TracebackLexer
```python
from python import Python2TracebackLexer
```

For Python tracebacks.

.. versionchanged:: 2.5
   This class has been renamed from ``PythonTracebackLexer``.
   ``PythonTracebackLexer`` now refers to the Python 3 variant.

---
## CythonLexer
```python
from python import CythonLexer
```

For Pyrex and Cython source code.

---
## DgLexer
```python
from python import DgLexer
```

Lexer for dg,
a functional and object-oriented programming language
running on the CPython 3 VM.

---
## NumPyLexer
```python
from python import NumPyLexer
```

A Python lexer recognizing Numerical Python builtins.

---
## innerstring_rules
```python
from python import innerstring_rules
```



---
## fstring_rules
```python
from python import fstring_rules
```



---
## analyse_text
```python
from python import analyse_text
```



---
## get_tokens_unprocessed
```python
from python import get_tokens_unprocessed
```



---
## _ReplaceInnerCode
```python
from python import _ReplaceInnerCode
```



---
## __name__
```python
from _csound_builtins import __name__
```

pygments.lexers._csound_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from factor import __name__
```

pygments.lexers.factor
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Factor language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FactorLexer
```python
from factor import FactorLexer
```

Lexer for the Factor language.

---
## __name__
```python
from dalvik import __name__
```

pygments.lexers.dalvik
~~~~~~~~~~~~~~~~~~~~~~

Pygments lexers for Dalvik VM-related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SmaliLexer
```python
from dalvik import SmaliLexer
```

For Smali (Android/Dalvik) assembly
code.

---
## analyse_text
```python
from dalvik import analyse_text
```



---
## __name__
```python
from go import __name__
```

pygments.lexers.go
~~~~~~~~~~~~~~~~~~

Lexers for the Google Go language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GoLexer
```python
from go import GoLexer
```

For Go source.

---
## __name__
```python
from berry import __name__
```

pygments.lexers.berry
~~~~~~~~~~~~~~~~~~~~~

Lexer for Berry.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BerryLexer
```python
from berry import BerryLexer
```

For Berry source code.

---
## __name__
```python
from unicon import __name__
```

pygments.lexers.unicon
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Icon and Unicon languages, including ucode VM.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## UniconLexer
```python
from unicon import UniconLexer
```

For Unicon source code.

---
## IconLexer
```python
from unicon import IconLexer
```

Lexer for Icon.

---
## UcodeLexer
```python
from unicon import UcodeLexer
```

Lexer for Icon ucode files.

---
## analyse_text
```python
from unicon import analyse_text
```

endsuspend and endrepeat are unique to this language, and
\self, /self doesn't seem to get used anywhere else either.

---
## __name__
```python
from _usd_builtins import __name__
```

pygments.lexers._usd_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A collection of known USD-related keywords, attributes, and types.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from cddl import __name__
```

pygments.lexers.cddl
~~~~~~~~~~~~~~~~~~~~

Lexer for the Concise data definition language (CDDL), a notational
convention to express CBOR and JSON data structures.

More information:
https://datatracker.ietf.org/doc/rfc8610/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CddlLexer
```python
from cddl import CddlLexer
```

Lexer for CDDL definitions.

---
## __name__
```python
from dylan import __name__
```

pygments.lexers.dylan
~~~~~~~~~~~~~~~~~~~~~

Lexers for the Dylan language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DylanLexer
```python
from dylan import DylanLexer
```

For the Dylan language.

---
## DylanLidLexer
```python
from dylan import DylanLidLexer
```

For Dylan LID (Library Interchange Definition) files.

---
## DylanConsoleLexer
```python
from dylan import DylanConsoleLexer
```

For Dylan interactive console output.

This is based on a copy of the RubyConsoleLexer.

---
## get_tokens_unprocessed
```python
from dylan import get_tokens_unprocessed
```



---
## __name__
```python
from make import __name__
```

pygments.lexers.make
~~~~~~~~~~~~~~~~~~~~

Lexers for Makefiles and similar.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MakefileLexer
```python
from make import MakefileLexer
```

Lexer for BSD and GNU make extensions (lenient enough to handle both in
the same file even).

*Rewritten in Pygments 0.10.*

---
## BaseMakefileLexer
```python
from make import BaseMakefileLexer
```

Lexer for simple Makefiles (no preprocessing).

---
## CMakeLexer
```python
from make import CMakeLexer
```

Lexer for CMake files.

---
## get_tokens_unprocessed
```python
from make import get_tokens_unprocessed
```



---
## analyse_text
```python
from make import analyse_text
```



---
## __name__
```python
from diff import __name__
```

pygments.lexers.diff
~~~~~~~~~~~~~~~~~~~~

Lexers for diff/patch formats.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DiffLexer
```python
from diff import DiffLexer
```

Lexer for unified or context-style diffs or patches.

---
## DarcsPatchLexer
```python
from diff import DarcsPatchLexer
```

DarcsPatchLexer is a lexer for the various versions of the darcs patch
format.  Examples of this format are derived by commands such as
``darcs annotate --patch`` and ``darcs send``.

---
## WDiffLexer
```python
from diff import WDiffLexer
```

A wdiff lexer.

Note that:

* It only works with normal output (without options like ``-l``).
* If the target files contain "[-", "-]", "{+", or "+}",
  especially they are unbalanced, the lexer will get confused.

---
## analyse_text
```python
from diff import analyse_text
```



---
## __name__
```python
from xorg import __name__
```

pygments.lexers.xorg
~~~~~~~~~~~~~~~~~~~~

Lexers for Xorg configs.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## XorgLexer
```python
from xorg import XorgLexer
```

Lexer for xorg.conf files.

---
## __name__
```python
from trafficscript import __name__
```

pygments.lexers.trafficscript
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for RiverBed's TrafficScript (RTS) language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RtsLexer
```python
from trafficscript import RtsLexer
```

For Riverbed Stingray Traffic Manager

---
## __name__
```python
from kuin import __name__
```

pygments.lexers.kuin
~~~~~~~~~~~~~~~~~~~~

Lexers for the Kuin language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## KuinLexer
```python
from kuin import KuinLexer
```

For Kuin source code.

---
## JavaLexer
```python
from jvm import JavaLexer
```

For Java source code.

---
## AspectJLexer
```python
from jvm import AspectJLexer
```

For AspectJ source code.

---
## ScalaLexer
```python
from jvm import ScalaLexer
```

For Scala source code.

---
## GosuLexer
```python
from jvm import GosuLexer
```

For Gosu source code.

---
## GosuTemplateLexer
```python
from jvm import GosuTemplateLexer
```

For Gosu templates.

---
## GroovyLexer
```python
from jvm import GroovyLexer
```

For Groovy source code.

---
## IokeLexer
```python
from jvm import IokeLexer
```

For Ioke (a strongly typed, dynamic,
prototype based programming language) source.

---
## ClojureLexer
```python
from jvm import ClojureLexer
```

Lexer for Clojure source code.

---
## ClojureScriptLexer
```python
from jvm import ClojureScriptLexer
```

Lexer for ClojureScript source code.

---
## TeaLangLexer
```python
from jvm import TeaLangLexer
```

For Tea source code. Only used within a
TeaTemplateLexer.

.. versionadded:: 1.5

---
## CeylonLexer
```python
from jvm import CeylonLexer
```

For Ceylon source code.

---
## KotlinLexer
```python
from jvm import KotlinLexer
```

For Kotlin source code.

---
## XtendLexer
```python
from jvm import XtendLexer
```

For Xtend source code.

---
## PigLexer
```python
from jvm import PigLexer
```

For Pig Latin source code.

---
## GoloLexer
```python
from jvm import GoloLexer
```

For Golo source code.

---
## JasminLexer
```python
from jvm import JasminLexer
```

For Jasmin assembly code.

---
## SarlLexer
```python
from jvm import SarlLexer
```

For SARL source code.

---
## get_tokens_unprocessed
```python
from jvm import get_tokens_unprocessed
```



---
## analyse_text
```python
from jvm import analyse_text
```



---
## __name__
```python
from smv import __name__
```

pygments.lexers.smv
~~~~~~~~~~~~~~~~~~~

Lexers for the SMV languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NuSMVLexer
```python
from smv import NuSMVLexer
```

Lexer for the NuSMV language.

---
## __name__
```python
from math import __name__
```

Utility functions for math.

---
## __name__
```python
from tact import __name__
```

pygments.lexers.tact
~~~~~~~~~~~~~~~~~~~~

Lexers for Tact.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TactLexer
```python
from tact import TactLexer
```

For Tact source code.

---
## __name__
```python
from promql import __name__
```

pygments.lexers.promql
~~~~~~~~~~~~~~~~~~~~~~

Lexer for Prometheus Query Language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PromQLLexer
```python
from promql import PromQLLexer
```

For PromQL queries.

For details about the grammar see:
https://github.com/prometheus/prometheus/tree/master/promql/parser

.. versionadded: 2.7

---
## __name__
```python
from php import __name__
```

pygments.lexers.php
~~~~~~~~~~~~~~~~~~~

Lexers for PHP and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ZephirLexer
```python
from php import ZephirLexer
```

For Zephir language source code.

Zephir is a compiled high level language aimed
to the creation of C-extensions for PHP.

---
## PsyshConsoleLexer
```python
from php import PsyshConsoleLexer
```

For PsySH console output, such as:

.. sourcecode:: psysh

    >>> $greeting = function($name): string {
    ...     return "Hello, {$name}";
    ... };
    => Closure($name): string {#2371 …3}
    >>> $greeting('World')
    => "Hello, World"

---
## PhpLexer
```python
from php import PhpLexer
```

For PHP source code.
For PHP embedded in HTML, use the `HtmlPhpLexer`.

Additional options accepted:

`startinline`
    If given and ``True`` the lexer starts highlighting with
    php code (i.e.: no starting ``<?php`` required).  The default
    is ``False``.
`funcnamehighlighting`
    If given and ``True``, highlight builtin function names
    (default: ``True``).
`disabledmodules`
    If given, must be a list of module names whose function names
    should not be highlighted. By default all modules are highlighted
    except the special ``'unknown'`` module that includes functions
    that are known to php but are undocumented.

    To get a list of allowed modules have a look into the
    `_php_builtins` module:

    .. sourcecode:: pycon

        >>> from pygments.lexers._php_builtins import MODULES
        >>> MODULES.keys()
        ['PHP Options/Info', 'Zip', 'dba', ...]

    In fact the names of those modules match the module names from
    the php documentation.

---
## __init__
```python
from php import __init__
```



---
## get_tokens_unprocessed
```python
from php import get_tokens_unprocessed
```



---
## analyse_text
```python
from php import analyse_text
```



---
## __name__
```python
from sql import __name__
```

Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.

---
## language_callback
```python
from sql import language_callback
```

Parse the content of a $-string using a lexer

The lexer is chosen looking for a nearby LANGUAGE or assumed as
plpgsql if inside a DO statement and no LANGUAGE has been found.

---
## PostgresBase
```python
from sql import PostgresBase
```

Base class for Postgres-related lexers.

This is implemented as a mixin to avoid the Lexer metaclass kicking in.
this way the different lexer don't have a common Lexer ancestor. If they
had, _tokens could be created on this ancestor and not updated for the
other classes, resulting e.g. in PL/pgSQL parsed as SQL. This shortcoming
seem to suggest that regexp lexers are not really subclassable.

---
## PostgresLexer
```python
from sql import PostgresLexer
```

Lexer for the PostgreSQL dialect of SQL.

---
## PlPgsqlLexer
```python
from sql import PlPgsqlLexer
```

Handle the extra syntax in Pl/pgSQL language.

---
## PsqlRegexLexer
```python
from sql import PsqlRegexLexer
```

Extend the PostgresLexer adding support specific for psql commands.

This is not a complete psql lexer yet as it lacks prompt support
and output rendering.

---
## lookahead
```python
from sql import lookahead
```

Wrap an iterator and allow pushing back an item.

---
## PostgresConsoleLexer
```python
from sql import PostgresConsoleLexer
```

Lexer for psql sessions.

---
## PostgresExplainLexer
```python
from sql import PostgresExplainLexer
```

Handle PostgreSQL EXPLAIN output

---
## SqlLexer
```python
from sql import SqlLexer
```

Lexer for Structured Query Language. Currently, this lexer does
not recognize any special syntax except ANSI SQL.

---
## TransactSqlLexer
```python
from sql import TransactSqlLexer
```

Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to
SQL.

The list of keywords includes ODBC and keywords reserved for future use..

---
## MySqlLexer
```python
from sql import MySqlLexer
```

The Oracle MySQL lexer.

This lexer does not attempt to maintain strict compatibility with
MariaDB syntax or keywords. Although MySQL and MariaDB's common code
history suggests there may be significant overlap between the two,
compatibility between the two is not a target for this lexer.

---
## SqliteConsoleLexer
```python
from sql import SqliteConsoleLexer
```

Lexer for example sessions using sqlite3.

---
## RqlLexer
```python
from sql import RqlLexer
```

Lexer for Relation Query Language.

---
## get_tokens_unprocessed
```python
from sql import get_tokens_unprocessed
```



---
## _get_lexer
```python
from sql import _get_lexer
```



---
## __init__
```python
from sql import __init__
```



---
## __iter__
```python
from sql import __iter__
```



---
## send
```python
from sql import send
```



---
## __next__
```python
from sql import __next__
```



---
## analyse_text
```python
from sql import analyse_text
```



---
## __name__
```python
from x10 import __name__
```

pygments.lexers.x10
~~~~~~~~~~~~~~~~~~~

Lexers for the X10 programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## X10Lexer
```python
from x10 import X10Lexer
```

For the X10 language.

---
## __name__
```python
from _mapping import __name__
```



---
## __name__
```python
from gcodelexer import __name__
```

pygments.lexers.gcodelexer
~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the G Code Language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GcodeLexer
```python
from gcodelexer import GcodeLexer
```

For gcode source code.

---
## __name__
```python
from praat import __name__
```

pygments.lexers.praat
~~~~~~~~~~~~~~~~~~~~~

Lexer for Praat

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PraatLexer
```python
from praat import PraatLexer
```

For Praat scripts.

---
## __name__
```python
from lean import __name__
```

pygments.lexers.lean
~~~~~~~~~~~~~~~~~~~~

Lexers for the Lean theorem prover.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Lean3Lexer
```python
from lean import Lean3Lexer
```

For the Lean 3 theorem prover.

---
## Lean4Lexer
```python
from lean import Lean4Lexer
```

For the Lean 4 theorem prover.

---
## analyse_text
```python
from lean import analyse_text
```



---
## __name__
```python
from bibtex import __name__
```

pygments.lexers.bibtex
~~~~~~~~~~~~~~~~~~~~~~

Lexers for BibTeX bibliography data and styles

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BibTeXLexer
```python
from bibtex import BibTeXLexer
```

A lexer for BibTeX bibliography data format.

---
## BSTLexer
```python
from bibtex import BSTLexer
```

A lexer for BibTeX bibliography styles.

---
## open_brace_callback
```python
from bibtex import open_brace_callback
```



---
## close_brace_callback
```python
from bibtex import close_brace_callback
```



---
## __name__
```python
from whiley import __name__
```

pygments.lexers.whiley
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the Whiley language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## WhileyLexer
```python
from whiley import WhileyLexer
```

Lexer for the Whiley programming language.

---
## __name__
```python
from q import __name__
```

pygments.lexers.q
~~~~~~~~~~~~~~~~~

Lexer for the Q programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## KLexer
```python
from q import KLexer
```

For K source code.

---
## QLexer
```python
from q import QLexer
```

For `Q <https://code.kx.com/>`_ source code.

---
## __name__
```python
from snobol import __name__
```

pygments.lexers.snobol
~~~~~~~~~~~~~~~~~~~~~~

Lexers for the SNOBOL language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## SnobolLexer
```python
from snobol import SnobolLexer
```

Lexer for the SNOBOL4 programming language.

Recognizes the common ASCII equivalents of the original SNOBOL4 operators.
Does not require spaces around binary operators.

---
## __name__
```python
from _mysql_builtins import __name__
```

pygments.lexers._mysql_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Self-updating data files for the MySQL lexer.

Run with `python -I` to update.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## update_myself
```python
from _mysql_builtins import update_myself
```



---
## parse_lex_keywords
```python
from _mysql_builtins import parse_lex_keywords
```

Parse keywords in lex.h.

---
## parse_lex_optimizer_hints
```python
from _mysql_builtins import parse_lex_optimizer_hints
```

Parse optimizer hints in lex.h.

---
## parse_lex_functions
```python
from _mysql_builtins import parse_lex_functions
```

Parse MySQL function names from lex.h.

---
## parse_item_create_functions
```python
from _mysql_builtins import parse_item_create_functions
```

Parse MySQL function names from item_create.cc.

---
## update_content
```python
from _mysql_builtins import update_content
```

Overwrite this file with content parsed from MySQL's source code.

---
## __name__
```python
from webidl import __name__
```

pygments.lexers.webidl
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Web IDL, including some extensions.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## WebIDLLexer
```python
from webidl import WebIDLLexer
```

For Web IDL.

---
## __name__
```python
from rita import __name__
```

pygments.lexers.rita
~~~~~~~~~~~~~~~~~~~~

Lexers for RITA language

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RitaLexer
```python
from rita import RitaLexer
```

Lexer for RITA.

---
## __name__
```python
from haskell import __name__
```

pygments.lexers.haskell
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Haskell and related languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## HaskellLexer
```python
from haskell import HaskellLexer
```

A Haskell lexer based on the lexemes defined in the Haskell 98 Report.

---
## HspecLexer
```python
from haskell import HspecLexer
```

A Haskell lexer with support for Hspec constructs.

---
## IdrisLexer
```python
from haskell import IdrisLexer
```

A lexer for the dependently typed programming language Idris.

Based on the Haskell and Agda Lexer.

---
## AgdaLexer
```python
from haskell import AgdaLexer
```

For the Agda dependently typed functional programming language and
proof assistant.

---
## CryptolLexer
```python
from haskell import CryptolLexer
```

FIXME: A Cryptol2 lexer based on the lexemes defined in the Haskell 98 Report.

---
## LiterateLexer
```python
from haskell import LiterateLexer
```

Base class for lexers of literate file formats based on LaTeX or Bird-style
(prefixing each code line with ">").

Additional options accepted:

`litstyle`
    If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
    is autodetected: if the first non-whitespace character in the source
    is a backslash or percent character, LaTeX is assumed, else Bird.

---
## LiterateHaskellLexer
```python
from haskell import LiterateHaskellLexer
```

For Literate Haskell (Bird-style or LaTeX) source.

Additional options accepted:

`litstyle`
    If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
    is autodetected: if the first non-whitespace character in the source
    is a backslash or percent character, LaTeX is assumed, else Bird.

---
## LiterateIdrisLexer
```python
from haskell import LiterateIdrisLexer
```

For Literate Idris (Bird-style or LaTeX) source.

Additional options accepted:

`litstyle`
    If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
    is autodetected: if the first non-whitespace character in the source
    is a backslash or percent character, LaTeX is assumed, else Bird.

---
## LiterateAgdaLexer
```python
from haskell import LiterateAgdaLexer
```

For Literate Agda source.

Additional options accepted:

`litstyle`
    If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
    is autodetected: if the first non-whitespace character in the source
    is a backslash or percent character, LaTeX is assumed, else Bird.

---
## LiterateCryptolLexer
```python
from haskell import LiterateCryptolLexer
```

For Literate Cryptol (Bird-style or LaTeX) source.

Additional options accepted:

`litstyle`
    If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
    is autodetected: if the first non-whitespace character in the source
    is a backslash or percent character, LaTeX is assumed, else Bird.

---
## KokaLexer
```python
from haskell import KokaLexer
```

Lexer for the Koka language.

---
## get_tokens_unprocessed
```python
from haskell import get_tokens_unprocessed
```



---
## __init__
```python
from haskell import __init__
```



---
## GherkinLexer
```python
from testing import GherkinLexer
```

For Gherkin syntax.

---
## TAPLexer
```python
from testing import TAPLexer
```

For Test Anything Protocol (TAP) output.

---
## analyse_text
```python
from testing import analyse_text
```



---
## __name__
```python
from fortran import __name__
```

pygments.lexers.fortran
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Fortran languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FortranLexer
```python
from fortran import FortranLexer
```

Lexer for FORTRAN 90 code.

---
## FortranFixedLexer
```python
from fortran import FortranFixedLexer
```

Lexer for fixed format Fortran.

---
## _lex_fortran
```python
from fortran import _lex_fortran
```

Lex a line just as free form fortran without line break.

---
## __name__
```python
from modeling import __name__
```

pygments.lexers.modeling
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for modeling languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ModelicaLexer
```python
from modeling import ModelicaLexer
```

For Modelica source code.

---
## BugsLexer
```python
from modeling import BugsLexer
```

Pygments Lexer for OpenBugs and WinBugs
models.

---
## JagsLexer
```python
from modeling import JagsLexer
```

Pygments Lexer for JAGS.

---
## StanLexer
```python
from modeling import StanLexer
```

Pygments Lexer for Stan models.

The Stan modeling language is specified in the *Stan Modeling Language
User's Guide and Reference Manual, v2.17.0*,
`pdf <https://github.com/stan-dev/stan/releases/download/v2.17.0/stan-reference-2.17.0.pdf>`__.

---
## analyse_text
```python
from modeling import analyse_text
```



---
## __name__
```python
from arturo import __name__
```

pygments.lexers.arturo
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Arturo language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ArturoLexer
```python
from arturo import ArturoLexer
```

For Arturo source code.

See `Arturo's Github <https://github.com/arturo-lang/arturo>`_
and `Arturo's Website <https://arturo-lang.io/>`_.

---
## __init__
```python
from arturo import __init__
```



---
## handle_annotated_strings
```python
from arturo import handle_annotated_strings
```

Adds syntax from another languages inside annotated strings

match args:
    1:open_string,
    2:exclamation_mark,
    3:lang_name,
    4:space_or_newline,
    5:code,
    6:close_string

---
## __name__
```python
from varnish import __name__
```

pygments.lexers.varnish
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Varnish configuration

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VCLLexer
```python
from varnish import VCLLexer
```

For Varnish Configuration Language (VCL).

---
## VCLSnippetLexer
```python
from varnish import VCLSnippetLexer
```

For Varnish Configuration Language snippets.

---
## analyse_text
```python
from varnish import analyse_text
```



---
## __name__
```python
from elm import __name__
```

pygments.lexers.elm
~~~~~~~~~~~~~~~~~~~

Lexer for the Elm programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ElmLexer
```python
from elm import ElmLexer
```

For Elm source code.

---
## __name__
```python
from asc import __name__
```

pygments.lexers.asc
~~~~~~~~~~~~~~~~~~~

Lexer for various ASCII armored files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AscLexer
```python
from asc import AscLexer
```

Lexer for ASCII armored files, containing `-----BEGIN/END ...-----` wrapped
base64 data.

---
## analyse_text
```python
from asc import analyse_text
```



---
## __name__
```python
from javascript import __name__
```

The JavaScript domain.

---
## JavascriptLexer
```python
from javascript import JavascriptLexer
```

For JavaScript source code.

---
## TypeScriptLexer
```python
from javascript import TypeScriptLexer
```

For TypeScript source code.

---
## KalLexer
```python
from javascript import KalLexer
```

For Kal source code.

---
## LiveScriptLexer
```python
from javascript import LiveScriptLexer
```

For LiveScript source code.

---
## DartLexer
```python
from javascript import DartLexer
```

For Dart source code.

---
## LassoLexer
```python
from javascript import LassoLexer
```

For Lasso source code, covering both Lasso 9
syntax and LassoScript for Lasso 8.6 and earlier. For Lasso embedded in
HTML, use the `LassoHtmlLexer`.

Additional options accepted:

`builtinshighlighting`
    If given and ``True``, highlight builtin types, traits, methods, and
    members (default: ``True``).
`requiredelimiters`
    If given and ``True``, only highlight code between delimiters as Lasso
    (default: ``False``).

---
## ObjectiveJLexer
```python
from javascript import ObjectiveJLexer
```

For Objective-J source code with preprocessor directives.

---
## CoffeeScriptLexer
```python
from javascript import CoffeeScriptLexer
```

For CoffeeScript source code.

---
## MaskLexer
```python
from javascript import MaskLexer
```

For Mask markup.

---
## EarlGreyLexer
```python
from javascript import EarlGreyLexer
```

For Earl-Grey source code.

.. versionadded: 2.1

---
## JuttleLexer
```python
from javascript import JuttleLexer
```

For Juttle source code.

---
## NodeConsoleLexer
```python
from javascript import NodeConsoleLexer
```

For parsing within an interactive Node.js REPL, such as:

.. sourcecode:: nodejsrepl

    > let a = 3
    undefined
    > a
    3
    > let b = '4'
    undefined
    > b
    '4'
    > b == a
    false

.. versionadded: 2.10

---
## __init__
```python
from javascript import __init__
```



---
## get_tokens_unprocessed
```python
from javascript import get_tokens_unprocessed
```



---
## analyse_text
```python
from javascript import analyse_text
```



---
## __name__
```python
from ooc import __name__
```

pygments.lexers.ooc
~~~~~~~~~~~~~~~~~~~

Lexers for the Ooc language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## OocLexer
```python
from ooc import OocLexer
```

For Ooc source code

---
## __name__
```python
from bdd import __name__
```

pygments.lexers.bdd
~~~~~~~~~~~~~~~~~~~

Lexer for BDD(Behavior-driven development).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BddLexer
```python
from bdd import BddLexer
```

Lexer for BDD(Behavior-driven development), which highlights not only
keywords, but also comments, punctuations, strings, numbers, and variables.

---
## analyse_text
```python
from bdd import analyse_text
```



---
## __name__
```python
from julia import __name__
```

pygments.lexers.julia
~~~~~~~~~~~~~~~~~~~~~

Lexers for the Julia language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## JuliaLexer
```python
from julia import JuliaLexer
```

For Julia source code.

---
## JuliaConsoleLexer
```python
from julia import JuliaConsoleLexer
```

For Julia console sessions. Modeled after MatlabSessionLexer.

---
## analyse_text
```python
from julia import analyse_text
```



---
## get_tokens_unprocessed
```python
from julia import get_tokens_unprocessed
```



---
## __name__
```python
from hexdump import __name__
```

pygments.lexers.hexdump
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for hexadecimal dumps.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## HexdumpLexer
```python
from hexdump import HexdumpLexer
```

For typical hex dump output formats by the UNIX and GNU/Linux tools ``hexdump``,
``hd``, ``hexcat``, ``od`` and ``xxd``, and the DOS tool ``DEBUG``. For example:

.. sourcecode:: hexdump

    00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|
    00000010  02 00 3e 00 01 00 00 00  c5 48 40 00 00 00 00 00  |..>......H@.....|

The specific supported formats are the outputs of:

* ``hexdump FILE``
* ``hexdump -C FILE`` -- the `canonical` format used in the example.
* ``hd FILE`` -- same as ``hexdump -C FILE``.
* ``hexcat FILE``
* ``od -t x1z FILE``
* ``xxd FILE``
* ``DEBUG.EXE FILE.COM`` and entering ``d`` to the prompt.

---
## __name__
```python
from foxpro import __name__
```

pygments.lexers.foxpro
~~~~~~~~~~~~~~~~~~~~~~

Simple lexer for Microsoft Visual FoxPro source code.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FoxProLexer
```python
from foxpro import FoxProLexer
```

Lexer for Microsoft Visual FoxPro language.

FoxPro syntax allows to shorten all keywords and function names
to 4 characters.  Shortened forms are not recognized by this lexer.

---
## __name__
```python
from stata import __name__
```

Module contains tools for processing Stata files into DataFrames

The StataReader below was originally written by Joe Presbrey as part of PyDTA.
It has been extended and improved by Skipper Seabold from the Statsmodels
project who also developed the StataWriter and was finally added to pandas in
a once again improved version.

You can find more information on http://presbrey.mit.edu/PyDTA and
https://www.statsmodels.org/devel/

---
## StataLexer
```python
from stata import StataLexer
```

For Stata do files.

---
## __name__
```python
from zig import __name__
```

pygments.lexers.zig
~~~~~~~~~~~~~~~~~~~

Lexers for Zig.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ZigLexer
```python
from zig import ZigLexer
```

Lexer for the Zig language.

grammar: https://ziglang.org/documentation/master/#Grammar

---
## __name__
```python
from grammar_notation import __name__
```

pygments.lexers.grammar_notation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for grammar notations like BNF.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BnfLexer
```python
from grammar_notation import BnfLexer
```

This lexer is for grammar notations which are similar to
original BNF.

In order to maximize a number of targets of this lexer,
let's decide some designs:

* We don't distinguish `Terminal Symbol`.

* We do assume that `NonTerminal Symbol` are always enclosed
  with arrow brackets.

* We do assume that `NonTerminal Symbol` may include
  any printable characters except arrow brackets and ASCII 0x20.
  This assumption is for `RBNF <http://www.rfc-base.org/txt/rfc-5511.txt>`_.

* We do assume that target notation doesn't support comment.

* We don't distinguish any operators and punctuation except
  `::=`.

Though these decision making might cause too minimal highlighting
and you might be disappointed, but it is reasonable for us.

---
## AbnfLexer
```python
from grammar_notation import AbnfLexer
```

Lexer for IETF 7405 ABNF.

(Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_) grammars.

---
## JsgfLexer
```python
from grammar_notation import JsgfLexer
```

For JSpeech Grammar Format grammars.

---
## PegLexer
```python
from grammar_notation import PegLexer
```

This lexer is for Parsing Expression Grammars (PEG).

Various implementations of PEG have made different decisions
regarding the syntax, so let's try to be accommodating:

* `<-`, `←`, `:`, and `=` are all accepted as rule operators.

* Both `|` and `/` are choice operators.

* `^`, `↑`, and `~` are cut operators.

* A single `a-z` character immediately before a string, or
  multiple `a-z` characters following a string, are part of the
  string (e.g., `r"..."` or `"..."ilmsuxa`).

---
## __name__
```python
from bare import __name__
```

pygments.lexers.bare
~~~~~~~~~~~~~~~~~~~~

Lexer for the BARE schema.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BareLexer
```python
from bare import BareLexer
```

For BARE schema source.

---
## __name__
```python
from openscad import __name__
```

pygments.lexers.openscad
~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for the OpenSCAD languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## OpenScadLexer
```python
from openscad import OpenScadLexer
```

For openSCAD code.
    

---
## __name__
```python
from dotnet import __name__
```

pygments.lexers.dotnet
~~~~~~~~~~~~~~~~~~~~~~

Lexers for .net languages.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CSharpLexer
```python
from dotnet import CSharpLexer
```

For C# source code.

Additional options accepted:

`unicodelevel`
  Determines which Unicode characters this lexer allows for identifiers.
  The possible values are:

  * ``none`` -- only the ASCII letters and numbers are allowed. This
    is the fastest selection.
  * ``basic`` -- all Unicode characters from the specification except
    category ``Lo`` are allowed.
  * ``full`` -- all Unicode characters as specified in the C# specs
    are allowed.  Note that this means a considerable slowdown since the
    ``Lo`` category has more than 40,000 characters in it!

  The default value is ``basic``.

  .. versionadded:: 0.8

---
## NemerleLexer
```python
from dotnet import NemerleLexer
```

For Nemerle source code.

Additional options accepted:

`unicodelevel`
  Determines which Unicode characters this lexer allows for identifiers.
  The possible values are:

  * ``none`` -- only the ASCII letters and numbers are allowed. This
    is the fastest selection.
  * ``basic`` -- all Unicode characters from the specification except
    category ``Lo`` are allowed.
  * ``full`` -- all Unicode characters as specified in the C# specs
    are allowed.  Note that this means a considerable slowdown since the
    ``Lo`` category has more than 40,000 characters in it!

  The default value is ``basic``.

---
## BooLexer
```python
from dotnet import BooLexer
```

For Boo source code.

---
## VbNetLexer
```python
from dotnet import VbNetLexer
```

For Visual Basic.NET source code.
Also LibreOffice Basic, OpenOffice Basic, and StarOffice Basic.

---
## GenericAspxLexer
```python
from dotnet import GenericAspxLexer
```

Lexer for ASP.NET pages.

---
## CSharpAspxLexer
```python
from dotnet import CSharpAspxLexer
```

Lexer for highlighting C# within ASP.NET pages.

---
## VbNetAspxLexer
```python
from dotnet import VbNetAspxLexer
```

Lexer for highlighting Visual Basic.net within ASP.NET pages.

---
## FSharpLexer
```python
from dotnet import FSharpLexer
```

For the F# language (version 3.0).

---
## XppLexer
```python
from dotnet import XppLexer
```

For X++ source code. This is based loosely on the CSharpLexer

---
## __init__
```python
from dotnet import __init__
```



---
## analyse_text
```python
from dotnet import analyse_text
```

F# doesn't have that many unique features -- |> and <| are weak
indicators.

---
## __name__
```python
from fantom import __name__
```

pygments.lexers.fantom
~~~~~~~~~~~~~~~~~~~~~~

Lexer for the Fantom language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FantomLexer
```python
from fantom import FantomLexer
```

For Fantom source code.

---
## s
```python
from fantom import s
```



---
## __name__
```python
from special import __name__
```

pygments.lexers.special
~~~~~~~~~~~~~~~~~~~~~~~

Special lexers.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TextLexer
```python
from special import TextLexer
```

"Null" lexer, doesn't highlight anything.

---
## OutputLexer
```python
from special import OutputLexer
```

Simple lexer that highlights everything as ``Token.Generic.Output``.

---
## RawTokenLexer
```python
from special import RawTokenLexer
```

Recreate a token stream formatted with the `RawTokenFormatter`.

Additional options accepted:

`compress`
    If set to ``"gz"`` or ``"bz2"``, decompress the token stream with
    the given compression algorithm before lexing (default: ``""``).

---
## get_tokens_unprocessed
```python
from special import get_tokens_unprocessed
```



---
## analyse_text
```python
from special import analyse_text
```



---
## __init__
```python
from special import __init__
```



---
## get_tokens
```python
from special import get_tokens
```



---
## __name__
```python
from yang import __name__
```

pygments.lexers.yang
~~~~~~~~~~~~~~~~~~~~

Lexer for the YANG 1.1 modeling language. See :rfc:`7950`.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## YangLexer
```python
from yang import YangLexer
```

Lexer for YANG, based on RFC7950.

---
## __name__
```python
from fift import __name__
```

pygments.lexers.fift
~~~~~~~~~~~~~~~~~~~~

Lexers for fift.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FiftLexer
```python
from fift import FiftLexer
```

For Fift source code.

---
## __name__
```python
from ezhil import __name__
```

pygments.lexers.ezhil
~~~~~~~~~~~~~~~~~~~~~

Pygments lexers for Ezhil language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## EzhilLexer
```python
from ezhil import EzhilLexer
```

Lexer for Ezhil, a Tamil script-based programming language.

---
## analyse_text
```python
from ezhil import analyse_text
```

This language uses Tamil-script. We'll assume that if there's a
decent amount of Tamil-characters, it's this language. This assumption
is obviously horribly off if someone uses string literals in tamil
in another language.

---
## __init__
```python
from ezhil import __init__
```



---
## __name__
```python
from ride import __name__
```

pygments.lexers.ride
~~~~~~~~~~~~~~~~~~~~

Lexer for the Ride programming language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RideLexer
```python
from ride import RideLexer
```

For Ride source code.

---
## __name__
```python
from _scheme_builtins import __name__
```

pygments.lexers._scheme_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Scheme builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from devicetree import __name__
```

pygments.lexers.devicetree
~~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Devicetree language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DevicetreeLexer
```python
from devicetree import DevicetreeLexer
```

Lexer for Devicetree files.

---
## __name__
```python
from macaulay2 import __name__
```

pygments.lexers.macaulay2
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexer for Macaulay2.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Macaulay2Lexer
```python
from macaulay2 import Macaulay2Lexer
```

Lexer for Macaulay2, a software system for research in algebraic geometry.

---
## __name__
```python
from urbi import __name__
```

pygments.lexers.urbi
~~~~~~~~~~~~~~~~~~~~

Lexers for UrbiScript language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## UrbiscriptLexer
```python
from urbi import UrbiscriptLexer
```

For UrbiScript source code.

---
## blob_callback
```python
from urbi import blob_callback
```



---
## analyse_text
```python
from urbi import analyse_text
```

This is fairly similar to C and others, but freezeif and
waituntil are unique keywords.

---
## __name__
```python
from haxe import __name__
```

pygments.lexers.haxe
~~~~~~~~~~~~~~~~~~~~

Lexers for Haxe and related stuff.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## HaxeLexer
```python
from haxe import HaxeLexer
```

For Haxe source code.

---
## HxmlLexer
```python
from haxe import HxmlLexer
```

Lexer for haXe build files.

---
## preproc_callback
```python
from haxe import preproc_callback
```



---
## analyse_text
```python
from haxe import analyse_text
```



---
## __name__
```python
from func import __name__
```

pygments.lexers.func
~~~~~~~~~~~~~~~~~~~~

Lexers for FunC.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FuncLexer
```python
from func import FuncLexer
```

For FunC source code.

---
## __name__
```python
from data import __name__
```

Utilities for processing .test files containing test case descriptions.

---
## YamlLexerContext
```python
from data import YamlLexerContext
```

Indentation context for the YAML lexer.

---
## YamlLexer
```python
from data import YamlLexer
```

Lexer for YAML, a human-friendly data serialization
language.

---
## JsonLexer
```python
from data import JsonLexer
```

For JSON data structures.

Javascript-style comments are supported (like ``/* */`` and ``//``),
though comments are not part of the JSON specification.
This allows users to highlight JSON as it is used in the wild.

No validation is performed on the input JSON document.

---
## JsonBareObjectLexer
```python
from data import JsonBareObjectLexer
```

For JSON data structures (with missing object curly braces).

.. deprecated:: 2.8.0

   Behaves the same as `JsonLexer` now.

---
## JsonLdLexer
```python
from data import JsonLdLexer
```

For JSON-LD linked data.

---
## __init__
```python
from data import __init__
```



---
## something
```python
from data import something
```

Do not produce empty tokens.

---
## reset_indent
```python
from data import reset_indent
```

Reset the indentation levels.

---
## save_indent
```python
from data import save_indent
```

Save a possible indentation level.

---
## set_indent
```python
from data import set_indent
```

Set the previously saved indentation level.

---
## set_block_scalar_indent
```python
from data import set_block_scalar_indent
```

Set an explicit indentation level for a block scalar.

---
## parse_block_scalar_empty_line
```python
from data import parse_block_scalar_empty_line
```

Process an empty line in a block scalar.

---
## parse_block_scalar_indent
```python
from data import parse_block_scalar_indent
```

Process indentation spaces in a block scalar.

---
## parse_plain_scalar_indent
```python
from data import parse_plain_scalar_indent
```

Process indentation spaces in a plain scalar.

---
## get_tokens_unprocessed
```python
from data import get_tokens_unprocessed
```



---
## callback
```python
from data import callback
```



---
## __name__
```python
from _ada_builtins import __name__
```

pygments.lexers._ada_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ada builtins.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from yara import __name__
```

pygments.lexers.yara
~~~~~~~~~~~~~~~~~~~~

Lexers for YARA.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## YaraLexer
```python
from yara import YaraLexer
```

For YARA rules

---
## __name__
```python
from pointless import __name__
```

pygments.lexers.pointless
~~~~~~~~~~~~~~~~~~~~~~~~~

Lexers for Pointless.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PointlessLexer
```python
from pointless import PointlessLexer
```

For Pointless source code.

---
## __name__
```python
from asn1 import __name__
```

pygments.lexers.asn1
~~~~~~~~~~~~~~~~~~~~

Pygments lexers for ASN.1.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## word_sequences
```python
from asn1 import word_sequences
```



---
## Asn1Lexer
```python
from asn1 import Asn1Lexer
```

Lexer for ASN.1 module definition

---
## __name__
```python
from _tsql_builtins import __name__
```

pygments.lexers._tsql_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These are manually translated lists from https://msdn.microsoft.com.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## __name__
```python
from wgsl import __name__
```

pygments.lexers.wgsl
~~~~~~~~~~~~~~~~~~~~

Lexer for the WebGPU Shading Language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## WgslLexer
```python
from wgsl import WgslLexer
```

Lexer for the WebGPU Shading Language.

---
## __name__
```python
from rust import __name__
```

pygments.lexers.rust
~~~~~~~~~~~~~~~~~~~~

Lexers for the Rust language.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RustLexer
```python
from rust import RustLexer
```

Lexer for the Rust programming language (version 1.47).

---
## TerminalFormatter
```python
from terminal import TerminalFormatter
```

Format tokens with ANSI color sequences, for output in a text console.
Color sequences are terminated at newlines, so that paging the output
works correctly.

The `get_style_defs()` method doesn't do anything special since there is
no support for common styles.

Options accepted:

`bg`
    Set to ``"light"`` or ``"dark"`` depending on the terminal's background
    (default: ``"light"``).

`colorscheme`
    A dictionary mapping token types to (lightbg, darkbg) color names or
    ``None`` (default: ``None`` = use builtin colorscheme).

`linenos`
    Set to ``True`` to have line numbers on the terminal output as well
    (default: ``False`` = no line numbers).

---
## format
```python
from terminal import format
```



---
## _write_lineno
```python
from terminal import _write_lineno
```



---
## _get_color
```python
from terminal import _get_color
```



---
## format_unencoded
```python
from terminal import format_unencoded
```



---
## escape_html
```python
from html import escape_html
```

Escape &, <, > as well as single and double quotes for HTML.

---
## webify
```python
from html import webify
```



---
## _get_ttype_class
```python
from html import _get_ttype_class
```



---
## HtmlFormatter
```python
from html import HtmlFormatter
```

Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed
in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option).
The ``<div>``'s CSS class can be set by the `cssclass` option.

If the `linenos` option is set to ``"table"``, the ``<pre>`` is
additionally wrapped inside a ``<table>`` which has one row and two
cells: one containing the line numbers and one containing the code.
Example:

.. sourcecode:: html

    <div class="highlight" >
    <table><tr>
      <td class="linenos" title="click to toggle"
        onclick="with (this.firstChild.style)
                 { display = (display == '') ? 'none' : '' }">
        <pre>1
        2</pre>
      </td>
      <td class="code">
        <pre><span class="Ke">def </span><span class="NaFu">foo</span>(bar):
          <span class="Ke">pass</span>
        </pre>
      </td>
    </tr></table></div>

(whitespace added to improve clarity).

A list of lines can be specified using the `hl_lines` option to make these
lines highlighted (as of Pygments 0.11).

With the `full` option, a complete HTML 4 document is output, including
the style definitions inside a ``<style>`` tag, or in a separate file if
the `cssfile` option is given.

When `tagsfile` is set to the path of a ctags index file, it is used to
generate hyperlinks from names to their definition.  You must enable
`lineanchors` and run ctags with the `-n` option for this to work.  The
`python-ctags` module from PyPI must be installed to use this feature;
otherwise a `RuntimeError` will be raised.

The `get_style_defs(arg='')` method of a `HtmlFormatter` returns a string
containing CSS rules for the CSS classes used by the formatter. The
argument `arg` can be used to specify additional CSS selectors that
are prepended to the classes. A call `fmter.get_style_defs('td .code')`
would result in the following CSS classes:

.. sourcecode:: css

    td .code .kw { font-weight: bold; color: #00FF00 }
    td .code .cm { color: #999999 }
    ...

If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
`get_style_defs()` method to request multiple prefixes for the tokens:

.. sourcecode:: python

    formatter.get_style_defs(['div.syntax pre', 'pre.syntax'])

The output would then look like this:

.. sourcecode:: css

    div.syntax pre .kw,
    pre.syntax .kw { font-weight: bold; color: #00FF00 }
    div.syntax pre .cm,
    pre.syntax .cm { color: #999999 }
    ...

Additional options accepted:

`nowrap`
    If set to ``True``, don't add a ``<pre>`` and a ``<div>`` tag
    around the tokens. This disables most other options (default: ``False``).

`full`
    Tells the formatter to output a "full" document, i.e. a complete
    self-contained document (default: ``False``).

`title`
    If `full` is true, the title that should be used to caption the
    document (default: ``''``).

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``). This option has no effect if the `cssfile`
    and `noclobber_cssfile` option are given and the file specified in
    `cssfile` exists.

`noclasses`
    If set to true, token ``<span>`` tags (as well as line number elements)
    will not use CSS classes, but inline styles. This is not recommended
    for larger pieces of code since it increases output size by quite a bit
    (default: ``False``).

`classprefix`
    Since the token types use relatively short class names, they may clash
    with some of your own class names. In this case you can use the
    `classprefix` option to give a string to prepend to all Pygments-generated
    CSS class names for token types.
    Note that this option also affects the output of `get_style_defs()`.

`cssclass`
    CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
    If you set this option, the default selector for `get_style_defs()`
    will be this class.

    .. versionadded:: 0.9
       If you select the ``'table'`` line numbers, the wrapping table will
       have a CSS class of this string plus ``'table'``, the default is
       accordingly ``'highlighttable'``.

`cssstyles`
    Inline CSS styles for the wrapping ``<div>`` tag (default: ``''``).

`prestyles`
    Inline CSS styles for the ``<pre>`` tag (default: ``''``).

    .. versionadded:: 0.11

`cssfile`
    If the `full` option is true and this option is given, it must be the
    name of an external file. If the filename does not include an absolute
    path, the file's path will be assumed to be relative to the main output
    file's path, if the latter can be found. The stylesheet is then written
    to this file instead of the HTML file.

    .. versionadded:: 0.6

`noclobber_cssfile`
    If `cssfile` is given and the specified file exists, the css file will
    not be overwritten. This allows the use of the `full` option in
    combination with a user specified css file. Default is ``False``.

    .. versionadded:: 1.1

`linenos`
    If set to ``'table'``, output line numbers as a table with two cells,
    one containing the line numbers, the other the whole code.  This is
    copy-and-paste-friendly, but may cause alignment problems with some
    browsers or fonts.  If set to ``'inline'``, the line numbers will be
    integrated in the ``<pre>`` tag that contains the code (that setting
    is *new in Pygments 0.8*).

    For compatibility with Pygments 0.7 and earlier, every true value
    except ``'inline'`` means the same as ``'table'`` (in particular, that
    means also ``True``).

    The default value is ``False``, which means no line numbers at all.

    **Note:** with the default ("table") line number mechanism, the line
    numbers and code can have different line heights in Internet Explorer
    unless you give the enclosing ``<pre>`` tags an explicit ``line-height``
    CSS property (you get the default line spacing with ``line-height:
    125%``).

`hl_lines`
    Specify a list of lines to be highlighted. The line numbers are always
    relative to the input (i.e. the first line is line 1) and are
    independent of `linenostart`.

    .. versionadded:: 0.11

`linenostart`
    The line number for the first line (default: ``1``).

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

`linenospecial`
    If set to a number n > 0, every nth line number is given the CSS
    class ``"special"`` (default: ``0``).

`nobackground`
    If set to ``True``, the formatter won't output the background color
    for the wrapping element (this automatically defaults to ``False``
    when there is no wrapping element [eg: no argument for the
    `get_syntax_defs` method given]) (default: ``False``).

    .. versionadded:: 0.6

`lineseparator`
    This string is output between lines of code. It defaults to ``"\n"``,
    which is enough to break a line inside ``<pre>`` tags, but you can
    e.g. set it to ``"<br>"`` to get HTML line breaks.

    .. versionadded:: 0.7

`lineanchors`
    If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
    output line in an anchor tag with an ``id`` (and `name`) of ``foo-linenumber``.
    This allows easy linking to certain lines.

    .. versionadded:: 0.9

`linespans`
    If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
    output line in a span tag with an ``id`` of ``foo-linenumber``.
    This allows easy access to lines via javascript.

    .. versionadded:: 1.6

`anchorlinenos`
    If set to `True`, will wrap line numbers in <a> tags. Used in
    combination with `linenos` and `lineanchors`.

`tagsfile`
    If set to the path of a ctags file, wrap names in anchor tags that
    link to their definitions. `lineanchors` should be used, and the
    tags file should specify line numbers (see the `-n` option to ctags).
    The tags file is assumed to be encoded in UTF-8.

    .. versionadded:: 1.6

`tagurlformat`
    A string formatting pattern used to generate links to ctags definitions.
    Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
    Defaults to an empty string, resulting in just `#prefix-number` links.

    .. versionadded:: 1.6

`filename`
    A string used to generate a filename when rendering ``<pre>`` blocks,
    for example if displaying source code. If `linenos` is set to
    ``'table'`` then the filename will be rendered in an initial row
    containing a single `<th>` which spans both columns.

    .. versionadded:: 2.1

`wrapcode`
    Wrap the code inside ``<pre>`` blocks using ``<code>``, as recommended
    by the HTML5 specification.

    .. versionadded:: 2.4

`debug_token_types`
    Add ``title`` attributes to all token ``<span>`` tags that show the
    name of the token.

    .. versionadded:: 2.10


**Subclassing the HTML formatter**

.. versionadded:: 0.7

The HTML formatter is now built in a way that allows easy subclassing, thus
customizing the output HTML code. The `format()` method calls
`self._format_lines()` which returns a generator that yields tuples of ``(1,
line)``, where the ``1`` indicates that the ``line`` is a line of the
formatted source code.

If the `nowrap` option is set, the generator is the iterated over and the
resulting HTML is output.

Otherwise, `format()` calls `self.wrap()`, which wraps the generator with
other generators. These may add some HTML code to the one generated by
`_format_lines()`, either by modifying the lines generated by the latter,
then yielding them again with ``(1, line)``, and/or by yielding other HTML
code before or after the lines, with ``(0, html)``. The distinction between
source lines and other code makes it possible to wrap the generator multiple
times.

The default `wrap()` implementation adds a ``<div>`` and a ``<pre>`` tag.

A custom `HtmlFormatter` subclass could look like this:

.. sourcecode:: python

    class CodeHtmlFormatter(HtmlFormatter):

        def wrap(self, source, *, include_div):
            return self._wrap_code(source)

        def _wrap_code(self, source):
            yield 0, '<code>'
            for i, t in source:
                if i == 1:
                    # it's a line of formatted code
                    t += '<br>'
                yield i, t
            yield 0, '</code>'

This results in wrapping the formatted lines with a ``<code>`` tag, where the
source lines are broken using ``<br>`` tags.

After calling `wrap()`, the `format()` method also adds the "line numbers"
and/or "full document" wrappers if the respective options are set. Then, all
HTML yielded by the wrapped generator is output.

---
## __init__
```python
from html import __init__
```



---
## _get_css_class
```python
from html import _get_css_class
```

Return the css class of this token type prefixed with
the classprefix option.

---
## _get_css_classes
```python
from html import _get_css_classes
```

Return the CSS classes of this token type prefixed with the classprefix option.

---
## _get_css_inline_styles
```python
from html import _get_css_inline_styles
```

Return the inline CSS styles for this token type.

---
## _create_stylesheet
```python
from html import _create_stylesheet
```



---
## get_style_defs
```python
from html import get_style_defs
```

Return CSS style definitions for the classes produced by the current
highlighting style. ``arg`` can be a string or list of selectors to
insert before the token type classes.

---
## get_token_style_defs
```python
from html import get_token_style_defs
```



---
## get_background_style_defs
```python
from html import get_background_style_defs
```



---
## get_linenos_style_defs
```python
from html import get_linenos_style_defs
```



---
## get_css_prefix
```python
from html import get_css_prefix
```



---
## _pre_style
```python
from html import _pre_style
```



---
## _linenos_style
```python
from html import _linenos_style
```



---
## _linenos_special_style
```python
from html import _linenos_special_style
```



---
## _decodeifneeded
```python
from html import _decodeifneeded
```



---
## _wrap_full
```python
from html import _wrap_full
```



---
## _wrap_tablelinenos
```python
from html import _wrap_tablelinenos
```



---
## _wrap_inlinelinenos
```python
from html import _wrap_inlinelinenos
```



---
## _wrap_lineanchors
```python
from html import _wrap_lineanchors
```



---
## _wrap_linespans
```python
from html import _wrap_linespans
```



---
## _wrap_div
```python
from html import _wrap_div
```



---
## _wrap_pre
```python
from html import _wrap_pre
```



---
## _wrap_code
```python
from html import _wrap_code
```



---
## _translate_parts
```python
from html import _translate_parts
```

HTML-escape a value and split it by newlines.

---
## _format_lines
```python
from html import _format_lines
```

Just format the tokens, without any wrapping tags.
Yield individual lines.

---
## _lookup_ctag
```python
from html import _lookup_ctag
```



---
## _highlight_lines
```python
from html import _highlight_lines
```

Highlighted the lines specified in the `hl_lines` option by
post-processing the token stream coming from `_format_lines`.

---
## wrap
```python
from html import wrap
```

Wrap the ``source``, which is a generator yielding
individual lines, in custom generators. See docstring
for `format`. Can be overridden.

---
## format_unencoded
```python
from html import format_unencoded
```

The formatting process uses several nested generators; which of
them are used is determined by the user's options.

Each generator should take at least one argument, ``inner``,
and wrap the pieces of text generated by this.

Always yield 2-tuples: (code, text). If "code" is 1, the text
is part of the original tokensource being highlighted, if it's
0, the text is some piece of wrapping. This makes it possible to
use several different wrappers that process the original source
linewise, e.g. line number generators.

---
## prefix
```python
from html import prefix
```



---
## __name__
```python
from irc import __name__
```

pygments.formatters.irc
~~~~~~~~~~~~~~~~~~~~~~~

Formatter for IRC output

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ircformat
```python
from irc import ircformat
```



---
## IRCFormatter
```python
from irc import IRCFormatter
```

Format tokens with IRC color sequences

The `get_style_defs()` method doesn't do anything special since there is
no support for common styles.

Options accepted:

`bg`
    Set to ``"light"`` or ``"dark"`` depending on the terminal's background
    (default: ``"light"``).

`colorscheme`
    A dictionary mapping token types to (lightbg, darkbg) color names or
    ``None`` (default: ``None`` = use builtin colorscheme).

`linenos`
    Set to ``True`` to have line numbers in the output as well
    (default: ``False`` = no line numbers).

---
## __init__
```python
from irc import __init__
```



---
## _write_lineno
```python
from irc import _write_lineno
```



---
## format_unencoded
```python
from irc import format_unencoded
```



---
## _load_formatters
```python
from __init__ import _load_formatters
```

Load a formatter (and all others in the module too).

---
## get_all_formatters
```python
from __init__ import get_all_formatters
```

Return a generator for all formatter classes.

---
## find_formatter_class
```python
from __init__ import find_formatter_class
```

Lookup a formatter by alias.

Returns None if not found.

---
## get_formatter_by_name
```python
from __init__ import get_formatter_by_name
```

Return an instance of a :class:`.Formatter` subclass that has `alias` in its
aliases list. The formatter is given the `options` at its instantiation.

Will raise :exc:`pygments.util.ClassNotFound` if no formatter with that
alias is found.

---
## load_formatter_from_file
```python
from __init__ import load_formatter_from_file
```

Return a `Formatter` subclass instance loaded from the provided file, relative
to the current directory.

The file is expected to contain a Formatter class named ``formattername``
(by default, CustomFormatter). Users should be very careful with the input, because
this method is equivalent to running ``eval()`` on the input file. The formatter is
given the `options` at its instantiation.

:exc:`pygments.util.ClassNotFound` is raised if there are any errors loading
the formatter.

.. versionadded:: 2.2

---
## get_formatter_for_filename
```python
from __init__ import get_formatter_for_filename
```

Return a :class:`.Formatter` subclass instance that has a filename pattern
matching `fn`. The formatter is given the `options` at its instantiation.

Will raise :exc:`pygments.util.ClassNotFound` if no formatter for that filename
is found.

---
## NullFormatter
```python
from other import NullFormatter
```

Output the text unchanged without any formatting.

---
## RawTokenFormatter
```python
from other import RawTokenFormatter
```

Format tokens as a raw representation for storing token streams.

The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later
be converted to a token stream with the `RawTokenLexer`, described in the
:doc:`lexer list <lexers>`.

Only two options are accepted:

`compress`
    If set to ``'gz'`` or ``'bz2'``, compress the output with the given
    compression algorithm after encoding (default: ``''``).
`error_color`
    If set to a color name, highlight error tokens using that color.  If
    set but with no value, defaults to ``'red'``.

    .. versionadded:: 0.11

---
## TestcaseFormatter
```python
from other import TestcaseFormatter
```

Format tokens as appropriate for a new testcase.

.. versionadded:: 2.0

---
## format
```python
from other import format
```



---
## __init__
```python
from other import __init__
```



---
## write
```python
from other import write
```



---
## flush
```python
from other import flush
```



---
## __name__
```python
from img import __name__
```

pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~

Formatter for Pixmap output.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PilNotAvailable
```python
from img import PilNotAvailable
```

When Python imaging library is not available

---
## FontNotFound
```python
from img import FontNotFound
```

When there are no usable fonts specified

---
## FontManager
```python
from img import FontManager
```

Manages a set of fonts: normal, italic, bold, etc...

---
## ImageFormatter
```python
from img import ImageFormatter
```

Create a PNG image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.

.. versionadded:: 0.10

Additional options accepted:

`image_format`
    An image format to output to that is recognised by PIL, these include:

    * "PNG" (default)
    * "JPEG"
    * "BMP"
    * "GIF"

`line_pad`
    The extra spacing (in pixels) between each line of text.

    Default: 2

`font_name`
    The font name to be used as the base font from which others, such as
    bold and italic fonts will be generated.  This really should be a
    monospace font to look sane.
    If a filename or a file-like object is specified, the user must
    provide different styles of the font.

    Default: "Courier New" on Windows, "Menlo" on Mac OS, and
             "DejaVu Sans Mono" on \*nix

`font_size`
    The font size in points to be used.

    Default: 14

`image_pad`
    The padding, in pixels to be used at each edge of the resulting image.

    Default: 10

`line_numbers`
    Whether line numbers should be shown: True/False

    Default: True

`line_number_start`
    The line number of the first line.

    Default: 1

`line_number_step`
    The step used when printing line numbers.

    Default: 1

`line_number_bg`
    The background colour (in "#123456" format) of the line number bar, or
    None to use the style background color.

    Default: "#eed"

`line_number_fg`
    The text color of the line numbers (in "#123456"-like format).

    Default: "#886"

`line_number_chars`
    The number of columns of line numbers allowable in the line number
    margin.

    Default: 2

`line_number_bold`
    Whether line numbers will be bold: True/False

    Default: False

`line_number_italic`
    Whether line numbers will be italicized: True/False

    Default: False

`line_number_separator`
    Whether a line will be drawn between the line number area and the
    source code area: True/False

    Default: True

`line_number_pad`
    The horizontal padding (in pixels) between the line number margin, and
    the source code area.

    Default: 6

`hl_lines`
    Specify a list of lines to be highlighted.

    .. versionadded:: 1.2

    Default: empty list

`hl_color`
    Specify the color for highlighting lines.

    .. versionadded:: 1.2

    Default: highlight color of the selected style

---
## GifImageFormatter
```python
from img import GifImageFormatter
```

Create a GIF image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.

.. versionadded:: 1.0

---
## JpgImageFormatter
```python
from img import JpgImageFormatter
```

Create a JPEG image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.

.. versionadded:: 1.0

---
## BmpImageFormatter
```python
from img import BmpImageFormatter
```

Create a bitmap image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.

.. versionadded:: 1.0

---
## __init__
```python
from img import __init__
```

See the class docstring for explanation of options.

---
## _get_nix_font_path
```python
from img import _get_nix_font_path
```



---
## _create_nix
```python
from img import _create_nix
```



---
## _get_mac_font_path
```python
from img import _get_mac_font_path
```



---
## _create_mac
```python
from img import _create_mac
```



---
## _lookup_win
```python
from img import _lookup_win
```



---
## _create_win
```python
from img import _create_win
```



---
## get_char_size
```python
from img import get_char_size
```

Get the character size.

---
## get_text_size
```python
from img import get_text_size
```

Get the text size (width, height).

---
## get_font
```python
from img import get_font
```

Get the font based on bold and italic flags.

---
## get_style
```python
from img import get_style
```

Get the specified style of the font if it is a variable font.
If not found, return the normal font.

---
## get_style_defs
```python
from img import get_style_defs
```



---
## _get_line_height
```python
from img import _get_line_height
```

Get the height of a line.

---
## _get_line_y
```python
from img import _get_line_y
```

Get the Y coordinate of a line number.

---
## _get_char_width
```python
from img import _get_char_width
```

Get the width of a character.

---
## _get_char_x
```python
from img import _get_char_x
```

Get the X coordinate of a character position.

---
## _get_text_pos
```python
from img import _get_text_pos
```

Get the actual position for a character and line position.

---
## _get_linenumber_pos
```python
from img import _get_linenumber_pos
```

Get the actual position for the start of a line number.

---
## _get_text_color
```python
from img import _get_text_color
```

Get the correct color for the token from the style.

---
## _get_text_bg_color
```python
from img import _get_text_bg_color
```

Get the correct background color for the token from the style.

---
## _get_style_font
```python
from img import _get_style_font
```

Get the correct font for the style.

---
## _get_image_size
```python
from img import _get_image_size
```

Get the required image size.

---
## _draw_linenumber
```python
from img import _draw_linenumber
```

Remember a line number drawable to paint later.

---
## _draw_text
```python
from img import _draw_text
```

Remember a single drawable tuple to paint later.

---
## _create_drawables
```python
from img import _create_drawables
```

Create drawables for the token content.

---
## _draw_line_numbers
```python
from img import _draw_line_numbers
```

Create drawables for the line numbers.

---
## _paint_line_number_bg
```python
from img import _paint_line_number_bg
```

Paint the line number background on the image.

---
## format
```python
from img import format
```

Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.

This implementation calculates where it should draw each token on the
pixmap, then calculates the required pixmap size and draws the items.

---
## __name__
```python
from terminal256 import __name__
```

pygments.formatters.terminal256
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for 256-color terminal output with ANSI sequences.

RGB-to-XTERM color conversion routines adapted from xterm256-conv
tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2)
by Wolfgang Frisch.

Formatter version 1.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## EscapeSequence
```python
from terminal256 import EscapeSequence
```



---
## Terminal256Formatter
```python
from terminal256 import Terminal256Formatter
```

Format tokens with ANSI color sequences, for output in a 256-color
terminal or console.  Like in `TerminalFormatter` color sequences
are terminated at newlines, so that paging the output works correctly.

The formatter takes colors from a style defined by the `style` option
and converts them to nearest ANSI 256-color escape sequences. Bold and
underline attributes from the style are preserved (and displayed).

.. versionadded:: 0.9

.. versionchanged:: 2.2
   If the used style defines foreground colors in the form ``#ansi*``, then
   `Terminal256Formatter` will map these to non extended foreground color.
   See :ref:`AnsiTerminalStyle` for more information.

.. versionchanged:: 2.4
   The ANSI color names have been updated with names that are easier to
   understand and align with colornames of other projects and terminals.
   See :ref:`this table <new-ansi-color-names>` for more information.


Options accepted:

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

`linenos`
    Set to ``True`` to have line numbers on the terminal output as well
    (default: ``False`` = no line numbers).

---
## TerminalTrueColorFormatter
```python
from terminal256 import TerminalTrueColorFormatter
```

Format tokens with ANSI color sequences, for output in a true-color
terminal or console.  Like in `TerminalFormatter` color sequences
are terminated at newlines, so that paging the output works correctly.

.. versionadded:: 2.1

Options accepted:

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

---
## __init__
```python
from terminal256 import __init__
```



---
## escape
```python
from terminal256 import escape
```



---
## color_string
```python
from terminal256 import color_string
```



---
## true_color_string
```python
from terminal256 import true_color_string
```



---
## reset_string
```python
from terminal256 import reset_string
```



---
## _build_color_table
```python
from terminal256 import _build_color_table
```



---
## _closest_color
```python
from terminal256 import _closest_color
```



---
## _color_index
```python
from terminal256 import _color_index
```



---
## _setup_styles
```python
from terminal256 import _setup_styles
```



---
## _write_lineno
```python
from terminal256 import _write_lineno
```



---
## format
```python
from terminal256 import format
```



---
## format_unencoded
```python
from terminal256 import format_unencoded
```



---
## _color_tuple
```python
from terminal256 import _color_tuple
```



---
## __name__
```python
from rtf import __name__
```

pygments.formatters.rtf
~~~~~~~~~~~~~~~~~~~~~~~

A formatter that generates RTF files.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RtfFormatter
```python
from rtf import RtfFormatter
```

Format tokens as RTF markup. This formatter automatically outputs full RTF
documents with color information and other useful stuff. Perfect for Copy and
Paste into Microsoft(R) Word(R) documents.

Please note that ``encoding`` and ``outencoding`` options are ignored.
The RTF format is ASCII natively, but handles unicode characters correctly
thanks to escape sequences.

.. versionadded:: 0.6

Additional options accepted:

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

`fontface`
    The used font family, for example ``Bitstream Vera Sans``. Defaults to
    some generic font which is supposed to have fixed width.

`fontsize`
    Size of the font used. Size is specified in half points. The
    default is 24 half-points, giving a size 12 font.

    .. versionadded:: 2.0

`linenos`
    Turn on line numbering (default: ``False``).

    .. versionadded:: 2.18

`lineno_fontsize`
    Font size for line numbers. Size is specified in half points
    (default: `fontsize`). 

    .. versionadded:: 2.18

`lineno_padding`
    Number of spaces between the (inline) line numbers and the
    source code (default: ``2``).

    .. versionadded:: 2.18

`linenostart`
    The line number for the first line (default: ``1``).

    .. versionadded:: 2.18

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

    .. versionadded:: 2.18

`lineno_color`
    Color for line numbers specified as a hex triplet, e.g. ``'5e5e5e'``. 
    Defaults to the style's line number color if it is a hex triplet, 
    otherwise ansi bright black.

    .. versionadded:: 2.18

`hl_lines`
    Specify a list of lines to be highlighted, as line numbers separated by
    spaces, e.g. ``'3 7 8'``. The line numbers are relative to the input 
    (i.e. the first line is line 1) unless `hl_linenostart` is set.

    .. versionadded:: 2.18

`hl_color`
    Color for highlighting the lines specified in `hl_lines`, specified as 
    a hex triplet (default: style's `highlight_color`).

    .. versionadded:: 2.18

`hl_linenostart`
    If set to ``True`` line numbers in `hl_lines` are specified
    relative to `linenostart` (default ``False``).

    .. versionadded:: 2.18

---
## __init__
```python
from rtf import __init__
```

Additional options accepted:

``fontface``
    Name of the font used. Could for example be ``'Courier New'``
    to further specify the default which is ``'\fmodern'``. The RTF
    specification claims that ``\fmodern`` are "Fixed-pitch serif
    and sans serif fonts". Hope every RTF implementation thinks
    the same about modern...

---
## _escape
```python
from rtf import _escape
```



---
## _escape_text
```python
from rtf import _escape_text
```



---
## hex_to_rtf_color
```python
from rtf import hex_to_rtf_color
```



---
## _split_tokens_on_newlines
```python
from rtf import _split_tokens_on_newlines
```

Split tokens containing newline characters into multiple token
each representing a line of the input file. Needed for numbering
lines of e.g. multiline comments.

---
## _create_color_mapping
```python
from rtf import _create_color_mapping
```

Create a mapping of style hex colors to index/offset in
the RTF color table.

---
## _lineno_template
```python
from rtf import _lineno_template
```



---
## _hl_open_str
```python
from rtf import _hl_open_str
```



---
## _rtf_header
```python
from rtf import _rtf_header
```



---
## format_unencoded
```python
from rtf import format_unencoded
```



---
## __name__
```python
from svg import __name__
```

pygments.formatters.svg
~~~~~~~~~~~~~~~~~~~~~~~

Formatter for SVG output.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## escape_html
```python
from svg import escape_html
```

Escape &, <, > as well as single and double quotes for HTML.

---
## SvgFormatter
```python
from svg import SvgFormatter
```

Format tokens as an SVG graphics file.  This formatter is still experimental.
Each line of code is a ``<text>`` element with explicit ``x`` and ``y``
coordinates containing ``<tspan>`` elements with the individual token styles.

By default, this formatter outputs a full SVG document including doctype
declaration and the ``<svg>`` root element.

.. versionadded:: 0.9

Additional options accepted:

`nowrap`
    Don't wrap the SVG ``<text>`` elements in ``<svg><g>`` elements and
    don't add a XML declaration and a doctype.  If true, the `fontfamily`
    and `fontsize` options are ignored.  Defaults to ``False``.

`fontfamily`
    The value to give the wrapping ``<g>`` element's ``font-family``
    attribute, defaults to ``"monospace"``.

`fontsize`
    The value to give the wrapping ``<g>`` element's ``font-size``
    attribute, defaults to ``"14px"``.

`linenos`
    If ``True``, add line numbers (default: ``False``).

`linenostart`
    The line number for the first line (default: ``1``).

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

`linenowidth`
    Maximum width devoted to line numbers (default: ``3*ystep``, sufficient
    for up to 4-digit line numbers. Increase width for longer code blocks).

`xoffset`
    Starting offset in X direction, defaults to ``0``.

`yoffset`
    Starting offset in Y direction, defaults to the font size if it is given
    in pixels, or ``20`` else.  (This is necessary since text coordinates
    refer to the text baseline, not the top edge.)

`ystep`
    Offset to add to the Y coordinate for each subsequent line.  This should
    roughly be the text size plus 5.  It defaults to that value if the text
    size is given in pixels, or ``25`` else.

`spacehack`
    Convert spaces in the source to ``&#160;``, which are non-breaking
    spaces.  SVG provides the ``xml:space`` attribute to control how
    whitespace inside tags is handled, in theory, the ``preserve`` value
    could be used to keep all whitespace as-is.  However, many current SVG
    viewers don't obey that rule, so this option is provided as a workaround
    and defaults to ``True``.

---
## __init__
```python
from svg import __init__
```



---
## format_unencoded
```python
from svg import format_unencoded
```

Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.

For our implementation we put all lines in their own 'line group'.

---
## _get_style
```python
from svg import _get_style
```



---
## __name__
```python
from bbcode import __name__
```

pygments.formatters.bbcode
~~~~~~~~~~~~~~~~~~~~~~~~~~

BBcode formatter.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BBCodeFormatter
```python
from bbcode import BBCodeFormatter
```

Format tokens with BBcodes. These formatting codes are used by many
bulletin boards, so you can highlight your sourcecode with pygments before
posting it there.

This formatter has no support for background colors and borders, as there
are no common BBcode tags for that.

Some board systems (e.g. phpBB) don't support colors in their [code] tag,
so you can't use the highlighting together with that tag.
Text in a [code] tag usually is shown with a monospace font (which this
formatter can do with the ``monofont`` option) and no spaces (which you
need for indentation) are removed.

Additional options accepted:

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

`codetag`
    If set to true, put the output into ``[code]`` tags (default:
    ``false``)

`monofont`
    If set to true, add a tag to show the code with a monospace font
    (default: ``false``).

---
## __init__
```python
from bbcode import __init__
```



---
## _make_styles
```python
from bbcode import _make_styles
```



---
## format_unencoded
```python
from bbcode import format_unencoded
```



---
## __name__
```python
from pangomarkup import __name__
```

pygments.formatters.pangomarkup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for Pango markup output.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## escape_special_chars
```python
from pangomarkup import escape_special_chars
```

Escape & and < for Pango Markup.

---
## PangoMarkupFormatter
```python
from pangomarkup import PangoMarkupFormatter
```

Format tokens as Pango Markup code. It can then be rendered to an SVG.

.. versionadded:: 2.9

---
## __init__
```python
from pangomarkup import __init__
```



---
## format_unencoded
```python
from pangomarkup import format_unencoded
```



---
## __name__
```python
from groff import __name__
```

pygments.formatters.groff
~~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for groff output.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GroffFormatter
```python
from groff import GroffFormatter
```

Format tokens with groff escapes to change their color and font style.

.. versionadded:: 2.11

Additional options accepted:

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

`monospaced`
    If set to true, monospace font will be used (default: ``true``).

`linenos`
    If set to true, print the line numbers (default: ``false``).

`wrap`
    Wrap lines to the specified number of characters. Disabled if set to 0
    (default: ``0``).

---
## __init__
```python
from groff import __init__
```



---
## _make_styles
```python
from groff import _make_styles
```



---
## _define_colors
```python
from groff import _define_colors
```



---
## _write_lineno
```python
from groff import _write_lineno
```



---
## _wrap_line
```python
from groff import _wrap_line
```



---
## _escape_chars
```python
from groff import _escape_chars
```



---
## format_unencoded
```python
from groff import format_unencoded
```



---
## __name__
```python
from latex import __name__
```

Custom docutils writer for LaTeX.

Much of this code is adapted from Dave Kuhlman's "docpy" writer from his
docutils sandbox.

---
## escape_tex
```python
from latex import escape_tex
```



---
## _get_ttype_name
```python
from latex import _get_ttype_name
```



---
## LatexFormatter
```python
from latex import LatexFormatter
```

Format tokens as LaTeX code. This needs the `fancyvrb` and `color`
standard packages.

Without the `full` option, code is formatted as one ``Verbatim``
environment, like this:

.. sourcecode:: latex

    \begin{Verbatim}[commandchars=\\\{\}]
    \PY{k}{def }\PY{n+nf}{foo}(\PY{n}{bar}):
        \PY{k}{pass}
    \end{Verbatim}

Wrapping can be disabled using the `nowrap` option.

The special command used here (``\PY``) and all the other macros it needs
are output by the `get_style_defs` method.

With the `full` option, a complete LaTeX document is output, including
the command definitions in the preamble.

The `get_style_defs()` method of a `LatexFormatter` returns a string
containing ``\def`` commands defining the macros needed inside the
``Verbatim`` environments.

Additional options accepted:

`nowrap`
    If set to ``True``, don't wrap the tokens at all, not even inside a
    ``\begin{Verbatim}`` environment. This disables most other options
    (default: ``False``).

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``).

`full`
    Tells the formatter to output a "full" document, i.e. a complete
    self-contained document (default: ``False``).

`title`
    If `full` is true, the title that should be used to caption the
    document (default: ``''``).

`docclass`
    If the `full` option is enabled, this is the document class to use
    (default: ``'article'``).

`preamble`
    If the `full` option is enabled, this can be further preamble commands,
    e.g. ``\usepackage`` (default: ``''``).

`linenos`
    If set to ``True``, output line numbers (default: ``False``).

`linenostart`
    The line number for the first line (default: ``1``).

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

`verboptions`
    Additional options given to the Verbatim environment (see the *fancyvrb*
    docs for possible values) (default: ``''``).

`commandprefix`
    The LaTeX commands used to produce colored output are constructed
    using this prefix and some letters (default: ``'PY'``).

    .. versionadded:: 0.7
    .. versionchanged:: 0.10
       The default is now ``'PY'`` instead of ``'C'``.

`texcomments`
    If set to ``True``, enables LaTeX comment lines.  That is, LaTex markup
    in comment tokens is not escaped so that LaTeX can render it (default:
    ``False``).

    .. versionadded:: 1.2

`mathescape`
    If set to ``True``, enables LaTeX math mode escape in comments. That
    is, ``'$...$'`` inside a comment will trigger math mode (default:
    ``False``).

    .. versionadded:: 1.2

`escapeinside`
    If set to a string of length 2, enables escaping to LaTeX. Text
    delimited by these 2 characters is read as LaTeX code and
    typeset accordingly. It has no effect in string literals. It has
    no effect in comments if `texcomments` or `mathescape` is
    set. (default: ``''``).

    .. versionadded:: 2.0

`envname`
    Allows you to pick an alternative environment name replacing Verbatim.
    The alternate environment still has to support Verbatim's option syntax.
    (default: ``'Verbatim'``).

    .. versionadded:: 2.0

---
## LatexEmbeddedLexer
```python
from latex import LatexEmbeddedLexer
```

This lexer takes one lexer as argument, the lexer for the language
being formatted, and the left and right delimiters for escaped text.

First everything is scanned using the language lexer to obtain
strings and comments. All other consecutive tokens are merged and
the resulting text is scanned for escaped segments, which are given
the Token.Escape type. Finally text that is not escaped is scanned
again with the language lexer.

---
## __init__
```python
from latex import __init__
```



---
## _create_stylesheet
```python
from latex import _create_stylesheet
```



---
## get_style_defs
```python
from latex import get_style_defs
```

Return the command sequences needed to define the commands
used to format text in the verbatim environment. ``arg`` is ignored.

---
## format_unencoded
```python
from latex import format_unencoded
```



---
## get_tokens_unprocessed
```python
from latex import get_tokens_unprocessed
```



---
## _find_safe_escape_tokens
```python
from latex import _find_safe_escape_tokens
```

find escape tokens that are not in strings or comments 

---
## _filter_to
```python
from latex import _filter_to
```

Keep only the tokens that match `pred`, merge the others together 

---
## _find_escape_tokens
```python
from latex import _find_escape_tokens
```

Find escape tokens within text, give token=None otherwise 

---
## rgbcolor
```python
from latex import rgbcolor
```



---
## SasStyle
```python
from sas import SasStyle
```

Style inspired by SAS' enhanced program editor. Note This is not
meant to be a complete style. It's merely meant to mimic SAS'
program editor syntax highlighting.

---
## __name__
```python
from material import __name__
```

pygments.styles.material
~~~~~~~~~~~~~~~~~~~~~~~~

Mimic the Material theme color scheme.

https://github.com/material-theme/vsc-material-theme

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MaterialStyle
```python
from material import MaterialStyle
```

This style mimics the Material Theme color scheme.

---
## __name__
```python
from friendly_grayscale import __name__
```

pygments.styles.friendly_grayscale
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A style based on friendly style.
The color values of the friendly style have been converted to grayscale
using the luminosity value calculated by
http://www.workwithcolor.com/color-converter-01.htm

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FriendlyGrayscaleStyle
```python
from friendly_grayscale import FriendlyGrayscaleStyle
```

A modern grayscale style based on the friendly style.

.. versionadded:: 2.11

---
## __name__
```python
from pastie import __name__
```

pygments.styles.pastie
~~~~~~~~~~~~~~~~~~~~~~

Style similar to the `pastie`_ default style.

.. _pastie: http://pastie.caboo.se/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PastieStyle
```python
from pastie import PastieStyle
```

Style similar to the pastie default style.

---
## __name__
```python
from onedark import __name__
```

pygments.styles.onedark
~~~~~~~~~~~~~~~~~~~~~~~

One Dark Theme for Pygments by Tobias Zoghaib (https://github.com/TobiZog)

Inspired by one-dark-ui for the code editor Atom
(https://atom.io/themes/one-dark-ui).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## OneDarkStyle
```python
from onedark import OneDarkStyle
```

Theme inspired by One Dark Pro for Atom.

.. versionadded:: 2.11

---
## __name__
```python
from inkpot import __name__
```

pygments.styles.inkpot
~~~~~~~~~~~~~~~~~~~~~~

A highlighting style for Pygments, inspired by the Inkpot theme for VIM.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## InkPotStyle
```python
from inkpot import InkPotStyle
```



---
## __name__
```python
from xcode import __name__
```

pygments.styles.xcode
~~~~~~~~~~~~~~~~~~~~~

Style similar to the `Xcode` default theme.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## XcodeStyle
```python
from xcode import XcodeStyle
```

Style similar to the Xcode default colouring theme.

---
## __name__
```python
from gruvbox import __name__
```

pygments.styles.gruvbox
~~~~~~~~~~~~~~~~~~~~~~~

pygments version of the "gruvbox" vim theme.
https://github.com/morhetz/gruvbox

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GruvboxDarkStyle
```python
from gruvbox import GruvboxDarkStyle
```

Pygments version of the "gruvbox" dark vim theme.

---
## GruvboxLightStyle
```python
from gruvbox import GruvboxLightStyle
```

Pygments version of the "gruvbox" Light vim theme.

---
## __name__
```python
from monokai import __name__
```

pygments.styles.monokai
~~~~~~~~~~~~~~~~~~~~~~~

Mimic the Monokai color scheme. Based on tango.py.

http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MonokaiStyle
```python
from monokai import MonokaiStyle
```

This style mimics the Monokai color scheme.

---
## __name__
```python
from tango import __name__
```

pygments.styles.tango
~~~~~~~~~~~~~~~~~~~~~

The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.

http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines

Butter:     #fce94f     #edd400     #c4a000
Orange:     #fcaf3e     #f57900     #ce5c00
Chocolate:  #e9b96e     #c17d11     #8f5902
Chameleon:  #8ae234     #73d216     #4e9a06
Sky Blue:   #729fcf     #3465a4     #204a87
Plum:       #ad7fa8     #75507b     #5c35cc
Scarlet Red:#ef2929     #cc0000     #a40000
Aluminium:  #eeeeec     #d3d7cf     #babdb6
            #888a85     #555753     #2e3436

Not all of the above colors are used; other colors added:
    very light grey: #f8f8f8  (for background)

This style can be used as a template as it includes all the known
Token types, unlike most (if not all) of the styles included in the
Pygments distribution.

However, since Crunchy is intended to be used by beginners, we have strived
to create a style that gloss over subtle distinctions between different
categories.

Taking Python for example, comments (Comment.*) and docstrings (String.Doc)
have been chosen to have the same style.  Similarly, keywords (Keyword.*),
and Operator.Word (and, or, in) have been assigned the same style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TangoStyle
```python
from tango import TangoStyle
```

The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.

---
## __name__
```python
from friendly import __name__
```

pygments.styles.friendly
~~~~~~~~~~~~~~~~~~~~~~~~

A modern style based on the VIM pyte theme.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FriendlyStyle
```python
from friendly import FriendlyStyle
```

A modern style based on the VIM pyte theme.

---
## __name__
```python
from staroffice import __name__
```

pygments.styles.staroffice
~~~~~~~~~~~~~~~~~~~~~~~~~~

Style similar to StarOffice style, also in OpenOffice and LibreOffice.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## StarofficeStyle
```python
from staroffice import StarofficeStyle
```

Style similar to StarOffice style, also in OpenOffice and LibreOffice.

---
## __name__
```python
from paraiso_dark import __name__
```

pygments.styles.paraiso_dark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Paraíso (Dark) by Jan T. Sott

Pygments template by Jan T. Sott (https://github.com/idleberg)
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ParaisoDarkStyle
```python
from paraiso_dark import ParaisoDarkStyle
```



---
## __name__
```python
from solarized import __name__
```

pygments.styles.solarized
~~~~~~~~~~~~~~~~~~~~~~~~~

Solarized by Camil Staps

A Pygments style for the Solarized themes (licensed under MIT).
See: https://github.com/altercation/solarized

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## make_style
```python
from solarized import make_style
```



---
## SolarizedDarkStyle
```python
from solarized import SolarizedDarkStyle
```

The solarized style, dark.

---
## SolarizedLightStyle
```python
from solarized import SolarizedLightStyle
```

The solarized style, light.

---
## get_style_by_name
```python
from __init__ import get_style_by_name
```

Return a style class by its short name. The names of the builtin styles
are listed in :data:`pygments.styles.STYLE_MAP`.

Will raise :exc:`pygments.util.ClassNotFound` if no style of that name is
found.

---
## get_all_styles
```python
from __init__ import get_all_styles
```

Return a generator for all styles by name, both builtin and plugin.

---
## __name__
```python
from algol_nu import __name__
```

pygments.styles.algol_nu
~~~~~~~~~~~~~~~~~~~~~~~~

Algol publication style without underlining of keywords.

This style renders source code for publication of algorithms in
scientific papers and academic texts, where its format is frequently used.

It is based on the style of the revised Algol-60 language report[1].

o  No colours, only black, white and shades of grey are used.
o  Keywords are rendered in lowercase boldface.
o  Builtins are rendered in lowercase boldface italic.
o  Docstrings and pragmas are rendered in dark grey boldface.
o  Library identifiers are rendered in dark grey boldface italic.
o  Comments are rendered in grey italic.

To render keywords with underlining, refer to the `Algol` style.

For lowercase conversion of keywords and builtins in languages where
these are not or might not be lowercase, a supporting lexer is required.
The Algol and Modula-2 lexers automatically convert to lowercase whenever
this style is selected.

[1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## Algol_NuStyle
```python
from algol_nu import Algol_NuStyle
```



---
## __name__
```python
from gh_dark import __name__
```

pygments.styles.gh_dark
~~~~~~~~~~~~~~~~~~~~~~~

Github's Dark-Colorscheme based theme for Pygments
Colors extracted from https://github.com/primer/primitives

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## GhDarkStyle
```python
from gh_dark import GhDarkStyle
```

Github's Dark-Colorscheme based theme for Pygments

---
## __name__
```python
from native import __name__
```

pygments.styles.native
~~~~~~~~~~~~~~~~~~~~~~

pygments version of my "native" vim theme.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NativeStyle
```python
from native import NativeStyle
```

Pygments version of the "native" vim theme.

---
## __name__
```python
from colorful import __name__
```

pygments.styles.colorful
~~~~~~~~~~~~~~~~~~~~~~~~

A colorful style, inspired by CodeRay.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ColorfulStyle
```python
from colorful import ColorfulStyle
```

A colorful style, inspired by CodeRay.

---
## LilyPondStyle
```python
from lilypond import LilyPondStyle
```

Style for the LilyPond language.

.. versionadded:: 2.11

---
## IgorStyle
```python
from igor import IgorStyle
```

Pygments version of the official colors for Igor Pro procedures.

---
## __name__
```python
from zenburn import __name__
```

pygments.styles.zenburn
~~~~~~~~~~~~~~~~~~~~~~~

Low contrast color scheme Zenburn.

See: https://kippura.org/zenburnpage/
     https://github.com/jnurmine/Zenburn

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ZenburnStyle
```python
from zenburn import ZenburnStyle
```

Low contrast Zenburn style.

---
## __name__
```python
from bw import __name__
```

pygments.styles.bw
~~~~~~~~~~~~~~~~~~

Simple black/white only style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BlackWhiteStyle
```python
from bw import BlackWhiteStyle
```



---
## __name__
```python
from emacs import __name__
```

pygments.styles.emacs
~~~~~~~~~~~~~~~~~~~~~

A highlighting style for Pygments, inspired by Emacs.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## EmacsStyle
```python
from emacs import EmacsStyle
```

The default style (inspired by Emacs 22).

---
## __name__
```python
from dracula import __name__
```

pygments.styles.dracula
~~~~~~~~~~~~~~~~~~~~~~~

Pygments version of `Dracula` from https://github.com/dracula/dracula-theme.

Based on the Dracula Theme for pygments by Chris Bracco.
See https://github.com/dracula/pygments/tree/fee9ed5613d1086bc01b9d0a5a0e9867a009f571

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## DraculaStyle
```python
from dracula import DraculaStyle
```



---
## __name__
```python
from vs import __name__
```

pygments.styles.vs
~~~~~~~~~~~~~~~~~~

Simple style with MS Visual Studio colors.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VisualStudioStyle
```python
from vs import VisualStudioStyle
```



---
## __name__
```python
from default import __name__
```



---
## DefaultStyle
```python
from default import DefaultStyle
```

The default style (inspired by Emacs 22).

---
## __name__
```python
from paraiso_light import __name__
```

pygments.styles.paraiso_light
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Paraíso (Light) by Jan T. Sott

Pygments template by Jan T. Sott (https://github.com/idleberg)
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ParaisoLightStyle
```python
from paraiso_light import ParaisoLightStyle
```



---
## __name__
```python
from lovelace import __name__
```

pygments.styles.lovelace
~~~~~~~~~~~~~~~~~~~~~~~~

Lovelace by Miikka Salminen

Pygments style by Miikka Salminen (https://github.com/miikkas)
A desaturated, somewhat subdued style created for the Lovelace interactive
learning environment.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LovelaceStyle
```python
from lovelace import LovelaceStyle
```

The style used in Lovelace interactive learning environment. Tries to avoid
the "angry fruit salad" effect with desaturated and dim colours.

---
## __name__
```python
from stata_dark import __name__
```

pygments.styles.stata_dark
~~~~~~~~~~~~~~~~~~~~~~~~~~

Dark style inspired by Stata's do-file editor. Note this is not
meant to be a complete style, just for Stata's file formats.


:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## StataDarkStyle
```python
from stata_dark import StataDarkStyle
```



---
## __name__
```python
from vim import __name__
```

pygments.styles.vim
~~~~~~~~~~~~~~~~~~~

A highlighting style for Pygments, inspired by vim.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## VimStyle
```python
from vim import VimStyle
```

Styles somewhat like vim 7.0

---
## __name__
```python
from borland import __name__
```

pygments.styles.borland
~~~~~~~~~~~~~~~~~~~~~~~

Style similar to the style used in the Borland IDEs.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## BorlandStyle
```python
from borland import BorlandStyle
```

Style similar to the style used in the borland IDEs.

---
## __name__
```python
from coffee import __name__
```

pygments.styles.coffee
~~~~~~~~~~~~~~~~~~~~~~

A warm and cozy theme based off gruvbox

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## CoffeeStyle
```python
from coffee import CoffeeStyle
```

A warm and cozy theme based off gruvbox

---
## __name__
```python
from murphy import __name__
```

pygments.styles.murphy
~~~~~~~~~~~~~~~~~~~~~~

Murphy's style from CodeRay.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## MurphyStyle
```python
from murphy import MurphyStyle
```

Murphy's style from CodeRay.

---
## __name__
```python
from lightbulb import __name__
```

pygments.styles.lightbulb
~~~~~~~~~~~~~~~~~~~~~~~~~

A minimal dark theme based on the Lightbulb theme for VSCode.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## LightbulbStyle
```python
from lightbulb import LightbulbStyle
```

A minimal dark theme based on the Lightbulb theme for VSCode.

---
## __name__
```python
from fruity import __name__
```

pygments.styles.fruity
~~~~~~~~~~~~~~~~~~~~~~

pygments version of my "fruity" vim theme.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## FruityStyle
```python
from fruity import FruityStyle
```

Pygments version of the "native" vim theme.

---
## __name__
```python
from abap import __name__
```

pygments.styles.abap
~~~~~~~~~~~~~~~~~~~~

ABAP workbench like style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AbapStyle
```python
from abap import AbapStyle
```



---
## __name__
```python
from rainbow_dash import __name__
```

pygments.styles.rainbow_dash
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A bright and colorful syntax highlighting `theme`.

.. _theme: http://sanssecours.github.io/Rainbow-Dash.tmbundle

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RainbowDashStyle
```python
from rainbow_dash import RainbowDashStyle
```

A bright and colorful syntax highlighting theme.

---
## __name__
```python
from manni import __name__
```

pygments.styles.manni
~~~~~~~~~~~~~~~~~~~~~

A colorful style, inspired by the terminal highlighting style.

This is a port of the style used in the `php port`_ of pygments
by Manni. The style is called 'default' there.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ManniStyle
```python
from manni import ManniStyle
```

A colorful style, inspired by the terminal highlighting style.

---
## __name__
```python
from autumn import __name__
```

pygments.styles.autumn
~~~~~~~~~~~~~~~~~~~~~~

A colorful style, inspired by the terminal highlighting style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AutumnStyle
```python
from autumn import AutumnStyle
```

A colorful style, inspired by the terminal highlighting style.

---
## __name__
```python
from rrt import __name__
```

pygments.styles.rrt
~~~~~~~~~~~~~~~~~~~

pygments "rrt" theme, based on Zap and Emacs defaults.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## RrtStyle
```python
from rrt import RrtStyle
```

Minimalistic "rrt" theme, based on Zap and Emacs defaults.

---
## __name__
```python
from perldoc import __name__
```

pygments.styles.perldoc
~~~~~~~~~~~~~~~~~~~~~~~

Style similar to the style used in the `perldoc`_ code blocks.

.. _perldoc: http://perldoc.perl.org/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## PerldocStyle
```python
from perldoc import PerldocStyle
```

Style similar to the style used in the perldoc code blocks.

---
## __name__
```python
from trac import __name__
```

pygments.styles.trac
~~~~~~~~~~~~~~~~~~~~

Port of the default trac highlighter design.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## TracStyle
```python
from trac import TracStyle
```

Port of the default trac highlighter design.

---
## __name__
```python
from algol import __name__
```

pygments.styles.algol
~~~~~~~~~~~~~~~~~~~~~

Algol publication style.

This style renders source code for publication of algorithms in
scientific papers and academic texts, where its format is frequently used.

It is based on the style of the revised Algol-60 language report[1].

o  No colours, only black, white and shades of grey are used.
o  Keywords are rendered in lowercase underline boldface.
o  Builtins are rendered in lowercase boldface italic.
o  Docstrings and pragmas are rendered in dark grey boldface.
o  Library identifiers are rendered in dark grey boldface italic.
o  Comments are rendered in grey italic.

To render keywords without underlining, refer to the `Algol_Nu` style.

For lowercase conversion of keywords and builtins in languages where
these are not or might not be lowercase, a supporting lexer is required.
The Algol and Modula-2 lexers automatically convert to lowercase whenever
this style is selected.

[1] `Revised Report on the Algorithmic Language Algol-60 <http://www.masswerk.at/algol60/report.htm>`

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## AlgolStyle
```python
from algol import AlgolStyle
```



---
## __name__
```python
from arduino import __name__
```

pygments.styles.arduino
~~~~~~~~~~~~~~~~~~~~~~~

Arduino® Syntax highlighting style.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## ArduinoStyle
```python
from arduino import ArduinoStyle
```

The Arduino® language style. This style is designed to highlight the
Arduino source code, so expect the best results with it.

---
## __name__
```python
from nord import __name__
```

pygments.styles.nord
~~~~~~~~~~~~~~~~~~~~

pygments version of the "nord" theme by Arctic Ice Studio
https://www.nordtheme.com/

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## NordStyle
```python
from nord import NordStyle
```

Pygments version of the "nord" theme by Arctic Ice Studio.

---
## NordDarkerStyle
```python
from nord import NordDarkerStyle
```

Pygments version of a darker "nord" theme by Arctic Ice Studio

---
## __name__
```python
from stata_light import __name__
```

pygments.styles.stata_light
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Light Style inspired by Stata's do-file editor. Note this is not
meant to be a complete style, just for Stata's file formats.

:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.

---
## StataLightStyle
```python
from stata_light import StataLightStyle
```

Light mode style inspired by Stata's do-file editor. This is not
meant to be a complete style, just for use with Stata.

---
## __name__
```python
from binary import __name__
```



---
## AsyncBufferedIOBase
```python
from binary import AsyncBufferedIOBase
```

The asyncio executor version of io.BufferedWriter and BufferedIOBase.

---
## AsyncBufferedReader
```python
from binary import AsyncBufferedReader
```

The asyncio executor version of io.BufferedReader and Random.

---
## AsyncFileIO
```python
from binary import AsyncFileIO
```

The asyncio executor version of io.FileIO.

---
## AsyncIndirectBufferedIOBase
```python
from binary import AsyncIndirectBufferedIOBase
```

The indirect asyncio executor version of io.BufferedWriter and BufferedIOBase.

---
## AsyncIndirectBufferedReader
```python
from binary import AsyncIndirectBufferedReader
```

The indirect asyncio executor version of io.BufferedReader and Random.

---
## AsyncIndirectFileIO
```python
from binary import AsyncIndirectFileIO
```

The indirect asyncio executor version of io.FileIO.

---
## _open
```python
from __init__ import _open
```

Open an asyncio file.

---
## wrap
```python
from __init__ import wrap
```



---
## _
```python
from __init__ import _
```

Splat kargs to func as kwargs.

---
## delegate_to_executor
```python
from utils import delegate_to_executor
```



---
## proxy_method_directly
```python
from utils import proxy_method_directly
```



---
## proxy_property_directly
```python
from utils import proxy_property_directly
```



---
## cond_delegate_to_executor
```python
from utils import cond_delegate_to_executor
```



---
## _make_delegate_method
```python
from utils import _make_delegate_method
```



---
## _make_proxy_method
```python
from utils import _make_proxy_method
```



---
## _make_proxy_property
```python
from utils import _make_proxy_property
```



---
## _make_cond_delegate_method
```python
from utils import _make_cond_delegate_method
```

For spooled temp files, delegate only if rolled to file object

---
## cls_builder
```python
from utils import cls_builder
```



---
## method
```python
from utils import method
```



---
## proxy_property
```python
from utils import proxy_property
```



---
## AsyncTextIOWrapper
```python
from text import AsyncTextIOWrapper
```

The asyncio executor version of io.TextIOWrapper.

---
## AsyncTextIndirectIOWrapper
```python
from text import AsyncTextIndirectIOWrapper
```

The indirect asyncio executor version of io.TextIOWrapper.

---
## __name__
```python
from temptypes import __name__
```

Async wrappers for spooled temp files and temp directory objects

---
## AsyncSpooledTemporaryFile
```python
from temptypes import AsyncSpooledTemporaryFile
```

Async wrapper for SpooledTemporaryFile class

---
## AsyncTemporaryDirectory
```python
from temptypes import AsyncTemporaryDirectory
```

Async wrapper for TemporaryDirectory class

---
## __init__
```python
from temptypes import __init__
```



---
## TemporaryFile
```python
from __init__ import TemporaryFile
```

Async open an unnamed temporary file

---
## SpooledTemporaryFile
```python
from __init__ import SpooledTemporaryFile
```

Async open a spooled temporary file

---
## TemporaryDirectory
```python
from __init__ import TemporaryDirectory
```

Async open a temporary directory

---
## AiofilesContextManagerTempDir
```python
from __init__ import AiofilesContextManagerTempDir
```

With returns the directory location, not the object (matching sync lib)

---
## NamedTemporaryFile
```python
from __init__ import NamedTemporaryFile
```

Async open a named temporary file

---
## pushd
```python
from __init__ import pushd
```

>>> tmp_path = getfixture('tmp_path')
>>> with pushd(tmp_path):
...     assert os.getcwd() == os.fspath(tmp_path)
>>> assert os.getcwd() != os.fspath(tmp_path)

---
## tarball
```python
from __init__ import tarball
```

Get a URL to a tarball, download, extract, yield, then clean up.

Assumes everything in the tarball is prefixed with a common
directory. That common path is stripped and the contents
are extracted to ``target_dir``, similar to passing
``-C {target} --strip-components 1`` to the ``tar`` command.

Uses the streaming protocol to extract the contents from a
stream in a single pass without loading the whole file into
memory.

>>> import urllib.request
>>> url = getfixture('tarfile_served')
>>> target = getfixture('tmp_path') / 'out'
>>> tb = tarball(url, target_dir=target)
>>> import pathlib
>>> with tb as extracted:
...     contents = pathlib.Path(extracted, 'contents.txt').read_text(encoding='utf-8')
>>> assert not os.path.exists(extracted)

If the target is not specified, contents are extracted to a
directory relative to the current working directory named after
the name of the file as extracted from the URL.

>>> target = getfixture('tmp_path')
>>> with pushd(target), tarball(url):
...     target.joinpath('served').is_dir()
True

---
## strip_first_component
```python
from __init__ import strip_first_component
```



---
## _compose
```python
from __init__ import _compose
```

Compose any number of dependent context managers into a single one.

The last, innermost context manager may take arbitrary arguments, but
each successive context manager should accept the result from the
previous as a single parameter.

Like :func:`jaraco.functools.compose`, behavior works from right to
left, so the context manager should be indicated from outermost to
innermost.

Example, to create a context manager to change to a temporary
directory:

>>> temp_dir_as_cwd = _compose(pushd, temp_dir)
>>> with temp_dir_as_cwd() as dir:
...     assert os.path.samefile(os.getcwd(), dir)

---
## remove_readonly
```python
from __init__ import remove_readonly
```

Add support for removing read-only files on Windows.

---
## robust_remover
```python
from __init__ import robust_remover
```



---
## temp_dir
```python
from __init__ import temp_dir
```

Create a temporary directory context. Pass a custom remover
to override the removal behavior.

>>> import pathlib
>>> with temp_dir() as the_dir:
...     assert os.path.isdir(the_dir)
>>> assert not os.path.exists(the_dir)

---
## repo_context
```python
from __init__ import repo_context
```

Check out the repo indicated by url.

If dest_ctx is supplied, it should be a context manager
to yield the target directory for the check out.

>>> repo = repo_context('https://github.com/jaraco/jaraco.context')
>>> with repo as dest:
...     listing = os.listdir(dest)
>>> 'README.rst' in listing
True

---
## ExceptionTrap
```python
from __init__ import ExceptionTrap
```

A context manager that will catch certain exceptions and provide an
indication they occurred.

>>> with ExceptionTrap() as trap:
...     raise Exception()
>>> bool(trap)
True

>>> with ExceptionTrap() as trap:
...     pass
>>> bool(trap)
False

>>> with ExceptionTrap(ValueError) as trap:
...     raise ValueError("1 + 1 is not 3")
>>> bool(trap)
True
>>> trap.value
ValueError('1 + 1 is not 3')
>>> trap.tb
<traceback object at ...>

>>> with ExceptionTrap(ValueError) as trap:
...     raise Exception()
Traceback (most recent call last):
...
Exception

>>> bool(trap)
False

---
## suppress
```python
from __init__ import suppress
```

A version of contextlib.suppress with decorator support.

>>> @suppress(KeyError)
... def key_error():
...     {}['']
>>> key_error()

---
## on_interrupt
```python
from __init__ import on_interrupt
```

Replace a KeyboardInterrupt with SystemExit(1).

Useful in conjunction with console entry point functions.

>>> def do_interrupt():
...     raise KeyboardInterrupt()
>>> on_interrupt('error')(do_interrupt)()
Traceback (most recent call last):
...
SystemExit: 1
>>> on_interrupt('error', code=255)(do_interrupt)()
Traceback (most recent call last):
...
SystemExit: 255
>>> on_interrupt('suppress')(do_interrupt)()
>>> with __import__('pytest').raises(KeyboardInterrupt):
...     on_interrupt('ignore')(do_interrupt)()

---
## compose_two
```python
from __init__ import compose_two
```



---
## __enter__
```python
from __init__ import __enter__
```



---
## type
```python
from __init__ import type
```



---
## tb
```python
from __init__ import tb
```



---
## __exit__
```python
from __init__ import __exit__
```



---
## raises
```python
from __init__ import raises
```

Wrap func and replace the result with the truth
value of the trap (True if an exception occurred).

First, give the decorator an alias to support Python 3.8
Syntax.

>>> raises = ExceptionTrap(ValueError).raises

Now decorate a function that always fails.

>>> @raises
... def fail():
...     raise ValueError('failed')
>>> fail()
True

---
## passes
```python
from __init__ import passes
```

Wrap func and replace the result with the truth
value of the trap (True if no exception).

First, give the decorator an alias to support Python 3.8
Syntax.

>>> passes = ExceptionTrap(ValueError).passes

Now decorate a function that always fails.

>>> @passes
... def fail():
...     raise ValueError('failed')

>>> fail()
False

---
## composed
```python
from __init__ import composed
```



---
## __name__
```python
from properties import __name__
```



---
## NonDataProperty
```python
from properties import NonDataProperty
```

Much like the property builtin, but only implements __get__,
making it a non-data property, and can be subsequently reset.

See http://users.rcn.com/python/download/Descriptor.htm for more
information.

>>> class X(object):
...   @NonDataProperty
...   def foo(self):
...     return 3
>>> x = X()
>>> x.foo
3
>>> x.foo = 4
>>> x.foo
4

---
## classproperty
```python
from properties import classproperty
```

Like @property but applies at the class level.


>>> class X(metaclass=classproperty.Meta):
...   val = None
...   @classproperty
...   def foo(cls):
...     return cls.val
...   @foo.setter
...   def foo(cls, val):
...     cls.val = val
>>> X.foo
>>> X.foo = 3
>>> X.foo
3
>>> x = X()
>>> x.foo
3
>>> X.foo = 4
>>> x.foo
4

Setting the property on an instance affects the class.

>>> x.foo = 5
>>> x.foo
5
>>> X.foo
5
>>> vars(x)
{}
>>> X().foo
5

Attempting to set an attribute where no setter was defined
results in an AttributeError:

>>> class GetOnly(metaclass=classproperty.Meta):
...   @classproperty
...   def foo(cls):
...     return 'bar'
>>> GetOnly.foo = 3
Traceback (most recent call last):
...
AttributeError: can't set attribute

It is also possible to wrap a classmethod or staticmethod in
a classproperty.

>>> class Static(metaclass=classproperty.Meta):
...   @classproperty
...   @classmethod
...   def foo(cls):
...     return 'foo'
...   @classproperty
...   @staticmethod
...   def bar():
...     return 'bar'
>>> Static.foo
'foo'
>>> Static.bar
'bar'

*Legacy*

For compatibility, if the metaclass isn't specified, the
legacy behavior will be invoked.

>>> class X:
...   val = None
...   @classproperty
...   def foo(cls):
...     return cls.val
...   @foo.setter
...   def foo(cls, val):
...     cls.val = val
>>> X.foo
>>> X.foo = 3
>>> X.foo
3
>>> x = X()
>>> x.foo
3
>>> X.foo = 4
>>> x.foo
4

Note, because the metaclass was not specified, setting
a value on an instance does not have the intended effect.

>>> x.foo = 5
>>> x.foo
5
>>> X.foo  # should be 5
4
>>> vars(x)  # should be empty
{'foo': 5}
>>> X().foo  # should be 5
4

---
## _ClassPropertyAttribute
```python
from properties import _ClassPropertyAttribute
```



---
## __init__
```python
from properties import __init__
```



---
## __get__
```python
from properties import __get__
```



---
## Meta
```python
from properties import Meta
```



---
## __set__
```python
from properties import __set__
```



---
## setter
```python
from properties import setter
```



---
## _ensure_method
```python
from properties import _ensure_method
```

Ensure fn is a classmethod or staticmethod.

---
## __setattr__
```python
from properties import __setattr__
```



---
## __name__
```python
from ancestry import __name__
```

Routines for obtaining the class names
of an object and its parent classes.

---
## all_bases
```python
from ancestry import all_bases
```

return a tuple of all base classes the class c has as a parent.
>>> object in all_bases(list)
True

---
## all_classes
```python
from ancestry import all_classes
```

return a tuple of all classes to which c belongs
>>> list in all_classes(list)
True

---
## iter_subclasses
```python
from ancestry import iter_subclasses
```

Generator over all subclasses of a given class, in depth-first order.

>>> bool in list(iter_subclasses(int))
True
>>> class A(object): pass
>>> class B(A): pass
>>> class C(A): pass
>>> class D(B,C): pass
>>> class E(D): pass
>>>
>>> for cls in iter_subclasses(A):
...     print(cls.__name__)
B
D
E
C
>>> # get ALL classes currently defined
>>> res = [cls.__name__ for cls in iter_subclasses(object)]
>>> 'type' in res
True
>>> 'tuple' in res
True
>>> len(res) > 100
True

---
## _iter_all_subclasses
```python
from ancestry import _iter_all_subclasses
```



---
## LeafClassesMeta
```python
from meta import LeafClassesMeta
```

A metaclass for classes that keeps track of all of them that
aren't base classes.

>>> Parent = LeafClassesMeta('MyParentClass', (), {})
>>> Parent in Parent._leaf_classes
True
>>> Child = LeafClassesMeta('MyChildClass', (Parent,), {})
>>> Child in Parent._leaf_classes
True
>>> Parent in Parent._leaf_classes
False

>>> Other = LeafClassesMeta('OtherClass', (), {})
>>> Parent in Other._leaf_classes
False
>>> len(Other._leaf_classes)
1

---
## TagRegistered
```python
from meta import TagRegistered
```

As classes of this metaclass are created, they keep a registry in the
base class of all classes by a class attribute, indicated by attr_name.

>>> FooObject = TagRegistered('FooObject', (), dict(tag='foo'))
>>> FooObject._registry['foo'] is FooObject
True
>>> BarObject = TagRegistered('Barobject', (FooObject,), dict(tag='bar'))
>>> FooObject._registry is BarObject._registry
True
>>> len(FooObject._registry)
2

'...' below should be 'jaraco.classes' but for pytest-dev/pytest#3396
>>> FooObject._registry['bar']
<class '....meta.Barobject'>

---
## once
```python
from __init__ import once
```

Decorate func so it's only ever called the first time.

This decorator can ensure that an expensive or non-idempotent function
will not be expensive on subsequent calls and is idempotent.

>>> add_three = once(lambda a: a+3)
>>> add_three(3)
6
>>> add_three(9)
6
>>> add_three('12')
6

To reset the stored value, simply clear the property ``saved_result``.

>>> del add_three.saved_result
>>> add_three(9)
12
>>> add_three(8)
12

Or invoke 'reset()' on it.

>>> add_three.reset()
>>> add_three(-3)
0
>>> add_three(0)
0

---
## method_cache
```python
from __init__ import method_cache
```

Wrap lru_cache to support storing the cache data in the object instances.

Abstracts the common paradigm where the method explicitly saves an
underscore-prefixed protected property on first call and returns that
subsequently.

>>> class MyClass:
...     calls = 0
...
...     @method_cache
...     def method(self, value):
...         self.calls += 1
...         return value

>>> a = MyClass()
>>> a.method(3)
3
>>> for x in range(75):
...     res = a.method(x)
>>> a.calls
75

Note that the apparent behavior will be exactly like that of lru_cache
except that the cache is stored on each instance, so values in one
instance will not flush values from another, and when an instance is
deleted, so are the cached values for that instance.

>>> b = MyClass()
>>> for x in range(35):
...     res = b.method(x)
>>> b.calls
35
>>> a.method(0)
0
>>> a.calls
75

Note that if method had been decorated with ``functools.lru_cache()``,
a.calls would have been 76 (due to the cached value of 0 having been
flushed by the 'b' instance).

Clear the cache with ``.cache_clear()``

>>> a.method.cache_clear()

Same for a method that hasn't yet been called.

>>> c = MyClass()
>>> c.method.cache_clear()

Another cache wrapper may be supplied:

>>> cache = functools.lru_cache(maxsize=2)
>>> MyClass.method2 = method_cache(lambda self: 3, cache_wrapper=cache)
>>> a = MyClass()
>>> a.method2()
3

Caution - do not subsequently wrap the method with another decorator, such
as ``@property``, which changes the semantics of the function.

See also
http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/
for another implementation and additional justification.

---
## _special_method_cache
```python
from __init__ import _special_method_cache
```

Because Python treats special methods differently, it's not
possible to use instance attributes to implement the cached
methods.

Instead, install the wrapper method under a different name
and return a simple proxy to that wrapper.

https://github.com/jaraco/jaraco.functools/issues/5

---
## apply
```python
from __init__ import apply
```



---
## result_invoke
```python
from __init__ import result_invoke
```

Decorate a function with an action function that is
invoked on the results returned from the decorated
function (for its side effect), then return the original
result.

>>> @result_invoke(print)
... def add_two(a, b):
...     return a + b
>>> x = add_two(2, 3)
5
>>> x
5

---
## invoke
```python
from __init__ import invoke
```

Call a function for its side effect after initialization.

The benefit of using the decorator instead of simply invoking a function
after defining it is that it makes explicit the author's intent for the
function to be called immediately. Whereas if one simply calls the
function immediately, it's less obvious if that was intentional or
incidental. It also avoids repeating the name - the two actions, defining
the function and calling it immediately are modeled separately, but linked
by the decorator construct.

The benefit of having a function construct (opposed to just invoking some
behavior inline) is to serve as a scope in which the behavior occurs. It
avoids polluting the global namespace with local variables, provides an
anchor on which to attach documentation (docstring), keeps the behavior
logically separated (instead of conceptually separated or not separated at
all), and provides potential to re-use the behavior for testing or other
purposes.

This function is named as a pithy way to communicate, "call this function
primarily for its side effect", or "while defining this function, also
take it aside and call it". It exists because there's no Python construct
for "define and call" (nor should there be, as decorators serve this need
just fine). The behavior happens immediately and synchronously.

>>> @invoke
... def func(): print("called")
called
>>> func()
called

Use functools.partial to pass parameters to the initial call

>>> @functools.partial(invoke, name='bingo')
... def func(name): print('called with', name)
called with bingo

---
## Throttler
```python
from __init__ import Throttler
```

Rate-limit a function (or other callable).

---
## first_invoke
```python
from __init__ import first_invoke
```

Return a function that when invoked will invoke func1 without
any parameters (for its side effect) and then invoke func2
with whatever parameters were passed, returning its result.

---
## retry_call
```python
from __init__ import retry_call
```

Given a callable func, trap the indicated exceptions
for up to 'retries' times, invoking cleanup on the
exception. On the final attempt, allow any exceptions
to propagate.

---
## retry
```python
from __init__ import retry
```

Decorator wrapper for retry_call. Accepts arguments to retry_call
except func and then returns a decorator for the decorated function.

Ex:

>>> @retry(retries=3)
... def my_func(a, b):
...     "this is my funk"
...     print(a, b)
>>> my_func.__doc__
'this is my funk'

---
## print_yielded
```python
from __init__ import print_yielded
```

Convert a generator into a function that prints all yielded elements.

>>> @print_yielded
... def x():
...     yield 3; yield None
>>> x()
3
None

---
## pass_none
```python
from __init__ import pass_none
```

Wrap func so it's not called if its first param is None.

>>> print_text = pass_none(print)
>>> print_text('text')
text
>>> print_text(None)

---
## assign_params
```python
from __init__ import assign_params
```

Assign parameters from namespace where func solicits.

>>> def func(x, y=3):
...     print(x, y)
>>> assigned = assign_params(func, dict(x=2, z=4))
>>> assigned()
2 3

The usual errors are raised if a function doesn't receive
its required parameters:

>>> assigned = assign_params(func, dict(y=3, z=4))
>>> assigned()
Traceback (most recent call last):
TypeError: func() ...argument...

It even works on methods:

>>> class Handler:
...     def meth(self, arg):
...         print(arg)
>>> assign_params(Handler().meth, dict(arg='crystal', foo='clear'))()
crystal

---
## save_method_args
```python
from __init__ import save_method_args
```

Wrap a method such that when it is called, the args and kwargs are
saved on the method.

>>> class MyClass:
...     @save_method_args
...     def method(self, a, b):
...         print(a, b)
>>> my_ob = MyClass()
>>> my_ob.method(1, 2)
1 2
>>> my_ob._saved_method.args
(1, 2)
>>> my_ob._saved_method.kwargs
{}
>>> my_ob.method(a=3, b='foo')
3 foo
>>> my_ob._saved_method.args
()
>>> my_ob._saved_method.kwargs == dict(a=3, b='foo')
True

The arguments are stored on the instance, allowing for
different instance to save different args.

>>> your_ob = MyClass()
>>> your_ob.method({str('x'): 3}, b=[4])
{'x': 3} [4]
>>> your_ob._saved_method.args
({'x': 3},)
>>> my_ob._saved_method.args
()

---
## except_
```python
from __init__ import except_
```

Replace the indicated exceptions, if raised, with the indicated
literal replacement or evaluated expression (if present).

>>> safe_int = except_(ValueError)(int)
>>> safe_int('five')
>>> safe_int('5')
5

Specify a literal replacement with ``replace``.

>>> safe_int_r = except_(ValueError, replace=0)(int)
>>> safe_int_r('five')
0

Provide an expression to ``use`` to pass through particular parameters.

>>> safe_int_pt = except_(ValueError, use='args[0]')(int)
>>> safe_int_pt('five')
'five'

---
## bypass_when
```python
from __init__ import bypass_when
```

Decorate a function to return its parameter when ``check``.

>>> bypassed = []  # False

>>> @bypass_when(bypassed)
... def double(x):
...     return x * 2
>>> double(2)
4
>>> bypassed[:] = [object()]  # True
>>> double(2)
2

---
## bypass_unless
```python
from __init__ import bypass_unless
```

Decorate a function to return its parameter unless ``check``.

>>> enabled = [object()]  # True

>>> @bypass_unless(enabled)
... def double(x):
...     return x * 2
>>> double(2)
4
>>> del enabled[:]  # False
>>> double(2)
2

---
## _splat_inner
```python
from __init__ import _splat_inner
```

Splat args to func.

---
## splat
```python
from __init__ import splat
```

Wrap func to expect its parameters to be passed positionally in a tuple.

Has a similar effect to that of ``itertools.starmap`` over
simple ``map``.

>>> pairs = [(-1, 1), (0, 2)]
>>> more_itertools.consume(itertools.starmap(print, pairs))
-1 1
0 2
>>> more_itertools.consume(map(splat(print), pairs))
-1 1
0 2

The approach generalizes to other iterators that don't have a "star"
equivalent, such as a "starfilter".

>>> list(filter(splat(operator.add), pairs))
[(0, 2)]

Splat also accepts a mapping argument.

>>> def is_nice(msg, code):
...     return "smile" in msg or code == 0
>>> msgs = [
...     dict(msg='smile!', code=20),
...     dict(msg='error :(', code=1),
...     dict(msg='unknown', code=0),
... ]
>>> for msg in filter(splat(is_nice), msgs):
...     print(msg)
{'msg': 'smile!', 'code': 20}
{'msg': 'unknown', 'code': 0}

---
## chainable
```python
from __init__ import chainable
```

Wrap an instance method to always return self.


>>> class Dingus:
...     @chainable
...     def set_attr(self, name, val):
...         setattr(self, name, val)
>>> d = Dingus().set_attr('a', 'eh!')
>>> d.a
'eh!'
>>> d2 = Dingus().set_attr('a', 'eh!').set_attr('b', 'bee!')
>>> d2.a + d2.b
'eh!bee!'

Enforces that the return value is null.

>>> class BorkedDingus:
...     @chainable
...     def set_attr(self, name, val):
...         setattr(self, name, val)
...         return len(name)
>>> BorkedDingus().set_attr('a', 'eh!')
Traceback (most recent call last):
...
AssertionError

---
## proxy
```python
from __init__ import proxy
```



---
## __get__
```python
from __init__ import __get__
```



---
## decorate
```python
from __init__ import decorate
```



---
## __name__
```python
from recommonmark_wrapper import __name__
```

A parser for CommonMark Markdown text using `recommonmark`__.

__ https://pypi.org/project/recommonmark/

.. important:: This module is provisional

   * The "recommonmark" package is unmaintained and deprecated.
     This wrapper module will be removed in a future Docutils version.

   * The API is not settled and may change with any minor Docutils version.

---
## is_literal
```python
from recommonmark_wrapper import is_literal
```



---
## Parser
```python
from recommonmark_wrapper import Parser
```

MarkDown parser based on recommonmark.

This parser is provisional:
the API is not settled and may change with any minor Docutils version.

---
## get_transforms
```python
from recommonmark_wrapper import get_transforms
```



---
## parse
```python
from recommonmark_wrapper import parse
```

Use the upstream parser and clean up afterwards.
        

---
## visit_document
```python
from recommonmark_wrapper import visit_document
```

Dummy function to prevent spurious warnings.

cf. https://github.com/readthedocs/recommonmark/issues/177

---
## visit_text
```python
from recommonmark_wrapper import visit_text
```



---
## pending_xref
```python
from recommonmark_wrapper import pending_xref
```



---
## __name__
```python
from null import __name__
```



---
## Parser
```python
from null import Parser
```

A do-nothing parser.

---
## parse
```python
from null import parse
```



---
## Parser
```python
from __init__ import Parser
```

The reStructuredText parser.

---
## get_parser_class
```python
from __init__ import get_parser_class
```

Return the Parser class from the `parser_name` module.

---
## setup_parse
```python
from __init__ import setup_parse
```

Initial parse setup.  Call at start of `self.parse()`.

---
## finish_parse
```python
from __init__ import finish_parse
```

Finalize parse details.  Call at end of `self.parse()`.

---
## __name__
```python
from commonmark_wrapper import __name__
```

An interface for parsing CommonMark input.

Select a locally installed parser from the following 3rd-party
parser packages:

:pycmark:       https://pypi.org/project/pycmark/
:myst:          https://pypi.org/project/myst-docutils/
:recommonmark:  https://pypi.org/project/recommonmark/ (deprecated)

The first parser class that can be successfully imported is mapped to
`commonmark_wrapper.Parser`.

This module is provisional:
the API is not settled and may change with any minor Docutils version.

---
## __name__
```python
from manpage import __name__
```

Manual pages builder.

---
## Writer
```python
from manpage import Writer
```



---
## Table
```python
from manpage import Table
```



---
## Translator
```python
from manpage import Translator
```



---
## __init__
```python
from manpage import __init__
```



---
## translate
```python
from manpage import translate
```



---
## new_row
```python
from manpage import new_row
```



---
## append_separator
```python
from manpage import append_separator
```

Append the separator for table head.

---
## append_cell
```python
from manpage import append_cell
```

cell_lines is an array of lines

---
## _minimize_cell
```python
from manpage import _minimize_cell
```

Remove leading and trailing blank and ``.sp`` lines

---
## as_list
```python
from manpage import as_list
```



---
## comment_begin
```python
from manpage import comment_begin
```

Return commented version of the passed text WITHOUT end of
line/comment.

---
## comment
```python
from manpage import comment
```

Return commented version of the passed text.

---
## ensure_eol
```python
from manpage import ensure_eol
```

Ensure the last line in body is terminated by new line.

---
## astext
```python
from manpage import astext
```

Return the final formatted document as a string.

---
## deunicode
```python
from manpage import deunicode
```



---
## visit_Text
```python
from manpage import visit_Text
```



---
## depart_Text
```python
from manpage import depart_Text
```



---
## list_start
```python
from manpage import list_start
```



---
## list_end
```python
from manpage import list_end
```



---
## header
```python
from manpage import header
```



---
## append_header
```python
from manpage import append_header
```

append header with .TH and .SH NAME

---
## visit_address
```python
from manpage import visit_address
```



---
## depart_address
```python
from manpage import depart_address
```



---
## visit_admonition
```python
from manpage import visit_admonition
```



---
## depart_admonition
```python
from manpage import depart_admonition
```



---
## visit_attention
```python
from manpage import visit_attention
```



---
## visit_docinfo_item
```python
from manpage import visit_docinfo_item
```



---
## depart_docinfo_item
```python
from manpage import depart_docinfo_item
```



---
## visit_author
```python
from manpage import visit_author
```



---
## visit_authors
```python
from manpage import visit_authors
```



---
## depart_authors
```python
from manpage import depart_authors
```



---
## visit_block_quote
```python
from manpage import visit_block_quote
```



---
## depart_block_quote
```python
from manpage import depart_block_quote
```



---
## visit_bullet_list
```python
from manpage import visit_bullet_list
```



---
## depart_bullet_list
```python
from manpage import depart_bullet_list
```



---
## visit_caption
```python
from manpage import visit_caption
```



---
## depart_caption
```python
from manpage import depart_caption
```



---
## visit_caution
```python
from manpage import visit_caution
```



---
## visit_citation
```python
from manpage import visit_citation
```



---
## depart_citation
```python
from manpage import depart_citation
```



---
## visit_citation_reference
```python
from manpage import visit_citation_reference
```



---
## visit_classifier
```python
from manpage import visit_classifier
```



---
## depart_classifier
```python
from manpage import depart_classifier
```



---
## visit_colspec
```python
from manpage import visit_colspec
```



---
## depart_colspec
```python
from manpage import depart_colspec
```



---
## write_colspecs
```python
from manpage import write_colspecs
```



---
## visit_comment
```python
from manpage import visit_comment
```



---
## visit_contact
```python
from manpage import visit_contact
```



---
## visit_container
```python
from manpage import visit_container
```



---
## depart_container
```python
from manpage import depart_container
```



---
## visit_compound
```python
from manpage import visit_compound
```



---
## depart_compound
```python
from manpage import depart_compound
```



---
## visit_copyright
```python
from manpage import visit_copyright
```



---
## visit_danger
```python
from manpage import visit_danger
```



---
## visit_date
```python
from manpage import visit_date
```



---
## visit_decoration
```python
from manpage import visit_decoration
```



---
## depart_decoration
```python
from manpage import depart_decoration
```



---
## visit_definition
```python
from manpage import visit_definition
```



---
## depart_definition
```python
from manpage import depart_definition
```



---
## visit_definition_list
```python
from manpage import visit_definition_list
```



---
## depart_definition_list
```python
from manpage import depart_definition_list
```



---
## visit_definition_list_item
```python
from manpage import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from manpage import depart_definition_list_item
```



---
## visit_description
```python
from manpage import visit_description
```



---
## depart_description
```python
from manpage import depart_description
```



---
## visit_docinfo
```python
from manpage import visit_docinfo
```



---
## depart_docinfo
```python
from manpage import depart_docinfo
```



---
## visit_doctest_block
```python
from manpage import visit_doctest_block
```



---
## depart_doctest_block
```python
from manpage import depart_doctest_block
```



---
## visit_document
```python
from manpage import visit_document
```



---
## depart_document
```python
from manpage import depart_document
```



---
## visit_emphasis
```python
from manpage import visit_emphasis
```



---
## depart_emphasis
```python
from manpage import depart_emphasis
```



---
## visit_entry
```python
from manpage import visit_entry
```



---
## depart_entry
```python
from manpage import depart_entry
```



---
## visit_enumerated_list
```python
from manpage import visit_enumerated_list
```



---
## depart_enumerated_list
```python
from manpage import depart_enumerated_list
```



---
## visit_error
```python
from manpage import visit_error
```



---
## visit_field
```python
from manpage import visit_field
```



---
## depart_field
```python
from manpage import depart_field
```



---
## visit_field_body
```python
from manpage import visit_field_body
```



---
## depart_field_body
```python
from manpage import depart_field_body
```



---
## visit_field_list
```python
from manpage import visit_field_list
```



---
## depart_field_list
```python
from manpage import depart_field_list
```



---
## visit_field_name
```python
from manpage import visit_field_name
```



---
## depart_field_name
```python
from manpage import depart_field_name
```



---
## visit_figure
```python
from manpage import visit_figure
```



---
## depart_figure
```python
from manpage import depart_figure
```



---
## visit_footer
```python
from manpage import visit_footer
```



---
## depart_footer
```python
from manpage import depart_footer
```



---
## visit_footnote
```python
from manpage import visit_footnote
```



---
## depart_footnote
```python
from manpage import depart_footnote
```



---
## footnote_backrefs
```python
from manpage import footnote_backrefs
```



---
## visit_footnote_reference
```python
from manpage import visit_footnote_reference
```



---
## depart_footnote_reference
```python
from manpage import depart_footnote_reference
```



---
## visit_generated
```python
from manpage import visit_generated
```



---
## depart_generated
```python
from manpage import depart_generated
```



---
## visit_header
```python
from manpage import visit_header
```



---
## depart_header
```python
from manpage import depart_header
```



---
## visit_hint
```python
from manpage import visit_hint
```



---
## visit_subscript
```python
from manpage import visit_subscript
```



---
## depart_subscript
```python
from manpage import depart_subscript
```



---
## visit_superscript
```python
from manpage import visit_superscript
```



---
## depart_superscript
```python
from manpage import depart_superscript
```



---
## visit_attribution
```python
from manpage import visit_attribution
```



---
## depart_attribution
```python
from manpage import depart_attribution
```



---
## visit_image
```python
from manpage import visit_image
```



---
## visit_important
```python
from manpage import visit_important
```



---
## visit_inline
```python
from manpage import visit_inline
```



---
## depart_inline
```python
from manpage import depart_inline
```



---
## visit_label
```python
from manpage import visit_label
```



---
## depart_label
```python
from manpage import depart_label
```



---
## visit_legend
```python
from manpage import visit_legend
```



---
## depart_legend
```python
from manpage import depart_legend
```



---
## visit_line_block
```python
from manpage import visit_line_block
```



---
## depart_line_block
```python
from manpage import depart_line_block
```



---
## visit_line
```python
from manpage import visit_line
```



---
## depart_line
```python
from manpage import depart_line
```



---
## visit_list_item
```python
from manpage import visit_list_item
```



---
## depart_list_item
```python
from manpage import depart_list_item
```



---
## visit_literal
```python
from manpage import visit_literal
```



---
## depart_literal
```python
from manpage import depart_literal
```



---
## visit_literal_block
```python
from manpage import visit_literal_block
```



---
## depart_literal_block
```python
from manpage import depart_literal_block
```



---
## visit_math
```python
from manpage import visit_math
```



---
## depart_math
```python
from manpage import depart_math
```



---
## visit_math_block
```python
from manpage import visit_math_block
```



---
## depart_math_block
```python
from manpage import depart_math_block
```



---
## visit_note
```python
from manpage import visit_note
```



---
## indent
```python
from manpage import indent
```



---
## dedent
```python
from manpage import dedent
```



---
## visit_option_list
```python
from manpage import visit_option_list
```



---
## depart_option_list
```python
from manpage import depart_option_list
```



---
## visit_option_list_item
```python
from manpage import visit_option_list_item
```



---
## depart_option_list_item
```python
from manpage import depart_option_list_item
```



---
## visit_option_group
```python
from manpage import visit_option_group
```



---
## depart_option_group
```python
from manpage import depart_option_group
```



---
## visit_option
```python
from manpage import visit_option
```



---
## depart_option
```python
from manpage import depart_option
```



---
## visit_option_string
```python
from manpage import visit_option_string
```



---
## depart_option_string
```python
from manpage import depart_option_string
```



---
## visit_option_argument
```python
from manpage import visit_option_argument
```



---
## depart_option_argument
```python
from manpage import depart_option_argument
```



---
## visit_organization
```python
from manpage import visit_organization
```



---
## depart_organization
```python
from manpage import depart_organization
```



---
## first_child
```python
from manpage import first_child
```



---
## visit_paragraph
```python
from manpage import visit_paragraph
```



---
## depart_paragraph
```python
from manpage import depart_paragraph
```



---
## visit_problematic
```python
from manpage import visit_problematic
```



---
## depart_problematic
```python
from manpage import depart_problematic
```



---
## visit_raw
```python
from manpage import visit_raw
```



---
## visit_reference
```python
from manpage import visit_reference
```



---
## depart_reference
```python
from manpage import depart_reference
```



---
## visit_revision
```python
from manpage import visit_revision
```



---
## visit_row
```python
from manpage import visit_row
```



---
## depart_row
```python
from manpage import depart_row
```



---
## visit_section
```python
from manpage import visit_section
```



---
## depart_section
```python
from manpage import depart_section
```



---
## visit_status
```python
from manpage import visit_status
```



---
## visit_strong
```python
from manpage import visit_strong
```



---
## depart_strong
```python
from manpage import depart_strong
```



---
## visit_substitution_definition
```python
from manpage import visit_substitution_definition
```

Internal only.

---
## visit_substitution_reference
```python
from manpage import visit_substitution_reference
```



---
## visit_subtitle
```python
from manpage import visit_subtitle
```



---
## depart_subtitle
```python
from manpage import depart_subtitle
```



---
## visit_system_message
```python
from manpage import visit_system_message
```



---
## depart_system_message
```python
from manpage import depart_system_message
```



---
## visit_table
```python
from manpage import visit_table
```



---
## depart_table
```python
from manpage import depart_table
```



---
## visit_target
```python
from manpage import visit_target
```



---
## visit_tbody
```python
from manpage import visit_tbody
```



---
## depart_tbody
```python
from manpage import depart_tbody
```



---
## visit_term
```python
from manpage import visit_term
```



---
## depart_term
```python
from manpage import depart_term
```



---
## visit_tgroup
```python
from manpage import visit_tgroup
```



---
## depart_tgroup
```python
from manpage import depart_tgroup
```



---
## visit_thead
```python
from manpage import visit_thead
```



---
## depart_thead
```python
from manpage import depart_thead
```



---
## visit_tip
```python
from manpage import visit_tip
```



---
## visit_title
```python
from manpage import visit_title
```



---
## depart_title
```python
from manpage import depart_title
```



---
## visit_title_reference
```python
from manpage import visit_title_reference
```

inline citation reference

---
## depart_title_reference
```python
from manpage import depart_title_reference
```



---
## visit_topic
```python
from manpage import visit_topic
```



---
## depart_topic
```python
from manpage import depart_topic
```



---
## visit_sidebar
```python
from manpage import visit_sidebar
```



---
## depart_sidebar
```python
from manpage import depart_sidebar
```



---
## visit_rubric
```python
from manpage import visit_rubric
```



---
## depart_rubric
```python
from manpage import depart_rubric
```



---
## visit_transition
```python
from manpage import visit_transition
```



---
## depart_transition
```python
from manpage import depart_transition
```



---
## visit_version
```python
from manpage import visit_version
```



---
## visit_warning
```python
from manpage import visit_warning
```



---
## unimplemented_visit
```python
from manpage import unimplemented_visit
```



---
## EnumChar
```python
from manpage import EnumChar
```



---
## __next__
```python
from manpage import __next__
```



---
## get_width
```python
from manpage import get_width
```



---
## __repr__
```python
from manpage import __repr__
```



---
## __name__
```python
from pseudoxml import __name__
```

Simple internal document tree Writer, writes indented pseudo-XML.

---
## Writer
```python
from pseudoxml import Writer
```



---
## translate
```python
from pseudoxml import translate
```



---
## supports
```python
from pseudoxml import supports
```

This writer supports all format-specific elements.

---
## Writer
```python
from null import Writer
```



---
## translate
```python
from null import translate
```



---
## Writer
```python
from __init__ import Writer
```



---
## UnfilteredWriter
```python
from __init__ import UnfilteredWriter
```

A writer that passes the document tree on unchanged (e.g. a
serializer.)

Documents written by UnfilteredWriters are typically reused at a
later date using a subclass of `readers.ReReader`.

---
## get_writer_class
```python
from __init__ import get_writer_class
```

Return the Writer class from the `writer_name` module.

---
## translate
```python
from __init__ import translate
```



---
## assemble_parts
```python
from __init__ import assemble_parts
```



---
## __name__
```python
from _html_base import __name__
```

common definitions for Docutils HTML writers

---
## Writer
```python
from _html_base import Writer
```



---
## HTMLTranslator
```python
from _html_base import HTMLTranslator
```

Generic Docutils to HTML translator.

    See the `html4css1` and `html5_polyglot` writers for full featured
    HTML writers.

    .. IMPORTANT::
      The `visit_*` and `depart_*` methods use a
      heterogeneous stack, `self.context`.
      When subclassing, make sure to be consistent in its use!

      Examples for robust coding:

      a) Override both `visit_*` and `depart_*` methods, don't call the
         parent functions.

      b) Extend both and unconditionally call the parent functions::

           def visit_example(self, node):
               if foo:
                   self.body.append('<div class="foo">')
               html4css1.HTMLTranslator.visit_example(self, node)

           def depart_example(self, node):
               html4css1.HTMLTranslator.depart_example(self, node)
               if foo:
                   self.body.append('</div>')

      c) Extend both, calling the parent functions under the same
         conditions::

           def visit_example(self, node):
               if foo:
                   self.body.append('<div class="foo">
')
               else: # call the parent method
                   _html_base.HTMLTranslator.visit_example(self, node)

           def depart_example(self, node):
               if foo:
                   self.body.append('</div>
')
               else: # call the parent method
                   _html_base.HTMLTranslator.depart_example(self, node)

      d) Extend one method (call the parent), but don't otherwise use the
         `self.context` stack::

           def depart_example(self, node):
               _html_base.HTMLTranslator.depart_example(self, node)
               if foo:
                   # implementation-specific code
                   # that does not use `self.context`
                   self.body.append('</div>
')

      This way, changes in stack use will not bite you.
    

---
## SimpleListChecker
```python
from _html_base import SimpleListChecker
```

Raise `nodes.NodeFound` if non-simple list item is encountered.

Here "simple" means a list item containing nothing other than a single
paragraph, a simple list, or a paragraph followed by a simple list.

This version also checks for simple field lists and docinfo.

---
## get_transforms
```python
from _html_base import get_transforms
```



---
## translate
```python
from _html_base import translate
```



---
## apply_template
```python
from _html_base import apply_template
```



---
## interpolation_dict
```python
from _html_base import interpolation_dict
```



---
## assemble_parts
```python
from _html_base import assemble_parts
```



---
## __init__
```python
from _html_base import __init__
```



---
## astext
```python
from _html_base import astext
```



---
## attval
```python
from _html_base import attval
```

Cleanse, HTML encode, and return attribute value text.

---
## cloak_email
```python
from _html_base import cloak_email
```

Try to hide the link text of a email link from harversters.

---
## cloak_mailto
```python
from _html_base import cloak_mailto
```

Try to hide a mailto: URL from harvesters.

---
## encode
```python
from _html_base import encode
```

Encode special characters in `text` & return.

---
## image_size
```python
from _html_base import image_size
```



---
## prepare_svg
```python
from _html_base import prepare_svg
```



---
## stylesheet_call
```python
from _html_base import stylesheet_call
```

Return code to reference or embed stylesheet file `path`

---
## starttag
```python
from _html_base import starttag
```

Construct and return a start tag given a node (id & class attributes
are extracted), tag name, and optional attributes.

---
## emptytag
```python
from _html_base import emptytag
```

Construct and return an XML-compatible empty tag.

---
## report_messages
```python
from _html_base import report_messages
```



---
## set_class_on_child
```python
from _html_base import set_class_on_child
```

Set class `class_` on the visible child no. index of `node`.
Do nothing if node has fewer children than `index`.

---
## uri2imagepath
```python
from _html_base import uri2imagepath
```

Get filesystem path corresponding to an URI.

The image directive expects an image URI. Some writers require the
corresponding image path to read the image size from the file or to
embed the image in the output.

Absolute URIs consider the "root_prefix" setting.

In order to work in the output document, relative image URIs relate
to the output directory. For access by the writer, the corresponding
image path must be relative to the current working directory.

Provisional: the function's location, interface and behaviour
may change without advance warning.

---
## visit_Text
```python
from _html_base import visit_Text
```



---
## depart_Text
```python
from _html_base import depart_Text
```



---
## visit_abbreviation
```python
from _html_base import visit_abbreviation
```



---
## depart_abbreviation
```python
from _html_base import depart_abbreviation
```



---
## visit_acronym
```python
from _html_base import visit_acronym
```



---
## depart_acronym
```python
from _html_base import depart_acronym
```



---
## visit_address
```python
from _html_base import visit_address
```



---
## depart_address
```python
from _html_base import depart_address
```



---
## visit_admonition
```python
from _html_base import visit_admonition
```



---
## depart_admonition
```python
from _html_base import depart_admonition
```



---
## visit_attribution
```python
from _html_base import visit_attribution
```



---
## depart_attribution
```python
from _html_base import depart_attribution
```



---
## visit_author
```python
from _html_base import visit_author
```



---
## depart_author
```python
from _html_base import depart_author
```



---
## visit_authors
```python
from _html_base import visit_authors
```



---
## depart_authors
```python
from _html_base import depart_authors
```



---
## visit_block_quote
```python
from _html_base import visit_block_quote
```



---
## depart_block_quote
```python
from _html_base import depart_block_quote
```



---
## check_simple_list
```python
from _html_base import check_simple_list
```

Check for a simple list that can be rendered compactly.

---
## is_compactable
```python
from _html_base import is_compactable
```



---
## visit_bullet_list
```python
from _html_base import visit_bullet_list
```



---
## depart_bullet_list
```python
from _html_base import depart_bullet_list
```



---
## visit_caption
```python
from _html_base import visit_caption
```



---
## depart_caption
```python
from _html_base import depart_caption
```



---
## visit_citation
```python
from _html_base import visit_citation
```



---
## depart_citation
```python
from _html_base import depart_citation
```



---
## visit_citation_reference
```python
from _html_base import visit_citation_reference
```



---
## depart_citation_reference
```python
from _html_base import depart_citation_reference
```



---
## visit_classifier
```python
from _html_base import visit_classifier
```



---
## depart_classifier
```python
from _html_base import depart_classifier
```



---
## visit_colspec
```python
from _html_base import visit_colspec
```



---
## depart_colspec
```python
from _html_base import depart_colspec
```



---
## visit_comment
```python
from _html_base import visit_comment
```

Escape double-dashes in comment text.

---
## visit_compound
```python
from _html_base import visit_compound
```



---
## depart_compound
```python
from _html_base import depart_compound
```



---
## visit_container
```python
from _html_base import visit_container
```



---
## depart_container
```python
from _html_base import depart_container
```



---
## visit_contact
```python
from _html_base import visit_contact
```



---
## depart_contact
```python
from _html_base import depart_contact
```



---
## visit_copyright
```python
from _html_base import visit_copyright
```



---
## depart_copyright
```python
from _html_base import depart_copyright
```



---
## visit_date
```python
from _html_base import visit_date
```



---
## depart_date
```python
from _html_base import depart_date
```



---
## visit_decoration
```python
from _html_base import visit_decoration
```



---
## depart_decoration
```python
from _html_base import depart_decoration
```



---
## visit_definition
```python
from _html_base import visit_definition
```



---
## depart_definition
```python
from _html_base import depart_definition
```



---
## visit_definition_list
```python
from _html_base import visit_definition_list
```



---
## depart_definition_list
```python
from _html_base import depart_definition_list
```



---
## visit_definition_list_item
```python
from _html_base import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from _html_base import depart_definition_list_item
```



---
## visit_description
```python
from _html_base import visit_description
```



---
## depart_description
```python
from _html_base import depart_description
```



---
## visit_docinfo
```python
from _html_base import visit_docinfo
```



---
## depart_docinfo
```python
from _html_base import depart_docinfo
```



---
## visit_docinfo_item
```python
from _html_base import visit_docinfo_item
```



---
## depart_docinfo_item
```python
from _html_base import depart_docinfo_item
```



---
## visit_doctest_block
```python
from _html_base import visit_doctest_block
```



---
## depart_doctest_block
```python
from _html_base import depart_doctest_block
```



---
## visit_document
```python
from _html_base import visit_document
```



---
## depart_document
```python
from _html_base import depart_document
```



---
## visit_emphasis
```python
from _html_base import visit_emphasis
```



---
## depart_emphasis
```python
from _html_base import depart_emphasis
```



---
## visit_entry
```python
from _html_base import visit_entry
```



---
## depart_entry
```python
from _html_base import depart_entry
```



---
## visit_enumerated_list
```python
from _html_base import visit_enumerated_list
```



---
## depart_enumerated_list
```python
from _html_base import depart_enumerated_list
```



---
## visit_field_list
```python
from _html_base import visit_field_list
```



---
## depart_field_list
```python
from _html_base import depart_field_list
```



---
## visit_field
```python
from _html_base import visit_field
```



---
## depart_field
```python
from _html_base import depart_field
```



---
## visit_field_name
```python
from _html_base import visit_field_name
```



---
## depart_field_name
```python
from _html_base import depart_field_name
```



---
## visit_field_body
```python
from _html_base import visit_field_body
```



---
## depart_field_body
```python
from _html_base import depart_field_body
```



---
## visit_figure
```python
from _html_base import visit_figure
```



---
## depart_figure
```python
from _html_base import depart_figure
```



---
## visit_footer
```python
from _html_base import visit_footer
```



---
## depart_footer
```python
from _html_base import depart_footer
```



---
## visit_footnote
```python
from _html_base import visit_footnote
```



---
## depart_footnote
```python
from _html_base import depart_footnote
```



---
## visit_footnote_reference
```python
from _html_base import visit_footnote_reference
```



---
## depart_footnote_reference
```python
from _html_base import depart_footnote_reference
```



---
## visit_generated
```python
from _html_base import visit_generated
```



---
## depart_generated
```python
from _html_base import depart_generated
```



---
## visit_header
```python
from _html_base import visit_header
```



---
## depart_header
```python
from _html_base import depart_header
```



---
## visit_image
```python
from _html_base import visit_image
```



---
## depart_image
```python
from _html_base import depart_image
```



---
## visit_inline
```python
from _html_base import visit_inline
```



---
## depart_inline
```python
from _html_base import depart_inline
```



---
## visit_label
```python
from _html_base import visit_label
```



---
## depart_label
```python
from _html_base import depart_label
```



---
## visit_legend
```python
from _html_base import visit_legend
```



---
## depart_legend
```python
from _html_base import depart_legend
```



---
## visit_line
```python
from _html_base import visit_line
```



---
## depart_line
```python
from _html_base import depart_line
```



---
## visit_line_block
```python
from _html_base import visit_line_block
```



---
## depart_line_block
```python
from _html_base import depart_line_block
```



---
## visit_list_item
```python
from _html_base import visit_list_item
```



---
## depart_list_item
```python
from _html_base import depart_list_item
```



---
## visit_literal
```python
from _html_base import visit_literal
```



---
## depart_literal
```python
from _html_base import depart_literal
```



---
## visit_literal_block
```python
from _html_base import visit_literal_block
```



---
## depart_literal_block
```python
from _html_base import depart_literal_block
```



---
## visit_math
```python
from _html_base import visit_math
```



---
## depart_math
```python
from _html_base import depart_math
```



---
## visit_math_block
```python
from _html_base import visit_math_block
```



---
## depart_math_block
```python
from _html_base import depart_math_block
```



---
## visit_meta
```python
from _html_base import visit_meta
```



---
## depart_meta
```python
from _html_base import depart_meta
```



---
## visit_option
```python
from _html_base import visit_option
```



---
## depart_option
```python
from _html_base import depart_option
```



---
## visit_option_argument
```python
from _html_base import visit_option_argument
```



---
## depart_option_argument
```python
from _html_base import depart_option_argument
```



---
## visit_option_group
```python
from _html_base import visit_option_group
```



---
## depart_option_group
```python
from _html_base import depart_option_group
```



---
## visit_option_list
```python
from _html_base import visit_option_list
```



---
## depart_option_list
```python
from _html_base import depart_option_list
```



---
## visit_option_list_item
```python
from _html_base import visit_option_list_item
```



---
## depart_option_list_item
```python
from _html_base import depart_option_list_item
```



---
## visit_option_string
```python
from _html_base import visit_option_string
```



---
## depart_option_string
```python
from _html_base import depart_option_string
```



---
## visit_organization
```python
from _html_base import visit_organization
```



---
## depart_organization
```python
from _html_base import depart_organization
```



---
## visit_paragraph
```python
from _html_base import visit_paragraph
```



---
## depart_paragraph
```python
from _html_base import depart_paragraph
```



---
## visit_problematic
```python
from _html_base import visit_problematic
```



---
## depart_problematic
```python
from _html_base import depart_problematic
```



---
## visit_raw
```python
from _html_base import visit_raw
```



---
## visit_reference
```python
from _html_base import visit_reference
```



---
## depart_reference
```python
from _html_base import depart_reference
```



---
## visit_revision
```python
from _html_base import visit_revision
```



---
## depart_revision
```python
from _html_base import depart_revision
```



---
## visit_row
```python
from _html_base import visit_row
```



---
## depart_row
```python
from _html_base import depart_row
```



---
## visit_rubric
```python
from _html_base import visit_rubric
```



---
## depart_rubric
```python
from _html_base import depart_rubric
```



---
## visit_section
```python
from _html_base import visit_section
```



---
## depart_section
```python
from _html_base import depart_section
```



---
## visit_sidebar
```python
from _html_base import visit_sidebar
```



---
## depart_sidebar
```python
from _html_base import depart_sidebar
```



---
## visit_status
```python
from _html_base import visit_status
```



---
## depart_status
```python
from _html_base import depart_status
```



---
## visit_strong
```python
from _html_base import visit_strong
```



---
## depart_strong
```python
from _html_base import depart_strong
```



---
## visit_subscript
```python
from _html_base import visit_subscript
```



---
## depart_subscript
```python
from _html_base import depart_subscript
```



---
## visit_substitution_definition
```python
from _html_base import visit_substitution_definition
```

Internal only.

---
## visit_substitution_reference
```python
from _html_base import visit_substitution_reference
```



---
## visit_subtitle
```python
from _html_base import visit_subtitle
```



---
## depart_subtitle
```python
from _html_base import depart_subtitle
```



---
## visit_superscript
```python
from _html_base import visit_superscript
```



---
## depart_superscript
```python
from _html_base import depart_superscript
```



---
## visit_system_message
```python
from _html_base import visit_system_message
```



---
## depart_system_message
```python
from _html_base import depart_system_message
```



---
## visit_table
```python
from _html_base import visit_table
```



---
## depart_table
```python
from _html_base import depart_table
```



---
## visit_target
```python
from _html_base import visit_target
```



---
## depart_target
```python
from _html_base import depart_target
```



---
## visit_tbody
```python
from _html_base import visit_tbody
```



---
## depart_tbody
```python
from _html_base import depart_tbody
```



---
## visit_term
```python
from _html_base import visit_term
```



---
## depart_term
```python
from _html_base import depart_term
```



---
## visit_tgroup
```python
from _html_base import visit_tgroup
```



---
## depart_tgroup
```python
from _html_base import depart_tgroup
```



---
## visit_thead
```python
from _html_base import visit_thead
```



---
## depart_thead
```python
from _html_base import depart_thead
```



---
## section_title_tags
```python
from _html_base import section_title_tags
```



---
## visit_title
```python
from _html_base import visit_title
```



---
## depart_title
```python
from _html_base import depart_title
```



---
## visit_title_reference
```python
from _html_base import visit_title_reference
```



---
## depart_title_reference
```python
from _html_base import depart_title_reference
```



---
## visit_topic
```python
from _html_base import visit_topic
```



---
## depart_topic
```python
from _html_base import depart_topic
```



---
## visit_transition
```python
from _html_base import visit_transition
```



---
## depart_transition
```python
from _html_base import depart_transition
```



---
## visit_version
```python
from _html_base import visit_version
```



---
## depart_version
```python
from _html_base import depart_version
```



---
## unimplemented_visit
```python
from _html_base import unimplemented_visit
```



---
## default_visit
```python
from _html_base import default_visit
```



---
## pass_node
```python
from _html_base import pass_node
```



---
## ignore_node
```python
from _html_base import ignore_node
```



---
## __name__
```python
from docutils_xml import __name__
```

Simple document tree Writer, writes Docutils XML according to
https://docutils.sourceforge.io/docs/ref/docutils.dtd.

---
## RawXmlError
```python
from docutils_xml import RawXmlError
```



---
## Writer
```python
from docutils_xml import Writer
```



---
## XMLTranslator
```python
from docutils_xml import XMLTranslator
```



---
## TestXml
```python
from docutils_xml import TestXml
```



---
## __init__
```python
from docutils_xml import __init__
```



---
## translate
```python
from docutils_xml import translate
```



---
## default_visit
```python
from docutils_xml import default_visit
```

Default node visit method.

---
## default_departure
```python
from docutils_xml import default_departure
```

Default node depart method.

---
## visit_Text
```python
from docutils_xml import visit_Text
```



---
## depart_Text
```python
from docutils_xml import depart_Text
```



---
## visit_raw
```python
from docutils_xml import visit_raw
```



---
## setDocumentLocator
```python
from docutils_xml import setDocumentLocator
```



---
## __name__
```python
from roman import __name__
```

Convert to and from Roman numerals

---
## RomanError
```python
from roman import RomanError
```



---
## OutOfRangeError
```python
from roman import OutOfRangeError
```



---
## NotIntegerError
```python
from roman import NotIntegerError
```



---
## InvalidRomanNumeralError
```python
from roman import InvalidRomanNumeralError
```



---
## toRoman
```python
from roman import toRoman
```

convert integer to Roman numeral

---
## fromRoman
```python
from roman import fromRoman
```

convert Roman numeral to integer

---
## parse_args
```python
from roman import parse_args
```



---
## main
```python
from roman import main
```



---
## __name__
```python
from punctuation_chars import __name__
```

Docutils character category patterns.

Patterns for the implementation of the `inline markup recognition rules`_
in the reStructuredText parser `docutils.parsers.rst.states.py` based
on Unicode character categories.
The patterns are used inside ``[ ]`` in regular expressions.

Rule (5) requires determination of matching open/close pairs. However, the
pairing of open/close quotes is ambiguous due to  different typographic
conventions in different languages. The ``quote_pairs`` function tests
whether two characters form an open/close pair.

The patterns are generated by
``docutils/tools/dev/generate_punctuation_chars.py`` to  prevent dependence
on the Python version and avoid the time-consuming generation with every
Docutils run. See there for motives and implementation details.

The category of some characters changed with the development of the
Unicode standard. The current lists are generated with the help of the
"unicodedata" module of Python 2.7.13 (based on Unicode version 5.2.0).

.. _inline markup recognition rules:
   https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html
   #inline-markup-recognition-rules

---
## match_chars
```python
from punctuation_chars import match_chars
```

Test whether `c1` and `c2` are a matching open/close character pair.

---
## __name__
```python
from smartquotes import __name__
```

Convert straight quotation marks to typographic ones

---
## smartchars
```python
from smartquotes import smartchars
```

Smart quotes and dashes

---
## RegularExpressions
```python
from smartquotes import RegularExpressions
```



---
## smartyPants
```python
from smartquotes import smartyPants
```

Main function for "traditional" use.

---
## educate_tokens
```python
from smartquotes import educate_tokens
```

Return iterator that "educates" the items of `text_tokens`.

---
## educateQuotes
```python
from smartquotes import educateQuotes
```

Parameter:  - text string (unicode or bytes).
            - language (`BCP 47` language tag.)
Returns:    The `text`, with "educated" curly quote characters.

Example input:  "Isn't this fun?"
Example output: “Isn’t this fun?“

---
## educateBackticks
```python
from smartquotes import educateBackticks
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with ``backticks'' -style double quotes
            translated into HTML curly quote entities.
Example input:  ``Isn't this fun?''
Example output: “Isn't this fun?“

---
## educateSingleBackticks
```python
from smartquotes import educateSingleBackticks
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with `backticks' -style single quotes
            translated into HTML curly quote entities.

Example input:  `Isn't this fun?'
Example output: ‘Isn’t this fun?’

---
## educateDashes
```python
from smartquotes import educateDashes
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with each instance of "--" translated to
            an em-dash character.

---
## educateDashesOldSchool
```python
from smartquotes import educateDashesOldSchool
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with each instance of "--" translated to
            an en-dash character, and each "---" translated to
            an em-dash character.

---
## educateDashesOldSchoolInverted
```python
from smartquotes import educateDashesOldSchoolInverted
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with each instance of "--" translated to
            an em-dash character, and each "---" translated to
            an en-dash character. Two reasons why: First, unlike the
            en- and em-dash syntax supported by
            EducateDashesOldSchool(), it's compatible with existing
            entries written before SmartyPants 1.1, back when "--" was
            only used for em-dashes.  Second, em-dashes are more
            common than en-dashes, and so it sort of makes sense that
            the shortcut should be shorter to type. (Thanks to Aaron
            Swartz for the idea.)

---
## educateEllipses
```python
from smartquotes import educateEllipses
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with each instance of "..." translated to
            an ellipsis character.

Example input:  Huh...?
Example output: Huh…?

---
## stupefyEntities
```python
from smartquotes import stupefyEntities
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with each SmartyPants character translated to
            its ASCII counterpart.

Example input:  “Hello — world.”
Example output: "Hello -- world."

---
## processEscapes
```python
from smartquotes import processEscapes
```

Parameter:  String (unicode or bytes).
Returns:    The `text`, with after processing the following backslash
            escape sequences. This is useful if you want to force a "dumb"
            quote or other character to appear.

            Escape  Value
            ------  -----
            \\      &#92;
            \"      &#34;
            \'      &#39;
            \.      &#46;
            \-      &#45;
            \`      &#96;

---
## tokenize
```python
from smartquotes import tokenize
```

Parameter:  String containing HTML markup.
Returns:    An iterator that yields the tokens comprising the input
            string. Each token is either a tag (possibly with nested,
            tags contained therein, such as <a href="<MTFoo>">, or a
            run of text between tags. Each yielded element is a
            two-element tuple; the first is either 'tag' or 'text';
            the second is the actual value.

Based on the _tokenize() subroutine from Brad Choate's MTRegex plugin.

---
## __init__
```python
from smartquotes import __init__
```



---
## TestSmartypantsAllAttributes
```python
from smartquotes import TestSmartypantsAllAttributes
```



---
## test_dates
```python
from smartquotes import test_dates
```



---
## test_educated_quotes
```python
from smartquotes import test_educated_quotes
```



---
## test_html_tags
```python
from smartquotes import test_html_tags
```



---
## __name__
```python
from urischemes import __name__
```

`schemes` is a dictionary with lowercase URI addressing schemes as
keys and descriptions as values. It was compiled from the index at
http://www.iana.org/assignments/uri-schemes (revised 2005-11-28)
and an older list at https://www.w3.org/Addressing/schemes.html.

---
## __name__
```python
from error_reporting import __name__
```

Deprecated module to handle Exceptions across Python versions.

.. warning::
   This module is deprecated with the end of support for Python 2.7
   and will be removed in Docutils 0.21 or later.

   Replacements:
     | SafeString  -> str
     | ErrorString -> docutils.io.error_string()
     | ErrorOutput -> docutils.io.ErrorOutput

Error reporting should be safe from encoding/decoding errors.
However, implicit conversions of strings and exceptions like

>>> u'%s world: %s' % ('Hällo', Exception(u'Hällo'))

fail in some Python versions:

* In Python <= 2.6, ``unicode(<exception instance>)`` uses
  `__str__` and fails with non-ASCII chars in`unicode` arguments.
  (work around http://bugs.python.org/issue2517):

* In Python 2, unicode(<exception instance>) fails, with non-ASCII
  chars in arguments. (Use case: in some locales, the errstr
  argument of IOError contains non-ASCII chars.)

* In Python 2, str(<exception instance>) fails, with non-ASCII chars
  in `unicode` arguments.

The `SafeString`, `ErrorString` and `ErrorOutput` classes handle
common exceptions.

---
## SafeString
```python
from error_reporting import SafeString
```

A wrapper providing robust conversion to `str` and `unicode`.

---
## ErrorString
```python
from error_reporting import ErrorString
```

Safely report exception type and message.

---
## ErrorOutput
```python
from error_reporting import ErrorOutput
```

Wrapper class for file-like error streams with
failsafe de- and encoding of `str`, `bytes`, `unicode` and
`Exception` instances.

---
## __init__
```python
from error_reporting import __init__
```

:Parameters:
- `stream`: a file-like object,
            a string (path to a file),
            `None` (write to `sys.stderr`, default), or
            evaluating to `False` (write() requests are ignored).
- `encoding`: `stream` text encoding. Guessed if None.
- `encoding_errors`: how to treat encoding errors.

---
## __str__
```python
from error_reporting import __str__
```



---
## __unicode__
```python
from error_reporting import __unicode__
```



---
## write
```python
from error_reporting import write
```

Write `data` to self.stream. Ignore, if self.stream is False.

`data` can be a `string`, `unicode`, or `Exception` instance.

---
## close
```python
from error_reporting import close
```

Close the error-output stream.

Ignored if the stream is` sys.stderr` or `sys.stdout` or has no
close() method.

---
## SystemMessage
```python
from __init__ import SystemMessage
```



---
## SystemMessagePropagation
```python
from __init__ import SystemMessagePropagation
```



---
## Reporter
```python
from __init__ import Reporter
```

Info/warning/error reporter and ``system_message`` element generator.

Five levels of system messages are defined, along with corresponding
methods: `debug()`, `info()`, `warning()`, `error()`, and `severe()`.

There is typically one Reporter object per process.  A Reporter object is
instantiated with thresholds for reporting (generating warnings) and
halting processing (raising exceptions), a switch to turn debug output on
or off, and an I/O stream for warnings.  These are stored as instance
attributes.

When a system message is generated, its level is compared to the stored
thresholds, and a warning or error is generated as appropriate.  Debug
messages are produced if the stored debug switch is on, independently of
other thresholds.  Message output is sent to the stored warning stream if
not set to ''.

The Reporter class also employs a modified form of the "Observer" pattern
[GoF95]_ to track system messages generated.  The `attach_observer` method
should be called before parsing, with a bound method or function which
accepts system messages.  The observer can be removed with
`detach_observer`, and another added in its place.

.. [GoF95] Gamma, Helm, Johnson, Vlissides. *Design Patterns: Elements of
   Reusable Object-Oriented Software*. Addison-Wesley, Reading, MA, USA,
   1995.

---
## ExtensionOptionError
```python
from __init__ import ExtensionOptionError
```



---
## BadOptionError
```python
from __init__ import BadOptionError
```



---
## BadOptionDataError
```python
from __init__ import BadOptionDataError
```



---
## DuplicateOptionError
```python
from __init__ import DuplicateOptionError
```



---
## extract_extension_options
```python
from __init__ import extract_extension_options
```

Return a dictionary mapping extension option names to converted values.

:Parameters:
    - `field_list`: A flat field list without field arguments, where each
      field body consists of a single paragraph only.
    - `options_spec`: Dictionary mapping known option names to a
      conversion function such as `int` or `float`.

:Exceptions:
    - `KeyError` for unknown option names.
    - `ValueError` for invalid option values (raised by the conversion
       function).
    - `TypeError` for invalid option value types (raised by conversion
       function).
    - `DuplicateOptionError` for duplicate options.
    - `BadOptionError` for invalid fields.
    - `BadOptionDataError` for invalid option data (missing name,
      missing data, bad quotes, etc.).

---
## extract_options
```python
from __init__ import extract_options
```

Return a list of option (name, value) pairs from field names & bodies.

:Parameter:
    `field_list`: A flat field list, where each field name is a single
    word and each field body consists of a single paragraph only.

:Exceptions:
    - `BadOptionError` for invalid fields.
    - `BadOptionDataError` for invalid option data (missing name,
      missing data, bad quotes, etc.).

---
## assemble_option_dict
```python
from __init__ import assemble_option_dict
```

Return a mapping of option names to values.

:Parameters:
    - `option_list`: A list of (name, value) pairs (the output of
      `extract_options()`).
    - `options_spec`: Dictionary mapping known option names to a
      conversion function such as `int` or `float`.

:Exceptions:
    - `KeyError` for unknown option names.
    - `DuplicateOptionError` for duplicate options.
    - `ValueError` for invalid option values (raised by conversion
       function).
    - `TypeError` for invalid option value types (raised by conversion
       function).

---
## NameValueError
```python
from __init__ import NameValueError
```



---
## decode_path
```python
from __init__ import decode_path
```

Ensure `path` is Unicode. Return `str` instance.

Decode file/path string in a failsafe manner if not already done.

---
## extract_name_value
```python
from __init__ import extract_name_value
```

Return a list of (name, value) from a line of the form "name=value ...".

:Exception:
    `NameValueError` for invalid input (missing name, missing data, bad
    quotes, etc.).

---
## new_reporter
```python
from __init__ import new_reporter
```

Return a new Reporter object.

:Parameters:
    `source` : string
        The path to or description of the source text of the document.
    `settings` : optparse.Values object
        Runtime settings.

---
## new_document
```python
from __init__ import new_document
```

Create and return a new empty document tree (root node).

---
## clean_rcs_keywords
```python
from __init__ import clean_rcs_keywords
```



---
## relative_path
```python
from __init__ import relative_path
```

Build and return a path to `target`, relative to `source` (both files).

The return value is a `str` suitable to be included in `source`
as a reference to `target`.

:Parameters:
    `source` : path-like object or None
        Path of a file in the start directory for the relative path
        (the file does not need to exist).
        The value ``None`` is replaced with "<cwd>/dummy_file".
    `target` : path-like object
        End point of the returned relative path.

Differences to `os.path.relpath()`:

* Inverse argument order.
* `source` is assumed to be a FILE in the start directory (add a "dummy"
  file name to obtain the path relative from a directory)
  while `os.path.relpath()` expects a DIRECTORY as `start` argument.
* Always use Posix path separator ("/") for the output.
* Use `os.sep` for parsing the input
  (changing the value of `os.sep` is ignored by `os.relpath()`).
* If there is no common prefix, return the absolute path to `target`.

Differences to `pathlib.PurePath.relative_to(other)`:

* pathlib offers an object oriented interface.
* `source` expects path to a FILE while `other` expects a DIRECTORY.
* `target` defaults to the cwd, no default value for `other`.
* `relative_path()` always returns a path (relative or absolute),
  while `PurePath.relative_to()` raises a ValueError
  if `target` is not a subpath of `other` (no ".." inserted).

---
## get_stylesheet_reference
```python
from __init__ import get_stylesheet_reference
```

Retrieve a stylesheet reference from the settings object.

Deprecated. Use get_stylesheet_list() instead to
enable specification of multiple stylesheets as a comma-separated
list.

---
## get_stylesheet_list
```python
from __init__ import get_stylesheet_list
```

Retrieve list of stylesheet references from the settings object.

---
## find_file_in_dirs
```python
from __init__ import find_file_in_dirs
```

Search for `path` in the list of directories `dirs`.

Return the first expansion that matches an existing file.

---
## get_trim_footnote_ref_space
```python
from __init__ import get_trim_footnote_ref_space
```

Return whether or not to trim footnote space.

If trim_footnote_reference_space is not None, return it.

If trim_footnote_reference_space is None, return False unless the
footnote reference style is 'superscript'.

---
## get_source_line
```python
from __init__ import get_source_line
```

Return the "source" and "line" attributes from the `node` given or from
its closest ancestor.

---
## escape2null
```python
from __init__ import escape2null
```

Return a string with escape-backslashes converted to nulls.

---
## split_escaped_whitespace
```python
from __init__ import split_escaped_whitespace
```

Split `text` on escaped whitespace (null+space or null+newline).
Return a list of strings.

---
## strip_combining_chars
```python
from __init__ import strip_combining_chars
```



---
## find_combining_chars
```python
from __init__ import find_combining_chars
```

Return indices of all combining chars in  Unicode string `text`.

>>> from docutils.utils import find_combining_chars
>>> find_combining_chars('A t̆ab̆lĕ')
[3, 6, 9]

---
## column_indices
```python
from __init__ import column_indices
```

Indices of Unicode string `text` when skipping combining characters.

>>> from docutils.utils import column_indices
>>> column_indices('A t̆ab̆lĕ')
[0, 1, 2, 4, 5, 7, 8]

---
## column_width
```python
from __init__ import column_width
```

Return the column width of text.

Correct ``len(text)`` for wide East Asian and combining Unicode chars.

---
## uniq
```python
from __init__ import uniq
```



---
## normalize_language_tag
```python
from __init__ import normalize_language_tag
```

Return a list of normalized combinations for a `BCP 47` language tag.

Example:

>>> from docutils.utils import normalize_language_tag
>>> normalize_language_tag('de_AT-1901')
['de-at-1901', 'de-at', 'de-1901', 'de']
>>> normalize_language_tag('de-CH-x_altquot')
['de-ch-x-altquot', 'de-ch', 'de-x-altquot', 'de']

---
## xml_declaration
```python
from __init__ import xml_declaration
```

Return an XML text declaration.

Include an encoding declaration, if `encoding`
is not 'unicode', '', or None.

---
## DependencyList
```python
from __init__ import DependencyList
```

List of dependencies, with file recording support.

Note that the output file is not automatically closed.  You have
to explicitly call the close() method.

---
## version_identifier
```python
from __init__ import version_identifier
```

Return a version identifier string built from `version_info`, a
`docutils.VersionInfo` namedtuple instance or compatible tuple. If
`version_info` is not provided, by default return a version identifier
string based on `docutils.__version_info__` (i.e. the current Docutils
version).

---
## set_conditions
```python
from __init__ import set_conditions
```



---
## attach_observer
```python
from __init__ import attach_observer
```

The `observer` parameter is a function or bound method which takes one
argument, a `nodes.system_message` instance.

---
## detach_observer
```python
from __init__ import detach_observer
```



---
## notify_observers
```python
from __init__ import notify_observers
```



---
## system_message
```python
from __init__ import system_message
```

Return a system_message object.

Raise an exception or generate a warning if appropriate.

---
## debug
```python
from __init__ import debug
```

Logs a debugging message and returns the last argument.

For the message to appear in the console, the visualization view must have the appropriate logging level set.

---
## info
```python
from __init__ import info
```

Logs an informative message and returns the last argument.

For the message to appear in the console, the visualization view must have the appropriate logging level set.

---
## warning
```python
from __init__ import warning
```



---
## error
```python
from __init__ import error
```



---
## severe
```python
from __init__ import severe
```



---
## set_output
```python
from __init__ import set_output
```

Set the output file and clear the list of already added
dependencies.

`output_file` must be a string.  The specified file is
immediately overwritten.

If output_file is '-', the output will be written to stdout.

---
## add
```python
from __init__ import add
```

Add `dist` if we ``can_add()`` it and it has not already been added

---
## __name__
```python
from code_analyzer import __name__
```

Lexical analysis of formal languages (i.e. code) using Pygments.

---
## LexerError
```python
from code_analyzer import LexerError
```



---
## Lexer
```python
from code_analyzer import Lexer
```

Parse `code` lines and yield "classified" tokens.

Arguments

  code       -- string of source code to parse,
  language   -- formal language the code is written in,
  tokennames -- either 'long', 'short', or 'none' (see below).

Merge subsequent tokens of the same token-type.

Iterating over an instance yields the tokens as ``(tokentype, value)``
tuples. The value of `tokennames` configures the naming of the tokentype:

  'long':  downcased full token type name,
  'short': short name defined by pygments.token.STANDARD_TYPES
           (= class argument used in pygments html output),
  'none':  skip lexical analysis.

---
## NumberLines
```python
from code_analyzer import NumberLines
```

Insert linenumber-tokens at the start of every code line.

Arguments

   tokens    -- iterable of ``(classes, value)`` tuples
   startline -- first line number
   endline   -- last line number

Iterating over an instance yields the tokens with a
``(['ln'], '<the line number>')`` token added for every code line.
Multi-line tokens are split.

---
## __init__
```python
from code_analyzer import __init__
```



---
## merge
```python
from code_analyzer import merge
```

Merge subsequent tokens of same token-type.

Also strip the final newline (added by pygments).

---
## __iter__
```python
from code_analyzer import __iter__
```



---
## __name__
```python
from he import __name__
```

English-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from ka import __name__
```

Georgian-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from ja import __name__
```

Japanese search language: includes routine to split words.

---
## __name__
```python
from af import __name__
```

Afrikaans-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from ko import __name__
```

Korean-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from pl import __name__
```

Polish-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from gl import __name__
```

Galician-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from lv import __name__
```

Latvian-language mappings for language-dependent features of
reStructuredText.

---
## LanguageImporter
```python
from __init__ import LanguageImporter
```

Import language modules.

When called with a BCP 47 language tag, instances return a module
with localisations from `docutils.languages` or the PYTHONPATH.

If there is no matching module, warn (if a `reporter` is passed)
and fall back to English.

---
## import_from_packages
```python
from __init__ import import_from_packages
```

Try loading module `name` from `self.packages`.

---
## check_content
```python
from __init__ import check_content
```

Check if we got an rST language module.

---
## __name__
```python
from ru import __name__
```

Russian search language: includes the JS Russian stemmer.

---
## __name__
```python
from fi import __name__
```

Finnish search language: includes the JS Finnish stemmer.

---
## __name__
```python
from lt import __name__
```

Lithuanian-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from fr import __name__
```

French search language: includes the JS French stemmer.

---
## __name__
```python
from nl import __name__
```

Dutch search language: includes the JS porter stemmer.

---
## __name__
```python
from cs import __name__
```

Czech-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from uk import __name__
```

Ukrainian-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from sv import __name__
```

Swedish search language: includes the JS Swedish stemmer.

---
## __name__
```python
from en import __name__
```

English search language: includes the JS porter stemmer.

---
## __name__
```python
from zh_cn import __name__
```

Simplified Chinese language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from pt_br import __name__
```

Brazilian Portuguese-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from zh_tw import __name__
```

Traditional Chinese language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from eo import __name__
```

Esperanto-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from es import __name__
```

Spanish search language: includes the JS Spanish stemmer.

---
## __name__
```python
from sk import __name__
```

Slovak-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from it import __name__
```

Italian search language: includes the JS Italian stemmer.

---
## __name__
```python
from ar import __name__
```

Arabic-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from ca import __name__
```

Catalan-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from de import __name__
```

German search language: includes the JS German stemmer.

---
## __name__
```python
from fa import __name__
```

Persian-language mappings for language-dependent features of
reStructuredText.

---
## __name__
```python
from da import __name__
```

Danish search language: includes the JS Danish stemmer.

---
## CallBack
```python
from misc import CallBack
```

Inserts a callback into a document.  The callback is called when the
transform is applied, which is determined by its priority.

For use with `nodes.pending` elements.  Requires a ``details['callback']``
entry, a bound method or function which takes one parameter: the pending
node.  Other data can be stored in the ``details`` attribute or in the
object hosting the callback method.

---
## ClassAttribute
```python
from misc import ClassAttribute
```

Move the "class" attribute specified in the "pending" node into the
immediately following non-comment element.

---
## Transitions
```python
from misc import Transitions
```

Move transitions at the end of sections up the tree.  Complain
on transitions after a title, at the beginning or end of the
document, and after another transition.

For example, transform this::

    <section>
        ...
        <transition>
    <section>
        ...

into this::

    <section>
        ...
    <transition>
    <section>
        ...

---
## apply
```python
from misc import apply
```



---
## visit_transition
```python
from misc import visit_transition
```



---
## __name__
```python
from frontmatter import __name__
```

Transforms_ related to the front matter of a document or a section
(information found before the main text):

- `DocTitle`: Used to transform a lone top level section's title to
  the document title, promote a remaining lone top-level section's
  title to the document subtitle, and determine the document's title
  metadata (document['title']) based on the document title and/or the
  "title" setting.

- `SectionSubTitle`: Used to transform a lone subsection into a
  subtitle.

- `DocInfo`: Used to transform a bibliographic field list into docinfo
  elements.

.. _transforms: https://docutils.sourceforge.io/docs/api/transforms.html

---
## TitlePromoter
```python
from frontmatter import TitlePromoter
```

Abstract base class for DocTitle and SectionSubTitle transforms.

---
## DocTitle
```python
from frontmatter import DocTitle
```

In reStructuredText_, there is no way to specify a document title
and subtitle explicitly. Instead, we can supply the document title
(and possibly the subtitle as well) implicitly, and use this
two-step transform to "raise" or "promote" the title(s) (and their
corresponding section contents) to the document level.

1. If the document contains a single top-level section as its first
   element (instances of `nodes.PreBibliographic` are ignored),
   the top-level section's title becomes the document's title, and
   the top-level section's contents become the document's immediate
   contents. The title is also used for the <document> element's
   "title" attribute default value.

2. If step 1 successfully determines the document title, we
   continue by checking for a subtitle.

   If the lone top-level section itself contains a single second-level
   section as its first "non-PreBibliographic" element, that section's
   title is promoted to the document's subtitle, and that section's
   contents become the document's immediate contents.

Example:
   Given this input text::

       =================
        Top-Level Title
       =================

       Second-Level Title
       ~~~~~~~~~~~~~~~~~~

       A paragraph.

   After parsing and running the DocTitle transform, the result is::

       <document names="top-level title">
           <title>
               Top-Level Title
           <subtitle names="second-level title">
               Second-Level Title
           <paragraph>
               A paragraph.

   (Note that the implicit hyperlink target generated by the
   "Second-Level Title" is preserved on the <subtitle> element
   itself.)

Any `nodes.PreBibliographic` instances occurring before the
document title or subtitle are accumulated and inserted as
the first body elements after the title(s).

.. _reStructuredText: https://docutils.sourceforge.io/rst.html

---
## SectionSubTitle
```python
from frontmatter import SectionSubTitle
```

This works like document subtitles, but for sections.  For example, ::

    <section>
        <title>
            Title
        <section>
            <title>
                Subtitle
            ...

is transformed into ::

    <section>
        <title>
            Title
        <subtitle>
            Subtitle
        ...

For details refer to the docstring of DocTitle.

---
## DocInfo
```python
from frontmatter import DocInfo
```

This transform is specific to the reStructuredText_ markup syntax;
see "Bibliographic Fields" in the `reStructuredText Markup
Specification`_ for a high-level description. This transform
should be run *after* the `DocTitle` transform.

If the document contains a field list as the first element (instances
of `nodes.PreBibliographic` are ignored), registered bibliographic
field names are transformed to the corresponding DTD elements,
becoming child elements of the <docinfo> element (except for a
dedication and/or an abstract, which become <topic> elements after
<docinfo>).

For example, given this document fragment after parsing::

    <document>
        <title>
            Document Title
        <field_list>
            <field>
                <field_name>
                    Author
                <field_body>
                    <paragraph>
                        A. Name
            <field>
                <field_name>
                    Status
                <field_body>
                    <paragraph>
                        $RCSfile$
        ...

After running the bibliographic field list transform, the
resulting document tree would look like this::

    <document>
        <title>
            Document Title
        <docinfo>
            <author>
                A. Name
            <status>
                frontmatter.py
        ...

The "Status" field contained an expanded RCS keyword, which is
normally (but optionally) cleaned up by the transform. The sole
contents of the field body must be a paragraph containing an
expanded RCS keyword of the form "$keyword: expansion text $". Any
RCS keyword can be processed in any bibliographic field. The
dollar signs and leading RCS keyword name are removed. Extra
processing is done for the following RCS keywords:

- "RCSfile" expands to the name of the file in the RCS or CVS
  repository, which is the name of the source file with a ",v"
  suffix appended. The transform will remove the ",v" suffix.

- "Date" expands to the format "YYYY/MM/DD hh:mm:ss" (in the UTC
  time zone). The RCS Keywords transform will extract just the
  date itself and transform it to an ISO 8601 format date, as in
  "2000-12-31".

  (Since the source file for this text is itself stored under CVS,
  we can't show an example of the "Date" RCS keyword because we
  can't prevent any RCS keywords used in this explanation from
  being expanded. Only the "RCSfile" keyword is stable; its
  expansion text changes only if the file name changes.)

.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _reStructuredText Markup Specification:
   https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html

---
## promote_title
```python
from frontmatter import promote_title
```

Transform the following tree::

    <node>
        <section>
            <title>
            ...

into ::

    <node>
        <title>
        ...

`node` is normally a document.

---
## promote_subtitle
```python
from frontmatter import promote_subtitle
```

Transform the following node tree::

    <node>
        <title>
        <section>
            <title>
            ...

into ::

    <node>
        <title>
        <subtitle>
        ...

---
## candidate_index
```python
from frontmatter import candidate_index
```

Find and return the promotion candidate and its index.

Return (None, None) if no valid candidate was found.

---
## set_metadata
```python
from frontmatter import set_metadata
```

Set document['title'] metadata title from the following
sources, listed in order of priority:

* Existing document['title'] attribute.
* "title" setting.
* Document title node (as promoted by promote_title).

---
## apply
```python
from frontmatter import apply
```



---
## extract_bibliographic
```python
from frontmatter import extract_bibliographic
```



---
## check_empty_biblio_field
```python
from frontmatter import check_empty_biblio_field
```



---
## check_compound_biblio_field
```python
from frontmatter import check_compound_biblio_field
```



---
## extract_authors
```python
from frontmatter import extract_authors
```



---
## authors_from_one_paragraph
```python
from frontmatter import authors_from_one_paragraph
```

Return list of Text nodes with author names in `field`.

Author names must be separated by one of the "autor separators"
defined for the document language (default: ";" or ",").

---
## authors_from_bullet_list
```python
from frontmatter import authors_from_bullet_list
```



---
## authors_from_paragraphs
```python
from frontmatter import authors_from_paragraphs
```



---
## __name__
```python
from references import __name__
```

Docutils transforms used by Sphinx.

---
## PropagateTargets
```python
from references import PropagateTargets
```

Propagate empty internal targets to the next element.

Given the following nodes::

    <target ids="internal1" names="internal1">
    <target anonymous="1" ids="id1">
    <target ids="internal2" names="internal2">
    <paragraph>
        This is a test.

`PropagateTargets` propagates the ids and names of the internal
targets preceding the paragraph to the paragraph itself::

    <target refid="internal1">
    <target anonymous="1" refid="id1">
    <target refid="internal2">
    <paragraph ids="internal2 id1 internal1" names="internal2 internal1">
        This is a test.

---
## AnonymousHyperlinks
```python
from references import AnonymousHyperlinks
```

Link anonymous references to targets.  Given::

    <paragraph>
        <reference anonymous="1">
            internal
        <reference anonymous="1">
            external
    <target anonymous="1" ids="id1">
    <target anonymous="1" ids="id2" refuri="http://external">

Corresponding references are linked via "refid" or resolved via "refuri"::

    <paragraph>
        <reference anonymous="1" refid="id1">
            text
        <reference anonymous="1" refuri="http://external">
            external
    <target anonymous="1" ids="id1">
    <target anonymous="1" ids="id2" refuri="http://external">

---
## IndirectHyperlinks
```python
from references import IndirectHyperlinks
```

a) Indirect external references::

       <paragraph>
           <reference refname="indirect external">
               indirect external
       <target id="id1" name="direct external"
           refuri="http://indirect">
       <target id="id2" name="indirect external"
           refname="direct external">

   The "refuri" attribute is migrated back to all indirect targets
   from the final direct target (i.e. a target not referring to
   another indirect target)::

       <paragraph>
           <reference refname="indirect external">
               indirect external
       <target id="id1" name="direct external"
           refuri="http://indirect">
       <target id="id2" name="indirect external"
           refuri="http://indirect">

   Once the attribute is migrated, the preexisting "refname" attribute
   is dropped.

b) Indirect internal references::

       <target id="id1" name="final target">
       <paragraph>
           <reference refname="indirect internal">
               indirect internal
       <target id="id2" name="indirect internal 2"
           refname="final target">
       <target id="id3" name="indirect internal"
           refname="indirect internal 2">

   Targets which indirectly refer to an internal target become one-hop
   indirect (their "refid" attributes are directly set to the internal
   target's "id"). References which indirectly refer to an internal
   target become direct internal references::

       <target id="id1" name="final target">
       <paragraph>
           <reference refid="id1">
               indirect internal
       <target id="id2" name="indirect internal 2" refid="id1">
       <target id="id3" name="indirect internal" refid="id1">

---
## ExternalTargets
```python
from references import ExternalTargets
```

Given::

    <paragraph>
        <reference refname="direct external">
            direct external
    <target id="id1" name="direct external" refuri="http://direct">

The "refname" attribute is replaced by the direct "refuri" attribute::

    <paragraph>
        <reference refuri="http://direct">
            direct external
    <target id="id1" name="direct external" refuri="http://direct">

---
## InternalTargets
```python
from references import InternalTargets
```



---
## Footnotes
```python
from references import Footnotes
```

Assign numbers to autonumbered footnotes, and resolve links to footnotes,
citations, and their references.

Given the following ``document`` as input::

    <document>
        <paragraph>
            A labeled autonumbered footnote reference:
            <footnote_reference auto="1" id="id1" refname="footnote">
        <paragraph>
            An unlabeled autonumbered footnote reference:
            <footnote_reference auto="1" id="id2">
        <footnote auto="1" id="id3">
            <paragraph>
                Unlabeled autonumbered footnote.
        <footnote auto="1" id="footnote" name="footnote">
            <paragraph>
                Labeled autonumbered footnote.

Auto-numbered footnotes have attribute ``auto="1"`` and no label.
Auto-numbered footnote_references have no reference text (they're
empty elements). When resolving the numbering, a ``label`` element
is added to the beginning of the ``footnote``, and reference text
to the ``footnote_reference``.

The transformed result will be::

    <document>
        <paragraph>
            A labeled autonumbered footnote reference:
            <footnote_reference auto="1" id="id1" refid="footnote">
                2
        <paragraph>
            An unlabeled autonumbered footnote reference:
            <footnote_reference auto="1" id="id2" refid="id3">
                1
        <footnote auto="1" id="id3" backrefs="id2">
            <label>
                1
            <paragraph>
                Unlabeled autonumbered footnote.
        <footnote auto="1" id="footnote" name="footnote" backrefs="id1">
            <label>
                2
            <paragraph>
                Labeled autonumbered footnote.

Note that the footnotes are not in the same order as the references.

The labels and reference text are added to the auto-numbered ``footnote``
and ``footnote_reference`` elements.  Footnote elements are backlinked to
their references via "refids" attributes.  References are assigned "id"
and "refid" attributes.

After adding labels and reference text, the "auto" attributes can be
ignored.

---
## CircularSubstitutionDefinitionError
```python
from references import CircularSubstitutionDefinitionError
```



---
## Substitutions
```python
from references import Substitutions
```

Given the following ``document`` as input::

    <document>
        <paragraph>
            The
            <substitution_reference refname="biohazard">
                biohazard
             symbol is deservedly scary-looking.
        <substitution_definition name="biohazard">
            <image alt="biohazard" uri="biohazard.png">

The ``substitution_reference`` will simply be replaced by the
contents of the corresponding ``substitution_definition``.

The transformed result will be::

    <document>
        <paragraph>
            The
            <image alt="biohazard" uri="biohazard.png">
             symbol is deservedly scary-looking.
        <substitution_definition name="biohazard">
            <image alt="biohazard" uri="biohazard.png">

---
## TargetNotes
```python
from references import TargetNotes
```

Target footnote generation.

---
## DanglingReferences
```python
from references import DanglingReferences
```

Check for dangling references (incl. footnote & citation) and for
unreferenced targets.

---
## DanglingReferencesVisitor
```python
from references import DanglingReferencesVisitor
```



---
## apply
```python
from references import apply
```



---
## resolve_indirect_target
```python
from references import resolve_indirect_target
```



---
## nonexistent_indirect_target
```python
from references import nonexistent_indirect_target
```



---
## circular_indirect_reference
```python
from references import circular_indirect_reference
```



---
## indirect_target_error
```python
from references import indirect_target_error
```



---
## resolve_indirect_references
```python
from references import resolve_indirect_references
```



---
## resolve_reference_ids
```python
from references import resolve_reference_ids
```

Given::

    <paragraph>
        <reference refname="direct internal">
            direct internal
    <target id="id1" name="direct internal">

The "refname" attribute is replaced by "refid" linking to the target's
"id"::

    <paragraph>
        <reference refid="id1">
            direct internal
    <target id="id1" name="direct internal">

---
## number_footnotes
```python
from references import number_footnotes
```

Assign numbers to autonumbered footnotes.

For labeled autonumbered footnotes, copy the number over to
corresponding footnote references.

---
## number_footnote_references
```python
from references import number_footnote_references
```

Assign numbers to autonumbered footnote references.

---
## symbolize_footnotes
```python
from references import symbolize_footnotes
```

Add symbols indexes to "[*]"-style footnotes and references.

---
## resolve_footnotes_and_citations
```python
from references import resolve_footnotes_and_citations
```

Link manually-labeled footnotes and citations to/from their
references.

---
## resolve_references
```python
from references import resolve_references
```



---
## __init__
```python
from references import __init__
```



---
## make_target_footnote
```python
from references import make_target_footnote
```



---
## unknown_visit
```python
from references import unknown_visit
```



---
## visit_reference
```python
from references import visit_reference
```



---
## TransformError
```python
from __init__ import TransformError
```



---
## Transform
```python
from __init__ import Transform
```

Docutils transform component abstract base class.

---
## Transformer
```python
from __init__ import Transformer
```

Store "transforms" and apply them to the document tree.

Collect lists of `Transform` instances and "unknown_reference_resolvers"
from Docutils components (`TransformSpec` instances).
Apply collected "transforms" to the document tree.

Also keeps track of components by component type name.

https://docutils.sourceforge.io/docs/peps/pep-0258.html#transformer

---
## add_transform
```python
from __init__ import add_transform
```

Store a single transform.  Use `priority` to override the default.
`kwargs` is a dictionary whose contents are passed as keyword
arguments to the `apply` method of the transform.  This can be used to
pass application-specific data to the transform instance.

---
## add_transforms
```python
from __init__ import add_transforms
```

Store multiple transforms, with default priorities.

---
## add_pending
```python
from __init__ import add_pending
```

Store a transform with an associated `pending` node.

---
## get_priority_string
```python
from __init__ import get_priority_string
```

Return a string, `priority` combined with `self.serialno`.

This ensures FIFO order on transforms with identical priority.

---
## populate_from_components
```python
from __init__ import populate_from_components
```

Store each component's default transforms and reference resolvers

Transforms are stored with default priorities for later sorting.
"Unknown reference resolvers" are sorted and stored.
Components that don't inherit from `TransformSpec` are ignored.

Also, store components by type name in a mapping for later lookup.

---
## apply_transforms
```python
from __init__ import apply_transforms
```



---
## keyfun
```python
from __init__ import keyfun
```



---
## __name__
```python
from writer_aux import __name__
```

Auxiliary transforms mainly to be used by Writer components.

This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::

    from docutils import writers
    from docutils.transforms import writers

---
## Compound
```python
from writer_aux import Compound
```

.. warning:: This transform is not used by Docutils since Dec 2010
             and will be removed in Docutils 0.21 or later.

Flatten all compound paragraphs.  For example, transform ::

    <compound>
        <paragraph>
        <literal_block>
        <paragraph>

into ::

    <paragraph>
    <literal_block classes="continued">
    <paragraph classes="continued">

---
## Admonitions
```python
from writer_aux import Admonitions
```

Transform specific admonitions, like this:

    <note>
        <paragraph>
             Note contents ...

into generic admonitions, like this::

    <admonition classes="note">
        <title>
            Note
        <paragraph>
            Note contents ...

The admonition title is localized.

---
## __init__
```python
from writer_aux import __init__
```



---
## apply
```python
from writer_aux import apply
```



---
## __name__
```python
from peps import __name__
```

Transforms for PEP processing.

- `Headers`: Used to transform a PEP's initial RFC-2822 header.  It remains a
  field list, but some entries get processed.
- `Contents`: Auto-inserts a table of contents.
- `PEPZero`: Special processing for PEP 0.

---
## Headers
```python
from peps import Headers
```

Process fields in a PEP's initial RFC-2822 header.

---
## Contents
```python
from peps import Contents
```

Insert an empty table of contents topic and a transform placeholder into
the document after the RFC 2822 header.

---
## TargetNotes
```python
from peps import TargetNotes
```

Locate the "References" section, insert a placeholder for an external
target footnote insertion transform at the end, and schedule the
transform to run immediately.

---
## PEPZero
```python
from peps import PEPZero
```

Special processing for PEP 0.

---
## PEPZeroSpecial
```python
from peps import PEPZeroSpecial
```

Perform the special processing needed by PEP 0:

- Mask email addresses.

- Link PEP numbers in the second column of 4-column tables to the PEPs
  themselves.

---
## mask_email
```python
from peps import mask_email
```

Mask the email address in `ref` and return a replacement node.

`ref` is returned unchanged if it contains no email address.

For email addresses such as "user@host", mask the address as "user at
host" (text) to thwart simple email address harvesters (except for those
listed in `non_masked_addresses`).  If a PEP number (`pepno`) is given,
return a reference including a default email subject.

---
## apply
```python
from peps import apply
```



---
## cleanup_callback
```python
from peps import cleanup_callback
```

Remove an empty "References" section.

Called after the `references.TargetNotes` transform is complete.

---
## unknown_visit
```python
from peps import unknown_visit
```



---
## visit_reference
```python
from peps import visit_reference
```



---
## visit_field_list
```python
from peps import visit_field_list
```



---
## visit_tgroup
```python
from peps import visit_tgroup
```



---
## visit_colspec
```python
from peps import visit_colspec
```



---
## visit_row
```python
from peps import visit_row
```



---
## visit_entry
```python
from peps import visit_entry
```



---
## __name__
```python
from parts import __name__
```



---
## SectNum
```python
from parts import SectNum
```

Automatically assigns numbers to the titles of document sections.

It is possible to limit the maximum section level for which the numbers
are added.  For those sections that are auto-numbered, the "autonum"
attribute is set, informing the contents table generator that a different
form of the TOC should be used.

---
## Contents
```python
from parts import Contents
```

Table of contents.

The table of contents is generated in two passes: initial parse and
transform.  During the initial parse, a 'pending' element is generated
which acts as a placeholder, storing the TOC title and any options
internally.  At a later stage in the processing, the 'pending' element is
replaced by a 'topic' element, a title and the table of contents proper.

---
## ContentsFilter
```python
from parts import ContentsFilter
```



---
## apply
```python
from parts import apply
```



---
## update_section_numbers
```python
from parts import update_section_numbers
```



---
## build_contents
```python
from parts import build_contents
```



---
## copy_and_filter
```python
from parts import copy_and_filter
```

Return a copy of a title, with references, images, etc. removed.

---
## get_entry_text
```python
from parts import get_entry_text
```



---
## visit_citation_reference
```python
from parts import visit_citation_reference
```



---
## visit_footnote_reference
```python
from parts import visit_footnote_reference
```



---
## visit_image
```python
from parts import visit_image
```



---
## ignore_node_but_process_children
```python
from parts import ignore_node_but_process_children
```



---
## __name__
```python
from components import __name__
```

Docutils component-related transforms.

---
## Filter
```python
from components import Filter
```

Include or exclude elements which depend on a specific Docutils component.

For use with `nodes.pending` elements.  A "pending" element's dictionary
attribute ``details`` must contain the keys "component" and "format".  The
value of ``details['component']`` must match the type name of the
component the elements depend on (e.g. "writer").  The value of
``details['format']`` is the name of a specific format or context of that
component (e.g. "html").  If the matching Docutils component supports that
format or context, the "pending" element is replaced by the contents of
``details['nodes']`` (a list of nodes); otherwise, the "pending" element
is removed.

For example, up to version 0.17, the reStructuredText "meta"
directive created a "pending" element containing a "meta" element
(in ``pending.details['nodes']``).
Only writers (``pending.details['component'] == 'writer'``)
supporting the "html", "latex", or "odf" formats
(``pending.details['format'] == 'html,latex,odf'``) included the
"meta" element; it was deleted from the output of all other writers.

This transform is no longer used by Docutils, it may be removed in future.

---
## apply
```python
from components import apply
```



---
## __name__
```python
from universal import __name__
```

Transforms needed by most or all documents:

- `Decorations`: Generate a document's header & footer.
- `ExposeInternals`: Expose internal attributes.
- `Messages`: Placement of system messages generated after parsing.
- `FilterMessages`: Remove system messages below verbosity threshold.
- `TestMessages`: Like `Messages`, used on test runs.
- `StripComments`: Remove comment elements from the document tree.
- `StripClassesAndElements`: Remove elements with classes
  in `self.document.settings.strip_elements_with_classes`
  and class values in `self.document.settings.strip_classes`.
- `SmartQuotes`: Replace ASCII quotation marks with typographic form.

---
## Decorations
```python
from universal import Decorations
```

Populate a document's decoration element (header, footer).

---
## ExposeInternals
```python
from universal import ExposeInternals
```

Expose internal attributes if ``expose_internals`` setting is set.

---
## Messages
```python
from universal import Messages
```

Place any system messages generated after parsing into a dedicated section
of the document.

---
## FilterMessages
```python
from universal import FilterMessages
```

Remove system messages below verbosity threshold.

Also convert <problematic> nodes referencing removed messages
to <Text> nodes and remove "System Messages" section if empty.

---
## TestMessages
```python
from universal import TestMessages
```

Append all post-parse system messages to the end of the document.

Used for testing purposes.

---
## StripComments
```python
from universal import StripComments
```

Remove comment elements from the document tree (only if the
``strip_comments`` setting is enabled).

---
## StripClassesAndElements
```python
from universal import StripClassesAndElements
```

Remove from the document tree all elements with classes in
`self.document.settings.strip_elements_with_classes` and all "classes"
attribute values in `self.document.settings.strip_classes`.

---
## SmartQuotes
```python
from universal import SmartQuotes
```

Replace ASCII quotation marks with typographic form.

Also replace multiple dashes with em-dash/en-dash characters.

---
## apply
```python
from universal import apply
```



---
## generate_header
```python
from universal import generate_header
```



---
## generate_footer
```python
from universal import generate_footer
```



---
## not_Text
```python
from universal import not_Text
```



---
## check_classes
```python
from universal import check_classes
```



---
## __init__
```python
from universal import __init__
```



---
## get_tokens
```python
from universal import get_tokens
```



---
## __name__
```python
from standalone import __name__
```

Standalone file Reader for the reStructuredText markup syntax.

---
## Reader
```python
from standalone import Reader
```



---
## get_transforms
```python
from standalone import get_transforms
```



---
## __name__
```python
from pep import __name__
```

Python Enhancement Proposal (PEP) Reader.

---
## Reader
```python
from pep import Reader
```



---
## get_transforms
```python
from pep import get_transforms
```



---
## __init__
```python
from pep import __init__
```

`parser` should be ``None``.

---
## Reader
```python
from __init__ import Reader
```



---
## ReReader
```python
from __init__ import ReReader
```

A reader which rereads an existing document tree (e.g. a
deserializer).

Often used in conjunction with `writers.UnfilteredWriter`.

---
## get_reader_class
```python
from __init__ import get_reader_class
```

Return the Reader class from the `reader_name` module.

---
## set_parser
```python
from __init__ import set_parser
```

Set `self.parser` by name.

---
## __name__
```python
from doctree import __name__
```

Reader for existing document trees.

---
## Reader
```python
from doctree import Reader
```

Adapt the Reader API for an existing document tree.

The existing document tree must be passed as the ``source`` parameter to
the `docutils.core.Publisher` initializer, wrapped in a
`docutils.io.DocTreeInput` object::

    pub = docutils.core.Publisher(
        ..., source=docutils.io.DocTreeInput(document), ...)

The original document settings are overridden; if you want to use the
settings of the original document, pass ``settings=document.settings`` to
the Publisher call above.

---
## parse
```python
from doctree import parse
```

No parsing to do; refurbish the document tree instead.
Overrides the inherited method.

---
## role
```python
from roles import role
```

Locate and return a role function from its language-dependent name, along
with a list of system messages.

If the role is not found in the current language, check English. Return a
2-tuple: role function (``None`` if the named role cannot be found) and a
list of system messages.

---
## register_canonical_role
```python
from roles import register_canonical_role
```

Register an interpreted text role by its canonical name.

:Parameters:
  - `name`: The canonical name of the interpreted role.
  - `role_fn`: The role function.  See the module docstring.

---
## register_local_role
```python
from roles import register_local_role
```

Register an interpreted text role by its local or language-dependent name.

:Parameters:
  - `name`: The local or language-dependent name of the interpreted role.
  - `role_fn`: The role function.  See the module docstring.

---
## set_implicit_options
```python
from roles import set_implicit_options
```

Add customization options to role functions, unless explicitly set or
disabled.

---
## register_generic_role
```python
from roles import register_generic_role
```

For roles which simply wrap a given `node_class` around the text.

---
## GenericRole
```python
from roles import GenericRole
```

Generic interpreted text role.

The interpreted text is simply wrapped with the provided node class.

---
## CustomRole
```python
from roles import CustomRole
```

Wrapper for custom interpreted text roles.

---
## generic_custom_role
```python
from roles import generic_custom_role
```

Base for custom roles if no other base role is specified.

---
## pep_reference_role
```python
from roles import pep_reference_role
```



---
## rfc_reference_role
```python
from roles import rfc_reference_role
```



---
## raw_role
```python
from roles import raw_role
```



---
## math_role
```python
from roles import math_role
```



---
## unimplemented_role
```python
from roles import unimplemented_role
```



---
## set_classes
```python
from roles import set_classes
```

Deprecated. Obsoleted by ``normalized_role_options()``.

---
## normalized_role_options
```python
from roles import normalized_role_options
```

Return normalized dictionary of role options.

* ``None`` is replaced by an empty dictionary.
* The key 'class' is renamed to 'classes'.

---
## __call__
```python
from roles import __call__
```



---
## __name__
```python
from tableparser import __name__
```

This module defines table parser classes,which parse plaintext-graphic tables
and produce a well-formed data structure suitable for building a CALS table.

:Classes:
    - `GridTableParser`: Parse fully-formed tables represented with a grid.
    - `SimpleTableParser`: Parse simple tables, delimited by top & bottom
      borders.

:Exception class: `TableMarkupError`

:Function:
    `update_dict_of_lists()`: Merge two dictionaries containing list values.

---
## TableMarkupError
```python
from tableparser import TableMarkupError
```

Raise if there is any problem with table markup.

The keyword argument `offset` denotes the offset of the problem
from the table's start line.

---
## TableParser
```python
from tableparser import TableParser
```

Abstract superclass for the common parts of the syntax-specific parsers.

---
## GridTableParser
```python
from tableparser import GridTableParser
```

Parse a grid table using `parse()`.

Here's an example of a grid table::

    +------------------------+------------+----------+----------+
    | Header row, column 1   | Header 2   | Header 3 | Header 4 |
    +========================+============+==========+==========+
    | body row 1, column 1   | column 2   | column 3 | column 4 |
    +------------------------+------------+----------+----------+
    | body row 2             | Cells may span columns.          |
    +------------------------+------------+---------------------+
    | body row 3             | Cells may  | - Table cells       |
    +------------------------+ span rows. | - contain           |
    | body row 4             |            | - body elements.    |
    +------------------------+------------+---------------------+

Intersections use '+', row separators use '-' (except for one optional
head/body row separator, which uses '='), and column separators use '|'.

Passing the above table to the `parse()` method will result in the
following data structure::

    ([24, 12, 10, 10],
     [[(0, 0, 1, ['Header row, column 1']),
       (0, 0, 1, ['Header 2']),
       (0, 0, 1, ['Header 3']),
       (0, 0, 1, ['Header 4'])]],
     [[(0, 0, 3, ['body row 1, column 1']),
       (0, 0, 3, ['column 2']),
       (0, 0, 3, ['column 3']),
       (0, 0, 3, ['column 4'])],
      [(0, 0, 5, ['body row 2']),
       (0, 2, 5, ['Cells may span columns.']),
       None,
       None],
      [(0, 0, 7, ['body row 3']),
       (1, 0, 7, ['Cells may', 'span rows.', '']),
       (1, 1, 7, ['- Table cells', '- contain', '- body elements.']),
       None],
      [(0, 0, 9, ['body row 4']), None, None, None]])

The first item is a list containing column widths (colspecs). The second
item is a list of head rows, and the third is a list of body rows. Each
row contains a list of cells. Each cell is either None (for a cell unused
because of another cell's span), or a tuple. A cell tuple contains four
items: the number of extra rows used by the cell in a vertical span
(morerows); the number of extra columns used by the cell in a horizontal
span (morecols); the line offset of the first line of the cell contents;
and the cell contents, a list of lines of text.

---
## SimpleTableParser
```python
from tableparser import SimpleTableParser
```

Parse a simple table using `parse()`.

Here's an example of a simple table::

    =====  =====
    col 1  col 2
    =====  =====
    1      Second column of row 1.
    2      Second column of row 2.
           Second line of paragraph.
    3      - Second column of row 3.

           - Second item in bullet
             list (row 3, column 2).
    4 is a span
    ------------
    5
    =====  =====

Top and bottom borders use '=', column span underlines use '-', column
separation is indicated with spaces.

Passing the above table to the `parse()` method will result in the
following data structure, whose interpretation is the same as for
`GridTableParser`::

    ([5, 25],
     [[(0, 0, 1, ['col 1']),
       (0, 0, 1, ['col 2'])]],
     [[(0, 0, 3, ['1']),
       (0, 0, 3, ['Second column of row 1.'])],
      [(0, 0, 4, ['2']),
       (0, 0, 4, ['Second column of row 2.',
                  'Second line of paragraph.'])],
      [(0, 0, 6, ['3']),
       (0, 0, 6, ['- Second column of row 3.',
                  '',
                  '- Second item in bullet',
                  '  list (row 3, column 2).'])],
      [(0, 1, 10, ['4 is a span'])],
      [(0, 0, 12, ['5']),
       (0, 0, 12, [''])]])

---
## update_dict_of_lists
```python
from tableparser import update_dict_of_lists
```

Extend the list values of `master` with those from `newdata`.

Both parameters must be dictionaries containing list values.

---
## __init__
```python
from tableparser import __init__
```



---
## parse
```python
from tableparser import parse
```

Analyze the text `block` and return a table data structure.

Given a plaintext-graphic table in `block` (list of lines of text; no
whitespace padding), parse the table, construct and return the data
necessary to construct a CALS table or equivalent.

Raise `TableMarkupError` if there is any problem with the markup.

---
## find_head_body_sep
```python
from tableparser import find_head_body_sep
```

Look for a head/body row separator line; store the line index.

---
## setup
```python
from tableparser import setup
```



---
## parse_table
```python
from tableparser import parse_table
```

First determine the column boundaries from the top border, then
process rows.  Each row may consist of multiple lines; accumulate
lines until a row is complete.  Call `self.parse_row` to finish the
job.

---
## mark_done
```python
from tableparser import mark_done
```

For keeping track of how much of each text column has been seen.

---
## check_parse_complete
```python
from tableparser import check_parse_complete
```

Each text column should have been completely seen.

---
## scan_cell
```python
from tableparser import scan_cell
```

Starting at the top-left corner, start tracing out a cell.

---
## scan_right
```python
from tableparser import scan_right
```

Look for the top-right corner of the cell, and make note of all column
boundaries ('+').

---
## scan_down
```python
from tableparser import scan_down
```

Look for the bottom-right corner of the cell, making note of all row
boundaries.

---
## scan_left
```python
from tableparser import scan_left
```

Noting column boundaries, look for the bottom-left corner of the cell.
It must line up with the starting point.

---
## scan_up
```python
from tableparser import scan_up
```

Noting row boundaries, see if we can return to the starting point.

---
## structure_from_cells
```python
from tableparser import structure_from_cells
```



---
## parse_columns
```python
from tableparser import parse_columns
```

Given a column span underline, return a list of (begin, end) pairs.

---
## init_row
```python
from tableparser import init_row
```



---
## parse_row
```python
from tableparser import parse_row
```

Given the text `lines` of a row, parse it and append to `self.table`.

The row is parsed according to the current column spec (either
`spanline` if provided or `self.columns`).  For each column, extract
text from each line, and check for text in column margins.  Finally,
adjust for insignificant whitespace.

---
## check_columns
```python
from tableparser import check_columns
```

Check for text in column margins and text overflow in the last column.
Raise TableMarkupError if anything but whitespace is in column margins.
Adjust the end value for the last column if there is text overflow.

---
## DirectiveError
```python
from __init__ import DirectiveError
```

Store a message and a system message level.

To be thrown from inside directive code.

Do not instantiate directly -- use `Directive.directive_error()`
instead!

---
## Directive
```python
from __init__ import Directive
```

Base class for reStructuredText directives.

The following attributes may be set by subclasses.  They are
interpreted by the directive parser (which runs the directive
class):

- `required_arguments`: The number of required arguments (default:
  0).

- `optional_arguments`: The number of optional arguments (default:
  0).

- `final_argument_whitespace`: A boolean, indicating if the final
  argument may contain whitespace (default: False).

- `option_spec`: A dictionary, mapping known option names to
  conversion functions such as `int` or `float` (default: {}, no
  options).  Several conversion functions are defined in the
  directives/__init__.py module.

  Option conversion functions take a single parameter, the option
  argument (a string or ``None``), validate it and/or convert it
  to the appropriate form.  Conversion functions may raise
  `ValueError` and `TypeError` exceptions.

- `has_content`: A boolean; True if content is allowed.  Client
  code must handle the case where content is required but not
  supplied (an empty content list will be supplied).

Arguments are normally single whitespace-separated words.  The
final argument may contain whitespace and/or newlines if
`final_argument_whitespace` is True.

If the form of the arguments is more complex, specify only one
argument (either required or optional) and set
`final_argument_whitespace` to True; the client code must do any
context-sensitive parsing.

When a directive implementation is being run, the directive class
is instantiated, and the `run()` method is executed.  During
instantiation, the following instance variables are set:

- ``name`` is the directive type or name (string).

- ``arguments`` is the list of positional arguments (strings).

- ``options`` is a dictionary mapping option names (strings) to
  values (type depends on option conversion functions; see
  `option_spec` above).

- ``content`` is a list of strings, the directive content line by line.

- ``lineno`` is the absolute line number of the first line
  of the directive.

- ``content_offset`` is the line offset of the first line
  of the content from the beginning of the current input.
  Used when initiating a nested parse.

- ``block_text`` is a string containing the entire directive.

- ``state`` is the state which called the directive function.

- ``state_machine`` is the state machine which controls the state
  which called the directive function.

- ``reporter`` is the state machine's `reporter` instance.

Directive functions return a list of nodes which will be inserted
into the document tree at the point where the directive was
encountered.  This can be an empty list if there is nothing to
insert.

For ordinary directives, the list must contain body elements or
structural elements.  Some directives are intended specifically
for substitution definitions, and must return a list of `Text`
nodes and/or inline elements (suitable for inline insertion, in
place of the substitution reference).  Such directives must verify
substitution definition context, typically using code like this::

    if not isinstance(state, states.SubstitutionDef):
        error = self.reporter.error(
            'Invalid context: the "%s" directive can only be used '
            'within a substitution definition.' % (name),
            nodes.literal_block(block_text, block_text), line=lineno)
        return [error]

---
## convert_directive_function
```python
from __init__ import convert_directive_function
```

Define & return a directive class generated from `directive_fn`.

`directive_fn` uses the old-style, functional interface.

---
## directive_error
```python
from __init__ import directive_error
```

Return a DirectiveError suitable for being thrown as an exception.

Call "raise self.directive_error(level, message)" from within
a directive implementation to return one single system message
at level `level`, which automatically gets the directive block
and the line number added.

Preferably use the `debug`, `info`, `warning`, `error`, or `severe`
wrapper methods, e.g. ``self.error(message)`` to generate an
ERROR-level directive error.

---
## assert_has_content
```python
from __init__ import assert_has_content
```

Throw an ERROR-level DirectiveError if the directive doesn't
have contents.

---
## add_name
```python
from __init__ import add_name
```

Append self.options['name'] to node['names'] if it exists.

Also normalize the name string and register it as explicit target.

---
## FunctionalDirective
```python
from __init__ import FunctionalDirective
```



---
## __name__
```python
from states import __name__
```

This is the ``docutils.parsers.rst.states`` module, the core of
the reStructuredText parser.  It defines the following:

:Classes:
    - `RSTStateMachine`: reStructuredText parser's entry point.
    - `NestedStateMachine`: recursive StateMachine.
    - `RSTState`: reStructuredText State superclass.
    - `Inliner`: For parsing inline markup.
    - `Body`: Generic classifier of the first line of a block.
    - `SpecializedBody`: Superclass for compound element members.
    - `BulletList`: Second and subsequent bullet_list list_items
    - `DefinitionList`: Second+ definition_list_items.
    - `EnumeratedList`: Second+ enumerated_list list_items.
    - `FieldList`: Second+ fields.
    - `OptionList`: Second+ option_list_items.
    - `RFC2822List`: Second+ RFC2822-style fields.
    - `ExtensionOptions`: Parses directive option fields.
    - `Explicit`: Second+ explicit markup constructs.
    - `SubstitutionDef`: For embedded directives in substitution definitions.
    - `Text`: Classifier of second line of a text block.
    - `SpecializedText`: Superclass for continuation lines of Text-variants.
    - `Definition`: Second line of potential definition_list_item.
    - `Line`: Second line of overlined section title or transition marker.
    - `Struct`: An auxiliary collection class.

:Exception classes:
    - `MarkupError`
    - `ParserError`
    - `MarkupMismatch`

:Functions:
    - `escape2null()`: Return a string, escape-backslashes converted to nulls.
    - `unescape()`: Return a string, nulls removed or restored to backslashes.

:Attributes:
    - `state_classes`: set of State classes used with `RSTStateMachine`.

Parser Overview
===============

The reStructuredText parser is implemented as a recursive state machine,
examining its input one line at a time.  To understand how the parser works,
please first become familiar with the `docutils.statemachine` module.  In the
description below, references are made to classes defined in this module;
please see the individual classes for details.

Parsing proceeds as follows:

1. The state machine examines each line of input, checking each of the
   transition patterns of the state `Body`, in order, looking for a match.
   The implicit transitions (blank lines and indentation) are checked before
   any others.  The 'text' transition is a catch-all (matches anything).

2. The method associated with the matched transition pattern is called.

   A. Some transition methods are self-contained, appending elements to the
      document tree (`Body.doctest` parses a doctest block).  The parser's
      current line index is advanced to the end of the element, and parsing
      continues with step 1.

   B. Other transition methods trigger the creation of a nested state machine,
      whose job is to parse a compound construct ('indent' does a block quote,
      'bullet' does a bullet list, 'overline' does a section [first checking
      for a valid section header], etc.).

      - In the case of lists and explicit markup, a one-off state machine is
        created and run to parse contents of the first item.

      - A new state machine is created and its initial state is set to the
        appropriate specialized state (`BulletList` in the case of the
        'bullet' transition; see `SpecializedBody` for more detail).  This
        state machine is run to parse the compound element (or series of
        explicit markup elements), and returns as soon as a non-member element
        is encountered.  For example, the `BulletList` state machine ends as
        soon as it encounters an element which is not a list item of that
        bullet list.  The optional omission of inter-element blank lines is
        enabled by this nested state machine.

      - The current line index is advanced to the end of the elements parsed,
        and parsing continues with step 1.

   C. The result of the 'text' transition depends on the next line of text.
      The current state is changed to `Text`, under which the second line is
      examined.  If the second line is:

      - Indented: The element is a definition list item, and parsing proceeds
        similarly to step 2.B, using the `DefinitionList` state.

      - A line of uniform punctuation characters: The element is a section
        header; again, parsing proceeds as in step 2.B, and `Body` is still
        used.

      - Anything else: The element is a paragraph, which is examined for
        inline markup and appended to the parent element.  Processing
        continues with step 1.

---
## MarkupError
```python
from states import MarkupError
```



---
## UnknownInterpretedRoleError
```python
from states import UnknownInterpretedRoleError
```



---
## InterpretedRoleNotImplementedError
```python
from states import InterpretedRoleNotImplementedError
```



---
## ParserError
```python
from states import ParserError
```



---
## MarkupMismatch
```python
from states import MarkupMismatch
```



---
## Struct
```python
from states import Struct
```

Stores data attributes for dotted-attribute access.

---
## RSTStateMachine
```python
from states import RSTStateMachine
```

reStructuredText's master StateMachine.

The entry point to reStructuredText parsing is the `run()` method.

---
## NestedStateMachine
```python
from states import NestedStateMachine
```

StateMachine run from within other StateMachine runs, to parse nested
document structures.

---
## RSTState
```python
from states import RSTState
```

reStructuredText State superclass.

Contains methods used by all State subclasses.

---
## build_regexp
```python
from states import build_regexp
```

Build, compile and return a regular expression based on `definition`.

:Parameter: `definition`: a 4-tuple (group name, prefix, suffix, parts),
    where "parts" is a list of regular expressions and/or regular
    expression definitions to be joined into an or-group.

---
## Inliner
```python
from states import Inliner
```

Parse inline markup; call the `parse()` method.

---
## _loweralpha_to_int
```python
from states import _loweralpha_to_int
```



---
## _upperalpha_to_int
```python
from states import _upperalpha_to_int
```



---
## _lowerroman_to_int
```python
from states import _lowerroman_to_int
```



---
## Body
```python
from states import Body
```

Generic classifier of the first line of a block.

---
## RFC2822Body
```python
from states import RFC2822Body
```

RFC2822 headers are only valid as the first constructs in documents.  As
soon as anything else appears, the `Body` state should take over.

---
## SpecializedBody
```python
from states import SpecializedBody
```

Superclass for second and subsequent compound element members.  Compound
elements are lists and list-like constructs.

All transition methods are disabled (redefined as `invalid_input`).
Override individual methods in subclasses to re-enable.

For example, once an initial bullet list item, say, is recognized, the
`BulletList` subclass takes over, with a "bullet_list" node as its
container.  Upon encountering the initial bullet list item, `Body.bullet`
calls its ``self.nested_list_parse`` (`RSTState.nested_list_parse`), which
starts up a nested parsing session with `BulletList` as the initial state.
Only the ``bullet`` transition method is enabled in `BulletList`; as long
as only bullet list items are encountered, they are parsed and inserted
into the container.  The first construct which is *not* a bullet list item
triggers the `invalid_input` method, which ends the nested parse and
closes the container.  `BulletList` needs to recognize input that is
invalid in the context of a bullet list, which means everything *other
than* bullet list items, so it inherits the transition list created in
`Body`.

---
## BulletList
```python
from states import BulletList
```

Second and subsequent bullet_list list_items.

---
## DefinitionList
```python
from states import DefinitionList
```

Second and subsequent definition_list_items.

---
## EnumeratedList
```python
from states import EnumeratedList
```

Second and subsequent enumerated_list list_items.

---
## FieldList
```python
from states import FieldList
```

Second and subsequent field_list fields.

---
## OptionList
```python
from states import OptionList
```

Second and subsequent option_list option_list_items.

---
## RFC2822List
```python
from states import RFC2822List
```

Second and subsequent RFC2822-style field_list fields.

---
## ExtensionOptions
```python
from states import ExtensionOptions
```

Parse field_list fields for extension options.

No nested parsing is done (including inline markup parsing).

---
## LineBlock
```python
from states import LineBlock
```

Second and subsequent lines of a line_block.

---
## Explicit
```python
from states import Explicit
```

Second and subsequent explicit markup construct.

---
## SubstitutionDef
```python
from states import SubstitutionDef
```

Parser for the contents of a substitution_definition element.

---
## Text
```python
from states import Text
```

Classifier of second line of a text block.

Could be a paragraph, a definition list item, or a title.

---
## SpecializedText
```python
from states import SpecializedText
```

Superclass for second and subsequent lines of Text-variants.

All transition methods are disabled. Override individual methods in
subclasses to re-enable.

---
## Definition
```python
from states import Definition
```

Second line of potential definition_list_item.

---
## Line
```python
from states import Line
```

Second line of over- & underlined section title or transition marker.

---
## QuotedLiteralBlock
```python
from states import QuotedLiteralBlock
```

Nested parse handler for quoted (unindented) literal blocks.

Special-purpose.  Not for inclusion in `state_classes`.

---
## __init__
```python
from states import __init__
```



---
## run
```python
from states import run
```

Parse `input_lines` and populate a `docutils.nodes.document` instance.

Extend `StateMachineWS.run()`: set up document-wide data.

---
## runtime_init
```python
from states import runtime_init
```



---
## goto_line
```python
from states import goto_line
```

Jump to input line `abs_line_offset`, ignoring jumps past the end.

---
## no_match
```python
from states import no_match
```

Override `StateWS.no_match` to generate a system message.

This code should never be run.

---
## bof
```python
from states import bof
```

Called at beginning of file.

---
## nested_parse
```python
from states import nested_parse
```

Create a new StateMachine rooted at `node` and run it over the input
`block`.

---
## nested_list_parse
```python
from states import nested_list_parse
```

Create a new StateMachine rooted at `node` and run it over the input
`block`. Also keep track of optional intermediate blank lines and the
required final one.

---
## section
```python
from states import section
```

Check for a valid subsection and create one if it checks out.

---
## check_subsection
```python
from states import check_subsection
```

Check for a valid subsection header.  Return True or False.

When a new section is reached that isn't a subsection of the current
section, back up the line count (use ``previous_line(-x)``), then
``raise EOFError``.  The current StateMachine will finish, then the
calling StateMachine can re-examine the title.  This will work its way
back up the calling chain until the correct section level isreached.

@@@ Alternative: Evaluate the title, store the title info & level, and
back up the chain until that level is reached.  Store in memo? Or
return in results?

:Exception: `EOFError` when a sibling or supersection encountered.

---
## title_inconsistent
```python
from states import title_inconsistent
```



---
## new_subsection
```python
from states import new_subsection
```

Append new subsection to document tree. On return, check level.

---
## paragraph
```python
from states import paragraph
```

Return a list (paragraph & messages) & a boolean: literal_block next?

---
## inline_text
```python
from states import inline_text
```

Return 2 lists: nodes (text and inline elements), and system_messages.

---
## unindent_warning
```python
from states import unindent_warning
```



---
## init_customizations
```python
from states import init_customizations
```



---
## parse
```python
from states import parse
```

Return 2 lists: nodes (text and inline elements), and system_messages.

Using `self.patterns.initial`, a pattern which matches start-strings
(emphasis, strong, interpreted, phrase reference, literal,
substitution reference, and inline target) and complete constructs
(simple reference, footnote reference), search for a candidate.  When
one is found, check for validity (e.g., not a quoted '*' character).
If valid, search for the corresponding end string if applicable, and
check it for validity.  If not found or invalid, generate a warning
and ignore the start-string.  Implicit inline markup (e.g. standalone
URIs) is found last.

:text: source string
:lineno: absolute line number (cf. statemachine.get_source_and_line())

---
## quoted_start
```python
from states import quoted_start
```

Test if inline markup start-string is 'quoted'.

'Quoted' in this context means the start-string is enclosed in a pair
of matching opening/closing delimiters (not necessarily quotes)
or at the end of the match.

---
## inline_obj
```python
from states import inline_obj
```



---
## problematic
```python
from states import problematic
```



---
## emphasis
```python
from states import emphasis
```



---
## strong
```python
from states import strong
```



---
## interpreted_or_phrase_ref
```python
from states import interpreted_or_phrase_ref
```



---
## phrase_ref
```python
from states import phrase_ref
```



---
## adjust_uri
```python
from states import adjust_uri
```



---
## interpreted
```python
from states import interpreted
```



---
## literal
```python
from states import literal
```



---
## inline_internal_target
```python
from states import inline_internal_target
```



---
## substitution_reference
```python
from states import substitution_reference
```



---
## footnote_reference
```python
from states import footnote_reference
```

Handles `nodes.footnote_reference` and `nodes.citation_reference`
elements.

---
## reference
```python
from states import reference
```



---
## anonymous_reference
```python
from states import anonymous_reference
```



---
## standalone_uri
```python
from states import standalone_uri
```



---
## pep_reference
```python
from states import pep_reference
```



---
## rfc_reference
```python
from states import rfc_reference
```



---
## implicit_inline
```python
from states import implicit_inline
```

Check each of the patterns in `self.implicit_dispatch` for a match,
and dispatch to the stored method for the pattern.  Recursively check
the text before and after the match.  Return a list of `nodes.Text`
and inline element nodes.

---
## indent
```python
from states import indent
```



---
## block_quote
```python
from states import block_quote
```



---
## split_attribution
```python
from states import split_attribution
```

Check for a block quote attribution and split it off:

* First line after a blank line must begin with a dash ("--", "---",
  em-dash; matches `self.attribution_pattern`).
* Every line after that must have consistent indentation.
* Attributions must be preceded by block quote content.

Return a tuple of: (block quote content lines, attribution lines,
attribution offset, remaining indented lines, remaining lines offset).

---
## check_attribution
```python
from states import check_attribution
```

Check attribution shape.
Return the index past the end of the attribution, and the indent.

---
## parse_attribution
```python
from states import parse_attribution
```



---
## bullet
```python
from states import bullet
```

Bullet list item.

---
## list_item
```python
from states import list_item
```



---
## enumerator
```python
from states import enumerator
```

Enumerated list item.

---
## parse_enumerator
```python
from states import parse_enumerator
```

Analyze an enumerator and return the results.

:Return:
    - the enumerator format ('period', 'parens', or 'rparen'),
    - the sequence used ('arabic', 'loweralpha', 'upperroman', etc.),
    - the text of the enumerator, stripped of formatting, and
    - the ordinal value of the enumerator ('a' -> 1, 'ii' -> 2, etc.;
      ``None`` is returned for invalid enumerator text).

The enumerator format has already been determined by the regular
expression match. If `expected_sequence` is given, that sequence is
tried first. If not, we check for Roman numeral 1. This way,
single-character Roman numerals (which are also alphabetical) can be
matched. If no sequence has been matched, all sequences are checked in
order.

---
## is_enumerated_list_item
```python
from states import is_enumerated_list_item
```

Check validity based on the ordinal value and the second line.

Return true if the ordinal is valid and the second line is blank,
indented, or starts with the next enumerator or an auto-enumerator.

---
## make_enumerator
```python
from states import make_enumerator
```

Construct and return the next enumerated list item marker, and an
auto-enumerator ("#" instead of the regular enumerator).

Return ``None`` for invalid (out of range) ordinals.

---
## field_marker
```python
from states import field_marker
```

Field list field.

---
## field
```python
from states import field
```



---
## parse_field_marker
```python
from states import parse_field_marker
```

Extract & return field name from a field marker match.

---
## parse_field_body
```python
from states import parse_field_body
```

Override `Body.parse_field_body` for simpler parsing.

---
## option_marker
```python
from states import option_marker
```

Option list item.

---
## option_list_item
```python
from states import option_list_item
```



---
## parse_option_marker
```python
from states import parse_option_marker
```

Return a list of `node.option` and `node.option_argument` objects,
parsed from an option marker match.

:Exception: `MarkupError` for invalid option markers.

---
## doctest
```python
from states import doctest
```



---
## line_block
```python
from states import line_block
```

New line of line block.

---
## line_block_line
```python
from states import line_block_line
```

Return one line element of a line_block.

---
## nest_line_block_lines
```python
from states import nest_line_block_lines
```



---
## nest_line_block_segment
```python
from states import nest_line_block_segment
```



---
## grid_table_top
```python
from states import grid_table_top
```

Top border of a full table.

---
## simple_table_top
```python
from states import simple_table_top
```

Top border of a simple table.

---
## table_top
```python
from states import table_top
```

Top border of a generic table.

---
## table
```python
from states import table
```

Parse a table.

---
## isolate_grid_table
```python
from states import isolate_grid_table
```



---
## isolate_simple_table
```python
from states import isolate_simple_table
```



---
## malformed_table
```python
from states import malformed_table
```



---
## build_table
```python
from states import build_table
```



---
## build_table_row
```python
from states import build_table_row
```



---
## footnote
```python
from states import footnote
```



---
## citation
```python
from states import citation
```



---
## hyperlink_target
```python
from states import hyperlink_target
```



---
## make_target
```python
from states import make_target
```



---
## parse_target
```python
from states import parse_target
```

Determine the type of reference of a target.

:Return: A 2-tuple, one of:

    - 'refname' and the indirect reference name
    - 'refuri' and the URI
    - 'malformed' and a system_message node

---
## is_reference
```python
from states import is_reference
```



---
## add_target
```python
from states import add_target
```



---
## substitution_def
```python
from states import substitution_def
```



---
## disallowed_inside_substitution_definitions
```python
from states import disallowed_inside_substitution_definitions
```



---
## directive
```python
from states import directive
```

Returns a 2-tuple: list of nodes, and a "blank finish" boolean.

---
## run_directive
```python
from states import run_directive
```

Parse a directive then run its directive function.

Parameters:

- `directive`: The class implementing the directive.  Must be
  a subclass of `rst.Directive`.

- `match`: A regular expression match object which matched the first
  line of the directive.

- `type_name`: The directive name, as used in the source text.

- `option_presets`: A dictionary of preset options, defaults for the
  directive options.  Currently, only an "alt" option is passed by
  substitution definitions (value: the substitution name), which may
  be used by an embedded image directive.

Returns a 2-tuple: list of nodes, and a "blank finish" boolean.

---
## parse_directive_block
```python
from states import parse_directive_block
```



---
## parse_directive_options
```python
from states import parse_directive_options
```



---
## parse_directive_arguments
```python
from states import parse_directive_arguments
```



---
## parse_extension_options
```python
from states import parse_extension_options
```

Parse `datalines` for a field list containing extension options
matching `option_spec`.

:Parameters:
    - `option_spec`: a mapping of option name to conversion
      function, which should raise an exception on bad input.
    - `datalines`: a list of input strings.

:Return:
    - Success value, 1 or 0.
    - An option dictionary on success, an error string on failure.

---
## unknown_directive
```python
from states import unknown_directive
```



---
## comment
```python
from states import comment
```



---
## explicit_markup
```python
from states import explicit_markup
```

Footnotes, hyperlink targets, directives, comments.

---
## explicit_construct
```python
from states import explicit_construct
```

Determine which explicit construct this is, parse & return it.

---
## explicit_list
```python
from states import explicit_list
```

Create a nested state machine for a series of explicit markup
constructs (including anonymous hyperlink targets).

---
## anonymous
```python
from states import anonymous
```

Anonymous hyperlink targets.

---
## anonymous_target
```python
from states import anonymous_target
```



---
## line
```python
from states import line
```

Section title overline or transition marker.

---
## text
```python
from states import text
```



---
## rfc2822
```python
from states import rfc2822
```

RFC2822-style field list item.

---
## rfc2822_field
```python
from states import rfc2822_field
```



---
## invalid_input
```python
from states import invalid_input
```

Not a compound element member. Abort this state machine.

---
## embedded_directive
```python
from states import embedded_directive
```



---
## blank
```python
from states import blank
```



---
## eof
```python
from states import eof
```



---
## underline
```python
from states import underline
```



---
## literal_block
```python
from states import literal_block
```

Return a list of nodes.

---
## quoted_literal_block
```python
from states import quoted_literal_block
```



---
## definition_list_item
```python
from states import definition_list_item
```



---
## term
```python
from states import term
```

Return a definition_list's term and optional classifiers.

---
## short_overline
```python
from states import short_overline
```



---
## state_correction
```python
from states import state_correction
```



---
## initial_quoted
```python
from states import initial_quoted
```

Match arbitrary quote character on the first line only.

---
## quoted
```python
from states import quoted
```

Match consistent quotes on subsequent lines.

---
## adapt_path
```python
from misc import adapt_path
```



---
## Include
```python
from misc import Include
```

Include content read from a separate source file.

Content may be parsed by the parser, or included as a literal
block.  The encoding of the included file can be specified.  Only
a part of the given file argument may be included by specifying
start and end line or text to match before and/or after the text
to be used.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#including-an-external-document-fragment

---
## Raw
```python
from misc import Raw
```

Pass through content unchanged

Content is included in output based on type argument

Content may be included inline (content section of directive) or
imported from a file or url.

---
## Replace
```python
from misc import Replace
```



---
## Unicode
```python
from misc import Unicode
```

Convert Unicode character codes (numbers) to characters.  Codes may be
decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``,
``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character
entities (e.g. ``&#x262E;``).  Text following ".." is a comment and is
ignored.  Spaces are ignored, and any other text remains as-is.

---
## Class
```python
from misc import Class
```

Set a "class" attribute on the directive content or the next element.
When applied to the next element, a "pending" element is inserted, and a
transform does the work later.

---
## Role
```python
from misc import Role
```



---
## DefaultRole
```python
from misc import DefaultRole
```

Set the default interpreted text role.

---
## Title
```python
from misc import Title
```



---
## MetaBody
```python
from misc import MetaBody
```



---
## Meta
```python
from misc import Meta
```



---
## Date
```python
from misc import Date
```



---
## TestDirective
```python
from misc import TestDirective
```

This directive is useful only for testing purposes.

---
## run
```python
from misc import run
```



---
## field_marker
```python
from misc import field_marker
```

Meta element.

---
## parsemeta
```python
from misc import parsemeta
```



---
## __name__
```python
from body import __name__
```

Directives for additional body elements.

See `docutils.parsers.rst.directives` for API details.

---
## BasePseudoSection
```python
from body import BasePseudoSection
```



---
## Topic
```python
from body import Topic
```



---
## Sidebar
```python
from body import Sidebar
```



---
## LineBlock
```python
from body import LineBlock
```



---
## ParsedLiteral
```python
from body import ParsedLiteral
```



---
## CodeBlock
```python
from body import CodeBlock
```

Parse and mark up content of a code block.

Configuration setting: syntax_highlight
   Highlight Code content with Pygments?
   Possible values: ('long', 'short', 'none')

---
## MathBlock
```python
from body import MathBlock
```



---
## Rubric
```python
from body import Rubric
```



---
## BlockQuote
```python
from body import BlockQuote
```



---
## Epigraph
```python
from body import Epigraph
```



---
## Highlights
```python
from body import Highlights
```



---
## PullQuote
```python
from body import PullQuote
```



---
## Compound
```python
from body import Compound
```



---
## Container
```python
from body import Container
```



---
## run
```python
from body import run
```



---
## run
```python
from references import run
```



---
## directive
```python
from __init__ import directive
```

Return a directive adapter class that always gives the registered
directive its full name ('domain:name') as ``self.name``.

---
## register_directive
```python
from __init__ import register_directive
```

Register a nonstandard application-defined directive function.
Language lookups are not needed for such functions.

---
## flag
```python
from __init__ import flag
```

Check for a valid flag option (no argument) and return ``None``.
(Directive option conversion function.)

Raise ``ValueError`` if an argument is found.

---
## unchanged_required
```python
from __init__ import unchanged_required
```

Return the argument text, unchanged.
(Directive option conversion function.)

Raise ``ValueError`` if no argument is found.

---
## unchanged
```python
from __init__ import unchanged
```

Return the argument text, unchanged.
(Directive option conversion function.)

No argument implies empty string ("").

---
## uri
```python
from __init__ import uri
```

Return the URI argument with unescaped whitespace removed.
(Directive option conversion function.)

Raise ``ValueError`` if no argument is found.

---
## nonnegative_int
```python
from __init__ import nonnegative_int
```

Check for a nonnegative integer argument; raise ``ValueError`` if not.
(Directive option conversion function.)

---
## percentage
```python
from __init__ import percentage
```

Check for an integer percentage value with optional percent sign.
(Directive option conversion function.)

---
## get_measure
```python
from __init__ import get_measure
```

Check for a positive argument of one of the units and return a
normalized string of the form "<value><unit>" (without space in
between).
(Directive option conversion function.)

To be called from directive option conversion functions.

---
## length_or_unitless
```python
from __init__ import length_or_unitless
```



---
## length_or_percentage_or_unitless
```python
from __init__ import length_or_percentage_or_unitless
```

Return normalized string of a length or percentage unit.
(Directive option conversion function.)

Add <default> if there is no unit. Raise ValueError if the argument is not
a positive measure of one of the valid CSS units (or without unit).

>>> length_or_percentage_or_unitless('3 pt')
'3pt'
>>> length_or_percentage_or_unitless('3%', 'em')
'3%'
>>> length_or_percentage_or_unitless('3')
'3'
>>> length_or_percentage_or_unitless('3', 'px')
'3px'

---
## class_option
```python
from __init__ import class_option
```

Convert the argument into a list of ID-compatible strings and return it.
(Directive option conversion function.)

Raise ``ValueError`` if no argument is found.

---
## unicode_code
```python
from __init__ import unicode_code
```

Convert a Unicode character code to a Unicode character.
(Directive option conversion function.)

Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``,
``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style
numeric character entities (e.g. ``&#x262E;``).  Other text remains as-is.

Raise ValueError for illegal Unicode code values.

---
## single_char_or_unicode
```python
from __init__ import single_char_or_unicode
```

A single character is returned as-is.  Unicode character codes are
converted as in `unicode_code`.  (Directive option conversion function.)

---
## single_char_or_whitespace_or_unicode
```python
from __init__ import single_char_or_whitespace_or_unicode
```

As with `single_char_or_unicode`, but "tab" and "space" are also supported.
(Directive option conversion function.)

---
## positive_int
```python
from __init__ import positive_int
```

Converts the argument into an integer.  Raises ValueError for negative,
zero, or non-integer values.  (Directive option conversion function.)

---
## positive_int_list
```python
from __init__ import positive_int_list
```

Converts a space- or comma-separated list of values into a Python list
of integers.
(Directive option conversion function.)

Raises ValueError for non-positive-integer values.

---
## encoding
```python
from __init__ import encoding
```

Verifies the encoding argument by lookup.
(Directive option conversion function.)

Raises ValueError for unknown encodings.

---
## choice
```python
from __init__ import choice
```

Directive option utility function, supplied to enable options whose
argument must be a member of a finite set of possible values (must be
lower case).  A custom conversion function must be written to use it.  For
example::

    from docutils.parsers.rst import directives

    def yesno(argument):
        return directives.choice(argument, ('yes', 'no'))

Raise ``ValueError`` if no argument is found or if the argument's value is
not valid (not an entry in the supplied list).

---
## format_values
```python
from __init__ import format_values
```



---
## value_or
```python
from __init__ import value_or
```

Directive option conversion function.

The argument can be any of `values` or `argument_type`.

---
## parser_name
```python
from __init__ import parser_name
```

Return a docutils parser whose name matches the argument.
(Directive option conversion function.)

Return `None`, if the argument evaluates to `False`.
Raise `ValueError` if importing the parser module fails.

---
## auto_or_other
```python
from __init__ import auto_or_other
```



---
## __name__
```python
from admonitions import __name__
```

Admonition directives.

---
## BaseAdmonition
```python
from admonitions import BaseAdmonition
```



---
## Admonition
```python
from admonitions import Admonition
```



---
## Attention
```python
from admonitions import Attention
```



---
## Caution
```python
from admonitions import Caution
```



---
## Danger
```python
from admonitions import Danger
```



---
## Error
```python
from admonitions import Error
```



---
## Hint
```python
from admonitions import Hint
```



---
## Important
```python
from admonitions import Important
```



---
## Note
```python
from admonitions import Note
```



---
## Tip
```python
from admonitions import Tip
```



---
## Warning
```python
from admonitions import Warning
```



---
## run
```python
from admonitions import run
```



---
## __name__
```python
from images import __name__
```



---
## Image
```python
from images import Image
```



---
## Figure
```python
from images import Figure
```



---
## align
```python
from images import align
```



---
## loading
```python
from images import loading
```



---
## run
```python
from images import run
```



---
## figwidth_value
```python
from images import figwidth_value
```



---
## PIL
```python
from images import PIL
```



---
## Sectnum
```python
from parts import Sectnum
```

Automatic section numbering.

---
## Header
```python
from parts import Header
```

Contents of document header.

---
## Footer
```python
from parts import Footer
```

Contents of document footer.

---
## backlinks
```python
from parts import backlinks
```



---
## run
```python
from parts import run
```



---
## __name__
```python
from tables import __name__
```



---
## align
```python
from tables import align
```



---
## Table
```python
from tables import Table
```

Generic table base class.

---
## RSTTable
```python
from tables import RSTTable
```

Class for the `"table" directive`__ for formal tables using rST syntax.

__ https://docutils.sourceforge.io/docs/ref/rst/directives.html

---
## CSVTable
```python
from tables import CSVTable
```



---
## ListTable
```python
from tables import ListTable
```

Implement tables whose data is encoded as a uniform two-level bullet list.
For further ideas, see
https://docutils.sourceforge.io/docs/dev/rst/alternatives.html#list-driven-tables

---
## make_title
```python
from tables import make_title
```



---
## check_table_dimensions
```python
from tables import check_table_dimensions
```



---
## set_table_width
```python
from tables import set_table_width
```



---
## widths
```python
from tables import widths
```



---
## get_column_widths
```python
from tables import get_column_widths
```



---
## extend_short_rows_with_empty_cells
```python
from tables import extend_short_rows_with_empty_cells
```



---
## run
```python
from tables import run
```

Parse a table block and build table. 

---
## DocutilsDialect
```python
from tables import DocutilsDialect
```

CSV dialect for `csv_table` directive.

---
## HeaderDialect
```python
from tables import HeaderDialect
```

CSV dialect used for the "header" option data.

Deprecated. Will be removed in Docutils 0.22.

---
## check_requirements
```python
from tables import check_requirements
```



---
## process_header_option
```python
from tables import process_header_option
```



---
## get_csv_data
```python
from tables import get_csv_data
```

Get CSV data from the directive content, from an external
file, or from a URL reference.

---
## decode_from_csv
```python
from tables import decode_from_csv
```



---
## encode_for_csv
```python
from tables import encode_for_csv
```



---
## parse_csv_data_into_rows
```python
from tables import parse_csv_data_into_rows
```



---
## check_list_content
```python
from tables import check_list_content
```



---
## build_table_from_list
```python
from tables import build_table_from_list
```



---
## __init__
```python
from tables import __init__
```



---
## RstLanguageImporter
```python
from __init__ import RstLanguageImporter
```

Import language modules.

When called with a BCP 47 language tag, instances return a module
with localisations for "directive" and "role" names for  from
`docutils.parsers.rst.languages` or the PYTHONPATH.

If there is no matching module, warn (if a `reporter` is passed)
and return None.

---
## HTMLTranslator
```python
from __init__ import HTMLTranslator
```

The html4css1 writer has been optimized to produce visually compact
lists (less vertical whitespace).  HTML's mixed content models
allow list items to contain "<li><p>body elements</p></li>" or
"<li>just text</li>" or even "<li>text<p>and body
elements</p>combined</li>", each with different effects.  It would
be best to stick with strict body elements in list items, but they
affect vertical spacing in older browsers (although they really
shouldn't).
The html5_polyglot writer solves this using CSS2.

Here is an outline of the optimization:

- Check for and omit <p> tags in "simple" lists: list items
  contain either a single paragraph, a nested simple list, or a
  paragraph followed by a nested simple list.  This means that
  this list can be compact:

      - Item 1.
      - Item 2.

  But this list cannot be compact:

      - Item 1.

        This second paragraph forces space between list items.

      - Item 2.

- In non-list contexts, omit <p> tags on a paragraph if that
  paragraph is the only child of its parent (footnotes & citations
  are allowed a label first).

- Regardless of the above, in definitions, table cells, field bodies,
  option descriptions, and list items, mark the first child with
  'class="first"' and the last child with 'class="last"'.  The stylesheet
  sets the margins (top & bottom respectively) to 0 for these elements.

The ``no_compact_lists`` setting (``--no-compact-lists`` command-line
option) disables list whitespace optimization.

---
## visit_acronym
```python
from __init__ import visit_acronym
```



---
## depart_acronym
```python
from __init__ import depart_acronym
```



---
## visit_authors
```python
from __init__ import visit_authors
```



---
## depart_authors
```python
from __init__ import depart_authors
```



---
## visit_caption
```python
from __init__ import visit_caption
```



---
## depart_caption
```python
from __init__ import depart_caption
```



---
## visit_container
```python
from __init__ import visit_container
```



---
## depart_container
```python
from __init__ import depart_container
```



---
## visit_copyright
```python
from __init__ import visit_copyright
```



---
## depart_copyright
```python
from __init__ import depart_copyright
```



---
## visit_date
```python
from __init__ import visit_date
```



---
## depart_date
```python
from __init__ import depart_date
```



---
## visit_figure
```python
from __init__ import visit_figure
```



---
## depart_figure
```python
from __init__ import depart_figure
```



---
## visit_footer
```python
from __init__ import visit_footer
```



---
## depart_footer
```python
from __init__ import depart_footer
```



---
## visit_header
```python
from __init__ import visit_header
```



---
## depart_header
```python
from __init__ import depart_header
```



---
## visit_inline
```python
from __init__ import visit_inline
```



---
## depart_inline
```python
from __init__ import depart_inline
```



---
## visit_legend
```python
from __init__ import visit_legend
```



---
## depart_legend
```python
from __init__ import depart_legend
```



---
## visit_literal
```python
from __init__ import visit_literal
```



---
## depart_literal
```python
from __init__ import depart_literal
```



---
## visit_meta
```python
from __init__ import visit_meta
```



---
## depart_meta
```python
from __init__ import depart_meta
```



---
## visit_organization
```python
from __init__ import visit_organization
```



---
## depart_organization
```python
from __init__ import depart_organization
```



---
## visit_section
```python
from __init__ import visit_section
```



---
## depart_section
```python
from __init__ import depart_section
```



---
## visit_sidebar
```python
from __init__ import visit_sidebar
```



---
## depart_sidebar
```python
from __init__ import depart_sidebar
```



---
## visit_topic
```python
from __init__ import visit_topic
```



---
## depart_topic
```python
from __init__ import depart_topic
```



---
## section_title_tags
```python
from __init__ import section_title_tags
```



---
## Babel
```python
from __init__ import Babel
```

Language specifics for LaTeX.

---
## XeLaTeXTranslator
```python
from __init__ import XeLaTeXTranslator
```

Generate code for LaTeX using Unicode fonts (XeLaTex or LuaLaTeX).

See the docstring of docutils.writers._html_base.HTMLTranslator for
notes on and examples of safe subclassing.

---
## find_theme
```python
from __init__ import find_theme
```



---
## S5HTMLTranslator
```python
from __init__ import S5HTMLTranslator
```



---
## setup_theme
```python
from __init__ import setup_theme
```



---
## copy_theme
```python
from __init__ import copy_theme
```

Locate & copy theme files.

A theme may be explicitly based on another theme via a '__base__'
file.  The default base theme is 'default'.  Files are accumulated
from the specified theme, any base themes, and 'default'.

---
## copy_file
```python
from __init__ import copy_file
```

Copy source_path to output_path, making sure any parent directories exist.

The output_path may be a directory.

---
## depart_document
```python
from __init__ import depart_document
```



---
## visit_subtitle
```python
from __init__ import visit_subtitle
```



---
## visit_title
```python
from __init__ import visit_title
```



---
## SortableDict
```python
from __init__ import SortableDict
```

Dictionary with additional sorting methods

Tip: use key starting with with '_' for sorting before small letters
     and with '~' for sorting after small letters.

---
## PreambleCmds
```python
from __init__ import PreambleCmds
```

Building blocks for the latex preamble.

---
## _read_block
```python
from __init__ import _read_block
```



---
## CharMaps
```python
from __init__ import CharMaps
```

LaTeX representations for active and Unicode characters.

---
## DocumentClass
```python
from __init__ import DocumentClass
```

Details of a LaTeX document class.

---
## Table
```python
from __init__ import Table
```

Manage a table while traversing.

Table style might be

:standard:   horizontal and vertical lines
:booktabs:   only horizontal lines (requires "booktabs" LaTeX package)
:borderless: no borders around table cells
:nolines:    alias for borderless

:colwidths-auto:  column widths determined by LaTeX

---
## LaTeXTranslator
```python
from __init__ import LaTeXTranslator
```

Generate code for 8-bit LaTeX from a Docutils document tree.

See the docstring of docutils.writers._html_base.HTMLTranslator for
notes on and examples of safe subclassing.

---
## language_name
```python
from __init__ import language_name
```

Return TeX language name for `language_code`

---
## get_language
```python
from __init__ import get_language
```



---
## sortedkeys
```python
from __init__ import sortedkeys
```

Return sorted list of keys

---
## sortedvalues
```python
from __init__ import sortedvalues
```

Return list of values sorted by keys

---
## section
```python
from __init__ import section
```

Return the LaTeX section name for section `level`.

The name depends on the specific document class.
Level is 1,2,3..., as level 0 is the title.

---
## latex_section_depth
```python
from __init__ import latex_section_depth
```

Return LaTeX equivalent of Docutils section level `depth`.

Given the value of the ``:depth:`` option of the "contents" or
"sectnum" directive, return the corresponding value for the
LaTeX ``tocdepth`` or ``secnumdepth`` counters.

---
## is_open
```python
from __init__ import is_open
```



---
## set_table_style
```python
from __init__ import set_table_style
```



---
## get_latex_type
```python
from __init__ import get_latex_type
```



---
## set
```python
from __init__ import set
```



---
## get_vertical_bar
```python
from __init__ import get_vertical_bar
```



---
## get_opening
```python
from __init__ import get_opening
```



---
## get_closing
```python
from __init__ import get_closing
```



---
## visit_colspec
```python
from __init__ import visit_colspec
```



---
## get_colspecs
```python
from __init__ import get_colspecs
```

Return column specification for longtable.
        

---
## get_column_width
```python
from __init__ import get_column_width
```

Return columnwidth for current cell (not multicell).

---
## get_multicolumn_width
```python
from __init__ import get_multicolumn_width
```

Return sum of columnwidths for multicell.

---
## get_caption
```python
from __init__ import get_caption
```

Deprecated. Will be removed in Docutils 0.22.

---
## need_recurse
```python
from __init__ import need_recurse
```



---
## visit_thead
```python
from __init__ import visit_thead
```



---
## depart_thead
```python
from __init__ import depart_thead
```



---
## visit_row
```python
from __init__ import visit_row
```



---
## depart_row
```python
from __init__ import depart_row
```



---
## set_rowspan
```python
from __init__ import set_rowspan
```



---
## get_rowspan
```python
from __init__ import get_rowspan
```



---
## get_entry_number
```python
from __init__ import get_entry_number
```



---
## visit_entry
```python
from __init__ import visit_entry
```



---
## is_stub_column
```python
from __init__ import is_stub_column
```



---
## stylesheet_call
```python
from __init__ import stylesheet_call
```

Return code to reference or embed stylesheet file `path`

---
## to_latex_encoding
```python
from __init__ import to_latex_encoding
```

Translate docutils encoding name into LaTeX's.

Default method is remove "-" and "_" chars from docutils_encoding.

---
## language_label
```python
from __init__ import language_label
```



---
## encode
```python
from __init__ import encode
```



---
## attval
```python
from __init__ import attval
```

Cleanse, encode, and return attribute value text.

---
## is_inline
```python
from __init__ import is_inline
```

Check whether a node represents an inline or block-level element

---
## append_hypertargets
```python
from __init__ import append_hypertargets
```

Append hypertargets for all ids of `node`

---
## ids_to_labels
```python
from __init__ import ids_to_labels
```

Return list of label definitions for all ids of `node`

If `set_anchor` is True, an anchor is set with \phantomsection.
If `protect` is True, the \label cmd is made robust.
If `newline` is True, a newline is added if there are labels.

---
## set_align_from_classes
```python
from __init__ import set_align_from_classes
```

Convert ``align-*`` class arguments into alignment args.

---
## insert_align_declaration
```python
from __init__ import insert_align_declaration
```



---
## duclass_open
```python
from __init__ import duclass_open
```

Open a group and insert declarations for class values.

---
## duclass_close
```python
from __init__ import duclass_close
```

Close a group of class declarations.

---
## push_output_collector
```python
from __init__ import push_output_collector
```



---
## pop_output_collector
```python
from __init__ import pop_output_collector
```



---
## term_postfix
```python
from __init__ import term_postfix
```

Return LaTeX code required between term or field name and content.

In a LaTeX "description" environment (used for definition
lists and non-docinfo field lists), a ``\leavevmode``
between an item's label and content ensures the correct
placement of certain block constructs.

---
## visit_Text
```python
from __init__ import visit_Text
```



---
## depart_Text
```python
from __init__ import depart_Text
```



---
## visit_abbreviation
```python
from __init__ import visit_abbreviation
```



---
## depart_abbreviation
```python
from __init__ import depart_abbreviation
```



---
## visit_address
```python
from __init__ import visit_address
```



---
## depart_address
```python
from __init__ import depart_address
```



---
## visit_admonition
```python
from __init__ import visit_admonition
```



---
## depart_admonition
```python
from __init__ import depart_admonition
```



---
## visit_author
```python
from __init__ import visit_author
```



---
## depart_author
```python
from __init__ import depart_author
```



---
## visit_block_quote
```python
from __init__ import visit_block_quote
```



---
## depart_block_quote
```python
from __init__ import depart_block_quote
```



---
## visit_bullet_list
```python
from __init__ import visit_bullet_list
```



---
## depart_bullet_list
```python
from __init__ import depart_bullet_list
```



---
## visit_superscript
```python
from __init__ import visit_superscript
```



---
## depart_superscript
```python
from __init__ import depart_superscript
```



---
## visit_subscript
```python
from __init__ import visit_subscript
```



---
## depart_subscript
```python
from __init__ import depart_subscript
```



---
## visit_title_reference
```python
from __init__ import visit_title_reference
```



---
## depart_title_reference
```python
from __init__ import depart_title_reference
```



---
## visit_citation
```python
from __init__ import visit_citation
```



---
## depart_citation
```python
from __init__ import depart_citation
```



---
## visit_citation_reference
```python
from __init__ import visit_citation_reference
```



---
## depart_citation_reference
```python
from __init__ import depart_citation_reference
```



---
## visit_classifier
```python
from __init__ import visit_classifier
```



---
## depart_classifier
```python
from __init__ import depart_classifier
```



---
## depart_colspec
```python
from __init__ import depart_colspec
```



---
## visit_comment
```python
from __init__ import visit_comment
```



---
## depart_comment
```python
from __init__ import depart_comment
```



---
## visit_compound
```python
from __init__ import visit_compound
```



---
## depart_compound
```python
from __init__ import depart_compound
```



---
## visit_contact
```python
from __init__ import visit_contact
```



---
## depart_contact
```python
from __init__ import depart_contact
```



---
## visit_decoration
```python
from __init__ import visit_decoration
```



---
## depart_decoration
```python
from __init__ import depart_decoration
```



---
## visit_definition
```python
from __init__ import visit_definition
```



---
## depart_definition
```python
from __init__ import depart_definition
```



---
## visit_definition_list
```python
from __init__ import visit_definition_list
```



---
## depart_definition_list
```python
from __init__ import depart_definition_list
```



---
## visit_definition_list_item
```python
from __init__ import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from __init__ import depart_definition_list_item
```



---
## visit_description
```python
from __init__ import visit_description
```



---
## depart_description
```python
from __init__ import depart_description
```



---
## visit_docinfo
```python
from __init__ import visit_docinfo
```



---
## depart_docinfo
```python
from __init__ import depart_docinfo
```



---
## visit_docinfo_item
```python
from __init__ import visit_docinfo_item
```



---
## depart_docinfo_item
```python
from __init__ import depart_docinfo_item
```



---
## visit_doctest_block
```python
from __init__ import visit_doctest_block
```



---
## depart_doctest_block
```python
from __init__ import depart_doctest_block
```



---
## visit_document
```python
from __init__ import visit_document
```



---
## make_title
```python
from __init__ import make_title
```



---
## append_bibliogaphy
```python
from __init__ import append_bibliogaphy
```



---
## visit_emphasis
```python
from __init__ import visit_emphasis
```



---
## depart_emphasis
```python
from __init__ import depart_emphasis
```



---
## insert_additional_table_colum_delimiters
```python
from __init__ import insert_additional_table_colum_delimiters
```



---
## depart_entry
```python
from __init__ import depart_entry
```



---
## visit_enumerated_list
```python
from __init__ import visit_enumerated_list
```

The 'start' attribute does not conform to HTML 4.01's strict.dtd, but
cannot be emulated in CSS1 (HTML 5 reincludes it).

---
## depart_enumerated_list
```python
from __init__ import depart_enumerated_list
```



---
## visit_field
```python
from __init__ import visit_field
```



---
## depart_field
```python
from __init__ import depart_field
```



---
## visit_field_body
```python
from __init__ import visit_field_body
```



---
## depart_field_body
```python
from __init__ import depart_field_body
```



---
## visit_field_list
```python
from __init__ import visit_field_list
```



---
## depart_field_list
```python
from __init__ import depart_field_list
```



---
## visit_field_name
```python
from __init__ import visit_field_name
```



---
## depart_field_name
```python
from __init__ import depart_field_name
```



---
## visit_footnote
```python
from __init__ import visit_footnote
```



---
## depart_footnote
```python
from __init__ import depart_footnote
```



---
## visit_footnote_reference
```python
from __init__ import visit_footnote_reference
```



---
## depart_footnote_reference
```python
from __init__ import depart_footnote_reference
```



---
## label_delim
```python
from __init__ import label_delim
```



---
## visit_label
```python
from __init__ import visit_label
```



---
## depart_label
```python
from __init__ import depart_label
```



---
## visit_generated
```python
from __init__ import visit_generated
```



---
## depart_generated
```python
from __init__ import depart_generated
```



---
## to_latex_length
```python
from __init__ import to_latex_length
```

Convert `length_str` with rst length to LaTeX length
        

---
## visit_image
```python
from __init__ import visit_image
```



---
## depart_image
```python
from __init__ import depart_image
```



---
## visit_line
```python
from __init__ import visit_line
```



---
## depart_line
```python
from __init__ import depart_line
```



---
## visit_line_block
```python
from __init__ import visit_line_block
```



---
## depart_line_block
```python
from __init__ import depart_line_block
```



---
## visit_list_item
```python
from __init__ import visit_list_item
```



---
## depart_list_item
```python
from __init__ import depart_list_item
```



---
## is_plaintext
```python
from __init__ import is_plaintext
```

Check whether a node can be typeset verbatim

---
## visit_literal_block
```python
from __init__ import visit_literal_block
```



---
## depart_literal_block
```python
from __init__ import depart_literal_block
```



---
## visit_math
```python
from __init__ import visit_math
```



---
## depart_math
```python
from __init__ import depart_math
```



---
## visit_math_block
```python
from __init__ import visit_math_block
```



---
## depart_math_block
```python
from __init__ import depart_math_block
```



---
## visit_option
```python
from __init__ import visit_option
```



---
## depart_option
```python
from __init__ import depart_option
```



---
## visit_option_argument
```python
from __init__ import visit_option_argument
```



---
## depart_option_argument
```python
from __init__ import depart_option_argument
```



---
## visit_option_group
```python
from __init__ import visit_option_group
```



---
## depart_option_group
```python
from __init__ import depart_option_group
```



---
## visit_option_list
```python
from __init__ import visit_option_list
```



---
## depart_option_list
```python
from __init__ import depart_option_list
```



---
## visit_option_list_item
```python
from __init__ import visit_option_list_item
```



---
## depart_option_list_item
```python
from __init__ import depart_option_list_item
```



---
## visit_option_string
```python
from __init__ import visit_option_string
```



---
## depart_option_string
```python
from __init__ import depart_option_string
```



---
## visit_paragraph
```python
from __init__ import visit_paragraph
```



---
## depart_paragraph
```python
from __init__ import depart_paragraph
```



---
## visit_problematic
```python
from __init__ import visit_problematic
```



---
## depart_problematic
```python
from __init__ import depart_problematic
```



---
## visit_raw
```python
from __init__ import visit_raw
```



---
## depart_raw
```python
from __init__ import depart_raw
```



---
## has_unbalanced_braces
```python
from __init__ import has_unbalanced_braces
```

Test whether there are unmatched '{' or '}' characters.

---
## visit_reference
```python
from __init__ import visit_reference
```



---
## depart_reference
```python
from __init__ import depart_reference
```



---
## visit_revision
```python
from __init__ import visit_revision
```



---
## depart_revision
```python
from __init__ import depart_revision
```



---
## visit_rubric
```python
from __init__ import visit_rubric
```



---
## depart_rubric
```python
from __init__ import depart_rubric
```



---
## visit_attribution
```python
from __init__ import visit_attribution
```



---
## depart_attribution
```python
from __init__ import depart_attribution
```



---
## visit_status
```python
from __init__ import visit_status
```



---
## depart_status
```python
from __init__ import depart_status
```



---
## visit_strong
```python
from __init__ import visit_strong
```



---
## depart_strong
```python
from __init__ import depart_strong
```



---
## visit_substitution_definition
```python
from __init__ import visit_substitution_definition
```



---
## visit_substitution_reference
```python
from __init__ import visit_substitution_reference
```



---
## depart_subtitle
```python
from __init__ import depart_subtitle
```



---
## visit_system_message
```python
from __init__ import visit_system_message
```



---
## depart_system_message
```python
from __init__ import depart_system_message
```



---
## visit_table
```python
from __init__ import visit_table
```



---
## depart_table
```python
from __init__ import depart_table
```



---
## visit_target
```python
from __init__ import visit_target
```



---
## depart_target
```python
from __init__ import depart_target
```



---
## visit_tbody
```python
from __init__ import visit_tbody
```



---
## depart_tbody
```python
from __init__ import depart_tbody
```



---
## visit_term
```python
from __init__ import visit_term
```



---
## depart_term
```python
from __init__ import depart_term
```



---
## visit_tgroup
```python
from __init__ import visit_tgroup
```



---
## depart_tgroup
```python
from __init__ import depart_tgroup
```



---
## thead_depth
```python
from __init__ import thead_depth
```



---
## depart_title
```python
from __init__ import depart_title
```



---
## visit_contents
```python
from __init__ import visit_contents
```

Write the table of contents.

Called from visit_topic() for "contents" topics.

---
## visit_transition
```python
from __init__ import visit_transition
```



---
## depart_transition
```python
from __init__ import depart_transition
```



---
## visit_version
```python
from __init__ import visit_version
```



---
## depart_version
```python
from __init__ import depart_version
```



---
## unimplemented_visit
```python
from __init__ import unimplemented_visit
```



---
## __name__
```python
from prepstyles import __name__
```

Adapt a word-processor-generated styles.odt for odtwriter use:

Drop page size specifications from styles.xml in STYLE_FILE.odt.
See https://docutils.sourceforge.io/docs/user/odt.html#page-size

---
## prepstyle
```python
from prepstyles import prepstyle
```



---
## main
```python
from prepstyles import main
```



---
## _ElementInterfaceWrapper
```python
from __init__ import _ElementInterfaceWrapper
```



---
## Element
```python
from __init__ import Element
```



---
## SubElement
```python
from __init__ import SubElement
```



---
## fix_ns
```python
from __init__ import fix_ns
```



---
## add_ns
```python
from __init__ import add_ns
```



---
## ToString
```python
from __init__ import ToString
```



---
## escape_cdata
```python
from __init__ import escape_cdata
```



---
## TableStyle
```python
from __init__ import TableStyle
```



---
## ListLevel
```python
from __init__ import ListLevel
```



---
## ODFTranslator
```python
from __init__ import ODFTranslator
```



---
## setparent
```python
from __init__ import setparent
```



---
## getparent
```python
from __init__ import getparent
```



---
## get_border_
```python
from __init__ import get_border_
```



---
## set_border_
```python
from __init__ import set_border_
```



---
## get_backgroundcolor_
```python
from __init__ import get_backgroundcolor_
```



---
## set_backgroundcolor_
```python
from __init__ import set_backgroundcolor_
```



---
## set_sibling
```python
from __init__ import set_sibling
```



---
## get_sibling
```python
from __init__ import get_sibling
```



---
## set_nested
```python
from __init__ import set_nested
```



---
## get_nested
```python
from __init__ import get_nested
```



---
## get_level
```python
from __init__ import get_level
```

Level of support Narwhals has for current object.

This can be one of:

- 'full': full Narwhals API support
- 'metadata': only metadata operations are supported (`df.schema`)

---
## assemble_my_parts
```python
from __init__ import assemble_my_parts
```

Assemble the `self.parts` dictionary.  Extend in subclasses.
        

---
## update_stylesheet
```python
from __init__ import update_stylesheet
```

Update xml style sheet element with language and region/country.

---
## write_zip_str
```python
from __init__ import write_zip_str
```



---
## store_embedded_files
```python
from __init__ import store_embedded_files
```



---
## get_settings
```python
from __init__ import get_settings
```

modeled after get_stylesheet

---
## get_stylesheet
```python
from __init__ import get_stylesheet
```

Get the stylesheet from the visitor.
Ask the visitor to setup the page.

---
## copy_from_stylesheet
```python
from __init__ import copy_from_stylesheet
```

Copy images, settings, etc from the stylesheet doc into target doc.
        

---
## create_manifest
```python
from __init__ import create_manifest
```



---
## create_meta
```python
from __init__ import create_meta
```



---
## get_str_stylesheet
```python
from __init__ import get_str_stylesheet
```



---
## retrieve_styles
```python
from __init__ import retrieve_styles
```

Retrieve the stylesheet from either a .xml file or from
a .odt (zip) file.  Return the content as a string.

---
## extract_table_styles
```python
from __init__ import extract_table_styles
```



---
## get_property
```python
from __init__ import get_property
```



---
## add_doc_title
```python
from __init__ import add_doc_title
```



---
## find_first_text_p
```python
from __init__ import find_first_text_p
```

Search the generated doc and return the first <text:p> element.
        

---
## attach_page_style
```python
from __init__ import attach_page_style
```

Attach the default page style.

Create an automatic-style that refers to the current style
of this element and that refers to the default page style.

---
## rststyle
```python
from __init__ import rststyle
```

Returns the style name to use for the given style.

If `parameters` is given `name` must contain a matching number of
``%`` and is used as a format expression with `parameters` as
the value.

---
## generate_content_element
```python
from __init__ import generate_content_element
```



---
## setup_page
```python
from __init__ import setup_page
```



---
## get_dom_stylesheet
```python
from __init__ import get_dom_stylesheet
```



---
## setup_paper
```python
from __init__ import setup_paper
```



---
## add_header_footer
```python
from __init__ import add_header_footer
```



---
## create_custom_headfoot
```python
from __init__ import create_custom_headfoot
```



---
## make_field_element
```python
from __init__ import make_field_element
```



---
## split_field_specifiers_iter
```python
from __init__ import split_field_specifiers_iter
```



---
## astext
```python
from __init__ import astext
```



---
## content_astext
```python
from __init__ import content_astext
```



---
## set_title
```python
from __init__ import set_title
```



---
## get_title
```python
from __init__ import get_title
```



---
## set_embedded_file_list
```python
from __init__ import set_embedded_file_list
```



---
## get_embedded_file_list
```python
from __init__ import get_embedded_file_list
```



---
## get_meta_dict
```python
from __init__ import get_meta_dict
```



---
## process_footnotes
```python
from __init__ import process_footnotes
```



---
## append_child
```python
from __init__ import append_child
```



---
## append_p
```python
from __init__ import append_p
```



---
## append_pending_ids
```python
from __init__ import append_pending_ids
```



---
## set_current_element
```python
from __init__ import set_current_element
```



---
## set_to_parent
```python
from __init__ import set_to_parent
```



---
## generate_labeled_block
```python
from __init__ import generate_labeled_block
```



---
## generate_labeled_line
```python
from __init__ import generate_labeled_line
```



---
## dispatch_visit
```python
from __init__ import dispatch_visit
```



---
## handle_basic_atts
```python
from __init__ import handle_basic_atts
```



---
## default_visit
```python
from __init__ import default_visit
```



---
## default_departure
```python
from __init__ import default_departure
```



---
## check_file_exists
```python
from __init__ import check_file_exists
```



---
## get_image_width_height
```python
from __init__ import get_image_width_height
```



---
## convert_to_cm
```python
from __init__ import convert_to_cm
```

Convert various units to centimeters.

Note that a call to this method should be wrapped in:
    try: except ValueError:

---
## get_image_scale
```python
from __init__ import get_image_scale
```



---
## get_image_scaled_width_height
```python
from __init__ import get_image_scaled_width_height
```

Return the image size in centimeters adjusted by image attrs.

---
## get_page_width
```python
from __init__ import get_page_width
```

Return the document's page width in centimeters.

---
## generate_figure
```python
from __init__ import generate_figure
```



---
## generate_image
```python
from __init__ import generate_image
```



---
## is_in_table
```python
from __init__ import is_in_table
```



---
## _calculate_code_block_padding
```python
from __init__ import _calculate_code_block_padding
```



---
## _add_syntax_highlighting
```python
from __init__ import _add_syntax_highlighting
```



---
## fill_line
```python
from __init__ import fill_line
```



---
## fill_func1
```python
from __init__ import fill_func1
```



---
## fill_func2
```python
from __init__ import fill_func2
```



---
## depart_substitution_definition
```python
from __init__ import depart_substitution_definition
```



---
## get_table_style
```python
from __init__ import get_table_style
```



---
## generate_table_of_content_entry_template
```python
from __init__ import generate_table_of_content_entry_template
```



---
## find_title_label
```python
from __init__ import find_title_label
```



---
## update_toc_page_numbers
```python
from __init__ import update_toc_page_numbers
```



---
## update_toc_collect
```python
from __init__ import update_toc_collect
```



---
## update_toc_add_numbers
```python
from __init__ import update_toc_add_numbers
```



---
## visit_warning
```python
from __init__ import visit_warning
```



---
## depart_warning
```python
from __init__ import depart_warning
```



---
## visit_attention
```python
from __init__ import visit_attention
```



---
## visit_caution
```python
from __init__ import visit_caution
```



---
## visit_danger
```python
from __init__ import visit_danger
```



---
## visit_error
```python
from __init__ import visit_error
```



---
## visit_hint
```python
from __init__ import visit_hint
```



---
## visit_important
```python
from __init__ import visit_important
```



---
## visit_note
```python
from __init__ import visit_note
```



---
## visit_tip
```python
from __init__ import visit_tip
```



---
## generate_admonition
```python
from __init__ import generate_admonition
```



---
## walk
```python
from __init__ import walk
```



---
## __name__
```python
from pygmentsformatter import __name__
```

Additional support for Pygments formatter.

---
## OdtPygmentsFormatter
```python
from pygmentsformatter import OdtPygmentsFormatter
```



---
## OdtPygmentsProgFormatter
```python
from pygmentsformatter import OdtPygmentsProgFormatter
```



---
## OdtPygmentsLaTeXFormatter
```python
from pygmentsformatter import OdtPygmentsLaTeXFormatter
```



---
## __init__
```python
from pygmentsformatter import __init__
```



---
## rststyle
```python
from pygmentsformatter import rststyle
```



---
## format
```python
from pygmentsformatter import format
```



---
## interpolation_dict
```python
from __init__ import interpolation_dict
```



---
## SimpleListChecker
```python
from __init__ import SimpleListChecker
```

Raise `nodes.NodeFound` if non-simple list item is encountered.

Here "simple" means a list item containing nothing other than a single
paragraph, a simple list, or a paragraph followed by a simple list.

---
## set_first_last
```python
from __init__ import set_first_last
```



---
## is_compactable
```python
from __init__ import is_compactable
```



---
## footnote_backrefs
```python
from __init__ import footnote_backrefs
```



---
## should_be_compact_paragraph
```python
from __init__ import should_be_compact_paragraph
```

Determine if the <p> tags around paragraph ``node`` can be omitted.

---
## __name__
```python
from latex2mathml import __name__
```

Convert LaTex maths code into presentational MathML.

This module is provisional:
the API is not settled and may change with any minor Docutils version.

---
## tex_cmdname
```python
from latex2mathml import tex_cmdname
```

Return leading TeX command name and remainder of `string`.

>>> tex_cmdname('mymacro2') # up to first non-letter
('mymacro', '2')
>>> tex_cmdname('name 2') # strip trailing whitespace
('name', '2')
>>> tex_cmdname('_2') # single non-letter character
('_', '2')

---
## tex_number
```python
from latex2mathml import tex_number
```

Return leading number literal and remainder of `string`.

>>> tex_number('123.4')
('123.4', '')

---
## tex_token
```python
from latex2mathml import tex_token
```

Return first simple TeX token and remainder of `string`.

>>> tex_token('\command{without argument}')
('\command', '{without argument}')
>>> tex_token('or first character')
('o', 'r first character')

---
## tex_group
```python
from latex2mathml import tex_group
```

Return first TeX group or token and remainder of `string`.

>>> tex_group('{first group} returned without brackets')
('first group', ' returned without brackets')

---
## tex_token_or_group
```python
from latex2mathml import tex_token_or_group
```

Return first TeX group or token and remainder of `string`.

>>> tex_token_or_group('\command{without argument}')
('\command', '{without argument}')
>>> tex_token_or_group('first character')
('f', 'irst character')
>>> tex_token_or_group(' also whitespace')
(' ', 'also whitespace')
>>> tex_token_or_group('{first group} keep rest')
('first group', ' keep rest')

---
## tex_optarg
```python
from latex2mathml import tex_optarg
```

Return optional argument and remainder.

>>> tex_optarg('[optional argument] returned without brackets')
('optional argument', ' returned without brackets')
>>> tex_optarg('{empty string, if there is no optional arg}')
('', '{empty string, if there is no optional arg}')

---
## parse_latex_math
```python
from latex2mathml import parse_latex_math
```

Append MathML conversion of `string` to `node` and return it.

>>> parse_latex_math(math(), r'lpha')
math(mi('α'))
>>> parse_latex_math(mrow(), r'x_{n}')
mrow(msub(mi('x'), mi('n')))

---
## handle_cmd
```python
from latex2mathml import handle_cmd
```

Process LaTeX command `name` followed by `string`.

Append result to `node`.
If needed, parse `string` for command argument.
Return new current node and remainder of `string`:

>>> handle_cmd('hbar', math(), r' rac')
(math(mi('ℏ')), ' \frac')
>>> handle_cmd('hspace', math(), r'{1ex} (x)')
(math(mspace(width='1ex')), ' (x)')

---
## handle_math_alphabet
```python
from latex2mathml import handle_math_alphabet
```



---
## handle_script_or_limit
```python
from latex2mathml import handle_script_or_limit
```

Append script or limit element to `node`.

---
## begin_environment
```python
from latex2mathml import begin_environment
```



---
## end_environment
```python
from latex2mathml import end_environment
```



---
## tex_equation_columns
```python
from latex2mathml import tex_equation_columns
```



---
## align_attributes
```python
from latex2mathml import align_attributes
```



---
## tex2mathml
```python
from latex2mathml import tex2mathml
```

Return string with MathML code corresponding to `tex_math`.

Set `as_block` to ``True`` for displayed formulas.

---
## __name__
```python
from unichar2tex import __name__
```



---
## __name__
```python
from tex2unichar import __name__
```



---
## __name__
```python
from math2html import __name__
```



---
## Trace
```python
from math2html import Trace
```

A tracing class

---
## ContainerConfig
```python
from math2html import ContainerConfig
```

Configuration class from elyxer.config file

---
## EscapeConfig
```python
from math2html import EscapeConfig
```

Configuration class from elyxer.config file

---
## FormulaConfig
```python
from math2html import FormulaConfig
```

Configuration class from elyxer.config file

---
## CommandLineParser
```python
from math2html import CommandLineParser
```

A parser for runtime options

---
## Options
```python
from math2html import Options
```

A set of runtime options

---
## Cloner
```python
from math2html import Cloner
```

An object used to clone other objects.

---
## ContainerExtractor
```python
from math2html import ContainerExtractor
```

A class to extract certain containers.

The config parameter is a map containing three lists:
allowed, copied and extracted.
Each of the three is a list of class names for containers.
Allowed containers are included as is into the result.
Cloned containers are cloned and placed into the result.
Extracted containers are looked into.
All other containers are silently ignored.

---
## Parser
```python
from math2html import Parser
```

A generic parser

---
## LoneCommand
```python
from math2html import LoneCommand
```

A parser for just one command line

---
## TextParser
```python
from math2html import TextParser
```

A parser for a command and a bit of text

---
## ExcludingParser
```python
from math2html import ExcludingParser
```

A parser that excludes the final line

---
## BoundedParser
```python
from math2html import BoundedParser
```

A parser bound by a final line

---
## BoundedDummy
```python
from math2html import BoundedDummy
```

A bound parser that ignores everything

---
## StringParser
```python
from math2html import StringParser
```

Parses just a string

---
## ContainerOutput
```python
from math2html import ContainerOutput
```

The generic HTML output for a container.

---
## EmptyOutput
```python
from math2html import EmptyOutput
```



---
## FixedOutput
```python
from math2html import FixedOutput
```

Fixed output

---
## ContentsOutput
```python
from math2html import ContentsOutput
```

Outputs the contents converted to HTML

---
## TaggedOutput
```python
from math2html import TaggedOutput
```

Outputs an HTML tag surrounding the contents.

---
## FilteredOutput
```python
from math2html import FilteredOutput
```

Returns the output in the contents, but filtered:

---
## StringOutput
```python
from math2html import StringOutput
```

Returns a bare string as output

---
## Globable
```python
from math2html import Globable
```

A bit of text which can be globbed (lumped together in bits).
Methods current(), skipcurrent(), checkfor() and isout() have to be
implemented by subclasses.

---
## EndingList
```python
from math2html import EndingList
```

A list of position endings

---
## PositionEnding
```python
from math2html import PositionEnding
```

An ending for a parsing position

---
## Position
```python
from math2html import Position
```

A position in a text to parse.
Including those in Globable, functions to implement by subclasses are:
skip(), identifier(), extract(), isout() and current().

---
## TextPosition
```python
from math2html import TextPosition
```

A parse position based on a raw text.

---
## Container
```python
from math2html import Container
```

A container for text and objects in a lyx file

---
## BlackBox
```python
from math2html import BlackBox
```

A container that does not output anything

---
## StringContainer
```python
from math2html import StringContainer
```

A container for a single string

---
## Constant
```python
from math2html import Constant
```

A constant string

---
## DocumentParameters
```python
from math2html import DocumentParameters
```

Global parameters for the document.

---
## FormulaParser
```python
from math2html import FormulaParser
```

Parses a formula

---
## FormulaBit
```python
from math2html import FormulaBit
```

A bit of a formula

---
## TaggedBit
```python
from math2html import TaggedBit
```

A tagged string in a formula

---
## FormulaConstant
```python
from math2html import FormulaConstant
```

A constant string in a formula

---
## RawText
```python
from math2html import RawText
```

A bit of text inside a formula

---
## FormulaSymbol
```python
from math2html import FormulaSymbol
```

A symbol inside a formula

---
## FormulaNumber
```python
from math2html import FormulaNumber
```

A string of digits in a formula

---
## Comment
```python
from math2html import Comment
```

A LaTeX comment: % to the end of the line.

---
## WhiteSpace
```python
from math2html import WhiteSpace
```

Some white space inside a formula.

---
## Bracket
```python
from math2html import Bracket
```

A {} bracket inside a formula

---
## SquareBracket
```python
from math2html import SquareBracket
```

A [] bracket inside a formula

---
## MathsProcessor
```python
from math2html import MathsProcessor
```

A processor for a maths construction inside the FormulaProcessor.

---
## FormulaProcessor
```python
from math2html import FormulaProcessor
```

A processor specifically for formulas.

---
## Formula
```python
from math2html import Formula
```

A LaTeX formula

---
## WholeFormula
```python
from math2html import WholeFormula
```

Parse a whole formula

---
## FormulaFactory
```python
from math2html import FormulaFactory
```

Construct bits of formula

---
## FormulaCommand
```python
from math2html import FormulaCommand
```

A LaTeX command inside a formula

---
## CommandBit
```python
from math2html import CommandBit
```

A formula bit that includes a command

---
## EmptyCommand
```python
from math2html import EmptyCommand
```

An empty command (without parameters)

---
## SpacedCommand
```python
from math2html import SpacedCommand
```

An empty command which should have math spacing in formulas.

---
## AlphaCommand
```python
from math2html import AlphaCommand
```

A command without parameters whose result is alphabetical.

---
## OneParamFunction
```python
from math2html import OneParamFunction
```

A function of one parameter

---
## SymbolFunction
```python
from math2html import SymbolFunction
```

Find a function which is represented by a symbol (like _ or ^)

---
## TextFunction
```python
from math2html import TextFunction
```

A function where parameters are read as text.

---
## FontFunction
```python
from math2html import FontFunction
```

A function of one parameter that changes the font.

---
## BigBracket
```python
from math2html import BigBracket
```

A big bracket generator.

---
## FormulaEquation
```python
from math2html import FormulaEquation
```

A simple numbered equation.

---
## FormulaCell
```python
from math2html import FormulaCell
```

An array cell inside a row

---
## FormulaRow
```python
from math2html import FormulaRow
```

An array row inside an array

---
## MultiRowFormula
```python
from math2html import MultiRowFormula
```

A formula with multiple rows.

---
## FormulaArray
```python
from math2html import FormulaArray
```

An array within a formula

---
## FormulaMatrix
```python
from math2html import FormulaMatrix
```

A matrix (array with center alignment).

---
## FormulaCases
```python
from math2html import FormulaCases
```

A cases statement

---
## EquationEnvironment
```python
from math2html import EquationEnvironment
```

A \begin{}...\end equation environment with rows and cells.

---
## BeginCommand
```python
from math2html import BeginCommand
```

A \begin{}...\end command and what it entails (array, cases, aligned)

---
## CombiningFunction
```python
from math2html import CombiningFunction
```



---
## OversetFunction
```python
from math2html import OversetFunction
```

A function that decorates some bit of text with an overset.

---
## UndersetFunction
```python
from math2html import UndersetFunction
```

A function that decorates some bit of text with an underset.

---
## LimitCommand
```python
from math2html import LimitCommand
```

A command which accepts limits above and below, in display mode.

---
## LimitPreviousCommand
```python
from math2html import LimitPreviousCommand
```

A command to limit the previous command.

---
## LimitsProcessor
```python
from math2html import LimitsProcessor
```

A processor for limits inside an element.

---
## BracketCommand
```python
from math2html import BracketCommand
```

A command which defines a bracket.

---
## BracketProcessor
```python
from math2html import BracketProcessor
```

A processor for bracket commands.

---
## ParameterDefinition
```python
from math2html import ParameterDefinition
```

The definition of a parameter in a hybrid function.

---
## ParameterFunction
```python
from math2html import ParameterFunction
```

A function with a variable number of parameters defined in a template.

---
## HybridFunction
```python
from math2html import HybridFunction
```

A parameter function where the output is also defined using a template.
The template can use a number of functions; each function has an associated
tag.
Example: [f0{$1},span class="fbox"] defines a function f0 which corresponds
to a span of class fbox, yielding <span class="fbox">$1</span>.
Literal parameters can be used in tags definitions:
  [f0{$1},span style="color: $p;"]
yields <span style="color: $p;">$1</span>, where $p is a literal parameter.
Sizes can be specified in hybridsizes, e.g. adding parameter sizes. By
default the resulting size is the max of all arguments. Sizes are used
to generate the right parameters.
A function followed by a single / is output as a self-closing XHTML tag:
  [f0/,hr]
will generate <hr/>.

---
## HybridSize
```python
from math2html import HybridSize
```

The size associated with a hybrid function.

---
## math2html
```python
from math2html import math2html
```

Convert some TeX math to HTML.

---
## main
```python
from math2html import main
```

Main function, called if invoked from the command line

---
## debug
```python
from math2html import debug
```

Show a debug message

---
## message
```python
from math2html import message
```

Show a trace message

---
## error
```python
from math2html import error
```

Show an error message and the position identifier.

---
## show
```python
from math2html import show
```

Show a message out of a channel

---
## __init__
```python
from math2html import __init__
```



---
## parseoptions
```python
from math2html import parseoptions
```

Parse command line options

---
## readoption
```python
from math2html import readoption
```

Read the key and value for an option

---
## readquoted
```python
from math2html import readquoted
```

Read a value between quotes

---
## readequalskey
```python
from math2html import readequalskey
```

Read a key using equals

---
## processoptions
```python
from math2html import processoptions
```

Process all options parsed.

---
## usage
```python
from math2html import usage
```

Show correct usage

---
## showoptions
```python
from math2html import showoptions
```

Show all possible options

---
## showversion
```python
from math2html import showversion
```

Return the current eLyXer version string

---
## clone
```python
from math2html import clone
```

Return a new square bracket with the same contents.

---
## create
```python
from math2html import create
```

Create the bracket for the given character.

---
## extract
```python
from math2html import extract
```

Extract the next string of the given length, or None if not enough text.

---
## process
```python
from math2html import process
```

Convert the bracket using Unicode pieces, if possible.

---
## safeclone
```python
from math2html import safeclone
```

Return a new container with contents only in a safe list, recursively.

---
## parseheader
```python
from math2html import parseheader
```

See if the formula is inlined

---
## parseparameter
```python
from math2html import parseparameter
```

Parse a parameter at the current position

---
## parseending
```python
from math2html import parseending
```

Parse until the current ending is found

---
## parsecontainer
```python
from math2html import parsecontainer
```



---
## __str__
```python
from math2html import __str__
```

Return a printable representation.

---
## parse
```python
from math2html import parse
```

Parse a parameter definition: [$0], {$x}, {$1!}...

---
## isending
```python
from math2html import isending
```

Check if text is ending

---
## gethtml
```python
from math2html import gethtml
```

Get the resulting HTML

---
## isempty
```python
from math2html import isempty
```

This output is particularly empty.

---
## settag
```python
from math2html import settag
```

Set the value for the tag and other attributes.

---
## setbreaklines
```python
from math2html import setbreaklines
```

Set the value for breaklines.

---
## open
```python
from math2html import open
```

Get opening line.

---
## close
```python
from math2html import close
```

Get closing line.

---
## selfclosing
```python
from math2html import selfclosing
```

Get self-closing line.

---
## checktag
```python
from math2html import checktag
```

Check that the tag is valid.

---
## addfilter
```python
from math2html import addfilter
```

Add a new filter: replace the original by the replacement.

---
## filter
```python
from math2html import filter
```

Filter a single line with all available filters.

---
## checkbytemark
```python
from math2html import checkbytemark
```

Check for a Unicode byte mark and skip it.

---
## isout
```python
from math2html import isout
```

Find out if we are out of the text yet.

---
## current
```python
from math2html import current
```

Return the current character, assuming we are not out.

---
## checkfor
```python
from math2html import checkfor
```

Check for a string at the given position.

---
## finished
```python
from math2html import finished
```

Find out if the current text has finished.

---
## skipcurrent
```python
from math2html import skipcurrent
```

Return the current character and skip it.

---
## glob
```python
from math2html import glob
```

Glob a bit of text that satisfies a check on the current char.

---
## globalpha
```python
from math2html import globalpha
```

Glob a bit of alpha text

---
## globnumber
```python
from math2html import globnumber
```

Glob a row of digits.

---
## isidentifier
```python
from math2html import isidentifier
```

Return if the current character is alphanumeric or _.

---
## globidentifier
```python
from math2html import globidentifier
```

Glob alphanumeric and _ symbols.

---
## isvalue
```python
from math2html import isvalue
```

Return if the current character is a value character:

---
## globvalue
```python
from math2html import globvalue
```

Glob a value: any symbols but brackets.

---
## skipspace
```python
from math2html import skipspace
```

Skip all whitespace at current position.

---
## globincluding
```python
from math2html import globincluding
```

Glob a bit of text up to (including) the magic char.

---
## globexcluding
```python
from math2html import globexcluding
```

Glob a bit of text up until (excluding) any excluded character.

---
## pushending
```python
from math2html import pushending
```

Push a new ending to the bottom

---
## popending
```python
from math2html import popending
```

Pop the ending found at the current position

---
## nextending
```python
from math2html import nextending
```

Return the next ending in the queue.

---
## add
```python
from math2html import add
```

Add any kind of formula bit already processed

---
## pickpending
```python
from math2html import pickpending
```

Pick any pending endings from a parse position.

---
## checkin
```python
from math2html import checkin
```

Check for the ending

---
## pop
```python
from math2html import pop
```

Remove the ending at the current position

---
## findending
```python
from math2html import findending
```

Find the ending at the current position

---
## checkpending
```python
from math2html import checkpending
```

Check if there are any pending endings

---
## skip
```python
from math2html import skip
```

Skip a string of characters.

---
## identifier
```python
from math2html import identifier
```

Return a sample of the remaining text.

---
## checkforlower
```python
from math2html import checkforlower
```

Check for a string in lower case.

---
## __next__
```python
from math2html import __next__
```

Advance the position and return the next character.

---
## checkskip
```python
from math2html import checkskip
```

Check for a string at the given position; if there, skip it

---
## escape
```python
from math2html import escape
```

Escape a line with replacements from a map

---
## escapeentities
```python
from math2html import escapeentities
```

Escape all Unicode characters to HTML entities.

---
## searchall
```python
from math2html import searchall
```

Search for all embedded containers of a given type

---
## searchremove
```python
from math2html import searchremove
```

Search for all containers of a type and remove them

---
## searchprocess
```python
from math2html import searchprocess
```

Search for elements of a given type and process them

---
## locateprocess
```python
from math2html import locateprocess
```

Search for all embedded containers and process them

---
## recursivesearch
```python
from math2html import recursivesearch
```

Perform a recursive search in the container.

---
## extracttext
```python
from math2html import extracttext
```

Return all text.

---
## group
```python
from math2html import group
```

Group some adjoining elements into a group

---
## remove
```python
from math2html import remove
```

Remove a container but leave its contents

---
## tree
```python
from math2html import tree
```

Show in a tree

---
## getparameter
```python
from math2html import getparameter
```

Get the value of a parameter, if present.

---
## getparameterlist
```python
from math2html import getparameterlist
```

Get the value of a comma-separated parameter as a list.

---
## hasemptyoutput
```python
from math2html import hasemptyoutput
```

Check if the parent's output is empty.

---
## replacespecial
```python
from math2html import replacespecial
```

Replace all special chars from a line

---
## changeline
```python
from math2html import changeline
```



---
## parsetype
```python
from math2html import parsetype
```

Parse the given type and return it.

---
## parseformula
```python
from math2html import parseformula
```

Parse a string of text that contains a whole formula.

---
## parsesingleliner
```python
from math2html import parsesingleliner
```

Parse a formula in one line

---
## parsemultiliner
```python
from math2html import parsemultiliner
```

Parse a formula in multiple lines

---
## setfactory
```python
from math2html import setfactory
```

Set the internal formula factory.

---
## skiporiginal
```python
from math2html import skiporiginal
```

Skip a string and add it to the original formula

---
## computesize
```python
from math2html import computesize
```

Compute the size of the constant: always 1.

---
## constant
```python
from math2html import constant
```

Set the constant and the tag

---
## complete
```python
from math2html import complete
```

Set the constant and the tag

---
## selfcomplete
```python
from math2html import selfcomplete
```

Set the self-closing tag, no contents (as in <hr/>).

---
## detect
```python
from math2html import detect
```

Find the symbol

---
## parsebit
```python
from math2html import parsebit
```

Parse a function with [] and {} parameters

---
## addsymbol
```python
from math2html import addsymbol
```

Add a symbol

---
## parsetext
```python
from math2html import parsetext
```

Parse a text parameter.

---
## parseliteral
```python
from math2html import parseliteral
```

Parse a literal bracket.

---
## parsecomplete
```python
from math2html import parsecomplete
```

Parse the start and end marks

---
## innerformula
```python
from math2html import innerformula
```

Parse a whole formula inside the bracket

---
## innertext
```python
from math2html import innertext
```

Parse some text inside the bracket, following textual rules.

---
## innerliteral
```python
from math2html import innerliteral
```

Parse a literal inside the bracket, which does not generate HTML.

---
## processcontents
```python
from math2html import processcontents
```

Process the contents of a formula bit.

---
## processinsides
```python
from math2html import processinsides
```

Process the insides (limits, brackets) in a formula bit.

---
## traversewhole
```python
from math2html import traversewhole
```

Traverse over the contents to alter variables and space units.

---
## traverse
```python
from math2html import traverse
```

Traverse a formula and yield a flattened structure of (bit, list) pairs.

---
## italicize
```python
from math2html import italicize
```

Italicize the given bit of text.

---
## classic
```python
from math2html import classic
```

Make the contents using classic output generation with XHTML and CSS.

---
## parsedollarinline
```python
from math2html import parsedollarinline
```

Parse a $...$ formula.

---
## parsedollarblock
```python
from math2html import parsedollarblock
```

Parse a $$...$$ formula.

---
## parsedollar
```python
from math2html import parsedollar
```

Parse to the next $.

---
## parseinlineto
```python
from math2html import parseinlineto
```

Parse a \(...\) formula.

---
## parseblockto
```python
from math2html import parseblockto
```

Parse a \[...\] formula.

---
## parseupto
```python
from math2html import parseupto
```

Parse a formula that ends with the given command.

---
## detecttype
```python
from math2html import detecttype
```

Detect a bit of a given type.

---
## instance
```python
from math2html import instance
```

Get an instance of the given type.

---
## clearskipped
```python
from math2html import clearskipped
```

Clear any skipped types.

---
## skipany
```python
from math2html import skipany
```

Skip any skipped types.

---
## parseany
```python
from math2html import parseany
```

Parse any formula bit at the current location.

---
## parsewithcommand
```python
from math2html import parsewithcommand
```

Parse the command type once we have the command.

---
## parsecommandtype
```python
from math2html import parsecommandtype
```

Parse a given command type.

---
## extractcommand
```python
from math2html import extractcommand
```

Extract the command from the current position.

---
## emptycommand
```python
from math2html import emptycommand
```

Check for an empty command: look for command disguised as ending.
Special case against '{ \{ \} }' situation.

---
## parseupgreek
```python
from math2html import parseupgreek
```

Parse the Greek \up command..

---
## setcommand
```python
from math2html import setcommand
```

Set the command in the bit

---
## parsesquare
```python
from math2html import parsesquare
```

Parse a square bracket

---
## parsesquareliteral
```python
from math2html import parsesquareliteral
```

Parse a square bracket literally.

---
## simplifyifpossible
```python
from math2html import simplifyifpossible
```

Try to simplify to a single character.

---
## getpiece
```python
from math2html import getpiece
```

Return the nth piece for the bracket.

---
## getpiece1
```python
from math2html import getpiece1
```

Return the only piece for a single-piece bracket.

---
## getpiece3
```python
from math2html import getpiece3
```

Get the nth piece for a 3-piece bracket: parenthesis or square bracket.

---
## getpiece4
```python
from math2html import getpiece4
```

Get the nth piece for a 4-piece bracket: curly bracket.

---
## getcell
```python
from math2html import getcell
```

Get the bracket piece as an array cell.

---
## getcontents
```python
from math2html import getcontents
```

Get the bracket as an array or as a single bracket.

---
## getsinglebracket
```python
from math2html import getsinglebracket
```

Return the bracket as a single sign.

---
## setalignment
```python
from math2html import setalignment
```



---
## setalignments
```python
from math2html import setalignments
```



---
## createcell
```python
from math2html import createcell
```

Create the cell that corresponds to the given index.

---
## parserows
```python
from math2html import parserows
```

Parse all rows, finish when no more row ends

---
## iteraterows
```python
from math2html import iteraterows
```

Iterate over all rows, end when no more row ends

---
## addempty
```python
from math2html import addempty
```

Add an empty row.

---
## addrow
```python
from math2html import addrow
```

Add a row to the contents and to the list of rows.

---
## parsealignments
```python
from math2html import parsealignments
```

Parse the different alignments

---
## findbit
```python
from math2html import findbit
```

Find the command bit corresponding to the \begin{piece}

---
## parsesingleparameter
```python
from math2html import parsesingleparameter
```

Parse a parameter, or a single letter.

---
## checklimits
```python
from math2html import checklimits
```

Check if the current position has a limits command.

---
## limitsahead
```python
from math2html import limitsahead
```

Limit the current element based on the next.

---
## modifylimits
```python
from math2html import modifylimits
```

Modify a limits commands so that the limits appear above and below.

---
## getlimit
```python
from math2html import getlimit
```

Get the limit for a limits command.

---
## modifyscripts
```python
from math2html import modifyscripts
```

Modify the super- and subscript to appear vertically aligned.

---
## checkscript
```python
from math2html import checkscript
```

Check if the current element is a sub- or superscript.

---
## checkcommand
```python
from math2html import checkcommand
```

Check for the given type as the current element.

---
## getscript
```python
from math2html import getscript
```

Get the sub- or superscript.

---
## processleft
```python
from math2html import processleft
```

Process a left bracket.

---
## checkleft
```python
from math2html import checkleft
```

Check if the command at the given index is left.

---
## checkright
```python
from math2html import checkright
```

Check if the command at the given index is right.

---
## checkdirection
```python
from math2html import checkdirection
```

Check if the given bit is the desired bracket command.

---
## findright
```python
from math2html import findright
```

Find the right bracket starting at the given index, or 0.

---
## findmax
```python
from math2html import findmax
```

Find the max size of the contents between the two given indices.

---
## resize
```python
from math2html import resize
```

Resize a bracket command to the given size.

---
## read
```python
from math2html import read
```

Read the parameter itself using the definition.

---
## readparams
```python
from math2html import readparams
```

Read the params according to the template.

---
## paramdefs
```python
from math2html import paramdefs
```

Read each param definition in the template

---
## getparam
```python
from math2html import getparam
```

Get a parameter as parsed.

---
## getvalue
```python
from math2html import getvalue
```

Get the value of a parameter.

---
## getliteralvalue
```python
from math2html import getliteralvalue
```

Get the literal value of a parameter.

---
## writeparams
```python
from math2html import writeparams
```

Write all params according to the template

---
## writepos
```python
from math2html import writepos
```

Write all params as read in the parse position.

---
## writeparam
```python
from math2html import writeparam
```

Write a single param of the form $0, $x...

---
## writefunction
```python
from math2html import writefunction
```

Write a single function f0,...,fn.

---
## readtag
```python
from math2html import readtag
```

Get the tag corresponding to the given index. Does parameter substitution.

---
## writebracket
```python
from math2html import writebracket
```

Return a new bracket looking at the given direction.

---
## computehybridsize
```python
from math2html import computehybridsize
```

Compute the size of the hybrid function.

---
## getsize
```python
from math2html import getsize
```

Read the size for a function and parse it.

---
## MathError
```python
from __init__ import MathError
```

Exception for math syntax and math conversion errors.

The additional attribute `details` may hold a list of Docutils
nodes suitable as children for a ``<system_message>``.

---
## toplevel_code
```python
from __init__ import toplevel_code
```

Return string (LaTeX math) `code` with environments stripped out.

---
## pick_math_environment
```python
from __init__ import pick_math_environment
```

Return the right math environment to display `code`.

The test simply looks for line-breaks (``\``) outside environments.
Multi-line formulae are set with ``align``, one-liners with
``equation``.

If `numbered` evaluates to ``False``, the "starred" versions are used
to suppress numbering.

---
## wrap_math_code
```python
from __init__ import wrap_math_code
```



---
## __name__
```python
from tex2mathml_extern import __name__
```

Wrappers for TeX->MathML conversion by external tools

This module is provisional:
the API is not settled and may change with any minor Docutils version.

---
## _check_result
```python
from tex2mathml_extern import _check_result
```



---
## blahtexml
```python
from tex2mathml_extern import blahtexml
```

Convert LaTeX math code to MathML with blahtexml__.

__ http://gva.noekeon.org/blahtexml/

---
## latexml
```python
from tex2mathml_extern import latexml
```

Convert LaTeX math code to MathML with LaTeXML__.

Comprehensive macro support but **very** slow.

__ http://dlmf.nist.gov/LaTeXML/

---
## pandoc
```python
from tex2mathml_extern import pandoc
```

Convert LaTeX math code to MathML with pandoc__.

__ https://pandoc.org/

---
## ttm
```python
from tex2mathml_extern import ttm
```

Convert LaTeX math code to MathML with TtM__.

Aged, limited, but fast.

__ http://silas.psfc.mit.edu/tth/mml/

---
## __name__
```python
from mathalphabet2unichar import __name__
```



---
## __name__
```python
from mathml_elements import __name__
```

MathML element classes based on `xml.etree`.

The module is intended for programmatic generation of MathML
and covers the part of `MathML Core`_ that is required by
Docutil's *TeX math to MathML* converter.

This module is PROVISIONAL:
the API is not settled and may change with any minor Docutils version.

.. _MathML Core: https://www.w3.org/TR/mathml-core/

---
## MathElement
```python
from mathml_elements import MathElement
```

Base class for MathML elements.

---
## MathRow
```python
from mathml_elements import MathRow
```

Base class for elements treating content as a single mrow.

---
## MathSchema
```python
from mathml_elements import MathSchema
```

Base class for schemata expecting 2 or more children.

The special attribute `switch` indicates that the last two child
elements are in reversed order and must be switched before XML-export.
See `msub` for an example.

---
## MathToken
```python
from mathml_elements import MathToken
```

Token Element: contains textual data instead of children.

Expect text data on initialisation.

---
## math
```python
from mathml_elements import math
```

Top-level MathML element, a single mathematical formula.

---
## mtext
```python
from mathml_elements import mtext
```

Arbitrary text with no notational meaning.

---
## mi
```python
from mathml_elements import mi
```

Identifier, such as a function name, variable or symbolic constant.

---
## mn
```python
from mathml_elements import mn
```

Numeric literal.

>>> mn(3.41).toxml()
'<mn>3.41</mn>'

Normally a sequence of digits with a possible separator (a dot or a comma).
(Values with comma must be specified as `str`.)

---
## mo
```python
from mathml_elements import mo
```

Operator, Fence, Separator, or Accent.

>>> mo('<').toxml()
'<mo>&lt;</mo>'

Besides operators in strict mathematical meaning, this element also
includes "operators" like parentheses, separators like comma and
semicolon, or "absolute value" bars.

---
## mspace
```python
from mathml_elements import mspace
```

Blank space, whose size is set by its attributes.

Takes additional attributes `depth`, `height`, `width`.
Takes no children and no text.

See also `mphantom`.

---
## mrow
```python
from mathml_elements import mrow
```

Generic element to group children as a horizontal row.

Removed on closing if not required (see `mrow.close()`).

---
## mfrac
```python
from mathml_elements import mfrac
```

Fractions or fraction-like objects such as binomial coefficients.

---
## msqrt
```python
from mathml_elements import msqrt
```

Square root. See also `mroot`.

---
## mroot
```python
from mathml_elements import mroot
```

Roots with an explicit index. See also `msqrt`.

---
## mstyle
```python
from mathml_elements import mstyle
```

Style Change.

In modern browsers, <mstyle> is equivalent to an <mrow> element.
However, <mstyle> may still be relevant for compatibility with
MathML implementations outside browsers.

---
## merror
```python
from mathml_elements import merror
```

Display contents as error messages.

---
## menclose
```python
from mathml_elements import menclose
```

Renders content inside an enclosing notation...

... specified by the notation attribute.

Non-standard but still required by Firefox for boxed expressions.

---
## mpadded
```python
from mathml_elements import mpadded
```

Adjust space around content.

---
## mphantom
```python
from mathml_elements import mphantom
```

Placeholder: Rendered invisibly but dimensions are kept.

---
## msub
```python
from mathml_elements import msub
```

Attach a subscript to an expression.

---
## msup
```python
from mathml_elements import msup
```

Attach a superscript to an expression.

---
## msubsup
```python
from mathml_elements import msubsup
```

Attach both a subscript and a superscript to an expression.

---
## munder
```python
from mathml_elements import munder
```

Attach an accent or a limit under an expression.

---
## mover
```python
from mathml_elements import mover
```

Attach an accent or a limit over an expression.

---
## munderover
```python
from mathml_elements import munderover
```

Attach accents or limits both under and over an expression.

---
## mtable
```python
from mathml_elements import mtable
```

Table or matrix element.

---
## mtr
```python
from mathml_elements import mtr
```

Row in a table or a matrix.

---
## mtd
```python
from mathml_elements import mtd
```

Cell in a table or a matrix

---
## __init__
```python
from mathml_elements import __init__
```



---
## a_str
```python
from mathml_elements import a_str
```



---
## __repr__
```python
from mathml_elements import __repr__
```

Return full string representation.

---
## __str__
```python
from mathml_elements import __str__
```

Return concise, informal string representation.

---
## set
```python
from mathml_elements import set
```



---
## __setitem__
```python
from mathml_elements import __setitem__
```



---
## is_full
```python
from mathml_elements import is_full
```

Return boolean indicating whether children may be appended.

---
## close
```python
from mathml_elements import close
```

Close element and return first non-full anchestor or None.

Remove <mrow> if it has only one child element.

---
## append
```python
from mathml_elements import append
```

Append element. Normalize order and close if full.

---
## extend
```python
from mathml_elements import extend
```

Sequentially append `elements`. Return new "current node".

Raise TypeError if overfull.

---
## pop
```python
from mathml_elements import pop
```



---
## in_block
```python
from mathml_elements import in_block
```

Return True, if `self` or an ancestor has ``display='block'``.

Used to find out whether we are in inline vs. displayed maths.

---
## indent_xml
```python
from mathml_elements import indent_xml
```

Format XML output with indents.

Use with care:
  Formatting whitespace is permanently added to the
  `text` and `tail` attributes of `self` and anchestors!

---
## unindent_xml
```python
from mathml_elements import unindent_xml
```

Strip whitespace at the end of `text` and `tail` attributes...

to revert changes made by the `indent_xml()` method.
Use with care, trailing whitespace from the original may be lost.

---
## toxml
```python
from mathml_elements import toxml
```

Return an XML representation of the element.

By default, the return value is a `str` instance. With an explicit
`encoding` argument, the result is a `bytes` instance in the
specified encoding. The XML default encoding is UTF-8, any other
encoding must be specified in an XML document header.

Name and encoding handling match `xml.dom.minidom.Node.toxml()`
while `etree.Element.tostring()` returns `bytes` by default.

---
## transfer_attributes
```python
from mathml_elements import transfer_attributes
```

Transfer attributes from self to other.

"List values" (class, style) are appended to existing values,
other values replace existing values.

---
## EachItem
```python
from __init__ import EachItem
```

Custom railroad item to compose a:
- Group containing a
  - OneOrMore containing a
    - Choice of the elements in the Each
with the group label indicating that all must be matched

---
## AnnotatedItem
```python
from __init__ import AnnotatedItem
```

Simple subclass of Group that creates an annotation label

---
## EditablePartial
```python
from __init__ import EditablePartial
```

Acts like a functools.partial, but can be edited. In other words, it represents a type that hasn't yet been
constructed.

---
## railroad_to_html
```python
from __init__ import railroad_to_html
```

Given a list of NamedDiagram, produce a single HTML string that visualises those diagrams
:params kwargs: kwargs to be passed in to the template

---
## resolve_partial
```python
from __init__ import resolve_partial
```

Recursively resolves a collection of Partials into whatever type they are

---
## to_railroad
```python
from __init__ import to_railroad
```

Convert a pyparsing element tree into a list of diagrams. This is the recommended entrypoint to diagram
creation if you want to access the Railroad tree before it is converted to HTML
:param element: base element of the parser being diagrammed
:param diagram_kwargs: kwargs to pass to the Diagram() constructor
:param vertical: (optional) - int - limit at which number of alternatives should be
   shown vertically instead of horizontally
:param show_results_names - bool to indicate whether results name annotations should be
   included in the diagram
:param show_groups - bool to indicate whether groups should be highlighted with an unlabeled
   surrounding box

---
## _should_vertical
```python
from __init__ import _should_vertical
```

Returns true if we should return a vertical list of elements

---
## ElementState
```python
from __init__ import ElementState
```

State recorded for an individual pyparsing Element

---
## ConverterState
```python
from __init__ import ConverterState
```

Stores some state that persists between recursions into the element tree

---
## _worth_extracting
```python
from __init__ import _worth_extracting
```

Returns true if this element is worth having its own sub-diagram. Simply, if any of its children
themselves have children, then its complex enough to extract

---
## _apply_diagram_item_enhancements
```python
from __init__ import _apply_diagram_item_enhancements
```

decorator to ensure enhancements to a diagram item (such as results name annotations)
get applied on return from _to_diagram_element (we do this since there are several
returns in _to_diagram_element)

---
## _visible_exprs
```python
from __init__ import _visible_exprs
```



---
## _to_diagram_element
```python
from __init__ import _to_diagram_element
```

Recursively converts a PyParsing Element to a railroad Element
:param lookup: The shared converter state that keeps track of useful things
:param index: The index of this element within the parent
:param parent: The parent of this element in the output tree
:param vertical: Controls at what point we make a list of elements vertical. If this is an integer (the default),
it sets the threshold of the number of items before we go vertical. If True, always go vertical, if False, never
do so
:param name_hint: If provided, this will override the generated name
:param show_results_names: bool flag indicating whether to add annotations for results names
:returns: The converted version of the input element, but as a Partial that hasn't yet been constructed
:param show_groups: bool flag indicating whether to show groups using bounding box

---
## from_call
```python
from __init__ import from_call
```

If you call this function in the same way that you would call the constructor, it will store the arguments
as you expect. For example EditablePartial.from_call(Fraction, 1, 3)() == Fraction(1, 3)

---
## mark_for_extraction
```python
from __init__ import mark_for_extraction
```

Called when this instance has been seen twice, and thus should eventually be extracted into a sub-diagram
:param el_id: id of the element
:param state: element/diagram state tracker
:param name: name to use for this element's text
:param force: If true, force extraction now, regardless of the state of this. Only useful for extracting the
root element when we know we're finished

---
## generate_unnamed
```python
from __init__ import generate_unnamed
```

Generate a number used in the name of an otherwise unnamed diagram

---
## generate_index
```python
from __init__ import generate_index
```

Generate a number used to index a diagram

---
## extract_into_diagram
```python
from __init__ import extract_into_diagram
```

Used when we encounter the same token twice in the same tree. When this
happens, we replace all instances of that token with a terminal, and
create a new subdiagram for the token

---
## _inner
```python
from __init__ import _inner
```



---
## __name__
```python
from test import __name__
```



---
## __name__
```python
from test2 import __name__
```

>>> import os
>>> import random
>>> from art import *
>>> font_list(mode="non-ascii")
akila :
ŦЄ$Ŧ
<BLANKLINE>
alissa :
ꞎᥱടꞎ
<BLANKLINE>
antrophobia :
тєѕт
<BLANKLINE>
ascii_roman :
τεsτ
<BLANKLINE>
atlantic :
ϯεςϯ
<BLANKLINE>
awa :
тєѕт
<BLANKLINE>
awcute :
téśt
<BLANKLINE>
awesome :
тεƨт
<BLANKLINE>
ayda :
Ť∈ᏕŤ
<BLANKLINE>
batman :
էεรէ
<BLANKLINE>
bianca :
եɛsե
<BLANKLINE>
black_bubble :
🅣🅔🅢🅣
<BLANKLINE>
black_square :
🆃🅴🆂🆃
<BLANKLINE>
bold_fraktur :
𝖙𝖊𝖘𝖙
<BLANKLINE>
bold_script :
𝓽𝓮𝓼𝓽
<BLANKLINE>
boom :
✞ɛֆ✞
<BLANKLINE>
bud1 :
tོeོsོtོ
<BLANKLINE>
bud2 :
tཽeཽsཽtཽ
<BLANKLINE>
callian :
ŧɇsŧ
<BLANKLINE>
carrier1 :
TᕮST
<BLANKLINE>
carrier2 :
TᙓST
<BLANKLINE>
celtic :
էεʂէ
<BLANKLINE>
chinese_mafia :
丁乇丂丁
<BLANKLINE>
cjk :
イモらイ
<BLANKLINE>
contouring1 :
ⓣⓔⓢⓣ
<BLANKLINE>
contouring2 :
⒯⒠⒮⒯
<BLANKLINE>
contouring3 :
[̲̅t][̲̅e][̲̅s][̲̅t]
<BLANKLINE>
contouring4 :
(̲̅t)(̲̅e)(̲̅s)(̲̅t)
<BLANKLINE>
cool :
Ꮏ𐒢ᎴᎿ
<BLANKLINE>
coptic1 :
ⲧⲉ⳽ⲧ
<BLANKLINE>
coptic2 :
ⲧⲉ⳽ⲧ
<BLANKLINE>
cranky :
†εš†
<BLANKLINE>
crazy1 :
ɬєʂɬ
<BLANKLINE>
crazy2 :
☂€ⓢ☂
<BLANKLINE>
crazy3 :
Ƭ៩នƬ
<BLANKLINE>
cross_jesus :
†ҽŞ†
<BLANKLINE>
cruse :
ᖶᘿSᖶ
<BLANKLINE>
curly :
էҽʂէ
<BLANKLINE>
currency :
₮Ɇ₴₮
<BLANKLINE>
cute1 :
ƭєƨƭ
<BLANKLINE>
cute2 :
ƭҽʂƭ
<BLANKLINE>
cute3 :
եҽsե
<BLANKLINE>
dark_tattoo :
𝔱𝔢𝔰𝔱
<BLANKLINE>
dirty :
ẗệṩẗ
<BLANKLINE>
dirty2 :
ẗệṩẗ
<BLANKLINE>
dotted :
ẗëṡẗ
<BLANKLINE>
drako :
ϮꂅᏕϮ
<BLANKLINE>
drippy :
ȶᵉˢȶ
<BLANKLINE>
dwarf :
ᵗᵉˢᵗ
<BLANKLINE>
emoji :
🌴🎗💲🌴
<BLANKLINE>
fancy1 :
тεsт
<BLANKLINE>
fancy10 :
ɬɛʂɬ
<BLANKLINE>
fancy100 :
꓄ꏂꇙ꓄
<BLANKLINE>
fancy101 :
tᥱ⳽t
<BLANKLINE>
fancy102 :
ΓESΓ
<BLANKLINE>
fancy103 :
tẹṣt
<BLANKLINE>
fancy104 :
ƮᙓᔑƮ
<BLANKLINE>
fancy105 :
тešт
<BLANKLINE>
fancy106 :
ʈɛsʈ
<BLANKLINE>
fancy107 :
τεsτ
<BLANKLINE>
fancy108 :
ƚЄ$ƚ
<BLANKLINE>
fancy109 :
ᴛᴇꜱᴛ
<BLANKLINE>
fancy11 :
ՇєรՇ
<BLANKLINE>
fancy110 :
ₜₑₛₜ
<BLANKLINE>
fancy111 :
ᵗᵉˢᵗ
<BLANKLINE>
fancy112 :
тєѕт
<BLANKLINE>
fancy113 :
էҽʂէ
<BLANKLINE>
fancy114 :
≋t≋e≋s≋t
<BLANKLINE>
fancy115 :
░t░e░s░t
<BLANKLINE>
fancy116 :
Ⲅ𐒢ᎴⲄ
<BLANKLINE>
fancy117 :
ᏖᏋ𐒡Ꮦ
<BLANKLINE>
fancy118 :
ᏖᏋᏕᏖ
<BLANKLINE>
fancy119 :
ᎿᏋᎴᎿ
<BLANKLINE>
fancy12 :
tєѕt
<BLANKLINE>
fancy120 :
Ŧ€ŞŦ
<BLANKLINE>
fancy121 :
₮€$₮
<BLANKLINE>
fancy122 :
tєรt
<BLANKLINE>
fancy123 :
੮૯ς੮
<BLANKLINE>
fancy124 :
ŤẸŜŤ
<BLANKLINE>
fancy125 :
ţέşţ
<BLANKLINE>
fancy126 :
ƭɛֆƭ
<BLANKLINE>
fancy127 :
꓄ꍟꌗ꓄
<BLANKLINE>
fancy128 :
ԵȝՏԵ
<BLANKLINE>
fancy129 :
ｲ乇丂ｲ
<BLANKLINE>
fancy13 :
tєรt
<BLANKLINE>
fancy130 :
𐨠𐌴Ⲋ𐨠
<BLANKLINE>
fancy131 :
ᵗᵉˢᵗ
<BLANKLINE>
fancy132 :
𝕥𝕖𝕤𝕥
<BLANKLINE>
fancy133 :
𝙩𝙚𝙨𝙩
<BLANKLINE>
fancy134 :
𝒕𝒆𝒔𝒕
<BLANKLINE>
fancy135 :
𝐭𝐞𝐬𝐭
<BLANKLINE>
fancy136 :
𝘁𝗲𝘀𝘁
<BLANKLINE>
fancy137 :
𝖙𝖊𝖘𝖙
<BLANKLINE>
fancy138 :
𝓉ℯ𝓈𝓉
<BLANKLINE>
fancy139 :
𝓽𝓮𝓼𝓽
<BLANKLINE>
fancy14 :
ȶɛֆȶ
<BLANKLINE>
fancy140 :
ⲧⲉ𝛓ⲧ
<BLANKLINE>
fancy141 :
ｔｅｓｔ
<BLANKLINE>
fancy142 :
🅃🄴🅂🅃
<BLANKLINE>
fancy143 :
🆃🅴🆂🆃
<BLANKLINE>
fancy144 :
🅣🅔🅢🅣
<BLANKLINE>
fancy145 :
ⓣⓔⓢⓣ
<BLANKLINE>
fancy146 :
セ🝗丂セ
<BLANKLINE>
fancy147 :
ƚҽʂƚ
<BLANKLINE>
fancy148 :
𝚝ₑ𝘴𝚝
<BLANKLINE>
fancy15 :
✞ƎƧ✞
<BLANKLINE>
fancy16 :
ΓΞSΓ
<BLANKLINE>
fancy17 :
ᏆɛֆᏆ
<BLANKLINE>
fancy18 :
ԵҽՏԵ
<BLANKLINE>
fancy19 :
꓄ꍟꌗ꓄
<BLANKLINE>
fancy2 :
ㄒ乇丂ㄒ
<BLANKLINE>
fancy20 :
ᵀᴱˢᵀ
<BLANKLINE>
fancy21 :
тeѕт
<BLANKLINE>
fancy22 :
ŤƐらŤ
<BLANKLINE>
fancy23 :
ƬЄƧƬ
<BLANKLINE>
fancy24 :
ϮꂅᏕϮ
<BLANKLINE>
fancy25 :
ｲ乇丂ｲ
<BLANKLINE>
fancy26 :
†εš†
<BLANKLINE>
fancy27 :
tēŞt
<BLANKLINE>
fancy28 :
ƬΣƧƬ
<BLANKLINE>
fancy29 :
†ê§†
<BLANKLINE>
fancy3 :
ŤĔŚŤ
<BLANKLINE>
fancy30 :
ᖶᘿSᖶ
<BLANKLINE>
fancy31 :
ནპჰན
<BLANKLINE>
fancy32 :
꓄ꏂꑄ꓄
<BLANKLINE>
fancy33 :
꓅ꍟꌚ꓅
<BLANKLINE>
fancy34 :
ꋖꈼꌚꋖ
<BLANKLINE>
fancy35 :
੮૯ς੮
<BLANKLINE>
fancy36 :
ԵȝՏԵ
<BLANKLINE>
fancy37 :
ꋖꏹꌚꋖ
<BLANKLINE>
fancy38 :
ꋖꑀꈜꋖ
<BLANKLINE>
fancy39 :
ፕቿነፕ
<BLANKLINE>
fancy4 :
ᏆᎬsᏆ
<BLANKLINE>
fancy40 :
꓅ꑾꇘ꓅
<BLANKLINE>
fancy41 :
ț£§ț
<BLANKLINE>
fancy42 :
ţ€$ţ
<BLANKLINE>
fancy43 :
ᖶᙍSᖶ
<BLANKLINE>
fancy44 :
тεƨт
<BLANKLINE>
fancy45 :
тešт
<BLANKLINE>
fancy46 :
էεʂէ
<BLANKLINE>
fancy47 :
†ε$†
<BLANKLINE>
fancy48 :
էεรէ
<BLANKLINE>
fancy49 :
τεЅτ
<BLANKLINE>
fancy5 :
ᏖᏋᏕᏖ
<BLANKLINE>
fancy50 :
ҭἔṩҭ
<BLANKLINE>
fancy52 :
τEŠτ
<BLANKLINE>
fancy53 :
ƮęsƮ
<BLANKLINE>
fancy54 :
⊥ÈS⊥
<BLANKLINE>
fancy55 :
t€$t
<BLANKLINE>
fancy56 :
𝐭𝐞𝐬𝐭
<BLANKLINE>
fancy57 :
𝚝𝚎𝚜𝚝
<BLANKLINE>
fancy58 :
𝖙𝖊𝖘𝖙
<BLANKLINE>
fancy59 :
𝕥𝕖𝕤𝕥
<BLANKLINE>
fancy6 :
ƭεรƭ
<BLANKLINE>
fancy60 :
𝘁𝗲𝘀𝘁
<BLANKLINE>
fancy61 :
𝑡𝑒𝑠𝑡
<BLANKLINE>
fancy62 :
𝘵𝘦𝘴𝘵
<BLANKLINE>
fancy63 :
𝒕𝒆𝒔𝒕
<BLANKLINE>
fancy64 :
𝙩𝙚𝙨𝙩
<BLANKLINE>
fancy65 :
𝓉𝑒𝓈𝓉
<BLANKLINE>
fancy66 :
𝓽𝒆𝓼𝓽
<BLANKLINE>
fancy67 :
ｔｅｓｔ
<BLANKLINE>
fancy68 :
𝔱𝔢𝔰𝔱
<BLANKLINE>
fancy69 :
ᵗᵉᶳᵗ
<BLANKLINE>
fancy7 :
丅ᗴᔕ丅
<BLANKLINE>
fancy70 :
тeѕт
<BLANKLINE>
fancy71 :
тєѕт
<BLANKLINE>
fancy72 :
тєѕт
<BLANKLINE>
fancy73 :
ŧêšŧ
<BLANKLINE>
fancy74 :
ŧεşŧ
<BLANKLINE>
fancy75 :
ｲ乇ㄎｲ
<BLANKLINE>
fancy76 :
էҽʂէ
<BLANKLINE>
fancy77 :
ƚҽʂƚ
<BLANKLINE>
fancy78 :
tєรt
<BLANKLINE>
fancy79 :
†εš†
<BLANKLINE>
fancy8 :
tєรt
<BLANKLINE>
fancy80 :
ƭєƨƭ
<BLANKLINE>
fancy81 :
ƚЄ$ƚ
<BLANKLINE>
fancy82 :
Ŧ£ŞŦ
<BLANKLINE>
fancy83 :
τεȘτ
<BLANKLINE>
fancy84 :
tΞst
<BLANKLINE>
fancy85 :
ťĕʂť
<BLANKLINE>
fancy86 :
ᴛᴇsᴛ
<BLANKLINE>
fancy87 :
𝓽𝓮𝓼𝓽
<BLANKLINE>
fancy88 :
tᥱst
<BLANKLINE>
fancy89 :
𝗍𝖾𝗌𝗍
<BLANKLINE>
fancy9 :
тeѕт
<BLANKLINE>
fancy90 :
𝑡𝑒𝑠𝑡
<BLANKLINE>
fancy91 :
𝒕𝒆𝒔𝒕
<BLANKLINE>
fancy92 :
𝙩𝙚𝙨𝙩
<BLANKLINE>
fancy93 :
𝘵𝘦𝘴𝘵
<BLANKLINE>
fancy94 :
𝓉𝑒𝓈𝓉
<BLANKLINE>
fancy95 :
𝔱𝔢𝔰𝔱
<BLANKLINE>
fancy96 :
tᥱ⳽t
<BLANKLINE>
fancy97 :
тεѕт
<BLANKLINE>
fancy98 :
τεsτ
<BLANKLINE>
fancy99 :
тeѕт
<BLANKLINE>
fantasy2 :
ᡶꫀకᡶ
<BLANKLINE>
fari :
『t』『e』『s』『t』
<BLANKLINE>
fasion :
ŧεşŧ
<BLANKLINE>
flaky :
丅ᗴᔕ丅
<BLANKLINE>
flip :
ϝԍƨϝ
<BLANKLINE>
foreign_friends :
ṭєṡṭ
<BLANKLINE>
foxy :
ｔｅｓｔ
<BLANKLINE>
fraktur2 :
𝔱𝔢𝔰𝔱
<BLANKLINE>
full_width :
ｔｅｓｔ
<BLANKLINE>
funky_fresh :
тḙṧт
<BLANKLINE>
got :
ＴＥＳＴ
<BLANKLINE>
greek_legends :
TΣST
<BLANKLINE>
handwriting1 :
𝓉𝑒𝓈𝓉
<BLANKLINE>
handwriting2 :
ƚҽʂƚ
<BLANKLINE>
handwriting3 :
𝓉𝑒𝓈𝓉
<BLANKLINE>
hazy :
ŤƐらŤ
<BLANKLINE>
high_above :
ᵗᵉˢᵗ
<BLANKLINE>
hippie :
⊥ε﹩⊥
<BLANKLINE>
hyves :
t€$t
<BLANKLINE>
instagram :
🅣🅔🅢🅣
<BLANKLINE>
kesia :
TΣST
<BLANKLINE>
knight :
ṮḕṠṮ
<BLANKLINE>
knight2 :
ṮḕṠṮ
<BLANKLINE>
laurine :
ŤƐらŤ
<BLANKLINE>
lilia :
test
<BLANKLINE>
livia :
եᥱsե
<BLANKLINE>
lolie :
тєѕт
<BLANKLINE>
lopioo :
ȶɛֆȶ
<BLANKLINE>
lord_of_the_ring :
тєѕт
<BLANKLINE>
love1 :
ƬƐSƬ
<BLANKLINE>
love2 :
тєsт
<BLANKLINE>
lucifer :
ᏆᎬsᏆ
<BLANKLINE>
malayalam :
੮૯ട੮
<BLANKLINE>
manga :
ㄒ乇丂ㄒ
<BLANKLINE>
messletters :
ᴛєѕᴛ
<BLANKLINE>
milka :
ƭҽʂƭ
<BLANKLINE>
minion :
ᴛᴇsᴛ
<BLANKLINE>
mirror :
ɈƨǝɈ
<BLANKLINE>
mirror_flip :
ʇsǝʇ
<BLANKLINE>
monospace :
𝚝𝚎𝚜𝚝
<BLANKLINE>
native_lands :
ƬꍟꌗƬ
<BLANKLINE>
ninja :
ⱦēꞩⱦ
<BLANKLINE>
old_italic :
𐌕𐌄𐌔𐌕
<BLANKLINE>
ozana :
𝙩𝒆𝙨𝙩
<BLANKLINE>
paranormal :
tєst
<BLANKLINE>
parenthesized :
⒯⒠⒮⒯
<BLANKLINE>
pin1 :
t྇e྇s྇t྇
<BLANKLINE>
pin2 :
t༙྇e༙྇s༙྇t༙྇
<BLANKLINE>
rusify :
тё$т
<BLANKLINE>
russian :
TΞST
<BLANKLINE>
russian2 :
ƬƎƧƬ
<BLANKLINE>
sarah :
ᏆℰЅᏆ
<BLANKLINE>
scammer :
těst
<BLANKLINE>
shanna :
ṬЄꕷṬ
<BLANKLINE>
shasha :
†€∫†
<BLANKLINE>
sheqi :
【t】【e】【s】【t】
<BLANKLINE>
sign :
t⃠e⃠s⃠t⃠
<BLANKLINE>
slammer :
ƮęsƮ
<BLANKLINE>
small_fancy :
ₜₑₛₜ
<BLANKLINE>
smallcaps2 :
ᴛᴇsᴛ
<BLANKLINE>
smallcaps3 :
ᴛᴇsᴛ
<BLANKLINE>
smooth1 :
тєѕт
<BLANKLINE>
smooth2 :
тєѕт
<BLANKLINE>
smooth3 :
ƚҽʂƚ
<BLANKLINE>
special :
TEᔕT
<BLANKLINE>
squiggle1 :
ԵҽsԵ
<BLANKLINE>
squiggle2 :
ԵeՏԵ
<BLANKLINE>
strange :
τεȘτ
<BLANKLINE>
strikethrough :
ŧɇsŧ
<BLANKLINE>
stylish :
ȶєᏕȶ
<BLANKLINE>
subscript1 :
ₜₑₛₜ
<BLANKLINE>
subscript2 :
𝑡ₑ𝑠𝑡
<BLANKLINE>
sunday_cuddle :
тєѕт
<BLANKLINE>
superscript :
ᵗᵉˢᵗ
<BLANKLINE>
swirly :
੮૯ς੮
<BLANKLINE>
symbols :
☂€ⓢ☂
<BLANKLINE>
tai_viet :
ꪻꫀᦓꪻ
<BLANKLINE>
tarty1 :
<BLANKLINE>
████████╗███████╗░██████╗████████╗
╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝
░░░██║░░░█████╗░░╚█████╗░░░░██║░░░
░░░██║░░░██╔══╝░░░╚═══██╗░░░██║░░░
░░░██║░░░███████╗██████╔╝░░░██║░░░
░░░╚═╝░░░╚══════╝╚═════╝░░░░╚═╝░░░
<BLANKLINE>
tarty2 :
<BLANKLINE>
▀█▀ █▀▀ █▀ ▀█▀
░█░ ██▄ ▄█ ░█░
<BLANKLINE>
<BLANKLINE>
tarty3 :
<BLANKLINE>
▀▀█▀▀ █▀▀ █▀▀ ▀▀█▀▀
──█── █▀▀ ▀▀█ ──█──
──▀── ▀▀▀ ▀▀▀ ──▀──
<BLANKLINE>
tarty4 :
<BLANKLINE>
▀▀█▀▀ █▀▀ █▀▀ ▀▀█▀▀
░░█░░ █▀▀ ▀▀█ ░░█░░
░░▀░░ ▀▀▀ ▀▀▀ ░░▀░░
<BLANKLINE>
tarty5 :
<BLANKLINE>
▜▛ █☰ ▟▛ ▜▛ 
<BLANKLINE>
tarty6 :
<BLANKLINE>
█─▄─▄─██▄─▄▄─██─▄▄▄▄██─▄─▄─█
███─█████─▄█▀██▄▄▄▄─████─███
▀▀▄▄▄▀▀▀▄▄▄▄▄▀▀▄▄▄▄▄▀▀▀▄▄▄▀▀
<BLANKLINE>
tarty7 :
<BLANKLINE>
████████████████████████████
█─▄─▄─██▄─▄▄─██─▄▄▄▄██─▄─▄─█
███─█████─▄█▀██▄▄▄▄─████─███
▀▀▄▄▄▀▀▀▄▄▄▄▄▀▀▄▄▄▄▄▀▀▀▄▄▄▀▀
<BLANKLINE>
tarty8 :
<BLANKLINE>
────────────────────────────────────────────────────────────────
─██████████████──██████████████──██████████████──██████████████─
─██░░░░░░░░░░██──██░░░░░░░░░░██──██░░░░░░░░░░██──██░░░░░░░░░░██─
─██████░░██████──██░░██████████──██░░██████████──██████░░██████─
─────██░░██──────██░░██──────────██░░██──────────────██░░██─────
─────██░░██──────██░░██████████──██░░██████████──────██░░██─────
─────██░░██──────██░░░░░░░░░░██──██░░░░░░░░░░██──────██░░██─────
─────██░░██──────██░░██████████──██████████░░██──────██░░██─────
─────██░░██──────██░░██──────────────────██░░██──────██░░██─────
─────██░░██──────██░░██████████──██████████░░██──────██░░██─────
─────██░░██──────██░░░░░░░░░░██──██░░░░░░░░░░██──────██░░██─────
─────██████──────██████████████──██████████████──────██████─────
────────────────────────────────────────────────────────────────
<BLANKLINE>
tarty9 :
<BLANKLINE>
████████████████████████████████████████████████████████████████
█░░░░░░░░░░░░░░██░░░░░░░░░░░░░░██░░░░░░░░░░░░░░██░░░░░░░░░░░░░░█
█░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░█
█░░░░░░▄▀░░░░░░██░░▄▀░░░░░░░░░░██░░▄▀░░░░░░░░░░██░░░░░░▄▀░░░░░░█
█████░░▄▀░░██████░░▄▀░░██████████░░▄▀░░██████████████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀░░░░░░░░░░██░░▄▀░░░░░░░░░░██████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░██████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀░░░░░░░░░░██░░░░░░░░░░▄▀░░██████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀░░██████████████████░░▄▀░░██████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀░░░░░░░░░░██░░░░░░░░░░▄▀░░██████░░▄▀░░█████
█████░░▄▀░░██████░░▄▀▄▀▄▀▄▀▄▀░░██░░▄▀▄▀▄▀▄▀▄▀░░██████░░▄▀░░█████
█████░░░░░░██████░░░░░░░░░░░░░░██░░░░░░░░░░░░░░██████░░░░░░█████
████████████████████████████████████████████████████████████████
<BLANKLINE>
thin2 :
ｔｅｓｔ
<BLANKLINE>
thin3 :
ｔｅｓｔ
<BLANKLINE>
tiny :
ᴛᴇᴤᴛ
<BLANKLINE>
tiny2 :
ᴛᴇꜱᴛ
<BLANKLINE>
tiny_caps :
ᴛᴇᴤᴛ
<BLANKLINE>
upside_down1 :
ʇǝsʇ
<BLANKLINE>
upside_down2 :
ʇǝsʇ
<BLANKLINE>
vaporwave :
ｔｅｓｔ
<BLANKLINE>
vip :
ƬΣƧƬ
<BLANKLINE>
white_bubble :
ⓣⓔⓢⓣ
<BLANKLINE>
white_square :
🅃🄴🅂🅃
<BLANKLINE>
wiggly :
⊥ÈS⊥
<BLANKLINE>
zakia :
Ꚍ୧ઽꚌ
<BLANKLINE>
>>> art_list(mode="non-ascii")
3
ᕙ༼ ,,ԾܫԾ,, ༽ᕗ
******************************
5
ᕙ༼ ,,இܫஇ,, ༽ᕗ
******************************
9/11 truth
✈__✈ █ █ ▄
******************************
acid
⊂(◉‿◉)つ
******************************
afraid
(　ﾟ Дﾟ)
******************************
airplane1
 ‛¯¯٭٭¯¯(▫▫)¯¯٭٭¯¯’
******************************
airplane2
✈
******************************
airplane3
✈ ✈ ———- ♒✈
******************************
ak-47
︻┳デ═—
******************************
almost cared
╰╏ ◉ 〜 ◉ ╏╯
******************************
american money2
[̲̅$̲̅(̲̅1̲̅)̲̅$̲̅]
******************************
american money3
[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]
******************************
american money4
[̲̅$̲̅(̲̅ιοο̲̅)̲̅$̲̅]
******************************
american money5
[̲̅$̲̅(̲̅2οο̲̅)̲̅$̲̅]
******************************
angry
 ლ(ಠ益ಠ)ლ
******************************
angry birds
( ఠൠఠ )ﾉ
******************************
angry face
(⋟﹏⋞)
******************************
angry face2
(╬ ಠ益ಠ)
******************************
angry troll
ヽ༼ ಠ益ಠ ༽ﾉ
******************************
angry2
( ͠° ͟ʖ ͡°)﻿
******************************
ankush
︻デ┳═ー*----*
******************************
arrow1
»»---------------------►
******************************
arrowhead
⤜(ⱺ ʖ̯ⱺ)⤏
******************************
at what cost
ლ(ಠ益ಠლ)
******************************
awkward
•͡˘㇁•͡˘
******************************
band aid
(̲̅:̲̅:̲̅:̲̅[̲̅ ̲̅]̲̅:̲̅:̲̅:̲̅ )
******************************
barbell
▐━━━━━▌
******************************
barcode1
█║▌│ █│║▌ ║││█║▌ │║║█║ │║║█║
******************************
barcode2
║█║▌║█║▌│║▌║▌█║
******************************
barf
(´ж｀ς)
******************************
basking in glory
ヽ(´ー｀)ノ
******************************
bautista
(╯°_°）╯︵ ━━━
******************************
bear
ʕ•ᴥ•ʔ
******************************
bear GTFO
ʕ •`ᴥ•´ʔ
******************************
bear squiting
ʕᵔᴥᵔʔ
******************************
bear2
(ʳ ´º㉨º)
******************************
because
∵
******************************
bee
¸.·´¯`·¸¸.·´¯`·.¸.-<\^}0=:
******************************
being draged
╰(◣﹏◢)╯
******************************
bender
 ¦̵̱ ̵̱ ̵̱ ̵̱ ̵̱(̢ ̡͇̅└͇̅┘͇̅ (▤8כ−◦
******************************
big eyes
⺌∅‿∅⺌
******************************
big nose
˚∆˚
******************************
bird
 (⌒▽⌒)﻿
******************************
birds
~(‾▿‾)~
******************************
bomb
!!(　’ ‘)ﾉﾉ⌒●~*
******************************
boobs2
（·人·）
******************************
boombox1
♫♪.ılılıll|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅|llılılı.♫♪
******************************
boombox2
♫♪ |̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| ♫♪
******************************
boxing
ლ(•́•́ლ)
******************************
breakdown
ಥ﹏ಥ
******************************
british money
[£::]
******************************
bullshit
|3ᵕᶦᶦᶳᶣᶨᶵ
******************************
butt
(‿|‿)
******************************
butterfly
Ƹ̵̡Ӝ̵̨̄Ʒ
******************************
camera
[◉"]
******************************
car race
∙،°.  ˘Ô≈ôﺣ   » » »
******************************
careless
◔_◔
******************************
cassette1
|[●▪▪●]|
******************************
cassette2
[¯ↂ■■ↂ¯]
******************************
cat face
⦿⽘⦿
******************************
cat smile
≧◔◡◔≦﻿
******************************
cat2
龴ↀ◡ↀ龴
******************************
cat4
(=^ェ^=)
******************************
catlenny
( ͡° ᴥ ͡°)
******************************
chair
╦╣
******************************
chasing
''⌐(ಠ۾ಠ)¬''
******************************
cheer
  ^(¤o¤)^
******************************
cheers
（ ^_^）o自自o（^_^ ）
******************************
chess
♞▀▄▀▄♝▀▄
******************************
chess pieces
♚ ♛ ♜ ♝ ♞ ♟ ♔ ♕ ♖ ♗ ♘ ♙
******************************
chicken
ʚ(•｀
******************************
chu
(´ε｀ )
******************************
cigarette1
(̅_̅_̅_̅(̅_̅_̅_̅_̅_̅_̅_̅_̅̅_̅()ڪے
******************************
club bold
♣
******************************
club regular
♧
******************************
coffee now
{zzz}°°°( -_-)>c[_]
******************************
confused scratch
(⊙.☉)7
******************************
confused3
(°~°)
******************************
confused5
é_è
******************************
confused6
(˚ㄥ_˚)
******************************
confused7
(; ͡°_ʖ ͡°)
******************************
confused8
(´•_•`)
******************************
confused9
(ˇ_ˇ’!l)
******************************
crayons
((̲̅ ̲̅(̲̅C̲̅r̲̅a̲̅y̲̅o̲̅l̲̲̅̅a̲̅( ̲̅((>
******************************
crazy
ミ●﹏☉ミ
******************************
creeper
ƪ(ړײ)‎ƪ​​
******************************
cry
 (╯︵╰,)
******************************
cry face
｡ﾟ( ﾟஇ‸இﾟ)ﾟ｡
******************************
cry troll
༼ ༎ຶ ෴ ༎ຶ༽
******************************
crying1
Ỏ̷͖͈̞̩͎̻̫̫̜͉̠̫͕̭̭̫̫̹̗̹͈̼̠̖͍͚̥͈̮̼͕̠̤̯̻̥̬̗̼̳̤̳̬̪̹͚̞̼̠͕̼̠̦͚̫͔̯̹͉͉̘͎͕̼̣̝͙̱̟̹̩̟̳̦̭͉̮̖̭̣̣̞̙̗̜̺̭̻̥͚͙̝̦̲̱͉͖͉̰̦͎̫̣̼͎͍̠̮͓̹̹͉̤̰̗̙͕͇͔̱͕̭͈̳̗̭͔̘̖̺̮̜̠͖̘͓̳͕̟̠̱̫̤͓͔̘̰̲͙͍͇̙͎̣̼̗̖͙̯͉̠̟͈͍͕̪͓̝̩̦̖̹̼̠̘̮͚̟͉̺̜͍͓̯̳̱̻͕̣̳͉̻̭̭̱͍̪̩̭̺͕̺̼̥̪͖̦̟͎̻̰_Ỏ̷͖͈̞̩͎̻̫̫̜͉̠̫͕̭̭̫̫̹̗̹͈̼̠̖͍͚̥͈̮̼͕̠̤̯̻̥̬̗̼̳̤̳̬̪̹͚̞̼̠͕̼̠̦͚̫͔̯̹͉͉̘͎͕̼̣̝͙̱̟̹̩̟̳̦̭͉̮̖̭̣̣̞̙̗̜̺̭̻̥͚͙̝̦̲̱͉͖͉̰̦͎̫̣̼͎͍̠̮͓̹̹͉̤̰̗̙͕͇͔̱͕̭͈̳̗̭͔̘̖̺̮̜̠͖̘͓̳͕̟̠̱̫̤͓͔̘̰̲͙͍͇̙͎̣̼̗̖͙̯͉̠̟͈͍͕̪͓̝̩̦̖̹̼̠̘̮͚̟͉̺̜͍͓̯̳̱̻͕̣̳͉̻̭̭̱͍̪̩̭̺͕̺̼̥̪͖̦̟͎̻̰
******************************
cup1
(▓
******************************
cup2
\̅_̅/̷̚ʾ
******************************
cute cat
^⨀ᴥ⨀^
******************************
cute face
(｡◕‿◕｡)
******************************
cute face2
(ღ˘◡˘ღ)
******************************
cute face3
✿◕ ‿ ◕✿
******************************
cute face4
❀◕ ‿ ◕❀
******************************
cute face5
(✿◠‿◠)
******************************
cute face6
(◕‿◕✿)
******************************
cute face7
☾˙❀‿❀˙☽
******************************
cute face8
(◡‿◡✿)
******************************
cute face9
ლ(╹◡╹ლ)
******************************
dab
ヽ( •_)ᕗ
******************************
dalek
 ̵̄/͇̐******************************
damnyou
(ᕗ ͠° ਊ ͠° )ᕗ
******************************
dance2
♪♪ ヽ(ˇ∀ˇ )ゞ
******************************
dancee
♪┏(°.°)┛┗(°.°)┓┗(°.°)┛┏(°.°)┓ ♪
******************************
dancing
┌(ㆆ㉨ㆆ)ʃ
******************************
dancing people
‎(/.__.)/   \(.__.\)
******************************
dead eyes
¿ⓧ_ⓧﮌ
******************************
dear god why
щ（ﾟДﾟщ）
******************************
decorate
▂▃▅▇█▓▒░۩۞۩        ۩۞۩░▒▓█▇▅▃▂
******************************
depressed
(︶︹︶)
******************************
derp
ヘ（。□°）ヘ
******************************
devious smile
ಠ‿ಠ
******************************
dgaf
┌∩┐(◣ _ ◢)┌∩┐
******************************
diamond bold
♦
******************************
diamond regular
♢
******************************
disagree
٩◔̯◔۶
******************************
discombobulated
⊙﹏⊙
******************************
dislike1
(Ծ‸ Ծ)
******************************
dislike2
( ಠ ʖ̯ ಠ)
******************************
do you even lift bro?
ᕦ(ò_óˇ)ᕤ
******************************
double flip
┻━┻ ︵ヽ(`Д´)ﾉ︵﻿ ┻━┻
******************************
drowning
人人人ヾ( ;×o×)〃 人人人
******************************
drunkenness
ヽ（´ー｀）┌
******************************
dunno
¯\(°_o)/¯
******************************
dunno2
\_(シ)_/
******************************
dunno3
└㋡┘
******************************
dunno4
╘㋡╛
******************************
dunno5
٩㋡۶
******************************
electrocardiogram1
√v^√v^√v^√v^√♥
******************************
electrocardiogram2
v^v^v^v^√\/♥
******************************
electrocardiogram3
/\/\/\/\/\/\/\/\/\/\/^♥
******************************
electrocardiogram4
√v^√v^♥√v^√v^√
******************************
elephant
°j°m
******************************
emo dance
ヾ(-_- )ゞ
******************************
energy
 つ ◕_◕ ༽つ  つ ◕_◕ ༽つ
******************************
envelope
✉
******************************
epic gun
︻┳デ═—
******************************
equalizer
▇ ▅ █ ▅ ▇ ▂ ▃ ▁ ▁ ▅ ▃ ▅ ▅ ▄ ▅ ▇
******************************
error
(╯°□°)╯︵ ɹoɹɹƎ
******************************
exchange
(╯°□°）╯︵ ǝƃuɐɥɔxǝ
******************************
excited
☜(⌒▽⌒)☞
******************************
exorcism
ح(•̀ж•́)ง †
******************************
eye closed
 (╯_╰)
******************************
eye roll
⥀.⥀
******************************
eyes
℃ↂ_ↂↃ
******************************
face
•|龴◡龴|•
******************************
facepalm
(>ლ)
******************************
fail
o(╥﹏╥)o
******************************
fart
(ˆ⺫ˆ๑)<3
******************************
feel perky
(`･ω･´)
******************************
fido
V•ᴥ•V
******************************
fight
(ง'̀-'́)ง
******************************
finger1
╭∩╮(Ο_Ο)╭∩╮
******************************
finger2
┌∩┐(◣_◢)┌∩┐
******************************
finger3
ಠ︵ಠ凸
******************************
finger4
┌∩┐(>_<)┌∩┐
******************************
finn
| (• ◡•)|
******************************
fish invasion
›(̠̄:̠̄c  ›(̠̄:̠̄c  (¦Ҝ  (¦Ҝ  ҉  -  -  -   ¦̺͆¦  ▪▌
******************************
fish swim
¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>
******************************
fish3
`·.¸¸ ><((((º>.·´¯`·><((((º>
******************************
fisticuffs
ლ(｀ー´ლ)
******************************
flex
ᕙ(⇀‸↼‶)ᕗ
******************************
flip friend
(ノಠ ∩ಠ)ノ彡( \o°o)******************************
fly away
⁽⁽ଘ( ˊᵕˋ )ଓ⁾⁾
******************************
flying
ح˚௰˚づ
******************************
formula1 car
\ō͡≡o˞̶
******************************
french kiss
:-XÞ
******************************
frown
(ღ˘⌣˘ღ)
******************************
fu
(ಠ_ಠ)┌∩┐
******************************
fuck you2
(° ͜ʖ͡°)╭∩╮
******************************
fuckall
        ╭∩╮（︶︿︶）╭∩╮
******************************
fungry
Σ_(꒪ཀ꒪」∠)_
******************************
ghost
‹’’›(Ͼ˳Ͽ)‹’’›
******************************
gimme
༼ つ ◕_◕ ༽つ
******************************
glasses2
ᒡ◯ᵔ◯ᒢ
******************************
glitter
(*・‿・)ノ⌒*:･ﾟ✧
******************************
go away bear
╭∩╮ʕ•ᴥ•ʔ╭∩╮
******************************
gotit
(☞ﾟ∀ﾟ)☞
******************************
gtalk fit
(•̪̀●́)=ε/̵͇̿̿/'̿̿ ̿ ̿̿  N --------{---(@
******************************
guitar
c====(=#O| ) ~~ ♬·¯·♩¸¸♪·¯·♫¸
******************************
gun1
︻╦╤─
******************************
gun2
︻デ═一
******************************
gun3
╦̵̵̿╤─ ҉ ~ •
******************************
gun4
︻╦̵̵͇̿̿̿̿╤──
******************************
hairstyle
⨌⨀_⨀⨌
******************************
happy
 ۜ\(סּںסּَ` )/ۜ
******************************
happy birthday 1
ዞᏜ℘℘Ꮍ ℬℹℛʈዞᗬᏜᎽ
******************************
happy face
ヽ(´▽`)/
******************************
happy hug
\(ᵔᵕᵔ)/
******************************
happy square
【ツ】
******************************
happy10
(´ツ｀)
******************************
happy11
( ＾◡＾)っ
******************************
happy12
┏(＾0＾)┛┗(＾0＾)┓
******************************
happy13
(°⌣°)
******************************
happy14
٩(^‿^)۶
******************************
happy15
(•‿•)
******************************
happy16
ó‿ó
******************************
happy17
٩◔‿◔۶
******************************
happy18
ಠ◡ಠ
******************************
happy19
●‿●
******************************
happy2
⎦˚◡˚⎣
******************************
happy20
( '‿' )
******************************
happy21
^‿^
******************************
happy22
┌( ಠ‿ಠ)┘
******************************
happy23
(˘◡˘)
******************************
happy24
☯‿☯
******************************
happy25
\(• ◡ •)/
******************************
happy26
( ͡ʘ ͜ʖ ͡ʘ)
******************************
happy27
( ͡• ͜ʖ ͡• )
******************************
happy3
㋡
******************************
happy6
(ツ)
******************************
happy7
【シ】
******************************
happy8
㋛
******************************
happy9
(シ)
******************************
head shot
->~∑≥_≤)
******************************
heart bold
♥
******************************
heart regular
♡
******************************
heart1
»-(¯`·.·´¯)->
******************************
heart2
♡♡
******************************
hell yeah
(òÓ,)_\,,/
******************************
hello
(ʘ‿ʘ)╯
******************************
hello2
（ツ）ノ
******************************
help
٩(͡๏̯͡๏)۶
******************************
high five
( ⌒o⌒)人(⌒-⌒ )v
******************************
hitchhicking
(งツ)ว
******************************
honeycute
❤◦.¸¸.  ◦✿
******************************
house
__̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.___
******************************
hug me
(っ◕‿◕)っ
******************************
hugger
(づ￣ ³￣)づ
******************************
huhu
█▬█ █▄█ █▬█ █▄█
******************************
hybrix
ʕʘ̅͜ʘ̅ʔ
******************************
i dont care
╭∩╮（︶︿︶）╭∩╮
******************************
i kill you
 ̿ ̿̿'̿̿\̵͇̿̿\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿
******************************
im a hugger
(⊃｡•́‿•̀｡)⊃
******************************
injured
(҂◡_◡)
******************************
inlove
(✿ ♥‿♥)
******************************
innocent face
ʘ‿ʘ
******************************
japanese lion face
°‿‿°
******************************
jaymz
 (•̪●)==ε/̵͇̿​̿/’̿’̿ ̿ ̿̿    `(•.°)~
******************************
jazz musician
ヽ(⌐■_■)ノ♪♬
******************************
john lennon
((ºjº))
******************************
joker1
🂠
******************************
joker2
🃟
******************************
joker3
🃏
******************************
joker4
🃠
******************************
jokeranonimous
╭∩╮ (òÓ,) ╭∩╮
******************************
jokeranonimous2
╭∩╮(ô¿ô)╭∩╮
******************************
judgemental
\{ಠʖಠ\}
******************************
judging
( ఠ ͟ʖ ఠ)
******************************
kablewee
        ̿' ̿'\̵͇̿̿\з=( ͡ °_̯͡° )=ε/̵͇̿̿/'̿'̿ ̿
******************************
killer
(⌐■_■)--︻╦╤─ - - - (╥﹏╥)
******************************
kilroy was here
" Ü "
******************************
kirby
(つ -‘ _ ‘- )つ
******************************
kiss2
(︶ε︶メ)
******************************
kiss3
╮(︶ε︶メ)╭
******************************
kissing
( ˘ ³˘)♥
******************************
kissing2
( ˘з˘)ε˘`)
******************************
kissing3
(~˘з˘)~~(˘ε˘~)
******************************
kissing4
(っ˘з(O.O )♥
******************************
kissing5
(`˘з(•˘⌣˘•)
******************************
kissing6
(っ˘з(˘⌣˘ )
******************************
kitty emote
ᵒᴥᵒ#
******************************
kokain
 ̿ ̿' ̿'\̵͇̿̿\з=(•̪●)=ε/̵͇̿̿/'̿''̿ ̿
******************************
kyubey
／人 ⌒ ‿‿ ⌒ 人＼
******************************
kyubey2
／人 ◕‿‿◕ 人＼
******************************
laughing
(＾▽＾)
******************************
lenny
( ͡° ͜ʖ ͡°)
******************************
line brack
●▬▬▬▬๑۩۩๑▬▬▬▬▬●
******************************
listening to headphones
◖ᵔᴥᵔ◗ ♪ ♫
******************************
loading1
█▒▒▒▒▒▒▒▒▒
******************************
loading2
███▒▒▒▒▒▒▒
******************************
loading3
█████▒▒▒▒▒
******************************
loading4
███████▒▒▒
******************************
loading5
█████████▒
******************************
loading6
██████████
******************************
looking face
ô¿ô
******************************
love
ⓛⓞⓥⓔ
******************************
love in my eye1
(♥_♥)
******************************
love in my eye2
(｡❤◡❤｡)
******************************
love in my eye3
(❤◡❤)
******************************
love2
 ~♡ⓛⓞⓥⓔ♡~
******************************
love3
♥‿♥
******************************
love4
(Ɔ ˘⌣˘)♥(˘⌣˘ C)
******************************
mad
òÓ
******************************
mad10
(•ˋ _ ˊ•)
******************************
mad2
(ノ`Д ́)ノ
******************************
mad5
Ծ_Ծ
******************************
mad6
⋋_⋌
******************************
mad7
(ノ≥∇≤)ノ
******************************
mad9
ƪ(`▿▿▿▿´ƪ)
******************************
man spider
/╲/\༼ *ಠ 益 ಠ* ༽/\╱******************************
man tears
ಥ_ಥ
******************************
mango
) _ _ __/°°¬
******************************
med
ب_ب
******************************
med man
(⋗_⋖)
******************************
meditation
‿( ́ ̵ _-`)‿
******************************
meep
\(°^°)/
******************************
meow
ฅ^•ﻌ•^ฅ
******************************
monocle
(╭ರ_•́)
******************************
monster
٩(̾●̮̮̃̾•̃̾)۶
******************************
monster2
٩(- ̮̮̃-̃)۶
******************************
mouse2
 .       ~~(__^·>
******************************
mouse3
<·^__)~~          .
******************************
mouse4
—-{,_,”><",_,}----
******************************
myancat
mmmyyyyy<⦿⽘⦿>aaaannn
******************************
nathan
♪└(￣◇￣)┐♪└(￣◇￣)┐♪└(￣◇￣)┐♪
******************************
needle1
┣▇▇▇═─
******************************
neo
(⌐■_■)--︻╦╤─ - - -
******************************
no support
乁( ◔ ౪◔)「      ┑(￣Д ￣)┍
******************************
nose
\˚ㄥ˚******************************
opera
ヾ(´〇`)ﾉ♪♪♪
******************************
owlkin
(ᾢȍˬȍ)ᾢ ļ ļ ļ ļ ļ
******************************
pac man
ᗧ···ᗣ···ᗣ··
******************************
panda
ヽ(￣(ｴ)￣)ﾉ
******************************
party time
┏(-_-)┛┗(-_-﻿ )┓┗(-_-)┛┏(-_-)┓
******************************
peace yo!
(‾⌣‾)♉
******************************
peepers
ಠಠ
******************************
penis2
○○)=======o)
******************************
perky
( ๏ Y ๏ )
******************************
pig2
༼☉ɷ⊙༽
******************************
piggy
(∩◕(oo)◕∩)
******************************
ping pong
( •_•)O*¯`·.¸.·´¯`°Q(•_• )
******************************
pirate
✌(◕‿-)✌
******************************
pistols1
¯¯̿̿¯̿̿'̿̿̿̿̿̿̿'̿̿'̿̿̿̿̿'̿̿̿)͇̿̿)̿̿̿̿ '̿̿̿̿̿̿\̵͇̿̿\=(•̪̀●́)=o/̵͇̿̿/'̿̿ ̿ ̿̿
******************************
pistols2
̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
******************************
pistols3
 ̿̿ ̿̿ ̿’̿̿’̿\̵͇̿̿\з=( ͡ °_̯͡° )=ε/̵͇̿̿/’̿̿’̿ ̿ ̿̿ ̿̿
******************************
pistols4
(•̪●)=ε/̵͇̿̿/’̿’̿ ̿ ̿̿ ̿ ̿””
******************************
pistols5
̿̿ ̿̿ ̿̿ ̿'̿'\̵͇̿̿\з=( ͠° ͟ʖ ͡°)=ε/̵͇̿̿/'̿̿ ̿ ̿ ̿ ̿ ̿
******************************
playing cards
[♥]]] [♦]]] [♣]]] [♠]]]
******************************
playing cards clubs
[♣]]]
******************************
playing cards clubs waterfall
🃏🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃜🃝🃞
******************************
playing cards diamonds
[♦]]]
******************************
playing cards diamonds waterfall
🃟🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃌🃍🃎
******************************
playing cards hearts
[♥]]]
******************************
playing cards hearts waterfall
🂠🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺🂻🂼🂽🂾
******************************
playing cards spades
[♠]]]
******************************
playing cards spades waterfall
🃠🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮
******************************
playing cards waterfall
🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺🂻🂼🂽🂾🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃌🃍🃎🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃜🃝🃞🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮🂠🃏🃟
******************************
playing cards waterfall (trump)
🃠🃡🃢🃣🃤🃥🃦🃧🃨🃩🃪🃫🃬🃭🃮🃯🃰🃱🃲🃳🃴🃵
******************************
playing in snow
(╯^□^)╯︵ ❄☃❄
******************************
point
(☞ﾟヮﾟ)☞
******************************
polar bear
ˁ˚ᴥ˚ˀ
******************************
pretty eyes
ఠ_ఠ
******************************
professor
"""⌐(ಠ۾ಠ)¬"""
******************************
puls
––•–√\/––√\/––•––
******************************
put the table back
┬─┬﻿ ノ( ゜-゜ノ)
******************************
rak
/⦿L⦿******************************
rare
┌ಠ_ಠ)┌∩┐ ᶠᶸᶜᵏ♥ᵧₒᵤ
******************************
real face
( ͡° ͜ʖ ͡°)﻿
******************************
religious
☪ ✡ † ☨ ✞ ✝ ☥ ☦ ☓ ♁ ☩
******************************
resting my eyes
ᴖ̮ ̮ᴖ
******************************
robber
 -╤╗_(◙◙)_╔╤-   -  -  -  \o/ \o/ \o/
******************************
robot boy
◖(◣☩◢)◗
******************************
robot2
 c[○┬●]כ
******************************
robot3
{•̃_•̃}
******************************
rocket
∙∙∙∙∙·▫▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ☼)===>
******************************
rope
╚(▲_▲)╝
******************************
round bird
,(u°)>
******************************
running
ε=ε=ε=┌(;*´Д`)ﾉ
******************************
sad and confused
¯\_(⊙︿⊙)_/¯
******************************
sad and crying
(ᵟຶ︵ ᵟຶ)
******************************
sad face
(ಥ⌣ಥ)
******************************
sad1
ε(´סּ︵סּ`)з
******************************
sad2
(✖╭╮✖)
******************************
sad3
(◑﹏◐)
******************************
sad4
(◕_◕)
******************************
sad5
(´ᗣ｀)
******************************
sat
'(◣_◢)'
******************************
satan
↑_(ΦwΦ;)Ψ
******************************
satisfied
(◠﹏◠)
******************************
scissors
✄
******************************
seal
(ᵔᴥᵔ)
******************************
sex symbol
◢♂◣◥♀◤◢♂◣◥♀◤
******************************
shark face
( ˇ෴ˇ )
******************************
sheep
Â°lÂ°(,,,,);
******************************
shocked1
(∩╹□╹∩)
******************************
shrug
¯\_(ツ)_/¯
******************************
shy
(๑•́ ₃ •̀๑)
******************************
singing
d(^o^)b¸¸♬·¯·♩¸¸♪·¯·♫¸¸
******************************
singing2
♪└(￣◇￣)┐♪
******************************
sky free
ѧѦ ѧ  ︵͡︵  ̢ ̱ ̧̱ι̵̱̊ι̶̨̱ ̶̱   ︵ Ѧѧ  ︵͡ ︵   ѧ Ѧ    ̵̗̊o̵̖  ︵  ѦѦ ѧ
******************************
sleepy
눈_눈
******************************
sleepy coffee
( -_-)旦~
******************************
slenderman
ϟƖΣNd€RMαN
******************************
smooth
(づ ￣ ³￣)づ ⓈⓂⓄⓄⓉⒽ
******************************
smug bastard
(‾⌣‾)
******************************
sniper rifle
︻デ┳═ー
******************************
sniperstars
✯╾━╤デ╦︻✯
******************************
snowing
✲´*。.❄¨¯`*✲。❄。*。
******************************
snowman1
☃
******************************
sorreh bro
(◢_◣)
******************************
spade bold
♠
******************************
spade regular
♤
******************************
sparkling heart
-`ღ´-
******************************
spell cast
╰( ⁰ ਊ ⁰ )━☆ﾟ.*･｡ﾟ
******************************
spider4
/╲/\╭ºoꍘoº╮/\╱******************************
squee
ヾ(◎o◎,,；)ﾉ
******************************
squid
くコ:彡
******************************
srs face
(ಠ_ಠ)
******************************
staring
٩(๏_๏)۶
******************************
stars
✌⊂(✰‿✰)つ✌
******************************
stars2
⋆ ✢ ✣ ✤ ✥ ✦ ✧ ✩ ✪ ✫ ✬ ✭ ✮ ✯ ✰ ★
******************************
stranger danger
(づ｡◕‿‿◕｡)づ
******************************
strut
ᕕ( ᐛ )ᕗ
******************************
stunna shades
(っ▀¯▀)つ
******************************
sunglasses1
(•_•)>⌐■-■ (⌐■_■)
******************************
sunny day
☁ ▅▒░☼‿☼░▒▅ ☁
******************************
surprised10
(⊙.◎)
******************************
surprised11
๏_๏
******************************
surprised12
(˚-˚)
******************************
surprised13
˚o˚
******************************
surprised15
( ﾟoﾟ)
******************************
surprised16
◉_◉
******************************
surprised17
【•】_【•】
******************************
surprised18
(•ิ_•)
******************************
surprised19
⊙⊙
******************************
surprised2
（　ﾟДﾟ）
******************************
surprised20
͡๏_͡๏
******************************
surprised4
(º_•)
******************************
surprised5
(º.º)
******************************
surprised6
⊙▃⊙
******************************
surprised8
●_●
******************************
surprised9
(⊙̃.o)
******************************
swim
＿（ッ）>＿/／
******************************
swim2
ー（ッ）」
******************************
swim3
＿（ッ）へ
******************************
sword2
▬▬ι═══════ﺤ    -═══════ι▬▬
******************************
sword3
ס₪₪₪₪§|(Ξ≥≤≥≤≥≤ΞΞΞΞΞΞΞΞΞΞ>
******************************
sword8
▬▬ι═══════>
******************************
sword9
 <═══════ι▬▬
******************************
table flip
(╯°□°）╯︵ ┻━┻
******************************
table flip10
(/ .□.)\ ︵╰(゜Д゜)╯︵ /(.□. \)
******************************
table flip2
(ﾉಥ益ಥ）ﾉ﻿ ┻━┻
******************************
table flip3
┬─┬ノ( º _ ºノ)
******************************
table flip4
(ノಠ益ಠ)ノ彡┻━┻
******************************
table flip5
┬──┬﻿ ¯\_(ツ)
******************************
table flip6
┻━┻ ︵﻿ ¯\(ツ)/¯ ︵ ┻━┻
******************************
table flip7
(╯°□°)╯︵ ┻━┻ ︵ ╯(°□° ╯)
******************************
table flip8
(╯°Д°）╯︵ /(.□ . \)
******************************
table flip9
(ノ^_^)ノ┻━┻ ┬─┬ ノ( ^_^ノ)
******************************
taking a dump
(⩾﹏⩽)
******************************
teddy
ˁ(⦿ᴥ⦿)ˀ
******************************
telephone
ε(๏_๏)з】
******************************
tgif
“ヽ(´▽｀)ノ”
******************************
things that can_t be unseen
♨_♨
******************************
tidy up
┬─┬⃰͡ (ᵔᵕᵔ͜ )
******************************
tie-fighter
|—O—|
******************************
tired
( ͡ಠ ʖ̯ ͡ಠ)
******************************
touchy feely
ԅ(≖‿≖ԅ)
******************************
toungue out1
:-Þ
******************************
train
/˳˳_˳˳\!˳˳X˳˳!(˳˳_˳˳)[˳˳_˳˳]
******************************
tripping out
q(❂‿❂)p
******************************
trolling
༼∵༽ ༼⍨༽ ༼⍢༽ ༼⍤༽
******************************
umadbro
¯\_(ツ)_/¯
******************************
up
(◔/‿\◔)
******************************
upset
◤(¬‿¬)◥
******************************
upsidedown
( ͜。 ͡ʖ ͜。)
******************************
wat
ಠ_ಠ
******************************
wat-wat
Σ(‘◉⌓◉’)
******************************
waves
°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸
******************************
weather
☼ ☀ ☁ ☂ ☃ ☄ ☾ ☽ ❄ ☇ ☈ ⊙ ☉ ℃ ℉ ° ❅ ✺ ϟ
******************************
what?
ة_ة
******************************
what??
(Ͼ˳Ͽ)..!!!
******************************
whisling
(っ•́｡•́)♪♬
******************************
why
ლ( `Д’ ლ)
******************************
winnie the pooh
ʕ •́؈•̀)
******************************
winning
(•̀ᴗ•́)و ̑̑
******************************
wizard
(∩ ͡° ͜ʖ ͡°)⊃━☆ﾟ. *
******************************
wizard2
(∩｀-´)⊃━☆ﾟ.*･｡ﾟ
******************************
woman
▓⚗_⚗▓
******************************
worried
(´･_･`)
******************************
wtf dude?
＼(◑д◐)＞∠(◑д◐)
******************************
yawning
＼(＾o＾)／
******************************
yessir
∠(･`_´･ )
******************************
yolo
Yᵒᵘ Oᶰˡʸ Lᶤᵛᵉ Oᶰᶜᵉ
******************************
yun
(っ˘ڡ˘ς)
******************************
zable
ಠ_ರೃ
******************************
zoidberg
(\/)(Ö,,,,Ö)(\/)
******************************
zombie
'º_º'
******************************
zombie2
[¬º-°]¬
******************************
zoned
(⊙_◎)
******************************
>>> tprint("test1
test2
test3","fancy42")
ţ€$ţ1
ţ€$ţ2
ţ€$ţ3
>>> tprint("test1
test2
test3
","fancy44")
тεƨт1
тεƨт2
тεƨт3
<BLANKLINE>
>>> tprint("","fancy44")
<BLANKLINE>
>>> tprint("
","fancy44")
<BLANKLINE>
<BLANKLINE>
>>> tprint("

","fancy44")
<BLANKLINE>
<BLANKLINE>
<BLANKLINE>
>>> text2art("",font="fancy44")
''
>>> decor_list()
angry1
  ୧༼ಠ益ಠ༽︻╦╤─ƭεรƭ
******************************
arrow1
➶➶➶➶➶ƭεรƭ➷➷➷➷➷
******************************
arrow2
↤↤↤↤↤ƭεรƭ↦↦↦↦↦
******************************
arrow3
↫↫↫↫↫ƭεรƭ↬↬↬↬↬
******************************
arrow4
–--´¯`----»ƭεรƭ«----´¯`–--
******************************
arrow5
‹—•°º¤°(ƭεรƭ)°¤º°•—›
******************************
arrow6
⇇⇇⇇ƭεรƭ⇉⇉⇉
******************************
arrow7
⇉⇉⇉ƭεรƭ⇇⇇⇇
******************************
arrow8
]|I{•------» [ƭεรƭ] «------•}I|[
******************************
arrow_wave1
(¯`·.¸¸.·´¯`·.¸¸.-> [ƭεรƭ<-.¸¸.·´¯`·.¸¸.·´¯)
******************************
arrow_wave2
°·.¸.·°¯°·.¸.·°¯°·.¸.-> [ƭεรƭ] <-.¸.·°¯°·.¸.·°¯°·.¸.·°
******************************
ball1
●●--●●--●●ƭεรƭ●●--●●--●●
******************************
ball2
··●(`●-ƭεรƭ-●´)●··
******************************
ball3
●·(¯¨°¹●.ƭεรƭ.●¹°¨¯)·●
******************************
barcode1
▌│█║▌║▌║ ƭεรƭ ║▌║▌║█│▌
******************************
bazar1
[ꔊꔊꔊ[🍉]ƭεรƭ[🍓]ꔊꔊꔊ]
******************************
block1
■■■■■■■■□□□ƭεรƭ□□□■■■■■■■■
******************************
block2
▄▀▀▄▀▀▄ƭεรƭ▄▀▀▄▀▀▄
******************************
bow1
---»--@-}ƭεรƭ{-@--«---
******************************
bubble
ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ▫▫·∙∙∙∙∙ƭεรƭ∙∙∙∙∙·▫▫ᵒᴼᵒ▫ₒₒ▫ᵒᴼᵒ
******************************
cat1
｢(◔ω◔「)三ƭεรƭ三三三ʅ(；◔౪◔)ʃ
******************************
cat2
☆(ﾉ^o^)ﾉ‥‥ƭεรƭ‥…━━━━〇(^~^)
******************************
cat3
＼＼\(۶•̀ᴗ•́)۶//／／ƭεรƭ\٩(•́⌄•́๑)و////
******************************
cell1
╔╣█╠╗╚ƭεรƭ╝╔╣█╠╗
******************************
champion1
◄[🏆]► ƭεรƭ ◄[🥇]►
******************************
chess1
▀▄▀▄▀▄ƭεรƭ▄▀▄▀▄▀
******************************
confused1
¯\_(ツ)_/¯ƭεรƭ¯\_(ツ)_/¯
******************************
confused2
¨°o.OƭεรƭO.o°¨
******************************
cross1
✖✖✖✖ƭεรƭ✖✖✖✖
******************************
depressed
‿︵‿︵(ಥ﹏ಥ)‿︵‿︵ƭεรƭ
******************************
diamon3
¯`-●=»>◆<«=●ƭεรƭ●=»>◆<«=●-´¯
******************************
diamond1
◄]·♦·»ƭεรƭ«·♦·[►
******************************
diamond2
-·●·♦^v¯`♦)ƭεรƭ(♦¯`v^♦·●·-
******************************
egypt1
╭₪₪₪ƭεรƭ₪₪₪╮
******************************
emotions1
╱(●_●)(^_^)ƭεรƭ(^_^)(●_●)╲
******************************
fancy1
╰⊱♥⊱╮ღ꧁ƭεรƭ꧂ღ╭⊱♥≺
******************************
fancy10
჻ღཾཿ༉ ༘჻ღཾཿ༉ ༘჻ღཾཿ༉ ༘჻ღཾཿ჻ƭεรƭ჻ღཾཿ༉ ༘჻ღཾཿ༉ ༘჻ღཾཿ༉ ༘჻ღཾཿ჻
******************************
fancy11
☆彡彡ƭεรƭミミ⛧
******************************
fancy12
★彡彡ƭεรƭミミ★
******************************
fancy13
»»——☠——«ƭεรƭ»——☠——««
******************************
fancy14
 ★━━─ƭεรƭ─━━★
******************************
fancy15
■━■━■━■ƭεรƭ■━■━■━■
******************************
fancy16
└╏ ･ƭεรƭ･ ╏┐
******************************
fancy17
●～●～ƭεรƭ～●～●
******************************
fancy18
((¯*.».( ¯*♥ »ƭεรƭ« ♥* ¯).«.*¯))
******************************
fancy19
✧∭✧∰✧∭✧ƭεรƭ✧∭✧∰✧∭✧
******************************
fancy2
★彡ƭεรƭ彡★
******************************
fancy20
●▬▬▬๑۩۩๑▬▬▬●ƭεรƭ●▬▬▬๑۩۩๑▬▬▬●
******************************
fancy21
(¯`·._.·ƭεรƭ·._.·´¯)
******************************
fancy22
×÷·.·´¯`·)»ƭεรƭ«(·´¯`·.·÷×
******************************
fancy23
· ··^v´¯`×)ƭεรƭ(×´¯`v^·· ·
******************************
fancy24
.·´¯`·->ƭεรƭ<-·´¯`·.
******************************
fancy25
- - --^[ƭεรƭ]^-- - -
******************************
fancy26
(¯`·»o«·´¯`·>ƭεรƭ<·´¯`·»o«·´¯)
******************************
fancy27
).•ˆ•+*¨ƭεรƭ¨*+•ˆ•.(
******************************
fancy28
•·.·¯`·.·•ƭεรƭ•·.·¯`·.·•
******************************
fancy29
•·.·´¯`·.·•ƭεรƭ•·.·´¯`·.·•
******************************
fancy3
·٠•●♥ Ƹ̵̡Ӝ̵̨̄Ʒ ♥●•٠·˙ƭεรƭ˙·٠•●♥ Ƹ̵̡Ӝ̵̨̄Ʒ ♥●•٠·˙
******************************
fancy30
(¯`·._)ƭεรƭ(¯`·._)
******************************
fancy31
·°¯`·•ƭεรƭ•·´¯°·
******************************
fancy32
.ҳ̸Ҳ̸Ҳ̸ҳ•.•´¯`•ƭεรƭ•´¯`•.•..ҳ̸Ҳ̸Ҳ̸ҳ.
******************************
fancy33
×º°”˜`”°º×ƭεรƭ×º°”˜`”°º×
******************************
fancy34
•]•·´º´·»ƭεรƭ«·´º´·•[•
******************************
fancy35
-=₪۩۞۩₪=ƭεรƭ=₪۩۞۩₪=-
******************************
fancy36
°•. °•. °•.ƭεรƭ.•° .•° .•°
******************************
fancy37
(`·.·•ƭεรƭ•·.·')
******************************
fancy38
+*¨^¨*+ƭεรƭ+*¨^¨*+
******************************
fancy39
-·=»◆‡«=·-ƭεรƭ-·=»◆‡«=·-
******************************
fancy4
٩(●̮̮̃•̃)=/̵͇̿̿/'̿̿ ̿̿ƭεรƭ ̿̿ ̿̿ ̿̿\̵͇̿̿\=(•̃●̮̮̃)۶
******************************
fancy40
•°o.OƭεรƭO.o°•
******************************
fancy41
©º°¨¨°º©ƭεรƭ©º°¨¨°º©
******************************
fancy42
°·.¸.·°¯°·.¸.-<ƭεรƭ>-.¸.·°¯°·.¸.·°
******************************
fancy43
•°l¯l_l¯l*ƭεรƭ*l¯l_l¯l•°
******************************
fancy44
—(•·÷[ƭεรƭ]÷·•)—
******************************
fancy45
·ï¡÷¡ï·ƭεรƭ·ï¡÷¡ï·
******************************
fancy46
εїзƭεรƭεїз
******************************
fancy47
•°•.•°•ƭεรƭ•°•.•°•
******************************
fancy48
|¯|_|¯|_.°•. °•.->ƭεรƭ<-.•° .•°._|¯|_|¯|
******************************
fancy49
¸.´)(`·[ƭεรƭ]·´)(` .¸
******************************
fancy5
◇─◇──◇────◇ƭεรƭ◇─────◇──◇─◇
******************************
fancy50
•]•·✦º✦·»ƭεรƭ«·✦º✦·•[•
******************************
fancy51
;`';_._;`';_.ƭεรƭ._;'`;_._.'`;
******************************
fancy52
••.•´¯`•.••ƭεรƭ••.•´¯`•.••
******************************
fancy53
|!¤*'~``~'*¤!||ƭεรƭ||!¤*'~``~'*¤!|
******************************
fancy54
°•.•°o.OƭεรƭO.o°•.•°•
******************************
fancy55
––––º•(-ºƭεรƭº-)•º––––
******************************
fancy56
ҳ̸Ҳ̸Ҳ̸ҳ(¯`·.•.ƭεรƭ.•.·´¯)ҳ̸Ҳ̸Ҳ̸ҳ
******************************
fancy57
◄°l||l°ƭεรƭ°l||l°►
******************************
fancy58
·∙·÷±‡±:∙ƭεรƭ∙:±‡±÷·∙·
******************************
fancy59
(¯`v^÷••ƭεรƭ••÷^v´¯)
******************************
fancy6
×º°”˜`”°º× [ƭεรƭ] ×º°”˜`”°º×
******************************
fancy60
ø´¯`·¤»ƭεรƭ«¤·´¯`ø
******************************
fancy61
º¯`·.·•ƭεรƭ•·.·´¯º
******************************
fancy62
«(.·°¯`·->ƭεรƭ<-·´¯°·.)»
******************************
fancy63
‹–…·´`·…–›ƭεรƭ‹–…·´`·…–›
******************************
fancy64
.·´`·.·´¯`·.›ƭεรƭ‹.·´¯`·.·´`·.
******************************
fancy65
(¯(_(¯`•ƭεรƭ•´¯)_)¯)•
******************************
fancy66
[.·´¯`·.]ƭεรƭ[.·´¯`·.]
******************************
fancy67
ì..·´`•ƭεรƭ•´`·..í
******************************
fancy68
¯°•º¤◆¤º°¯ƭεรƭ¯°º¤◆¤º•°¯
******************************
fancy69
<.•ˆ•…ƭεรƭ…•ˆ•.>
******************************
fancy7
ڿڰۣ—☸ڿڰۣ—✨🌺✨ƭεรƭ✨🌺✨—ڿڰۣ—☸ڿڰۣ
******************************
fancy70
‹‹¡Ì›–•¦[ƭεรƭ]¦•–‹Ì¡››
******************************
fancy71
¯`·.__.·´¯»ƭεรƭ«¯`·.__.·´¯
******************************
fancy72
‹v^v^v^•ƭεรƭ•^v^v^v›
******************************
fancy73
{¯`·._.• .·´«ƭεรƭ»`·.•._.·´¯}
******************************
fancy74
´¯`*¤.·´`·.¤ƭεรƭ¤.·´`·.¤*´¯`
******************************
fancy75
‹—•((.•ˆ•…ƭεรƭ…•ˆ•.))•—›
******************************
fancy76
÷(`•´`·.ƭεรƭ.·´`•´)÷
******************************
fancy77
»-(¯`v´¯)-»ƭεรƭ«-(¯`v´¯)-«
******************************
fancy78
¸„.-•~¹°”ˆ˜¨ƭεรƭ¨˜ˆ”°¹~•-.„¸
******************************
fancy79
-漫~*'¨¯¨'*·舞~ƭεรƭ~舞*'¨¯¨'*·~漫-
******************************
fancy8
·°¯`·•🌹■🌼■🌸ꕥƭεรƭꕥ🌸■🌼■🌹•·´¯°·
******************************
fancy80
◦•●◉✿ƭεรƭ✿◉●•◦
******************************
fancy81
ヾ(>u<●【*:..｡o○ƭεรƭ○o。..:*】●>u<)ﾉ
******************************
fancy82
[]ðº°˜¨˜°ºð[]ƭεรƭ[]ðº°˜¨˜°ºð[]
******************************
fancy83
●¸.•*¨Ƹ̵̡Ӝ̵̨̄Ʒ¨*•.¸●ƭεรƭ●¸.•*¨Ƹ̵̡Ӝ̵̨̄Ʒ¨*•.¸●
******************************
fancy84
.--ღஐƸ̵̡Ӝ̵̨̄Ʒஐღ--.ƭεรƭ.--ღஐƸ̵̡Ӝ̵̨̄Ʒஐღ--.
******************************
fancy85
⊱━━━.⋅εïз⋅.━━━⊰ƭεรƭ⊱━━━.⋅εïз⋅.━━━⊰
******************************
fancy86
((*´_●｀☆ﾟ+.ƭεรƭ.+ﾟ☆´●_｀*))
******************************
fancy87
꧁༺ƭεรƭ༻꧂
******************************
fancy88
𒆜ƭεรƭ𒆜
******************************
fancy89
ᕚ(ƭεรƭ)ᕘ
******************************
fancy9
(◦′ᆺ‵◦) ♬° ✧❥✧¸.•*¨*✧♡✧ƭεรƭ✧♡✧*¨*•.❥
******************************
fancy90
★彡(ƭεรƭ)彡★
******************************
fancy91
◤✞ƭεรƭ✞◥
******************************
fancy92
██▓▒­░⡷⠂ƭεรƭ⠐⢾░▒▓██
******************************
fancy93
☆꧁✬◦°˚°◦. ƭεรƭ.◦°˚°◦✬꧂☆
******************************
fancy94
▞▞▞▞▞▖ƭεรƭ▝▞▞▞▞▞
******************************
fancy95
𓂀ƭεรƭ𓂀
******************************
flame1
ıllıllıƭεรƭıllıllı
******************************
flower1
꧁✿🌸╭⊱ƭεรƭ⊱╮🌸✿꧂
******************************
food1
╭₪🍔₪🍟₪ƭεรƭ₪🍟₪🍔₪╮
******************************
food2
︾︽🍍︾︽ ƭεรƭ︽︾🍍︽︾
******************************
haha
⚡️¯\_༼ ಥ ‿ ಥ ༽_/¯⚡ƭεรƭ
******************************
happy1
o͡͡͡͡͡͡͡͡͡͡͡͡͡͡╮(｡❛ᴗ❛｡)╭o͡͡͡͡͡͡͡͡͡͡͡͡͡͡ƭεรƭo͡͡͡͡͡͡͡͡͡͡͡͡͡͡╮(｡❛ᴗ❛｡)╭o͡͡͡͡͡͡͡͡͡͡͡͡͡͡
******************************
happy_new_year
❸ ❷ ❶ 🥂҉  ̡ ۫۰ Ձ٥۫١9 ۪ ҉   ۫۰̡´ƭεรƭ⭐️
******************************
hawaii1
~-<🌴>-~ƭεรƭ~-<☀️>-~
******************************
hawaii2
✈️─═∙∙∙▫▫ᵒᴼᵒ▫._ƭεรƭ▫▫..🌴
******************************
heart1
~~<💚>~~ƭεรƭ~~<💚>~~
******************************
heart10
ミ💖ƭεรƭ💖彡
******************************
heart11
෴❤️෴ ෴❤️෴ƭεรƭ෴❤️෴ ෴❤️෴
******************************
heart12
💖´ *•.¸♥¸.•**ƭεรƭ**•.¸♥¸.•*´💖
******************************
heart13
❤♡❤♡❤♡❤♡❤♡❤♡❤♡ƭεรƭ♡❤♡❤♡❤♡❤♡❤♡❤♡❤
******************************
heart14
❤꧁ღ⊱♥ƭεรƭ♥⊱ღ꧂❤
******************************
heart15
ミミ◦❧◦°˚°◦.¸¸◦°´❤*•.¸♥ƭεรƭ♥¸.•*❤´°◦¸¸.◦°˚°◦☙◦彡彡
******************************
heart2
~~><~~>💖ƭεรƭ💖<~~><~~
******************************
heart3
─═ڿڿۣڿ═─💖─═ڿڿۣڿ═─ƭεรƭ─═ڿڿۣڿ═─💖─═ڿڿۣڿ═─
******************************
heart4
༺♥༻❀༺♥༻💕﻿ƭεรƭ💕﻿༺♥༻❀༺♥༻
******************************
heart5
💗💜.¸¸.•´¯`☆ºஇ•´♥ƭεรƭ♥•´இº☆.¸¸.•´¯`💜💗
******************************
heart6
-♥-♡--^[ƭεรƭ]^--♡-♥-
******************************
heart7
*•.¸♡ƭεรƭ♡¸.•*
******************************
heart8
╚»♡«╝ƭεรƭ╚»♡«╝
******************************
heart9
´*•.¸(*•.¸♥¸.•*´)¸.•*´ƭεรƭ´*•.¸(*•.¸♥¸.•*´)¸.•*´
******************************
line1
┏━━━━━━┛ƭεรƭ┗━━━━━━┓
******************************
line2
╭─━━━━━─╯ƭεรƭ╰─━━━━━─╮
******************************
line3
┕━━━━ ⋆⋅☆⋅⋆ ━━┑ƭεรƭ┍━━ ⋆⋅☆⋅⋆ ━━━━┙
******************************
line4
┕━━━━✿━━┑ƭεรƭ┍━━✿━━━━┙
******************************
love_music
¸.•*¨*•.¸♪¸.•*¨*•.¸♥¸.•*¨*•.¸ƭεรƭ¸.•*¨*•.¸♥¸.•*¨*•.¸♪¸.•*¨*•.¸
******************************
lucky1
🌈ꔣᨐ ƭεรƭ ᨐꔣ🌈
******************************
missile1
💢🚀🚀💢ƭεรƭ💢🚀🚀💢
******************************
mountain1
人人人ƭεรƭ人人人
******************************
mountain2
╱╲╱╳╲╱╲ƭεรƭ╱╲╱╳╲╱╲
******************************
mountain3
ᨏᨐᨓƭεรƭᨓᨐᨏ
******************************
music1
🎧♪┏(°.°)┛🎼ƭεรƭ🎼┏(°.°)┛♪🎧
******************************
music2
♪•]•·º♫·》»ƭεรƭ«《·♫º·•[•♪
******************************
music3
·.¸¸.·♩♪♫ƭεรƭ♫♪♩·.¸¸.·
******************************
pencil1
✎✐✎✐✎ƭεรƭ✐✎✐✎✐
******************************
poker1
._|.<(+_+)>.|_. [ƭεรƭ] ._|.<(+_+)>.|_.
******************************
puzzle1
╚╝╔╗╚╝╔╗ƭεรƭ╚╝╔╗╚╝╔╗
******************************
puzzle2
╭╮╰╯╭╮╰╯ƭεรƭ╭╮╰╯╭╮╰╯
******************************
puzzle3
︹︺︹︺ƭεรƭ︺︹︺︹
******************************
sad1
(-_-) ƭεรƭ (-_-)
******************************
sad2
ԅ[ •́ ﹏├┬┴┬┴ƭεรƭԅ[ •́ ﹏ •̀ ]و
******************************
sad3
(^^(-_-)^^)ƭεรƭ(^^(-_-)^^)
******************************
sad4
(-_-) [ƭεรƭ] (-_-)
******************************
smile1
`•.,¸¸,.•´¯ƭεรƭ¯`•.,¸¸,.•´
******************************
snow1
🌨❄•°•.•°•ƭεรƭ•°•.•°•❄🌨️
******************************
snow2
✼　 ҉  ƭεรƭ   ҉ 　✼
******************************
soccer1
●●--●●◄⚽️► ƭεรƭ ◄⚽️►●●--●●
******************************
star1
【★】 ƭεรƭ 【★】
******************************
star10
-·=»★«=·-ƭεรƭ-·=»★«=·-
******************************
star11
【★】ƭεรƭ【★】
******************************
star12
★·.·¯`·.·★ƭεรƭ★·.·¯`·.·★
******************************
star13
(★)(¯`·.●.●ƭεรƭ●.●.·¯)(★)
******************************
star14
★★.·¯`★ƭεรƭ★¯`·.★★
******************************
star15
╰☆☆ƭεรƭ☆☆╮
******************************
star16
╚»★«╝ƭεรƭ╚»★«╝
******************************
star17
*̥̻̥̻̥͙*̻̥̻̥͙*̥̻̥͙*̻̥͙*̥͙ƭεรƭ*̥̻̥̻̥͙*̻̥̻̥͙*̥̻̥͙*̻̥͙*̥͙
******************************
star18
╰•★★ƭεรƭ★★•╯
******************************
star19
٭⊹°⨳°·..·°⨳°ƭεรƭ°⨳°·..·°⨳°⊹٭
******************************
star2
★·.·´¯`·.·★ ƭεรƭ ★·.·´¯`·.·★
******************************
star20
`✵•.¸,✵°✵.｡.✰ƭεรƭ✰.｡.✵°✵,¸.•✵´
******************************
star21
·.★·.·´¯`·.·★ƭεรƭ★·.·´¯`·.·★.·
******************************
star22
¨˜ˆ”°⍣~•✡⊹٭„¸ƭεรƭ¸„٭⊹✡•~⍣°”ˆ˜¨
******************************
star23
°•.•°¤*✬.•°°•ƭεรƭ°•°•.✬*¤°•.•°
******************************
star24
★¸.•☆•.¸★ƭεรƭ★⡀.•☆•.★
******************************
star25
✬☆*.•⨳•.¤⊹٭ƭεรƭ٭⊹¤.•⨳•.*☆✬
******************************
star3
╰☆⭐️ƭεรƭ⭐️☆╮
******************************
star4
★・・・・・・★ƭεรƭ★・・・・・・★
******************************
star5
【🌩】★【🌩】ƭεรƭ【🌩】★【🌩】
******************************
star6
☆━━━━━━☆ƭεรƭ☆━━━━━━☆
******************************
star7
・‥…━━━━━━━☆ƭεรƭ☆━━━━━━━…‥・
******************************
star8
【☆】★【☆】ƭεรƭ【☆】★【☆】
******************************
star9
☆❋──❁ƭεรƭ❃──❋
******************************
temple1
エｴｪｪｪƭεรƭｪｪｪｴエ
******************************
title1
»»————-ƭεรƭ————-««
******************************
tree1
🎄✖🎄✖🎄⇉ ƭεรƭ⇇🎄✖🎄✖🎄
******************************
wall1
├┬┴┬┴ƭεรƭ┬┴┬┴┤
******************************
wave1
▁ ▂ ▄ ▅ ▆ ▇ █ƭεรƭ█ ▇ ▆ ▅ ▄ ▂ ▁
******************************
wave2
▉▇▆▅▄▃▂▂▂_ƭεรƭ_▂▂▃▄▅▆▇▉▉
******************************
wave3
▂▃▅▇█▓▒░ƭεรƭ░▒▓█▇▅▃▂
******************************
wave4
▂▃▄▅▆▇▉▉ƭεรƭ▉▉▇▆▅▄▃▂
******************************
wave5
︵‿︵‿︵‿︵‿︵ ƭεรƭ‿︵‿︵‿︵‿︵‿︵‿︵
******************************
wave6
░▒▓█ƭεรƭ█▓▒░
******************************
wave7
(¯`·._(¯`·._(¯`·._ƭεรƭ_.·¯)_.·¯)_.·¯)
******************************
wave8
_/¯/__/¯/_ƭεรƭ_/¯/__/¯/_
******************************
wave9
/)/)/)/)/)/)ƭεรƭ/)/)/)/)/)/)
******************************
>>> tprint("    test   ",font="fancy42",decoration="barcode1")
▌│█║▌║▌║     ţ€$ţ    ║▌║▌║█│▌
>>> decor("barcode1") + text2art("    test   ",font="fancy42") + decor("barcode1",True)
'▌│█║▌║▌║     ţ€$ţ    ║▌║▌║█│▌'
>>> decor("barcode1")
'▌│█║▌║▌║ '
>>> decor("barcode1",True)
' ║▌║▌║█│▌'
>>> decor("barcode1",both=True)
['▌│█║▌║▌║ ', ' ║▌║▌║█│▌']
>>> decor(None)
Traceback (most recent call last):
        ...
art.art.artError: The 'decoration' type must be str.
>>> random.seed(24)
>>> decor1 = decor("random")
>>> random.seed(45)
>>> decor2 = decor("random")
>>> decor1 == decor2
False
>>> random.seed(24)
>>> Art = text2art("test","rnd-na")
>>> random.seed(45)
>>> Art2 = text2art("test","rnd-na")
>>> Art == Art2
False
>>> random.seed(24)
>>> Art = text2art("test","mix")
>>> random.seed(45)
>>> Art2 = text2art("test","mix")
>>> Art == Art2
False
>>> tprint("test","fancy1")
тεsт
<BLANKLINE>
>>> aprint("UnicodeEncodeError")
[Warning] 'UnicodeEncodeError' art is not printable in this environment.
>>> tprint("test","UnicodeEncodeError")
[Warning] 'UnicodeEncodeError' font is not printable in this environment.
>>> tprint("test","UnicodeEncodeError",decoration="angry1")
[Warning] 'UnicodeEncodeError' font or 'angry1' decoration is not printable in this environment.
>>> Data = tsave("test@34",font="antrophobia",filename="antrophobia.txt")
Saved!
Filename: antrophobia.txt
>>> Data = tsave("test@34",font="fancy37",filename="fancy37.txt")
Saved!
Filename: fancy37.txt
>>> Data = tsave("test",font="fancy6",filename="fancy6dec.txt",decoration="chess1")
Saved!
Filename: fancy6dec.txt
>>> Data["Message"]
'OK'
>>> Data["Status"]
True
>>> Data = tsave("test",font="fancy6",filename="fancy6dec.txt",overwrite=True,decoration="bar1")
Saved!
Filename: fancy6dec.txt
>>> Data["Message"]
'OK'
>>> Data["Status"]
True
>>> FONT_COUNTER == (len(ASCII_FONTS) + len(NON_ASCII_FONTS))
True
>>> ART_COUNTER == (len(ASCII_ARTS) + len(NON_ASCII_ARTS))
True
>>> os.remove("antrophobia.txt")
>>> os.remove("fancy37.txt")
>>> os.remove("fancy6dec.txt")

---
## __name__
```python
from fonts1 import __name__
```

Fonts data (part-1).

---
## __name__
```python
from arts import __name__
```

1-line art data.

---
## __name__
```python
from fonts2 import __name__
```

Fonts data (part-2).

---
## __name__
```python
from decorations import __name__
```

Decorations data.

---
## __name__
```python
from fonts3 import __name__
```

Fonts data (part-3).

---
## __name__
```python
from libarchive import __name__
```



---
## custom_reader
```python
from libarchive import custom_reader
```

Read an archive from a seekable file-like object.

The `file` object must support the standard `readinto` and 'seek' methods.

---
## LibArchiveFileSystem
```python
from libarchive import LibArchiveFileSystem
```

Compressed archives as a file-system (read-only)

Supports the following formats:
tar, pax , cpio, ISO9660, zip, mtree, shar, ar, raw, xar, lha/lzh, rar
Microsoft CAB, 7-Zip, WARC

See the libarchive documentation for further restrictions.
https://www.libarchive.org/

Keeps file object open while instance lives. It only works in seekable
file-like objects. In case the filesystem does not support this kind of
file object, it is recommended to cache locally.

This class is pickleable, but not necessarily thread-safe (depends on the
platform). See libarchive documentation for details.

---
## read_func
```python
from libarchive import read_func
```



---
## seek_func
```python
from libarchive import seek_func
```



---
## __init__
```python
from libarchive import __init__
```

Parameters
----------
fo: str or file-like
    Contains ZIP, and must exist. If a str, will fetch file using
    :meth:`~fsspec.open_files`, which must return one file exactly.
mode: str
    Currently, only 'r' accepted
target_protocol: str (optional)
    If ``fo`` is a string, this value can be used to override the
    FS protocol inferred from a URL
target_options: dict (optional)
    Kwargs passed when instantiating the target FS, if ``fo`` is
    a string.

---
## _open_archive
```python
from libarchive import _open_archive
```



---
## _strip_protocol
```python
from libarchive import _strip_protocol
```



---
## _get_dirs
```python
from libarchive import _get_dirs
```



---
## _open
```python
from libarchive import _open
```



---
## GitFileSystem
```python
from git import GitFileSystem
```

Browse the files of a local git repo at any hash/tag/branch

(experimental backend)

---
## __init__
```python
from git import __init__
```

Parameters
----------
path: str (optional)
    Local location of the repo (uses current directory if not given).
    May be deprecated in favour of ``fo``. When used with a higher
    level function such as fsspec.open(), may be of the form
    "git://[path-to-repo[:]][ref@]path/to/file" (but the actual
    file path should not contain "@" or ":").
fo: str (optional)
    Same as ``path``, but passed as part of a chained URL. This one
    takes precedence if both are given.
ref: str (optional)
    Reference to work with, could be a hash, tag or branch name. Defaults
    to current working tree. Note that ``ls`` and ``open`` also take hash,
    so this becomes the default for those operations
kwargs

---
## _strip_protocol
```python
from git import _strip_protocol
```



---
## _path_to_object
```python
from git import _path_to_object
```



---
## _get_kwargs_from_urls
```python
from git import _get_kwargs_from_urls
```



---
## ls
```python
from git import ls
```



---
## ukey
```python
from git import ukey
```



---
## _open
```python
from git import _open
```



---
## __name__
```python
from memory import __name__
```



---
## MemoryFileSystem
```python
from memory import MemoryFileSystem
```

A filesystem based on a dict of BytesIO objects

This is a global filesystem so instances of this class all point to the same
in memory filesystem.

---
## MemoryFile
```python
from memory import MemoryFile
```

A BytesIO which can't close and works as a context manager

Can initialise with data. Each path should only be active once at any moment.

No need to provide fs, path if auto-committing (default)

---
## _strip_protocol
```python
from memory import _strip_protocol
```



---
## ls
```python
from memory import ls
```



---
## mkdir
```python
from memory import mkdir
```



---
## makedirs
```python
from memory import makedirs
```



---
## pipe_file
```python
from memory import pipe_file
```

Set the bytes of given file

Avoids copies of the data if possible

---
## rmdir
```python
from memory import rmdir
```



---
## info
```python
from memory import info
```



---
## _open
```python
from memory import _open
```



---
## cp_file
```python
from memory import cp_file
```



---
## cat_file
```python
from memory import cat_file
```



---
## _rm
```python
from memory import _rm
```



---
## modified
```python
from memory import modified
```



---
## created
```python
from memory import created
```



---
## rm
```python
from memory import rm
```



---
## __init__
```python
from memory import __init__
```



---
## size
```python
from memory import size
```



---
## __enter__
```python
from memory import __enter__
```



---
## close
```python
from memory import close
```

Close the stream.

This works the exact same way as :meth:`aclose`, but is provided as a special
case for the benefit of synchronous callbacks.

---
## discard
```python
from memory import discard
```



---
## commit
```python
from memory import commit
```



---
## __name__
```python
from dirfs import __name__
```



---
## DirFileSystem
```python
from dirfs import DirFileSystem
```

Directory prefix filesystem

The DirFileSystem is a filesystem-wrapper. It assumes every path it is dealing with
is relative to the `path`. After performing the necessary paths operation it
delegates everything to the wrapped filesystem.

---
## __init__
```python
from dirfs import __init__
```

Parameters
----------
path: str
    Path to the directory.
fs: AbstractFileSystem
    An instantiated filesystem to wrap.
target_protocol, target_options:
    if fs is none, construct it from these
fo: str
    Alternate for path; do not provide both

---
## _join
```python
from dirfs import _join
```



---
## _relpath
```python
from dirfs import _relpath
```



---
## sep
```python
from dirfs import sep
```



---
## rm_file
```python
from dirfs import rm_file
```



---
## rm
```python
from dirfs import rm
```



---
## cp_file
```python
from dirfs import cp_file
```



---
## copy
```python
from dirfs import copy
```



---
## pipe
```python
from dirfs import pipe
```



---
## pipe_file
```python
from dirfs import pipe_file
```



---
## cat_file
```python
from dirfs import cat_file
```



---
## cat
```python
from dirfs import cat
```



---
## put_file
```python
from dirfs import put_file
```



---
## put
```python
from dirfs import put
```



---
## get_file
```python
from dirfs import get_file
```



---
## get
```python
from dirfs import get
```



---
## isfile
```python
from dirfs import isfile
```



---
## isdir
```python
from dirfs import isdir
```



---
## size
```python
from dirfs import size
```



---
## exists
```python
from dirfs import exists
```



---
## info
```python
from dirfs import info
```



---
## ls
```python
from dirfs import ls
```



---
## walk
```python
from dirfs import walk
```



---
## glob
```python
from dirfs import glob
```



---
## du
```python
from dirfs import du
```



---
## find
```python
from dirfs import find
```



---
## expand_path
```python
from dirfs import expand_path
```



---
## mkdir
```python
from dirfs import mkdir
```



---
## makedirs
```python
from dirfs import makedirs
```



---
## rmdir
```python
from dirfs import rmdir
```



---
## mv
```python
from dirfs import mv
```



---
## touch
```python
from dirfs import touch
```



---
## created
```python
from dirfs import created
```



---
## modified
```python
from dirfs import modified
```



---
## sign
```python
from dirfs import sign
```



---
## __repr__
```python
from dirfs import __repr__
```



---
## open
```python
from dirfs import open
```



---
## __name__
```python
from tar import __name__
```



---
## TarFileSystem
```python
from tar import TarFileSystem
```

Compressed Tar archives as a file-system (read-only)

Supports the following formats:
tar.gz, tar.bz2, tar.xz

---
## __init__
```python
from tar import __init__
```



---
## _index
```python
from tar import _index
```



---
## _get_dirs
```python
from tar import _get_dirs
```



---
## _open
```python
from tar import _open
```



---
## __name__
```python
from local import __name__
```



---
## LocalFileSystem
```python
from local import LocalFileSystem
```

Interface to files on local storage

Parameters
----------
auto_mkdir: bool
    Whether, when opening a file, the directory containing it should
    be created (if it doesn't already exist). This is assumed by pyarrow
    code.

---
## make_path_posix
```python
from local import make_path_posix
```

Make path generic and absolute for current OS

---
## trailing_sep
```python
from local import trailing_sep
```

Return True if the path ends with a path separator.

A forward slash is always considered a path separator, even on Operating
Systems that normally use a backslash.

---
## LocalFileOpener
```python
from local import LocalFileOpener
```



---
## __init__
```python
from local import __init__
```



---
## fsid
```python
from local import fsid
```



---
## mkdir
```python
from local import mkdir
```



---
## makedirs
```python
from local import makedirs
```



---
## rmdir
```python
from local import rmdir
```



---
## ls
```python
from local import ls
```



---
## info
```python
from local import info
```



---
## lexists
```python
from local import lexists
```



---
## cp_file
```python
from local import cp_file
```



---
## isfile
```python
from local import isfile
```



---
## isdir
```python
from local import isdir
```



---
## get_file
```python
from local import get_file
```



---
## put_file
```python
from local import put_file
```



---
## mv
```python
from local import mv
```



---
## link
```python
from local import link
```



---
## symlink
```python
from local import symlink
```



---
## islink
```python
from local import islink
```



---
## rm_file
```python
from local import rm_file
```



---
## rm
```python
from local import rm
```



---
## unstrip_protocol
```python
from local import unstrip_protocol
```



---
## _open
```python
from local import _open
```



---
## touch
```python
from local import touch
```



---
## created
```python
from local import created
```



---
## modified
```python
from local import modified
```



---
## _parent
```python
from local import _parent
```



---
## _strip_protocol
```python
from local import _strip_protocol
```



---
## _isfilestore
```python
from local import _isfilestore
```



---
## chmod
```python
from local import chmod
```



---
## _fetch_range
```python
from local import _fetch_range
```



---
## __setstate__
```python
from local import __setstate__
```



---
## __getstate__
```python
from local import __getstate__
```



---
## commit
```python
from local import commit
```



---
## discard
```python
from local import discard
```



---
## readable
```python
from local import readable
```



---
## writable
```python
from local import writable
```



---
## read
```python
from local import read
```



---
## write
```python
from local import write
```



---
## tell
```python
from local import tell
```



---
## seek
```python
from local import seek
```



---
## seekable
```python
from local import seekable
```



---
## readline
```python
from local import readline
```



---
## readlines
```python
from local import readlines
```



---
## close
```python
from local import close
```



---
## truncate
```python
from local import truncate
```



---
## closed
```python
from local import closed
```



---
## fileno
```python
from local import fileno
```



---
## flush
```python
from local import flush
```



---
## __iter__
```python
from local import __iter__
```



---
## __getattr__
```python
from local import __getattr__
```



---
## __enter__
```python
from local import __enter__
```



---
## __exit__
```python
from local import __exit__
```



---
## __name__
```python
from smb import __name__
```

This module contains SMBFileSystem class responsible for handling access to
Windows Samba network shares by using package smbprotocol

---
## SMBFileSystem
```python
from smb import SMBFileSystem
```

Allow reading and writing to Windows and Samba network shares.

When using `fsspec.open()` for getting a file-like object the URI
should be specified as this format:
``smb://workgroup;user:password@server:port/share/folder/file.csv``.

Example::

    >>> import fsspec
    >>> with fsspec.open(
    ...     'smb://myuser:mypassword@myserver.com/' 'share/folder/file.csv'
    ... ) as smbfile:
    ...     df = pd.read_csv(smbfile, sep='|', header=None)

Note that you need to pass in a valid hostname or IP address for the host
component of the URL. Do not use the Windows/NetBIOS machine name for the
host component.

The first component of the path in the URL points to the name of the shared
folder. Subsequent path components will point to the directory/folder/file.

The URL components ``workgroup`` , ``user``, ``password`` and ``port`` may be
optional.

.. note::

    For working this source require `smbprotocol`_ to be installed, e.g.::

        $ pip install smbprotocol
        # or
        # pip install smbprotocol[kerberos]

.. _smbprotocol: https://github.com/jborean93/smbprotocol#requirements

Note: if using this with the ``open`` or ``open_files``, with full URLs,
there is no way to tell if a path is relative, so all paths are assumed
to be absolute.

---
## _as_unc_path
```python
from smb import _as_unc_path
```



---
## _as_temp_path
```python
from smb import _as_temp_path
```



---
## _share_has_path
```python
from smb import _share_has_path
```



---
## SMBFileOpener
```python
from smb import SMBFileOpener
```

writes to remote temporary file, move on commit

---
## __init__
```python
from smb import __init__
```



---
## _port
```python
from smb import _port
```



---
## _connect
```python
from smb import _connect
```



---
## _strip_protocol
```python
from smb import _strip_protocol
```



---
## _get_kwargs_from_urls
```python
from smb import _get_kwargs_from_urls
```



---
## mkdir
```python
from smb import mkdir
```



---
## makedirs
```python
from smb import makedirs
```



---
## rmdir
```python
from smb import rmdir
```



---
## info
```python
from smb import info
```



---
## created
```python
from smb import created
```

Return the created timestamp of a file as a datetime.datetime

---
## modified
```python
from smb import modified
```

Return the modified timestamp of a file as a datetime.datetime

---
## ls
```python
from smb import ls
```



---
## _open
```python
from smb import _open
```



---
## copy
```python
from smb import copy
```

Copy within two locations in the same filesystem

---
## _rm
```python
from smb import _rm
```



---
## mv
```python
from smb import mv
```



---
## commit
```python
from smb import commit
```

Move temp file to definitive on success.

---
## discard
```python
from smb import discard
```

Remove the temp file on failure.

---
## __fspath__
```python
from smb import __fspath__
```



---
## __iter__
```python
from smb import __iter__
```



---
## __getattr__
```python
from smb import __getattr__
```



---
## __enter__
```python
from smb import __enter__
```



---
## __exit__
```python
from smb import __exit__
```



---
## wrap_exceptions
```python
from arrow import wrap_exceptions
```



---
## ArrowFSWrapper
```python
from arrow import ArrowFSWrapper
```

FSSpec-compatible wrapper of pyarrow.fs.FileSystem.

Parameters
----------
fs : pyarrow.fs.FileSystem

---
## ArrowFile
```python
from arrow import ArrowFile
```



---
## HadoopFileSystem
```python
from arrow import HadoopFileSystem
```

A wrapper on top of the pyarrow.fs.HadoopFileSystem
to connect it's interface with fsspec

---
## wrapper
```python
from arrow import wrapper
```



---
## __init__
```python
from arrow import __init__
```

Parameters
----------
host: str
    Hostname, IP or "default" to try to read from Hadoop config
port: int
    Port to connect on, or default from Hadoop config if 0
user: str or None
    If given, connect as this username
kerb_ticket: str or None
    If given, use this ticket for authentication
replication: int
    set replication factor of file for write operations. default value is 3.
extra_conf: None or dict
    Passed on to HadoopFileSystem

---
## protocol
```python
from arrow import protocol
```



---
## fsid
```python
from arrow import fsid
```



---
## _strip_protocol
```python
from arrow import _strip_protocol
```



---
## ls
```python
from arrow import ls
```



---
## info
```python
from arrow import info
```



---
## exists
```python
from arrow import exists
```



---
## _make_entry
```python
from arrow import _make_entry
```



---
## cp_file
```python
from arrow import cp_file
```



---
## mv
```python
from arrow import mv
```



---
## rm_file
```python
from arrow import rm_file
```



---
## rm
```python
from arrow import rm
```



---
## _open
```python
from arrow import _open
```



---
## mkdir
```python
from arrow import mkdir
```



---
## makedirs
```python
from arrow import makedirs
```



---
## rmdir
```python
from arrow import rmdir
```



---
## modified
```python
from arrow import modified
```



---
## cat_file
```python
from arrow import cat_file
```



---
## get_file
```python
from arrow import get_file
```



---
## __enter__
```python
from arrow import __enter__
```



---
## __exit__
```python
from arrow import __exit__
```



---
## _get_kwargs_from_urls
```python
from arrow import _get_kwargs_from_urls
```



---
## __name__
```python
from dbfs import __name__
```



---
## DatabricksException
```python
from dbfs import DatabricksException
```

Helper class for exceptions raised in this module.

---
## DatabricksFileSystem
```python
from dbfs import DatabricksFileSystem
```

Get access to the Databricks filesystem implementation over HTTP.
Can be used inside and outside of a databricks cluster.

---
## DatabricksFile
```python
from dbfs import DatabricksFile
```

Helper class for files referenced in the DatabricksFileSystem.

---
## __init__
```python
from dbfs import __init__
```

Create a new instance of the DatabricksFile.

The blocksize needs to be the default one.

---
## ls
```python
from dbfs import ls
```

List the contents of the given path.

Parameters
----------
path: str
    Absolute path
detail: bool
    Return not only the list of filenames,
    but also additional information on file sizes
    and types.

---
## makedirs
```python
from dbfs import makedirs
```

Create a given absolute path and all of its parents.

Parameters
----------
path: str
    Absolute path to create
exist_ok: bool
    If false, checks if the folder
    exists before creating it (and raises an
    Exception if this is the case)

---
## mkdir
```python
from dbfs import mkdir
```

Create a given absolute path and all of its parents.

Parameters
----------
path: str
    Absolute path to create
create_parents: bool
    Whether to create all parents or not.
    "False" is not implemented so far.

---
## rm
```python
from dbfs import rm
```

Remove the file or folder at the given absolute path.

Parameters
----------
path: str
    Absolute path what to remove
recursive: bool
    Recursively delete all files in a folder.

---
## mv
```python
from dbfs import mv
```

Move a source to a destination path.

A note from the original [databricks API manual]
(https://docs.databricks.com/dev-tools/api/latest/dbfs.html#move).

When moving a large number of files the API call will time out after
approximately 60s, potentially resulting in partially moved data.
Therefore, for operations that move more than 10k files, we strongly
discourage using the DBFS REST API.

Parameters
----------
source_path: str
    From where to move (absolute path)
destination_path: str
    To where to move (absolute path)
recursive: bool
    Not implemented to far.
maxdepth:
    Not implemented to far.

---
## _open
```python
from dbfs import _open
```

Overwrite the base class method to make sure to create a DBFile.
All arguments are copied from the base method.

Only the default blocksize is allowed.

---
## _send_to_api
```python
from dbfs import _send_to_api
```

Send the given json to the DBFS API
using a get or post request (specified by the argument `method`).

Parameters
----------
method: str
    Which http method to use for communication; "get" or "post".
endpoint: str
    Where to send the request to (last part of the API URL)
json: dict
    Dictionary of information to send

---
## _create_handle
```python
from dbfs import _create_handle
```

Internal function to create a handle, which can be used to
write blocks of a file to DBFS.
A handle has a unique identifier which needs to be passed
whenever written during this transaction.
The handle is active for 10 minutes - after that a new
write transaction needs to be created.
Make sure to close the handle after you are finished.

Parameters
----------
path: str
    Absolute path for this file.
overwrite: bool
    If a file already exist at this location, either overwrite
    it or raise an exception.

---
## _close_handle
```python
from dbfs import _close_handle
```

Close a handle, which was opened by :func:`_create_handle`.

Parameters
----------
handle: str
    Which handle to close.

---
## _add_data
```python
from dbfs import _add_data
```

Upload data to an already opened file handle
(opened by :func:`_create_handle`).
The maximal allowed data size is 1MB after
conversion to base64.
Remember to close the handle when you are finished.

Parameters
----------
handle: str
    Which handle to upload data to.
data: bytes
    Block of data to add to the handle.

---
## _get_data
```python
from dbfs import _get_data
```

Download data in bytes from a given absolute path in a block
from [start, start+length].
The maximum number of allowed bytes to read is 1MB.

Parameters
----------
path: str
    Absolute path to download data from
start: int
    Start position of the block
end: int
    End position of the block

---
## invalidate_cache
```python
from dbfs import invalidate_cache
```



---
## _initiate_upload
```python
from dbfs import _initiate_upload
```

Internal function to start a file upload

---
## _upload_chunk
```python
from dbfs import _upload_chunk
```

Internal function to add a chunk of data to a started upload

---
## _fetch_range
```python
from dbfs import _fetch_range
```

Internal function to download a block of data

---
## _to_sized_blocks
```python
from dbfs import _to_sized_blocks
```

Helper function to split a range from 0 to total_length into bloksizes

---
## __name__
```python
from cached import __name__
```



---
## WriteCachedTransaction
```python
from cached import WriteCachedTransaction
```



---
## CachingFileSystem
```python
from cached import CachingFileSystem
```

Locally caching filesystem, layer over any other FS

This class implements chunk-wise local storage of remote files, for quick
access after the initial download. The files are stored in a given
directory with hashes of URLs for the filenames. If no directory is given,
a temporary one is used, which should be cleaned up by the OS after the
process ends. The files themselves are sparse (as implemented in
:class:`~fsspec.caching.MMapCache`), so only the data which is accessed
takes up space.

Restrictions:

- the block-size must be the same for each access of a given file, unless
  all blocks of the file have already been read
- caching can only be applied to file-systems which produce files
  derived from fsspec.spec.AbstractBufferedFile ; LocalFileSystem is also
  allowed, for testing

---
## WholeFileCacheFileSystem
```python
from cached import WholeFileCacheFileSystem
```

Caches whole remote files on first access

This class is intended as a layer over any other file system, and
will make a local copy of each file accessed, so that all subsequent
reads are local. This is similar to ``CachingFileSystem``, but without
the block-wise functionality and so can work even when sparse files
are not allowed. See its docstring for definition of the init
arguments.

The class still needs access to the remote store for listing files,
and may refresh cached files.

---
## SimpleCacheFileSystem
```python
from cached import SimpleCacheFileSystem
```

Caches whole remote files on first access

This class is intended as a layer over any other file system, and
will make a local copy of each file accessed, so that all subsequent
reads are local. This implementation only copies whole files, and
does not keep any metadata about the download time or file details.
It is therefore safer to use in multi-threaded/concurrent situations.

This is the only of the caching filesystems that supports write: you will
be given a real local open file, and upon close and commit, it will be
uploaded to the target filesystem; the writability or the target URL is
not checked until that time.

---
## LocalTempFile
```python
from cached import LocalTempFile
```

A temporary local file, which will be uploaded on commit

---
## complete
```python
from cached import complete
```



---
## __init__
```python
from cached import __init__
```



---
## _remove_tempdir
```python
from cached import _remove_tempdir
```



---
## _mkcache
```python
from cached import _mkcache
```



---
## cache_size
```python
from cached import cache_size
```

Return size of cache in bytes.

If more than one cache directory is in use, only the size of the last
one (the writable cache directory) is returned.

---
## load_cache
```python
from cached import load_cache
```



---
## save_cache
```python
from cached import save_cache
```



---
## _check_cache
```python
from cached import _check_cache
```

Reload caches if time elapsed or any disappeared

---
## _check_file
```python
from cached import _check_file
```



---
## clear_cache
```python
from cached import clear_cache
```

Remove all files and metadata from the cache

In the case of multiple cache locations, this clears only the last one,
which is assumed to be the read/write one.

---
## clear_expired_cache
```python
from cached import clear_expired_cache
```

Remove all expired files and metadata from the cache

In the case of multiple cache locations, this clears only the last one,
which is assumed to be the read/write one.

Parameters
----------
expiry_time: int
    The time in seconds after which a local copy is considered useless.
    If not defined the default is equivalent to the attribute from the
    file caching instantiation.

---
## pop_from_cache
```python
from cached import pop_from_cache
```

Remove cached version of given file

Deletes local copy of the given (remote) path. If it is found in a cache
location which is not the last, it is assumed to be read-only, and
raises PermissionError

---
## _open
```python
from cached import _open
```



---
## _parent
```python
from cached import _parent
```



---
## hash_name
```python
from cached import hash_name
```



---
## close_and_update
```python
from cached import close_and_update
```

Called when a file is closing, so store the set of blocks

---
## ls
```python
from cached import ls
```



---
## __getattribute__
```python
from cached import __getattribute__
```



---
## __eq__
```python
from cached import __eq__
```

Test for equality.

---
## __hash__
```python
from cached import __hash__
```

Calculate hash.

---
## open_many
```python
from cached import open_many
```



---
## commit_many
```python
from cached import commit_many
```



---
## _make_local_details
```python
from cached import _make_local_details
```



---
## cat
```python
from cached import cat
```



---
## pipe_file
```python
from cached import pipe_file
```



---
## info
```python
from cached import info
```



---
## pipe
```python
from cached import pipe
```



---
## cat_ranges
```python
from cached import cat_ranges
```



---
## __reduce__
```python
from cached import __reduce__
```



---
## __enter__
```python
from cached import __enter__
```



---
## __exit__
```python
from cached import __exit__
```



---
## close
```python
from cached import close
```



---
## discard
```python
from cached import discard
```



---
## commit
```python
from cached import commit
```



---
## name
```python
from cached import name
```



---
## __repr__
```python
from cached import __repr__
```



---
## __getattr__
```python
from cached import __getattr__
```



---
## _strip_protocol
```python
from cached import _strip_protocol
```



---
## firstpart
```python
from cached import firstpart
```



---
## __name__
```python
from cache_metadata import __name__
```



---
## CacheMetadata
```python
from cache_metadata import CacheMetadata
```

Cache metadata.

All reading and writing of cache metadata is performed by this class,
accessing the cached files and blocks is not.

Metadata is stored in a single file per storage directory in JSON format.
For backward compatibility, also reads metadata stored in pickle format
which is converted to JSON when next saved.

---
## __init__
```python
from cache_metadata import __init__
```

Parameters
----------
storage: list[str]
    Directories containing cached files, must be at least one. Metadata
    is stored in the last of these directories by convention.

---
## _load
```python
from cache_metadata import _load
```

Low-level function to load metadata from specific file

---
## _save
```python
from cache_metadata import _save
```

Low-level function to save metadata to specific file

---
## _scan_locations
```python
from cache_metadata import _scan_locations
```

Yield locations (filenames) where metadata is stored, and whether
writable or not.

Parameters
----------
writable: bool
    Set to True to only yield writable locations.

Returns
-------
Yields (str, str, bool)

---
## check_file
```python
from cache_metadata import check_file
```

If path is in cache return its details, otherwise return ``False``.

If the optional CachingFileSystem is specified then it is used to
perform extra checks to reject possible matches, such as if they are
too old.

---
## clear_expired
```python
from cache_metadata import clear_expired
```

Remove expired metadata from the cache.

Returns names of files corresponding to expired metadata and a boolean
flag indicating whether the writable cache is empty. Caller is
responsible for deleting the expired files.

---
## load
```python
from cache_metadata import load
```

Load all metadata from disk and store in ``self.cached_files``

---
## on_close_cached_file
```python
from cache_metadata import on_close_cached_file
```

Perform side-effect actions on closing a cached file.

The actual closing of the file is the responsibility of the caller.

---
## pop_file
```python
from cache_metadata import pop_file
```

Remove metadata of cached file.

If path is in the cache, return the filename of the cached file,
otherwise return ``None``.  Caller is responsible for deleting the
cached file.

---
## save
```python
from cache_metadata import save
```

Save metadata to disk

---
## update_file
```python
from cache_metadata import update_file
```

Update metadata for specific file in memory, do not save

---
## __name__
```python
from zip import __name__
```

Generate zip test data files.

---
## ZipFileSystem
```python
from zip import ZipFileSystem
```

Read/Write contents of ZIP archive as a file-system

Keeps file object open while instance lives.

This class is pickleable, but not necessarily thread-safe

---
## __init__
```python
from zip import __init__
```

Parameters
----------
fo: str or file-like
    Contains ZIP, and must exist. If a str, will fetch file using
    :meth:`~fsspec.open_files`, which must return one file exactly.
mode: str
    Accept: "r", "w", "a"
target_protocol: str (optional)
    If ``fo`` is a string, this value can be used to override the
    FS protocol inferred from a URL
target_options: dict (optional)
    Kwargs passed when instantiating the target FS, if ``fo`` is
    a string.
compression, allowZip64, compresslevel: passed to ZipFile
    Only relevant when creating a ZIP

---
## _strip_protocol
```python
from zip import _strip_protocol
```



---
## __del__
```python
from zip import __del__
```



---
## close
```python
from zip import close
```

Commits any write changes to the file. Done on ``del`` too.

---
## _get_dirs
```python
from zip import _get_dirs
```



---
## pipe_file
```python
from zip import pipe_file
```



---
## _open
```python
from zip import _open
```



---
## __name__
```python
from webhdfs import __name__
```



---
## WebHDFS
```python
from webhdfs import WebHDFS
```

Interface to HDFS over HTTP using the WebHDFS API. Supports also HttpFS gateways.

Four auth mechanisms are supported:

insecure: no auth is done, and the user is assumed to be whoever they
    say they are (parameter ``user``), or a predefined value such as
    "dr.who" if not given
spnego: when kerberos authentication is enabled, auth is negotiated by
    requests_kerberos https://github.com/requests/requests-kerberos .
    This establishes a session based on existing kinit login and/or
    specified principal/password; parameters are passed with ``kerb_kwargs``
token: uses an existing Hadoop delegation token from another secured
    service. Indeed, this client can also generate such tokens when
    not insecure. Note that tokens expire, but can be renewed (by a
    previously specified user) and may allow for proxying.
basic-auth: used when both parameter ``user`` and parameter ``password``
    are provided.

---
## WebHDFile
```python
from webhdfs import WebHDFile
```

A file living in HDFS over webHDFS

---
## __init__
```python
from webhdfs import __init__
```



---
## fsid
```python
from webhdfs import fsid
```



---
## _connect
```python
from webhdfs import _connect
```



---
## _call
```python
from webhdfs import _call
```



---
## _open
```python
from webhdfs import _open
```

Parameters
----------
path: str
    File location
mode: str
    'rb', 'wb', etc.
block_size: int
    Client buffer size for read-ahead or write buffer
autocommit: bool
    If False, writes to temporary file that only gets put in final
    location upon commit
replication: int
    Number of copies of file on the cluster, write mode only
permissions: str or int
    posix permissions, write mode only
kwargs

Returns
-------
WebHDFile instance

---
## _process_info
```python
from webhdfs import _process_info
```



---
## _strip_protocol
```python
from webhdfs import _strip_protocol
```



---
## _get_kwargs_from_urls
```python
from webhdfs import _get_kwargs_from_urls
```



---
## info
```python
from webhdfs import info
```



---
## ls
```python
from webhdfs import ls
```



---
## content_summary
```python
from webhdfs import content_summary
```

Total numbers of files, directories and bytes under path

---
## ukey
```python
from webhdfs import ukey
```

Checksum info of file, giving method and result

---
## home_directory
```python
from webhdfs import home_directory
```

Get user's home directory

---
## get_delegation_token
```python
from webhdfs import get_delegation_token
```

Retrieve token which can give the same authority to other uses

Parameters
----------
renewer: str or None
    User who may use this token; if None, will be current user

---
## renew_delegation_token
```python
from webhdfs import renew_delegation_token
```

Make token live longer. Returns new expiry time

---
## cancel_delegation_token
```python
from webhdfs import cancel_delegation_token
```

Stop the token from being useful

---
## chmod
```python
from webhdfs import chmod
```

Set the permission at path

Parameters
----------
path: str
    location to set (file or directory)
mod: str or int
    posix epresentation or permission, give as oct string, e.g, '777'
    or 0o777

---
## chown
```python
from webhdfs import chown
```

Change owning user and/or group

---
## set_replication
```python
from webhdfs import set_replication
```

Set file replication factor

Parameters
----------
path: str
    File location (not for directories)
replication: int
    Number of copies of file on the cluster. Should be smaller than
    number of data nodes; normally 3 on most systems.

---
## mkdir
```python
from webhdfs import mkdir
```



---
## makedirs
```python
from webhdfs import makedirs
```



---
## mv
```python
from webhdfs import mv
```



---
## rm
```python
from webhdfs import rm
```



---
## rm_file
```python
from webhdfs import rm_file
```



---
## cp_file
```python
from webhdfs import cp_file
```



---
## _apply_proxy
```python
from webhdfs import _apply_proxy
```



---
## _upload_chunk
```python
from webhdfs import _upload_chunk
```

Write one part of a multi-block file upload

Parameters
==========
final: bool
    This is the last block, so should complete file, if
    self.autocommit is True.

---
## _initiate_upload
```python
from webhdfs import _initiate_upload
```

Create remote file/upload

---
## _fetch_range
```python
from webhdfs import _fetch_range
```



---
## commit
```python
from webhdfs import commit
```



---
## discard
```python
from webhdfs import discard
```



---
## _get_client
```python
from dask import _get_client
```



---
## _in_worker
```python
from dask import _in_worker
```



---
## DaskWorkerFileSystem
```python
from dask import DaskWorkerFileSystem
```

View files accessible to a worker as any other remote file-system

When instances are run on the worker, uses the real filesystem. When
run on the client, they call the worker to provide information or data.

**Warning** this implementation is experimental, and read-only for now.

---
## DaskFile
```python
from dask import DaskFile
```



---
## _get_kwargs_from_urls
```python
from dask import _get_kwargs_from_urls
```



---
## _determine_worker
```python
from dask import _determine_worker
```



---
## mkdir
```python
from dask import mkdir
```



---
## rm
```python
from dask import rm
```



---
## copy
```python
from dask import copy
```



---
## mv
```python
from dask import mv
```



---
## ls
```python
from dask import ls
```



---
## _open
```python
from dask import _open
```



---
## fetch_range
```python
from dask import fetch_range
```



---
## _upload_chunk
```python
from dask import _upload_chunk
```



---
## _initiate_upload
```python
from dask import _initiate_upload
```

Create remote file/upload

---
## _fetch_range
```python
from dask import _fetch_range
```

Get the specified set of bytes from remote

---
## HTTPFileSystem
```python
from http import HTTPFileSystem
```

Simple File-System for fetching data via HTTP(S)

``ls()`` is implemented by loading the parent page and doing a regex
match on the result. If simple_link=True, anything of the form
"http(s)://server.com/stuff?thing=other"; otherwise only links within
HTML href tags will be used.

---
## HTTPFile
```python
from http import HTTPFile
```

A file-like object pointing to a remove HTTP(S) resource

Supports only reading, with read-ahead of a predermined block-size.

In the case that the server does not supply the filesize, only reading of
the complete file in one go is supported.

Parameters
----------
url: str
    Full URL of the remote resource, including the protocol
session: aiohttp.ClientSession or None
    All calls will be made within this session, to avoid restarting
    connections where the server allows this
block_size: int or None
    The amount of read-ahead to do, in bytes. Default is 5MB, or the value
    configured for the FileSystem creating this file
size: None or int
    If given, this is the size of the file in bytes, and we don't attempt
    to call the server to find the value.
kwargs: all other key-values are passed to requests calls.

---
## reopen
```python
from http import reopen
```



---
## has_magic
```python
from http import has_magic
```



---
## HTTPStreamFile
```python
from http import HTTPStreamFile
```



---
## AsyncStreamFile
```python
from http import AsyncStreamFile
```



---
## __init__
```python
from http import __init__
```



---
## fsid
```python
from http import fsid
```



---
## encode_url
```python
from http import encode_url
```



---
## close_session
```python
from http import close_session
```



---
## _strip_protocol
```python
from http import _strip_protocol
```

For HTTP, we always want to keep the full URL

---
## _parent
```python
from http import _parent
```



---
## _raise_not_found_for_status
```python
from http import _raise_not_found_for_status
```

Raises FileNotFoundError for 404s, otherwise uses raise_for_status.

---
## _open
```python
from http import _open
```

Make a file-like object

Parameters
----------
path: str
    Full URL with protocol
mode: string
    must be "rb"
block_size: int or None
    Bytes to download in one request; use instance value if None. If
    zero, will return a streaming Requests file-like instance.
kwargs: key-value
    Any other parameters, passed to requests calls

---
## ukey
```python
from http import ukey
```

Unique identifier; assume HTTP files are static, unchanging

---
## read
```python
from http import read
```

Read bytes from file

Parameters
----------
length: int
    Read up to this many bytes. If negative, read all content to end of
    file. If the server has not supplied the filesize, attempting to
    read only part of the data will raise a ValueError.

---
## _parse_content_range
```python
from http import _parse_content_range
```

Parse the Content-Range header

---
## __reduce__
```python
from http import __reduce__
```



---
## seek
```python
from http import seek
```



---
## close
```python
from http import close
```



---
## ReferenceNotReachable
```python
from reference import ReferenceNotReachable
```



---
## _first
```python
from reference import _first
```



---
## _prot_in_references
```python
from reference import _prot_in_references
```



---
## _protocol_groups
```python
from reference import _protocol_groups
```



---
## RefsValuesView
```python
from reference import RefsValuesView
```



---
## RefsItemsView
```python
from reference import RefsItemsView
```



---
## ravel_multi_index
```python
from reference import ravel_multi_index
```



---
## LazyReferenceMapper
```python
from reference import LazyReferenceMapper
```

This interface can be used to read/write references from Parquet stores.
It is not intended for other types of references.
It can be used with Kerchunk's MultiZarrToZarr method to combine
references into a parquet store.
Examples of this use-case can be found here:
https://fsspec.github.io/kerchunk/advanced.html?highlight=parquet#parquet-storage

---
## ReferenceFileSystem
```python
from reference import ReferenceFileSystem
```

View byte ranges of some other file as a file system
Initial version: single file system target, which must support
async, and must allow start and end args in _cat_file. Later versions
may allow multiple arbitrary URLs for the targets.
This FileSystem is read-only. It is designed to be used with async
targets (for now). This FileSystem only allows whole-file access, no
``open``. We do not get original file details from the target FS.
Configuration is by passing a dict of references at init, or a URL to
a JSON file containing the same; this dict
can also contain concrete data for some set of paths.
Reference dict format:
{path0: bytes_data, path1: (target_url, offset, size)}
https://github.com/fsspec/kerchunk/blob/main/README.md

---
## __str__
```python
from reference import __str__
```



---
## __iter__
```python
from reference import __iter__
```



---
## np
```python
from reference import np
```



---
## pd
```python
from reference import pd
```



---
## __getattr__
```python
from reference import __getattr__
```



---
## setup
```python
from reference import setup
```



---
## create
```python
from reference import create
```

Make empty parquet reference set

First deletes the contents of the given directory, if it exists.

Parameters
----------
root: str
    Directory to contain the output; will be created
storage_options: dict | None
    For making the filesystem to use for writing is fs is None
fs: FileSystem | None
    Filesystem for writing
record_size: int
    Number of references per parquet file
kwargs: passed to __init__

Returns
-------
LazyReferenceMapper instance

---
## listdir
```python
from reference import listdir
```

List top-level directories

---
## ls
```python
from reference import ls
```



---
## _load_one_key
```python
from reference import _load_one_key
```

Get the reference for one key

Returns bytes, one-element list or three-element list.

---
## _key_to_record
```python
from reference import _key_to_record
```

Details needed to construct a reference for one key

---
## _get_chunk_sizes
```python
from reference import _get_chunk_sizes
```

The number of chunks along each axis for a given field

---
## _generate_record
```python
from reference import _generate_record
```

The references for a given parquet file of a given field

---
## _generate_all_records
```python
from reference import _generate_all_records
```

Load all the references within a field by iterating over the parquet files

---
## values
```python
from reference import values
```



---
## items
```python
from reference import items
```



---
## __hash__
```python
from reference import __hash__
```



---
## __getitem__
```python
from reference import __getitem__
```



---
## __setitem__
```python
from reference import __setitem__
```



---
## _is_meta
```python
from reference import _is_meta
```



---
## __delitem__
```python
from reference import __delitem__
```



---
## write
```python
from reference import write
```



---
## flush
```python
from reference import flush
```

Output any modified or deleted keys

Parameters
----------
base_url: str
    Location of the output

---
## __len__
```python
from reference import __len__
```



---
## __contains__
```python
from reference import __contains__
```



---
## _keys_in_field
```python
from reference import _keys_in_field
```

List key names in given field

Produces strings like "field/x.y" appropriate from the chunking of the array

---
## _cat_common
```python
from reference import _cat_common
```



---
## cat_file
```python
from reference import cat_file
```



---
## pipe_file
```python
from reference import pipe_file
```

Temporarily add binary data or reference as a file

---
## get_file
```python
from reference import get_file
```



---
## get
```python
from reference import get
```



---
## cat
```python
from reference import cat
```



---
## _process_references
```python
from reference import _process_references
```



---
## _process_references0
```python
from reference import _process_references0
```

Make reference dict for Spec Version 0

---
## _process_references1
```python
from reference import _process_references1
```



---
## _process_templates
```python
from reference import _process_templates
```



---
## _process_gen
```python
from reference import _process_gen
```



---
## _dircache_from_items
```python
from reference import _dircache_from_items
```



---
## _open
```python
from reference import _open
```



---
## exists
```python
from reference import exists
```



---
## isdir
```python
from reference import isdir
```



---
## isfile
```python
from reference import isfile
```



---
## find
```python
from reference import find
```



---
## info
```python
from reference import info
```



---
## save_json
```python
from reference import save_json
```

Write modified references into new location

---
## open_refs
```python
from reference import open_refs
```

cached parquet file loader

---
## _render_jinja
```python
from reference import _render_jinja
```



---
## __name__
```python
from cache_mapper import __name__
```



---
## AbstractCacheMapper
```python
from cache_mapper import AbstractCacheMapper
```

Abstract super-class for mappers from remote URLs to local cached
basenames.

---
## BasenameCacheMapper
```python
from cache_mapper import BasenameCacheMapper
```

Cache mapper that uses the basename of the remote URL and a fixed number
of directory levels above this.

The default is zero directory levels, meaning different paths with the same
basename will have the same cached basename.

---
## HashCacheMapper
```python
from cache_mapper import HashCacheMapper
```

Cache mapper that uses a hash of the remote URL.

---
## create_cache_mapper
```python
from cache_mapper import create_cache_mapper
```

Factory method to create cache mapper for backward compatibility with
``CachingFileSystem`` constructor using ``same_names`` kwarg.

---
## __call__
```python
from cache_mapper import __call__
```



---
## __eq__
```python
from cache_mapper import __eq__
```



---
## __hash__
```python
from cache_mapper import __hash__
```



---
## __init__
```python
from cache_mapper import __init__
```



---
## __name__
```python
from sftp import __name__
```



---
## SFTPFileSystem
```python
from sftp import SFTPFileSystem
```

Files over SFTP/SSH

Peer-to-peer filesystem over SSH using paramiko.

Note: if using this with the ``open`` or ``open_files``, with full URLs,
there is no way to tell if a path is relative, so all paths are assumed
to be absolute.

---
## commit_a_file
```python
from sftp import commit_a_file
```



---
## discard_a_file
```python
from sftp import discard_a_file
```



---
## __init__
```python
from sftp import __init__
```

Parameters
----------
host: str
    Hostname or IP as a string
temppath: str
    Location on the server to put files, when within a transaction
ssh_kwargs: dict
    Parameters passed on to connection. See details in
    https://docs.paramiko.org/en/3.3/api/client.html#paramiko.client.SSHClient.connect
    May include port, username, password...

---
## _connect
```python
from sftp import _connect
```



---
## _strip_protocol
```python
from sftp import _strip_protocol
```



---
## _get_kwargs_from_urls
```python
from sftp import _get_kwargs_from_urls
```



---
## mkdir
```python
from sftp import mkdir
```



---
## makedirs
```python
from sftp import makedirs
```



---
## rmdir
```python
from sftp import rmdir
```



---
## info
```python
from sftp import info
```



---
## _decode_stat
```python
from sftp import _decode_stat
```



---
## ls
```python
from sftp import ls
```



---
## put
```python
from sftp import put
```



---
## get_file
```python
from sftp import get_file
```



---
## _open
```python
from sftp import _open
```

block_size: int or None
If 0, no buffering, if 1, line buffering, if >1, buffer that many
bytes, if None use default from paramiko.

---
## _rm
```python
from sftp import _rm
```



---
## mv
```python
from sftp import mv
```



---
## __name__
```python
from github import __name__
```



---
## GithubFileSystem
```python
from github import GithubFileSystem
```

Interface to files in github

An instance of this class provides the files residing within a remote github
repository. You may specify a point in the repos history, by SHA, branch
or tag (default is current master).

Given that code files tend to be small, and that github does not support
retrieving partial content, we always fetch whole files.

When using fsspec.open, allows URIs of the form:

- "github://path/file", in which case you must specify org, repo and
  may specify sha in the extra args
- 'github://org:repo@/precip/catalog.yml', where the org and repo are
  part of the URI
- 'github://org:repo@sha/precip/catalog.yml', where the sha is also included

``sha`` can be the full or abbreviated hex of the commit you want to fetch
from, or a branch or tag name (so long as it doesn't contain special characters
like "/", "?", which would have to be HTTP-encoded).

For authorised access, you must provide username and token, which can be made
at https://github.com/settings/tokens

---
## __init__
```python
from github import __init__
```



---
## kw
```python
from github import kw
```



---
## repos
```python
from github import repos
```

List repo names for given org or user

This may become the top level of the FS

Parameters
----------
org_or_user: str
    Name of the github org or user to query
is_org: bool (default True)
    Whether the name is an organisation (True) or user (False)

Returns
-------
List of string

---
## tags
```python
from github import tags
```

Names of tags in the repo

---
## branches
```python
from github import branches
```

Names of branches in the repo

---
## refs
```python
from github import refs
```

Named references, tags and branches

---
## ls
```python
from github import ls
```

List files at given path

Parameters
----------
path: str
    Location to list, relative to repo root
detail: bool
    If True, returns list of dicts, one per file; if False, returns
    list of full filenames only
sha: str (optional)
    List at the given point in the repo history, branch or tag name or commit
    SHA
_sha: str (optional)
    List this specific tree object (used internally to descend into trees)

---
## invalidate_cache
```python
from github import invalidate_cache
```



---
## _strip_protocol
```python
from github import _strip_protocol
```



---
## _get_kwargs_from_urls
```python
from github import _get_kwargs_from_urls
```



---
## _open
```python
from github import _open
```



---
## cat
```python
from github import cat
```



---
## __name__
```python
from ftp import __name__
```



---
## FTPFileSystem
```python
from ftp import FTPFileSystem
```

A filesystem over classic FTP

---
## TransferDone
```python
from ftp import TransferDone
```

Internal exception to break out of transfer

---
## FTPFile
```python
from ftp import FTPFile
```

Interact with a remote FTP file with read/write buffering

---
## _mlsd2
```python
from ftp import _mlsd2
```

Fall back to using `dir` instead of `mlsd` if not supported.

This parses a Linux style `ls -l` response to `dir`, but the response may
be platform dependent.

Parameters
----------
ftp: ftplib.FTP
path: str
    Expects to be given path, but defaults to ".".

---
## __init__
```python
from ftp import __init__
```



---
## _connect
```python
from ftp import _connect
```



---
## _strip_protocol
```python
from ftp import _strip_protocol
```



---
## _get_kwargs_from_urls
```python
from ftp import _get_kwargs_from_urls
```



---
## ls
```python
from ftp import ls
```



---
## info
```python
from ftp import info
```



---
## get_file
```python
from ftp import get_file
```



---
## cat_file
```python
from ftp import cat_file
```



---
## _open
```python
from ftp import _open
```



---
## _rm
```python
from ftp import _rm
```



---
## rm
```python
from ftp import rm
```



---
## mkdir
```python
from ftp import mkdir
```



---
## makedirs
```python
from ftp import makedirs
```



---
## rmdir
```python
from ftp import rmdir
```



---
## mv
```python
from ftp import mv
```



---
## __del__
```python
from ftp import __del__
```



---
## invalidate_cache
```python
from ftp import invalidate_cache
```



---
## commit
```python
from ftp import commit
```



---
## discard
```python
from ftp import discard
```



---
## _fetch_range
```python
from ftp import _fetch_range
```

Get bytes between given byte limits

Implemented by raising an exception in the fetch callback when the
number of bytes received reaches the requested amount.

Will fail if the server does not respect the REST command on
retrieve requests.

---
## _upload_chunk
```python
from ftp import _upload_chunk
```



---
## cb
```python
from ftp import cb
```



---
## callback
```python
from ftp import callback
```



---
## DataFileSystem
```python
from data import DataFileSystem
```

A handy decoder for data-URLs

Example
-------
>>> with fsspec.open("data:,Hello%2C%20World%21") as f:
...     print(f.read())
b"Hello, World!"

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs

---
## cat_file
```python
from data import cat_file
```



---
## info
```python
from data import info
```



---
## _open
```python
from data import _open
```



---
## encode
```python
from data import encode
```

Format the given data into data-URL syntax

This version always base64 encodes, even when the data is ascii/url-safe.

---
## JupyterFileSystem
```python
from jupyter import JupyterFileSystem
```

View of the files as seen by a Jupyter server (notebook or lab)

---
## SimpleFileWriter
```python
from jupyter import SimpleFileWriter
```



---
## ls
```python
from jupyter import ls
```



---
## cat_file
```python
from jupyter import cat_file
```



---
## pipe_file
```python
from jupyter import pipe_file
```



---
## mkdir
```python
from jupyter import mkdir
```



---
## _rm
```python
from jupyter import _rm
```



---
## _open
```python
from jupyter import _open
```



---
## _upload_chunk
```python
from jupyter import _upload_chunk
```

Never uploads a chunk until file is done

Not suitable for large files

---
## __name__
```python
from put import __name__
```



---
## AbstractPutTests
```python
from put import AbstractPutTests
```



---
## test_put_file_to_existing_directory
```python
from put import test_put_file_to_existing_directory
```



---
## test_put_file_to_new_directory
```python
from put import test_put_file_to_new_directory
```



---
## test_put_file_to_file_in_existing_directory
```python
from put import test_put_file_to_file_in_existing_directory
```



---
## test_put_file_to_file_in_new_directory
```python
from put import test_put_file_to_file_in_new_directory
```



---
## test_put_directory_to_existing_directory
```python
from put import test_put_directory_to_existing_directory
```



---
## test_put_directory_to_new_directory
```python
from put import test_put_directory_to_new_directory
```



---
## test_put_glob_to_existing_directory
```python
from put import test_put_glob_to_existing_directory
```



---
## test_put_glob_to_new_directory
```python
from put import test_put_glob_to_new_directory
```



---
## test_put_glob_edge_cases
```python
from put import test_put_glob_edge_cases
```



---
## test_put_list_of_files_to_existing_directory
```python
from put import test_put_list_of_files_to_existing_directory
```



---
## test_put_list_of_files_to_new_directory
```python
from put import test_put_list_of_files_to_new_directory
```



---
## test_put_directory_recursive
```python
from put import test_put_directory_recursive
```



---
## test_put_directory_without_files_with_same_name_prefix
```python
from put import test_put_directory_without_files_with_same_name_prefix
```



---
## test_copy_with_source_and_destination_as_list
```python
from put import test_copy_with_source_and_destination_as_list
```



---
## __name__
```python
from mv import __name__
```



---
## test_move_raises_error_with_tmpdir
```python
from mv import test_move_raises_error_with_tmpdir
```



---
## test_move_raises_error_with_tmpdir_permission
```python
from mv import test_move_raises_error_with_tmpdir_permission
```



---
## BaseAbstractFixtures
```python
from __init__ import BaseAbstractFixtures
```

Abstract base class containing fixtures that are used by but never need to
be overridden in derived filesystem-specific classes to run the abstract
tests on such filesystems.

---
## AbstractFixtures
```python
from __init__ import AbstractFixtures
```

Abstract base class containing fixtures that may be overridden in derived
filesystem-specific classes to run the abstract tests on such filesystems.

For any particular filesystem some of these fixtures must be overridden,
such as ``fs`` and ``fs_path``, and others may be overridden if the
default functions here are not appropriate, such as ``fs_join``.

---
## fs_bulk_operations_scenario_0
```python
from __init__ import fs_bulk_operations_scenario_0
```

Scenario on remote filesystem that is used for many cp/get/put tests.

Cleans up at the end of each test it which it is used.

---
## fs_glob_edge_cases_files
```python
from __init__ import fs_glob_edge_cases_files
```

Scenario on remote filesystem that is used for glob edge cases cp/get/put tests.

Cleans up at the end of each test it which it is used.

---
## fs_dir_and_file_with_same_name_prefix
```python
from __init__ import fs_dir_and_file_with_same_name_prefix
```

Scenario on remote filesystem that is used to check cp/get/put on directory
and file with the same name prefixes.

Cleans up at the end of each test it which it is used.

---
## fs_10_files_with_hashed_names
```python
from __init__ import fs_10_files_with_hashed_names
```

Scenario on remote filesystem that is used to check cp/get/put files order
when source and destination are lists.

Cleans up at the end of each test it which it is used.

---
## fs_target
```python
from __init__ import fs_target
```

Return name of remote directory that does not yet exist to copy into.

Cleans up at the end of each test it which it is used.

---
## local_bulk_operations_scenario_0
```python
from __init__ import local_bulk_operations_scenario_0
```

Scenario on local filesystem that is used for many cp/get/put tests.

Cleans up at the end of each test it which it is used.

---
## local_glob_edge_cases_files
```python
from __init__ import local_glob_edge_cases_files
```

Scenario on local filesystem that is used for glob edge cases cp/get/put tests.

Cleans up at the end of each test it which it is used.

---
## local_dir_and_file_with_same_name_prefix
```python
from __init__ import local_dir_and_file_with_same_name_prefix
```

Scenario on local filesystem that is used to check cp/get/put on directory
and file with the same name prefixes.

Cleans up at the end of each test it which it is used.

---
## local_10_files_with_hashed_names
```python
from __init__ import local_10_files_with_hashed_names
```

Scenario on local filesystem that is used to check cp/get/put files order
when source and destination are lists.

Cleans up at the end of each test it which it is used.

---
## local_target
```python
from __init__ import local_target
```

Return name of local directory that does not yet exist to copy into.

Cleans up at the end of each test it which it is used.

---
## _glob_edge_cases_files
```python
from __init__ import _glob_edge_cases_files
```

Scenario that is used for glob edge cases cp/get/put tests.
Creates the following directory and file structure:

📁 source
├── 📄 file1
├── 📄 file2
├── 📁 subdir0
│   ├── 📄 subfile1
│   ├── 📄 subfile2
│   └── 📁 nesteddir
│       └── 📄 nestedfile
└── 📁 subdir1
    ├── 📄 subfile1
    ├── 📄 subfile2
    └── 📁 nesteddir
        └── 📄 nestedfile

---
## _bulk_operations_scenario_0
```python
from __init__ import _bulk_operations_scenario_0
```

Scenario that is used for many cp/get/put tests. Creates the following
directory and file structure:

📁 source
├── 📄 file1
├── 📄 file2
└── 📁 subdir
    ├── 📄 subfile1
    ├── 📄 subfile2
    └── 📁 nesteddir
        └── 📄 nestedfile

---
## _dir_and_file_with_same_name_prefix
```python
from __init__ import _dir_and_file_with_same_name_prefix
```

Scenario that is used to check cp/get/put on directory and file with
the same name prefixes. Creates the following directory and file structure:

📁 source
├── 📄 subdir.txt
└── 📁 subdir
    └── 📄 subfile.txt

---
## _10_files_with_hashed_names
```python
from __init__ import _10_files_with_hashed_names
```

Scenario that is used to check cp/get/put files order when source and
destination are lists. Creates the following directory and file structure:

📁 source
└── 📄 {hashed([0-9])}.txt

---
## fs
```python
from __init__ import fs
```



---
## fs_join
```python
from __init__ import fs_join
```

Return a function that joins its arguments together into a path.

Most fsspec implementations join paths in a platform-dependent way,
but some will override this to always use a forward slash.

---
## fs_path
```python
from __init__ import fs_path
```



---
## local_fs
```python
from __init__ import local_fs
```



---
## local_join
```python
from __init__ import local_join
```

Return a function that joins its arguments together into a path, on
the local filesystem.

---
## local_path
```python
from __init__ import local_path
```



---
## supports_empty_directories
```python
from __init__ import supports_empty_directories
```

Return whether this implementation supports empty directories.

---
## fs_sanitize_path
```python
from __init__ import fs_sanitize_path
```



---
## __name__
```python
from copy import __name__
```



---
## AbstractCopyTests
```python
from copy import AbstractCopyTests
```



---
## test_copy_file_to_existing_directory
```python
from copy import test_copy_file_to_existing_directory
```



---
## test_copy_file_to_new_directory
```python
from copy import test_copy_file_to_new_directory
```



---
## test_copy_file_to_file_in_existing_directory
```python
from copy import test_copy_file_to_file_in_existing_directory
```



---
## test_copy_file_to_file_in_new_directory
```python
from copy import test_copy_file_to_file_in_new_directory
```



---
## test_copy_directory_to_existing_directory
```python
from copy import test_copy_directory_to_existing_directory
```



---
## test_copy_directory_to_new_directory
```python
from copy import test_copy_directory_to_new_directory
```



---
## test_copy_glob_to_existing_directory
```python
from copy import test_copy_glob_to_existing_directory
```



---
## test_copy_glob_to_new_directory
```python
from copy import test_copy_glob_to_new_directory
```



---
## test_copy_glob_edge_cases
```python
from copy import test_copy_glob_edge_cases
```



---
## test_copy_list_of_files_to_existing_directory
```python
from copy import test_copy_list_of_files_to_existing_directory
```



---
## test_copy_list_of_files_to_new_directory
```python
from copy import test_copy_list_of_files_to_new_directory
```



---
## test_copy_two_files_new_directory
```python
from copy import test_copy_two_files_new_directory
```



---
## test_copy_directory_without_files_with_same_name_prefix
```python
from copy import test_copy_directory_without_files_with_same_name_prefix
```



---
## test_copy_with_source_and_destination_as_list
```python
from copy import test_copy_with_source_and_destination_as_list
```



---
## __name__
```python
from get import __name__
```



---
## AbstractGetTests
```python
from get import AbstractGetTests
```



---
## test_get_file_to_existing_directory
```python
from get import test_get_file_to_existing_directory
```



---
## test_get_file_to_new_directory
```python
from get import test_get_file_to_new_directory
```



---
## test_get_file_to_file_in_existing_directory
```python
from get import test_get_file_to_file_in_existing_directory
```



---
## test_get_file_to_file_in_new_directory
```python
from get import test_get_file_to_file_in_new_directory
```



---
## test_get_directory_to_existing_directory
```python
from get import test_get_directory_to_existing_directory
```



---
## test_get_directory_to_new_directory
```python
from get import test_get_directory_to_new_directory
```



---
## test_get_glob_to_existing_directory
```python
from get import test_get_glob_to_existing_directory
```



---
## test_get_glob_to_new_directory
```python
from get import test_get_glob_to_new_directory
```



---
## test_get_glob_edge_cases
```python
from get import test_get_glob_edge_cases
```



---
## test_get_list_of_files_to_existing_directory
```python
from get import test_get_list_of_files_to_existing_directory
```



---
## test_get_list_of_files_to_new_directory
```python
from get import test_get_list_of_files_to_new_directory
```



---
## test_get_directory_recursive
```python
from get import test_get_directory_recursive
```



---
## test_get_directory_without_files_with_same_name_prefix
```python
from get import test_get_directory_without_files_with_same_name_prefix
```



---
## test_get_with_source_and_destination_as_list
```python
from get import test_get_with_source_and_destination_as_list
```



---
## __name__
```python
from extra import __name__
```

A compilation of various Python-Markdown extensions that imitates
[PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/).

Note that each of the individual extensions still need to be available
on your `PYTHONPATH`. This extension simply wraps them all up as a
convenience so that only one extension needs to be listed when
initiating Markdown. See the documentation for each individual
extension for specifics about that extension.

There may be additional extensions that are distributed with
Python-Markdown that are not included here in Extra. Those extensions
are not part of PHP Markdown Extra, and therefore, not part of
Python-Markdown Extra. If you really would like Extra to include
additional extensions, we suggest creating your own clone of Extra
under a different name. You could also edit the `extensions` global
variable defined below, but be aware that such changes may be lost
when you upgrade to any future version of Python-Markdown.

See the [documentation](https://Python-Markdown.github.io/extensions/extra)
for details.

---
## ExtraExtension
```python
from extra import ExtraExtension
```

Add various extensions to Markdown class.

---
## makeExtension
```python
from extra import makeExtension
```



---
## __init__
```python
from extra import __init__
```

`config` is a dumb holder which gets passed to the actual extension later. 

---
## extendMarkdown
```python
from extra import extendMarkdown
```

Register extension instances. 

---
## __name__
```python
from toc import __name__
```

Deals with generating the per-page table of contents.

For the sake of simplicity we use the Python-Markdown `toc` extension to
generate a list of dicts for each toc item, and then store it as AnchorLinks to
maintain compatibility with older versions of MkDocs.

---
## slugify
```python
from toc import slugify
```

Slugify a string, to make it URL friendly. 

---
## slugify_unicode
```python
from toc import slugify_unicode
```

Slugify a string, to make it URL friendly while preserving Unicode characters. 

---
## unique
```python
from toc import unique
```

Ensure id is unique in set of ids. Append '_1', '_2'... if not 

---
## get_name
```python
from toc import get_name
```

Get title name.

---
## stashedHTML2text
```python
from toc import stashedHTML2text
```

Extract raw HTML from stash, reduce to plain text and swap with placeholder. 

---
## unescape
```python
from toc import unescape
```

Unescape Markdown backslash escaped text. 

---
## strip_tags
```python
from toc import strip_tags
```

Strip HTML tags and return plain text. Note: HTML entities are unaffected. 

---
## escape_cdata
```python
from toc import escape_cdata
```

Escape character data. 

---
## run_postprocessors
```python
from toc import run_postprocessors
```

Run postprocessors from Markdown instance on text. 

---
## render_inner_html
```python
from toc import render_inner_html
```

Fully render inner html of an `etree` element as a string. 

---
## remove_fnrefs
```python
from toc import remove_fnrefs
```

Remove footnote references from a copy of the element, if any are present. 

---
## nest_toc_tokens
```python
from toc import nest_toc_tokens
```

Given an unsorted list with errors and skips, return a nested one.

    [{'level': 1}, {'level': 2}]
    =>
    [{'level': 1, 'children': [{'level': 2, 'children': []}]}]

A wrong list is also converted:

    [{'level': 2}, {'level': 1}]
    =>
    [{'level': 2, 'children': []}, {'level': 1, 'children': []}]

---
## TocTreeprocessor
```python
from toc import TocTreeprocessor
```

Step through document and build TOC. 

---
## TocExtension
```python
from toc import TocExtension
```



---
## makeExtension
```python
from toc import makeExtension
```



---
## _html_sub
```python
from toc import _html_sub
```

Substitute raw html with plain text. 

---
## __init__
```python
from toc import __init__
```



---
## iterparent
```python
from toc import iterparent
```

Iterator wrapper to get allowed parent and child all at once. 

---
## replace_marker
```python
from toc import replace_marker
```

Replace marker with elem. 

---
## set_level
```python
from toc import set_level
```

Adjust header level according to base level. 

---
## add_anchor
```python
from toc import add_anchor
```



---
## add_permalink
```python
from toc import add_permalink
```



---
## build_toc_div
```python
from toc import build_toc_div
```

Return a string div given a toc list. 

---
## run
```python
from toc import run
```



---
## extendMarkdown
```python
from toc import extendMarkdown
```

Add TOC tree processor to Markdown. 

---
## reset
```python
from toc import reset
```



---
## build_etree_ul
```python
from toc import build_etree_ul
```



---
## __name__
```python
from abbr import __name__
```

This extension adds abbreviation handling to Python-Markdown.

See the [documentation](https://Python-Markdown.github.io/extensions/abbreviations)
for details.

---
## AbbrExtension
```python
from abbr import AbbrExtension
```

Abbreviation Extension for Python-Markdown. 

---
## AbbrTreeprocessor
```python
from abbr import AbbrTreeprocessor
```

Replace abbreviation text with `<abbr>` elements. 

---
## AbbrBlockprocessor
```python
from abbr import AbbrBlockprocessor
```

Parse text for abbreviation references. 

---
## AbbrInlineProcessor
```python
from abbr import AbbrInlineProcessor
```

Abbreviation inline pattern. 

---
## makeExtension
```python
from abbr import makeExtension
```



---
## __init__
```python
from abbr import __init__
```



---
## reset
```python
from abbr import reset
```

Clear all previously defined abbreviations. 

---
## reset_glossary
```python
from abbr import reset_glossary
```

Clear all abbreviations from the glossary. 

---
## load_glossary
```python
from abbr import load_glossary
```

Adds `dictionary` to our glossary. Any abbreviations that already exist will be overwritten.

---
## extendMarkdown
```python
from abbr import extendMarkdown
```

Insert `AbbrTreeprocessor` and `AbbrBlockprocessor`. 

---
## iter_element
```python
from abbr import iter_element
```

Recursively iterate over elements, run regex on text and wrap matches in `abbr` tags. 

---
## run
```python
from abbr import run
```

Find and remove all abbreviation references from the text.
Each reference is added to the abbreviation collection.

---
## test
```python
from abbr import test
```



---
## handleMatch
```python
from abbr import handleMatch
```



---
## __name__
```python
from legacy_em import __name__
```

This extension provides legacy behavior for _connected_words_.

---
## LegacyUnderscoreProcessor
```python
from legacy_em import LegacyUnderscoreProcessor
```

Emphasis processor for handling strong and em matches inside underscores.

---
## LegacyEmExtension
```python
from legacy_em import LegacyEmExtension
```

Add legacy_em extension to Markdown class.

---
## makeExtension
```python
from legacy_em import makeExtension
```

Return an instance of the `LegacyEmExtension` 

---
## extendMarkdown
```python
from legacy_em import extendMarkdown
```

Modify inline patterns. 

---
## __name__
```python
from admonition import __name__
```

Adds rST-style admonitions. Inspired by [rST][] feature with the same name.

[rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions

See the [documentation](https://Python-Markdown.github.io/extensions/admonition)
for details.

---
## AdmonitionExtension
```python
from admonition import AdmonitionExtension
```

Admonition extension for Python-Markdown. 

---
## AdmonitionProcessor
```python
from admonition import AdmonitionProcessor
```



---
## makeExtension
```python
from admonition import makeExtension
```



---
## extendMarkdown
```python
from admonition import extendMarkdown
```

Add Admonition to Markdown instance. 

---
## __init__
```python
from admonition import __init__
```

Initialization.

---
## parse_content
```python
from admonition import parse_content
```

Get sibling admonition.

Retrieve the appropriate sibling element. This can get tricky when
dealing with lists.

---
## test
```python
from admonition import test
```



---
## run
```python
from admonition import run
```



---
## get_class_and_title
```python
from admonition import get_class_and_title
```



---
## Extension
```python
from __init__ import Extension
```

Base class for extensions to subclass. 

---
## getConfig
```python
from __init__ import getConfig
```

Return a single configuration option value.

Arguments:
    key: The configuration option name.
    default: Default value to return if key is not set.

Returns:
    Value of stored configuration option.

---
## getConfigs
```python
from __init__ import getConfigs
```

Return all configuration options.

Returns:
    All configuration options.

---
## getConfigInfo
```python
from __init__ import getConfigInfo
```

Return descriptions of all configuration options.

Returns:
    All descriptions of configuration options.

---
## setConfig
```python
from __init__ import setConfig
```

Set a configuration option.

If the corresponding default value set in [`config`][markdown.extensions.Extension.config]
is a `bool` value or `None`, then `value` is passed through
[`parseBoolValue`][markdown.util.parseBoolValue] before being stored.

Arguments:
    key: Name of configuration option to set.
    value: Value to assign to option.

Raises:
    KeyError: If `key` is not known.

---
## setConfigs
```python
from __init__ import setConfigs
```

Loop through a collection of configuration options, passing each to
[`setConfig`][markdown.extensions.Extension.setConfig].

Arguments:
    items: Collection of configuration options.

Raises:
    KeyError: for any unknown key.

---
## extendMarkdown
```python
from __init__ import extendMarkdown
```

Add the various processors and patterns to the Markdown Instance.

This method must be overridden by every extension.

Arguments:
    md: The Markdown instance.

---
## __name__
```python
from legacy_attrs import __name__
```

An extension to Python Markdown which implements legacy attributes.

Prior to Python-Markdown version 3.0, the Markdown class had an `enable_attributes`
keyword which was on by default and provided for attributes to be defined for elements
using the format `{@key=value}`. This extension is provided as a replacement for
backward compatibility. New documents should be authored using `attr_lists`. However,
numerous documents exist which have been using the old attribute format for many
years. This extension can be used to continue to render those documents correctly.

---
## LegacyAttrs
```python
from legacy_attrs import LegacyAttrs
```



---
## LegacyAttrExtension
```python
from legacy_attrs import LegacyAttrExtension
```



---
## makeExtension
```python
from legacy_attrs import makeExtension
```



---
## run
```python
from legacy_attrs import run
```

Find and set values of attributes ({@key=value}). 

---
## handleAttributes
```python
from legacy_attrs import handleAttributes
```

Set attributes and return text without definitions. 

---
## extendMarkdown
```python
from legacy_attrs import extendMarkdown
```

Add `LegacyAttrs` to Markdown instance. 

---
## attributeCallback
```python
from legacy_attrs import attributeCallback
```



---
## __name__
```python
from smarty import __name__
```

Adds conversion of ASCII dashes, quotes and ellipses to their HTML
entity equivalents.

See the [documentation](https://Python-Markdown.github.io/extensions/smarty)
for details.

---
## SubstituteTextPattern
```python
from smarty import SubstituteTextPattern
```



---
## SmartyExtension
```python
from smarty import SmartyExtension
```

Add Smarty to Markdown. 

---
## makeExtension
```python
from smarty import makeExtension
```



---
## __init__
```python
from smarty import __init__
```



---
## handleMatch
```python
from smarty import handleMatch
```



---
## _addPatterns
```python
from smarty import _addPatterns
```



---
## educateDashes
```python
from smarty import educateDashes
```



---
## educateEllipses
```python
from smarty import educateEllipses
```



---
## educateAngledQuotes
```python
from smarty import educateAngledQuotes
```



---
## educateQuotes
```python
from smarty import educateQuotes
```



---
## extendMarkdown
```python
from smarty import extendMarkdown
```



---
## __name__
```python
from wikilinks import __name__
```

Converts `[[WikiLinks]]` to relative links.

See the [documentation](https://Python-Markdown.github.io/extensions/wikilinks)
for details.

---
## build_url
```python
from wikilinks import build_url
```

Build a URL from the label, a base, and an end. 

---
## WikiLinkExtension
```python
from wikilinks import WikiLinkExtension
```

Add inline processor to Markdown. 

---
## WikiLinksInlineProcessor
```python
from wikilinks import WikiLinksInlineProcessor
```

Build link from `wikilink`. 

---
## makeExtension
```python
from wikilinks import makeExtension
```



---
## __init__
```python
from wikilinks import __init__
```



---
## extendMarkdown
```python
from wikilinks import extendMarkdown
```



---
## handleMatch
```python
from wikilinks import handleMatch
```



---
## _getMeta
```python
from wikilinks import _getMeta
```

Return meta data or `config` data. 

---
## __name__
```python
from codehilite import __name__
```

Adds code/syntax highlighting to standard Python-Markdown code blocks.

See the [documentation](https://Python-Markdown.github.io/extensions/code_hilite)
for details.

---
## parse_hl_lines
```python
from codehilite import parse_hl_lines
```

Support our syntax for emphasizing certain lines of code.

`expr` should be like '1 2' to emphasize lines 1 and 2 of a code block.
Returns a list of integers, the line numbers to emphasize.

---
## CodeHilite
```python
from codehilite import CodeHilite
```

Determine language of source code, and pass it on to the Pygments highlighter.

Usage:

```python
code = CodeHilite(src=some_code, lang='python')
html = code.hilite()
```

Arguments:
    src: Source string or any object with a `.readline` attribute.

Keyword arguments:
    lang (str): String name of Pygments lexer to use for highlighting. Default: `None`.
    guess_lang (bool): Auto-detect which lexer to use.
        Ignored if `lang` is set to a valid value. Default: `True`.
    use_pygments (bool): Pass code to Pygments for code highlighting. If `False`, the code is
        instead wrapped for highlighting by a JavaScript library. Default: `True`.
    pygments_formatter (str): The name of a Pygments formatter or a formatter class used for
        highlighting the code blocks. Default: `html`.
    linenums (bool): An alias to Pygments `linenos` formatter option. Default: `None`.
    css_class (str): An alias to Pygments `cssclass` formatter option. Default: 'codehilite'.
    lang_prefix (str): Prefix prepended to the language. Default: "language-".

Other Options:

Any other options are accepted and passed on to the lexer and formatter. Therefore,
valid options include any options which are accepted by the `html` formatter or
whichever lexer the code's language uses. Note that most lexers do not have any
options. However, a few have very useful options, such as PHP's `startinline` option.
Any invalid options are ignored without error.

* **Formatter options**: <https://pygments.org/docs/formatters/#HtmlFormatter>
* **Lexer Options**: <https://pygments.org/docs/lexers/>

Additionally, when Pygments is enabled, the code's language is passed to the
formatter as an extra option `lang_str`, whose value being `{lang_prefix}{lang}`.
This option has no effect to the Pygments' builtin formatters.

Advanced Usage:

```python
code = CodeHilite(
    src = some_code,
    lang = 'php',
    startinline = True,      # Lexer option. Snippet does not start with `<?php`.
    linenostart = 42,        # Formatter option. Snippet starts on line 42.
    hl_lines = [45, 49, 50], # Formatter option. Highlight lines 45, 49, and 50.
    linenos = 'inline'       # Formatter option. Avoid alignment problems.
)
html = code.hilite()
```

---
## HiliteTreeprocessor
```python
from codehilite import HiliteTreeprocessor
```

Highlight source code in code blocks. 

---
## CodeHiliteExtension
```python
from codehilite import CodeHiliteExtension
```

Add source code highlighting to markdown code blocks. 

---
## makeExtension
```python
from codehilite import makeExtension
```



---
## __init__
```python
from codehilite import __init__
```



---
## hilite
```python
from codehilite import hilite
```

Pass code to the [Pygments](https://pygments.org/) highlighter with
optional line numbers. The output should then be styled with CSS to
your liking. No styles are applied by default - only styling hooks
(i.e.: `<span class="k">`).

returns : A string of html.

---
## _parseHeader
```python
from codehilite import _parseHeader
```

Determines language of a code block from shebang line and whether the
said line should be removed or left in place. If the shebang line
contains a path (even a single /) then it is assumed to be a real
shebang line and left alone. However, if no path is given
(e.i.: `#!python` or `:::python`) then it is assumed to be a mock shebang
for language identification of a code fragment and removed from the
code block prior to processing for code highlighting. When a mock
shebang (e.i: `#!python`) is found, line numbering is turned on. When
colons are found in place of a shebang (e.i.: `:::python`), line
numbering is left in the current state - off by default.

Also parses optional list of highlight lines, like:

    :::python hl_lines="1 3"

---
## code_unescape
```python
from codehilite import code_unescape
```

Unescape code.

---
## run
```python
from codehilite import run
```

Find code blocks and store in `htmlStash`. 

---
## extendMarkdown
```python
from codehilite import extendMarkdown
```

Add `HilitePostprocessor` to Markdown instance. 

---
## __name__
```python
from nl2br import __name__
```

A Python-Markdown extension to treat newlines as hard breaks; like
GitHub-flavored Markdown does.

See the [documentation](https://Python-Markdown.github.io/extensions/nl2br)
for details.

---
## Nl2BrExtension
```python
from nl2br import Nl2BrExtension
```



---
## makeExtension
```python
from nl2br import makeExtension
```



---
## extendMarkdown
```python
from nl2br import extendMarkdown
```

Add a `SubstituteTagInlineProcessor` to Markdown. 

---
## __name__
```python
from fenced_code import __name__
```

This extension adds Fenced Code Blocks to Python-Markdown.

See the [documentation](https://Python-Markdown.github.io/extensions/fenced_code_blocks)
for details.

---
## FencedCodeExtension
```python
from fenced_code import FencedCodeExtension
```



---
## FencedBlockPreprocessor
```python
from fenced_code import FencedBlockPreprocessor
```

Find and extract fenced code blocks. 

---
## makeExtension
```python
from fenced_code import makeExtension
```



---
## __init__
```python
from fenced_code import __init__
```



---
## extendMarkdown
```python
from fenced_code import extendMarkdown
```

Add `FencedBlockPreprocessor` to the Markdown instance. 

---
## run
```python
from fenced_code import run
```

Match and store Fenced Code Blocks in the `HtmlStash`. 

---
## handle_attrs
```python
from fenced_code import handle_attrs
```

Return tuple: `(id, [list, of, classes], {configs})` 

---
## _escape
```python
from fenced_code import _escape
```

basic html escaping 

---
## __name__
```python
from attr_list import __name__
```

Adds attribute list syntax. Inspired by
[Maruku](http://maruku.rubyforge.org/proposal.html#attribute_lists)'s
feature of the same name.

See the [documentation](https://Python-Markdown.github.io/extensions/attr_list)
for details.

---
## _handle_double_quote
```python
from attr_list import _handle_double_quote
```



---
## _handle_single_quote
```python
from attr_list import _handle_single_quote
```



---
## _handle_key_value
```python
from attr_list import _handle_key_value
```



---
## _handle_word
```python
from attr_list import _handle_word
```



---
## get_attrs_and_remainder
```python
from attr_list import get_attrs_and_remainder
```

Parse attribute list and return a list of attribute tuples.

Additionally, return any text that remained after a curly brace. In typical cases, its presence
should mean that the input does not match the intended attribute list syntax.

---
## get_attrs
```python
from attr_list import get_attrs
```

Soft-deprecated. Prefer `get_attrs_and_remainder`. 

---
## isheader
```python
from attr_list import isheader
```



---
## AttrListTreeprocessor
```python
from attr_list import AttrListTreeprocessor
```



---
## AttrListExtension
```python
from attr_list import AttrListExtension
```

Attribute List extension for Python-Markdown 

---
## makeExtension
```python
from attr_list import makeExtension
```



---
## run
```python
from attr_list import run
```



---
## assign_attrs
```python
from attr_list import assign_attrs
```

Assign `attrs` to element.

If the `attrs_string` has an extra closing curly brace, the remaining text is returned.

The `strict` argument controls whether to still assign `attrs` if there is a remaining `}`.

---
## sanitize_name
```python
from attr_list import sanitize_name
```

Sanitize name as 'an XML Name, minus the `:`.'
See <https://www.w3.org/TR/REC-xml-names/#NT-NCName>.

---
## extendMarkdown
```python
from attr_list import extendMarkdown
```



---
## TableProcessor
```python
from tables import TableProcessor
```

Process Tables. 

---
## TableExtension
```python
from tables import TableExtension
```

Add tables to Markdown. 

---
## makeExtension
```python
from tables import makeExtension
```



---
## test
```python
from tables import test
```

Ensure first two rows (column header and separator row) are valid table rows.

Keep border check and separator row do avoid repeating the work.

---
## _build_empty_row
```python
from tables import _build_empty_row
```

Build an empty row.

---
## _build_row
```python
from tables import _build_row
```

Given a row of text, build table cells. 

---
## _split_row
```python
from tables import _split_row
```

split a row of text into list of cells. 

---
## _split
```python
from tables import _split
```

split a row of text with some code into a list of cells. 

---
## extendMarkdown
```python
from tables import extendMarkdown
```

Add an instance of `TableProcessor` to `BlockParser`. 

---
## __name__
```python
from sane_lists import __name__
```

Modify the behavior of Lists in Python-Markdown to act in a sane manor.

See [documentation](https://Python-Markdown.github.io/extensions/sane_lists)
for details.

---
## SaneOListProcessor
```python
from sane_lists import SaneOListProcessor
```

Override `SIBLING_TAGS` to not include `ul` and set `LAZY_OL` to `False`. 

---
## SaneUListProcessor
```python
from sane_lists import SaneUListProcessor
```

Override `SIBLING_TAGS` to not include `ol`. 

---
## SaneListExtension
```python
from sane_lists import SaneListExtension
```

Add sane lists to Markdown. 

---
## makeExtension
```python
from sane_lists import makeExtension
```



---
## __init__
```python
from sane_lists import __init__
```



---
## extendMarkdown
```python
from sane_lists import extendMarkdown
```

Override existing Processors. 

---
## __name__
```python
from md_in_html import __name__
```

An implementation of [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/)'s
parsing of Markdown syntax in raw HTML.

See the [documentation](https://Python-Markdown.github.io/extensions/raw_html)
for details.

---
## HTMLExtractorExtra
```python
from md_in_html import HTMLExtractorExtra
```

Override `HTMLExtractor` and create `etree` `Elements` for any elements which should have content parsed as
Markdown.

---
## HtmlBlockPreprocessor
```python
from md_in_html import HtmlBlockPreprocessor
```

Remove html blocks from the text and store them for later retrieval.

---
## MarkdownInHtmlProcessor
```python
from md_in_html import MarkdownInHtmlProcessor
```

Process Markdown Inside HTML Blocks which have been stored in the `HtmlStash`.

---
## MarkdownInHTMLPostprocessor
```python
from md_in_html import MarkdownInHTMLPostprocessor
```



---
## MarkdownInHtmlExtension
```python
from md_in_html import MarkdownInHtmlExtension
```

Add Markdown parsing in HTML to Markdown class.

---
## makeExtension
```python
from md_in_html import makeExtension
```



---
## __init__
```python
from md_in_html import __init__
```



---
## reset
```python
from md_in_html import reset
```

Reset this instance.  Loses all unprocessed data.

---
## close
```python
from md_in_html import close
```

Handle any buffered data.

---
## get_element
```python
from md_in_html import get_element
```

Return element from `treebuilder` and reset `treebuilder` for later use. 

---
## get_state
```python
from md_in_html import get_state
```

Return state from tag and `markdown` attribute. One of 'block', 'span', or 'off'. 

---
## handle_starttag
```python
from md_in_html import handle_starttag
```



---
## handle_endtag
```python
from md_in_html import handle_endtag
```



---
## handle_startendtag
```python
from md_in_html import handle_startendtag
```



---
## handle_data
```python
from md_in_html import handle_data
```



---
## handle_empty_tag
```python
from md_in_html import handle_empty_tag
```



---
## parse_pi
```python
from md_in_html import parse_pi
```



---
## parse_html_declaration
```python
from md_in_html import parse_html_declaration
```



---
## run
```python
from md_in_html import run
```



---
## test
```python
from md_in_html import test
```



---
## parse_element_content
```python
from md_in_html import parse_element_content
```

Recursively parse the text content of an `etree` Element as Markdown.

Any block level elements generated from the Markdown will be inserted as children of the element in place
of the text content. All `markdown` attributes are removed. For any elements in which Markdown parsing has
been disabled, the text content of it and its children are wrapped in an `AtomicString`.

---
## stash_to_string
```python
from md_in_html import stash_to_string
```

Override default to handle any `etree` elements still in the stash. 

---
## extendMarkdown
```python
from md_in_html import extendMarkdown
```

Register extension instances. 

---
## __name__
```python
from footnotes import __name__
```

Adds footnote handling to Python-Markdown.

See the [documentation](https://Python-Markdown.github.io/extensions/footnotes)
for details.

---
## FootnoteExtension
```python
from footnotes import FootnoteExtension
```

Footnote Extension. 

---
## FootnoteBlockProcessor
```python
from footnotes import FootnoteBlockProcessor
```

Find all footnote references and store for later use. 

---
## FootnoteInlineProcessor
```python
from footnotes import FootnoteInlineProcessor
```

`InlineProcessor` for footnote markers in a document's body text. 

---
## FootnotePostTreeprocessor
```python
from footnotes import FootnotePostTreeprocessor
```

Amend footnote div with duplicates. 

---
## FootnoteTreeprocessor
```python
from footnotes import FootnoteTreeprocessor
```

Build and append footnote div to end of document. 

---
## FootnotePostprocessor
```python
from footnotes import FootnotePostprocessor
```

Replace placeholders with html entities. 

---
## makeExtension
```python
from footnotes import makeExtension
```

Return an instance of the `FootnoteExtension` 

---
## __init__
```python
from footnotes import __init__
```



---
## extendMarkdown
```python
from footnotes import extendMarkdown
```

Add pieces to Markdown. 

---
## reset
```python
from footnotes import reset
```

Clear footnotes on reset, and prepare for distinct document. 

---
## unique_ref
```python
from footnotes import unique_ref
```

Get a unique reference if there are duplicates. 

---
## findFootnotesPlaceholder
```python
from footnotes import findFootnotesPlaceholder
```

Return ElementTree Element that contains Footnote placeholder. 

---
## setFootnote
```python
from footnotes import setFootnote
```

Store a footnote for later retrieval. 

---
## get_separator
```python
from footnotes import get_separator
```

Get the footnote separator. 

---
## makeFootnoteId
```python
from footnotes import makeFootnoteId
```

Return footnote link id. 

---
## makeFootnoteRefId
```python
from footnotes import makeFootnoteRefId
```

Return footnote back-link id. 

---
## makeFootnotesDiv
```python
from footnotes import makeFootnotesDiv
```

Return `div` of footnotes as `etree` Element. 

---
## test
```python
from footnotes import test
```



---
## run
```python
from footnotes import run
```



---
## detectTabbed
```python
from footnotes import detectTabbed
```

Find indented text and remove indent before further processing.

Returns:
    A list of blocks with indentation removed.

---
## detab
```python
from footnotes import detab
```

Remove one level of indent from a block.

Preserve lazily indented blocks by only removing indent from indented lines.

---
## handleMatch
```python
from footnotes import handleMatch
```



---
## add_duplicates
```python
from footnotes import add_duplicates
```

Adjust current `li` and add the duplicates: `fnref2`, `fnref3`, etc. 

---
## get_num_duplicates
```python
from footnotes import get_num_duplicates
```

Get the number of duplicate refs of the footnote. 

---
## handle_duplicates
```python
from footnotes import handle_duplicates
```

Find duplicate footnotes and format and add the duplicates. 

---
## finder
```python
from footnotes import finder
```



---
## __name__
```python
from def_list import __name__
```

Adds parsing of Definition Lists to Python-Markdown.

See the [documentation](https://Python-Markdown.github.io/extensions/definition_lists)
for details.

---
## DefListProcessor
```python
from def_list import DefListProcessor
```

Process Definition Lists. 

---
## DefListIndentProcessor
```python
from def_list import DefListIndentProcessor
```

Process indented children of definition list items. 

---
## DefListExtension
```python
from def_list import DefListExtension
```

Add definition lists to Markdown. 

---
## makeExtension
```python
from def_list import makeExtension
```



---
## test
```python
from def_list import test
```



---
## run
```python
from def_list import run
```



---
## create_item
```python
from def_list import create_item
```

Create a new `dd` or `li` (depending on parent) and parse the block with it as the parent. 

---
## extendMarkdown
```python
from def_list import extendMarkdown
```

Add an instance of `DefListProcessor` to `BlockParser`. 

---
## MetaExtension
```python
from meta import MetaExtension
```

Meta-Data extension for Python-Markdown. 

---
## MetaPreprocessor
```python
from meta import MetaPreprocessor
```

Get Meta-Data. 

---
## makeExtension
```python
from meta import makeExtension
```



---
## extendMarkdown
```python
from meta import extendMarkdown
```

Add `MetaPreprocessor` to Markdown instance. 

---
## reset
```python
from meta import reset
```



---
## run
```python
from meta import run
```

Parse Meta-Data and store in Markdown.Meta. 

---
## __name__
```python
from test_jsonschema import __name__
```



---
## test_schemas_with_explicit_schema_keywords_are_detected
```python
from test_jsonschema import test_schemas_with_explicit_schema_keywords_are_detected
```

The $schema keyword in JSON Schema is a dialect identifier.

---
## test_unknown_dialect
```python
from test_jsonschema import test_unknown_dialect
```



---
## test_id_of_mapping
```python
from test_jsonschema import test_id_of_mapping
```



---
## test_id_of_bool
```python
from test_jsonschema import test_id_of_bool
```



---
## test_anchors_in_bool
```python
from test_jsonschema import test_anchors_in_bool
```



---
## test_subresources_of_bool
```python
from test_jsonschema import test_subresources_of_bool
```



---
## test_specification_with
```python
from test_jsonschema import test_specification_with
```



---
## test_specification_with_no_empty_fragment
```python
from test_jsonschema import test_specification_with_no_empty_fragment
```



---
## test_specification_with_unknown_dialect
```python
from test_jsonschema import test_specification_with_unknown_dialect
```



---
## test_specification_with_default
```python
from test_jsonschema import test_specification_with_default
```



---
## test_lookup_trivial_dynamic_ref
```python
from test_jsonschema import test_lookup_trivial_dynamic_ref
```



---
## test_multiple_lookup_trivial_dynamic_ref
```python
from test_jsonschema import test_multiple_lookup_trivial_dynamic_ref
```



---
## test_multiple_lookup_dynamic_ref_to_nondynamic_ref
```python
from test_jsonschema import test_multiple_lookup_dynamic_ref_to_nondynamic_ref
```



---
## test_lookup_trivial_recursive_ref
```python
from test_jsonschema import test_lookup_trivial_recursive_ref
```



---
## test_lookup_recursive_ref_to_bool
```python
from test_jsonschema import test_lookup_recursive_ref_to_bool
```



---
## test_multiple_lookup_recursive_ref_to_bool
```python
from test_jsonschema import test_multiple_lookup_recursive_ref_to_bool
```



---
## test_multiple_lookup_recursive_ref_with_nonrecursive_ref
```python
from test_jsonschema import test_multiple_lookup_recursive_ref_with_nonrecursive_ref
```



---
## test_empty_registry
```python
from test_jsonschema import test_empty_registry
```



---
## __name__
```python
from test_retrieval import __name__
```



---
## TestToCachedResource
```python
from test_retrieval import TestToCachedResource
```



---
## test_it_caches_retrieved_resources
```python
from test_retrieval import test_it_caches_retrieved_resources
```



---
## test_custom_loader
```python
from test_retrieval import test_custom_loader
```



---
## test_custom_from_contents
```python
from test_retrieval import test_custom_from_contents
```



---
## test_custom_cache
```python
from test_retrieval import test_custom_cache
```



---
## retrieve
```python
from test_retrieval import retrieve
```



---
## __name__
```python
from test_core import __name__
```

Tests suite for MaskedArray & subclassing.

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu

---
## blow_up
```python
from test_core import blow_up
```

A retriever suitable for use in tests which expect it never to be used.

---
## TestRegistry
```python
from test_core import TestRegistry
```



---
## TestResource
```python
from test_core import TestResource
```



---
## TestResolver
```python
from test_core import TestResolver
```



---
## TestSpecification
```python
from test_core import TestSpecification
```



---
## TestOpaqueSpecification
```python
from test_core import TestOpaqueSpecification
```



---
## test_nonsubclassable
```python
from test_core import test_nonsubclassable
```



---
## test_with_resource
```python
from test_core import test_with_resource
```

Adding a resource to the registry then allows re-retrieving it.

---
## test_with_resources
```python
from test_core import test_with_resources
```

Adding multiple resources to the registry is like adding each one.

---
## test_matmul_resource
```python
from test_core import test_matmul_resource
```



---
## test_matmul_many_resources
```python
from test_core import test_matmul_many_resources
```



---
## test_matmul_resource_without_id
```python
from test_core import test_matmul_resource_without_id
```



---
## test_with_contents_from_json_schema
```python
from test_core import test_with_contents_from_json_schema
```



---
## test_with_contents_and_default_specification
```python
from test_core import test_with_contents_and_default_specification
```



---
## test_len
```python
from test_core import test_len
```



---
## test_bool_empty
```python
from test_core import test_bool_empty
```



---
## test_bool_not_empty
```python
from test_core import test_bool_not_empty
```



---
## test_iter
```python
from test_core import test_iter
```



---
## test_crawl_still_has_top_level_resource
```python
from test_core import test_crawl_still_has_top_level_resource
```



---
## test_crawl_finds_a_subresource
```python
from test_core import test_crawl_finds_a_subresource
```



---
## test_crawl_finds_anchors_with_id
```python
from test_core import test_crawl_finds_anchors_with_id
```



---
## test_crawl_finds_anchors_no_id
```python
from test_core import test_crawl_finds_anchors_no_id
```



---
## test_contents
```python
from test_core import test_contents
```



---
## test_getitem_strips_empty_fragments
```python
from test_core import test_getitem_strips_empty_fragments
```



---
## test_contents_strips_empty_fragments
```python
from test_core import test_contents_strips_empty_fragments
```



---
## test_contents_nonexistent_resource
```python
from test_core import test_contents_nonexistent_resource
```



---
## test_crawled_anchor
```python
from test_core import test_crawled_anchor
```



---
## test_anchor_in_nonexistent_resource
```python
from test_core import test_anchor_in_nonexistent_resource
```



---
## test_init
```python
from test_core import test_init
```



---
## test_dict_conversion
```python
from test_core import test_dict_conversion
```

Passing a `dict` to `Registry` gets converted to a `HashTrieMap`.

So continuing to use the registry works.

---
## test_no_such_resource
```python
from test_core import test_no_such_resource
```



---
## test_combine
```python
from test_core import test_combine
```



---
## test_combine_self
```python
from test_core import test_combine_self
```

Combining a registry with itself short-circuits.

This is a performance optimization -- otherwise we do lots more work
(in jsonschema this seems to correspond to making the test suite take
 *3x* longer).

---
## test_combine_with_uncrawled_resources
```python
from test_core import test_combine_with_uncrawled_resources
```



---
## test_combine_with_single_retrieve
```python
from test_core import test_combine_with_single_retrieve
```



---
## test_combine_with_common_retrieve
```python
from test_core import test_combine_with_common_retrieve
```



---
## test_combine_conflicting_retrieve
```python
from test_core import test_combine_conflicting_retrieve
```



---
## test_remove
```python
from test_core import test_remove
```



---
## test_remove_uncrawled
```python
from test_core import test_remove_uncrawled
```



---
## test_remove_with_anchors
```python
from test_core import test_remove_with_anchors
```



---
## test_remove_nonexistent_uri
```python
from test_core import test_remove_nonexistent_uri
```



---
## test_retrieve
```python
from test_core import test_retrieve
```



---
## test_retrieve_arbitrary_exception
```python
from test_core import test_retrieve_arbitrary_exception
```



---
## test_retrieve_no_such_resource
```python
from test_core import test_retrieve_no_such_resource
```



---
## test_retrieve_cannot_determine_specification
```python
from test_core import test_retrieve_cannot_determine_specification
```



---
## test_retrieve_already_available_resource
```python
from test_core import test_retrieve_already_available_resource
```



---
## test_retrieve_first_checks_crawlable_resource
```python
from test_core import test_retrieve_first_checks_crawlable_resource
```



---
## test_resolver
```python
from test_core import test_resolver
```



---
## test_resolver_with_root_identified
```python
from test_core import test_resolver_with_root_identified
```



---
## test_resolver_with_root_unidentified
```python
from test_core import test_resolver_with_root_unidentified
```



---
## test_repr
```python
from test_core import test_repr
```



---
## test_repr_mixed_crawled
```python
from test_core import test_repr_mixed_crawled
```



---
## test_repr_one_resource
```python
from test_core import test_repr_one_resource
```



---
## test_repr_empty
```python
from test_core import test_repr_empty
```



---
## test_from_contents_from_json_schema
```python
from test_core import test_from_contents_from_json_schema
```



---
## test_from_contents_with_no_discernible_information
```python
from test_core import test_from_contents_with_no_discernible_information
```

Creating a resource with no discernible way to see what
specification it belongs to (e.g. no ``$schema`` keyword for JSON
Schema) raises an error.

---
## test_from_contents_with_no_discernible_information_and_default
```python
from test_core import test_from_contents_with_no_discernible_information_and_default
```



---
## test_from_contents_unneeded_default
```python
from test_core import test_from_contents_unneeded_default
```



---
## test_non_mapping_from_contents
```python
from test_core import test_non_mapping_from_contents
```



---
## test_from_contents_with_fallback
```python
from test_core import test_from_contents_with_fallback
```



---
## test_id_delegates_to_specification
```python
from test_core import test_id_delegates_to_specification
```



---
## test_id_strips_empty_fragment
```python
from test_core import test_id_strips_empty_fragment
```



---
## test_subresources_delegates_to_specification
```python
from test_core import test_subresources_delegates_to_specification
```



---
## test_subresource_with_different_specification
```python
from test_core import test_subresource_with_different_specification
```



---
## test_anchors_delegates_to_specification
```python
from test_core import test_anchors_delegates_to_specification
```



---
## test_pointer_to_mapping
```python
from test_core import test_pointer_to_mapping
```



---
## test_pointer_to_array
```python
from test_core import test_pointer_to_array
```



---
## test_root_pointer
```python
from test_core import test_root_pointer
```



---
## test_opaque
```python
from test_core import test_opaque
```



---
## test_lookup_exact_uri
```python
from test_core import test_lookup_exact_uri
```



---
## test_lookup_subresource
```python
from test_core import test_lookup_subresource
```



---
## test_lookup_anchor_with_id
```python
from test_core import test_lookup_anchor_with_id
```



---
## test_lookup_anchor_without_id
```python
from test_core import test_lookup_anchor_without_id
```



---
## test_lookup_unknown_reference
```python
from test_core import test_lookup_unknown_reference
```



---
## test_lookup_non_existent_pointer
```python
from test_core import test_lookup_non_existent_pointer
```



---
## test_lookup_non_existent_pointer_to_array_index
```python
from test_core import test_lookup_non_existent_pointer_to_array_index
```



---
## test_lookup_pointer_to_empty_string
```python
from test_core import test_lookup_pointer_to_empty_string
```



---
## test_lookup_non_existent_pointer_to_empty_string
```python
from test_core import test_lookup_non_existent_pointer_to_empty_string
```



---
## test_lookup_non_existent_anchor
```python
from test_core import test_lookup_non_existent_anchor
```



---
## test_lookup_invalid_JSON_pointerish_anchor
```python
from test_core import test_lookup_invalid_JSON_pointerish_anchor
```



---
## test_lookup_retrieved_resource
```python
from test_core import test_lookup_retrieved_resource
```



---
## test_lookup_failed_retrieved_resource
```python
from test_core import test_lookup_failed_retrieved_resource
```

Unretrievable exceptions are also wrapped in Unresolvable.

---
## test_repeated_lookup_from_retrieved_resource
```python
from test_core import test_repeated_lookup_from_retrieved_resource
```

A (custom-)retrieved resource is added to the registry returned by
looking it up.

---
## test_repeated_anchor_lookup_from_retrieved_resource
```python
from test_core import test_repeated_anchor_lookup_from_retrieved_resource
```



---
## test_in_subresource
```python
from test_core import test_in_subresource
```



---
## test_in_pointer_subresource
```python
from test_core import test_in_pointer_subresource
```



---
## test_dynamic_scope
```python
from test_core import test_dynamic_scope
```



---
## test_create_resource
```python
from test_core import test_create_resource
```



---
## test_detect_from_json_schema
```python
from test_core import test_detect_from_json_schema
```



---
## test_detect_with_no_discernible_information
```python
from test_core import test_detect_with_no_discernible_information
```



---
## test_detect_with_non_URI_schema
```python
from test_core import test_detect_with_non_URI_schema
```



---
## test_detect_with_no_discernible_information_and_default
```python
from test_core import test_detect_with_no_discernible_information_and_default
```



---
## test_detect_unneeded_default
```python
from test_core import test_detect_unneeded_default
```



---
## test_non_mapping_detect
```python
from test_core import test_non_mapping_detect
```



---
## test_non_mapping_detect_with_default
```python
from test_core import test_non_mapping_detect_with_default
```



---
## test_detect_with_fallback
```python
from test_core import test_detect_with_fallback
```



---
## test_no_id
```python
from test_core import test_no_id
```

An arbitrary thing has no ID.

---
## test_no_subresources
```python
from test_core import test_no_subresources
```

An arbitrary thing has no subresources.

---
## test_no_anchors
```python
from test_core import test_no_anchors
```

An arbitrary thing has no anchors.

---
## retrieve
```python
from test_core import retrieve
```



---
## foo_retrieve
```python
from test_core import foo_retrieve
```



---
## bar_retrieve
```python
from test_core import bar_retrieve
```



---
## Boom
```python
from test_core import Boom
```



---
## pairs
```python
from test_exceptions import pairs
```



---
## test_eq_incompatible_types
```python
from test_exceptions import test_eq_incompatible_types
```



---
## test_hash
```python
from test_exceptions import test_hash
```



---
## __name__
```python
from test_referencing_suite import __name__
```



---
## SuiteNotFound
```python
from test_referencing_suite import SuiteNotFound
```



---
## test_referencing_suite
```python
from test_referencing_suite import test_referencing_suite
```



---
## __str__
```python
from test_referencing_suite import __str__
```



---
## __name__
```python
from gzip import __name__
```



---
## GZipMiddleware
```python
from gzip import GZipMiddleware
```



---
## GZipResponder
```python
from gzip import GZipResponder
```



---
## __init__
```python
from gzip import __init__
```



---
## SessionMiddleware
```python
from sessions import SessionMiddleware
```



---
## __name__
```python
from cors import __name__
```



---
## CORSMiddleware
```python
from cors import CORSMiddleware
```



---
## __init__
```python
from cors import __init__
```



---
## is_allowed_origin
```python
from cors import is_allowed_origin
```



---
## preflight_response
```python
from cors import preflight_response
```



---
## allow_explicit_origin
```python
from cors import allow_explicit_origin
```



---
## _MiddlewareClass
```python
from __init__ import _MiddlewareClass
```



---
## Middleware
```python
from __init__ import Middleware
```



---
## __name__
```python
from httpsredirect import __name__
```



---
## HTTPSRedirectMiddleware
```python
from httpsredirect import HTTPSRedirectMiddleware
```



---
## __init__
```python
from httpsredirect import __init__
```



---
## __name__
```python
from trustedhost import __name__
```



---
## TrustedHostMiddleware
```python
from trustedhost import TrustedHostMiddleware
```



---
## __init__
```python
from trustedhost import __init__
```



---
## AuthenticationMiddleware
```python
from authentication import AuthenticationMiddleware
```



---
## default_on_error
```python
from authentication import default_on_error
```



---
## ExceptionMiddleware
```python
from exceptions import ExceptionMiddleware
```



---
## add_exception_handler
```python
from exceptions import add_exception_handler
```



---
## http_exception
```python
from exceptions import http_exception
```



---
## ServerErrorMiddleware
```python
from errors import ServerErrorMiddleware
```

Handles returning 500 responses when a server error occurs.

If 'debug' is set, then traceback responses will be returned,
otherwise the designated 'handler' will be called.

This middleware class should generally be used to wrap *everything*
else up, so that unhandled exceptions anywhere in the stack
always result in an appropriate 500 response.

---
## format_line
```python
from errors import format_line
```



---
## generate_frame_html
```python
from errors import generate_frame_html
```



---
## generate_html
```python
from errors import generate_html
```



---
## generate_plain_text
```python
from errors import generate_plain_text
```



---
## debug_response
```python
from errors import debug_response
```



---
## error_response
```python
from errors import error_response
```



---
## _CachedRequest
```python
from base import _CachedRequest
```

If the user calls Request.body() from their dispatch function
we cache the entire request body in memory and pass that to downstream middlewares,
but if they call Request.stream() then all we do is send an
empty body so that downstream things don't hang forever.

---
## BaseHTTPMiddleware
```python
from base import BaseHTTPMiddleware
```



---
## _StreamingResponse
```python
from base import _StreamingResponse
```



---
## __name__
```python
from wsgi import __name__
```



---
## build_environ
```python
from wsgi import build_environ
```

Builds a scope and request message into a WSGI environ object.

---
## WSGIMiddleware
```python
from wsgi import WSGIMiddleware
```



---
## WSGIResponder
```python
from wsgi import WSGIResponder
```



---
## __init__
```python
from wsgi import __init__
```



---
## start_response
```python
from wsgi import start_response
```



---
## wsgi
```python
from wsgi import wsgi
```



---
## __name__
```python
from gitwildmatch import __name__
```

This module implements Git's wildmatch pattern matching which itself is derived
from Rsync's wildmatch. Git uses wildmatch for its ".gitignore" files.

---
## GitWildMatchPatternError
```python
from gitwildmatch import GitWildMatchPatternError
```

The :class:`GitWildMatchPatternError` indicates an invalid git wild match
pattern.

---
## GitWildMatchPattern
```python
from gitwildmatch import GitWildMatchPattern
```

The :class:`GitWildMatchPattern` class represents a compiled Git wildmatch
pattern.

---
## GitIgnorePattern
```python
from gitwildmatch import GitIgnorePattern
```

The :class:`GitIgnorePattern` class is deprecated by :class:`GitWildMatchPattern`.
This class only exists to maintain compatibility with v0.4.

---
## pattern_to_regex
```python
from gitwildmatch import pattern_to_regex
```

Warn about deprecation.

---
## _translate_segment_glob
```python
from gitwildmatch import _translate_segment_glob
```

Translates the glob pattern to a regular expression. This is used in the
constructor to translate a path segment glob pattern to its corresponding
regular expression.

*pattern* (:class:`str`) is the glob pattern.

Returns the regular expression (:class:`str`).

---
## escape
```python
from gitwildmatch import escape
```

Escape special characters in the given string.

*s* (:class:`str` or :class:`bytes`) a filename or a string that you want to
escape, usually before adding it to a ".gitignore".

Returns the escaped string (:class:`str` or :class:`bytes`).

---
## __init__
```python
from gitwildmatch import __init__
```

Warn about deprecation.

---
## _deprecated
```python
from gitwildmatch import _deprecated
```

Warn about deprecation.

---
## __name__
```python
from html_block import __name__
```



---
## html_block
```python
from html_block import html_block
```



---
## __name__
```python
from list import __name__
```



---
## skipBulletListMarker
```python
from list import skipBulletListMarker
```



---
## skipOrderedListMarker
```python
from list import skipOrderedListMarker
```



---
## markTightParagraphs
```python
from list import markTightParagraphs
```



---
## list_block
```python
from list import list_block
```



---
## __name__
```python
from fence import __name__
```



---
## fence
```python
from fence import fence
```



---
## __name__
```python
from code import __name__
```



---
## code
```python
from code import code
```



---
## __name__
```python
from lheading import __name__
```



---
## lheading
```python
from lheading import lheading
```



---
## __name__
```python
from hr import __name__
```

Horizontal rule

At least 3 of these characters on a line * - _

---
## hr
```python
from hr import hr
```



---
## __name__
```python
from heading import __name__
```

Atex heading (#, ##, ...) 

---
## heading
```python
from heading import heading
```



---
## __name__
```python
from blockquote import __name__
```



---
## blockquote
```python
from blockquote import blockquote
```



---
## __name__
```python
from paragraph import __name__
```

Paragraph.

---
## paragraph
```python
from paragraph import paragraph
```



---
## reference
```python
from reference import reference
```



---
## getLine
```python
from table import getLine
```



---
## escapedSplit
```python
from table import escapedSplit
```



---
## __name__
```python
from state_block import __name__
```



---
## StateBlock
```python
from state_block import StateBlock
```



---
## __init__
```python
from state_block import __init__
```



---
## __repr__
```python
from state_block import __repr__
```



---
## push
```python
from state_block import push
```

Push new token to "stream".

---
## isEmpty
```python
from state_block import isEmpty
```

.

---
## skipEmptyLines
```python
from state_block import skipEmptyLines
```

.

---
## skipSpaces
```python
from state_block import skipSpaces
```

Skip spaces from given position.

---
## skipSpacesBack
```python
from state_block import skipSpacesBack
```

Skip spaces from given position in reverse.

---
## skipChars
```python
from state_block import skipChars
```

Skip character code from given position.

---
## skipCharsStr
```python
from state_block import skipCharsStr
```

Skip character string from given position.

---
## skipCharsBack
```python
from state_block import skipCharsBack
```

Skip character code reverse from given position - 1.

---
## skipCharsStrBack
```python
from state_block import skipCharsStrBack
```

Skip character string reverse from given position - 1.

---
## getLines
```python
from state_block import getLines
```

Cut lines range from source.

---
## is_code_block
```python
from state_block import is_code_block
```

Check if line is a code block,
i.e. the code block rule is enabled and text is indented by more than 3 spaces.

---
## replaceAt
```python
from smartquotes import replaceAt
```



---
## process_inlines
```python
from smartquotes import process_inlines
```



---
## smartquotes
```python
from smartquotes import smartquotes
```



---
## __name__
```python
from text_join import __name__
```

Join raw text tokens with the rest of the text

This is set as a separate rule to provide an opportunity for plugins
to run text replacements after text join, but before escape join.

For example, `\:)` shouldn't be replaced with an emoji.

---
## text_join
```python
from text_join import text_join
```

Join raw text for escape sequences (`text_special`) tokens with the rest of the text

---
## __name__
```python
from replacements import __name__
```

Simple typographic replacements

* ``(c)``, ``(C)`` → ©
* ``(tm)``, ``(TM)`` → ™
* ``(r)``, ``(R)`` → ®
* ``+-`` → ±
* ``...`` → …
* ``?....`` → ?..
* ``!....`` → !..
* ``????????`` → ???
* ``!!!!!`` → !!!
* ``,,,`` → ,
* ``--`` → &ndash
* ``---`` → &mdash

---
## replaceFn
```python
from replacements import replaceFn
```



---
## replace_scoped
```python
from replacements import replace_scoped
```



---
## replace_rare
```python
from replacements import replace_rare
```



---
## replace
```python
from replacements import replace
```



---
## __name__
```python
from state_core import __name__
```



---
## StateCore
```python
from state_core import StateCore
```



---
## __init__
```python
from state_core import __init__
```



---
## __name__
```python
from linkify import __name__
```

Process links like https://example.org/

---
## linkify
```python
from linkify import linkify
```

Rule for identifying plain-text links.

---
## _LinkType
```python
from linkify import _LinkType
```



---
## __name__
```python
from block import __name__
```



---
## block
```python
from block import block
```



---
## __name__
```python
from inline import __name__
```



---
## inline
```python
from inline import inline
```

Parse inlines

---
## main
```python
from parse import main
```



---
## convert
```python
from parse import convert
```



---
## convert_file
```python
from parse import convert_file
```

Parse a Markdown file and dump the output to stdout.

---
## interactive
```python
from parse import interactive
```

Parse user input, dump to stdout, rinse and repeat.
Python REPL style.

---
## parse_args
```python
from parse import parse_args
```

Parse input CLI arguments.

---
## print_heading
```python
from parse import print_heading
```



---
## __name__
```python
from html_blocks import __name__
```

List of valid html blocks names, according to commonmark spec
http://jgm.github.io/CommonMark/spec.html#html-blocks

---
## __name__
```python
from html_re import __name__
```

Regexps to match html elements

---
## charCodeAt
```python
from utils import charCodeAt
```

Returns the Unicode value of the character at the specified location.

@param - index The zero-based index of the desired character.
If there is no character at the specified index, NaN is returned.

This was added for compatibility with python

---
## charStrAt
```python
from utils import charStrAt
```

Returns the Unicode value of the character at the specified location.

@param - index The zero-based index of the desired character.
If there is no character at the specified index, NaN is returned.

This was added for compatibility with python

---
## arrayReplaceAt
```python
from utils import arrayReplaceAt
```

Remove element from array and put another array at those position.
Useful for some operations with tokens

---
## isValidEntityCode
```python
from utils import isValidEntityCode
```



---
## fromCodePoint
```python
from utils import fromCodePoint
```

Convert ordinal to unicode.

Note, in the original Javascript two string characters were required,
for codepoints larger than `0xFFFF`.
But Python 3 can represent any unicode codepoint in one character.

---
## replaceEntityPattern
```python
from utils import replaceEntityPattern
```

Convert HTML entity patterns,
see https://spec.commonmark.org/0.30/#entity-references

---
## unescapeAll
```python
from utils import unescapeAll
```



---
## stripEscape
```python
from utils import stripEscape
```

Strip escape \ characters

---
## escapeHtml
```python
from utils import escapeHtml
```

Replace special characters "&", "<", ">" and '"' to HTML-safe sequences.

---
## escapeRE
```python
from utils import escapeRE
```



---
## isSpace
```python
from utils import isSpace
```

Check if character code is a whitespace.

---
## isStrSpace
```python
from utils import isStrSpace
```

Check if character is a whitespace.

---
## isWhiteSpace
```python
from utils import isWhiteSpace
```

Zs (unicode class) || [\t\f\v\r\n]

---
## isPunctChar
```python
from utils import isPunctChar
```

Check if character is a punctuation character.

---
## isMdAsciiPunct
```python
from utils import isMdAsciiPunct
```

Markdown ASCII punctuation characters.

::

    !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~

See http://spec.commonmark.org/0.15/#ascii-punctuation-character

Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.

---
## normalizeReference
```python
from utils import normalizeReference
```

Helper to unify [reference labels].

---
## isLinkOpen
```python
from utils import isLinkOpen
```



---
## isLinkClose
```python
from utils import isLinkClose
```



---
## replacer_func
```python
from utils import replacer_func
```



---
## __name__
```python
from normalize_url import __name__
```



---
## normalizeLink
```python
from normalize_url import normalizeLink
```

Normalize destination URLs in links

::

    [label]:   destination   'title'
            ^^^^^^^^^^^

---
## normalizeLinkText
```python
from normalize_url import normalizeLinkText
```

Normalize autolink content

::

    <destination>
     ~~~~~~~~~~~

---
## validateLink
```python
from normalize_url import validateLink
```

Validate URL link is allowed in output.

This validator can prohibit more than really needed to prevent XSS.
It's a tradeoff to keep code simple and to be secure by default.

Note: url should be normalized at this point, and existing entities decoded.

---
## __name__
```python
from entities import __name__
```

HTML5 entities map: { name -> characters }.

---
## __name__
```python
from link import __name__
```



---
## link
```python
from link import link
```



---
## __name__
```python
from escape import __name__
```

Process escaped chars and hardbreaks

---
## escape
```python
from escape import escape
```

Process escaped chars and hardbreaks.

---
## __name__
```python
from autolink import __name__
```



---
## autolink
```python
from autolink import autolink
```



---
## __name__
```python
from strikethrough import __name__
```



---
## tokenize
```python
from strikethrough import tokenize
```

Insert each marker as a separate text token, and add it to delimiter list

---
## _postProcess
```python
from strikethrough import _postProcess
```



---
## postProcess
```python
from strikethrough import postProcess
```

Walk through delimiter list and replace text tokens with tags.

---
## __name__
```python
from html_inline import __name__
```



---
## isLetter
```python
from html_inline import isLetter
```



---
## html_inline
```python
from html_inline import html_inline
```



---
## __name__
```python
from state_inline import __name__
```



---
## Delimiter
```python
from state_inline import Delimiter
```



---
## StateInline
```python
from state_inline import StateInline
```



---
## __init__
```python
from state_inline import __init__
```



---
## __repr__
```python
from state_inline import __repr__
```



---
## pushPending
```python
from state_inline import pushPending
```



---
## push
```python
from state_inline import push
```

Push new token to "stream".
If pending text exists - flush it as text token

---
## scanDelims
```python
from state_inline import scanDelims
```

Scan a sequence of emphasis-like markers, and determine whether
it can start an emphasis sequence or end an emphasis sequence.

 - start - position to scan from (it should point at a valid marker);
 - canSplitWord - determine if these markers can be found inside a word

---
## text
```python
from text import text
```



---
## __name__
```python
from backticks import __name__
```



---
## backtick
```python
from backticks import backtick
```



---
## __name__
```python
from fragments_join import __name__
```



---
## fragments_join
```python
from fragments_join import fragments_join
```

Clean up tokens after emphasis and strikethrough postprocessing:
merge adjacent text nodes into one and re-calculate all token levels

This is necessary because initially emphasis delimiter markers (``*, _, ~``)
are treated as their own separate text tokens. Then emphasis rule either
leaves them as text (needed to merge with adjacent text) or turns them
into opening/closing tags (which messes up levels inside).

---
## __name__
```python
from entity import __name__
```



---
## entity
```python
from entity import entity
```



---
## __name__
```python
from balance_pairs import __name__
```

Balance paired characters (*, _, etc) in inline tokens.

---
## processDelimiters
```python
from balance_pairs import processDelimiters
```

For each opening emphasis-like marker find a matching closing one.

---
## link_pairs
```python
from balance_pairs import link_pairs
```



---
## __name__
```python
from newline import __name__
```

Proceess '
'.

---
## newline
```python
from newline import newline
```



---
## __name__
```python
from emphasis import __name__
```



---
## tokenize
```python
from emphasis import tokenize
```

Insert each marker as a separate text token, and add it to delimiter list

---
## _postProcess
```python
from emphasis import _postProcess
```



---
## postProcess
```python
from emphasis import postProcess
```

Walk through delimiter list and replace text tokens with tags.

---
## image
```python
from image import image
```



---
## __name__
```python
from commonmark import __name__
```

Commonmark default options.

This differs to presets.default,
primarily in that it allows HTML and does not enable components:

- block: table
- inline: strikethrough

---
## make
```python
from commonmark import make
```



---
## gfm_like
```python
from __init__ import gfm_like
```

GitHub Flavoured Markdown (GFM) like.

This adds the linkify, table and strikethrough components to CommmonMark.

Note, it lacks task-list items and raw HTML filtering,
to meet the the full GFM specification
(see https://github.github.com/gfm/#autolinks-extension-).

---
## __name__
```python
from zero import __name__
```

"Zero" preset, with nothing enabled. Useful for manual configuring of simple
modes. For example, to parse bold/italic only.

---
## make
```python
from zero import make
```



---
## make
```python
from default import make
```



---
## __name__
```python
from parse_link_destination import __name__
```

Parse link destination

---
## _Result
```python
from parse_link_destination import _Result
```



---
## parseLinkDestination
```python
from parse_link_destination import parseLinkDestination
```



---
## __init__
```python
from parse_link_destination import __init__
```



---
## __name__
```python
from parse_link_label import __name__
```

Parse link label

this function assumes that first character ("[") already matches
returns the end of the label

---
## parseLinkLabel
```python
from parse_link_label import parseLinkLabel
```



---
## __name__
```python
from parse_link_title import __name__
```

Parse link title

---
## _Result
```python
from parse_link_title import _Result
```



---
## parseLinkTitle
```python
from parse_link_title import parseLinkTitle
```



---
## __init__
```python
from parse_link_title import __init__
```



---
## __str__
```python
from parse_link_title import __str__
```



---
## ParallelBackendConfig
```python
from parallel import ParallelBackendConfig
```



---
## parallel_map
```python
from parallel import parallel_map
```

**Experimental.** Apply a function to iterable elements in parallel, where the implementation uses either
multiprocessing.Pool or joblib for parallelization.

Args:
    function (`Callable[[Any], Any]`): Function to be applied to `iterable`.
    iterable (`list`, `tuple` or `np.ndarray`): Iterable elements to apply function to.
    num_proc (`int`): Number of processes (if no backend specified) or jobs (using joblib).
    types (`tuple`): Additional types (besides `dict` values) to apply `function` recursively to their elements.
    disable_tqdm (`bool`): Whether to disable the tqdm progressbar.
    desc (`str`): Prefix for the tqdm progressbar.
    single_map_nested_func (`Callable`): Map function that applies `function` to an element from `iterable`.
        Takes a tuple of function, data_struct, types, rank, disable_tqdm, desc as input, where data_struct is an
        element of `iterable`, and `rank` is used for progress bar.

---
## _map_with_multiprocessing_pool
```python
from parallel import _map_with_multiprocessing_pool
```



---
## _map_with_joblib
```python
from parallel import _map_with_joblib
```



---
## parallel_backend
```python
from parallel import parallel_backend
```

**Experimental.**  Configures the parallel backend for parallelized dataset loading, which uses the parallelization
implemented by joblib.

Args:
    backend_name (str): Name of backend for parallelization implementation, has to be supported by joblib.

 Example usage:
 ```py
 with parallel_backend('spark'):
   dataset = load_dataset(..., num_proc=2)
 ```

---
## get_writer_batch_size
```python
from parquet import get_writer_batch_size
```

Get the writer_batch_size that defines the maximum row group size in the parquet files.
The default in `datasets` is 1,000 but we lower it to 100 for image datasets.
This allows to optimize random access to parquet file, since accessing 1 row requires
to read its entire row group.

This can be improved to get optimized size for querying/iterating
but at least it matches the dataset viewer expectations on HF.

Args:
    ds_config_info (`datasets.info.DatasetInfo`):
        Dataset info from `datasets`.
Returns:
    writer_batch_size (`Optional[int]`):
        Writer batch size to pass to a dataset builder.
        If `None`, then it will use the `datasets` default.

---
## ParquetDatasetReader
```python
from parquet import ParquetDatasetReader
```



---
## ParquetDatasetWriter
```python
from parquet import ParquetDatasetWriter
```



---
## set_batch_size
```python
from parquet import set_batch_size
```



---
## read
```python
from parquet import read
```



---
## write
```python
from parquet import write
```



---
## _write
```python
from parquet import _write
```

Writes the pyarrow table as Parquet to a binary file handle.

Caller is responsible for opening and closing the handle.

---
## GeneratorDatasetInputStream
```python
from generator import GeneratorDatasetInputStream
```



---
## __init__
```python
from generator import __init__
```



---
## read
```python
from generator import read
```



---
## CsvDatasetReader
```python
from csv import CsvDatasetReader
```



---
## CsvDatasetWriter
```python
from csv import CsvDatasetWriter
```



---
## __init__
```python
from csv import __init__
```



---
## read
```python
from csv import read
```



---
## write
```python
from csv import write
```



---
## _batch_csv
```python
from csv import _batch_csv
```



---
## _write
```python
from csv import _write
```

Writes the pyarrow table as CSV to a binary file handle.

Caller is responsible for opening and closing the handle.

---
## TextDatasetReader
```python
from text import TextDatasetReader
```



---
## read
```python
from text import read
```



---
## __name__
```python
from spark import __name__
```



---
## SparkDatasetReader
```python
from spark import SparkDatasetReader
```

A dataset reader that reads from a Spark DataFrame.

When caching, cache materialization is parallelized over Spark; an NFS that is accessible to the driver must be
provided. Streaming is not currently supported.

---
## __init__
```python
from spark import __init__
```



---
## read
```python
from spark import read
```



---
## SqlDatasetReader
```python
from sql import SqlDatasetReader
```



---
## SqlDatasetWriter
```python
from sql import SqlDatasetWriter
```



---
## read
```python
from sql import read
```



---
## write
```python
from sql import write
```



---
## _batch_sql
```python
from sql import _batch_sql
```



---
## _write
```python
from sql import _write
```

Writes the pyarrow table as SQL to a database.

Caller is responsible for opening and closing the SQL connection.

---
## JsonDatasetReader
```python
from json import JsonDatasetReader
```



---
## JsonDatasetWriter
```python
from json import JsonDatasetWriter
```



---
## read
```python
from json import read
```



---
## write
```python
from json import write
```



---
## _batch_json
```python
from json import _batch_json
```



---
## _write
```python
from json import _write
```

Writes the pyarrow table as JSON lines to a binary file handle.

Caller is responsible for opening and closing the handle.

---
## AbstractDatasetReader
```python
from abc import AbstractDatasetReader
```



---
## AbstractDatasetInputStream
```python
from abc import AbstractDatasetInputStream
```



---
## read
```python
from abc import read
```



---
## _arrow_to_datasets_dtype
```python
from features import _arrow_to_datasets_dtype
```

_arrow_to_datasets_dtype takes a pyarrow.DataType and converts it to a datasets string dtype.
In effect, `dt == string_to_arrow(_arrow_to_datasets_dtype(dt))`

---
## string_to_arrow
```python
from features import string_to_arrow
```

string_to_arrow takes a datasets string dtype and converts it to a pyarrow.DataType.

In effect, `dt == string_to_arrow(_arrow_to_datasets_dtype(dt))`

This is necessary because the datasets.Value() primitive type is constructed using a string dtype

Value(dtype=str)

But Features.type (via `get_nested_type()` expects to resolve Features into a pyarrow Schema,
    which means that each Value() must be able to resolve into a corresponding pyarrow.DataType, which is the
    purpose of this function.

---
## _cast_to_python_objects
```python
from features import _cast_to_python_objects
```

Cast pytorch/tensorflow/pandas objects to python numpy array/lists.
It works recursively.

If `optimize_list_casting` is True, to avoid iterating over possibly long lists, it first checks (recursively) if the first element that is not None or empty (if it is a sequence) has to be casted.
If the first element needs to be casted, then all the elements of the list will be casted, otherwise they'll stay the same.
This trick allows to cast objects that contain tokenizers outputs without iterating over every single token for example.

Args:
    obj: the object (nested struct) to cast.
    only_1d_for_numpy (bool): whether to keep the full multi-dim tensors as multi-dim numpy arrays, or convert them to
        nested lists of 1-dimensional numpy arrays. This can be useful to keep only 1-d arrays to instantiate Arrow arrays.
        Indeed Arrow only support converting 1-dimensional array values.
    optimize_list_casting (bool): whether to optimize list casting by checking the first non-null element to see if it needs to be casted
        and if it doesn't, not checking the rest of the list elements.

Returns:
    casted_obj: the casted object
    has_changed (bool): True if the object has been changed, False if it is identical

---
## cast_to_python_objects
```python
from features import cast_to_python_objects
```

Cast numpy/pytorch/tensorflow/pandas objects to python lists.
It works recursively.

If `optimize_list_casting` is True, To avoid iterating over possibly long lists, it first checks (recursively) if the first element that is not None or empty (if it is a sequence) has to be casted.
If the first element needs to be casted, then all the elements of the list will be casted, otherwise they'll stay the same.
This trick allows to cast objects that contain tokenizers outputs without iterating over every single token for example.

Args:
    obj: the object (nested struct) to cast
    only_1d_for_numpy (bool, default ``False``): whether to keep the full multi-dim tensors as multi-dim numpy arrays, or convert them to
        nested lists of 1-dimensional numpy arrays. This can be useful to keep only 1-d arrays to instantiate Arrow arrays.
        Indeed Arrow only support converting 1-dimensional array values.
    optimize_list_casting (bool, default ``True``): whether to optimize list casting by checking the first non-null element to see if it needs to be casted
        and if it doesn't, not checking the rest of the list elements.

Returns:
    casted_obj: the casted object

---
## Value
```python
from features import Value
```

Scalar feature value of a particular data type.

The possible dtypes of `Value` are as follows:
- `null`
- `bool`
- `int8`
- `int16`
- `int32`
- `int64`
- `uint8`
- `uint16`
- `uint32`
- `uint64`
- `float16`
- `float32` (alias float)
- `float64` (alias double)
- `time32[(s|ms)]`
- `time64[(us|ns)]`
- `timestamp[(s|ms|us|ns)]`
- `timestamp[(s|ms|us|ns), tz=(tzstring)]`
- `date32`
- `date64`
- `duration[(s|ms|us|ns)]`
- `decimal128(precision, scale)`
- `decimal256(precision, scale)`
- `binary`
- `large_binary`
- `string`
- `large_string`

Args:
    dtype (`str`):
        Name of the data type.

Example:

```py
>>> from datasets import Features
>>> features = Features({'stars': Value(dtype='int32')})
>>> features
{'stars': Value(dtype='int32', id=None)}
```

---
## _ArrayXD
```python
from features import _ArrayXD
```



---
## Array2D
```python
from features import Array2D
```

Create a two-dimensional array.

Args:
    shape (`tuple`):
        Size of each dimension.
    dtype (`str`):
        Name of the data type.

Example:

```py
>>> from datasets import Features
>>> features = Features({'x': Array2D(shape=(1, 3), dtype='int32')})
```

---
## Array3D
```python
from features import Array3D
```

Create a three-dimensional array.

Args:
    shape (`tuple`):
        Size of each dimension.
    dtype (`str`):
        Name of the data type.

Example:

```py
>>> from datasets import Features
>>> features = Features({'x': Array3D(shape=(1, 2, 3), dtype='int32')})
```

---
## Array4D
```python
from features import Array4D
```

Create a four-dimensional array.

Args:
    shape (`tuple`):
        Size of each dimension.
    dtype (`str`):
        Name of the data type.

Example:

```py
>>> from datasets import Features
>>> features = Features({'x': Array4D(shape=(1, 2, 2, 3), dtype='int32')})
```

---
## Array5D
```python
from features import Array5D
```

Create a five-dimensional array.

Args:
    shape (`tuple`):
        Size of each dimension.
    dtype (`str`):
        Name of the data type.

Example:

```py
>>> from datasets import Features
>>> features = Features({'x': Array5D(shape=(1, 2, 2, 3, 3), dtype='int32')})
```

---
## _ArrayXDExtensionType
```python
from features import _ArrayXDExtensionType
```



---
## Array2DExtensionType
```python
from features import Array2DExtensionType
```



---
## Array3DExtensionType
```python
from features import Array3DExtensionType
```



---
## Array4DExtensionType
```python
from features import Array4DExtensionType
```



---
## Array5DExtensionType
```python
from features import Array5DExtensionType
```



---
## _is_zero_copy_only
```python
from features import _is_zero_copy_only
```

When converting a pyarrow array to a numpy array, we must know whether this could be done in zero-copy or not.
This function returns the value of the ``zero_copy_only`` parameter to pass to ``.to_numpy()``, given the type of the pyarrow array.

# zero copy is available for all primitive types except booleans and temporal types (date, time, timestamp or duration)
# primitive types are types for which the physical representation in arrow and in numpy
# https://github.com/wesm/arrow/blob/c07b9b48cf3e0bbbab493992a492ae47e5b04cad/python/pyarrow/types.pxi#L821
# see https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.to_numpy
# and https://issues.apache.org/jira/browse/ARROW-2871?jql=text%20~%20%22boolean%20to_numpy%22

---
## ArrayExtensionArray
```python
from features import ArrayExtensionArray
```



---
## PandasArrayExtensionDtype
```python
from features import PandasArrayExtensionDtype
```



---
## PandasArrayExtensionArray
```python
from features import PandasArrayExtensionArray
```



---
## pandas_types_mapper
```python
from features import pandas_types_mapper
```



---
## ClassLabel
```python
from features import ClassLabel
```

Feature type for integer class labels.

There are 3 ways to define a `ClassLabel`, which correspond to the 3 arguments:

 * `num_classes`: Create 0 to (num_classes-1) labels.
 * `names`: List of label strings.
 * `names_file`: File containing the list of labels.

Under the hood the labels are stored as integers.
You can use negative integers to represent unknown/missing labels.

Args:
    num_classes (`int`, *optional*):
        Number of classes. All labels must be < `num_classes`.
    names (`list` of `str`, *optional*):
        String names for the integer classes.
        The order in which the names are provided is kept.
    names_file (`str`, *optional*):
        Path to a file with names for the integer classes, one per line.

Example:

```py
>>> from datasets import Features
>>> features = Features({'label': ClassLabel(num_classes=3, names=['bad', 'ok', 'good'])})
>>> features
{'label': ClassLabel(num_classes=3, names=['bad', 'ok', 'good'], id=None)}
```

---
## Sequence
```python
from features import Sequence
```

Construct a list of feature from a single type or a dict of types.
Mostly here for compatiblity with tfds.

Args:
    feature ([`FeatureType`]):
        A list of features of a single type or a dictionary of types.
    length (`int`):
        Length of the sequence.

Example:

```py
>>> from datasets import Features, Sequence, Value, ClassLabel
>>> features = Features({'post': Sequence(feature={'text': Value(dtype='string'), 'upvotes': Value(dtype='int32'), 'label': ClassLabel(num_classes=2, names=['hot', 'cold'])})})
>>> features
{'post': Sequence(feature={'text': Value(dtype='string', id=None), 'upvotes': Value(dtype='int32', id=None), 'label': ClassLabel(num_classes=2, names=['hot', 'cold'], id=None)}, length=-1, id=None)}
```

---
## LargeList
```python
from features import LargeList
```

Feature type for large list data composed of child feature data type.

It is backed by `pyarrow.LargeListType`, which is like `pyarrow.ListType` but with 64-bit rather than 32-bit offsets.

Args:
    feature ([`FeatureType`]):
        Child feature data type of each item within the large list.

---
## _check_non_null_non_empty_recursive
```python
from features import _check_non_null_non_empty_recursive
```

Check if the object is not None.
If the object is a list or a tuple, recursively check the first element of the sequence and stop if at any point the first element is not a sequence or is an empty sequence.

---
## get_nested_type
```python
from features import get_nested_type
```

get_nested_type() converts a datasets.FeatureType into a pyarrow.DataType, and acts as the inverse of
    generate_from_arrow_type().

It performs double-duty as the implementation of Features.type and handles the conversion of
    datasets.Feature->pa.struct

---
## encode_nested_example
```python
from features import encode_nested_example
```

Encode a nested example.
This is used since some features (in particular ClassLabel) have some logic during encoding.

To avoid iterating over possibly long lists, it first checks (recursively) if the first element that is not None or empty (if it is a sequence) has to be encoded.
If the first element needs to be encoded, then all the elements of the list will be encoded, otherwise they'll stay the same.

---
## decode_nested_example
```python
from features import decode_nested_example
```

Decode a nested example.
This is used since some features (in particular Audio and Image) have some logic during decoding.

To avoid iterating over possibly long lists, it first checks (recursively) if the first element that is not None or empty (if it is a sequence) has to be decoded.
If the first element needs to be decoded, then all the elements of the list will be decoded, otherwise they'll stay the same.

---
## register_feature
```python
from features import register_feature
```

Register a Feature object using a name and class.
This function must be used on a Feature class.

---
## generate_from_dict
```python
from features import generate_from_dict
```

Regenerate the nested feature object from a deserialized dict.
We use the '_type' fields to get the dataclass name to load.

generate_from_dict is the recursive helper for Features.from_dict, and allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a :class:`DatasetInfo` that was dumped to a JSON object. This acts as an analogue to
:meth:`Features.from_arrow_schema` and handles the recursive field-by-field instantiation, but doesn't require any
mapping to/from pyarrow, except for the fact that it takes advantage of the mapping of pyarrow primitive dtypes
that :class:`Value` automatically performs.

---
## generate_from_arrow_type
```python
from features import generate_from_arrow_type
```

generate_from_arrow_type accepts an arrow DataType and returns a datasets FeatureType to be used as the type for
    a single field.

This is the high-level arrow->datasets type conversion and is inverted by get_nested_type().

This operates at the individual *field* level, whereas Features.from_arrow_schema() operates at the
    full schema level and holds the methods that represent the bijection from Features<->pyarrow.Schema

---
## numpy_to_pyarrow_listarray
```python
from features import numpy_to_pyarrow_listarray
```

Build a PyArrow ListArray from a multidimensional NumPy array

---
## list_of_pa_arrays_to_pyarrow_listarray
```python
from features import list_of_pa_arrays_to_pyarrow_listarray
```



---
## list_of_np_array_to_pyarrow_listarray
```python
from features import list_of_np_array_to_pyarrow_listarray
```

Build a PyArrow ListArray from a possibly nested list of NumPy arrays

---
## contains_any_np_array
```python
from features import contains_any_np_array
```

Return `True` if data is a NumPy ndarray or (recursively) if first non-null value in list is a NumPy ndarray.

Args:
    data (Any): Data.

Returns:
    bool

---
## any_np_array_to_pyarrow_listarray
```python
from features import any_np_array_to_pyarrow_listarray
```

Convert to PyArrow ListArray either a NumPy ndarray or (recursively) a list that may contain any NumPy ndarray.

Args:
    data (Union[np.ndarray, List]): Data.
    type (pa.DataType): Explicit PyArrow DataType passed to coerce the ListArray data type.

Returns:
    pa.ListArray

---
## to_pyarrow_listarray
```python
from features import to_pyarrow_listarray
```

Convert to PyArrow ListArray.

Args:
    data (Any): Sequence, iterable, np.ndarray or pd.Series.
    pa_type (_ArrayXDExtensionType): Any of the ArrayNDExtensionType.

Returns:
    pyarrow.Array

---
## _visit
```python
from features import _visit
```

Visit a (possibly nested) feature.

Args:
    feature (FeatureType): the feature type to be checked
Returns:
    visited feature (FeatureType)

---
## require_decoding
```python
from features import require_decoding
```

Check if a (possibly nested) feature requires decoding.

Args:
    feature (FeatureType): the feature type to be checked
    ignore_decode_attribute (:obj:`bool`, default ``False``): Whether to ignore the current value
        of the `decode` attribute of the decodable feature types.
Returns:
    :obj:`bool`

---
## require_storage_cast
```python
from features import require_storage_cast
```

Check if a (possibly nested) feature requires storage casting.

Args:
    feature (FeatureType): the feature type to be checked
Returns:
    :obj:`bool`

---
## require_storage_embed
```python
from features import require_storage_embed
```

Check if a (possibly nested) feature requires embedding data into storage.

Args:
    feature (FeatureType): the feature type to be checked
Returns:
    :obj:`bool`

---
## keep_features_dicts_synced
```python
from features import keep_features_dicts_synced
```

Wrapper to keep the secondary dictionary, which tracks whether keys are decodable, of the :class:`datasets.Features` object
in sync with the main dictionary.

---
## Features
```python
from features import Features
```

A special dictionary that defines the internal structure of a dataset.

Instantiated with a dictionary of type `dict[str, FieldType]`, where keys are the desired column names,
and values are the type of that column.

`FieldType` can be one of the following:
    - [`Value`] feature specifies a single data type value, e.g. `int64` or `string`.
    - [`ClassLabel`] feature specifies a predefined set of classes which can have labels associated to them and
      will be stored as integers in the dataset.
    - Python `dict` specifies a composite feature containing a mapping of sub-fields to sub-features.
      It's possible to have nested fields of nested fields in an arbitrary manner.
    - Python `list`, [`LargeList`] or [`Sequence`] specifies a composite feature containing a sequence of
      sub-features, all of the same feature type.

      <Tip>

       A [`Sequence`] with an internal dictionary feature will be automatically converted into a dictionary of
       lists. This behavior is implemented to have a compatibility layer with the TensorFlow Datasets library but may be
       un-wanted in some cases. If you don't want this behavior, you can use a Python `list` or a [`LargeList`]
       instead of the [`Sequence`].

      </Tip>

    - [`Array2D`], [`Array3D`], [`Array4D`] or [`Array5D`] feature for multidimensional arrays.
    - [`Audio`] feature to store the absolute path to an audio file or a dictionary with the relative path
      to an audio file ("path" key) and its bytes content ("bytes" key). This feature extracts the audio data.
    - [`Image`] feature to store the absolute path to an image file, an `np.ndarray` object, a `PIL.Image.Image` object
      or a dictionary with the relative path to an image file ("path" key) and its bytes content ("bytes" key).
      This feature extracts the image data.
    - [`Translation`] or [`TranslationVariableLanguages`] feature specific to Machine Translation.

---
## _align_features
```python
from features import _align_features
```

Align dictionaries of features so that the keys that are found in multiple dictionaries share the same feature.

---
## _check_if_features_can_be_aligned
```python
from features import _check_if_features_can_be_aligned
```

Check if the dictionaries of features can be aligned.

Two dictonaries of features can be aligned if the keys they share have the same type or some of them is of type `Value("null")`.

---
## _dtype_error_msg
```python
from features import _dtype_error_msg
```



---
## __post_init__
```python
from features import __post_init__
```



---
## __call__
```python
from features import __call__
```



---
## encode_example
```python
from features import encode_example
```

Encode example into a format for Arrow.

Args:
    example (`dict[str, Any]`):
        Data in a Dataset row.

Returns:
    `dict[str, Any]`

---
## __init__
```python
from features import __init__
```



---
## __arrow_ext_serialize__
```python
from features import __arrow_ext_serialize__
```



---
## __arrow_ext_deserialize__
```python
from features import __arrow_ext_deserialize__
```



---
## __reduce__
```python
from features import __reduce__
```



---
## __hash__
```python
from features import __hash__
```



---
## __arrow_ext_class__
```python
from features import __arrow_ext_class__
```



---
## _generate_dtype
```python
from features import _generate_dtype
```



---
## to_pandas_dtype
```python
from features import to_pandas_dtype
```



---
## _unnest_pa_type
```python
from features import _unnest_pa_type
```



---
## __array__
```python
from features import __array__
```

Convert to NumPy Array.
Note that Pandas expects a 1D array when dtype is set to object.
But for other dtypes, the returned shape is the same as the one of ``data``.

More info about pandas 1D requirement for PandasExtensionArray here:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.api.extensions.ExtensionArray.html#pandas.api.extensions.ExtensionArray

---
## __getitem__
```python
from features import __getitem__
```



---
## to_numpy
```python
from features import to_numpy
```



---
## to_pylist
```python
from features import to_pylist
```



---
## __from_arrow__
```python
from features import __from_arrow__
```



---
## construct_array_type
```python
from features import construct_array_type
```



---
## type
```python
from features import type
```

Features field types.

Returns:
    :obj:`pyarrow.DataType`

---
## kind
```python
from features import kind
```



---
## name
```python
from features import name
```



---
## value_type
```python
from features import value_type
```



---
## copy
```python
from features import copy
```

Make a deep copy of [`Features`].

Returns:
    [`Features`]

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> copy_of_features = ds.features.copy()
>>> copy_of_features
{'label': ClassLabel(num_classes=2, names=['neg', 'pos'], id=None),
 'text': Value(dtype='string', id=None)}
```

---
## _from_sequence
```python
from features import _from_sequence
```



---
## _concat_same_type
```python
from features import _concat_same_type
```



---
## dtype
```python
from features import dtype
```



---
## nbytes
```python
from features import nbytes
```



---
## isna
```python
from features import isna
```



---
## __setitem__
```python
from features import __setitem__
```



---
## take
```python
from features import take
```



---
## __len__
```python
from features import __len__
```



---
## __eq__
```python
from features import __eq__
```



---
## str2int
```python
from features import str2int
```

Conversion class name `string` => `integer`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> ds.features["label"].str2int('neg')
0
```

---
## _strval2int
```python
from features import _strval2int
```



---
## int2str
```python
from features import int2str
```

Conversion `integer` => class name `string`.

Regarding unknown/missing labels: passing negative integers raises `ValueError`.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("rotten_tomatoes", split="train")
>>> ds.features["label"].int2str(0)
'neg'
```

---
## cast_storage
```python
from features import cast_storage
```

Cast an Arrow array to the `ClassLabel` arrow storage type.
The Arrow types that can be converted to the `ClassLabel` pyarrow storage type are:

- `pa.string()`
- `pa.int()`

Args:
    storage (`Union[pa.StringArray, pa.IntegerArray]`):
        PyArrow array to cast.

Returns:
    `pa.Int64Array`: Array in the `ClassLabel` arrow storage type.

---
## _load_names_from_file
```python
from features import _load_names_from_file
```



---
## wrapper
```python
from features import wrapper
```



---
## arrow_schema
```python
from features import arrow_schema
```

Features schema.

Returns:
    :obj:`pyarrow.Schema`

---
## from_arrow_schema
```python
from features import from_arrow_schema
```

Construct [`Features`] from Arrow Schema.
It also checks the schema metadata for Hugging Face Datasets features.
Non-nullable fields are not supported and set to nullable.

Also, pa.dictionary is not supported and it uses its underlying type instead.
Therefore datasets convert DictionaryArray objects to their actual values.

Args:
    pa_schema (`pyarrow.Schema`):
        Arrow Schema.

Returns:
    [`Features`]

---
## from_dict
```python
from features import from_dict
```

Construct [`Features`] from dict.

Regenerate the nested feature object from a deserialized dict.
We use the `_type` key to infer the dataclass name of the feature `FieldType`.

It allows for a convenient constructor syntax
to define features from deserialized JSON dictionaries. This function is used in particular when deserializing
a [`DatasetInfo`] that was dumped to a JSON object. This acts as an analogue to
[`Features.from_arrow_schema`] and handles the recursive field-by-field instantiation, but doesn't require
any mapping to/from pyarrow, except for the fact that it takes advantage of the mapping of pyarrow primitive
dtypes that [`Value`] automatically performs.

Args:
    dic (`dict[str, Any]`):
        Python dictionary.

Returns:
    `Features`

Example::
    >>> Features.from_dict({'_type': {'dtype': 'string', 'id': None, '_type': 'Value'}})
    {'_type': Value(dtype='string', id=None)}

---
## to_dict
```python
from features import to_dict
```



---
## _to_yaml_list
```python
from features import _to_yaml_list
```



---
## _from_yaml_list
```python
from features import _from_yaml_list
```



---
## encode_column
```python
from features import encode_column
```

Encode column into a format for Arrow.

Args:
    column (`list[Any]`):
        Data in a Dataset column.
    column_name (`str`):
        Dataset column name.

Returns:
    `list[Any]`

---
## encode_batch
```python
from features import encode_batch
```

Encode batch into a format for Arrow.

Args:
    batch (`dict[str, list[Any]]`):
        Data in a Dataset batch.

Returns:
    `dict[str, list[Any]]`

---
## decode_example
```python
from features import decode_example
```

Decode example with custom feature decoding.

Args:
    example (`dict[str, Any]`):
        Dataset row data.
    token_per_repo_id (`dict`, *optional*):
        To access and decode audio or image files from private repositories on the Hub, you can pass
        a dictionary `repo_id (str) -> token (bool or str)`.

Returns:
    `dict[str, Any]`

---
## decode_column
```python
from features import decode_column
```

Decode column with custom feature decoding.

Args:
    column (`list[Any]`):
        Dataset column data.
    column_name (`str`):
        Dataset column name.

Returns:
    `list[Any]`

---
## decode_batch
```python
from features import decode_batch
```

Decode batch with custom feature decoding.

Args:
    batch (`dict[str, list[Any]]`):
        Dataset batch data.
    token_per_repo_id (`dict`, *optional*):
        To access and decode audio or image files from private repositories on the Hub, you can pass
        a dictionary repo_id (str) -> token (bool or str)

Returns:
    `dict[str, list[Any]]`

---
## reorder_fields_as
```python
from features import reorder_fields_as
```

Reorder Features fields to match the field order of other [`Features`].

The order of the fields is important since it matters for the underlying arrow data.
Re-ordering the fields allows to make the underlying arrow data type match.

Args:
    other ([`Features`]):
        The other [`Features`] to align with.

Returns:
    [`Features`]

Example::

    >>> from datasets import Features, Sequence, Value
    >>> # let's say we have two features with a different order of nested fields (for a and b for example)
    >>> f1 = Features({"root": Sequence({"a": Value("string"), "b": Value("string")})})
    >>> f2 = Features({"root": {"b": Sequence(Value("string")), "a": Sequence(Value("string"))}})
    >>> assert f1.type != f2.type
    >>> # re-ordering keeps the base structure (here Sequence is defined at the root level), but makes the fields order match
    >>> f1.reorder_fields_as(f2)
    {'root': Sequence(feature={'b': Value(dtype='string', id=None), 'a': Value(dtype='string', id=None)}, length=-1, id=None)}
    >>> assert f1.reorder_fields_as(f2).type == f2.type

---
## flatten
```python
from features import flatten
```

Flatten the features. Every dictionary column is removed and is replaced by
all the subfields it contains. The new fields are named by concatenating the
name of the original column and the subfield name like this: `<original>.<subfield>`.

If a column contains nested dictionaries, then all the lower-level subfields names are
also concatenated to form new columns: `<original>.<subfield>.<subsubfield>`, etc.

Returns:
    [`Features`]:
        The flattened features.

Example:

```py
>>> from datasets import load_dataset
>>> ds = load_dataset("squad", split="train")
>>> ds.features.flatten()
{'answers.answer_start': Sequence(feature=Value(dtype='int32', id=None), length=-1, id=None),
 'answers.text': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None),
 'context': Value(dtype='string', id=None),
 'id': Value(dtype='string', id=None),
 'question': Value(dtype='string', id=None),
 'title': Value(dtype='string', id=None)}
```

---
## simplify
```python
from features import simplify
```



---
## to_yaml_inner
```python
from features import to_yaml_inner
```



---
## to_yaml_types
```python
from features import to_yaml_types
```



---
## unsimplify
```python
from features import unsimplify
```



---
## from_yaml_inner
```python
from features import from_yaml_inner
```



---
## recursive_reorder
```python
from features import recursive_reorder
```



---
## __name__
```python
from feature import __name__
```



---
## Feature
```python
from feature import Feature
```



---
## to_dict
```python
from feature import to_dict
```



---
## Translation
```python
from translation import Translation
```



---
## TranslationVariableLanguages
```python
from translation import TranslationVariableLanguages
```

`Feature` for translations with variable languages per example.
Here for compatiblity with tfds.

Args:
    languages (`dict`):
        A dictionary for each example mapping string language codes to one or more string translations.
        The languages present may vary from example to example.

Returns:
    - `language` or `translation` (variable-length 1D `tf.Tensor` of `tf.string`):
        Language codes sorted in ascending order or plain text translations, sorted to align with language codes.

Example:

```python
>>> # At construction time:
>>> datasets.features.TranslationVariableLanguages(languages=['en', 'fr', 'de'])
>>> # During data generation:
>>> yield {
...         'en': 'the cat',
...         'fr': ['le chat', 'la chatte,']
...         'de': 'die katze'
... }
>>> # Tensor returned :
>>> {
...         'language': ['en', 'de', 'fr', 'fr'],
...         'translation': ['the cat', 'die katze', 'la chatte', 'le chat'],
... }
```

---
## __call__
```python
from translation import __call__
```



---
## flatten
```python
from translation import flatten
```

Flatten the TranslationVariableLanguages feature into a dictionary.

---
## __post_init__
```python
from translation import __post_init__
```



---
## encode_example
```python
from translation import encode_example
```



---
## __name__
```python
from audio import __name__
```



---
## Audio
```python
from audio import Audio
```



---
## __call__
```python
from audio import __call__
```



---
## encode_example
```python
from audio import encode_example
```

Encode example into a format for Arrow.

Args:
    value (`str` or `dict`):
        Data passed as input to Audio feature.

Returns:
    `dict`

---
## decode_example
```python
from audio import decode_example
```

Decode example audio file into audio data.

Args:
    value (`dict`):
        A dictionary with keys:

        - `path`: String with relative audio file path.
        - `bytes`: Bytes of the audio file.
    token_per_repo_id (`dict`, *optional*):
        To access and decode
        audio files from private repositories on the Hub, you can pass
        a dictionary repo_id (`str`) -> token (`bool` or `str`)

Returns:
    `dict`

---
## flatten
```python
from audio import flatten
```

If in the decodable state, raise an error, otherwise flatten the feature into a dictionary.

---
## cast_storage
```python
from audio import cast_storage
```

Cast an Arrow array to the Audio arrow storage type.
The Arrow types that can be converted to the Audio pyarrow storage type are:

- `pa.string()` - it must contain the "path" data
- `pa.binary()` - it must contain the audio bytes
- `pa.struct({"bytes": pa.binary()})`
- `pa.struct({"path": pa.string()})`
- `pa.struct({"bytes": pa.binary(), "path": pa.string()})`  - order doesn't matter

Args:
    storage (`Union[pa.StringArray, pa.StructArray]`):
        PyArrow array to cast.

Returns:
    `pa.StructArray`: Array in the Audio arrow storage type, that is
        `pa.struct({"bytes": pa.binary(), "path": pa.string()})`

---
## embed_storage
```python
from audio import embed_storage
```

Embed audio files into the Arrow array.

Args:
    storage (`pa.StructArray`):
        PyArrow array to embed.

Returns:
    `pa.StructArray`: Array in the Audio arrow storage type, that is
        `pa.struct({"bytes": pa.binary(), "path": pa.string()})`.

---
## path_to_bytes
```python
from audio import path_to_bytes
```



---
## Image
```python
from image import Image
```



---
## list_image_compression_formats
```python
from image import list_image_compression_formats
```



---
## image_to_bytes
```python
from image import image_to_bytes
```

Convert a PIL Image object to bytes using native compression if possible, otherwise use PNG/TIFF compression.

---
## encode_pil_image
```python
from image import encode_pil_image
```



---
## encode_np_array
```python
from image import encode_np_array
```



---
## objects_to_list_of_image_dicts
```python
from image import objects_to_list_of_image_dicts
```

Encode a list of objects into a format suitable for creating an extension array of type `ImageExtensionType`.

---
## __call__
```python
from image import __call__
```



---
## encode_example
```python
from image import encode_example
```

Encode example into a format for Arrow.

Args:
    value (`str`, `np.ndarray`, `PIL.Image.Image` or `dict`):
        Data passed as input to Image feature.

Returns:
    `dict` with "path" and "bytes" fields

---
## decode_example
```python
from image import decode_example
```

Decode example image file into image data.

Args:
    value (`str` or `dict`):
        A string with the absolute image file path, a dictionary with
        keys:

        - `path`: String with absolute or relative image file path.
        - `bytes`: The bytes of the image file.
    token_per_repo_id (`dict`, *optional*):
        To access and decode
        image files from private repositories on the Hub, you can pass
        a dictionary repo_id (`str`) -> token (`bool` or `str`).

Returns:
    `PIL.Image.Image`

---
## flatten
```python
from image import flatten
```

If in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.

---
## cast_storage
```python
from image import cast_storage
```

Cast an Arrow array to the Image arrow storage type.
The Arrow types that can be converted to the Image pyarrow storage type are:

- `pa.string()` - it must contain the "path" data
- `pa.binary()` - it must contain the image bytes
- `pa.struct({"bytes": pa.binary()})`
- `pa.struct({"path": pa.string()})`
- `pa.struct({"bytes": pa.binary(), "path": pa.string()})`  - order doesn't matter
- `pa.list(*)` - it must contain the image array data

Args:
    storage (`Union[pa.StringArray, pa.StructArray, pa.ListArray]`):
        PyArrow array to cast.

Returns:
    `pa.StructArray`: Array in the Image arrow storage type, that is
        `pa.struct({"bytes": pa.binary(), "path": pa.string()})`.

---
## embed_storage
```python
from image import embed_storage
```

Embed image files into the Arrow array.

Args:
    storage (`pa.StructArray`):
        PyArrow array to embed.

Returns:
    `pa.StructArray`: Array in the Image arrow storage type, that is
        `pa.struct({"bytes": pa.binary(), "path": pa.string()})`.

---
## path_to_bytes
```python
from image import path_to_bytes
```



---
## _hash_python_lines
```python
from __init__ import _hash_python_lines
```



---
## __name__
```python
from sharding import __name__
```



---
## _number_of_shards_in_gen_kwargs
```python
from sharding import _number_of_shards_in_gen_kwargs
```

Return the number of possible shards according to the input gen_kwargs

---
## _distribute_shards
```python
from sharding import _distribute_shards
```

Get the range of shard indices per job.
If num_shards<max_num_jobs, then num_shards jobs are given a range of one shard.
The shards indices order is preserved: e.g. all the first shards are given the first job.
Moreover all the jobs are given approximately the same number of shards.

Example:

```python
>>> _distribute_shards(2, max_num_jobs=4)
[range(0, 1), range(1, 2)]
>>> _distribute_shards(10, max_num_jobs=3)
[range(0, 4), range(4, 7), range(7, 10)]
```

---
## _split_gen_kwargs
```python
from sharding import _split_gen_kwargs
```

Split the gen_kwargs into `max_num_job` gen_kwargs

---
## _merge_gen_kwargs
```python
from sharding import _merge_gen_kwargs
```



---
## _shuffle_gen_kwargs
```python
from sharding import _shuffle_gen_kwargs
```

Return a shuffled copy of the input gen_kwargs

---
## __name__
```python
from _dataset_viewer import __name__
```



---
## DatasetViewerError
```python
from _dataset_viewer import DatasetViewerError
```

Dataset viewer error.

Raised when trying to use the dataset viewer HTTP API and when trying to access:
- a missing dataset, or
- a private/gated dataset and the user is not authenticated.
- unavailable /parquet or /info responses

---
## get_exported_parquet_files
```python
from _dataset_viewer import get_exported_parquet_files
```

Get the dataset exported parquet files
Docs: https://huggingface.co/docs/datasets-server/parquet

---
## get_exported_dataset_infos
```python
from _dataset_viewer import get_exported_dataset_infos
```

Get the dataset information, can be useful to get e.g. the dataset features.
Docs: https://huggingface.co/docs/datasets-server/info

---
## __name__
```python
from experimental import __name__
```

Contains utilities to flag a feature as "experimental" in datasets.

---
## experimental
```python
from experimental import experimental
```

Decorator to flag a feature as experimental.

An experimental feature trigger a warning when used as it might be subject to breaking changes in the future.

Args:
    fn (`Callable`):
        The function to flag as experimental.

Returns:
    `Callable`: The decorated function.

Example:

```python
>>> from datasets.utils import experimental

>>> @experimental
... def my_function():
...     print("Hello world!")

>>> my_function()
UserWarning: 'my_function' is experimental and might be subject to breaking changes in the future.
Hello world!
```

---
## _inner_fn
```python
from experimental import _inner_fn
```



---
## _NoDuplicateSafeLoader
```python
from metadata import _NoDuplicateSafeLoader
```



---
## _split_yaml_from_readme
```python
from metadata import _split_yaml_from_readme
```



---
## MetadataConfigs
```python
from metadata import MetadataConfigs
```

Should be in format {config_name: {**config_params}}.

---
## _check_no_duplicates_on_constructed_node
```python
from metadata import _check_no_duplicates_on_constructed_node
```



---
## construct_mapping
```python
from metadata import construct_mapping
```



---
## _raise_if_data_files_field_not_valid
```python
from metadata import _raise_if_data_files_field_not_valid
```



---
## _from_exported_parquet_files_and_dataset_infos
```python
from metadata import _from_exported_parquet_files_and_dataset_infos
```



---
## from_dataset_card_data
```python
from metadata import from_dataset_card_data
```



---
## to_dataset_card_data
```python
from metadata import to_dataset_card_data
```



---
## get_default_config_name
```python
from metadata import get_default_config_name
```



---
## _str_to_version_tuple
```python
from version import _str_to_version_tuple
```

Return the tuple (major, minor, patch) version extracted from the str.

---
## _version_tuple_to_str
```python
from version import _version_tuple_to_str
```

Return the str version from the version tuple (major, minor, patch).

---
## __post_init__
```python
from version import __post_init__
```



---
## tuple
```python
from version import tuple
```



---
## _validate_operand
```python
from version import _validate_operand
```



---
## from_dict
```python
from version import from_dict
```



---
## _to_yaml_string
```python
from version import _to_yaml_string
```



---
## __name__
```python
from track import __name__
```



---
## tracked_str
```python
from track import tracked_str
```



---
## tracked_list
```python
from track import tracked_list
```



---
## TrackedIterableFromGenerator
```python
from track import TrackedIterableFromGenerator
```

Utility class to create an iterable from a generator function, in order to reset the generator when needed.

---
## set_origin
```python
from track import set_origin
```



---
## get_origin
```python
from track import get_origin
```



---
## __repr__
```python
from track import __repr__
```



---
## __init__
```python
from track import __init__
```



---
## __iter__
```python
from track import __iter__
```



---
## __reduce__
```python
from track import __reduce__
```



---
## __name__
```python
from py_utils import __name__
```

Some python utils function and classes.

---
## size_str
```python
from py_utils import size_str
```

Returns a human readable size string.

If size_in_bytes is None, then returns "Unknown size".

For example `size_str(1.5 * datasets.units.GiB) == "1.50 GiB"`.

Args:
    size_in_bytes: `int` or `None`, the size, in bytes, that we want to
        format as a human-readable size string.

---
## convert_file_size_to_int
```python
from py_utils import convert_file_size_to_int
```

Converts a size expressed as a string with digits an unit (like `"50MB"`) to an integer (in bytes).

Args:
    size (`int` or `str`): The size to convert. Will be directly returned if an `int`.

Example:

```py
>>> convert_file_size_to_int("1MiB")
1048576
```

---
## glob_pattern_to_regex
```python
from py_utils import glob_pattern_to_regex
```



---
## string_to_dict
```python
from py_utils import string_to_dict
```

Un-format a string using a python f-string pattern.
From https://stackoverflow.com/a/36838374

Example::

    >>> p = 'hello, my name is {name} and I am a {age} year old {what}'
    >>> s = p.format(name='cody', age=18, what='quarterback')
    >>> s
    'hello, my name is cody and I am a 18 year old quarterback'
    >>> string_to_dict(s, p)
    {'age': '18', 'name': 'cody', 'what': 'quarterback'}

Args:
    string (str): input string
    pattern (str): pattern formatted like a python f-string

Returns:
    Dict[str, str]: dictionary of variable -> value, retrieved from the input using the pattern

Raises:
    ValueError: if the string doesn't match the pattern

---
## asdict
```python
from py_utils import asdict
```

Convert an object to its dictionary representation recursively.

<Added version="2.4.0"/>

---
## temporary_assignment
```python
from py_utils import temporary_assignment
```

Temporarily assign obj.attr to value.

---
## temp_seed
```python
from py_utils import temp_seed
```

Temporarily set the random seed. This works for python numpy, pytorch and tensorflow.

---
## unique_values
```python
from py_utils import unique_values
```

Iterate over iterable and return only unique values in order.

---
## no_op_if_value_is_null
```python
from py_utils import no_op_if_value_is_null
```

If the value is None, return None, else call `func`.

---
## first_non_null_value
```python
from py_utils import first_non_null_value
```

Return the index and the value of the first non-null value in the iterable. If all values are None, return -1 as index.

---
## zip_dict
```python
from py_utils import zip_dict
```

Iterate over items of dictionaries grouped by their keys.

---
## NonMutableDict
```python
from py_utils import NonMutableDict
```

Dict where keys can only be added but not modified.

Will raise an error if the user try to overwrite one key. The error message
can be customized during construction. It will be formatted using {key} for
the overwritten key.

---
## classproperty
```python
from py_utils import classproperty
```

Descriptor to be used as decorator for @classmethods.

---
## _single_map_nested
```python
from py_utils import _single_map_nested
```

Apply a function recursively to each element of a nested data struct.

---
## map_nested
```python
from py_utils import map_nested
```

Apply a function recursively to each element of a nested data struct.

Use multiprocessing if num_proc > 1 and the length of data_struct is greater than or equal to
`parallel_min_length`.

<Changed version="2.5.0">

Before version 2.5.0, multiprocessing was not used if `num_proc` was greater than or equal to ``len(iterable)``.

Now, if `num_proc` is greater than or equal to ``len(iterable)``, `num_proc` is set to ``len(iterable)`` and
multiprocessing is used.

</Changed>

Args:
    function (`Callable`): Function to be applied to `data_struct`.
    data_struct (`Any`): Data structure to apply `function` to.
    dict_only (`bool`, default `False`): Whether only apply `function` recursively to `dict` values in
        `data_struct`.
    map_list (`bool`, default `True`): Whether also apply `function` recursively to `list` elements (besides `dict`
        values).
    map_tuple (`bool`, default `False`): Whether also apply `function` recursively to `tuple` elements (besides
        `dict` values).
    map_numpy (`bool, default `False`): Whether also apply `function` recursively to `numpy.array` elements (besides
        `dict` values).
    num_proc (`int`, *optional*): Number of processes.
        The level in the data struct used for multiprocessing is the first level that has smaller sub-structs,
        starting from the root.
    parallel_min_length (`int`, default `2`): Minimum length of `data_struct` required for parallel
        processing.
        <Added version="2.5.0"/>
    batched (`bool`, defaults to `False`):
        Provide batch of items to `function`.
        <Added version="2.19.0"/>
    batch_size (`int`, *optional*, defaults to `1000`):
        Number of items per batch provided to `function` if `batched=True`.
        If `batch_size <= 0` or `batch_size == None`, provide the full iterable as a single batch to `function`.
        <Added version="2.19.0"/>
    types (`tuple`, *optional*): Additional types (besides `dict` values) to apply `function` recursively to their
        elements.
    disable_tqdm (`bool`, default `True`): Whether to disable the tqdm progressbar.
    desc (`str`, *optional*): Prefix for the tqdm progressbar.

Returns:
    `Any`

---
## NestedDataStructure
```python
from py_utils import NestedDataStructure
```



---
## has_sufficient_disk_space
```python
from py_utils import has_sufficient_disk_space
```



---
## _convert_github_url
```python
from py_utils import _convert_github_url
```

Convert a link to a file on a github repo in a link to the raw github object.

---
## lock_importable_file
```python
from py_utils import lock_importable_file
```



---
## get_imports
```python
from py_utils import get_imports
```

Find whether we should import or clone additional files for a given processing script.
    And list the import.

We allow:
- library dependencies,
- local dependencies and
- external dependencies whose url is specified with a comment starting from "# From:' followed by the raw url to a file, an archive or a github repository.
    external dependencies will be downloaded (and extracted if needed in the dataset folder).
    We also add an `__init__.py` to each sub-folder of a downloaded folder so the user can import from them in the script.

Note that only direct import in the dataset processing script will be handled
We don't recursively explore the additional import to download further files.

Example::

    import tensorflow
    import .c4_utils
    import .clicr.dataset-code.build_json_dataset  # From: https://raw.githubusercontent.com/clips/clicr/master/dataset-code/build_json_dataset

---
## copyfunc
```python
from py_utils import copyfunc
```



---
## _write_generator_to_queue
```python
from py_utils import _write_generator_to_queue
```



---
## _get_pool_pid
```python
from py_utils import _get_pool_pid
```



---
## iflatmap_unordered
```python
from py_utils import iflatmap_unordered
```



---
## iter_batched
```python
from py_utils import iter_batched
```



---
## _is_dataclass_instance
```python
from py_utils import _is_dataclass_instance
```



---
## _asdict_inner
```python
from py_utils import _asdict_inner
```



---
## wrapper
```python
from py_utils import wrapper
```



---
## __init__
```python
from py_utils import __init__
```



---
## __setitem__
```python
from py_utils import __setitem__
```



---
## update
```python
from py_utils import update
```



---
## __get__
```python
from py_utils import __get__
```



---
## flatten
```python
from py_utils import flatten
```



---
## __name__
```python
from stratify import __name__
```



---
## approximate_mode
```python
from stratify import approximate_mode
```

Computes approximate mode of multivariate hypergeometric.
This is an approximation to the mode of the multivariate
hypergeometric given by class_counts and n_draws.
It shouldn't be off by more than one.
It is the mostly likely outcome of drawing n_draws many
samples from the population given by class_counts.
Args
----------
class_counts : ndarray of int
    Population per class.
n_draws : int
    Number of draws (samples to draw) from the overall population.
rng : random state
    Used to break ties.
Returns
-------
sampled_classes : ndarray of int
    Number of samples drawn from each class.
    np.sum(sampled_classes) == n_draws

---
## stratified_shuffle_split_generate_indices
```python
from stratify import stratified_shuffle_split_generate_indices
```

Provides train/test indices to split data in train/test sets.
It's reference is taken from StratifiedShuffleSplit implementation
of scikit-learn library.

Args
----------

n_train : int,
    represents the absolute number of train samples.

n_test : int,
    represents the absolute number of test samples.

random_state : int or RandomState instance, default=None
    Controls the randomness of the training and testing indices produced.
    Pass an int for reproducible output across multiple function calls.

n_splits : int, default=10
    Number of re-shuffling & splitting iterations.

---
## is_progress_bar_enabled
```python
from tqdm import is_progress_bar_enabled
```



---
## check_auth
```python
from hub import check_auth
```



---
## __name__
```python
from patching import __name__
```



---
## _PatchedModuleObj
```python
from patching import _PatchedModuleObj
```

Set all the modules components as attributes of the _PatchedModuleObj object.

---
## patch_submodule
```python
from patching import patch_submodule
```

Patch a submodule attribute of an object, by keeping all other submodules intact at all levels.

Example::

    >>> import importlib
    >>> from datasets.load import dataset_module_factory
    >>> from datasets.streaming import patch_submodule, xjoin
    >>>
    >>> dataset_module = dataset_module_factory("snli")
    >>> snli_module = importlib.import_module(dataset_module.module_path)
    >>> patcher = patch_submodule(snli_module, "os.path.join", xjoin)
    >>> patcher.start()
    >>> assert snli_module.os.path.join is xjoin

---
## __init__
```python
from patching import __init__
```



---
## __enter__
```python
from patching import __enter__
```



---
## __exit__
```python
from patching import __exit__
```



---
## start
```python
from patching import start
```

Activate a patch.

---
## stop
```python
from patching import stop
```

Stop an active patch.

---
## __name__
```python
from filelock import __name__
```



---
## __name__
```python
from doc_utils import __name__
```



---
## is_documented_by
```python
from doc_utils import is_documented_by
```

Decorator to share docstrings across common functions.

Args:
    function_with_docstring (`Callable`): Name of the function with the docstring.

---
## wrapper
```python
from doc_utils import wrapper
```



---
## __name__
```python
from _filelock import __name__
```

Utilities to handle file locking in `datasets`.

---
## FileLock
```python
from _filelock import FileLock
```

A `filelock.FileLock` initializer that handles long paths.
It also uses the current umask for lock files.

---
## __init__
```python
from _filelock import __init__
```



---
## hash_filename_if_too_long
```python
from _filelock import hash_filename_if_too_long
```



---
## __name__
```python
from file_utils import __name__
```

Utilities for working with the local dataset cache.
This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp
Copyright by the AllenNLP authors.

---
## init_hf_modules
```python
from file_utils import init_hf_modules
```

Add hf_modules_cache to the python path.
By default hf_modules_cache='~/.cache/huggingface/modules'.
It can also be set with the environment variable HF_MODULES_CACHE.
This is used to add modules such as `datasets_modules`

---
## is_remote_url
```python
from file_utils import is_remote_url
```



---
## is_local_path
```python
from file_utils import is_local_path
```



---
## is_relative_path
```python
from file_utils import is_relative_path
```



---
## relative_to_absolute_path
```python
from file_utils import relative_to_absolute_path
```

Convert relative path to absolute path.

---
## url_or_path_join
```python
from file_utils import url_or_path_join
```



---
## url_or_path_parent
```python
from file_utils import url_or_path_parent
```



---
## hash_url_to_filename
```python
from file_utils import hash_url_to_filename
```

Convert `url` into a hashed filename in a repeatable way.
If `etag` is specified, append its hash to the url's, delimited
by a period.
If the url ends with .h5 (Keras HDF5 weights) adds '.h5' to the name
so that TF 2.0 can identify it as a HDF5 file
(see https://github.com/tensorflow/tensorflow/blob/00fad90125b18b80fe054de1055770cfb8fe4ba3/tensorflow/python/keras/engine/network.py#L1380)

---
## cached_path
```python
from file_utils import cached_path
```

Given something that might be a URL (or might be a local path),
determine which. If it's a URL, download the file and cache it, and
return the path to the cached file. If it's already a local path,
make sure the file exists and then return the path.

Return:
    Local path (string)

Raises:
    FileNotFoundError: in case of non-recoverable file
        (non-existent or no cache on disk)
    ConnectionError: in case of unreachable url
        and no cache on disk
    ValueError: if it couldn't parse the url or filename correctly
    requests.exceptions.ConnectionError: in case of internet connection issue

---
## get_datasets_user_agent
```python
from file_utils import get_datasets_user_agent
```



---
## get_authentication_headers_for_url
```python
from file_utils import get_authentication_headers_for_url
```

Handle the HF authentication

---
## OfflineModeIsEnabled
```python
from file_utils import OfflineModeIsEnabled
```



---
## _raise_if_offline_mode_is_enabled
```python
from file_utils import _raise_if_offline_mode_is_enabled
```

Raise an OfflineModeIsEnabled error (subclass of ConnectionError) if HF_HUB_OFFLINE is True.

---
## fsspec_head
```python
from file_utils import fsspec_head
```



---
## stack_multiprocessing_download_progress_bars
```python
from file_utils import stack_multiprocessing_download_progress_bars
```



---
## TqdmCallback
```python
from file_utils import TqdmCallback
```



---
## fsspec_get
```python
from file_utils import fsspec_get
```



---
## get_from_cache
```python
from file_utils import get_from_cache
```

Given a URL, look for the corresponding file in the local cache.
If it's not there, download it. Then return the path to the cached file.

Return:
    Local path (string)

Raises:
    FileNotFoundError: in case of non-recoverable file
        (non-existent or no cache on disk)
    ConnectionError: in case of unreachable url
        and no cache on disk

---
## add_start_docstrings
```python
from file_utils import add_start_docstrings
```



---
## add_end_docstrings
```python
from file_utils import add_end_docstrings
```



---
## estimate_dataset_size
```python
from file_utils import estimate_dataset_size
```



---
## readline
```python
from file_utils import readline
```



---
## NonStreamableDatasetError
```python
from file_utils import NonStreamableDatasetError
```



---
## _get_path_extension
```python
from file_utils import _get_path_extension
```



---
## _get_extraction_protocol_with_magic_number
```python
from file_utils import _get_extraction_protocol_with_magic_number
```

read the magic number from a file-like object and return the compression protocol

---
## _get_extraction_protocol
```python
from file_utils import _get_extraction_protocol
```



---
## xjoin
```python
from file_utils import xjoin
```

This function extends os.path.join to support the "::" hop separator. It supports both paths and urls.

A shorthand, particularly useful where you have multiple hops, is to “chain” the URLs with the special separator "::".
This is used to access files inside a zip file over http for example.

Let's say you have a zip file at https://host.com/archive.zip, and you want to access the file inside the zip file at /folder1/file.txt.
Then you can just chain the url this way:

    zip://folder1/file.txt::https://host.com/archive.zip

The xjoin function allows you to apply the join on the first path of the chain.

Example::

    >>> xjoin("zip://folder1::https://host.com/archive.zip", "file.txt")
    zip://folder1/file.txt::https://host.com/archive.zip

---
## xdirname
```python
from file_utils import xdirname
```

This function extends os.path.dirname to support the "::" hop separator. It supports both paths and urls.

A shorthand, particularly useful where you have multiple hops, is to “chain” the URLs with the special separator "::".
This is used to access files inside a zip file over http for example.

Let's say you have a zip file at https://host.com/archive.zip, and you want to access the file inside the zip file at /folder1/file.txt.
Then you can just chain the url this way:

    zip://folder1/file.txt::https://host.com/archive.zip

The xdirname function allows you to apply the dirname on the first path of the chain.

Example::

    >>> xdirname("zip://folder1/file.txt::https://host.com/archive.zip")
    zip://folder1::https://host.com/archive.zip

---
## xexists
```python
from file_utils import xexists
```

Extend `os.path.exists` function to support both local and remote files.

Args:
    urlpath (`str`): URL path.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `bool`

---
## xbasename
```python
from file_utils import xbasename
```

This function extends os.path.basename to support the "::" hop separator. It supports both paths and urls.

A shorthand, particularly useful where you have multiple hops, is to “chain” the URLs with the special separator "::".
This is used to access files inside a zip file over http for example.

Let's say you have a zip file at https://host.com/archive.zip, and you want to access the file inside the zip file at /folder1/file.txt.
Then you can just chain the url this way:

    zip://folder1/file.txt::https://host.com/archive.zip

The xbasename function allows you to apply the basename on the first path of the chain.

Example::

    >>> xbasename("zip://folder1/file.txt::https://host.com/archive.zip")
    file.txt

---
## xsplit
```python
from file_utils import xsplit
```

This function extends os.path.split to support the "::" hop separator. It supports both paths and urls.

A shorthand, particularly useful where you have multiple hops, is to “chain” the URLs with the special separator "::".
This is used to access files inside a zip file over http for example.

Let's say you have a zip file at https://host.com/archive.zip, and you want to access the file inside the zip file at /folder1/file.txt.
Then you can just chain the url this way:

    zip://folder1/file.txt::https://host.com/archive.zip

The xsplit function allows you to apply the xsplit on the first path of the chain.

Example::

    >>> xsplit("zip://folder1/file.txt::https://host.com/archive.zip")
    ('zip://folder1::https://host.com/archive.zip', 'file.txt')

---
## xsplitext
```python
from file_utils import xsplitext
```

This function extends os.path.splitext to support the "::" hop separator. It supports both paths and urls.

A shorthand, particularly useful where you have multiple hops, is to “chain” the URLs with the special separator "::".
This is used to access files inside a zip file over http for example.

Let's say you have a zip file at https://host.com/archive.zip, and you want to access the file inside the zip file at /folder1/file.txt.
Then you can just chain the url this way:

    zip://folder1/file.txt::https://host.com/archive.zip

The xsplitext function allows you to apply the splitext on the first path of the chain.

Example::

    >>> xsplitext("zip://folder1/file.txt::https://host.com/archive.zip")
    ('zip://folder1/file::https://host.com/archive.zip', '.txt')

---
## xisfile
```python
from file_utils import xisfile
```

Extend `os.path.isfile` function to support remote files.

Args:
    path (`str`): URL path.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `bool`

---
## xgetsize
```python
from file_utils import xgetsize
```

Extend `os.path.getsize` function to support remote files.

Args:
    path (`str`): URL path.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `int`: optional

---
## xisdir
```python
from file_utils import xisdir
```

Extend `os.path.isdir` function to support remote files.

Args:
    path (`str`): URL path.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `bool`

---
## xrelpath
```python
from file_utils import xrelpath
```

Extend `os.path.relpath` function to support remote files.

Args:
    path (`str`): URL path.
    start (`str`): Start URL directory path.

Returns:
    `str`

---
## _add_retries_to_file_obj_read_method
```python
from file_utils import _add_retries_to_file_obj_read_method
```



---
## _prepare_path_and_storage_options
```python
from file_utils import _prepare_path_and_storage_options
```



---
## _prepare_single_hop_path_and_storage_options
```python
from file_utils import _prepare_single_hop_path_and_storage_options
```

Prepare the URL and the kwargs that must be passed to the HttpFileSystem or HfFileSystem

In particular it resolves google drive URLs
It also adds the authentication headers for the Hugging Face Hub, for both https:// and hf:// paths.

Storage options are formatted in the form {protocol: storage_options_for_protocol}

---
## xopen
```python
from file_utils import xopen
```

Extend `open` function to support remote files using `fsspec`.

It also has a retry mechanism in case connection fails.
The `args` and `kwargs` are passed to `fsspec.open`, except `token` which is used for queries to private repos on huggingface.co

Args:
    file (`str`): Path name of the file to be opened.
    mode (`str`, *optional*, default "r"): Mode in which the file is opened.
    *args: Arguments to be passed to `fsspec.open`.
    download_config : mainly use token or storage_options to support different platforms and auth types.
    **kwargs: Keyword arguments to be passed to `fsspec.open`.

Returns:
    file object

---
## xlistdir
```python
from file_utils import xlistdir
```

Extend `os.listdir` function to support remote files.

Args:
    path (`str`): URL path.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `list` of `str`

---
## xglob
```python
from file_utils import xglob
```

Extend `glob.glob` function to support remote files.

Args:
    urlpath (`str`): URL path with shell-style wildcard patterns.
    recursive (`bool`, default `False`): Whether to match the "**" pattern recursively to zero or more
        directories or subdirectories.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `list` of `str`

---
## xwalk
```python
from file_utils import xwalk
```

Extend `os.walk` function to support remote files.

Args:
    urlpath (`str`): URL root path.
    download_config : mainly use token or storage_options to support different platforms and auth types.
    **kwargs: Additional keyword arguments forwarded to the underlying filesystem.


Yields:
    `tuple`: 3-tuple (dirpath, dirnames, filenames).

---
## xPath
```python
from file_utils import xPath
```

Extension of `pathlib.Path` to support both local paths and remote URLs.

---
## _as_str
```python
from file_utils import _as_str
```



---
## xgzip_open
```python
from file_utils import xgzip_open
```



---
## xnumpy_load
```python
from file_utils import xnumpy_load
```



---
## xpandas_read_csv
```python
from file_utils import xpandas_read_csv
```



---
## xpandas_read_excel
```python
from file_utils import xpandas_read_excel
```



---
## xpyarrow_parquet_read_table
```python
from file_utils import xpyarrow_parquet_read_table
```



---
## xsio_loadmat
```python
from file_utils import xsio_loadmat
```



---
## xet_parse
```python
from file_utils import xet_parse
```

Extend `xml.etree.ElementTree.parse` function to support remote files.

Args:
    source: File path or file object.
    parser (`XMLParser`, *optional*, default `XMLParser`): Parser instance.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `xml.etree.ElementTree.Element`: Root element of the given source document.

---
## xxml_dom_minidom_parse
```python
from file_utils import xxml_dom_minidom_parse
```

Extend `xml.dom.minidom.parse` function to support remote files.

Args:
    filename_or_file (`str` or file): File path or file object.
    download_config : mainly use token or storage_options to support different platforms and auth types.
    **kwargs (optional): Additional keyword arguments passed to `xml.dom.minidom.parse`.

Returns:
    :obj:`xml.dom.minidom.Document`: Parsed document.

---
## ArchiveIterable
```python
from file_utils import ArchiveIterable
```

An iterable of (path, fileobj) from a TAR archive, used by `iter_archive`

---
## FilesIterable
```python
from file_utils import FilesIterable
```

An iterable of paths from a list of directories or files

---
## __init__
```python
from file_utils import __init__
```



---
## docstring_decorator
```python
from file_utils import docstring_decorator
```



---
## read_with_retries
```python
from file_utils import read_with_retries
```



---
## __str__
```python
from file_utils import __str__
```



---
## exists
```python
from file_utils import exists
```

Extend `pathlib.Path.exists` method to support both local and remote files.

Args:
    download_config : mainly use token or storage_options to support different platforms and auth types.

Returns:
    `bool`

---
## glob
```python
from file_utils import glob
```

Glob function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Args:
    pattern (`str`): Pattern that resulting paths must match.
    download_config : mainly use token or storage_options to support different platforms and auth types.

Yields:
    [`xPath`]

---
## rglob
```python
from file_utils import rglob
```

Rglob function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Args:
    pattern (`str`): Pattern that resulting paths must match.

Yields:
    [`xPath`]

---
## parent
```python
from file_utils import parent
```

Name function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Returns:
    [`xPath`]

---
## name
```python
from file_utils import name
```

Name function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Returns:
    `str`

---
## stem
```python
from file_utils import stem
```

Stem function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Returns:
    `str`

---
## suffix
```python
from file_utils import suffix
```

Suffix function for argument of type :obj:`~pathlib.Path` that supports both local paths end remote URLs.

Returns:
    `str`

---
## open
```python
from file_utils import open
```

Extend :func:`xopen` to support argument of type :obj:`~pathlib.Path`.

Args:
    **args: Arguments passed to :func:`fsspec.open`.
    **kwargs: Keyword arguments passed to :func:`fsspec.open`.

Returns:
    `io.FileIO`: File-like object.

---
## joinpath
```python
from file_utils import joinpath
```

Extend :func:`xjoin` to support argument of type :obj:`~pathlib.Path`.

Args:
    *p (`tuple` of `str`): Other path components.

Returns:
    [`xPath`]

---
## __truediv__
```python
from file_utils import __truediv__
```



---
## with_suffix
```python
from file_utils import with_suffix
```



---
## _iter_tar
```python
from file_utils import _iter_tar
```



---
## _iter_zip
```python
from file_utils import _iter_zip
```



---
## _iter_from_fileobj
```python
from file_utils import _iter_from_fileobj
```



---
## _iter_from_urlpath
```python
from file_utils import _iter_from_urlpath
```



---
## from_buf
```python
from file_utils import from_buf
```



---
## from_urlpath
```python
from file_utils import from_urlpath
```



---
## _iter_from_urlpaths
```python
from file_utils import _iter_from_urlpaths
```



---
## from_urlpaths
```python
from file_utils import from_urlpaths
```



---
## temp_file_manager
```python
from file_utils import temp_file_manager
```



---
## pklregister
```python
from _dill import pklregister
```

Register a custom reducer for the type.

---
## _save_set
```python
from _dill import _save_set
```



---
## _save_regexPattern
```python
from _dill import _save_regexPattern
```



---
## _save_tiktokenEncoding
```python
from _dill import _save_tiktokenEncoding
```



---
## _save_torchTensor
```python
from _dill import _save_torchTensor
```



---
## _save_torchGenerator
```python
from _dill import _save_torchGenerator
```



---
## _save_spacyLanguage
```python
from _dill import _save_spacyLanguage
```



---
## _save_transformersPreTrainedTokenizerBase
```python
from _dill import _save_transformersPreTrainedTokenizerBase
```



---
## _batch_setitems
```python
from _dill import _batch_setitems
```



---
## memoize
```python
from _dill import memoize
```



---
## log
```python
from _dill import log
```



---
## create_torchTensor
```python
from _dill import create_torchTensor
```



---
## create_torchGenerator
```python
from _dill import create_torchGenerator
```



---
## create_spacyLanguage
```python
from _dill import create_spacyLanguage
```



---
## _save_code
```python
from _dill import _save_code
```

From dill._dill.save_code
This is a modified version that removes the origin (filename + line no.)
of functions created in notebooks or shells for example.

---
## __name__
```python
from extract import __name__
```

babel.messages.extract
~~~~~~~~~~~~~~~~~~~~~~

Basic infrastructure for extracting localizable messages from source files.

This module defines an extensible system for collecting localizable message
strings from a variety of sources. A native extractor for Python source
files is builtin, extractors for other sources can be added using very
simple plugins.

The main entry points into the extraction functionality are the functions
`extract_from_dir` and `extract_from_file`.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## ExtractManager
```python
from extract import ExtractManager
```



---
## BaseExtractor
```python
from extract import BaseExtractor
```



---
## MagicNumberBaseExtractor
```python
from extract import MagicNumberBaseExtractor
```



---
## TarExtractor
```python
from extract import TarExtractor
```



---
## GzipExtractor
```python
from extract import GzipExtractor
```



---
## ZipExtractor
```python
from extract import ZipExtractor
```



---
## XzExtractor
```python
from extract import XzExtractor
```



---
## RarExtractor
```python
from extract import RarExtractor
```



---
## ZstdExtractor
```python
from extract import ZstdExtractor
```



---
## Bzip2Extractor
```python
from extract import Bzip2Extractor
```



---
## SevenZipExtractor
```python
from extract import SevenZipExtractor
```



---
## Lz4Extractor
```python
from extract import Lz4Extractor
```



---
## Extractor
```python
from extract import Extractor
```



---
## __init__
```python
from extract import __init__
```



---
## _get_output_path
```python
from extract import _get_output_path
```



---
## _do_extract
```python
from extract import _do_extract
```



---
## extract
```python
from extract import extract
```

Extract messages from the given file-like object using the specified
extraction method.

This function returns tuples of the form ``(lineno, message, comments, context)``.

The implementation dispatches the actual extraction to plugins, based on the
value of the ``method`` parameter.

>>> source = b'''# foo module
... def run(argv):
...    print(_('Hello, world!'))
... '''

>>> from io import BytesIO
>>> for message in extract('python', BytesIO(source)):
...     print(message)
(3, u'Hello, world!', [], None)

:param method: an extraction method (a callable), or
               a string specifying the extraction method (.e.g. "python");
               if this is a simple name, the extraction function will be
               looked up by entry point; if it is an explicit reference
               to a function (of the form ``package.module:funcname`` or
               ``package.module.funcname``), the corresponding function
               will be imported and used
:param fileobj: the file-like object the messages should be extracted from
:param keywords: a dictionary mapping keywords (i.e. names of functions
                 that should be recognized as translation functions) to
                 tuples that specify which of their arguments contain
                 localizable strings
:param comment_tags: a list of translator tags to search for and include
                     in the results
:param options: a dictionary of additional options (optional)
:param strip_comment_tags: a flag that if set to `True` causes all comment
                           tags to be removed from the collected comments.
:raise ValueError: if the extraction method is not registered
:returns: iterable of tuples of the form ``(lineno, message, comments, context)``
:rtype: Iterable[tuple[int, str|tuple[str], list[str], str|None]

---
## is_extractable
```python
from extract import is_extractable
```



---
## read_magic_number
```python
from extract import read_magic_number
```



---
## safemembers
```python
from extract import safemembers
```

Fix for CVE-2007-4559
Desc:
    Directory traversal vulnerability in the (1) extract and (2) extractall functions in the tarfile
    module in Python allows user-assisted remote attackers to overwrite arbitrary files via a .. (dot dot)
    sequence in filenames in a TAR archive, a related issue to CVE-2001-1267.
See: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4559
From: https://stackoverflow.com/a/10077309

---
## _get_magic_number_max_length
```python
from extract import _get_magic_number_max_length
```



---
## _read_magic_number
```python
from extract import _read_magic_number
```



---
## infer_extractor_format
```python
from extract import infer_extractor_format
```



---
## resolved
```python
from extract import resolved
```



---
## badpath
```python
from extract import badpath
```



---
## badlink
```python
from extract import badlink
```



---
## __name__
```python
from tf_utils import __name__
```

TF-specific utils import.

---
## minimal_tf_collate_fn
```python
from tf_utils import minimal_tf_collate_fn
```



---
## minimal_tf_collate_fn_with_renaming
```python
from tf_utils import minimal_tf_collate_fn_with_renaming
```



---
## is_numeric_pa_type
```python
from tf_utils import is_numeric_pa_type
```



---
## np_get_batch
```python
from tf_utils import np_get_batch
```



---
## dataset_to_tf
```python
from tf_utils import dataset_to_tf
```

Create a tf.data.Dataset from the underlying Dataset. This is a single-process method - the multiprocess
equivalent is multiprocess_dataset_to_tf.

Args:
    dataset (`Dataset`): Dataset to wrap with tf.data.Dataset.
    cols_to_retain (`List[str]`): Dataset column(s) to load in the
        tf.data.Dataset. It is acceptable to include column names that are created by the `collate_fn` and
        that do not exist in the original dataset.
    collate_fn(`Callable`): A function or callable object (such as a `DataCollator`) that will collate
        lists of samples into a batch.
    collate_fn_args (`Dict`): A  `dict` of keyword arguments to be passed to the
        `collate_fn`. Can be empty.
    columns_to_np_types (`Dict[str, np.dtype]`): A `dict` mapping column names to numpy dtypes.
    output_signature (`Dict[str, tf.TensorSpec]`): A `dict` mapping column names to
        `tf.TensorSpec` objects.
    shuffle(`bool`): Shuffle the dataset order when loading. Recommended True for training, False for
        validation/evaluation.
    batch_size (`int`, default `None`): Size of batches to load from the dataset. Defaults to `None`, which implies that
        the dataset won't be batched, but the returned dataset can be batched later with `tf_dataset.batch(batch_size)`.
    drop_remainder(`bool`, default `None`): Drop the last incomplete batch when loading. If not provided,
        defaults to the same setting as shuffle.

Returns:
    `tf.data.Dataset`

---
## SharedMemoryContext
```python
from tf_utils import SharedMemoryContext
```



---
## NumpyMultiprocessingGenerator
```python
from tf_utils import NumpyMultiprocessingGenerator
```



---
## multiprocess_dataset_to_tf
```python
from tf_utils import multiprocess_dataset_to_tf
```

Create a tf.data.Dataset from the underlying Dataset. This is a multi-process method - the single-process
equivalent is dataset_to_tf.

Args:
    dataset (`Dataset`): Dataset to wrap with tf.data.Dataset.
    cols_to_retain (`List[str]`): Dataset column(s) to load in the
        tf.data.Dataset. It is acceptable to include column names that are created by the `collate_fn` and
        that do not exist in the original dataset.
    collate_fn(`Callable`): A function or callable object (such as a `DataCollator`) that will collate
        lists of samples into a batch.
    collate_fn_args (`Dict`): A  `dict` of keyword arguments to be passed to the
        `collate_fn`. Can be empty.
    columns_to_np_types (`Dict[str, np.dtype]`): A `dict` mapping column names to numpy dtypes.
    output_signature (`Dict[str, tf.TensorSpec]`): A `dict` mapping column names to
        `tf.TensorSpec` objects.
    shuffle(`bool`): Shuffle the dataset order when loading. Recommended True for training, False for
        validation/evaluation.
    batch_size (`int`, default `None`): Size of batches to load from the dataset. Defaults to `None`, which implies that
        the dataset won't be batched, but the returned dataset can be batched later with `tf_dataset.batch(batch_size)`.
    drop_remainder(`bool`, default `None`): Drop the last incomplete batch when loading. If not provided,
        defaults to the same setting as shuffle.
    num_workers (`int`): Number of workers to use for loading the dataset. Should be >= 1.

Returns:
    `tf.data.Dataset`

---
## fetch_function
```python
from tf_utils import fetch_function
```



---
## __init__
```python
from tf_utils import __init__
```



---
## get_shm
```python
from tf_utils import get_shm
```



---
## get_array
```python
from tf_utils import get_array
```



---
## __enter__
```python
from tf_utils import __enter__
```



---
## __exit__
```python
from tf_utils import __exit__
```



---
## __iter__
```python
from tf_utils import __iter__
```



---
## __call__
```python
from tf_utils import __call__
```



---
## worker_loop
```python
from tf_utils import worker_loop
```



---
## distribute_batches
```python
from tf_utils import distribute_batches
```



---
## scan_random_index
```python
from tf_utils import scan_random_index
```



---
## ensure_shapes
```python
from tf_utils import ensure_shapes
```



---
## send_batch_to_parent
```python
from tf_utils import send_batch_to_parent
```



---
## __name__
```python
from info_utils import __name__
```



---
## VerificationMode
```python
from info_utils import VerificationMode
```

`Enum` that specifies which verification checks to run.

The default mode is `BASIC_CHECKS`, which will perform only rudimentary checks to avoid slowdowns
when generating/downloading a dataset for the first time.

The verification modes:

|                           | Verification checks                                                           |
|---------------------------|------------------------------------------------------------------------------ |
| `ALL_CHECKS`              | Split checks, uniqueness of the keys yielded in case of the GeneratorBuilder  |
|                           | and the validity (number of files, checksums, etc.) of downloaded files       |
| `BASIC_CHECKS` (default)  | Same as `ALL_CHECKS` but without checking downloaded files                    |
| `NO_CHECKS`               | None                                                                          |

---
## verify_checksums
```python
from info_utils import verify_checksums
```



---
## verify_splits
```python
from info_utils import verify_splits
```



---
## get_size_checksum_dict
```python
from info_utils import get_size_checksum_dict
```

Compute the file size and the sha256 checksum of a file

---
## is_small_dataset
```python
from info_utils import is_small_dataset
```

Check if `dataset_size` is smaller than `config.IN_MEMORY_MAX_SIZE`.

Args:
    dataset_size (int): Dataset size in bytes.

Returns:
    bool: Whether `dataset_size` is smaller than `config.IN_MEMORY_MAX_SIZE`.

---
## __name__
```python
from deprecation_utils import __name__
```



---
## deprecated
```python
from deprecation_utils import deprecated
```

Decorator to mark a class or a function as deprecated.

Args:
    help_message (:obj:`str`, optional): An optional message to guide the user on how to
        switch to non-deprecated usage of the library.

---
## OnAccess
```python
from deprecation_utils import OnAccess
```

Enum metaclass that calls a user-specified function whenever a member is accessed.

---
## DeprecatedEnum
```python
from deprecation_utils import DeprecatedEnum
```

Enum class that calls `deprecate` method whenever a member is accessed.

---
## decorator
```python
from deprecation_utils import decorator
```



---
## __getattribute__
```python
from deprecation_utils import __getattribute__
```



---
## __getitem__
```python
from deprecation_utils import __getitem__
```



---
## __call__
```python
from deprecation_utils import __call__
```



---
## __new__
```python
from deprecation_utils import __new__
```



---
## help_message
```python
from deprecation_utils import help_message
```



---
## deprecate
```python
from deprecation_utils import deprecate
```



---
## wrapper
```python
from deprecation_utils import wrapper
```



---
## __name__
```python
from download_config import __name__
```



---
## DownloadConfig
```python
from download_config import DownloadConfig
```

Configuration for our cached path manager.

Attributes:
    cache_dir (`str` or `Path`, *optional*):
        Specify a cache directory to save the file to (overwrite the
        default cache dir).
    force_download (`bool`, defaults to `False`):
        If `True`, re-dowload the file even if it's already cached in
        the cache dir.
    resume_download (`bool`, defaults to `False`):
        If `True`, resume the download if an incompletely received file is
        found.
    proxies (`dict`, *optional*):
    user_agent (`str`, *optional*):
        Optional string or dict that will be appended to the user-agent on remote
        requests.
    extract_compressed_file (`bool`, defaults to `False`):
        If `True` and the path point to a zip or tar file,
        extract the compressed file in a folder along the archive.
    force_extract (`bool`, defaults to `False`):
        If `True` when `extract_compressed_file` is `True` and the archive
        was already extracted, re-extract the archive and override the folder where it was extracted.
    delete_extracted (`bool`, defaults to `False`):
        Whether to delete (or keep) the extracted files.
    extract_on_the_fly (`bool`, defaults to `False`):
        If `True`, extract compressed files while they are being read.
    use_etag (`bool`, defaults to `True`):
        Whether to use the ETag HTTP response header to validate the cached files.
    num_proc (`int`, *optional*):
        The number of processes to launch to download the files in parallel.
    max_retries (`int`, default to `1`):
        The number of times to retry an HTTP request if it fails.
    token (`str` or `bool`, *optional*):
        Optional string or boolean to use as Bearer token
        for remote files on the Datasets Hub. If `True`, or not specified, will get token from `~/.huggingface`.
    storage_options (`dict`, *optional*):
        Key/value pairs to be passed on to the dataset file-system backend, if any.
    download_desc (`str`, *optional*):
        A description to be displayed alongside with the progress bar while downloading the files.
    disable_tqdm (`bool`, defaults to `False`):
        Whether to disable the individual files download progress bar

---
## copy
```python
from download_config import copy
```



---
## __setattr__
```python
from download_config import __setattr__
```



---
## __name__
```python
from download_manager import __name__
```

Download manager interface.

---
## DownloadMode
```python
from download_manager import DownloadMode
```

`Enum` for how to treat pre-existing downloads and data.

The default mode is `REUSE_DATASET_IF_EXISTS`, which will reuse both
raw downloads and the prepared dataset if they exist.

The generations modes:

|                                     | Downloads | Dataset |
|-------------------------------------|-----------|---------|
| `REUSE_DATASET_IF_EXISTS` (default) | Reuse     | Reuse   |
| `REUSE_CACHE_IF_EXISTS`             | Reuse     | Fresh   |
| `FORCE_REDOWNLOAD`                  | Fresh     | Fresh   |

---
## DownloadManager
```python
from download_manager import DownloadManager
```



---
## __init__
```python
from download_manager import __init__
```

Download manager constructor.

Args:
    data_dir:
        can be used to specify a manual directory to get the files from.
    dataset_name (`str`):
        name of dataset this instance will be used for. If
        provided, downloads will contain which datasets they were used for.
    download_config (`DownloadConfig`):
        to specify the cache directory and other
        download options
    base_path (`str`):
        base path that is used when relative paths are used to
        download files. This can be a remote url.
    record_checksums (`bool`, defaults to `True`):
        Whether to record the checksums of the downloaded files. If None, the value is inferred from the builder.

---
## manual_dir
```python
from download_manager import manual_dir
```



---
## downloaded_size
```python
from download_manager import downloaded_size
```

Returns the total size of downloaded files.

---
## _record_sizes_checksums
```python
from download_manager import _record_sizes_checksums
```

Record size/checksum of downloaded files.

---
## download
```python
from download_manager import download
```

Download given URL(s).

By default, only one process is used for download. Pass customized `download_config.num_proc` to change this behavior.

Args:
    url_or_urls (`str` or `list` or `dict`):
        URL or `list` or `dict` of URLs to download. Each URL is a `str`.

Returns:
    `str` or `list` or `dict`:
        The downloaded paths matching the given input `url_or_urls`.

Example:

```py
>>> downloaded_files = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
```

---
## _download_batched
```python
from download_manager import _download_batched
```



---
## _download_single
```python
from download_manager import _download_single
```



---
## iter_archive
```python
from download_manager import iter_archive
```

Iterate over files within an archive.

Args:
    path_or_buf (`str` or `io.BufferedReader`):
        Archive path or archive binary file object.

Yields:
    `tuple[str, io.BufferedReader]`:
        2-tuple (path_within_archive, file_object).
        File object is opened in binary mode.

Example:

```py
>>> archive = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
>>> files = dl_manager.iter_archive(archive)
```

---
## iter_files
```python
from download_manager import iter_files
```

Iterate over file paths.

Args:
    paths (`str` or `list` of `str`):
        Root paths.

Yields:
    `str`: File path.

Example:

```py
>>> files = dl_manager.download_and_extract('https://huggingface.co/datasets/beans/resolve/main/data/train.zip')
>>> files = dl_manager.iter_files(files)
```

---
## extract
```python
from download_manager import extract
```

Extract given path(s).

Args:
    path_or_paths (path or `list` or `dict`):
        Path of file to extract. Each path is a `str`.

Returns:
    extracted_path(s): `str`, The extracted paths matching the given input
    path_or_paths.

Example:

```py
>>> downloaded_files = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
>>> extracted_files = dl_manager.extract(downloaded_files)
```

---
## download_and_extract
```python
from download_manager import download_and_extract
```

Download and extract given `url_or_urls`.

Is roughly equivalent to:

```
extracted_paths = dl_manager.extract(dl_manager.download(url_or_urls))
```

Args:
    url_or_urls (`str` or `list` or `dict`):
        URL or `list` or `dict` of URLs to download and extract. Each URL is a `str`.

Returns:
    extracted_path(s): `str`, extracted paths of given URL(s).

---
## get_recorded_sizes_checksums
```python
from download_manager import get_recorded_sizes_checksums
```



---
## delete_extracted_files
```python
from download_manager import delete_extracted_files
```



---
## manage_extracted_files
```python
from download_manager import manage_extracted_files
```



---
## __name__
```python
from streaming_download_manager import __name__
```



---
## StreamingDownloadManager
```python
from streaming_download_manager import StreamingDownloadManager
```

Download manager that uses the "::" separator to navigate through (possibly remote) compressed archives.
Contrary to the regular `DownloadManager`, the `download` and `extract` methods don't actually download nor extract
data, but they rather return the path or url that could be opened using the `xopen` function which extends the
built-in `open` function to stream data from remote files.

---
## __init__
```python
from streaming_download_manager import __init__
```



---
## manual_dir
```python
from streaming_download_manager import manual_dir
```



---
## download
```python
from streaming_download_manager import download
```

Normalize URL(s) of files to stream data from.
This is the lazy version of `DownloadManager.download` for streaming.

Args:
    url_or_urls (`str` or `list` or `dict`):
        URL(s) of files to stream data from. Each url is a `str`.

Returns:
    url(s): (`str` or `list` or `dict`), URL(s) to stream data from matching the given input url_or_urls.

Example:

```py
>>> downloaded_files = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
```

---
## _download_single
```python
from streaming_download_manager import _download_single
```



---
## extract
```python
from streaming_download_manager import extract
```

Add extraction protocol for given url(s) for streaming.

This is the lazy version of `DownloadManager.extract` for streaming.

Args:
    url_or_urls (`str` or `list` or `dict`):
        URL(s) of files to stream data from. Each url is a `str`.

Returns:
    url(s): (`str` or `list` or `dict`), URL(s) to stream data from matching the given input `url_or_urls`.

Example:

```py
>>> downloaded_files = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
>>> extracted_files = dl_manager.extract(downloaded_files)
```

---
## _extract
```python
from streaming_download_manager import _extract
```



---
## download_and_extract
```python
from streaming_download_manager import download_and_extract
```

Prepare given `url_or_urls` for streaming (add extraction protocol).

This is the lazy version of `DownloadManager.download_and_extract` for streaming.

Is equivalent to:

```
urls = dl_manager.extract(dl_manager.download(url_or_urls))
```

Args:
    url_or_urls (`str` or `list` or `dict`):
        URL(s) to stream from data from. Each url is a `str`.

Returns:
    url(s): (`str` or `list` or `dict`), URL(s) to stream data from matching the given input `url_or_urls`.

---
## iter_archive
```python
from streaming_download_manager import iter_archive
```

Iterate over files within an archive.

Args:
    urlpath_or_buf (`str` or `io.BufferedReader`):
        Archive path or archive binary file object.

Yields:
    `tuple[str, io.BufferedReader]`:
        2-tuple (path_within_archive, file_object).
        File object is opened in binary mode.

Example:

```py
>>> archive = dl_manager.download('https://storage.googleapis.com/seldon-datasets/sentence_polarity_v1/rt-polaritydata.tar.gz')
>>> files = dl_manager.iter_archive(archive)
```

---
## iter_files
```python
from streaming_download_manager import iter_files
```

Iterate over files.

Args:
    urlpaths (`str` or `list` of `str`):
        Root paths.

Yields:
    str: File URL path.

Example:

```py
>>> files = dl_manager.download_and_extract('https://huggingface.co/datasets/beans/resolve/main/data/train.zip')
>>> files = dl_manager.iter_files(files)
```

---
## __name__
```python
from polars_formatter import __name__
```



---
## PolarsArrowExtractor
```python
from polars_formatter import PolarsArrowExtractor
```



---
## PolarsFeaturesDecoder
```python
from polars_formatter import PolarsFeaturesDecoder
```



---
## PolarsFormatter
```python
from polars_formatter import PolarsFormatter
```



---
## extract_row
```python
from polars_formatter import extract_row
```



---
## extract_column
```python
from polars_formatter import extract_column
```



---
## extract_batch
```python
from polars_formatter import extract_batch
```



---
## __init__
```python
from polars_formatter import __init__
```



---
## decode_row
```python
from polars_formatter import decode_row
```



---
## decode_column
```python
from polars_formatter import decode_column
```



---
## decode_batch
```python
from polars_formatter import decode_batch
```



---
## format_row
```python
from polars_formatter import format_row
```



---
## format_column
```python
from polars_formatter import format_column
```



---
## format_batch
```python
from polars_formatter import format_batch
```



---
## _register_formatter
```python
from __init__ import _register_formatter
```

Register a Formatter object using a name and optional aliases.
This function must be used on a Formatter class.

---
## _register_unavailable_formatter
```python
from __init__ import _register_unavailable_formatter
```

Register an unavailable Formatter object using a name and optional aliases.
This function must be used on an Exception object that is raised when trying to get the unavailable formatter.

---
## get_format_type_from_alias
```python
from __init__ import get_format_type_from_alias
```

If the given format type is a known alias, then return its main type name. Otherwise return the type with no change.

---
## get_formatter
```python
from __init__ import get_formatter
```

Factory function to get a Formatter given its type name and keyword arguments.
A formatter is an object that extracts and formats data from pyarrow table.
It defines the formatting for rows, colums and batches.
If the formatter for a given type name doesn't exist or is not available, an error is raised.

---
## _is_range_contiguous
```python
from formatting import _is_range_contiguous
```



---
## _raise_bad_key_type
```python
from formatting import _raise_bad_key_type
```



---
## _query_table_with_indices_mapping
```python
from formatting import _query_table_with_indices_mapping
```

Query a pyarrow Table to extract the subtable that correspond to the given key.
The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
account a shuffling or an indices selection for example.
The indices table must contain one column named "indices" of type uint64.

---
## _query_table
```python
from formatting import _query_table
```

Query a pyarrow Table to extract the subtable that correspond to the given key.

---
## _is_array_with_nulls
```python
from formatting import _is_array_with_nulls
```



---
## BaseArrowExtractor
```python
from formatting import BaseArrowExtractor
```

Arrow extractor are used to extract data from pyarrow tables.
It makes it possible to extract rows, columns and batches.
These three extractions types have to be implemented.

---
## _unnest
```python
from formatting import _unnest
```

Return the first element of a batch (dict) as a row (dict)

---
## SimpleArrowExtractor
```python
from formatting import SimpleArrowExtractor
```



---
## PythonArrowExtractor
```python
from formatting import PythonArrowExtractor
```



---
## NumpyArrowExtractor
```python
from formatting import NumpyArrowExtractor
```



---
## PandasArrowExtractor
```python
from formatting import PandasArrowExtractor
```



---
## PythonFeaturesDecoder
```python
from formatting import PythonFeaturesDecoder
```



---
## PandasFeaturesDecoder
```python
from formatting import PandasFeaturesDecoder
```



---
## LazyDict
```python
from formatting import LazyDict
```

A dictionary backed by Arrow data. The values are formatted on-the-fly when accessing the dictionary.

---
## LazyRow
```python
from formatting import LazyRow
```



---
## LazyBatch
```python
from formatting import LazyBatch
```



---
## Formatter
```python
from formatting import Formatter
```

A formatter is an object that extracts and formats data from pyarrow tables.
It defines the formatting for rows, columns and batches.

---
## TensorFormatter
```python
from formatting import TensorFormatter
```



---
## ArrowFormatter
```python
from formatting import ArrowFormatter
```



---
## PythonFormatter
```python
from formatting import PythonFormatter
```



---
## PandasFormatter
```python
from formatting import PandasFormatter
```



---
## CustomFormatter
```python
from formatting import CustomFormatter
```

A user-defined custom formatter function defined by a ``transform``.
The transform must take as input a batch of data extracted for an arrow table using the python extractor,
and return a batch.
If the output batch is not a dict, then output_all_columns won't work.
If the ouput batch has several fields, then querying a single column won't work since we don't know which field
to return.

---
## _check_valid_column_key
```python
from formatting import _check_valid_column_key
```



---
## _check_valid_index_key
```python
from formatting import _check_valid_index_key
```



---
## key_to_query_type
```python
from formatting import key_to_query_type
```



---
## query_table
```python
from formatting import query_table
```

Query a Table to extract the subtable that correspond to the given key.

Args:
    table (``datasets.table.Table``): The input Table to query from
    key (``Union[int, slice, range, str, Iterable]``): The key can be of different types:
        - an integer i: the subtable containing only the i-th row
        - a slice [i:j:k]: the subtable containing the rows that correspond to this slice
        - a range(i, j, k): the subtable containing the rows that correspond to this range
        - a string c: the subtable containing all the rows but only the column c
        - an iterable l: the subtable that is the concatenation of all the i-th rows for all i in the iterable
    indices (Optional ``datasets.table.Table``): If not None, it is used to re-map the given key to the table rows.
        The indices table must contain one column named "indices" of type uint64.
        This is used in case of shuffling or rows selection.


Returns:
    ``pyarrow.Table``: the result of the query on the input table

---
## format_table
```python
from formatting import format_table
```

Format a Table depending on the key that was used and a Formatter object.

Args:
    table (``datasets.table.Table``): The input Table to format
    key (``Union[int, slice, range, str, Iterable]``): Depending on the key that was used, the formatter formats
        the table as either a row, a column or a batch.
    formatter (``datasets.formatting.formatting.Formatter``): Any subclass of a Formatter such as
        PythonFormatter, NumpyFormatter, etc.
    format_columns (:obj:`List[str]`, optional): if not None, it defines the columns that will be formatted using the
        given formatter. Other columns are discarded (unless ``output_all_columns`` is True)
    output_all_columns (:obj:`bool`, defaults to False). If True, the formatted output is completed using the columns
        that are not in the ``format_columns`` list. For these columns, the PythonFormatter is used.


Returns:
    A row, column or batch formatted object defined by the Formatter:
    - the PythonFormatter returns a dictionary for a row or a batch, and a list for a column.
    - the NumpyFormatter returns a dictionary for a row or a batch, and a np.array for a column.
    - the PandasFormatter returns a pd.DataFrame for a row or a batch, and a pd.Series for a column.
    - the TorchFormatter returns a dictionary for a row or a batch, and a torch.Tensor for a column.
    - the TFFormatter returns a dictionary for a row or a batch, and a tf.Tensor for a column.

---
## extract_row
```python
from formatting import extract_row
```



---
## extract_column
```python
from formatting import extract_column
```



---
## extract_batch
```python
from formatting import extract_batch
```



---
## _arrow_array_to_numpy
```python
from formatting import _arrow_array_to_numpy
```



---
## decode_row
```python
from formatting import decode_row
```



---
## decode_column
```python
from formatting import decode_column
```



---
## decode_batch
```python
from formatting import decode_batch
```



---
## __len__
```python
from formatting import __len__
```



---
## __getitem__
```python
from formatting import __getitem__
```



---
## __setitem__
```python
from formatting import __setitem__
```



---
## __delitem__
```python
from formatting import __delitem__
```



---
## __iter__
```python
from formatting import __iter__
```



---
## __contains__
```python
from formatting import __contains__
```



---
## __repr__
```python
from formatting import __repr__
```



---
## __copy__
```python
from formatting import __copy__
```



---
## copy
```python
from formatting import copy
```



---
## fromkeys
```python
from formatting import fromkeys
```



---
## format
```python
from formatting import format
```



---
## _format_all
```python
from formatting import _format_all
```



---
## __call__
```python
from formatting import __call__
```



---
## format_row
```python
from formatting import format_row
```



---
## format_column
```python
from formatting import format_column
```



---
## format_batch
```python
from formatting import format_batch
```



---
## recursive_tensorize
```python
from formatting import recursive_tensorize
```



---
## __or__
```python
from formatting import __or__
```



---
## __ror__
```python
from formatting import __ror__
```



---
## __ior__
```python
from formatting import __ior__
```



---
## __name__
```python
from torch_formatter import __name__
```



---
## TorchFormatter
```python
from torch_formatter import TorchFormatter
```



---
## __init__
```python
from torch_formatter import __init__
```



---
## _consolidate
```python
from torch_formatter import _consolidate
```



---
## _tensorize
```python
from torch_formatter import _tensorize
```



---
## _recursive_tensorize
```python
from torch_formatter import _recursive_tensorize
```



---
## recursive_tensorize
```python
from torch_formatter import recursive_tensorize
```



---
## format_row
```python
from torch_formatter import format_row
```



---
## format_column
```python
from torch_formatter import format_column
```



---
## format_batch
```python
from torch_formatter import format_batch
```



---
## __name__
```python
from jax_formatter import __name__
```



---
## JaxFormatter
```python
from jax_formatter import JaxFormatter
```



---
## __init__
```python
from jax_formatter import __init__
```



---
## _map_devices_to_str
```python
from jax_formatter import _map_devices_to_str
```



---
## _consolidate
```python
from jax_formatter import _consolidate
```



---
## _tensorize
```python
from jax_formatter import _tensorize
```



---
## _recursive_tensorize
```python
from jax_formatter import _recursive_tensorize
```



---
## recursive_tensorize
```python
from jax_formatter import recursive_tensorize
```



---
## format_row
```python
from jax_formatter import format_row
```



---
## format_column
```python
from jax_formatter import format_column
```



---
## format_batch
```python
from jax_formatter import format_batch
```



---
## __name__
```python
from tf_formatter import __name__
```



---
## TFFormatter
```python
from tf_formatter import TFFormatter
```



---
## __init__
```python
from tf_formatter import __init__
```



---
## _consolidate
```python
from tf_formatter import _consolidate
```



---
## _tensorize
```python
from tf_formatter import _tensorize
```



---
## _recursive_tensorize
```python
from tf_formatter import _recursive_tensorize
```



---
## recursive_tensorize
```python
from tf_formatter import recursive_tensorize
```



---
## format_row
```python
from tf_formatter import format_row
```



---
## format_column
```python
from tf_formatter import format_column
```



---
## format_batch
```python
from tf_formatter import format_batch
```



---
## __name__
```python
from np_formatter import __name__
```



---
## NumpyFormatter
```python
from np_formatter import NumpyFormatter
```



---
## __init__
```python
from np_formatter import __init__
```



---
## _consolidate
```python
from np_formatter import _consolidate
```



---
## _tensorize
```python
from np_formatter import _tensorize
```



---
## _recursive_tensorize
```python
from np_formatter import _recursive_tensorize
```



---
## recursive_tensorize
```python
from np_formatter import recursive_tensorize
```



---
## format_row
```python
from np_formatter import format_row
```



---
## format_column
```python
from np_formatter import format_column
```



---
## format_batch
```python
from np_formatter import format_batch
```



---
## __name__
```python
from delete_from_hub import __name__
```



---
## _command_factory
```python
from delete_from_hub import _command_factory
```



---
## DeleteFromHubCommand
```python
from delete_from_hub import DeleteFromHubCommand
```



---
## register_subcommand
```python
from delete_from_hub import register_subcommand
```



---
## __init__
```python
from delete_from_hub import __init__
```



---
## run
```python
from delete_from_hub import run
```



---
## info_command_factory
```python
from env import info_command_factory
```



---
## format_dict
```python
from env import format_dict
```



---
## __name__
```python
from convert_to_parquet import __name__
```



---
## _command_factory
```python
from convert_to_parquet import _command_factory
```



---
## ConvertToParquetCommand
```python
from convert_to_parquet import ConvertToParquetCommand
```



---
## register_subcommand
```python
from convert_to_parquet import register_subcommand
```



---
## __init__
```python
from convert_to_parquet import __init__
```



---
## run
```python
from convert_to_parquet import run
```



---
## convert_command_factory
```python
from convert import convert_command_factory
```

Factory function used to convert a model TF 1.0 checkpoint in a PyTorch checkpoint.

Returns: ConvertCommand

---
## ConvertCommand
```python
from convert import ConvertCommand
```



---
## register_subcommand
```python
from convert import register_subcommand
```

Register this command to argparse so it's available for the datasets-cli

Args:
    parser: Root parser to register command-specific arguments

---
## __init__
```python
from convert import __init__
```



---
## run
```python
from convert import run
```



---
## BaseDatasetsCLICommand
```python
from __init__ import BaseDatasetsCLICommand
```



---
## _test_command_factory
```python
from test import _test_command_factory
```



---
## TestCommand
```python
from test import TestCommand
```



---
## register_subcommand
```python
from test import register_subcommand
```



---
## __init__
```python
from test import __init__
```



---
## run
```python
from test import run
```



---
## get_builders
```python
from test import get_builders
```



---
## __name__
```python
from datasets_cli import __name__
```



---
## parse_unknown_args
```python
from datasets_cli import parse_unknown_args
```



---
## main
```python
from datasets_cli import main
```



---
## BaseCompressedFileFileSystem
```python
from compression import BaseCompressedFileFileSystem
```

Read contents of compressed file as a filesystem with one file inside.

---
## Bz2FileSystem
```python
from compression import Bz2FileSystem
```

Read contents of BZ2 file as a filesystem with one file inside.

---
## GzipFileSystem
```python
from compression import GzipFileSystem
```

Read contents of GZIP file as a filesystem with one file inside.

---
## Lz4FileSystem
```python
from compression import Lz4FileSystem
```

Read contents of LZ4 file as a filesystem with one file inside.

---
## XzFileSystem
```python
from compression import XzFileSystem
```

Read contents of .xz (LZMA) file as a filesystem with one file inside.

---
## ZstdFileSystem
```python
from compression import ZstdFileSystem
```

Read contents of .zstd file as a filesystem with one file inside.

---
## _strip_protocol
```python
from compression import _strip_protocol
```



---
## _get_dirs
```python
from compression import _get_dirs
```



---
## cat
```python
from compression import cat
```



---
## _open
```python
from compression import _open
```



---
## is_remote_filesystem
```python
from __init__ import is_remote_filesystem
```

Checks if `fs` is a remote filesystem.

Args:
    fs (`fsspec.spec.AbstractFileSystem`):
        An abstract super-class for pythonic file-systems, e.g. `fsspec.filesystem('file')` or `s3fs.S3FileSystem`.

---
## rename
```python
from __init__ import rename
```

Renames the file `src` in `fs` to `dst`.

---
## __name__
```python
from webdataset import __name__
```



---
## WebDataset
```python
from webdataset import WebDataset
```



---
## base_plus_ext
```python
from webdataset import base_plus_ext
```

Split off all file extensions.

Returns base, allext.

---
## text_loads
```python
from webdataset import text_loads
```



---
## tenbin_loads
```python
from webdataset import tenbin_loads
```



---
## msgpack_loads
```python
from webdataset import msgpack_loads
```



---
## npy_loads
```python
from webdataset import npy_loads
```



---
## npz_loads
```python
from webdataset import npz_loads
```



---
## cbor_loads
```python
from webdataset import cbor_loads
```



---
## torch_loads
```python
from webdataset import torch_loads
```



---
## _get_pipeline_from_tar
```python
from webdataset import _get_pipeline_from_tar
```



---
## _info
```python
from webdataset import _info
```



---
## _split_generators
```python
from webdataset import _split_generators
```

We handle string, list and dicts in datafiles

---
## _generate_examples
```python
from webdataset import _generate_examples
```



---
## __name__
```python
from _tenbin import __name__
```

Binary tensor encodings for PyTorch and NumPy.

This defines efficient binary encodings for tensors. The format is 8 byte
aligned and can be used directly for computations when transmitted, say,
via RDMA. The format is supported by WebDataset with the `.ten` filename
extension. It is also used by Tensorcom, Tensorcom RDMA, and can be used
for fast tensor storage with LMDB and in disk files (which can be memory
mapped)

Data is encoded as a series of chunks:

- magic number (int64)
- length in bytes (int64)
- bytes (multiple of 64 bytes long)

Arrays are a header chunk followed by a data chunk.
Header chunks have the following structure:

- dtype (int64)
- 8 byte array name
- ndim (int64)
- dim[0]
- dim[1]
- ...

---
## bytelen
```python
from _tenbin import bytelen
```

Determine the length of a in bytes.

---
## bytedata
```python
from _tenbin import bytedata
```

Return a the raw data corresponding to a.

---
## check_acceptable_input_type
```python
from _tenbin import check_acceptable_input_type
```

Check that the data has an acceptable type for tensor encoding.

:param data: array
:param allow64: allow 64 bit types

---
## str64
```python
from _tenbin import str64
```

Convert a string to an int64.

---
## unstr64
```python
from _tenbin import unstr64
```

Convert an int64 to a string.

---
## check_infos
```python
from _tenbin import check_infos
```

Verify the info strings.

---
## encode_header
```python
from _tenbin import encode_header
```

Encode an array header as a byte array.

---
## decode_header
```python
from _tenbin import decode_header
```

Decode a byte array into an array header.

---
## encode_list
```python
from _tenbin import encode_list
```

Given a list of arrays, encode them into a list of byte arrays.

---
## decode_list
```python
from _tenbin import decode_list
```

Given a list of byte arrays, decode them into arrays.

---
## roundup
```python
from _tenbin import roundup
```

Round up to the next multiple of 64.

---
## encode_chunks
```python
from _tenbin import encode_chunks
```

Encode a list of chunks into a single byte array, with lengths and magics..

---
## decode_chunks
```python
from _tenbin import decode_chunks
```

Decode a byte array into a list of chunks.

---
## encode_buffer
```python
from _tenbin import encode_buffer
```

Encode a list of arrays into a single byte array.

---
## decode_buffer
```python
from _tenbin import decode_buffer
```

Decode a byte array into a list of arrays.

---
## write_chunk
```python
from _tenbin import write_chunk
```

Write a byte chunk to the stream with magics, length, and padding.

---
## read_chunk
```python
from _tenbin import read_chunk
```

Read a byte chunk from a stream with magics, length, and padding.

---
## write
```python
from _tenbin import write
```

Write a list of arrays to a stream, with magics, length, and padding.

---
## read
```python
from _tenbin import read
```

Read a list of arrays from a stream, with magics, length, and padding.

---
## save
```python
from _tenbin import save
```

Save a list of arrays to a file, with magics, length, and padding.

---
## load
```python
from _tenbin import load
```

Read a list of arrays from a file, with magics, length, and padding.

---
## __name__
```python
from folder_based_builder import __name__
```



---
## count_path_segments
```python
from folder_based_builder import count_path_segments
```



---
## FolderBasedBuilderConfig
```python
from folder_based_builder import FolderBasedBuilderConfig
```

BuilderConfig for AutoFolder.

---
## FolderBasedBuilder
```python
from folder_based_builder import FolderBasedBuilder
```

Base class for generic data loaders for vision and image data.


Abstract class attributes to be overridden by a child class:
    BASE_FEATURE: feature object to decode data (i.e. datasets.Image, datasets.Audio, ...)
    BASE_COLUMN_NAME: string key name of a base feature (i.e. "image", "audio", ...)
    BUILDER_CONFIG_CLASS: builder config inherited from `folder_based_builder.FolderBasedBuilderConfig`
    EXTENSIONS: list of allowed extensions (only files with these extensions and METADATA_FILENAME files
        will be included in a dataset)

---
## __post_init__
```python
from folder_based_builder import __post_init__
```



---
## _info
```python
from folder_based_builder import _info
```



---
## _split_generators
```python
from folder_based_builder import _split_generators
```



---
## _split_files_and_archives
```python
from folder_based_builder import _split_files_and_archives
```



---
## _read_metadata
```python
from folder_based_builder import _read_metadata
```



---
## _generate_examples
```python
from folder_based_builder import _generate_examples
```



---
## analyze
```python
from folder_based_builder import analyze
```



---
## _get_modification_time
```python
from cache import _get_modification_time
```



---
## _find_hash_in_cache
```python
from cache import _find_hash_in_cache
```



---
## Cache
```python
from cache import Cache
```

An abstract class - provides cache directories for data from links

:param cache_dir: The root of the cache.

---
## __init__
```python
from cache import __init__
```



---
## _info
```python
from cache import _info
```



---
## download_and_prepare
```python
from cache import download_and_prepare
```



---
## _split_generators
```python
from cache import _split_generators
```



---
## _generate_tables
```python
from cache import _generate_tables
```



---
## ArrowConfig
```python
from arrow import ArrowConfig
```

BuilderConfig for Arrow.

---
## Arrow
```python
from arrow import Arrow
```



---
## __post_init__
```python
from arrow import __post_init__
```



---
## _info
```python
from arrow import _info
```



---
## _split_generators
```python
from arrow import _split_generators
```

We handle string, list and dicts in datafiles

---
## _cast_table
```python
from arrow import _cast_table
```



---
## _generate_tables
```python
from arrow import _generate_tables
```



---
## __name__
```python
from imagefolder import __name__
```



---
## ImageFolderConfig
```python
from imagefolder import ImageFolderConfig
```

BuilderConfig for ImageFolder.

---
## ImageFolder
```python
from imagefolder import ImageFolder
```



---
## __post_init__
```python
from imagefolder import __post_init__
```



---
## GeneratorConfig
```python
from generator import GeneratorConfig
```



---
## Generator
```python
from generator import Generator
```



---
## __post_init__
```python
from generator import __post_init__
```



---
## _info
```python
from generator import _info
```



---
## _split_generators
```python
from generator import _split_generators
```



---
## _generate_examples
```python
from generator import _generate_examples
```



---
## ujson_dumps
```python
from json import ujson_dumps
```



---
## ujson_loads
```python
from json import ujson_loads
```



---
## pandas_read_json
```python
from json import pandas_read_json
```



---
## JsonConfig
```python
from json import JsonConfig
```

BuilderConfig for JSON.

---
## Json
```python
from json import Json
```



---
## __post_init__
```python
from json import __post_init__
```



---
## _info
```python
from json import _info
```



---
## _split_generators
```python
from json import _split_generators
```

We handle string, list and dicts in datafiles

---
## _cast_table
```python
from json import _cast_table
```



---
## _generate_tables
```python
from json import _generate_tables
```



---
## CsvConfig
```python
from csv import CsvConfig
```

BuilderConfig for CSV.

---
## Csv
```python
from csv import Csv
```



---
## __post_init__
```python
from csv import __post_init__
```



---
## pd_read_csv_kwargs
```python
from csv import pd_read_csv_kwargs
```



---
## _info
```python
from csv import _info
```



---
## _split_generators
```python
from csv import _split_generators
```

We handle string, list and dicts in datafiles

---
## _cast_table
```python
from csv import _cast_table
```



---
## _generate_tables
```python
from csv import _generate_tables
```



---
## TextConfig
```python
from text import TextConfig
```

BuilderConfig for text files.

---
## _info
```python
from text import _info
```



---
## _split_generators
```python
from text import _split_generators
```

The `data_files` kwarg in load_dataset() can be a str, List[str], Dict[str,str], or Dict[str,List[str]].

If str or List[str], then the dataset returns only the 'train' split.
If dict, then keys should be from the `datasets.Split` enum.

---
## _cast_table
```python
from text import _cast_table
```



---
## _generate_tables
```python
from text import _generate_tables
```



---
## ParquetConfig
```python
from parquet import ParquetConfig
```

BuilderConfig for Parquet.

---
## Parquet
```python
from parquet import Parquet
```



---
## __post_init__
```python
from parquet import __post_init__
```



---
## _info
```python
from parquet import _info
```



---
## _split_generators
```python
from parquet import _split_generators
```

We handle string, list and dicts in datafiles

---
## _cast_table
```python
from parquet import _cast_table
```



---
## _generate_tables
```python
from parquet import _generate_tables
```



---
## __name__
```python
from audiofolder import __name__
```



---
## AudioFolderConfig
```python
from audiofolder import AudioFolderConfig
```

Builder Config for AudioFolder.

---
## AudioFolder
```python
from audiofolder import AudioFolder
```



---
## __post_init__
```python
from audiofolder import __post_init__
```



---
## SparkConfig
```python
from spark import SparkConfig
```

BuilderConfig for Spark.

---
## _reorder_dataframe_by_partition
```python
from spark import _reorder_dataframe_by_partition
```



---
## _generate_iterable_examples
```python
from spark import _generate_iterable_examples
```



---
## SparkExamplesIterable
```python
from spark import SparkExamplesIterable
```



---
## Spark
```python
from spark import Spark
```



---
## __post_init__
```python
from spark import __post_init__
```



---
## _init_state_dict
```python
from spark import _init_state_dict
```



---
## load_state_dict
```python
from spark import load_state_dict
```



---
## __iter__
```python
from spark import __iter__
```



---
## shuffle_data_sources
```python
from spark import shuffle_data_sources
```



---
## shard_data_sources
```python
from spark import shard_data_sources
```



---
## n_shards
```python
from spark import n_shards
```



---
## _validate_cache_dir
```python
from spark import _validate_cache_dir
```



---
## _info
```python
from spark import _info
```



---
## _split_generators
```python
from spark import _split_generators
```



---
## _repartition_df_if_needed
```python
from spark import _repartition_df_if_needed
```



---
## _prepare_split_single
```python
from spark import _prepare_split_single
```



---
## _prepare_split
```python
from spark import _prepare_split
```



---
## _get_examples_iterable_for_split
```python
from spark import _get_examples_iterable_for_split
```



---
## create_cache_and_write_probe
```python
from spark import create_cache_and_write_probe
```



---
## get_arrow_batch_size
```python
from spark import get_arrow_batch_size
```



---
## write_arrow
```python
from spark import write_arrow
```



---
## _rename_shard
```python
from spark import _rename_shard
```



---
## __name__
```python
from pandas import __name__
```



---
## PandasConfig
```python
from pandas import PandasConfig
```

BuilderConfig for Pandas.

---
## Pandas
```python
from pandas import Pandas
```



---
## __post_init__
```python
from pandas import __post_init__
```



---
## _info
```python
from pandas import _info
```



---
## _split_generators
```python
from pandas import _split_generators
```

We handle string, list and dicts in datafiles

---
## _cast_table
```python
from pandas import _cast_table
```



---
## _generate_tables
```python
from pandas import _generate_tables
```



---
## SqlConfig
```python
from sql import SqlConfig
```

BuilderConfig for SQL.

---
## Sql
```python
from sql import Sql
```



---
## __post_init__
```python
from sql import __post_init__
```



---
## create_config_id
```python
from sql import create_config_id
```



---
## pd_read_sql_kwargs
```python
from sql import pd_read_sql_kwargs
```



---
## _info
```python
from sql import _info
```



---
## _split_generators
```python
from sql import _split_generators
```



---
## _cast_table
```python
from sql import _cast_table
```



---
## _generate_tables
```python
from sql import _generate_tables
```



---
## LZ4FrameCompressor
```python
from __init__ import LZ4FrameCompressor
```

Create a LZ4 frame compressor object.

This object can be used to compress data incrementally.

Args:
    block_size (int): Specifies the maximum blocksize to use.
        Options:

        - `lz4.frame.BLOCKSIZE_DEFAULT`: the lz4 library default
        - `lz4.frame.BLOCKSIZE_MAX64KB`: 64 kB
        - `lz4.frame.BLOCKSIZE_MAX256KB`: 256 kB
        - `lz4.frame.BLOCKSIZE_MAX1MB`: 1 MB
        - `lz4.frame.BLOCKSIZE_MAX4MB`: 4 MB

        If unspecified, will default to `lz4.frame.BLOCKSIZE_DEFAULT` which
        is equal to `lz4.frame.BLOCKSIZE_MAX64KB`.
    block_linked (bool): Specifies whether to use block-linked
        compression. If ``True``, the compression ratio is improved,
        especially for small block sizes. If ``False`` the blocks are
        compressed independently. The default is ``True``.
    compression_level (int): Specifies the level of compression used.
        Values between 0-16 are valid, with 0 (default) being the
        lowest compression (0-2 are the same value), and 16 the highest.
        Values above 16 will be treated as 16.
        Values between 4-9 are recommended. 0 is the default.
        The following module constants are provided as a convenience:

        - `lz4.frame.COMPRESSIONLEVEL_MIN`: Minimum compression (0)
        - `lz4.frame.COMPRESSIONLEVEL_MINHC`: Minimum high-compression (3)
        - `lz4.frame.COMPRESSIONLEVEL_MAX`: Maximum compression (16)

    content_checksum (bool): Specifies whether to enable checksumming of
        the payload content. If ``True``, a checksum of the uncompressed
        data is stored at the end of the compressed frame which is checked
        during decompression. The default is ``False``.
    block_checksum (bool): Specifies whether to enable checksumming of
        the content of each block. If ``True`` a checksum of the
        uncompressed data in each block in the frame is stored at the end
        of each block. If present, these checksums will be used to
        validate the data during decompression. The default is ``False``,
        meaning block checksums are not calculated and stored. This
        functionality is only supported if the underlying LZ4 library has
        version >= 1.8.0. Attempting to set this value to ``True`` with a
        version of LZ4 < 1.8.0 will cause a ``RuntimeError`` to be raised.
    auto_flush (bool): When ``False``, the LZ4 library may buffer data
        until a block is full. When ``True`` no buffering occurs, and
        partially full blocks may be returned. The default is ``False``.
    return_bytearray (bool): When ``False`` a ``bytes`` object is returned
        from the calls to methods of this class. When ``True`` a
        ``bytearray`` object will be returned. The default is ``False``.

---
## LZ4FrameDecompressor
```python
from __init__ import LZ4FrameDecompressor
```

Create a LZ4 frame decompressor object.

This can be used to decompress data incrementally.

For a more convenient way of decompressing an entire compressed frame at
once, see `lz4.frame.decompress()`.

Args:
    return_bytearray (bool): When ``False`` a bytes object is returned from
        the calls to methods of this class. When ``True`` a bytearray
        object will be returned. The default is ``False``.

Attributes:
    eof (bool): ``True`` if the end-of-stream marker has been reached.
        ``False`` otherwise.
    unused_data (bytes): Data found after the end of the compressed stream.
        Before the end of the frame is reached, this will be ``b''``.
    needs_input (bool): ``False`` if the ``decompress()`` method can
        provide more decompressed data before requiring new uncompressed
        input. ``True`` otherwise.

---
## LZ4FrameFile
```python
from __init__ import LZ4FrameFile
```

A file object providing transparent LZ4F (de)compression.

An LZ4FFile can act as a wrapper for an existing file object, or refer
directly to a named file on disk.

Note that LZ4FFile provides a *binary* file interface - data read is
returned as bytes, and data to be written must be given as bytes.

When opening a file for writing, the settings used by the compressor can be
specified. The underlying compressor object is
`lz4.frame.LZ4FrameCompressor`. See the docstrings for that class for
details on compression options.

Args:
    filename(str, bytes, PathLike, file object): can be either an actual
        file name (given as a str, bytes, or
        PathLike object), in which case the named file is opened, or it
        can be an existing file object to read from or write to.

Keyword Args:
    mode(str): mode can be ``'r'`` for reading (default), ``'w'`` for
        (over)writing, ``'x'`` for creating exclusively, or ``'a'``
        for appending. These can equivalently be given as ``'rb'``,
        ``'wb'``, ``'xb'`` and ``'ab'`` respectively.
    return_bytearray (bool): When ``False`` a bytes object is returned from
        the calls to methods of this class. When ``True`` a ``bytearray``
        object will be returned. The default is ``False``.
    source_size (int): Optionally specify the total size of the
        uncompressed data. If specified, will be stored in the compressed
        frame header as an 8-byte field for later use during decompression.
        Default is ``0`` (no size stored). Only used for writing
        compressed files.
    block_size (int): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    block_linked (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    compression_level (int): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    content_checksum (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    block_checksum (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.
    auto_flush (bool): Compressor setting. See
        `lz4.frame.LZ4FrameCompressor`.

---
## begin
```python
from __init__ import begin
```

Begin a compression frame.

The returned data contains frame header information. The data returned
from subsequent calls to ``compress()`` should be concatenated with
this header.

Keyword Args:
    source_size (int): Optionally specify the total size of the
        uncompressed data. If specified, will be stored in the
        compressed frame header as an 8-byte field for later use
        during decompression. Default is 0 (no size stored).

Returns:
    bytes or bytearray: frame header data

---
## compress
```python
from __init__ import compress
```

Compresses data and returns it.

This compresses ``data`` (a ``bytes`` object), returning a bytes or
bytearray object containing compressed data the input.

If ``auto_flush`` has been set to ``False``, some of ``data`` may be
buffered internally, for use in later calls to
`LZ4FrameCompressor.compress()` and `LZ4FrameCompressor.flush()`.

The returned data should be concatenated with the output of any
previous calls to `compress()` and a single call to
`compress_begin()`.

Args:
    data (str, bytes or buffer-compatible object): data to compress

Returns:
    bytes or bytearray: compressed data

---
## has_context
```python
from __init__ import has_context
```

Return whether the compression context exists.

Returns:
    bool: ``True`` if the compression context exists, ``False``
        otherwise.

---
## started
```python
from __init__ import started
```

Return whether the compression frame has been started.

Returns:
    bool: ``True`` if the compression frame has been started, ``False``
        otherwise.

---
## decompress
```python
from __init__ import decompress
```

Decompresses part or all of an LZ4 frame of compressed data.

The returned data should be concatenated with the output of any
previous calls to `decompress()`.

If ``max_length`` is non-negative, returns at most ``max_length`` bytes
of decompressed data. If this limit is reached and further output can
be produced, the `needs_input` attribute will be set to ``False``. In
this case, the next call to `decompress()` may provide data as
``b''`` to obtain more of the output. In all cases, any unconsumed data
from previous calls will be prepended to the input data.

If all of the input ``data`` was decompressed and returned (either
because this was less than ``max_length`` bytes, or because
``max_length`` was negative), the `needs_input` attribute will be set
to ``True``.

If an end of frame marker is encountered in the data during
decompression, decompression will stop at the end of the frame, and any
data after the end of frame is available from the `unused_data`
attribute. In this case, the `LZ4FrameDecompressor` instance is reset
and can be used for further decompression.

Args:
    data (str, bytes or buffer-compatible object): compressed data to
        decompress

Keyword Args:
    max_length (int): If this is non-negative, this method returns at
        most ``max_length`` bytes of decompressed data.

Returns:
    bytes: Uncompressed data

---
## closed
```python
from __init__ import closed
```

Returns ``True`` if this file is closed.

Returns:
    bool: ``True`` if the file is closed, ``False`` otherwise.

---
## fileno
```python
from __init__ import fileno
```

Return the file descriptor for the underlying file.

Returns:
    file object: file descriptor for file.

---
## seekable
```python
from __init__ import seekable
```

Return whether the file supports seeking.

Returns:
    bool: ``True`` if the file supports seeking, ``False`` otherwise.

---
## readable
```python
from __init__ import readable
```

Return whether the file was opened for reading.

Returns:
    bool: ``True`` if the file was opened for reading, ``False``
        otherwise.

---
## writable
```python
from __init__ import writable
```

Return whether the file was opened for writing.

Returns:
    bool: ``True`` if the file was opened for writing, ``False``
        otherwise.

---
## peek
```python
from __init__ import peek
```

Returns the last element in the input *array*.

Similar to the built-in `Array.pop` method, except that it does not remove the last element.
This method is a convenient shorthand for `array[array.length - 1]`.

---
## readall
```python
from __init__ import readall
```



---
## read1
```python
from __init__ import read1
```

Read up to ``size`` uncompressed bytes.

This method tries to avoid making multiple reads from the underlying
stream.

This method reads up to a buffer's worth of data if ``size`` is
negative.

Returns ``b''`` if the file is at EOF.

Args:
    size(int): If non-negative, specifies the maximum number of
        uncompressed bytes to return.

Returns:
    bytes: uncompressed data

---
## readline
```python
from __init__ import readline
```

Read a line of uncompressed bytes from the file.

The terminating newline (if present) is retained. If size is
non-negative, no more than size bytes will be read (in which case the
line may be incomplete). Returns b'' if already at EOF.

Args:
    size(int): If non-negative, specifies the maximum number of
        uncompressed bytes to return.

Returns:
    bytes: uncompressed data

---
## seek
```python
from __init__ import seek
```

Change the file position.

The new position is specified by ``offset``, relative to the position
indicated by ``whence``. Possible values for ``whence`` are:

- ``io.SEEK_SET`` or 0: start of stream (default): offset must not be
  negative
- ``io.SEEK_CUR`` or 1: current stream position
- ``io.SEEK_END`` or 2: end of stream; offset must not be positive

Returns the new file position.

Note that seeking is emulated, so depending on the parameters, this
operation may be extremely slow.

Args:
    offset(int): new position in the file
    whence(int): position with which ``offset`` is measured. Allowed
        values are 0, 1, 2. The default is 0 (start of stream).

Returns:
    int: new file position

---
## tell
```python
from __init__ import tell
```

Return the current file position.

Args:
    None

Returns:
    int: file position

---
## __name__
```python
from codecs import __name__
```

Extend the Python codecs module with a few encodings that are used in OpenType (name table)
but missing from Python.  See https://github.com/fonttools/fonttools/issues/236 for details.

---
## ExtendCodec
```python
from codecs import ExtendCodec
```



---
## search_function
```python
from codecs import search_function
```



---
## __init__
```python
from codecs import __init__
```



---
## _map
```python
from codecs import _map
```



---
## encode
```python
from codecs import encode
```



---
## decode
```python
from codecs import decode
```



---
## error
```python
from codecs import error
```



---
## __name__
```python
from MacRoman import __name__
```



---
## __name__
```python
from StandardEncoding import __name__
```



---
## generate_curves
```python
from benchmark import generate_curves
```



---
## setup_quadratic_to_curves
```python
from benchmark import setup_quadratic_to_curves
```



---
## run_benchmark
```python
from benchmark import run_benchmark
```



---
## main
```python
from benchmark import main
```



---
## wrapper
```python
from benchmark import wrapper
```



---
## wrapped
```python
from benchmark import wrapped
```



---
## __name__
```python
from qu2cu import __name__
```



---
## cubic_farthest_fit_inside
```python
from qu2cu import cubic_farthest_fit_inside
```

Check if a cubic Bezier lies within a given distance of the origin.

"Origin" means *the* origin (0,0), not the start of the curve. Note that no
checks are made on the start and end positions of the curve; this function
only checks the inside of the curve.

Args:
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.
    tolerance (double): Distance from origin.

Returns:
    bool: True if the cubic Bezier ``p`` entirely lies within a distance
    ``tolerance`` of the origin, False otherwise.

---
## elevate_quadratic
```python
from qu2cu import elevate_quadratic
```

Given a quadratic bezier curve, return its degree-elevated cubic.

---
## merge_curves
```python
from qu2cu import merge_curves
```

Give a cubic-Bezier spline, reconstruct one cubic-Bezier
that has the same endpoints and tangents and approxmates
the spline.

---
## add_implicit_on_curves
```python
from qu2cu import add_implicit_on_curves
```



---
## quadratic_to_curves
```python
from qu2cu import quadratic_to_curves
```

Converts a connecting list of quadratic splines to a list of quadratic
and cubic curves.

A quadratic spline is specified as a list of points.  Either each point is
a 2-tuple of X,Y coordinates, or each point is a complex number with
real/imaginary components representing X,Y coordinates.

The first and last points are on-curve points and the rest are off-curve
points, with an implied on-curve point in the middle between every two
consequtive off-curve points.

Returns:
    The output is a list of tuples of points. Points are represented
    in the same format as the input, either as 2-tuples or complex numbers.

    Each tuple is either of length three, for a quadratic curve, or four,
    for a cubic curve.  Each curve's last point is the same as the next
    curve's first point.

Args:
    quads: quadratic splines

    max_err: absolute error tolerance; defaults to 0.5

    all_cubic: if True, only cubic curves are generated; defaults to False

---
## spline_to_curves
```python
from qu2cu import spline_to_curves
```

q: quadratic spline with alternating on-curve / off-curve points.

costs: cumulative list of encoding cost of q in terms of number of
  points that need to be encoded.  Implied on-curve points do not
  contribute to the cost. If all points need to be encoded, then
  costs will be range(1, len(q)+1).

---
## main
```python
from qu2cu import main
```



---
## _font_to_cubic
```python
from cli import _font_to_cubic
```



---
## _main
```python
from cli import _main
```

Convert a UFO font from cubic to quadratic curves

---
## __name__
```python
from arrayTools import __name__
```

Routines for calculating bounding boxes, point in rectangle calculations and
so on.

---
## calcBounds
```python
from arrayTools import calcBounds
```

Calculate the bounding rectangle of a 2D points array.

Args:
    array: A sequence of 2D tuples.

Returns:
    A four-item tuple representing the bounding rectangle ``(xMin, yMin, xMax, yMax)``.

---
## calcIntBounds
```python
from arrayTools import calcIntBounds
```

Calculate the integer bounding rectangle of a 2D points array.

Values are rounded to closest integer towards ``+Infinity`` using the
:func:`fontTools.misc.fixedTools.otRound` function by default, unless
an optional ``round`` function is passed.

Args:
    array: A sequence of 2D tuples.
    round: A rounding function of type ``f(x: float) -> int``.

Returns:
    A four-item tuple of integers representing the bounding rectangle:
    ``(xMin, yMin, xMax, yMax)``.

---
## updateBounds
```python
from arrayTools import updateBounds
```

Add a point to a bounding rectangle.

Args:
    bounds: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax), or None``.
    p: A 2D tuple representing a point.
    min,max: functions to compute the minimum and maximum.

Returns:
    The updated bounding rectangle ``(xMin, yMin, xMax, yMax)``.

---
## pointInRect
```python
from arrayTools import pointInRect
```

Test if a point is inside a bounding rectangle.

Args:
    p: A 2D tuple representing a point.
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    ``True`` if the point is inside the rectangle, ``False`` otherwise.

---
## pointsInRect
```python
from arrayTools import pointsInRect
```

Determine which points are inside a bounding rectangle.

Args:
    array: A sequence of 2D tuples.
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    A list containing the points inside the rectangle.

---
## vectorLength
```python
from arrayTools import vectorLength
```

Calculate the length of the given vector.

Args:
    vector: A 2D tuple.

Returns:
    The Euclidean length of the vector.

---
## asInt16
```python
from arrayTools import asInt16
```

Round a list of floats to 16-bit signed integers.

Args:
    array: List of float values.

Returns:
    A list of rounded integers.

---
## normRect
```python
from arrayTools import normRect
```

Normalize a bounding box rectangle.

This function "turns the rectangle the right way up", so that the following
holds::

    xMin <= xMax and yMin <= yMax

Args:
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    A normalized bounding rectangle.

---
## scaleRect
```python
from arrayTools import scaleRect
```

Scale a bounding box rectangle.

Args:
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.
    x: Factor to scale the rectangle along the X axis.
    Y: Factor to scale the rectangle along the Y axis.

Returns:
    A scaled bounding rectangle.

---
## offsetRect
```python
from arrayTools import offsetRect
```

Offset a bounding box rectangle.

Args:
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.
    dx: Amount to offset the rectangle along the X axis.
    dY: Amount to offset the rectangle along the Y axis.

Returns:
    An offset bounding rectangle.

---
## insetRect
```python
from arrayTools import insetRect
```

Inset a bounding box rectangle on all sides.

Args:
    rect: A bounding rectangle expressed as a tuple
        ``(xMin, yMin, xMax, yMax)``.
    dx: Amount to inset the rectangle along the X axis.
    dY: Amount to inset the rectangle along the Y axis.

Returns:
    An inset bounding rectangle.

---
## sectRect
```python
from arrayTools import sectRect
```

Test for rectangle-rectangle intersection.

Args:
    rect1: First bounding rectangle, expressed as tuples
        ``(xMin, yMin, xMax, yMax)``.
    rect2: Second bounding rectangle.

Returns:
    A boolean and a rectangle.
    If the input rectangles intersect, returns ``True`` and the intersecting
    rectangle. Returns ``False`` and ``(0, 0, 0, 0)`` if the input
    rectangles don't intersect.

---
## unionRect
```python
from arrayTools import unionRect
```

Determine union of bounding rectangles.

Args:
    rect1: First bounding rectangle, expressed as tuples
        ``(xMin, yMin, xMax, yMax)``.
    rect2: Second bounding rectangle.

Returns:
    The smallest rectangle in which both input rectangles are fully
    enclosed.

---
## rectCenter
```python
from arrayTools import rectCenter
```

Determine rectangle center.

Args:
    rect: Bounding rectangle, expressed as tuples
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    A 2D tuple representing the point at the center of the rectangle.

---
## rectArea
```python
from arrayTools import rectArea
```

Determine rectangle area.

Args:
    rect: Bounding rectangle, expressed as tuples
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    The area of the rectangle.

---
## intRect
```python
from arrayTools import intRect
```

Round a rectangle to integer values.

Guarantees that the resulting rectangle is NOT smaller than the original.

Args:
    rect: Bounding rectangle, expressed as tuples
        ``(xMin, yMin, xMax, yMax)``.

Returns:
    A rounded bounding rectangle.

---
## quantizeRect
```python
from arrayTools import quantizeRect
```

>>> bounds = (72.3, -218.4, 1201.3, 919.1)
>>> quantizeRect(bounds)
(72, -219, 1202, 920)
>>> quantizeRect(bounds, factor=10)
(70, -220, 1210, 920)
>>> quantizeRect(bounds, factor=100)
(0, -300, 1300, 1000)

---
## Vector
```python
from arrayTools import Vector
```



---
## pairwise
```python
from arrayTools import pairwise
```

Iterate over current and next items in iterable.

Args:
    iterable: An iterable
    reverse: If true, iterate in reverse order.

Returns:
    A iterable yielding two elements per iteration.

Example:

    >>> tuple(pairwise([]))
    ()
    >>> tuple(pairwise([], reverse=True))
    ()
    >>> tuple(pairwise([0]))
    ((0, 0),)
    >>> tuple(pairwise([0], reverse=True))
    ((0, 0),)
    >>> tuple(pairwise([0, 1]))
    ((0, 1), (1, 0))
    >>> tuple(pairwise([0, 1], reverse=True))
    ((1, 0), (0, 1))
    >>> tuple(pairwise([0, 1, 2]))
    ((0, 1), (1, 2), (2, 0))
    >>> tuple(pairwise([0, 1, 2], reverse=True))
    ((2, 1), (1, 0), (0, 2))
    >>> tuple(pairwise(['a', 'b', 'c', 'd']))
    (('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'a'))
    >>> tuple(pairwise(['a', 'b', 'c', 'd'], reverse=True))
    (('d', 'c'), ('c', 'b'), ('b', 'a'), ('a', 'd'))

---
## _test
```python
from arrayTools import _test
```

>>> import math
>>> calcBounds([])
(0, 0, 0, 0)
>>> calcBounds([(0, 40), (0, 100), (50, 50), (80, 10)])
(0, 10, 80, 100)
>>> updateBounds((0, 0, 0, 0), (100, 100))
(0, 0, 100, 100)
>>> pointInRect((50, 50), (0, 0, 100, 100))
True
>>> pointInRect((0, 0), (0, 0, 100, 100))
True
>>> pointInRect((100, 100), (0, 0, 100, 100))
True
>>> not pointInRect((101, 100), (0, 0, 100, 100))
True
>>> list(pointsInRect([(50, 50), (0, 0), (100, 100), (101, 100)], (0, 0, 100, 100)))
[True, True, True, False]
>>> vectorLength((3, 4))
5.0
>>> vectorLength((1, 1)) == math.sqrt(2)
True
>>> list(asInt16([0, 0.1, 0.5, 0.9]))
[0, 0, 1, 1]
>>> normRect((0, 10, 100, 200))
(0, 10, 100, 200)
>>> normRect((100, 200, 0, 10))
(0, 10, 100, 200)
>>> scaleRect((10, 20, 50, 150), 1.5, 2)
(15.0, 40, 75.0, 300)
>>> offsetRect((10, 20, 30, 40), 5, 6)
(15, 26, 35, 46)
>>> insetRect((10, 20, 50, 60), 5, 10)
(15, 30, 45, 50)
>>> insetRect((10, 20, 50, 60), -5, -10)
(5, 10, 55, 70)
>>> intersects, rect = sectRect((0, 10, 20, 30), (0, 40, 20, 50))
>>> not intersects
True
>>> intersects, rect = sectRect((0, 10, 20, 30), (5, 20, 35, 50))
>>> intersects
1
>>> rect
(5, 20, 20, 30)
>>> unionRect((0, 10, 20, 30), (0, 40, 20, 50))
(0, 10, 20, 50)
>>> rectCenter((0, 0, 100, 200))
(50.0, 100.0)
>>> rectCenter((0, 0, 100, 199.0))
(50.0, 99.5)
>>> intRect((0.9, 2.9, 3.1, 4.1))
(0, 2, 4, 5)

---
## __init__
```python
from arrayTools import __init__
```



---
## __name__
```python
from cython import __name__
```

Exports a no-op 'cython' namespace similar to
https://github.com/cython/cython/blob/master/Cython/Shadow.py

This allows to optionally compile @cython decorated functions
(when cython is available at built time), or run the same code
as pure-python, without runtime dependency on cython module.

We only define the symbols that we use. E.g. see fontTools.cu2qu

---
## _empty_decorator
```python
from cython import _empty_decorator
```



---
## __name__
```python
from cliTools import __name__
```

Collection of utilities for command-line interfaces and console scripts.

---
## makeOutputFileName
```python
from cliTools import makeOutputFileName
```

Generates a suitable file name for writing output.

Often tools will want to take a file, do some kind of transformation to it,
and write it out again. This function determines an appropriate name for the
output file, through one or more of the following steps:

- changing the output directory
- appending suffix before file extension
- replacing the file extension
- suffixing the filename with a number (``#1``, ``#2``, etc.) to avoid
  overwriting an existing file.

Args:
    input: Name of input file.
    outputDir: Optionally, a new directory to write the file into.
    suffix: Optionally, a string suffix is appended to file name before
        the extension.
    extension: Optionally, a replacement for the current file extension.
    overWrite: Overwriting an existing file is permitted if true; if false
        and the proposed filename exists, a new name will be generated by
        adding an appropriate number suffix.

Returns:
    str: Suitable output filename

---
## __name__
```python
from vector import __name__
```



---
## Vector
```python
from vector import Vector
```

A math-like vector.

Represents an n-dimensional numeric vector. ``Vector`` objects support
vector addition and subtraction, scalar multiplication and division,
negation, rounding, and comparison tests.

---
## _operator_rsub
```python
from vector import _operator_rsub
```



---
## _operator_rtruediv
```python
from vector import _operator_rtruediv
```



---
## __new__
```python
from vector import __new__
```



---
## __repr__
```python
from vector import __repr__
```



---
## _vectorOp
```python
from vector import _vectorOp
```



---
## _scalarOp
```python
from vector import _scalarOp
```



---
## _unaryOp
```python
from vector import _unaryOp
```



---
## __add__
```python
from vector import __add__
```



---
## __sub__
```python
from vector import __sub__
```



---
## __rsub__
```python
from vector import __rsub__
```



---
## __mul__
```python
from vector import __mul__
```



---
## __truediv__
```python
from vector import __truediv__
```



---
## __rtruediv__
```python
from vector import __rtruediv__
```



---
## __pos__
```python
from vector import __pos__
```



---
## __neg__
```python
from vector import __neg__
```



---
## __round__
```python
from vector import __round__
```



---
## __eq__
```python
from vector import __eq__
```



---
## __ne__
```python
from vector import __ne__
```



---
## __bool__
```python
from vector import __bool__
```



---
## __abs__
```python
from vector import __abs__
```



---
## length
```python
from vector import length
```

Return the length of the vector. Equivalent to abs(vector).

---
## normalized
```python
from vector import normalized
```

Return the normalized vector of the vector.

---
## dot
```python
from vector import dot
```

Performs vector dot product, returning the sum of
``a[0] * b[0], a[1] * b[1], ...``

---
## toInt
```python
from vector import toInt
```



---
## values
```python
from vector import values
```



---
## isclose
```python
from vector import isclose
```

Return True if the vector is close to another Vector.

---
## __name__
```python
from psLib import __name__
```



---
## PSTokenError
```python
from psLib import PSTokenError
```



---
## PSError
```python
from psLib import PSError
```



---
## PSTokenizer
```python
from psLib import PSTokenizer
```



---
## PSInterpreter
```python
from psLib import PSInterpreter
```



---
## unpack_item
```python
from psLib import unpack_item
```



---
## suckfont
```python
from psLib import suckfont
```



---
## __init__
```python
from psLib import __init__
```



---
## read
```python
from psLib import read
```

Read at most 'n' bytes from the buffer, or less if the read
hits EOF before obtaining 'n' bytes.
If 'n' is negative or omitted, read all data until EOF is reached.

---
## close
```python
from psLib import close
```

Remove circular references.

---
## getnexttoken
```python
from psLib import getnexttoken
```



---
## skipwhite
```python
from psLib import skipwhite
```



---
## starteexec
```python
from psLib import starteexec
```



---
## stopeexec
```python
from psLib import stopeexec
```



---
## fillsystemdict
```python
from psLib import fillsystemdict
```



---
## suckoperators
```python
from psLib import suckoperators
```



---
## interpret
```python
from psLib import interpret
```



---
## handle_object
```python
from psLib import handle_object
```



---
## call_procedure
```python
from psLib import call_procedure
```



---
## resolve_name
```python
from psLib import resolve_name
```



---
## do_token
```python
from psLib import do_token
```



---
## do_comment
```python
from psLib import do_comment
```



---
## do_literal
```python
from psLib import do_literal
```



---
## do_string
```python
from psLib import do_string
```



---
## do_hexstring
```python
from psLib import do_hexstring
```



---
## do_special
```python
from psLib import do_special
```



---
## push
```python
from psLib import push
```



---
## pop
```python
from psLib import pop
```



---
## do_makearray
```python
from psLib import do_makearray
```



---
## __name__
```python
from timeTools import __name__
```

fontTools.misc.timeTools.py -- tools for working with OpenType timestamps.

---
## asctime
```python
from timeTools import asctime
```

Convert a tuple or struct_time representing a time as returned by gmtime()
or localtime() to a 24-character string of the following form:

>>> asctime(time.gmtime(0))
'Thu Jan  1 00:00:00 1970'

If t is not provided, the current time as returned by localtime() is used.
Locale information is not used by asctime().

This is meant to normalise the output of the built-in time.asctime() across
different platforms and Python versions.
In Python 3.x, the day of the month is right-justified, whereas on Windows
Python 2.7 it is padded with zeros.

See https://github.com/fonttools/fonttools/issues/455

---
## timestampToString
```python
from timeTools import timestampToString
```



---
## timestampFromString
```python
from timeTools import timestampFromString
```



---
## timestampNow
```python
from timeTools import timestampNow
```



---
## timestampSinceEpoch
```python
from timeTools import timestampSinceEpoch
```



---
## __name__
```python
from configTools import __name__
```

Code of the config system; not related to fontTools or fonts in particular.

The options that are specific to fontTools are in :mod:`fontTools.config`.

To create your own config system, you need to create an instance of
:class:`Options`, and a subclass of :class:`AbstractConfig` with its
``options`` class variable set to your instance of Options.

---
## ConfigError
```python
from configTools import ConfigError
```

Base exception for the config module.

---
## ConfigAlreadyRegisteredError
```python
from configTools import ConfigAlreadyRegisteredError
```

Raised when a module tries to register a configuration option that
already exists.

Should not be raised too much really, only when developing new fontTools
modules.

---
## ConfigValueParsingError
```python
from configTools import ConfigValueParsingError
```

Raised when a configuration value cannot be parsed.

---
## ConfigValueValidationError
```python
from configTools import ConfigValueValidationError
```

Raised when a configuration value cannot be validated.

---
## ConfigUnknownOptionError
```python
from configTools import ConfigUnknownOptionError
```

Raised when a configuration option is unknown.

---
## Option
```python
from configTools import Option
```



---
## Options
```python
from configTools import Options
```

Registry of available options for a given config system.

Define new options using the :meth:`register()` method.

Access existing options using the Mapping interface.

---
## AbstractConfig
```python
from configTools import AbstractConfig
```

Create a set of config values, optionally pre-filled with values from
the given dictionary or pre-existing config object.

The class implements the MutableMapping protocol keyed by option name (`str`).
For convenience its methods accept either Option or str as the key parameter.

.. seealso:: :meth:`set()`

This config class is abstract because it needs its ``options`` class
var to be set to an instance of :class:`Options` before it can be
instanciated and used.

.. code:: python

    class MyConfig(AbstractConfig):
        options = Options()

    MyConfig.register_option( "test:option_name", "This is an option", 0, int, lambda v: isinstance(v, int))

    cfg = MyConfig({"test:option_name": 10})

---
## __init__
```python
from configTools import __init__
```



---
## parse_optional_bool
```python
from configTools import parse_optional_bool
```



---
## validate_optional_bool
```python
from configTools import validate_optional_bool
```



---
## register
```python
from configTools import register
```

Create and register a new option.

---
## register_option
```python
from configTools import register_option
```

Register an available option in this config system.

---
## is_registered
```python
from configTools import is_registered
```

Return True if the same option object is already registered.

---
## __getitem__
```python
from configTools import __getitem__
```



---
## __iter__
```python
from configTools import __iter__
```



---
## __len__
```python
from configTools import __len__
```



---
## __repr__
```python
from configTools import __repr__
```



---
## _resolve_option
```python
from configTools import _resolve_option
```



---
## set
```python
from configTools import set
```

Set the value of an option.

Args:
    * `option_or_name`: an `Option` object or its name (`str`).
    * `value`: the value to be assigned to given option.
    * `parse_values`: parse the configuration value from a string into
        its proper type, as per its `Option` object. The default
        behavior is to raise `ConfigValueValidationError` when the value
        is not of the right type. Useful when reading options from a
        file type that doesn't support as many types as Python.
    * `skip_unknown`: skip unknown configuration options. The default
        behaviour is to raise `ConfigUnknownOptionError`. Useful when
        reading options from a configuration file that has extra entries
        (e.g. for a later version of fontTools)

---
## get
```python
from configTools import get
```

Get the value of an option. The value which is returned is the first
provided among:

1. a user-provided value in the options's ``self._values`` dict
2. a caller-provided default value to this method call
3. the global default for the option provided in ``fontTools.config``

This is to provide the ability to migrate progressively from config
options passed as arguments to fontTools APIs to config options read
from the current TTFont, e.g.

.. code:: python

    def fontToolsAPI(font, some_option):
        value = font.cfg.get("someLib.module:SOME_OPTION", some_option)
        # use value

That way, the function will work the same for users of the API that
still pass the option to the function call, but will favour the new
config mechanism if the given font specifies a value for that option.

---
## copy
```python
from configTools import copy
```



---
## __setitem__
```python
from configTools import __setitem__
```



---
## __delitem__
```python
from configTools import __delitem__
```



---
## __name__
```python
from sstruct import __name__
```

sstruct.py -- SuperStruct

Higher level layer on top of the struct module, enabling to
bind names to struct elements. The interface is similar to
struct, except the objects passed and returned are not tuples
(or argument lists), but dictionaries or instances.

Just like struct, we use fmt strings to describe a data
structure, except we use one line per element. Lines are
separated by newlines or semi-colons. Each line contains
either one of the special struct characters ('@', '=', '<',
'>' or '!') or a 'name:formatchar' combo (eg. 'myFloat:f').
Repetitions, like the struct module offers them are not useful
in this context, except for fixed length strings  (eg. 'myInt:5h'
is not allowed but 'myString:5s' is). The 'x' fmt character
(pad byte) is treated as 'special', since it is by definition
anonymous. Extra whitespace is allowed everywhere.

The sstruct module offers one feature that the "normal" struct
module doesn't: support for fixed point numbers. These are spelled
as "n.mF", where n is the number of bits before the point, and m
the number of bits after the point. Fixed point numbers get
converted to floats.

pack(fmt, object):
        'object' is either a dictionary or an instance (or actually
        anything that has a __dict__ attribute). If it is a dictionary,
        its keys are used for names. If it is an instance, it's
        attributes are used to grab struct elements from. Returns
        a string containing the data.

unpack(fmt, data, object=None)
        If 'object' is omitted (or None), a new dictionary will be
        returned. If 'object' is a dictionary, it will be used to add
        struct elements to. If it is an instance (or in fact anything
        that has a __dict__ attribute), an attribute will be added for
        each struct element. In the latter two cases, 'object' itself
        is returned.

unpack2(fmt, data, object=None)
        Convenience function. Same as unpack, except data may be longer
        than needed. The returned value is a tuple: (object, leftoverdata).

calcsize(fmt)
        like struct.calcsize(), but uses our own fmt strings:
        it returns the size of the data in bytes.

---
## Error
```python
from sstruct import Error
```



---
## pack
```python
from sstruct import pack
```



---
## unpack
```python
from sstruct import unpack
```



---
## unpack2
```python
from sstruct import unpack2
```



---
## calcsize
```python
from sstruct import calcsize
```



---
## getformat
```python
from sstruct import getformat
```



---
## _test
```python
from sstruct import _test
```



---
## foo
```python
from sstruct import foo
```



---
## __name__
```python
from classifyTools import __name__
```

fontTools.misc.classifyTools.py -- tools for classifying things.

---
## Classifier
```python
from classifyTools import Classifier
```

Main Classifier object, used to classify things into similar sets.

---
## classify
```python
from classifyTools import classify
```

Takes a iterable of iterables (list of sets from here on; but any
iterable works.), and returns the smallest list of sets such that
each set, is either a subset, or is disjoint from, each of the input
sets.

In other words, this function classifies all the things present in
any of the input sets, into similar classes, based on which sets
things are a member of.

If sort=True, return class sets are sorted by decreasing size and
their natural sort order within each class size.  Otherwise, class
sets are returned in the order that they were identified, which is
generally not significant.

>>> classify([]) == ([], {})
True
>>> classify([[]]) == ([], {})
True
>>> classify([[], []]) == ([], {})
True
>>> classify([[1]]) == ([{1}], {1: {1}})
True
>>> classify([[1,2]]) == ([{1, 2}], {1: {1, 2}, 2: {1, 2}})
True
>>> classify([[1],[2]]) == ([{1}, {2}], {1: {1}, 2: {2}})
True
>>> classify([[1,2],[2]]) == ([{1}, {2}], {1: {1}, 2: {2}})
True
>>> classify([[1,2],[2,4]]) == ([{1}, {2}, {4}], {1: {1}, 2: {2}, 4: {4}})
True
>>> classify([[1,2],[2,4,5]]) == (
...     [{4, 5}, {1}, {2}], {1: {1}, 2: {2}, 4: {4, 5}, 5: {4, 5}})
True
>>> classify([[1,2],[2,4,5]], sort=False) == (
...     [{1}, {4, 5}, {2}], {1: {1}, 2: {2}, 4: {4, 5}, 5: {4, 5}})
True
>>> classify([[1,2,9],[2,4,5]], sort=False) == (
...     [{1, 9}, {4, 5}, {2}], {1: {1, 9}, 2: {2}, 4: {4, 5}, 5: {4, 5},
...     9: {1, 9}})
True
>>> classify([[1,2,9,15],[2,4,5]], sort=False) == (
...     [{1, 9, 15}, {4, 5}, {2}], {1: {1, 9, 15}, 2: {2}, 4: {4, 5},
...     5: {4, 5}, 9: {1, 9, 15}, 15: {1, 9, 15}})
True
>>> classes, mapping = classify([[1,2,9,15],[2,4,5],[15,5]], sort=False)
>>> set([frozenset(c) for c in classes]) == set(
...     [frozenset(s) for s in ({1, 9}, {4}, {2}, {5}, {15})])
True
>>> mapping == {1: {1, 9}, 2: {2}, 4: {4}, 5: {5}, 9: {1, 9}, 15: {15}}
True

---
## __init__
```python
from classifyTools import __init__
```



---
## add
```python
from classifyTools import add
```

Add a set to the classifier.  Any iterable is accepted.

---
## update
```python
from classifyTools import update
```

Add a a list of sets to the classifier.  Any iterable of iterables is accepted.

---
## _process
```python
from classifyTools import _process
```



---
## getThings
```python
from classifyTools import getThings
```

Returns the set of all things known so far.

The return value belongs to the Classifier object and should NOT
be modified while the classifier is still in use.

---
## getMapping
```python
from classifyTools import getMapping
```

Returns the mapping from things to their class set.

The return value belongs to the Classifier object and should NOT
be modified while the classifier is still in use.

---
## getClasses
```python
from classifyTools import getClasses
```

Returns the list of class sets.

The return value belongs to the Classifier object and should NOT
be modified while the classifier is still in use.

---
## __name__
```python
from symfont import __name__
```



---
## green
```python
from symfont import green
```



---
## _BezierFuncsLazy
```python
from symfont import _BezierFuncsLazy
```



---
## GreenPen
```python
from symfont import GreenPen
```



---
## printGreenPen
```python
from symfont import printGreenPen
```



---
## __init__
```python
from symfont import __init__
```



---
## __missing__
```python
from symfont import __missing__
```



---
## _getGreenBezierFuncs
```python
from symfont import _getGreenBezierFuncs
```



---
## _moveTo
```python
from symfont import _moveTo
```



---
## _closePath
```python
from symfont import _closePath
```



---
## _endPath
```python
from symfont import _endPath
```



---
## _lineTo
```python
from symfont import _lineTo
```



---
## _qCurveToOne
```python
from symfont import _qCurveToOne
```



---
## _curveToOne
```python
from symfont import _curveToOne
```



---
## __name__
```python
from roundTools import __name__
```

Various round-to-integer helpers.

---
## noRound
```python
from roundTools import noRound
```



---
## otRound
```python
from roundTools import otRound
```

Round float value to nearest integer towards ``+Infinity``.

The OpenType spec (in the section on `"normalization" of OpenType Font Variations <https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview#coordinate-scales-and-normalization>`_)
defines the required method for converting floating point values to
fixed-point. In particular it specifies the following rounding strategy:

        for fractional values of 0.5 and higher, take the next higher integer;
        for other fractional values, truncate.

This function rounds the floating-point value according to this strategy
in preparation for conversion to fixed-point.

Args:
        value (float): The input floating-point value.

Returns
        float: The rounded value.

---
## maybeRound
```python
from roundTools import maybeRound
```



---
## roundFunc
```python
from roundTools import roundFunc
```



---
## nearestMultipleShortestRepr
```python
from roundTools import nearestMultipleShortestRepr
```

Round to nearest multiple of factor and return shortest decimal representation.

This chooses the float that is closer to a multiple of the given factor while
having the shortest decimal representation (the least number of fractional decimal
digits).

For example, given the following:

>>> nearestMultipleShortestRepr(-0.61883544921875, 1.0/(1<<14))
'-0.61884'

Useful when you need to serialize or print a fixed-point number (or multiples
thereof, such as F2Dot14 fractions of 180 degrees in COLRv1 PaintRotate) in
a human-readable form.

Args:
    value (value): The value to be rounded and serialized.
    factor (float): The value which the result is a close multiple of.

Returns:
    str: A compact string representation of the value.

---
## __name__
```python
from fixedTools import __name__
```

The `OpenType specification <https://docs.microsoft.com/en-us/typography/opentype/spec/otff#data-types>`_
defines two fixed-point data types:

``Fixed``
        A 32-bit signed fixed-point number with a 16 bit twos-complement
        magnitude component and 16 fractional bits.
``F2DOT14``
        A 16-bit signed fixed-point number with a 2 bit twos-complement
        magnitude component and 14 fractional bits.

To support reading and writing data with these data types, this module provides
functions for converting between fixed-point, float and string representations.

.. data:: MAX_F2DOT14

        The maximum value that can still fit in an F2Dot14. (1.99993896484375)

---
## fixedToFloat
```python
from fixedTools import fixedToFloat
```

Converts a fixed-point number to a float given the number of
precision bits.

Args:
        value (int): Number in fixed-point format.
        precisionBits (int): Number of precision bits.

Returns:
        Floating point value.

Examples::

        >>> import math
        >>> f = fixedToFloat(-10139, precisionBits=14)
        >>> math.isclose(f, -0.61883544921875)
        True

---
## floatToFixed
```python
from fixedTools import floatToFixed
```

Converts a float to a fixed-point number given the number of
precision bits.

Args:
        value (float): Floating point value.
        precisionBits (int): Number of precision bits.

Returns:
        int: Fixed-point representation.

Examples::

        >>> floatToFixed(-0.61883544921875, precisionBits=14)
        -10139
        >>> floatToFixed(-0.61884, precisionBits=14)
        -10139

---
## floatToFixedToFloat
```python
from fixedTools import floatToFixedToFloat
```

Converts a float to a fixed-point number and back again.

By converting the float to fixed, rounding it, and converting it back
to float again, this returns a floating point values which is exactly
representable in fixed-point format.

Note: this **is** equivalent to ``fixedToFloat(floatToFixed(value))``.

Args:
        value (float): The input floating point value.
        precisionBits (int): Number of precision bits.

Returns:
        float: The transformed and rounded value.

Examples::
        >>> import math
        >>> f1 = -0.61884
        >>> f2 = floatToFixedToFloat(-0.61884, precisionBits=14)
        >>> f1 != f2
        True
        >>> math.isclose(f2, -0.61883544921875)
        True

---
## fixedToStr
```python
from fixedTools import fixedToStr
```

Converts a fixed-point number to a string representing a decimal float.

This chooses the float that has the shortest decimal representation (the least
number of fractional decimal digits).

For example, to convert a fixed-point number in a 2.14 format, use
``precisionBits=14``::

        >>> fixedToStr(-10139, precisionBits=14)
        '-0.61884'

This is pretty slow compared to the simple division used in ``fixedToFloat``.
Use sporadically when you need to serialize or print the fixed-point number in
a human-readable form.
It uses nearestMultipleShortestRepr under the hood.

Args:
        value (int): The fixed-point value to convert.
        precisionBits (int): Number of precision bits, *up to a maximum of 16*.

Returns:
        str: A string representation of the value.

---
## strToFixed
```python
from fixedTools import strToFixed
```

Converts a string representing a decimal float to a fixed-point number.

Args:
        string (str): A string representing a decimal float.
        precisionBits (int): Number of precision bits, *up to a maximum of 16*.

Returns:
        int: Fixed-point representation.

Examples::

        >>> ## to convert a float string to a 2.14 fixed-point number:
        >>> strToFixed('-0.61884', precisionBits=14)
        -10139

---
## strToFixedToFloat
```python
from fixedTools import strToFixedToFloat
```

Convert a string to a decimal float with fixed-point rounding.

This first converts string to a float, then turns it into a fixed-point
number with ``precisionBits`` fractional binary digits, then back to a
float again.

This is simply a shorthand for fixedToFloat(floatToFixed(float(s))).

Args:
        string (str): A string representing a decimal float.
        precisionBits (int): Number of precision bits.

Returns:
        float: The transformed and rounded value.

Examples::

        >>> import math
        >>> s = '-0.61884'
        >>> bits = 14
        >>> f = strToFixedToFloat(s, precisionBits=bits)
        >>> math.isclose(f, -0.61883544921875)
        True
        >>> f == fixedToFloat(floatToFixed(float(s), precisionBits=bits), precisionBits=bits)
        True

---
## floatToFixedToStr
```python
from fixedTools import floatToFixedToStr
```

Convert float to string with fixed-point rounding.

This uses the shortest decimal representation (ie. the least
number of fractional decimal digits) to represent the equivalent
fixed-point number with ``precisionBits`` fractional binary digits.
It uses nearestMultipleShortestRepr under the hood.

>>> floatToFixedToStr(-0.61883544921875, precisionBits=14)
'-0.61884'

Args:
        value (float): The float value to convert.
        precisionBits (int): Number of precision bits, *up to a maximum of 16*.

Returns:
        str: A string representation of the value.

---
## ensureVersionIsLong
```python
from fixedTools import ensureVersionIsLong
```

Ensure a table version is an unsigned long.

OpenType table version numbers are expressed as a single unsigned long
comprising of an unsigned short major version and unsigned short minor
version. This function detects if the value to be used as a version number
looks too small (i.e. is less than ``0x10000``), and converts it to
fixed-point using :func:`floatToFixed` if so.

Args:
        value (Number): a candidate table version number.

Returns:
        int: A table version number, possibly corrected to fixed-point.

---
## versionToFixed
```python
from fixedTools import versionToFixed
```

Ensure a table version number is fixed-point.

Args:
        value (str): a candidate table version number.

Returns:
        int: A table version number, possibly corrected to fixed-point.

---
## __name__
```python
from filenames import __name__
```

User name to file name conversion.
This was taken from the UFO 3 spec.

---
## NameTranslationError
```python
from filenames import NameTranslationError
```



---
## userNameToFileName
```python
from filenames import userNameToFileName
```

`existing` should be a set-like object.

>>> userNameToFileName("a") == "a"
True
>>> userNameToFileName("A") == "A_"
True
>>> userNameToFileName("AE") == "A_E_"
True
>>> userNameToFileName("Ae") == "A_e"
True
>>> userNameToFileName("ae") == "ae"
True
>>> userNameToFileName("aE") == "aE_"
True
>>> userNameToFileName("a.alt") == "a.alt"
True
>>> userNameToFileName("A.alt") == "A_.alt"
True
>>> userNameToFileName("A.Alt") == "A_.A_lt"
True
>>> userNameToFileName("A.aLt") == "A_.aL_t"
True
>>> userNameToFileName(u"A.alT") == "A_.alT_"
True
>>> userNameToFileName("T_H") == "T__H_"
True
>>> userNameToFileName("T_h") == "T__h"
True
>>> userNameToFileName("t_h") == "t_h"
True
>>> userNameToFileName("F_F_I") == "F__F__I_"
True
>>> userNameToFileName("f_f_i") == "f_f_i"
True
>>> userNameToFileName("Aacute_V.swash") == "A_acute_V_.swash"
True
>>> userNameToFileName(".notdef") == "_notdef"
True
>>> userNameToFileName("con") == "_con"
True
>>> userNameToFileName("CON") == "C_O_N_"
True
>>> userNameToFileName("con.alt") == "_con.alt"
True
>>> userNameToFileName("alt.con") == "alt._con"
True

---
## handleClash1
```python
from filenames import handleClash1
```

existing should be a case-insensitive list
of all existing file names.

>>> prefix = ("0" * 5) + "."
>>> suffix = "." + ("0" * 10)
>>> existing = ["a" * 5]

>>> e = list(existing)
>>> handleClash1(userName="A" * 5, existing=e,
...         prefix=prefix, suffix=suffix) == (
...         '00000.AAAAA000000000000001.0000000000')
True

>>> e = list(existing)
>>> e.append(prefix + "aaaaa" + "1".zfill(15) + suffix)
>>> handleClash1(userName="A" * 5, existing=e,
...         prefix=prefix, suffix=suffix) == (
...         '00000.AAAAA000000000000002.0000000000')
True

>>> e = list(existing)
>>> e.append(prefix + "AAAAA" + "2".zfill(15) + suffix)
>>> handleClash1(userName="A" * 5, existing=e,
...         prefix=prefix, suffix=suffix) == (
...         '00000.AAAAA000000000000001.0000000000')
True

---
## handleClash2
```python
from filenames import handleClash2
```

existing should be a case-insensitive list
of all existing file names.

>>> prefix = ("0" * 5) + "."
>>> suffix = "." + ("0" * 10)
>>> existing = [prefix + str(i) + suffix for i in range(100)]

>>> e = list(existing)
>>> handleClash2(existing=e, prefix=prefix, suffix=suffix) == (
...         '00000.100.0000000000')
True

>>> e = list(existing)
>>> e.remove(prefix + "1" + suffix)
>>> handleClash2(existing=e, prefix=prefix, suffix=suffix) == (
...         '00000.1.0000000000')
True

>>> e = list(existing)
>>> e.remove(prefix + "2" + suffix)
>>> handleClash2(existing=e, prefix=prefix, suffix=suffix) == (
...         '00000.2.0000000000')
True

---
## __name__
```python
from treeTools import __name__
```

Generic tools for working with trees.

---
## build_n_ary_tree
```python
from treeTools import build_n_ary_tree
```

Build N-ary tree from sequence of leaf nodes.

Return a list of lists where each non-leaf node is a list containing
max n nodes.

---
## __name__
```python
from psOperators import __name__
```



---
## ps_object
```python
from psOperators import ps_object
```



---
## ps_operator
```python
from psOperators import ps_operator
```



---
## ps_procedure
```python
from psOperators import ps_procedure
```



---
## ps_name
```python
from psOperators import ps_name
```



---
## ps_literal
```python
from psOperators import ps_literal
```



---
## ps_array
```python
from psOperators import ps_array
```



---
## _type1_item_repr
```python
from psOperators import _type1_item_repr
```



---
## _type1_Encoding_repr
```python
from psOperators import _type1_Encoding_repr
```



---
## _type1_CharString_repr
```python
from psOperators import _type1_CharString_repr
```



---
## ps_font
```python
from psOperators import ps_font
```



---
## ps_file
```python
from psOperators import ps_file
```



---
## ps_dict
```python
from psOperators import ps_dict
```



---
## ps_mark
```python
from psOperators import ps_mark
```



---
## ps_procmark
```python
from psOperators import ps_procmark
```



---
## ps_null
```python
from psOperators import ps_null
```



---
## ps_boolean
```python
from psOperators import ps_boolean
```



---
## ps_string
```python
from psOperators import ps_string
```



---
## ps_integer
```python
from psOperators import ps_integer
```



---
## ps_real
```python
from psOperators import ps_real
```



---
## PSOperators
```python
from psOperators import PSOperators
```



---
## __init__
```python
from psOperators import __init__
```



---
## __repr__
```python
from psOperators import __repr__
```



---
## __str__
```python
from psOperators import __str__
```



---
## ps_def
```python
from psOperators import ps_def
```



---
## ps_bind
```python
from psOperators import ps_bind
```



---
## proc_bind
```python
from psOperators import proc_bind
```



---
## ps_exch
```python
from psOperators import ps_exch
```



---
## ps_dup
```python
from psOperators import ps_dup
```



---
## ps_exec
```python
from psOperators import ps_exec
```



---
## ps_count
```python
from psOperators import ps_count
```



---
## ps_eq
```python
from psOperators import ps_eq
```



---
## ps_ne
```python
from psOperators import ps_ne
```



---
## ps_cvx
```python
from psOperators import ps_cvx
```



---
## ps_matrix
```python
from psOperators import ps_matrix
```



---
## ps_type
```python
from psOperators import ps_type
```



---
## ps_store
```python
from psOperators import ps_store
```



---
## ps_where
```python
from psOperators import ps_where
```



---
## ps_systemdict
```python
from psOperators import ps_systemdict
```



---
## ps_userdict
```python
from psOperators import ps_userdict
```



---
## ps_currentdict
```python
from psOperators import ps_currentdict
```



---
## ps_currentfile
```python
from psOperators import ps_currentfile
```



---
## ps_eexec
```python
from psOperators import ps_eexec
```



---
## ps_closefile
```python
from psOperators import ps_closefile
```



---
## ps_cleartomark
```python
from psOperators import ps_cleartomark
```



---
## ps_readstring
```python
from psOperators import ps_readstring
```



---
## ps_known
```python
from psOperators import ps_known
```



---
## ps_if
```python
from psOperators import ps_if
```



---
## ps_ifelse
```python
from psOperators import ps_ifelse
```



---
## ps_readonly
```python
from psOperators import ps_readonly
```



---
## ps_executeonly
```python
from psOperators import ps_executeonly
```



---
## ps_noaccess
```python
from psOperators import ps_noaccess
```



---
## ps_not
```python
from psOperators import ps_not
```



---
## ps_print
```python
from psOperators import ps_print
```



---
## ps_anchorsearch
```python
from psOperators import ps_anchorsearch
```



---
## ps_astore
```python
from psOperators import ps_astore
```



---
## ps_load
```python
from psOperators import ps_load
```



---
## ps_put
```python
from psOperators import ps_put
```



---
## ps_get
```python
from psOperators import ps_get
```



---
## ps_getinterval
```python
from psOperators import ps_getinterval
```



---
## ps_putinterval
```python
from psOperators import ps_putinterval
```



---
## ps_cvn
```python
from psOperators import ps_cvn
```



---
## ps_index
```python
from psOperators import ps_index
```



---
## ps_for
```python
from psOperators import ps_for
```



---
## ps_forall
```python
from psOperators import ps_forall
```



---
## ps_definefont
```python
from psOperators import ps_definefont
```



---
## ps_findfont
```python
from psOperators import ps_findfont
```



---
## ps_pop
```python
from psOperators import ps_pop
```



---
## ps_begin
```python
from psOperators import ps_begin
```



---
## ps_end
```python
from psOperators import ps_end
```



---
## __name__
```python
from py23 import __name__
```

Python 2/3 compat layer leftovers.

---
## Py23Error
```python
from py23 import Py23Error
```



---
## xrange
```python
from py23 import xrange
```



---
## round2
```python
from py23 import round2
```

Implementation of Python 2 built-in round() function.
Rounds a number to a given precision in decimal digits (default
0 digits). The result is a floating point number. Values are rounded
to the closest multiple of 10 to the power minus ndigits; if two
multiples are equally close, rounding is done away from 0.
ndigits may be negative.
See Python 2 documentation:
https://docs.python.org/2/library/functions.html?highlight=round#round

---
## __name__
```python
from macRes import __name__
```



---
## ResourceError
```python
from macRes import ResourceError
```



---
## ResourceReader
```python
from macRes import ResourceReader
```

Reader for Mac OS resource forks.

Parses a resource fork and returns resources according to their type.
If run on OS X, this will open the resource fork in the filesystem.
Otherwise, it will open the file itself and attempt to read it as
though it were a resource fork.

The returned object can be indexed by type and iterated over,
returning in each case a list of py:class:`Resource` objects
representing all the resources of a certain type.

---
## Resource
```python
from macRes import Resource
```

Represents a resource stored within a resource fork.

Attributes:
        type: resource type.
        data: resource data.
        id: ID.
        name: resource name.
        attr: attributes.

---
## __init__
```python
from macRes import __init__
```



---
## openResourceFork
```python
from macRes import openResourceFork
```



---
## openDataFork
```python
from macRes import openDataFork
```



---
## _readFile
```python
from macRes import _readFile
```



---
## _read
```python
from macRes import _read
```



---
## _readHeaderAndMap
```python
from macRes import _readHeaderAndMap
```



---
## _readTypeList
```python
from macRes import _readTypeList
```



---
## _readReferenceList
```python
from macRes import _readReferenceList
```



---
## __getitem__
```python
from macRes import __getitem__
```



---
## __delitem__
```python
from macRes import __delitem__
```



---
## __setitem__
```python
from macRes import __setitem__
```



---
## __len__
```python
from macRes import __len__
```



---
## __iter__
```python
from macRes import __iter__
```



---
## keys
```python
from macRes import keys
```



---
## types
```python
from macRes import types
```

A list of the types of resources in the resource fork.

---
## countResources
```python
from macRes import countResources
```

Return the number of resources of a given type.

---
## getIndices
```python
from macRes import getIndices
```

Returns a list of indices of resources of a given type.

---
## getNames
```python
from macRes import getNames
```

Return list of names of all resources of a given type.

---
## getIndResource
```python
from macRes import getIndResource
```

Return resource of given type located at an index ranging from 1
to the number of resources for that type, or None if not found.

---
## getNamedResource
```python
from macRes import getNamedResource
```

Return the named resource of given type, else return None.

---
## close
```python
from macRes import close
```



---
## decompile
```python
from macRes import decompile
```



---
## __name__
```python
from encodingTools import __name__
```

fontTools.misc.encodingTools.py -- tools for working with OpenType encodings.

---
## getEncoding
```python
from encodingTools import getEncoding
```

Returns the Python encoding name for OpenType platformID/encodingID/langID
triplet.  If encoding for these values is not known, by default None is
returned.  That can be overriden by passing a value to the default argument.

---
## __name__
```python
from testTools import __name__
```

Helpers for writing unit tests.

---
## parseXML
```python
from testTools import parseXML
```

Parses a snippet of XML.

Input can be either a single string (unicode or UTF-8 bytes), or a
a sequence of strings.

The result is in the same format that would be returned by
XMLReader, but the parser imposes no constraints on the root
element so it can be called on small snippets of TTX files.

---
## parseXmlInto
```python
from testTools import parseXmlInto
```



---
## FakeFont
```python
from testTools import FakeFont
```



---
## TestXMLReader_
```python
from testTools import TestXMLReader_
```



---
## makeXMLWriter
```python
from testTools import makeXMLWriter
```



---
## getXML
```python
from testTools import getXML
```

Call the passed toXML function and return the written content as a
list of lines (unicode strings).
Result is stripped of XML declaration and OS-specific newline characters.

---
## stripVariableItemsFromTTX
```python
from testTools import stripVariableItemsFromTTX
```

Strip stuff like ttLibVersion, checksums, timestamps, etc. from TTX dumps.

---
## MockFont
```python
from testTools import MockFont
```

A font-like object that automatically adds any looked up glyphname
to its glyphOrder.

---
## TestCase
```python
from testTools import TestCase
```



---
## DataFilesHandler
```python
from testTools import DataFilesHandler
```



---
## __init__
```python
from testTools import __init__
```



---
## __getitem__
```python
from testTools import __getitem__
```



---
## __setitem__
```python
from testTools import __setitem__
```



---
## get
```python
from testTools import get
```



---
## getGlyphID
```python
from testTools import getGlyphID
```



---
## getGlyphIDMany
```python
from testTools import getGlyphIDMany
```



---
## getGlyphName
```python
from testTools import getGlyphName
```



---
## getGlyphNameMany
```python
from testTools import getGlyphNameMany
```



---
## getGlyphOrder
```python
from testTools import getGlyphOrder
```



---
## getReverseGlyphMap
```python
from testTools import getReverseGlyphMap
```



---
## getGlyphNames
```python
from testTools import getGlyphNames
```



---
## startElement_
```python
from testTools import startElement_
```



---
## endElement_
```python
from testTools import endElement_
```



---
## addCharacterData_
```python
from testTools import addCharacterData_
```



---
## setUp
```python
from testTools import setUp
```



---
## tearDown
```python
from testTools import tearDown
```



---
## getpath
```python
from testTools import getpath
```



---
## temp_dir
```python
from testTools import temp_dir
```



---
## temp_font
```python
from testTools import temp_font
```



---
## AllocatingDict
```python
from testTools import AllocatingDict
```



---
## __missing__
```python
from testTools import __missing__
```



---
## __name__
```python
from lazyTools import __name__
```



---
## LazyDict
```python
from lazyTools import LazyDict
```



---
## LazyList
```python
from lazyTools import LazyList
```



---
## __init__
```python
from lazyTools import __init__
```



---
## __getitem__
```python
from lazyTools import __getitem__
```



---
## __add__
```python
from lazyTools import __add__
```



---
## __radd__
```python
from lazyTools import __radd__
```



---
## __name__
```python
from loggingTools import __name__
```



---
## LevelFormatter
```python
from loggingTools import LevelFormatter
```

Log formatter with level-specific formatting.

Formatter class which optionally takes a dict of logging levels to
format strings, allowing to customise the log records appearance for
specific levels.


Attributes:
        fmt: A dictionary mapping logging levels to format strings.
                The ``*`` key identifies the default format string.
        datefmt: As per py:class:`logging.Formatter`
        style: As per py:class:`logging.Formatter`

>>> import sys
>>> handler = logging.StreamHandler(sys.stdout)
>>> formatter = LevelFormatter(
...     fmt={
...         '*':     '[%(levelname)s] %(message)s',
...         'DEBUG': '%(name)s [%(levelname)s] %(message)s',
...         'INFO':  '%(message)s',
...     })
>>> handler.setFormatter(formatter)
>>> log = logging.getLogger('test')
>>> log.setLevel(logging.DEBUG)
>>> log.addHandler(handler)
>>> log.debug('this uses a custom format string')
test [DEBUG] this uses a custom format string
>>> log.info('this also uses a custom format string')
this also uses a custom format string
>>> log.warning("this one uses the default format string")
[WARNING] this one uses the default format string

---
## configLogger
```python
from loggingTools import configLogger
```

A more sophisticated logging system configuation manager.

This is more or less the same as :py:func:`logging.basicConfig`,
with some additional options and defaults.

The default behaviour is to create a ``StreamHandler`` which writes to
sys.stderr, set a formatter using the ``DEFAULT_FORMATS`` strings, and add
the handler to the top-level library logger ("fontTools").

A number of optional keyword arguments may be specified, which can alter
the default behaviour.

Args:

        logger: Specifies the logger name or a Logger instance to be
                configured. (Defaults to "fontTools" logger). Unlike ``basicConfig``,
                this function can be called multiple times to reconfigure a logger.
                If the logger or any of its children already exists before the call is
                made, they will be reset before the new configuration is applied.
        filename: Specifies that a ``FileHandler`` be created, using the
                specified filename, rather than a ``StreamHandler``.
        filemode: Specifies the mode to open the file, if filename is
                specified. (If filemode is unspecified, it defaults to ``a``).
        format: Use the specified format string for the handler. This
                argument also accepts a dictionary of format strings keyed by
                level name, to allow customising the records appearance for
                specific levels. The special ``'*'`` key is for 'any other' level.
        datefmt: Use the specified date/time format.
        level: Set the logger level to the specified level.
        stream: Use the specified stream to initialize the StreamHandler. Note
                that this argument is incompatible with ``filename`` - if both
                are present, ``stream`` is ignored.
        handlers: If specified, this should be an iterable of already created
                handlers, which will be added to the logger. Any handler in the
                list which does not have a formatter assigned will be assigned the
                formatter created in this function.
        filters: If specified, this should be an iterable of already created
                filters. If the ``handlers`` do not already have filters assigned,
                these filters will be added to them.
        propagate: All loggers have a ``propagate`` attribute which determines
                whether to continue searching for handlers up the logging hierarchy.
                If not provided, the "propagate" attribute will be set to ``False``.

---
## _resetExistingLoggers
```python
from loggingTools import _resetExistingLoggers
```

Reset the logger named 'parent' and all its children to their initial
state, if they already exist in the current configuration.

---
## Timer
```python
from loggingTools import Timer
```

Keeps track of overall time and split/lap times.

>>> import time
>>> timer = Timer()
>>> time.sleep(0.01)
>>> print("First lap:", timer.split())
First lap: ...
>>> time.sleep(0.02)
>>> print("Second lap:", timer.split())
Second lap: ...
>>> print("Overall time:", timer.time())
Overall time: ...

Can be used as a context manager inside with-statements.

>>> with Timer() as t:
...     time.sleep(0.01)
>>> print("%0.3f seconds" % t.elapsed)
0... seconds

If initialised with a logger, it can log the elapsed time automatically
upon exiting the with-statement.

>>> import logging
>>> log = logging.getLogger("my-fancy-timer-logger")
>>> configLogger(logger=log, level="DEBUG", format="%(message)s", stream=sys.stdout)
>>> with Timer(log, 'do something'):
...     time.sleep(0.01)
Took ... to do something

The same Timer instance, holding a reference to a logger, can be reused
in multiple with-statements, optionally with different messages or levels.

>>> timer = Timer(log)
>>> with timer():
...     time.sleep(0.01)
elapsed time: ...s
>>> with timer('redo it', level=logging.INFO):
...     time.sleep(0.02)
Took ... to redo it

It can also be used as a function decorator to log the time elapsed to run
the decorated function.

>>> @timer()
... def test1():
...    time.sleep(0.01)
>>> @timer('run test 2', level=logging.INFO)
... def test2():
...    time.sleep(0.02)
>>> test1()
Took ... to run 'test1'
>>> test2()
Took ... to run test 2

---
## ChannelsFilter
```python
from loggingTools import ChannelsFilter
```

Provides a hierarchical filter for log entries based on channel names.

Filters out records emitted from a list of enabled channel names,
including their children. It works the same as the ``logging.Filter``
class, but allows the user to specify multiple channel names.

>>> import sys
>>> handler = logging.StreamHandler(sys.stdout)
>>> handler.setFormatter(logging.Formatter("%(message)s"))
>>> filter = ChannelsFilter("A.B", "C.D")
>>> handler.addFilter(filter)
>>> root = logging.getLogger()
>>> root.addHandler(handler)
>>> root.setLevel(level=logging.DEBUG)
>>> logging.getLogger('A.B').debug('this record passes through')
this record passes through
>>> logging.getLogger('A.B.C').debug('records from children also pass')
records from children also pass
>>> logging.getLogger('C.D').debug('this one as well')
this one as well
>>> logging.getLogger('A.B.').debug('also this one')
also this one
>>> logging.getLogger('A.F').debug('but this one does not!')
>>> logging.getLogger('C.DE').debug('neither this one!')

---
## CapturingLogHandler
```python
from loggingTools import CapturingLogHandler
```



---
## LogMixin
```python
from loggingTools import LogMixin
```

Mixin class that adds logging functionality to another class.

You can define a new class that subclasses from ``LogMixin`` as well as
other base classes through multiple inheritance.
All instances of that class will have a ``log`` property that returns
a ``logging.Logger`` named after their respective ``<module>.<class>``.

For example:

>>> class BaseClass(object):
...     pass
>>> class MyClass(LogMixin, BaseClass):
...     pass
>>> a = MyClass()
>>> isinstance(a.log, logging.Logger)
True
>>> print(a.log.name)
fontTools.misc.loggingTools.MyClass
>>> class AnotherClass(MyClass):
...     pass
>>> b = AnotherClass()
>>> isinstance(b.log, logging.Logger)
True
>>> print(b.log.name)
fontTools.misc.loggingTools.AnotherClass

---
## deprecateArgument
```python
from loggingTools import deprecateArgument
```

Raise a warning about deprecated function argument 'name'.

---
## deprecateFunction
```python
from loggingTools import deprecateFunction
```

Decorator to raise a warning when a deprecated function is called.

---
## __init__
```python
from loggingTools import __init__
```



---
## format
```python
from loggingTools import format
```



---
## reset
```python
from loggingTools import reset
```

Reset timer to 'start_time' or the current time.

---
## time
```python
from loggingTools import time
```

Return the overall time (in seconds) since the timer started.

---
## split
```python
from loggingTools import split
```

Split and return the lap time (in seconds) in between splits.

---
## formatTime
```python
from loggingTools import formatTime
```

Format 'time' value in 'msg' and return formatted string.
If 'msg' contains a '%(time)' format string, try to use that.
Otherwise, use the predefined 'default_format'.
If 'msg' is empty or None, fall back to 'default_msg'.

---
## __enter__
```python
from loggingTools import __enter__
```



---
## __exit__
```python
from loggingTools import __exit__
```



---
## __call__
```python
from loggingTools import __call__
```

If the first argument is a function, return a decorator which runs
the wrapped function inside Timer's context manager.
Otherwise, treat the first argument as a 'msg' string and return an updated
Timer instance, referencing the same logger.
A 'level' keyword can also be passed to override self.level.

---
## __float__
```python
from loggingTools import __float__
```



---
## __int__
```python
from loggingTools import __int__
```



---
## __str__
```python
from loggingTools import __str__
```



---
## filter
```python
from loggingTools import filter
```



---
## emit
```python
from loggingTools import emit
```



---
## assertRegex
```python
from loggingTools import assertRegex
```



---
## log
```python
from loggingTools import log
```



---
## decorator
```python
from loggingTools import decorator
```



---
## wrapper
```python
from loggingTools import wrapper
```



---
## __name__
```python
from textTools import __name__
```

fontTools.misc.textTools.py -- miscellaneous routines.

---
## Tag
```python
from textTools import Tag
```



---
## readHex
```python
from textTools import readHex
```

Convert a list of hex strings to binary data.

---
## deHexStr
```python
from textTools import deHexStr
```

Convert a hex string to binary data.

---
## hexStr
```python
from textTools import hexStr
```

Convert binary data to a hex string.

---
## num2binary
```python
from textTools import num2binary
```



---
## binary2num
```python
from textTools import binary2num
```



---
## caselessSort
```python
from textTools import caselessSort
```

Return a sorted copy of a list. If there are only strings
in the list, it will not consider case.

---
## pad
```python
from textTools import pad
```

Pad byte string 'data' with null bytes until its length is a
multiple of 'size'.

>>> len(pad(b'abcd', 4))
4
>>> len(pad(b'abcde', 2))
6
>>> len(pad(b'abcde', 4))
8
>>> pad(b'abcdef', 4) == b'abcdef\x00\x00'
True

---
## tostr
```python
from textTools import tostr
```



---
## tobytes
```python
from textTools import tobytes
```



---
## bytechr
```python
from textTools import bytechr
```



---
## byteord
```python
from textTools import byteord
```



---
## strjoin
```python
from textTools import strjoin
```



---
## bytesjoin
```python
from textTools import bytesjoin
```



---
## transcode
```python
from textTools import transcode
```



---
## __new__
```python
from textTools import __new__
```



---
## __ne__
```python
from textTools import __ne__
```



---
## __eq__
```python
from textTools import __eq__
```



---
## __hash__
```python
from textTools import __hash__
```



---
## Visitor
```python
from visitor import Visitor
```



---
## _register
```python
from visitor import _register
```



---
## register
```python
from visitor import register
```



---
## register_attr
```python
from visitor import register_attr
```



---
## register_attrs
```python
from visitor import register_attrs
```



---
## _visitorsFor
```python
from visitor import _visitorsFor
```



---
## visitObject
```python
from visitor import visitObject
```

Called to visit an object. This function loops over all non-private
attributes of the objects and calls any user-registered (via
@register_attr() or @register_attrs()) visit() functions.

If there is no user-registered visit function, of if there is and it
returns True, or it returns None (or doesn't return anything) and
visitor.defaultStop is False (default), then the visitor will proceed
to call self.visitAttr()

---
## visitAttr
```python
from visitor import visitAttr
```

Called to visit an attribute of an object.

---
## visitList
```python
from visitor import visitList
```

Called to visit any value that is a list.

---
## visitDict
```python
from visitor import visitDict
```

Called to visit any value that is a dictionary.

---
## visitLeaf
```python
from visitor import visitLeaf
```

Called to visit any value that is not an object, list,
or dictionary.

---
## wrapper
```python
from visitor import wrapper
```



---
## __name__
```python
from macCreatorType import __name__
```



---
## _reverseString
```python
from macCreatorType import _reverseString
```



---
## getMacCreatorAndType
```python
from macCreatorType import getMacCreatorAndType
```

Returns file creator and file type codes for a path.

Args:
        path (str): A file path.

Returns:
        A tuple of two :py:class:`fontTools.textTools.Tag` objects, the first
        representing the file creator and the second representing the
        file type.

---
## setMacCreatorAndType
```python
from macCreatorType import setMacCreatorAndType
```

Set file creator and file type codes for a path.

Note that if the ``xattr`` module is not installed, no action is
taken but no error is raised.

Args:
        path (str): A file path.
        fileCreator: A four-character file creator tag.
        fileType: A four-character file type tag.

---
## __name__
```python
from psCharStrings import __name__
```

psCharStrings.py -- module implementing various kinds of CharStrings:
CFF dictionary data and Type1/Type2 CharStrings.

---
## read_operator
```python
from psCharStrings import read_operator
```



---
## read_byte
```python
from psCharStrings import read_byte
```



---
## read_smallInt1
```python
from psCharStrings import read_smallInt1
```



---
## read_smallInt2
```python
from psCharStrings import read_smallInt2
```



---
## read_shortInt
```python
from psCharStrings import read_shortInt
```



---
## read_longInt
```python
from psCharStrings import read_longInt
```



---
## read_fixed1616
```python
from psCharStrings import read_fixed1616
```



---
## read_reserved
```python
from psCharStrings import read_reserved
```



---
## read_realNumber
```python
from psCharStrings import read_realNumber
```



---
## buildOperatorDict
```python
from psCharStrings import buildOperatorDict
```



---
## getIntEncoder
```python
from psCharStrings import getIntEncoder
```



---
## encodeFixed
```python
from psCharStrings import encodeFixed
```



---
## encodeFloat
```python
from psCharStrings import encodeFloat
```



---
## CharStringCompileError
```python
from psCharStrings import CharStringCompileError
```



---
## SimpleT2Decompiler
```python
from psCharStrings import SimpleT2Decompiler
```



---
## T2WidthExtractor
```python
from psCharStrings import T2WidthExtractor
```



---
## T2OutlineExtractor
```python
from psCharStrings import T2OutlineExtractor
```



---
## T1OutlineExtractor
```python
from psCharStrings import T1OutlineExtractor
```



---
## T2CharString
```python
from psCharStrings import T2CharString
```



---
## T1CharString
```python
from psCharStrings import T1CharString
```



---
## DictDecompiler
```python
from psCharStrings import DictDecompiler
```



---
## calcSubrBias
```python
from psCharStrings import calcSubrBias
```



---
## encodeInt
```python
from psCharStrings import encodeInt
```



---
## __init__
```python
from psCharStrings import __init__
```



---
## reset
```python
from psCharStrings import reset
```



---
## execute
```python
from psCharStrings import execute
```



---
## pop
```python
from psCharStrings import pop
```



---
## popall
```python
from psCharStrings import popall
```



---
## push
```python
from psCharStrings import push
```



---
## op_return
```python
from psCharStrings import op_return
```



---
## op_endchar
```python
from psCharStrings import op_endchar
```



---
## op_ignore
```python
from psCharStrings import op_ignore
```



---
## op_callsubr
```python
from psCharStrings import op_callsubr
```



---
## op_callgsubr
```python
from psCharStrings import op_callgsubr
```



---
## op_hstem
```python
from psCharStrings import op_hstem
```



---
## op_vstem
```python
from psCharStrings import op_vstem
```



---
## op_hstemhm
```python
from psCharStrings import op_hstemhm
```



---
## op_vstemhm
```python
from psCharStrings import op_vstemhm
```



---
## op_hintmask
```python
from psCharStrings import op_hintmask
```



---
## countHints
```python
from psCharStrings import countHints
```



---
## op_and
```python
from psCharStrings import op_and
```



---
## op_or
```python
from psCharStrings import op_or
```



---
## op_not
```python
from psCharStrings import op_not
```



---
## op_store
```python
from psCharStrings import op_store
```



---
## op_abs
```python
from psCharStrings import op_abs
```



---
## op_add
```python
from psCharStrings import op_add
```



---
## op_sub
```python
from psCharStrings import op_sub
```



---
## op_div
```python
from psCharStrings import op_div
```



---
## op_load
```python
from psCharStrings import op_load
```



---
## op_neg
```python
from psCharStrings import op_neg
```



---
## op_eq
```python
from psCharStrings import op_eq
```



---
## op_drop
```python
from psCharStrings import op_drop
```



---
## op_put
```python
from psCharStrings import op_put
```



---
## op_get
```python
from psCharStrings import op_get
```



---
## op_ifelse
```python
from psCharStrings import op_ifelse
```



---
## op_random
```python
from psCharStrings import op_random
```



---
## op_mul
```python
from psCharStrings import op_mul
```



---
## op_sqrt
```python
from psCharStrings import op_sqrt
```



---
## op_dup
```python
from psCharStrings import op_dup
```



---
## op_exch
```python
from psCharStrings import op_exch
```



---
## op_index
```python
from psCharStrings import op_index
```



---
## op_roll
```python
from psCharStrings import op_roll
```



---
## op_blend
```python
from psCharStrings import op_blend
```



---
## op_vsindex
```python
from psCharStrings import op_vsindex
```



---
## popallWidth
```python
from psCharStrings import popallWidth
```



---
## op_rmoveto
```python
from psCharStrings import op_rmoveto
```



---
## op_hmoveto
```python
from psCharStrings import op_hmoveto
```



---
## op_vmoveto
```python
from psCharStrings import op_vmoveto
```



---
## _nextPoint
```python
from psCharStrings import _nextPoint
```



---
## rMoveTo
```python
from psCharStrings import rMoveTo
```



---
## rLineTo
```python
from psCharStrings import rLineTo
```



---
## rCurveTo
```python
from psCharStrings import rCurveTo
```



---
## closePath
```python
from psCharStrings import closePath
```



---
## endPath
```python
from psCharStrings import endPath
```



---
## op_rlineto
```python
from psCharStrings import op_rlineto
```



---
## op_hlineto
```python
from psCharStrings import op_hlineto
```



---
## op_vlineto
```python
from psCharStrings import op_vlineto
```



---
## op_rrcurveto
```python
from psCharStrings import op_rrcurveto
```

{dxa dya dxb dyb dxc dyc}+ rrcurveto

---
## op_rcurveline
```python
from psCharStrings import op_rcurveline
```

{dxa dya dxb dyb dxc dyc}+ dxd dyd rcurveline

---
## op_rlinecurve
```python
from psCharStrings import op_rlinecurve
```

{dxa dya}+ dxb dyb dxc dyc dxd dyd rlinecurve

---
## op_vvcurveto
```python
from psCharStrings import op_vvcurveto
```

dx1? {dya dxb dyb dyc}+ vvcurveto

---
## op_hhcurveto
```python
from psCharStrings import op_hhcurveto
```

dy1? {dxa dxb dyb dxc}+ hhcurveto

---
## op_vhcurveto
```python
from psCharStrings import op_vhcurveto
```

dy1 dx2 dy2 dx3 {dxa dxb dyb dyc dyd dxe dye dxf}* dyf? vhcurveto (30)
{dya dxb dyb dxc dxd dxe dye dyf}+ dxf? vhcurveto

---
## op_hvcurveto
```python
from psCharStrings import op_hvcurveto
```

dx1 dx2 dy2 dy3 {dya dxb dyb dxc dxd dxe dye dyf}* dxf?
{dxa dxb dyb dyc dyd dxe dye dxf}+ dyf?

---
## op_hflex
```python
from psCharStrings import op_hflex
```



---
## op_flex
```python
from psCharStrings import op_flex
```



---
## op_hflex1
```python
from psCharStrings import op_hflex1
```



---
## op_flex1
```python
from psCharStrings import op_flex1
```



---
## alternatingLineto
```python
from psCharStrings import alternatingLineto
```



---
## vcurveto
```python
from psCharStrings import vcurveto
```



---
## hcurveto
```python
from psCharStrings import hcurveto
```



---
## exch
```python
from psCharStrings import exch
```



---
## op_closepath
```python
from psCharStrings import op_closepath
```



---
## op_setcurrentpoint
```python
from psCharStrings import op_setcurrentpoint
```



---
## op_hsbw
```python
from psCharStrings import op_hsbw
```



---
## op_sbw
```python
from psCharStrings import op_sbw
```



---
## op_callothersubr
```python
from psCharStrings import op_callothersubr
```



---
## op_pop
```python
from psCharStrings import op_pop
```



---
## doFlex
```python
from psCharStrings import doFlex
```



---
## op_dotsection
```python
from psCharStrings import op_dotsection
```



---
## op_hstem3
```python
from psCharStrings import op_hstem3
```



---
## op_seac
```python
from psCharStrings import op_seac
```

asb adx ady bchar achar seac

---
## op_vstem3
```python
from psCharStrings import op_vstem3
```



---
## getNumRegions
```python
from psCharStrings import getNumRegions
```



---
## __repr__
```python
from psCharStrings import __repr__
```



---
## getFixedEncoder
```python
from psCharStrings import getFixedEncoder
```



---
## decompile
```python
from psCharStrings import decompile
```



---
## draw
```python
from psCharStrings import draw
```



---
## calcBounds
```python
from psCharStrings import calcBounds
```



---
## compile
```python
from psCharStrings import compile
```



---
## needsDecompilation
```python
from psCharStrings import needsDecompilation
```



---
## setProgram
```python
from psCharStrings import setProgram
```



---
## setBytecode
```python
from psCharStrings import setBytecode
```



---
## getToken
```python
from psCharStrings import getToken
```



---
## getBytes
```python
from psCharStrings import getBytes
```



---
## handle_operator
```python
from psCharStrings import handle_operator
```



---
## toXML
```python
from psCharStrings import toXML
```



---
## fromXML
```python
from psCharStrings import fromXML
```



---
## getDict
```python
from psCharStrings import getDict
```



---
## arg_number
```python
from psCharStrings import arg_number
```



---
## arg_blend_number
```python
from psCharStrings import arg_blend_number
```



---
## arg_SID
```python
from psCharStrings import arg_SID
```



---
## arg_array
```python
from psCharStrings import arg_array
```



---
## arg_blendList
```python
from psCharStrings import arg_blendList
```

There may be non-blend args at the top of the stack. We first calculate
where the blend args start in the stack. These are the last
numMasters*numBlends) +1 args.
The blend args starts with numMasters relative coordinate values, the  BlueValues in the list from the default master font. This is followed by
numBlends list of values. Each of  value in one of these lists is the
Variable Font delta for the matching region.

We re-arrange this to be a list of numMaster entries. Each entry starts with the corresponding default font relative value, and is followed by
the delta values. We then convert the default values, the first item in each entry, to an absolute value.

---
## arg_delta
```python
from psCharStrings import arg_delta
```



---
## __name__
```python
from transform import __name__
```

Affine 2D transformation matrix class.

The Transform class implements various transformation matrix operations,
both on the matrix itself, as well as on 2D coordinates.

Transform instances are effectively immutable: all methods that operate on the
transformation itself always return a new instance. This has as the
interesting side effect that Transform instances are hashable, ie. they can be
used as dictionary keys.

This module exports the following symbols:

Transform
        this is the main class
Identity
        Transform instance set to the identity transformation
Offset
        Convenience function that returns a translating transformation
Scale
        Convenience function that returns a scaling transformation

The DecomposedTransform class implements a transformation with separate
translate, rotation, scale, skew, and transformation-center components.

:Example:

        >>> t = Transform(2, 0, 0, 3, 0, 0)
        >>> t.transformPoint((100, 100))
        (200, 300)
        >>> t = Scale(2, 3)
        >>> t.transformPoint((100, 100))
        (200, 300)
        >>> t.transformPoint((0, 0))
        (0, 0)
        >>> t = Offset(2, 3)
        >>> t.transformPoint((100, 100))
        (102, 103)
        >>> t.transformPoint((0, 0))
        (2, 3)
        >>> t2 = t.scale(0.5)
        >>> t2.transformPoint((100, 100))
        (52.0, 53.0)
        >>> import math
        >>> t3 = t2.rotate(math.pi / 2)
        >>> t3.transformPoint((0, 0))
        (2.0, 3.0)
        >>> t3.transformPoint((100, 100))
        (-48.0, 53.0)
        >>> t = Identity.scale(0.5).translate(100, 200).skew(0.1, 0.2)
        >>> t.transformPoints([(0, 0), (1, 1), (100, 100)])
        [(50.0, 100.0), (50.550167336042726, 100.60135501775433), (105.01673360427253, 160.13550177543362)]
        >>>

---
## _normSinCos
```python
from transform import _normSinCos
```



---
## Transform
```python
from transform import Transform
```

2x2 transformation matrix plus offset, a.k.a. Affine transform.
Transform instances are immutable: all transforming methods, eg.
rotate(), return a new Transform instance.

:Example:

        >>> t = Transform()
        >>> t
        <Transform [1 0 0 1 0 0]>
        >>> t.scale(2)
        <Transform [2 0 0 2 0 0]>
        >>> t.scale(2.5, 5.5)
        <Transform [2.5 0 0 5.5 0 0]>
        >>>
        >>> t.scale(2, 3).transformPoint((100, 100))
        (200, 300)

Transform's constructor takes six arguments, all of which are
optional, and can be used as keyword arguments::

        >>> Transform(12)
        <Transform [12 0 0 1 0 0]>
        >>> Transform(dx=12)
        <Transform [1 0 0 1 12 0]>
        >>> Transform(yx=12)
        <Transform [1 0 12 1 0 0]>

Transform instances also behave like sequences of length 6::

        >>> len(Identity)
        6
        >>> list(Identity)
        [1, 0, 0, 1, 0, 0]
        >>> tuple(Identity)
        (1, 0, 0, 1, 0, 0)

Transform instances are comparable::

        >>> t1 = Identity.scale(2, 3).translate(4, 6)
        >>> t2 = Identity.translate(8, 18).scale(2, 3)
        >>> t1 == t2
        1

But beware of floating point rounding errors::

        >>> t1 = Identity.scale(0.2, 0.3).translate(0.4, 0.6)
        >>> t2 = Identity.translate(0.08, 0.18).scale(0.2, 0.3)
        >>> t1
        <Transform [0.2 0 0 0.3 0.08 0.18]>
        >>> t2
        <Transform [0.2 0 0 0.3 0.08 0.18]>
        >>> t1 == t2
        0

Transform instances are hashable, meaning you can use them as
keys in dictionaries::

        >>> d = {Scale(12, 13): None}
        >>> d
        {<Transform [12 0 0 13 0 0]>: None}

But again, beware of floating point rounding errors::

        >>> t1 = Identity.scale(0.2, 0.3).translate(0.4, 0.6)
        >>> t2 = Identity.translate(0.08, 0.18).scale(0.2, 0.3)
        >>> t1
        <Transform [0.2 0 0 0.3 0.08 0.18]>
        >>> t2
        <Transform [0.2 0 0 0.3 0.08 0.18]>
        >>> d = {t1: None}
        >>> d
        {<Transform [0.2 0 0 0.3 0.08 0.18]>: None}
        >>> d[t2]
        Traceback (most recent call last):
          File "<stdin>", line 1, in ?
        KeyError: <Transform [0.2 0 0 0.3 0.08 0.18]>

---
## Offset
```python
from transform import Offset
```

Return the identity transformation offset by x, y.

:Example:
        >>> Offset(2, 3)
        <Transform [1 0 0 1 2 3]>
        >>>

---
## Scale
```python
from transform import Scale
```

Return the identity transformation scaled by x, y. The 'y' argument
may be None, which implies to use the x value for y as well.

:Example:
        >>> Scale(2, 3)
        <Transform [2 0 0 3 0 0]>
        >>>

---
## DecomposedTransform
```python
from transform import DecomposedTransform
```

The DecomposedTransform class implements a transformation with separate
translate, rotation, scale, skew, and transformation-center components.

---
## transformPoint
```python
from transform import transformPoint
```

Transform a point.

:Example:

        >>> t = Transform()
        >>> t = t.scale(2.5, 5.5)
        >>> t.transformPoint((100, 100))
        (250.0, 550.0)

---
## transformPoints
```python
from transform import transformPoints
```

Transform a list of points.

:Example:

        >>> t = Scale(2, 3)
        >>> t.transformPoints([(0, 0), (0, 100), (100, 100), (100, 0)])
        [(0, 0), (0, 300), (200, 300), (200, 0)]
        >>>

---
## transformVector
```python
from transform import transformVector
```

Transform an (dx, dy) vector, treating translation as zero.

:Example:

        >>> t = Transform(2, 0, 0, 2, 10, 20)
        >>> t.transformVector((3, -4))
        (6, -8)
        >>>

---
## transformVectors
```python
from transform import transformVectors
```

Transform a list of (dx, dy) vector, treating translation as zero.

:Example:
        >>> t = Transform(2, 0, 0, 2, 10, 20)
        >>> t.transformVectors([(3, -4), (5, -6)])
        [(6, -8), (10, -12)]
        >>>

---
## translate
```python
from transform import translate
```

Return a new transformation, translated (offset) by x, y.

:Example:
        >>> t = Transform()
        >>> t.translate(20, 30)
        <Transform [1 0 0 1 20 30]>
        >>>

---
## scale
```python
from transform import scale
```

Return a new transformation, scaled by x, y. The 'y' argument
may be None, which implies to use the x value for y as well.

:Example:
        >>> t = Transform()
        >>> t.scale(5)
        <Transform [5 0 0 5 0 0]>
        >>> t.scale(5, 6)
        <Transform [5 0 0 6 0 0]>
        >>>

---
## rotate
```python
from transform import rotate
```

Return a new transformation, rotated by 'angle' (radians).

:Example:
        >>> import math
        >>> t = Transform()
        >>> t.rotate(math.pi / 2)
        <Transform [0 1 -1 0 0 0]>
        >>>

---
## skew
```python
from transform import skew
```

Return a new transformation, skewed by x and y.

:Example:
        >>> import math
        >>> t = Transform()
        >>> t.skew(math.pi / 4)
        <Transform [1 0 1 1 0 0]>
        >>>

---
## transform
```python
from transform import transform
```

Return a new transformation, transformed by another
transformation.

:Example:
        >>> t = Transform(2, 0, 0, 3, 1, 6)
        >>> t.transform((4, 3, 2, 1, 5, 6))
        <Transform [8 9 4 3 11 24]>
        >>>

---
## reverseTransform
```python
from transform import reverseTransform
```

Return a new transformation, which is the other transformation
transformed by self. self.reverseTransform(other) is equivalent to
other.transform(self).

:Example:
        >>> t = Transform(2, 0, 0, 3, 1, 6)
        >>> t.reverseTransform((4, 3, 2, 1, 5, 6))
        <Transform [8 6 6 3 21 15]>
        >>> Transform(4, 3, 2, 1, 5, 6).transform((2, 0, 0, 3, 1, 6))
        <Transform [8 6 6 3 21 15]>
        >>>

---
## inverse
```python
from transform import inverse
```

Return the inverse transformation.

:Example:
        >>> t = Identity.translate(2, 3).scale(4, 5)
        >>> t.transformPoint((10, 20))
        (42, 103)
        >>> it = t.inverse()
        >>> it.transformPoint((42, 103))
        (10.0, 20.0)
        >>>

---
## toPS
```python
from transform import toPS
```

Return a PostScript representation

:Example:

        >>> t = Identity.scale(2, 3).translate(4, 5)
        >>> t.toPS()
        '[2 0 0 3 8 15]'
        >>>

---
## toDecomposed
```python
from transform import toDecomposed
```

Decompose into a DecomposedTransform.

---
## __bool__
```python
from transform import __bool__
```



---
## __repr__
```python
from transform import __repr__
```



---
## fromTransform
```python
from transform import fromTransform
```



---
## toTransform
```python
from transform import toTransform
```

Return the Transform() equivalent of this transformation.

:Example:
        >>> DecomposedTransform(scaleX=2, scaleY=2).toTransform()
        <Transform [2 0 0 2 0 0]>
        >>>

---
## __name__
```python
from etree import __name__
```

DEPRECATED - This module is kept here only as a backward compatibility shim
for the old ufoLib.etree module, which was moved to fontTools.misc.etree.
Please use the latter instead.

---
## Element
```python
from etree import Element
```

Element subclass that keeps the order of attributes.

---
## SubElement
```python
from etree import SubElement
```

Must override SubElement as well otherwise _elementtree.SubElement
fails if 'parent' is a subclass of Element object.

---
## _iterwalk
```python
from etree import _iterwalk
```



---
## iterwalk
```python
from etree import iterwalk
```

A tree walker that generates events from an existing tree as
if it was parsing XML data with iterparse().
Drop-in replacement for lxml.etree.iterwalk.

---
## ElementTree
```python
from etree import ElementTree
```

ElementTree subclass that adds 'pretty_print' and 'doctype'
arguments to the 'write' method.
Currently these are only supported for the default XML serialization
'method', and not also for "html" or "text", for these are delegated
to the base class.

---
## tostring
```python
from etree import tostring
```

Custom 'tostring' function that uses our ElementTree subclass, with
pretty_print support.

---
## _tounicode
```python
from etree import _tounicode
```

Test if a string is valid user input and decode it to unicode string
using ASCII encoding if it's a bytes string.
Reject all bytes/unicode input that contains non-XML characters.
Reject all bytes input that contains non-ASCII characters.

---
## _get_writer
```python
from etree import _get_writer
```



---
## _namespaces
```python
from etree import _namespaces
```



---
## _serialize_xml
```python
from etree import _serialize_xml
```



---
## _raise_serialization_error
```python
from etree import _raise_serialization_error
```



---
## _escape_cdata
```python
from etree import _escape_cdata
```



---
## _escape_attrib
```python
from etree import _escape_attrib
```



---
## _indent
```python
from etree import _indent
```



---
## __init__
```python
from etree import __init__
```



---
## write
```python
from etree import write
```



---
## add_qname
```python
from etree import add_qname
```



---
## __name__
```python
from xmlReader import __name__
```



---
## TTXParseError
```python
from xmlReader import TTXParseError
```



---
## XMLReader
```python
from xmlReader import XMLReader
```



---
## ProgressPrinter
```python
from xmlReader import ProgressPrinter
```



---
## __init__
```python
from xmlReader import __init__
```



---
## read
```python
from xmlReader import read
```



---
## close
```python
from xmlReader import close
```



---
## _parseFile
```python
from xmlReader import _parseFile
```



---
## _startElementHandler
```python
from xmlReader import _startElementHandler
```



---
## _characterDataHandler
```python
from xmlReader import _characterDataHandler
```



---
## _endElementHandler
```python
from xmlReader import _endElementHandler
```



---
## set
```python
from xmlReader import set
```



---
## increment
```python
from xmlReader import increment
```



---
## setLabel
```python
from xmlReader import setLabel
```



---
## __name__
```python
from dictTools import __name__
```

Misc dict tools.

---
## hashdict
```python
from dictTools import hashdict
```

hashable dict implementation, suitable for use as a key into
other dicts.

    >>> h1 = hashdict({"apples": 1, "bananas":2})
    >>> h2 = hashdict({"bananas": 3, "mangoes": 5})
    >>> h1+h2
    hashdict(apples=1, bananas=3, mangoes=5)
    >>> d1 = {}
    >>> d1[h1] = "salad"
    >>> d1[h1]
    'salad'
    >>> d1[h2]
    Traceback (most recent call last):
    ...
    KeyError: hashdict(bananas=3, mangoes=5)

based on answers from
   http://stackoverflow.com/questions/1151658/python-hashable-dicts

---
## __key
```python
from dictTools import __key
```



---
## __repr__
```python
from dictTools import __repr__
```



---
## __hash__
```python
from dictTools import __hash__
```



---
## __setitem__
```python
from dictTools import __setitem__
```



---
## __delitem__
```python
from dictTools import __delitem__
```



---
## clear
```python
from dictTools import clear
```



---
## pop
```python
from dictTools import pop
```



---
## popitem
```python
from dictTools import popitem
```



---
## setdefault
```python
from dictTools import setdefault
```



---
## update
```python
from dictTools import update
```



---
## __add__
```python
from dictTools import __add__
```



---
## __name__
```python
from bezierTools import __name__
```

fontTools.misc.bezierTools.py -- tools for working with Bezier path segments.

---
## calcCubicArcLength
```python
from bezierTools import calcCubicArcLength
```

Calculates the arc length for a cubic Bezier segment.

Whereas :func:`approximateCubicArcLength` approximates the length, this
function calculates it by "measuring", recursively dividing the curve
until the divided segments are shorter than ``tolerance``.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
    tolerance: Controls the precision of the calcuation.

Returns:
    Arc length value.

---
## _split_cubic_into_two
```python
from bezierTools import _split_cubic_into_two
```



---
## _calcCubicArcLengthCRecurse
```python
from bezierTools import _calcCubicArcLengthCRecurse
```



---
## calcCubicArcLengthC
```python
from bezierTools import calcCubicArcLengthC
```

Calculates the arc length for a cubic Bezier segment.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.
    tolerance: Controls the precision of the calcuation.

Returns:
    Arc length value.

---
## _dot
```python
from bezierTools import _dot
```



---
## _intSecAtan
```python
from bezierTools import _intSecAtan
```



---
## calcQuadraticArcLength
```python
from bezierTools import calcQuadraticArcLength
```

Calculates the arc length for a quadratic Bezier segment.

Args:
    pt1: Start point of the Bezier as 2D tuple.
    pt2: Handle point of the Bezier as 2D tuple.
    pt3: End point of the Bezier as 2D tuple.

Returns:
    Arc length value.

Example::

    >>> calcQuadraticArcLength((0, 0), (0, 0), (0, 0)) # empty segment
    0.0
    >>> calcQuadraticArcLength((0, 0), (50, 0), (80, 0)) # collinear points
    80.0
    >>> calcQuadraticArcLength((0, 0), (0, 50), (0, 80)) # collinear points vertical
    80.0
    >>> calcQuadraticArcLength((0, 0), (50, 20), (100, 40)) # collinear points
    107.70329614269008
    >>> calcQuadraticArcLength((0, 0), (0, 100), (100, 0))
    154.02976155645263
    >>> calcQuadraticArcLength((0, 0), (0, 50), (100, 0))
    120.21581243984076
    >>> calcQuadraticArcLength((0, 0), (50, -10), (80, 50))
    102.53273816445825
    >>> calcQuadraticArcLength((0, 0), (40, 0), (-40, 0)) # collinear points, control point outside
    66.66666666666667
    >>> calcQuadraticArcLength((0, 0), (40, 0), (0, 0)) # collinear points, looping back
    40.0

---
## calcQuadraticArcLengthC
```python
from bezierTools import calcQuadraticArcLengthC
```

Calculates the arc length for a quadratic Bezier segment.

Args:
    pt1: Start point of the Bezier as a complex number.
    pt2: Handle point of the Bezier as a complex number.
    pt3: End point of the Bezier as a complex number.

Returns:
    Arc length value.

---
## approximateQuadraticArcLength
```python
from bezierTools import approximateQuadraticArcLength
```

Calculates the arc length for a quadratic Bezier segment.

Uses Gauss-Legendre quadrature for a branch-free approximation.
See :func:`calcQuadraticArcLength` for a slower but more accurate result.

Args:
    pt1: Start point of the Bezier as 2D tuple.
    pt2: Handle point of the Bezier as 2D tuple.
    pt3: End point of the Bezier as 2D tuple.

Returns:
    Approximate arc length value.

---
## approximateQuadraticArcLengthC
```python
from bezierTools import approximateQuadraticArcLengthC
```

Calculates the arc length for a quadratic Bezier segment.

Uses Gauss-Legendre quadrature for a branch-free approximation.
See :func:`calcQuadraticArcLength` for a slower but more accurate result.

Args:
    pt1: Start point of the Bezier as a complex number.
    pt2: Handle point of the Bezier as a complex number.
    pt3: End point of the Bezier as a complex number.

Returns:
    Approximate arc length value.

---
## calcQuadraticBounds
```python
from bezierTools import calcQuadraticBounds
```

Calculates the bounding rectangle for a quadratic Bezier segment.

Args:
    pt1: Start point of the Bezier as a 2D tuple.
    pt2: Handle point of the Bezier as a 2D tuple.
    pt3: End point of the Bezier as a 2D tuple.

Returns:
    A four-item tuple representing the bounding rectangle ``(xMin, yMin, xMax, yMax)``.

Example::

    >>> calcQuadraticBounds((0, 0), (50, 100), (100, 0))
    (0, 0, 100, 50.0)
    >>> calcQuadraticBounds((0, 0), (100, 0), (100, 100))
    (0.0, 0.0, 100, 100)

---
## approximateCubicArcLength
```python
from bezierTools import approximateCubicArcLength
```

Approximates the arc length for a cubic Bezier segment.

Uses Gauss-Lobatto quadrature with n=5 points to approximate arc length.
See :func:`calcCubicArcLength` for a slower but more accurate result.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.

Returns:
    Arc length value.

Example::

    >>> approximateCubicArcLength((0, 0), (25, 100), (75, 100), (100, 0))
    190.04332968932817
    >>> approximateCubicArcLength((0, 0), (50, 0), (100, 50), (100, 100))
    154.8852074945903
    >>> approximateCubicArcLength((0, 0), (50, 0), (100, 0), (150, 0)) # line; exact result should be 150.
    149.99999999999991
    >>> approximateCubicArcLength((0, 0), (50, 0), (100, 0), (-50, 0)) # cusp; exact result should be 150.
    136.9267662156362
    >>> approximateCubicArcLength((0, 0), (50, 0), (100, -50), (-50, 0)) # cusp
    154.80848416537057

---
## approximateCubicArcLengthC
```python
from bezierTools import approximateCubicArcLengthC
```

Approximates the arc length for a cubic Bezier segment.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.

Returns:
    Arc length value.

---
## calcCubicBounds
```python
from bezierTools import calcCubicBounds
```

Calculates the bounding rectangle for a quadratic Bezier segment.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.

Returns:
    A four-item tuple representing the bounding rectangle ``(xMin, yMin, xMax, yMax)``.

Example::

    >>> calcCubicBounds((0, 0), (25, 100), (75, 100), (100, 0))
    (0, 0, 100, 75.0)
    >>> calcCubicBounds((0, 0), (50, 0), (100, 50), (100, 100))
    (0.0, 0.0, 100, 100)
    >>> print("%f %f %f %f" % calcCubicBounds((50, 0), (0, 100), (100, 100), (50, 0)))
    35.566243 0.000000 64.433757 75.000000

---
## splitLine
```python
from bezierTools import splitLine
```

Split a line at a given coordinate.

Args:
    pt1: Start point of line as 2D tuple.
    pt2: End point of line as 2D tuple.
    where: Position at which to split the line.
    isHorizontal: Direction of the ray splitting the line. If true,
        ``where`` is interpreted as a Y coordinate; if false, then
        ``where`` is interpreted as an X coordinate.

Returns:
    A list of two line segments (each line segment being two 2D tuples)
    if the line was successfully split, or a list containing the original
    line.

Example::

    >>> printSegments(splitLine((0, 0), (100, 100), 50, True))
    ((0, 0), (50, 50))
    ((50, 50), (100, 100))
    >>> printSegments(splitLine((0, 0), (100, 100), 100, True))
    ((0, 0), (100, 100))
    >>> printSegments(splitLine((0, 0), (100, 100), 0, True))
    ((0, 0), (0, 0))
    ((0, 0), (100, 100))
    >>> printSegments(splitLine((0, 0), (100, 100), 0, False))
    ((0, 0), (0, 0))
    ((0, 0), (100, 100))
    >>> printSegments(splitLine((100, 0), (0, 0), 50, False))
    ((100, 0), (50, 0))
    ((50, 0), (0, 0))
    >>> printSegments(splitLine((0, 100), (0, 0), 50, True))
    ((0, 100), (0, 50))
    ((0, 50), (0, 0))

---
## splitQuadratic
```python
from bezierTools import splitQuadratic
```

Split a quadratic Bezier curve at a given coordinate.

Args:
    pt1,pt2,pt3: Control points of the Bezier as 2D tuples.
    where: Position at which to split the curve.
    isHorizontal: Direction of the ray splitting the curve. If true,
        ``where`` is interpreted as a Y coordinate; if false, then
        ``where`` is interpreted as an X coordinate.

Returns:
    A list of two curve segments (each curve segment being three 2D tuples)
    if the curve was successfully split, or a list containing the original
    curve.

Example::

    >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 150, False))
    ((0, 0), (50, 100), (100, 0))
    >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, False))
    ((0, 0), (25, 50), (50, 50))
    ((50, 50), (75, 50), (100, 0))
    >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, False))
    ((0, 0), (12.5, 25), (25, 37.5))
    ((25, 37.5), (62.5, 75), (100, 0))
    >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 25, True))
    ((0, 0), (7.32233, 14.6447), (14.6447, 25))
    ((14.6447, 25), (50, 75), (85.3553, 25))
    ((85.3553, 25), (92.6777, 14.6447), (100, -7.10543e-15))
    >>> # XXX I'm not at all sure if the following behavior is desirable:
    >>> printSegments(splitQuadratic((0, 0), (50, 100), (100, 0), 50, True))
    ((0, 0), (25, 50), (50, 50))
    ((50, 50), (50, 50), (50, 50))
    ((50, 50), (75, 50), (100, 0))

---
## splitCubic
```python
from bezierTools import splitCubic
```

Split a cubic Bezier curve at a given coordinate.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
    where: Position at which to split the curve.
    isHorizontal: Direction of the ray splitting the curve. If true,
        ``where`` is interpreted as a Y coordinate; if false, then
        ``where`` is interpreted as an X coordinate.

Returns:
    A list of two curve segments (each curve segment being four 2D tuples)
    if the curve was successfully split, or a list containing the original
    curve.

Example::

    >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 150, False))
    ((0, 0), (25, 100), (75, 100), (100, 0))
    >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 50, False))
    ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
    ((50, 75), (68.75, 75), (87.5, 50), (100, 0))
    >>> printSegments(splitCubic((0, 0), (25, 100), (75, 100), (100, 0), 25, True))
    ((0, 0), (2.29379, 9.17517), (4.79804, 17.5085), (7.47414, 25))
    ((7.47414, 25), (31.2886, 91.6667), (68.7114, 91.6667), (92.5259, 25))
    ((92.5259, 25), (95.202, 17.5085), (97.7062, 9.17517), (100, 1.77636e-15))

---
## splitQuadraticAtT
```python
from bezierTools import splitQuadraticAtT
```

Split a quadratic Bezier curve at one or more values of t.

Args:
    pt1,pt2,pt3: Control points of the Bezier as 2D tuples.
    *ts: Positions at which to split the curve.

Returns:
    A list of curve segments (each curve segment being three 2D tuples).

Examples::

    >>> printSegments(splitQuadraticAtT((0, 0), (50, 100), (100, 0), 0.5))
    ((0, 0), (25, 50), (50, 50))
    ((50, 50), (75, 50), (100, 0))
    >>> printSegments(splitQuadraticAtT((0, 0), (50, 100), (100, 0), 0.5, 0.75))
    ((0, 0), (25, 50), (50, 50))
    ((50, 50), (62.5, 50), (75, 37.5))
    ((75, 37.5), (87.5, 25), (100, 0))

---
## splitCubicAtT
```python
from bezierTools import splitCubicAtT
```

Split a cubic Bezier curve at one or more values of t.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as 2D tuples.
    *ts: Positions at which to split the curve.

Returns:
    A list of curve segments (each curve segment being four 2D tuples).

Examples::

    >>> printSegments(splitCubicAtT((0, 0), (25, 100), (75, 100), (100, 0), 0.5))
    ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
    ((50, 75), (68.75, 75), (87.5, 50), (100, 0))
    >>> printSegments(splitCubicAtT((0, 0), (25, 100), (75, 100), (100, 0), 0.5, 0.75))
    ((0, 0), (12.5, 50), (31.25, 75), (50, 75))
    ((50, 75), (59.375, 75), (68.75, 68.75), (77.3438, 56.25))
    ((77.3438, 56.25), (85.9375, 43.75), (93.75, 25), (100, 0))

---
## splitCubicAtTC
```python
from bezierTools import splitCubicAtTC
```

Split a cubic Bezier curve at one or more values of t.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers..
    *ts: Positions at which to split the curve.

Yields:
    Curve segments (each curve segment being four complex numbers).

---
## splitCubicIntoTwoAtTC
```python
from bezierTools import splitCubicIntoTwoAtTC
```

Split a cubic Bezier curve at t.

Args:
    pt1,pt2,pt3,pt4: Control points of the Bezier as complex numbers.
    t: Position at which to split the curve.

Returns:
    A tuple of two curve segments (each curve segment being four complex numbers).

---
## _splitQuadraticAtT
```python
from bezierTools import _splitQuadraticAtT
```



---
## _splitCubicAtT
```python
from bezierTools import _splitCubicAtT
```



---
## _splitCubicAtTC
```python
from bezierTools import _splitCubicAtTC
```



---
## solveQuadratic
```python
from bezierTools import solveQuadratic
```

Solve a quadratic equation.

Solves *a*x*x + b*x + c = 0* where a, b and c are real.

Args:
    a: coefficient of *x²*
    b: coefficient of *x*
    c: constant term

Returns:
    A list of roots. Note that the returned list is neither guaranteed to
    be sorted nor to contain unique values!

---
## solveCubic
```python
from bezierTools import solveCubic
```

Solve a cubic equation.

Solves *a*x*x*x + b*x*x + c*x + d = 0* where a, b, c and d are real.

Args:
    a: coefficient of *x³*
    b: coefficient of *x²*
    c: coefficient of *x*
    d: constant term

Returns:
    A list of roots. Note that the returned list is neither guaranteed to
    be sorted nor to contain unique values!

Examples::

    >>> solveCubic(1, 1, -6, 0)
    [-3.0, -0.0, 2.0]
    >>> solveCubic(-10.0, -9.0, 48.0, -29.0)
    [-2.9, 1.0, 1.0]
    >>> solveCubic(-9.875, -9.0, 47.625, -28.75)
    [-2.911392, 1.0, 1.0]
    >>> solveCubic(1.0, -4.5, 6.75, -3.375)
    [1.5, 1.5, 1.5]
    >>> solveCubic(-12.0, 18.0, -9.0, 1.50023651123)
    [0.5, 0.5, 0.5]
    >>> solveCubic(
    ...     9.0, 0.0, 0.0, -7.62939453125e-05
    ... ) == [-0.0, -0.0, -0.0]
    True

---
## calcQuadraticParameters
```python
from bezierTools import calcQuadraticParameters
```



---
## calcCubicParameters
```python
from bezierTools import calcCubicParameters
```



---
## calcCubicParametersC
```python
from bezierTools import calcCubicParametersC
```



---
## calcQuadraticPoints
```python
from bezierTools import calcQuadraticPoints
```



---
## calcCubicPoints
```python
from bezierTools import calcCubicPoints
```



---
## calcCubicPointsC
```python
from bezierTools import calcCubicPointsC
```



---
## linePointAtT
```python
from bezierTools import linePointAtT
```

Finds the point at time `t` on a line.

Args:
    pt1, pt2: Coordinates of the line as 2D tuples.
    t: The time along the line.

Returns:
    A 2D tuple with the coordinates of the point.

---
## quadraticPointAtT
```python
from bezierTools import quadraticPointAtT
```

Finds the point at time `t` on a quadratic curve.

Args:
    pt1, pt2, pt3: Coordinates of the curve as 2D tuples.
    t: The time along the curve.

Returns:
    A 2D tuple with the coordinates of the point.

---
## cubicPointAtT
```python
from bezierTools import cubicPointAtT
```

Finds the point at time `t` on a cubic curve.

Args:
    pt1, pt2, pt3, pt4: Coordinates of the curve as 2D tuples.
    t: The time along the curve.

Returns:
    A 2D tuple with the coordinates of the point.

---
## cubicPointAtTC
```python
from bezierTools import cubicPointAtTC
```

Finds the point at time `t` on a cubic curve.

Args:
    pt1, pt2, pt3, pt4: Coordinates of the curve as complex numbers.
    t: The time along the curve.

Returns:
    A complex number with the coordinates of the point.

---
## segmentPointAtT
```python
from bezierTools import segmentPointAtT
```



---
## _line_t_of_pt
```python
from bezierTools import _line_t_of_pt
```



---
## _both_points_are_on_same_side_of_origin
```python
from bezierTools import _both_points_are_on_same_side_of_origin
```



---
## lineLineIntersections
```python
from bezierTools import lineLineIntersections
```

Finds intersections between two line segments.

Args:
    s1, e1: Coordinates of the first line as 2D tuples.
    s2, e2: Coordinates of the second line as 2D tuples.

Returns:
    A list of ``Intersection`` objects, each object having ``pt``, ``t1``
    and ``t2`` attributes containing the intersection point, time on first
    segment and time on second segment respectively.

Examples::

    >>> a = lineLineIntersections( (310,389), (453, 222), (289, 251), (447, 367))
    >>> len(a)
    1
    >>> intersection = a[0]
    >>> intersection.pt
    (374.44882952482897, 313.73458370177315)
    >>> (intersection.t1, intersection.t2)
    (0.45069111555824465, 0.5408153767394238)

---
## _alignment_transformation
```python
from bezierTools import _alignment_transformation
```



---
## _curve_line_intersections_t
```python
from bezierTools import _curve_line_intersections_t
```



---
## curveLineIntersections
```python
from bezierTools import curveLineIntersections
```

Finds intersections between a curve and a line.

Args:
    curve: List of coordinates of the curve segment as 2D tuples.
    line: List of coordinates of the line segment as 2D tuples.

Returns:
    A list of ``Intersection`` objects, each object having ``pt``, ``t1``
    and ``t2`` attributes containing the intersection point, time on first
    segment and time on second segment respectively.

Examples::
    >>> curve = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
    >>> line  = [ (25, 260), (230, 20) ]
    >>> intersections = curveLineIntersections(curve, line)
    >>> len(intersections)
    3
    >>> intersections[0].pt
    (84.9000930760723, 189.87306176459828)

---
## _curve_bounds
```python
from bezierTools import _curve_bounds
```



---
## _split_segment_at_t
```python
from bezierTools import _split_segment_at_t
```



---
## _curve_curve_intersections_t
```python
from bezierTools import _curve_curve_intersections_t
```



---
## _is_linelike
```python
from bezierTools import _is_linelike
```



---
## curveCurveIntersections
```python
from bezierTools import curveCurveIntersections
```

Finds intersections between a curve and a curve.

Args:
    curve1: List of coordinates of the first curve segment as 2D tuples.
    curve2: List of coordinates of the second curve segment as 2D tuples.

Returns:
    A list of ``Intersection`` objects, each object having ``pt``, ``t1``
    and ``t2`` attributes containing the intersection point, time on first
    segment and time on second segment respectively.

Examples::
    >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
    >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
    >>> intersections = curveCurveIntersections(curve1, curve2)
    >>> len(intersections)
    3
    >>> intersections[0].pt
    (81.7831487395506, 109.88904552375288)

---
## segmentSegmentIntersections
```python
from bezierTools import segmentSegmentIntersections
```

Finds intersections between two segments.

Args:
    seg1: List of coordinates of the first segment as 2D tuples.
    seg2: List of coordinates of the second segment as 2D tuples.

Returns:
    A list of ``Intersection`` objects, each object having ``pt``, ``t1``
    and ``t2`` attributes containing the intersection point, time on first
    segment and time on second segment respectively.

Examples::
    >>> curve1 = [ (10,100), (90,30), (40,140), (220,220) ]
    >>> curve2 = [ (5,150), (180,20), (80,250), (210,190) ]
    >>> intersections = segmentSegmentIntersections(curve1, curve2)
    >>> len(intersections)
    3
    >>> intersections[0].pt
    (81.7831487395506, 109.88904552375288)
    >>> curve3 = [ (100, 240), (30, 60), (210, 230), (160, 30) ]
    >>> line  = [ (25, 260), (230, 20) ]
    >>> intersections = segmentSegmentIntersections(curve3, line)
    >>> len(intersections)
    3
    >>> intersections[0].pt
    (84.9000930760723, 189.87306176459828)

---
## _segmentrepr
```python
from bezierTools import _segmentrepr
```

>>> _segmentrepr([1, [2, 3], [], [[2, [3, 4], [0.1, 2.2]]]])
'(1, (2, 3), (), ((2, (3, 4), (0.1, 2.2))))'

---
## printSegments
```python
from bezierTools import printSegments
```

Helper for the doctests, displaying each segment in a list of
segments on a single line as a tuple.

---
## midpoint
```python
from bezierTools import midpoint
```



---
## __name__
```python
from eexec import __name__
```

PostScript Type 1 fonts make use of two types of encryption: charstring
encryption and ``eexec`` encryption. Charstring encryption is used for
the charstrings themselves, while ``eexec`` is used to encrypt larger
sections of the font program, such as the ``Private`` and ``CharStrings``
dictionaries. Despite the different names, the algorithm is the same,
although ``eexec`` encryption uses a fixed initial key R=55665.

The algorithm uses cipher feedback, meaning that the ciphertext is used
to modify the key. Because of this, the routines in this module return
the new key at the end of the operation.

---
## _decryptChar
```python
from eexec import _decryptChar
```



---
## _encryptChar
```python
from eexec import _encryptChar
```



---
## decrypt
```python
from eexec import decrypt
```

Decrypts a string using the Type 1 encryption algorithm.

Args:
        cipherstring: String of ciphertext.
        R: Initial key.

Returns:
        decryptedStr: Plaintext string.
        R: Output key for subsequent decryptions.

Examples::

        >>> testStr = b"\0\0asdadads asds\265"
        >>> decryptedStr, R = decrypt(testStr, 12321)
        >>> decryptedStr == b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1'
        True
        >>> R == 36142
        True

---
## encrypt
```python
from eexec import encrypt
```

Encrypts a string using the Type 1 encryption algorithm.

Note that the algorithm as described in the Type 1 specification requires the
plaintext to be prefixed with a number of random bytes. (For ``eexec`` the
number of random bytes is set to 4.) This routine does *not* add the random
prefix to its input.

Args:
        plainstring: String of plaintext.
        R: Initial key.

Returns:
        cipherstring: Ciphertext string.
        R: Output key for subsequent encryptions.

Examples::

        >>> testStr = b"\0\0asdadads asds\265"
        >>> decryptedStr, R = decrypt(testStr, 12321)
        >>> decryptedStr == b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1'
        True
        >>> R == 36142
        True

>>> testStr = b'0d\nh\x15\xe8\xc4\xb2\x15\x1d\x108\x1a<6\xa1'
>>> encryptedStr, R = encrypt(testStr, 12321)
>>> encryptedStr == b"\0\0asdadads asds\265"
True
>>> R == 36142
True

---
## hexString
```python
from eexec import hexString
```



---
## deHexString
```python
from eexec import deHexString
```



---
## __name__
```python
from xmlWriter import __name__
```

xmlWriter.py -- Simple XML authoring class

---
## XMLWriter
```python
from xmlWriter import XMLWriter
```



---
## escape
```python
from xmlWriter import escape
```



---
## escapeattr
```python
from xmlWriter import escapeattr
```



---
## escape8bit
```python
from xmlWriter import escape8bit
```

Input is Unicode string.

---
## hexStr
```python
from xmlWriter import hexStr
```



---
## __init__
```python
from xmlWriter import __init__
```



---
## __enter__
```python
from xmlWriter import __enter__
```



---
## __exit__
```python
from xmlWriter import __exit__
```



---
## close
```python
from xmlWriter import close
```



---
## write
```python
from xmlWriter import write
```

Writes text.

---
## writecdata
```python
from xmlWriter import writecdata
```

Writes text in a CDATA section.

---
## write8bit
```python
from xmlWriter import write8bit
```

Writes a bytes() sequence into the XML, escaping
non-ASCII bytes.  When this is read in xmlReader,
the original bytes can be recovered by encoding to
'latin-1'.

---
## write_noindent
```python
from xmlWriter import write_noindent
```

Writes text without indentation.

---
## _writeraw
```python
from xmlWriter import _writeraw
```

Writes bytes, possibly indented.

---
## newline
```python
from xmlWriter import newline
```



---
## comment
```python
from xmlWriter import comment
```



---
## simpletag
```python
from xmlWriter import simpletag
```



---
## begintag
```python
from xmlWriter import begintag
```



---
## endtag
```python
from xmlWriter import endtag
```



---
## dumphex
```python
from xmlWriter import dumphex
```



---
## indent
```python
from xmlWriter import indent
```



---
## dedent
```python
from xmlWriter import dedent
```



---
## stringifyattrs
```python
from xmlWriter import stringifyattrs
```



---
## escapechar
```python
from xmlWriter import escapechar
```



---
## __name__
```python
from intTools import __name__
```



---
## bit_indices
```python
from intTools import bit_indices
```

Return list of indices where bits are set, 0 being the index of the least significant bit.

>>> bit_indices(0b101)
[0, 2]

---
## bit_count
```python
from intTools import bit_count
```



---
## __name__
```python
from iterTools import __name__
```



---
## batched
```python
from iterTools import batched
```



---
## generate_curve
```python
from benchmark import generate_curve
```



---
## setup_curve_to_quadratic
```python
from benchmark import setup_curve_to_quadratic
```



---
## setup_curves_to_quadratic
```python
from benchmark import setup_curves_to_quadratic
```



---
## __name__
```python
from ufo import __name__
```

Converts cubic bezier curves to quadratic splines.

Conversion is performed such that the quadratic splines keep the same end-curve
tangents as the original cubics. The approach is iterative, increasing the
number of segments for a spline until the error gets below a bound.

Respective curves from multiple fonts will be converted at once to ensure that
the resulting splines are interpolation-compatible.

---
## zip
```python
from ufo import zip
```

Ensure each argument to zip has the same length. Also make sure a list is
returned for python 2/3 compatibility.

---
## GetSegmentsPen
```python
from ufo import GetSegmentsPen
```

Pen to collect segments into lists of points for conversion.

Curves always include their initial on-curve point, so some points are
duplicated between segments.

---
## _get_segments
```python
from ufo import _get_segments
```

Get a glyph's segments as extracted by GetSegmentsPen.

---
## _set_segments
```python
from ufo import _set_segments
```

Draw segments as extracted by GetSegmentsPen back to a glyph.

---
## _segments_to_quadratic
```python
from ufo import _segments_to_quadratic
```

Return quadratic approximations of cubic segments.

---
## _glyphs_to_quadratic
```python
from ufo import _glyphs_to_quadratic
```

Do the actual conversion of a set of compatible glyphs, after arguments
have been set up.

Return True if the glyphs were modified, else return False.

---
## glyphs_to_quadratic
```python
from ufo import glyphs_to_quadratic
```

Convert the curves of a set of compatible of glyphs to quadratic.

All curves will be converted to quadratic at once, ensuring interpolation
compatibility. If this is not required, calling glyphs_to_quadratic with one
glyph at a time may yield slightly more optimized results.

Return True if glyphs were modified, else return False.

Raises IncompatibleGlyphsError if glyphs have non-interpolatable outlines.

---
## fonts_to_quadratic
```python
from ufo import fonts_to_quadratic
```

Convert the curves of a collection of fonts to quadratic.

All curves will be converted to quadratic at once, ensuring interpolation
compatibility. If this is not required, calling fonts_to_quadratic with one
font at a time may yield slightly more optimized results.

Return the set of modified glyph names if any, else return an empty set.

By default, cu2qu stores the curve type in the fonts' lib, under a private
key "com.github.googlei18n.cu2qu.curve_type", and will not try to convert
them again if the curve type is already set to "quadratic".
Setting 'remember_curve_type' to False disables this optimization.

Raises IncompatibleFontsError if same-named glyphs from different fonts
have non-interpolatable outlines.

---
## glyph_to_quadratic
```python
from ufo import glyph_to_quadratic
```

Convenience wrapper around glyphs_to_quadratic, for just one glyph.
Return True if the glyph was modified, else return False.

---
## font_to_quadratic
```python
from ufo import font_to_quadratic
```

Convenience wrapper around fonts_to_quadratic, for just one font.
Return the set of modified glyph names if any, else return empty set.

---
## __init__
```python
from ufo import __init__
```



---
## _add_segment
```python
from ufo import _add_segment
```



---
## moveTo
```python
from ufo import moveTo
```



---
## lineTo
```python
from ufo import lineTo
```



---
## qCurveTo
```python
from ufo import qCurveTo
```



---
## curveTo
```python
from ufo import curveTo
```



---
## closePath
```python
from ufo import closePath
```



---
## endPath
```python
from ufo import endPath
```



---
## addComponent
```python
from ufo import addComponent
```



---
## _cpu_count
```python
from cli import _cpu_count
```



---
## open_ufo
```python
from cli import open_ufo
```



---
## _font_to_quadratic
```python
from cli import _font_to_quadratic
```



---
## _samepath
```python
from cli import _samepath
```



---
## _copytree
```python
from cli import _copytree
```



---
## Error
```python
from errors import Error
```

Base Cu2Qu exception class for all other errors.

---
## ApproxNotFoundError
```python
from errors import ApproxNotFoundError
```



---
## UnequalZipLengthsError
```python
from errors import UnequalZipLengthsError
```



---
## IncompatibleGlyphsError
```python
from errors import IncompatibleGlyphsError
```



---
## IncompatibleSegmentNumberError
```python
from errors import IncompatibleSegmentNumberError
```



---
## IncompatibleSegmentTypesError
```python
from errors import IncompatibleSegmentTypesError
```



---
## IncompatibleFontsError
```python
from errors import IncompatibleFontsError
```



---
## __name__
```python
from cu2qu import __name__
```



---
## dot
```python
from cu2qu import dot
```

Return the dot product of two vectors.

Args:
    v1 (complex): First vector.
    v2 (complex): Second vector.

Returns:
    double: Dot product.

---
## calc_cubic_points
```python
from cu2qu import calc_cubic_points
```



---
## calc_cubic_parameters
```python
from cu2qu import calc_cubic_parameters
```



---
## split_cubic_into_n_iter
```python
from cu2qu import split_cubic_into_n_iter
```

Split a cubic Bezier into n equal parts.

Splits the curve into `n` equal parts by curve time.
(t=0..1/n, t=1/n..2/n, ...)

Args:
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.

Returns:
    An iterator yielding the control points (four complex values) of the
    subcurves.

---
## _split_cubic_into_n_gen
```python
from cu2qu import _split_cubic_into_n_gen
```



---
## split_cubic_into_two
```python
from cu2qu import split_cubic_into_two
```

Split a cubic Bezier into two equal parts.

Splits the curve into two equal parts at t = 0.5

Args:
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.

Returns:
    tuple: Two cubic Beziers (each expressed as a tuple of four complex
    values).

---
## split_cubic_into_three
```python
from cu2qu import split_cubic_into_three
```

Split a cubic Bezier into three equal parts.

Splits the curve into three equal parts at t = 1/3 and t = 2/3

Args:
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.

Returns:
    tuple: Three cubic Beziers (each expressed as a tuple of four complex
    values).

---
## cubic_approx_control
```python
from cu2qu import cubic_approx_control
```

Approximate a cubic Bezier using a quadratic one.

Args:
    t (double): Position of control point.
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.

Returns:
    complex: Location of candidate control point on quadratic curve.

---
## calc_intersect
```python
from cu2qu import calc_intersect
```

Calculate the intersection of two lines.

Args:
    a (complex): Start point of first line.
    b (complex): End point of first line.
    c (complex): Start point of second line.
    d (complex): End point of second line.

Returns:
    complex: Location of intersection if one present, ``complex(NaN,NaN)``
    if no intersection was found.

---
## cubic_farthest_fit_inside
```python
from cu2qu import cubic_farthest_fit_inside
```

Check if a cubic Bezier lies within a given distance of the origin.

"Origin" means *the* origin (0,0), not the start of the curve. Note that no
checks are made on the start and end positions of the curve; this function
only checks the inside of the curve.

Args:
    p0 (complex): Start point of curve.
    p1 (complex): First handle of curve.
    p2 (complex): Second handle of curve.
    p3 (complex): End point of curve.
    tolerance (double): Distance from origin.

Returns:
    bool: True if the cubic Bezier ``p`` entirely lies within a distance
    ``tolerance`` of the origin, False otherwise.

---
## cubic_approx_quadratic
```python
from cu2qu import cubic_approx_quadratic
```

Approximate a cubic Bezier with a single quadratic within a given tolerance.

Args:
    cubic (sequence): Four complex numbers representing control points of
        the cubic Bezier curve.
    tolerance (double): Permitted deviation from the original curve.

Returns:
    Three complex numbers representing control points of the quadratic
    curve if it fits within the given tolerance, or ``None`` if no suitable
    curve could be calculated.

---
## cubic_approx_spline
```python
from cu2qu import cubic_approx_spline
```

Approximate a cubic Bezier curve with a spline of n quadratics.

Args:
    cubic (sequence): Four complex numbers representing control points of
        the cubic Bezier curve.
    n (int): Number of quadratic Bezier curves in the spline.
    tolerance (double): Permitted deviation from the original curve.

Returns:
    A list of ``n+2`` complex numbers, representing control points of the
    quadratic spline if it fits within the given tolerance, or ``None`` if
    no suitable spline could be calculated.

---
## curve_to_quadratic
```python
from cu2qu import curve_to_quadratic
```

Approximate a cubic Bezier curve with a spline of n quadratics.

Args:
    cubic (sequence): Four 2D tuples representing control points of
        the cubic Bezier curve.
    max_err (double): Permitted deviation from the original curve.
    all_quadratic (bool): If True (default) returned value is a
        quadratic spline. If False, it's either a single quadratic
        curve or a single cubic curve.

Returns:
    If all_quadratic is True: A list of 2D tuples, representing
    control points of the quadratic spline if it fits within the
    given tolerance, or ``None`` if no suitable spline could be
    calculated.

    If all_quadratic is False: Either a quadratic curve (if length
    of output is 3), or a cubic curve (if length of output is 4).

---
## curves_to_quadratic
```python
from cu2qu import curves_to_quadratic
```

Return quadratic Bezier splines approximating the input cubic Beziers.

Args:
    curves: A sequence of *n* curves, each curve being a sequence of four
        2D tuples.
    max_errors: A sequence of *n* floats representing the maximum permissible
        deviation from each of the cubic Bezier curves.
    all_quadratic (bool): If True (default) returned values are a
        quadratic spline. If False, they are either a single quadratic
        curve or a single cubic curve.

Example::

    >>> curves_to_quadratic( [
    ...   [ (50,50), (100,100), (150,100), (200,50) ],
    ...   [ (75,50), (120,100), (150,75),  (200,60) ]
    ... ], [1,1] )
    [[(50.0, 50.0), (75.0, 75.0), (125.0, 91.66666666666666), (175.0, 75.0), (200.0, 50.0)], [(75.0, 50.0), (97.5, 75.0), (135.41666666666666, 82.08333333333333), (175.0, 67.5), (200.0, 60.0)]]

The returned splines have "implied oncurve points" suitable for use in
TrueType ``glif`` outlines - i.e. in the first spline returned above,
the first quadratic segment runs from (50,50) to
( (75 + 125)/2 , (120 + 91.666..)/2 ) = (100, 83.333...).

Returns:
    If all_quadratic is True, a list of splines, each spline being a list
    of 2D tuples.

    If all_quadratic is False, a list of curves, each curve being a quadratic
    (length 3), or cubic (length 4).

Raises:
    fontTools.cu2qu.Errors.ApproxNotFoundError: if no suitable approximation
    can be found for all curves with the given parameters.

---
## __name__
```python
from cff import __name__
```



---
## _ClosureGlyphsT2Decompiler
```python
from cff import _ClosureGlyphsT2Decompiler
```



---
## closure_glyphs
```python
from cff import closure_glyphs
```



---
## _empty_charstring
```python
from cff import _empty_charstring
```



---
## prune_pre_subset
```python
from cff import prune_pre_subset
```



---
## subset_glyphs
```python
from cff import subset_glyphs
```



---
## prune_post_subset
```python
from cff import prune_post_subset
```



---
## desubroutinize
```python
from cff import desubroutinize
```



---
## remove_hints
```python
from cff import remove_hints
```



---
## remove_unused_subroutines
```python
from cff import remove_unused_subroutines
```



---
## __init__
```python
from cff import __init__
```



---
## op_endchar
```python
from cff import op_endchar
```



---
## _add_method
```python
from util import _add_method
```

Returns a decorator function that adds a new method to one or
more classes.

---
## _uniq_sort
```python
from util import _uniq_sort
```



---
## _log_glyphs
```python
from __init__ import _log_glyphs
```



---
## _dict_subset
```python
from __init__ import _dict_subset
```



---
## _list_subset
```python
from __init__ import _list_subset
```



---
## intersect
```python
from __init__ import intersect
```

Returns ascending list of matching class values.

---
## intersect_glyphs
```python
from __init__ import intersect_glyphs
```

Returns set of intersecting glyphs.

---
## subset
```python
from __init__ import subset
```



---
## remap
```python
from __init__ import remap
```

Remaps classes.

---
## intersect_class
```python
from __init__ import intersect_class
```

Returns set of glyphs matching class.

---
## closure_glyphs
```python
from __init__ import closure_glyphs
```



---
## subset_glyphs
```python
from __init__ import subset_glyphs
```



---
## is_hinting
```python
from __init__ import is_hinting
```



---
## prune_hints
```python
from __init__ import prune_hints
```



---
## prune_post_subset
```python
from __init__ import prune_post_subset
```



---
## subset_lookups
```python
from __init__ import subset_lookups
```

Retains specified lookups, then removes empty features, language
systems, and scripts.

---
## collect_lookups
```python
from __init__ import collect_lookups
```



---
## may_have_non_1to1
```python
from __init__ import may_have_non_1to1
```



---
## __subset_classify_context
```python
from __init__ import __subset_classify_context
```



---
## neuter_lookups
```python
from __init__ import neuter_lookups
```

Sets lookups not in lookup_indices to None.

---
## closure_lookups
```python
from __init__ import closure_lookups
```

Returns sorted index of all lookups reachable from lookup_indices.

---
## subset_features
```python
from __init__ import subset_features
```



---
## collect_features
```python
from __init__ import collect_features
```



---
## retain_empty_scripts
```python
from __init__ import retain_empty_scripts
```



---
## prune_lookups
```python
from __init__ import prune_lookups
```

Remove (default) or neuter unreferenced lookups

---
## subset_feature_tags
```python
from __init__ import subset_feature_tags
```



---
## subset_script_tags
```python
from __init__ import subset_script_tags
```



---
## prune_features
```python
from __init__ import prune_features
```

Remove unreferenced features

---
## prune_pre_subset
```python
from __init__ import prune_pre_subset
```



---
## remove_redundant_langsys
```python
from __init__ import remove_redundant_langsys
```



---
## _pruneGDEF
```python
from __init__ import _pruneGDEF
```



---
## _remap_index_map
```python
from __init__ import _remap_index_map
```



---
## _paint_glyph_names
```python
from __init__ import _paint_glyph_names
```



---
## remapComponentsFast
```python
from __init__ import remapComponentsFast
```



---
## Subsetter
```python
from __init__ import Subsetter
```



---
## load_font
```python
from __init__ import load_font
```



---
## save_font
```python
from __init__ import save_font
```



---
## parse_unicodes
```python
from __init__ import parse_unicodes
```



---
## parse_gids
```python
from __init__ import parse_gids
```



---
## parse_glyphs
```python
from __init__ import parse_glyphs
```



---
## usage
```python
from __init__ import usage
```



---
## ContextHelper
```python
from __init__ import ContextHelper
```



---
## callback
```python
from __init__ import callback
```



---
## collect_colors_by_index
```python
from __init__ import collect_colors_by_index
```



---
## OptionError
```python
from __init__ import OptionError
```



---
## UnknownOptionError
```python
from __init__ import UnknownOptionError
```



---
## parse_opts
```python
from __init__ import parse_opts
```



---
## SubsettingError
```python
from __init__ import SubsettingError
```



---
## MissingGlyphsSubsettingError
```python
from __init__ import MissingGlyphsSubsettingError
```



---
## MissingUnicodesSubsettingError
```python
from __init__ import MissingUnicodesSubsettingError
```



---
## populate
```python
from __init__ import populate
```



---
## _prune_pre_subset
```python
from __init__ import _prune_pre_subset
```



---
## _closure_glyphs
```python
from __init__ import _closure_glyphs
```



---
## _subset_glyphs
```python
from __init__ import _subset_glyphs
```



---
## _prune_post_subset
```python
from __init__ import _prune_post_subset
```



---
## _sort_tables
```python
from __init__ import _sort_tables
```



---
## SetRuleData
```python
from __init__ import SetRuleData
```



---
## ChainSetRuleData
```python
from __init__ import ChainSetRuleData
```



---
## SetContextData
```python
from __init__ import SetContextData
```



---
## SetChainContextData
```python
from __init__ import SetChainContextData
```



---
## xpath
```python
from svg import xpath
```



---
## group_elements_by_id
```python
from svg import group_elements_by_id
```



---
## parse_css_declarations
```python
from svg import parse_css_declarations
```



---
## iter_referenced_ids
```python
from svg import iter_referenced_ids
```



---
## closure_element_ids
```python
from svg import closure_element_ids
```



---
## subset_elements
```python
from svg import subset_elements
```



---
## remap_glyph_ids
```python
from svg import remap_glyph_ids
```



---
## href_local_target
```python
from svg import href_local_target
```



---
## update_glyph_href_links
```python
from svg import update_glyph_href_links
```



---
## ranges
```python
from svg import ranges
```



---
## subset_glyphs
```python
from svg import subset_glyphs
```



---
## VoltLibError
```python
from error import VoltLibError
```



---
## SymbolTable
```python
from parser import SymbolTable
```



---
## OrderedSymbolTable
```python
from parser import OrderedSymbolTable
```



---
## make_lexer_
```python
from parser import make_lexer_
```



---
## parse_def_glyph_
```python
from parser import parse_def_glyph_
```



---
## parse_def_group_
```python
from parser import parse_def_group_
```



---
## parse_def_script_
```python
from parser import parse_def_script_
```



---
## parse_langsys_
```python
from parser import parse_langsys_
```



---
## parse_feature_
```python
from parser import parse_feature_
```



---
## parse_def_lookup_
```python
from parser import parse_def_lookup_
```



---
## parse_context_
```python
from parser import parse_context_
```



---
## parse_substitution_
```python
from parser import parse_substitution_
```



---
## parse_position_
```python
from parser import parse_position_
```



---
## parse_attach_
```python
from parser import parse_attach_
```



---
## parse_attach_cursive_
```python
from parser import parse_attach_cursive_
```



---
## parse_adjust_pair_
```python
from parser import parse_adjust_pair_
```



---
## parse_adjust_single_
```python
from parser import parse_adjust_single_
```



---
## parse_def_anchor_
```python
from parser import parse_def_anchor_
```



---
## parse_adjust_by_
```python
from parser import parse_adjust_by_
```



---
## parse_pos_
```python
from parser import parse_pos_
```



---
## parse_unicode_values_
```python
from parser import parse_unicode_values_
```



---
## parse_enum_
```python
from parser import parse_enum_
```



---
## parse_coverage_
```python
from parser import parse_coverage_
```



---
## resolve_group
```python
from parser import resolve_group
```



---
## glyph_range
```python
from parser import glyph_range
```



---
## parse_ppem_
```python
from parser import parse_ppem_
```



---
## parse_noarg_option_
```python
from parser import parse_noarg_option_
```



---
## parse_cmap_format
```python
from parser import parse_cmap_format
```



---
## is_cur_keyword_
```python
from parser import is_cur_keyword_
```



---
## expect_string_
```python
from parser import expect_string_
```



---
## expect_keyword_
```python
from parser import expect_keyword_
```



---
## expect_name_
```python
from parser import expect_name_
```



---
## expect_number_
```python
from parser import expect_number_
```



---
## advance_lexer_
```python
from parser import advance_lexer_
```



---
## enter_scope
```python
from parser import enter_scope
```



---
## exit_scope
```python
from parser import exit_scope
```



---
## define
```python
from parser import define
```



---
## resolve
```python
from parser import resolve
```



---
## range
```python
from parser import range
```



---
## next
```python
from lexer import next
```



---
## location_
```python
from lexer import location_
```



---
## next_
```python
from lexer import next_
```



---
## scan_over_
```python
from lexer import scan_over_
```



---
## scan_until_
```python
from lexer import scan_until_
```



---
## __name__
```python
from voltToFea import __name__
```

MS VOLT ``.vtp`` to AFDKO ``.fea`` OpenType Layout converter.

Usage
-----

To convert a VTP project file:


.. code-block:: sh

    $ fonttools voltLib.voltToFea input.vtp output.fea

It is also possible convert font files with `TSIV` table (as saved from Volt),
in this case the glyph names used in the Volt project will be mapped to the
actual glyph names in the font files when written to the feature file:

.. code-block:: sh

    $ fonttools voltLib.voltToFea input.ttf output.fea

The ``--quiet`` option can be used to suppress warnings.

The ``--traceback`` can be used to get Python traceback in case of exceptions,
instead of suppressing the traceback.


Limitations
-----------

* Not all VOLT features are supported, the script will error if it it
  encounters something it does not understand. Please report an issue if this
  happens.
* AFDKO feature file syntax for mark positioning is awkward and does not allow
  setting the mark coverage. It also defines mark anchors globally, as a result
  some mark positioning lookups might cover many marks than what was in the VOLT
  file. This should not be an issue in practice, but if it is then the only way
  is to modify the VOLT file or the generated feature file manually to use unique
  mark anchors for each lookup.
* VOLT allows subtable breaks in any lookup type, but AFDKO feature file
  implementations vary in their support; currently AFDKO’s makeOTF supports
  subtable breaks in pair positioning lookups only, while FontTools’ feaLib
  support it for most substitution lookups and only some positioning lookups.

---
## MarkClassDefinition
```python
from voltToFea import MarkClassDefinition
```



---
## Group
```python
from voltToFea import Group
```



---
## VoltToFea
```python
from voltToFea import VoltToFea
```



---
## main
```python
from voltToFea import main
```

Convert MS VOLT to AFDKO feature files.

---
## asFea
```python
from voltToFea import asFea
```



---
## __init__
```python
from voltToFea import __init__
```



---
## __lt__
```python
from voltToFea import __lt__
```



---
## _lookupName
```python
from voltToFea import _lookupName
```



---
## _className
```python
from voltToFea import _className
```



---
## _collectStatements
```python
from voltToFea import _collectStatements
```



---
## _buildFeatureFile
```python
from voltToFea import _buildFeatureFile
```



---
## convert
```python
from voltToFea import convert
```



---
## _glyphName
```python
from voltToFea import _glyphName
```



---
## _groupName
```python
from voltToFea import _groupName
```



---
## _coverage
```python
from voltToFea import _coverage
```



---
## _enum
```python
from voltToFea import _enum
```



---
## _context
```python
from voltToFea import _context
```



---
## _groupDefinition
```python
from voltToFea import _groupDefinition
```



---
## _glyphDefinition
```python
from voltToFea import _glyphDefinition
```



---
## _scriptDefinition
```python
from voltToFea import _scriptDefinition
```



---
## _settingDefinition
```python
from voltToFea import _settingDefinition
```



---
## _adjustment
```python
from voltToFea import _adjustment
```



---
## _anchor
```python
from voltToFea import _anchor
```



---
## _anchorDefinition
```python
from voltToFea import _anchorDefinition
```



---
## _gposLookup
```python
from voltToFea import _gposLookup
```



---
## _gposContextLookup
```python
from voltToFea import _gposContextLookup
```



---
## _gsubLookup
```python
from voltToFea import _gsubLookup
```



---
## _lookupDefinition
```python
from voltToFea import _lookupDefinition
```



---
## __name__
```python
from ast import __name__
```

Helpers for AST (Abstract Syntax Tree).

---
## Pos
```python
from ast import Pos
```



---
## Element
```python
from ast import Element
```

A base class representing "something" in a feature file.

---
## Statement
```python
from ast import Statement
```



---
## Expression
```python
from ast import Expression
```



---
## VoltFile
```python
from ast import VoltFile
```



---
## GlyphDefinition
```python
from ast import GlyphDefinition
```



---
## GroupDefinition
```python
from ast import GroupDefinition
```



---
## GlyphName
```python
from ast import GlyphName
```

A single glyph name, such as ``cedilla``.

---
## Enum
```python
from ast import Enum
```

An enum

---
## GroupName
```python
from ast import GroupName
```

A glyph group

---
## Range
```python
from ast import Range
```

A glyph range

---
## ScriptDefinition
```python
from ast import ScriptDefinition
```



---
## LangSysDefinition
```python
from ast import LangSysDefinition
```



---
## FeatureDefinition
```python
from ast import FeatureDefinition
```



---
## LookupDefinition
```python
from ast import LookupDefinition
```



---
## SubstitutionDefinition
```python
from ast import SubstitutionDefinition
```



---
## SubstitutionSingleDefinition
```python
from ast import SubstitutionSingleDefinition
```



---
## SubstitutionMultipleDefinition
```python
from ast import SubstitutionMultipleDefinition
```



---
## SubstitutionLigatureDefinition
```python
from ast import SubstitutionLigatureDefinition
```



---
## SubstitutionReverseChainingSingleDefinition
```python
from ast import SubstitutionReverseChainingSingleDefinition
```



---
## PositionAttachDefinition
```python
from ast import PositionAttachDefinition
```



---
## PositionAttachCursiveDefinition
```python
from ast import PositionAttachCursiveDefinition
```



---
## PositionAdjustPairDefinition
```python
from ast import PositionAdjustPairDefinition
```



---
## PositionAdjustSingleDefinition
```python
from ast import PositionAdjustSingleDefinition
```



---
## ContextDefinition
```python
from ast import ContextDefinition
```



---
## AnchorDefinition
```python
from ast import AnchorDefinition
```

A named anchor definition. (2.e.viii). ``name`` should be a string.

---
## SettingDefinition
```python
from ast import SettingDefinition
```



---
## __str__
```python
from ast import __str__
```



---
## __init__
```python
from ast import __init__
```



---
## build
```python
from ast import build
```

Call the ``start_feature`` callback on the builder object, visit
all the statements in this feature, and then call ``end_feature``.

---
## glyphSet
```python
from ast import glyphSet
```

The glyphs in this class as a tuple of :class:`GlyphName` objects.

---
## __iter__
```python
from ast import __iter__
```



---
## UnknownOptionError
```python
from options import UnknownOptionError
```



---
## set
```python
from options import set
```



---
## parse_opts
```python
from options import parse_opts
```



---
## __name__
```python
from cmap import __name__
```



---
## computeMegaGlyphOrder
```python
from cmap import computeMegaGlyphOrder
```

Modifies passed-in glyphOrders to reflect new glyph names.
Stores merger.glyphOrder.

---
## _glyphsAreSame
```python
from cmap import _glyphsAreSame
```



---
## _CmapUnicodePlatEncodings
```python
from cmap import _CmapUnicodePlatEncodings
```



---
## computeMegaCmap
```python
from cmap import computeMegaCmap
```

Sets merger.cmap and merger.glyphOrder.

---
## renameCFFCharStrings
```python
from cmap import renameCFFCharStrings
```

Rename topDictIndex charStrings based on glyphOrder.

---
## is_Default_Ignorable
```python
from unicode import is_Default_Ignorable
```



---
## equal
```python
from util import equal
```



---
## first
```python
from util import first
```



---
## recalculate
```python
from util import recalculate
```



---
## current_time
```python
from util import current_time
```



---
## bitwise_and
```python
from util import bitwise_and
```



---
## bitwise_or
```python
from util import bitwise_or
```



---
## avg_int
```python
from util import avg_int
```



---
## onlyExisting
```python
from util import onlyExisting
```

Returns a filter func that when called with a list,
only calls func on the non-NotImplemented items of the list,
and only so if there's at least one item remaining.
Otherwise returns NotImplemented.

---
## sumLists
```python
from util import sumLists
```



---
## sumDicts
```python
from util import sumDicts
```



---
## mergeBits
```python
from util import mergeBits
```



---
## AttendanceRecordingIdentityDict
```python
from util import AttendanceRecordingIdentityDict
```

A dictionary-like object that records indices of items actually accessed
from a list.

---
## GregariousIdentityDict
```python
from util import GregariousIdentityDict
```

A dictionary-like object that welcomes guests without reservations and
adds them to the end of the guest list.

---
## NonhashableDict
```python
from util import NonhashableDict
```

A dictionary-like object mapping objects to values.

---
## mergeLookupLists
```python
from layout import mergeLookupLists
```



---
## mergeFeatures
```python
from layout import mergeFeatures
```



---
## mergeFeatureLists
```python
from layout import mergeFeatureLists
```



---
## mergeLangSyses
```python
from layout import mergeLangSyses
```



---
## mergeScripts
```python
from layout import mergeScripts
```



---
## mergeScriptRecords
```python
from layout import mergeScriptRecords
```



---
## merge
```python
from layout import merge
```



---
## mapLookups
```python
from layout import mapLookups
```



---
## __merge_classify_context
```python
from layout import __merge_classify_context
```



---
## mapMarkFilteringSets
```python
from layout import mapMarkFilteringSets
```



---
## mapFeatures
```python
from layout import mapFeatures
```



---
## layoutPreMerge
```python
from layout import layoutPreMerge
```



---
## layoutPostMerge
```python
from layout import layoutPostMerge
```



---
## ContextHelper
```python
from layout import ContextHelper
```



---
## Merger
```python
from __init__ import Merger
```

Font merger.

This class merges multiple files into a single OpenType font, taking into
account complexities such as OpenType layout (``GSUB``/``GPOS``) tables and
cross-font metrics (for example ``hhea.ascent`` is set to the maximum value
across all the fonts).

If multiple glyphs map to the same Unicode value, and the glyphs are considered
sufficiently different (that is, they differ in any of paths, widths, or
height), then subsequent glyphs are renamed and a lookup in the ``locl``
feature will be created to disambiguate them. For example, if the arguments
are an Arabic font and a Latin font and both contain a set of parentheses,
the Latin glyphs will be renamed to ``parenleft.1`` and ``parenright.1``,
and a lookup will be inserted into the to ``locl`` feature (creating it if
necessary) under the ``latn`` script to substitute ``parenleft`` with
``parenleft.1`` etc.

Restrictions:

- All fonts must have the same units per em.
- If duplicate glyph disambiguation takes place as described above then the
  fonts must have a ``GSUB`` table.

Attributes:
        options: Currently unused.

---
## _openFonts
```python
from __init__ import _openFonts
```



---
## merge
```python
from __init__ import merge
```



---
## mergeObjects
```python
from __init__ import mergeObjects
```



---
## _preMerge
```python
from __init__ import _preMerge
```



---
## _postMerge
```python
from __init__ import _postMerge
```



---
## mergeOs2FsType
```python
from tables import mergeOs2FsType
```



---
## merge
```python
from tables import merge
```



---
## add_method
```python
from base import add_method
```

Returns a decorator function that adds a new method to one or
more classes.

---
## mergeObjects
```python
from base import mergeObjects
```



---
## merge
```python
from base import merge
```



---
## wrapper
```python
from base import wrapper
```



---
## Config
```python
from __init__ import Config
```

Access to configuration values, pluginmanager and plugin hooks.

:param PytestPluginManager pluginmanager:
    A pytest PluginManager.

:param InvocationParams invocation_params:
    Object containing parameters regarding the :func:`pytest.main`
    invocation.

---
## __name__
```python
from interpolatableTestContourOrder import __name__
```



---
## test_contour_order
```python
from interpolatableTestContourOrder import test_contour_order
```



---
## __name__
```python
from iup import __name__
```



---
## iup_segment
```python
from iup import iup_segment
```

Given two reference coordinates `rc1` & `rc2` and their respective
delta vectors `rd1` & `rd2`, returns interpolated deltas for the set of
coordinates `coords`.

---
## iup_contour
```python
from iup import iup_contour
```

For the contour given in `coords`, interpolate any missing
delta values in delta vector `deltas`.

Returns fully filled-out delta vector.

---
## iup_delta
```python
from iup import iup_delta
```

For the outline given in `coords`, with contour endpoints given
in sorted increasing order in `ends`, interpolate any missing
delta values in delta vector `deltas`.

Returns fully filled-out delta vector.

---
## can_iup_in_between
```python
from iup import can_iup_in_between
```

Return true if the deltas for points at `i` and `j` (`i < j`) can be
successfully used to interpolate deltas for points in between them within
provided error tolerance.

---
## _iup_contour_bound_forced_set
```python
from iup import _iup_contour_bound_forced_set
```

The forced set is a conservative set of points on the contour that must be encoded
explicitly (ie. cannot be interpolated).  Calculating this set allows for significantly
speeding up the dynamic-programming, as well as resolve circularity in DP.

The set is precise; that is, if an index is in the returned set, then there is no way
that IUP can generate delta for that point, given `coords` and `deltas`.

---
## _iup_contour_optimize_dp
```python
from iup import _iup_contour_optimize_dp
```

Straightforward Dynamic-Programming.  For each index i, find least-costly encoding of
points 0 to i where i is explicitly encoded.  We find this by considering all previous
explicit points j and check whether interpolation can fill points between j and i.

Note that solution always encodes last point explicitly.  Higher-level is responsible
for removing that restriction.

As major speedup, we stop looking further whenever we see a "forced" point.

---
## _rot_list
```python
from iup import _rot_list
```

Rotate list by k items forward.  Ie. item at position 0 will be
at position k in returned list.  Negative k is allowed.

---
## _rot_set
```python
from iup import _rot_set
```



---
## iup_contour_optimize
```python
from iup import iup_contour_optimize
```

For contour with coordinates `coords`, optimize a set of delta
values `deltas` within error `tolerance`.

Returns delta vector that has most number of None items instead of
the input delta.

---
## iup_delta_optimize
```python
from iup import iup_delta_optimize
```

For the outline given in `coords`, with contour endpoints given
in sorted increasing order in `ends`, optimize a set of delta
values `deltas` within error `tolerance`.

Returns delta vector that has most number of None items instead of
the input delta.

---
## __name__
```python
from plot import __name__
```

gr.Plot() component.

---
## stops
```python
from plot import stops
```



---
## _plotLocationsDots
```python
from plot import _plotLocationsDots
```



---
## plotLocations
```python
from plot import plotLocations
```



---
## _plotLocations2D
```python
from plot import _plotLocations2D
```



---
## _plotLocations3D
```python
from plot import _plotLocations3D
```



---
## plotDocument
```python
from plot import plotDocument
```



---
## _plotModelFromMasters2D
```python
from plot import _plotModelFromMasters2D
```



---
## _plotModelFromMasters3D
```python
from plot import _plotModelFromMasters3D
```



---
## plotModelFromMasters
```python
from plot import plotModelFromMasters
```

Plot a variation model and set of master values corresponding
to the locations to the model into a pyplot figure.  Variation
model must have axisOrder of size 1 or 2.

---
## main
```python
from plot import main
```



---
## addCFFVarStore
```python
from cff import addCFFVarStore
```



---
## convertCFFtoCFF2
```python
from cff import convertCFFtoCFF2
```



---
## conv_to_int
```python
from cff import conv_to_int
```



---
## get_private
```python
from cff import get_private
```



---
## merge_PrivateDicts
```python
from cff import merge_PrivateDicts
```

I step through the FontDicts in the FDArray of the varfont TopDict.
For each varfont FontDict:

* step through each key in FontDict.Private.
* For each key, step through each relevant source font Private dict, and
  build a list of values to blend.

The 'relevant' source fonts are selected by first getting the right
submodel using ``vsindex_dict[vsindex]``. The indices of the
``subModel.locations`` are mapped to source font list indices by
assuming the latter order is the same as the order of the
``var_model.locations``. I can then get the index of each subModel
location in the list of ``var_model.locations``.

---
## _cff_or_cff2
```python
from cff import _cff_or_cff2
```



---
## getfd_map
```python
from cff import getfd_map
```

Since a subset source font may have fewer FontDicts in their
FDArray than the default font, we have to match up the FontDicts in
the different fonts . We do this with the FDSelect array, and by
assuming that the same glyph will reference  matching FontDicts in
each source font. We return a mapping from fdIndex in the default
font to a dictionary which maps each master list index of each
region font to the equivalent fdIndex in the region font.

---
## merge_region_fonts
```python
from cff import merge_region_fonts
```



---
## _get_cs
```python
from cff import _get_cs
```



---
## _add_new_vsindex
```python
from cff import _add_new_vsindex
```



---
## merge_charstrings
```python
from cff import merge_charstrings
```



---
## CFFToCFF2OutlineExtractor
```python
from cff import CFFToCFF2OutlineExtractor
```

This class is used to remove the initial width from the CFF
charstring without trying to add the width to self.nominalWidthX,
which is None.

---
## MergeOutlineExtractor
```python
from cff import MergeOutlineExtractor
```

Used to extract the charstring commands - including hints - from a
CFF charstring in order to merge it as another set of region data
into a CFF2 variable font charstring.

---
## CFF2CharStringMergePen
```python
from cff import CFF2CharStringMergePen
```

Pen to merge Type 2 CharStrings.

---
## popallWidth
```python
from cff import popallWidth
```



---
## countHints
```python
from cff import countHints
```



---
## _hint_op
```python
from cff import _hint_op
```



---
## op_hstem
```python
from cff import op_hstem
```



---
## op_vstem
```python
from cff import op_vstem
```



---
## op_hstemhm
```python
from cff import op_hstemhm
```



---
## op_vstemhm
```python
from cff import op_vstemhm
```



---
## _get_hintmask
```python
from cff import _get_hintmask
```



---
## op_hintmask
```python
from cff import op_hintmask
```



---
## op_cntrmask
```python
from cff import op_cntrmask
```



---
## add_point
```python
from cff import add_point
```



---
## add_hint
```python
from cff import add_hint
```



---
## add_hintmask
```python
from cff import add_hintmask
```



---
## _moveTo
```python
from cff import _moveTo
```



---
## _lineTo
```python
from cff import _lineTo
```



---
## _curveToOne
```python
from cff import _curveToOne
```



---
## _closePath
```python
from cff import _closePath
```



---
## _endPath
```python
from cff import _endPath
```



---
## restart
```python
from cff import restart
```



---
## getCommands
```python
from cff import getCommands
```



---
## reorder_blend_args
```python
from cff import reorder_blend_args
```

We first re-order the master coordinate values.
For a moveto to lineto, the args are now arranged as::

        [ [master_0 x,y], [master_1 x,y], [master_2 x,y] ]

We re-arrange this to::

        [       [master_0 x, master_1 x, master_2 x],
                [master_0 y, master_1 y, master_2 y]
        ]

If the master values are all the same, we collapse the list to
as single value instead of a list.

We then convert this to::

        [ [master_0 x] + [x delta tuple] + [numBlends=1]
          [master_0 y] + [y delta tuple] + [numBlends=1]
        ]

---
## getCharString
```python
from cff import getCharString
```



---
## nonNone
```python
from models import nonNone
```



---
## allNone
```python
from models import allNone
```



---
## allEqualTo
```python
from models import allEqualTo
```



---
## allEqual
```python
from models import allEqual
```



---
## subList
```python
from models import subList
```



---
## normalizeValue
```python
from models import normalizeValue
```

Normalizes value based on a min/default/max triple.

>>> normalizeValue(400, (100, 400, 900))
0.0
>>> normalizeValue(100, (100, 400, 900))
-1.0
>>> normalizeValue(650, (100, 400, 900))
0.5

---
## normalizeLocation
```python
from models import normalizeLocation
```

Normalizes location based on axis min/default/max values from axes.

>>> axes = {"wght": (100, 400, 900)}
>>> normalizeLocation({"wght": 400}, axes)
{'wght': 0.0}
>>> normalizeLocation({"wght": 100}, axes)
{'wght': -1.0}
>>> normalizeLocation({"wght": 900}, axes)
{'wght': 1.0}
>>> normalizeLocation({"wght": 650}, axes)
{'wght': 0.5}
>>> normalizeLocation({"wght": 1000}, axes)
{'wght': 1.0}
>>> normalizeLocation({"wght": 0}, axes)
{'wght': -1.0}
>>> axes = {"wght": (0, 0, 1000)}
>>> normalizeLocation({"wght": 0}, axes)
{'wght': 0.0}
>>> normalizeLocation({"wght": -1}, axes)
{'wght': 0.0}
>>> normalizeLocation({"wght": 1000}, axes)
{'wght': 1.0}
>>> normalizeLocation({"wght": 500}, axes)
{'wght': 0.5}
>>> normalizeLocation({"wght": 1001}, axes)
{'wght': 1.0}
>>> axes = {"wght": (0, 1000, 1000)}
>>> normalizeLocation({"wght": 0}, axes)
{'wght': -1.0}
>>> normalizeLocation({"wght": -1}, axes)
{'wght': -1.0}
>>> normalizeLocation({"wght": 500}, axes)
{'wght': -0.5}
>>> normalizeLocation({"wght": 1000}, axes)
{'wght': 0.0}
>>> normalizeLocation({"wght": 1001}, axes)
{'wght': 0.0}

---
## supportScalar
```python
from models import supportScalar
```

Returns the scalar multiplier at location, for a master
with support.  If ot is True, then a peak value of zero
for support of an axis means "axis does not participate".  That
is how OpenType Variation Font technology works.

If extrapolate is True, axisRanges must be a dict that maps axis
names to (axisMin, axisMax) tuples.

  >>> supportScalar({}, {})
  1.0
  >>> supportScalar({'wght':.2}, {})
  1.0
  >>> supportScalar({'wght':.2}, {'wght':(0,2,3)})
  0.1
  >>> supportScalar({'wght':2.5}, {'wght':(0,2,4)})
  0.75
  >>> supportScalar({'wght':2.5, 'wdth':0}, {'wght':(0,2,4), 'wdth':(-1,0,+1)})
  0.75
  >>> supportScalar({'wght':2.5, 'wdth':.5}, {'wght':(0,2,4), 'wdth':(-1,0,+1)}, ot=False)
  0.375
  >>> supportScalar({'wght':2.5, 'wdth':0}, {'wght':(0,2,4), 'wdth':(-1,0,+1)})
  0.75
  >>> supportScalar({'wght':2.5, 'wdth':.5}, {'wght':(0,2,4), 'wdth':(-1,0,+1)})
  0.75
  >>> supportScalar({'wght':3}, {'wght':(0,1,2)}, extrapolate=True, axisRanges={'wght':(0, 2)})
  -1.0
  >>> supportScalar({'wght':-1}, {'wght':(0,1,2)}, extrapolate=True, axisRanges={'wght':(0, 2)})
  -1.0
  >>> supportScalar({'wght':3}, {'wght':(0,2,2)}, extrapolate=True, axisRanges={'wght':(0, 2)})
  1.5
  >>> supportScalar({'wght':-1}, {'wght':(0,2,2)}, extrapolate=True, axisRanges={'wght':(0, 2)})
  -0.5

---
## VariationModel
```python
from models import VariationModel
```

Locations must have the base master at the origin (ie. 0).

If axis-ranges are not provided, values are assumed to be normalized to
the range [-1, 1].

If the extrapolate argument is set to True, then values are extrapolated
outside the axis range.

  >>> from pprint import pprint
  >>> axisRanges = {'wght': (-180, +180), 'wdth': (-1, +1)}
  >>> locations = [       {'wght':100},       {'wght':-100},       {'wght':-180},       {'wdth':+.3},       {'wght':+120,'wdth':.3},       {'wght':+120,'wdth':.2},       {},       {'wght':+180,'wdth':.3},       {'wght':+180},       ]
  >>> model = VariationModel(locations, axisOrder=['wght'], axisRanges=axisRanges)
  >>> pprint(model.locations)
  [{},
   {'wght': -100},
   {'wght': -180},
   {'wght': 100},
   {'wght': 180},
   {'wdth': 0.3},
   {'wdth': 0.3, 'wght': 180},
   {'wdth': 0.3, 'wght': 120},
   {'wdth': 0.2, 'wght': 120}]
  >>> pprint(model.deltaWeights)
  [{},
   {0: 1.0},
   {0: 1.0},
   {0: 1.0},
   {0: 1.0},
   {0: 1.0},
   {0: 1.0, 4: 1.0, 5: 1.0},
   {0: 1.0, 3: 0.75, 4: 0.25, 5: 1.0, 6: 0.6666666666666666},
   {0: 1.0,
    3: 0.75,
    4: 0.25,
    5: 0.6666666666666667,
    6: 0.4444444444444445,
    7: 0.6666666666666667}]

---
## piecewiseLinearMap
```python
from models import piecewiseLinearMap
```



---
## main
```python
from models import main
```

Normalize locations on a given designspace

---
## getSubModel
```python
from models import getSubModel
```

Return a sub-model and the items that are not None.

The sub-model is necessary for working with the subset
of items when some are None.

The sub-model is cached.

---
## computeAxisRanges
```python
from models import computeAxisRanges
```



---
## getMasterLocationsSortKeyFunc
```python
from models import getMasterLocationsSortKeyFunc
```



---
## reorderMasters
```python
from models import reorderMasters
```



---
## _computeMasterSupports
```python
from models import _computeMasterSupports
```



---
## _locationsToRegions
```python
from models import _locationsToRegions
```



---
## _computeDeltaWeights
```python
from models import _computeDeltaWeights
```



---
## getDeltas
```python
from models import getDeltas
```



---
## getDeltasAndSupports
```python
from models import getDeltasAndSupports
```



---
## getScalars
```python
from models import getScalars
```

Return scalars for each delta, for the given location.
If interpolating many master-values at the same location,
this function allows speed up by fetching the scalars once
and using them with interpolateFromMastersAndScalars().

---
## getMasterScalars
```python
from models import getMasterScalars
```

Return multipliers for each master, for the given location.
If interpolating many master-values at the same location,
this function allows speed up by fetching the scalars once
and using them with interpolateFromValuesAndScalars().

Note that the scalars used in interpolateFromMastersAndScalars(),
are *not* the same as the ones returned here. They are the result
of getScalars().

---
## interpolateFromValuesAndScalars
```python
from models import interpolateFromValuesAndScalars
```

Interpolate from values and scalars coefficients.

If the values are master-values, then the scalars should be
fetched from getMasterScalars().

If the values are deltas, then the scalars should be fetched
from getScalars(); in which case this is the same as
interpolateFromDeltasAndScalars().

---
## interpolateFromDeltasAndScalars
```python
from models import interpolateFromDeltasAndScalars
```

Interpolate from deltas and scalars fetched from getScalars().

---
## interpolateFromDeltas
```python
from models import interpolateFromDeltas
```

Interpolate from deltas, at location loc.

---
## interpolateFromMasters
```python
from models import interpolateFromMasters
```

Interpolate from master-values, at location loc.

---
## interpolateFromMastersAndScalars
```python
from models import interpolateFromMastersAndScalars
```

Interpolate from master-values, and scalars fetched from
getScalars(), which is useful when you want to interpolate
multiple master-values with the same location.

---
## getKey
```python
from models import getKey
```



---
## sign
```python
from models import sign
```



---
## key
```python
from models import key
```



---
## __name__
```python
from avar import __name__
```



---
## _denormalize
```python
from avar import _denormalize
```



---
## _pruneLocations
```python
from avar import _pruneLocations
```



---
## mappings_from_avar
```python
from avar import mappings_from_avar
```



---
## main
```python
from avar import main
```

Add `avar` table from designspace file to variable font.

---
## _add_fvar
```python
from __init__ import _add_fvar
```

Add 'fvar' table to font.

axes is an ordered dictionary of DesignspaceAxis objects.

instances is list of dictionary objects with 'location', 'stylename',
and possibly 'postscriptfontname' entries.

---
## _add_avar
```python
from __init__ import _add_avar
```

Add 'avar' table to font.

axes is an ordered dictionary of AxisDescriptor objects.

---
## _add_stat
```python
from __init__ import _add_stat
```



---
## _add_gvar
```python
from __init__ import _add_gvar
```



---
## _remove_TTHinting
```python
from __init__ import _remove_TTHinting
```



---
## _merge_TTHinting
```python
from __init__ import _merge_TTHinting
```



---
## _add_HVAR
```python
from __init__ import _add_HVAR
```



---
## _add_VVAR
```python
from __init__ import _add_VVAR
```



---
## _add_VHVAR
```python
from __init__ import _add_VHVAR
```



---
## _get_advance_metrics
```python
from __init__ import _get_advance_metrics
```



---
## _add_MVAR
```python
from __init__ import _add_MVAR
```



---
## _add_BASE
```python
from __init__ import _add_BASE
```



---
## _merge_OTL
```python
from __init__ import _merge_OTL
```



---
## _add_GSUB_feature_variations
```python
from __init__ import _add_GSUB_feature_variations
```



---
## _add_CFF2
```python
from __init__ import _add_CFF2
```



---
## _add_COLR
```python
from __init__ import _add_COLR
```



---
## load_designspace
```python
from __init__ import load_designspace
```



---
## set_default_weight_width_slant
```python
from __init__ import set_default_weight_width_slant
```



---
## drop_implied_oncurve_points
```python
from __init__ import drop_implied_oncurve_points
```

Drop impliable on-curve points from all the simple glyphs in masters.

In TrueType glyf outlines, on-curve points can be implied when they are located
exactly at the midpoint of the line connecting two consecutive off-curve points.

The input masters' glyf tables are assumed to contain same-named glyphs that are
interpolatable. Oncurve points are only dropped if they can be implied for all
the masters. The fonts are modified in-place.

Args:
    masters: The TTFont(s) to modify

Returns:
    The total number of points that were dropped if any.

Reference:
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM01/Chap1.html

---
## build_many
```python
from __init__ import build_many
```

Build variable fonts from a designspace file, version 5 which can define
several VFs, or version 4 which has implicitly one VF covering the whole doc.

If master_finder is set, it should be a callable that takes master
filename as found in designspace file and map it to master font
binary as to be opened (eg. .ttf or .otf).

skip_vf can be used to skip building some of the variable fonts defined in
the input designspace. It's a predicate that takes as argument the name
of the variable font and returns `bool`.

Always returns a Dict[str, TTFont] keyed by VariableFontDescriptor.name

---
## build
```python
from __init__ import build
```

Main build method, usually called by a specific ``build_*`` method.

First updates the environment, and then calls
:meth:`!write`.

---
## _open_font
```python
from __init__ import _open_font
```



---
## load_masters
```python
from __init__ import load_masters
```

Ensure that all SourceDescriptor.font attributes have an appropriate TTFont
object loaded, or else open TTFont objects from the SourceDescriptor.path
attributes.

The paths can point to either an OpenType font, a TTX file, or a UFO. In the
latter case, use the provided master_finder callable to map from UFO paths to
the respective master font binaries (e.g. .ttf, .otf or .ttx).

Return list of master TTFont objects in the same order they are listed in the
DesignSpaceDocument.

---
## MasterFinder
```python
from __init__ import MasterFinder
```



---
## _feature_variations_tags
```python
from __init__ import _feature_variations_tags
```



---
## addGSUBFeatureVariations
```python
from __init__ import addGSUBFeatureVariations
```

Add GSUB FeatureVariations table to variable font, based on DesignSpace rules.

Args:
    vf: A TTFont object representing the variable font.
    designspace: A DesignSpaceDocument object.
    featureTags: Optional feature tag(s) to use for the FeatureVariations records.
        If unset, the key 'com.github.fonttools.varLib.featureVarsFeatureTag' is
        looked up in the DS <lib> and used; otherwise the default is 'rclt' if
        the <rules processing="last"> attribute is set, else 'rvrn'.
        See <https://fonttools.readthedocs.io/en/latest/designspaceLib/xml.html#rules-element>
    log_enabled: If True, log info about DS axes and sources. Default is False, as
        the same info may have already been logged as part of varLib.build.

---
## __name__
```python
from mutator import __name__
```

Instantiate a variation font.  Run, eg:

.. code-block:: sh

    $ fonttools varLib.mutator ./NotoSansArabic-VF.ttf wght=140 wdth=85

---
## interpolate_cff2_PrivateDict
```python
from mutator import interpolate_cff2_PrivateDict
```



---
## interpolate_cff2_charstrings
```python
from mutator import interpolate_cff2_charstrings
```



---
## interpolate_cff2_metrics
```python
from mutator import interpolate_cff2_metrics
```

Unlike TrueType glyphs, neither advance width nor bounding box
info is stored in a CFF2 charstring. The width data exists only in
the hmtx and HVAR tables. Since LSB data cannot be interpolated
reliably from the master LSB values in the hmtx table, we traverse
the charstring to determine the actual bound box.

---
## instantiateVariableFont
```python
from mutator import instantiateVariableFont
```

Generate a static instance from a variable TTFont and a dictionary
defining the desired location along the variable font's axes.
The location values must be specified as user-space coordinates, e.g.:

.. code-block::

    {'wght': 400, 'wdth': 100}

By default, a new TTFont object is returned. If ``inplace`` is True, the
input varfont is modified and reduced to a static font.

When the overlap parameter is defined as True,
OVERLAP_SIMPLE and OVERLAP_COMPOUND bits are set to 1.  See
https://docs.microsoft.com/en-us/typography/opentype/spec/glyf

---
## main
```python
from mutator import main
```

Instantiate a variation font

---
## __name__
```python
from interpolatablePlot import __name__
```



---
## OverridingDict
```python
from interpolatablePlot import OverridingDict
```



---
## InterpolatablePlot
```python
from interpolatablePlot import InterpolatablePlot
```



---
## InterpolatablePostscriptLike
```python
from interpolatablePlot import InterpolatablePostscriptLike
```



---
## InterpolatablePS
```python
from interpolatablePlot import InterpolatablePS
```



---
## InterpolatablePDF
```python
from interpolatablePlot import InterpolatablePDF
```



---
## InterpolatableSVG
```python
from interpolatablePlot import InterpolatableSVG
```



---
## __init__
```python
from interpolatablePlot import __init__
```



---
## __missing__
```python
from interpolatablePlot import __missing__
```



---
## __enter__
```python
from interpolatablePlot import __enter__
```



---
## __exit__
```python
from interpolatablePlot import __exit__
```



---
## show_page
```python
from interpolatablePlot import show_page
```



---
## add_title_page
```python
from interpolatablePlot import add_title_page
```



---
## draw_legend
```python
from interpolatablePlot import draw_legend
```



---
## add_summary
```python
from interpolatablePlot import add_summary
```



---
## _add_listing
```python
from interpolatablePlot import _add_listing
```



---
## add_table_of_contents
```python
from interpolatablePlot import add_table_of_contents
```



---
## add_index
```python
from interpolatablePlot import add_index
```



---
## add_problems
```python
from interpolatablePlot import add_problems
```



---
## add_problem
```python
from interpolatablePlot import add_problem
```



---
## draw_label
```python
from interpolatablePlot import draw_label
```



---
## draw_glyph
```python
from interpolatablePlot import draw_glyph
```



---
## draw_dot
```python
from interpolatablePlot import draw_dot
```



---
## draw_circle
```python
from interpolatablePlot import draw_circle
```



---
## draw_arrow
```python
from interpolatablePlot import draw_arrow
```



---
## draw_text
```python
from interpolatablePlot import draw_text
```



---
## draw_cupcake
```python
from interpolatablePlot import draw_cupcake
```



---
## draw_emoticon
```python
from interpolatablePlot import draw_emoticon
```



---
## buildVarRegionAxis
```python
from builder import buildVarRegionAxis
```



---
## buildSparseVarRegionAxis
```python
from builder import buildSparseVarRegionAxis
```



---
## buildVarRegion
```python
from builder import buildVarRegion
```



---
## buildSparseVarRegion
```python
from builder import buildSparseVarRegion
```



---
## buildVarRegionList
```python
from builder import buildVarRegionList
```



---
## buildSparseVarRegionList
```python
from builder import buildSparseVarRegionList
```



---
## _reorderItem
```python
from builder import _reorderItem
```



---
## VarData_calculateNumShorts
```python
from builder import VarData_calculateNumShorts
```



---
## VarData_CalculateNumShorts
```python
from builder import VarData_CalculateNumShorts
```

Deprecated name for VarData_calculateNumShorts() which
defaults to optimize=True.  Use varData.calculateNumShorts()
or varData.optimize().

---
## VarData_optimize
```python
from builder import VarData_optimize
```



---
## buildVarData
```python
from builder import buildVarData
```



---
## buildVarStore
```python
from builder import buildVarStore
```



---
## buildMultiVarData
```python
from builder import buildMultiVarData
```



---
## buildMultiVarStore
```python
from builder import buildMultiVarStore
```



---
## buildVarIdxMap
```python
from builder import buildVarIdxMap
```



---
## buildDeltaSetIndexMap
```python
from builder import buildDeltaSetIndexMap
```



---
## buildVarDevTable
```python
from builder import buildVarDevTable
```



---
## __name__
```python
from stat import __name__
```

Extra methods for DesignSpaceDocument to generate its STAT table data.

---
## buildVFStatTable
```python
from stat import buildVFStatTable
```

Build the STAT table for the variable font identified by its name in
the given document.

Knowing which variable we're building STAT data for is needed to subset
the STAT locations to only include what the variable font actually ships.

.. versionadded:: 5.0

.. seealso::
    - :func:`getStatAxes()`
    - :func:`getStatLocations()`
    - :func:`fontTools.otlLib.builder.buildStatTable()`

---
## getStatAxes
```python
from stat import getStatAxes
```

Return a list of axis dicts suitable for use as the ``axes``
argument to :func:`fontTools.otlLib.builder.buildStatTable()`.

.. versionadded:: 5.0

---
## getStatLocations
```python
from stat import getStatLocations
```

Return a list of location dicts suitable for use as the ``locations``
argument to :func:`fontTools.otlLib.builder.buildStatTable()`.

.. versionadded:: 5.0

---
## _labelToFlags
```python
from stat import _labelToFlags
```



---
## _axisLabelToStatLocation
```python
from stat import _axisLabelToStatLocation
```



---
## __name__
```python
from interpolatableHelpers import __name__
```



---
## InterpolatableProblem
```python
from interpolatableHelpers import InterpolatableProblem
```



---
## sort_problems
```python
from interpolatableHelpers import sort_problems
```

Sort problems by severity, then by glyph name, then by problem message.

---
## rot_list
```python
from interpolatableHelpers import rot_list
```

Rotate list by k items forward.  Ie. item at position 0 will be
at position k in returned list.  Negative k is allowed.

---
## PerContourPen
```python
from interpolatableHelpers import PerContourPen
```



---
## PerContourOrComponentPen
```python
from interpolatableHelpers import PerContourOrComponentPen
```



---
## SimpleRecordingPointPen
```python
from interpolatableHelpers import SimpleRecordingPointPen
```



---
## vdiff_hypot2
```python
from interpolatableHelpers import vdiff_hypot2
```



---
## vdiff_hypot2_complex
```python
from interpolatableHelpers import vdiff_hypot2_complex
```



---
## matching_cost
```python
from interpolatableHelpers import matching_cost
```



---
## min_cost_perfect_bipartite_matching_scipy
```python
from interpolatableHelpers import min_cost_perfect_bipartite_matching_scipy
```



---
## min_cost_perfect_bipartite_matching_munkres
```python
from interpolatableHelpers import min_cost_perfect_bipartite_matching_munkres
```



---
## min_cost_perfect_bipartite_matching_bruteforce
```python
from interpolatableHelpers import min_cost_perfect_bipartite_matching_bruteforce
```



---
## contour_vector_from_stats
```python
from interpolatableHelpers import contour_vector_from_stats
```



---
## matching_for_vectors
```python
from interpolatableHelpers import matching_for_vectors
```



---
## points_characteristic_bits
```python
from interpolatableHelpers import points_characteristic_bits
```



---
## points_complex_vector
```python
from interpolatableHelpers import points_complex_vector
```



---
## add_isomorphisms
```python
from interpolatableHelpers import add_isomorphisms
```



---
## find_parents_and_order
```python
from interpolatableHelpers import find_parents_and_order
```



---
## transform_from_stats
```python
from interpolatableHelpers import transform_from_stats
```



---
## __init__
```python
from interpolatableHelpers import __init__
```



---
## _moveTo
```python
from interpolatableHelpers import _moveTo
```



---
## _lineTo
```python
from interpolatableHelpers import _lineTo
```



---
## _qCurveToOne
```python
from interpolatableHelpers import _qCurveToOne
```



---
## _curveToOne
```python
from interpolatableHelpers import _curveToOne
```



---
## _closePath
```python
from interpolatableHelpers import _closePath
```



---
## _endPath
```python
from interpolatableHelpers import _endPath
```



---
## _newItem
```python
from interpolatableHelpers import _newItem
```



---
## addComponent
```python
from interpolatableHelpers import addComponent
```



---
## beginPath
```python
from interpolatableHelpers import beginPath
```



---
## endPath
```python
from interpolatableHelpers import endPath
```



---
## addPoint
```python
from interpolatableHelpers import addPoint
```



---
## __name__
```python
from interpolatableTestStartingPoint import __name__
```



---
## test_starting_point
```python
from interpolatableTestStartingPoint import test_starting_point
```



---
## __name__
```python
from varStore import __name__
```



---
## _getLocationKey
```python
from varStore import _getLocationKey
```



---
## OnlineVarStoreBuilder
```python
from varStore import OnlineVarStoreBuilder
```



---
## VarData_addItem
```python
from varStore import VarData_addItem
```



---
## VarRegion_get_support
```python
from varStore import VarRegion_get_support
```



---
## VarStore___bool__
```python
from varStore import VarStore___bool__
```



---
## VarStoreInstancer
```python
from varStore import VarStoreInstancer
```



---
## VarStore_subset_varidxes
```python
from varStore import VarStore_subset_varidxes
```



---
## VarStore_prune_regions
```python
from varStore import VarStore_prune_regions
```

Remove unused VarRegions.

---
## _visit
```python
from varStore import _visit
```

Recurse down from self, if type of an object is ot.Device,
call func() on it.  Works on otData-style classes.

---
## _Device_recordVarIdx
```python
from varStore import _Device_recordVarIdx
```

Add VarIdx in this Device table (if any) to the set s.

---
## Object_collect_device_varidxes
```python
from varStore import Object_collect_device_varidxes
```



---
## _Device_mapVarIdx
```python
from varStore import _Device_mapVarIdx
```

Map VarIdx in this Device table (if any) through mapping.

---
## Object_remap_device_varidxes
```python
from varStore import Object_remap_device_varidxes
```



---
## _Encoding
```python
from varStore import _Encoding
```



---
## _EncodingDict
```python
from varStore import _EncodingDict
```



---
## VarStore_optimize
```python
from varStore import VarStore_optimize
```

Optimize storage. Returns mapping from old VarIdxes to new ones.

---
## main
```python
from varStore import main
```

Optimize a font's GDEF variation store

---
## __init__
```python
from varStore import __init__
```



---
## setModel
```python
from varStore import setModel
```



---
## setSupports
```python
from varStore import setSupports
```



---
## finish
```python
from varStore import finish
```



---
## _add_VarData
```python
from varStore import _add_VarData
```



---
## storeMasters
```python
from varStore import storeMasters
```



---
## storeMastersMany
```python
from varStore import storeMastersMany
```



---
## storeDeltas
```python
from varStore import storeDeltas
```



---
## storeDeltasMany
```python
from varStore import storeDeltasMany
```



---
## setLocation
```python
from varStore import setLocation
```



---
## _clearCaches
```python
from varStore import _clearCaches
```



---
## _getScalar
```python
from varStore import _getScalar
```



---
## interpolateFromDeltasAndScalars
```python
from varStore import interpolateFromDeltasAndScalars
```



---
## __getitem__
```python
from varStore import __getitem__
```



---
## interpolateFromDeltas
```python
from varStore import interpolateFromDeltas
```



---
## append
```python
from varStore import append
```



---
## extend
```python
from varStore import extend
```



---
## get_room
```python
from varStore import get_room
```

Maximum number of bytes that can be added to characteristic
while still being beneficial to merge it into another one.

---
## get_gain
```python
from varStore import get_gain
```

Maximum possible byte gain from merging this into another
characteristic.

---
## gain_sort_key
```python
from varStore import gain_sort_key
```



---
## width_sort_key
```python
from varStore import width_sort_key
```



---
## _characteristic_overhead
```python
from varStore import _characteristic_overhead
```

Returns overhead in bytes of encoding this characteristic
as a VarData.

---
## _columns
```python
from varStore import _columns
```



---
## gain_from_merging
```python
from varStore import gain_from_merging
```



---
## __missing__
```python
from varStore import __missing__
```



---
## add_row
```python
from varStore import add_row
```



---
## _row_characteristics
```python
from varStore import _row_characteristics
```

Returns encoding characteristics for a row.

---
## __name__
```python
from interpolatable import __name__
```

Tool to find wrong contour order between different masters, and
other interpolatability (or lack thereof) issues.

Call as:
$ fonttools varLib.interpolatable font1 font2 ...

---
## Glyph
```python
from interpolatable import Glyph
```



---
## test_gen
```python
from interpolatable import test_gen
```



---
## test
```python
from interpolatable import test
```



---
## recursivelyAddGlyph
```python
from interpolatable import recursivelyAddGlyph
```



---
## ensure_parent_dir
```python
from interpolatable import ensure_parent_dir
```



---
## main
```python
from interpolatable import main
```

Test for interpolatability issues between fonts

---
## __init__
```python
from interpolatable import __init__
```



---
## _fill_in
```python
from interpolatable import _fill_in
```



---
## _populate
```python
from interpolatable import _populate
```



---
## draw
```python
from interpolatable import draw
```



---
## grand_parent
```python
from interpolatable import grand_parent
```



---
## __name__
```python
from avarPlanner import __name__
```



---
## normalizeLinear
```python
from avarPlanner import normalizeLinear
```

Linearly normalize value in [rangeMin, rangeMax] to [0, 1], with extrapolation.

---
## interpolateLinear
```python
from avarPlanner import interpolateLinear
```

Linear interpolation between a and b, with t typically in [0, 1].

---
## normalizeLog
```python
from avarPlanner import normalizeLog
```

Logarithmically normalize value in [rangeMin, rangeMax] to [0, 1], with extrapolation.

---
## interpolateLog
```python
from avarPlanner import interpolateLog
```

Logarithmic interpolation between a and b, with t typically in [0, 1].

---
## normalizeDegrees
```python
from avarPlanner import normalizeDegrees
```

Angularly normalize value in [rangeMin, rangeMax] to [0, 1], with extrapolation.

---
## measureWeight
```python
from avarPlanner import measureWeight
```

Measure the perceptual average weight of the given glyphs.

---
## measureWidth
```python
from avarPlanner import measureWidth
```

Measure the average width of the given glyphs.

---
## measureSlant
```python
from avarPlanner import measureSlant
```

Measure the perceptual average slant angle of the given glyphs.

---
## sanitizeWidth
```python
from avarPlanner import sanitizeWidth
```

Sanitize the width axis limits.

---
## sanitizeWeight
```python
from avarPlanner import sanitizeWeight
```

Sanitize the weight axis limits.

---
## sanitizeSlant
```python
from avarPlanner import sanitizeSlant
```

Sanitize the slant axis limits.

---
## planAxis
```python
from avarPlanner import planAxis
```

Plan an axis.

measureFunc: callable that takes a glyphset and an optional
list of glyphnames, and returns the glyphset-wide measurement
to be used for the axis.

normalizeFunc: callable that takes a measurement and a minimum
and maximum, and normalizes the measurement into the range 0..1,
possibly extrapolating too.

interpolateFunc: callable that takes a normalized t value, and a
minimum and maximum, and returns the interpolated value,
possibly extrapolating too.

glyphSetFunc: callable that takes a variations "location" dictionary,
and returns a glyphset.

axisTag: the axis tag string.

axisLimits: a triple of minimum, default, and maximum values for
the axis. Or an `fvar` Axis object.

values: a list of output values to map for this axis.

samples: the number of samples to use when sampling. Default 8.

glyphs: a list of glyph names to use when sampling. Defaults to None,
which will process all glyphs.

designLimits: an optional triple of minimum, default, and maximum values
represenging the "design" limits for the axis. If not provided, the
axisLimits will be used.

pins: an optional dictionary of before/after mapping entries to pin in
the output.

sanitizeFunc: an optional callable to call to sanitize the axis limits.

---
## planWeightAxis
```python
from avarPlanner import planWeightAxis
```

Plan a weight (`wght`) axis.

weights: A list of weight values to plan for. If None, the default
values are used.

This function simply calls planAxis with values=weights, and the appropriate
arguments. See documenation for planAxis for more information.

---
## planWidthAxis
```python
from avarPlanner import planWidthAxis
```

Plan a width (`wdth`) axis.

widths: A list of width values (percentages) to plan for. If None, the default
values are used.

This function simply calls planAxis with values=widths, and the appropriate
arguments. See documenation for planAxis for more information.

---
## planSlantAxis
```python
from avarPlanner import planSlantAxis
```

Plan a slant (`slnt`) axis.

slants: A list slant angles to plan for. If None, the default
values are used.

This function simply calls planAxis with values=slants, and the appropriate
arguments. See documenation for planAxis for more information.

---
## planOpticalSizeAxis
```python
from avarPlanner import planOpticalSizeAxis
```

Plan a optical-size (`opsz`) axis.

sizes: A list of optical size values to plan for. If None, the default
values are used.

This function simply calls planAxis with values=sizes, and the appropriate
arguments. See documenation for planAxis for more information.

---
## makeDesignspaceSnippet
```python
from avarPlanner import makeDesignspaceSnippet
```

Make a designspace snippet for a single axis.

---
## addEmptyAvar
```python
from avarPlanner import addEmptyAvar
```

Add an empty `avar` table to the font.

---
## processAxis
```python
from avarPlanner import processAxis
```

Process a single axis.

---
## main
```python
from avarPlanner import main
```

Plan the standard axis mappings for a variable font

---
## __name__
```python
from mvar import __name__
```



---
## VarLibError
```python
from errors import VarLibError
```

Base exception for the varLib module.

---
## VarLibValidationError
```python
from errors import VarLibValidationError
```

Raised when input data is invalid from varLib's point of view.

---
## VarLibMergeError
```python
from errors import VarLibMergeError
```

Raised when input data cannot be merged into a variable font.

---
## ShouldBeConstant
```python
from errors import ShouldBeConstant
```

some values were different, but should have been the same

---
## FoundANone
```python
from errors import FoundANone
```

one of the values in a list was empty when it shouldn't have been

---
## NotANone
```python
from errors import NotANone
```

one of the values in a list was not empty when it should have been

---
## MismatchedTypes
```python
from errors import MismatchedTypes
```

data had inconsistent types

---
## LengthsDiffer
```python
from errors import LengthsDiffer
```

a list of objects had inconsistent lengths

---
## KeysDiffer
```python
from errors import KeysDiffer
```

a list of objects had different keys

---
## InconsistentGlyphOrder
```python
from errors import InconsistentGlyphOrder
```

the glyph order was inconsistent between masters

---
## InconsistentExtensions
```python
from errors import InconsistentExtensions
```

the masters use extension lookups in inconsistent ways

---
## UnsupportedFormat
```python
from errors import UnsupportedFormat
```

an OpenType subtable (%s) had a format I didn't expect

---
## InconsistentFormats
```python
from errors import InconsistentFormats
```

an OpenType subtable (%s) had inconsistent formats between masters

---
## VarLibCFFMergeError
```python
from errors import VarLibCFFMergeError
```



---
## VarLibCFFDictMergeError
```python
from errors import VarLibCFFDictMergeError
```

Raised when a CFF PrivateDict cannot be merged.

---
## VarLibCFFPointTypeMergeError
```python
from errors import VarLibCFFPointTypeMergeError
```

Raised when a CFF glyph cannot be merged because of point type differences.

---
## VarLibCFFHintTypeMergeError
```python
from errors import VarLibCFFHintTypeMergeError
```

Raised when a CFF glyph cannot be merged because of hint type differences.

---
## VariationModelError
```python
from errors import VariationModelError
```

Raised when a variation model is faulty.

---
## reason
```python
from errors import reason
```



---
## _master_name
```python
from errors import _master_name
```



---
## offender
```python
from errors import offender
```



---
## details
```python
from errors import details
```



---
## __name__
```python
from featureVars import __name__
```



---
## addFeatureVariations
```python
from featureVars import addFeatureVariations
```

Add conditional substitutions to a Variable Font.

The `conditionalSubstitutions` argument is a list of (Region, Substitutions)
tuples.

A Region is a list of Boxes. A Box is a dict mapping axisTags to
(minValue, maxValue) tuples. Irrelevant axes may be omitted and they are
interpretted as extending to end of axis in each direction.  A Box represents
an orthogonal 'rectangular' subset of an N-dimensional design space.
A Region represents a more complex subset of an N-dimensional design space,
ie. the union of all the Boxes in the Region.
For efficiency, Boxes within a Region should ideally not overlap, but
functionality is not compromised if they do.

The minimum and maximum values are expressed in normalized coordinates.

A Substitution is a dict mapping source glyph names to substitute glyph names.

Example:

# >>> f = TTFont(srcPath)
# >>> condSubst = [
# ...     # A list of (Region, Substitution) tuples.
# ...     ([{"wdth": (0.5, 1.0)}], {"cent": "cent.rvrn"}),
# ...     ([{"wght": (0.5, 1.0)}], {"dollar": "dollar.rvrn"}),
# ... ]
# >>> addFeatureVariations(f, condSubst)
# >>> f.save(dstPath)

The `featureTag` parameter takes either a str or a iterable of str (the single str
is kept for backwards compatibility), and defines which feature(s) will be
associated with the feature variations.
Note, if this is "rvrn", then the substitution lookup will be inserted at the
beginning of the lookup list so that it is processed before others, otherwise
for any other feature tags it will be appended last.

---
## _existingVariableFeatures
```python
from featureVars import _existingVariableFeatures
```



---
## _checkSubstitutionGlyphsExist
```python
from featureVars import _checkSubstitutionGlyphsExist
```



---
## overlayFeatureVariations
```python
from featureVars import overlayFeatureVariations
```

Compute overlaps between all conditional substitutions.

The `conditionalSubstitutions` argument is a list of (Region, Substitutions)
tuples.

A Region is a list of Boxes. A Box is a dict mapping axisTags to
(minValue, maxValue) tuples. Irrelevant axes may be omitted and they are
interpretted as extending to end of axis in each direction.  A Box represents
an orthogonal 'rectangular' subset of an N-dimensional design space.
A Region represents a more complex subset of an N-dimensional design space,
ie. the union of all the Boxes in the Region.
For efficiency, Boxes within a Region should ideally not overlap, but
functionality is not compromised if they do.

The minimum and maximum values are expressed in normalized coordinates.

A Substitution is a dict mapping source glyph names to substitute glyph names.

Returns data is in similar but different format.  Overlaps of distinct
substitution Boxes (*not* Regions) are explicitly listed as distinct rules,
and rules with the same Box merged.  The more specific rules appear earlier
in the resulting list.  Moreover, instead of just a dictionary of substitutions,
a list of dictionaries is returned for substitutions corresponding to each
unique space, with each dictionary being identical to one of the input
substitution dictionaries.  These dictionaries are not merged to allow data
sharing when they are converted into font tables.

Example::

    >>> condSubst = [
    ...     # A list of (Region, Substitution) tuples.
    ...     ([{"wght": (0.5, 1.0)}], {"dollar": "dollar.rvrn"}),
    ...     ([{"wght": (0.5, 1.0)}], {"dollar": "dollar.rvrn"}),
    ...     ([{"wdth": (0.5, 1.0)}], {"cent": "cent.rvrn"}),
    ...     ([{"wght": (0.5, 1.0), "wdth": (-1, 1.0)}], {"dollar": "dollar.rvrn"}),
    ... ]
    >>> from pprint import pprint
    >>> pprint(overlayFeatureVariations(condSubst))
    [({'wdth': (0.5, 1.0), 'wght': (0.5, 1.0)},
      [{'dollar': 'dollar.rvrn'}, {'cent': 'cent.rvrn'}]),
     ({'wdth': (0.5, 1.0)}, [{'cent': 'cent.rvrn'}]),
     ({'wght': (0.5, 1.0)}, [{'dollar': 'dollar.rvrn'}])]

---
## overlayBox
```python
from featureVars import overlayBox
```

Overlays ``top`` box on top of ``bot`` box.

Returns two items:

* Box for intersection of ``top`` and ``bot``, or None if they don't intersect.
* Box for remainder of ``bot``.  Remainder box might not be exact (since the
  remainder might not be a simple box), but is inclusive of the exact
  remainder.

---
## cleanupBox
```python
from featureVars import cleanupBox
```

Return a sparse copy of `box`, without redundant (default) values.

>>> cleanupBox({})
{}
>>> cleanupBox({'wdth': (0.0, 1.0)})
{'wdth': (0.0, 1.0)}
>>> cleanupBox({'wdth': (-1.0, 1.0)})
{}

---
## addFeatureVariationsRaw
```python
from featureVars import addFeatureVariationsRaw
```

Low level implementation of addFeatureVariations that directly
models the possibilities of the FeatureVariations table.

---
## buildGSUB
```python
from featureVars import buildGSUB
```

Build a GSUB table from scratch.

---
## makeSubstitutionsHashable
```python
from featureVars import makeSubstitutionsHashable
```

Turn all the substitution dictionaries in sorted tuples of tuples so
they are hashable, to detect duplicates so we don't write out redundant
data.

---
## ShifterVisitor
```python
from featureVars import ShifterVisitor
```



---
## visit
```python
from featureVars import visit
```



---
## buildSubstitutionLookups
```python
from featureVars import buildSubstitutionLookups
```

Build the lookups for the glyph substitutions, return a dict mapping
the substitution to lookup indices.

---
## buildFeatureVariations
```python
from featureVars import buildFeatureVariations
```

Build the FeatureVariations subtable.

---
## buildFeatureRecord
```python
from featureVars import buildFeatureRecord
```

Build a FeatureRecord.

---
## buildFeatureVariationRecord
```python
from featureVars import buildFeatureVariationRecord
```

Build a FeatureVariationRecord.

---
## buildFeatureTableSubstitutionRecord
```python
from featureVars import buildFeatureTableSubstitutionRecord
```

Build a FeatureTableSubstitutionRecord.

---
## buildConditionTable
```python
from featureVars import buildConditionTable
```

Build a ConditionTable.

---
## findFeatureVariationRecord
```python
from featureVars import findFeatureVariationRecord
```

Find a FeatureVariationRecord that has the same conditionTable.

---
## sortFeatureList
```python
from featureVars import sortFeatureList
```

Sort the feature list by feature tag, and remap the feature indices
elsewhere. This is needed after the feature list has been modified.

---
## remapFeatures
```python
from featureVars import remapFeatures
```

Go through the scripts list, and remap feature indices.

---
## _remapLangSys
```python
from featureVars import _remapLangSys
```



---
## __init__
```python
from featureVars import __init__
```



---
## __name__
```python
from interpolate_layout import __name__
```

Interpolate OpenType Layout tables (GDEF / GPOS / GSUB).

---
## interpolate_layout
```python
from interpolate_layout import interpolate_layout
```

Interpolate GPOS from a designspace file and location.

If master_finder is set, it should be a callable that takes master
filename as found in designspace file and map it to master font
binary as to be opened (eg. .ttf or .otf).

If mapped is False (default), then location is mapped using the
map element of the axes in designspace file.  If mapped is True,
it is assumed that location is in designspace's internal space and
no mapping is performed.

---
## main
```python
from interpolate_layout import main
```

Interpolate GDEF/GPOS/GSUB tables for a point on a designspace

---
## __name__
```python
from merger import __name__
```

Merge OpenType Layout tables (GDEF / GPOS / GSUB).

---
## Merger
```python
from merger import Merger
```



---
## AligningMerger
```python
from merger import AligningMerger
```



---
## merge
```python
from merger import merge
```



---
## _SinglePosUpgradeToFormat2
```python
from merger import _SinglePosUpgradeToFormat2
```



---
## _merge_GlyphOrders
```python
from merger import _merge_GlyphOrders
```

Takes font and list of glyph lists (must be sorted by glyph id), and returns
two things:
- Combined glyph list,
- If values_lst is None, return input glyph lists, but padded with None when a glyph
  was missing in a list.  Otherwise, return values_lst list-of-list, padded with None
  to match combined glyph lists.

---
## _Lookup_SinglePos_get_effective_value
```python
from merger import _Lookup_SinglePos_get_effective_value
```



---
## _Lookup_PairPos_get_effective_value_pair
```python
from merger import _Lookup_PairPos_get_effective_value_pair
```



---
## _PairPosFormat1_merge
```python
from merger import _PairPosFormat1_merge
```



---
## _ClassDef_invert
```python
from merger import _ClassDef_invert
```



---
## _ClassDef_merge_classify
```python
from merger import _ClassDef_merge_classify
```



---
## _PairPosFormat2_align_matrices
```python
from merger import _PairPosFormat2_align_matrices
```



---
## _PairPosFormat2_merge
```python
from merger import _PairPosFormat2_merge
```



---
## _MarkBasePosFormat1_merge
```python
from merger import _MarkBasePosFormat1_merge
```



---
## _PairSet_flatten
```python
from merger import _PairSet_flatten
```



---
## _Lookup_PairPosFormat1_subtables_flatten
```python
from merger import _Lookup_PairPosFormat1_subtables_flatten
```



---
## _Lookup_PairPosFormat2_subtables_flatten
```python
from merger import _Lookup_PairPosFormat2_subtables_flatten
```



---
## _Lookup_PairPos_subtables_canonicalize
```python
from merger import _Lookup_PairPos_subtables_canonicalize
```

Merge multiple Format1 subtables at the beginning of lst,
and merge multiple consecutive Format2 subtables that have the same
Class2 (ie. were split because of offset overflows).  Returns new list.

---
## _Lookup_SinglePos_subtables_flatten
```python
from merger import _Lookup_SinglePos_subtables_flatten
```



---
## InstancerMerger
```python
from merger import InstancerMerger
```

A merger that takes multiple master fonts, and instantiates
an instance.

---
## MutatorMerger
```python
from merger import MutatorMerger
```

A merger that takes a variable font, and instantiates
an instance.  While there's no "merging" to be done per se,
the operation can benefit from many operations that the
aligning merger does.

---
## VariationMerger
```python
from merger import VariationMerger
```

A merger that takes multiple master fonts, and builds a
variable font.

---
## buildVarDevTable
```python
from merger import buildVarDevTable
```



---
## COLRVariationMerger
```python
from merger import COLRVariationMerger
```

A specialized VariationMerger that takes multiple master fonts containing
COLRv1 tables, and builds a variable COLR font.

COLR tables are special in that variable subtables can be associated with
multiple delta-set indices (via VarIndexBase).
They also contain tables that must change their type (not simply the Format)
as they become variable (e.g. Affine2x3 -> VarAffine2x3) so this merger takes
care of that too.

---
## _flatten_layers
```python
from merger import _flatten_layers
```



---
## _merge_PaintColrLayers
```python
from merger import _merge_PaintColrLayers
```



---
## __init__
```python
from merger import __init__
```



---
## merger
```python
from merger import merger
```



---
## mergersFor
```python
from merger import mergersFor
```



---
## mergeObjects
```python
from merger import mergeObjects
```



---
## mergeLists
```python
from merger import mergeLists
```



---
## mergeThings
```python
from merger import mergeThings
```



---
## mergeTables
```python
from merger import mergeTables
```



---
## setModel
```python
from merger import setModel
```



---
## checkFormatEnum
```python
from merger import checkFormatEnum
```



---
## mergeSparseDict
```python
from merger import mergeSparseDict
```



---
## mergeAttrs
```python
from merger import mergeAttrs
```



---
## storeMastersForAttr
```python
from merger import storeMastersForAttr
```



---
## storeVariationIndices
```python
from merger import storeVariationIndices
```



---
## mergeVariableAttrs
```python
from merger import mergeVariableAttrs
```



---
## convertSubTablesToVarType
```python
from merger import convertSubTablesToVarType
```



---
## expandPaintColrLayers
```python
from merger import expandPaintColrLayers
```

Rebuild LayerList without PaintColrLayers reuse.

Each base paint graph is fully DFS-traversed (with exception of PaintColrGlyph
which are irrelevant for this); any layers referenced via PaintColrLayers are
collected into a new LayerList and duplicated when reuse is detected, to ensure
that all paints are distinct objects at the end of the process.
PaintColrLayers's FirstLayerIndex/NumLayers are updated so that no overlap
is left. Also, any consecutively nested PaintColrLayers are flattened.
The COLR table's LayerList is replaced with the new unique layers.
A side effect is also that any layer from the old LayerList which is not
referenced by any PaintColrLayers is dropped.

---
## listToColrLayers
```python
from merger import listToColrLayers
```



---
## wrapper
```python
from merger import wrapper
```



---
## __name__
```python
from multiVarStore import __name__
```



---
## _getLocationKey
```python
from multiVarStore import _getLocationKey
```



---
## OnlineMultiVarStoreBuilder
```python
from multiVarStore import OnlineMultiVarStoreBuilder
```



---
## MultiVarData_addItem
```python
from multiVarStore import MultiVarData_addItem
```



---
## SparseVarRegion_get_support
```python
from multiVarStore import SparseVarRegion_get_support
```



---
## MultiVarStore___bool__
```python
from multiVarStore import MultiVarStore___bool__
```



---
## MultiVarStoreInstancer
```python
from multiVarStore import MultiVarStoreInstancer
```



---
## MultiVarStore_subset_varidxes
```python
from multiVarStore import MultiVarStore_subset_varidxes
```



---
## MultiVarStore_prune_regions
```python
from multiVarStore import MultiVarStore_prune_regions
```



---
## MultiVarStore_get_supports
```python
from multiVarStore import MultiVarStore_get_supports
```



---
## VARC_collect_varidxes
```python
from multiVarStore import VARC_collect_varidxes
```



---
## VARC_remap_varidxes
```python
from multiVarStore import VARC_remap_varidxes
```



---
## __init__
```python
from multiVarStore import __init__
```



---
## setModel
```python
from multiVarStore import setModel
```



---
## setSupports
```python
from multiVarStore import setSupports
```



---
## finish
```python
from multiVarStore import finish
```



---
## _add_MultiVarData
```python
from multiVarStore import _add_MultiVarData
```



---
## storeMasters
```python
from multiVarStore import storeMasters
```



---
## storeDeltas
```python
from multiVarStore import storeDeltas
```



---
## setLocation
```python
from multiVarStore import setLocation
```



---
## _clearCaches
```python
from multiVarStore import _clearCaches
```



---
## _getScalar
```python
from multiVarStore import _getScalar
```



---
## interpolateFromDeltasAndScalars
```python
from multiVarStore import interpolateFromDeltasAndScalars
```



---
## __getitem__
```python
from multiVarStore import __getitem__
```



---
## interpolateFromDeltas
```python
from multiVarStore import interpolateFromDeltas
```



---
## MtiLibError
```python
from __init__ import MtiLibError
```



---
## ReferenceNotFoundError
```python
from __init__ import ReferenceNotFoundError
```



---
## FeatureNotFoundError
```python
from __init__ import FeatureNotFoundError
```



---
## LookupNotFoundError
```python
from __init__ import LookupNotFoundError
```



---
## makeGlyph
```python
from __init__ import makeGlyph
```



---
## makeGlyphs
```python
from __init__ import makeGlyphs
```



---
## mapLookup
```python
from __init__ import mapLookup
```



---
## mapFeature
```python
from __init__ import mapFeature
```



---
## setReference
```python
from __init__ import setReference
```



---
## DeferredMapping
```python
from __init__ import DeferredMapping
```



---
## parseScriptList
```python
from __init__ import parseScriptList
```



---
## parseFeatureList
```python
from __init__ import parseFeatureList
```



---
## parseLookupFlags
```python
from __init__ import parseLookupFlags
```



---
## parseSingleSubst
```python
from __init__ import parseSingleSubst
```



---
## parseMultiple
```python
from __init__ import parseMultiple
```



---
## parseAlternate
```python
from __init__ import parseAlternate
```



---
## parseLigature
```python
from __init__ import parseLigature
```



---
## parseSinglePos
```python
from __init__ import parseSinglePos
```



---
## parsePair
```python
from __init__ import parsePair
```



---
## parseKernset
```python
from __init__ import parseKernset
```



---
## makeAnchor
```python
from __init__ import makeAnchor
```



---
## parseCursive
```python
from __init__ import parseCursive
```



---
## makeMarkRecords
```python
from __init__ import makeMarkRecords
```



---
## makeBaseRecords
```python
from __init__ import makeBaseRecords
```



---
## makeLigatureRecords
```python
from __init__ import makeLigatureRecords
```



---
## parseMarkToSomething
```python
from __init__ import parseMarkToSomething
```



---
## MarkHelper
```python
from __init__ import MarkHelper
```



---
## MarkToBaseHelper
```python
from __init__ import MarkToBaseHelper
```



---
## MarkToMarkHelper
```python
from __init__ import MarkToMarkHelper
```



---
## MarkToLigatureHelper
```python
from __init__ import MarkToLigatureHelper
```



---
## parseMarkToBase
```python
from __init__ import parseMarkToBase
```



---
## parseMarkToMark
```python
from __init__ import parseMarkToMark
```



---
## parseMarkToLigature
```python
from __init__ import parseMarkToLigature
```



---
## stripSplitComma
```python
from __init__ import stripSplitComma
```



---
## intSplitComma
```python
from __init__ import intSplitComma
```



---
## parseLookupRecords
```python
from __init__ import parseLookupRecords
```



---
## makeClassDef
```python
from __init__ import makeClassDef
```



---
## parseClassDef
```python
from __init__ import parseClassDef
```



---
## makeCoverage
```python
from __init__ import makeCoverage
```



---
## parseCoverage
```python
from __init__ import parseCoverage
```



---
## bucketizeRules
```python
from __init__ import bucketizeRules
```



---
## parseContext
```python
from __init__ import parseContext
```



---
## parseContextSubst
```python
from __init__ import parseContextSubst
```



---
## parseContextPos
```python
from __init__ import parseContextPos
```



---
## parseChainedSubst
```python
from __init__ import parseChainedSubst
```



---
## parseChainedPos
```python
from __init__ import parseChainedPos
```



---
## parseReverseChainedSubst
```python
from __init__ import parseReverseChainedSubst
```



---
## parseLookup
```python
from __init__ import parseLookup
```



---
## parseGSUBGPOS
```python
from __init__ import parseGSUBGPOS
```



---
## parseGSUB
```python
from __init__ import parseGSUB
```



---
## parseGPOS
```python
from __init__ import parseGPOS
```



---
## parseAttachList
```python
from __init__ import parseAttachList
```



---
## parseCaretList
```python
from __init__ import parseCaretList
```



---
## makeMarkFilteringSets
```python
from __init__ import makeMarkFilteringSets
```



---
## parseMarkFilteringSets
```python
from __init__ import parseMarkFilteringSets
```



---
## parseGDEF
```python
from __init__ import parseGDEF
```



---
## parseCmap
```python
from __init__ import parseCmap
```



---
## parseCmapId
```python
from __init__ import parseCmapId
```



---
## parseTable
```python
from __init__ import parseTable
```



---
## Tokenizer
```python
from __init__ import Tokenizer
```



---
## addDeferredMapping
```python
from __init__ import addDeferredMapping
```



---
## applyDeferredMappings
```python
from __init__ import applyDeferredMappings
```



---
## _next_line
```python
from __init__ import _next_line
```



---
## _next_nonempty
```python
from __init__ import _next_nonempty
```



---
## _next_buffered
```python
from __init__ import _next_buffered
```



---
## next
```python
from __init__ import next
```



---
## peeks
```python
from __init__ import peeks
```



---
## between
```python
from __init__ import between
```

Return a listener that either keeps, or if *exclude* is True excludes,
lines between lines that match the *marker* regular expression.  If no line
matches, the resulting docstring would be empty, so no change will be made
unless *keepempty* is true.

If *what* is a sequence of strings, only docstrings of a type in *what* will
be processed.

---
## until
```python
from __init__ import until
```



---
## expect
```python
from __init__ import expect
```



---
## expectendswith
```python
from __init__ import expectendswith
```



---
## __name__
```python
from qtPen import __name__
```



---
## QtPen
```python
from qtPen import QtPen
```



---
## __init__
```python
from qtPen import __init__
```



---
## _moveTo
```python
from qtPen import _moveTo
```



---
## _lineTo
```python
from qtPen import _lineTo
```



---
## _curveToOne
```python
from qtPen import _curveToOne
```



---
## _qCurveToOne
```python
from qtPen import _qCurveToOne
```



---
## _closePath
```python
from qtPen import _closePath
```



---
## __name__
```python
from qu2cuPen import __name__
```



---
## Qu2CuPen
```python
from qu2cuPen import Qu2CuPen
```

A filter pen to convert quadratic bezier splines to cubic curves
using the FontTools SegmentPen protocol.

Args:

    other_pen: another SegmentPen used to draw the transformed outline.
    max_err: maximum approximation error in font units. For optimal results,
        if you know the UPEM of the font, we recommend setting this to a
        value equal, or close to UPEM / 1000.
    reverse_direction: flip the contours' direction but keep starting point.
    stats: a dictionary counting the point numbers of cubic segments.

---
## __init__
```python
from qu2cuPen import __init__
```



---
## _quadratics_to_curve
```python
from qu2cuPen import _quadratics_to_curve
```



---
## filterContour
```python
from qu2cuPen import filterContour
```



---
## __name__
```python
from cocoaPen import __name__
```



---
## CocoaPen
```python
from cocoaPen import CocoaPen
```



---
## __init__
```python
from cocoaPen import __init__
```



---
## _moveTo
```python
from cocoaPen import _moveTo
```



---
## _lineTo
```python
from cocoaPen import _lineTo
```



---
## _curveToOne
```python
from cocoaPen import _curveToOne
```



---
## _closePath
```python
from cocoaPen import _closePath
```



---
## __name__
```python
from t2CharStringPen import __name__
```



---
## T2CharStringPen
```python
from t2CharStringPen import T2CharStringPen
```

Pen to draw Type 2 CharStrings.

The 'roundTolerance' argument controls the rounding of point coordinates.
It is defined as the maximum absolute difference between the original
float and the rounded integer value.
The default tolerance of 0.5 means that all floats are rounded to integer;
a value of 0 disables rounding; values in between will only round floats
which are close to their integral part within the tolerated range.

---
## __init__
```python
from t2CharStringPen import __init__
```



---
## _p
```python
from t2CharStringPen import _p
```



---
## _moveTo
```python
from t2CharStringPen import _moveTo
```



---
## _lineTo
```python
from t2CharStringPen import _lineTo
```



---
## _curveToOne
```python
from t2CharStringPen import _curveToOne
```



---
## _closePath
```python
from t2CharStringPen import _closePath
```



---
## _endPath
```python
from t2CharStringPen import _endPath
```



---
## getCharString
```python
from t2CharStringPen import getCharString
```



---
## __name__
```python
from pointPen import __name__
```

DEPRECATED - This module is kept here only as a backward compatibility shim
for the old ufoLib.pointPen module, which was moved to fontTools.pens.pointPen.
Please use the latter instead.

---
## AbstractPointPen
```python
from pointPen import AbstractPointPen
```

Baseclass for all PointPens.

---
## BasePointToSegmentPen
```python
from pointPen import BasePointToSegmentPen
```

Base class for retrieving the outline in a segment-oriented
way. The PointPen protocol is simple yet also a little tricky,
so when you need an outline presented as segments but you have
as points, do use this base implementation as it properly takes
care of all the edge cases.

---
## PointToSegmentPen
```python
from pointPen import PointToSegmentPen
```

Adapter class that converts the PointPen protocol to the
(Segment)Pen protocol.

NOTE: The segment pen does not support and will drop point names, identifiers
and kwargs.

---
## SegmentToPointPen
```python
from pointPen import SegmentToPointPen
```

Adapter class that converts the (Segment)Pen protocol to the
PointPen protocol.

---
## GuessSmoothPointPen
```python
from pointPen import GuessSmoothPointPen
```

Filtering PointPen that tries to determine whether an on-curve point
should be "smooth", ie. that it's a "tangent" point or a "curve" point.

---
## ReverseContourPointPen
```python
from pointPen import ReverseContourPointPen
```

This is a PointPen that passes outline data to another PointPen, but
reversing the winding direction of all contours. Components are simply
passed through unchanged.

Closed contours are reversed in such a way that the first point remains
the first point.

---
## DecomposingPointPen
```python
from pointPen import DecomposingPointPen
```

Implements a 'addComponent' method that decomposes components
(i.e. draws them onto self as simple contours).
It can also be used as a mixin class (e.g. see DecomposingRecordingPointPen).

You must override beginPath, addPoint, endPath. You may
additionally override addVarComponent and addComponent.

By default a warning message is logged when a base glyph is missing;
set the class variable ``skipMissingComponents`` to False if you want
all instances of a sub-class to raise a :class:`MissingComponentError`
exception by default.

---
## beginPath
```python
from pointPen import beginPath
```



---
## endPath
```python
from pointPen import endPath
```



---
## addPoint
```python
from pointPen import addPoint
```



---
## addComponent
```python
from pointPen import addComponent
```

Transform the points of the base glyph and draw it onto self.

The `identifier` parameter and any extra kwargs are ignored.

---
## addVarComponent
```python
from pointPen import addVarComponent
```



---
## __init__
```python
from pointPen import __init__
```

Takes a 'glyphSet' argument (dict), in which the glyphs that are referenced
as components are looked up by their name.

If the optional 'reverseFlipped' argument is True, components whose transformation
matrix has a negative determinant will be decomposed with a reversed path direction
to compensate for the flip.

The optional 'skipMissingComponents' argument can be set to True/False to
override the homonymous class attribute for a given pen instance.

---
## _flushContour
```python
from pointPen import _flushContour
```



---
## moveTo
```python
from pointPen import moveTo
```



---
## lineTo
```python
from pointPen import lineTo
```



---
## curveTo
```python
from pointPen import curveTo
```



---
## qCurveTo
```python
from pointPen import qCurveTo
```



---
## closePath
```python
from pointPen import closePath
```



---
## __name__
```python
from transformPen import __name__
```



---
## TransformPen
```python
from transformPen import TransformPen
```

Pen that transforms all coordinates using a Affine transformation,
and passes them to another pen.

---
## TransformPointPen
```python
from transformPen import TransformPointPen
```

PointPen that transforms all coordinates using a Affine transformation,
and passes them to another PointPen.

For example::

    >>> from fontTools.pens.recordingPen import RecordingPointPen
    >>> rec = RecordingPointPen()
    >>> pen = TransformPointPen(rec, (2, 0, 0, 2, -10, 5))
    >>> v = iter(rec.value)
    >>> pen.beginPath(identifier="contour-0")
    >>> next(v)
    ('beginPath', (), {'identifier': 'contour-0'})

    >>> pen.addPoint((100, 100), "line")
    >>> next(v)
    ('addPoint', ((190, 205), 'line', False, None), {})

    >>> pen.endPath()
    >>> next(v)
    ('endPath', (), {})

    >>> pen.addComponent("a", (1, 0, 0, 1, -10, 5), identifier="component-0")
    >>> next(v)
    ('addComponent', ('a', <Transform [2 0 0 2 -30 15]>), {'identifier': 'component-0'})

---
## __init__
```python
from transformPen import __init__
```

The 'outPointPen' argument is another point pen object.
It will receive the transformed coordinates.
The 'transformation' argument can either be a six-tuple, or a
fontTools.misc.transform.Transform object.

---
## moveTo
```python
from transformPen import moveTo
```



---
## lineTo
```python
from transformPen import lineTo
```



---
## curveTo
```python
from transformPen import curveTo
```



---
## qCurveTo
```python
from transformPen import qCurveTo
```



---
## _transformPoints
```python
from transformPen import _transformPoints
```



---
## closePath
```python
from transformPen import closePath
```



---
## endPath
```python
from transformPen import endPath
```



---
## addComponent
```python
from transformPen import addComponent
```



---
## addPoint
```python
from transformPen import addPoint
```



---
## __name__
```python
from reportLabPen import __name__
```



---
## ReportLabPen
```python
from reportLabPen import ReportLabPen
```

A pen for drawing onto a ``reportlab.graphics.shapes.Path`` object.

---
## __init__
```python
from reportLabPen import __init__
```



---
## _moveTo
```python
from reportLabPen import _moveTo
```



---
## _lineTo
```python
from reportLabPen import _lineTo
```



---
## _curveToOne
```python
from reportLabPen import _curveToOne
```



---
## _closePath
```python
from reportLabPen import _closePath
```



---
## __name__
```python
from filterPen import __name__
```



---
## _PassThruComponentsMixin
```python
from filterPen import _PassThruComponentsMixin
```



---
## FilterPen
```python
from filterPen import FilterPen
```

Base class for pens that apply some transformation to the coordinates
they receive and pass them to another pen.

You can override any of its methods. The default implementation does
nothing, but passes the commands unmodified to the other pen.

>>> from fontTools.pens.recordingPen import RecordingPen
>>> rec = RecordingPen()
>>> pen = FilterPen(rec)
>>> v = iter(rec.value)

>>> pen.moveTo((0, 0))
>>> next(v)
('moveTo', ((0, 0),))

>>> pen.lineTo((1, 1))
>>> next(v)
('lineTo', ((1, 1),))

>>> pen.curveTo((2, 2), (3, 3), (4, 4))
>>> next(v)
('curveTo', ((2, 2), (3, 3), (4, 4)))

>>> pen.qCurveTo((5, 5), (6, 6), (7, 7), (8, 8))
>>> next(v)
('qCurveTo', ((5, 5), (6, 6), (7, 7), (8, 8)))

>>> pen.closePath()
>>> next(v)
('closePath', ())

>>> pen.moveTo((9, 9))
>>> next(v)
('moveTo', ((9, 9),))

>>> pen.endPath()
>>> next(v)
('endPath', ())

>>> pen.addComponent('foo', (1, 0, 0, 1, 0, 0))
>>> next(v)
('addComponent', ('foo', (1, 0, 0, 1, 0, 0)))

---
## ContourFilterPen
```python
from filterPen import ContourFilterPen
```

A "buffered" filter pen that accumulates contour data, passes
it through a ``filterContour`` method when the contour is closed or ended,
and finally draws the result with the output pen.

Components are passed through unchanged.

---
## FilterPointPen
```python
from filterPen import FilterPointPen
```

Baseclass for point pens that apply some transformation to the
coordinates they receive and pass them to another point pen.

You can override any of its methods. The default implementation does
nothing, but passes the commands unmodified to the other pen.

>>> from fontTools.pens.recordingPen import RecordingPointPen
>>> rec = RecordingPointPen()
>>> pen = FilterPointPen(rec)
>>> v = iter(rec.value)
>>> pen.beginPath(identifier="abc")
>>> next(v)
('beginPath', (), {'identifier': 'abc'})
>>> pen.addPoint((1, 2), "line", False)
>>> next(v)
('addPoint', ((1, 2), 'line', False, None), {})
>>> pen.addComponent("a", (2, 0, 0, 2, 10, -10), identifier="0001")
>>> next(v)
('addComponent', ('a', (2, 0, 0, 2, 10, -10)), {'identifier': '0001'})
>>> pen.endPath()
>>> next(v)
('endPath', (), {})

---
## _DecomposingFilterPenMixin
```python
from filterPen import _DecomposingFilterPenMixin
```

Mixin class that decomposes components as regular contours.

Shared by both DecomposingFilterPen and DecomposingFilterPointPen.

Takes two required parameters, another (segment or point) pen 'outPen' to draw
with, and a 'glyphSet' dict of drawable glyph objects to draw components from.

The 'skipMissingComponents' and 'reverseFlipped' optional arguments work the
same as in the DecomposingPen/DecomposingPointPen. Both are False by default.

In addition, the decomposing filter pens also take the following two options:

'include' is an optional set of component base glyph names to consider for
decomposition; the default include=None means decompose all components no matter
the base glyph name).

'decomposeNested' (bool) controls whether to recurse decomposition into nested
components of components (this only matters when 'include' was also provided);
if False, only decompose top-level components included in the set, but not
also their children.

---
## DecomposingFilterPen
```python
from filterPen import DecomposingFilterPen
```

Filter pen that draws components as regular contours.

---
## DecomposingFilterPointPen
```python
from filterPen import DecomposingFilterPointPen
```

Filter point pen that draws components as regular contours.

---
## addComponent
```python
from filterPen import addComponent
```



---
## __init__
```python
from filterPen import __init__
```



---
## moveTo
```python
from filterPen import moveTo
```



---
## lineTo
```python
from filterPen import lineTo
```



---
## curveTo
```python
from filterPen import curveTo
```



---
## qCurveTo
```python
from filterPen import qCurveTo
```



---
## closePath
```python
from filterPen import closePath
```



---
## endPath
```python
from filterPen import endPath
```



---
## _flushContour
```python
from filterPen import _flushContour
```



---
## filterContour
```python
from filterPen import filterContour
```

Subclasses must override this to perform the filtering.

The contour is a list of pen (operator, operands) tuples.
Operators are strings corresponding to the AbstractPen methods:
"moveTo", "lineTo", "curveTo", "qCurveTo", "closePath" and
"endPath". The operands are the positional arguments that are
passed to each method.

If the method doesn't return a value (i.e. returns None), it's
assumed that the argument was modified in-place.
Otherwise, the return value is drawn with the output pen.

---
## beginPath
```python
from filterPen import beginPath
```



---
## addPoint
```python
from filterPen import addPoint
```



---
## __name__
```python
from areaPen import __name__
```

Calculate the area of a glyph.

---
## AreaPen
```python
from areaPen import AreaPen
```



---
## __init__
```python
from areaPen import __init__
```



---
## _moveTo
```python
from areaPen import _moveTo
```



---
## _lineTo
```python
from areaPen import _lineTo
```



---
## _qCurveToOne
```python
from areaPen import _qCurveToOne
```



---
## _curveToOne
```python
from areaPen import _curveToOne
```



---
## _closePath
```python
from areaPen import _closePath
```



---
## _endPath
```python
from areaPen import _endPath
```



---
## __name__
```python
from teePen import __name__
```

Pen multiplexing drawing to one or more pens.

---
## TeePen
```python
from teePen import TeePen
```

Pen multiplexing drawing to one or more pens.

Use either as TeePen(pen1, pen2, ...) or TeePen(iterableOfPens).

---
## __init__
```python
from teePen import __init__
```



---
## moveTo
```python
from teePen import moveTo
```



---
## lineTo
```python
from teePen import lineTo
```



---
## qCurveTo
```python
from teePen import qCurveTo
```



---
## curveTo
```python
from teePen import curveTo
```



---
## closePath
```python
from teePen import closePath
```



---
## endPath
```python
from teePen import endPath
```



---
## addComponent
```python
from teePen import addComponent
```



---
## __name__
```python
from basePen import __name__
```

fontTools.pens.basePen.py -- Tools and base classes to build pen objects.

The Pen Protocol

A Pen is a kind of object that standardizes the way how to "draw" outlines:
it is a middle man between an outline and a drawing. In other words:
it is an abstraction for drawing outlines, making sure that outline objects
don't need to know the details about how and where they're being drawn, and
that drawings don't need to know the details of how outlines are stored.

The most basic pattern is this::

        outline.draw(pen)  # 'outline' draws itself onto 'pen'

Pens can be used to render outlines to the screen, but also to construct
new outlines. Eg. an outline object can be both a drawable object (it has a
draw() method) as well as a pen itself: you *build* an outline using pen
methods.

The AbstractPen class defines the Pen protocol. It implements almost
nothing (only no-op closePath() and endPath() methods), but is useful
for documentation purposes. Subclassing it basically tells the reader:
"this class implements the Pen protocol.". An examples of an AbstractPen
subclass is :py:class:`fontTools.pens.transformPen.TransformPen`.

The BasePen class is a base implementation useful for pens that actually
draw (for example a pen renders outlines using a native graphics engine).
BasePen contains a lot of base functionality, making it very easy to build
a pen that fully conforms to the pen protocol. Note that if you subclass
BasePen, you *don't* override moveTo(), lineTo(), etc., but _moveTo(),
_lineTo(), etc. See the BasePen doc string for details. Examples of
BasePen subclasses are fontTools.pens.boundsPen.BoundsPen and
fontTools.pens.cocoaPen.CocoaPen.

Coordinates are usually expressed as (x, y) tuples, but generally any
sequence of length 2 will do.

---
## PenError
```python
from basePen import PenError
```

Represents an error during penning.

---
## OpenContourError
```python
from basePen import OpenContourError
```



---
## AbstractPen
```python
from basePen import AbstractPen
```



---
## NullPen
```python
from basePen import NullPen
```

A pen that does nothing.

---
## LoggingPen
```python
from basePen import LoggingPen
```

A pen with a ``log`` property (see fontTools.misc.loggingTools.LogMixin)

---
## MissingComponentError
```python
from basePen import MissingComponentError
```

Indicates a component pointing to a non-existent glyph in the glyphset.

---
## DecomposingPen
```python
from basePen import DecomposingPen
```

Implements a 'addComponent' method that decomposes components
(i.e. draws them onto self as simple contours).
It can also be used as a mixin class (e.g. see ContourRecordingPen).

You must override moveTo, lineTo, curveTo and qCurveTo. You may
additionally override closePath, endPath and addComponent.

By default a warning message is logged when a base glyph is missing;
set the class variable ``skipMissingComponents`` to False if you want
all instances of a sub-class to raise a :class:`MissingComponentError`
exception by default.

---
## BasePen
```python
from basePen import BasePen
```

Base class for drawing pens. You must override _moveTo, _lineTo and
_curveToOne. You may additionally override _closePath, _endPath,
addComponent, addVarComponent, and/or _qCurveToOne. You should not
override any other methods.

---
## decomposeSuperBezierSegment
```python
from basePen import decomposeSuperBezierSegment
```

Split the SuperBezier described by 'points' into a list of regular
bezier segments. The 'points' argument must be a sequence with length
3 or greater, containing (x, y) coordinates. The last point is the
destination on-curve point, the rest of the points are off-curve points.
The start point should not be supplied.

This function returns a list of (pt1, pt2, pt3) tuples, which each
specify a regular curveto-style bezier segment.

---
## decomposeQuadraticSegment
```python
from basePen import decomposeQuadraticSegment
```

Split the quadratic curve segment described by 'points' into a list
of "atomic" quadratic segments. The 'points' argument must be a sequence
with length 2 or greater, containing (x, y) coordinates. The last point
is the destination on-curve point, the rest of the points are off-curve
points. The start point should not be supplied.

This function returns a list of (pt1, pt2) tuples, which each specify a
plain quadratic bezier segment.

---
## _TestPen
```python
from basePen import _TestPen
```

Test class that prints PostScript to stdout.

---
## moveTo
```python
from basePen import moveTo
```



---
## lineTo
```python
from basePen import lineTo
```



---
## curveTo
```python
from basePen import curveTo
```



---
## qCurveTo
```python
from basePen import qCurveTo
```



---
## closePath
```python
from basePen import closePath
```



---
## endPath
```python
from basePen import endPath
```



---
## addComponent
```python
from basePen import addComponent
```

Transform the points of the base glyph and draw it onto self.

---
## addVarComponent
```python
from basePen import addVarComponent
```



---
## __init__
```python
from basePen import __init__
```



---
## _moveTo
```python
from basePen import _moveTo
```



---
## _lineTo
```python
from basePen import _lineTo
```



---
## _curveToOne
```python
from basePen import _curveToOne
```



---
## _closePath
```python
from basePen import _closePath
```



---
## _endPath
```python
from basePen import _endPath
```



---
## _qCurveToOne
```python
from basePen import _qCurveToOne
```

This method implements the basic quadratic curve type. The
default implementation delegates the work to the cubic curve
function. Optionally override with a native implementation.

---
## _getCurrentPoint
```python
from basePen import _getCurrentPoint
```

Return the current point. This is not part of the public
interface, yet is useful for subclasses.

---
## __name__
```python
from pointInsidePen import __name__
```

fontTools.pens.pointInsidePen -- Pen implementing "point inside" testing
for shapes.

---
## PointInsidePen
```python
from pointInsidePen import PointInsidePen
```

This pen implements "point inside" testing: to test whether
a given point lies inside the shape (black) or outside (white).
Instances of this class can be recycled, as long as the
setTestPoint() method is used to set the new point to test.

:Example:
    .. code-block::

        pen = PointInsidePen(glyphSet, (100, 200))
        outline.draw(pen)
        isInside = pen.getResult()

Both the even-odd algorithm and the non-zero-winding-rule
algorithm are implemented. The latter is the default, specify
True for the evenOdd argument of __init__ or setTestPoint
to use the even-odd algorithm.

---
## __init__
```python
from pointInsidePen import __init__
```



---
## setTestPoint
```python
from pointInsidePen import setTestPoint
```

Set the point to test. Call this _before_ the outline gets drawn.

---
## getWinding
```python
from pointInsidePen import getWinding
```



---
## getResult
```python
from pointInsidePen import getResult
```

After the shape has been drawn, getResult() returns True if the test
point lies within the (black) shape, and False if it doesn't.

---
## _addIntersection
```python
from pointInsidePen import _addIntersection
```



---
## _moveTo
```python
from pointInsidePen import _moveTo
```



---
## _lineTo
```python
from pointInsidePen import _lineTo
```



---
## _curveToOne
```python
from pointInsidePen import _curveToOne
```



---
## _qCurveToOne_unfinished
```python
from pointInsidePen import _qCurveToOne_unfinished
```



---
## _closePath
```python
from pointInsidePen import _closePath
```



---
## _endPath
```python
from pointInsidePen import _endPath
```

Insideness is not defined for open contours.

---
## __name__
```python
from cu2quPen import __name__
```



---
## Cu2QuPen
```python
from cu2quPen import Cu2QuPen
```

A filter pen to convert cubic bezier curves to quadratic b-splines
using the FontTools SegmentPen protocol.

Args:

    other_pen: another SegmentPen used to draw the transformed outline.
    max_err: maximum approximation error in font units. For optimal results,
        if you know the UPEM of the font, we recommend setting this to a
        value equal, or close to UPEM / 1000.
    reverse_direction: flip the contours' direction but keep starting point.
    stats: a dictionary counting the point numbers of quadratic segments.
    all_quadratic: if True (default), only quadratic b-splines are generated.
        if False, quadratic curves or cubic curves are generated depending
        on which one is more economical.

---
## Cu2QuPointPen
```python
from cu2quPen import Cu2QuPointPen
```

A filter pen to convert cubic bezier curves to quadratic b-splines
using the FontTools PointPen protocol.

Args:
    other_point_pen: another PointPen used to draw the transformed outline.
    max_err: maximum approximation error in font units. For optimal results,
        if you know the UPEM of the font, we recommend setting this to a
        value equal, or close to UPEM / 1000.
    reverse_direction: reverse the winding direction of all contours.
    stats: a dictionary counting the point numbers of quadratic segments.
    all_quadratic: if True (default), only quadratic b-splines are generated.
        if False, quadratic curves or cubic curves are generated depending
        on which one is more economical.

---
## Cu2QuMultiPen
```python
from cu2quPen import Cu2QuMultiPen
```

A filter multi-pen to convert cubic bezier curves to quadratic b-splines
in a interpolation-compatible manner, using the FontTools SegmentPen protocol.

Args:

    other_pens: list of SegmentPens used to draw the transformed outlines.
    max_err: maximum approximation error in font units. For optimal results,
        if you know the UPEM of the font, we recommend setting this to a
        value equal, or close to UPEM / 1000.
    reverse_direction: flip the contours' direction but keep starting point.

This pen does not follow the normal SegmentPen protocol. Instead, its
moveTo/lineTo/qCurveTo/curveTo methods take a list of tuples that are
arguments that would normally be passed to a SegmentPen, one item for
each of the pens in other_pens.

---
## __init__
```python
from cu2quPen import __init__
```



---
## _convert_curve
```python
from cu2quPen import _convert_curve
```



---
## curveTo
```python
from cu2quPen import curveTo
```



---
## _flushContour
```python
from cu2quPen import _flushContour
```



---
## _split_super_bezier_segments
```python
from cu2quPen import _split_super_bezier_segments
```



---
## _drawPoints
```python
from cu2quPen import _drawPoints
```



---
## addComponent
```python
from cu2quPen import addComponent
```



---
## _check_contour_is_open
```python
from cu2quPen import _check_contour_is_open
```



---
## _check_contour_is_closed
```python
from cu2quPen import _check_contour_is_closed
```



---
## _add_moveTo
```python
from cu2quPen import _add_moveTo
```



---
## moveTo
```python
from cu2quPen import moveTo
```



---
## lineTo
```python
from cu2quPen import lineTo
```



---
## qCurveTo
```python
from cu2quPen import qCurveTo
```



---
## _curves_to_quadratic
```python
from cu2quPen import _curves_to_quadratic
```



---
## closePath
```python
from cu2quPen import closePath
```



---
## endPath
```python
from cu2quPen import endPath
```



---
## __name__
```python
from perimeterPen import __name__
```

Calculate the perimeter of a glyph.

---
## _distance
```python
from perimeterPen import _distance
```



---
## PerimeterPen
```python
from perimeterPen import PerimeterPen
```



---
## __init__
```python
from perimeterPen import __init__
```



---
## _moveTo
```python
from perimeterPen import _moveTo
```



---
## _closePath
```python
from perimeterPen import _closePath
```



---
## _lineTo
```python
from perimeterPen import _lineTo
```



---
## _addQuadraticExact
```python
from perimeterPen import _addQuadraticExact
```



---
## _addQuadraticQuadrature
```python
from perimeterPen import _addQuadraticQuadrature
```



---
## _qCurveToOne
```python
from perimeterPen import _qCurveToOne
```



---
## _addCubicRecursive
```python
from perimeterPen import _addCubicRecursive
```



---
## _addCubicQuadrature
```python
from perimeterPen import _addCubicQuadrature
```



---
## _curveToOne
```python
from perimeterPen import _curveToOne
```



---
## __name__
```python
from ttGlyphPen import __name__
```



---
## _TTGlyphBasePen
```python
from ttGlyphPen import _TTGlyphBasePen
```



---
## TTGlyphPen
```python
from ttGlyphPen import TTGlyphPen
```

Pen used for drawing to a TrueType glyph.

This pen can be used to construct or modify glyphs in a TrueType format
font. After using the pen to draw, use the ``.glyph()`` method to retrieve
a :py:class:`~._g_l_y_f.Glyph` object representing the glyph.

---
## TTGlyphPointPen
```python
from ttGlyphPen import TTGlyphPointPen
```

Point pen used for drawing to a TrueType glyph.

This pen can be used to construct or modify glyphs in a TrueType format
font. After using the pen to draw, use the ``.glyph()`` method to retrieve
a :py:class:`~._g_l_y_f.Glyph` object representing the glyph.

---
## __init__
```python
from ttGlyphPen import __init__
```



---
## _decompose
```python
from ttGlyphPen import _decompose
```



---
## _isClosed
```python
from ttGlyphPen import _isClosed
```



---
## init
```python
from ttGlyphPen import init
```



---
## addComponent
```python
from ttGlyphPen import addComponent
```

Add a sub glyph.

---
## _buildComponents
```python
from ttGlyphPen import _buildComponents
```



---
## glyph
```python
from ttGlyphPen import glyph
```

Returns a :py:class:`~._g_l_y_f.Glyph` object representing the glyph.

Args:
    componentFlags: Flags to use for component glyphs. (default: 0x04)

    dropImpliedOnCurves: Whether to remove implied-oncurve points. (default: False)

---
## _addPoint
```python
from ttGlyphPen import _addPoint
```



---
## _popPoint
```python
from ttGlyphPen import _popPoint
```



---
## lineTo
```python
from ttGlyphPen import lineTo
```



---
## moveTo
```python
from ttGlyphPen import moveTo
```



---
## curveTo
```python
from ttGlyphPen import curveTo
```



---
## qCurveTo
```python
from ttGlyphPen import qCurveTo
```



---
## closePath
```python
from ttGlyphPen import closePath
```



---
## endPath
```python
from ttGlyphPen import endPath
```

End the current sub path.

---
## beginPath
```python
from ttGlyphPen import beginPath
```

Start a new sub path.

---
## addPoint
```python
from ttGlyphPen import addPoint
```

Add a point to the current sub path.

---
## __name__
```python
from statisticsPen import __name__
```

Pen calculating area, center of mass, variance and standard-deviation,
covariance and correlation, and slant, of glyph shapes.

---
## StatisticsBase
```python
from statisticsPen import StatisticsBase
```



---
## StatisticsPen
```python
from statisticsPen import StatisticsPen
```

Pen calculating area, center of mass, variance and
standard-deviation, covariance and correlation, and slant,
of glyph shapes.

Note that if the glyph shape is self-intersecting, the values
are not correct (but well-defined). Moreover, area will be
negative if contour directions are clockwise.

---
## StatisticsControlPen
```python
from statisticsPen import StatisticsControlPen
```

Pen calculating area, center of mass, variance and
standard-deviation, covariance and correlation, and slant,
of glyph shapes, using the control polygon only.

Note that if the glyph shape is self-intersecting, the values
are not correct (but well-defined). Moreover, area will be
negative if contour directions are clockwise.

---
## _test
```python
from statisticsPen import _test
```



---
## main
```python
from statisticsPen import main
```

Report font glyph shape geometricsl statistics

---
## __init__
```python
from statisticsPen import __init__
```



---
## _zero
```python
from statisticsPen import _zero
```



---
## _update
```python
from statisticsPen import _update
```



---
## _closePath
```python
from statisticsPen import _closePath
```



---
## _moveTo
```python
from statisticsPen import _moveTo
```



---
## _lineTo
```python
from statisticsPen import _lineTo
```



---
## _qCurveToOne
```python
from statisticsPen import _qCurveToOne
```



---
## _curveToOne
```python
from statisticsPen import _curveToOne
```



---
## _endPath
```python
from statisticsPen import _endPath
```



---
## __name__
```python
from cairoPen import __name__
```

Pen to draw to a Cairo graphics library context.

---
## CairoPen
```python
from cairoPen import CairoPen
```

Pen to draw to a Cairo graphics library context.

---
## __init__
```python
from cairoPen import __init__
```



---
## _moveTo
```python
from cairoPen import _moveTo
```



---
## _lineTo
```python
from cairoPen import _lineTo
```



---
## _curveToOne
```python
from cairoPen import _curveToOne
```



---
## _closePath
```python
from cairoPen import _closePath
```



---
## __name__
```python
from wxPen import __name__
```



---
## WxPen
```python
from wxPen import WxPen
```



---
## __init__
```python
from wxPen import __init__
```



---
## _moveTo
```python
from wxPen import _moveTo
```



---
## _lineTo
```python
from wxPen import _lineTo
```



---
## _curveToOne
```python
from wxPen import _curveToOne
```



---
## _qCurveToOne
```python
from wxPen import _qCurveToOne
```



---
## _closePath
```python
from wxPen import _closePath
```



---
## __name__
```python
from boundsPen import __name__
```



---
## ControlBoundsPen
```python
from boundsPen import ControlBoundsPen
```

Pen to calculate the "control bounds" of a shape. This is the
bounding box of all control points, so may be larger than the
actual bounding box if there are curves that don't have points
on their extremes.

When the shape has been drawn, the bounds are available as the
``bounds`` attribute of the pen object. It's a 4-tuple::

        (xMin, yMin, xMax, yMax).

If ``ignoreSinglePoints`` is True, single points are ignored.

---
## BoundsPen
```python
from boundsPen import BoundsPen
```

Pen to calculate the bounds of a shape. It calculates the
correct bounds even when the shape contains curves that don't
have points on their extremes. This is somewhat slower to compute
than the "control bounds".

When the shape has been drawn, the bounds are available as the
``bounds`` attribute of the pen object. It's a 4-tuple::

        (xMin, yMin, xMax, yMax)

---
## __init__
```python
from boundsPen import __init__
```



---
## init
```python
from boundsPen import init
```



---
## _moveTo
```python
from boundsPen import _moveTo
```



---
## _addMoveTo
```python
from boundsPen import _addMoveTo
```



---
## _lineTo
```python
from boundsPen import _lineTo
```



---
## _curveToOne
```python
from boundsPen import _curveToOne
```



---
## _qCurveToOne
```python
from boundsPen import _qCurveToOne
```



---
## __name__
```python
from recordingPen import __name__
```

Pen recording operations that can be accessed or replayed.

---
## replayRecording
```python
from recordingPen import replayRecording
```

Replay a recording, as produced by RecordingPen or DecomposingRecordingPen,
to a pen.

Note that recording does not have to be produced by those pens.
It can be any iterable of tuples of method name and tuple-of-arguments.
Likewise, pen can be any objects receiving those method calls.

---
## RecordingPen
```python
from recordingPen import RecordingPen
```

Pen recording operations that can be accessed or replayed.

The recording can be accessed as pen.value; or replayed using
pen.replay(otherPen).

:Example:
    .. code-block::

        from fontTools.ttLib import TTFont
        from fontTools.pens.recordingPen import RecordingPen

        glyph_name = 'dollar'
        font_path = 'MyFont.otf'

        font = TTFont(font_path)
        glyphset = font.getGlyphSet()
        glyph = glyphset[glyph_name]

        pen = RecordingPen()
        glyph.draw(pen)
        print(pen.value)

---
## DecomposingRecordingPen
```python
from recordingPen import DecomposingRecordingPen
```

Same as RecordingPen, except that it doesn't keep components
as references, but draws them decomposed as regular contours.

The constructor takes a required 'glyphSet' positional argument,
a dictionary of glyph objects (i.e. with a 'draw' method) keyed
by thir name; other arguments are forwarded to the DecomposingPen's
constructor::

    >>> class SimpleGlyph(object):
    ...     def draw(self, pen):
    ...         pen.moveTo((0, 0))
    ...         pen.curveTo((1, 1), (2, 2), (3, 3))
    ...         pen.closePath()
    >>> class CompositeGlyph(object):
    ...     def draw(self, pen):
    ...         pen.addComponent('a', (1, 0, 0, 1, -1, 1))
    >>> class MissingComponent(object):
    ...     def draw(self, pen):
    ...         pen.addComponent('foobar', (1, 0, 0, 1, 0, 0))
    >>> class FlippedComponent(object):
    ...     def draw(self, pen):
    ...         pen.addComponent('a', (-1, 0, 0, 1, 0, 0))
    >>> glyphSet = {
    ...    'a': SimpleGlyph(),
    ...    'b': CompositeGlyph(),
    ...    'c': MissingComponent(),
    ...    'd': FlippedComponent(),
    ... }
    >>> for name, glyph in sorted(glyphSet.items()):
    ...     pen = DecomposingRecordingPen(glyphSet)
    ...     try:
    ...         glyph.draw(pen)
    ...     except pen.MissingComponentError:
    ...         pass
    ...     print("{}: {}".format(name, pen.value))
    a: [('moveTo', ((0, 0),)), ('curveTo', ((1, 1), (2, 2), (3, 3))), ('closePath', ())]
    b: [('moveTo', ((-1, 1),)), ('curveTo', ((0, 2), (1, 3), (2, 4))), ('closePath', ())]
    c: []
    d: [('moveTo', ((0, 0),)), ('curveTo', ((-1, 1), (-2, 2), (-3, 3))), ('closePath', ())]

    >>> for name, glyph in sorted(glyphSet.items()):
    ...     pen = DecomposingRecordingPen(
    ...         glyphSet, skipMissingComponents=True, reverseFlipped=True,
    ...     )
    ...     glyph.draw(pen)
    ...     print("{}: {}".format(name, pen.value))
    a: [('moveTo', ((0, 0),)), ('curveTo', ((1, 1), (2, 2), (3, 3))), ('closePath', ())]
    b: [('moveTo', ((-1, 1),)), ('curveTo', ((0, 2), (1, 3), (2, 4))), ('closePath', ())]
    c: []
    d: [('moveTo', ((0, 0),)), ('lineTo', ((-3, 3),)), ('curveTo', ((-2, 2), (-1, 1), (0, 0))), ('closePath', ())]

---
## RecordingPointPen
```python
from recordingPen import RecordingPointPen
```

PointPen recording operations that can be accessed or replayed.

The recording can be accessed as pen.value; or replayed using
pointPen.replay(otherPointPen).

:Example:
    .. code-block::

        from defcon import Font
        from fontTools.pens.recordingPen import RecordingPointPen

        glyph_name = 'a'
        font_path = 'MyFont.ufo'

        font = Font(font_path)
        glyph = font[glyph_name]

        pen = RecordingPointPen()
        glyph.drawPoints(pen)
        print(pen.value)

        new_glyph = font.newGlyph('b')
        pen.replay(new_glyph.getPointPen())

---
## DecomposingRecordingPointPen
```python
from recordingPen import DecomposingRecordingPointPen
```

Same as RecordingPointPen, except that it doesn't keep components
as references, but draws them decomposed as regular contours.

The constructor takes a required 'glyphSet' positional argument,
a dictionary of pointPen-drawable glyph objects (i.e. with a 'drawPoints' method)
keyed by thir name; other arguments are forwarded to the DecomposingPointPen's
constructor::

    >>> from pprint import pprint
    >>> class SimpleGlyph(object):
    ...     def drawPoints(self, pen):
    ...         pen.beginPath()
    ...         pen.addPoint((0, 0), "line")
    ...         pen.addPoint((1, 1))
    ...         pen.addPoint((2, 2))
    ...         pen.addPoint((3, 3), "curve")
    ...         pen.endPath()
    >>> class CompositeGlyph(object):
    ...     def drawPoints(self, pen):
    ...         pen.addComponent('a', (1, 0, 0, 1, -1, 1))
    >>> class MissingComponent(object):
    ...     def drawPoints(self, pen):
    ...         pen.addComponent('foobar', (1, 0, 0, 1, 0, 0))
    >>> class FlippedComponent(object):
    ...     def drawPoints(self, pen):
    ...         pen.addComponent('a', (-1, 0, 0, 1, 0, 0))
    >>> glyphSet = {
    ...    'a': SimpleGlyph(),
    ...    'b': CompositeGlyph(),
    ...    'c': MissingComponent(),
    ...    'd': FlippedComponent(),
    ... }
    >>> for name, glyph in sorted(glyphSet.items()):
    ...     pen = DecomposingRecordingPointPen(glyphSet)
    ...     try:
    ...         glyph.drawPoints(pen)
    ...     except pen.MissingComponentError:
    ...         pass
    ...     pprint({name: pen.value})
    {'a': [('beginPath', (), {}),
           ('addPoint', ((0, 0), 'line', False, None), {}),
           ('addPoint', ((1, 1), None, False, None), {}),
           ('addPoint', ((2, 2), None, False, None), {}),
           ('addPoint', ((3, 3), 'curve', False, None), {}),
           ('endPath', (), {})]}
    {'b': [('beginPath', (), {}),
           ('addPoint', ((-1, 1), 'line', False, None), {}),
           ('addPoint', ((0, 2), None, False, None), {}),
           ('addPoint', ((1, 3), None, False, None), {}),
           ('addPoint', ((2, 4), 'curve', False, None), {}),
           ('endPath', (), {})]}
    {'c': []}
    {'d': [('beginPath', (), {}),
           ('addPoint', ((0, 0), 'line', False, None), {}),
           ('addPoint', ((-1, 1), None, False, None), {}),
           ('addPoint', ((-2, 2), None, False, None), {}),
           ('addPoint', ((-3, 3), 'curve', False, None), {}),
           ('endPath', (), {})]}

    >>> for name, glyph in sorted(glyphSet.items()):
    ...     pen = DecomposingRecordingPointPen(
    ...         glyphSet, skipMissingComponents=True, reverseFlipped=True,
    ...     )
    ...     glyph.drawPoints(pen)
    ...     pprint({name: pen.value})
    {'a': [('beginPath', (), {}),
           ('addPoint', ((0, 0), 'line', False, None), {}),
           ('addPoint', ((1, 1), None, False, None), {}),
           ('addPoint', ((2, 2), None, False, None), {}),
           ('addPoint', ((3, 3), 'curve', False, None), {}),
           ('endPath', (), {})]}
    {'b': [('beginPath', (), {}),
           ('addPoint', ((-1, 1), 'line', False, None), {}),
           ('addPoint', ((0, 2), None, False, None), {}),
           ('addPoint', ((1, 3), None, False, None), {}),
           ('addPoint', ((2, 4), 'curve', False, None), {}),
           ('endPath', (), {})]}
    {'c': []}
    {'d': [('beginPath', (), {}),
           ('addPoint', ((0, 0), 'curve', False, None), {}),
           ('addPoint', ((-3, 3), 'line', False, None), {}),
           ('addPoint', ((-2, 2), None, False, None), {}),
           ('addPoint', ((-1, 1), None, False, None), {}),
           ('endPath', (), {})]}

---
## lerpRecordings
```python
from recordingPen import lerpRecordings
```

Linearly interpolate between two recordings. The recordings
must be decomposed, i.e. they must not contain any components.

Factor is typically between 0 and 1. 0 means the first recording,
1 means the second recording, and 0.5 means the average of the
two recordings. Other values are possible, and can be useful to
extrapolate. Defaults to 0.5.

Returns a generator with the new recording.

---
## __init__
```python
from recordingPen import __init__
```



---
## moveTo
```python
from recordingPen import moveTo
```



---
## lineTo
```python
from recordingPen import lineTo
```



---
## qCurveTo
```python
from recordingPen import qCurveTo
```



---
## curveTo
```python
from recordingPen import curveTo
```



---
## closePath
```python
from recordingPen import closePath
```



---
## endPath
```python
from recordingPen import endPath
```



---
## addComponent
```python
from recordingPen import addComponent
```



---
## addVarComponent
```python
from recordingPen import addVarComponent
```



---
## replay
```python
from recordingPen import replay
```



---
## beginPath
```python
from recordingPen import beginPath
```



---
## addPoint
```python
from recordingPen import addPoint
```



---
## __name__
```python
from momentsPen import __name__
```



---
## MomentsPen
```python
from momentsPen import MomentsPen
```



---
## __init__
```python
from momentsPen import __init__
```



---
## _moveTo
```python
from momentsPen import _moveTo
```



---
## _closePath
```python
from momentsPen import _closePath
```



---
## _endPath
```python
from momentsPen import _endPath
```



---
## _lineTo
```python
from momentsPen import _lineTo
```



---
## _qCurveToOne
```python
from momentsPen import _qCurveToOne
```



---
## _curveToOne
```python
from momentsPen import _curveToOne
```



---
## __name__
```python
from roundingPen import __name__
```



---
## RoundingPen
```python
from roundingPen import RoundingPen
```

Filter pen that rounds point coordinates and component XY offsets to integer. For
rounding the component transform values, a separate round function can be passed to
the pen.

>>> from fontTools.pens.recordingPen import RecordingPen
>>> recpen = RecordingPen()
>>> roundpen = RoundingPen(recpen)
>>> roundpen.moveTo((0.4, 0.6))
>>> roundpen.lineTo((1.6, 2.5))
>>> roundpen.qCurveTo((2.4, 4.6), (3.3, 5.7), (4.9, 6.1))
>>> roundpen.curveTo((6.4, 8.6), (7.3, 9.7), (8.9, 10.1))
>>> roundpen.addComponent("a", (1.5, 0, 0, 1.5, 10.5, -10.5))
>>> recpen.value == [
...     ('moveTo', ((0, 1),)),
...     ('lineTo', ((2, 3),)),
...     ('qCurveTo', ((2, 5), (3, 6), (5, 6))),
...     ('curveTo', ((6, 9), (7, 10), (9, 10))),
...     ('addComponent', ('a', (1.5, 0, 0, 1.5, 11, -10))),
... ]
True

---
## RoundingPointPen
```python
from roundingPen import RoundingPointPen
```

Filter point pen that rounds point coordinates and component XY offsets to integer.
For rounding the component scale values, a separate round function can be passed to
the pen.

>>> from fontTools.pens.recordingPen import RecordingPointPen
>>> recpen = RecordingPointPen()
>>> roundpen = RoundingPointPen(recpen)
>>> roundpen.beginPath()
>>> roundpen.addPoint((0.4, 0.6), 'line')
>>> roundpen.addPoint((1.6, 2.5), 'line')
>>> roundpen.addPoint((2.4, 4.6))
>>> roundpen.addPoint((3.3, 5.7))
>>> roundpen.addPoint((4.9, 6.1), 'qcurve')
>>> roundpen.endPath()
>>> roundpen.addComponent("a", (1.5, 0, 0, 1.5, 10.5, -10.5))
>>> recpen.value == [
...     ('beginPath', (), {}),
...     ('addPoint', ((0, 1), 'line', False, None), {}),
...     ('addPoint', ((2, 3), 'line', False, None), {}),
...     ('addPoint', ((2, 5), None, False, None), {}),
...     ('addPoint', ((3, 6), None, False, None), {}),
...     ('addPoint', ((5, 6), 'qcurve', False, None), {}),
...     ('endPath', (), {}),
...     ('addComponent', ('a', (1.5, 0, 0, 1.5, 11, -10)), {}),
... ]
True

---
## __init__
```python
from roundingPen import __init__
```



---
## moveTo
```python
from roundingPen import moveTo
```



---
## lineTo
```python
from roundingPen import lineTo
```



---
## curveTo
```python
from roundingPen import curveTo
```



---
## qCurveTo
```python
from roundingPen import qCurveTo
```



---
## addComponent
```python
from roundingPen import addComponent
```



---
## addPoint
```python
from roundingPen import addPoint
```



---
## __name__
```python
from freetypePen import __name__
```

Pen to rasterize paths with FreeType.

---
## FreeTypePen
```python
from freetypePen import FreeTypePen
```

Pen to rasterize paths with FreeType. Requires `freetype-py` module.

Constructs ``FT_Outline`` from the paths, and renders it within a bitmap
buffer.

For ``array()`` and ``show()``, `numpy` and `matplotlib` must be installed.
For ``image()``, `Pillow` is required. Each module is lazily loaded when the
corresponding method is called.

Args:
    glyphSet: a dictionary of drawable glyph objects keyed by name
        used to resolve component references in composite glyphs.

Examples:
    If `numpy` and `matplotlib` is available, the following code will
    show the glyph image of `fi` in a new window::

        from fontTools.ttLib import TTFont
        from fontTools.pens.freetypePen import FreeTypePen
        from fontTools.misc.transform import Offset
        pen = FreeTypePen(None)
        font = TTFont('SourceSansPro-Regular.otf')
        glyph = font.getGlyphSet()['fi']
        glyph.draw(pen)
        width, ascender, descender = glyph.width, font['OS/2'].usWinAscent, -font['OS/2'].usWinDescent
        height = ascender - descender
        pen.show(width=width, height=height, transform=Offset(0, -descender))

    Combining with `uharfbuzz`, you can typeset a chunk of glyphs in a pen::

        import uharfbuzz as hb
        from fontTools.pens.freetypePen import FreeTypePen
        from fontTools.pens.transformPen import TransformPen
        from fontTools.misc.transform import Offset

        en1, en2, ar, ja = 'Typesetting', 'Jeff', 'صف الحروف', 'たいぷせっと'
        for text, font_path, direction, typo_ascender, typo_descender, vhea_ascender, vhea_descender, contain, features in (
            (en1, 'NotoSans-Regular.ttf',       'ltr', 2189, -600, None, None, False, {"kern": True, "liga": True}),
            (en2, 'NotoSans-Regular.ttf',       'ltr', 2189, -600, None, None, True,  {"kern": True, "liga": True}),
            (ar,  'NotoSansArabic-Regular.ttf', 'rtl', 1374, -738, None, None, False, {"kern": True, "liga": True}),
            (ja,  'NotoSansJP-Regular.otf',     'ltr', 880,  -120, 500,  -500, False, {"palt": True, "kern": True}),
            (ja,  'NotoSansJP-Regular.otf',     'ttb', 880,  -120, 500,  -500, False, {"vert": True, "vpal": True, "vkrn": True})
        ):
            blob = hb.Blob.from_file_path(font_path)
            face = hb.Face(blob)
            font = hb.Font(face)
            buf = hb.Buffer()
            buf.direction = direction
            buf.add_str(text)
            buf.guess_segment_properties()
            hb.shape(font, buf, features)

            x, y = 0, 0
            pen = FreeTypePen(None)
            for info, pos in zip(buf.glyph_infos, buf.glyph_positions):
                gid = info.codepoint
                transformed = TransformPen(pen, Offset(x + pos.x_offset, y + pos.y_offset))
                font.draw_glyph_with_pen(gid, transformed)
                x += pos.x_advance
                y += pos.y_advance

            offset, width, height = None, None, None
            if direction in ('ltr', 'rtl'):
                offset = (0, -typo_descender)
                width  = x
                height = typo_ascender - typo_descender
            else:
                offset = (-vhea_descender, -y)
                width  = vhea_ascender - vhea_descender
                height = -y
            pen.show(width=width, height=height, transform=Offset(*offset), contain=contain)

    For Jupyter Notebook, the rendered image will be displayed in a cell if
    you replace ``show()`` with ``image()`` in the examples.

---
## __init__
```python
from freetypePen import __init__
```



---
## outline
```python
from freetypePen import outline
```

Converts the current contours to ``FT_Outline``.

Args:
    transform: An optional 6-tuple containing an affine transformation,
        or a ``Transform`` object from the ``fontTools.misc.transform``
        module.
    evenOdd: Pass ``True`` for even-odd fill instead of non-zero.

---
## buffer
```python
from freetypePen import buffer
```

Renders the current contours within a bitmap buffer.

Args:
    width: Image width of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    height: Image height of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    transform: An optional 6-tuple containing an affine transformation,
        or a ``Transform`` object from the ``fontTools.misc.transform``
        module. The bitmap size is not affected by this matrix.
    contain: If ``True``, the image size will be automatically expanded
        so that it fits to the bounding box of the paths. Useful for
        rendering glyphs with negative sidebearings without clipping.
    evenOdd: Pass ``True`` for even-odd fill instead of non-zero.

Returns:
    A tuple of ``(buffer, size)``, where ``buffer`` is a ``bytes``
    object of the resulted bitmap and ``size`` is a 2-tuple of its
    dimension.

Notes:
    The image size should always be given explicitly if you need to get
    a proper glyph image. When ``width`` and ``height`` are omitted, it
    forcifully fits to the bounding box and the side bearings get
    cropped. If you pass ``0`` to both ``width`` and ``height`` and set
    ``contain`` to ``True``, it expands to the bounding box while
    maintaining the origin of the contours, meaning that LSB will be
    maintained but RSB won’t. The difference between the two becomes
    more obvious when rotate or skew transformation is applied.

Example:
    .. code-block:: pycon

        >>>
        >> pen = FreeTypePen(None)
        >> glyph.draw(pen)
        >> buf, size = pen.buffer(width=500, height=1000)
        >> type(buf), len(buf), size
        (<class 'bytes'>, 500000, (500, 1000))

---
## array
```python
from freetypePen import array
```

Returns the rendered contours as a numpy array. Requires `numpy`.

Args:
    width: Image width of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    height: Image height of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    transform: An optional 6-tuple containing an affine transformation,
        or a ``Transform`` object from the ``fontTools.misc.transform``
        module. The bitmap size is not affected by this matrix.
    contain: If ``True``, the image size will be automatically expanded
        so that it fits to the bounding box of the paths. Useful for
        rendering glyphs with negative sidebearings without clipping.
    evenOdd: Pass ``True`` for even-odd fill instead of non-zero.

Returns:
    A ``numpy.ndarray`` object with a shape of ``(height, width)``.
    Each element takes a value in the range of ``[0.0, 1.0]``.

Notes:
    The image size should always be given explicitly if you need to get
    a proper glyph image. When ``width`` and ``height`` are omitted, it
    forcifully fits to the bounding box and the side bearings get
    cropped. If you pass ``0`` to both ``width`` and ``height`` and set
    ``contain`` to ``True``, it expands to the bounding box while
    maintaining the origin of the contours, meaning that LSB will be
    maintained but RSB won’t. The difference between the two becomes
    more obvious when rotate or skew transformation is applied.

Example:
    .. code-block:: pycon

        >>>
        >> pen = FreeTypePen(None)
        >> glyph.draw(pen)
        >> arr = pen.array(width=500, height=1000)
        >> type(a), a.shape
        (<class 'numpy.ndarray'>, (1000, 500))

---
## show
```python
from freetypePen import show
```

Plots the rendered contours with `pyplot`. Requires `numpy` and
`matplotlib`.

Args:
    width: Image width of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    height: Image height of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    transform: An optional 6-tuple containing an affine transformation,
        or a ``Transform`` object from the ``fontTools.misc.transform``
        module. The bitmap size is not affected by this matrix.
    contain: If ``True``, the image size will be automatically expanded
        so that it fits to the bounding box of the paths. Useful for
        rendering glyphs with negative sidebearings without clipping.
    evenOdd: Pass ``True`` for even-odd fill instead of non-zero.

Notes:
    The image size should always be given explicitly if you need to get
    a proper glyph image. When ``width`` and ``height`` are omitted, it
    forcifully fits to the bounding box and the side bearings get
    cropped. If you pass ``0`` to both ``width`` and ``height`` and set
    ``contain`` to ``True``, it expands to the bounding box while
    maintaining the origin of the contours, meaning that LSB will be
    maintained but RSB won’t. The difference between the two becomes
    more obvious when rotate or skew transformation is applied.

Example:
    .. code-block:: pycon

        >>>
        >> pen = FreeTypePen(None)
        >> glyph.draw(pen)
        >> pen.show(width=500, height=1000)

---
## image
```python
from freetypePen import image
```

Returns the rendered contours as a PIL image. Requires `Pillow`.
Can be used to display a glyph image in Jupyter Notebook.

Args:
    width: Image width of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    height: Image height of the bitmap in pixels. If omitted, it
        automatically fits to the bounding box of the contours.
    transform: An optional 6-tuple containing an affine transformation,
        or a ``Transform`` object from the ``fontTools.misc.transform``
        module. The bitmap size is not affected by this matrix.
    contain: If ``True``, the image size will be automatically expanded
        so that it fits to the bounding box of the paths. Useful for
        rendering glyphs with negative sidebearings without clipping.
    evenOdd: Pass ``True`` for even-odd fill instead of non-zero.

Returns:
    A ``PIL.image`` object. The image is filled in black with alpha
    channel obtained from the rendered bitmap.

Notes:
    The image size should always be given explicitly if you need to get
    a proper glyph image. When ``width`` and ``height`` are omitted, it
    forcifully fits to the bounding box and the side bearings get
    cropped. If you pass ``0`` to both ``width`` and ``height`` and set
    ``contain`` to ``True``, it expands to the bounding box while
    maintaining the origin of the contours, meaning that LSB will be
    maintained but RSB won’t. The difference between the two becomes
    more obvious when rotate or skew transformation is applied.

Example:
    .. code-block:: pycon

        >>>
        >> pen = FreeTypePen(None)
        >> glyph.draw(pen)
        >> img = pen.image(width=500, height=1000)
        >> type(img), img.size
        (<class 'PIL.Image.Image'>, (500, 1000))

---
## bbox
```python
from freetypePen import bbox
```

Computes the exact bounding box of an outline.

Returns:
    A tuple of ``(xMin, yMin, xMax, yMax)``.

---
## cbox
```python
from freetypePen import cbox
```

Returns an outline's ‘control box’.

Returns:
    A tuple of ``(xMin, yMin, xMax, yMax)``.

---
## _moveTo
```python
from freetypePen import _moveTo
```



---
## _lineTo
```python
from freetypePen import _lineTo
```



---
## _curveToOne
```python
from freetypePen import _curveToOne
```



---
## _qCurveToOne
```python
from freetypePen import _qCurveToOne
```



---
## __name__
```python
from explicitClosingLinePen import __name__
```



---
## ExplicitClosingLinePen
```python
from explicitClosingLinePen import ExplicitClosingLinePen
```

A filter pen that adds an explicit lineTo to the first point of each closed
contour if the end point of the last segment is not already the same as the first point.
Otherwise, it passes the contour through unchanged.

>>> from pprint import pprint
>>> from fontTools.pens.recordingPen import RecordingPen
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.lineTo((100, 0))
>>> pen.lineTo((100, 100))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('lineTo', ((100, 0),)),
 ('lineTo', ((100, 100),)),
 ('lineTo', ((0, 0),)),
 ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.lineTo((100, 0))
>>> pen.lineTo((100, 100))
>>> pen.lineTo((0, 0))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('lineTo', ((100, 0),)),
 ('lineTo', ((100, 100),)),
 ('lineTo', ((0, 0),)),
 ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.curveTo((100, 0), (0, 100), (100, 100))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('curveTo', ((100, 0), (0, 100), (100, 100))),
 ('lineTo', ((0, 0),)),
 ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.curveTo((100, 0), (0, 100), (100, 100))
>>> pen.lineTo((0, 0))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('curveTo', ((100, 0), (0, 100), (100, 100))),
 ('lineTo', ((0, 0),)),
 ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.curveTo((100, 0), (0, 100), (0, 0))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('curveTo', ((100, 0), (0, 100), (0, 0))),
 ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.closePath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)), ('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.closePath()
>>> pprint(rec.value)
[('closePath', ())]
>>> rec = RecordingPen()
>>> pen = ExplicitClosingLinePen(rec)
>>> pen.moveTo((0, 0))
>>> pen.lineTo((100, 0))
>>> pen.lineTo((100, 100))
>>> pen.endPath()
>>> pprint(rec.value)
[('moveTo', ((0, 0),)),
 ('lineTo', ((100, 0),)),
 ('lineTo', ((100, 100),)),
 ('endPath', ())]

---
## filterContour
```python
from explicitClosingLinePen import filterContour
```



---
## __name__
```python
from reverseContourPen import __name__
```



---
## ReverseContourPen
```python
from reverseContourPen import ReverseContourPen
```

Filter pen that passes outline data to another pen, but reversing
the winding direction of all contours. Components are simply passed
through unchanged.

Closed contours are reversed in such a way that the first point remains
the first point.

---
## reversedContour
```python
from reverseContourPen import reversedContour
```

Generator that takes a list of pen's (operator, operands) tuples,
and yields them with the winding direction reversed.

---
## __init__
```python
from reverseContourPen import __init__
```



---
## filterContour
```python
from reverseContourPen import filterContour
```



---
## __name__
```python
from svgPathPen import __name__
```



---
## pointToString
```python
from svgPathPen import pointToString
```



---
## SVGPathPen
```python
from svgPathPen import SVGPathPen
```

Pen to draw SVG path d commands.

Args:
    glyphSet: a dictionary of drawable glyph objects keyed by name
        used to resolve component references in composite glyphs.
    ntos: a callable that takes a number and returns a string, to
        customize how numbers are formatted (default: str).

:Example:
    .. code-block::

        >>> pen = SVGPathPen(None)
        >>> pen.moveTo((0, 0))
        >>> pen.lineTo((1, 1))
        >>> pen.curveTo((2, 2), (3, 3), (4, 4))
        >>> pen.closePath()
        >>> pen.getCommands()
        'M0 0 1 1C2 2 3 3 4 4Z'

Note:
    Fonts have a coordinate system where Y grows up, whereas in SVG,
    Y grows down.  As such, rendering path data from this pen in
    SVG typically results in upside-down glyphs.  You can fix this
    by wrapping the data from this pen in an SVG group element with
    transform, or wrap this pen in a transform pen.  For example:
    .. code-block:: python

        spen = svgPathPen.SVGPathPen(glyphset)
        pen= TransformPen(spen , (1, 0, 0, -1, 0, 0))
        glyphset[glyphname].draw(pen)
        print(tpen.getCommands())

---
## main
```python
from svgPathPen import main
```

Generate per-character SVG from font and text

---
## __init__
```python
from svgPathPen import __init__
```



---
## _handleAnchor
```python
from svgPathPen import _handleAnchor
```

>>> pen = SVGPathPen(None)
>>> pen.moveTo((0, 0))
>>> pen.moveTo((10, 10))
>>> pen._commands
['M10 10']

---
## _moveTo
```python
from svgPathPen import _moveTo
```

>>> pen = SVGPathPen(None)
>>> pen.moveTo((0, 0))
>>> pen._commands
['M0 0']

>>> pen = SVGPathPen(None)
>>> pen.moveTo((10, 0))
>>> pen._commands
['M10 0']

>>> pen = SVGPathPen(None)
>>> pen.moveTo((0, 10))
>>> pen._commands
['M0 10']

---
## _lineTo
```python
from svgPathPen import _lineTo
```

# duplicate point
>>> pen = SVGPathPen(None)
>>> pen.moveTo((10, 10))
>>> pen.lineTo((10, 10))
>>> pen._commands
['M10 10']

# vertical line
>>> pen = SVGPathPen(None)
>>> pen.moveTo((10, 10))
>>> pen.lineTo((10, 0))
>>> pen._commands
['M10 10', 'V0']

# horizontal line
>>> pen = SVGPathPen(None)
>>> pen.moveTo((10, 10))
>>> pen.lineTo((0, 10))
>>> pen._commands
['M10 10', 'H0']

# basic
>>> pen = SVGPathPen(None)
>>> pen.lineTo((70, 80))
>>> pen._commands
['L70 80']

# basic following a moveto
>>> pen = SVGPathPen(None)
>>> pen.moveTo((0, 0))
>>> pen.lineTo((10, 10))
>>> pen._commands
['M0 0', ' 10 10']

---
## _curveToOne
```python
from svgPathPen import _curveToOne
```

>>> pen = SVGPathPen(None)
>>> pen.curveTo((10, 20), (30, 40), (50, 60))
>>> pen._commands
['C10 20 30 40 50 60']

---
## _qCurveToOne
```python
from svgPathPen import _qCurveToOne
```

>>> pen = SVGPathPen(None)
>>> pen.qCurveTo((10, 20), (30, 40))
>>> pen._commands
['Q10 20 30 40']
>>> from fontTools.misc.roundTools import otRound
>>> pen = SVGPathPen(None, ntos=lambda v: str(otRound(v)))
>>> pen.qCurveTo((3, 3), (7, 5), (11, 4))
>>> pen._commands
['Q3 3 5 4', 'Q7 5 11 4']

---
## _closePath
```python
from svgPathPen import _closePath
```

>>> pen = SVGPathPen(None)
>>> pen.closePath()
>>> pen._commands
['Z']

---
## _endPath
```python
from svgPathPen import _endPath
```

>>> pen = SVGPathPen(None)
>>> pen.endPath()
>>> pen._commands
[]

---
## getCommands
```python
from svgPathPen import getCommands
```



---
## __name__
```python
from hashPointPen import __name__
```



---
## HashPointPen
```python
from hashPointPen import HashPointPen
```

This pen can be used to check if a glyph's contents (outlines plus
components) have changed.

Components are added as the original outline plus each composite's
transformation.

Example: You have some TrueType hinting code for a glyph which you want to
compile. The hinting code specifies a hash value computed with HashPointPen
that was valid for the glyph's outlines at the time the hinting code was
written. Now you can calculate the hash for the glyph's current outlines to
check if the outlines have changed, which would probably make the hinting
code invalid.

> glyph = ufo[name]
> hash_pen = HashPointPen(glyph.width, ufo)
> glyph.drawPoints(hash_pen)
> ttdata = glyph.lib.get("public.truetype.instructions", None)
> stored_hash = ttdata.get("id", None)  # The hash is stored in the "id" key
> if stored_hash is None or stored_hash != hash_pen.hash:
>    logger.error(f"Glyph hash mismatch, glyph '{name}' will have no instructions in font.")
> else:
>    # The hash values are identical, the outline has not changed.
>    # Compile the hinting code ...
>    pass

If you want to compare a glyph from a source format which supports floating point
coordinates and transformations against a glyph from a format which has restrictions
on the precision of floats, e.g. UFO vs. TTF, you must use an appropriate rounding
function to make the values comparable. For TTF fonts with composites, this
construct can be used to make the transform values conform to F2Dot14:

> ttf_hash_pen = HashPointPen(ttf_glyph_width, ttFont.getGlyphSet())
> ttf_round_pen = RoundingPointPen(ttf_hash_pen, transformRoundFunc=partial(floatToFixedToFloat, precisionBits=14))
> ufo_hash_pen = HashPointPen(ufo_glyph.width, ufo)
> ttf_glyph.drawPoints(ttf_round_pen, ttFont["glyf"])
> ufo_round_pen = RoundingPointPen(ufo_hash_pen, transformRoundFunc=partial(floatToFixedToFloat, precisionBits=14))
> ufo_glyph.drawPoints(ufo_round_pen)
> assert ttf_hash_pen.hash == ufo_hash_pen.hash

---
## __init__
```python
from hashPointPen import __init__
```



---
## hash
```python
from hashPointPen import hash
```



---
## beginPath
```python
from hashPointPen import beginPath
```



---
## endPath
```python
from hashPointPen import endPath
```



---
## addPoint
```python
from hashPointPen import addPoint
```



---
## addComponent
```python
from hashPointPen import addComponent
```



---
## __name__
```python
from quartzPen import __name__
```



---
## QuartzPen
```python
from quartzPen import QuartzPen
```

A pen that creates a CGPath

Parameters
- path: an optional CGPath to add to
- xform: an optional CGAffineTransform to apply to the path

---
## __init__
```python
from quartzPen import __init__
```



---
## _moveTo
```python
from quartzPen import _moveTo
```



---
## _lineTo
```python
from quartzPen import _lineTo
```



---
## _curveToOne
```python
from quartzPen import _curveToOne
```



---
## _qCurveToOne
```python
from quartzPen import _qCurveToOne
```



---
## _closePath
```python
from quartzPen import _closePath
```



---
## OpenTypeLibError
```python
from error import OpenTypeLibError
```



---
## buildCoverage
```python
from builder import buildCoverage
```

Builds a coverage table.

Coverage tables (as defined in the `OpenType spec <https://docs.microsoft.com/en-gb/typography/opentype/spec/chapter2#coverage-table>`__)
are used in all OpenType Layout lookups apart from the Extension type, and
define the glyphs involved in a layout subtable. This allows shaping engines
to compare the glyph stream with the coverage table and quickly determine
whether a subtable should be involved in a shaping operation.

This function takes a list of glyphs and a glyphname-to-ID map, and
returns a ``Coverage`` object representing the coverage table.

Example::

    glyphMap = font.getReverseGlyphMap()
    glyphs = [ "A", "B", "C" ]
    coverage = buildCoverage(glyphs, glyphMap)

Args:
    glyphs: a sequence of glyph names.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    An ``otTables.Coverage`` object or ``None`` if there are no glyphs
    supplied.

---
## buildLookup
```python
from builder import buildLookup
```

Turns a collection of rules into a lookup.

A Lookup (as defined in the `OpenType Spec <https://docs.microsoft.com/en-gb/typography/opentype/spec/chapter2#lookupTbl>`__)
wraps the individual rules in a layout operation (substitution or
positioning) in a data structure expressing their overall lookup type -
for example, single substitution, mark-to-base attachment, and so on -
as well as the lookup flags and any mark filtering sets. You may import
the following constants to express lookup flags:

- ``LOOKUP_FLAG_RIGHT_TO_LEFT``
- ``LOOKUP_FLAG_IGNORE_BASE_GLYPHS``
- ``LOOKUP_FLAG_IGNORE_LIGATURES``
- ``LOOKUP_FLAG_IGNORE_MARKS``
- ``LOOKUP_FLAG_USE_MARK_FILTERING_SET``

Args:
    subtables: A list of layout subtable objects (e.g.
        ``MultipleSubst``, ``PairPos``, etc.) or ``None``.
    flags (int): This lookup's flags.
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

Returns:
    An ``otTables.Lookup`` object or ``None`` if there are no subtables
    supplied.

---
## LookupBuilder
```python
from builder import LookupBuilder
```



---
## AlternateSubstBuilder
```python
from builder import AlternateSubstBuilder
```

Builds an Alternate Substitution (GSUB3) lookup.

Users are expected to manually add alternate glyph substitutions to
the ``alternates`` attribute after the object has been initialized,
e.g.::

    builder.alternates["A"] = ["A.alt1", "A.alt2"]

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    alternates: An ordered dictionary of alternates, mapping glyph names
        to a list of names of alternates.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## ChainContextualRule
```python
from builder import ChainContextualRule
```



---
## ChainContextualRuleset
```python
from builder import ChainContextualRuleset
```



---
## ChainContextualBuilder
```python
from builder import ChainContextualBuilder
```



---
## ChainContextPosBuilder
```python
from builder import ChainContextPosBuilder
```

Builds a Chained Contextual Positioning (GPOS8) lookup.

Users are expected to manually add rules to the ``rules`` attribute after
the object has been initialized, e.g.::

    # pos [A B] [C D] x' lookup lu1 y' z' lookup lu2 E;

    prefix  = [ ["A", "B"], ["C", "D"] ]
    suffix  = [ ["E"] ]
    glyphs  = [ ["x"], ["y"], ["z"] ]
    lookups = [ [lu1], None,  [lu2] ]
    builder.rules.append( (prefix, glyphs, suffix, lookups) )

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    rules: A list of tuples representing the rules in this lookup.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## ChainContextSubstBuilder
```python
from builder import ChainContextSubstBuilder
```

Builds a Chained Contextual Substitution (GSUB6) lookup.

Users are expected to manually add rules to the ``rules`` attribute after
the object has been initialized, e.g.::

    # sub [A B] [C D] x' lookup lu1 y' z' lookup lu2 E;

    prefix  = [ ["A", "B"], ["C", "D"] ]
    suffix  = [ ["E"] ]
    glyphs  = [ ["x"], ["y"], ["z"] ]
    lookups = [ [lu1], None,  [lu2] ]
    builder.rules.append( (prefix, glyphs, suffix, lookups) )

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    rules: A list of tuples representing the rules in this lookup.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## LigatureSubstBuilder
```python
from builder import LigatureSubstBuilder
```

Builds a Ligature Substitution (GSUB4) lookup.

Users are expected to manually add ligatures to the ``ligatures``
attribute after the object has been initialized, e.g.::

    # sub f i by f_i;
    builder.ligatures[("f","f","i")] = "f_f_i"

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    ligatures: An ordered dictionary mapping a tuple of glyph names to the
        ligature glyphname.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## MultipleSubstBuilder
```python
from builder import MultipleSubstBuilder
```

Builds a Multiple Substitution (GSUB2) lookup.

Users are expected to manually add substitutions to the ``mapping``
attribute after the object has been initialized, e.g.::

    # sub uni06C0 by uni06D5.fina hamza.above;
    builder.mapping["uni06C0"] = [ "uni06D5.fina", "hamza.above"]

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    mapping: An ordered dictionary mapping a glyph name to a list of
        substituted glyph names.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## CursivePosBuilder
```python
from builder import CursivePosBuilder
```

Builds a Cursive Positioning (GPOS3) lookup.

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    attachments: An ordered dictionary mapping a glyph name to a two-element
        tuple of ``otTables.Anchor`` objects.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## MarkBasePosBuilder
```python
from builder import MarkBasePosBuilder
```

Builds a Mark-To-Base Positioning (GPOS4) lookup.

Users are expected to manually add marks and bases to the ``marks``
and ``bases`` attributes after the object has been initialized, e.g.::

    builder.marks["acute"]   = (0, a1)
    builder.marks["grave"]   = (0, a1)
    builder.marks["cedilla"] = (1, a2)
    builder.bases["a"] = {0: a3, 1: a5}
    builder.bases["b"] = {0: a4, 1: a5}

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    marks: An dictionary mapping a glyph name to a two-element
        tuple containing a mark class ID and ``otTables.Anchor`` object.
    bases: An dictionary mapping a glyph name to a dictionary of
        mark class IDs and ``otTables.Anchor`` object.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## MarkLigPosBuilder
```python
from builder import MarkLigPosBuilder
```

Builds a Mark-To-Ligature Positioning (GPOS5) lookup.

Users are expected to manually add marks and bases to the ``marks``
and ``ligatures`` attributes after the object has been initialized, e.g.::

    builder.marks["acute"]   = (0, a1)
    builder.marks["grave"]   = (0, a1)
    builder.marks["cedilla"] = (1, a2)
    builder.ligatures["f_i"] = [
        { 0: a3, 1: a5 }, # f
        { 0: a4, 1: a5 }  # i
    ]

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    marks: An dictionary mapping a glyph name to a two-element
        tuple containing a mark class ID and ``otTables.Anchor`` object.
    ligatures: An dictionary mapping a glyph name to an array with one
        element for each ligature component. Each array element should be
        a dictionary mapping mark class IDs to ``otTables.Anchor`` objects.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## MarkMarkPosBuilder
```python
from builder import MarkMarkPosBuilder
```

Builds a Mark-To-Mark Positioning (GPOS6) lookup.

Users are expected to manually add marks and bases to the ``marks``
and ``baseMarks`` attributes after the object has been initialized, e.g.::

    builder.marks["acute"]     = (0, a1)
    builder.marks["grave"]     = (0, a1)
    builder.marks["cedilla"]   = (1, a2)
    builder.baseMarks["acute"] = {0: a3}

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    marks: An dictionary mapping a glyph name to a two-element
        tuple containing a mark class ID and ``otTables.Anchor`` object.
    baseMarks: An dictionary mapping a glyph name to a dictionary
        containing one item: a mark class ID and a ``otTables.Anchor`` object.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## ReverseChainSingleSubstBuilder
```python
from builder import ReverseChainSingleSubstBuilder
```

Builds a Reverse Chaining Contextual Single Substitution (GSUB8) lookup.

Users are expected to manually add substitutions to the ``substitutions``
attribute after the object has been initialized, e.g.::

    # reversesub [a e n] d' by d.alt;
    prefix = [ ["a", "e", "n"] ]
    suffix = []
    mapping = { "d": "d.alt" }
    builder.substitutions.append( (prefix, suffix, mapping) )

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    substitutions: A three-element tuple consisting of a prefix sequence,
        a suffix sequence, and a dictionary of single substitutions.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## SingleSubstBuilder
```python
from builder import SingleSubstBuilder
```

Builds a Single Substitution (GSUB1) lookup.

Users are expected to manually add substitutions to the ``mapping``
attribute after the object has been initialized, e.g.::

    # sub x by y;
    builder.mapping["x"] = "y"

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    mapping: A dictionary mapping a single glyph name to another glyph name.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## ClassPairPosSubtableBuilder
```python
from builder import ClassPairPosSubtableBuilder
```

Builds class-based Pair Positioning (GPOS2 format 2) subtables.

Note that this does *not* build a GPOS2 ``otTables.Lookup`` directly,
but builds a list of ``otTables.PairPos`` subtables. It is used by the
:class:`PairPosBuilder` below.

Attributes:
    builder (PairPosBuilder): A pair positioning lookup builder.

---
## PairPosBuilder
```python
from builder import PairPosBuilder
```

Builds a Pair Positioning (GPOS2) lookup.

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    pairs: An array of class-based pair positioning tuples. Usually
        manipulated with the :meth:`addClassPair` method below.
    glyphPairs: A dictionary mapping a tuple of glyph names to a tuple
        of ``otTables.ValueRecord`` objects. Usually manipulated with the
        :meth:`addGlyphPair` method below.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## SinglePosBuilder
```python
from builder import SinglePosBuilder
```

Builds a Single Positioning (GPOS1) lookup.

Attributes:
    font (``fontTools.TTLib.TTFont``): A font object.
    location: A string or tuple representing the location in the original
        source which produced this lookup.
    mapping: A dictionary mapping a glyph name to a ``otTables.ValueRecord``
        objects. Usually manipulated with the :meth:`add_pos` method below.
    lookupflag (int): The lookup's flag
    markFilterSet: Either ``None`` if no mark filtering set is used, or
        an integer representing the filtering set to be used for this
        lookup. If a mark filtering set is provided,
        `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's
        flags.

---
## buildSingleSubstSubtable
```python
from builder import buildSingleSubstSubtable
```

Builds a single substitution (GSUB1) subtable.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.SingleSubstBuilder` instead.

Args:
    mapping: A dictionary mapping input glyph names to output glyph names.

Returns:
    An ``otTables.SingleSubst`` object, or ``None`` if the mapping dictionary
    is empty.

---
## buildMultipleSubstSubtable
```python
from builder import buildMultipleSubstSubtable
```

Builds a multiple substitution (GSUB2) subtable.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.MultipleSubstBuilder` instead.

Example::

    # sub uni06C0 by uni06D5.fina hamza.above
    # sub uni06C2 by uni06C1.fina hamza.above;

    subtable = buildMultipleSubstSubtable({
        "uni06C0": [ "uni06D5.fina", "hamza.above"],
        "uni06C2": [ "uni06D1.fina", "hamza.above"]
    })

Args:
    mapping: A dictionary mapping input glyph names to a list of output
        glyph names.

Returns:
    An ``otTables.MultipleSubst`` object or ``None`` if the mapping dictionary
    is empty.

---
## buildAlternateSubstSubtable
```python
from builder import buildAlternateSubstSubtable
```

Builds an alternate substitution (GSUB3) subtable.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.AlternateSubstBuilder` instead.

Args:
    mapping: A dictionary mapping input glyph names to a list of output
        glyph names.

Returns:
    An ``otTables.AlternateSubst`` object or ``None`` if the mapping dictionary
    is empty.

---
## buildLigatureSubstSubtable
```python
from builder import buildLigatureSubstSubtable
```

Builds a ligature substitution (GSUB4) subtable.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.LigatureSubstBuilder` instead.

Example::

    # sub f f i by f_f_i;
    # sub f i by f_i;

    subtable = buildLigatureSubstSubtable({
        ("f", "f", "i"): "f_f_i",
        ("f", "i"): "f_i",
    })

Args:
    mapping: A dictionary mapping tuples of glyph names to output
        glyph names.

Returns:
    An ``otTables.LigatureSubst`` object or ``None`` if the mapping dictionary
    is empty.

---
## buildAnchor
```python
from builder import buildAnchor
```

Builds an Anchor table.

This determines the appropriate anchor format based on the passed parameters.

Args:
    x (int): X coordinate.
    y (int): Y coordinate.
    point (int): Index of glyph contour point, if provided.
    deviceX (``otTables.Device``): X coordinate device table, if provided.
    deviceY (``otTables.Device``): Y coordinate device table, if provided.

Returns:
    An ``otTables.Anchor`` object.

---
## buildBaseArray
```python
from builder import buildBaseArray
```

Builds a base array record.

As part of building mark-to-base positioning rules, you will need to define
a ``BaseArray`` record, which "defines for each base glyph an array of
anchors, one for each mark class." This function builds the base array
subtable.

Example::

    bases = {"a": {0: a3, 1: a5}, "b": {0: a4, 1: a5}}
    basearray = buildBaseArray(bases, 2, font.getReverseGlyphMap())

Args:
    bases (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being dictionaries mapping mark class ID
        to the appropriate ``otTables.Anchor`` object used for attaching marks
        of that class.
    numMarkClasses (int): The total number of mark classes for which anchors
        are defined.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    An ``otTables.BaseArray`` object.

---
## buildBaseRecord
```python
from builder import buildBaseRecord
```



---
## buildComponentRecord
```python
from builder import buildComponentRecord
```

Builds a component record.

As part of building mark-to-ligature positioning rules, you will need to
define ``ComponentRecord`` objects, which contain "an array of offsets...
to the Anchor tables that define all the attachment points used to attach
marks to the component." This function builds the component record.

Args:
    anchors: A list of ``otTables.Anchor`` objects or ``None``.

Returns:
    A ``otTables.ComponentRecord`` object or ``None`` if no anchors are
    supplied.

---
## buildCursivePosSubtable
```python
from builder import buildCursivePosSubtable
```

Builds a cursive positioning (GPOS3) subtable.

Cursive positioning lookups are made up of a coverage table of glyphs,
and a set of ``EntryExitRecord`` records containing the anchors for
each glyph. This function builds the cursive positioning subtable.

Example::

    subtable = buildCursivePosSubtable({
        "AlifIni": (None, buildAnchor(0, 50)),
        "BehMed": (buildAnchor(500,250), buildAnchor(0,50)),
        # ...
    }, font.getReverseGlyphMap())

Args:
    attach (dict): A mapping between glyph names and a tuple of two
        ``otTables.Anchor`` objects representing entry and exit anchors.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    An ``otTables.CursivePos`` object, or ``None`` if the attachment
    dictionary was empty.

---
## buildDevice
```python
from builder import buildDevice
```

Builds a Device record as part of a ValueRecord or Anchor.

Device tables specify size-specific adjustments to value records
and anchors to reflect changes based on the resolution of the output.
For example, one could specify that an anchor's Y position should be
increased by 1 pixel when displayed at 8 pixels per em. This routine
builds device records.

Args:
    deltas: A dictionary mapping pixels-per-em sizes to the delta
        adjustment in pixels when the font is displayed at that size.

Returns:
    An ``otTables.Device`` object if any deltas were supplied, or
    ``None`` otherwise.

---
## buildLigatureArray
```python
from builder import buildLigatureArray
```

Builds a LigatureArray subtable.

As part of building a mark-to-ligature lookup, you will need to define
the set of anchors (for each mark class) on each component of the ligature
where marks can be attached. For example, for an Arabic divine name ligature
(lam lam heh), you may want to specify mark attachment positioning for
superior marks (fatha, etc.) and inferior marks (kasra, etc.) on each glyph
of the ligature. This routine builds the ligature array record.

Example::

    buildLigatureArray({
        "lam-lam-heh": [
            { 0: superiorAnchor1, 1: inferiorAnchor1 }, # attach points for lam1
            { 0: superiorAnchor2, 1: inferiorAnchor2 }, # attach points for lam2
            { 0: superiorAnchor3, 1: inferiorAnchor3 }, # attach points for heh
        ]
    }, 2, font.getReverseGlyphMap())

Args:
    ligs (dict): A mapping of ligature names to an array of dictionaries:
        for each component glyph in the ligature, an dictionary mapping
        mark class IDs to anchors.
    numMarkClasses (int): The number of mark classes.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    An ``otTables.LigatureArray`` object if deltas were supplied.

---
## buildLigatureAttach
```python
from builder import buildLigatureAttach
```



---
## buildMarkArray
```python
from builder import buildMarkArray
```

Builds a mark array subtable.

As part of building mark-to-* positioning rules, you will need to define
a MarkArray subtable, which "defines the class and the anchor point
for a mark glyph." This function builds the mark array subtable.

Example::

    mark = {
        "acute": (0, buildAnchor(300,712)),
        # ...
    }
    markarray = buildMarkArray(marks, font.getReverseGlyphMap())

Args:
    marks (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being a tuple of mark class number and
        an ``otTables.Anchor`` object representing the mark's attachment
        point.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    An ``otTables.MarkArray`` object.

---
## buildMarkBasePos
```python
from builder import buildMarkBasePos
```

Build a list of MarkBasePos (GPOS4) subtables.

This routine turns a set of marks and bases into a list of mark-to-base
positioning subtables. Currently the list will contain a single subtable
containing all marks and bases, although at a later date it may return the
optimal list of subtables subsetting the marks and bases into groups which
save space. See :func:`buildMarkBasePosSubtable` below.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.MarkBasePosBuilder` instead.

Example::

    # a1, a2, a3, a4, a5 = buildAnchor(500, 100), ...

    marks = {"acute": (0, a1), "grave": (0, a1), "cedilla": (1, a2)}
    bases = {"a": {0: a3, 1: a5}, "b": {0: a4, 1: a5}}
    markbaseposes = buildMarkBasePos(marks, bases, font.getReverseGlyphMap())

Args:
    marks (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being a tuple of mark class number and
        an ``otTables.Anchor`` object representing the mark's attachment
        point. (See :func:`buildMarkArray`.)
    bases (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being dictionaries mapping mark class ID
        to the appropriate ``otTables.Anchor`` object used for attaching marks
        of that class. (See :func:`buildBaseArray`.)
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A list of ``otTables.MarkBasePos`` objects.

---
## buildMarkBasePosSubtable
```python
from builder import buildMarkBasePosSubtable
```

Build a single MarkBasePos (GPOS4) subtable.

This builds a mark-to-base lookup subtable containing all of the referenced
marks and bases. See :func:`buildMarkBasePos`.

Args:
    marks (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being a tuple of mark class number and
        an ``otTables.Anchor`` object representing the mark's attachment
        point. (See :func:`buildMarkArray`.)
    bases (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being dictionaries mapping mark class ID
        to the appropriate ``otTables.Anchor`` object used for attaching marks
        of that class. (See :func:`buildBaseArray`.)
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A ``otTables.MarkBasePos`` object.

---
## buildMarkLigPos
```python
from builder import buildMarkLigPos
```

Build a list of MarkLigPos (GPOS5) subtables.

This routine turns a set of marks and ligatures into a list of mark-to-ligature
positioning subtables. Currently the list will contain a single subtable
containing all marks and ligatures, although at a later date it may return
the optimal list of subtables subsetting the marks and ligatures into groups
which save space. See :func:`buildMarkLigPosSubtable` below.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.MarkLigPosBuilder` instead.

Example::

    # a1, a2, a3, a4, a5 = buildAnchor(500, 100), ...
    marks = {
        "acute": (0, a1),
        "grave": (0, a1),
        "cedilla": (1, a2)
    }
    ligs = {
        "f_i": [
            { 0: a3, 1: a5 }, # f
            { 0: a4, 1: a5 }  # i
            ],
    #   "c_t": [{...}, {...}]
    }
    markligposes = buildMarkLigPos(marks, ligs,
        font.getReverseGlyphMap())

Args:
    marks (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being a tuple of mark class number and
        an ``otTables.Anchor`` object representing the mark's attachment
        point. (See :func:`buildMarkArray`.)
    ligs (dict): A mapping of ligature names to an array of dictionaries:
        for each component glyph in the ligature, an dictionary mapping
        mark class IDs to anchors. (See :func:`buildLigatureArray`.)
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A list of ``otTables.MarkLigPos`` objects.

---
## buildMarkLigPosSubtable
```python
from builder import buildMarkLigPosSubtable
```

Build a single MarkLigPos (GPOS5) subtable.

This builds a mark-to-base lookup subtable containing all of the referenced
marks and bases. See :func:`buildMarkLigPos`.

Args:
    marks (dict): A dictionary mapping anchors to glyphs; the keys being
        glyph names, and the values being a tuple of mark class number and
        an ``otTables.Anchor`` object representing the mark's attachment
        point. (See :func:`buildMarkArray`.)
    ligs (dict): A mapping of ligature names to an array of dictionaries:
        for each component glyph in the ligature, an dictionary mapping
        mark class IDs to anchors. (See :func:`buildLigatureArray`.)
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A ``otTables.MarkLigPos`` object.

---
## buildMarkRecord
```python
from builder import buildMarkRecord
```



---
## buildMark2Record
```python
from builder import buildMark2Record
```



---
## _getValueFormat
```python
from builder import _getValueFormat
```



---
## buildPairPosClassesSubtable
```python
from builder import buildPairPosClassesSubtable
```

Builds a class pair adjustment (GPOS2 format 2) subtable.

Kerning tables are generally expressed as pair positioning tables using
class-based pair adjustments. This routine builds format 2 PairPos
subtables.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.ClassPairPosSubtableBuilder`
instead, as this takes care of ensuring that the supplied pairs can be
formed into non-overlapping classes and emitting individual subtables
whenever the non-overlapping requirement means that a new subtable is
required.

Example::

    pairs = {}

    pairs[(
        [ "K", "X" ],
        [ "W", "V" ]
    )] = ( buildValue(xAdvance=+5), buildValue() )
    # pairs[(... , ...)] = (..., ...)

    pairpos = buildPairPosClassesSubtable(pairs, font.getReverseGlyphMap())

Args:
    pairs (dict): Pair positioning data; the keys being a two-element
        tuple of lists of glyphnames, and the values being a two-element
        tuple of ``otTables.ValueRecord`` objects.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.
    valueFormat1: Force the "left" value records to the given format.
    valueFormat2: Force the "right" value records to the given format.

Returns:
    A ``otTables.PairPos`` object.

---
## buildPairPosGlyphs
```python
from builder import buildPairPosGlyphs
```

Builds a list of glyph-based pair adjustment (GPOS2 format 1) subtables.

This organises a list of pair positioning adjustments into subtables based
on common value record formats.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.PairPosBuilder`
instead.

Example::

    pairs = {
        ("K", "W"): ( buildValue(xAdvance=+5), buildValue() ),
        ("K", "V"): ( buildValue(xAdvance=+5), buildValue() ),
        # ...
    }

    subtables = buildPairPosGlyphs(pairs, font.getReverseGlyphMap())

Args:
    pairs (dict): Pair positioning data; the keys being a two-element
        tuple of glyphnames, and the values being a two-element
        tuple of ``otTables.ValueRecord`` objects.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A list of ``otTables.PairPos`` objects.

---
## buildPairPosGlyphsSubtable
```python
from builder import buildPairPosGlyphsSubtable
```

Builds a single glyph-based pair adjustment (GPOS2 format 1) subtable.

This builds a PairPos subtable from a dictionary of glyph pairs and
their positioning adjustments. See also :func:`buildPairPosGlyphs`.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.PairPosBuilder` instead.

Example::

    pairs = {
        ("K", "W"): ( buildValue(xAdvance=+5), buildValue() ),
        ("K", "V"): ( buildValue(xAdvance=+5), buildValue() ),
        # ...
    }

    pairpos = buildPairPosGlyphsSubtable(pairs, font.getReverseGlyphMap())

Args:
    pairs (dict): Pair positioning data; the keys being a two-element
        tuple of glyphnames, and the values being a two-element
        tuple of ``otTables.ValueRecord`` objects.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.
    valueFormat1: Force the "left" value records to the given format.
    valueFormat2: Force the "right" value records to the given format.

Returns:
    A ``otTables.PairPos`` object.

---
## buildSinglePos
```python
from builder import buildSinglePos
```

Builds a list of single adjustment (GPOS1) subtables.

This builds a list of SinglePos subtables from a dictionary of glyph
names and their positioning adjustments. The format of the subtables are
determined to optimize the size of the resulting subtables.
See also :func:`buildSinglePosSubtable`.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.SinglePosBuilder` instead.

Example::

    mapping = {
        "V": buildValue({ "xAdvance" : +5 }),
        # ...
    }

    subtables = buildSinglePos(pairs, font.getReverseGlyphMap())

Args:
    mapping (dict): A mapping between glyphnames and
        ``otTables.ValueRecord`` objects.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A list of ``otTables.SinglePos`` objects.

---
## buildSinglePosSubtable
```python
from builder import buildSinglePosSubtable
```

Builds a single adjustment (GPOS1) subtable.

This builds a list of SinglePos subtables from a dictionary of glyph
names and their positioning adjustments. The format of the subtable is
determined to optimize the size of the output.
See also :func:`buildSinglePos`.

Note that if you are implementing a layout compiler, you may find it more
flexible to use
:py:class:`fontTools.otlLib.lookupBuilders.SinglePosBuilder` instead.

Example::

    mapping = {
        "V": buildValue({ "xAdvance" : +5 }),
        # ...
    }

    subtable = buildSinglePos(pairs, font.getReverseGlyphMap())

Args:
    mapping (dict): A mapping between glyphnames and
        ``otTables.ValueRecord`` objects.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A ``otTables.SinglePos`` object.

---
## _getSinglePosTableKey
```python
from builder import _getSinglePosTableKey
```



---
## _getSinglePosValueKey
```python
from builder import _getSinglePosValueKey
```



---
## _makeDeviceTuple
```python
from builder import _makeDeviceTuple
```



---
## _getSinglePosValueSize
```python
from builder import _getSinglePosValueSize
```



---
## buildValue
```python
from builder import buildValue
```

Builds a positioning value record.

Value records are used to specify coordinates and adjustments for
positioning and attaching glyphs. Many of the positioning functions
in this library take ``otTables.ValueRecord`` objects as arguments.
This function builds value records from dictionaries.

Args:
    value (dict): A dictionary with zero or more of the following keys:
        - ``xPlacement``
        - ``yPlacement``
        - ``xAdvance``
        - ``yAdvance``
        - ``xPlaDevice``
        - ``yPlaDevice``
        - ``xAdvDevice``
        - ``yAdvDevice``

Returns:
    An ``otTables.ValueRecord`` object.

---
## buildAttachList
```python
from builder import buildAttachList
```

Builds an AttachList subtable.

A GDEF table may contain an Attachment Point List table (AttachList)
which stores the contour indices of attachment points for glyphs with
attachment points. This routine builds AttachList subtables.

Args:
    attachPoints (dict): A mapping between glyph names and a list of
        contour indices.

Returns:
    An ``otTables.AttachList`` object if attachment points are supplied,
        or ``None`` otherwise.

---
## buildAttachPoint
```python
from builder import buildAttachPoint
```



---
## buildCaretValueForCoord
```python
from builder import buildCaretValueForCoord
```



---
## buildCaretValueForPoint
```python
from builder import buildCaretValueForPoint
```



---
## buildLigCaretList
```python
from builder import buildLigCaretList
```

Builds a ligature caret list table.

Ligatures appear as a single glyph representing multiple characters; however
when, for example, editing text containing a ``f_i`` ligature, the user may
want to place the cursor between the ``f`` and the ``i``. The ligature caret
list in the GDEF table specifies the position to display the "caret" (the
character insertion indicator, typically a flashing vertical bar) "inside"
the ligature to represent an insertion point. The insertion positions may
be specified either by coordinate or by contour point.

Example::

    coords = {
        "f_f_i": [300, 600] # f|fi cursor at 300 units, ff|i cursor at 600.
    }
    points = {
        "c_t": [28] # c|t cursor appears at coordinate of contour point 28.
    }
    ligcaretlist = buildLigCaretList(coords, points, font.getReverseGlyphMap())

Args:
    coords: A mapping between glyph names and a list of coordinates for
        the insertion point of each ligature component after the first one.
    points: A mapping between glyph names and a list of contour points for
        the insertion point of each ligature component after the first one.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns:
    A ``otTables.LigCaretList`` object if any carets are present, or
        ``None`` otherwise.

---
## buildLigGlyph
```python
from builder import buildLigGlyph
```



---
## buildMarkGlyphSetsDef
```python
from builder import buildMarkGlyphSetsDef
```

Builds a mark glyph sets definition table.

OpenType Layout lookups may choose to use mark filtering sets to consider
or ignore particular combinations of marks. These sets are specified by
setting a flag on the lookup, but the mark filtering sets are defined in
the ``GDEF`` table. This routine builds the subtable containing the mark
glyph set definitions.

Example::

    set0 = set("acute", "grave")
    set1 = set("caron", "grave")

    markglyphsets = buildMarkGlyphSetsDef([set0, set1], font.getReverseGlyphMap())

Args:

    markSets: A list of sets of glyphnames.
    glyphMap: a glyph name to ID map, typically returned from
        ``font.getReverseGlyphMap()``.

Returns
    An ``otTables.MarkGlyphSetsDef`` object.

---
## ClassDefBuilder
```python
from builder import ClassDefBuilder
```

Helper for building ClassDef tables.

---
## buildStatTable
```python
from builder import buildStatTable
```

Add a 'STAT' table to 'ttFont'.

'axes' is a list of dictionaries describing axes and their
values.

Example::

    axes = [
        dict(
            tag="wght",
            name="Weight",
            ordering=0,  # optional
            values=[
                dict(value=100, name='Thin'),
                dict(value=300, name='Light'),
                dict(value=400, name='Regular', flags=0x2),
                dict(value=900, name='Black'),
            ],
        )
    ]

Each axis dict must have 'tag' and 'name' items. 'tag' maps
to the 'AxisTag' field. 'name' can be a name ID (int), a string,
or a dictionary containing multilingual names (see the
addMultilingualName() name table method), and will translate to
the AxisNameID field.

An axis dict may contain an 'ordering' item that maps to the
AxisOrdering field. If omitted, the order of the axes list is
used to calculate AxisOrdering fields.

The axis dict may contain a 'values' item, which is a list of
dictionaries describing AxisValue records belonging to this axis.

Each value dict must have a 'name' item, which can be a name ID
(int), a string, or a dictionary containing multilingual names,
like the axis name. It translates to the ValueNameID field.

Optionally the value dict can contain a 'flags' item. It maps to
the AxisValue Flags field, and will be 0 when omitted.

The format of the AxisValue is determined by the remaining contents
of the value dictionary:

If the value dict contains a 'value' item, an AxisValue record
Format 1 is created. If in addition to the 'value' item it contains
a 'linkedValue' item, an AxisValue record Format 3 is built.

If the value dict contains a 'nominalValue' item, an AxisValue
record Format 2 is built. Optionally it may contain 'rangeMinValue'
and 'rangeMaxValue' items. These map to -Infinity and +Infinity
respectively if omitted.

You cannot specify Format 4 AxisValue tables this way, as they are
not tied to a single axis, and specify a name for a location that
is defined by multiple axes values. Instead, you need to supply the
'locations' argument.

The optional 'locations' argument specifies AxisValue Format 4
tables. It should be a list of dicts, where each dict has a 'name'
item, which works just like the value dicts above, an optional
'flags' item (defaulting to 0x0), and a 'location' dict. A
location dict key is an axis tag, and the associated value is the
location on the specified axis. They map to the AxisIndex and Value
fields of the AxisValueRecord.

Example::

    locations = [
        dict(name='Regular ABCD', location=dict(wght=300, ABCD=100)),
        dict(name='Bold ABCD XYZ', location=dict(wght=600, ABCD=200)),
    ]

The optional 'elidedFallbackName' argument can be a name ID (int),
a string, a dictionary containing multilingual names, or a list of
STATNameStatements. It translates to the ElidedFallbackNameID field.

The 'ttFont' argument must be a TTFont instance that already has a
'name' table. If a 'STAT' table already exists, it will be
overwritten by the newly created one.

---
## _buildAxisRecords
```python
from builder import _buildAxisRecords
```



---
## _buildAxisValuesFormat4
```python
from builder import _buildAxisValuesFormat4
```



---
## _addName
```python
from builder import _addName
```



---
## buildMathTable
```python
from builder import buildMathTable
```

Add a 'MATH' table to 'ttFont'.

'constants' is a dictionary of math constants. The keys are the constant
names from the MATH table specification (with capital first letter), and the
values are the constant values as numbers.

'italicsCorrections' is a dictionary of italic corrections. The keys are the
glyph names, and the values are the italic corrections as numbers.

'topAccentAttachments' is a dictionary of top accent attachments. The keys
are the glyph names, and the values are the top accent horizontal positions
as numbers.

'extendedShapes' is a set of extended shape glyphs.

'mathKerns' is a dictionary of math kerns. The keys are the glyph names, and
the values are dictionaries. The keys of these dictionaries are the side
names ('TopRight', 'TopLeft', 'BottomRight', 'BottomLeft'), and the values
are tuples of two lists. The first list contains the correction heights as
numbers, and the second list contains the kern values as numbers.

'minConnectorOverlap' is the minimum connector overlap as a number.

'vertGlyphVariants' is a dictionary of vertical glyph variants. The keys are
the glyph names, and the values are tuples of glyph name and full advance height.

'horizGlyphVariants' is a dictionary of horizontal glyph variants. The keys
are the glyph names, and the values are tuples of glyph name and full
advance width.

'vertGlyphAssembly' is a dictionary of vertical glyph assemblies. The keys
are the glyph names, and the values are tuples of assembly parts and italics
correction. The assembly parts are tuples of glyph name, flags, start
connector length, end connector length, and full advance height.

'horizGlyphAssembly' is a dictionary of horizontal glyph assemblies. The
keys are the glyph names, and the values are tuples of assembly parts
and italics correction. The assembly parts are tuples of glyph name, flags,
start connector length, end connector length, and full advance width.

Where a number is expected, an integer or a float can be used. The floats
will be rounded.

Example::

    constants = {
        "ScriptPercentScaleDown": 70,
        "ScriptScriptPercentScaleDown": 50,
        "DelimitedSubFormulaMinHeight": 24,
        "DisplayOperatorMinHeight": 60,
        ...
    }
    italicsCorrections = {
        "fitalic-math": 100,
        "fbolditalic-math": 120,
        ...
    }
    topAccentAttachments = {
        "circumflexcomb": 500,
        "acutecomb": 400,
        "A": 300,
        "B": 340,
        ...
    }
    extendedShapes = {"parenleft", "parenright", ...}
    mathKerns = {
        "A": {
            "TopRight": ([-50, -100], [10, 20, 30]),
            "TopLeft": ([50, 100], [10, 20, 30]),
            ...
        },
        ...
    }
    vertGlyphVariants = {
        "parenleft": [("parenleft", 700), ("parenleft.size1", 1000), ...],
        "parenright": [("parenright", 700), ("parenright.size1", 1000), ...],
        ...
    }
    vertGlyphAssembly = {
        "braceleft": [
            (
                ("braceleft.bottom", 0, 0, 200, 500),
                ("braceleft.extender", 1, 200, 200, 200)),
                ("braceleft.middle", 0, 100, 100, 700),
                ("braceleft.extender", 1, 200, 200, 200),
                ("braceleft.top", 0, 200, 0, 500),
            ),
            100,
        ],
        ...
    }

---
## _buildMathConstants
```python
from builder import _buildMathConstants
```



---
## _buildMathGlyphInfo
```python
from builder import _buildMathGlyphInfo
```



---
## _buildMathVariants
```python
from builder import _buildMathVariants
```



---
## _buildMathGlyphConstruction
```python
from builder import _buildMathGlyphConstruction
```



---
## _mathValueRecord
```python
from builder import _mathValueRecord
```



---
## equals
```python
from builder import equals
```



---
## inferGlyphClasses
```python
from builder import inferGlyphClasses
```



---
## getAlternateGlyphs
```python
from builder import getAlternateGlyphs
```



---
## buildLookup_
```python
from builder import buildLookup_
```



---
## buildMarkClasses_
```python
from builder import buildMarkClasses_
```

{"cedilla": ("BOTTOM", ast.Anchor), ...} --> {"BOTTOM":0, "TOP":1}

Helper for MarkBasePostBuilder, MarkLigPosBuilder, and
MarkMarkPosBuilder. Seems to return the same numeric IDs
for mark classes as the AFDKO makeotf tool.

---
## setBacktrackCoverage_
```python
from builder import setBacktrackCoverage_
```



---
## setLookAheadCoverage_
```python
from builder import setLookAheadCoverage_
```



---
## setInputCoverage_
```python
from builder import setInputCoverage_
```



---
## setCoverage_
```python
from builder import setCoverage_
```



---
## build_subst_subtables
```python
from builder import build_subst_subtables
```



---
## add_subtable_break
```python
from builder import add_subtable_break
```



---
## build
```python
from builder import build
```



---
## is_subtable_break
```python
from builder import is_subtable_break
```



---
## addRule
```python
from builder import addRule
```



---
## hasPrefixOrSuffix
```python
from builder import hasPrefixOrSuffix
```



---
## hasAnyGlyphClasses
```python
from builder import hasAnyGlyphClasses
```



---
## format2ClassDefs
```python
from builder import format2ClassDefs
```



---
## _classBuilderForContext
```python
from builder import _classBuilderForContext
```



---
## rulesets
```python
from builder import rulesets
```



---
## getCompiledSize_
```python
from builder import getCompiledSize_
```



---
## buildFormat1Subtable
```python
from builder import buildFormat1Subtable
```



---
## buildFormat2Subtable
```python
from builder import buildFormat2Subtable
```



---
## buildFormat3Subtable
```python
from builder import buildFormat3Subtable
```



---
## buildLookupList
```python
from builder import buildLookupList
```



---
## newSubtable_
```python
from builder import newSubtable_
```



---
## ruleSetAttr_
```python
from builder import ruleSetAttr_
```



---
## ruleAttr_
```python
from builder import ruleAttr_
```



---
## newRuleSet_
```python
from builder import newRuleSet_
```



---
## newRule_
```python
from builder import newRule_
```



---
## attachSubtableWithCount_
```python
from builder import attachSubtableWithCount_
```



---
## newLookupRecord_
```python
from builder import newLookupRecord_
```



---
## find_chainable_single_pos
```python
from builder import find_chainable_single_pos
```

Helper for add_single_pos_chained_()

---
## find_chainable_subst
```python
from builder import find_chainable_subst
```

Helper for add_{single,multi}_subst_chained_()

---
## add_attachment
```python
from builder import add_attachment
```

Adds attachment information to the cursive positioning lookup.

Args:
    location: A string or tuple representing the location in the
        original source which produced this lookup. (Unused.)
    glyphs: A list of glyph names sharing these entry and exit
        anchor locations.
    entryAnchor: A ``otTables.Anchor`` object representing the
        entry anchor, or ``None`` if no entry anchor is present.
    exitAnchor: A ``otTables.Anchor`` object representing the
        exit anchor, or ``None`` if no exit anchor is present.

---
## addPair
```python
from builder import addPair
```

Add a pair positioning rule.

Args:
    gc1: A set of glyph names for the "left" glyph
    value1: An ``otTables.ValueRecord`` object for the left glyph's
        positioning.
    gc2: A set of glyph names for the "right" glyph
    value2: An ``otTables.ValueRecord`` object for the right glyph's
        positioning.

---
## addSubtableBreak
```python
from builder import addSubtableBreak
```

Add an explicit subtable break at this point.

---
## subtables
```python
from builder import subtables
```

Return the list of ``otTables.PairPos`` subtables constructed.

---
## flush_
```python
from builder import flush_
```



---
## addClassPair
```python
from builder import addClassPair
```

Add a class pair positioning rule to the current lookup.

Args:
    location: A string or tuple representing the location in the
        original source which produced this rule. Unused.
    glyphclass1: A set of glyph names for the "left" glyph in the pair.
    value1: A ``otTables.ValueRecord`` for positioning the left glyph.
    glyphclass2: A set of glyph names for the "right" glyph in the pair.
    value2: A ``otTables.ValueRecord`` for positioning the right glyph.

---
## addGlyphPair
```python
from builder import addGlyphPair
```

Add a glyph pair positioning rule to the current lookup.

Args:
    location: A string or tuple representing the location in the
        original source which produced this rule.
    glyph1: A glyph name for the "left" glyph in the pair.
    value1: A ``otTables.ValueRecord`` for positioning the left glyph.
    glyph2: A glyph name for the "right" glyph in the pair.
    value2: A ``otTables.ValueRecord`` for positioning the right glyph.

---
## add_pos
```python
from builder import add_pos
```

Add a single positioning rule.

Args:
    location: A string or tuple representing the location in the
        original source which produced this lookup.
    glyph: A glyph name.
    otValueRection: A ``otTables.ValueRecord`` used to position the
        glyph.

---
## can_add
```python
from builder import can_add
```



---
## canAdd
```python
from builder import canAdd
```



---
## classes
```python
from builder import classes
```



---
## __name__
```python
from maxContextCalc import __name__
```



---
## maxCtxFont
```python
from maxContextCalc import maxCtxFont
```

Calculate the usMaxContext value for an entire font.

---
## maxCtxSubtable
```python
from maxContextCalc import maxCtxSubtable
```

Calculate usMaxContext based on a single lookup table (and an existing
max value).

---
## maxCtxContextualSubtable
```python
from maxContextCalc import maxCtxContextualSubtable
```

Calculate usMaxContext based on a contextual feature subtable.

---
## maxCtxContextualRule
```python
from maxContextCalc import maxCtxContextualRule
```

Calculate usMaxContext based on a contextual feature rule.

---
## __name__
```python
from kerning import __name__
```



---
## lookupKerningValue
```python
from kerning import lookupKerningValue
```

Note: This expects kerning to be a flat dictionary
of kerning pairs, not the nested structure used
in kerning.plist.

>>> groups = {
...     "public.kern1.O" : ["O", "D", "Q"],
...     "public.kern2.E" : ["E", "F"]
... }
>>> kerning = {
...     ("public.kern1.O", "public.kern2.E") : -100,
...     ("public.kern1.O", "F") : -200,
...     ("D", "F") : -300
... }
>>> lookupKerningValue(("D", "F"), kerning, groups)
-300
>>> lookupKerningValue(("O", "F"), kerning, groups)
-200
>>> lookupKerningValue(("O", "E"), kerning, groups)
-100
>>> lookupKerningValue(("O", "O"), kerning, groups)
0
>>> lookupKerningValue(("E", "E"), kerning, groups)
0
>>> lookupKerningValue(("E", "O"), kerning, groups)
0
>>> lookupKerningValue(("X", "X"), kerning, groups)
0
>>> lookupKerningValue(("public.kern1.O", "public.kern2.E"),
...     kerning, groups)
-100
>>> lookupKerningValue(("public.kern1.O", "F"), kerning, groups)
-200
>>> lookupKerningValue(("O", "public.kern2.E"), kerning, groups)
-100
>>> lookupKerningValue(("public.kern1.X", "public.kern2.X"), kerning, groups)
0

---
## isDictEnough
```python
from validators import isDictEnough
```

Some objects will likely come in that aren't
dicts but are dict-ish enough.

---
## genericTypeValidator
```python
from validators import genericTypeValidator
```

Generic. (Added at version 2.)

---
## genericIntListValidator
```python
from validators import genericIntListValidator
```

Generic. (Added at version 2.)

---
## genericNonNegativeIntValidator
```python
from validators import genericNonNegativeIntValidator
```

Generic. (Added at version 3.)

---
## genericNonNegativeNumberValidator
```python
from validators import genericNonNegativeNumberValidator
```

Generic. (Added at version 3.)

---
## genericDictValidator
```python
from validators import genericDictValidator
```

Generic. (Added at version 3.)

---
## fontInfoStyleMapStyleNameValidator
```python
from validators import fontInfoStyleMapStyleNameValidator
```

Version 2+.

---
## fontInfoOpenTypeGaspRangeRecordsValidator
```python
from validators import fontInfoOpenTypeGaspRangeRecordsValidator
```

Version 3+.

---
## fontInfoOpenTypeHeadCreatedValidator
```python
from validators import fontInfoOpenTypeHeadCreatedValidator
```

Version 2+.

---
## fontInfoOpenTypeNameRecordsValidator
```python
from validators import fontInfoOpenTypeNameRecordsValidator
```

Version 3+.

---
## fontInfoOpenTypeOS2WeightClassValidator
```python
from validators import fontInfoOpenTypeOS2WeightClassValidator
```

Version 2+.

---
## fontInfoOpenTypeOS2WidthClassValidator
```python
from validators import fontInfoOpenTypeOS2WidthClassValidator
```

Version 2+.

---
## fontInfoVersion2OpenTypeOS2PanoseValidator
```python
from validators import fontInfoVersion2OpenTypeOS2PanoseValidator
```

Version 2.

---
## fontInfoVersion3OpenTypeOS2PanoseValidator
```python
from validators import fontInfoVersion3OpenTypeOS2PanoseValidator
```

Version 3+.

---
## fontInfoOpenTypeOS2FamilyClassValidator
```python
from validators import fontInfoOpenTypeOS2FamilyClassValidator
```

Version 2+.

---
## fontInfoPostscriptBluesValidator
```python
from validators import fontInfoPostscriptBluesValidator
```

Version 2+.

---
## fontInfoPostscriptOtherBluesValidator
```python
from validators import fontInfoPostscriptOtherBluesValidator
```

Version 2+.

---
## fontInfoPostscriptStemsValidator
```python
from validators import fontInfoPostscriptStemsValidator
```

Version 2+.

---
## fontInfoPostscriptWindowsCharacterSetValidator
```python
from validators import fontInfoPostscriptWindowsCharacterSetValidator
```

Version 2+.

---
## fontInfoWOFFMetadataUniqueIDValidator
```python
from validators import fontInfoWOFFMetadataUniqueIDValidator
```

Version 3+.

---
## fontInfoWOFFMetadataVendorValidator
```python
from validators import fontInfoWOFFMetadataVendorValidator
```

Version 3+.

---
## fontInfoWOFFMetadataCreditsValidator
```python
from validators import fontInfoWOFFMetadataCreditsValidator
```

Version 3+.

---
## fontInfoWOFFMetadataDescriptionValidator
```python
from validators import fontInfoWOFFMetadataDescriptionValidator
```

Version 3+.

---
## fontInfoWOFFMetadataLicenseValidator
```python
from validators import fontInfoWOFFMetadataLicenseValidator
```

Version 3+.

---
## fontInfoWOFFMetadataTrademarkValidator
```python
from validators import fontInfoWOFFMetadataTrademarkValidator
```

Version 3+.

---
## fontInfoWOFFMetadataCopyrightValidator
```python
from validators import fontInfoWOFFMetadataCopyrightValidator
```

Version 3+.

---
## fontInfoWOFFMetadataLicenseeValidator
```python
from validators import fontInfoWOFFMetadataLicenseeValidator
```

Version 3+.

---
## fontInfoWOFFMetadataTextValue
```python
from validators import fontInfoWOFFMetadataTextValue
```

Version 3+.

---
## fontInfoWOFFMetadataExtensionsValidator
```python
from validators import fontInfoWOFFMetadataExtensionsValidator
```

Version 3+.

---
## fontInfoWOFFMetadataExtensionValidator
```python
from validators import fontInfoWOFFMetadataExtensionValidator
```

Version 3+.

---
## fontInfoWOFFMetadataExtensionItemValidator
```python
from validators import fontInfoWOFFMetadataExtensionItemValidator
```

Version 3+.

---
## fontInfoWOFFMetadataExtensionNameValidator
```python
from validators import fontInfoWOFFMetadataExtensionNameValidator
```

Version 3+.

---
## fontInfoWOFFMetadataExtensionValueValidator
```python
from validators import fontInfoWOFFMetadataExtensionValueValidator
```

Version 3+.

---
## guidelinesValidator
```python
from validators import guidelinesValidator
```

Version 3+.

---
## guidelineValidator
```python
from validators import guidelineValidator
```

Version 3+.

---
## anchorsValidator
```python
from validators import anchorsValidator
```

Version 3+.

---
## anchorValidator
```python
from validators import anchorValidator
```

Version 3+.

---
## identifierValidator
```python
from validators import identifierValidator
```

Version 3+.

>>> identifierValidator("a")
True
>>> identifierValidator("")
False
>>> identifierValidator("a" * 101)
False

---
## colorValidator
```python
from validators import colorValidator
```

Version 3+.

>>> colorValidator("0,0,0,0")
True
>>> colorValidator(".5,.5,.5,.5")
True
>>> colorValidator("0.5,0.5,0.5,0.5")
True
>>> colorValidator("1,1,1,1")
True

>>> colorValidator("2,0,0,0")
False
>>> colorValidator("0,2,0,0")
False
>>> colorValidator("0,0,2,0")
False
>>> colorValidator("0,0,0,2")
False

>>> colorValidator("1r,1,1,1")
False
>>> colorValidator("1,1g,1,1")
False
>>> colorValidator("1,1,1b,1")
False
>>> colorValidator("1,1,1,1a")
False

>>> colorValidator("1 1 1 1")
False
>>> colorValidator("1 1,1,1")
False
>>> colorValidator("1,1 1,1")
False
>>> colorValidator("1,1,1 1")
False

>>> colorValidator("1, 1, 1, 1")
True

---
## imageValidator
```python
from validators import imageValidator
```

Version 3+.

---
## pngValidator
```python
from validators import pngValidator
```

Version 3+.

This checks the signature of the image data.

---
## layerContentsValidator
```python
from validators import layerContentsValidator
```

Check the validity of layercontents.plist.
Version 3+.

---
## groupsValidator
```python
from validators import groupsValidator
```

Check the validity of the groups.
Version 3+ (though it's backwards compatible with UFO 1 and UFO 2).

>>> groups = {"A" : ["A", "A"], "A2" : ["A"]}
>>> groupsValidator(groups)
(True, None)

>>> groups = {"" : ["A"]}
>>> valid, msg = groupsValidator(groups)
>>> valid
False
>>> print(msg)
A group has an empty name.

>>> groups = {"public.awesome" : ["A"]}
>>> groupsValidator(groups)
(True, None)

>>> groups = {"public.kern1." : ["A"]}
>>> valid, msg = groupsValidator(groups)
>>> valid
False
>>> print(msg)
The group data contains a kerning group with an incomplete name.
>>> groups = {"public.kern2." : ["A"]}
>>> valid, msg = groupsValidator(groups)
>>> valid
False
>>> print(msg)
The group data contains a kerning group with an incomplete name.

>>> groups = {"public.kern1.A" : ["A"], "public.kern2.A" : ["A"]}
>>> groupsValidator(groups)
(True, None)

>>> groups = {"public.kern1.A1" : ["A"], "public.kern1.A2" : ["A"]}
>>> valid, msg = groupsValidator(groups)
>>> valid
False
>>> print(msg)
The glyph "A" occurs in too many kerning groups.

---
## kerningValidator
```python
from validators import kerningValidator
```

Check the validity of the kerning data structure.
Version 3+ (though it's backwards compatible with UFO 1 and UFO 2).

>>> kerning = {"A" : {"B" : 100}}
>>> kerningValidator(kerning)
(True, None)

>>> kerning = {"A" : ["B"]}
>>> valid, msg = kerningValidator(kerning)
>>> valid
False
>>> print(msg)
The kerning data is not in the correct format.

>>> kerning = {"A" : {"B" : "100"}}
>>> valid, msg = kerningValidator(kerning)
>>> valid
False
>>> print(msg)
The kerning data is not in the correct format.

---
## fontLibValidator
```python
from validators import fontLibValidator
```

Check the validity of the lib.
Version 3+ (though it's backwards compatible with UFO 1 and UFO 2).

>>> lib = {"foo" : "bar"}
>>> fontLibValidator(lib)
(True, None)

>>> lib = {"public.awesome" : "hello"}
>>> fontLibValidator(lib)
(True, None)

>>> lib = {"public.glyphOrder" : ["A", "C", "B"]}
>>> fontLibValidator(lib)
(True, None)

>>> lib = "hello"
>>> valid, msg = fontLibValidator(lib)
>>> valid
False
>>> print(msg)  # doctest: +ELLIPSIS
The lib data is not in the correct format: expected a dictionary, ...

>>> lib = {1: "hello"}
>>> valid, msg = fontLibValidator(lib)
>>> valid
False
>>> print(msg)
The lib key is not properly formatted: expected str, found int: 1

>>> lib = {"public.glyphOrder" : "hello"}
>>> valid, msg = fontLibValidator(lib)
>>> valid
False
>>> print(msg)  # doctest: +ELLIPSIS
public.glyphOrder is not properly formatted: expected list or tuple,...

>>> lib = {"public.glyphOrder" : ["A", 1, "B"]}
>>> valid, msg = fontLibValidator(lib)
>>> valid
False
>>> print(msg)  # doctest: +ELLIPSIS
public.glyphOrder is not properly formatted: expected str,...

---
## glyphLibValidator
```python
from validators import glyphLibValidator
```

Check the validity of the lib.
Version 3+ (though it's backwards compatible with UFO 1 and UFO 2).

>>> lib = {"foo" : "bar"}
>>> glyphLibValidator(lib)
(True, None)

>>> lib = {"public.awesome" : "hello"}
>>> glyphLibValidator(lib)
(True, None)

>>> lib = {"public.markColor" : "1,0,0,0.5"}
>>> glyphLibValidator(lib)
(True, None)

>>> lib = {"public.markColor" : 1}
>>> valid, msg = glyphLibValidator(lib)
>>> valid
False
>>> print(msg)
public.markColor is not properly formatted.

---
## UFOFormatVersion
```python
from __init__ import UFOFormatVersion
```



---
## UFOFileStructure
```python
from __init__ import UFOFileStructure
```



---
## _UFOBaseIO
```python
from __init__ import _UFOBaseIO
```



---
## UFOReader
```python
from __init__ import UFOReader
```

Read the various components of the .ufo.

By default read data is validated. Set ``validate`` to
``False`` to not validate the data.

---
## UFOWriter
```python
from __init__ import UFOWriter
```

Write the various components of the .ufo.

By default, the written data will be validated before writing. Set ``validate`` to
``False`` if you do not want to validate the data. Validation can also be overriden
on a per method level if desired.

The ``formatVersion`` argument allows to specify the UFO format version as a tuple
of integers (major, minor), or as a single integer for the major digit only (minor
is implied as 0). By default the latest formatVersion will be used; currently it's
3.0, which is equivalent to formatVersion=(3, 0).

An UnsupportedUFOFormat exception is raised if the requested UFO formatVersion is
not supported.

---
## _sniffFileStructure
```python
from __init__ import _sniffFileStructure
```

Return UFOFileStructure.ZIP if the UFO at path 'ufo_path' (str)
is a zip file, else return UFOFileStructure.PACKAGE if 'ufo_path' is a
directory.
Raise UFOLibError if it is a file with unknown structure, or if the path
does not exist.

---
## makeUFOPath
```python
from __init__ import makeUFOPath
```

Return a .ufo pathname.

>>> makeUFOPath("directory/something.ext") == (
...         os.path.join('directory', 'something.ufo'))
True
>>> makeUFOPath("directory/something.another.thing.ext") == (
...         os.path.join('directory', 'something.another.thing.ufo'))
True

---
## validateFontInfoVersion2ValueForAttribute
```python
from __init__ import validateFontInfoVersion2ValueForAttribute
```

This performs very basic validation of the value for attribute
following the UFO 2 fontinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the value
is of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## validateInfoVersion2Data
```python
from __init__ import validateInfoVersion2Data
```

This performs very basic validation of the value for infoData
following the UFO 2 fontinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the values
are of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## validateFontInfoVersion3ValueForAttribute
```python
from __init__ import validateFontInfoVersion3ValueForAttribute
```

This performs very basic validation of the value for attribute
following the UFO 3 fontinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the value
is of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## validateInfoVersion3Data
```python
from __init__ import validateInfoVersion3Data
```

This performs very basic validation of the value for infoData
following the UFO 3 fontinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the values
are of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## _flipDict
```python
from __init__ import _flipDict
```



---
## convertFontInfoValueForAttributeFromVersion1ToVersion2
```python
from __init__ import convertFontInfoValueForAttributeFromVersion1ToVersion2
```

Convert value from version 1 to version 2 format.
Returns the new attribute name and the converted value.
If the value is None, None will be returned for the new value.

---
## convertFontInfoValueForAttributeFromVersion2ToVersion1
```python
from __init__ import convertFontInfoValueForAttributeFromVersion2ToVersion1
```

Convert value from version 2 to version 1 format.
Returns the new attribute name and the converted value.
If the value is None, None will be returned for the new value.

---
## _convertFontInfoDataVersion1ToVersion2
```python
from __init__ import _convertFontInfoDataVersion1ToVersion2
```



---
## _convertFontInfoDataVersion2ToVersion1
```python
from __init__ import _convertFontInfoDataVersion2ToVersion1
```



---
## convertFontInfoValueForAttributeFromVersion2ToVersion3
```python
from __init__ import convertFontInfoValueForAttributeFromVersion2ToVersion3
```

Convert value from version 2 to version 3 format.
Returns the new attribute name and the converted value.
If the value is None, None will be returned for the new value.

---
## convertFontInfoValueForAttributeFromVersion3ToVersion2
```python
from __init__ import convertFontInfoValueForAttributeFromVersion3ToVersion2
```

Convert value from version 3 to version 2 format.
Returns the new attribute name and the converted value.
If the value is None, None will be returned for the new value.

---
## _convertFontInfoDataVersion3ToVersion2
```python
from __init__ import _convertFontInfoDataVersion3ToVersion2
```



---
## _convertFontInfoDataVersion2ToVersion3
```python
from __init__ import _convertFontInfoDataVersion2ToVersion3
```



---
## getFileModificationTime
```python
from __init__ import getFileModificationTime
```

Returns the modification time for the file at the given path, as a
floating point number giving the number of seconds since the epoch.
The path must be relative to the UFO path.
Returns None if the file does not exist.

---
## _getPlist
```python
from __init__ import _getPlist
```

Read a property list relative to the UFO filesystem's root.
Raises UFOLibError if the file is missing and default is None,
otherwise default is returned.

The errors that could be raised during the reading of a plist are
unpredictable and/or too large to list, so, a blind try: except:
is done. If an exception occurs, a UFOLibError will be raised.

---
## _writePlist
```python
from __init__ import _writePlist
```

Write a property list to a file relative to the UFO filesystem's root.

Do this sort of atomically, making it harder to corrupt existing files,
for example when plistlib encounters an error halfway during write.
This also checks to see if text matches the text that is already in the
file at path. If so, the file is not rewritten so that the modification
date is preserved.

The errors that could be raised during the writing of a plist are
unpredictable and/or too large to list, so, a blind try: except: is done.
If an exception occurs, a UFOLibError will be raised.

---
## _get_path
```python
from __init__ import _get_path
```



---
## _get_formatVersion
```python
from __init__ import _get_formatVersion
```



---
## formatVersionTuple
```python
from __init__ import formatVersionTuple
```

The (major, minor) format version of the UFO.
This is determined by reading metainfo.plist during __init__.

---
## _get_fileStructure
```python
from __init__ import _get_fileStructure
```



---
## _upConvertKerning
```python
from __init__ import _upConvertKerning
```

Up convert kerning and groups in UFO 1 and 2.
The data will be held internally until each bit of data
has been retrieved. The conversion of both must be done
at once, so the raw data is cached and an error is raised
if one bit of data becomes obsolete before it is called.

``validate`` will validate the data.

---
## readBytesFromPath
```python
from __init__ import readBytesFromPath
```

Returns the bytes in the file at the given path.
The path must be relative to the UFO's filesystem root.
Returns None if the file does not exist.

---
## getReadFileForPath
```python
from __init__ import getReadFileForPath
```

Returns a file (or file-like) object for the file at the given path.
The path must be relative to the UFO path.
Returns None if the file does not exist.
By default the file is opened in binary mode (reads bytes).
If encoding is passed, the file is opened in text mode (reads str).

Note: The caller is responsible for closing the open file.

---
## _readMetaInfo
```python
from __init__ import _readMetaInfo
```

Read metainfo.plist and return raw data. Only used for internal operations.

``validate`` will validate the read data, by default it is set
to the class's validate value, can be overridden.

---
## readMetaInfo
```python
from __init__ import readMetaInfo
```

Read metainfo.plist and set formatVersion. Only used for internal operations.

``validate`` will validate the read data, by default it is set
to the class's validate value, can be overridden.

---
## _readGroups
```python
from __init__ import _readGroups
```



---
## readGroups
```python
from __init__ import readGroups
```

Read groups.plist. Returns a dict.
``validate`` will validate the read data, by default it is set to the
class's validate value, can be overridden.

---
## getKerningGroupConversionRenameMaps
```python
from __init__ import getKerningGroupConversionRenameMaps
```

Get maps defining the renaming that was done during any
needed kerning group conversion. This method returns a
dictionary of this form::

        {
                "side1" : {"old group name" : "new group name"},
                "side2" : {"old group name" : "new group name"}
        }

When no conversion has been performed, the side1 and side2
dictionaries will be empty.

``validate`` will validate the groups, by default it is set to the
class's validate value, can be overridden.

---
## _readInfo
```python
from __init__ import _readInfo
```



---
## readInfo
```python
from __init__ import readInfo
```

Read fontinfo.plist. It requires an object that allows
setting attributes with names that follow the fontinfo.plist
version 3 specification. This will write the attributes
defined in the file into the object.

``validate`` will validate the read data, by default it is set to the
class's validate value, can be overridden.

---
## _readKerning
```python
from __init__ import _readKerning
```



---
## readKerning
```python
from __init__ import readKerning
```

Read kerning.plist. Returns a dict.

``validate`` will validate the kerning data, by default it is set to the
class's validate value, can be overridden.

---
## readLib
```python
from __init__ import readLib
```

Read the lib element for the whole document.

---
## readFeatures
```python
from __init__ import readFeatures
```

Read features.fea. Return a string.
The returned string is empty if the file is missing.

---
## _readLayerContents
```python
from __init__ import _readLayerContents
```

Rebuild the layer contents list by checking what glyphsets
are available on disk.

``validate`` will validate the layer contents.

---
## getLayerNames
```python
from __init__ import getLayerNames
```

Get the ordered layer names from layercontents.plist.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## getDefaultLayerName
```python
from __init__ import getDefaultLayerName
```

Get the default layer name from layercontents.plist.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## getGlyphSet
```python
from __init__ import getGlyphSet
```

Return a generic GlyphSet, which is a dict-like object
mapping glyph names to glyph objects. The returned glyph objects
have a .draw() method that supports the Pen protocol, and will
have an attribute named 'width', but only *after* the .draw() method
has been called.

In the case of Type 1, the GlyphSet is simply the CharStrings dict.

---
## getCharacterMapping
```python
from __init__ import getCharacterMapping
```

Return a dictionary that maps unicode values (ints) to
lists of glyph names.

---
## getDataDirectoryListing
```python
from __init__ import getDataDirectoryListing
```

Returns a list of all files in the data directory.
The returned paths will be relative to the UFO.
This will not list directory names, only file names.
Thus, empty directories will be skipped.

---
## getImageDirectoryListing
```python
from __init__ import getImageDirectoryListing
```

Returns a list of all image file names in
the images directory. Each of the images will
have been verified to have the PNG signature.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## readData
```python
from __init__ import readData
```

Return bytes for the file named 'fileName' inside the 'data/' directory.

---
## readImage
```python
from __init__ import readImage
```

Return image data for the file named fileName.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## _get_fileCreator
```python
from __init__ import _get_fileCreator
```



---
## copyFromReader
```python
from __init__ import copyFromReader
```

Copy the sourcePath in the provided UFOReader to destPath
in this writer. The paths must be relative. This works with
both individual files and directories.

---
## writeBytesToPath
```python
from __init__ import writeBytesToPath
```

Write bytes to a path relative to the UFO filesystem's root.
If writing to an existing UFO, check to see if data matches the data
that is already in the file at path; if so, the file is not rewritten
so that the modification date is preserved.
If needed, the directory tree for the given path will be built.

---
## getFileObjectForPath
```python
from __init__ import getFileObjectForPath
```

Returns a file (or file-like) object for the
file at the given path. The path must be relative
to the UFO path. Returns None if the file does
not exist and the mode is "r" or "rb.
An encoding may be passed if the file is opened in text mode.

Note: The caller is responsible for closing the open file.

---
## removePath
```python
from __init__ import removePath
```

Remove the file (or directory) at path. The path
must be relative to the UFO.
Raises UFOLibError if the path doesn't exist.
If force=True, ignore non-existent paths.
If the directory where 'path' is located becomes empty, it will
be automatically removed, unless 'removeEmptyParents' is False.

---
## setModificationTime
```python
from __init__ import setModificationTime
```

Set the UFO modification time to the current time.
This is never called automatically. It is up to the
caller to call this when finished working on the UFO.

---
## _writeMetaInfo
```python
from __init__ import _writeMetaInfo
```



---
## setKerningGroupConversionRenameMaps
```python
from __init__ import setKerningGroupConversionRenameMaps
```

Set maps defining the renaming that should be done
when writing groups and kerning in UFO 1 and UFO 2.
This will effectively undo the conversion done when
UFOReader reads this data. The dictionary should have
this form::

        {
                "side1" : {"group name to use when writing" : "group name in data"},
                "side2" : {"group name to use when writing" : "group name in data"}
        }

This is the same form returned by UFOReader's
getKerningGroupConversionRenameMaps method.

---
## writeGroups
```python
from __init__ import writeGroups
```

Write groups.plist. This method requires a
dict of glyph groups as an argument.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## writeInfo
```python
from __init__ import writeInfo
```

Write info.plist. This method requires an object
that supports getting attributes that follow the
fontinfo.plist version 2 specification. Attributes
will be taken from the given object and written
into the file.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## writeKerning
```python
from __init__ import writeKerning
```

Write kerning.plist. This method requires a
dict of kerning pairs as an argument.

This performs basic structural validation of the kerning,
but it does not check for compliance with the spec in
regards to conflicting pairs. The assumption is that the
kerning data being passed is standards compliant.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## writeLib
```python
from __init__ import writeLib
```

Write lib.plist. This method requires a
lib dict as an argument.

``validate`` will validate the data, by default it is set to the
class's validate value, can be overridden.

---
## writeFeatures
```python
from __init__ import writeFeatures
```

Write features.fea. This method requires a
features string as an argument.

---
## writeLayerContents
```python
from __init__ import writeLayerContents
```

Write the layercontents.plist file. This method  *must* be called
after all glyph sets have been written.

---
## _findDirectoryForLayerName
```python
from __init__ import _findDirectoryForLayerName
```



---
## _getDefaultGlyphSet
```python
from __init__ import _getDefaultGlyphSet
```



---
## _getGlyphSetFormatVersion3
```python
from __init__ import _getGlyphSetFormatVersion3
```



---
## renameGlyphSet
```python
from __init__ import renameGlyphSet
```

Rename a glyph set.

Note: if a GlyphSet object has already been retrieved for
layerName, it is up to the caller to inform that object that
the directory it represents has changed.

---
## deleteGlyphSet
```python
from __init__ import deleteGlyphSet
```

Remove the glyph set matching layerName.

---
## writeData
```python
from __init__ import writeData
```

Write data to fileName in the 'data' directory.
The data must be a bytes string.

---
## removeData
```python
from __init__ import removeData
```

Remove the file named fileName from the data directory.

---
## writeImage
```python
from __init__ import writeImage
```

Write data to fileName in the images directory.
The data must be a valid PNG.

---
## removeImage
```python
from __init__ import removeImage
```

Remove the file named fileName from the
images directory.

---
## copyImageFromReader
```python
from __init__ import copyImageFromReader
```

Copy the sourceFileName in the provided UFOReader to destFileName
in this writer. This uses the most memory efficient method possible
for copying the data possible.

---
## __name__
```python
from glifLib import __name__
```

glifLib.py -- Generic module for reading and writing the .glif format.

More info about the .glif format (GLyphInterchangeFormat) can be found here:

        http://unifiedfontobject.org

The main class in this module is GlyphSet. It manages a set of .glif files
in a folder. It offers two ways to read glyph data, and one way to write
glyph data. See the class doc string for details.

---
## GLIFFormatVersion
```python
from glifLib import GLIFFormatVersion
```



---
## Glyph
```python
from glifLib import Glyph
```

Minimal glyph object. It has no glyph attributes until either
the draw() or the drawPoints() method has been called.

---
## GlyphSet
```python
from glifLib import GlyphSet
```

GlyphSet manages a set of .glif files inside one directory.

GlyphSet's constructor takes a path to an existing directory as it's
first argument. Reading glyph data can either be done through the
readGlyph() method, or by using GlyphSet's dictionary interface, where
the keys are glyph names and the values are (very) simple glyph objects.

To write a glyph to the glyph set, you use the writeGlyph() method.
The simple glyph objects returned through the dict interface do not
support writing, they are just a convenient way to get at the glyph data.

---
## glyphNameToFileName
```python
from glifLib import glyphNameToFileName
```

Wrapper around the userNameToFileName function in filenames.py

Note that existingFileNames should be a set for large glyphsets
or performance will suffer.

---
## readGlyphFromString
```python
from glifLib import readGlyphFromString
```

Read .glif data from a string into a glyph object.

The 'glyphObject' argument can be any kind of object (even None);
the readGlyphFromString() method will attempt to set the following
attributes on it:

width
        the advance width of the glyph
height
        the advance height of the glyph
unicodes
        a list of unicode values for this glyph
note
        a string
lib
        a dictionary containing custom data
image
        a dictionary containing image data
guidelines
        a list of guideline data dictionaries
anchors
        a list of anchor data dictionaries

All attributes are optional, in two ways:

1) An attribute *won't* be set if the .glif file doesn't
   contain data for it. 'glyphObject' will have to deal
   with default values itself.
2) If setting the attribute fails with an AttributeError
   (for example if the 'glyphObject' attribute is read-
   only), readGlyphFromString() will not propagate that
   exception, but ignore that attribute.

To retrieve outline information, you need to pass an object
conforming to the PointPen protocol as the 'pointPen' argument.
This argument may be None if you don't need the outline data.

The formatVersions optional argument define the GLIF format versions
that are allowed to be read.
The type is Optional[Iterable[Tuple[int, int], int]]. It can contain
either integers (for the major versions to be allowed, with minor
digits defaulting to 0), or tuples of integers to specify both
(major, minor) versions.
By default when formatVersions is None all the GLIF format versions
currently defined are allowed to be read.

``validate`` will validate the read data. It is set to ``True`` by default.

---
## _writeGlyphToBytes
```python
from glifLib import _writeGlyphToBytes
```

Return .glif data for a glyph as a UTF-8 encoded bytes string.

---
## writeGlyphToString
```python
from glifLib import writeGlyphToString
```

Return .glif data for a glyph as a string. The XML declaration's
encoding is always set to "UTF-8".
The 'glyphObject' argument can be any kind of object (even None);
the writeGlyphToString() method will attempt to get the following
attributes from it:

width
        the advance width of the glyph
height
        the advance height of the glyph
unicodes
        a list of unicode values for this glyph
note
        a string
lib
        a dictionary containing custom data
image
        a dictionary containing image data
guidelines
        a list of guideline data dictionaries
anchors
        a list of anchor data dictionaries

All attributes are optional: if 'glyphObject' doesn't
have the attribute, it will simply be skipped.

To write outline data to the .glif file, writeGlyphToString() needs
a function (any callable object actually) that will take one
argument: an object that conforms to the PointPen protocol.
The function will be called by writeGlyphToString(); it has to call the
proper PointPen methods to transfer the outline to the .glif file.

The GLIF format version can be specified with the formatVersion argument.
This accepts either a tuple of integers for (major, minor), or a single
integer for the major digit only (with minor digit implied as 0).
By default when formatVesion is None the latest GLIF format version will
be used; currently it's 2.0, which is equivalent to formatVersion=(2, 0).

An UnsupportedGLIFFormat exception is raised if the requested UFO
formatVersion is not supported.

``validate`` will validate the written data. It is set to ``True`` by default.

---
## _writeAdvance
```python
from glifLib import _writeAdvance
```



---
## _writeUnicodes
```python
from glifLib import _writeUnicodes
```



---
## _writeNote
```python
from glifLib import _writeNote
```



---
## _writeImage
```python
from glifLib import _writeImage
```



---
## _writeGuidelines
```python
from glifLib import _writeGuidelines
```



---
## _writeAnchorsFormat1
```python
from glifLib import _writeAnchorsFormat1
```



---
## _writeAnchors
```python
from glifLib import _writeAnchors
```



---
## _writeLib
```python
from glifLib import _writeLib
```



---
## validateLayerInfoVersion3ValueForAttribute
```python
from glifLib import validateLayerInfoVersion3ValueForAttribute
```

This performs very basic validation of the value for attribute
following the UFO 3 fontinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the value
is of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## validateLayerInfoVersion3Data
```python
from glifLib import validateLayerInfoVersion3Data
```

This performs very basic validation of the value for infoData
following the UFO 3 layerinfo.plist specification. The results
of this should not be interpretted as *correct* for the font
that they are part of. This merely indicates that the values
are of the proper type and, where the specification defines
a set range of possible values for an attribute, that the
value is in the accepted range.

---
## _glifTreeFromFile
```python
from glifLib import _glifTreeFromFile
```



---
## _glifTreeFromString
```python
from glifLib import _glifTreeFromString
```



---
## _readGlyphFromTree
```python
from glifLib import _readGlyphFromTree
```



---
## _readGlyphFromTreeFormat1
```python
from glifLib import _readGlyphFromTreeFormat1
```



---
## _readGlyphFromTreeFormat2
```python
from glifLib import _readGlyphFromTreeFormat2
```



---
## _readName
```python
from glifLib import _readName
```



---
## _readAdvance
```python
from glifLib import _readAdvance
```



---
## _readNote
```python
from glifLib import _readNote
```



---
## _readLib
```python
from glifLib import _readLib
```



---
## _readImage
```python
from glifLib import _readImage
```



---
## buildOutlineFormat1
```python
from glifLib import buildOutlineFormat1
```



---
## _buildAnchorFormat1
```python
from glifLib import _buildAnchorFormat1
```



---
## _buildOutlineContourFormat1
```python
from glifLib import _buildOutlineContourFormat1
```



---
## _buildOutlinePointsFormat1
```python
from glifLib import _buildOutlinePointsFormat1
```



---
## _buildOutlineComponentFormat1
```python
from glifLib import _buildOutlineComponentFormat1
```



---
## buildOutlineFormat2
```python
from glifLib import buildOutlineFormat2
```



---
## _buildOutlineContourFormat2
```python
from glifLib import _buildOutlineContourFormat2
```



---
## _buildOutlinePointsFormat2
```python
from glifLib import _buildOutlinePointsFormat2
```



---
## _buildOutlineComponentFormat2
```python
from glifLib import _buildOutlineComponentFormat2
```



---
## _validateAndMassagePointStructures
```python
from glifLib import _validateAndMassagePointStructures
```



---
## _relaxedSetattr
```python
from glifLib import _relaxedSetattr
```



---
## _number
```python
from glifLib import _number
```

Given a numeric string, return an integer or a float, whichever
the string indicates. _number("1") will return the integer 1,
_number("1.0") will return the float 1.0.

>>> _number("1")
1
>>> _number("1.0")
1.0
>>> _number("a")  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
    ...
GlifLibError: Could not convert a to an int or float.

---
## _DoneParsing
```python
from glifLib import _DoneParsing
```



---
## _BaseParser
```python
from glifLib import _BaseParser
```



---
## _fetchUnicodes
```python
from glifLib import _fetchUnicodes
```

Get a list of unicodes listed in glif.

---
## _FetchUnicodesParser
```python
from glifLib import _FetchUnicodesParser
```



---
## _fetchImageFileName
```python
from glifLib import _fetchImageFileName
```

The image file name (if any) from glif.

---
## _FetchImageFileNameParser
```python
from glifLib import _FetchImageFileNameParser
```



---
## _fetchComponentBases
```python
from glifLib import _fetchComponentBases
```

Get a list of component base glyphs listed in glif.

---
## _FetchComponentBasesParser
```python
from glifLib import _FetchComponentBasesParser
```



---
## GLIFPointPen
```python
from glifLib import GLIFPointPen
```

Helper class using the PointPen protocol to write the <outline>
part of .glif files.

---
## default
```python
from glifLib import default
```



---
## supported_versions
```python
from glifLib import supported_versions
```



---
## __init__
```python
from glifLib import __init__
```



---
## draw
```python
from glifLib import draw
```

Draw this glyph onto a *FontTools* Pen.

---
## drawPoints
```python
from glifLib import drawPoints
```

Draw this glyph onto a PointPen.

---
## rebuildContents
```python
from glifLib import rebuildContents
```

Rebuild the contents dict by loading contents.plist.

``validateRead`` will validate the data, by default it is set to the
class's ``validateRead`` value, can be overridden.

---
## getReverseContents
```python
from glifLib import getReverseContents
```

Return a reversed dict of self.contents, mapping file names to
glyph names. This is primarily an aid for custom glyph name to file
name schemes that want to make sure they don't generate duplicate
file names. The file names are converted to lowercase so we can
reliably check for duplicates that only differ in case, which is
important for case-insensitive file systems.

---
## writeContents
```python
from glifLib import writeContents
```

Write the contents.plist file out to disk. Call this method when
you're done writing glyphs.

---
## readLayerInfo
```python
from glifLib import readLayerInfo
```

``validateRead`` will validate the data, by default it is set to the
class's ``validateRead`` value, can be overridden.

---
## writeLayerInfo
```python
from glifLib import writeLayerInfo
```

``validateWrite`` will validate the data, by default it is set to the
class's ``validateWrite`` value, can be overridden.

---
## getGLIF
```python
from glifLib import getGLIF
```

Get the raw GLIF text for a given glyph name. This only works
for GLIF files that are already on disk.

This method is useful in situations when the raw XML needs to be
read from a glyph set for a particular glyph before fully parsing
it into an object structure via the readGlyph method.

Raises KeyError if 'glyphName' is not in contents.plist, or
GlifLibError if the file associated with can't be found.

---
## getGLIFModificationTime
```python
from glifLib import getGLIFModificationTime
```

Returns the modification time for the GLIF file with 'glyphName', as
a floating point number giving the number of seconds since the epoch.
Return None if the associated file does not exist or the underlying
filesystem does not support getting modified times.
Raises KeyError if the glyphName is not in contents.plist.

---
## readGlyph
```python
from glifLib import readGlyph
```

Read a .glif file for 'glyphName' from the glyph set. The
'glyphObject' argument can be any kind of object (even None);
the readGlyph() method will attempt to set the following
attributes on it:

width
        the advance width of the glyph
height
        the advance height of the glyph
unicodes
        a list of unicode values for this glyph
note
        a string
lib
        a dictionary containing custom data
image
        a dictionary containing image data
guidelines
        a list of guideline data dictionaries
anchors
        a list of anchor data dictionaries

All attributes are optional, in two ways:

1) An attribute *won't* be set if the .glif file doesn't
   contain data for it. 'glyphObject' will have to deal
   with default values itself.
2) If setting the attribute fails with an AttributeError
   (for example if the 'glyphObject' attribute is read-
   only), readGlyph() will not propagate that exception,
   but ignore that attribute.

To retrieve outline information, you need to pass an object
conforming to the PointPen protocol as the 'pointPen' argument.
This argument may be None if you don't need the outline data.

readGlyph() will raise KeyError if the glyph is not present in
the glyph set.

``validate`` will validate the data, by default it is set to the
class's ``validateRead`` value, can be overridden.

---
## writeGlyph
```python
from glifLib import writeGlyph
```

Write a .glif file for 'glyphName' to the glyph set. The
'glyphObject' argument can be any kind of object (even None);
the writeGlyph() method will attempt to get the following
attributes from it:

width
        the advance width of the glyph
height
        the advance height of the glyph
unicodes
        a list of unicode values for this glyph
note
        a string
lib
        a dictionary containing custom data
image
        a dictionary containing image data
guidelines
        a list of guideline data dictionaries
anchors
        a list of anchor data dictionaries

All attributes are optional: if 'glyphObject' doesn't
have the attribute, it will simply be skipped.

To write outline data to the .glif file, writeGlyph() needs
a function (any callable object actually) that will take one
argument: an object that conforms to the PointPen protocol.
The function will be called by writeGlyph(); it has to call the
proper PointPen methods to transfer the outline to the .glif file.

The GLIF format version will be chosen based on the ufoFormatVersion
passed during the creation of this object. If a particular format
version is desired, it can be passed with the formatVersion argument.
The formatVersion argument accepts either a tuple of integers for
(major, minor), or a single integer for the major digit only (with
minor digit implied as 0).

An UnsupportedGLIFFormat exception is raised if the requested GLIF
formatVersion is not supported.

``validate`` will validate the data, by default it is set to the
class's ``validateWrite`` value, can be overridden.

---
## deleteGlyph
```python
from glifLib import deleteGlyph
```

Permanently delete the glyph from the glyph set on disk. Will
raise KeyError if the glyph is not present in the glyph set.

---
## keys
```python
from glifLib import keys
```



---
## has_key
```python
from glifLib import has_key
```



---
## __len__
```python
from glifLib import __len__
```



---
## __getitem__
```python
from glifLib import __getitem__
```



---
## getUnicodes
```python
from glifLib import getUnicodes
```

Return a dictionary that maps glyph names to lists containing
the unicode value[s] for that glyph, if any. This parses the .glif
files partially, so it is a lot faster than parsing all files completely.
By default this checks all glyphs, but a subset can be passed with glyphNames.

---
## getComponentReferences
```python
from glifLib import getComponentReferences
```

Return a dictionary that maps glyph names to lists containing the
base glyph name of components in the glyph. This parses the .glif
files partially, so it is a lot faster than parsing all files completely.
By default this checks all glyphs, but a subset can be passed with glyphNames.

---
## getImageReferences
```python
from glifLib import getImageReferences
```

Return a dictionary that maps glyph names to the file name of the image
referenced by the glyph. This parses the .glif files partially, so it is a
lot faster than parsing all files completely.
By default this checks all glyphs, but a subset can be passed with glyphNames.

---
## close
```python
from glifLib import close
```



---
## __enter__
```python
from glifLib import __enter__
```



---
## __exit__
```python
from glifLib import __exit__
```



---
## parse
```python
from glifLib import parse
```



---
## startElementHandler
```python
from glifLib import startElementHandler
```



---
## endElementHandler
```python
from glifLib import endElementHandler
```



---
## beginPath
```python
from glifLib import beginPath
```



---
## endPath
```python
from glifLib import endPath
```



---
## addPoint
```python
from glifLib import addPoint
```



---
## addComponent
```python
from glifLib import addComponent
```



---
## __name__
```python
from plistlib import __name__
```

DEPRECATED - This module is kept here only as a backward compatibility shim
for the old ufoLib.plistlib module, which was moved to fontTools.misc.plistlib.
Please use the latter instead.

---
## readPlist
```python
from plistlib import readPlist
```



---
## writePlist
```python
from plistlib import writePlist
```



---
## readPlistFromString
```python
from plistlib import readPlistFromString
```



---
## writePlistToString
```python
from plistlib import writePlistToString
```



---
## deprecated
```python
from utils import deprecated
```

Decorator factory to mark functions as deprecated with given message.

>>> @deprecated("Enough!")
... def some_function():
...    "I just print 'hello world'."
...    print("hello world")
>>> some_function()
hello world
>>> some_function.__doc__ == "I just print 'hello world'."
True

---
## _VersionTupleEnumMixin
```python
from utils import _VersionTupleEnumMixin
```



---
## deprecated_decorator
```python
from utils import deprecated_decorator
```



---
## major
```python
from utils import major
```



---
## minor
```python
from utils import minor
```



---
## _missing_
```python
from utils import _missing_
```



---
## default
```python
from utils import default
```



---
## supported_versions
```python
from utils import supported_versions
```



---
## convertUFO1OrUFO2KerningToUFO3Kerning
```python
from converters import convertUFO1OrUFO2KerningToUFO3Kerning
```



---
## findKnownKerningGroups
```python
from converters import findKnownKerningGroups
```

This will find kerning groups with known prefixes.
In some cases not all kerning groups will be referenced
by the kerning pairs. The algorithm for locating groups
in convertUFO1OrUFO2KerningToUFO3Kerning will miss these
unreferenced groups. By scanning for known prefixes
this function will catch all of the prefixed groups.

These are the prefixes and sides that are handled:
@MMK_L_ - side 1
@MMK_R_ - side 2

>>> testGroups = {
...     "@MMK_L_1" : None,
...     "@MMK_L_2" : None,
...     "@MMK_L_3" : None,
...     "@MMK_R_1" : None,
...     "@MMK_R_2" : None,
...     "@MMK_R_3" : None,
...     "@MMK_l_1" : None,
...     "@MMK_r_1" : None,
...     "@MMK_X_1" : None,
...     "foo" : None,
... }
>>> first, second = findKnownKerningGroups(testGroups)
>>> sorted(first) == ['@MMK_L_1', '@MMK_L_2', '@MMK_L_3']
True
>>> sorted(second) == ['@MMK_R_1', '@MMK_R_2', '@MMK_R_3']
True

---
## makeUniqueGroupName
```python
from converters import makeUniqueGroupName
```



---
## test
```python
from converters import test
```

No known prefixes.

>>> testKerning = {
...     "A" : {
...         "A" : 1,
...         "B" : 2,
...         "CGroup" : 3,
...         "DGroup" : 4
...     },
...     "BGroup" : {
...         "A" : 5,
...         "B" : 6,
...         "CGroup" : 7,
...         "DGroup" : 8
...     },
...     "CGroup" : {
...         "A" : 9,
...         "B" : 10,
...         "CGroup" : 11,
...         "DGroup" : 12
...     },
... }
>>> testGroups = {
...     "BGroup" : ["B"],
...     "CGroup" : ["C"],
...     "DGroup" : ["D"],
... }
>>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
...     testKerning, testGroups, [])
>>> expected = {
...     "A" : {
...         "A": 1,
...         "B": 2,
...         "public.kern2.CGroup": 3,
...         "public.kern2.DGroup": 4
...     },
...     "public.kern1.BGroup": {
...         "A": 5,
...         "B": 6,
...         "public.kern2.CGroup": 7,
...         "public.kern2.DGroup": 8
...     },
...     "public.kern1.CGroup": {
...         "A": 9,
...         "B": 10,
...         "public.kern2.CGroup": 11,
...         "public.kern2.DGroup": 12
...     }
... }
>>> kerning == expected
True
>>> expected = {
...     "BGroup": ["B"],
...     "CGroup": ["C"],
...     "DGroup": ["D"],
...     "public.kern1.BGroup": ["B"],
...     "public.kern1.CGroup": ["C"],
...     "public.kern2.CGroup": ["C"],
...     "public.kern2.DGroup": ["D"],
... }
>>> groups == expected
True

Known prefixes.

>>> testKerning = {
...     "A" : {
...         "A" : 1,
...         "B" : 2,
...         "@MMK_R_CGroup" : 3,
...         "@MMK_R_DGroup" : 4
...     },
...     "@MMK_L_BGroup" : {
...         "A" : 5,
...         "B" : 6,
...         "@MMK_R_CGroup" : 7,
...         "@MMK_R_DGroup" : 8
...     },
...     "@MMK_L_CGroup" : {
...         "A" : 9,
...         "B" : 10,
...         "@MMK_R_CGroup" : 11,
...         "@MMK_R_DGroup" : 12
...     },
... }
>>> testGroups = {
...     "@MMK_L_BGroup" : ["B"],
...     "@MMK_L_CGroup" : ["C"],
...     "@MMK_L_XGroup" : ["X"],
...     "@MMK_R_CGroup" : ["C"],
...     "@MMK_R_DGroup" : ["D"],
...     "@MMK_R_XGroup" : ["X"],
... }
>>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
...     testKerning, testGroups, [])
>>> expected = {
...     "A" : {
...         "A": 1,
...         "B": 2,
...         "public.kern2.CGroup": 3,
...         "public.kern2.DGroup": 4
...     },
...     "public.kern1.BGroup": {
...         "A": 5,
...         "B": 6,
...         "public.kern2.CGroup": 7,
...         "public.kern2.DGroup": 8
...     },
...     "public.kern1.CGroup": {
...         "A": 9,
...         "B": 10,
...         "public.kern2.CGroup": 11,
...         "public.kern2.DGroup": 12
...     }
... }
>>> kerning == expected
True
>>> expected = {
...     "@MMK_L_BGroup": ["B"],
...     "@MMK_L_CGroup": ["C"],
...     "@MMK_L_XGroup": ["X"],
...     "@MMK_R_CGroup": ["C"],
...     "@MMK_R_DGroup": ["D"],
...     "@MMK_R_XGroup": ["X"],
...     "public.kern1.BGroup": ["B"],
...     "public.kern1.CGroup": ["C"],
...     "public.kern1.XGroup": ["X"],
...     "public.kern2.CGroup": ["C"],
...     "public.kern2.DGroup": ["D"],
...     "public.kern2.XGroup": ["X"],
... }
>>> groups == expected
True

>>> from .validators import kerningValidator
>>> kerningValidator(kerning)
(True, None)

Mixture of known prefixes and groups without prefixes.

>>> testKerning = {
...     "A" : {
...         "A" : 1,
...         "B" : 2,
...         "@MMK_R_CGroup" : 3,
...         "DGroup" : 4
...     },
...     "BGroup" : {
...         "A" : 5,
...         "B" : 6,
...         "@MMK_R_CGroup" : 7,
...         "DGroup" : 8
...     },
...     "@MMK_L_CGroup" : {
...         "A" : 9,
...         "B" : 10,
...         "@MMK_R_CGroup" : 11,
...         "DGroup" : 12
...     },
... }
>>> testGroups = {
...     "BGroup" : ["B"],
...     "@MMK_L_CGroup" : ["C"],
...     "@MMK_R_CGroup" : ["C"],
...     "DGroup" : ["D"],
... }
>>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
...     testKerning, testGroups, [])
>>> expected = {
...     "A" : {
...         "A": 1,
...         "B": 2,
...         "public.kern2.CGroup": 3,
...         "public.kern2.DGroup": 4
...     },
...     "public.kern1.BGroup": {
...         "A": 5,
...         "B": 6,
...         "public.kern2.CGroup": 7,
...         "public.kern2.DGroup": 8
...     },
...     "public.kern1.CGroup": {
...         "A": 9,
...         "B": 10,
...         "public.kern2.CGroup": 11,
...         "public.kern2.DGroup": 12
...     }
... }
>>> kerning == expected
True
>>> expected = {
...     "BGroup": ["B"],
...     "@MMK_L_CGroup": ["C"],
...     "@MMK_R_CGroup": ["C"],
...     "DGroup": ["D"],
...     "public.kern1.BGroup": ["B"],
...     "public.kern1.CGroup": ["C"],
...     "public.kern2.CGroup": ["C"],
...     "public.kern2.DGroup": ["D"],
... }
>>> groups == expected
True

---
## UFOLibError
```python
from errors import UFOLibError
```



---
## UnsupportedUFOFormat
```python
from errors import UnsupportedUFOFormat
```



---
## GlifLibError
```python
from errors import GlifLibError
```



---
## UnsupportedGLIFFormat
```python
from errors import UnsupportedGLIFFormat
```



---
## _add_note
```python
from errors import _add_note
```



---
## __name__
```python
from OTTags import __name__
```



---
## script
```python
from __init__ import script
```

Return the four-letter script code assigned to the Unicode character
'char' as string.

>>> script("a")
'Latn'
>>> script(",")
'Zyyy'
>>> script(chr(0x10FFFF))
'Zzzz'

---
## script_extension
```python
from __init__ import script_extension
```

Return the script extension property assigned to the Unicode character
'char' as a set of string.

>>> script_extension("a") == {'Latn'}
True
>>> script_extension(chr(0x060C)) == {'Nkoo', 'Arab', 'Rohg', 'Thaa', 'Syrc', 'Gara', 'Yezi'}
True
>>> script_extension(chr(0x10FFFF)) == {'Zzzz'}
True

---
## script_name
```python
from __init__ import script_name
```

Return the long, human-readable script name given a four-letter
Unicode script code.

If no matching name is found, a KeyError is raised by default.

You can use the 'default' argument to return a fallback value (e.g.
'Unknown' or None) instead of throwing an error.

---
## _normalize_property_name
```python
from __init__ import _normalize_property_name
```

Remove case, strip space, '-' and '_' for loose matching.

---
## script_code
```python
from __init__ import script_code
```

Returns the four-letter Unicode script code from its long name

If no matching script code is found, a KeyError is raised by default.

You can use the 'default' argument to return a fallback string (e.g.
'Zzzz' or None) instead of throwing an error.

---
## script_horizontal_direction
```python
from __init__ import script_horizontal_direction
```

Return "RTL" for scripts that contain right-to-left characters
according to the Bidi_Class property. Otherwise return "LTR".

---
## block
```python
from __init__ import block
```

Return the block property assigned to the Unicode character 'char'
as a string.

>>> block("a")
'Basic Latin'
>>> block(chr(0x060C))
'Arabic'
>>> block(chr(0xEFFFF))
'No_Block'

---
## ot_tags_from_script
```python
from __init__ import ot_tags_from_script
```

Return a list of OpenType script tags associated with a given
Unicode script code.
Return ['DFLT'] script tag for invalid/unknown script codes.

---
## ot_tag_to_script
```python
from __init__ import ot_tag_to_script
```

Return the Unicode script code for the given OpenType script tag, or
None for "DFLT" tag or if there is no Unicode script associated with it.
Raises ValueError if the tag is invalid.

---
## __name__
```python
from ScriptExtensions import __name__
```



---
## __name__
```python
from Scripts import __name__
```



---
## __name__
```python
from Blocks import __name__
```



---
## posix
```python
from __init__ import posix
```

Normalize paths using forward slash to work also on Windows.

---
## posixpath_property
```python
from __init__ import posixpath_property
```

Generate a propery that holds a path always using forward slashes.

---
## DesignSpaceDocumentError
```python
from __init__ import DesignSpaceDocumentError
```



---
## AsDictMixin
```python
from __init__ import AsDictMixin
```



---
## SimpleDescriptor
```python
from __init__ import SimpleDescriptor
```

Containers for a bunch of attributes

---
## SourceDescriptor
```python
from __init__ import SourceDescriptor
```

Simple container for data related to the source

.. code:: python

    doc = DesignSpaceDocument()
    s1 = SourceDescriptor()
    s1.path = masterPath1
    s1.name = "master.ufo1"
    s1.font = defcon.Font("master.ufo1")
    s1.location = dict(weight=0)
    s1.familyName = "MasterFamilyName"
    s1.styleName = "MasterStyleNameOne"
    s1.localisedFamilyName = dict(fr="Caractère")
    s1.mutedGlyphNames.append("A")
    s1.mutedGlyphNames.append("Z")
    doc.addSource(s1)

---
## RuleDescriptor
```python
from __init__ import RuleDescriptor
```

Represents the rule descriptor element: a set of glyph substitutions to
trigger conditionally in some parts of the designspace.

.. code:: python

    r1 = RuleDescriptor()
    r1.name = "unique.rule.name"
    r1.conditionSets.append([dict(name="weight", minimum=-10, maximum=10), dict(...)])
    r1.conditionSets.append([dict(...), dict(...)])
    r1.subs.append(("a", "a.alt"))

.. code:: xml

    <!-- optional: list of substitution rules -->
    <rules>
        <rule name="vertical.bars">
            <conditionset>
                <condition minimum="250.000000" maximum="750.000000" name="weight"/>
                <condition minimum="100" name="width"/>
                <condition minimum="10" maximum="40" name="optical"/>
            </conditionset>
            <sub name="cent" with="cent.alt"/>
            <sub name="dollar" with="dollar.alt"/>
        </rule>
    </rules>

---
## evaluateRule
```python
from __init__ import evaluateRule
```

Return True if any of the rule's conditionsets matches the given location.

---
## evaluateConditions
```python
from __init__ import evaluateConditions
```

Return True if all the conditions matches the given location.

- If a condition has no minimum, check for < maximum.
- If a condition has no maximum, check for > minimum.

---
## processRules
```python
from __init__ import processRules
```

Apply these rules at this location to these glyphnames.

Return a new list of glyphNames with substitutions applied.

- rule order matters

---
## AxisMappingDescriptor
```python
from __init__ import AxisMappingDescriptor
```

Represents the axis mapping element: mapping an input location
to an output location in the designspace.

.. code:: python

    m1 = AxisMappingDescriptor()
    m1.inputLocation = {"weight": 900, "width": 150}
    m1.outputLocation = {"weight": 870}

.. code:: xml

    <mappings>
        <mapping>
            <input>
                <dimension name="weight" xvalue="900"/>
                <dimension name="width" xvalue="150"/>
            </input>
            <output>
                <dimension name="weight" xvalue="870"/>
            </output>
        </mapping>
    </mappings>

---
## InstanceDescriptor
```python
from __init__ import InstanceDescriptor
```

Simple container for data related to the instance


.. code:: python

    i2 = InstanceDescriptor()
    i2.path = instancePath2
    i2.familyName = "InstanceFamilyName"
    i2.styleName = "InstanceStyleName"
    i2.name = "instance.ufo2"
    # anisotropic location
    i2.designLocation = dict(weight=500, width=(400,300))
    i2.postScriptFontName = "InstancePostscriptName"
    i2.styleMapFamilyName = "InstanceStyleMapFamilyName"
    i2.styleMapStyleName = "InstanceStyleMapStyleName"
    i2.lib['com.coolDesignspaceApp.specimenText'] = 'Hamburgerwhatever'
    doc.addInstance(i2)

---
## tagForAxisName
```python
from __init__ import tagForAxisName
```



---
## AbstractAxisDescriptor
```python
from __init__ import AbstractAxisDescriptor
```



---
## AxisDescriptor
```python
from __init__ import AxisDescriptor
```

Simple container for the axis data.

Add more localisations?

.. code:: python

    a1 = AxisDescriptor()
    a1.minimum = 1
    a1.maximum = 1000
    a1.default = 400
    a1.name = "weight"
    a1.tag = "wght"
    a1.labelNames['fa-IR'] = "قطر"
    a1.labelNames['en'] = "Wéíght"
    a1.map = [(1.0, 10.0), (400.0, 66.0), (1000.0, 990.0)]
    a1.axisOrdering = 1
    a1.axisLabels = [
        AxisLabelDescriptor(name="Regular", userValue=400, elidable=True)
    ]
    doc.addAxis(a1)

---
## DiscreteAxisDescriptor
```python
from __init__ import DiscreteAxisDescriptor
```

Container for discrete axis data.

Use this for axes that do not interpolate. The main difference from a
continuous axis is that a continuous axis has a ``minimum`` and ``maximum``,
while a discrete axis has a list of ``values``.

Example: an Italic axis with 2 stops, Roman and Italic, that are not
compatible. The axis still allows to bind together the full font family,
which is useful for the STAT table, however it can't become a variation
axis in a VF.

.. code:: python

    a2 = DiscreteAxisDescriptor()
    a2.values = [0, 1]
    a2.default = 0
    a2.name = "Italic"
    a2.tag = "ITAL"
    a2.labelNames['fr'] = "Italique"
    a2.map = [(0, 0), (1, -11)]
    a2.axisOrdering = 2
    a2.axisLabels = [
        AxisLabelDescriptor(name="Roman", userValue=0, elidable=True)
    ]
    doc.addAxis(a2)

.. versionadded:: 5.0

---
## AxisLabelDescriptor
```python
from __init__ import AxisLabelDescriptor
```

Container for axis label data.

Analogue of OpenType's STAT data for a single axis (formats 1, 2 and 3).
All values are user values.
See: `OTSpec STAT Axis value table, format 1, 2, 3 <https://docs.microsoft.com/en-us/typography/opentype/spec/stat#axis-value-table-format-1>`_

The STAT format of the Axis value depends on which field are filled-in,
see :meth:`getFormat`

.. versionadded:: 5.0

---
## LocationLabelDescriptor
```python
from __init__ import LocationLabelDescriptor
```

Container for location label data.

Analogue of OpenType's STAT data for a free-floating location (format 4).
All values are user values.

See: `OTSpec STAT Axis value table, format 4 <https://docs.microsoft.com/en-us/typography/opentype/spec/stat#axis-value-table-format-4>`_

.. versionadded:: 5.0

---
## VariableFontDescriptor
```python
from __init__ import VariableFontDescriptor
```

Container for variable fonts, sub-spaces of the Designspace.

Use-cases:

- From a single DesignSpace with discrete axes, define 1 variable font
  per value on the discrete axes. Before version 5, you would have needed
  1 DesignSpace per such variable font, and a lot of data duplication.
- From a big variable font with many axes, define subsets of that variable
  font that only include some axes and freeze other axes at a given location.

.. versionadded:: 5.0

---
## RangeAxisSubsetDescriptor
```python
from __init__ import RangeAxisSubsetDescriptor
```

Subset of a continuous axis to include in a variable font.

.. versionadded:: 5.0

---
## ValueAxisSubsetDescriptor
```python
from __init__ import ValueAxisSubsetDescriptor
```

Single value of a discrete or continuous axis to use in a variable font.

.. versionadded:: 5.0

---
## BaseDocWriter
```python
from __init__ import BaseDocWriter
```



---
## BaseDocReader
```python
from __init__ import BaseDocReader
```



---
## DesignSpaceDocument
```python
from __init__ import DesignSpaceDocument
```

The DesignSpaceDocument object can read and write ``.designspace`` data.
It imports the axes, sources, variable fonts and instances to very basic
**descriptor** objects that store the data in attributes. Data is added to
the document by creating such descriptor objects, filling them with data
and then adding them to the document. This makes it easy to integrate this
object in different contexts.

The **DesignSpaceDocument** object can be subclassed to work with
different objects, as long as they have the same attributes. Reader and
Writer objects can be subclassed as well.

**Note:** Python attribute names are usually camelCased, the
corresponding `XML <document-xml-structure>`_ attributes are usually
all lowercase.

.. code:: python

    from fontTools.designspaceLib import DesignSpaceDocument
    doc = DesignSpaceDocument.fromfile("some/path/to/my.designspace")
    doc.formatVersion
    doc.elidedFallbackName
    doc.axes
    doc.axisMappings
    doc.locationLabels
    doc.rules
    doc.rulesProcessingLast
    doc.sources
    doc.variableFonts
    doc.instances
    doc.lib

---
## getter
```python
from __init__ import getter
```



---
## setter
```python
from __init__ import setter
```



---
## asdict
```python
from __init__ import asdict
```



---
## compare
```python
from __init__ import compare
```



---
## location
```python
from __init__ import location
```



---
## setFamilyName
```python
from __init__ import setFamilyName
```



---
## getFamilyName
```python
from __init__ import getFamilyName
```



---
## getFullDesignLocation
```python
from __init__ import getFullDesignLocation
```

Get the complete design location of this instance, by combining data
from the various location fields, default axis values and mappings, and
top-level location labels.

The source of truth for this instance's location is determined for each
axis independently by taking the first not-None field in this list:

- ``locationLabel``: the location along this axis is the same as the
  matching STAT format 4 label. No anisotropy.
- ``designLocation[axisName]``: the explicit design location along this
  axis, possibly anisotropic.
- ``userLocation[axisName]``: the explicit user location along this
  axis. No anisotropy.
- ``axis.default``: default axis value. No anisotropy.

.. versionadded:: 5.0

---
## setStyleName
```python
from __init__ import setStyleName
```

These methods give easier access to the localised names.

---
## getStyleName
```python
from __init__ import getStyleName
```



---
## setStyleMapStyleName
```python
from __init__ import setStyleMapStyleName
```



---
## getStyleMapStyleName
```python
from __init__ import getStyleMapStyleName
```



---
## setStyleMapFamilyName
```python
from __init__ import setStyleMapFamilyName
```



---
## getStyleMapFamilyName
```python
from __init__ import getStyleMapFamilyName
```



---
## clearLocation
```python
from __init__ import clearLocation
```

Clear all location-related fields. Ensures that
:attr:``designLocation`` and :attr:``userLocation`` are dictionaries
(possibly empty if clearing everything).

In order to update the location of this instance wholesale, a user
should first clear all the fields, then change the field(s) for which
they have data.

.. code:: python

    instance.clearLocation()
    instance.designLocation = {'Weight': (34, 36.5), 'Width': 100}
    instance.userLocation = {'Opsz': 16}

In order to update a single axis location, the user should only clear
that axis, then edit the values:

.. code:: python

    instance.clearLocation('Weight')
    instance.designLocation['Weight'] = (34, 36.5)

Args:
  axisName: if provided, only clear the location for that axis.

.. versionadded:: 5.0

---
## getLocationLabelDescriptor
```python
from __init__ import getLocationLabelDescriptor
```

Get the :class:`LocationLabelDescriptor` instance that matches
this instances's :attr:`locationLabel`.

Raises if the named label can't be found.

.. versionadded:: 5.0

---
## getFullUserLocation
```python
from __init__ import getFullUserLocation
```

Get the complete user location of this label, by combining data
from the explicit user location and default axis values.

.. versionadded:: 5.0

---
## map_forward
```python
from __init__ import map_forward
```

Map a user location to a design location.

Assume that missing coordinates are at the default location for that axis.

Note: the output won't be anisotropic, only the xvalue is set.

.. versionadded:: 5.0

---
## map_backward
```python
from __init__ import map_backward
```

Map a design location to a user location.

Assume that missing coordinates are at the default location for that axis.

When the input has anisotropic locations, only the xvalue is used.

.. versionadded:: 5.0

---
## getFormat
```python
from __init__ import getFormat
```

Determine which format of STAT Axis value to use to encode this label.

===========  =========  ===========  ===========  ===============
STAT Format  userValue  userMinimum  userMaximum  linkedUserValue
===========  =========  ===========  ===========  ===============
1            ✅          ❌            ❌            ❌
2            ✅          ✅            ✅            ❌
3            ✅          ❌            ❌            ✅
===========  =========  ===========  ===========  ===============

---
## defaultName
```python
from __init__ import defaultName
```

Return the English name from :attr:`labelNames` or the :attr:`name`.

---
## getAxisDecriptor
```python
from __init__ import getAxisDecriptor
```



---
## getAxisMappingDescriptor
```python
from __init__ import getAxisMappingDescriptor
```



---
## getSourceDescriptor
```python
from __init__ import getSourceDescriptor
```



---
## getInstanceDescriptor
```python
from __init__ import getInstanceDescriptor
```



---
## getRuleDescriptor
```python
from __init__ import getRuleDescriptor
```



---
## _getEffectiveFormatTuple
```python
from __init__ import _getEffectiveFormatTuple
```

Try to use the version specified in the document, or a sufficiently
recent version to be able to encode what the document contains.

---
## _makeLocationElement
```python
from __init__ import _makeLocationElement
```

Convert Location dict to a locationElement.

---
## intOrFloat
```python
from __init__ import intOrFloat
```



---
## _addRule
```python
from __init__ import _addRule
```



---
## _addAxis
```python
from __init__ import _addAxis
```



---
## _addAxisMapping
```python
from __init__ import _addAxisMapping
```



---
## _addAxisLabel
```python
from __init__ import _addAxisLabel
```



---
## _addLabelNames
```python
from __init__ import _addLabelNames
```



---
## _addLocationLabel
```python
from __init__ import _addLocationLabel
```



---
## _addLocationElement
```python
from __init__ import _addLocationElement
```



---
## _addInstance
```python
from __init__ import _addInstance
```



---
## _addSource
```python
from __init__ import _addSource
```



---
## _addVariableFont
```python
from __init__ import _addVariableFont
```



---
## _addLib
```python
from __init__ import _addLib
```



---
## _writeGlyphElement
```python
from __init__ import _writeGlyphElement
```



---
## fromstring
```python
from __init__ import fromstring
```



---
## readRules
```python
from __init__ import readRules
```



---
## _readConditionElements
```python
from __init__ import _readConditionElements
```



---
## readAxes
```python
from __init__ import readAxes
```



---
## readAxisLabel
```python
from __init__ import readAxisLabel
```



---
## readLabels
```python
from __init__ import readLabels
```



---
## readVariableFonts
```python
from __init__ import readVariableFonts
```



---
## readAxisSubset
```python
from __init__ import readAxisSubset
```



---
## readSources
```python
from __init__ import readSources
```



---
## locationFromElement
```python
from __init__ import locationFromElement
```

Read a nested ``<location>`` element inside the given ``element``.

.. versionchanged:: 5.0
   Return a tuple of (designLocation, userLocation)

---
## readLocationElement
```python
from __init__ import readLocationElement
```

Read a ``<location>`` element.

.. versionchanged:: 5.0
   Return a tuple of (designLocation, userLocation)

---
## readInstances
```python
from __init__ import readInstances
```



---
## _readSingleInstanceElement
```python
from __init__ import _readSingleInstanceElement
```



---
## readLibElement
```python
from __init__ import readLibElement
```

Read the lib element for the given instance.

---
## readInfoElement
```python
from __init__ import readInfoElement
```

Read the info element.

---
## readGlyphElement
```python
from __init__ import readGlyphElement
```

Read the glyph element, which could look like either one of these:

.. code-block:: xml

    <glyph name="b" unicode="0x62"/>

    <glyph name="b"/>

    <glyph name="b">
        <master location="location-token-bbb" source="master-token-aaa2"/>
        <master glyphname="b.alt1" location="location-token-ccc" source="master-token-aaa3"/>
        <note>
            This is an instance from an anisotropic interpolation.
        </note>
    </glyph>

---
## fromfile
```python
from __init__ import fromfile
```

Read a designspace file from ``path`` and return a new instance of
:class:.

---
## tostring
```python
from __init__ import tostring
```

Returns the designspace as a string. Default encoding ``utf-8``.

---
## _posixRelativePath
```python
from __init__ import _posixRelativePath
```



---
## updatePaths
```python
from __init__ import updatePaths
```

Right before we save we need to identify and respond to the following situations:
In each descriptor, we have to do the right thing for the filename attribute.

::

    case 1.
    descriptor.filename == None
    descriptor.path == None

    -- action:
    write as is, descriptors will not have a filename attr.
    useless, but no reason to interfere.


    case 2.
    descriptor.filename == "../something"
    descriptor.path == None

    -- action:
    write as is. The filename attr should not be touched.


    case 3.
    descriptor.filename == None
    descriptor.path == "~/absolute/path/there"

    -- action:
    calculate the relative path for filename.
    We're not overwriting some other value for filename, it should be fine


    case 4.
    descriptor.filename == '../somewhere'
    descriptor.path == "~/absolute/path/there"

    -- action:
    there is a conflict between the given filename, and the path.
    So we know where the file is relative to the document.
    Can't guess why they're different, we just choose for path to be correct and update filename.

---
## addSource
```python
from __init__ import addSource
```

Add the given ``sourceDescriptor`` to ``doc.sources``.

---
## addSourceDescriptor
```python
from __init__ import addSourceDescriptor
```

Instantiate a new :class:`SourceDescriptor` using the given
``kwargs`` and add it to ``doc.sources``.

---
## addInstance
```python
from __init__ import addInstance
```

Add the given ``instanceDescriptor`` to :attr:`instances`.

---
## addInstanceDescriptor
```python
from __init__ import addInstanceDescriptor
```

Instantiate a new :class:`InstanceDescriptor` using the given
``kwargs`` and add it to :attr:`instances`.

---
## addAxis
```python
from __init__ import addAxis
```

Add the given ``axisDescriptor`` to :attr:`axes`.

---
## addAxisDescriptor
```python
from __init__ import addAxisDescriptor
```

Instantiate a new :class:`AxisDescriptor` using the given
``kwargs`` and add it to :attr:`axes`.

The axis will be and instance of :class:`DiscreteAxisDescriptor` if
the ``kwargs`` provide a ``value``, or a :class:`AxisDescriptor` otherwise.

---
## addAxisMapping
```python
from __init__ import addAxisMapping
```

Add the given ``axisMappingDescriptor`` to :attr:`axisMappings`.

---
## addAxisMappingDescriptor
```python
from __init__ import addAxisMappingDescriptor
```

Instantiate a new :class:`AxisMappingDescriptor` using the given
``kwargs`` and add it to :attr:`rules`.

---
## addRule
```python
from __init__ import addRule
```

Add the given ``ruleDescriptor`` to :attr:`rules`.

---
## addRuleDescriptor
```python
from __init__ import addRuleDescriptor
```

Instantiate a new :class:`RuleDescriptor` using the given
``kwargs`` and add it to :attr:`rules`.

---
## addVariableFont
```python
from __init__ import addVariableFont
```

Add the given ``variableFontDescriptor`` to :attr:`variableFonts`.

.. versionadded:: 5.0

---
## addVariableFontDescriptor
```python
from __init__ import addVariableFontDescriptor
```

Instantiate a new :class:`VariableFontDescriptor` using the given
``kwargs`` and add it to :attr:`variableFonts`.

.. versionadded:: 5.0

---
## addLocationLabel
```python
from __init__ import addLocationLabel
```

Add the given ``locationLabelDescriptor`` to :attr:`locationLabels`.

.. versionadded:: 5.0

---
## addLocationLabelDescriptor
```python
from __init__ import addLocationLabelDescriptor
```

Instantiate a new :class:`LocationLabelDescriptor` using the given
``kwargs`` and add it to :attr:`locationLabels`.

.. versionadded:: 5.0

---
## newDefaultLocation
```python
from __init__ import newDefaultLocation
```

Return a dict with the default location in design space coordinates.

---
## labelForUserLocation
```python
from __init__ import labelForUserLocation
```

Return the :class:`LocationLabel` that matches the given
``userLocation``, or ``None`` if no such label exists.

.. versionadded:: 5.0

---
## updateFilenameFromPath
```python
from __init__ import updateFilenameFromPath
```

Set a descriptor filename attr from the path and this document path.

If the filename attribute is not None: skip it.

---
## newAxisDescriptor
```python
from __init__ import newAxisDescriptor
```

Ask the writer class to make us a new axisDescriptor.

---
## newSourceDescriptor
```python
from __init__ import newSourceDescriptor
```

Ask the writer class to make us a new sourceDescriptor.

---
## newInstanceDescriptor
```python
from __init__ import newInstanceDescriptor
```

Ask the writer class to make us a new instanceDescriptor.

---
## getAxisOrder
```python
from __init__ import getAxisOrder
```

Return a list of axis names, in the same order as defined in the document.

---
## getAxis
```python
from __init__ import getAxis
```

Return the axis with the given ``name``, or ``None`` if no such axis exists.

---
## getAxisByTag
```python
from __init__ import getAxisByTag
```

Return the axis with the given ``tag``, or ``None`` if no such axis exists.

---
## getLocationLabel
```python
from __init__ import getLocationLabel
```

Return the top-level location label with the given ``name``, or
``None`` if no such label exists.

.. versionadded:: 5.0

---
## findDefault
```python
from __init__ import findDefault
```

Set and return SourceDescriptor at the default location or None.

The default location is the set of all `default` values in user space
of all axes.

This function updates the document's :attr:`default` value.

.. versionchanged:: 5.0
   Allow the default source to not specify some of the axis values, and
   they are assumed to be the default.
   See :meth:`SourceDescriptor.getFullDesignLocation()`

---
## normalizeLocation
```python
from __init__ import normalizeLocation
```

Return a dict with normalized axis values.

---
## loadSourceFonts
```python
from __init__ import loadSourceFonts
```

Ensure SourceDescriptor.font attributes are loaded, and return list of fonts.

Takes a callable which initializes a new font object (e.g. TTFont, or
defcon.Font, etc.) from the SourceDescriptor.path, and sets the
SourceDescriptor.font attribute.
If the font attribute is already not None, it is not loaded again.
Fonts with the same path are only loaded once and shared among SourceDescriptors.

For example, to load UFO sources using defcon:

    designspace = DesignSpaceDocument.fromfile("path/to/my.designspace")
    designspace.loadSourceFonts(defcon.Font)

Or to load masters as FontTools binary fonts, including extra options:

    designspace.loadSourceFonts(ttLib.TTFont, recalcBBoxes=False)

Args:
    opener (Callable): takes one required positional argument, the source.path,
        and an optional list of keyword arguments, and returns a new font object
        loaded from the path.
    **kwargs: extra options passed on to the opener function.

Returns:
    List of font objects in the order they appear in the sources list.

---
## formatTuple
```python
from __init__ import formatTuple
```

Return the formatVersion as a tuple of (major, minor).

.. versionadded:: 5.0

---
## getVariableFonts
```python
from __init__ import getVariableFonts
```

Return all variable fonts defined in this document, or implicit
variable fonts that can be built from the document's continuous axes.

In the case of Designspace documents before version 5, the whole
document was implicitly describing a variable font that covers the
whole space.

In version 5 and above documents, there can be as many variable fonts
as there are locations on discrete axes.

.. seealso:: :func:`splitInterpolable`

.. versionadded:: 5.0

---
## deepcopyExceptFonts
```python
from __init__ import deepcopyExceptFonts
```

Allow deep-copying a DesignSpace document without deep-copying
attached UFO fonts or TTFont objects. The :attr:`font` attribute
is shared by reference between the original and the copy.

.. versionadded:: 5.0

---
## clamp
```python
from types import clamp
```



---
## Range
```python
from types import Range
```



---
## locationInRegion
```python
from types import locationInRegion
```



---
## regionInRegion
```python
from types import regionInRegion
```



---
## userRegionToDesignRegion
```python
from types import userRegionToDesignRegion
```



---
## getVFUserRegion
```python
from types import getVFUserRegion
```



---
## __post_init__
```python
from types import __post_init__
```



---
## __contains__
```python
from types import __contains__
```



---
## intersection
```python
from types import intersection
```



---
## __name__
```python
from split import __name__
```

Allows building all the variable fonts of a DesignSpace version 5 by
splitting the document into interpolable sub-space, then into each VF.

---
## defaultMakeInstanceFilename
```python
from split import defaultMakeInstanceFilename
```

Default callable to synthesize an instance filename
when makeNames=True, for instances that don't specify an instance name
in the designspace. This part of the name generation can be overriden
because it's not specified by the STAT table.

---
## splitInterpolable
```python
from split import splitInterpolable
```

Split the given DS5 into several interpolable sub-designspaces.
There are as many interpolable sub-spaces as there are combinations of
discrete axis values.

E.g. with axes:
    - italic (discrete) Upright or Italic
    - style (discrete) Sans or Serif
    - weight (continuous) 100 to 900

There are 4 sub-spaces in which the Weight axis should interpolate:
(Upright, Sans), (Upright, Serif), (Italic, Sans) and (Italic, Serif).

The sub-designspaces still include the full axis definitions and STAT data,
but the rules, sources, variable fonts, instances are trimmed down to only
keep what falls within the interpolable sub-space.

Args:
  - ``makeNames``: Whether to compute the instance family and style
    names using the STAT data.
  - ``expandLocations``: Whether to turn all locations into "full"
    locations, including implicit default axis values where missing.
  - ``makeInstanceFilename``: Callable to synthesize an instance filename
    when makeNames=True, for instances that don't specify an instance name
    in the designspace. This part of the name generation can be overridden
    because it's not specified by the STAT table.

.. versionadded:: 5.0

---
## splitVariableFonts
```python
from split import splitVariableFonts
```

Convert each variable font listed in this document into a standalone
designspace. This can be used to compile all the variable fonts from a
format 5 designspace using tools that can only deal with 1 VF at a time.

Args:
  - ``makeNames``: Whether to compute the instance family and style
    names using the STAT data.
  - ``expandLocations``: Whether to turn all locations into "full"
    locations, including implicit default axis values where missing.
  - ``makeInstanceFilename``: Callable to synthesize an instance filename
    when makeNames=True, for instances that don't specify an instance name
    in the designspace. This part of the name generation can be overridden
    because it's not specified by the STAT table.

.. versionadded:: 5.0

---
## convert5to4
```python
from split import convert5to4
```

Convert each variable font listed in this document into a standalone
format 4 designspace. This can be used to compile all the variable fonts
from a format 5 designspace using tools that only know about format 4.

.. versionadded:: 5.0

---
## _extractSubSpace
```python
from split import _extractSubSpace
```



---
## _conditionSetFrom
```python
from split import _conditionSetFrom
```



---
## _subsetRulesBasedOnConditions
```python
from split import _subsetRulesBasedOnConditions
```



---
## _filterLocation
```python
from split import _filterLocation
```



---
## maybeExpandDesignLocation
```python
from split import maybeExpandDesignLocation
```



---
## __name__
```python
from statNames import __name__
```

Compute name information for a given location in user-space coordinates
using STAT data. This can be used to fill-in automatically the names of an
instance:

.. code:: python

    instance = doc.instances[0]
    names = getStatNames(doc, instance.getFullUserLocation(doc))
    print(names.styleNames)

---
## StatNames
```python
from statNames import StatNames
```

Name data generated from the STAT table information.

---
## getStatNames
```python
from statNames import getStatNames
```

Compute the family, style, PostScript names of the given ``userLocation``
using the document's STAT information.

Also computes localizations.

If not enough STAT data is available for a given name, either its dict of
localized names will be empty (family and style names), or the name will be
None (PostScript name).

.. versionadded:: 5.0

---
## _getSortedAxisLabels
```python
from statNames import _getSortedAxisLabels
```

Returns axis labels sorted by their ordering, with unordered ones appended as
they are listed.

---
## _getAxisLabelsForUserLocation
```python
from statNames import _getAxisLabelsForUserLocation
```



---
## _getRibbiStyle
```python
from statNames import _getRibbiStyle
```

Compute the RIBBI style name of the given user location,
return the location of the matching Regular in the RIBBI group.

.. versionadded:: 5.0

---
## FeatureLibError
```python
from error import FeatureLibError
```



---
## IncludedFeaNotFound
```python
from error import IncludedFeaNotFound
```



---
## __name__
```python
from variableScalar import __name__
```



---
## Location
```python
from variableScalar import Location
```



---
## VariableScalar
```python
from variableScalar import VariableScalar
```

A scalar with different values at different points in the designspace.

---
## __init__
```python
from variableScalar import __init__
```



---
## __repr__
```python
from variableScalar import __repr__
```



---
## does_vary
```python
from variableScalar import does_vary
```



---
## axes_dict
```python
from variableScalar import axes_dict
```



---
## _normalized_location
```python
from variableScalar import _normalized_location
```



---
## fix_location
```python
from variableScalar import fix_location
```



---
## add_value
```python
from variableScalar import add_value
```



---
## fix_all_locations
```python
from variableScalar import fix_all_locations
```



---
## default
```python
from variableScalar import default
```



---
## value_at_location
```python
from variableScalar import value_at_location
```



---
## model
```python
from variableScalar import model
```



---
## get_deltas_and_supports
```python
from variableScalar import get_deltas_and_supports
```



---
## add_to_variation_store
```python
from variableScalar import add_to_variation_store
```



---
## __name__
```python
from lookupDebugInfo import __name__
```



---
## LookupDebugInfo
```python
from lookupDebugInfo import LookupDebugInfo
```

Information about where a lookup came from, to be embedded in a font

---
## addOpenTypeFeatures
```python
from builder import addOpenTypeFeatures
```

Add features from a file to a font. Note that this replaces any features
currently present.

Args:
    font (feaLib.ttLib.TTFont): The font object.
    featurefile: Either a path or file object (in which case we
        parse it into an AST), or a pre-parsed AST instance.
    tables: If passed, restrict the set of affected tables to those in the
        list.
    debug: Whether to add source debugging information to the font in the
        ``Debg`` table

---
## addOpenTypeFeaturesFromString
```python
from builder import addOpenTypeFeaturesFromString
```

Add features from a string to a font. Note that this replaces any
features currently present.

Args:
    font (feaLib.ttLib.TTFont): The font object.
    features: A string containing feature code.
    filename: The directory containing ``filename`` is used as the root of
        relative ``include()`` paths; if ``None`` is provided, the current
        directory is assumed.
    tables: If passed, restrict the set of affected tables to those in the
        list.
    debug: Whether to add source debugging information to the font in the
        ``Debg`` table

---
## Builder
```python
from builder import Builder
```



---
## get_chained_lookup_
```python
from builder import get_chained_lookup_
```



---
## add_lookup_to_feature_
```python
from builder import add_lookup_to_feature_
```



---
## get_lookup_
```python
from builder import get_lookup_
```



---
## build_feature_aalt_
```python
from builder import build_feature_aalt_
```



---
## build_head
```python
from builder import build_head
```



---
## build_hhea
```python
from builder import build_hhea
```



---
## build_vhea
```python
from builder import build_vhea
```



---
## get_user_name_id
```python
from builder import get_user_name_id
```



---
## buildFeatureParams
```python
from builder import buildFeatureParams
```



---
## build_name
```python
from builder import build_name
```



---
## build_OS_2
```python
from builder import build_OS_2
```



---
## setElidedFallbackName
```python
from builder import setElidedFallbackName
```



---
## addDesignAxis
```python
from builder import addDesignAxis
```



---
## addAxisValueRecord
```python
from builder import addAxisValueRecord
```



---
## build_STAT
```python
from builder import build_STAT
```



---
## build_codepages_
```python
from builder import build_codepages_
```



---
## buildBASE
```python
from builder import buildBASE
```



---
## buildBASEAxis
```python
from builder import buildBASEAxis
```



---
## buildGDEF
```python
from builder import buildGDEF
```



---
## buildGDEFGlyphClassDef_
```python
from builder import buildGDEFGlyphClassDef_
```



---
## buildGDEFMarkAttachClassDef_
```python
from builder import buildGDEFMarkAttachClassDef_
```



---
## buildGDEFMarkGlyphSetsDef_
```python
from builder import buildGDEFMarkGlyphSetsDef_
```



---
## buildDebg
```python
from builder import buildDebg
```



---
## buildLookups_
```python
from builder import buildLookups_
```



---
## makeTable
```python
from builder import makeTable
```



---
## makeFeatureVariations
```python
from builder import makeFeatureVariations
```



---
## any_feature_variations
```python
from builder import any_feature_variations
```



---
## get_lookup_name_
```python
from builder import get_lookup_name_
```



---
## add_language_system
```python
from builder import add_language_system
```



---
## get_default_language_systems_
```python
from builder import get_default_language_systems_
```



---
## start_feature
```python
from builder import start_feature
```



---
## end_feature
```python
from builder import end_feature
```



---
## start_lookup_block
```python
from builder import start_lookup_block
```



---
## end_lookup_block
```python
from builder import end_lookup_block
```



---
## add_lookup_call
```python
from builder import add_lookup_call
```



---
## set_font_revision
```python
from builder import set_font_revision
```



---
## set_language
```python
from builder import set_language
```



---
## getMarkAttachClass_
```python
from builder import getMarkAttachClass_
```



---
## getMarkFilterSet_
```python
from builder import getMarkFilterSet_
```



---
## set_lookup_flag
```python
from builder import set_lookup_flag
```



---
## set_script
```python
from builder import set_script
```



---
## find_lookup_builders_
```python
from builder import find_lookup_builders_
```

Helper for building chain contextual substitutions

Given a list of lookup names, finds the LookupBuilder for each name.
If an input name is None, it gets mapped to a None LookupBuilder.

---
## add_attach_points
```python
from builder import add_attach_points
```



---
## add_feature_reference
```python
from builder import add_feature_reference
```



---
## add_featureName
```python
from builder import add_featureName
```



---
## add_cv_parameter
```python
from builder import add_cv_parameter
```



---
## add_to_cv_num_named_params
```python
from builder import add_to_cv_num_named_params
```

Adds new items to ``self.cv_num_named_params_``
or increments the count of existing items.

---
## add_cv_character
```python
from builder import add_cv_character
```



---
## set_base_axis
```python
from builder import set_base_axis
```



---
## set_size_parameters
```python
from builder import set_size_parameters
```



---
## add_single_subst
```python
from builder import add_single_subst
```



---
## add_multiple_subst
```python
from builder import add_multiple_subst
```



---
## add_alternate_subst
```python
from builder import add_alternate_subst
```



---
## add_ligature_subst
```python
from builder import add_ligature_subst
```



---
## add_chain_context_subst
```python
from builder import add_chain_context_subst
```



---
## add_single_subst_chained_
```python
from builder import add_single_subst_chained_
```



---
## add_multi_subst_chained_
```python
from builder import add_multi_subst_chained_
```



---
## add_reverse_chain_single_subst
```python
from builder import add_reverse_chain_single_subst
```



---
## add_single_pos
```python
from builder import add_single_pos
```



---
## add_class_pair_pos
```python
from builder import add_class_pair_pos
```



---
## add_specific_pair_pos
```python
from builder import add_specific_pair_pos
```



---
## add_cursive_pos
```python
from builder import add_cursive_pos
```



---
## add_mark_base_pos
```python
from builder import add_mark_base_pos
```



---
## add_mark_lig_pos
```python
from builder import add_mark_lig_pos
```



---
## add_mark_mark_pos
```python
from builder import add_mark_mark_pos
```



---
## add_chain_context_pos
```python
from builder import add_chain_context_pos
```



---
## add_single_pos_chained_
```python
from builder import add_single_pos_chained_
```



---
## add_marks_
```python
from builder import add_marks_
```

Helper for add_mark_{base,liga,mark}_pos.

---
## setGlyphClass_
```python
from builder import setGlyphClass_
```



---
## add_glyphClassDef
```python
from builder import add_glyphClassDef
```



---
## add_ligatureCaretByIndex_
```python
from builder import add_ligatureCaretByIndex_
```



---
## makeLigCaret
```python
from builder import makeLigCaret
```



---
## add_ligatureCaretByPos_
```python
from builder import add_ligatureCaretByPos_
```



---
## add_name_record
```python
from builder import add_name_record
```



---
## add_os2_field
```python
from builder import add_os2_field
```



---
## add_hhea_field
```python
from builder import add_hhea_field
```



---
## add_vhea_field
```python
from builder import add_vhea_field
```



---
## add_conditionset
```python
from builder import add_conditionset
```



---
## makeVariablePos
```python
from builder import makeVariablePos
```



---
## makeOpenTypeAnchor
```python
from builder import makeOpenTypeAnchor
```

ast.Anchor --> otTables.Anchor

---
## makeOpenTypeValueRecord
```python
from builder import makeOpenTypeValueRecord
```

ast.ValueRecord --> otBase.ValueRecord

---
## checkattr
```python
from builder import checkattr
```



---
## parse_anchor_
```python
from parser import parse_anchor_
```



---
## parse_anchor_marks_
```python
from parser import parse_anchor_marks_
```



---
## parse_anchordef_
```python
from parser import parse_anchordef_
```



---
## parse_anonymous_
```python
from parser import parse_anonymous_
```



---
## parse_enumerate_
```python
from parser import parse_enumerate_
```



---
## parse_GlyphClassDef_
```python
from parser import parse_GlyphClassDef_
```



---
## parse_glyphclass_definition_
```python
from parser import parse_glyphclass_definition_
```



---
## split_glyph_range_
```python
from parser import split_glyph_range_
```



---
## parse_glyphclass_
```python
from parser import parse_glyphclass_
```



---
## parse_glyph_pattern_
```python
from parser import parse_glyph_pattern_
```



---
## parse_ignore_glyph_pattern_
```python
from parser import parse_ignore_glyph_pattern_
```



---
## parse_ignore_context_
```python
from parser import parse_ignore_context_
```



---
## parse_ignore_
```python
from parser import parse_ignore_
```



---
## parse_include_
```python
from parser import parse_include_
```



---
## parse_language_
```python
from parser import parse_language_
```



---
## parse_ligatureCaretByIndex_
```python
from parser import parse_ligatureCaretByIndex_
```



---
## parse_ligatureCaretByPos_
```python
from parser import parse_ligatureCaretByPos_
```



---
## parse_lookup_
```python
from parser import parse_lookup_
```



---
## parse_lookupflag_
```python
from parser import parse_lookupflag_
```



---
## parse_markClass_
```python
from parser import parse_markClass_
```



---
## parse_position_cursive_
```python
from parser import parse_position_cursive_
```



---
## parse_position_base_
```python
from parser import parse_position_base_
```



---
## parse_position_ligature_
```python
from parser import parse_position_ligature_
```



---
## parse_position_mark_
```python
from parser import parse_position_mark_
```



---
## parse_script_
```python
from parser import parse_script_
```



---
## parse_substitute_
```python
from parser import parse_substitute_
```



---
## parse_subtable_
```python
from parser import parse_subtable_
```



---
## parse_size_parameters_
```python
from parser import parse_size_parameters_
```



---
## parse_size_menuname_
```python
from parser import parse_size_menuname_
```



---
## parse_table_
```python
from parser import parse_table_
```



---
## parse_table_GDEF_
```python
from parser import parse_table_GDEF_
```



---
## parse_table_head_
```python
from parser import parse_table_head_
```



---
## parse_table_hhea_
```python
from parser import parse_table_hhea_
```



---
## parse_table_vhea_
```python
from parser import parse_table_vhea_
```



---
## parse_table_name_
```python
from parser import parse_table_name_
```



---
## parse_name_
```python
from parser import parse_name_
```

Parses a name record. See `section 9.e <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#9.e>`_.

---
## parse_stat_name_
```python
from parser import parse_stat_name_
```



---
## parse_nameid_
```python
from parser import parse_nameid_
```



---
## unescape_string_
```python
from parser import unescape_string_
```



---
## unescape_unichr_
```python
from parser import unescape_unichr_
```



---
## unescape_byte_
```python
from parser import unescape_byte_
```



---
## parse_table_BASE_
```python
from parser import parse_table_BASE_
```



---
## parse_table_OS_2_
```python
from parser import parse_table_OS_2_
```



---
## parse_STAT_ElidedFallbackName
```python
from parser import parse_STAT_ElidedFallbackName
```



---
## parse_STAT_design_axis
```python
from parser import parse_STAT_design_axis
```



---
## parse_STAT_axis_value_
```python
from parser import parse_STAT_axis_value_
```



---
## parse_STAT_location
```python
from parser import parse_STAT_location
```



---
## parse_table_STAT_
```python
from parser import parse_table_STAT_
```



---
## parse_base_tag_list_
```python
from parser import parse_base_tag_list_
```



---
## parse_base_script_list_
```python
from parser import parse_base_script_list_
```



---
## parse_base_script_record_
```python
from parser import parse_base_script_record_
```



---
## parse_device_
```python
from parser import parse_device_
```



---
## is_next_value_
```python
from parser import is_next_value_
```



---
## parse_valuerecord_
```python
from parser import parse_valuerecord_
```



---
## parse_valuerecord_definition_
```python
from parser import parse_valuerecord_definition_
```



---
## parse_languagesystem_
```python
from parser import parse_languagesystem_
```



---
## parse_feature_block_
```python
from parser import parse_feature_block_
```



---
## parse_feature_reference_
```python
from parser import parse_feature_reference_
```



---
## parse_featureNames_
```python
from parser import parse_featureNames_
```

Parses a ``featureNames`` statement found in stylistic set features.
See section `8.c <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#8.c>`_.

---
## parse_cvParameters_
```python
from parser import parse_cvParameters_
```



---
## parse_cvNameIDs_
```python
from parser import parse_cvNameIDs_
```



---
## parse_cvCharacter_
```python
from parser import parse_cvCharacter_
```



---
## parse_FontRevision_
```python
from parser import parse_FontRevision_
```



---
## parse_conditionset_
```python
from parser import parse_conditionset_
```



---
## parse_block_
```python
from parser import parse_block_
```



---
## expect_class_name_
```python
from parser import expect_class_name_
```



---
## expect_cid_
```python
from parser import expect_cid_
```



---
## expect_filename_
```python
from parser import expect_filename_
```



---
## expect_glyph_
```python
from parser import expect_glyph_
```



---
## check_glyph_name_in_glyph_set
```python
from parser import check_glyph_name_in_glyph_set
```

Adds a glyph name (just `start`) or glyph names of a
range (`start` and `end`) which are not in the glyph set
to the "missing list" for future error reporting.

If no glyph set is present, does nothing.

---
## expect_markClass_reference_
```python
from parser import expect_markClass_reference_
```



---
## expect_tag_
```python
from parser import expect_tag_
```



---
## expect_script_tag_
```python
from parser import expect_script_tag_
```



---
## expect_language_tag_
```python
from parser import expect_language_tag_
```



---
## expect_symbol_
```python
from parser import expect_symbol_
```



---
## expect_variable_scalar_
```python
from parser import expect_variable_scalar_
```



---
## expect_master_
```python
from parser import expect_master_
```



---
## expect_any_number_
```python
from parser import expect_any_number_
```



---
## expect_float_
```python
from parser import expect_float_
```



---
## expect_decipoint_
```python
from parser import expect_decipoint_
```



---
## expect_stat_flags
```python
from parser import expect_stat_flags
```



---
## expect_stat_values_
```python
from parser import expect_stat_values_
```



---
## reverse_string_
```python
from parser import reverse_string_
```

'abc' --> 'cba'

---
## make_cid_range_
```python
from parser import make_cid_range_
```

(location, 999, 1001) --> ["cid00999", "cid01000", "cid01001"]

---
## make_glyph_range_
```python
from parser import make_glyph_range_
```

(location, "a.sc", "d.sc") --> ["a.sc", "b.sc", "c.sc", "d.sc"]

---
## __name__
```python
from location import __name__
```



---
## FeatureLibLocation
```python
from location import FeatureLibLocation
```

A location in a feature file

---
## __str__
```python
from location import __str__
```



---
## IncludingLexer
```python
from lexer import IncludingLexer
```

A Lexer that follows include statements.

The OpenType feature file specification states that due to
historical reasons, relative imports should be resolved in this
order:

1. If the source font is UFO format, then relative to the UFO's
   font directory
2. relative to the top-level include file
3. relative to the parent include file

We only support 1 (via includeDir) and 2.

---
## NonIncludingLexer
```python
from lexer import NonIncludingLexer
```

Lexer that does not follow `include` statements, emits them as-is.

---
## scan_anonymous_block
```python
from lexer import scan_anonymous_block
```



---
## make_lexer_
```python
from lexer import make_lexer_
```



---
## deviceToString
```python
from ast import deviceToString
```



---
## asFea
```python
from ast import asFea
```



---
## Comment
```python
from ast import Comment
```

A comment in a feature file.

---
## NullGlyph
```python
from ast import NullGlyph
```

The NULL glyph, used in glyph deletion substitutions.

---
## GlyphClass
```python
from ast import GlyphClass
```

A glyph class, such as ``[acute cedilla grave]``.

---
## GlyphClassName
```python
from ast import GlyphClassName
```

A glyph class name, such as ``@FRENCH_MARKS``. This must be instantiated
with a :class:`GlyphClassDefinition` object.

---
## MarkClassName
```python
from ast import MarkClassName
```

A mark class name, such as ``@FRENCH_MARKS`` defined with ``markClass``.
This must be instantiated with a :class:`MarkClass` object.

---
## AnonymousBlock
```python
from ast import AnonymousBlock
```

An anonymous data block.

---
## Block
```python
from ast import Block
```

A block of statements: feature, lookup, etc.

---
## FeatureFile
```python
from ast import FeatureFile
```

The top-level element of the syntax tree, containing the whole feature
file in its ``statements`` attribute.

---
## FeatureBlock
```python
from ast import FeatureBlock
```

A named feature block.

---
## NestedBlock
```python
from ast import NestedBlock
```

A block inside another block, for example when found inside a
``cvParameters`` block.

---
## LookupBlock
```python
from ast import LookupBlock
```

A named lookup, containing ``statements``.

---
## TableBlock
```python
from ast import TableBlock
```

A ``table ... { }`` block.

---
## GlyphClassDefinition
```python
from ast import GlyphClassDefinition
```

Example: ``@UPPERCASE = [A-Z];``.

---
## GlyphClassDefStatement
```python
from ast import GlyphClassDefStatement
```

Example: ``GlyphClassDef @UPPERCASE, [B], [C], [D];``. The parameters
must be either :class:`GlyphClass` or :class:`GlyphClassName` objects, or
``None``.

---
## MarkClass
```python
from ast import MarkClass
```

One `or more` ``markClass`` statements for the same mark class.

While glyph classes can be defined only once, the feature file format
allows expanding mark classes with multiple definitions, each using
different glyphs and anchors. The following are two ``MarkClassDefinitions``
for the same ``MarkClass``::

    markClass [acute grave] <anchor 350 800> @FRENCH_ACCENTS;
    markClass [cedilla] <anchor 350 -200> @FRENCH_ACCENTS;

The ``MarkClass`` object is therefore just a container for a list of
:class:`MarkClassDefinition` statements.

---
## MarkClassDefinition
```python
from ast import MarkClassDefinition
```

A single ``markClass`` statement. The ``markClass`` should be a
:class:`MarkClass` object, the ``anchor`` an :class:`Anchor` object,
and the ``glyphs`` parameter should be a `glyph-containing object`_ .

Example:

    .. code:: python

        mc = MarkClass("FRENCH_ACCENTS")
        mc.addDefinition( MarkClassDefinition(mc, Anchor(350, 800),
            GlyphClass([ GlyphName("acute"), GlyphName("grave") ])
        ) )
        mc.addDefinition( MarkClassDefinition(mc, Anchor(350, -200),
            GlyphClass([ GlyphName("cedilla") ])
        ) )

        mc.asFea()
        # markClass [acute grave] <anchor 350 800> @FRENCH_ACCENTS;
        # markClass [cedilla] <anchor 350 -200> @FRENCH_ACCENTS;

---
## AlternateSubstStatement
```python
from ast import AlternateSubstStatement
```

A ``sub ... from ...`` statement.

``prefix``, ``glyph``, ``suffix`` and ``replacement`` should be lists of
`glyph-containing objects`_. ``glyph`` should be a `one element list`.

---
## Anchor
```python
from ast import Anchor
```

An ``Anchor`` element, used inside a ``pos`` rule.

If a ``name`` is given, this will be used in preference to the coordinates.
Other values should be integer.

---
## AttachStatement
```python
from ast import AttachStatement
```

A ``GDEF`` table ``Attach`` statement.

---
## ChainContextPosStatement
```python
from ast import ChainContextPosStatement
```

A chained contextual positioning statement.

``prefix``, ``glyphs``, and ``suffix`` should be lists of
`glyph-containing objects`_ .

``lookups`` should be a list of elements representing what lookups
to apply at each glyph position. Each element should be a
:class:`LookupBlock` to apply a single chaining lookup at the given
position, a list of :class:`LookupBlock`\ s to apply multiple
lookups, or ``None`` to apply no lookup. The length of the outer
list should equal the length of ``glyphs``; the inner lists can be
of variable length.

---
## ChainContextSubstStatement
```python
from ast import ChainContextSubstStatement
```

A chained contextual substitution statement.

``prefix``, ``glyphs``, and ``suffix`` should be lists of
`glyph-containing objects`_ .

``lookups`` should be a list of elements representing what lookups
to apply at each glyph position. Each element should be a
:class:`LookupBlock` to apply a single chaining lookup at the given
position, a list of :class:`LookupBlock`\ s to apply multiple
lookups, or ``None`` to apply no lookup. The length of the outer
list should equal the length of ``glyphs``; the inner lists can be
of variable length.

---
## CursivePosStatement
```python
from ast import CursivePosStatement
```

A cursive positioning statement. Entry and exit anchors can either
be :class:`Anchor` objects or ``None``.

---
## FeatureReferenceStatement
```python
from ast import FeatureReferenceStatement
```

Example: ``feature salt;``

---
## IgnorePosStatement
```python
from ast import IgnorePosStatement
```

An ``ignore pos`` statement, containing `one or more` contexts to ignore.

``chainContexts`` should be a list of ``(prefix, glyphs, suffix)`` tuples,
with each of ``prefix``, ``glyphs`` and ``suffix`` being
`glyph-containing objects`_ .

---
## IgnoreSubstStatement
```python
from ast import IgnoreSubstStatement
```

An ``ignore sub`` statement, containing `one or more` contexts to ignore.

``chainContexts`` should be a list of ``(prefix, glyphs, suffix)`` tuples,
with each of ``prefix``, ``glyphs`` and ``suffix`` being
`glyph-containing objects`_ .

---
## IncludeStatement
```python
from ast import IncludeStatement
```

An ``include()`` statement.

---
## LanguageStatement
```python
from ast import LanguageStatement
```

A ``language`` statement within a feature.

---
## LanguageSystemStatement
```python
from ast import LanguageSystemStatement
```

A top-level ``languagesystem`` statement.

---
## FontRevisionStatement
```python
from ast import FontRevisionStatement
```

A ``head`` table ``FontRevision`` statement. ``revision`` should be a
number, and will be formatted to three significant decimal places.

---
## LigatureCaretByIndexStatement
```python
from ast import LigatureCaretByIndexStatement
```

A ``GDEF`` table ``LigatureCaretByIndex`` statement. ``glyphs`` should be
a `glyph-containing object`_, and ``carets`` should be a list of integers.

---
## LigatureCaretByPosStatement
```python
from ast import LigatureCaretByPosStatement
```

A ``GDEF`` table ``LigatureCaretByPos`` statement. ``glyphs`` should be
a `glyph-containing object`_, and ``carets`` should be a list of integers.

---
## LigatureSubstStatement
```python
from ast import LigatureSubstStatement
```

A chained contextual substitution statement.

``prefix``, ``glyphs``, and ``suffix`` should be lists of
`glyph-containing objects`_; ``replacement`` should be a single
`glyph-containing object`_.

If ``forceChain`` is True, this is expressed as a chaining rule
(e.g. ``sub f' i' by f_i``) even when no context is given.

---
## LookupFlagStatement
```python
from ast import LookupFlagStatement
```

A ``lookupflag`` statement. The ``value`` should be an integer value
representing the flags in use, but not including the ``markAttachment``
class and ``markFilteringSet`` values, which must be specified as
glyph-containing objects.

---
## LookupReferenceStatement
```python
from ast import LookupReferenceStatement
```

Represents a ``lookup ...;`` statement to include a lookup in a feature.

The ``lookup`` should be a :class:`LookupBlock` object.

---
## MarkBasePosStatement
```python
from ast import MarkBasePosStatement
```

A mark-to-base positioning rule. The ``base`` should be a
`glyph-containing object`_. The ``marks`` should be a list of
(:class:`Anchor`, :class:`MarkClass`) tuples.

---
## MarkLigPosStatement
```python
from ast import MarkLigPosStatement
```

A mark-to-ligature positioning rule. The ``ligatures`` must be a
`glyph-containing object`_. The ``marks`` should be a list of lists: each
element in the top-level list represents a component glyph, and is made
up of a list of (:class:`Anchor`, :class:`MarkClass`) tuples representing
mark attachment points for that position.

Example::

    m1 = MarkClass("TOP_MARKS")
    m2 = MarkClass("BOTTOM_MARKS")
    # ... add definitions to mark classes...

    glyph = GlyphName("lam_meem_jeem")
    marks = [
        [ (Anchor(625,1800), m1) ], # Attachments on 1st component (lam)
        [ (Anchor(376,-378), m2) ], # Attachments on 2nd component (meem)
        [ ]                         # No attachments on the jeem
    ]
    mlp = MarkLigPosStatement(glyph, marks)

    mlp.asFea()
    # pos ligature lam_meem_jeem <anchor 625 1800> mark @TOP_MARKS
    # ligComponent <anchor 376 -378> mark @BOTTOM_MARKS;

---
## MarkMarkPosStatement
```python
from ast import MarkMarkPosStatement
```

A mark-to-mark positioning rule. The ``baseMarks`` must be a
`glyph-containing object`_. The ``marks`` should be a list of
(:class:`Anchor`, :class:`MarkClass`) tuples.

---
## MultipleSubstStatement
```python
from ast import MultipleSubstStatement
```

A multiple substitution statement.

Args:
    prefix: a list of `glyph-containing objects`_.
    glyph: a single glyph-containing object.
    suffix: a list of glyph-containing objects.
    replacement: a list of glyph-containing objects.
    forceChain: If true, the statement is expressed as a chaining rule
        (e.g. ``sub f' i' by f_i``) even when no context is given.

---
## PairPosStatement
```python
from ast import PairPosStatement
```

A pair positioning statement.

``glyphs1`` and ``glyphs2`` should be `glyph-containing objects`_.
``valuerecord1`` should be a :class:`ValueRecord` object;
``valuerecord2`` should be either a :class:`ValueRecord` object or ``None``.
If ``enumerated`` is true, then this is expressed as an
`enumerated pair <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#6.b.ii>`_.

---
## ReverseChainSingleSubstStatement
```python
from ast import ReverseChainSingleSubstStatement
```

A reverse chaining substitution statement. You don't see those every day.

Note the unusual argument order: ``suffix`` comes `before` ``glyphs``.
``old_prefix``, ``old_suffix``, ``glyphs`` and ``replacements`` should be
lists of `glyph-containing objects`_. ``glyphs`` and ``replacements`` should
be one-item lists.

---
## SingleSubstStatement
```python
from ast import SingleSubstStatement
```

A single substitution statement.

Note the unusual argument order: ``prefix`` and suffix come `after`
the replacement ``glyphs``. ``prefix``, ``suffix``, ``glyphs`` and
``replace`` should be lists of `glyph-containing objects`_. ``glyphs`` and
``replace`` should be one-item lists.

---
## ScriptStatement
```python
from ast import ScriptStatement
```

A ``script`` statement.

---
## SinglePosStatement
```python
from ast import SinglePosStatement
```

A single position statement. ``prefix`` and ``suffix`` should be
lists of `glyph-containing objects`_.

``pos`` should be a one-element list containing a (`glyph-containing object`_,
:class:`ValueRecord`) tuple.

---
## SubtableStatement
```python
from ast import SubtableStatement
```

Represents a subtable break.

---
## ValueRecord
```python
from ast import ValueRecord
```

Represents a value record.

---
## ValueRecordDefinition
```python
from ast import ValueRecordDefinition
```

Represents a named value record definition.

---
## simplify_name_attributes
```python
from ast import simplify_name_attributes
```



---
## NameRecord
```python
from ast import NameRecord
```

Represents a name record. (`Section 9.e. <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#9.e>`_)

---
## FeatureNameStatement
```python
from ast import FeatureNameStatement
```

Represents a ``sizemenuname`` or ``name`` statement.

---
## STATNameStatement
```python
from ast import STATNameStatement
```

Represents a STAT table ``name`` statement.

---
## SizeParameters
```python
from ast import SizeParameters
```

A ``parameters`` statement.

---
## CVParametersNameStatement
```python
from ast import CVParametersNameStatement
```

Represent a name statement inside a ``cvParameters`` block.

---
## CharacterStatement
```python
from ast import CharacterStatement
```

Statement used in cvParameters blocks of Character Variant features (cvXX).
The Unicode value may be written with either decimal or hexadecimal
notation. The value must be preceded by '0x' if it is a hexadecimal value.
The largest Unicode value allowed is 0xFFFFFF.

---
## BaseAxis
```python
from ast import BaseAxis
```

An axis definition, being either a ``VertAxis.BaseTagList/BaseScriptList``
pair or a ``HorizAxis.BaseTagList/BaseScriptList`` pair.

---
## OS2Field
```python
from ast import OS2Field
```

An entry in the ``OS/2`` table. Most ``values`` should be numbers or
strings, apart from when the key is ``UnicodeRange``, ``CodePageRange``
or ``Panose``, in which case it should be an array of integers.

---
## HheaField
```python
from ast import HheaField
```

An entry in the ``hhea`` table.

---
## VheaField
```python
from ast import VheaField
```

An entry in the ``vhea`` table.

---
## STATDesignAxisStatement
```python
from ast import STATDesignAxisStatement
```

A STAT table Design Axis

Args:
    tag (str): a 4 letter axis tag
    axisOrder (int): an int
    names (list): a list of :class:`STATNameStatement` objects

---
## ElidedFallbackName
```python
from ast import ElidedFallbackName
```

STAT table ElidedFallbackName

Args:
    names: a list of :class:`STATNameStatement` objects

---
## ElidedFallbackNameID
```python
from ast import ElidedFallbackNameID
```

STAT table ElidedFallbackNameID

Args:
    value: an int pointing to an existing name table name ID

---
## STATAxisValueStatement
```python
from ast import STATAxisValueStatement
```

A STAT table Axis Value Record

Args:
    names (list): a list of :class:`STATNameStatement` objects
    locations (list): a list of :class:`AxisValueLocationStatement` objects
    flags (int): an int

---
## AxisValueLocationStatement
```python
from ast import AxisValueLocationStatement
```

A STAT table Axis Value Location

Args:
    tag (str): a 4 letter axis tag
    values (list): a list of ints and/or floats

---
## ConditionsetStatement
```python
from ast import ConditionsetStatement
```

A variable layout conditionset

Args:
    name (str): the name of this conditionset
    conditions (dict): a dictionary mapping axis tags to a
        tuple of (min,max) userspace coordinates.

---
## VariationBlock
```python
from ast import VariationBlock
```

A variation feature block, applicable in a given set of conditions.

---
## extend
```python
from ast import extend
```

Add a list of :class:`GlyphName` objects to the class.

---
## append
```python
from ast import append
```

Add a single :class:`GlyphName` object to the class.

---
## add_range
```python
from ast import add_range
```

Add a range (e.g. ``A-Z``) to the class. ``start`` and ``end``
are either :class:`GlyphName` objects or strings representing the
start and end glyphs in the class, and ``glyphs`` is the full list of
:class:`GlyphName` objects in the range.

---
## add_cid_range
```python
from ast import add_cid_range
```

Add a range to the class by glyph ID. ``start`` and ``end`` are the
initial and final IDs, and ``glyphs`` is the full list of
:class:`GlyphName` objects in the range.

---
## add_class
```python
from ast import add_class
```

Add glyphs from the given :class:`GlyphClassName` object to the
class.

---
## addDefinition
```python
from ast import addDefinition
```

Add a :class:`MarkClassDefinition` statement to this mark class.

---
## __eq__
```python
from ast import __eq__
```



---
## __ne__
```python
from ast import __ne__
```



---
## __hash__
```python
from ast import __hash__
```



---
## __bool__
```python
from ast import __bool__
```



---
## escape
```python
from ast import escape
```



---
## intarr2str
```python
from ast import intarr2str
```



---
## __name__
```python
from sfnt import __name__
```

ttLib/sfnt.py -- low-level module to deal with the sfnt file format.

Defines two public classes:

- SFNTReader
- SFNTWriter

(Normally you don't have to use these classes explicitly; they are
used automatically by ttLib.TTFont.)

The reading and writing of sfnt files is separated in two distinct
classes, since whenever the number of tables changes or whenever
a table's length changes you need to rewrite the whole file anyway.

---
## SFNTReader
```python
from sfnt import SFNTReader
```



---
## compress
```python
from sfnt import compress
```

Compress 'data' to Zlib format. If 'USE_ZOPFLI' variable is True,
zopfli is used instead of the zlib module.
The compression 'level' must be between 0 and 9. 1 gives best speed,
9 gives best compression (0 gives no compression at all).
The default value is a compromise between speed and compression (6).

---
## SFNTWriter
```python
from sfnt import SFNTWriter
```



---
## DirectoryEntry
```python
from sfnt import DirectoryEntry
```



---
## SFNTDirectoryEntry
```python
from sfnt import SFNTDirectoryEntry
```



---
## WOFFDirectoryEntry
```python
from sfnt import WOFFDirectoryEntry
```



---
## WOFFFlavorData
```python
from sfnt import WOFFFlavorData
```



---
## calcChecksum
```python
from sfnt import calcChecksum
```

Calculate the checksum for an arbitrary block of data.

If the data length is not a multiple of four, it assumes
it is to be padded with null byte.

        >>> print(calcChecksum(b"abcd"))
        1633837924
        >>> print(calcChecksum(b"abcdxyz"))
        3655064932

---
## readTTCHeader
```python
from sfnt import readTTCHeader
```



---
## writeTTCHeader
```python
from sfnt import writeTTCHeader
```



---
## __new__
```python
from sfnt import __new__
```

Return an instance of the SFNTWriter sub-class which is compatible
with the specified 'flavor'.

---
## __init__
```python
from sfnt import __init__
```



---
## has_key
```python
from sfnt import has_key
```



---
## keys
```python
from sfnt import keys
```



---
## __getitem__
```python
from sfnt import __getitem__
```



---
## __delitem__
```python
from sfnt import __delitem__
```



---
## close
```python
from sfnt import close
```

All tables must have been written to disk. Now write the
directory.

---
## __getstate__
```python
from sfnt import __getstate__
```



---
## __setstate__
```python
from sfnt import __setstate__
```



---
## setEntry
```python
from sfnt import setEntry
```



---
## __setitem__
```python
from sfnt import __setitem__
```

Write raw table data to disk.

---
## _calcMasterChecksum
```python
from sfnt import _calcMasterChecksum
```



---
## writeMasterChecksum
```python
from sfnt import writeMasterChecksum
```



---
## reordersTables
```python
from sfnt import reordersTables
```



---
## fromFile
```python
from sfnt import fromFile
```



---
## fromString
```python
from sfnt import fromString
```



---
## toString
```python
from sfnt import toString
```



---
## __repr__
```python
from sfnt import __repr__
```



---
## loadData
```python
from sfnt import loadData
```



---
## saveData
```python
from sfnt import saveData
```



---
## decodeData
```python
from sfnt import decodeData
```



---
## encodeData
```python
from sfnt import encodeData
```



---
## _decompress
```python
from sfnt import _decompress
```



---
## __name__
```python
from macUtils import __name__
```

ttLib.macUtils.py -- Various Mac-specific stuff.

---
## getSFNTResIndices
```python
from macUtils import getSFNTResIndices
```

Determine whether a file has a 'sfnt' resource fork or not.

---
## openTTFonts
```python
from macUtils import openTTFonts
```

Given a pathname, return a list of TTFont objects. In the case
of a flat TTF/OTF file, the list will contain just one font object;
but in the case of a Mac font suitcase it will contain as many
font objects as there are sfnt resources in the file.

---
## SFNTResourceReader
```python
from macUtils import SFNTResourceReader
```

Simple read-only file wrapper for 'sfnt' resources.

---
## __init__
```python
from macUtils import __init__
```



---
## __name__
```python
from standardGlyphOrder import __name__
```



---
## __name__
```python
from ttCollection import __name__
```



---
## TTCollection
```python
from ttCollection import TTCollection
```

Object representing a TrueType Collection / OpenType Collection.
The main API is self.fonts being a list of TTFont instances.

If shareTables is True, then different fonts in the collection
might point to the same table object if the data for the table was
the same in the font file.  Note, however, that this might result
in suprises and incorrect behavior if the different fonts involved
have different GlyphOrder.  Use only if you know what you are doing.

---
## __init__
```python
from ttCollection import __init__
```



---
## __enter__
```python
from ttCollection import __enter__
```



---
## __exit__
```python
from ttCollection import __exit__
```



---
## close
```python
from ttCollection import close
```



---
## save
```python
from ttCollection import save
```

Save the font to disk. Similarly to the constructor,
the 'file' argument can be either a pathname or a writable
file object.

---
## saveXML
```python
from ttCollection import saveXML
```



---
## __getitem__
```python
from ttCollection import __getitem__
```



---
## __setitem__
```python
from ttCollection import __setitem__
```



---
## __delitem__
```python
from ttCollection import __delitem__
```



---
## __len__
```python
from ttCollection import __len__
```



---
## __iter__
```python
from ttCollection import __iter__
```



---
## __name__
```python
from ttGlyphSet import __name__
```

GlyphSets returned by a TTFont.

---
## _TTGlyphSet
```python
from ttGlyphSet import _TTGlyphSet
```

Generic dict-like GlyphSet class that pulls metrics from hmtx and
glyph shape from TrueType or CFF.

---
## _TTGlyphSetGlyf
```python
from ttGlyphSet import _TTGlyphSetGlyf
```



---
## _TTGlyphSetCFF
```python
from ttGlyphSet import _TTGlyphSetCFF
```



---
## _TTGlyphSetVARC
```python
from ttGlyphSet import _TTGlyphSetVARC
```



---
## _TTGlyph
```python
from ttGlyphSet import _TTGlyph
```

Glyph object that supports the Pen protocol, meaning that it has
.draw() and .drawPoints() methods that take a pen object as their only
argument. Additionally there are 'width' and 'lsb' attributes, read from
the 'hmtx' table.

If the font contains a 'vmtx' table, there will also be 'height' and 'tsb'
attributes.

---
## _TTGlyphGlyf
```python
from ttGlyphSet import _TTGlyphGlyf
```



---
## _TTGlyphCFF
```python
from ttGlyphSet import _TTGlyphCFF
```



---
## _evaluateCondition
```python
from ttGlyphSet import _evaluateCondition
```



---
## _TTGlyphVARC
```python
from ttGlyphSet import _TTGlyphVARC
```



---
## _setCoordinates
```python
from ttGlyphSet import _setCoordinates
```



---
## LerpGlyphSet
```python
from ttGlyphSet import LerpGlyphSet
```

A glyphset that interpolates between two other glyphsets.

Factor is typically between 0 and 1. 0 means the first glyphset,
1 means the second glyphset, and 0.5 means the average of the
two glyphsets. Other values are possible, and can be useful to
extrapolate. Defaults to 0.5.

---
## LerpGlyph
```python
from ttGlyphSet import LerpGlyph
```



---
## __init__
```python
from ttGlyphSet import __init__
```



---
## pushLocation
```python
from ttGlyphSet import pushLocation
```



---
## pushDepth
```python
from ttGlyphSet import pushDepth
```



---
## __contains__
```python
from ttGlyphSet import __contains__
```



---
## __iter__
```python
from ttGlyphSet import __iter__
```



---
## __len__
```python
from ttGlyphSet import __len__
```



---
## has_key
```python
from ttGlyphSet import has_key
```



---
## __getitem__
```python
from ttGlyphSet import __getitem__
```



---
## draw
```python
from ttGlyphSet import draw
```



---
## drawPoints
```python
from ttGlyphSet import drawPoints
```



---
## _getGlyphAndOffset
```python
from ttGlyphSet import _getGlyphAndOffset
```



---
## _getGlyphInstance
```python
from ttGlyphSet import _getGlyphInstance
```



---
## _draw
```python
from ttGlyphSet import _draw
```

Draw the glyph onto ``pen``. See fontTools.pens.basePen for details
how that works.

---
## TTLibError
```python
from __init__ import TTLibError
```



---
## TTLibFileIsCollectionError
```python
from __init__ import TTLibFileIsCollectionError
```



---
## debugmsg
```python
from __init__ import debugmsg
```



---
## __name__
```python
from removeOverlaps import __name__
```

Simplify TrueType glyphs by merging overlapping contours/components.

Requires https://github.com/fonttools/skia-pathops

---
## RemoveOverlapsError
```python
from removeOverlaps import RemoveOverlapsError
```



---
## skPathFromGlyph
```python
from removeOverlaps import skPathFromGlyph
```



---
## skPathFromGlyphComponent
```python
from removeOverlaps import skPathFromGlyphComponent
```



---
## componentsOverlap
```python
from removeOverlaps import componentsOverlap
```



---
## ttfGlyphFromSkPath
```python
from removeOverlaps import ttfGlyphFromSkPath
```



---
## _charString_from_SkPath
```python
from removeOverlaps import _charString_from_SkPath
```



---
## _round_path
```python
from removeOverlaps import _round_path
```



---
## _simplify
```python
from removeOverlaps import _simplify
```



---
## _same_path
```python
from removeOverlaps import _same_path
```



---
## removeTTGlyphOverlaps
```python
from removeOverlaps import removeTTGlyphOverlaps
```



---
## _remove_glyf_overlaps
```python
from removeOverlaps import _remove_glyf_overlaps
```



---
## _remove_charstring_overlaps
```python
from removeOverlaps import _remove_charstring_overlaps
```



---
## _remove_cff_overlaps
```python
from removeOverlaps import _remove_cff_overlaps
```



---
## removeOverlaps
```python
from removeOverlaps import removeOverlaps
```

Simplify glyphs in TTFont by merging overlapping contours.

Overlapping components are first decomposed to simple contours, then merged.

Currently this only works for fonts with 'glyf' or 'CFF ' tables.
Raises NotImplementedError if 'glyf' or 'CFF ' tables are absent.

Note that removing overlaps invalidates the hinting. By default we drop hinting
from all glyphs whether or not overlaps are removed from a given one, as it would
look weird if only some glyphs are left (un)hinted.

Args:
    font: input TTFont object, modified in place.
    glyphNames: optional iterable of glyph names (str) to remove overlaps from.
        By default, all glyphs in the font are processed.
    removeHinting (bool): set to False to keep hinting for unmodified glyphs.
    ignoreErrors (bool): set to True to ignore errors while removing overlaps,
        thus keeping the tricky glyphs unchanged (fonttools/fonttools#2363).
    removeUnusedSubroutines (bool): set to False to keep unused subroutines
        in CFF table after removing overlaps. Default is to remove them if
        any glyphs are modified.

---
## main
```python
from removeOverlaps import main
```

Simplify glyphs in TTFont by merging overlapping contours.

---
## _get_nth_component_path
```python
from removeOverlaps import _get_nth_component_path
```



---
## __name__
```python
from scaleUpem import __name__
```

Change the units-per-EM of a font.

AAT and Graphite tables are not supported. CFF/CFF2 fonts
are de-subroutinized.

---
## ScalerVisitor
```python
from scaleUpem import ScalerVisitor
```



---
## visit
```python
from scaleUpem import visit
```



---
## _cff_scale
```python
from scaleUpem import _cff_scale
```



---
## _setup_scale_paint
```python
from scaleUpem import _setup_scale_paint
```



---
## scale_upem
```python
from scaleUpem import scale_upem
```

Change the units-per-EM of font to the new value.

---
## main
```python
from scaleUpem import main
```

Change the units-per-EM of fonts

---
## __init__
```python
from scaleUpem import __init__
```



---
## scale
```python
from scaleUpem import scale
```



---
## __name__
```python
from reorderGlyphs import __name__
```

Reorder glyphs in a font.

---
## _sort_by_gid
```python
from reorderGlyphs import _sort_by_gid
```



---
## _get_dotted_attr
```python
from reorderGlyphs import _get_dotted_attr
```



---
## ReorderRule
```python
from reorderGlyphs import ReorderRule
```

A rule to reorder something in a font to match the fonts glyph order.

---
## ReorderCoverage
```python
from reorderGlyphs import ReorderCoverage
```

Reorder a Coverage table, and optionally a list that is sorted parallel to it.

---
## ReorderList
```python
from reorderGlyphs import ReorderList
```

Reorder the items within a list to match the updated glyph order.

Useful when a list ordered by coverage itself contains something ordered by a gid.
For example, the PairSet table of https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#lookup-type-2-pair-adjustment-positioning-subtable.

---
## _bfs_base_table
```python
from reorderGlyphs import _bfs_base_table
```



---
## _traverse_ot_data
```python
from reorderGlyphs import _traverse_ot_data
```



---
## reorderGlyphs
```python
from reorderGlyphs import reorderGlyphs
```



---
## apply
```python
from reorderGlyphs import apply
```



---
## __name__
```python
from ttFont import __name__
```



---
## TTFont
```python
from ttFont import TTFont
```

Represents a TrueType font.

The object manages file input and output, and offers a convenient way of
accessing tables. Tables will be only decompiled when necessary, ie. when
they're actually accessed. This means that simple operations can be extremely fast.

Example usage:
.. code-block:: pycon

    >>>
    >> from fontTools import ttLib
    >> tt = ttLib.TTFont("afont.ttf") # Load an existing font file
    >> tt['maxp'].numGlyphs
    242
    >> tt['OS/2'].achVendID
    'B&H'
    >> tt['head'].unitsPerEm
    2048

For details of the objects returned when accessing each table, see :ref:`tables`.
To add a table to the font, use the :py:func:`newTable` function:
.. code-block:: pycon

    >>>
    >> os2 = newTable("OS/2")
    >> os2.version = 4
    >> # set other attributes
    >> font["OS/2"] = os2

TrueType fonts can also be serialized to and from XML format (see also the
:ref:`ttx` binary):
.. code-block:: pycon

    >>
    >> tt.saveXML("afont.ttx")
    Dumping 'LTSH' table...
    Dumping 'OS/2' table...
    [...]

    >> tt2 = ttLib.TTFont() # Create a new font object
    >> tt2.importXML("afont.ttx")
    >> tt2['maxp'].numGlyphs
    242

The TTFont object may be used as a context manager; this will cause the file
reader to be closed after the context ``with`` block is exited::

        with TTFont(filename) as f:
                # Do stuff

Args:
        file: When reading a font from disk, either a pathname pointing to a file,
                or a readable file object.
        res_name_or_index: If running on a Macintosh, either a sfnt resource name or
                an sfnt resource index number. If the index number is zero, TTLib will
                autodetect whether the file is a flat file or a suitcase. (If it is a suitcase,
                only the first 'sfnt' resource will be read.)
        sfntVersion (str): When constructing a font object from scratch, sets the four-byte
                sfnt magic number to be used. Defaults to ```` (TrueType). To create
                an OpenType file, use ``OTTO``.
        flavor (str): Set this to ``woff`` when creating a WOFF file or ``woff2`` for a WOFF2
                file.
        checkChecksums (int): How checksum data should be treated. Default is 0
                (no checking). Set to 1 to check and warn on wrong checksums; set to 2 to
                raise an exception if any wrong checksums are found.
        recalcBBoxes (bool): If true (the default), recalculates ``glyf``, ``CFF ``,
                ``head`` bounding box values and ``hhea``/``vhea`` min/max values on save.
                Also compiles the glyphs on importing, which saves memory consumption and
                time.
        ignoreDecompileErrors (bool): If true, exceptions raised during table decompilation
                will be ignored, and the binary data will be returned for those tables instead.
        recalcTimestamp (bool): If true (the default), sets the ``modified`` timestamp in
                the ``head`` table on save.
        fontNumber (int): The index of the font in a TrueType Collection file.
        lazy (bool): If lazy is set to True, many data structures are loaded lazily, upon
                access only. If it is set to False, many data structures are loaded immediately.
                The default is ``lazy=None`` which is somewhere in between.

---
## GlyphOrder
```python
from ttFont import GlyphOrder
```

A pseudo table. The glyph order isn't in the font as a separate
table, but it's nice to present it as such in the TTX format.

---
## getTableModule
```python
from ttFont import getTableModule
```

Fetch the packer/unpacker module for a table.
Return None when no module is found.

---
## registerCustomTableClass
```python
from ttFont import registerCustomTableClass
```

Register a custom packer/unpacker class for a table.

The 'moduleName' must be an importable module. If no 'className'
is given, it is derived from the tag, for example it will be
``table_C_U_S_T_`` for a 'CUST' tag.

The registered table class should be a subclass of
:py:class:`fontTools.ttLib.tables.DefaultTable.DefaultTable`

---
## unregisterCustomTableClass
```python
from ttFont import unregisterCustomTableClass
```

Unregister the custom packer/unpacker class for a table.

---
## getCustomTableClass
```python
from ttFont import getCustomTableClass
```

Return the custom table class for tag, if one has been registered
with 'registerCustomTableClass()'. Else return None.

---
## getTableClass
```python
from ttFont import getTableClass
```

Fetch the packer/unpacker class for a table.

---
## getClassTag
```python
from ttFont import getClassTag
```

Fetch the table tag for a class object.

---
## newTable
```python
from ttFont import newTable
```

Return a new instance of a table.

---
## _escapechar
```python
from ttFont import _escapechar
```

Helper function for tagToIdentifier()

---
## tagToIdentifier
```python
from ttFont import tagToIdentifier
```

Convert a table tag to a valid (but UGLY) python identifier,
as well as a filename that's guaranteed to be unique even on a
caseless file system. Each character is mapped to two characters.
Lowercase letters get an underscore before the letter, uppercase
letters get an underscore after the letter. Trailing spaces are
trimmed. Illegal characters are escaped as two hex bytes. If the
result starts with a number (as the result of a hex escape), an
extra underscore is prepended. Examples:
.. code-block:: pycon

    >>>
    >> tagToIdentifier('glyf')
    '_g_l_y_f'
    >> tagToIdentifier('cvt ')
    '_c_v_t'
    >> tagToIdentifier('OS/2')
    'O_S_2f_2'

---
## identifierToTag
```python
from ttFont import identifierToTag
```

the opposite of tagToIdentifier()

---
## tagToXML
```python
from ttFont import tagToXML
```

Similarly to tagToIdentifier(), this converts a TT tag
to a valid XML element name. Since XML element names are
case sensitive, this is a fairly simple/readable translation.

---
## xmlToTag
```python
from ttFont import xmlToTag
```

The opposite of tagToXML()

---
## sortedTagList
```python
from ttFont import sortedTagList
```

Return a sorted copy of tagList, sorted according to the OpenType
specification, or according to a custom tableOrder. If given and not
None, tableOrder needs to be a list of tag names.

---
## reorderFontTables
```python
from ttFont import reorderFontTables
```

Rewrite a font file, ordering the tables as recommended by the
OpenType specification 1.4.

---
## maxPowerOfTwo
```python
from ttFont import maxPowerOfTwo
```

Return the highest exponent of two, so that
(2 ** exponent) <= x.  Return 0 if x is 0.

---
## getSearchRange
```python
from ttFont import getSearchRange
```

Calculate searchRange, entrySelector, rangeShift.

---
## __init__
```python
from ttFont import __init__
```



---
## __enter__
```python
from ttFont import __enter__
```



---
## __exit__
```python
from ttFont import __exit__
```



---
## close
```python
from ttFont import close
```

If we still have a reader object, close it.

---
## save
```python
from ttFont import save
```

Save the font to disk.

Args:
        file: Similarly to the constructor, can be either a pathname or a writable
                file object.
        reorderTables (Option[bool]): If true (the default), reorder the tables,
                sorting them by tag (recommended by the OpenType specification). If
                false, retain the original font order. If None, reorder by table
                dependency (fastest).

---
## _save
```python
from ttFont import _save
```

Internal function, to be shared by save() and TTCollection.save()

---
## saveXML
```python
from ttFont import saveXML
```

Export the font as TTX (an XML-based text file), or as a series of text
files when splitTables is true. In the latter case, the 'fileOrPath'
argument should be a path to a directory.
The 'tables' argument must either be false (dump all tables) or a
list of tables to dump. The 'skipTables' argument may be a list of tables
to skip, but only when the 'tables' argument is false.

---
## _saveXML
```python
from ttFont import _saveXML
```



---
## _tableToXML
```python
from ttFont import _tableToXML
```



---
## importXML
```python
from ttFont import importXML
```

Import a TTX file (an XML-based text format), so as to recreate
a font object.

---
## isLoaded
```python
from ttFont import isLoaded
```

Return true if the table identified by ``tag`` has been
decompiled and loaded into memory.

---
## has_key
```python
from ttFont import has_key
```

Test if the table identified by ``tag`` is present in the font.

As well as this method, ``tag in font`` can also be used to determine the
presence of the table.

---
## keys
```python
from ttFont import keys
```

Returns the list of tables in the font, along with the ``GlyphOrder`` pseudo-table.

---
## ensureDecompiled
```python
from ttFont import ensureDecompiled
```

Decompile all the tables, even if a TTFont was opened in 'lazy' mode.

---
## __len__
```python
from ttFont import __len__
```



---
## __getitem__
```python
from ttFont import __getitem__
```



---
## _readTable
```python
from ttFont import _readTable
```



---
## __setitem__
```python
from ttFont import __setitem__
```



---
## __delitem__
```python
from ttFont import __delitem__
```



---
## get
```python
from ttFont import get
```

Returns the table if it exists or (optionally) a default if it doesn't.

---
## setGlyphOrder
```python
from ttFont import setGlyphOrder
```

Set the glyph order

Args:
        glyphOrder ([str]): List of glyph names in order.

---
## getGlyphOrder
```python
from ttFont import getGlyphOrder
```

Returns a list of glyph names ordered by their position in the font.

---
## _getGlyphNamesFromCmap
```python
from ttFont import _getGlyphNamesFromCmap
```



---
## _makeGlyphName
```python
from ttFont import _makeGlyphName
```



---
## getGlyphNames
```python
from ttFont import getGlyphNames
```

Get a list of glyph names, sorted alphabetically.

---
## getGlyphNames2
```python
from ttFont import getGlyphNames2
```

Get a list of glyph names, sorted alphabetically,
but not case sensitive.

---
## getGlyphName
```python
from ttFont import getGlyphName
```

Returns the name for the glyph with the given ID.

If no name is available, synthesises one with the form ``glyphXXXXX``` where
```XXXXX`` is the zero-padded glyph ID.

---
## getGlyphNameMany
```python
from ttFont import getGlyphNameMany
```

Converts a list of glyph IDs into a list of glyph names.

---
## getGlyphID
```python
from ttFont import getGlyphID
```

Returns the ID of the glyph with the given name.

---
## getGlyphIDMany
```python
from ttFont import getGlyphIDMany
```

Converts a list of glyph names into a list of glyph IDs.

---
## getReverseGlyphMap
```python
from ttFont import getReverseGlyphMap
```

Returns a mapping of glyph names to glyph IDs.

---
## _buildReverseGlyphOrderDict
```python
from ttFont import _buildReverseGlyphOrderDict
```



---
## _writeTable
```python
from ttFont import _writeTable
```

Internal helper function for self.save(). Keeps track of
inter-table dependencies.

---
## getTableData
```python
from ttFont import getTableData
```

Returns the binary representation of a table.

If the table is currently loaded and in memory, the data is compiled to
binary and returned; if it is not currently loaded, the binary data is
read from the font file and returned.

---
## getGlyphSet
```python
from ttFont import getGlyphSet
```

Return a generic GlyphSet, which is a dict-like object
mapping glyph names to glyph objects. The returned glyph objects
have a ``.draw()`` method that supports the Pen protocol, and will
have an attribute named 'width'.

If the font is CFF-based, the outlines will be taken from the ``CFF ``
or ``CFF2`` tables. Otherwise the outlines will be taken from the
``glyf`` table.

If the font contains both a ``CFF ``/``CFF2`` and a ``glyf`` table, you
can use the ``preferCFF`` argument to specify which one should be taken.
If the font contains both a ``CFF `` and a ``CFF2`` table, the latter is
taken.

If the ``location`` parameter is set, it should be a dictionary mapping
four-letter variation tags to their float values, and the returned
glyph-set will represent an instance of a variable font at that
location.

If the ``normalized`` variable is set to True, that location is
interpreted as in the normalized (-1..+1) space, otherwise it is in the
font's defined axes space.

---
## normalizeLocation
```python
from ttFont import normalizeLocation
```

Normalize a ``location`` from the font's defined axes space (also
known as user space) into the normalized (-1..+1) space. It applies
``avar`` mapping if the font contains an ``avar`` table.

The ``location`` parameter should be a dictionary mapping four-letter
variation tags to their float values.

Raises ``TTLibError`` if the font is not a variable font.

---
## getBestCmap
```python
from ttFont import getBestCmap
```

Returns the 'best' Unicode cmap dictionary available in the font
or ``None``, if no Unicode cmap subtable is available.

By default it will search for the following (platformID, platEncID)
pairs in order::

                (3, 10), # Windows Unicode full repertoire
                (0, 6),  # Unicode full repertoire (format 13 subtable)
                (0, 4),  # Unicode 2.0 full repertoire
                (3, 1),  # Windows Unicode BMP
                (0, 3),  # Unicode 2.0 BMP
                (0, 2),  # Unicode ISO/IEC 10646
                (0, 1),  # Unicode 1.1
                (0, 0)   # Unicode 1.0

This particular order matches what HarfBuzz uses to choose what
subtable to use by default. This order prefers the largest-repertoire
subtable, and among those, prefers the Windows-platform over the
Unicode-platform as the former has wider support.

This order can be customized via the ``cmapPreferences`` argument.

---
## reorderGlyphs
```python
from ttFont import reorderGlyphs
```



---
## toXML
```python
from ttFont import toXML
```



---
## fromXML
```python
from ttFont import fromXML
```



---
## __name__
```python
from ttVisitor import __name__
```

Specialization of fontTools.misc.visitor to work with TTFont.

---
## TTVisitor
```python
from ttVisitor import TTVisitor
```



---
## visit
```python
from ttVisitor import visit
```



---
## visitAttr
```python
from ttVisitor import visitAttr
```



---
## __name__
```python
from woff2 import __name__
```



---
## WOFF2Reader
```python
from woff2 import WOFF2Reader
```



---
## WOFF2Writer
```python
from woff2 import WOFF2Writer
```



---
## getKnownTagIndex
```python
from woff2 import getKnownTagIndex
```

Return index of 'tag' in woff2KnownTags list. Return 63 if not found.

---
## WOFF2DirectoryEntry
```python
from woff2 import WOFF2DirectoryEntry
```



---
## WOFF2LocaTable
```python
from woff2 import WOFF2LocaTable
```

Same as parent class. The only difference is that it attempts to preserve
the 'indexFormat' as encoded in the WOFF2 glyf table.

---
## WOFF2GlyfTable
```python
from woff2 import WOFF2GlyfTable
```

Decoder/Encoder for WOFF2 'glyf' table transform.

---
## WOFF2HmtxTable
```python
from woff2 import WOFF2HmtxTable
```



---
## WOFF2FlavorData
```python
from woff2 import WOFF2FlavorData
```



---
## unpackBase128
```python
from woff2 import unpackBase128
```

Read one to five bytes from UIntBase128-encoded input string, and return
a tuple containing the decoded integer plus any leftover data.

>>> unpackBase128(b'\x3f\x00\x00') == (63, b"\x00\x00")
True
>>> unpackBase128(b'\x8f\xff\xff\xff\x7f')[0] == 4294967295
True
>>> unpackBase128(b'\x80\x80\x3f')  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TTLibError: UIntBase128 value must not start with leading zeros
>>> unpackBase128(b'\x8f\xff\xff\xff\xff\x7f')[0]  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TTLibError: UIntBase128-encoded sequence is longer than 5 bytes
>>> unpackBase128(b'\x90\x80\x80\x80\x00')[0]  # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TTLibError: UIntBase128 value exceeds 2**32-1

---
## base128Size
```python
from woff2 import base128Size
```

Return the length in bytes of a UIntBase128-encoded sequence with value n.

>>> base128Size(0)
1
>>> base128Size(24567)
3
>>> base128Size(2**32-1)
5

---
## packBase128
```python
from woff2 import packBase128
```

Encode unsigned integer in range 0 to 2**32-1 (inclusive) to a string of
bytes using UIntBase128 variable-length encoding. Produce the shortest possible
encoding.

>>> packBase128(63) == b"\x3f"
True
>>> packBase128(2**32-1) == b'\x8f\xff\xff\xff\x7f'
True

---
## unpack255UShort
```python
from woff2 import unpack255UShort
```

Read one to three bytes from 255UInt16-encoded input string, and return a
tuple containing the decoded integer plus any leftover data.

>>> unpack255UShort(bytechr(252))[0]
252

Note that some numbers (e.g. 506) can have multiple encodings:
>>> unpack255UShort(struct.pack("BB", 254, 0))[0]
506
>>> unpack255UShort(struct.pack("BB", 255, 253))[0]
506
>>> unpack255UShort(struct.pack("BBB", 253, 1, 250))[0]
506

---
## pack255UShort
```python
from woff2 import pack255UShort
```

Encode unsigned integer in range 0 to 65535 (inclusive) to a bytestring
using 255UInt16 variable-length encoding.

>>> pack255UShort(252) == b'\xfc'
True
>>> pack255UShort(506) == b'\xfe\x00'
True
>>> pack255UShort(762) == b'\xfd\x02\xfa'
True

---
## compress
```python
from woff2 import compress
```

Compress OpenType font to WOFF2.

Args:
        input_file: a file path, file or file-like object (open in binary mode)
                containing an OpenType font (either CFF- or TrueType-flavored).
        output_file: a file path, file or file-like object where to save the
                compressed WOFF2 font.
        transform_tables: Optional[Iterable[str]]: a set of table tags for which
                to enable preprocessing transformations. By default, only 'glyf'
                and 'loca' tables are transformed. An empty set means disable all
                transformations.

---
## decompress
```python
from woff2 import decompress
```

Decompress WOFF2 font to OpenType font.

Args:
        input_file: a file path, file or file-like object (open in binary mode)
                containing a compressed WOFF2 font.
        output_file: a file path, file or file-like object where to save the
                decompressed OpenType font.

---
## main
```python
from woff2 import main
```

Compress and decompress WOFF2 fonts

---
## __init__
```python
from woff2 import __init__
```

Data class that holds the WOFF2 header major/minor version, any
metadata or private data (as bytes strings), and the set of
table tags that have transformations applied (if reader is not None),
or will have once the WOFF2 font is compiled.

Args:
        reader: an SFNTReader (or subclass) object to read flavor data from.
        data: another WOFFFlavorData object to initialise data from.
        transformedTables: set of strings containing table tags to be transformed.

Raises:
        ImportError if the brotli module is not installed.

NOTE: The 'reader' argument, on the one hand, and the 'data' and
'transformedTables' arguments, on the other hand, are mutually exclusive.

---
## __getitem__
```python
from woff2 import __getitem__
```

Fetch the raw table data. Reconstruct transformed tables.

---
## reconstructTable
```python
from woff2 import reconstructTable
```

Reconstruct table named 'tag' from transformed data.

---
## _reconstructGlyf
```python
from woff2 import _reconstructGlyf
```

Return recostructed glyf table data, and set the corresponding loca's
locations. Optionally pad glyph offsets to the specified number of bytes.

---
## _reconstructLoca
```python
from woff2 import _reconstructLoca
```

Return reconstructed loca table data.

---
## _reconstructHmtx
```python
from woff2 import _reconstructHmtx
```

Return reconstructed hmtx table data.

---
## _decompileTable
```python
from woff2 import _decompileTable
```

Fetch table data, decompile it, and store it inside self.ttFont.

---
## __setitem__
```python
from woff2 import __setitem__
```

Associate new entry named 'tag' with raw table data.

---
## close
```python
from woff2 import close
```

All tags must have been specified. Now write the table data and directory.

---
## _normaliseGlyfAndLoca
```python
from woff2 import _normaliseGlyfAndLoca
```

Recompile glyf and loca tables, aligning glyph offsets to multiples of
'padding' size. Update the head table's 'indexToLocFormat' accordingly while
compiling loca.

---
## _setHeadTransformFlag
```python
from woff2 import _setHeadTransformFlag
```

Set bit 11 of 'head' table flags to indicate that the font has undergone
a lossless modifying transform. Re-compile head table data.

---
## _compileTable
```python
from woff2 import _compileTable
```

Compile table and store it in its 'data' attribute.

---
## _calcSFNTChecksumsLengthsAndOffsets
```python
from woff2 import _calcSFNTChecksumsLengthsAndOffsets
```

Compute the 'original' SFNT checksums, lengths and offsets for checksum
adjustment calculation. Return the total size of the uncompressed font.

---
## _transformTables
```python
from woff2 import _transformTables
```

Return transformed font data.

---
## transformTable
```python
from woff2 import transformTable
```

Return transformed table data, or None if some pre-conditions aren't
met -- in which case, the non-transformed table data will be used.

---
## _calcMasterChecksum
```python
from woff2 import _calcMasterChecksum
```

Calculate checkSumAdjustment.

---
## writeMasterChecksum
```python
from woff2 import writeMasterChecksum
```

Write checkSumAdjustment to the transformBuffer.

---
## _calcTotalSize
```python
from woff2 import _calcTotalSize
```

Calculate total size of WOFF2 font, including any meta- and/or private data.

---
## _calcFlavorDataOffsetsAndSize
```python
from woff2 import _calcFlavorDataOffsetsAndSize
```

Calculate offsets and lengths for any meta- and/or private data.

---
## _getVersion
```python
from woff2 import _getVersion
```

Return the WOFF2 font's (majorVersion, minorVersion) tuple.

---
## _packTableDirectory
```python
from woff2 import _packTableDirectory
```

Return WOFF2 table directory data.

---
## _writeFlavorData
```python
from woff2 import _writeFlavorData
```

Write metadata and/or private data using appropiate padding.

---
## reordersTables
```python
from woff2 import reordersTables
```



---
## fromFile
```python
from woff2 import fromFile
```



---
## fromString
```python
from woff2 import fromString
```



---
## toString
```python
from woff2 import toString
```



---
## transformVersion
```python
from woff2 import transformVersion
```



---
## transformed
```python
from woff2 import transformed
```



---
## compile
```python
from woff2 import compile
```



---
## reconstruct
```python
from woff2 import reconstruct
```



---
## transform
```python
from woff2 import transform
```



---
## _decodeGlyph
```python
from woff2 import _decodeGlyph
```



---
## _decodeComponents
```python
from woff2 import _decodeComponents
```



---
## _decodeCoordinates
```python
from woff2 import _decodeCoordinates
```



---
## _decodeOverlapSimpleFlag
```python
from woff2 import _decodeOverlapSimpleFlag
```



---
## _decodeInstructions
```python
from woff2 import _decodeInstructions
```



---
## _decodeBBox
```python
from woff2 import _decodeBBox
```



---
## _decodeTriplets
```python
from woff2 import _decodeTriplets
```



---
## _encodeGlyph
```python
from woff2 import _encodeGlyph
```



---
## _encodeComponents
```python
from woff2 import _encodeComponents
```



---
## _encodeCoordinates
```python
from woff2 import _encodeCoordinates
```



---
## _encodeOverlapSimpleFlag
```python
from woff2 import _encodeOverlapSimpleFlag
```



---
## _encodeInstructions
```python
from woff2 import _encodeInstructions
```



---
## _encodeBBox
```python
from woff2 import _encodeBBox
```



---
## _encodeTriplets
```python
from woff2 import _encodeTriplets
```



---
## _decompress
```python
from woff2 import _decompress
```



---
## _HelpAction
```python
from woff2 import _HelpAction
```



---
## _NoGlyfTransformAction
```python
from woff2 import _NoGlyfTransformAction
```



---
## _HmtxTransformAction
```python
from woff2 import _HmtxTransformAction
```



---
## withSign
```python
from woff2 import withSign
```



---
## __call__
```python
from woff2 import __call__
```



---
## _uniq_sort
```python
from transforms import _uniq_sort
```



---
## StopHintCountEvent
```python
from transforms import StopHintCountEvent
```



---
## _DesubroutinizingT2Decompiler
```python
from transforms import _DesubroutinizingT2Decompiler
```



---
## desubroutinize
```python
from transforms import desubroutinize
```



---
## _MarkingT2Decompiler
```python
from transforms import _MarkingT2Decompiler
```



---
## _DehintingT2Decompiler
```python
from transforms import _DehintingT2Decompiler
```



---
## _cs_subset_subroutines
```python
from transforms import _cs_subset_subroutines
```



---
## _cs_drop_hints
```python
from transforms import _cs_drop_hints
```



---
## remove_hints
```python
from transforms import remove_hints
```



---
## _pd_delete_empty_subrs
```python
from transforms import _pd_delete_empty_subrs
```



---
## remove_unused_subroutines
```python
from transforms import remove_unused_subroutines
```



---
## execute
```python
from transforms import execute
```



---
## op_callsubr
```python
from transforms import op_callsubr
```



---
## op_callgsubr
```python
from transforms import op_callgsubr
```



---
## stop_hint_count
```python
from transforms import stop_hint_count
```



---
## op_hintmask
```python
from transforms import op_hintmask
```



---
## processSubr
```python
from transforms import processSubr
```



---
## Hints
```python
from transforms import Hints
```



---
## op_hstem
```python
from transforms import op_hstem
```



---
## op_vstem
```python
from transforms import op_vstem
```



---
## op_hstemhm
```python
from transforms import op_hstemhm
```



---
## op_vstemhm
```python
from transforms import op_vstemhm
```



---
## op_cntrmask
```python
from transforms import op_cntrmask
```



---
## processHintmask
```python
from transforms import processHintmask
```



---
## processHint
```python
from transforms import processHint
```



---
## CFFFontSet
```python
from __init__ import CFFFontSet
```

A CFF font "file" can contain more than one font, although this is
extremely rare (and not allowed within OpenType fonts).

This class is the entry point for parsing a CFF table. To actually
manipulate the data inside the CFF font, you will want to access the
``CFFFontSet``'s :class:`TopDict` object. To do this, a ``CFFFontSet``
object can either be treated as a dictionary (with appropriate
``keys()`` and ``values()`` methods) mapping font names to :class:`TopDict`
objects, or as a list.

.. code:: python

        from fontTools import ttLib
        tt = ttLib.TTFont("Tests/cffLib/data/LinLibertine_RBI.otf")
        tt["CFF "].cff
        # <fontTools.cffLib.CFFFontSet object at 0x101e24c90>
        tt["CFF "].cff[0] # Here's your actual font data
        # <fontTools.cffLib.TopDict object at 0x1020f1fd0>

---
## CFFWriter
```python
from __init__ import CFFWriter
```

Helper class for serializing CFF data to binary. Used by
:meth:`CFFFontSet.compile`.

---
## calcOffSize
```python
from __init__ import calcOffSize
```



---
## IndexCompiler
```python
from __init__ import IndexCompiler
```

Base class for writing CFF `INDEX data <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#5-index-data>`_
to binary.

---
## IndexedStringsCompiler
```python
from __init__ import IndexedStringsCompiler
```



---
## TopDictIndexCompiler
```python
from __init__ import TopDictIndexCompiler
```

Helper class for writing the TopDict to binary.

---
## FDArrayIndexCompiler
```python
from __init__ import FDArrayIndexCompiler
```

Helper class for writing the
`Font DICT INDEX <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#10-font-dict-index-font-dicts-and-fdselect>`_
to binary.

---
## GlobalSubrsCompiler
```python
from __init__ import GlobalSubrsCompiler
```

Helper class for writing the `global subroutine INDEX <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#9-local-and-global-subr-indexes>`_
to binary.

---
## SubrsCompiler
```python
from __init__ import SubrsCompiler
```

Helper class for writing the `local subroutine INDEX <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#9-local-and-global-subr-indexes>`_
to binary.

---
## CharStringsCompiler
```python
from __init__ import CharStringsCompiler
```

Helper class for writing the `CharStrings INDEX <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#9-local-and-global-subr-indexes>`_
to binary.

---
## Index
```python
from __init__ import Index
```

An Index is the description for a domain-specific index.  To add an index to
a domain, subclass Index, overriding the three name attributes:

* `name` is an identifier used for generating file names.
  It is also used for a hyperlink target for the index. Therefore, users can
  refer the index page using ``ref`` role and a string which is combined
  domain name and ``name`` attribute (ex. ``:ref:`py-modindex```).
* `localname` is the section title for the index.
* `shortname` is a short name for the index, for use in the relation bar in
  HTML output.  Can be empty to disable entries in the relation bar.

and providing a :meth:`generate()` method.  Then, add the index class to
your domain's `indices` list.  Extensions can add indices to existing
domains using :meth:`~sphinx.application.Sphinx.add_index_to_domain()`.

.. versionchanged:: 3.0

   Index pages can be referred by domain name and index name via
   :rst:role:`ref` role.

---
## GlobalSubrsIndex
```python
from __init__ import GlobalSubrsIndex
```

This index contains all the global subroutines in the font. A global
subroutine is a set of ``CharString`` data which is accessible to any
glyph in the font, and are used to store repeated instructions - for
example, components may be encoded as global subroutines, but so could
hinting instructions.

Remember that when interpreting a ``callgsubr`` instruction (or indeed
a ``callsubr`` instruction) that you will need to add the "subroutine
number bias" to number given:

.. code:: python

        tt = ttLib.TTFont("Almendra-Bold.otf")
        u = tt["CFF "].cff[0].CharStrings["udieresis"]
        u.decompile()

        u.toXML(XMLWriter(sys.stdout))
        # <some stuff>
        # -64 callgsubr <-- Subroutine which implements the dieresis mark
        # <other stuff>

        tt["CFF "].cff[0].GlobalSubrs[-64] # <-- WRONG
        # <T2CharString (bytecode) at 103451d10>

        tt["CFF "].cff[0].GlobalSubrs[-64 + 107] # <-- RIGHT
        # <T2CharString (source) at 103451390>

("The bias applied depends on the number of subrs (gsubrs). If the number of
subrs (gsubrs) is less than 1240, the bias is 107. Otherwise if it is less
than 33900, it is 1131; otherwise it is 32768.",
`Subroutine Operators <https://docs.microsoft.com/en-us/typography/opentype/otspec180/cff2charstr#section4.4>`)

---
## SubrsIndex
```python
from __init__ import SubrsIndex
```

This index contains a glyph's local subroutines. A local subroutine is a
private set of ``CharString`` data which is accessible only to the glyph to
which the index is attached.

---
## TopDictIndex
```python
from __init__ import TopDictIndex
```

This index represents the array of ``TopDict`` structures in the font
(again, usually only one entry is present). Hence the following calls are
equivalent:

.. code:: python

        tt["CFF "].cff[0]
        # <fontTools.cffLib.TopDict object at 0x102ed6e50>
        tt["CFF "].cff.topDictIndex[0]
        # <fontTools.cffLib.TopDict object at 0x102ed6e50>

---
## FDArrayIndex
```python
from __init__ import FDArrayIndex
```



---
## VarStoreData
```python
from __init__ import VarStoreData
```



---
## FDSelect
```python
from __init__ import FDSelect
```



---
## CharStrings
```python
from __init__ import CharStrings
```

The ``CharStrings`` in the font represent the instructions for drawing
each glyph. This object presents a dictionary interface to the font's
CharStrings, indexed by glyph name:

.. code:: python

        tt["CFF "].cff[0].CharStrings["a"]
        # <T2CharString (bytecode) at 103451e90>

See :class:`fontTools.misc.psCharStrings.T1CharString` and
:class:`fontTools.misc.psCharStrings.T2CharString` for how to decompile,
compile and interpret the glyph drawing instructions in the returned objects.

---
## readCard8
```python
from __init__ import readCard8
```



---
## readCard16
```python
from __init__ import readCard16
```



---
## readCard32
```python
from __init__ import readCard32
```



---
## writeCard8
```python
from __init__ import writeCard8
```



---
## writeCard16
```python
from __init__ import writeCard16
```



---
## writeCard32
```python
from __init__ import writeCard32
```



---
## packCard8
```python
from __init__ import packCard8
```



---
## packCard16
```python
from __init__ import packCard16
```



---
## packCard32
```python
from __init__ import packCard32
```



---
## buildOperatorDict
```python
from __init__ import buildOperatorDict
```



---
## buildOpcodeDict
```python
from __init__ import buildOpcodeDict
```



---
## buildOrder
```python
from __init__ import buildOrder
```



---
## buildDefaults
```python
from __init__ import buildDefaults
```



---
## buildConverters
```python
from __init__ import buildConverters
```



---
## SimpleConverter
```python
from __init__ import SimpleConverter
```



---
## ASCIIConverter
```python
from __init__ import ASCIIConverter
```



---
## Latin1Converter
```python
from __init__ import Latin1Converter
```



---
## parseNum
```python
from __init__ import parseNum
```



---
## parseBlendList
```python
from __init__ import parseBlendList
```



---
## NumberConverter
```python
from __init__ import NumberConverter
```



---
## ArrayConverter
```python
from __init__ import ArrayConverter
```



---
## TableConverter
```python
from __init__ import TableConverter
```



---
## PrivateDictConverter
```python
from __init__ import PrivateDictConverter
```



---
## SubrsConverter
```python
from __init__ import SubrsConverter
```



---
## CharStringsConverter
```python
from __init__ import CharStringsConverter
```



---
## CharsetConverter
```python
from __init__ import CharsetConverter
```



---
## CharsetCompiler
```python
from __init__ import CharsetCompiler
```



---
## getStdCharSet
```python
from __init__ import getStdCharSet
```



---
## getCIDfromName
```python
from __init__ import getCIDfromName
```



---
## getSIDfromName
```python
from __init__ import getSIDfromName
```



---
## packCharset0
```python
from __init__ import packCharset0
```



---
## packCharset
```python
from __init__ import packCharset
```



---
## parseCharset0
```python
from __init__ import parseCharset0
```



---
## parseCharset
```python
from __init__ import parseCharset
```



---
## EncodingCompiler
```python
from __init__ import EncodingCompiler
```



---
## EncodingConverter
```python
from __init__ import EncodingConverter
```



---
## parseEncoding0
```python
from __init__ import parseEncoding0
```



---
## parseEncoding1
```python
from __init__ import parseEncoding1
```



---
## packEncoding0
```python
from __init__ import packEncoding0
```



---
## packEncoding1
```python
from __init__ import packEncoding1
```



---
## FDArrayConverter
```python
from __init__ import FDArrayConverter
```



---
## FDSelectConverter
```python
from __init__ import FDSelectConverter
```



---
## VarStoreConverter
```python
from __init__ import VarStoreConverter
```



---
## packFDSelect0
```python
from __init__ import packFDSelect0
```



---
## packFDSelect3
```python
from __init__ import packFDSelect3
```



---
## packFDSelect4
```python
from __init__ import packFDSelect4
```



---
## FDSelectCompiler
```python
from __init__ import FDSelectCompiler
```



---
## VarStoreCompiler
```python
from __init__ import VarStoreCompiler
```



---
## ROSConverter
```python
from __init__ import ROSConverter
```



---
## addConverters
```python
from __init__ import addConverters
```



---
## TopDictDecompiler
```python
from __init__ import TopDictDecompiler
```



---
## PrivateDictDecompiler
```python
from __init__ import PrivateDictDecompiler
```



---
## DictCompiler
```python
from __init__ import DictCompiler
```



---
## encodeNumber
```python
from __init__ import encodeNumber
```



---
## TopDictCompiler
```python
from __init__ import TopDictCompiler
```



---
## FontDictCompiler
```python
from __init__ import FontDictCompiler
```



---
## PrivateDictCompiler
```python
from __init__ import PrivateDictCompiler
```



---
## BaseDict
```python
from __init__ import BaseDict
```



---
## TopDict
```python
from __init__ import TopDict
```

The ``TopDict`` represents the top-level dictionary holding font
information. CFF2 tables contain a restricted set of top-level entries
as described `here <https://docs.microsoft.com/en-us/typography/opentype/spec/cff2#7-top-dict-data>`_,
but CFF tables may contain a wider range of information. This information
can be accessed through attributes or through the dictionary returned
through the ``rawDict`` property:

.. code:: python

        font = tt["CFF "].cff[0]
        font.FamilyName
        # 'Linux Libertine O'
        font.rawDict["FamilyName"]
        # 'Linux Libertine O'

More information is available in the CFF file's private dictionary, accessed
via the ``Private`` property:

.. code:: python

        tt["CFF "].cff[0].Private.BlueValues
        # [-15, 0, 515, 515, 666, 666]

---
## FontDict
```python
from __init__ import FontDict
```



---
## PrivateDict
```python
from __init__ import PrivateDict
```



---
## IndexedStrings
```python
from __init__ import IndexedStrings
```

SID -> string mapping.

---
## decompile
```python
from __init__ import decompile
```



---
## values
```python
from __init__ import values
```



---
## toXML
```python
from __init__ import toXML
```



---
## fromXML
```python
from __init__ import fromXML
```



---
## convertCFFToCFF2
```python
from __init__ import convertCFFToCFF2
```



---
## convertCFF2ToCFF
```python
from __init__ import convertCFF2ToCFF
```



---
## desubroutinize
```python
from __init__ import desubroutinize
```



---
## remove_hints
```python
from __init__ import remove_hints
```



---
## remove_unused_subroutines
```python
from __init__ import remove_unused_subroutines
```



---
## toFile
```python
from __init__ import toFile
```



---
## getItems
```python
from __init__ import getItems
```



---
## getOffsets
```python
from __init__ import getOffsets
```



---
## getDataLength
```python
from __init__ import getDataLength
```



---
## getChildren
```python
from __init__ import getChildren
```



---
## setPos
```python
from __init__ import setPos
```



---
## produceItem
```python
from __init__ import produceItem
```



---
## getCompiler
```python
from __init__ import getCompiler
```



---
## clear
```python
from __init__ import clear
```

Empty the INDEX.

---
## getItemAndSelector
```python
from __init__ import getItemAndSelector
```



---
## writeXML
```python
from __init__ import writeXML
```



---
## xmlRead
```python
from __init__ import xmlRead
```



---
## getNumRegions
```python
from __init__ import getNumRegions
```



---
## has_key
```python
from __init__ import has_key
```



---
## _read
```python
from __init__ import _read
```



---
## xmlWrite
```python
from __init__ import xmlWrite
```



---
## getClass
```python
from __init__ import getClass
```



---
## arg_number
```python
from __init__ import arg_number
```



---
## arg_SID
```python
from __init__ import arg_SID
```



---
## arg_array
```python
from __init__ import arg_array
```



---
## arg_delta
```python
from __init__ import arg_delta
```



---
## arg_delta_blend
```python
from __init__ import arg_delta_blend
```

A delta list with blend lists has to be *all* blend lists.

The value is a list is arranged as follows::

        [
                [V0, d0..dn]
                [V1, d0..dn]
                ...
                [Vm, d0..dn]
        ]

``V`` is the absolute coordinate value from the default font, and ``d0-dn``
are the delta values from the *n* regions. Each ``V`` is an absolute
coordinate from the default font.

We want to return a list::

        [
                [v0, v1..vm]
                [d0..dn]
                ...
                [d0..dn]
                numBlends
                blendOp
        ]

where each ``v`` is relative to the previous default font value.

---
## postDecompile
```python
from __init__ import postDecompile
```



---
## getGlyphOrder
```python
from __init__ import getGlyphOrder
```

Returns a list of glyph names in the CFF font.

---
## decompileAllCharStrings
```python
from __init__ import decompileAllCharStrings
```



---
## recalcFontBBox
```python
from __init__ import recalcFontBBox
```



---
## setCFF2
```python
from __init__ import setCFF2
```



---
## in_cff2
```python
from __init__ import in_cff2
```



---
## getSID
```python
from __init__ import getSID
```



---
## getStrings
```python
from __init__ import getStrings
```



---
## buildStringMapping
```python
from __init__ import buildStringMapping
```



---
## __name__
```python
from CFFToCFF2 import __name__
```

CFF to CFF2 converter.

---
## _NominalWidthUsedError
```python
from CFFToCFF2 import _NominalWidthUsedError
```



---
## _convertCFFToCFF2
```python
from CFFToCFF2 import _convertCFFToCFF2
```

Converts this object from CFF format to CFF2 format. This conversion
is done 'in-place'. The conversion cannot be reversed.

This assumes a decompiled CFF table. (i.e. that the object has been
filled via :meth:`decompile` and e.g. not loaded from XML.)

---
## convertCFFToCFF2
```python
from CFFToCFF2 import convertCFFToCFF2
```



---
## main
```python
from CFFToCFF2 import main
```

Convert CFF OTF font to CFF2 OTF font

---
## __add__
```python
from CFFToCFF2 import __add__
```



---
## __radd__
```python
from CFFToCFF2 import __radd__
```



---
## __name__
```python
from width import __name__
```

T2CharString glyph width optimizer.

CFF glyphs whose width equals the CFF Private dictionary's ``defaultWidthX``
value do not need to specify their width in their charstring, saving bytes.
This module determines the optimum ``defaultWidthX`` and ``nominalWidthX``
values for a font, when provided with a list of glyph widths.

---
## missingdict
```python
from width import missingdict
```



---
## cumSum
```python
from width import cumSum
```



---
## byteCost
```python
from width import byteCost
```



---
## optimizeWidthsBruteforce
```python
from width import optimizeWidthsBruteforce
```

Bruteforce version.  Veeeeeeeeeeeeeeeeery slow.  Only works for smallests of fonts.

---
## optimizeWidths
```python
from width import optimizeWidths
```

Given a list of glyph widths, or dictionary mapping glyph width to number of
glyphs having that, returns a tuple of best CFF default and nominal glyph widths.

This algorithm is linear in UPEM+numGlyphs.

---
## main
```python
from width import main
```

Calculate optimum defaultWidthX/nominalWidthX values

---
## __init__
```python
from width import __init__
```



---
## __missing__
```python
from width import __missing__
```



---
## __name__
```python
from CFF2ToCFF import __name__
```

CFF2 to CFF converter.

---
## _convertCFF2ToCFF
```python
from CFF2ToCFF import _convertCFF2ToCFF
```

Converts this object from CFF2 format to CFF format. This conversion
is done 'in-place'. The conversion cannot be reversed.

The CFF2 font cannot be variable. (TODO Accept those and convert to the
default instance?)

This assumes a decompiled CFF table. (i.e. that the object has been
filled via :meth:`decompile` and e.g. not loaded from XML.)

---
## convertCFF2ToCFF
```python
from CFF2ToCFF import convertCFF2ToCFF
```



---
## main
```python
from CFF2ToCFF import main
```

Convert CFF OTF font to CFF2 OTF font

---
## __name__
```python
from specializer import __name__
```

T2CharString operator specializer and generalizer.

PostScript glyph drawing operations can be expressed in multiple different
ways. For example, as well as the ``lineto`` operator, there is also a
``hlineto`` operator which draws a horizontal line, removing the need to
specify a ``dx`` coordinate, and a ``vlineto`` operator which draws a
vertical line, removing the need to specify a ``dy`` coordinate. As well
as decompiling :class:`fontTools.misc.psCharStrings.T2CharString` objects
into lists of operations, this module allows for conversion between general
and specific forms of the operation.

---
## stringToProgram
```python
from specializer import stringToProgram
```



---
## programToString
```python
from specializer import programToString
```



---
## programToCommands
```python
from specializer import programToCommands
```

Takes a T2CharString program list and returns list of commands.
Each command is a two-tuple of commandname,arg-list.  The commandname might
be empty string if no commandname shall be emitted (used for glyph width,
hintmask/cntrmask argument, as well as stray arguments at the end of the
program (🤷).
'getNumRegions' may be None, or a callable object. It must return the
number of regions. 'getNumRegions' takes a single argument, vsindex. It
returns the numRegions for the vsindex.
The Charstring may or may not start with a width value. If the first
non-blend operator has an odd number of arguments, then the first argument is
a width, and is popped off. This is complicated with blend operators, as
there may be more than one before the first hint or moveto operator, and each
one reduces several arguments to just one list argument. We have to sum the
number of arguments that are not part of the blend arguments, and all the
'numBlends' values. We could instead have said that by definition, if there
is a blend operator, there is no width value, since CFF2 Charstrings don't
have width values. I discussed this with Behdad, and we are allowing for an
initial width value in this case because developers may assemble a CFF2
charstring from CFF Charstrings, which could have width values.

---
## _flattenBlendArgs
```python
from specializer import _flattenBlendArgs
```



---
## commandsToProgram
```python
from specializer import commandsToProgram
```

Takes a commands list as returned by programToCommands() and converts
it back to a T2CharString program list.

---
## _everyN
```python
from specializer import _everyN
```

Group the list el into groups of size n

---
## _GeneralizerDecombinerCommandsMap
```python
from specializer import _GeneralizerDecombinerCommandsMap
```



---
## _convertBlendOpToArgs
```python
from specializer import _convertBlendOpToArgs
```



---
## generalizeCommands
```python
from specializer import generalizeCommands
```



---
## generalizeProgram
```python
from specializer import generalizeProgram
```



---
## _categorizeVector
```python
from specializer import _categorizeVector
```

Takes X,Y vector v and returns one of r, h, v, or 0 depending on which
of X and/or Y are zero, plus tuple of nonzero ones.  If both are zero,
it returns a single zero still.

>>> _categorizeVector((0,0))
('0', (0,))
>>> _categorizeVector((1,0))
('h', (1,))
>>> _categorizeVector((0,2))
('v', (2,))
>>> _categorizeVector((1,2))
('r', (1, 2))

---
## _mergeCategories
```python
from specializer import _mergeCategories
```



---
## _negateCategory
```python
from specializer import _negateCategory
```



---
## _convertToBlendCmds
```python
from specializer import _convertToBlendCmds
```



---
## _addArgs
```python
from specializer import _addArgs
```



---
## specializeCommands
```python
from specializer import specializeCommands
```



---
## specializeProgram
```python
from specializer import specializeProgram
```



---
## rmoveto
```python
from specializer import rmoveto
```



---
## hmoveto
```python
from specializer import hmoveto
```



---
## vmoveto
```python
from specializer import vmoveto
```



---
## rlineto
```python
from specializer import rlineto
```



---
## hlineto
```python
from specializer import hlineto
```



---
## vlineto
```python
from specializer import vlineto
```



---
## rrcurveto
```python
from specializer import rrcurveto
```



---
## hhcurveto
```python
from specializer import hhcurveto
```



---
## vvcurveto
```python
from specializer import vvcurveto
```



---
## hvcurveto
```python
from specializer import hvcurveto
```



---
## vhcurveto
```python
from specializer import vhcurveto
```



---
## rcurveline
```python
from specializer import rcurveline
```



---
## rlinecurve
```python
from specializer import rlinecurve
```



---
## T1Error
```python
from __init__ import T1Error
```



---
## T1Font
```python
from __init__ import T1Font
```

Type 1 font class.

Uses a minimal interpeter that supports just about enough PS to parse
Type 1 fonts.

---
## readLWFN
```python
from __init__ import readLWFN
```

reads an LWFN font file, returns raw data

---
## readPFB
```python
from __init__ import readPFB
```

reads a PFB font file, returns raw data

---
## readOther
```python
from __init__ import readOther
```

reads any (font) file, returns raw data

---
## writeLWFN
```python
from __init__ import writeLWFN
```



---
## writePFB
```python
from __init__ import writePFB
```



---
## writeOther
```python
from __init__ import writeOther
```



---
## isHex
```python
from __init__ import isHex
```



---
## decryptType1
```python
from __init__ import decryptType1
```



---
## findEncryptedChunks
```python
from __init__ import findEncryptedChunks
```



---
## deHexString
```python
from __init__ import deHexString
```



---
## assertType1
```python
from __init__ import assertType1
```



---
## longToString
```python
from __init__ import longToString
```



---
## stringToLong
```python
from __init__ import stringToLong
```



---
## saveAs
```python
from __init__ import saveAs
```



---
## getData
```python
from __init__ import getData
```



---
## createData
```python
from __init__ import createData
```



---
## encode_eexec
```python
from __init__ import encode_eexec
```



---
## _make_lines
```python
from __init__ import _make_lines
```



---
## _tobytes
```python
from __init__ import _tobytes
```



---
## __name__
```python
from table_builder import __name__
```

colorLib.table_builder: Generic helper for filling in BaseTable derivatives from tuples and maps and such.

---
## BuildCallback
```python
from table_builder import BuildCallback
```

Keyed on (BEFORE_BUILD, class[, Format if available]).
Receives (dest, source).
Should return (dest, source), which can be new objects.

---
## _assignable
```python
from table_builder import _assignable
```



---
## _isNonStrSequence
```python
from table_builder import _isNonStrSequence
```



---
## _split_format
```python
from table_builder import _split_format
```



---
## TableBuilder
```python
from table_builder import TableBuilder
```

Helps to populate things derived from BaseTable from maps, tuples, etc.

A table of lifecycle callbacks may be provided to add logic beyond what is possible
based on otData info for the target class. See BuildCallbacks.

---
## TableUnbuilder
```python
from table_builder import TableUnbuilder
```



---
## __init__
```python
from table_builder import __init__
```



---
## _convert
```python
from table_builder import _convert
```



---
## build
```python
from table_builder import build
```



---
## unbuild
```python
from table_builder import unbuild
```



---
## _beforeBuildPaintRadialGradient
```python
from builder import _beforeBuildPaintRadialGradient
```



---
## _defaultColorStop
```python
from builder import _defaultColorStop
```



---
## _defaultVarColorStop
```python
from builder import _defaultVarColorStop
```



---
## _defaultColorLine
```python
from builder import _defaultColorLine
```



---
## _defaultVarColorLine
```python
from builder import _defaultVarColorLine
```



---
## _defaultPaintSolid
```python
from builder import _defaultPaintSolid
```



---
## _buildPaintCallbacks
```python
from builder import _buildPaintCallbacks
```



---
## populateCOLRv0
```python
from builder import populateCOLRv0
```

Build v0 color layers and add to existing COLR table.

Args:
    table: a raw ``otTables.COLR()`` object (not ttLib's ``table_C_O_L_R_``).
    colorGlyphsV0: map of base glyph names to lists of (layer glyph names,
        color palette index) tuples. Can be empty.
    glyphMap: a map from glyph names to glyph indices, as returned from
        ``TTFont.getReverseGlyphMap()``, to optionally sort base records by GID.

---
## buildCOLR
```python
from builder import buildCOLR
```

Build COLR table from color layers mapping.

Args:

    colorGlyphs: map of base glyph name to, either list of (layer glyph name,
        color palette index) tuples for COLRv0; or a single ``Paint`` (dict) or
        list of ``Paint`` for COLRv1.
    version: the version of COLR table. If None, the version is determined
        by the presence of COLRv1 paints or variation data (varStore), which
        require version 1; otherwise, if all base glyphs use only simple color
        layers, version 0 is used.
    glyphMap: a map from glyph names to glyph indices, as returned from
        TTFont.getReverseGlyphMap(), to optionally sort base records by GID.
    varStore: Optional ItemVarationStore for deltas associated with v1 layer.
    varIndexMap: Optional DeltaSetIndexMap for deltas associated with v1 layer.
    clipBoxes: Optional map of base glyph name to clip box 4- or 5-tuples:
        (xMin, yMin, xMax, yMax) or (xMin, yMin, xMax, yMax, varIndexBase).

Returns:
    A new COLR table.

---
## buildClipList
```python
from builder import buildClipList
```



---
## buildClipBox
```python
from builder import buildClipBox
```



---
## ColorPaletteType
```python
from builder import ColorPaletteType
```



---
## buildPaletteLabels
```python
from builder import buildPaletteLabels
```



---
## buildCPAL
```python
from builder import buildCPAL
```

Build CPAL table from list of color palettes.

Args:
    palettes: list of lists of colors encoded as tuples of (R, G, B, A) floats
        in the range [0..1].
    paletteTypes: optional list of ColorPaletteType, one for each palette.
    paletteLabels: optional list of palette labels. Each lable can be either:
        None (no label), a string (for for default English labels), or a
        localized string (as a dict keyed with BCP47 language codes).
    paletteEntryLabels: optional list of palette entry labels, one for each
        palette entry (see paletteLabels).
    nameTable: optional name table where to store palette and palette entry
        labels. Required if either paletteLabels or paletteEntryLabels is set.

Return:
    A new CPAL v0 or v1 table, if custom palette types or labels are specified.

---
## _is_colrv0_layer
```python
from builder import _is_colrv0_layer
```



---
## _split_color_glyphs_by_version
```python
from builder import _split_color_glyphs_by_version
```



---
## _reuse_ranges
```python
from builder import _reuse_ranges
```



---
## LayerReuseCache
```python
from builder import LayerReuseCache
```



---
## LayerListBuilder
```python
from builder import LayerListBuilder
```



---
## buildBaseGlyphPaintRecord
```python
from builder import buildBaseGlyphPaintRecord
```



---
## _format_glyph_errors
```python
from builder import _format_glyph_errors
```



---
## buildColrV1
```python
from builder import buildColrV1
```



---
## _missing_
```python
from builder import _missing_
```



---
## _paint_tuple
```python
from builder import _paint_tuple
```



---
## _as_tuple
```python
from builder import _as_tuple
```



---
## try_reuse
```python
from builder import try_reuse
```



---
## _beforeBuildPaintColrLayers
```python
from builder import _beforeBuildPaintColrLayers
```



---
## buildPaint
```python
from builder import buildPaint
```



---
## _tuple_safe
```python
from builder import _tuple_safe
```



---
## listToColrLayers
```python
from builder import listToColrLayers
```



---
## __name__
```python
from geometry import __name__
```



---
## _vector_between
```python
from geometry import _vector_between
```



---
## _round_point
```python
from geometry import _round_point
```



---
## _unit_vector
```python
from geometry import _unit_vector
```



---
## _rounding_offset
```python
from geometry import _rounding_offset
```



---
## Circle
```python
from geometry import Circle
```



---
## round_start_circle_stable_containment
```python
from geometry import round_start_circle_stable_containment
```

Round start circle so that it stays inside/outside end circle after rounding.

The rounding of circle coordinates to integers may cause an abrupt change
if the start circle c0 is so close to the end circle c1's perimiter that
it ends up falling outside (or inside) as a result of the rounding.
To keep the gradient unchanged, we nudge it in the right direction.

See:
https://github.com/googlefonts/colr-gradients-spec/issues/204
https://github.com/googlefonts/picosvg/issues/158

---
## __init__
```python
from geometry import __init__
```



---
## __repr__
```python
from geometry import __repr__
```



---
## round
```python
from geometry import round
```



---
## inside
```python
from geometry import inside
```



---
## concentric
```python
from geometry import concentric
```



---
## move
```python
from geometry import move
```



---
## ColorLibError
```python
from errors import ColorLibError
```



---
## __name__
```python
from unbuilder import __name__
```



---
## unbuildColrV1
```python
from unbuilder import unbuildColrV1
```



---
## _flatten_layers
```python
from unbuilder import _flatten_layers
```



---
## LayerListUnbuilder
```python
from unbuilder import LayerListUnbuilder
```



---
## __init__
```python
from unbuilder import __init__
```



---
## unbuildPaint
```python
from unbuilder import unbuildPaint
```



---
## _unbuildPaintColrLayers
```python
from unbuilder import _unbuildPaintColrLayers
```



---
## _date_from_string
```python
from __init__ import _date_from_string
```



---
## _date_to_string
```python
from __init__ import _date_to_string
```



---
## Data
```python
from __init__ import Data
```

Represents binary data when ``use_builtin_types=False.``

This class wraps binary data loaded from a plist file when the
``use_builtin_types`` argument to the loading function (:py:func:`fromtree`,
:py:func:`load`, :py:func:`loads`) is false.

The actual binary data is retrieved using the ``data`` attribute.

---
## _encode_base64
```python
from __init__ import _encode_base64
```



---
## PlistTarget
```python
from __init__ import PlistTarget
```

Event handler using the ElementTree Target API that can be
passed to a XMLParser to produce property list objects from XML.
It is based on the CPython plistlib module's _PlistParser class,
but does not use the expat parser.

>>> from fontTools.misc import etree
>>> parser = etree.XMLParser(target=PlistTarget())
>>> result = etree.XML(
...     "<dict>"
...     "    <key>something</key>"
...     "    <string>blah</string>"
...     "</dict>",
...     parser=parser)
>>> result == {"something": "blah"}
True

Links:
https://github.com/python/cpython/blob/main/Lib/plistlib.py
http://lxml.de/parsing.html#the-target-parser-interface

---
## start_dict
```python
from __init__ import start_dict
```



---
## end_dict
```python
from __init__ import end_dict
```



---
## end_key
```python
from __init__ import end_key
```



---
## start_array
```python
from __init__ import start_array
```



---
## end_array
```python
from __init__ import end_array
```



---
## end_true
```python
from __init__ import end_true
```



---
## end_false
```python
from __init__ import end_false
```



---
## end_integer
```python
from __init__ import end_integer
```



---
## end_real
```python
from __init__ import end_real
```



---
## end_string
```python
from __init__ import end_string
```



---
## end_data
```python
from __init__ import end_data
```



---
## end_date
```python
from __init__ import end_date
```



---
## _string_element
```python
from __init__ import _string_element
```



---
## _bool_element
```python
from __init__ import _bool_element
```



---
## _integer_element
```python
from __init__ import _integer_element
```



---
## _real_element
```python
from __init__ import _real_element
```



---
## _dict_element
```python
from __init__ import _dict_element
```



---
## _array_element
```python
from __init__ import _array_element
```



---
## _date_element
```python
from __init__ import _date_element
```



---
## _data_element
```python
from __init__ import _data_element
```



---
## _string_or_data_element
```python
from __init__ import _string_or_data_element
```



---
## _make_element
```python
from __init__ import _make_element
```



---
## totree
```python
from __init__ import totree
```

Convert a value derived from a plist into an XML tree.

Args:
    value: Any kind of value to be serialized to XML.
    sort_keys: Whether keys of dictionaries should be sorted.
    skipkeys (bool): Whether to silently skip non-string dictionary
        keys.
    use_builtin_types (bool): If true, byte strings will be
        encoded in Base-64 and wrapped in a ``data`` tag; if
        false, they will be either stored as ASCII strings or an
        exception raised if they cannot be decoded as such. Defaults
        to ``True`` if not present. Deprecated.
    pretty_print (bool): Whether to indent the output.
    indent_level (int): Level of indentation when serializing.

Returns: an ``etree`` ``Element`` object.

Raises:
    ``TypeError``
        if non-string dictionary keys are serialized
        and ``skipkeys`` is false.
    ``ValueError``
        if non-ASCII binary data is present
        and `use_builtin_types` is false.

---
## fromtree
```python
from __init__ import fromtree
```

Convert an XML tree to a plist structure.

Args:
    tree: An ``etree`` ``Element``.
    use_builtin_types: If True, binary data is deserialized to
        bytes strings. If False, it is wrapped in :py:class:`Data`
        objects. Defaults to True if not provided. Deprecated.
    dict_type: What type to use for dictionaries.

Returns: An object (usually a dictionary).

---
## loads
```python
from __init__ import loads
```



---
## dumps
```python
from __init__ import dumps
```



---
## fromBase64
```python
from __init__ import fromBase64
```



---
## asBase64
```python
from __init__ import asBase64
```



---
## end
```python
from __init__ import end
```



---
## data
```python
from __init__ import data
```

Returns the array of data objects for the Vega data set with the given *name*.

If the data set is not found, returns an empty array.

---
## add_object
```python
from __init__ import add_object
```



---
## get_data
```python
from __init__ import get_data
```



---
## __name__
```python
from shapes import __name__
```



---
## _prefer_non_zero
```python
from shapes import _prefer_non_zero
```



---
## _ntos
```python
from shapes import _ntos
```



---
## _strip_xml_ns
```python
from shapes import _strip_xml_ns
```



---
## _transform
```python
from shapes import _transform
```



---
## PathBuilder
```python
from shapes import PathBuilder
```



---
## __init__
```python
from shapes import __init__
```



---
## _start_path
```python
from shapes import _start_path
```



---
## _end_path
```python
from shapes import _end_path
```



---
## _add
```python
from shapes import _add
```



---
## _move
```python
from shapes import _move
```



---
## M
```python
from shapes import M
```



---
## m
```python
from shapes import m
```



---
## _arc
```python
from shapes import _arc
```



---
## A
```python
from shapes import A
```



---
## a
```python
from shapes import a
```



---
## _vhline
```python
from shapes import _vhline
```



---
## H
```python
from shapes import H
```



---
## h
```python
from shapes import h
```



---
## V
```python
from shapes import V
```



---
## v
```python
from shapes import v
```



---
## _line
```python
from shapes import _line
```



---
## L
```python
from shapes import L
```



---
## l
```python
from shapes import l
```



---
## _parse_line
```python
from shapes import _parse_line
```



---
## _parse_rect
```python
from shapes import _parse_rect
```



---
## _parse_path
```python
from shapes import _parse_path
```



---
## _parse_polygon
```python
from shapes import _parse_polygon
```



---
## _parse_polyline
```python
from shapes import _parse_polyline
```



---
## _parse_circle
```python
from shapes import _parse_circle
```



---
## _parse_ellipse
```python
from shapes import _parse_ellipse
```



---
## add_path_from_element
```python
from shapes import add_path_from_element
```



---
## SVGPath
```python
from __init__ import SVGPath
```

Parse SVG ``path`` elements from a file or string, and draw them
onto a glyph object that supports the FontTools Pen protocol.

For example, reading from an SVG file and drawing to a Defcon Glyph:

.. code-block::

    import defcon
    glyph = defcon.Glyph()
    pen = glyph.getPen()
    svg = SVGPath("path/to/a.svg")
    svg.draw(pen)

Or reading from a string containing SVG data, using the alternative
'fromstring' (a class method):

.. code-block::

    data = '<?xml version="1.0" ...'
    svg = SVGPath.fromstring(data)
    svg.draw(pen)

Both constructors can optionally take a 'transform' matrix (6-float
tuple, or a FontTools Transform object) to modify the draw output.

---
## draw
```python
from __init__ import draw
```



---
## _tokenize_path
```python
from parser import _tokenize_path
```



---
## _tokenize_arc_arguments
```python
from parser import _tokenize_arc_arguments
```



---
## parse_path
```python
from parser import parse_path
```

Parse SVG path definition (i.e. "d" attribute of <path> elements)
and call a 'pen' object's moveTo, lineTo, curveTo, qCurveTo and closePath
methods.

If 'current_pos' (2-float tuple) is provided, the initial moveTo will
be relative to that instead being absolute.

If the pen has an "arcTo" method, it is called with the original values
of the elliptical arc curve commands:

.. code-block::

    pen.arcTo(rx, ry, rotation, arc_large, arc_sweep, (x, y))

Otherwise, the arcs are approximated by series of cubic Bezier segments
("curveTo"), one every 90 degrees.

---
## __name__
```python
from arc import __name__
```

Convert SVG Path's elliptical arcs to Bezier curves.

The code is mostly adapted from Blink's SVGPathNormalizer::DecomposeArcToCubic
https://github.com/chromium/chromium/blob/93831f2/third_party/
blink/renderer/core/svg/svg_path_parser.cc#L169-L278

---
## _map_point
```python
from arc import _map_point
```



---
## EllipticalArc
```python
from arc import EllipticalArc
```



---
## __init__
```python
from arc import __init__
```



---
## _parametrize
```python
from arc import _parametrize
```



---
## _decompose_to_cubic_curves
```python
from arc import _decompose_to_cubic_curves
```



---
## draw
```python
from arc import draw
```



---
## __name__
```python
from solver import __name__
```



---
## _reverse_negate
```python
from solver import _reverse_negate
```



---
## _solve
```python
from solver import _solve
```



---
## rebaseTent
```python
from solver import rebaseTent
```

Given a tuple (lower,peak,upper) "tent" and new axis limits
(axisMin,axisDefault,axisMax), solves how to represent the tent
under the new axis configuration.  All values are in normalized
-1,0,+1 coordinate system. Tent values can be outside this range.

Return value is a list of tuples. Each tuple is of the form
(scalar,tent), where scalar is a multipler to multiply any
delta-sets by, and tent is a new tent for that output delta-set.
If tent value is None, that is a special deltaset that should
be always-enabled (called "gain").

---
## AxisRange
```python
from __init__ import AxisRange
```



---
## NormalizedAxisRange
```python
from __init__ import NormalizedAxisRange
```



---
## AxisTriple
```python
from __init__ import AxisTriple
```

A triple of (min, default, max) axis values.

Any of the values can be None, in which case the limitRangeAndPopulateDefaults()
method can be used to fill in the missing values based on the fvar axis values.

---
## NormalizedAxisTriple
```python
from __init__ import NormalizedAxisTriple
```

A triple of (min, default, max) normalized axis values.

---
## NormalizedAxisTripleAndDistances
```python
from __init__ import NormalizedAxisTripleAndDistances
```

A triple of (min, default, max) normalized axis values,
with distances between min and default, and default and max,
in the *pre-normalized* space.

---
## _BaseAxisLimits
```python
from __init__ import _BaseAxisLimits
```



---
## AxisLimits
```python
from __init__ import AxisLimits
```

Maps axis tags (str) to AxisTriple values.

---
## NormalizedAxisLimits
```python
from __init__ import NormalizedAxisLimits
```

Maps axis tags (str) to NormalizedAxisTriple values.

---
## OverlapMode
```python
from __init__ import OverlapMode
```



---
## instantiateVARC
```python
from __init__ import instantiateVARC
```



---
## instantiateTupleVariationStore
```python
from __init__ import instantiateTupleVariationStore
```

Instantiate TupleVariation list at the given location, or limit axes' min/max.

The 'variations' list of TupleVariation objects is modified in-place.
The 'axisLimits' (dict) maps axis tags (str) to NormalizedAxisTriple namedtuples
specifying (minimum, default, maximum) in the -1,0,+1 normalized space. Pinned axes
have minimum == default == maximum.

A 'full' instance (i.e. static font) is produced when all the axes are pinned to
single coordinates; a 'partial' instance (i.e. a less variable font) is produced
when some of the axes are omitted, or restricted with a new range.

Tuples that do not participate are kept as they are. Those that have 0 influence
at the given location are removed from the variation store.
Those that are fully instantiated (i.e. all their axes are being pinned) are also
removed from the variation store, their scaled deltas accummulated and returned, so
that they can be added by the caller to the default instance's coordinates.
Tuples that are only partially instantiated (i.e. not all the axes that they
participate in are being pinned) are kept in the store, and their deltas multiplied
by the scalar support of the axes to be pinned at the desired location.

Args:
    variations: List[TupleVariation] from either 'gvar' or 'cvar'.
    axisLimits: NormalizedAxisLimits: map from axis tags to (min, default, max)
        normalized coordinates for the full or partial instance.
    origCoords: GlyphCoordinates: default instance's coordinates for computing 'gvar'
        inferred points (cf. table__g_l_y_f._getCoordinatesAndControls).
    endPts: List[int]: indices of contour end points, for inferring 'gvar' deltas.

Returns:
    List[float]: the overall delta adjustment after applicable deltas were summed.

---
## changeTupleVariationsAxisLimits
```python
from __init__ import changeTupleVariationsAxisLimits
```



---
## changeTupleVariationAxisLimit
```python
from __init__ import changeTupleVariationAxisLimit
```



---
## instantiateCFF2
```python
from __init__ import instantiateCFF2
```



---
## _instantiateGvarGlyph
```python
from __init__ import _instantiateGvarGlyph
```



---
## instantiateGvarGlyph
```python
from __init__ import instantiateGvarGlyph
```

Remove?
https://github.com/fonttools/fonttools/pull/2266

---
## instantiateGvar
```python
from __init__ import instantiateGvar
```



---
## setCvarDeltas
```python
from __init__ import setCvarDeltas
```



---
## instantiateCvar
```python
from __init__ import instantiateCvar
```



---
## setMvarDeltas
```python
from __init__ import setMvarDeltas
```



---
## verticalMetricsKeptInSync
```python
from __init__ import verticalMetricsKeptInSync
```

Ensure hhea vertical metrics stay in sync with OS/2 ones after instancing.

When applying MVAR deltas to the OS/2 table, if the ascender, descender and
line gap change but they were the same as the respective hhea metrics in the
original font, this context manager ensures that hhea metrcs also get updated
accordingly.
The MVAR spec only has tags for the OS/2 metrics, but it is common in fonts
to have the hhea metrics be equal to those for compat reasons.

https://learn.microsoft.com/en-us/typography/opentype/spec/mvar
https://googlefonts.github.io/gf-guide/metrics.html#7-hhea-and-typo-metrics-should-be-equal
https://github.com/fonttools/fonttools/issues/3297

---
## instantiateMVAR
```python
from __init__ import instantiateMVAR
```



---
## _remapVarIdxMap
```python
from __init__ import _remapVarIdxMap
```



---
## _instantiateVHVAR
```python
from __init__ import _instantiateVHVAR
```



---
## instantiateHVAR
```python
from __init__ import instantiateHVAR
```



---
## instantiateVVAR
```python
from __init__ import instantiateVVAR
```



---
## _TupleVarStoreAdapter
```python
from __init__ import _TupleVarStoreAdapter
```



---
## instantiateItemVariationStore
```python
from __init__ import instantiateItemVariationStore
```

Compute deltas at partial location, and update varStore in-place.

Remove regions in which all axes were instanced, or fall outside the new axis
limits. Scale the deltas of the remaining regions where only some of the axes
were instanced.

The number of VarData subtables, and the number of items within each, are
not modified, in order to keep the existing VariationIndex valid.
One may call VarStore.optimize() method after this to further optimize those.

Args:
    varStore: An otTables.VarStore object (Item Variation Store)
    fvarAxes: list of fvar's Axis objects
    axisLimits: NormalizedAxisLimits: mapping axis tags to normalized
        min/default/max axis coordinates. May not specify coordinates/ranges for
        all the fvar axes.

Returns:
    defaultDeltas: to be added to the default instance, of type dict of floats
        keyed by VariationIndex compound values: i.e. (outer << 16) + inner.

---
## instantiateOTL
```python
from __init__ import instantiateOTL
```



---
## _isValidAvarSegmentMap
```python
from __init__ import _isValidAvarSegmentMap
```



---
## instantiateAvar
```python
from __init__ import instantiateAvar
```



---
## isInstanceWithinAxisRanges
```python
from __init__ import isInstanceWithinAxisRanges
```



---
## instantiateFvar
```python
from __init__ import instantiateFvar
```



---
## instantiateSTAT
```python
from __init__ import instantiateSTAT
```



---
## axisValuesFromAxisLimits
```python
from __init__ import axisValuesFromAxisLimits
```



---
## setMacOverlapFlags
```python
from __init__ import setMacOverlapFlags
```



---
## sanityCheckVariableTables
```python
from __init__ import sanityCheckVariableTables
```



---
## instantiateVariableFont
```python
from __init__ import instantiateVariableFont
```

Instantiate variable font, either fully or partially.

Depending on whether the `axisLimits` dictionary references all or some of the
input varfont's axes, the output font will either be a full instance (static
font) or a variable font with possibly less variation data.

Args:
    varfont: a TTFont instance, which must contain at least an 'fvar' table.
    axisLimits: a dict keyed by axis tags (str) containing the coordinates (float)
        along one or more axes where the desired instance will be located.
        If the value is `None`, the default coordinate as per 'fvar' table for
        that axis is used.
        The limit values can also be (min, max) tuples for restricting an
        axis's variation range. The default axis value must be included in
        the new range.
    inplace (bool): whether to modify input TTFont object in-place instead of
        returning a distinct object.
    optimize (bool): if False, do not perform IUP-delta optimization on the
        remaining 'gvar' table's deltas. Possibly faster, and might work around
        rendering issues in some buggy environments, at the cost of a slightly
        larger file size.
    overlap (OverlapMode): variable fonts usually contain overlapping contours, and
        some font rendering engines on Apple platforms require that the
        `OVERLAP_SIMPLE` and `OVERLAP_COMPOUND` flags in the 'glyf' table be set to
        force rendering using a non-zero fill rule. Thus we always set these flags
        on all glyphs to maximise cross-compatibility of the generated instance.
        You can disable this by passing OverlapMode.KEEP_AND_DONT_SET_FLAGS.
        If you want to remove the overlaps altogether and merge overlapping
        contours and components, you can pass OverlapMode.REMOVE (or
        REMOVE_AND_IGNORE_ERRORS to not hard-fail on tricky glyphs). Note that this
        requires the skia-pathops package (available to pip install).
        The overlap parameter only has effect when generating full static instances.
    updateFontNames (bool): if True, update the instantiated font's name table using
        the Axis Value Tables from the STAT table. The name table and the style bits
        in the head and OS/2 table will be updated so they conform to the R/I/B/BI
        model. If the STAT table is missing or an Axis Value table is missing for
        a given axis coordinate, a ValueError will be raised.
    downgradeCFF2 (bool): if True, downgrade the CFF2 table to CFF table when possible
        ie. full instancing of all axes. This is useful for compatibility with older
        software that does not support CFF2. Defaults to False. Note that this
        operation also removes overlaps within glyph shapes, as CFF does not support
        overlaps but CFF2 does.

---
## setRibbiBits
```python
from __init__ import setRibbiBits
```

Set the `head.macStyle` and `OS/2.fsSelection` style bits
appropriately.

---
## parseLimits
```python
from __init__ import parseLimits
```



---
## parseArgs
```python
from __init__ import parseArgs
```

Parse argv.

Returns:
    3-tuple (infile, axisLimits, options)
    axisLimits is either a Dict[str, Optional[float]], for pinning variation axes
    to specific coordinates along those axes (with `None` as a placeholder for an
    axis' default value); or a Dict[str, Tuple(float, float)], meaning limit this
    axis to min/max range.
    Axes locations are in user-space coordinates, as defined in the "fvar" table.

---
## __post_init__
```python
from __init__ import __post_init__
```



---
## _replace
```python
from __init__ import _replace
```



---
## expand
```python
from __init__ import expand
```

Convert a single value or a tuple into an AxisTriple.

If the input is a single value, it is interpreted as a pin at that value.
If the input is a tuple, it is interpreted as (min, max) or (min, default, max).

---
## limitRangeAndPopulateDefaults
```python
from __init__ import limitRangeAndPopulateDefaults
```

Return a new AxisTriple with the default value filled in.

Set default to fvar axis default if the latter is within the min/max range,
otherwise set default to the min or max value, whichever is closer to the
fvar axis default.
If the default value is already set, return self.

---
## reverse_negate
```python
from __init__ import reverse_negate
```



---
## renormalizeValue
```python
from __init__ import renormalizeValue
```

Renormalizes a normalized value v to the range of this axis,
considering the pre-normalized distances as well as the new
axis limits.

---
## defaultLocation
```python
from __init__ import defaultLocation
```

Return a dict of default axis values.

---
## pinnedLocation
```python
from __init__ import pinnedLocation
```

Return a location dict with only the pinned axes.

---
## limitAxesAndPopulateDefaults
```python
from __init__ import limitAxesAndPopulateDefaults
```

Return a new AxisLimits with defaults filled in from fvar table.

If all axis limits already have defaults, return self.

---
## storeBlendsToVarStore
```python
from __init__ import storeBlendsToVarStore
```



---
## fetchBlendsFromVarStore
```python
from __init__ import fetchBlendsFromVarStore
```



---
## fromItemVarStore
```python
from __init__ import fromItemVarStore
```



---
## rebuildRegions
```python
from __init__ import rebuildRegions
```



---
## instantiate
```python
from __init__ import instantiate
```



---
## asItemVarStore
```python
from __init__ import asItemVarStore
```



---
## isAxisValueOutsideLimits
```python
from __init__ import isAxisValueOutsideLimits
```



---
## __name__
```python
from names import __name__
```

Helpers for instantiating name table records.

---
## NameID
```python
from names import NameID
```



---
## getVariationNameIDs
```python
from names import getVariationNameIDs
```



---
## pruningUnusedNames
```python
from names import pruningUnusedNames
```



---
## updateNameTable
```python
from names import updateNameTable
```

Update instatiated variable font's name table using STAT AxisValues.

Raises ValueError if the STAT table is missing or an Axis Value table is
missing for requested axis locations.

First, collect all STAT AxisValues that match the new default axis locations
(excluding "elided" ones); concatenate the strings in design axis order,
while giving priority to "synthetic" values (Format 4), to form the
typographic subfamily name associated with the new default instance.
Finally, update all related records in the name table, making sure that
legacy family/sub-family names conform to the the R/I/B/BI (Regular, Italic,
Bold, Bold Italic) naming model.

Example: Updating a partial variable font:
| >>> ttFont = TTFont("OpenSans[wdth,wght].ttf")
| >>> updateNameTable(ttFont, {"wght": (400, 900), "wdth": 75})

The name table records will be updated in the following manner:
NameID 1 familyName: "Open Sans" --> "Open Sans Condensed"
NameID 2 subFamilyName: "Regular" --> "Regular"
NameID 3 Unique font identifier: "3.000;GOOG;OpenSans-Regular" -->         "3.000;GOOG;OpenSans-Condensed"
NameID 4 Full font name: "Open Sans Regular" --> "Open Sans Condensed"
NameID 6 PostScript name: "OpenSans-Regular" --> "OpenSans-Condensed"
NameID 16 Typographic Family name: None --> "Open Sans"
NameID 17 Typographic Subfamily name: None --> "Condensed"

References:
https://docs.microsoft.com/en-us/typography/opentype/spec/stat
https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids

---
## checkAxisValuesExist
```python
from names import checkAxisValuesExist
```



---
## _sortAxisValues
```python
from names import _sortAxisValues
```



---
## _updateNameRecords
```python
from names import _updateNameRecords
```



---
## _isRibbi
```python
from names import _isRibbi
```



---
## _updateNameTableStyleRecords
```python
from names import _updateNameTableStyleRecords
```



---
## _updatePSNameRecord
```python
from names import _updatePSNameRecord
```



---
## _updateUniqueIdNameRecord
```python
from names import _updateUniqueIdNameRecord
```



---
## _fontVersion
```python
from names import _fontVersion
```



---
## _featureVariationRecordIsUnique
```python
from featureVars import _featureVariationRecordIsUnique
```



---
## _limitFeatureVariationConditionRange
```python
from featureVars import _limitFeatureVariationConditionRange
```



---
## _instantiateFeatureVariationRecord
```python
from featureVars import _instantiateFeatureVariationRecord
```



---
## _instantiateFeatureVariations
```python
from featureVars import _instantiateFeatureVariations
```



---
## instantiateFeatureVariations
```python
from featureVars import instantiateFeatureVariations
```



---
## __name__
```python
from gpos import __name__
```



---
## _compression_level_from_env
```python
from gpos import _compression_level_from_env
```



---
## compact
```python
from gpos import compact
```



---
## compact_lookup
```python
from gpos import compact_lookup
```



---
## compact_ext_lookup
```python
from gpos import compact_ext_lookup
```



---
## compact_pair_pos
```python
from gpos import compact_pair_pos
```



---
## compact_class_pairs
```python
from gpos import compact_class_pairs
```



---
## is_really_zero
```python
from gpos import is_really_zero
```



---
## _getClassRanges
```python
from gpos import _getClassRanges
```



---
## _classDef_bytes
```python
from gpos import _classDef_bytes
```



---
## Cluster
```python
from gpos import Cluster
```



---
## cluster_pairs_by_class2_coverage_custom_cost
```python
from gpos import cluster_pairs_by_class2_coverage_custom_cost
```



---
## __init__
```python
from gpos import __init__
```



---
## indices
```python
from gpos import indices
```



---
## column_indices
```python
from gpos import column_indices
```



---
## width
```python
from gpos import width
```



---
## cost
```python
from gpos import cost
```



---
## coverage_bytes
```python
from gpos import coverage_bytes
```



---
## classDef1_bytes
```python
from gpos import classDef1_bytes
```



---
## classDef2_bytes
```python
from gpos import classDef2_bytes
```



---
## make_cluster
```python
from gpos import make_cluster
```



---
## merge
```python
from gpos import merge
```



---
## __name__
```python
from _s_b_i_x import __name__
```



---
## table__s_b_i_x
```python
from _s_b_i_x import table__s_b_i_x
```



---
## sbixStrikeOffset
```python
from _s_b_i_x import sbixStrikeOffset
```



---
## __init__
```python
from _s_b_i_x import __init__
```



---
## decompile
```python
from _s_b_i_x import decompile
```



---
## compile
```python
from _s_b_i_x import compile
```



---
## toXML
```python
from _s_b_i_x import toXML
```



---
## fromXML
```python
from _s_b_i_x import fromXML
```



---
## __name__
```python
from G_M_A_P_ import __name__
```



---
## GMAPRecord
```python
from G_M_A_P_ import GMAPRecord
```



---
## table_G_M_A_P_
```python
from G_M_A_P_ import table_G_M_A_P_
```



---
## __init__
```python
from G_M_A_P_ import __init__
```



---
## toXML
```python
from G_M_A_P_ import toXML
```



---
## fromXML
```python
from G_M_A_P_ import fromXML
```



---
## compile
```python
from G_M_A_P_ import compile
```



---
## __repr__
```python
from G_M_A_P_ import __repr__
```



---
## decompile
```python
from G_M_A_P_ import decompile
```



---
## __name__
```python
from F_F_T_M_ import __name__
```



---
## table_F_F_T_M_
```python
from F_F_T_M_ import table_F_F_T_M_
```



---
## decompile
```python
from F_F_T_M_ import decompile
```



---
## compile
```python
from F_F_T_M_ import compile
```



---
## toXML
```python
from F_F_T_M_ import toXML
```



---
## fromXML
```python
from F_F_T_M_ import fromXML
```



---
## __name__
```python
from DefaultTable import __name__
```



---
## DefaultTable
```python
from DefaultTable import DefaultTable
```



---
## __init__
```python
from DefaultTable import __init__
```



---
## decompile
```python
from DefaultTable import decompile
```



---
## compile
```python
from DefaultTable import compile
```



---
## toXML
```python
from DefaultTable import toXML
```



---
## fromXML
```python
from DefaultTable import fromXML
```



---
## __repr__
```python
from DefaultTable import __repr__
```



---
## __eq__
```python
from DefaultTable import __eq__
```



---
## __ne__
```python
from DefaultTable import __ne__
```



---
## __name__
```python
from H_V_A_R_ import __name__
```



---
## table_H_V_A_R_
```python
from H_V_A_R_ import table_H_V_A_R_
```



---
## __name__
```python
from V_O_R_G_ import __name__
```



---
## table_V_O_R_G_
```python
from V_O_R_G_ import table_V_O_R_G_
```

This table is structured so that you can treat it like a dictionary keyed by glyph name.

``ttFont['VORG'][<glyphName>]`` will return the vertical origin for any glyph.

``ttFont['VORG'][<glyphName>] = <value>`` will set the vertical origin for any glyph.

---
## VOriginRecord
```python
from V_O_R_G_ import VOriginRecord
```



---
## decompile
```python
from V_O_R_G_ import decompile
```



---
## compile
```python
from V_O_R_G_ import compile
```



---
## toXML
```python
from V_O_R_G_ import toXML
```



---
## fromXML
```python
from V_O_R_G_ import fromXML
```



---
## __getitem__
```python
from V_O_R_G_ import __getitem__
```



---
## __setitem__
```python
from V_O_R_G_ import __setitem__
```



---
## __delitem__
```python
from V_O_R_G_ import __delitem__
```



---
## __init__
```python
from V_O_R_G_ import __init__
```



---
## __name__
```python
from _k_e_r_n import __name__
```



---
## table__k_e_r_n
```python
from _k_e_r_n import table__k_e_r_n
```



---
## KernTable_format_0
```python
from _k_e_r_n import KernTable_format_0
```



---
## KernTable_format_unkown
```python
from _k_e_r_n import KernTable_format_unkown
```



---
## getkern
```python
from _k_e_r_n import getkern
```



---
## decompile
```python
from _k_e_r_n import decompile
```



---
## compile
```python
from _k_e_r_n import compile
```



---
## toXML
```python
from _k_e_r_n import toXML
```



---
## fromXML
```python
from _k_e_r_n import fromXML
```



---
## __init__
```python
from _k_e_r_n import __init__
```



---
## __getitem__
```python
from _k_e_r_n import __getitem__
```



---
## __setitem__
```python
from _k_e_r_n import __setitem__
```



---
## __delitem__
```python
from _k_e_r_n import __delitem__
```



---
## __name__
```python
from TupleVariation import __name__
```



---
## TupleVariation
```python
from TupleVariation import TupleVariation
```



---
## decompileSharedTuples
```python
from TupleVariation import decompileSharedTuples
```



---
## compileSharedTuples
```python
from TupleVariation import compileSharedTuples
```



---
## compileTupleVariationStore
```python
from TupleVariation import compileTupleVariationStore
```



---
## decompileTupleVariationStore
```python
from TupleVariation import decompileTupleVariationStore
```



---
## decompileTupleVariation_
```python
from TupleVariation import decompileTupleVariation_
```



---
## inferRegion_
```python
from TupleVariation import inferRegion_
```

Infer start and end for a (non-intermediate) region

This helper function computes the applicability region for
variation tuples whose INTERMEDIATE_REGION flag is not set in the
TupleVariationHeader structure.  Variation tuples apply only to
certain regions of the variation space; outside that region, the
tuple has no effect.  To make the binary encoding more compact,
TupleVariationHeaders can omit the intermediateStartTuple and
intermediateEndTuple fields.

---
## __init__
```python
from TupleVariation import __init__
```



---
## __repr__
```python
from TupleVariation import __repr__
```



---
## __eq__
```python
from TupleVariation import __eq__
```



---
## getUsedPoints
```python
from TupleVariation import getUsedPoints
```



---
## hasImpact
```python
from TupleVariation import hasImpact
```

Returns True if this TupleVariation has any visible impact.

If the result is False, the TupleVariation can be omitted from the font
without making any visible difference.

---
## toXML
```python
from TupleVariation import toXML
```



---
## fromXML
```python
from TupleVariation import fromXML
```



---
## compile
```python
from TupleVariation import compile
```



---
## compileCoord
```python
from TupleVariation import compileCoord
```



---
## compileIntermediateCoord
```python
from TupleVariation import compileIntermediateCoord
```



---
## decompileCoord_
```python
from TupleVariation import decompileCoord_
```



---
## compilePoints
```python
from TupleVariation import compilePoints
```



---
## decompilePoints_
```python
from TupleVariation import decompilePoints_
```

(numPoints, data, offset, tableTag) --> ([point1, point2, ...], newOffset)

---
## compileDeltas
```python
from TupleVariation import compileDeltas
```



---
## compileDeltaValues_
```python
from TupleVariation import compileDeltaValues_
```

[value1, value2, value3, ...] --> bytearray

Emits a sequence of runs. Each run starts with a
byte-sized header whose 6 least significant bits
(header & 0x3F) indicate how many values are encoded
in this run. The stored length is the actual length
minus one; run lengths are thus in the range [1..64].
If the header byte has its most significant bit (0x80)
set, all values in this run are zero, and no data
follows. Otherwise, the header byte is followed by
((header & 0x3F) + 1) signed values.  If (header &
0x40) is clear, the delta values are stored as signed
bytes; if (header & 0x40) is set, the delta values are
signed 16-bit integers.

---
## encodeDeltaRunAsZeroes_
```python
from TupleVariation import encodeDeltaRunAsZeroes_
```



---
## encodeDeltaRunAsBytes_
```python
from TupleVariation import encodeDeltaRunAsBytes_
```



---
## encodeDeltaRunAsWords_
```python
from TupleVariation import encodeDeltaRunAsWords_
```



---
## encodeDeltaRunAsLongs_
```python
from TupleVariation import encodeDeltaRunAsLongs_
```



---
## decompileDeltas_
```python
from TupleVariation import decompileDeltas_
```

(numDeltas, data, offset) --> ([delta, delta, ...], newOffset)

---
## getTupleSize_
```python
from TupleVariation import getTupleSize_
```



---
## getCoordWidth
```python
from TupleVariation import getCoordWidth
```

Return 2 if coordinates are (x, y) as in gvar, 1 if single values
as in cvar, or 0 if empty.

---
## scaleDeltas
```python
from TupleVariation import scaleDeltas
```



---
## roundDeltas
```python
from TupleVariation import roundDeltas
```



---
## calcInferredDeltas
```python
from TupleVariation import calcInferredDeltas
```



---
## optimize
```python
from TupleVariation import optimize
```



---
## __imul__
```python
from TupleVariation import __imul__
```



---
## __iadd__
```python
from TupleVariation import __iadd__
```



---
## key
```python
from TupleVariation import key
```



---
## __name__
```python
from _p_r_o_p import __name__
```



---
## table__p_r_o_p
```python
from _p_r_o_p import table__p_r_o_p
```



---
## __name__
```python
from _f_p_g_m import __name__
```



---
## table__f_p_g_m
```python
from _f_p_g_m import table__f_p_g_m
```



---
## decompile
```python
from _f_p_g_m import decompile
```



---
## compile
```python
from _f_p_g_m import compile
```



---
## toXML
```python
from _f_p_g_m import toXML
```



---
## fromXML
```python
from _f_p_g_m import fromXML
```



---
## __bool__
```python
from _f_p_g_m import __bool__
```

>>> fpgm = table__f_p_g_m()
>>> bool(fpgm)
False
>>> p = ttProgram.Program()
>>> fpgm.program = p
>>> bool(fpgm)
False
>>> bc = bytearray([0])
>>> p.fromBytecode(bc)
>>> bool(fpgm)
True
>>> p.bytecode.pop()
0
>>> bool(fpgm)
False

---
## __name__
```python
from T_S_I__0 import __name__
```

TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI0 is the index table containing the lengths and offsets for the glyph
programs and 'extra' programs ('fpgm', 'prep', and 'cvt') that are contained
in the TSI1 table.

---
## fixlongs
```python
from T_S_I__0 import fixlongs
```



---
## table_T_S_I__0
```python
from T_S_I__0 import table_T_S_I__0
```



---
## decompile
```python
from T_S_I__0 import decompile
```



---
## compile
```python
from T_S_I__0 import compile
```



---
## set
```python
from T_S_I__0 import set
```



---
## toXML
```python
from T_S_I__0 import toXML
```



---
## __name__
```python
from S__i_l_f import __name__
```



---
## disassemble
```python
from S__i_l_f import disassemble
```



---
## assemble
```python
from S__i_l_f import assemble
```



---
## writecode
```python
from S__i_l_f import writecode
```



---
## readcode
```python
from S__i_l_f import readcode
```



---
## writesimple
```python
from S__i_l_f import writesimple
```



---
## getSimple
```python
from S__i_l_f import getSimple
```



---
## content_string
```python
from S__i_l_f import content_string
```



---
## wrapline
```python
from S__i_l_f import wrapline
```



---
## _Object
```python
from S__i_l_f import _Object
```



---
## table_S__i_l_f
```python
from S__i_l_f import table_S__i_l_f
```

Silf table support

---
## Silf
```python
from S__i_l_f import Silf
```

A particular Silf subtable

---
## Classes
```python
from S__i_l_f import Classes
```



---
## Pass
```python
from S__i_l_f import Pass
```



---
## __init__
```python
from S__i_l_f import __init__
```



---
## decompile
```python
from S__i_l_f import decompile
```



---
## compile
```python
from S__i_l_f import compile
```



---
## toXML
```python
from S__i_l_f import toXML
```



---
## fromXML
```python
from S__i_l_f import fromXML
```



---
## __name__
```python
from G_D_E_F_ import __name__
```



---
## table_G_D_E_F_
```python
from G_D_E_F_ import table_G_D_E_F_
```



---
## __name__
```python
from T_S_I__1 import __name__
```

TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI1 contains the text of the glyph programs in the form of low-level assembly
code, as well as the 'extra' programs 'fpgm', 'ppgm' (i.e. 'prep'), and 'cvt'.

---
## table_T_S_I__1
```python
from T_S_I__1 import table_T_S_I__1
```



---
## decompile
```python
from T_S_I__1 import decompile
```



---
## compile
```python
from T_S_I__1 import compile
```



---
## toXML
```python
from T_S_I__1 import toXML
```



---
## fromXML
```python
from T_S_I__1 import fromXML
```



---
## __name__
```python
from _h_d_m_x import __name__
```



---
## _GlyphnamedList
```python
from _h_d_m_x import _GlyphnamedList
```



---
## table__h_d_m_x
```python
from _h_d_m_x import table__h_d_m_x
```



---
## __init__
```python
from _h_d_m_x import __init__
```



---
## __getitem__
```python
from _h_d_m_x import __getitem__
```



---
## __len__
```python
from _h_d_m_x import __len__
```



---
## __iter__
```python
from _h_d_m_x import __iter__
```



---
## keys
```python
from _h_d_m_x import keys
```



---
## decompile
```python
from _h_d_m_x import decompile
```



---
## compile
```python
from _h_d_m_x import compile
```



---
## toXML
```python
from _h_d_m_x import toXML
```



---
## fromXML
```python
from _h_d_m_x import fromXML
```



---
## __name__
```python
from S_I_N_G_ import __name__
```



---
## table_S_I_N_G_
```python
from S_I_N_G_ import table_S_I_N_G_
```



---
## decompile
```python
from S_I_N_G_ import decompile
```



---
## decompileUniqueName
```python
from S_I_N_G_ import decompileUniqueName
```



---
## compile
```python
from S_I_N_G_ import compile
```



---
## compilecompileUniqueName
```python
from S_I_N_G_ import compilecompileUniqueName
```



---
## toXML
```python
from S_I_N_G_ import toXML
```



---
## fromXML
```python
from S_I_N_G_ import fromXML
```



---
## __name__
```python
from V_V_A_R_ import __name__
```



---
## table_V_V_A_R_
```python
from V_V_A_R_ import table_V_V_A_R_
```



---
## __name__
```python
from T_S_I__5 import __name__
```

TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI5 contains the VTT character groups.

---
## table_T_S_I__5
```python
from T_S_I__5 import table_T_S_I__5
```



---
## decompile
```python
from T_S_I__5 import decompile
```



---
## compile
```python
from T_S_I__5 import compile
```



---
## toXML
```python
from T_S_I__5 import toXML
```



---
## fromXML
```python
from T_S_I__5 import fromXML
```



---
## __name__
```python
from grUtils import __name__
```



---
## decompress
```python
from grUtils import decompress
```



---
## compress
```python
from grUtils import compress
```



---
## _entries
```python
from grUtils import _entries
```



---
## entries
```python
from grUtils import entries
```



---
## bininfo
```python
from grUtils import bininfo
```



---
## num2tag
```python
from grUtils import num2tag
```



---
## tag2num
```python
from grUtils import tag2num
```



---
## __name__
```python
from otTables import __name__
```

fontTools.ttLib.tables.otTables -- A collection of classes representing the various
OpenType subtables.

Most are constructed upon import from data in otData.py, all are populated with
converter objects from otConverters.py.

---
## VarComponentFlags
```python
from otTables import VarComponentFlags
```



---
## _read_uint32var
```python
from otTables import _read_uint32var
```

Read a variable-length number from data starting at index i.

Return the number and the next index.

---
## _write_uint32var
```python
from otTables import _write_uint32var
```

Write a variable-length number.

Return the data.

---
## VarComponent
```python
from otTables import VarComponent
```



---
## VarCompositeGlyph
```python
from otTables import VarCompositeGlyph
```



---
## AATStateTable
```python
from otTables import AATStateTable
```



---
## AATState
```python
from otTables import AATState
```



---
## AATAction
```python
from otTables import AATAction
```



---
## RearrangementMorphAction
```python
from otTables import RearrangementMorphAction
```



---
## ContextualMorphAction
```python
from otTables import ContextualMorphAction
```



---
## LigAction
```python
from otTables import LigAction
```



---
## LigatureMorphAction
```python
from otTables import LigatureMorphAction
```



---
## InsertionMorphAction
```python
from otTables import InsertionMorphAction
```



---
## FeatureParams
```python
from otTables import FeatureParams
```



---
## FeatureParamsSize
```python
from otTables import FeatureParamsSize
```



---
## FeatureParamsStylisticSet
```python
from otTables import FeatureParamsStylisticSet
```



---
## FeatureParamsCharacterVariants
```python
from otTables import FeatureParamsCharacterVariants
```



---
## Coverage
```python
from otTables import Coverage
```



---
## DeltaSetIndexMap
```python
from otTables import DeltaSetIndexMap
```



---
## VarIdxMap
```python
from otTables import VarIdxMap
```



---
## VarRegionList
```python
from otTables import VarRegionList
```



---
## SingleSubst
```python
from otTables import SingleSubst
```



---
## MultipleSubst
```python
from otTables import MultipleSubst
```



---
## ClassDef
```python
from otTables import ClassDef
```



---
## AlternateSubst
```python
from otTables import AlternateSubst
```



---
## LigatureSubst
```python
from otTables import LigatureSubst
```



---
## COLR
```python
from otTables import COLR
```



---
## LookupList
```python
from otTables import LookupList
```



---
## BaseGlyphRecordArray
```python
from otTables import BaseGlyphRecordArray
```



---
## BaseGlyphList
```python
from otTables import BaseGlyphList
```



---
## ClipBoxFormat
```python
from otTables import ClipBoxFormat
```



---
## ClipBox
```python
from otTables import ClipBox
```



---
## ClipList
```python
from otTables import ClipList
```



---
## ExtendMode
```python
from otTables import ExtendMode
```



---
## CompositeMode
```python
from otTables import CompositeMode
```



---
## PaintFormat
```python
from otTables import PaintFormat
```



---
## Paint
```python
from otTables import Paint
```



---
## fixLookupOverFlows
```python
from otTables import fixLookupOverFlows
```

Either the offset from the LookupList to a lookup overflowed, or
an offset from a lookup to a subtable overflowed.
The table layout is:
GPSO/GUSB
        Script List
        Feature List
        LookUpList
                Lookup[0] and contents
                        SubTable offset list
                                SubTable[0] and contents
                                ...
                                SubTable[n] and contents
                ...
                Lookup[n] and contents
                        SubTable offset list
                                SubTable[0] and contents
                                ...
                                SubTable[n] and contents
If the offset to a lookup overflowed (SubTableIndex is None)
        we must promote the *previous*      lookup to an Extension type.
If the offset from a lookup to subtable overflowed, then we must promote it
        to an Extension Lookup type.

---
## splitMultipleSubst
```python
from otTables import splitMultipleSubst
```



---
## splitAlternateSubst
```python
from otTables import splitAlternateSubst
```



---
## splitLigatureSubst
```python
from otTables import splitLigatureSubst
```



---
## splitPairPos
```python
from otTables import splitPairPos
```



---
## splitMarkBasePos
```python
from otTables import splitMarkBasePos
```



---
## fixSubTableOverFlows
```python
from otTables import fixSubTableOverFlows
```

An offset has overflowed within a sub-table. We need to divide this subtable into smaller parts.

---
## _buildClasses
```python
from otTables import _buildClasses
```



---
## _getGlyphsFromCoverageTable
```python
from otTables import _getGlyphsFromCoverageTable
```



---
## __init__
```python
from otTables import __init__
```



---
## populateDefaults
```python
from otTables import populateDefaults
```



---
## decompile
```python
from otTables import decompile
```



---
## compile
```python
from otTables import compile
```



---
## toXML
```python
from otTables import toXML
```



---
## fromXML
```python
from otTables import fromXML
```



---
## applyTransformDeltas
```python
from otTables import applyTransformDeltas
```



---
## __eq__
```python
from otTables import __eq__
```



---
## __ne__
```python
from otTables import __ne__
```



---
## compileActions
```python
from otTables import compileActions
```



---
## _writeFlagsToXML
```python
from otTables import _writeFlagsToXML
```



---
## _setFlag
```python
from otTables import _setFlag
```



---
## compileLigActions
```python
from otTables import compileLigActions
```



---
## _decompileLigActions
```python
from otTables import _decompileLigActions
```



---
## _decompileInsertionAction
```python
from otTables import _decompileInsertionAction
```



---
## postRead
```python
from otTables import postRead
```



---
## preWrite
```python
from otTables import preWrite
```



---
## toXML2
```python
from otTables import toXML2
```



---
## getEntryFormat
```python
from otTables import getEntryFormat
```



---
## __getitem__
```python
from otTables import __getitem__
```



---
## makeSequence_
```python
from otTables import makeSequence_
```



---
## _getClassRanges
```python
from otTables import _getClassRanges
```



---
## _getLigatureSortKey
```python
from otTables import _getLigatureSortKey
```



---
## computeClipBoxes
```python
from otTables import computeClipBoxes
```



---
## table
```python
from otTables import table
```



---
## is_variable
```python
from otTables import is_variable
```



---
## as_variable
```python
from otTables import as_variable
```



---
## as_tuple
```python
from otTables import as_tuple
```



---
## __repr__
```python
from otTables import __repr__
```



---
## groups
```python
from otTables import groups
```



---
## getFormatName
```python
from otTables import getFormatName
```



---
## iterPaintSubTables
```python
from otTables import iterPaintSubTables
```



---
## getChildren
```python
from otTables import getChildren
```



---
## traverse
```python
from otTables import traverse
```

Depth-first traversal of graph rooted at self, callback on each node.

---
## getTransform
```python
from otTables import getTransform
```



---
## computeClipBox
```python
from otTables import computeClipBox
```



---
## read_transform_component
```python
from otTables import read_transform_component
```



---
## write_transform_component
```python
from otTables import write_transform_component
```



---
## write
```python
from otTables import write
```



---
## read_transform_component_delta
```python
from otTables import read_transform_component_delta
```



---
## __name__
```python
from _c_v_a_r import __name__
```



---
## table__c_v_a_r
```python
from _c_v_a_r import table__c_v_a_r
```



---
## __init__
```python
from _c_v_a_r import __init__
```



---
## compile
```python
from _c_v_a_r import compile
```



---
## decompile
```python
from _c_v_a_r import decompile
```



---
## fromXML
```python
from _c_v_a_r import fromXML
```



---
## toXML
```python
from _c_v_a_r import toXML
```



---
## __name__
```python
from otConverters import __name__
```



---
## buildConverters
```python
from otConverters import buildConverters
```

Given a table spec from otData.py, build a converter object for each
field of the table. This is called for each table in otData.py, and
the results are assigned to the corresponding class in otTables.py.

---
## BaseConverter
```python
from otConverters import BaseConverter
```

Base class for converter objects. Apart from the constructor, this
is an abstract class.

---
## SimpleValue
```python
from otConverters import SimpleValue
```



---
## OptionalValue
```python
from otConverters import OptionalValue
```



---
## IntValue
```python
from otConverters import IntValue
```



---
## Long
```python
from otConverters import Long
```



---
## ULong
```python
from otConverters import ULong
```



---
## Flags32
```python
from otConverters import Flags32
```



---
## VarIndex
```python
from otConverters import VarIndex
```



---
## Short
```python
from otConverters import Short
```



---
## UShort
```python
from otConverters import UShort
```



---
## Int8
```python
from otConverters import Int8
```



---
## UInt8
```python
from otConverters import UInt8
```



---
## UInt24
```python
from otConverters import UInt24
```



---
## ComputedInt
```python
from otConverters import ComputedInt
```



---
## ComputedUInt8
```python
from otConverters import ComputedUInt8
```



---
## ComputedUShort
```python
from otConverters import ComputedUShort
```



---
## ComputedULong
```python
from otConverters import ComputedULong
```



---
## Tag
```python
from otConverters import Tag
```



---
## GlyphID
```python
from otConverters import GlyphID
```



---
## GlyphID32
```python
from otConverters import GlyphID32
```



---
## NameID
```python
from otConverters import NameID
```



---
## STATFlags
```python
from otConverters import STATFlags
```



---
## FloatValue
```python
from otConverters import FloatValue
```



---
## DeciPoints
```python
from otConverters import DeciPoints
```



---
## BaseFixedValue
```python
from otConverters import BaseFixedValue
```



---
## Fixed
```python
from otConverters import Fixed
```



---
## F2Dot14
```python
from otConverters import F2Dot14
```



---
## Angle
```python
from otConverters import Angle
```



---
## BiasedAngle
```python
from otConverters import BiasedAngle
```



---
## Version
```python
from otConverters import Version
```



---
## Char64
```python
from otConverters import Char64
```

An ASCII string with up to 64 characters.

Unused character positions are filled with 0x00 bytes.
Used in Apple AAT fonts in the `gcid` table.

---
## Struct
```python
from otConverters import Struct
```



---
## StructWithLength
```python
from otConverters import StructWithLength
```



---
## Table
```python
from otConverters import Table
```



---
## LTable
```python
from otConverters import LTable
```



---
## Table24
```python
from otConverters import Table24
```



---
## SubStruct
```python
from otConverters import SubStruct
```



---
## SubTable
```python
from otConverters import SubTable
```



---
## ExtSubTable
```python
from otConverters import ExtSubTable
```



---
## FeatureParams
```python
from otConverters import FeatureParams
```



---
## ValueFormat
```python
from otConverters import ValueFormat
```



---
## ValueRecord
```python
from otConverters import ValueRecord
```



---
## AATLookup
```python
from otConverters import AATLookup
```



---
## AATLookupWithDataOffset
```python
from otConverters import AATLookupWithDataOffset
```



---
## MorxSubtableConverter
```python
from otConverters import MorxSubtableConverter
```



---
## STXHeader
```python
from otConverters import STXHeader
```



---
## CIDGlyphMap
```python
from otConverters import CIDGlyphMap
```



---
## GlyphCIDMap
```python
from otConverters import GlyphCIDMap
```



---
## DeltaValue
```python
from otConverters import DeltaValue
```



---
## VarIdxMapValue
```python
from otConverters import VarIdxMapValue
```



---
## VarDataValue
```python
from otConverters import VarDataValue
```



---
## TupleValues
```python
from otConverters import TupleValues
```



---
## CFF2Index
```python
from otConverters import CFF2Index
```



---
## LookupFlag
```python
from otConverters import LookupFlag
```



---
## _UInt8Enum
```python
from otConverters import _UInt8Enum
```



---
## ExtendMode
```python
from otConverters import ExtendMode
```



---
## CompositeMode
```python
from otConverters import CompositeMode
```



---
## __init__
```python
from otConverters import __init__
```



---
## readArray
```python
from otConverters import readArray
```



---
## getRecordSize
```python
from otConverters import getRecordSize
```



---
## read
```python
from otConverters import read
```



---
## writeArray
```python
from otConverters import writeArray
```



---
## write
```python
from otConverters import write
```



---
## xmlRead
```python
from otConverters import xmlRead
```



---
## xmlWrite
```python
from otConverters import xmlWrite
```



---
## getVarIndexOffset
```python
from otConverters import getVarIndexOffset
```

If description has `VarIndexBase + {offset}`, return the offset else None.

---
## toString
```python
from otConverters import toString
```



---
## fromString
```python
from otConverters import fromString
```



---
## fromInt
```python
from otConverters import fromInt
```



---
## toInt
```python
from otConverters import toInt
```



---
## fromFloat
```python
from otConverters import fromFloat
```



---
## __repr__
```python
from otConverters import __repr__
```



---
## readOffset
```python
from otConverters import readOffset
```



---
## writeNullOffset
```python
from otConverters import writeNullOffset
```



---
## getConverter
```python
from otConverters import getConverter
```



---
## writeBinSearchHeader
```python
from otConverters import writeBinSearchHeader
```



---
## buildFormat0
```python
from otConverters import buildFormat0
```



---
## writeFormat0
```python
from otConverters import writeFormat0
```



---
## buildFormat2
```python
from otConverters import buildFormat2
```



---
## writeFormat2
```python
from otConverters import writeFormat2
```



---
## buildFormat6
```python
from otConverters import buildFormat6
```



---
## writeFormat6
```python
from otConverters import writeFormat6
```



---
## buildFormat8
```python
from otConverters import buildFormat8
```



---
## writeFormat8
```python
from otConverters import writeFormat8
```



---
## readFormat0
```python
from otConverters import readFormat0
```



---
## readFormat2
```python
from otConverters import readFormat2
```



---
## readFormat4
```python
from otConverters import readFormat4
```



---
## readFormat6
```python
from otConverters import readFormat6
```



---
## readFormat8
```python
from otConverters import readFormat8
```



---
## _setTextDirectionFromCoverageFlags
```python
from otConverters import _setTextDirectionFromCoverageFlags
```



---
## _readTransition
```python
from otConverters import _readTransition
```



---
## _readLigatures
```python
from otConverters import _readLigatures
```



---
## _countPerGlyphLookups
```python
from otConverters import _countPerGlyphLookups
```



---
## _readPerGlyphLookups
```python
from otConverters import _readPerGlyphLookups
```



---
## _compileStates
```python
from otConverters import _compileStates
```



---
## _compilePerGlyphLookups
```python
from otConverters import _compilePerGlyphLookups
```



---
## _compileLigComponents
```python
from otConverters import _compileLigComponents
```



---
## _compileLigatures
```python
from otConverters import _compileLigatures
```



---
## _xmlWriteLigatures
```python
from otConverters import _xmlWriteLigatures
```



---
## _xmlReadState
```python
from otConverters import _xmlReadState
```



---
## _xmlReadLigComponents
```python
from otConverters import _xmlReadLigComponents
```



---
## _xmlReadLigatures
```python
from otConverters import _xmlReadLigatures
```



---
## getReadArray
```python
from otConverters import getReadArray
```



---
## get_read_item
```python
from otConverters import get_read_item
```



---
## read_item
```python
from otConverters import read_item
```



---
## __name__
```python
from _p_o_s_t import __name__
```



---
## table__p_o_s_t
```python
from _p_o_s_t import table__p_o_s_t
```



---
## unpackPStrings
```python
from _p_o_s_t import unpackPStrings
```



---
## packPStrings
```python
from _p_o_s_t import packPStrings
```



---
## decompile
```python
from _p_o_s_t import decompile
```



---
## compile
```python
from _p_o_s_t import compile
```



---
## getGlyphOrder
```python
from _p_o_s_t import getGlyphOrder
```

This function will get called by a ttLib.TTFont instance.
Do not call this function yourself, use TTFont().getGlyphOrder()
or its relatives instead!

---
## decode_format_1_0
```python
from _p_o_s_t import decode_format_1_0
```



---
## decode_format_2_0
```python
from _p_o_s_t import decode_format_2_0
```



---
## build_psNameMapping
```python
from _p_o_s_t import build_psNameMapping
```



---
## decode_format_3_0
```python
from _p_o_s_t import decode_format_3_0
```



---
## decode_format_4_0
```python
from _p_o_s_t import decode_format_4_0
```



---
## encode_format_2_0
```python
from _p_o_s_t import encode_format_2_0
```



---
## encode_format_4_0
```python
from _p_o_s_t import encode_format_4_0
```



---
## toXML
```python
from _p_o_s_t import toXML
```



---
## fromXML
```python
from _p_o_s_t import fromXML
```



---
## __name__
```python
from _m_e_t_a import __name__
```



---
## table__m_e_t_a
```python
from _m_e_t_a import table__m_e_t_a
```



---
## __init__
```python
from _m_e_t_a import __init__
```



---
## decompile
```python
from _m_e_t_a import decompile
```



---
## compile
```python
from _m_e_t_a import compile
```



---
## toXML
```python
from _m_e_t_a import toXML
```



---
## fromXML
```python
from _m_e_t_a import fromXML
```



---
## __name__
```python
from C_B_D_T_ import __name__
```



---
## table_C_B_D_T_
```python
from C_B_D_T_ import table_C_B_D_T_
```



---
## _removeUnsupportedForColor
```python
from C_B_D_T_ import _removeUnsupportedForColor
```



---
## ColorBitmapGlyph
```python
from C_B_D_T_ import ColorBitmapGlyph
```



---
## cbdt_bitmap_format_17
```python
from C_B_D_T_ import cbdt_bitmap_format_17
```



---
## cbdt_bitmap_format_18
```python
from C_B_D_T_ import cbdt_bitmap_format_18
```



---
## cbdt_bitmap_format_19
```python
from C_B_D_T_ import cbdt_bitmap_format_19
```



---
## getImageFormatClass
```python
from C_B_D_T_ import getImageFormatClass
```



---
## decompile
```python
from C_B_D_T_ import decompile
```



---
## compile
```python
from C_B_D_T_ import compile
```



---
## __name__
```python
from _c_m_a_p import __name__
```



---
## _make_map
```python
from _c_m_a_p import _make_map
```



---
## table__c_m_a_p
```python
from _c_m_a_p import table__c_m_a_p
```

Character to Glyph Index Mapping Table

This class represents the `cmap <https://docs.microsoft.com/en-us/typography/opentype/spec/cmap>`_
table, which maps between input characters (in Unicode or other system encodings)
and glyphs within the font. The ``cmap`` table contains one or more subtables
which determine the mapping of of characters to glyphs across different platforms
and encoding systems.

``table__c_m_a_p`` objects expose an accessor ``.tables`` which provides access
to the subtables, although it is normally easier to retrieve individual subtables
through the utility methods described below. To add new subtables to a font,
first determine the subtable format (if in doubt use format 4 for glyphs within
the BMP, format 12 for glyphs outside the BMP, and format 14 for Unicode Variation
Sequences) construct subtable objects with ``CmapSubtable.newSubtable(format)``,
and append them to the ``.tables`` list.

Within a subtable, the mapping of characters to glyphs is provided by the ``.cmap``
attribute.

Example::

        cmap4_0_3 = CmapSubtable.newSubtable(4)
        cmap4_0_3.platformID = 0
        cmap4_0_3.platEncID = 3
        cmap4_0_3.language = 0
        cmap4_0_3.cmap = { 0xC1: "Aacute" }

        cmap = newTable("cmap")
        cmap.tableVersion = 0
        cmap.tables = [cmap4_0_3]

---
## CmapSubtable
```python
from _c_m_a_p import CmapSubtable
```

Base class for all cmap subtable formats.

Subclasses which handle the individual subtable formats are named
``cmap_format_0``, ``cmap_format_2`` etc. Use :py:meth:`getSubtableClass`
to retrieve the concrete subclass, or :py:meth:`newSubtable` to get a
new subtable object for a given format.

The object exposes a ``.cmap`` attribute, which contains a dictionary mapping
character codepoints to glyph names.

---
## cmap_format_0
```python
from _c_m_a_p import cmap_format_0
```



---
## SubHeader
```python
from _c_m_a_p import SubHeader
```



---
## cmap_format_2
```python
from _c_m_a_p import cmap_format_2
```



---
## splitRange
```python
from _c_m_a_p import splitRange
```



---
## cmap_format_4
```python
from _c_m_a_p import cmap_format_4
```



---
## cmap_format_6
```python
from _c_m_a_p import cmap_format_6
```



---
## cmap_format_12_or_13
```python
from _c_m_a_p import cmap_format_12_or_13
```



---
## cmap_format_12
```python
from _c_m_a_p import cmap_format_12
```



---
## cmap_format_13
```python
from _c_m_a_p import cmap_format_13
```



---
## cvtToUVS
```python
from _c_m_a_p import cvtToUVS
```



---
## cvtFromUVS
```python
from _c_m_a_p import cvtFromUVS
```



---
## cmap_format_14
```python
from _c_m_a_p import cmap_format_14
```



---
## cmap_format_unknown
```python
from _c_m_a_p import cmap_format_unknown
```



---
## getcmap
```python
from _c_m_a_p import getcmap
```

Returns the first subtable which matches the given platform and encoding.

Args:
        platformID (int): The platform ID. Use 0 for Unicode, 1 for Macintosh
                (deprecated for new fonts), 2 for ISO (deprecated) and 3 for Windows.
        encodingID (int): Encoding ID. Interpretation depends on the platform ID.
                See the OpenType specification for details.

Returns:
        An object which is a subclass of :py:class:`CmapSubtable` if a matching
        subtable is found within the font, or ``None`` otherwise.

---
## getBestCmap
```python
from _c_m_a_p import getBestCmap
```

Returns the 'best' Unicode cmap dictionary available in the font
or ``None``, if no Unicode cmap subtable is available.

By default it will search for the following (platformID, platEncID)
pairs in order::

                (3, 10), # Windows Unicode full repertoire
                (0, 6),  # Unicode full repertoire (format 13 subtable)
                (0, 4),  # Unicode 2.0 full repertoire
                (3, 1),  # Windows Unicode BMP
                (0, 3),  # Unicode 2.0 BMP
                (0, 2),  # Unicode ISO/IEC 10646
                (0, 1),  # Unicode 1.1
                (0, 0)   # Unicode 1.0

This particular order matches what HarfBuzz uses to choose what
subtable to use by default. This order prefers the largest-repertoire
subtable, and among those, prefers the Windows-platform over the
Unicode-platform as the former has wider support.

This order can be customized via the ``cmapPreferences`` argument.

---
## buildReversed
```python
from _c_m_a_p import buildReversed
```

Builds a reverse mapping dictionary

Iterates over all Unicode cmap tables and returns a dictionary mapping
glyphs to sets of codepoints, such as::

        {
                'one': {0x31}
                'A': {0x41,0x391}
        }

The values are sets of Unicode codepoints because
some fonts map different codepoints to the same glyph.
For example, ``U+0041 LATIN CAPITAL LETTER A`` and ``U+0391
GREEK CAPITAL LETTER ALPHA`` are sometimes the same glyph.

---
## decompile
```python
from _c_m_a_p import decompile
```



---
## ensureDecompiled
```python
from _c_m_a_p import ensureDecompiled
```



---
## compile
```python
from _c_m_a_p import compile
```



---
## toXML
```python
from _c_m_a_p import toXML
```



---
## fromXML
```python
from _c_m_a_p import fromXML
```



---
## getSubtableClass
```python
from _c_m_a_p import getSubtableClass
```

Return the subtable class for a format.

---
## newSubtable
```python
from _c_m_a_p import newSubtable
```

Return a new instance of a subtable for the given format
.

---
## __init__
```python
from _c_m_a_p import __init__
```



---
## __getattr__
```python
from _c_m_a_p import __getattr__
```



---
## decompileHeader
```python
from _c_m_a_p import decompileHeader
```



---
## getEncoding
```python
from _c_m_a_p import getEncoding
```

Returns the Python encoding name for this cmap subtable based on its platformID,
platEncID, and language.  If encoding for these values is not known, by default
``None`` is returned.  That can be overridden by passing a value to the ``default``
argument.

Note that if you want to choose a "preferred" cmap subtable, most of the time
``self.isUnicode()`` is what you want as that one only returns true for the modern,
commonly used, Unicode-compatible triplets, not the legacy ones.

---
## isUnicode
```python
from _c_m_a_p import isUnicode
```

Returns true if the characters are interpreted as Unicode codepoints.

---
## isSymbol
```python
from _c_m_a_p import isSymbol
```

Returns true if the subtable is for the Symbol encoding (3,0)

---
## _writeCodes
```python
from _c_m_a_p import _writeCodes
```



---
## __lt__
```python
from _c_m_a_p import __lt__
```



---
## setIDDelta
```python
from _c_m_a_p import setIDDelta
```



---
## _computeGIDs
```python
from _c_m_a_p import _computeGIDs
```



---
## _IsInSameRun
```python
from _c_m_a_p import _IsInSameRun
```



---
## __name__
```python
from _p_r_e_p import __name__
```



---
## table__p_r_e_p
```python
from _p_r_e_p import table__p_r_e_p
```



---
## __name__
```python
from C_P_A_L_ import __name__
```



---
## table_C_P_A_L_
```python
from C_P_A_L_ import table_C_P_A_L_
```



---
## Color
```python
from C_P_A_L_ import Color
```



---
## __init__
```python
from C_P_A_L_ import __init__
```



---
## decompile
```python
from C_P_A_L_ import decompile
```



---
## _decompileUInt16Array
```python
from C_P_A_L_ import _decompileUInt16Array
```



---
## _decompileUInt32Array
```python
from C_P_A_L_ import _decompileUInt32Array
```



---
## compile
```python
from C_P_A_L_ import compile
```



---
## _compilePalette
```python
from C_P_A_L_ import _compilePalette
```



---
## _compileColorRecords
```python
from C_P_A_L_ import _compileColorRecords
```



---
## _compilePaletteTypes
```python
from C_P_A_L_ import _compilePaletteTypes
```



---
## _compilePaletteLabels
```python
from C_P_A_L_ import _compilePaletteLabels
```



---
## _compilePaletteEntryLabels
```python
from C_P_A_L_ import _compilePaletteEntryLabels
```



---
## toXML
```python
from C_P_A_L_ import toXML
```



---
## fromXML
```python
from C_P_A_L_ import fromXML
```



---
## hex
```python
from C_P_A_L_ import hex
```



---
## __repr__
```python
from C_P_A_L_ import __repr__
```



---
## fromHex
```python
from C_P_A_L_ import fromHex
```



---
## fromRGBA
```python
from C_P_A_L_ import fromRGBA
```



---
## __name__
```python
from S__i_l_l import __name__
```



---
## table_S__i_l_l
```python
from S__i_l_l import table_S__i_l_l
```



---
## __init__
```python
from S__i_l_l import __init__
```



---
## decompile
```python
from S__i_l_l import decompile
```



---
## compile
```python
from S__i_l_l import compile
```



---
## toXML
```python
from S__i_l_l import toXML
```



---
## fromXML
```python
from S__i_l_l import fromXML
```



---
## __name__
```python
from E_B_D_T_ import __name__
```



---
## table_E_B_D_T_
```python
from E_B_D_T_ import table_E_B_D_T_
```



---
## EbdtComponent
```python
from E_B_D_T_ import EbdtComponent
```



---
## _data2binary
```python
from E_B_D_T_ import _data2binary
```



---
## _binary2data
```python
from E_B_D_T_ import _binary2data
```



---
## _memoize
```python
from E_B_D_T_ import _memoize
```



---
## _reverseBytes
```python
from E_B_D_T_ import _reverseBytes
```

>>> bin(ord(_reverseBytes(0b00100111)))
'0b11100100'
>>> _reverseBytes(b'\x00\xf0')
b'\x00\x0f'

---
## _writeRawImageData
```python
from E_B_D_T_ import _writeRawImageData
```



---
## _readRawImageData
```python
from E_B_D_T_ import _readRawImageData
```



---
## _writeRowImageData
```python
from E_B_D_T_ import _writeRowImageData
```



---
## _readRowImageData
```python
from E_B_D_T_ import _readRowImageData
```



---
## _writeBitwiseImageData
```python
from E_B_D_T_ import _writeBitwiseImageData
```



---
## _readBitwiseImageData
```python
from E_B_D_T_ import _readBitwiseImageData
```



---
## _writeExtFileImageData
```python
from E_B_D_T_ import _writeExtFileImageData
```



---
## _readExtFileImageData
```python
from E_B_D_T_ import _readExtFileImageData
```



---
## BitmapGlyph
```python
from E_B_D_T_ import BitmapGlyph
```



---
## _createBitmapPlusMetricsMixin
```python
from E_B_D_T_ import _createBitmapPlusMetricsMixin
```



---
## BitAlignedBitmapMixin
```python
from E_B_D_T_ import BitAlignedBitmapMixin
```



---
## ByteAlignedBitmapMixin
```python
from E_B_D_T_ import ByteAlignedBitmapMixin
```



---
## ebdt_bitmap_format_1
```python
from E_B_D_T_ import ebdt_bitmap_format_1
```



---
## ebdt_bitmap_format_2
```python
from E_B_D_T_ import ebdt_bitmap_format_2
```



---
## ebdt_bitmap_format_5
```python
from E_B_D_T_ import ebdt_bitmap_format_5
```



---
## ebdt_bitmap_format_6
```python
from E_B_D_T_ import ebdt_bitmap_format_6
```



---
## ebdt_bitmap_format_7
```python
from E_B_D_T_ import ebdt_bitmap_format_7
```



---
## ComponentBitmapGlyph
```python
from E_B_D_T_ import ComponentBitmapGlyph
```



---
## ebdt_bitmap_format_8
```python
from E_B_D_T_ import ebdt_bitmap_format_8
```



---
## ebdt_bitmap_format_9
```python
from E_B_D_T_ import ebdt_bitmap_format_9
```



---
## getImageFormatClass
```python
from E_B_D_T_ import getImageFormatClass
```



---
## decompile
```python
from E_B_D_T_ import decompile
```



---
## compile
```python
from E_B_D_T_ import compile
```



---
## toXML
```python
from E_B_D_T_ import toXML
```



---
## fromXML
```python
from E_B_D_T_ import fromXML
```



---
## memodict
```python
from E_B_D_T_ import memodict
```



---
## __init__
```python
from E_B_D_T_ import __init__
```



---
## __getattr__
```python
from E_B_D_T_ import __getattr__
```



---
## ensureDecompiled
```python
from E_B_D_T_ import ensureDecompiled
```



---
## getFormat
```python
from E_B_D_T_ import getFormat
```



---
## writeMetrics
```python
from E_B_D_T_ import writeMetrics
```



---
## readMetrics
```python
from E_B_D_T_ import readMetrics
```



---
## writeData
```python
from E_B_D_T_ import writeData
```



---
## readData
```python
from E_B_D_T_ import readData
```



---
## BitmapPlusMetricsMixin
```python
from E_B_D_T_ import BitmapPlusMetricsMixin
```



---
## _getBitRange
```python
from E_B_D_T_ import _getBitRange
```



---
## getRow
```python
from E_B_D_T_ import getRow
```



---
## setRows
```python
from E_B_D_T_ import setRows
```



---
## _getByteRange
```python
from E_B_D_T_ import _getByteRange
```



---
## __missing__
```python
from E_B_D_T_ import __missing__
```



---
## _moduleFinderHint
```python
from __init__ import _moduleFinderHint
```

Dummy function to let modulefinder know what tables may be
dynamically imported. Generated by MetaTools/buildTableList.py.

    >>> _moduleFinderHint()

---
## __name__
```python
from _l_c_a_r import __name__
```



---
## table__l_c_a_r
```python
from _l_c_a_r import table__l_c_a_r
```



---
## __name__
```python
from T_S_I_J_ import __name__
```



---
## table_T_S_I_J_
```python
from T_S_I_J_ import table_T_S_I_J_
```



---
## __name__
```python
from D__e_b_g import __name__
```



---
## table_D__e_b_g
```python
from D__e_b_g import table_D__e_b_g
```



---
## decompile
```python
from D__e_b_g import decompile
```



---
## compile
```python
from D__e_b_g import compile
```



---
## toXML
```python
from D__e_b_g import toXML
```



---
## fromXML
```python
from D__e_b_g import fromXML
```



---
## __name__
```python
from F__e_a_t import __name__
```



---
## table_F__e_a_t
```python
from F__e_a_t import table_F__e_a_t
```

The ``Feat`` table is used exclusively by the Graphite shaping engine
to store features and possible settings specified in GDL. Graphite features
determine what rules are applied to transform a glyph stream.

Not to be confused with ``feat``, or the OpenType Layout tables
``GSUB``/``GPOS``.

---
## Feature
```python
from F__e_a_t import Feature
```



---
## __init__
```python
from F__e_a_t import __init__
```



---
## decompile
```python
from F__e_a_t import decompile
```



---
## compile
```python
from F__e_a_t import compile
```



---
## toXML
```python
from F__e_a_t import toXML
```



---
## fromXML
```python
from F__e_a_t import fromXML
```



---
## __name__
```python
from C_O_L_R_ import __name__
```



---
## table_C_O_L_R_
```python
from C_O_L_R_ import table_C_O_L_R_
```

This table is structured so that you can treat it like a dictionary keyed by glyph name.

``ttFont['COLR'][<glyphName>]`` will return the color layers for any glyph.

``ttFont['COLR'][<glyphName>] = <value>`` will set the color layers for any glyph.

---
## LayerRecord
```python
from C_O_L_R_ import LayerRecord
```



---
## _decompileColorLayersV0
```python
from C_O_L_R_ import _decompileColorLayersV0
```



---
## _toOTTable
```python
from C_O_L_R_ import _toOTTable
```



---
## decompile
```python
from C_O_L_R_ import decompile
```



---
## compile
```python
from C_O_L_R_ import compile
```



---
## toXML
```python
from C_O_L_R_ import toXML
```



---
## fromXML
```python
from C_O_L_R_ import fromXML
```



---
## __getitem__
```python
from C_O_L_R_ import __getitem__
```



---
## __setitem__
```python
from C_O_L_R_ import __setitem__
```



---
## __delitem__
```python
from C_O_L_R_ import __delitem__
```



---
## __init__
```python
from C_O_L_R_ import __init__
```



---
## __name__
```python
from G__l_o_c import __name__
```



---
## table_G__l_o_c
```python
from G__l_o_c import table_G__l_o_c
```

Support Graphite Gloc tables

---
## __init__
```python
from G__l_o_c import __init__
```



---
## decompile
```python
from G__l_o_c import decompile
```



---
## compile
```python
from G__l_o_c import compile
```



---
## set
```python
from G__l_o_c import set
```



---
## toXML
```python
from G__l_o_c import toXML
```



---
## fromXML
```python
from G__l_o_c import fromXML
```



---
## __getitem__
```python
from G__l_o_c import __getitem__
```



---
## __len__
```python
from G__l_o_c import __len__
```



---
## __iter__
```python
from G__l_o_c import __iter__
```



---
## __name__
```python
from otTraverse import __name__
```

Methods for traversing trees of otData-driven OpenType tables.

---
## SubTablePath
```python
from otTraverse import SubTablePath
```



---
## dfs_base_table
```python
from otTraverse import dfs_base_table
```

Depth-first search tree of BaseTables.

Args:
    root (BaseTable): the root of the tree.
    root_accessor (Optional[str]): attribute name for the root table, if any (mostly
        useful for debugging).
    skip_root (Optional[bool]): if True, the root itself is not visited, only its
        children.
    predicate (Optional[Callable[[SubTablePath], bool]]): function to filter out
        paths. If True, the path is yielded and its subtables are added to the
        queue. If False, the path is skipped and its subtables are not traversed.
    iter_subtables_fn (Optional[Callable[[BaseTable], Iterable[BaseTable.SubTableEntry]]]):
        function to iterate over subtables of a table. If None, the default
        BaseTable.iterSubTables() is used.

Yields:
    SubTablePath: tuples of BaseTable.SubTableEntry(name, table, index) namedtuples
    for each of the nodes in the tree. The last entry in a path is the current
    subtable, whereas preceding ones refer to its parent tables all the way up to
    the root.

---
## bfs_base_table
```python
from otTraverse import bfs_base_table
```

Breadth-first search tree of BaseTables.

Args:
the root of the tree.
    root_accessor (Optional[str]): attribute name for the root table, if any (mostly
        useful for debugging).
    skip_root (Optional[bool]): if True, the root itself is not visited, only its
        children.
    predicate (Optional[Callable[[SubTablePath], bool]]): function to filter out
        paths. If True, the path is yielded and its subtables are added to the
        queue. If False, the path is skipped and its subtables are not traversed.
    iter_subtables_fn (Optional[Callable[[BaseTable], Iterable[BaseTable.SubTableEntry]]]):
        function to iterate over subtables of a table. If None, the default
        BaseTable.iterSubTables() is used.

Yields:
    SubTablePath: tuples of BaseTable.SubTableEntry(name, table, index) namedtuples
    for each of the nodes in the tree. The last entry in a path is the current
    subtable, whereas preceding ones refer to its parent tables all the way up to
    the root.

---
## _traverse_ot_data
```python
from otTraverse import _traverse_ot_data
```



---
## __str__
```python
from otTraverse import __str__
```



---
## predicate
```python
from otTraverse import predicate
```



---
## iter_subtables_fn
```python
from otTraverse import iter_subtables_fn
```



---
## __name__
```python
from _m_o_r_x import __name__
```



---
## table__m_o_r_x
```python
from _m_o_r_x import table__m_o_r_x
```



---
## __name__
```python
from _l_t_a_g import __name__
```



---
## table__l_t_a_g
```python
from _l_t_a_g import table__l_t_a_g
```



---
## __init__
```python
from _l_t_a_g import __init__
```



---
## addTag
```python
from _l_t_a_g import addTag
```

Add 'tag' to the list of langauge tags if not already there.

Returns the integer index of 'tag' in the list of all tags.

---
## decompile
```python
from _l_t_a_g import decompile
```



---
## compile
```python
from _l_t_a_g import compile
```



---
## toXML
```python
from _l_t_a_g import toXML
```



---
## fromXML
```python
from _l_t_a_g import fromXML
```



---
## __name__
```python
from D_S_I_G_ import __name__
```



---
## table_D_S_I_G_
```python
from D_S_I_G_ import table_D_S_I_G_
```



---
## b64encode
```python
from D_S_I_G_ import b64encode
```



---
## SignatureRecord
```python
from D_S_I_G_ import SignatureRecord
```



---
## decompile
```python
from D_S_I_G_ import decompile
```



---
## compile
```python
from D_S_I_G_ import compile
```



---
## toXML
```python
from D_S_I_G_ import toXML
```



---
## fromXML
```python
from D_S_I_G_ import fromXML
```



---
## __repr__
```python
from D_S_I_G_ import __repr__
```



---
## __name__
```python
from _g_l_y_f import __name__
```

_g_l_y_f.py -- Converter classes for the 'glyf' table.

---
## table__g_l_y_f
```python
from _g_l_y_f import table__g_l_y_f
```

Glyph Data Table

This class represents the `glyf <https://docs.microsoft.com/en-us/typography/opentype/spec/glyf>`_
table, which contains outlines for glyphs in TrueType format. In many cases,
it is easier to access and manipulate glyph outlines through the ``GlyphSet``
object returned from :py:meth:`fontTools.ttLib.ttFont.getGlyphSet`::

                >> from fontTools.pens.boundsPen import BoundsPen
                >> glyphset = font.getGlyphSet()
                >> bp = BoundsPen(glyphset)
                >> glyphset["A"].draw(bp)
                >> bp.bounds
                (19, 0, 633, 716)

However, this class can be used for low-level access to the ``glyf`` table data.
Objects of this class support dictionary-like access, mapping glyph names to
:py:class:`Glyph` objects::

                >> glyf = font["glyf"]
                >> len(glyf["Aacute"].components)
                2

Note that when adding glyphs to the font via low-level access to the ``glyf``
table, the new glyphs must also be added to the ``hmtx``/``vmtx`` table::

                >> font["glyf"]["divisionslash"] = Glyph()
                >> font["hmtx"]["divisionslash"] = (640, 0)

---
## flagBest
```python
from _g_l_y_f import flagBest
```

For a given x,y delta pair, returns the flag that packs this pair
most efficiently, as well as the number of byte cost of such flag.

---
## flagFits
```python
from _g_l_y_f import flagFits
```



---
## flagSupports
```python
from _g_l_y_f import flagSupports
```



---
## flagEncodeCoord
```python
from _g_l_y_f import flagEncodeCoord
```



---
## flagEncodeCoords
```python
from _g_l_y_f import flagEncodeCoords
```



---
## Glyph
```python
from _g_l_y_f import Glyph
```

This class represents an individual TrueType glyph.

TrueType glyph objects come in two flavours: simple and composite. Simple
glyph objects contain contours, represented via the ``.coordinates``,
``.flags``, ``.numberOfContours``, and ``.endPtsOfContours`` attributes;
composite glyphs contain components, available through the ``.components``
attributes.

Because the ``.coordinates`` attribute (and other simple glyph attributes mentioned
above) is only set on simple glyphs and the ``.components`` attribute is only
set on composite glyphs, it is necessary to use the :py:meth:`isComposite`
method to test whether a glyph is simple or composite before attempting to
access its data.

For a composite glyph, the components can also be accessed via array-like access::

        >> assert(font["glyf"]["Aacute"].isComposite())
        >> font["glyf"]["Aacute"][0]
        <fontTools.ttLib.tables._g_l_y_f.GlyphComponent at 0x1027b2ee0>

---
## _is_mid_point
```python
from _g_l_y_f import _is_mid_point
```



---
## dropImpliedOnCurvePoints
```python
from _g_l_y_f import dropImpliedOnCurvePoints
```

Drop impliable on-curve points from the (simple) glyph or glyphs.

In TrueType glyf outlines, on-curve points can be implied when they are located at
the midpoint of the line connecting two consecutive off-curve points.

If more than one glyphs are passed, these are assumed to be interpolatable masters
of the same glyph impliable, and thus only the on-curve points that are impliable
for all of them will actually be implied.
Composite glyphs or empty glyphs are skipped, only simple glyphs with 1 or more
contours are considered.
The input glyph(s) is/are modified in-place.

Args:
    interpolatable_glyphs: The glyph or glyphs to modify in-place.

Returns:
    The set of point indices that were dropped if any.

Raises:
    ValueError if simple glyphs are not in fact interpolatable because they have
    different point flags or number of contours.

Reference:
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM01/Chap1.html

---
## GlyphComponent
```python
from _g_l_y_f import GlyphComponent
```

Represents a component within a composite glyph.

The component is represented internally with four attributes: ``glyphName``,
``x``, ``y`` and ``transform``. If there is no "two-by-two" matrix (i.e
no scaling, reflection, or rotation; only translation), the ``transform``
attribute is not present.

---
## GlyphCoordinates
```python
from _g_l_y_f import GlyphCoordinates
```

A list of glyph coordinates.

Unlike an ordinary list, this is a numpy-like matrix object which supports
matrix addition, scalar multiplication and other operations described below.

---
## decompile
```python
from _g_l_y_f import decompile
```



---
## ensureDecompiled
```python
from _g_l_y_f import ensureDecompiled
```



---
## compile
```python
from _g_l_y_f import compile
```



---
## toXML
```python
from _g_l_y_f import toXML
```



---
## fromXML
```python
from _g_l_y_f import fromXML
```



---
## setGlyphOrder
```python
from _g_l_y_f import setGlyphOrder
```

Sets the glyph order

Args:
        glyphOrder ([str]): List of glyph names in order.

---
## getGlyphName
```python
from _g_l_y_f import getGlyphName
```

Returns the name for the glyph with the given ID.

Raises a ``KeyError`` if the glyph name is not found in the font.

---
## _buildReverseGlyphOrderDict
```python
from _g_l_y_f import _buildReverseGlyphOrderDict
```



---
## getGlyphID
```python
from _g_l_y_f import getGlyphID
```

Returns the ID of the glyph with the given name.

Raises a ``ValueError`` if the glyph is not found in the font.

---
## removeHinting
```python
from _g_l_y_f import removeHinting
```

Removes TrueType hinting instructions from the glyph.

---
## keys
```python
from _g_l_y_f import keys
```



---
## has_key
```python
from _g_l_y_f import has_key
```



---
## get
```python
from _g_l_y_f import get
```



---
## __getitem__
```python
from _g_l_y_f import __getitem__
```

Returns a two element tuple (x,y)

---
## __setitem__
```python
from _g_l_y_f import __setitem__
```

Sets a point's coordinates to a two element tuple (x,y)

---
## __delitem__
```python
from _g_l_y_f import __delitem__
```

Removes a point from the list

---
## __len__
```python
from _g_l_y_f import __len__
```

Returns the number of coordinates in the array.

---
## _getPhantomPoints
```python
from _g_l_y_f import _getPhantomPoints
```

Compute the four "phantom points" for the given glyph from its bounding box
and the horizontal and vertical advance widths and sidebearings stored in the
ttFont's "hmtx" and "vmtx" tables.

'hMetrics' should be ttFont['hmtx'].metrics.

'vMetrics' should be ttFont['vmtx'].metrics if there is "vmtx" or None otherwise.
If there is no vMetrics passed in, vertical phantom points are set to the zero coordinate.

https://docs.microsoft.com/en-us/typography/opentype/spec/tt_instructing_glyphs#phantoms

---
## _getCoordinatesAndControls
```python
from _g_l_y_f import _getCoordinatesAndControls
```

Return glyph coordinates and controls as expected by "gvar" table.

The coordinates includes four "phantom points" for the glyph metrics,
as mandated by the "gvar" spec.

The glyph controls is a namedtuple with the following attributes:
        - numberOfContours: -1 for composite glyphs.
        - endPts: list of indices of end points for each contour in simple
        glyphs, or component indices in composite glyphs (used for IUP
        optimization).
        - flags: array of contour point flags for simple glyphs (None for
        composite glyphs).
        - components: list of base glyph names (str) for each component in
        composite glyphs (None for simple glyphs).

The "hMetrics" and vMetrics are used to compute the "phantom points" (see
the "_getPhantomPoints" method).

Return None if the requested glyphName is not present.

---
## _setCoordinates
```python
from _g_l_y_f import _setCoordinates
```

Set coordinates and metrics for the given glyph.

"coord" is an array of GlyphCoordinates which must include the "phantom
points" as the last four coordinates.

Both the horizontal/vertical advances and left/top sidebearings in "hmtx"
and "vmtx" tables (if any) are updated from four phantom points and
the glyph's bounding boxes.

The "hMetrics" and vMetrics are used to propagate "phantom points"
into "hmtx" and "vmtx" tables if desired.  (see the "_getPhantomPoints"
method).

---
## _synthesizeVMetrics
```python
from _g_l_y_f import _synthesizeVMetrics
```

This method is wrong and deprecated.
For rationale see:
https://github.com/fonttools/fonttools/pull/2266/files#r613569473

---
## getPhantomPoints
```python
from _g_l_y_f import getPhantomPoints
```

Old public name for self._getPhantomPoints().
See: https://github.com/fonttools/fonttools/pull/2266

---
## getCoordinatesAndControls
```python
from _g_l_y_f import getCoordinatesAndControls
```

Old public name for self._getCoordinatesAndControls().
See: https://github.com/fonttools/fonttools/pull/2266

---
## setCoordinates
```python
from _g_l_y_f import setCoordinates
```

Old public name for self._setCoordinates().
See: https://github.com/fonttools/fonttools/pull/2266

---
## __init__
```python
from _g_l_y_f import __init__
```



---
## compact
```python
from _g_l_y_f import compact
```



---
## expand
```python
from _g_l_y_f import expand
```



---
## getCompositeMaxpValues
```python
from _g_l_y_f import getCompositeMaxpValues
```



---
## getMaxpValues
```python
from _g_l_y_f import getMaxpValues
```



---
## decompileComponents
```python
from _g_l_y_f import decompileComponents
```



---
## decompileCoordinates
```python
from _g_l_y_f import decompileCoordinates
```



---
## decompileCoordinatesRaw
```python
from _g_l_y_f import decompileCoordinatesRaw
```



---
## compileComponents
```python
from _g_l_y_f import compileComponents
```



---
## compileCoordinates
```python
from _g_l_y_f import compileCoordinates
```



---
## compileDeltasGreedy
```python
from _g_l_y_f import compileDeltasGreedy
```



---
## compileDeltasOptimal
```python
from _g_l_y_f import compileDeltasOptimal
```



---
## recalcBounds
```python
from _g_l_y_f import recalcBounds
```

Recalculates the bounds of the glyph.

Each glyph object stores its bounding box in the
``xMin``/``yMin``/``xMax``/``yMax`` attributes. These bounds must be
recomputed when the ``coordinates`` change. The ``table__g_l_y_f`` bounds
must be provided to resolve component bounds.

---
## tryRecalcBoundsComposite
```python
from _g_l_y_f import tryRecalcBoundsComposite
```

Try recalculating the bounds of a composite glyph that has
certain constrained properties. Namely, none of the components
have a transform other than an integer translate, and none
uses the anchor points.

Each glyph object stores its bounding box in the
``xMin``/``yMin``/``xMax``/``yMax`` attributes. These bounds must be
recomputed when the ``coordinates`` change. The ``table__g_l_y_f`` bounds
must be provided to resolve component bounds.

Return True if bounds were calculated, False otherwise.

---
## isComposite
```python
from _g_l_y_f import isComposite
```

Test whether a glyph has components

---
## getCoordinates
```python
from _g_l_y_f import getCoordinates
```

Return the coordinates, end points and flags

This method returns three values: A :py:class:`GlyphCoordinates` object,
a list of the indexes of the final points of each contour (allowing you
to split up the coordinates list into contours) and a list of flags.

On simple glyphs, this method returns information from the glyph's own
contours; on composite glyphs, it "flattens" all components recursively
to return a list of coordinates representing all the components involved
in the glyph.

To interpret the flags for each point, see the "Simple Glyph Flags"
section of the `glyf table specification <https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#simple-glyph-description>`.

---
## getComponentNames
```python
from _g_l_y_f import getComponentNames
```

Returns a list of names of component glyphs used in this glyph

This method can be used on simple glyphs (in which case it returns an
empty list) or composite glyphs.

---
## trim
```python
from _g_l_y_f import trim
```

Remove padding and, if requested, hinting, from a glyph.
This works on both expanded and compacted glyphs, without
expanding it.

---
## draw
```python
from _g_l_y_f import draw
```

Draws the glyph using the supplied pen object.

Arguments:
        pen: An object conforming to the pen protocol.
        glyfTable: A :py:class:`table__g_l_y_f` object, to resolve components.
        offset (int): A horizontal offset. If provided, all coordinates are
                translated by this offset.

---
## drawPoints
```python
from _g_l_y_f import drawPoints
```

Draw the glyph using the supplied pointPen. As opposed to Glyph.draw(),
this will not change the point indices.

---
## __eq__
```python
from _g_l_y_f import __eq__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g2 = GlyphCoordinates([(1.0,2)])
>>> g3 = GlyphCoordinates([(1.5,2)])
>>> g == g2
True
>>> g == g3
False
>>> g2 == g3
False

---
## __ne__
```python
from _g_l_y_f import __ne__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g2 = GlyphCoordinates([(1.0,2)])
>>> g3 = GlyphCoordinates([(1.5,2)])
>>> g != g2
False
>>> g != g3
True
>>> g2 != g3
True

---
## getComponentInfo
```python
from _g_l_y_f import getComponentInfo
```

Return information about the component

This method returns a tuple of two values: the glyph name of the component's
base glyph, and a transformation matrix. As opposed to accessing the attributes
directly, ``getComponentInfo`` always returns a six-element tuple of the
component's transformation matrix, even when the two-by-two ``.transform``
matrix is not present.

---
## array
```python
from _g_l_y_f import array
```

Returns the underlying array of coordinates

---
## zeros
```python
from _g_l_y_f import zeros
```

Creates a new ``GlyphCoordinates`` object with all coordinates set to (0,0)

---
## copy
```python
from _g_l_y_f import copy
```

Creates a new ``GlyphCoordinates`` object which is a copy of the current one.

---
## __repr__
```python
from _g_l_y_f import __repr__
```



---
## append
```python
from _g_l_y_f import append
```



---
## extend
```python
from _g_l_y_f import extend
```



---
## toInt
```python
from _g_l_y_f import toInt
```



---
## calcBounds
```python
from _g_l_y_f import calcBounds
```



---
## calcIntBounds
```python
from _g_l_y_f import calcIntBounds
```



---
## relativeToAbsolute
```python
from _g_l_y_f import relativeToAbsolute
```



---
## absoluteToRelative
```python
from _g_l_y_f import absoluteToRelative
```



---
## translate
```python
from _g_l_y_f import translate
```

>>> GlyphCoordinates([(1,2)]).translate((.5,0))

---
## scale
```python
from _g_l_y_f import scale
```

>>> GlyphCoordinates([(1,2)]).scale((.5,0))

---
## transform
```python
from _g_l_y_f import transform
```

>>> GlyphCoordinates([(1,2)]).transform(((.5,0),(.2,.5)))

---
## __pos__
```python
from _g_l_y_f import __pos__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g
GlyphCoordinates([(1, 2)])
>>> g2 = +g
>>> g2
GlyphCoordinates([(1, 2)])
>>> g2.translate((1,0))
>>> g2
GlyphCoordinates([(2, 2)])
>>> g
GlyphCoordinates([(1, 2)])

---
## __neg__
```python
from _g_l_y_f import __neg__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g
GlyphCoordinates([(1, 2)])
>>> g2 = -g
>>> g2
GlyphCoordinates([(-1, -2)])
>>> g
GlyphCoordinates([(1, 2)])

---
## __round__
```python
from _g_l_y_f import __round__
```



---
## __add__
```python
from _g_l_y_f import __add__
```



---
## __sub__
```python
from _g_l_y_f import __sub__
```



---
## __mul__
```python
from _g_l_y_f import __mul__
```



---
## __truediv__
```python
from _g_l_y_f import __truediv__
```



---
## __rsub__
```python
from _g_l_y_f import __rsub__
```



---
## __iadd__
```python
from _g_l_y_f import __iadd__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g += (.5,0)
>>> g
GlyphCoordinates([(1.5, 2)])
>>> g2 = GlyphCoordinates([(3,4)])
>>> g += g2
>>> g
GlyphCoordinates([(4.5, 6)])

---
## __isub__
```python
from _g_l_y_f import __isub__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g -= (.5,0)
>>> g
GlyphCoordinates([(0.5, 2)])
>>> g2 = GlyphCoordinates([(3,4)])
>>> g -= g2
>>> g
GlyphCoordinates([(-2.5, -2)])

---
## __imul__
```python
from _g_l_y_f import __imul__
```

>>> g = GlyphCoordinates([(1,2)])
>>> g *= (2,.5)
>>> g *= 2
>>> g
GlyphCoordinates([(4, 2)])
>>> g = GlyphCoordinates([(1,2)])
>>> g *= 2
>>> g
GlyphCoordinates([(2, 4)])

---
## __itruediv__
```python
from _g_l_y_f import __itruediv__
```

>>> g = GlyphCoordinates([(1,3)])
>>> g /= (.5,1.5)
>>> g /= 2
>>> g
GlyphCoordinates([(1, 1)])

---
## __bool__
```python
from _g_l_y_f import __bool__
```

>>> g = GlyphCoordinates([])
>>> bool(g)
False
>>> g = GlyphCoordinates([(0,0), (0.,0)])
>>> bool(g)
True
>>> g = GlyphCoordinates([(0,0), (1,0)])
>>> bool(g)
True
>>> g = GlyphCoordinates([(0,.5), (0,0)])
>>> bool(g)
True

---
## __name__
```python
from T_S_I_S_ import __name__
```



---
## table_T_S_I_S_
```python
from T_S_I_S_ import table_T_S_I_S_
```



---
## __name__
```python
from T_S_I_D_ import __name__
```



---
## table_T_S_I_D_
```python
from T_S_I_D_ import table_T_S_I_D_
```



---
## __name__
```python
from B_A_S_E_ import __name__
```



---
## table_B_A_S_E_
```python
from B_A_S_E_ import table_B_A_S_E_
```



---
## __name__
```python
from _c_v_t import __name__
```



---
## table__c_v_t
```python
from _c_v_t import table__c_v_t
```



---
## decompile
```python
from _c_v_t import decompile
```



---
## compile
```python
from _c_v_t import compile
```



---
## toXML
```python
from _c_v_t import toXML
```



---
## fromXML
```python
from _c_v_t import fromXML
```



---
## __len__
```python
from _c_v_t import __len__
```



---
## __getitem__
```python
from _c_v_t import __getitem__
```



---
## __setitem__
```python
from _c_v_t import __setitem__
```



---
## __delitem__
```python
from _c_v_t import __delitem__
```



---
## __name__
```python
from J_S_T_F_ import __name__
```



---
## table_J_S_T_F_
```python
from J_S_T_F_ import table_J_S_T_F_
```



---
## __name__
```python
from V_D_M_X_ import __name__
```



---
## table_V_D_M_X_
```python
from V_D_M_X_ import table_V_D_M_X_
```



---
## decompile
```python
from V_D_M_X_ import decompile
```



---
## _getOffsets
```python
from V_D_M_X_ import _getOffsets
```

Calculate offsets to VDMX_Group records.
For each ratRange return a list of offset values from the beginning of
the VDMX table to a VDMX_Group.

---
## compile
```python
from V_D_M_X_ import compile
```



---
## toXML
```python
from V_D_M_X_ import toXML
```



---
## fromXML
```python
from V_D_M_X_ import fromXML
```



---
## __name__
```python
from _a_v_a_r import __name__
```



---
## table__a_v_a_r
```python
from _a_v_a_r import table__a_v_a_r
```

Axis Variations Table

This class represents the ``avar`` table of a variable font. The object has one
substantive attribute, ``segments``, which maps axis tags to a segments dictionary::

    >>> font["avar"].segments   # doctest: +SKIP
    {'wght': {-1.0: -1.0,
      0.0: 0.0,
      0.125: 0.11444091796875,
      0.25: 0.23492431640625,
      0.5: 0.35540771484375,
      0.625: 0.5,
      0.75: 0.6566162109375,
      0.875: 0.81927490234375,
      1.0: 1.0},
     'ital': {-1.0: -1.0, 0.0: 0.0, 1.0: 1.0}}

Notice that the segments dictionary is made up of normalized values. A valid
``avar`` segment mapping must contain the entries ``-1.0: -1.0, 0.0: 0.0, 1.0: 1.0``.
fontTools does not enforce this, so it is your responsibility to ensure that
mappings are valid.

---
## __init__
```python
from _a_v_a_r import __init__
```



---
## compile
```python
from _a_v_a_r import compile
```



---
## decompile
```python
from _a_v_a_r import decompile
```



---
## toXML
```python
from _a_v_a_r import toXML
```



---
## fromXML
```python
from _a_v_a_r import fromXML
```



---
## renormalizeLocation
```python
from _a_v_a_r import renormalizeLocation
```



---
## __name__
```python
from C_B_L_C_ import __name__
```



---
## table_C_B_L_C_
```python
from C_B_L_C_ import table_C_B_L_C_
```



---
## __name__
```python
from T_S_I_P_ import __name__
```



---
## table_T_S_I_P_
```python
from T_S_I_P_ import table_T_S_I_P_
```



---
## __name__
```python
from _m_a_x_p import __name__
```



---
## table__m_a_x_p
```python
from _m_a_x_p import table__m_a_x_p
```



---
## decompile
```python
from _m_a_x_p import decompile
```



---
## compile
```python
from _m_a_x_p import compile
```



---
## recalc
```python
from _m_a_x_p import recalc
```

Recalculate the font bounding box, and most other maxp values except
for the TT instructions values. Also recalculate the value of bit 1
of the flags field and the font bounding box of the 'head' table.

---
## testrepr
```python
from _m_a_x_p import testrepr
```



---
## toXML
```python
from _m_a_x_p import toXML
```



---
## fromXML
```python
from _m_a_x_p import fromXML
```



---
## __name__
```python
from M_A_T_H_ import __name__
```



---
## table_M_A_T_H_
```python
from M_A_T_H_ import table_M_A_T_H_
```



---
## __name__
```python
from _n_a_m_e import __name__
```



---
## table__n_a_m_e
```python
from _n_a_m_e import table__n_a_m_e
```



---
## makeName
```python
from _n_a_m_e import makeName
```



---
## _makeWindowsName
```python
from _n_a_m_e import _makeWindowsName
```

Create a NameRecord for the Microsoft Windows platform

'language' is an arbitrary IETF BCP 47 language identifier such
as 'en', 'de-CH', 'de-AT-1901', or 'fa-Latn'. If Microsoft Windows
does not support the desired language, the result will be None.
Future versions of fonttools might return a NameRecord for the
OpenType 'name' table format 1, but this is not implemented yet.

---
## _makeMacName
```python
from _n_a_m_e import _makeMacName
```

Create a NameRecord for Apple platforms

'language' is an arbitrary IETF BCP 47 language identifier such
as 'en', 'de-CH', 'de-AT-1901', or 'fa-Latn'. When possible, we
create a Macintosh NameRecord that is understood by old applications
(platform ID 1 and an old-style Macintosh language enum). If this
is not possible, we create a Unicode NameRecord (platform ID 0)
whose language points to the font’s 'ltag' table. The latter
can encode any string in any language, but legacy applications
might not recognize the format (in which case they will ignore
those names).

'font' should be the TTFont for which you want to create a name.
If 'font' is None, we only return NameRecords for legacy Macintosh;
in that case, the result will be None for names that need to
be encoded with an 'ltag' table.

See the section “The language identifier” in Apple’s specification:
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html

---
## NameRecord
```python
from _n_a_m_e import NameRecord
```



---
## NameRecordVisitor
```python
from _n_a_m_e import NameRecordVisitor
```



---
## visit
```python
from _n_a_m_e import visit
```



---
## decompile
```python
from _n_a_m_e import decompile
```



---
## compile
```python
from _n_a_m_e import compile
```



---
## toXML
```python
from _n_a_m_e import toXML
```



---
## fromXML
```python
from _n_a_m_e import fromXML
```



---
## getName
```python
from _n_a_m_e import getName
```



---
## getDebugName
```python
from _n_a_m_e import getDebugName
```



---
## getFirstDebugName
```python
from _n_a_m_e import getFirstDebugName
```



---
## getBestFamilyName
```python
from _n_a_m_e import getBestFamilyName
```



---
## getBestSubFamilyName
```python
from _n_a_m_e import getBestSubFamilyName
```



---
## getBestFullName
```python
from _n_a_m_e import getBestFullName
```



---
## setName
```python
from _n_a_m_e import setName
```

Set the 'string' for the name record identified by 'nameID', 'platformID',
'platEncID' and 'langID'. If a record with that nameID doesn't exist, create it
and append to the name table.

'string' can be of type `str` (`unicode` in PY2) or `bytes`. In the latter case,
it is assumed to be already encoded with the correct plaform-specific encoding
identified by the (platformID, platEncID, langID) triplet. A warning is issued
to prevent unexpected results.

---
## removeNames
```python
from _n_a_m_e import removeNames
```

Remove any name records identified by the given combination of 'nameID',
'platformID', 'platEncID' and 'langID'.

---
## removeUnusedNames
```python
from _n_a_m_e import removeUnusedNames
```

Remove any name records which are not in NameID range 0-255 and not utilized
within the font itself.

---
## _findUnusedNameID
```python
from _n_a_m_e import _findUnusedNameID
```

Finds an unused name id.

The nameID is assigned in the range between 'minNameID' and 32767 (inclusive),
following the last nameID in the name table.

---
## findMultilingualName
```python
from _n_a_m_e import findMultilingualName
```

Return the name ID of an existing multilingual name that
matches the 'names' dictionary, or None if not found.

'names' is a dictionary with the name in multiple languages,
such as {'en': 'Pale', 'de': 'Blaß', 'de-CH': 'Blass'}.
The keys can be arbitrary IETF BCP 47 language codes;
the values are Unicode strings.

If 'windows' is True, the returned name ID is guaranteed
exist for all requested languages for platformID=3 and
platEncID=1.
If 'mac' is True, the returned name ID is guaranteed to exist
for all requested languages for platformID=1 and platEncID=0.

The returned name ID will not be less than the 'minNameID'
argument.

---
## addMultilingualName
```python
from _n_a_m_e import addMultilingualName
```

Add a multilingual name, returning its name ID

'names' is a dictionary with the name in multiple languages,
such as {'en': 'Pale', 'de': 'Blaß', 'de-CH': 'Blass'}.
The keys can be arbitrary IETF BCP 47 language codes;
the values are Unicode strings.

'ttFont' is the TTFont to which the names are added, or None.
If present, the font's 'ltag' table can get populated
to store exotic language codes, which allows encoding
names that otherwise cannot get encoded at all.

'nameID' is the name ID to be used, or None to let the library
find an existing set of name records that match, or pick an
unused name ID.

If 'windows' is True, a platformID=3 name record will be added.
If 'mac' is True, a platformID=1 name record will be added.

If the 'nameID' argument is None, the created nameID will not
be less than the 'minNameID' argument.

---
## addName
```python
from _n_a_m_e import addName
```

Add a new name record containing 'string' for each (platformID, platEncID,
langID) tuple specified in the 'platforms' list.

The nameID is assigned in the range between 'minNameID'+1 and 32767 (inclusive),
following the last nameID in the name table.
If no 'platforms' are specified, two English name records are added, one for the
Macintosh (platformID=0), and one for the Windows platform (3).

The 'string' must be a Unicode string, so it can be encoded with different,
platform-specific encodings.

Return the new nameID.

---
## getEncoding
```python
from _n_a_m_e import getEncoding
```

Returns the Python encoding name for this name entry based on its platformID,
platEncID, and langID.  If encoding for these values is not known, by default
'ascii' is returned.  That can be overriden by passing a value to the default
argument.

---
## encodingIsUnicodeCompatible
```python
from _n_a_m_e import encodingIsUnicodeCompatible
```



---
## __str__
```python
from _n_a_m_e import __str__
```



---
## isUnicode
```python
from _n_a_m_e import isUnicode
```



---
## toUnicode
```python
from _n_a_m_e import toUnicode
```

If self.string is a Unicode string, return it; otherwise try decoding the
bytes in self.string to a Unicode string using the encoding of this
entry as returned by self.getEncoding(); Note that  self.getEncoding()
returns 'ascii' if the encoding is unknown to the library.

Certain heuristics are performed to recover data from bytes that are
ill-formed in the chosen encoding, or that otherwise look misencoded
(mostly around bad UTF-16BE encoded bytes, or bytes that look like UTF-16BE
but marked otherwise).  If the bytes are ill-formed and the heuristics fail,
the error is handled according to the errors parameter to this function, which is
passed to the underlying decode() function; by default it throws a
UnicodeDecodeError exception.

Note: The mentioned heuristics mean that roundtripping a font to XML and back
to binary might recover some misencoded data whereas just loading the font
and saving it back will not change them.

---
## toBytes
```python
from _n_a_m_e import toBytes
```

If self.string is a bytes object, return it; otherwise try encoding
the Unicode string in self.string to bytes using the encoding of this
entry as returned by self.getEncoding(); Note that self.getEncoding()
returns 'ascii' if the encoding is unknown to the library.

If the Unicode string cannot be encoded to bytes in the chosen encoding,
the error is handled according to the errors parameter to this function,
which is passed to the underlying encode() function; by default it throws a
UnicodeEncodeError exception.

---
## __lt__
```python
from _n_a_m_e import __lt__
```



---
## __repr__
```python
from _n_a_m_e import __repr__
```



---
## __init__
```python
from _n_a_m_e import __init__
```



---
## isascii
```python
from _n_a_m_e import isascii
```



---
## __name__
```python
from M_E_T_A_ import __name__
```



---
## getLabelString
```python
from M_E_T_A_ import getLabelString
```



---
## table_M_E_T_A_
```python
from M_E_T_A_ import table_M_E_T_A_
```



---
## GlyphRecord
```python
from M_E_T_A_ import GlyphRecord
```



---
## mapXMLToUTF8
```python
from M_E_T_A_ import mapXMLToUTF8
```



---
## mapUTF8toXML
```python
from M_E_T_A_ import mapUTF8toXML
```



---
## StringRecord
```python
from M_E_T_A_ import StringRecord
```



---
## decompile
```python
from M_E_T_A_ import decompile
```



---
## compile
```python
from M_E_T_A_ import compile
```



---
## toXML
```python
from M_E_T_A_ import toXML
```



---
## fromXML
```python
from M_E_T_A_ import fromXML
```



---
## __init__
```python
from M_E_T_A_ import __init__
```



---
## __repr__
```python
from M_E_T_A_ import __repr__
```



---
## __name__
```python
from _h_h_e_a import __name__
```



---
## table__h_h_e_a
```python
from _h_h_e_a import table__h_h_e_a
```



---
## ascender
```python
from _h_h_e_a import ascender
```



---
## descender
```python
from _h_h_e_a import descender
```



---
## decompile
```python
from _h_h_e_a import decompile
```



---
## compile
```python
from _h_h_e_a import compile
```



---
## recalc
```python
from _h_h_e_a import recalc
```



---
## toXML
```python
from _h_h_e_a import toXML
```



---
## fromXML
```python
from _h_h_e_a import fromXML
```



---
## __name__
```python
from S_T_A_T_ import __name__
```



---
## table_S_T_A_T_
```python
from S_T_A_T_ import table_S_T_A_T_
```



---
## __name__
```python
from T_T_F_A_ import __name__
```



---
## table_T_T_F_A_
```python
from T_T_F_A_ import table_T_T_F_A_
```



---
## __name__
```python
from T_S_I_B_ import __name__
```



---
## table_T_S_I_B_
```python
from T_S_I_B_ import table_T_S_I_B_
```



---
## __name__
```python
from _v_h_e_a import __name__
```



---
## table__v_h_e_a
```python
from _v_h_e_a import table__v_h_e_a
```



---
## decompile
```python
from _v_h_e_a import decompile
```



---
## compile
```python
from _v_h_e_a import compile
```



---
## recalc
```python
from _v_h_e_a import recalc
```



---
## toXML
```python
from _v_h_e_a import toXML
```



---
## fromXML
```python
from _v_h_e_a import fromXML
```



---
## reserved0
```python
from _v_h_e_a import reserved0
```



---
## __name__
```python
from S_V_G_ import __name__
```

Compiles/decompiles SVG table.

https://docs.microsoft.com/en-us/typography/opentype/spec/svg

The XML format is:

.. code-block:: xml

        <SVG>
                <svgDoc endGlyphID="1" startGlyphID="1">
                        <![CDATA[ <complete SVG doc> ]]
                </svgDoc>
        ...
                <svgDoc endGlyphID="n" startGlyphID="m">
                        <![CDATA[ <complete SVG doc> ]]
                </svgDoc>
        </SVG>

---
## table_S_V_G_
```python
from S_V_G_ import table_S_V_G_
```



---
## DocumentIndexEntry
```python
from S_V_G_ import DocumentIndexEntry
```



---
## SVGDocument
```python
from S_V_G_ import SVGDocument
```



---
## decompile
```python
from S_V_G_ import decompile
```



---
## compile
```python
from S_V_G_ import compile
```



---
## toXML
```python
from S_V_G_ import toXML
```



---
## fromXML
```python
from S_V_G_ import fromXML
```



---
## __init__
```python
from S_V_G_ import __init__
```



---
## __repr__
```python
from S_V_G_ import __repr__
```



---
## __getitem__
```python
from S_V_G_ import __getitem__
```



---
## __len__
```python
from S_V_G_ import __len__
```



---
## __name__
```python
from L_T_S_H_ import __name__
```



---
## table_L_T_S_H_
```python
from L_T_S_H_ import table_L_T_S_H_
```



---
## decompile
```python
from L_T_S_H_ import decompile
```



---
## compile
```python
from L_T_S_H_ import compile
```



---
## toXML
```python
from L_T_S_H_ import toXML
```



---
## fromXML
```python
from L_T_S_H_ import fromXML
```



---
## __name__
```python
from sbixStrike import __name__
```



---
## Strike
```python
from sbixStrike import Strike
```



---
## __init__
```python
from sbixStrike import __init__
```



---
## decompile
```python
from sbixStrike import decompile
```



---
## compile
```python
from sbixStrike import compile
```



---
## toXML
```python
from sbixStrike import toXML
```



---
## fromXML
```python
from sbixStrike import fromXML
```



---
## __name__
```python
from E_B_L_C_ import __name__
```



---
## table_E_B_L_C_
```python
from E_B_L_C_ import table_E_B_L_C_
```



---
## Strike
```python
from E_B_L_C_ import Strike
```



---
## BitmapSizeTable
```python
from E_B_L_C_ import BitmapSizeTable
```



---
## SbitLineMetrics
```python
from E_B_L_C_ import SbitLineMetrics
```



---
## EblcIndexSubTable
```python
from E_B_L_C_ import EblcIndexSubTable
```



---
## _createOffsetArrayIndexSubTableMixin
```python
from E_B_L_C_ import _createOffsetArrayIndexSubTableMixin
```



---
## FixedSizeIndexSubTableMixin
```python
from E_B_L_C_ import FixedSizeIndexSubTableMixin
```



---
## eblc_index_sub_table_1
```python
from E_B_L_C_ import eblc_index_sub_table_1
```



---
## eblc_index_sub_table_2
```python
from E_B_L_C_ import eblc_index_sub_table_2
```



---
## eblc_index_sub_table_3
```python
from E_B_L_C_ import eblc_index_sub_table_3
```



---
## eblc_index_sub_table_4
```python
from E_B_L_C_ import eblc_index_sub_table_4
```



---
## eblc_index_sub_table_5
```python
from E_B_L_C_ import eblc_index_sub_table_5
```



---
## getIndexFormatClass
```python
from E_B_L_C_ import getIndexFormatClass
```



---
## decompile
```python
from E_B_L_C_ import decompile
```



---
## compile
```python
from E_B_L_C_ import compile
```



---
## toXML
```python
from E_B_L_C_ import toXML
```



---
## fromXML
```python
from E_B_L_C_ import fromXML
```



---
## __init__
```python
from E_B_L_C_ import __init__
```



---
## _getXMLMetricNames
```python
from E_B_L_C_ import _getXMLMetricNames
```



---
## __getattr__
```python
from E_B_L_C_ import __getattr__
```



---
## ensureDecompiled
```python
from E_B_L_C_ import ensureDecompiled
```



---
## writeMetrics
```python
from E_B_L_C_ import writeMetrics
```



---
## readMetrics
```python
from E_B_L_C_ import readMetrics
```



---
## padBitmapData
```python
from E_B_L_C_ import padBitmapData
```



---
## removeSkipGlyphs
```python
from E_B_L_C_ import removeSkipGlyphs
```



---
## OffsetArrayIndexSubTableMixin
```python
from E_B_L_C_ import OffsetArrayIndexSubTableMixin
```



---
## isValidLocation
```python
from E_B_L_C_ import isValidLocation
```



---
## __name__
```python
from _g_c_i_d import __name__
```



---
## table__g_c_i_d
```python
from _g_c_i_d import table__g_c_i_d
```



---
## __name__
```python
from T_S_I_C_ import __name__
```



---
## table_T_S_I_C_
```python
from T_S_I_C_ import table_T_S_I_C_
```



---
## __name__
```python
from T_S_I_V_ import __name__
```



---
## table_T_S_I_V_
```python
from T_S_I_V_ import table_T_S_I_V_
```



---
## toXML
```python
from T_S_I_V_ import toXML
```



---
## fromXML
```python
from T_S_I_V_ import fromXML
```



---
## __name__
```python
from _h_e_a_d import __name__
```



---
## table__h_e_a_d
```python
from _h_e_a_d import table__h_e_a_d
```



---
## decompile
```python
from _h_e_a_d import decompile
```



---
## compile
```python
from _h_e_a_d import compile
```



---
## toXML
```python
from _h_e_a_d import toXML
```



---
## fromXML
```python
from _h_e_a_d import fromXML
```



---
## __name__
```python
from _o_p_b_d import __name__
```



---
## table__o_p_b_d
```python
from _o_p_b_d import table__o_p_b_d
```



---
## __name__
```python
from V_A_R_C_ import __name__
```



---
## table_V_A_R_C_
```python
from V_A_R_C_ import table_V_A_R_C_
```



---
## __name__
```python
from _h_m_t_x import __name__
```



---
## table__h_m_t_x
```python
from _h_m_t_x import table__h_m_t_x
```



---
## decompile
```python
from _h_m_t_x import decompile
```



---
## compile
```python
from _h_m_t_x import compile
```



---
## toXML
```python
from _h_m_t_x import toXML
```



---
## fromXML
```python
from _h_m_t_x import fromXML
```



---
## __delitem__
```python
from _h_m_t_x import __delitem__
```



---
## __getitem__
```python
from _h_m_t_x import __getitem__
```



---
## __setitem__
```python
from _h_m_t_x import __setitem__
```



---
## __name__
```python
from _a_n_k_r import __name__
```



---
## table__a_n_k_r
```python
from _a_n_k_r import table__a_n_k_r
```

The anchor point table provides a way to define anchor points.
These are points within the coordinate space of a given glyph,
independent of the control points used to render the glyph.
Anchor points are used in conjunction with the 'kerx' table.

See also https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ankr.html

---
## __name__
```python
from otData import __name__
```



---
## __name__
```python
from G__l_a_t import __name__
```



---
## _Object
```python
from G__l_a_t import _Object
```



---
## _Dict
```python
from G__l_a_t import _Dict
```



---
## table_G__l_a_t
```python
from G__l_a_t import table_G__l_a_t
```

Support Graphite Glat tables

---
## __init__
```python
from G__l_a_t import __init__
```



---
## decompile
```python
from G__l_a_t import decompile
```



---
## decompileAttributes12
```python
from G__l_a_t import decompileAttributes12
```



---
## decompileAttributes3
```python
from G__l_a_t import decompileAttributes3
```



---
## compile
```python
from G__l_a_t import compile
```



---
## compileAttributes12
```python
from G__l_a_t import compileAttributes12
```



---
## compileAttributes3
```python
from G__l_a_t import compileAttributes3
```



---
## toXML
```python
from G__l_a_t import toXML
```



---
## fromXML
```python
from G__l_a_t import fromXML
```



---
## __name__
```python
from T_S_I__2 import __name__
```

TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI2 is the index table containing the lengths and offsets for the glyph
programs that are contained in the TSI3 table. It uses the same format as
the TSI0 table.

---
## table_T_S_I__2
```python
from T_S_I__2 import table_T_S_I__2
```



---
## __name__
```python
from asciiTable import __name__
```



---
## asciiTable
```python
from asciiTable import asciiTable
```



---
## toXML
```python
from asciiTable import toXML
```



---
## fromXML
```python
from asciiTable import fromXML
```



---
## __name__
```python
from G_P_O_S_ import __name__
```



---
## table_G_P_O_S_
```python
from G_P_O_S_ import table_G_P_O_S_
```



---
## __name__
```python
from O_S_2f_2 import __name__
```



---
## Panose
```python
from O_S_2f_2 import Panose
```



---
## table_O_S_2f_2
```python
from O_S_2f_2 import table_O_S_2f_2
```

the OS/2 table

---
## _getUnicodeRanges
```python
from O_S_2f_2 import _getUnicodeRanges
```



---
## intersectUnicodeRanges
```python
from O_S_2f_2 import intersectUnicodeRanges
```

Intersect a sequence of (int) Unicode codepoints with the Unicode block
ranges defined in the OpenType specification v1.7, and return the set of
'ulUnicodeRanges' bits for which there is at least ONE intersection.
If 'inverse' is True, return the the bits for which there is NO intersection.

>>> intersectUnicodeRanges([0x0410]) == {9}
True
>>> intersectUnicodeRanges([0x0410, 0x1F000]) == {9, 57, 122}
True
>>> intersectUnicodeRanges([0x0410, 0x1F000], inverse=True) == (
...     set(range(len(OS2_UNICODE_RANGES))) - {9, 57, 122})
True

---
## calcCodePageRanges
```python
from O_S_2f_2 import calcCodePageRanges
```

Given a set of Unicode codepoints (integers), calculate the
corresponding OS/2 CodePage range bits.
This is a direct translation of FontForge implementation:
https://github.com/fontforge/fontforge/blob/7b2c074/fontforge/tottf.c#L3158

---
## __init__
```python
from O_S_2f_2 import __init__
```



---
## toXML
```python
from O_S_2f_2 import toXML
```



---
## fromXML
```python
from O_S_2f_2 import fromXML
```



---
## decompile
```python
from O_S_2f_2 import decompile
```



---
## compile
```python
from O_S_2f_2 import compile
```



---
## updateFirstAndLastCharIndex
```python
from O_S_2f_2 import updateFirstAndLastCharIndex
```



---
## usMaxContex
```python
from O_S_2f_2 import usMaxContex
```



---
## fsFirstCharIndex
```python
from O_S_2f_2 import fsFirstCharIndex
```



---
## fsLastCharIndex
```python
from O_S_2f_2 import fsLastCharIndex
```



---
## getUnicodeRanges
```python
from O_S_2f_2 import getUnicodeRanges
```

Return the set of 'ulUnicodeRange*' bits currently enabled.

---
## setUnicodeRanges
```python
from O_S_2f_2 import setUnicodeRanges
```

Set the 'ulUnicodeRange*' fields to the specified 'bits'.

---
## recalcUnicodeRanges
```python
from O_S_2f_2 import recalcUnicodeRanges
```

Intersect the codepoints in the font's Unicode cmap subtables with
the Unicode block ranges defined in the OpenType specification (v1.7),
and set the respective 'ulUnicodeRange*' bits if there is at least ONE
intersection.
If 'pruneOnly' is True, only clear unused bits with NO intersection.

---
## getCodePageRanges
```python
from O_S_2f_2 import getCodePageRanges
```

Return the set of 'ulCodePageRange*' bits currently enabled.

---
## setCodePageRanges
```python
from O_S_2f_2 import setCodePageRanges
```

Set the 'ulCodePageRange*' fields to the specified 'bits'.

---
## recalcCodePageRanges
```python
from O_S_2f_2 import recalcCodePageRanges
```



---
## recalcAvgCharWidth
```python
from O_S_2f_2 import recalcAvgCharWidth
```

Recalculate xAvgCharWidth using metrics from ttFont's 'hmtx' table.

Set it to 0 if the unlikely event 'hmtx' table is not found.

---
## __name__
```python
from BitmapGlyphMetrics import __name__
```



---
## BitmapGlyphMetrics
```python
from BitmapGlyphMetrics import BitmapGlyphMetrics
```



---
## BigGlyphMetrics
```python
from BitmapGlyphMetrics import BigGlyphMetrics
```



---
## SmallGlyphMetrics
```python
from BitmapGlyphMetrics import SmallGlyphMetrics
```



---
## toXML
```python
from BitmapGlyphMetrics import toXML
```



---
## fromXML
```python
from BitmapGlyphMetrics import fromXML
```



---
## __name__
```python
from otBase import __name__
```



---
## OverflowErrorRecord
```python
from otBase import OverflowErrorRecord
```



---
## OTLOffsetOverflowError
```python
from otBase import OTLOffsetOverflowError
```



---
## RepackerState
```python
from otBase import RepackerState
```



---
## BaseTTXConverter
```python
from otBase import BaseTTXConverter
```

Generic base class for TTX table converters. It functions as an
adapter between the TTX (ttLib actually) table model and the model
we use for OpenType tables, which is necessarily subtly different.

---
## OTTableReader
```python
from otBase import OTTableReader
```

Helper class to retrieve data from an OpenType table.

---
## OffsetToWriter
```python
from otBase import OffsetToWriter
```



---
## OTTableWriter
```python
from otBase import OTTableWriter
```

Helper class to gather and assemble data for OpenType tables.

---
## CountReference
```python
from otBase import CountReference
```

A reference to a Count value, not a count of references.

---
## packUInt8
```python
from otBase import packUInt8
```



---
## packUShort
```python
from otBase import packUShort
```



---
## packULong
```python
from otBase import packULong
```



---
## packUInt24
```python
from otBase import packUInt24
```



---
## BaseTable
```python
from otBase import BaseTable
```

Generic base class for all OpenType (sub)tables.

---
## FormatSwitchingBaseTable
```python
from otBase import FormatSwitchingBaseTable
```

Minor specialization of BaseTable, for tables that have multiple
formats, eg. CoverageFormat1 vs. CoverageFormat2.

---
## UInt8FormatSwitchingBaseTable
```python
from otBase import UInt8FormatSwitchingBaseTable
```



---
## getFormatSwitchingBaseTableClass
```python
from otBase import getFormatSwitchingBaseTableClass
```



---
## getVariableAttrs
```python
from otBase import getVariableAttrs
```



---
## _buildDict
```python
from otBase import _buildDict
```



---
## ValueRecordFactory
```python
from otBase import ValueRecordFactory
```

Given a format code, this object convert ValueRecords.

---
## ValueRecord
```python
from otBase import ValueRecord
```



---
## __init__
```python
from otBase import __init__
```



---
## __repr__
```python
from otBase import __repr__
```



---
## __str__
```python
from otBase import __str__
```



---
## decompile
```python
from otBase import decompile
```



---
## compile
```python
from otBase import compile
```



---
## tryPackingHarfbuzz
```python
from otBase import tryPackingHarfbuzz
```



---
## tryPackingFontTools
```python
from otBase import tryPackingFontTools
```



---
## tryResolveOverflow
```python
from otBase import tryResolveOverflow
```



---
## toXML
```python
from otBase import toXML
```



---
## fromXML
```python
from otBase import fromXML
```



---
## ensureDecompiled
```python
from otBase import ensureDecompiled
```



---
## advance
```python
from otBase import advance
```



---
## seek
```python
from otBase import seek
```



---
## copy
```python
from otBase import copy
```



---
## getSubReader
```python
from otBase import getSubReader
```



---
## readValue
```python
from otBase import readValue
```



---
## readArray
```python
from otBase import readArray
```



---
## readInt8
```python
from otBase import readInt8
```



---
## readInt8Array
```python
from otBase import readInt8Array
```



---
## readShort
```python
from otBase import readShort
```



---
## readShortArray
```python
from otBase import readShortArray
```



---
## readLong
```python
from otBase import readLong
```



---
## readLongArray
```python
from otBase import readLongArray
```



---
## readUInt8
```python
from otBase import readUInt8
```



---
## readUInt8Array
```python
from otBase import readUInt8Array
```



---
## readUShort
```python
from otBase import readUShort
```



---
## readUShortArray
```python
from otBase import readUShortArray
```



---
## readULong
```python
from otBase import readULong
```



---
## readULongArray
```python
from otBase import readULongArray
```



---
## readUInt24
```python
from otBase import readUInt24
```



---
## readUInt24Array
```python
from otBase import readUInt24Array
```



---
## readTag
```python
from otBase import readTag
```



---
## readData
```python
from otBase import readData
```



---
## __setitem__
```python
from otBase import __setitem__
```



---
## __getitem__
```python
from otBase import __getitem__
```



---
## __contains__
```python
from otBase import __contains__
```



---
## __eq__
```python
from otBase import __eq__
```



---
## __hash__
```python
from otBase import __hash__
```



---
## __delitem__
```python
from otBase import __delitem__
```



---
## getDataLength
```python
from otBase import getDataLength
```

Return the length of this table in bytes, without subtables.

---
## getData
```python
from otBase import getData
```

Assemble the data for this writer/table, without subtables.

---
## getDataForHarfbuzz
```python
from otBase import getDataForHarfbuzz
```

Assemble the data for this writer/table with all offset field set to 0

---
## __ne__
```python
from otBase import __ne__
```



---
## _doneWriting
```python
from otBase import _doneWriting
```



---
## _gatherTables
```python
from otBase import _gatherTables
```



---
## _gatherGraphForHarfbuzz
```python
from otBase import _gatherGraphForHarfbuzz
```



---
## getAllDataUsingHarfbuzz
```python
from otBase import getAllDataUsingHarfbuzz
```

The Whole table is represented as a Graph.
Assemble graph data and call Harfbuzz repacker to pack the table.
Harfbuzz repacker is faster and retain as much sub-table sharing as possible, see also:
https://github.com/harfbuzz/harfbuzz/blob/main/docs/repacker.md
The input format for hb.repack() method is explained here:
https://github.com/harfbuzz/uharfbuzz/blob/main/src/uharfbuzz/_harfbuzz.pyx#L1149

---
## getAllData
```python
from otBase import getAllData
```

Assemble all data, including all subtables.

---
## getSubWriter
```python
from otBase import getSubWriter
```



---
## writeValue
```python
from otBase import writeValue
```



---
## writeArray
```python
from otBase import writeArray
```



---
## writeInt8
```python
from otBase import writeInt8
```



---
## writeInt8Array
```python
from otBase import writeInt8Array
```



---
## writeShort
```python
from otBase import writeShort
```



---
## writeShortArray
```python
from otBase import writeShortArray
```



---
## writeLong
```python
from otBase import writeLong
```



---
## writeLongArray
```python
from otBase import writeLongArray
```



---
## writeUInt8
```python
from otBase import writeUInt8
```



---
## writeUInt8Array
```python
from otBase import writeUInt8Array
```



---
## writeUShort
```python
from otBase import writeUShort
```



---
## writeUShortArray
```python
from otBase import writeUShortArray
```



---
## writeULong
```python
from otBase import writeULong
```



---
## writeULongArray
```python
from otBase import writeULongArray
```



---
## writeUInt24
```python
from otBase import writeUInt24
```



---
## writeUInt24Array
```python
from otBase import writeUInt24Array
```



---
## writeTag
```python
from otBase import writeTag
```



---
## writeSubTable
```python
from otBase import writeSubTable
```



---
## writeCountReference
```python
from otBase import writeCountReference
```



---
## writeStruct
```python
from otBase import writeStruct
```



---
## writeData
```python
from otBase import writeData
```



---
## getOverflowErrorRecord
```python
from otBase import getOverflowErrorRecord
```



---
## setValue
```python
from otBase import setValue
```



---
## getValue
```python
from otBase import getValue
```



---
## getCountData
```python
from otBase import getCountData
```



---
## __getattr__
```python
from otBase import __getattr__
```



---
## __getstate__
```python
from otBase import __getstate__
```



---
## getRecordSize
```python
from otBase import getRecordSize
```



---
## getConverters
```python
from otBase import getConverters
```



---
## getConverterByName
```python
from otBase import getConverterByName
```



---
## populateDefaults
```python
from otBase import populateDefaults
```



---
## readFormat
```python
from otBase import readFormat
```



---
## writeFormat
```python
from otBase import writeFormat
```



---
## toXML2
```python
from otBase import toXML2
```



---
## SubTableEntry
```python
from otBase import SubTableEntry
```

See BaseTable.iterSubTables()

---
## iterSubTables
```python
from otBase import iterSubTables
```

Yield (name, value, index) namedtuples for all subtables of current table.

A sub-table is an instance of BaseTable (or subclass thereof) that is a child
of self, the current parent table.
The tuples also contain the attribute name (str) of the of parent table to get
a subtable, and optionally, for lists of subtables (i.e. attributes associated
with a converter that has a 'repeat'), an index into the list containing the
given subtable value.
This method can be useful to traverse trees of otTables.

---
## __len__
```python
from otBase import __len__
```



---
## readValueRecord
```python
from otBase import readValueRecord
```



---
## writeValueRecord
```python
from otBase import writeValueRecord
```



---
## getFormat
```python
from otBase import getFormat
```



---
## getEffectiveFormat
```python
from otBase import getEffectiveFormat
```



---
## __name__
```python
from _l_o_c_a import __name__
```



---
## table__l_o_c_a
```python
from _l_o_c_a import table__l_o_c_a
```



---
## decompile
```python
from _l_o_c_a import decompile
```



---
## compile
```python
from _l_o_c_a import compile
```



---
## set
```python
from _l_o_c_a import set
```



---
## toXML
```python
from _l_o_c_a import toXML
```



---
## __getitem__
```python
from _l_o_c_a import __getitem__
```



---
## __len__
```python
from _l_o_c_a import __len__
```



---
## __name__
```python
from C_F_F_ import __name__
```



---
## table_C_F_F_
```python
from C_F_F_ import table_C_F_F_
```



---
## __init__
```python
from C_F_F_ import __init__
```



---
## decompile
```python
from C_F_F_ import decompile
```



---
## compile
```python
from C_F_F_ import compile
```



---
## haveGlyphNames
```python
from C_F_F_ import haveGlyphNames
```



---
## getGlyphOrder
```python
from C_F_F_ import getGlyphOrder
```



---
## setGlyphOrder
```python
from C_F_F_ import setGlyphOrder
```



---
## toXML
```python
from C_F_F_ import toXML
```



---
## fromXML
```python
from C_F_F_ import fromXML
```



---
## __name__
```python
from sbixGlyph import __name__
```



---
## Glyph
```python
from sbixGlyph import Glyph
```



---
## __init__
```python
from sbixGlyph import __init__
```



---
## is_reference_type
```python
from sbixGlyph import is_reference_type
```

Returns True if this glyph is a reference to another glyph's image data.

---
## decompile
```python
from sbixGlyph import decompile
```



---
## compile
```python
from sbixGlyph import compile
```



---
## toXML
```python
from sbixGlyph import toXML
```



---
## fromXML
```python
from sbixGlyph import fromXML
```



---
## __name__
```python
from _f_e_a_t import __name__
```



---
## table__f_e_a_t
```python
from _f_e_a_t import table__f_e_a_t
```

The feature name table is an AAT (Apple Advanced Typography) table for
storing font features, settings, and their human-readable names. It should
not be confused with the ``Feat`` table or the OpenType Layout ``GSUB``/``GPOS``
tables. See `Feature Name Table <https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6feat.html>`_
in the TrueType Reference Manual for more information on the structure and
purpose of this table.

---
## __name__
```python
from ttProgram import __name__
```

ttLib.tables.ttProgram.py -- Assembler/disassembler for TrueType bytecode programs.

---
## bitRepr
```python
from ttProgram import bitRepr
```



---
## _makeDict
```python
from ttProgram import _makeDict
```



---
## tt_instructions_error
```python
from ttProgram import tt_instructions_error
```



---
## _skipWhite
```python
from ttProgram import _skipWhite
```



---
## Program
```python
from ttProgram import Program
```



---
## _test
```python
from ttProgram import _test
```

>>> _test()
True

---
## __init__
```python
from ttProgram import __init__
```



---
## __str__
```python
from ttProgram import __str__
```



---
## fromBytecode
```python
from ttProgram import fromBytecode
```



---
## fromAssembly
```python
from ttProgram import fromAssembly
```



---
## getBytecode
```python
from ttProgram import getBytecode
```



---
## getAssembly
```python
from ttProgram import getAssembly
```



---
## toXML
```python
from ttProgram import toXML
```



---
## fromXML
```python
from ttProgram import fromXML
```



---
## _assemble
```python
from ttProgram import _assemble
```



---
## _disassemble
```python
from ttProgram import _disassemble
```



---
## __bool__
```python
from ttProgram import __bool__
```

>>> p = Program()
>>> bool(p)
False
>>> bc = array.array("B", [0])
>>> p.fromBytecode(bc)
>>> bool(p)
True
>>> p.bytecode.pop()
0
>>> bool(p)
False

>>> p = Program()
>>> asm = ['SVTCA[0]']
>>> p.fromAssembly(asm)
>>> bool(p)
True
>>> p.assembly.pop()
'SVTCA[0]'
>>> bool(p)
False

---
## __eq__
```python
from ttProgram import __eq__
```



---
## __ne__
```python
from ttProgram import __ne__
```



---
## __name__
```python
from _c_i_d_g import __name__
```



---
## table__c_i_d_g
```python
from _c_i_d_g import table__c_i_d_g
```

The AAT ``cidg`` table has almost the same structure as ``gidc``,
just mapping CIDs to GlyphIDs instead of the reverse direction.

It is useful for fonts that may be used by a PDF renderer in lieu of
a font reference with a known glyph collection but no subsetted
glyphs.  For instance, a PDF can say “please use a font conforming
to Adobe-Japan-1”; the ``cidg`` mapping is necessary if the font is,
say, a TrueType font.  ``gidc`` is lossy for this purpose and is
obsoleted by ``cidg``.

For example, the first font in ``/System/Library/Fonts/PingFang.ttc``
(which Apple ships pre-installed on MacOS 10.12.6) has a ``cidg`` table.

---
## __name__
```python
from _f_v_a_r import __name__
```



---
## table__f_v_a_r
```python
from _f_v_a_r import table__f_v_a_r
```



---
## Axis
```python
from _f_v_a_r import Axis
```



---
## NamedInstance
```python
from _f_v_a_r import NamedInstance
```



---
## __init__
```python
from _f_v_a_r import __init__
```



---
## compile
```python
from _f_v_a_r import compile
```



---
## decompile
```python
from _f_v_a_r import decompile
```



---
## toXML
```python
from _f_v_a_r import toXML
```



---
## fromXML
```python
from _f_v_a_r import fromXML
```



---
## getAxes
```python
from _f_v_a_r import getAxes
```



---
## __name__
```python
from _g_v_a_r import __name__
```



---
## table__g_v_a_r
```python
from _g_v_a_r import table__g_v_a_r
```



---
## compileGlyph_
```python
from _g_v_a_r import compileGlyph_
```



---
## decompileGlyph_
```python
from _g_v_a_r import decompileGlyph_
```



---
## __init__
```python
from _g_v_a_r import __init__
```



---
## compile
```python
from _g_v_a_r import compile
```



---
## compileGlyphs_
```python
from _g_v_a_r import compileGlyphs_
```



---
## decompile
```python
from _g_v_a_r import decompile
```



---
## ensureDecompiled
```python
from _g_v_a_r import ensureDecompiled
```



---
## decompileOffsets_
```python
from _g_v_a_r import decompileOffsets_
```



---
## compileOffsets_
```python
from _g_v_a_r import compileOffsets_
```

Packs a list of offsets into a 'gvar' offset table.

Returns a pair (bytestring, tableFormat). Bytestring is the
packed offset table. Format indicates whether the table
uses short (tableFormat=0) or long (tableFormat=1) integers.
The returned tableFormat should get packed into the flags field
of the 'gvar' header.

---
## toXML
```python
from _g_v_a_r import toXML
```



---
## fromXML
```python
from _g_v_a_r import fromXML
```



---
## getNumPoints_
```python
from _g_v_a_r import getNumPoints_
```



---
## get_read_item
```python
from _g_v_a_r import get_read_item
```



---
## read_item
```python
from _g_v_a_r import read_item
```



---
## __name__
```python
from M_V_A_R_ import __name__
```



---
## table_M_V_A_R_
```python
from M_V_A_R_ import table_M_V_A_R_
```



---
## __name__
```python
from _t_r_a_k import __name__
```



---
## table__t_r_a_k
```python
from _t_r_a_k import table__t_r_a_k
```



---
## TrackData
```python
from _t_r_a_k import TrackData
```



---
## TrackTableEntry
```python
from _t_r_a_k import TrackTableEntry
```



---
## compile
```python
from _t_r_a_k import compile
```



---
## decompile
```python
from _t_r_a_k import decompile
```



---
## toXML
```python
from _t_r_a_k import toXML
```



---
## fromXML
```python
from _t_r_a_k import fromXML
```



---
## __init__
```python
from _t_r_a_k import __init__
```



---
## sizes
```python
from _t_r_a_k import sizes
```



---
## __getitem__
```python
from _t_r_a_k import __getitem__
```



---
## __delitem__
```python
from _t_r_a_k import __delitem__
```



---
## __setitem__
```python
from _t_r_a_k import __setitem__
```



---
## __len__
```python
from _t_r_a_k import __len__
```



---
## __iter__
```python
from _t_r_a_k import __iter__
```



---
## keys
```python
from _t_r_a_k import keys
```



---
## __repr__
```python
from _t_r_a_k import __repr__
```



---
## __eq__
```python
from _t_r_a_k import __eq__
```



---
## __ne__
```python
from _t_r_a_k import __ne__
```



---
## __name__
```python
from _m_o_r_t import __name__
```



---
## table__m_o_r_t
```python
from _m_o_r_t import table__m_o_r_t
```



---
## __name__
```python
from G_S_U_B_ import __name__
```



---
## table_G_S_U_B_
```python
from G_S_U_B_ import table_G_S_U_B_
```



---
## __name__
```python
from _g_a_s_p import __name__
```



---
## table__g_a_s_p
```python
from _g_a_s_p import table__g_a_s_p
```



---
## decompile
```python
from _g_a_s_p import decompile
```



---
## compile
```python
from _g_a_s_p import compile
```



---
## toXML
```python
from _g_a_s_p import toXML
```



---
## fromXML
```python
from _g_a_s_p import fromXML
```



---
## __name__
```python
from _v_m_t_x import __name__
```



---
## table__v_m_t_x
```python
from _v_m_t_x import table__v_m_t_x
```



---
## __name__
```python
from _b_s_l_n import __name__
```



---
## table__b_s_l_n
```python
from _b_s_l_n import table__b_s_l_n
```



---
## __name__
```python
from G_P_K_G_ import __name__
```



---
## table_G_P_K_G_
```python
from G_P_K_G_ import table_G_P_K_G_
```



---
## decompile
```python
from G_P_K_G_ import decompile
```



---
## compile
```python
from G_P_K_G_ import compile
```



---
## toXML
```python
from G_P_K_G_ import toXML
```



---
## fromXML
```python
from G_P_K_G_ import fromXML
```



---
## __name__
```python
from T_S_I__3 import __name__
```

TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
tool to store its hinting source data.

TSI3 contains the text of the glyph programs in the form of 'VTTTalk' code.

---
## table_T_S_I__3
```python
from T_S_I__3 import table_T_S_I__3
```



---
## __name__
```python
from C_F_F__2 import __name__
```



---
## table_C_F_F__2
```python
from C_F_F__2 import table_C_F_F__2
```



---
## decompile
```python
from C_F_F__2 import decompile
```



---
## compile
```python
from C_F_F__2 import compile
```



---
## _ConstExpressionType
```python
from __init__ import _ConstExpressionType
```

Metaclass providing read-only class properties for :class:`expr`.

---
## expr
```python
from __init__ import expr
```

Utility providing *constants* and *classmethods* to construct expressions.

`Expressions`_ can be used to write basic formulas that enable custom interactions.

Alternatively, an `inline expression`_ may be defined via :class:`expr()`.

Parameters
----------
expr: str
    A `vega expression`_ string.

Returns
-------
``ExprRef``

.. _Expressions:
    https://altair-viz.github.io/user_guide/interactions.html#expressions
.. _inline expression:
   https://altair-viz.github.io/user_guide/interactions.html#inline-expressions
.. _vega expression:
   https://vega.github.io/vega/docs/expressions/

Examples
--------
>>> import altair as alt

>>> bind_range = alt.binding_range(min=100, max=300, name="Slider value:  ")
>>> param_width = alt.param(bind=bind_range, name="param_width")
>>> param_color = alt.param(
...     expr=alt.expr.if_(param_width < 200, "red", "black"),
...     name="param_color",
... )
>>> y = alt.Y("yval").axis(titleColor=param_color)

>>> y
Y({
  axis: {'titleColor': Parameter('param_color', VariableParameter({
    expr: if((param_width < 200),'red','black'),
    name: 'param_color'
  }))},
  shorthand: 'yval'
})

---
## NaN
```python
from __init__ import NaN
```

Not a number (same as JavaScript literal NaN).

---
## LN10
```python
from __init__ import LN10
```

The natural log of 10 (alias to Math.LN10).

---
## E
```python
from __init__ import E
```

The transcendental number e (alias to Math.E).

---
## LOG10E
```python
from __init__ import LOG10E
```

The base 10 logarithm e (alias to Math.LOG10E).

---
## LOG2E
```python
from __init__ import LOG2E
```

The base 2 logarithm of e (alias to Math.LOG2E).

---
## SQRT1_2
```python
from __init__ import SQRT1_2
```

The square root of 0.5 (alias to Math.SQRT1_2).

---
## LN2
```python
from __init__ import LN2
```

The natural log of 2 (alias to Math.LN2).

---
## SQRT2
```python
from __init__ import SQRT2
```

The square root of 2 (alias to Math.SQRT1_2).

---
## PI
```python
from __init__ import PI
```

The transcendental number pi (alias to Math.PI).

---
## if_
```python
from __init__ import if_
```

If *test* is truthy, returns *thenValue*. Otherwise, returns *elseValue*.

The *if* function is equivalent to the ternary operator `a ? b : c`.

---
## isArray
```python
from __init__ import isArray
```

Returns true if *value* is an array, false otherwise.

---
## isBoolean
```python
from __init__ import isBoolean
```

Returns true if *value* is a boolean (`true` or `false`), false otherwise.

---
## isDate
```python
from __init__ import isDate
```

Returns true if *value* is a Date object, false otherwise.

This method will return false for timestamp numbers or date-formatted strings; it recognizes Date objects only.

---
## isDefined
```python
from __init__ import isDefined
```

Returns true if *value* is a defined value, false if *value* equals `undefined`.

This method will return true for `null` and `NaN` values.

---
## isNumber
```python
from __init__ import isNumber
```

Returns true if *value* is a number, false otherwise.

`NaN` and `Infinity` are considered numbers.

---
## isObject
```python
from __init__ import isObject
```

Returns true if *value* is an object (including arrays and Dates), false otherwise.

---
## isRegExp
```python
from __init__ import isRegExp
```

Returns true if *value* is a RegExp (regular expression) object, false otherwise.

---
## isString
```python
from __init__ import isString
```

Returns true if *value* is a string, false otherwise.

---
## isValid
```python
from __init__ import isValid
```

Returns true if *value* is not `null`, `undefined`, or `NaN`, false otherwise.

---
## toBoolean
```python
from __init__ import toBoolean
```

Coerces the input *value* to a string.

Null values and empty strings are mapped to `null`.

---
## toDate
```python
from __init__ import toDate
```

Coerces the input *value* to a Date instance.

Null values and empty strings are mapped to `null`.
If an optional *parser* function is provided, it is used to perform date parsing, otherwise `Date.parse` is used.
Be aware that `Date.parse` has different implementations across browsers!

---
## toNumber
```python
from __init__ import toNumber
```

Coerces the input *value* to a number.

Null values and empty strings are mapped to `null`.

---
## toString
```python
from __init__ import toString
```

Coerces the input *value* to a string.

Null values and empty strings are mapped to `null`.

---
## isNaN
```python
from __init__ import isNaN
```

Returns true if *value* is not a number.

Same as JavaScript's `isNaN`.

---
## isFinite
```python
from __init__ import isFinite
```

Returns true if *value* is a finite number.

Same as JavaScript's `isFinite`.

---
## abs
```python
from __init__ import abs
```

Returns the absolute value of *value*.

Same as JavaScript's `Math.abs`.

---
## acos
```python
from __init__ import acos
```

Trigonometric arccosine.

Same as JavaScript's `Math.acos`.

---
## asin
```python
from __init__ import asin
```

Trigonometric arcsine.

Same as JavaScript's `Math.asin`.

---
## atan
```python
from __init__ import atan
```

Trigonometric arctangent.

Same as JavaScript's `Math.atan`.

---
## atan2
```python
from __init__ import atan2
```

Returns the arctangent of *dy / dx*.

Same as JavaScript's `Math.atan2`.

---
## ceil
```python
from __init__ import ceil
```

Rounds *value* to the nearest integer of equal or greater value.

Same as JavaScript's `Math.ceil`.

---
## clamp
```python
from __init__ import clamp
```

Restricts *value* to be between the specified *min* and *max*.

---
## cos
```python
from __init__ import cos
```

Trigonometric cosine.

Same as JavaScript's `Math.cos`.

---
## exp
```python
from __init__ import exp
```

Returns the value of *e* raised to the provided *exponent*.

Same as JavaScript's `Math.exp`.

---
## floor
```python
from __init__ import floor
```

Rounds *value* to the nearest integer of equal or lower value.

Same as JavaScript's `Math.floor`.

---
## hypot
```python
from __init__ import hypot
```

Returns the square root of the sum of squares of its arguments.

Same as JavaScript's `Math.hypot`.

---
## log
```python
from __init__ import log
```

Returns the natural logarithm of *value*.

Same as JavaScript's `Math.log`.

---
## max
```python
from __init__ import max
```

Return the maximum value.

Note:
   Syntactic sugar for ``nw.col(columns).max()``.

Arguments:
    columns: Name(s) of the columns to use in the aggregation function.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [5, 10]})
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [5, 10]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.max("a"))

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       a
    0  2
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 2   │
    └─────┘

---
## min
```python
from __init__ import min
```

Return the minimum value.

Note:
   Syntactic sugar for ``nw.col(columns).min()``.

Arguments:
    columns: Name(s) of the columns to use in the aggregation function.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [5, 10]})
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [5, 10]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.min("b"))

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       b
    0  5
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ b   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 5   │
    └─────┘

---
## pow
```python
from __init__ import pow
```

Returns *value* raised to the given *exponent*.

Same as JavaScript's `Math.pow`.

---
## random
```python
from __init__ import random
```

Returns a pseudo-random number in the range `[0, 1]`.

Same as JavaScript's `Math.random`.

---
## round
```python
from __init__ import round
```

Rounds *value* to the nearest integer.

Same as JavaScript's `Math.round`.

---
## sin
```python
from __init__ import sin
```

Trigonometric sine.

Same as JavaScript's `Math.sin`.

---
## sqrt
```python
from __init__ import sqrt
```

Square root function.

Same as JavaScript's `Math.sqrt`.

---
## tan
```python
from __init__ import tan
```

Trigonometric tangent.

Same as JavaScript's `Math.tan`.

---
## sampleNormal
```python
from __init__ import sampleNormal
```

Returns a sample from a univariate `normal (Gaussian) probability distribution <https://en.wikipedia.org/wiki/Normal_distribution>`__ with specified *mean* and standard deviation *stdev*.

If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.

---
## cumulativeNormal
```python
from __init__ import cumulativeNormal
```

Returns the value of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`__ at the given input domain *value* for a normal distribution with specified *mean* and standard deviation *stdev*.

If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.

---
## densityNormal
```python
from __init__ import densityNormal
```

Returns the value of the `probability density function <https://en.wikipedia.org/wiki/Probability_density_function>`__ at the given input domain *value*, for a normal distribution with specified *mean* and standard deviation *stdev*.

If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.

---
## quantileNormal
```python
from __init__ import quantileNormal
```

Returns the quantile value (the inverse of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function)>`__ for the given input *probability*, for a normal distribution with specified *mean* and standard deviation *stdev*.

If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.

---
## sampleLogNormal
```python
from __init__ import sampleLogNormal
```

Returns a sample from a univariate `log-normal probability distribution <https://en.wikipedia.org/wiki/Log-normal_distribution>`__ with specified log *mean* and log standard deviation *stdev*.

If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.

---
## cumulativeLogNormal
```python
from __init__ import cumulativeLogNormal
```

Returns the value of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`__ at the given input domain *value* for a log-normal distribution with specified log *mean* and log standard deviation *stdev*.

If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.

---
## densityLogNormal
```python
from __init__ import densityLogNormal
```

Returns the value of the `probability density function <https://en.wikipedia.org/wiki/Probability_density_function>`__ at the given input domain *value*, for a log-normal distribution with specified log *mean* and log standard deviation *stdev*.

If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.

---
## quantileLogNormal
```python
from __init__ import quantileLogNormal
```

Returns the quantile value (the inverse of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function)>`__ for the given input *probability*, for a log-normal distribution with specified log *mean* and log standard deviation *stdev*.

If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.

---
## sampleUniform
```python
from __init__ import sampleUniform
```

Returns a sample from a univariate `continuous uniform probability distribution <https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)>`__ over the interval `[min, max]`.

If unspecified, *min* defaults to `0` and *max* defaults to `1`.
If only one argument is provided, it is interpreted as the *max* value.

---
## cumulativeUniform
```python
from __init__ import cumulativeUniform
```

Returns the value of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function>`__ at the given input domain *value* for a uniform distribution over the interval `[min, max]`.

If unspecified, *min* defaults to `0` and *max* defaults to `1`.
If only one argument is provided, it is interpreted as the *max* value.

---
## densityUniform
```python
from __init__ import densityUniform
```

Returns the value of the `probability density function <https://en.wikipedia.org/wiki/Probability_density_function>`__ at the given input domain *value*,  for a uniform distribution over the interval `[min, max]`.

If unspecified, *min* defaults to `0` and *max* defaults to `1`.
If only one argument is provided, it is interpreted as the *max* value.

---
## quantileUniform
```python
from __init__ import quantileUniform
```

Returns the quantile value (the inverse of the `cumulative distribution function <https://en.wikipedia.org/wiki/Cumulative_distribution_function)>`__ for the given input *probability*, for a uniform distribution over the interval `[min, max]`.

If unspecified, *min* defaults to `0` and *max* defaults to `1`.
If only one argument is provided, it is interpreted as the *max* value.

---
## now
```python
from __init__ import now
```

Returns the timestamp for the current time.

---
## datetime
```python
from __init__ import datetime
```

Returns a new `Date` instance.

The *month* is 0-based, such that `1` represents February.

---
## date
```python
from __init__ import date
```

Returns the day of the month for the given *datetime* value, in local time.

---
## day
```python
from __init__ import day
```

Returns the day of the week for the given *datetime* value, in local time.

---
## dayofyear
```python
from __init__ import dayofyear
```

Returns the one-based day of the year for the given *datetime* value, in local time.

---
## year
```python
from __init__ import year
```

Returns the year for the given *datetime* value, in local time.

---
## quarter
```python
from __init__ import quarter
```

Returns the quarter of the year (0-3) for the given *datetime* value, in local time.

---
## month
```python
from __init__ import month
```

Returns the (zero-based) month for the given *datetime* value, in local time.

---
## week
```python
from __init__ import week
```

Returns the week number of the year for the given *datetime*, in local time.

This function assumes Sunday-based weeks.
Days before the first Sunday of the year are considered to be in week 0,
the first Sunday of the year is the start of week 1,
the second Sunday week 2, etc.

---
## hours
```python
from __init__ import hours
```

Returns the hours component for the given *datetime* value, in local time.

---
## minutes
```python
from __init__ import minutes
```

Returns the minutes component for the given *datetime* value, in local time.

---
## seconds
```python
from __init__ import seconds
```

Returns the seconds component for the given *datetime* value, in local time.

---
## milliseconds
```python
from __init__ import milliseconds
```

Returns the milliseconds component for the given *datetime* value, in local time.

---
## time
```python
from __init__ import time
```

Returns the epoch-based timestamp for the given *datetime* value.

---
## timezoneoffset
```python
from __init__ import timezoneoffset
```

Returns the timezone offset from the local timezone to UTC for the given *datetime* value.

---
## timeOffset
```python
from __init__ import timeOffset
```

Returns a new `Date` instance that offsets the given *date* by the specified time `unit <https://vega.github.io/vega/docs/api/time/#time-units>`__ in the local timezone.

The optional *step* argument indicates the number of time unit steps to offset by (default 1).

---
## timeSequence
```python
from __init__ import timeSequence
```

Returns an array of `Date` instances from *start* (inclusive) to *stop* (exclusive), with each entry separated by the given time `unit <https://vega.github.io/vega/docs/api/time/#time-units>`__ in the local timezone.

The optional *step* argument indicates the number of time unit steps to take between each sequence entry (default 1).

---
## utc
```python
from __init__ import utc
```

Returns a timestamp for the given UTC date. The *month* is 0-based, such that `1` represents February.

---
## utcdate
```python
from __init__ import utcdate
```

Returns the day of the month for the given *datetime* value, in UTC time.

---
## utcday
```python
from __init__ import utcday
```

Returns the day of the week for the given *datetime* value, in UTC time.

---
## utcdayofyear
```python
from __init__ import utcdayofyear
```

Returns the one-based day of the year for the given *datetime* value, in UTC time.

---
## utcyear
```python
from __init__ import utcyear
```

Returns the year for the given *datetime* value, in UTC time.

---
## utcquarter
```python
from __init__ import utcquarter
```

Returns the quarter of the year (0-3) for the given *datetime* value, in UTC time.

---
## utcmonth
```python
from __init__ import utcmonth
```

Returns the (zero-based) month for the given *datetime* value, in UTC time.

---
## utcweek
```python
from __init__ import utcweek
```

Returns the week number of the year for the given *datetime*, in UTC time.

This function assumes Sunday-based weeks.
Days before the first Sunday of the year are considered to be in week 0,
the first Sunday of the year is the start of week 1,
the second Sunday week 2, etc.

---
## utchours
```python
from __init__ import utchours
```

Returns the hours component for the given *datetime* value, in UTC time.

---
## utcminutes
```python
from __init__ import utcminutes
```

Returns the minutes component for the given *datetime* value, in UTC time.

---
## utcseconds
```python
from __init__ import utcseconds
```

Returns the seconds component for the given *datetime* value, in UTC time.

---
## utcmilliseconds
```python
from __init__ import utcmilliseconds
```

Returns the milliseconds component for the given *datetime* value, in UTC time.

---
## utcOffset
```python
from __init__ import utcOffset
```

Returns a new `Date` instance that offsets the given *date* by the specified time `unit <https://vega.github.io/vega/docs/api/time/#time-units>`__ in UTC time.

The optional *step* argument indicates the number of time unit steps to offset by (default 1).

---
## utcSequence
```python
from __init__ import utcSequence
```

Returns an array of `Date` instances from *start* (inclusive) to *stop* (exclusive), with each entry separated by the given time `unit <https://vega.github.io/vega/docs/api/time/#time-units>`__ in UTC time.

The optional *step* argument indicates the number of time unit steps to take between each sequence entry (default 1).

---
## extent
```python
from __init__ import extent
```

Returns a new `[min, max]` array with the minimum and maximum values of the input array, ignoring `null`, `undefined`, and `NaN` values.

---
## clampRange
```python
from __init__ import clampRange
```

Clamps a two-element *range* array in a span-preserving manner.

If the span of the input *range* is less than `(max - min)` and an endpoint exceeds either the *min* or *max* value,
the range is translated such that the span is preserved and one endpoint touches the boundary of the `[min, max]` range.
If the span exceeds `(max - min)`, the range `[min, max]` is returned.

---
## indexof
```python
from __init__ import indexof
```

Returns the first index of *value* in the input *array*, or the first index of *substring* in the input *string*.

---
## inrange
```python
from __init__ import inrange
```

Tests whether *value* lies within (or is equal to either) the first and last values of the *range* array.

---
## lastindexof
```python
from __init__ import lastindexof
```

Returns the last index of *value* in the input *array*, or the last index of *substring* in the input *string*.

---
## length
```python
from __init__ import length
```

Returns the length of the input *array*, or the length of the input *string*.

---
## lerp
```python
from __init__ import lerp
```

Returns the linearly interpolated value between the first and last entries in the *array* for the provided interpolation *fraction* (typically between 0 and 1).

For example, `lerp([0, 50], 0.5)` returns 25.

---
## pluck
```python
from __init__ import pluck
```

Retrieves the value for the specified *field* from a given *array* of objects.

The input *field* string may include nested properties (e.g., `foo.bar.bz`).

---
## reverse
```python
from __init__ import reverse
```

Returns a new array with elements in a reverse order of the input *array*.

The first array element becomes the last, and the last array element becomes the first.

---
## sequence
```python
from __init__ import sequence
```

Returns an array containing an arithmetic sequence of numbers.

If *step* is omitted, it defaults to 1.
If *start* is omitted, it defaults to 0.

The *stop* value is exclusive; it is not included in the result.
If *step* is positive, the last element is the largest `start + i * step` less than *stop*;
if *step* is negative, the last element is the smallest `start + i * step` greater than *stop*.

If the returned array would contain an infinite number of values, an empty range is returned.
The arguments are not required to be integers.

---
## slice
```python
from __init__ import slice
```

Returns a section of *array* between the *start* and *end* indices.

If the *end* argument is negative, it is treated as an offset from the end of the array `length(array) + end`.

---
## span
```python
from __init__ import span
```

Returns the span of *array*: the difference between the last and first elements, or `array[array.length-1] - array[0]`.

Or if input is a string: a section of *string* between the *start* and *end* indices.
If the *end* argument is negative, it is treated as an offset from the end of the string `length(string) + end`.

---
## lower
```python
from __init__ import lower
```

Transforms *string* to lower-case letters.

---
## pad
```python
from __init__ import pad
```

Pads a *string* value with repeated instances of a *character* up to a specified *length*.

If *character* is not specified, a space (' ') is used.
By default, padding is added to the end of a string.
An optional *align* parameter specifies if padding should be added to the `'left'` (beginning), `'center'`, or `'right'` (end) of the input string.

---
## parseFloat
```python
from __init__ import parseFloat
```

Parses the input *string* to a floating-point value.

Same as JavaScript's `parseFloat`.

---
## parseInt
```python
from __init__ import parseInt
```

Parses the input *string* to an integer value.

Same as JavaScript's `parseInt`.

---
## replace
```python
from __init__ import replace
```

Returns a new string with some or all matches of *pattern* replaced by a *replacement* string.

The *pattern* can be a string or a regular expression.
If *pattern* is a string, only the first instance will be replaced.
Same as `JavaScript's String.replace <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace>`__.

---
## substring
```python
from __init__ import substring
```

Returns a section of *string* between the *start* and *end* indices.

---
## trim
```python
from __init__ import trim
```

Returns a trimmed string with preceding and trailing whitespace removed.

---
## truncate
```python
from __init__ import truncate
```

Truncates an input *string* to a target *length*.

The optional *align* argument indicates what part of the string should be truncated: `'left'` (the beginning), `'center'`, or `'right'` (the end).
By default, the `'right'` end of the string is truncated.
The optional *ellipsis* argument indicates the string to use to indicate truncated content;
by default the ellipsis character `...` (`\\u2026`) is used.

---
## upper
```python
from __init__ import upper
```

Transforms *string* to upper-case letters.

---
## dayFormat
```python
from __init__ import dayFormat
```

Formats a (0-6) *weekday* number as a full week day name, according to the current locale.

For example: `dayFormat(0) -> "Sunday"`.

---
## dayAbbrevFormat
```python
from __init__ import dayAbbrevFormat
```

Formats a (0-6) *weekday* number as an abbreviated week day name, according to the current locale.

For example: `dayAbbrevFormat(0) -> "Sun"`.

---
## monthFormat
```python
from __init__ import monthFormat
```

Formats a (zero-based) *month* number as a full month name, according to the current locale.

For example: `monthFormat(0) -> "January"`.

---
## monthAbbrevFormat
```python
from __init__ import monthAbbrevFormat
```

Formats a (zero-based) *month* number as an abbreviated month name, according to the current locale.

For example: `monthAbbrevFormat(0) -> "Jan"`.

---
## timeUnitSpecifier
```python
from __init__ import timeUnitSpecifier
```

Returns a time format specifier string for the given time `unit <https://vega.github.io/vega/docs/api/time/#time-units>`__.

The optional *specifiers* object provides a set of specifier sub-strings for customizing the format;
for more, see the `timeUnitSpecifier API documentation <https://vega.github.io/vega/docs/api/time/#timeUnitSpecifier>`__.

The resulting specifier string can then be used as input to the `timeFormat <https://vega.github.io/vega/docs/expressions/#timeFormat>`__ or
`utcFormat <https://vega.github.io/vega/docs/expressions/#utcFormat>`__ functions, or as the *format* parameter of an axis or legend.

For example: `timeFormat(date, timeUnitSpecifier('year'))` or `timeFormat(date, timeUnitSpecifier(['hours', 'minutes']))`.

---
## timeFormat
```python
from __init__ import timeFormat
```

Formats a datetime *value* (either a `Date` object or timestamp) as a string, according to the local time.

The *specifier* must be a valid `d3-time-format specifier <https://d3js.org/d3-time-format/>`__.
For example: `timeFormat(timestamp, '%A')`.

---
## timeParse
```python
from __init__ import timeParse
```

Parses a *string* value to a Date object, according to the local time.

The *specifier* must be a valid `d3-time-format specifier <https://d3js.org/d3-time-format/>`__.
For example: `timeParse('June 30, 2015', '%B %d, %Y')`.

---
## utcFormat
```python
from __init__ import utcFormat
```

Formats a datetime *value* (either a `Date` object or timestamp) as a string, according to `UTC <https://en.wikipedia.org/wiki/Coordinated_Universal_Time>`__ time.

The *specifier* must be a valid `d3-time-format specifier <https://d3js.org/d3-time-format/>`__.
For example: `utcFormat(timestamp, '%A')`.

---
## utcParse
```python
from __init__ import utcParse
```

Parses a *string* value to a Date object, according to `UTC <https://en.wikipedia.org/wiki/Coordinated_Universal_Time>`__ time.

The *specifier* must be a valid `d3-time-format specifier <https://d3js.org/d3-time-format/>`__.
For example: `utcParse('June 30, 2015', '%B %d, %Y')`.

---
## regexp
```python
from __init__ import regexp
```

Creates a regular expression instance from an input *pattern* string and optional *flags*.

Same as `JavaScript's `RegExp` <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp>`__.

---
## test
```python
from __init__ import test
```

Evaluates a regular expression *regexp* against the input *string*, returning `true` if the string matches the pattern, `false` otherwise.

For example: `test(\d{3}, "32-21-9483") -> true`.

---
## rgb
```python
from __init__ import rgb
```

Constructs a new `RGB <https://en.wikipedia.org/wiki/RGB_color_model>`__ color.

If *r*, *g* and *b* are specified, these represent the channel values of the returned color; an *opacity* may also be specified.
If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the RGB color space. Uses `d3-color's rgb function <https://d3js.org/d3-color#color_rgb>`__.

---
## hsl
```python
from __init__ import hsl
```

Constructs a new `HSL <https://en.wikipedia.org/wiki/HSL_and_HSV>`__ color.

If *h*, *s* and *l* are specified, these represent the channel values of the returned color; an *opacity* may also be specified.
If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the HSL color space.
Uses `d3-color's hsl function <https://d3js.org/d3-color#hsl>`__.

---
## lab
```python
from __init__ import lab
```

Constructs a new `CIE LAB <https://en.wikipedia.org/wiki/Lab_color_space#CIELAB>`__ color.

If *l*, *a* and *b* are specified, these represent the channel values of the returned color; an *opacity* may also be specified.
If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the LAB color space.
Uses `d3-color's lab function <https://d3js.org/d3-color#lab>`__.

---
## hcl
```python
from __init__ import hcl
```

Constructs a new `HCL <https://en.wikipedia.org/wiki/Lab_color_space#CIELAB>`__ (hue, chroma, luminance) color.

If *h*, *c* and *l* are specified, these represent the channel values of the returned color; an *opacity* may also be specified.
If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the HCL color space.
Uses `d3-color's hcl function <https://d3js.org/d3-color#hcl>`__.

---
## luminance
```python
from __init__ import luminance
```

Returns the luminance for the given color *specifier* (compatible with `d3-color's rgb function <https://d3js.org/d3-color#rgb)>`__.

The luminance is calculated according to the `W3C Web Content Accessibility Guidelines <https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef>`__.

---
## contrast
```python
from __init__ import contrast
```

Returns the contrast ratio between the input color specifiers as a float between 1 and 21.

The contrast is calculated according to the `W3C Web Content Accessibility Guidelines <https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef>`__.

---
## item
```python
from __init__ import item
```

Returns the current scenegraph item that is the target of the event.

---
## group
```python
from __init__ import group
```

Returns the scenegraph group mark item in which the current event has occurred.

If no arguments are provided, the immediate parent group is returned.
If a group name is provided, the matching ancestor group item is returned.

---
## xy
```python
from __init__ import xy
```

Returns the x- and y-coordinates for the current event as a two-element array.

If no arguments are provided, the top-level coordinate space of the view is used.
If a scenegraph *item* (or string group name) is provided, the coordinate space of the group item is used.

---
## x
```python
from __init__ import x
```

Returns the x coordinate for the current event.

If no arguments are provided, the top-level coordinate space of the view is used.
If a scenegraph *item* (or string group name) is provided, the coordinate space of the group item is used.

---
## y
```python
from __init__ import y
```

Returns the y coordinate for the current event.

If no arguments are provided, the top-level coordinate space of the view is used.
If a scenegraph *item* (or string group name) is provided, the coordinate space of the group item is used.

---
## pinchDistance
```python
from __init__ import pinchDistance
```

Returns the pixel distance between the first two touch points of a multi-touch event.

---
## pinchAngle
```python
from __init__ import pinchAngle
```

Returns the angle of the line connecting the first two touch points of a multi-touch event.

---
## inScope
```python
from __init__ import inScope
```

Returns true if the given scenegraph *item* is a descendant of the group mark in which the event handler was defined, false otherwise.

---
## indata
```python
from __init__ import indata
```

Tests if the data set with a given *name* contains a datum with a *field* value that matches the input *value*.

For example: `indata('table', 'category', value)`.

---
## scale
```python
from __init__ import scale
```

Applies the named scale transform (or projection) to the specified *value*.

The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.

---
## invert
```python
from __init__ import invert
```

Inverts the named scale transform (or projection) for the specified *value*.

The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.

---
## domain
```python
from __init__ import domain
```

Returns the scale domain array for the named scale transform, or an empty array if the scale is not found.

The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.

---
## range
```python
from __init__ import range
```

Returns the scale range array for the named scale transform, or an empty array if the scale is not found.

The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.

---
## bandwidth
```python
from __init__ import bandwidth
```

Returns the current band width for the named band scale transform, or zero if the scale is not found or is not a band scale.

The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.

---
## bandspace
```python
from __init__ import bandspace
```

Returns the number of steps needed within a band scale, based on the *count* of domain elements and the inner and outer padding values.

While normally calculated within the scale itself, this function can be helpful for determining the size of a chart's layout.

---
## gradient
```python
from __init__ import gradient
```

Returns a linear color gradient for the *scale* (whose range must be a `continuous color scheme <https://vega.github.io/vega/docs/schemes>`__ and starting and ending points *p0* and *p1*, each an `[x, y]` array.

The points *p0* and *p1* should be expressed in normalized coordinates in the domain `[0, 1]`, relative to the bounds of the item being colored.

If unspecified, *p0* defaults to `[0, 0]` and *p1* defaults to `[1, 0]`, for a horizontal gradient that spans the full bounds of an item.
The optional *count* argument indicates a desired target number of sample points to take from the color scale.

---
## panLinear
```python
from __init__ import panLinear
```

Given a linear scale *domain* array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional *delta*.

The *delta* value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.

---
## panLog
```python
from __init__ import panLog
```

Given a log scale *domain* array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional *delta*.

The *delta* value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.

---
## panPow
```python
from __init__ import panPow
```

Given a power scale *domain* array with numeric or datetime values and the given *exponent*, returns a new two-element domain array that is the result of panning the domain by a fractional *delta*.

The *delta* value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.

---
## panSymlog
```python
from __init__ import panSymlog
```

Given a symmetric log scale *domain* array with numeric or datetime values parameterized by the given *constant*, returns a new two-element domain array that is the result of panning the domain by a fractional *delta*.

The *delta* value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.

---
## zoomLinear
```python
from __init__ import zoomLinear
```

Given a linear scale *domain* array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a *scaleFactor*, centered at the provided fractional *anchor*.

The *anchor* value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.

---
## zoomLog
```python
from __init__ import zoomLog
```

Given a log scale *domain* array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a *scaleFactor*, centered at the provided fractional *anchor*.

The *anchor* value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.

---
## zoomPow
```python
from __init__ import zoomPow
```

Given a power scale *domain* array with numeric or datetime values and the given *exponent*, returns a new two-element domain array that is the result of zooming the domain by a *scaleFactor*, centered at the provided fractional *anchor*.

The *anchor* value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.

---
## zoomSymlog
```python
from __init__ import zoomSymlog
```

Given a symmetric log scale *domain* array with numeric or datetime values parameterized by the given *constant*, returns a new two-element domain array that is the result of zooming the domain by a *scaleFactor*, centered at the provided fractional *anchor*.

The *anchor* value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.

---
## geoArea
```python
from __init__ import geoArea
```

Returns the projected planar area (typically in square pixels) of a GeoJSON *feature* according to the named *projection*.

If the *projection* argument is `null`, computes the spherical area in steradians using unprojected longitude, latitude coordinates.
The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection.
Uses d3-geo's `geoArea <https://d3js.org/d3-geo#geoArea>`__ and `path.area <https://d3js.org/d3-geo#path_area>`__ methods.

---
## geoBounds
```python
from __init__ import geoBounds
```

Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON *feature*, according to the named *projection*.

The bounding box is represented by a two-dimensional array: `[[x0, y0], [x1, y1]]`,
where *x0* is the minimum x-coordinate, *y0* is the minimum y-coordinate,
*x1* is the maximum x-coordinate, and *y1* is the maximum y-coordinate.

If the *projection* argument is `null`, computes the spherical bounding box using unprojected longitude, latitude coordinates.
The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection.
Uses d3-geo's `geoBounds <https://d3js.org/d3-geo#geoBounds>`__ and `path.bounds <https://d3js.org/d3-geo#path_bounds>`__ methods.

---
## geoCentroid
```python
from __init__ import geoCentroid
```

Returns the projected planar centroid (typically in pixels) for the specified GeoJSON *feature*, according to the named *projection*.

If the *projection* argument is `null`, computes the spherical centroid using unprojected longitude, latitude coordinates.
The optional *group* argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection.
Uses d3-geo's `geoCentroid <https://d3js.org/d3-geo#geoCentroid>`__ and `path.centroid <https://d3js.org/d3-geo#path_centroid>`__ methods.

---
## treePath
```python
from __init__ import treePath
```

For the hierarchy data set with the given *name*, returns the shortest path through from the *source* node id to the *target* node id.

The path starts at the *source* node, ascends to the least common ancestor of the *source* node and the *target* node, and then descends to the *target* node.

---
## treeAncestors
```python
from __init__ import treeAncestors
```

For the hierarchy data set with the given *name*, returns the array of ancestors nodes, starting with the input *node*, then followed by each parent up to the root.

---
## containerSize
```python
from __init__ import containerSize
```

Returns the current CSS box size (`[el.clientWidth, el.clientHeight]`) of the parent DOM element that contains the Vega view.

If there is no container element, returns `[undefined, undefined]`.

---
## screen
```python
from __init__ import screen
```

Returns the `window.screen <https://developer.mozilla.org/en-US/docs/Web/API/Window/screen>`__ object, or `{}` if Vega is not running in a browser environment.

---
## windowSize
```python
from __init__ import windowSize
```

Returns the current window size (`[window.innerWidth, window.innerHeight]`) or `[undefined, undefined]` if Vega is not running in a browser environment.

---
## warn
```python
from __init__ import warn
```

Logs a warning message and returns the last argument.

For the message to appear in the console, the visualization view must have the appropriate logging level set.

---
## DatumType
```python
from core import DatumType
```

An object to assist in building Vega-Lite Expressions.

---
## _js_repr
```python
from core import _js_repr
```

Return a javascript-safe string representation of val.

---
## OperatorMixin
```python
from core import OperatorMixin
```



---
## Expression
```python
from core import Expression
```

Expression.

Base object for enabling build-up of Javascript expressions using
a Python syntax. Calling ``repr(obj)`` will return a Javascript
representation of the object and the operations it encodes.

---
## UnaryExpression
```python
from core import UnaryExpression
```



---
## BinaryExpression
```python
from core import BinaryExpression
```



---
## FunctionExpression
```python
from core import FunctionExpression
```



---
## ConstExpression
```python
from core import ConstExpression
```



---
## GetAttrExpression
```python
from core import GetAttrExpression
```



---
## GetItemExpression
```python
from core import GetItemExpression
```



---
## _to_expr
```python
from core import _to_expr
```



---
## _from_expr
```python
from core import _from_expr
```



---
## __truediv__
```python
from core import __truediv__
```

Divide other into self, and return a new masked array.

---
## __rtruediv__
```python
from core import __rtruediv__
```

Divide self into other, and return a new masked array.

---
## __mod__
```python
from core import __mod__
```



---
## __rmod__
```python
from core import __rmod__
```



---
## __pow__
```python
from core import __pow__
```

Raise self to the power other, masking the potential NaNs/Infs

---
## __rpow__
```python
from core import __rpow__
```

Raise other to the power self, masking the potential NaNs/Infs

---
## __neg__
```python
from core import __neg__
```



---
## __pos__
```python
from core import __pos__
```



---
## __gt__
```python
from core import __gt__
```



---
## __lt__
```python
from core import __lt__
```



---
## __ge__
```python
from core import __ge__
```



---
## __le__
```python
from core import __le__
```



---
## __abs__
```python
from core import __abs__
```



---
## to_dict
```python
from core import to_dict
```



---
## __setattr__
```python
from core import __setattr__
```



---
## __name__
```python
from consts import __name__
```



---
## __name__
```python
from funcs import __name__
```



---
## __name__
```python
from save import __name__
```



---
## write_file_or_filename
```python
from save import write_file_or_filename
```

Write content to fp, whether fp is a string, a pathlib Path or a file-like object.

---
## set_inspect_format_argument
```python
from save import set_inspect_format_argument
```

Inspect the format argument in the save function.

---
## set_inspect_mode_argument
```python
from save import set_inspect_mode_argument
```

Inspect the mode argument in the save function.

---
## save
```python
from save import save
```

Save a chart to file in a variety of formats.

Supported formats are [json, html, png, svg, pdf]

Parameters
----------
chart : alt.Chart
    the chart instance to save
fp : string filename, pathlib.Path or file-like object
    file to which to write the chart.
format : string (optional)
    the format to write: one of ['json', 'html', 'png', 'svg', 'pdf'].
    If not specified, the format will be determined from the filename.
mode : string (optional)
    Must be 'vega-lite'. If not specified, then infer the mode from
    the '$schema' property of the spec, or the ``opt`` dictionary.
    If it's not specified in either of those places, then use 'vega-lite'.
vega_version : string (optional)
    For html output, the version of vega.js to use
vegalite_version : string (optional)
    For html output, the version of vegalite.js to use
vegaembed_version : string (optional)
    For html output, the version of vegaembed.js to use
embed_options : dict (optional)
    The vegaEmbed options dictionary. Default is {}
    (See https://github.com/vega/vega-embed for details)
json_kwds : dict (optional)
    Additional keyword arguments are passed to the output method
    associated with the specified format.
scale_factor : float (optional)
    scale_factor to use to change size/resolution of png or svg output
engine: string {'vl-convert'}
    the conversion engine to use for 'png', 'svg', and 'pdf' formats
inline: bool (optional)
    If False (default), the required JavaScript libraries are loaded
    from a CDN location in the resulting html file.
    If True, the required JavaScript libraries are inlined into the resulting
    html file so that it will work without an internet connection.
    The vl-convert-python package is required if True.
**kwargs :
    additional kwargs passed to spec_to_mimebundle.

---
## perform_save
```python
from save import perform_save
```



---
## MockRequest
```python
from server import MockRequest
```



---
## MockServer
```python
from server import MockServer
```



---
## generate_handler
```python
from server import generate_handler
```



---
## find_open_port
```python
from server import find_open_port
```

Find an open port near the specified port.

---
## serve
```python
from server import serve
```

Create a WebSocket server listening on ``host`` and ``port``.

Whenever a client connects, the server creates a :class:`ServerConnection`,
performs the opening handshake, and delegates to the ``handler``.

The handler receives a :class:`ServerConnection` instance, which you can use
to send and receive messages.

Once the handler completes, either normally or with an exception, the server
performs the closing handshake and closes the connection.

:class:`WebSocketServer` mirrors the API of
:class:`~socketserver.BaseServer`. Treat it as a context manager to ensure
that it will be closed and call the :meth:`~WebSocketServer.serve_forever`
method to serve requests::

    def handler(websocket):
        ...

    with websockets.sync.server.serve(handler, ...) as server:
        server.serve_forever()

Args:
    handler: Connection handler. It receives the WebSocket connection,
        which is a :class:`ServerConnection`, in argument.
    host: Network interfaces the server binds to.
        See :func:`~socket.create_server` for details.
    port: TCP port the server listens on.
        See :func:`~socket.create_server` for details.
    sock: Preexisting TCP socket. ``sock`` replaces ``host`` and ``port``.
        You may call :func:`socket.create_server` to create a suitable TCP
        socket.
    ssl_context: Configuration for enabling TLS on the connection.
    origins: Acceptable values of the ``Origin`` header, for defending
        against Cross-Site WebSocket Hijacking attacks. Include :obj:`None`
        in the list if the lack of an origin is acceptable.
    extensions: List of supported extensions, in order in which they
        should be negotiated and run.
    subprotocols: List of supported subprotocols, in order of decreasing
        preference.
    select_subprotocol: Callback for selecting a subprotocol among
        those supported by the client and the server. It receives a
        :class:`ServerConnection` (not a
        :class:`~websockets.server.ServerProtocol`!) instance and a list of
        subprotocols offered by the client. Other than the first argument,
        it has the same behavior as the
        :meth:`ServerProtocol.select_subprotocol
        <websockets.server.ServerProtocol.select_subprotocol>` method.
    process_request: Intercept the request during the opening handshake.
        Return an HTTP response to force the response or :obj:`None` to
        continue normally. When you force an HTTP 101 Continue response,
        the handshake is successful. Else, the connection is aborted.
    process_response: Intercept the response during the opening handshake.
        Return an HTTP response to force the response or :obj:`None` to
        continue normally. When you force an HTTP 101 Continue response,
        the handshake is successful. Else, the connection is aborted.
    server_header: Value of  the ``Server`` response header.
        It defaults to ``"Python/x.y.z websockets/X.Y"``. Setting it to
        :obj:`None` removes the header.
    compression: The "permessage-deflate" extension is enabled by default.
        Set ``compression`` to :obj:`None` to disable it. See the
        :doc:`compression guide <../../topics/compression>` for details.
    open_timeout: Timeout for opening connections in seconds.
        :obj:`None` disables the timeout.
    close_timeout: Timeout for closing connections in seconds.
        :obj:`None` disables the timeout.
    max_size: Maximum size of incoming messages in bytes.
        :obj:`None` disables the limit.
    logger: Logger for this server.
        It defaults to ``logging.getLogger("websockets.server")``. See the
        :doc:`logging guide <../../topics/logging>` for details.
    create_connection: Factory for the :class:`ServerConnection` managing
        the connection. Set it to a wrapper or a subclass to customize
        connection handling.

---
## makefile
```python
from server import makefile
```



---
## sendall
```python
from server import sendall
```



---
## serve_forever
```python
from server import serve_forever
```

See :meth:`socketserver.BaseServer.serve_forever`.

This method doesn't return. Calling :meth:`shutdown` from another thread
stops the server.

Typical use::

    with serve(...) as server:
        server.serve_forever()

---
## server_close
```python
from server import server_close
```



---
## MyHandler
```python
from server import MyHandler
```



---
## do_GET
```python
from server import do_GET
```

Respond to a GET request.

---
## b
```python
from server import b
```



---
## __name__
```python
from plugin_registry import __name__
```



---
## _is_type
```python
from plugin_registry import _is_type
```

Converts a type to guard function.

Added for compatibility with original `PluginRegistry` default.

---
## NoSuchEntryPoint
```python
from plugin_registry import NoSuchEntryPoint
```



---
## PluginEnabler
```python
from plugin_registry import PluginEnabler
```

Context manager for enabling plugins.

This object lets you use enable() as a context manager to
temporarily enable a given plugin::

    with plugins.enable("name"):
        do_something()  # 'name' plugin temporarily enabled
    # plugins back to original state

---
## PluginRegistry
```python
from plugin_registry import PluginRegistry
```

A registry for plugins.

This is a plugin registry that allows plugins to be loaded/registered
in two ways:

1. Through an explicit call to ``.register(name, value)``.
2. By looking for other Python packages that are installed and provide
   a setuptools entry point group.

When you create an instance of this class, provide the name of the
entry point group to use::

    reg = PluginRegister("my_entrypoint_group")

---
## importlib_metadata_get
```python
from plugin_registry import importlib_metadata_get
```



---
## func
```python
from plugin_registry import func
```



---
## __init__
```python
from plugin_registry import __init__
```

Create a PluginRegistry for a named entry point group.

Parameters
----------
entry_point_group: str
    The name of the entry point group.
plugin_type
    A type narrowing function that will optionally be used for runtime
    type checking loaded plugins.

References
----------
https://typing.readthedocs.io/en/latest/spec/narrowing.html

---
## __str__
```python
from plugin_registry import __str__
```



---
## __enter__
```python
from plugin_registry import __enter__
```



---
## __exit__
```python
from plugin_registry import __exit__
```



---
## __repr__
```python
from plugin_registry import __repr__
```



---
## register
```python
from plugin_registry import register
```

Register a plugin by name and value.

This method is used for explicit registration of a plugin and shouldn't be
used to manage entry point managed plugins, which are auto-loaded.

Parameters
----------
name: str
    The name of the plugin.
value: PluginType or None
    The actual plugin object to register or None to unregister that plugin.

Returns
-------
plugin: PluginType or None
    The plugin that was registered or unregistered.

---
## names
```python
from plugin_registry import names
```

List the names of the registered and entry points plugins.

---
## _get_state
```python
from plugin_registry import _get_state
```

Return a dictionary representing the current state of the registry.

---
## _set_state
```python
from plugin_registry import _set_state
```

Reset the state of the registry.

---
## _enable
```python
from plugin_registry import _enable
```



---
## enable
```python
from plugin_registry import enable
```

Enable a plugin by name.

This can be either called directly, or used as a context manager.

Parameters
----------
name : string (optional)
    The name of the plugin to enable. If not specified, then use the
    current active name.
**options :
    Any additional parameters will be passed to the plugin as keyword
    arguments

Returns
-------
PluginEnabler:
    An object that allows enable() to be used as a context manager

---
## active
```python
from plugin_registry import active
```

Return the name of the currently active plugin.

---
## options
```python
from plugin_registry import options
```

Return the current options dictionary.

---
## get
```python
from plugin_registry import get
```

Return the currently active plugin.

---
## __name__
```python
from _importers import __name__
```



---
## import_vegafusion
```python
from _importers import import_vegafusion
```



---
## import_vl_convert
```python
from _importers import import_vl_convert
```



---
## vl_version_for_vl_convert
```python
from _importers import vl_version_for_vl_convert
```



---
## import_pyarrow_interchange
```python
from _importers import import_pyarrow_interchange
```



---
## pyarrow_available
```python
from _importers import pyarrow_available
```



---
## VegaLiteCompilerRegistry
```python
from compiler import VegaLiteCompilerRegistry
```



---
## ThemeRegistry
```python
from theme import ThemeRegistry
```



---
## enable
```python
from theme import enable
```

Enable a theme by name.

This can be either called directly, or used as a context manager.

Parameters
----------
name : string (optional)
    The name of the theme to enable. If not specified, then use the
    current active name.
**options :
    Any additional parameters will be passed to the theme as keyword
    arguments

Returns
-------
PluginEnabler:
    An object that allows enable() to be used as a context manager

Notes
-----
Default `vega` themes can be previewed at https://vega.github.io/vega-themes/

---
## __name__
```python
from schemapi import __name__
```



---
## enable_debug_mode
```python
from schemapi import enable_debug_mode
```



---
## disable_debug_mode
```python
from schemapi import disable_debug_mode
```



---
## debug_mode
```python
from schemapi import debug_mode
```



---
## validate_jsonschema
```python
from schemapi import validate_jsonschema
```

Validates the passed in spec against the schema in the context of the rootschema.

If any errors are found, they are deduplicated and prioritized
and only the most relevant errors are kept. Errors are then either raised
or returned, depending on the value of `raise_error`.

---
## _get_errors_from_spec
```python
from schemapi import _get_errors_from_spec
```

Uses the relevant jsonschema validator to validate the passed in spec against the schema using the rootschema to resolve references.

The schema and rootschema themselves are not validated but instead considered as valid.

---
## _get_json_schema_draft_url
```python
from schemapi import _get_json_schema_draft_url
```



---
## _use_referencing_library
```python
from schemapi import _use_referencing_library
```

In version 4.18.0, the jsonschema package deprecated RefResolver in favor of the referencing library.

---
## _prepare_references_in_schema
```python
from schemapi import _prepare_references_in_schema
```



---
## _get_referencing_registry
```python
from schemapi import _get_referencing_registry
```



---
## _json_path
```python
from schemapi import _json_path
```

Drop in replacement for the .json_path property of the jsonschema ValidationError class.

This is not available as property for ValidationError with jsonschema<4.0.1.

More info, see https://github.com/vega/altair/issues/3038.

---
## _group_errors_by_json_path
```python
from schemapi import _group_errors_by_json_path
```

Groups errors by the `json_path` attribute of the jsonschema ValidationError class.

This attribute contains the path to the offending element within
a chart specification and can therefore be considered as an identifier of an
'issue' in the chart that needs to be fixed.

---
## _get_leaves_of_error_tree
```python
from schemapi import _get_leaves_of_error_tree
```

For each error in `errors`, it traverses down the "error tree" that is generated by the jsonschema library to find and return all "leaf" errors.

These are errors which have no further errors that caused it and so they are the most specific errors
with the most specific error messages.

---
## _subset_to_most_specific_json_paths
```python
from schemapi import _subset_to_most_specific_json_paths
```

Removes key (json path), value (errors) pairs where the json path is fully contained in another json path.

For example if `errors_by_json_path` has two keys, `$.encoding.X` and `$.encoding.X.tooltip`,
then the first one will be removed and only the second one is returned.

This is done under the assumption that more specific json paths give more helpful error messages to the user.

---
## _contained_at_start_of_one_of_other_values
```python
from schemapi import _contained_at_start_of_one_of_other_values
```



---
## _deduplicate_errors
```python
from schemapi import _deduplicate_errors
```

Some errors have very similar error messages or are just in general not helpful for a user.

This function removes as many of these cases as possible and
can be extended over time to handle new cases that come up.

---
## _is_required_value_error
```python
from schemapi import _is_required_value_error
```



---
## _group_errors_by_validator
```python
from schemapi import _group_errors_by_validator
```

Groups the errors by the json schema "validator" that casued the error.

For example if the error is that a value is not one of an enumeration in the json schema
then the "validator" is `"enum"`, if the error is due to an unknown property that
was set although no additional properties are allowed then "validator" is
`"additionalProperties`, etc.

---
## _deduplicate_enum_errors
```python
from schemapi import _deduplicate_enum_errors
```

Deduplicate enum errors by removing the errors where the allowed values are a subset of another error.

For example, if `enum` contains two errors and one has `validator_value` (i.e. accepted values) ["A", "B"] and the
other one ["A", "B", "C"] then the first one is removed and the final
`enum` list only contains the error with ["A", "B", "C"].

---
## _deduplicate_additional_properties_errors
```python
from schemapi import _deduplicate_additional_properties_errors
```

If there are multiple additional property errors it usually means that the offending element was validated against multiple schemas and its parent is a common anyOf validator.

The error messages produced from these cases are usually
very similar and we just take the shortest one. For example,
the following 3 errors are raised for the `unknown` channel option in
`alt.X("variety", unknown=2)`:
- "Additional properties are not allowed ('unknown' was unexpected)"
- "Additional properties are not allowed ('field', 'unknown' were unexpected)"
- "Additional properties are not allowed ('field', 'type', 'unknown' were unexpected)".

---
## _deduplicate_by_message
```python
from schemapi import _deduplicate_by_message
```

Deduplicate errors by message. This keeps the original order in case it was chosen intentionally.

---
## _subclasses
```python
from schemapi import _subclasses
```

Breadth-first sequence of all classes which inherit from cls.

---
## _from_array_like
```python
from schemapi import _from_array_like
```



---
## _todict
```python
from schemapi import _todict
```

Convert an object to a dict representation.

---
## _resolve_references
```python
from schemapi import _resolve_references
```

Resolve schema references until there is no $ref anymore in the top-level of the dictionary.

---
## SchemaValidationError
```python
from schemapi import SchemaValidationError
```

A wrapper for jsonschema.ValidationError with friendlier traceback.

---
## UndefinedType
```python
from schemapi import UndefinedType
```

A singleton object for marking undefined parameters.

---
## is_undefined
```python
from schemapi import is_undefined
```

Type-safe singleton check for `UndefinedType`.

Notes
-----
- Using `obj is Undefined` does not narrow from `UndefinedType` in a union.
    - Due to the assumption that other `UndefinedType`'s could exist.
- Current [typing spec advises](https://typing.readthedocs.io/en/latest/spec/concepts.html#support-for-singleton-types-in-unions) using an `Enum`.
    - Otherwise, requires an explicit guard to inform the type checker.

---
## _shallow_copy
```python
from schemapi import _shallow_copy
```



---
## _deep_copy
```python
from schemapi import _deep_copy
```



---
## SchemaBase
```python
from schemapi import SchemaBase
```

Base class for schema wrappers.

Each derived class should set the _schema class attribute (and optionally
the _rootschema class attribute) which is used for validation.

---
## _is_dict
```python
from schemapi import _is_dict
```



---
## _is_list
```python
from schemapi import _is_list
```



---
## _is_iterable
```python
from schemapi import _is_iterable
```



---
## _passthrough
```python
from schemapi import _passthrough
```



---
## _FromDict
```python
from schemapi import _FromDict
```

Class used to construct SchemaBase class hierarchies from a dict.

The primary purpose of using this class is to be able to build a hash table
that maps schemas to their wrapper classes. The candidate classes are
specified in the ``wrapper_classes`` positional-only argument to the constructor.

---
## _PropertySetter
```python
from schemapi import _PropertySetter
```



---
## with_property_setters
```python
from schemapi import with_property_setters
```

Decorator to add property setters to a Schema class.

---
## _prepare_refs
```python
from schemapi import _prepare_refs
```

Add _VEGA_LITE_ROOT_URI in front of all $ref values.

This function recursively iterates through the whole dictionary.

$ref values can only be nested in dictionaries or lists
as the passed in `d` dictionary comes from the Vega-Lite json schema
and in json we only have arrays (-> lists in Python) and objects
(-> dictionaries in Python) which we need to iterate through.

---
## __init__
```python
from schemapi import __init__
```



---
## __str__
```python
from schemapi import __str__
```



---
## _get_message
```python
from schemapi import _get_message
```



---
## _get_message_for_errors_group
```python
from schemapi import _get_message_for_errors_group
```



---
## _get_additional_properties_error_message
```python
from schemapi import _get_additional_properties_error_message
```

Output all existing parameters when an unknown parameter is specified.

---
## _get_altair_class_for_error
```python
from schemapi import _get_altair_class_for_error
```

Try to get the lowest class possible in the chart hierarchy so it can be displayed in the error message.

This should lead to more informative error messages pointing the user closer to the source of the issue.

---
## _format_params_as_table
```python
from schemapi import _format_params_as_table
```

Format param names into a table so that they are easier to read.

---
## _get_default_error_message
```python
from schemapi import _get_default_error_message
```



---
## __new__
```python
from schemapi import __new__
```



---
## __repr__
```python
from schemapi import __repr__
```



---
## copy
```python
from schemapi import copy
```

Return a copy of the object.

Parameters
----------
deep : boolean or list, optional
    If True (default) then return a deep copy of all dict, list, and
    SchemaBase objects within the object structure.
    If False, then only copy the top object.
    If a list or iterable, then only copy the listed attributes.
ignore : list, optional
    A list of keys for which the contents should not be copied, but
    only stored by reference.

---
## _get
```python
from schemapi import _get
```

Get an attribute, returning default if not present.

---
## __getattr__
```python
from schemapi import __getattr__
```



---
## __setattr__
```python
from schemapi import __setattr__
```



---
## __getitem__
```python
from schemapi import __getitem__
```



---
## __setitem__
```python
from schemapi import __setitem__
```



---
## __eq__
```python
from schemapi import __eq__
```



---
## to_dict
```python
from schemapi import to_dict
```

Return a dictionary representation of the object.

Parameters
----------
validate : bool, optional
    If True (default), then validate the output dictionary
    against the schema.
ignore : list[str], optional
    A list of keys to ignore. It is usually not needed
    to specify this argument as a user.
context : dict[str, Any], optional
    A context dictionary. It is usually not needed
    to specify this argument as a user.

Notes
-----
Technical: The ignore parameter will *not* be passed to child to_dict
function calls.

Returns
-------
dict
    The dictionary representation of this object

Raises
------
SchemaValidationError :
    if validate=True and the dict does not conform to the schema

---
## to_json
```python
from schemapi import to_json
```

Emit the JSON representation for this object as a string.

Parameters
----------
validate : bool, optional
    If True (default), then validate the output dictionary
    against the schema.
indent : int, optional
    The number of spaces of indentation to use. The default is 2.
sort_keys : bool, optional
    If True (default), sort keys in the output.
ignore : list[str], optional
    A list of keys to ignore. It is usually not needed
    to specify this argument as a user.
context : dict[str, Any], optional
    A context dictionary. It is usually not needed
    to specify this argument as a user.
**kwargs
    Additional keyword arguments are passed to ``json.dumps()``

Notes
-----
Technical: The ignore parameter will *not* be passed to child to_dict
function calls.

Returns
-------
str
    The JSON specification of the chart object.

---
## _default_wrapper_classes
```python
from schemapi import _default_wrapper_classes
```

Return the set of classes used within cls.from_dict().

---
## from_dict
```python
from schemapi import from_dict
```

Construct an object from a dict representation.

---
## from_json
```python
from schemapi import from_json
```

Instantiate the object from a valid JSON string.

Parameters
----------
json_string : string
    The string containing a valid JSON chart specification.
validate : boolean
    If True (default), then validate the input against the schema.
**kwargs :
    Additional keyword arguments are passed to json.loads

Returns
-------
chart : Chart object
    The altair Chart object built from the specification.

---
## validate
```python
from schemapi import validate
```

Validate the instance against the class schema in the context of the rootschema.

---
## resolve_references
```python
from schemapi import resolve_references
```

Resolve references in the context of this object's schema or root schema.

---
## validate_property
```python
from schemapi import validate_property
```

Validate a property against property schema in the context of the rootschema.

---
## __dir__
```python
from schemapi import __dir__
```



---
## hash_schema
```python
from schemapi import hash_schema
```

Compute a python hash for a nested dictionary which properly handles dicts, lists, sets, and tuples.

At the top level, the function excludes from the hashed schema all keys
listed in `exclude_keys`.

This implements two methods: one based on conversion to JSON, and one based
on recursive conversions of unhashable to hashable types; the former seems
to be slightly faster in several benchmarks.

---
## __get__
```python
from schemapi import __get__
```



---
## __call__
```python
from schemapi import __call__
```



---
## indent_second_line_onwards
```python
from schemapi import indent_second_line_onwards
```



---
## split_into_equal_parts
```python
from schemapi import split_into_equal_parts
```



---
## _freeze
```python
from schemapi import _freeze
```



---
## AltairDeprecationWarning
```python
from deprecation import AltairDeprecationWarning
```



---
## _format_message
```python
from deprecation import _format_message
```



---
## deprecated
```python
from deprecation import deprecated
```

Decorator to mark a function, a class, or a property as deprecated.

When deprecating a classmethod, a staticmethod, or a property, the
``@deprecated`` decorator should go *under* ``@classmethod`` and
``@staticmethod`` (i.e., `deprecated` should directly decorate the
underlying callable), but *over* ``@property``.

When deprecating a class ``C`` intended to be used as a base class in a
multiple inheritance hierarchy, ``C`` *must* define an ``__init__`` method
(if ``C`` instead inherited its ``__init__`` from its own base class, then
``@deprecated`` would mess up ``__init__`` inheritance when installing its
own (deprecation-emitting) ``C.__init__``).

Parameters are the same as for `warn_deprecated`, except that *obj_type*
defaults to 'class' if decorating a class, 'attribute' if decorating a
property, and 'function' otherwise.

Examples
--------
::

    @deprecated('1.4.0')
    def the_function_to_deprecate():
        pass

---
## deprecated_warn
```python
from deprecation import deprecated_warn
```

Indicate that the current code path is deprecated.

This should be used for non-trivial cases *only*. ``@deprecated`` should
always be preferred as it is recognized by static type checkers.

Parameters
----------
message
    Explanation of the deprecated behaviour.

    .. note::
        Unlike ``@deprecated``, this is *not* optional.

version
    ``altair`` version the deprecation first appeared.
alternative
    Suggested replacement argument/method/function.
category
    The runtime warning type emitted.
stacklevel
    How far up the call stack to make this warning appear.
    A value of ``2`` attributes the warning to the caller
    of the code calling ``deprecated_warn()``.

References
----------
[warnings.warn](https://docs.python.org/3/library/warnings.html#warnings.warn)

---
## spec_to_html
```python
from html import spec_to_html
```

Embed a Vega/Vega-Lite spec into an HTML page.

Parameters
----------
spec : dict
    a dictionary representing a vega-lite plot spec.
mode : string {'vega' | 'vega-lite'}
    The rendering mode. This value is overridden by embed_options['mode'],
    if it is present.
vega_version : string
    For html output, the version of vega.js to use.
vegalite_version : string
    For html output, the version of vegalite.js to use.
vegaembed_version : string
    For html output, the version of vegaembed.js to use.
base_url : string (optional)
    The base url from which to load the javascript libraries.
output_div : string (optional)
    The id of the div element where the plot will be shown.
embed_options : dict (optional)
    Dictionary of options to pass to the vega-embed script. Default
    entry is {'mode': mode}.
json_kwds : dict (optional)
    Dictionary of keywords to pass to json.dumps().
fullhtml : boolean (optional)
    If True (default) then return a full html page. If False, then return
    an HTML snippet that can be embedded into an HTML page.
requirejs : boolean (optional)
    If False (default) then load libraries from base_url using <script>
    tags. If True, then load libraries using requirejs
template : jinja2.Template or string (optional)
    Specify the template to use (default = 'standard'). If template is a
    string, it must be one of {'universal', 'standard', 'inline'}. Otherwise, it
    can be a jinja2.Template object containing a custom template.

Returns
-------
output : string
    an HTML string for rendering the chart.

---
## DataFrameLike
```python
from core import DataFrameLike
```



---
## infer_vegalite_type_for_pandas
```python
from core import infer_vegalite_type_for_pandas
```

From an array-like input, infer the correct vega typecode.

('ordinal', 'nominal', 'quantitative', or 'temporal').

Parameters
----------
data: object

---
## merge_props_geom
```python
from core import merge_props_geom
```

Merge properties with geometry.

* Overwrites 'type' and 'geometry' entries if existing.

---
## sanitize_geo_interface
```python
from core import sanitize_geo_interface
```

Santize a geo_interface to prepare it for serialization.

* Make a copy
* Convert type array or _Array to list
* Convert tuples to lists (using json.loads/dumps)
* Merge properties with geometry

---
## numpy_is_subtype
```python
from core import numpy_is_subtype
```



---
## sanitize_pandas_dataframe
```python
from core import sanitize_pandas_dataframe
```

Sanitize a DataFrame to prepare it for serialization.

* Make a copy
* Convert RangeIndex columns to strings
* Raise ValueError if column names are not strings
* Raise ValueError if it has a hierarchical index.
* Convert categoricals to strings.
* Convert np.bool_ dtypes to Python bool objects
* Convert np.int dtypes to Python int objects
* Convert floats to objects and replace NaNs/infs with None.
* Convert DateTime dtypes into appropriate string representations
* Convert Nullable integers to objects and replace NaN with None
* Convert Nullable boolean to objects and replace NaN with None
* convert dedicated string column to objects and replace NaN with None
* Raise a ValueError for TimeDelta dtypes

---
## sanitize_narwhals_dataframe
```python
from core import sanitize_narwhals_dataframe
```

Sanitize narwhals.DataFrame for JSON serialization.

---
## to_eager_narwhals_dataframe
```python
from core import to_eager_narwhals_dataframe
```

Wrap `data` in `narwhals.DataFrame`.

If `data` is not supported by Narwhals, but it is convertible
to a PyArrow table, then first convert to a PyArrow Table,
and then wrap in `narwhals.DataFrame`.

---
## parse_shorthand
```python
from core import parse_shorthand
```

General tool to parse shorthand values.

These are of the form:

- "col_name"
- "col_name:O"
- "average(col_name)"
- "average(col_name):O"

Optionally, a dataframe may be supplied, from which the type
will be inferred if not specified in the shorthand.

Parameters
----------
shorthand : dict or string
    The shorthand representation to be parsed
data : DataFrame, optional
    If specified and of type DataFrame, then use these values to infer the
    column type if not provided by the shorthand.
parse_aggregates : boolean
    If True (default), then parse aggregate functions within the shorthand.
parse_window_ops : boolean
    If True then parse window operations within the shorthand (default:False)
parse_timeunits : boolean
    If True (default), then parse timeUnits from within the shorthand
parse_types : boolean
    If True (default), then parse typecodes within the shorthand

Returns
-------
attrs : dict
    a dictionary of attributes extracted from the shorthand

Examples
--------
>>> import pandas as pd
>>> data = pd.DataFrame({"foo": ["A", "B", "A", "B"], "bar": [1, 2, 3, 4]})

>>> parse_shorthand("name") == {"field": "name"}
True

>>> parse_shorthand("name:Q") == {"field": "name", "type": "quantitative"}
True

>>> parse_shorthand("average(col)") == {"aggregate": "average", "field": "col"}
True

>>> parse_shorthand("foo:O") == {"field": "foo", "type": "ordinal"}
True

>>> parse_shorthand("min(foo):Q") == {
...     "aggregate": "min",
...     "field": "foo",
...     "type": "quantitative",
... }
True

>>> parse_shorthand("month(col)") == {
...     "field": "col",
...     "timeUnit": "month",
...     "type": "temporal",
... }
True

>>> parse_shorthand("year(col):O") == {
...     "field": "col",
...     "timeUnit": "year",
...     "type": "ordinal",
... }
True

>>> parse_shorthand("foo", data) == {"field": "foo", "type": "nominal"}
True

>>> parse_shorthand("bar", data) == {"field": "bar", "type": "quantitative"}
True

>>> parse_shorthand("bar:O", data) == {"field": "bar", "type": "ordinal"}
True

>>> parse_shorthand("sum(bar)", data) == {
...     "aggregate": "sum",
...     "field": "bar",
...     "type": "quantitative",
... }
True

>>> parse_shorthand("count()", data) == {
...     "aggregate": "count",
...     "type": "quantitative",
... }
True

---
## infer_vegalite_type_for_narwhals
```python
from core import infer_vegalite_type_for_narwhals
```



---
## use_signature
```python
from core import use_signature
```

Apply call signature and documentation of `obj` to the decorated method.

---
## update_nested
```python
from core import update_nested
```

Update nested dictionaries.

Parameters
----------
original : MutableMapping
    the original (nested) dictionary, which will be updated in-place
update : Mapping
    the nested dictionary of updates
copy : bool, default False
    if True, then copy the original dictionary rather than modifying it

Returns
-------
original : MutableMapping
    a reference to the (modified) original dict

Examples
--------
>>> original = {"x": {"b": 2, "c": 4}}
>>> update = {"x": {"b": 5, "d": 6}, "y": 40}
>>> update_nested(original, update)  # doctest: +SKIP
{'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}
>>> original  # doctest: +SKIP
{'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}

---
## display_traceback
```python
from core import display_traceback
```



---
## _ChannelCache
```python
from core import _ChannelCache
```



---
## _init_channel_to_name
```python
from core import _init_channel_to_name
```

Construct a dictionary of channel type to encoding name.

Note
----
The return type is not expressible using annotations, but is used
internally by `mypy`/`pyright` and avoids the need for type ignores.

Returns
-------
    mapping: dict[type[`<subclass of FieldChannelMixin and SchemaBase>`] | type[`<subclass of ValueChannelMixin and SchemaBase>`] | type[`<subclass of DatumChannelMixin and SchemaBase>`], str]

---
## _invert_group_channels
```python
from core import _invert_group_channels
```

Grouped inverted index for `_ChannelCache.channel_to_name`.

---
## infer_encoding_types
```python
from core import infer_encoding_types
```



---
## __dataframe__
```python
from core import __dataframe__
```



---
## to_list_if_array
```python
from core import to_list_if_array
```



---
## decorate
```python
from core import decorate
```



---
## from_channels
```python
from core import from_channels
```



---
## from_cache
```python
from core import from_cache
```



---
## get_encoding
```python
from core import get_encoding
```



---
## _wrap_in_channel
```python
from core import _wrap_in_channel
```



---
## _reduce
```python
from core import _reduce
```

Returns a 1-2 item dict, per channel.

Never includes `datum`, as it is never utilized in `wrap_in_channel`.

---
## __name__
```python
from _vegafusion_data import __name__
```



---
## _ToVegaFusionReturnUrlDict
```python
from _vegafusion_data import _ToVegaFusionReturnUrlDict
```



---
## vegafusion_data_transformer
```python
from _vegafusion_data import vegafusion_data_transformer
```

VegaFusion Data Transformer.

---
## get_inline_table_names
```python
from _vegafusion_data import get_inline_table_names
```

Get a set of the inline datasets names in the provided Vega spec.

Inline datasets are encoded as URLs that start with the table://
prefix.

Parameters
----------
vega_spec: dict
    A Vega specification dict

Returns
-------
set of str
    Set of the names of the inline datasets that are referenced
    in the specification.

Examples
--------
>>> spec = {
...     "data": [
...         {"name": "foo", "url": "https://path/to/file.csv"},
...         {"name": "bar", "url": "vegafusion+dataset://inline_dataset_123"},
...     ]
... }
>>> get_inline_table_names(spec)
{'inline_dataset_123'}

---
## get_inline_tables
```python
from _vegafusion_data import get_inline_tables
```

Get the inline tables referenced by a Vega specification.

Note: This function should only be called on a Vega spec that corresponds
to a chart that was processed by the vegafusion_data_transformer.
Furthermore, this function may only be called once per spec because
the returned dataframes are deleted from internal storage.

Parameters
----------
vega_spec: dict
    A Vega specification dict

Returns
-------
dict from str to dataframe
    dict from inline dataset name to dataframe object

---
## compile_to_vegafusion_chart_state
```python
from _vegafusion_data import compile_to_vegafusion_chart_state
```

Compile a Vega-Lite spec to a VegaFusion ChartState.

Note: This function should only be called on a Vega-Lite spec
that was generated with the "vegafusion" data transformer enabled.
In particular, this spec may contain references to extract datasets
using table:// prefixed URLs.

Parameters
----------
vegalite_spec: dict
    A Vega-Lite spec that was generated from an Altair chart with
    the "vegafusion" data transformer enabled
local_tz: str
    Local timezone name (e.g. 'America/New_York')

Returns
-------
ChartState
    A VegaFusion ChartState object

---
## compile_with_vegafusion
```python
from _vegafusion_data import compile_with_vegafusion
```

Compile a Vega-Lite spec to Vega and pre-transform with VegaFusion.

Note: This function should only be called on a Vega-Lite spec
that was generated with the "vegafusion" data transformer enabled.
In particular, this spec may contain references to extract datasets
using table:// prefixed URLs.

Parameters
----------
vegalite_spec: dict
    A Vega-Lite spec that was generated from an Altair chart with
    the "vegafusion" data transformer enabled

Returns
-------
dict
    A Vega spec that has been pre-transformed by VegaFusion

---
## handle_row_limit_exceeded
```python
from _vegafusion_data import handle_row_limit_exceeded
```



---
## using_vegafusion
```python
from _vegafusion_data import using_vegafusion
```

Check whether the vegafusion data transformer is enabled.

---
## __name__
```python
from display import __name__
```

Unopinionated display configuration.

---
## RendererRegistry
```python
from display import RendererRegistry
```



---
## Displayable
```python
from display import Displayable
```

A base display class for VegaLite v1/v2.

This class takes a VegaLite v1/v2 spec and does the following:

1. Optionally validates the spec against a schema.
2. Uses the RendererPlugin to grab a renderer and call it when the
   IPython/Jupyter display method (_repr_mimebundle_) is called.

The spec passed to this class must be fully schema compliant and already
have the data portion of the spec fully processed and ready to serialize.
In practice, this means, the data portion of the spec should have been passed
through appropriate data model transformers.

---
## default_renderer_base
```python
from display import default_renderer_base
```

A default renderer for Vega or VegaLite that works for modern frontends.

This renderer works with modern frontends (JupyterLab, nteract) that know
how to render the custom VegaLite MIME type listed above.

---
## json_renderer_base
```python
from display import json_renderer_base
```

A renderer that returns a MIME type of application/json.

In JupyterLab/nteract this is rendered as a nice JSON tree.

---
## HTMLRenderer
```python
from display import HTMLRenderer
```

Object to render charts as HTML, with a unique output div each time.

---
## set_embed_options
```python
from display import set_embed_options
```

Set options for embeddings of Vega & Vega-Lite charts.

Options are fully documented at https://github.com/vega/vega-embed.
Similar to the `enable()` method, this can be used as either
a persistent global switch, or as a temporary local setting using
a context manager (i.e. a `with` statement).

Parameters
----------
defaultStyle : bool or string
    Specify a default stylesheet for embed actions.
renderer : string
    The renderer to use for the view. One of "canvas" (default) or "svg"
width : integer
    The view width in pixels
height : integer
    The view height in pixels
padding : integer
    The view padding in pixels
scaleFactor : number
    The number by which to multiply the width and height (default 1)
    of an exported PNG or SVG image.
actions : bool or dict
    Determines if action links ("Export as PNG/SVG", "View Source",
    "View Vega" (only for Vega-Lite), "Open in Vega Editor") are
    included with the embedded view. If the value is true, all action
    links will be shown and none if the value is false. This property
    can take a key-value mapping object that maps keys (export, source,
    compiled, editor) to boolean values for determining if
    each action link should be shown.
format_locale : str or dict
    d3-format locale name or dictionary. Defaults to "en-US" for United States English.
    See https://github.com/d3/d3-format/tree/main/locale for available names and example
    definitions.
time_format_locale : str or dict
    d3-time-format locale name or dictionary. Defaults to "en-US" for United States English.
    See https://github.com/d3/d3-time-format/tree/main/locale for available names and example
    definitions.
**kwargs :
    Additional options are passed directly to embed options.

---
## __init__
```python
from display import __init__
```



---
## _validate
```python
from display import _validate
```

Validate the spec against the schema.

---
## _repr_mimebundle_
```python
from display import _repr_mimebundle_
```

Return a MIME bundle for display in Jupyter frontends.

---
## output_div
```python
from display import output_div
```



---
## __call__
```python
from display import __call__
```



---
## __name__
```python
from execeval import __name__
```



---
## _CatchDisplay
```python
from execeval import _CatchDisplay
```

Class to temporarily catch sys.displayhook.

---
## eval_block
```python
from execeval import eval_block
```

Execute a multi-line block of code in the given namespace.

If the final statement in the code is an expression, return
the result of the expression.

---
## __init__
```python
from execeval import __init__
```



---
## __enter__
```python
from execeval import __enter__
```



---
## __exit__
```python
from execeval import __exit__
```



---
## __call__
```python
from execeval import __call__
```



---
## __name__
```python
from _dfi_types import __name__
```



---
## DtypeKind
```python
from _dfi_types import DtypeKind
```

Integer enum for data types.

Attributes
----------
INT : int
    Matches to signed integer data type.
UINT : int
    Matches to unsigned integer data type.
FLOAT : int
    Matches to floating point data type.
BOOL : int
    Matches to boolean data type.
STRING : int
    Matches to string data type (UTF-8 encoded).
DATETIME : int
    Matches to datetime data type.
CATEGORICAL : int
    Matches to categorical data type.

---
## Column
```python
from _dfi_types import Column
```



---
## DataFrame
```python
from _dfi_types import DataFrame
```

A data frame class, with only the methods required by the interchange protocol defined.

A "data frame" represents an ordered collection of named columns.
A column's "name" must be a unique string.
Columns may be accessed by name or by position.

This could be a public data frame class, or an object with the methods and
attributes defined on this DataFrame class could be returned from the
``__dataframe__`` method of a public data frame class in a library adhering
to the dataframe interchange protocol specification.

---
## dtype
```python
from _dfi_types import dtype
```

Dtype description as a tuple ``(kind, bit-width, format string, endianness)``.

Bit-width : the number of bits as an integer
Format string : data type description format string in Apache Arrow C
                Data Interface format.
Endianness : current only native endianness (``=``) is supported

Notes
-----
    - Kind specifiers are aligned with DLPack where possible (hence the
      jump to 20, leave enough room for future extension)
    - Masks must be specified as boolean with either bit width 1 (for bit
      masks) or 8 (for byte masks).
    - Dtype width in bits was preferred over bytes
    - Endianness isn't too useful, but included now in case in the future
      we need to support non-native endianness
    - Went with Apache Arrow format strings over NumPy format strings
      because they're more complete from a dataframe perspective
    - Format strings are mostly useful for datetime specification, and
      for categoricals.
    - For categoricals, the format string describes the type of the
      categorical in the data buffer. In case of a separate encoding of
      the categorical (e.g. an integer to string mapping), this can
      be derived from ``self.describe_categorical``.
    - Data types not included: complex, Arrow-style null, binary, decimal,
      and nested (list, struct, map, union) dtypes.

---
## describe_categorical
```python
from _dfi_types import describe_categorical
```

If the dtype is categorical, there are two options.

- There are only values in the data buffer.
- There is a separate non-categorical Column encoding categorical values.

Raises TypeError if the dtype is not categorical

Returns the dictionary with description on how to interpret the data buffer:
    - "is_ordered" : bool, whether the ordering of dictionary indices is
                     semantically meaningful.
    - "is_dictionary" : bool, whether a mapping of
                        categorical values to other objects exists
    - "categories" : Column representing the (implicit) mapping of indices to
                     category values (e.g. an array of cat1, cat2, ...).
                     None if not a dictionary-style categorical.

TBD: are there any other in-memory representations that are needed?

---
## __dataframe__
```python
from _dfi_types import __dataframe__
```

Construct a new exchange object, potentially changing the parameters.

``nan_as_null`` is a keyword intended for the consumer to tell the
producer to overwrite null values in the data with ``NaN``.
It is intended for cases where the consumer does not support the bit
mask or byte mask that is the producer's native representation.
``allow_copy`` is a keyword that defines whether or not the library is
allowed to make a copy of the data. For example, copying data would be
necessary if a library supports strided buffers, given that this protocol
specifies contiguous buffers.

---
## column_names
```python
from _dfi_types import column_names
```

Return an iterator yielding the column names.

---
## get_column_by_name
```python
from _dfi_types import get_column_by_name
```

Return the column whose name is the indicated name.

---
## get_chunks
```python
from _dfi_types import get_chunks
```

Return an iterator yielding the chunks.

By default (None), yields the chunks that the data is stored as by the
producer. If given, ``n_chunks`` must be a multiple of
``self.num_chunks()``, meaning the producer must subdivide each chunk
before yielding it.

Note that the producer must ensure that all columns are chunked the
same way.

---
## __name__
```python
from _transformed_data import __name__
```



---
## transformed_data
```python
from _transformed_data import transformed_data
```

Evaluate a Chart's transforms.

Evaluate the data transforms associated with a Chart and return the
transformed data as one or more DataFrames

Parameters
----------
chart : Chart, FacetChart, LayerChart, HConcatChart, VConcatChart, or ConcatChart
    Altair chart to evaluate transforms on
row_limit : int (optional)
    Maximum number of rows to return for each DataFrame. None (default) for unlimited
exclude : iterable of str
    Set of the names of charts to exclude

Returns
-------
DataFrame or list of DataFrames or None
    If input chart is a Chart or Facet Chart, returns a DataFrame of the
    transformed data. Otherwise, returns a list of DataFrames of the
    transformed data

---
## name_views
```python
from _transformed_data import name_views
```

Name unnamed chart views.

Name unnamed charts views so that we can look them up later in
the compiled Vega spec.

Note: This function mutates the input chart by applying names to
unnamed views.

Parameters
----------
chart : Chart, FacetChart, LayerChart, HConcatChart, VConcatChart, or ConcatChart
    Altair chart to apply names to
i : int (default 0)
    Starting chart index
exclude : iterable of str
    Names of charts to exclude

Returns
-------
list of str
    List of the names of the charts and subcharts

---
## get_group_mark_for_scope
```python
from _transformed_data import get_group_mark_for_scope
```

Get the group mark at a particular scope.

Parameters
----------
vega_spec : dict
    Top-level Vega specification dictionary
scope : tuple of int
    Scope tuple. If empty, the original Vega specification is returned.
    Otherwise, the nested group mark at the scope specified is returned.

Returns
-------
dict or None
    Top-level Vega spec (if scope is empty)
    or group mark (if scope is non-empty)
    or None (if group mark at scope does not exist)

Examples
--------
>>> spec = {
...     "marks": [
...         {"type": "group", "marks": [{"type": "symbol"}]},
...         {"type": "group", "marks": [{"type": "rect"}]},
...     ]
... }
>>> get_group_mark_for_scope(spec, (1,))
{'type': 'group', 'marks': [{'type': 'rect'}]}

---
## get_datasets_for_scope
```python
from _transformed_data import get_datasets_for_scope
```

Get the names of the datasets that are defined at a given scope.

Parameters
----------
vega_spec : dict
    Top-leve Vega specification
scope : tuple of int
    Scope tuple. If empty, the names of top-level datasets are returned
    Otherwise, the names of the datasets defined in the nested group mark
    at the specified scope are returned.

Returns
-------
list of str
    List of the names of the datasets defined at the specified scope

Examples
--------
>>> spec = {
...     "data": [{"name": "data1"}],
...     "marks": [
...         {
...             "type": "group",
...             "data": [{"name": "data2"}],
...             "marks": [{"type": "symbol"}],
...         },
...         {
...             "type": "group",
...             "data": [
...                 {"name": "data3"},
...                 {"name": "data4"},
...             ],
...             "marks": [{"type": "rect"}],
...         },
...     ],
... }

>>> get_datasets_for_scope(spec, ())
['data1']

>>> get_datasets_for_scope(spec, (0,))
['data2']

>>> get_datasets_for_scope(spec, (1,))
['data3', 'data4']

Returns empty when no group mark exists at scope
>>> get_datasets_for_scope(spec, (1, 3))
[]

---
## get_definition_scope_for_data_reference
```python
from _transformed_data import get_definition_scope_for_data_reference
```

Return the scope that a dataset is defined at, for a given usage scope.

Parameters
----------
vega_spec: dict
    Top-level Vega specification
data_name: str
    The name of a dataset reference
usage_scope: tuple of int
    The scope that the dataset is referenced in

Returns
-------
tuple of int
    The scope where the referenced dataset is defined,
    or None if no such dataset is found

Examples
--------
>>> spec = {
...     "data": [{"name": "data1"}],
...     "marks": [
...         {
...             "type": "group",
...             "data": [{"name": "data2"}],
...             "marks": [
...                 {
...                     "type": "symbol",
...                     "encode": {
...                         "update": {
...                             "x": {"field": "x", "data": "data1"},
...                             "y": {"field": "y", "data": "data2"},
...                         }
...                     },
...                 }
...             ],
...         }
...     ],
... }

data1 is referenced at scope [0] and defined at scope []
>>> get_definition_scope_for_data_reference(spec, "data1", (0,))
()

data2 is referenced at scope [0] and defined at scope [0]
>>> get_definition_scope_for_data_reference(spec, "data2", (0,))
(0,)

If data2 is not visible at scope [] (the top level),
because it's defined in scope [0]
>>> repr(get_definition_scope_for_data_reference(spec, "data2", ()))
'None'

---
## get_facet_mapping
```python
from _transformed_data import get_facet_mapping
```

Create mapping from facet definitions to source datasets.

Parameters
----------
group : dict
    Top-level Vega spec or nested group mark
scope : tuple of int
    Scope of the group dictionary within a top-level Vega spec

Returns
-------
dict
    Dictionary from (facet_name, facet_scope) to (dataset_name, dataset_scope)

Examples
--------
>>> spec = {
...     "data": [{"name": "data1"}],
...     "marks": [
...         {
...             "type": "group",
...             "from": {
...                 "facet": {
...                     "name": "facet1",
...                     "data": "data1",
...                     "groupby": ["colA"],
...                 }
...             },
...         }
...     ],
... }
>>> get_facet_mapping(spec)
{('facet1', (0,)): ('data1', ())}

---
## get_from_facet_mapping
```python
from _transformed_data import get_from_facet_mapping
```

Apply facet mapping to a scoped dataset.

Parameters
----------
scoped_dataset : (str, tuple of int)
    A dataset name and scope tuple
facet_mapping : dict from (str, tuple of int) to (str, tuple of int)
    The facet mapping produced by get_facet_mapping

Returns
-------
(str, tuple of int)
    Dataset name and scope tuple that has been mapped as many times as possible

Examples
--------
Facet mapping as produced by get_facet_mapping
>>> facet_mapping = {
...     ("facet1", (0,)): ("data1", ()),
...     ("facet2", (0, 1)): ("facet1", (0,)),
... }
>>> get_from_facet_mapping(("facet2", (0, 1)), facet_mapping)
('data1', ())

---
## get_datasets_for_view_names
```python
from _transformed_data import get_datasets_for_view_names
```

Get the Vega datasets that correspond to the provided Altair view names.

Parameters
----------
group : dict
    Top-level Vega spec or nested group mark
vl_chart_names : list of str
    List of the Vega-Lite
facet_mapping : dict from (str, tuple of int) to (str, tuple of int)
    The facet mapping produced by get_facet_mapping
scope : tuple of int
    Scope of the group dictionary within a top-level Vega spec

Returns
-------
dict from str to (str, tuple of int)
    Dict from Altair view names to scoped datasets

---
## __name__
```python
from selection import __name__
```



---
## IndexSelection
```python
from selection import IndexSelection
```

Represents the state of an alt.selection_point() when neither the fields nor encodings arguments are specified.

The value field is a list of zero-based indices into the
selected dataset.

Note: These indices only apply to the input DataFrame
for charts that do not include aggregations (e.g. a scatter chart).

---
## PointSelection
```python
from selection import PointSelection
```

Represents the state of an alt.selection_point() when the fields or encodings arguments are specified.

The value field is a list of dicts of the form:
    [{"dim1": 1, "dim2": "A"}, {"dim1": 2, "dim2": "BB"}]

where "dim1" and "dim2" are dataset columns and the dict values
correspond to the specific selected values.

---
## IntervalSelection
```python
from selection import IntervalSelection
```

Represents the state of an alt.selection_interval().

The value field is a dict of the form:
    {"dim1": [0, 10], "dim2": ["A", "BB", "CCC"]}

where "dim1" and "dim2" are dataset columns and the dict values
correspond to the selected range.

---
## from_vega
```python
from selection import from_vega
```

Construct an IntervalSelection from the raw Vega signal and dataset values.

Parameters
----------
name: str
    The selection's name
signal: dict or None
    The value of the Vega signal corresponding to the selection
store: list
    The value of the Vega dataset corresponding to the selection.
    This dataset is named "{name}_store" in the Vega view.

Returns
-------
PointSelection

---
## __name__
```python
from mimebundle import __name__
```



---
## spec_to_mimebundle
```python
from mimebundle import spec_to_mimebundle
```

Convert a vega-lite specification to a mimebundle.

The mimebundle type is controlled by the ``format`` argument, which can be
one of the following ['html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite']

Parameters
----------
spec : dict
    a dictionary representing a vega-lite plot spec
format : string {'html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite'}
    the file format to be saved.
mode : string {'vega-lite'}
    The rendering mode.
vega_version : string
    The version of vega.js to use
vegaembed_version : string
    The version of vegaembed.js to use
vegalite_version : string
    The version of vegalite.js to use. Only required if mode=='vega-lite'
embed_options : dict (optional)
    The vegaEmbed options dictionary. Defaults to the embed options set with
    alt.renderers.set_embed_options().
    (See https://github.com/vega/vega-embed for details)
engine: string {'vl-convert'}
    the conversion engine to use for 'png', 'svg', 'pdf', and 'vega' formats
**kwargs :
    Additional arguments will be passed to the generating function

Returns
-------
output : dict
    a mime-bundle representing the image

Note
----
The png, svg, pdf, and vega outputs require the vl-convert package

---
## _spec_to_mimebundle_with_engine
```python
from mimebundle import _spec_to_mimebundle_with_engine
```

Helper for Vega-Lite to mimebundle conversions that require an engine.

Parameters
----------
spec : dict
    a dictionary representing a vega-lite plot spec
format : string {'png', 'svg', 'pdf', 'vega'}
    the format of the mimebundle to be returned
mode : string {'vega-lite', 'vega'}
    The rendering mode.
engine: string {'vl-convert'}
    the conversion engine to use
format_locale : str or dict
    d3-format locale name or dictionary. Defaults to "en-US" for United States English.
    See https://github.com/d3/d3-format/tree/main/locale for available names and example
    definitions.
time_format_locale : str or dict
    d3-time-format locale name or dictionary. Defaults to "en-US" for United States English.
    See https://github.com/d3/d3-time-format/tree/main/locale for available names and example
    definitions.
**kwargs :
    Additional arguments will be passed to the conversion function

---
## _validate_normalize_engine
```python
from mimebundle import _validate_normalize_engine
```

Helper to validate and normalize the user-provided engine.

engine : {None, 'vl-convert'}
    the user-provided engine string
format : string {'png', 'svg', 'pdf', 'vega'}
    the format of the mimebundle to be returned

---
## _pngxy
```python
from mimebundle import _pngxy
```

read the (width, height) from a PNG header.

Taken from IPython.display

---
## preprocess_embed_options
```python
from mimebundle import preprocess_embed_options
```

Preprocess embed options to a form compatible with Vega Embed.

Parameters
----------
embed_options : dict
    The embed options dictionary to preprocess.

Returns
-------
embed_opts : dict
    The preprocessed embed options dictionary.

---
## SupportsGeoInterface
```python
from data import SupportsGeoInterface
```



---
## is_data_type
```python
from data import is_data_type
```



---
## DataTransformerRegistry
```python
from data import DataTransformerRegistry
```



---
## MaxRowsError
```python
from data import MaxRowsError
```

Raised when a data model has too many rows.

---
## limit_rows
```python
from data import limit_rows
```

Raise MaxRowsError if the data model has more than max_rows.

If max_rows is None, then do not perform any check.

---
## sample
```python
from data import sample
```

Reduce the size of the data model by sampling without replacement.

---
## _FormatDict
```python
from data import _FormatDict
```



---
## _ToFormatReturnUrlDict
```python
from data import _ToFormatReturnUrlDict
```



---
## to_json
```python
from data import to_json
```

Write the data model to a .json file and return a url based data model.

---
## to_csv
```python
from data import to_csv
```

Write the data model to a .csv file and return a url based data model.

---
## _to_text
```python
from data import _to_text
```



---
## _to_text_kwds
```python
from data import _to_text_kwds
```



---
## to_values
```python
from data import to_values
```

Replace a DataFrame by a data model with values.

---
## check_data_type
```python
from data import check_data_type
```



---
## _compute_data_hash
```python
from data import _compute_data_hash
```



---
## _from_geo_interface
```python
from data import _from_geo_interface
```

Santize a ``__geo_interface__`` w/ pre-santize step for ``pandas`` if needed.

Notes
-----
Split out to resolve typing issues related to:
- Intersection types
- ``typing.TypeGuard``
- ``pd.DataFrame.__getattr__``

---
## _data_to_json_string
```python
from data import _data_to_json_string
```

Return a JSON string representation of the input data.

---
## _data_to_csv_string
```python
from data import _data_to_csv_string
```

Return a CSV string representation of the input data.

---
## arrow_table_from_dfi_dataframe
```python
from data import arrow_table_from_dfi_dataframe
```

Convert a DataFrame Interchange Protocol compatible object to an Arrow Table.

---
## consolidate_datasets
```python
from data import consolidate_datasets
```



---
## raise_max_rows_error
```python
from data import raise_max_rows_error
```



---
## __name__
```python
from _show import __name__
```



---
## open_html_in_browser
```python
from _show import open_html_in_browser
```

Display an html document in a web browser without creating a temp file.

Instantiates a simple http server and uses the webbrowser module to
open the server's URL

Parameters
----------
html: str
    HTML string to display
using: str or iterable of str
    Name of the web browser to open (e.g. "chrome", "firefox", etc.).
    If an iterable, choose the first browser available on the system.
    If none, choose the system default browser.
port: int
    Port to use. Defaults to a random port

---
## OneShotRequestHandler
```python
from _show import OneShotRequestHandler
```



---
## do_GET
```python
from _show import do_GET
```



---
## log_message
```python
from _show import log_message
```



---
## default_data_transformer
```python
from data import default_data_transformer
```



---
## disable_max_rows
```python
from data import disable_max_rows
```

Disable the MaxRowsError.

---
## pipe
```python
from data import pipe
```



---
## __name__
```python
from jupyter_chart import __name__
```



---
## Params
```python
from jupyter_chart import Params
```

Traitlet class storing a JupyterChart's params.

---
## Selections
```python
from jupyter_chart import Selections
```

Traitlet class storing a JupyterChart's selections.

---
## load_js_src
```python
from jupyter_chart import load_js_src
```



---
## JupyterChart
```python
from jupyter_chart import JupyterChart
```



---
## collect_transform_params
```python
from jupyter_chart import collect_transform_params
```

Collect the names of params that are defined by transforms.

Parameters
----------
chart: Chart from which to extract transform params

Returns
-------
set of param names

---
## __init__
```python
from jupyter_chart import __init__
```

Jupyter Widget for displaying and updating Altair Charts, and retrieving selection and parameter values.

Parameters
----------
chart: Chart
    Altair Chart instance
debounce_wait: int
     Debouncing wait time in milliseconds. Updates will be sent from the client to the kernel
     after debounce_wait milliseconds of no chart interactions.
max_wait: bool
     If True (default), updates will be sent from the client to the kernel every debounce_wait
     milliseconds even if there are ongoing chart interactions. If False, updates will not be
     sent until chart interactions have completed.
debug: bool
     If True, debug messages will be printed
embed_options: dict
     Options to pass to vega-embed.
     See https://github.com/vega/vega-embed?tab=readme-ov-file#options

---
## __repr__
```python
from jupyter_chart import __repr__
```



---
## _make_read_only
```python
from jupyter_chart import _make_read_only
```

Work around to make traits read-only, but still allow us to change them internally.

---
## _set_value
```python
from jupyter_chart import _set_value
```



---
## enable_offline
```python
from jupyter_chart import enable_offline
```

Configure JupyterChart's offline behavior.

Parameters
----------
offline: bool
    If True, configure JupyterChart to operate in offline mode where JavaScript
    dependencies are loaded from vl-convert.
    If False, configure it to operate in online mode where JavaScript dependencies
    are loaded from CDN dynamically. This is the default behavior.

---
## _on_change_chart
```python
from jupyter_chart import _on_change_chart
```

Updates the JupyterChart's internal state when the wrapped Chart instance changes.

---
## _init_with_vegafusion
```python
from jupyter_chart import _init_with_vegafusion
```



---
## _on_change_params
```python
from jupyter_chart import _on_change_params
```



---
## _on_change_selections
```python
from jupyter_chart import _on_change_selections
```

Updates the JupyterChart's public selections traitlet in response to changes that the JavaScript logic makes to the internal _selections traitlet.

---
## on_param_traitlet_changed
```python
from jupyter_chart import on_param_traitlet_changed
```



---
## on_js_to_py_updates
```python
from jupyter_chart import on_js_to_py_updates
```



---
## on_local_tz_change
```python
from jupyter_chart import on_local_tz_change
```



---
## JupyterChart
```python
from __init__ import JupyterChart
```



---
## vl_convert_compiler
```python
from compiler import vl_convert_compiler
```

Vega-Lite to Vega compiler that uses vl-convert.

---
## VegaTheme
```python
from theme import VegaTheme
```

Implementation of a builtin vega theme.

---
## __call__
```python
from theme import __call__
```



---
## mimetype_renderer
```python
from display import mimetype_renderer
```



---
## json_renderer
```python
from display import json_renderer
```



---
## png_renderer
```python
from display import png_renderer
```



---
## svg_renderer
```python
from display import svg_renderer
```



---
## jupyter_renderer
```python
from display import jupyter_renderer
```

Render chart using the JupyterChart Jupyter Widget.

---
## browser_renderer
```python
from display import browser_renderer
```



---
## VegaLite
```python
from display import VegaLite
```

An IPython/Jupyter display class for rendering VegaLite 5.

---
## vegalite
```python
from display import vegalite
```

Render and optionally validate a VegaLite 5 spec.

This will use the currently enabled renderer to render the spec.

Parameters
----------
spec: dict
    A fully compliant VegaLite 5 spec, with the data portion fully processed.
validate: bool
    Should the spec be validated against the VegaLite 5 schema?

---
## _dataset_name
```python
from api import _dataset_name
```

Generate a unique hash of the data.

Parameters
----------
values : list, dict, core.InlineDataset
    A representation of data values.

Returns
-------
name : string
    A unique name generated from the hash of the values.

---
## _consolidate_data
```python
from api import _consolidate_data
```

If data is specified inline, then move it to context['datasets'].

This function will modify context in-place, and return a new version of data

---
## _prepare_data
```python
from api import _prepare_data
```

Convert input data to data for use within schema.

Parameters
----------
data :
    The input dataset in the form of a DataFrame, dictionary, altair data
    object, or other type that is recognized by the data transformers.
context : dict (optional)
    The to_dict context in which the data is being prepared. This is used
    to keep track of information that needs to be passed up and down the
    recursive serialization routine, such as global named datasets.

---
## LookupData
```python
from api import LookupData
```



---
## FacetMapping
```python
from api import FacetMapping
```



---
## Parameter
```python
from api import Parameter
```

A Parameter object.

---
## SelectionPredicateComposition
```python
from api import SelectionPredicateComposition
```



---
## ParameterExpression
```python
from api import ParameterExpression
```



---
## SelectionExpression
```python
from api import SelectionExpression
```



---
## check_fields_and_encodings
```python
from api import check_fields_and_encodings
```



---
## _is_test_predicate
```python
from api import _is_test_predicate
```



---
## _get_predicate_expr
```python
from api import _get_predicate_expr
```



---
## _predicate_to_condition
```python
from api import _predicate_to_condition
```



---
## _condition_to_selection
```python
from api import _condition_to_selection
```



---
## _ConditionClosed
```python
from api import _ConditionClosed
```



---
## _ConditionExtra
```python
from api import _ConditionExtra
```



---
## _Conditional
```python
from api import _Conditional
```



---
## _Value
```python
from api import _Value
```



---
## _reveal_parsed_shorthand
```python
from api import _reveal_parsed_shorthand
```



---
## _is_extra
```python
from api import _is_extra
```



---
## _is_condition_extra
```python
from api import _is_condition_extra
```



---
## _parse_when_constraints
```python
from api import _parse_when_constraints
```

Wrap kwargs with `alt.datum`.

```py
# before
alt.when(alt.datum.Origin == "Europe")

# after
alt.when(Origin="Europe")
```

---
## _validate_composables
```python
from api import _validate_composables
```



---
## _parse_when_compose
```python
from api import _parse_when_compose
```

Compose an `&` reduction predicate.

Parameters
----------
predicates
    Collected positional arguments.
constraints
    Collected keyword arguments.

Raises
------
TypeError
    On the first non ``_ComposablePredicateType`` of `predicates`

---
## _parse_when
```python
from api import _parse_when
```



---
## _parse_literal
```python
from api import _parse_literal
```



---
## _parse_then
```python
from api import _parse_then
```



---
## _parse_otherwise
```python
from api import _parse_otherwise
```



---
## _BaseWhen
```python
from api import _BaseWhen
```



---
## When
```python
from api import When
```

Utility class for ``when-then-otherwise`` conditions.

Represents the state after calling :func:`.when()`.

This partial state requires calling :meth:`When.then()` to finish the condition.

References
----------
`polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__

---
## Then
```python
from api import Then
```

Utility class for ``when-then-otherwise`` conditions.

Represents the state after calling :func:`.when().then()`.

This state is a valid condition on its own.

It can be further specified, via multiple chained `when-then` calls,
or finalized with :meth:`Then.otherwise()`.

References
----------
`polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__

---
## ChainedWhen
```python
from api import ChainedWhen
```

Utility class for ``when-then-otherwise`` conditions.

Represents the state after calling :func:`.when().then().when()`.

This partial state requires calling :meth:`ChainedWhen.then()` to finish the condition.

References
----------
`polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__

---
## when
```python
from api import when
```

Attach another predicate to the condition.

The resulting predicate is an ``&`` reduction over ``predicate`` and optional ``*``, ``**``, arguments.

Parameters
----------
predicate
    A selection or test predicate. ``str`` input will be treated as a test operand.

    .. note::
        Accepts the same range of inputs as in :func:`.condition()`.
*more_predicates
    Additional predicates, restricted to types supporting ``&``.
empty
    For selection parameters, the predicate of empty selections returns ``True`` by default.
    Override this behavior, with ``empty=False``.

    .. note::
        When ``predicate`` is a ``Parameter`` that is used more than once,
        ``alt.when().then().when(..., empty=...)`` provides granular control for each occurrence.
**constraints
    Specify `Field Equal Predicate <https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate>`__'s.
    Shortcut for ``alt.datum.field_name == value``, see examples for usage.

Returns
-------
:class:`ChainedWhen`
    A partial state which requires calling :meth:`ChainedWhen.then()` to finish the condition.


Examples
--------
Chain calls to express precise queries::

    import altair as alt
    from vega_datasets import data

    source = data.cars()
    color = (
        alt.when(alt.datum.Miles_per_Gallon >= 30, Origin="Europe")
        .then(alt.value("crimson"))
        .when(alt.datum.Horsepower > 150)
        .then(alt.value("goldenrod"))
        .otherwise(alt.value("grey"))
    )

    alt.Chart(source).mark_point().encode(x="Horsepower", y="Miles_per_Gallon", color=color)

---
## param
```python
from api import param
```

Create a named parameter, see https://altair-viz.github.io/user_guide/interactions.html for examples.

Although both variable parameters and selection parameters can be created using
this 'param' function, to create a selection parameter, it is recommended to use
either 'selection_point' or 'selection_interval' instead.

Parameters
----------
name : string (optional)
    The name of the parameter. If not specified, a unique name will be
    created.
value : any (optional)
    The default value of the parameter. If not specified, the parameter
    will be created without a default value.
bind : :class:`Binding` (optional)
    Binds the parameter to an external input element such as a slider,
    selection list or radio button group.
empty : boolean (optional)
    For selection parameters, the predicate of empty selections returns
    True by default. Override this behavior, by setting this property
    'empty=False'.
expr : str, Expression (optional)
    An expression for the value of the parameter. This expression may
    include other parameters, in which case the parameter will
    automatically update in response to upstream parameter changes.
**kwds :
    additional keywords will be used to construct a parameter.  If 'select'
    is among the keywords, then a selection parameter will be created.
    Otherwise, a variable parameter will be created.

Returns
-------
parameter: Parameter
    The parameter object that can be used in chart creation.

---
## _selection
```python
from api import _selection
```



---
## selection
```python
from api import selection
```

'selection' is deprecated use 'selection_point' or 'selection_interval' instead, depending on the type of parameter you want to create.

---
## selection_interval
```python
from api import selection_interval
```

Create an interval selection parameter. Selection parameters define data queries that are driven by direct manipulation from user input (e.g., mouse clicks or drags). Interval selection parameters are used to select a continuous range of data values on drag, whereas point selection parameters (`selection_point`) are used to select multiple discrete data values.).

Parameters
----------
name : string (optional)
    The name of the parameter. If not specified, a unique name will be
    created.
value : any (optional)
    The default value of the parameter. If not specified, the parameter
    will be created without a default value.
bind : :class:`Binding`, str (optional)
    Binds the parameter to an external input element such as a slider,
    selection list or radio button group.
empty : boolean (optional)
    For selection parameters, the predicate of empty selections returns
    True by default. Override this behavior, by setting this property
    'empty=False'.
expr : :class:`Expr` (optional)
    An expression for the value of the parameter. This expression may
    include other parameters, in which case the parameter will
    automatically update in response to upstream parameter changes.
encodings : List[str] (optional)
    A list of encoding channels. The corresponding data field values
    must match for a data tuple to fall within the selection.
on : string (optional)
    A Vega event stream (object or selector) that triggers the selection.
    For interval selections, the event stream must specify a start and end.
clear : string or boolean (optional)
    Clears the selection, emptying it of all values. This property can
    be an Event Stream or False to disable clear.  Default is 'dblclick'.
resolve : enum('global', 'union', 'intersect') (optional)
    With layered and multi-view displays, a strategy that determines
    how selections' data queries are resolved when applied in a filter
    transform, conditional encoding rule, or scale domain.
    One of:

    * 'global': only one brush exists for the entire SPLOM. When the
      user begins to drag, any previous brushes are cleared, and a
      new one is constructed.
    * 'union': each cell contains its own brush, and points are
      highlighted if they lie within any of these individual brushes.
    * 'intersect': each cell contains its own brush, and points are
      highlighted only if they fall within all of these individual
      brushes.

    The default is 'global'.
mark : :class:`Mark` (optional)
    An interval selection also adds a rectangle mark to depict the
    extents of the interval. The mark property can be used to
    customize the appearance of the mark.
translate : string or boolean (optional)
    When truthy, allows a user to interactively move an interval
    selection back-and-forth. Can be True, False (to disable panning),
    or a Vega event stream definition which must include a start and
    end event to trigger continuous panning. Discrete panning (e.g.,
    pressing the left/right arrow keys) will be supported in future
    versions.
    The default value is True, which corresponds to
    [pointerdown, window:pointerup] > window:pointermove!
    This default allows users to click and drag within an interval
    selection to reposition it.
zoom : string or boolean (optional)
    When truthy, allows a user to interactively resize an interval
    selection. Can be True, False (to disable zooming), or a Vega
    event stream definition. Currently, only wheel events are supported,
    but custom event streams can still be used to specify filters,
    debouncing, and throttling. Future versions will expand the set of
    events that can trigger this transformation.
    The default value is True, which corresponds to wheel!. This
    default allows users to use the mouse wheel to resize an interval
    selection.
**kwds :
    Additional keywords to control the selection.

Returns
-------
parameter: Parameter
    The parameter object that can be used in chart creation.

---
## selection_point
```python
from api import selection_point
```

Create a point selection parameter. Selection parameters define data queries that are driven by direct manipulation from user input (e.g., mouse clicks or drags). Point selection parameters are used to select multiple discrete data values; the first value is selected on click and additional values toggled on shift-click. To select a continuous range of data values on drag interval selection parameters (`selection_interval`) can be used instead.

Parameters
----------
name : string (optional)
    The name of the parameter. If not specified, a unique name will be
    created.
value : any (optional)
    The default value of the parameter. If not specified, the parameter
    will be created without a default value.
bind : :class:`Binding`, str (optional)
    Binds the parameter to an external input element such as a slider,
    selection list or radio button group.
empty : boolean (optional)
    For selection parameters, the predicate of empty selections returns
    True by default. Override this behavior, by setting this property
    'empty=False'.
expr : :class:`Expr` (optional)
    An expression for the value of the parameter. This expression may
    include other parameters, in which case the parameter will
    automatically update in response to upstream parameter changes.
encodings : List[str] (optional)
    A list of encoding channels. The corresponding data field values
    must match for a data tuple to fall within the selection.
fields : List[str] (optional)
    A list of field names whose values must match for a data tuple to
    fall within the selection.
on : string (optional)
    A Vega event stream (object or selector) that triggers the selection.
    For interval selections, the event stream must specify a start and end.
clear : string or boolean (optional)
    Clears the selection, emptying it of all values. This property can
    be an Event Stream or False to disable clear.  Default is 'dblclick'.
resolve : enum('global', 'union', 'intersect') (optional)
    With layered and multi-view displays, a strategy that determines
    how selections' data queries are resolved when applied in a filter
    transform, conditional encoding rule, or scale domain.
    One of:

    * 'global': only one brush exists for the entire SPLOM. When the
      user begins to drag, any previous brushes are cleared, and a
      new one is constructed.
    * 'union': each cell contains its own brush, and points are
      highlighted if they lie within any of these individual brushes.
    * 'intersect': each cell contains its own brush, and points are
      highlighted only if they fall within all of these individual
      brushes.

    The default is 'global'.
toggle : string or boolean (optional)
    Controls whether data values should be toggled (inserted or
    removed from a point selection) or only ever inserted into
    point selections.
    One of:

    * True (default): the toggle behavior, which corresponds to
      "event.shiftKey". As a result, data values are toggled
      when the user interacts with the shift-key pressed.
    * False: disables toggling behaviour; the selection will
      only ever contain a single data value corresponding
      to the most recent interaction.
    * A Vega expression which is re-evaluated as the user interacts.
      If the expression evaluates to True, the data value is
      toggled into or out of the point selection. If the expression
      evaluates to False, the point selection is first cleared, and
      the data value is then inserted. For example, setting the
      value to the Vega expression True will toggle data values
      without the user pressing the shift-key.

nearest : boolean (optional)
    When true, an invisible voronoi diagram is computed to accelerate
    discrete selection. The data value nearest the mouse cursor is
    added to the selection.  The default is False, which means that
    data values must be interacted with directly (e.g., clicked on)
    to be added to the selection.
**kwds :
    Additional keywords to control the selection.

Returns
-------
parameter: Parameter
    The parameter object that can be used in chart creation.

---
## selection_multi
```python
from api import selection_multi
```

'selection_multi' is deprecated.  Use 'selection_point'.

---
## selection_single
```python
from api import selection_single
```

'selection_single' is deprecated.  Use 'selection_point'.

---
## binding
```python
from api import binding
```

A generic binding.

---
## binding_checkbox
```python
from api import binding_checkbox
```

A checkbox binding.

---
## binding_radio
```python
from api import binding_radio
```

A radio button binding.

---
## binding_select
```python
from api import binding_select
```

A select binding.

---
## binding_range
```python
from api import binding_range
```

A range binding.

---
## condition
```python
from api import condition
```

A conditional attribute or encoding.

Parameters
----------
predicate: Parameter, PredicateComposition, expr.Expression, dict, or string
    the selection predicate or test predicate for the condition.
    if a string is passed, it will be treated as a test operand.
if_true:
    the spec or object to use if the selection predicate is true
if_false:
    the spec or object to use if the selection predicate is false
empty
    For selection parameters, the predicate of empty selections returns ``True`` by default.
    Override this behavior, with ``empty=False``.

    .. note::
        When ``predicate`` is a ``Parameter`` that is used more than once,
        ``alt.condition(..., empty=...)`` provides granular control for each :func:`.condition()`.
**kwargs:
    additional keyword args are added to the resulting dict

Returns
-------
spec: dict or VegaLiteSchema
    the spec that describes the condition

---
## _top_schema_base
```python
from api import _top_schema_base
```

Enforces an intersection type w/ `SchemaBase` & `TopLevelMixin` objects.

Use for instance methods.

---
## TopLevelMixin
```python
from api import TopLevelMixin
```

Mixin for top-level chart objects such as Chart, LayeredChart, etc.

---
## _EncodingMixin
```python
from api import _EncodingMixin
```



---
## Chart
```python
from api import Chart
```

Create a basic Altair/Vega-Lite chart.

Although it is possible to set all Chart properties as constructor attributes,
it is more idiomatic to use methods such as ``mark_point()``, ``encode()``,
``transform_filter()``, ``properties()``, etc. See Altair's documentation
for details and examples: http://altair-viz.github.io/.

Parameters
----------
data : Data
    An object describing the data source
mark : AnyMark
    A `MarkDef` or `CompositeMarkDef` object, or a string describing the mark type
    (one of `"arc"`, `"area"`, `"bar"`, `"circle"`, `"geoshape"`, `"image"`,
    `"line"`, `"point"`, `"rule"`, `"rect"`, `"square"`, `"text"`, `"tick"`,
    `"trail"`, `"boxplot"`, `"errorband"`, and `"errorbar"`).
encoding : FacetedEncoding
    A key-value mapping between encoding channels and definition of fields.
autosize : anyOf(AutosizeType, AutoSizeParams)
    Sets how the visualization size should be determined. If a string, should be one of
    `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for
    content sizing and automatic resizing. `"fit"` is only supported for single and
    layered views that don't use `rangeStep`.  Default value: `pad`
background : string
    CSS color property to use as the background of visualization.

    **Default value:** none (transparent)
config : Config
    Vega-Lite configuration object.  This property can only be defined at the top-level
    of a specification.
description : string
    Description of this mark for commenting purpose.
height : float
    The height of a visualization.
name : string
    Name of the visualization for later reference.
padding : Padding
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle.  If a number, specifies padding for all sides. If an
    object, the value should have the format `{"left": 5, "top": 5, "right": 5,
    "bottom": 5}` to specify padding for each side of the visualization.  Default
    value: `5`
projection : Projection
    An object defining properties of geographic projection.  Works with `"geoshape"`
    marks and `"point"` or `"line"` marks that have a channel (one or more of `"X"`,
    `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`.
selection : Mapping(required=[])
    A key-value mapping between selection names and definitions.
title : anyOf(string, TitleParams)
    Title for the plot.
transform : List(Transform)
    An array of data transformations such as filter and new field calculation.
width : float
    The width of a visualization.

---
## _check_if_valid_subspec
```python
from api import _check_if_valid_subspec
```

Raise a `TypeError` if `spec` is not a valid sub-spec.

---
## _check_if_can_be_layered
```python
from api import _check_if_can_be_layered
```

Raise a `TypeError` if `spec` cannot be layered.

---
## RepeatChart
```python
from api import RepeatChart
```

A chart repeated across rows and columns with small changes.

---
## repeat
```python
from api import repeat
```

Return a RepeatChart built from the chart.

Fields within the chart can be set to correspond to the row or
column using `alt.repeat('row')` and `alt.repeat('column')`.

Parameters
----------
repeat : list
    a list of data column names to be repeated. This cannot be
    used along with the ``row``, ``column`` or ``layer`` argument.
row : list
    a list of data column names to be mapped to the row facet
column : list
    a list of data column names to be mapped to the column facet
layer : list
    a list of data column names to be layered. This cannot be
    used along with the ``row``, ``column`` or ``repeat`` argument.
columns : int
    the maximum number of columns before wrapping. Only referenced
    if ``repeat`` is specified.
**kwargs :
    additional keywords passed to RepeatChart.

Returns
-------
chart : RepeatChart
    a repeated chart.

---
## ConcatChart
```python
from api import ConcatChart
```

A chart with horizontally-concatenated facets.

---
## concat
```python
from api import concat
```

Concatenate charts horizontally.

---
## HConcatChart
```python
from api import HConcatChart
```

A chart with horizontally-concatenated facets.

---
## hconcat
```python
from api import hconcat
```

Concatenate charts horizontally.

---
## VConcatChart
```python
from api import VConcatChart
```

A chart with vertically-concatenated facets.

---
## vconcat
```python
from api import vconcat
```

Concatenate charts vertically.

---
## LayerChart
```python
from api import LayerChart
```

A Chart with layers within a single panel.

---
## layer
```python
from api import layer
```

Layer multiple charts.

---
## FacetChart
```python
from api import FacetChart
```

A Chart with layers within a single panel.

---
## topo_feature
```python
from api import topo_feature
```

A convenience function for extracting features from a topojson url.

Parameters
----------
url : string
    An URL from which to load the data set.

feature : string
    The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
    example, in a map of the world, there may be an object set named `"countries"`.
    Using the feature property, we can extract this set and generate a GeoJSON feature
    object for each country.

**kwargs :
    additional keywords passed to TopoDataFormat

---
## _combine_subchart_data
```python
from api import _combine_subchart_data
```



---
## _viewless_dict
```python
from api import _viewless_dict
```



---
## _needs_name
```python
from api import _needs_name
```



---
## _prepare_to_lift
```python
from api import _prepare_to_lift
```



---
## _remove_duplicate_params
```python
from api import _remove_duplicate_params
```



---
## _combine_subchart_params
```python
from api import _combine_subchart_params
```



---
## _get_repeat_strings
```python
from api import _get_repeat_strings
```



---
## _extend_view_name
```python
from api import _extend_view_name
```



---
## _repeat_names
```python
from api import _repeat_names
```



---
## _remove_layer_props
```python
from api import _remove_layer_props
```



---
## sequence
```python
from api import sequence
```

Sequence generator.

---
## graticule
```python
from api import graticule
```

Graticule generator.

---
## sphere
```python
from api import sphere
```

Sphere generator.

---
## is_chart_type
```python
from api import is_chart_type
```

Return `True` if the object is an Altair chart.

This can be a basic chart but also a repeat, concat, or facet chart.

---
## to_dict
```python
from api import to_dict
```

Convert the chart to a dictionary suitable for JSON export.

Parameters
----------
validate : bool, optional
    If True (default), then validate the output dictionary
    against the schema.
format : str, optional
    Chart specification format, one of "vega-lite" (default) or "vega"
ignore : list[str], optional
    A list of keys to ignore. It is usually not needed
    to specify this argument as a user.
context : dict[str, Any], optional
    A context dictionary. It is usually not needed
    to specify this argument as a user.

Notes
-----
Technical: The ignore parameter will *not* be passed to child to_dict
function calls.

Returns
-------
dict
    The dictionary representation of this chart

Raises
------
SchemaValidationError
    if validate=True and the dict does not conform to the schema

---
## _get_name
```python
from api import _get_name
```



---
## ref
```python
from api import ref
```

'ref' is deprecated. No need to call '.ref()' anymore.

---
## __invert__
```python
from api import __invert__
```



---
## __and__
```python
from api import __and__
```



---
## __or__
```python
from api import __or__
```



---
## __repr__
```python
from api import __repr__
```



---
## _to_expr
```python
from api import _to_expr
```



---
## _from_expr
```python
from api import _from_expr
```



---
## __getattr__
```python
from api import __getattr__
```



---
## __getitem__
```python
from api import __getitem__
```



---
## _when_then
```python
from api import _when_then
```



---
## then
```python
from api import then
```

Attach a statement to this predicate.

Parameters
----------
statement
    A spec or value to use when the preceding :meth:`Then.when()` clause is true.

    .. note::
        ``str`` will be encoded as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
**kwds
    Additional keyword args are added to the resulting ``dict``.

Returns
-------
:class:`Then`

Examples
--------
Multiple conditions with an implicit default::

    import altair as alt
    from vega_datasets import data

    source = data.movies()
    predicate = (alt.datum.IMDB_Rating == None) | (alt.datum.Rotten_Tomatoes_Rating == None)
    color = (
        alt.when(predicate)
        .then(alt.value("grey"))
        .when(alt.datum.IMDB_Votes < 5000)
        .then(alt.value("lightblue"))
    )

    alt.Chart(source).mark_point(invalid=None).encode(
        x="IMDB_Rating:Q", y="Rotten_Tomatoes_Rating:Q", color=color
    )

---
## otherwise
```python
from api import otherwise
```

Finalize the condition with a default value.

Parameters
----------
statement
    A spec or value to use when no predicates were met.

    .. note::
        Roughly equivalent to an ``else`` clause.

    .. note::
        ``str`` will be encoded as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__.
**kwds
    Additional keyword args are added to the resulting ``dict``.


Examples
--------
Points outside of ``brush`` will not appear highlighted::

    import altair as alt
    from vega_datasets import data

    source = data.cars()
    brush = alt.selection_interval()
    color = alt.when(brush).then("Origin:N").otherwise(alt.value("grey"))

    alt.Chart(source).mark_point().encode(
        x="Horsepower:Q",
        y="Miles_per_Gallon:Q",
        color=color,
    ).add_params(brush)

---
## __deepcopy__
```python
from api import __deepcopy__
```



---
## to_json
```python
from api import to_json
```

Convert a chart to a JSON string.

Parameters
----------
validate : bool, optional
    If True (default), then validate the output dictionary
    against the schema.
indent : int, optional
    The number of spaces of indentation to use. The default is 2.
sort_keys : bool, optional
    If True (default), sort keys in the output.
format : str, optional
    The chart specification format. One of "vega-lite" (default) or "vega".
    The "vega" format relies on the active Vega-Lite compiler plugin, which
    by default requires the vl-convert-python package.
ignore : list[str], optional
    A list of keys to ignore. It is usually not needed
    to specify this argument as a user.
context : dict[str, Any], optional
    A context dictionary. It is usually not needed
    to specify this argument as a user.
**kwargs
    Additional keyword arguments are passed to ``json.dumps()``

---
## to_html
```python
from api import to_html
```

Embed a Vega/Vega-Lite spec into an HTML page.

Parameters
----------
base_url : string (optional)
    The base url from which to load the javascript libraries.
output_div : string (optional)
    The id of the div element where the plot will be shown.
embed_options : dict (optional)
    Dictionary of options to pass to the vega-embed script. Default
    entry is {'mode': mode}.
json_kwds : dict (optional)
    Dictionary of keywords to pass to json.dumps().
fullhtml : boolean (optional)
    If True (default) then return a full html page. If False, then return
    an HTML snippet that can be embedded into an HTML page.
requirejs : boolean (optional)
    If False (default) then load libraries from base_url using <script>
    tags. If True, then load libraries using requirejs
inline: bool (optional)
    If False (default), the required JavaScript libraries are loaded
    from a CDN location in the resulting html file.
    If True, the required JavaScript libraries are inlined into the resulting
    html file so that it will work without an internet connection.
    The vl-convert-python package is required if True.
**kwargs :
    additional kwargs passed to spec_to_html.

Returns
-------
output : string
    an HTML string for rendering the chart.

---
## to_url
```python
from api import to_url
```

Convert a chart to a URL that opens the chart specification in the Vega chart editor.

The chart specification (including any inline data) is encoded in the URL.

This method requires that the vl-convert-python package is installed.

Parameters
----------
fullscreen : bool
    If True, editor will open chart in fullscreen mode. Default False

---
## open_editor
```python
from api import open_editor
```

Opens the chart specification in the Vega chart editor using the default browser.

Parameters
----------
fullscreen : bool
    If True, editor will open chart in fullscreen mode. Default False

---
## save
```python
from api import save
```

Save a chart to file in a variety of formats.

Supported formats are json, html, png, svg, pdf; the last three require
the vl-convert-python package to be installed.

Parameters
----------
fp : string filename or file-like object
    file in which to write the chart.
format : string (optional)
    the format to write: one of ['json', 'html', 'png', 'svg', 'pdf'].
    If not specified, the format will be determined from the filename.
override_data_transformer : `boolean` (optional)
    If True (default), then the save action will be done with
    the MaxRowsError disabled. If False, then do not change the data
    transformer.
scale_factor : float (optional)
    scale_factor to use to change size/resolution of png or svg output
mode : string (optional)
    Must be 'vega-lite'. If not specified, then infer the mode from
    the '$schema' property of the spec, or the ``opt`` dictionary.
    If it's not specified in either of those places, then use 'vega-lite'.
vegalite_version : string (optional)
    For html output, the version of vegalite.js to use
vega_version : string (optional)
    For html output, the version of vega.js to use
vegaembed_version : string (optional)
    For html output, the version of vegaembed.js to use
embed_options : dict (optional)
    The vegaEmbed options dictionary. Default is {}
    (See https://github.com/vega/vega-embed for details)
json_kwds : dict (optional)
    Additional keyword arguments are passed to the output method
    associated with the specified format.
engine: string {'vl-convert'}
    the conversion engine to use for 'png', 'svg', and 'pdf' formats
inline: bool (optional)
    If False (default), the required JavaScript libraries are loaded
    from a CDN location in the resulting html file.
    If True, the required JavaScript libraries are inlined into the resulting
    html file so that it will work without an internet connection.
    The vl-convert-python package is required if True.
**kwargs :
    additional kwargs passed to spec_to_mimebundle.

---
## __add__
```python
from api import __add__
```



---
## properties
```python
from api import properties
```

Set top-level properties of the Chart.

Argument names and types are the same as class initialization.

---
## project
```python
from api import project
```

Add a geographic projection to the chart.

This is generally used either with ``mark_geoshape`` or with the
``latitude``/``longitude`` encodings.

Available projection types are
['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant',
'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular',
'gnomonic', 'identity', 'mercator', 'orthographic', 'stereographic', 'transverseMercator']

Parameters
----------
type : str
    The cartographic projection to use. This value is case-insensitive, for example
    `"albers"` and `"Albers"` indicate the same projection type. You can find all valid
    projection types [in the
    documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).

    **Default value:** `equalEarth`
center : List(float)
    Sets the projection's center to the specified center, a two-element array of
    longitude and latitude in degrees.

    **Default value:** `[0, 0]`
clipAngle : float
    Sets the projection's clipping circle radius to the specified angle in degrees. If
    `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting
    rather than small-circle clipping.
clipExtent : List(List(float))
    Sets the projection's viewport clip extent to the specified bounds in pixels. The
    extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the
    left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the
    bottom. If `null`, no viewport clipping is performed.
coefficient : float
    The coefficient parameter for the ``hammer`` projection.

    **Default value:** ``2``
distance : float
    For the ``satellite`` projection, the distance from the center of the sphere to the
    point of view, as a proportion of the sphere's radius. The recommended maximum clip
    angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt
    is also applied, then more conservative clipping may be necessary.

    **Default value:** ``2.0``
fraction : float
    The fraction parameter for the ``bottomley`` projection.

    **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.
lobes : float
    The number of lobes in projections that support multi-lobe views: ``berghaus``,
    ``gingery``, or ``healpix``. The default value varies based on the projection type.
parallel : float
    For conic projections, the `two standard parallels
    <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.
    The default depends on the specific conic projection used.
precision : float
    Sets the threshold for the projection's [adaptive
    resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels.
    This value corresponds to the [Douglas-Peucker
    distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).
     If precision is not specified, returns the projection's current resampling
    precision which defaults to `√0.5 ≅ 0.70710…`.
radius : float
    The radius parameter for the ``airy`` or ``gingery`` projection. The default value
    varies based on the projection type.
ratio : float
    The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The
    default value varies based on the projection type.
reflectX : boolean
    Sets whether or not the x-dimension is reflected (negated) in the output.
reflectY : boolean
    Sets whether or not the y-dimension is reflected (negated) in the output.
rotate : List(float)
    Sets the projection's three-axis rotation to the specified angles, which must be a
    two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the
    rotation angles in degrees about each spherical axis. (These correspond to yaw,
    pitch and roll.)

    **Default value:** `[0, 0, 0]`
scale : float
    The projection's scale (zoom) factor, overriding automatic fitting. The default
    scale is projection-specific. The scale factor corresponds linearly to the distance
    between projected points; however, scale factor values are not equivalent across
    projections.
spacing : float
    The spacing parameter for the ``lagrange`` projection.

    **Default value:** ``0.5``
tilt : float
    The tilt angle (in degrees) for the ``satellite`` projection.

    **Default value:** ``0``.
translate : List(float)
    The projection's translation offset as a two-element array ``[tx, ty]``,
    overriding automatic fitting.

---
## _add_transform
```python
from api import _add_transform
```

Copy the chart and add specified transforms to chart.transform.

---
## transform_aggregate
```python
from api import transform_aggregate
```

Add an :class:`AggregateTransform` to the schema.

Parameters
----------
aggregate : List(:class:`AggregatedFieldDef`)
    Array of objects that define fields to aggregate.
groupby : List(string)
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
**kwds : Union[TypingDict[str, Any], str]
    additional keywords are converted to aggregates using standard
    shorthand parsing.

Returns
-------
self : Chart object
    returns chart to allow for chaining

Examples
--------
The aggregate transform allows you to specify transforms directly using
the same shorthand syntax as used in encodings:

>>> import altair as alt
>>> chart1 = alt.Chart().transform_aggregate(
...     mean_acc="mean(Acceleration)", groupby=["Origin"]
... )
>>> print(chart1.transform[0].to_json())  # doctest: +NORMALIZE_WHITESPACE
{
  "aggregate": [
    {
      "as": "mean_acc",
      "field": "Acceleration",
      "op": "mean"
    }
  ],
  "groupby": [
    "Origin"
  ]
}

It also supports including AggregatedFieldDef instances or dicts directly,
so you can create the above transform like this:

>>> chart2 = alt.Chart().transform_aggregate(
...     [alt.AggregatedFieldDef(field="Acceleration", op="mean", **{"as": "mean_acc"})],
...     groupby=["Origin"],
... )
>>> chart2.transform == chart1.transform
True

See Also
--------
alt.AggregateTransform : underlying transform object

---
## transform_bin
```python
from api import transform_bin
```

Add a :class:`BinTransform` to the schema.

Parameters
----------
as_ : anyOf(string, List(string))
    The output fields at which to write the start and end bin values.
bin : anyOf(boolean, :class:`BinParams`)
    An object indicating bin properties, or simply ``true`` for using default bin
    parameters.
field : string
    The data field to bin.

Returns
-------
self : Chart object
    returns chart to allow for chaining

Examples
--------
>>> import altair as alt
>>> chart = alt.Chart().transform_bin("x_binned", "x")
>>> chart.transform[0]
BinTransform({
  as: 'x_binned',
  bin: True,
  field: 'x'
})

>>> chart = alt.Chart().transform_bin("x_binned", "x", bin=alt.Bin(maxbins=10))
>>> chart.transform[0]
BinTransform({
  as: 'x_binned',
  bin: BinParams({
    maxbins: 10
  }),
  field: 'x'
})

See Also
--------
alt.BinTransform : underlying transform object

---
## transform_calculate
```python
from api import transform_calculate
```

Add a :class:`CalculateTransform` to the schema.

Parameters
----------
as_ : string
    The field for storing the computed formula value.
calculate : string or alt.expr.Expression
    An `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
    string. Use the variable ``datum`` to refer to the current data object.
**kwargs
    transforms can also be passed by keyword argument; see Examples

Returns
-------
self : Chart object
    returns chart to allow for chaining

Examples
--------
>>> import altair as alt
>>> from altair import datum, expr

>>> chart = alt.Chart().transform_calculate(y=2 * expr.sin(datum.x))
>>> chart.transform[0]
CalculateTransform({
  as: 'y',
  calculate: (2 * sin(datum.x))
})

It's also possible to pass the ``CalculateTransform`` arguments directly:

>>> kwds = {"as_": "y", "calculate": "2 * sin(datum.x)"}
>>> chart = alt.Chart().transform_calculate(**kwds)
>>> chart.transform[0]
CalculateTransform({
  as: 'y',
  calculate: '2 * sin(datum.x)'
})

As the first form is easier to write and understand, that is the
recommended method.

See Also
--------
alt.CalculateTransform : underlying transform object

---
## transform_density
```python
from api import transform_density
```

Add a :class:`DensityTransform` to the spec.

Parameters
----------
density : str
    The data field for which to perform density estimation.
as_ : [str, str]
    The output fields for the sample value and corresponding density estimate.
    **Default value:** ``["value", "density"]``
bandwidth : float
    The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to
    zero, the bandwidth value is automatically estimated from the input data using
    Scott's rule.
counts : boolean
    A boolean flag indicating if the output values should be probability estimates
    (false) or smoothed counts (true).
    **Default value:** ``false``
cumulative : boolean
    A boolean flag indicating whether to produce density estimates (false) or cumulative
    density estimates (true).
    **Default value:** ``false``
extent : List([float, float])
    A [min, max] domain from which to sample the distribution. If unspecified, the
    extent will be determined by the observed minimum and maximum values of the density
    value field.
groupby : List(str)
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
maxsteps : int
    The maximum number of samples to take along the extent domain for plotting the
    density. **Default value:** ``200``
minsteps : int
    The minimum number of samples to take along the extent domain for plotting the
    density. **Default value:** ``25``
steps : int
    The exact number of samples to take along the extent domain for plotting the
    density. If specified, overrides both minsteps and maxsteps to set an exact number
    of uniform samples. Potentially useful in conjunction with a fixed extent to ensure
    consistent sample points for stacked densities.
resolve : Literal['independent', 'shared']
    Indicates how parameters for multiple densities should be resolved. If
    ``"independent"``, each density may have its own domain extent and dynamic number of
    curve sample steps. If ``"shared"``, the KDE transform will ensure that all
    densities are defined over a shared domain and curve steps, enabling stacking.

    **Default value:** ``"shared"``

---
## transform_impute
```python
from api import transform_impute
```

Add an :class:`ImputeTransform` to the schema.

Parameters
----------
impute : string
    The data field for which the missing values should be imputed.
key : string
    A key field that uniquely identifies data objects within a group.
    Missing key values (those occurring in the data but not in the current group) will
    be imputed.
frame : List(anyOf(None, int))
    A frame specification as a two-element array used to control the window over which
    the specified method is applied. The array entries should either be a number
    indicating the offset from the current data object, or null to indicate unbounded
    rows preceding or following the current data object.  For example, the value ``[-5,
    5]`` indicates that the window should include five objects preceding and five
    objects following the current object.
    **Default value:** :  ``[null, null]`` indicating that the window includes all
    objects.
groupby : List(string)
    An optional array of fields by which to group the values.
    Imputation will then be performed on a per-group basis.
keyvals : anyOf(List(Mapping(required=[])), :class:`ImputeSequence`)
    Defines the key values that should be considered for imputation.
    An array of key values or an object defining a `number sequence
    <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.
    If provided, this will be used in addition to the key values observed within the
    input data.  If not provided, the values will be derived from all unique values of
    the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
    the y-field is imputed, or vice versa.
    If there is no impute grouping, this property *must* be specified.
method : :class:`ImputeMethod`
    The imputation method to use for the field value of imputed data objects.
    One of ``value``, ``mean``, ``median``, ``max`` or ``min``.
    **Default value:**  ``"value"``
value : Mapping(required=[])
    The field value to use when the imputation ``method`` is ``"value"``.

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.ImputeTransform : underlying transform object

---
## transform_joinaggregate
```python
from api import transform_joinaggregate
```

Add a :class:`JoinAggregateTransform` to the schema.

Parameters
----------
joinaggregate : List(:class:`JoinAggregateFieldDef`)
    The definition of the fields in the join aggregate, and what calculations to use.
groupby : List(string)
    The data fields for partitioning the data objects into separate groups. If
    unspecified, all data points will be in a single group.
**kwargs
    joinaggregates can also be passed by keyword argument; see Examples.

Returns
-------
self : Chart object
    returns chart to allow for chaining

Examples
--------
>>> import altair as alt
>>> chart = alt.Chart().transform_joinaggregate(x="sum(y)")
>>> chart.transform[0]
JoinAggregateTransform({
  joinaggregate: [JoinAggregateFieldDef({
    as: 'x',
    field: 'y',
    op: 'sum'
  })]
})

See Also
--------
alt.JoinAggregateTransform : underlying transform object

---
## transform_extent
```python
from api import transform_extent
```

Add a :class:`ExtentTransform` to the spec.

Parameters
----------
extent : str
    The field of which to get the extent.
param : str
    The name of the output parameter which will be created by
    the extent transform.

Returns
-------
self : Chart object
    returns chart to allow for chaining

---
## transform_filter
```python
from api import transform_filter
```

Add a :class:`FilterTransform` to the schema.

Parameters
----------
filter : a filter expression or :class:`PredicateComposition`
    The `filter` property must be one of the predicate definitions:
    (1) a string or alt.expr expression
    (2) a range predicate
    (3) a selection predicate
    (4) a logical operand combining (1)-(3)
    (5) a Selection object

Returns
-------
self : Chart object
    returns chart to allow for chaining

---
## transform_flatten
```python
from api import transform_flatten
```

Add a :class:`FlattenTransform` to the schema.

Parameters
----------
flatten : List(string)
    An array of one or more data fields containing arrays to flatten.
    If multiple fields are specified, their array values should have a parallel
    structure, ideally with the same length.
    If the lengths of parallel arrays do not match,
    the longest array will be used with ``null`` values added for missing entries.
as : List(string)
    The output field names for extracted array values.
    **Default value:** The field name of the corresponding array field

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.FlattenTransform : underlying transform object

---
## transform_fold
```python
from api import transform_fold
```

Add a :class:`FoldTransform` to the spec.

Parameters
----------
fold : List(string)
    An array of data fields indicating the properties to fold.
as : [string, string]
    The output field names for the key and value properties produced by the fold
    transform. Default: ``["key", "value"]``

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
Chart.transform_pivot : pivot transform - opposite of fold.
alt.FoldTransform : underlying transform object

---
## transform_loess
```python
from api import transform_loess
```

Add a :class:`LoessTransform` to the spec.

Parameters
----------
on : str
    The data field of the independent variable to use a predictor.
loess : str
    The data field of the dependent variable to smooth.
as_ : [str, str]
    The output field names for the smoothed points generated by the loess transform.
    **Default value:** The field names of the input x and y values.
bandwidth : float
    A bandwidth parameter in the range ``[0, 1]`` that determines the amount of
    smoothing. **Default value:** ``0.3``
groupby : List(str)
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
Chart.transform_regression: regression transform
alt.LoessTransform : underlying transform object

---
## transform_lookup
```python
from api import transform_lookup
```

Add a :class:`DataLookupTransform` or :class:`SelectionLookupTransform` to the chart.

Parameters
----------
lookup : string
    Key in primary data source.
from_ : anyOf(:class:`LookupData`, :class:`LookupSelection`)
    Secondary data reference.
as_ : anyOf(string, List(string))
    The output fields on which to store the looked up data values.

    For data lookups, this property may be left blank if ``from_.fields``
    has been specified (those field names will be used); if ``from_.fields``
    has not been specified, ``as_`` must be a string.

    For selection lookups, this property is optional: if unspecified,
    looked up values will be stored under a property named for the selection;
    and if specified, it must correspond to ``from_.fields``.
default : string
    The default value to use if lookup fails. **Default value:** ``null``

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.DataLookupTransform : underlying transform object
alt.SelectionLookupTransform : underlying transform object

---
## transform_pivot
```python
from api import transform_pivot
```

Add a :class:`PivotTransform` to the chart.

Parameters
----------
pivot : str
    The data field to pivot on. The unique values of this field become new field names
    in the output stream.
value : str
    The data field to populate pivoted fields. The aggregate values of this field become
    the values of the new pivoted fields.
groupby : List(str)
    The optional data fields to group by. If not specified, a single group containing
    all data objects will be used.
limit : int
    An optional parameter indicating the maximum number of pivoted fields to generate.
    The default ( ``0`` ) applies no limit. The pivoted ``pivot`` names are sorted in
    ascending order prior to enforcing the limit.
    **Default value:** ``0``
op : Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    The aggregation operation to apply to grouped ``value`` field values.
    **Default value:** ``sum``

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
Chart.transform_fold : fold transform - opposite of pivot.
alt.PivotTransform : underlying transform object

---
## transform_quantile
```python
from api import transform_quantile
```

Add a :class:`QuantileTransform` to the chart.

Parameters
----------
quantile : str
    The data field for which to perform quantile estimation.
as : [str, str]
    The output field names for the probability and quantile values.
groupby : List(str)
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
probs : List(float)
    An array of probabilities in the range (0, 1) for which to compute quantile values.
    If not specified, the *step* parameter will be used.
step : float
    A probability step size (default 0.01) for sampling quantile values. All values from
    one-half the step size up to 1 (exclusive) will be sampled. This parameter is only
    used if the *probs* parameter is not provided. **Default value:** ``["prob", "value"]``

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.QuantileTransform : underlying transform object

---
## transform_regression
```python
from api import transform_regression
```

Add a :class:`RegressionTransform` to the chart.

Parameters
----------
on : str
    The data field of the independent variable to use a predictor.
regression : str
    The data field of the dependent variable to predict.
as_ : [str, str]
    The output field names for the smoothed points generated by the regression
    transform. **Default value:** The field names of the input x and y values.
extent : [float, float]
    A [min, max] domain over the independent (x) field for the starting and ending
    points of the generated trend line.
groupby : List(str)
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
method : enum('linear', 'log', 'exp', 'pow', 'quad', 'poly')
    The functional form of the regression model. One of ``"linear"``, ``"log"``,
    ``"exp"``, ``"pow"``, ``"quad"``, or ``"poly"``.  **Default value:** ``"linear"``
order : int
    The polynomial order (number of coefficients) for the 'poly' method.
    **Default value:** ``3``
params : boolean
    A boolean flag indicating if the transform should return the regression model
    parameters (one object per group), rather than trend line points.
    The resulting objects include a ``coef`` array of fitted coefficient values
    (starting with the intercept term and then including terms of increasing order)
    and an ``rSquared`` value (indicating the total variance explained by the model).
    **Default value:** ``false``

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
Chart.transform_loess : LOESS transform
alt.RegressionTransform : underlying transform object

---
## transform_sample
```python
from api import transform_sample
```

Add a :class:`SampleTransform` to the schema.

Parameters
----------
sample : int
    The maximum number of data objects to include in the sample. Default: 1000.

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.SampleTransform : underlying transform object

---
## transform_stack
```python
from api import transform_stack
```

Add a :class:`StackTransform` to the schema.

Parameters
----------
as_ : anyOf(string, List(string))
    Output field names. This can be either a string or an array of strings with
    two elements denoting the name for the fields for stack start and stack end
    respectively.
    If a single string(eg."val") is provided, the end field will be "val_end".
stack : string
    The field which is stacked.
groupby : List(string)
    The data fields to group by.
offset : enum('zero', 'center', 'normalize')
    Mode for stacking marks. Default: 'zero'.
sort : List(:class:`SortField`)
    Field that determines the order of leaves in the stacked charts.

Returns
-------
self : Chart object
    returns chart to allow for chaining

See Also
--------
alt.StackTransform : underlying transform object

---
## transform_timeunit
```python
from api import transform_timeunit
```

Add a :class:`TimeUnitTransform` to the schema.

Parameters
----------
as_ : string
    The output field to write the timeUnit value.
field : string
    The data field to apply time unit.
timeUnit : str or :class:`TimeUnit`
    The timeUnit.
**kwargs
    transforms can also be passed by keyword argument; see Examples

Returns
-------
self : Chart object
    returns chart to allow for chaining

Examples
--------
>>> import altair as alt
>>> from altair import datum, expr

>>> chart = alt.Chart().transform_timeunit(month="month(date)")
>>> chart.transform[0]
TimeUnitTransform({
  as: 'month',
  field: 'date',
  timeUnit: 'month'
})

It's also possible to pass the ``TimeUnitTransform`` arguments directly;
this is most useful in cases where the desired field name is not a
valid python identifier:

>>> kwds = {"as": "month", "timeUnit": "month", "field": "The Month"}
>>> chart = alt.Chart().transform_timeunit(**kwds)
>>> chart.transform[0]
TimeUnitTransform({
  as: 'month',
  field: 'The Month',
  timeUnit: 'month'
})

As the first form is easier to write and understand, that is the
recommended method.

See Also
--------
alt.TimeUnitTransform : underlying transform object

---
## transform_window
```python
from api import transform_window
```

Add a :class:`WindowTransform` to the schema.

Parameters
----------
window : List(:class:`WindowFieldDef`)
    The definition of the fields in the window, and what calculations to use.
frame : List(anyOf(None, int))
    A frame specification as a two-element array indicating how the sliding window
    should proceed. The array entries should either be a number indicating the offset
    from the current data object, or null to indicate unbounded rows preceding or
    following the current data object. The default value is ``[null, 0]``, indicating
    that the sliding window includes the current object and all preceding objects. The
    value ``[-5, 5]`` indicates that the window should include five objects preceding
    and five objects following the current object. Finally, ``[null, null]`` indicates
    that the window frame should always include all data objects. The only operators
    affected are the aggregation operations and the ``first_value``, ``last_value``, and
    ``nth_value`` window operations. The other window operations are not affected by
    this.

    **Default value:** :  ``[null, 0]`` (includes the current object and all preceding
    objects)
groupby : List(string)
    The data fields for partitioning the data objects into separate windows. If
    unspecified, all data points will be in a single group.
ignorePeers : boolean
    Indicates if the sliding window frame should ignore peer values. (Peer values are
    those considered identical by the sort criteria). The default is false, causing the
    window frame to expand to include all peer values. If set to true, the window frame
    will be defined by offset values only. This setting only affects those operations
    that depend on the window frame, namely aggregation operations and the first_value,
    last_value, and nth_value window operations.

    **Default value:** ``false``
sort : List(:class:`SortField`)
    A sort field definition for sorting data objects within a window. If two data
    objects are considered equal by the comparator, they are considered “peer” values of
    equal rank. If sort is not specified, the order is undefined: data objects are
    processed in the order they are observed and none are considered peers (the
    ignorePeers parameter is ignored and treated as if set to ``true`` ).
**kwargs
    transforms can also be passed by keyword argument; see Examples

Examples
--------
A cumulative line chart

>>> import altair as alt
>>> import numpy as np
>>> import pandas as pd
>>> data = pd.DataFrame({"x": np.arange(100), "y": np.random.randn(100)})
>>> chart = (
...     alt.Chart(data)
...     .mark_line()
...     .encode(x="x:Q", y="ycuml:Q")
...     .transform_window(ycuml="sum(y)")
... )
>>> chart.transform[0]
WindowTransform({
  window: [WindowFieldDef({
    as: 'ycuml',
    field: 'y',
    op: 'sum'
  })]
})

---
## _repr_mimebundle_
```python
from api import _repr_mimebundle_
```

Return a MIME bundle for display in Jupyter frontends.

---
## display
```python
from api import display
```

Display chart in Jupyter notebook or JupyterLab.

Parameters are passed as options to vega-embed within supported frontends.
See https://github.com/vega/vega-embed#options for details.

Parameters
----------
renderer : string ('canvas' or 'svg')
    The renderer to use
theme : string
    The Vega theme name to use; see https://github.com/vega/vega-themes
actions : bool or dict
    Specify whether action links ("Open In Vega Editor", etc.) are
    included in the view.
**kwargs :
    Additional parameters are also passed to vega-embed as options.

---
## serve
```python
from api import serve
```

'serve' is deprecated. Use 'show' instead.

---
## show
```python
from api import show
```

Display the chart using the active renderer.

---
## _set_resolve
```python
from api import _set_resolve
```

Copy the chart and update the resolve property with kwargs.

---
## resolve_axis
```python
from api import resolve_axis
```



---
## resolve_legend
```python
from api import resolve_legend
```



---
## resolve_scale
```python
from api import resolve_scale
```



---
## facet
```python
from api import facet
```

Create a facet chart from the current chart.

Faceted charts require data to be specified at the top level; if data
is not specified, the data from the current chart will be used at the
top level.

Parameters
----------
facet : string, Facet (optional)
    The data column to use as an encoding for a wrapped facet.
    If specified, then neither row nor column may be specified.
column : string, Column, FacetFieldDef (optional)
    The data column to use as an encoding for a column facet.
    May be combined with row argument, but not with facet argument.
row : string or Row, FacetFieldDef (optional)
    The data column to use as an encoding for a row facet.
    May be combined with column argument, but not with facet argument.
data : string or dataframe (optional)
    The dataset to use for faceting. If not supplied, then data must
    be specified in the top-level chart that calls this method.
columns : integer
    the maximum number of columns for a wrapped facet.

Returns
-------
self :
    for chaining

---
## from_dict
```python
from api import from_dict
```

Construct class from a dictionary representation.

Parameters
----------
dct : dictionary
    The dict from which to construct the class
validate : boolean
    If True (default), then validate the input against the schema.

Returns
-------
obj : Chart object
    The wrapped schema

Raises
------
jsonschema.ValidationError :
    if validate=True and dct does not conform to the schema

---
## transformed_data
```python
from api import transformed_data
```

Evaluate a FacetChart's transforms.

Evaluate the data transforms associated with a FacetChart and return the
transformed data a DataFrame

Parameters
----------
row_limit : int (optional)
    Maximum number of rows to return for each DataFrame. None (default) for unlimited
exclude : iterable of str
    Set of the names of charts to exclude

Returns
-------
DataFrame
    Transformed data as a DataFrame

---
## add_params
```python
from api import add_params
```

Add one or more parameters to the chart.

---
## add_selection
```python
from api import add_selection
```

'add_selection' is deprecated. Use 'add_params' instead.

---
## interactive
```python
from api import interactive
```

Make chart axes scales interactive.

Parameters
----------
name : string
    The parameter name to use for the axes scales. This name should be
    unique among all parameters within the chart.
bind_x : boolean, default True
    If true, then bind the interactive scales to the x-axis
bind_y : boolean, default True
    If true, then bind the interactive scales to the y-axis

Returns
-------
chart :
    copy of self, with interactive axes added

---
## _get_any
```python
from api import _get_any
```



---
## __ior__
```python
from api import __ior__
```



---
## __iand__
```python
from api import __iand__
```



---
## __iadd__
```python
from api import __iadd__
```



---
## add_layers
```python
from api import add_layers
```



---
## remove_data
```python
from api import remove_data
```



---
## remove_prop
```python
from api import remove_prop
```



---
## __name__
```python
from mixins import __name__
```

Mixin classes for custom array types that don't inherit from ndarray.

---
## MarkMethodMixin
```python
from mixins import MarkMethodMixin
```

A mixin class that defines mark methods.

---
## ConfigMethodMixin
```python
from mixins import ConfigMethodMixin
```

A mixin class that defines config methods.

---
## mark_arc
```python
from mixins import mark_arc
```

Set the chart's mark to 'arc' (see :class:`MarkDef`).

---
## mark_area
```python
from mixins import mark_area
```

Set the chart's mark to 'area' (see :class:`MarkDef`).

---
## mark_bar
```python
from mixins import mark_bar
```

Set the chart's mark to 'bar' (see :class:`MarkDef`).

---
## mark_image
```python
from mixins import mark_image
```

Set the chart's mark to 'image' (see :class:`MarkDef`).

---
## mark_line
```python
from mixins import mark_line
```

Set the chart's mark to 'line' (see :class:`MarkDef`).

---
## mark_point
```python
from mixins import mark_point
```

Set the chart's mark to 'point' (see :class:`MarkDef`).

---
## mark_rect
```python
from mixins import mark_rect
```

Set the chart's mark to 'rect' (see :class:`MarkDef`).

---
## mark_rule
```python
from mixins import mark_rule
```

Set the chart's mark to 'rule' (see :class:`MarkDef`).

---
## mark_text
```python
from mixins import mark_text
```

Set the chart's mark to 'text' (see :class:`MarkDef`).

---
## mark_tick
```python
from mixins import mark_tick
```

Set the chart's mark to 'tick' (see :class:`MarkDef`).

---
## mark_trail
```python
from mixins import mark_trail
```

Set the chart's mark to 'trail' (see :class:`MarkDef`).

---
## mark_circle
```python
from mixins import mark_circle
```

Set the chart's mark to 'circle' (see :class:`MarkDef`).

---
## mark_square
```python
from mixins import mark_square
```

Set the chart's mark to 'square' (see :class:`MarkDef`).

---
## mark_geoshape
```python
from mixins import mark_geoshape
```

Set the chart's mark to 'geoshape' (see :class:`MarkDef`).

---
## mark_boxplot
```python
from mixins import mark_boxplot
```

Set the chart's mark to 'boxplot' (see :class:`BoxPlotDef`).

---
## mark_errorbar
```python
from mixins import mark_errorbar
```

Set the chart's mark to 'errorbar' (see :class:`ErrorBarDef`).

---
## mark_errorband
```python
from mixins import mark_errorband
```

Set the chart's mark to 'errorband' (see :class:`ErrorBandDef`).

---
## configure
```python
from mixins import configure
```



---
## configure_arc
```python
from mixins import configure_arc
```



---
## configure_area
```python
from mixins import configure_area
```



---
## configure_axis
```python
from mixins import configure_axis
```



---
## configure_axisBand
```python
from mixins import configure_axisBand
```



---
## configure_axisBottom
```python
from mixins import configure_axisBottom
```



---
## configure_axisDiscrete
```python
from mixins import configure_axisDiscrete
```



---
## configure_axisLeft
```python
from mixins import configure_axisLeft
```



---
## configure_axisPoint
```python
from mixins import configure_axisPoint
```



---
## configure_axisQuantitative
```python
from mixins import configure_axisQuantitative
```



---
## configure_axisRight
```python
from mixins import configure_axisRight
```



---
## configure_axisTemporal
```python
from mixins import configure_axisTemporal
```



---
## configure_axisTop
```python
from mixins import configure_axisTop
```



---
## configure_axisX
```python
from mixins import configure_axisX
```



---
## configure_axisXBand
```python
from mixins import configure_axisXBand
```



---
## configure_axisXDiscrete
```python
from mixins import configure_axisXDiscrete
```



---
## configure_axisXPoint
```python
from mixins import configure_axisXPoint
```



---
## configure_axisXQuantitative
```python
from mixins import configure_axisXQuantitative
```



---
## configure_axisXTemporal
```python
from mixins import configure_axisXTemporal
```



---
## configure_axisY
```python
from mixins import configure_axisY
```



---
## configure_axisYBand
```python
from mixins import configure_axisYBand
```



---
## configure_axisYDiscrete
```python
from mixins import configure_axisYDiscrete
```



---
## configure_axisYPoint
```python
from mixins import configure_axisYPoint
```



---
## configure_axisYQuantitative
```python
from mixins import configure_axisYQuantitative
```



---
## configure_axisYTemporal
```python
from mixins import configure_axisYTemporal
```



---
## configure_bar
```python
from mixins import configure_bar
```



---
## configure_boxplot
```python
from mixins import configure_boxplot
```



---
## configure_circle
```python
from mixins import configure_circle
```



---
## configure_concat
```python
from mixins import configure_concat
```



---
## configure_errorband
```python
from mixins import configure_errorband
```



---
## configure_errorbar
```python
from mixins import configure_errorbar
```



---
## configure_facet
```python
from mixins import configure_facet
```



---
## configure_geoshape
```python
from mixins import configure_geoshape
```



---
## configure_header
```python
from mixins import configure_header
```



---
## configure_headerColumn
```python
from mixins import configure_headerColumn
```



---
## configure_headerFacet
```python
from mixins import configure_headerFacet
```



---
## configure_headerRow
```python
from mixins import configure_headerRow
```



---
## configure_image
```python
from mixins import configure_image
```



---
## configure_legend
```python
from mixins import configure_legend
```



---
## configure_line
```python
from mixins import configure_line
```



---
## configure_mark
```python
from mixins import configure_mark
```



---
## configure_point
```python
from mixins import configure_point
```



---
## configure_projection
```python
from mixins import configure_projection
```



---
## configure_range
```python
from mixins import configure_range
```



---
## configure_rect
```python
from mixins import configure_rect
```



---
## configure_rule
```python
from mixins import configure_rule
```



---
## configure_scale
```python
from mixins import configure_scale
```



---
## configure_selection
```python
from mixins import configure_selection
```



---
## configure_square
```python
from mixins import configure_square
```



---
## configure_text
```python
from mixins import configure_text
```



---
## configure_tick
```python
from mixins import configure_tick
```



---
## configure_title
```python
from mixins import configure_title
```



---
## configure_tooltipFormat
```python
from mixins import configure_tooltipFormat
```



---
## configure_trail
```python
from mixins import configure_trail
```



---
## configure_view
```python
from mixins import configure_view
```



---
## load_schema
```python
from core import load_schema
```

Load the json schema associated with this module's functions.

---
## VegaLiteSchema
```python
from core import VegaLiteSchema
```



---
## Root
```python
from core import Root
```

Root schema wrapper.

A Vega-Lite top-level specification. This is the root class for all Vega-Lite
specifications. (The json schema is generated from this type.)

---
## Aggregate
```python
from core import Aggregate
```

Aggregate schema wrapper.

---
## AggregateOp
```python
from core import AggregateOp
```

AggregateOp schema wrapper.

---
## AggregatedFieldDef
```python
from core import AggregatedFieldDef
```

AggregatedFieldDef schema wrapper.

Parameters
----------
op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    The aggregation operation to apply to the fields (e.g., ``"sum"``, ``"average"``, or
    ``"count"``). See the `full list of supported aggregation operations
    <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ for more information.
field : str, :class:`FieldName`
    The data field for which to compute aggregate function. This is required for all
    aggregation operations except ``"count"``.
as : str, :class:`FieldName`
    The output field names to use for each aggregated field.

---
## Align
```python
from core import Align
```

Align schema wrapper.

---
## AnyMark
```python
from core import AnyMark
```

AnyMark schema wrapper.

---
## AnyMarkConfig
```python
from core import AnyMarkConfig
```

AnyMarkConfig schema wrapper.

---
## AreaConfig
```python
from core import AreaConfig
```

AreaConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, Literal['ltr', 'rtl'], :class:`TextDirection`
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
line : bool, dict, :class:`OverlayMarkDef`
    A flag for overlaying line on top of area marks, or an object defining the
    properties of the overlayed lines.

    * If this value is an empty object (``{}``) or ``true``, lines with default
      properties will be used.

    * If this value is ``false``, no lines would be automatically added to area marks.

    **Default value:** ``false``.
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`
    A flag for overlaying points on top of line or area marks, or an object defining the
    properties of the overlayed points.

    * If this property is ``"transparent"``, transparent points will be used (for
      enhancing tooltips and selections).

    * If this property is an empty object (``{}``) or ``true``, filled points with
      default properties will be used.

    * If this property is ``false``, no points would be automatically added to line or
      area marks.

    **Default value:** ``false``.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## ArgmaxDef
```python
from core import ArgmaxDef
```

ArgmaxDef schema wrapper.

Parameters
----------
argmax : str, :class:`FieldName`

---
## ArgminDef
```python
from core import ArgminDef
```

ArgminDef schema wrapper.

Parameters
----------
argmin : str, :class:`FieldName`

---
## AutoSizeParams
```python
from core import AutoSizeParams
```

AutoSizeParams schema wrapper.

Parameters
----------
contains : Literal['content', 'padding']
    Determines how size calculation should be performed, one of ``"content"`` or
    ``"padding"``. The default setting (``"content"``) interprets the width and height
    settings as the data rectangle (plotting) dimensions, to which padding is then
    added. In contrast, the ``"padding"`` setting includes the padding within the view
    size calculations, such that the width and height settings indicate the **total**
    intended size of the view.

    **Default value**: ``"content"``
resize : bool
    A boolean flag indicating if autosize layout should be re-calculated on every view
    update.

    **Default value**: ``false``
type : :class:`AutosizeType`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    The sizing format type. One of ``"pad"``, ``"fit"``, ``"fit-x"``, ``"fit-y"``,  or
    ``"none"``. See the `autosize type
    <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for
    descriptions of each.

    **Default value**: ``"pad"``

---
## AutosizeType
```python
from core import AutosizeType
```

AutosizeType schema wrapper.

---
## Axis
```python
from core import Axis
```

Axis schema wrapper.

Parameters
----------
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the axis from the ARIA accessibility tree.

    **Default value:** ``true``
bandPosition : dict, float, :class:`ExprRef`
    An interpolation fraction indicating where, for ``band`` scales, axis ticks should
    be positioned. A value of ``0`` places ticks at the left edge of their bands. A
    value of ``0.5`` places ticks in the middle of their bands.

    **Default value:** ``0.5``
description : str, dict, :class:`ExprRef`
    A text description of this axis for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__
    will be set to this description. If the description is unspecified it will be
    automatically generated.
domain : bool
    A boolean flag indicating if the domain (the axis baseline) should be included as
    part of the axis.

    **Default value:** ``true``
domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
domainColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of axis domain line.

    **Default value:** ``"gray"``.
domainDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating [stroke, space] lengths for dashed domain lines.
domainDashOffset : dict, float, :class:`ExprRef`
    The pixel offset at which to start drawing with the domain dash array.
domainOpacity : dict, float, :class:`ExprRef`
    Opacity of the axis domain line.
domainWidth : dict, float, :class:`ExprRef`
    Stroke width of axis domain line

    **Default value:** ``1``
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
grid : bool
    A boolean flag indicating if grid lines should be included as part of the axis

    **Default value:** ``true`` for `continuous scales
    <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
    binned; otherwise, ``false``.
gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for grid lines' ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
gridColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of gridlines.

    **Default value:** ``"lightGray"``.
gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`
    An array of alternating [stroke, space] lengths for dashed grid lines.
gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The pixel offset at which to start drawing with the grid dash array.
gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The stroke opacity of grid (value between [0,1])

    **Default value:** ``1``
gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The grid width, in pixels.

    **Default value:** ``1``
labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right']
    Horizontal text alignment of axis tick labels, overriding the default setting for
    the current axis orientation.
labelAngle : dict, float, :class:`ExprRef`
    The rotation angle of the axis labels.

    **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline of axis tick labels, overriding the default setting for the
    current axis orientation. One of ``"alphabetic"`` (default), ``"top"``,
    ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The ``"line-top"``
    and ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but
    are calculated relative to the *lineHeight* rather than *fontSize* alone.
labelBound : bool, dict, float, :class:`ExprRef`
    Indicates if labels should be hidden if they exceed the axis range. If ``false``
    (the default) no bounds overlap analysis is performed. If ``true``, labels will be
    hidden if they exceed the axis range by more than 1 pixel. If this property is a
    number, it specifies the pixel tolerance: the maximum amount by which a label
    bounding box may exceed the axis range.

    **Default value:** ``false``.
labelColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the tick label, can be in hex color code or regular color name.
labelExpr : str
    `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
    labels.

    **Note:** The label text and value can be assessed via the ``label`` and ``value``
    properties of the axis's backing ``datum`` object.
labelFlush : bool, float
    Indicates if the first and last axis labels should be aligned flush with the scale
    range. Flush alignment for a horizontal axis will left-align the first label and
    right-align the last label. For vertical axes, bottom and top text baselines are
    applied instead. If this property is a number, it also indicates the number of
    pixels by which to offset the first and last labels; for example, a value of 2 will
    flush-align the first and last labels and also push them 2 pixels outward from the
    center of the axis. The additional adjustment can sometimes help the labels better
    visually group with corresponding axis ticks.

    **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
labelFlushOffset : dict, float, :class:`ExprRef`
    Indicates the number of pixels by which to offset flush-adjusted labels. For
    example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the
    center of the axis. Offsets can help the labels better visually group with
    corresponding axis ticks.

    **Default value:** ``0``.
labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString`
    The font of the tick label.
labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The font size of the label, in pixels.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle`
    Font style of the title.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of axis tick labels.
labelLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of axis tick labels.

    **Default value:** ``180``
labelLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line label text or label text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    Position offset in pixels to apply to labels, in addition to tickOffset.

    **Default value:** ``0``
labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The opacity of the labels.
labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']
    The strategy to use for resolving overlap of axis labels. If ``false`` (the
    default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
    strategy of removing every other label is used (this works well for standard linear
    axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
    any labels that overlaps with the last visible label (this often works better for
    log-scaled axes).

    **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
    for log scales; otherwise ``false``.
labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The padding in pixels between labels and ticks.

    **Default value:** ``2``
labelSeparation : dict, float, :class:`ExprRef`
    The minimum separation that must be between label bounding boxes for them to be
    considered non-overlapping (default ``0``). This property is ignored if
    *labelOverlap* resolution is not enabled.
labels : bool
    A boolean flag indicating if labels should be included as part of the axis.

    **Default value:** ``true``.
maxExtent : dict, float, :class:`ExprRef`
    The maximum extent in pixels that axis ticks and labels should use. This determines
    a maximum offset value for axis titles.

    **Default value:** ``undefined``.
minExtent : dict, float, :class:`ExprRef`
    The minimum extent in pixels that axis ticks and labels should use. This determines
    a minimum offset value for axis titles.

    **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.
offset : dict, float, :class:`ExprRef`
    The offset, in pixels, by which to displace the axis from the edge of the enclosing
    group or data rectangle.

    **Default value:** derived from the `axis config
    <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__'s
    ``offset`` (``0`` by default)
orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right']
    The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
    a y-axis oriented towards the right edge of the chart).

    **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
position : dict, float, :class:`ExprRef`
    The anchor position of the axis in pixels. For x-axes with top or bottom
    orientation, this sets the axis group x coordinate. For y-axes with left or right
    orientation, this sets the axis group y coordinate.

    **Default value**: ``0``
style : str, Sequence[str]
    A string or array of strings indicating the name of custom styles to apply to the
    axis. A style is a named collection of axis property defined within the `style
    configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If
    style is an array, later styles will override earlier styles.

    **Default value:** (none) **Note:** Any specified style will augment the default
    style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX``
    and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
tickBand : dict, :class:`ExprRef`, Literal['center', 'extent']
    For band scales, indicates if ticks and grid lines should be placed at the
    ``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals
tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
tickColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the axis's tick.

    **Default value:** ``"gray"``
tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']
    A desired number of ticks, for axes visualizing quantitative scales. The resulting
    number may be different so that values are "nice" (multiples of 2, 5, 10) and lie
    within the underlying scale's range.

    For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time
    interval specifier. Legal string values are ``"millisecond"``, ``"second"``,
    ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``.
    Alternatively, an object-valued interval specifier of the form ``{"interval":
    "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are
    generated for each quarter (Jan, Apr, Jul, Oct) boundary.

    **Default value**: Determine using a formula ``ceil(width/40)`` for x and
    ``ceil(height/40)`` for y.
tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`
    An array of alternating [stroke, space] lengths for dashed tick mark lines.
tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The pixel offset at which to start drawing with the tick mark dash array.
tickExtra : bool
    Boolean flag indicating if an extra axis tick should be added for the initial
    position of the axis. This flag is useful for styling axes for ``band`` scales such
    that ticks are placed on band boundaries rather in the middle of a band. Use in
    conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``.
tickMinStep : dict, float, :class:`ExprRef`
    The minimum desired step between axis ticks, in terms of scale domain values. For
    example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
    If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
    necessary, to enforce the minimum step value.
tickOffset : dict, float, :class:`ExprRef`
    Position offset in pixels to apply to ticks, labels, and gridlines.
tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    Opacity of the ticks.
tickRound : bool
    Boolean flag indicating if pixel position values should be rounded to the nearest
    integer.

    **Default value:** ``true``
tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The size in pixels of axis ticks.

    **Default value:** ``5``
tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The width, in pixels, of ticks.

    **Default value:** ``1``
ticks : bool
    Boolean value that determines whether the axis should include ticks.

    **Default value:** ``true``
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment of axis titles.
titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    Text anchor position for placing axis titles.
titleAngle : dict, float, :class:`ExprRef`
    Angle in degrees of axis titles.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for axis titles. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize*
    alone.
titleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of the title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    Font of the title. (e.g., ``"Helvetica Neue"``).
titleFontSize : dict, float, :class:`ExprRef`
    Font size of the title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style of the title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``)
    or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400``
    and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of axis titles.
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
titleOpacity : dict, float, :class:`ExprRef`
    Opacity of the axis title.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixels, between title and axis.
titleX : dict, float, :class:`ExprRef`
    X-coordinate of the axis title relative to the axis group.
titleY : dict, float, :class:`ExprRef`
    Y-coordinate of the axis title relative to the axis group.
translate : dict, float, :class:`ExprRef`
    Coordinate space translation offset for axis layout. By default, axes are translated
    by a 0.5 pixel offset for both the x and y coordinates in order to align stroked
    lines with the pixel grid. However, for vector graphics output these pixel-specific
    adjustments may be undesirable, in which case translate can be changed (for example,
    to zero).

    **Default value:** ``0.5``
values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]
    Explicitly set the visible axis tick values.
zindex : float
    A non-negative integer indicating the z-index of the axis. If zindex is 0, axes
    should be drawn behind all chart elements. To put them in front, set ``zindex`` to
    ``1`` or more.

    **Default value:** ``0`` (behind the marks).

---
## AxisConfig
```python
from core import AxisConfig
```

AxisConfig schema wrapper.

Parameters
----------
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the axis from the ARIA accessibility tree.

    **Default value:** ``true``
bandPosition : dict, float, :class:`ExprRef`
    An interpolation fraction indicating where, for ``band`` scales, axis ticks should
    be positioned. A value of ``0`` places ticks at the left edge of their bands. A
    value of ``0.5`` places ticks in the middle of their bands.

    **Default value:** ``0.5``
description : str, dict, :class:`ExprRef`
    A text description of this axis for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__
    will be set to this description. If the description is unspecified it will be
    automatically generated.
disable : bool
    Disable axis by default.
domain : bool
    A boolean flag indicating if the domain (the axis baseline) should be included as
    part of the axis.

    **Default value:** ``true``
domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
domainColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of axis domain line.

    **Default value:** ``"gray"``.
domainDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating [stroke, space] lengths for dashed domain lines.
domainDashOffset : dict, float, :class:`ExprRef`
    The pixel offset at which to start drawing with the domain dash array.
domainOpacity : dict, float, :class:`ExprRef`
    Opacity of the axis domain line.
domainWidth : dict, float, :class:`ExprRef`
    Stroke width of axis domain line

    **Default value:** ``1``
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
grid : bool
    A boolean flag indicating if grid lines should be included as part of the axis

    **Default value:** ``true`` for `continuous scales
    <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not
    binned; otherwise, ``false``.
gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for grid lines' ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
gridColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of gridlines.

    **Default value:** ``"lightGray"``.
gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`
    An array of alternating [stroke, space] lengths for dashed grid lines.
gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The pixel offset at which to start drawing with the grid dash array.
gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The stroke opacity of grid (value between [0,1])

    **Default value:** ``1``
gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The grid width, in pixels.

    **Default value:** ``1``
labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right']
    Horizontal text alignment of axis tick labels, overriding the default setting for
    the current axis orientation.
labelAngle : dict, float, :class:`ExprRef`
    The rotation angle of the axis labels.

    **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline of axis tick labels, overriding the default setting for the
    current axis orientation. One of ``"alphabetic"`` (default), ``"top"``,
    ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The ``"line-top"``
    and ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but
    are calculated relative to the *lineHeight* rather than *fontSize* alone.
labelBound : bool, dict, float, :class:`ExprRef`
    Indicates if labels should be hidden if they exceed the axis range. If ``false``
    (the default) no bounds overlap analysis is performed. If ``true``, labels will be
    hidden if they exceed the axis range by more than 1 pixel. If this property is a
    number, it specifies the pixel tolerance: the maximum amount by which a label
    bounding box may exceed the axis range.

    **Default value:** ``false``.
labelColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the tick label, can be in hex color code or regular color name.
labelExpr : str
    `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
    labels.

    **Note:** The label text and value can be assessed via the ``label`` and ``value``
    properties of the axis's backing ``datum`` object.
labelFlush : bool, float
    Indicates if the first and last axis labels should be aligned flush with the scale
    range. Flush alignment for a horizontal axis will left-align the first label and
    right-align the last label. For vertical axes, bottom and top text baselines are
    applied instead. If this property is a number, it also indicates the number of
    pixels by which to offset the first and last labels; for example, a value of 2 will
    flush-align the first and last labels and also push them 2 pixels outward from the
    center of the axis. The additional adjustment can sometimes help the labels better
    visually group with corresponding axis ticks.

    **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.
labelFlushOffset : dict, float, :class:`ExprRef`
    Indicates the number of pixels by which to offset flush-adjusted labels. For
    example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the
    center of the axis. Offsets can help the labels better visually group with
    corresponding axis ticks.

    **Default value:** ``0``.
labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString`
    The font of the tick label.
labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The font size of the label, in pixels.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle`
    Font style of the title.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of axis tick labels.
labelLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of axis tick labels.

    **Default value:** ``180``
labelLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line label text or label text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    Position offset in pixels to apply to labels, in addition to tickOffset.

    **Default value:** ``0``
labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The opacity of the labels.
labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']
    The strategy to use for resolving overlap of axis labels. If ``false`` (the
    default), no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
    strategy of removing every other label is used (this works well for standard linear
    axes). If set to ``"greedy"``, a linear scan of the labels is performed, removing
    any labels that overlaps with the last visible label (this often works better for
    log-scaled axes).

    **Default value:** ``true`` for non-nominal fields with non-log scales; ``"greedy"``
    for log scales; otherwise ``false``.
labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The padding in pixels between labels and ticks.

    **Default value:** ``2``
labelSeparation : dict, float, :class:`ExprRef`
    The minimum separation that must be between label bounding boxes for them to be
    considered non-overlapping (default ``0``). This property is ignored if
    *labelOverlap* resolution is not enabled.
labels : bool
    A boolean flag indicating if labels should be included as part of the axis.

    **Default value:** ``true``.
maxExtent : dict, float, :class:`ExprRef`
    The maximum extent in pixels that axis ticks and labels should use. This determines
    a maximum offset value for axis titles.

    **Default value:** ``undefined``.
minExtent : dict, float, :class:`ExprRef`
    The minimum extent in pixels that axis ticks and labels should use. This determines
    a minimum offset value for axis titles.

    **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.
offset : dict, float, :class:`ExprRef`
    The offset, in pixels, by which to displace the axis from the edge of the enclosing
    group or data rectangle.

    **Default value:** derived from the `axis config
    <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__'s
    ``offset`` (``0`` by default)
orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right']
    The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``. The orientation can be used to further specialize the axis type (e.g.,
    a y-axis oriented towards the right edge of the chart).

    **Default value:** ``"bottom"`` for x-axes and ``"left"`` for y-axes.
position : dict, float, :class:`ExprRef`
    The anchor position of the axis in pixels. For x-axes with top or bottom
    orientation, this sets the axis group x coordinate. For y-axes with left or right
    orientation, this sets the axis group y coordinate.

    **Default value**: ``0``
style : str, Sequence[str]
    A string or array of strings indicating the name of custom styles to apply to the
    axis. A style is a named collection of axis property defined within the `style
    configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If
    style is an array, later styles will override earlier styles.

    **Default value:** (none) **Note:** Any specified style will augment the default
    style. For example, an x-axis mark with ``"style": "foo"`` will use ``config.axisX``
    and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
tickBand : dict, :class:`ExprRef`, Literal['center', 'extent']
    For band scales, indicates if ticks and grid lines should be placed at the
    ``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals
tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or
    ``"square"``.

    **Default value:** ``"butt"``
tickColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the axis's tick.

    **Default value:** ``"gray"``
tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']
    A desired number of ticks, for axes visualizing quantitative scales. The resulting
    number may be different so that values are "nice" (multiples of 2, 5, 10) and lie
    within the underlying scale's range.

    For scales of type ``"time"`` or ``"utc"``, the tick count can instead be a time
    interval specifier. Legal string values are ``"millisecond"``, ``"second"``,
    ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and ``"year"``.
    Alternatively, an object-valued interval specifier of the form ``{"interval":
    "month", "step": 3}`` includes a desired number of interval steps. Here, ticks are
    generated for each quarter (Jan, Apr, Jul, Oct) boundary.

    **Default value**: Determine using a formula ``ceil(width/40)`` for x and
    ``ceil(height/40)`` for y.
tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`
    An array of alternating [stroke, space] lengths for dashed tick mark lines.
tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The pixel offset at which to start drawing with the tick mark dash array.
tickExtra : bool
    Boolean flag indicating if an extra axis tick should be added for the initial
    position of the axis. This flag is useful for styling axes for ``band`` scales such
    that ticks are placed on band boundaries rather in the middle of a band. Use in
    conjunction with ``"bandPosition": 1`` and an axis ``"padding"`` value of ``0``.
tickMinStep : dict, float, :class:`ExprRef`
    The minimum desired step between axis ticks, in terms of scale domain values. For
    example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
    If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
    necessary, to enforce the minimum step value.
tickOffset : dict, float, :class:`ExprRef`
    Position offset in pixels to apply to ticks, labels, and gridlines.
tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    Opacity of the ticks.
tickRound : bool
    Boolean flag indicating if pixel position values should be rounded to the nearest
    integer.

    **Default value:** ``true``
tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The size in pixels of axis ticks.

    **Default value:** ``5``
tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`
    The width, in pixels, of ticks.

    **Default value:** ``1``
ticks : bool
    Boolean value that determines whether the axis should include ticks.

    **Default value:** ``true``
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment of axis titles.
titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    Text anchor position for placing axis titles.
titleAngle : dict, float, :class:`ExprRef`
    Angle in degrees of axis titles.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for axis titles. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize*
    alone.
titleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of the title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    Font of the title. (e.g., ``"Helvetica Neue"``).
titleFontSize : dict, float, :class:`ExprRef`
    Font size of the title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style of the title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``)
    or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400``
    and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of axis titles.
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
titleOpacity : dict, float, :class:`ExprRef`
    Opacity of the axis title.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixels, between title and axis.
titleX : dict, float, :class:`ExprRef`
    X-coordinate of the axis title relative to the axis group.
titleY : dict, float, :class:`ExprRef`
    Y-coordinate of the axis title relative to the axis group.
translate : dict, float, :class:`ExprRef`
    Coordinate space translation offset for axis layout. By default, axes are translated
    by a 0.5 pixel offset for both the x and y coordinates in order to align stroked
    lines with the pixel grid. However, for vector graphics output these pixel-specific
    adjustments may be undesirable, in which case translate can be changed (for example,
    to zero).

    **Default value:** ``0.5``
values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]
    Explicitly set the visible axis tick values.
zindex : float
    A non-negative integer indicating the z-index of the axis. If zindex is 0, axes
    should be drawn behind all chart elements. To put them in front, set ``zindex`` to
    ``1`` or more.

    **Default value:** ``0`` (behind the marks).

---
## AxisOrient
```python
from core import AxisOrient
```

AxisOrient schema wrapper.

---
## AxisResolveMap
```python
from core import AxisResolveMap
```

AxisResolveMap schema wrapper.

Parameters
----------
x : :class:`ResolveMode`, Literal['independent', 'shared']

y : :class:`ResolveMode`, Literal['independent', 'shared']

---
## BBox
```python
from core import BBox
```

BBox schema wrapper.

Bounding box https://tools.ietf.org/html/rfc7946#section-5

---
## BarConfig
```python
from core import BarConfig
```

BarConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
binSpacing : float
    Offset between bars for binned field. The ideal value for this is either 0
    (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).

    **Default value:** ``1``
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
continuousBandSize : float
    The default size of the bars on continuous scales.

    **Default value:** ``5``
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusEnd : dict, float, :class:`ExprRef`
    * For vertical bars, top-left and top-right corner radius.

    * For horizontal bars, top-right and bottom-right corner radius.
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
discreteBandSize : dict, float, :class:`RelativeBandSize`
    The default size of the bars with discrete dimensions. If unspecified, the default
    size is  ``step-2``, which provides 2 pixel offset between bars.
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
minBandSize : dict, float, :class:`ExprRef`
    The minimum band size for bar and rectangle marks. **Default value:** ``0.25``
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## BaseTitleNoValueRefs
```python
from core import BaseTitleNoValueRefs
```

BaseTitleNoValueRefs schema wrapper.

Parameters
----------
align : :class:`Align`, Literal['left', 'center', 'right']
    Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
    ``"right"``.
anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the title and subtitle text. One of ``"start"``,
    ``"middle"``, or ``"end"``. For example, with an orientation of top these anchor
    positions map to a left-, center-, or right-aligned title.
angle : dict, float, :class:`ExprRef`
    Angle in degrees of title and subtitle text.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the title from the ARIA accessibility tree.

    **Default value:** ``true``
baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
    (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
    ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
    to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
    rather than *fontSize* alone.
color : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for title text.
dx : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text x-coordinate.
dy : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text y-coordinate.
font : str, dict, :class:`ExprRef`
    Font name for title text.
fontSize : dict, float, :class:`ExprRef`
    Font size in pixels for title text.
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for title text.
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for title text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']
    The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
    to the full bounding box) or ``"group"`` (to anchor relative to the group width or
    height).
limit : dict, float, :class:`ExprRef`
    The maximum allowed length in pixels of title and subtitle text.
lineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
offset : dict, float, :class:`ExprRef`
    The orthogonal offset in pixels by which to displace the title group from its
    position along the edge of the chart.
orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']
    Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``)
subtitleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for subtitle text.
subtitleFont : str, dict, :class:`ExprRef`
    Font name for subtitle text.
subtitleFontSize : dict, float, :class:`ExprRef`
    Font size in pixels for subtitle text.
subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for subtitle text.
subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for subtitle text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
subtitleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line subtitle text.
subtitlePadding : dict, float, :class:`ExprRef`
    The padding in pixels between title and subtitle text.
zindex : dict, float, :class:`ExprRef`
    The integer z-index indicating the layering of the title group relative to other
    axis, mark, and legend groups.

    **Default value:** ``0``.

---
## BinExtent
```python
from core import BinExtent
```

BinExtent schema wrapper.

---
## BinParams
```python
from core import BinParams
```

BinParams schema wrapper.

Binning properties or boolean flag for determining whether to bin data or not.

Parameters
----------
anchor : float
    A value in the binned domain at which to anchor the bins, shifting the bin
    boundaries if necessary to ensure that a boundary aligns with the anchor value.

    **Default value:** the minimum bin extent value
base : float
    The number base to use for automatic bin determination (default is base 10).

    **Default value:** ``10``
binned : bool
    When set to ``true``, Vega-Lite treats the input data as already binned.
divide : Sequence[float]
    Scale factors indicating allowable subdivisions. The default value is [5, 2], which
    indicates that for base 10 numbers (the default base), the method may consider
    dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the
    method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might
    also satisfy the given constraints.

    **Default value:** ``[5, 2]``
extent : dict, Sequence[float], :class:`BinExtent`, :class:`ParameterExtent`
    A two-element (``[min, max]``) array indicating the range of desired bin values.
maxbins : float
    Maximum number of bins.

    **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for
    other channels
minstep : float
    A minimum allowable step size (particularly useful for integer values).
nice : bool
    If true, attempts to make the bin boundaries use human-friendly boundaries, such as
    multiples of ten.

    **Default value:** ``true``
step : float
    An exact step size to use between bins.

    **Note:** If provided, options such as maxbins will be ignored.
steps : Sequence[float]
    An array of allowable step sizes to choose from.

---
## Binding
```python
from core import Binding
```

Binding schema wrapper.

---
## BindCheckbox
```python
from core import BindCheckbox
```

BindCheckbox schema wrapper.

Parameters
----------
input : Literal['checkbox']

debounce : float
    If defined, delays event handling until the specified milliseconds have elapsed
    since the last event was fired.
element : str, :class:`Element`
    An optional CSS selector string indicating the parent element to which the input
    element should be added. By default, all input elements are added within the parent
    container of the Vega view.
name : str
    By default, the signal name is used to label input elements. This ``name`` property
    can be used instead to specify a custom label for the bound signal.

---
## BindDirect
```python
from core import BindDirect
```

BindDirect schema wrapper.

Parameters
----------
element : str, dict, :class:`Element`
    An input element that exposes a *value* property and supports the `EventTarget
    <https://developer.mozilla.org/en-US/docs/Web/API/EventTarget>`__ interface, or a
    CSS selector string to such an element. When the element updates and dispatches an
    event, the *value* property will be used as the new, bound signal value. When the
    signal updates independent of the element, the *value* property will be set to the
    signal value and a new event will be dispatched on the element.
debounce : float
    If defined, delays event handling until the specified milliseconds have elapsed
    since the last event was fired.
event : str
    The event (default ``"input"``) to listen for to track changes on the external
    element.

---
## BindInput
```python
from core import BindInput
```

BindInput schema wrapper.

Parameters
----------
autocomplete : str
    A hint for form autofill. See the `HTML autocomplete attribute
    <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete>`__ for
    additional information.
debounce : float
    If defined, delays event handling until the specified milliseconds have elapsed
    since the last event was fired.
element : str, :class:`Element`
    An optional CSS selector string indicating the parent element to which the input
    element should be added. By default, all input elements are added within the parent
    container of the Vega view.
input : str
    The type of input element to use. The valid values are ``"checkbox"``, ``"radio"``,
    ``"range"``, ``"select"``, and any other legal `HTML form input type
    <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input>`__.
name : str
    By default, the signal name is used to label input elements. This ``name`` property
    can be used instead to specify a custom label for the bound signal.
placeholder : str
    Text that appears in the form control when it has no value set.

---
## BindRadioSelect
```python
from core import BindRadioSelect
```

BindRadioSelect schema wrapper.

Parameters
----------
input : Literal['radio', 'select']

options : Sequence[Any]
    An array of options to select from.
debounce : float
    If defined, delays event handling until the specified milliseconds have elapsed
    since the last event was fired.
element : str, :class:`Element`
    An optional CSS selector string indicating the parent element to which the input
    element should be added. By default, all input elements are added within the parent
    container of the Vega view.
labels : Sequence[str]
    An array of label strings to represent the ``options`` values. If unspecified, the
    ``options`` value will be coerced to a string and used as the label.
name : str
    By default, the signal name is used to label input elements. This ``name`` property
    can be used instead to specify a custom label for the bound signal.

---
## BindRange
```python
from core import BindRange
```

BindRange schema wrapper.

Parameters
----------
input : Literal['range']

debounce : float
    If defined, delays event handling until the specified milliseconds have elapsed
    since the last event was fired.
element : str, :class:`Element`
    An optional CSS selector string indicating the parent element to which the input
    element should be added. By default, all input elements are added within the parent
    container of the Vega view.
max : float
    Sets the maximum slider value. Defaults to the larger of the signal value and
    ``100``.
min : float
    Sets the minimum slider value. Defaults to the smaller of the signal value and
    ``0``.
name : str
    By default, the signal name is used to label input elements. This ``name`` property
    can be used instead to specify a custom label for the bound signal.
step : float
    Sets the minimum slider increment. If undefined, the step size will be automatically
    determined based on the ``min`` and ``max`` values.

---
## BinnedTimeUnit
```python
from core import BinnedTimeUnit
```

BinnedTimeUnit schema wrapper.

---
## Blend
```python
from core import Blend
```

Blend schema wrapper.

---
## BoxPlotConfig
```python
from core import BoxPlotConfig
```

BoxPlotConfig schema wrapper.

Parameters
----------
box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

extent : float, Literal['min-max']
    The extent of the whiskers. Available options include:

    * ``"min-max"``: min and max are the lower and upper whiskers respectively.
    * A number representing multiple of the interquartile range. This number will be
      multiplied by the IQR to determine whisker boundary, which spans from the smallest
      data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where
      *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile
      range (*Q3-Q1*).

    **Default value:** ``1.5``.
median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

size : float
    Size of the box and median tick of a box plot
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

---
## BrushConfig
```python
from core import BrushConfig
```

BrushConfig schema wrapper.

Parameters
----------
cursor : :class:`Cursor`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the interval mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
fill : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The fill color of the interval mark.

    **Default value:** ``"#333333"``
fillOpacity : float
    The fill opacity of the interval mark (a value between ``0`` and ``1``).

    **Default value:** ``0.125``
stroke : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The stroke color of the interval mark.

    **Default value:** ``"#ffffff"``
strokeDash : Sequence[float]
    An array of alternating stroke and space lengths, for creating dashed or dotted
    lines.
strokeDashOffset : float
    The offset (in pixels) with which to begin drawing the stroke dash array.
strokeOpacity : float
    The stroke opacity of the interval mark (a value between ``0`` and ``1``).
strokeWidth : float
    The stroke width of the interval mark.

---
## Color
```python
from core import Color
```

Color schema wrapper.

---
## ColorDef
```python
from core import ColorDef
```

ColorDef schema wrapper.

---
## ColorName
```python
from core import ColorName
```

ColorName schema wrapper.

---
## ColorScheme
```python
from core import ColorScheme
```

ColorScheme schema wrapper.

---
## Categorical
```python
from core import Categorical
```

Categorical schema wrapper.

---
## CompositeMark
```python
from core import CompositeMark
```

CompositeMark schema wrapper.

---
## BoxPlot
```python
from core import BoxPlot
```

BoxPlot schema wrapper.

---
## CompositeMarkDef
```python
from core import CompositeMarkDef
```

CompositeMarkDef schema wrapper.

---
## BoxPlotDef
```python
from core import BoxPlotDef
```

BoxPlotDef schema wrapper.

Parameters
----------
type : :class:`BoxPlot`, Literal['boxplot']
    The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
    ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
    ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``,
    ``"errorband"``, ``"errorbar"``).
box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

clip : bool
    Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
extent : float, Literal['min-max']
    The extent of the whiskers. Available options include:

    * ``"min-max"``: min and max are the lower and upper whiskers respectively.
    * A number representing multiple of the interquartile range. This number will be
      multiplied by the IQR to determine whisker boundary, which spans from the smallest
      data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where
      *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile
      range (*Q3-Q1*).

    **Default value:** ``1.5``.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

opacity : float
    The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    Orientation of the box plot. This is normally automatically determined based on
    types of fields on x and y channels. However, an explicit ``orient`` be specified
    when the orientation is ambiguous.

    **Default value:** ``"vertical"``.
outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

size : float
    Size of the box and median tick of a box plot
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

---
## CompositionConfig
```python
from core import CompositionConfig
```

CompositionConfig schema wrapper.

Parameters
----------
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
spacing : float
    The default spacing in pixels between composed sub-views.

    **Default value**: ``20``

---
## ConditionalAxisColor
```python
from core import ConditionalAxisColor
```

ConditionalAxisColor schema wrapper.

---
## ConditionalAxisLabelAlign
```python
from core import ConditionalAxisLabelAlign
```

ConditionalAxisLabelAlign schema wrapper.

---
## ConditionalAxisLabelBaseline
```python
from core import ConditionalAxisLabelBaseline
```

ConditionalAxisLabelBaseline schema wrapper.

---
## ConditionalAxisLabelFontStyle
```python
from core import ConditionalAxisLabelFontStyle
```

ConditionalAxisLabelFontStyle schema wrapper.

---
## ConditionalAxisLabelFontWeight
```python
from core import ConditionalAxisLabelFontWeight
```

ConditionalAxisLabelFontWeight schema wrapper.

---
## ConditionalAxisNumber
```python
from core import ConditionalAxisNumber
```

ConditionalAxisNumber schema wrapper.

---
## ConditionalAxisNumberArray
```python
from core import ConditionalAxisNumberArray
```

ConditionalAxisNumberArray schema wrapper.

---
## ConditionalAxisPropertyAlignnull
```python
from core import ConditionalAxisPropertyAlignnull
```

ConditionalAxisPropertyAlignnull schema wrapper.

---
## ConditionalAxisPropertyColornull
```python
from core import ConditionalAxisPropertyColornull
```

ConditionalAxisPropertyColornull schema wrapper.

---
## ConditionalAxisPropertyFontStylenull
```python
from core import ConditionalAxisPropertyFontStylenull
```

ConditionalAxisPropertyFontStylenull schema wrapper.

---
## ConditionalAxisPropertyFontWeightnull
```python
from core import ConditionalAxisPropertyFontWeightnull
```

ConditionalAxisPropertyFontWeightnull schema wrapper.

---
## ConditionalAxisPropertyTextBaselinenull
```python
from core import ConditionalAxisPropertyTextBaselinenull
```

ConditionalAxisPropertyTextBaselinenull schema wrapper.

---
## ConditionalAxisPropertynumberArraynull
```python
from core import ConditionalAxisPropertynumberArraynull
```

ConditionalAxisPropertynumberArraynull schema wrapper.

---
## ConditionalAxisPropertynumbernull
```python
from core import ConditionalAxisPropertynumbernull
```

ConditionalAxisPropertynumbernull schema wrapper.

---
## ConditionalAxisPropertystringnull
```python
from core import ConditionalAxisPropertystringnull
```

ConditionalAxisPropertystringnull schema wrapper.

---
## ConditionalAxisString
```python
from core import ConditionalAxisString
```

ConditionalAxisString schema wrapper.

---
## ConditionalMarkPropFieldOrDatumDef
```python
from core import ConditionalMarkPropFieldOrDatumDef
```

ConditionalMarkPropFieldOrDatumDef schema wrapper.

---
## ConditionalMarkPropFieldOrDatumDefTypeForShape
```python
from core import ConditionalMarkPropFieldOrDatumDefTypeForShape
```

ConditionalMarkPropFieldOrDatumDefTypeForShape schema wrapper.

---
## ConditionalParameterMarkPropFieldOrDatumDef
```python
from core import ConditionalParameterMarkPropFieldOrDatumDef
```

ConditionalParameterMarkPropFieldOrDatumDef schema wrapper.

---
## ConditionalParameterMarkPropFieldOrDatumDefTypeForShape
```python
from core import ConditionalParameterMarkPropFieldOrDatumDefTypeForShape
```

ConditionalParameterMarkPropFieldOrDatumDefTypeForShape schema wrapper.

---
## ConditionalPredicateMarkPropFieldOrDatumDef
```python
from core import ConditionalPredicateMarkPropFieldOrDatumDef
```

ConditionalPredicateMarkPropFieldOrDatumDef schema wrapper.

---
## ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape
```python
from core import ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape
```

ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape schema wrapper.

---
## ConditionalPredicateValueDefAlignnullExprRef
```python
from core import ConditionalPredicateValueDefAlignnullExprRef
```

ConditionalPredicateValueDefAlignnullExprRef schema wrapper.

---
## ConditionalPredicateValueDefColornullExprRef
```python
from core import ConditionalPredicateValueDefColornullExprRef
```

ConditionalPredicateValueDefColornullExprRef schema wrapper.

---
## ConditionalPredicateValueDefFontStylenullExprRef
```python
from core import ConditionalPredicateValueDefFontStylenullExprRef
```

ConditionalPredicateValueDefFontStylenullExprRef schema wrapper.

---
## ConditionalPredicateValueDefFontWeightnullExprRef
```python
from core import ConditionalPredicateValueDefFontWeightnullExprRef
```

ConditionalPredicateValueDefFontWeightnullExprRef schema wrapper.

---
## ConditionalPredicateValueDefTextBaselinenullExprRef
```python
from core import ConditionalPredicateValueDefTextBaselinenullExprRef
```

ConditionalPredicateValueDefTextBaselinenullExprRef schema wrapper.

---
## ConditionalPredicateValueDefnumberArraynullExprRef
```python
from core import ConditionalPredicateValueDefnumberArraynullExprRef
```

ConditionalPredicateValueDefnumberArraynullExprRef schema wrapper.

---
## ConditionalPredicateValueDefnumbernullExprRef
```python
from core import ConditionalPredicateValueDefnumbernullExprRef
```

ConditionalPredicateValueDefnumbernullExprRef schema wrapper.

---
## ConditionalStringFieldDef
```python
from core import ConditionalStringFieldDef
```

ConditionalStringFieldDef schema wrapper.

---
## ConditionalParameterStringFieldDef
```python
from core import ConditionalParameterStringFieldDef
```

ConditionalParameterStringFieldDef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ConditionalPredicateStringFieldDef
```python
from core import ConditionalPredicateStringFieldDef
```

ConditionalPredicateStringFieldDef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ConditionalValueDefGradientstringnullExprRef
```python
from core import ConditionalValueDefGradientstringnullExprRef
```

ConditionalValueDefGradientstringnullExprRef schema wrapper.

---
## ConditionalParameterValueDefGradientstringnullExprRef
```python
from core import ConditionalParameterValueDefGradientstringnullExprRef
```

ConditionalParameterValueDefGradientstringnullExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefGradientstringnullExprRef
```python
from core import ConditionalPredicateValueDefGradientstringnullExprRef
```

ConditionalPredicateValueDefGradientstringnullExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefTextExprRef
```python
from core import ConditionalValueDefTextExprRef
```

ConditionalValueDefTextExprRef schema wrapper.

---
## ConditionalParameterValueDefTextExprRef
```python
from core import ConditionalParameterValueDefTextExprRef
```

ConditionalParameterValueDefTextExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefTextExprRef
```python
from core import ConditionalPredicateValueDefTextExprRef
```

ConditionalPredicateValueDefTextExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefnumber
```python
from core import ConditionalValueDefnumber
```

ConditionalValueDefnumber schema wrapper.

---
## ConditionalParameterValueDefnumber
```python
from core import ConditionalParameterValueDefnumber
```

ConditionalParameterValueDefnumber schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefnumber
```python
from core import ConditionalPredicateValueDefnumber
```

ConditionalPredicateValueDefnumber schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefnumberArrayExprRef
```python
from core import ConditionalValueDefnumberArrayExprRef
```

ConditionalValueDefnumberArrayExprRef schema wrapper.

---
## ConditionalParameterValueDefnumberArrayExprRef
```python
from core import ConditionalParameterValueDefnumberArrayExprRef
```

ConditionalParameterValueDefnumberArrayExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : dict, Sequence[float], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefnumberArrayExprRef
```python
from core import ConditionalPredicateValueDefnumberArrayExprRef
```

ConditionalPredicateValueDefnumberArrayExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : dict, Sequence[float], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefnumberExprRef
```python
from core import ConditionalValueDefnumberExprRef
```

ConditionalValueDefnumberExprRef schema wrapper.

---
## ConditionalParameterValueDefnumberExprRef
```python
from core import ConditionalParameterValueDefnumberExprRef
```

ConditionalParameterValueDefnumberExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefnumberExprRef
```python
from core import ConditionalPredicateValueDefnumberExprRef
```

ConditionalPredicateValueDefnumberExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefstringExprRef
```python
from core import ConditionalValueDefstringExprRef
```

ConditionalValueDefstringExprRef schema wrapper.

---
## ConditionalParameterValueDefstringExprRef
```python
from core import ConditionalParameterValueDefstringExprRef
```

ConditionalParameterValueDefstringExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : str, dict, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefstringExprRef
```python
from core import ConditionalPredicateValueDefstringExprRef
```

ConditionalPredicateValueDefstringExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : str, dict, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ConditionalValueDefstringnullExprRef
```python
from core import ConditionalValueDefstringnullExprRef
```

ConditionalValueDefstringnullExprRef schema wrapper.

---
## ConditionalParameterValueDefstringnullExprRef
```python
from core import ConditionalParameterValueDefstringnullExprRef
```

ConditionalParameterValueDefstringnullExprRef schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## ConditionalPredicateValueDefstringnullExprRef
```python
from core import ConditionalPredicateValueDefstringnullExprRef
```

ConditionalPredicateValueDefstringnullExprRef schema wrapper.

Parameters
----------
test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    Predicate for triggering the condition
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Config
```python
from core import Config
```

Config schema wrapper.

Parameters
----------
arc : dict, :class:`RectConfig`
    Arc-specific Config
area : dict, :class:`AreaConfig`
    Area-Specific Config
aria : bool
    A boolean flag indicating if ARIA default attributes should be included for marks
    and guides (SVG output only). If false, the ``"aria-hidden"`` attribute will be set
    for all guides, removing them from the ARIA accessibility tree and Vega-Lite will
    not generate default descriptions for marks.

    **Default value:** ``true``.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
axis : dict, :class:`AxisConfig`
    Axis configuration, which determines default properties for all ``x`` and ``y``
    `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis
    configuration options, please see the `corresponding section of the axis
    documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__.
axisBand : dict, :class:`AxisConfig`
    Config for axes with "band" scales.
axisBottom : dict, :class:`AxisConfig`
    Config for x-axis along the bottom edge of the chart.
axisDiscrete : dict, :class:`AxisConfig`
    Config for axes with "point" or "band" scales.
axisLeft : dict, :class:`AxisConfig`
    Config for y-axis along the left edge of the chart.
axisPoint : dict, :class:`AxisConfig`
    Config for axes with "point" scales.
axisQuantitative : dict, :class:`AxisConfig`
    Config for quantitative axes.
axisRight : dict, :class:`AxisConfig`
    Config for y-axis along the right edge of the chart.
axisTemporal : dict, :class:`AxisConfig`
    Config for temporal axes.
axisTop : dict, :class:`AxisConfig`
    Config for x-axis along the top edge of the chart.
axisX : dict, :class:`AxisConfig`
    X-axis specific config.
axisXBand : dict, :class:`AxisConfig`
    Config for x-axes with "band" scales.
axisXDiscrete : dict, :class:`AxisConfig`
    Config for x-axes with "point" or "band" scales.
axisXPoint : dict, :class:`AxisConfig`
    Config for x-axes with "point" scales.
axisXQuantitative : dict, :class:`AxisConfig`
    Config for x-quantitative axes.
axisXTemporal : dict, :class:`AxisConfig`
    Config for x-temporal axes.
axisY : dict, :class:`AxisConfig`
    Y-axis specific config.
axisYBand : dict, :class:`AxisConfig`
    Config for y-axes with "band" scales.
axisYDiscrete : dict, :class:`AxisConfig`
    Config for y-axes with "point" or "band" scales.
axisYPoint : dict, :class:`AxisConfig`
    Config for y-axes with "point" scales.
axisYQuantitative : dict, :class:`AxisConfig`
    Config for y-quantitative axes.
axisYTemporal : dict, :class:`AxisConfig`
    Config for y-temporal axes.
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bar : dict, :class:`BarConfig`
    Bar-Specific Config
boxplot : dict, :class:`BoxPlotConfig`
    Box Config
circle : dict, :class:`MarkConfig`
    Circle-Specific Config
concat : dict, :class:`CompositionConfig`
    Default configuration for all concatenation and repeat view composition operators
    (``concat``, ``hconcat``, ``vconcat``, and ``repeat``)
countTitle : str
    Default axis and legend title for count fields.

    **Default value:** ``'Count of Records``.
customFormatTypes : bool
    Allow the ``formatType`` property for text marks and guides to accept a custom
    formatter function `registered as a Vega expression
    <https://vega.github.io/vega-lite/usage/compile.html#format-type>`__.
errorband : dict, :class:`ErrorBandConfig`
    ErrorBand Config
errorbar : dict, :class:`ErrorBarConfig`
    ErrorBar Config
facet : dict, :class:`CompositionConfig`
    Default configuration for the ``facet`` view composition operator
fieldTitle : Literal['verbal', 'functional', 'plain']
    Defines how Vega-Lite generates title for fields. There are three possible styles:

    * ``"verbal"`` (Default) - displays function in a verbal style (e.g., "Sum of
      field", "Year-month of date", "field (binned)").
    * ``"function"`` - displays function using parentheses and capitalized texts (e.g.,
      "SUM(field)", "YEARMONTH(date)", "BIN(field)").
    * ``"plain"`` - displays only the field name without functions (e.g., "field",
      "date", "field").
font : str
    Default font for all text marks, titles, and labels.
geoshape : dict, :class:`MarkConfig`
    Geoshape-Specific Config
header : dict, :class:`HeaderConfig`
    Header configuration, which determines default properties for all `headers
    <https://vega.github.io/vega-lite/docs/header.html>`__.

    For a full list of header configuration options, please see the `corresponding
    section of in the header documentation
    <https://vega.github.io/vega-lite/docs/header.html#config>`__.
headerColumn : dict, :class:`HeaderConfig`
    Header configuration, which determines default properties for column `headers
    <https://vega.github.io/vega-lite/docs/header.html>`__.

    For a full list of header configuration options, please see the `corresponding
    section of in the header documentation
    <https://vega.github.io/vega-lite/docs/header.html#config>`__.
headerFacet : dict, :class:`HeaderConfig`
    Header configuration, which determines default properties for non-row/column facet
    `headers <https://vega.github.io/vega-lite/docs/header.html>`__.

    For a full list of header configuration options, please see the `corresponding
    section of in the header documentation
    <https://vega.github.io/vega-lite/docs/header.html#config>`__.
headerRow : dict, :class:`HeaderConfig`
    Header configuration, which determines default properties for row `headers
    <https://vega.github.io/vega-lite/docs/header.html>`__.

    For a full list of header configuration options, please see the `corresponding
    section of in the header documentation
    <https://vega.github.io/vega-lite/docs/header.html#config>`__.
image : dict, :class:`RectConfig`
    Image-specific Config
legend : dict, :class:`LegendConfig`
    Legend configuration, which determines default properties for all `legends
    <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend
    configuration options, please see the `corresponding section of in the legend
    documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__.
line : dict, :class:`LineConfig`
    Line-Specific Config
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property provides a global default for text marks, which is
    overridden by mark or style config settings, and by the lineBreak mark encoding
    channel. If signal-valued, either string or regular expression (regexp) values are
    valid.
locale : dict, :class:`Locale`
    Locale definitions for string parsing and formatting of number and date values. The
    locale object should contain ``number`` and/or ``time`` properties with `locale
    definitions <https://vega.github.io/vega/docs/api/locale/>`__. Locale definitions
    provided in the config block may be overridden by the View constructor locale
    option.
mark : dict, :class:`MarkConfig`
    Mark Config
normalizedNumberFormat : str
    If normalizedNumberFormatType is not specified, D3 number format for axis labels,
    text marks, and tooltips of normalized stacked fields (fields with ``stack:
    "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern
    <https://github.com/d3/d3-format#locale_format>`__.

    If ``config.normalizedNumberFormatType`` is specified and
    ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``
    alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default
    value:** ``%``
normalizedNumberFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.normalizedNumberFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is
    exposed as `format in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also
    set ``customFormatTypes`` to ``true`` to use this feature.
numberFormat : str
    If numberFormatType is not specified, D3 number format for guide labels, text marks,
    and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For
    example ``"s"`` for SI units. Use `D3's number format pattern
    <https://github.com/d3/d3-format#locale_format>`__.

    If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is
    ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the
    ``config.numberFormatType`` function.
numberFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.numberFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is
    exposed as `format in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also
    set ``customFormatTypes`` to ``true`` to use this feature.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
point : dict, :class:`MarkConfig`
    Point-Specific Config
projection : dict, :class:`ProjectionConfig`
    Projection configuration, which determines default properties for all `projections
    <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of
    projection configuration options, please see the `corresponding section of the
    projection documentation
    <https://vega.github.io/vega-lite/docs/projection.html#config>`__.
range : dict, :class:`RangeConfig`
    An object hash that defines default range arrays or schemes for using with scales.
    For a full list of scale range configuration options, please see the `corresponding
    section of the scale documentation
    <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
rect : dict, :class:`RectConfig`
    Rect-Specific Config
rule : dict, :class:`MarkConfig`
    Rule-Specific Config
scale : dict, :class:`ScaleConfig`
    Scale configuration determines default properties for all `scales
    <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale
    configuration options, please see the `corresponding section of the scale
    documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__.
selection : dict, :class:`SelectionConfig`
    An object hash for defining default properties for each type of selections.
square : dict, :class:`MarkConfig`
    Square-Specific Config
style : dict, :class:`StyleConfigIndex`
    An object hash that defines key-value mappings to determine default properties for
    marks with a given `style
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent
    styles names; the values have to be valid `mark configuration objects
    <https://vega.github.io/vega-lite/docs/mark.html#config>`__.
text : dict, :class:`MarkConfig`
    Text-Specific Config
tick : dict, :class:`TickConfig`
    Tick-Specific Config
timeFormat : str
    Default time format for raw time values (without time units) in text marks, legend
    labels and header labels.

    **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format
    for each label automatically so this config does not affect axes.
timeFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.timeFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,
    which is exposed as `timeFormat in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must
    also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``
    defined to use this feature.
title : dict, :class:`TitleConfig`
    Title configuration, which determines default properties for all `titles
    <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title
    configuration options, please see the `corresponding section of the title
    documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__.
tooltipFormat : dict, :class:`FormatConfig`
    Define `custom format configuration
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ for tooltips. If
    unspecified, default format config will be applied.
trail : dict, :class:`LineConfig`
    Trail-Specific Config
view : dict, :class:`ViewConfig`
    Default properties for `single view plots
    <https://vega.github.io/vega-lite/docs/spec.html#single>`__.

---
## Cursor
```python
from core import Cursor
```

Cursor schema wrapper.

---
## Cyclical
```python
from core import Cyclical
```

Cyclical schema wrapper.

---
## Data
```python
from core import Data
```

Data schema wrapper.

---
## DataFormat
```python
from core import DataFormat
```

DataFormat schema wrapper.

---
## CsvDataFormat
```python
from core import CsvDataFormat
```

CsvDataFormat schema wrapper.

Parameters
----------
parse : dict, None, :class:`Parse`
    If set to ``null``, disable type inference based on the spec and only use type
    inference based on the data. Alternatively, a parsing directive object can be
    provided for explicit data types. Each property of the object corresponds to a field
    name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
    ``"date"``, or null (do not parse the field)). For example, ``"parse":
    {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
    Date value.

    For ``"date"``, we parse data based using JavaScript's `Date.parse()
    <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
    For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}``), using
    the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
    UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}``).
    See more about `UTC time
    <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
type : Literal['csv', 'tsv']
    Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.

    **Default value:**  The default format type is determined by the extension of the
    file URL. If no extension is detected, ``"json"`` will be used by default.

---
## DataSource
```python
from core import DataSource
```

DataSource schema wrapper.

---
## Datasets
```python
from core import Datasets
```

Datasets schema wrapper.

---
## Day
```python
from core import Day
```

Day schema wrapper.

---
## DictInlineDataset
```python
from core import DictInlineDataset
```

DictInlineDataset schema wrapper.

---
## DictSelectionInit
```python
from core import DictSelectionInit
```

DictSelectionInit schema wrapper.

---
## DictSelectionInitInterval
```python
from core import DictSelectionInitInterval
```

DictSelectionInitInterval schema wrapper.

---
## Diverging
```python
from core import Diverging
```

Diverging schema wrapper.

---
## DomainUnionWith
```python
from core import DomainUnionWith
```

DomainUnionWith schema wrapper.

Parameters
----------
unionWith : Sequence[str, bool, dict, float, :class:`DateTime`]
    Customized domain values to be union with the field's values or explicitly defined
    domain. Should be an array of valid scale domain values.

---
## DsvDataFormat
```python
from core import DsvDataFormat
```

DsvDataFormat schema wrapper.

Parameters
----------
delimiter : str
    The delimiter between records. The delimiter must be a single character (i.e., a
    single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are
    not.
parse : dict, None, :class:`Parse`
    If set to ``null``, disable type inference based on the spec and only use type
    inference based on the data. Alternatively, a parsing directive object can be
    provided for explicit data types. Each property of the object corresponds to a field
    name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
    ``"date"``, or null (do not parse the field)). For example, ``"parse":
    {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
    Date value.

    For ``"date"``, we parse data based using JavaScript's `Date.parse()
    <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
    For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}``), using
    the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
    UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}``).
    See more about `UTC time
    <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
type : Literal['dsv']
    Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.

    **Default value:**  The default format type is determined by the extension of the
    file URL. If no extension is detected, ``"json"`` will be used by default.

---
## Element
```python
from core import Element
```

Element schema wrapper.

---
## Encoding
```python
from core import Encoding
```

Encoding schema wrapper.

Parameters
----------
angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Rotation angle of point and text marks.
color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Color of the marks - either fill or stroke color based on  the ``filled`` property
    of mark definition. By default, ``color`` represents fill color for ``"area"``,
    ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` /
    stroke color for ``"line"`` and ``"point"``.

    **Default value:** If undefined, the default color depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,
    please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``
    encodings have higher precedence than ``color``, thus may override the ``color``
    encoding if conflicting encodings are specified. 2) See the scale documentation for
    more information about customizing `color scheme
    <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    A text description of this mark for ARIA accessibility (SVG output only). For SVG
    output the ``"aria-label"`` attribute will be set to this description.
detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]
    Additional levels of detail for grouping data in aggregate views and in line, trail,
    and area marks without mapping data to a specific visual channel.
fill : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Fill color of the marks. **Default value:** If undefined, the default color depends
    on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Fill opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``
    property.
href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    A URL to load upon mouse click.
key : dict, :class:`FieldDefWithoutScale`
    A data field to use as a unique key for data binding. When a visualization's data is
    updated, the key value will be used to match data elements to existing mark
    instances. Use a key channel to enable object constancy for transitions over dynamic
    data.
latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`
    Latitude position of geographically projected marks.
latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`
    Longitude position of geographically projected marks.
longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``
    property.
order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]
    Order of the marks.

    * For stacked marks, this ``order`` channel encodes `stack order
      <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
    * For line and trail marks, this ``order`` channel encodes order of data points in
      the lines. This can be useful for creating `a connected scatterplot
      <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
      ``order`` to ``{"value": null}`` makes the line marks use the original order in
      the data sources.
    * Otherwise, this ``order`` channel encodes layer order of the marks.

    **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid
    creating additional aggregation grouping.
radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`
    The outer radius in pixels of arc marks.
radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    The inner radius in pixels of arc marks.
shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`
    Shape of the mark.

    1. For ``point`` marks the supported values include:   - plotting shapes:
    ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
    ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``.   - the line
    symbol ``"stroke"``   - centered directional shapes ``"arrow"``, ``"wedge"``, or
    ``"triangle"``   - a custom `SVG path string
    <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
    sizing, custom shape paths should be defined within a square bounding box with
    coordinates ranging from -1 to 1 along both the x and y dimensions.)

    2. For ``geoshape`` marks it should be a field definition of the geojson data

    **Default value:** If undefined, the default shape depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``
    property. (``"circle"`` if unset.)
size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Size of the mark.

    * For ``"point"``, ``"square"`` and ``"circle"``, - the symbol size, or pixel area
      of the mark.
    * For ``"bar"`` and ``"tick"`` - the bar and tick's size.
    * For ``"text"`` - the text's font size.
    * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"``
      instead of line with varying size)
stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Stroke color of the marks. **Default value:** If undefined, the default color
    depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`
    Stroke dash of the marks.

    **Default value:** ``[1,0]`` (No dash).
strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Stroke opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``strokeOpacity`` property.
strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Stroke width of the marks.

    **Default value:** If undefined, the default stroke width depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``
    property.
text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText`
    Text of the ``text`` mark.
theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
tooltip : dict, None, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`]
    The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
    `the tooltip property in the mark definition
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip in Vega-Lite.
url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    The URL of an image mark.
x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Secondary error value of x coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`
    Offset of x-position of the marks
y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Secondary error value of y coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`
    Offset of y-position of the marks

---
## ErrorBand
```python
from core import ErrorBand
```

ErrorBand schema wrapper.

---
## ErrorBandConfig
```python
from core import ErrorBandConfig
```

ErrorBandConfig schema wrapper.

Parameters
----------
band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
    The extent of the band. Available options include:

    * ``"ci"``: Extend the band to the confidence interval of the mean.
    * ``"stderr"``: The size of band are set to the value of standard error, extending
      from the mean.
    * ``"stdev"``: The size of band are set to the value of standard deviation,
      extending from the mean.
    * ``"iqr"``: Extend the band to the q1 and q3.

    **Default value:** ``"stderr"``.
interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method for the error band. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes at the midpoint of
      each pair of adjacent x-values.
    * ``"step-before"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes before the x-value.
    * ``"step-after"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes after the x-value.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
tension : float
    The tension parameter for the interpolation type of the error band.

---
## ErrorBandDef
```python
from core import ErrorBandDef
```

ErrorBandDef schema wrapper.

Parameters
----------
type : :class:`ErrorBand`, Literal['errorband']
    The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
    ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
    ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``,
    ``"errorband"``, ``"errorbar"``).
band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

clip : bool
    Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
    The extent of the band. Available options include:

    * ``"ci"``: Extend the band to the confidence interval of the mean.
    * ``"stderr"``: The size of band are set to the value of standard error, extending
      from the mean.
    * ``"stdev"``: The size of band are set to the value of standard deviation,
      extending from the mean.
    * ``"iqr"``: Extend the band to the q1 and q3.

    **Default value:** ``"stderr"``.
interpolate : :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method for the error band. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes at the midpoint of
      each pair of adjacent x-values.
    * ``"step-before"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes before the x-value.
    * ``"step-after"``: a piecewise constant function (a step function) consisting of
      alternating horizontal and vertical lines. The y-value changes after the x-value.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
opacity : float
    The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    Orientation of the error band. This is normally automatically determined, but can be
    specified when the orientation is ambiguous and cannot be automatically determined.
tension : float
    The tension parameter for the interpolation type of the error band.

---
## ErrorBar
```python
from core import ErrorBar
```

ErrorBar schema wrapper.

---
## ErrorBarConfig
```python
from core import ErrorBarConfig
```

ErrorBarConfig schema wrapper.

Parameters
----------
extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
    The extent of the rule. Available options include:

    * ``"ci"``: Extend the rule to the confidence interval of the mean.
    * ``"stderr"``: The size of rule are set to the value of standard error, extending
      from the mean.
    * ``"stdev"``: The size of rule are set to the value of standard deviation,
      extending from the mean.
    * ``"iqr"``: Extend the rule to the q1 and q3.

    **Default value:** ``"stderr"``.
rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

size : float
    Size of the ticks of an error bar
thickness : float
    Thickness of the ticks and the bar of an error bar
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

---
## ErrorBarDef
```python
from core import ErrorBarDef
```

ErrorBarDef schema wrapper.

Parameters
----------
type : :class:`ErrorBar`, Literal['errorbar']
    The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
    ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
    ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``,
    ``"errorband"``, ``"errorbar"``).
clip : bool
    Whether a composite mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']
    The extent of the rule. Available options include:

    * ``"ci"``: Extend the rule to the confidence interval of the mean.
    * ``"stderr"``: The size of rule are set to the value of standard error, extending
      from the mean.
    * ``"stdev"``: The size of rule are set to the value of standard deviation,
      extending from the mean.
    * ``"iqr"``: Extend the rule to the q1 and q3.

    **Default value:** ``"stderr"``.
opacity : float
    The opacity (value between [0,1]) of the mark.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    Orientation of the error bar. This is normally automatically determined, but can be
    specified when the orientation is ambiguous and cannot be automatically determined.
rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

size : float
    Size of the ticks of an error bar
thickness : float
    Thickness of the ticks and the bar of an error bar
ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`

---
## ErrorBarExtent
```python
from core import ErrorBarExtent
```

ErrorBarExtent schema wrapper.

---
## Expr
```python
from core import Expr
```

Expr schema wrapper.

---
## ExprRef
```python
from core import ExprRef
```

ExprRef schema wrapper.

Parameters
----------
expr : str
    Vega expression (which can refer to Vega-Lite parameters).

---
## FacetEncodingFieldDef
```python
from core import FacetEncodingFieldDef
```

FacetEncodingFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FacetFieldDef
```python
from core import FacetFieldDef
```

FacetFieldDef schema wrapper.

Parameters
----------
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FacetMapping
```python
from core import FacetMapping
```

FacetMapping schema wrapper.

Parameters
----------
column : dict, :class:`FacetFieldDef`
    A field definition for the horizontal facet of trellis plots.
row : dict, :class:`FacetFieldDef`
    A field definition for the vertical facet of trellis plots.

---
## FacetedEncoding
```python
from core import FacetedEncoding
```

FacetedEncoding schema wrapper.

Parameters
----------
angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Rotation angle of point and text marks.
color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Color of the marks - either fill or stroke color based on  the ``filled`` property
    of mark definition. By default, ``color`` represents fill color for ``"area"``,
    ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` /
    stroke color for ``"line"`` and ``"point"``.

    **Default value:** If undefined, the default color depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,
    please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``
    encodings have higher precedence than ``color``, thus may override the ``color``
    encoding if conflicting encodings are specified. 2) See the scale documentation for
    more information about customizing `color scheme
    <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
column : dict, :class:`RowColumnEncodingFieldDef`
    A field definition for the horizontal facet of trellis plots.
description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    A text description of this mark for ARIA accessibility (SVG output only). For SVG
    output the ``"aria-label"`` attribute will be set to this description.
detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]
    Additional levels of detail for grouping data in aggregate views and in line, trail,
    and area marks without mapping data to a specific visual channel.
facet : dict, :class:`FacetEncodingFieldDef`
    A field definition for the (flexible) facet of trellis plots.

    If either ``row`` or ``column`` is specified, this channel will be ignored.
fill : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Fill color of the marks. **Default value:** If undefined, the default color depends
    on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Fill opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``
    property.
href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    A URL to load upon mouse click.
key : dict, :class:`FieldDefWithoutScale`
    A data field to use as a unique key for data binding. When a visualization's data is
    updated, the key value will be used to match data elements to existing mark
    instances. Use a key channel to enable object constancy for transitions over dynamic
    data.
latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`
    Latitude position of geographically projected marks.
latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`
    Longitude position of geographically projected marks.
longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``
    property.
order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]
    Order of the marks.

    * For stacked marks, this ``order`` channel encodes `stack order
      <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
    * For line and trail marks, this ``order`` channel encodes order of data points in
      the lines. This can be useful for creating `a connected scatterplot
      <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
      ``order`` to ``{"value": null}`` makes the line marks use the original order in
      the data sources.
    * Otherwise, this ``order`` channel encodes layer order of the marks.

    **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid
    creating additional aggregation grouping.
radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`
    The outer radius in pixels of arc marks.
radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    The inner radius in pixels of arc marks.
row : dict, :class:`RowColumnEncodingFieldDef`
    A field definition for the vertical facet of trellis plots.
shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`
    Shape of the mark.

    1. For ``point`` marks the supported values include:   - plotting shapes:
    ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
    ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``.   - the line
    symbol ``"stroke"``   - centered directional shapes ``"arrow"``, ``"wedge"``, or
    ``"triangle"``   - a custom `SVG path string
    <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
    sizing, custom shape paths should be defined within a square bounding box with
    coordinates ranging from -1 to 1 along both the x and y dimensions.)

    2. For ``geoshape`` marks it should be a field definition of the geojson data

    **Default value:** If undefined, the default shape depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``
    property. (``"circle"`` if unset.)
size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Size of the mark.

    * For ``"point"``, ``"square"`` and ``"circle"``, - the symbol size, or pixel area
      of the mark.
    * For ``"bar"`` and ``"tick"`` - the bar and tick's size.
    * For ``"text"`` - the text's font size.
    * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"``
      instead of line with varying size)
stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`
    Stroke color of the marks. **Default value:** If undefined, the default color
    depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`
    Stroke dash of the marks.

    **Default value:** ``[1,0]`` (No dash).
strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Stroke opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``strokeOpacity`` property.
strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`
    Stroke width of the marks.

    **Default value:** If undefined, the default stroke width depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``
    property.
text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText`
    Text of the ``text`` mark.
theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
tooltip : dict, None, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`]
    The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
    `the tooltip property in the mark definition
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip in Vega-Lite.
url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`
    The URL of an image mark.
x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Secondary error value of x coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`
    Offset of x-position of the marks
y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`
    Secondary error value of y coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`
    Offset of y-position of the marks

---
## Feature
```python
from core import Feature
```

Feature schema wrapper.

A feature object which contains a geometry and associated properties.
https://tools.ietf.org/html/rfc7946#section-3.2

Parameters
----------
geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`
    The feature's geometry
properties : dict, None, :class:`GeoJsonProperties`
    Properties associated with this feature.
type : Literal['Feature']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5
id : str, float
    A value that uniquely identifies this feature in a
    https://tools.ietf.org/html/rfc7946#section-3.2.

---
## FeatureCollection
```python
from core import FeatureCollection
```

FeatureCollection schema wrapper.

A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3

Parameters
----------
features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`]

type : Literal['FeatureCollection']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## FeatureGeometryGeoJsonProperties
```python
from core import FeatureGeometryGeoJsonProperties
```

FeatureGeometryGeoJsonProperties schema wrapper.

A feature object which contains a geometry and associated properties.
https://tools.ietf.org/html/rfc7946#section-3.2

Parameters
----------
geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`
    The feature's geometry
properties : dict, None, :class:`GeoJsonProperties`
    Properties associated with this feature.
type : Literal['Feature']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5
id : str, float
    A value that uniquely identifies this feature in a
    https://tools.ietf.org/html/rfc7946#section-3.2.

---
## Field
```python
from core import Field
```

Field schema wrapper.

---
## FieldDefWithoutScale
```python
from core import FieldDefWithoutScale
```

FieldDefWithoutScale schema wrapper.

Definition object for a data field, its type and transformation of an encoding channel.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldName
```python
from core import FieldName
```

FieldName schema wrapper.

---
## FieldOrDatumDefWithConditionStringFieldDefstring
```python
from core import FieldOrDatumDefWithConditionStringFieldDefstring
```

FieldOrDatumDefWithConditionStringFieldDefstring schema wrapper.

Parameters
----------
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldRange
```python
from core import FieldRange
```

FieldRange schema wrapper.

Parameters
----------
field : str

---
## Fit
```python
from core import Fit
```

Fit schema wrapper.

---
## FontStyle
```python
from core import FontStyle
```

FontStyle schema wrapper.

---
## FontWeight
```python
from core import FontWeight
```

FontWeight schema wrapper.

---
## FormatConfig
```python
from core import FormatConfig
```

FormatConfig schema wrapper.

Parameters
----------
normalizedNumberFormat : str
    If normalizedNumberFormatType is not specified, D3 number format for axis labels,
    text marks, and tooltips of normalized stacked fields (fields with ``stack:
    "normalize"``). For example ``"s"`` for SI units. Use `D3's number format pattern
    <https://github.com/d3/d3-format#locale_format>`__.

    If ``config.normalizedNumberFormatType`` is specified and
    ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``
    alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default
    value:** ``%``
normalizedNumberFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.normalizedNumberFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is
    exposed as `format in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also
    set ``customFormatTypes`` to ``true`` to use this feature.
numberFormat : str
    If numberFormatType is not specified, D3 number format for guide labels, text marks,
    and tooltips of non-normalized fields (fields *without* ``stack: "normalize"``). For
    example ``"s"`` for SI units. Use `D3's number format pattern
    <https://github.com/d3/d3-format#locale_format>`__.

    If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is
    ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the
    ``config.numberFormatType`` function.
numberFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.numberFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is
    exposed as `format in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also
    set ``customFormatTypes`` to ``true`` to use this feature.
timeFormat : str
    Default time format for raw time values (without time units) in text marks, legend
    labels and header labels.

    **Default value:** ``"%b %d, %Y"`` **Note:** Axes automatically determine the format
    for each label automatically so this config does not affect axes.
timeFormatType : str
    `Custom format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for
    ``config.timeFormat``.

    **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,
    which is exposed as `timeFormat in Vega-Expression
    <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must
    also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``
    defined to use this feature.

---
## Generator
```python
from core import Generator
```

Generator schema wrapper.

---
## GenericUnitSpecEncodingAnyMark
```python
from core import GenericUnitSpecEncodingAnyMark
```

GenericUnitSpecEncodingAnyMark schema wrapper.

Base interface for a unit (single-view) specification.

Parameters
----------
mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']
    A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
    ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
    ``"text"``) or a `mark definition object
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`Encoding`
    A key-value mapping between encoding channels and definition of fields.
name : str
    Name of the visualization for later reference.
params : Sequence[dict, :class:`SelectionParameter`]
    An array of parameters that may either be simple variables, or more complex
    selections that map user input to data queries.
projection : dict, :class:`Projection`
    An object defining properties of geographic projection, which will be applied to
    ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
    channels for other marks.
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## GeoJsonFeature
```python
from core import GeoJsonFeature
```

GeoJsonFeature schema wrapper.

A feature object which contains a geometry and associated properties.
https://tools.ietf.org/html/rfc7946#section-3.2

Parameters
----------
geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`
    The feature's geometry
properties : dict, None, :class:`GeoJsonProperties`
    Properties associated with this feature.
type : Literal['Feature']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5
id : str, float
    A value that uniquely identifies this feature in a
    https://tools.ietf.org/html/rfc7946#section-3.2.

---
## GeoJsonFeatureCollection
```python
from core import GeoJsonFeatureCollection
```

GeoJsonFeatureCollection schema wrapper.

A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3

Parameters
----------
features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`]

type : Literal['FeatureCollection']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## GeoJsonProperties
```python
from core import GeoJsonProperties
```

GeoJsonProperties schema wrapper.

---
## Geometry
```python
from core import Geometry
```

Geometry schema wrapper.

Union of geometry objects. https://tools.ietf.org/html/rfc7946#section-3

---
## GeometryCollection
```python
from core import GeometryCollection
```

GeometryCollection schema wrapper.

Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8

Parameters
----------
geometries : Sequence[dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`]

type : Literal['GeometryCollection']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## Gradient
```python
from core import Gradient
```

Gradient schema wrapper.

---
## GradientStop
```python
from core import GradientStop
```

GradientStop schema wrapper.

Parameters
----------
color : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color value at this point in the gradient.
offset : float
    The offset fraction for the color stop, indicating its position within the gradient.

---
## GraticuleGenerator
```python
from core import GraticuleGenerator
```

GraticuleGenerator schema wrapper.

Parameters
----------
graticule : dict, Literal[True], :class:`GraticuleParams`
    Generate graticule GeoJSON data for geographic reference lines.
name : str
    Provide a placeholder name and bind data at runtime.

---
## GraticuleParams
```python
from core import GraticuleParams
```

GraticuleParams schema wrapper.

Parameters
----------
extent : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]
    Sets both the major and minor extents to the same values.
extentMajor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]
    The major extent of the graticule as a two-element array of coordinates.
extentMinor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]
    The minor extent of the graticule as a two-element array of coordinates.
precision : float
    The precision of the graticule in degrees.

    **Default value:** ``2.5``
step : Sequence[float], :class:`Vector2number`
    Sets both the major and minor step angles to the same values.
stepMajor : Sequence[float], :class:`Vector2number`
    The major step angles of the graticule.

    **Default value:** ``[90, 360]``
stepMinor : Sequence[float], :class:`Vector2number`
    The minor step angles of the graticule.

    **Default value:** ``[10, 10]``

---
## Header
```python
from core import Header
```

Header schema wrapper.

Headers of row / column channels for faceted plots.

Parameters
----------
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or
    ``"right"``.
labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
    ``"end"``. For example, with a label orientation of top these anchor positions map
    to a left-, center-, or right-aligned label.
labelAngle : float
    The rotation angle of the header labels.

    **Default value:** ``0`` for column header, ``-90`` for row header.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The vertical text baseline for the header labels. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
    ``titleFontSize`` alone.
labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the header label, can be in hex color code or regular color name.
labelExpr : str
    `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
    labels.

    **Note:** The label text and value can be assessed via the ``label`` and ``value``
    properties of the header's backing ``datum`` object.
labelFont : str, dict, :class:`ExprRef`
    The font of the header label.
labelFontSize : dict, float, :class:`ExprRef`
    The font size of the header label, in pixels.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the header label.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of the header label.
labelLimit : dict, float, :class:`ExprRef`
    The maximum length of the header label in pixels. The text value will be
    automatically truncated if the rendered size exceeds the limit.

    **Default value:** ``0``, indicating no limit
labelLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line header labels or title text with ``"line-top"``
    or ``"line-bottom"`` baseline.
labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``.
labelPadding : dict, float, :class:`ExprRef`
    The padding, in pixel, between facet header's label and the plot.

    **Default value:** ``10``
labels : bool
    A boolean flag indicating if labels should be included as part of the header.

    **Default value:** ``true``.
orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    Shortcut for setting both labelOrient and titleOrient.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment (to the anchor) of header titles.
titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
    ``"end"``. For example, with an orientation of top these anchor positions map to a
    left-, center-, or right-aligned title.
titleAngle : float
    The rotation angle of the header title.

    **Default value:** ``0``.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The vertical text baseline for the header title. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
    ``titleFontSize`` alone.

    **Default value:** ``"middle"``
titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of the header title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    Font of the header title. (e.g., ``"Helvetica Neue"``).
titleFontSize : dict, float, :class:`ExprRef`
    Font size of the header title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the header title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of the header title. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    The maximum length of the header title in pixels. The text value will be
    automatically truncated if the rendered size exceeds the limit.

    **Default value:** ``0``, indicating no limit
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line header title text or title text with
    ``"line-top"`` or ``"line-bottom"`` baseline.
titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixel, between facet header's title and the label.

    **Default value:** ``10``

---
## HeaderConfig
```python
from core import HeaderConfig
```

HeaderConfig schema wrapper.

Parameters
----------
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment of header labels. One of ``"left"``, ``"center"``, or
    ``"right"``.
labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the labels. One of ``"start"``, ``"middle"``, or
    ``"end"``. For example, with a label orientation of top these anchor positions map
    to a left-, center-, or right-aligned label.
labelAngle : float
    The rotation angle of the header labels.

    **Default value:** ``0`` for column header, ``-90`` for row header.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The vertical text baseline for the header labels. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
    ``titleFontSize`` alone.
labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the header label, can be in hex color code or regular color name.
labelExpr : str
    `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
    labels.

    **Note:** The label text and value can be assessed via the ``label`` and ``value``
    properties of the header's backing ``datum`` object.
labelFont : str, dict, :class:`ExprRef`
    The font of the header label.
labelFontSize : dict, float, :class:`ExprRef`
    The font size of the header label, in pixels.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the header label.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of the header label.
labelLimit : dict, float, :class:`ExprRef`
    The maximum length of the header label in pixels. The text value will be
    automatically truncated if the rendered size exceeds the limit.

    **Default value:** ``0``, indicating no limit
labelLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line header labels or title text with ``"line-top"``
    or ``"line-bottom"`` baseline.
labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    The orientation of the header label. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``.
labelPadding : dict, float, :class:`ExprRef`
    The padding, in pixel, between facet header's label and the plot.

    **Default value:** ``10``
labels : bool
    A boolean flag indicating if labels should be included as part of the header.

    **Default value:** ``true``.
orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    Shortcut for setting both labelOrient and titleOrient.
title : None
    Set to null to disable title for the axis, legend, or header.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment (to the anchor) of header titles.
titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
    ``"end"``. For example, with an orientation of top these anchor positions map to a
    left-, center-, or right-aligned title.
titleAngle : float
    The rotation angle of the header title.

    **Default value:** ``0``.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The vertical text baseline for the header title. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the ``titleLineHeight`` rather than
    ``titleFontSize`` alone.

    **Default value:** ``"middle"``
titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Color of the header title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    Font of the header title. (e.g., ``"Helvetica Neue"``).
titleFontSize : dict, float, :class:`ExprRef`
    Font size of the header title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the header title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight of the header title. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    The maximum length of the header title in pixels. The text value will be
    automatically truncated if the rendered size exceeds the limit.

    **Default value:** ``0``, indicating no limit
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line header title text or title text with
    ``"line-top"`` or ``"line-bottom"`` baseline.
titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']
    The orientation of the header title. One of ``"top"``, ``"bottom"``, ``"left"`` or
    ``"right"``.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixel, between facet header's title and the label.

    **Default value:** ``10``

---
## HexColor
```python
from core import HexColor
```

HexColor schema wrapper.

---
## ImputeMethod
```python
from core import ImputeMethod
```

ImputeMethod schema wrapper.

---
## ImputeParams
```python
from core import ImputeParams
```

ImputeParams schema wrapper.

Parameters
----------
frame : Sequence[None, float]
    A frame specification as a two-element array used to control the window over which
    the specified method is applied. The array entries should either be a number
    indicating the offset from the current data object, or null to indicate unbounded
    rows preceding or following the current data object. For example, the value ``[-5,
    5]`` indicates that the window should include five objects preceding and five
    objects following the current object.

    **Default value:**:  ``[null, null]`` indicating that the window includes all
    objects.
keyvals : dict, Sequence[Any], :class:`ImputeSequence`
    Defines the key values that should be considered for imputation. An array of key
    values or an object defining a `number sequence
    <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.

    If provided, this will be used in addition to the key values observed within the
    input data. If not provided, the values will be derived from all unique values of
    the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
    the y-field is imputed, or vice versa.

    If there is no impute grouping, this property *must* be specified.
method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean']
    The imputation method to use for the field value of imputed data objects. One of
    ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``.

    **Default value:**  ``"value"``
value : Any
    The field value to use when the imputation ``method`` is ``"value"``.

---
## ImputeSequence
```python
from core import ImputeSequence
```

ImputeSequence schema wrapper.

Parameters
----------
stop : float
    The ending value(exclusive) of the sequence.
start : float
    The starting value of the sequence. **Default value:** ``0``
step : float
    The step value between sequence entries. **Default value:** ``1`` or ``-1`` if
    ``stop < start``

---
## InlineData
```python
from core import InlineData
```

InlineData schema wrapper.

Parameters
----------
values : str, dict, Sequence[str], Sequence[bool], Sequence[dict], Sequence[float], :class:`InlineDataset`
    The full data set, included inline. This can be an array of objects or primitive
    values, an object, or a string. Arrays of primitive values are ingested as objects
    with a ``data`` property. Strings are parsed according to the specified format type.
format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`
    An object that specifies the format for parsing the data.
name : str
    Provide a placeholder name and bind data at runtime.

---
## InlineDataset
```python
from core import InlineDataset
```

InlineDataset schema wrapper.

---
## Interpolate
```python
from core import Interpolate
```

Interpolate schema wrapper.

---
## IntervalSelectionConfig
```python
from core import IntervalSelectionConfig
```

IntervalSelectionConfig schema wrapper.

Parameters
----------
type : Literal['interval']
    Determines the default event processing and data query for the selection. Vega-Lite
    currently supports two selection types:

    * ``"point"`` -- to select multiple discrete data values; the first value is
      selected on ``click`` and additional values toggled on shift-click.
    * ``"interval"`` -- to select a continuous range of data values on ``drag``.
clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    Clears the selection, emptying it of all values. This property can be a `Event
    Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable
    clear.

    **Default value:** ``dblclick``.

    **See also:** `clear examples
    <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the
    documentation.
encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']]
    An array of encoding channels. The corresponding data field values must match for a
    data tuple to fall within the selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
fields : Sequence[str, :class:`FieldName`]
    An array of field names whose values must match for a data tuple to fall within the
    selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
mark : dict, :class:`BrushConfig`
    An interval selection also adds a rectangle mark to depict the extents of the
    interval. The ``mark`` property can be used to customize the appearance of the mark.

    **See also:** `mark examples
    <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.
on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
    selector) that triggers the selection. For interval selections, the event stream
    must specify a `start and end
    <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.

    **See also:** `on examples
    <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.
resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']
    With layered and multi-view displays, a strategy that determines how selections'
    data queries are resolved when applied in a filter transform, conditional encoding
    rule, or scale domain.

    One of:

    * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins
      to drag, any previous brushes are cleared, and a new one is constructed.
    * ``"union"`` -- each cell contains its own brush, and points are highlighted if
      they lie within *any* of these individual brushes.
    * ``"intersect"`` -- each cell contains its own brush, and points are highlighted
      only if they fall within *all* of these individual brushes.

    **Default value:** ``global``.

    **See also:** `resolve examples
    <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the
    documentation.
translate : str, bool
    When truthy, allows a user to interactively move an interval selection
    back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event
    stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must
    include a start and end event to trigger continuous panning. Discrete panning (e.g.,
    pressing the left/right arrow keys) will be supported in future versions.

    **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]
    > window:pointermove!``. This default allows users to clicks and drags within an
    interval selection to reposition it.

    **See also:** `translate examples
    <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the
    documentation.
zoom : str, bool
    When truthy, allows a user to interactively resize an interval selection. Can be
    ``true``, ``false`` (to disable zooming), or a `Vega event stream definition
    <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``
    events are supported, but custom event streams can still be used to specify filters,
    debouncing, and throttling. Future versions will expand the set of events that can
    trigger this transformation.

    **Default value:** ``true``, which corresponds to ``wheel!``. This default allows
    users to use the mouse wheel to resize an interval selection.

    **See also:** `zoom examples
    <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.

---
## IntervalSelectionConfigWithoutType
```python
from core import IntervalSelectionConfigWithoutType
```

IntervalSelectionConfigWithoutType schema wrapper.

Parameters
----------
clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    Clears the selection, emptying it of all values. This property can be a `Event
    Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable
    clear.

    **Default value:** ``dblclick``.

    **See also:** `clear examples
    <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the
    documentation.
encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']]
    An array of encoding channels. The corresponding data field values must match for a
    data tuple to fall within the selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
fields : Sequence[str, :class:`FieldName`]
    An array of field names whose values must match for a data tuple to fall within the
    selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
mark : dict, :class:`BrushConfig`
    An interval selection also adds a rectangle mark to depict the extents of the
    interval. The ``mark`` property can be used to customize the appearance of the mark.

    **See also:** `mark examples
    <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.
on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
    selector) that triggers the selection. For interval selections, the event stream
    must specify a `start and end
    <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.

    **See also:** `on examples
    <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.
resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']
    With layered and multi-view displays, a strategy that determines how selections'
    data queries are resolved when applied in a filter transform, conditional encoding
    rule, or scale domain.

    One of:

    * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins
      to drag, any previous brushes are cleared, and a new one is constructed.
    * ``"union"`` -- each cell contains its own brush, and points are highlighted if
      they lie within *any* of these individual brushes.
    * ``"intersect"`` -- each cell contains its own brush, and points are highlighted
      only if they fall within *all* of these individual brushes.

    **Default value:** ``global``.

    **See also:** `resolve examples
    <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the
    documentation.
translate : str, bool
    When truthy, allows a user to interactively move an interval selection
    back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event
    stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must
    include a start and end event to trigger continuous panning. Discrete panning (e.g.,
    pressing the left/right arrow keys) will be supported in future versions.

    **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]
    > window:pointermove!``. This default allows users to clicks and drags within an
    interval selection to reposition it.

    **See also:** `translate examples
    <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the
    documentation.
zoom : str, bool
    When truthy, allows a user to interactively resize an interval selection. Can be
    ``true``, ``false`` (to disable zooming), or a `Vega event stream definition
    <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``
    events are supported, but custom event streams can still be used to specify filters,
    debouncing, and throttling. Future versions will expand the set of events that can
    trigger this transformation.

    **Default value:** ``true``, which corresponds to ``wheel!``. This default allows
    users to use the mouse wheel to resize an interval selection.

    **See also:** `zoom examples
    <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.

---
## JoinAggregateFieldDef
```python
from core import JoinAggregateFieldDef
```

JoinAggregateFieldDef schema wrapper.

Parameters
----------
op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    The aggregation operation to apply (e.g., ``"sum"``, ``"average"`` or ``"count"``).
    See the list of all supported operations `here
    <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.
field : str, :class:`FieldName`
    The data field for which to compute the aggregate function. This can be omitted for
    functions that do not operate over a field such as ``"count"``.
as : str, :class:`FieldName`
    The output name for the join aggregate operation.

---
## JsonDataFormat
```python
from core import JsonDataFormat
```

JsonDataFormat schema wrapper.

Parameters
----------
parse : dict, None, :class:`Parse`
    If set to ``null``, disable type inference based on the spec and only use type
    inference based on the data. Alternatively, a parsing directive object can be
    provided for explicit data types. Each property of the object corresponds to a field
    name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
    ``"date"``, or null (do not parse the field)). For example, ``"parse":
    {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
    Date value.

    For ``"date"``, we parse data based using JavaScript's `Date.parse()
    <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
    For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}``), using
    the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
    UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}``).
    See more about `UTC time
    <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
property : str
    The JSON property containing the desired data. This parameter can be used when the
    loaded JSON file may have surrounding structure or meta-data. For example
    ``"property": "values.features"`` is equivalent to retrieving
    ``json.values.features`` from the loaded JSON object.
type : Literal['json']
    Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.

    **Default value:**  The default format type is determined by the extension of the
    file URL. If no extension is detected, ``"json"`` will be used by default.

---
## LabelOverlap
```python
from core import LabelOverlap
```

LabelOverlap schema wrapper.

---
## LatLongDef
```python
from core import LatLongDef
```

LatLongDef schema wrapper.

---
## LatLongFieldDef
```python
from core import LatLongFieldDef
```

LatLongFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : Literal['quantitative']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## LayerRepeatMapping
```python
from core import LayerRepeatMapping
```

LayerRepeatMapping schema wrapper.

Parameters
----------
layer : Sequence[str]
    An array of fields to be repeated as layers.
column : Sequence[str]
    An array of fields to be repeated horizontally.
row : Sequence[str]
    An array of fields to be repeated vertically.

---
## LayoutAlign
```python
from core import LayoutAlign
```

LayoutAlign schema wrapper.

---
## Legend
```python
from core import Legend
```

Legend schema wrapper.

Properties of a legend or boolean flag for determining whether to show it.

Parameters
----------
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the legend from the ARIA accessibility tree.

    **Default value:** ``true``
clipHeight : dict, float, :class:`ExprRef`
    The height in pixels to clip symbol legend entries and limit their size.
columnPadding : dict, float, :class:`ExprRef`
    The horizontal padding in pixels between symbol legend entries.

    **Default value:** ``10``.
columns : dict, float, :class:`ExprRef`
    The number of columns in which to arrange symbol legend entries. A value of ``0`` or
    lower indicates a single row with one column per entry.
cornerRadius : dict, float, :class:`ExprRef`
    Corner radius for the full legend.
description : str, dict, :class:`ExprRef`
    A text description of this legend for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__
    will be set to this description. If the description is unspecified it will be
    automatically generated.
direction : :class:`Orientation`, Literal['horizontal', 'vertical']
    The direction of the legend, one of ``"vertical"`` or ``"horizontal"``.

    **Default value:**

    * For top-/bottom-``orient``ed legends, ``"horizontal"``
    * For left-/right-``orient``ed legends, ``"vertical"``
    * For top/bottom-left/right-``orient``ed legends, ``"horizontal"`` for gradient
      legends and ``"vertical"`` for symbol legends.
fillColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Background fill color for the full legend.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
gradientLength : dict, float, :class:`ExprRef`
    The length in pixels of the primary axis of a color gradient. This value corresponds
    to the height of a vertical gradient or the width of a horizontal gradient.

    **Default value:** ``200``.
gradientOpacity : dict, float, :class:`ExprRef`
    Opacity of the color gradient.
gradientStrokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the gradient stroke, can be in hex color code or regular color name.

    **Default value:** ``"lightGray"``.
gradientStrokeWidth : dict, float, :class:`ExprRef`
    The width of the gradient stroke, in pixels.

    **Default value:** ``0``.
gradientThickness : dict, float, :class:`ExprRef`
    The thickness in pixels of the color gradient. This value corresponds to the width
    of a vertical gradient or the height of a horizontal gradient.

    **Default value:** ``16``.
gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to symbol legends rows and columns. The supported string
    values are ``"all"``, ``"each"`` (the default), and ``none``. For more information,
    see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.

    **Default value:** ``"each"``.
labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The alignment of the legend label, can be left, center, or right.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The position of the baseline of legend label, can be ``"top"``, ``"middle"``,
    ``"bottom"``, or ``"alphabetic"``.

    **Default value:** ``"middle"``.
labelColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend label, can be in hex color code or regular color name.
labelExpr : str
    `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing
    labels.

    **Note:** The label text and value can be assessed via the ``label`` and ``value``
    properties of the legend's backing ``datum`` object.
labelFont : str, dict, :class:`ExprRef`
    The font of the legend label.
labelFontSize : dict, float, :class:`ExprRef`
    The font size of legend label.

    **Default value:** ``10``.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of legend label.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of legend label.
labelLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of legend tick labels.

    **Default value:** ``160``.
labelOffset : dict, float, :class:`ExprRef`
    The offset of the legend label.

    **Default value:** ``4``.
labelOpacity : dict, float, :class:`ExprRef`
    Opacity of labels.
labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']
    The strategy to use for resolving overlap of labels in gradient legends. If
    ``false``, no overlap reduction is attempted. If set to ``true`` (default) or
    ``"parity"``, a strategy of removing every other label is used. If set to
    ``"greedy"``, a linear scan of the labels is performed, removing any label that
    overlaps with the last visible label (this often works better for log-scaled axes).

    **Default value:** ``true``.
labelPadding : dict, float, :class:`ExprRef`
    Padding in pixels between the legend and legend labels.
labelSeparation : dict, float, :class:`ExprRef`
    The minimum separation that must be between label bounding boxes for them to be
    considered non-overlapping (default ``0``). This property is ignored if
    *labelOverlap* resolution is not enabled.
legendX : dict, float, :class:`ExprRef`
    Custom x-position for legend with orient "none".
legendY : dict, float, :class:`ExprRef`
    Custom y-position for legend with orient "none".
offset : dict, float, :class:`ExprRef`
    The offset in pixels by which to displace the legend from the data rectangle and
    axes.

    **Default value:** ``18``.
orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right']
    The orientation of the legend, which determines how the legend is positioned within
    the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``,
    ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``.

    **Default value:** ``"right"``
padding : dict, float, :class:`ExprRef`
    The padding between the border and content of the legend group.

    **Default value:** ``0``.
rowPadding : dict, float, :class:`ExprRef`
    The vertical padding in pixels between symbol legend entries.

    **Default value:** ``2``.
strokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Border stroke color for the full legend.
symbolDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating [stroke, space] lengths for dashed symbol strokes.
symbolDashOffset : dict, float, :class:`ExprRef`
    The pixel offset at which to start drawing with the symbol stroke dash array.
symbolFillColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend symbol,
symbolLimit : dict, float, :class:`ExprRef`
    The maximum number of allowed entries for a symbol legend. Additional entries will
    be dropped.
symbolOffset : dict, float, :class:`ExprRef`
    Horizontal pixel offset for legend symbols.

    **Default value:** ``0``.
symbolOpacity : dict, float, :class:`ExprRef`
    Opacity of the legend symbols.
symbolSize : dict, float, :class:`ExprRef`
    The size of the legend symbol, in pixels.

    **Default value:** ``100``.
symbolStrokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Stroke color for legend symbols.
symbolStrokeWidth : dict, float, :class:`ExprRef`
    The width of the symbol's stroke.

    **Default value:** ``1.5``.
symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,
    ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or
    ``triangle-left``, the line symbol ``stroke``, or one of the centered directional
    shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path
    string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be
    provided. For correct sizing, custom shape paths should be defined within a square
    bounding box with coordinates ranging from -1 to 1 along both the x and y
    dimensions.

    **Default value:** ``"circle"``.
tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']
    The desired number of tick values for quantitative legends.
tickMinStep : dict, float, :class:`ExprRef`
    The minimum desired step between legend ticks, in terms of scale domain values. For
    example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.
    If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if
    necessary, to enforce the minimum step value.

    **Default value**: ``undefined``
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment for legend titles.

    **Default value:** ``"left"``.
titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    Text anchor position for placing legend titles.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for legend titles.  One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize*
    alone.

    **Default value:** ``"top"``.
titleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    The font of the legend title.
titleFontSize : dict, float, :class:`ExprRef`
    The font size of the legend title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the legend title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of the legend title. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of legend titles.

    **Default value:** ``180``.
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
titleOpacity : dict, float, :class:`ExprRef`
    Opacity of the legend title.
titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom']
    Orientation of the legend title.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixels, between title and legend.

    **Default value:** ``5``.
type : Literal['symbol', 'gradient']
    The type of the legend. Use ``"symbol"`` to create a discrete legend and
    ``"gradient"`` for a continuous color gradient.

    **Default value:** ``"gradient"`` for non-binned quantitative fields and temporal
    fields; ``"symbol"`` otherwise.
values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]
    Explicitly set the visible legend values.
zindex : float
    A non-negative integer indicating the z-index of the legend. If zindex is 0, legend
    should be drawn behind all chart elements. To put them in front, use zindex = 1.

---
## LegendBinding
```python
from core import LegendBinding
```

LegendBinding schema wrapper.

---
## LegendConfig
```python
from core import LegendConfig
```

LegendConfig schema wrapper.

Parameters
----------
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the legend from the ARIA accessibility tree.

    **Default value:** ``true``
clipHeight : dict, float, :class:`ExprRef`
    The height in pixels to clip symbol legend entries and limit their size.
columnPadding : dict, float, :class:`ExprRef`
    The horizontal padding in pixels between symbol legend entries.

    **Default value:** ``10``.
columns : dict, float, :class:`ExprRef`
    The number of columns in which to arrange symbol legend entries. A value of ``0`` or
    lower indicates a single row with one column per entry.
cornerRadius : dict, float, :class:`ExprRef`
    Corner radius for the full legend.
description : str, dict, :class:`ExprRef`
    A text description of this legend for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If the ``aria`` property is true, for SVG output the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__
    will be set to this description. If the description is unspecified it will be
    automatically generated.
direction : :class:`Orientation`, Literal['horizontal', 'vertical']
    The direction of the legend, one of ``"vertical"`` or ``"horizontal"``.

    **Default value:**

    * For top-/bottom-``orient``ed legends, ``"horizontal"``
    * For left-/right-``orient``ed legends, ``"vertical"``
    * For top/bottom-left/right-``orient``ed legends, ``"horizontal"`` for gradient
      legends and ``"vertical"`` for symbol legends.
disable : bool
    Disable legend by default
fillColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Background fill color for the full legend.
gradientDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical']
    The default direction (``"horizontal"`` or ``"vertical"``) for gradient legends.

    **Default value:** ``"vertical"``.
gradientHorizontalMaxLength : float
    Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is
    undefined.

    **Default value:** ``200``
gradientHorizontalMinLength : float
    Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is
    undefined.

    **Default value:** ``100``
gradientLabelLimit : dict, float, :class:`ExprRef`
    The maximum allowed length in pixels of color ramp gradient labels.
gradientLabelOffset : dict, float, :class:`ExprRef`
    Vertical offset in pixels for color ramp gradient labels.

    **Default value:** ``2``.
gradientLength : dict, float, :class:`ExprRef`
    The length in pixels of the primary axis of a color gradient. This value corresponds
    to the height of a vertical gradient or the width of a horizontal gradient.

    **Default value:** ``200``.
gradientOpacity : dict, float, :class:`ExprRef`
    Opacity of the color gradient.
gradientStrokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the gradient stroke, can be in hex color code or regular color name.

    **Default value:** ``"lightGray"``.
gradientStrokeWidth : dict, float, :class:`ExprRef`
    The width of the gradient stroke, in pixels.

    **Default value:** ``0``.
gradientThickness : dict, float, :class:`ExprRef`
    The thickness in pixels of the color gradient. This value corresponds to the width
    of a vertical gradient or the height of a horizontal gradient.

    **Default value:** ``16``.
gradientVerticalMaxLength : float
    Max legend length for a vertical gradient when ``config.legend.gradientLength`` is
    undefined.

    **Default value:** ``200``
gradientVerticalMinLength : float
    Min legend length for a vertical gradient when ``config.legend.gradientLength`` is
    undefined.

    **Default value:** ``100``
gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to symbol legends rows and columns. The supported string
    values are ``"all"``, ``"each"`` (the default), and ``none``. For more information,
    see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.

    **Default value:** ``"each"``.
labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The alignment of the legend label, can be left, center, or right.
labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    The position of the baseline of legend label, can be ``"top"``, ``"middle"``,
    ``"bottom"``, or ``"alphabetic"``.

    **Default value:** ``"middle"``.
labelColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend label, can be in hex color code or regular color name.
labelFont : str, dict, :class:`ExprRef`
    The font of the legend label.
labelFontSize : dict, float, :class:`ExprRef`
    The font size of legend label.

    **Default value:** ``10``.
labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of legend label.
labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of legend label.
labelLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of legend tick labels.

    **Default value:** ``160``.
labelOffset : dict, float, :class:`ExprRef`
    The offset of the legend label.

    **Default value:** ``4``.
labelOpacity : dict, float, :class:`ExprRef`
    Opacity of labels.
labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']
    The strategy to use for resolving overlap of labels in gradient legends. If
    ``false``, no overlap reduction is attempted. If set to ``true`` or ``"parity"``, a
    strategy of removing every other label is used. If set to ``"greedy"``, a linear
    scan of the labels is performed, removing any label that overlaps with the last
    visible label (this often works better for log-scaled axes).

    **Default value:** ``"greedy"`` for ``log scales otherwise ``true`.
labelPadding : dict, float, :class:`ExprRef`
    Padding in pixels between the legend and legend labels.
labelSeparation : dict, float, :class:`ExprRef`
    The minimum separation that must be between label bounding boxes for them to be
    considered non-overlapping (default ``0``). This property is ignored if
    *labelOverlap* resolution is not enabled.
layout : dict, :class:`ExprRef`

legendX : dict, float, :class:`ExprRef`
    Custom x-position for legend with orient "none".
legendY : dict, float, :class:`ExprRef`
    Custom y-position for legend with orient "none".
offset : dict, float, :class:`ExprRef`
    The offset in pixels by which to displace the legend from the data rectangle and
    axes.

    **Default value:** ``18``.
orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right']
    The orientation of the legend, which determines how the legend is positioned within
    the scene. One of ``"left"``, ``"right"``, ``"top"``, ``"bottom"``, ``"top-left"``,
    ``"top-right"``, ``"bottom-left"``, ``"bottom-right"``, ``"none"``.

    **Default value:** ``"right"``
padding : dict, float, :class:`ExprRef`
    The padding between the border and content of the legend group.

    **Default value:** ``0``.
rowPadding : dict, float, :class:`ExprRef`
    The vertical padding in pixels between symbol legend entries.

    **Default value:** ``2``.
strokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Border stroke color for the full legend.
strokeDash : dict, Sequence[float], :class:`ExprRef`
    Border stroke dash pattern for the full legend.
strokeWidth : dict, float, :class:`ExprRef`
    Border stroke width for the full legend.
symbolBaseFillColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color for legend symbols. Only applied if there is no ``"fill"`` scale
    color encoding for the legend.

    **Default value:** ``"transparent"``.
symbolBaseStrokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color for legend symbols. Only applied if there is no ``"fill"``
    scale color encoding for the legend.

    **Default value:** ``"gray"``.
symbolDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating [stroke, space] lengths for dashed symbol strokes.
symbolDashOffset : dict, float, :class:`ExprRef`
    The pixel offset at which to start drawing with the symbol stroke dash array.
symbolDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical']
    The default direction (``"horizontal"`` or ``"vertical"``) for symbol legends.

    **Default value:** ``"vertical"``.
symbolFillColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend symbol,
symbolLimit : dict, float, :class:`ExprRef`
    The maximum number of allowed entries for a symbol legend. Additional entries will
    be dropped.
symbolOffset : dict, float, :class:`ExprRef`
    Horizontal pixel offset for legend symbols.

    **Default value:** ``0``.
symbolOpacity : dict, float, :class:`ExprRef`
    Opacity of the legend symbols.
symbolSize : dict, float, :class:`ExprRef`
    The size of the legend symbol, in pixels.

    **Default value:** ``100``.
symbolStrokeColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Stroke color for legend symbols.
symbolStrokeWidth : dict, float, :class:`ExprRef`
    The width of the symbol's stroke.

    **Default value:** ``1.5``.
symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,
    ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or
    ``triangle-left``, the line symbol ``stroke``, or one of the centered directional
    shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path
    string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be
    provided. For correct sizing, custom shape paths should be defined within a square
    bounding box with coordinates ranging from -1 to 1 along both the x and y
    dimensions.

    **Default value:** ``"circle"``.
tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']
    The desired number of tick values for quantitative legends.
title : None
    Set to null to disable title for the axis, legend, or header.
titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    Horizontal text alignment for legend titles.

    **Default value:** ``"left"``.
titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    Text anchor position for placing legend titles.
titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for legend titles.  One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or ``"line-bottom"``. The
    ``"line-top"`` and ``"line-bottom"`` values operate similarly to ``"top"`` and
    ``"bottom"``, but are calculated relative to the *lineHeight* rather than *fontSize*
    alone.

    **Default value:** ``"top"``.
titleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The color of the legend title, can be in hex color code or regular color name.
titleFont : str, dict, :class:`ExprRef`
    The font of the legend title.
titleFontSize : dict, float, :class:`ExprRef`
    The font size of the legend title.
titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style of the legend title.
titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight of the legend title. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
titleLimit : dict, float, :class:`ExprRef`
    Maximum allowed pixel width of legend titles.

    **Default value:** ``180``.
titleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
titleOpacity : dict, float, :class:`ExprRef`
    Opacity of the legend title.
titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom']
    Orientation of the legend title.
titlePadding : dict, float, :class:`ExprRef`
    The padding, in pixels, between title and legend.

    **Default value:** ``5``.
unselectedOpacity : float
    The opacity of unselected legend entries.

    **Default value:** 0.35.
zindex : dict, float, :class:`ExprRef`
    The integer z-index indicating the layering of the legend group relative to other
    axis, mark, and legend groups.

---
## LegendOrient
```python
from core import LegendOrient
```

LegendOrient schema wrapper.

---
## LegendResolveMap
```python
from core import LegendResolveMap
```

LegendResolveMap schema wrapper.

Parameters
----------
angle : :class:`ResolveMode`, Literal['independent', 'shared']

color : :class:`ResolveMode`, Literal['independent', 'shared']

fill : :class:`ResolveMode`, Literal['independent', 'shared']

fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared']

opacity : :class:`ResolveMode`, Literal['independent', 'shared']

shape : :class:`ResolveMode`, Literal['independent', 'shared']

size : :class:`ResolveMode`, Literal['independent', 'shared']

stroke : :class:`ResolveMode`, Literal['independent', 'shared']

strokeDash : :class:`ResolveMode`, Literal['independent', 'shared']

strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared']

strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared']

---
## LegendStreamBinding
```python
from core import LegendStreamBinding
```

LegendStreamBinding schema wrapper.

Parameters
----------
legend : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`

---
## LineConfig
```python
from core import LineConfig
```

LineConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`
    A flag for overlaying points on top of line or area marks, or an object defining the
    properties of the overlayed points.

    * If this property is ``"transparent"``, transparent points will be used (for
      enhancing tooltips and selections).

    * If this property is an empty object (``{}``) or ``true``, filled points with
      default properties will be used.

    * If this property is ``false``, no points would be automatically added to line or
      area marks.

    **Default value:** ``false``.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## LineString
```python
from core import LineString
```

LineString schema wrapper.

LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4

Parameters
----------
coordinates : Sequence[Sequence[float], :class:`Position`]

type : Literal['LineString']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## LinearGradient
```python
from core import LinearGradient
```

LinearGradient schema wrapper.

Parameters
----------
gradient : Literal['linear']
    The type of gradient. Use ``"linear"`` for a linear gradient.
stops : Sequence[dict, :class:`GradientStop`]
    An array of gradient stops defining the gradient color sequence.
id : str

x1 : float
    The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.

    **Default value:** ``0``
x2 : float
    The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.

    **Default value:** ``1``
y1 : float
    The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.

    **Default value:** ``0``
y2 : float
    The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.

    **Default value:** ``0``

---
## LookupData
```python
from core import LookupData
```

LookupData schema wrapper.

Parameters
----------
data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    Secondary data source to lookup in.
key : str, :class:`FieldName`
    Key in data to lookup.
fields : Sequence[str, :class:`FieldName`]
    Fields in foreign data or selection to lookup. If not specified, the entire object
    is queried.

---
## LookupSelection
```python
from core import LookupSelection
```

LookupSelection schema wrapper.

Parameters
----------
key : str, :class:`FieldName`
    Key in data to lookup.
param : str, :class:`ParameterName`
    Selection parameter name to look up.
fields : Sequence[str, :class:`FieldName`]
    Fields in foreign data or selection to lookup. If not specified, the entire object
    is queried.

---
## Mark
```python
from core import Mark
```

Mark schema wrapper.

All types of primitive marks.

---
## MarkConfig
```python
from core import MarkConfig
```

MarkConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## MarkDef
```python
from core import MarkDef
```

MarkDef schema wrapper.

Parameters
----------
type : :class:`Mark`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape']
    The mark type. This could a primitive mark type (one of ``"bar"``, ``"circle"``,
    ``"square"``, ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"geoshape"``,
    ``"rule"``, and ``"text"``) or a composite mark type (``"boxplot"``,
    ``"errorband"``, ``"errorbar"``).
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
bandSize : float
    The width of the ticks.

    **Default value:**  3/4 of step (width step for horizontal ticks and height step for
    vertical ticks).
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
binSpacing : float
    Offset between bars for binned field. The ideal value for this is either 0
    (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).

    **Default value:** ``1``
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
clip : bool, dict, :class:`ExprRef`
    Whether a mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
continuousBandSize : float
    The default size of the bars on continuous scales.

    **Default value:** ``5``
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusEnd : dict, float, :class:`ExprRef`
    * For vertical bars, top-left and top-right corner radius.

    * For horizontal bars, top-right and bottom-right corner radius.
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
discreteBandSize : dict, float, :class:`RelativeBandSize`
    The default size of the bars with discrete dimensions. If unspecified, the default
    size is  ``step-2``, which provides 2 pixel offset between bars.
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`
    Height of the marks.  One of:

    * A number representing a fixed pixel height.

    * A relative band size definition.  For example, ``{band: 0.5}`` represents half of
      the band
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
line : bool, dict, :class:`OverlayMarkDef`
    A flag for overlaying line on top of area marks, or an object defining the
    properties of the overlayed lines.

    * If this value is an empty object (``{}``) or ``true``, lines with default
      properties will be used.

    * If this value is ``false``, no lines would be automatically added to area marks.

    **Default value:** ``false``.
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
minBandSize : dict, float, :class:`ExprRef`
    The minimum band size for bar and rectangle marks. **Default value:** ``0.25``
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`
    A flag for overlaying points on top of line or area marks, or an object defining the
    properties of the overlayed points.

    * If this property is ``"transparent"``, transparent points will be used (for
      enhancing tooltips and selections).

    * If this property is an empty object (``{}``) or ``true``, filled points with
      default properties will be used.

    * If this property is ``false``, no points would be automatically added to line or
      area marks.

    **Default value:** ``false``.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
radius2Offset : dict, float, :class:`ExprRef`
    Offset for radius2.
radiusOffset : dict, float, :class:`ExprRef`
    Offset for radius.
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
style : str, Sequence[str]
    A string or array of strings indicating the name of custom styles to apply to the
    mark. A style is a named collection of mark property defaults defined within the
    `style configuration
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
    array, later styles will override earlier styles. Any `mark properties
    <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
    defined within the ``encoding`` will override a style default.

    **Default value:** The mark's name. For example, a bar mark will have style
    ``"bar"`` by default. **Note:** Any specified style will augment the default style.
    For example, a bar mark with ``"style": "foo"`` will receive from
    ``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has
    higher precedence).
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
theta2Offset : dict, float, :class:`ExprRef`
    Offset for theta2.
thetaOffset : dict, float, :class:`ExprRef`
    Offset for theta.
thickness : float
    Thickness of the tick mark.

    **Default value:**  ``1``
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`
    Width of the marks.  One of:

    * A number representing a fixed pixel width.

    * A relative band size definition.  For example, ``{band: 0.5}`` represents half of
      the band.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2Offset : dict, float, :class:`ExprRef`
    Offset for x2-position.
xOffset : dict, float, :class:`ExprRef`
    Offset for x-position.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2Offset : dict, float, :class:`ExprRef`
    Offset for y2-position.
yOffset : dict, float, :class:`ExprRef`
    Offset for y-position.

---
## MarkInvalidDataMode
```python
from core import MarkInvalidDataMode
```

MarkInvalidDataMode schema wrapper.

---
## MarkPropDefGradientstringnull
```python
from core import MarkPropDefGradientstringnull
```

MarkPropDefGradientstringnull schema wrapper.

---
## FieldOrDatumDefWithConditionDatumDefGradientstringnull
```python
from core import FieldOrDatumDefWithConditionDatumDefGradientstringnull
```

FieldOrDatumDefWithConditionDatumDefGradientstringnull schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull
```python
from core import FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull
```

FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## MarkPropDefnumber
```python
from core import MarkPropDefnumber
```

MarkPropDefnumber schema wrapper.

---
## MarkPropDefnumberArray
```python
from core import MarkPropDefnumberArray
```

MarkPropDefnumberArray schema wrapper.

---
## MarkPropDefstringnullTypeForShape
```python
from core import MarkPropDefstringnullTypeForShape
```

MarkPropDefstringnullTypeForShape schema wrapper.

---
## MarkType
```python
from core import MarkType
```

MarkType schema wrapper.

---
## Month
```python
from core import Month
```

Month schema wrapper.

---
## MultiLineString
```python
from core import MultiLineString
```

MultiLineString schema wrapper.

MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5

Parameters
----------
coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]]

type : Literal['MultiLineString']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## MultiPoint
```python
from core import MultiPoint
```

MultiPoint schema wrapper.

MultiPoint geometry object.  https://tools.ietf.org/html/rfc7946#section-3.1.3

Parameters
----------
coordinates : Sequence[Sequence[float], :class:`Position`]

type : Literal['MultiPoint']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## MultiPolygon
```python
from core import MultiPolygon
```

MultiPolygon schema wrapper.

MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7

Parameters
----------
coordinates : Sequence[Sequence[Sequence[Sequence[float], :class:`Position`]]]

type : Literal['MultiPolygon']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## NamedData
```python
from core import NamedData
```

NamedData schema wrapper.

Parameters
----------
name : str
    Provide a placeholder name and bind data at runtime.

    New data may change the layout but Vega does not always resize the chart. To update
    the layout when the data updates, set `autosize
    <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ or explicitly use
    `view.resize <https://vega.github.io/vega/docs/api/view/#view_resize>`__.
format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`
    An object that specifies the format for parsing the data.

---
## NonArgAggregateOp
```python
from core import NonArgAggregateOp
```

NonArgAggregateOp schema wrapper.

---
## NonNormalizedSpec
```python
from core import NonNormalizedSpec
```

NonNormalizedSpec schema wrapper.

Any specification in Vega-Lite.

---
## NumberLocale
```python
from core import NumberLocale
```

NumberLocale schema wrapper.

Locale definition for formatting numbers.

Parameters
----------
currency : Sequence[str], :class:`Vector2string`
    The currency prefix and suffix (e.g., ["$", ""]).
decimal : str
    The decimal point (e.g., ".").
grouping : Sequence[float]
    The array of group sizes (e.g., [3]), cycled as needed.
thousands : str
    The group separator (e.g., ",").
minus : str
    The minus sign (defaults to hyphen-minus, "-").
nan : str
    The not-a-number value (defaults to "NaN").
numerals : Sequence[str], :class:`Vector10string`
    An array of ten strings to replace the numerals 0-9.
percent : str
    The percent sign (defaults to "%").

---
## NumericArrayMarkPropDef
```python
from core import NumericArrayMarkPropDef
```

NumericArrayMarkPropDef schema wrapper.

---
## FieldOrDatumDefWithConditionDatumDefnumberArray
```python
from core import FieldOrDatumDefWithConditionDatumDefnumberArray
```

FieldOrDatumDefWithConditionDatumDefnumberArray schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray
```python
from core import FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray
```

FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## NumericMarkPropDef
```python
from core import NumericMarkPropDef
```

NumericMarkPropDef schema wrapper.

---
## FieldOrDatumDefWithConditionDatumDefnumber
```python
from core import FieldOrDatumDefWithConditionDatumDefnumber
```

FieldOrDatumDefWithConditionDatumDefnumber schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldOrDatumDefWithConditionMarkPropFieldDefnumber
```python
from core import FieldOrDatumDefWithConditionMarkPropFieldDefnumber
```

FieldOrDatumDefWithConditionMarkPropFieldDefnumber schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## OffsetDef
```python
from core import OffsetDef
```

OffsetDef schema wrapper.

---
## OrderFieldDef
```python
from core import OrderFieldDef
```

OrderFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
sort : :class:`SortOrder`, Literal['ascending', 'descending']
    The sort order. One of ``"ascending"`` (default) or ``"descending"``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## OrderOnlyDef
```python
from core import OrderOnlyDef
```

OrderOnlyDef schema wrapper.

Parameters
----------
sort : :class:`SortOrder`, Literal['ascending', 'descending']
    The sort order. One of ``"ascending"`` (default) or ``"descending"``.

---
## OrderValueDef
```python
from core import OrderValueDef
```

OrderValueDef schema wrapper.

Parameters
----------
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.

---
## Orient
```python
from core import Orient
```

Orient schema wrapper.

---
## Orientation
```python
from core import Orientation
```

Orientation schema wrapper.

---
## OverlayMarkDef
```python
from core import OverlayMarkDef
```

OverlayMarkDef schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
clip : bool, dict, :class:`ExprRef`
    Whether a mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
radius2Offset : dict, float, :class:`ExprRef`
    Offset for radius2.
radiusOffset : dict, float, :class:`ExprRef`
    Offset for radius.
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
style : str, Sequence[str]
    A string or array of strings indicating the name of custom styles to apply to the
    mark. A style is a named collection of mark property defaults defined within the
    `style configuration
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
    array, later styles will override earlier styles. Any `mark properties
    <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly
    defined within the ``encoding`` will override a style default.

    **Default value:** The mark's name. For example, a bar mark will have style
    ``"bar"`` by default. **Note:** Any specified style will augment the default style.
    For example, a bar mark with ``"style": "foo"`` will receive from
    ``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has
    higher precedence).
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
theta2Offset : dict, float, :class:`ExprRef`
    Offset for theta2.
thetaOffset : dict, float, :class:`ExprRef`
    Offset for theta.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2Offset : dict, float, :class:`ExprRef`
    Offset for x2-position.
xOffset : dict, float, :class:`ExprRef`
    Offset for x-position.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2Offset : dict, float, :class:`ExprRef`
    Offset for y2-position.
yOffset : dict, float, :class:`ExprRef`
    Offset for y-position.

---
## Padding
```python
from core import Padding
```

Padding schema wrapper.

---
## ParameterExtent
```python
from core import ParameterExtent
```

ParameterExtent schema wrapper.

---
## ParameterName
```python
from core import ParameterName
```

ParameterName schema wrapper.

---
## Parse
```python
from core import Parse
```

Parse schema wrapper.

---
## ParseValue
```python
from core import ParseValue
```

ParseValue schema wrapper.

---
## Point
```python
from core import Point
```

Point schema wrapper.

Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2

Parameters
----------
coordinates : Sequence[float], :class:`Position`
    A Position is an array of coordinates.
    https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two
    and three elements. The previous GeoJSON specification allowed more elements (e.g.,
    which could be used to represent M values), but the current specification only
    allows X, Y, and (optionally) Z to be defined.
type : Literal['Point']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## PointSelectionConfig
```python
from core import PointSelectionConfig
```

PointSelectionConfig schema wrapper.

Parameters
----------
type : Literal['point']
    Determines the default event processing and data query for the selection. Vega-Lite
    currently supports two selection types:

    * ``"point"`` -- to select multiple discrete data values; the first value is
      selected on ``click`` and additional values toggled on shift-click.
    * ``"interval"`` -- to select a continuous range of data values on ``drag``.
clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    Clears the selection, emptying it of all values. This property can be a `Event
    Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable
    clear.

    **Default value:** ``dblclick``.

    **See also:** `clear examples
    <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the
    documentation.
encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']]
    An array of encoding channels. The corresponding data field values must match for a
    data tuple to fall within the selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
fields : Sequence[str, :class:`FieldName`]
    An array of field names whose values must match for a data tuple to fall within the
    selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
nearest : bool
    When true, an invisible voronoi diagram is computed to accelerate discrete
    selection. The data value *nearest* the mouse cursor is added to the selection.

    **Default value:** ``false``, which means that data values must be interacted with
    directly (e.g., clicked on) to be added to the selection.

    **See also:** `nearest examples
    <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.
on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
    selector) that triggers the selection. For interval selections, the event stream
    must specify a `start and end
    <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.

    **See also:** `on examples
    <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.
resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']
    With layered and multi-view displays, a strategy that determines how selections'
    data queries are resolved when applied in a filter transform, conditional encoding
    rule, or scale domain.

    One of:

    * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins
      to drag, any previous brushes are cleared, and a new one is constructed.
    * ``"union"`` -- each cell contains its own brush, and points are highlighted if
      they lie within *any* of these individual brushes.
    * ``"intersect"`` -- each cell contains its own brush, and points are highlighted
      only if they fall within *all* of these individual brushes.

    **Default value:** ``global``.

    **See also:** `resolve examples
    <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the
    documentation.
toggle : str, bool
    Controls whether data values should be toggled (inserted or removed from a point
    selection) or only ever inserted into point selections.

    One of:

    * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``.  As a
      result, data values are toggled when the user interacts with the shift-key
      pressed.
    * ``false`` -- disables toggling behaviour; the selection will only ever contain a
      single data value corresponding to the most recent interaction.
    * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is
      re-evaluated as the user interacts. If the expression evaluates to ``true``, the
      data value is toggled into or out of the point selection. If the expression
      evaluates to ``false``, the point selection is first cleared, and the data value
      is then inserted. For example, setting the value to the Vega expression ``"true"``
      will toggle data values without the user pressing the shift-key.

    **Default value:** ``true``

    **See also:** `toggle examples
    <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the
    documentation.

---
## PointSelectionConfigWithoutType
```python
from core import PointSelectionConfigWithoutType
```

PointSelectionConfigWithoutType schema wrapper.

Parameters
----------
clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    Clears the selection, emptying it of all values. This property can be a `Event
    Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable
    clear.

    **Default value:** ``dblclick``.

    **See also:** `clear examples
    <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the
    documentation.
encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'shape', 'key', 'text', 'href', 'url', 'description']]
    An array of encoding channels. The corresponding data field values must match for a
    data tuple to fall within the selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
fields : Sequence[str, :class:`FieldName`]
    An array of field names whose values must match for a data tuple to fall within the
    selection.

    **See also:** The `projection with encodings and fields section
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the
    documentation.
nearest : bool
    When true, an invisible voronoi diagram is computed to accelerate discrete
    selection. The data value *nearest* the mouse cursor is added to the selection.

    **Default value:** ``false``, which means that data values must be interacted with
    directly (e.g., clicked on) to be added to the selection.

    **See also:** `nearest examples
    <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.
on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`
    A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or
    selector) that triggers the selection. For interval selections, the event stream
    must specify a `start and end
    <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.

    **See also:** `on examples
    <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.
resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']
    With layered and multi-view displays, a strategy that determines how selections'
    data queries are resolved when applied in a filter transform, conditional encoding
    rule, or scale domain.

    One of:

    * ``"global"`` -- only one brush exists for the entire SPLOM. When the user begins
      to drag, any previous brushes are cleared, and a new one is constructed.
    * ``"union"`` -- each cell contains its own brush, and points are highlighted if
      they lie within *any* of these individual brushes.
    * ``"intersect"`` -- each cell contains its own brush, and points are highlighted
      only if they fall within *all* of these individual brushes.

    **Default value:** ``global``.

    **See also:** `resolve examples
    <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the
    documentation.
toggle : str, bool
    Controls whether data values should be toggled (inserted or removed from a point
    selection) or only ever inserted into point selections.

    One of:

    * ``true`` -- the default behavior, which corresponds to ``"event.shiftKey"``.  As a
      result, data values are toggled when the user interacts with the shift-key
      pressed.
    * ``false`` -- disables toggling behaviour; the selection will only ever contain a
      single data value corresponding to the most recent interaction.
    * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is
      re-evaluated as the user interacts. If the expression evaluates to ``true``, the
      data value is toggled into or out of the point selection. If the expression
      evaluates to ``false``, the point selection is first cleared, and the data value
      is then inserted. For example, setting the value to the Vega expression ``"true"``
      will toggle data values without the user pressing the shift-key.

    **Default value:** ``true``

    **See also:** `toggle examples
    <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the
    documentation.

---
## PolarDef
```python
from core import PolarDef
```

PolarDef schema wrapper.

---
## Polygon
```python
from core import Polygon
```

Polygon schema wrapper.

Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6

Parameters
----------
coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]]

type : Literal['Polygon']
    Specifies the type of GeoJSON object.
bbox : :class:`BBox`, Sequence[float]
    Bounding box of the coordinate range of the object's Geometries, Features, or
    Feature Collections. https://tools.ietf.org/html/rfc7946#section-5

---
## Position
```python
from core import Position
```

Position schema wrapper.

A Position is an array of coordinates. https://tools.ietf.org/html/rfc7946#section-3.1.1
Array should contain between two and three elements. The previous GeoJSON specification
allowed more elements (e.g., which could be used to represent M values), but the current
specification only allows X, Y, and (optionally) Z to be defined.

---
## Position2Def
```python
from core import Position2Def
```

Position2Def schema wrapper.

---
## DatumDef
```python
from core import DatumDef
```

DatumDef schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## PositionDatumDefBase
```python
from core import PositionDatumDefBase
```

PositionDatumDefBase schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## PositionDef
```python
from core import PositionDef
```

PositionDef schema wrapper.

---
## PositionDatumDef
```python
from core import PositionDatumDef
```

PositionDatumDef schema wrapper.

Parameters
----------
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## PositionFieldDef
```python
from core import PositionFieldDef
```

PositionFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## PositionFieldDefBase
```python
from core import PositionFieldDefBase
```

PositionFieldDefBase schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## PositionValueDef
```python
from core import PositionValueDef
```

PositionValueDef schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## PredicateComposition
```python
from core import PredicateComposition
```

PredicateComposition schema wrapper.

---
## LogicalAndPredicate
```python
from core import LogicalAndPredicate
```

LogicalAndPredicate schema wrapper.

Parameters
----------
and : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`]

---
## LogicalNotPredicate
```python
from core import LogicalNotPredicate
```

LogicalNotPredicate schema wrapper.

Parameters
----------
not : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`

---
## LogicalOrPredicate
```python
from core import LogicalOrPredicate
```

LogicalOrPredicate schema wrapper.

Parameters
----------
or : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`]

---
## Predicate
```python
from core import Predicate
```

Predicate schema wrapper.

---
## FieldEqualPredicate
```python
from core import FieldEqualPredicate
```

FieldEqualPredicate schema wrapper.

Parameters
----------
equal : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`
    The value that the field should be equal to.
field : str, :class:`FieldName`
    Field to be tested.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldGTEPredicate
```python
from core import FieldGTEPredicate
```

FieldGTEPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
gte : str, dict, float, :class:`ExprRef`, :class:`DateTime`
    The value that the field should be greater than or equals to.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldGTPredicate
```python
from core import FieldGTPredicate
```

FieldGTPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
gt : str, dict, float, :class:`ExprRef`, :class:`DateTime`
    The value that the field should be greater than.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldLTEPredicate
```python
from core import FieldLTEPredicate
```

FieldLTEPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
lte : str, dict, float, :class:`ExprRef`, :class:`DateTime`
    The value that the field should be less than or equals to.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldLTPredicate
```python
from core import FieldLTPredicate
```

FieldLTPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
lt : str, dict, float, :class:`ExprRef`, :class:`DateTime`
    The value that the field should be less than.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldOneOfPredicate
```python
from core import FieldOneOfPredicate
```

FieldOneOfPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
oneOf : Sequence[str], Sequence[bool], Sequence[float], Sequence[dict, :class:`DateTime`]
    A set of values that the ``field``'s value should be a member of, for a data item
    included in the filtered data.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldRangePredicate
```python
from core import FieldRangePredicate
```

FieldRangePredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
range : dict, :class:`ExprRef`, Sequence[dict, None, float, :class:`ExprRef`, :class:`DateTime`]
    An array of inclusive minimum and maximum values for a field value of a data item to
    be included in the filtered data.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## FieldValidPredicate
```python
from core import FieldValidPredicate
```

FieldValidPredicate schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    Field to be tested.
valid : bool
    If set to true the field's value has to be valid, meaning both not ``null`` and not
    `NaN
    <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN>`__.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit for the field to be tested.

---
## ParameterPredicate
```python
from core import ParameterPredicate
```

ParameterPredicate schema wrapper.

Parameters
----------
param : str, :class:`ParameterName`
    Filter using a parameter name.
empty : bool
    For selection parameters, the predicate of empty selections returns true by default.
    Override this behavior, by setting this property ``empty: false``.

---
## Projection
```python
from core import Projection
```

Projection schema wrapper.

Parameters
----------
center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    The projection's center, a two-element array of longitude and latitude in degrees.

    **Default value:** ``[0, 0]``
clipAngle : dict, float, :class:`ExprRef`
    The projection's clipping circle radius to the specified angle in degrees. If
    ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
    rather than small-circle clipping.
clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]
    The projection's viewport clip extent to the specified bounds in pixels. The extent
    bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the
    left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the
    bottom. If ``null``, no viewport clipping is performed.
coefficient : dict, float, :class:`ExprRef`
    The coefficient parameter for the ``hammer`` projection.

    **Default value:** ``2``
distance : dict, float, :class:`ExprRef`
    For the ``satellite`` projection, the distance from the center of the sphere to the
    point of view, as a proportion of the sphere's radius. The recommended maximum clip
    angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt
    is also applied, then more conservative clipping may be necessary.

    **Default value:** ``2.0``
extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]

fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]]

fraction : dict, float, :class:`ExprRef`
    The fraction parameter for the ``bottomley`` projection.

    **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.
lobes : dict, float, :class:`ExprRef`
    The number of lobes in projections that support multi-lobe views: ``berghaus``,
    ``gingery``, or ``healpix``. The default value varies based on the projection type.
parallel : dict, float, :class:`ExprRef`
    The parallel parameter for projections that support it: ``armadillo``, ``bonne``,
    ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,
    ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default
    value varies based on the projection type.
parallels : dict, Sequence[float], :class:`ExprRef`
    For conic projections, the `two standard parallels
    <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.
    The default depends on the specific conic projection used.
pointRadius : dict, float, :class:`ExprRef`
    The default radius (in pixels) to use when drawing GeoJSON ``Point`` and
    ``MultiPoint`` geometries. This parameter sets a constant default value. To modify
    the point radius in response to data, see the corresponding parameter of the GeoPath
    and GeoShape transforms.

    **Default value:** ``4.5``
precision : dict, float, :class:`ExprRef`
    The threshold for the projection's `adaptive resampling
    <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
    value corresponds to the `Douglas-Peucker distance
    <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
    If precision is not specified, returns the projection's current resampling precision
    which defaults to ``√0.5 ≅ 0.70710…``.
radius : dict, float, :class:`ExprRef`
    The radius parameter for the ``airy`` or ``gingery`` projection. The default value
    varies based on the projection type.
ratio : dict, float, :class:`ExprRef`
    The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The
    default value varies based on the projection type.
reflectX : bool, dict, :class:`ExprRef`
    Sets whether or not the x-dimension is reflected (negated) in the output.
reflectY : bool, dict, :class:`ExprRef`
    Sets whether or not the y-dimension is reflected (negated) in the output.
rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number`
    The projection's three-axis rotation to the specified angles, which must be a two-
    or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the
    rotation angles in degrees about each spherical axis. (These correspond to yaw,
    pitch and roll.)

    **Default value:** ``[0, 0, 0]``
scale : dict, float, :class:`ExprRef`
    The projection's scale (zoom) factor, overriding automatic fitting. The default
    scale is projection-specific. The scale factor corresponds linearly to the distance
    between projected points; however, scale factor values are not equivalent across
    projections.
size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    Used in conjunction with fit, provides the width and height in pixels of the area to
    which the projection should be automatically fit.
spacing : dict, float, :class:`ExprRef`
    The spacing parameter for the ``lagrange`` projection.

    **Default value:** ``0.5``
tilt : dict, float, :class:`ExprRef`
    The tilt angle (in degrees) for the ``satellite`` projection.

    **Default value:** ``0``.
translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    The projection's translation offset as a two-element array ``[tx, ty]``.
type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator']
    The cartographic projection to use. This value is case-insensitive, for example
    ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
    valid projection types `in the documentation
    <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.

    **Default value:** ``equalEarth``

---
## ProjectionConfig
```python
from core import ProjectionConfig
```

ProjectionConfig schema wrapper.

Parameters
----------
center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    The projection's center, a two-element array of longitude and latitude in degrees.

    **Default value:** ``[0, 0]``
clipAngle : dict, float, :class:`ExprRef`
    The projection's clipping circle radius to the specified angle in degrees. If
    ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting
    rather than small-circle clipping.
clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]
    The projection's viewport clip extent to the specified bounds in pixels. The extent
    bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the
    left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the
    bottom. If ``null``, no viewport clipping is performed.
coefficient : dict, float, :class:`ExprRef`
    The coefficient parameter for the ``hammer`` projection.

    **Default value:** ``2``
distance : dict, float, :class:`ExprRef`
    For the ``satellite`` projection, the distance from the center of the sphere to the
    point of view, as a proportion of the sphere's radius. The recommended maximum clip
    angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt
    is also applied, then more conservative clipping may be necessary.

    **Default value:** ``2.0``
extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]

fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]]

fraction : dict, float, :class:`ExprRef`
    The fraction parameter for the ``bottomley`` projection.

    **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.
lobes : dict, float, :class:`ExprRef`
    The number of lobes in projections that support multi-lobe views: ``berghaus``,
    ``gingery``, or ``healpix``. The default value varies based on the projection type.
parallel : dict, float, :class:`ExprRef`
    The parallel parameter for projections that support it: ``armadillo``, ``bonne``,
    ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,
    ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default
    value varies based on the projection type.
parallels : dict, Sequence[float], :class:`ExprRef`
    For conic projections, the `two standard parallels
    <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.
    The default depends on the specific conic projection used.
pointRadius : dict, float, :class:`ExprRef`
    The default radius (in pixels) to use when drawing GeoJSON ``Point`` and
    ``MultiPoint`` geometries. This parameter sets a constant default value. To modify
    the point radius in response to data, see the corresponding parameter of the GeoPath
    and GeoShape transforms.

    **Default value:** ``4.5``
precision : dict, float, :class:`ExprRef`
    The threshold for the projection's `adaptive resampling
    <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This
    value corresponds to the `Douglas-Peucker distance
    <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.
    If precision is not specified, returns the projection's current resampling precision
    which defaults to ``√0.5 ≅ 0.70710…``.
radius : dict, float, :class:`ExprRef`
    The radius parameter for the ``airy`` or ``gingery`` projection. The default value
    varies based on the projection type.
ratio : dict, float, :class:`ExprRef`
    The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The
    default value varies based on the projection type.
reflectX : bool, dict, :class:`ExprRef`
    Sets whether or not the x-dimension is reflected (negated) in the output.
reflectY : bool, dict, :class:`ExprRef`
    Sets whether or not the y-dimension is reflected (negated) in the output.
rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number`
    The projection's three-axis rotation to the specified angles, which must be a two-
    or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the
    rotation angles in degrees about each spherical axis. (These correspond to yaw,
    pitch and roll.)

    **Default value:** ``[0, 0, 0]``
scale : dict, float, :class:`ExprRef`
    The projection's scale (zoom) factor, overriding automatic fitting. The default
    scale is projection-specific. The scale factor corresponds linearly to the distance
    between projected points; however, scale factor values are not equivalent across
    projections.
size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    Used in conjunction with fit, provides the width and height in pixels of the area to
    which the projection should be automatically fit.
spacing : dict, float, :class:`ExprRef`
    The spacing parameter for the ``lagrange`` projection.

    **Default value:** ``0.5``
tilt : dict, float, :class:`ExprRef`
    The tilt angle (in degrees) for the ``satellite`` projection.

    **Default value:** ``0``.
translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`
    The projection's translation offset as a two-element array ``[tx, ty]``.
type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator']
    The cartographic projection to use. This value is case-insensitive, for example
    ``"albers"`` and ``"Albers"`` indicate the same projection type. You can find all
    valid projection types `in the documentation
    <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.

    **Default value:** ``equalEarth``

---
## ProjectionType
```python
from core import ProjectionType
```

ProjectionType schema wrapper.

---
## RadialGradient
```python
from core import RadialGradient
```

RadialGradient schema wrapper.

Parameters
----------
gradient : Literal['radial']
    The type of gradient. Use ``"radial"`` for a radial gradient.
stops : Sequence[dict, :class:`GradientStop`]
    An array of gradient stops defining the gradient color sequence.
id : str

r1 : float
    The radius length, in normalized [0, 1] coordinates, of the inner circle for the
    gradient.

    **Default value:** ``0``
r2 : float
    The radius length, in normalized [0, 1] coordinates, of the outer circle for the
    gradient.

    **Default value:** ``0.5``
x1 : float
    The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner
    circle for the gradient.

    **Default value:** ``0.5``
x2 : float
    The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer
    circle for the gradient.

    **Default value:** ``0.5``
y1 : float
    The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner
    circle for the gradient.

    **Default value:** ``0.5``
y2 : float
    The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer
    circle for the gradient.

    **Default value:** ``0.5``

---
## RangeConfig
```python
from core import RangeConfig
```

RangeConfig schema wrapper.

Parameters
----------
category : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, None, float, Sequence[float], :class:`RangeRawArray`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]
    Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for categorical
    data.
diverging : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, None, float, Sequence[float], :class:`RangeRawArray`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]
    Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for diverging
    quantitative ramps.
heatmap : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, None, float, Sequence[float], :class:`RangeRawArray`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]
    Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for
    quantitative heatmaps.
ordinal : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, None, float, Sequence[float], :class:`RangeRawArray`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]
    Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for
    rank-ordered data.
ramp : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, None, float, Sequence[float], :class:`RangeRawArray`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]
    Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for sequential
    quantitative ramps.
symbol : Sequence[str, :class:`SymbolShape`]
    Array of `symbol <https://vega.github.io/vega/docs/marks/symbol/>`__ names or paths
    for the default shape palette.

---
## RangeRawArray
```python
from core import RangeRawArray
```

RangeRawArray schema wrapper.

---
## RangeScheme
```python
from core import RangeScheme
```

RangeScheme schema wrapper.

---
## RangeEnum
```python
from core import RangeEnum
```

RangeEnum schema wrapper.

---
## RangeRaw
```python
from core import RangeRaw
```

RangeRaw schema wrapper.

---
## RectConfig
```python
from core import RectConfig
```

RectConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
binSpacing : float
    Offset between bars for binned field. The ideal value for this is either 0
    (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).

    **Default value:** ``1``
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
continuousBandSize : float
    The default size of the bars on continuous scales.

    **Default value:** ``5``
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
discreteBandSize : dict, float, :class:`RelativeBandSize`
    The default size of the bars with discrete dimensions. If unspecified, the default
    size is  ``step-2``, which provides 2 pixel offset between bars.
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
minBandSize : dict, float, :class:`ExprRef`
    The minimum band size for bar and rectangle marks. **Default value:** ``0.25``
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## RelativeBandSize
```python
from core import RelativeBandSize
```

RelativeBandSize schema wrapper.

Parameters
----------
band : float
    The relative band size.  For example ``0.5`` means half of the band scale's band
    width.

---
## RepeatMapping
```python
from core import RepeatMapping
```

RepeatMapping schema wrapper.

Parameters
----------
column : Sequence[str]
    An array of fields to be repeated horizontally.
row : Sequence[str]
    An array of fields to be repeated vertically.

---
## RepeatRef
```python
from core import RepeatRef
```

RepeatRef schema wrapper.

Reference to a repeated value.

Parameters
----------
repeat : Literal['row', 'column', 'repeat', 'layer']

---
## Resolve
```python
from core import Resolve
```

Resolve schema wrapper.

Defines how scales, axes, and legends from different specs should be combined. Resolve is a
mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions.
Scales and guides can be resolved to be ``"independent"`` or ``"shared"``.

Parameters
----------
axis : dict, :class:`AxisResolveMap`

legend : dict, :class:`LegendResolveMap`

scale : dict, :class:`ScaleResolveMap`

---
## ResolveMode
```python
from core import ResolveMode
```

ResolveMode schema wrapper.

---
## RowColLayoutAlign
```python
from core import RowColLayoutAlign
```

RowColLayoutAlign schema wrapper.

Parameters
----------
column : :class:`LayoutAlign`, Literal['all', 'each', 'none']

row : :class:`LayoutAlign`, Literal['all', 'each', 'none']

---
## RowColboolean
```python
from core import RowColboolean
```

RowColboolean schema wrapper.

Parameters
----------
column : bool

row : bool

---
## RowColnumber
```python
from core import RowColnumber
```

RowColnumber schema wrapper.

Parameters
----------
column : float

row : float

---
## RowColumnEncodingFieldDef
```python
from core import RowColumnEncodingFieldDef
```

RowColumnEncodingFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
align : :class:`LayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to row/column facet's subplot. The supported string values
    are ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    **Default value:** ``"all"``.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
center : bool
    Boolean flag indicating if facet's subviews should be centered relative to their
    respective rows or columns.

    **Default value:** ``false``
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
spacing : float
    The spacing in pixels between facet's sub-views.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Scale
```python
from core import Scale
```

Scale schema wrapper.

Parameters
----------
align : dict, float, :class:`ExprRef`
    The alignment of the steps within the scale range.

    This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the
    steps should be centered within the range. A value of ``0`` or ``1`` may be used to
    shift the bands to one side, say to position them adjacent to an axis.

    **Default value:** ``0.5``
base : dict, float, :class:`ExprRef`
    The logarithm base of the ``log`` scale (default ``10``).
bins : dict, Sequence[float], :class:`ScaleBins`, :class:`ScaleBinParams`
    Bin boundaries can be provided to scales as either an explicit array of bin
    boundaries or as a bin specification object. The legal values are:

    * An `array <../types/#Array>`__ literal of bin boundary values. For example, ``[0,
      5, 10, 15, 20]``. The array must include both starting and ending boundaries. The
      previous example uses five values to indicate a total of four bin intervals:
      [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as
      elements.
    * A `bin specification object
      <https://vega.github.io/vega-lite/docs/scale.html#bins>`__ that indicates the bin
      *step* size, and optionally the *start* and *stop* boundaries.
    * An array of bin boundaries over the scale domain. If provided, axes and legends
      will use the bin boundaries to inform the choice of tick marks and text labels.
clamp : bool, dict, :class:`ExprRef`
    If ``true``, values that exceed the data domain are clamped to either the minimum or
    maximum range value

    **Default value:** derived from the `scale config
    <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__'s ``clamp``
    (``true`` by default).
constant : dict, float, :class:`ExprRef`
    A constant determining the slope of the symlog function around zero. Only used for
    ``symlog`` scales.

    **Default value:** ``1``
domain : dict, :class:`ExprRef`, Literal['unaggregated'], :class:`DomainUnionWith`, :class:`ParameterExtent`, Sequence[str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`]
    Customized domain values in the form of constant values or dynamic values driven by
    a parameter.

    1) Constant ``domain`` for *quantitative* fields can take one of the following
    forms:

    * A two-element array with minimum and maximum values. To create a diverging scale,
      this two-element array can be combined with the ``domainMid`` property.
    * An array with more than two entries, for `Piecewise quantitative scales
      <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.
    * A string value ``"unaggregated"``, if the input field is aggregated, to indicate
      that the domain should include the raw data values prior to the aggregation.

    2) Constant ``domain`` for *temporal* fields can be a two-element array with minimum
    and maximum values, in the form of either timestamps or the `DateTime definition
    objects <https://vega.github.io/vega-lite/docs/types.html#datetime>`__.

    3) Constant ``domain`` for *ordinal* and *nominal* fields can be an array that lists
    valid input values.

    4) To combine (union) specified constant domain with the field's values, ``domain``
    can be an object with a ``unionWith`` property that specify constant domain to be
    combined. For example, ``domain: {unionWith: [0, 100]}`` for a quantitative scale
    means that the scale domain always includes ``[0, 100]``, but will include other
    values in the fields beyond ``[0, 100]``.

    5) Domain can also takes an object defining a field or encoding of a parameter that
    `interactively determines
    <https://vega.github.io/vega-lite/docs/selection.html#scale-domains>`__ the scale
    domain.
domainMax : dict, float, :class:`ExprRef`, :class:`DateTime`
    Sets the maximum value in the scale domain, overriding the ``domain`` property. This
    property is only intended for use with scales having continuous domains.
domainMid : dict, float, :class:`ExprRef`
    Inserts a single mid-point value into a two-element domain. The mid-point value must
    lie between the domain minimum and maximum values. This property can be useful for
    setting a midpoint for `diverging color scales
    <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. The domainMid
    property is only intended for use with scales supporting continuous, piecewise
    domains.
domainMin : dict, float, :class:`ExprRef`, :class:`DateTime`
    Sets the minimum value in the scale domain, overriding the domain property. This
    property is only intended for use with scales having continuous domains.
domainRaw : dict, :class:`ExprRef`
    An expression for an array of raw values that, if non-null, directly overrides the
    *domain* property. This is useful for supporting interactions such as panning or
    zooming a scale. The scale may be initially determined using a data-driven domain,
    then modified in response to user input by setting the rawDomain value.
exponent : dict, float, :class:`ExprRef`
    The exponent of the ``pow`` scale.
interpolate : dict, :class:`ExprRef`, :class:`ScaleInterpolateEnum`, :class:`ScaleInterpolateParams`, Literal['rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long']
    The interpolation method for range values. By default, a general interpolator for
    numbers, dates, strings and colors (in HCL space) is used. For color ranges, this
    property allows interpolation in alternative color spaces. Legal values include
    ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and
    ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces).
    If object-valued, this property accepts an object with a string-valued *type*
    property and an optional numeric *gamma* property applicable to rgb and cubehelix
    interpolators. For more, see the `d3-interpolate documentation
    <https://github.com/d3/d3-interpolate>`__.

    * **Default value:** ``hcl``
nice : bool, dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']
    Extending the domain so that it starts and ends on nice round values. This method
    typically modifies the scale's domain, and may only extend the bounds to the nearest
    round value. Nicing is useful if the domain is computed from data and may be
    irregular. For example, for a domain of *[0.201479…, 0.996679…]*, a nice domain
    might be *[0.2, 1.0]*.

    For quantitative scales such as linear, ``nice`` can be either a boolean flag or a
    number. If ``nice`` is a number, it will represent a desired tick count. This allows
    greater control over the step size used to extend the bounds, guaranteeing that the
    returned ticks will exactly cover the domain.

    For temporal fields with time and utc scales, the ``nice`` value can be a string
    indicating the desired time interval. Legal values are ``"millisecond"``,
    ``"second"``, ``"minute"``, ``"hour"``, ``"day"``, ``"week"``, ``"month"``, and
    ``"year"``. Alternatively, ``time`` and ``utc`` scales can accept an object-valued
    interval specifier of the form ``{"interval": "month", "step": 3}``, which includes
    a desired number of interval steps. Here, the domain would snap to quarter (Jan,
    Apr, Jul, Oct) boundaries.

    **Default value:** ``true`` for unbinned *quantitative* fields without explicit
    domain bounds; ``false`` otherwise.
padding : dict, float, :class:`ExprRef`
    For *`continuous <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__*
    scales, expands the scale domain to accommodate the specified number of pixels on
    each of the scale range. The scale range must represent pixels for this parameter to
    function as intended. Padding adjustment is performed prior to all other
    adjustments, including the effects of the ``zero``, ``nice``, ``domainMin``, and
    ``domainMax`` properties.

    For *`band <https://vega.github.io/vega-lite/docs/scale.html#band>`__* scales,
    shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value.

    For *`point <https://vega.github.io/vega-lite/docs/scale.html#point>`__* scales,
    alias for ``paddingOuter``.

    **Default value:** For *continuous* scales, derived from the `scale config
    <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s
    ``continuousPadding``. For *band and point* scales, see ``paddingInner`` and
    ``paddingOuter``. By default, Vega-Lite sets padding such that *width/height =
    number of unique values * step*.
paddingInner : dict, float, :class:`ExprRef`
    The inner padding (spacing) within each band step of band scales, as a fraction of
    the step size. This value must lie in the range [0,1].

    For point scale, this property is invalid as point scales do not have internal band
    widths (only step sizes between bands).

    **Default value:** derived from the `scale config
    <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s ``bandPaddingInner``.
paddingOuter : dict, float, :class:`ExprRef`
    The outer padding (spacing) at the ends of the range of band and point scales, as a
    fraction of the step size. This value must lie in the range [0,1].

    **Default value:** derived from the `scale config
    <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s ``bandPaddingOuter``
    for band scales and ``pointPadding`` for point scales. By default, Vega-Lite sets
    outer padding such that *width/height = number of unique values * step*.
range : dict, :class:`RangeEnum`, :class:`FieldRange`, Sequence[str, dict, float, Sequence[float], :class:`ExprRef`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap']
    The range of the scale. One of:

    * A string indicating a `pre-defined named scale range
      <https://vega.github.io/vega-lite/docs/scale.html#range-config>`__ (e.g., example,
      ``"symbol"``, or ``"diverging"``).

    * For `continuous scales
      <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, two-element
      array indicating  minimum and maximum values, or an array with more than two
      entries for specifying a `piecewise scale
      <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.

    * For `discrete <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ and
      `discretizing <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__
      scales, an array of desired output values or an object with a ``field`` property
      representing the range values.  For example, if a field ``color`` contains CSS
      color names, we can set ``range`` to ``{field: "color"}``.

    **Notes:**

    1) For color scales you can also specify a color `scheme
    <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ instead of ``range``.

    2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored.
    Range can be customized via the view's corresponding `size
    <https://vega.github.io/vega-lite/docs/size.html>`__ (``width`` and ``height``).
rangeMax : str, dict, float, :class:`ExprRef`
    Sets the maximum value in the scale range, overriding the ``range`` property or the
    default range. This property is only intended for use with scales having continuous
    ranges.
rangeMin : str, dict, float, :class:`ExprRef`
    Sets the minimum value in the scale range, overriding the ``range`` property or the
    default range. This property is only intended for use with scales having continuous
    ranges.
reverse : bool, dict, :class:`ExprRef`
    If true, reverses the order of the scale range. **Default value:** ``false``.
round : bool, dict, :class:`ExprRef`
    If ``true``, rounds numeric output values to integers. This can be helpful for
    snapping to the pixel grid.

    **Default value:** ``false``.
scheme : dict, :class:`ExprRef`, :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SchemeParams`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9']
    A string indicating a color `scheme
    <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ name (e.g.,
    ``"category10"`` or ``"blues"``) or a `scheme parameter object
    <https://vega.github.io/vega-lite/docs/scale.html#scheme-params>`__.

    Discrete color schemes may be used with `discrete
    <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ or `discretizing
    <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ scales.
    Continuous color schemes are intended for use with color scales.

    To set a custom scheme, instead set the list of values `as the scale range
    <https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings>`__.

    For the full list of supported schemes, please refer to the `Vega Scheme
    <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
type : :class:`ScaleType`, Literal['linear', 'log', 'pow', 'sqrt', 'symlog', 'identity', 'sequential', 'time', 'utc', 'quantile', 'quantize', 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band']
    The type of scale. Vega-Lite supports the following categories of scale types:

    1) `Continuous Scales
    <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ -- mapping
    continuous domains to continuous output ranges (`"linear"
    <https://vega.github.io/vega-lite/docs/scale.html#linear>`__, `"pow"
    <https://vega.github.io/vega-lite/docs/scale.html#pow>`__, `"sqrt"
    <https://vega.github.io/vega-lite/docs/scale.html#sqrt>`__, `"symlog"
    <https://vega.github.io/vega-lite/docs/scale.html#symlog>`__, `"log"
    <https://vega.github.io/vega-lite/docs/scale.html#log>`__, `"time"
    <https://vega.github.io/vega-lite/docs/scale.html#time>`__, `"utc"
    <https://vega.github.io/vega-lite/docs/scale.html#utc>`__.

    2) `Discrete Scales <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__
    -- mapping discrete domains to discrete (`"ordinal"
    <https://vega.github.io/vega-lite/docs/scale.html#ordinal>`__) or continuous
    (`"band" <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `"point"
    <https://vega.github.io/vega-lite/docs/scale.html#point>`__) output ranges.

    3) `Discretizing Scales
    <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ -- mapping
    continuous domains to discrete output ranges `"bin-ordinal"
    <https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal>`__, `"quantile"
    <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__, `"quantize"
    <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ and `"threshold"
    <https://vega.github.io/vega-lite/docs/scale.html#threshold>`__.

    **Default value:** please see the `scale type table
    <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
zero : bool, dict, :class:`ExprRef`
    If ``true``, ensures that a zero baseline value is included in the scale domain.

    **Default value:** ``true`` for x and y channels if the quantitative field is not
    binned and no custom ``domain`` is provided; ``false`` otherwise.

    **Note:** Log, time, and utc scales do not support ``zero``.

---
## ScaleBins
```python
from core import ScaleBins
```

ScaleBins schema wrapper.

---
## ScaleBinParams
```python
from core import ScaleBinParams
```

ScaleBinParams schema wrapper.

Parameters
----------
step : float
    The step size defining the bin interval width.
start : float
    The starting (lowest-valued) bin boundary.

    **Default value:** The lowest value of the scale domain will be used.
stop : float
    The stopping (highest-valued) bin boundary.

    **Default value:** The highest value of the scale domain will be used.

---
## ScaleConfig
```python
from core import ScaleConfig
```

ScaleConfig schema wrapper.

Parameters
----------
bandPaddingInner : dict, float, :class:`ExprRef`
    Default inner padding for ``x`` and ``y`` band scales.

    **Default value:**

    * ``nestedOffsetPaddingInner`` for x/y scales with nested x/y offset scales.
    * ``barBandPaddingInner`` for bar marks (``0.1`` by default)
    * ``rectBandPaddingInner`` for rect and other marks (``0`` by default)
bandPaddingOuter : dict, float, :class:`ExprRef`
    Default outer padding for ``x`` and ``y`` band scales.

    **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique
    values * step*)
bandWithNestedOffsetPaddingInner : dict, float, :class:`ExprRef`
    Default inner padding for ``x`` and ``y`` band scales with nested ``xOffset`` and
    ``yOffset`` encoding.

    **Default value:** ``0.2``
bandWithNestedOffsetPaddingOuter : dict, float, :class:`ExprRef`
    Default outer padding for ``x`` and ``y`` band scales with nested ``xOffset`` and
    ``yOffset`` encoding.

    **Default value:** ``0.2``
barBandPaddingInner : dict, float, :class:`ExprRef`
    Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"bar"`` marks.

    **Default value:** ``0.1``
clamp : bool, dict, :class:`ExprRef`
    If true, values that exceed the data domain are clamped to either the minimum or
    maximum range value
continuousPadding : dict, float, :class:`ExprRef`
    Default padding for continuous x/y scales.

    **Default:** The bar width for continuous x-scale of a vertical bar and continuous
    y-scale of a horizontal bar.; ``0`` otherwise.
invalid : dict, :class:`ScaleInvalidDataConfig`
    An object that defines scale outputs per channel for invalid values (nulls and NaNs
    on a continuous scale).

    * The keys in this object are the scale channels.
    * The values is either ``"zero-or-min"`` (use zero if the scale includes zero or min
      value otherwise) or a value definition ``{value: ...}``.

    *Example:* Setting this ``config.scale.invalid`` property to ``{color: {value:
    '#aaa'}}`` will make the visualization color all invalid values with '#aaa'.

    See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for
    more details.
maxBandSize : float
    The default max value for mapping quantitative fields to bar's size/bandSize.

    If undefined (default), we will use the axis's size (width or height) - 1.
maxFontSize : float
    The default max value for mapping quantitative fields to text's size/fontSize scale.

    **Default value:** ``40``
maxOpacity : float
    Default max opacity for mapping a field to opacity.

    **Default value:** ``0.8``
maxSize : float
    Default max value for point size scale.
maxStrokeWidth : float
    Default max strokeWidth for the scale of strokeWidth for rule and line marks and of
    size for trail marks.

    **Default value:** ``4``
minBandSize : float
    The default min value for mapping quantitative fields to bar and tick's
    size/bandSize scale.

    **Default value:** ``2``
minFontSize : float
    The default min value for mapping quantitative fields to text's size/fontSize scale.

    **Default value:** ``8``
minOpacity : float
    Default minimum opacity for mapping a field to opacity.

    **Default value:** ``0.3``
minSize : float
    Default minimum value for point size scale.

    **Default value:** ``9``
minStrokeWidth : float
    Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and
    of size for trail marks.

    **Default value:** ``1``
offsetBandPaddingInner : dict, float, :class:`ExprRef`
    Default padding inner for xOffset/yOffset's band scales.

    **Default Value:** ``0``
offsetBandPaddingOuter : dict, float, :class:`ExprRef`
    Default padding outer for xOffset/yOffset's band scales.

    **Default Value:** ``0``
pointPadding : dict, float, :class:`ExprRef`
    Default outer padding for ``x`` and ``y`` point-ordinal scales.

    **Default value:** ``0.5`` (which makes *width/height = number of unique values *
    step*)
quantileCount : float
    Default range cardinality for `quantile
    <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale.

    **Default value:** ``4``
quantizeCount : float
    Default range cardinality for `quantize
    <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale.

    **Default value:** ``4``
rectBandPaddingInner : dict, float, :class:`ExprRef`
    Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"rect"`` marks.

    **Default value:** ``0``
round : bool, dict, :class:`ExprRef`
    If true, rounds numeric output values to integers. This can be helpful for snapping
    to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.)
tickBandPaddingInner : dict, float, :class:`ExprRef`
    Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"tick"`` marks.

    **Default value:** ``0.25``
useUnaggregatedDomain : bool
    Use the source data range before aggregation as scale domain instead of aggregated
    data for aggregate axis.

    This is equivalent to setting ``domain`` to ``"unaggregate"`` for aggregated
    *quantitative* fields by default.

    This property only works with aggregate functions that produce values within the raw
    data domain (``"mean"``, ``"average"``, ``"median"``, ``"q1"``, ``"q3"``, ``"min"``,
    ``"max"``). For other aggregations that produce values outside of the raw data
    domain (e.g. ``"count"``, ``"sum"``), this property is ignored.

    **Default value:** ``false``
xReverse : bool, dict, :class:`ExprRef`
    Reverse x-scale by default (useful for right-to-left charts).
zero : bool
    Default ``scale.zero`` for `continuous
    <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ scales except for
    (1) x/y-scales of non-ranged bar or area charts and (2) size scales.

    **Default value:** ``true``

---
## ScaleDatumDef
```python
from core import ScaleDatumDef
```

ScaleDatumDef schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ScaleFieldDef
```python
from core import ScaleFieldDef
```

ScaleFieldDef schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ScaleInterpolateEnum
```python
from core import ScaleInterpolateEnum
```

ScaleInterpolateEnum schema wrapper.

---
## ScaleInterpolateParams
```python
from core import ScaleInterpolateParams
```

ScaleInterpolateParams schema wrapper.

Parameters
----------
type : Literal['rgb', 'cubehelix', 'cubehelix-long']

gamma : float

---
## ScaleInvalidDataConfig
```python
from core import ScaleInvalidDataConfig
```

ScaleInvalidDataConfig schema wrapper.

Parameters
----------
angle : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsangle`, :class:`ScaleInvalidDataShowAsValueangle`

color : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAscolor`, :class:`ScaleInvalidDataShowAsValuecolor`

fill : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfill`, :class:`ScaleInvalidDataShowAsValuefill`

fillOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfillOpacity`, :class:`ScaleInvalidDataShowAsValuefillOpacity`

opacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsopacity`, :class:`ScaleInvalidDataShowAsValueopacity`

radius : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsradius`, :class:`ScaleInvalidDataShowAsValueradius`

shape : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsshape`, :class:`ScaleInvalidDataShowAsValueshape`

size : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAssize`, :class:`ScaleInvalidDataShowAsValuesize`

stroke : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstroke`, :class:`ScaleInvalidDataShowAsValuestroke`

strokeDash : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeDash`, :class:`ScaleInvalidDataShowAsValuestrokeDash`

strokeOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeOpacity`, :class:`ScaleInvalidDataShowAsValuestrokeOpacity`

strokeWidth : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeWidth`, :class:`ScaleInvalidDataShowAsValuestrokeWidth`

theta : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAstheta`, :class:`ScaleInvalidDataShowAsValuetheta`

x : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsx`, :class:`ScaleInvalidDataShowAsValuex`

xOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsxOffset`, :class:`ScaleInvalidDataShowAsValuexOffset`

y : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsy`, :class:`ScaleInvalidDataShowAsValuey`

yOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsyOffset`, :class:`ScaleInvalidDataShowAsValueyOffset`

---
## ScaleInvalidDataShowAsangle
```python
from core import ScaleInvalidDataShowAsangle
```

ScaleInvalidDataShowAsangle schema wrapper.

---
## ScaleInvalidDataShowAsValueangle
```python
from core import ScaleInvalidDataShowAsValueangle
```

ScaleInvalidDataShowAsValueangle schema wrapper.

Parameters
----------
value : float
    The rotation angle of the text, in degrees.

---
## ScaleInvalidDataShowAscolor
```python
from core import ScaleInvalidDataShowAscolor
```

ScaleInvalidDataShowAscolor schema wrapper.

---
## ScaleInvalidDataShowAsValuecolor
```python
from core import ScaleInvalidDataShowAsValuecolor
```

ScaleInvalidDataShowAsValuecolor schema wrapper.

Parameters
----------
value : str, dict, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.

---
## ScaleInvalidDataShowAsfill
```python
from core import ScaleInvalidDataShowAsfill
```

ScaleInvalidDataShowAsfill schema wrapper.

---
## ScaleInvalidDataShowAsValuefill
```python
from core import ScaleInvalidDataShowAsValuefill
```

ScaleInvalidDataShowAsValuefill schema wrapper.

Parameters
----------
value : str, dict, None, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)

---
## ScaleInvalidDataShowAsfillOpacity
```python
from core import ScaleInvalidDataShowAsfillOpacity
```

ScaleInvalidDataShowAsfillOpacity schema wrapper.

---
## ScaleInvalidDataShowAsValuefillOpacity
```python
from core import ScaleInvalidDataShowAsValuefillOpacity
```

ScaleInvalidDataShowAsValuefillOpacity schema wrapper.

Parameters
----------
value : float
    The fill opacity (value between [0,1]).

    **Default value:** ``1``

---
## ScaleInvalidDataShowAsopacity
```python
from core import ScaleInvalidDataShowAsopacity
```

ScaleInvalidDataShowAsopacity schema wrapper.

---
## ScaleInvalidDataShowAsValueopacity
```python
from core import ScaleInvalidDataShowAsValueopacity
```

ScaleInvalidDataShowAsValueopacity schema wrapper.

Parameters
----------
value : float
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.

---
## ScaleInvalidDataShowAsradius
```python
from core import ScaleInvalidDataShowAsradius
```

ScaleInvalidDataShowAsradius schema wrapper.

---
## ScaleInvalidDataShowAsValueradius
```python
from core import ScaleInvalidDataShowAsValueradius
```

ScaleInvalidDataShowAsValueradius schema wrapper.

Parameters
----------
value : float
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``

---
## ScaleInvalidDataShowAsshape
```python
from core import ScaleInvalidDataShowAsshape
```

ScaleInvalidDataShowAsshape schema wrapper.

---
## ScaleInvalidDataShowAsValueshape
```python
from core import ScaleInvalidDataShowAsValueshape
```

ScaleInvalidDataShowAsValueshape schema wrapper.

Parameters
----------
value : str, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``

---
## ScaleInvalidDataShowAssize
```python
from core import ScaleInvalidDataShowAssize
```

ScaleInvalidDataShowAssize schema wrapper.

---
## ScaleInvalidDataShowAsValuesize
```python
from core import ScaleInvalidDataShowAsValuesize
```

ScaleInvalidDataShowAsValuesize schema wrapper.

Parameters
----------
value : float
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.

---
## ScaleInvalidDataShowAsstroke
```python
from core import ScaleInvalidDataShowAsstroke
```

ScaleInvalidDataShowAsstroke schema wrapper.

---
## ScaleInvalidDataShowAsValuestroke
```python
from core import ScaleInvalidDataShowAsValuestroke
```

ScaleInvalidDataShowAsValuestroke schema wrapper.

Parameters
----------
value : str, dict, None, :class:`Color`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)

---
## ScaleInvalidDataShowAsstrokeDash
```python
from core import ScaleInvalidDataShowAsstrokeDash
```

ScaleInvalidDataShowAsstrokeDash schema wrapper.

---
## ScaleInvalidDataShowAsValuestrokeDash
```python
from core import ScaleInvalidDataShowAsValuestrokeDash
```

ScaleInvalidDataShowAsValuestrokeDash schema wrapper.

Parameters
----------
value : Sequence[float]
    An array of alternating stroke, space lengths for creating dashed or dotted lines.

---
## ScaleInvalidDataShowAsstrokeOpacity
```python
from core import ScaleInvalidDataShowAsstrokeOpacity
```

ScaleInvalidDataShowAsstrokeOpacity schema wrapper.

---
## ScaleInvalidDataShowAsValuestrokeOpacity
```python
from core import ScaleInvalidDataShowAsValuestrokeOpacity
```

ScaleInvalidDataShowAsValuestrokeOpacity schema wrapper.

Parameters
----------
value : float
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``

---
## ScaleInvalidDataShowAsstrokeWidth
```python
from core import ScaleInvalidDataShowAsstrokeWidth
```

ScaleInvalidDataShowAsstrokeWidth schema wrapper.

---
## ScaleInvalidDataShowAsValuestrokeWidth
```python
from core import ScaleInvalidDataShowAsValuestrokeWidth
```

ScaleInvalidDataShowAsValuestrokeWidth schema wrapper.

Parameters
----------
value : float
    The stroke width, in pixels.

---
## ScaleInvalidDataShowAstheta
```python
from core import ScaleInvalidDataShowAstheta
```

ScaleInvalidDataShowAstheta schema wrapper.

---
## ScaleInvalidDataShowAsValuetheta
```python
from core import ScaleInvalidDataShowAsValuetheta
```

ScaleInvalidDataShowAsValuetheta schema wrapper.

Parameters
----------
value : float
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.

---
## ScaleInvalidDataShowAsx
```python
from core import ScaleInvalidDataShowAsx
```

ScaleInvalidDataShowAsx schema wrapper.

---
## ScaleInvalidDataShowAsValuex
```python
from core import ScaleInvalidDataShowAsValuex
```

ScaleInvalidDataShowAsValuex schema wrapper.

Parameters
----------
value : float, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.

---
## ScaleInvalidDataShowAsxOffset
```python
from core import ScaleInvalidDataShowAsxOffset
```

ScaleInvalidDataShowAsxOffset schema wrapper.

---
## ScaleInvalidDataShowAsValuexOffset
```python
from core import ScaleInvalidDataShowAsValuexOffset
```

ScaleInvalidDataShowAsValuexOffset schema wrapper.

Parameters
----------
value : float
    Offset for x-position.

---
## ScaleInvalidDataShowAsy
```python
from core import ScaleInvalidDataShowAsy
```

ScaleInvalidDataShowAsy schema wrapper.

---
## ScaleInvalidDataShowAsValuey
```python
from core import ScaleInvalidDataShowAsValuey
```

ScaleInvalidDataShowAsValuey schema wrapper.

Parameters
----------
value : float, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## ScaleInvalidDataShowAsyOffset
```python
from core import ScaleInvalidDataShowAsyOffset
```

ScaleInvalidDataShowAsyOffset schema wrapper.

---
## ScaleInvalidDataShowAsValueyOffset
```python
from core import ScaleInvalidDataShowAsValueyOffset
```

ScaleInvalidDataShowAsValueyOffset schema wrapper.

Parameters
----------
value : float
    Offset for y-position.

---
## ScaleResolveMap
```python
from core import ScaleResolveMap
```

ScaleResolveMap schema wrapper.

Parameters
----------
angle : :class:`ResolveMode`, Literal['independent', 'shared']

color : :class:`ResolveMode`, Literal['independent', 'shared']

fill : :class:`ResolveMode`, Literal['independent', 'shared']

fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared']

opacity : :class:`ResolveMode`, Literal['independent', 'shared']

radius : :class:`ResolveMode`, Literal['independent', 'shared']

shape : :class:`ResolveMode`, Literal['independent', 'shared']

size : :class:`ResolveMode`, Literal['independent', 'shared']

stroke : :class:`ResolveMode`, Literal['independent', 'shared']

strokeDash : :class:`ResolveMode`, Literal['independent', 'shared']

strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared']

strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared']

theta : :class:`ResolveMode`, Literal['independent', 'shared']

x : :class:`ResolveMode`, Literal['independent', 'shared']

xOffset : :class:`ResolveMode`, Literal['independent', 'shared']

y : :class:`ResolveMode`, Literal['independent', 'shared']

yOffset : :class:`ResolveMode`, Literal['independent', 'shared']

---
## ScaleType
```python
from core import ScaleType
```

ScaleType schema wrapper.

---
## SchemeParams
```python
from core import SchemeParams
```

SchemeParams schema wrapper.

Parameters
----------
name : :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9']
    A color scheme name for ordinal scales (e.g., ``"category10"`` or ``"blues"``).

    For the full list of supported schemes, please refer to the `Vega Scheme
    <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.
count : float
    The number of colors to use in the scheme. This can be useful for scale types such
    as ``"quantize"``, which use the length of the scale range to determine the number
    of discrete bins for the scale domain.
extent : Sequence[float]
    The extent of the color range to use. For example ``[0.2, 1]`` will rescale the
    color scheme such that color values in the range *[0, 0.2)* are excluded from the
    scheme.

---
## SecondaryFieldDef
```python
from core import SecondaryFieldDef
```

SecondaryFieldDef schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## SelectionConfig
```python
from core import SelectionConfig
```

SelectionConfig schema wrapper.

Parameters
----------
interval : dict, :class:`IntervalSelectionConfigWithoutType`
    The default definition for an `interval
    <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All
    properties and transformations for an interval selection definition (except
    ``type``) may be specified here.

    For instance, setting ``interval`` to ``{"translate": false}`` disables the ability
    to move interval selections by default.
point : dict, :class:`PointSelectionConfigWithoutType`
    The default definition for a `point
    <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All
    properties and transformations  for a point selection definition (except ``type``)
    may be specified here.

    For instance, setting ``point`` to ``{"on": "dblclick"}`` populates point selections
    on double-click by default.

---
## SelectionInit
```python
from core import SelectionInit
```

SelectionInit schema wrapper.

---
## DateTime
```python
from core import DateTime
```

DateTime schema wrapper.

Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,
month has higher precedence. ``day`` cannot be combined with other date. We accept string
for month and day names.

Parameters
----------
date : float
    Integer value representing the date (day of the month) from 1-31.
day : str, float, :class:`Day`
    Value representing the day of a week. This can be one of: (1) integer value -- ``1``
    represents Monday; (2) case-insensitive day name (e.g., ``"Monday"``); (3)
    case-insensitive, 3-character short day name (e.g., ``"Mon"``).

    **Warning:** A DateTime definition object with ``day``** should not be combined with
    ``year``, ``quarter``, ``month``, or ``date``.
hours : float
    Integer value representing the hour of a day from 0-23.
milliseconds : float
    Integer value representing the millisecond segment of time.
minutes : float
    Integer value representing the minute segment of time from 0-59.
month : str, float, :class:`Month`
    One of: (1) integer value representing the month from ``1``-``12``. ``1`` represents
    January; (2) case-insensitive month name (e.g., ``"January"``); (3)
    case-insensitive, 3-character short month name (e.g., ``"Jan"``).
quarter : float
    Integer value representing the quarter of the year (from 1-4).
seconds : float
    Integer value representing the second segment (0-59) of a time value
utc : bool
    A boolean flag indicating if date time is in utc time. If false, the date time is in
    local time
year : float
    Integer value representing the year.

---
## PrimitiveValue
```python
from core import PrimitiveValue
```

PrimitiveValue schema wrapper.

---
## SelectionInitInterval
```python
from core import SelectionInitInterval
```

SelectionInitInterval schema wrapper.

---
## SelectionInitIntervalMapping
```python
from core import SelectionInitIntervalMapping
```

SelectionInitIntervalMapping schema wrapper.

---
## SelectionInitMapping
```python
from core import SelectionInitMapping
```

SelectionInitMapping schema wrapper.

---
## SelectionParameter
```python
from core import SelectionParameter
```

SelectionParameter schema wrapper.

Parameters
----------
name : str, :class:`ParameterName`
    Required. A unique name for the selection parameter. Selection names should be valid
    JavaScript identifiers: they should contain only alphanumeric characters (or "$", or
    "_") and may not start with a digit. Reserved keywords that may not be used as
    parameter names are "datum", "event", "item", and "parent".
select : dict, :class:`SelectionType`, Literal['point', 'interval'], :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig`
    Determines the default event processing and data query for the selection. Vega-Lite
    currently supports two selection types:

    * ``"point"`` -- to select multiple discrete data values; the first value is
      selected on ``click`` and additional values toggled on shift-click.
    * ``"interval"`` -- to select a continuous range of data values on ``drag``.
bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding`
    When set, a selection is populated by input elements (also known as dynamic query
    widgets) or by interacting with the corresponding legend. Direct manipulation
    interaction is disabled by default; to re-enable it, set the selection's `on
    <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
    property.

    Legend bindings are restricted to selections that only specify a single field or
    encoding.

    Query widget binding takes the form of Vega's `input element binding definition
    <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between
    projected field/encodings and binding definitions.

    **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
    documentation.
value : str, bool, dict, None, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`]
    Initialize the selection with a mapping between `projected channels or field names
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ and initial
    values.

    **See also:** `init <https://vega.github.io/vega-lite/docs/value.html>`__
    documentation.

---
## SelectionResolution
```python
from core import SelectionResolution
```

SelectionResolution schema wrapper.

---
## SelectionType
```python
from core import SelectionType
```

SelectionType schema wrapper.

---
## SequenceGenerator
```python
from core import SequenceGenerator
```

SequenceGenerator schema wrapper.

Parameters
----------
sequence : dict, :class:`SequenceParams`
    Generate a sequence of numbers.
name : str
    Provide a placeholder name and bind data at runtime.

---
## SequenceParams
```python
from core import SequenceParams
```

SequenceParams schema wrapper.

Parameters
----------
start : float
    The starting value of the sequence (inclusive).
stop : float
    The ending value of the sequence (exclusive).
step : float
    The step value between sequence entries.

    **Default value:** ``1``
as : str, :class:`FieldName`
    The name of the generated sequence field.

    **Default value:** ``"data"``

---
## SequentialMultiHue
```python
from core import SequentialMultiHue
```

SequentialMultiHue schema wrapper.

---
## SequentialSingleHue
```python
from core import SequentialSingleHue
```

SequentialSingleHue schema wrapper.

---
## ShapeDef
```python
from core import ShapeDef
```

ShapeDef schema wrapper.

---
## FieldOrDatumDefWithConditionDatumDefstringnull
```python
from core import FieldOrDatumDefWithConditionDatumDefstringnull
```

FieldOrDatumDefWithConditionDatumDefstringnull schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull
```python
from core import FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull
```

FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## SharedEncoding
```python
from core import SharedEncoding
```

SharedEncoding schema wrapper.

Parameters
----------
angle : dict

color : dict

description : dict

detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]
    Additional levels of detail for grouping data in aggregate views and in line, trail,
    and area marks without mapping data to a specific visual channel.
fill : dict

fillOpacity : dict

href : dict

key : dict

latitude : dict

latitude2 : dict

longitude : dict

longitude2 : dict

opacity : dict

order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]
    Order of the marks.

    * For stacked marks, this ``order`` channel encodes `stack order
      <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
    * For line and trail marks, this ``order`` channel encodes order of data points in
      the lines. This can be useful for creating `a connected scatterplot
      <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
      ``order`` to ``{"value": null}`` makes the line marks use the original order in
      the data sources.
    * Otherwise, this ``order`` channel encodes layer order of the marks.

    **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid
    creating additional aggregation grouping.
radius : dict

radius2 : dict

shape : dict

size : dict

stroke : dict

strokeDash : dict

strokeOpacity : dict

strokeWidth : dict

text : dict

theta : dict

theta2 : dict

tooltip : dict, None, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`]
    The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
    `the tooltip property in the mark definition
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip in Vega-Lite.
url : dict

x : dict

x2 : dict

xError : dict

xError2 : dict

xOffset : dict

y : dict

y2 : dict

yError : dict

yError2 : dict

yOffset : dict

---
## SingleDefUnitChannel
```python
from core import SingleDefUnitChannel
```

SingleDefUnitChannel schema wrapper.

---
## Sort
```python
from core import Sort
```

Sort schema wrapper.

---
## AllSortString
```python
from core import AllSortString
```

AllSortString schema wrapper.

---
## EncodingSortField
```python
from core import EncodingSortField
```

EncodingSortField schema wrapper.

A sort definition for sorting a discrete scale in an encoding field definition.

Parameters
----------
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by.

    **Default value:** If unspecified, defaults to the field specified in the outer data
    reference.
op : :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    An `aggregate operation
    <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the
    field prior to sorting (e.g., ``"count"``, ``"mean"`` and ``"median"``). An
    aggregation is required when there are multiple values of the sort field for each
    encoded data field. The input data objects will be aggregated, grouped by the
    encoded data field.

    For a full list of operations, please see the documentation for `aggregate
    <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.

    **Default value:** ``"sum"`` for stacked plots. Otherwise, ``"min"``.
order : None, :class:`SortOrder`, Literal['ascending', 'descending']
    The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
    not sort).

---
## SortArray
```python
from core import SortArray
```

SortArray schema wrapper.

---
## SortByChannel
```python
from core import SortByChannel
```

SortByChannel schema wrapper.

---
## SortByChannelDesc
```python
from core import SortByChannelDesc
```

SortByChannelDesc schema wrapper.

---
## SortByEncoding
```python
from core import SortByEncoding
```

SortByEncoding schema wrapper.

Parameters
----------
encoding : :class:`SortByChannel`, Literal['x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    The `encoding channel
    <https://vega.github.io/vega-lite/docs/encoding.html#channels>`__ to sort by (e.g.,
    ``"x"``, ``"y"``)
order : None, :class:`SortOrder`, Literal['ascending', 'descending']
    The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no
    not sort).

---
## SortField
```python
from core import SortField
```

SortField schema wrapper.

A sort definition for transform

Parameters
----------
field : str, :class:`FieldName`
    The name of the field to sort.
order : None, :class:`SortOrder`, Literal['ascending', 'descending']
    Whether to sort the field in ascending or descending order. One of ``"ascending"``
    (default), ``"descending"``, or ``null`` (no not sort).

---
## SortOrder
```python
from core import SortOrder
```

SortOrder schema wrapper.

---
## Spec
```python
from core import Spec
```

Spec schema wrapper.

Any specification in Vega-Lite.

---
## ConcatSpecGenericSpec
```python
from core import ConcatSpecGenericSpec
```

ConcatSpecGenericSpec schema wrapper.

Base interface for a generalized concatenation specification.

Parameters
----------
concat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## FacetSpec
```python
from core import FacetSpec
```

FacetSpec schema wrapper.

Base interface for a facet specification.

Parameters
----------
facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef`
    Definition for how to facet the data. One of: 1) `a field definition for faceting
    the plot by one field
    <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that
    maps row and column channels to their field definitions
    <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
spec : dict, :class:`LayerSpec`, :class:`FacetedUnitSpec`
    A specification of the view that gets faceted.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## FacetedUnitSpec
```python
from core import FacetedUnitSpec
```

FacetedUnitSpec schema wrapper.

Unit spec that can have a composite mark and row or column channels (shorthand for a facet
spec).

Parameters
----------
mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']
    A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
    ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
    ``"text"``) or a `mark definition object
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`FacetedEncoding`
    A key-value mapping between encoding channels and definition of fields.
height : dict, float, :class:`Step`, Literal['container']
    The height of a visualization.

    * For a plot with a continuous y-field, height should be a number.
    * For a plot with either a discrete y-field or no y-field, height can be either a
      number indicating a fixed height or an object in the form of ``{step: number}``
      defining the height per discrete step. (No y-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on height, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
    continuous y-field and ``config.view.discreteHeight`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    height of a single view and the ``"container"`` option cannot be used.

    **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
name : str
    Name of the visualization for later reference.
params : Sequence[dict, :class:`SelectionParameter`]
    An array of parameters that may either be simple variables, or more complex
    selections that map user input to data queries.
projection : dict, :class:`Projection`
    An object defining properties of geographic projection, which will be applied to
    ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
    channels for other marks.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
view : dict, :class:`ViewBackground`
    An object defining the view background's fill and stroke.

    **Default value:** none (transparent)
width : dict, float, :class:`Step`, Literal['container']
    The width of a visualization.

    * For a plot with a continuous x-field, width should be a number.
    * For a plot with either a discrete x-field or no x-field, width can be either a
      number indicating a fixed width or an object in the form of ``{step: number}``
      defining the width per discrete step. (No x-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on width, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
    continuous x-field and ``config.view.discreteWidth`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    width of a single view and the ``"container"`` option cannot be used.

    **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.

---
## HConcatSpecGenericSpec
```python
from core import HConcatSpecGenericSpec
```

HConcatSpecGenericSpec schema wrapper.

Base interface for a horizontal concatenation specification.

Parameters
----------
hconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated and put into a row.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    **Default value:** ``false``
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : float
    The spacing in pixels between sub-views of the concat operator.

    **Default value**: ``10``
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## LayerSpec
```python
from core import LayerSpec
```

LayerSpec schema wrapper.

A full layered plot specification, which may contains ``encoding`` and ``projection``
properties that will be applied to underlying unit (single-view) specifications.

Parameters
----------
layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`]
    Layer or single view specifications to be layered.

    **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels
    as layering facet specifications is not allowed. Instead, use the `facet operator
    <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer inside a
    facet.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`SharedEncoding`
    A shared key-value mapping between encoding channels and definition of fields in the
    underlying layers.
height : dict, float, :class:`Step`, Literal['container']
    The height of a visualization.

    * For a plot with a continuous y-field, height should be a number.
    * For a plot with either a discrete y-field or no y-field, height can be either a
      number indicating a fixed height or an object in the form of ``{step: number}``
      defining the height per discrete step. (No y-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on height, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
    continuous y-field and ``config.view.discreteHeight`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    height of a single view and the ``"container"`` option cannot be used.

    **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
name : str
    Name of the visualization for later reference.
projection : dict, :class:`Projection`
    An object defining properties of the geographic projection shared by underlying
    layers.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
view : dict, :class:`ViewBackground`
    An object defining the view background's fill and stroke.

    **Default value:** none (transparent)
width : dict, float, :class:`Step`, Literal['container']
    The width of a visualization.

    * For a plot with a continuous x-field, width should be a number.
    * For a plot with either a discrete x-field or no x-field, width can be either a
      number indicating a fixed width or an object in the form of ``{step: number}``
      defining the width per discrete step. (No x-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on width, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
    continuous x-field and ``config.view.discreteWidth`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    width of a single view and the ``"container"`` option cannot be used.

    **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.

---
## RepeatSpec
```python
from core import RepeatSpec
```

RepeatSpec schema wrapper.

---
## LayerRepeatSpec
```python
from core import LayerRepeatSpec
```

LayerRepeatSpec schema wrapper.

Parameters
----------
repeat : dict, :class:`LayerRepeatMapping`
    Definition for fields to be repeated. One of: 1) An array of fields to be repeated.
    If ``"repeat"`` is an array, the field can be referred to as ``{"repeat":
    "repeat"}``. The repeated views are laid out in a wrapped row. You can set the
    number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or
    ``"column"`` to the listed fields to be repeated along the particular orientations.
    The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer
    to the repeated field respectively.
spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame`
    A specification of the view that gets repeated.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## NonLayerRepeatSpec
```python
from core import NonLayerRepeatSpec
```

NonLayerRepeatSpec schema wrapper.

Base interface for a repeat specification.

Parameters
----------
repeat : dict, Sequence[str], :class:`RepeatMapping`
    Definition for fields to be repeated. One of: 1) An array of fields to be repeated.
    If ``"repeat"`` is an array, the field can be referred to as ``{"repeat":
    "repeat"}``. The repeated views are laid out in a wrapped row. You can set the
    number of columns to control the wrapping. 2) An object that maps ``"row"`` and/or
    ``"column"`` to the listed fields to be repeated along the particular orientations.
    The objects ``{"repeat": "row"}`` and ``{"repeat": "column"}`` can be used to refer
    to the repeated field respectively.
spec : dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`
    A specification of the view that gets repeated.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## SphereGenerator
```python
from core import SphereGenerator
```

SphereGenerator schema wrapper.

Parameters
----------
sphere : dict, Literal[True]
    Generate sphere GeoJSON data for the full globe.
name : str
    Provide a placeholder name and bind data at runtime.

---
## StackOffset
```python
from core import StackOffset
```

StackOffset schema wrapper.

---
## StandardType
```python
from core import StandardType
```

StandardType schema wrapper.

---
## Step
```python
from core import Step
```

Step schema wrapper.

Parameters
----------
step : float
    The size (width/height) per discrete step.
for : :class:`StepFor`, Literal['position', 'offset']
    Whether to apply the step to position scale or offset scale when there are both
    ``x`` and ``xOffset`` or both ``y`` and ``yOffset`` encodings.

---
## StepFor
```python
from core import StepFor
```

StepFor schema wrapper.

---
## Stream
```python
from core import Stream
```

Stream schema wrapper.

---
## DerivedStream
```python
from core import DerivedStream
```

DerivedStream schema wrapper.

Parameters
----------
stream : dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`

between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]

consume : bool

debounce : float

filter : str, :class:`Expr`, Sequence[str, :class:`Expr`]

markname : str

marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail']

throttle : float

---
## EventStream
```python
from core import EventStream
```

EventStream schema wrapper.

---
## MergedStream
```python
from core import MergedStream
```

MergedStream schema wrapper.

Parameters
----------
merge : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]

between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]

consume : bool

debounce : float

filter : str, :class:`Expr`, Sequence[str, :class:`Expr`]

markname : str

marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail']

throttle : float

---
## StringFieldDef
```python
from core import StringFieldDef
```

StringFieldDef schema wrapper.

Parameters
----------
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StringFieldDefWithCondition
```python
from core import StringFieldDefWithCondition
```

StringFieldDefWithCondition schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StringValueDefWithCondition
```python
from core import StringValueDefWithCondition
```

StringValueDefWithCondition schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## StrokeCap
```python
from core import StrokeCap
```

StrokeCap schema wrapper.

---
## StrokeJoin
```python
from core import StrokeJoin
```

StrokeJoin schema wrapper.

---
## StyleConfigIndex
```python
from core import StyleConfigIndex
```

StyleConfigIndex schema wrapper.

Parameters
----------
arc : dict, :class:`RectConfig`
    Arc-specific Config
area : dict, :class:`AreaConfig`
    Area-Specific Config
bar : dict, :class:`BarConfig`
    Bar-Specific Config
circle : dict, :class:`MarkConfig`
    Circle-Specific Config
geoshape : dict, :class:`MarkConfig`
    Geoshape-Specific Config
image : dict, :class:`RectConfig`
    Image-specific Config
line : dict, :class:`LineConfig`
    Line-Specific Config
mark : dict, :class:`MarkConfig`
    Mark Config
point : dict, :class:`MarkConfig`
    Point-Specific Config
rect : dict, :class:`RectConfig`
    Rect-Specific Config
rule : dict, :class:`MarkConfig`
    Rule-Specific Config
square : dict, :class:`MarkConfig`
    Square-Specific Config
text : dict, :class:`MarkConfig`
    Text-Specific Config
tick : dict, :class:`TickConfig`
    Tick-Specific Config
trail : dict, :class:`LineConfig`
    Trail-Specific Config
group-subtitle : dict, :class:`MarkConfig`
    Default style for chart subtitles
group-title : dict, :class:`MarkConfig`
    Default style for chart titles
guide-label : dict, :class:`MarkConfig`
    Default style for axis, legend, and header labels.
guide-title : dict, :class:`MarkConfig`
    Default style for axis, legend, and header titles.

---
## SymbolShape
```python
from core import SymbolShape
```

SymbolShape schema wrapper.

---
## Text
```python
from core import Text
```

Text schema wrapper.

---
## TextBaseline
```python
from core import TextBaseline
```

TextBaseline schema wrapper.

---
## Baseline
```python
from core import Baseline
```

Baseline schema wrapper.

---
## TextDef
```python
from core import TextDef
```

TextDef schema wrapper.

---
## FieldOrDatumDefWithConditionStringDatumDefText
```python
from core import FieldOrDatumDefWithConditionStringDatumDefText
```

FieldOrDatumDefWithConditionStringDatumDefText schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FieldOrDatumDefWithConditionStringFieldDefText
```python
from core import FieldOrDatumDefWithConditionStringFieldDefText
```

FieldOrDatumDefWithConditionStringFieldDefText schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## TextDirection
```python
from core import TextDirection
```

TextDirection schema wrapper.

---
## TickConfig
```python
from core import TickConfig
```

TickConfig schema wrapper.

Parameters
----------
align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']
    The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).
    One of ``"left"``, ``"right"``, ``"center"``.

    **Note:** Expression reference is *not* supported for range marks.
angle : dict, float, :class:`ExprRef`
    The rotation angle of the text, in degrees.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG element, removing the mark item from the ARIA accessibility tree.
ariaRole : str, dict, :class:`ExprRef`
    Sets the type of user interface element of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "role" attribute. Warning: this
    property is experimental and may be changed in the future.
ariaRoleDescription : str, dict, :class:`ExprRef`
    A human-readable, author-localized description for the role of the mark item for
    `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the "aria-roledescription" attribute.
    Warning: this property is experimental and may be changed in the future.
aspect : bool, dict, :class:`ExprRef`
    Whether to keep aspect ratio of image marks.
bandSize : float
    The width of the ticks.

    **Default value:**  3/4 of step (width step for horizontal ticks and height step for
    vertical ticks).
baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    For text marks, the vertical text baseline. One of ``"alphabetic"`` (default),
    ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, ``"line-bottom"``, or an
    expression reference that provides one of the valid values. The ``"line-top"`` and
    ``"line-bottom"`` values operate similarly to ``"top"`` and ``"bottom"``, but are
    calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.

    For range marks, the vertical alignment of the marks. One of ``"top"``,
    ``"middle"``, ``"bottom"``.

    **Note:** Expression reference is *not* supported for range marks.
blend : dict, :class:`Blend`, :class:`ExprRef`, Literal[None, 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity']
    The color blend mode for drawing an item on its current background. Any valid `CSS
    mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
    value can be used.

    __Default value:__ ``"source-over"``
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default color.

    **Default value:**  :raw-html:`<span style="color: #4682b4;">` ■ :raw-html:`</span>`
    ``"#4682b4"``

    **Note:**

    * This property cannot be used in a `style config
      <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
    * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and
      will override ``color``.
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cornerRadiusBottomLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom left corner.

    **Default value:** ``0``
cornerRadiusBottomRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' bottom right corner.

    **Default value:** ``0``
cornerRadiusTopLeft : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top right corner.

    **Default value:** ``0``
cornerRadiusTopRight : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles' top left corner.

    **Default value:** ``0``
cursor : dict, :class:`Cursor`, :class:`ExprRef`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the mark. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
description : str, dict, :class:`ExprRef`
    A text description of the mark item for `ARIA accessibility
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output
    only). If specified, this property determines the `"aria-label" attribute
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.
dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']
    The direction of the text. One of ``"ltr"`` (left-to-right) or ``"rtl"``
    (right-to-left). This property determines on which side is truncated in response to
    the limit parameter.

    **Default value:** ``"ltr"``
dx : dict, float, :class:`ExprRef`
    The horizontal offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
dy : dict, float, :class:`ExprRef`
    The vertical offset, in pixels, between the text label and its anchor point. The
    offset is applied after rotation by the *angle* property.
ellipsis : str, dict, :class:`ExprRef`
    The ellipsis string for text truncated in response to the limit parameter.

    **Default value:** ``"…"``
endAngle : dict, float, :class:`ExprRef`
    The end angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default fill color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove fill.

    **Default value:** (None)
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
filled : bool
    Whether the mark's color should be used as fill color instead of stroke color.

    **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well
    as ``geoshape`` marks for `graticule
    <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;
    otherwise, ``true``.

    **Note:** This property cannot be used in a `style config
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.
font : str, dict, :class:`ExprRef`
    The typeface to set the text in (e.g., ``"Helvetica Neue"``).
fontSize : dict, float, :class:`ExprRef`
    The font size, in pixels.

    **Default value:** ``11``
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    The font style (e.g., ``"italic"``).
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    The font weight. This can be either a string (e.g ``"bold"``, ``"normal"``) or a
    number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and
    ``"bold"`` = ``700``).
height : dict, float, :class:`ExprRef`
    Height of the marks.
href : str, dict, :class:`URI`, :class:`ExprRef`
    A URL to load upon mouse click. If defined, the mark acts as a hyperlink.
innerRadius : dict, float, :class:`ExprRef`
    The inner radius in pixels of arc marks. ``innerRadius`` is an alias for
    ``radius2``.

    **Default value:** ``0``
interpolate : dict, :class:`ExprRef`, :class:`Interpolate`, Literal['basis', 'basis-open', 'basis-closed', 'bundle', 'cardinal', 'cardinal-open', 'cardinal-closed', 'catmull-rom', 'linear', 'linear-closed', 'monotone', 'natural', 'step', 'step-before', 'step-after']
    The line interpolation method to use for line and area marks. One of the following:

    * ``"linear"``: piecewise linear segments, as in a polyline.
    * ``"linear-closed"``: close the linear segments to form a polygon.
    * ``"step"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"step-before"``: alternate between vertical and horizontal segments, as in a
      step function.
    * ``"step-after"``: alternate between horizontal and vertical segments, as in a step
      function.
    * ``"basis"``: a B-spline, with control point duplication on the ends.
    * ``"basis-open"``: an open B-spline; may not intersect the start or end.
    * ``"basis-closed"``: a closed B-spline, as in a loop.
    * ``"cardinal"``: a Cardinal spline, with control point duplication on the ends.
    * ``"cardinal-open"``: an open Cardinal spline; may not intersect the start or end,
      but will intersect other control points.
    * ``"cardinal-closed"``: a closed Cardinal spline, as in a loop.
    * ``"bundle"``: equivalent to basis, except the tension parameter is used to
      straighten the spline.
    * ``"monotone"``: cubic interpolation that preserves monotonicity in y.
invalid : None, :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show']
    Invalid data mode, which defines how the marks and corresponding scales should
    represent invalid values (``null`` and ``NaN`` in continuous scales *without*
    defined output for invalid values).

    * ``"filter"`` — *Exclude* all invalid values from the visualization's *marks* and
      *scales*. For path marks (for line, area, trail), this option will create paths
      that connect valid points, as if the data rows with invalid values do not exist.

    * ``"break-paths-filter-domains"`` — Break path marks (for line, area, trail) at
      invalid values.  For non-path marks, this is equivalent to ``"filter"``. All
      *scale* domains will *exclude* these filtered data points.

    * ``"break-paths-show-domains"`` — Break paths (for line, area, trail) at invalid
      values.  Hide invalid values for non-path marks. All *scale* domains will
      *include* these filtered data points (for both path and non-path marks).

    * ``"show"`` or ``null`` — Show all data points in the marks and scale domains. Each
      scale will use the output for invalid values defined in ``config.scale.invalid``
      or, if unspecified, by default invalid values will produce the same visual values
      as zero (if the scale includes zero) or the minimum value (if the scale does not
      include zero).

    * ``"break-paths-show-path-domains"`` (default) — This is equivalent to
      ``"break-paths-show-domains"`` for path-based marks (line/area/trail) and
      ``"filter"`` for non-path marks.

    **Note**: If any channel's scale has an output for invalid values defined in
    ``config.scale.invalid``, all values for the scales will be considered "valid" since
    they can produce a reasonable output for the scales. Thus, fields for such channels
    will not be filtered and will not cause path breaks.
limit : dict, float, :class:`ExprRef`
    The maximum length of the text mark in pixels. The text value will be automatically
    truncated if the rendered size exceeds the limit.

    **Default value:** ``0`` -- indicating no limit
lineBreak : str, dict, :class:`ExprRef`
    A delimiter, such as a newline character, upon which to break text strings into
    multiple lines. This property is ignored if the text is array-valued.
lineHeight : dict, float, :class:`ExprRef`
    The line height in pixels (the spacing between subsequent lines of text) for
    multi-line text marks.
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
order : bool, None
    For line and trail marks, this ``order`` property can be set to ``null`` or
    ``false`` to make the lines use the original order in the data sources.
orient : :class:`Orientation`, Literal['horizontal', 'vertical']
    The orientation of a non-stacked bar, tick, area, and line charts. The value is
    either horizontal (default) or vertical.

    * For bar, rule and tick, this determines whether the size of the bar and tick
      should be applied to x or y dimension.
    * For area, this property determines the orient property of the Vega output.
    * For line and trail marks, this property determines the sort order of the points in
      the line if ``config.sortLineBy`` is not specified. For stacked charts, this is
      always determined by the orientation of the stack; therefore explicitly specified
      value will be ignored.
outerRadius : dict, float, :class:`ExprRef`
    The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.

    **Default value:** ``0``
padAngle : dict, float, :class:`ExprRef`
    The angular padding applied to sides of the arc, in radians.
radius : dict, float, :class:`ExprRef`
    For arc mark, the primary (outer) radius in pixels.

    For text marks, polar coordinate radial offset, in pixels, of the text from the
    origin determined by the ``x`` and ``y`` properties.

    **Default value:** ``min(plot_width, plot_height)/2``
radius2 : dict, float, :class:`ExprRef`
    The secondary (inner) radius in pixels of arc marks.

    **Default value:** ``0``
shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`
    Shape of the point marks. Supported values include:

    * plotting shapes: ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``,
      ``"triangle-up"``, ``"triangle-down"``, ``"triangle-right"``, or
      ``"triangle-left"``.
    * the line symbol ``"stroke"``
    * centered directional shapes ``"arrow"``, ``"wedge"``, or ``"triangle"``
    * a custom `SVG path string
      <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
      sizing, custom shape paths should be defined within a square bounding box with
      coordinates ranging from -1 to 1 along both the x and y dimensions.)

    **Default value:** ``"circle"``
size : dict, float, :class:`ExprRef`
    Default size for marks.

    * For ``point``/``circle``/``square``, this represents the pixel area of the marks.
      Note that this value sets the area of the symbol; the side lengths will increase
      with the square root of this value.
    * For ``bar``, this represents the band size of the bar, in pixels.
    * For ``text``, this represents the font size, in pixels.

    **Default value:**

    * ``30`` for point, circle, square marks; width/height's ``step``
    * ``2`` for bar marks with discrete dimensions;
    * ``5`` for bar marks with continuous dimensions;
    * ``11`` for text marks.
smooth : bool, dict, :class:`ExprRef`
    A boolean flag (default true) indicating if the image should be smoothed when
    resized. If false, individual pixels should be scaled directly rather than
    interpolated with smoothing. For SVG rendering, this option may not work in some
    browsers due to lack of standardization.
startAngle : dict, float, :class:`ExprRef`
    The start angle in radians for arc marks. A value of ``0`` indicates up (north),
    increasing values proceed clockwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Default stroke color. This property has higher precedence than ``config.color``. Set
    to ``null`` to remove stroke.

    **Default value:** (None)
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOffset : dict, float, :class:`ExprRef`
    The offset in pixels at which to draw the group stroke and fill. If unspecified, the
    default behavior is to dynamically offset stroked groups such that 1 pixel stroke
    widths align with the pixel grid.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
tension : dict, float, :class:`ExprRef`
    Depending on the interpolation type, sets the tension parameter (for line and area
    marks).
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    Placeholder text if the ``text`` channel is not specified
theta : dict, float, :class:`ExprRef`
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : dict, float, :class:`ExprRef`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
thickness : float
    Thickness of the tick mark.

    **Default value:**  ``1``
timeUnitBandPosition : float
    Default relative band position for a time unit. If set to ``0``, the marks will be
    positioned at the beginning of the time unit band step. If set to ``0.5``, the marks
    will be positioned in the middle of the time unit band step.
timeUnitBandSize : float
    Default relative band size for a time unit. If set to ``1``, the bandwidth of the
    marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the
    marks will be half of the time unit band step.
tooltip : str, bool, dict, None, float, :class:`ExprRef`, :class:`TooltipContent`
    The tooltip text string to show upon mouse hover or an object defining which fields
    should the tooltip be derived from.

    * If ``tooltip`` is ``true`` or ``{"content": "encoding"}``, then all fields from
      ``encoding`` will be used.
    * If ``tooltip`` is ``{"content": "data"}``, then all fields that appear in the
      highlighted data point will be used.
    * If set to ``null`` or ``false``, then no tooltip will be used.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip  in Vega-Lite.

    **Default value:** ``null``
url : str, dict, :class:`URI`, :class:`ExprRef`
    The URL of the image file for image marks.
width : dict, float, :class:`ExprRef`
    Width of the marks.
x : dict, float, :class:`ExprRef`, Literal['width']
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2 : dict, float, :class:`ExprRef`, Literal['width']
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
y : dict, float, :class:`ExprRef`, Literal['height']
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2 : dict, float, :class:`ExprRef`, Literal['height']
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.

---
## TickCount
```python
from core import TickCount
```

TickCount schema wrapper.

---
## TimeInterval
```python
from core import TimeInterval
```

TimeInterval schema wrapper.

---
## TimeIntervalStep
```python
from core import TimeIntervalStep
```

TimeIntervalStep schema wrapper.

Parameters
----------
interval : :class:`TimeInterval`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']

step : float

---
## TimeLocale
```python
from core import TimeLocale
```

TimeLocale schema wrapper.

Locale definition for formatting dates and times.

Parameters
----------
date : str
    The date (%x) format specifier (e.g., "%m/%d/%Y").
dateTime : str
    The date and time (%c) format specifier (e.g., "%a %b %e %X %Y").
days : Sequence[str], :class:`Vector7string`
    The full names of the weekdays, starting with Sunday.
months : Sequence[str], :class:`Vector12string`
    The full names of the months (starting with January).
periods : Sequence[str], :class:`Vector2string`
    The A.M. and P.M. equivalents (e.g., ["AM", "PM"]).
shortDays : Sequence[str], :class:`Vector7string`
    The abbreviated names of the weekdays, starting with Sunday.
shortMonths : Sequence[str], :class:`Vector12string`
    The abbreviated names of the months (starting with January).
time : str
    The time (%X) format specifier (e.g., "%H:%M:%S").

---
## TimeUnit
```python
from core import TimeUnit
```

TimeUnit schema wrapper.

---
## MultiTimeUnit
```python
from core import MultiTimeUnit
```

MultiTimeUnit schema wrapper.

---
## LocalMultiTimeUnit
```python
from core import LocalMultiTimeUnit
```

LocalMultiTimeUnit schema wrapper.

---
## SingleTimeUnit
```python
from core import SingleTimeUnit
```

SingleTimeUnit schema wrapper.

---
## LocalSingleTimeUnit
```python
from core import LocalSingleTimeUnit
```

LocalSingleTimeUnit schema wrapper.

---
## TimeUnitParams
```python
from core import TimeUnitParams
```

TimeUnitParams schema wrapper.

Time Unit Params for encoding predicate, which can specified if the data is  already
"binned".

Parameters
----------
binned : bool
    Whether the data has already been binned to this time unit. If true, Vega-Lite will
    only format the data, marks, and guides, without applying the timeUnit transform to
    re-bin the data again.
maxbins : float
    If no ``unit`` is specified, maxbins is used to infer time units.
step : float
    The number of steps between bins, in terms of the least significant unit provided.
unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Defines how date-time values should be binned.
utc : bool
    True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``.

---
## TimeUnitTransformParams
```python
from core import TimeUnitTransformParams
```

TimeUnitTransformParams schema wrapper.

Parameters
----------
maxbins : float
    If no ``unit`` is specified, maxbins is used to infer time units.
step : float
    The number of steps between bins, in terms of the least significant unit provided.
unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Defines how date-time values should be binned.
utc : bool
    True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``.

---
## TitleAnchor
```python
from core import TitleAnchor
```

TitleAnchor schema wrapper.

---
## TitleConfig
```python
from core import TitleConfig
```

TitleConfig schema wrapper.

Parameters
----------
align : :class:`Align`, Literal['left', 'center', 'right']
    Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
    ``"right"``.
anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the title and subtitle text. One of ``"start"``,
    ``"middle"``, or ``"end"``. For example, with an orientation of top these anchor
    positions map to a left-, center-, or right-aligned title.
angle : dict, float, :class:`ExprRef`
    Angle in degrees of title and subtitle text.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the title from the ARIA accessibility tree.

    **Default value:** ``true``
baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
    (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
    ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
    to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
    rather than *fontSize* alone.
color : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for title text.
dx : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text x-coordinate.
dy : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text y-coordinate.
font : str, dict, :class:`ExprRef`
    Font name for title text.
fontSize : dict, float, :class:`ExprRef`
    Font size in pixels for title text.
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for title text.
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for title text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']
    The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
    to the full bounding box) or ``"group"`` (to anchor relative to the group width or
    height).
limit : dict, float, :class:`ExprRef`
    The maximum allowed length in pixels of title and subtitle text.
lineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
offset : dict, float, :class:`ExprRef`
    The orthogonal offset in pixels by which to displace the title group from its
    position along the edge of the chart.
orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']
    Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``)
subtitleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for subtitle text.
subtitleFont : str, dict, :class:`ExprRef`
    Font name for subtitle text.
subtitleFontSize : dict, float, :class:`ExprRef`
    Font size in pixels for subtitle text.
subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for subtitle text.
subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for subtitle text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
subtitleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line subtitle text.
subtitlePadding : dict, float, :class:`ExprRef`
    The padding in pixels between title and subtitle text.
zindex : dict, float, :class:`ExprRef`
    The integer z-index indicating the layering of the title group relative to other
    axis, mark, and legend groups.

    **Default value:** ``0``.

---
## TitleFrame
```python
from core import TitleFrame
```

TitleFrame schema wrapper.

---
## TitleOrient
```python
from core import TitleOrient
```

TitleOrient schema wrapper.

---
## TitleParams
```python
from core import TitleParams
```

TitleParams schema wrapper.

Parameters
----------
text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    The title text.
align : :class:`Align`, Literal['left', 'center', 'right']
    Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or
    ``"right"``.
anchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']
    The anchor position for placing the title. One of ``"start"``, ``"middle"``, or
    ``"end"``. For example, with an orientation of top these anchor positions map to a
    left-, center-, or right-aligned title.

    **Default value:** ``"middle"`` for `single
    <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
    <https://vega.github.io/vega-lite/docs/layer.html>`__ views. ``"start"`` for other
    composite views.

    **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is
    only customizable only for `single
    <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered
    <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite
    views, ``anchor`` is always ``"start"``.
angle : dict, float, :class:`ExprRef`
    Angle in degrees of title and subtitle text.
aria : bool, dict, :class:`ExprRef`
    A boolean flag indicating if `ARIA attributes
    <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be
    included (SVG output only). If ``false``, the "aria-hidden" attribute will be set on
    the output SVG group, removing the title from the ARIA accessibility tree.

    **Default value:** ``true``
baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']
    Vertical text baseline for title and subtitle text. One of ``"alphabetic"``
    (default), ``"top"``, ``"middle"``, ``"bottom"``, ``"line-top"``, or
    ``"line-bottom"``. The ``"line-top"`` and ``"line-bottom"`` values operate similarly
    to ``"top"`` and ``"bottom"``, but are calculated relative to the *lineHeight*
    rather than *fontSize* alone.
color : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for title text.
dx : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text x-coordinate.
dy : dict, float, :class:`ExprRef`
    Delta offset for title and subtitle text y-coordinate.
font : str, dict, :class:`ExprRef`
    Font name for title text.
fontSize : dict, float, :class:`ExprRef`
    Font size in pixels for title text.
fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for title text.
fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for title text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']
    The reference frame for the anchor position, one of ``"bounds"`` (to anchor relative
    to the full bounding box) or ``"group"`` (to anchor relative to the group width or
    height).
limit : dict, float, :class:`ExprRef`
    The maximum allowed length in pixels of title and subtitle text.
lineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line title text or title text with ``"line-top"`` or
    ``"line-bottom"`` baseline.
offset : dict, float, :class:`ExprRef`
    The orthogonal offset in pixels by which to displace the title group from its
    position along the edge of the chart.
orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']
    Default title orientation (``"top"``, ``"bottom"``, ``"left"``, or ``"right"``)
style : str, Sequence[str]
    A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__
    to apply to the title text mark.

    **Default value:** ``"group-title"``.
subtitle : str, :class:`Text`, Sequence[str]
    The subtitle Text.
subtitleColor : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    Text color for subtitle text.
subtitleFont : str, dict, :class:`ExprRef`
    Font name for subtitle text.
subtitleFontSize : dict, float, :class:`ExprRef`
    Font size in pixels for subtitle text.
subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`
    Font style for subtitle text.
subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]
    Font weight for subtitle text. This can be either a string (e.g ``"bold"``,
    ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where
    ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
subtitleLineHeight : dict, float, :class:`ExprRef`
    Line height in pixels for multi-line subtitle text.
subtitlePadding : dict, float, :class:`ExprRef`
    The padding in pixels between title and subtitle text.
zindex : float
    The integer z-index indicating the layering of the title group relative to other
    axis, mark and legend groups.

    **Default value:** ``0``.

---
## TooltipContent
```python
from core import TooltipContent
```

TooltipContent schema wrapper.

Parameters
----------
content : Literal['encoding', 'data']

---
## TopLevelParameter
```python
from core import TopLevelParameter
```

TopLevelParameter schema wrapper.

---
## TopLevelSelectionParameter
```python
from core import TopLevelSelectionParameter
```

TopLevelSelectionParameter schema wrapper.

Parameters
----------
name : str, :class:`ParameterName`
    Required. A unique name for the selection parameter. Selection names should be valid
    JavaScript identifiers: they should contain only alphanumeric characters (or "$", or
    "_") and may not start with a digit. Reserved keywords that may not be used as
    parameter names are "datum", "event", "item", and "parent".
select : dict, :class:`SelectionType`, :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig`, Literal['point', 'interval']
    Determines the default event processing and data query for the selection. Vega-Lite
    currently supports two selection types:

    * ``"point"`` -- to select multiple discrete data values; the first value is
      selected on ``click`` and additional values toggled on shift-click.
    * ``"interval"`` -- to select a continuous range of data values on ``drag``.
bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding`
    When set, a selection is populated by input elements (also known as dynamic query
    widgets) or by interacting with the corresponding legend. Direct manipulation
    interaction is disabled by default; to re-enable it, set the selection's `on
    <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__
    property.

    Legend bindings are restricted to selections that only specify a single field or
    encoding.

    Query widget binding takes the form of Vega's `input element binding definition
    <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between
    projected field/encodings and binding definitions.

    **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__
    documentation.
value : str, bool, dict, None, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`]
    Initialize the selection with a mapping between `projected channels or field names
    <https://vega.github.io/vega-lite/docs/selection.html#project>`__ and initial
    values.

    **See also:** `init <https://vega.github.io/vega-lite/docs/value.html>`__
    documentation.
views : Sequence[str]
    By default, top-level selections are applied to every view in the visualization. If
    this property is specified, selections will only be applied to views with the given
    names.

---
## TopLevelSpec
```python
from core import TopLevelSpec
```

TopLevelSpec schema wrapper.

A Vega-Lite top-level specification. This is the root class for all Vega-Lite
specifications. (The json schema is generated from this type.)

---
## TopLevelConcatSpec
```python
from core import TopLevelConcatSpec
```

TopLevelConcatSpec schema wrapper.

Parameters
----------
concat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopLevelFacetSpec
```python
from core import TopLevelFacetSpec
```

TopLevelFacetSpec schema wrapper.

Parameters
----------
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef`
    Definition for how to facet the data. One of: 1) `a field definition for faceting
    the plot by one field
    <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that
    maps row and column channels to their field definitions
    <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__
spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame`
    A specification of the view that gets faceted.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopLevelHConcatSpec
```python
from core import TopLevelHConcatSpec
```

TopLevelHConcatSpec schema wrapper.

Parameters
----------
hconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated and put into a row.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    **Default value:** ``false``
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : float
    The spacing in pixels between sub-views of the concat operator.

    **Default value**: ``10``
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopLevelLayerSpec
```python
from core import TopLevelLayerSpec
```

TopLevelLayerSpec schema wrapper.

Parameters
----------
layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`]
    Layer or single view specifications to be layered.

    **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels
    as layering facet specifications is not allowed. Instead, use the `facet operator
    <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer inside a
    facet.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`SharedEncoding`
    A shared key-value mapping between encoding channels and definition of fields in the
    underlying layers.
height : dict, float, :class:`Step`, Literal['container']
    The height of a visualization.

    * For a plot with a continuous y-field, height should be a number.
    * For a plot with either a discrete y-field or no y-field, height can be either a
      number indicating a fixed height or an object in the form of ``{step: number}``
      defining the height per discrete step. (No y-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on height, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
    continuous y-field and ``config.view.discreteHeight`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    height of a single view and the ``"container"`` option cannot be used.

    **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
projection : dict, :class:`Projection`
    An object defining properties of the geographic projection shared by underlying
    layers.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
view : dict, :class:`ViewBackground`
    An object defining the view background's fill and stroke.

    **Default value:** none (transparent)
width : dict, float, :class:`Step`, Literal['container']
    The width of a visualization.

    * For a plot with a continuous x-field, width should be a number.
    * For a plot with either a discrete x-field or no x-field, width can be either a
      number indicating a fixed width or an object in the form of ``{step: number}``
      defining the width per discrete step. (No x-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on width, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
    continuous x-field and ``config.view.discreteWidth`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    width of a single view and the ``"container"`` option cannot be used.

    **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopLevelRepeatSpec
```python
from core import TopLevelRepeatSpec
```

TopLevelRepeatSpec schema wrapper.

---
## TopLevelUnitSpec
```python
from core import TopLevelUnitSpec
```

TopLevelUnitSpec schema wrapper.

Parameters
----------
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']
    A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
    ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
    ``"text"``) or a `mark definition object
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`FacetedEncoding`
    A key-value mapping between encoding channels and definition of fields.
height : dict, float, :class:`Step`, Literal['container']
    The height of a visualization.

    * For a plot with a continuous y-field, height should be a number.
    * For a plot with either a discrete y-field or no y-field, height can be either a
      number indicating a fixed height or an object in the form of ``{step: number}``
      defining the height per discrete step. (No y-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on height, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
    continuous y-field and ``config.view.discreteHeight`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    height of a single view and the ``"container"`` option cannot be used.

    **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    An array of parameters that may either be simple variables, or more complex
    selections that map user input to data queries.
projection : dict, :class:`Projection`
    An object defining properties of geographic projection, which will be applied to
    ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
    channels for other marks.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
view : dict, :class:`ViewBackground`
    An object defining the view background's fill and stroke.

    **Default value:** none (transparent)
width : dict, float, :class:`Step`, Literal['container']
    The width of a visualization.

    * For a plot with a continuous x-field, width should be a number.
    * For a plot with either a discrete x-field or no x-field, width can be either a
      number indicating a fixed width or an object in the form of ``{step: number}``
      defining the width per discrete step. (No x-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on width, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
    continuous x-field and ``config.view.discreteWidth`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    width of a single view and the ``"container"`` option cannot be used.

    **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopLevelVConcatSpec
```python
from core import TopLevelVConcatSpec
```

TopLevelVConcatSpec schema wrapper.

Parameters
----------
vconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated and put into a column.
autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']
    How the visualization size should be determined. If a string, should be one of
    ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify
    parameters for content sizing and automatic resizing.

    **Default value**: ``pad``
background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    CSS color property to use as the background of the entire view.

    **Default value:** ``"white"``
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    **Default value:** ``false``
config : dict, :class:`Config`
    Vega-Lite configuration object. This property can only be defined at the top-level
    of a specification.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
datasets : dict, :class:`Datasets`
    A global data store for named datasets. This is a mapping from names to inline
    datasets. This can be an array of objects or primitive values or a string. Arrays of
    primitive values are ingested as objects with a ``data`` property.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
padding : dict, float, :class:`ExprRef`, :class:`Padding`
    The default visualization padding, in pixels, from the edge of the visualization
    canvas to the data rectangle. If a number, specifies padding for all sides. If an
    object, the value should have the format ``{"left": 5, "top": 5, "right": 5,
    "bottom": 5}`` to specify padding for each side of the visualization.

    **Default value**: ``5``
params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]
    Dynamic variables or selections that parameterize a visualization.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : float
    The spacing in pixels between sub-views of the concat operator.

    **Default value**: ``10``
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
usermeta : dict, :class:`Dict`
    Optional metadata that will be passed to Vega. This object is completely ignored by
    Vega and Vega-Lite and can be used for custom metadata.
$schema : str
    URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.
    Unless you have a reason to change this, use
    ``https://vega.github.io/schema/vega-lite/v5.json``. Setting the ``$schema``
    property allows automatic validation and autocomplete in editors that support JSON
    schema.

---
## TopoDataFormat
```python
from core import TopoDataFormat
```

TopoDataFormat schema wrapper.

Parameters
----------
feature : str
    The name of the TopoJSON object set to convert to a GeoJSON feature collection. For
    example, in a map of the world, there may be an object set named ``"countries"``.
    Using the feature property, we can extract this set and generate a GeoJSON feature
    object for each country.
mesh : str
    The name of the TopoJSON object set to convert to mesh. Similar to the ``feature``
    option, ``mesh`` extracts a named TopoJSON object set.  Unlike the ``feature``
    option, the corresponding geo data is returned as a single, unified mesh instance,
    not as individual GeoJSON features. Extracting a mesh is useful for more efficiently
    drawing borders or other geographic elements that you do not need to associate with
    specific regions such as individual countries, states or counties.
parse : dict, None, :class:`Parse`
    If set to ``null``, disable type inference based on the spec and only use type
    inference based on the data. Alternatively, a parsing directive object can be
    provided for explicit data types. Each property of the object corresponds to a field
    name, and the value to the desired data type (one of ``"number"``, ``"boolean"``,
    ``"date"``, or null (do not parse the field)). For example, ``"parse":
    {"modified_on": "date"}`` parses the ``modified_on`` field in each input record a
    Date value.

    For ``"date"``, we parse data based using JavaScript's `Date.parse()
    <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.
    For Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}``), using
    the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.
    UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}``).
    See more about `UTC time
    <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__
type : Literal['topojson']
    Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``.

    **Default value:**  The default format type is determined by the extension of the
    file URL. If no extension is detected, ``"json"`` will be used by default.

---
## Transform
```python
from core import Transform
```

Transform schema wrapper.

---
## AggregateTransform
```python
from core import AggregateTransform
```

AggregateTransform schema wrapper.

Parameters
----------
aggregate : Sequence[dict, :class:`AggregatedFieldDef`]
    Array of objects that define fields to aggregate.
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.

---
## BinTransform
```python
from core import BinTransform
```

BinTransform schema wrapper.

Parameters
----------
bin : dict, Literal[True], :class:`BinParams`
    An object indicating bin properties, or simply ``true`` for using default bin
    parameters.
field : str, :class:`FieldName`
    The data field to bin.
as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]
    The output fields at which to write the start and end bin values. This can be either
    a string or an array of strings with two elements denoting the name for the fields
    for bin start and bin end respectively. If a single string (e.g., ``"val"``) is
    provided, the end field will be ``"val_end"``.

---
## CalculateTransform
```python
from core import CalculateTransform
```

CalculateTransform schema wrapper.

Parameters
----------
calculate : str
    A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
    string. Use the variable ``datum`` to refer to the current data object.
as : str, :class:`FieldName`
    The field for storing the computed formula value.

---
## DensityTransform
```python
from core import DensityTransform
```

DensityTransform schema wrapper.

Parameters
----------
density : str, :class:`FieldName`
    The data field for which to perform density estimation.
bandwidth : float
    The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to
    zero, the bandwidth value is automatically estimated from the input data using
    Scott's rule.
counts : bool
    A boolean flag indicating if the output values should be probability estimates
    (false) or smoothed counts (true).

    **Default value:** ``false``
cumulative : bool
    A boolean flag indicating whether to produce density estimates (false) or cumulative
    density estimates (true).

    **Default value:** ``false``
extent : Sequence[float]
    A [min, max] domain from which to sample the distribution. If unspecified, the
    extent will be determined by the observed minimum and maximum values of the density
    value field.
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
maxsteps : float
    The maximum number of samples to take along the extent domain for plotting the
    density.

    **Default value:** ``200``
minsteps : float
    The minimum number of samples to take along the extent domain for plotting the
    density.

    **Default value:** ``25``
resolve : Literal['independent', 'shared']
    Indicates how parameters for multiple densities should be resolved. If
    ``"independent"``, each density may have its own domain extent and dynamic number of
    curve sample steps. If ``"shared"``, the KDE transform will ensure that all
    densities are defined over a shared domain and curve steps, enabling stacking.

    **Default value:** ``"shared"``
steps : float
    The exact number of samples to take along the extent domain for plotting the
    density. If specified, overrides both minsteps and maxsteps to set an exact number
    of uniform samples. Potentially useful in conjunction with a fixed extent to ensure
    consistent sample points for stacked densities.
as : Sequence[str, :class:`FieldName`]
    The output fields for the sample value and corresponding density estimate.

    **Default value:** ``["value", "density"]``

---
## ExtentTransform
```python
from core import ExtentTransform
```

ExtentTransform schema wrapper.

Parameters
----------
extent : str, :class:`FieldName`
    The field of which to get the extent.
param : str, :class:`ParameterName`
    The output parameter produced by the extent transform.

---
## FilterTransform
```python
from core import FilterTransform
```

FilterTransform schema wrapper.

Parameters
----------
filter : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`
    The ``filter`` property must be a predication definition, which can take one of the
    following forms:

    1) an `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__
    string, where ``datum`` can be used to refer to the current data object. For
    example, ``{filter: "datum.b2 > 60"}`` would make the output data includes only
    items that have values in the field ``b2`` over 60.

    2) one of the `field predicates
    <https://vega.github.io/vega-lite/docs/predicate.html#field-predicate>`__: `equal
    <https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate>`__, `lt
    <https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate>`__, `lte
    <https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate>`__, `gt
    <https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate>`__, `gte
    <https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate>`__, `range
    <https://vega.github.io/vega-lite/docs/predicate.html#range-predicate>`__, `oneOf
    <https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate>`__, or
    `valid <https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate>`__,

    3) a `selection predicate
    <https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate>`__, which
    define the names of a selection that the data point should belong to (or a logical
    composition of selections).

    4) a `logical composition
    <https://vega.github.io/vega-lite/docs/predicate.html#composition>`__ of (1), (2),
    or (3).

---
## FlattenTransform
```python
from core import FlattenTransform
```

FlattenTransform schema wrapper.

Parameters
----------
flatten : Sequence[str, :class:`FieldName`]
    An array of one or more data fields containing arrays to flatten. If multiple fields
    are specified, their array values should have a parallel structure, ideally with the
    same length. If the lengths of parallel arrays do not match, the longest array will
    be used with ``null`` values added for missing entries.
as : Sequence[str, :class:`FieldName`]
    The output field names for extracted array values.

    **Default value:** The field name of the corresponding array field

---
## FoldTransform
```python
from core import FoldTransform
```

FoldTransform schema wrapper.

Parameters
----------
fold : Sequence[str, :class:`FieldName`]
    An array of data fields indicating the properties to fold.
as : Sequence[str, :class:`FieldName`]
    The output field names for the key and value properties produced by the fold
    transform. **Default value:** ``["key", "value"]``

---
## ImputeTransform
```python
from core import ImputeTransform
```

ImputeTransform schema wrapper.

Parameters
----------
impute : str, :class:`FieldName`
    The data field for which the missing values should be imputed.
key : str, :class:`FieldName`
    A key field that uniquely identifies data objects within a group. Missing key values
    (those occurring in the data but not in the current group) will be imputed.
frame : Sequence[None, float]
    A frame specification as a two-element array used to control the window over which
    the specified method is applied. The array entries should either be a number
    indicating the offset from the current data object, or null to indicate unbounded
    rows preceding or following the current data object. For example, the value ``[-5,
    5]`` indicates that the window should include five objects preceding and five
    objects following the current object.

    **Default value:**:  ``[null, null]`` indicating that the window includes all
    objects.
groupby : Sequence[str, :class:`FieldName`]
    An optional array of fields by which to group the values. Imputation will then be
    performed on a per-group basis.
keyvals : dict, Sequence[Any], :class:`ImputeSequence`
    Defines the key values that should be considered for imputation. An array of key
    values or an object defining a `number sequence
    <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.

    If provided, this will be used in addition to the key values observed within the
    input data. If not provided, the values will be derived from all unique values of
    the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if
    the y-field is imputed, or vice versa.

    If there is no impute grouping, this property *must* be specified.
method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean']
    The imputation method to use for the field value of imputed data objects. One of
    ``"value"``, ``"mean"``, ``"median"``, ``"max"`` or ``"min"``.

    **Default value:**  ``"value"``
value : Any
    The field value to use when the imputation ``method`` is ``"value"``.

---
## JoinAggregateTransform
```python
from core import JoinAggregateTransform
```

JoinAggregateTransform schema wrapper.

Parameters
----------
joinaggregate : Sequence[dict, :class:`JoinAggregateFieldDef`]
    The definition of the fields in the join aggregate, and what calculations to use.
groupby : Sequence[str, :class:`FieldName`]
    The data fields for partitioning the data objects into separate groups. If
    unspecified, all data points will be in a single group.

---
## LoessTransform
```python
from core import LoessTransform
```

LoessTransform schema wrapper.

Parameters
----------
loess : str, :class:`FieldName`
    The data field of the dependent variable to smooth.
on : str, :class:`FieldName`
    The data field of the independent variable to use a predictor.
bandwidth : float
    A bandwidth parameter in the range ``[0, 1]`` that determines the amount of
    smoothing.

    **Default value:** ``0.3``
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
as : Sequence[str, :class:`FieldName`]
    The output field names for the smoothed points generated by the loess transform.

    **Default value:** The field names of the input x and y values.

---
## LookupTransform
```python
from core import LookupTransform
```

LookupTransform schema wrapper.

Parameters
----------
lookup : str
    Key in primary data source.
default : Any
    The default value to use if lookup fails.

    **Default value:** ``null``
as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]
    The output fields on which to store the looked up data values.

    For data lookups, this property may be left blank if ``from.fields`` has been
    specified (those field names will be used); if ``from.fields`` has not been
    specified, ``as`` must be a string.

    For selection lookups, this property is optional: if unspecified, looked up values
    will be stored under a property named for the selection; and if specified, it must
    correspond to ``from.fields``.
from : dict, :class:`LookupData`, :class:`LookupSelection`
    Data source or selection for secondary data reference.

---
## PivotTransform
```python
from core import PivotTransform
```

PivotTransform schema wrapper.

Parameters
----------
pivot : str, :class:`FieldName`
    The data field to pivot on. The unique values of this field become new field names
    in the output stream.
value : str, :class:`FieldName`
    The data field to populate pivoted fields. The aggregate values of this field become
    the values of the new pivoted fields.
groupby : Sequence[str, :class:`FieldName`]
    The optional data fields to group by. If not specified, a single group containing
    all data objects will be used.
limit : float
    An optional parameter indicating the maximum number of pivoted fields to generate.
    The default (``0``) applies no limit. The pivoted ``pivot`` names are sorted in
    ascending order prior to enforcing the limit. **Default value:** ``0``
op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    The aggregation operation to apply to grouped ``value`` field values. **Default
    value:** ``sum``

---
## QuantileTransform
```python
from core import QuantileTransform
```

QuantileTransform schema wrapper.

Parameters
----------
quantile : str, :class:`FieldName`
    The data field for which to perform quantile estimation.
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
probs : Sequence[float]
    An array of probabilities in the range (0, 1) for which to compute quantile values.
    If not specified, the *step* parameter will be used.
step : float
    A probability step size (default 0.01) for sampling quantile values. All values from
    one-half the step size up to 1 (exclusive) will be sampled. This parameter is only
    used if the *probs* parameter is not provided.
as : Sequence[str, :class:`FieldName`]
    The output field names for the probability and quantile values.

    **Default value:** ``["prob", "value"]``

---
## RegressionTransform
```python
from core import RegressionTransform
```

RegressionTransform schema wrapper.

Parameters
----------
on : str, :class:`FieldName`
    The data field of the independent variable to use a predictor.
regression : str, :class:`FieldName`
    The data field of the dependent variable to predict.
extent : Sequence[float]
    A [min, max] domain over the independent (x) field for the starting and ending
    points of the generated trend line.
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by. If not specified, a single group containing all data
    objects will be used.
method : Literal['linear', 'log', 'exp', 'pow', 'quad', 'poly']
    The functional form of the regression model. One of ``"linear"``, ``"log"``,
    ``"exp"``, ``"pow"``, ``"quad"``, or ``"poly"``.

    **Default value:** ``"linear"``
order : float
    The polynomial order (number of coefficients) for the 'poly' method.

    **Default value:** ``3``
params : bool
    A boolean flag indicating if the transform should return the regression model
    parameters (one object per group), rather than trend line points. The resulting
    objects include a ``coef`` array of fitted coefficient values (starting with the
    intercept term and then including terms of increasing order) and an ``rSquared``
    value (indicating the total variance explained by the model).

    **Default value:** ``false``
as : Sequence[str, :class:`FieldName`]
    The output field names for the smoothed points generated by the regression
    transform.

    **Default value:** The field names of the input x and y values.

---
## SampleTransform
```python
from core import SampleTransform
```

SampleTransform schema wrapper.

Parameters
----------
sample : float
    The maximum number of data objects to include in the sample.

    **Default value:** ``1000``

---
## StackTransform
```python
from core import StackTransform
```

StackTransform schema wrapper.

Parameters
----------
groupby : Sequence[str, :class:`FieldName`]
    The data fields to group by.
stack : str, :class:`FieldName`
    The field which is stacked.
offset : Literal['zero', 'center', 'normalize']
    Mode for stacking marks. One of ``"zero"`` (default), ``"center"``, or
    ``"normalize"``. The ``"zero"`` offset will stack starting at ``0``. The
    ``"center"`` offset will center the stacks. The ``"normalize"`` offset will compute
    percentage values for each stack point, with output values in the range ``[0,1]``.

    **Default value:** ``"zero"``
sort : Sequence[dict, :class:`SortField`]
    Field that determines the order of leaves in the stacked charts.
as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]
    Output field names. This can be either a string or an array of strings with two
    elements denoting the name for the fields for stack start and stack end
    respectively. If a single string(e.g., ``"val"``) is provided, the end field will be
    ``"val_end"``.

---
## TimeUnitTransform
```python
from core import TimeUnitTransform
```

TimeUnitTransform schema wrapper.

Parameters
----------
field : str, :class:`FieldName`
    The data field to apply time unit.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, :class:`TimeUnitTransformParams`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    The timeUnit.
as : str, :class:`FieldName`
    The output field to write the timeUnit value.

---
## Type
```python
from core import Type
```

Type schema wrapper.

Data type based on level of measurement

---
## TypeForShape
```python
from core import TypeForShape
```

TypeForShape schema wrapper.

---
## TypedFieldDef
```python
from core import TypedFieldDef
```

TypedFieldDef schema wrapper.

Definition object for a data field, its type and transformation of an encoding channel.

Parameters
----------
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## URI
```python
from core import URI
```

URI schema wrapper.

---
## UnitSpec
```python
from core import UnitSpec
```

UnitSpec schema wrapper.

Base interface for a unit (single-view) specification.

Parameters
----------
mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']
    A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
    ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
    ``"text"``) or a `mark definition object
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`Encoding`
    A key-value mapping between encoding channels and definition of fields.
name : str
    Name of the visualization for later reference.
params : Sequence[dict, :class:`SelectionParameter`]
    An array of parameters that may either be simple variables, or more complex
    selections that map user input to data queries.
projection : dict, :class:`Projection`
    An object defining properties of geographic projection, which will be applied to
    ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
    channels for other marks.
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## UnitSpecWithFrame
```python
from core import UnitSpecWithFrame
```

UnitSpecWithFrame schema wrapper.

Parameters
----------
mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']
    A string describing the mark type (one of ``"bar"``, ``"circle"``, ``"square"``,
    ``"tick"``, ``"line"``, ``"area"``, ``"point"``, ``"rule"``, ``"geoshape"``, and
    ``"text"``) or a `mark definition object
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
encoding : dict, :class:`Encoding`
    A key-value mapping between encoding channels and definition of fields.
height : dict, float, :class:`Step`, Literal['container']
    The height of a visualization.

    * For a plot with a continuous y-field, height should be a number.
    * For a plot with either a discrete y-field or no y-field, height can be either a
      number indicating a fixed height or an object in the form of ``{step: number}``
      defining the height per discrete step. (No y-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on height, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousHeight`` for a plot with a
    continuous y-field and ``config.view.discreteHeight`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    height of a single view and the ``"container"`` option cannot be used.

    **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.
name : str
    Name of the visualization for later reference.
params : Sequence[dict, :class:`SelectionParameter`]
    An array of parameters that may either be simple variables, or more complex
    selections that map user input to data queries.
projection : dict, :class:`Projection`
    An object defining properties of geographic projection, which will be applied to
    ``shape`` path for ``"geoshape"`` marks and to ``latitude`` and ``"longitude"``
    channels for other marks.
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.
view : dict, :class:`ViewBackground`
    An object defining the view background's fill and stroke.

    **Default value:** none (transparent)
width : dict, float, :class:`Step`, Literal['container']
    The width of a visualization.

    * For a plot with a continuous x-field, width should be a number.
    * For a plot with either a discrete x-field or no x-field, width can be either a
      number indicating a fixed width or an object in the form of ``{step: number}``
      defining the width per discrete step. (No x-field is equivalent to having one
      discrete step.)
    * To enable responsive sizing on width, it should be set to ``"container"``.

    **Default value:** Based on ``config.view.continuousWidth`` for a plot with a
    continuous x-field and ``config.view.discreteWidth`` otherwise.

    **Note:** For plots with `row and column channels
    <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the
    width of a single view and the ``"container"`` option cannot be used.

    **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__
    documentation.

---
## UrlData
```python
from core import UrlData
```

UrlData schema wrapper.

Parameters
----------
url : str
    An URL from which to load the data set. Use the ``format.type`` property to ensure
    the loaded data is correctly parsed.
format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`
    An object that specifies the format for parsing the data.
name : str
    Provide a placeholder name and bind data at runtime.

---
## UtcMultiTimeUnit
```python
from core import UtcMultiTimeUnit
```

UtcMultiTimeUnit schema wrapper.

---
## UtcSingleTimeUnit
```python
from core import UtcSingleTimeUnit
```

UtcSingleTimeUnit schema wrapper.

---
## VConcatSpecGenericSpec
```python
from core import VConcatSpecGenericSpec
```

VConcatSpecGenericSpec schema wrapper.

Base interface for a vertical concatenation specification.

Parameters
----------
vconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]
    A list of views to be concatenated and put into a column.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    **Default value:** ``false``
data : dict, None, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`
    An object describing the data source. Set to ``null`` to ignore the parent's data
    source. If no data is set, it is derived from the parent.
description : str
    Description of this mark for commenting purpose.
name : str
    Name of the visualization for later reference.
resolve : dict, :class:`Resolve`
    Scale, axis, and legend resolutions for view composition specifications.
spacing : float
    The spacing in pixels between sub-views of the concat operator.

    **Default value**: ``10``
title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`
    Title for the plot.
transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]
    An array of data transformations such as filter and new field calculation.

---
## ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull
```python
from core import ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull
```

ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull
```python
from core import ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull
```

ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefWithConditionMarkPropFieldOrDatumDefnumber
```python
from core import ValueDefWithConditionMarkPropFieldOrDatumDefnumber
```

ValueDefWithConditionMarkPropFieldOrDatumDefnumber schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray
```python
from core import ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray
```

ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, Sequence[float], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefWithConditionMarkPropFieldOrDatumDefstringnull
```python
from core import ValueDefWithConditionMarkPropFieldOrDatumDefstringnull
```

ValueDefWithConditionMarkPropFieldOrDatumDefstringnull schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefWithConditionStringFieldDefText
```python
from core import ValueDefWithConditionStringFieldDefText
```

ValueDefWithConditionStringFieldDefText schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefnumber
```python
from core import ValueDefnumber
```

ValueDefnumber schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## ValueDefnumberwidthheightExprRef
```python
from core import ValueDefnumberwidthheightExprRef
```

ValueDefnumberwidthheightExprRef schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## VariableParameter
```python
from core import VariableParameter
```

VariableParameter schema wrapper.

Parameters
----------
name : str, :class:`ParameterName`
    A unique name for the variable parameter. Parameter names should be valid JavaScript
    identifiers: they should contain only alphanumeric characters (or "$", or "_") and
    may not start with a digit. Reserved keywords that may not be used as parameter
    names are "datum", "event", "item", and "parent".
bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`BindRadioSelect`
    Binds the parameter to an external input element such as a slider, selection list or
    radio button group.
expr : str, :class:`Expr`
    An expression for the value of the parameter. This expression may include other
    parameters, in which case the parameter will automatically update in response to
    upstream parameter changes.
react : bool
    A boolean flag (default ``true``) indicating if the update expression should be
    automatically re-evaluated when any upstream signal dependencies update. If
    ``false``, the update expression will not register any dependencies on other
    signals, even for initialization.

    **Default value:** ``true``
value : Any
    The `initial value <http://vega.github.io/vega-lite/docs/value.html>`__ of the
    parameter.

    **Default value:** ``undefined``

---
## Vector10string
```python
from core import Vector10string
```

Vector10string schema wrapper.

---
## Vector12string
```python
from core import Vector12string
```

Vector12string schema wrapper.

---
## Vector2DateTime
```python
from core import Vector2DateTime
```

Vector2DateTime schema wrapper.

---
## Vector2Vector2number
```python
from core import Vector2Vector2number
```

Vector2Vector2number schema wrapper.

---
## Vector2boolean
```python
from core import Vector2boolean
```

Vector2boolean schema wrapper.

---
## Vector2number
```python
from core import Vector2number
```

Vector2number schema wrapper.

---
## Vector2string
```python
from core import Vector2string
```

Vector2string schema wrapper.

---
## Vector3number
```python
from core import Vector3number
```

Vector3number schema wrapper.

---
## Vector7string
```python
from core import Vector7string
```

Vector7string schema wrapper.

---
## ViewBackground
```python
from core import ViewBackground
```

ViewBackground schema wrapper.

Parameters
----------
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cursor : :class:`Cursor`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the view. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The fill color.

    **Default value:** ``undefined``
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The stroke color.

    **Default value:** ``"#ddd"``
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.
style : str, Sequence[str]
    A string or array of strings indicating the name of custom styles to apply to the
    view background. A style is a named collection of mark property defaults defined
    within the `style configuration
    <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an
    array, later styles will override earlier styles.

    **Default value:** ``"cell"`` **Note:** Any specified view background properties
    will augment the default style.

---
## ViewConfig
```python
from core import ViewConfig
```

ViewConfig schema wrapper.

Parameters
----------
clip : bool
    Whether the view should be clipped.
continuousHeight : float
    The default height when the plot has a continuous y-field for x or latitude, or has
    arc marks.

    **Default value:** ``200``
continuousWidth : float
    The default width when the plot has a continuous field for x or longitude, or has
    arc marks.

    **Default value:** ``200``
cornerRadius : dict, float, :class:`ExprRef`
    The radius in pixels of rounded rectangles or arcs' corners.

    **Default value:** ``0``
cursor : :class:`Cursor`, Literal['auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', 'sw-resize', 'w-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'col-resize', 'row-resize', 'all-scroll', 'zoom-in', 'zoom-out', 'grab', 'grabbing']
    The mouse cursor used over the view. Any valid `CSS cursor type
    <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.
discreteHeight : dict, float
    The default height when the plot has non arc marks and either a discrete y-field or
    no y-field. The height can be either a number indicating a fixed height or an object
    in the form of ``{step: number}`` defining the height per discrete step.

    **Default value:** a step size based on ``config.view.step``.
discreteWidth : dict, float
    The default width when the plot has non-arc marks and either a discrete x-field or
    no x-field. The width can be either a number indicating a fixed width or an object
    in the form of ``{step: number}`` defining the width per discrete step.

    **Default value:** a step size based on ``config.view.step``.
fill : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The fill color.

    **Default value:** ``undefined``
fillOpacity : dict, float, :class:`ExprRef`
    The fill opacity (value between [0,1]).

    **Default value:** ``1``
opacity : dict, float, :class:`ExprRef`
    The overall opacity (value between [0,1]).

    **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,
    ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.
step : float
    Default step size for x-/y- discrete fields.
stroke : str, dict, None, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
    The stroke color.

    **Default value:** ``"#ddd"``
strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']
    The stroke cap for line ending style. One of ``"butt"``, ``"round"``, or
    ``"square"``.

    **Default value:** ``"butt"``
strokeDash : dict, Sequence[float], :class:`ExprRef`
    An array of alternating stroke, space lengths for creating dashed or dotted lines.
strokeDashOffset : dict, float, :class:`ExprRef`
    The offset (in pixels) into which to begin drawing with the stroke dash array.
strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']
    The stroke line join method. One of ``"miter"``, ``"round"`` or ``"bevel"``.

    **Default value:** ``"miter"``
strokeMiterLimit : dict, float, :class:`ExprRef`
    The miter limit at which to bevel a line join.
strokeOpacity : dict, float, :class:`ExprRef`
    The stroke opacity (value between [0,1]).

    **Default value:** ``1``
strokeWidth : dict, float, :class:`ExprRef`
    The stroke width, in pixels.

---
## WindowEventType
```python
from core import WindowEventType
```

WindowEventType schema wrapper.

---
## EventType
```python
from core import EventType
```

EventType schema wrapper.

---
## WindowFieldDef
```python
from core import WindowFieldDef
```

WindowFieldDef schema wrapper.

Parameters
----------
op : :class:`AggregateOp`, :class:`WindowOnlyOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb', 'row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag', 'lead', 'first_value', 'last_value', 'nth_value']
    The window or aggregation operation to apply within a window (e.g., ``"rank"``,
    ``"lead"``, ``"sum"``, ``"average"`` or ``"count"``). See the list of all supported
    operations `here <https://vega.github.io/vega-lite/docs/window.html#ops>`__.
field : str, :class:`FieldName`
    The data field for which to compute the aggregate or window function. This can be
    omitted for window functions that do not operate over a field such as ``"count"``,
    ``"rank"``, ``"dense_rank"``.
param : float
    Parameter values for the window functions. Parameter values can be omitted for
    operations that do not accept a parameter.

    See the list of all supported operations and their parameters `here
    <https://vega.github.io/vega-lite/docs/transforms/window.html>`__.
as : str, :class:`FieldName`
    The output name for the window operation.

---
## WindowOnlyOp
```python
from core import WindowOnlyOp
```

WindowOnlyOp schema wrapper.

---
## WindowTransform
```python
from core import WindowTransform
```

WindowTransform schema wrapper.

Parameters
----------
window : Sequence[dict, :class:`WindowFieldDef`]
    The definition of the fields in the window, and what calculations to use.
frame : Sequence[None, float]
    A frame specification as a two-element array indicating how the sliding window
    should proceed. The array entries should either be a number indicating the offset
    from the current data object, or null to indicate unbounded rows preceding or
    following the current data object. The default value is ``[null, 0]``, indicating
    that the sliding window includes the current object and all preceding objects. The
    value ``[-5, 5]`` indicates that the window should include five objects preceding
    and five objects following the current object. Finally, ``[null, null]`` indicates
    that the window frame should always include all data objects. If you this frame and
    want to assign the same value to add objects, you can use the simpler `join
    aggregate transform <https://vega.github.io/vega-lite/docs/joinaggregate.html>`__.
    The only operators affected are the aggregation operations and the ``first_value``,
    ``last_value``, and ``nth_value`` window operations. The other window operations are
    not affected by this.

    **Default value:**:  ``[null, 0]`` (includes the current object and all preceding
    objects)
groupby : Sequence[str, :class:`FieldName`]
    The data fields for partitioning the data objects into separate windows. If
    unspecified, all data points will be in a single window.
ignorePeers : bool
    Indicates if the sliding window frame should ignore peer values (data that are
    considered identical by the sort criteria). The default is false, causing the window
    frame to expand to include all peer values. If set to true, the window frame will be
    defined by offset values only. This setting only affects those operations that
    depend on the window frame, namely aggregation operations and the first_value,
    last_value, and nth_value window operations.

    **Default value:** ``false``
sort : Sequence[dict, :class:`SortField`]
    A sort field definition for sorting data objects within a window. If two data
    objects are considered equal by the comparator, they are considered "peer" values of
    equal rank. If sort is not specified, the order is undefined: data objects are
    processed in the order they are observed and none are considered peers (the
    ignorePeers parameter is ignored and treated as if set to ``true``).

---
## _default_wrapper_classes
```python
from core import _default_wrapper_classes
```



---
## __name__
```python
from channels import __name__
```



---
## FieldChannelMixin
```python
from channels import FieldChannelMixin
```



---
## ValueChannelMixin
```python
from channels import ValueChannelMixin
```



---
## DatumChannelMixin
```python
from channels import DatumChannelMixin
```



---
## Angle
```python
from channels import Angle
```

Angle schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## AngleDatum
```python
from channels import AngleDatum
```

AngleDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## AngleValue
```python
from channels import AngleValue
```

AngleValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Color
```python
from channels import Color
```

Color schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ColorDatum
```python
from channels import ColorDatum
```

ColorDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ColorValue
```python
from channels import ColorValue
```

ColorValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Column
```python
from channels import Column
```

Column schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
align : :class:`LayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to row/column facet's subplot. The supported string values
    are ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    **Default value:** ``"all"``.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
center : bool
    Boolean flag indicating if facet's subviews should be centered relative to their
    respective rows or columns.

    **Default value:** ``false``
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
spacing : float
    The spacing in pixels between facet's sub-views.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Description
```python
from channels import Description
```

Description schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## DescriptionValue
```python
from channels import DescriptionValue
```

DescriptionValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Detail
```python
from channels import Detail
```

Detail schema wrapper.

Definition object for a data field, its type and transformation of an encoding channel.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Facet
```python
from channels import Facet
```

Facet schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to grid rows and columns. The supported string values are
    ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    Alternatively, an object value of the form ``{"row": string, "column": string}`` can
    be used to supply different alignments for rows and columns.

    **Default value:** ``"all"``.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
bounds : Literal['full', 'flush']
    The bounds calculation method to use for determining the extent of a sub-plot. One
    of ``full`` (the default) or ``flush``.

    * If set to ``full``, the entire calculated bounds (including axes, title, and
      legend) will be used.
    * If set to ``flush``, only the specified width and height values for the sub-view
      will be used. The ``flush`` setting can be useful when attempting to place
      sub-plots without axes or legends into a uniform grid structure.

    **Default value:** ``"full"``
center : bool, dict, :class:`RowColboolean`
    Boolean flag indicating if subviews should be centered relative to their respective
    rows or columns.

    An object value of the form ``{"row": boolean, "column": boolean}`` can be used to
    supply different centering values for rows and columns.

    **Default value:** ``false``
columns : float
    The number of columns to include in the view composition layout.

    **Default value**: ``undefined`` -- An infinite number of columns (a single row)
    will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the
    ``column`` channel (for ``facet`` and ``repeat``).

    **Note**:

    1) This property is only for:

    * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)
    * the ``facet`` and ``repeat`` operator with one field/repetition definition
      (without row/column nesting)

    2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)
    and to using the ``row`` channel (for ``facet`` and ``repeat``).
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
spacing : dict, float, :class:`RowColnumber`
    The spacing in pixels between sub-views of the composition operator. An object of
    the form ``{"row": number, "column": number}`` can be used to set different spacing
    values for rows and columns.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Fill
```python
from channels import Fill
```

Fill schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FillDatum
```python
from channels import FillDatum
```

FillDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FillValue
```python
from channels import FillValue
```

FillValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## FillOpacity
```python
from channels import FillOpacity
```

FillOpacity schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FillOpacityDatum
```python
from channels import FillOpacityDatum
```

FillOpacityDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## FillOpacityValue
```python
from channels import FillOpacityValue
```

FillOpacityValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Href
```python
from channels import Href
```

Href schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## HrefValue
```python
from channels import HrefValue
```

HrefValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Key
```python
from channels import Key
```

Key schema wrapper.

Definition object for a data field, its type and transformation of an encoding channel.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Latitude
```python
from channels import Latitude
```

Latitude schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : Literal['quantitative']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## LatitudeDatum
```python
from channels import LatitudeDatum
```

LatitudeDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Latitude2
```python
from channels import Latitude2
```

Latitude2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## Latitude2Datum
```python
from channels import Latitude2Datum
```

Latitude2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Latitude2Value
```python
from channels import Latitude2Value
```

Latitude2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Longitude
```python
from channels import Longitude
```

Longitude schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : Literal['quantitative']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## LongitudeDatum
```python
from channels import LongitudeDatum
```

LongitudeDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Longitude2
```python
from channels import Longitude2
```

Longitude2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## Longitude2Datum
```python
from channels import Longitude2Datum
```

Longitude2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Longitude2Value
```python
from channels import Longitude2Value
```

Longitude2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Opacity
```python
from channels import Opacity
```

Opacity schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## OpacityDatum
```python
from channels import OpacityDatum
```

OpacityDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## OpacityValue
```python
from channels import OpacityValue
```

OpacityValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Order
```python
from channels import Order
```

Order schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
sort : :class:`SortOrder`, Literal['ascending', 'descending']
    The sort order. One of ``"ascending"`` (default) or ``"descending"``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## OrderValue
```python
from channels import OrderValue
```

OrderValue schema wrapper.

Parameters
----------
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).
condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.

---
## Radius
```python
from channels import Radius
```

Radius schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## RadiusDatum
```python
from channels import RadiusDatum
```

RadiusDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## RadiusValue
```python
from channels import RadiusValue
```

RadiusValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Radius2
```python
from channels import Radius2
```

Radius2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## Radius2Datum
```python
from channels import Radius2Datum
```

Radius2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Radius2Value
```python
from channels import Radius2Value
```

Radius2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Row
```python
from channels import Row
```

Row schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
align : :class:`LayoutAlign`, Literal['all', 'each', 'none']
    The alignment to apply to row/column facet's subplot. The supported string values
    are ``"all"``, ``"each"``, and ``"none"``.

    * For ``"none"``, a flow layout will be used, in which adjacent subviews are simply
      placed one after the other.
    * For ``"each"``, subviews will be aligned into a clean grid structure, but each row
      or column may be of variable size.
    * For ``"all"``, subviews will be aligned and each row or column will be sized
      identically based on the maximum observed size. String values for this property
      will be applied to both grid rows and columns.

    **Default value:** ``"all"``.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
center : bool
    Boolean flag indicating if facet's subviews should be centered relative to their
    respective rows or columns.

    **Default value:** ``false``
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
header : dict, None, :class:`Header`
    An object defining properties of a facet's header.
sort : dict, None, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` is not supported for ``row`` and ``column``.
spacing : float
    The spacing in pixels between facet's sub-views.

    **Default value**: Depends on ``"spacing"`` property of `the view composition
    configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__
    (``20`` by default)
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Shape
```python
from channels import Shape
```

Shape schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ShapeDatum
```python
from channels import ShapeDatum
```

ShapeDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ShapeValue
```python
from channels import ShapeValue
```

ShapeValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Size
```python
from channels import Size
```

Size schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## SizeDatum
```python
from channels import SizeDatum
```

SizeDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## SizeValue
```python
from channels import SizeValue
```

SizeValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Stroke
```python
from channels import Stroke
```

Stroke schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeDatum
```python
from channels import StrokeDatum
```

StrokeDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeValue
```python
from channels import StrokeValue
```

StrokeValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## StrokeDash
```python
from channels import StrokeDash
```

StrokeDash schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeDashDatum
```python
from channels import StrokeDashDatum
```

StrokeDashDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeDashValue
```python
from channels import StrokeDashValue
```

StrokeDashValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, Sequence[float], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## StrokeOpacity
```python
from channels import StrokeOpacity
```

StrokeOpacity schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeOpacityDatum
```python
from channels import StrokeOpacityDatum
```

StrokeOpacityDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeOpacityValue
```python
from channels import StrokeOpacityValue
```

StrokeOpacityValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## StrokeWidth
```python
from channels import StrokeWidth
```

StrokeWidth schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
legend : dict, None, :class:`Legend`
    An object defining properties of the legend. If ``null``, the legend for the
    encoding channel will be removed.

    **Default value:** If undefined, default `legend properties
    <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.

    **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeWidthDatum
```python
from channels import StrokeWidthDatum
```

StrokeWidthDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## StrokeWidthValue
```python
from channels import StrokeWidthValue
```

StrokeWidthValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : dict, float, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Text
```python
from channels import Text
```

Text schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## TextDatum
```python
from channels import TextDatum
```

TextDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## TextValue
```python
from channels import TextValue
```

TextValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Theta
```python
from channels import Theta
```

Theta schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ThetaDatum
```python
from channels import ThetaDatum
```

ThetaDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## ThetaValue
```python
from channels import ThetaValue
```

ThetaValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Theta2
```python
from channels import Theta2
```

Theta2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## Theta2Datum
```python
from channels import Theta2Datum
```

Theta2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Theta2Value
```python
from channels import Theta2Value
```

Theta2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Tooltip
```python
from channels import Tooltip
```

Tooltip schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## TooltipValue
```python
from channels import TooltipValue
```

TooltipValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Url
```python
from channels import Url
```

Url schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]
    One or more value definition(s) with `a parameter or a test predicate
    <https://vega.github.io/vega-lite/docs/condition.html>`__.

    **Note:** A field definition's ``condition`` property can only contain `conditional
    value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__
    since Vega-Lite only allows at most one encoded field per encoding channel.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
format : str, dict, :class:`Dict`
    When used with the default ``"number"`` and ``"time"`` format type, the text
    formatting pattern for labels of guides (axes, legends, headers) and text marks.

    * If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's
      `number format pattern <https://github.com/d3/d3-format#locale_format>`__.
    * If the format type is ``"time"`` (e.g., for temporal fields), this is D3's `time
      format pattern <https://github.com/d3/d3-time-format#locale_format>`__.

    See the `format documentation <https://vega.github.io/vega-lite/docs/format.html>`__
    for more examples.

    When used with a `custom formatType
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this
    value will be passed as ``format`` alongside ``datum.value`` to the registered
    function.

    **Default value:**  Derived from `numberFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number
    format and from `timeFormat
    <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time
    format.
formatType : str
    The format type for labels. One of ``"number"``, ``"time"``, or a `registered custom
    format type
    <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.

    **Default value:**

    * ``"time"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.
    * ``"number"`` for quantitative fields as well as ordinal and nominal fields without
      ``timeUnit``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## UrlValue
```python
from channels import UrlValue
```

UrlValue schema wrapper.

Parameters
----------
condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]
    A field definition or one or more value definition(s) with a parameter predicate.
value : str, dict, None, :class:`ExprRef`
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## X
```python
from channels import X
```

X schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## XDatum
```python
from channels import XDatum
```

XDatum schema wrapper.

Parameters
----------
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## XValue
```python
from channels import XValue
```

XValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## X2
```python
from channels import X2
```

X2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## X2Datum
```python
from channels import X2Datum
```

X2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## X2Value
```python
from channels import X2Value
```

X2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## XError
```python
from channels import XError
```

XError schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## XErrorValue
```python
from channels import XErrorValue
```

XErrorValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## XError2
```python
from channels import XError2
```

XError2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## XError2Value
```python
from channels import XError2Value
```

XError2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## XOffset
```python
from channels import XOffset
```

XOffset schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## XOffsetDatum
```python
from channels import XOffsetDatum
```

XOffsetDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## XOffsetValue
```python
from channels import XOffsetValue
```

XOffsetValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Y
```python
from channels import Y
```

Y schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, Literal['binned'], :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## YDatum
```python
from channels import YDatum
```

YDatum schema wrapper.

Parameters
----------
axis : dict, None, :class:`Axis`
    An object defining properties of axis's gridlines, ticks and labels. If ``null``,
    the axis for the encoding channel will be removed.

    **Default value:** If undefined, default `axis properties
    <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.

    **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
impute : dict, None, :class:`ImputeParams`
    An object defining the properties of the Impute Operation to be applied. The field
    value of the other positional channel is taken as ``key`` of the ``Impute``
    Operation. The field of the ``color`` channel if specified is used as ``groupby`` of
    the ``Impute`` Operation.

    **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__
    documentation.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
stack : bool, None, :class:`StackOffset`, Literal['zero', 'center', 'normalize']
    Type of stacking offset if the field should be stacked. ``stack`` is only applicable
    for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For
    example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar
    chart.

    ``stack`` can be one of the following values:

    * ``"zero"`` or ``true``: stacking with baseline offset at zero value of the scale
      (for creating typical stacked `bar
      <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area
      <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).
    * ``"normalize"`` - stacking with normalized domain (for creating `normalized
      stacked bar and area charts
      <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts
      `with percentage tooltip
      <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).  :raw-html:`<br/>`
      -``"center"`` - stacking with center baseline (for `streamgraph
      <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).
    * ``null`` or ``false`` - No-stacking. This will produce layered `bar
      <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area
      chart.

    **Default value:** ``zero`` for plots with all of the following conditions are true:
    (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or
    y) has a linear scale; (3) At least one of non-position channels mapped to an
    unaggregated field that is different from x and y. Otherwise, ``null`` by default.

    **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## YValue
```python
from channels import YValue
```

YValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## Y2
```python
from channels import Y2
```

Y2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## Y2Datum
```python
from channels import Y2Datum
```

Y2Datum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## Y2Value
```python
from channels import Y2Value
```

Y2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : dict, float, :class:`ExprRef`, Literal['height', 'width']
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## YError
```python
from channels import YError
```

YError schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## YErrorValue
```python
from channels import YErrorValue
```

YErrorValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## YError2
```python
from channels import YError2
```

YError2 schema wrapper.

A field definition of a secondary channel that shares a scale with another primary channel.
For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : None
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.

---
## YError2Value
```python
from channels import YError2Value
```

YError2Value schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## YOffset
```python
from channels import YOffset
```

YOffset schema wrapper.

Parameters
----------
shorthand : str, dict, Sequence[str], :class:`RepeatRef`
    shorthand for field, aggregate, and type
aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']
    Aggregation function for the field (e.g., ``"mean"``, ``"sum"``, ``"median"``,
    ``"min"``, ``"max"``, ``"count"``).

    **Default value:** ``undefined`` (None)

    **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__
    documentation.
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
bin : bool, dict, None, :class:`BinParams`
    A flag for binning a ``quantitative`` field, `an object defining binning parameters
    <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating
    that the data for ``x`` or ``y`` channel are binned before they are imported into
    Vega-Lite (``"binned"``).

    * If ``true``, default `binning parameters
      <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be
      applied.

    * If ``"binned"``, this indicates that the data for the ``x`` (or ``y``) channel are
      already binned. You can map the bin-start field to ``x`` (or ``y``) and the
      bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar
      to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can
      also set the axis's `tickMinStep
      <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.

    **Default value:** ``false``

    **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__
    documentation.
field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`
    **Required.** A string defining the name of the field from which to pull a data
    value or an object defining iterated values from the `repeat
    <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.

    **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__
    documentation.

    **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access
    nested objects (e.g., ``"field": "foo.bar"`` and ``"field": "foo['bar']"``). If
    field names contain dots or brackets but are not nested, you can use ``\\`` to
    escape dots and brackets (e.g., ``"a\\.b"`` and ``"a\\[0\\]"``). See more details
    about escaping in the `field documentation
    <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required
    if ``aggregate`` is ``count``.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
sort : dict, None, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']
    Sort order for the encoded field.

    For continuous fields (quantitative or temporal), ``sort`` can be either
    ``"ascending"`` or ``"descending"``.

    For discrete fields, ``sort`` can be one of the following:

    * ``"ascending"`` or ``"descending"`` -- for sorting by the values' natural order in
      JavaScript.
    * `A string indicating an encoding channel name to sort by
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,
      ``"x"`` or ``"y"``) with an optional minus prefix for descending sort (e.g.,
      ``"-x"`` to sort by x-field, descending). This channel string is short-form of `a
      sort-by-encoding definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For
      example, ``"sort": "-x"`` is equivalent to ``"sort": {"encoding": "x", "order":
      "descending"}``.
    * `A sort field definition
      <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by
      another field.
    * `An array specifying the field values in preferred order
      <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the
      sort order will obey the values in the array, followed by any unspecified values
      in their original order. For discrete time field, values in the sort array can be
      `date-time definition objects
      <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time
      units ``"month"`` and ``"day"``, the values can be the month or day names (case
      insensitive) or their 3-letter initials (e.g., ``"Mon"``, ``"Tue"``).
    * ``null`` indicating no sort.

    **Default value:** ``"ascending"``

    **Note:** ``null`` and sorting by another channel is not supported for ``row`` and
    ``column``.

    **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__
    documentation.
timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']
    Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal
    field. or `a temporal field that gets casted as ordinal
    <https://vega.github.io/vega-lite/docs/type.html#cast>`__.

    **Default value:** ``undefined`` (None)

    **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## YOffsetDatum
```python
from channels import YOffsetDatum
```

YOffsetDatum schema wrapper.

Parameters
----------
bandPosition : float
    Relative position on a band of a stacked, binned, time unit, or band scale. For
    example, the marks will be positioned at the beginning of the band if set to ``0``,
    and at the middle of the band if set to ``0.5``.
datum : str, bool, dict, None, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`
    A constant value in data domain.
scale : dict, None, :class:`Scale`
    An object defining properties of the channel's scale, which is the function that
    transforms values in the data domain (numbers, dates, strings, etc) to visual values
    (pixels, colors, sizes) of the encoding channels.

    If ``null``, the scale will be `disabled and the data value will be directly encoded
    <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.

    **Default value:** If undefined, default `scale properties
    <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.

    **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__
    documentation.
title : str, None, :class:`Text`, Sequence[str]
    A title for the field. If ``null``, the title will be removed.

    **Default value:**  derived from the field's name and transformation function
    (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,
    the function is displayed as part of the title (e.g., ``"Sum of Profit"``). If the
    field is binned or has a time unit applied, the applied function is shown in
    parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"``).
    Otherwise, the title is simply the field name.

    **Notes**:

    1) You can customize the default field title format by providing the `fieldTitle
    <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in
    the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle
    function via the compile function's options
    <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.

    2) If both field definition's ``title`` and axis, header, or legend ``title`` are
    defined, axis/header/legend title will be used.
type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']
    The type of measurement (``"quantitative"``, ``"temporal"``, ``"ordinal"``, or
    ``"nominal"``) for the encoded field or constant value (``datum``). It can also be a
    ``"geojson"`` type for encoding `'geoshape'
    <https://vega.github.io/vega-lite/docs/geoshape.html>`__.

    Vega-Lite automatically infers data types in many cases as discussed below. However,
    type is required for a field if: (1) the field is not nominal and the field encoding
    has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale
    type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal
    scale for a field with ``bin`` or ``timeUnit``.

    **Default value:**

    1) For a data ``field``, ``"nominal"`` is the default data type unless the field
    encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or
    ``timeUnit`` that satisfies the following criteria:

    * ``"quantitative"`` is the default type if (1) the encoded field contains ``bin``
      or ``aggregate`` except ``"argmin"`` and ``"argmax"``, (2) the encoding channel is
      ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a
      quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.
    * ``"temporal"`` is the default type if (1) the encoded field contains ``timeUnit``
      or (2) the specified scale type is a time or utc scale
    * ``"ordinal"`` is the default type if (1) the encoded field contains a `custom sort
      order
      <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,
      (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding
      channel is ``order``.

    2) For a constant value in data domain (``datum``):

    * ``"quantitative"`` if the datum is a number
    * ``"nominal"`` if the datum is a string
    * ``"temporal"`` if the datum is `a date time object
      <https://vega.github.io/vega-lite/docs/datetime.html>`__

    **Note:**

    * Data ``type`` describes the semantics of the data rather than the primitive data
      types (number, string, etc.). The same primitive data type can have different
      types of measurement. For example, numeric data can represent quantitative,
      ordinal, or nominal data.
    * Data values for a temporal field can be either a date-time string (e.g.,
      ``"2015-03-07 12:32:17"``, ``"17:01"``, ``"2015-03-16"``. ``"2015"``) or a
      timestamp number (e.g., ``1552199579097``).
    * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the
      ``type`` property can be either ``"quantitative"`` (for using a linear bin scale)
      or `"ordinal" (for using an ordinal bin scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `timeUnit
      <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property
      can be either ``"temporal"`` (default, for using a temporal scale) or `"ordinal"
      (for using an ordinal scale)
      <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.
    * When using with `aggregate
      <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property
      refers to the post-aggregation data type. For example, we can calculate count
      ``distinct`` of a categorical field ``"cat"`` using ``{"aggregate": "distinct",
      "field": "cat"}``. The ``"type"`` of the aggregate output is ``"quantitative"``.
    * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have
      ``type`` as they must have exactly the same type as their primary channels (e.g.,
      ``x``, ``y``).

    **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__
    documentation.

---
## YOffsetValue
```python
from channels import YOffsetValue
```

YOffsetValue schema wrapper.

Definition object for a constant value (primitive value or gradient definition) of an
encoding channel.

Parameters
----------
value : float
    A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"`` / `gradient
    definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,
    values between ``0`` to ``1`` for opacity).

---
## _EncodingMixin
```python
from channels import _EncodingMixin
```



---
## EncodeKwds
```python
from channels import EncodeKwds
```

Encoding channels map properties of the data to visual properties of the chart.

Parameters
----------
angle
    Rotation angle of point and text marks.
color
    Color of the marks - either fill or stroke color based on  the ``filled`` property
    of mark definition. By default, ``color`` represents fill color for ``"area"``,
    ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` /
    stroke color for ``"line"`` and ``"point"``.

    **Default value:** If undefined, the default color depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,
    please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``
    encodings have higher precedence than ``color``, thus may override the ``color``
    encoding if conflicting encodings are specified. 2) See the scale documentation for
    more information about customizing `color scheme
    <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
column
    A field definition for the horizontal facet of trellis plots.
description
    A text description of this mark for ARIA accessibility (SVG output only). For SVG
    output the ``"aria-label"`` attribute will be set to this description.
detail
    Additional levels of detail for grouping data in aggregate views and in line, trail,
    and area marks without mapping data to a specific visual channel.
facet
    A field definition for the (flexible) facet of trellis plots.

    If either ``row`` or ``column`` is specified, this channel will be ignored.
fill
    Fill color of the marks. **Default value:** If undefined, the default color depends
    on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
fillOpacity
    Fill opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``
    property.
href
    A URL to load upon mouse click.
key
    A data field to use as a unique key for data binding. When a visualization's data is
    updated, the key value will be used to match data elements to existing mark
    instances. Use a key channel to enable object constancy for transitions over dynamic
    data.
latitude
    Latitude position of geographically projected marks.
latitude2
    Latitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
longitude
    Longitude position of geographically projected marks.
longitude2
    Longitude-2 position for geographically projected ranged ``"area"``, ``"bar"``,
    ``"rect"``, and  ``"rule"``.
opacity
    Opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``
    property.
order
    Order of the marks.

    * For stacked marks, this ``order`` channel encodes `stack order
      <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
    * For line and trail marks, this ``order`` channel encodes order of data points in
      the lines. This can be useful for creating `a connected scatterplot
      <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting
      ``order`` to ``{"value": null}`` makes the line marks use the original order in
      the data sources.
    * Otherwise, this ``order`` channel encodes layer order of the marks.

    **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid
    creating additional aggregation grouping.
radius
    The outer radius in pixels of arc marks.
radius2
    The inner radius in pixels of arc marks.
row
    A field definition for the vertical facet of trellis plots.
shape
    Shape of the mark.

    1. For ``point`` marks the supported values include:   - plotting shapes:
    ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
    ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``.   - the line
    symbol ``"stroke"``   - centered directional shapes ``"arrow"``, ``"wedge"``, or
    ``"triangle"``   - a custom `SVG path string
    <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct
    sizing, custom shape paths should be defined within a square bounding box with
    coordinates ranging from -1 to 1 along both the x and y dimensions.)

    2. For ``geoshape`` marks it should be a field definition of the geojson data

    **Default value:** If undefined, the default shape depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``
    property. (``"circle"`` if unset.)
size
    Size of the mark.

    * For ``"point"``, ``"square"`` and ``"circle"``, - the symbol size, or pixel area
      of the mark.
    * For ``"bar"`` and ``"tick"`` - the bar and tick's size.
    * For ``"text"`` - the text's font size.
    * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use ``"trail"``
      instead of line with varying size)
stroke
    Stroke color of the marks. **Default value:** If undefined, the default color
    depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``
    property.

    *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
strokeDash
    Stroke dash of the marks.

    **Default value:** ``[1,0]`` (No dash).
strokeOpacity
    Stroke opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``strokeOpacity`` property.
strokeWidth
    Stroke width of the marks.

    **Default value:** If undefined, the default stroke width depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``
    property.
text
    Text of the ``text`` mark.
theta
    * For arc marks, the arc length in radians if theta2 is not specified, otherwise the
      start arc angle. (A value of 0 indicates up or “north”, increasing values proceed
      clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
tooltip
    The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides
    `the tooltip property in the mark definition
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip in Vega-Lite.
url
    The URL of an image mark.
x
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"`` without
    specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
x2
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for the width
    of the plot.
xError
    Error value of x coordinates for error specified ``"errorbar"`` and ``"errorband"``.
xError2
    Secondary error value of x coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
xOffset
    Offset of x-position of the marks
y
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"`` without
    specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
y2
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and  ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for the
    height of the plot.
yError
    Error value of y coordinates for error specified ``"errorbar"`` and ``"errorband"``.
yError2
    Secondary error value of y coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
yOffset
    Offset of y-position of the marks

---
## to_dict
```python
from channels import to_dict
```



---
## aggregate
```python
from channels import aggregate
```



---
## bandPosition
```python
from channels import bandPosition
```



---
## bin
```python
from channels import bin
```



---
## condition
```python
from channels import condition
```



---
## field
```python
from channels import field
```



---
## legend
```python
from channels import legend
```



---
## scale
```python
from channels import scale
```



---
## sort
```python
from channels import sort
```



---
## timeUnit
```python
from channels import timeUnit
```



---
## title
```python
from channels import title
```



---
## type
```python
from channels import type
```



---
## __init__
```python
from channels import __init__
```



---
## align
```python
from channels import align
```



---
## center
```python
from channels import center
```



---
## header
```python
from channels import header
```



---
## spacing
```python
from channels import spacing
```



---
## format
```python
from channels import format
```



---
## formatType
```python
from channels import formatType
```



---
## bounds
```python
from channels import bounds
```



---
## columns
```python
from channels import columns
```



---
## stack
```python
from channels import stack
```



---
## axis
```python
from channels import axis
```



---
## impute
```python
from channels import impute
```



---
## encode
```python
from channels import encode
```

Map properties of the data to visual properties of the chart (see :class:`FacetedEncoding`).

Parameters
----------
angle : str, :class:`Angle`, Dict, :class:`AngleDatum`, :class:`AngleValue`
    Rotation angle of point and text marks.
color : str, :class:`Color`, Dict, :class:`ColorDatum`, :class:`ColorValue`
    Color of the marks - either fill or stroke color based on  the ``filled``
    property of mark definition. By default, ``color`` represents fill color for
    ``"area"``, ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``,
    and ``"square"`` / stroke color for ``"line"`` and ``"point"``.

    **Default value:** If undefined, the default color depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* 1) For fine-grained control over both fill and stroke colors of the
    marks, please use the ``fill`` and ``stroke`` channels. The ``fill`` or
    ``stroke`` encodings have higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified. 2)
    See the scale documentation for more information about customizing `color
    scheme <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.
column : str, :class:`Column`, Dict
    A field definition for the horizontal facet of trellis plots.
description : str, :class:`Description`, Dict, :class:`DescriptionValue`
    A text description of this mark for ARIA accessibility (SVG output only).
    For SVG output the ``"aria-label"`` attribute will be set to this
    description.
detail : str, :class:`Detail`, Dict, List
    Additional levels of detail for grouping data in aggregate views and in
    line, trail, and area marks without mapping data to a specific visual
    channel.
facet : str, :class:`Facet`, Dict
    A field definition for the (flexible) facet of trellis plots.

    If either ``row`` or ``column`` is specified, this channel will be ignored.
fill : str, :class:`Fill`, Dict, :class:`FillDatum`, :class:`FillValue`
    Fill color of the marks. **Default value:** If undefined, the default color
    depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may
    override the ``color`` encoding if conflicting encodings are specified.
fillOpacity : str, :class:`FillOpacity`, Dict, :class:`FillOpacityDatum`, :class:`FillOpacityValue`
    Fill opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``fillOpacity`` property.
href : str, :class:`Href`, Dict, :class:`HrefValue`
    A URL to load upon mouse click.
key : str, :class:`Key`, Dict
    A data field to use as a unique key for data binding. When a visualization's
    data is updated, the key value will be used to match data elements to
    existing mark instances. Use a key channel to enable object constancy for
    transitions over dynamic data.
latitude : str, :class:`Latitude`, Dict, :class:`LatitudeDatum`
    Latitude position of geographically projected marks.
latitude2 : str, :class:`Latitude2`, Dict, :class:`Latitude2Datum`, :class:`Latitude2Value`
    Latitude-2 position for geographically projected ranged ``"area"``,
    ``"bar"``, ``"rect"``, and  ``"rule"``.
longitude : str, :class:`Longitude`, Dict, :class:`LongitudeDatum`
    Longitude position of geographically projected marks.
longitude2 : str, :class:`Longitude2`, Dict, :class:`Longitude2Datum`, :class:`Longitude2Value`
    Longitude-2 position for geographically projected ranged ``"area"``,
    ``"bar"``, ``"rect"``, and  ``"rule"``.
opacity : str, :class:`Opacity`, Dict, :class:`OpacityDatum`, :class:`OpacityValue`
    Opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``opacity`` property.
order : str, :class:`Order`, Dict, List, :class:`OrderValue`
    Order of the marks.

    * For stacked marks, this ``order`` channel encodes `stack order
      <https://vega.github.io/vega-lite/docs/stack.html#order>`__.
    * For line and trail marks, this ``order`` channel encodes order of data
      points in the lines. This can be useful for creating `a connected
      scatterplot
      <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__.
      Setting ``order`` to ``{"value": null}`` makes the line marks use the
      original order in the data sources.
    * Otherwise, this ``order`` channel encodes layer order of the marks.

    **Note**: In aggregate plots, ``order`` field should be ``aggregate``d to
    avoid creating additional aggregation grouping.
radius : str, :class:`Radius`, Dict, :class:`RadiusDatum`, :class:`RadiusValue`
    The outer radius in pixels of arc marks.
radius2 : str, :class:`Radius2`, Dict, :class:`Radius2Datum`, :class:`Radius2Value`
    The inner radius in pixels of arc marks.
row : str, :class:`Row`, Dict
    A field definition for the vertical facet of trellis plots.
shape : str, :class:`Shape`, Dict, :class:`ShapeDatum`, :class:`ShapeValue`
    Shape of the mark.

    1. For ``point`` marks the supported values include:   - plotting shapes:
    ``"circle"``, ``"square"``, ``"cross"``, ``"diamond"``, ``"triangle-up"``,
    ``"triangle-down"``, ``"triangle-right"``, or ``"triangle-left"``.   - the
    line symbol ``"stroke"``   - centered directional shapes ``"arrow"``,
    ``"wedge"``, or ``"triangle"``   - a custom `SVG path string
    <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For
    correct sizing, custom shape paths should be defined within a square
    bounding box with coordinates ranging from -1 to 1 along both the x and y
    dimensions.)

    2. For ``geoshape`` marks it should be a field definition of the geojson
    data

    **Default value:** If undefined, the default shape depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s
    ``shape`` property. (``"circle"`` if unset.)
size : str, :class:`Size`, Dict, :class:`SizeDatum`, :class:`SizeValue`
    Size of the mark.

    * For ``"point"``, ``"square"`` and ``"circle"``, - the symbol size, or
      pixel area of the mark.
    * For ``"bar"`` and ``"tick"`` - the bar and tick's size.
    * For ``"text"`` - the text's font size.
    * Size is unsupported for ``"line"``, ``"area"``, and ``"rect"``. (Use
      ``"trail"`` instead of line with varying size)
stroke : str, :class:`Stroke`, Dict, :class:`StrokeDatum`, :class:`StrokeValue`
    Stroke color of the marks. **Default value:** If undefined, the default
    color depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``color`` property.

    *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus
    may override the ``color`` encoding if conflicting encodings are specified.
strokeDash : str, :class:`StrokeDash`, Dict, :class:`StrokeDashDatum`, :class:`StrokeDashValue`
    Stroke dash of the marks.

    **Default value:** ``[1,0]`` (No dash).
strokeOpacity : str, :class:`StrokeOpacity`, Dict, :class:`StrokeOpacityDatum`, :class:`StrokeOpacityValue`
    Stroke opacity of the marks.

    **Default value:** If undefined, the default opacity depends on `mark config
    <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``strokeOpacity`` property.
strokeWidth : str, :class:`StrokeWidth`, Dict, :class:`StrokeWidthDatum`, :class:`StrokeWidthValue`
    Stroke width of the marks.

    **Default value:** If undefined, the default stroke width depends on `mark
    config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s
    ``strokeWidth`` property.
text : str, :class:`Text`, Dict, :class:`TextDatum`, :class:`TextValue`
    Text of the ``text`` mark.
theta : str, :class:`Theta`, Dict, :class:`ThetaDatum`, :class:`ThetaValue`
    * For arc marks, the arc length in radians if theta2 is not specified,
      otherwise the start arc angle. (A value of 0 indicates up or “north”,
      increasing values proceed clockwise.)

    * For text marks, polar coordinate angle in radians.
theta2 : str, :class:`Theta2`, Dict, :class:`Theta2Datum`, :class:`Theta2Value`
    The end angle of arc marks in radians. A value of 0 indicates up or “north”,
    increasing values proceed clockwise.
tooltip : str, :class:`Tooltip`, Dict, List, :class:`TooltipValue`
    The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding
    overrides `the tooltip property in the mark definition
    <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.

    See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__
    documentation for a detailed discussion about tooltip in Vega-Lite.
url : str, :class:`Url`, Dict, :class:`UrlValue`
    The URL of an image mark.
x : str, :class:`X`, Dict, :class:`XDatum`, :class:`XValue`
    X coordinates of the marks, or width of horizontal ``"bar"`` and ``"area"``
    without specified ``x2`` or ``width``.

    The ``value`` of this channel can be a number or a string ``"width"`` for
    the width of the plot.
x2 : str, :class:`X2`, Dict, :class:`X2Datum`, :class:`X2Value`
    X2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and
    ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"width"`` for
    the width of the plot.
xError : str, :class:`XError`, Dict, :class:`XErrorValue`
    Error value of x coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
xError2 : str, :class:`XError2`, Dict, :class:`XError2Value`
    Secondary error value of x coordinates for error specified ``"errorbar"``
    and ``"errorband"``.
xOffset : str, :class:`XOffset`, Dict, :class:`XOffsetDatum`, :class:`XOffsetValue`
    Offset of x-position of the marks
y : str, :class:`Y`, Dict, :class:`YDatum`, :class:`YValue`
    Y coordinates of the marks, or height of vertical ``"bar"`` and ``"area"``
    without specified ``y2`` or ``height``.

    The ``value`` of this channel can be a number or a string ``"height"`` for
    the height of the plot.
y2 : str, :class:`Y2`, Dict, :class:`Y2Datum`, :class:`Y2Value`
    Y2 coordinates for ranged ``"area"``, ``"bar"``, ``"rect"``, and
    ``"rule"``.

    The ``value`` of this channel can be a number or a string ``"height"`` for
    the height of the plot.
yError : str, :class:`YError`, Dict, :class:`YErrorValue`
    Error value of y coordinates for error specified ``"errorbar"`` and
    ``"errorband"``.
yError2 : str, :class:`YError2`, Dict, :class:`YError2Value`
    Secondary error value of y coordinates for error specified ``"errorbar"``
    and ``"errorband"``.
yOffset : str, :class:`YOffset`, Dict, :class:`YOffsetDatum`, :class:`YOffsetValue`
    Offset of y-position of the marks

---
## __name__
```python
from py39 import __name__
```

Backward-compatability shims to support Python 3.9 and earlier.

---
## normalized_name
```python
from py39 import normalized_name
```

Honor name normalization for distributions that don't provide ``_normalized_name``.

---
## ep_matches
```python
from py39 import ep_matches
```

Workaround for ``EntryPoint`` objects without the ``matches`` method.

---
## __name__
```python
from py311 import __name__
```



---
## wrap
```python
from py311 import wrap
```

Workaround for https://github.com/python/cpython/issues/84538
to add backward compatibility for walk_up=True.
An example affected package is dask-labextension, which uses
jupyter-packaging to install JupyterLab javascript files outside
of site-packages.

---
## relative_to
```python
from py311 import relative_to
```



---
## __name__
```python
from test_tree import __name__
```

Tests for Beautiful Soup's tree traversal methods.

The tree traversal methods are the main advantage of using Beautiful
Soup over just using a parser.

Different parsers will build different Beautiful Soup trees given the
same markup, but all Beautiful Soup trees can be traversed with the
methods tested here.

---
## TestFind
```python
from test_tree import TestFind
```

Basic tests of the find() method.

find() just calls find_all() with limit=1, so it's not tested all
that thouroughly here.

---
## TestFindAll
```python
from test_tree import TestFindAll
```

Basic tests of the find_all() method.

---
## TestFindAllBasicNamespaces
```python
from test_tree import TestFindAllBasicNamespaces
```



---
## TestFindAllByName
```python
from test_tree import TestFindAllByName
```

Test ways of finding tags by tag name.

---
## TestFindAllByAttribute
```python
from test_tree import TestFindAllByAttribute
```



---
## TestSmooth
```python
from test_tree import TestSmooth
```

Test Tag.smooth.

---
## TestIndex
```python
from test_tree import TestIndex
```

Test Tag.index

---
## TestParentOperations
```python
from test_tree import TestParentOperations
```

Test navigation and searching through an element's parents.

---
## ProximityTest
```python
from test_tree import ProximityTest
```



---
## TestNextOperations
```python
from test_tree import TestNextOperations
```



---
## TestPreviousOperations
```python
from test_tree import TestPreviousOperations
```



---
## SiblingTest
```python
from test_tree import SiblingTest
```



---
## TestNextSibling
```python
from test_tree import TestNextSibling
```



---
## TestPreviousSibling
```python
from test_tree import TestPreviousSibling
```



---
## TestTreeModification
```python
from test_tree import TestTreeModification
```



---
## TestDeprecatedArguments
```python
from test_tree import TestDeprecatedArguments
```



---
## test_find_tag
```python
from test_tree import test_find_tag
```



---
## test_unicode_text_find
```python
from test_tree import test_unicode_text_find
```



---
## test_unicode_attribute_find
```python
from test_tree import test_unicode_attribute_find
```



---
## test_find_everything
```python
from test_tree import test_find_everything
```

Test an optimization that finds all tags.

---
## test_find_everything_with_name
```python
from test_tree import test_find_everything_with_name
```

Test an optimization that finds all tags with a given name.

---
## test_find_all_text_nodes
```python
from test_tree import test_find_all_text_nodes
```

You can search the tree for text nodes.

---
## test_find_all_limit
```python
from test_tree import test_find_all_limit
```

You can limit the number of items returned by find_all.

---
## test_calling_a_tag_is_calling_findall
```python
from test_tree import test_calling_a_tag_is_calling_findall
```



---
## test_find_all_with_self_referential_data_structure_does_not_cause_infinite_recursion
```python
from test_tree import test_find_all_with_self_referential_data_structure_does_not_cause_infinite_recursion
```



---
## test_find_all_resultset
```python
from test_tree import test_find_all_resultset
```

All find_all calls return a ResultSet

---
## test_find_by_namespaced_name
```python
from test_tree import test_find_by_namespaced_name
```



---
## setup_method
```python
from test_tree import setup_method
```



---
## test_find_all_by_tag_name
```python
from test_tree import test_find_all_by_tag_name
```



---
## test_find_all_by_name_and_text
```python
from test_tree import test_find_all_by_name_and_text
```



---
## test_find_all_on_non_root_element
```python
from test_tree import test_find_all_on_non_root_element
```



---
## test_calling_element_invokes_find_all
```python
from test_tree import test_calling_element_invokes_find_all
```



---
## test_find_all_by_tag_strainer
```python
from test_tree import test_find_all_by_tag_strainer
```



---
## test_find_all_by_tag_names
```python
from test_tree import test_find_all_by_tag_names
```



---
## test_find_all_by_tag_dict
```python
from test_tree import test_find_all_by_tag_dict
```



---
## test_find_all_by_tag_re
```python
from test_tree import test_find_all_by_tag_re
```



---
## test_find_all_with_tags_matching_method
```python
from test_tree import test_find_all_with_tags_matching_method
```



---
## test_find_with_multi_valued_attribute
```python
from test_tree import test_find_with_multi_valued_attribute
```



---
## test_find_all_by_attribute_name
```python
from test_tree import test_find_all_by_attribute_name
```



---
## test_find_all_by_utf8_attribute_value
```python
from test_tree import test_find_all_by_utf8_attribute_value
```



---
## test_find_all_by_attribute_dict
```python
from test_tree import test_find_all_by_attribute_dict
```



---
## test_find_all_by_class
```python
from test_tree import test_find_all_by_class
```



---
## test_find_by_class_when_multiple_classes_present
```python
from test_tree import test_find_by_class_when_multiple_classes_present
```



---
## test_find_all_with_non_dictionary_for_attrs_finds_by_class
```python
from test_tree import test_find_all_with_non_dictionary_for_attrs_finds_by_class
```



---
## test_find_all_with_string_for_attrs_finds_multiple_classes
```python
from test_tree import test_find_all_with_string_for_attrs_finds_multiple_classes
```



---
## test_find_all_by_attribute_soupstrainer
```python
from test_tree import test_find_all_by_attribute_soupstrainer
```



---
## test_find_all_with_missing_attribute
```python
from test_tree import test_find_all_with_missing_attribute
```



---
## test_find_all_with_defined_attribute
```python
from test_tree import test_find_all_with_defined_attribute
```



---
## test_find_all_with_numeric_attribute
```python
from test_tree import test_find_all_with_numeric_attribute
```



---
## test_find_all_with_list_attribute_values
```python
from test_tree import test_find_all_with_list_attribute_values
```



---
## test_find_all_with_regular_expression_attribute_value
```python
from test_tree import test_find_all_with_regular_expression_attribute_value
```



---
## test_find_by_name_and_containing_string
```python
from test_tree import test_find_by_name_and_containing_string
```



---
## test_find_by_name_and_containing_string_when_string_is_buried
```python
from test_tree import test_find_by_name_and_containing_string_when_string_is_buried
```



---
## test_find_by_attribute_and_containing_string
```python
from test_tree import test_find_by_attribute_and_containing_string
```



---
## test_smooth
```python
from test_tree import test_smooth
```



---
## test_index
```python
from test_tree import test_index
```



---
## test_parent
```python
from test_tree import test_parent
```



---
## test_parent_of_top_tag_is_soup_object
```python
from test_tree import test_parent_of_top_tag_is_soup_object
```



---
## test_soup_object_has_no_parent
```python
from test_tree import test_soup_object_has_no_parent
```



---
## test_find_parents
```python
from test_tree import test_find_parents
```



---
## test_find_parent
```python
from test_tree import test_find_parent
```



---
## test_parent_of_text_element
```python
from test_tree import test_parent_of_text_element
```



---
## test_text_element_find_parent
```python
from test_tree import test_text_element_find_parent
```



---
## test_parent_generator
```python
from test_tree import test_parent_generator
```



---
## test_next
```python
from test_tree import test_next
```



---
## test_next_of_last_item_is_none
```python
from test_tree import test_next_of_last_item_is_none
```



---
## test_next_of_root_is_none
```python
from test_tree import test_next_of_root_is_none
```



---
## test_find_all_next
```python
from test_tree import test_find_all_next
```



---
## test_find_next
```python
from test_tree import test_find_next
```



---
## test_find_next_for_text_element
```python
from test_tree import test_find_next_for_text_element
```



---
## test_next_generator
```python
from test_tree import test_next_generator
```



---
## test_previous
```python
from test_tree import test_previous
```



---
## test_previous_of_first_item_is_none
```python
from test_tree import test_previous_of_first_item_is_none
```



---
## test_previous_of_root_is_none
```python
from test_tree import test_previous_of_root_is_none
```



---
## test_find_all_previous
```python
from test_tree import test_find_all_previous
```



---
## test_find_previous
```python
from test_tree import test_find_previous
```



---
## test_find_previous_for_text_element
```python
from test_tree import test_find_previous_for_text_element
```



---
## test_previous_generator
```python
from test_tree import test_previous_generator
```



---
## test_next_sibling_of_root_is_none
```python
from test_tree import test_next_sibling_of_root_is_none
```



---
## test_next_sibling
```python
from test_tree import test_next_sibling
```



---
## test_next_sibling_may_not_exist
```python
from test_tree import test_next_sibling_may_not_exist
```



---
## test_find_next_sibling
```python
from test_tree import test_find_next_sibling
```



---
## test_next_siblings
```python
from test_tree import test_next_siblings
```



---
## test_next_sibling_for_text_element
```python
from test_tree import test_next_sibling_for_text_element
```



---
## test_previous_sibling_of_root_is_none
```python
from test_tree import test_previous_sibling_of_root_is_none
```



---
## test_previous_sibling
```python
from test_tree import test_previous_sibling
```



---
## test_previous_sibling_may_not_exist
```python
from test_tree import test_previous_sibling_may_not_exist
```



---
## test_find_previous_sibling
```python
from test_tree import test_find_previous_sibling
```



---
## test_previous_siblings
```python
from test_tree import test_previous_siblings
```



---
## test_previous_sibling_for_text_element
```python
from test_tree import test_previous_sibling_for_text_element
```



---
## test_attribute_modification
```python
from test_tree import test_attribute_modification
```



---
## test_new_tag_creation
```python
from test_tree import test_new_tag_creation
```



---
## test_append_to_contents_moves_tag
```python
from test_tree import test_append_to_contents_moves_tag
```



---
## test_replace_with_returns_thing_that_was_replaced
```python
from test_tree import test_replace_with_returns_thing_that_was_replaced
```



---
## test_unwrap_returns_thing_that_was_replaced
```python
from test_tree import test_unwrap_returns_thing_that_was_replaced
```



---
## test_replace_with_and_unwrap_give_useful_exception_when_tag_has_no_parent
```python
from test_tree import test_replace_with_and_unwrap_give_useful_exception_when_tag_has_no_parent
```



---
## test_replace_tag_with_itself
```python
from test_tree import test_replace_tag_with_itself
```



---
## test_replace_tag_with_its_parent_raises_exception
```python
from test_tree import test_replace_tag_with_its_parent_raises_exception
```



---
## test_insert_tag_into_itself_raises_exception
```python
from test_tree import test_insert_tag_into_itself_raises_exception
```



---
## test_insert_beautifulsoup_object_inserts_children
```python
from test_tree import test_insert_beautifulsoup_object_inserts_children
```

Inserting one BeautifulSoup object into another actually inserts all
of its children -- you'll never combine BeautifulSoup objects.

---
## test_replace_with_maintains_next_element_throughout
```python
from test_tree import test_replace_with_maintains_next_element_throughout
```



---
## test_replace_final_node
```python
from test_tree import test_replace_final_node
```



---
## test_consecutive_text_nodes
```python
from test_tree import test_consecutive_text_nodes
```



---
## test_insert_string
```python
from test_tree import test_insert_string
```



---
## test_insert_tag
```python
from test_tree import test_insert_tag
```



---
## test_append_child_thats_already_at_the_end
```python
from test_tree import test_append_child_thats_already_at_the_end
```



---
## test_extend
```python
from test_tree import test_extend
```



---
## test_extend_with_another_tags_contents
```python
from test_tree import test_extend_with_another_tags_contents
```



---
## test_move_tag_to_beginning_of_parent
```python
from test_tree import test_move_tag_to_beginning_of_parent
```



---
## test_insert_works_on_empty_element_tag
```python
from test_tree import test_insert_works_on_empty_element_tag
```



---
## test_insert_before
```python
from test_tree import test_insert_before
```



---
## test_insert_multiple_before
```python
from test_tree import test_insert_multiple_before
```



---
## test_insert_after
```python
from test_tree import test_insert_after
```



---
## test_insert_multiple_after
```python
from test_tree import test_insert_multiple_after
```



---
## test_insert_after_raises_exception_if_after_has_no_meaning
```python
from test_tree import test_insert_after_raises_exception_if_after_has_no_meaning
```



---
## test_insert_before_raises_notimplementederror_if_before_has_no_meaning
```python
from test_tree import test_insert_before_raises_notimplementederror_if_before_has_no_meaning
```



---
## test_replace_with
```python
from test_tree import test_replace_with
```



---
## test_replace_with_errors
```python
from test_tree import test_replace_with_errors
```



---
## test_replace_with_multiple
```python
from test_tree import test_replace_with_multiple
```



---
## test_replace_first_child
```python
from test_tree import test_replace_first_child
```



---
## test_replace_last_child
```python
from test_tree import test_replace_last_child
```



---
## test_nested_tag_replace_with
```python
from test_tree import test_nested_tag_replace_with
```



---
## test_unwrap
```python
from test_tree import test_unwrap
```



---
## test_wrap
```python
from test_tree import test_wrap
```



---
## test_wrap_extracts_tag_from_elsewhere
```python
from test_tree import test_wrap_extracts_tag_from_elsewhere
```



---
## test_wrap_puts_new_contents_at_the_end
```python
from test_tree import test_wrap_puts_new_contents_at_the_end
```



---
## test_extract
```python
from test_tree import test_extract
```



---
## test_extract_distinguishes_between_identical_strings
```python
from test_tree import test_extract_distinguishes_between_identical_strings
```



---
## test_extract_multiples_of_same_tag
```python
from test_tree import test_extract_multiples_of_same_tag
```



---
## test_extract_works_when_element_is_surrounded_by_identical_strings
```python
from test_tree import test_extract_works_when_element_is_surrounded_by_identical_strings
```



---
## test_clear
```python
from test_tree import test_clear
```

Tag.clear()

---
## test_decompose
```python
from test_tree import test_decompose
```



---
## test_string_set
```python
from test_tree import test_string_set
```

Tag.string = 'string'

---
## test_string_set_does_not_affect_original_string
```python
from test_tree import test_string_set_does_not_affect_original_string
```



---
## test_set_string_preserves_class_of_string
```python
from test_tree import test_set_string_preserves_class_of_string
```



---
## test_find_type_method_string
```python
from test_tree import test_find_type_method_string
```



---
## test_soupstrainer_constructor_string
```python
from test_tree import test_soupstrainer_constructor_string
```



---
## id_matches_name
```python
from test_tree import id_matches_name
```



---
## big_attribute_value
```python
from test_tree import big_attribute_value
```



---
## small_attribute_value
```python
from test_tree import small_attribute_value
```



---
## __name__
```python
from test_soup import __name__
```

Tests of Beautiful Soup as a whole.

---
## TestConstructor
```python
from test_soup import TestConstructor
```



---
## TestOutput
```python
from test_soup import TestOutput
```



---
## TestWarnings
```python
from test_soup import TestWarnings
```



---
## TestSelectiveParsing
```python
from test_soup import TestSelectiveParsing
```



---
## TestNewTag
```python
from test_soup import TestNewTag
```

Test the BeautifulSoup.new_tag() method.

---
## TestNewString
```python
from test_soup import TestNewString
```

Test the BeautifulSoup.new_string() method.

---
## TestPickle
```python
from test_soup import TestPickle
```



---
## TestEncodingConversion
```python
from test_soup import TestEncodingConversion
```



---
## test_short_unicode_input
```python
from test_soup import test_short_unicode_input
```



---
## test_embedded_null
```python
from test_soup import test_embedded_null
```



---
## test_exclude_encodings
```python
from test_soup import test_exclude_encodings
```



---
## test_custom_builder_class
```python
from test_soup import test_custom_builder_class
```



---
## test_parser_markup_rejection
```python
from test_soup import test_parser_markup_rejection
```



---
## test_cdata_list_attributes
```python
from test_soup import test_cdata_list_attributes
```



---
## test_replacement_classes
```python
from test_soup import test_replacement_classes
```



---
## test_alternate_string_containers
```python
from test_soup import test_alternate_string_containers
```



---
## test_decode_xml_declaration
```python
from test_soup import test_decode_xml_declaration
```



---
## test_decode_xml_declaration_with_missing_or_python_internal_eventual_encoding
```python
from test_soup import test_decode_xml_declaration_with_missing_or_python_internal_eventual_encoding
```



---
## test
```python
from test_soup import test
```



---
## _assert_warning
```python
from test_soup import _assert_warning
```



---
## _assert_no_parser_specified
```python
from test_soup import _assert_no_parser_specified
```



---
## test_warning_if_no_parser_specified
```python
from test_soup import test_warning_if_no_parser_specified
```



---
## test_warning_if_parser_specified_too_vague
```python
from test_soup import test_warning_if_parser_specified_too_vague
```



---
## test_no_warning_if_explicit_parser_specified
```python
from test_soup import test_no_warning_if_explicit_parser_specified
```



---
## test_parseOnlyThese_renamed_to_parse_only
```python
from test_soup import test_parseOnlyThese_renamed_to_parse_only
```



---
## test_fromEncoding_renamed_to_from_encoding
```python
from test_soup import test_fromEncoding_renamed_to_from_encoding
```



---
## test_unrecognized_keyword_argument
```python
from test_soup import test_unrecognized_keyword_argument
```



---
## test_resembles_filename_warning
```python
from test_soup import test_resembles_filename_warning
```



---
## test_resembles_filename_no_warning
```python
from test_soup import test_resembles_filename_no_warning
```



---
## test_url_warning_with_bytes_url
```python
from test_soup import test_url_warning_with_bytes_url
```



---
## test_url_warning_with_unicode_url
```python
from test_soup import test_url_warning_with_unicode_url
```



---
## test_url_warning_with_bytes_and_space
```python
from test_soup import test_url_warning_with_bytes_and_space
```



---
## test_url_warning_with_unicode_and_space
```python
from test_soup import test_url_warning_with_unicode_and_space
```



---
## test_parse_with_soupstrainer
```python
from test_soup import test_parse_with_soupstrainer
```



---
## test_new_tag
```python
from test_soup import test_new_tag
```



---
## test_xml_tag_inherits_self_closing_rules_from_builder
```python
from test_soup import test_xml_tag_inherits_self_closing_rules_from_builder
```



---
## test_tag_inherits_self_closing_rules_from_builder
```python
from test_soup import test_tag_inherits_self_closing_rules_from_builder
```



---
## test_new_string_creates_navigablestring
```python
from test_soup import test_new_string_creates_navigablestring
```



---
## test_new_string_can_create_navigablestring_subclass
```python
from test_soup import test_new_string_can_create_navigablestring_subclass
```



---
## test_normal_pickle
```python
from test_soup import test_normal_pickle
```



---
## test_pickle_with_no_builder
```python
from test_soup import test_pickle_with_no_builder
```



---
## setup_method
```python
from test_soup import setup_method
```



---
## test_ascii_in_unicode_out
```python
from test_soup import test_ascii_in_unicode_out
```



---
## test_unicode_in_unicode_out
```python
from test_soup import test_unicode_in_unicode_out
```



---
## test_utf8_in_unicode_out
```python
from test_soup import test_utf8_in_unicode_out
```



---
## test_utf8_out
```python
from test_soup import test_utf8_out
```



---
## Mock
```python
from test_soup import Mock
```



---
## prepare_markup
```python
from test_soup import prepare_markup
```



---
## TagPlus
```python
from test_soup import TagPlus
```



---
## StringPlus
```python
from test_soup import StringPlus
```



---
## CommentPlus
```python
from test_soup import CommentPlus
```



---
## PString
```python
from test_soup import PString
```



---
## BString
```python
from test_soup import BString
```



---
## __init__
```python
from test_soup import __init__
```



---
## initialize_soup
```python
from test_soup import initialize_soup
```



---
## feed
```python
from test_soup import feed
```



---
## reset
```python
from test_soup import reset
```



---
## ignore
```python
from test_soup import ignore
```



---
## noop
```python
from test_soup import noop
```



---
## __name__
```python
from test_lxml import __name__
```

Tests to ensure that the lxml tree builder generates good trees.

---
## TestLXMLTreeBuilder
```python
from test_lxml import TestLXMLTreeBuilder
```

See ``HTMLTreeBuilderSmokeTest``.

---
## TestLXMLXMLTreeBuilder
```python
from test_lxml import TestLXMLXMLTreeBuilder
```

See ``HTMLTreeBuilderSmokeTest``.

---
## default_builder
```python
from test_lxml import default_builder
```



---
## test_out_of_range_entity
```python
from test_lxml import test_out_of_range_entity
```



---
## test_entities_in_foreign_document_encoding
```python
from test_lxml import test_entities_in_foreign_document_encoding
```



---
## test_empty_doctype
```python
from test_lxml import test_empty_doctype
```



---
## test_beautifulstonesoup_is_xml_parser
```python
from test_lxml import test_beautifulstonesoup_is_xml_parser
```



---
## test_tracking_line_numbers
```python
from test_lxml import test_tracking_line_numbers
```



---
## test_namespace_indexing
```python
from test_lxml import test_namespace_indexing
```



---
## test_namespace_interaction_with_select_and_find
```python
from test_lxml import test_namespace_interaction_with_select_and_find
```



---
## test_pickle_restores_builder
```python
from test_lxml import test_pickle_restores_builder
```



---
## __name__
```python
from test_dammit import __name__
```



---
## TestUnicodeDammit
```python
from test_dammit import TestUnicodeDammit
```

Standalone tests of UnicodeDammit.

---
## TestEncodingDetector
```python
from test_dammit import TestEncodingDetector
```



---
## TestEntitySubstitution
```python
from test_dammit import TestEntitySubstitution
```

Standalone tests of the EntitySubstitution class.

---
## test_unicode_input
```python
from test_dammit import test_unicode_input
```



---
## test_smart_quotes_to
```python
from test_dammit import test_smart_quotes_to
```

Verify the functionality of the smart_quotes_to argument
to the UnicodeDammit constructor.

---
## test_detect_utf8
```python
from test_dammit import test_detect_utf8
```



---
## test_convert_hebrew
```python
from test_dammit import test_convert_hebrew
```



---
## test_dont_see_smart_quotes_where_there_are_none
```python
from test_dammit import test_dont_see_smart_quotes_where_there_are_none
```



---
## test_ignore_inappropriate_codecs
```python
from test_dammit import test_ignore_inappropriate_codecs
```



---
## test_ignore_invalid_codecs
```python
from test_dammit import test_ignore_invalid_codecs
```



---
## test_exclude_encodings
```python
from test_dammit import test_exclude_encodings
```



---
## test_encoding_detector_replaces_junk_in_encoding_name_with_replacement_character
```python
from test_dammit import test_encoding_detector_replaces_junk_in_encoding_name_with_replacement_character
```



---
## test_detect_html5_style_meta_tag
```python
from test_dammit import test_detect_html5_style_meta_tag
```



---
## test_last_ditch_entity_replacement
```python
from test_dammit import test_last_ditch_entity_replacement
```



---
## test_byte_order_mark_removed
```python
from test_dammit import test_byte_order_mark_removed
```



---
## test_known_definite_versus_user_encodings
```python
from test_dammit import test_known_definite_versus_user_encodings
```



---
## test_deprecated_override_encodings
```python
from test_dammit import test_deprecated_override_encodings
```



---
## test_detwingle
```python
from test_dammit import test_detwingle
```



---
## test_detwingle_ignores_multibyte_characters
```python
from test_dammit import test_detwingle_ignores_multibyte_characters
```



---
## test_find_declared_encoding
```python
from test_dammit import test_find_declared_encoding
```



---
## setup_method
```python
from test_dammit import setup_method
```



---
## test_substitute_html
```python
from test_dammit import test_substitute_html
```



---
## test_html5_entity
```python
from test_dammit import test_html5_entity
```



---
## test_html5_entity_with_variation_selector
```python
from test_dammit import test_html5_entity_with_variation_selector
```



---
## test_xml_converstion_includes_no_quotes_if_make_quoted_attribute_is_false
```python
from test_dammit import test_xml_converstion_includes_no_quotes_if_make_quoted_attribute_is_false
```



---
## test_xml_attribute_quoting_normally_uses_double_quotes
```python
from test_dammit import test_xml_attribute_quoting_normally_uses_double_quotes
```



---
## test_xml_attribute_quoting_uses_single_quotes_when_value_contains_double_quotes
```python
from test_dammit import test_xml_attribute_quoting_uses_single_quotes_when_value_contains_double_quotes
```



---
## test_xml_attribute_quoting_escapes_single_quotes_when_value_contains_both_single_and_double_quotes
```python
from test_dammit import test_xml_attribute_quoting_escapes_single_quotes_when_value_contains_both_single_and_double_quotes
```



---
## test_xml_quotes_arent_escaped_when_value_is_not_being_quoted
```python
from test_dammit import test_xml_quotes_arent_escaped_when_value_is_not_being_quoted
```



---
## test_xml_quoting_handles_angle_brackets
```python
from test_dammit import test_xml_quoting_handles_angle_brackets
```



---
## test_xml_quoting_handles_ampersands
```python
from test_dammit import test_xml_quoting_handles_ampersands
```



---
## test_xml_quoting_including_ampersands_when_they_are_part_of_an_entity
```python
from test_dammit import test_xml_quoting_including_ampersands_when_they_are_part_of_an_entity
```



---
## test_xml_quoting_ignoring_ampersands_when_they_are_part_of_an_entity
```python
from test_dammit import test_xml_quoting_ignoring_ampersands_when_they_are_part_of_an_entity
```



---
## test_quotes_not_html_substituted
```python
from test_dammit import test_quotes_not_html_substituted
```

There's no need to do this except inside attribute values.

---
## noop
```python
from test_dammit import noop
```



---
## __name__
```python
from test_docs import __name__
```



---
## __name__
```python
from test_navigablestring import __name__
```



---
## TestNavigableString
```python
from test_navigablestring import TestNavigableString
```



---
## TestNavigableStringSubclasses
```python
from test_navigablestring import TestNavigableStringSubclasses
```



---
## test_text_acquisition_methods
```python
from test_navigablestring import test_text_acquisition_methods
```



---
## test_string_has_immutable_name_property
```python
from test_navigablestring import test_string_has_immutable_name_property
```



---
## test_cdata
```python
from test_navigablestring import test_cdata
```



---
## test_cdata_is_never_formatted
```python
from test_navigablestring import test_cdata_is_never_formatted
```

Text inside a CData object is passed into the formatter.

But the return value is ignored.

---
## test_doctype_ends_in_newline
```python
from test_navigablestring import test_doctype_ends_in_newline
```



---
## test_declaration
```python
from test_navigablestring import test_declaration
```



---
## test_default_string_containers
```python
from test_navigablestring import test_default_string_containers
```



---
## test_ruby_strings
```python
from test_navigablestring import test_ruby_strings
```



---
## increment
```python
from test_navigablestring import increment
```



---
## __name__
```python
from test_element import __name__
```

Tests of classes in element.py.

The really big classes -- Tag, PageElement, and NavigableString --
are tested in separate files.

---
## TestNamedspacedAttribute
```python
from test_element import TestNamedspacedAttribute
```



---
## TestAttributeValueWithCharsetSubstitution
```python
from test_element import TestAttributeValueWithCharsetSubstitution
```

Certain attributes are designed to have the charset of the
final document substituted into their value.

---
## test_name_may_be_none_or_missing
```python
from test_element import test_name_may_be_none_or_missing
```



---
## test_namespace_may_be_none_or_missing
```python
from test_element import test_namespace_may_be_none_or_missing
```



---
## test_attribute_is_equivalent_to_colon_separated_string
```python
from test_element import test_attribute_is_equivalent_to_colon_separated_string
```



---
## test_attributes_are_equivalent_if_prefix_and_name_identical
```python
from test_element import test_attributes_are_equivalent_if_prefix_and_name_identical
```



---
## test_content_meta_attribute_value
```python
from test_element import test_content_meta_attribute_value
```



---
## SoupTest
```python
from __init__ import SoupTest
```



---
## TreeBuilderSmokeTest
```python
from __init__ import TreeBuilderSmokeTest
```



---
## HTMLTreeBuilderSmokeTest
```python
from __init__ import HTMLTreeBuilderSmokeTest
```

A basic test of a treebuilder's competence.

Any HTML treebuilder, present or future, should be able to pass
these tests. With invalid markup, there's room for interpretation,
and different parsers can handle it differently. But with the
markup in these tests, there's not much room for interpretation.

---
## XMLTreeBuilderSmokeTest
```python
from __init__ import XMLTreeBuilderSmokeTest
```



---
## HTML5TreeBuilderSmokeTest
```python
from __init__ import HTML5TreeBuilderSmokeTest
```

Smoke test for a tree builder that supports HTML5.

---
## default_builder
```python
from __init__ import default_builder
```



---
## soup
```python
from __init__ import soup
```

Build a Beautiful Soup object from markup.

---
## document_for
```python
from __init__ import document_for
```

Turn an HTML fragment into a document.

The details depend on the builder.

---
## assert_soup
```python
from __init__ import assert_soup
```

Parse some markup using Beautiful Soup and verify that
the output markup is as expected.

---
## assertConnectedness
```python
from __init__ import assertConnectedness
```

Ensure that next_element and previous_element are properly
set for all descendants of the given element.

---
## linkage_validator
```python
from __init__ import linkage_validator
```

Ensure proper linkage throughout the document.

---
## assert_selects
```python
from __init__ import assert_selects
```

Make sure that the given tags have the correct text.

This is used in tests that define a bunch of tags, each
containing a single string, and then select certain strings by
some mechanism.

---
## assert_selects_ids
```python
from __init__ import assert_selects_ids
```

Make sure that the given tags have the correct IDs.

This is used in tests that define a bunch of tags, each
containing a single string, and then select certain strings by
some mechanism.

---
## test_attribute_not_multi_valued
```python
from __init__ import test_attribute_not_multi_valued
```



---
## test_attribute_multi_valued
```python
from __init__ import test_attribute_multi_valued
```



---
## test_invalid_doctype
```python
from __init__ import test_invalid_doctype
```



---
## test_empty_element_tags
```python
from __init__ import test_empty_element_tags
```

Verify consistent handling of empty-element tags,
no matter how they come in through the markup.

---
## test_special_string_containers
```python
from __init__ import test_special_string_containers
```



---
## test_pickle_and_unpickle_identity
```python
from __init__ import test_pickle_and_unpickle_identity
```



---
## assertDoctypeHandled
```python
from __init__ import assertDoctypeHandled
```

Assert that a given doctype string is handled correctly.

---
## _document_with_doctype
```python
from __init__ import _document_with_doctype
```

Generate and parse a document with the given doctype.

---
## test_normal_doctypes
```python
from __init__ import test_normal_doctypes
```

Make sure normal, everyday HTML doctypes are handled correctly.

---
## test_empty_doctype
```python
from __init__ import test_empty_doctype
```



---
## test_mixed_case_doctype
```python
from __init__ import test_mixed_case_doctype
```



---
## test_public_doctype_with_url
```python
from __init__ import test_public_doctype_with_url
```



---
## test_system_doctype
```python
from __init__ import test_system_doctype
```



---
## test_namespaced_system_doctype
```python
from __init__ import test_namespaced_system_doctype
```



---
## test_namespaced_public_doctype
```python
from __init__ import test_namespaced_public_doctype
```



---
## test_real_xhtml_document
```python
from __init__ import test_real_xhtml_document
```



---
## test_namespaced_html
```python
from __init__ import test_namespaced_html
```



---
## test_detect_xml_parsed_as_html
```python
from __init__ import test_detect_xml_parsed_as_html
```



---
## test_processing_instruction
```python
from __init__ import test_processing_instruction
```



---
## test_deepcopy
```python
from __init__ import test_deepcopy
```

Make sure you can copy the tree builder.

This is important because the builder is part of a
BeautifulSoup object, and we want to be able to copy that.

---
## test_p_tag_is_never_empty_element
```python
from __init__ import test_p_tag_is_never_empty_element
```

A <p> tag is never designated as an empty-element tag.

Even if the markup shows it as an empty-element tag, it
shouldn't be presented that way.

---
## test_unclosed_tags_get_closed
```python
from __init__ import test_unclosed_tags_get_closed
```

A tag that's not closed by the end of the document should be closed.

This applies to all tags except empty-element tags.

---
## test_br_is_always_empty_element_tag
```python
from __init__ import test_br_is_always_empty_element_tag
```

A <br> tag is designated as an empty-element tag.

Some parsers treat <br></br> as one <br/> tag, some parsers as
two tags, but it should always be an empty-element tag.

---
## test_nested_formatting_elements
```python
from __init__ import test_nested_formatting_elements
```



---
## test_double_head
```python
from __init__ import test_double_head
```



---
## test_comment
```python
from __init__ import test_comment
```



---
## test_preserved_whitespace_in_pre_and_textarea
```python
from __init__ import test_preserved_whitespace_in_pre_and_textarea
```

Whitespace must be preserved in <pre> and <textarea> tags,
even if that would mean not prettifying the markup.

---
## test_nested_inline_elements
```python
from __init__ import test_nested_inline_elements
```

Inline elements can be nested indefinitely.

---
## test_nested_block_level_elements
```python
from __init__ import test_nested_block_level_elements
```

Block elements can be nested.

---
## test_correctly_nested_tables
```python
from __init__ import test_correctly_nested_tables
```

One table can go inside another one.

---
## test_multivalued_attribute_with_whitespace
```python
from __init__ import test_multivalued_attribute_with_whitespace
```



---
## test_deeply_nested_multivalued_attribute
```python
from __init__ import test_deeply_nested_multivalued_attribute
```



---
## test_multivalued_attribute_on_html
```python
from __init__ import test_multivalued_attribute_on_html
```



---
## test_angle_brackets_in_attribute_values_are_escaped
```python
from __init__ import test_angle_brackets_in_attribute_values_are_escaped
```



---
## test_strings_resembling_character_entity_references
```python
from __init__ import test_strings_resembling_character_entity_references
```



---
## test_apos_entity
```python
from __init__ import test_apos_entity
```



---
## test_entities_in_foreign_document_encoding
```python
from __init__ import test_entities_in_foreign_document_encoding
```



---
## test_entities_in_attributes_converted_to_unicode
```python
from __init__ import test_entities_in_attributes_converted_to_unicode
```



---
## test_entities_in_text_converted_to_unicode
```python
from __init__ import test_entities_in_text_converted_to_unicode
```



---
## test_quot_entity_converted_to_quotation_mark
```python
from __init__ import test_quot_entity_converted_to_quotation_mark
```



---
## test_out_of_range_entity
```python
from __init__ import test_out_of_range_entity
```



---
## test_multipart_strings
```python
from __init__ import test_multipart_strings
```

Mostly to prevent a recurrence of a bug in the html5lib treebuilder.

---
## test_head_tag_between_head_and_body
```python
from __init__ import test_head_tag_between_head_and_body
```

Prevent recurrence of a bug in the html5lib treebuilder.

---
## test_multiple_copies_of_a_tag
```python
from __init__ import test_multiple_copies_of_a_tag
```

Prevent recurrence of a bug in the html5lib treebuilder.

---
## test_basic_namespaces
```python
from __init__ import test_basic_namespaces
```

Parsers don't need to *understand* namespaces, but at the
very least they should not choke on namespaces or lose
data.

---
## test_multivalued_attribute_value_becomes_list
```python
from __init__ import test_multivalued_attribute_value_becomes_list
```



---
## test_can_parse_unicode_document
```python
from __init__ import test_can_parse_unicode_document
```



---
## test_soupstrainer
```python
from __init__ import test_soupstrainer
```

Parsers should be able to work with SoupStrainers.

---
## test_single_quote_attribute_values_become_double_quotes
```python
from __init__ import test_single_quote_attribute_values_become_double_quotes
```



---
## test_attribute_values_with_nested_quotes_are_left_alone
```python
from __init__ import test_attribute_values_with_nested_quotes_are_left_alone
```



---
## test_attribute_values_with_double_nested_quotes_get_quoted
```python
from __init__ import test_attribute_values_with_double_nested_quotes_get_quoted
```



---
## test_ampersand_in_attribute_value_gets_escaped
```python
from __init__ import test_ampersand_in_attribute_value_gets_escaped
```



---
## test_escaped_ampersand_in_attribute_value_is_left_alone
```python
from __init__ import test_escaped_ampersand_in_attribute_value_is_left_alone
```



---
## test_entities_in_strings_converted_during_parsing
```python
from __init__ import test_entities_in_strings_converted_during_parsing
```



---
## test_smart_quotes_converted_on_the_way_in
```python
from __init__ import test_smart_quotes_converted_on_the_way_in
```



---
## test_non_breaking_spaces_converted_on_the_way_in
```python
from __init__ import test_non_breaking_spaces_converted_on_the_way_in
```



---
## test_entities_converted_on_the_way_out
```python
from __init__ import test_entities_converted_on_the_way_out
```



---
## test_real_iso_8859_document
```python
from __init__ import test_real_iso_8859_document
```



---
## test_real_shift_jis_document
```python
from __init__ import test_real_shift_jis_document
```



---
## test_real_hebrew_document
```python
from __init__ import test_real_hebrew_document
```



---
## test_meta_tag_reflects_current_encoding
```python
from __init__ import test_meta_tag_reflects_current_encoding
```



---
## test_html5_style_meta_tag_reflects_current_encoding
```python
from __init__ import test_html5_style_meta_tag_reflects_current_encoding
```



---
## test_python_specific_encodings_not_used_in_charset
```python
from __init__ import test_python_specific_encodings_not_used_in_charset
```



---
## test_tag_with_no_attributes_can_have_attributes_added
```python
from __init__ import test_tag_with_no_attributes_can_have_attributes_added
```



---
## test_closing_tag_with_no_opening_tag
```python
from __init__ import test_closing_tag_with_no_opening_tag
```



---
## test_worst_case
```python
from __init__ import test_worst_case
```

Test the worst case (currently) for linking issues.

---
## test_docstring_generated
```python
from __init__ import test_docstring_generated
```



---
## test_xml_declaration
```python
from __init__ import test_xml_declaration
```



---
## test_python_specific_encodings_not_used_in_xml_declaration
```python
from __init__ import test_python_specific_encodings_not_used_in_xml_declaration
```



---
## test_nested_namespaces
```python
from __init__ import test_nested_namespaces
```



---
## test_formatter_processes_script_tag_for_xml_documents
```python
from __init__ import test_formatter_processes_script_tag_for_xml_documents
```



---
## test_can_parse_unicode_document_begining_with_bom
```python
from __init__ import test_can_parse_unicode_document_begining_with_bom
```



---
## test_popping_namespaced_tag
```python
from __init__ import test_popping_namespaced_tag
```



---
## test_docstring_includes_correct_encoding
```python
from __init__ import test_docstring_includes_correct_encoding
```



---
## test_large_xml_document
```python
from __init__ import test_large_xml_document
```

A large XML document should come out the same as it went in.

---
## test_tags_are_empty_element_if_and_only_if_they_are_empty
```python
from __init__ import test_tags_are_empty_element_if_and_only_if_they_are_empty
```



---
## test_namespaces_are_preserved
```python
from __init__ import test_namespaces_are_preserved
```



---
## test_closing_namespaced_tag
```python
from __init__ import test_closing_namespaced_tag
```



---
## test_namespaced_attributes
```python
from __init__ import test_namespaced_attributes
```



---
## test_namespaced_attributes_xml_namespace
```python
from __init__ import test_namespaced_attributes_xml_namespace
```



---
## test_find_by_prefixed_name
```python
from __init__ import test_find_by_prefixed_name
```



---
## test_copy_tag_preserves_namespace
```python
from __init__ import test_copy_tag_preserves_namespace
```



---
## test_html_tags_have_namespace
```python
from __init__ import test_html_tags_have_namespace
```



---
## test_svg_tags_have_namespace
```python
from __init__ import test_svg_tags_have_namespace
```



---
## test_mathml_tags_have_namespace
```python
from __init__ import test_mathml_tags_have_namespace
```



---
## test_xml_declaration_becomes_comment
```python
from __init__ import test_xml_declaration_becomes_comment
```



---
## __name__
```python
from test_builder_registry import __name__
```

Tests of the builder registry.

---
## TestBuiltInRegistry
```python
from test_builder_registry import TestBuiltInRegistry
```

Test the built-in registry with the default builders registered.

---
## TestRegistry
```python
from test_builder_registry import TestRegistry
```

Test the TreeBuilderRegistry class in general.

---
## test_combination
```python
from test_builder_registry import test_combination
```



---
## test_lookup_by_markup_type
```python
from test_builder_registry import test_lookup_by_markup_type
```



---
## test_named_library
```python
from test_builder_registry import test_named_library
```



---
## test_beautifulsoup_constructor_does_lookup
```python
from test_builder_registry import test_beautifulsoup_constructor_does_lookup
```



---
## setup_method
```python
from test_builder_registry import setup_method
```



---
## builder_for_features
```python
from test_builder_registry import builder_for_features
```



---
## test_register_with_no_features
```python
from test_builder_registry import test_register_with_no_features
```



---
## test_register_with_features_makes_lookup_succeed
```python
from test_builder_registry import test_register_with_features_makes_lookup_succeed
```



---
## test_lookup_fails_when_no_builder_implements_feature
```python
from test_builder_registry import test_lookup_fails_when_no_builder_implements_feature
```



---
## test_lookup_gets_most_recent_registration_when_no_feature_specified
```python
from test_builder_registry import test_lookup_gets_most_recent_registration_when_no_feature_specified
```



---
## test_lookup_fails_when_no_tree_builders_registered
```python
from test_builder_registry import test_lookup_fails_when_no_tree_builders_registered
```



---
## test_lookup_gets_most_recent_builder_supporting_all_features
```python
from test_builder_registry import test_lookup_gets_most_recent_builder_supporting_all_features
```



---
## test_lookup_fails_when_cannot_reconcile_requested_features
```python
from test_builder_registry import test_lookup_fails_when_cannot_reconcile_requested_features
```



---
## __name__
```python
from test_builder import __name__
```



---
## TestDetectsXMLParsedAsHTML
```python
from test_builder import TestDetectsXMLParsedAsHTML
```



---
## test_warn_if_markup_looks_like_xml
```python
from test_builder import test_warn_if_markup_looks_like_xml
```



---
## __name__
```python
from test_formatter import __name__
```



---
## TestFormatter
```python
from test_formatter import TestFormatter
```



---
## test_default_attributes
```python
from test_formatter import test_default_attributes
```



---
## test_sort_attributes
```python
from test_formatter import test_sort_attributes
```



---
## test_empty_attributes_are_booleans
```python
from test_formatter import test_empty_attributes_are_booleans
```



---
## test_indent
```python
from test_formatter import test_indent
```



---
## test_default_indent_value
```python
from test_formatter import test_default_indent_value
```



---
## UnsortedFormatter
```python
from test_formatter import UnsortedFormatter
```



---
## attributes
```python
from test_formatter import attributes
```



---
## __name__
```python
from test_tag import __name__
```



---
## TestTag
```python
from test_tag import TestTag
```

Test various methods of Tag which aren't so complicated they
need their own classes.

---
## TestMultiValuedAttributes
```python
from test_tag import TestMultiValuedAttributes
```

Test the behavior of multi-valued attributes like 'class'.

The values of such attributes are always presented as lists.

---
## test__should_pretty_print
```python
from test_tag import test__should_pretty_print
```



---
## test_len
```python
from test_tag import test_len
```

The length of a Tag is its number of children.

---
## test_member_access_invokes_find
```python
from test_tag import test_member_access_invokes_find
```

Accessing a Python member .foo invokes find('foo')

---
## test_deprecated_member_access
```python
from test_tag import test_deprecated_member_access
```



---
## test_has_attr
```python
from test_tag import test_has_attr
```

has_attr() checks for the presence of an attribute.

Please note note: has_attr() is different from
__in__. has_attr() checks the tag's attributes and __in__
checks the tag's chidlren.

---
## test_attributes_come_out_in_alphabetical_order
```python
from test_tag import test_attributes_come_out_in_alphabetical_order
```



---
## test_string
```python
from test_tag import test_string
```



---
## test_empty_tag_has_no_string
```python
from test_tag import test_empty_tag_has_no_string
```



---
## test_tag_with_multiple_children_has_no_string
```python
from test_tag import test_tag_with_multiple_children_has_no_string
```



---
## test_tag_with_recursive_string_has_string
```python
from test_tag import test_tag_with_recursive_string_has_string
```



---
## test_lack_of_string
```python
from test_tag import test_lack_of_string
```

Only a Tag containing a single text node has a .string.

---
## test_all_text
```python
from test_tag import test_all_text
```

Tag.text and Tag.get_text(sep=u"") -> all child text, concatenated

---
## test_get_text_ignores_special_string_containers
```python
from test_tag import test_get_text_ignores_special_string_containers
```



---
## test_all_strings_ignores_special_string_containers
```python
from test_tag import test_all_strings_ignores_special_string_containers
```



---
## test_string_methods_inside_special_string_container_tags
```python
from test_tag import test_string_methods_inside_special_string_container_tags
```



---
## test_single_value_becomes_list
```python
from test_tag import test_single_value_becomes_list
```



---
## test_multiple_values_becomes_list
```python
from test_tag import test_multiple_values_becomes_list
```



---
## test_multiple_values_separated_by_weird_whitespace
```python
from test_tag import test_multiple_values_separated_by_weird_whitespace
```



---
## test_attributes_joined_into_string_on_output
```python
from test_tag import test_attributes_joined_into_string_on_output
```



---
## test_get_attribute_list
```python
from test_tag import test_get_attribute_list
```



---
## test_accept_charset
```python
from test_tag import test_accept_charset
```



---
## test_cdata_attribute_applying_only_to_one_tag
```python
from test_tag import test_cdata_attribute_applying_only_to_one_tag
```



---
## test_customization
```python
from test_tag import test_customization
```



---
## test_hidden_tag_is_invisible
```python
from test_tag import test_hidden_tag_is_invisible
```



---
## __name__
```python
from test_pageelement import __name__
```

Tests of the bs4.element.PageElement class

---
## TestEncoding
```python
from test_pageelement import TestEncoding
```

Test the ability to encode objects into strings.

---
## TestFormatters
```python
from test_pageelement import TestFormatters
```

Test the formatting feature, used by methods like decode() and
prettify(), and the formatters themselves.

---
## TestPersistence
```python
from test_pageelement import TestPersistence
```

Testing features like pickle and deepcopy.

---
## test_unicode_string_can_be_encoded
```python
from test_pageelement import test_unicode_string_can_be_encoded
```



---
## test_tag_containing_unicode_string_can_be_encoded
```python
from test_pageelement import test_tag_containing_unicode_string_can_be_encoded
```



---
## test_encoding_substitutes_unrecognized_characters_by_default
```python
from test_pageelement import test_encoding_substitutes_unrecognized_characters_by_default
```



---
## test_encoding_can_be_made_strict
```python
from test_pageelement import test_encoding_can_be_made_strict
```



---
## test_decode_contents
```python
from test_pageelement import test_decode_contents
```



---
## test_encode_contents
```python
from test_pageelement import test_encode_contents
```



---
## test_encode_deeply_nested_document
```python
from test_pageelement import test_encode_deeply_nested_document
```



---
## test_deprecated_renderContents
```python
from test_pageelement import test_deprecated_renderContents
```



---
## test_repr
```python
from test_pageelement import test_repr
```



---
## test_default_formatter_is_minimal
```python
from test_pageelement import test_default_formatter_is_minimal
```



---
## test_formatter_html
```python
from test_pageelement import test_formatter_html
```



---
## test_formatter_html5
```python
from test_pageelement import test_formatter_html5
```



---
## test_formatter_minimal
```python
from test_pageelement import test_formatter_minimal
```



---
## test_formatter_null
```python
from test_pageelement import test_formatter_null
```



---
## test_formatter_custom
```python
from test_pageelement import test_formatter_custom
```



---
## test_formatter_is_run_on_attribute_values
```python
from test_pageelement import test_formatter_is_run_on_attribute_values
```



---
## test_formatter_skips_script_tag_for_html_documents
```python
from test_pageelement import test_formatter_skips_script_tag_for_html_documents
```



---
## test_formatter_skips_style_tag_for_html_documents
```python
from test_pageelement import test_formatter_skips_style_tag_for_html_documents
```



---
## test_prettify_leaves_preformatted_text_alone
```python
from test_pageelement import test_prettify_leaves_preformatted_text_alone
```



---
## test_prettify_handles_nested_string_literal_tags
```python
from test_pageelement import test_prettify_handles_nested_string_literal_tags
```



---
## test_prettify_accepts_formatter_function
```python
from test_pageelement import test_prettify_accepts_formatter_function
```



---
## test_prettify_outputs_unicode_by_default
```python
from test_pageelement import test_prettify_outputs_unicode_by_default
```



---
## test_prettify_can_encode_data
```python
from test_pageelement import test_prettify_can_encode_data
```



---
## test_html_entity_substitution_off_by_default
```python
from test_pageelement import test_html_entity_substitution_off_by_default
```



---
## test_encoding_substitution
```python
from test_pageelement import test_encoding_substitution
```



---
## test_encoding_substitution_doesnt_happen_if_tag_is_strained
```python
from test_pageelement import test_encoding_substitution_doesnt_happen_if_tag_is_strained
```



---
## setup_method
```python
from test_pageelement import setup_method
```



---
## test_pickle_and_unpickle_identity
```python
from test_pageelement import test_pickle_and_unpickle_identity
```



---
## test_deepcopy_identity
```python
from test_pageelement import test_deepcopy_identity
```



---
## test_copy_deeply_nested_document
```python
from test_pageelement import test_copy_deeply_nested_document
```



---
## test_copy_preserves_encoding
```python
from test_pageelement import test_copy_preserves_encoding
```



---
## test_copy_preserves_builder_information
```python
from test_pageelement import test_copy_preserves_builder_information
```



---
## test_unicode_pickle
```python
from test_pageelement import test_unicode_pickle
```



---
## test_copy_navigablestring_is_not_attached_to_tree
```python
from test_pageelement import test_copy_navigablestring_is_not_attached_to_tree
```



---
## test_copy_navigablestring_subclass_has_same_type
```python
from test_pageelement import test_copy_navigablestring_subclass_has_same_type
```



---
## test_copy_entire_soup
```python
from test_pageelement import test_copy_entire_soup
```



---
## test_copy_tag_copies_contents
```python
from test_pageelement import test_copy_tag_copies_contents
```



---
## __name__
```python
from test_css import __name__
```



---
## TestCSSSelectors
```python
from test_css import TestCSSSelectors
```

Test basic CSS selector functionality.

This functionality is implemented in soupsieve, which has a much
more comprehensive test suite, so this is basically an extra check
that soupsieve works as expected.

---
## setup_method
```python
from test_css import setup_method
```



---
## assert_selects
```python
from test_css import assert_selects
```



---
## assert_select_multiple
```python
from test_css import assert_select_multiple
```



---
## test_precompiled
```python
from test_css import test_precompiled
```



---
## test_one_tag_one
```python
from test_css import test_one_tag_one
```



---
## test_one_tag_many
```python
from test_css import test_one_tag_many
```



---
## test_select_one_returns_none_if_no_match
```python
from test_css import test_select_one_returns_none_if_no_match
```



---
## test_tag_in_tag_one
```python
from test_css import test_tag_in_tag_one
```



---
## test_tag_in_tag_many
```python
from test_css import test_tag_in_tag_many
```



---
## test_limit
```python
from test_css import test_limit
```



---
## test_tag_no_match
```python
from test_css import test_tag_no_match
```



---
## test_invalid_tag
```python
from test_css import test_invalid_tag
```



---
## test_select_dashed_tag_ids
```python
from test_css import test_select_dashed_tag_ids
```



---
## test_select_dashed_by_id
```python
from test_css import test_select_dashed_by_id
```



---
## test_dashed_tag_text
```python
from test_css import test_dashed_tag_text
```



---
## test_select_dashed_matches_find_all
```python
from test_css import test_select_dashed_matches_find_all
```



---
## test_header_tags
```python
from test_css import test_header_tags
```



---
## test_class_one
```python
from test_css import test_class_one
```



---
## test_class_mismatched_tag
```python
from test_css import test_class_mismatched_tag
```



---
## test_one_id
```python
from test_css import test_one_id
```



---
## test_bad_id
```python
from test_css import test_bad_id
```



---
## test_items_in_id
```python
from test_css import test_items_in_id
```



---
## test_a_bunch_of_emptys
```python
from test_css import test_a_bunch_of_emptys
```



---
## test_multi_class_support
```python
from test_css import test_multi_class_support
```



---
## test_multi_class_selection
```python
from test_css import test_multi_class_selection
```



---
## test_child_selector
```python
from test_css import test_child_selector
```



---
## test_child_selector_id
```python
from test_css import test_child_selector_id
```



---
## test_attribute_equals
```python
from test_css import test_attribute_equals
```



---
## test_attribute_tilde
```python
from test_css import test_attribute_tilde
```



---
## test_attribute_startswith
```python
from test_css import test_attribute_startswith
```



---
## test_attribute_endswith
```python
from test_css import test_attribute_endswith
```



---
## test_attribute_contains
```python
from test_css import test_attribute_contains
```



---
## test_attribute_exact_or_hypen
```python
from test_css import test_attribute_exact_or_hypen
```



---
## test_attribute_exists
```python
from test_css import test_attribute_exists
```



---
## test_quoted_space_in_selector_name
```python
from test_css import test_quoted_space_in_selector_name
```



---
## test_unsupported_pseudoclass
```python
from test_css import test_unsupported_pseudoclass
```



---
## test_nth_of_type
```python
from test_css import test_nth_of_type
```



---
## test_nth_of_type_direct_descendant
```python
from test_css import test_nth_of_type_direct_descendant
```



---
## test_id_child_selector_nth_of_type
```python
from test_css import test_id_child_selector_nth_of_type
```



---
## test_select_on_element
```python
from test_css import test_select_on_element
```



---
## test_overspecified_child_id
```python
from test_css import test_overspecified_child_id
```



---
## test_adjacent_sibling_selector
```python
from test_css import test_adjacent_sibling_selector
```



---
## test_general_sibling_selector
```python
from test_css import test_general_sibling_selector
```



---
## test_dangling_combinator
```python
from test_css import test_dangling_combinator
```



---
## test_sibling_combinator_wont_select_same_tag_twice
```python
from test_css import test_sibling_combinator_wont_select_same_tag_twice
```



---
## test_multiple_select
```python
from test_css import test_multiple_select
```



---
## test_multiple_select_with_no_space
```python
from test_css import test_multiple_select_with_no_space
```



---
## test_multiple_select_with_more_space
```python
from test_css import test_multiple_select_with_more_space
```



---
## test_multiple_select_duplicated
```python
from test_css import test_multiple_select_duplicated
```



---
## test_multiple_select_sibling
```python
from test_css import test_multiple_select_sibling
```



---
## test_multiple_select_tag_and_direct_descendant
```python
from test_css import test_multiple_select_tag_and_direct_descendant
```



---
## test_multiple_select_direct_descendant_and_tags
```python
from test_css import test_multiple_select_direct_descendant_and_tags
```



---
## test_multiple_select_indirect_descendant
```python
from test_css import test_multiple_select_indirect_descendant
```



---
## test_invalid_multiple_select
```python
from test_css import test_invalid_multiple_select
```



---
## test_multiple_select_attrs
```python
from test_css import test_multiple_select_attrs
```



---
## test_multiple_select_ids
```python
from test_css import test_multiple_select_ids
```



---
## test_multiple_select_nested
```python
from test_css import test_multiple_select_nested
```



---
## test_select_duplicate_elements
```python
from test_css import test_select_duplicate_elements
```



---
## test_closest
```python
from test_css import test_closest
```



---
## test_match
```python
from test_css import test_match
```



---
## test_iselect
```python
from test_css import test_iselect
```



---
## test_filter
```python
from test_css import test_filter
```



---
## test_escape
```python
from test_css import test_escape
```



---
## __name__
```python
from test_fuzz import __name__
```

This file contains test cases reported by third parties using
fuzzing tools, primarily from Google's oss-fuzz project. Some of these
represent real problems with Beautiful Soup, but many are problems in
libraries that Beautiful Soup depends on, and many of the test cases
represent different ways of triggering the same problem.

Grouping these test cases together makes it easy to see which test
cases represent the same problem, and puts the test cases in close
proximity to code that can trigger the problems.

---
## TestFuzz
```python
from test_fuzz import TestFuzz
```



---
## fuzz_test_with_css
```python
from test_fuzz import fuzz_test_with_css
```



---
## test_rejected_markup
```python
from test_fuzz import test_rejected_markup
```



---
## test_deeply_nested_document_without_css
```python
from test_fuzz import test_deeply_nested_document_without_css
```



---
## test_deeply_nested_document
```python
from test_fuzz import test_deeply_nested_document
```



---
## test_soupsieve_errors
```python
from test_fuzz import test_soupsieve_errors
```



---
## test_html5lib_parse_errors_without_css
```python
from test_fuzz import test_html5lib_parse_errors_without_css
```



---
## test_html5lib_parse_errors
```python
from test_fuzz import test_html5lib_parse_errors
```



---
## __markup
```python
from test_fuzz import __markup
```



---
## __name__
```python
from test_html5lib import __name__
```

Tests to ensure that the html5lib tree builder generates good trees.

---
## TestHTML5LibBuilder
```python
from test_html5lib import TestHTML5LibBuilder
```

See ``HTML5TreeBuilderSmokeTest``.

---
## default_builder
```python
from test_html5lib import default_builder
```



---
## test_soupstrainer
```python
from test_html5lib import test_soupstrainer
```



---
## test_correctly_nested_tables
```python
from test_html5lib import test_correctly_nested_tables
```

html5lib inserts <tbody> tags where other parsers don't.

---
## test_xml_declaration_followed_by_doctype
```python
from test_html5lib import test_xml_declaration_followed_by_doctype
```



---
## test_reparented_markup
```python
from test_html5lib import test_reparented_markup
```



---
## test_reparented_markup_ends_with_whitespace
```python
from test_html5lib import test_reparented_markup_ends_with_whitespace
```



---
## test_reparented_markup_containing_identical_whitespace_nodes
```python
from test_html5lib import test_reparented_markup_containing_identical_whitespace_nodes
```

Verify that we keep the two whitespace nodes in this
document distinct when reparenting the adjacent <tbody> tags.

---
## test_reparented_markup_containing_children
```python
from test_html5lib import test_reparented_markup_containing_children
```



---
## test_processing_instruction
```python
from test_html5lib import test_processing_instruction
```

Processing instructions become comments.

---
## test_cloned_multivalue_node
```python
from test_html5lib import test_cloned_multivalue_node
```



---
## test_foster_parenting
```python
from test_html5lib import test_foster_parenting
```



---
## test_extraction
```python
from test_html5lib import test_extraction
```

Test that extraction does not destroy the tree.

https://bugs.launchpad.net/beautifulsoup/+bug/1782928

---
## test_empty_comment
```python
from test_html5lib import test_empty_comment
```

Test that empty comment does not break structure.

https://bugs.launchpad.net/beautifulsoup/+bug/1806598

---
## test_tracking_line_numbers
```python
from test_html5lib import test_tracking_line_numbers
```



---
## test_special_string_containers
```python
from test_html5lib import test_special_string_containers
```



---
## test_html5_attributes
```python
from test_html5lib import test_html5_attributes
```



---
## __name__
```python
from test_htmlparser import __name__
```

Tests to ensure that the html.parser tree builder generates good
trees.

---
## TestHTMLParserTreeBuilder
```python
from test_htmlparser import TestHTMLParserTreeBuilder
```



---
## test_rejected_input
```python
from test_htmlparser import test_rejected_input
```



---
## test_namespaced_system_doctype
```python
from test_htmlparser import test_namespaced_system_doctype
```



---
## test_namespaced_public_doctype
```python
from test_htmlparser import test_namespaced_public_doctype
```



---
## test_builder_is_pickled
```python
from test_htmlparser import test_builder_is_pickled
```

Unlike most tree builders, HTMLParserTreeBuilder and will
be restored after pickling.

---
## test_redundant_empty_element_closing_tags
```python
from test_htmlparser import test_redundant_empty_element_closing_tags
```



---
## test_empty_element
```python
from test_htmlparser import test_empty_element
```



---
## test_tracking_line_numbers
```python
from test_htmlparser import test_tracking_line_numbers
```



---
## test_on_duplicate_attribute
```python
from test_htmlparser import test_on_duplicate_attribute
```



---
## test_html5_attributes
```python
from test_htmlparser import test_html5_attributes
```



---
## assert_attribute
```python
from test_htmlparser import assert_attribute
```



---
## accumulate
```python
from test_htmlparser import accumulate
```



---
## __name__
```python
from _htmlparser import __name__
```

Use the HTMLParser library to parse HTML files that aren't too bad.

---
## BeautifulSoupHTMLParser
```python
from _htmlparser import BeautifulSoupHTMLParser
```

A subclass of the Python standard library's HTMLParser class, which
listens for HTMLParser events and translates them into calls
to Beautiful Soup's tree construction API.

---
## HTMLParserTreeBuilder
```python
from _htmlparser import HTMLParserTreeBuilder
```

A Beautiful soup `TreeBuilder` that uses the `HTMLParser` parser,
found in the Python standard library.

---
## __init__
```python
from _htmlparser import __init__
```

Constructor.

:param parser_args: Positional arguments to pass into 
    the BeautifulSoupHTMLParser constructor, once it's
    invoked.
:param parser_kwargs: Keyword arguments to pass into 
    the BeautifulSoupHTMLParser constructor, once it's
    invoked.
:param kwargs: Keyword arguments for the superclass constructor.

---
## error
```python
from _htmlparser import error
```



---
## handle_startendtag
```python
from _htmlparser import handle_startendtag
```

Handle an incoming empty-element tag.

This is only called when the markup looks like <tag/>.

:param name: Name of the tag.
:param attrs: Dictionary of the tag's attributes.

---
## handle_starttag
```python
from _htmlparser import handle_starttag
```

Handle an opening tag, e.g. '<tag>'

:param name: Name of the tag.
:param attrs: Dictionary of the tag's attributes.
:param handle_empty_element: True if this tag is known to be
    an empty-element tag (i.e. there is not expected to be any
    closing tag).

---
## handle_endtag
```python
from _htmlparser import handle_endtag
```

Handle a closing tag, e.g. '</tag>'

:param name: A tag name.
:param check_already_closed: True if this tag is expected to
   be the closing portion of an empty-element tag,
   e.g. '<tag></tag>'.

---
## handle_data
```python
from _htmlparser import handle_data
```

Handle some textual data that shows up between tags.

---
## handle_charref
```python
from _htmlparser import handle_charref
```

Handle a numeric character reference by converting it to the
corresponding Unicode character and treating it as textual
data.

:param name: Character number, possibly in hexadecimal.

---
## handle_entityref
```python
from _htmlparser import handle_entityref
```

Handle a named entity reference by converting it to the
corresponding Unicode character(s) and treating it as textual
data.

:param name: Name of the entity reference.

---
## handle_comment
```python
from _htmlparser import handle_comment
```

Handle an HTML comment.

:param data: The text of the comment.

---
## handle_decl
```python
from _htmlparser import handle_decl
```

Handle a DOCTYPE declaration.

:param data: The text of the declaration.

---
## unknown_decl
```python
from _htmlparser import unknown_decl
```

Handle a declaration of unknown type -- probably a CDATA block.

:param data: The text of the declaration.

---
## handle_pi
```python
from _htmlparser import handle_pi
```

Handle a processing instruction.

:param data: The text of the instruction.

---
## prepare_markup
```python
from _htmlparser import prepare_markup
```

Run any preliminary steps necessary to make incoming markup
acceptable to the parser.

:param markup: Some markup -- probably a bytestring.
:param user_specified_encoding: The user asked to try this encoding.
:param document_declared_encoding: The markup itself claims to be
    in this encoding.
:param exclude_encodings: The user asked _not_ to try any of
    these encodings.

:yield: A series of 4-tuples:
 (markup, encoding, declared encoding,
  has undergone character replacement)

 Each 4-tuple represents a strategy for converting the
 document to Unicode and parsing it. Each strategy will be tried 
 in turn.

---
## feed
```python
from _htmlparser import feed
```

Run some incoming markup through some parsing process,
populating the `BeautifulSoup` object in self.soup.

---
## XMLParsedAsHTMLWarning
```python
from __init__ import XMLParsedAsHTMLWarning
```

The warning issued when an HTML parser is used to parse
XML that is not XHTML.

---
## TreeBuilderRegistry
```python
from __init__ import TreeBuilderRegistry
```

A way of looking up TreeBuilder subclasses by their name or by desired
features.

---
## TreeBuilder
```python
from __init__ import TreeBuilder
```

Turn a textual document into a Beautiful Soup object tree.

---
## SAXTreeBuilder
```python
from __init__ import SAXTreeBuilder
```

A Beautiful Soup treebuilder that listens for SAX events.

This is not currently used for anything, but it demonstrates
how a simple TreeBuilder would work.

---
## HTMLTreeBuilder
```python
from __init__ import HTMLTreeBuilder
```

This TreeBuilder knows facts about HTML.

Such as which tags are empty-element tags.

---
## DetectsXMLParsedAsHTML
```python
from __init__ import DetectsXMLParsedAsHTML
```

A mixin class for any class (a TreeBuilder, or some class used by a
TreeBuilder) that's in a position to detect whether an XML
document is being incorrectly parsed as HTML, and issue an
appropriate warning.

This requires being able to observe an incoming processing
instruction that might be an XML declaration, and also able to
observe tags as they're opened. If you can't do that for a given
TreeBuilder, there's a less reliable implementation based on
examining the raw markup.

---
## register_treebuilders_from
```python
from __init__ import register_treebuilders_from
```

Copy TreeBuilders from the given module into this module.

---
## ParserRejectedMarkup
```python
from __init__ import ParserRejectedMarkup
```

An Exception to be raised when the underlying parser simply
refuses to parse the given markup.

---
## register
```python
from __init__ import register
```



---
## initialize_soup
```python
from __init__ import initialize_soup
```

The BeautifulSoup object has been initialized and is now
being associated with the TreeBuilder.

:param soup: A BeautifulSoup object.

---
## can_be_empty_element
```python
from __init__ import can_be_empty_element
```

Might a tag with this name be an empty-element tag?

The final markup may or may not actually present this tag as
self-closing.

For instance: an HTMLBuilder does not consider a <p> tag to be
an empty-element tag (it's not in
HTMLBuilder.empty_element_tags). This means an empty <p> tag
will be presented as "<p></p>", not "<p/>" or "<p>".

The default implementation has no opinion about which tags are
empty-element tags, so a tag will be presented as an
empty-element tag if and only if it has no children.
"<foo></foo>" will become "<foo/>", and "<foo>bar</foo>" will
be left alone.

:param tag_name: The name of a markup tag.

---
## prepare_markup
```python
from __init__ import prepare_markup
```

Run any preliminary steps necessary to make incoming markup
acceptable to the parser.

:param markup: Some markup -- probably a bytestring.
:param user_specified_encoding: The user asked to try this encoding.
:param document_declared_encoding: The markup itself claims to be
    in this encoding. NOTE: This argument is not used by the
    calling code and can probably be removed.
:param exclude_encodings: The user asked _not_ to try any of
    these encodings.

:yield: A series of 4-tuples:
 (markup, encoding, declared encoding,
  has undergone character replacement)

 Each 4-tuple represents a strategy for converting the
 document to Unicode and parsing it. Each strategy will be tried 
 in turn.

 By default, the only strategy is to parse the markup
 as-is. See `LXMLTreeBuilderForXML` and
 `HTMLParserTreeBuilder` for implementations that take into
 account the quirks of particular parsers.

---
## test_fragment_to_document
```python
from __init__ import test_fragment_to_document
```

Wrap an HTML fragment to make it look like a document.

Different parsers do this differently. For instance, lxml
introduces an empty <head> tag, and html5lib
doesn't. Abstracting this away lets us write simple tests
which run HTML fragments through the parser and compare the
results against other HTML fragments.

This method should not be used outside of tests.

:param fragment: A string -- fragment of HTML.
:return: A string -- a full HTML document.

---
## set_up_substitutions
```python
from __init__ import set_up_substitutions
```

Replace the declared encoding in a <meta> tag with a placeholder,
to be substituted when the tag is output to a string.

An HTML document may come in to Beautiful Soup as one
encoding, but exit in a different encoding, and the <meta> tag
needs to be changed to reflect this.

:param tag: A `Tag`
:return: Whether or not a substitution was performed.

---
## _replace_cdata_list_attribute_values
```python
from __init__ import _replace_cdata_list_attribute_values
```

When an attribute value is associated with a tag that can
have multiple values for that attribute, convert the string
value to a list of strings.

Basically, replaces class="foo bar" with class=["foo", "bar"]

NOTE: This method modifies its input in place.

:param tag_name: The name of a tag.
:param attrs: A dictionary containing the tag's attributes.
   Any appropriate attribute values will be modified in place.

---
## startElement
```python
from __init__ import startElement
```



---
## endElement
```python
from __init__ import endElement
```



---
## startElementNS
```python
from __init__ import startElementNS
```



---
## endElementNS
```python
from __init__ import endElementNS
```



---
## startPrefixMapping
```python
from __init__ import startPrefixMapping
```



---
## endPrefixMapping
```python
from __init__ import endPrefixMapping
```



---
## characters
```python
from __init__ import characters
```



---
## startDocument
```python
from __init__ import startDocument
```



---
## endDocument
```python
from __init__ import endDocument
```



---
## warn_if_markup_looks_like_xml
```python
from __init__ import warn_if_markup_looks_like_xml
```

Perform a check on some markup to see if it looks like XML
that's not XHTML. If so, issue a warning.

This is much less reliable than doing the check while parsing,
but some of the tree builders can't do that.

:param stacklevel: The stacklevel of the code calling this
function.

:return: True if the markup looks like non-XHTML XML, False
otherwise.

---
## _warn
```python
from __init__ import _warn
```

Issue a warning about XML being parsed as HTML.

---
## _initialize_xml_detector
```python
from __init__ import _initialize_xml_detector
```

Call this method before parsing a document.

---
## _document_might_be_xml
```python
from __init__ import _document_might_be_xml
```

Call this method when encountering an XML declaration, or a
"processing instruction" that might be an XML declaration.

---
## _root_tag_encountered
```python
from __init__ import _root_tag_encountered
```

Call this when you encounter the document's root tag.

This is where we actually check whether an XML document is
being incorrectly parsed as HTML, and issue the warning.

---
## __name__
```python
from _html5lib import __name__
```



---
## HTML5TreeBuilder
```python
from _html5lib import HTML5TreeBuilder
```

Use html5lib to build a tree.

Note that this TreeBuilder does not support some features common
to HTML TreeBuilders. Some of these features could theoretically
be implemented, but at the very least it's quite difficult,
because html5lib moves the parse tree around as it's being built.

* This TreeBuilder doesn't use different subclasses of NavigableString
  based on the name of the tag in which the string was found.

* You can't use a SoupStrainer to parse only part of a document.

---
## TreeBuilderForHtml5lib
```python
from _html5lib import TreeBuilderForHtml5lib
```



---
## AttrList
```python
from _html5lib import AttrList
```



---
## Element
```python
from _html5lib import Element
```



---
## TextNode
```python
from _html5lib import TextNode
```



---
## prepare_markup
```python
from _html5lib import prepare_markup
```



---
## feed
```python
from _html5lib import feed
```



---
## create_treebuilder
```python
from _html5lib import create_treebuilder
```



---
## test_fragment_to_document
```python
from _html5lib import test_fragment_to_document
```

See `TreeBuilder`.

---
## __init__
```python
from _html5lib import __init__
```



---
## documentClass
```python
from _html5lib import documentClass
```



---
## insertDoctype
```python
from _html5lib import insertDoctype
```



---
## elementClass
```python
from _html5lib import elementClass
```



---
## commentClass
```python
from _html5lib import commentClass
```



---
## fragmentClass
```python
from _html5lib import fragmentClass
```



---
## appendChild
```python
from _html5lib import appendChild
```



---
## getDocument
```python
from _html5lib import getDocument
```



---
## getFragment
```python
from _html5lib import getFragment
```



---
## testSerializer
```python
from _html5lib import testSerializer
```



---
## __iter__
```python
from _html5lib import __iter__
```



---
## __setitem__
```python
from _html5lib import __setitem__
```



---
## items
```python
from _html5lib import items
```



---
## keys
```python
from _html5lib import keys
```



---
## __len__
```python
from _html5lib import __len__
```



---
## __getitem__
```python
from _html5lib import __getitem__
```



---
## __contains__
```python
from _html5lib import __contains__
```



---
## getAttributes
```python
from _html5lib import getAttributes
```



---
## setAttributes
```python
from _html5lib import setAttributes
```



---
## insertText
```python
from _html5lib import insertText
```



---
## insertBefore
```python
from _html5lib import insertBefore
```



---
## removeChild
```python
from _html5lib import removeChild
```



---
## reparentChildren
```python
from _html5lib import reparentChildren
```

Move all of this tag's children into another tag.

---
## cloneNode
```python
from _html5lib import cloneNode
```



---
## hasContent
```python
from _html5lib import hasContent
```



---
## getNameTuple
```python
from _html5lib import getNameTuple
```



---
## serializeElement
```python
from _html5lib import serializeElement
```



---
## __name__
```python
from _lxml import __name__
```



---
## _invert
```python
from _lxml import _invert
```

Invert a dictionary.

---
## LXMLTreeBuilderForXML
```python
from _lxml import LXMLTreeBuilderForXML
```



---
## LXMLTreeBuilder
```python
from _lxml import LXMLTreeBuilder
```



---
## initialize_soup
```python
from _lxml import initialize_soup
```

Let the BeautifulSoup object know about the standard namespace
mapping.

:param soup: A `BeautifulSoup`.

---
## _register_namespaces
```python
from _lxml import _register_namespaces
```

Let the BeautifulSoup object know about namespaces encountered
while parsing the document.

This might be useful later on when creating CSS selectors.

This will track (almost) all namespaces, even ones that were
only in scope for part of the document. If two namespaces have
the same prefix, only the first one encountered will be
tracked. Un-prefixed namespaces are not tracked.

:param mapping: A dictionary mapping namespace prefixes to URIs.

---
## default_parser
```python
from _lxml import default_parser
```



---
## parser_for
```python
from _lxml import parser_for
```

Instantiate an appropriate parser for the given encoding.

:param encoding: A string.
:return: A parser object such as an `etree.XMLParser`.

---
## __init__
```python
from _lxml import __init__
```



---
## _getNsTag
```python
from _lxml import _getNsTag
```



---
## prepare_markup
```python
from _lxml import prepare_markup
```

Run any preliminary steps necessary to make incoming markup
acceptable to the parser.

lxml really wants to get a bytestring and convert it to
Unicode itself. So instead of using UnicodeDammit to convert
the bytestring to Unicode using different encodings, this
implementation uses EncodingDetector to iterate over the
encodings, and tell lxml to try to parse the document as each
one in turn.

:param markup: Some markup -- hopefully a bytestring.
:param user_specified_encoding: The user asked to try this encoding.
:param document_declared_encoding: The markup itself claims to be
    in this encoding.
:param exclude_encodings: The user asked _not_ to try any of
    these encodings.

:yield: A series of 4-tuples:
 (markup, encoding, declared encoding,
  has undergone character replacement)

 Each 4-tuple represents a strategy for converting the
 document to Unicode and parsing it. Each strategy will be tried 
 in turn.

---
## feed
```python
from _lxml import feed
```



---
## close
```python
from _lxml import close
```



---
## start
```python
from _lxml import start
```



---
## _prefix_for_namespace
```python
from _lxml import _prefix_for_namespace
```

Find the currently active prefix for the given namespace.

---
## end
```python
from _lxml import end
```



---
## pi
```python
from _lxml import pi
```



---
## data
```python
from _lxml import data
```



---
## doctype
```python
from _lxml import doctype
```



---
## comment
```python
from _lxml import comment
```

Handle comments as Comment objects.

---
## test_fragment_to_document
```python
from _lxml import test_fragment_to_document
```

See `TreeBuilder`.

---
## __name__
```python
from handler import __name__
```

requests_toolbelt.auth.handler
==============================

This holds all of the implementation details of the Authentication Handler.

---
## AuthHandler
```python
from handler import AuthHandler
```

The ``AuthHandler`` object takes a dictionary of domains paired with
authentication strategies and will use this to determine which credentials
to use when making a request. For example, you could do the following:

.. code-block:: python

    from requests import HTTPDigestAuth
    from requests_toolbelt.auth.handler import AuthHandler

    import requests

    auth = AuthHandler({
        'https://api.github.com': ('sigmavirus24', 'fakepassword'),
        'https://example.com': HTTPDigestAuth('username', 'password')
    })

    r = requests.get('https://api.github.com/user', auth=auth)
    # => <Response [200]>
    r = requests.get('https://example.com/some/path', auth=auth)
    # => <Response [200]>

    s = requests.Session()
    s.auth = auth
    r = s.get('https://api.github.com/user')
    # => <Response [200]>

.. warning::

    :class:`requests.auth.HTTPDigestAuth` is not yet thread-safe. If you
    use :class:`AuthHandler` across multiple threads you should
    instantiate a new AuthHandler for each thread with a new
    HTTPDigestAuth instance for each thread.

---
## NullAuthStrategy
```python
from handler import NullAuthStrategy
```



---
## __init__
```python
from handler import __init__
```



---
## __call__
```python
from handler import __call__
```



---
## __repr__
```python
from handler import __repr__
```



---
## _make_uniform
```python
from handler import _make_uniform
```



---
## _key_from_url
```python
from handler import _key_from_url
```



---
## add_strategy
```python
from handler import add_strategy
```

Add a new domain and authentication strategy.

:param str domain: The domain you wish to match against. For example:
    ``'https://api.github.com'``
:param str strategy: The authentication strategy you wish to use for
    that domain. For example: ``('username', 'password')`` or
    ``requests.HTTPDigestAuth('username', 'password')``

.. code-block:: python

    a = AuthHandler({})
    a.add_strategy('https://api.github.com', ('username', 'password'))

---
## get_strategy_for
```python
from handler import get_strategy_for
```

Retrieve the authentication strategy for a specified URL.

:param str url: The full URL you will be making a request against. For
    example, ``'https://api.github.com/user'``
:returns: Callable that adds authentication to a request.

.. code-block:: python

    import requests
    a = AuthHandler({'example.com', ('foo', 'bar')})
    strategy = a.get_strategy_for('http://example.com/example')
    assert isinstance(strategy, requests.auth.HTTPBasicAuth)

---
## remove_strategy
```python
from handler import remove_strategy
```

Remove the domain and strategy from the collection of strategies.

:param str domain: The domain you wish remove. For example,
    ``'https://api.github.com'``.

.. code-block:: python

    a = AuthHandler({'example.com', ('foo', 'bar')})
    a.remove_strategy('example.com')
    assert a.strategies == {}

---
## __name__
```python
from http_proxy_digest import __name__
```

The module containing HTTPProxyDigestAuth.

---
## HTTPProxyDigestAuth
```python
from http_proxy_digest import HTTPProxyDigestAuth
```

HTTP digest authentication between proxy

:param stale_rejects: The number of rejects indicate that:
    the client may wish to simply retry the request
    with a new encrypted response, without reprompting the user for a
    new username and password. i.e., retry build_digest_header
:type stale_rejects: int

---
## __init__
```python
from http_proxy_digest import __init__
```



---
## stale_rejects
```python
from http_proxy_digest import stale_rejects
```



---
## init_per_thread_state
```python
from http_proxy_digest import init_per_thread_state
```



---
## handle_407
```python
from http_proxy_digest import handle_407
```

Handle HTTP 407 only once, otherwise give up

:param r: current response
:returns: responses, along with the new response

---
## __call__
```python
from http_proxy_digest import __call__
```



---
## __name__
```python
from guess import __name__
```

The module containing the code for GuessAuth.

---
## GuessAuth
```python
from guess import GuessAuth
```

Guesses the auth type by the WWW-Authentication header.

---
## GuessProxyAuth
```python
from guess import GuessProxyAuth
```

Guesses the auth type by WWW-Authentication and Proxy-Authentication
headers

---
## __init__
```python
from guess import __init__
```



---
## _handle_basic_auth_401
```python
from guess import _handle_basic_auth_401
```



---
## _handle_digest_auth_401
```python
from guess import _handle_digest_auth_401
```



---
## handle_401
```python
from guess import handle_401
```

Resends a request with auth headers, if needed.

---
## __call__
```python
from guess import __call__
```



---
## _handle_basic_auth_407
```python
from guess import _handle_basic_auth_407
```



---
## _handle_digest_auth_407
```python
from guess import _handle_digest_auth_407
```



---
## handle_407
```python
from guess import handle_407
```



---
## __name__
```python
from _digest_auth_compat import __name__
```

Provide a compatibility layer for requests.auth.HTTPDigestAuth.

---
## _ThreadingDescriptor
```python
from _digest_auth_compat import _ThreadingDescriptor
```



---
## _HTTPDigestAuth
```python
from _digest_auth_compat import _HTTPDigestAuth
```



---
## __init__
```python
from _digest_auth_compat import __init__
```



---
## __get__
```python
from _digest_auth_compat import __get__
```



---
## __set__
```python
from _digest_auth_compat import __set__
```



---
## __name__
```python
from user_agent import __name__
```



---
## user_agent
```python
from user_agent import user_agent
```

Return an internet-friendly user_agent string.

The majority of this code has been wilfully stolen from the equivalent
function in Requests.

:param name: The intended name of the user-agent, e.g. "python-requests".
:param version: The version of the user-agent, e.g. "0.0.1".
:param extras: List of two-item tuples that are added to the user-agent
    string.
:returns: Formatted user-agent string
:rtype: str

---
## UserAgentBuilder
```python
from user_agent import UserAgentBuilder
```

Class to provide a greater level of control than :func:`user_agent`.

This is used by :func:`user_agent` to build its User-Agent string.

.. code-block:: python

    user_agent_str = UserAgentBuilder(
            name='requests-toolbelt',
            version='17.4.0',
        ).include_implementation(
        ).include_system(
        ).include_extras([
            ('requests', '2.14.2'),
            ('urllib3', '1.21.2'),
        ]).build()

---
## _implementation_tuple
```python
from user_agent import _implementation_tuple
```

Return the tuple of interpreter name and version.

Returns a string that provides both the name and the version of the Python
implementation currently running. For example, on CPython 2.7.5 it will
return "CPython/2.7.5".

This function works best on CPython and PyPy: in particular, it probably
doesn't work for Jython or IronPython. Future investigation should be done
to work out the correct shape of the code for those platforms.

---
## _implementation_string
```python
from user_agent import _implementation_string
```



---
## _platform_tuple
```python
from user_agent import _platform_tuple
```



---
## __init__
```python
from user_agent import __init__
```

Initialize our builder with the name and version of our user agent.

:param str name:
    Name of our user-agent.
:param str version:
    The version string for user-agent.

---
## build
```python
from user_agent import build
```

Finalize the User-Agent string.

:returns:
    Formatted User-Agent string.
:rtype:
    str

---
## include_extras
```python
from user_agent import include_extras
```

Include extra portions of the User-Agent.

:param list extras:
    list of tuples of extra-name and extra-version

---
## include_implementation
```python
from user_agent import include_implementation
```

Append the implementation string to the user-agent string.

This adds the the information that you're using CPython 2.7.13 to the
User-Agent.

---
## include_system
```python
from user_agent import include_system
```

Append the information about the Operating System.

---
## get_encodings_from_content
```python
from deprecated import get_encodings_from_content
```

Return encodings from given content string.

.. code-block:: python

    import requests
    from requests_toolbelt.utils import deprecated

    r = requests.get(url)
    encodings = deprecated.get_encodings_from_content(r)

:param content: bytestring to extract encodings from
:type content: bytes
:return: encodings detected in the provided content
:rtype: list(str)

---
## get_unicode_from_response
```python
from deprecated import get_unicode_from_response
```

Return the requested content back in unicode.

This will first attempt to retrieve the encoding from the response
headers. If that fails, it will use
:func:`requests_toolbelt.utils.deprecated.get_encodings_from_content`
to determine encodings from HTML elements.

.. code-block:: python

    import requests
    from requests_toolbelt.utils import deprecated

    r = requests.get(url)
    text = deprecated.get_unicode_from_response(r)

:param response: Response object to get unicode content from.
:type response: requests.models.Response

---
## __name__
```python
from dump import __name__
```

This module provides functions for dumping information about responses.

---
## PrefixSettings
```python
from dump import PrefixSettings
```



---
## _get_proxy_information
```python
from dump import _get_proxy_information
```



---
## _format_header
```python
from dump import _format_header
```



---
## _build_request_path
```python
from dump import _build_request_path
```



---
## _dump_request_data
```python
from dump import _dump_request_data
```



---
## _dump_response_data
```python
from dump import _dump_response_data
```



---
## _coerce_to_bytes
```python
from dump import _coerce_to_bytes
```



---
## dump_response
```python
from dump import dump_response
```

Dump a single request-response cycle's information.

This will take a response object and dump only the data that requests can
see for that single request-response cycle.

Example::

    import requests
    from requests_toolbelt.utils import dump

    resp = requests.get('https://api.github.com/users/sigmavirus24')
    data = dump.dump_response(resp)
    print(data.decode('utf-8'))

:param response:
    The response to format
:type response: :class:`requests.Response`
:param request_prefix: (*optional*)
    Bytes to prefix each line of the request data
:type request_prefix: :class:`bytes`
:param response_prefix: (*optional*)
    Bytes to prefix each line of the response data
:type response_prefix: :class:`bytes`
:param data_array: (*optional*)
    Bytearray to which we append the request-response cycle data
:type data_array: :class:`bytearray`
:returns: Formatted bytes of request and response information.
:rtype: :class:`bytearray`

---
## dump_all
```python
from dump import dump_all
```

Dump all requests and responses including redirects.

This takes the response returned by requests and will dump all
request-response pairs in the redirect history in order followed by the
final request-response.

Example::

    import requests
    from requests_toolbelt.utils import dump

    resp = requests.get('https://httpbin.org/redirect/5')
    data = dump.dump_all(resp)
    print(data.decode('utf-8'))

:param response:
    The response to format
:type response: :class:`requests.Response`
:param request_prefix: (*optional*)
    Bytes to prefix each line of the request data
:type request_prefix: :class:`bytes`
:param response_prefix: (*optional*)
    Bytes to prefix each line of the response data
:type response_prefix: :class:`bytes`
:returns: Formatted bytes of request and response information.
:rtype: :class:`bytearray`

---
## __new__
```python
from dump import __new__
```



---
## urlencode
```python
from formdata import urlencode
```

Handle nested form-data queries and serialize them appropriately.

There are times when a website expects a nested form data query to be sent
but, the standard library's urlencode function does not appropriately
handle the nested structures. In that case, you need this function which
will flatten the structure first and then properly encode it for you.

When using this to send data in the body of a request, make sure you
specify the appropriate Content-Type header for the request.

.. code-block:: python

    import requests
    from requests_toolbelt.utils import formdata

    query = {
       'my_dict': {
           'foo': 'bar',
           'biz': 'baz",
        },
        'a': 'b',
    }

    resp = requests.get(url, params=formdata.urlencode(query))
    # or
    resp = requests.post(
        url,
        data=formdata.urlencode(query),
        headers={
            'Content-Type': 'application/x-www-form-urlencoded'
        },
    )

Similarly, you can specify a list of nested tuples, e.g.,

.. code-block:: python

    import requests
    from requests_toolbelt.utils import formdata

    query = [
        ('my_list', [
            ('foo', 'bar'),
            ('biz', 'baz'),
        ]),
        ('a', 'b'),
    ]

    resp = requests.get(url, params=formdata.urlencode(query))
    # or
    resp = requests.post(
        url,
        data=formdata.urlencode(query),
        headers={
            'Content-Type': 'application/x-www-form-urlencoded'
        },
    )

For additional parameter and return information, see the official
`urlencode`_ documentation.

.. _urlencode:
    https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode

---
## _to_kv_list
```python
from formdata import _to_kv_list
```



---
## _is_two_tuple
```python
from formdata import _is_two_tuple
```



---
## _expand_query_values
```python
from formdata import _expand_query_values
```



---
## __name__
```python
from socket_options import __name__
```

The implementation of the SocketOptionsAdapter.

---
## SocketOptionsAdapter
```python
from socket_options import SocketOptionsAdapter
```

An adapter for requests that allows users to specify socket options.

Since version 2.4.0 of requests, it is possible to specify a custom list
of socket options that need to be set before establishing the connection.

Example usage::

    >>> import socket
    >>> import requests
    >>> from requests_toolbelt.adapters import socket_options
    >>> s = requests.Session()
    >>> opts = [(socket.IPPROTO_TCP, socket.TCP_NODELAY, 0)]
    >>> adapter = socket_options.SocketOptionsAdapter(socket_options=opts)
    >>> s.mount('http://', adapter)

You can also take advantage of the list of default options on this class
to keep using the original options in addition to your custom options. In
that case, ``opts`` might look like::

    >>> opts = socket_options.SocketOptionsAdapter.default_options + opts

---
## TCPKeepAliveAdapter
```python
from socket_options import TCPKeepAliveAdapter
```

An adapter for requests that turns on TCP Keep-Alive by default.

The adapter sets 4 socket options:

- ``SOL_SOCKET`` ``SO_KEEPALIVE`` - This turns on TCP Keep-Alive
- ``IPPROTO_TCP`` ``TCP_KEEPINTVL`` 20 - Sets the keep alive interval
- ``IPPROTO_TCP`` ``TCP_KEEPCNT`` 5 - Sets the number of keep alive probes
- ``IPPROTO_TCP`` ``TCP_KEEPIDLE`` 60 - Sets the keep alive time if the
  socket library has the ``TCP_KEEPIDLE`` constant

The latter three can be overridden by keyword arguments (respectively):

- ``interval``
- ``count``
- ``idle``

You can use this adapter like so::

   >>> from requests_toolbelt.adapters import socket_options
   >>> tcp = socket_options.TCPKeepAliveAdapter(idle=120, interval=10)
   >>> s = requests.Session()
   >>> s.mount('http://', tcp)

---
## __init__
```python
from socket_options import __init__
```



---
## init_poolmanager
```python
from socket_options import init_poolmanager
```



---
## __name__
```python
from x509 import __name__
```

A X509Adapter for use with the requests library.

This file contains an implementation of the X509Adapter that will
allow users to authenticate a request using an arbitrary
X.509 certificate without needing to convert it to a .pem file

---
## X509Adapter
```python
from x509 import X509Adapter
```

Adapter for use with X.509 certificates.

Provides an interface for Requests sessions to contact HTTPS urls and
authenticate  with an X.509 cert by implementing the Transport Adapter
interface. This class will need to be manually instantiated and mounted
to the session

:param pool_connections: The number of urllib3 connection pools to
       cache.
:param pool_maxsize: The maximum number of connections to save in the
        pool.
:param max_retries: The maximum number of retries each connection
    should attempt. Note, this applies only to failed DNS lookups,
    socket connections and connection timeouts, never to requests where
    data has made it to the server. By default, Requests does not retry
    failed connections. If you need granular control over the
    conditions under which we retry a request, import urllib3's
    ``Retry`` class and pass that instead.
:param pool_block: Whether the connection pool should block for
        connections.

:param bytes cert_bytes:
    bytes object containing contents of a cryptography.x509Certificate
    object using the encoding specified by the ``encoding`` parameter.
:param bytes pk_bytes:
    bytes object containing contents of a object that implements
    ``cryptography.hazmat.primitives.serialization.PrivateFormat``
    using the encoding specified by the ``encoding`` parameter.
:param password:
    string or utf8 encoded bytes containing the passphrase used for the
    private key. None if unencrypted. Defaults to None.
:param encoding:
    Enumeration detailing the encoding method used on the ``cert_bytes``
    parameter. Can be either PEM or DER. Defaults to PEM.
:type encoding:
    :class: `cryptography.hazmat.primitives.serialization.Encoding`

Usage::

  >>> import requests
  >>> from requests_toolbelt.adapters.x509 import X509Adapter
  >>> s = requests.Session()
  >>> a = X509Adapter(max_retries=3,
            cert_bytes=b'...', pk_bytes=b'...', encoding='...'
  >>> s.mount('https://', a)

---
## check_cert_dates
```python
from x509 import check_cert_dates
```

Verify that the supplied client cert is not invalid.

---
## create_ssl_context
```python
from x509 import create_ssl_context
```

Create an SSL Context with the supplied cert/password.

:param cert_bytes array of bytes containing the cert encoded
       using the method supplied in the ``encoding`` parameter
:param pk_bytes array of bytes containing the private key encoded
       using the method supplied in the ``encoding`` parameter
:param password array of bytes containing the passphrase to be used
       with the supplied private key. None if unencrypted.
       Defaults to None.
:param encoding ``cryptography.hazmat.primitives.serialization.Encoding``
        details the encoding method used on the ``cert_bytes``  and
        ``pk_bytes`` parameters. Can be either PEM or DER.
        Defaults to PEM.

---
## __init__
```python
from x509 import __init__
```



---
## init_poolmanager
```python
from x509 import init_poolmanager
```



---
## proxy_manager_for
```python
from x509 import proxy_manager_for
```



---
## _import_pyopensslcontext
```python
from x509 import _import_pyopensslcontext
```



---
## _check_version
```python
from x509 import _check_version
```



---
## FingerprintAdapter
```python
from fingerprint import FingerprintAdapter
```

A HTTPS Adapter for Python Requests that verifies certificate fingerprints,
instead of certificate hostnames.

Example usage:

.. code-block:: python

    import requests
    import ssl
    from requests_toolbelt.adapters.fingerprint import FingerprintAdapter

    twitter_fingerprint = '...'
    s = requests.Session()
    s.mount(
        'https://twitter.com',
        FingerprintAdapter(twitter_fingerprint)
    )

The fingerprint should be provided as a hexadecimal string, optionally
containing colons.

---
## init_poolmanager
```python
from fingerprint import init_poolmanager
```



---
## __name__
```python
from host_header_ssl import __name__
```

requests_toolbelt.adapters.host_header_ssl
==========================================

This file contains an implementation of the HostHeaderSSLAdapter.

---
## HostHeaderSSLAdapter
```python
from host_header_ssl import HostHeaderSSLAdapter
```

A HTTPS Adapter for Python Requests that sets the hostname for certificate
verification based on the Host header.

This allows requesting the IP address directly via HTTPS without getting
a "hostname doesn't match" exception.

Example usage:

    >>> s.mount('https://', HostHeaderSSLAdapter())
    >>> s.get("https://93.184.216.34", headers={"Host": "example.org"})

---
## send
```python
from host_header_ssl import send
```



---
## __name__
```python
from ssl import __name__
```

requests_toolbelt.ssl_adapter
=============================

This file contains an implementation of the SSLAdapter originally demonstrated
in this blog post:
https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/

---
## SSLAdapter
```python
from ssl import SSLAdapter
```

A HTTPS Adapter for Python Requests that allows the choice of the SSL/TLS
version negotiated by Requests. This can be used either to enforce the
choice of high-security TLS versions (where supported), or to work around
misbehaving servers that fail to correctly negotiate the default TLS
version being offered.

Example usage:

    >>> import requests
    >>> import ssl
    >>> from requests_toolbelt import SSLAdapter
    >>> s = requests.Session()
    >>> s.mount('https://', SSLAdapter(ssl.PROTOCOL_TLSv1))

You can replace the chosen protocol with any that are available in the
default Python SSL module. All subsequent requests that match the adapter
prefix will use the chosen SSL version instead of the default.

This adapter will also attempt to change the SSL/TLS version negotiated by
Requests when using a proxy. However, this may not always be possible:
prior to Requests v2.4.0 the adapter did not have access to the proxy setup
code. In earlier versions of Requests, this adapter will not function
properly when used with proxies.

---
## __init__
```python
from ssl import __init__
```



---
## init_poolmanager
```python
from ssl import init_poolmanager
```



---
## proxy_manager_for
```python
from ssl import proxy_manager_for
```



---
## __name__
```python
from appengine import __name__
```

This module provides a pool manager that uses Google App Engine's
`URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_.

Example usage::

    from pip._vendor.urllib3 import PoolManager
    from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox

    if is_appengine_sandbox():
        # AppEngineManager uses AppEngine's URLFetch API behind the scenes
        http = AppEngineManager()
    else:
        # PoolManager uses a socket-level API behind the scenes
        http = PoolManager()

    r = http.request('GET', 'https://google.com/')

There are `limitations <https://cloud.google.com/appengine/docs/python/urlfetch/#Python_Quotas_and_limits>`_ to the URLFetch service and it may not be
the best choice for your application. There are three options for using
urllib3 on Google App Engine:

1. You can use :class:`AppEngineManager` with URLFetch. URLFetch is
   cost-effective in many circumstances as long as your usage is within the
   limitations.
2. You can use a normal :class:`~urllib3.PoolManager` by enabling sockets.
   Sockets also have `limitations and restrictions
   <https://cloud.google.com/appengine/docs/python/sockets/   #limitations-and-restrictions>`_ and have a lower free quota than URLFetch.
   To use sockets, be sure to specify the following in your ``app.yaml``::

        env_variables:
            GAE_USE_SOCKETS_HTTPLIB : 'true'

3. If you are using `App Engine Flexible
<https://cloud.google.com/appengine/docs/flexible/>`_, you can use the standard
:class:`PoolManager` without any configuration or special environment variables.

---
## AppEngineMROHack
```python
from appengine import AppEngineMROHack
```

Resolves infinite recursion when monkeypatching.

This works by injecting itself as the base class of both the
:class:`AppEngineAdapter` and Requests' default HTTPAdapter, which needs to
be done because default HTTPAdapter's MRO is recompiled when we
monkeypatch, at which point this class becomes HTTPAdapter's base class.
In addition, we use an instantiation flag to avoid infinite recursion.

---
## AppEngineAdapter
```python
from appengine import AppEngineAdapter
```

The transport adapter for Requests to use urllib3's GAE support.

Implements Requests's HTTPAdapter API.

When deploying to Google's App Engine service, some of Requests'
functionality is broken. There is underlying support for GAE in urllib3.
This functionality, however, is opt-in and needs to be enabled explicitly
for Requests to be able to use it.

---
## InsecureAppEngineAdapter
```python
from appengine import InsecureAppEngineAdapter
```

An always-insecure GAE adapter for Requests.

This is a variant of the the transport adapter for Requests to use
urllib3's GAE support that does not validate certificates. Use with
caution!

.. note::
    The ``validate_certificate`` keyword argument will not be honored here
    and is not part of the signature because we always force it to
    ``False``.

See :class:`AppEngineAdapter` for further details.

---
## _AppEnginePoolManager
```python
from appengine import _AppEnginePoolManager
```

Implements urllib3's PoolManager API expected by requests.

While a real PoolManager map hostnames to reusable Connections,
AppEngine has no concept of a reusable connection to a host.
So instead, this class constructs a small Connection per request,
that is returned to the Adapter and used to access the URL.

---
## _AppEngineConnection
```python
from appengine import _AppEngineConnection
```

Implements urllib3's HTTPConnectionPool API's urlopen().

This Connection's urlopen() is called with a host-relative path,
so in order to properly support opening the URL, we need to store
the full URL when this Connection is constructed from the PoolManager.

This code wraps AppEngineManager.urlopen(), which exposes a different
API than in the original urllib3 urlopen(), and thus needs this adapter.

---
## monkeypatch
```python
from appengine import monkeypatch
```

Sets up all Sessions to use AppEngineAdapter by default.

If you don't want to deal with configuring your own Sessions,
or if you use libraries that use requests directly (ie requests.post),
then you may prefer to monkeypatch and auto-configure all Sessions.

.. warning: :

    If ``validate_certificate`` is ``False``, certification validation will
    effectively be disabled for all requests.

---
## _check_version
```python
from appengine import _check_version
```



---
## __init__
```python
from appengine import __init__
```



---
## init_poolmanager
```python
from appengine import init_poolmanager
```



---
## connection_from_url
```python
from appengine import connection_from_url
```



---
## clear
```python
from appengine import clear
```



---
## urlopen
```python
from appengine import urlopen
```



---
## SourceAddressAdapter
```python
from source import SourceAddressAdapter
```

A Source Address Adapter for Python Requests that enables you to choose the
local address to bind to. This allows you to send your HTTP requests from a
specific interface and IP address.

Two address formats are accepted. The first is a string: this will set the
local IP address to the address given in the string, and will also choose a
semi-random high port for the local port number.

The second is a two-tuple of the form (ip address, port): for example,
``('10.10.10.10', 8999)``. This will set the local IP address to the first
element, and the local port to the second element. If ``0`` is used as the
port number, a semi-random high port will be selected.

.. warning:: Setting an explicit local port can have negative interactions
             with connection-pooling in Requests: in particular, it risks
             the possibility of getting "Address in use" errors. The
             string-only argument is generally preferred to the tuple-form.

Example usage:

.. code-block:: python

    import requests
    from requests_toolbelt.adapters.source import SourceAddressAdapter

    s = requests.Session()
    s.mount('http://', SourceAddressAdapter('10.10.10.10'))
    s.mount('https://', SourceAddressAdapter(('10.10.10.10', 8999)))

---
## init_poolmanager
```python
from source import init_poolmanager
```



---
## proxy_manager_for
```python
from source import proxy_manager_for
```



---
## _split_on_find
```python
from decoder import _split_on_find
```



---
## ImproperBodyPartContentException
```python
from decoder import ImproperBodyPartContentException
```



---
## NonMultipartContentTypeException
```python
from decoder import NonMultipartContentTypeException
```



---
## _header_parser
```python
from decoder import _header_parser
```



---
## BodyPart
```python
from decoder import BodyPart
```

The ``BodyPart`` object is a ``Response``-like interface to an individual
subpart of a multipart response. It is expected that these will
generally be created by objects of the ``MultipartDecoder`` class.

Like ``Response``, there is a ``CaseInsensitiveDict`` object named headers,
``content`` to access bytes, ``text`` to access unicode, and ``encoding``
to access the unicode codec.

---
## MultipartDecoder
```python
from decoder import MultipartDecoder
```

The ``MultipartDecoder`` object parses the multipart payload of
a bytestring into a tuple of ``Response``-like ``BodyPart`` objects.

The basic usage is::

    import requests
    from requests_toolbelt import MultipartDecoder

    response = requests.get(url)
    decoder = MultipartDecoder.from_response(response)
    for part in decoder.parts:
        print(part.headers['content-type'])

If the multipart content is not from a response, basic usage is::

    from requests_toolbelt import MultipartDecoder

    decoder = MultipartDecoder(content, content_type)
    for part in decoder.parts:
        print(part.headers['content-type'])

For both these usages, there is an optional ``encoding`` parameter. This is
a string, which is the name of the unicode codec to use (default is
``'utf-8'``).

---
## text
```python
from decoder import text
```

Content of the ``BodyPart`` in unicode.

---
## _find_boundary
```python
from decoder import _find_boundary
```



---
## _fix_first_part
```python
from decoder import _fix_first_part
```



---
## _parse_body
```python
from decoder import _parse_body
```



---
## from_response
```python
from decoder import from_response
```



---
## body_part
```python
from decoder import body_part
```



---
## test_part
```python
from decoder import test_part
```



---
## FileNotSupportedError
```python
from encoder import FileNotSupportedError
```

File not supported error.

---
## MultipartEncoder
```python
from encoder import MultipartEncoder
```

The ``MultipartEncoder`` object is a generic interface to the engine that
will create a ``multipart/form-data`` body for you.

The basic usage is:

.. code-block:: python

    import requests
    from requests_toolbelt import MultipartEncoder

    encoder = MultipartEncoder({'field': 'value',
                                'other_field': 'other_value'})
    r = requests.post('https://httpbin.org/post', data=encoder,
                      headers={'Content-Type': encoder.content_type})

If you do not need to take advantage of streaming the post body, you can
also do:

.. code-block:: python

    r = requests.post('https://httpbin.org/post',
                      data=encoder.to_string(),
                      headers={'Content-Type': encoder.content_type})

If you want the encoder to use a specific order, you can use an
OrderedDict or more simply, a list of tuples:

.. code-block:: python

    encoder = MultipartEncoder([('field', 'value'),
                                ('other_field', 'other_value')])

.. versionchanged:: 0.4.0

You can also provide tuples as part values as you would provide them to
requests' ``files`` parameter.

.. code-block:: python

    encoder = MultipartEncoder({
        'field': ('file_name', b'{"a": "b"}', 'application/json',
                  {'X-My-Header': 'my-value'})
    ])

.. warning::

    This object will end up directly in :mod:`httplib`. Currently,
    :mod:`httplib` has a hard-coded read size of **8192 bytes**. This
    means that it will loop until the file has been read and your upload
    could take a while. This is **not** a bug in requests. A feature is
    being considered for this object to allow you, the user, to specify
    what size should be returned on a read. If you have opinions on this,
    please weigh in on `this issue`_.

.. _this issue:
    https://github.com/requests/toolbelt/issues/75

---
## IDENTITY
```python
from encoder import IDENTITY
```



---
## MultipartEncoderMonitor
```python
from encoder import MultipartEncoderMonitor
```

An object used to monitor the progress of a :class:`MultipartEncoder`.

The :class:`MultipartEncoder` should only be responsible for preparing and
streaming the data. For anyone who wishes to monitor it, they shouldn't be
using that instance to manage that as well. Using this class, they can
monitor an encoder and register a callback. The callback receives the
instance of the monitor.

To use this monitor, you construct your :class:`MultipartEncoder` as you
normally would.

.. code-block:: python

    from requests_toolbelt import (MultipartEncoder,
                                   MultipartEncoderMonitor)
    import requests

    def callback(monitor):
        # Do something with this information
        pass

    m = MultipartEncoder(fields={'field0': 'value0'})
    monitor = MultipartEncoderMonitor(m, callback)
    headers = {'Content-Type': monitor.content_type}
    r = requests.post('https://httpbin.org/post', data=monitor,
                      headers=headers)

Alternatively, if your use case is very simple, you can use the following
pattern.

.. code-block:: python

    from requests_toolbelt import MultipartEncoderMonitor
    import requests

    def callback(monitor):
        # Do something with this information
        pass

    monitor = MultipartEncoderMonitor.from_fields(
        fields={'field0': 'value0'}, callback
        )
    headers = {'Content-Type': montior.content_type}
    r = requests.post('https://httpbin.org/post', data=monitor,
                      headers=headers)

---
## encode_with
```python
from encoder import encode_with
```

Encoding ``string`` with ``encoding`` if necessary.

:param str string: If string is a bytes object, it will not encode it.
    Otherwise, this function will encode it with the provided encoding.
:param str encoding: The encoding with which to encode string.
:returns: encoded bytes object

---
## readable_data
```python
from encoder import readable_data
```

Coerce the data to an object with a ``read`` method.

---
## total_len
```python
from encoder import total_len
```



---
## reset
```python
from encoder import reset
```

Keep track of the buffer's current position and write to the end.

This is a context manager meant to be used when adding data to the buffer.
It eliminates the need for every function to be concerned with the
position of the cursor in the buffer.

---
## coerce_data
```python
from encoder import coerce_data
```

Ensure that every object's __len__ behaves uniformly.

---
## to_list
```python
from encoder import to_list
```



---
## Part
```python
from encoder import Part
```



---
## CustomBytesIO
```python
from encoder import CustomBytesIO
```



---
## FileWrapper
```python
from encoder import FileWrapper
```



---
## FileFromURLWrapper
```python
from encoder import FileFromURLWrapper
```

File from URL wrapper.

The :class:`FileFromURLWrapper` object gives you the ability to stream file
from provided URL in chunks by :class:`MultipartEncoder`.
Provide a stateless solution for streaming file from one server to another.
You can use the :class:`FileFromURLWrapper` without a session or with
a session as demonstated by the examples below:

.. code-block:: python
    # no session

    import requests
    from requests_toolbelt import MultipartEncoder, FileFromURLWrapper

    url = 'https://httpbin.org/image/png'
    streaming_encoder = MultipartEncoder(
        fields={
            'file': FileFromURLWrapper(url)
        }
    )
    r = requests.post(
        'https://httpbin.org/post', data=streaming_encoder,
        headers={'Content-Type': streaming_encoder.content_type}
    )

.. code-block:: python
    # using a session

    import requests
    from requests_toolbelt import MultipartEncoder, FileFromURLWrapper

    session = requests.Session()
    url = 'https://httpbin.org/image/png'
    streaming_encoder = MultipartEncoder(
        fields={
            'file': FileFromURLWrapper(url, session=session)
        }
    )
    r = session.post(
        'https://httpbin.org/post', data=streaming_encoder,
        headers={'Content-Type': streaming_encoder.content_type}
    )

---
## len
```python
from encoder import len
```



---
## __repr__
```python
from encoder import __repr__
```



---
## _calculate_length
```python
from encoder import _calculate_length
```

This uses the parts to calculate the length of the body.

This returns the calculated length so __len__ can be lazy.

---
## _calculate_load_amount
```python
from encoder import _calculate_load_amount
```

This calculates how many bytes need to be added to the buffer.

When a consumer read's ``x`` from the buffer, there are two cases to
satisfy:

    1. Enough data in the buffer to return the requested amount
    2. Not enough data

This function uses the amount of unread bytes in the buffer and
determines how much the Encoder has to load before it can return the
requested amount of bytes.

:param int read_size: the number of bytes the consumer requests
:returns: int -- the number of bytes that must be loaded into the
    buffer before the read can be satisfied. This will be strictly
    non-negative

---
## _load
```python
from encoder import _load
```

Load ``amount`` number of bytes into the buffer.

---
## _next_part
```python
from encoder import _next_part
```



---
## _iter_fields
```python
from encoder import _iter_fields
```



---
## _prepare_parts
```python
from encoder import _prepare_parts
```

This uses the fields provided by the user and creates Part objects.

It populates the `parts` attribute and uses that to create a
generator for iteration.

---
## _write
```python
from encoder import _write
```

Write the bytes to the end of the buffer.

:param bytes bytes_to_write: byte-string (or bytearray) to append to
    the buffer
:returns: int -- the number of bytes written

---
## _write_boundary
```python
from encoder import _write_boundary
```

Write the boundary to the end of the buffer.

---
## _write_closing_boundary
```python
from encoder import _write_closing_boundary
```

Write the bytes necessary to finish a multipart/form-data body.

---
## _write_headers
```python
from encoder import _write_headers
```

Write the current part's headers to the buffer.

---
## content_type
```python
from encoder import content_type
```



---
## to_string
```python
from encoder import to_string
```



---
## read
```python
from encoder import read
```

Read file in chunks.

---
## from_fields
```python
from encoder import from_fields
```



---
## from_field
```python
from encoder import from_field
```

Create a part from a Request Field generated by urllib3.

---
## bytes_left_to_write
```python
from encoder import bytes_left_to_write
```

Determine if there are bytes left to write.

:returns: bool -- ``True`` if there are bytes left to write, otherwise
    ``False``

---
## write_to
```python
from encoder import write_to
```

Write the requested amount of bytes to the buffer provided.

The number of bytes written may exceed size on the first read since we
load the headers ambitiously.

:param CustomBytesIO buffer: buffer we want to write bytes to
:param int size: number of bytes requested to be written to the buffer
:returns: int -- number of bytes actually written

---
## _get_end
```python
from encoder import _get_end
```



---
## append
```python
from encoder import append
```



---
## smart_truncate
```python
from encoder import smart_truncate
```



---
## _request_for_file
```python
from encoder import _request_for_file
```

Make call for file under provided URL.

---
## __name__
```python
from tee import __name__
```

Tee function implementations.

---
## _tee
```python
from tee import _tee
```



---
## tee
```python
from tee import tee
```

Stream the response both to the generator and a file.

This will stream the response body while writing the bytes to
``fileobject``.

Example usage:

.. code-block:: python

    resp = requests.get(url, stream=True)
    with open('save_file', 'wb') as save_file:
        for chunk in tee(resp, save_file):
            # do stuff with chunk

.. code-block:: python

    import io

    resp = requests.get(url, stream=True)
    fileobject = io.BytesIO()

    for chunk in tee(resp, fileobject):
        # do stuff with chunk

:param response: Response from requests.
:type response: requests.Response
:param fileobject: Writable file-like object.
:type fileobject: file, io.BytesIO
:param int chunksize: (optional), Size of chunk to attempt to stream.
:param bool decode_content: (optional), If True, this will decode the
    compressed content of the response.
:raises: TypeError if the fileobject wasn't opened with the right mode
    or isn't a BytesIO object.

---
## tee_to_file
```python
from tee import tee_to_file
```

Stream the response both to the generator and a file.

This will open a file named ``filename`` and stream the response body
while writing the bytes to the opened file object.

Example usage:

.. code-block:: python

    resp = requests.get(url, stream=True)
    for chunk in tee_to_file(resp, 'save_file'):
        # do stuff with chunk

:param response: Response from requests.
:type response: requests.Response
:param str filename: Name of file in which we write the response content.
:param int chunksize: (optional), Size of chunk to attempt to stream.
:param bool decode_content: (optional), If True, this will decode the
    compressed content of the response.

---
## tee_to_bytearray
```python
from tee import tee_to_bytearray
```

Stream the response both to the generator and a bytearray.

This will stream the response provided to the function, add them to the
provided :class:`bytearray` and yield them to the user.

.. note::

    This uses the :meth:`bytearray.extend` by default instead of passing
    the bytearray into the ``readinto`` method.

Example usage:

.. code-block:: python

    b = bytearray()
    resp = requests.get(url, stream=True)
    for chunk in tee_to_bytearray(resp, b):
        # do stuff with chunk

:param response: Response from requests.
:type response: requests.Response
:param bytearray bytearr: Array to add the streamed bytes to.
:param int chunksize: (optional), Size of chunk to attempt to stream.
:param bool decode_content: (optional), If True, this will decode the
    compressed content of the response.

---
## __name__
```python
from stream import __name__
```

Utilities for dealing with streamed requests.

---
## _get_filename
```python
from stream import _get_filename
```



---
## get_download_file_path
```python
from stream import get_download_file_path
```

Given a response and a path, return a file path for a download.

If a ``path`` parameter is a directory, this function will parse the
``Content-Disposition`` header on the response to determine the name of the
file as reported by the server, and return a file path in the specified
directory.

If ``path`` is empty or None, this function will return a path relative
to the process' current working directory.

If path is a full file path, return it.

:param response: A Response object from requests
:type response: requests.models.Response
:param str path: Directory or file path.
:returns: full file path to download as
:rtype: str
:raises: :class:`requests_toolbelt.exceptions.StreamingError`

---
## stream_response_to_file
```python
from stream import stream_response_to_file
```

Stream a response body to the specified file.

Either use the ``path`` provided or use the name provided in the
``Content-Disposition`` header.

.. warning::

    If you pass this function an open file-like object as the ``path``
    parameter, the function will not close that file for you.

.. warning::

    This function will not automatically close the response object
    passed in as the ``response`` parameter.

If a ``path`` parameter is a directory, this function will parse the
``Content-Disposition`` header on the response to determine the name of the
file as reported by the server, and return a file path in the specified
directory. If no ``path`` parameter is supplied, this function will default
to the process' current working directory.

.. code-block:: python

    import requests
    from requests_toolbelt import exceptions
    from requests_toolbelt.downloadutils import stream

    r = requests.get(url, stream=True)
    try:
        filename = stream.stream_response_to_file(r)
    except exceptions.StreamingError as e:
        # The toolbelt could not find the filename in the
        # Content-Disposition
        print(e.message)

You can also specify the filename as a string. This will be passed to
the built-in :func:`open` and we will read the content into the file.

.. code-block:: python

    import requests
    from requests_toolbelt.downloadutils import stream

    r = requests.get(url, stream=True)
    filename = stream.stream_response_to_file(r, path='myfile')

If the calculated download file path already exists, this function will
raise a StreamingError.

Instead, if you want to manage the file object yourself, you need to
provide either a :class:`io.BytesIO` object or a file opened with the
`'b'` flag. See the two examples below for more details.

.. code-block:: python

    import requests
    from requests_toolbelt.downloadutils import stream

    with open('myfile', 'wb') as fd:
        r = requests.get(url, stream=True)
        filename = stream.stream_response_to_file(r, path=fd)

    print('{} saved to {}'.format(url, filename))

.. code-block:: python

    import io
    import requests
    from requests_toolbelt.downloadutils import stream

    b = io.BytesIO()
    r = requests.get(url, stream=True)
    filename = stream.stream_response_to_file(r, path=b)
    assert filename is None

:param response: A Response object from requests
:type response: requests.models.Response
:param path: *(optional)*, Either a string with the path to the location
    to save the response content, or a file-like object expecting bytes.
:type path: :class:`str`, or object with a :meth:`write`
:param int chunksize: (optional), Size of chunk to attempt to stream
    (default 512B).
:returns: The name of the file, if one can be determined, else None
:rtype: str
:raises: :class:`requests_toolbelt.exceptions.StreamingError`

---
## __name__
```python
from forgetful import __name__
```

The module containing the code for ForgetfulCookieJar.

---
## ForgetfulCookieJar
```python
from forgetful import ForgetfulCookieJar
```



---
## set_cookie
```python
from forgetful import set_cookie
```



---
## __name__
```python
from thread import __name__
```



---
## SessionThread
```python
from thread import SessionThread
```



---
## __init__
```python
from thread import __init__
```



---
## _create_worker
```python
from thread import _create_worker
```



---
## _handle_request
```python
from thread import _handle_request
```



---
## _make_request
```python
from thread import _make_request
```



---
## is_alive
```python
from thread import is_alive
```

Proxy to the thread's ``is_alive`` method.

---
## join
```python
from thread import join
```

Join this thread to the master thread.

---
## map
```python
from __init__ import map
```

Simple interface to the threaded Pool object.

This function takes a list of dictionaries representing requests to make
using Sessions in threads and returns a tuple where the first item is
a generator of successful responses and the second is a generator of
exceptions.

:param list requests:
    Collection of dictionaries representing requests to make with the Pool
    object.
:param \*\*kwargs:
    Keyword arguments that are passed to the
    :class:`~requests_toolbelt.threaded.pool.Pool` object.
:returns: Tuple of responses and exceptions from the pool
:rtype: (:class:`~requests_toolbelt.threaded.pool.ThreadResponse`,
    :class:`~requests_toolbelt.threaded.pool.ThreadException`)

---
## ThreadProxy
```python
from pool import ThreadProxy
```



---
## ThreadResponse
```python
from pool import ThreadResponse
```

A wrapper around a requests Response object.

This will proxy most attribute access actions to the Response object. For
example, if you wanted the parsed JSON from the response, you might do:

.. code-block:: python

    thread_response = pool.get_response()
    json = thread_response.json()

---
## ThreadException
```python
from pool import ThreadException
```

A wrapper around an exception raised during a request.

This will proxy most attribute access actions to the exception object. For
example, if you wanted the message from the exception, you might do:

.. code-block:: python

    thread_exc = pool.get_exception()
    msg = thread_exc.message

---
## _identity
```python
from pool import _identity
```



---
## _new_session
```python
from pool import _new_session
```



---
## from_exceptions
```python
from pool import from_exceptions
```

Create a :class:`~Pool` from an :class:`~ThreadException`\ s.

Provided an iterable that provides :class:`~ThreadException` objects,
this classmethod will generate a new pool to retry the requests that
caused the exceptions.

:param exceptions:
    Iterable that returns :class:`~ThreadException`
:type exceptions: iterable
:param kwargs:
    Keyword arguments passed to the :class:`~Pool` initializer.
:returns: An initialized :class:`~Pool` object.
:rtype: :class:`~Pool`

---
## from_urls
```python
from pool import from_urls
```

Create a :class:`~Pool` from an iterable of URLs.

:param urls:
    Iterable that returns URLs with which we create a pool.
:type urls: iterable
:param dict request_kwargs:
    Dictionary of other keyword arguments to provide to the request
    method.
:param kwargs:
    Keyword arguments passed to the :class:`~Pool` initializer.
:returns: An initialized :class:`~Pool` object.
:rtype: :class:`~Pool`

---
## exceptions
```python
from pool import exceptions
```

Iterate over all the exceptions in the pool.

:returns: Generator of :class:`~ThreadException`

---
## get_exception
```python
from pool import get_exception
```

Get an exception from the pool.

:rtype: :class:`~ThreadException`

---
## get_response
```python
from pool import get_response
```

Get a response from the pool.

:rtype: :class:`~ThreadResponse`

---
## responses
```python
from pool import responses
```

Iterate over all the responses in the pool.

:returns: Generator of :class:`~ThreadResponse`

---
## join_all
```python
from pool import join_all
```

Join all the threads to the master thread.

---
## __getattr__
```python
from pool import __getattr__
```

Proxy attribute accesses to the proxied object.

---
## __name__
```python
from overlay import __name__
```

Expose zipp.Path as .zipfile.Path.

Includes everything else in ``zipfile`` to match future usage. Just
use:

>>> from zipp.compat.overlay import zipfile

in place of ``import zipfile``.

Relative imports are supported too.

>>> from zipp.compat.overlay.zipfile import ZipInfo

The ``zipfile`` object added to ``sys.modules`` needs to be
hashable (#126).

>>> _ = hash(sys.modules['zipp.compat.overlay.zipfile'])

---
## HashableNamespace
```python
from overlay import HashableNamespace
```



---
## __hash__
```python
from overlay import __hash__
```



---
## __name__
```python
from py310 import __name__
```



---
## _text_encoding
```python
from py310 import _text_encoding
```



---
## is_credentials
```python
from auth import is_credentials
```



---
## BasicAuthWebSocketServerProtocol
```python
from auth import BasicAuthWebSocketServerProtocol
```

WebSocket server protocol that enforces HTTP Basic Auth.

---
## basic_auth_protocol_factory
```python
from auth import basic_auth_protocol_factory
```

Protocol factory that enforces HTTP Basic Auth.

:func:`basic_auth_protocol_factory` is designed to integrate with
:func:`~websockets.server.serve` like this::

    websockets.serve(
        ...,
        create_protocol=websockets.basic_auth_protocol_factory(
            realm="my dev server",
            credentials=("hello", "iloveyou"),
        )
    )

Args:
    realm: Scope of protection. It should contain only ASCII characters
        because the encoding of non-ASCII characters is undefined.
        Refer to section 2.2 of :rfc:`7235` for details.
    credentials: Hard coded authorized credentials. It can be a
        ``(username, password)`` pair or a list of such pairs.
    check_credentials: Coroutine that verifies credentials.
        It receives ``username`` and ``password`` arguments
        and returns a :class:`bool`. One of ``credentials`` or
        ``check_credentials`` must be provided but not both.
    create_protocol: Factory that creates the protocol. By default, this
        is :class:`BasicAuthWebSocketServerProtocol`. It can be replaced
        by a subclass.
Raises:
    TypeError: If the ``credentials`` or ``check_credentials`` argument is
        wrong.

---
## __name__
```python
from handshake import __name__
```



---
## build_request
```python
from handshake import build_request
```

Build a handshake request to send to the server.

Update request headers passed in argument.

Args:
    headers: Handshake request headers.

Returns:
    str: ``key`` that must be passed to :func:`check_response`.

---
## check_request
```python
from handshake import check_request
```

Check a handshake request received from the client.

This function doesn't verify that the request is an HTTP/1.1 or higher GET
request and doesn't perform ``Host`` and ``Origin`` checks. These controls
are usually performed earlier in the HTTP request handling code. They're
the responsibility of the caller.

Args:
    headers: Handshake request headers.

Returns:
    str: ``key`` that must be passed to :func:`build_response`.

Raises:
    InvalidHandshake: If the handshake request is invalid.
        Then, the server must return a 400 Bad Request error.

---
## build_response
```python
from handshake import build_response
```

Build a handshake response to send to the client.

Update response headers passed in argument.

Args:
    headers: Handshake response headers.
    key: Returned by :func:`check_request`.

---
## check_response
```python
from handshake import check_response
```

Check a handshake response received from the server.

This function doesn't verify that the response is an HTTP/1.1 or higher
response with a 101 status code. These controls are the responsibility of
the caller.

Args:
    headers: Handshake response headers.
    key: Returned by :func:`build_request`.

Raises:
    InvalidHandshake: If the handshake response is invalid.

---
## loop_if_py_lt_38
```python
from compatibility import loop_if_py_lt_38
```

Helper for the removal of the loop argument in Python 3.10.

---
## WebSocketServerProtocol
```python
from server import WebSocketServerProtocol
```

WebSocket server connection.

:class:`WebSocketServerProtocol` provides :meth:`recv` and :meth:`send`
coroutines for receiving and sending messages.

It supports asynchronous iteration to receive messages::

    async for message in websocket:
        await process(message)

The iterator exits normally when the connection is closed with close code
1000 (OK) or 1001 (going away) or without a close code. It raises
a :exc:`~websockets.exceptions.ConnectionClosedError` when the connection
is closed with any other code.

You may customize the opening handshake in a subclass by
overriding :meth:`process_request` or :meth:`select_subprotocol`.

Args:
    ws_server: WebSocket server that created this connection.

See :func:`serve` for the documentation of ``ws_handler``, ``logger``, ``origins``,
``extensions``, ``subprotocols``, ``extra_headers``, and ``server_header``.

See :class:`~websockets.legacy.protocol.WebSocketCommonProtocol` for the
documentation of ``ping_interval``, ``ping_timeout``, ``close_timeout``,
``max_size``, ``max_queue``, ``read_limit``, and ``write_limit``.

---
## WebSocketServer
```python
from server import WebSocketServer
```

WebSocket server returned by :func:`serve`.

This class mirrors the API of :class:`~socketserver.BaseServer`, notably the
:meth:`~socketserver.BaseServer.serve_forever` and
:meth:`~socketserver.BaseServer.shutdown` methods, as well as the context
manager protocol.

Args:
    socket: Server socket listening for new connections.
    handler: Handler for one connection. Receives the socket and address
        returned by :meth:`~socket.socket.accept`.
    logger: Logger for this server.

---
## Serve
```python
from server import Serve
```

Start a WebSocket server listening on ``host`` and ``port``.

Whenever a client connects, the server creates a
:class:`WebSocketServerProtocol`, performs the opening handshake, and
delegates to the connection handler, ``ws_handler``.

The handler receives the :class:`WebSocketServerProtocol` and uses it to
send and receive messages.

Once the handler completes, either normally or with an exception, the
server performs the closing handshake and closes the connection.

Awaiting :func:`serve` yields a :class:`WebSocketServer`. This object
provides a :meth:`~WebSocketServer.close` method to shut down the server::

    stop = asyncio.Future()  # set this future to exit the server

    server = await serve(...)
    await stop
    await server.close()

:func:`serve` can be used as an asynchronous context manager. Then, the
server is shut down automatically when exiting the context::

    stop = asyncio.Future()  # set this future to exit the server

    async with serve(...):
        await stop

Args:
    ws_handler: Connection handler. It receives the WebSocket connection,
        which is a :class:`WebSocketServerProtocol`, in argument.
    host: Network interfaces the server binds to.
        See :meth:`~asyncio.loop.create_server` for details.
    port: TCP port the server listens on.
        See :meth:`~asyncio.loop.create_server` for details.
    create_protocol: Factory for the :class:`asyncio.Protocol` managing
        the connection. It defaults to :class:`WebSocketServerProtocol`.
        Set it to a wrapper or a subclass to customize connection handling.
    logger: Logger for this server.
        It defaults to ``logging.getLogger("websockets.server")``.
        See the :doc:`logging guide <../../topics/logging>` for details.
    compression: The "permessage-deflate" extension is enabled by default.
        Set ``compression`` to :obj:`None` to disable it. See the
        :doc:`compression guide <../../topics/compression>` for details.
    origins: Acceptable values of the ``Origin`` header, for defending
        against Cross-Site WebSocket Hijacking attacks. Include :obj:`None`
        in the list if the lack of an origin is acceptable.
    extensions: List of supported extensions, in order in which they
        should be negotiated and run.
    subprotocols: List of supported subprotocols, in order of decreasing
        preference.
    extra_headers (Union[HeadersLike, Callable[[str, Headers], HeadersLike]]):
        Arbitrary HTTP headers to add to the response. This can be
        a :data:`~websockets.datastructures.HeadersLike` or a callable
        taking the request path and headers in arguments and returning
        a :data:`~websockets.datastructures.HeadersLike`.
    server_header: Value of  the ``Server`` response header.
        It defaults to ``"Python/x.y.z websockets/X.Y"``.
        Setting it to :obj:`None` removes the header.
    process_request (Optional[Callable[[str, Headers],             Awaitable[Optional[Tuple[http.HTTPStatus, HeadersLike, bytes]]]]]):
        Intercept HTTP request before the opening handshake.
        See :meth:`~WebSocketServerProtocol.process_request` for details.
    select_subprotocol: Select a subprotocol supported by the client.
        See :meth:`~WebSocketServerProtocol.select_subprotocol` for details.
    open_timeout: Timeout for opening connections in seconds.
        :obj:`None` disables the timeout.

See :class:`~websockets.legacy.protocol.WebSocketCommonProtocol` for the
documentation of ``ping_interval``, ``ping_timeout``, ``close_timeout``,
``max_size``, ``max_queue``, ``read_limit``, and ``write_limit``.

Any other keyword arguments are passed the event loop's
:meth:`~asyncio.loop.create_server` method.

For example:

* You can set ``ssl`` to a :class:`~ssl.SSLContext` to enable TLS.

* You can set ``sock`` to a :obj:`~socket.socket` that you created
  outside of websockets.

Returns:
    WebSocketServer: WebSocket server.

---
## unix_serve
```python
from server import unix_serve
```

Create a WebSocket server listening on a Unix socket.

This function is identical to :func:`serve`, except the ``host`` and
``port`` arguments are replaced by ``path``. It's only available on Unix.

It's useful for deploying a server behind a reverse proxy such as nginx.

Args:
    handler: Connection handler. It receives the WebSocket connection,
        which is a :class:`ServerConnection`, in argument.
    path: File system path to the Unix socket.

---
## remove_path_argument
```python
from server import remove_path_argument
```



---
## connection_made
```python
from server import connection_made
```

Register connection and initialize a task to handle it.

---
## write_http_response
```python
from server import write_http_response
```

Write status line and headers to the HTTP response.

This coroutine is also able to write a response body.

---
## wrap
```python
from server import wrap
```

Attach to a given :class:`~asyncio.Server`.

Since :meth:`~asyncio.loop.create_server` doesn't support injecting a
custom ``Server`` class, the easiest solution that doesn't rely on
private :mod:`asyncio` APIs is to:

- instantiate a :class:`WebSocketServer`
- give the protocol factory a reference to that instance
- call :meth:`~asyncio.loop.create_server` with the factory
- attach the resulting :class:`~asyncio.Server` with this method

---
## register
```python
from server import register
```

Register a connection with this server.

---
## unregister
```python
from server import unregister
```

Unregister a connection with this server.

---
## close
```python
from server import close
```

Close the server.

* Close the underlying :class:`~asyncio.Server`.
* When ``close_connections`` is :obj:`True`, which is the default,
  close existing connections. Specifically:

  * Reject opening WebSocket connections with an HTTP 503 (service
    unavailable) error. This happens when the server accepted the TCP
    connection but didn't complete the opening handshake before closing.
  * Close open WebSocket connections with close code 1001 (going away).

* Wait until all connection handlers terminate.

:meth:`close` is idempotent.

---
## get_loop
```python
from server import get_loop
```

See :meth:`asyncio.Server.get_loop`.

---
## is_serving
```python
from server import is_serving
```

See :meth:`asyncio.Server.is_serving`.

---
## sockets
```python
from server import sockets
```

See :attr:`asyncio.Server.sockets`.

---
## __await__
```python
from server import __await__
```



---
## WebSocketCommonProtocol
```python
from protocol import WebSocketCommonProtocol
```

WebSocket connection.

:class:`WebSocketCommonProtocol` provides APIs shared between WebSocket
servers and clients. You shouldn't use it directly. Instead, use
:class:`~websockets.client.WebSocketClientProtocol` or
:class:`~websockets.server.WebSocketServerProtocol`.

This documentation focuses on low-level details that aren't covered in the
documentation of :class:`~websockets.client.WebSocketClientProtocol` and
:class:`~websockets.server.WebSocketServerProtocol` for the sake of
simplicity.

Once the connection is open, a Ping_ frame is sent every ``ping_interval``
seconds. This serves as a keepalive. It helps keeping the connection open,
especially in the presence of proxies with short timeouts on inactive
connections. Set ``ping_interval`` to :obj:`None` to disable this behavior.

.. _Ping: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.2

If the corresponding Pong_ frame isn't received within ``ping_timeout``
seconds, the connection is considered unusable and is closed with code 1011.
This ensures that the remote endpoint remains responsive. Set
``ping_timeout`` to :obj:`None` to disable this behavior.

.. _Pong: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.3

See the discussion of :doc:`timeouts <../../topics/timeouts>` for details.

The ``close_timeout`` parameter defines a maximum wait time for completing
the closing handshake and terminating the TCP connection. For legacy
reasons, :meth:`close` completes in at most ``5 * close_timeout`` seconds
for clients and ``4 * close_timeout`` for servers.

``close_timeout`` is a parameter of the protocol because websockets usually
calls :meth:`close` implicitly upon exit:

* on the client side, when using :func:`~websockets.client.connect` as a
  context manager;
* on the server side, when the connection handler terminates.

To apply a timeout to any other API, wrap it in :func:`~asyncio.timeout` or
:func:`~asyncio.wait_for`.

The ``max_size`` parameter enforces the maximum size for incoming messages
in bytes. The default value is 1 MiB. If a larger message is received,
:meth:`recv` will raise :exc:`~websockets.exceptions.ConnectionClosedError`
and the connection will be closed with code 1009.

The ``max_queue`` parameter sets the maximum length of the queue that
holds incoming messages. The default value is ``32``. Messages are added
to an in-memory queue when they're received; then :meth:`recv` pops from
that queue. In order to prevent excessive memory consumption when
messages are received faster than they can be processed, the queue must
be bounded. If the queue fills up, the protocol stops processing incoming
data until :meth:`recv` is called. In this situation, various receive
buffers (at least in :mod:`asyncio` and in the OS) will fill up, then the
TCP receive window will shrink, slowing down transmission to avoid packet
loss.

Since Python can use up to 4 bytes of memory to represent a single
character, each connection may use up to ``4 * max_size * max_queue``
bytes of memory to store incoming messages. By default, this is 128 MiB.
You may want to lower the limits, depending on your application's
requirements.

The ``read_limit`` argument sets the high-water limit of the buffer for
incoming bytes. The low-water limit is half the high-water limit. The
default value is 64 KiB, half of asyncio's default (based on the current
implementation of :class:`~asyncio.StreamReader`).

The ``write_limit`` argument sets the high-water limit of the buffer for
outgoing bytes. The low-water limit is a quarter of the high-water limit.
The default value is 64 KiB, equal to asyncio's default (based on the
current implementation of ``FlowControlMixin``).

See the discussion of :doc:`memory usage <../../topics/memory>` for details.

Args:
    logger: Logger for this server.
        It defaults to ``logging.getLogger("websockets.protocol")``.
        See the :doc:`logging guide <../../topics/logging>` for details.
    ping_interval: Delay between keepalive pings in seconds.
        :obj:`None` disables keepalive pings.
    ping_timeout: Timeout for keepalive pings in seconds.
        :obj:`None` disables timeouts.
    close_timeout: Timeout for closing the connection in seconds.
        For legacy reasons, the actual timeout is 4 or 5 times larger.
    max_size: Maximum size of incoming messages in bytes.
        :obj:`None` disables the limit.
    max_queue: Maximum number of incoming messages in receive buffer.
        :obj:`None` disables the limit.
    read_limit: High-water mark of read buffer in bytes.
    write_limit: High-water mark of write buffer in bytes.

---
## broadcast
```python
from protocol import broadcast
```

Broadcast a message to several WebSocket connections.

A string (:class:`str`) is sent as a Text_ frame. A bytestring or bytes-like
object (:class:`bytes`, :class:`bytearray`, or :class:`memoryview`) is sent
as a Binary_ frame.

.. _Text: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6
.. _Binary: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6

:func:`broadcast` pushes the message synchronously to all connections even
if their write buffers are overflowing. There's no backpressure.

If you broadcast messages faster than a connection can handle them, messages
will pile up in its write buffer until the connection times out. Keep
``ping_interval`` and ``ping_timeout`` low to prevent excessive memory usage
from slow connections.

Unlike :meth:`~websockets.server.WebSocketServerProtocol.send`,
:func:`broadcast` doesn't support sending fragmented messages. Indeed,
fragmentation is useful for sending large messages without buffering them in
memory, while :func:`broadcast` buffers one copy per connection as fast as
possible.

:func:`broadcast` skips connections that aren't open in order to avoid
errors on connections where the closing handshake is in progress.

:func:`broadcast` ignores failures to write the message on some connections.
It continues writing to other connections. On Python 3.11 and above, you
may set ``raise_exceptions`` to :obj:`True` to record failures and raise all
exceptions in a :pep:`654` :exc:`ExceptionGroup`.

Args:
    websockets: WebSocket connections to which the message will be sent.
    message: Message to send.
    raise_exceptions: Whether to raise an exception in case of failures.

Raises:
    TypeError: If ``message`` doesn't have a supported type.

---
## connection_open
```python
from protocol import connection_open
```

Callback when the WebSocket opening handshake completes.

Enter the OPEN state and start the data transfer phase.

---
## host
```python
from protocol import host
```



---
## port
```python
from protocol import port
```



---
## secure
```python
from protocol import secure
```



---
## local_address
```python
from protocol import local_address
```

Local address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family;
see :meth:`~socket.socket.getsockname`.

:obj:`None` if the TCP connection isn't established yet.

---
## remote_address
```python
from protocol import remote_address
```

Remote address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family;
see :meth:`~socket.socket.getpeername`.

:obj:`None` if the TCP connection isn't established yet.

---
## open
```python
from protocol import open
```

:obj:`True` when the connection is open; :obj:`False` otherwise.

This attribute may be used to detect disconnections. However, this
approach is discouraged per the EAFP_ principle. Instead, you should
handle :exc:`~websockets.exceptions.ConnectionClosed` exceptions.

.. _EAFP: https://docs.python.org/3/glossary.html#term-eafp

---
## closed
```python
from protocol import closed
```

:obj:`True` when the connection is closed; :obj:`False` otherwise.

Be aware that both :attr:`open` and :attr:`closed` are :obj:`False`
during the opening and closing sequences.

---
## connection_closed_exc
```python
from protocol import connection_closed_exc
```



---
## write_frame_sync
```python
from protocol import write_frame_sync
```



---
## fail_connection
```python
from protocol import fail_connection
```

7.1.7. Fail the WebSocket Connection

This requires:

1. Stopping all processing of incoming data, which means cancelling
   :attr:`transfer_data_task`. The close code will be 1006 unless a
   close frame was received earlier.

2. Sending a close frame with an appropriate code if the opening
   handshake succeeded and the other side is likely to process it.

3. Closing the connection. :meth:`close_connection` takes care of
   this once :attr:`transfer_data_task` exits after being canceled.

(The specification describes these steps in the opposite order.)

---
## abort_pings
```python
from protocol import abort_pings
```

Raise ConnectionClosed in pending keepalive pings.

They'll never receive a pong once the connection is closed.

---
## connection_made
```python
from protocol import connection_made
```

Configure write buffer limits.

The high-water limit is defined by ``self.write_limit``.

The low-water limit currently defaults to ``self.write_limit // 4`` in
:meth:`~asyncio.WriteTransport.set_write_buffer_limits`, which should
be all right for reasonable use cases of this library.

This is the earliest point where we can get hold of the transport,
which means it's the best point for configuring it.

---
## connection_lost
```python
from protocol import connection_lost
```

7.1.4. The WebSocket Connection is Closed.

---
## pause_writing
```python
from protocol import pause_writing
```



---
## resume_writing
```python
from protocol import resume_writing
```



---
## data_received
```python
from protocol import data_received
```



---
## eof_received
```python
from protocol import eof_received
```

Close the transport after receiving EOF.

The WebSocket protocol has its own closing handshake: endpoints close
the TCP or TLS connection after sending and receiving a close frame.

As a consequence, they never need to write after receiving EOF, so
there's no reason to keep the transport open by returning :obj:`True`.

Besides, that doesn't work on TLS connections.

---
## append
```python
from protocol import append
```



---
## WebSocketClientProtocol
```python
from client import WebSocketClientProtocol
```

WebSocket client connection.

:class:`WebSocketClientProtocol` provides :meth:`recv` and :meth:`send`
coroutines for receiving and sending messages.

It supports asynchronous iteration to receive incoming messages::

    async for message in websocket:
        await process(message)

The iterator exits normally when the connection is closed with close code
1000 (OK) or 1001 (going away) or without a close code. It raises
a :exc:`~websockets.exceptions.ConnectionClosedError` when the connection
is closed with any other code.

See :func:`connect` for the documentation of ``logger``, ``origin``,
``extensions``, ``subprotocols``, ``extra_headers``, and
``user_agent_header``.

See :class:`~websockets.legacy.protocol.WebSocketCommonProtocol` for the
documentation of ``ping_interval``, ``ping_timeout``, ``close_timeout``,
``max_size``, ``max_queue``, ``read_limit``, and ``write_limit``.

---
## Connect
```python
from client import Connect
```

Connect to the WebSocket server at ``uri``.

Awaiting :func:`connect` yields a :class:`WebSocketClientProtocol` which
can then be used to send and receive messages.

:func:`connect` can be used as a asynchronous context manager::

    async with websockets.connect(...) as websocket:
        ...

The connection is closed automatically when exiting the context.

:func:`connect` can be used as an infinite asynchronous iterator to
reconnect automatically on errors::

    async for websocket in websockets.connect(...):
        try:
            ...
        except websockets.ConnectionClosed:
            continue

The connection is closed automatically after each iteration of the loop.

If an error occurs while establishing the connection, :func:`connect`
retries with exponential backoff. The backoff delay starts at three
seconds and increases up to one minute.

If an error occurs in the body of the loop, you can handle the exception
and :func:`connect` will reconnect with the next iteration; or you can
let the exception bubble up and break out of the loop. This lets you
decide which errors trigger a reconnection and which errors are fatal.

Args:
    uri: URI of the WebSocket server.
    create_protocol: Factory for the :class:`asyncio.Protocol` managing
        the connection. It defaults to :class:`WebSocketClientProtocol`.
        Set it to a wrapper or a subclass to customize connection handling.
    logger: Logger for this client.
        It defaults to ``logging.getLogger("websockets.client")``.
        See the :doc:`logging guide <../../topics/logging>` for details.
    compression: The "permessage-deflate" extension is enabled by default.
        Set ``compression`` to :obj:`None` to disable it. See the
        :doc:`compression guide <../../topics/compression>` for details.
    origin: Value of the ``Origin`` header, for servers that require it.
    extensions: List of supported extensions, in order in which they
        should be negotiated and run.
    subprotocols: List of supported subprotocols, in order of decreasing
        preference.
    extra_headers: Arbitrary HTTP headers to add to the handshake request.
    user_agent_header: Value of  the ``User-Agent`` request header.
        It defaults to ``"Python/x.y.z websockets/X.Y"``.
        Setting it to :obj:`None` removes the header.
    open_timeout: Timeout for opening the connection in seconds.
        :obj:`None` disables the timeout.

See :class:`~websockets.legacy.protocol.WebSocketCommonProtocol` for the
documentation of ``ping_interval``, ``ping_timeout``, ``close_timeout``,
``max_size``, ``max_queue``, ``read_limit``, and ``write_limit``.

Any other keyword arguments are passed the event loop's
:meth:`~asyncio.loop.create_connection` method.

For example:

* You can set ``ssl`` to a :class:`~ssl.SSLContext` to enforce TLS
  settings. When connecting to a ``wss://`` URI, if ``ssl`` isn't
  provided, a TLS context is created
  with :func:`~ssl.create_default_context`.

* You can set ``host`` and ``port`` to connect to a different host and
  port from those found in ``uri``. This only changes the destination of
  the TCP connection. The host name from ``uri`` is still used in the TLS
  handshake for secure connections and in the ``Host`` header.

Raises:
    InvalidURI: If ``uri`` isn't a valid WebSocket URI.
    OSError: If the TCP connection fails.
    InvalidHandshake: If the opening handshake fails.
    ~asyncio.TimeoutError: If the opening handshake times out.

---
## unix_connect
```python
from client import unix_connect
```

Connect to a WebSocket server listening on a Unix socket.

This function is identical to :func:`connect`, except for the additional
``path`` argument. It's only available on Unix.

It's mainly useful for debugging servers listening on Unix sockets.

Args:
    path: File system path to the Unix socket.
    uri: URI of the WebSocket server. ``uri`` defaults to
        ``ws://localhost/`` or, when a ``ssl_context`` is provided, to
        ``wss://localhost/``.

---
## write_http_request
```python
from client import write_http_request
```

Write request line and headers to the HTTP request.

---
## handle_redirect
```python
from client import handle_redirect
```



---
## __name__
```python
from async_timeout import __name__
```



---
## timeout
```python
from async_timeout import timeout
```

timeout context manager.

Useful in cases when you want to apply timeout logic around block
of code or in cases when asyncio.wait_for is not suitable. For example:

>>> async with timeout(0.001):
...     async with aiohttp.get('https://github.com') as r:
...         await r.text()


delay - value in seconds or None to disable timeout logic

---
## timeout_at
```python
from async_timeout import timeout_at
```

Schedule the timeout at absolute time.

deadline argument points on the time in the same clock system
as loop.time().

Please note: it is not POSIX time but a time with
undefined starting base, e.g. the time of the system power on.

>>> async with timeout_at(loop.time() + 10):
...     async with aiohttp.get('https://github.com') as r:
...         await r.text()

---
## _State
```python
from async_timeout import _State
```



---
## Timeout
```python
from async_timeout import Timeout
```



---
## final
```python
from async_timeout import final
```

This decorator can be used to indicate to type checkers that
the decorated method cannot be overridden, and decorated class
cannot be subclassed. For example:

    class Base:
        @final
        def done(self) -> None:
            ...
    class Sub(Base):
        def done(self) -> None:  # Error reported by type checker
            ...
    @final
    class Leaf:
        ...
    class Other(Leaf):  # Error reported by type checker
        ...

There is no runtime checking of these properties. The decorator
sets the ``__final__`` attribute to ``True`` on the decorated object
to allow runtime introspection.

---
## __init__
```python
from async_timeout import __init__
```



---
## __enter__
```python
from async_timeout import __enter__
```



---
## __exit__
```python
from async_timeout import __exit__
```



---
## expired
```python
from async_timeout import expired
```

Is timeout expired during execution?

---
## deadline
```python
from async_timeout import deadline
```



---
## reject
```python
from async_timeout import reject
```

Reject scheduled timeout if any.

---
## _reject
```python
from async_timeout import _reject
```



---
## shift
```python
from async_timeout import shift
```

Advance timeout on delay seconds.

The delay can be negative.

Raise RuntimeError if shift is called when deadline is not scheduled

---
## update
```python
from async_timeout import update
```

Set deadline to absolute value.

deadline argument points on the time in the same clock system
as loop.time().

If new deadline is in the past the timeout is raised immediately.

Please note: it is not POSIX time but a time with
undefined starting base, e.g. the time of the system power on.

---
## _reschedule
```python
from async_timeout import _reschedule
```



---
## _do_enter
```python
from async_timeout import _do_enter
```



---
## _do_exit
```python
from async_timeout import _do_exit
```



---
## _on_timeout
```python
from async_timeout import _on_timeout
```



---
## d
```python
from http import d
```

Decode a bytestring for interpolating into an error message.

---
## __name__
```python
from framing import __name__
```



---
## Frame
```python
from framing import Frame
```



---
## parse_close
```python
from framing import parse_close
```

Parse the payload from a close frame.

Returns:
    Close code and reason.

Raises:
    ProtocolError: If data is ill-formed.
    UnicodeDecodeError: If the reason isn't valid UTF-8.

---
## serialize_close
```python
from framing import serialize_close
```

Serialize the payload for a close frame.

---
## new_frame
```python
from framing import new_frame
```



---
## __str__
```python
from framing import __str__
```



---
## check
```python
from framing import check
```



---
## write
```python
from framing import write
```

Write a WebSocket frame.

Args:
    frame: Frame to write.
    write: Function that writes bytes.
    mask: Whether the frame should be masked i.e. whether the write
        happens on the client side.
    extensions: List of extensions, applied in order.

Raises:
    ProtocolError: If the frame contains incorrect values.

---
## __name__
```python
from permessage_deflate import __name__
```



---
## PerMessageDeflate
```python
from permessage_deflate import PerMessageDeflate
```

Per-Message Deflate extension.

---
## _build_parameters
```python
from permessage_deflate import _build_parameters
```

Build a list of ``(name, value)`` pairs for some compression parameters.

---
## _extract_parameters
```python
from permessage_deflate import _extract_parameters
```

Extract compression parameters from a list of ``(name, value)`` pairs.

If ``is_server`` is :obj:`True`, ``client_max_window_bits`` may be
provided without a value. This is only allowed in handshake requests.

---
## ClientPerMessageDeflateFactory
```python
from permessage_deflate import ClientPerMessageDeflateFactory
```

Client-side extension factory for the Per-Message Deflate extension.

Parameters behave as described in `section 7.1 of RFC 7692`_.

.. _section 7.1 of RFC 7692: https://www.rfc-editor.org/rfc/rfc7692.html#section-7.1

Set them to :obj:`True` to include them in the negotiation offer without a
value or to an integer value to include them with this value.

Args:
    server_no_context_takeover: prevent server from using context takeover.
    client_no_context_takeover: prevent client from using context takeover.
    server_max_window_bits: maximum size of the server's LZ77 sliding window
        in bits, between 8 and 15.
    client_max_window_bits: maximum size of the client's LZ77 sliding window
        in bits, between 8 and 15, or :obj:`True` to indicate support without
        setting a limit.
    compress_settings: additional keyword arguments for :func:`zlib.compressobj`,
        excluding ``wbits``.

---
## enable_client_permessage_deflate
```python
from permessage_deflate import enable_client_permessage_deflate
```

Enable Per-Message Deflate with default settings in client extensions.

If the extension is already present, perhaps with non-default settings,
the configuration isn't changed.

---
## ServerPerMessageDeflateFactory
```python
from permessage_deflate import ServerPerMessageDeflateFactory
```

Server-side extension factory for the Per-Message Deflate extension.

Parameters behave as described in `section 7.1 of RFC 7692`_.

.. _section 7.1 of RFC 7692: https://www.rfc-editor.org/rfc/rfc7692.html#section-7.1

Set them to :obj:`True` to include them in the negotiation offer without a
value or to an integer value to include them with this value.

Args:
    server_no_context_takeover: prevent server from using context takeover.
    client_no_context_takeover: prevent client from using context takeover.
    server_max_window_bits: maximum size of the server's LZ77 sliding window
        in bits, between 8 and 15.
    client_max_window_bits: maximum size of the client's LZ77 sliding window
        in bits, between 8 and 15.
    compress_settings: additional keyword arguments for :func:`zlib.compressobj`,
        excluding ``wbits``.
    require_client_max_window_bits: do not enable compression at all if
        client doesn't advertise support for ``client_max_window_bits``;
        the default behavior is to enable compression without enforcing
        ``client_max_window_bits``.

---
## enable_server_permessage_deflate
```python
from permessage_deflate import enable_server_permessage_deflate
```

Enable Per-Message Deflate with default settings in server extensions.

If the extension is already present, perhaps with non-default settings,
the configuration isn't changed.

---
## __init__
```python
from permessage_deflate import __init__
```

Configure the Per-Message Deflate extension factory.

---
## __repr__
```python
from permessage_deflate import __repr__
```



---
## decode
```python
from permessage_deflate import decode
```

Decode an incoming frame.

---
## encode
```python
from permessage_deflate import encode
```

Encode an outgoing frame.

---
## get_request_params
```python
from permessage_deflate import get_request_params
```

Build request parameters.

---
## process_response_params
```python
from permessage_deflate import process_response_params
```

Process response parameters.

Return an extension instance.

---
## process_request_params
```python
from permessage_deflate import process_request_params
```

Process request parameters.

Return response params and an extension instance.

---
## Extension
```python
from base import Extension
```

Base class for extensions.

---
## ClientExtensionFactory
```python
from base import ClientExtensionFactory
```

Base class for client-side extension factories.

---
## ServerExtensionFactory
```python
from base import ServerExtensionFactory
```

Base class for server-side extension factories.

---
## decode
```python
from base import decode
```

Decode an incoming frame.

Args:
    frame (Frame): incoming frame.
    max_size: maximum payload size in bytes.

Returns:
    Frame: Decoded frame.

Raises:
    PayloadTooBig: if decoding the payload exceeds ``max_size``.

---
## encode
```python
from base import encode
```

Encode an outgoing frame.

Args:
    frame (Frame): outgoing frame.

Returns:
    Frame: Encoded frame.

---
## get_request_params
```python
from base import get_request_params
```

Build parameters to send to the server for this extension.

Returns:
    List[ExtensionParameter]: Parameters to send to the server.

---
## process_response_params
```python
from base import process_response_params
```

Process parameters received from the server.

Args:
    params (Sequence[ExtensionParameter]): parameters received from
        the server for this extension.
    accepted_extensions (Sequence[Extension]): list of previously
        accepted extensions.

Returns:
    Extension: An extension instance.

Raises:
    NegotiationError: if parameters aren't acceptable.

---
## process_request_params
```python
from base import process_request_params
```

Process parameters received from the client.

Args:
    params (Sequence[ExtensionParameter]): parameters received from
        the client for this extension.
    accepted_extensions (Sequence[Extension]): list of previously
        accepted extensions.

Returns:
    Tuple[List[ExtensionParameter], Extension]: To accept the offer,
    parameters to send to the client for this extension and an
    extension instance.

Raises:
    NegotiationError: to reject the offer, if parameters received from
        the client aren't acceptable.

---
## socket_create_server
```python
from compatibility import socket_create_server
```

Simplified backport of socket.create_server from Python 3.8.

---
## handshake
```python
from server import handshake
```

Perform the opening handshake.

---
## process_event
```python
from server import process_event
```

Process one incoming event.

---
## recv_events
```python
from server import recv_events
```

Read incoming data from the socket and process events.

---
## shutdown
```python
from server import shutdown
```

See :meth:`socketserver.BaseServer.shutdown`.

---
## fileno
```python
from server import fileno
```

See :meth:`socketserver.BaseServer.fileno`.

---
## __enter__
```python
from server import __enter__
```



---
## __exit__
```python
from server import __exit__
```



---
## conn_handler
```python
from server import conn_handler
```



---
## protocol_select_subprotocol
```python
from server import protocol_select_subprotocol
```



---
## handshake
```python
from client import handshake
```

Perform the opening handshake.

---
## process_event
```python
from client import process_event
```

Process one incoming event.

---
## recv_events
```python
from client import recv_events
```

Read incoming data from the socket and process events.

---
## local_address
```python
from connection import local_address
```

Local address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family.
See :meth:`~socket.socket.getsockname`.

---
## remote_address
```python
from connection import remote_address
```

Remote address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family.
See :meth:`~socket.socket.getpeername`.

---
## subprotocol
```python
from connection import subprotocol
```

Subprotocol negotiated during the opening handshake.

:obj:`None` if no subprotocol was negotiated.

---
## __iter__
```python
from connection import __iter__
```

Iterate on incoming messages.

The iterator calls :meth:`recv` and yields messages in an infinite loop.

It exits when the connection is closed normally. It raises a
:exc:`~websockets.exceptions.ConnectionClosedError` exception after a
protocol error or a network failure.

---
## recv_streaming
```python
from connection import recv_streaming
```

Receive the next message frame by frame.

If the message is fragmented, yield each fragment as it is received.
The iterator must be fully consumed, or else the connection will become
unusable.

:meth:`recv_streaming` raises the same exceptions as :meth:`recv`.

Returns:
    An iterator of strings (:class:`str`) for a Text_ frame or
    bytestrings (:class:`bytes`) for a Binary_ frame.

    .. _Text: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6
    .. _Binary: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.6

Raises:
    ConnectionClosed: When the connection is closed.
    RuntimeError: If two threads call :meth:`recv` or
        :meth:`recv_streaming` concurrently.

---
## ping
```python
from connection import ping
```

Send a Ping_.

.. _Ping: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.2

A ping may serve as a keepalive or as a check that the remote endpoint
received all messages up to this point

Args:
    data: Payload of the ping. A :class:`str` will be encoded to UTF-8.
        If ``data`` is :obj:`None`, the payload is four random bytes.

Returns:
    An event that will be set when the corresponding pong is received.
    You can ignore it if you don't intend to wait.

    ::

        pong_event = ws.ping()
        pong_event.wait()  # only if you want to wait for the pong

Raises:
    ConnectionClosed: When the connection is closed.
    RuntimeError: If another ping was sent with the same data and
        the corresponding pong wasn't received yet.

---
## pong
```python
from connection import pong
```

Send a Pong_.

.. _Pong: https://www.rfc-editor.org/rfc/rfc6455.html#section-5.5.3

An unsolicited pong may serve as a unidirectional heartbeat.

Args:
    data: Payload of the pong. A :class:`str` will be encoded to UTF-8.

Raises:
    ConnectionClosed: When the connection is closed.

---
## process_event
```python
from connection import process_event
```

Process one incoming event.

This method is overridden in subclasses to handle the handshake.

---
## acknowledge_pings
```python
from connection import acknowledge_pings
```

Acknowledge pings when receiving a pong.

---
## recv_events
```python
from connection import recv_events
```

Read incoming data from the socket and process events.

Run this method in a thread as long as the connection is alive.

``recv_events()`` exits immediately when the ``self.socket`` is closed.

---
## send_context
```python
from connection import send_context
```

Create a context for writing to the connection from user code.

On entry, :meth:`send_context` acquires the connection lock and checks
that the connection is open; on exit, it writes outgoing data to the
socket::

    with self.send_context():
        self.protocol.send_text(message.encode("utf-8"))

When the connection isn't open on entry, when the connection is expected
to close on exit, or when an unexpected error happens, terminating the
connection, :meth:`send_context` waits until the connection is closed
then raises :exc:`~websockets.exceptions.ConnectionClosed`.

---
## send_data
```python
from connection import send_data
```

Send outgoing data.

This method requires holding protocol_mutex.

Raises:
    OSError: When a socket operations fails.

---
## set_recv_events_exc
```python
from connection import set_recv_events_exc
```

Set recv_events_exc, if not set yet.

This method requires holding protocol_mutex.

---
## close_socket
```python
from connection import close_socket
```

Shutdown and close socket. Close message assembler.

Calling close_socket() guarantees that recv_events() terminates. Indeed,
recv_events() may block only on socket.recv() or on recv_messages.put().

---
## Deadline
```python
from utils import Deadline
```

Manage timeouts across multiple steps.

Args:
    timeout: Time available in seconds or :obj:`None` if there is no limit.

---
## timeout
```python
from utils import timeout
```

Calculate a timeout from a deadline.

Args:
    raise_if_elapsed (bool): Whether to raise :exc:`TimeoutError`
        if the deadline lapsed.

Raises:
    TimeoutError: If the deadline lapsed.

Returns:
    Time left in seconds or :obj:`None` if there is no limit.

---
## Assembler
```python
from messages import Assembler
```

Assemble messages from frames.

---
## get
```python
from messages import get
```

Read the next message.

:meth:`get` returns a single :class:`str` or :class:`bytes`.

If the message is fragmented, :meth:`get` waits until the last frame is
received, then it reassembles the message and returns it. To receive
messages frame by frame, use :meth:`get_iter` instead.

Args:
    timeout: If a timeout is provided and elapses before a complete
        message is received, :meth:`get` raises :exc:`TimeoutError`.

Raises:
    EOFError: If the stream of frames has ended.
    RuntimeError: If two threads run :meth:`get` or :meth:``get_iter`
        concurrently.

---
## get_iter
```python
from messages import get_iter
```

Stream the next message.

Iterating the return value of :meth:`get_iter` yields a :class:`str` or
:class:`bytes` for each frame in the message.

The iterator must be fully consumed before calling :meth:`get_iter` or
:meth:`get` again. Else, :exc:`RuntimeError` is raised.

This method only makes sense for fragmented messages. If messages aren't
fragmented, use :meth:`get` instead.

Raises:
    EOFError: If the stream of frames has ended.
    RuntimeError: If two threads run :meth:`get` or :meth:``get_iter`
        concurrently.

---
## put
```python
from messages import put
```

Add ``frame`` to the next message.

When ``frame`` is the final frame in a message, :meth:`put` waits until
the message is fetched, either by calling :meth:`get` or by fully
consuming the return value of :meth:`get_iter`.

:meth:`put` assumes that the stream of frames respects the protocol. If
it doesn't, the behavior is undefined.

Raises:
    EOFError: If the stream of frames has ended.
    RuntimeError: If two threads run :meth:`put` concurrently.

---
## close
```python
from messages import close
```

End the stream of frames.

Callling :meth:`close` concurrently with :meth:`get`, :meth:`get_iter`,
or :meth:`put` is safe. They will raise :exc:`EOFError`.

---
## __name__
```python
from inset_locator import __name__
```

A collection of functions and objects for creating or placing inset axes.

---
## InsetPosition
```python
from inset_locator import InsetPosition
```



---
## AnchoredLocatorBase
```python
from inset_locator import AnchoredLocatorBase
```



---
## AnchoredSizeLocator
```python
from inset_locator import AnchoredSizeLocator
```



---
## AnchoredZoomLocator
```python
from inset_locator import AnchoredZoomLocator
```



---
## BboxPatch
```python
from inset_locator import BboxPatch
```



---
## BboxConnector
```python
from inset_locator import BboxConnector
```



---
## BboxConnectorPatch
```python
from inset_locator import BboxConnectorPatch
```



---
## _add_inset_axes
```python
from inset_locator import _add_inset_axes
```

Helper function to add an inset axes and disable navigation in it.

---
## inset_axes
```python
from inset_locator import inset_axes
```

Create an inset axes with a given width and height.

Both sizes used can be specified either in inches or percentage.
For example,::

    inset_axes(parent_axes, width='40%%', height='30%%', loc='lower left')

creates in inset axes in the lower left corner of *parent_axes* which spans
over 30%% in height and 40%% in width of the *parent_axes*. Since the usage
of `.inset_axes` may become slightly tricky when exceeding such standard
cases, it is recommended to read :doc:`the examples
</gallery/axes_grid1/inset_locator_demo>`.

Notes
-----
The meaning of *bbox_to_anchor* and *bbox_to_transform* is interpreted
differently from that of legend. The value of bbox_to_anchor
(or the return value of its get_points method; the default is
*parent_axes.bbox*) is transformed by the bbox_transform (the default
is Identity transform) and then interpreted as points in the pixel
coordinate (which is dpi dependent).

Thus, following three calls are identical and creates an inset axes
with respect to the *parent_axes*::

   axins = inset_axes(parent_axes, "30%%", "40%%")
   axins = inset_axes(parent_axes, "30%%", "40%%",
                      bbox_to_anchor=parent_axes.bbox)
   axins = inset_axes(parent_axes, "30%%", "40%%",
                      bbox_to_anchor=(0, 0, 1, 1),
                      bbox_transform=parent_axes.transAxes)

Parameters
----------
parent_axes : `matplotlib.axes.Axes`
    Axes to place the inset axes.

width, height : float or str
    Size of the inset axes to create. If a float is provided, it is
    the size in inches, e.g. *width=1.3*. If a string is provided, it is
    the size in relative units, e.g. *width='40%%'*. By default, i.e. if
    neither *bbox_to_anchor* nor *bbox_transform* are specified, those
    are relative to the parent_axes. Otherwise, they are to be understood
    relative to the bounding box provided via *bbox_to_anchor*.

loc : str, default: 'upper right'
    Location to place the inset axes.  Valid locations are
    'upper left', 'upper center', 'upper right',
    'center left', 'center', 'center right',
    'lower left', 'lower center', 'lower right'.
    For backward compatibility, numeric values are accepted as well.
    See the parameter *loc* of `.Legend` for details.

bbox_to_anchor : tuple or `~matplotlib.transforms.BboxBase`, optional
    Bbox that the inset axes will be anchored to. If None,
    a tuple of (0, 0, 1, 1) is used if *bbox_transform* is set
    to *parent_axes.transAxes* or *parent_axes.figure.transFigure*.
    Otherwise, *parent_axes.bbox* is used. If a tuple, can be either
    [left, bottom, width, height], or [left, bottom].
    If the kwargs *width* and/or *height* are specified in relative units,
    the 2-tuple [left, bottom] cannot be used. Note that,
    unless *bbox_transform* is set, the units of the bounding box
    are interpreted in the pixel coordinate. When using *bbox_to_anchor*
    with tuple, it almost always makes sense to also specify
    a *bbox_transform*. This might often be the axes transform
    *parent_axes.transAxes*.

bbox_transform : `~matplotlib.transforms.Transform`, optional
    Transformation for the bbox that contains the inset axes.
    If None, a `.transforms.IdentityTransform` is used. The value
    of *bbox_to_anchor* (or the return value of its get_points method)
    is transformed by the *bbox_transform* and then interpreted
    as points in the pixel coordinate (which is dpi dependent).
    You may provide *bbox_to_anchor* in some normalized coordinate,
    and give an appropriate transform (e.g., *parent_axes.transAxes*).

axes_class : `~matplotlib.axes.Axes` type, default: `.HostAxes`
    The type of the newly created inset axes.

axes_kwargs : dict, optional
    Keyword arguments to pass to the constructor of the inset axes.
    Valid arguments include:

    %(Axes:kwdoc)s

borderpad : float, default: 0.5
    Padding between inset axes and the bbox_to_anchor.
    The units are axes font size, i.e. for a default font size of 10 points
    *borderpad = 0.5* is equivalent to a padding of 5 points.

Returns
-------
inset_axes : *axes_class*
    Inset axes object created.

---
## zoomed_inset_axes
```python
from inset_locator import zoomed_inset_axes
```

Create an anchored inset axes by scaling a parent axes. For usage, also see
:doc:`the examples </gallery/axes_grid1/inset_locator_demo2>`.

Parameters
----------
parent_axes : `~matplotlib.axes.Axes`
    Axes to place the inset axes.

zoom : float
    Scaling factor of the data axes. *zoom* > 1 will enlarge the
    coordinates (i.e., "zoomed in"), while *zoom* < 1 will shrink the
    coordinates (i.e., "zoomed out").

loc : str, default: 'upper right'
    Location to place the inset axes.  Valid locations are
    'upper left', 'upper center', 'upper right',
    'center left', 'center', 'center right',
    'lower left', 'lower center', 'lower right'.
    For backward compatibility, numeric values are accepted as well.
    See the parameter *loc* of `.Legend` for details.

bbox_to_anchor : tuple or `~matplotlib.transforms.BboxBase`, optional
    Bbox that the inset axes will be anchored to. If None,
    *parent_axes.bbox* is used. If a tuple, can be either
    [left, bottom, width, height], or [left, bottom].
    If the kwargs *width* and/or *height* are specified in relative units,
    the 2-tuple [left, bottom] cannot be used. Note that
    the units of the bounding box are determined through the transform
    in use. When using *bbox_to_anchor* it almost always makes sense to
    also specify a *bbox_transform*. This might often be the axes transform
    *parent_axes.transAxes*.

bbox_transform : `~matplotlib.transforms.Transform`, optional
    Transformation for the bbox that contains the inset axes.
    If None, a `.transforms.IdentityTransform` is used (i.e. pixel
    coordinates). This is useful when not providing any argument to
    *bbox_to_anchor*. When using *bbox_to_anchor* it almost always makes
    sense to also specify a *bbox_transform*. This might often be the
    axes transform *parent_axes.transAxes*. Inversely, when specifying
    the axes- or figure-transform here, be aware that not specifying
    *bbox_to_anchor* will use *parent_axes.bbox*, the units of which are
    in display (pixel) coordinates.

axes_class : `~matplotlib.axes.Axes` type, default: `.HostAxes`
    The type of the newly created inset axes.

axes_kwargs : dict, optional
    Keyword arguments to pass to the constructor of the inset axes.
    Valid arguments include:

    %(Axes:kwdoc)s

borderpad : float, default: 0.5
    Padding between inset axes and the bbox_to_anchor.
    The units are axes font size, i.e. for a default font size of 10 points
    *borderpad = 0.5* is equivalent to a padding of 5 points.

Returns
-------
inset_axes : *axes_class*
    Inset axes object created.

---
## _TransformedBboxWithCallback
```python
from inset_locator import _TransformedBboxWithCallback
```

Variant of `.TransformBbox` which calls *callback* before returning points.

Used by `.mark_inset` to unstale the parent axes' viewlim as needed.

---
## mark_inset
```python
from inset_locator import mark_inset
```

Draw a box to mark the location of an area represented by an inset axes.

This function draws a box in *parent_axes* at the bounding box of
*inset_axes*, and shows a connection with the inset axes by drawing lines
at the corners, giving a "zoomed in" effect.

Parameters
----------
parent_axes : `~matplotlib.axes.Axes`
    Axes which contains the area of the inset axes.

inset_axes : `~matplotlib.axes.Axes`
    The inset axes.

loc1, loc2 : {1, 2, 3, 4}
    Corners to use for connecting the inset axes and the area in the
    parent axes.

**kwargs
    Patch properties for the lines and box drawn:

    %(Patch:kwdoc)s

Returns
-------
pp : `~matplotlib.patches.Patch`
    The patch drawn to represent the area of the inset axes.

p1, p2 : `~matplotlib.patches.Patch`
    The patches connecting two corners of the inset axes and its area.

---
## __init__
```python
from inset_locator import __init__
```



---
## __call__
```python
from inset_locator import __call__
```



---
## draw
```python
from inset_locator import draw
```



---
## get_bbox
```python
from inset_locator import get_bbox
```



---
## get_path
```python
from inset_locator import get_path
```



---
## get_bbox_edge_pos
```python
from inset_locator import get_bbox_edge_pos
```

Return the ``(x, y)`` coordinates of corner *loc* of *bbox*; parameters
behave as documented for the `.BboxConnector` constructor.

---
## connect_bbox
```python
from inset_locator import connect_bbox
```

Construct a `.Path` connecting corner *loc1* of *bbox1* to corner
*loc2* of *bbox2*, where parameters behave as documented as for the
`.BboxConnector` constructor.

---
## get_points
```python
from inset_locator import get_points
```



---
## __name__
```python
from axes_grid import __name__
```



---
## CbarAxesBase
```python
from axes_grid import CbarAxesBase
```



---
## Grid
```python
from axes_grid import Grid
```



---
## ImageGrid
```python
from axes_grid import ImageGrid
```



---
## __init__
```python
from axes_grid import __init__
```

Parameters
----------
fig : `.Figure`
    The parent figure.
rect : (float, float, float, float) or int
    The axes position, as a ``(left, bottom, width, height)`` tuple or
    as a three-digit subplot position code (e.g., "121").
nrows_ncols : (int, int)
    Number of rows and columns in the grid.
ngrids : int or None, default: None
    If not None, only the first *ngrids* axes in the grid are created.
direction : {"row", "column"}, default: "row"
    Whether axes are created in row-major ("row by row") or
    column-major order ("column by column").  This also affects the
    order in which axes are accessed using indexing (``grid[index]``).
axes_pad : float or (float, float), default: 0.02in
    Padding or (horizontal padding, vertical padding) between axes, in
    inches.
share_all : bool, default: False
    Whether all axes share their x- and y-axis.  Note that in any case,
    all axes in a column share their x-axis and all axes in a row share
    their y-axis.
aspect : bool, default: True
    Whether the axes aspect ratio follows the aspect ratio of the data
    limits.
label_mode : {"L", "1", "all"}, default: "L"
    Determines which axes will get tick labels:

    - "L": All axes on the left column get vertical tick labels;
      all axes on the bottom row get horizontal tick labels.
    - "1": Only the bottom left axes is labelled.
    - "all": all axes are labelled.

cbar_mode : {"each", "single", "edge", None}, default: None
    Whether to create a colorbar for "each" axes, a "single" colorbar
    for the entire grid, colorbars only for axes on the "edge"
    determined by *cbar_location*, or no colorbars.  The colorbars are
    stored in the :attr:`cbar_axes` attribute.
cbar_location : {"left", "right", "bottom", "top"}, default: "right"
cbar_pad : float, default: None
    Padding between the image axes and the colorbar axes.
cbar_size : size specification (see `.Size.from_any`), default: "5%"
    Colorbar size.
cbar_set_cax : bool, default: True
    If True, each axes in the grid has a *cax* attribute that is bound
    to associated *cbar_axes*.
axes_class : subclass of `matplotlib.axes.Axes`, default: None

---
## colorbar
```python
from axes_grid import colorbar
```



---
## toggle_label
```python
from axes_grid import toggle_label
```



---
## _init_locators
```python
from axes_grid import _init_locators
```



---
## _get_col_row
```python
from axes_grid import _get_col_row
```



---
## __len__
```python
from axes_grid import __len__
```



---
## __getitem__
```python
from axes_grid import __getitem__
```



---
## get_geometry
```python
from axes_grid import get_geometry
```

Return the number of rows and columns of the grid as (nrows, ncols).

---
## set_axes_pad
```python
from axes_grid import set_axes_pad
```

Set the padding between the axes.

Parameters
----------
axes_pad : (float, float)
    The padding (horizontal pad, vertical pad) in inches.

---
## get_axes_pad
```python
from axes_grid import get_axes_pad
```

Return the axes padding.

Returns
-------
hpad, vpad
    Padding (horizontal pad, vertical pad) in inches.

---
## set_aspect
```python
from axes_grid import set_aspect
```

Set the aspect of the SubplotDivider.

---
## get_aspect
```python
from axes_grid import get_aspect
```

Return the aspect of the SubplotDivider.

---
## set_label_mode
```python
from axes_grid import set_label_mode
```

Define which axes have tick labels.

Parameters
----------
mode : {"L", "1", "all", "keep"}
    The label mode:

    - "L": All axes on the left column get vertical tick labels;
      all axes on the bottom row get horizontal tick labels.
    - "1": Only the bottom left axes is labelled.
    - "all": All axes are labelled.
    - "keep": Do not do anything.

---
## get_divider
```python
from axes_grid import get_divider
```



---
## set_axes_locator
```python
from axes_grid import set_axes_locator
```



---
## get_axes_locator
```python
from axes_grid import get_axes_locator
```



---
## __name__
```python
from parasite_axes import __name__
```



---
## ParasiteAxesBase
```python
from parasite_axes import ParasiteAxesBase
```



---
## HostAxesBase
```python
from parasite_axes import HostAxesBase
```



---
## host_axes
```python
from parasite_axes import host_axes
```

Create axes that can act as a hosts to parasitic axes.

Parameters
----------
figure : `~matplotlib.figure.Figure`
    Figure to which the axes will be added. Defaults to the current figure
    `.pyplot.gcf()`.

*args, **kwargs
    Will be passed on to the underlying `~.axes.Axes` object creation.

---
## __init__
```python
from parasite_axes import __init__
```



---
## clear
```python
from parasite_axes import clear
```



---
## pick
```python
from parasite_axes import pick
```



---
## _set_lim_and_transforms
```python
from parasite_axes import _set_lim_and_transforms
```



---
## set_viewlim_mode
```python
from parasite_axes import set_viewlim_mode
```



---
## get_viewlim_mode
```python
from parasite_axes import get_viewlim_mode
```



---
## _sync_lims
```python
from parasite_axes import _sync_lims
```



---
## get_aux_axes
```python
from parasite_axes import get_aux_axes
```

Add a parasite axes to this host.

Despite this method's name, this should actually be thought of as an
``add_parasite_axes`` method.

.. versionchanged:: 3.7
   Defaults to same base axes class as host axes.

Parameters
----------
tr : `~matplotlib.transforms.Transform` or None, default: None
    If a `.Transform`, the following relation will hold:
    ``parasite.transData = tr + host.transData``.
    If None, the parasite's and the host's ``transData`` are unrelated.
viewlim_mode : {"equal", "transform", None}, default: "equal"
    How the parasite's view limits are set: directly equal to the
    parent axes ("equal"), equal after application of *tr*
    ("transform"), or independently (None).
axes_class : subclass type of `~matplotlib.axes.Axes`, optional
    The `~.axes.Axes` subclass that is instantiated.  If None, the base
    class of the host axes is used.
**kwargs
    Other parameters are forwarded to the parasite axes constructor.

---
## draw
```python
from parasite_axes import draw
```



---
## twinx
```python
from parasite_axes import twinx
```

Create a twin of Axes with a shared x-axis but independent y-axis.

The y-axis of self will have ticks on the left and the returned axes
will have ticks on the right.

---
## twiny
```python
from parasite_axes import twiny
```

Create a twin of Axes with a shared y-axis but independent x-axis.

The x-axis of self will have ticks on the bottom and the returned axes
will have ticks on the top.

---
## twin
```python
from parasite_axes import twin
```

Create a twin of Axes with no shared axis.

While self will have ticks on the left and bottom axis, the returned
axes will have ticks on the top and right axis.

---
## _add_twin_axes
```python
from parasite_axes import _add_twin_axes
```

Helper for `.twinx`/`.twiny`/`.twin`.

*kwargs* are forwarded to the parasite axes constructor.

---
## _remove_any_twin
```python
from parasite_axes import _remove_any_twin
```



---
## get_tightbbox
```python
from parasite_axes import get_tightbbox
```



---
## __name__
```python
from anchored_artists import __name__
```



---
## AnchoredDrawingArea
```python
from anchored_artists import AnchoredDrawingArea
```



---
## AnchoredAuxTransformBox
```python
from anchored_artists import AnchoredAuxTransformBox
```



---
## AnchoredEllipse
```python
from anchored_artists import AnchoredEllipse
```



---
## AnchoredSizeBar
```python
from anchored_artists import AnchoredSizeBar
```



---
## AnchoredDirectionArrows
```python
from anchored_artists import AnchoredDirectionArrows
```



---
## __init__
```python
from anchored_artists import __init__
```

Draw two perpendicular arrows to indicate directions.

Parameters
----------
transform : `~matplotlib.transforms.Transform`
    The transformation object for the coordinate system in use, i.e.,
    :attr:`matplotlib.axes.Axes.transAxes`.
label_x, label_y : str
    Label text for the x and y arrows
length : float, default: 0.15
    Length of the arrow, given in coordinates of *transform*.
fontsize : float, default: 0.08
    Size of label strings, given in coordinates of *transform*.
loc : str, default: 'upper left'
    Location of the arrow.  Valid locations are
    'upper left', 'upper center', 'upper right',
    'center left', 'center', 'center right',
    'lower left', 'lower center', 'lower right'.
    For backward compatibility, numeric values are accepted as well.
    See the parameter *loc* of `.Legend` for details.
angle : float, default: 0
    The angle of the arrows in degrees.
aspect_ratio : float, default: 1
    The ratio of the length of arrow_x and arrow_y.
    Negative numbers can be used to change the direction.
pad : float, default: 0.4
    Padding around the labels and arrows, in fraction of the font size.
borderpad : float, default: 0.4
    Border padding, in fraction of the font size.
frameon : bool, default: False
    If True, draw a box around the arrows and labels.
color : str, default: 'white'
    Color for the arrows and labels.
alpha : float, default: 1
    Alpha values of the arrows and labels
sep_x, sep_y : float, default: 0.01 and 0 respectively
    Separation between the arrows and labels in coordinates of
    *transform*.
fontproperties : `~matplotlib.font_manager.FontProperties`, optional
    Font properties for the label text.
back_length : float, default: 0.15
    Fraction of the arrow behind the arrow crossing.
head_width : float, default: 10
    Width of arrow head, sent to `.ArrowStyle`.
head_length : float, default: 15
    Length of arrow head, sent to `.ArrowStyle`.
tail_width : float, default: 2
    Width of arrow tail, sent to `.ArrowStyle`.
text_props, arrow_props : dict
    Properties of the text and arrows, passed to `.TextPath` and
    `.FancyArrowPatch`.
**kwargs
    Keyword arguments forwarded to `.AnchoredOffsetbox`.

Attributes
----------
arrow_x, arrow_y : `~matplotlib.patches.FancyArrowPatch`
    Arrow x and y
text_path_x, text_path_y : `~matplotlib.text.TextPath`
    Path for arrow labels
p_x, p_y : `~matplotlib.patches.PathPatch`
    Patch for arrow labels
box : `~matplotlib.offsetbox.AuxTransformBox`
    Container for the arrows and labels.

Notes
-----
If *prop* is passed as a keyword argument, but *fontproperties* is
not, then *prop* is assumed to be the intended *fontproperties*.
Using both *prop* and *fontproperties* is not supported.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> from mpl_toolkits.axes_grid1.anchored_artists import (
...     AnchoredDirectionArrows)
>>> fig, ax = plt.subplots()
>>> ax.imshow(np.random.random((10, 10)))
>>> arrows = AnchoredDirectionArrows(ax.transAxes, '111', '110')
>>> ax.add_artist(arrows)
>>> fig.show()

Using several of the optional parameters, creating downward pointing
arrow and high contrast text labels.

>>> import matplotlib.font_manager as fm
>>> fontprops = fm.FontProperties(family='monospace')
>>> arrows = AnchoredDirectionArrows(ax.transAxes, 'East', 'South',
...                                  loc='lower left', color='k',
...                                  aspect_ratio=-1, sep_x=0.02,
...                                  sep_y=-0.01,
...                                  text_props={'ec':'w', 'fc':'k'},
...                                  fontproperties=fontprops)

---
## __name__
```python
from axes_size import __name__
```

Provides classes of simple units that will be used with `.AxesDivider`
class (or others) to determine the size of each Axes. The unit
classes define `get_size` method that returns a tuple of two floats,
meaning relative and absolute sizes, respectively.

Note that this class is nothing more than a simple tuple of two
floats. Take a look at the Divider class to see how these two
values are used.

---
## _Base
```python
from axes_size import _Base
```



---
## Add
```python
from axes_size import Add
```

Sum of two sizes.

---
## Fixed
```python
from axes_size import Fixed
```

Simple fixed size with absolute part = *fixed_size* and relative part = 0.

---
## Scaled
```python
from axes_size import Scaled
```

Simple scaled(?) size with absolute part = 0 and
relative part = *scalable_size*.

---
## _get_axes_aspect
```python
from axes_size import _get_axes_aspect
```



---
## AxesX
```python
from axes_size import AxesX
```

Scaled size whose relative part corresponds to the data width
of the *axes* multiplied by the *aspect*.

---
## AxesY
```python
from axes_size import AxesY
```

Scaled size whose relative part corresponds to the data height
of the *axes* multiplied by the *aspect*.

---
## MaxExtent
```python
from axes_size import MaxExtent
```

Size whose absolute part is either the largest width or the largest height
of the given *artist_list*.

---
## MaxWidth
```python
from axes_size import MaxWidth
```

Size whose absolute part is the largest width of the given *artist_list*.

---
## MaxHeight
```python
from axes_size import MaxHeight
```

Size whose absolute part is the largest height of the given *artist_list*.

---
## Fraction
```python
from axes_size import Fraction
```

An instance whose size is a *fraction* of the *ref_size*.

>>> s = Fraction(0.3, AxesX(ax))

---
## from_any
```python
from axes_size import from_any
```

Create a Fixed unit when the first argument is a float, or a
Fraction unit if that is a string that ends with %. The second
argument is only meaningful when Fraction unit is created.

>>> from mpl_toolkits.axes_grid1.axes_size import from_any
>>> a = from_any(1.2) # => Fixed(1.2)
>>> from_any("50%", a) # => Fraction(0.5, a)

---
## _AxesDecorationsSize
```python
from axes_size import _AxesDecorationsSize
```

Fixed size, corresponding to the size of decorations on a given Axes side.

---
## __rmul__
```python
from axes_size import __rmul__
```



---
## __add__
```python
from axes_size import __add__
```



---
## get_size
```python
from axes_size import get_size
```



---
## __init__
```python
from axes_size import __init__
```



---
## add_artist
```python
from axes_size import add_artist
```



---
## __name__
```python
from mpl_axes import __name__
```



---
## SimpleChainedObjects
```python
from mpl_axes import SimpleChainedObjects
```



---
## Axes
```python
from mpl_axes import Axes
```



---
## SimpleAxisArtist
```python
from mpl_axes import SimpleAxisArtist
```



---
## __init__
```python
from mpl_axes import __init__
```



---
## __getattr__
```python
from mpl_axes import __getattr__
```



---
## __call__
```python
from mpl_axes import __call__
```



---
## AxisDict
```python
from mpl_axes import AxisDict
```



---
## axis
```python
from mpl_axes import axis
```



---
## clear
```python
from mpl_axes import clear
```



---
## major_ticks
```python
from mpl_axes import major_ticks
```



---
## major_ticklabels
```python
from mpl_axes import major_ticklabels
```



---
## label
```python
from mpl_axes import label
```



---
## set_visible
```python
from mpl_axes import set_visible
```



---
## set_label
```python
from mpl_axes import set_label
```



---
## toggle
```python
from mpl_axes import toggle
```



---
## __getitem__
```python
from mpl_axes import __getitem__
```



---
## __name__
```python
from axes_rgb import __name__
```



---
## make_rgb_axes
```python
from axes_rgb import make_rgb_axes
```

Parameters
----------
ax : `~matplotlib.axes.Axes`
    Axes instance to create the RGB Axes in.
pad : float, optional
    Fraction of the Axes height to pad.
axes_class : `matplotlib.axes.Axes` or None, optional
    Axes class to use for the R, G, and B Axes. If None, use
    the same class as *ax*.
**kwargs
    Forwarded to *axes_class* init for the R, G, and B Axes.

---
## RGBAxes
```python
from axes_rgb import RGBAxes
```

Subclass of `~.axes_grid1.axes_rgb.RGBAxes` with
``_defaultAxesClass`` = `.axislines.Axes`.

---
## __init__
```python
from axes_rgb import __init__
```

Parameters
----------
pad : float, default: 0
    Fraction of the Axes height to put as padding.
axes_class : `~matplotlib.axes.Axes`
    Axes class to use. If not provided, ``_defaultAxesClass`` is used.
*args
    Forwarded to *axes_class* init for the RGB Axes
**kwargs
    Forwarded to *axes_class* init for the RGB, R, G, and B Axes

---
## imshow_rgb
```python
from axes_rgb import imshow_rgb
```

Create the four images {rgb, r, g, b}.

Parameters
----------
r, g, b : array-like
    The red, green, and blue arrays.
**kwargs
    Forwarded to `~.Axes.imshow` calls for the four images.

Returns
-------
rgb : `~matplotlib.image.AxesImage`
r : `~matplotlib.image.AxesImage`
g : `~matplotlib.image.AxesImage`
b : `~matplotlib.image.AxesImage`

---
## __name__
```python
from axes_divider import __name__
```



---
## Divider
```python
from axes_divider import Divider
```

An Axes positioning class.

The divider is initialized with lists of horizontal and vertical sizes
(:mod:`mpl_toolkits.axes_grid1.axes_size`) based on which a given
rectangular area will be divided.

The `new_locator` method then creates a callable object
that can be used as the *axes_locator* of the axes.

---
## AxesLocator
```python
from axes_divider import AxesLocator
```

A callable object which returns the position and size of a given
`.AxesDivider` cell.

---
## SubplotDivider
```python
from axes_divider import SubplotDivider
```

The Divider class whose rectangle area is specified as a subplot geometry.

---
## AxesDivider
```python
from axes_divider import AxesDivider
```

Divider based on the preexisting axes.

---
## _locate
```python
from axes_divider import _locate
```



---
## HBoxDivider
```python
from axes_divider import HBoxDivider
```

A `.SubplotDivider` for laying out axes horizontally, while ensuring that
they have equal heights.

Examples
--------
.. plot:: gallery/axes_grid1/demo_axes_hbox_divider.py

---
## VBoxDivider
```python
from axes_divider import VBoxDivider
```

A `.SubplotDivider` for laying out axes vertically, while ensuring that
they have equal widths.

---
## make_axes_locatable
```python
from axes_divider import make_axes_locatable
```



---
## make_axes_area_auto_adjustable
```python
from axes_divider import make_axes_area_auto_adjustable
```

Add auto-adjustable padding around *ax* to take its decorations (title,
labels, ticks, ticklabels) into account during layout, using
`.Divider.add_auto_adjustable_area`.

By default, padding is determined from the decorations of *ax*.
Pass *use_axes* to consider the decorations of other Axes instead.

---
## __init__
```python
from axes_divider import __init__
```

Parameters
----------
axes : :class:`~matplotlib.axes.Axes`
xref
yref

---
## get_horizontal_sizes
```python
from axes_divider import get_horizontal_sizes
```



---
## get_vertical_sizes
```python
from axes_divider import get_vertical_sizes
```



---
## set_position
```python
from axes_divider import set_position
```

Set the position of the rectangle.

Parameters
----------
pos : tuple of 4 floats
    position of the rectangle that will be divided

---
## get_position
```python
from axes_divider import get_position
```



---
## set_anchor
```python
from axes_divider import set_anchor
```

Parameters
----------
anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}
    Either an (*x*, *y*) pair of relative coordinates (0 is left or
    bottom, 1 is right or top), 'C' (center), or a cardinal direction
    ('SW', southwest, is bottom left, etc.).

See Also
--------
.Axes.set_anchor

---
## get_anchor
```python
from axes_divider import get_anchor
```



---
## get_subplotspec
```python
from axes_divider import get_subplotspec
```



---
## set_horizontal
```python
from axes_divider import set_horizontal
```

Parameters
----------
h : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
    sizes for horizontal division

---
## get_horizontal
```python
from axes_divider import get_horizontal
```

Return horizontal sizes.

---
## set_vertical
```python
from axes_divider import set_vertical
```

Parameters
----------
v : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
    sizes for vertical division

---
## get_vertical
```python
from axes_divider import get_vertical
```

Return vertical sizes.

---
## set_aspect
```python
from axes_divider import set_aspect
```

Parameters
----------
aspect : bool

---
## get_aspect
```python
from axes_divider import get_aspect
```



---
## set_locator
```python
from axes_divider import set_locator
```



---
## get_locator
```python
from axes_divider import get_locator
```



---
## get_position_runtime
```python
from axes_divider import get_position_runtime
```



---
## _calc_k
```python
from axes_divider import _calc_k
```



---
## _calc_offsets
```python
from axes_divider import _calc_offsets
```



---
## new_locator
```python
from axes_divider import new_locator
```

Create an axes locator callable for the specified cell.

Parameters
----------
ny, ny1 : int
    Integers specifying the row-position of the
    cell. When *ny1* is None, a single *ny*-th row is
    specified. Otherwise, location of rows spanning between *ny*
    to *ny1* (but excluding *ny1*-th row) is specified.

---
## locate
```python
from axes_divider import locate
```

Implementation of ``divider.new_locator().__call__``.

Parameters
----------
nx, nx1 : int
    Integers specifying the column-position of the cell. When *nx1* is
    None, a single *nx*-th column is specified. Otherwise, the
    location of columns spanning between *nx* to *nx1* (but excluding
    *nx1*-th column) is specified.
ny, ny1 : int
    Same as *nx* and *nx1*, but for row positions.
axes
renderer

---
## append_size
```python
from axes_divider import append_size
```



---
## add_auto_adjustable_area
```python
from axes_divider import add_auto_adjustable_area
```

Add auto-adjustable padding around *use_axes* to take their decorations
(title, labels, ticks, ticklabels) into account during layout.

Parameters
----------
use_axes : `~matplotlib.axes.Axes` or list of `~matplotlib.axes.Axes`
    The Axes whose decorations are taken into account.
pad : float, default: 0.1
    Additional padding in inches.
adjust_dirs : list of {"left", "right", "bottom", "top"}, optional
    The sides where padding is added; defaults to all four sides.

---
## __call__
```python
from axes_divider import __call__
```



---
## set_subplotspec
```python
from axes_divider import set_subplotspec
```

Set the SubplotSpec instance.

---
## _get_new_axes
```python
from axes_divider import _get_new_axes
```



---
## new_horizontal
```python
from axes_divider import new_horizontal
```

Helper method for ``append_axes("left")`` and ``append_axes("right")``.

See the documentation of `append_axes` for more details.

:meta private:

---
## new_vertical
```python
from axes_divider import new_vertical
```

Helper method for ``append_axes("top")`` and ``append_axes("bottom")``.

See the documentation of `append_axes` for more details.

:meta private:

---
## append_axes
```python
from axes_divider import append_axes
```

Add a new axes on a given side of the main axes.

Parameters
----------
position : {"left", "right", "bottom", "top"}
    Where the new axes is positioned relative to the main axes.
size : :mod:`~mpl_toolkits.axes_grid1.axes_size` or float or str
    The axes width or height.  float or str arguments are interpreted
    as ``axes_size.from_any(size, AxesX(<main_axes>))`` for left or
    right axes, and likewise with ``AxesY`` for bottom or top axes.
pad : :mod:`~mpl_toolkits.axes_grid1.axes_size` or float or str
    Padding between the axes.  float or str arguments are interpreted
    as for *size*.  Defaults to :rc:`figure.subplot.wspace` times the
    main Axes width (left or right axes) or :rc:`figure.subplot.hspace`
    times the main Axes height (bottom or top axes).
axes_class : subclass type of `~.axes.Axes`, optional
    The type of the new axes.  Defaults to the type of the main axes.
**kwargs
    All extra keywords arguments are passed to the created axes.

---
## __name__
```python
from proj3d import __name__
```

Various transforms used for by the 3D code

---
## world_transformation
```python
from proj3d import world_transformation
```

Produce a matrix that scales homogeneous coords in the specified ranges
to [0, 1], or [0, pb_aspect[i]] if the plotbox aspect ratio is specified.

---
## rotation_about_vector
```python
from proj3d import rotation_about_vector
```

Produce a rotation matrix for an angle in radians about a vector.

---
## _rotation_about_vector
```python
from proj3d import _rotation_about_vector
```

Produce a rotation matrix for an angle in radians about a vector.

---
## _view_axes
```python
from proj3d import _view_axes
```

Get the unit viewing axes in data coordinates.

Parameters
----------
E : 3-element numpy array
    The coordinates of the eye/camera.
R : 3-element numpy array
    The coordinates of the center of the view box.
V : 3-element numpy array
    Unit vector in the direction of the vertical axis.
roll : float
    The roll angle in radians.

Returns
-------
u : 3-element numpy array
    Unit vector pointing towards the right of the screen.
v : 3-element numpy array
    Unit vector pointing towards the top of the screen.
w : 3-element numpy array
    Unit vector pointing out of the screen.

---
## _view_transformation_uvw
```python
from proj3d import _view_transformation_uvw
```

Return the view transformation matrix.

Parameters
----------
u : 3-element numpy array
    Unit vector pointing towards the right of the screen.
v : 3-element numpy array
    Unit vector pointing towards the top of the screen.
w : 3-element numpy array
    Unit vector pointing out of the screen.
E : 3-element numpy array
    The coordinates of the eye/camera.

---
## view_transformation
```python
from proj3d import view_transformation
```

Return the view transformation matrix.

Parameters
----------
E : 3-element numpy array
    The coordinates of the eye/camera.
R : 3-element numpy array
    The coordinates of the center of the view box.
V : 3-element numpy array
    Unit vector in the direction of the vertical axis.
roll : float
    The roll angle in radians.

---
## persp_transformation
```python
from proj3d import persp_transformation
```



---
## _persp_transformation
```python
from proj3d import _persp_transformation
```



---
## ortho_transformation
```python
from proj3d import ortho_transformation
```



---
## _ortho_transformation
```python
from proj3d import _ortho_transformation
```



---
## _proj_transform_vec
```python
from proj3d import _proj_transform_vec
```



---
## _proj_transform_vec_clip
```python
from proj3d import _proj_transform_vec_clip
```



---
## inv_transform
```python
from proj3d import inv_transform
```

Transform the points by the inverse of the projection matrix, *invM*.

---
## _vec_pad_ones
```python
from proj3d import _vec_pad_ones
```



---
## proj_transform
```python
from proj3d import proj_transform
```

Transform the points by the projection matrix *M*.

---
## proj_transform_clip
```python
from proj3d import proj_transform_clip
```

Transform the points by the projection matrix
and return the clipping result
returns txs, tys, tzs, tis

---
## proj_points
```python
from proj3d import proj_points
```



---
## _proj_points
```python
from proj3d import _proj_points
```



---
## proj_trans_points
```python
from proj3d import proj_trans_points
```



---
## _proj_trans_points
```python
from proj3d import _proj_trans_points
```



---
## rot_x
```python
from proj3d import rot_x
```



---
## __name__
```python
from axes3d import __name__
```

axes3d.py, original mplot3d version by John Porter
Created: 23 Sep 2005

Parts fixed by Reinier Heeres <reinier@heeres.eu>
Minor additions by Ben Axelrod <baxelrod@coroware.com>
Significant updates and revisions by Ben Root <ben.v.root@gmail.com>

Module containing Axes3D, an object which can plot 3D objects on a
2D matplotlib figure.

---
## Axes3D
```python
from axes3d import Axes3D
```

3D Axes object.

.. note::

    As a user, you do not instantiate Axes directly, but use Axes creation
    methods instead; e.g. from `.pyplot` or `.Figure`:
    `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` or `.Figure.add_axes`.

---
## get_test_data
```python
from axes3d import get_test_data
```

Return a tuple X, Y, Z with a test data set.

---
## __init__
```python
from axes3d import __init__
```

Parameters
----------
fig : Figure
    The parent figure.
rect : tuple (left, bottom, width, height), default: None.
    The ``(left, bottom, width, height)`` Axes position.
elev : float, default: 30
    The elevation angle in degrees rotates the camera above and below
    the x-y plane, with a positive angle corresponding to a location
    above the plane.
azim : float, default: -60
    The azimuthal angle in degrees rotates the camera about the z axis,
    with a positive angle corresponding to a right-handed rotation. In
    other words, a positive azimuth rotates the camera about the origin
    from its location along the +x axis towards the +y axis.
roll : float, default: 0
    The roll angle in degrees rotates the camera about the viewing
    axis. A positive angle spins the camera clockwise, causing the
    scene to rotate counter-clockwise.
sharez : Axes3D, optional
    Other Axes to share z-limits with.  Note that it is not possible to
    unshare axes.
proj_type : {'persp', 'ortho'}
    The projection type, default 'persp'.
box_aspect : 3-tuple of floats, default: None
    Changes the physical dimensions of the Axes3D, such that the ratio
    of the axis lengths in display units is x:y:z.
    If None, defaults to 4:4:3
computed_zorder : bool, default: True
    If True, the draw order is computed based on the average position
    of the `.Artist`\s along the view direction.
    Set to False if you want to manually control the order in which
    Artists are drawn on top of each other using their *zorder*
    attribute. This can be used for fine-tuning if the automatic order
    does not produce the desired result. Note however, that a manual
    zorder will only be correct for a limited view angle. If the figure
    is rotated by the user, it will look wrong from certain angles.
focal_length : float, default: None
    For a projection type of 'persp', the focal length of the virtual
    camera. Must be > 0. If None, defaults to 1.
    For a projection type of 'ortho', must be set to either None
    or infinity (numpy.inf). If None, defaults to infinity.
    The focal length can be computed from a desired Field Of View via
    the equation: focal_length = 1/tan(FOV/2)
shareview : Axes3D, optional
    Other Axes to share view angles with.  Note that it is not possible
    to unshare axes.

**kwargs
    Other optional keyword arguments:

    %(Axes3D:kwdoc)s

---
## set_axis_off
```python
from axes3d import set_axis_off
```



---
## set_axis_on
```python
from axes3d import set_axis_on
```



---
## convert_zunits
```python
from axes3d import convert_zunits
```

For artists in an Axes, if the zaxis has units support,
convert *z* using zaxis unit type

---
## set_top_view
```python
from axes3d import set_top_view
```



---
## _init_axis
```python
from axes3d import _init_axis
```

Init 3D Axes; overrides creation of regular X/Y Axes.

---
## get_zaxis
```python
from axes3d import get_zaxis
```

Return the ``ZAxis`` (`~.axis3d.Axis`) instance.

---
## _transformed_cube
```python
from axes3d import _transformed_cube
```

Return cube with limits from *vals* transformed by self.M.

---
## set_aspect
```python
from axes3d import set_aspect
```

Set the aspect ratios.

Parameters
----------
aspect : {'auto', 'equal', 'equalxy', 'equalxz', 'equalyz'}
    Possible values:

    =========   ==================================================
    value       description
    =========   ==================================================
    'auto'      automatic; fill the position rectangle with data.
    'equal'     adapt all the axes to have equal aspect ratios.
    'equalxy'   adapt the x and y axes to have equal aspect ratios.
    'equalxz'   adapt the x and z axes to have equal aspect ratios.
    'equalyz'   adapt the y and z axes to have equal aspect ratios.
    =========   ==================================================

adjustable : None or {'box', 'datalim'}, optional
    If not *None*, this defines which parameter will be adjusted to
    meet the required aspect. See `.set_adjustable` for further
    details.

anchor : None or str or 2-tuple of float, optional
    If not *None*, this defines where the Axes will be drawn if there
    is extra space due to aspect constraints. The most common way to
    specify the anchor are abbreviations of cardinal directions:

    =====   =====================
    value   description
    =====   =====================
    'C'     centered
    'SW'    lower left corner
    'S'     middle of bottom edge
    'SE'    lower right corner
    etc.
    =====   =====================

    See `~.Axes.set_anchor` for further details.

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
mpl_toolkits.mplot3d.axes3d.Axes3D.set_box_aspect

---
## _equal_aspect_axis_indices
```python
from axes3d import _equal_aspect_axis_indices
```

Get the indices for which of the x, y, z axes are constrained to have
equal aspect ratios.

Parameters
----------
aspect : {'auto', 'equal', 'equalxy', 'equalxz', 'equalyz'}
    See descriptions in docstring for `.set_aspect()`.

---
## set_box_aspect
```python
from axes3d import set_box_aspect
```

Set the Axes box aspect.

The box aspect is the ratio of height to width in display
units for each face of the box when viewed perpendicular to
that face.  This is not to be confused with the data aspect (see
`~.Axes3D.set_aspect`). The default ratios are 4:4:3 (x:y:z).

To simulate having equal aspect in data space, set the box
aspect to match your data range in each dimension.

*zoom* controls the overall size of the Axes3D in the figure.

Parameters
----------
aspect : 3-tuple of floats or None
    Changes the physical dimensions of the Axes3D, such that the ratio
    of the axis lengths in display units is x:y:z.
    If None, defaults to (4, 4, 3).

zoom : float, default: 1
    Control overall size of the Axes3D in the figure. Must be > 0.

---
## apply_aspect
```python
from axes3d import apply_aspect
```



---
## draw
```python
from axes3d import draw
```



---
## get_axis_position
```python
from axes3d import get_axis_position
```



---
## update_datalim
```python
from axes3d import update_datalim
```

Not implemented in `~mpl_toolkits.mplot3d.axes3d.Axes3D`.

---
## get_zmargin
```python
from axes3d import get_zmargin
```

Retrieve autoscaling margin of the z-axis.

.. versionadded:: 3.9

Returns
-------
zmargin : float

See Also
--------
mpl_toolkits.mplot3d.axes3d.Axes3D.set_zmargin

---
## set_zmargin
```python
from axes3d import set_zmargin
```

Set padding of Z data limits prior to autoscaling.

*m* times the data interval will be added to each end of that interval
before it is used in autoscaling.  If *m* is negative, this will clip
the data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 will
result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
of [0.2, 1.8].

Parameters
----------
m : float greater than -0.5

---
## margins
```python
from axes3d import margins
```

Set or retrieve autoscaling margins.

See `.Axes.margins` for full documentation.  Because this function
applies to 3D Axes, it also takes a *z* argument, and returns
``(xmargin, ymargin, zmargin)``.

---
## autoscale
```python
from axes3d import autoscale
```

Convenience method for simple axis view autoscaling.

See `.Axes.autoscale` for full documentation.  Because this function
applies to 3D Axes, *axis* can also be set to 'z', and setting *axis*
to 'both' autoscales all three axes.

---
## auto_scale_xyz
```python
from axes3d import auto_scale_xyz
```



---
## autoscale_view
```python
from axes3d import autoscale_view
```

Autoscale the view limits using the data limits.

See `.Axes.autoscale_view` for full documentation.  Because this
function applies to 3D Axes, it also takes a *scalez* argument.

---
## get_w_lims
```python
from axes3d import get_w_lims
```

Get 3D world limits.

---
## _set_bound3d
```python
from axes3d import _set_bound3d
```

Set 3D axis bounds.

---
## set_xbound
```python
from axes3d import set_xbound
```

Set the lower and upper numerical bounds of the x-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscalex_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.
view_margin : float or None
    The margin to apply to the bounds. If *None*, the margin is handled
    by `.set_xlim`.

See Also
--------
get_xbound
get_xlim, set_xlim
invert_xaxis, xaxis_inverted

---
## set_ybound
```python
from axes3d import set_ybound
```

Set the lower and upper numerical bounds of the y-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscaley_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.
view_margin : float or None
    The margin to apply to the bounds. If *None*, the margin is handled
    by `.set_ylim`.

See Also
--------
get_ybound
get_ylim, set_ylim
invert_yaxis, yaxis_inverted

---
## set_zbound
```python
from axes3d import set_zbound
```

Set the lower and upper numerical bounds of the z-axis.
This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscaley_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.
view_margin : float or None
    The margin to apply to the bounds. If *None*, the margin is handled
    by `.set_zlim`.

See Also
--------
get_zbound
get_zlim, set_zlim
invert_zaxis, zaxis_inverted

---
## _set_lim3d
```python
from axes3d import _set_lim3d
```

Set 3D axis limits.

---
## set_xlim
```python
from axes3d import set_xlim
```

Set the 3D x-axis view limits.

Parameters
----------
left : float, optional
    The left xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The left and right xlims may also be passed as the tuple
    (*left*, *right*) as the first positional argument (or as
    the *left* keyword argument).

    .. ACCEPTS: (left: float, right: float)

right : float, optional
    The right xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the x-axis. *True* turns on,
    *False* turns off, *None* leaves unchanged.

view_margin : float, optional
    The additional margin to apply to the limits.

xmin, xmax : float, optional
    They are equivalent to left and right respectively, and it is an
    error to pass both *xmin* and *left* or *xmax* and *right*.

Returns
-------
left, right : (float, float)
    The new x-axis limits in data coordinates.

See Also
--------
get_xlim
set_xbound, get_xbound
invert_xaxis, xaxis_inverted

Notes
-----
The *left* value may be greater than the *right* value, in which
case the x-axis values will decrease from *left* to *right*.

Examples
--------
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)

One limit may be left unchanged.

>>> set_xlim(right=right_lim)

Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose ``x`` represents depth of the
ocean in m. The x-axis limits might be set like the following
so 5000 m depth is at the left of the plot and the surface,
0 m, is at the right.

>>> set_xlim(5000, 0)

---
## set_ylim
```python
from axes3d import set_ylim
```

Set the 3D y-axis view limits.

Parameters
----------
bottom : float, optional
    The bottom ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The bottom and top ylims may also be passed as the tuple
    (*bottom*, *top*) as the first positional argument (or as
    the *bottom* keyword argument).

    .. ACCEPTS: (bottom: float, top: float)

top : float, optional
    The top ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the y-axis. *True* turns on,
    *False* turns off, *None* leaves unchanged.

view_margin : float, optional
    The additional margin to apply to the limits.

ymin, ymax : float, optional
    They are equivalent to bottom and top respectively, and it is an
    error to pass both *ymin* and *bottom* or *ymax* and *top*.

Returns
-------
bottom, top : (float, float)
    The new y-axis limits in data coordinates.

See Also
--------
get_ylim
set_ybound, get_ybound
invert_yaxis, yaxis_inverted

Notes
-----
The *bottom* value may be greater than the *top* value, in which
case the y-axis values will decrease from *bottom* to *top*.

Examples
--------
>>> set_ylim(bottom, top)
>>> set_ylim((bottom, top))
>>> bottom, top = set_ylim(bottom, top)

One limit may be left unchanged.

>>> set_ylim(top=top_lim)

Limits may be passed in reverse order to flip the direction of
the y-axis. For example, suppose ``y`` represents depth of the
ocean in m. The y-axis limits might be set like the following
so 5000 m depth is at the bottom of the plot and the surface,
0 m, is at the top.

>>> set_ylim(5000, 0)

---
## set_zlim
```python
from axes3d import set_zlim
```

Set the 3D z-axis view limits.

Parameters
----------
bottom : float, optional
    The bottom zlim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The bottom and top zlims may also be passed as the tuple
    (*bottom*, *top*) as the first positional argument (or as
    the *bottom* keyword argument).

    .. ACCEPTS: (bottom: float, top: float)

top : float, optional
    The top zlim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the z-axis. *True* turns on,
    *False* turns off, *None* leaves unchanged.

view_margin : float, optional
    The additional margin to apply to the limits.

zmin, zmax : float, optional
    They are equivalent to bottom and top respectively, and it is an
    error to pass both *zmin* and *bottom* or *zmax* and *top*.

Returns
-------
bottom, top : (float, float)
    The new z-axis limits in data coordinates.

See Also
--------
get_zlim
set_zbound, get_zbound
invert_zaxis, zaxis_inverted

Notes
-----
The *bottom* value may be greater than the *top* value, in which
case the z-axis values will decrease from *bottom* to *top*.

Examples
--------
>>> set_zlim(bottom, top)
>>> set_zlim((bottom, top))
>>> bottom, top = set_zlim(bottom, top)

One limit may be left unchanged.

>>> set_zlim(top=top_lim)

Limits may be passed in reverse order to flip the direction of
the z-axis. For example, suppose ``z`` represents depth of the
ocean in m. The z-axis limits might be set like the following
so 5000 m depth is at the bottom of the plot and the surface,
0 m, is at the top.

>>> set_zlim(5000, 0)

---
## get_xlim
```python
from axes3d import get_xlim
```



---
## get_ylim
```python
from axes3d import get_ylim
```



---
## get_zlim
```python
from axes3d import get_zlim
```

Return the 3D z-axis view limits.

Returns
-------
left, right : (float, float)
    The current z-axis limits in data coordinates.

See Also
--------
set_zlim
set_zbound, get_zbound
invert_zaxis, zaxis_inverted

Notes
-----
The z-axis may be inverted, in which case the *left* value will
be greater than the *right* value.

---
## clabel
```python
from axes3d import clabel
```

Currently not implemented for 3D Axes, and returns *None*.

---
## view_init
```python
from axes3d import view_init
```

Set the elevation and azimuth of the Axes in degrees (not radians).

This can be used to rotate the Axes programmatically.

To look normal to the primary planes, the following elevation and
azimuth angles can be used. A roll angle of 0, 90, 180, or 270 deg
will rotate these views while keeping the axes at right angles.

==========   ====  ====
view plane   elev  azim
==========   ====  ====
XY           90    -90
XZ           0     -90
YZ           0     0
-XY          -90   90
-XZ          0     90
-YZ          0     180
==========   ====  ====

Parameters
----------
elev : float, default: None
    The elevation angle in degrees rotates the camera above the plane
    pierced by the vertical axis, with a positive angle corresponding
    to a location above that plane. For example, with the default
    vertical axis of 'z', the elevation defines the angle of the camera
    location above the x-y plane.
    If None, then the initial value as specified in the `Axes3D`
    constructor is used.
azim : float, default: None
    The azimuthal angle in degrees rotates the camera about the
    vertical axis, with a positive angle corresponding to a
    right-handed rotation. For example, with the default vertical axis
    of 'z', a positive azimuth rotates the camera about the origin from
    its location along the +x axis towards the +y axis.
    If None, then the initial value as specified in the `Axes3D`
    constructor is used.
roll : float, default: None
    The roll angle in degrees rotates the camera about the viewing
    axis. A positive angle spins the camera clockwise, causing the
    scene to rotate counter-clockwise.
    If None, then the initial value as specified in the `Axes3D`
    constructor is used.
vertical_axis : {"z", "x", "y"}, default: "z"
    The axis to align vertically. *azim* rotates about this axis.
share : bool, default: False
    If ``True``, apply the settings to all Axes with shared views.

---
## set_proj_type
```python
from axes3d import set_proj_type
```

Set the projection type.

Parameters
----------
proj_type : {'persp', 'ortho'}
    The projection type.
focal_length : float, default: None
    For a projection type of 'persp', the focal length of the virtual
    camera. Must be > 0. If None, defaults to 1.
    The focal length can be computed from a desired Field Of View via
    the equation: focal_length = 1/tan(FOV/2)

---
## _roll_to_vertical
```python
from axes3d import _roll_to_vertical
```

Roll arrays to match the different vertical axis.

Parameters
----------
arr : ArrayLike
    Array to roll.
reverse : bool, default: False
    Reverse the direction of the roll.

---
## get_proj
```python
from axes3d import get_proj
```

Create the projection matrix from the current viewing position.

---
## mouse_init
```python
from axes3d import mouse_init
```

Set the mouse buttons for 3D rotation and zooming.

Parameters
----------
rotate_btn : int or list of int, default: 1
    The mouse button or buttons to use for 3D rotation of the Axes.
pan_btn : int or list of int, default: 2
    The mouse button or buttons to use to pan the 3D Axes.
zoom_btn : int or list of int, default: 3
    The mouse button or buttons to use to zoom the 3D Axes.

---
## disable_mouse_rotation
```python
from axes3d import disable_mouse_rotation
```

Disable mouse buttons for 3D rotation, panning, and zooming.

---
## can_zoom
```python
from axes3d import can_zoom
```



---
## can_pan
```python
from axes3d import can_pan
```



---
## sharez
```python
from axes3d import sharez
```

Share the z-axis with *other*.

This is equivalent to passing ``sharez=other`` when constructing the
Axes, and cannot be used if the z-axis is already being shared with
another Axes.  Note that it is not possible to unshare axes.

---
## shareview
```python
from axes3d import shareview
```

Share the view angles with *other*.

This is equivalent to passing ``shareview=other`` when constructing the
Axes, and cannot be used if the view angles are already being shared
with another Axes.  Note that it is not possible to unshare axes.

---
## clear
```python
from axes3d import clear
```



---
## _button_press
```python
from axes3d import _button_press
```



---
## _button_release
```python
from axes3d import _button_release
```



---
## _get_view
```python
from axes3d import _get_view
```



---
## _set_view
```python
from axes3d import _set_view
```



---
## format_zdata
```python
from axes3d import format_zdata
```

Return *z* string formatted.  This function will use the
:attr:`fmt_zdata` attribute if it is callable, else will fall
back on the zaxis major formatter

---
## format_coord
```python
from axes3d import format_coord
```

Return a string giving the current view rotation angles, or the x, y, z
coordinates of the point on the nearest axis pane underneath the mouse
cursor, depending on the mouse button pressed.

---
## _rotation_coords
```python
from axes3d import _rotation_coords
```

Return the rotation angles as a string.

---
## _location_coords
```python
from axes3d import _location_coords
```

Return the location on the axis pane underneath the cursor as a string.

---
## _get_camera_loc
```python
from axes3d import _get_camera_loc
```

Returns the current camera location in data coordinates.

---
## _calc_coord
```python
from axes3d import _calc_coord
```

Given the 2D view coordinates, find the point on the nearest axis pane
that lies directly below those coordinates. Returns a 3D point in data
coordinates.

---
## _on_move
```python
from axes3d import _on_move
```

Mouse moving.

By default, button-1 rotates, button-2 pans, and button-3 zooms;
these buttons can be modified via `mouse_init`.

---
## drag_pan
```python
from axes3d import drag_pan
```



---
## _calc_view_axes
```python
from axes3d import _calc_view_axes
```

Get the unit vectors for the viewing axes in data coordinates.
`u` is towards the right of the screen
`v` is towards the top of the screen
`w` is out of the screen

---
## _set_view_from_bbox
```python
from axes3d import _set_view_from_bbox
```

Zoom in or out of the bounding box.

Will center the view in the center of the bounding box, and zoom by
the ratio of the size of the bounding box to the size of the Axes3D.

---
## _zoom_data_limits
```python
from axes3d import _zoom_data_limits
```

Zoom in or out of a 3D plot.

Will scale the data limits by the scale factors. These will be
transformed to the x, y, z data axes based on the current view angles.
A scale factor > 1 zooms out and a scale factor < 1 zooms in.

For an Axes that has had its aspect ratio set to 'equal', 'equalxy',
'equalyz', or 'equalxz', the relevant axes are constrained to zoom
equally.

Parameters
----------
scale_u : float
    Scale factor for the u view axis (view screen horizontal).
scale_v : float
    Scale factor for the v view axis (view screen vertical).
scale_w : float
    Scale factor for the w view axis (view screen depth).

---
## _scale_axis_limits
```python
from axes3d import _scale_axis_limits
```

Keeping the center of the x, y, and z data axes fixed, scale their
limits by scale factors. A scale factor > 1 zooms out and a scale
factor < 1 zooms in.

Parameters
----------
scale_x : float
    Scale factor for the x data axis.
scale_y : float
    Scale factor for the y data axis.
scale_z : float
    Scale factor for the z data axis.

---
## _get_w_centers_ranges
```python
from axes3d import _get_w_centers_ranges
```

Get 3D world centers and axis ranges.

---
## set_zlabel
```python
from axes3d import set_zlabel
```

Set zlabel.  See doc for `.set_ylabel` for description.

---
## get_zlabel
```python
from axes3d import get_zlabel
```

Get the z-label text string.

---
## grid
```python
from axes3d import grid
```

Set / unset 3D grid.

.. note::

    Currently, this function does not behave the same as
    `.axes.Axes.grid`, but it is intended to eventually support that
    behavior.

---
## tick_params
```python
from axes3d import tick_params
```

Convenience method for changing the appearance of ticks and
tick labels.

See `.Axes.tick_params` for full documentation.  Because this function
applies to 3D Axes, *axis* can also be set to 'z', and setting *axis*
to 'both' autoscales all three axes.

Also, because of how Axes3D objects are drawn very differently
from regular 2D Axes, some of these settings may have
ambiguous meaning.  For simplicity, the 'z' axis will
accept settings as if it was like the 'y' axis.

.. note::
   Axes3D currently ignores some of these settings.

---
## invert_zaxis
```python
from axes3d import invert_zaxis
```

Invert the z-axis.

See Also
--------
zaxis_inverted
get_zlim, set_zlim
get_zbound, set_zbound

---
## get_zbound
```python
from axes3d import get_zbound
```

Return the lower and upper z-axis bounds, in increasing order.

See Also
--------
set_zbound
get_zlim, set_zlim
invert_zaxis, zaxis_inverted

---
## text
```python
from axes3d import text
```

Add the text *s* to the 3D Axes at location *x*, *y*, *z* in data coordinates.

Parameters
----------
x, y, z : float
    The position to place the text.
s : str
    The text.
zdir : {'x', 'y', 'z', 3-tuple}, optional
    The direction to be used as the z-direction. Default: 'z'.
    See `.get_dir_vector` for a description of the values.
**kwargs
    Other arguments are forwarded to `matplotlib.axes.Axes.text`.

Returns
-------
`.Text3D`
    The created `.Text3D` instance.

---
## plot
```python
from axes3d import plot
```

Plot 2D or 3D data.

Parameters
----------
xs : 1D array-like
    x coordinates of vertices.
ys : 1D array-like
    y coordinates of vertices.
zs : float or 1D array-like
    z coordinates of vertices; either one for all points or one for
    each point.
zdir : {'x', 'y', 'z'}, default: 'z'
    When plotting 2D data, the direction to use as z.
**kwargs
    Other arguments are forwarded to `matplotlib.axes.Axes.plot`.

---
## plot_surface
```python
from axes3d import plot_surface
```

Create a surface plot.

By default, it will be colored in shades of a solid color, but it also
supports colormapping by supplying the *cmap* argument.

.. note::

   The *rcount* and *ccount* kwargs, which both default to 50,
   determine the maximum number of samples used in each direction.  If
   the input data is larger, it will be downsampled (by slicing) to
   these numbers of points.

.. note::

   To maximize rendering speed consider setting *rstride* and *cstride*
   to divisors of the number of rows minus 1 and columns minus 1
   respectively. For example, given 51 rows rstride can be any of the
   divisors of 50.

   Similarly, a setting of *rstride* and *cstride* equal to 1 (or
   *rcount* and *ccount* equal the number of rows and columns) can use
   the optimized path.

Parameters
----------
X, Y, Z : 2D arrays
    Data values.

rcount, ccount : int
    Maximum number of samples used in each direction.  If the input
    data is larger, it will be downsampled (by slicing) to these
    numbers of points.  Defaults to 50.

rstride, cstride : int
    Downsampling stride in each direction.  These arguments are
    mutually exclusive with *rcount* and *ccount*.  If only one of
    *rstride* or *cstride* is set, the other defaults to 10.

    'classic' mode uses a default of ``rstride = cstride = 10`` instead
    of the new default of ``rcount = ccount = 50``.

color : :mpltype:`color`
    Color of the surface patches.

cmap : Colormap, optional
    Colormap of the surface patches.

facecolors : list of :mpltype:`color`
    Colors of each individual patch.

norm : `~matplotlib.colors.Normalize`, optional
    Normalization for the colormap.

vmin, vmax : float, optional
    Bounds for the normalization.

shade : bool, default: True
    Whether to shade the facecolors.  Shading is always disabled when
    *cmap* is specified.

lightsource : `~matplotlib.colors.LightSource`, optional
    The lightsource to use when *shade* is True.

**kwargs
    Other keyword arguments are forwarded to `.Poly3DCollection`.

---
## plot_wireframe
```python
from axes3d import plot_wireframe
```

Plot a 3D wireframe.

.. note::

   The *rcount* and *ccount* kwargs, which both default to 50,
   determine the maximum number of samples used in each direction.  If
   the input data is larger, it will be downsampled (by slicing) to
   these numbers of points.

Parameters
----------
X, Y, Z : 2D arrays
    Data values.

rcount, ccount : int
    Maximum number of samples used in each direction.  If the input
    data is larger, it will be downsampled (by slicing) to these
    numbers of points.  Setting a count to zero causes the data to be
    not sampled in the corresponding direction, producing a 3D line
    plot rather than a wireframe plot.  Defaults to 50.

rstride, cstride : int
    Downsampling stride in each direction.  These arguments are
    mutually exclusive with *rcount* and *ccount*.  If only one of
    *rstride* or *cstride* is set, the other defaults to 1.  Setting a
    stride to zero causes the data to be not sampled in the
    corresponding direction, producing a 3D line plot rather than a
    wireframe plot.

    'classic' mode uses a default of ``rstride = cstride = 1`` instead
    of the new default of ``rcount = ccount = 50``.

**kwargs
    Other keyword arguments are forwarded to `.Line3DCollection`.

---
## plot_trisurf
```python
from axes3d import plot_trisurf
```

Plot a triangulated surface.

The (optional) triangulation can be specified in one of two ways;
either::

  plot_trisurf(triangulation, ...)

where triangulation is a `~matplotlib.tri.Triangulation` object, or::

  plot_trisurf(X, Y, ...)
  plot_trisurf(X, Y, triangles, ...)
  plot_trisurf(X, Y, triangles=triangles, ...)

in which case a Triangulation object will be created.  See
`.Triangulation` for an explanation of these possibilities.

The remaining arguments are::

  plot_trisurf(..., Z)

where *Z* is the array of values to contour, one per point
in the triangulation.

Parameters
----------
X, Y, Z : array-like
    Data values as 1D arrays.
color
    Color of the surface patches.
cmap
    A colormap for the surface patches.
norm : `~matplotlib.colors.Normalize`, optional
    An instance of Normalize to map values to colors.
vmin, vmax : float, optional
    Minimum and maximum value to map.
shade : bool, default: True
    Whether to shade the facecolors.  Shading is always disabled when
    *cmap* is specified.
lightsource : `~matplotlib.colors.LightSource`, optional
    The lightsource to use when *shade* is True.
**kwargs
    All other keyword arguments are passed on to
    :class:`~mpl_toolkits.mplot3d.art3d.Poly3DCollection`

Examples
--------
.. plot:: gallery/mplot3d/trisurf3d.py
.. plot:: gallery/mplot3d/trisurf3d_2.py

---
## _3d_extend_contour
```python
from axes3d import _3d_extend_contour
```

Extend a contour in 3D by creating

---
## add_contour_set
```python
from axes3d import add_contour_set
```



---
## add_contourf_set
```python
from axes3d import add_contourf_set
```



---
## _add_contourf_set
```python
from axes3d import _add_contourf_set
```

Returns
-------
levels : `numpy.ndarray`
    Levels at which the filled contours are added.

---
## contour
```python
from axes3d import contour
```

Create a 3D contour plot.

Parameters
----------
X, Y, Z : array-like,
    Input data. See `.Axes.contour` for supported data shapes.
extend3d : bool, default: False
    Whether to extend contour in 3D.
stride : int, default: 5
    Step size for extending contour.
zdir : {'x', 'y', 'z'}, default: 'z'
    The direction to use.
offset : float, optional
    If specified, plot a projection of the contour lines at this
    position in a plane normal to *zdir*.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

*args, **kwargs
    Other arguments are forwarded to `matplotlib.axes.Axes.contour`.

Returns
-------
matplotlib.contour.QuadContourSet

---
## tricontour
```python
from axes3d import tricontour
```

Create a 3D contour plot.

.. note::
    This method currently produces incorrect output due to a
    longstanding bug in 3D PolyCollection rendering.

Parameters
----------
X, Y, Z : array-like
    Input data. See `.Axes.tricontour` for supported data shapes.
extend3d : bool, default: False
    Whether to extend contour in 3D.
stride : int, default: 5
    Step size for extending contour.
zdir : {'x', 'y', 'z'}, default: 'z'
    The direction to use.
offset : float, optional
    If specified, plot a projection of the contour lines at this
    position in a plane normal to *zdir*.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
*args, **kwargs
    Other arguments are forwarded to `matplotlib.axes.Axes.tricontour`.

Returns
-------
matplotlib.tri._tricontour.TriContourSet

---
## _auto_scale_contourf
```python
from axes3d import _auto_scale_contourf
```



---
## contourf
```python
from axes3d import contourf
```

Create a 3D filled contour plot.

Parameters
----------
X, Y, Z : array-like
    Input data. See `.Axes.contourf` for supported data shapes.
zdir : {'x', 'y', 'z'}, default: 'z'
    The direction to use.
offset : float, optional
    If specified, plot a projection of the contour lines at this
    position in a plane normal to *zdir*.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
*args, **kwargs
    Other arguments are forwarded to `matplotlib.axes.Axes.contourf`.

Returns
-------
matplotlib.contour.QuadContourSet

---
## tricontourf
```python
from axes3d import tricontourf
```

Create a 3D filled contour plot.

.. note::
    This method currently produces incorrect output due to a
    longstanding bug in 3D PolyCollection rendering.

Parameters
----------
X, Y, Z : array-like
    Input data. See `.Axes.tricontourf` for supported data shapes.
zdir : {'x', 'y', 'z'}, default: 'z'
    The direction to use.
offset : float, optional
    If specified, plot a projection of the contour lines at this
    position in a plane normal to zdir.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
*args, **kwargs
    Other arguments are forwarded to
    `matplotlib.axes.Axes.tricontourf`.

Returns
-------
matplotlib.tri._tricontour.TriContourSet

---
## add_collection3d
```python
from axes3d import add_collection3d
```

Add a 3D collection object to the plot.

2D collection types are converted to a 3D version by
modifying the object and adding z coordinate information,
*zs* and *zdir*.

Supported 2D collection types are:

- `.PolyCollection`
- `.LineCollection`
- `.PatchCollection` (currently not supporting *autolim*)

Parameters
----------
col : `.Collection`
    A 2D collection object.
zs : float or array-like, default: 0
    The z-positions to be used for the 2D objects.
zdir : {'x', 'y', 'z'}, default: 'z'
    The direction to use for the z-positions.
autolim : bool, default: True
    Whether to update the data limits.

---
## scatter
```python
from axes3d import scatter
```

Create a scatter plot.

Parameters
----------
xs, ys : array-like
    The data positions.
zs : float or array-like, default: 0
    The z-positions. Either an array of the same length as *xs* and
    *ys* or a single value to place all points in the same plane.
zdir : {'x', 'y', 'z', '-x', '-y', '-z'}, default: 'z'
    The axis direction for the *zs*. This is useful when plotting 2D
    data on a 3D Axes. The data must be passed as *xs*, *ys*. Setting
    *zdir* to 'y' then plots the data to the x-z-plane.

    See also :doc:`/gallery/mplot3d/2dcollections3d`.

s : float or array-like, default: 20
    The marker size in points**2. Either an array of the same length
    as *xs* and *ys* or a single value to make all markers the same
    size.
c : :mpltype:`color`, sequence, or sequence of colors, optional
    The marker color. Possible values:

    - A single color format string.
    - A sequence of colors of length n.
    - A sequence of n numbers to be mapped to colors using *cmap* and
      *norm*.
    - A 2D array in which the rows are RGB or RGBA.

    For more details see the *c* argument of `~.axes.Axes.scatter`.
depthshade : bool, default: True
    Whether to shade the scatter markers to give the appearance of
    depth. Each call to ``scatter()`` will perform its depthshading
    independently.
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs
    All other keyword arguments are passed on to `~.axes.Axes.scatter`.

Returns
-------
paths : `~matplotlib.collections.PathCollection`

---
## bar
```python
from axes3d import bar
```

Add 2D bar(s).

Parameters
----------
left : 1D array-like
    The x coordinates of the left sides of the bars.
height : 1D array-like
    The height of the bars.
zs : float or 1D array-like, default: 0
    Z coordinate of bars; if a single value is specified, it will be
    used for all bars.
zdir : {'x', 'y', 'z'}, default: 'z'
    When plotting 2D data, the direction to use as z ('x', 'y' or 'z').
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs
    Other keyword arguments are forwarded to
    `matplotlib.axes.Axes.bar`.

Returns
-------
mpl_toolkits.mplot3d.art3d.Patch3DCollection

---
## bar3d
```python
from axes3d import bar3d
```

Generate a 3D barplot.

This method creates three-dimensional barplot where the width,
depth, height, and color of the bars can all be uniquely set.

Parameters
----------
x, y, z : array-like
    The coordinates of the anchor point of the bars.

dx, dy, dz : float or array-like
    The width, depth, and height of the bars, respectively.

color : sequence of colors, optional
    The color of the bars can be specified globally or
    individually. This parameter can be:

    - A single color, to color all bars the same color.
    - An array of colors of length N bars, to color each bar
      independently.
    - An array of colors of length 6, to color the faces of the
      bars similarly.
    - An array of colors of length 6 * N bars, to color each face
      independently.

    When coloring the faces of the boxes specifically, this is
    the order of the coloring:

    1. -Z (bottom of box)
    2. +Z (top of box)
    3. -Y
    4. +Y
    5. -X
    6. +X

zsort : {'average', 'min', 'max'}, default: 'average'
    The z-axis sorting scheme passed onto `~.art3d.Poly3DCollection`

shade : bool, default: True
    When true, this shades the dark sides of the bars (relative
    to the plot's source of light).

lightsource : `~matplotlib.colors.LightSource`, optional
    The lightsource to use when *shade* is True.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Any additional keyword arguments are passed onto
    `~.art3d.Poly3DCollection`.

Returns
-------
collection : `~.art3d.Poly3DCollection`
    A collection of three-dimensional polygons representing the bars.

---
## set_title
```python
from axes3d import set_title
```



---
## quiver
```python
from axes3d import quiver
```

Plot a 3D field of arrows.

The arguments can be array-like or scalars, so long as they can be
broadcast together. The arguments can also be masked arrays. If an
element in any of argument is masked, then that corresponding quiver
element will not be plotted.

Parameters
----------
X, Y, Z : array-like
    The x, y and z coordinates of the arrow locations (default is
    tail of arrow; see *pivot* kwarg).

U, V, W : array-like
    The x, y and z components of the arrow vectors.

length : float, default: 1
    The length of each quiver.

arrow_length_ratio : float, default: 0.3
    The ratio of the arrow head with respect to the quiver.

pivot : {'tail', 'middle', 'tip'}, default: 'tail'
    The part of the arrow that is at the grid point; the arrow
    rotates about this point, hence the name *pivot*.

normalize : bool, default: False
    Whether all arrows are normalized to have the same length, or keep
    the lengths defined by *u*, *v*, and *w*.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Any additional keyword arguments are delegated to
    :class:`.Line3DCollection`

---
## voxels
```python
from axes3d import voxels
```



---
## errorbar
```python
from axes3d import errorbar
```

Plot lines and/or markers with errorbars around them.

*x*/*y*/*z* define the data locations, and *xerr*/*yerr*/*zerr* define
the errorbar sizes. By default, this draws the data markers/lines as
well the errorbars. Use fmt='none' to draw errorbars only.

Parameters
----------
x, y, z : float or array-like
    The data positions.

xerr, yerr, zerr : float or array-like, shape (N,) or (2, N), optional
    The errorbar sizes:

    - scalar: Symmetric +/- values for all data points.
    - shape(N,): Symmetric +/-values for each data point.
    - shape(2, N): Separate - and + values for each bar. First row
      contains the lower errors, the second row contains the upper
      errors.
    - *None*: No errorbar.

    Note that all error arrays should have *positive* values.

fmt : str, default: ''
    The format for the data points / data lines. See `.plot` for
    details.

    Use 'none' (case-insensitive) to plot errorbars without any data
    markers.

ecolor : :mpltype:`color`, default: None
    The color of the errorbar lines.  If None, use the color of the
    line connecting the markers.

elinewidth : float, default: None
    The linewidth of the errorbar lines. If None, the linewidth of
    the current style is used.

capsize : float, default: :rc:`errorbar.capsize`
    The length of the error bar caps in points.

capthick : float, default: None
    An alias to the keyword argument *markeredgewidth* (a.k.a. *mew*).
    This setting is a more sensible name for the property that
    controls the thickness of the error bar cap in points. For
    backwards compatibility, if *mew* or *markeredgewidth* are given,
    then they will over-ride *capthick*. This may change in future
    releases.

barsabove : bool, default: False
    If True, will plot the errorbars above the plot
    symbols. Default is below.

xlolims, ylolims, zlolims : bool, default: False
    These arguments can be used to indicate that a value gives only
    lower limits. In that case a caret symbol is used to indicate
    this. *lims*-arguments may be scalars, or array-likes of the same
    length as the errors. To use limits with inverted axes,
    `~.set_xlim`, `~.set_ylim`, or `~.set_zlim` must be
    called before `errorbar`. Note the tricky parameter names: setting
    e.g. *ylolims* to True means that the y-value is a *lower* limit of
    the True value, so, only an *upward*-pointing arrow will be drawn!

xuplims, yuplims, zuplims : bool, default: False
    Same as above, but for controlling the upper limits.

errorevery : int or (int, int), default: 1
    draws error bars on a subset of the data. *errorevery* =N draws
    error bars on the points (x[::N], y[::N], z[::N]).
    *errorevery* =(start, N) draws error bars on the points
    (x[start::N], y[start::N], z[start::N]). e.g. *errorevery* =(6, 3)
    adds error bars to the data at (x[6], x[9], x[12], x[15], ...).
    Used to avoid overlapping error bars when two series share x-axis
    values.

Returns
-------
errlines : list
    List of `~mpl_toolkits.mplot3d.art3d.Line3DCollection` instances
    each containing an errorbar line.
caplines : list
    List of `~mpl_toolkits.mplot3d.art3d.Line3D` instances each
    containing a capline object.
limmarks : list
    List of `~mpl_toolkits.mplot3d.art3d.Line3D` instances each
    containing a marker with an upper or lower limit.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    All other keyword arguments for styling errorbar lines are passed
    `~mpl_toolkits.mplot3d.art3d.Line3DCollection`.

Examples
--------
.. plot:: gallery/mplot3d/errorbar3d.py

---
## get_tightbbox
```python
from axes3d import get_tightbbox
```



---
## stem
```python
from axes3d import stem
```

Create a 3D stem plot.

A stem plot draws lines perpendicular to a baseline, and places markers
at the heads. By default, the baseline is defined by *x* and *y*, and
stems are drawn vertically from *bottom* to *z*.

Parameters
----------
x, y, z : array-like
    The positions of the heads of the stems. The stems are drawn along
    the *orientation*-direction from the baseline at *bottom* (in the
    *orientation*-coordinate) to the heads. By default, the *x* and *y*
    positions are used for the baseline and *z* for the head position,
    but this can be changed by *orientation*.

linefmt : str, default: 'C0-'
    A string defining the properties of the vertical lines. Usually,
    this will be a color or a color and a linestyle:

    =========  =============
    Character  Line Style
    =========  =============
    ``'-'``    solid line
    ``'--'``   dashed line
    ``'-.'``   dash-dot line
    ``':'``    dotted line
    =========  =============

    Note: While it is technically possible to specify valid formats
    other than color or color and linestyle (e.g. 'rx' or '-.'), this
    is beyond the intention of the method and will most likely not
    result in a reasonable plot.

markerfmt : str, default: 'C0o'
    A string defining the properties of the markers at the stem heads.

basefmt : str, default: 'C3-'
    A format string defining the properties of the baseline.

bottom : float, default: 0
    The position of the baseline, in *orientation*-coordinates.

label : str, optional
    The label to use for the stems in legends.

orientation : {'x', 'y', 'z'}, default: 'z'
    The direction along which stems are drawn.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

Returns
-------
`.StemContainer`
    The container may be treated like a tuple
    (*markerline*, *stemlines*, *baseline*)

Examples
--------
.. plot:: gallery/mplot3d/stem3d_demo.py

---
## calc_arrows
```python
from axes3d import calc_arrows
```



---
## _broadcast_color_arg
```python
from axes3d import _broadcast_color_arg
```



---
## permutation_matrices
```python
from axes3d import permutation_matrices
```

Generate cyclic permutation matrices.

---
## _apply_mask
```python
from axes3d import _apply_mask
```



---
## _extract_errs
```python
from axes3d import _extract_errs
```



---
## _digout_minmax
```python
from axes3d import _digout_minmax
```



---
## __name__
```python
from axis3d import __name__
```



---
## _move_from_center
```python
from axis3d import _move_from_center
```

For each coordinate where *axmask* is True, move *coord* away from
*centers* by *deltas*.

---
## _tick_update_position
```python
from axis3d import _tick_update_position
```

Update tick line and label position and style.

---
## Axis
```python
from axis3d import Axis
```

An Axis class for the 3D plots.

---
## XAxis
```python
from axis3d import XAxis
```



---
## YAxis
```python
from axis3d import YAxis
```



---
## ZAxis
```python
from axis3d import ZAxis
```



---
## _old_init
```python
from axis3d import _old_init
```



---
## _new_init
```python
from axis3d import _new_init
```



---
## __init__
```python
from axis3d import __init__
```



---
## _init3d
```python
from axis3d import _init3d
```



---
## init3d
```python
from axis3d import init3d
```



---
## get_major_ticks
```python
from axis3d import get_major_ticks
```



---
## get_minor_ticks
```python
from axis3d import get_minor_ticks
```



---
## set_ticks_position
```python
from axis3d import set_ticks_position
```

Set the ticks position.

Parameters
----------
position : {'lower', 'upper', 'both', 'default', 'none'}
    The position of the bolded axis lines, ticks, and tick labels.

---
## get_ticks_position
```python
from axis3d import get_ticks_position
```

Get the ticks position.

Returns
-------
str : {'lower', 'upper', 'both', 'default', 'none'}
    The position of the bolded axis lines, ticks, and tick labels.

---
## set_label_position
```python
from axis3d import set_label_position
```

Set the label position.

Parameters
----------
position : {'lower', 'upper', 'both', 'default', 'none'}
    The position of the axis label.

---
## get_label_position
```python
from axis3d import get_label_position
```

Get the label position.

Returns
-------
str : {'lower', 'upper', 'both', 'default', 'none'}
    The position of the axis label.

---
## set_pane_color
```python
from axis3d import set_pane_color
```

Set pane color.

Parameters
----------
color : :mpltype:`color`
    Color for axis pane.
alpha : float, optional
    Alpha value for axis pane. If None, base it on *color*.

---
## set_rotate_label
```python
from axis3d import set_rotate_label
```

Whether to rotate the axis label: True, False or None.
If set to None the label will be rotated if longer than 4 chars.

---
## get_rotate_label
```python
from axis3d import get_rotate_label
```



---
## _get_coord_info
```python
from axis3d import _get_coord_info
```



---
## _calc_centers_deltas
```python
from axis3d import _calc_centers_deltas
```



---
## _get_axis_line_edge_points
```python
from axis3d import _get_axis_line_edge_points
```

Get the edge points for the black bolded axis line.

---
## _get_all_axis_line_edge_points
```python
from axis3d import _get_all_axis_line_edge_points
```



---
## _get_tickdir
```python
from axis3d import _get_tickdir
```

Get the direction of the tick.

Parameters
----------
position : str, optional : {'upper', 'lower', 'default'}
    The position of the axis.

Returns
-------
tickdir : int
    Index which indicates which coordinate the tick line will
    align with.

---
## active_pane
```python
from axis3d import active_pane
```



---
## draw_pane
```python
from axis3d import draw_pane
```

Draw pane.

Parameters
----------
renderer : `~matplotlib.backend_bases.RendererBase` subclass

---
## _axmask
```python
from axis3d import _axmask
```



---
## _draw_ticks
```python
from axis3d import _draw_ticks
```



---
## _draw_offset_text
```python
from axis3d import _draw_offset_text
```



---
## _draw_labels
```python
from axis3d import _draw_labels
```



---
## draw
```python
from axis3d import draw
```



---
## draw_grid
```python
from axis3d import draw_grid
```



---
## get_tightbbox
```python
from axis3d import get_tightbbox
```



---
## __name__
```python
from art3d import __name__
```

Module containing 3D artist code and functions to convert 2D
artists into 3D versions which can be added to an Axes3D.

---
## _norm_angle
```python
from art3d import _norm_angle
```

Return the given angle normalized to -180 < *a* <= 180 degrees.

---
## _norm_text_angle
```python
from art3d import _norm_text_angle
```

Return the given angle normalized to -90 < *a* <= 90 degrees.

---
## get_dir_vector
```python
from art3d import get_dir_vector
```

Return a direction vector.

Parameters
----------
zdir : {'x', 'y', 'z', None, 3-tuple}
    The direction. Possible values are:

    - 'x': equivalent to (1, 0, 0)
    - 'y': equivalent to (0, 1, 0)
    - 'z': equivalent to (0, 0, 1)
    - *None*: equivalent to (0, 0, 0)
    - an iterable (x, y, z) is converted to an array

Returns
-------
x, y, z : array
    The direction vector.

---
## Text3D
```python
from art3d import Text3D
```

Text object with 3D position and direction.

Parameters
----------
x, y, z : float
    The position of the text.
text : str
    The text string to display.
zdir : {'x', 'y', 'z', None, 3-tuple}
    The direction of the text. See `.get_dir_vector` for a description of
    the values.

Other Parameters
----------------
**kwargs
     All other parameters are passed on to `~matplotlib.text.Text`.

---
## text_2d_to_3d
```python
from art3d import text_2d_to_3d
```

Convert a `.Text` to a `.Text3D` object.

Parameters
----------
z : float
    The z-position in 3D space.
zdir : {'x', 'y', 'z', 3-tuple}
    The direction of the text. Default: 'z'.
    See `.get_dir_vector` for a description of the values.

---
## Line3D
```python
from art3d import Line3D
```

3D line object.

.. note:: Use `get_data_3d` to obtain the data associated with the line.
        `~.Line2D.get_data`, `~.Line2D.get_xdata`, and `~.Line2D.get_ydata` return
        the x- and y-coordinates of the projected 2D-line, not the x- and y-data of
        the 3D-line. Similarly, use `set_data_3d` to set the data, not
        `~.Line2D.set_data`, `~.Line2D.set_xdata`, and `~.Line2D.set_ydata`.

---
## line_2d_to_3d
```python
from art3d import line_2d_to_3d
```

Convert a `.Line2D` to a `.Line3D` object.

Parameters
----------
zs : float
    The location along the *zdir* axis in 3D space to position the line.
zdir : {'x', 'y', 'z'}
    Plane to plot line orthogonal to. Default: 'z'.
    See `.get_dir_vector` for a description of the values.

---
## _path_to_3d_segment
```python
from art3d import _path_to_3d_segment
```

Convert a path to a 3D segment.

---
## _paths_to_3d_segments
```python
from art3d import _paths_to_3d_segments
```

Convert paths from a collection object to 3D segments.

---
## _path_to_3d_segment_with_codes
```python
from art3d import _path_to_3d_segment_with_codes
```

Convert a path to a 3D segment with path codes.

---
## _paths_to_3d_segments_with_codes
```python
from art3d import _paths_to_3d_segments_with_codes
```

Convert paths from a collection object to 3D segments with path codes.

---
## Collection3D
```python
from art3d import Collection3D
```

A collection of 3D paths.

---
## collection_2d_to_3d
```python
from art3d import collection_2d_to_3d
```

Convert a `.Collection` to a `.Collection3D` object.

---
## Line3DCollection
```python
from art3d import Line3DCollection
```

A collection of 3D lines.

---
## line_collection_2d_to_3d
```python
from art3d import line_collection_2d_to_3d
```

Convert a `.LineCollection` to a `.Line3DCollection` object.

---
## Patch3D
```python
from art3d import Patch3D
```

3D patch object.

---
## PathPatch3D
```python
from art3d import PathPatch3D
```

3D PathPatch object.

---
## _get_patch_verts
```python
from art3d import _get_patch_verts
```

Return a list of vertices for the path of a patch.

---
## patch_2d_to_3d
```python
from art3d import patch_2d_to_3d
```

Convert a `.Patch` to a `.Patch3D` object.

---
## pathpatch_2d_to_3d
```python
from art3d import pathpatch_2d_to_3d
```

Convert a `.PathPatch` to a `.PathPatch3D` object.

---
## Patch3DCollection
```python
from art3d import Patch3DCollection
```

A collection of 3D patches.

---
## Path3DCollection
```python
from art3d import Path3DCollection
```

A collection of 3D paths.

---
## patch_collection_2d_to_3d
```python
from art3d import patch_collection_2d_to_3d
```

Convert a `.PatchCollection` into a `.Patch3DCollection` object
(or a `.PathCollection` into a `.Path3DCollection` object).

Parameters
----------
col : `~matplotlib.collections.PatchCollection` or `~matplotlib.collections.PathCollection`
    The collection to convert.
zs : float or array of floats
    The location or locations to place the patches in the collection along
    the *zdir* axis. Default: 0.
zdir : {'x', 'y', 'z'}
    The axis in which to place the patches. Default: "z".
    See `.get_dir_vector` for a description of the values.
depthshade : bool, default: True
    Whether to shade the patches to give a sense of depth.

---
## Poly3DCollection
```python
from art3d import Poly3DCollection
```

A collection of 3D polygons.

.. note::
    **Filling of 3D polygons**

    There is no simple definition of the enclosed surface of a 3D polygon
    unless the polygon is planar.

    In practice, Matplotlib fills the 2D projection of the polygon. This
    gives a correct filling appearance only for planar polygons. For all
    other polygons, you'll find orientations in which the edges of the
    polygon intersect in the projection. This will lead to an incorrect
    visualization of the 3D area.

    If you need filled areas, it is recommended to create them via
    `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`, which creates a
    triangulation and thus generates consistent surfaces.

---
## poly_collection_2d_to_3d
```python
from art3d import poly_collection_2d_to_3d
```

Convert a `.PolyCollection` into a `.Poly3DCollection` object.

Parameters
----------
col : `~matplotlib.collections.PolyCollection`
    The collection to convert.
zs : float or array of floats
    The location or locations to place the polygons in the collection along
    the *zdir* axis. Default: 0.
zdir : {'x', 'y', 'z'}
    The axis in which to place the patches. Default: 'z'.
    See `.get_dir_vector` for a description of the values.

---
## juggle_axes
```python
from art3d import juggle_axes
```

Reorder coordinates so that 2D *xs*, *ys* can be plotted in the plane
orthogonal to *zdir*. *zdir* is normally 'x', 'y' or 'z'. However, if
*zdir* starts with a '-' it is interpreted as a compensation for
`rotate_axes`.

---
## rotate_axes
```python
from art3d import rotate_axes
```

Reorder coordinates so that the axes are rotated with *zdir* along
the original z axis. Prepending the axis with a '-' does the
inverse transform, so *zdir* can be 'x', '-x', 'y', '-y', 'z' or '-z'.

---
## _zalpha
```python
from art3d import _zalpha
```

Modify the alphas of the color list according to depth.

---
## _generate_normals
```python
from art3d import _generate_normals
```

Compute the normals of a list of polygons, one normal per polygon.

Normals point towards the viewer for a face with its vertices in
counterclockwise order, following the right hand rule.

Uses three points equally spaced around the polygon. This method assumes
that the points are in a plane. Otherwise, more than one shade is required,
which is not supported.

Parameters
----------
polygons : list of (M_i, 3) array-like, or (..., M, 3) array-like
    A sequence of polygons to compute normals for, which can have
    varying numbers of vertices. If the polygons all have the same
    number of vertices and array is passed, then the operation will
    be vectorized.

Returns
-------
normals : (..., 3) array
    A normal vector estimated for the polygon.

---
## _shade_colors
```python
from art3d import _shade_colors
```

Shade *color* using normal vectors given by *normals*,
assuming a *lightsource* (using default position if not given).
*color* can also be an array of the same length as *normals*.

---
## __init__
```python
from art3d import __init__
```

Parameters
----------
verts : list of (N, 3) array-like
    The sequence of polygons [*verts0*, *verts1*, ...] where each
    element *verts_i* defines the vertices of polygon *i* as a 2D
    array-like of shape (N, 3).
zsort : {'average', 'min', 'max'}, default: 'average'
    The calculation method for the z-order.
    See `~.Poly3DCollection.set_zsort` for details.
shade : bool, default: False
    Whether to shade *facecolors* and *edgecolors*. When activating
    *shade*, *facecolors* and/or *edgecolors* must be provided.

    .. versionadded:: 3.7

lightsource : `~matplotlib.colors.LightSource`, optional
    The lightsource to use when *shade* is True.

    .. versionadded:: 3.7

*args, **kwargs
    All other parameters are forwarded to `.PolyCollection`.

Notes
-----
Note that this class does a bit of magic with the _facecolors
and _edgecolors properties.

---
## get_position_3d
```python
from art3d import get_position_3d
```

Return the (x, y, z) position of the text.

---
## set_position_3d
```python
from art3d import set_position_3d
```

Set the (*x*, *y*, *z*) position of the text.

Parameters
----------
xyz : (float, float, float)
    The position in 3D space.
zdir : {'x', 'y', 'z', None, 3-tuple}
    The direction of the text. If unspecified, the *zdir* will not be
    changed. See `.get_dir_vector` for a description of the values.

---
## set_z
```python
from art3d import set_z
```

Set the *z* position of the text.

Parameters
----------
z : float

---
## set_3d_properties
```python
from art3d import set_3d_properties
```



---
## draw
```python
from art3d import draw
```



---
## get_tightbbox
```python
from art3d import get_tightbbox
```



---
## set_data_3d
```python
from art3d import set_data_3d
```

Set the x, y and z data

Parameters
----------
x : array-like
    The x-data to be plotted.
y : array-like
    The y-data to be plotted.
z : array-like
    The z-data to be plotted.

Notes
-----
Accepts x, y, z arguments or a single array-like (x, y, z)

---
## get_data_3d
```python
from art3d import get_data_3d
```

Get the current data

Returns
-------
verts3d : length-3 tuple or array-like
    The current data as a tuple or array-like.

---
## do_3d_projection
```python
from art3d import do_3d_projection
```

Perform the 3D projection for this object.

---
## set_sort_zpos
```python
from art3d import set_sort_zpos
```

Set the position to use for z-sorting.

---
## set_segments
```python
from art3d import set_segments
```

Set 3D segments.

---
## get_path
```python
from art3d import get_path
```



---
## get_depthshade
```python
from art3d import get_depthshade
```



---
## set_depthshade
```python
from art3d import set_depthshade
```

Set whether depth shading is performed on collection members.

Parameters
----------
depthshade : bool
    Whether to shade the patches in order to give the appearance of
    depth.

---
## _maybe_depth_shade_and_sort_colors
```python
from art3d import _maybe_depth_shade_and_sort_colors
```



---
## get_facecolor
```python
from art3d import get_facecolor
```



---
## get_edgecolor
```python
from art3d import get_edgecolor
```



---
## set_sizes
```python
from art3d import set_sizes
```



---
## set_linewidth
```python
from art3d import set_linewidth
```



---
## _use_zordered_offset
```python
from art3d import _use_zordered_offset
```



---
## set_zsort
```python
from art3d import set_zsort
```

Set the calculation method for the z-order.

Parameters
----------
zsort : {'average', 'min', 'max'}
    The function applied on the z-coordinates of the vertices in the
    viewer's coordinate system, to determine the z-order.

---
## get_vector
```python
from art3d import get_vector
```

Optimize points for projection.

---
## set_verts
```python
from art3d import set_verts
```

Set 3D vertices.

Parameters
----------
verts : list of (N, 3) array-like
    The sequence of polygons [*verts0*, *verts1*, ...] where each
    element *verts_i* defines the vertices of polygon *i* as a 2D
    array-like of shape (N, 3).
closed : bool, default: True
    Whether the polygon should be closed by adding a CLOSEPOLY
    connection at the end.

---
## set_verts_and_codes
```python
from art3d import set_verts_and_codes
```

Set 3D vertices with path codes.

---
## set_facecolor
```python
from art3d import set_facecolor
```



---
## set_edgecolor
```python
from art3d import set_edgecolor
```



---
## set_alpha
```python
from art3d import set_alpha
```



---
## norm
```python
from art3d import norm
```



---
## __name__
```python
from axislines import __name__
```

Axislines includes modified implementation of the Axes class. The
biggest difference is that the artists responsible for drawing the axis spine,
ticks, ticklabels and axis labels are separated out from Matplotlib's Axis
class. Originally, this change was motivated to support curvilinear
grid. Here are a few reasons that I came up with a new axes class:

* "top" and "bottom" x-axis (or "left" and "right" y-axis) can have
  different ticks (tick locations and labels). This is not possible
  with the current Matplotlib, although some twin axes trick can help.

* Curvilinear grid.

* angled ticks.

In the new axes class, xaxis and yaxis is set to not visible by
default, and new set of artist (AxisArtist) are defined to draw axis
line, ticks, ticklabels and axis label. Axes.axis attribute serves as
a dictionary of these artists, i.e., ax.axis["left"] is a AxisArtist
instance responsible to draw left y-axis. The default Axes.axis contains
"bottom", "left", "top" and "right".

AxisArtist can be considered as a container artist and has the following
children artists which will draw ticks, labels, etc.

* line
* major_ticks, major_ticklabels
* minor_ticks, minor_ticklabels
* offsetText
* label

Note that these are separate artists from `matplotlib.axis.Axis`, thus most
tick-related functions in Matplotlib won't work. For example, color and
markerwidth of the ``ax.axis["bottom"].major_ticks`` will follow those of
Axes.xaxis unless explicitly specified.

In addition to AxisArtist, the Axes will have *gridlines* attribute,
which obviously draws grid lines. The gridlines needs to be separated
from the axis as some gridlines can never pass any axis.

---
## _AxisArtistHelperBase
```python
from axislines import _AxisArtistHelperBase
```

Base class for axis helper.

Subclasses should define the methods listed below.  The *axes*
argument will be the ``.axes`` attribute of the caller artist. ::

    # Construct the spine.

    def get_line_transform(self, axes):
        return transform

    def get_line(self, axes):
        return path

    # Construct the label.

    def get_axislabel_transform(self, axes):
        return transform

    def get_axislabel_pos_angle(self, axes):
        return (x, y), angle

    # Construct the ticks.

    def get_tick_transform(self, axes):
        return transform

    def get_tick_iterators(self, axes):
        # A pair of iterables (one for major ticks, one for minor ticks)
        # that yield (tick_position, tick_angle, tick_label).
        return iter_major, iter_minor

---
## _FixedAxisArtistHelperBase
```python
from axislines import _FixedAxisArtistHelperBase
```

Helper class for a fixed (in the axes coordinate) axis.

---
## _FloatingAxisArtistHelperBase
```python
from axislines import _FloatingAxisArtistHelperBase
```



---
## FixedAxisArtistHelperRectilinear
```python
from axislines import FixedAxisArtistHelperRectilinear
```



---
## FloatingAxisArtistHelperRectilinear
```python
from axislines import FloatingAxisArtistHelperRectilinear
```



---
## AxisArtistHelper
```python
from axislines import AxisArtistHelper
```



---
## AxisArtistHelperRectlinear
```python
from axislines import AxisArtistHelperRectlinear
```



---
## GridHelperBase
```python
from axislines import GridHelperBase
```



---
## GridHelperRectlinear
```python
from axislines import GridHelperRectlinear
```



---
## Axes
```python
from axislines import Axes
```



---
## AxesZero
```python
from axislines import AxesZero
```



---
## __init__
```python
from axislines import __init__
```



---
## update_lim
```python
from axislines import update_lim
```



---
## get_nth_coord
```python
from axislines import get_nth_coord
```



---
## _to_xy
```python
from axislines import _to_xy
```

Create a (*values.shape, 2)-shape array representing (x, y) pairs.

The other coordinate is filled with the constant *const*.

Example::

    >>> self.nth_coord = 0
    >>> self._to_xy([1, 2, 3], const=0)
    array([[1, 0],
           [2, 0],
           [3, 0]])

---
## get_line
```python
from axislines import get_line
```



---
## get_line_transform
```python
from axislines import get_line_transform
```



---
## get_axislabel_transform
```python
from axislines import get_axislabel_transform
```



---
## get_axislabel_pos_angle
```python
from axislines import get_axislabel_pos_angle
```

Return the label reference position in transAxes.

get_label_transform() returns a transform of (transAxes+offset)

---
## get_tick_transform
```python
from axislines import get_tick_transform
```



---
## get_tick_iterators
```python
from axislines import get_tick_iterators
```

tick_loc, tick_angle, tick_label

---
## _update_grid
```python
from axislines import _update_grid
```

Cache relevant computations when the axes limits have changed.

---
## get_gridlines
```python
from axislines import get_gridlines
```

Return list of gridline coordinates in data coordinates.

Parameters
----------
which : {"both", "major", "minor"}
axis : {"both", "x", "y"}

---
## new_fixed_axis
```python
from axislines import new_fixed_axis
```



---
## new_floating_axis
```python
from axislines import new_floating_axis
```



---
## __call__
```python
from axislines import __call__
```



---
## toggle_axisline
```python
from axislines import toggle_axisline
```



---
## axis
```python
from axislines import axis
```



---
## clear
```python
from axislines import clear
```



---
## get_grid_helper
```python
from axislines import get_grid_helper
```



---
## grid
```python
from axislines import grid
```

Toggle the gridlines, and optionally set the properties of the lines.

---
## get_children
```python
from axislines import get_children
```



---
## _f
```python
from axislines import _f
```



---
## __name__
```python
from grid_finder import __name__
```



---
## _find_line_box_crossings
```python
from grid_finder import _find_line_box_crossings
```

Find the points where a polyline crosses a bbox, and the crossing angles.

Parameters
----------
xys : (N, 2) array
    The polyline coordinates.
bbox : `.Bbox`
    The bounding box.

Returns
-------
list of ((float, float), float)
    Four separate lists of crossings, for the left, right, bottom, and top
    sides of the bbox, respectively.  For each list, the entries are the
    ``((x, y), ccw_angle_in_degrees)`` of the crossing, where an angle of 0
    means that the polyline is moving to the right at the crossing point.

    The entries are computed by linearly interpolating at each crossing
    between the nearest points on either side of the bbox edges.

---
## ExtremeFinderSimple
```python
from grid_finder import ExtremeFinderSimple
```

A helper class to figure out the range of grid lines that need to be drawn.

---
## _User2DTransform
```python
from grid_finder import _User2DTransform
```

A transform defined by two user-set functions.

---
## GridFinder
```python
from grid_finder import GridFinder
```

Internal helper for `~.grid_helper_curvelinear.GridHelperCurveLinear`, with
the same constructor parameters; should not be directly instantiated.

---
## MaxNLocator
```python
from grid_finder import MaxNLocator
```



---
## FixedLocator
```python
from grid_finder import FixedLocator
```



---
## FormatterPrettyPrint
```python
from grid_finder import FormatterPrettyPrint
```



---
## DictFormatter
```python
from grid_finder import DictFormatter
```



---
## __init__
```python
from grid_finder import __init__
```

format_dict : dictionary for format strings to be used.
formatter : fall-back formatter

---
## __call__
```python
from grid_finder import __call__
```

factor is ignored if value is found in the dictionary

---
## _add_pad
```python
from grid_finder import _add_pad
```

Perform the padding mentioned in `__call__`.

---
## transform_non_affine
```python
from grid_finder import transform_non_affine
```



---
## inverted
```python
from grid_finder import inverted
```



---
## _format_ticks
```python
from grid_finder import _format_ticks
```

Helper to support both standard formatters (inheriting from
`.mticker.Formatter`) and axisartist-specific ones; should be called instead of
directly calling ``self.tick_formatter1`` and ``self.tick_formatter2``.  This
method should be considered as a temporary workaround which will be removed in
the future at the same time as axisartist-specific formatters.

---
## get_grid_info
```python
from grid_finder import get_grid_info
```

lon_values, lat_values : list of grid values. if integer is given,
rough number of grids in each direction.

---
## _get_raw_grid_lines
```python
from grid_finder import _get_raw_grid_lines
```



---
## set_transform
```python
from grid_finder import set_transform
```



---
## get_transform
```python
from grid_finder import get_transform
```



---
## transform_xy
```python
from grid_finder import transform_xy
```



---
## inv_transform_xy
```python
from grid_finder import inv_transform_xy
```



---
## update
```python
from grid_finder import update
```



---
## __name__
```python
from axis_artist import __name__
```

The :mod:`.axis_artist` module implements custom artists to draw axis elements
(axis lines and labels, tick lines and labels, grid lines).

Axis lines and labels and tick lines and labels are managed by the `AxisArtist`
class; grid lines are managed by the `GridlinesCollection` class.

There is one `AxisArtist` per Axis; it can be accessed through
the ``axis`` dictionary of the parent Axes (which should be a
`mpl_toolkits.axislines.Axes`), e.g. ``ax.axis["bottom"]``.

Children of the AxisArtist are accessed as attributes: ``.line`` and ``.label``
for the axis line and label, ``.major_ticks``, ``.major_ticklabels``,
``.minor_ticks``, ``.minor_ticklabels`` for the tick lines and labels (e.g.
``ax.axis["bottom"].line``).

Children properties (colors, fonts, line widths, etc.) can be set using
setters, e.g. ::

  # Make the major ticks of the bottom axis red.
  ax.axis["bottom"].major_ticks.set_color("red")

However, things like the locations of ticks, and their ticklabels need to be
changed from the side of the grid_helper.

axis_direction
--------------

`AxisArtist`, `AxisLabel`, `TickLabels` have an *axis_direction* attribute,
which adjusts the location, angle, etc. The *axis_direction* must be one of
"left", "right", "bottom", "top", and follows the Matplotlib convention for
rectangular axis.

For example, for the *bottom* axis (the left and right is relative to the
direction of the increasing coordinate),

* ticklabels and axislabel are on the right
* ticklabels and axislabel have text angle of 0
* ticklabels are baseline, center-aligned
* axislabel is top, center-aligned

The text angles are actually relative to (90 + angle of the direction to the
ticklabel), which gives 0 for bottom axis.

=================== ====== ======== ====== ========
Property            left   bottom   right  top
=================== ====== ======== ====== ========
ticklabel location  left   right    right  left
axislabel location  left   right    right  left
ticklabel angle     90     0        -90    180
axislabel angle     180    0        0      180
ticklabel va        center baseline center baseline
axislabel va        center top      center bottom
ticklabel ha        right  center   right  center
axislabel ha        right  center   right  center
=================== ====== ======== ====== ========

Ticks are by default direct opposite side of the ticklabels. To make ticks to
the same side of the ticklabels, ::

  ax.axis["bottom"].major_ticks.set_tick_out(True)

The following attributes can be customized (use the ``set_xxx`` methods):

* `Ticks`: ticksize, tick_out
* `TickLabels`: pad
* `AxisLabel`: pad

---
## AttributeCopier
```python
from axis_artist import AttributeCopier
```



---
## Ticks
```python
from axis_artist import Ticks
```

Ticks are derived from `.Line2D`, and note that ticks themselves
are markers. Thus, you should use set_mec, set_mew, etc.

To change the tick size (length), you need to use
`set_ticksize`. To change the direction of the ticks (ticks are
in opposite direction of ticklabels by default), use
``set_tick_out(False)``

---
## LabelBase
```python
from axis_artist import LabelBase
```

A base class for `.AxisLabel` and `.TickLabels`. The position and
angle of the text are calculated by the offset_ref_angle,
text_ref_angle, and offset_radius attributes.

---
## AxisLabel
```python
from axis_artist import AxisLabel
```

Axis label. Derived from `.Text`. The position of the text is updated
in the fly, so changing text position has no effect. Otherwise, the
properties can be changed as a normal `.Text`.

To change the pad between tick labels and axis label, use `set_pad`.

---
## TickLabels
```python
from axis_artist import TickLabels
```

Tick labels. While derived from `.Text`, this single artist draws all
ticklabels. As in `.AxisLabel`, the position of the text is updated
in the fly, so changing text position has no effect. Otherwise,
the properties can be changed as a normal `.Text`. Unlike the
ticklabels of the mainline Matplotlib, properties of a single
ticklabel alone cannot be modified.

To change the pad between ticks and ticklabels, use `~.AxisLabel.set_pad`.

---
## GridlinesCollection
```python
from axis_artist import GridlinesCollection
```



---
## AxisArtist
```python
from axis_artist import AxisArtist
```

An artist which draws axis (a line along which the n-th axes coord
is constant) line, ticks, tick labels, and axis label.

---
## get_ref_artist
```python
from axis_artist import get_ref_artist
```



---
## get_attribute_from_ref_artist
```python
from axis_artist import get_attribute_from_ref_artist
```



---
## __init__
```python
from axis_artist import __init__
```

Parameters
----------
axes : `mpl_toolkits.axisartist.axislines.Axes`
helper : `~mpl_toolkits.axisartist.axislines.AxisArtistHelper`

---
## set_color
```python
from axis_artist import set_color
```



---
## get_color
```python
from axis_artist import get_color
```



---
## get_markeredgecolor
```python
from axis_artist import get_markeredgecolor
```



---
## get_markeredgewidth
```python
from axis_artist import get_markeredgewidth
```



---
## set_tick_out
```python
from axis_artist import set_tick_out
```

Set whether ticks are drawn inside or outside the axes.

---
## get_tick_out
```python
from axis_artist import get_tick_out
```

Return whether ticks are drawn inside or outside the axes.

---
## set_ticksize
```python
from axis_artist import set_ticksize
```

Set length of the ticks in points.

---
## get_ticksize
```python
from axis_artist import get_ticksize
```

Return length of the ticks in points.

---
## set_locs_angles
```python
from axis_artist import set_locs_angles
```



---
## draw
```python
from axis_artist import draw
```



---
## _text_ref_angle
```python
from axis_artist import _text_ref_angle
```



---
## _offset_ref_angle
```python
from axis_artist import _offset_ref_angle
```



---
## get_window_extent
```python
from axis_artist import get_window_extent
```



---
## set_pad
```python
from axis_artist import set_pad
```

Set the internal pad in points.

The actual pad will be the sum of the internal pad and the
external pad (the latter is set automatically by the `.AxisArtist`).

Parameters
----------
pad : float
    The internal pad in points.

---
## get_pad
```python
from axis_artist import get_pad
```

Return the internal pad in points.

See `.set_pad` for more details.

---
## get_text
```python
from axis_artist import get_text
```



---
## set_default_alignment
```python
from axis_artist import set_default_alignment
```

Set the default alignment. See `set_axis_direction` for details.

Parameters
----------
d : {"left", "bottom", "right", "top"}

---
## set_default_angle
```python
from axis_artist import set_default_angle
```

Set the default angle. See `set_axis_direction` for details.

Parameters
----------
d : {"left", "bottom", "right", "top"}

---
## set_axis_direction
```python
from axis_artist import set_axis_direction
```

Adjust the direction, text angle, and text alignment of tick labels
and axis labels following the Matplotlib convention for the rectangle
axes.

The *axis_direction* must be one of [left, right, bottom, top].

=====================    ========== ========= ========== ==========
Property                 left       bottom    right      top
=====================    ========== ========= ========== ==========
ticklabel direction      "-"        "+"       "+"        "-"
axislabel direction      "-"        "+"       "+"        "-"
ticklabel angle          90         0         -90        180
ticklabel va             center     baseline  center     baseline
ticklabel ha             right      center    right      center
axislabel angle          180        0         0          180
axislabel va             center     top       center     bottom
axislabel ha             right      center    right      center
=====================    ========== ========= ========== ==========

Note that the direction "+" and "-" are relative to the direction of
the increasing coordinate. Also, the text angles are actually
relative to (90 + angle of the direction to the ticklabel),
which gives 0 for bottom axis.

Parameters
----------
axis_direction : {"left", "bottom", "right", "top"}

---
## invert_axis_direction
```python
from axis_artist import invert_axis_direction
```



---
## _get_ticklabels_offsets
```python
from axis_artist import _get_ticklabels_offsets
```

Calculate the ticklabel offsets from the tick and their total heights.

The offset only takes account the offset due to the vertical alignment
of the ticklabels: if axis direction is bottom and va is 'top', it will
return 0; if va is 'baseline', it will return (height-descent).

---
## set_locs_angles_labels
```python
from axis_artist import set_locs_angles_labels
```



---
## get_window_extents
```python
from axis_artist import get_window_extents
```



---
## get_texts_widths_heights_descents
```python
from axis_artist import get_texts_widths_heights_descents
```

Return a list of ``(width, height, descent)`` tuples for ticklabels.

Empty labels are left out.

---
## set_which
```python
from axis_artist import set_which
```

Select major or minor grid lines.

Parameters
----------
which : {"major", "minor"}

---
## set_axis
```python
from axis_artist import set_axis
```

Select axis.

Parameters
----------
axis : {"both", "x", "y"}

---
## set_grid_helper
```python
from axis_artist import set_grid_helper
```

Set grid helper.

Parameters
----------
grid_helper : `.GridHelperBase` subclass

---
## LABELPAD
```python
from axis_artist import LABELPAD
```



---
## set_ticklabel_direction
```python
from axis_artist import set_ticklabel_direction
```

Adjust the direction of the tick labels.

Note that the *tick_direction*\s '+' and '-' are relative to the
direction of the increasing coordinate.

Parameters
----------
tick_direction : {"+", "-"}

---
## invert_ticklabel_direction
```python
from axis_artist import invert_ticklabel_direction
```



---
## set_axislabel_direction
```python
from axis_artist import set_axislabel_direction
```

Adjust the direction of the axis label.

Note that the *label_direction*\s '+' and '-' are relative to the
direction of the increasing coordinate.

Parameters
----------
label_direction : {"+", "-"}

---
## get_transform
```python
from axis_artist import get_transform
```



---
## get_helper
```python
from axis_artist import get_helper
```

Return axis artist helper instance.

---
## set_axisline_style
```python
from axis_artist import set_axisline_style
```

Set the axisline style.

The new style is completely defined by the passed attributes. Existing
style attributes are forgotten.

Parameters
----------
axisline_style : str or None
    The line style, e.g. '->', optionally followed by a comma-separated
    list of attributes. Alternatively, the attributes can be provided
    as keywords.

    If *None* this returns a string containing the available styles.

Examples
--------
The following two commands are equal:

>>> set_axisline_style("->,size=1.5")
>>> set_axisline_style("->", size=1.5)

---
## get_axisline_style
```python
from axis_artist import get_axisline_style
```

Return the current axisline style.

---
## _init_line
```python
from axis_artist import _init_line
```

Initialize the *line* artist that is responsible to draw the axis line.

---
## _draw_line
```python
from axis_artist import _draw_line
```



---
## _init_ticks
```python
from axis_artist import _init_ticks
```



---
## _get_tick_info
```python
from axis_artist import _get_tick_info
```

Return a pair of:

- list of locs and angles for ticks
- list of locs, angles and labels for ticklabels.

---
## _update_ticks
```python
from axis_artist import _update_ticks
```



---
## _draw_ticks
```python
from axis_artist import _draw_ticks
```



---
## _init_offsetText
```python
from axis_artist import _init_offsetText
```



---
## _update_offsetText
```python
from axis_artist import _update_offsetText
```



---
## _draw_offsetText
```python
from axis_artist import _draw_offsetText
```



---
## _init_label
```python
from axis_artist import _init_label
```



---
## _update_label
```python
from axis_artist import _update_label
```



---
## _draw_label
```python
from axis_artist import _draw_label
```



---
## set_label
```python
from axis_artist import set_label
```



---
## get_tightbbox
```python
from axis_artist import get_tightbbox
```



---
## toggle
```python
from axis_artist import toggle
```

Toggle visibility of ticks, ticklabels, and (axis) label.
To turn all off, ::

  axis.toggle(all=False)

To turn all off but ticks on ::

  axis.toggle(all=False, ticks=True)

To turn all on but (axis) label off ::

  axis.toggle(all=True, label=False)

---
## __name__
```python
from axisline_style import __name__
```

Provides classes to style the axis lines.

---
## _FancyAxislineStyle
```python
from axisline_style import _FancyAxislineStyle
```



---
## AxislineStyle
```python
from axisline_style import AxislineStyle
```

A container class which defines style classes for AxisArtists.

An instance of any axisline style class is a callable object,
whose call signature is ::

   __call__(self, axis_artist, path, transform)

When called, this should return an `.Artist` with the following methods::

  def set_path(self, path):
      # set the path for axisline.

  def set_line_mutation_scale(self, scale):
      # set the scale

  def draw(self, renderer):
      # draw

---
## SimpleArrow
```python
from axisline_style import SimpleArrow
```

A simple arrow.

---
## FilledArrow
```python
from axisline_style import FilledArrow
```

An arrow with a filled head.

---
## _Base
```python
from axisline_style import _Base
```



---
## __init__
```python
from axisline_style import __init__
```

Parameters
----------
size : float
    Size of the arrow as a fraction of the ticklabel size.
facecolor : :mpltype:`color`, default: :rc:`axes.edgecolor`
    Fill color.

    .. versionadded:: 3.7

---
## set_line_mutation_scale
```python
from axisline_style import set_line_mutation_scale
```



---
## _extend_path
```python
from axisline_style import _extend_path
```

Extend the path to make a room for drawing arrow.

---
## set_path
```python
from axisline_style import set_path
```



---
## draw
```python
from axisline_style import draw
```

Draw the axis line.
1) Transform the path to the display coordinate.
2) Extend the path to make a room for arrow.
3) Update the path of the FancyArrowPatch.
4) Draw.

---
## get_window_extent
```python
from axisline_style import get_window_extent
```



---
## __call__
```python
from axisline_style import __call__
```

Given the AxisArtist instance, and transform for the path (set_path
method), return the Matplotlib artist for drawing the axis line.

---
## new_line
```python
from axisline_style import new_line
```



---
## __name__
```python
from angle_helper import __name__
```



---
## select_step_degree
```python
from angle_helper import select_step_degree
```



---
## select_step_hour
```python
from angle_helper import select_step_hour
```



---
## select_step_sub
```python
from angle_helper import select_step_sub
```



---
## select_step
```python
from angle_helper import select_step
```



---
## select_step24
```python
from angle_helper import select_step24
```



---
## select_step360
```python
from angle_helper import select_step360
```



---
## LocatorBase
```python
from angle_helper import LocatorBase
```



---
## LocatorHMS
```python
from angle_helper import LocatorHMS
```



---
## LocatorHM
```python
from angle_helper import LocatorHM
```



---
## LocatorH
```python
from angle_helper import LocatorH
```



---
## LocatorDMS
```python
from angle_helper import LocatorDMS
```



---
## LocatorDM
```python
from angle_helper import LocatorDM
```



---
## LocatorD
```python
from angle_helper import LocatorD
```



---
## FormatterDMS
```python
from angle_helper import FormatterDMS
```



---
## FormatterHMS
```python
from angle_helper import FormatterHMS
```



---
## ExtremeFinderCycle
```python
from angle_helper import ExtremeFinderCycle
```



---
## __init__
```python
from angle_helper import __init__
```

This subclass handles the case where one or both coordinates should be
taken modulo 360, or be restricted to not exceed a specific range.

Parameters
----------
nx, ny : int
    The number of samples in each direction.

lon_cycle, lat_cycle : 360 or None
    If not None, values in the corresponding direction are taken modulo
    *lon_cycle* or *lat_cycle*; in theory this can be any number but
    the implementation actually assumes that it is 360 (if not None);
    other values give nonsensical results.

    This is done by "unwrapping" the transformed grid coordinates so
    that jumps are less than a half-cycle; then normalizing the span to
    no more than a full cycle.

    For example, if values are in the union of the [0, 2] and
    [358, 360] intervals (typically, angles measured modulo 360), the
    values in the second interval are normalized to [-2, 0] instead so
    that the values now cover [-2, 2].  If values are in a range of
    [5, 1000], this gets normalized to [5, 365].

lon_minmax, lat_minmax : (float, float) or None
    If not None, the computed bounding box is clipped to the given
    range in the corresponding direction.

---
## set_params
```python
from angle_helper import set_params
```



---
## __call__
```python
from angle_helper import __call__
```



---
## _get_number_fraction
```python
from angle_helper import _get_number_fraction
```



---
## __name__
```python
from grid_helper_curvelinear import __name__
```

An experimental support for curvilinear grid.

---
## _value_and_jacobian
```python
from grid_helper_curvelinear import _value_and_jacobian
```

Compute *func* and its derivatives along x and y at positions *xs*, *ys*,
while ensuring that finite difference calculations don't try to evaluate
values outside of *xlims*, *ylims*.

---
## FixedAxisArtistHelper
```python
from grid_helper_curvelinear import FixedAxisArtistHelper
```

Helper class for a fixed axis.

---
## FloatingAxisArtistHelper
```python
from grid_helper_curvelinear import FloatingAxisArtistHelper
```



---
## GridHelperCurveLinear
```python
from grid_helper_curvelinear import GridHelperCurveLinear
```



---
## __init__
```python
from grid_helper_curvelinear import __init__
```

Parameters
----------
aux_trans : `.Transform` or tuple[Callable, Callable]
    The transform from curved coordinates to rectilinear coordinate:
    either a `.Transform` instance (which provides also its inverse),
    or a pair of callables ``(trans, inv_trans)`` that define the
    transform and its inverse.  The callables should have signature::

        x_rect, y_rect = trans(x_curved, y_curved)
        x_curved, y_curved = inv_trans(x_rect, y_rect)

extreme_finder

grid_locator1, grid_locator2
    Grid locators for each axis.

tick_formatter1, tick_formatter2
    Tick formatters for each axis.

---
## update_lim
```python
from grid_helper_curvelinear import update_lim
```



---
## get_tick_transform
```python
from grid_helper_curvelinear import get_tick_transform
```



---
## get_tick_iterators
```python
from grid_helper_curvelinear import get_tick_iterators
```

tick_loc, tick_angle, tick_label, (optionally) tick_label

---
## set_extremes
```python
from grid_helper_curvelinear import set_extremes
```



---
## get_axislabel_transform
```python
from grid_helper_curvelinear import get_axislabel_transform
```



---
## get_axislabel_pos_angle
```python
from grid_helper_curvelinear import get_axislabel_pos_angle
```



---
## get_line_transform
```python
from grid_helper_curvelinear import get_line_transform
```



---
## get_line
```python
from grid_helper_curvelinear import get_line
```



---
## update_grid_finder
```python
from grid_helper_curvelinear import update_grid_finder
```



---
## new_fixed_axis
```python
from grid_helper_curvelinear import new_fixed_axis
```



---
## new_floating_axis
```python
from grid_helper_curvelinear import new_floating_axis
```



---
## _update_grid
```python
from grid_helper_curvelinear import _update_grid
```



---
## get_gridlines
```python
from grid_helper_curvelinear import get_gridlines
```



---
## get_tick_iterator
```python
from grid_helper_curvelinear import get_tick_iterator
```



---
## iter_major
```python
from grid_helper_curvelinear import iter_major
```



---
## trf_xy
```python
from grid_helper_curvelinear import trf_xy
```



---
## __name__
```python
from floating_axes import __name__
```

An experimental support for curvilinear grid.

---
## FloatingAxisArtistHelper
```python
from floating_axes import FloatingAxisArtistHelper
```



---
## FixedAxisArtistHelper
```python
from floating_axes import FixedAxisArtistHelper
```



---
## ExtremeFinderFixed
```python
from floating_axes import ExtremeFinderFixed
```



---
## GridHelperCurveLinear
```python
from floating_axes import GridHelperCurveLinear
```



---
## FloatingAxesBase
```python
from floating_axes import FloatingAxesBase
```



---
## __init__
```python
from floating_axes import __init__
```



---
## update_lim
```python
from floating_axes import update_lim
```



---
## get_tick_iterators
```python
from floating_axes import get_tick_iterators
```

tick_loc, tick_angle, tick_label, (optionally) tick_label

---
## get_line
```python
from floating_axes import get_line
```



---
## __call__
```python
from floating_axes import __call__
```



---
## get_data_boundary
```python
from floating_axes import get_data_boundary
```

Return v=0, nth=1.

---
## new_fixed_axis
```python
from floating_axes import new_fixed_axis
```



---
## _update_grid
```python
from floating_axes import _update_grid
```



---
## get_gridlines
```python
from floating_axes import get_gridlines
```



---
## _gen_axes_patch
```python
from floating_axes import _gen_axes_patch
```



---
## clear
```python
from floating_axes import clear
```



---
## adjust_axes_lim
```python
from floating_axes import adjust_axes_lim
```



---
## trf_xy
```python
from floating_axes import trf_xy
```



---
## f1
```python
from floating_axes import f1
```



---
## __name__
```python
from test_axes_grid1 import __name__
```



---
## test_divider_append_axes
```python
from test_axes_grid1 import test_divider_append_axes
```



---
## test_twin_axes_empty_and_removed
```python
from test_axes_grid1 import test_twin_axes_empty_and_removed
```



---
## test_twin_axes_both_with_units
```python
from test_axes_grid1 import test_twin_axes_both_with_units
```



---
## test_axesgrid_colorbar_log_smoketest
```python
from test_axes_grid1 import test_axesgrid_colorbar_log_smoketest
```



---
## test_inset_colorbar_tight_layout_smoketest
```python
from test_axes_grid1 import test_inset_colorbar_tight_layout_smoketest
```



---
## test_inset_locator
```python
from test_axes_grid1 import test_inset_locator
```



---
## test_inset_axes
```python
from test_axes_grid1 import test_inset_axes
```



---
## test_inset_axes_complete
```python
from test_axes_grid1 import test_inset_axes_complete
```



---
## test_inset_axes_tight
```python
from test_axes_grid1 import test_inset_axes_tight
```



---
## test_fill_facecolor
```python
from test_axes_grid1 import test_fill_facecolor
```



---
## test_zooming_with_inverted_axes
```python
from test_axes_grid1 import test_zooming_with_inverted_axes
```



---
## test_anchored_direction_arrows
```python
from test_axes_grid1 import test_anchored_direction_arrows
```



---
## test_anchored_direction_arrows_many_args
```python
from test_axes_grid1 import test_anchored_direction_arrows_many_args
```



---
## test_axes_locatable_position
```python
from test_axes_grid1 import test_axes_locatable_position
```



---
## test_image_grid_each_left_label_mode_all
```python
from test_axes_grid1 import test_image_grid_each_left_label_mode_all
```



---
## test_image_grid_single_bottom
```python
from test_axes_grid1 import test_image_grid_single_bottom
```



---
## test_image_grid_label_mode_invalid
```python
from test_axes_grid1 import test_image_grid_label_mode_invalid
```



---
## test_image_grid
```python
from test_axes_grid1 import test_image_grid
```



---
## test_gettightbbox
```python
from test_axes_grid1 import test_gettightbbox
```



---
## test_picking_callbacks_overlap
```python
from test_axes_grid1 import test_picking_callbacks_overlap
```

Test pick events on normal, host or parasite axes.

---
## test_anchored_artists
```python
from test_axes_grid1 import test_anchored_artists
```



---
## test_hbox_divider
```python
from test_axes_grid1 import test_hbox_divider
```



---
## test_vbox_divider
```python
from test_axes_grid1 import test_vbox_divider
```



---
## test_axes_class_tuple
```python
from test_axes_grid1 import test_axes_class_tuple
```



---
## test_grid_axes_lists
```python
from test_axes_grid1 import test_grid_axes_lists
```

Test Grid axes_all, axes_row and axes_column relationship.

---
## test_grid_axes_position
```python
from test_axes_grid1 import test_grid_axes_position
```

Test positioning of the axes in Grid.

---
## test_grid_errors
```python
from test_axes_grid1 import test_grid_errors
```



---
## test_divider_errors
```python
from test_axes_grid1 import test_divider_errors
```



---
## test_mark_inset_unstales_viewlim
```python
from test_axes_grid1 import test_mark_inset_unstales_viewlim
```



---
## test_auto_adjustable
```python
from test_axes_grid1 import test_auto_adjustable
```



---
## test_rgb_axes
```python
from test_axes_grid1 import test_rgb_axes
```



---
## test_insetposition
```python
from test_axes_grid1 import test_insetposition
```



---
## test_imagegrid_cbar_mode_edge
```python
from test_axes_grid1 import test_imagegrid_cbar_mode_edge
```



---
## test_imagegrid
```python
from test_axes_grid1 import test_imagegrid
```



---
## test_removal
```python
from test_axes_grid1 import test_removal
```



---
## test_anchored_locator_base_call
```python
from test_axes_grid1 import test_anchored_locator_base_call
```



---
## test_grid_with_axes_class_not_overriding_axis
```python
from test_axes_grid1 import test_grid_with_axes_class_not_overriding_axis
```



---
## on_pick
```python
from test_axes_grid1 import on_pick
```



---
## __name__
```python
from test_art3d import __name__
```



---
## test_scatter_3d_projection_conservation
```python
from test_art3d import test_scatter_3d_projection_conservation
```



---
## test_zordered_error
```python
from test_art3d import test_zordered_error
```



---
## __name__
```python
from test_legend3d import __name__
```



---
## test_legend_plot
```python
from test_legend3d import test_legend_plot
```



---
## test_legend_bar
```python
from test_legend3d import test_legend_bar
```



---
## test_fancy
```python
from test_legend3d import test_fancy
```



---
## test_linecollection_scaled_dashes
```python
from test_legend3d import test_linecollection_scaled_dashes
```



---
## test_handlerline3d
```python
from test_legend3d import test_handlerline3d
```



---
## test_contour_legend_elements
```python
from test_legend3d import test_contour_legend_elements
```



---
## test_contourf_legend_elements
```python
from test_legend3d import test_contourf_legend_elements
```



---
## test_legend_Poly3dCollection
```python
from test_legend3d import test_legend_Poly3dCollection
```



---
## __name__
```python
from test_axes3d import __name__
```



---
## plot_cuboid
```python
from test_axes3d import plot_cuboid
```



---
## test_invisible_axes
```python
from test_axes3d import test_invisible_axes
```



---
## test_grid_off
```python
from test_axes3d import test_grid_off
```



---
## test_invisible_ticks_axis
```python
from test_axes3d import test_invisible_ticks_axis
```



---
## test_axis_positions
```python
from test_axes3d import test_axis_positions
```



---
## test_aspects
```python
from test_axes3d import test_aspects
```



---
## test_aspects_adjust_box
```python
from test_axes3d import test_aspects_adjust_box
```



---
## test_axes3d_repr
```python
from test_axes3d import test_axes3d_repr
```



---
## test_axes3d_primary_views
```python
from test_axes3d import test_axes3d_primary_views
```



---
## test_bar3d
```python
from test_axes3d import test_bar3d
```



---
## test_bar3d_colors
```python
from test_axes3d import test_bar3d_colors
```



---
## test_bar3d_shaded
```python
from test_axes3d import test_bar3d_shaded
```



---
## test_bar3d_notshaded
```python
from test_axes3d import test_bar3d_notshaded
```



---
## test_bar3d_lightsource
```python
from test_axes3d import test_bar3d_lightsource
```



---
## test_contour3d
```python
from test_axes3d import test_contour3d
```



---
## test_contour3d_extend3d
```python
from test_axes3d import test_contour3d_extend3d
```



---
## test_contourf3d
```python
from test_axes3d import test_contourf3d
```



---
## test_contourf3d_fill
```python
from test_axes3d import test_contourf3d_fill
```



---
## test_contourf3d_extend
```python
from test_axes3d import test_contourf3d_extend
```



---
## test_tricontour
```python
from test_axes3d import test_tricontour
```



---
## test_contour3d_1d_input
```python
from test_axes3d import test_contour3d_1d_input
```



---
## test_lines3d
```python
from test_axes3d import test_lines3d
```



---
## test_plot_scalar
```python
from test_axes3d import test_plot_scalar
```



---
## test_invalid_line_data
```python
from test_axes3d import test_invalid_line_data
```



---
## test_mixedsubplots
```python
from test_axes3d import test_mixedsubplots
```



---
## test_tight_layout_text
```python
from test_axes3d import test_tight_layout_text
```



---
## test_scatter3d
```python
from test_axes3d import test_scatter3d
```



---
## test_scatter3d_color
```python
from test_axes3d import test_scatter3d_color
```



---
## test_scatter3d_linewidth
```python
from test_axes3d import test_scatter3d_linewidth
```



---
## test_scatter3d_linewidth_modification
```python
from test_axes3d import test_scatter3d_linewidth_modification
```



---
## test_scatter3d_modification
```python
from test_axes3d import test_scatter3d_modification
```



---
## test_scatter3d_sorting
```python
from test_axes3d import test_scatter3d_sorting
```

Test that marker properties are correctly sorted.

---
## test_marker_draw_order_data_reversed
```python
from test_axes3d import test_marker_draw_order_data_reversed
```

Test that the draw order does not depend on the data point order.

For the given viewing angle at azim=-50, the yellow marker should be in
front. For azim=130, the blue marker should be in front.

---
## test_marker_draw_order_view_rotated
```python
from test_axes3d import test_marker_draw_order_view_rotated
```

Test that the draw order changes with the direction.

If we rotate *azim* by 180 degrees and exchange the colors, the plot
plot should look the same again.

---
## test_plot_3d_from_2d
```python
from test_axes3d import test_plot_3d_from_2d
```



---
## test_surface3d
```python
from test_axes3d import test_surface3d
```



---
## test_surface3d_label_offset_tick_position
```python
from test_axes3d import test_surface3d_label_offset_tick_position
```



---
## test_surface3d_shaded
```python
from test_axes3d import test_surface3d_shaded
```



---
## test_surface3d_masked
```python
from test_axes3d import test_surface3d_masked
```



---
## test_plot_scatter_masks
```python
from test_axes3d import test_plot_scatter_masks
```



---
## test_plot_surface_None_arg
```python
from test_axes3d import test_plot_surface_None_arg
```



---
## test_surface3d_masked_strides
```python
from test_axes3d import test_surface3d_masked_strides
```



---
## test_text3d
```python
from test_axes3d import test_text3d
```



---
## test_text3d_modification
```python
from test_axes3d import test_text3d_modification
```



---
## test_trisurf3d
```python
from test_axes3d import test_trisurf3d
```



---
## test_trisurf3d_shaded
```python
from test_axes3d import test_trisurf3d_shaded
```



---
## test_wireframe3d
```python
from test_axes3d import test_wireframe3d
```



---
## test_wireframe3dzerocstride
```python
from test_axes3d import test_wireframe3dzerocstride
```



---
## test_wireframe3dzerorstride
```python
from test_axes3d import test_wireframe3dzerorstride
```



---
## test_wireframe3dzerostrideraises
```python
from test_axes3d import test_wireframe3dzerostrideraises
```



---
## test_mixedsamplesraises
```python
from test_axes3d import test_mixedsamplesraises
```



---
## test_quiver3d
```python
from test_axes3d import test_quiver3d
```



---
## test_quiver3d_empty
```python
from test_axes3d import test_quiver3d_empty
```



---
## test_quiver3d_masked
```python
from test_axes3d import test_quiver3d_masked
```



---
## test_quiver3d_colorcoded
```python
from test_axes3d import test_quiver3d_colorcoded
```



---
## test_patch_modification
```python
from test_axes3d import test_patch_modification
```



---
## test_patch_collection_modification
```python
from test_axes3d import test_patch_collection_modification
```



---
## test_poly3dcollection_verts_validation
```python
from test_axes3d import test_poly3dcollection_verts_validation
```



---
## test_poly3dcollection_closed
```python
from test_axes3d import test_poly3dcollection_closed
```



---
## test_poly_collection_2d_to_3d_empty
```python
from test_axes3d import test_poly_collection_2d_to_3d_empty
```



---
## test_poly3dcollection_alpha
```python
from test_axes3d import test_poly3dcollection_alpha
```



---
## test_add_collection3d_zs_array
```python
from test_axes3d import test_add_collection3d_zs_array
```



---
## test_add_collection3d_zs_scalar
```python
from test_axes3d import test_add_collection3d_zs_scalar
```



---
## test_line3dCollection_autoscaling
```python
from test_axes3d import test_line3dCollection_autoscaling
```



---
## test_poly3dCollection_autoscaling
```python
from test_axes3d import test_poly3dCollection_autoscaling
```



---
## test_axes3d_labelpad
```python
from test_axes3d import test_axes3d_labelpad
```



---
## test_axes3d_cla
```python
from test_axes3d import test_axes3d_cla
```



---
## test_axes3d_rotated
```python
from test_axes3d import test_axes3d_rotated
```



---
## test_plotsurface_1d_raises
```python
from test_axes3d import test_plotsurface_1d_raises
```



---
## _test_proj_make_M
```python
from test_axes3d import _test_proj_make_M
```



---
## test_proj_transform
```python
from test_axes3d import test_proj_transform
```



---
## _test_proj_draw_axes
```python
from test_axes3d import _test_proj_draw_axes
```



---
## test_proj_axes_cube
```python
from test_axes3d import test_proj_axes_cube
```



---
## test_proj_axes_cube_ortho
```python
from test_axes3d import test_proj_axes_cube_ortho
```



---
## test_world
```python
from test_axes3d import test_world
```



---
## test_autoscale
```python
from test_axes3d import test_autoscale
```



---
## test_unautoscale
```python
from test_axes3d import test_unautoscale
```



---
## test_axes3d_focal_length_checks
```python
from test_axes3d import test_axes3d_focal_length_checks
```



---
## test_axes3d_focal_length
```python
from test_axes3d import test_axes3d_focal_length
```



---
## test_axes3d_ortho
```python
from test_axes3d import test_axes3d_ortho
```



---
## test_axes3d_isometric
```python
from test_axes3d import test_axes3d_isometric
```



---
## test_invalid_axes_limits
```python
from test_axes3d import test_invalid_axes_limits
```



---
## TestVoxels
```python
from test_axes3d import TestVoxels
```



---
## test_line3d_set_get_data_3d
```python
from test_axes3d import test_line3d_set_get_data_3d
```



---
## test_inverted
```python
from test_axes3d import test_inverted
```



---
## test_inverted_cla
```python
from test_axes3d import test_inverted_cla
```



---
## test_ax3d_tickcolour
```python
from test_axes3d import test_ax3d_tickcolour
```



---
## test_ticklabel_format
```python
from test_axes3d import test_ticklabel_format
```



---
## test_quiver3D_smoke
```python
from test_axes3d import test_quiver3D_smoke
```



---
## test_minor_ticks
```python
from test_axes3d import test_minor_ticks
```



---
## test_errorbar3d_errorevery
```python
from test_axes3d import test_errorbar3d_errorevery
```

Tests errorevery functionality for 3D errorbars.

---
## test_errorbar3d
```python
from test_axes3d import test_errorbar3d
```

Tests limits, color styling, and legend for 3D errorbars.

---
## test_stem3d
```python
from test_axes3d import test_stem3d
```



---
## test_equal_box_aspect
```python
from test_axes3d import test_equal_box_aspect
```



---
## test_colorbar_pos
```python
from test_axes3d import test_colorbar_pos
```



---
## test_inverted_zaxis
```python
from test_axes3d import test_inverted_zaxis
```



---
## test_set_zlim
```python
from test_axes3d import test_set_zlim
```



---
## test_shared_view
```python
from test_axes3d import test_shared_view
```



---
## test_shared_axes_retick
```python
from test_axes3d import test_shared_axes_retick
```



---
## test_rotate
```python
from test_axes3d import test_rotate
```

Test rotating using the left mouse button.

---
## test_pan
```python
from test_axes3d import test_pan
```

Test mouse panning using the middle mouse button.

---
## test_toolbar_zoom_pan
```python
from test_axes3d import test_toolbar_zoom_pan
```



---
## test_scalarmap_update
```python
from test_axes3d import test_scalarmap_update
```



---
## test_subfigure_simple
```python
from test_axes3d import test_subfigure_simple
```



---
## test_computed_zorder
```python
from test_axes3d import test_computed_zorder
```



---
## test_format_coord
```python
from test_axes3d import test_format_coord
```



---
## test_get_axis_position
```python
from test_axes3d import test_get_axis_position
```



---
## test_margins
```python
from test_axes3d import test_margins
```



---
## test_margin_getters
```python
from test_axes3d import test_margin_getters
```



---
## test_margins_errors
```python
from test_axes3d import test_margins_errors
```



---
## test_text_3d
```python
from test_axes3d import test_text_3d
```



---
## test_draw_single_lines_from_Nx1
```python
from test_axes3d import test_draw_single_lines_from_Nx1
```



---
## test_pathpatch_3d
```python
from test_axes3d import test_pathpatch_3d
```



---
## test_scatter_spiral
```python
from test_axes3d import test_scatter_spiral
```



---
## test_Poly3DCollection_get_path
```python
from test_axes3d import test_Poly3DCollection_get_path
```



---
## test_Poly3DCollection_get_facecolor
```python
from test_axes3d import test_Poly3DCollection_get_facecolor
```



---
## test_Poly3DCollection_get_edgecolor
```python
from test_axes3d import test_Poly3DCollection_get_edgecolor
```



---
## test_view_init_vertical_axis
```python
from test_axes3d import test_view_init_vertical_axis
```

Test the actual projection, axis lines and ticks matches expected values.

Parameters
----------
vertical_axis : str
    Axis to align vertically.
proj_expected : ndarray
    Expected values from ax.get_proj().
axis_lines_expected : tuple of arrays
    Edgepoints of the axis line. Expected values retrieved according
    to ``ax.get_[xyz]axis().line.get_data()``.
tickdirs_expected : list of int
    indexes indicating which axis to create a tick line along.

---
## test_on_move_vertical_axis
```python
from test_axes3d import test_on_move_vertical_axis
```

Test vertical axis is respected when rotating the plot interactively.

---
## test_set_box_aspect_vertical_axis
```python
from test_axes3d import test_set_box_aspect_vertical_axis
```



---
## test_arc_pathpatch
```python
from test_axes3d import test_arc_pathpatch
```



---
## test_panecolor_rcparams
```python
from test_axes3d import test_panecolor_rcparams
```



---
## test_mutating_input_arrays_y_and_z
```python
from test_axes3d import test_mutating_input_arrays_y_and_z
```

Test to see if the `z` axis does not get mutated
after a call to `Axes3D.plot`

test cases came from GH#8990

---
## test_scatter_masked_color
```python
from test_axes3d import test_scatter_masked_color
```

Test color parameter usage with non-finite coordinate arrays.

GH#26236

---
## test_surface3d_zsort_inf
```python
from test_axes3d import test_surface3d_zsort_inf
```



---
## test_Poly3DCollection_init_value_error
```python
from test_axes3d import test_Poly3DCollection_init_value_error
```



---
## test_ndarray_color_kwargs_value_error
```python
from test_axes3d import test_ndarray_color_kwargs_value_error
```



---
## f
```python
from test_axes3d import f
```



---
## test_simple
```python
from test_axes3d import test_simple
```



---
## test_edge_style
```python
from test_axes3d import test_edge_style
```



---
## test_named_colors
```python
from test_axes3d import test_named_colors
```

Test with colors set to a 3D object array of strings.

---
## test_rgb_data
```python
from test_axes3d import test_rgb_data
```

Test with colors set to a 4d float array of rgb data.

---
## test_alpha
```python
from test_axes3d import test_alpha
```



---
## test_xyz
```python
from test_axes3d import test_xyz
```



---
## test_calling_conventions
```python
from test_axes3d import test_calling_conventions
```



---
## get_formatters
```python
from test_axes3d import get_formatters
```



---
## convert_lim
```python
from test_axes3d import convert_lim
```

Convert min/max limits to center and range.

---
## midpoints
```python
from test_axes3d import midpoints
```



---
## __name__
```python
from test_axis_artist import __name__
```



---
## test_ticks
```python
from test_axis_artist import test_ticks
```



---
## test_labelbase
```python
from test_axis_artist import test_labelbase
```



---
## test_ticklabels
```python
from test_axis_artist import test_ticklabels
```



---
## test_axis_artist
```python
from test_axis_artist import test_axis_artist
```



---
## __name__
```python
from test_grid_finder import __name__
```



---
## test_find_line_box_crossings
```python
from test_grid_finder import test_find_line_box_crossings
```



---
## test_pretty_print_format
```python
from test_grid_finder import test_pretty_print_format
```



---
## __name__
```python
from test_angle_helper import __name__
```



---
## dms2float
```python
from test_angle_helper import dms2float
```



---
## test_select_step
```python
from test_angle_helper import test_select_step
```



---
## test_select_step24
```python
from test_angle_helper import test_select_step24
```



---
## test_select_step360
```python
from test_angle_helper import test_select_step360
```



---
## test_formatters
```python
from test_angle_helper import test_formatters
```



---
## __name__
```python
from test_axislines import __name__
```



---
## test_SubplotZero
```python
from test_axislines import test_SubplotZero
```



---
## test_Subplot
```python
from test_axislines import test_Subplot
```



---
## test_Axes
```python
from test_axislines import test_Axes
```



---
## test_ParasiteAxesAuxTrans
```python
from test_axislines import test_ParasiteAxesAuxTrans
```



---
## test_axisline_style
```python
from test_axislines import test_axisline_style
```



---
## test_axisline_style_size_color
```python
from test_axislines import test_axisline_style_size_color
```



---
## test_axisline_style_tight
```python
from test_axislines import test_axisline_style_tight
```



---
## test_subplotzero_ylabel
```python
from test_axislines import test_subplotzero_ylabel
```



---
## __name__
```python
from test_grid_helper_curvelinear import __name__
```



---
## test_custom_transform
```python
from test_grid_helper_curvelinear import test_custom_transform
```



---
## test_polar_box
```python
from test_grid_helper_curvelinear import test_polar_box
```



---
## test_axis_direction
```python
from test_grid_helper_curvelinear import test_axis_direction
```



---
## MyTransform
```python
from test_grid_helper_curvelinear import MyTransform
```



---
## MyTransformInv
```python
from test_grid_helper_curvelinear import MyTransformInv
```



---
## __init__
```python
from test_grid_helper_curvelinear import __init__
```



---
## transform
```python
from test_grid_helper_curvelinear import transform
```



---
## transform_path
```python
from test_grid_helper_curvelinear import transform_path
```



---
## inverted
```python
from test_grid_helper_curvelinear import inverted
```



---
## __name__
```python
from test_floating_axes import __name__
```



---
## test_subplot
```python
from test_floating_axes import test_subplot
```



---
## test_curvelinear3
```python
from test_floating_axes import test_curvelinear3
```



---
## test_curvelinear4
```python
from test_floating_axes import test_curvelinear4
```



---
## test_axis_direction
```python
from test_floating_axes import test_axis_direction
```



---
## __name__
```python
from _pep440 import __name__
```

Utility to compare pep440 compatible version strings.

The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.

---
## Infinity
```python
from _pep440 import Infinity
```



---
## NegativeInfinity
```python
from _pep440 import NegativeInfinity
```



---
## parse
```python
from _pep440 import parse
```

Parse the given version string and return either a :class:`Version` object
or a :class:`LegacyVersion` object depending on if the given version is
a valid PEP 440 version or a legacy version.

---
## InvalidVersion
```python
from _pep440 import InvalidVersion
```

An invalid version was found, users should refer to PEP 440.

---
## _BaseVersion
```python
from _pep440 import _BaseVersion
```



---
## LegacyVersion
```python
from _pep440 import LegacyVersion
```



---
## _parse_version_parts
```python
from _pep440 import _parse_version_parts
```



---
## _legacy_cmpkey
```python
from _pep440 import _legacy_cmpkey
```



---
## Version
```python
from _pep440 import Version
```



---
## _parse_letter_version
```python
from _pep440 import _parse_letter_version
```



---
## _parse_local_version
```python
from _pep440 import _parse_local_version
```

Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").

---
## _cmpkey
```python
from _pep440 import _cmpkey
```



---
## __repr__
```python
from _pep440 import __repr__
```



---
## __hash__
```python
from _pep440 import __hash__
```



---
## __lt__
```python
from _pep440 import __lt__
```



---
## __le__
```python
from _pep440 import __le__
```



---
## __eq__
```python
from _pep440 import __eq__
```



---
## __ne__
```python
from _pep440 import __ne__
```



---
## __gt__
```python
from _pep440 import __gt__
```



---
## __ge__
```python
from _pep440 import __ge__
```



---
## __neg__
```python
from _pep440 import __neg__
```



---
## _compare
```python
from _pep440 import _compare
```



---
## __init__
```python
from _pep440 import __init__
```



---
## __str__
```python
from _pep440 import __str__
```



---
## public
```python
from _pep440 import public
```



---
## base_version
```python
from _pep440 import base_version
```



---
## local
```python
from _pep440 import local
```



---
## is_prerelease
```python
from _pep440 import is_prerelease
```



---
## is_postrelease
```python
from _pep440 import is_postrelease
```



---
## set_module
```python
from __init__ import set_module
```

Private decorator for overriding __module__ on a function or class.

Example usage::

    @set_module('numpy')
    def example():
        pass

    assert example.__module__ == 'numpy'

---
## __name__
```python
from _convertions import __name__
```

A set of methods retained from np.compat module that
are still used across codebase.

---
## asunicode
```python
from _convertions import asunicode
```



---
## asbytes
```python
from _convertions import asbytes
```



---
## ismethod
```python
from _inspect import ismethod
```

Return true if the object is an instance method.

Instance method objects provide these attributes:
    __doc__         documentation string
    __name__        name with which this method was defined
    im_class        class object in which this method belongs
    im_func         function object containing implementation of method
    im_self         instance to which this method is bound, or None

---
## isfunction
```python
from _inspect import isfunction
```

Return true if the object is a user-defined function.

Function objects provide these attributes:
    __doc__         documentation string
    __name__        name with which this function was defined
    func_code       code object containing compiled function bytecode
    func_defaults   tuple of any default values for arguments
    func_doc        (same as __doc__)
    func_globals    global namespace in which this function was defined
    func_name       (same as __name__)

---
## iscode
```python
from _inspect import iscode
```

Return true if the object is a code object.

Code objects provide these attributes:
    co_argcount     number of arguments (not including * or ** args)
    co_code         string of raw compiled bytecode
    co_consts       tuple of constants used in the bytecode
    co_filename     name of file in which this code object was created
    co_firstlineno  number of first line in Python source code
    co_flags        bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
    co_lnotab       encoded mapping of line numbers to bytecode indices
    co_name         name with which this code object was defined
    co_names        tuple of names of local variables
    co_nlocals      number of local variables
    co_stacksize    virtual machine stack space required
    co_varnames     tuple of names of arguments and local variables
    

---
## getargs
```python
from _inspect import getargs
```

Get information about the arguments accepted by a code object.

Three things are returned: (args, varargs, varkw), where 'args' is
a list of argument names (possibly containing nested lists), and
'varargs' and 'varkw' are the names of the * and ** arguments or None.

---
## getargspec
```python
from _inspect import getargspec
```

Get the names and default values of a function's arguments.

A tuple of four things is returned: (args, varargs, varkw, defaults).
'args' is a list of the argument names (it may contain nested lists).
'varargs' and 'varkw' are the names of the * and ** arguments or None.
'defaults' is an n-tuple of the default values of the last n arguments.

---
## getargvalues
```python
from _inspect import getargvalues
```

Get information about arguments passed into a particular frame.

A tuple of four things is returned: (args, varargs, varkw, locals).
'args' is a list of the argument names (it may contain nested lists).
'varargs' and 'varkw' are the names of the * and ** arguments or None.
'locals' is the locals dictionary of the given frame.

---
## joinseq
```python
from _inspect import joinseq
```



---
## strseq
```python
from _inspect import strseq
```

Recursively walk a sequence, stringifying each element.

    

---
## formatargspec
```python
from _inspect import formatargspec
```

Format an argument spec from the 4 values returned by getargspec.

The first four arguments are (args, varargs, varkw, defaults).  The
other four arguments are the corresponding optional formatting functions
that are called to turn names and values into strings.  The ninth
argument is an optional function to format the sequence of arguments.

---
## formatargvalues
```python
from _inspect import formatargvalues
```

Format an argument spec from the 4 values returned by getargvalues.

The first four arguments are (args, varargs, varkw, locals).  The
next four arguments are the corresponding optional formatting functions
that are called to turn names and values into strings.  The ninth
argument is an optional function to format the sequence of arguments.

---
## convert
```python
from _inspect import convert
```



---
## __name__
```python
from py3k import __name__
```

Python 3.X compatibility tools.

While this file was originally intended for Python 2 -> 3 transition,
it is now used to create a compatibility layer between different
minor versions of Python 3.

While the active version of numpy may not support a given version of python, we
allow downstream libraries to continue to use these shims for forward
compatibility with numpy while they transition their code to newer versions of
Python.

---
## asunicode
```python
from py3k import asunicode
```



---
## asbytes
```python
from py3k import asbytes
```



---
## asstr
```python
from py3k import asstr
```



---
## isfileobj
```python
from py3k import isfileobj
```



---
## open_latin1
```python
from py3k import open_latin1
```



---
## sixu
```python
from py3k import sixu
```



---
## getexception
```python
from py3k import getexception
```



---
## asbytes_nested
```python
from py3k import asbytes_nested
```



---
## asunicode_nested
```python
from py3k import asunicode_nested
```



---
## is_pathlib_path
```python
from py3k import is_pathlib_path
```

Check whether obj is a `pathlib.Path` object.

Prefer using ``isinstance(obj, os.PathLike)`` instead of this function.

---
## contextlib_nullcontext
```python
from py3k import contextlib_nullcontext
```

Context manager that does no additional processing.

Used as a stand-in for a normal context manager, when a particular
block of code is only sometimes used with a normal context manager:

cm = optional_cm if condition else nullcontext()
with cm:
    # Perform operation, using optional_cm if condition is True

.. note::
    Prefer using `contextlib.nullcontext` instead of this context manager.

---
## npy_load_module
```python
from py3k import npy_load_module
```

Load a module. Uses ``load_module`` which will be deprecated in python
3.12. An alternative that uses ``exec_module`` is in
numpy.distutils.misc_util.exec_mod_from_location

.. versionadded:: 1.11.2

Parameters
----------
name : str
    Full module name.
fn : str
    Path to module file.
info : tuple, optional
    Only here for backward compatibility with Python 2.*.

Returns
-------
mod : module

---
## __init__
```python
from py3k import __init__
```



---
## __enter__
```python
from py3k import __enter__
```



---
## __exit__
```python
from py3k import __exit__
```



---
## configuration
```python
from setup import configuration
```



---
## __name__
```python
from umath import __name__
```



---
## __name__
```python
from fromnumeric import __name__
```

Tests for :mod:`numpy.core.fromnumeric`.

---
## _wrapit
```python
from fromnumeric import _wrapit
```



---
## _wrapfunc
```python
from fromnumeric import _wrapfunc
```



---
## _wrapreduction
```python
from fromnumeric import _wrapreduction
```



---
## _take_dispatcher
```python
from fromnumeric import _take_dispatcher
```



---
## take
```python
from fromnumeric import take
```

Take elements from an array along an axis.

When axis is not None, this function does the same thing as "fancy"
indexing (indexing arrays using arrays); however, it can be easier to use
if you need elements along a given axis. A call such as
``np.take(arr, indices, axis=3)`` is equivalent to
``arr[:,:,:,indices,...]``.

Explained without fancy indexing, this is equivalent to the following use
of `ndindex`, which sets each of ``ii``, ``jj``, and ``kk`` to a tuple of
indices::

    Ni, Nk = a.shape[:axis], a.shape[axis+1:]
    Nj = indices.shape
    for ii in ndindex(Ni):
        for jj in ndindex(Nj):
            for kk in ndindex(Nk):
                out[ii + jj + kk] = a[ii + (indices[jj],) + kk]

Parameters
----------
a : array_like (Ni..., M, Nk...)
    The source array.
indices : array_like (Nj...)
    The indices of the values to extract.

    .. versionadded:: 1.8.0

    Also allow scalars for indices.
axis : int, optional
    The axis over which to select values. By default, the flattened
    input array is used.
out : ndarray, optional (Ni..., Nj..., Nk...)
    If provided, the result will be placed in this array. It should
    be of the appropriate shape and dtype. Note that `out` is always
    buffered if `mode='raise'`; use other modes for better performance.
mode : {'raise', 'wrap', 'clip'}, optional
    Specifies how out-of-bounds indices will behave.

    * 'raise' -- raise an error (default)
    * 'wrap' -- wrap around
    * 'clip' -- clip to the range

    'clip' mode means that all indices that are too large are replaced
    by the index that addresses the last element along that axis. Note
    that this disables indexing with negative numbers.

Returns
-------
out : ndarray (Ni..., Nj..., Nk...)
    The returned array has the same type as `a`.

See Also
--------
compress : Take elements using a boolean mask
ndarray.take : equivalent method
take_along_axis : Take elements by matching the array and the index arrays

Notes
-----

By eliminating the inner loop in the description above, and using `s_` to
build simple slice objects, `take` can be expressed  in terms of applying
fancy indexing to each 1-d slice::

    Ni, Nk = a.shape[:axis], a.shape[axis+1:]
    for ii in ndindex(Ni):
        for kk in ndindex(Nj):
            out[ii + s_[...,] + kk] = a[ii + s_[:,] + kk][indices]

For this reason, it is equivalent to (but faster than) the following use
of `apply_along_axis`::

    out = np.apply_along_axis(lambda a_1d: a_1d[indices], axis, a)

Examples
--------
>>> a = [4, 3, 5, 7, 6, 8]
>>> indices = [0, 1, 4]
>>> np.take(a, indices)
array([4, 3, 6])

In this example if `a` is an ndarray, "fancy" indexing can be used.

>>> a = np.array(a)
>>> a[indices]
array([4, 3, 6])

If `indices` is not one dimensional, the output also has these dimensions.

>>> np.take(a, [[0, 1], [2, 3]])
array([[4, 3],
       [5, 7]])

---
## _reshape_dispatcher
```python
from fromnumeric import _reshape_dispatcher
```



---
## reshape
```python
from fromnumeric import reshape
```

Gives a new shape to an array without changing its data.

Parameters
----------
a : array_like
    Array to be reshaped.
newshape : int or tuple of ints
    The new shape should be compatible with the original shape. If
    an integer, then the result will be a 1-D array of that length.
    One shape dimension can be -1. In this case, the value is
    inferred from the length of the array and remaining dimensions.
order : {'C', 'F', 'A'}, optional
    Read the elements of `a` using this index order, and place the
    elements into the reshaped array using this index order.  'C'
    means to read / write the elements using C-like index order,
    with the last axis index changing fastest, back to the first
    axis index changing slowest. 'F' means to read / write the
    elements using Fortran-like index order, with the first index
    changing fastest, and the last index changing slowest. Note that
    the 'C' and 'F' options take no account of the memory layout of
    the underlying array, and only refer to the order of indexing.
    'A' means to read / write the elements in Fortran-like index
    order if `a` is Fortran *contiguous* in memory, C-like order
    otherwise.

Returns
-------
reshaped_array : ndarray
    This will be a new view object if possible; otherwise, it will
    be a copy.  Note there is no guarantee of the *memory layout* (C- or
    Fortran- contiguous) of the returned array.

See Also
--------
ndarray.reshape : Equivalent method.

Notes
-----
It is not always possible to change the shape of an array without copying
the data.

The `order` keyword gives the index ordering both for *fetching* the values
from `a`, and then *placing* the values into the output array.
For example, let's say you have an array:

>>> a = np.arange(6).reshape((3, 2))
>>> a
array([[0, 1],
       [2, 3],
       [4, 5]])

You can think of reshaping as first raveling the array (using the given
index order), then inserting the elements from the raveled array into the
new array using the same kind of index ordering as was used for the
raveling.

>>> np.reshape(a, (2, 3)) # C-like index ordering
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.reshape(np.ravel(a), (2, 3)) # equivalent to C ravel then C reshape
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.reshape(a, (2, 3), order='F') # Fortran-like index ordering
array([[0, 4, 3],
       [2, 1, 5]])
>>> np.reshape(np.ravel(a, order='F'), (2, 3), order='F')
array([[0, 4, 3],
       [2, 1, 5]])

Examples
--------
>>> a = np.array([[1,2,3], [4,5,6]])
>>> np.reshape(a, 6)
array([1, 2, 3, 4, 5, 6])
>>> np.reshape(a, 6, order='F')
array([1, 4, 2, 5, 3, 6])

>>> np.reshape(a, (3,-1))       # the unspecified value is inferred to be 2
array([[1, 2],
       [3, 4],
       [5, 6]])

---
## _choose_dispatcher
```python
from fromnumeric import _choose_dispatcher
```



---
## choose
```python
from fromnumeric import choose
```

Construct an array from an index array and a list of arrays to choose from.

First of all, if confused or uncertain, definitely look at the Examples -
in its full generality, this function is less simple than it might
seem from the following code description (below ndi =
`numpy.lib.index_tricks`):

``np.choose(a,c) == np.array([c[a[I]][I] for I in ndi.ndindex(a.shape)])``.

But this omits some subtleties.  Here is a fully general summary:

Given an "index" array (`a`) of integers and a sequence of ``n`` arrays
(`choices`), `a` and each choice array are first broadcast, as necessary,
to arrays of a common shape; calling these *Ba* and *Bchoices[i], i =
0,...,n-1* we have that, necessarily, ``Ba.shape == Bchoices[i].shape``
for each ``i``.  Then, a new array with shape ``Ba.shape`` is created as
follows:

* if ``mode='raise'`` (the default), then, first of all, each element of
  ``a`` (and thus ``Ba``) must be in the range ``[0, n-1]``; now, suppose
  that ``i`` (in that range) is the value at the ``(j0, j1, ..., jm)``
  position in ``Ba`` - then the value at the same position in the new array
  is the value in ``Bchoices[i]`` at that same position;

* if ``mode='wrap'``, values in `a` (and thus `Ba`) may be any (signed)
  integer; modular arithmetic is used to map integers outside the range
  `[0, n-1]` back into that range; and then the new array is constructed
  as above;

* if ``mode='clip'``, values in `a` (and thus ``Ba``) may be any (signed)
  integer; negative integers are mapped to 0; values greater than ``n-1``
  are mapped to ``n-1``; and then the new array is constructed as above.

Parameters
----------
a : int array
    This array must contain integers in ``[0, n-1]``, where ``n`` is the
    number of choices, unless ``mode=wrap`` or ``mode=clip``, in which
    cases any integers are permissible.
choices : sequence of arrays
    Choice arrays. `a` and all of the choices must be broadcastable to the
    same shape.  If `choices` is itself an array (not recommended), then
    its outermost dimension (i.e., the one corresponding to
    ``choices.shape[0]``) is taken as defining the "sequence".
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and dtype. Note that `out` is always
    buffered if ``mode='raise'``; use other modes for better performance.
mode : {'raise' (default), 'wrap', 'clip'}, optional
    Specifies how indices outside ``[0, n-1]`` will be treated:

      * 'raise' : an exception is raised
      * 'wrap' : value becomes value mod ``n``
      * 'clip' : values < 0 are mapped to 0, values > n-1 are mapped to n-1

Returns
-------
merged_array : array
    The merged result.

Raises
------
ValueError: shape mismatch
    If `a` and each choice array are not all broadcastable to the same
    shape.

See Also
--------
ndarray.choose : equivalent method
numpy.take_along_axis : Preferable if `choices` is an array

Notes
-----
To reduce the chance of misinterpretation, even though the following
"abuse" is nominally supported, `choices` should neither be, nor be
thought of as, a single array, i.e., the outermost sequence-like container
should be either a list or a tuple.

Examples
--------

>>> choices = [[0, 1, 2, 3], [10, 11, 12, 13],
...   [20, 21, 22, 23], [30, 31, 32, 33]]
>>> np.choose([2, 3, 1, 0], choices
... # the first element of the result will be the first element of the
... # third (2+1) "array" in choices, namely, 20; the second element
... # will be the second element of the fourth (3+1) choice array, i.e.,
... # 31, etc.
... )
array([20, 31, 12,  3])
>>> np.choose([2, 4, 1, 0], choices, mode='clip') # 4 goes to 3 (4-1)
array([20, 31, 12,  3])
>>> # because there are 4 choice arrays
>>> np.choose([2, 4, 1, 0], choices, mode='wrap') # 4 goes to (4 mod 4)
array([20,  1, 12,  3])
>>> # i.e., 0

A couple examples illustrating how choose broadcasts:

>>> a = [[1, 0, 1], [0, 1, 0], [1, 0, 1]]
>>> choices = [-10, 10]
>>> np.choose(a, choices)
array([[ 10, -10,  10],
       [-10,  10, -10],
       [ 10, -10,  10]])

>>> # With thanks to Anne Archibald
>>> a = np.array([0, 1]).reshape((2,1,1))
>>> c1 = np.array([1, 2, 3]).reshape((1,3,1))
>>> c2 = np.array([-1, -2, -3, -4, -5]).reshape((1,1,5))
>>> np.choose(a, (c1, c2)) # result is 2x3x5, res[0,:,:]=c1, res[1,:,:]=c2
array([[[ 1,  1,  1,  1,  1],
        [ 2,  2,  2,  2,  2],
        [ 3,  3,  3,  3,  3]],
       [[-1, -2, -3, -4, -5],
        [-1, -2, -3, -4, -5],
        [-1, -2, -3, -4, -5]]])

---
## _repeat_dispatcher
```python
from fromnumeric import _repeat_dispatcher
```



---
## repeat
```python
from fromnumeric import repeat
```

Repeat each element of an array after themselves

Parameters
----------
a : array_like
    Input array.
repeats : int or array of ints
    The number of repetitions for each element.  `repeats` is broadcasted
    to fit the shape of the given axis.
axis : int, optional
    The axis along which to repeat values.  By default, use the
    flattened input array, and return a flat output array.

Returns
-------
repeated_array : ndarray
    Output array which has the same shape as `a`, except along
    the given axis.

See Also
--------
tile : Tile an array.
unique : Find the unique elements of an array.

Examples
--------
>>> np.repeat(3, 4)
array([3, 3, 3, 3])
>>> x = np.array([[1,2],[3,4]])
>>> np.repeat(x, 2)
array([1, 1, 2, 2, 3, 3, 4, 4])
>>> np.repeat(x, 3, axis=1)
array([[1, 1, 1, 2, 2, 2],
       [3, 3, 3, 4, 4, 4]])
>>> np.repeat(x, [1, 2], axis=0)
array([[1, 2],
       [3, 4],
       [3, 4]])

---
## _put_dispatcher
```python
from fromnumeric import _put_dispatcher
```



---
## put
```python
from fromnumeric import put
```

Replaces specified elements of an array with given values.

The indexing works on the flattened target array. `put` is roughly
equivalent to:

::

    a.flat[ind] = v

Parameters
----------
a : ndarray
    Target array.
ind : array_like
    Target indices, interpreted as integers.
v : array_like
    Values to place in `a` at target indices. If `v` is shorter than
    `ind` it will be repeated as necessary.
mode : {'raise', 'wrap', 'clip'}, optional
    Specifies how out-of-bounds indices will behave.

    * 'raise' -- raise an error (default)
    * 'wrap' -- wrap around
    * 'clip' -- clip to the range

    'clip' mode means that all indices that are too large are replaced
    by the index that addresses the last element along that axis. Note
    that this disables indexing with negative numbers. In 'raise' mode,
    if an exception occurs the target array may still be modified.

See Also
--------
putmask, place
put_along_axis : Put elements by matching the array and the index arrays

Examples
--------
>>> a = np.arange(5)
>>> np.put(a, [0, 2], [-44, -55])
>>> a
array([-44,   1, -55,   3,   4])

>>> a = np.arange(5)
>>> np.put(a, 22, -5, mode='clip')
>>> a
array([ 0,  1,  2,  3, -5])

---
## _swapaxes_dispatcher
```python
from fromnumeric import _swapaxes_dispatcher
```



---
## swapaxes
```python
from fromnumeric import swapaxes
```

Interchange two axes of an array.

Parameters
----------
a : array_like
    Input array.
axis1 : int
    First axis.
axis2 : int
    Second axis.

Returns
-------
a_swapped : ndarray
    For NumPy >= 1.10.0, if `a` is an ndarray, then a view of `a` is
    returned; otherwise a new array is created. For earlier NumPy
    versions a view of `a` is returned only if the order of the
    axes is changed, otherwise the input array is returned.

Examples
--------
>>> x = np.array([[1,2,3]])
>>> np.swapaxes(x,0,1)
array([[1],
       [2],
       [3]])

>>> x = np.array([[[0,1],[2,3]],[[4,5],[6,7]]])
>>> x
array([[[0, 1],
        [2, 3]],
       [[4, 5],
        [6, 7]]])

>>> np.swapaxes(x,0,2)
array([[[0, 4],
        [2, 6]],
       [[1, 5],
        [3, 7]]])

---
## _transpose_dispatcher
```python
from fromnumeric import _transpose_dispatcher
```



---
## transpose
```python
from fromnumeric import transpose
```

Returns an array with axes transposed.

For a 1-D array, this returns an unchanged view of the original array, as a
transposed vector is simply the same vector.
To convert a 1-D array into a 2-D column vector, an additional dimension
must be added, e.g., ``np.atleast2d(a).T`` achieves this, as does
``a[:, np.newaxis]``.
For a 2-D array, this is the standard matrix transpose.
For an n-D array, if axes are given, their order indicates how the
axes are permuted (see Examples). If axes are not provided, then
``transpose(a).shape == a.shape[::-1]``.

Parameters
----------
a : array_like
    Input array.
axes : tuple or list of ints, optional
    If specified, it must be a tuple or list which contains a permutation
    of [0,1,...,N-1] where N is the number of axes of `a`. The `i`'th axis
    of the returned array will correspond to the axis numbered ``axes[i]``
    of the input. If not specified, defaults to ``range(a.ndim)[::-1]``,
    which reverses the order of the axes.

Returns
-------
p : ndarray
    `a` with its axes permuted. A view is returned whenever possible.

See Also
--------
ndarray.transpose : Equivalent method.
moveaxis : Move axes of an array to new positions.
argsort : Return the indices that would sort an array.

Notes
-----
Use ``transpose(a, argsort(axes))`` to invert the transposition of tensors
when using the `axes` keyword argument.

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> a
array([[1, 2],
       [3, 4]])
>>> np.transpose(a)
array([[1, 3],
       [2, 4]])

>>> a = np.array([1, 2, 3, 4])
>>> a
array([1, 2, 3, 4])
>>> np.transpose(a)
array([1, 2, 3, 4])

>>> a = np.ones((1, 2, 3))
>>> np.transpose(a, (1, 0, 2)).shape
(2, 1, 3)

>>> a = np.ones((2, 3, 4, 5))
>>> np.transpose(a).shape
(5, 4, 3, 2)

---
## _partition_dispatcher
```python
from fromnumeric import _partition_dispatcher
```



---
## partition
```python
from fromnumeric import partition
```

Return a partitioned copy of an array.

Creates a copy of the array with its elements rearranged in such a
way that the value of the element in k-th position is in the position
the value would be in a sorted array.  In the partitioned array, all
elements before the k-th element are less than or equal to that
element, and all the elements after the k-th element are greater than
or equal to that element.  The ordering of the elements in the two
partitions is undefined.

.. versionadded:: 1.8.0

Parameters
----------
a : array_like
    Array to be sorted.
kth : int or sequence of ints
    Element index to partition by. The k-th value of the element
    will be in its final sorted position and all smaller elements
    will be moved before it and all equal or greater elements behind
    it. The order of all elements in the partitions is undefined. If
    provided with a sequence of k-th it will partition all elements
    indexed by k-th  of them into their sorted position at once.

    .. deprecated:: 1.22.0
        Passing booleans as index is deprecated.
axis : int or None, optional
    Axis along which to sort. If None, the array is flattened before
    sorting. The default is -1, which sorts along the last axis.
kind : {'introselect'}, optional
    Selection algorithm. Default is 'introselect'.
order : str or list of str, optional
    When `a` is an array with fields defined, this argument
    specifies which fields to compare first, second, etc.  A single
    field can be specified as a string.  Not all fields need be
    specified, but unspecified fields will still be used, in the
    order in which they come up in the dtype, to break ties.

Returns
-------
partitioned_array : ndarray
    Array of the same type and shape as `a`.

See Also
--------
ndarray.partition : Method to sort an array in-place.
argpartition : Indirect partition.
sort : Full sorting

Notes
-----
The various selection algorithms are characterized by their average
speed, worst case performance, work space size, and whether they are
stable. A stable sort keeps items with the same key in the same
relative order. The available algorithms have the following
properties:

================= ======= ============= ============ =======
   kind            speed   worst case    work space  stable
================= ======= ============= ============ =======
'introselect'        1        O(n)           0         no
================= ======= ============= ============ =======

All the partition algorithms make temporary copies of the data when
partitioning along any but the last axis.  Consequently,
partitioning along the last axis is faster and uses less space than
partitioning along any other axis.

The sort order for complex numbers is lexicographic. If both the
real and imaginary parts are non-nan then the order is determined by
the real parts except when they are equal, in which case the order
is determined by the imaginary parts.

Examples
--------
>>> a = np.array([7, 1, 7, 7, 1, 5, 7, 2, 3, 2, 6, 2, 3, 0])
>>> p = np.partition(a, 4)
>>> p
array([0, 1, 2, 1, 2, 5, 2, 3, 3, 6, 7, 7, 7, 7])

``p[4]`` is 2;  all elements in ``p[:4]`` are less than or equal
to ``p[4]``, and all elements in ``p[5:]`` are greater than or
equal to ``p[4]``.  The partition is::

    [0, 1, 2, 1], [2], [5, 2, 3, 3, 6, 7, 7, 7, 7]

The next example shows the use of multiple values passed to `kth`.

>>> p2 = np.partition(a, (4, 8))
>>> p2
array([0, 1, 2, 1, 2, 3, 3, 2, 5, 6, 7, 7, 7, 7])

``p2[4]`` is 2  and ``p2[8]`` is 5.  All elements in ``p2[:4]``
are less than or equal to ``p2[4]``, all elements in ``p2[5:8]``
are greater than or equal to ``p2[4]`` and less than or equal to
``p2[8]``, and all elements in ``p2[9:]`` are greater than or
equal to ``p2[8]``.  The partition is::

    [0, 1, 2, 1], [2], [3, 3, 2], [5], [6, 7, 7, 7, 7]

---
## _argpartition_dispatcher
```python
from fromnumeric import _argpartition_dispatcher
```



---
## argpartition
```python
from fromnumeric import argpartition
```

Perform an indirect partition along the given axis using the
algorithm specified by the `kind` keyword. It returns an array of
indices of the same shape as `a` that index data along the given
axis in partitioned order.

.. versionadded:: 1.8.0

Parameters
----------
a : array_like
    Array to sort.
kth : int or sequence of ints
    Element index to partition by. The k-th element will be in its
    final sorted position and all smaller elements will be moved
    before it and all larger elements behind it. The order of all
    elements in the partitions is undefined. If provided with a
    sequence of k-th it will partition all of them into their sorted
    position at once.

    .. deprecated:: 1.22.0
        Passing booleans as index is deprecated.
axis : int or None, optional
    Axis along which to sort. The default is -1 (the last axis). If
    None, the flattened array is used.
kind : {'introselect'}, optional
    Selection algorithm. Default is 'introselect'
order : str or list of str, optional
    When `a` is an array with fields defined, this argument
    specifies which fields to compare first, second, etc. A single
    field can be specified as a string, and not all fields need be
    specified, but unspecified fields will still be used, in the
    order in which they come up in the dtype, to break ties.

Returns
-------
index_array : ndarray, int
    Array of indices that partition `a` along the specified axis.
    If `a` is one-dimensional, ``a[index_array]`` yields a partitioned `a`.
    More generally, ``np.take_along_axis(a, index_array, axis=axis)``
    always yields the partitioned `a`, irrespective of dimensionality.

See Also
--------
partition : Describes partition algorithms used.
ndarray.partition : Inplace partition.
argsort : Full indirect sort.
take_along_axis : Apply ``index_array`` from argpartition
                  to an array as if by calling partition.

Notes
-----
See `partition` for notes on the different selection algorithms.

Examples
--------
One dimensional array:

>>> x = np.array([3, 4, 2, 1])
>>> x[np.argpartition(x, 3)]
array([2, 1, 3, 4])
>>> x[np.argpartition(x, (1, 3))]
array([1, 2, 3, 4])

>>> x = [3, 4, 2, 1]
>>> np.array(x)[np.argpartition(x, 3)]
array([2, 1, 3, 4])

Multi-dimensional array:

>>> x = np.array([[3, 4, 2], [1, 3, 1]])
>>> index_array = np.argpartition(x, kth=1, axis=-1)
>>> np.take_along_axis(x, index_array, axis=-1)  # same as np.partition(x, kth=1)
array([[2, 3, 4],
       [1, 1, 3]])

---
## _sort_dispatcher
```python
from fromnumeric import _sort_dispatcher
```



---
## sort
```python
from fromnumeric import sort
```

Return a sorted copy of an array.

Parameters
----------
a : array_like
    Array to be sorted.
axis : int or None, optional
    Axis along which to sort. If None, the array is flattened before
    sorting. The default is -1, which sorts along the last axis.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
    Sorting algorithm. The default is 'quicksort'. Note that both 'stable'
    and 'mergesort' use timsort or radix sort under the covers and, in general,
    the actual implementation will vary with data type. The 'mergesort' option
    is retained for backwards compatibility.

    .. versionchanged:: 1.15.0.
       The 'stable' option was added.

order : str or list of str, optional
    When `a` is an array with fields defined, this argument specifies
    which fields to compare first, second, etc.  A single field can
    be specified as a string, and not all fields need be specified,
    but unspecified fields will still be used, in the order in which
    they come up in the dtype, to break ties.

Returns
-------
sorted_array : ndarray
    Array of the same type and shape as `a`.

See Also
--------
ndarray.sort : Method to sort an array in-place.
argsort : Indirect sort.
lexsort : Indirect stable sort on multiple keys.
searchsorted : Find elements in a sorted array.
partition : Partial sort.

Notes
-----
The various sorting algorithms are characterized by their average speed,
worst case performance, work space size, and whether they are stable. A
stable sort keeps items with the same key in the same relative
order. The four algorithms implemented in NumPy have the following
properties:

=========== ======= ============= ============ ========
   kind      speed   worst case    work space   stable
=========== ======= ============= ============ ========
'quicksort'    1     O(n^2)            0          no
'heapsort'     3     O(n*log(n))       0          no
'mergesort'    2     O(n*log(n))      ~n/2        yes
'timsort'      2     O(n*log(n))      ~n/2        yes
=========== ======= ============= ============ ========

.. note:: The datatype determines which of 'mergesort' or 'timsort'
   is actually used, even if 'mergesort' is specified. User selection
   at a finer scale is not currently available.

All the sort algorithms make temporary copies of the data when
sorting along any but the last axis.  Consequently, sorting along
the last axis is faster and uses less space than sorting along
any other axis.

The sort order for complex numbers is lexicographic. If both the real
and imaginary parts are non-nan then the order is determined by the
real parts except when they are equal, in which case the order is
determined by the imaginary parts.

Previous to numpy 1.4.0 sorting real and complex arrays containing nan
values led to undefined behaviour. In numpy versions >= 1.4.0 nan
values are sorted to the end. The extended sort order is:

  * Real: [R, nan]
  * Complex: [R + Rj, R + nanj, nan + Rj, nan + nanj]

where R is a non-nan real value. Complex values with the same nan
placements are sorted according to the non-nan part if it exists.
Non-nan values are sorted as before.

.. versionadded:: 1.12.0

quicksort has been changed to `introsort <https://en.wikipedia.org/wiki/Introsort>`_.
When sorting does not make enough progress it switches to
`heapsort <https://en.wikipedia.org/wiki/Heapsort>`_.
This implementation makes quicksort O(n*log(n)) in the worst case.

'stable' automatically chooses the best stable sorting algorithm
for the data type being sorted.
It, along with 'mergesort' is currently mapped to
`timsort <https://en.wikipedia.org/wiki/Timsort>`_
or `radix sort <https://en.wikipedia.org/wiki/Radix_sort>`_
depending on the data type.
API forward compatibility currently limits the
ability to select the implementation and it is hardwired for the different
data types.

.. versionadded:: 1.17.0

Timsort is added for better performance on already or nearly
sorted data. On random data timsort is almost identical to
mergesort. It is now used for stable sort while quicksort is still the
default sort if none is chosen. For timsort details, refer to
`CPython listsort.txt <https://github.com/python/cpython/blob/3.7/Objects/listsort.txt>`_.
'mergesort' and 'stable' are mapped to radix sort for integer data types. Radix sort is an
O(n) sort instead of O(n log n).

.. versionchanged:: 1.18.0

NaT now sorts to the end of arrays for consistency with NaN.

Examples
--------
>>> a = np.array([[1,4],[3,1]])
>>> np.sort(a)                # sort along the last axis
array([[1, 4],
       [1, 3]])
>>> np.sort(a, axis=None)     # sort the flattened array
array([1, 1, 3, 4])
>>> np.sort(a, axis=0)        # sort along the first axis
array([[1, 1],
       [3, 4]])

Use the `order` keyword to specify a field to use when sorting a
structured array:

>>> dtype = [('name', 'S10'), ('height', float), ('age', int)]
>>> values = [('Arthur', 1.8, 41), ('Lancelot', 1.9, 38),
...           ('Galahad', 1.7, 38)]
>>> a = np.array(values, dtype=dtype)       # create a structured array
>>> np.sort(a, order='height')                        # doctest: +SKIP
array([('Galahad', 1.7, 38), ('Arthur', 1.8, 41),
       ('Lancelot', 1.8999999999999999, 38)],
      dtype=[('name', '|S10'), ('height', '<f8'), ('age', '<i4')])

Sort by age, then height if ages are equal:

>>> np.sort(a, order=['age', 'height'])               # doctest: +SKIP
array([('Galahad', 1.7, 38), ('Lancelot', 1.8999999999999999, 38),
       ('Arthur', 1.8, 41)],
      dtype=[('name', '|S10'), ('height', '<f8'), ('age', '<i4')])

---
## _argsort_dispatcher
```python
from fromnumeric import _argsort_dispatcher
```



---
## argsort
```python
from fromnumeric import argsort
```

Returns the indices that would sort an array.

Perform an indirect sort along the given axis using the algorithm specified
by the `kind` keyword. It returns an array of indices of the same shape as
`a` that index data along the given axis in sorted order.

Parameters
----------
a : array_like
    Array to sort.
axis : int or None, optional
    Axis along which to sort.  The default is -1 (the last axis). If None,
    the flattened array is used.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
    Sorting algorithm. The default is 'quicksort'. Note that both 'stable'
    and 'mergesort' use timsort under the covers and, in general, the
    actual implementation will vary with data type. The 'mergesort' option
    is retained for backwards compatibility.

    .. versionchanged:: 1.15.0.
       The 'stable' option was added.
order : str or list of str, optional
    When `a` is an array with fields defined, this argument specifies
    which fields to compare first, second, etc.  A single field can
    be specified as a string, and not all fields need be specified,
    but unspecified fields will still be used, in the order in which
    they come up in the dtype, to break ties.

Returns
-------
index_array : ndarray, int
    Array of indices that sort `a` along the specified `axis`.
    If `a` is one-dimensional, ``a[index_array]`` yields a sorted `a`.
    More generally, ``np.take_along_axis(a, index_array, axis=axis)``
    always yields the sorted `a`, irrespective of dimensionality.

See Also
--------
sort : Describes sorting algorithms used.
lexsort : Indirect stable sort with multiple keys.
ndarray.sort : Inplace sort.
argpartition : Indirect partial sort.
take_along_axis : Apply ``index_array`` from argsort
                  to an array as if by calling sort.

Notes
-----
See `sort` for notes on the different sorting algorithms.

As of NumPy 1.4.0 `argsort` works with real/complex arrays containing
nan values. The enhanced sort order is documented in `sort`.

Examples
--------
One dimensional array:

>>> x = np.array([3, 1, 2])
>>> np.argsort(x)
array([1, 2, 0])

Two-dimensional array:

>>> x = np.array([[0, 3], [2, 2]])
>>> x
array([[0, 3],
       [2, 2]])

>>> ind = np.argsort(x, axis=0)  # sorts along first axis (down)
>>> ind
array([[0, 1],
       [1, 0]])
>>> np.take_along_axis(x, ind, axis=0)  # same as np.sort(x, axis=0)
array([[0, 2],
       [2, 3]])

>>> ind = np.argsort(x, axis=1)  # sorts along last axis (across)
>>> ind
array([[0, 1],
       [0, 1]])
>>> np.take_along_axis(x, ind, axis=1)  # same as np.sort(x, axis=1)
array([[0, 3],
       [2, 2]])

Indices of the sorted elements of a N-dimensional array:

>>> ind = np.unravel_index(np.argsort(x, axis=None), x.shape)
>>> ind
(array([0, 1, 1, 0]), array([0, 0, 1, 1]))
>>> x[ind]  # same as np.sort(x, axis=None)
array([0, 2, 2, 3])

Sorting with keys:

>>> x = np.array([(1, 0), (0, 1)], dtype=[('x', '<i4'), ('y', '<i4')])
>>> x
array([(1, 0), (0, 1)],
      dtype=[('x', '<i4'), ('y', '<i4')])

>>> np.argsort(x, order=('x','y'))
array([1, 0])

>>> np.argsort(x, order=('y','x'))
array([0, 1])

---
## _argmax_dispatcher
```python
from fromnumeric import _argmax_dispatcher
```



---
## argmax
```python
from fromnumeric import argmax
```

Returns the indices of the maximum values along an axis.

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    By default, the index is into the flattened array, otherwise
    along the specified axis.
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and dtype.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

    .. versionadded:: 1.22.0

Returns
-------
index_array : ndarray of ints
    Array of indices into the array. It has the same shape as `a.shape`
    with the dimension along `axis` removed. If `keepdims` is set to True,
    then the size of `axis` will be 1 with the resulting array having same
    shape as `a.shape`.

See Also
--------
ndarray.argmax, argmin
amax : The maximum value along a given axis.
unravel_index : Convert a flat index into an index tuple.
take_along_axis : Apply ``np.expand_dims(index_array, axis)``
                  from argmax to an array as if by calling max.

Notes
-----
In case of multiple occurrences of the maximum values, the indices
corresponding to the first occurrence are returned.

Examples
--------
>>> a = np.arange(6).reshape(2,3) + 10
>>> a
array([[10, 11, 12],
       [13, 14, 15]])
>>> np.argmax(a)
5
>>> np.argmax(a, axis=0)
array([1, 1, 1])
>>> np.argmax(a, axis=1)
array([2, 2])

Indexes of the maximal elements of a N-dimensional array:

>>> ind = np.unravel_index(np.argmax(a, axis=None), a.shape)
>>> ind
(1, 2)
>>> a[ind]
15

>>> b = np.arange(6)
>>> b[1] = 5
>>> b
array([0, 5, 2, 3, 4, 5])
>>> np.argmax(b)  # Only the first occurrence is returned.
1

>>> x = np.array([[4,2,3], [1,0,3]])
>>> index_array = np.argmax(x, axis=-1)
>>> # Same as np.amax(x, axis=-1, keepdims=True)
>>> np.take_along_axis(x, np.expand_dims(index_array, axis=-1), axis=-1)
array([[4],
       [3]])
>>> # Same as np.amax(x, axis=-1)
>>> np.take_along_axis(x, np.expand_dims(index_array, axis=-1), axis=-1).squeeze(axis=-1)
array([4, 3])

Setting `keepdims` to `True`,

>>> x = np.arange(24).reshape((2, 3, 4))
>>> res = np.argmax(x, axis=1, keepdims=True)
>>> res.shape
(2, 1, 4)

---
## _argmin_dispatcher
```python
from fromnumeric import _argmin_dispatcher
```



---
## argmin
```python
from fromnumeric import argmin
```

Returns the indices of the minimum values along an axis.

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    By default, the index is into the flattened array, otherwise
    along the specified axis.
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and dtype.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

    .. versionadded:: 1.22.0

Returns
-------
index_array : ndarray of ints
    Array of indices into the array. It has the same shape as `a.shape`
    with the dimension along `axis` removed. If `keepdims` is set to True,
    then the size of `axis` will be 1 with the resulting array having same
    shape as `a.shape`.

See Also
--------
ndarray.argmin, argmax
amin : The minimum value along a given axis.
unravel_index : Convert a flat index into an index tuple.
take_along_axis : Apply ``np.expand_dims(index_array, axis)``
                  from argmin to an array as if by calling min.

Notes
-----
In case of multiple occurrences of the minimum values, the indices
corresponding to the first occurrence are returned.

Examples
--------
>>> a = np.arange(6).reshape(2,3) + 10
>>> a
array([[10, 11, 12],
       [13, 14, 15]])
>>> np.argmin(a)
0
>>> np.argmin(a, axis=0)
array([0, 0, 0])
>>> np.argmin(a, axis=1)
array([0, 0])

Indices of the minimum elements of a N-dimensional array:

>>> ind = np.unravel_index(np.argmin(a, axis=None), a.shape)
>>> ind
(0, 0)
>>> a[ind]
10

>>> b = np.arange(6) + 10
>>> b[4] = 10
>>> b
array([10, 11, 12, 13, 10, 15])
>>> np.argmin(b)  # Only the first occurrence is returned.
0

>>> x = np.array([[4,2,3], [1,0,3]])
>>> index_array = np.argmin(x, axis=-1)
>>> # Same as np.amin(x, axis=-1, keepdims=True)
>>> np.take_along_axis(x, np.expand_dims(index_array, axis=-1), axis=-1)
array([[2],
       [0]])
>>> # Same as np.amax(x, axis=-1)
>>> np.take_along_axis(x, np.expand_dims(index_array, axis=-1), axis=-1).squeeze(axis=-1)
array([2, 0])

Setting `keepdims` to `True`,

>>> x = np.arange(24).reshape((2, 3, 4))
>>> res = np.argmin(x, axis=1, keepdims=True)
>>> res.shape
(2, 1, 4)

---
## _searchsorted_dispatcher
```python
from fromnumeric import _searchsorted_dispatcher
```



---
## searchsorted
```python
from fromnumeric import searchsorted
```

Find indices where elements should be inserted to maintain order.

Find the indices into a sorted array `a` such that, if the
corresponding elements in `v` were inserted before the indices, the
order of `a` would be preserved.

Assuming that `a` is sorted:

======  ============================
`side`  returned index `i` satisfies
======  ============================
left    ``a[i-1] < v <= a[i]``
right   ``a[i-1] <= v < a[i]``
======  ============================

Parameters
----------
a : 1-D array_like
    Input array. If `sorter` is None, then it must be sorted in
    ascending order, otherwise `sorter` must be an array of indices
    that sort it.
v : array_like
    Values to insert into `a`.
side : {'left', 'right'}, optional
    If 'left', the index of the first suitable location found is given.
    If 'right', return the last such index.  If there is no suitable
    index, return either 0 or N (where N is the length of `a`).
sorter : 1-D array_like, optional
    Optional array of integer indices that sort array a into ascending
    order. They are typically the result of argsort.

    .. versionadded:: 1.7.0

Returns
-------
indices : int or array of ints
    Array of insertion points with the same shape as `v`,
    or an integer if `v` is a scalar.

See Also
--------
sort : Return a sorted copy of an array.
histogram : Produce histogram from 1-D data.

Notes
-----
Binary search is used to find the required insertion points.

As of NumPy 1.4.0 `searchsorted` works with real/complex arrays containing
`nan` values. The enhanced sort order is documented in `sort`.

This function uses the same algorithm as the builtin python `bisect.bisect_left`
(``side='left'``) and `bisect.bisect_right` (``side='right'``) functions,
which is also vectorized in the `v` argument.

Examples
--------
>>> np.searchsorted([1,2,3,4,5], 3)
2
>>> np.searchsorted([1,2,3,4,5], 3, side='right')
3
>>> np.searchsorted([1,2,3,4,5], [-10, 10, 2, 3])
array([0, 5, 1, 2])

---
## _resize_dispatcher
```python
from fromnumeric import _resize_dispatcher
```



---
## resize
```python
from fromnumeric import resize
```

Return a new array with the specified shape.

If the new array is larger than the original array, then the new
array is filled with repeated copies of `a`.  Note that this behavior
is different from a.resize(new_shape) which fills with zeros instead
of repeated copies of `a`.

Parameters
----------
a : array_like
    Array to be resized.

new_shape : int or tuple of int
    Shape of resized array.

Returns
-------
reshaped_array : ndarray
    The new array is formed from the data in the old array, repeated
    if necessary to fill out the required number of elements.  The
    data are repeated iterating over the array in C-order.

See Also
--------
numpy.reshape : Reshape an array without changing the total size.
numpy.pad : Enlarge and pad an array.
numpy.repeat : Repeat elements of an array.
ndarray.resize : resize an array in-place.

Notes
-----
When the total size of the array does not change `~numpy.reshape` should
be used.  In most other cases either indexing (to reduce the size)
or padding (to increase the size) may be a more appropriate solution.

Warning: This functionality does **not** consider axes separately,
i.e. it does not apply interpolation/extrapolation.
It fills the return array with the required number of elements, iterating
over `a` in C-order, disregarding axes (and cycling back from the start if
the new shape is larger).  This functionality is therefore not suitable to
resize images, or data where each axis represents a separate and distinct
entity.

Examples
--------
>>> a=np.array([[0,1],[2,3]])
>>> np.resize(a,(2,3))
array([[0, 1, 2],
       [3, 0, 1]])
>>> np.resize(a,(1,4))
array([[0, 1, 2, 3]])
>>> np.resize(a,(2,4))
array([[0, 1, 2, 3],
       [0, 1, 2, 3]])

---
## _squeeze_dispatcher
```python
from fromnumeric import _squeeze_dispatcher
```



---
## squeeze
```python
from fromnumeric import squeeze
```

Remove axes of length one from `a`.

Parameters
----------
a : array_like
    Input data.
axis : None or int or tuple of ints, optional
    .. versionadded:: 1.7.0

    Selects a subset of the entries of length one in the
    shape. If an axis is selected with shape entry greater than
    one, an error is raised.

Returns
-------
squeezed : ndarray
    The input array, but with all or a subset of the
    dimensions of length 1 removed. This is always `a` itself
    or a view into `a`. Note that if all axes are squeezed,
    the result is a 0d array and not a scalar.

Raises
------
ValueError
    If `axis` is not None, and an axis being squeezed is not of length 1

See Also
--------
expand_dims : The inverse operation, adding entries of length one
reshape : Insert, remove, and combine dimensions, and resize existing ones

Examples
--------
>>> x = np.array([[[0], [1], [2]]])
>>> x.shape
(1, 3, 1)
>>> np.squeeze(x).shape
(3,)
>>> np.squeeze(x, axis=0).shape
(3, 1)
>>> np.squeeze(x, axis=1).shape
Traceback (most recent call last):
...
ValueError: cannot select an axis to squeeze out which has size not equal to one
>>> np.squeeze(x, axis=2).shape
(1, 3)
>>> x = np.array([[1234]])
>>> x.shape
(1, 1)
>>> np.squeeze(x)
array(1234)  # 0d array
>>> np.squeeze(x).shape
()
>>> np.squeeze(x)[()]
1234

---
## _diagonal_dispatcher
```python
from fromnumeric import _diagonal_dispatcher
```



---
## diagonal
```python
from fromnumeric import diagonal
```

Return specified diagonals.

If `a` is 2-D, returns the diagonal of `a` with the given offset,
i.e., the collection of elements of the form ``a[i, i+offset]``.  If
`a` has more than two dimensions, then the axes specified by `axis1`
and `axis2` are used to determine the 2-D sub-array whose diagonal is
returned.  The shape of the resulting array can be determined by
removing `axis1` and `axis2` and appending an index to the right equal
to the size of the resulting diagonals.

In versions of NumPy prior to 1.7, this function always returned a new,
independent array containing a copy of the values in the diagonal.

In NumPy 1.7 and 1.8, it continues to return a copy of the diagonal,
but depending on this fact is deprecated. Writing to the resulting
array continues to work as it used to, but a FutureWarning is issued.

Starting in NumPy 1.9 it returns a read-only view on the original array.
Attempting to write to the resulting array will produce an error.

In some future release, it will return a read/write view and writing to
the returned array will alter your original array.  The returned array
will have the same type as the input array.

If you don't write to the array returned by this function, then you can
just ignore all of the above.

If you depend on the current behavior, then we suggest copying the
returned array explicitly, i.e., use ``np.diagonal(a).copy()`` instead
of just ``np.diagonal(a)``. This will work with both past and future
versions of NumPy.

Parameters
----------
a : array_like
    Array from which the diagonals are taken.
offset : int, optional
    Offset of the diagonal from the main diagonal.  Can be positive or
    negative.  Defaults to main diagonal (0).
axis1 : int, optional
    Axis to be used as the first axis of the 2-D sub-arrays from which
    the diagonals should be taken.  Defaults to first axis (0).
axis2 : int, optional
    Axis to be used as the second axis of the 2-D sub-arrays from
    which the diagonals should be taken. Defaults to second axis (1).

Returns
-------
array_of_diagonals : ndarray
    If `a` is 2-D, then a 1-D array containing the diagonal and of the
    same type as `a` is returned unless `a` is a `matrix`, in which case
    a 1-D array rather than a (2-D) `matrix` is returned in order to
    maintain backward compatibility.

    If ``a.ndim > 2``, then the dimensions specified by `axis1` and `axis2`
    are removed, and a new axis inserted at the end corresponding to the
    diagonal.

Raises
------
ValueError
    If the dimension of `a` is less than 2.

See Also
--------
diag : MATLAB work-a-like for 1-D and 2-D arrays.
diagflat : Create diagonal arrays.
trace : Sum along diagonals.

Examples
--------
>>> a = np.arange(4).reshape(2,2)
>>> a
array([[0, 1],
       [2, 3]])
>>> a.diagonal()
array([0, 3])
>>> a.diagonal(1)
array([1])

A 3-D example:

>>> a = np.arange(8).reshape(2,2,2); a
array([[[0, 1],
        [2, 3]],
       [[4, 5],
        [6, 7]]])
>>> a.diagonal(0,  # Main diagonals of two arrays created by skipping
...            0,  # across the outer(left)-most axis last and
...            1)  # the "middle" (row) axis first.
array([[0, 6],
       [1, 7]])

The sub-arrays whose main diagonals we just obtained; note that each
corresponds to fixing the right-most (column) axis, and that the
diagonals are "packed" in rows.

>>> a[:,:,0]  # main diagonal is [0 6]
array([[0, 2],
       [4, 6]])
>>> a[:,:,1]  # main diagonal is [1 7]
array([[1, 3],
       [5, 7]])

The anti-diagonal can be obtained by reversing the order of elements
using either `numpy.flipud` or `numpy.fliplr`.

>>> a = np.arange(9).reshape(3, 3)
>>> a
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
>>> np.fliplr(a).diagonal()  # Horizontal flip
array([2, 4, 6])
>>> np.flipud(a).diagonal()  # Vertical flip
array([6, 4, 2])

Note that the order in which the diagonal is retrieved varies depending
on the flip function.

---
## _trace_dispatcher
```python
from fromnumeric import _trace_dispatcher
```



---
## trace
```python
from fromnumeric import trace
```

Return the sum along diagonals of the array.

If `a` is 2-D, the sum along its diagonal with the given offset
is returned, i.e., the sum of elements ``a[i,i+offset]`` for all i.

If `a` has more than two dimensions, then the axes specified by axis1 and
axis2 are used to determine the 2-D sub-arrays whose traces are returned.
The shape of the resulting array is the same as that of `a` with `axis1`
and `axis2` removed.

Parameters
----------
a : array_like
    Input array, from which the diagonals are taken.
offset : int, optional
    Offset of the diagonal from the main diagonal. Can be both positive
    and negative. Defaults to 0.
axis1, axis2 : int, optional
    Axes to be used as the first and second axis of the 2-D sub-arrays
    from which the diagonals should be taken. Defaults are the first two
    axes of `a`.
dtype : dtype, optional
    Determines the data-type of the returned array and of the accumulator
    where the elements are summed. If dtype has the value None and `a` is
    of integer type of precision less than the default integer
    precision, then the default integer precision is used. Otherwise,
    the precision is the same as that of `a`.
out : ndarray, optional
    Array into which the output is placed. Its type is preserved and
    it must be of the right shape to hold the output.

Returns
-------
sum_along_diagonals : ndarray
    If `a` is 2-D, the sum along the diagonal is returned.  If `a` has
    larger dimensions, then an array of sums along diagonals is returned.

See Also
--------
diag, diagonal, diagflat

Examples
--------
>>> np.trace(np.eye(3))
3.0
>>> a = np.arange(8).reshape((2,2,2))
>>> np.trace(a)
array([6, 8])

>>> a = np.arange(24).reshape((2,2,2,3))
>>> np.trace(a).shape
(2, 3)

---
## _ravel_dispatcher
```python
from fromnumeric import _ravel_dispatcher
```



---
## ravel
```python
from fromnumeric import ravel
```

Return a contiguous flattened array.

A 1-D array, containing the elements of the input, is returned.  A copy is
made only if needed.

As of NumPy 1.10, the returned array will have the same type as the input
array. (for example, a masked array will be returned for a masked array
input)

Parameters
----------
a : array_like
    Input array.  The elements in `a` are read in the order specified by
    `order`, and packed as a 1-D array.
order : {'C','F', 'A', 'K'}, optional

    The elements of `a` are read using this index order. 'C' means
    to index the elements in row-major, C-style order,
    with the last axis index changing fastest, back to the first
    axis index changing slowest.  'F' means to index the elements
    in column-major, Fortran-style order, with the
    first index changing fastest, and the last index changing
    slowest. Note that the 'C' and 'F' options take no account of
    the memory layout of the underlying array, and only refer to
    the order of axis indexing.  'A' means to read the elements in
    Fortran-like index order if `a` is Fortran *contiguous* in
    memory, C-like order otherwise.  'K' means to read the
    elements in the order they occur in memory, except for
    reversing the data when strides are negative.  By default, 'C'
    index order is used.

Returns
-------
y : array_like
    y is a contiguous 1-D array of the same subtype as `a`,
    with shape ``(a.size,)``.
    Note that matrices are special cased for backward compatibility,
    if `a` is a matrix, then y is a 1-D ndarray.

See Also
--------
ndarray.flat : 1-D iterator over an array.
ndarray.flatten : 1-D array copy of the elements of an array
                  in row-major order.
ndarray.reshape : Change the shape of an array without changing its data.

Notes
-----
In row-major, C-style order, in two dimensions, the row index
varies the slowest, and the column index the quickest.  This can
be generalized to multiple dimensions, where row-major order
implies that the index along the first axis varies slowest, and
the index along the last quickest.  The opposite holds for
column-major, Fortran-style index ordering.

When a view is desired in as many cases as possible, ``arr.reshape(-1)``
may be preferable. However, ``ravel`` supports ``K`` in the optional
``order`` argument while ``reshape`` does not.

Examples
--------
It is equivalent to ``reshape(-1, order=order)``.

>>> x = np.array([[1, 2, 3], [4, 5, 6]])
>>> np.ravel(x)
array([1, 2, 3, 4, 5, 6])

>>> x.reshape(-1)
array([1, 2, 3, 4, 5, 6])

>>> np.ravel(x, order='F')
array([1, 4, 2, 5, 3, 6])

When ``order`` is 'A', it will preserve the array's 'C' or 'F' ordering:

>>> np.ravel(x.T)
array([1, 4, 2, 5, 3, 6])
>>> np.ravel(x.T, order='A')
array([1, 2, 3, 4, 5, 6])

When ``order`` is 'K', it will preserve orderings that are neither 'C'
nor 'F', but won't reverse axes:

>>> a = np.arange(3)[::-1]; a
array([2, 1, 0])
>>> a.ravel(order='C')
array([2, 1, 0])
>>> a.ravel(order='K')
array([2, 1, 0])

>>> a = np.arange(12).reshape(2,3,2).swapaxes(1,2); a
array([[[ 0,  2,  4],
        [ 1,  3,  5]],
       [[ 6,  8, 10],
        [ 7,  9, 11]]])
>>> a.ravel(order='C')
array([ 0,  2,  4,  1,  3,  5,  6,  8, 10,  7,  9, 11])
>>> a.ravel(order='K')
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11])

---
## _nonzero_dispatcher
```python
from fromnumeric import _nonzero_dispatcher
```



---
## nonzero
```python
from fromnumeric import nonzero
```

Return the indices of the elements that are non-zero.

Returns a tuple of arrays, one for each dimension of `a`,
containing the indices of the non-zero elements in that
dimension. The values in `a` are always tested and returned in
row-major, C-style order.

To group the indices by element, rather than dimension, use `argwhere`,
which returns a row for each non-zero element.

.. note::

   When called on a zero-d array or scalar, ``nonzero(a)`` is treated
   as ``nonzero(atleast_1d(a))``.

   .. deprecated:: 1.17.0

      Use `atleast_1d` explicitly if this behavior is deliberate.

Parameters
----------
a : array_like
    Input array.

Returns
-------
tuple_of_arrays : tuple
    Indices of elements that are non-zero.

See Also
--------
flatnonzero :
    Return indices that are non-zero in the flattened version of the input
    array.
ndarray.nonzero :
    Equivalent ndarray method.
count_nonzero :
    Counts the number of non-zero elements in the input array.

Notes
-----
While the nonzero values can be obtained with ``a[nonzero(a)]``, it is
recommended to use ``x[x.astype(bool)]`` or ``x[x != 0]`` instead, which
will correctly handle 0-d arrays.

Examples
--------
>>> x = np.array([[3, 0, 0], [0, 4, 0], [5, 6, 0]])
>>> x
array([[3, 0, 0],
       [0, 4, 0],
       [5, 6, 0]])
>>> np.nonzero(x)
(array([0, 1, 2, 2]), array([0, 1, 0, 1]))

>>> x[np.nonzero(x)]
array([3, 4, 5, 6])
>>> np.transpose(np.nonzero(x))
array([[0, 0],
       [1, 1],
       [2, 0],
       [2, 1]])

A common use for ``nonzero`` is to find the indices of an array, where
a condition is True.  Given an array `a`, the condition `a` > 3 is a
boolean array and since False is interpreted as 0, np.nonzero(a > 3)
yields the indices of the `a` where the condition is true.

>>> a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
>>> a > 3
array([[False, False, False],
       [ True,  True,  True],
       [ True,  True,  True]])
>>> np.nonzero(a > 3)
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))

Using this result to index `a` is equivalent to using the mask directly:

>>> a[np.nonzero(a > 3)]
array([4, 5, 6, 7, 8, 9])
>>> a[a > 3]  # prefer this spelling
array([4, 5, 6, 7, 8, 9])

``nonzero`` can also be called as a method of the array.

>>> (a > 3).nonzero()
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))

---
## _shape_dispatcher
```python
from fromnumeric import _shape_dispatcher
```



---
## shape
```python
from fromnumeric import shape
```

Return the shape of an array.

Parameters
----------
a : array_like
    Input array.

Returns
-------
shape : tuple of ints
    The elements of the shape tuple give the lengths of the
    corresponding array dimensions.

See Also
--------
len : ``len(a)`` is equivalent to ``np.shape(a)[0]`` for N-D arrays with
      ``N>=1``.
ndarray.shape : Equivalent array method.

Examples
--------
>>> np.shape(np.eye(3))
(3, 3)
>>> np.shape([[1, 3]])
(1, 2)
>>> np.shape([0])
(1,)
>>> np.shape(0)
()

>>> a = np.array([(1, 2), (3, 4), (5, 6)],
...              dtype=[('x', 'i4'), ('y', 'i4')])
>>> np.shape(a)
(3,)
>>> a.shape
(3,)

---
## _compress_dispatcher
```python
from fromnumeric import _compress_dispatcher
```



---
## compress
```python
from fromnumeric import compress
```

Return selected slices of an array along given axis.

When working along a given axis, a slice along that axis is returned in
`output` for each index where `condition` evaluates to True. When
working on a 1-D array, `compress` is equivalent to `extract`.

Parameters
----------
condition : 1-D array of bools
    Array that selects which entries to return. If len(condition)
    is less than the size of `a` along the given axis, then output is
    truncated to the length of the condition array.
a : array_like
    Array from which to extract a part.
axis : int, optional
    Axis along which to take slices. If None (default), work on the
    flattened array.
out : ndarray, optional
    Output array.  Its type is preserved and it must be of the right
    shape to hold the output.

Returns
-------
compressed_array : ndarray
    A copy of `a` without the slices along axis for which `condition`
    is false.

See Also
--------
take, choose, diag, diagonal, select
ndarray.compress : Equivalent method in ndarray
extract : Equivalent method when working on 1-D arrays
:ref:`ufuncs-output-type`

Examples
--------
>>> a = np.array([[1, 2], [3, 4], [5, 6]])
>>> a
array([[1, 2],
       [3, 4],
       [5, 6]])
>>> np.compress([0, 1], a, axis=0)
array([[3, 4]])
>>> np.compress([False, True, True], a, axis=0)
array([[3, 4],
       [5, 6]])
>>> np.compress([False, True], a, axis=1)
array([[2],
       [4],
       [6]])

Working on the flattened array does not return slices along an axis but
selects elements.

>>> np.compress([False, True], a)
array([2])

---
## _clip_dispatcher
```python
from fromnumeric import _clip_dispatcher
```



---
## clip
```python
from fromnumeric import clip
```

Clip (limit) the values in an array.

Given an interval, values outside the interval are clipped to
the interval edges.  For example, if an interval of ``[0, 1]``
is specified, values smaller than 0 become 0, and values larger
than 1 become 1.

Equivalent to but faster than ``np.minimum(a_max, np.maximum(a, a_min))``.

No check is performed to ensure ``a_min < a_max``.

Parameters
----------
a : array_like
    Array containing elements to clip.
a_min, a_max : array_like or None
    Minimum and maximum value. If ``None``, clipping is not performed on
    the corresponding edge. Only one of `a_min` and `a_max` may be
    ``None``. Both are broadcast against `a`.
out : ndarray, optional
    The results will be placed in this array. It may be the input
    array for in-place clipping.  `out` must be of the right shape
    to hold the output.  Its type is preserved.
**kwargs
    For other keyword-only arguments, see the
    :ref:`ufunc docs <ufuncs.kwargs>`.

    .. versionadded:: 1.17.0

Returns
-------
clipped_array : ndarray
    An array with the elements of `a`, but where values
    < `a_min` are replaced with `a_min`, and those > `a_max`
    with `a_max`.

See Also
--------
:ref:`ufuncs-output-type`

Notes
-----
When `a_min` is greater than `a_max`, `clip` returns an
array in which all values are equal to `a_max`,
as shown in the second example.

Examples
--------
>>> a = np.arange(10)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> np.clip(a, 1, 8)
array([1, 1, 2, 3, 4, 5, 6, 7, 8, 8])
>>> np.clip(a, 8, 1)
array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
>>> np.clip(a, 3, 6, out=a)
array([3, 3, 3, 3, 4, 5, 6, 6, 6, 6])
>>> a
array([3, 3, 3, 3, 4, 5, 6, 6, 6, 6])
>>> a = np.arange(10)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> np.clip(a, [3, 4, 1, 1, 1, 4, 4, 4, 4, 4], 8)
array([3, 4, 2, 3, 4, 5, 6, 7, 8, 8])

---
## _sum_dispatcher
```python
from fromnumeric import _sum_dispatcher
```



---
## sum
```python
from fromnumeric import sum
```

Sum of array elements over a given axis.

Parameters
----------
a : array_like
    Elements to sum.
axis : None or int or tuple of ints, optional
    Axis or axes along which a sum is performed.  The default,
    axis=None, will sum all of the elements of the input array.  If
    axis is negative it counts from the last to the first axis.

    .. versionadded:: 1.7.0

    If axis is a tuple of ints, a sum is performed on all of the axes
    specified in the tuple instead of a single axis or all the axes as
    before.
dtype : dtype, optional
    The type of the returned array and of the accumulator in which the
    elements are summed.  The dtype of `a` is used by default unless `a`
    has an integer dtype of less precision than the default platform
    integer.  In that case, if `a` is signed then the platform integer
    is used while if `a` is unsigned then an unsigned integer of the
    same precision as the platform integer is used.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output, but the type of the output
    values will be cast if necessary.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `sum` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.
initial : scalar, optional
    Starting value for the sum. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.15.0

where : array_like of bool, optional
    Elements to include in the sum. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.17.0

Returns
-------
sum_along_axis : ndarray
    An array with the same shape as `a`, with the specified
    axis removed.   If `a` is a 0-d array, or if `axis` is None, a scalar
    is returned.  If an output array is specified, a reference to
    `out` is returned.

See Also
--------
ndarray.sum : Equivalent method.

add.reduce : Equivalent functionality of `add`.

cumsum : Cumulative sum of array elements.

trapz : Integration of array values using the composite trapezoidal rule.

mean, average

Notes
-----
Arithmetic is modular when using integer types, and no error is
raised on overflow.

The sum of an empty array is the neutral element 0:

>>> np.sum([])
0.0

For floating point numbers the numerical precision of sum (and
``np.add.reduce``) is in general limited by directly adding each number
individually to the result causing rounding errors in every step.
However, often numpy will use a  numerically better approach (partial
pairwise summation) leading to improved precision in many use-cases.
This improved precision is always provided when no ``axis`` is given.
When ``axis`` is given, it will depend on which axis is summed.
Technically, to provide the best speed possible, the improved precision
is only used when the summation is along the fast axis in memory.
Note that the exact precision may vary depending on other parameters.
In contrast to NumPy, Python's ``math.fsum`` function uses a slower but
more precise approach to summation.
Especially when summing a large number of lower precision floating point
numbers, such as ``float32``, numerical errors can become significant.
In such cases it can be advisable to use `dtype="float64"` to use a higher
precision for the output.

Examples
--------
>>> np.sum([0.5, 1.5])
2.0
>>> np.sum([0.5, 0.7, 0.2, 1.5], dtype=np.int32)
1
>>> np.sum([[0, 1], [0, 5]])
6
>>> np.sum([[0, 1], [0, 5]], axis=0)
array([0, 6])
>>> np.sum([[0, 1], [0, 5]], axis=1)
array([1, 5])
>>> np.sum([[0, 1], [np.nan, 5]], where=[False, True], axis=1)
array([1., 5.])

If the accumulator is too small, overflow occurs:

>>> np.ones(128, dtype=np.int8).sum(dtype=np.int8)
-128

You can also start the sum with a value other than zero:

>>> np.sum([10], initial=5)
15

---
## _any_dispatcher
```python
from fromnumeric import _any_dispatcher
```



---
## any
```python
from fromnumeric import any
```

Test whether any array element along a given axis evaluates to True.

Returns single boolean if `axis` is ``None``

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
axis : None or int or tuple of ints, optional
    Axis or axes along which a logical OR reduction is performed.
    The default (``axis=None``) is to perform a logical OR over all
    the dimensions of the input array. `axis` may be negative, in
    which case it counts from the last to the first axis.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, a reduction is performed on multiple
    axes, instead of a single axis or all the axes as before.
out : ndarray, optional
    Alternate output array in which to place the result.  It must have
    the same shape as the expected output and its type is preserved
    (e.g., if it is of type float, then it will remain so, returning
    1.0 for True and 0.0 for False, regardless of the type of `a`).
    See :ref:`ufuncs-output-type` for more details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `any` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

where : array_like of bool, optional
    Elements to include in checking for any `True` values.
    See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.20.0

Returns
-------
any : bool or ndarray
    A new boolean or `ndarray` is returned unless `out` is specified,
    in which case a reference to `out` is returned.

See Also
--------
ndarray.any : equivalent method

all : Test whether all elements along a given axis evaluate to True.

Notes
-----
Not a Number (NaN), positive infinity and negative infinity evaluate
to `True` because these are not equal to zero.

Examples
--------
>>> np.any([[True, False], [True, True]])
True

>>> np.any([[True, False], [False, False]], axis=0)
array([ True, False])

>>> np.any([-1, 0, 5])
True

>>> np.any(np.nan)
True

>>> np.any([[True, False], [False, False]], where=[[False], [True]])
False

>>> o=np.array(False)
>>> z=np.any([-1, 4, 5], out=o)
>>> z, o
(array(True), array(True))
>>> # Check now that z is a reference to o
>>> z is o
True
>>> id(z), id(o) # identity of z and o              # doctest: +SKIP
(191614240, 191614240)

---
## _all_dispatcher
```python
from fromnumeric import _all_dispatcher
```



---
## all
```python
from fromnumeric import all
```

Test whether all array elements along a given axis evaluate to True.

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
axis : None or int or tuple of ints, optional
    Axis or axes along which a logical AND reduction is performed.
    The default (``axis=None``) is to perform a logical AND over all
    the dimensions of the input array. `axis` may be negative, in
    which case it counts from the last to the first axis.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, a reduction is performed on multiple
    axes, instead of a single axis or all the axes as before.
out : ndarray, optional
    Alternate output array in which to place the result.
    It must have the same shape as the expected output and its
    type is preserved (e.g., if ``dtype(out)`` is float, the result
    will consist of 0.0's and 1.0's). See :ref:`ufuncs-output-type` for more
    details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `all` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

where : array_like of bool, optional
    Elements to include in checking for all `True` values.
    See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.20.0

Returns
-------
all : ndarray, bool
    A new boolean or array is returned unless `out` is specified,
    in which case a reference to `out` is returned.

See Also
--------
ndarray.all : equivalent method

any : Test whether any element along a given axis evaluates to True.

Notes
-----
Not a Number (NaN), positive infinity and negative infinity
evaluate to `True` because these are not equal to zero.

Examples
--------
>>> np.all([[True,False],[True,True]])
False

>>> np.all([[True,False],[True,True]], axis=0)
array([ True, False])

>>> np.all([-1, 4, 5])
True

>>> np.all([1.0, np.nan])
True

>>> np.all([[True, True], [False, True]], where=[[True], [False]])
True

>>> o=np.array(False)
>>> z=np.all([-1, 4, 5], out=o)
>>> id(z), id(o), z
(28293632, 28293632, array(True)) # may vary

---
## _cumsum_dispatcher
```python
from fromnumeric import _cumsum_dispatcher
```



---
## cumsum
```python
from fromnumeric import cumsum
```

Return the cumulative sum of the elements along a given axis.

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    Axis along which the cumulative sum is computed. The default
    (None) is to compute the cumsum over the flattened array.
dtype : dtype, optional
    Type of the returned array and of the accumulator in which the
    elements are summed.  If `dtype` is not specified, it defaults
    to the dtype of `a`, unless `a` has an integer dtype with a
    precision less than that of the default platform integer.  In
    that case, the default platform integer is used.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type will be cast if necessary. See :ref:`ufuncs-output-type` for
    more details.

Returns
-------
cumsum_along_axis : ndarray.
    A new array holding the result is returned unless `out` is
    specified, in which case a reference to `out` is returned. The
    result has the same size as `a`, and the same shape as `a` if
    `axis` is not None or `a` is a 1-d array.

See Also
--------
sum : Sum array elements.
trapz : Integration of array values using the composite trapezoidal rule.
diff : Calculate the n-th discrete difference along given axis.

Notes
-----
Arithmetic is modular when using integer types, and no error is
raised on overflow.

``cumsum(a)[-1]`` may not be equal to ``sum(a)`` for floating-point
values since ``sum`` may use a pairwise summation routine, reducing
the roundoff-error. See `sum` for more information.

Examples
--------
>>> a = np.array([[1,2,3], [4,5,6]])
>>> a
array([[1, 2, 3],
       [4, 5, 6]])
>>> np.cumsum(a)
array([ 1,  3,  6, 10, 15, 21])
>>> np.cumsum(a, dtype=float)     # specifies type of output value(s)
array([  1.,   3.,   6.,  10.,  15.,  21.])

>>> np.cumsum(a,axis=0)      # sum over rows for each of the 3 columns
array([[1, 2, 3],
       [5, 7, 9]])
>>> np.cumsum(a,axis=1)      # sum over columns for each of the 2 rows
array([[ 1,  3,  6],
       [ 4,  9, 15]])

``cumsum(b)[-1]`` may not be equal to ``sum(b)``

>>> b = np.array([1, 2e-9, 3e-9] * 1000000)
>>> b.cumsum()[-1]
1000000.0050045159
>>> b.sum()
1000000.0050000029

---
## _ptp_dispatcher
```python
from fromnumeric import _ptp_dispatcher
```



---
## ptp
```python
from fromnumeric import ptp
```

Range of values (maximum - minimum) along an axis.

The name of the function comes from the acronym for 'peak to peak'.

.. warning::
    `ptp` preserves the data type of the array. This means the
    return value for an input of signed integers with n bits
    (e.g. `np.int8`, `np.int16`, etc) is also a signed integer
    with n bits.  In that case, peak-to-peak values greater than
    ``2**(n-1)-1`` will be returned as negative values. An example
    with a work-around is shown below.

Parameters
----------
a : array_like
    Input values.
axis : None or int or tuple of ints, optional
    Axis along which to find the peaks.  By default, flatten the
    array.  `axis` may be negative, in
    which case it counts from the last to the first axis.

    .. versionadded:: 1.15.0

    If this is a tuple of ints, a reduction is performed on multiple
    axes, instead of a single axis or all the axes as before.
out : array_like
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output,
    but the type of the output values will be cast if necessary.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `ptp` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

Returns
-------
ptp : ndarray or scalar
    The range of a given array - `scalar` if array is one-dimensional
    or a new array holding the result along the given axis

Examples
--------
>>> x = np.array([[4, 9, 2, 10],
...               [6, 9, 7, 12]])

>>> np.ptp(x, axis=1)
array([8, 6])

>>> np.ptp(x, axis=0)
array([2, 0, 5, 2])

>>> np.ptp(x)
10

This example shows that a negative value can be returned when
the input is an array of signed integers.

>>> y = np.array([[1, 127],
...               [0, 127],
...               [-1, 127],
...               [-2, 127]], dtype=np.int8)
>>> np.ptp(y, axis=1)
array([ 126,  127, -128, -127], dtype=int8)

A work-around is to use the `view()` method to view the result as
unsigned integers with the same bit width:

>>> np.ptp(y, axis=1).view(np.uint8)
array([126, 127, 128, 129], dtype=uint8)

---
## _max_dispatcher
```python
from fromnumeric import _max_dispatcher
```



---
## max
```python
from fromnumeric import max
```

Return the maximum of an array or maximum along an axis.

Parameters
----------
a : array_like
    Input data.
axis : None or int or tuple of ints, optional
    Axis or axes along which to operate.  By default, flattened input is
    used.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, the maximum is selected over multiple axes,
    instead of a single axis or all the axes as before.
out : ndarray, optional
    Alternative output array in which to place the result.  Must
    be of the same shape and buffer length as the expected output.
    See :ref:`ufuncs-output-type` for more details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the ``max`` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

initial : scalar, optional
    The minimum value of an output element. Must be present to allow
    computation on empty slice. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.15.0

where : array_like of bool, optional
    Elements to compare for the maximum. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.17.0

Returns
-------
max : ndarray or scalar
    Maximum of `a`. If `axis` is None, the result is a scalar value.
    If `axis` is an int, the result is an array of dimension
    ``a.ndim - 1``. If `axis` is a tuple, the result is an array of 
    dimension ``a.ndim - len(axis)``.

See Also
--------
amin :
    The minimum value of an array along a given axis, propagating any NaNs.
nanmax :
    The maximum value of an array along a given axis, ignoring any NaNs.
maximum :
    Element-wise maximum of two arrays, propagating any NaNs.
fmax :
    Element-wise maximum of two arrays, ignoring any NaNs.
argmax :
    Return the indices of the maximum values.

nanmin, minimum, fmin

Notes
-----
NaN values are propagated, that is if at least one item is NaN, the
corresponding max value will be NaN as well. To ignore NaN values
(MATLAB behavior), please use nanmax.

Don't use `~numpy.max` for element-wise comparison of 2 arrays; when
``a.shape[0]`` is 2, ``maximum(a[0], a[1])`` is faster than
``max(a, axis=0)``.

Examples
--------
>>> a = np.arange(4).reshape((2,2))
>>> a
array([[0, 1],
       [2, 3]])
>>> np.max(a)           # Maximum of the flattened array
3
>>> np.max(a, axis=0)   # Maxima along the first axis
array([2, 3])
>>> np.max(a, axis=1)   # Maxima along the second axis
array([1, 3])
>>> np.max(a, where=[False, True], initial=-1, axis=0)
array([-1,  3])
>>> b = np.arange(5, dtype=float)
>>> b[2] = np.NaN
>>> np.max(b)
nan
>>> np.max(b, where=~np.isnan(b), initial=-1)
4.0
>>> np.nanmax(b)
4.0

You can use an initial value to compute the maximum of an empty slice, or
to initialize it to a different value:

>>> np.max([[-50], [10]], axis=-1, initial=0)
array([ 0, 10])

Notice that the initial value is used as one of the elements for which the
maximum is determined, unlike for the default argument Python's max
function, which is only used for empty iterables.

>>> np.max([5], initial=6)
6
>>> max([5], default=6)
5

---
## amax
```python
from fromnumeric import amax
```

Return the maximum of an array or maximum along an axis.

`amax` is an alias of `~numpy.max`.

See Also
--------
max : alias of this function
ndarray.max : equivalent method

---
## _min_dispatcher
```python
from fromnumeric import _min_dispatcher
```



---
## min
```python
from fromnumeric import min
```

Return the minimum of an array or minimum along an axis.

Parameters
----------
a : array_like
    Input data.
axis : None or int or tuple of ints, optional
    Axis or axes along which to operate.  By default, flattened input is
    used.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, the minimum is selected over multiple axes,
    instead of a single axis or all the axes as before.
out : ndarray, optional
    Alternative output array in which to place the result.  Must
    be of the same shape and buffer length as the expected output.
    See :ref:`ufuncs-output-type` for more details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the ``min`` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

initial : scalar, optional
    The maximum value of an output element. Must be present to allow
    computation on empty slice. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.15.0

where : array_like of bool, optional
    Elements to compare for the minimum. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.17.0

Returns
-------
min : ndarray or scalar
    Minimum of `a`. If `axis` is None, the result is a scalar value.
    If `axis` is an int, the result is an array of dimension
    ``a.ndim - 1``.  If `axis` is a tuple, the result is an array of 
    dimension ``a.ndim - len(axis)``.

See Also
--------
amax :
    The maximum value of an array along a given axis, propagating any NaNs.
nanmin :
    The minimum value of an array along a given axis, ignoring any NaNs.
minimum :
    Element-wise minimum of two arrays, propagating any NaNs.
fmin :
    Element-wise minimum of two arrays, ignoring any NaNs.
argmin :
    Return the indices of the minimum values.

nanmax, maximum, fmax

Notes
-----
NaN values are propagated, that is if at least one item is NaN, the
corresponding min value will be NaN as well. To ignore NaN values
(MATLAB behavior), please use nanmin.

Don't use `~numpy.min` for element-wise comparison of 2 arrays; when
``a.shape[0]`` is 2, ``minimum(a[0], a[1])`` is faster than
``min(a, axis=0)``.

Examples
--------
>>> a = np.arange(4).reshape((2,2))
>>> a
array([[0, 1],
       [2, 3]])
>>> np.min(a)           # Minimum of the flattened array
0
>>> np.min(a, axis=0)   # Minima along the first axis
array([0, 1])
>>> np.min(a, axis=1)   # Minima along the second axis
array([0, 2])
>>> np.min(a, where=[False, True], initial=10, axis=0)
array([10,  1])

>>> b = np.arange(5, dtype=float)
>>> b[2] = np.NaN
>>> np.min(b)
nan
>>> np.min(b, where=~np.isnan(b), initial=10)
0.0
>>> np.nanmin(b)
0.0

>>> np.min([[-50], [10]], axis=-1, initial=0)
array([-50,   0])

Notice that the initial value is used as one of the elements for which the
minimum is determined, unlike for the default argument Python's max
function, which is only used for empty iterables.

Notice that this isn't the same as Python's ``default`` argument.

>>> np.min([6], initial=5)
5
>>> min([6], default=5)
6

---
## amin
```python
from fromnumeric import amin
```

Return the minimum of an array or minimum along an axis.

`amin` is an alias of `~numpy.min`.

See Also
--------
min : alias of this function
ndarray.min : equivalent method

---
## _prod_dispatcher
```python
from fromnumeric import _prod_dispatcher
```



---
## prod
```python
from fromnumeric import prod
```

Return the product of array elements over a given axis.

Parameters
----------
a : array_like
    Input data.
axis : None or int or tuple of ints, optional
    Axis or axes along which a product is performed.  The default,
    axis=None, will calculate the product of all the elements in the
    input array. If axis is negative it counts from the last to the
    first axis.

    .. versionadded:: 1.7.0

    If axis is a tuple of ints, a product is performed on all of the
    axes specified in the tuple instead of a single axis or all the
    axes as before.
dtype : dtype, optional
    The type of the returned array, as well as of the accumulator in
    which the elements are multiplied.  The dtype of `a` is used by
    default unless `a` has an integer dtype of less precision than the
    default platform integer.  In that case, if `a` is signed then the
    platform integer is used while if `a` is unsigned then an unsigned
    integer of the same precision as the platform integer is used.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output, but the type of the output
    values will be cast if necessary.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left in the
    result as dimensions with size one. With this option, the result
    will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `prod` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.
initial : scalar, optional
    The starting value for this product. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.15.0

where : array_like of bool, optional
    Elements to include in the product. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.17.0

Returns
-------
product_along_axis : ndarray, see `dtype` parameter above.
    An array shaped as `a` but with the specified axis removed.
    Returns a reference to `out` if specified.

See Also
--------
ndarray.prod : equivalent method
:ref:`ufuncs-output-type`

Notes
-----
Arithmetic is modular when using integer types, and no error is
raised on overflow.  That means that, on a 32-bit platform:

>>> x = np.array([536870910, 536870910, 536870910, 536870910])
>>> np.prod(x)
16 # may vary

The product of an empty array is the neutral element 1:

>>> np.prod([])
1.0

Examples
--------
By default, calculate the product of all elements:

>>> np.prod([1.,2.])
2.0

Even when the input array is two-dimensional:

>>> a = np.array([[1., 2.], [3., 4.]])
>>> np.prod(a)
24.0

But we can also specify the axis over which to multiply:

>>> np.prod(a, axis=1)
array([  2.,  12.])
>>> np.prod(a, axis=0)
array([3., 8.])

Or select specific elements to include:

>>> np.prod([1., np.nan, 3.], where=[True, False, True])
3.0

If the type of `x` is unsigned, then the output type is
the unsigned platform integer:

>>> x = np.array([1, 2, 3], dtype=np.uint8)
>>> np.prod(x).dtype == np.uint
True

If `x` is of a signed integer type, then the output type
is the default platform integer:

>>> x = np.array([1, 2, 3], dtype=np.int8)
>>> np.prod(x).dtype == int
True

You can also start the product with a value other than one:

>>> np.prod([1, 2], initial=5)
10

---
## _cumprod_dispatcher
```python
from fromnumeric import _cumprod_dispatcher
```



---
## cumprod
```python
from fromnumeric import cumprod
```

Return the cumulative product of elements along a given axis.

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    Axis along which the cumulative product is computed.  By default
    the input is flattened.
dtype : dtype, optional
    Type of the returned array, as well as of the accumulator in which
    the elements are multiplied.  If *dtype* is not specified, it
    defaults to the dtype of `a`, unless `a` has an integer dtype with
    a precision less than that of the default platform integer.  In
    that case, the default platform integer is used instead.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type of the resulting values will be cast if necessary.

Returns
-------
cumprod : ndarray
    A new array holding the result is returned unless `out` is
    specified, in which case a reference to out is returned.

See Also
--------
:ref:`ufuncs-output-type`

Notes
-----
Arithmetic is modular when using integer types, and no error is
raised on overflow.

Examples
--------
>>> a = np.array([1,2,3])
>>> np.cumprod(a) # intermediate results 1, 1*2
...               # total product 1*2*3 = 6
array([1, 2, 6])
>>> a = np.array([[1, 2, 3], [4, 5, 6]])
>>> np.cumprod(a, dtype=float) # specify type of output
array([   1.,    2.,    6.,   24.,  120.,  720.])

The cumulative product for each column (i.e., over the rows) of `a`:

>>> np.cumprod(a, axis=0)
array([[ 1,  2,  3],
       [ 4, 10, 18]])

The cumulative product for each row (i.e. over the columns) of `a`:

>>> np.cumprod(a,axis=1)
array([[  1,   2,   6],
       [  4,  20, 120]])

---
## _ndim_dispatcher
```python
from fromnumeric import _ndim_dispatcher
```



---
## ndim
```python
from fromnumeric import ndim
```

Return the number of dimensions of an array.

Parameters
----------
a : array_like
    Input array.  If it is not already an ndarray, a conversion is
    attempted.

Returns
-------
number_of_dimensions : int
    The number of dimensions in `a`.  Scalars are zero-dimensional.

See Also
--------
ndarray.ndim : equivalent method
shape : dimensions of array
ndarray.shape : dimensions of array

Examples
--------
>>> np.ndim([[1,2,3],[4,5,6]])
2
>>> np.ndim(np.array([[1,2,3],[4,5,6]]))
2
>>> np.ndim(1)
0

---
## _size_dispatcher
```python
from fromnumeric import _size_dispatcher
```



---
## size
```python
from fromnumeric import size
```

Return the number of elements along a given axis.

Parameters
----------
a : array_like
    Input data.
axis : int, optional
    Axis along which the elements are counted.  By default, give
    the total number of elements.

Returns
-------
element_count : int
    Number of elements along the specified axis.

See Also
--------
shape : dimensions of array
ndarray.shape : dimensions of array
ndarray.size : number of elements in array

Examples
--------
>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2

---
## _round_dispatcher
```python
from fromnumeric import _round_dispatcher
```



---
## round
```python
from fromnumeric import round
```

Evenly round to the given number of decimals.

Parameters
----------
a : array_like
    Input data.
decimals : int, optional
    Number of decimal places to round to (default: 0).  If
    decimals is negative, it specifies the number of positions to
    the left of the decimal point.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output, but the type of the output
    values will be cast if necessary. See :ref:`ufuncs-output-type` for more
    details.

Returns
-------
rounded_array : ndarray
    An array of the same type as `a`, containing the rounded values.
    Unless `out` was specified, a new array is created.  A reference to
    the result is returned.

    The real and imaginary parts of complex numbers are rounded
    separately.  The result of rounding a float is a float.

See Also
--------
ndarray.round : equivalent method
around : an alias for this function
ceil, fix, floor, rint, trunc


Notes
-----
For values exactly halfway between rounded decimal values, NumPy
rounds to the nearest even value. Thus 1.5 and 2.5 round to 2.0,
-0.5 and 0.5 round to 0.0, etc.

``np.round`` uses a fast but sometimes inexact algorithm to round
floating-point datatypes. For positive `decimals` it is equivalent to
``np.true_divide(np.rint(a * 10**decimals), 10**decimals)``, which has
error due to the inexact representation of decimal fractions in the IEEE
floating point standard [1]_ and errors introduced when scaling by powers
of ten. For instance, note the extra "1" in the following:

    >>> np.round(56294995342131.5, 3)
    56294995342131.51

If your goal is to print such values with a fixed number of decimals, it is
preferable to use numpy's float printing routines to limit the number of
printed decimals:

    >>> np.format_float_positional(56294995342131.5, precision=3)
    '56294995342131.5'

The float printing routines use an accurate but much more computationally
demanding algorithm to compute the number of digits after the decimal
point.

Alternatively, Python's builtin `round` function uses a more accurate
but slower algorithm for 64-bit floating point values:

    >>> round(56294995342131.5, 3)
    56294995342131.5
    >>> np.round(16.055, 2), round(16.055, 2)  # equals 16.0549999999999997
    (16.06, 16.05)


References
----------
.. [1] "Lecture Notes on the Status of IEEE 754", William Kahan,
       https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF

Examples
--------
>>> np.round([0.37, 1.64])
array([0., 2.])
>>> np.round([0.37, 1.64], decimals=1)
array([0.4, 1.6])
>>> np.round([.5, 1.5, 2.5, 3.5, 4.5]) # rounds to nearest even value
array([0., 2., 2., 4., 4.])
>>> np.round([1,2,3,11], decimals=1) # ndarray of ints is returned
array([ 1,  2,  3, 11])
>>> np.round([1,2,3,11], decimals=-1)
array([ 0,  0,  0, 10])

---
## around
```python
from fromnumeric import around
```

Round an array to the given number of decimals.

`around` is an alias of `~numpy.round`.

See Also
--------
ndarray.round : equivalent method
round : alias for this function
ceil, fix, floor, rint, trunc

---
## _mean_dispatcher
```python
from fromnumeric import _mean_dispatcher
```



---
## mean
```python
from fromnumeric import mean
```

Compute the arithmetic mean along the specified axis.

Returns the average of the array elements.  The average is taken over
the flattened array by default, otherwise over the specified axis.
`float64` intermediate and return values are used for integer inputs.

Parameters
----------
a : array_like
    Array containing numbers whose mean is desired. If `a` is not an
    array, a conversion is attempted.
axis : None or int or tuple of ints, optional
    Axis or axes along which the means are computed. The default is to
    compute the mean of the flattened array.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, a mean is performed over multiple axes,
    instead of a single axis or all the axes as before.
dtype : data-type, optional
    Type to use in computing the mean.  For integer inputs, the default
    is `float64`; for floating point inputs, it is the same as the
    input dtype.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output, but the type will be cast if necessary.
    See :ref:`ufuncs-output-type` for more details.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `mean` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

where : array_like of bool, optional
    Elements to include in the mean. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.20.0

Returns
-------
m : ndarray, see dtype parameter above
    If `out=None`, returns a new array containing the mean values,
    otherwise a reference to the output array is returned.

See Also
--------
average : Weighted average
std, var, nanmean, nanstd, nanvar

Notes
-----
The arithmetic mean is the sum of the elements along the axis divided
by the number of elements.

Note that for floating-point input, the mean is computed using the
same precision the input has.  Depending on the input data, this can
cause the results to be inaccurate, especially for `float32` (see
example below).  Specifying a higher-precision accumulator using the
`dtype` keyword can alleviate this issue.

By default, `float16` results are computed using `float32` intermediates
for extra precision.

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> np.mean(a)
2.5
>>> np.mean(a, axis=0)
array([2., 3.])
>>> np.mean(a, axis=1)
array([1.5, 3.5])

In single precision, `mean` can be inaccurate:

>>> a = np.zeros((2, 512*512), dtype=np.float32)
>>> a[0, :] = 1.0
>>> a[1, :] = 0.1
>>> np.mean(a)
0.54999924

Computing the mean in float64 is more accurate:

>>> np.mean(a, dtype=np.float64)
0.55000000074505806 # may vary

Specifying a where argument:

>>> a = np.array([[5, 9, 13], [14, 10, 12], [11, 15, 19]])
>>> np.mean(a)
12.0
>>> np.mean(a, where=[[True], [False], [False]])
9.0

---
## _std_dispatcher
```python
from fromnumeric import _std_dispatcher
```



---
## std
```python
from fromnumeric import std
```

Compute the standard deviation along the specified axis.

Returns the standard deviation, a measure of the spread of a distribution,
of the array elements. The standard deviation is computed for the
flattened array by default, otherwise over the specified axis.

Parameters
----------
a : array_like
    Calculate the standard deviation of these values.
axis : None or int or tuple of ints, optional
    Axis or axes along which the standard deviation is computed. The
    default is to compute the standard deviation of the flattened array.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, a standard deviation is performed over
    multiple axes, instead of a single axis or all the axes as before.
dtype : dtype, optional
    Type to use in computing the standard deviation. For arrays of
    integer type the default is float64, for arrays of float types it is
    the same as the array type.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output but the type (of the calculated
    values) will be cast if necessary.
ddof : int, optional
    Means Delta Degrees of Freedom.  The divisor used in calculations
    is ``N - ddof``, where ``N`` represents the number of elements.
    By default `ddof` is zero.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `std` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

where : array_like of bool, optional
    Elements to include in the standard deviation.
    See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.20.0

Returns
-------
standard_deviation : ndarray, see dtype parameter above.
    If `out` is None, return a new array containing the standard deviation,
    otherwise return a reference to the output array.

See Also
--------
var, mean, nanmean, nanstd, nanvar
:ref:`ufuncs-output-type`

Notes
-----
The standard deviation is the square root of the average of the squared
deviations from the mean, i.e., ``std = sqrt(mean(x))``, where
``x = abs(a - a.mean())**2``.

The average squared deviation is typically calculated as ``x.sum() / N``,
where ``N = len(x)``. If, however, `ddof` is specified, the divisor
``N - ddof`` is used instead. In standard statistical practice, ``ddof=1``
provides an unbiased estimator of the variance of the infinite population.
``ddof=0`` provides a maximum likelihood estimate of the variance for
normally distributed variables. The standard deviation computed in this
function is the square root of the estimated variance, so even with
``ddof=1``, it will not be an unbiased estimate of the standard deviation
per se.

Note that, for complex numbers, `std` takes the absolute
value before squaring, so that the result is always real and nonnegative.

For floating-point input, the *std* is computed using the same
precision the input has. Depending on the input data, this can cause
the results to be inaccurate, especially for float32 (see example below).
Specifying a higher-accuracy accumulator using the `dtype` keyword can
alleviate this issue.

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> np.std(a)
1.1180339887498949 # may vary
>>> np.std(a, axis=0)
array([1.,  1.])
>>> np.std(a, axis=1)
array([0.5,  0.5])

In single precision, std() can be inaccurate:

>>> a = np.zeros((2, 512*512), dtype=np.float32)
>>> a[0, :] = 1.0
>>> a[1, :] = 0.1
>>> np.std(a)
0.45000005

Computing the standard deviation in float64 is more accurate:

>>> np.std(a, dtype=np.float64)
0.44999999925494177 # may vary

Specifying a where argument:

>>> a = np.array([[14, 8, 11, 10], [7, 9, 10, 11], [10, 15, 5, 10]])
>>> np.std(a)
2.614064523559687 # may vary
>>> np.std(a, where=[[True], [True], [False]])
2.0

---
## _var_dispatcher
```python
from fromnumeric import _var_dispatcher
```



---
## var
```python
from fromnumeric import var
```

Compute the variance along the specified axis.

Returns the variance of the array elements, a measure of the spread of a
distribution.  The variance is computed for the flattened array by
default, otherwise over the specified axis.

Parameters
----------
a : array_like
    Array containing numbers whose variance is desired.  If `a` is not an
    array, a conversion is attempted.
axis : None or int or tuple of ints, optional
    Axis or axes along which the variance is computed.  The default is to
    compute the variance of the flattened array.

    .. versionadded:: 1.7.0

    If this is a tuple of ints, a variance is performed over multiple axes,
    instead of a single axis or all the axes as before.
dtype : data-type, optional
    Type to use in computing the variance.  For arrays of integer type
    the default is `float64`; for arrays of float types it is the same as
    the array type.
out : ndarray, optional
    Alternate output array in which to place the result.  It must have
    the same shape as the expected output, but the type is cast if
    necessary.
ddof : int, optional
    "Delta Degrees of Freedom": the divisor used in the calculation is
    ``N - ddof``, where ``N`` represents the number of elements. By
    default `ddof` is zero.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    If the default value is passed, then `keepdims` will not be
    passed through to the `var` method of sub-classes of
    `ndarray`, however any non-default value will be.  If the
    sub-class' method does not implement `keepdims` any
    exceptions will be raised.

where : array_like of bool, optional
    Elements to include in the variance. See `~numpy.ufunc.reduce` for
    details.

    .. versionadded:: 1.20.0

Returns
-------
variance : ndarray, see dtype parameter above
    If ``out=None``, returns a new array containing the variance;
    otherwise, a reference to the output array is returned.

See Also
--------
std, mean, nanmean, nanstd, nanvar
:ref:`ufuncs-output-type`

Notes
-----
The variance is the average of the squared deviations from the mean,
i.e.,  ``var = mean(x)``, where ``x = abs(a - a.mean())**2``.

The mean is typically calculated as ``x.sum() / N``, where ``N = len(x)``.
If, however, `ddof` is specified, the divisor ``N - ddof`` is used
instead.  In standard statistical practice, ``ddof=1`` provides an
unbiased estimator of the variance of a hypothetical infinite population.
``ddof=0`` provides a maximum likelihood estimate of the variance for
normally distributed variables.

Note that for complex numbers, the absolute value is taken before
squaring, so that the result is always real and nonnegative.

For floating-point input, the variance is computed using the same
precision the input has.  Depending on the input data, this can cause
the results to be inaccurate, especially for `float32` (see example
below).  Specifying a higher-accuracy accumulator using the ``dtype``
keyword can alleviate this issue.

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> np.var(a)
1.25
>>> np.var(a, axis=0)
array([1.,  1.])
>>> np.var(a, axis=1)
array([0.25,  0.25])

In single precision, var() can be inaccurate:

>>> a = np.zeros((2, 512*512), dtype=np.float32)
>>> a[0, :] = 1.0
>>> a[1, :] = 0.1
>>> np.var(a)
0.20250003

Computing the variance in float64 is more accurate:

>>> np.var(a, dtype=np.float64)
0.20249999932944759 # may vary
>>> ((1-0.55)**2 + (0.1-0.55)**2)/2
0.2025

Specifying a where argument:

>>> a = np.array([[14, 8, 11, 10], [7, 9, 10, 11], [10, 15, 5, 10]])
>>> np.var(a)
6.833333333333333 # may vary
>>> np.var(a, where=[[True], [True], [False]])
4.0

---
## _round__dispatcher
```python
from fromnumeric import _round__dispatcher
```



---
## round_
```python
from fromnumeric import round_
```

Round an array to the given number of decimals.

`~numpy.round_` is a disrecommended backwards-compatibility
alias of `~numpy.around` and `~numpy.round`.

.. deprecated:: 1.25.0
    ``round_`` is deprecated as of NumPy 1.25.0, and will be
    removed in NumPy 2.0. Please use `round` instead.

See Also
--------
around : equivalent function; see for details.

---
## _product_dispatcher
```python
from fromnumeric import _product_dispatcher
```



---
## product
```python
from fromnumeric import product
```

Return the product of array elements over a given axis.

.. deprecated:: 1.25.0
    ``product`` is deprecated as of NumPy 1.25.0, and will be
    removed in NumPy 2.0. Please use `prod` instead.

See Also
--------
prod : equivalent function; see for details.

---
## _cumproduct_dispatcher
```python
from fromnumeric import _cumproduct_dispatcher
```



---
## cumproduct
```python
from fromnumeric import cumproduct
```

Return the cumulative product over the given axis.

.. deprecated:: 1.25.0
    ``cumproduct`` is deprecated as of NumPy 1.25.0, and will be
    removed in NumPy 2.0. Please use `cumprod` instead.

See Also
--------
cumprod : equivalent function; see for details.

---
## _sometrue_dispatcher
```python
from fromnumeric import _sometrue_dispatcher
```



---
## sometrue
```python
from fromnumeric import sometrue
```

Check whether some values are true.

Refer to `any` for full documentation.

.. deprecated:: 1.25.0
    ``sometrue`` is deprecated as of NumPy 1.25.0, and will be
    removed in NumPy 2.0. Please use `any` instead.

See Also
--------
any : equivalent function; see for details.

---
## _alltrue_dispatcher
```python
from fromnumeric import _alltrue_dispatcher
```



---
## alltrue
```python
from fromnumeric import alltrue
```

Check if all elements of input array are true.

.. deprecated:: 1.25.0
    ``alltrue`` is deprecated as of NumPy 1.25.0, and will be
    removed in NumPy 2.0. Please use `all` instead.

See Also
--------
numpy.all : Equivalent function; see for details.

---
## __name__
```python
from _dtype import __name__
```



---
## _kind_name
```python
from _dtype import _kind_name
```



---
## __str__
```python
from _dtype import __str__
```



---
## __repr__
```python
from _dtype import __repr__
```



---
## _unpack_field
```python
from _dtype import _unpack_field
```

Helper function to normalize the items in dtype.fields.

Call as:

dtype, offset, title = _unpack_field(*dtype.fields[name])

---
## _isunsized
```python
from _dtype import _isunsized
```



---
## _construction_repr
```python
from _dtype import _construction_repr
```

Creates a string repr of the dtype, excluding the 'dtype()' part
surrounding the object. This object may be a string, a list, or
a dict depending on the nature of the dtype. This
is the object passed as the first parameter to the dtype
constructor, and if no additional constructor parameters are
given, will reproduce the exact memory layout.

Parameters
----------
short : bool
    If true, this creates a shorter repr using 'kind' and 'itemsize', instead
    of the longer type name.

include_align : bool
    If true, this includes the 'align=True' parameter
    inside the struct dtype construction dict when needed. Use this flag
    if you want a proper repr string without the 'dtype()' part around it.

    If false, this does not preserve the
    'align=True' parameter or sticky NPY_ALIGNED_STRUCT flag for
    struct arrays like the regular repr does, because the 'align'
    flag is not part of first dtype constructor parameter. This
    mode is intended for a full 'repr', where the 'align=True' is
    provided as the second parameter.

---
## _scalar_str
```python
from _dtype import _scalar_str
```



---
## _byte_order_str
```python
from _dtype import _byte_order_str
```

Normalize byteorder to '<' or '>' 

---
## _datetime_metadata_str
```python
from _dtype import _datetime_metadata_str
```



---
## _struct_dict_str
```python
from _dtype import _struct_dict_str
```



---
## _aligned_offset
```python
from _dtype import _aligned_offset
```



---
## _is_packed
```python
from _dtype import _is_packed
```

Checks whether the structured data type in 'dtype'
has a simple layout, where all the fields are in order,
and follow each other with no alignment padding.

When this returns true, the dtype can be reconstructed
from a list of the field names and dtypes with no additional
dtype parameters.

Duplicates the C `is_dtype_struct_simple_unaligned_layout` function.

---
## _struct_list_str
```python
from _dtype import _struct_list_str
```



---
## _struct_str
```python
from _dtype import _struct_str
```



---
## _subarray_str
```python
from _dtype import _subarray_str
```



---
## _name_includes_bit_suffix
```python
from _dtype import _name_includes_bit_suffix
```



---
## _name_get
```python
from _dtype import _name_get
```



---
## __name__
```python
from _add_newdocs import __name__
```

This is only meant to add docs to objects defined in C-extension modules.
The purpose is to allow easier editing of the docstrings without
requiring a re-compile.

NOTE: Many of the methods of ndarray have corresponding functions.
      If you update these docstrings, please keep also the ones in
      core/fromnumeric.py, core/defmatrix.py up-to-date.

---
## refer_to_array_attribute
```python
from _add_newdocs import refer_to_array_attribute
```



---
## __name__
```python
from _methods import __name__
```

Array methods which are called by both the C-code for the method
and the Python code for the NumPy-namespace function

---
## _amax
```python
from _methods import _amax
```



---
## _amin
```python
from _methods import _amin
```



---
## _sum
```python
from _methods import _sum
```



---
## _prod
```python
from _methods import _prod
```



---
## _any
```python
from _methods import _any
```



---
## _all
```python
from _methods import _all
```



---
## _count_reduce_items
```python
from _methods import _count_reduce_items
```



---
## _clip
```python
from _methods import _clip
```



---
## _mean
```python
from _methods import _mean
```



---
## _var
```python
from _methods import _var
```



---
## _std
```python
from _methods import _std
```



---
## _ptp
```python
from _methods import _ptp
```



---
## _dump
```python
from _methods import _dump
```



---
## _dumps
```python
from _methods import _dumps
```



---
## __name__
```python
from _internal import __name__
```



---
## _makenames_list
```python
from _internal import _makenames_list
```



---
## _usefields
```python
from _internal import _usefields
```



---
## _array_descr
```python
from _internal import _array_descr
```



---
## _reconstruct
```python
from _internal import _reconstruct
```



---
## _commastring
```python
from _internal import _commastring
```



---
## dummy_ctype
```python
from _internal import dummy_ctype
```



---
## _getintp_ctype
```python
from _internal import _getintp_ctype
```



---
## _missing_ctypes
```python
from _internal import _missing_ctypes
```



---
## _ctypes
```python
from _internal import _ctypes
```



---
## _newnames
```python
from _internal import _newnames
```

Given a datatype and an order object, return a new names tuple, with the
order indicated

---
## _copy_fields
```python
from _internal import _copy_fields
```

Return copy of structured array with padding between fields removed.

Parameters
----------
ary : ndarray
   Structured array from which to remove padding bytes

Returns
-------
ary_copy : ndarray
   Copy of ary with padding bytes removed

---
## _promote_fields
```python
from _internal import _promote_fields
```

Perform type promotion for two structured dtypes.

Parameters
----------
dt1 : structured dtype
    First dtype.
dt2 : structured dtype
    Second dtype.

Returns
-------
out : dtype
    The promoted dtype

Notes
-----
If one of the inputs is aligned, the result will be.  The titles of
both descriptors must match (point to the same field).

---
## _getfield_is_safe
```python
from _internal import _getfield_is_safe
```

Checks safety of getfield for object arrays.

As in _view_is_safe, we need to check that memory containing objects is not
reinterpreted as a non-object datatype and vice versa.

Parameters
----------
oldtype : data-type
    Data type of the original ndarray.
newtype : data-type
    Data type of the field being accessed by ndarray.getfield
offset : int
    Offset of the field being accessed by ndarray.getfield

Raises
------
TypeError
    If the field access is invalid

---
## _view_is_safe
```python
from _internal import _view_is_safe
```

Checks safety of a view involving object arrays, for example when
doing::

    np.zeros(10, dtype=oldtype).view(newtype)

Parameters
----------
oldtype : data-type
    Data type of original ndarray
newtype : data-type
    Data type of the view

Raises
------
TypeError
    If the new type is incompatible with the old type.

---
## _Stream
```python
from _internal import _Stream
```



---
## _dtype_from_pep3118
```python
from _internal import _dtype_from_pep3118
```



---
## __dtype_from_pep3118
```python
from _internal import __dtype_from_pep3118
```



---
## _fix_names
```python
from _internal import _fix_names
```

Replace names which are None with the next unused f%d name 

---
## _add_trailing_padding
```python
from _internal import _add_trailing_padding
```

Inject the specified number of padding bytes at the end of a dtype

---
## _prod
```python
from _internal import _prod
```



---
## _gcd
```python
from _internal import _gcd
```

Calculate the greatest common divisor of a and b

---
## _lcm
```python
from _internal import _lcm
```



---
## array_ufunc_errmsg_formatter
```python
from _internal import array_ufunc_errmsg_formatter
```

Format the error message for when __array_ufunc__ gives up. 

---
## array_function_errmsg_formatter
```python
from _internal import array_function_errmsg_formatter
```

Format the error message for when __array_ufunc__ gives up. 

---
## _ufunc_doc_signature_formatter
```python
from _internal import _ufunc_doc_signature_formatter
```

Builds a signature string which resembles PEP 457

This is used to construct the first line of the docstring

---
## npy_ctypes_check
```python
from _internal import npy_ctypes_check
```



---
## __init__
```python
from _internal import __init__
```



---
## __mul__
```python
from _internal import __mul__
```



---
## __call__
```python
from _internal import __call__
```



---
## __eq__
```python
from _internal import __eq__
```



---
## __ne__
```python
from _internal import __ne__
```



---
## cast
```python
from _internal import cast
```



---
## c_void_p
```python
from _internal import c_void_p
```



---
## data_as
```python
from _internal import data_as
```

Return the data pointer cast to a particular c-types object.
For example, calling ``self._as_parameter_`` is equivalent to
``self.data_as(ctypes.c_void_p)``. Perhaps you want to use the data as a
pointer to a ctypes array of floating-point data:
``self.data_as(ctypes.POINTER(ctypes.c_double))``.

The returned pointer will keep a reference to the array.

---
## shape_as
```python
from _internal import shape_as
```

Return the shape tuple as an array of some other c-types
type. For example: ``self.shape_as(ctypes.c_short)``.

---
## strides_as
```python
from _internal import strides_as
```

Return the strides tuple as an array of some other
c-types type. For example: ``self.strides_as(ctypes.c_longlong)``.

---
## data
```python
from _internal import data
```

A pointer to the memory area of the array as a Python integer.
This memory area may contain data that is not aligned, or not in correct
byte-order. The memory area may not even be writeable. The array
flags and data-type of this array should be respected when passing this
attribute to arbitrary C-code to avoid trouble that can include Python
crashing. User Beware! The value of this attribute is exactly the same
as ``self._array_interface_['data'][0]``.

Note that unlike ``data_as``, a reference will not be kept to the array:
code like ``ctypes.c_void_p((a + b).ctypes.data)`` will result in a
pointer to a deallocated array, and should be spelt
``(a + b).ctypes.data_as(ctypes.c_void_p)``

---
## shape
```python
from _internal import shape
```

(c_intp*self.ndim): A ctypes array of length self.ndim where
the basetype is the C-integer corresponding to ``dtype('p')`` on this
platform (see `~numpy.ctypeslib.c_intp`). This base-type could be
`ctypes.c_int`, `ctypes.c_long`, or `ctypes.c_longlong` depending on
the platform. The ctypes array contains the shape of
the underlying array.

---
## strides
```python
from _internal import strides
```

(c_intp*self.ndim): A ctypes array of length self.ndim where
the basetype is the same as for the shape attribute. This ctypes array
contains the strides information from the underlying array. This strides
information is important for showing how many bytes must be jumped to
get to the next element in the array.

---
## _as_parameter_
```python
from _internal import _as_parameter_
```

Overrides the ctypes semi-magic method

Enables `c_func(some_array.ctypes)`

---
## get_data
```python
from _internal import get_data
```

Deprecated getter for the `_ctypes.data` property.

.. deprecated:: 1.21

---
## get_shape
```python
from _internal import get_shape
```

Deprecated getter for the `_ctypes.shape` property.

.. deprecated:: 1.21

---
## get_strides
```python
from _internal import get_strides
```

Deprecated getter for the `_ctypes.strides` property.

.. deprecated:: 1.21

---
## get_as_parameter
```python
from _internal import get_as_parameter
```

Deprecated getter for the `_ctypes._as_parameter_` property.

.. deprecated:: 1.21

---
## advance
```python
from _internal import advance
```



---
## consume
```python
from _internal import consume
```



---
## consume_until
```python
from _internal import consume_until
```



---
## next
```python
from _internal import next
```



---
## __bool__
```python
from _internal import __bool__
```



---
## __name__
```python
from _string_helpers import __name__
```

String-handling utilities to avoid locale-dependence.

Used primarily to generate type name aliases.

---
## english_lower
```python
from _string_helpers import english_lower
```

Apply English case rules to convert ASCII strings to all lower case.

This is an internal utility function to replace calls to str.lower() such
that we can avoid changing behavior with changing locales. In particular,
Turkish has distinct dotted and dotless variants of the Latin letter "I" in
both lowercase and uppercase. Thus, "I".lower() != "i" in a "tr" locale.

Parameters
----------
s : str

Returns
-------
lowered : str

Examples
--------
>>> from numpy.core.numerictypes import english_lower
>>> english_lower('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_')
'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789_'
>>> english_lower('')
''

---
## english_upper
```python
from _string_helpers import english_upper
```

Apply English case rules to convert ASCII strings to all upper case.

This is an internal utility function to replace calls to str.upper() such
that we can avoid changing behavior with changing locales. In particular,
Turkish has distinct dotted and dotless variants of the Latin letter "I" in
both lowercase and uppercase. Thus, "i".upper() != "I" in a "tr" locale.

Parameters
----------
s : str

Returns
-------
uppered : str

Examples
--------
>>> from numpy.core.numerictypes import english_upper
>>> english_upper('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_')
'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
>>> english_upper('')
''

---
## english_capitalize
```python
from _string_helpers import english_capitalize
```

Apply English case rules to convert the first character of an ASCII
string to upper case.

This is an internal utility function to replace calls to str.capitalize()
such that we can avoid changing behavior with changing locales.

Parameters
----------
s : str

Returns
-------
capitalized : str

Examples
--------
>>> from numpy.core.numerictypes import english_capitalize
>>> english_capitalize('int8')
'Int8'
>>> english_capitalize('Int8')
'Int8'
>>> english_capitalize('')
''

---
## __name__
```python
from multiarray import __name__
```



---
## empty_like
```python
from multiarray import empty_like
```

empty_like(prototype, dtype=None, order='K', subok=True, shape=None)

Return a new array with the same shape and type as a given array.

Parameters
----------
prototype : array_like
    The shape and data-type of `prototype` define these same attributes
    of the returned array.
dtype : data-type, optional
    Overrides the data type of the result.

    .. versionadded:: 1.6.0
order : {'C', 'F', 'A', or 'K'}, optional
    Overrides the memory layout of the result. 'C' means C-order,
    'F' means F-order, 'A' means 'F' if `prototype` is Fortran
    contiguous, 'C' otherwise. 'K' means match the layout of `prototype`
    as closely as possible.

    .. versionadded:: 1.6.0
subok : bool, optional.
    If True, then the newly created array will use the sub-class
    type of `prototype`, otherwise it will be a base-class array. Defaults
    to True.
shape : int or sequence of ints, optional.
    Overrides the shape of the result. If order='K' and the number of
    dimensions is unchanged, will try to keep order, otherwise,
    order='C' is implied.

    .. versionadded:: 1.17.0

Returns
-------
out : ndarray
    Array of uninitialized (arbitrary) data with the same
    shape and type as `prototype`.

See Also
--------
ones_like : Return an array of ones with shape and type of input.
zeros_like : Return an array of zeros with shape and type of input.
full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.

Notes
-----
This function does *not* initialize the returned array; to do that use
`zeros_like` or `ones_like` instead.  It may be marginally faster than
the functions that do set the array values.

Examples
--------
>>> a = ([1,2,3], [4,5,6])                         # a is array-like
>>> np.empty_like(a)
array([[-1073741821, -1073741821,           3],    # uninitialized
       [          0,           0, -1073741821]])
>>> a = np.array([[1., 2., 3.],[4.,5.,6.]])
>>> np.empty_like(a)
array([[ -2.00000715e+000,   1.48219694e-323,  -2.00000572e+000], # uninitialized
       [  4.38791518e-305,  -2.00000715e+000,   4.17269252e-309]])

---
## concatenate
```python
from multiarray import concatenate
```

concatenate((a1, a2, ...), axis=0, out=None, dtype=None, casting="same_kind")

Join a sequence of arrays along an existing axis.

Parameters
----------
a1, a2, ... : sequence of array_like
    The arrays must have the same shape, except in the dimension
    corresponding to `axis` (the first, by default).
axis : int, optional
    The axis along which the arrays will be joined.  If axis is None,
    arrays are flattened before use.  Default is 0.
out : ndarray, optional
    If provided, the destination to place the result. The shape must be
    correct, matching that of what concatenate would have returned if no
    out argument were specified.
dtype : str or dtype
    If provided, the destination array will have this dtype. Cannot be
    provided together with `out`.

    .. versionadded:: 1.20.0

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur. Defaults to 'same_kind'.

    .. versionadded:: 1.20.0

Returns
-------
res : ndarray
    The concatenated array.

See Also
--------
ma.concatenate : Concatenate function that preserves input masks.
array_split : Split an array into multiple sub-arrays of equal or
              near-equal size.
split : Split array into a list of multiple sub-arrays of equal size.
hsplit : Split array into multiple sub-arrays horizontally (column wise).
vsplit : Split array into multiple sub-arrays vertically (row wise).
dsplit : Split array into multiple sub-arrays along the 3rd axis (depth).
stack : Stack a sequence of arrays along a new axis.
block : Assemble arrays from blocks.
hstack : Stack arrays in sequence horizontally (column wise).
vstack : Stack arrays in sequence vertically (row wise).
dstack : Stack arrays in sequence depth wise (along third dimension).
column_stack : Stack 1-D arrays as columns into a 2-D array.

Notes
-----
When one or more of the arrays to be concatenated is a MaskedArray,
this function will return a MaskedArray object instead of an ndarray,
but the input masks are *not* preserved. In cases where a MaskedArray
is expected as input, use the ma.concatenate function from the masked
array module instead.

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> b = np.array([[5, 6]])
>>> np.concatenate((a, b), axis=0)
array([[1, 2],
       [3, 4],
       [5, 6]])
>>> np.concatenate((a, b.T), axis=1)
array([[1, 2, 5],
       [3, 4, 6]])
>>> np.concatenate((a, b), axis=None)
array([1, 2, 3, 4, 5, 6])

This function will not preserve masking of MaskedArray inputs.

>>> a = np.ma.arange(3)
>>> a[1] = np.ma.masked
>>> b = np.arange(2, 5)
>>> a
masked_array(data=[0, --, 2],
             mask=[False,  True, False],
       fill_value=999999)
>>> b
array([2, 3, 4])
>>> np.concatenate([a, b])
masked_array(data=[0, 1, 2, 2, 3, 4],
             mask=False,
       fill_value=999999)
>>> np.ma.concatenate([a, b])
masked_array(data=[0, --, 2, 2, 3, 4],
             mask=[False,  True, False, False, False, False],
       fill_value=999999)

---
## inner
```python
from multiarray import inner
```

inner(a, b, /)

Inner product of two arrays.

Ordinary inner product of vectors for 1-D arrays (without complex
conjugation), in higher dimensions a sum product over the last axes.

Parameters
----------
a, b : array_like
    If `a` and `b` are nonscalar, their last dimensions must match.

Returns
-------
out : ndarray
    If `a` and `b` are both
    scalars or both 1-D arrays then a scalar is returned; otherwise
    an array is returned.
    ``out.shape = (*a.shape[:-1], *b.shape[:-1])``

Raises
------
ValueError
    If both `a` and `b` are nonscalar and their last dimensions have
    different sizes.

See Also
--------
tensordot : Sum products over arbitrary axes.
dot : Generalised matrix product, using second last dimension of `b`.
einsum : Einstein summation convention.

Notes
-----
For vectors (1-D arrays) it computes the ordinary inner-product::

    np.inner(a, b) = sum(a[:]*b[:])

More generally, if ``ndim(a) = r > 0`` and ``ndim(b) = s > 0``::

    np.inner(a, b) = np.tensordot(a, b, axes=(-1,-1))

or explicitly::

    np.inner(a, b)[i0,...,ir-2,j0,...,js-2]
         = sum(a[i0,...,ir-2,:]*b[j0,...,js-2,:])

In addition `a` or `b` may be scalars, in which case::

   np.inner(a,b) = a*b

Examples
--------
Ordinary inner product for vectors:

>>> a = np.array([1,2,3])
>>> b = np.array([0,1,0])
>>> np.inner(a, b)
2

Some multidimensional examples:

>>> a = np.arange(24).reshape((2,3,4))
>>> b = np.arange(4)
>>> c = np.inner(a, b)
>>> c.shape
(2, 3)
>>> c
array([[ 14,  38,  62],
       [ 86, 110, 134]])

>>> a = np.arange(2).reshape((1,1,2))
>>> b = np.arange(6).reshape((3,2))
>>> c = np.inner(a, b)
>>> c.shape
(1, 1, 3)
>>> c
array([[[1, 3, 5]]])

An example where `b` is a scalar:

>>> np.inner(np.eye(2), 7)
array([[7., 0.],
       [0., 7.]])

---
## where
```python
from multiarray import where
```

where(condition, [x, y], /)

Return elements chosen from `x` or `y` depending on `condition`.

.. note::
    When only `condition` is provided, this function is a shorthand for
    ``np.asarray(condition).nonzero()``. Using `nonzero` directly should be
    preferred, as it behaves correctly for subclasses. The rest of this
    documentation covers only the case where all three arguments are
    provided.

Parameters
----------
condition : array_like, bool
    Where True, yield `x`, otherwise yield `y`.
x, y : array_like
    Values from which to choose. `x`, `y` and `condition` need to be
    broadcastable to some shape.

Returns
-------
out : ndarray
    An array with elements from `x` where `condition` is True, and elements
    from `y` elsewhere.

See Also
--------
choose
nonzero : The function that is called when x and y are omitted

Notes
-----
If all the arrays are 1-D, `where` is equivalent to::

    [xv if c else yv
     for c, xv, yv in zip(condition, x, y)]

Examples
--------
>>> a = np.arange(10)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> np.where(a < 5, a, 10*a)
array([ 0,  1,  2,  3,  4, 50, 60, 70, 80, 90])

This can be used on multidimensional arrays too:

>>> np.where([[True, False], [True, True]],
...          [[1, 2], [3, 4]],
...          [[9, 8], [7, 6]])
array([[1, 8],
       [3, 4]])

The shapes of x, y, and the condition are broadcast together:

>>> x, y = np.ogrid[:3, :4]
>>> np.where(x < y, x, 10 + y)  # both x and 10+y are broadcast
array([[10,  0,  0,  0],
       [10, 11,  1,  1],
       [10, 11, 12,  2]])

>>> a = np.array([[0, 1, 2],
...               [0, 2, 4],
...               [0, 3, 6]])
>>> np.where(a < 4, a, -1)  # -1 is broadcast
array([[ 0,  1,  2],
       [ 0,  2, -1],
       [ 0,  3, -1]])

---
## lexsort
```python
from multiarray import lexsort
```

lexsort(keys, axis=-1)

Perform an indirect stable sort using a sequence of keys.

Given multiple sorting keys, which can be interpreted as columns in a
spreadsheet, lexsort returns an array of integer indices that describes
the sort order by multiple columns. The last key in the sequence is used
for the primary sort order, the second-to-last key for the secondary sort
order, and so on. The keys argument must be a sequence of objects that
can be converted to arrays of the same shape. If a 2D array is provided
for the keys argument, its rows are interpreted as the sorting keys and
sorting is according to the last row, second last row etc.

Parameters
----------
keys : (k, N) array or tuple containing k (N,)-shaped sequences
    The `k` different "columns" to be sorted.  The last column (or row if
    `keys` is a 2D array) is the primary sort key.
axis : int, optional
    Axis to be indirectly sorted.  By default, sort over the last axis.

Returns
-------
indices : (N,) ndarray of ints
    Array of indices that sort the keys along the specified axis.

See Also
--------
argsort : Indirect sort.
ndarray.sort : In-place sort.
sort : Return a sorted copy of an array.

Examples
--------
Sort names: first by surname, then by name.

>>> surnames =    ('Hertz',    'Galilei', 'Hertz')
>>> first_names = ('Heinrich', 'Galileo', 'Gustav')
>>> ind = np.lexsort((first_names, surnames))
>>> ind
array([1, 2, 0])

>>> [surnames[i] + ", " + first_names[i] for i in ind]
['Galilei, Galileo', 'Hertz, Gustav', 'Hertz, Heinrich']

Sort two columns of numbers:

>>> a = [1,5,1,4,3,4,4] # First column
>>> b = [9,4,0,4,0,2,1] # Second column
>>> ind = np.lexsort((b,a)) # Sort by a, then by b
>>> ind
array([2, 0, 4, 6, 5, 3, 1])

>>> [(a[i],b[i]) for i in ind]
[(1, 0), (1, 9), (3, 0), (4, 1), (4, 2), (4, 4), (5, 4)]

Note that sorting is first according to the elements of ``a``.
Secondary sorting is according to the elements of ``b``.

A normal ``argsort`` would have yielded:

>>> [(a[i],b[i]) for i in np.argsort(a)]
[(1, 9), (1, 0), (3, 0), (4, 4), (4, 2), (4, 1), (5, 4)]

Structured arrays are sorted lexically by ``argsort``:

>>> x = np.array([(1,9), (5,4), (1,0), (4,4), (3,0), (4,2), (4,1)],
...              dtype=np.dtype([('x', int), ('y', int)]))

>>> np.argsort(x) # or np.argsort(x, order=('x', 'y'))
array([2, 0, 4, 6, 5, 3, 1])

---
## can_cast
```python
from multiarray import can_cast
```

can_cast(from_, to, casting='safe')

Returns True if cast between data types can occur according to the
casting rule.  If from is a scalar or array scalar, also returns
True if the scalar value can be cast without overflow or truncation
to an integer.

Parameters
----------
from_ : dtype, dtype specifier, scalar, or array
    Data type, scalar, or array to cast from.
to : dtype or dtype specifier
    Data type to cast to.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur.

      * 'no' means the data types should not be cast at all.
      * 'equiv' means only byte-order changes are allowed.
      * 'safe' means only casts which can preserve values are allowed.
      * 'same_kind' means only safe casts or casts within a kind,
        like float64 to float32, are allowed.
      * 'unsafe' means any data conversions may be done.

Returns
-------
out : bool
    True if cast can occur according to the casting rule.

Notes
-----
.. versionchanged:: 1.17.0
   Casting between a simple data type and a structured one is possible only
   for "unsafe" casting.  Casting to multiple fields is allowed, but
   casting from multiple fields is not.

.. versionchanged:: 1.9.0
   Casting from numeric to string types in 'safe' casting mode requires
   that the string dtype length is long enough to store the maximum
   integer/float value converted.

See also
--------
dtype, result_type

Examples
--------
Basic examples

>>> np.can_cast(np.int32, np.int64)
True
>>> np.can_cast(np.float64, complex)
True
>>> np.can_cast(complex, float)
False

>>> np.can_cast('i8', 'f8')
True
>>> np.can_cast('i8', 'f4')
False
>>> np.can_cast('i4', 'S4')
False

Casting scalars

>>> np.can_cast(100, 'i1')
True
>>> np.can_cast(150, 'i1')
False
>>> np.can_cast(150, 'u1')
True

>>> np.can_cast(3.5e100, np.float32)
False
>>> np.can_cast(1000.0, np.float32)
True

Array scalar checks the value, array does not

>>> np.can_cast(np.array(1000.0), np.float32)
True
>>> np.can_cast(np.array([1000.0]), np.float32)
False

Using the casting rules

>>> np.can_cast('i8', 'i8', 'no')
True
>>> np.can_cast('<i8', '>i8', 'no')
False

>>> np.can_cast('<i8', '>i8', 'equiv')
True
>>> np.can_cast('<i4', '>i8', 'equiv')
False

>>> np.can_cast('<i4', '>i8', 'safe')
True
>>> np.can_cast('<i8', '>i4', 'safe')
False

>>> np.can_cast('<i8', '>i4', 'same_kind')
True
>>> np.can_cast('<i8', '>u4', 'same_kind')
False

>>> np.can_cast('<i8', '>u4', 'unsafe')
True

---
## min_scalar_type
```python
from multiarray import min_scalar_type
```

min_scalar_type(a, /)

For scalar ``a``, returns the data type with the smallest size
and smallest scalar kind which can hold its value.  For non-scalar
array ``a``, returns the vector's dtype unmodified.

Floating point values are not demoted to integers,
and complex values are not demoted to floats.

Parameters
----------
a : scalar or array_like
    The value whose minimal data type is to be found.

Returns
-------
out : dtype
    The minimal data type.

Notes
-----
.. versionadded:: 1.6.0

See Also
--------
result_type, promote_types, dtype, can_cast

Examples
--------
>>> np.min_scalar_type(10)
dtype('uint8')

>>> np.min_scalar_type(-260)
dtype('int16')

>>> np.min_scalar_type(3.1)
dtype('float16')

>>> np.min_scalar_type(1e50)
dtype('float64')

>>> np.min_scalar_type(np.arange(4,dtype='f8'))
dtype('float64')

---
## result_type
```python
from multiarray import result_type
```

result_type(*arrays_and_dtypes)

Returns the type that results from applying the NumPy
type promotion rules to the arguments.

Type promotion in NumPy works similarly to the rules in languages
like C++, with some slight differences.  When both scalars and
arrays are used, the array's type takes precedence and the actual value
of the scalar is taken into account.

For example, calculating 3*a, where a is an array of 32-bit floats,
intuitively should result in a 32-bit float output.  If the 3 is a
32-bit integer, the NumPy rules indicate it can't convert losslessly
into a 32-bit float, so a 64-bit float should be the result type.
By examining the value of the constant, '3', we see that it fits in
an 8-bit integer, which can be cast losslessly into the 32-bit float.

Parameters
----------
arrays_and_dtypes : list of arrays and dtypes
    The operands of some operation whose result type is needed.

Returns
-------
out : dtype
    The result type.

See also
--------
dtype, promote_types, min_scalar_type, can_cast

Notes
-----
.. versionadded:: 1.6.0

The specific algorithm used is as follows.

Categories are determined by first checking which of boolean,
integer (int/uint), or floating point (float/complex) the maximum
kind of all the arrays and the scalars are.

If there are only scalars or the maximum category of the scalars
is higher than the maximum category of the arrays,
the data types are combined with :func:`promote_types`
to produce the return value.

Otherwise, `min_scalar_type` is called on each scalar, and
the resulting data types are all combined with :func:`promote_types`
to produce the return value.

The set of int values is not a subset of the uint values for types
with the same number of bits, something not reflected in
:func:`min_scalar_type`, but handled as a special case in `result_type`.

Examples
--------
>>> np.result_type(3, np.arange(7, dtype='i1'))
dtype('int8')

>>> np.result_type('i4', 'c8')
dtype('complex128')

>>> np.result_type(3.0, -2)
dtype('float64')

---
## dot
```python
from multiarray import dot
```

dot(a, b, out=None)

Dot product of two arrays. Specifically,

- If both `a` and `b` are 1-D arrays, it is inner product of vectors
  (without complex conjugation).

- If both `a` and `b` are 2-D arrays, it is matrix multiplication,
  but using :func:`matmul` or ``a @ b`` is preferred.

- If either `a` or `b` is 0-D (scalar), it is equivalent to
  :func:`multiply` and using ``numpy.multiply(a, b)`` or ``a * b`` is
  preferred.

- If `a` is an N-D array and `b` is a 1-D array, it is a sum product over
  the last axis of `a` and `b`.

- If `a` is an N-D array and `b` is an M-D array (where ``M>=2``), it is a
  sum product over the last axis of `a` and the second-to-last axis of
  `b`::

    dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])

It uses an optimized BLAS library when possible (see `numpy.linalg`).

Parameters
----------
a : array_like
    First argument.
b : array_like
    Second argument.
out : ndarray, optional
    Output argument. This must have the exact kind that would be returned
    if it was not used. In particular, it must have the right type, must be
    C-contiguous, and its dtype must be the dtype that would be returned
    for `dot(a,b)`. This is a performance feature. Therefore, if these
    conditions are not met, an exception is raised, instead of attempting
    to be flexible.

Returns
-------
output : ndarray
    Returns the dot product of `a` and `b`.  If `a` and `b` are both
    scalars or both 1-D arrays then a scalar is returned; otherwise
    an array is returned.
    If `out` is given, then it is returned.

Raises
------
ValueError
    If the last dimension of `a` is not the same size as
    the second-to-last dimension of `b`.

See Also
--------
vdot : Complex-conjugating dot product.
tensordot : Sum products over arbitrary axes.
einsum : Einstein summation convention.
matmul : '@' operator as method with out parameter.
linalg.multi_dot : Chained dot product.

Examples
--------
>>> np.dot(3, 4)
12

Neither argument is complex-conjugated:

>>> np.dot([2j, 3j], [2j, 3j])
(-13+0j)

For 2-D arrays it is the matrix product:

>>> a = [[1, 0], [0, 1]]
>>> b = [[4, 1], [2, 2]]
>>> np.dot(a, b)
array([[4, 1],
       [2, 2]])

>>> a = np.arange(3*4*5*6).reshape((3,4,5,6))
>>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))
>>> np.dot(a, b)[2,3,2,1,2,2]
499128
>>> sum(a[2,3,2,:] * b[1,2,:,2])
499128

---
## vdot
```python
from multiarray import vdot
```

vdot(a, b, /)

Return the dot product of two vectors.

The vdot(`a`, `b`) function handles complex numbers differently than
dot(`a`, `b`).  If the first argument is complex the complex conjugate
of the first argument is used for the calculation of the dot product.

Note that `vdot` handles multidimensional arrays differently than `dot`:
it does *not* perform a matrix product, but flattens input arguments
to 1-D vectors first. Consequently, it should only be used for vectors.

Parameters
----------
a : array_like
    If `a` is complex the complex conjugate is taken before calculation
    of the dot product.
b : array_like
    Second argument to the dot product.

Returns
-------
output : ndarray
    Dot product of `a` and `b`.  Can be an int, float, or
    complex depending on the types of `a` and `b`.

See Also
--------
dot : Return the dot product without using the complex conjugate of the
      first argument.

Examples
--------
>>> a = np.array([1+2j,3+4j])
>>> b = np.array([5+6j,7+8j])
>>> np.vdot(a, b)
(70-8j)
>>> np.vdot(b, a)
(70+8j)

Note that higher-dimensional arrays are flattened!

>>> a = np.array([[1, 4], [5, 6]])
>>> b = np.array([[4, 1], [2, 2]])
>>> np.vdot(a, b)
30
>>> np.vdot(b, a)
30
>>> 1*4 + 4*1 + 5*2 + 6*2
30

---
## bincount
```python
from multiarray import bincount
```

bincount(x, /, weights=None, minlength=0)

Count number of occurrences of each value in array of non-negative ints.

The number of bins (of size 1) is one larger than the largest value in
`x`. If `minlength` is specified, there will be at least this number
of bins in the output array (though it will be longer if necessary,
depending on the contents of `x`).
Each bin gives the number of occurrences of its index value in `x`.
If `weights` is specified the input array is weighted by it, i.e. if a
value ``n`` is found at position ``i``, ``out[n] += weight[i]`` instead
of ``out[n] += 1``.

Parameters
----------
x : array_like, 1 dimension, nonnegative ints
    Input array.
weights : array_like, optional
    Weights, array of the same shape as `x`.
minlength : int, optional
    A minimum number of bins for the output array.

    .. versionadded:: 1.6.0

Returns
-------
out : ndarray of ints
    The result of binning the input array.
    The length of `out` is equal to ``np.amax(x)+1``.

Raises
------
ValueError
    If the input is not 1-dimensional, or contains elements with negative
    values, or if `minlength` is negative.
TypeError
    If the type of the input is float or complex.

See Also
--------
histogram, digitize, unique

Examples
--------
>>> np.bincount(np.arange(5))
array([1, 1, 1, 1, 1])
>>> np.bincount(np.array([0, 1, 1, 3, 2, 1, 7]))
array([1, 3, 1, 1, 0, 0, 0, 1])

>>> x = np.array([0, 1, 1, 3, 2, 1, 7, 23])
>>> np.bincount(x).size == np.amax(x)+1
True

The input array needs to be of integer dtype, otherwise a
TypeError is raised:

>>> np.bincount(np.arange(5, dtype=float))
Traceback (most recent call last):
  ...
TypeError: Cannot cast array data from dtype('float64') to dtype('int64')
according to the rule 'safe'

A possible use of ``bincount`` is to perform sums over
variable-size chunks of an array, using the ``weights`` keyword.

>>> w = np.array([0.3, 0.5, 0.2, 0.7, 1., -0.6]) # weights
>>> x = np.array([0, 1, 1, 2, 2, 2])
>>> np.bincount(x,  weights=w)
array([ 0.3,  0.7,  1.1])

---
## ravel_multi_index
```python
from multiarray import ravel_multi_index
```

ravel_multi_index(multi_index, dims, mode='raise', order='C')

Converts a tuple of index arrays into an array of flat
indices, applying boundary modes to the multi-index.

Parameters
----------
multi_index : tuple of array_like
    A tuple of integer arrays, one array for each dimension.
dims : tuple of ints
    The shape of array into which the indices from ``multi_index`` apply.
mode : {'raise', 'wrap', 'clip'}, optional
    Specifies how out-of-bounds indices are handled.  Can specify
    either one mode or a tuple of modes, one mode per index.

    * 'raise' -- raise an error (default)
    * 'wrap' -- wrap around
    * 'clip' -- clip to the range

    In 'clip' mode, a negative index which would normally
    wrap will clip to 0 instead.
order : {'C', 'F'}, optional
    Determines whether the multi-index should be viewed as
    indexing in row-major (C-style) or column-major
    (Fortran-style) order.

Returns
-------
raveled_indices : ndarray
    An array of indices into the flattened version of an array
    of dimensions ``dims``.

See Also
--------
unravel_index

Notes
-----
.. versionadded:: 1.6.0

Examples
--------
>>> arr = np.array([[3,6,6],[4,5,1]])
>>> np.ravel_multi_index(arr, (7,6))
array([22, 41, 37])
>>> np.ravel_multi_index(arr, (7,6), order='F')
array([31, 41, 13])
>>> np.ravel_multi_index(arr, (4,6), mode='clip')
array([22, 23, 19])
>>> np.ravel_multi_index(arr, (4,4), mode=('clip','wrap'))
array([12, 13, 13])

>>> np.ravel_multi_index((3,1,4,1), (6,7,8,9))
1621

---
## unravel_index
```python
from multiarray import unravel_index
```

unravel_index(indices, shape, order='C')

Converts a flat index or array of flat indices into a tuple
of coordinate arrays.

Parameters
----------
indices : array_like
    An integer array whose elements are indices into the flattened
    version of an array of dimensions ``shape``. Before version 1.6.0,
    this function accepted just one index value.
shape : tuple of ints
    The shape of the array to use for unraveling ``indices``.

    .. versionchanged:: 1.16.0
        Renamed from ``dims`` to ``shape``.

order : {'C', 'F'}, optional
    Determines whether the indices should be viewed as indexing in
    row-major (C-style) or column-major (Fortran-style) order.

    .. versionadded:: 1.6.0

Returns
-------
unraveled_coords : tuple of ndarray
    Each array in the tuple has the same shape as the ``indices``
    array.

See Also
--------
ravel_multi_index

Examples
--------
>>> np.unravel_index([22, 41, 37], (7,6))
(array([3, 6, 6]), array([4, 5, 1]))
>>> np.unravel_index([31, 41, 13], (7,6), order='F')
(array([3, 6, 6]), array([4, 5, 1]))

>>> np.unravel_index(1621, (6,7,8,9))
(3, 1, 4, 1)

---
## copyto
```python
from multiarray import copyto
```

copyto(dst, src, casting='same_kind', where=True)

Copies values from one array to another, broadcasting as necessary.

Raises a TypeError if the `casting` rule is violated, and if
`where` is provided, it selects which elements to copy.

.. versionadded:: 1.7.0

Parameters
----------
dst : ndarray
    The array into which values are copied.
src : array_like
    The array from which values are copied.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur when copying.

      * 'no' means the data types should not be cast at all.
      * 'equiv' means only byte-order changes are allowed.
      * 'safe' means only casts which can preserve values are allowed.
      * 'same_kind' means only safe casts or casts within a kind,
        like float64 to float32, are allowed.
      * 'unsafe' means any data conversions may be done.
where : array_like of bool, optional
    A boolean array which is broadcasted to match the dimensions
    of `dst`, and selects elements to copy from `src` to `dst`
    wherever it contains the value True.

Examples
--------
>>> A = np.array([4, 5, 6])
>>> B = [1, 2, 3]
>>> np.copyto(A, B)
>>> A
array([1, 2, 3])

>>> A = np.array([[1, 2, 3], [4, 5, 6]])
>>> B = [[4, 5, 6], [7, 8, 9]]
>>> np.copyto(A, B)
>>> A
array([[4, 5, 6],
       [7, 8, 9]])

---
## putmask
```python
from multiarray import putmask
```

putmask(a, mask, values)

Changes elements of an array based on conditional and input values.

Sets ``a.flat[n] = values[n]`` for each n where ``mask.flat[n]==True``.

If `values` is not the same size as `a` and `mask` then it will repeat.
This gives behavior different from ``a[mask] = values``.

Parameters
----------
a : ndarray
    Target array.
mask : array_like
    Boolean mask array. It has to be the same shape as `a`.
values : array_like
    Values to put into `a` where `mask` is True. If `values` is smaller
    than `a` it will be repeated.

See Also
--------
place, put, take, copyto

Examples
--------
>>> x = np.arange(6).reshape(2, 3)
>>> np.putmask(x, x>2, x**2)
>>> x
array([[ 0,  1,  2],
       [ 9, 16, 25]])

If `values` is smaller than `a` it is repeated:

>>> x = np.arange(5)
>>> np.putmask(x, x>1, [-33, -44])
>>> x
array([  0,   1, -33, -44, -33])

---
## packbits
```python
from multiarray import packbits
```

packbits(a, /, axis=None, bitorder='big')

Packs the elements of a binary-valued array into bits in a uint8 array.

The result is padded to full bytes by inserting zero bits at the end.

Parameters
----------
a : array_like
    An array of integers or booleans whose elements should be packed to
    bits.
axis : int, optional
    The dimension over which bit-packing is done.
    ``None`` implies packing the flattened array.
bitorder : {'big', 'little'}, optional
    The order of the input bits. 'big' will mimic bin(val),
    ``[0, 0, 0, 0, 0, 0, 1, 1] => 3 = 0b00000011``, 'little' will
    reverse the order so ``[1, 1, 0, 0, 0, 0, 0, 0] => 3``.
    Defaults to 'big'.

    .. versionadded:: 1.17.0

Returns
-------
packed : ndarray
    Array of type uint8 whose elements represent bits corresponding to the
    logical (0 or nonzero) value of the input elements. The shape of
    `packed` has the same number of dimensions as the input (unless `axis`
    is None, in which case the output is 1-D).

See Also
--------
unpackbits: Unpacks elements of a uint8 array into a binary-valued output
            array.

Examples
--------
>>> a = np.array([[[1,0,1],
...                [0,1,0]],
...               [[1,1,0],
...                [0,0,1]]])
>>> b = np.packbits(a, axis=-1)
>>> b
array([[[160],
        [ 64]],
       [[192],
        [ 32]]], dtype=uint8)

Note that in binary 160 = 1010 0000, 64 = 0100 0000, 192 = 1100 0000,
and 32 = 0010 0000.

---
## unpackbits
```python
from multiarray import unpackbits
```

unpackbits(a, /, axis=None, count=None, bitorder='big')

Unpacks elements of a uint8 array into a binary-valued output array.

Each element of `a` represents a bit-field that should be unpacked
into a binary-valued output array. The shape of the output array is
either 1-D (if `axis` is ``None``) or the same shape as the input
array with unpacking done along the axis specified.

Parameters
----------
a : ndarray, uint8 type
   Input array.
axis : int, optional
    The dimension over which bit-unpacking is done.
    ``None`` implies unpacking the flattened array.
count : int or None, optional
    The number of elements to unpack along `axis`, provided as a way
    of undoing the effect of packing a size that is not a multiple
    of eight. A non-negative number means to only unpack `count`
    bits. A negative number means to trim off that many bits from
    the end. ``None`` means to unpack the entire array (the
    default). Counts larger than the available number of bits will
    add zero padding to the output. Negative counts must not
    exceed the available number of bits.

    .. versionadded:: 1.17.0

bitorder : {'big', 'little'}, optional
    The order of the returned bits. 'big' will mimic bin(val),
    ``3 = 0b00000011 => [0, 0, 0, 0, 0, 0, 1, 1]``, 'little' will reverse
    the order to ``[1, 1, 0, 0, 0, 0, 0, 0]``.
    Defaults to 'big'.

    .. versionadded:: 1.17.0

Returns
-------
unpacked : ndarray, uint8 type
   The elements are binary-valued (0 or 1).

See Also
--------
packbits : Packs the elements of a binary-valued array into bits in
           a uint8 array.

Examples
--------
>>> a = np.array([[2], [7], [23]], dtype=np.uint8)
>>> a
array([[ 2],
       [ 7],
       [23]], dtype=uint8)
>>> b = np.unpackbits(a, axis=1)
>>> b
array([[0, 0, 0, 0, 0, 0, 1, 0],
       [0, 0, 0, 0, 0, 1, 1, 1],
       [0, 0, 0, 1, 0, 1, 1, 1]], dtype=uint8)
>>> c = np.unpackbits(a, axis=1, count=-3)
>>> c
array([[0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0],
       [0, 0, 0, 1, 0]], dtype=uint8)

>>> p = np.packbits(b, axis=0)
>>> np.unpackbits(p, axis=0)
array([[0, 0, 0, 0, 0, 0, 1, 0],
       [0, 0, 0, 0, 0, 1, 1, 1],
       [0, 0, 0, 1, 0, 1, 1, 1],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0]], dtype=uint8)
>>> np.array_equal(b, np.unpackbits(p, axis=0, count=b.shape[0]))
True

---
## shares_memory
```python
from multiarray import shares_memory
```

shares_memory(a, b, /, max_work=None)

Determine if two arrays share memory.

.. warning::

   This function can be exponentially slow for some inputs, unless
   `max_work` is set to a finite number or ``MAY_SHARE_BOUNDS``.
   If in doubt, use `numpy.may_share_memory` instead.

Parameters
----------
a, b : ndarray
    Input arrays
max_work : int, optional
    Effort to spend on solving the overlap problem (maximum number
    of candidate solutions to consider). The following special
    values are recognized:

    max_work=MAY_SHARE_EXACT  (default)
        The problem is solved exactly. In this case, the function returns
        True only if there is an element shared between the arrays. Finding
        the exact solution may take extremely long in some cases.
    max_work=MAY_SHARE_BOUNDS
        Only the memory bounds of a and b are checked.

Raises
------
numpy.exceptions.TooHardError
    Exceeded max_work.

Returns
-------
out : bool

See Also
--------
may_share_memory

Examples
--------
>>> x = np.array([1, 2, 3, 4])
>>> np.shares_memory(x, np.array([5, 6, 7]))
False
>>> np.shares_memory(x[::2], x)
True
>>> np.shares_memory(x[::2], x[1::2])
False

Checking whether two arrays share memory is NP-complete, and
runtime may increase exponentially in the number of
dimensions. Hence, `max_work` should generally be set to a finite
number, as it is possible to construct examples that take
extremely long to run:

>>> from numpy.lib.stride_tricks import as_strided
>>> x = np.zeros([192163377], dtype=np.int8)
>>> x1 = as_strided(x, strides=(36674, 61119, 85569), shape=(1049, 1049, 1049))
>>> x2 = as_strided(x[64023025:], strides=(12223, 12224, 1), shape=(1049, 1049, 1))
>>> np.shares_memory(x1, x2, max_work=1000)
Traceback (most recent call last):
...
numpy.exceptions.TooHardError: Exceeded max_work

Running ``np.shares_memory(x1, x2)`` without `max_work` set takes
around 1 minute for this case. It is possible to find problems
that take still significantly longer.

---
## may_share_memory
```python
from multiarray import may_share_memory
```

may_share_memory(a, b, /, max_work=None)

Determine if two arrays might share memory

A return of True does not necessarily mean that the two arrays
share any element.  It just means that they *might*.

Only the memory bounds of a and b are checked by default.

Parameters
----------
a, b : ndarray
    Input arrays
max_work : int, optional
    Effort to spend on solving the overlap problem.  See
    `shares_memory` for details.  Default for ``may_share_memory``
    is to do a bounds check.

Returns
-------
out : bool

See Also
--------
shares_memory

Examples
--------
>>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
False
>>> x = np.zeros([3, 4])
>>> np.may_share_memory(x[:,0], x[:,1])
True

---
## is_busday
```python
from multiarray import is_busday
```

is_busday(dates, weekmask='1111100', holidays=None, busdaycal=None, out=None)

Calculates which of the given dates are valid days, and which are not.

.. versionadded:: 1.7.0

Parameters
----------
dates : array_like of datetime64[D]
    The array of dates to process.
weekmask : str or array_like of bool, optional
    A seven-element array indicating which of Monday through Sunday are
    valid days. May be specified as a length-seven list or array, like
    [1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
    like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
    weekdays, optionally separated by white space. Valid abbreviations
    are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
    An array of dates to consider as invalid dates.  They may be
    specified in any order, and NaT (not-a-time) dates are ignored.
    This list is saved in a normalized form that is suited for
    fast calculations of valid days.
busdaycal : busdaycalendar, optional
    A `busdaycalendar` object which specifies the valid days. If this
    parameter is provided, neither weekmask nor holidays may be
    provided.
out : array of bool, optional
    If provided, this array is filled with the result.

Returns
-------
out : array of bool
    An array with the same shape as ``dates``, containing True for
    each valid day, and False for each invalid day.

See Also
--------
busdaycalendar : An object that specifies a custom set of valid days.
busday_offset : Applies an offset counted in valid days.
busday_count : Counts how many valid days are in a half-open date range.

Examples
--------
>>> # The weekdays are Friday, Saturday, and Monday
... np.is_busday(['2011-07-01', '2011-07-02', '2011-07-18'],
...                 holidays=['2011-07-01', '2011-07-04', '2011-07-17'])
array([False, False,  True])

---
## busday_offset
```python
from multiarray import busday_offset
```

busday_offset(dates, offsets, roll='raise', weekmask='1111100', holidays=None, busdaycal=None, out=None)

First adjusts the date to fall on a valid day according to
the ``roll`` rule, then applies offsets to the given dates
counted in valid days.

.. versionadded:: 1.7.0

Parameters
----------
dates : array_like of datetime64[D]
    The array of dates to process.
offsets : array_like of int
    The array of offsets, which is broadcast with ``dates``.
roll : {'raise', 'nat', 'forward', 'following', 'backward', 'preceding', 'modifiedfollowing', 'modifiedpreceding'}, optional
    How to treat dates that do not fall on a valid day. The default
    is 'raise'.

      * 'raise' means to raise an exception for an invalid day.
      * 'nat' means to return a NaT (not-a-time) for an invalid day.
      * 'forward' and 'following' mean to take the first valid day
        later in time.
      * 'backward' and 'preceding' mean to take the first valid day
        earlier in time.
      * 'modifiedfollowing' means to take the first valid day
        later in time unless it is across a Month boundary, in which
        case to take the first valid day earlier in time.
      * 'modifiedpreceding' means to take the first valid day
        earlier in time unless it is across a Month boundary, in which
        case to take the first valid day later in time.
weekmask : str or array_like of bool, optional
    A seven-element array indicating which of Monday through Sunday are
    valid days. May be specified as a length-seven list or array, like
    [1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
    like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
    weekdays, optionally separated by white space. Valid abbreviations
    are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
    An array of dates to consider as invalid dates.  They may be
    specified in any order, and NaT (not-a-time) dates are ignored.
    This list is saved in a normalized form that is suited for
    fast calculations of valid days.
busdaycal : busdaycalendar, optional
    A `busdaycalendar` object which specifies the valid days. If this
    parameter is provided, neither weekmask nor holidays may be
    provided.
out : array of datetime64[D], optional
    If provided, this array is filled with the result.

Returns
-------
out : array of datetime64[D]
    An array with a shape from broadcasting ``dates`` and ``offsets``
    together, containing the dates with offsets applied.

See Also
--------
busdaycalendar : An object that specifies a custom set of valid days.
is_busday : Returns a boolean array indicating valid days.
busday_count : Counts how many valid days are in a half-open date range.

Examples
--------
>>> # First business day in October 2011 (not accounting for holidays)
... np.busday_offset('2011-10', 0, roll='forward')
numpy.datetime64('2011-10-03')
>>> # Last business day in February 2012 (not accounting for holidays)
... np.busday_offset('2012-03', -1, roll='forward')
numpy.datetime64('2012-02-29')
>>> # Third Wednesday in January 2011
... np.busday_offset('2011-01', 2, roll='forward', weekmask='Wed')
numpy.datetime64('2011-01-19')
>>> # 2012 Mother's Day in Canada and the U.S.
... np.busday_offset('2012-05', 1, roll='forward', weekmask='Sun')
numpy.datetime64('2012-05-13')

>>> # First business day on or after a date
... np.busday_offset('2011-03-20', 0, roll='forward')
numpy.datetime64('2011-03-21')
>>> np.busday_offset('2011-03-22', 0, roll='forward')
numpy.datetime64('2011-03-22')
>>> # First business day after a date
... np.busday_offset('2011-03-20', 1, roll='backward')
numpy.datetime64('2011-03-21')
>>> np.busday_offset('2011-03-22', 1, roll='backward')
numpy.datetime64('2011-03-23')

---
## busday_count
```python
from multiarray import busday_count
```

busday_count(begindates, enddates, weekmask='1111100', holidays=[], busdaycal=None, out=None)

Counts the number of valid days between `begindates` and
`enddates`, not including the day of `enddates`.

If ``enddates`` specifies a date value that is earlier than the
corresponding ``begindates`` date value, the count will be negative.

.. versionadded:: 1.7.0

Parameters
----------
begindates : array_like of datetime64[D]
    The array of the first dates for counting.
enddates : array_like of datetime64[D]
    The array of the end dates for counting, which are excluded
    from the count themselves.
weekmask : str or array_like of bool, optional
    A seven-element array indicating which of Monday through Sunday are
    valid days. May be specified as a length-seven list or array, like
    [1,1,1,1,1,0,0]; a length-seven string, like '1111100'; or a string
    like "Mon Tue Wed Thu Fri", made up of 3-character abbreviations for
    weekdays, optionally separated by white space. Valid abbreviations
    are: Mon Tue Wed Thu Fri Sat Sun
holidays : array_like of datetime64[D], optional
    An array of dates to consider as invalid dates.  They may be
    specified in any order, and NaT (not-a-time) dates are ignored.
    This list is saved in a normalized form that is suited for
    fast calculations of valid days.
busdaycal : busdaycalendar, optional
    A `busdaycalendar` object which specifies the valid days. If this
    parameter is provided, neither weekmask nor holidays may be
    provided.
out : array of int, optional
    If provided, this array is filled with the result.

Returns
-------
out : array of int
    An array with a shape from broadcasting ``begindates`` and ``enddates``
    together, containing the number of valid days between
    the begin and end dates.

See Also
--------
busdaycalendar : An object that specifies a custom set of valid days.
is_busday : Returns a boolean array indicating valid days.
busday_offset : Applies an offset counted in valid days.

Examples
--------
>>> # Number of weekdays in January 2011
... np.busday_count('2011-01', '2011-02')
21
>>> # Number of weekdays in 2011
>>> np.busday_count('2011', '2012')
260
>>> # Number of Saturdays in 2011
... np.busday_count('2011', '2012', weekmask='Sat')
53

---
## datetime_as_string
```python
from multiarray import datetime_as_string
```

datetime_as_string(arr, unit=None, timezone='naive', casting='same_kind')

Convert an array of datetimes into an array of strings.

Parameters
----------
arr : array_like of datetime64
    The array of UTC timestamps to format.
unit : str
    One of None, 'auto', or a :ref:`datetime unit <arrays.dtypes.dateunits>`.
timezone : {'naive', 'UTC', 'local'} or tzinfo
    Timezone information to use when displaying the datetime. If 'UTC', end
    with a Z to indicate UTC time. If 'local', convert to the local timezone
    first, and suffix with a +-#### timezone offset. If a tzinfo object,
    then do as with 'local', but use the specified timezone.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}
    Casting to allow when changing between datetime units.

Returns
-------
str_arr : ndarray
    An array of strings the same shape as `arr`.

Examples
--------
>>> import pytz
>>> d = np.arange('2002-10-27T04:30', 4*60, 60, dtype='M8[m]')
>>> d
array(['2002-10-27T04:30', '2002-10-27T05:30', '2002-10-27T06:30',
       '2002-10-27T07:30'], dtype='datetime64[m]')

Setting the timezone to UTC shows the same information, but with a Z suffix

>>> np.datetime_as_string(d, timezone='UTC')
array(['2002-10-27T04:30Z', '2002-10-27T05:30Z', '2002-10-27T06:30Z',
       '2002-10-27T07:30Z'], dtype='<U35')

Note that we picked datetimes that cross a DST boundary. Passing in a
``pytz`` timezone object will print the appropriate offset

>>> np.datetime_as_string(d, timezone=pytz.timezone('US/Eastern'))
array(['2002-10-27T00:30-0400', '2002-10-27T01:30-0400',
       '2002-10-27T01:30-0500', '2002-10-27T02:30-0500'], dtype='<U39')

Passing in a unit will change the precision

>>> np.datetime_as_string(d, unit='h')
array(['2002-10-27T04', '2002-10-27T05', '2002-10-27T06', '2002-10-27T07'],
      dtype='<U32')
>>> np.datetime_as_string(d, unit='s')
array(['2002-10-27T04:30:00', '2002-10-27T05:30:00', '2002-10-27T06:30:00',
       '2002-10-27T07:30:00'], dtype='<U38')

'casting' can be used to specify whether precision can be changed

>>> np.datetime_as_string(d, unit='h', casting='safe')
Traceback (most recent call last):
    ...
TypeError: Cannot create a datetime string as units 'h' from a NumPy
datetime with units 'm' according to the rule 'safe'

---
## __name__
```python
from _asarray import __name__
```

Functions in the ``as*array`` family that promote array-likes into arrays.

`require` fits this category despite its name not matching this pattern.

---
## require
```python
from _asarray import require
```

Return an ndarray of the provided type that satisfies requirements.

This function is useful to be sure that an array with the correct flags
is returned for passing to compiled code (perhaps through ctypes).

Parameters
----------
a : array_like
   The object to be converted to a type-and-requirement-satisfying array.
dtype : data-type
   The required data-type. If None preserve the current dtype. If your
   application requires the data to be in native byteorder, include
   a byteorder specification as a part of the dtype specification.
requirements : str or sequence of str
   The requirements list can be any of the following

   * 'F_CONTIGUOUS' ('F') - ensure a Fortran-contiguous array
   * 'C_CONTIGUOUS' ('C') - ensure a C-contiguous array
   * 'ALIGNED' ('A')      - ensure a data-type aligned array
   * 'WRITEABLE' ('W')    - ensure a writable array
   * 'OWNDATA' ('O')      - ensure an array that owns its own data
   * 'ENSUREARRAY', ('E') - ensure a base array, instead of a subclass
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    Array with specified requirements and type if given.

See Also
--------
asarray : Convert input to an ndarray.
asanyarray : Convert to an ndarray, but pass through ndarray subclasses.
ascontiguousarray : Convert input to a contiguous array.
asfortranarray : Convert input to an ndarray with column-major
                 memory order.
ndarray.flags : Information about the memory layout of the array.

Notes
-----
The returned array will be guaranteed to have the listed requirements
by making a copy if needed.

Examples
--------
>>> x = np.arange(6).reshape(2,3)
>>> x.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : False
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  WRITEBACKIFCOPY : False

>>> y = np.require(x, dtype=np.float32, requirements=['A', 'O', 'W', 'F'])
>>> y.flags
  C_CONTIGUOUS : False
  F_CONTIGUOUS : True
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  WRITEBACKIFCOPY : False

---
## __name__
```python
from records import __name__
```

Record Arrays
=============
Record arrays expose the fields of structured arrays as properties.

Most commonly, ndarrays contain elements of a single type, e.g. floats,
integers, bools etc.  However, it is possible for elements to be combinations
of these using structured types, such as::

  >>> a = np.array([(1, 2.0), (1, 2.0)], dtype=[('x', np.int64), ('y', np.float64)])
  >>> a
  array([(1, 2.), (1, 2.)], dtype=[('x', '<i8'), ('y', '<f8')])

Here, each element consists of two fields: x (and int), and y (a float).
This is known as a structured array.  The different fields are analogous
to columns in a spread-sheet.  The different fields can be accessed as
one would a dictionary::

  >>> a['x']
  array([1, 1])

  >>> a['y']
  array([2., 2.])

Record arrays allow us to access fields as properties::

  >>> ar = np.rec.array(a)

  >>> ar.x
  array([1, 1])

  >>> ar.y
  array([2., 2.])

---
## find_duplicate
```python
from records import find_duplicate
```

Find duplication in a list, return a list of duplicated elements

---
## format_parser
```python
from records import format_parser
```

Class to convert formats, names, titles description to a dtype.

After constructing the format_parser object, the dtype attribute is
the converted data-type:
``dtype = format_parser(formats, names, titles).dtype``

Attributes
----------
dtype : dtype
    The converted data-type.

Parameters
----------
formats : str or list of str
    The format description, either specified as a string with
    comma-separated format descriptions in the form ``'f8, i4, a5'``, or
    a list of format description strings  in the form
    ``['f8', 'i4', 'a5']``.
names : str or list/tuple of str
    The field names, either specified as a comma-separated string in the
    form ``'col1, col2, col3'``, or as a list or tuple of strings in the
    form ``['col1', 'col2', 'col3']``.
    An empty list can be used, in that case default field names
    ('f0', 'f1', ...) are used.
titles : sequence
    Sequence of title strings. An empty list can be used to leave titles
    out.
aligned : bool, optional
    If True, align the fields by padding as the C-compiler would.
    Default is False.
byteorder : str, optional
    If specified, all the fields will be changed to the
    provided byte-order.  Otherwise, the default byte-order is
    used. For all available string specifiers, see `dtype.newbyteorder`.

See Also
--------
dtype, typename, sctype2char

Examples
--------
>>> np.format_parser(['<f8', '<i4', '<a5'], ['col1', 'col2', 'col3'],
...                  ['T1', 'T2', 'T3']).dtype
dtype([(('T1', 'col1'), '<f8'), (('T2', 'col2'), '<i4'), (('T3', 'col3'), 'S5')])

`names` and/or `titles` can be empty lists. If `titles` is an empty list,
titles will simply not appear. If `names` is empty, default field names
will be used.

>>> np.format_parser(['f8', 'i4', 'a5'], ['col1', 'col2', 'col3'],
...                  []).dtype
dtype([('col1', '<f8'), ('col2', '<i4'), ('col3', '<S5')])
>>> np.format_parser(['<f8', '<i4', '<a5'], [], []).dtype
dtype([('f0', '<f8'), ('f1', '<i4'), ('f2', 'S5')])

---
## record
```python
from records import record
```

A data-type scalar that allows field access as attribute lookup.
    

---
## recarray
```python
from records import recarray
```

Construct an ndarray that allows field access using attributes.

Arrays may have a data-types containing fields, analogous
to columns in a spread sheet.  An example is ``[(x, int), (y, float)]``,
where each entry in the array is a pair of ``(int, float)``.  Normally,
these attributes are accessed using dictionary lookups such as ``arr['x']``
and ``arr['y']``.  Record arrays allow the fields to be accessed as members
of the array, using ``arr.x`` and ``arr.y``.

Parameters
----------
shape : tuple
    Shape of output array.
dtype : data-type, optional
    The desired data-type.  By default, the data-type is determined
    from `formats`, `names`, `titles`, `aligned` and `byteorder`.
formats : list of data-types, optional
    A list containing the data-types for the different columns, e.g.
    ``['i4', 'f8', 'i4']``.  `formats` does *not* support the new
    convention of using types directly, i.e. ``(int, float, int)``.
    Note that `formats` must be a list, not a tuple.
    Given that `formats` is somewhat limited, we recommend specifying
    `dtype` instead.
names : tuple of str, optional
    The name of each column, e.g. ``('x', 'y', 'z')``.
buf : buffer, optional
    By default, a new array is created of the given shape and data-type.
    If `buf` is specified and is an object exposing the buffer interface,
    the array will use the memory from the existing buffer.  In this case,
    the `offset` and `strides` keywords are available.

Other Parameters
----------------
titles : tuple of str, optional
    Aliases for column names.  For example, if `names` were
    ``('x', 'y', 'z')`` and `titles` is
    ``('x_coordinate', 'y_coordinate', 'z_coordinate')``, then
    ``arr['x']`` is equivalent to both ``arr.x`` and ``arr.x_coordinate``.
byteorder : {'<', '>', '='}, optional
    Byte-order for all fields.
aligned : bool, optional
    Align the fields in memory as the C-compiler would.
strides : tuple of ints, optional
    Buffer (`buf`) is interpreted according to these strides (strides
    define how many bytes each array element, row, column, etc.
    occupy in memory).
offset : int, optional
    Start reading buffer (`buf`) from this offset onwards.
order : {'C', 'F'}, optional
    Row-major (C-style) or column-major (Fortran-style) order.

Returns
-------
rec : recarray
    Empty array of the given shape and type.

See Also
--------
core.records.fromrecords : Construct a record array from data.
record : fundamental data-type for `recarray`.
format_parser : determine a data-type from formats, names, titles.

Notes
-----
This constructor can be compared to ``empty``: it creates a new record
array but does not fill it with data.  To create a record array from data,
use one of the following methods:

1. Create a standard ndarray and convert it to a record array,
   using ``arr.view(np.recarray)``
2. Use the `buf` keyword.
3. Use `np.rec.fromrecords`.

Examples
--------
Create an array with two fields, ``x`` and ``y``:

>>> x = np.array([(1.0, 2), (3.0, 4)], dtype=[('x', '<f8'), ('y', '<i8')])
>>> x
array([(1., 2), (3., 4)], dtype=[('x', '<f8'), ('y', '<i8')])

>>> x['x']
array([1., 3.])

View the array as a record array:

>>> x = x.view(np.recarray)

>>> x.x
array([1., 3.])

>>> x.y
array([2, 4])

Create a new, empty record array:

>>> np.recarray((2,),
... dtype=[('x', int), ('y', float), ('z', int)]) #doctest: +SKIP
rec.array([(-1073741821, 1.2249118382103472e-301, 24547520),
       (3471280, 1.2134086255804012e-316, 0)],
      dtype=[('x', '<i4'), ('y', '<f8'), ('z', '<i4')])

---
## _deprecate_shape_0_as_None
```python
from records import _deprecate_shape_0_as_None
```



---
## fromarrays
```python
from records import fromarrays
```

Create a record array from a (flat) list of arrays

Parameters
----------
arrayList : list or tuple
    List of array-like objects (such as lists, tuples,
    and ndarrays).
dtype : data-type, optional
    valid dtype for all arrays
shape : int or tuple of ints, optional
    Shape of the resulting array. If not provided, inferred from
    ``arrayList[0]``.
formats, names, titles, aligned, byteorder :
    If `dtype` is ``None``, these arguments are passed to
    `numpy.format_parser` to construct a dtype. See that function for
    detailed documentation.

Returns
-------
np.recarray
    Record array consisting of given arrayList columns.

Examples
--------
>>> x1=np.array([1,2,3,4])
>>> x2=np.array(['a','dd','xyz','12'])
>>> x3=np.array([1.1,2,3,4])
>>> r = np.core.records.fromarrays([x1,x2,x3],names='a,b,c')
>>> print(r[1])
(2, 'dd', 2.0) # may vary
>>> x1[1]=34
>>> r.a
array([1, 2, 3, 4])

>>> x1 = np.array([1, 2, 3, 4])
>>> x2 = np.array(['a', 'dd', 'xyz', '12'])
>>> x3 = np.array([1.1, 2, 3,4])
>>> r = np.core.records.fromarrays(
...     [x1, x2, x3],
...     dtype=np.dtype([('a', np.int32), ('b', 'S3'), ('c', np.float32)]))
>>> r
rec.array([(1, b'a', 1.1), (2, b'dd', 2. ), (3, b'xyz', 3. ),
           (4, b'12', 4. )],
          dtype=[('a', '<i4'), ('b', 'S3'), ('c', '<f4')])

---
## fromrecords
```python
from records import fromrecords
```

Create a recarray from a list of records in text form.

Parameters
----------
recList : sequence
    data in the same field may be heterogeneous - they will be promoted
    to the highest data type.
dtype : data-type, optional
    valid dtype for all arrays
shape : int or tuple of ints, optional
    shape of each array.
formats, names, titles, aligned, byteorder :
    If `dtype` is ``None``, these arguments are passed to
    `numpy.format_parser` to construct a dtype. See that function for
    detailed documentation.

    If both `formats` and `dtype` are None, then this will auto-detect
    formats. Use list of tuples rather than list of lists for faster
    processing.

Returns
-------
np.recarray
    record array consisting of given recList rows.

Examples
--------
>>> r=np.core.records.fromrecords([(456,'dbe',1.2),(2,'de',1.3)],
... names='col1,col2,col3')
>>> print(r[0])
(456, 'dbe', 1.2)
>>> r.col1
array([456,   2])
>>> r.col2
array(['dbe', 'de'], dtype='<U3')
>>> import pickle
>>> pickle.loads(pickle.dumps(r))
rec.array([(456, 'dbe', 1.2), (  2, 'de', 1.3)],
          dtype=[('col1', '<i8'), ('col2', '<U3'), ('col3', '<f8')])

---
## fromstring
```python
from records import fromstring
```

Create a record array from binary data

Note that despite the name of this function it does not accept `str`
instances.

Parameters
----------
datastring : bytes-like
    Buffer of binary data
dtype : data-type, optional
    Valid dtype for all arrays
shape : int or tuple of ints, optional
    Shape of each array.
offset : int, optional
    Position in the buffer to start reading from.
formats, names, titles, aligned, byteorder :
    If `dtype` is ``None``, these arguments are passed to
    `numpy.format_parser` to construct a dtype. See that function for
    detailed documentation.


Returns
-------
np.recarray
    Record array view into the data in datastring. This will be readonly
    if `datastring` is readonly.

See Also
--------
numpy.frombuffer

Examples
--------
>>> a = b'\x01\x02\x03abc'
>>> np.core.records.fromstring(a, dtype='u1,u1,u1,S3')
rec.array([(1, 2, 3, b'abc')],
        dtype=[('f0', 'u1'), ('f1', 'u1'), ('f2', 'u1'), ('f3', 'S3')])

>>> grades_dtype = [('Name', (np.str_, 10)), ('Marks', np.float64),
...                 ('GradeLevel', np.int32)]
>>> grades_array = np.array([('Sam', 33.3, 3), ('Mike', 44.4, 5),
...                         ('Aadi', 66.6, 6)], dtype=grades_dtype)
>>> np.core.records.fromstring(grades_array.tobytes(), dtype=grades_dtype)
rec.array([('Sam', 33.3, 3), ('Mike', 44.4, 5), ('Aadi', 66.6, 6)],
        dtype=[('Name', '<U10'), ('Marks', '<f8'), ('GradeLevel', '<i4')])

>>> s = '\x01\x02\x03abc'
>>> np.core.records.fromstring(s, dtype='u1,u1,u1,S3')
Traceback (most recent call last)
   ...
TypeError: a bytes-like object is required, not 'str'

---
## get_remaining_size
```python
from records import get_remaining_size
```



---
## fromfile
```python
from records import fromfile
```

Create an array from binary file data

Parameters
----------
fd : str or file type
    If file is a string or a path-like object then that file is opened,
    else it is assumed to be a file object. The file object must
    support random access (i.e. it must have tell and seek methods).
dtype : data-type, optional
    valid dtype for all arrays
shape : int or tuple of ints, optional
    shape of each array.
offset : int, optional
    Position in the file to start reading from.
formats, names, titles, aligned, byteorder :
    If `dtype` is ``None``, these arguments are passed to
    `numpy.format_parser` to construct a dtype. See that function for
    detailed documentation

Returns
-------
np.recarray
    record array consisting of data enclosed in file.

Examples
--------
>>> from tempfile import TemporaryFile
>>> a = np.empty(10,dtype='f8,i4,a5')
>>> a[5] = (0.5,10,'abcde')
>>>
>>> fd=TemporaryFile()
>>> a = a.newbyteorder('<')
>>> a.tofile(fd)
>>>
>>> _ = fd.seek(0)
>>> r=np.core.records.fromfile(fd, formats='f8,i4,a5', shape=10,
... byteorder='<')
>>> print(r[5])
(0.5, 10, 'abcde')
>>> r.shape
(10,)

---
## array
```python
from records import array
```

Construct a record array from a wide-variety of objects.

A general-purpose record array constructor that dispatches to the
appropriate `recarray` creation function based on the inputs (see Notes).

Parameters
----------
obj : any
    Input object. See Notes for details on how various input types are
    treated.
dtype : data-type, optional
    Valid dtype for array.
shape : int or tuple of ints, optional
    Shape of each array.
offset : int, optional
    Position in the file or buffer to start reading from.
strides : tuple of ints, optional
    Buffer (`buf`) is interpreted according to these strides (strides
    define how many bytes each array element, row, column, etc.
    occupy in memory).
formats, names, titles, aligned, byteorder :
    If `dtype` is ``None``, these arguments are passed to
    `numpy.format_parser` to construct a dtype. See that function for
    detailed documentation.
copy : bool, optional
    Whether to copy the input object (True), or to use a reference instead.
    This option only applies when the input is an ndarray or recarray.
    Defaults to True.

Returns
-------
np.recarray
    Record array created from the specified object.

Notes
-----
If `obj` is ``None``, then call the `~numpy.recarray` constructor. If
`obj` is a string, then call the `fromstring` constructor. If `obj` is a
list or a tuple, then if the first object is an `~numpy.ndarray`, call
`fromarrays`, otherwise call `fromrecords`. If `obj` is a
`~numpy.recarray`, then make a copy of the data in the recarray
(if ``copy=True``) and use the new formats, names, and titles. If `obj`
is a file, then call `fromfile`. Finally, if obj is an `ndarray`, then
return ``obj.view(recarray)``, making a copy of the data if ``copy=True``.

Examples
--------
>>> a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
array([[1, 2, 3],
       [4, 5, 6],
       [7, 8, 9]])

>>> np.core.records.array(a)
rec.array([[1, 2, 3],
           [4, 5, 6],
           [7, 8, 9]],
    dtype=int32)

>>> b = [(1, 1), (2, 4), (3, 9)]
>>> c = np.core.records.array(b, formats = ['i2', 'f2'], names = ('x', 'y'))
>>> c
rec.array([(1, 1.0), (2, 4.0), (3, 9.0)],
          dtype=[('x', '<i2'), ('y', '<f2')])

>>> c.x
rec.array([1, 2, 3], dtype=int16)

>>> c.y
rec.array([ 1.0,  4.0,  9.0], dtype=float16)

>>> r = np.rec.array(['abc','def'], names=['col1','col2'])
>>> print(r.col1)
abc

>>> r.col1
array('abc', dtype='<U3')

>>> r.col2
array('def', dtype='<U3')

---
## __init__
```python
from records import __init__
```



---
## _parseFormats
```python
from records import _parseFormats
```

Parse the field formats 

---
## _setfieldnames
```python
from records import _setfieldnames
```

convert input field names into a list and assign to the _names
attribute 

---
## _createdtype
```python
from records import _createdtype
```



---
## __repr__
```python
from records import __repr__
```



---
## __str__
```python
from records import __str__
```



---
## __getattribute__
```python
from records import __getattribute__
```



---
## __setattr__
```python
from records import __setattr__
```



---
## __getitem__
```python
from records import __getitem__
```



---
## pprint
```python
from records import pprint
```

Pretty-print all fields.

---
## __new__
```python
from records import __new__
```



---
## __array_finalize__
```python
from records import __array_finalize__
```



---
## field
```python
from records import field
```



---
## __name__
```python
from _add_newdocs_scalars import __name__
```

This file is separate from ``_add_newdocs.py`` so that it can be mocked out by
our sphinx ``conf.py`` during doc builds, where we want to avoid showing
platform-dependent information.

---
## numeric_type_aliases
```python
from _add_newdocs_scalars import numeric_type_aliases
```



---
## _get_platform_and_machine
```python
from _add_newdocs_scalars import _get_platform_and_machine
```



---
## add_newdoc_for_scalar_type
```python
from _add_newdocs_scalars import add_newdoc_for_scalar_type
```



---
## type_aliases_gen
```python
from _add_newdocs_scalars import type_aliases_gen
```



---
## _ufunc_reconstruct
```python
from __init__ import _ufunc_reconstruct
```



---
## _ufunc_reduce
```python
from __init__ import _ufunc_reduce
```



---
## _DType_reconstruct
```python
from __init__ import _DType_reconstruct
```



---
## _DType_reduce
```python
from __init__ import _DType_reduce
```



---
## __name__
```python
from _machar import __name__
```

Machine arithmetic - determine the parameters of the
floating-point arithmetic system

Author: Pearu Peterson, September 2003

---
## MachAr
```python
from _machar import MachAr
```

Diagnosing machine parameters.

Attributes
----------
ibeta : int
    Radix in which numbers are represented.
it : int
    Number of base-`ibeta` digits in the floating point mantissa M.
machep : int
    Exponent of the smallest (most negative) power of `ibeta` that,
    added to 1.0, gives something different from 1.0
eps : float
    Floating-point number ``beta**machep`` (floating point precision)
negep : int
    Exponent of the smallest power of `ibeta` that, subtracted
    from 1.0, gives something different from 1.0.
epsneg : float
    Floating-point number ``beta**negep``.
iexp : int
    Number of bits in the exponent (including its sign and bias).
minexp : int
    Smallest (most negative) power of `ibeta` consistent with there
    being no leading zeros in the mantissa.
xmin : float
    Floating-point number ``beta**minexp`` (the smallest [in
    magnitude] positive floating point number with full precision).
maxexp : int
    Smallest (positive) power of `ibeta` that causes overflow.
xmax : float
    ``(1-epsneg) * beta**maxexp`` (the largest [in magnitude]
    usable floating value).
irnd : int
    In ``range(6)``, information on what kind of rounding is done
    in addition, and on how underflow is handled.
ngrd : int
    Number of 'guard digits' used when truncating the product
    of two mantissas to fit the representation.
epsilon : float
    Same as `eps`.
tiny : float
    An alias for `smallest_normal`, kept for backwards compatibility.
huge : float
    Same as `xmax`.
precision : float
    ``- int(-log10(eps))``
resolution : float
    ``- 10**(-precision)``
smallest_normal : float
    The smallest positive floating point number with 1 as leading bit in
    the mantissa following IEEE-754. Same as `xmin`.
smallest_subnormal : float
    The smallest positive floating point number with 0 as leading bit in
    the mantissa following IEEE-754.

Parameters
----------
float_conv : function, optional
    Function that converts an integer or integer array to a float
    or float array. Default is `float`.
int_conv : function, optional
    Function that converts a float or float array to an integer or
    integer array. Default is `int`.
float_to_float : function, optional
    Function that converts a float array to float. Default is `float`.
    Note that this does not seem to do anything useful in the current
    implementation.
float_to_str : function, optional
    Function that converts a single float to a string. Default is
    ``lambda v:'%24.16e' %v``.
title : str, optional
    Title that is printed in the string representation of `MachAr`.

See Also
--------
finfo : Machine limits for floating point types.
iinfo : Machine limits for integer types.

References
----------
.. [1] Press, Teukolsky, Vetterling and Flannery,
       "Numerical Recipes in C++," 2nd ed,
       Cambridge University Press, 2002, p. 31.

---
## __init__
```python
from _machar import __init__
```

float_conv - convert integer to float (array)
int_conv   - convert float (array) to integer
float_to_float - convert float array to float
float_to_str - convert array float to str
title        - description of used floating point numbers

---
## _do_init
```python
from _machar import _do_init
```



---
## __str__
```python
from _machar import __str__
```



---
## __name__
```python
from memmap import __name__
```



---
## memmap
```python
from memmap import memmap
```

Create a memory-map to an array stored in a *binary* file on disk.

Memory-mapped files are used for accessing small segments of large files
on disk, without reading the entire file into memory.  NumPy's
memmap's are array-like objects.  This differs from Python's ``mmap``
module, which uses file-like objects.

This subclass of ndarray has some unpleasant interactions with
some operations, because it doesn't quite fit properly as a subclass.
An alternative to using this subclass is to create the ``mmap``
object yourself, then create an ndarray with ndarray.__new__ directly,
passing the object created in its 'buffer=' parameter.

This class may at some point be turned into a factory function
which returns a view into an mmap buffer.

Flush the memmap instance to write the changes to the file. Currently there
is no API to close the underlying ``mmap``. It is tricky to ensure the
resource is actually closed, since it may be shared between different
memmap instances.


Parameters
----------
filename : str, file-like object, or pathlib.Path instance
    The file name or file object to be used as the array data buffer.
dtype : data-type, optional
    The data-type used to interpret the file contents.
    Default is `uint8`.
mode : {'r+', 'r', 'w+', 'c'}, optional
    The file is opened in this mode:

    +------+-------------------------------------------------------------+
    | 'r'  | Open existing file for reading only.                        |
    +------+-------------------------------------------------------------+
    | 'r+' | Open existing file for reading and writing.                 |
    +------+-------------------------------------------------------------+
    | 'w+' | Create or overwrite existing file for reading and writing.  |
    |      | If ``mode == 'w+'`` then `shape` must also be specified.    |
    +------+-------------------------------------------------------------+
    | 'c'  | Copy-on-write: assignments affect data in memory, but       |
    |      | changes are not saved to disk.  The file on disk is         |
    |      | read-only.                                                  |
    +------+-------------------------------------------------------------+

    Default is 'r+'.
offset : int, optional
    In the file, array data starts at this offset. Since `offset` is
    measured in bytes, it should normally be a multiple of the byte-size
    of `dtype`. When ``mode != 'r'``, even positive offsets beyond end of
    file are valid; The file will be extended to accommodate the
    additional data. By default, ``memmap`` will start at the beginning of
    the file, even if ``filename`` is a file pointer ``fp`` and
    ``fp.tell() != 0``.
shape : tuple, optional
    The desired shape of the array. If ``mode == 'r'`` and the number
    of remaining bytes after `offset` is not a multiple of the byte-size
    of `dtype`, you must specify `shape`. By default, the returned array
    will be 1-D with the number of elements determined by file size
    and data-type.
order : {'C', 'F'}, optional
    Specify the order of the ndarray memory layout:
    :term:`row-major`, C-style or :term:`column-major`,
    Fortran-style.  This only has an effect if the shape is
    greater than 1-D.  The default order is 'C'.

Attributes
----------
filename : str or pathlib.Path instance
    Path to the mapped file.
offset : int
    Offset position in the file.
mode : str
    File mode.

Methods
-------
flush
    Flush any changes in memory to file on disk.
    When you delete a memmap object, flush is called first to write
    changes to disk.


See also
--------
lib.format.open_memmap : Create or load a memory-mapped ``.npy`` file.

Notes
-----
The memmap object can be used anywhere an ndarray is accepted.
Given a memmap ``fp``, ``isinstance(fp, numpy.ndarray)`` returns
``True``.

Memory-mapped files cannot be larger than 2GB on 32-bit systems.

When a memmap causes a file to be created or extended beyond its
current size in the filesystem, the contents of the new part are
unspecified. On systems with POSIX filesystem semantics, the extended
part will be filled with zero bytes.

Examples
--------
>>> data = np.arange(12, dtype='float32')
>>> data.resize((3,4))

This example uses a temporary file so that doctest doesn't write
files to your directory. You would use a 'normal' filename.

>>> from tempfile import mkdtemp
>>> import os.path as path
>>> filename = path.join(mkdtemp(), 'newfile.dat')

Create a memmap with dtype and shape that matches our data:

>>> fp = np.memmap(filename, dtype='float32', mode='w+', shape=(3,4))
>>> fp
memmap([[0., 0., 0., 0.],
        [0., 0., 0., 0.],
        [0., 0., 0., 0.]], dtype=float32)

Write data to memmap array:

>>> fp[:] = data[:]
>>> fp
memmap([[  0.,   1.,   2.,   3.],
        [  4.,   5.,   6.,   7.],
        [  8.,   9.,  10.,  11.]], dtype=float32)

>>> fp.filename == path.abspath(filename)
True

Flushes memory changes to disk in order to read them back

>>> fp.flush()

Load the memmap and verify data was stored:

>>> newfp = np.memmap(filename, dtype='float32', mode='r', shape=(3,4))
>>> newfp
memmap([[  0.,   1.,   2.,   3.],
        [  4.,   5.,   6.,   7.],
        [  8.,   9.,  10.,  11.]], dtype=float32)

Read-only memmap:

>>> fpr = np.memmap(filename, dtype='float32', mode='r', shape=(3,4))
>>> fpr.flags.writeable
False

Copy-on-write memmap:

>>> fpc = np.memmap(filename, dtype='float32', mode='c', shape=(3,4))
>>> fpc.flags.writeable
True

It's possible to assign to copy-on-write array, but values are only
written into the memory copy of the array, and not written to disk:

>>> fpc
memmap([[  0.,   1.,   2.,   3.],
        [  4.,   5.,   6.,   7.],
        [  8.,   9.,  10.,  11.]], dtype=float32)
>>> fpc[0,:] = 0
>>> fpc
memmap([[  0.,   0.,   0.,   0.],
        [  4.,   5.,   6.,   7.],
        [  8.,   9.,  10.,  11.]], dtype=float32)

File on disk is unchanged:

>>> fpr
memmap([[  0.,   1.,   2.,   3.],
        [  4.,   5.,   6.,   7.],
        [  8.,   9.,  10.,  11.]], dtype=float32)

Offset into a memmap:

>>> fpo = np.memmap(filename, dtype='float32', mode='r', offset=16)
>>> fpo
memmap([  4.,   5.,   6.,   7.,   8.,   9.,  10.,  11.], dtype=float32)

---
## __new__
```python
from memmap import __new__
```



---
## __array_finalize__
```python
from memmap import __array_finalize__
```



---
## flush
```python
from memmap import flush
```

Write any changes in the array to the file on disk.

For further information, see `memmap`.

Parameters
----------
None

See Also
--------
memmap

---
## __array_wrap__
```python
from memmap import __array_wrap__
```



---
## __getitem__
```python
from memmap import __getitem__
```



---
## __name__
```python
from overrides import __name__
```

Tools for testing implementations of __array_function__ and ufunc overrides

---
## set_array_function_like_doc
```python
from overrides import set_array_function_like_doc
```



---
## verify_matching_signatures
```python
from overrides import verify_matching_signatures
```

Verify that a dispatcher function has the right signature.

---
## array_function_dispatch
```python
from overrides import array_function_dispatch
```

Decorator for adding dispatch with the __array_function__ protocol.

See NEP-18 for example usage.

Parameters
----------
dispatcher : callable or None
    Function that when called like ``dispatcher(*args, **kwargs)`` with
    arguments from the NumPy function call returns an iterable of
    array-like arguments to check for ``__array_function__``.

    If `None`, the first argument is used as the single `like=` argument
    and not passed on.  A function implementing `like=` must call its
    dispatcher with `like` as the first non-keyword argument.
module : str, optional
    __module__ attribute to set on new function, e.g., ``module='numpy'``.
    By default, module is copied from the decorated function.
verify : bool, optional
    If True, verify the that the signature of the dispatcher and decorated
    function signatures match exactly: all required and optional arguments
    should appear in order with the same names, but the default values for
    all optional arguments should be ``None``. Only disable verification
    if the dispatcher's signature needs to deviate for some particular
    reason, e.g., because the function has a signature like
    ``func(*args, **kwargs)``.
docs_from_dispatcher : bool, optional
    If True, copy docs from the dispatcher function onto the dispatched
    function, rather than from the implementation. This is useful for
    functions defined in C, which otherwise don't have docstrings.

Returns
-------
Function suitable for decorating the implementation of a NumPy function.

---
## array_function_from_dispatcher
```python
from overrides import array_function_from_dispatcher
```

Like array_function_dispatcher, but with function arguments flipped.

---
## decorator
```python
from overrides import decorator
```



---
## __name__
```python
from getlimits import __name__
```

Machine limits for Float32 and Float64 and (long double) if available...

---
## _fr0
```python
from getlimits import _fr0
```

fix rank-0 --> rank-1

---
## _fr1
```python
from getlimits import _fr1
```

fix rank > 0 --> rank-0

---
## MachArLike
```python
from getlimits import MachArLike
```

Object to simulate MachAr instance 

---
## _register_type
```python
from getlimits import _register_type
```



---
## _register_known_types
```python
from getlimits import _register_known_types
```



---
## _get_machar
```python
from getlimits import _get_machar
```

Get MachAr instance or MachAr-like instance

Get parameters for floating point type, by first trying signatures of
various known floating point types, then, if none match, attempting to
identify parameters by analysis.

Parameters
----------
ftype : class
    Numpy floating point type class (e.g. ``np.float64``)

Returns
-------
ma_like : instance of :class:`MachAr` or :class:`MachArLike`
    Object giving floating point parameters for `ftype`.

Warns
-----
UserWarning
    If the binary signature of the float type is not in the dictionary of
    known float types.

---
## _discovered_machar
```python
from getlimits import _discovered_machar
```

Create MachAr instance with found information on float types

TODO: MachAr should be retired completely ideally.  We currently only
      ever use it system with broken longdouble (valgrind, WSL).

---
## finfo
```python
from getlimits import finfo
```

finfo(dtype)

Machine limits for floating point types.

Attributes
----------
bits : int
    The number of bits occupied by the type.
dtype : dtype
    Returns the dtype for which `finfo` returns information. For complex
    input, the returned dtype is the associated ``float*`` dtype for its
    real and complex components.
eps : float
    The difference between 1.0 and the next smallest representable float
    larger than 1.0. For example, for 64-bit binary floats in the IEEE-754
    standard, ``eps = 2**-52``, approximately 2.22e-16.
epsneg : float
    The difference between 1.0 and the next smallest representable float
    less than 1.0. For example, for 64-bit binary floats in the IEEE-754
    standard, ``epsneg = 2**-53``, approximately 1.11e-16.
iexp : int
    The number of bits in the exponent portion of the floating point
    representation.
machep : int
    The exponent that yields `eps`.
max : floating point number of the appropriate type
    The largest representable number.
maxexp : int
    The smallest positive power of the base (2) that causes overflow.
min : floating point number of the appropriate type
    The smallest representable number, typically ``-max``.
minexp : int
    The most negative power of the base (2) consistent with there
    being no leading 0's in the mantissa.
negep : int
    The exponent that yields `epsneg`.
nexp : int
    The number of bits in the exponent including its sign and bias.
nmant : int
    The number of bits in the mantissa.
precision : int
    The approximate number of decimal digits to which this kind of
    float is precise.
resolution : floating point number of the appropriate type
    The approximate decimal resolution of this type, i.e.,
    ``10**-precision``.
tiny : float
    An alias for `smallest_normal`, kept for backwards compatibility.
smallest_normal : float
    The smallest positive floating point number with 1 as leading bit in
    the mantissa following IEEE-754 (see Notes).
smallest_subnormal : float
    The smallest positive floating point number with 0 as leading bit in
    the mantissa following IEEE-754.

Parameters
----------
dtype : float, dtype, or instance
    Kind of floating point or complex floating point
    data-type about which to get information.

See Also
--------
iinfo : The equivalent for integer data types.
spacing : The distance between a value and the nearest adjacent number
nextafter : The next floating point value after x1 towards x2

Notes
-----
For developers of NumPy: do not instantiate this at the module level.
The initial calculation of these parameters is expensive and negatively
impacts import times.  These objects are cached, so calling ``finfo()``
repeatedly inside your functions is not a problem.

Note that ``smallest_normal`` is not actually the smallest positive
representable value in a NumPy floating point type. As in the IEEE-754
standard [1]_, NumPy floating point types make use of subnormal numbers to
fill the gap between 0 and ``smallest_normal``. However, subnormal numbers
may have significantly reduced precision [2]_.

This function can also be used for complex data types as well. If used,
the output will be the same as the corresponding real float type
(e.g. numpy.finfo(numpy.csingle) is the same as numpy.finfo(numpy.single)).
However, the output is true for the real and imaginary components.

References
----------
.. [1] IEEE Standard for Floating-Point Arithmetic, IEEE Std 754-2008,
       pp.1-70, 2008, http://www.doi.org/10.1109/IEEESTD.2008.4610935
.. [2] Wikipedia, "Denormal Numbers",
       https://en.wikipedia.org/wiki/Denormal_number

Examples
--------
>>> np.finfo(np.float64).dtype
dtype('float64')
>>> np.finfo(np.complex64).dtype
dtype('float32')

---
## iinfo
```python
from getlimits import iinfo
```

iinfo(type)

Machine limits for integer types.

Attributes
----------
bits : int
    The number of bits occupied by the type.
dtype : dtype
    Returns the dtype for which `iinfo` returns information.
min : int
    The smallest integer expressible by the type.
max : int
    The largest integer expressible by the type.

Parameters
----------
int_type : integer type, dtype, or instance
    The kind of integer data type to get information about.

See Also
--------
finfo : The equivalent for floating point data types.

Examples
--------
With types:

>>> ii16 = np.iinfo(np.int16)
>>> ii16.min
-32768
>>> ii16.max
32767
>>> ii32 = np.iinfo(np.int32)
>>> ii32.min
-2147483648
>>> ii32.max
2147483647

With instances:

>>> ii32 = np.iinfo(np.int32(10))
>>> ii32.min
-2147483648
>>> ii32.max
2147483647

---
## __init__
```python
from getlimits import __init__
```



---
## smallest_subnormal
```python
from getlimits import smallest_subnormal
```

Return the value for the smallest subnormal.

Returns
-------
smallest_subnormal : float
    value for the smallest subnormal.

Warns
-----
UserWarning
    If the calculated value for the smallest subnormal is zero.

---
## _str_smallest_subnormal
```python
from getlimits import _str_smallest_subnormal
```

Return the string representation of the smallest subnormal.

---
## _float_to_float
```python
from getlimits import _float_to_float
```

Converts float to float.

Parameters
----------
value : float
    value to be converted.

---
## _float_conv
```python
from getlimits import _float_conv
```

Converts float to conv.

Parameters
----------
value : float
    value to be converted.

---
## _float_to_str
```python
from getlimits import _float_to_str
```

Converts float to str.

Parameters
----------
value : float
    value to be converted.

---
## __new__
```python
from getlimits import __new__
```



---
## _init
```python
from getlimits import _init
```



---
## __str__
```python
from getlimits import __str__
```

String representation.

---
## __repr__
```python
from getlimits import __repr__
```



---
## smallest_normal
```python
from getlimits import smallest_normal
```

Return the value for the smallest normal.

Returns
-------
smallest_normal : float
    Value for the smallest normal.

Warns
-----
UserWarning
    If the calculated value for the smallest normal is requested for
    double-double.

---
## tiny
```python
from getlimits import tiny
```

Return the value for tiny, alias of smallest_normal.

Returns
-------
tiny : float
    Value for the smallest normal, alias of smallest_normal.

Warns
-----
UserWarning
    If the calculated value for the smallest normal is requested for
    double-double.

---
## min
```python
from getlimits import min
```

Minimum value of given dtype.

---
## max
```python
from getlimits import max
```

Maximum value of given dtype.

---
## __name__
```python
from _dtype_ctypes import __name__
```



---
## _from_ctypes_array
```python
from _dtype_ctypes import _from_ctypes_array
```



---
## _from_ctypes_structure
```python
from _dtype_ctypes import _from_ctypes_structure
```



---
## _from_ctypes_scalar
```python
from _dtype_ctypes import _from_ctypes_scalar
```

Return the dtype type with endianness included if it's the case

---
## _from_ctypes_union
```python
from _dtype_ctypes import _from_ctypes_union
```



---
## dtype_from_ctypes_type
```python
from _dtype_ctypes import dtype_from_ctypes_type
```

Construct a dtype object from a ctypes type

---
## __name__
```python
from defchararray import __name__
```

This module contains a set of functions for vectorized string
operations and methods.

.. note::
   The `chararray` class exists for backwards compatibility with
   Numarray, it is not recommended for new development. Starting from numpy
   1.4, if one needs arrays of strings, it is recommended to use arrays of
   `dtype` `object_`, `bytes_` or `str_`, and use the free functions
   in the `numpy.char` module for fast vectorized string operations.

Some methods will only be available if the corresponding string method is
available in your version of Python.

The preferred alias for `defchararray` is `numpy.char`.

---
## _is_unicode
```python
from defchararray import _is_unicode
```

Returns True if arr is a string or a string array with a dtype that
represents a unicode string, otherwise returns False.

---
## _to_bytes_or_str_array
```python
from defchararray import _to_bytes_or_str_array
```

Helper function to cast a result back into an array
with the appropriate dtype if an object array must be used
as an intermediary.

---
## _clean_args
```python
from defchararray import _clean_args
```

Helper function for delegating arguments to Python string
functions.

Many of the Python string operations that have optional arguments
do not use 'None' to indicate a default value.  In these cases,
we need to remove all None arguments, and those following them.

---
## _get_num_chars
```python
from defchararray import _get_num_chars
```

Helper function that returns the number of characters per field in
a string or unicode array.  This is to abstract out the fact that
for a unicode array this is itemsize / 4.

---
## _binary_op_dispatcher
```python
from defchararray import _binary_op_dispatcher
```



---
## equal
```python
from defchararray import equal
```

Return (x1 == x2) element-wise.

Unlike `numpy.equal`, this comparison is performed by first
stripping whitespace characters from the end of the string.  This
behavior is provided for backward-compatibility with numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
not_equal, greater_equal, less_equal, greater, less

---
## not_equal
```python
from defchararray import not_equal
```

Return (x1 != x2) element-wise.

Unlike `numpy.not_equal`, this comparison is performed by first
stripping whitespace characters from the end of the string.  This
behavior is provided for backward-compatibility with numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
equal, greater_equal, less_equal, greater, less

---
## greater_equal
```python
from defchararray import greater_equal
```

Return (x1 >= x2) element-wise.

Unlike `numpy.greater_equal`, this comparison is performed by
first stripping whitespace characters from the end of the string.
This behavior is provided for backward-compatibility with
numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
equal, not_equal, less_equal, greater, less

---
## less_equal
```python
from defchararray import less_equal
```

Return (x1 <= x2) element-wise.

Unlike `numpy.less_equal`, this comparison is performed by first
stripping whitespace characters from the end of the string.  This
behavior is provided for backward-compatibility with numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, greater, less

---
## greater
```python
from defchararray import greater
```

Return (x1 > x2) element-wise.

Unlike `numpy.greater`, this comparison is performed by first
stripping whitespace characters from the end of the string.  This
behavior is provided for backward-compatibility with numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, less_equal, less

---
## less
```python
from defchararray import less
```

Return (x1 < x2) element-wise.

Unlike `numpy.greater`, this comparison is performed by first
stripping whitespace characters from the end of the string.  This
behavior is provided for backward-compatibility with numarray.

Parameters
----------
x1, x2 : array_like of str or unicode
    Input arrays of the same shape.

Returns
-------
out : ndarray
    Output array of bools.

See Also
--------
equal, not_equal, greater_equal, less_equal, greater

---
## _unary_op_dispatcher
```python
from defchararray import _unary_op_dispatcher
```



---
## str_len
```python
from defchararray import str_len
```

Return len(a) element-wise.

Parameters
----------
a : array_like of str or unicode

Returns
-------
out : ndarray
    Output array of integers

See Also
--------
len

Examples
--------
>>> a = np.array(['Grace Hopper Conference', 'Open Source Day'])
>>> np.char.str_len(a)
array([23, 15])
>>> a = np.array([u'Р', u'о'])
>>> np.char.str_len(a)
array([1, 1])
>>> a = np.array([['hello', 'world'], [u'Р', u'о']])
>>> np.char.str_len(a)
array([[5, 5], [1, 1]])

---
## add
```python
from defchararray import add
```

Return element-wise string concatenation for two arrays of str or unicode.

Arrays `x1` and `x2` must have the same shape.

Parameters
----------
x1 : array_like of str or unicode
    Input array.
x2 : array_like of str or unicode
    Input array.

Returns
-------
add : ndarray
    Output array of `bytes_` or `str_`, depending on input types
    of the same shape as `x1` and `x2`.

---
## _multiply_dispatcher
```python
from defchararray import _multiply_dispatcher
```



---
## multiply
```python
from defchararray import multiply
```

Return (a * i), that is string multiple concatenation,
element-wise.

Values in `i` of less than 0 are treated as 0 (which yields an
empty string).

Parameters
----------
a : array_like of str or unicode

i : array_like of ints

Returns
-------
out : ndarray
    Output array of str or unicode, depending on input types

Examples
--------
>>> a = np.array(["a", "b", "c"])
>>> np.char.multiply(x, 3)
array(['aaa', 'bbb', 'ccc'], dtype='<U3')
>>> i = np.array([1, 2, 3])
>>> np.char.multiply(a, i)
array(['a', 'bb', 'ccc'], dtype='<U3')
>>> np.char.multiply(np.array(['a']), i)
array(['a', 'aa', 'aaa'], dtype='<U3')
>>> a = np.array(['a', 'b', 'c', 'd', 'e', 'f']).reshape((2, 3))
>>> np.char.multiply(a, 3)
array([['aaa', 'bbb', 'ccc'],
       ['ddd', 'eee', 'fff']], dtype='<U3')
>>> np.char.multiply(a, i)
array([['a', 'bb', 'ccc'],
       ['d', 'ee', 'fff']], dtype='<U3')

---
## _mod_dispatcher
```python
from defchararray import _mod_dispatcher
```



---
## mod
```python
from defchararray import mod
```

Return (a % i), that is pre-Python 2.6 string formatting
(interpolation), element-wise for a pair of array_likes of str
or unicode.

Parameters
----------
a : array_like of str or unicode

values : array_like of values
   These values will be element-wise interpolated into the string.

Returns
-------
out : ndarray
    Output array of str or unicode, depending on input types

See Also
--------
str.__mod__

---
## capitalize
```python
from defchararray import capitalize
```

Return a copy of `self` with only the first character of each element
capitalized.

See Also
--------
char.capitalize

---
## _center_dispatcher
```python
from defchararray import _center_dispatcher
```



---
## center
```python
from defchararray import center
```

Return a copy of `self` with its elements centered in a
string of length `width`.

See Also
--------
center

---
## _count_dispatcher
```python
from defchararray import _count_dispatcher
```



---
## count
```python
from defchararray import count
```

Returns an array with the number of non-overlapping occurrences of
substring `sub` in the range [`start`, `end`].

See Also
--------
char.count

---
## _code_dispatcher
```python
from defchararray import _code_dispatcher
```



---
## decode
```python
from defchararray import decode
```

Calls ``bytes.decode`` element-wise.

See Also
--------
char.decode

---
## encode
```python
from defchararray import encode
```

Calls `str.encode` element-wise.

See Also
--------
char.encode

---
## _endswith_dispatcher
```python
from defchararray import _endswith_dispatcher
```



---
## endswith
```python
from defchararray import endswith
```

Returns a boolean array which is `True` where the string element
in `self` ends with `suffix`, otherwise `False`.

See Also
--------
char.endswith

---
## _expandtabs_dispatcher
```python
from defchararray import _expandtabs_dispatcher
```



---
## expandtabs
```python
from defchararray import expandtabs
```

Return a copy of each string element where all tab characters are
replaced by one or more spaces.

See Also
--------
char.expandtabs

---
## find
```python
from defchararray import find
```

For each element, return the lowest index in the string where
substring `sub` is found.

See Also
--------
char.find

---
## index
```python
from defchararray import index
```

Like `find`, but raises `ValueError` when the substring is not found.

See Also
--------
char.index

---
## isalnum
```python
from defchararray import isalnum
```

Returns true for each element if all characters in the string
are alphanumeric and there is at least one character, false
otherwise.

See Also
--------
char.isalnum

---
## isalpha
```python
from defchararray import isalpha
```

Returns true for each element if all characters in the string
are alphabetic and there is at least one character, false
otherwise.

See Also
--------
char.isalpha

---
## isdigit
```python
from defchararray import isdigit
```

Returns true for each element if all characters in the string are
digits and there is at least one character, false otherwise.

See Also
--------
char.isdigit

---
## islower
```python
from defchararray import islower
```

Returns true for each element if all cased characters in the
string are lowercase and there is at least one cased character,
false otherwise.

See Also
--------
char.islower

---
## isspace
```python
from defchararray import isspace
```

Returns true for each element if there are only whitespace
characters in the string and there is at least one character,
false otherwise.

See Also
--------
char.isspace

---
## istitle
```python
from defchararray import istitle
```

Returns true for each element if the element is a titlecased
string and there is at least one character, false otherwise.

See Also
--------
char.istitle

---
## isupper
```python
from defchararray import isupper
```

Returns true for each element if all cased characters in the
string are uppercase and there is at least one character, false
otherwise.

See Also
--------
char.isupper

---
## _join_dispatcher
```python
from defchararray import _join_dispatcher
```



---
## join
```python
from defchararray import join
```

Return a string which is the concatenation of the strings in the
sequence `seq`.

See Also
--------
char.join

---
## _just_dispatcher
```python
from defchararray import _just_dispatcher
```



---
## ljust
```python
from defchararray import ljust
```

Return an array with the elements of `self` left-justified in a
string of length `width`.

See Also
--------
char.ljust

---
## lower
```python
from defchararray import lower
```

Return an array with the elements of `self` converted to
lowercase.

See Also
--------
char.lower

---
## _strip_dispatcher
```python
from defchararray import _strip_dispatcher
```



---
## lstrip
```python
from defchararray import lstrip
```

For each element in `self`, return a copy with the leading characters
removed.

See Also
--------
char.lstrip

---
## _partition_dispatcher
```python
from defchararray import _partition_dispatcher
```



---
## partition
```python
from defchararray import partition
```

Partition each element in `self` around `sep`.

See Also
--------
partition

---
## _replace_dispatcher
```python
from defchararray import _replace_dispatcher
```



---
## replace
```python
from defchararray import replace
```

For each element in `self`, return a copy of the string with all
occurrences of substring `old` replaced by `new`.

See Also
--------
char.replace

---
## rfind
```python
from defchararray import rfind
```

For each element in `self`, return the highest index in the string
where substring `sub` is found, such that `sub` is contained
within [`start`, `end`].

See Also
--------
char.rfind

---
## rindex
```python
from defchararray import rindex
```

Like `rfind`, but raises `ValueError` when the substring `sub` is
not found.

See Also
--------
char.rindex

---
## rjust
```python
from defchararray import rjust
```

Return an array with the elements of `self`
right-justified in a string of length `width`.

See Also
--------
char.rjust

---
## rpartition
```python
from defchararray import rpartition
```

Partition each element in `self` around `sep`.

See Also
--------
rpartition

---
## _split_dispatcher
```python
from defchararray import _split_dispatcher
```



---
## rsplit
```python
from defchararray import rsplit
```

For each element in `self`, return a list of the words in
the string, using `sep` as the delimiter string.

See Also
--------
char.rsplit

---
## rstrip
```python
from defchararray import rstrip
```

For each element in `self`, return a copy with the trailing
characters removed.

See Also
--------
char.rstrip

---
## split
```python
from defchararray import split
```

For each element in `self`, return a list of the words in the
string, using `sep` as the delimiter string.

See Also
--------
char.split

---
## _splitlines_dispatcher
```python
from defchararray import _splitlines_dispatcher
```



---
## splitlines
```python
from defchararray import splitlines
```

For each element in `self`, return a list of the lines in the
element, breaking at line boundaries.

See Also
--------
char.splitlines

---
## _startswith_dispatcher
```python
from defchararray import _startswith_dispatcher
```



---
## startswith
```python
from defchararray import startswith
```

Returns a boolean array which is `True` where the string element
in `self` starts with `prefix`, otherwise `False`.

See Also
--------
char.startswith

---
## strip
```python
from defchararray import strip
```

For each element in `self`, return a copy with the leading and
trailing characters removed.

See Also
--------
char.strip

---
## swapcase
```python
from defchararray import swapcase
```

For each element in `self`, return a copy of the string with
uppercase characters converted to lowercase and vice versa.

See Also
--------
char.swapcase

---
## title
```python
from defchararray import title
```

For each element in `self`, return a titlecased version of the
string: words start with uppercase characters, all remaining cased
characters are lowercase.

See Also
--------
char.title

---
## _translate_dispatcher
```python
from defchararray import _translate_dispatcher
```



---
## translate
```python
from defchararray import translate
```

For each element in `self`, return a copy of the string where
all characters occurring in the optional argument
`deletechars` are removed, and the remaining characters have
been mapped through the given translation table.

See Also
--------
char.translate

---
## upper
```python
from defchararray import upper
```

Return an array with the elements of `self` converted to
uppercase.

See Also
--------
char.upper

---
## _zfill_dispatcher
```python
from defchararray import _zfill_dispatcher
```



---
## zfill
```python
from defchararray import zfill
```

Return the numeric string left-filled with zeros in a string of
length `width`.

See Also
--------
char.zfill

---
## isnumeric
```python
from defchararray import isnumeric
```

For each element in `self`, return True if there are only
numeric characters in the element.

See Also
--------
char.isnumeric

---
## isdecimal
```python
from defchararray import isdecimal
```

For each element in `self`, return True if there are only
decimal characters in the element.

See Also
--------
char.isdecimal

---
## chararray
```python
from defchararray import chararray
```

chararray(shape, itemsize=1, unicode=False, buffer=None, offset=0,
          strides=None, order=None)

Provides a convenient view on arrays of string and unicode values.

.. note::
   The `chararray` class exists for backwards compatibility with
   Numarray, it is not recommended for new development. Starting from numpy
   1.4, if one needs arrays of strings, it is recommended to use arrays of
   `dtype` `object_`, `bytes_` or `str_`, and use the free functions
   in the `numpy.char` module for fast vectorized string operations.

Versus a regular NumPy array of type `str` or `unicode`, this
class adds the following functionality:

  1) values automatically have whitespace removed from the end
     when indexed

  2) comparison operators automatically remove whitespace from the
     end when comparing values

  3) vectorized string operations are provided as methods
     (e.g. `.endswith`) and infix operators (e.g. ``"+", "*", "%"``)

chararrays should be created using `numpy.char.array` or
`numpy.char.asarray`, rather than this constructor directly.

This constructor creates the array, using `buffer` (with `offset`
and `strides`) if it is not ``None``. If `buffer` is ``None``, then
constructs a new array with `strides` in "C order", unless both
``len(shape) >= 2`` and ``order='F'``, in which case `strides`
is in "Fortran order".

Methods
-------
astype
argsort
copy
count
decode
dump
dumps
encode
endswith
expandtabs
fill
find
flatten
getfield
index
isalnum
isalpha
isdecimal
isdigit
islower
isnumeric
isspace
istitle
isupper
item
join
ljust
lower
lstrip
nonzero
put
ravel
repeat
replace
reshape
resize
rfind
rindex
rjust
rsplit
rstrip
searchsorted
setfield
setflags
sort
split
splitlines
squeeze
startswith
strip
swapaxes
swapcase
take
title
tofile
tolist
tostring
translate
transpose
upper
view
zfill

Parameters
----------
shape : tuple
    Shape of the array.
itemsize : int, optional
    Length of each array element, in number of characters. Default is 1.
unicode : bool, optional
    Are the array elements of type unicode (True) or string (False).
    Default is False.
buffer : object exposing the buffer interface or str, optional
    Memory address of the start of the array data.  Default is None,
    in which case a new array is created.
offset : int, optional
    Fixed stride displacement from the beginning of an axis?
    Default is 0. Needs to be >=0.
strides : array_like of ints, optional
    Strides for the array (see `ndarray.strides` for full description).
    Default is None.
order : {'C', 'F'}, optional
    The order in which the array data is stored in memory: 'C' ->
    "row major" order (the default), 'F' -> "column major"
    (Fortran) order.

Examples
--------
>>> charar = np.chararray((3, 3))
>>> charar[:] = 'a'
>>> charar
chararray([[b'a', b'a', b'a'],
           [b'a', b'a', b'a'],
           [b'a', b'a', b'a']], dtype='|S1')

>>> charar = np.chararray(charar.shape, itemsize=5)
>>> charar[:] = 'abc'
>>> charar
chararray([[b'abc', b'abc', b'abc'],
           [b'abc', b'abc', b'abc'],
           [b'abc', b'abc', b'abc']], dtype='|S5')

---
## array
```python
from defchararray import array
```

Create a `chararray`.

.. note::
   This class is provided for numarray backward-compatibility.
   New code (not concerned with numarray compatibility) should use
   arrays of type `bytes_` or `str_` and use the free functions
   in :mod:`numpy.char <numpy.core.defchararray>` for fast
   vectorized string operations instead.

Versus a regular NumPy array of type `str` or `unicode`, this
class adds the following functionality:

  1) values automatically have whitespace removed from the end
     when indexed

  2) comparison operators automatically remove whitespace from the
     end when comparing values

  3) vectorized string operations are provided as methods
     (e.g. `str.endswith`) and infix operators (e.g. ``+, *, %``)

Parameters
----------
obj : array of str or unicode-like

itemsize : int, optional
    `itemsize` is the number of characters per scalar in the
    resulting array.  If `itemsize` is None, and `obj` is an
    object array or a Python list, the `itemsize` will be
    automatically determined.  If `itemsize` is provided and `obj`
    is of type str or unicode, then the `obj` string will be
    chunked into `itemsize` pieces.

copy : bool, optional
    If true (default), then the object is copied.  Otherwise, a copy
    will only be made if __array__ returns a copy, if obj is a
    nested sequence, or if a copy is needed to satisfy any of the other
    requirements (`itemsize`, unicode, `order`, etc.).

unicode : bool, optional
    When true, the resulting `chararray` can contain Unicode
    characters, when false only 8-bit characters.  If unicode is
    None and `obj` is one of the following:

      - a `chararray`,
      - an ndarray of type `str` or `unicode`
      - a Python str or unicode object,

    then the unicode setting of the output array will be
    automatically determined.

order : {'C', 'F', 'A'}, optional
    Specify the order of the array.  If order is 'C' (default), then the
    array will be in C-contiguous order (last-index varies the
    fastest).  If order is 'F', then the returned array
    will be in Fortran-contiguous order (first-index varies the
    fastest).  If order is 'A', then the returned array may
    be in any order (either C-, Fortran-contiguous, or even
    discontiguous).

---
## asarray
```python
from defchararray import asarray
```

Convert the input to a `chararray`, copying the data only if
necessary.

Versus a regular NumPy array of type `str` or `unicode`, this
class adds the following functionality:

  1) values automatically have whitespace removed from the end
     when indexed

  2) comparison operators automatically remove whitespace from the
     end when comparing values

  3) vectorized string operations are provided as methods
     (e.g. `str.endswith`) and infix operators (e.g. ``+``, ``*``,``%``)

Parameters
----------
obj : array of str or unicode-like

itemsize : int, optional
    `itemsize` is the number of characters per scalar in the
    resulting array.  If `itemsize` is None, and `obj` is an
    object array or a Python list, the `itemsize` will be
    automatically determined.  If `itemsize` is provided and `obj`
    is of type str or unicode, then the `obj` string will be
    chunked into `itemsize` pieces.

unicode : bool, optional
    When true, the resulting `chararray` can contain Unicode
    characters, when false only 8-bit characters.  If unicode is
    None and `obj` is one of the following:

      - a `chararray`,
      - an ndarray of type `str` or 'unicode`
      - a Python str or unicode object,

    then the unicode setting of the output array will be
    automatically determined.

order : {'C', 'F'}, optional
    Specify the order of the array.  If order is 'C' (default), then the
    array will be in C-contiguous order (last-index varies the
    fastest).  If order is 'F', then the returned array
    will be in Fortran-contiguous order (first-index varies the
    fastest).

---
## __new__
```python
from defchararray import __new__
```



---
## __array_finalize__
```python
from defchararray import __array_finalize__
```



---
## __getitem__
```python
from defchararray import __getitem__
```



---
## __eq__
```python
from defchararray import __eq__
```

Return (self == other) element-wise.

See Also
--------
equal

---
## __ne__
```python
from defchararray import __ne__
```

Return (self != other) element-wise.

See Also
--------
not_equal

---
## __ge__
```python
from defchararray import __ge__
```

Return (self >= other) element-wise.

See Also
--------
greater_equal

---
## __le__
```python
from defchararray import __le__
```

Return (self <= other) element-wise.

See Also
--------
less_equal

---
## __gt__
```python
from defchararray import __gt__
```

Return (self > other) element-wise.

See Also
--------
greater

---
## __lt__
```python
from defchararray import __lt__
```

Return (self < other) element-wise.

See Also
--------
less

---
## __add__
```python
from defchararray import __add__
```

Return (self + other), that is string concatenation,
element-wise for a pair of array_likes of str or unicode.

See Also
--------
add

---
## __radd__
```python
from defchararray import __radd__
```

Return (other + self), that is string concatenation,
element-wise for a pair of array_likes of `bytes_` or `str_`.

See Also
--------
add

---
## __mul__
```python
from defchararray import __mul__
```

Return (self * i), that is string multiple concatenation,
element-wise.

See Also
--------
multiply

---
## __rmul__
```python
from defchararray import __rmul__
```

Return (self * i), that is string multiple concatenation,
element-wise.

See Also
--------
multiply

---
## __mod__
```python
from defchararray import __mod__
```

Return (self % i), that is pre-Python 2.6 string formatting
(interpolation), element-wise for a pair of array_likes of `bytes_`
or `str_`.

See Also
--------
mod

---
## __rmod__
```python
from defchararray import __rmod__
```



---
## argsort
```python
from defchararray import argsort
```

Return the indices that sort the array lexicographically.

For full documentation see `numpy.argsort`, for which this method is
in fact merely a "thin wrapper."

Examples
--------
>>> c = np.array(['a1b c', '1b ca', 'b ca1', 'Ca1b'], 'S5')
>>> c = c.view(np.chararray); c
chararray(['a1b c', '1b ca', 'b ca1', 'Ca1b'],
      dtype='|S5')
>>> c[c.argsort()]
chararray(['1b ca', 'Ca1b', 'a1b c', 'b ca1'],
      dtype='|S5')

---
## __name__
```python
from shape_base import __name__
```



---
## _atleast_1d_dispatcher
```python
from shape_base import _atleast_1d_dispatcher
```



---
## atleast_1d
```python
from shape_base import atleast_1d
```

Convert inputs to arrays with at least one dimension.

Scalar inputs are converted to 1-dimensional arrays, whilst
higher-dimensional inputs are preserved.

Parameters
----------
arys1, arys2, ... : array_like
    One or more input arrays.

Returns
-------
ret : ndarray
    An array, or list of arrays, each with ``a.ndim >= 1``.
    Copies are made only if necessary.

See Also
--------
atleast_2d, atleast_3d

Examples
--------
>>> np.atleast_1d(1.0)
array([1.])

>>> x = np.arange(9.0).reshape(3,3)
>>> np.atleast_1d(x)
array([[0., 1., 2.],
       [3., 4., 5.],
       [6., 7., 8.]])
>>> np.atleast_1d(x) is x
True

>>> np.atleast_1d(1, [3, 4])
[array([1]), array([3, 4])]

---
## _atleast_2d_dispatcher
```python
from shape_base import _atleast_2d_dispatcher
```



---
## atleast_2d
```python
from shape_base import atleast_2d
```

View inputs as arrays with at least two dimensions.

Parameters
----------
arys1, arys2, ... : array_like
    One or more array-like sequences.  Non-array inputs are converted
    to arrays.  Arrays that already have two or more dimensions are
    preserved.

Returns
-------
res, res2, ... : ndarray
    An array, or list of arrays, each with ``a.ndim >= 2``.
    Copies are avoided where possible, and views with two or more
    dimensions are returned.

See Also
--------
atleast_1d, atleast_3d

Examples
--------
>>> np.atleast_2d(3.0)
array([[3.]])

>>> x = np.arange(3.0)
>>> np.atleast_2d(x)
array([[0., 1., 2.]])
>>> np.atleast_2d(x).base is x
True

>>> np.atleast_2d(1, [1, 2], [[1, 2]])
[array([[1]]), array([[1, 2]]), array([[1, 2]])]

---
## _atleast_3d_dispatcher
```python
from shape_base import _atleast_3d_dispatcher
```



---
## atleast_3d
```python
from shape_base import atleast_3d
```

View inputs as arrays with at least three dimensions.

Parameters
----------
arys1, arys2, ... : array_like
    One or more array-like sequences.  Non-array inputs are converted to
    arrays.  Arrays that already have three or more dimensions are
    preserved.

Returns
-------
res1, res2, ... : ndarray
    An array, or list of arrays, each with ``a.ndim >= 3``.  Copies are
    avoided where possible, and views with three or more dimensions are
    returned.  For example, a 1-D array of shape ``(N,)`` becomes a view
    of shape ``(1, N, 1)``, and a 2-D array of shape ``(M, N)`` becomes a
    view of shape ``(M, N, 1)``.

See Also
--------
atleast_1d, atleast_2d

Examples
--------
>>> np.atleast_3d(3.0)
array([[[3.]]])

>>> x = np.arange(3.0)
>>> np.atleast_3d(x).shape
(1, 3, 1)

>>> x = np.arange(12.0).reshape(4,3)
>>> np.atleast_3d(x).shape
(4, 3, 1)
>>> np.atleast_3d(x).base is x.base  # x is a reshape, so not base itself
True

>>> for arr in np.atleast_3d([1, 2], [[1, 2]], [[[1, 2]]]):
...     print(arr, arr.shape) # doctest: +SKIP
...
[[[1]
  [2]]] (1, 2, 1)
[[[1]
  [2]]] (1, 2, 1)
[[[1 2]]] (1, 1, 2)

---
## _arrays_for_stack_dispatcher
```python
from shape_base import _arrays_for_stack_dispatcher
```



---
## _vhstack_dispatcher
```python
from shape_base import _vhstack_dispatcher
```



---
## vstack
```python
from shape_base import vstack
```

Stack arrays in sequence vertically (row wise).

This is equivalent to concatenation along the first axis after 1-D arrays
of shape `(N,)` have been reshaped to `(1,N)`. Rebuilds arrays divided by
`vsplit`.

This function makes most sense for arrays with up to 3 dimensions. For
instance, for pixel-data with a height (first axis), width (second axis),
and r/g/b channels (third axis). The functions `concatenate`, `stack` and
`block` provide more general stacking and concatenation operations.

``np.row_stack`` is an alias for `vstack`. They are the same function.

Parameters
----------
tup : sequence of ndarrays
    The arrays must have the same shape along all but the first axis.
    1-D arrays must have the same length.

dtype : str or dtype
    If provided, the destination array will have this dtype. Cannot be
    provided together with `out`.

.. versionadded:: 1.24

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur. Defaults to 'same_kind'.

.. versionadded:: 1.24

Returns
-------
stacked : ndarray
    The array formed by stacking the given arrays, will be at least 2-D.

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
stack : Join a sequence of arrays along a new axis.
block : Assemble an nd-array from nested lists of blocks.
hstack : Stack arrays in sequence horizontally (column wise).
dstack : Stack arrays in sequence depth wise (along third axis).
column_stack : Stack 1-D arrays as columns into a 2-D array.
vsplit : Split an array into multiple sub-arrays vertically (row-wise).

Examples
--------
>>> a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.vstack((a,b))
array([[1, 2, 3],
       [4, 5, 6]])

>>> a = np.array([[1], [2], [3]])
>>> b = np.array([[4], [5], [6]])
>>> np.vstack((a,b))
array([[1],
       [2],
       [3],
       [4],
       [5],
       [6]])

---
## hstack
```python
from shape_base import hstack
```

Stack arrays in sequence horizontally (column wise).

This is equivalent to concatenation along the second axis, except for 1-D
arrays where it concatenates along the first axis. Rebuilds arrays divided
by `hsplit`.

This function makes most sense for arrays with up to 3 dimensions. For
instance, for pixel-data with a height (first axis), width (second axis),
and r/g/b channels (third axis). The functions `concatenate`, `stack` and
`block` provide more general stacking and concatenation operations.

Parameters
----------
tup : sequence of ndarrays
    The arrays must have the same shape along all but the second axis,
    except 1-D arrays which can be any length.

dtype : str or dtype
    If provided, the destination array will have this dtype. Cannot be
    provided together with `out`.

.. versionadded:: 1.24

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur. Defaults to 'same_kind'.

.. versionadded:: 1.24

Returns
-------
stacked : ndarray
    The array formed by stacking the given arrays.

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
stack : Join a sequence of arrays along a new axis.
block : Assemble an nd-array from nested lists of blocks.
vstack : Stack arrays in sequence vertically (row wise).
dstack : Stack arrays in sequence depth wise (along third axis).
column_stack : Stack 1-D arrays as columns into a 2-D array.
hsplit : Split an array into multiple sub-arrays horizontally (column-wise).

Examples
--------
>>> a = np.array((1,2,3))
>>> b = np.array((4,5,6))
>>> np.hstack((a,b))
array([1, 2, 3, 4, 5, 6])
>>> a = np.array([[1],[2],[3]])
>>> b = np.array([[4],[5],[6]])
>>> np.hstack((a,b))
array([[1, 4],
       [2, 5],
       [3, 6]])

---
## _stack_dispatcher
```python
from shape_base import _stack_dispatcher
```



---
## stack
```python
from shape_base import stack
```

Join a sequence of arrays along a new axis.

The ``axis`` parameter specifies the index of the new axis in the
dimensions of the result. For example, if ``axis=0`` it will be the first
dimension and if ``axis=-1`` it will be the last dimension.

.. versionadded:: 1.10.0

Parameters
----------
arrays : sequence of array_like
    Each array must have the same shape.

axis : int, optional
    The axis in the result array along which the input arrays are stacked.

out : ndarray, optional
    If provided, the destination to place the result. The shape must be
    correct, matching that of what stack would have returned if no
    out argument were specified.

dtype : str or dtype
    If provided, the destination array will have this dtype. Cannot be
    provided together with `out`.

    .. versionadded:: 1.24

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur. Defaults to 'same_kind'.

    .. versionadded:: 1.24


Returns
-------
stacked : ndarray
    The stacked array has one more dimension than the input arrays.

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
block : Assemble an nd-array from nested lists of blocks.
split : Split array into a list of multiple sub-arrays of equal size.

Examples
--------
>>> arrays = [np.random.randn(3, 4) for _ in range(10)]
>>> np.stack(arrays, axis=0).shape
(10, 3, 4)

>>> np.stack(arrays, axis=1).shape
(3, 10, 4)

>>> np.stack(arrays, axis=2).shape
(3, 4, 10)

>>> a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.stack((a, b))
array([[1, 2, 3],
       [4, 5, 6]])

>>> np.stack((a, b), axis=-1)
array([[1, 4],
       [2, 5],
       [3, 6]])

---
## _block_format_index
```python
from shape_base import _block_format_index
```

Convert a list of indices ``[0, 1, 2]`` into ``"arrays[0][1][2]"``.

---
## _block_check_depths_match
```python
from shape_base import _block_check_depths_match
```

Recursive function checking that the depths of nested lists in `arrays`
all match. Mismatch raises a ValueError as described in the block
docstring below.

The entire index (rather than just the depth) needs to be calculated
for each innermost list, in case an error needs to be raised, so that
the index of the offending list can be printed as part of the error.

Parameters
----------
arrays : nested list of arrays
    The arrays to check
parent_index : list of int
    The full index of `arrays` within the nested lists passed to
    `_block_check_depths_match` at the top of the recursion.

Returns
-------
first_index : list of int
    The full index of an element from the bottom of the nesting in
    `arrays`. If any element at the bottom is an empty list, this will
    refer to it, and the last index along the empty axis will be None.
max_arr_ndim : int
    The maximum of the ndims of the arrays nested in `arrays`.
final_size: int
    The number of elements in the final array. This is used the motivate
    the choice of algorithm used using benchmarking wisdom.

---
## _atleast_nd
```python
from shape_base import _atleast_nd
```



---
## _accumulate
```python
from shape_base import _accumulate
```



---
## _concatenate_shapes
```python
from shape_base import _concatenate_shapes
```

Given array shapes, return the resulting shape and slices prefixes.

These help in nested concatenation.

Returns
-------
shape: tuple of int
    This tuple satisfies::

        shape, _ = _concatenate_shapes([arr.shape for shape in arrs], axis)
        shape == concatenate(arrs, axis).shape

slice_prefixes: tuple of (slice(start, end), )
    For a list of arrays being concatenated, this returns the slice
    in the larger array at axis that needs to be sliced into.

    For example, the following holds::

        ret = concatenate([a, b, c], axis)
        _, (sl_a, sl_b, sl_c) = concatenate_slices([a, b, c], axis)

        ret[(slice(None),) * axis + sl_a] == a
        ret[(slice(None),) * axis + sl_b] == b
        ret[(slice(None),) * axis + sl_c] == c

    These are called slice prefixes since they are used in the recursive
    blocking algorithm to compute the left-most slices during the
    recursion. Therefore, they must be prepended to rest of the slice
    that was computed deeper in the recursion.

    These are returned as tuples to ensure that they can quickly be added
    to existing slice tuple without creating a new tuple every time.

---
## _block_info_recursion
```python
from shape_base import _block_info_recursion
```

Returns the shape of the final array, along with a list
of slices and a list of arrays that can be used for assignment inside the
new array

Parameters
----------
arrays : nested list of arrays
    The arrays to check
max_depth : list of int
    The number of nested lists
result_ndim : int
    The number of dimensions in thefinal array.

Returns
-------
shape : tuple of int
    The shape that the final array will take on.
slices: list of tuple of slices
    The slices into the full array required for assignment. These are
    required to be prepended with ``(Ellipsis, )`` to obtain to correct
    final index.
arrays: list of ndarray
    The data to assign to each slice of the full array

---
## _block
```python
from shape_base import _block
```

Internal implementation of block based on repeated concatenation.
`arrays` is the argument passed to
block. `max_depth` is the depth of nested lists within `arrays` and
`result_ndim` is the greatest of the dimensions of the arrays in
`arrays` and the depth of the lists in `arrays` (see block docstring
for details).

---
## _block_dispatcher
```python
from shape_base import _block_dispatcher
```



---
## block
```python
from shape_base import block
```

Assemble an nd-array from nested lists of blocks.

Blocks in the innermost lists are concatenated (see `concatenate`) along
the last dimension (-1), then these are concatenated along the
second-last dimension (-2), and so on until the outermost list is reached.

Blocks can be of any dimension, but will not be broadcasted using the normal
rules. Instead, leading axes of size 1 are inserted, to make ``block.ndim``
the same for all blocks. This is primarily useful for working with scalars,
and means that code like ``np.block([v, 1])`` is valid, where
``v.ndim == 1``.

When the nested list is two levels deep, this allows block matrices to be
constructed from their components.

.. versionadded:: 1.13.0

Parameters
----------
arrays : nested list of array_like or scalars (but not tuples)
    If passed a single ndarray or scalar (a nested list of depth 0), this
    is returned unmodified (and not copied).

    Elements shapes must match along the appropriate axes (without
    broadcasting), but leading 1s will be prepended to the shape as
    necessary to make the dimensions match.

Returns
-------
block_array : ndarray
    The array assembled from the given blocks.

    The dimensionality of the output is equal to the greatest of:
    * the dimensionality of all the inputs
    * the depth to which the input list is nested

Raises
------
ValueError
    * If list depths are mismatched - for instance, ``[[a, b], c]`` is
      illegal, and should be spelt ``[[a, b], [c]]``
    * If lists are empty - for instance, ``[[a, b], []]``

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
stack : Join a sequence of arrays along a new axis.
vstack : Stack arrays in sequence vertically (row wise).
hstack : Stack arrays in sequence horizontally (column wise).
dstack : Stack arrays in sequence depth wise (along third axis).
column_stack : Stack 1-D arrays as columns into a 2-D array.
vsplit : Split an array into multiple sub-arrays vertically (row-wise).

Notes
-----

When called with only scalars, ``np.block`` is equivalent to an ndarray
call. So ``np.block([[1, 2], [3, 4]])`` is equivalent to
``np.array([[1, 2], [3, 4]])``.

This function does not enforce that the blocks lie on a fixed grid.
``np.block([[a, b], [c, d]])`` is not restricted to arrays of the form::

    AAAbb
    AAAbb
    cccDD

But is also allowed to produce, for some ``a, b, c, d``::

    AAAbb
    AAAbb
    cDDDD

Since concatenation happens along the last axis first, `block` is _not_
capable of producing the following directly::

    AAAbb
    cccbb
    cccDD

Matlab's "square bracket stacking", ``[A, B, ...; p, q, ...]``, is
equivalent to ``np.block([[A, B, ...], [p, q, ...]])``.

Examples
--------
The most common use of this function is to build a block matrix

>>> A = np.eye(2) * 2
>>> B = np.eye(3) * 3
>>> np.block([
...     [A,               np.zeros((2, 3))],
...     [np.ones((3, 2)), B               ]
... ])
array([[2., 0., 0., 0., 0.],
       [0., 2., 0., 0., 0.],
       [1., 1., 3., 0., 0.],
       [1., 1., 0., 3., 0.],
       [1., 1., 0., 0., 3.]])

With a list of depth 1, `block` can be used as `hstack`

>>> np.block([1, 2, 3])              # hstack([1, 2, 3])
array([1, 2, 3])

>>> a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.block([a, b, 10])             # hstack([a, b, 10])
array([ 1,  2,  3,  4,  5,  6, 10])

>>> A = np.ones((2, 2), int)
>>> B = 2 * A
>>> np.block([A, B])                 # hstack([A, B])
array([[1, 1, 2, 2],
       [1, 1, 2, 2]])

With a list of depth 2, `block` can be used in place of `vstack`:

>>> a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.block([[a], [b]])             # vstack([a, b])
array([[1, 2, 3],
       [4, 5, 6]])

>>> A = np.ones((2, 2), int)
>>> B = 2 * A
>>> np.block([[A], [B]])             # vstack([A, B])
array([[1, 1],
       [1, 1],
       [2, 2],
       [2, 2]])

It can also be used in places of `atleast_1d` and `atleast_2d`

>>> a = np.array(0)
>>> b = np.array([1])
>>> np.block([a])                    # atleast_1d(a)
array([0])
>>> np.block([b])                    # atleast_1d(b)
array([1])

>>> np.block([[a]])                  # atleast_2d(a)
array([[0]])
>>> np.block([[b]])                  # atleast_2d(b)
array([[1]])

---
## _block_setup
```python
from shape_base import _block_setup
```

Returns
(`arrays`, list_ndim, result_ndim, final_size)

---
## _block_slicing
```python
from shape_base import _block_slicing
```



---
## _block_concatenate
```python
from shape_base import _block_concatenate
```



---
## __name__
```python
from numeric import __name__
```



---
## _zeros_like_dispatcher
```python
from numeric import _zeros_like_dispatcher
```



---
## zeros_like
```python
from numeric import zeros_like
```

Return an array of zeros with the same shape and type as a given array.

Parameters
----------
a : array_like
    The shape and data-type of `a` define these same attributes of
    the returned array.
dtype : data-type, optional
    Overrides the data type of the result.

    .. versionadded:: 1.6.0
order : {'C', 'F', 'A', or 'K'}, optional
    Overrides the memory layout of the result. 'C' means C-order,
    'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
    'C' otherwise. 'K' means match the layout of `a` as closely
    as possible.

    .. versionadded:: 1.6.0
subok : bool, optional.
    If True, then the newly created array will use the sub-class
    type of `a`, otherwise it will be a base-class array. Defaults
    to True.
shape : int or sequence of ints, optional.
    Overrides the shape of the result. If order='K' and the number of
    dimensions is unchanged, will try to keep order, otherwise,
    order='C' is implied.

    .. versionadded:: 1.17.0

Returns
-------
out : ndarray
    Array of zeros with the same shape and type as `a`.

See Also
--------
empty_like : Return an empty array with shape and type of input.
ones_like : Return an array of ones with shape and type of input.
full_like : Return a new array with shape of input filled with value.
zeros : Return a new array setting values to zero.

Examples
--------
>>> x = np.arange(6)
>>> x = x.reshape((2, 3))
>>> x
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.zeros_like(x)
array([[0, 0, 0],
       [0, 0, 0]])

>>> y = np.arange(3, dtype=float)
>>> y
array([0., 1., 2.])
>>> np.zeros_like(y)
array([0.,  0.,  0.])

---
## ones
```python
from numeric import ones
```

Return a new array of given shape and type, filled with ones.

Parameters
----------
shape : int or sequence of ints
    Shape of the new array, e.g., ``(2, 3)`` or ``2``.
dtype : data-type, optional
    The desired data-type for the array, e.g., `numpy.int8`.  Default is
    `numpy.float64`.
order : {'C', 'F'}, optional, default: C
    Whether to store multi-dimensional data in row-major
    (C-style) or column-major (Fortran-style) order in
    memory.
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    Array of ones with the given shape, dtype, and order.

See Also
--------
ones_like : Return an array of ones with shape and type of input.
empty : Return a new uninitialized array.
zeros : Return a new array setting values to zero.
full : Return a new array of given shape filled with value.


Examples
--------
>>> np.ones(5)
array([1., 1., 1., 1., 1.])

>>> np.ones((5,), dtype=int)
array([1, 1, 1, 1, 1])

>>> np.ones((2, 1))
array([[1.],
       [1.]])

>>> s = (2,2)
>>> np.ones(s)
array([[1.,  1.],
       [1.,  1.]])

---
## _ones_like_dispatcher
```python
from numeric import _ones_like_dispatcher
```



---
## ones_like
```python
from numeric import ones_like
```

Return an array of ones with the same shape and type as a given array.

Parameters
----------
a : array_like
    The shape and data-type of `a` define these same attributes of
    the returned array.
dtype : data-type, optional
    Overrides the data type of the result.

    .. versionadded:: 1.6.0
order : {'C', 'F', 'A', or 'K'}, optional
    Overrides the memory layout of the result. 'C' means C-order,
    'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
    'C' otherwise. 'K' means match the layout of `a` as closely
    as possible.

    .. versionadded:: 1.6.0
subok : bool, optional.
    If True, then the newly created array will use the sub-class
    type of `a`, otherwise it will be a base-class array. Defaults
    to True.
shape : int or sequence of ints, optional.
    Overrides the shape of the result. If order='K' and the number of
    dimensions is unchanged, will try to keep order, otherwise,
    order='C' is implied.

    .. versionadded:: 1.17.0

Returns
-------
out : ndarray
    Array of ones with the same shape and type as `a`.

See Also
--------
empty_like : Return an empty array with shape and type of input.
zeros_like : Return an array of zeros with shape and type of input.
full_like : Return a new array with shape of input filled with value.
ones : Return a new array setting values to one.

Examples
--------
>>> x = np.arange(6)
>>> x = x.reshape((2, 3))
>>> x
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.ones_like(x)
array([[1, 1, 1],
       [1, 1, 1]])

>>> y = np.arange(3, dtype=float)
>>> y
array([0., 1., 2.])
>>> np.ones_like(y)
array([1.,  1.,  1.])

---
## _full_dispatcher
```python
from numeric import _full_dispatcher
```



---
## full
```python
from numeric import full
```

Return a new array of given shape and type, filled with `fill_value`.

Parameters
----------
shape : int or sequence of ints
    Shape of the new array, e.g., ``(2, 3)`` or ``2``.
fill_value : scalar or array_like
    Fill value.
dtype : data-type, optional
    The desired data-type for the array  The default, None, means
     ``np.array(fill_value).dtype``.
order : {'C', 'F'}, optional
    Whether to store multidimensional data in C- or Fortran-contiguous
    (row- or column-wise) order in memory.
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    Array of `fill_value` with the given shape, dtype, and order.

See Also
--------
full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.
ones : Return a new array setting values to one.
zeros : Return a new array setting values to zero.

Examples
--------
>>> np.full((2, 2), np.inf)
array([[inf, inf],
       [inf, inf]])
>>> np.full((2, 2), 10)
array([[10, 10],
       [10, 10]])

>>> np.full((2, 2), [1, 2])
array([[1, 2],
       [1, 2]])

---
## _full_like_dispatcher
```python
from numeric import _full_like_dispatcher
```



---
## full_like
```python
from numeric import full_like
```

Return a full array with the same shape and type as a given array.

Parameters
----------
a : array_like
    The shape and data-type of `a` define these same attributes of
    the returned array.
fill_value : array_like
    Fill value.
dtype : data-type, optional
    Overrides the data type of the result.
order : {'C', 'F', 'A', or 'K'}, optional
    Overrides the memory layout of the result. 'C' means C-order,
    'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
    'C' otherwise. 'K' means match the layout of `a` as closely
    as possible.
subok : bool, optional.
    If True, then the newly created array will use the sub-class
    type of `a`, otherwise it will be a base-class array. Defaults
    to True.
shape : int or sequence of ints, optional.
    Overrides the shape of the result. If order='K' and the number of
    dimensions is unchanged, will try to keep order, otherwise,
    order='C' is implied.

    .. versionadded:: 1.17.0

Returns
-------
out : ndarray
    Array of `fill_value` with the same shape and type as `a`.

See Also
--------
empty_like : Return an empty array with shape and type of input.
ones_like : Return an array of ones with shape and type of input.
zeros_like : Return an array of zeros with shape and type of input.
full : Return a new array of given shape filled with value.

Examples
--------
>>> x = np.arange(6, dtype=int)
>>> np.full_like(x, 1)
array([1, 1, 1, 1, 1, 1])
>>> np.full_like(x, 0.1)
array([0, 0, 0, 0, 0, 0])
>>> np.full_like(x, 0.1, dtype=np.double)
array([0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
>>> np.full_like(x, np.nan, dtype=np.double)
array([nan, nan, nan, nan, nan, nan])

>>> y = np.arange(6, dtype=np.double)
>>> np.full_like(y, 0.1)
array([0.1, 0.1, 0.1, 0.1, 0.1, 0.1])

>>> y = np.zeros([2, 2, 3], dtype=int)
>>> np.full_like(y, [0, 0, 255])
array([[[  0,   0, 255],
        [  0,   0, 255]],
       [[  0,   0, 255],
        [  0,   0, 255]]])

---
## _count_nonzero_dispatcher
```python
from numeric import _count_nonzero_dispatcher
```



---
## count_nonzero
```python
from numeric import count_nonzero
```

Counts the number of non-zero values in the array ``a``.

The word "non-zero" is in reference to the Python 2.x
built-in method ``__nonzero__()`` (renamed ``__bool__()``
in Python 3.x) of Python objects that tests an object's
"truthfulness". For example, any number is considered
truthful if it is nonzero, whereas any string is considered
truthful if it is not the empty string. Thus, this function
(recursively) counts how many elements in ``a`` (and in
sub-arrays thereof) have their ``__nonzero__()`` or ``__bool__()``
method evaluated to ``True``.

Parameters
----------
a : array_like
    The array for which to count non-zeros.
axis : int or tuple, optional
    Axis or tuple of axes along which to count non-zeros.
    Default is None, meaning that non-zeros will be counted
    along a flattened version of ``a``.

    .. versionadded:: 1.12.0

keepdims : bool, optional
    If this is set to True, the axes that are counted are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    .. versionadded:: 1.19.0

Returns
-------
count : int or array of int
    Number of non-zero values in the array along a given axis.
    Otherwise, the total number of non-zero values in the array
    is returned.

See Also
--------
nonzero : Return the coordinates of all the non-zero values.

Examples
--------
>>> np.count_nonzero(np.eye(4))
4
>>> a = np.array([[0, 1, 7, 0],
...               [3, 0, 2, 19]])
>>> np.count_nonzero(a)
5
>>> np.count_nonzero(a, axis=0)
array([1, 1, 2, 1])
>>> np.count_nonzero(a, axis=1)
array([2, 3])
>>> np.count_nonzero(a, axis=1, keepdims=True)
array([[2],
       [3]])

---
## isfortran
```python
from numeric import isfortran
```

Check if the array is Fortran contiguous but *not* C contiguous.

This function is obsolete and, because of changes due to relaxed stride
checking, its return value for the same array may differ for versions
of NumPy >= 1.10.0 and previous versions. If you only want to check if an
array is Fortran contiguous use ``a.flags.f_contiguous`` instead.

Parameters
----------
a : ndarray
    Input array.

Returns
-------
isfortran : bool
    Returns True if the array is Fortran contiguous but *not* C contiguous.


Examples
--------

np.array allows to specify whether the array is written in C-contiguous
order (last index varies the fastest), or FORTRAN-contiguous order in
memory (first index varies the fastest).

>>> a = np.array([[1, 2, 3], [4, 5, 6]], order='C')
>>> a
array([[1, 2, 3],
       [4, 5, 6]])
>>> np.isfortran(a)
False

>>> b = np.array([[1, 2, 3], [4, 5, 6]], order='F')
>>> b
array([[1, 2, 3],
       [4, 5, 6]])
>>> np.isfortran(b)
True


The transpose of a C-ordered array is a FORTRAN-ordered array.

>>> a = np.array([[1, 2, 3], [4, 5, 6]], order='C')
>>> a
array([[1, 2, 3],
       [4, 5, 6]])
>>> np.isfortran(a)
False
>>> b = a.T
>>> b
array([[1, 4],
       [2, 5],
       [3, 6]])
>>> np.isfortran(b)
True

C-ordered arrays evaluate as False even if they are also FORTRAN-ordered.

>>> np.isfortran(np.array([1, 2], order='F'))
False

---
## _argwhere_dispatcher
```python
from numeric import _argwhere_dispatcher
```



---
## argwhere
```python
from numeric import argwhere
```

Find the indices of array elements that are non-zero, grouped by element.

Parameters
----------
a : array_like
    Input data.

Returns
-------
index_array : (N, a.ndim) ndarray
    Indices of elements that are non-zero. Indices are grouped by element.
    This array will have shape ``(N, a.ndim)`` where ``N`` is the number of
    non-zero items.

See Also
--------
where, nonzero

Notes
-----
``np.argwhere(a)`` is almost the same as ``np.transpose(np.nonzero(a))``,
but produces a result of the correct shape for a 0D array.

The output of ``argwhere`` is not suitable for indexing arrays.
For this purpose use ``nonzero(a)`` instead.

Examples
--------
>>> x = np.arange(6).reshape(2,3)
>>> x
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.argwhere(x>1)
array([[0, 2],
       [1, 0],
       [1, 1],
       [1, 2]])

---
## _flatnonzero_dispatcher
```python
from numeric import _flatnonzero_dispatcher
```



---
## flatnonzero
```python
from numeric import flatnonzero
```

Return indices that are non-zero in the flattened version of a.

This is equivalent to ``np.nonzero(np.ravel(a))[0]``.

Parameters
----------
a : array_like
    Input data.

Returns
-------
res : ndarray
    Output array, containing the indices of the elements of ``a.ravel()``
    that are non-zero.

See Also
--------
nonzero : Return the indices of the non-zero elements of the input array.
ravel : Return a 1-D array containing the elements of the input array.

Examples
--------
>>> x = np.arange(-2, 3)
>>> x
array([-2, -1,  0,  1,  2])
>>> np.flatnonzero(x)
array([0, 1, 3, 4])

Use the indices of the non-zero elements as an index array to extract
these elements:

>>> x.ravel()[np.flatnonzero(x)]
array([-2, -1,  1,  2])

---
## _correlate_dispatcher
```python
from numeric import _correlate_dispatcher
```



---
## correlate
```python
from numeric import correlate
```

Cross-correlation of two 1-dimensional sequences.

This function computes the correlation as generally defined in signal
processing texts:

.. math:: c_k = \sum_n a_{n+k} \cdot \overline{v}_n

with a and v sequences being zero-padded where necessary and
:math:`\overline x` denoting complex conjugation.

Parameters
----------
a, v : array_like
    Input sequences.
mode : {'valid', 'same', 'full'}, optional
    Refer to the `convolve` docstring.  Note that the default
    is 'valid', unlike `convolve`, which uses 'full'.
old_behavior : bool
    `old_behavior` was removed in NumPy 1.10. If you need the old
    behavior, use `multiarray.correlate`.

Returns
-------
out : ndarray
    Discrete cross-correlation of `a` and `v`.

See Also
--------
convolve : Discrete, linear convolution of two one-dimensional sequences.
multiarray.correlate : Old, no conjugate, version of correlate.
scipy.signal.correlate : uses FFT which has superior performance on large arrays.

Notes
-----
The definition of correlation above is not unique and sometimes correlation
may be defined differently. Another common definition is:

.. math:: c'_k = \sum_n a_{n} \cdot \overline{v_{n+k}}

which is related to :math:`c_k` by :math:`c'_k = c_{-k}`.

`numpy.correlate` may perform slowly in large arrays (i.e. n = 1e5) because it does
not use the FFT to compute the convolution; in that case, `scipy.signal.correlate` might
be preferable.


Examples
--------
>>> np.correlate([1, 2, 3], [0, 1, 0.5])
array([3.5])
>>> np.correlate([1, 2, 3], [0, 1, 0.5], "same")
array([2. ,  3.5,  3. ])
>>> np.correlate([1, 2, 3], [0, 1, 0.5], "full")
array([0.5,  2. ,  3.5,  3. ,  0. ])

Using complex sequences:

>>> np.correlate([1+1j, 2, 3-1j], [0, 1, 0.5j], 'full')
array([ 0.5-0.5j,  1.0+0.j ,  1.5-1.5j,  3.0-1.j ,  0.0+0.j ])

Note that you get the time reversed, complex conjugated result
(:math:`\overline{c_{-k}}`) when the two input sequences a and v change
places:

>>> np.correlate([0, 1, 0.5j], [1+1j, 2, 3-1j], 'full')
array([ 0.0+0.j ,  3.0+1.j ,  1.5+1.5j,  1.0+0.j ,  0.5+0.5j])

---
## _convolve_dispatcher
```python
from numeric import _convolve_dispatcher
```



---
## convolve
```python
from numeric import convolve
```

Returns the discrete, linear convolution of two one-dimensional sequences.

The convolution operator is often seen in signal processing, where it
models the effect of a linear time-invariant system on a signal [1]_.  In
probability theory, the sum of two independent random variables is
distributed according to the convolution of their individual
distributions.

If `v` is longer than `a`, the arrays are swapped before computation.

Parameters
----------
a : (N,) array_like
    First one-dimensional input array.
v : (M,) array_like
    Second one-dimensional input array.
mode : {'full', 'valid', 'same'}, optional
    'full':
      By default, mode is 'full'.  This returns the convolution
      at each point of overlap, with an output shape of (N+M-1,). At
      the end-points of the convolution, the signals do not overlap
      completely, and boundary effects may be seen.

    'same':
      Mode 'same' returns output of length ``max(M, N)``.  Boundary
      effects are still visible.

    'valid':
      Mode 'valid' returns output of length
      ``max(M, N) - min(M, N) + 1``.  The convolution product is only given
      for points where the signals overlap completely.  Values outside
      the signal boundary have no effect.

Returns
-------
out : ndarray
    Discrete, linear convolution of `a` and `v`.

See Also
--------
scipy.signal.fftconvolve : Convolve two arrays using the Fast Fourier
                           Transform.
scipy.linalg.toeplitz : Used to construct the convolution operator.
polymul : Polynomial multiplication. Same output as convolve, but also
          accepts poly1d objects as input.

Notes
-----
The discrete convolution operation is defined as

.. math:: (a * v)_n = \sum_{m = -\infty}^{\infty} a_m v_{n - m}

It can be shown that a convolution :math:`x(t) * y(t)` in time/space
is equivalent to the multiplication :math:`X(f) Y(f)` in the Fourier
domain, after appropriate padding (padding is necessary to prevent
circular convolution).  Since multiplication is more efficient (faster)
than convolution, the function `scipy.signal.fftconvolve` exploits the
FFT to calculate the convolution of large data-sets.

References
----------
.. [1] Wikipedia, "Convolution",
    https://en.wikipedia.org/wiki/Convolution

Examples
--------
Note how the convolution operator flips the second array
before "sliding" the two across one another:

>>> np.convolve([1, 2, 3], [0, 1, 0.5])
array([0. , 1. , 2.5, 4. , 1.5])

Only return the middle values of the convolution.
Contains boundary effects, where zeros are taken
into account:

>>> np.convolve([1,2,3],[0,1,0.5], 'same')
array([1. ,  2.5,  4. ])

The two arrays are of the same length, so there
is only one position where they completely overlap:

>>> np.convolve([1,2,3],[0,1,0.5], 'valid')
array([2.5])

---
## _outer_dispatcher
```python
from numeric import _outer_dispatcher
```



---
## outer
```python
from numeric import outer
```

Compute the outer product of two vectors.

Given two vectors `a` and `b` of length ``M`` and ``N``, repsectively,
the outer product [1]_ is::

  [[a_0*b_0  a_0*b_1 ... a_0*b_{N-1} ]
   [a_1*b_0    .
   [ ...          .
   [a_{M-1}*b_0            a_{M-1}*b_{N-1} ]]

Parameters
----------
a : (M,) array_like
    First input vector.  Input is flattened if
    not already 1-dimensional.
b : (N,) array_like
    Second input vector.  Input is flattened if
    not already 1-dimensional.
out : (M, N) ndarray, optional
    A location where the result is stored

    .. versionadded:: 1.9.0

Returns
-------
out : (M, N) ndarray
    ``out[i, j] = a[i] * b[j]``

See also
--------
inner
einsum : ``einsum('i,j->ij', a.ravel(), b.ravel())`` is the equivalent.
ufunc.outer : A generalization to dimensions other than 1D and other
              operations. ``np.multiply.outer(a.ravel(), b.ravel())``
              is the equivalent.
tensordot : ``np.tensordot(a.ravel(), b.ravel(), axes=((), ()))``
            is the equivalent.

References
----------
.. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*, 3rd
       ed., Baltimore, MD, Johns Hopkins University Press, 1996,
       pg. 8.

Examples
--------
Make a (*very* coarse) grid for computing a Mandelbrot set:

>>> rl = np.outer(np.ones((5,)), np.linspace(-2, 2, 5))
>>> rl
array([[-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.]])
>>> im = np.outer(1j*np.linspace(2, -2, 5), np.ones((5,)))
>>> im
array([[0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j],
       [0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j],
       [0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
       [0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j],
       [0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j]])
>>> grid = rl + im
>>> grid
array([[-2.+2.j, -1.+2.j,  0.+2.j,  1.+2.j,  2.+2.j],
       [-2.+1.j, -1.+1.j,  0.+1.j,  1.+1.j,  2.+1.j],
       [-2.+0.j, -1.+0.j,  0.+0.j,  1.+0.j,  2.+0.j],
       [-2.-1.j, -1.-1.j,  0.-1.j,  1.-1.j,  2.-1.j],
       [-2.-2.j, -1.-2.j,  0.-2.j,  1.-2.j,  2.-2.j]])

An example using a "vector" of letters:

>>> x = np.array(['a', 'b', 'c'], dtype=object)
>>> np.outer(x, [1, 2, 3])
array([['a', 'aa', 'aaa'],
       ['b', 'bb', 'bbb'],
       ['c', 'cc', 'ccc']], dtype=object)

---
## _tensordot_dispatcher
```python
from numeric import _tensordot_dispatcher
```



---
## tensordot
```python
from numeric import tensordot
```

Compute tensor dot product along specified axes.

Given two tensors, `a` and `b`, and an array_like object containing
two array_like objects, ``(a_axes, b_axes)``, sum the products of
`a`'s and `b`'s elements (components) over the axes specified by
``a_axes`` and ``b_axes``. The third argument can be a single non-negative
integer_like scalar, ``N``; if it is such, then the last ``N`` dimensions
of `a` and the first ``N`` dimensions of `b` are summed over.

Parameters
----------
a, b : array_like
    Tensors to "dot".

axes : int or (2,) array_like
    * integer_like
      If an int N, sum over the last N axes of `a` and the first N axes
      of `b` in order. The sizes of the corresponding axes must match.
    * (2,) array_like
      Or, a list of axes to be summed over, first sequence applying to `a`,
      second to `b`. Both elements array_like must be of the same length.

Returns
-------
output : ndarray
    The tensor dot product of the input.

See Also
--------
dot, einsum

Notes
-----
Three common use cases are:
    * ``axes = 0`` : tensor product :math:`a\otimes b`
    * ``axes = 1`` : tensor dot product :math:`a\cdot b`
    * ``axes = 2`` : (default) tensor double contraction :math:`a:b`

When `axes` is integer_like, the sequence for evaluation will be: first
the -Nth axis in `a` and 0th axis in `b`, and the -1th axis in `a` and
Nth axis in `b` last.

When there is more than one axis to sum over - and they are not the last
(first) axes of `a` (`b`) - the argument `axes` should consist of
two sequences of the same length, with the first axis to sum over given
first in both sequences, the second axis second, and so forth.

The shape of the result consists of the non-contracted axes of the
first tensor, followed by the non-contracted axes of the second.

Examples
--------
A "traditional" example:

>>> a = np.arange(60.).reshape(3,4,5)
>>> b = np.arange(24.).reshape(4,3,2)
>>> c = np.tensordot(a,b, axes=([1,0],[0,1]))
>>> c.shape
(5, 2)
>>> c
array([[4400., 4730.],
       [4532., 4874.],
       [4664., 5018.],
       [4796., 5162.],
       [4928., 5306.]])
>>> # A slower but equivalent way of computing the same...
>>> d = np.zeros((5,2))
>>> for i in range(5):
...   for j in range(2):
...     for k in range(3):
...       for n in range(4):
...         d[i,j] += a[k,n,i] * b[n,k,j]
>>> c == d
array([[ True,  True],
       [ True,  True],
       [ True,  True],
       [ True,  True],
       [ True,  True]])

An extended example taking advantage of the overloading of + and \*:

>>> a = np.array(range(1, 9))
>>> a.shape = (2, 2, 2)
>>> A = np.array(('a', 'b', 'c', 'd'), dtype=object)
>>> A.shape = (2, 2)
>>> a; A
array([[[1, 2],
        [3, 4]],
       [[5, 6],
        [7, 8]]])
array([['a', 'b'],
       ['c', 'd']], dtype=object)

>>> np.tensordot(a, A) # third argument default is 2 for double-contraction
array(['abbcccdddd', 'aaaaabbbbbbcccccccdddddddd'], dtype=object)

>>> np.tensordot(a, A, 1)
array([[['acc', 'bdd'],
        ['aaacccc', 'bbbdddd']],
       [['aaaaacccccc', 'bbbbbdddddd'],
        ['aaaaaaacccccccc', 'bbbbbbbdddddddd']]], dtype=object)

>>> np.tensordot(a, A, 0) # tensor product (result too long to incl.)
array([[[[['a', 'b'],
          ['c', 'd']],
          ...

>>> np.tensordot(a, A, (0, 1))
array([[['abbbbb', 'cddddd'],
        ['aabbbbbb', 'ccdddddd']],
       [['aaabbbbbbb', 'cccddddddd'],
        ['aaaabbbbbbbb', 'ccccdddddddd']]], dtype=object)

>>> np.tensordot(a, A, (2, 1))
array([[['abb', 'cdd'],
        ['aaabbbb', 'cccdddd']],
       [['aaaaabbbbbb', 'cccccdddddd'],
        ['aaaaaaabbbbbbbb', 'cccccccdddddddd']]], dtype=object)

>>> np.tensordot(a, A, ((0, 1), (0, 1)))
array(['abbbcccccddddddd', 'aabbbbccccccdddddddd'], dtype=object)

>>> np.tensordot(a, A, ((2, 1), (1, 0)))
array(['acccbbdddd', 'aaaaacccccccbbbbbbdddddddd'], dtype=object)

---
## _roll_dispatcher
```python
from numeric import _roll_dispatcher
```



---
## roll
```python
from numeric import roll
```

Roll array elements along a given axis.

Elements that roll beyond the last position are re-introduced at
the first.

Parameters
----------
a : array_like
    Input array.
shift : int or tuple of ints
    The number of places by which elements are shifted.  If a tuple,
    then `axis` must be a tuple of the same size, and each of the
    given axes is shifted by the corresponding number.  If an int
    while `axis` is a tuple of ints, then the same value is used for
    all given axes.
axis : int or tuple of ints, optional
    Axis or axes along which elements are shifted.  By default, the
    array is flattened before shifting, after which the original
    shape is restored.

Returns
-------
res : ndarray
    Output array, with the same shape as `a`.

See Also
--------
rollaxis : Roll the specified axis backwards, until it lies in a
           given position.

Notes
-----
.. versionadded:: 1.12.0

Supports rolling over multiple dimensions simultaneously.

Examples
--------
>>> x = np.arange(10)
>>> np.roll(x, 2)
array([8, 9, 0, 1, 2, 3, 4, 5, 6, 7])
>>> np.roll(x, -2)
array([2, 3, 4, 5, 6, 7, 8, 9, 0, 1])

>>> x2 = np.reshape(x, (2, 5))
>>> x2
array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9]])
>>> np.roll(x2, 1)
array([[9, 0, 1, 2, 3],
       [4, 5, 6, 7, 8]])
>>> np.roll(x2, -1)
array([[1, 2, 3, 4, 5],
       [6, 7, 8, 9, 0]])
>>> np.roll(x2, 1, axis=0)
array([[5, 6, 7, 8, 9],
       [0, 1, 2, 3, 4]])
>>> np.roll(x2, -1, axis=0)
array([[5, 6, 7, 8, 9],
       [0, 1, 2, 3, 4]])
>>> np.roll(x2, 1, axis=1)
array([[4, 0, 1, 2, 3],
       [9, 5, 6, 7, 8]])
>>> np.roll(x2, -1, axis=1)
array([[1, 2, 3, 4, 0],
       [6, 7, 8, 9, 5]])
>>> np.roll(x2, (1, 1), axis=(1, 0))
array([[9, 5, 6, 7, 8],
       [4, 0, 1, 2, 3]])
>>> np.roll(x2, (2, 1), axis=(1, 0))
array([[8, 9, 5, 6, 7],
       [3, 4, 0, 1, 2]])

---
## _rollaxis_dispatcher
```python
from numeric import _rollaxis_dispatcher
```



---
## rollaxis
```python
from numeric import rollaxis
```

Roll the specified axis backwards, until it lies in a given position.

This function continues to be supported for backward compatibility, but you
should prefer `moveaxis`. The `moveaxis` function was added in NumPy
1.11.

Parameters
----------
a : ndarray
    Input array.
axis : int
    The axis to be rolled. The positions of the other axes do not
    change relative to one another.
start : int, optional
    When ``start <= axis``, the axis is rolled back until it lies in
    this position. When ``start > axis``, the axis is rolled until it
    lies before this position. The default, 0, results in a "complete"
    roll. The following table describes how negative values of ``start``
    are interpreted:

    .. table::
       :align: left

       +-------------------+----------------------+
       |     ``start``     | Normalized ``start`` |
       +===================+======================+
       | ``-(arr.ndim+1)`` | raise ``AxisError``  |
       +-------------------+----------------------+
       | ``-arr.ndim``     | 0                    |
       +-------------------+----------------------+
       | |vdots|           | |vdots|              |
       +-------------------+----------------------+
       | ``-1``            | ``arr.ndim-1``       |
       +-------------------+----------------------+
       | ``0``             | ``0``                |
       +-------------------+----------------------+
       | |vdots|           | |vdots|              |
       +-------------------+----------------------+
       | ``arr.ndim``      | ``arr.ndim``         |
       +-------------------+----------------------+
       | ``arr.ndim + 1``  | raise ``AxisError``  |
       +-------------------+----------------------+

    .. |vdots|   unicode:: U+22EE .. Vertical Ellipsis

Returns
-------
res : ndarray
    For NumPy >= 1.10.0 a view of `a` is always returned. For earlier
    NumPy versions a view of `a` is returned only if the order of the
    axes is changed, otherwise the input array is returned.

See Also
--------
moveaxis : Move array axes to new positions.
roll : Roll the elements of an array by a number of positions along a
    given axis.

Examples
--------
>>> a = np.ones((3,4,5,6))
>>> np.rollaxis(a, 3, 1).shape
(3, 6, 4, 5)
>>> np.rollaxis(a, 2).shape
(5, 3, 4, 6)
>>> np.rollaxis(a, 1, 4).shape
(3, 5, 6, 4)

---
## normalize_axis_tuple
```python
from numeric import normalize_axis_tuple
```

Normalizes an axis argument into a tuple of non-negative integer axes.

This handles shorthands such as ``1`` and converts them to ``(1,)``,
as well as performing the handling of negative indices covered by
`normalize_axis_index`.

By default, this forbids axes from being specified multiple times.

Used internally by multi-axis-checking logic.

.. versionadded:: 1.13.0

Parameters
----------
axis : int, iterable of int
    The un-normalized index or indices of the axis.
ndim : int
    The number of dimensions of the array that `axis` should be normalized
    against.
argname : str, optional
    A prefix to put before the error message, typically the name of the
    argument.
allow_duplicate : bool, optional
    If False, the default, disallow an axis from being specified twice.

Returns
-------
normalized_axes : tuple of int
    The normalized axis index, such that `0 <= normalized_axis < ndim`

Raises
------
AxisError
    If any axis provided is out of range
ValueError
    If an axis is repeated

See also
--------
normalize_axis_index : normalizing a single scalar axis

---
## _moveaxis_dispatcher
```python
from numeric import _moveaxis_dispatcher
```



---
## moveaxis
```python
from numeric import moveaxis
```

Move axes of an array to new positions.

Other axes remain in their original order.

.. versionadded:: 1.11.0

Parameters
----------
a : np.ndarray
    The array whose axes should be reordered.
source : int or sequence of int
    Original positions of the axes to move. These must be unique.
destination : int or sequence of int
    Destination positions for each of the original axes. These must also be
    unique.

Returns
-------
result : np.ndarray
    Array with moved axes. This array is a view of the input array.

See Also
--------
transpose : Permute the dimensions of an array.
swapaxes : Interchange two axes of an array.

Examples
--------
>>> x = np.zeros((3, 4, 5))
>>> np.moveaxis(x, 0, -1).shape
(4, 5, 3)
>>> np.moveaxis(x, -1, 0).shape
(5, 3, 4)

These all achieve the same result:

>>> np.transpose(x).shape
(5, 4, 3)
>>> np.swapaxes(x, 0, -1).shape
(5, 4, 3)
>>> np.moveaxis(x, [0, 1], [-1, -2]).shape
(5, 4, 3)
>>> np.moveaxis(x, [0, 1, 2], [-1, -2, -3]).shape
(5, 4, 3)

---
## _cross_dispatcher
```python
from numeric import _cross_dispatcher
```



---
## cross
```python
from numeric import cross
```

Return the cross product of two (arrays of) vectors.

The cross product of `a` and `b` in :math:`R^3` is a vector perpendicular
to both `a` and `b`.  If `a` and `b` are arrays of vectors, the vectors
are defined by the last axis of `a` and `b` by default, and these axes
can have dimensions 2 or 3.  Where the dimension of either `a` or `b` is
2, the third component of the input vector is assumed to be zero and the
cross product calculated accordingly.  In cases where both input vectors
have dimension 2, the z-component of the cross product is returned.

Parameters
----------
a : array_like
    Components of the first vector(s).
b : array_like
    Components of the second vector(s).
axisa : int, optional
    Axis of `a` that defines the vector(s).  By default, the last axis.
axisb : int, optional
    Axis of `b` that defines the vector(s).  By default, the last axis.
axisc : int, optional
    Axis of `c` containing the cross product vector(s).  Ignored if
    both input vectors have dimension 2, as the return is scalar.
    By default, the last axis.
axis : int, optional
    If defined, the axis of `a`, `b` and `c` that defines the vector(s)
    and cross product(s).  Overrides `axisa`, `axisb` and `axisc`.

Returns
-------
c : ndarray
    Vector cross product(s).

Raises
------
ValueError
    When the dimension of the vector(s) in `a` and/or `b` does not
    equal 2 or 3.

See Also
--------
inner : Inner product
outer : Outer product.
ix_ : Construct index arrays.

Notes
-----
.. versionadded:: 1.9.0

Supports full broadcasting of the inputs.

Examples
--------
Vector cross-product.

>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> np.cross(x, y)
array([-3,  6, -3])

One vector with dimension 2.

>>> x = [1, 2]
>>> y = [4, 5, 6]
>>> np.cross(x, y)
array([12, -6, -3])

Equivalently:

>>> x = [1, 2, 0]
>>> y = [4, 5, 6]
>>> np.cross(x, y)
array([12, -6, -3])

Both vectors with dimension 2.

>>> x = [1,2]
>>> y = [4,5]
>>> np.cross(x, y)
array(-3)

Multiple vector cross-products. Note that the direction of the cross
product vector is defined by the *right-hand rule*.

>>> x = np.array([[1,2,3], [4,5,6]])
>>> y = np.array([[4,5,6], [1,2,3]])
>>> np.cross(x, y)
array([[-3,  6, -3],
       [ 3, -6,  3]])

The orientation of `c` can be changed using the `axisc` keyword.

>>> np.cross(x, y, axisc=0)
array([[-3,  3],
       [ 6, -6],
       [-3,  3]])

Change the vector definition of `x` and `y` using `axisa` and `axisb`.

>>> x = np.array([[1,2,3], [4,5,6], [7, 8, 9]])
>>> y = np.array([[7, 8, 9], [4,5,6], [1,2,3]])
>>> np.cross(x, y)
array([[ -6,  12,  -6],
       [  0,   0,   0],
       [  6, -12,   6]])
>>> np.cross(x, y, axisa=0, axisb=0)
array([[-24,  48, -24],
       [-30,  60, -30],
       [-36,  72, -36]])

---
## indices
```python
from numeric import indices
```

Return an array representing the indices of a grid.

Compute an array where the subarrays contain index values 0, 1, ...
varying only along the corresponding axis.

Parameters
----------
dimensions : sequence of ints
    The shape of the grid.
dtype : dtype, optional
    Data type of the result.
sparse : boolean, optional
    Return a sparse representation of the grid instead of a dense
    representation. Default is False.

    .. versionadded:: 1.17

Returns
-------
grid : one ndarray or tuple of ndarrays
    If sparse is False:
        Returns one array of grid indices,
        ``grid.shape = (len(dimensions),) + tuple(dimensions)``.
    If sparse is True:
        Returns a tuple of arrays, with
        ``grid[i].shape = (1, ..., 1, dimensions[i], 1, ..., 1)`` with
        dimensions[i] in the ith place

See Also
--------
mgrid, ogrid, meshgrid

Notes
-----
The output shape in the dense case is obtained by prepending the number
of dimensions in front of the tuple of dimensions, i.e. if `dimensions`
is a tuple ``(r0, ..., rN-1)`` of length ``N``, the output shape is
``(N, r0, ..., rN-1)``.

The subarrays ``grid[k]`` contains the N-D array of indices along the
``k-th`` axis. Explicitly::

    grid[k, i0, i1, ..., iN-1] = ik

Examples
--------
>>> grid = np.indices((2, 3))
>>> grid.shape
(2, 2, 3)
>>> grid[0]        # row indices
array([[0, 0, 0],
       [1, 1, 1]])
>>> grid[1]        # column indices
array([[0, 1, 2],
       [0, 1, 2]])

The indices can be used as an index into an array.

>>> x = np.arange(20).reshape(5, 4)
>>> row, col = np.indices((2, 3))
>>> x[row, col]
array([[0, 1, 2],
       [4, 5, 6]])

Note that it would be more straightforward in the above example to
extract the required elements directly with ``x[:2, :3]``.

If sparse is set to true, the grid will be returned in a sparse
representation.

>>> i, j = np.indices((2, 3), sparse=True)
>>> i.shape
(2, 1)
>>> j.shape
(1, 3)
>>> i        # row indices
array([[0],
       [1]])
>>> j        # column indices
array([[0, 1, 2]])

---
## fromfunction
```python
from numeric import fromfunction
```

Construct an array by executing a function over each coordinate.

The resulting array therefore has a value ``fn(x, y, z)`` at
coordinate ``(x, y, z)``.

Parameters
----------
function : callable
    The function is called with N parameters, where N is the rank of
    `shape`.  Each parameter represents the coordinates of the array
    varying along a specific axis.  For example, if `shape`
    were ``(2, 2)``, then the parameters would be
    ``array([[0, 0], [1, 1]])`` and ``array([[0, 1], [0, 1]])``
shape : (N,) tuple of ints
    Shape of the output array, which also determines the shape of
    the coordinate arrays passed to `function`.
dtype : data-type, optional
    Data-type of the coordinate arrays passed to `function`.
    By default, `dtype` is float.
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
fromfunction : any
    The result of the call to `function` is passed back directly.
    Therefore the shape of `fromfunction` is completely determined by
    `function`.  If `function` returns a scalar value, the shape of
    `fromfunction` would not match the `shape` parameter.

See Also
--------
indices, meshgrid

Notes
-----
Keywords other than `dtype` and `like` are passed to `function`.

Examples
--------
>>> np.fromfunction(lambda i, j: i, (2, 2), dtype=float)
array([[0., 0.],
       [1., 1.]])

>>> np.fromfunction(lambda i, j: j, (2, 2), dtype=float)
array([[0., 1.],
       [0., 1.]])

>>> np.fromfunction(lambda i, j: i == j, (3, 3), dtype=int)
array([[ True, False, False],
       [False,  True, False],
       [False, False,  True]])

>>> np.fromfunction(lambda i, j: i + j, (3, 3), dtype=int)
array([[0, 1, 2],
       [1, 2, 3],
       [2, 3, 4]])

---
## _frombuffer
```python
from numeric import _frombuffer
```



---
## isscalar
```python
from numeric import isscalar
```

Returns True if the type of `element` is a scalar type.

Parameters
----------
element : any
    Input argument, can be of any type and shape.

Returns
-------
val : bool
    True if `element` is a scalar type, False if it is not.

See Also
--------
ndim : Get the number of dimensions of an array

Notes
-----
If you need a stricter way to identify a *numerical* scalar, use
``isinstance(x, numbers.Number)``, as that returns ``False`` for most
non-numerical elements such as strings.

In most cases ``np.ndim(x) == 0`` should be used instead of this function,
as that will also return true for 0d arrays. This is how numpy overloads
functions in the style of the ``dx`` arguments to `gradient` and the ``bins``
argument to `histogram`. Some key differences:

+--------------------------------------+---------------+-------------------+
| x                                    |``isscalar(x)``|``np.ndim(x) == 0``|
+======================================+===============+===================+
| PEP 3141 numeric objects (including  | ``True``      | ``True``          |
| builtins)                            |               |                   |
+--------------------------------------+---------------+-------------------+
| builtin string and buffer objects    | ``True``      | ``True``          |
+--------------------------------------+---------------+-------------------+
| other builtin objects, like          | ``False``     | ``True``          |
| `pathlib.Path`, `Exception`,         |               |                   |
| the result of `re.compile`           |               |                   |
+--------------------------------------+---------------+-------------------+
| third-party objects like             | ``False``     | ``True``          |
| `matplotlib.figure.Figure`           |               |                   |
+--------------------------------------+---------------+-------------------+
| zero-dimensional numpy arrays        | ``False``     | ``True``          |
+--------------------------------------+---------------+-------------------+
| other numpy arrays                   | ``False``     | ``False``         |
+--------------------------------------+---------------+-------------------+
| `list`, `tuple`, and other sequence  | ``False``     | ``False``         |
| objects                              |               |                   |
+--------------------------------------+---------------+-------------------+

Examples
--------
>>> np.isscalar(3.1)
True
>>> np.isscalar(np.array(3.1))
False
>>> np.isscalar([3.1])
False
>>> np.isscalar(False)
True
>>> np.isscalar('numpy')
True

NumPy supports PEP 3141 numbers:

>>> from fractions import Fraction
>>> np.isscalar(Fraction(5, 17))
True
>>> from numbers import Number
>>> np.isscalar(Number())
True

---
## binary_repr
```python
from numeric import binary_repr
```

Return the binary representation of the input number as a string.

For negative numbers, if width is not given, a minus sign is added to the
front. If width is given, the two's complement of the number is
returned, with respect to that width.

In a two's-complement system negative numbers are represented by the two's
complement of the absolute value. This is the most common method of
representing signed integers on computers [1]_. A N-bit two's-complement
system can represent every integer in the range
:math:`-2^{N-1}` to :math:`+2^{N-1}-1`.

Parameters
----------
num : int
    Only an integer decimal number can be used.
width : int, optional
    The length of the returned string if `num` is positive, or the length
    of the two's complement if `num` is negative, provided that `width` is
    at least a sufficient number of bits for `num` to be represented in the
    designated form.

    If the `width` value is insufficient, it will be ignored, and `num` will
    be returned in binary (`num` > 0) or two's complement (`num` < 0) form
    with its width equal to the minimum number of bits needed to represent
    the number in the designated form. This behavior is deprecated and will
    later raise an error.

    .. deprecated:: 1.12.0

Returns
-------
bin : str
    Binary representation of `num` or two's complement of `num`.

See Also
--------
base_repr: Return a string representation of a number in the given base
           system.
bin: Python's built-in binary representation generator of an integer.

Notes
-----
`binary_repr` is equivalent to using `base_repr` with base 2, but about 25x
faster.

References
----------
.. [1] Wikipedia, "Two's complement",
    https://en.wikipedia.org/wiki/Two's_complement

Examples
--------
>>> np.binary_repr(3)
'11'
>>> np.binary_repr(-3)
'-11'
>>> np.binary_repr(3, width=4)
'0011'

The two's complement is returned when the input number is negative and
width is specified:

>>> np.binary_repr(-3, width=3)
'101'
>>> np.binary_repr(-3, width=5)
'11101'

---
## base_repr
```python
from numeric import base_repr
```

Return a string representation of a number in the given base system.

Parameters
----------
number : int
    The value to convert. Positive and negative values are handled.
base : int, optional
    Convert `number` to the `base` number system. The valid range is 2-36,
    the default value is 2.
padding : int, optional
    Number of zeros padded on the left. Default is 0 (no padding).

Returns
-------
out : str
    String representation of `number` in `base` system.

See Also
--------
binary_repr : Faster version of `base_repr` for base 2.

Examples
--------
>>> np.base_repr(5)
'101'
>>> np.base_repr(6, 5)
'11'
>>> np.base_repr(7, base=5, padding=3)
'00012'

>>> np.base_repr(10, base=16)
'A'
>>> np.base_repr(32, base=16)
'20'

---
## _maketup
```python
from numeric import _maketup
```



---
## identity
```python
from numeric import identity
```

Return the identity array.

The identity array is a square array with ones on
the main diagonal.

Parameters
----------
n : int
    Number of rows (and columns) in `n` x `n` output.
dtype : data-type, optional
    Data-type of the output.  Defaults to ``float``.
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    `n` x `n` array with its main diagonal set to one,
    and all other elements 0.

Examples
--------
>>> np.identity(3)
array([[1.,  0.,  0.],
       [0.,  1.,  0.],
       [0.,  0.,  1.]])

---
## _allclose_dispatcher
```python
from numeric import _allclose_dispatcher
```



---
## allclose
```python
from numeric import allclose
```

Returns True if two arrays are element-wise equal within a tolerance.

The tolerance values are positive, typically very small numbers.  The
relative difference (`rtol` * abs(`b`)) and the absolute difference
`atol` are added together to compare against the absolute difference
between `a` and `b`.

NaNs are treated as equal if they are in the same place and if
``equal_nan=True``.  Infs are treated as equal if they are in the same
place and of the same sign in both arrays.

Parameters
----------
a, b : array_like
    Input arrays to compare.
rtol : float
    The relative tolerance parameter (see Notes).
atol : float
    The absolute tolerance parameter (see Notes).
equal_nan : bool
    Whether to compare NaN's as equal.  If True, NaN's in `a` will be
    considered equal to NaN's in `b` in the output array.

    .. versionadded:: 1.10.0

Returns
-------
allclose : bool
    Returns True if the two arrays are equal within the given
    tolerance; False otherwise.

See Also
--------
isclose, all, any, equal

Notes
-----
If the following equation is element-wise True, then allclose returns
True.

 absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))

The above equation is not symmetric in `a` and `b`, so that
``allclose(a, b)`` might be different from ``allclose(b, a)`` in
some rare cases.

The comparison of `a` and `b` uses standard broadcasting, which
means that `a` and `b` need not have the same shape in order for
``allclose(a, b)`` to evaluate to True.  The same is true for
`equal` but not `array_equal`.

`allclose` is not defined for non-numeric data types.
`bool` is considered a numeric data-type for this purpose.

Examples
--------
>>> np.allclose([1e10,1e-7], [1.00001e10,1e-8])
False
>>> np.allclose([1e10,1e-8], [1.00001e10,1e-9])
True
>>> np.allclose([1e10,1e-8], [1.0001e10,1e-9])
False
>>> np.allclose([1.0, np.nan], [1.0, np.nan])
False
>>> np.allclose([1.0, np.nan], [1.0, np.nan], equal_nan=True)
True

---
## _isclose_dispatcher
```python
from numeric import _isclose_dispatcher
```



---
## isclose
```python
from numeric import isclose
```

Returns a boolean array where two arrays are element-wise equal within a
tolerance.

The tolerance values are positive, typically very small numbers.  The
relative difference (`rtol` * abs(`b`)) and the absolute difference
`atol` are added together to compare against the absolute difference
between `a` and `b`.

.. warning:: The default `atol` is not appropriate for comparing numbers
             that are much smaller than one (see Notes).

Parameters
----------
a, b : array_like
    Input arrays to compare.
rtol : float
    The relative tolerance parameter (see Notes).
atol : float
    The absolute tolerance parameter (see Notes).
equal_nan : bool
    Whether to compare NaN's as equal.  If True, NaN's in `a` will be
    considered equal to NaN's in `b` in the output array.

Returns
-------
y : array_like
    Returns a boolean array of where `a` and `b` are equal within the
    given tolerance. If both `a` and `b` are scalars, returns a single
    boolean value.

See Also
--------
allclose
math.isclose

Notes
-----
.. versionadded:: 1.7.0

For finite values, isclose uses the following equation to test whether
two floating point values are equivalent.

 absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))

Unlike the built-in `math.isclose`, the above equation is not symmetric
in `a` and `b` -- it assumes `b` is the reference value -- so that
`isclose(a, b)` might be different from `isclose(b, a)`. Furthermore,
the default value of atol is not zero, and is used to determine what
small values should be considered close to zero. The default value is
appropriate for expected values of order unity: if the expected values
are significantly smaller than one, it can result in false positives.
`atol` should be carefully selected for the use case at hand. A zero value
for `atol` will result in `False` if either `a` or `b` is zero.

`isclose` is not defined for non-numeric data types.
`bool` is considered a numeric data-type for this purpose.

Examples
--------
>>> np.isclose([1e10,1e-7], [1.00001e10,1e-8])
array([ True, False])
>>> np.isclose([1e10,1e-8], [1.00001e10,1e-9])
array([ True, True])
>>> np.isclose([1e10,1e-8], [1.0001e10,1e-9])
array([False,  True])
>>> np.isclose([1.0, np.nan], [1.0, np.nan])
array([ True, False])
>>> np.isclose([1.0, np.nan], [1.0, np.nan], equal_nan=True)
array([ True, True])
>>> np.isclose([1e-8, 1e-7], [0.0, 0.0])
array([ True, False])
>>> np.isclose([1e-100, 1e-7], [0.0, 0.0], atol=0.0)
array([False, False])
>>> np.isclose([1e-10, 1e-10], [1e-20, 0.0])
array([ True,  True])
>>> np.isclose([1e-10, 1e-10], [1e-20, 0.999999e-10], atol=0.0)
array([False,  True])

---
## _array_equal_dispatcher
```python
from numeric import _array_equal_dispatcher
```



---
## array_equal
```python
from numeric import array_equal
```

True if two arrays have the same shape and elements, False otherwise.

Parameters
----------
a1, a2 : array_like
    Input arrays.
equal_nan : bool
    Whether to compare NaN's as equal. If the dtype of a1 and a2 is
    complex, values will be considered equal if either the real or the
    imaginary component of a given value is ``nan``.

    .. versionadded:: 1.19.0

Returns
-------
b : bool
    Returns True if the arrays are equal.

See Also
--------
allclose: Returns True if two arrays are element-wise equal within a
          tolerance.
array_equiv: Returns True if input arrays are shape consistent and all
             elements equal.

Examples
--------
>>> np.array_equal([1, 2], [1, 2])
True
>>> np.array_equal(np.array([1, 2]), np.array([1, 2]))
True
>>> np.array_equal([1, 2], [1, 2, 3])
False
>>> np.array_equal([1, 2], [1, 4])
False
>>> a = np.array([1, np.nan])
>>> np.array_equal(a, a)
False
>>> np.array_equal(a, a, equal_nan=True)
True

When ``equal_nan`` is True, complex values with nan components are
considered equal if either the real *or* the imaginary components are nan.

>>> a = np.array([1 + 1j])
>>> b = a.copy()
>>> a.real = np.nan
>>> b.imag = np.nan
>>> np.array_equal(a, b, equal_nan=True)
True

---
## _array_equiv_dispatcher
```python
from numeric import _array_equiv_dispatcher
```



---
## array_equiv
```python
from numeric import array_equiv
```

Returns True if input arrays are shape consistent and all elements equal.

Shape consistent means they are either the same shape, or one input array
can be broadcasted to create the same shape as the other one.

Parameters
----------
a1, a2 : array_like
    Input arrays.

Returns
-------
out : bool
    True if equivalent, False otherwise.

Examples
--------
>>> np.array_equiv([1, 2], [1, 2])
True
>>> np.array_equiv([1, 2], [1, 3])
False

Showing the shape equivalence:

>>> np.array_equiv([1, 2], [[1, 2], [1, 2]])
True
>>> np.array_equiv([1, 2], [[1, 2, 1, 2], [1, 2, 1, 2]])
False

>>> np.array_equiv([1, 2], [[1, 2], [1, 3]])
False

---
## extend_all
```python
from numeric import extend_all
```



---
## warn_if_insufficient
```python
from numeric import warn_if_insufficient
```



---
## within_tol
```python
from numeric import within_tol
```



---
## __name__
```python
from function_base import __name__
```



---
## _linspace_dispatcher
```python
from function_base import _linspace_dispatcher
```



---
## linspace
```python
from function_base import linspace
```

Return evenly spaced numbers over a specified interval.

Returns `num` evenly spaced samples, calculated over the
interval [`start`, `stop`].

The endpoint of the interval can optionally be excluded.

.. versionchanged:: 1.16.0
    Non-scalar `start` and `stop` are now supported.

.. versionchanged:: 1.20.0
    Values are rounded towards ``-inf`` instead of ``0`` when an
    integer ``dtype`` is specified. The old behavior can
    still be obtained with ``np.linspace(start, stop, num).astype(int)``

Parameters
----------
start : array_like
    The starting value of the sequence.
stop : array_like
    The end value of the sequence, unless `endpoint` is set to False.
    In that case, the sequence consists of all but the last of ``num + 1``
    evenly spaced samples, so that `stop` is excluded.  Note that the step
    size changes when `endpoint` is False.
num : int, optional
    Number of samples to generate. Default is 50. Must be non-negative.
endpoint : bool, optional
    If True, `stop` is the last sample. Otherwise, it is not included.
    Default is True.
retstep : bool, optional
    If True, return (`samples`, `step`), where `step` is the spacing
    between samples.
dtype : dtype, optional
    The type of the output array.  If `dtype` is not given, the data type
    is inferred from `start` and `stop`. The inferred dtype will never be
    an integer; `float` is chosen even if the arguments would produce an
    array of integers.

    .. versionadded:: 1.9.0

axis : int, optional
    The axis in the result to store the samples.  Relevant only if start
    or stop are array-like.  By default (0), the samples will be along a
    new axis inserted at the beginning. Use -1 to get an axis at the end.

    .. versionadded:: 1.16.0

Returns
-------
samples : ndarray
    There are `num` equally spaced samples in the closed interval
    ``[start, stop]`` or the half-open interval ``[start, stop)``
    (depending on whether `endpoint` is True or False).
step : float, optional
    Only returned if `retstep` is True

    Size of spacing between samples.


See Also
--------
arange : Similar to `linspace`, but uses a step size (instead of the
         number of samples).
geomspace : Similar to `linspace`, but with numbers spaced evenly on a log
            scale (a geometric progression).
logspace : Similar to `geomspace`, but with the end points specified as
           logarithms.
:ref:`how-to-partition`

Examples
--------
>>> np.linspace(2.0, 3.0, num=5)
array([2.  , 2.25, 2.5 , 2.75, 3.  ])
>>> np.linspace(2.0, 3.0, num=5, endpoint=False)
array([2. ,  2.2,  2.4,  2.6,  2.8])
>>> np.linspace(2.0, 3.0, num=5, retstep=True)
(array([2.  ,  2.25,  2.5 ,  2.75,  3.  ]), 0.25)

Graphical illustration:

>>> import matplotlib.pyplot as plt
>>> N = 8
>>> y = np.zeros(N)
>>> x1 = np.linspace(0, 10, N, endpoint=True)
>>> x2 = np.linspace(0, 10, N, endpoint=False)
>>> plt.plot(x1, y, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.plot(x2, y + 0.5, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.ylim([-0.5, 1])
(-0.5, 1)
>>> plt.show()

---
## _logspace_dispatcher
```python
from function_base import _logspace_dispatcher
```



---
## logspace
```python
from function_base import logspace
```

Return numbers spaced evenly on a log scale.

In linear space, the sequence starts at ``base ** start``
(`base` to the power of `start`) and ends with ``base ** stop``
(see `endpoint` below).

.. versionchanged:: 1.16.0
    Non-scalar `start` and `stop` are now supported.

.. versionchanged:: 1.25.0
    Non-scalar 'base` is now supported

Parameters
----------
start : array_like
    ``base ** start`` is the starting value of the sequence.
stop : array_like
    ``base ** stop`` is the final value of the sequence, unless `endpoint`
    is False.  In that case, ``num + 1`` values are spaced over the
    interval in log-space, of which all but the last (a sequence of
    length `num`) are returned.
num : integer, optional
    Number of samples to generate.  Default is 50.
endpoint : boolean, optional
    If true, `stop` is the last sample. Otherwise, it is not included.
    Default is True.
base : array_like, optional
    The base of the log space. The step size between the elements in
    ``ln(samples) / ln(base)`` (or ``log_base(samples)``) is uniform.
    Default is 10.0.
dtype : dtype
    The type of the output array.  If `dtype` is not given, the data type
    is inferred from `start` and `stop`. The inferred type will never be
    an integer; `float` is chosen even if the arguments would produce an
    array of integers.
axis : int, optional
    The axis in the result to store the samples.  Relevant only if start,
    stop, or base are array-like.  By default (0), the samples will be
    along a new axis inserted at the beginning. Use -1 to get an axis at
    the end.

    .. versionadded:: 1.16.0


Returns
-------
samples : ndarray
    `num` samples, equally spaced on a log scale.

See Also
--------
arange : Similar to linspace, with the step size specified instead of the
         number of samples. Note that, when used with a float endpoint, the
         endpoint may or may not be included.
linspace : Similar to logspace, but with the samples uniformly distributed
           in linear space, instead of log space.
geomspace : Similar to logspace, but with endpoints specified directly.
:ref:`how-to-partition`

Notes
-----
If base is a scalar, logspace is equivalent to the code

>>> y = np.linspace(start, stop, num=num, endpoint=endpoint)
... # doctest: +SKIP
>>> power(base, y).astype(dtype)
... # doctest: +SKIP

Examples
--------
>>> np.logspace(2.0, 3.0, num=4)
array([ 100.        ,  215.443469  ,  464.15888336, 1000.        ])
>>> np.logspace(2.0, 3.0, num=4, endpoint=False)
array([100.        ,  177.827941  ,  316.22776602,  562.34132519])
>>> np.logspace(2.0, 3.0, num=4, base=2.0)
array([4.        ,  5.0396842 ,  6.34960421,  8.        ])
>>> np.logspace(2.0, 3.0, num=4, base=[2.0, 3.0], axis=-1)
array([[ 4.        ,  5.0396842 ,  6.34960421,  8.        ],
       [ 9.        , 12.98024613, 18.72075441, 27.        ]])

Graphical illustration:

>>> import matplotlib.pyplot as plt
>>> N = 10
>>> x1 = np.logspace(0.1, 1, N, endpoint=True)
>>> x2 = np.logspace(0.1, 1, N, endpoint=False)
>>> y = np.zeros(N)
>>> plt.plot(x1, y, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.plot(x2, y + 0.5, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.ylim([-0.5, 1])
(-0.5, 1)
>>> plt.show()

---
## _geomspace_dispatcher
```python
from function_base import _geomspace_dispatcher
```



---
## geomspace
```python
from function_base import geomspace
```

Return numbers spaced evenly on a log scale (a geometric progression).

This is similar to `logspace`, but with endpoints specified directly.
Each output sample is a constant multiple of the previous.

.. versionchanged:: 1.16.0
    Non-scalar `start` and `stop` are now supported.

Parameters
----------
start : array_like
    The starting value of the sequence.
stop : array_like
    The final value of the sequence, unless `endpoint` is False.
    In that case, ``num + 1`` values are spaced over the
    interval in log-space, of which all but the last (a sequence of
    length `num`) are returned.
num : integer, optional
    Number of samples to generate.  Default is 50.
endpoint : boolean, optional
    If true, `stop` is the last sample. Otherwise, it is not included.
    Default is True.
dtype : dtype
    The type of the output array.  If `dtype` is not given, the data type
    is inferred from `start` and `stop`. The inferred dtype will never be
    an integer; `float` is chosen even if the arguments would produce an
    array of integers.
axis : int, optional
    The axis in the result to store the samples.  Relevant only if start
    or stop are array-like.  By default (0), the samples will be along a
    new axis inserted at the beginning. Use -1 to get an axis at the end.

    .. versionadded:: 1.16.0

Returns
-------
samples : ndarray
    `num` samples, equally spaced on a log scale.

See Also
--------
logspace : Similar to geomspace, but with endpoints specified using log
           and base.
linspace : Similar to geomspace, but with arithmetic instead of geometric
           progression.
arange : Similar to linspace, with the step size specified instead of the
         number of samples.
:ref:`how-to-partition`

Notes
-----
If the inputs or dtype are complex, the output will follow a logarithmic
spiral in the complex plane.  (There are an infinite number of spirals
passing through two points; the output will follow the shortest such path.)

Examples
--------
>>> np.geomspace(1, 1000, num=4)
array([    1.,    10.,   100.,  1000.])
>>> np.geomspace(1, 1000, num=3, endpoint=False)
array([   1.,   10.,  100.])
>>> np.geomspace(1, 1000, num=4, endpoint=False)
array([   1.        ,    5.62341325,   31.6227766 ,  177.827941  ])
>>> np.geomspace(1, 256, num=9)
array([   1.,    2.,    4.,    8.,   16.,   32.,   64.,  128.,  256.])

Note that the above may not produce exact integers:

>>> np.geomspace(1, 256, num=9, dtype=int)
array([  1,   2,   4,   7,  16,  32,  63, 127, 256])
>>> np.around(np.geomspace(1, 256, num=9)).astype(int)
array([  1,   2,   4,   8,  16,  32,  64, 128, 256])

Negative, decreasing, and complex inputs are allowed:

>>> np.geomspace(1000, 1, num=4)
array([1000.,  100.,   10.,    1.])
>>> np.geomspace(-1000, -1, num=4)
array([-1000.,  -100.,   -10.,    -1.])
>>> np.geomspace(1j, 1000j, num=4)  # Straight line
array([0.   +1.j, 0.  +10.j, 0. +100.j, 0.+1000.j])
>>> np.geomspace(-1+0j, 1+0j, num=5)  # Circle
array([-1.00000000e+00+1.22464680e-16j, -7.07106781e-01+7.07106781e-01j,
        6.12323400e-17+1.00000000e+00j,  7.07106781e-01+7.07106781e-01j,
        1.00000000e+00+0.00000000e+00j])

Graphical illustration of `endpoint` parameter:

>>> import matplotlib.pyplot as plt
>>> N = 10
>>> y = np.zeros(N)
>>> plt.semilogx(np.geomspace(1, 1000, N, endpoint=True), y + 1, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.semilogx(np.geomspace(1, 1000, N, endpoint=False), y + 2, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.axis([0.5, 2000, 0, 3])
[0.5, 2000, 0, 3]
>>> plt.grid(True, color='0.7', linestyle='-', which='both', axis='both')
>>> plt.show()

---
## _needs_add_docstring
```python
from function_base import _needs_add_docstring
```

Returns true if the only way to set the docstring of `obj` from python is
via add_docstring.

This function errs on the side of being overly conservative.

---
## _add_docstring
```python
from function_base import _add_docstring
```



---
## add_newdoc
```python
from function_base import add_newdoc
```

Add documentation to an existing object, typically one defined in C

The purpose is to allow easier editing of the docstrings without requiring
a re-compile. This exists primarily for internal use within numpy itself.

Parameters
----------
place : str
    The absolute name of the module to import from
obj : str
    The name of the object to add documentation to, typically a class or
    function name
doc : {str, Tuple[str, str], List[Tuple[str, str]]}
    If a string, the documentation to apply to `obj`

    If a tuple, then the first element is interpreted as an attribute of
    `obj` and the second as the docstring to apply - ``(method, docstring)``

    If a list, then each element of the list should be a tuple of length
    two - ``[(method1, docstring1), (method2, docstring2), ...]``
warn_on_python : bool
    If True, the default, emit `UserWarning` if this is used to attach
    documentation to a pure-python object.

Notes
-----
This routine never raises an error if the docstring can't be written, but
will raise an error if the object being documented does not exist.

This routine cannot modify read-only docstrings, as appear
in new-style classes or built-in functions. Because this
routine never raises an error the caller must check manually
that the docstrings were changed.

Since this function grabs the ``char *`` from a c-level str object and puts
it into the ``tp_doc`` slot of the type of `obj`, it violates a number of
C-API best-practices, by:

- modifying a `PyTypeObject` after calling `PyType_Ready`
- calling `Py_INCREF` on the str and losing the reference, so the str
  will never be released

If possible it should be avoided.

---
## __name__
```python
from einsumfunc import __name__
```



---
## _flop_count
```python
from einsumfunc import _flop_count
```

Computes the number of FLOPS in the contraction.

Parameters
----------
idx_contraction : iterable
    The indices involved in the contraction
inner : bool
    Does this contraction require an inner product?
num_terms : int
    The number of terms in a contraction
size_dictionary : dict
    The size of each of the indices in idx_contraction

Returns
-------
flop_count : int
    The total number of FLOPS required for the contraction.

Examples
--------

>>> _flop_count('abc', False, 1, {'a': 2, 'b':3, 'c':5})
30

>>> _flop_count('abc', True, 2, {'a': 2, 'b':3, 'c':5})
60

---
## _compute_size_by_dict
```python
from einsumfunc import _compute_size_by_dict
```

Computes the product of the elements in indices based on the dictionary
idx_dict.

Parameters
----------
indices : iterable
    Indices to base the product on.
idx_dict : dictionary
    Dictionary of index sizes

Returns
-------
ret : int
    The resulting product.

Examples
--------
>>> _compute_size_by_dict('abbc', {'a': 2, 'b':3, 'c':5})
90

---
## _find_contraction
```python
from einsumfunc import _find_contraction
```

Finds the contraction for a given set of input and output sets.

Parameters
----------
positions : iterable
    Integer positions of terms used in the contraction.
input_sets : list
    List of sets that represent the lhs side of the einsum subscript
output_set : set
    Set that represents the rhs side of the overall einsum subscript

Returns
-------
new_result : set
    The indices of the resulting contraction
remaining : list
    List of sets that have not been contracted, the new set is appended to
    the end of this list
idx_removed : set
    Indices removed from the entire contraction
idx_contraction : set
    The indices used in the current contraction

Examples
--------

# A simple dot product test case
>>> pos = (0, 1)
>>> isets = [set('ab'), set('bc')]
>>> oset = set('ac')
>>> _find_contraction(pos, isets, oset)
({'a', 'c'}, [{'a', 'c'}], {'b'}, {'a', 'b', 'c'})

# A more complex case with additional terms in the contraction
>>> pos = (0, 2)
>>> isets = [set('abd'), set('ac'), set('bdc')]
>>> oset = set('ac')
>>> _find_contraction(pos, isets, oset)
({'a', 'c'}, [{'a', 'c'}, {'a', 'c'}], {'b', 'd'}, {'a', 'b', 'c', 'd'})

---
## _optimal_path
```python
from einsumfunc import _optimal_path
```

Computes all possible pair contractions, sieves the results based
on ``memory_limit`` and returns the lowest cost path. This algorithm
scales factorial with respect to the elements in the list ``input_sets``.

Parameters
----------
input_sets : list
    List of sets that represent the lhs side of the einsum subscript
output_set : set
    Set that represents the rhs side of the overall einsum subscript
idx_dict : dictionary
    Dictionary of index sizes
memory_limit : int
    The maximum number of elements in a temporary array

Returns
-------
path : list
    The optimal contraction order within the memory limit constraint.

Examples
--------
>>> isets = [set('abd'), set('ac'), set('bdc')]
>>> oset = set()
>>> idx_sizes = {'a': 1, 'b':2, 'c':3, 'd':4}
>>> _optimal_path(isets, oset, idx_sizes, 5000)
[(0, 2), (0, 1)]

---
## _parse_possible_contraction
```python
from einsumfunc import _parse_possible_contraction
```

Compute the cost (removed size + flops) and resultant indices for
performing the contraction specified by ``positions``.

Parameters
----------
positions : tuple of int
    The locations of the proposed tensors to contract.
input_sets : list of sets
    The indices found on each tensors.
output_set : set
    The output indices of the expression.
idx_dict : dict
    Mapping of each index to its size.
memory_limit : int
    The total allowed size for an intermediary tensor.
path_cost : int
    The contraction cost so far.
naive_cost : int
    The cost of the unoptimized expression.

Returns
-------
cost : (int, int)
    A tuple containing the size of any indices removed, and the flop cost.
positions : tuple of int
    The locations of the proposed tensors to contract.
new_input_sets : list of sets
    The resulting new list of indices if this proposed contraction is performed.

---
## _update_other_results
```python
from einsumfunc import _update_other_results
```

Update the positions and provisional input_sets of ``results`` based on
performing the contraction result ``best``. Remove any involving the tensors
contracted.

Parameters
----------
results : list
    List of contraction results produced by ``_parse_possible_contraction``.
best : list
    The best contraction of ``results`` i.e. the one that will be performed.

Returns
-------
mod_results : list
    The list of modified results, updated with outcome of ``best`` contraction.

---
## _greedy_path
```python
from einsumfunc import _greedy_path
```

Finds the path by contracting the best pair until the input list is
exhausted. The best pair is found by minimizing the tuple
``(-prod(indices_removed), cost)``.  What this amounts to is prioritizing
matrix multiplication or inner product operations, then Hadamard like
operations, and finally outer operations. Outer products are limited by
``memory_limit``. This algorithm scales cubically with respect to the
number of elements in the list ``input_sets``.

Parameters
----------
input_sets : list
    List of sets that represent the lhs side of the einsum subscript
output_set : set
    Set that represents the rhs side of the overall einsum subscript
idx_dict : dictionary
    Dictionary of index sizes
memory_limit : int
    The maximum number of elements in a temporary array

Returns
-------
path : list
    The greedy contraction order within the memory limit constraint.

Examples
--------
>>> isets = [set('abd'), set('ac'), set('bdc')]
>>> oset = set()
>>> idx_sizes = {'a': 1, 'b':2, 'c':3, 'd':4}
>>> _greedy_path(isets, oset, idx_sizes, 5000)
[(0, 2), (0, 1)]

---
## _can_dot
```python
from einsumfunc import _can_dot
```

Checks if we can use BLAS (np.tensordot) call and its beneficial to do so.

Parameters
----------
inputs : list of str
    Specifies the subscripts for summation.
result : str
    Resulting summation.
idx_removed : set
    Indices that are removed in the summation


Returns
-------
type : bool
    Returns true if BLAS should and can be used, else False

Notes
-----
If the operations is BLAS level 1 or 2 and is not already aligned
we default back to einsum as the memory movement to copy is more
costly than the operation itself.


Examples
--------

# Standard GEMM operation
>>> _can_dot(['ij', 'jk'], 'ik', set('j'))
True

# Can use the standard BLAS, but requires odd data movement
>>> _can_dot(['ijj', 'jk'], 'ik', set('j'))
False

# DDOT where the memory is not aligned
>>> _can_dot(['ijk', 'ikj'], '', set('ijk'))
False

---
## _parse_einsum_input
```python
from einsumfunc import _parse_einsum_input
```

A reproduction of einsum c side einsum parsing in python.

Returns
-------
input_strings : str
    Parsed input strings
output_string : str
    Parsed output string
operands : list of array_like
    The operands to use in the numpy contraction

Examples
--------
The operand list is simplified to reduce printing:

>>> np.random.seed(123)
>>> a = np.random.rand(4, 4)
>>> b = np.random.rand(4, 4, 4)
>>> _parse_einsum_input(('...a,...a->...', a, b))
('za,xza', 'xz', [a, b]) # may vary

>>> _parse_einsum_input((a, [Ellipsis, 0], b, [Ellipsis, 0]))
('za,xza', 'xz', [a, b]) # may vary

---
## _einsum_path_dispatcher
```python
from einsumfunc import _einsum_path_dispatcher
```



---
## einsum_path
```python
from einsumfunc import einsum_path
```

einsum_path(subscripts, *operands, optimize='greedy')

Evaluates the lowest cost contraction order for an einsum expression by
considering the creation of intermediate arrays.

Parameters
----------
subscripts : str
    Specifies the subscripts for summation.
*operands : list of array_like
    These are the arrays for the operation.
optimize : {bool, list, tuple, 'greedy', 'optimal'}
    Choose the type of path. If a tuple is provided, the second argument is
    assumed to be the maximum intermediate size created. If only a single
    argument is provided the largest input or output array size is used
    as a maximum intermediate size.

    * if a list is given that starts with ``einsum_path``, uses this as the
      contraction path
    * if False no optimization is taken
    * if True defaults to the 'greedy' algorithm
    * 'optimal' An algorithm that combinatorially explores all possible
      ways of contracting the listed tensors and chooses the least costly
      path. Scales exponentially with the number of terms in the
      contraction.
    * 'greedy' An algorithm that chooses the best pair contraction
      at each step. Effectively, this algorithm searches the largest inner,
      Hadamard, and then outer products at each step. Scales cubically with
      the number of terms in the contraction. Equivalent to the 'optimal'
      path for most contractions.

    Default is 'greedy'.

Returns
-------
path : list of tuples
    A list representation of the einsum path.
string_repr : str
    A printable representation of the einsum path.

Notes
-----
The resulting path indicates which terms of the input contraction should be
contracted first, the result of this contraction is then appended to the
end of the contraction list. This list can then be iterated over until all
intermediate contractions are complete.

See Also
--------
einsum, linalg.multi_dot

Examples
--------

We can begin with a chain dot example. In this case, it is optimal to
contract the ``b`` and ``c`` tensors first as represented by the first
element of the path ``(1, 2)``. The resulting tensor is added to the end
of the contraction and the remaining contraction ``(0, 1)`` is then
completed.

>>> np.random.seed(123)
>>> a = np.random.rand(2, 2)
>>> b = np.random.rand(2, 5)
>>> c = np.random.rand(5, 2)
>>> path_info = np.einsum_path('ij,jk,kl->il', a, b, c, optimize='greedy')
>>> print(path_info[0])
['einsum_path', (1, 2), (0, 1)]
>>> print(path_info[1])
  Complete contraction:  ij,jk,kl->il # may vary
         Naive scaling:  4
     Optimized scaling:  3
      Naive FLOP count:  1.600e+02
  Optimized FLOP count:  5.600e+01
   Theoretical speedup:  2.857
  Largest intermediate:  4.000e+00 elements
-------------------------------------------------------------------------
scaling                  current                                remaining
-------------------------------------------------------------------------
   3                   kl,jk->jl                                ij,jl->il
   3                   jl,ij->il                                   il->il


A more complex index transformation example.

>>> I = np.random.rand(10, 10, 10, 10)
>>> C = np.random.rand(10, 10)
>>> path_info = np.einsum_path('ea,fb,abcd,gc,hd->efgh', C, C, I, C, C,
...                            optimize='greedy')

>>> print(path_info[0])
['einsum_path', (0, 2), (0, 3), (0, 2), (0, 1)]
>>> print(path_info[1]) 
  Complete contraction:  ea,fb,abcd,gc,hd->efgh # may vary
         Naive scaling:  8
     Optimized scaling:  5
      Naive FLOP count:  8.000e+08
  Optimized FLOP count:  8.000e+05
   Theoretical speedup:  1000.000
  Largest intermediate:  1.000e+04 elements
--------------------------------------------------------------------------
scaling                  current                                remaining
--------------------------------------------------------------------------
   5               abcd,ea->bcde                      fb,gc,hd,bcde->efgh
   5               bcde,fb->cdef                         gc,hd,cdef->efgh
   5               cdef,gc->defg                            hd,defg->efgh
   5               defg,hd->efgh                               efgh->efgh

---
## _einsum_dispatcher
```python
from einsumfunc import _einsum_dispatcher
```



---
## einsum
```python
from einsumfunc import einsum
```

einsum(subscripts, *operands, out=None, dtype=None, order='K',
       casting='safe', optimize=False)

Evaluates the Einstein summation convention on the operands.

Using the Einstein summation convention, many common multi-dimensional,
linear algebraic array operations can be represented in a simple fashion.
In *implicit* mode `einsum` computes these values.

In *explicit* mode, `einsum` provides further flexibility to compute
other array operations that might not be considered classical Einstein
summation operations, by disabling, or forcing summation over specified
subscript labels.

See the notes and examples for clarification.

Parameters
----------
subscripts : str
    Specifies the subscripts for summation as comma separated list of
    subscript labels. An implicit (classical Einstein summation)
    calculation is performed unless the explicit indicator '->' is
    included as well as subscript labels of the precise output form.
operands : list of array_like
    These are the arrays for the operation.
out : ndarray, optional
    If provided, the calculation is done into this array.
dtype : {data-type, None}, optional
    If provided, forces the calculation to use the data type specified.
    Note that you may have to also give a more liberal `casting`
    parameter to allow the conversions. Default is None.
order : {'C', 'F', 'A', 'K'}, optional
    Controls the memory layout of the output. 'C' means it should
    be C contiguous. 'F' means it should be Fortran contiguous,
    'A' means it should be 'F' if the inputs are all 'F', 'C' otherwise.
    'K' means it should be as close to the layout as the inputs as
    is possible, including arbitrarily permuted axes.
    Default is 'K'.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    Controls what kind of data casting may occur.  Setting this to
    'unsafe' is not recommended, as it can adversely affect accumulations.

      * 'no' means the data types should not be cast at all.
      * 'equiv' means only byte-order changes are allowed.
      * 'safe' means only casts which can preserve values are allowed.
      * 'same_kind' means only safe casts or casts within a kind,
        like float64 to float32, are allowed.
      * 'unsafe' means any data conversions may be done.

    Default is 'safe'.
optimize : {False, True, 'greedy', 'optimal'}, optional
    Controls if intermediate optimization should occur. No optimization
    will occur if False and True will default to the 'greedy' algorithm.
    Also accepts an explicit contraction list from the ``np.einsum_path``
    function. See ``np.einsum_path`` for more details. Defaults to False.

Returns
-------
output : ndarray
    The calculation based on the Einstein summation convention.

See Also
--------
einsum_path, dot, inner, outer, tensordot, linalg.multi_dot
einops :
    similar verbose interface is provided by
    `einops <https://github.com/arogozhnikov/einops>`_ package to cover
    additional operations: transpose, reshape/flatten, repeat/tile,
    squeeze/unsqueeze and reductions.
opt_einsum :
    `opt_einsum <https://optimized-einsum.readthedocs.io/en/stable/>`_
    optimizes contraction order for einsum-like expressions
    in backend-agnostic manner.

Notes
-----
.. versionadded:: 1.6.0

The Einstein summation convention can be used to compute
many multi-dimensional, linear algebraic array operations. `einsum`
provides a succinct way of representing these.

A non-exhaustive list of these operations,
which can be computed by `einsum`, is shown below along with examples:

* Trace of an array, :py:func:`numpy.trace`.
* Return a diagonal, :py:func:`numpy.diag`.
* Array axis summations, :py:func:`numpy.sum`.
* Transpositions and permutations, :py:func:`numpy.transpose`.
* Matrix multiplication and dot product, :py:func:`numpy.matmul` :py:func:`numpy.dot`.
* Vector inner and outer products, :py:func:`numpy.inner` :py:func:`numpy.outer`.
* Broadcasting, element-wise and scalar multiplication, :py:func:`numpy.multiply`.
* Tensor contractions, :py:func:`numpy.tensordot`.
* Chained array operations, in efficient calculation order, :py:func:`numpy.einsum_path`.

The subscripts string is a comma-separated list of subscript labels,
where each label refers to a dimension of the corresponding operand.
Whenever a label is repeated it is summed, so ``np.einsum('i,i', a, b)``
is equivalent to :py:func:`np.inner(a,b) <numpy.inner>`. If a label
appears only once, it is not summed, so ``np.einsum('i', a)`` produces a
view of ``a`` with no changes. A further example ``np.einsum('ij,jk', a, b)``
describes traditional matrix multiplication and is equivalent to
:py:func:`np.matmul(a,b) <numpy.matmul>`. Repeated subscript labels in one
operand take the diagonal. For example, ``np.einsum('ii', a)`` is equivalent
to :py:func:`np.trace(a) <numpy.trace>`.

In *implicit mode*, the chosen subscripts are important
since the axes of the output are reordered alphabetically.  This
means that ``np.einsum('ij', a)`` doesn't affect a 2D array, while
``np.einsum('ji', a)`` takes its transpose. Additionally,
``np.einsum('ij,jk', a, b)`` returns a matrix multiplication, while,
``np.einsum('ij,jh', a, b)`` returns the transpose of the
multiplication since subscript 'h' precedes subscript 'i'.

In *explicit mode* the output can be directly controlled by
specifying output subscript labels.  This requires the
identifier '->' as well as the list of output subscript labels.
This feature increases the flexibility of the function since
summing can be disabled or forced when required. The call
``np.einsum('i->', a)`` is like :py:func:`np.sum(a, axis=-1) <numpy.sum>`,
and ``np.einsum('ii->i', a)`` is like :py:func:`np.diag(a) <numpy.diag>`.
The difference is that `einsum` does not allow broadcasting by default.
Additionally ``np.einsum('ij,jh->ih', a, b)`` directly specifies the
order of the output subscript labels and therefore returns matrix
multiplication, unlike the example above in implicit mode.

To enable and control broadcasting, use an ellipsis.  Default
NumPy-style broadcasting is done by adding an ellipsis
to the left of each term, like ``np.einsum('...ii->...i', a)``.
To take the trace along the first and last axes,
you can do ``np.einsum('i...i', a)``, or to do a matrix-matrix
product with the left-most indices instead of rightmost, one can do
``np.einsum('ij...,jk...->ik...', a, b)``.

When there is only one operand, no axes are summed, and no output
parameter is provided, a view into the operand is returned instead
of a new array.  Thus, taking the diagonal as ``np.einsum('ii->i', a)``
produces a view (changed in version 1.10.0).

`einsum` also provides an alternative way to provide the subscripts
and operands as ``einsum(op0, sublist0, op1, sublist1, ..., [sublistout])``.
If the output shape is not provided in this format `einsum` will be
calculated in implicit mode, otherwise it will be performed explicitly.
The examples below have corresponding `einsum` calls with the two
parameter methods.

.. versionadded:: 1.10.0

Views returned from einsum are now writeable whenever the input array
is writeable. For example, ``np.einsum('ijk...->kji...', a)`` will now
have the same effect as :py:func:`np.swapaxes(a, 0, 2) <numpy.swapaxes>`
and ``np.einsum('ii->i', a)`` will return a writeable view of the diagonal
of a 2D array.

.. versionadded:: 1.12.0

Added the ``optimize`` argument which will optimize the contraction order
of an einsum expression. For a contraction with three or more operands this
can greatly increase the computational efficiency at the cost of a larger
memory footprint during computation.

Typically a 'greedy' algorithm is applied which empirical tests have shown
returns the optimal path in the majority of cases. In some cases 'optimal'
will return the superlative path through a more expensive, exhaustive search.
For iterative calculations it may be advisable to calculate the optimal path
once and reuse that path by supplying it as an argument. An example is given
below.

See :py:func:`numpy.einsum_path` for more details.

Examples
--------
>>> a = np.arange(25).reshape(5,5)
>>> b = np.arange(5)
>>> c = np.arange(6).reshape(2,3)

Trace of a matrix:

>>> np.einsum('ii', a)
60
>>> np.einsum(a, [0,0])
60
>>> np.trace(a)
60

Extract the diagonal (requires explicit form):

>>> np.einsum('ii->i', a)
array([ 0,  6, 12, 18, 24])
>>> np.einsum(a, [0,0], [0])
array([ 0,  6, 12, 18, 24])
>>> np.diag(a)
array([ 0,  6, 12, 18, 24])

Sum over an axis (requires explicit form):

>>> np.einsum('ij->i', a)
array([ 10,  35,  60,  85, 110])
>>> np.einsum(a, [0,1], [0])
array([ 10,  35,  60,  85, 110])
>>> np.sum(a, axis=1)
array([ 10,  35,  60,  85, 110])

For higher dimensional arrays summing a single axis can be done with ellipsis:

>>> np.einsum('...j->...', a)
array([ 10,  35,  60,  85, 110])
>>> np.einsum(a, [Ellipsis,1], [Ellipsis])
array([ 10,  35,  60,  85, 110])

Compute a matrix transpose, or reorder any number of axes:

>>> np.einsum('ji', c)
array([[0, 3],
       [1, 4],
       [2, 5]])
>>> np.einsum('ij->ji', c)
array([[0, 3],
       [1, 4],
       [2, 5]])
>>> np.einsum(c, [1,0])
array([[0, 3],
       [1, 4],
       [2, 5]])
>>> np.transpose(c)
array([[0, 3],
       [1, 4],
       [2, 5]])

Vector inner products:

>>> np.einsum('i,i', b, b)
30
>>> np.einsum(b, [0], b, [0])
30
>>> np.inner(b,b)
30

Matrix vector multiplication:

>>> np.einsum('ij,j', a, b)
array([ 30,  80, 130, 180, 230])
>>> np.einsum(a, [0,1], b, [1])
array([ 30,  80, 130, 180, 230])
>>> np.dot(a, b)
array([ 30,  80, 130, 180, 230])
>>> np.einsum('...j,j', a, b)
array([ 30,  80, 130, 180, 230])

Broadcasting and scalar multiplication:

>>> np.einsum('..., ...', 3, c)
array([[ 0,  3,  6],
       [ 9, 12, 15]])
>>> np.einsum(',ij', 3, c)
array([[ 0,  3,  6],
       [ 9, 12, 15]])
>>> np.einsum(3, [Ellipsis], c, [Ellipsis])
array([[ 0,  3,  6],
       [ 9, 12, 15]])
>>> np.multiply(3, c)
array([[ 0,  3,  6],
       [ 9, 12, 15]])

Vector outer product:

>>> np.einsum('i,j', np.arange(2)+1, b)
array([[0, 1, 2, 3, 4],
       [0, 2, 4, 6, 8]])
>>> np.einsum(np.arange(2)+1, [0], b, [1])
array([[0, 1, 2, 3, 4],
       [0, 2, 4, 6, 8]])
>>> np.outer(np.arange(2)+1, b)
array([[0, 1, 2, 3, 4],
       [0, 2, 4, 6, 8]])

Tensor contraction:

>>> a = np.arange(60.).reshape(3,4,5)
>>> b = np.arange(24.).reshape(4,3,2)
>>> np.einsum('ijk,jil->kl', a, b)
array([[4400., 4730.],
       [4532., 4874.],
       [4664., 5018.],
       [4796., 5162.],
       [4928., 5306.]])
>>> np.einsum(a, [0,1,2], b, [1,0,3], [2,3])
array([[4400., 4730.],
       [4532., 4874.],
       [4664., 5018.],
       [4796., 5162.],
       [4928., 5306.]])
>>> np.tensordot(a,b, axes=([1,0],[0,1]))
array([[4400., 4730.],
       [4532., 4874.],
       [4664., 5018.],
       [4796., 5162.],
       [4928., 5306.]])

Writeable returned arrays (since version 1.10.0):

>>> a = np.zeros((3, 3))
>>> np.einsum('ii->i', a)[:] = 1
>>> a
array([[1., 0., 0.],
       [0., 1., 0.],
       [0., 0., 1.]])

Example of ellipsis use:

>>> a = np.arange(6).reshape((3,2))
>>> b = np.arange(12).reshape((4,3))
>>> np.einsum('ki,jk->ij', a, b)
array([[10, 28, 46, 64],
       [13, 40, 67, 94]])
>>> np.einsum('ki,...k->i...', a, b)
array([[10, 28, 46, 64],
       [13, 40, 67, 94]])
>>> np.einsum('k...,jk', a, b)
array([[10, 28, 46, 64],
       [13, 40, 67, 94]])

Chained array operations. For more complicated contractions, speed ups
might be achieved by repeatedly computing a 'greedy' path or pre-computing the
'optimal' path and repeatedly applying it, using an
`einsum_path` insertion (since version 1.12.0). Performance improvements can be
particularly significant with larger arrays:

>>> a = np.ones(64).reshape(2,4,8)

Basic `einsum`: ~1520ms  (benchmarked on 3.1GHz Intel i5.)

>>> for iteration in range(500):
...     _ = np.einsum('ijk,ilm,njm,nlk,abc->',a,a,a,a,a)

Sub-optimal `einsum` (due to repeated path calculation time): ~330ms

>>> for iteration in range(500):
...     _ = np.einsum('ijk,ilm,njm,nlk,abc->',a,a,a,a,a, optimize='optimal')

Greedy `einsum` (faster optimal path approximation): ~160ms

>>> for iteration in range(500):
...     _ = np.einsum('ijk,ilm,njm,nlk,abc->',a,a,a,a,a, optimize='greedy')

Optimal `einsum` (best usage pattern in some use cases): ~110ms

>>> path = np.einsum_path('ijk,ilm,njm,nlk,abc->',a,a,a,a,a, optimize='optimal')[0]
>>> for iteration in range(500):
...     _ = np.einsum('ijk,ilm,njm,nlk,abc->',a,a,a,a,a, optimize=path)

---
## __name__
```python
from umath_tests import __name__
```

Shim for _umath_tests to allow a deprecation period for the new name.

---
## __name__
```python
from _ufunc_config import __name__
```

Functions for changing global ufunc configuration

This provides helpers which wrap `umath.geterrobj` and `umath.seterrobj`

---
## seterr
```python
from _ufunc_config import seterr
```

Set how floating-point errors are handled.

Note that operations on integer scalar types (such as `int16`) are
handled like floating point, and are affected by these settings.

Parameters
----------
all : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional
    Set treatment for all types of floating-point errors at once:

    - ignore: Take no action when the exception occurs.
    - warn: Print a `RuntimeWarning` (via the Python `warnings` module).
    - raise: Raise a `FloatingPointError`.
    - call: Call a function specified using the `seterrcall` function.
    - print: Print a warning directly to ``stdout``.
    - log: Record error in a Log object specified by `seterrcall`.

    The default is not to change the current behavior.
divide : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional
    Treatment for division by zero.
over : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional
    Treatment for floating-point overflow.
under : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional
    Treatment for floating-point underflow.
invalid : {'ignore', 'warn', 'raise', 'call', 'print', 'log'}, optional
    Treatment for invalid floating-point operation.

Returns
-------
old_settings : dict
    Dictionary containing the old settings.

See also
--------
seterrcall : Set a callback function for the 'call' mode.
geterr, geterrcall, errstate

Notes
-----
The floating-point exceptions are defined in the IEEE 754 standard [1]_:

- Division by zero: infinite result obtained from finite numbers.
- Overflow: result too large to be expressed.
- Underflow: result so close to zero that some precision
  was lost.
- Invalid operation: result is not an expressible number, typically
  indicates that a NaN was produced.

.. [1] https://en.wikipedia.org/wiki/IEEE_754

Examples
--------
>>> old_settings = np.seterr(all='ignore')  #seterr to known value
>>> np.seterr(over='raise')
{'divide': 'ignore', 'over': 'ignore', 'under': 'ignore', 'invalid': 'ignore'}
>>> np.seterr(**old_settings)  # reset to default
{'divide': 'ignore', 'over': 'raise', 'under': 'ignore', 'invalid': 'ignore'}

>>> np.int16(32000) * np.int16(3)
30464
>>> old_settings = np.seterr(all='warn', over='raise')
>>> np.int16(32000) * np.int16(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FloatingPointError: overflow encountered in scalar multiply

>>> old_settings = np.seterr(all='print')
>>> np.geterr()
{'divide': 'print', 'over': 'print', 'under': 'print', 'invalid': 'print'}
>>> np.int16(32000) * np.int16(3)
30464

---
## geterr
```python
from _ufunc_config import geterr
```

Get the current way of handling floating-point errors.

Returns
-------
res : dict
    A dictionary with keys "divide", "over", "under", and "invalid",
    whose values are from the strings "ignore", "print", "log", "warn",
    "raise", and "call". The keys represent possible floating-point
    exceptions, and the values define how these exceptions are handled.

See Also
--------
geterrcall, seterr, seterrcall

Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.

Examples
--------
>>> np.geterr()
{'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
>>> np.arange(3.) / np.arange(3.)
array([nan,  1.,  1.])

>>> oldsettings = np.seterr(all='warn', over='raise')
>>> np.geterr()
{'divide': 'warn', 'over': 'raise', 'under': 'warn', 'invalid': 'warn'}
>>> np.arange(3.) / np.arange(3.)
array([nan,  1.,  1.])

---
## setbufsize
```python
from _ufunc_config import setbufsize
```

Set the size of the buffer used in ufuncs.

Parameters
----------
size : int
    Size of buffer.

---
## getbufsize
```python
from _ufunc_config import getbufsize
```

Return the size of the buffer used in ufuncs.

Returns
-------
getbufsize : int
    Size of ufunc buffer in bytes.

---
## seterrcall
```python
from _ufunc_config import seterrcall
```

Set the floating-point error callback function or log object.

There are two ways to capture floating-point error messages.  The first
is to set the error-handler to 'call', using `seterr`.  Then, set
the function to call using this function.

The second is to set the error-handler to 'log', using `seterr`.
Floating-point errors then trigger a call to the 'write' method of
the provided object.

Parameters
----------
func : callable f(err, flag) or object with write method
    Function to call upon floating-point errors ('call'-mode) or
    object whose 'write' method is used to log such message ('log'-mode).

    The call function takes two arguments. The first is a string describing
    the type of error (such as "divide by zero", "overflow", "underflow",
    or "invalid value"), and the second is the status flag.  The flag is a
    byte, whose four least-significant bits indicate the type of error, one
    of "divide", "over", "under", "invalid"::

      [0 0 0 0 divide over under invalid]

    In other words, ``flags = divide + 2*over + 4*under + 8*invalid``.

    If an object is provided, its write method should take one argument,
    a string.

Returns
-------
h : callable, log instance or None
    The old error handler.

See Also
--------
seterr, geterr, geterrcall

Examples
--------
Callback upon error:

>>> def err_handler(type, flag):
...     print("Floating point error (%s), with flag %s" % (type, flag))
...

>>> saved_handler = np.seterrcall(err_handler)
>>> save_err = np.seterr(all='call')

>>> np.array([1, 2, 3]) / 0.0
Floating point error (divide by zero), with flag 1
array([inf, inf, inf])

>>> np.seterrcall(saved_handler)
<function err_handler at 0x...>
>>> np.seterr(**save_err)
{'divide': 'call', 'over': 'call', 'under': 'call', 'invalid': 'call'}

Log error message:

>>> class Log:
...     def write(self, msg):
...         print("LOG: %s" % msg)
...

>>> log = Log()
>>> saved_handler = np.seterrcall(log)
>>> save_err = np.seterr(all='log')

>>> np.array([1, 2, 3]) / 0.0
LOG: Warning: divide by zero encountered in divide
array([inf, inf, inf])

>>> np.seterrcall(saved_handler)
<numpy.core.numeric.Log object at 0x...>
>>> np.seterr(**save_err)
{'divide': 'log', 'over': 'log', 'under': 'log', 'invalid': 'log'}

---
## geterrcall
```python
from _ufunc_config import geterrcall
```

Return the current callback function used on floating-point errors.

When the error handling for a floating-point error (one of "divide",
"over", "under", or "invalid") is set to 'call' or 'log', the function
that is called or the log instance that is written to is returned by
`geterrcall`. This function or log instance has been set with
`seterrcall`.

Returns
-------
errobj : callable, log instance or None
    The current error handler. If no handler was set through `seterrcall`,
    ``None`` is returned.

See Also
--------
seterrcall, seterr, geterr

Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.

Examples
--------
>>> np.geterrcall()  # we did not yet set a handler, returns None

>>> oldsettings = np.seterr(all='call')
>>> def err_handler(type, flag):
...     print("Floating point error (%s), with flag %s" % (type, flag))
>>> oldhandler = np.seterrcall(err_handler)
>>> np.array([1, 2, 3]) / 0.0
Floating point error (divide by zero), with flag 1
array([inf, inf, inf])

>>> cur_handler = np.geterrcall()
>>> cur_handler is err_handler
True

---
## _unspecified
```python
from _ufunc_config import _unspecified
```



---
## errstate
```python
from _ufunc_config import errstate
```

errstate(**kwargs)

Context manager for floating-point error handling.

Using an instance of `errstate` as a context manager allows statements in
that context to execute with a known error handling behavior. Upon entering
the context the error handling is set with `seterr` and `seterrcall`, and
upon exiting it is reset to what it was before.

..  versionchanged:: 1.17.0
    `errstate` is also usable as a function decorator, saving
    a level of indentation if an entire function is wrapped.
    See :py:class:`contextlib.ContextDecorator` for more information.

Parameters
----------
kwargs : {divide, over, under, invalid}
    Keyword arguments. The valid keywords are the possible floating-point
    exceptions. Each keyword should have a string value that defines the
    treatment for the particular error. Possible values are
    {'ignore', 'warn', 'raise', 'call', 'print', 'log'}.

See Also
--------
seterr, geterr, seterrcall, geterrcall

Notes
-----
For complete documentation of the types of floating-point exceptions and
treatment options, see `seterr`.

Examples
--------
>>> olderr = np.seterr(all='ignore')  # Set error handling to known state.

>>> np.arange(3) / 0.
array([nan, inf, inf])
>>> with np.errstate(divide='warn'):
...     np.arange(3) / 0.
array([nan, inf, inf])

>>> np.sqrt(-1)
nan
>>> with np.errstate(invalid='raise'):
...     np.sqrt(-1)
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
FloatingPointError: invalid value encountered in sqrt

Outside the context the error handling behavior has not changed:

>>> np.geterr()
{'divide': 'ignore', 'over': 'ignore', 'under': 'ignore', 'invalid': 'ignore'}

---
## _setdef
```python
from _ufunc_config import _setdef
```



---
## _no_nep50_warning
```python
from _ufunc_config import _no_nep50_warning
```

Context manager to disable NEP 50 warnings.  This context manager is
only relevant if the NEP 50 warnings are enabled globally (which is not
thread/context safe).

This warning context manager itself is fully safe, however.

---
## __init__
```python
from _ufunc_config import __init__
```



---
## __enter__
```python
from _ufunc_config import __enter__
```



---
## __exit__
```python
from _ufunc_config import __exit__
```



---
## _unpack_tuple
```python
from _exceptions import _unpack_tuple
```



---
## _display_as_base
```python
from _exceptions import _display_as_base
```

A decorator that makes an exception class look like its base.

We use this to hide subclasses that are implementation details - the user
should catch the base type, which is what the traceback will show them.

Classes decorated with this decorator are subject to removal without a
deprecation warning.

---
## UFuncTypeError
```python
from _exceptions import UFuncTypeError
```

Base class for all ufunc exceptions 

---
## _UFuncNoLoopError
```python
from _exceptions import _UFuncNoLoopError
```

Thrown when a ufunc loop cannot be found 

---
## _UFuncBinaryResolutionError
```python
from _exceptions import _UFuncBinaryResolutionError
```

Thrown when a binary resolution fails 

---
## _UFuncCastingError
```python
from _exceptions import _UFuncCastingError
```



---
## _UFuncInputCastingError
```python
from _exceptions import _UFuncInputCastingError
```

Thrown when a ufunc input cannot be casted 

---
## _UFuncOutputCastingError
```python
from _exceptions import _UFuncOutputCastingError
```

Thrown when a ufunc output cannot be casted 

---
## _ArrayMemoryError
```python
from _exceptions import _ArrayMemoryError
```

Thrown when an array cannot be allocated

---
## __str__
```python
from _exceptions import __str__
```



---
## _total_size
```python
from _exceptions import _total_size
```



---
## _size_to_string
```python
from _exceptions import _size_to_string
```

Convert a number of bytes into a binary size string 

---
## __name__
```python
from numerictypes import __name__
```



---
## maximum_sctype
```python
from numerictypes import maximum_sctype
```

Return the scalar type of highest precision of the same kind as the input.

Parameters
----------
t : dtype or dtype specifier
    The input data type. This can be a `dtype` object or an object that
    is convertible to a `dtype`.

Returns
-------
out : dtype
    The highest precision data type of the same kind (`dtype.kind`) as `t`.

See Also
--------
obj2sctype, mintypecode, sctype2char
dtype

Examples
--------
>>> np.maximum_sctype(int)
<class 'numpy.int64'>
>>> np.maximum_sctype(np.uint8)
<class 'numpy.uint64'>
>>> np.maximum_sctype(complex)
<class 'numpy.complex256'> # may vary

>>> np.maximum_sctype(str)
<class 'numpy.str_'>

>>> np.maximum_sctype('i2')
<class 'numpy.int64'>
>>> np.maximum_sctype('f4')
<class 'numpy.float128'> # may vary

---
## issctype
```python
from numerictypes import issctype
```

Determines whether the given object represents a scalar data-type.

Parameters
----------
rep : any
    If `rep` is an instance of a scalar dtype, True is returned. If not,
    False is returned.

Returns
-------
out : bool
    Boolean result of check whether `rep` is a scalar dtype.

See Also
--------
issubsctype, issubdtype, obj2sctype, sctype2char

Examples
--------
>>> np.issctype(np.int32)
True
>>> np.issctype(list)
False
>>> np.issctype(1.1)
False

Strings are also a scalar type:

>>> np.issctype(np.dtype('str'))
True

---
## obj2sctype
```python
from numerictypes import obj2sctype
```

Return the scalar dtype or NumPy equivalent of Python type of an object.

Parameters
----------
rep : any
    The object of which the type is returned.
default : any, optional
    If given, this is returned for objects whose types can not be
    determined. If not given, None is returned for those objects.

Returns
-------
dtype : dtype or Python type
    The data type of `rep`.

See Also
--------
sctype2char, issctype, issubsctype, issubdtype, maximum_sctype

Examples
--------
>>> np.obj2sctype(np.int32)
<class 'numpy.int32'>
>>> np.obj2sctype(np.array([1., 2.]))
<class 'numpy.float64'>
>>> np.obj2sctype(np.array([1.j]))
<class 'numpy.complex128'>

>>> np.obj2sctype(dict)
<class 'numpy.object_'>
>>> np.obj2sctype('string')

>>> np.obj2sctype(1, default=list)
<class 'list'>

---
## issubclass_
```python
from numerictypes import issubclass_
```

Determine if a class is a subclass of a second class.

`issubclass_` is equivalent to the Python built-in ``issubclass``,
except that it returns False instead of raising a TypeError if one
of the arguments is not a class.

Parameters
----------
arg1 : class
    Input class. True is returned if `arg1` is a subclass of `arg2`.
arg2 : class or tuple of classes.
    Input class. If a tuple of classes, True is returned if `arg1` is a
    subclass of any of the tuple elements.

Returns
-------
out : bool
    Whether `arg1` is a subclass of `arg2` or not.

See Also
--------
issubsctype, issubdtype, issctype

Examples
--------
>>> np.issubclass_(np.int32, int)
False
>>> np.issubclass_(np.int32, float)
False
>>> np.issubclass_(np.float64, float)
True

---
## issubsctype
```python
from numerictypes import issubsctype
```

Determine if the first argument is a subclass of the second argument.

Parameters
----------
arg1, arg2 : dtype or dtype specifier
    Data-types.

Returns
-------
out : bool
    The result.

See Also
--------
issctype, issubdtype, obj2sctype

Examples
--------
>>> np.issubsctype('S8', str)
False
>>> np.issubsctype(np.array([1]), int)
True
>>> np.issubsctype(np.array([1]), float)
False

---
## issubdtype
```python
from numerictypes import issubdtype
```

Returns True if first argument is a typecode lower/equal in type hierarchy.

This is like the builtin :func:`issubclass`, but for `dtype`\ s.

Parameters
----------
arg1, arg2 : dtype_like
    `dtype` or object coercible to one

Returns
-------
out : bool

See Also
--------
:ref:`arrays.scalars` : Overview of the numpy type hierarchy.
issubsctype, issubclass_

Examples
--------
`issubdtype` can be used to check the type of arrays:

>>> ints = np.array([1, 2, 3], dtype=np.int32)
>>> np.issubdtype(ints.dtype, np.integer)
True
>>> np.issubdtype(ints.dtype, np.floating)
False

>>> floats = np.array([1, 2, 3], dtype=np.float32)
>>> np.issubdtype(floats.dtype, np.integer)
False
>>> np.issubdtype(floats.dtype, np.floating)
True

Similar types of different sizes are not subdtypes of each other:

>>> np.issubdtype(np.float64, np.float32)
False
>>> np.issubdtype(np.float32, np.float64)
False

but both are subtypes of `floating`:

>>> np.issubdtype(np.float64, np.floating)
True
>>> np.issubdtype(np.float32, np.floating)
True

For convenience, dtype-like objects are allowed too:

>>> np.issubdtype('S1', np.string_)
True
>>> np.issubdtype('i4', np.signedinteger)
True

---
## _typedict
```python
from numerictypes import _typedict
```

Base object for a dictionary for look-up with any alias for an array dtype.

Instances of `_typedict` can not be used as dictionaries directly,
first they have to be populated.

---
## _construct_lookups
```python
from numerictypes import _construct_lookups
```



---
## sctype2char
```python
from numerictypes import sctype2char
```

Return the string representation of a scalar dtype.

Parameters
----------
sctype : scalar dtype or object
    If a scalar dtype, the corresponding string character is
    returned. If an object, `sctype2char` tries to infer its scalar type
    and then return the corresponding string character.

Returns
-------
typechar : str
    The string character corresponding to the scalar type.

Raises
------
ValueError
    If `sctype` is an object for which the type can not be inferred.

See Also
--------
obj2sctype, issctype, issubsctype, mintypecode

Examples
--------
>>> for sctype in [np.int32, np.double, np.complex_, np.string_, np.ndarray]:
...     print(np.sctype2char(sctype))
l # may vary
d
D
S
O

>>> x = np.array([1., 2-1.j])
>>> np.sctype2char(x)
'D'
>>> np.sctype2char(list)
'O'

---
## _scalar_type_key
```python
from numerictypes import _scalar_type_key
```

A ``key`` function for `sorted`.

---
## _find_common_coerce
```python
from numerictypes import _find_common_coerce
```



---
## _can_coerce_all
```python
from numerictypes import _can_coerce_all
```



---
## _register_types
```python
from numerictypes import _register_types
```



---
## find_common_type
```python
from numerictypes import find_common_type
```

Determine common type following standard coercion rules.

.. deprecated:: NumPy 1.25

    This function is deprecated, use `numpy.promote_types` or
    `numpy.result_type` instead.  To achieve semantics for the
    `scalar_types` argument, use `numpy.result_type` and pass the Python
    values `0`, `0.0`, or `0j`.
    This will give the same results in almost all cases.
    More information and rare exception can be found in the
    `NumPy 1.25 release notes <https://numpy.org/devdocs/release/1.25.0-notes.html>`_.

Parameters
----------
array_types : sequence
    A list of dtypes or dtype convertible objects representing arrays.
scalar_types : sequence
    A list of dtypes or dtype convertible objects representing scalars.

Returns
-------
datatype : dtype
    The common data type, which is the maximum of `array_types` ignoring
    `scalar_types`, unless the maximum of `scalar_types` is of a
    different kind (`dtype.kind`). If the kind is not understood, then
    None is returned.

See Also
--------
dtype, common_type, can_cast, mintypecode

Examples
--------
>>> np.find_common_type([], [np.int64, np.float32, complex])
dtype('complex128')
>>> np.find_common_type([np.int64, np.float32], [])
dtype('float64')

The standard casting rules ensure that a scalar cannot up-cast an
array unless the scalar is of a fundamentally different kind of data
(i.e. under a different hierarchy in the data type hierarchy) then
the array:

>>> np.find_common_type([np.float32], [np.int64, np.float64])
dtype('float32')

Complex is of a different type, so it up-casts the float in the
`array_types` argument:

>>> np.find_common_type([np.float32], [complex])
dtype('complex128')

Type specifier strings are convertible to dtypes and can therefore
be used instead of dtypes:

>>> np.find_common_type(['f4', 'f4', 'i4'], ['c8'])
dtype('complex128')

---
## __getitem__
```python
from numerictypes import __getitem__
```



---
## __name__
```python
from _type_aliases import __name__
```

Due to compatibility, numpy has a very large number of different naming
conventions for the scalar types (those subclassing from `numpy.generic`).
This file produces a convoluted set of dictionaries mapping names to types,
and sometimes other mappings too.

.. data:: allTypes
    A dictionary of names to types that will be exposed as attributes through
    ``np.core.numerictypes.*``

.. data:: sctypeDict
    Similar to `allTypes`, but maps a broader set of aliases to their types.

.. data:: sctypes
    A dictionary keyed by a "type group" string, providing a list of types
    under that group.

---
## _bits_of
```python
from _type_aliases import _bits_of
```



---
## bitname
```python
from _type_aliases import bitname
```

Return a bit-width name for a given type object

---
## _add_types
```python
from _type_aliases import _add_types
```



---
## _add_aliases
```python
from _type_aliases import _add_aliases
```



---
## _add_integer_aliases
```python
from _type_aliases import _add_integer_aliases
```



---
## _set_up_aliases
```python
from _type_aliases import _set_up_aliases
```



---
## _add_array_type
```python
from _type_aliases import _add_array_type
```



---
## _set_array_types
```python
from _type_aliases import _set_array_types
```



---
## __name__
```python
from cversions import __name__
```

Simple script to compute the api hash of the current API.

The API has is defined by numpy_api_order and ufunc_api_order.

---
## __name__
```python
from arrayprint import __name__
```



---
## _make_options_dict
```python
from arrayprint import _make_options_dict
```

Make a dictionary out of the non-None arguments, plus conversion of
*legacy* and sanity checks.

---
## set_printoptions
```python
from arrayprint import set_printoptions
```

Set printing options.

These options determine the way floating point numbers, arrays and
other NumPy objects are displayed.

Parameters
----------
precision : int or None, optional
    Number of digits of precision for floating point output (default 8).
    May be None if `floatmode` is not `fixed`, to print as many digits as
    necessary to uniquely specify the value.
threshold : int, optional
    Total number of array elements which trigger summarization
    rather than full repr (default 1000).
    To always use the full repr without summarization, pass `sys.maxsize`.
edgeitems : int, optional
    Number of array items in summary at beginning and end of
    each dimension (default 3).
linewidth : int, optional
    The number of characters per line for the purpose of inserting
    line breaks (default 75).
suppress : bool, optional
    If True, always print floating point numbers using fixed point
    notation, in which case numbers equal to zero in the current precision
    will print as zero.  If False, then scientific notation is used when
    absolute value of the smallest number is < 1e-4 or the ratio of the
    maximum absolute value to the minimum is > 1e3. The default is False.
nanstr : str, optional
    String representation of floating point not-a-number (default nan).
infstr : str, optional
    String representation of floating point infinity (default inf).
sign : string, either '-', '+', or ' ', optional
    Controls printing of the sign of floating-point types. If '+', always
    print the sign of positive values. If ' ', always prints a space
    (whitespace character) in the sign position of positive values.  If
    '-', omit the sign character of positive values. (default '-')
formatter : dict of callables, optional
    If not None, the keys should indicate the type(s) that the respective
    formatting function applies to.  Callables should return a string.
    Types that are not specified (by their corresponding keys) are handled
    by the default formatters.  Individual types for which a formatter
    can be set are:

    - 'bool'
    - 'int'
    - 'timedelta' : a `numpy.timedelta64`
    - 'datetime' : a `numpy.datetime64`
    - 'float'
    - 'longfloat' : 128-bit floats
    - 'complexfloat'
    - 'longcomplexfloat' : composed of two 128-bit floats
    - 'numpystr' : types `numpy.bytes_` and `numpy.str_`
    - 'object' : `np.object_` arrays

    Other keys that can be used to set a group of types at once are:

    - 'all' : sets all types
    - 'int_kind' : sets 'int'
    - 'float_kind' : sets 'float' and 'longfloat'
    - 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
    - 'str_kind' : sets 'numpystr'
floatmode : str, optional
    Controls the interpretation of the `precision` option for
    floating-point types. Can take the following values
    (default maxprec_equal):

    * 'fixed': Always print exactly `precision` fractional digits,
            even if this would print more or fewer digits than
            necessary to specify the value uniquely.
    * 'unique': Print the minimum number of fractional digits necessary
            to represent each value uniquely. Different elements may
            have a different number of digits. The value of the
            `precision` option is ignored.
    * 'maxprec': Print at most `precision` fractional digits, but if
            an element can be uniquely represented with fewer digits
            only print it with that many.
    * 'maxprec_equal': Print at most `precision` fractional digits,
            but if every element in the array can be uniquely
            represented with an equal number of fewer digits, use that
            many digits for all elements.
legacy : string or `False`, optional
    If set to the string `'1.13'` enables 1.13 legacy printing mode. This
    approximates numpy 1.13 print output by including a space in the sign
    position of floats and different behavior for 0d arrays. This also
    enables 1.21 legacy printing mode (described below).

    If set to the string `'1.21'` enables 1.21 legacy printing mode. This
    approximates numpy 1.21 print output of complex structured dtypes
    by not inserting spaces after commas that separate fields and after
    colons.

    If set to `False`, disables legacy mode.

    Unrecognized strings will be ignored with a warning for forward
    compatibility.

    .. versionadded:: 1.14.0
    .. versionchanged:: 1.22.0

See Also
--------
get_printoptions, printoptions, set_string_function, array2string

Notes
-----
`formatter` is always reset with a call to `set_printoptions`.

Use `printoptions` as a context manager to set the values temporarily.

Examples
--------
Floating point precision can be set:

>>> np.set_printoptions(precision=4)
>>> np.array([1.123456789])
[1.1235]

Long arrays can be summarised:

>>> np.set_printoptions(threshold=5)
>>> np.arange(10)
array([0, 1, 2, ..., 7, 8, 9])

Small results can be suppressed:

>>> eps = np.finfo(float).eps
>>> x = np.arange(4.)
>>> x**2 - (x + eps)**2
array([-4.9304e-32, -4.4409e-16,  0.0000e+00,  0.0000e+00])
>>> np.set_printoptions(suppress=True)
>>> x**2 - (x + eps)**2
array([-0., -0.,  0.,  0.])

A custom formatter can be used to display array elements as desired:

>>> np.set_printoptions(formatter={'all':lambda x: 'int: '+str(-x)})
>>> x = np.arange(3)
>>> x
array([int: 0, int: -1, int: -2])
>>> np.set_printoptions()  # formatter gets reset
>>> x
array([0, 1, 2])

To put back the default options, you can use:

>>> np.set_printoptions(edgeitems=3, infstr='inf',
... linewidth=75, nanstr='nan', precision=8,
... suppress=False, threshold=1000, formatter=None)

Also to temporarily override options, use `printoptions` as a context manager:

>>> with np.printoptions(precision=2, suppress=True, threshold=5):
...     np.linspace(0, 10, 10)
array([ 0.  ,  1.11,  2.22, ...,  7.78,  8.89, 10.  ])

---
## get_printoptions
```python
from arrayprint import get_printoptions
```

Return the current print options.

Returns
-------
print_opts : dict
    Dictionary of current print options with keys

      - precision : int
      - threshold : int
      - edgeitems : int
      - linewidth : int
      - suppress : bool
      - nanstr : str
      - infstr : str
      - formatter : dict of callables
      - sign : str

    For a full description of these options, see `set_printoptions`.

See Also
--------
set_printoptions, printoptions, set_string_function

---
## _get_legacy_print_mode
```python
from arrayprint import _get_legacy_print_mode
```

Return the legacy print mode as an int.

---
## printoptions
```python
from arrayprint import printoptions
```

Context manager for setting print options.

Set print options for the scope of the `with` block, and restore the old
options at the end. See `set_printoptions` for the full description of
available options.

Examples
--------

>>> from numpy.testing import assert_equal
>>> with np.printoptions(precision=2):
...     np.array([2.0]) / 3
array([0.67])

The `as`-clause of the `with`-statement gives the current print options:

>>> with np.printoptions(precision=2) as opts:
...      assert_equal(opts, np.get_printoptions())

See Also
--------
set_printoptions, get_printoptions

---
## _leading_trailing
```python
from arrayprint import _leading_trailing
```

Keep only the N-D corners (leading and trailing edges) of an array.

Should be passed a base-class ndarray, since it makes no guarantees about
preserving subclasses.

---
## _object_format
```python
from arrayprint import _object_format
```

Object arrays containing lists should be printed unambiguously 

---
## repr_format
```python
from arrayprint import repr_format
```



---
## str_format
```python
from arrayprint import str_format
```



---
## _get_formatdict
```python
from arrayprint import _get_formatdict
```



---
## _get_format_function
```python
from arrayprint import _get_format_function
```

find the right formatting function for the dtype_

---
## _recursive_guard
```python
from arrayprint import _recursive_guard
```

Like the python 3.2 reprlib.recursive_repr, but forwards *args and **kwargs

Decorates a function such that if it calls itself with the same first
argument, it returns `fillvalue` instead of recursing.

Largely copied from reprlib.recursive_repr

---
## _array2string
```python
from arrayprint import _array2string
```



---
## _array2string_dispatcher
```python
from arrayprint import _array2string_dispatcher
```



---
## array2string
```python
from arrayprint import array2string
```

Return a string representation of an array.

Parameters
----------
a : ndarray
    Input array.
max_line_width : int, optional
    Inserts newlines if text is longer than `max_line_width`.
    Defaults to ``numpy.get_printoptions()['linewidth']``.
precision : int or None, optional
    Floating point precision.
    Defaults to ``numpy.get_printoptions()['precision']``.
suppress_small : bool, optional
    Represent numbers "very close" to zero as zero; default is False.
    Very close is defined by precision: if the precision is 8, e.g.,
    numbers smaller (in absolute value) than 5e-9 are represented as
    zero.
    Defaults to ``numpy.get_printoptions()['suppress']``.
separator : str, optional
    Inserted between elements.
prefix : str, optional
suffix : str, optional
    The length of the prefix and suffix strings are used to respectively
    align and wrap the output. An array is typically printed as::

      prefix + array2string(a) + suffix

    The output is left-padded by the length of the prefix string, and
    wrapping is forced at the column ``max_line_width - len(suffix)``.
    It should be noted that the content of prefix and suffix strings are
    not included in the output.
style : _NoValue, optional
    Has no effect, do not use.

    .. deprecated:: 1.14.0
formatter : dict of callables, optional
    If not None, the keys should indicate the type(s) that the respective
    formatting function applies to.  Callables should return a string.
    Types that are not specified (by their corresponding keys) are handled
    by the default formatters.  Individual types for which a formatter
    can be set are:

    - 'bool'
    - 'int'
    - 'timedelta' : a `numpy.timedelta64`
    - 'datetime' : a `numpy.datetime64`
    - 'float'
    - 'longfloat' : 128-bit floats
    - 'complexfloat'
    - 'longcomplexfloat' : composed of two 128-bit floats
    - 'void' : type `numpy.void`
    - 'numpystr' : types `numpy.bytes_` and `numpy.str_`

    Other keys that can be used to set a group of types at once are:

    - 'all' : sets all types
    - 'int_kind' : sets 'int'
    - 'float_kind' : sets 'float' and 'longfloat'
    - 'complex_kind' : sets 'complexfloat' and 'longcomplexfloat'
    - 'str_kind' : sets 'numpystr'
threshold : int, optional
    Total number of array elements which trigger summarization
    rather than full repr.
    Defaults to ``numpy.get_printoptions()['threshold']``.
edgeitems : int, optional
    Number of array items in summary at beginning and end of
    each dimension.
    Defaults to ``numpy.get_printoptions()['edgeitems']``.
sign : string, either '-', '+', or ' ', optional
    Controls printing of the sign of floating-point types. If '+', always
    print the sign of positive values. If ' ', always prints a space
    (whitespace character) in the sign position of positive values.  If
    '-', omit the sign character of positive values.
    Defaults to ``numpy.get_printoptions()['sign']``.
floatmode : str, optional
    Controls the interpretation of the `precision` option for
    floating-point types.
    Defaults to ``numpy.get_printoptions()['floatmode']``.
    Can take the following values:

    - 'fixed': Always print exactly `precision` fractional digits,
      even if this would print more or fewer digits than
      necessary to specify the value uniquely.
    - 'unique': Print the minimum number of fractional digits necessary
      to represent each value uniquely. Different elements may
      have a different number of digits.  The value of the
      `precision` option is ignored.
    - 'maxprec': Print at most `precision` fractional digits, but if
      an element can be uniquely represented with fewer digits
      only print it with that many.
    - 'maxprec_equal': Print at most `precision` fractional digits,
      but if every element in the array can be uniquely
      represented with an equal number of fewer digits, use that
      many digits for all elements.
legacy : string or `False`, optional
    If set to the string `'1.13'` enables 1.13 legacy printing mode. This
    approximates numpy 1.13 print output by including a space in the sign
    position of floats and different behavior for 0d arrays. If set to
    `False`, disables legacy mode. Unrecognized strings will be ignored
    with a warning for forward compatibility.

    .. versionadded:: 1.14.0

Returns
-------
array_str : str
    String representation of the array.

Raises
------
TypeError
    if a callable in `formatter` does not return a string.

See Also
--------
array_str, array_repr, set_printoptions, get_printoptions

Notes
-----
If a formatter is specified for a certain type, the `precision` keyword is
ignored for that type.

This is a very flexible function; `array_repr` and `array_str` are using
`array2string` internally so keywords with the same name should work
identically in all three functions.

Examples
--------
>>> x = np.array([1e-16,1,2,3])
>>> np.array2string(x, precision=2, separator=',',
...                       suppress_small=True)
'[0.,1.,2.,3.]'

>>> x  = np.arange(3.)
>>> np.array2string(x, formatter={'float_kind':lambda x: "%.2f" % x})
'[0.00 1.00 2.00]'

>>> x  = np.arange(3)
>>> np.array2string(x, formatter={'int':lambda x: hex(x)})
'[0x0 0x1 0x2]'

---
## _extendLine
```python
from arrayprint import _extendLine
```



---
## _extendLine_pretty
```python
from arrayprint import _extendLine_pretty
```

Extends line with nicely formatted (possibly multi-line) string ``word``.

---
## _formatArray
```python
from arrayprint import _formatArray
```

formatArray is designed for two modes of operation:

1. Full output

2. Summarized output

---
## _none_or_positive_arg
```python
from arrayprint import _none_or_positive_arg
```



---
## FloatingFormat
```python
from arrayprint import FloatingFormat
```

Formatter for subtypes of np.floating 

---
## format_float_scientific
```python
from arrayprint import format_float_scientific
```

Format a floating-point scalar as a decimal string in scientific notation.

Provides control over rounding, trimming and padding. Uses and assumes
IEEE unbiased rounding. Uses the "Dragon4" algorithm.

Parameters
----------
x : python float or numpy floating scalar
    Value to format.
precision : non-negative integer or None, optional
    Maximum number of digits to print. May be None if `unique` is
    `True`, but must be an integer if unique is `False`.
unique : boolean, optional
    If `True`, use a digit-generation strategy which gives the shortest
    representation which uniquely identifies the floating-point number from
    other values of the same type, by judicious rounding. If `precision`
    is given fewer digits than necessary can be printed. If `min_digits`
    is given more can be printed, in which cases the last digit is rounded
    with unbiased rounding.
    If `False`, digits are generated as if printing an infinite-precision
    value and stopping after `precision` digits, rounding the remaining
    value with unbiased rounding
trim : one of 'k', '.', '0', '-', optional
    Controls post-processing trimming of trailing digits, as follows:

    * 'k' : keep trailing zeros, keep decimal point (no trimming)
    * '.' : trim all trailing zeros, leave decimal point
    * '0' : trim all but the zero before the decimal point. Insert the
      zero if it is missing.
    * '-' : trim trailing zeros and any trailing decimal point
sign : boolean, optional
    Whether to show the sign for positive values.
pad_left : non-negative integer, optional
    Pad the left side of the string with whitespace until at least that
    many characters are to the left of the decimal point.
exp_digits : non-negative integer, optional
    Pad the exponent with zeros until it contains at least this many digits.
    If omitted, the exponent will be at least 2 digits.
min_digits : non-negative integer or None, optional
    Minimum number of digits to print. This only has an effect for
    `unique=True`. In that case more digits than necessary to uniquely
    identify the value may be printed and rounded unbiased.

    -- versionadded:: 1.21.0

Returns
-------
rep : string
    The string representation of the floating point value

See Also
--------
format_float_positional

Examples
--------
>>> np.format_float_scientific(np.float32(np.pi))
'3.1415927e+00'
>>> s = np.float32(1.23e24)
>>> np.format_float_scientific(s, unique=False, precision=15)
'1.230000071797338e+24'
>>> np.format_float_scientific(s, exp_digits=4)
'1.23e+0024'

---
## format_float_positional
```python
from arrayprint import format_float_positional
```

Format a floating-point scalar as a decimal string in positional notation.

Provides control over rounding, trimming and padding. Uses and assumes
IEEE unbiased rounding. Uses the "Dragon4" algorithm.

Parameters
----------
x : python float or numpy floating scalar
    Value to format.
precision : non-negative integer or None, optional
    Maximum number of digits to print. May be None if `unique` is
    `True`, but must be an integer if unique is `False`.
unique : boolean, optional
    If `True`, use a digit-generation strategy which gives the shortest
    representation which uniquely identifies the floating-point number from
    other values of the same type, by judicious rounding. If `precision`
    is given fewer digits than necessary can be printed, or if `min_digits`
    is given more can be printed, in which cases the last digit is rounded
    with unbiased rounding.
    If `False`, digits are generated as if printing an infinite-precision
    value and stopping after `precision` digits, rounding the remaining
    value with unbiased rounding
fractional : boolean, optional
    If `True`, the cutoffs of `precision` and `min_digits` refer to the
    total number of digits after the decimal point, including leading
    zeros.
    If `False`, `precision` and `min_digits` refer to the total number of
    significant digits, before or after the decimal point, ignoring leading
    zeros.
trim : one of 'k', '.', '0', '-', optional
    Controls post-processing trimming of trailing digits, as follows:

    * 'k' : keep trailing zeros, keep decimal point (no trimming)
    * '.' : trim all trailing zeros, leave decimal point
    * '0' : trim all but the zero before the decimal point. Insert the
      zero if it is missing.
    * '-' : trim trailing zeros and any trailing decimal point
sign : boolean, optional
    Whether to show the sign for positive values.
pad_left : non-negative integer, optional
    Pad the left side of the string with whitespace until at least that
    many characters are to the left of the decimal point.
pad_right : non-negative integer, optional
    Pad the right side of the string with whitespace until at least that
    many characters are to the right of the decimal point.
min_digits : non-negative integer or None, optional
    Minimum number of digits to print. Only has an effect if `unique=True`
    in which case additional digits past those necessary to uniquely
    identify the value may be printed, rounding the last additional digit.

    -- versionadded:: 1.21.0

Returns
-------
rep : string
    The string representation of the floating point value

See Also
--------
format_float_scientific

Examples
--------
>>> np.format_float_positional(np.float32(np.pi))
'3.1415927'
>>> np.format_float_positional(np.float16(np.pi))
'3.14'
>>> np.format_float_positional(np.float16(0.3))
'0.3'
>>> np.format_float_positional(np.float16(0.3), unique=False, precision=10)
'0.3000488281'

---
## IntegerFormat
```python
from arrayprint import IntegerFormat
```



---
## BoolFormat
```python
from arrayprint import BoolFormat
```



---
## ComplexFloatingFormat
```python
from arrayprint import ComplexFloatingFormat
```

Formatter for subtypes of np.complexfloating 

---
## _TimelikeFormat
```python
from arrayprint import _TimelikeFormat
```



---
## DatetimeFormat
```python
from arrayprint import DatetimeFormat
```



---
## TimedeltaFormat
```python
from arrayprint import TimedeltaFormat
```



---
## SubArrayFormat
```python
from arrayprint import SubArrayFormat
```



---
## StructuredVoidFormat
```python
from arrayprint import StructuredVoidFormat
```

Formatter for structured np.void objects.

This does not work on structured alias types like np.dtype(('i4', 'i2,i2')),
as alias scalars lose their field information, and the implementation
relies upon np.void.__getitem__.

---
## _void_scalar_repr
```python
from arrayprint import _void_scalar_repr
```

Implements the repr for structured-void scalars. It is called from the
scalartypes.c.src code, and is placed here because it uses the elementwise
formatters defined above.

---
## dtype_is_implied
```python
from arrayprint import dtype_is_implied
```

Determine if the given dtype is implied by the representation of its values.

Parameters
----------
dtype : dtype
    Data type

Returns
-------
implied : bool
    True if the dtype is implied by the representation of its values.

Examples
--------
>>> np.core.arrayprint.dtype_is_implied(int)
True
>>> np.array([1, 2, 3], int)
array([1, 2, 3])
>>> np.core.arrayprint.dtype_is_implied(np.int8)
False
>>> np.array([1, 2, 3], np.int8)
array([1, 2, 3], dtype=int8)

---
## dtype_short_repr
```python
from arrayprint import dtype_short_repr
```

Convert a dtype to a short form which evaluates to the same dtype.

The intent is roughly that the following holds

>>> from numpy import *
>>> dt = np.int64([1, 2]).dtype
>>> assert eval(dtype_short_repr(dt)) == dt

---
## _array_repr_implementation
```python
from arrayprint import _array_repr_implementation
```

Internal version of array_repr() that allows overriding array2string.

---
## _array_repr_dispatcher
```python
from arrayprint import _array_repr_dispatcher
```



---
## array_repr
```python
from arrayprint import array_repr
```

Return the string representation of an array.

Parameters
----------
arr : ndarray
    Input array.
max_line_width : int, optional
    Inserts newlines if text is longer than `max_line_width`.
    Defaults to ``numpy.get_printoptions()['linewidth']``.
precision : int, optional
    Floating point precision.
    Defaults to ``numpy.get_printoptions()['precision']``.
suppress_small : bool, optional
    Represent numbers "very close" to zero as zero; default is False.
    Very close is defined by precision: if the precision is 8, e.g.,
    numbers smaller (in absolute value) than 5e-9 are represented as
    zero.
    Defaults to ``numpy.get_printoptions()['suppress']``.

Returns
-------
string : str
  The string representation of an array.

See Also
--------
array_str, array2string, set_printoptions

Examples
--------
>>> np.array_repr(np.array([1,2]))
'array([1, 2])'
>>> np.array_repr(np.ma.array([0.]))
'MaskedArray([0.])'
>>> np.array_repr(np.array([], np.int32))
'array([], dtype=int32)'

>>> x = np.array([1e-6, 4e-7, 2, 3])
>>> np.array_repr(x, precision=6, suppress_small=True)
'array([0.000001,  0.      ,  2.      ,  3.      ])'

---
## _guarded_repr_or_str
```python
from arrayprint import _guarded_repr_or_str
```



---
## _array_str_implementation
```python
from arrayprint import _array_str_implementation
```

Internal version of array_str() that allows overriding array2string.

---
## _array_str_dispatcher
```python
from arrayprint import _array_str_dispatcher
```



---
## array_str
```python
from arrayprint import array_str
```

Return a string representation of the data in an array.

The data in the array is returned as a single string.  This function is
similar to `array_repr`, the difference being that `array_repr` also
returns information on the kind of array and its data type.

Parameters
----------
a : ndarray
    Input array.
max_line_width : int, optional
    Inserts newlines if text is longer than `max_line_width`.
    Defaults to ``numpy.get_printoptions()['linewidth']``.
precision : int, optional
    Floating point precision.
    Defaults to ``numpy.get_printoptions()['precision']``.
suppress_small : bool, optional
    Represent numbers "very close" to zero as zero; default is False.
    Very close is defined by precision: if the precision is 8, e.g.,
    numbers smaller (in absolute value) than 5e-9 are represented as
    zero.
    Defaults to ``numpy.get_printoptions()['suppress']``.

See Also
--------
array2string, array_repr, set_printoptions

Examples
--------
>>> np.array_str(np.arange(3))
'[0 1 2]'

---
## set_string_function
```python
from arrayprint import set_string_function
```

Set a Python function to be used when pretty printing arrays.

Parameters
----------
f : function or None
    Function to be used to pretty print arrays. The function should expect
    a single array argument and return a string of the representation of
    the array. If None, the function is reset to the default NumPy function
    to print arrays.
repr : bool, optional
    If True (default), the function for pretty printing (``__repr__``)
    is set, if False the function that returns the default string
    representation (``__str__``) is set.

See Also
--------
set_printoptions, get_printoptions

Examples
--------
>>> def pprint(arr):
...     return 'HA! - What are you going to do now?'
...
>>> np.set_string_function(pprint)
>>> a = np.arange(10)
>>> a
HA! - What are you going to do now?
>>> _ = a
>>> # [0 1 2 3 4 5 6 7 8 9]

We can reset the function to the default:

>>> np.set_string_function(None)
>>> a
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

`repr` affects either pretty printing or normal string representation.
Note that ``__repr__`` is still affected by setting ``__str__``
because the width of each array element in the returned string becomes
equal to the length of the result of ``__str__()``.

>>> x = np.arange(4)
>>> np.set_string_function(lambda x:'random', repr=False)
>>> x.__str__()
'random'
>>> x.__repr__()
'array([0, 1, 2, 3])'

---
## indirect
```python
from arrayprint import indirect
```



---
## decorating_function
```python
from arrayprint import decorating_function
```



---
## recurser
```python
from arrayprint import recurser
```

By using this local function, we don't need to recurse with all the
arguments. Since this function is not created recursively, the cost is
not significant

---
## __init__
```python
from arrayprint import __init__
```



---
## fillFormat
```python
from arrayprint import fillFormat
```



---
## __call__
```python
from arrayprint import __call__
```



---
## _format_non_nat
```python
from arrayprint import _format_non_nat
```



---
## format_array
```python
from arrayprint import format_array
```



---
## from_data
```python
from arrayprint import from_data
```

This is a second way to initialize StructuredVoidFormat, using the raw data
as input. Added to avoid changing the signature of __init__.

---
## wrapper
```python
from arrayprint import wrapper
```



---
## __name__
```python
from linalg import __name__
```



---
## EigResult
```python
from linalg import EigResult
```



---
## EighResult
```python
from linalg import EighResult
```



---
## QRResult
```python
from linalg import QRResult
```



---
## SlogdetResult
```python
from linalg import SlogdetResult
```



---
## SVDResult
```python
from linalg import SVDResult
```



---
## LinAlgError
```python
from linalg import LinAlgError
```

Generic Python-exception-derived object raised by linalg functions.

General purpose exception class, derived from Python's ValueError
class, programmatically raised in linalg functions when a Linear
Algebra-related condition would prevent further correct execution of the
function.

Parameters
----------
None

Examples
--------
>>> from numpy import linalg as LA
>>> LA.inv(np.zeros((2,2)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...linalg.py", line 350,
    in inv return wrap(solve(a, identity(a.shape[0], dtype=a.dtype)))
  File "...linalg.py", line 249,
    in solve
    raise LinAlgError('Singular matrix')
numpy.linalg.LinAlgError: Singular matrix

---
## _determine_error_states
```python
from linalg import _determine_error_states
```



---
## _raise_linalgerror_singular
```python
from linalg import _raise_linalgerror_singular
```



---
## _raise_linalgerror_nonposdef
```python
from linalg import _raise_linalgerror_nonposdef
```



---
## _raise_linalgerror_eigenvalues_nonconvergence
```python
from linalg import _raise_linalgerror_eigenvalues_nonconvergence
```



---
## _raise_linalgerror_svd_nonconvergence
```python
from linalg import _raise_linalgerror_svd_nonconvergence
```



---
## _raise_linalgerror_lstsq
```python
from linalg import _raise_linalgerror_lstsq
```



---
## _raise_linalgerror_qr
```python
from linalg import _raise_linalgerror_qr
```



---
## get_linalg_error_extobj
```python
from linalg import get_linalg_error_extobj
```



---
## _makearray
```python
from linalg import _makearray
```



---
## isComplexType
```python
from linalg import isComplexType
```



---
## _realType
```python
from linalg import _realType
```



---
## _complexType
```python
from linalg import _complexType
```



---
## _commonType
```python
from linalg import _commonType
```



---
## _to_native_byte_order
```python
from linalg import _to_native_byte_order
```



---
## _assert_2d
```python
from linalg import _assert_2d
```



---
## _assert_stacked_2d
```python
from linalg import _assert_stacked_2d
```



---
## _assert_stacked_square
```python
from linalg import _assert_stacked_square
```



---
## _assert_finite
```python
from linalg import _assert_finite
```



---
## _is_empty_2d
```python
from linalg import _is_empty_2d
```



---
## transpose
```python
from linalg import transpose
```

Transpose each matrix in a stack of matrices.

Unlike np.transpose, this only swaps the last two axes, rather than all of
them

Parameters
----------
a : (...,M,N) array_like

Returns
-------
aT : (...,N,M) ndarray

---
## _tensorsolve_dispatcher
```python
from linalg import _tensorsolve_dispatcher
```



---
## tensorsolve
```python
from linalg import tensorsolve
```

Solve the tensor equation ``a x = b`` for x.

It is assumed that all indices of `x` are summed over in the product,
together with the rightmost indices of `a`, as is done in, for example,
``tensordot(a, x, axes=x.ndim)``.

Parameters
----------
a : array_like
    Coefficient tensor, of shape ``b.shape + Q``. `Q`, a tuple, equals
    the shape of that sub-tensor of `a` consisting of the appropriate
    number of its rightmost indices, and must be such that
    ``prod(Q) == prod(b.shape)`` (in which sense `a` is said to be
    'square').
b : array_like
    Right-hand tensor, which can be of any shape.
axes : tuple of ints, optional
    Axes in `a` to reorder to the right, before inversion.
    If None (default), no reordering is done.

Returns
-------
x : ndarray, shape Q

Raises
------
LinAlgError
    If `a` is singular or not 'square' (in the above sense).

See Also
--------
numpy.tensordot, tensorinv, numpy.einsum

Examples
--------
>>> a = np.eye(2*3*4)
>>> a.shape = (2*3, 4, 2, 3, 4)
>>> b = np.random.randn(2*3, 4)
>>> x = np.linalg.tensorsolve(a, b)
>>> x.shape
(2, 3, 4)
>>> np.allclose(np.tensordot(a, x, axes=3), b)
True

---
## _solve_dispatcher
```python
from linalg import _solve_dispatcher
```



---
## solve
```python
from linalg import solve
```

Array API compatible wrapper for :py:func:`np.linalg.solve <numpy.linalg.solve>`.

See its docstring for more information.

---
## _tensorinv_dispatcher
```python
from linalg import _tensorinv_dispatcher
```



---
## tensorinv
```python
from linalg import tensorinv
```

Compute the 'inverse' of an N-dimensional array.

The result is an inverse for `a` relative to the tensordot operation
``tensordot(a, b, ind)``, i. e., up to floating-point accuracy,
``tensordot(tensorinv(a), a, ind)`` is the "identity" tensor for the
tensordot operation.

Parameters
----------
a : array_like
    Tensor to 'invert'. Its shape must be 'square', i. e.,
    ``prod(a.shape[:ind]) == prod(a.shape[ind:])``.
ind : int, optional
    Number of first indices that are involved in the inverse sum.
    Must be a positive integer, default is 2.

Returns
-------
b : ndarray
    `a`'s tensordot inverse, shape ``a.shape[ind:] + a.shape[:ind]``.

Raises
------
LinAlgError
    If `a` is singular or not 'square' (in the above sense).

See Also
--------
numpy.tensordot, tensorsolve

Examples
--------
>>> a = np.eye(4*6)
>>> a.shape = (4, 6, 8, 3)
>>> ainv = np.linalg.tensorinv(a, ind=2)
>>> ainv.shape
(8, 3, 4, 6)
>>> b = np.random.randn(4, 6)
>>> np.allclose(np.tensordot(ainv, b), np.linalg.tensorsolve(a, b))
True

>>> a = np.eye(4*6)
>>> a.shape = (24, 8, 3)
>>> ainv = np.linalg.tensorinv(a, ind=1)
>>> ainv.shape
(8, 3, 24)
>>> b = np.random.randn(24)
>>> np.allclose(np.tensordot(ainv, b, 1), np.linalg.tensorsolve(a, b))
True

---
## _unary_dispatcher
```python
from linalg import _unary_dispatcher
```



---
## inv
```python
from linalg import inv
```

Array API compatible wrapper for :py:func:`np.linalg.inv <numpy.linalg.inv>`.

See its docstring for more information.

---
## _matrix_power_dispatcher
```python
from linalg import _matrix_power_dispatcher
```



---
## matrix_power
```python
from linalg import matrix_power
```

Array API compatible wrapper for :py:func:`np.matrix_power <numpy.matrix_power>`.

See its docstring for more information.

---
## cholesky
```python
from linalg import cholesky
```

Array API compatible wrapper for :py:func:`np.linalg.cholesky <numpy.linalg.cholesky>`.

See its docstring for more information.

---
## _qr_dispatcher
```python
from linalg import _qr_dispatcher
```



---
## qr
```python
from linalg import qr
```

Array API compatible wrapper for :py:func:`np.linalg.qr <numpy.linalg.qr>`.

See its docstring for more information.

---
## eigvals
```python
from linalg import eigvals
```

Compute the eigenvalues of a general matrix.

Main difference between `eigvals` and `eig`: the eigenvectors aren't
returned.

Parameters
----------
a : (..., M, M) array_like
    A complex- or real-valued matrix whose eigenvalues will be computed.

Returns
-------
w : (..., M,) ndarray
    The eigenvalues, each repeated according to its multiplicity.
    They are not necessarily ordered, nor are they necessarily
    real for real matrices.

Raises
------
LinAlgError
    If the eigenvalue computation does not converge.

See Also
--------
eig : eigenvalues and right eigenvectors of general arrays
eigvalsh : eigenvalues of real symmetric or complex Hermitian
           (conjugate symmetric) arrays.
eigh : eigenvalues and eigenvectors of real symmetric or complex
       Hermitian (conjugate symmetric) arrays.
scipy.linalg.eigvals : Similar function in SciPy.

Notes
-----

.. versionadded:: 1.8.0

Broadcasting rules apply, see the `numpy.linalg` documentation for
details.

This is implemented using the ``_geev`` LAPACK routines which compute
the eigenvalues and eigenvectors of general square arrays.

Examples
--------
Illustration, using the fact that the eigenvalues of a diagonal matrix
are its diagonal elements, that multiplying a matrix on the left
by an orthogonal matrix, `Q`, and on the right by `Q.T` (the transpose
of `Q`), preserves the eigenvalues of the "middle" matrix.  In other words,
if `Q` is orthogonal, then ``Q * A * Q.T`` has the same eigenvalues as
``A``:

>>> from numpy import linalg as LA
>>> x = np.random.random()
>>> Q = np.array([[np.cos(x), -np.sin(x)], [np.sin(x), np.cos(x)]])
>>> LA.norm(Q[0, :]), LA.norm(Q[1, :]), np.dot(Q[0, :],Q[1, :])
(1.0, 1.0, 0.0)

Now multiply a diagonal matrix by ``Q`` on one side and by ``Q.T`` on the other:

>>> D = np.diag((-1,1))
>>> LA.eigvals(D)
array([-1.,  1.])
>>> A = np.dot(Q, D)
>>> A = np.dot(A, Q.T)
>>> LA.eigvals(A)
array([ 1., -1.]) # random

---
## _eigvalsh_dispatcher
```python
from linalg import _eigvalsh_dispatcher
```



---
## eigvalsh
```python
from linalg import eigvalsh
```

Array API compatible wrapper for :py:func:`np.linalg.eigvalsh <numpy.linalg.eigvalsh>`.

See its docstring for more information.

---
## _convertarray
```python
from linalg import _convertarray
```



---
## eig
```python
from linalg import eig
```

Compute the eigenvalues and right eigenvectors of a square array.

Parameters
----------
a : (..., M, M) array
    Matrices for which the eigenvalues and right eigenvectors will
    be computed

Returns
-------
A namedtuple with the following attributes:

eigenvalues : (..., M) array
    The eigenvalues, each repeated according to its multiplicity.
    The eigenvalues are not necessarily ordered. The resulting
    array will be of complex type, unless the imaginary part is
    zero in which case it will be cast to a real type. When `a`
    is real the resulting eigenvalues will be real (0 imaginary
    part) or occur in conjugate pairs

eigenvectors : (..., M, M) array
    The normalized (unit "length") eigenvectors, such that the
    column ``eigenvectors[:,i]`` is the eigenvector corresponding to the
    eigenvalue ``eigenvalues[i]``.

Raises
------
LinAlgError
    If the eigenvalue computation does not converge.

See Also
--------
eigvals : eigenvalues of a non-symmetric array.
eigh : eigenvalues and eigenvectors of a real symmetric or complex
       Hermitian (conjugate symmetric) array.
eigvalsh : eigenvalues of a real symmetric or complex Hermitian
           (conjugate symmetric) array.
scipy.linalg.eig : Similar function in SciPy that also solves the
                   generalized eigenvalue problem.
scipy.linalg.schur : Best choice for unitary and other non-Hermitian
                     normal matrices.

Notes
-----

.. versionadded:: 1.8.0

Broadcasting rules apply, see the `numpy.linalg` documentation for
details.

This is implemented using the ``_geev`` LAPACK routines which compute
the eigenvalues and eigenvectors of general square arrays.

The number `w` is an eigenvalue of `a` if there exists a vector `v` such
that ``a @ v = w * v``. Thus, the arrays `a`, `eigenvalues`, and
`eigenvectors` satisfy the equations ``a @ eigenvectors[:,i] =
eigenvalues[i] * eigenvalues[:,i]`` for :math:`i \in \{0,...,M-1\}`.

The array `eigenvectors` may not be of maximum rank, that is, some of the
columns may be linearly dependent, although round-off error may obscure
that fact. If the eigenvalues are all different, then theoretically the
eigenvectors are linearly independent and `a` can be diagonalized by a
similarity transformation using `eigenvectors`, i.e, ``inv(eigenvectors) @
a @ eigenvectors`` is diagonal.

For non-Hermitian normal matrices the SciPy function `scipy.linalg.schur`
is preferred because the matrix `eigenvectors` is guaranteed to be
unitary, which is not the case when using `eig`. The Schur factorization
produces an upper triangular matrix rather than a diagonal matrix, but for
normal matrices only the diagonal of the upper triangular matrix is
needed, the rest is roundoff error.

Finally, it is emphasized that `eigenvectors` consists of the *right* (as
in right-hand side) eigenvectors of `a`. A vector `y` satisfying ``y.T @ a
= z * y.T`` for some number `z` is called a *left* eigenvector of `a`,
and, in general, the left and right eigenvectors of a matrix are not
necessarily the (perhaps conjugate) transposes of each other.

References
----------
G. Strang, *Linear Algebra and Its Applications*, 2nd Ed., Orlando, FL,
Academic Press, Inc., 1980, Various pp.

Examples
--------
>>> from numpy import linalg as LA

(Almost) trivial example with real eigenvalues and eigenvectors.

>>> eigenvalues, eigenvectors = LA.eig(np.diag((1, 2, 3)))
>>> eigenvalues
array([1., 2., 3.])
>>> eigenvectors
array([[1., 0., 0.],
       [0., 1., 0.],
       [0., 0., 1.]])

Real matrix possessing complex eigenvalues and eigenvectors; note that the
eigenvalues are complex conjugates of each other.

>>> eigenvalues, eigenvectors = LA.eig(np.array([[1, -1], [1, 1]]))
>>> eigenvalues
array([1.+1.j, 1.-1.j])
>>> eigenvectors
array([[0.70710678+0.j        , 0.70710678-0.j        ],
       [0.        -0.70710678j, 0.        +0.70710678j]])

Complex-valued matrix with real eigenvalues (but complex-valued eigenvectors);
note that ``a.conj().T == a``, i.e., `a` is Hermitian.

>>> a = np.array([[1, 1j], [-1j, 1]])
>>> eigenvalues, eigenvectors = LA.eig(a)
>>> eigenvalues
array([2.+0.j, 0.+0.j])
>>> eigenvectors
array([[ 0.        +0.70710678j,  0.70710678+0.j        ], # may vary
       [ 0.70710678+0.j        , -0.        +0.70710678j]])

Be careful about round-off error!

>>> a = np.array([[1 + 1e-9, 0], [0, 1 - 1e-9]])
>>> # Theor. eigenvalues are 1 +/- 1e-9
>>> eigenvalues, eigenvectors = LA.eig(a)
>>> eigenvalues
array([1., 1.])
>>> eigenvectors
array([[1., 0.],
       [0., 1.]])

---
## eigh
```python
from linalg import eigh
```

Array API compatible wrapper for :py:func:`np.linalg.eigh <numpy.linalg.eigh>`.

See its docstring for more information.

---
## _svd_dispatcher
```python
from linalg import _svd_dispatcher
```



---
## svd
```python
from linalg import svd
```

Array API compatible wrapper for :py:func:`np.linalg.svd <numpy.linalg.svd>`.

See its docstring for more information.

---
## _cond_dispatcher
```python
from linalg import _cond_dispatcher
```



---
## cond
```python
from linalg import cond
```

Compute the condition number of a matrix.

This function is capable of returning the condition number using
one of seven different norms, depending on the value of `p` (see
Parameters below).

Parameters
----------
x : (..., M, N) array_like
    The matrix whose condition number is sought.
p : {None, 1, -1, 2, -2, inf, -inf, 'fro'}, optional
    Order of the norm used in the condition number computation:

    =====  ============================
    p      norm for matrices
    =====  ============================
    None   2-norm, computed directly using the ``SVD``
    'fro'  Frobenius norm
    inf    max(sum(abs(x), axis=1))
    -inf   min(sum(abs(x), axis=1))
    1      max(sum(abs(x), axis=0))
    -1     min(sum(abs(x), axis=0))
    2      2-norm (largest sing. value)
    -2     smallest singular value
    =====  ============================

    inf means the `numpy.inf` object, and the Frobenius norm is
    the root-of-sum-of-squares norm.

Returns
-------
c : {float, inf}
    The condition number of the matrix. May be infinite.

See Also
--------
numpy.linalg.norm

Notes
-----
The condition number of `x` is defined as the norm of `x` times the
norm of the inverse of `x` [1]_; the norm can be the usual L2-norm
(root-of-sum-of-squares) or one of a number of other matrix norms.

References
----------
.. [1] G. Strang, *Linear Algebra and Its Applications*, Orlando, FL,
       Academic Press, Inc., 1980, pg. 285.

Examples
--------
>>> from numpy import linalg as LA
>>> a = np.array([[1, 0, -1], [0, 1, 0], [1, 0, 1]])
>>> a
array([[ 1,  0, -1],
       [ 0,  1,  0],
       [ 1,  0,  1]])
>>> LA.cond(a)
1.4142135623730951
>>> LA.cond(a, 'fro')
3.1622776601683795
>>> LA.cond(a, np.inf)
2.0
>>> LA.cond(a, -np.inf)
1.0
>>> LA.cond(a, 1)
2.0
>>> LA.cond(a, -1)
1.0
>>> LA.cond(a, 2)
1.4142135623730951
>>> LA.cond(a, -2)
0.70710678118654746 # may vary
>>> min(LA.svd(a, compute_uv=False))*min(LA.svd(LA.inv(a), compute_uv=False))
0.70710678118654746 # may vary

---
## _matrix_rank_dispatcher
```python
from linalg import _matrix_rank_dispatcher
```



---
## matrix_rank
```python
from linalg import matrix_rank
```

Array API compatible wrapper for :py:func:`np.matrix_rank <numpy.matrix_rank>`.

See its docstring for more information.

---
## _pinv_dispatcher
```python
from linalg import _pinv_dispatcher
```



---
## pinv
```python
from linalg import pinv
```

Array API compatible wrapper for :py:func:`np.linalg.pinv <numpy.linalg.pinv>`.

See its docstring for more information.

---
## slogdet
```python
from linalg import slogdet
```

Array API compatible wrapper for :py:func:`np.linalg.slogdet <numpy.linalg.slogdet>`.

See its docstring for more information.

---
## det
```python
from linalg import det
```

Array API compatible wrapper for :py:func:`np.linalg.det <numpy.linalg.det>`.

See its docstring for more information.

---
## _lstsq_dispatcher
```python
from linalg import _lstsq_dispatcher
```



---
## lstsq
```python
from linalg import lstsq
```

Return the least-squares solution to a linear matrix equation.

Computes the vector `x` that approximately solves the equation
``a @ x = b``. The equation may be under-, well-, or over-determined
(i.e., the number of linearly independent rows of `a` can be less than,
equal to, or greater than its number of linearly independent columns).
If `a` is square and of full rank, then `x` (but for round-off error)
is the "exact" solution of the equation. Else, `x` minimizes the
Euclidean 2-norm :math:`||b - ax||`. If there are multiple minimizing
solutions, the one with the smallest 2-norm :math:`||x||` is returned.

Parameters
----------
a : (M, N) array_like
    "Coefficient" matrix.
b : {(M,), (M, K)} array_like
    Ordinate or "dependent variable" values. If `b` is two-dimensional,
    the least-squares solution is calculated for each of the `K` columns
    of `b`.
rcond : float, optional
    Cut-off ratio for small singular values of `a`.
    For the purposes of rank determination, singular values are treated
    as zero if they are smaller than `rcond` times the largest singular
    value of `a`.

    .. versionchanged:: 1.14.0
       If not set, a FutureWarning is given. The previous default
       of ``-1`` will use the machine precision as `rcond` parameter,
       the new default will use the machine precision times `max(M, N)`.
       To silence the warning and use the new default, use ``rcond=None``,
       to keep using the old behavior, use ``rcond=-1``.

Returns
-------
x : {(N,), (N, K)} ndarray
    Least-squares solution. If `b` is two-dimensional,
    the solutions are in the `K` columns of `x`.
residuals : {(1,), (K,), (0,)} ndarray
    Sums of squared residuals: Squared Euclidean 2-norm for each column in
    ``b - a @ x``.
    If the rank of `a` is < N or M <= N, this is an empty array.
    If `b` is 1-dimensional, this is a (1,) shape array.
    Otherwise the shape is (K,).
rank : int
    Rank of matrix `a`.
s : (min(M, N),) ndarray
    Singular values of `a`.

Raises
------
LinAlgError
    If computation does not converge.

See Also
--------
scipy.linalg.lstsq : Similar function in SciPy.

Notes
-----
If `b` is a matrix, then all array results are returned as matrices.

Examples
--------
Fit a line, ``y = mx + c``, through some noisy data-points:

>>> x = np.array([0, 1, 2, 3])
>>> y = np.array([-1, 0.2, 0.9, 2.1])

By examining the coefficients, we see that the line should have a
gradient of roughly 1 and cut the y-axis at, more or less, -1.

We can rewrite the line equation as ``y = Ap``, where ``A = [[x 1]]``
and ``p = [[m], [c]]``.  Now use `lstsq` to solve for `p`:

>>> A = np.vstack([x, np.ones(len(x))]).T
>>> A
array([[ 0.,  1.],
       [ 1.,  1.],
       [ 2.,  1.],
       [ 3.,  1.]])

>>> m, c = np.linalg.lstsq(A, y, rcond=None)[0]
>>> m, c
(1.0 -0.95) # may vary

Plot the data along with the fitted line:

>>> import matplotlib.pyplot as plt
>>> _ = plt.plot(x, y, 'o', label='Original data', markersize=10)
>>> _ = plt.plot(x, m*x + c, 'r', label='Fitted line')
>>> _ = plt.legend()
>>> plt.show()

---
## _multi_svd_norm
```python
from linalg import _multi_svd_norm
```

Compute a function of the singular values of the 2-D matrices in `x`.

This is a private utility function used by `numpy.linalg.norm()`.

Parameters
----------
x : ndarray
row_axis, col_axis : int
    The axes of `x` that hold the 2-D matrices.
op : callable
    This should be either numpy.amin or `numpy.amax` or `numpy.sum`.

Returns
-------
result : float or ndarray
    If `x` is 2-D, the return values is a float.
    Otherwise, it is an array with ``x.ndim - 2`` dimensions.
    The return values are either the minimum or maximum or sum of the
    singular values of the matrices, depending on whether `op`
    is `numpy.amin` or `numpy.amax` or `numpy.sum`.

---
## _norm_dispatcher
```python
from linalg import _norm_dispatcher
```



---
## norm
```python
from linalg import norm
```

Matrix or vector norm.

This function is able to return one of eight different matrix norms,
or one of an infinite number of vector norms (described below), depending
on the value of the ``ord`` parameter.

Parameters
----------
x : array_like
    Input array.  If `axis` is None, `x` must be 1-D or 2-D, unless `ord`
    is None. If both `axis` and `ord` are None, the 2-norm of
    ``x.ravel`` will be returned.
ord : {non-zero int, inf, -inf, 'fro', 'nuc'}, optional
    Order of the norm (see table under ``Notes``). inf means numpy's
    `inf` object. The default is None.
axis : {None, int, 2-tuple of ints}, optional.
    If `axis` is an integer, it specifies the axis of `x` along which to
    compute the vector norms.  If `axis` is a 2-tuple, it specifies the
    axes that hold 2-D matrices, and the matrix norms of these matrices
    are computed.  If `axis` is None then either a vector norm (when `x`
    is 1-D) or a matrix norm (when `x` is 2-D) is returned. The default
    is None.

    .. versionadded:: 1.8.0

keepdims : bool, optional
    If this is set to True, the axes which are normed over are left in the
    result as dimensions with size one.  With this option the result will
    broadcast correctly against the original `x`.

    .. versionadded:: 1.10.0

Returns
-------
n : float or ndarray
    Norm of the matrix or vector(s).

See Also
--------
scipy.linalg.norm : Similar function in SciPy.

Notes
-----
For values of ``ord < 1``, the result is, strictly speaking, not a
mathematical 'norm', but it may still be useful for various numerical
purposes.

The following norms can be calculated:

=====  ============================  ==========================
ord    norm for matrices             norm for vectors
=====  ============================  ==========================
None   Frobenius norm                2-norm
'fro'  Frobenius norm                --
'nuc'  nuclear norm                  --
inf    max(sum(abs(x), axis=1))      max(abs(x))
-inf   min(sum(abs(x), axis=1))      min(abs(x))
0      --                            sum(x != 0)
1      max(sum(abs(x), axis=0))      as below
-1     min(sum(abs(x), axis=0))      as below
2      2-norm (largest sing. value)  as below
-2     smallest singular value       as below
other  --                            sum(abs(x)**ord)**(1./ord)
=====  ============================  ==========================

The Frobenius norm is given by [1]_:

    :math:`||A||_F = [\sum_{i,j} abs(a_{i,j})^2]^{1/2}`

The nuclear norm is the sum of the singular values.

Both the Frobenius and nuclear norm orders are only defined for
matrices and raise a ValueError when ``x.ndim != 2``.

References
----------
.. [1] G. H. Golub and C. F. Van Loan, *Matrix Computations*,
       Baltimore, MD, Johns Hopkins University Press, 1985, pg. 15

Examples
--------
>>> from numpy import linalg as LA
>>> a = np.arange(9) - 4
>>> a
array([-4, -3, -2, ...,  2,  3,  4])
>>> b = a.reshape((3, 3))
>>> b
array([[-4, -3, -2],
       [-1,  0,  1],
       [ 2,  3,  4]])

>>> LA.norm(a)
7.745966692414834
>>> LA.norm(b)
7.745966692414834
>>> LA.norm(b, 'fro')
7.745966692414834
>>> LA.norm(a, np.inf)
4.0
>>> LA.norm(b, np.inf)
9.0
>>> LA.norm(a, -np.inf)
0.0
>>> LA.norm(b, -np.inf)
2.0

>>> LA.norm(a, 1)
20.0
>>> LA.norm(b, 1)
7.0
>>> LA.norm(a, -1)
-4.6566128774142013e-010
>>> LA.norm(b, -1)
6.0
>>> LA.norm(a, 2)
7.745966692414834
>>> LA.norm(b, 2)
7.3484692283495345

>>> LA.norm(a, -2)
0.0
>>> LA.norm(b, -2)
1.8570331885190563e-016 # may vary
>>> LA.norm(a, 3)
5.8480354764257312 # may vary
>>> LA.norm(a, -3)
0.0

Using the `axis` argument to compute vector norms:

>>> c = np.array([[ 1, 2, 3],
...               [-1, 1, 4]])
>>> LA.norm(c, axis=0)
array([ 1.41421356,  2.23606798,  5.        ])
>>> LA.norm(c, axis=1)
array([ 3.74165739,  4.24264069])
>>> LA.norm(c, ord=1, axis=1)
array([ 6.,  6.])

Using the `axis` argument to compute matrix norms:

>>> m = np.arange(8).reshape(2,2,2)
>>> LA.norm(m, axis=(1,2))
array([  3.74165739,  11.22497216])
>>> LA.norm(m[0, :, :]), LA.norm(m[1, :, :])
(3.7416573867739413, 11.224972160321824)

---
## _multidot_dispatcher
```python
from linalg import _multidot_dispatcher
```



---
## multi_dot
```python
from linalg import multi_dot
```

Compute the dot product of two or more arrays in a single function call,
while automatically selecting the fastest evaluation order.

`multi_dot` chains `numpy.dot` and uses optimal parenthesization
of the matrices [1]_ [2]_. Depending on the shapes of the matrices,
this can speed up the multiplication a lot.

If the first argument is 1-D it is treated as a row vector.
If the last argument is 1-D it is treated as a column vector.
The other arguments must be 2-D.

Think of `multi_dot` as::

    def multi_dot(arrays): return functools.reduce(np.dot, arrays)


Parameters
----------
arrays : sequence of array_like
    If the first argument is 1-D it is treated as row vector.
    If the last argument is 1-D it is treated as column vector.
    The other arguments must be 2-D.
out : ndarray, optional
    Output argument. This must have the exact kind that would be returned
    if it was not used. In particular, it must have the right type, must be
    C-contiguous, and its dtype must be the dtype that would be returned
    for `dot(a, b)`. This is a performance feature. Therefore, if these
    conditions are not met, an exception is raised, instead of attempting
    to be flexible.

    .. versionadded:: 1.19.0

Returns
-------
output : ndarray
    Returns the dot product of the supplied arrays.

See Also
--------
numpy.dot : dot multiplication with two arguments.

References
----------

.. [1] Cormen, "Introduction to Algorithms", Chapter 15.2, p. 370-378
.. [2] https://en.wikipedia.org/wiki/Matrix_chain_multiplication

Examples
--------
`multi_dot` allows you to write::

>>> from numpy.linalg import multi_dot
>>> # Prepare some data
>>> A = np.random.random((10000, 100))
>>> B = np.random.random((100, 1000))
>>> C = np.random.random((1000, 5))
>>> D = np.random.random((5, 333))
>>> # the actual dot multiplication
>>> _ = multi_dot([A, B, C, D])

instead of::

>>> _ = np.dot(np.dot(np.dot(A, B), C), D)
>>> # or
>>> _ = A.dot(B).dot(C).dot(D)

Notes
-----
The cost for a matrix multiplication can be calculated with the
following function::

    def cost(A, B):
        return A.shape[0] * A.shape[1] * B.shape[1]

Assume we have three matrices
:math:`A_{10x100}, B_{100x5}, C_{5x50}`.

The costs for the two different parenthesizations are as follows::

    cost((AB)C) = 10*100*5 + 10*5*50   = 5000 + 2500   = 7500
    cost(A(BC)) = 10*100*50 + 100*5*50 = 50000 + 25000 = 75000

---
## _multi_dot_three
```python
from linalg import _multi_dot_three
```

Find the best order for three arrays and do the multiplication.

For three arguments `_multi_dot_three` is approximately 15 times faster
than `_multi_dot_matrix_chain_order`

---
## _multi_dot_matrix_chain_order
```python
from linalg import _multi_dot_matrix_chain_order
```

Return a np.array that encodes the optimal order of mutiplications.

The optimal order array is then used by `_multi_dot()` to do the
multiplication.

Also return the cost matrix if `return_costs` is `True`

The implementation CLOSELY follows Cormen, "Introduction to Algorithms",
Chapter 15.2, p. 370-378.  Note that Cormen uses 1-based indices.

    cost[i, j] = min([
        cost[prefix] + cost[suffix] + cost_mult(prefix, suffix)
        for k in range(i, j)])

---
## _multi_dot
```python
from linalg import _multi_dot
```

Actually do the multiplication with the given order.

---
## __name__
```python
from extras import __name__
```

Masked arrays add-ons.

A collection of utilities for `numpy.ma`.

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $

---
## issequence
```python
from extras import issequence
```

Is seq a sequence (ndarray, list or tuple)?

---
## count_masked
```python
from extras import count_masked
```

Count the number of masked elements along the given axis.

Parameters
----------
arr : array_like
    An array with (possibly) masked elements.
axis : int, optional
    Axis along which to count. If None (default), a flattened
    version of the array is used.

Returns
-------
count : int, ndarray
    The total number of masked elements (axis=None) or the number
    of masked elements along each slice of the given axis.

See Also
--------
MaskedArray.count : Count non-masked elements.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(9).reshape((3,3))
>>> a = ma.array(a)
>>> a[1, 0] = ma.masked
>>> a[1, 2] = ma.masked
>>> a[2, 1] = ma.masked
>>> a
masked_array(
  data=[[0, 1, 2],
        [--, 4, --],
        [6, --, 8]],
  mask=[[False, False, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> ma.count_masked(a)
3

When the `axis` keyword is used an array is returned.

>>> ma.count_masked(a, axis=0)
array([1, 1, 1])
>>> ma.count_masked(a, axis=1)
array([0, 2, 1])

---
## masked_all
```python
from extras import masked_all
```

Empty masked array with all elements masked.

Return an empty masked array of the given shape and dtype, where all the
data are masked.

Parameters
----------
shape : int or tuple of ints
    Shape of the required MaskedArray, e.g., ``(2, 3)`` or ``2``.
dtype : dtype, optional
    Data type of the output.

Returns
-------
a : MaskedArray
    A masked array with all data masked.

See Also
--------
masked_all_like : Empty masked array modelled on an existing array.

Examples
--------
>>> import numpy.ma as ma
>>> ma.masked_all((3, 3))
masked_array(
  data=[[--, --, --],
        [--, --, --],
        [--, --, --]],
  mask=[[ True,  True,  True],
        [ True,  True,  True],
        [ True,  True,  True]],
  fill_value=1e+20,
  dtype=float64)

The `dtype` parameter defines the underlying data type.

>>> a = ma.masked_all((3, 3))
>>> a.dtype
dtype('float64')
>>> a = ma.masked_all((3, 3), dtype=np.int32)
>>> a.dtype
dtype('int32')

---
## masked_all_like
```python
from extras import masked_all_like
```

Empty masked array with the properties of an existing array.

Return an empty masked array of the same shape and dtype as
the array `arr`, where all the data are masked.

Parameters
----------
arr : ndarray
    An array describing the shape and dtype of the required MaskedArray.

Returns
-------
a : MaskedArray
    A masked array with all data masked.

Raises
------
AttributeError
    If `arr` doesn't have a shape attribute (i.e. not an ndarray)

See Also
--------
masked_all : Empty masked array with all elements masked.

Examples
--------
>>> import numpy.ma as ma
>>> arr = np.zeros((2, 3), dtype=np.float32)
>>> arr
array([[0., 0., 0.],
       [0., 0., 0.]], dtype=float32)
>>> ma.masked_all_like(arr)
masked_array(
  data=[[--, --, --],
        [--, --, --]],
  mask=[[ True,  True,  True],
        [ True,  True,  True]],
  fill_value=1e+20,
  dtype=float32)

The dtype of the masked array matches the dtype of `arr`.

>>> arr.dtype
dtype('float32')
>>> ma.masked_all_like(arr).dtype
dtype('float32')

---
## _fromnxfunction
```python
from extras import _fromnxfunction
```

Defines a wrapper to adapt NumPy functions to masked arrays.


An instance of `_fromnxfunction` can be called with the same parameters
as the wrapped NumPy function. The docstring of `newfunc` is adapted from
the wrapped function as well, see `getdoc`.

This class should not be used directly. Instead, one of its extensions that
provides support for a specific type of input should be used.

Parameters
----------
funcname : str
    The name of the function to be adapted. The function should be
    in the NumPy namespace (i.e. ``np.funcname``).

---
## _fromnxfunction_single
```python
from extras import _fromnxfunction_single
```

A version of `_fromnxfunction` that is called with a single array
argument followed by auxiliary args that are passed verbatim for
both the data and mask calls.

---
## _fromnxfunction_seq
```python
from extras import _fromnxfunction_seq
```

A version of `_fromnxfunction` that is called with a single sequence
of arrays followed by auxiliary args that are passed verbatim for
both the data and mask calls.

---
## _fromnxfunction_args
```python
from extras import _fromnxfunction_args
```

A version of `_fromnxfunction` that is called with multiple array
arguments. The first non-array-like input marks the beginning of the
arguments that are passed verbatim for both the data and mask calls.
Array arguments are processed independently and the results are
returned in a list. If only one array is found, the return value is
just the processed array instead of a list.

---
## _fromnxfunction_allargs
```python
from extras import _fromnxfunction_allargs
```

A version of `_fromnxfunction` that is called with multiple array
arguments. Similar to `_fromnxfunction_args` except that all args
are converted to arrays even if they are not so already. This makes
it possible to process scalars as 1-D arrays. Only keyword arguments
are passed through verbatim for the data and mask calls. Arrays
arguments are processed independently and the results are returned
in a list. If only one arg is present, the return value is just the
processed array instead of a list.

---
## flatten_inplace
```python
from extras import flatten_inplace
```

Flatten a sequence in place.

---
## apply_along_axis
```python
from extras import apply_along_axis
```

(This docstring should be overwritten)

---
## apply_over_axes
```python
from extras import apply_over_axes
```

(This docstring will be overwritten)

---
## average
```python
from extras import average
```

Return the weighted average of array over the given axis.

Parameters
----------
a : array_like
    Data to be averaged.
    Masked entries are not taken into account in the computation.
axis : int, optional
    Axis along which to average `a`. If None, averaging is done over
    the flattened array.
weights : array_like, optional
    The importance that each element has in the computation of the average.
    The weights array can either be 1-D (in which case its length must be
    the size of `a` along the given axis) or of the same shape as `a`.
    If ``weights=None``, then all data in `a` are assumed to have a
    weight equal to one.  The 1-D calculation is::

        avg = sum(a * weights) / sum(weights)

    The only constraint on `weights` is that `sum(weights)` must not be 0.
returned : bool, optional
    Flag indicating whether a tuple ``(result, sum of weights)``
    should be returned as output (True), or just the result (False).
    Default is False.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.
    *Note:* `keepdims` will not work with instances of `numpy.matrix`
    or other classes whose methods do not support `keepdims`.

    .. versionadded:: 1.23.0

Returns
-------
average, [sum_of_weights] : (tuple of) scalar or MaskedArray
    The average along the specified axis. When returned is `True`,
    return a tuple with the average as the first element and the sum
    of the weights as the second element. The return type is `np.float64`
    if `a` is of integer type and floats smaller than `float64`, or the
    input data-type, otherwise. If returned, `sum_of_weights` is always
    `float64`.

Examples
--------
>>> a = np.ma.array([1., 2., 3., 4.], mask=[False, False, True, True])
>>> np.ma.average(a, weights=[3, 1, 0, 0])
1.25

>>> x = np.ma.arange(6.).reshape(3, 2)
>>> x
masked_array(
  data=[[0., 1.],
        [2., 3.],
        [4., 5.]],
  mask=False,
  fill_value=1e+20)
>>> avg, sumweights = np.ma.average(x, axis=0, weights=[1, 2, 3],
...                                 returned=True)
>>> avg
masked_array(data=[2.6666666666666665, 3.6666666666666665],
             mask=[False, False],
       fill_value=1e+20)

With ``keepdims=True``, the following result has shape (3, 1).

>>> np.ma.average(x, axis=1, keepdims=True)
masked_array(
  data=[[0.5],
        [2.5],
        [4.5]],
  mask=False,
  fill_value=1e+20)

---
## median
```python
from extras import median
```

Compute the median along the specified axis.

Returns the median of the array elements.

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
axis : int, optional
    Axis along which the medians are computed. The default (None) is
    to compute the median along a flattened version of the array.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type will be cast if necessary.
overwrite_input : bool, optional
    If True, then allow use of memory of input array (a) for
    calculations. The input array will be modified by the call to
    median. This will save memory when you do not need to preserve
    the contents of the input array. Treat the input as undefined,
    but it will probably be fully or partially sorted. Default is
    False. Note that, if `overwrite_input` is True, and the input
    is not already an `ndarray`, an error will be raised.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the input array.

    .. versionadded:: 1.10.0

Returns
-------
median : ndarray
    A new array holding the result is returned unless out is
    specified, in which case a reference to out is returned.
    Return data-type is `float64` for integers and floats smaller than
    `float64`, or the input data-type, otherwise.

See Also
--------
mean

Notes
-----
Given a vector ``V`` with ``N`` non masked values, the median of ``V``
is the middle value of a sorted copy of ``V`` (``Vs``) - i.e.
``Vs[(N-1)/2]``, when ``N`` is odd, or ``{Vs[N/2 - 1] + Vs[N/2]}/2``
when ``N`` is even.

Examples
--------
>>> x = np.ma.array(np.arange(8), mask=[0]*4 + [1]*4)
>>> np.ma.median(x)
1.5

>>> x = np.ma.array(np.arange(10).reshape(2, 5), mask=[0]*6 + [1]*4)
>>> np.ma.median(x)
2.5
>>> np.ma.median(x, axis=-1, overwrite_input=True)
masked_array(data=[2.0, 5.0],
             mask=[False, False],
       fill_value=1e+20)

---
## _median
```python
from extras import _median
```



---
## compress_nd
```python
from extras import compress_nd
```

Suppress slices from multiple dimensions which contain masked values.

Parameters
----------
x : array_like, MaskedArray
    The array to operate on. If not a MaskedArray instance (or if no array
    elements are masked), `x` is interpreted as a MaskedArray with `mask`
    set to `nomask`.
axis : tuple of ints or int, optional
    Which dimensions to suppress slices from can be configured with this
    parameter.
    - If axis is a tuple of ints, those are the axes to suppress slices from.
    - If axis is an int, then that is the only axis to suppress slices from.
    - If axis is None, all axis are selected.

Returns
-------
compress_array : ndarray
    The compressed array.

---
## compress_rowcols
```python
from extras import compress_rowcols
```

Suppress the rows and/or columns of a 2-D array that contain
masked values.

The suppression behavior is selected with the `axis` parameter.

- If axis is None, both rows and columns are suppressed.
- If axis is 0, only rows are suppressed.
- If axis is 1 or -1, only columns are suppressed.

Parameters
----------
x : array_like, MaskedArray
    The array to operate on.  If not a MaskedArray instance (or if no array
    elements are masked), `x` is interpreted as a MaskedArray with
    `mask` set to `nomask`. Must be a 2D array.
axis : int, optional
    Axis along which to perform the operation. Default is None.

Returns
-------
compressed_array : ndarray
    The compressed array.

Examples
--------
>>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0],
...                                                   [1, 0, 0],
...                                                   [0, 0, 0]])
>>> x
masked_array(
  data=[[--, 1, 2],
        [--, 4, 5],
        [6, 7, 8]],
  mask=[[ True, False, False],
        [ True, False, False],
        [False, False, False]],
  fill_value=999999)

>>> np.ma.compress_rowcols(x)
array([[7, 8]])
>>> np.ma.compress_rowcols(x, 0)
array([[6, 7, 8]])
>>> np.ma.compress_rowcols(x, 1)
array([[1, 2],
       [4, 5],
       [7, 8]])

---
## compress_rows
```python
from extras import compress_rows
```

Suppress whole rows of a 2-D array that contain masked values.

This is equivalent to ``np.ma.compress_rowcols(a, 0)``, see
`compress_rowcols` for details.

See Also
--------
compress_rowcols

---
## compress_cols
```python
from extras import compress_cols
```

Suppress whole columns of a 2-D array that contain masked values.

This is equivalent to ``np.ma.compress_rowcols(a, 1)``, see
`compress_rowcols` for details.

See Also
--------
compress_rowcols

---
## mask_rowcols
```python
from extras import mask_rowcols
```

Mask rows and/or columns of a 2D array that contain masked values.

Mask whole rows and/or columns of a 2D array that contain
masked values.  The masking behavior is selected using the
`axis` parameter.

  - If `axis` is None, rows *and* columns are masked.
  - If `axis` is 0, only rows are masked.
  - If `axis` is 1 or -1, only columns are masked.

Parameters
----------
a : array_like, MaskedArray
    The array to mask.  If not a MaskedArray instance (or if no array
    elements are masked), the result is a MaskedArray with `mask` set
    to `nomask` (False). Must be a 2D array.
axis : int, optional
    Axis along which to perform the operation. If None, applies to a
    flattened version of the array.

Returns
-------
a : MaskedArray
    A modified version of the input array, masked depending on the value
    of the `axis` parameter.

Raises
------
NotImplementedError
    If input array `a` is not 2D.

See Also
--------
mask_rows : Mask rows of a 2D array that contain masked values.
mask_cols : Mask cols of a 2D array that contain masked values.
masked_where : Mask where a condition is met.

Notes
-----
The input array's mask is modified by this function.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.zeros((3, 3), dtype=int)
>>> a[1, 1] = 1
>>> a
array([[0, 0, 0],
       [0, 1, 0],
       [0, 0, 0]])
>>> a = ma.masked_equal(a, 1)
>>> a
masked_array(
  data=[[0, 0, 0],
        [0, --, 0],
        [0, 0, 0]],
  mask=[[False, False, False],
        [False,  True, False],
        [False, False, False]],
  fill_value=1)
>>> ma.mask_rowcols(a)
masked_array(
  data=[[0, --, 0],
        [--, --, --],
        [0, --, 0]],
  mask=[[False,  True, False],
        [ True,  True,  True],
        [False,  True, False]],
  fill_value=1)

---
## mask_rows
```python
from extras import mask_rows
```

Mask rows of a 2D array that contain masked values.

This function is a shortcut to ``mask_rowcols`` with `axis` equal to 0.

See Also
--------
mask_rowcols : Mask rows and/or columns of a 2D array.
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.zeros((3, 3), dtype=int)
>>> a[1, 1] = 1
>>> a
array([[0, 0, 0],
       [0, 1, 0],
       [0, 0, 0]])
>>> a = ma.masked_equal(a, 1)
>>> a
masked_array(
  data=[[0, 0, 0],
        [0, --, 0],
        [0, 0, 0]],
  mask=[[False, False, False],
        [False,  True, False],
        [False, False, False]],
  fill_value=1)

>>> ma.mask_rows(a)
masked_array(
  data=[[0, 0, 0],
        [--, --, --],
        [0, 0, 0]],
  mask=[[False, False, False],
        [ True,  True,  True],
        [False, False, False]],
  fill_value=1)

---
## mask_cols
```python
from extras import mask_cols
```

Mask columns of a 2D array that contain masked values.

This function is a shortcut to ``mask_rowcols`` with `axis` equal to 1.

See Also
--------
mask_rowcols : Mask rows and/or columns of a 2D array.
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.zeros((3, 3), dtype=int)
>>> a[1, 1] = 1
>>> a
array([[0, 0, 0],
       [0, 1, 0],
       [0, 0, 0]])
>>> a = ma.masked_equal(a, 1)
>>> a
masked_array(
  data=[[0, 0, 0],
        [0, --, 0],
        [0, 0, 0]],
  mask=[[False, False, False],
        [False,  True, False],
        [False, False, False]],
  fill_value=1)
>>> ma.mask_cols(a)
masked_array(
  data=[[0, --, 0],
        [0, --, 0],
        [0, --, 0]],
  mask=[[False,  True, False],
        [False,  True, False],
        [False,  True, False]],
  fill_value=1)

---
## ediff1d
```python
from extras import ediff1d
```

Compute the differences between consecutive elements of an array.

This function is the equivalent of `numpy.ediff1d` that takes masked
values into account, see `numpy.ediff1d` for details.

See Also
--------
numpy.ediff1d : Equivalent function for ndarrays.

---
## unique
```python
from extras import unique
```

Finds the unique elements of an array.

Masked values are considered the same element (masked). The output array
is always a masked array. See `numpy.unique` for more details.

See Also
--------
numpy.unique : Equivalent function for ndarrays.

Examples
--------
>>> import numpy.ma as ma
>>> a = [1, 2, 1000, 2, 3]
>>> mask = [0, 0, 1, 0, 0]
>>> masked_a = ma.masked_array(a, mask)
>>> masked_a
masked_array(data=[1, 2, --, 2, 3],
            mask=[False, False,  True, False, False],
    fill_value=999999)
>>> ma.unique(masked_a)
masked_array(data=[1, 2, 3, --],
            mask=[False, False, False,  True],
    fill_value=999999)
>>> ma.unique(masked_a, return_index=True)
(masked_array(data=[1, 2, 3, --],
            mask=[False, False, False,  True],
    fill_value=999999), array([0, 1, 4, 2]))
>>> ma.unique(masked_a, return_inverse=True)
(masked_array(data=[1, 2, 3, --],
            mask=[False, False, False,  True],
    fill_value=999999), array([0, 1, 3, 1, 2]))
>>> ma.unique(masked_a, return_index=True, return_inverse=True)
(masked_array(data=[1, 2, 3, --],
            mask=[False, False, False,  True],
    fill_value=999999), array([0, 1, 4, 2]), array([0, 1, 3, 1, 2]))

---
## intersect1d
```python
from extras import intersect1d
```

Returns the unique elements common to both arrays.

Masked values are considered equal one to the other.
The output is always a masked array.

See `numpy.intersect1d` for more details.

See Also
--------
numpy.intersect1d : Equivalent function for ndarrays.

Examples
--------
>>> x = np.ma.array([1, 3, 3, 3], mask=[0, 0, 0, 1])
>>> y = np.ma.array([3, 1, 1, 1], mask=[0, 0, 0, 1])
>>> np.ma.intersect1d(x, y)
masked_array(data=[1, 3, --],
             mask=[False, False,  True],
       fill_value=999999)

---
## setxor1d
```python
from extras import setxor1d
```

Set exclusive-or of 1-D arrays with unique elements.

The output is always a masked array. See `numpy.setxor1d` for more details.

See Also
--------
numpy.setxor1d : Equivalent function for ndarrays.

---
## in1d
```python
from extras import in1d
```

Test whether each element of an array is also present in a second
array.

The output is always a masked array. See `numpy.in1d` for more details.

We recommend using :func:`isin` instead of `in1d` for new code.

See Also
--------
isin       : Version of this function that preserves the shape of ar1.
numpy.in1d : Equivalent function for ndarrays.

Notes
-----
.. versionadded:: 1.4.0

---
## isin
```python
from extras import isin
```

Calculates `element in test_elements`, broadcasting over
`element` only.

The output is always a masked array of the same shape as `element`.
See `numpy.isin` for more details.

See Also
--------
in1d       : Flattened version of this function.
numpy.isin : Equivalent function for ndarrays.

Notes
-----
.. versionadded:: 1.13.0

---
## union1d
```python
from extras import union1d
```

Union of two arrays.

The output is always a masked array. See `numpy.union1d` for more details.

See Also
--------
numpy.union1d : Equivalent function for ndarrays.

---
## setdiff1d
```python
from extras import setdiff1d
```

Set difference of 1D arrays with unique elements.

The output is always a masked array. See `numpy.setdiff1d` for more
details.

See Also
--------
numpy.setdiff1d : Equivalent function for ndarrays.

Examples
--------
>>> x = np.ma.array([1, 2, 3, 4], mask=[0, 1, 0, 1])
>>> np.ma.setdiff1d(x, [1, 2])
masked_array(data=[3, --],
             mask=[False,  True],
       fill_value=999999)

---
## _covhelper
```python
from extras import _covhelper
```

Private function for the computation of covariance and correlation
coefficients.

---
## cov
```python
from extras import cov
```

Estimate the covariance matrix.

Except for the handling of missing data this function does the same as
`numpy.cov`. For more details and examples, see `numpy.cov`.

By default, masked values are recognized as such. If `x` and `y` have the
same shape, a common mask is allocated: if ``x[i,j]`` is masked, then
``y[i,j]`` will also be masked.
Setting `allow_masked` to False will raise an exception if values are
missing in either of the input arrays.

Parameters
----------
x : array_like
    A 1-D or 2-D array containing multiple variables and observations.
    Each row of `x` represents a variable, and each column a single
    observation of all those variables. Also see `rowvar` below.
y : array_like, optional
    An additional set of variables and observations. `y` has the same
    shape as `x`.
rowvar : bool, optional
    If `rowvar` is True (default), then each row represents a
    variable, with observations in the columns. Otherwise, the relationship
    is transposed: each column represents a variable, while the rows
    contain observations.
bias : bool, optional
    Default normalization (False) is by ``(N-1)``, where ``N`` is the
    number of observations given (unbiased estimate). If `bias` is True,
    then normalization is by ``N``. This keyword can be overridden by
    the keyword ``ddof`` in numpy versions >= 1.5.
allow_masked : bool, optional
    If True, masked values are propagated pair-wise: if a value is masked
    in `x`, the corresponding value is masked in `y`.
    If False, raises a `ValueError` exception when some values are missing.
ddof : {None, int}, optional
    If not ``None`` normalization is by ``(N - ddof)``, where ``N`` is
    the number of observations; this overrides the value implied by
    ``bias``. The default value is ``None``.

    .. versionadded:: 1.5

Raises
------
ValueError
    Raised if some values are missing and `allow_masked` is False.

See Also
--------
numpy.cov

---
## corrcoef
```python
from extras import corrcoef
```

Return Pearson product-moment correlation coefficients.

Except for the handling of missing data this function does the same as
`numpy.corrcoef`. For more details and examples, see `numpy.corrcoef`.

Parameters
----------
x : array_like
    A 1-D or 2-D array containing multiple variables and observations.
    Each row of `x` represents a variable, and each column a single
    observation of all those variables. Also see `rowvar` below.
y : array_like, optional
    An additional set of variables and observations. `y` has the same
    shape as `x`.
rowvar : bool, optional
    If `rowvar` is True (default), then each row represents a
    variable, with observations in the columns. Otherwise, the relationship
    is transposed: each column represents a variable, while the rows
    contain observations.
bias : _NoValue, optional
    Has no effect, do not use.

    .. deprecated:: 1.10.0
allow_masked : bool, optional
    If True, masked values are propagated pair-wise: if a value is masked
    in `x`, the corresponding value is masked in `y`.
    If False, raises an exception.  Because `bias` is deprecated, this
    argument needs to be treated as keyword only to avoid a warning.
ddof : _NoValue, optional
    Has no effect, do not use.

    .. deprecated:: 1.10.0

See Also
--------
numpy.corrcoef : Equivalent function in top-level NumPy module.
cov : Estimate the covariance matrix.

Notes
-----
This function accepts but discards arguments `bias` and `ddof`.  This is
for backwards compatibility with previous versions of this function.  These
arguments had no effect on the return values of the function and can be
safely ignored in this and previous versions of numpy.

---
## MAxisConcatenator
```python
from extras import MAxisConcatenator
```

Translate slice objects to concatenation along an axis.

For documentation on usage, see `mr_class`.

See Also
--------
mr_class

---
## mr_class
```python
from extras import mr_class
```

Translate slice objects to concatenation along the first axis.

This is the masked array version of `lib.index_tricks.RClass`.

See Also
--------
lib.index_tricks.RClass

Examples
--------
>>> np.ma.mr_[np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6])]
masked_array(data=[1, 2, 3, ..., 4, 5, 6],
             mask=False,
       fill_value=999999)

---
## ndenumerate
```python
from extras import ndenumerate
```

Multidimensional index iterator.

Return an iterator yielding pairs of array coordinates and values,
skipping elements that are masked. With `compressed=False`,
`ma.masked` is yielded as the value of masked elements. This
behavior differs from that of `numpy.ndenumerate`, which yields the
value of the underlying data array.

Notes
-----
.. versionadded:: 1.23.0

Parameters
----------
a : array_like
    An array with (possibly) masked elements.
compressed : bool, optional
    If True (default), masked elements are skipped.

See Also
--------
numpy.ndenumerate : Equivalent function ignoring any mask.

Examples
--------
>>> a = np.ma.arange(9).reshape((3, 3))
>>> a[1, 0] = np.ma.masked
>>> a[1, 2] = np.ma.masked
>>> a[2, 1] = np.ma.masked
>>> a
masked_array(
  data=[[0, 1, 2],
        [--, 4, --],
        [6, --, 8]],
  mask=[[False, False, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> for index, x in np.ma.ndenumerate(a):
...     print(index, x)
(0, 0) 0
(0, 1) 1
(0, 2) 2
(1, 1) 4
(2, 0) 6
(2, 2) 8

>>> for index, x in np.ma.ndenumerate(a, compressed=False):
...     print(index, x)
(0, 0) 0
(0, 1) 1
(0, 2) 2
(1, 0) --
(1, 1) 4
(1, 2) --
(2, 0) 6
(2, 1) --
(2, 2) 8

---
## flatnotmasked_edges
```python
from extras import flatnotmasked_edges
```

Find the indices of the first and last unmasked values.

Expects a 1-D `MaskedArray`, returns None if all values are masked.

Parameters
----------
a : array_like
    Input 1-D `MaskedArray`

Returns
-------
edges : ndarray or None
    The indices of first and last non-masked value in the array.
    Returns None if all values are masked.

See Also
--------
flatnotmasked_contiguous, notmasked_contiguous, notmasked_edges
clump_masked, clump_unmasked

Notes
-----
Only accepts 1-D arrays.

Examples
--------
>>> a = np.ma.arange(10)
>>> np.ma.flatnotmasked_edges(a)
array([0, 9])

>>> mask = (a < 3) | (a > 8) | (a == 5)
>>> a[mask] = np.ma.masked
>>> np.array(a[~a.mask])
array([3, 4, 6, 7, 8])

>>> np.ma.flatnotmasked_edges(a)
array([3, 8])

>>> a[:] = np.ma.masked
>>> print(np.ma.flatnotmasked_edges(a))
None

---
## notmasked_edges
```python
from extras import notmasked_edges
```

Find the indices of the first and last unmasked values along an axis.

If all values are masked, return None.  Otherwise, return a list
of two tuples, corresponding to the indices of the first and last
unmasked values respectively.

Parameters
----------
a : array_like
    The input array.
axis : int, optional
    Axis along which to perform the operation.
    If None (default), applies to a flattened version of the array.

Returns
-------
edges : ndarray or list
    An array of start and end indexes if there are any masked data in
    the array. If there are no masked data in the array, `edges` is a
    list of the first and last index.

See Also
--------
flatnotmasked_contiguous, flatnotmasked_edges, notmasked_contiguous
clump_masked, clump_unmasked

Examples
--------
>>> a = np.arange(9).reshape((3, 3))
>>> m = np.zeros_like(a)
>>> m[1:, 1:] = 1

>>> am = np.ma.array(a, mask=m)
>>> np.array(am[~am.mask])
array([0, 1, 2, 3, 6])

>>> np.ma.notmasked_edges(am)
array([0, 6])

---
## flatnotmasked_contiguous
```python
from extras import flatnotmasked_contiguous
```

Find contiguous unmasked data in a masked array.

Parameters
----------
a : array_like
    The input array.

Returns
-------
slice_list : list
    A sorted sequence of `slice` objects (start index, end index).

    .. versionchanged:: 1.15.0
        Now returns an empty list instead of None for a fully masked array

See Also
--------
flatnotmasked_edges, notmasked_contiguous, notmasked_edges
clump_masked, clump_unmasked

Notes
-----
Only accepts 2-D arrays at most.

Examples
--------
>>> a = np.ma.arange(10)
>>> np.ma.flatnotmasked_contiguous(a)
[slice(0, 10, None)]

>>> mask = (a < 3) | (a > 8) | (a == 5)
>>> a[mask] = np.ma.masked
>>> np.array(a[~a.mask])
array([3, 4, 6, 7, 8])

>>> np.ma.flatnotmasked_contiguous(a)
[slice(3, 5, None), slice(6, 9, None)]
>>> a[:] = np.ma.masked
>>> np.ma.flatnotmasked_contiguous(a)
[]

---
## notmasked_contiguous
```python
from extras import notmasked_contiguous
```

Find contiguous unmasked data in a masked array along the given axis.

Parameters
----------
a : array_like
    The input array.
axis : int, optional
    Axis along which to perform the operation.
    If None (default), applies to a flattened version of the array, and this
    is the same as `flatnotmasked_contiguous`.

Returns
-------
endpoints : list
    A list of slices (start and end indexes) of unmasked indexes
    in the array.

    If the input is 2d and axis is specified, the result is a list of lists.

See Also
--------
flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges
clump_masked, clump_unmasked

Notes
-----
Only accepts 2-D arrays at most.

Examples
--------
>>> a = np.arange(12).reshape((3, 4))
>>> mask = np.zeros_like(a)
>>> mask[1:, :-1] = 1; mask[0, 1] = 1; mask[-1, 0] = 0
>>> ma = np.ma.array(a, mask=mask)
>>> ma
masked_array(
  data=[[0, --, 2, 3],
        [--, --, --, 7],
        [8, --, --, 11]],
  mask=[[False,  True, False, False],
        [ True,  True,  True, False],
        [False,  True,  True, False]],
  fill_value=999999)
>>> np.array(ma[~ma.mask])
array([ 0,  2,  3,  7, 8, 11])

>>> np.ma.notmasked_contiguous(ma)
[slice(0, 1, None), slice(2, 4, None), slice(7, 9, None), slice(11, 12, None)]

>>> np.ma.notmasked_contiguous(ma, axis=0)
[[slice(0, 1, None), slice(2, 3, None)], [], [slice(0, 1, None)], [slice(0, 3, None)]]

>>> np.ma.notmasked_contiguous(ma, axis=1)
[[slice(0, 1, None), slice(2, 4, None)], [slice(3, 4, None)], [slice(0, 1, None), slice(3, 4, None)]]

---
## _ezclump
```python
from extras import _ezclump
```

Finds the clumps (groups of data with the same values) for a 1D bool array.

Returns a series of slices.

---
## clump_unmasked
```python
from extras import clump_unmasked
```

Return list of slices corresponding to the unmasked clumps of a 1-D array.
(A "clump" is defined as a contiguous region of the array).

Parameters
----------
a : ndarray
    A one-dimensional masked array.

Returns
-------
slices : list of slice
    The list of slices, one for each continuous region of unmasked
    elements in `a`.

Notes
-----
.. versionadded:: 1.4.0

See Also
--------
flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges
notmasked_contiguous, clump_masked

Examples
--------
>>> a = np.ma.masked_array(np.arange(10))
>>> a[[0, 1, 2, 6, 8, 9]] = np.ma.masked
>>> np.ma.clump_unmasked(a)
[slice(3, 6, None), slice(7, 8, None)]

---
## clump_masked
```python
from extras import clump_masked
```

Returns a list of slices corresponding to the masked clumps of a 1-D array.
(A "clump" is defined as a contiguous region of the array).

Parameters
----------
a : ndarray
    A one-dimensional masked array.

Returns
-------
slices : list of slice
    The list of slices, one for each continuous region of masked elements
    in `a`.

Notes
-----
.. versionadded:: 1.4.0

See Also
--------
flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges
notmasked_contiguous, clump_unmasked

Examples
--------
>>> a = np.ma.masked_array(np.arange(10))
>>> a[[0, 1, 2, 6, 8, 9]] = np.ma.masked
>>> np.ma.clump_masked(a)
[slice(0, 3, None), slice(6, 7, None), slice(8, 10, None)]

---
## vander
```python
from extras import vander
```

Masked values in the input array result in rows of zeros.

---
## polyfit
```python
from extras import polyfit
```

Any masked values in x is propagated in y, and vice-versa.

---
## __init__
```python
from extras import __init__
```



---
## getdoc
```python
from extras import getdoc
```

Retrieve the docstring and signature from the function.

The ``__doc__`` attribute of the function is used as the docstring for
the new masked array version of the function. A note on application
of the function to the mask is appended.

Parameters
----------
None

---
## __call__
```python
from extras import __call__
```



---
## replace_masked
```python
from extras import replace_masked
```



---
## makemat
```python
from extras import makemat
```



---
## __getitem__
```python
from extras import __getitem__
```



---
## __name__
```python
from testutils import __name__
```

Miscellaneous functions for testing masked arrays and subclasses

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: testutils.py 3529 2007-11-13 08:01:14Z jarrod.millman $

---
## approx
```python
from testutils import approx
```

Returns true if all components of a and b are equal to given tolerances.

If fill_value is True, masked values considered equal. Otherwise,
masked values are considered unequal.  The relative error rtol should
be positive and << 1.0 The absolute error atol comes into play for
those elements of b that are very small or zero; it says how small a
must be also.

---
## almost
```python
from testutils import almost
```

Returns True if a and b are equal up to decimal places.

If fill_value is True, masked values considered equal. Otherwise,
masked values are considered unequal.

---
## _assert_equal_on_sequences
```python
from testutils import _assert_equal_on_sequences
```

Asserts the equality of two non-array sequences.

---
## assert_equal_records
```python
from testutils import assert_equal_records
```

Asserts that two records are equal.

Pretty crude for now.

---
## assert_equal
```python
from testutils import assert_equal
```

Asserts that two items are equal.

---
## fail_if_equal
```python
from testutils import fail_if_equal
```

Raises an assertion error if two items are equal.

---
## assert_almost_equal
```python
from testutils import assert_almost_equal
```

Asserts that two items are almost equal.

The test is equivalent to abs(desired-actual) < 0.5 * 10**(-decimal).

---
## assert_array_compare
```python
from testutils import assert_array_compare
```

Asserts that comparison between two masked arrays is satisfied.

The comparison is elementwise.

---
## assert_array_equal
```python
from testutils import assert_array_equal
```

Checks the elementwise equality of two masked arrays.

---
## fail_if_array_equal
```python
from testutils import fail_if_array_equal
```

Raises an assertion error if two masked arrays are not equal elementwise.

---
## assert_array_approx_equal
```python
from testutils import assert_array_approx_equal
```

Checks the equality of two masked arrays, up to given number odecimals.

The equality is checked elementwise.

---
## assert_array_almost_equal
```python
from testutils import assert_array_almost_equal
```

Checks the equality of two masked arrays, up to given number odecimals.

The equality is checked elementwise.

---
## assert_array_less
```python
from testutils import assert_array_less
```

Checks that x is smaller than y elementwise.

---
## assert_mask_equal
```python
from testutils import assert_mask_equal
```

Asserts the equality of two masks.

---
## compare
```python
from testutils import compare
```

Returns the result of the loose comparison between x and y).

---
## MaskedArrayFutureWarning
```python
from core import MaskedArrayFutureWarning
```



---
## _deprecate_argsort_axis
```python
from core import _deprecate_argsort_axis
```

Adjust the axis passed to argsort, warning if necessary

Parameters
----------
arr
    The array which argsort was called on

np.ma.argsort has a long-term bug where the default of the axis argument
is wrong (gh-8701), which now must be kept for backwards compatibility.
Thankfully, this only makes a difference when arrays are 2- or more-
dimensional, so we only need a warning then.

---
## doc_note
```python
from core import doc_note
```

Adds a Notes section to an existing docstring.

---
## get_object_signature
```python
from core import get_object_signature
```

Get the signature from obj

---
## MAError
```python
from core import MAError
```

Class for masked array related errors.

---
## MaskError
```python
from core import MaskError
```

Class for mask related errors.

---
## _recursive_fill_value
```python
from core import _recursive_fill_value
```

Recursively produce a fill value for `dtype`, calling f on scalar dtypes

---
## _get_dtype_of
```python
from core import _get_dtype_of
```

Convert the argument for *_fill_value into a dtype 

---
## default_fill_value
```python
from core import default_fill_value
```

Return the default fill value for the argument object.

The default filling value depends on the datatype of the input
array or the type of the input scalar:

   ========  ========
   datatype  default
   ========  ========
   bool      True
   int       999999
   float     1.e20
   complex   1.e20+0j
   object    '?'
   string    'N/A'
   ========  ========

For structured types, a structured scalar is returned, with each field the
default fill value for its type.

For subarray types, the fill value is an array of the same size containing
the default scalar fill value.

Parameters
----------
obj : ndarray, dtype or scalar
    The array data-type or scalar for which the default fill value
    is returned.

Returns
-------
fill_value : scalar
    The default fill value.

Examples
--------
>>> np.ma.default_fill_value(1)
999999
>>> np.ma.default_fill_value(np.array([1.1, 2., np.pi]))
1e+20
>>> np.ma.default_fill_value(np.dtype(complex))
(1e+20+0j)

---
## _extremum_fill_value
```python
from core import _extremum_fill_value
```



---
## minimum_fill_value
```python
from core import minimum_fill_value
```

Return the maximum value that can be represented by the dtype of an object.

This function is useful for calculating a fill value suitable for
taking the minimum of an array with a given dtype.

Parameters
----------
obj : ndarray, dtype or scalar
    An object that can be queried for it's numeric type.

Returns
-------
val : scalar
    The maximum representable value.

Raises
------
TypeError
    If `obj` isn't a suitable numeric type.

See Also
--------
maximum_fill_value : The inverse function.
set_fill_value : Set the filling value of a masked array.
MaskedArray.fill_value : Return current fill value.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.int8()
>>> ma.minimum_fill_value(a)
127
>>> a = np.int32()
>>> ma.minimum_fill_value(a)
2147483647

An array of numeric data can also be passed.

>>> a = np.array([1, 2, 3], dtype=np.int8)
>>> ma.minimum_fill_value(a)
127
>>> a = np.array([1, 2, 3], dtype=np.float32)
>>> ma.minimum_fill_value(a)
inf

---
## maximum_fill_value
```python
from core import maximum_fill_value
```

Return the minimum value that can be represented by the dtype of an object.

This function is useful for calculating a fill value suitable for
taking the maximum of an array with a given dtype.

Parameters
----------
obj : ndarray, dtype or scalar
    An object that can be queried for it's numeric type.

Returns
-------
val : scalar
    The minimum representable value.

Raises
------
TypeError
    If `obj` isn't a suitable numeric type.

See Also
--------
minimum_fill_value : The inverse function.
set_fill_value : Set the filling value of a masked array.
MaskedArray.fill_value : Return current fill value.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.int8()
>>> ma.maximum_fill_value(a)
-128
>>> a = np.int32()
>>> ma.maximum_fill_value(a)
-2147483648

An array of numeric data can also be passed.

>>> a = np.array([1, 2, 3], dtype=np.int8)
>>> ma.maximum_fill_value(a)
-128
>>> a = np.array([1, 2, 3], dtype=np.float32)
>>> ma.maximum_fill_value(a)
-inf

---
## _recursive_set_fill_value
```python
from core import _recursive_set_fill_value
```

Create a fill value for a structured dtype.

Parameters
----------
fillvalue : scalar or array_like
    Scalar or array representing the fill value. If it is of shorter
    length than the number of fields in dt, it will be resized.
dt : dtype
    The structured dtype for which to create the fill value.

Returns
-------
val : tuple
    A tuple of values corresponding to the structured fill value.

---
## _check_fill_value
```python
from core import _check_fill_value
```

Private function validating the given `fill_value` for the given dtype.

If fill_value is None, it is set to the default corresponding to the dtype.

If fill_value is not None, its value is forced to the given dtype.

The result is always a 0d array.

---
## set_fill_value
```python
from core import set_fill_value
```

Set the filling value of a, if a is a masked array.

This function changes the fill value of the masked array `a` in place.
If `a` is not a masked array, the function returns silently, without
doing anything.

Parameters
----------
a : array_like
    Input array.
fill_value : dtype
    Filling value. A consistency test is performed to make sure
    the value is compatible with the dtype of `a`.

Returns
-------
None
    Nothing returned by this function.

See Also
--------
maximum_fill_value : Return the default fill value for a dtype.
MaskedArray.fill_value : Return current fill value.
MaskedArray.set_fill_value : Equivalent method.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(5)
>>> a
array([0, 1, 2, 3, 4])
>>> a = ma.masked_where(a < 3, a)
>>> a
masked_array(data=[--, --, --, 3, 4],
             mask=[ True,  True,  True, False, False],
       fill_value=999999)
>>> ma.set_fill_value(a, -999)
>>> a
masked_array(data=[--, --, --, 3, 4],
             mask=[ True,  True,  True, False, False],
       fill_value=-999)

Nothing happens if `a` is not a masked array.

>>> a = list(range(5))
>>> a
[0, 1, 2, 3, 4]
>>> ma.set_fill_value(a, 100)
>>> a
[0, 1, 2, 3, 4]
>>> a = np.arange(5)
>>> a
array([0, 1, 2, 3, 4])
>>> ma.set_fill_value(a, 100)
>>> a
array([0, 1, 2, 3, 4])

---
## get_fill_value
```python
from core import get_fill_value
```

Return the filling value of a, if any.  Otherwise, returns the
default filling value for that type.

---
## common_fill_value
```python
from core import common_fill_value
```

Return the common filling value of two masked arrays, if any.

If ``a.fill_value == b.fill_value``, return the fill value,
otherwise return None.

Parameters
----------
a, b : MaskedArray
    The masked arrays for which to compare fill values.

Returns
-------
fill_value : scalar or None
    The common fill value, or None.

Examples
--------
>>> x = np.ma.array([0, 1.], fill_value=3)
>>> y = np.ma.array([0, 1.], fill_value=3)
>>> np.ma.common_fill_value(x, y)
3.0

---
## filled
```python
from core import filled
```

Return a copy with masked fields filled with a given value.

Parameters
----------
fill_value : array_like, optional
    The value to use for invalid entries. Can be scalar or
    non-scalar. If latter is the case, the filled array should
    be broadcastable over input array. Default is None, in
    which case the `fill_value` attribute is used instead.

Returns
-------
filled_void
    A `np.void` object

See Also
--------
MaskedArray.filled

---
## get_masked_subclass
```python
from core import get_masked_subclass
```

Return the youngest subclass of MaskedArray from a list of (masked) arrays.

In case of siblings, the first listed takes over.

---
## getdata
```python
from core import getdata
```

Return the data of a masked array as an ndarray.

Return the data of `a` (if any) as an ndarray if `a` is a ``MaskedArray``,
else return `a` as a ndarray or subclass (depending on `subok`) if not.

Parameters
----------
a : array_like
    Input ``MaskedArray``, alternatively a ndarray or a subclass thereof.
subok : bool
    Whether to force the output to be a `pure` ndarray (False) or to
    return a subclass of ndarray if appropriate (True, default).

See Also
--------
getmask : Return the mask of a masked array, or nomask.
getmaskarray : Return the mask of a masked array, or full array of False.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
masked_array(
  data=[[1, --],
        [3, 4]],
  mask=[[False,  True],
        [False, False]],
  fill_value=2)
>>> ma.getdata(a)
array([[1, 2],
       [3, 4]])

Equivalently use the ``MaskedArray`` `data` attribute.

>>> a.data
array([[1, 2],
       [3, 4]])

---
## fix_invalid
```python
from core import fix_invalid
```

Return input with invalid data masked and replaced by a fill value.

Invalid data means values of `nan`, `inf`, etc.

Parameters
----------
a : array_like
    Input array, a (subclass of) ndarray.
mask : sequence, optional
    Mask. Must be convertible to an array of booleans with the same
    shape as `data`. True indicates a masked (i.e. invalid) data.
copy : bool, optional
    Whether to use a copy of `a` (True) or to fix `a` in place (False).
    Default is True.
fill_value : scalar, optional
    Value used for fixing invalid data. Default is None, in which case
    the ``a.fill_value`` is used.

Returns
-------
b : MaskedArray
    The input array with invalid entries fixed.

Notes
-----
A copy is performed by default.

Examples
--------
>>> x = np.ma.array([1., -1, np.nan, np.inf], mask=[1] + [0]*3)
>>> x
masked_array(data=[--, -1.0, nan, inf],
             mask=[ True, False, False, False],
       fill_value=1e+20)
>>> np.ma.fix_invalid(x)
masked_array(data=[--, -1.0, --, --],
             mask=[ True, False,  True,  True],
       fill_value=1e+20)

>>> fixed = np.ma.fix_invalid(x)
>>> fixed.data
array([ 1.e+00, -1.e+00,  1.e+20,  1.e+20])
>>> x.data
array([ 1., -1., nan, inf])

---
## is_string_or_list_of_strings
```python
from core import is_string_or_list_of_strings
```



---
## _DomainCheckInterval
```python
from core import _DomainCheckInterval
```

Define a valid interval, so that :

``domain_check_interval(a,b)(x) == True`` where
``x < a`` or ``x > b``.

---
## _DomainTan
```python
from core import _DomainTan
```

Define a valid interval for the `tan` function, so that:

``domain_tan(eps) = True`` where ``abs(cos(x)) < eps``

---
## _DomainSafeDivide
```python
from core import _DomainSafeDivide
```

Define a domain for safe division.

---
## _DomainGreater
```python
from core import _DomainGreater
```

DomainGreater(v)(x) is True where x <= v.

---
## _DomainGreaterEqual
```python
from core import _DomainGreaterEqual
```

DomainGreaterEqual(v)(x) is True where x < v.

---
## _MaskedUFunc
```python
from core import _MaskedUFunc
```



---
## _MaskedUnaryOperation
```python
from core import _MaskedUnaryOperation
```

Defines masked version of unary operations, where invalid values are
pre-masked.

Parameters
----------
mufunc : callable
    The function for which to define a masked version. Made available
    as ``_MaskedUnaryOperation.f``.
fill : scalar, optional
    Filling value, default is 0.
domain : class instance
    Domain for the function. Should be one of the ``_Domain*``
    classes. Default is None.

---
## _MaskedBinaryOperation
```python
from core import _MaskedBinaryOperation
```

Define masked version of binary operations, where invalid
values are pre-masked.

Parameters
----------
mbfunc : function
    The function for which to define a masked version. Made available
    as ``_MaskedBinaryOperation.f``.
domain : class instance
    Default domain for the function. Should be one of the ``_Domain*``
    classes. Default is None.
fillx : scalar, optional
    Filling value for the first argument, default is 0.
filly : scalar, optional
    Filling value for the second argument, default is 0.

---
## _DomainedBinaryOperation
```python
from core import _DomainedBinaryOperation
```

Define binary operations that have a domain, like divide.

They have no reduce, outer or accumulate.

Parameters
----------
mbfunc : function
    The function for which to define a masked version. Made available
    as ``_DomainedBinaryOperation.f``.
domain : class instance
    Default domain for the function. Should be one of the ``_Domain*``
    classes.
fillx : scalar, optional
    Filling value for the first argument, default is 0.
filly : scalar, optional
    Filling value for the second argument, default is 0.

---
## _replace_dtype_fields_recursive
```python
from core import _replace_dtype_fields_recursive
```

Private function allowing recursion in _replace_dtype_fields.

---
## _replace_dtype_fields
```python
from core import _replace_dtype_fields
```

Construct a dtype description list from a given dtype.

Returns a new dtype object, with all fields and subtypes in the given type
recursively replaced with `primitive_dtype`.

Arguments are coerced to dtypes first.

---
## make_mask_descr
```python
from core import make_mask_descr
```

Construct a dtype description list from a given dtype.

Returns a new dtype object, with the type of all fields in `ndtype` to a
boolean type. Field names are not altered.

Parameters
----------
ndtype : dtype
    The dtype to convert.

Returns
-------
result : dtype
    A dtype that looks like `ndtype`, the type of all fields is boolean.

Examples
--------
>>> import numpy.ma as ma
>>> dtype = np.dtype({'names':['foo', 'bar'],
...                   'formats':[np.float32, np.int64]})
>>> dtype
dtype([('foo', '<f4'), ('bar', '<i8')])
>>> ma.make_mask_descr(dtype)
dtype([('foo', '|b1'), ('bar', '|b1')])
>>> ma.make_mask_descr(np.float32)
dtype('bool')

---
## getmask
```python
from core import getmask
```

Return the mask of a masked array, or nomask.

Return the mask of `a` as an ndarray if `a` is a `MaskedArray` and the
mask is not `nomask`, else return `nomask`. To guarantee a full array
of booleans of the same shape as a, use `getmaskarray`.

Parameters
----------
a : array_like
    Input `MaskedArray` for which the mask is required.

See Also
--------
getdata : Return the data of a masked array as an ndarray.
getmaskarray : Return the mask of a masked array, or full array of False.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
masked_array(
  data=[[1, --],
        [3, 4]],
  mask=[[False,  True],
        [False, False]],
  fill_value=2)
>>> ma.getmask(a)
array([[False,  True],
       [False, False]])

Equivalently use the `MaskedArray` `mask` attribute.

>>> a.mask
array([[False,  True],
       [False, False]])

Result when mask == `nomask`

>>> b = ma.masked_array([[1,2],[3,4]])
>>> b
masked_array(
  data=[[1, 2],
        [3, 4]],
  mask=False,
  fill_value=999999)
>>> ma.nomask
False
>>> ma.getmask(b) == ma.nomask
True
>>> b.mask == ma.nomask
True

---
## getmaskarray
```python
from core import getmaskarray
```

Return the mask of a masked array, or full boolean array of False.

Return the mask of `arr` as an ndarray if `arr` is a `MaskedArray` and
the mask is not `nomask`, else return a full boolean array of False of
the same shape as `arr`.

Parameters
----------
arr : array_like
    Input `MaskedArray` for which the mask is required.

See Also
--------
getmask : Return the mask of a masked array, or nomask.
getdata : Return the data of a masked array as an ndarray.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
masked_array(
  data=[[1, --],
        [3, 4]],
  mask=[[False,  True],
        [False, False]],
  fill_value=2)
>>> ma.getmaskarray(a)
array([[False,  True],
       [False, False]])

Result when mask == ``nomask``

>>> b = ma.masked_array([[1,2],[3,4]])
>>> b
masked_array(
  data=[[1, 2],
        [3, 4]],
  mask=False,
  fill_value=999999)
>>> ma.getmaskarray(b)
array([[False, False],
       [False, False]])

---
## is_mask
```python
from core import is_mask
```

Return True if m is a valid, standard mask.

This function does not check the contents of the input, only that the
type is MaskType. In particular, this function returns False if the
mask has a flexible dtype.

Parameters
----------
m : array_like
    Array to test.

Returns
-------
result : bool
    True if `m.dtype.type` is MaskType, False otherwise.

See Also
--------
ma.isMaskedArray : Test whether input is an instance of MaskedArray.

Examples
--------
>>> import numpy.ma as ma
>>> m = ma.masked_equal([0, 1, 0, 2, 3], 0)
>>> m
masked_array(data=[--, 1, --, 2, 3],
             mask=[ True, False,  True, False, False],
       fill_value=0)
>>> ma.is_mask(m)
False
>>> ma.is_mask(m.mask)
True

Input must be an ndarray (or have similar attributes)
for it to be considered a valid mask.

>>> m = [False, True, False]
>>> ma.is_mask(m)
False
>>> m = np.array([False, True, False])
>>> m
array([False,  True, False])
>>> ma.is_mask(m)
True

Arrays with complex dtypes don't return True.

>>> dtype = np.dtype({'names':['monty', 'pithon'],
...                   'formats':[bool, bool]})
>>> dtype
dtype([('monty', '|b1'), ('pithon', '|b1')])
>>> m = np.array([(True, False), (False, True), (True, False)],
...              dtype=dtype)
>>> m
array([( True, False), (False,  True), ( True, False)],
      dtype=[('monty', '?'), ('pithon', '?')])
>>> ma.is_mask(m)
False

---
## _shrink_mask
```python
from core import _shrink_mask
```

Shrink a mask to nomask if possible

---
## make_mask
```python
from core import make_mask
```

Create a boolean mask from an array.

Return `m` as a boolean mask, creating a copy if necessary or requested.
The function can accept any sequence that is convertible to integers,
or ``nomask``.  Does not require that contents must be 0s and 1s, values
of 0 are interpreted as False, everything else as True.

Parameters
----------
m : array_like
    Potential mask.
copy : bool, optional
    Whether to return a copy of `m` (True) or `m` itself (False).
shrink : bool, optional
    Whether to shrink `m` to ``nomask`` if all its values are False.
dtype : dtype, optional
    Data-type of the output mask. By default, the output mask has a
    dtype of MaskType (bool). If the dtype is flexible, each field has
    a boolean dtype. This is ignored when `m` is ``nomask``, in which
    case ``nomask`` is always returned.

Returns
-------
result : ndarray
    A boolean mask derived from `m`.

Examples
--------
>>> import numpy.ma as ma
>>> m = [True, False, True, True]
>>> ma.make_mask(m)
array([ True, False,  True,  True])
>>> m = [1, 0, 1, 1]
>>> ma.make_mask(m)
array([ True, False,  True,  True])
>>> m = [1, 0, 2, -3]
>>> ma.make_mask(m)
array([ True, False,  True,  True])

Effect of the `shrink` parameter.

>>> m = np.zeros(4)
>>> m
array([0., 0., 0., 0.])
>>> ma.make_mask(m)
False
>>> ma.make_mask(m, shrink=False)
array([False, False, False, False])

Using a flexible `dtype`.

>>> m = [1, 0, 1, 1]
>>> n = [0, 1, 0, 0]
>>> arr = []
>>> for man, mouse in zip(m, n):
...     arr.append((man, mouse))
>>> arr
[(1, 0), (0, 1), (1, 0), (1, 0)]
>>> dtype = np.dtype({'names':['man', 'mouse'],
...                   'formats':[np.int64, np.int64]})
>>> arr = np.array(arr, dtype=dtype)
>>> arr
array([(1, 0), (0, 1), (1, 0), (1, 0)],
      dtype=[('man', '<i8'), ('mouse', '<i8')])
>>> ma.make_mask(arr, dtype=dtype)
array([(True, False), (False, True), (True, False), (True, False)],
      dtype=[('man', '|b1'), ('mouse', '|b1')])

---
## make_mask_none
```python
from core import make_mask_none
```

Return a boolean mask of the given shape, filled with False.

This function returns a boolean ndarray with all entries False, that can
be used in common mask manipulations. If a complex dtype is specified, the
type of each field is converted to a boolean type.

Parameters
----------
newshape : tuple
    A tuple indicating the shape of the mask.
dtype : {None, dtype}, optional
    If None, use a MaskType instance. Otherwise, use a new datatype with
    the same fields as `dtype`, converted to boolean types.

Returns
-------
result : ndarray
    An ndarray of appropriate shape and dtype, filled with False.

See Also
--------
make_mask : Create a boolean mask from an array.
make_mask_descr : Construct a dtype description list from a given dtype.

Examples
--------
>>> import numpy.ma as ma
>>> ma.make_mask_none((3,))
array([False, False, False])

Defining a more complex dtype.

>>> dtype = np.dtype({'names':['foo', 'bar'],
...                   'formats':[np.float32, np.int64]})
>>> dtype
dtype([('foo', '<f4'), ('bar', '<i8')])
>>> ma.make_mask_none((3,), dtype=dtype)
array([(False, False), (False, False), (False, False)],
      dtype=[('foo', '|b1'), ('bar', '|b1')])

---
## _recursive_mask_or
```python
from core import _recursive_mask_or
```



---
## mask_or
```python
from core import mask_or
```

Combine two masks with the ``logical_or`` operator.

The result may be a view on `m1` or `m2` if the other is `nomask`
(i.e. False).

Parameters
----------
m1, m2 : array_like
    Input masks.
copy : bool, optional
    If copy is False and one of the inputs is `nomask`, return a view
    of the other input mask. Defaults to False.
shrink : bool, optional
    Whether to shrink the output to `nomask` if all its values are
    False. Defaults to True.

Returns
-------
mask : output mask
    The result masks values that are masked in either `m1` or `m2`.

Raises
------
ValueError
    If `m1` and `m2` have different flexible dtypes.

Examples
--------
>>> m1 = np.ma.make_mask([0, 1, 1, 0])
>>> m2 = np.ma.make_mask([1, 0, 0, 0])
>>> np.ma.mask_or(m1, m2)
array([ True,  True,  True, False])

---
## flatten_mask
```python
from core import flatten_mask
```

Returns a completely flattened version of the mask, where nested fields
are collapsed.

Parameters
----------
mask : array_like
    Input array, which will be interpreted as booleans.

Returns
-------
flattened_mask : ndarray of bools
    The flattened input.

Examples
--------
>>> mask = np.array([0, 0, 1])
>>> np.ma.flatten_mask(mask)
array([False, False,  True])

>>> mask = np.array([(0, 0), (0, 1)], dtype=[('a', bool), ('b', bool)])
>>> np.ma.flatten_mask(mask)
array([False, False, False,  True])

>>> mdtype = [('a', bool), ('b', [('ba', bool), ('bb', bool)])]
>>> mask = np.array([(0, (0, 0)), (0, (0, 1))], dtype=mdtype)
>>> np.ma.flatten_mask(mask)
array([False, False, False, False, False,  True])

---
## _check_mask_axis
```python
from core import _check_mask_axis
```

Check whether there are masked values along the given axis

---
## masked_where
```python
from core import masked_where
```

Mask an array where a condition is met.

Return `a` as an array masked where `condition` is True.
Any masked values of `a` or `condition` are also masked in the output.

Parameters
----------
condition : array_like
    Masking condition.  When `condition` tests floating point values for
    equality, consider using ``masked_values`` instead.
a : array_like
    Array to mask.
copy : bool
    If True (default) make a copy of `a` in the result.  If False modify
    `a` in place and return a view.

Returns
-------
result : MaskedArray
    The result of masking `a` where `condition` is True.

See Also
--------
masked_values : Mask using floating point equality.
masked_equal : Mask where equal to a given value.
masked_not_equal : Mask where `not` equal to a given value.
masked_less_equal : Mask where less than or equal to a given value.
masked_greater_equal : Mask where greater than or equal to a given value.
masked_less : Mask where less than a given value.
masked_greater : Mask where greater than a given value.
masked_inside : Mask inside a given interval.
masked_outside : Mask outside a given interval.
masked_invalid : Mask invalid values (NaNs or infs).

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_where(a <= 2, a)
masked_array(data=[--, --, --, 3],
             mask=[ True,  True,  True, False],
       fill_value=999999)

Mask array `b` conditional on `a`.

>>> b = ['a', 'b', 'c', 'd']
>>> ma.masked_where(a == 2, b)
masked_array(data=['a', 'b', --, 'd'],
             mask=[False, False,  True, False],
       fill_value='N/A',
            dtype='<U1')

Effect of the `copy` argument.

>>> c = ma.masked_where(a <= 2, a)
>>> c
masked_array(data=[--, --, --, 3],
             mask=[ True,  True,  True, False],
       fill_value=999999)
>>> c[0] = 99
>>> c
masked_array(data=[99, --, --, 3],
             mask=[False,  True,  True, False],
       fill_value=999999)
>>> a
array([0, 1, 2, 3])
>>> c = ma.masked_where(a <= 2, a, copy=False)
>>> c[0] = 99
>>> c
masked_array(data=[99, --, --, 3],
             mask=[False,  True,  True, False],
       fill_value=999999)
>>> a
array([99,  1,  2,  3])

When `condition` or `a` contain masked values.

>>> a = np.arange(4)
>>> a = ma.masked_where(a == 2, a)
>>> a
masked_array(data=[0, 1, --, 3],
             mask=[False, False,  True, False],
       fill_value=999999)
>>> b = np.arange(4)
>>> b = ma.masked_where(b == 0, b)
>>> b
masked_array(data=[--, 1, 2, 3],
             mask=[ True, False, False, False],
       fill_value=999999)
>>> ma.masked_where(a == 3, b)
masked_array(data=[--, 1, --, --],
             mask=[ True, False,  True,  True],
       fill_value=999999)

---
## masked_greater
```python
from core import masked_greater
```

Mask an array where greater than a given value.

This function is a shortcut to ``masked_where``, with
`condition` = (x > value).

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_greater(a, 2)
masked_array(data=[0, 1, 2, --],
             mask=[False, False, False,  True],
       fill_value=999999)

---
## masked_greater_equal
```python
from core import masked_greater_equal
```

Mask an array where greater than or equal to a given value.

This function is a shortcut to ``masked_where``, with
`condition` = (x >= value).

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_greater_equal(a, 2)
masked_array(data=[0, 1, --, --],
             mask=[False, False,  True,  True],
       fill_value=999999)

---
## masked_less
```python
from core import masked_less
```

Mask an array where less than a given value.

This function is a shortcut to ``masked_where``, with
`condition` = (x < value).

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_less(a, 2)
masked_array(data=[--, --, 2, 3],
             mask=[ True,  True, False, False],
       fill_value=999999)

---
## masked_less_equal
```python
from core import masked_less_equal
```

Mask an array where less than or equal to a given value.

This function is a shortcut to ``masked_where``, with
`condition` = (x <= value).

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_less_equal(a, 2)
masked_array(data=[--, --, --, 3],
             mask=[ True,  True,  True, False],
       fill_value=999999)

---
## masked_not_equal
```python
from core import masked_not_equal
```

Mask an array where `not` equal to a given value.

This function is a shortcut to ``masked_where``, with
`condition` = (x != value).

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_not_equal(a, 2)
masked_array(data=[--, --, 2, --],
             mask=[ True,  True, False,  True],
       fill_value=999999)

---
## masked_equal
```python
from core import masked_equal
```

Mask an array where equal to a given value.

Return a MaskedArray, masked where the data in array `x` are
equal to `value`. The fill_value of the returned MaskedArray
is set to `value`.

For floating point arrays, consider using ``masked_values(x, value)``.

See Also
--------
masked_where : Mask where a condition is met.
masked_values : Mask using floating point equality.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(4)
>>> a
array([0, 1, 2, 3])
>>> ma.masked_equal(a, 2)
masked_array(data=[0, 1, --, 3],
             mask=[False, False,  True, False],
       fill_value=2)

---
## masked_inside
```python
from core import masked_inside
```

Mask an array inside a given interval.

Shortcut to ``masked_where``, where `condition` is True for `x` inside
the interval [v1,v2] (v1 <= x <= v2).  The boundaries `v1` and `v2`
can be given in either order.

See Also
--------
masked_where : Mask where a condition is met.

Notes
-----
The array `x` is prefilled with its filling value.

Examples
--------
>>> import numpy.ma as ma
>>> x = [0.31, 1.2, 0.01, 0.2, -0.4, -1.1]
>>> ma.masked_inside(x, -0.3, 0.3)
masked_array(data=[0.31, 1.2, --, --, -0.4, -1.1],
             mask=[False, False,  True,  True, False, False],
       fill_value=1e+20)

The order of `v1` and `v2` doesn't matter.

>>> ma.masked_inside(x, 0.3, -0.3)
masked_array(data=[0.31, 1.2, --, --, -0.4, -1.1],
             mask=[False, False,  True,  True, False, False],
       fill_value=1e+20)

---
## masked_outside
```python
from core import masked_outside
```

Mask an array outside a given interval.

Shortcut to ``masked_where``, where `condition` is True for `x` outside
the interval [v1,v2] (x < v1)|(x > v2).
The boundaries `v1` and `v2` can be given in either order.

See Also
--------
masked_where : Mask where a condition is met.

Notes
-----
The array `x` is prefilled with its filling value.

Examples
--------
>>> import numpy.ma as ma
>>> x = [0.31, 1.2, 0.01, 0.2, -0.4, -1.1]
>>> ma.masked_outside(x, -0.3, 0.3)
masked_array(data=[--, --, 0.01, 0.2, --, --],
             mask=[ True,  True, False, False,  True,  True],
       fill_value=1e+20)

The order of `v1` and `v2` doesn't matter.

>>> ma.masked_outside(x, 0.3, -0.3)
masked_array(data=[--, --, 0.01, 0.2, --, --],
             mask=[ True,  True, False, False,  True,  True],
       fill_value=1e+20)

---
## masked_object
```python
from core import masked_object
```

Mask the array `x` where the data are exactly equal to value.

This function is similar to `masked_values`, but only suitable
for object arrays: for floating point, use `masked_values` instead.

Parameters
----------
x : array_like
    Array to mask
value : object
    Comparison value
copy : {True, False}, optional
    Whether to return a copy of `x`.
shrink : {True, False}, optional
    Whether to collapse a mask full of False to nomask

Returns
-------
result : MaskedArray
    The result of masking `x` where equal to `value`.

See Also
--------
masked_where : Mask where a condition is met.
masked_equal : Mask where equal to a given value (integers).
masked_values : Mask using floating point equality.

Examples
--------
>>> import numpy.ma as ma
>>> food = np.array(['green_eggs', 'ham'], dtype=object)
>>> # don't eat spoiled food
>>> eat = ma.masked_object(food, 'green_eggs')
>>> eat
masked_array(data=[--, 'ham'],
             mask=[ True, False],
       fill_value='green_eggs',
            dtype=object)
>>> # plain ol` ham is boring
>>> fresh_food = np.array(['cheese', 'ham', 'pineapple'], dtype=object)
>>> eat = ma.masked_object(fresh_food, 'green_eggs')
>>> eat
masked_array(data=['cheese', 'ham', 'pineapple'],
             mask=False,
       fill_value='green_eggs',
            dtype=object)

Note that `mask` is set to ``nomask`` if possible.

>>> eat
masked_array(data=['cheese', 'ham', 'pineapple'],
             mask=False,
       fill_value='green_eggs',
            dtype=object)

---
## masked_values
```python
from core import masked_values
```

Mask using floating point equality.

Return a MaskedArray, masked where the data in array `x` are approximately
equal to `value`, determined using `isclose`. The default tolerances for
`masked_values` are the same as those for `isclose`.

For integer types, exact equality is used, in the same way as
`masked_equal`.

The fill_value is set to `value` and the mask is set to ``nomask`` if
possible.

Parameters
----------
x : array_like
    Array to mask.
value : float
    Masking value.
rtol, atol : float, optional
    Tolerance parameters passed on to `isclose`
copy : bool, optional
    Whether to return a copy of `x`.
shrink : bool, optional
    Whether to collapse a mask full of False to ``nomask``.

Returns
-------
result : MaskedArray
    The result of masking `x` where approximately equal to `value`.

See Also
--------
masked_where : Mask where a condition is met.
masked_equal : Mask where equal to a given value (integers).

Examples
--------
>>> import numpy.ma as ma
>>> x = np.array([1, 1.1, 2, 1.1, 3])
>>> ma.masked_values(x, 1.1)
masked_array(data=[1.0, --, 2.0, --, 3.0],
             mask=[False,  True, False,  True, False],
       fill_value=1.1)

Note that `mask` is set to ``nomask`` if possible.

>>> ma.masked_values(x, 2.1)
masked_array(data=[1. , 1.1, 2. , 1.1, 3. ],
             mask=False,
       fill_value=2.1)

Unlike `masked_equal`, `masked_values` can perform approximate equalities.

>>> ma.masked_values(x, 2.1, atol=1e-1)
masked_array(data=[1.0, 1.1, --, 1.1, 3.0],
             mask=[False, False,  True, False, False],
       fill_value=2.1)

---
## masked_invalid
```python
from core import masked_invalid
```

Mask an array where invalid values occur (NaNs or infs).

This function is a shortcut to ``masked_where``, with
`condition` = ~(np.isfinite(a)). Any pre-existing mask is conserved.
Only applies to arrays with a dtype where NaNs or infs make sense
(i.e. floating point types), but accepts any array_like object.

See Also
--------
masked_where : Mask where a condition is met.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.arange(5, dtype=float)
>>> a[2] = np.NaN
>>> a[3] = np.PINF
>>> a
array([ 0.,  1., nan, inf,  4.])
>>> ma.masked_invalid(a)
masked_array(data=[0.0, 1.0, --, --, 4.0],
             mask=[False, False,  True,  True, False],
       fill_value=1e+20)

---
## _MaskedPrintOption
```python
from core import _MaskedPrintOption
```

Handle the string used to represent missing data in a masked array.

---
## _recursive_printoption
```python
from core import _recursive_printoption
```

Puts printoptions in result where mask is True.

Private function allowing for recursion

---
## _recursive_filled
```python
from core import _recursive_filled
```

Recursively fill `a` with `fill_value`.

---
## flatten_structured_array
```python
from core import flatten_structured_array
```

Flatten a structured array.

The data type of the output is chosen such that it can represent all of the
(nested) fields.

Parameters
----------
a : structured array

Returns
-------
output : masked array or ndarray
    A flattened masked array if the input is a masked array, otherwise a
    standard ndarray.

Examples
--------
>>> ndtype = [('a', int), ('b', float)]
>>> a = np.array([(1, 1), (2, 2)], dtype=ndtype)
>>> np.ma.flatten_structured_array(a)
array([[1., 1.],
       [2., 2.]])

---
## _arraymethod
```python
from core import _arraymethod
```

Return a class method wrapper around a basic array method.

Creates a class method which returns a masked array, where the new
``_data`` array is the output of the corresponding basic method called
on the original ``_data``.

If `onmask` is True, the new mask is the output of the method called
on the initial mask. Otherwise, the new mask is just a reference
to the initial mask.

Parameters
----------
funcname : str
    Name of the function to apply on data.
onmask : bool
    Whether the mask must be processed also (True) or left
    alone (False). Default is True. Make available as `_onmask`
    attribute.

Returns
-------
method : instancemethod
    Class method wrapper of the specified basic array method.

---
## MaskedIterator
```python
from core import MaskedIterator
```

Flat iterator object to iterate over masked arrays.

A `MaskedIterator` iterator is returned by ``x.flat`` for any masked array
`x`. It allows iterating over the array as if it were a 1-D array,
either in a for-loop or by calling its `next` method.

Iteration is done in C-contiguous style, with the last index varying the
fastest. The iterator can also be indexed using basic slicing or
advanced indexing.

See Also
--------
MaskedArray.flat : Return a flat iterator over an array.
MaskedArray.flatten : Returns a flattened copy of an array.

Notes
-----
`MaskedIterator` is not exported by the `ma` module. Instead of
instantiating a `MaskedIterator` directly, use `MaskedArray.flat`.

Examples
--------
>>> x = np.ma.array(arange(6).reshape(2, 3))
>>> fl = x.flat
>>> type(fl)
<class 'numpy.ma.core.MaskedIterator'>
>>> for item in fl:
...     print(item)
...
0
1
2
3
4
5

Extracting more than a single element b indexing the `MaskedIterator`
returns a masked array:

>>> fl[2:4]
masked_array(data = [2 3],
             mask = False,
       fill_value = 999999)

---
## MaskedArray
```python
from core import MaskedArray
```

An array class with possibly masked values.

Masked values of True exclude the corresponding element from any
computation.

Construction::

  x = MaskedArray(data, mask=nomask, dtype=None, copy=False, subok=True,
                  ndmin=0, fill_value=None, keep_mask=True, hard_mask=None,
                  shrink=True, order=None)

Parameters
----------
data : array_like
    Input data.
mask : sequence, optional
    Mask. Must be convertible to an array of booleans with the same
    shape as `data`. True indicates a masked (i.e. invalid) data.
dtype : dtype, optional
    Data type of the output.
    If `dtype` is None, the type of the data argument (``data.dtype``)
    is used. If `dtype` is not None and different from ``data.dtype``,
    a copy is performed.
copy : bool, optional
    Whether to copy the input data (True), or to use a reference instead.
    Default is False.
subok : bool, optional
    Whether to return a subclass of `MaskedArray` if possible (True) or a
    plain `MaskedArray`. Default is True.
ndmin : int, optional
    Minimum number of dimensions. Default is 0.
fill_value : scalar, optional
    Value used to fill in the masked values when necessary.
    If None, a default based on the data-type is used.
keep_mask : bool, optional
    Whether to combine `mask` with the mask of the input data, if any
    (True), or to use only `mask` for the output (False). Default is True.
hard_mask : bool, optional
    Whether to use a hard mask or not. With a hard mask, masked values
    cannot be unmasked. Default is False.
shrink : bool, optional
    Whether to force compression of an empty mask. Default is True.
order : {'C', 'F', 'A'}, optional
    Specify the order of the array.  If order is 'C', then the array
    will be in C-contiguous order (last-index varies the fastest).
    If order is 'F', then the returned array will be in
    Fortran-contiguous order (first-index varies the fastest).
    If order is 'A' (default), then the returned array may be
    in any order (either C-, Fortran-contiguous, or even discontiguous),
    unless a copy is required, in which case it will be C-contiguous.

Examples
--------

The ``mask`` can be initialized with an array of boolean values
with the same shape as ``data``.

>>> data = np.arange(6).reshape((2, 3))
>>> np.ma.MaskedArray(data, mask=[[False, True, False],
...                               [False, False, True]])
masked_array(
  data=[[0, --, 2],
        [3, 4, --]],
  mask=[[False,  True, False],
        [False, False,  True]],
  fill_value=999999)

Alternatively, the ``mask`` can be initialized to homogeneous boolean
array with the same shape as ``data`` by passing in a scalar
boolean value:

>>> np.ma.MaskedArray(data, mask=False)
masked_array(
  data=[[0, 1, 2],
        [3, 4, 5]],
  mask=[[False, False, False],
        [False, False, False]],
  fill_value=999999)

>>> np.ma.MaskedArray(data, mask=True)
masked_array(
  data=[[--, --, --],
        [--, --, --]],
  mask=[[ True,  True,  True],
        [ True,  True,  True]],
  fill_value=999999,
  dtype=int64)

.. note::
    The recommended practice for initializing ``mask`` with a scalar
    boolean value is to use ``True``/``False`` rather than
    ``np.True_``/``np.False_``. The reason is :attr:`nomask`
    is represented internally as ``np.False_``.

    >>> np.False_ is np.ma.nomask
    True

---
## _mareconstruct
```python
from core import _mareconstruct
```

Internal function that builds a new MaskedArray from the
information stored in a pickle.

---
## mvoid
```python
from core import mvoid
```

Fake a 'void' object to use for masked array with structured dtypes.

---
## isMaskedArray
```python
from core import isMaskedArray
```

Test whether input is an instance of MaskedArray.

This function returns True if `x` is an instance of MaskedArray
and returns False otherwise.  Any object is accepted as input.

Parameters
----------
x : object
    Object to test.

Returns
-------
result : bool
    True if `x` is a MaskedArray.

See Also
--------
isMA : Alias to isMaskedArray.
isarray : Alias to isMaskedArray.

Examples
--------
>>> import numpy.ma as ma
>>> a = np.eye(3, 3)
>>> a
array([[ 1.,  0.,  0.],
       [ 0.,  1.,  0.],
       [ 0.,  0.,  1.]])
>>> m = ma.masked_values(a, 0)
>>> m
masked_array(
  data=[[1.0, --, --],
        [--, 1.0, --],
        [--, --, 1.0]],
  mask=[[False,  True,  True],
        [ True, False,  True],
        [ True,  True, False]],
  fill_value=0.0)
>>> ma.isMaskedArray(a)
False
>>> ma.isMaskedArray(m)
True
>>> ma.isMaskedArray([0, 1, 2])
False

---
## MaskedConstant
```python
from core import MaskedConstant
```



---
## array
```python
from core import array
```

Shortcut to MaskedArray.

The options are in a different order for convenience and backwards
compatibility.

---
## is_masked
```python
from core import is_masked
```

Determine whether input has masked values.

Accepts any object as input, but always returns False unless the
input is a MaskedArray containing masked values.

Parameters
----------
x : array_like
    Array to check for masked values.

Returns
-------
result : bool
    True if `x` is a MaskedArray with masked values, False otherwise.

Examples
--------
>>> import numpy.ma as ma
>>> x = ma.masked_equal([0, 1, 0, 2, 3], 0)
>>> x
masked_array(data=[--, 1, --, 2, 3],
             mask=[ True, False,  True, False, False],
       fill_value=0)
>>> ma.is_masked(x)
True
>>> x = ma.masked_equal([0, 1, 0, 2, 3], 42)
>>> x
masked_array(data=[0, 1, 0, 2, 3],
             mask=False,
       fill_value=42)
>>> ma.is_masked(x)
False

Always returns False if `x` isn't a MaskedArray.

>>> x = [False, True, False]
>>> ma.is_masked(x)
False
>>> x = 'a string'
>>> ma.is_masked(x)
False

---
## _extrema_operation
```python
from core import _extrema_operation
```

Generic class for maximum/minimum functions.

.. note::
  This is the base class for `_maximum_operation` and
  `_minimum_operation`.

---
## min
```python
from core import min
```

Return the minimum along a given axis.

Parameters
----------
axis : None or int or tuple of ints, optional
    Axis along which to operate.  By default, ``axis`` is None and the
    flattened input is used.
    .. versionadded:: 1.7.0
    If this is a tuple of ints, the minimum is selected over multiple
    axes, instead of a single axis or all the axes as before.
out : array_like, optional
    Alternative output array in which to place the result.  Must be of
    the same shape and buffer length as the expected output.
fill_value : scalar or None, optional
    Value used to fill in the masked values.
    If None, use the output of `minimum_fill_value`.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

Returns
-------
amin : array_like
    New array holding the result.
    If ``out`` was specified, ``out`` is returned.

See Also
--------
ma.minimum_fill_value
    Returns the minimum filling value for a given datatype.

Examples
--------
>>> import numpy.ma as ma
>>> x = [[1., -2., 3.], [0.2, -0.7, 0.1]]
>>> mask = [[1, 1, 0], [0, 0, 1]]
>>> masked_x = ma.masked_array(x, mask)
>>> masked_x
masked_array(
  data=[[--, --, 3.0],
        [0.2, -0.7, --]],
  mask=[[ True,  True, False],
        [False, False,  True]],
  fill_value=1e+20)
>>> ma.min(masked_x)
-0.7
>>> ma.min(masked_x, axis=-1)
masked_array(data=[3.0, -0.7],
             mask=[False, False],
        fill_value=1e+20)
>>> ma.min(masked_x, axis=0, keepdims=True)
masked_array(data=[[0.2, -0.7, 3.0]],
             mask=[[False, False, False]],
        fill_value=1e+20)
>>> mask = [[1, 1, 1,], [1, 1, 1]]
>>> masked_x = ma.masked_array(x, mask)
>>> ma.min(masked_x, axis=0)
masked_array(data=[--, --, --],
             mask=[ True,  True,  True],
        fill_value=1e+20,
            dtype=float64)

---
## max
```python
from core import max
```

Return the maximum along a given axis.

Parameters
----------
axis : None or int or tuple of ints, optional
    Axis along which to operate.  By default, ``axis`` is None and the
    flattened input is used.
    .. versionadded:: 1.7.0
    If this is a tuple of ints, the maximum is selected over multiple
    axes, instead of a single axis or all the axes as before.
out : array_like, optional
    Alternative output array in which to place the result.  Must
    be of the same shape and buffer length as the expected output.
fill_value : scalar or None, optional
    Value used to fill in the masked values.
    If None, use the output of maximum_fill_value().
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

Returns
-------
amax : array_like
    New array holding the result.
    If ``out`` was specified, ``out`` is returned.

See Also
--------
ma.maximum_fill_value
    Returns the maximum filling value for a given datatype.

Examples
--------
>>> import numpy.ma as ma
>>> x = [[-1., 2.5], [4., -2.], [3., 0.]]
>>> mask = [[0, 0], [1, 0], [1, 0]]
>>> masked_x = ma.masked_array(x, mask)
>>> masked_x
masked_array(
  data=[[-1.0, 2.5],
        [--, -2.0],
        [--, 0.0]],
  mask=[[False, False],
        [ True, False],
        [ True, False]],
  fill_value=1e+20)
>>> ma.max(masked_x)
2.5
>>> ma.max(masked_x, axis=0)
masked_array(data=[-1.0, 2.5],
             mask=[False, False],
       fill_value=1e+20)
>>> ma.max(masked_x, axis=1, keepdims=True)
masked_array(
  data=[[2.5],
        [-2.0],
        [0.0]],
  mask=[[False],
        [False],
        [False]],
  fill_value=1e+20)
>>> mask = [[1, 1], [1, 1], [1, 1]]
>>> masked_x = ma.masked_array(x, mask)
>>> ma.max(masked_x, axis=1)
masked_array(data=[--, --, --],
             mask=[ True,  True,  True],
       fill_value=1e+20,
            dtype=float64)

---
## ptp
```python
from core import ptp
```

Return (maximum - minimum) along the given dimension
(i.e. peak-to-peak value).

.. warning::
    `ptp` preserves the data type of the array. This means the
    return value for an input of signed integers with n bits
    (e.g. `np.int8`, `np.int16`, etc) is also a signed integer
    with n bits.  In that case, peak-to-peak values greater than
    ``2**(n-1)-1`` will be returned as negative values. An example
    with a work-around is shown below.

Parameters
----------
axis : {None, int}, optional
    Axis along which to find the peaks.  If None (default) the
    flattened array is used.
out : {None, array_like}, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type will be cast if necessary.
fill_value : scalar or None, optional
    Value used to fill in the masked values.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

Returns
-------
ptp : ndarray.
    A new array holding the result, unless ``out`` was
    specified, in which case a reference to ``out`` is returned.

Examples
--------
>>> x = np.ma.MaskedArray([[4, 9, 2, 10],
...                        [6, 9, 7, 12]])

>>> x.ptp(axis=1)
masked_array(data=[8, 6],
             mask=False,
       fill_value=999999)

>>> x.ptp(axis=0)
masked_array(data=[2, 0, 5, 2],
             mask=False,
       fill_value=999999)

>>> x.ptp()
10

This example shows that a negative value can be returned when
the input is an array of signed integers.

>>> y = np.ma.MaskedArray([[1, 127],
...                        [0, 127],
...                        [-1, 127],
...                        [-2, 127]], dtype=np.int8)
>>> y.ptp(axis=1)
masked_array(data=[ 126,  127, -128, -127],
             mask=False,
       fill_value=999999,
            dtype=int8)

A work-around is to use the `view()` method to view the result as
unsigned integers with the same bit width:

>>> y.ptp(axis=1).view(np.uint8)
masked_array(data=[126, 127, 128, 129],
             mask=False,
       fill_value=999999,
            dtype=uint8)

---
## _frommethod
```python
from core import _frommethod
```

Define functions from existing MaskedArray methods.

Parameters
----------
methodname : str
    Name of the method to transform.

---
## take
```python
from core import take
```



---
## power
```python
from core import power
```

Returns element-wise base array raised to power from second array.

This is the masked array version of `numpy.power`. For details see
`numpy.power`.

See Also
--------
numpy.power

Notes
-----
The *out* argument to `numpy.power` is not supported, `third` has to be
None.

Examples
--------
>>> import numpy.ma as ma
>>> x = [11.2, -3.973, 0.801, -1.41]
>>> mask = [0, 0, 0, 1]
>>> masked_x = ma.masked_array(x, mask)
>>> masked_x
masked_array(data=[11.2, -3.973, 0.801, --],
         mask=[False, False, False,  True],
   fill_value=1e+20)
>>> ma.power(masked_x, 2)
masked_array(data=[125.43999999999998, 15.784728999999999,
               0.6416010000000001, --],
         mask=[False, False, False,  True],
   fill_value=1e+20)
>>> y = [-0.5, 2, 0, 17]
>>> masked_y = ma.masked_array(y, mask)
>>> masked_y
masked_array(data=[-0.5, 2.0, 0.0, --],
         mask=[False, False, False,  True],
   fill_value=1e+20)
>>> ma.power(masked_x, masked_y)
masked_array(data=[0.29880715233359845, 15.784728999999999, 1.0, --],
         mask=[False, False, False,  True],
   fill_value=1e+20)

---
## argsort
```python
from core import argsort
```

Return an ndarray of indices that sort the array along the
specified axis.  Masked values are filled beforehand to
`fill_value`.

Parameters
----------
axis : int, optional
    Axis along which to sort. If None, the default, the flattened array
    is used.

    ..  versionchanged:: 1.13.0
        Previously, the default was documented to be -1, but that was
        in error. At some future date, the default will change to -1, as
        originally intended.
        Until then, the axis should be given explicitly when
        ``arr.ndim > 1``, to avoid a FutureWarning.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
    The sorting algorithm used.
order : list, optional
    When `a` is an array with fields defined, this argument specifies
    which fields to compare first, second, etc.  Not all fields need be
    specified.
endwith : {True, False}, optional
    Whether missing values (if any) should be treated as the largest values
    (True) or the smallest values (False)
    When the array contains unmasked values at the same extremes of the
    datatype, the ordering of these values and the masked values is
    undefined.
fill_value : scalar or None, optional
    Value used internally for the masked values.
    If ``fill_value`` is not None, it supersedes ``endwith``.

Returns
-------
index_array : ndarray, int
    Array of indices that sort `a` along the specified axis.
    In other words, ``a[index_array]`` yields a sorted `a`.

See Also
--------
ma.MaskedArray.sort : Describes sorting algorithms used.
lexsort : Indirect stable sort with multiple keys.
numpy.ndarray.sort : Inplace sort.

Notes
-----
See `sort` for notes on the different sorting algorithms.

Examples
--------
>>> a = np.ma.array([3,2,1], mask=[False, False, True])
>>> a
masked_array(data=[3, 2, --],
             mask=[False, False,  True],
       fill_value=999999)
>>> a.argsort()
array([1, 0, 2])

---
## sort
```python
from core import sort
```

Sort the array, in-place

Parameters
----------
a : array_like
    Array to be sorted.
axis : int, optional
    Axis along which to sort. If None, the array is flattened before
    sorting. The default is -1, which sorts along the last axis.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
    The sorting algorithm used.
order : list, optional
    When `a` is a structured array, this argument specifies which fields
    to compare first, second, and so on.  This list does not need to
    include all of the fields.
endwith : {True, False}, optional
    Whether missing values (if any) should be treated as the largest values
    (True) or the smallest values (False)
    When the array contains unmasked values sorting at the same extremes of the
    datatype, the ordering of these values and the masked values is
    undefined.
fill_value : scalar or None, optional
    Value used internally for the masked values.
    If ``fill_value`` is not None, it supersedes ``endwith``.

Returns
-------
sorted_array : ndarray
    Array of the same type and shape as `a`.

See Also
--------
numpy.ndarray.sort : Method to sort an array in-place.
argsort : Indirect sort.
lexsort : Indirect stable sort on multiple keys.
searchsorted : Find elements in a sorted array.

Notes
-----
See ``sort`` for notes on the different sorting algorithms.

Examples
--------
>>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
>>> # Default
>>> a.sort()
>>> a
masked_array(data=[1, 3, 5, --, --],
             mask=[False, False, False,  True,  True],
       fill_value=999999)

>>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
>>> # Put missing values in the front
>>> a.sort(endwith=False)
>>> a
masked_array(data=[--, --, 1, 3, 5],
             mask=[ True,  True, False, False, False],
       fill_value=999999)

>>> a = np.ma.array([1, 2, 5, 4, 3],mask=[0, 1, 0, 1, 0])
>>> # fill_value takes over endwith
>>> a.sort(endwith=False, fill_value=3)
>>> a
masked_array(data=[1, --, --, 3, 5],
             mask=[False,  True,  True, False, False],
       fill_value=999999)

---
## compressed
```python
from core import compressed
```

Return all the non-masked data as a 1-D array.

Returns
-------
data : ndarray
    A new `ndarray` holding the non-masked data is returned.

Notes
-----
The result is **not** a MaskedArray!

Examples
--------
>>> x = np.ma.array(np.arange(5), mask=[0]*2 + [1]*3)
>>> x.compressed()
array([0, 1])
>>> type(x.compressed())
<class 'numpy.ndarray'>

---
## concatenate
```python
from core import concatenate
```

Concatenate a sequence of arrays along the given axis.

Parameters
----------
arrays : sequence of array_like
    The arrays must have the same shape, except in the dimension
    corresponding to `axis` (the first, by default).
axis : int, optional
    The axis along which the arrays will be joined. Default is 0.

Returns
-------
result : MaskedArray
    The concatenated array with any masked entries preserved.

See Also
--------
numpy.concatenate : Equivalent function in the top-level NumPy module.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.arange(3)
>>> a[1] = ma.masked
>>> b = ma.arange(2, 5)
>>> a
masked_array(data=[0, --, 2],
             mask=[False,  True, False],
       fill_value=999999)
>>> b
masked_array(data=[2, 3, 4],
             mask=False,
       fill_value=999999)
>>> ma.concatenate([a, b])
masked_array(data=[0, --, 2, 2, 3, 4],
             mask=[False,  True, False, False, False, False],
       fill_value=999999)

---
## diag
```python
from core import diag
```

Extract a diagonal or construct a diagonal array.

This function is the equivalent of `numpy.diag` that takes masked
values into account, see `numpy.diag` for details.

See Also
--------
numpy.diag : Equivalent function for ndarrays.

Examples
--------

Create an array with negative values masked:

>>> import numpy as np
>>> x = np.array([[11.2, -3.973, 18], [0.801, -1.41, 12], [7, 33, -12]])
>>> masked_x = np.ma.masked_array(x, mask=x < 0)
>>> masked_x
masked_array(
  data=[[11.2, --, 18.0],
        [0.801, --, 12.0],
        [7.0, 33.0, --]],
  mask=[[False,  True, False],
        [False,  True, False],
        [False, False,  True]],
  fill_value=1e+20)

Isolate the main diagonal from the masked array:

>>> np.ma.diag(masked_x)
masked_array(data=[11.2, --, --],
             mask=[False,  True,  True],
       fill_value=1e+20)

Isolate the first diagonal below the main diagonal:

>>> np.ma.diag(masked_x, -1)
masked_array(data=[0.801, 33.0],
             mask=[False, False],
       fill_value=1e+20)

---
## left_shift
```python
from core import left_shift
```

Shift the bits of an integer to the left.

This is the masked array version of `numpy.left_shift`, for details
see that function.

See Also
--------
numpy.left_shift

---
## right_shift
```python
from core import right_shift
```

Shift the bits of an integer to the right.

This is the masked array version of `numpy.right_shift`, for details
see that function.

See Also
--------
numpy.right_shift

Examples
--------
>>> import numpy.ma as ma
>>> x = [11, 3, 8, 1]
>>> mask = [0, 0, 0, 1]
>>> masked_x = ma.masked_array(x, mask)
>>> masked_x
masked_array(data=[11, 3, 8, --],
             mask=[False, False, False,  True],
       fill_value=999999)
>>> ma.right_shift(masked_x,1)
masked_array(data=[5, 1, 4, --],
             mask=[False, False, False,  True],
       fill_value=999999)

---
## put
```python
from core import put
```

Set storage-indexed locations to corresponding values.

Sets self._data.flat[n] = values[n] for each n in indices.
If `values` is shorter than `indices` then it will repeat.
If `values` has some masked values, the initial mask is updated
in consequence, else the corresponding values are unmasked.

Parameters
----------
indices : 1-D array_like
    Target indices, interpreted as integers.
values : array_like
    Values to place in self._data copy at target indices.
mode : {'raise', 'wrap', 'clip'}, optional
    Specifies how out-of-bounds indices will behave.
    'raise' : raise an error.
    'wrap' : wrap around.
    'clip' : clip to the range.

Notes
-----
`values` can be a scalar or length 1 array.

Examples
--------
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)
>>> x
masked_array(
  data=[[1, --, 3],
        [--, 5, --],
        [7, --, 9]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> x.put([0,4,8],[10,20,30])
>>> x
masked_array(
  data=[[10, --, 3],
        [--, 20, --],
        [7, --, 30]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)

>>> x.put(4,999)
>>> x
masked_array(
  data=[[10, --, 3],
        [--, 999, --],
        [7, --, 30]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)

---
## putmask
```python
from core import putmask
```

Changes elements of an array based on conditional and input values.

This is the masked array version of `numpy.putmask`, for details see
`numpy.putmask`.

See Also
--------
numpy.putmask

Notes
-----
Using a masked array as `values` will **not** transform a `ndarray` into
a `MaskedArray`.

---
## transpose
```python
from core import transpose
```

Permute the dimensions of an array.

This function is exactly equivalent to `numpy.transpose`.

See Also
--------
numpy.transpose : Equivalent function in top-level NumPy module.

Examples
--------
>>> import numpy.ma as ma
>>> x = ma.arange(4).reshape((2,2))
>>> x[1, 1] = ma.masked
>>> x
masked_array(
  data=[[0, 1],
        [2, --]],
  mask=[[False, False],
        [False,  True]],
  fill_value=999999)

>>> ma.transpose(x)
masked_array(
  data=[[0, 2],
        [1, --]],
  mask=[[False, False],
        [False,  True]],
  fill_value=999999)

---
## reshape
```python
from core import reshape
```

Give a new shape to the array without changing its data.

Returns a masked array containing the same data, but with a new shape.
The result is a view on the original array; if this is not possible, a
ValueError is raised.

Parameters
----------
shape : int or tuple of ints
    The new shape should be compatible with the original shape. If an
    integer is supplied, then the result will be a 1-D array of that
    length.
order : {'C', 'F'}, optional
    Determines whether the array data should be viewed as in C
    (row-major) or FORTRAN (column-major) order.

Returns
-------
reshaped_array : array
    A new view on the array.

See Also
--------
reshape : Equivalent function in the masked array module.
numpy.ndarray.reshape : Equivalent method on ndarray object.
numpy.reshape : Equivalent function in the NumPy module.

Notes
-----
The reshaping operation cannot guarantee that a copy will not be made,
to modify the shape in place, use ``a.shape = s``

Examples
--------
>>> x = np.ma.array([[1,2],[3,4]], mask=[1,0,0,1])
>>> x
masked_array(
  data=[[--, 2],
        [3, --]],
  mask=[[ True, False],
        [False,  True]],
  fill_value=999999)
>>> x = x.reshape((4,1))
>>> x
masked_array(
  data=[[--],
        [2],
        [3],
        [--]],
  mask=[[ True],
        [False],
        [False],
        [ True]],
  fill_value=999999)

---
## resize
```python
from core import resize
```

.. warning::

    This method does nothing, except raise a ValueError exception. A
    masked array does not own its data and therefore cannot safely be
    resized in place. Use the `numpy.ma.resize` function instead.

This method is difficult to implement safely and may be deprecated in
future releases of NumPy.

---
## ndim
```python
from core import ndim
```

maskedarray version of the numpy function.

---
## shape
```python
from core import shape
```



---
## size
```python
from core import size
```

maskedarray version of the numpy function.

---
## diff
```python
from core import diff
```

Calculate the n-th discrete difference along the given axis.
The first difference is given by ``out[i] = a[i+1] - a[i]`` along
the given axis, higher differences are calculated by using `diff`
recursively.
Preserves the input mask.

Parameters
----------
a : array_like
    Input array
n : int, optional
    The number of times values are differenced. If zero, the input
    is returned as-is.
axis : int, optional
    The axis along which the difference is taken, default is the
    last axis.
prepend, append : array_like, optional
    Values to prepend or append to `a` along axis prior to
    performing the difference.  Scalar values are expanded to
    arrays with length 1 in the direction of axis and the shape
    of the input array in along all other axes.  Otherwise the
    dimension and shape must match `a` except along axis.

Returns
-------
diff : MaskedArray
    The n-th differences. The shape of the output is the same as `a`
    except along `axis` where the dimension is smaller by `n`. The
    type of the output is the same as the type of the difference
    between any two elements of `a`. This is the same as the type of
    `a` in most cases. A notable exception is `datetime64`, which
    results in a `timedelta64` output array.

See Also
--------
numpy.diff : Equivalent function in the top-level NumPy module.

Notes
-----
Type is preserved for boolean arrays, so the result will contain
`False` when consecutive elements are the same and `True` when they
differ.

For unsigned integer arrays, the results will also be unsigned. This
should not be surprising, as the result is consistent with
calculating the difference directly:

>>> u8_arr = np.array([1, 0], dtype=np.uint8)
>>> np.ma.diff(u8_arr)
masked_array(data=[255],
             mask=False,
       fill_value=999999,
            dtype=uint8)
>>> u8_arr[1,...] - u8_arr[0,...]
255

If this is not desirable, then the array should be cast to a larger
integer type first:

>>> i16_arr = u8_arr.astype(np.int16)
>>> np.ma.diff(i16_arr)
masked_array(data=[-1],
             mask=False,
       fill_value=999999,
            dtype=int16)

Examples
--------
>>> a = np.array([1, 2, 3, 4, 7, 0, 2, 3])
>>> x = np.ma.masked_where(a < 2, a)
>>> np.ma.diff(x)
masked_array(data=[--, 1, 1, 3, --, --, 1],
        mask=[ True, False, False, False,  True,  True, False],
    fill_value=999999)

>>> np.ma.diff(x, n=2)
masked_array(data=[--, 0, 2, --, --, --],
            mask=[ True, False, False,  True,  True,  True],
    fill_value=999999)

>>> a = np.array([[1, 3, 1, 5, 10], [0, 1, 5, 6, 8]])
>>> x = np.ma.masked_equal(a, value=1)
>>> np.ma.diff(x)
masked_array(
    data=[[--, --, --, 5],
            [--, --, 1, 2]],
    mask=[[ True,  True,  True, False],
            [ True,  True, False, False]],
    fill_value=1)

>>> np.ma.diff(x, axis=0)
masked_array(data=[[--, --, --, 1, -2]],
        mask=[[ True,  True,  True, False, False]],
    fill_value=1)

---
## choose
```python
from core import choose
```

Use an index array to construct a new array from a list of choices.

Given an array of integers and a list of n choice arrays, this method
will create a new array that merges each of the choice arrays.  Where a
value in `index` is i, the new array will have the value that choices[i]
contains in the same place.

Parameters
----------
indices : ndarray of ints
    This array must contain integers in ``[0, n-1]``, where n is the
    number of choices.
choices : sequence of arrays
    Choice arrays. The index array and all of the choices should be
    broadcastable to the same shape.
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and `dtype`.
mode : {'raise', 'wrap', 'clip'}, optional
    Specifies how out-of-bounds indices will behave.

    * 'raise' : raise an error
    * 'wrap' : wrap around
    * 'clip' : clip to the range

Returns
-------
merged_array : array

See Also
--------
choose : equivalent function

Examples
--------
>>> choice = np.array([[1,1,1], [2,2,2], [3,3,3]])
>>> a = np.array([2, 1, 0])
>>> np.ma.choose(a, choice)
masked_array(data=[3, 2, 1],
             mask=False,
       fill_value=999999)

---
## round_
```python
from core import round_
```

Return a copy of a, rounded to 'decimals' places.

When 'decimals' is negative, it specifies the number of positions
to the left of the decimal point.  The real and imaginary parts of
complex numbers are rounded separately. Nothing is done if the
array is not of float type and 'decimals' is greater than or equal
to 0.

Parameters
----------
decimals : int
    Number of decimals to round to. May be negative.
out : array_like
    Existing array to use for output.
    If not given, returns a default copy of a.

Notes
-----
If out is given and does not have a mask attribute, the mask of a
is lost!

Examples
--------
>>> import numpy.ma as ma
>>> x = [11.2, -3.973, 0.801, -1.41]
>>> mask = [0, 0, 0, 1]
>>> masked_x = ma.masked_array(x, mask)
>>> masked_x
masked_array(data=[11.2, -3.973, 0.801, --],
             mask=[False, False, False, True],
    fill_value=1e+20)
>>> ma.round_(masked_x)
masked_array(data=[11.0, -4.0, 1.0, --],
             mask=[False, False, False, True],
    fill_value=1e+20)
>>> ma.round(masked_x, decimals=1)
masked_array(data=[11.2, -4.0, 0.8, --],
             mask=[False, False, False, True],
    fill_value=1e+20)
>>> ma.round_(masked_x, decimals=-1)
masked_array(data=[10.0, -0.0, 0.0, --],
             mask=[False, False, False, True],
    fill_value=1e+20)

---
## _mask_propagate
```python
from core import _mask_propagate
```

Mask whole 1-d vectors of an array that contain masked values.

---
## dot
```python
from core import dot
```

a.dot(b, out=None)

Masked dot product of two arrays. Note that `out` and `strict` are
located in different positions than in `ma.dot`. In order to
maintain compatibility with the functional version, it is
recommended that the optional arguments be treated as keyword only.
At some point that may be mandatory.

.. versionadded:: 1.10.0

Parameters
----------
b : masked_array_like
    Inputs array.
out : masked_array, optional
    Output argument. This must have the exact kind that would be
    returned if it was not used. In particular, it must have the
    right type, must be C-contiguous, and its dtype must be the
    dtype that would be returned for `ma.dot(a,b)`. This is a
    performance feature. Therefore, if these conditions are not
    met, an exception is raised, instead of attempting to be
    flexible.
strict : bool, optional
    Whether masked data are propagated (True) or set to 0 (False)
    for the computation. Default is False.  Propagating the mask
    means that if a masked value appears in a row or column, the
    whole row or column is considered masked.

    .. versionadded:: 1.10.2

See Also
--------
numpy.ma.dot : equivalent function

---
## inner
```python
from core import inner
```

Returns the inner product of a and b for arrays of floating point types.

Like the generic NumPy equivalent the product sum is over the last dimension
of a and b. The first argument is not conjugated.

---
## outer
```python
from core import outer
```

Return the function applied to the outer product of a and b.

---
## _convolve_or_correlate
```python
from core import _convolve_or_correlate
```

Helper function for ma.correlate and ma.convolve

---
## correlate
```python
from core import correlate
```

Cross-correlation of two 1-dimensional sequences.

Parameters
----------
a, v : array_like
    Input sequences.
mode : {'valid', 'same', 'full'}, optional
    Refer to the `np.convolve` docstring.  Note that the default
    is 'valid', unlike `convolve`, which uses 'full'.
propagate_mask : bool
    If True, then a result element is masked if any masked element contributes towards it.
    If False, then a result element is only masked if no non-masked element
    contribute towards it

Returns
-------
out : MaskedArray
    Discrete cross-correlation of `a` and `v`.

See Also
--------
numpy.correlate : Equivalent function in the top-level NumPy module.

---
## convolve
```python
from core import convolve
```

Returns the discrete, linear convolution of two one-dimensional sequences.

Parameters
----------
a, v : array_like
    Input sequences.
mode : {'valid', 'same', 'full'}, optional
    Refer to the `np.convolve` docstring.
propagate_mask : bool
    If True, then if any masked element is included in the sum for a result
    element, then the result is masked.
    If False, then the result element is only masked if no non-masked cells
    contribute towards it

Returns
-------
out : MaskedArray
    Discrete, linear convolution of `a` and `v`.

See Also
--------
numpy.convolve : Equivalent function in the top-level NumPy module.

---
## allequal
```python
from core import allequal
```

Return True if all entries of a and b are equal, using
fill_value as a truth value where either or both are masked.

Parameters
----------
a, b : array_like
    Input arrays to compare.
fill_value : bool, optional
    Whether masked values in a or b are considered equal (True) or not
    (False).

Returns
-------
y : bool
    Returns True if the two arrays are equal within the given
    tolerance, False otherwise. If either array contains NaN,
    then False is returned.

See Also
--------
all, any
numpy.ma.allclose

Examples
--------
>>> a = np.ma.array([1e10, 1e-7, 42.0], mask=[0, 0, 1])
>>> a
masked_array(data=[10000000000.0, 1e-07, --],
             mask=[False, False,  True],
       fill_value=1e+20)

>>> b = np.array([1e10, 1e-7, -42.0])
>>> b
array([  1.00000000e+10,   1.00000000e-07,  -4.20000000e+01])
>>> np.ma.allequal(a, b, fill_value=False)
False
>>> np.ma.allequal(a, b)
True

---
## allclose
```python
from core import allclose
```

Returns True if two arrays are element-wise equal within a tolerance.

This function is equivalent to `allclose` except that masked values
are treated as equal (default) or unequal, depending on the `masked_equal`
argument.

Parameters
----------
a, b : array_like
    Input arrays to compare.
masked_equal : bool, optional
    Whether masked values in `a` and `b` are considered equal (True) or not
    (False). They are considered equal by default.
rtol : float, optional
    Relative tolerance. The relative difference is equal to ``rtol * b``.
    Default is 1e-5.
atol : float, optional
    Absolute tolerance. The absolute difference is equal to `atol`.
    Default is 1e-8.

Returns
-------
y : bool
    Returns True if the two arrays are equal within the given
    tolerance, False otherwise. If either array contains NaN, then
    False is returned.

See Also
--------
all, any
numpy.allclose : the non-masked `allclose`.

Notes
-----
If the following equation is element-wise True, then `allclose` returns
True::

  absolute(`a` - `b`) <= (`atol` + `rtol` * absolute(`b`))

Return True if all elements of `a` and `b` are equal subject to
given tolerances.

Examples
--------
>>> a = np.ma.array([1e10, 1e-7, 42.0], mask=[0, 0, 1])
>>> a
masked_array(data=[10000000000.0, 1e-07, --],
             mask=[False, False,  True],
       fill_value=1e+20)
>>> b = np.ma.array([1e10, 1e-8, -42.0], mask=[0, 0, 1])
>>> np.ma.allclose(a, b)
False

>>> a = np.ma.array([1e10, 1e-8, 42.0], mask=[0, 0, 1])
>>> b = np.ma.array([1.00001e10, 1e-9, -42.0], mask=[0, 0, 1])
>>> np.ma.allclose(a, b)
True
>>> np.ma.allclose(a, b, masked_equal=False)
False

Masked values are not compared directly.

>>> a = np.ma.array([1e10, 1e-8, 42.0], mask=[0, 0, 1])
>>> b = np.ma.array([1.00001e10, 1e-9, 42.0], mask=[0, 0, 1])
>>> np.ma.allclose(a, b)
True
>>> np.ma.allclose(a, b, masked_equal=False)
False

---
## asarray
```python
from core import asarray
```

Convert the input to a masked array of the given data-type.

No copy is performed if the input is already an `ndarray`. If `a` is
a subclass of `MaskedArray`, a base class `MaskedArray` is returned.

Parameters
----------
a : array_like
    Input data, in any form that can be converted to a masked array. This
    includes lists, lists of tuples, tuples, tuples of tuples, tuples
    of lists, ndarrays and masked arrays.
dtype : dtype, optional
    By default, the data-type is inferred from the input data.
order : {'C', 'F'}, optional
    Whether to use row-major ('C') or column-major ('FORTRAN') memory
    representation.  Default is 'C'.

Returns
-------
out : MaskedArray
    Masked array interpretation of `a`.

See Also
--------
asanyarray : Similar to `asarray`, but conserves subclasses.

Examples
--------
>>> x = np.arange(10.).reshape(2, 5)
>>> x
array([[0., 1., 2., 3., 4.],
       [5., 6., 7., 8., 9.]])
>>> np.ma.asarray(x)
masked_array(
  data=[[0., 1., 2., 3., 4.],
        [5., 6., 7., 8., 9.]],
  mask=False,
  fill_value=1e+20)
>>> type(np.ma.asarray(x))
<class 'numpy.ma.core.MaskedArray'>

---
## asanyarray
```python
from core import asanyarray
```

Convert the input to a masked array, conserving subclasses.

If `a` is a subclass of `MaskedArray`, its class is conserved.
No copy is performed if the input is already an `ndarray`.

Parameters
----------
a : array_like
    Input data, in any form that can be converted to an array.
dtype : dtype, optional
    By default, the data-type is inferred from the input data.
order : {'C', 'F'}, optional
    Whether to use row-major ('C') or column-major ('FORTRAN') memory
    representation.  Default is 'C'.

Returns
-------
out : MaskedArray
    MaskedArray interpretation of `a`.

See Also
--------
asarray : Similar to `asanyarray`, but does not conserve subclass.

Examples
--------
>>> x = np.arange(10.).reshape(2, 5)
>>> x
array([[0., 1., 2., 3., 4.],
       [5., 6., 7., 8., 9.]])
>>> np.ma.asanyarray(x)
masked_array(
  data=[[0., 1., 2., 3., 4.],
        [5., 6., 7., 8., 9.]],
  mask=False,
  fill_value=1e+20)
>>> type(np.ma.asanyarray(x))
<class 'numpy.ma.core.MaskedArray'>

---
## fromfile
```python
from core import fromfile
```



---
## fromflex
```python
from core import fromflex
```

Build a masked array from a suitable flexible-type array.

The input array has to have a data-type with ``_data`` and ``_mask``
fields. This type of array is output by `MaskedArray.toflex`.

Parameters
----------
fxarray : ndarray
    The structured input array, containing ``_data`` and ``_mask``
    fields. If present, other fields are discarded.

Returns
-------
result : MaskedArray
    The constructed masked array.

See Also
--------
MaskedArray.toflex : Build a flexible-type array from a masked array.

Examples
--------
>>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[0] + [1, 0] * 4)
>>> rec = x.toflex()
>>> rec
array([[(0, False), (1,  True), (2, False)],
       [(3,  True), (4, False), (5,  True)],
       [(6, False), (7,  True), (8, False)]],
      dtype=[('_data', '<i8'), ('_mask', '?')])
>>> x2 = np.ma.fromflex(rec)
>>> x2
masked_array(
  data=[[0, --, 2],
        [--, 4, --],
        [6, --, 8]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)

Extra fields can be present in the structured array but are discarded:

>>> dt = [('_data', '<i4'), ('_mask', '|b1'), ('field3', '<f4')]
>>> rec2 = np.zeros((2, 2), dtype=dt)
>>> rec2
array([[(0, False, 0.), (0, False, 0.)],
       [(0, False, 0.), (0, False, 0.)]],
      dtype=[('_data', '<i4'), ('_mask', '?'), ('field3', '<f4')])
>>> y = np.ma.fromflex(rec2)
>>> y
masked_array(
  data=[[0, 0],
        [0, 0]],
  mask=[[False, False],
        [False, False]],
  fill_value=999999,
  dtype=int32)

---
## _convert2ma
```python
from core import _convert2ma
```

Convert functions from numpy to numpy.ma.

Parameters
----------
    _methodname : string
        Name of the method to transform.

---
## _scalar_fill_value
```python
from core import _scalar_fill_value
```



---
## reduce
```python
from core import reduce
```

Reduce target along the given axis.

---
## accumulate
```python
from core import accumulate
```

Accumulate `target` along `axis` after filling with y fill
value.

---
## _flatmask
```python
from core import _flatmask
```

Flatten the mask and returns a (maybe nested) sequence of booleans.

---
## _flatsequence
```python
from core import _flatsequence
```

Generates a flattened version of the sequence.

---
## display
```python
from core import display
```

Display the string to print for masked values.

---
## set_display
```python
from core import set_display
```

Set the string to print for masked values.

---
## enabled
```python
from core import enabled
```

Is the use of the display value enabled?

---
## enable
```python
from core import enable
```

Set the enabling shrink to `shrink`.

---
## flatten_sequence
```python
from core import flatten_sequence
```

Flattens a compound of nested iterables.

---
## wrapped_method
```python
from core import wrapped_method
```



---
## __iter__
```python
from core import __iter__
```

Defines an iterator for mvoid

---
## __setitem__
```python
from core import __setitem__
```



---
## __next__
```python
from core import __next__
```

Return the next value, or raise StopIteration.

Examples
--------
>>> x = np.ma.array([3, 2], mask=[0, 1])
>>> fl = x.flat
>>> next(fl)
3
>>> next(fl)
masked
>>> next(fl)
Traceback (most recent call last):
  ...
StopIteration

---
## _update_from
```python
from core import _update_from
```

Copies some attributes of obj to self.

---
## __array_finalize__
```python
from core import __array_finalize__
```



---
## __array_wrap__
```python
from core import __array_wrap__
```



---
## view
```python
from core import view
```

Return a view of the MaskedArray data.

Parameters
----------
dtype : data-type or ndarray sub-class, optional
    Data-type descriptor of the returned view, e.g., float32 or int16.
    The default, None, results in the view having the same data-type
    as `a`. As with ``ndarray.view``, dtype can also be specified as
    an ndarray sub-class, which then specifies the type of the
    returned object (this is equivalent to setting the ``type``
    parameter).
type : Python type, optional
    Type of the returned view, either ndarray or a subclass.  The
    default None results in type preservation.
fill_value : scalar, optional
    The value to use for invalid entries (None by default).
    If None, then this argument is inferred from the passed `dtype`, or
    in its absence the original array, as discussed in the notes below.

See Also
--------
numpy.ndarray.view : Equivalent method on ndarray object.

Notes
-----

``a.view()`` is used two different ways:

``a.view(some_dtype)`` or ``a.view(dtype=some_dtype)`` constructs a view
of the array's memory with a different data-type.  This can cause a
reinterpretation of the bytes of memory.

``a.view(ndarray_subclass)`` or ``a.view(type=ndarray_subclass)`` just
returns an instance of `ndarray_subclass` that looks at the same array
(same shape, dtype, etc.)  This does not cause a reinterpretation of the
memory.

If `fill_value` is not specified, but `dtype` is specified (and is not
an ndarray sub-class), the `fill_value` of the MaskedArray will be
reset. If neither `fill_value` nor `dtype` are specified (or if
`dtype` is an ndarray sub-class), then the fill value is preserved.
Finally, if `fill_value` is specified, but `dtype` is not, the fill
value is set to the specified value.

For ``a.view(some_dtype)``, if ``some_dtype`` has a different number of
bytes per entry than the previous dtype (for example, converting a
regular array to a structured array), then the behavior of the view
cannot be predicted just from the superficial appearance of ``a`` (shown
by ``print(a)``). It also depends on exactly how ``a`` is stored in
memory. Therefore if ``a`` is C-ordered versus fortran-ordered, versus
defined as a slice or transpose, etc., the view may give different
results.

---
## dtype
```python
from core import dtype
```



---
## __setmask__
```python
from core import __setmask__
```

Set the mask.

---
## mask
```python
from core import mask
```



---
## recordmask
```python
from core import recordmask
```



---
## harden_mask
```python
from core import harden_mask
```

Force the mask to hard, preventing unmasking by assignment.

Whether the mask of a masked array is hard or soft is determined by
its `~ma.MaskedArray.hardmask` property. `harden_mask` sets
`~ma.MaskedArray.hardmask` to ``True`` (and returns the modified
self).

See Also
--------
ma.MaskedArray.hardmask
ma.MaskedArray.soften_mask

---
## soften_mask
```python
from core import soften_mask
```

Force the mask to soft (default), allowing unmasking by assignment.

Whether the mask of a masked array is hard or soft is determined by
its `~ma.MaskedArray.hardmask` property. `soften_mask` sets
`~ma.MaskedArray.hardmask` to ``False`` (and returns the modified
self).

See Also
--------
ma.MaskedArray.hardmask
ma.MaskedArray.harden_mask

---
## hardmask
```python
from core import hardmask
```

Specifies whether values can be unmasked through assignments.

By default, assigning definite values to masked array entries will
unmask them.  When `hardmask` is ``True``, the mask will not change
through assignments.

See Also
--------
ma.MaskedArray.harden_mask
ma.MaskedArray.soften_mask

Examples
--------
>>> x = np.arange(10)
>>> m = np.ma.masked_array(x, x>5)
>>> assert not m.hardmask

Since `m` has a soft mask, assigning an element value unmasks that
element:

>>> m[8] = 42
>>> m
masked_array(data=[0, 1, 2, 3, 4, 5, --, --, 42, --],
             mask=[False, False, False, False, False, False,
                   True, True, False, True],
       fill_value=999999)

After hardening, the mask is not affected by assignments:

>>> hardened = np.ma.harden_mask(m)
>>> assert m.hardmask and hardened is m
>>> m[:] = 23
>>> m
masked_array(data=[23, 23, 23, 23, 23, 23, --, --, 23, --],
             mask=[False, False, False, False, False, False,
                   True, True, False, True],
       fill_value=999999)

---
## unshare_mask
```python
from core import unshare_mask
```

Copy the mask and set the `sharedmask` flag to ``False``.

Whether the mask is shared between masked arrays can be seen from
the `sharedmask` property. `unshare_mask` ensures the mask is not
shared. A copy of the mask is only made if it was shared.

See Also
--------
sharedmask

---
## sharedmask
```python
from core import sharedmask
```

Share status of the mask (read-only). 

---
## shrink_mask
```python
from core import shrink_mask
```

Reduce a mask to nomask when possible.

Parameters
----------
None

Returns
-------
None

Examples
--------
>>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4)
>>> x.mask
array([[False, False],
       [False, False]])
>>> x.shrink_mask()
masked_array(
  data=[[1, 2],
        [3, 4]],
  mask=False,
  fill_value=999999)
>>> x.mask
False

---
## baseclass
```python
from core import baseclass
```

Class of the underlying data (read-only). 

---
## _get_data
```python
from core import _get_data
```

Returns the underlying data, as a view of the masked array.

If the underlying data is a subclass of :class:`numpy.ndarray`, it is
returned as such.

>>> x = np.ma.array(np.matrix([[1, 2], [3, 4]]), mask=[[0, 1], [1, 0]])
>>> x.data
matrix([[1, 2],
        [3, 4]])

The type of the data can be accessed through the :attr:`baseclass`
attribute.

---
## flat
```python
from core import flat
```



---
## fill_value
```python
from core import fill_value
```



---
## compress
```python
from core import compress
```

Return `a` where condition is ``True``.

If condition is a `~ma.MaskedArray`, missing values are considered
as ``False``.

Parameters
----------
condition : var
    Boolean 1-d array selecting which entries to return. If len(condition)
    is less than the size of a along the axis, then output is truncated
    to length of condition array.
axis : {None, int}, optional
    Axis along which the operation must be performed.
out : {None, ndarray}, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output but the type will be cast if
    necessary.

Returns
-------
result : MaskedArray
    A :class:`~ma.MaskedArray` object.

Notes
-----
Please note the difference with :meth:`compressed` !
The output of :meth:`compress` has a mask, the output of
:meth:`compressed` does not.

Examples
--------
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)
>>> x
masked_array(
  data=[[1, --, 3],
        [--, 5, --],
        [7, --, 9]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> x.compress([1, 0, 1])
masked_array(data=[1, 3],
             mask=[False, False],
       fill_value=999999)

>>> x.compress([1, 0, 1], axis=1)
masked_array(
  data=[[1, 3],
        [--, --],
        [7, 9]],
  mask=[[False, False],
        [ True,  True],
        [False, False]],
  fill_value=999999)

---
## _insert_masked_print
```python
from core import _insert_masked_print
```

Replace masked values with masked_print_option, casting all innermost
dtypes to object.

---
## _delegate_binop
```python
from core import _delegate_binop
```



---
## _comparison
```python
from core import _comparison
```

Compare self with other using operator.eq or operator.ne.

When either of the elements is masked, the result is masked as well,
but the underlying boolean data are still set, with self and other
considered equal if both are masked, and unequal otherwise.

For structured arrays, all fields are combined, with masked values
ignored. The result is masked if all fields were masked, with self
and other considered equal only if both were fully masked.

---
## __div__
```python
from core import __div__
```

Divide other into self, and return a new masked array.

---
## __floordiv__
```python
from core import __floordiv__
```

Divide other into self, and return a new masked array.

---
## __rfloordiv__
```python
from core import __rfloordiv__
```

Divide self into other, and return a new masked array.

---
## __isub__
```python
from core import __isub__
```

Subtract other from self in-place.

---
## __imul__
```python
from core import __imul__
```

Multiply self by other in-place.

---
## __idiv__
```python
from core import __idiv__
```

Divide self by other in-place.

---
## __ifloordiv__
```python
from core import __ifloordiv__
```

Floor divide self by other in-place.

---
## __itruediv__
```python
from core import __itruediv__
```

True divide self by other in-place.

---
## __ipow__
```python
from core import __ipow__
```

Raise self to the power other, in place.

---
## __float__
```python
from core import __float__
```

Convert to float.

---
## __int__
```python
from core import __int__
```

Convert to int.

---
## imag
```python
from core import imag
```

The imaginary part of the masked array.

This property is a view on the imaginary part of this `MaskedArray`.

See Also
--------
real

Examples
--------
>>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False])
>>> x.imag
masked_array(data=[1.0, --, 1.6],
             mask=[False,  True, False],
       fill_value=1e+20)

---
## real
```python
from core import real
```

The real part of the masked array.

This property is a view on the real part of this `MaskedArray`.

See Also
--------
imag

Examples
--------
>>> x = np.ma.array([1+1.j, -2j, 3.45+1.6j], mask=[False, True, False])
>>> x.real
masked_array(data=[1.0, --, 3.45],
             mask=[False,  True, False],
       fill_value=1e+20)

---
## count
```python
from core import count
```

Count the non-masked elements of the array along the given axis.

Parameters
----------
axis : None or int or tuple of ints, optional
    Axis or axes along which the count is performed.
    The default, None, performs the count over all
    the dimensions of the input array. `axis` may be negative, in
    which case it counts from the last to the first axis.

    .. versionadded:: 1.10.0

    If this is a tuple of ints, the count is performed on multiple
    axes, instead of a single axis or all the axes as before.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

Returns
-------
result : ndarray or scalar
    An array with the same shape as the input array, with the specified
    axis removed. If the array is a 0-d array, or if `axis` is None, a
    scalar is returned.

See Also
--------
ma.count_masked : Count masked elements in array or along a given axis.

Examples
--------
>>> import numpy.ma as ma
>>> a = ma.arange(6).reshape((2, 3))
>>> a[1, :] = ma.masked
>>> a
masked_array(
  data=[[0, 1, 2],
        [--, --, --]],
  mask=[[False, False, False],
        [ True,  True,  True]],
  fill_value=999999)
>>> a.count()
3

When the `axis` keyword is specified an array of appropriate size is
returned.

>>> a.count(axis=0)
array([1, 1, 1])
>>> a.count(axis=1)
array([3, 0])

---
## ravel
```python
from core import ravel
```

Returns a 1D version of self, as a view.

Parameters
----------
order : {'C', 'F', 'A', 'K'}, optional
    The elements of `a` are read using this index order. 'C' means to
    index the elements in C-like order, with the last axis index
    changing fastest, back to the first axis index changing slowest.
    'F' means to index the elements in Fortran-like index order, with
    the first index changing fastest, and the last index changing
    slowest. Note that the 'C' and 'F' options take no account of the
    memory layout of the underlying array, and only refer to the order
    of axis indexing.  'A' means to read the elements in Fortran-like
    index order if `m` is Fortran *contiguous* in memory, C-like order
    otherwise.  'K' means to read the elements in the order they occur
    in memory, except for reversing the data when strides are negative.
    By default, 'C' index order is used.
    (Masked arrays currently use 'A' on the data when 'K' is passed.)

Returns
-------
MaskedArray
    Output view is of shape ``(self.size,)`` (or
    ``(np.ma.product(self.shape),)``).

Examples
--------
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)
>>> x
masked_array(
  data=[[1, --, 3],
        [--, 5, --],
        [7, --, 9]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> x.ravel()
masked_array(data=[1, --, 3, --, 5, --, 7, --, 9],
             mask=[False,  True, False,  True, False,  True, False,  True,
                   False],
       fill_value=999999)

---
## ids
```python
from core import ids
```

Return the addresses of the data and mask areas.

Parameters
----------
None

Examples
--------
>>> x = np.ma.array([1, 2, 3], mask=[0, 1, 1])
>>> x.ids()
(166670640, 166659832) # may vary

If the array has no mask, the address of `nomask` is returned. This address
is typically not close to the data in memory:

>>> x = np.ma.array([1, 2, 3])
>>> x.ids()
(166691080, 3083169284) # may vary

---
## iscontiguous
```python
from core import iscontiguous
```

Return a boolean indicating whether the data is contiguous.

Parameters
----------
None

Examples
--------
>>> x = np.ma.array([1, 2, 3])
>>> x.iscontiguous()
True

`iscontiguous` returns one of the flags of the masked array:

>>> x.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  WRITEBACKIFCOPY : False

---
## all
```python
from core import all
```

Returns True if all elements evaluate to True.

The output array is masked where all the values along the given axis
are masked: if the output would have been a scalar and that all the
values are masked, then the output is `masked`.

Refer to `numpy.all` for full documentation.

See Also
--------
numpy.ndarray.all : corresponding function for ndarrays
numpy.all : equivalent function

Examples
--------
>>> np.ma.array([1,2,3]).all()
True
>>> a = np.ma.array([1,2,3], mask=True)
>>> (a.all() is np.ma.masked)
True

---
## any
```python
from core import any
```

Returns True if any of the elements of `a` evaluate to True.

Masked values are considered as False during computation.

Refer to `numpy.any` for full documentation.

See Also
--------
numpy.ndarray.any : corresponding function for ndarrays
numpy.any : equivalent function

---
## nonzero
```python
from core import nonzero
```

Return the indices of unmasked elements that are not zero.

Returns a tuple of arrays, one for each dimension, containing the
indices of the non-zero elements in that dimension. The corresponding
non-zero values can be obtained with::

    a[a.nonzero()]

To group the indices by element, rather than dimension, use
instead::

    np.transpose(a.nonzero())

The result of this is always a 2d array, with a row for each non-zero
element.

Parameters
----------
None

Returns
-------
tuple_of_arrays : tuple
    Indices of elements that are non-zero.

See Also
--------
numpy.nonzero :
    Function operating on ndarrays.
flatnonzero :
    Return indices that are non-zero in the flattened version of the input
    array.
numpy.ndarray.nonzero :
    Equivalent ndarray method.
count_nonzero :
    Counts the number of non-zero elements in the input array.

Examples
--------
>>> import numpy.ma as ma
>>> x = ma.array(np.eye(3))
>>> x
masked_array(
  data=[[1., 0., 0.],
        [0., 1., 0.],
        [0., 0., 1.]],
  mask=False,
  fill_value=1e+20)
>>> x.nonzero()
(array([0, 1, 2]), array([0, 1, 2]))

Masked elements are ignored.

>>> x[1, 1] = ma.masked
>>> x
masked_array(
  data=[[1.0, 0.0, 0.0],
        [0.0, --, 0.0],
        [0.0, 0.0, 1.0]],
  mask=[[False, False, False],
        [False,  True, False],
        [False, False, False]],
  fill_value=1e+20)
>>> x.nonzero()
(array([0, 2]), array([0, 2]))

Indices can also be grouped by element.

>>> np.transpose(x.nonzero())
array([[0, 0],
       [2, 2]])

A common use for ``nonzero`` is to find the indices of an array, where
a condition is True.  Given an array `a`, the condition `a` > 3 is a
boolean array and since False is interpreted as 0, ma.nonzero(a > 3)
yields the indices of the `a` where the condition is true.

>>> a = ma.array([[1,2,3],[4,5,6],[7,8,9]])
>>> a > 3
masked_array(
  data=[[False, False, False],
        [ True,  True,  True],
        [ True,  True,  True]],
  mask=False,
  fill_value=True)
>>> ma.nonzero(a > 3)
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))

The ``nonzero`` method of the condition array can also be called.

>>> (a > 3).nonzero()
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))

---
## trace
```python
from core import trace
```

(this docstring should be overwritten)

---
## sum
```python
from core import sum
```

Return the sum of the array elements over the given axis.

Masked elements are set to 0 internally.

Refer to `numpy.sum` for full documentation.

See Also
--------
numpy.ndarray.sum : corresponding function for ndarrays
numpy.sum : equivalent function

Examples
--------
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)
>>> x
masked_array(
  data=[[1, --, 3],
        [--, 5, --],
        [7, --, 9]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> x.sum()
25
>>> x.sum(axis=1)
masked_array(data=[4, 5, 16],
             mask=[False, False, False],
       fill_value=999999)
>>> x.sum(axis=0)
masked_array(data=[8, 5, 12],
             mask=[False, False, False],
       fill_value=999999)
>>> print(type(x.sum(axis=0, dtype=np.int64)[0]))
<class 'numpy.int64'>

---
## cumsum
```python
from core import cumsum
```

Return the cumulative sum of the array elements over the given axis.

Masked values are set to 0 internally during the computation.
However, their position is saved, and the result will be masked at
the same locations.

Refer to `numpy.cumsum` for full documentation.

Notes
-----
The mask is lost if `out` is not a valid :class:`ma.MaskedArray` !

Arithmetic is modular when using integer types, and no error is
raised on overflow.

See Also
--------
numpy.ndarray.cumsum : corresponding function for ndarrays
numpy.cumsum : equivalent function

Examples
--------
>>> marr = np.ma.array(np.arange(10), mask=[0,0,0,1,1,1,0,0,0,0])
>>> marr.cumsum()
masked_array(data=[0, 1, 3, --, --, --, 9, 16, 24, 33],
             mask=[False, False, False,  True,  True,  True, False, False,
                   False, False],
       fill_value=999999)

---
## prod
```python
from core import prod
```

Return the product of the array elements over the given axis.

Masked elements are set to 1 internally for computation.

Refer to `numpy.prod` for full documentation.

Notes
-----
Arithmetic is modular when using integer types, and no error is raised
on overflow.

See Also
--------
numpy.ndarray.prod : corresponding function for ndarrays
numpy.prod : equivalent function

---
## cumprod
```python
from core import cumprod
```

Return the cumulative product of the array elements over the given axis.

Masked values are set to 1 internally during the computation.
However, their position is saved, and the result will be masked at
the same locations.

Refer to `numpy.cumprod` for full documentation.

Notes
-----
The mask is lost if `out` is not a valid MaskedArray !

Arithmetic is modular when using integer types, and no error is
raised on overflow.

See Also
--------
numpy.ndarray.cumprod : corresponding function for ndarrays
numpy.cumprod : equivalent function

---
## mean
```python
from core import mean
```

Returns the average of the array elements along given axis.

Masked entries are ignored, and result elements which are not
finite will be masked.

Refer to `numpy.mean` for full documentation.

See Also
--------
numpy.ndarray.mean : corresponding function for ndarrays
numpy.mean : Equivalent function
numpy.ma.average : Weighted average.

Examples
--------
>>> a = np.ma.array([1,2,3], mask=[False, False, True])
>>> a
masked_array(data=[1, 2, --],
             mask=[False, False,  True],
       fill_value=999999)
>>> a.mean()
1.5

---
## anom
```python
from core import anom
```

Compute the anomalies (deviations from the arithmetic mean)
along the given axis.

Returns an array of anomalies, with the same shape as the input and
where the arithmetic mean is computed along the given axis.

Parameters
----------
axis : int, optional
    Axis over which the anomalies are taken.
    The default is to use the mean of the flattened array as reference.
dtype : dtype, optional
    Type to use in computing the variance. For arrays of integer type
     the default is float32; for arrays of float types it is the same as
     the array type.

See Also
--------
mean : Compute the mean of the array.

Examples
--------
>>> a = np.ma.array([1,2,3])
>>> a.anom()
masked_array(data=[-1.,  0.,  1.],
             mask=False,
       fill_value=1e+20)

---
## var
```python
from core import var
```

Returns the variance of the array elements along given axis.

Masked entries are ignored, and result elements which are not
finite will be masked.

Refer to `numpy.var` for full documentation.

See Also
--------
numpy.ndarray.var : corresponding function for ndarrays
numpy.var : Equivalent function

---
## std
```python
from core import std
```

Returns the standard deviation of the array elements along given axis.

Masked entries are ignored.

Refer to `numpy.std` for full documentation.

See Also
--------
numpy.ndarray.std : corresponding function for ndarrays
numpy.std : Equivalent function

---
## round
```python
from core import round
```

Return each element rounded to the given number of decimals.

Refer to `numpy.around` for full documentation.

See Also
--------
numpy.ndarray.round : corresponding function for ndarrays
numpy.around : equivalent function

---
## argmin
```python
from core import argmin
```

Return array of indices to the minimum values along the given axis.

Parameters
----------
axis : {None, integer}
    If None, the index is into the flattened array, otherwise along
    the specified axis
fill_value : scalar or None, optional
    Value used to fill in the masked values.  If None, the output of
    minimum_fill_value(self._data) is used instead.
out : {None, array}, optional
    Array into which the result can be placed. Its type is preserved
    and it must be of the right shape to hold the output.

Returns
-------
ndarray or scalar
    If multi-dimension input, returns a new ndarray of indices to the
    minimum values along the given axis.  Otherwise, returns a scalar
    of index to the minimum values along the given axis.

Examples
--------
>>> x = np.ma.array(np.arange(4), mask=[1,1,0,0])
>>> x.shape = (2,2)
>>> x
masked_array(
  data=[[--, --],
        [2, 3]],
  mask=[[ True,  True],
        [False, False]],
  fill_value=999999)
>>> x.argmin(axis=0, fill_value=-1)
array([0, 0])
>>> x.argmin(axis=0, fill_value=9)
array([1, 1])

---
## argmax
```python
from core import argmax
```

Returns array of indices of the maximum values along the given axis.
Masked values are treated as if they had the value fill_value.

Parameters
----------
axis : {None, integer}
    If None, the index is into the flattened array, otherwise along
    the specified axis
fill_value : scalar or None, optional
    Value used to fill in the masked values.  If None, the output of
    maximum_fill_value(self._data) is used instead.
out : {None, array}, optional
    Array into which the result can be placed. Its type is preserved
    and it must be of the right shape to hold the output.

Returns
-------
index_array : {integer_array}

Examples
--------
>>> a = np.arange(6).reshape(2,3)
>>> a.argmax()
5
>>> a.argmax(0)
array([1, 1, 1])
>>> a.argmax(1)
array([2, 2])

---
## partition
```python
from core import partition
```



---
## argpartition
```python
from core import argpartition
```



---
## tolist
```python
from core import tolist
```

Transforms the mvoid object into a tuple.

Masked fields are replaced by None.

Returns
-------
returned_tuple
    Tuple of fields
    

---
## tostring
```python
from core import tostring
```

A compatibility alias for `tobytes`, with exactly the same behavior.

Despite its name, it returns `bytes` not `str`\ s.

.. deprecated:: 1.19.0

---
## tobytes
```python
from core import tobytes
```

Return the array data as a string containing the raw bytes in the array.

The array is filled with a fill value before the string conversion.

.. versionadded:: 1.9.0

Parameters
----------
fill_value : scalar, optional
    Value used to fill in the masked values. Default is None, in which
    case `MaskedArray.fill_value` is used.
order : {'C','F','A'}, optional
    Order of the data item in the copy. Default is 'C'.

    - 'C'   -- C order (row major).
    - 'F'   -- Fortran order (column major).
    - 'A'   -- Any, current order of array.
    - None  -- Same as 'A'.

See Also
--------
numpy.ndarray.tobytes
tolist, tofile

Notes
-----
As for `ndarray.tobytes`, information about the shape, dtype, etc.,
but also about `fill_value`, will be lost.

Examples
--------
>>> x = np.ma.array(np.array([[1, 2], [3, 4]]), mask=[[0, 1], [1, 0]])
>>> x.tobytes()
b'\x01\x00\x00\x00\x00\x00\x00\x00?B\x0f\x00\x00\x00\x00\x00?B\x0f\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00'

---
## tofile
```python
from core import tofile
```

Save a masked array to a file in binary format.

.. warning::
  This function is not implemented yet.

Raises
------
NotImplementedError
    When `tofile` is called.

---
## toflex
```python
from core import toflex
```

Transforms a masked array into a flexible-type array.

The flexible type array that is returned will have two fields:

* the ``_data`` field stores the ``_data`` part of the array.
* the ``_mask`` field stores the ``_mask`` part of the array.

Parameters
----------
None

Returns
-------
record : ndarray
    A new flexible-type `ndarray` with two fields: the first element
    containing a value, the second element containing the corresponding
    mask boolean. The returned record shape matches self.shape.

Notes
-----
A side-effect of transforming a masked array into a flexible `ndarray` is
that meta information (``fill_value``, ...) will be lost.

Examples
--------
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)
>>> x
masked_array(
  data=[[1, --, 3],
        [--, 5, --],
        [7, --, 9]],
  mask=[[False,  True, False],
        [ True, False,  True],
        [False,  True, False]],
  fill_value=999999)
>>> x.toflex()
array([[(1, False), (2,  True), (3, False)],
       [(4,  True), (5, False), (6,  True)],
       [(7, False), (8,  True), (9, False)]],
      dtype=[('_data', '<i8'), ('_mask', '?')])

---
## __getstate__
```python
from core import __getstate__
```

Return the internal state of the masked array, for pickling
purposes.

---
## __setstate__
```python
from core import __setstate__
```

Restore the internal state of the masked array, for
pickling purposes.  ``state`` is typically the output of the
``__getstate__`` output, and is a 5-tuple:

- class name
- a tuple giving the shape of the data
- a typecode for the data
- a binary string for the data
- a binary string for the mask.

---
## __deepcopy__
```python
from core import __deepcopy__
```



---
## __len__
```python
from core import __len__
```



---
## __has_singleton
```python
from core import __has_singleton
```



---
## __array_prepare__
```python
from core import __array_prepare__
```



---
## __format__
```python
from core import __format__
```



---
## __iop__
```python
from core import __iop__
```



---
## __copy__
```python
from core import __copy__
```



---
## getdoc
```python
from core import getdoc
```

Return the doc of the function (from the doc of the method).

---
## fmask
```python
from core import fmask
```

Returns the filled array, or True if masked.

---
## nmask
```python
from core import nmask
```

Returns the mask, True if ``masked``, False if ``nomask``.

---
## _replace_return_type
```python
from core import _replace_return_type
```

Replace documentation of ``np`` function's return type.

Replaces it with the proper type for the ``np.ma`` function.

Parameters
----------
doc : str
    The documentation of the ``np`` method.
np_ret : str
    The return type string of the ``np`` method that we want to
    replace. (e.g. "out : ndarray")
np_ma_ret : str
    The return type string of the ``np.ma`` method.
    (e.g. "out : MaskedArray")

---
## _is_scalar
```python
from core import _is_scalar
```



---
## _scalar_heuristic
```python
from core import _scalar_heuristic
```

Return whether `elem` is a scalar result of indexing `arr`, or None
if undecidable without promoting nomask to a full mask

---
## _recursive_or
```python
from core import _recursive_or
```

do a|=b on each field of a, recursively

---
## __name__
```python
from timer_comparison import __name__
```



---
## ModuleTester
```python
from timer_comparison import ModuleTester
```



---
## __init__
```python
from timer_comparison import __init__
```



---
## assert_array_compare
```python
from timer_comparison import assert_array_compare
```

Assert that a comparison of two masked arrays is satisfied elementwise.

---
## assert_array_equal
```python
from timer_comparison import assert_array_equal
```

Checks the elementwise equality of two masked arrays.

---
## test_0
```python
from timer_comparison import test_0
```

Tests creation

---
## test_1
```python
from timer_comparison import test_1
```

Tests creation

---
## test_2
```python
from timer_comparison import test_2
```

Tests conversions and indexing.

---
## test_3
```python
from timer_comparison import test_3
```

Tests resize/repeat

---
## test_4
```python
from timer_comparison import test_4
```

Test of take, transpose, inner, outer products.

---
## test_5
```python
from timer_comparison import test_5
```

Tests inplace w/ scalar

---
## test_6
```python
from timer_comparison import test_6
```

Tests inplace w/ array

---
## test_7
```python
from timer_comparison import test_7
```

Tests ufunc

---
## test_99
```python
from timer_comparison import test_99
```



---
## test_A
```python
from timer_comparison import test_A
```



---
## __name__
```python
from mrecords import __name__
```

:mod:`numpy.ma..mrecords`

Defines the equivalent of :class:`numpy.recarrays` for masked arrays,
where fields can be accessed as attributes.
Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes
and the masking of individual fields.

.. moduleauthor:: Pierre Gerard-Marchant

---
## _checknames
```python
from mrecords import _checknames
```

Checks that field names ``descr`` are not reserved keywords.

If this is the case, a default 'f%i' is substituted.  If the argument
`names` is not None, updates the field names to valid names.

---
## _get_fieldmask
```python
from mrecords import _get_fieldmask
```



---
## MaskedRecords
```python
from mrecords import MaskedRecords
```

Attributes
----------
_data : recarray
    Underlying data, as a record array.
_mask : boolean array
    Mask of the records. A record is masked when all its fields are
    masked.
_fieldmask : boolean recarray
    Record array of booleans, setting the mask of each individual field
    of each record.
_fill_value : record
    Filling values for each field.

---
## _mrreconstruct
```python
from mrecords import _mrreconstruct
```

Build a new MaskedArray from the information stored in a pickle.

---
## fromarrays
```python
from mrecords import fromarrays
```

Creates a mrecarray from a (flat) list of masked arrays.

Parameters
----------
arraylist : sequence
    A list of (masked) arrays. Each element of the sequence is first converted
    to a masked array if needed. If a 2D array is passed as argument, it is
    processed line by line
dtype : {None, dtype}, optional
    Data type descriptor.
shape : {None, integer}, optional
    Number of records. If None, shape is defined from the shape of the
    first array in the list.
formats : {None, sequence}, optional
    Sequence of formats for each individual field. If None, the formats will
    be autodetected by inspecting the fields and selecting the highest dtype
    possible.
names : {None, sequence}, optional
    Sequence of the names of each field.
fill_value : {None, sequence}, optional
    Sequence of data to be used as filling values.

Notes
-----
Lists of tuples should be preferred over lists of lists for faster processing.

---
## fromrecords
```python
from mrecords import fromrecords
```

Creates a MaskedRecords from a list of records.

Parameters
----------
reclist : sequence
    A list of records. Each element of the sequence is first converted
    to a masked array if needed. If a 2D array is passed as argument, it is
    processed line by line
dtype : {None, dtype}, optional
    Data type descriptor.
shape : {None,int}, optional
    Number of records. If None, ``shape`` is defined from the shape of the
    first array in the list.
formats : {None, sequence}, optional
    Sequence of formats for each individual field. If None, the formats will
    be autodetected by inspecting the fields and selecting the highest dtype
    possible.
names : {None, sequence}, optional
    Sequence of the names of each field.
fill_value : {None, sequence}, optional
    Sequence of data to be used as filling values.
mask : {nomask, sequence}, optional.
    External mask to apply on the data.

Notes
-----
Lists of tuples should be preferred over lists of lists for faster processing.

---
## _guessvartypes
```python
from mrecords import _guessvartypes
```

Tries to guess the dtypes of the str_ ndarray `arr`.

Guesses by testing element-wise conversion. Returns a list of dtypes.
The array is first converted to ndarray. If the array is 2D, the test
is performed on the first line. An exception is raised if the file is
3D or more.

---
## openfile
```python
from mrecords import openfile
```

Opens the file handle of file `fname`.

---
## fromtextfile
```python
from mrecords import fromtextfile
```

Creates a mrecarray from data stored in the file `filename`.

Parameters
----------
fname : {file name/handle}
    Handle of an opened file.
delimiter : {None, string}, optional
    Alphanumeric character used to separate columns in the file.
    If None, any (group of) white spacestring(s) will be used.
commentchar : {'#', string}, optional
    Alphanumeric character used to mark the start of a comment.
missingchar : {'', string}, optional
    String indicating missing data, and used to create the masks.
varnames : {None, sequence}, optional
    Sequence of the variable names. If None, a list will be created from
    the first non empty line of the file.
vartypes : {None, sequence}, optional
    Sequence of the variables dtypes. If None, it will be estimated from
    the first non-commented line.


Ultra simple: the varnames are in the header, one line

---
## addfield
```python
from mrecords import addfield
```

Adds a new field to the masked record array

Uses `newfield` as data and `newfieldname` as name. If `newfieldname`
is None, the new field name is set to 'fi', where `i` is the number of
existing fields.

---
## __new__
```python
from mrecords import __new__
```



---
## __array_finalize__
```python
from mrecords import __array_finalize__
```



---
## _data
```python
from mrecords import _data
```

Returns the data as a recarray.

---
## _fieldmask
```python
from mrecords import _fieldmask
```

Alias to mask.

---
## __len__
```python
from mrecords import __len__
```

Returns the length

---
## __getattribute__
```python
from mrecords import __getattribute__
```



---
## __setattr__
```python
from mrecords import __setattr__
```

Sets the attribute attr to the value val.

---
## __getitem__
```python
from mrecords import __getitem__
```

Returns all the fields sharing the same fieldname base.

The fieldname base is either `_data` or `_mask`.

---
## __setitem__
```python
from mrecords import __setitem__
```

Sets the given record to value.

---
## __str__
```python
from mrecords import __str__
```

Calculates the string representation.

---
## __repr__
```python
from mrecords import __repr__
```

Calculates the repr representation.

---
## view
```python
from mrecords import view
```

Returns a view of the mrecarray.

---
## harden_mask
```python
from mrecords import harden_mask
```

Forces the mask to hard.

---
## soften_mask
```python
from mrecords import soften_mask
```

Forces the mask to soft

---
## copy
```python
from mrecords import copy
```

Returns a copy of the masked record.

---
## tolist
```python
from mrecords import tolist
```

Return the data portion of the array as a list.

Data items are converted to the nearest compatible Python type.
Masked values are converted to fill_value. If fill_value is None,
the corresponding entries in the output list will be ``None``.

---
## __getstate__
```python
from mrecords import __getstate__
```

Return the internal state of the masked array.

This is for pickling.

---
## __setstate__
```python
from mrecords import __setstate__
```

Restore the internal state of the masked array.

This is for pickling.  ``state`` is typically the output of the
``__getstate__`` output, and is a 5-tuple:

- class name
- a tuple giving the shape of the data
- a typecode for the data
- a binary string for the data
- a binary string for the mask.

---
## __reduce__
```python
from mrecords import __reduce__
```

Return a 3-tuple for pickling a MaskedArray.

---
## __name__
```python
from _multiarray_umath import __name__
```



---
## __name__
```python
from _char_codes import __name__
```



---
## __name__
```python
from _extended_precision import __name__
```

A module with platform-specific extended precision
`numpy.number` subclasses.

The subclasses are defined here (instead of ``__init__.pyi``) such
that they can be imported conditionally via the numpy's mypy plugin.

---
## __name__
```python
from _nbit import __name__
```

A module with the precisions of platform-specific `~numpy.number`s.

---
## NBitBase
```python
from __init__ import NBitBase
```

A type representing `numpy.number` precision during static type checking.

Used exclusively for the purpose static type checking, `NBitBase`
represents the base of a hierarchical set of subclasses.
Each subsequent subclass is herein used for representing a lower level
of precision, *e.g.* ``64Bit > 32Bit > 16Bit``.

.. versionadded:: 1.20

Examples
--------
Below is a typical usage example: `NBitBase` is herein used for annotating
a function that takes a float and integer of arbitrary precision
as arguments and returns a new float of whichever precision is largest
(*e.g.* ``np.float16 + np.int64 -> np.float64``).

.. code-block:: python

    >>> from __future__ import annotations
    >>> from typing import TypeVar, TYPE_CHECKING
    >>> import numpy as np
    >>> import numpy.typing as npt

    >>> T1 = TypeVar("T1", bound=npt.NBitBase)
    >>> T2 = TypeVar("T2", bound=npt.NBitBase)

    >>> def add(a: np.floating[T1], b: np.integer[T2]) -> np.floating[T1 | T2]:
    ...     return a + b

    >>> a = np.float16()
    >>> b = np.int64()
    >>> out = add(a, b)

    >>> if TYPE_CHECKING:
    ...     reveal_locals()
    ...     # note: Revealed local types are:
    ...     # note:     a: numpy.floating[numpy.typing._16Bit*]
    ...     # note:     b: numpy.signedinteger[numpy.typing._64Bit*]
    ...     # note:     out: numpy.floating[numpy.typing._64Bit*]

---
## _256Bit
```python
from __init__ import _256Bit
```



---
## _128Bit
```python
from __init__ import _128Bit
```



---
## _96Bit
```python
from __init__ import _96Bit
```



---
## _80Bit
```python
from __init__ import _80Bit
```



---
## _64Bit
```python
from __init__ import _64Bit
```



---
## _32Bit
```python
from __init__ import _32Bit
```



---
## _16Bit
```python
from __init__ import _16Bit
```



---
## _8Bit
```python
from __init__ import _8Bit
```



---
## __name__
```python
from _dtype_like import __name__
```



---
## _DTypeDictBase
```python
from _dtype_like import _DTypeDictBase
```



---
## _DTypeDict
```python
from _dtype_like import _DTypeDict
```



---
## _SupportsDType
```python
from _dtype_like import _SupportsDType
```



---
## dtype
```python
from _dtype_like import dtype
```



---
## __name__
```python
from _array_like import __name__
```



---
## _SupportsArray
```python
from _array_like import _SupportsArray
```



---
## _SupportsArrayFunc
```python
from _array_like import _SupportsArrayFunc
```

A protocol class representing `~class.__array_function__`.

---
## _UnknownType
```python
from _array_like import _UnknownType
```



---
## __array__
```python
from _array_like import __array__
```



---
## __array_function__
```python
from _array_like import __array_function__
```



---
## __name__
```python
from _scalars import __name__
```



---
## __name__
```python
from _shape import __name__
```



---
## __name__
```python
from _add_docstring import __name__
```

A module for creating docstrings for sphinx ``data`` domains.

---
## add_newdoc
```python
from _add_docstring import add_newdoc
```

Append ``_docstrings_list`` with a docstring for `name`.

Parameters
----------
name : str
    The name of the object.
value : str
    A string-representation of the object.
doc : str
    The docstring of the object.

---
## _parse_docstrings
```python
from _add_docstring import _parse_docstrings
```

Convert all docstrings in ``_docstrings_list`` into a single
sphinx-legible text block.

---
## __name__
```python
from _nested_sequence import __name__
```

A module containing the `_NestedSequence` protocol.

---
## _NestedSequence
```python
from _nested_sequence import _NestedSequence
```

A protocol for representing nested sequences.

Warning
-------
`_NestedSequence` currently does not work in combination with typevars,
*e.g.* ``def func(a: _NestedSequnce[T]) -> T: ...``.

See Also
--------
collections.abc.Sequence
    ABCs for read-only and mutable :term:`sequences`.

Examples
--------
.. code-block:: python

    >>> from __future__ import annotations

    >>> from typing import TYPE_CHECKING
    >>> import numpy as np
    >>> from numpy._typing import _NestedSequence

    >>> def get_dtype(seq: _NestedSequence[float]) -> np.dtype[np.float64]:
    ...     return np.asarray(seq).dtype

    >>> a = get_dtype([1.0])
    >>> b = get_dtype([[1.0]])
    >>> c = get_dtype([[[1.0]]])
    >>> d = get_dtype([[[[1.0]]]])

    >>> if TYPE_CHECKING:
    ...     reveal_locals()
    ...     # note: Revealed local types are:
    ...     # note:     a: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
    ...     # note:     b: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
    ...     # note:     c: numpy.dtype[numpy.floating[numpy._typing._64Bit]]
    ...     # note:     d: numpy.dtype[numpy.floating[numpy._typing._64Bit]]

---
## __len__
```python
from _nested_sequence import __len__
```

Implement ``len(self)``.

---
## __getitem__
```python
from _nested_sequence import __getitem__
```

Implement ``self[x]``.

---
## __contains__
```python
from _nested_sequence import __contains__
```

Implement ``x in self``.

---
## __iter__
```python
from _nested_sequence import __iter__
```

Implement ``iter(self)``.

---
## __reversed__
```python
from _nested_sequence import __reversed__
```

Implement ``reversed(self)``.

---
## count
```python
from _nested_sequence import count
```

Return the number of occurrences of `value`.

---
## index
```python
from _nested_sequence import index
```

Return the first index of `value`.

---
## __name__
```python
from test_warnings import __name__
```



---
## ParseCall
```python
from test_warnings import ParseCall
```



---
## FindFuncs
```python
from test_warnings import FindFuncs
```



---
## test_warning_calls
```python
from test_warnings import test_warning_calls
```



---
## __init__
```python
from test_warnings import __init__
```



---
## visit_Attribute
```python
from test_warnings import visit_Attribute
```



---
## visit_Name
```python
from test_warnings import visit_Name
```



---
## visit_Call
```python
from test_warnings import visit_Call
```



---
## __name__
```python
from test_matlib import __name__
```



---
## test_empty
```python
from test_matlib import test_empty
```



---
## test_ones
```python
from test_matlib import test_ones
```



---
## test_zeros
```python
from test_matlib import test_zeros
```



---
## test_identity
```python
from test_matlib import test_identity
```



---
## test_eye
```python
from test_matlib import test_eye
```



---
## test_rand
```python
from test_matlib import test_rand
```



---
## test_randn
```python
from test_matlib import test_randn
```



---
## test_repmat
```python
from test_matlib import test_repmat
```



---
## __name__
```python
from test_ctypeslib import __name__
```



---
## TestLoadLibrary
```python
from test_ctypeslib import TestLoadLibrary
```



---
## TestNdpointer
```python
from test_ctypeslib import TestNdpointer
```



---
## TestNdpointerCFunc
```python
from test_ctypeslib import TestNdpointerCFunc
```



---
## TestAsArray
```python
from test_ctypeslib import TestAsArray
```



---
## TestAsCtypesType
```python
from test_ctypeslib import TestAsCtypesType
```

Test conversion from dtypes to ctypes types 

---
## test_basic
```python
from test_ctypeslib import test_basic
```



---
## test_basic2
```python
from test_ctypeslib import test_basic2
```



---
## test_dtype
```python
from test_ctypeslib import test_dtype
```



---
## test_ndim
```python
from test_ctypeslib import test_ndim
```



---
## test_shape
```python
from test_ctypeslib import test_shape
```



---
## test_flags
```python
from test_ctypeslib import test_flags
```



---
## test_cache
```python
from test_ctypeslib import test_cache
```



---
## test_arguments
```python
from test_ctypeslib import test_arguments
```

Test that arguments are coerced from arrays 

---
## test_return
```python
from test_ctypeslib import test_return
```

Test that return values are coerced to arrays 

---
## test_vague_return_value
```python
from test_ctypeslib import test_vague_return_value
```

Test that vague ndpointer return values do not promote to arrays 

---
## test_array
```python
from test_ctypeslib import test_array
```



---
## test_pointer
```python
from test_ctypeslib import test_pointer
```



---
## test_struct_array_pointer
```python
from test_ctypeslib import test_struct_array_pointer
```



---
## test_reference_cycles
```python
from test_ctypeslib import test_reference_cycles
```



---
## test_segmentation_fault
```python
from test_ctypeslib import test_segmentation_fault
```



---
## test_scalar
```python
from test_ctypeslib import test_scalar
```



---
## test_subarray
```python
from test_ctypeslib import test_subarray
```



---
## test_structure
```python
from test_ctypeslib import test_structure
```



---
## test_structure_aligned
```python
from test_ctypeslib import test_structure_aligned
```



---
## test_union
```python
from test_ctypeslib import test_union
```



---
## test_padded_union
```python
from test_ctypeslib import test_padded_union
```



---
## test_overlapping
```python
from test_ctypeslib import test_overlapping
```



---
## Struct
```python
from test_ctypeslib import Struct
```



---
## check
```python
from test_ctypeslib import check
```



---
## __name__
```python
from test_lazyloading import __name__
```



---
## test_lazy_load
```python
from test_lazyloading import test_lazy_load
```



---
## __name__
```python
from test__all__ import __name__
```



---
## test_no_duplicates_in_np__all__
```python
from test__all__ import test_no_duplicates_in_np__all__
```



---
## __name__
```python
from test_numpy_version import __name__
```

Check the numpy version is valid.

Note that a development version is marked by the presence of 'dev0' or '+'
in the version string, all else is treated as a release. The version string
itself is set from the output of ``git describe`` which relies on tags.

Examples
--------

Valid Development: 1.22.0.dev0 1.22.0.dev0+5-g7999db4df2 1.22.0+5-g7999db4df2
Valid Release: 1.21.0.rc1, 1.21.0.b1, 1.21.0
Invalid: 1.22.0.dev, 1.22.0.dev0-5-g7999db4dfB, 1.21.0.d1, 1.21.a

Note that a release is determined by the version string, which in turn
is controlled by the result of the ``git describe`` command.

---
## test_valid_numpy_version
```python
from test_numpy_version import test_valid_numpy_version
```



---
## test_short_version
```python
from test_numpy_version import test_short_version
```



---
## __name__
```python
from test_reloading import __name__
```



---
## test_numpy_reloading
```python
from test_reloading import test_numpy_reloading
```



---
## test_novalue
```python
from test_reloading import test_novalue
```



---
## test_full_reimport
```python
from test_reloading import test_full_reimport
```

At the time of writing this, it is *not* truly supported, but
apparently enough users rely on it, for it to be an annoying change
when it started failing previously.

---
## __name__
```python
from test_public_api import __name__
```



---
## check_dir
```python
from test_public_api import check_dir
```

Returns a mapping of all objects with the wrong __module__ attribute.

---
## test_numpy_namespace
```python
from test_public_api import test_numpy_namespace
```



---
## test_import_lazy_import
```python
from test_public_api import test_import_lazy_import
```

Make sure we can actually use the modules we lazy load.

While not exported as part of the public API, it was accessible.  With the
use of __getattr__ and __dir__, this isn't always true It can happen that
an infinite recursion may happen.

This is the only way I found that would force the failure to appear on the
badly implemented code.

We also test for the presence of the lazily imported modules in dir

---
## test_dir_testing
```python
from test_public_api import test_dir_testing
```

Assert that output of dir has only one "testing/tester"
attribute without duplicate

---
## test_numpy_linalg
```python
from test_public_api import test_numpy_linalg
```



---
## test_numpy_fft
```python
from test_public_api import test_numpy_fft
```



---
## test_NPY_NO_EXPORT
```python
from test_public_api import test_NPY_NO_EXPORT
```



---
## is_unexpected
```python
from test_public_api import is_unexpected
```

Check if this needs to be considered.

---
## test_all_modules_are_expected
```python
from test_public_api import test_all_modules_are_expected
```

Test that we don't add anything that looks like a new public module by
accident.  Check is based on filenames.

---
## test_all_modules_are_expected_2
```python
from test_public_api import test_all_modules_are_expected_2
```

Method checking all objects. The pkgutil-based method in
`test_all_modules_are_expected` does not catch imports into a namespace,
only filenames.  So this test is more thorough, and checks this like:

    import .lib.scimath as emath

To check if something in a module is (effectively) public, one can check if
there's anything in that namespace that's a public function/object but is
not exposed in a higher-level namespace.  For example for a `numpy.lib`
submodule::

    mod = np.lib.mixins
    for obj in mod.__all__:
        if obj in np.__all__:
            continue
        elif obj in np.lib.__all__:
            continue

        else:
            print(obj)

---
## test_api_importable
```python
from test_public_api import test_api_importable
```

Check that all submodules listed higher up in this file can be imported

Note that if a PRIVATE_BUT_PRESENT_MODULES entry goes missing, it may
simply need to be removed from the list (deprecation may or may not be
needed - apply common sense).

---
## test_array_api_entry_point
```python
from test_public_api import test_array_api_entry_point
```

Entry point for Array API implementation can be found with importlib and
returns the numpy.array_api namespace.

---
## test_moved_exceptions
```python
from test_public_api import test_moved_exceptions
```



---
## find_unexpected_members
```python
from test_public_api import find_unexpected_members
```



---
## check_importable
```python
from test_public_api import check_importable
```



---
## __name__
```python
from test_scripts import __name__
```

Test scripts

Test that we can run executable scripts that have been installed with numpy.

---
## find_f2py_commands
```python
from test_scripts import find_f2py_commands
```



---
## test_f2py
```python
from test_scripts import test_f2py
```



---
## test_pep338
```python
from test_scripts import test_pep338
```



---
## __name__
```python
from test_numpy_config import __name__
```

Check the numpy config is valid.

---
## TestNumPyConfigs
```python
from test_numpy_config import TestNumPyConfigs
```



---
## test_pyyaml_not_found
```python
from test_numpy_config import test_pyyaml_not_found
```



---
## test_dict_mode
```python
from test_numpy_config import test_dict_mode
```



---
## test_invalid_mode
```python
from test_numpy_config import test_invalid_mode
```



---
## test_warn_to_add_tests
```python
from test_numpy_config import test_warn_to_add_tests
```



---
## __name__
```python
from test_pyinstaller import __name__
```



---
## test_pyinstaller
```python
from test_pyinstaller import test_pyinstaller
```

Compile and run pyinstaller-smoke.py using PyInstaller.

---
## __name__
```python
from hook-numpy import __name__
```

This hook should collect all binary files and any hidden modules that numpy
needs.

Our (some-what inadequate) docs for writing PyInstaller hooks are kept here:
https://pyinstaller.readthedocs.io/en/stable/hooks.html

---
## __name__
```python
from pyinstaller-smoke import __name__
```

A crude *bit of everything* smoke test to verify PyInstaller compatibility.

PyInstaller typically goes wrong by forgetting to package modules, extension
modules or shared libraries. This script should aim to touch as many of those
as possible in an attempt to trip a ModuleNotFoundError or a DLL load failure
due to an uncollected resource. Missing resources are unlikely to lead to
arithmetic errors so there's generally no need to verify any calculation's
output - merely that it made it to the end OK. This script should not
explicitly import any of numpy's submodules as that gives PyInstaller undue
hints that those submodules exist and should be collected (accessing implicitly
loaded submodules is OK).

---
## __name__
```python
from _elementwise_functions import __name__
```



---
## abs
```python
from _elementwise_functions import abs
```

Array API compatible wrapper for :py:func:`np.abs <numpy.abs>`.

See its docstring for more information.

---
## acos
```python
from _elementwise_functions import acos
```

Array API compatible wrapper for :py:func:`np.arccos <numpy.arccos>`.

See its docstring for more information.

---
## acosh
```python
from _elementwise_functions import acosh
```

Array API compatible wrapper for :py:func:`np.arccosh <numpy.arccosh>`.

See its docstring for more information.

---
## add
```python
from _elementwise_functions import add
```

Array API compatible wrapper for :py:func:`np.add <numpy.add>`.

See its docstring for more information.

---
## asin
```python
from _elementwise_functions import asin
```

Array API compatible wrapper for :py:func:`np.arcsin <numpy.arcsin>`.

See its docstring for more information.

---
## asinh
```python
from _elementwise_functions import asinh
```

Array API compatible wrapper for :py:func:`np.arcsinh <numpy.arcsinh>`.

See its docstring for more information.

---
## atan
```python
from _elementwise_functions import atan
```

Array API compatible wrapper for :py:func:`np.arctan <numpy.arctan>`.

See its docstring for more information.

---
## atan2
```python
from _elementwise_functions import atan2
```

Array API compatible wrapper for :py:func:`np.arctan2 <numpy.arctan2>`.

See its docstring for more information.

---
## atanh
```python
from _elementwise_functions import atanh
```

Array API compatible wrapper for :py:func:`np.arctanh <numpy.arctanh>`.

See its docstring for more information.

---
## bitwise_and
```python
from _elementwise_functions import bitwise_and
```

Array API compatible wrapper for :py:func:`np.bitwise_and <numpy.bitwise_and>`.

See its docstring for more information.

---
## bitwise_left_shift
```python
from _elementwise_functions import bitwise_left_shift
```

Array API compatible wrapper for :py:func:`np.left_shift <numpy.left_shift>`.

See its docstring for more information.

---
## bitwise_invert
```python
from _elementwise_functions import bitwise_invert
```

Array API compatible wrapper for :py:func:`np.invert <numpy.invert>`.

See its docstring for more information.

---
## bitwise_or
```python
from _elementwise_functions import bitwise_or
```

Array API compatible wrapper for :py:func:`np.bitwise_or <numpy.bitwise_or>`.

See its docstring for more information.

---
## bitwise_right_shift
```python
from _elementwise_functions import bitwise_right_shift
```

Array API compatible wrapper for :py:func:`np.right_shift <numpy.right_shift>`.

See its docstring for more information.

---
## bitwise_xor
```python
from _elementwise_functions import bitwise_xor
```

Array API compatible wrapper for :py:func:`np.bitwise_xor <numpy.bitwise_xor>`.

See its docstring for more information.

---
## ceil
```python
from _elementwise_functions import ceil
```

Array API compatible wrapper for :py:func:`np.ceil <numpy.ceil>`.

See its docstring for more information.

---
## conj
```python
from _elementwise_functions import conj
```

Array API compatible wrapper for :py:func:`np.conj <numpy.conj>`.

See its docstring for more information.

---
## cos
```python
from _elementwise_functions import cos
```

Array API compatible wrapper for :py:func:`np.cos <numpy.cos>`.

See its docstring for more information.

---
## cosh
```python
from _elementwise_functions import cosh
```

Array API compatible wrapper for :py:func:`np.cosh <numpy.cosh>`.

See its docstring for more information.

---
## divide
```python
from _elementwise_functions import divide
```

Array API compatible wrapper for :py:func:`np.divide <numpy.divide>`.

See its docstring for more information.

---
## equal
```python
from _elementwise_functions import equal
```

Array API compatible wrapper for :py:func:`np.equal <numpy.equal>`.

See its docstring for more information.

---
## exp
```python
from _elementwise_functions import exp
```

Array API compatible wrapper for :py:func:`np.exp <numpy.exp>`.

See its docstring for more information.

---
## expm1
```python
from _elementwise_functions import expm1
```

Array API compatible wrapper for :py:func:`np.expm1 <numpy.expm1>`.

See its docstring for more information.

---
## floor
```python
from _elementwise_functions import floor
```

Array API compatible wrapper for :py:func:`np.floor <numpy.floor>`.

See its docstring for more information.

---
## floor_divide
```python
from _elementwise_functions import floor_divide
```

Array API compatible wrapper for :py:func:`np.floor_divide <numpy.floor_divide>`.

See its docstring for more information.

---
## greater
```python
from _elementwise_functions import greater
```

Array API compatible wrapper for :py:func:`np.greater <numpy.greater>`.

See its docstring for more information.

---
## greater_equal
```python
from _elementwise_functions import greater_equal
```

Array API compatible wrapper for :py:func:`np.greater_equal <numpy.greater_equal>`.

See its docstring for more information.

---
## imag
```python
from _elementwise_functions import imag
```

Array API compatible wrapper for :py:func:`np.imag <numpy.imag>`.

See its docstring for more information.

---
## isfinite
```python
from _elementwise_functions import isfinite
```

Array API compatible wrapper for :py:func:`np.isfinite <numpy.isfinite>`.

See its docstring for more information.

---
## isinf
```python
from _elementwise_functions import isinf
```

Array API compatible wrapper for :py:func:`np.isinf <numpy.isinf>`.

See its docstring for more information.

---
## isnan
```python
from _elementwise_functions import isnan
```

Array API compatible wrapper for :py:func:`np.isnan <numpy.isnan>`.

See its docstring for more information.

---
## less
```python
from _elementwise_functions import less
```

Array API compatible wrapper for :py:func:`np.less <numpy.less>`.

See its docstring for more information.

---
## less_equal
```python
from _elementwise_functions import less_equal
```

Array API compatible wrapper for :py:func:`np.less_equal <numpy.less_equal>`.

See its docstring for more information.

---
## log
```python
from _elementwise_functions import log
```

Array API compatible wrapper for :py:func:`np.log <numpy.log>`.

See its docstring for more information.

---
## log1p
```python
from _elementwise_functions import log1p
```

Array API compatible wrapper for :py:func:`np.log1p <numpy.log1p>`.

See its docstring for more information.

---
## log2
```python
from _elementwise_functions import log2
```

Array API compatible wrapper for :py:func:`np.log2 <numpy.log2>`.

See its docstring for more information.

---
## log10
```python
from _elementwise_functions import log10
```

Array API compatible wrapper for :py:func:`np.log10 <numpy.log10>`.

See its docstring for more information.

---
## logaddexp
```python
from _elementwise_functions import logaddexp
```

Array API compatible wrapper for :py:func:`np.logaddexp <numpy.logaddexp>`.

See its docstring for more information.

---
## logical_and
```python
from _elementwise_functions import logical_and
```

Array API compatible wrapper for :py:func:`np.logical_and <numpy.logical_and>`.

See its docstring for more information.

---
## logical_not
```python
from _elementwise_functions import logical_not
```

Array API compatible wrapper for :py:func:`np.logical_not <numpy.logical_not>`.

See its docstring for more information.

---
## logical_or
```python
from _elementwise_functions import logical_or
```

Array API compatible wrapper for :py:func:`np.logical_or <numpy.logical_or>`.

See its docstring for more information.

---
## logical_xor
```python
from _elementwise_functions import logical_xor
```

Array API compatible wrapper for :py:func:`np.logical_xor <numpy.logical_xor>`.

See its docstring for more information.

---
## multiply
```python
from _elementwise_functions import multiply
```

Array API compatible wrapper for :py:func:`np.multiply <numpy.multiply>`.

See its docstring for more information.

---
## negative
```python
from _elementwise_functions import negative
```

Array API compatible wrapper for :py:func:`np.negative <numpy.negative>`.

See its docstring for more information.

---
## not_equal
```python
from _elementwise_functions import not_equal
```

Array API compatible wrapper for :py:func:`np.not_equal <numpy.not_equal>`.

See its docstring for more information.

---
## positive
```python
from _elementwise_functions import positive
```

Array API compatible wrapper for :py:func:`np.positive <numpy.positive>`.

See its docstring for more information.

---
## pow
```python
from _elementwise_functions import pow
```

Array API compatible wrapper for :py:func:`np.power <numpy.power>`.

See its docstring for more information.

---
## real
```python
from _elementwise_functions import real
```

Array API compatible wrapper for :py:func:`np.real <numpy.real>`.

See its docstring for more information.

---
## remainder
```python
from _elementwise_functions import remainder
```

Array API compatible wrapper for :py:func:`np.remainder <numpy.remainder>`.

See its docstring for more information.

---
## round
```python
from _elementwise_functions import round
```

Array API compatible wrapper for :py:func:`np.round <numpy.round>`.

See its docstring for more information.

---
## sign
```python
from _elementwise_functions import sign
```

Array API compatible wrapper for :py:func:`np.sign <numpy.sign>`.

See its docstring for more information.

---
## sin
```python
from _elementwise_functions import sin
```

Array API compatible wrapper for :py:func:`np.sin <numpy.sin>`.

See its docstring for more information.

---
## sinh
```python
from _elementwise_functions import sinh
```

Array API compatible wrapper for :py:func:`np.sinh <numpy.sinh>`.

See its docstring for more information.

---
## square
```python
from _elementwise_functions import square
```

Array API compatible wrapper for :py:func:`np.square <numpy.square>`.

See its docstring for more information.

---
## sqrt
```python
from _elementwise_functions import sqrt
```

Array API compatible wrapper for :py:func:`np.sqrt <numpy.sqrt>`.

See its docstring for more information.

---
## subtract
```python
from _elementwise_functions import subtract
```

Array API compatible wrapper for :py:func:`np.subtract <numpy.subtract>`.

See its docstring for more information.

---
## tan
```python
from _elementwise_functions import tan
```

Array API compatible wrapper for :py:func:`np.tan <numpy.tan>`.

See its docstring for more information.

---
## tanh
```python
from _elementwise_functions import tanh
```

Array API compatible wrapper for :py:func:`np.tanh <numpy.tanh>`.

See its docstring for more information.

---
## trunc
```python
from _elementwise_functions import trunc
```

Array API compatible wrapper for :py:func:`np.trunc <numpy.trunc>`.

See its docstring for more information.

---
## __name__
```python
from _sorting_functions import __name__
```



---
## argsort
```python
from _sorting_functions import argsort
```

Array API compatible wrapper for :py:func:`np.argsort <numpy.argsort>`.

See its docstring for more information.

---
## sort
```python
from _sorting_functions import sort
```

Array API compatible wrapper for :py:func:`np.sort <numpy.sort>`.

See its docstring for more information.

---
## __name__
```python
from _manipulation_functions import __name__
```



---
## concat
```python
from _manipulation_functions import concat
```

Array API compatible wrapper for :py:func:`np.concatenate <numpy.concatenate>`.

See its docstring for more information.

---
## expand_dims
```python
from _manipulation_functions import expand_dims
```

Array API compatible wrapper for :py:func:`np.expand_dims <numpy.expand_dims>`.

See its docstring for more information.

---
## flip
```python
from _manipulation_functions import flip
```

Array API compatible wrapper for :py:func:`np.flip <numpy.flip>`.

See its docstring for more information.

---
## permute_dims
```python
from _manipulation_functions import permute_dims
```

Array API compatible wrapper for :py:func:`np.transpose <numpy.transpose>`.

See its docstring for more information.

---
## reshape
```python
from _manipulation_functions import reshape
```

Array API compatible wrapper for :py:func:`np.reshape <numpy.reshape>`.

See its docstring for more information.

---
## roll
```python
from _manipulation_functions import roll
```

Array API compatible wrapper for :py:func:`np.roll <numpy.roll>`.

See its docstring for more information.

---
## squeeze
```python
from _manipulation_functions import squeeze
```

Array API compatible wrapper for :py:func:`np.squeeze <numpy.squeeze>`.

See its docstring for more information.

---
## stack
```python
from _manipulation_functions import stack
```

Array API compatible wrapper for :py:func:`np.stack <numpy.stack>`.

See its docstring for more information.

---
## __name__
```python
from _searching_functions import __name__
```



---
## argmax
```python
from _searching_functions import argmax
```

Array API compatible wrapper for :py:func:`np.argmax <numpy.argmax>`.

See its docstring for more information.

---
## argmin
```python
from _searching_functions import argmin
```

Array API compatible wrapper for :py:func:`np.argmin <numpy.argmin>`.

See its docstring for more information.

---
## nonzero
```python
from _searching_functions import nonzero
```

Array API compatible wrapper for :py:func:`np.nonzero <numpy.nonzero>`.

See its docstring for more information.

---
## where
```python
from _searching_functions import where
```

Array API compatible wrapper for :py:func:`np.where <numpy.where>`.

See its docstring for more information.

---
## NestedSequence
```python
from _typing import NestedSequence
```



---
## SupportsDLPack
```python
from _typing import SupportsDLPack
```



---
## __dlpack__
```python
from _typing import __dlpack__
```



---
## __name__
```python
from _indexing_functions import __name__
```



---
## take
```python
from _indexing_functions import take
```

Array API compatible wrapper for :py:func:`np.take <numpy.take>`.

See its docstring for more information.

---
## __name__
```python
from _utility_functions import __name__
```



---
## all
```python
from _utility_functions import all
```

Array API compatible wrapper for :py:func:`np.all <numpy.all>`.

See its docstring for more information.

---
## any
```python
from _utility_functions import any
```

Array API compatible wrapper for :py:func:`np.any <numpy.any>`.

See its docstring for more information.

---
## __name__
```python
from _array_object import __name__
```

Wrapper class around the ndarray object for the array API standard.

The array API standard defines some behaviors differently than ndarray, in
particular, type promotion rules are different (the standard has no
value-based casting). The standard also specifies a more limited subset of
array methods and functionalities than are implemented on ndarray. Since the
goal of the array_api namespace is to be a minimal implementation of the array
API standard, we need to define a separate wrapper class for the array_api
namespace.

The standard compliant class is only a wrapper class. It is *not* a subclass
of ndarray.

---
## Array
```python
from _array_object import Array
```

n-d array object for the array API namespace.

See the docstring of :py:obj:`np.ndarray <numpy.ndarray>` for more
information.

This is a wrapper around numpy.ndarray that restricts the usage to only
those things that are required by the array API namespace. Note,
attributes on this object that start with a single underscore are not part
of the API specification and should only be used internally. This object
should not be constructed directly. Rather, use one of the creation
functions, such as asarray().

---
## _new
```python
from _array_object import _new
```

This is a private method for initializing the array API Array
object.

Functions outside of the array_api submodule should not use this
method. Use one of the creation functions instead, such as
``asarray``.

---
## __new__
```python
from _array_object import __new__
```



---
## __str__
```python
from _array_object import __str__
```

Performs the operation __str__.

---
## __repr__
```python
from _array_object import __repr__
```

Performs the operation __repr__.

---
## __array__
```python
from _array_object import __array__
```

Warning: this method is NOT part of the array API spec. Implementers
of other libraries need not include it, and users should not assume it
will be present in other implementations.

---
## _check_allowed_dtypes
```python
from _array_object import _check_allowed_dtypes
```

Helper function for operators to only allow specific input dtypes

Use like

    other = self._check_allowed_dtypes(other, 'numeric', '__add__')
    if other is NotImplemented:
        return other

---
## _promote_scalar
```python
from _array_object import _promote_scalar
```

Returns a promoted version of a Python scalar appropriate for use with
operations on self.

This may raise an OverflowError in cases where the scalar is an
integer that is too large to fit in a NumPy integer dtype, or
TypeError when the scalar type is incompatible with the dtype of self.

---
## _normalize_two_args
```python
from _array_object import _normalize_two_args
```

Normalize inputs to two arg functions to fix type promotion rules

NumPy deviates from the spec type promotion rules in cases where one
argument is 0-dimensional and the other is not. For example:

>>> import numpy as np
>>> a = np.array([1.0], dtype=np.float32)
>>> b = np.array(1.0, dtype=np.float64)
>>> np.add(a, b) # The spec says this should be float64
array([2.], dtype=float32)

To fix this, we add a dimension to the 0-dimension array before passing it
through. This works because a dimension would be added anyway from
broadcasting, so the resulting shape is the same, but this prevents NumPy
from not promoting the dtype.

---
## _validate_index
```python
from _array_object import _validate_index
```

Validate an index according to the array API.

The array API specification only requires a subset of indices that are
supported by NumPy. This function will reject any index that is
allowed by NumPy but not required by the array API specification. We
always raise ``IndexError`` on such indices (the spec does not require
any specific behavior on them, but this makes the NumPy array API
namespace a minimal implementation of the spec). See
https://data-apis.org/array-api/latest/API_specification/indexing.html
for the full list of required indexing behavior

This function raises IndexError if the index ``key`` is invalid. It
only raises ``IndexError`` on indices that are not already rejected by
NumPy, as NumPy will already raise the appropriate error on such
indices. ``shape`` may be None, in which case, only cases that are
independent of the array shape are checked.

The following cases are allowed by NumPy, but not specified by the array
API specification:

- Indices to not include an implicit ellipsis at the end. That is,
  every axis of an array must be explicitly indexed or an ellipsis
  included. This behaviour is sometimes referred to as flat indexing.

- The start and stop of a slice may not be out of bounds. In
  particular, for a slice ``i:j:k`` on an axis of size ``n``, only the
  following are allowed:

  - ``i`` or ``j`` omitted (``None``).
  - ``-n <= i <= max(0, n - 1)``.
  - For ``k > 0`` or ``k`` omitted (``None``), ``-n <= j <= n``.
  - For ``k < 0``, ``-n - 1 <= j <= max(0, n - 1)``.

- Boolean array indices are not allowed as part of a larger tuple
  index.

- Integer array indices are not allowed (with the exception of 0-D
  arrays, which are treated the same as scalars).

Additionally, it should be noted that indices that would return a
scalar in NumPy will return a 0-D array. Array scalars are not allowed
in the specification, only 0-D arrays. This is done in the
``Array._new`` constructor, not this function.

---
## __abs__
```python
from _array_object import __abs__
```

Performs the operation __abs__.

---
## __add__
```python
from _array_object import __add__
```

Performs the operation __add__.

---
## __and__
```python
from _array_object import __and__
```

Performs the operation __and__.

---
## __array_namespace__
```python
from _array_object import __array_namespace__
```



---
## __bool__
```python
from _array_object import __bool__
```

Performs the operation __bool__.

---
## __complex__
```python
from _array_object import __complex__
```

Performs the operation __complex__.

---
## __dlpack__
```python
from _array_object import __dlpack__
```

Performs the operation __dlpack__.

---
## __dlpack_device__
```python
from _array_object import __dlpack_device__
```

Performs the operation __dlpack_device__.

---
## __eq__
```python
from _array_object import __eq__
```

Performs the operation __eq__.

---
## __float__
```python
from _array_object import __float__
```

Performs the operation __float__.

---
## __floordiv__
```python
from _array_object import __floordiv__
```

Performs the operation __floordiv__.

---
## __ge__
```python
from _array_object import __ge__
```

Performs the operation __ge__.

---
## __getitem__
```python
from _array_object import __getitem__
```

Performs the operation __getitem__.

---
## __gt__
```python
from _array_object import __gt__
```

Performs the operation __gt__.

---
## __int__
```python
from _array_object import __int__
```

Performs the operation __int__.

---
## __index__
```python
from _array_object import __index__
```

Performs the operation __index__.

---
## __invert__
```python
from _array_object import __invert__
```

Performs the operation __invert__.

---
## __le__
```python
from _array_object import __le__
```

Performs the operation __le__.

---
## __lshift__
```python
from _array_object import __lshift__
```

Performs the operation __lshift__.

---
## __lt__
```python
from _array_object import __lt__
```

Performs the operation __lt__.

---
## __matmul__
```python
from _array_object import __matmul__
```

Performs the operation __matmul__.

---
## __mod__
```python
from _array_object import __mod__
```

Performs the operation __mod__.

---
## __mul__
```python
from _array_object import __mul__
```

Performs the operation __mul__.

---
## __ne__
```python
from _array_object import __ne__
```

Performs the operation __ne__.

---
## __neg__
```python
from _array_object import __neg__
```

Performs the operation __neg__.

---
## __or__
```python
from _array_object import __or__
```

Performs the operation __or__.

---
## __pos__
```python
from _array_object import __pos__
```

Performs the operation __pos__.

---
## __pow__
```python
from _array_object import __pow__
```

Performs the operation __pow__.

---
## __rshift__
```python
from _array_object import __rshift__
```

Performs the operation __rshift__.

---
## __setitem__
```python
from _array_object import __setitem__
```

Performs the operation __setitem__.

---
## __sub__
```python
from _array_object import __sub__
```

Performs the operation __sub__.

---
## __truediv__
```python
from _array_object import __truediv__
```

Performs the operation __truediv__.

---
## __xor__
```python
from _array_object import __xor__
```

Performs the operation __xor__.

---
## __iadd__
```python
from _array_object import __iadd__
```

Performs the operation __iadd__.

---
## __radd__
```python
from _array_object import __radd__
```

Performs the operation __radd__.

---
## __iand__
```python
from _array_object import __iand__
```

Performs the operation __iand__.

---
## __rand__
```python
from _array_object import __rand__
```

Performs the operation __rand__.

---
## __ifloordiv__
```python
from _array_object import __ifloordiv__
```

Performs the operation __ifloordiv__.

---
## __rfloordiv__
```python
from _array_object import __rfloordiv__
```

Performs the operation __rfloordiv__.

---
## __ilshift__
```python
from _array_object import __ilshift__
```

Performs the operation __ilshift__.

---
## __rlshift__
```python
from _array_object import __rlshift__
```

Performs the operation __rlshift__.

---
## __imatmul__
```python
from _array_object import __imatmul__
```

Performs the operation __imatmul__.

---
## __rmatmul__
```python
from _array_object import __rmatmul__
```

Performs the operation __rmatmul__.

---
## __imod__
```python
from _array_object import __imod__
```

Performs the operation __imod__.

---
## __rmod__
```python
from _array_object import __rmod__
```

Performs the operation __rmod__.

---
## __imul__
```python
from _array_object import __imul__
```

Performs the operation __imul__.

---
## __rmul__
```python
from _array_object import __rmul__
```

Performs the operation __rmul__.

---
## __ior__
```python
from _array_object import __ior__
```

Performs the operation __ior__.

---
## __ror__
```python
from _array_object import __ror__
```

Performs the operation __ror__.

---
## __ipow__
```python
from _array_object import __ipow__
```

Performs the operation __ipow__.

---
## __rpow__
```python
from _array_object import __rpow__
```

Performs the operation __rpow__.

---
## __irshift__
```python
from _array_object import __irshift__
```

Performs the operation __irshift__.

---
## __rrshift__
```python
from _array_object import __rrshift__
```

Performs the operation __rrshift__.

---
## __isub__
```python
from _array_object import __isub__
```

Performs the operation __isub__.

---
## __rsub__
```python
from _array_object import __rsub__
```

Performs the operation __rsub__.

---
## __itruediv__
```python
from _array_object import __itruediv__
```

Performs the operation __itruediv__.

---
## __rtruediv__
```python
from _array_object import __rtruediv__
```

Performs the operation __rtruediv__.

---
## __ixor__
```python
from _array_object import __ixor__
```

Performs the operation __ixor__.

---
## __rxor__
```python
from _array_object import __rxor__
```

Performs the operation __rxor__.

---
## to_device
```python
from _array_object import to_device
```



---
## dtype
```python
from _array_object import dtype
```

Array API compatible wrapper for :py:meth:`np.ndarray.dtype <numpy.ndarray.dtype>`.

See its docstring for more information.

---
## device
```python
from _array_object import device
```



---
## mT
```python
from _array_object import mT
```



---
## ndim
```python
from _array_object import ndim
```

Array API compatible wrapper for :py:meth:`np.ndarray.ndim <numpy.ndarray.ndim>`.

See its docstring for more information.

---
## shape
```python
from _array_object import shape
```

Array API compatible wrapper for :py:meth:`np.ndarray.shape <numpy.ndarray.shape>`.

See its docstring for more information.

---
## size
```python
from _array_object import size
```

Array API compatible wrapper for :py:meth:`np.ndarray.size <numpy.ndarray.size>`.

See its docstring for more information.

---
## T
```python
from _array_object import T
```

Array API compatible wrapper for :py:meth:`np.ndarray.T <numpy.ndarray.T>`.

See its docstring for more information.

---
## __name__
```python
from _data_type_functions import __name__
```



---
## astype
```python
from _data_type_functions import astype
```



---
## broadcast_arrays
```python
from _data_type_functions import broadcast_arrays
```

Array API compatible wrapper for :py:func:`np.broadcast_arrays <numpy.broadcast_arrays>`.

See its docstring for more information.

---
## broadcast_to
```python
from _data_type_functions import broadcast_to
```

Array API compatible wrapper for :py:func:`np.broadcast_to <numpy.broadcast_to>`.

See its docstring for more information.

---
## can_cast
```python
from _data_type_functions import can_cast
```

Array API compatible wrapper for :py:func:`np.can_cast <numpy.can_cast>`.

See its docstring for more information.

---
## finfo_object
```python
from _data_type_functions import finfo_object
```



---
## iinfo_object
```python
from _data_type_functions import iinfo_object
```



---
## finfo
```python
from _data_type_functions import finfo
```

Array API compatible wrapper for :py:func:`np.finfo <numpy.finfo>`.

See its docstring for more information.

---
## iinfo
```python
from _data_type_functions import iinfo
```

Array API compatible wrapper for :py:func:`np.iinfo <numpy.iinfo>`.

See its docstring for more information.

---
## isdtype
```python
from _data_type_functions import isdtype
```

Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``.

See
https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html
for more details

---
## result_type
```python
from _data_type_functions import result_type
```

Array API compatible wrapper for :py:func:`np.result_type <numpy.result_type>`.

See its docstring for more information.

---
## __name__
```python
from _dtypes import __name__
```



---
## _result_type
```python
from _dtypes import _result_type
```



---
## cross
```python
from linalg import cross
```

Array API compatible wrapper for :py:func:`np.cross <numpy.cross>`.

See its docstring for more information.

---
## diagonal
```python
from linalg import diagonal
```

Array API compatible wrapper for :py:func:`np.diagonal <numpy.diagonal>`.

See its docstring for more information.

---
## matmul
```python
from linalg import matmul
```

Array API compatible wrapper for :py:func:`np.matmul <numpy.matmul>`.

See its docstring for more information.

---
## matrix_norm
```python
from linalg import matrix_norm
```

Array API compatible wrapper for :py:func:`np.linalg.norm <numpy.linalg.norm>`.

See its docstring for more information.

---
## matrix_transpose
```python
from linalg import matrix_transpose
```



---
## outer
```python
from linalg import outer
```

Array API compatible wrapper for :py:func:`np.outer <numpy.outer>`.

See its docstring for more information.

---
## _solve
```python
from linalg import _solve
```



---
## svdvals
```python
from linalg import svdvals
```



---
## tensordot
```python
from linalg import tensordot
```



---
## trace
```python
from linalg import trace
```

Array API compatible wrapper for :py:func:`np.trace <numpy.trace>`.

See its docstring for more information.

---
## vecdot
```python
from linalg import vecdot
```



---
## vector_norm
```python
from linalg import vector_norm
```

Array API compatible wrapper for :py:func:`np.linalg.norm <numpy.linalg.norm>`.

See its docstring for more information.

---
## __name__
```python
from _statistical_functions import __name__
```



---
## max
```python
from _statistical_functions import max
```



---
## mean
```python
from _statistical_functions import mean
```



---
## min
```python
from _statistical_functions import min
```



---
## prod
```python
from _statistical_functions import prod
```



---
## std
```python
from _statistical_functions import std
```



---
## sum
```python
from _statistical_functions import sum
```



---
## var
```python
from _statistical_functions import var
```



---
## __name__
```python
from _set_functions import __name__
```



---
## UniqueAllResult
```python
from _set_functions import UniqueAllResult
```



---
## UniqueCountsResult
```python
from _set_functions import UniqueCountsResult
```



---
## UniqueInverseResult
```python
from _set_functions import UniqueInverseResult
```



---
## unique_all
```python
from _set_functions import unique_all
```

Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.

See its docstring for more information.

---
## unique_counts
```python
from _set_functions import unique_counts
```



---
## unique_inverse
```python
from _set_functions import unique_inverse
```

Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.

See its docstring for more information.

---
## unique_values
```python
from _set_functions import unique_values
```

Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.

See its docstring for more information.

---
## __name__
```python
from _creation_functions import __name__
```



---
## _check_valid_dtype
```python
from _creation_functions import _check_valid_dtype
```



---
## asarray
```python
from _creation_functions import asarray
```

Array API compatible wrapper for :py:func:`np.asarray <numpy.asarray>`.

See its docstring for more information.

---
## arange
```python
from _creation_functions import arange
```

Array API compatible wrapper for :py:func:`np.arange <numpy.arange>`.

See its docstring for more information.

---
## empty
```python
from _creation_functions import empty
```

Array API compatible wrapper for :py:func:`np.empty <numpy.empty>`.

See its docstring for more information.

---
## empty_like
```python
from _creation_functions import empty_like
```

Array API compatible wrapper for :py:func:`np.empty_like <numpy.empty_like>`.

See its docstring for more information.

---
## eye
```python
from _creation_functions import eye
```

Array API compatible wrapper for :py:func:`np.eye <numpy.eye>`.

See its docstring for more information.

---
## from_dlpack
```python
from _creation_functions import from_dlpack
```



---
## full
```python
from _creation_functions import full
```

Array API compatible wrapper for :py:func:`np.full <numpy.full>`.

See its docstring for more information.

---
## full_like
```python
from _creation_functions import full_like
```

Array API compatible wrapper for :py:func:`np.full_like <numpy.full_like>`.

See its docstring for more information.

---
## linspace
```python
from _creation_functions import linspace
```

Array API compatible wrapper for :py:func:`np.linspace <numpy.linspace>`.

See its docstring for more information.

---
## meshgrid
```python
from _creation_functions import meshgrid
```

Array API compatible wrapper for :py:func:`np.meshgrid <numpy.meshgrid>`.

See its docstring for more information.

---
## ones
```python
from _creation_functions import ones
```

Array API compatible wrapper for :py:func:`np.ones <numpy.ones>`.

See its docstring for more information.

---
## ones_like
```python
from _creation_functions import ones_like
```

Array API compatible wrapper for :py:func:`np.ones_like <numpy.ones_like>`.

See its docstring for more information.

---
## tril
```python
from _creation_functions import tril
```

Array API compatible wrapper for :py:func:`np.tril <numpy.tril>`.

See its docstring for more information.

---
## triu
```python
from _creation_functions import triu
```

Array API compatible wrapper for :py:func:`np.triu <numpy.triu>`.

See its docstring for more information.

---
## zeros
```python
from _creation_functions import zeros
```

Array API compatible wrapper for :py:func:`np.zeros <numpy.zeros>`.

See its docstring for more information.

---
## zeros_like
```python
from _creation_functions import zeros_like
```

Array API compatible wrapper for :py:func:`np.zeros_like <numpy.zeros_like>`.

See its docstring for more information.

---
## __name__
```python
from mypy_plugin import __name__
```

A mypy_ plugin for managing a number of platform-specific annotations.
Its functionality can be split into three distinct parts:

* Assigning the (platform-dependent) precisions of certain `~numpy.number`
  subclasses, including the likes of `~numpy.int_`, `~numpy.intp` and
  `~numpy.longlong`. See the documentation on
  :ref:`scalar types <arrays.scalars.built-in>` for a comprehensive overview
  of the affected classes. Without the plugin the precision of all relevant
  classes will be inferred as `~typing.Any`.
* Removing all extended-precision `~numpy.number` subclasses that are
  unavailable for the platform in question. Most notably this includes the
  likes of `~numpy.float128` and `~numpy.complex256`. Without the plugin *all*
  extended-precision types will, as far as mypy is concerned, be available
  to all platforms.
* Assigning the (platform-dependent) precision of `~numpy.ctypeslib.c_intp`.
  Without the plugin the type will default to `ctypes.c_int64`.

  .. versionadded:: 1.22

Examples
--------
To enable the plugin, one must add it to their mypy `configuration file`_:

.. code-block:: ini

    [mypy]
    plugins = numpy.typing.mypy_plugin

.. _mypy: http://mypy-lang.org/
.. _configuration file: https://mypy.readthedocs.io/en/stable/config_file.html

---
## _get_precision_dict
```python
from mypy_plugin import _get_precision_dict
```



---
## _get_extended_precision_list
```python
from mypy_plugin import _get_extended_precision_list
```



---
## _get_c_intp_name
```python
from mypy_plugin import _get_c_intp_name
```



---
## _hook
```python
from mypy_plugin import _hook
```

Replace a type-alias with a concrete ``NBitBase`` subclass.

---
## _index
```python
from mypy_plugin import _index
```

Identify the first ``ImportFrom`` instance the specified `id`.

---
## _override_imports
```python
from mypy_plugin import _override_imports
```

Override the first `module`-based import with new `imports`.

---
## _NumpyPlugin
```python
from mypy_plugin import _NumpyPlugin
```

A mypy plugin for handling versus numpy-specific typing tasks.

---
## plugin
```python
from mypy_plugin import plugin
```

An entry-point for mypy.

---
## get_type_analyze_hook
```python
from mypy_plugin import get_type_analyze_hook
```

Set the precision of platform-specific `numpy.number`
subclasses.

For example: `numpy.int_`, `numpy.longlong` and `numpy.longdouble`.

---
## get_additional_deps
```python
from mypy_plugin import get_additional_deps
```

Handle all import-based overrides.

* Import platform-specific extended-precision `numpy.number`
  subclasses (*e.g.* `numpy.float96`, `numpy.float128` and
  `numpy.complex256`).
* Import the appropriate `ctypes` equivalent to `numpy.intp`.

---
## __name__
```python
from cfuncs import __name__
```

C declarations, CPP macros, and C functions for f2py2e.
Only required declarations/macros/functions will be used.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## buildcfuncs
```python
from cfuncs import buildcfuncs
```



---
## append_needs
```python
from cfuncs import append_needs
```



---
## get_needs
```python
from cfuncs import get_needs
```



---
## __name__
```python
from _src_pyf import __name__
```



---
## parse_structure
```python
from _src_pyf import parse_structure
```

Return a list of tuples for each function or subroutine each
tuple is the start and end of a subroutine or function to be
expanded.

---
## find_repl_patterns
```python
from _src_pyf import find_repl_patterns
```



---
## find_and_remove_repl_patterns
```python
from _src_pyf import find_and_remove_repl_patterns
```



---
## conv
```python
from _src_pyf import conv
```



---
## unique_key
```python
from _src_pyf import unique_key
```

Obtain a unique key given a dictionary.

---
## expand_sub
```python
from _src_pyf import expand_sub
```



---
## process_str
```python
from _src_pyf import process_str
```



---
## resolve_includes
```python
from _src_pyf import resolve_includes
```



---
## process_file
```python
from _src_pyf import process_file
```



---
## listrepl
```python
from _src_pyf import listrepl
```



---
## namerepl
```python
from _src_pyf import namerepl
```



---
## __name__
```python
from common_rules import __name__
```

Build common block mechanism for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## findcommonblocks
```python
from common_rules import findcommonblocks
```



---
## buildhooks
```python
from common_rules import buildhooks
```



---
## fadd
```python
from common_rules import fadd
```



---
## cadd
```python
from common_rules import cadd
```



---
## iadd
```python
from common_rules import iadd
```



---
## dadd
```python
from common_rules import dadd
```



---
## __name__
```python
from crackfortran import __name__
```

crackfortran --- read fortran (77,90) code and extract declaration information.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.


Usage of crackfortran:
======================
Command line keys: -quiet,-verbose,-fix,-f77,-f90,-show,-h <pyffilename>
                   -m <module name for f77 routines>,--ignore-contains
Functions: crackfortran, crack2fortran
The following Fortran statements/constructions are supported
(or will be if needed):
   block data,byte,call,character,common,complex,contains,data,
   dimension,double complex,double precision,end,external,function,
   implicit,integer,intent,interface,intrinsic,
   logical,module,optional,parameter,private,public,
   program,real,(sequence?),subroutine,type,use,virtual,
   include,pythonmodule
Note: 'virtual' is mapped to 'dimension'.
Note: 'implicit integer (z) static (z)' is 'implicit static (z)' (this is minor bug).
Note: code after 'contains' will be ignored until its scope ends.
Note: 'common' statement is extended: dimensions are moved to variable definitions
Note: f2py directive: <commentchar>f2py<line> is read as <line>
Note: pythonmodule is introduced to represent Python module

Usage:
  `postlist=crackfortran(files)`
  `postlist` contains declaration information read from the list of files `files`.
  `crack2fortran(postlist)` returns a fortran code to be saved to pyf-file

  `postlist` has the following structure:
 *** it is a list of dictionaries containing `blocks':
     B = {'block','body','vars','parent_block'[,'name','prefix','args','result',
          'implicit','externals','interfaced','common','sortvars',
          'commonvars','note']}
     B['block'] = 'interface' | 'function' | 'subroutine' | 'module' |
                  'program' | 'block data' | 'type' | 'pythonmodule' |
                  'abstract interface'
     B['body'] --- list containing `subblocks' with the same structure as `blocks'
     B['parent_block'] --- dictionary of a parent block:
                             C['body'][<index>]['parent_block'] is C
     B['vars'] --- dictionary of variable definitions
     B['sortvars'] --- dictionary of variable definitions sorted by dependence (independent first)
     B['name'] --- name of the block (not if B['block']=='interface')
     B['prefix'] --- prefix string (only if B['block']=='function')
     B['args'] --- list of argument names if B['block']== 'function' | 'subroutine'
     B['result'] --- name of the return value (only if B['block']=='function')
     B['implicit'] --- dictionary {'a':<variable definition>,'b':...} | None
     B['externals'] --- list of variables being external
     B['interfaced'] --- list of variables being external and defined
     B['common'] --- dictionary of common blocks (list of objects)
     B['commonvars'] --- list of variables used in common blocks (dimensions are moved to variable definitions)
     B['from'] --- string showing the 'parents' of the current block
     B['use'] --- dictionary of modules used in current block:
         {<modulename>:{['only':<0|1>],['map':{<local_name1>:<use_name1>,...}]}}
     B['note'] --- list of LaTeX comments on the block
     B['f2pyenhancements'] --- optional dictionary
          {'threadsafe':'','fortranname':<name>,
           'callstatement':<C-expr>|<multi-line block>,
           'callprotoargument':<C-expr-list>,
           'usercode':<multi-line block>|<list of multi-line blocks>,
           'pymethoddef:<multi-line block>'
           }
     B['entry'] --- dictionary {entryname:argslist,..}
     B['varnames'] --- list of variable names given in the order of reading the
                       Fortran code, useful for derived types.
     B['saved_interface'] --- a string of scanned routine signature, defines explicit interface
 *** Variable definition is a dictionary
     D = B['vars'][<variable name>] =
     {'typespec'[,'attrspec','kindselector','charselector','=','typename']}
     D['typespec'] = 'byte' | 'character' | 'complex' | 'double complex' |
                     'double precision' | 'integer' | 'logical' | 'real' | 'type'
     D['attrspec'] --- list of attributes (e.g. 'dimension(<arrayspec>)',
                       'external','intent(in|out|inout|hide|c|callback|cache|aligned4|aligned8|aligned16)',
                       'optional','required', etc)
     K = D['kindselector'] = {['*','kind']} (only if D['typespec'] =
                         'complex' | 'integer' | 'logical' | 'real' )
     C = D['charselector'] = {['*','len','kind','f2py_len']}
                             (only if D['typespec']=='character')
     D['='] --- initialization expression string
     D['typename'] --- name of the type if D['typespec']=='type'
     D['dimension'] --- list of dimension bounds
     D['intent'] --- list of intent specifications
     D['depend'] --- list of variable names on which current variable depends on
     D['check'] --- list of C-expressions; if C-expr returns zero, exception is raised
     D['note'] --- list of LaTeX comments on the variable
 *** Meaning of kind/char selectors (few examples):
     D['typespec>']*K['*']
     D['typespec'](kind=K['kind'])
     character*C['*']
     character(len=C['len'],kind=C['kind'], f2py_len=C['f2py_len'])
     (see also fortran type declaration statement formats below)

Fortran 90 type declaration statement format (F77 is subset of F90)
====================================================================
(Main source: IBM XL Fortran 5.1 Language Reference Manual)
type declaration = <typespec> [[<attrspec>]::] <entitydecl>
<typespec> = byte                          |
             character[<charselector>]     |
             complex[<kindselector>]       |
             double complex                |
             double precision              |
             integer[<kindselector>]       |
             logical[<kindselector>]       |
             real[<kindselector>]          |
             type(<typename>)
<charselector> = * <charlen>               |
             ([len=]<len>[,[kind=]<kind>]) |
             (kind=<kind>[,len=<len>])
<kindselector> = * <intlen>                |
             ([kind=]<kind>)
<attrspec> = comma separated list of attributes.
             Only the following attributes are used in
             building up the interface:
                external
                (parameter --- affects '=' key)
                optional
                intent
             Other attributes are ignored.
<intentspec> = in | out | inout
<arrayspec> = comma separated list of dimension bounds.
<entitydecl> = <name> [[*<charlen>][(<arrayspec>)] | [(<arrayspec>)]*<charlen>]
                      [/<init_expr>/ | =<init_expr>] [,<entitydecl>]

In addition, the following attributes are used: check,depend,note

TODO:
    * Apply 'parameter' attribute (e.g. 'integer parameter :: i=2' 'real x(i)'
                                   -> 'real x(2)')
    The above may be solved by creating appropriate preprocessor program, for example.

---
## reset_global_f2py_vars
```python
from crackfortran import reset_global_f2py_vars
```



---
## outmess
```python
from crackfortran import outmess
```



---
## rmbadname1
```python
from crackfortran import rmbadname1
```



---
## rmbadname
```python
from crackfortran import rmbadname
```



---
## undo_rmbadname1
```python
from crackfortran import undo_rmbadname1
```



---
## undo_rmbadname
```python
from crackfortran import undo_rmbadname
```



---
## openhook
```python
from crackfortran import openhook
```

Ensures that filename is opened with correct encoding parameter.

This function uses charset_normalizer package, when available, for
determining the encoding of the file to be opened. When charset_normalizer
is not available, the function detects only UTF encodings, otherwise, ASCII
encoding is used as fallback.

---
## is_free_format
```python
from crackfortran import is_free_format
```

Check if file is in free format Fortran.

---
## readfortrancode
```python
from crackfortran import readfortrancode
```

Read fortran codes from files and
1) Get rid of comments, line continuations, and empty lines; lower cases.
2) Call dowithline(line) on every line.
3) Recursively call itself when statement "include '<filename>'" is met.

---
## split_by_unquoted
```python
from crackfortran import split_by_unquoted
```

Splits the line into (line[:i], line[i:]),
where i is the index of first occurrence of one of the characters
not within quotes, or len(line) if no such index exists

---
## _simplifyargs
```python
from crackfortran import _simplifyargs
```



---
## crackline
```python
from crackfortran import crackline
```

reset=-1  --- initialize
reset=0   --- crack the line
reset=1   --- final check if mismatch of blocks occurred

Cracked data is saved in grouplist[0].

---
## markouterparen
```python
from crackfortran import markouterparen
```



---
## markoutercomma
```python
from crackfortran import markoutercomma
```



---
## unmarkouterparen
```python
from crackfortran import unmarkouterparen
```



---
## appenddecl
```python
from crackfortran import appenddecl
```



---
## _is_intent_callback
```python
from crackfortran import _is_intent_callback
```



---
## _resolvetypedefpattern
```python
from crackfortran import _resolvetypedefpattern
```



---
## parse_name_for_bind
```python
from crackfortran import parse_name_for_bind
```



---
## _resolvenameargspattern
```python
from crackfortran import _resolvenameargspattern
```



---
## analyzeline
```python
from crackfortran import analyzeline
```

Reads each line in the input file in sequence and updates global vars.

Effectively reads and collects information from the input file to the
global variable groupcache, a dictionary containing info about each part
of the fortran module.

At the end of analyzeline, information is filtered into the correct dict
keys, but parameter values and dimensions are not yet interpreted.

---
## appendmultiline
```python
from crackfortran import appendmultiline
```



---
## cracktypespec0
```python
from crackfortran import cracktypespec0
```



---
## removespaces
```python
from crackfortran import removespaces
```



---
## markinnerspaces
```python
from crackfortran import markinnerspaces
```

The function replace all spaces in the input variable line which are 
surrounded with quotation marks, with the triplet "@_@".

For instance, for the input "a 'b c'" the function returns "a 'b@_@c'"

Parameters
----------
line : str

Returns
-------
str

---
## updatevars
```python
from crackfortran import updatevars
```

Returns last_name, the variable name without special chars, parenthesis
    or dimension specifiers.

Alters groupcache to add the name, typespec, attrspec (and possibly value)
of current variable.

---
## cracktypespec
```python
from crackfortran import cracktypespec
```



---
## setattrspec
```python
from crackfortran import setattrspec
```



---
## setkindselector
```python
from crackfortran import setkindselector
```



---
## setcharselector
```python
from crackfortran import setcharselector
```



---
## getblockname
```python
from crackfortran import getblockname
```



---
## setmesstext
```python
from crackfortran import setmesstext
```



---
## get_usedict
```python
from crackfortran import get_usedict
```



---
## get_useparameters
```python
from crackfortran import get_useparameters
```



---
## postcrack2
```python
from crackfortran import postcrack2
```



---
## postcrack
```python
from crackfortran import postcrack
```

TODO:
function return values
determine expression types if in argument list

---
## sortvarnames
```python
from crackfortran import sortvarnames
```



---
## analyzecommon
```python
from crackfortran import analyzecommon
```



---
## analyzebody
```python
from crackfortran import analyzebody
```



---
## buildimplicitrules
```python
from crackfortran import buildimplicitrules
```



---
## myeval
```python
from crackfortran import myeval
```

Like `eval` but returns only integers and floats 

---
## getlincoef
```python
from crackfortran import getlincoef
```

Obtain ``a`` and ``b`` when ``e == "a*x+b"``, where ``x`` is a symbol in
xset.

>>> getlincoef('2*x + 1', {'x'})
(2, 1, 'x')
>>> getlincoef('3*x + x*2 + 2 + 1', {'x'})
(5, 3, 'x')
>>> getlincoef('0', {'x'})
(0, 0, None)
>>> getlincoef('0*x', {'x'})
(0, 0, 'x')
>>> getlincoef('x*x', {'x'})
(None, None, None)

This can be tricked by sufficiently complex expressions

>>> getlincoef('(x - 0.5)*(x - 1.5)*(x - 1)*x + 2*x + 3', {'x'})
(2.0, 3.0, 'x')

---
## _get_depend_dict
```python
from crackfortran import _get_depend_dict
```



---
## _calc_depend_dict
```python
from crackfortran import _calc_depend_dict
```



---
## get_sorted_names
```python
from crackfortran import get_sorted_names
```



---
## _kind_func
```python
from crackfortran import _kind_func
```



---
## _selected_int_kind_func
```python
from crackfortran import _selected_int_kind_func
```



---
## _selected_real_kind_func
```python
from crackfortran import _selected_real_kind_func
```



---
## get_parameters
```python
from crackfortran import get_parameters
```



---
## _eval_length
```python
from crackfortran import _eval_length
```



---
## _eval_scalar
```python
from crackfortran import _eval_scalar
```



---
## analyzevars
```python
from crackfortran import analyzevars
```

Sets correct dimension information for each variable/parameter

---
## param_eval
```python
from crackfortran import param_eval
```

Creates a dictionary of indices and values for each parameter in a
parameter array to be evaluated later.

WARNING: It is not possible to initialize multidimensional array
parameters e.g. dimension(-3:1, 4, 3:5) at this point. This is because in
Fortran initialization through array constructor requires the RESHAPE
intrinsic function. Since the right-hand side of the parameter declaration
is not executed in f2py, but rather at the compiled c/fortran extension,
later, it is not possible to execute a reshape of a parameter array.
One issue remains: if the user wants to access the array parameter from
python, we should either
1) allow them to access the parameter array using python standard indexing
   (which is often incompatible with the original fortran indexing)
2) allow the parameter array to be accessed in python as a dictionary with
   fortran indices as keys
We are choosing 2 for now.

---
## param_parse
```python
from crackfortran import param_parse
```

Recursively parse array dimensions.

Parses the declaration of an array variable or parameter
`dimension` keyword, and is called recursively if the
dimension for this array is a previously defined parameter
(found in `params`).

Parameters
----------
d : str
    Fortran expression describing the dimension of an array.
params : dict
    Previously parsed parameters declared in the Fortran source file.

Returns
-------
out : str
    Parsed dimension expression.

Examples
--------

* If the line being analyzed is

  `integer, parameter, dimension(2) :: pa = (/ 3, 5 /)`

  then `d = 2` and we return immediately, with

>>> d = '2'
>>> param_parse(d, params)
2

* If the line being analyzed is

  `integer, parameter, dimension(pa) :: pb = (/1, 2, 3/)`

  then `d = 'pa'`; since `pa` is a previously parsed parameter,
  and `pa = 3`, we call `param_parse` recursively, to obtain

>>> d = 'pa'
>>> params = {'pa': 3}
>>> param_parse(d, params)
3

* If the line being analyzed is

  `integer, parameter, dimension(pa(1)) :: pb = (/1, 2, 3/)`

  then `d = 'pa(1)'`; since `pa` is a previously parsed parameter,
  and `pa(1) = 3`, we call `param_parse` recursively, to obtain

>>> d = 'pa(1)'
>>> params = dict(pa={1: 3, 2: 5})
>>> param_parse(d, params)
3

---
## expr2name
```python
from crackfortran import expr2name
```



---
## analyzeargs
```python
from crackfortran import analyzeargs
```



---
## _ensure_exprdict
```python
from crackfortran import _ensure_exprdict
```



---
## determineexprtype
```python
from crackfortran import determineexprtype
```



---
## crack2fortrangen
```python
from crackfortran import crack2fortrangen
```



---
## common2fortran
```python
from crackfortran import common2fortran
```



---
## use2fortran
```python
from crackfortran import use2fortran
```



---
## true_intent_list
```python
from crackfortran import true_intent_list
```



---
## vars2fortran
```python
from crackfortran import vars2fortran
```



---
## crackfortran
```python
from crackfortran import crackfortran
```



---
## crack2fortran
```python
from crackfortran import crack2fortran
```



---
## _is_visit_pair
```python
from crackfortran import _is_visit_pair
```



---
## traverse
```python
from crackfortran import traverse
```

Traverse f2py data structure with the following visit function:

def visit(item, parents, result, *args, **kwargs):
    """

    parents is a list of key-"f2py data structure" pairs from which
    items are taken from.

    result is a f2py data structure that is filled with the
    return value of the visit function.

    item is 2-tuple (index, value) if parents[-1][1] is a list
    item is 2-tuple (key, value) if parents[-1][1] is a dict

    The return value of visit must be None, or of the same kind as
    item, that is, if parents[-1] is a list, the return value must
    be 2-tuple (new_index, new_value), or if parents[-1] is a
    dict, the return value must be 2-tuple (new_key, new_value).

    If new_index or new_value is None, the return value of visit
    is ignored, that is, it will not be added to the result.

    If the return value is None, the content of obj will be
    traversed, otherwise not.
    """

---
## character_backward_compatibility_hook
```python
from crackfortran import character_backward_compatibility_hook
```

Previously, Fortran character was incorrectly treated as
character*1. This hook fixes the usage of the corresponding
variables in `check`, `dimension`, `=`, and `callstatement`
expressions.

The usage of `char*` in `callprotoargument` expression can be left
unchanged because C `character` is C typedef of `char`, although,
new implementations should use `character*` in the corresponding
expressions.

See https://github.com/numpy/numpy/pull/19388 for more information.

---
## fix_usage
```python
from crackfortran import fix_usage
```



---
## compute_deps
```python
from crackfortran import compute_deps
```



---
## solve_v
```python
from crackfortran import solve_v
```



---
## __name__
```python
from cb_rules import __name__
```

Build call-back mechanism for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## buildcallbacks
```python
from cb_rules import buildcallbacks
```



---
## buildcallback
```python
from cb_rules import buildcallback
```



---
## __name__
```python
from rules import __name__
```

Rules for building C/API module with f2py2e.

Here is a skeleton of a new wrapper function (13Dec2001):

wrapper_function(args)
  declarations
  get_python_arguments, say, `a' and `b'

  get_a_from_python
  if (successful) {

    get_b_from_python
    if (successful) {

      callfortran
      if (successful) {

        put_a_to_python
        if (successful) {

          put_b_to_python
          if (successful) {

            buildvalue = ...

          }

        }

      }

    }
    cleanup_b

  }
  cleanup_a

  return buildvalue

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## buildmodule
```python
from rules import buildmodule
```

Return

---
## buildapi
```python
from rules import buildapi
```



---
## __name__
```python
from f2py2e import __name__
```

f2py2e - Fortran to Python C/API generator. 2nd Edition.
         See __usage__ below.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## scaninputline
```python
from f2py2e import scaninputline
```



---
## callcrackfortran
```python
from f2py2e import callcrackfortran
```



---
## buildmodules
```python
from f2py2e import buildmodules
```



---
## dict_append
```python
from f2py2e import dict_append
```



---
## run_main
```python
from f2py2e import run_main
```

Equivalent to running::

    f2py <args>

where ``<args>=string.join(<list>,' ')``, but in Python.  Unless
``-h`` is used, this function returns a dictionary containing
information on generated modules and their dependencies on source
files.

You cannot build extension modules with this function, that is,
using ``-c`` is not allowed. Use the ``compile`` command instead.

Examples
--------
The command ``f2py -m scalar scalar.f`` can be executed from Python as
follows.

.. literalinclude:: ../../source/f2py/code/results/run_main_session.dat
    :language: python

---
## filter_files
```python
from f2py2e import filter_files
```

Filter files by prefix and suffix.

---
## get_prefix
```python
from f2py2e import get_prefix
```



---
## CombineIncludePaths
```python
from f2py2e import CombineIncludePaths
```



---
## include_parser
```python
from f2py2e import include_parser
```



---
## get_includes
```python
from f2py2e import get_includes
```



---
## make_f2py_compile_parser
```python
from f2py2e import make_f2py_compile_parser
```



---
## preparse_sysargv
```python
from f2py2e import preparse_sysargv
```



---
## run_compile
```python
from f2py2e import run_compile
```

Do it all in one call!

---
## validate_modulename
```python
from f2py2e import validate_modulename
```



---
## main
```python
from f2py2e import main
```



---
## __call__
```python
from f2py2e import __call__
```



---
## __name__
```python
from func2subr import __name__
```

Rules for building C/API module with f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## var2fixfortran
```python
from func2subr import var2fixfortran
```



---
## useiso_c_binding
```python
from func2subr import useiso_c_binding
```



---
## createfuncwrapper
```python
from func2subr import createfuncwrapper
```



---
## createsubrwrapper
```python
from func2subr import createsubrwrapper
```



---
## assubr
```python
from func2subr import assubr
```



---
## add
```python
from func2subr import add
```



---
## __name__
```python
from symbolic import __name__
```

Fortran/C symbolic expressions

References:
- J3/21-007: Draft Fortran 202x. https://j3-fortran.org/doc/year/21/21-007.pdf

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## Language
```python
from symbolic import Language
```

Used as Expr.tostring language argument.

---
## Op
```python
from symbolic import Op
```

Used as Expr op attribute.

---
## RelOp
```python
from symbolic import RelOp
```

Used in Op.RELATIONAL expression to specify the function part.

---
## ArithOp
```python
from symbolic import ArithOp
```

Used in Op.APPLY expression to specify the function part.

---
## OpError
```python
from symbolic import OpError
```



---
## Precedence
```python
from symbolic import Precedence
```

Used as Expr.tostring precedence argument.

---
## _pairs_add
```python
from symbolic import _pairs_add
```



---
## ExprWarning
```python
from symbolic import ExprWarning
```



---
## ewarn
```python
from symbolic import ewarn
```



---
## Expr
```python
from symbolic import Expr
```

Represents a Fortran expression as a op-data pair.

Expr instances are hashable and sortable.

---
## normalize
```python
from symbolic import normalize
```

Normalize Expr and apply basic evaluation methods.
    

---
## as_expr
```python
from symbolic import as_expr
```

Convert non-Expr objects to Expr objects.
    

---
## as_symbol
```python
from symbolic import as_symbol
```

Return object as SYMBOL expression (variable or unparsed expression).
    

---
## as_number
```python
from symbolic import as_number
```

Return object as INTEGER or REAL constant.
    

---
## as_integer
```python
from symbolic import as_integer
```

Return object as INTEGER constant.
    

---
## as_real
```python
from symbolic import as_real
```

Return object as REAL constant.
    

---
## as_string
```python
from symbolic import as_string
```

Return object as STRING expression (string literal constant).
    

---
## as_array
```python
from symbolic import as_array
```

Return object as ARRAY expression (array constant).
    

---
## as_complex
```python
from symbolic import as_complex
```

Return object as COMPLEX expression (complex literal constant).
    

---
## as_apply
```python
from symbolic import as_apply
```

Return object as APPLY expression (function call, constructor, etc.)
    

---
## as_ternary
```python
from symbolic import as_ternary
```

Return object as TERNARY expression (cond?expr1:expr2).
    

---
## as_ref
```python
from symbolic import as_ref
```

Return object as referencing expression.
    

---
## as_deref
```python
from symbolic import as_deref
```

Return object as dereferencing expression.
    

---
## as_eq
```python
from symbolic import as_eq
```



---
## as_ne
```python
from symbolic import as_ne
```



---
## as_lt
```python
from symbolic import as_lt
```



---
## as_le
```python
from symbolic import as_le
```



---
## as_gt
```python
from symbolic import as_gt
```



---
## as_ge
```python
from symbolic import as_ge
```



---
## as_terms
```python
from symbolic import as_terms
```

Return expression as TERMS expression.
    

---
## as_factors
```python
from symbolic import as_factors
```

Return expression as FACTORS expression.
    

---
## as_term_coeff
```python
from symbolic import as_term_coeff
```

Return expression as term-coefficient pair.
    

---
## as_numer_denom
```python
from symbolic import as_numer_denom
```

Return expression as numer-denom pair.
    

---
## _counter
```python
from symbolic import _counter
```



---
## eliminate_quotes
```python
from symbolic import eliminate_quotes
```

Replace quoted substrings of input string.

Return a new string and a mapping of replacements.

---
## insert_quotes
```python
from symbolic import insert_quotes
```

Inverse of eliminate_quotes.
    

---
## replace_parenthesis
```python
from symbolic import replace_parenthesis
```

Replace substrings of input that are enclosed in parenthesis.

Return a new string and a mapping of replacements.

---
## _get_parenthesis_kind
```python
from symbolic import _get_parenthesis_kind
```



---
## unreplace_parenthesis
```python
from symbolic import unreplace_parenthesis
```

Inverse of replace_parenthesis.
    

---
## fromstring
```python
from symbolic import fromstring
```



---
## _Pair
```python
from symbolic import _Pair
```



---
## _FromStringWorker
```python
from symbolic import _FromStringWorker
```



---
## tostring
```python
from symbolic import tostring
```

Return a string representation of Expr.
        

---
## parse
```python
from symbolic import parse
```



---
## __init__
```python
from symbolic import __init__
```



---
## __eq__
```python
from symbolic import __eq__
```



---
## __hash__
```python
from symbolic import __hash__
```



---
## __lt__
```python
from symbolic import __lt__
```



---
## __le__
```python
from symbolic import __le__
```



---
## __gt__
```python
from symbolic import __gt__
```



---
## __ge__
```python
from symbolic import __ge__
```



---
## __repr__
```python
from symbolic import __repr__
```



---
## __str__
```python
from symbolic import __str__
```



---
## __pos__
```python
from symbolic import __pos__
```



---
## __neg__
```python
from symbolic import __neg__
```



---
## __add__
```python
from symbolic import __add__
```



---
## __radd__
```python
from symbolic import __radd__
```



---
## __sub__
```python
from symbolic import __sub__
```



---
## __rsub__
```python
from symbolic import __rsub__
```



---
## __mul__
```python
from symbolic import __mul__
```



---
## __rmul__
```python
from symbolic import __rmul__
```



---
## __pow__
```python
from symbolic import __pow__
```



---
## __truediv__
```python
from symbolic import __truediv__
```



---
## __rtruediv__
```python
from symbolic import __rtruediv__
```



---
## __floordiv__
```python
from symbolic import __floordiv__
```



---
## __rfloordiv__
```python
from symbolic import __rfloordiv__
```



---
## __call__
```python
from symbolic import __call__
```



---
## __getitem__
```python
from symbolic import __getitem__
```



---
## substitute
```python
from symbolic import substitute
```



---
## traverse
```python
from symbolic import traverse
```

Traverse expression tree with visit function.

The visit function is applied to an expression with given args
and kwargs.

Traverse call returns an expression returned by visit when not
None, otherwise return a new normalized expression with
traverse-visit sub-expressions.

---
## contains
```python
from symbolic import contains
```

Check if self contains other.
        

---
## symbols
```python
from symbolic import symbols
```

Return a set of symbols contained in self.
        

---
## polynomial_atoms
```python
from symbolic import polynomial_atoms
```

Return a set of expressions used as atoms in polynomial self.
        

---
## linear_solve
```python
from symbolic import linear_solve
```

Return a, b such that a * symbol + b == self.

If self is not linear with respect to symbol, raise RuntimeError.

---
## repl
```python
from symbolic import repl
```



---
## finalize_string
```python
from symbolic import finalize_string
```



---
## process
```python
from symbolic import process
```

Parse string within the given context.

The context may define the result in case of ambiguous
expressions. For instance, consider expressions `f(x, y)` and
`(x, y) + (a, b)` where `f` is a function and pair `(x, y)`
denotes complex number. Specifying context as "args" or
"expr", the subexpression `(x, y)` will be parse to an
argument list or to a complex number, respectively.

---
## visit
```python
from symbolic import visit
```



---
## restore
```python
from symbolic import restore
```



---
## run_command
```python
from diagnose import run_command
```



---
## __name__
```python
from capi_maps import __name__
```

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## load_f2cmap_file
```python
from capi_maps import load_f2cmap_file
```



---
## getctype
```python
from capi_maps import getctype
```

Determines C type

---
## f2cexpr
```python
from capi_maps import f2cexpr
```

Rewrite Fortran expression as f2py supported C expression.

Due to the lack of a proper expression parser in f2py, this
function uses a heuristic approach that assumes that Fortran
arithmetic expressions are valid C arithmetic expressions when
mapping Fortran function calls to the corresponding C function/CPP
macros calls.

---
## getstrlength
```python
from capi_maps import getstrlength
```



---
## getarrdims
```python
from capi_maps import getarrdims
```



---
## getpydocsign
```python
from capi_maps import getpydocsign
```



---
## getarrdocsign
```python
from capi_maps import getarrdocsign
```



---
## getinit
```python
from capi_maps import getinit
```



---
## get_elsize
```python
from capi_maps import get_elsize
```



---
## sign2map
```python
from capi_maps import sign2map
```

varname,ctype,atype
init,init.r,init.i,pytype
vardebuginfo,vardebugshowvalue,varshowvalue
varrformat

intent

---
## routsign2map
```python
from capi_maps import routsign2map
```

name,NAME,begintitle,endtitle
rname,ctype,rformat
routdebugshowvalue

---
## modsign2map
```python
from capi_maps import modsign2map
```

modulename

---
## cb_sign2map
```python
from capi_maps import cb_sign2map
```



---
## cb_routsign2map
```python
from capi_maps import cb_routsign2map
```

name,begintitle,endtitle,argname
ctype,rctype,maxnofargs,nofoptargs,returncptr

---
## common_sign2map
```python
from capi_maps import common_sign2map
```



---
## __name__
```python
from f90mod_rules import __name__
```

Build F90 module support for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## findf90modules
```python
from f90mod_rules import findf90modules
```



---
## buildhooks
```python
from f90mod_rules import buildhooks
```



---
## fadd
```python
from f90mod_rules import fadd
```



---
## dadd
```python
from f90mod_rules import dadd
```



---
## cadd
```python
from f90mod_rules import cadd
```



---
## iadd
```python
from f90mod_rules import iadd
```



---
## __name__
```python
from use_rules import __name__
```

Build 'use others module data' mechanism for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## buildusevars
```python
from use_rules import buildusevars
```



---
## buildusevar
```python
from use_rules import buildusevar
```



---
## __name__
```python
from auxfuncs import __name__
```

Auxiliary functions for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) LICENSE.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## outmess
```python
from auxfuncs import outmess
```



---
## debugcapi
```python
from auxfuncs import debugcapi
```



---
## _ischaracter
```python
from auxfuncs import _ischaracter
```



---
## _isstring
```python
from auxfuncs import _isstring
```



---
## ischaracter_or_characterarray
```python
from auxfuncs import ischaracter_or_characterarray
```



---
## ischaracter
```python
from auxfuncs import ischaracter
```



---
## ischaracterarray
```python
from auxfuncs import ischaracterarray
```



---
## isstring_or_stringarray
```python
from auxfuncs import isstring_or_stringarray
```



---
## isstring
```python
from auxfuncs import isstring
```



---
## isstringarray
```python
from auxfuncs import isstringarray
```



---
## isarrayofstrings
```python
from auxfuncs import isarrayofstrings
```



---
## isarray
```python
from auxfuncs import isarray
```



---
## isscalar
```python
from auxfuncs import isscalar
```



---
## iscomplex
```python
from auxfuncs import iscomplex
```



---
## islogical
```python
from auxfuncs import islogical
```



---
## isinteger
```python
from auxfuncs import isinteger
```



---
## isreal
```python
from auxfuncs import isreal
```



---
## get_kind
```python
from auxfuncs import get_kind
```



---
## isint1
```python
from auxfuncs import isint1
```



---
## islong_long
```python
from auxfuncs import islong_long
```



---
## isunsigned_char
```python
from auxfuncs import isunsigned_char
```



---
## isunsigned_short
```python
from auxfuncs import isunsigned_short
```



---
## isunsigned
```python
from auxfuncs import isunsigned
```



---
## isunsigned_long_long
```python
from auxfuncs import isunsigned_long_long
```



---
## isdouble
```python
from auxfuncs import isdouble
```



---
## islong_double
```python
from auxfuncs import islong_double
```



---
## islong_complex
```python
from auxfuncs import islong_complex
```



---
## iscomplexarray
```python
from auxfuncs import iscomplexarray
```



---
## isint1array
```python
from auxfuncs import isint1array
```



---
## isunsigned_chararray
```python
from auxfuncs import isunsigned_chararray
```



---
## isunsigned_shortarray
```python
from auxfuncs import isunsigned_shortarray
```



---
## isunsignedarray
```python
from auxfuncs import isunsignedarray
```



---
## isunsigned_long_longarray
```python
from auxfuncs import isunsigned_long_longarray
```



---
## issigned_chararray
```python
from auxfuncs import issigned_chararray
```



---
## issigned_shortarray
```python
from auxfuncs import issigned_shortarray
```



---
## issigned_array
```python
from auxfuncs import issigned_array
```



---
## issigned_long_longarray
```python
from auxfuncs import issigned_long_longarray
```



---
## isallocatable
```python
from auxfuncs import isallocatable
```



---
## ismutable
```python
from auxfuncs import ismutable
```



---
## ismoduleroutine
```python
from auxfuncs import ismoduleroutine
```



---
## ismodule
```python
from auxfuncs import ismodule
```



---
## isfunction
```python
from auxfuncs import isfunction
```



---
## isfunction_wrap
```python
from auxfuncs import isfunction_wrap
```



---
## issubroutine
```python
from auxfuncs import issubroutine
```



---
## issubroutine_wrap
```python
from auxfuncs import issubroutine_wrap
```



---
## isattr_value
```python
from auxfuncs import isattr_value
```



---
## hasassumedshape
```python
from auxfuncs import hasassumedshape
```



---
## requiresf90wrapper
```python
from auxfuncs import requiresf90wrapper
```



---
## isroutine
```python
from auxfuncs import isroutine
```



---
## islogicalfunction
```python
from auxfuncs import islogicalfunction
```



---
## islong_longfunction
```python
from auxfuncs import islong_longfunction
```



---
## islong_doublefunction
```python
from auxfuncs import islong_doublefunction
```



---
## iscomplexfunction
```python
from auxfuncs import iscomplexfunction
```



---
## iscomplexfunction_warn
```python
from auxfuncs import iscomplexfunction_warn
```



---
## isstringfunction
```python
from auxfuncs import isstringfunction
```



---
## hasexternals
```python
from auxfuncs import hasexternals
```



---
## isthreadsafe
```python
from auxfuncs import isthreadsafe
```



---
## hasvariables
```python
from auxfuncs import hasvariables
```



---
## isoptional
```python
from auxfuncs import isoptional
```



---
## isexternal
```python
from auxfuncs import isexternal
```



---
## getdimension
```python
from auxfuncs import getdimension
```



---
## isrequired
```python
from auxfuncs import isrequired
```



---
## isintent_in
```python
from auxfuncs import isintent_in
```



---
## isintent_inout
```python
from auxfuncs import isintent_inout
```



---
## isintent_out
```python
from auxfuncs import isintent_out
```



---
## isintent_hide
```python
from auxfuncs import isintent_hide
```



---
## isintent_nothide
```python
from auxfuncs import isintent_nothide
```



---
## isintent_c
```python
from auxfuncs import isintent_c
```



---
## isintent_cache
```python
from auxfuncs import isintent_cache
```



---
## isintent_copy
```python
from auxfuncs import isintent_copy
```



---
## isintent_overwrite
```python
from auxfuncs import isintent_overwrite
```



---
## isintent_callback
```python
from auxfuncs import isintent_callback
```



---
## isintent_inplace
```python
from auxfuncs import isintent_inplace
```



---
## isintent_aux
```python
from auxfuncs import isintent_aux
```



---
## isintent_aligned4
```python
from auxfuncs import isintent_aligned4
```



---
## isintent_aligned8
```python
from auxfuncs import isintent_aligned8
```



---
## isintent_aligned16
```python
from auxfuncs import isintent_aligned16
```



---
## isprivate
```python
from auxfuncs import isprivate
```



---
## hasinitvalue
```python
from auxfuncs import hasinitvalue
```



---
## hasinitvalueasstring
```python
from auxfuncs import hasinitvalueasstring
```



---
## hasnote
```python
from auxfuncs import hasnote
```



---
## hasresultnote
```python
from auxfuncs import hasresultnote
```



---
## hascommon
```python
from auxfuncs import hascommon
```



---
## containscommon
```python
from auxfuncs import containscommon
```



---
## containsmodule
```python
from auxfuncs import containsmodule
```



---
## hasbody
```python
from auxfuncs import hasbody
```



---
## hascallstatement
```python
from auxfuncs import hascallstatement
```



---
## istrue
```python
from auxfuncs import istrue
```



---
## isfalse
```python
from auxfuncs import isfalse
```



---
## F2PYError
```python
from auxfuncs import F2PYError
```



---
## throw_error
```python
from auxfuncs import throw_error
```



---
## l_and
```python
from auxfuncs import l_and
```



---
## l_or
```python
from auxfuncs import l_or
```



---
## l_not
```python
from auxfuncs import l_not
```



---
## isdummyroutine
```python
from auxfuncs import isdummyroutine
```



---
## getfortranname
```python
from auxfuncs import getfortranname
```



---
## getmultilineblock
```python
from auxfuncs import getmultilineblock
```



---
## getcallstatement
```python
from auxfuncs import getcallstatement
```



---
## getcallprotoargument
```python
from auxfuncs import getcallprotoargument
```



---
## getusercode
```python
from auxfuncs import getusercode
```



---
## getusercode1
```python
from auxfuncs import getusercode1
```



---
## getpymethoddef
```python
from auxfuncs import getpymethoddef
```



---
## getargs
```python
from auxfuncs import getargs
```



---
## getargs2
```python
from auxfuncs import getargs2
```



---
## getrestdoc
```python
from auxfuncs import getrestdoc
```



---
## gentitle
```python
from auxfuncs import gentitle
```



---
## flatlist
```python
from auxfuncs import flatlist
```



---
## stripcomma
```python
from auxfuncs import stripcomma
```



---
## replace
```python
from auxfuncs import replace
```



---
## dictappend
```python
from auxfuncs import dictappend
```



---
## applyrules
```python
from auxfuncs import applyrules
```



---
## get_f2py_modulename
```python
from auxfuncs import get_f2py_modulename
```



---
## getuseblocks
```python
from auxfuncs import getuseblocks
```



---
## process_f2cmap_dict
```python
from auxfuncs import process_f2cmap_dict
```

Update the Fortran-to-C type mapping dictionary with new mappings and
return a list of successfully mapped C types.

This function integrates a new mapping dictionary into an existing
Fortran-to-C type mapping dictionary. It ensures that all keys are in
lowercase and validates new entries against a given C-to-Python mapping
dictionary. Redefinitions and invalid entries are reported with a warning.

Parameters
----------
f2cmap_all : dict
    The existing Fortran-to-C type mapping dictionary that will be updated.
    It should be a dictionary of dictionaries where the main keys represent
    Fortran types and the nested dictionaries map Fortran type specifiers
    to corresponding C types.

new_map : dict
    A dictionary containing new type mappings to be added to `f2cmap_all`.
    The structure should be similar to `f2cmap_all`, with keys representing
    Fortran types and values being dictionaries of type specifiers and their
    C type equivalents.

c2py_map : dict
    A dictionary used for validating the C types in `new_map`. It maps C
    types to corresponding Python types and is used to ensure that the C
    types specified in `new_map` are valid.

verbose : boolean
    A flag used to provide information about the types mapped

Returns
-------
tuple of (dict, list)
    The updated Fortran-to-C type mapping dictionary and a list of
    successfully mapped C types.

---
## __init__
```python
from auxfuncs import __init__
```



---
## __call__
```python
from auxfuncs import __call__
```



---
## __name__
```python
from _isocbind import __name__
```

ISO_C_BINDING maps for f2py2e.
Only required declarations/macros/functions will be used.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.

---
## get_overridable_numpy_ufuncs
```python
from overrides import get_overridable_numpy_ufuncs
```

List all numpy ufuncs overridable via `__array_ufunc__`

Parameters
----------
None

Returns
-------
set
    A set containing all overridable ufuncs in the public numpy API.

---
## allows_array_ufunc_override
```python
from overrides import allows_array_ufunc_override
```

Determine if a function can be overridden via `__array_ufunc__`

Parameters
----------
func : callable
    Function that may be overridable via `__array_ufunc__`

Returns
-------
bool
    `True` if `func` is overridable via `__array_ufunc__` and
    `False` otherwise.

Notes
-----
This function is equivalent to ``isinstance(func, np.ufunc)`` and
will work correctly for ufuncs defined outside of Numpy.

---
## get_overridable_numpy_array_functions
```python
from overrides import get_overridable_numpy_array_functions
```

List all numpy functions overridable via `__array_function__`

Parameters
----------
None

Returns
-------
set
    A set containing all functions in the public numpy API that are
    overridable via `__array_function__`.

---
## allows_array_function_override
```python
from overrides import allows_array_function_override
```

Determine if a Numpy function can be overridden via `__array_function__`

Parameters
----------
func : callable
    Function that may be overridable via `__array_function__`

Returns
-------
bool
    `True` if `func` is a function in the Numpy API that is
    overridable via `__array_function__` and `False` otherwise.

---
## __name__
```python
from print_coercion_tables import __name__
```

Prints type-coercion tables for the built-in NumPy types

---
## GenericObject
```python
from print_coercion_tables import GenericObject
```



---
## print_cancast_table
```python
from print_coercion_tables import print_cancast_table
```



---
## print_coercion_table
```python
from print_coercion_tables import print_coercion_table
```



---
## print_new_cast_table
```python
from print_coercion_tables import print_new_cast_table
```

Prints new casts, the values given are default "can-cast" values, not
actual ones.

---
## __init__
```python
from print_coercion_tables import __init__
```



---
## __add__
```python
from print_coercion_tables import __add__
```



---
## __radd__
```python
from print_coercion_tables import __radd__
```



---
## sorter
```python
from print_coercion_tables import sorter
```



---
## print_table
```python
from print_coercion_tables import print_table
```



---
## __name__
```python
from _iotools import __name__
```

A collection of functions designed to help I/O with ascii files.

---
## _decode_line
```python
from _iotools import _decode_line
```

Decode bytes from binary input streams.

Defaults to decoding from 'latin1'. That differs from the behavior of
np.compat.asunicode that decodes from 'ascii'.

Parameters
----------
line : str or bytes
     Line to be decoded.
encoding : str
     Encoding used to decode `line`.

Returns
-------
decoded_line : str

---
## _is_string_like
```python
from _iotools import _is_string_like
```

Check whether obj behaves like a string.

---
## _is_bytes_like
```python
from _iotools import _is_bytes_like
```

Check whether obj behaves like a bytes object.

---
## has_nested_fields
```python
from _iotools import has_nested_fields
```

Returns whether one or several fields of a dtype are nested.

Parameters
----------
ndtype : dtype
    Data-type of a structured array.

Raises
------
AttributeError
    If `ndtype` does not have a `names` attribute.

Examples
--------
>>> dt = np.dtype([('name', 'S4'), ('x', float), ('y', float)])
>>> np.lib._iotools.has_nested_fields(dt)
False

---
## flatten_dtype
```python
from _iotools import flatten_dtype
```

Unpack a structured data-type by collapsing nested fields and/or fields
with a shape.

Note that the field names are lost.

Parameters
----------
ndtype : dtype
    The datatype to collapse
flatten_base : bool, optional
   If True, transform a field with a shape into several fields. Default is
   False.

Examples
--------
>>> dt = np.dtype([('name', 'S4'), ('x', float), ('y', float),
...                ('block', int, (2, 3))])
>>> np.lib._iotools.flatten_dtype(dt)
[dtype('S4'), dtype('float64'), dtype('float64'), dtype('int64')]
>>> np.lib._iotools.flatten_dtype(dt, flatten_base=True)
[dtype('S4'),
 dtype('float64'),
 dtype('float64'),
 dtype('int64'),
 dtype('int64'),
 dtype('int64'),
 dtype('int64'),
 dtype('int64'),
 dtype('int64')]

---
## LineSplitter
```python
from _iotools import LineSplitter
```

Object to split a string at a given delimiter or at given places.

Parameters
----------
delimiter : str, int, or sequence of ints, optional
    If a string, character used to delimit consecutive fields.
    If an integer or a sequence of integers, width(s) of each field.
comments : str, optional
    Character used to mark the beginning of a comment. Default is '#'.
autostrip : bool, optional
    Whether to strip each individual field. Default is True.

---
## NameValidator
```python
from _iotools import NameValidator
```

Object to validate a list of strings to use as field names.

The strings are stripped of any non alphanumeric character, and spaces
are replaced by '_'. During instantiation, the user can define a list
of names to exclude, as well as a list of invalid characters. Names in
the exclusion list are appended a '_' character.

Once an instance has been created, it can be called with a list of
names, and a list of valid names will be created.  The `__call__`
method accepts an optional keyword "default" that sets the default name
in case of ambiguity. By default this is 'f', so that names will
default to `f0`, `f1`, etc.

Parameters
----------
excludelist : sequence, optional
    A list of names to exclude. This list is appended to the default
    list ['return', 'file', 'print']. Excluded names are appended an
    underscore: for example, `file` becomes `file_` if supplied.
deletechars : str, optional
    A string combining invalid characters that must be deleted from the
    names.
case_sensitive : {True, False, 'upper', 'lower'}, optional
    * If True, field names are case-sensitive.
    * If False or 'upper', field names are converted to upper case.
    * If 'lower', field names are converted to lower case.

    The default value is True.
replace_space : '_', optional
    Character(s) used in replacement of white spaces.

Notes
-----
Calling an instance of `NameValidator` is the same as calling its
method `validate`.

Examples
--------
>>> validator = np.lib._iotools.NameValidator()
>>> validator(['file', 'field2', 'with space', 'CaSe'])
('file_', 'field2', 'with_space', 'CaSe')

>>> validator = np.lib._iotools.NameValidator(excludelist=['excl'],
...                                           deletechars='q',
...                                           case_sensitive=False)
>>> validator(['excl', 'field2', 'no_q', 'with space', 'CaSe'])
('EXCL', 'FIELD2', 'NO_Q', 'WITH_SPACE', 'CASE')

---
## str2bool
```python
from _iotools import str2bool
```

Tries to transform a string supposed to represent a boolean to a boolean.

Parameters
----------
value : str
    The string that is transformed to a boolean.

Returns
-------
boolval : bool
    The boolean representation of `value`.

Raises
------
ValueError
    If the string is not 'True' or 'False' (case independent)

Examples
--------
>>> np.lib._iotools.str2bool('TRUE')
True
>>> np.lib._iotools.str2bool('false')
False

---
## ConverterError
```python
from _iotools import ConverterError
```

Exception raised when an error occurs in a converter for string values.

---
## ConverterLockError
```python
from _iotools import ConverterLockError
```

Exception raised when an attempt is made to upgrade a locked converter.

---
## ConversionWarning
```python
from _iotools import ConversionWarning
```

Warning issued when a string converter has a problem.

Notes
-----
In `genfromtxt` a `ConversionWarning` is issued if raising exceptions
is explicitly suppressed with the "invalid_raise" keyword.

---
## StringConverter
```python
from _iotools import StringConverter
```

Factory class for function transforming a string into another object
(int, float).

After initialization, an instance can be called to transform a string
into another object. If the string is recognized as representing a
missing value, a default value is returned.

Attributes
----------
func : function
    Function used for the conversion.
default : any
    Default value to return when the input corresponds to a missing
    value.
type : type
    Type of the output.
_status : int
    Integer representing the order of the conversion.
_mapper : sequence of tuples
    Sequence of tuples (dtype, function, default value) to evaluate in
    order.
_locked : bool
    Holds `locked` parameter.

Parameters
----------
dtype_or_func : {None, dtype, function}, optional
    If a `dtype`, specifies the input data type, used to define a basic
    function and a default value for missing data. For example, when
    `dtype` is float, the `func` attribute is set to `float` and the
    default value to `np.nan`.  If a function, this function is used to
    convert a string to another object. In this case, it is recommended
    to give an associated default value as input.
default : any, optional
    Value to return by default, that is, when the string to be
    converted is flagged as missing. If not given, `StringConverter`
    tries to supply a reasonable default value.
missing_values : {None, sequence of str}, optional
    ``None`` or sequence of strings indicating a missing value. If ``None``
    then missing values are indicated by empty entries. The default is
    ``None``.
locked : bool, optional
    Whether the StringConverter should be locked to prevent automatic
    upgrade or not. Default is False.

---
## easy_dtype
```python
from _iotools import easy_dtype
```

Convenience function to create a `np.dtype` object.

The function processes the input `dtype` and matches it with the given
names.

Parameters
----------
ndtype : var
    Definition of the dtype. Can be any string or dictionary recognized
    by the `np.dtype` function, or a sequence of types.
names : str or sequence, optional
    Sequence of strings to use as field names for a structured dtype.
    For convenience, `names` can be a string of a comma-separated list
    of names.
defaultfmt : str, optional
    Format string used to define missing names, such as ``"f%i"``
    (default) or ``"fields_%02i"``.
validationargs : optional
    A series of optional arguments used to initialize a
    `NameValidator`.

Examples
--------
>>> np.lib._iotools.easy_dtype(float)
dtype('float64')
>>> np.lib._iotools.easy_dtype("i4, f8")
dtype([('f0', '<i4'), ('f1', '<f8')])
>>> np.lib._iotools.easy_dtype("i4, f8", defaultfmt="field_%03i")
dtype([('field_000', '<i4'), ('field_001', '<f8')])

>>> np.lib._iotools.easy_dtype((int, float, float), names="a,b,c")
dtype([('a', '<i8'), ('b', '<f8'), ('c', '<f8')])
>>> np.lib._iotools.easy_dtype(float, names="a,b,c")
dtype([('a', '<f8'), ('b', '<f8'), ('c', '<f8')])

---
## autostrip
```python
from _iotools import autostrip
```

Wrapper to strip each member of the output of `method`.

Parameters
----------
method : function
    Function that takes a single argument and returns a sequence of
    strings.

Returns
-------
wrapped : function
    The result of wrapping `method`. `wrapped` takes a single input
    argument and returns a list of strings that are stripped of
    white-space.

---
## __init__
```python
from _iotools import __init__
```



---
## _delimited_splitter
```python
from _iotools import _delimited_splitter
```

Chop off comments, strip, and split at delimiter. 

---
## _fixedwidth_splitter
```python
from _iotools import _fixedwidth_splitter
```



---
## _variablewidth_splitter
```python
from _iotools import _variablewidth_splitter
```



---
## __call__
```python
from _iotools import __call__
```



---
## validate
```python
from _iotools import validate
```

Validate a list of strings as field names for a structured array.

Parameters
----------
names : sequence of str
    Strings to be validated.
defaultfmt : str, optional
    Default format string, used if validating a given string
    reduces its length to zero.
nbfields : integer, optional
    Final number of validated names, used to expand or shrink the
    initial list of names.

Returns
-------
validatednames : list of str
    The list of validated field names.

Notes
-----
A `NameValidator` instance can be called directly, which is the
same as calling `validate`. For examples, see `NameValidator`.

---
## _getdtype
```python
from _iotools import _getdtype
```

Returns the dtype of the input variable.

---
## _getsubdtype
```python
from _iotools import _getsubdtype
```

Returns the type of the dtype of the input variable.

---
## _dtypeortype
```python
from _iotools import _dtypeortype
```

Returns dtype for datetime64 and type of dtype otherwise.

---
## upgrade_mapper
```python
from _iotools import upgrade_mapper
```

Upgrade the mapper of a StringConverter by adding a new function and
its corresponding default.

The input function (or sequence of functions) and its associated
default value (if any) is inserted in penultimate position of the
mapper.  The corresponding type is estimated from the dtype of the
default value.

Parameters
----------
func : var
    Function, or sequence of functions

Examples
--------
>>> import dateutil.parser
>>> import datetime
>>> dateparser = dateutil.parser.parse
>>> defaultdate = datetime.date(2000, 1, 1)
>>> StringConverter.upgrade_mapper(dateparser, default=defaultdate)

---
## _find_map_entry
```python
from _iotools import _find_map_entry
```



---
## _loose_call
```python
from _iotools import _loose_call
```



---
## _strict_call
```python
from _iotools import _strict_call
```



---
## _do_upgrade
```python
from _iotools import _do_upgrade
```



---
## upgrade
```python
from _iotools import upgrade
```

Find the best converter for a given string, and return the result.

The supplied string `value` is converted by testing different
converters in order. First the `func` method of the
`StringConverter` instance is tried, if this fails other available
converters are tried.  The order in which these other converters
are tried is determined by the `_status` attribute of the instance.

Parameters
----------
value : str
    The string to convert.

Returns
-------
out : any
    The result of converting `value` with the appropriate converter.

---
## iterupgrade
```python
from _iotools import iterupgrade
```



---
## update
```python
from _iotools import update
```

Set StringConverter attributes directly.

Parameters
----------
func : function
    Conversion function.
default : any, optional
    Value to return by default, that is, when the string to be
    converted is flagged as missing. If not given,
    `StringConverter` tries to supply a reasonable default value.
testing_value : str, optional
    A string representing a standard input value of the converter.
    This string is used to help defining a reasonable default
    value.
missing_values : {sequence of str, None}, optional
    Sequence of strings indicating a missing value. If ``None``, then
    the existing `missing_values` are cleared. The default is `''`.
locked : bool, optional
    Whether the StringConverter should be locked to prevent
    automatic upgrade or not. Default is False.

Notes
-----
`update` takes the same parameters as the constructor of
`StringConverter`, except that `func` does not accept a `dtype`
whereas `dtype_or_func` in the constructor does.

---
## _disables_array_ufunc
```python
from mixins import _disables_array_ufunc
```

True when __array_ufunc__ is set to None.

---
## _binary_method
```python
from mixins import _binary_method
```

Implement a forward binary method with a ufunc, e.g., __add__.

---
## _reflected_binary_method
```python
from mixins import _reflected_binary_method
```

Implement a reflected binary method with a ufunc, e.g., __radd__.

---
## _inplace_binary_method
```python
from mixins import _inplace_binary_method
```

Implement an in-place binary method with a ufunc, e.g., __iadd__.

---
## _numeric_methods
```python
from mixins import _numeric_methods
```

Implement forward, reflected and inplace binary methods with a ufunc.

---
## _unary_method
```python
from mixins import _unary_method
```

Implement a unary special method with a ufunc.

---
## NDArrayOperatorsMixin
```python
from mixins import NDArrayOperatorsMixin
```

Mixin defining all operator special methods using __array_ufunc__.

This class implements the special methods for almost all of Python's
builtin operators defined in the `operator` module, including comparisons
(``==``, ``>``, etc.) and arithmetic (``+``, ``*``, ``-``, etc.), by
deferring to the ``__array_ufunc__`` method, which subclasses must
implement.

It is useful for writing classes that do not inherit from `numpy.ndarray`,
but that should support arithmetic and numpy universal functions like
arrays as described in `A Mechanism for Overriding Ufuncs
<https://numpy.org/neps/nep-0013-ufunc-overrides.html>`_.

As an trivial example, consider this implementation of an ``ArrayLike``
class that simply wraps a NumPy array and ensures that the result of any
arithmetic operation is also an ``ArrayLike`` object::

    class ArrayLike(np.lib.mixins.NDArrayOperatorsMixin):
        def __init__(self, value):
            self.value = np.asarray(value)

        # One might also consider adding the built-in list type to this
        # list, to support operations like np.add(array_like, list)
        _HANDLED_TYPES = (np.ndarray, numbers.Number)

        def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
            out = kwargs.get('out', ())
            for x in inputs + out:
                # Only support operations with instances of _HANDLED_TYPES.
                # Use ArrayLike instead of type(self) for isinstance to
                # allow subclasses that don't override __array_ufunc__ to
                # handle ArrayLike objects.
                if not isinstance(x, self._HANDLED_TYPES + (ArrayLike,)):
                    return NotImplemented

            # Defer to the implementation of the ufunc on unwrapped values.
            inputs = tuple(x.value if isinstance(x, ArrayLike) else x
                           for x in inputs)
            if out:
                kwargs['out'] = tuple(
                    x.value if isinstance(x, ArrayLike) else x
                    for x in out)
            result = getattr(ufunc, method)(*inputs, **kwargs)

            if type(result) is tuple:
                # multiple return values
                return tuple(type(self)(x) for x in result)
            elif method == 'at':
                # no return value
                return None
            else:
                # one return value
                return type(self)(result)

        def __repr__(self):
            return '%s(%r)' % (type(self).__name__, self.value)

In interactions between ``ArrayLike`` objects and numbers or numpy arrays,
the result is always another ``ArrayLike``:

    >>> x = ArrayLike([1, 2, 3])
    >>> x - 1
    ArrayLike(array([0, 1, 2]))
    >>> 1 - x
    ArrayLike(array([ 0, -1, -2]))
    >>> np.arange(3) - x
    ArrayLike(array([-1, -1, -1]))
    >>> x - np.arange(3)
    ArrayLike(array([1, 1, 1]))

Note that unlike ``numpy.ndarray``, ``ArrayLike`` does not allow operations
with arbitrary, unrecognized types. This ensures that interactions with
ArrayLike preserve a well-defined casting hierarchy.

.. versionadded:: 1.13

---
## func
```python
from mixins import func
```



---
## __name__
```python
from nanfunctions import __name__
```

Functions that ignore NaN.

Functions
---------

- `nanmin` -- minimum non-NaN value
- `nanmax` -- maximum non-NaN value
- `nanargmin` -- index of minimum non-NaN value
- `nanargmax` -- index of maximum non-NaN value
- `nansum` -- sum of non-NaN values
- `nanprod` -- product of non-NaN values
- `nancumsum` -- cumulative sum of non-NaN values
- `nancumprod` -- cumulative product of non-NaN values
- `nanmean` -- mean of non-NaN values
- `nanvar` -- variance of non-NaN values
- `nanstd` -- standard deviation of non-NaN values
- `nanmedian` -- median of non-NaN values
- `nanquantile` -- qth quantile of non-NaN values
- `nanpercentile` -- qth percentile of non-NaN values

---
## _nan_mask
```python
from nanfunctions import _nan_mask
```

Parameters
----------
a : array-like
    Input array with at least 1 dimension.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output and will prevent the allocation of a new array.

Returns
-------
y : bool ndarray or True
    A bool array where ``np.nan`` positions are marked with ``False``
    and other positions are marked with ``True``. If the type of ``a``
    is such that it can't possibly contain ``np.nan``, returns ``True``.

---
## _replace_nan
```python
from nanfunctions import _replace_nan
```

If `a` is of inexact type, make a copy of `a`, replace NaNs with
the `val` value, and return the copy together with a boolean mask
marking the locations where NaNs were present. If `a` is not of
inexact type, do nothing and return `a` together with a mask of None.

Note that scalars will end up as array scalars, which is important
for using the result as the value of the out argument in some
operations.

Parameters
----------
a : array-like
    Input array.
val : float
    NaN values are set to val before doing the operation.

Returns
-------
y : ndarray
    If `a` is of inexact type, return a copy of `a` with the NaNs
    replaced by the fill value, otherwise return `a`.
mask: {bool, None}
    If `a` is of inexact type, return a boolean mask marking locations of
    NaNs, otherwise return None.

---
## _copyto
```python
from nanfunctions import _copyto
```

Replace values in `a` with NaN where `mask` is True.  This differs from
copyto in that it will deal with the case where `a` is a numpy scalar.

Parameters
----------
a : ndarray or numpy scalar
    Array or numpy scalar some of whose values are to be replaced
    by val.
val : numpy scalar
    Value used a replacement.
mask : ndarray, scalar
    Boolean array. Where True the corresponding element of `a` is
    replaced by `val`. Broadcasts.

Returns
-------
res : ndarray, scalar
    Array with elements replaced or scalar `val`.

---
## _remove_nan_1d
```python
from nanfunctions import _remove_nan_1d
```

Equivalent to arr1d[~arr1d.isnan()], but in a different order

Presumably faster as it incurs fewer copies

Parameters
----------
arr1d : ndarray
    Array to remove nans from
overwrite_input : bool
    True if `arr1d` can be modified in place

Returns
-------
res : ndarray
    Array with nan elements removed
overwrite_input : bool
    True if `res` can be modified in place, given the constraint on the
    input

---
## _divide_by_count
```python
from nanfunctions import _divide_by_count
```

Compute a/b ignoring invalid results. If `a` is an array the division
is done in place. If `a` is a scalar, then its type is preserved in the
output. If out is None, then a is used instead so that the division
is in place. Note that this is only called with `a` an inexact type.

Parameters
----------
a : {ndarray, numpy scalar}
    Numerator. Expected to be of inexact type but not checked.
b : {ndarray, numpy scalar}
    Denominator.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output, but the type will be cast if necessary.

Returns
-------
ret : {ndarray, numpy scalar}
    The return value is a/b. If `a` was an ndarray the division is done
    in place. If `a` is a numpy scalar, the division preserves its type.

---
## _nanmin_dispatcher
```python
from nanfunctions import _nanmin_dispatcher
```



---
## nanmin
```python
from nanfunctions import nanmin
```

Return minimum of an array or minimum along an axis, ignoring any NaNs.
When all-NaN slices are encountered a ``RuntimeWarning`` is raised and
Nan is returned for that slice.

Parameters
----------
a : array_like
    Array containing numbers whose minimum is desired. If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the minimum is computed. The default is to compute
    the minimum of the flattened array.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output, but the type will be cast if necessary. See
    :ref:`ufuncs-output-type` for more details.

    .. versionadded:: 1.8.0
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.

    If the value is anything but the default, then
    `keepdims` will be passed through to the `min` method
    of sub-classes of `ndarray`.  If the sub-classes methods
    does not implement `keepdims` any exceptions will be raised.

    .. versionadded:: 1.8.0
initial : scalar, optional
    The maximum value of an output element. Must be present to allow
    computation on empty slice. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0
where : array_like of bool, optional
    Elements to compare for the minimum. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.22.0

Returns
-------
nanmin : ndarray
    An array with the same shape as `a`, with the specified axis
    removed.  If `a` is a 0-d array, or if axis is None, an ndarray
    scalar is returned.  The same dtype as `a` is returned.

See Also
--------
nanmax :
    The maximum value of an array along a given axis, ignoring any NaNs.
amin :
    The minimum value of an array along a given axis, propagating any NaNs.
fmin :
    Element-wise minimum of two arrays, ignoring any NaNs.
minimum :
    Element-wise minimum of two arrays, propagating any NaNs.
isnan :
    Shows which elements are Not a Number (NaN).
isfinite:
    Shows which elements are neither NaN nor infinity.

amax, fmax, maximum

Notes
-----
NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
(IEEE 754). This means that Not a Number is not equivalent to infinity.
Positive infinity is treated as a very large number and negative
infinity is treated as a very small (i.e. negative) number.

If the input has a integer type the function is equivalent to np.min.

Examples
--------
>>> a = np.array([[1, 2], [3, np.nan]])
>>> np.nanmin(a)
1.0
>>> np.nanmin(a, axis=0)
array([1.,  2.])
>>> np.nanmin(a, axis=1)
array([1.,  3.])

When positive infinity and negative infinity are present:

>>> np.nanmin([1, 2, np.nan, np.inf])
1.0
>>> np.nanmin([1, 2, np.nan, np.NINF])
-inf

---
## _nanmax_dispatcher
```python
from nanfunctions import _nanmax_dispatcher
```



---
## nanmax
```python
from nanfunctions import nanmax
```

Return the maximum of an array or maximum along an axis, ignoring any
NaNs.  When all-NaN slices are encountered a ``RuntimeWarning`` is
raised and NaN is returned for that slice.

Parameters
----------
a : array_like
    Array containing numbers whose maximum is desired. If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the maximum is computed. The default is to compute
    the maximum of the flattened array.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output, but the type will be cast if necessary. See
    :ref:`ufuncs-output-type` for more details.

    .. versionadded:: 1.8.0
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.

    If the value is anything but the default, then
    `keepdims` will be passed through to the `max` method
    of sub-classes of `ndarray`.  If the sub-classes methods
    does not implement `keepdims` any exceptions will be raised.

    .. versionadded:: 1.8.0
initial : scalar, optional
    The minimum value of an output element. Must be present to allow
    computation on empty slice. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0
where : array_like of bool, optional
    Elements to compare for the maximum. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.22.0

Returns
-------
nanmax : ndarray
    An array with the same shape as `a`, with the specified axis removed.
    If `a` is a 0-d array, or if axis is None, an ndarray scalar is
    returned.  The same dtype as `a` is returned.

See Also
--------
nanmin :
    The minimum value of an array along a given axis, ignoring any NaNs.
amax :
    The maximum value of an array along a given axis, propagating any NaNs.
fmax :
    Element-wise maximum of two arrays, ignoring any NaNs.
maximum :
    Element-wise maximum of two arrays, propagating any NaNs.
isnan :
    Shows which elements are Not a Number (NaN).
isfinite:
    Shows which elements are neither NaN nor infinity.

amin, fmin, minimum

Notes
-----
NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
(IEEE 754). This means that Not a Number is not equivalent to infinity.
Positive infinity is treated as a very large number and negative
infinity is treated as a very small (i.e. negative) number.

If the input has a integer type the function is equivalent to np.max.

Examples
--------
>>> a = np.array([[1, 2], [3, np.nan]])
>>> np.nanmax(a)
3.0
>>> np.nanmax(a, axis=0)
array([3.,  2.])
>>> np.nanmax(a, axis=1)
array([2.,  3.])

When positive infinity and negative infinity are present:

>>> np.nanmax([1, 2, np.nan, np.NINF])
2.0
>>> np.nanmax([1, 2, np.nan, np.inf])
inf

---
## _nanargmin_dispatcher
```python
from nanfunctions import _nanargmin_dispatcher
```



---
## nanargmin
```python
from nanfunctions import nanargmin
```

Return the indices of the minimum values in the specified axis ignoring
NaNs. For all-NaN slices ``ValueError`` is raised. Warning: the results
cannot be trusted if a slice contains only NaNs and Infs.

Parameters
----------
a : array_like
    Input data.
axis : int, optional
    Axis along which to operate.  By default flattened input is used.
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and dtype.

    .. versionadded:: 1.22.0
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

    .. versionadded:: 1.22.0

Returns
-------
index_array : ndarray
    An array of indices or a single index value.

See Also
--------
argmin, nanargmax

Examples
--------
>>> a = np.array([[np.nan, 4], [2, 3]])
>>> np.argmin(a)
0
>>> np.nanargmin(a)
2
>>> np.nanargmin(a, axis=0)
array([1, 1])
>>> np.nanargmin(a, axis=1)
array([1, 0])

---
## _nanargmax_dispatcher
```python
from nanfunctions import _nanargmax_dispatcher
```



---
## nanargmax
```python
from nanfunctions import nanargmax
```

Return the indices of the maximum values in the specified axis ignoring
NaNs. For all-NaN slices ``ValueError`` is raised. Warning: the
results cannot be trusted if a slice contains only NaNs and -Infs.


Parameters
----------
a : array_like
    Input data.
axis : int, optional
    Axis along which to operate.  By default flattened input is used.
out : array, optional
    If provided, the result will be inserted into this array. It should
    be of the appropriate shape and dtype.

    .. versionadded:: 1.22.0
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the array.

    .. versionadded:: 1.22.0

Returns
-------
index_array : ndarray
    An array of indices or a single index value.

See Also
--------
argmax, nanargmin

Examples
--------
>>> a = np.array([[np.nan, 4], [2, 3]])
>>> np.argmax(a)
0
>>> np.nanargmax(a)
1
>>> np.nanargmax(a, axis=0)
array([1, 0])
>>> np.nanargmax(a, axis=1)
array([1, 1])

---
## _nansum_dispatcher
```python
from nanfunctions import _nansum_dispatcher
```



---
## nansum
```python
from nanfunctions import nansum
```

Return the sum of array elements over a given axis treating Not a
Numbers (NaNs) as zero.

In NumPy versions <= 1.9.0 Nan is returned for slices that are all-NaN or
empty. In later versions zero is returned.

Parameters
----------
a : array_like
    Array containing numbers whose sum is desired. If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the sum is computed. The default is to compute the
    sum of the flattened array.
dtype : data-type, optional
    The type of the returned array and of the accumulator in which the
    elements are summed.  By default, the dtype of `a` is used.  An
    exception is when `a` has an integer type with less precision than
    the platform (u)intp. In that case, the default will be either
    (u)int32 or (u)int64 depending on whether the platform is 32 or 64
    bits. For inexact inputs, dtype must be inexact.

    .. versionadded:: 1.8.0
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``. If provided, it must have the same shape as the
    expected output, but the type will be cast if necessary.  See
    :ref:`ufuncs-output-type` for more details. The casting of NaN to integer
    can yield unexpected results.

    .. versionadded:: 1.8.0
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.


    If the value is anything but the default, then
    `keepdims` will be passed through to the `mean` or `sum` methods
    of sub-classes of `ndarray`.  If the sub-classes methods
    does not implement `keepdims` any exceptions will be raised.

    .. versionadded:: 1.8.0
initial : scalar, optional
    Starting value for the sum. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0
where : array_like of bool, optional
    Elements to include in the sum. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0

Returns
-------
nansum : ndarray.
    A new array holding the result is returned unless `out` is
    specified, in which it is returned. The result has the same
    size as `a`, and the same shape as `a` if `axis` is not None
    or `a` is a 1-d array.

See Also
--------
numpy.sum : Sum across array propagating NaNs.
isnan : Show which elements are NaN.
isfinite : Show which elements are not NaN or +/-inf.

Notes
-----
If both positive and negative infinity are present, the sum will be Not
A Number (NaN).

Examples
--------
>>> np.nansum(1)
1
>>> np.nansum([1])
1
>>> np.nansum([1, np.nan])
1.0
>>> a = np.array([[1, 1], [1, np.nan]])
>>> np.nansum(a)
3.0
>>> np.nansum(a, axis=0)
array([2.,  1.])
>>> np.nansum([1, np.nan, np.inf])
inf
>>> np.nansum([1, np.nan, np.NINF])
-inf
>>> from numpy.testing import suppress_warnings
>>> with suppress_warnings() as sup:
...     sup.filter(RuntimeWarning)
...     np.nansum([1, np.nan, np.inf, -np.inf]) # both +/- infinity present
nan

---
## _nanprod_dispatcher
```python
from nanfunctions import _nanprod_dispatcher
```



---
## nanprod
```python
from nanfunctions import nanprod
```

Return the product of array elements over a given axis treating Not a
Numbers (NaNs) as ones.

One is returned for slices that are all-NaN or empty.

.. versionadded:: 1.10.0

Parameters
----------
a : array_like
    Array containing numbers whose product is desired. If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the product is computed. The default is to compute
    the product of the flattened array.
dtype : data-type, optional
    The type of the returned array and of the accumulator in which the
    elements are summed.  By default, the dtype of `a` is used.  An
    exception is when `a` has an integer type with less precision than
    the platform (u)intp. In that case, the default will be either
    (u)int32 or (u)int64 depending on whether the platform is 32 or 64
    bits. For inexact inputs, dtype must be inexact.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``. If provided, it must have the same shape as the
    expected output, but the type will be cast if necessary. See
    :ref:`ufuncs-output-type` for more details. The casting of NaN to integer
    can yield unexpected results.
keepdims : bool, optional
    If True, the axes which are reduced are left in the result as
    dimensions with size one. With this option, the result will
    broadcast correctly against the original `arr`.
initial : scalar, optional
    The starting value for this product. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.22.0
where : array_like of bool, optional
    Elements to include in the product. See `~numpy.ufunc.reduce`
    for details.

    .. versionadded:: 1.22.0

Returns
-------
nanprod : ndarray
    A new array holding the result is returned unless `out` is
    specified, in which case it is returned.

See Also
--------
numpy.prod : Product across array propagating NaNs.
isnan : Show which elements are NaN.

Examples
--------
>>> np.nanprod(1)
1
>>> np.nanprod([1])
1
>>> np.nanprod([1, np.nan])
1.0
>>> a = np.array([[1, 2], [3, np.nan]])
>>> np.nanprod(a)
6.0
>>> np.nanprod(a, axis=0)
array([3., 2.])

---
## _nancumsum_dispatcher
```python
from nanfunctions import _nancumsum_dispatcher
```



---
## nancumsum
```python
from nanfunctions import nancumsum
```

Return the cumulative sum of array elements over a given axis treating Not a
Numbers (NaNs) as zero.  The cumulative sum does not change when NaNs are
encountered and leading NaNs are replaced by zeros.

Zeros are returned for slices that are all-NaN or empty.

.. versionadded:: 1.12.0

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    Axis along which the cumulative sum is computed. The default
    (None) is to compute the cumsum over the flattened array.
dtype : dtype, optional
    Type of the returned array and of the accumulator in which the
    elements are summed.  If `dtype` is not specified, it defaults
    to the dtype of `a`, unless `a` has an integer dtype with a
    precision less than that of the default platform integer.  In
    that case, the default platform integer is used.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type will be cast if necessary. See :ref:`ufuncs-output-type` for
    more details.

Returns
-------
nancumsum : ndarray.
    A new array holding the result is returned unless `out` is
    specified, in which it is returned. The result has the same
    size as `a`, and the same shape as `a` if `axis` is not None
    or `a` is a 1-d array.

See Also
--------
numpy.cumsum : Cumulative sum across array propagating NaNs.
isnan : Show which elements are NaN.

Examples
--------
>>> np.nancumsum(1)
array([1])
>>> np.nancumsum([1])
array([1])
>>> np.nancumsum([1, np.nan])
array([1.,  1.])
>>> a = np.array([[1, 2], [3, np.nan]])
>>> np.nancumsum(a)
array([1.,  3.,  6.,  6.])
>>> np.nancumsum(a, axis=0)
array([[1.,  2.],
       [4.,  2.]])
>>> np.nancumsum(a, axis=1)
array([[1.,  3.],
       [3.,  3.]])

---
## _nancumprod_dispatcher
```python
from nanfunctions import _nancumprod_dispatcher
```



---
## nancumprod
```python
from nanfunctions import nancumprod
```

Return the cumulative product of array elements over a given axis treating Not a
Numbers (NaNs) as one.  The cumulative product does not change when NaNs are
encountered and leading NaNs are replaced by ones.

Ones are returned for slices that are all-NaN or empty.

.. versionadded:: 1.12.0

Parameters
----------
a : array_like
    Input array.
axis : int, optional
    Axis along which the cumulative product is computed.  By default
    the input is flattened.
dtype : dtype, optional
    Type of the returned array, as well as of the accumulator in which
    the elements are multiplied.  If *dtype* is not specified, it
    defaults to the dtype of `a`, unless `a` has an integer dtype with
    a precision less than that of the default platform integer.  In
    that case, the default platform integer is used instead.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output
    but the type of the resulting values will be cast if necessary.

Returns
-------
nancumprod : ndarray
    A new array holding the result is returned unless `out` is
    specified, in which case it is returned.

See Also
--------
numpy.cumprod : Cumulative product across array propagating NaNs.
isnan : Show which elements are NaN.

Examples
--------
>>> np.nancumprod(1)
array([1])
>>> np.nancumprod([1])
array([1])
>>> np.nancumprod([1, np.nan])
array([1.,  1.])
>>> a = np.array([[1, 2], [3, np.nan]])
>>> np.nancumprod(a)
array([1.,  2.,  6.,  6.])
>>> np.nancumprod(a, axis=0)
array([[1.,  2.],
       [3.,  2.]])
>>> np.nancumprod(a, axis=1)
array([[1.,  2.],
       [3.,  3.]])

---
## _nanmean_dispatcher
```python
from nanfunctions import _nanmean_dispatcher
```



---
## nanmean
```python
from nanfunctions import nanmean
```

Compute the arithmetic mean along the specified axis, ignoring NaNs.

Returns the average of the array elements.  The average is taken over
the flattened array by default, otherwise over the specified axis.
`float64` intermediate and return values are used for integer inputs.

For all-NaN slices, NaN is returned and a `RuntimeWarning` is raised.

.. versionadded:: 1.8.0

Parameters
----------
a : array_like
    Array containing numbers whose mean is desired. If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the means are computed. The default is to compute
    the mean of the flattened array.
dtype : data-type, optional
    Type to use in computing the mean.  For integer inputs, the default
    is `float64`; for inexact inputs, it is the same as the input
    dtype.
out : ndarray, optional
    Alternate output array in which to place the result.  The default
    is ``None``; if provided, it must have the same shape as the
    expected output, but the type will be cast if necessary. See
    :ref:`ufuncs-output-type` for more details.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.

    If the value is anything but the default, then
    `keepdims` will be passed through to the `mean` or `sum` methods
    of sub-classes of `ndarray`.  If the sub-classes methods
    does not implement `keepdims` any exceptions will be raised.
where : array_like of bool, optional
    Elements to include in the mean. See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0

Returns
-------
m : ndarray, see dtype parameter above
    If `out=None`, returns a new array containing the mean values,
    otherwise a reference to the output array is returned. Nan is
    returned for slices that contain only NaNs.

See Also
--------
average : Weighted average
mean : Arithmetic mean taken while not ignoring NaNs
var, nanvar

Notes
-----
The arithmetic mean is the sum of the non-NaN elements along the axis
divided by the number of non-NaN elements.

Note that for floating-point input, the mean is computed using the same
precision the input has.  Depending on the input data, this can cause
the results to be inaccurate, especially for `float32`.  Specifying a
higher-precision accumulator using the `dtype` keyword can alleviate
this issue.

Examples
--------
>>> a = np.array([[1, np.nan], [3, 4]])
>>> np.nanmean(a)
2.6666666666666665
>>> np.nanmean(a, axis=0)
array([2.,  4.])
>>> np.nanmean(a, axis=1)
array([1.,  3.5]) # may vary

---
## _nanmedian1d
```python
from nanfunctions import _nanmedian1d
```

Private function for rank 1 arrays. Compute the median ignoring NaNs.
See nanmedian for parameter usage

---
## _nanmedian
```python
from nanfunctions import _nanmedian
```

Private function that doesn't support extended axis or keepdims.
These methods are extended to this function using _ureduce
See nanmedian for parameter usage

---
## _nanmedian_small
```python
from nanfunctions import _nanmedian_small
```

sort + indexing median, faster for small medians along multiple
dimensions due to the high overhead of apply_along_axis

see nanmedian for parameter usage

---
## _nanmedian_dispatcher
```python
from nanfunctions import _nanmedian_dispatcher
```



---
## nanmedian
```python
from nanfunctions import nanmedian
```

Compute the median along the specified axis, while ignoring NaNs.

Returns the median of the array elements.

.. versionadded:: 1.9.0

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
axis : {int, sequence of int, None}, optional
    Axis or axes along which the medians are computed. The default
    is to compute the median along a flattened version of the array.
    A sequence of axes is supported since version 1.9.0.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output,
    but the type (of the output) will be cast if necessary.
overwrite_input : bool, optional
   If True, then allow use of memory of input array `a` for
   calculations. The input array will be modified by the call to
   `median`. This will save memory when you do not need to preserve
   the contents of the input array. Treat the input as undefined,
   but it will probably be fully or partially sorted. Default is
   False. If `overwrite_input` is ``True`` and `a` is not already an
   `ndarray`, an error will be raised.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.

    If this is anything but the default value it will be passed
    through (in the special case of an empty array) to the
    `mean` function of the underlying array.  If the array is
    a sub-class and `mean` does not have the kwarg `keepdims` this
    will raise a RuntimeError.

Returns
-------
median : ndarray
    A new array holding the result. If the input contains integers
    or floats smaller than ``float64``, then the output data-type is
    ``np.float64``.  Otherwise, the data-type of the output is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
mean, median, percentile

Notes
-----
Given a vector ``V`` of length ``N``, the median of ``V`` is the
middle value of a sorted copy of ``V``, ``V_sorted`` - i.e.,
``V_sorted[(N-1)/2]``, when ``N`` is odd and the average of the two
middle values of ``V_sorted`` when ``N`` is even.

Examples
--------
>>> a = np.array([[10.0, 7, 4], [3, 2, 1]])
>>> a[0, 1] = np.nan
>>> a
array([[10., nan,  4.],
       [ 3.,  2.,  1.]])
>>> np.median(a)
nan
>>> np.nanmedian(a)
3.0
>>> np.nanmedian(a, axis=0)
array([6.5, 2. , 2.5])
>>> np.median(a, axis=1)
array([nan,  2.])
>>> b = a.copy()
>>> np.nanmedian(b, axis=1, overwrite_input=True)
array([7.,  2.])
>>> assert not np.all(a==b)
>>> b = a.copy()
>>> np.nanmedian(b, axis=None, overwrite_input=True)
3.0
>>> assert not np.all(a==b)

---
## _nanpercentile_dispatcher
```python
from nanfunctions import _nanpercentile_dispatcher
```



---
## nanpercentile
```python
from nanfunctions import nanpercentile
```

Compute the qth percentile of the data along the specified axis,
while ignoring nan values.

Returns the qth percentile(s) of the array elements.

.. versionadded:: 1.9.0

Parameters
----------
a : array_like
    Input array or object that can be converted to an array, containing
    nan values to be ignored.
q : array_like of float
    Percentile or sequence of percentiles to compute, which must be
    between 0 and 100 inclusive.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the percentiles are computed. The default
    is to compute the percentile(s) along a flattened version of the
    array.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape and buffer length as the expected output, but the
    type (of the output) will be cast if necessary.
overwrite_input : bool, optional
    If True, then allow the input array `a` to be modified by
    intermediate calculations, to save memory. In this case, the
    contents of the input `a` after this function completes is
    undefined.
method : str, optional
    This parameter specifies the method to use for estimating the
    percentile.  There are many different methods, some unique to NumPy.
    See the notes for explanation.  The options sorted by their R type
    as summarized in the H&F paper [1]_ are:

    1. 'inverted_cdf'
    2. 'averaged_inverted_cdf'
    3. 'closest_observation'
    4. 'interpolated_inverted_cdf'
    5. 'hazen'
    6. 'weibull'
    7. 'linear'  (default)
    8. 'median_unbiased'
    9. 'normal_unbiased'

    The first three methods are discontinuous.  NumPy further defines the
    following discontinuous variations of the default 'linear' (7.) option:

    * 'lower'
    * 'higher',
    * 'midpoint'
    * 'nearest'

    .. versionchanged:: 1.22.0
        This argument was previously called "interpolation" and only
        offered the "linear" default and last four options.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left in
    the result as dimensions with size one. With this option, the
    result will broadcast correctly against the original array `a`.

    If this is anything but the default value it will be passed
    through (in the special case of an empty array) to the
    `mean` function of the underlying array.  If the array is
    a sub-class and `mean` does not have the kwarg `keepdims` this
    will raise a RuntimeError.

interpolation : str, optional
    Deprecated name for the method keyword argument.

    .. deprecated:: 1.22.0

Returns
-------
percentile : scalar or ndarray
    If `q` is a single percentile and `axis=None`, then the result
    is a scalar. If multiple percentiles are given, first axis of
    the result corresponds to the percentiles. The other axes are
    the axes that remain after the reduction of `a`. If the input
    contains integers or floats smaller than ``float64``, the output
    data-type is ``float64``. Otherwise, the output data-type is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
nanmean
nanmedian : equivalent to ``nanpercentile(..., 50)``
percentile, median, mean
nanquantile : equivalent to nanpercentile, except q in range [0, 1].

Notes
-----
For more information please see `numpy.percentile`

Examples
--------
>>> a = np.array([[10., 7., 4.], [3., 2., 1.]])
>>> a[0][1] = np.nan
>>> a
array([[10.,  nan,   4.],
      [ 3.,   2.,   1.]])
>>> np.percentile(a, 50)
nan
>>> np.nanpercentile(a, 50)
3.0
>>> np.nanpercentile(a, 50, axis=0)
array([6.5, 2. , 2.5])
>>> np.nanpercentile(a, 50, axis=1, keepdims=True)
array([[7.],
       [2.]])
>>> m = np.nanpercentile(a, 50, axis=0)
>>> out = np.zeros_like(m)
>>> np.nanpercentile(a, 50, axis=0, out=out)
array([6.5, 2. , 2.5])
>>> m
array([6.5,  2. ,  2.5])

>>> b = a.copy()
>>> np.nanpercentile(b, 50, axis=1, overwrite_input=True)
array([7., 2.])
>>> assert not np.all(a==b)

References
----------
.. [1] R. J. Hyndman and Y. Fan,
   "Sample quantiles in statistical packages,"
   The American Statistician, 50(4), pp. 361-365, 1996

---
## _nanquantile_dispatcher
```python
from nanfunctions import _nanquantile_dispatcher
```



---
## nanquantile
```python
from nanfunctions import nanquantile
```

Compute the qth quantile of the data along the specified axis,
while ignoring nan values.
Returns the qth quantile(s) of the array elements.

.. versionadded:: 1.15.0

Parameters
----------
a : array_like
    Input array or object that can be converted to an array, containing
    nan values to be ignored
q : array_like of float
    Probability or sequence of probabilities for the quantiles to compute.
    Values must be between 0 and 1 inclusive.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the quantiles are computed. The
    default is to compute the quantile(s) along a flattened
    version of the array.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output,
    but the type (of the output) will be cast if necessary.
overwrite_input : bool, optional
    If True, then allow the input array `a` to be modified by intermediate
    calculations, to save memory. In this case, the contents of the input
    `a` after this function completes is undefined.
method : str, optional
    This parameter specifies the method to use for estimating the
    quantile.  There are many different methods, some unique to NumPy.
    See the notes for explanation.  The options sorted by their R type
    as summarized in the H&F paper [1]_ are:

    1. 'inverted_cdf'
    2. 'averaged_inverted_cdf'
    3. 'closest_observation'
    4. 'interpolated_inverted_cdf'
    5. 'hazen'
    6. 'weibull'
    7. 'linear'  (default)
    8. 'median_unbiased'
    9. 'normal_unbiased'

    The first three methods are discontinuous.  NumPy further defines the
    following discontinuous variations of the default 'linear' (7.) option:

    * 'lower'
    * 'higher',
    * 'midpoint'
    * 'nearest'

    .. versionchanged:: 1.22.0
        This argument was previously called "interpolation" and only
        offered the "linear" default and last four options.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left in
    the result as dimensions with size one. With this option, the
    result will broadcast correctly against the original array `a`.

    If this is anything but the default value it will be passed
    through (in the special case of an empty array) to the
    `mean` function of the underlying array.  If the array is
    a sub-class and `mean` does not have the kwarg `keepdims` this
    will raise a RuntimeError.

interpolation : str, optional
    Deprecated name for the method keyword argument.

    .. deprecated:: 1.22.0

Returns
-------
quantile : scalar or ndarray
    If `q` is a single probability and `axis=None`, then the result
    is a scalar. If multiple probability levels are given, first axis of
    the result corresponds to the quantiles. The other axes are
    the axes that remain after the reduction of `a`. If the input
    contains integers or floats smaller than ``float64``, the output
    data-type is ``float64``. Otherwise, the output data-type is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
quantile
nanmean, nanmedian
nanmedian : equivalent to ``nanquantile(..., 0.5)``
nanpercentile : same as nanquantile, but with q in the range [0, 100].

Notes
-----
For more information please see `numpy.quantile`

Examples
--------
>>> a = np.array([[10., 7., 4.], [3., 2., 1.]])
>>> a[0][1] = np.nan
>>> a
array([[10.,  nan,   4.],
      [ 3.,   2.,   1.]])
>>> np.quantile(a, 0.5)
nan
>>> np.nanquantile(a, 0.5)
3.0
>>> np.nanquantile(a, 0.5, axis=0)
array([6.5, 2. , 2.5])
>>> np.nanquantile(a, 0.5, axis=1, keepdims=True)
array([[7.],
       [2.]])
>>> m = np.nanquantile(a, 0.5, axis=0)
>>> out = np.zeros_like(m)
>>> np.nanquantile(a, 0.5, axis=0, out=out)
array([6.5, 2. , 2.5])
>>> m
array([6.5,  2. ,  2.5])
>>> b = a.copy()
>>> np.nanquantile(b, 0.5, axis=1, overwrite_input=True)
array([7., 2.])
>>> assert not np.all(a==b)

References
----------
.. [1] R. J. Hyndman and Y. Fan,
   "Sample quantiles in statistical packages,"
   The American Statistician, 50(4), pp. 361-365, 1996

---
## _nanquantile_unchecked
```python
from nanfunctions import _nanquantile_unchecked
```

Assumes that q is in [0, 1], and is an ndarray

---
## _nanquantile_ureduce_func
```python
from nanfunctions import _nanquantile_ureduce_func
```

Private function that doesn't support extended axis or keepdims.
These methods are extended to this function using _ureduce
See nanpercentile for parameter usage

---
## _nanquantile_1d
```python
from nanfunctions import _nanquantile_1d
```

Private function for rank 1 arrays. Compute quantile ignoring NaNs.
See nanpercentile for parameter usage

---
## _nanvar_dispatcher
```python
from nanfunctions import _nanvar_dispatcher
```



---
## nanvar
```python
from nanfunctions import nanvar
```

Compute the variance along the specified axis, while ignoring NaNs.

Returns the variance of the array elements, a measure of the spread of
a distribution.  The variance is computed for the flattened array by
default, otherwise over the specified axis.

For all-NaN slices or slices with zero degrees of freedom, NaN is
returned and a `RuntimeWarning` is raised.

.. versionadded:: 1.8.0

Parameters
----------
a : array_like
    Array containing numbers whose variance is desired.  If `a` is not an
    array, a conversion is attempted.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the variance is computed.  The default is to compute
    the variance of the flattened array.
dtype : data-type, optional
    Type to use in computing the variance.  For arrays of integer type
    the default is `float64`; for arrays of float types it is the same as
    the array type.
out : ndarray, optional
    Alternate output array in which to place the result.  It must have
    the same shape as the expected output, but the type is cast if
    necessary.
ddof : int, optional
    "Delta Degrees of Freedom": the divisor used in the calculation is
    ``N - ddof``, where ``N`` represents the number of non-NaN
    elements. By default `ddof` is zero.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.
where : array_like of bool, optional
    Elements to include in the variance. See `~numpy.ufunc.reduce` for
    details.

    .. versionadded:: 1.22.0

Returns
-------
variance : ndarray, see dtype parameter above
    If `out` is None, return a new array containing the variance,
    otherwise return a reference to the output array. If ddof is >= the
    number of non-NaN elements in a slice or the slice contains only
    NaNs, then the result for that slice is NaN.

See Also
--------
std : Standard deviation
mean : Average
var : Variance while not ignoring NaNs
nanstd, nanmean
:ref:`ufuncs-output-type`

Notes
-----
The variance is the average of the squared deviations from the mean,
i.e.,  ``var = mean(abs(x - x.mean())**2)``.

The mean is normally calculated as ``x.sum() / N``, where ``N = len(x)``.
If, however, `ddof` is specified, the divisor ``N - ddof`` is used
instead.  In standard statistical practice, ``ddof=1`` provides an
unbiased estimator of the variance of a hypothetical infinite
population.  ``ddof=0`` provides a maximum likelihood estimate of the
variance for normally distributed variables.

Note that for complex numbers, the absolute value is taken before
squaring, so that the result is always real and nonnegative.

For floating-point input, the variance is computed using the same
precision the input has.  Depending on the input data, this can cause
the results to be inaccurate, especially for `float32` (see example
below).  Specifying a higher-accuracy accumulator using the ``dtype``
keyword can alleviate this issue.

For this function to work on sub-classes of ndarray, they must define
`sum` with the kwarg `keepdims`

Examples
--------
>>> a = np.array([[1, np.nan], [3, 4]])
>>> np.nanvar(a)
1.5555555555555554
>>> np.nanvar(a, axis=0)
array([1.,  0.])
>>> np.nanvar(a, axis=1)
array([0.,  0.25])  # may vary

---
## _nanstd_dispatcher
```python
from nanfunctions import _nanstd_dispatcher
```



---
## nanstd
```python
from nanfunctions import nanstd
```

Compute the standard deviation along the specified axis, while
ignoring NaNs.

Returns the standard deviation, a measure of the spread of a
distribution, of the non-NaN array elements. The standard deviation is
computed for the flattened array by default, otherwise over the
specified axis.

For all-NaN slices or slices with zero degrees of freedom, NaN is
returned and a `RuntimeWarning` is raised.

.. versionadded:: 1.8.0

Parameters
----------
a : array_like
    Calculate the standard deviation of the non-NaN values.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the standard deviation is computed. The default is
    to compute the standard deviation of the flattened array.
dtype : dtype, optional
    Type to use in computing the standard deviation. For arrays of
    integer type the default is float64, for arrays of float types it
    is the same as the array type.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape as the expected output but the type (of the
    calculated values) will be cast if necessary.
ddof : int, optional
    Means Delta Degrees of Freedom.  The divisor used in calculations
    is ``N - ddof``, where ``N`` represents the number of non-NaN
    elements.  By default `ddof` is zero.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.

    If this value is anything but the default it is passed through
    as-is to the relevant functions of the sub-classes.  If these
    functions do not have a `keepdims` kwarg, a RuntimeError will
    be raised.
where : array_like of bool, optional
    Elements to include in the standard deviation.
    See `~numpy.ufunc.reduce` for details.

    .. versionadded:: 1.22.0

Returns
-------
standard_deviation : ndarray, see dtype parameter above.
    If `out` is None, return a new array containing the standard
    deviation, otherwise return a reference to the output array. If
    ddof is >= the number of non-NaN elements in a slice or the slice
    contains only NaNs, then the result for that slice is NaN.

See Also
--------
var, mean, std
nanvar, nanmean
:ref:`ufuncs-output-type`

Notes
-----
The standard deviation is the square root of the average of the squared
deviations from the mean: ``std = sqrt(mean(abs(x - x.mean())**2))``.

The average squared deviation is normally calculated as
``x.sum() / N``, where ``N = len(x)``.  If, however, `ddof` is
specified, the divisor ``N - ddof`` is used instead. In standard
statistical practice, ``ddof=1`` provides an unbiased estimator of the
variance of the infinite population. ``ddof=0`` provides a maximum
likelihood estimate of the variance for normally distributed variables.
The standard deviation computed in this function is the square root of
the estimated variance, so even with ``ddof=1``, it will not be an
unbiased estimate of the standard deviation per se.

Note that, for complex numbers, `std` takes the absolute value before
squaring, so that the result is always real and nonnegative.

For floating-point input, the *std* is computed using the same
precision the input has. Depending on the input data, this can cause
the results to be inaccurate, especially for float32 (see example
below).  Specifying a higher-accuracy accumulator using the `dtype`
keyword can alleviate this issue.

Examples
--------
>>> a = np.array([[1, np.nan], [3, 4]])
>>> np.nanstd(a)
1.247219128924647
>>> np.nanstd(a, axis=0)
array([1., 0.])
>>> np.nanstd(a, axis=1)
array([0.,  0.5]) # may vary

---
## __name__
```python
from recfunctions import __name__
```

Collection of utilities to manipulate structured arrays.

Most of these functions were initially implemented by John Hunter for
matplotlib.  They have been rewritten and extended for convenience.

---
## _recursive_fill_fields_dispatcher
```python
from recfunctions import _recursive_fill_fields_dispatcher
```



---
## recursive_fill_fields
```python
from recfunctions import recursive_fill_fields
```

Fills fields from output with fields from input,
with support for nested structures.

Parameters
----------
input : ndarray
    Input array.
output : ndarray
    Output array.

Notes
-----
* `output` should be at least the same size as `input`

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> a = np.array([(1, 10.), (2, 20.)], dtype=[('A', np.int64), ('B', np.float64)])
>>> b = np.zeros((3,), dtype=a.dtype)
>>> rfn.recursive_fill_fields(a, b)
array([(1, 10.), (2, 20.), (0,  0.)], dtype=[('A', '<i8'), ('B', '<f8')])

---
## _get_fieldspec
```python
from recfunctions import _get_fieldspec
```

Produce a list of name/dtype pairs corresponding to the dtype fields

Similar to dtype.descr, but the second item of each tuple is a dtype, not a
string. As a result, this handles subarray dtypes

Can be passed to the dtype constructor to reconstruct the dtype, noting that
this (deliberately) discards field offsets.

Examples
--------
>>> dt = np.dtype([(('a', 'A'), np.int64), ('b', np.double, 3)])
>>> dt.descr
[(('a', 'A'), '<i8'), ('b', '<f8', (3,))]
>>> _get_fieldspec(dt)
[(('a', 'A'), dtype('int64')), ('b', dtype(('<f8', (3,))))]

---
## get_names
```python
from recfunctions import get_names
```

Returns the field names of the input datatype as a tuple. Input datatype
must have fields otherwise error is raised.

Parameters
----------
adtype : dtype
    Input datatype

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> rfn.get_names(np.empty((1,), dtype=[('A', int)]).dtype)
('A',)
>>> rfn.get_names(np.empty((1,), dtype=[('A',int), ('B', float)]).dtype)
('A', 'B')
>>> adtype = np.dtype([('a', int), ('b', [('ba', int), ('bb', int)])])
>>> rfn.get_names(adtype)
('a', ('b', ('ba', 'bb')))

---
## get_names_flat
```python
from recfunctions import get_names_flat
```

Returns the field names of the input datatype as a tuple. Input datatype
must have fields otherwise error is raised.
Nested structure are flattened beforehand.

Parameters
----------
adtype : dtype
    Input datatype

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> rfn.get_names_flat(np.empty((1,), dtype=[('A', int)]).dtype) is None
False
>>> rfn.get_names_flat(np.empty((1,), dtype=[('A',int), ('B', str)]).dtype)
('A', 'B')
>>> adtype = np.dtype([('a', int), ('b', [('ba', int), ('bb', int)])])
>>> rfn.get_names_flat(adtype)
('a', 'b', 'ba', 'bb')

---
## flatten_descr
```python
from recfunctions import flatten_descr
```

Flatten a structured data-type description.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> ndtype = np.dtype([('a', '<i4'), ('b', [('ba', '<f8'), ('bb', '<i4')])])
>>> rfn.flatten_descr(ndtype)
(('a', dtype('int32')), ('ba', dtype('float64')), ('bb', dtype('int32')))

---
## _zip_dtype
```python
from recfunctions import _zip_dtype
```



---
## _zip_descr
```python
from recfunctions import _zip_descr
```

Combine the dtype description of a series of arrays.

Parameters
----------
seqarrays : sequence of arrays
    Sequence of arrays
flatten : {boolean}, optional
    Whether to collapse nested descriptions.

---
## get_fieldstructure
```python
from recfunctions import get_fieldstructure
```

Returns a dictionary with fields indexing lists of their parent fields.

This function is used to simplify access to fields nested in other fields.

Parameters
----------
adtype : np.dtype
    Input datatype
lastname : optional
    Last processed field name (used internally during recursion).
parents : dictionary
    Dictionary of parent fields (used interbally during recursion).

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> ndtype =  np.dtype([('A', int),
...                     ('B', [('BA', int),
...                            ('BB', [('BBA', int), ('BBB', int)])])])
>>> rfn.get_fieldstructure(ndtype)
... # XXX: possible regression, order of BBA and BBB is swapped
{'A': [], 'B': [], 'BA': ['B'], 'BB': ['B'], 'BBA': ['B', 'BB'], 'BBB': ['B', 'BB']}

---
## _izip_fields_flat
```python
from recfunctions import _izip_fields_flat
```

Returns an iterator of concatenated fields from a sequence of arrays,
collapsing any nested structure.

---
## _izip_fields
```python
from recfunctions import _izip_fields
```

Returns an iterator of concatenated fields from a sequence of arrays.

---
## _izip_records
```python
from recfunctions import _izip_records
```

Returns an iterator of concatenated items from a sequence of arrays.

Parameters
----------
seqarrays : sequence of arrays
    Sequence of arrays.
fill_value : {None, integer}
    Value used to pad shorter iterables.
flatten : {True, False},
    Whether to

---
## _fix_output
```python
from recfunctions import _fix_output
```

Private function: return a recarray, a ndarray, a MaskedArray
or a MaskedRecords depending on the input parameters

---
## _fix_defaults
```python
from recfunctions import _fix_defaults
```

Update the fill_value and masked data of `output`
from the default given in a dictionary defaults.

---
## _merge_arrays_dispatcher
```python
from recfunctions import _merge_arrays_dispatcher
```



---
## merge_arrays
```python
from recfunctions import merge_arrays
```

Merge arrays field by field.

Parameters
----------
seqarrays : sequence of ndarrays
    Sequence of arrays
fill_value : {float}, optional
    Filling value used to pad missing data on the shorter arrays.
flatten : {False, True}, optional
    Whether to collapse nested fields.
usemask : {False, True}, optional
    Whether to return a masked array or not.
asrecarray : {False, True}, optional
    Whether to return a recarray (MaskedRecords) or not.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> rfn.merge_arrays((np.array([1, 2]), np.array([10., 20., 30.])))
array([( 1, 10.), ( 2, 20.), (-1, 30.)],
      dtype=[('f0', '<i8'), ('f1', '<f8')])

>>> rfn.merge_arrays((np.array([1, 2], dtype=np.int64),
...         np.array([10., 20., 30.])), usemask=False)
 array([(1, 10.0), (2, 20.0), (-1, 30.0)],
         dtype=[('f0', '<i8'), ('f1', '<f8')])
>>> rfn.merge_arrays((np.array([1, 2]).view([('a', np.int64)]),
...               np.array([10., 20., 30.])),
...              usemask=False, asrecarray=True)
rec.array([( 1, 10.), ( 2, 20.), (-1, 30.)],
          dtype=[('a', '<i8'), ('f1', '<f8')])

Notes
-----
* Without a mask, the missing value will be filled with something,
  depending on what its corresponding type:

  * ``-1``      for integers
  * ``-1.0``    for floating point numbers
  * ``'-'``     for characters
  * ``'-1'``    for strings
  * ``True``    for boolean values
* XXX: I just obtained these values empirically

---
## _drop_fields_dispatcher
```python
from recfunctions import _drop_fields_dispatcher
```



---
## drop_fields
```python
from recfunctions import drop_fields
```

Return a new array with fields in `drop_names` dropped.

Nested fields are supported.

.. versionchanged:: 1.18.0
    `drop_fields` returns an array with 0 fields if all fields are dropped,
    rather than returning ``None`` as it did previously.

Parameters
----------
base : array
    Input array
drop_names : string or sequence
    String or sequence of strings corresponding to the names of the
    fields to drop.
usemask : {False, True}, optional
    Whether to return a masked array or not.
asrecarray : string or sequence, optional
    Whether to return a recarray or a mrecarray (`asrecarray=True`) or
    a plain ndarray or masked array with flexible dtype. The default
    is False.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> a = np.array([(1, (2, 3.0)), (4, (5, 6.0))],
...   dtype=[('a', np.int64), ('b', [('ba', np.double), ('bb', np.int64)])])
>>> rfn.drop_fields(a, 'a')
array([((2., 3),), ((5., 6),)],
      dtype=[('b', [('ba', '<f8'), ('bb', '<i8')])])
>>> rfn.drop_fields(a, 'ba')
array([(1, (3,)), (4, (6,))], dtype=[('a', '<i8'), ('b', [('bb', '<i8')])])
>>> rfn.drop_fields(a, ['ba', 'bb'])
array([(1,), (4,)], dtype=[('a', '<i8')])

---
## _keep_fields
```python
from recfunctions import _keep_fields
```

Return a new array keeping only the fields in `keep_names`,
and preserving the order of those fields.

Parameters
----------
base : array
    Input array
keep_names : string or sequence
    String or sequence of strings corresponding to the names of the
    fields to keep. Order of the names will be preserved.
usemask : {False, True}, optional
    Whether to return a masked array or not.
asrecarray : string or sequence, optional
    Whether to return a recarray or a mrecarray (`asrecarray=True`) or
    a plain ndarray or masked array with flexible dtype. The default
    is False.

---
## _rec_drop_fields_dispatcher
```python
from recfunctions import _rec_drop_fields_dispatcher
```



---
## rec_drop_fields
```python
from recfunctions import rec_drop_fields
```

Returns a new numpy.recarray with fields in `drop_names` dropped.

---
## _rename_fields_dispatcher
```python
from recfunctions import _rename_fields_dispatcher
```



---
## rename_fields
```python
from recfunctions import rename_fields
```

Rename the fields from a flexible-datatype ndarray or recarray.

Nested fields are supported.

Parameters
----------
base : ndarray
    Input array whose fields must be modified.
namemapper : dictionary
    Dictionary mapping old field names to their new version.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> a = np.array([(1, (2, [3.0, 30.])), (4, (5, [6.0, 60.]))],
...   dtype=[('a', int),('b', [('ba', float), ('bb', (float, 2))])])
>>> rfn.rename_fields(a, {'a':'A', 'bb':'BB'})
array([(1, (2., [ 3., 30.])), (4, (5., [ 6., 60.]))],
      dtype=[('A', '<i8'), ('b', [('ba', '<f8'), ('BB', '<f8', (2,))])])

---
## _append_fields_dispatcher
```python
from recfunctions import _append_fields_dispatcher
```



---
## append_fields
```python
from recfunctions import append_fields
```

Add new fields to an existing array.

The names of the fields are given with the `names` arguments,
the corresponding values with the `data` arguments.
If a single field is appended, `names`, `data` and `dtypes` do not have
to be lists but just values.

Parameters
----------
base : array
    Input array to extend.
names : string, sequence
    String or sequence of strings corresponding to the names
    of the new fields.
data : array or sequence of arrays
    Array or sequence of arrays storing the fields to add to the base.
dtypes : sequence of datatypes, optional
    Datatype or sequence of datatypes.
    If None, the datatypes are estimated from the `data`.
fill_value : {float}, optional
    Filling value used to pad missing data on the shorter arrays.
usemask : {False, True}, optional
    Whether to return a masked array or not.
asrecarray : {False, True}, optional
    Whether to return a recarray (MaskedRecords) or not.

---
## _rec_append_fields_dispatcher
```python
from recfunctions import _rec_append_fields_dispatcher
```



---
## rec_append_fields
```python
from recfunctions import rec_append_fields
```

Add new fields to an existing array.

The names of the fields are given with the `names` arguments,
the corresponding values with the `data` arguments.
If a single field is appended, `names`, `data` and `dtypes` do not have
to be lists but just values.

Parameters
----------
base : array
    Input array to extend.
names : string, sequence
    String or sequence of strings corresponding to the names
    of the new fields.
data : array or sequence of arrays
    Array or sequence of arrays storing the fields to add to the base.
dtypes : sequence of datatypes, optional
    Datatype or sequence of datatypes.
    If None, the datatypes are estimated from the `data`.

See Also
--------
append_fields

Returns
-------
appended_array : np.recarray

---
## _repack_fields_dispatcher
```python
from recfunctions import _repack_fields_dispatcher
```



---
## repack_fields
```python
from recfunctions import repack_fields
```

Re-pack the fields of a structured array or dtype in memory.

The memory layout of structured datatypes allows fields at arbitrary
byte offsets. This means the fields can be separated by padding bytes,
their offsets can be non-monotonically increasing, and they can overlap.

This method removes any overlaps and reorders the fields in memory so they
have increasing byte offsets, and adds or removes padding bytes depending
on the `align` option, which behaves like the `align` option to
`numpy.dtype`.

If `align=False`, this method produces a "packed" memory layout in which
each field starts at the byte the previous field ended, and any padding
bytes are removed.

If `align=True`, this methods produces an "aligned" memory layout in which
each field's offset is a multiple of its alignment, and the total itemsize
is a multiple of the largest alignment, by adding padding bytes as needed.

Parameters
----------
a : ndarray or dtype
   array or dtype for which to repack the fields.
align : boolean
   If true, use an "aligned" memory layout, otherwise use a "packed" layout.
recurse : boolean
   If True, also repack nested structures.

Returns
-------
repacked : ndarray or dtype
   Copy of `a` with fields repacked, or `a` itself if no repacking was
   needed.

Examples
--------

>>> from numpy.lib import recfunctions as rfn
>>> def print_offsets(d):
...     print("offsets:", [d.fields[name][1] for name in d.names])
...     print("itemsize:", d.itemsize)
...
>>> dt = np.dtype('u1, <i8, <f8', align=True)
>>> dt
dtype({'names': ['f0', 'f1', 'f2'], 'formats': ['u1', '<i8', '<f8'], 'offsets': [0, 8, 16], 'itemsize': 24}, align=True)
>>> print_offsets(dt)
offsets: [0, 8, 16]
itemsize: 24
>>> packed_dt = rfn.repack_fields(dt)
>>> packed_dt
dtype([('f0', 'u1'), ('f1', '<i8'), ('f2', '<f8')])
>>> print_offsets(packed_dt)
offsets: [0, 1, 9]
itemsize: 17

---
## _get_fields_and_offsets
```python
from recfunctions import _get_fields_and_offsets
```

Returns a flat list of (dtype, count, offset) tuples of all the
scalar fields in the dtype "dt", including nested fields, in left
to right order.

---
## _common_stride
```python
from recfunctions import _common_stride
```

Returns the stride between the fields, or None if the stride is not
constant. The values in "counts" designate the lengths of
subarrays. Subarrays are treated as many contiguous fields, with
always positive stride.

---
## _structured_to_unstructured_dispatcher
```python
from recfunctions import _structured_to_unstructured_dispatcher
```



---
## structured_to_unstructured
```python
from recfunctions import structured_to_unstructured
```

Converts an n-D structured array into an (n+1)-D unstructured array.

The new array will have a new last dimension equal in size to the
number of field-elements of the input array. If not supplied, the output
datatype is determined from the numpy type promotion rules applied to all
the field datatypes.

Nested fields, as well as each element of any subarray fields, all count
as a single field-elements.

Parameters
----------
arr : ndarray
   Structured array or dtype to convert. Cannot contain object datatype.
dtype : dtype, optional
   The dtype of the output unstructured array.
copy : bool, optional
    If true, always return a copy. If false, a view is returned if
    possible, such as when the `dtype` and strides of the fields are
    suitable and the array subtype is one of `np.ndarray`, `np.recarray`
    or `np.memmap`.

    .. versionchanged:: 1.25.0
        A view can now be returned if the fields are separated by a
        uniform stride.

casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    See casting argument of `numpy.ndarray.astype`. Controls what kind of
    data casting may occur.

Returns
-------
unstructured : ndarray
   Unstructured array with one more dimension.

Examples
--------

>>> from numpy.lib import recfunctions as rfn
>>> a = np.zeros(4, dtype=[('a', 'i4'), ('b', 'f4,u2'), ('c', 'f4', 2)])
>>> a
array([(0, (0., 0), [0., 0.]), (0, (0., 0), [0., 0.]),
       (0, (0., 0), [0., 0.]), (0, (0., 0), [0., 0.])],
      dtype=[('a', '<i4'), ('b', [('f0', '<f4'), ('f1', '<u2')]), ('c', '<f4', (2,))])
>>> rfn.structured_to_unstructured(a)
array([[0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.],
       [0., 0., 0., 0., 0.]])

>>> b = np.array([(1, 2, 5), (4, 5, 7), (7, 8 ,11), (10, 11, 12)],
...              dtype=[('x', 'i4'), ('y', 'f4'), ('z', 'f8')])
>>> np.mean(rfn.structured_to_unstructured(b[['x', 'z']]), axis=-1)
array([ 3. ,  5.5,  9. , 11. ])

---
## _unstructured_to_structured_dispatcher
```python
from recfunctions import _unstructured_to_structured_dispatcher
```



---
## unstructured_to_structured
```python
from recfunctions import unstructured_to_structured
```

Converts an n-D unstructured array into an (n-1)-D structured array.

The last dimension of the input array is converted into a structure, with
number of field-elements equal to the size of the last dimension of the
input array. By default all output fields have the input array's dtype, but
an output structured dtype with an equal number of fields-elements can be
supplied instead.

Nested fields, as well as each element of any subarray fields, all count
towards the number of field-elements.

Parameters
----------
arr : ndarray
   Unstructured array or dtype to convert.
dtype : dtype, optional
   The structured dtype of the output array
names : list of strings, optional
   If dtype is not supplied, this specifies the field names for the output
   dtype, in order. The field dtypes will be the same as the input array.
align : boolean, optional
   Whether to create an aligned memory layout.
copy : bool, optional
    See copy argument to `numpy.ndarray.astype`. If true, always return a
    copy. If false, and `dtype` requirements are satisfied, a view is
    returned.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
    See casting argument of `numpy.ndarray.astype`. Controls what kind of
    data casting may occur.

Returns
-------
structured : ndarray
   Structured array with fewer dimensions.

Examples
--------

>>> from numpy.lib import recfunctions as rfn
>>> dt = np.dtype([('a', 'i4'), ('b', 'f4,u2'), ('c', 'f4', 2)])
>>> a = np.arange(20).reshape((4,5))
>>> a
array([[ 0,  1,  2,  3,  4],
       [ 5,  6,  7,  8,  9],
       [10, 11, 12, 13, 14],
       [15, 16, 17, 18, 19]])
>>> rfn.unstructured_to_structured(a, dt)
array([( 0, ( 1.,  2), [ 3.,  4.]), ( 5, ( 6.,  7), [ 8.,  9.]),
       (10, (11., 12), [13., 14.]), (15, (16., 17), [18., 19.])],
      dtype=[('a', '<i4'), ('b', [('f0', '<f4'), ('f1', '<u2')]), ('c', '<f4', (2,))])

---
## _apply_along_fields_dispatcher
```python
from recfunctions import _apply_along_fields_dispatcher
```



---
## apply_along_fields
```python
from recfunctions import apply_along_fields
```

Apply function 'func' as a reduction across fields of a structured array.

This is similar to `apply_along_axis`, but treats the fields of a
structured array as an extra axis. The fields are all first cast to a
common type following the type-promotion rules from `numpy.result_type`
applied to the field's dtypes.

Parameters
----------
func : function
   Function to apply on the "field" dimension. This function must
   support an `axis` argument, like np.mean, np.sum, etc.
arr : ndarray
   Structured array for which to apply func.

Returns
-------
out : ndarray
   Result of the recution operation

Examples
--------

>>> from numpy.lib import recfunctions as rfn
>>> b = np.array([(1, 2, 5), (4, 5, 7), (7, 8 ,11), (10, 11, 12)],
...              dtype=[('x', 'i4'), ('y', 'f4'), ('z', 'f8')])
>>> rfn.apply_along_fields(np.mean, b)
array([ 2.66666667,  5.33333333,  8.66666667, 11.        ])
>>> rfn.apply_along_fields(np.mean, b[['x', 'z']])
array([ 3. ,  5.5,  9. , 11. ])

---
## _assign_fields_by_name_dispatcher
```python
from recfunctions import _assign_fields_by_name_dispatcher
```



---
## assign_fields_by_name
```python
from recfunctions import assign_fields_by_name
```

Assigns values from one structured array to another by field name.

Normally in numpy >= 1.14, assignment of one structured array to another
copies fields "by position", meaning that the first field from the src is
copied to the first field of the dst, and so on, regardless of field name.

This function instead copies "by field name", such that fields in the dst
are assigned from the identically named field in the src. This applies
recursively for nested structures. This is how structure assignment worked
in numpy >= 1.6 to <= 1.13.

Parameters
----------
dst : ndarray
src : ndarray
    The source and destination arrays during assignment.
zero_unassigned : bool, optional
    If True, fields in the dst for which there was no matching
    field in the src are filled with the value 0 (zero). This
    was the behavior of numpy <= 1.13. If False, those fields
    are not modified.

---
## _require_fields_dispatcher
```python
from recfunctions import _require_fields_dispatcher
```



---
## require_fields
```python
from recfunctions import require_fields
```

Casts a structured array to a new dtype using assignment by field-name.

This function assigns from the old to the new array by name, so the
value of a field in the output array is the value of the field with the
same name in the source array. This has the effect of creating a new
ndarray containing only the fields "required" by the required_dtype.

If a field name in the required_dtype does not exist in the
input array, that field is created and set to 0 in the output array.

Parameters
----------
a : ndarray
   array to cast
required_dtype : dtype
   datatype for output array

Returns
-------
out : ndarray
    array with the new dtype, with field values copied from the fields in
    the input array with the same name

Examples
--------

>>> from numpy.lib import recfunctions as rfn
>>> a = np.ones(4, dtype=[('a', 'i4'), ('b', 'f8'), ('c', 'u1')])
>>> rfn.require_fields(a, [('b', 'f4'), ('c', 'u1')])
array([(1., 1), (1., 1), (1., 1), (1., 1)],
  dtype=[('b', '<f4'), ('c', 'u1')])
>>> rfn.require_fields(a, [('b', 'f4'), ('newf', 'u1')])
array([(1., 0), (1., 0), (1., 0), (1., 0)],
  dtype=[('b', '<f4'), ('newf', 'u1')])

---
## _stack_arrays_dispatcher
```python
from recfunctions import _stack_arrays_dispatcher
```



---
## stack_arrays
```python
from recfunctions import stack_arrays
```

Superposes arrays fields by fields

Parameters
----------
arrays : array or sequence
    Sequence of input arrays.
defaults : dictionary, optional
    Dictionary mapping field names to the corresponding default values.
usemask : {True, False}, optional
    Whether to return a MaskedArray (or MaskedRecords is
    `asrecarray==True`) or a ndarray.
asrecarray : {False, True}, optional
    Whether to return a recarray (or MaskedRecords if `usemask==True`)
    or just a flexible-type ndarray.
autoconvert : {False, True}, optional
    Whether automatically cast the type of the field to the maximum.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> x = np.array([1, 2,])
>>> rfn.stack_arrays(x) is x
True
>>> z = np.array([('A', 1), ('B', 2)], dtype=[('A', '|S3'), ('B', float)])
>>> zz = np.array([('a', 10., 100.), ('b', 20., 200.), ('c', 30., 300.)],
...   dtype=[('A', '|S3'), ('B', np.double), ('C', np.double)])
>>> test = rfn.stack_arrays((z,zz))
>>> test
masked_array(data=[(b'A', 1.0, --), (b'B', 2.0, --), (b'a', 10.0, 100.0),
                   (b'b', 20.0, 200.0), (b'c', 30.0, 300.0)],
             mask=[(False, False,  True), (False, False,  True),
                   (False, False, False), (False, False, False),
                   (False, False, False)],
       fill_value=(b'N/A', 1.e+20, 1.e+20),
            dtype=[('A', 'S3'), ('B', '<f8'), ('C', '<f8')])

---
## _find_duplicates_dispatcher
```python
from recfunctions import _find_duplicates_dispatcher
```



---
## find_duplicates
```python
from recfunctions import find_duplicates
```

Find the duplicates in a structured array along a given key

Parameters
----------
a : array-like
    Input array
key : {string, None}, optional
    Name of the fields along which to check the duplicates.
    If None, the search is performed by records
ignoremask : {True, False}, optional
    Whether masked data should be discarded or considered as duplicates.
return_index : {False, True}, optional
    Whether to return the indices of the duplicated values.

Examples
--------
>>> from numpy.lib import recfunctions as rfn
>>> ndtype = [('a', int)]
>>> a = np.ma.array([1, 1, 1, 2, 2, 3, 3],
...         mask=[0, 0, 1, 0, 0, 0, 1]).view(ndtype)
>>> rfn.find_duplicates(a, ignoremask=True, return_index=True)
(masked_array(data=[(1,), (1,), (2,), (2,)],
             mask=[(False,), (False,), (False,), (False,)],
       fill_value=(999999,),
            dtype=[('a', '<i8')]), array([0, 1, 3, 4]))

---
## _join_by_dispatcher
```python
from recfunctions import _join_by_dispatcher
```



---
## join_by
```python
from recfunctions import join_by
```

Join arrays `r1` and `r2` on key `key`.

The key should be either a string or a sequence of string corresponding
to the fields used to join the array.  An exception is raised if the
`key` field cannot be found in the two input arrays.  Neither `r1` nor
`r2` should have any duplicates along `key`: the presence of duplicates
will make the output quite unreliable. Note that duplicates are not
looked for by the algorithm.

Parameters
----------
key : {string, sequence}
    A string or a sequence of strings corresponding to the fields used
    for comparison.
r1, r2 : arrays
    Structured arrays.
jointype : {'inner', 'outer', 'leftouter'}, optional
    If 'inner', returns the elements common to both r1 and r2.
    If 'outer', returns the common elements as well as the elements of
    r1 not in r2 and the elements of not in r2.
    If 'leftouter', returns the common elements and the elements of r1
    not in r2.
r1postfix : string, optional
    String appended to the names of the fields of r1 that are present
    in r2 but absent of the key.
r2postfix : string, optional
    String appended to the names of the fields of r2 that are present
    in r1 but absent of the key.
defaults : {dictionary}, optional
    Dictionary mapping field names to the corresponding default values.
usemask : {True, False}, optional
    Whether to return a MaskedArray (or MaskedRecords is
    `asrecarray==True`) or a ndarray.
asrecarray : {False, True}, optional
    Whether to return a recarray (or MaskedRecords if `usemask==True`)
    or just a flexible-type ndarray.

Notes
-----
* The output is sorted along the key.
* A temporary array is formed by dropping the fields not in the key for
  the two arrays and concatenating the result. This array is then
  sorted, and the common entries selected. The output is constructed by
  filling the fields with the selected entries. Matching is not
  preserved if there are some duplicates...

---
## _rec_join_dispatcher
```python
from recfunctions import _rec_join_dispatcher
```



---
## rec_join
```python
from recfunctions import rec_join
```

Join arrays `r1` and `r2` on keys.
Alternative to join_by, that always returns a np.recarray.

See Also
--------
join_by : equivalent function

---
## _drop_descr
```python
from recfunctions import _drop_descr
```



---
## _recursive_rename_fields
```python
from recfunctions import _recursive_rename_fields
```



---
## count_elem
```python
from recfunctions import count_elem
```



---
## __name__
```python
from histograms import __name__
```

Histogram-related functions

---
## _ptp
```python
from histograms import _ptp
```

Peak-to-peak value of x.

This implementation avoids the problem of signed integer arrays having a
peak-to-peak value that cannot be represented with the array's data type.
This function returns an unsigned value for signed integer arrays.

---
## _hist_bin_sqrt
```python
from histograms import _hist_bin_sqrt
```

Square root histogram bin estimator.

Bin width is inversely proportional to the data size. Used by many
programs for its simplicity.

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_sturges
```python
from histograms import _hist_bin_sturges
```

Sturges histogram bin estimator.

A very simplistic estimator based on the assumption of normality of
the data. This estimator has poor performance for non-normal data,
which becomes especially obvious for large data sets. The estimate
depends only on size of the data.

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_rice
```python
from histograms import _hist_bin_rice
```

Rice histogram bin estimator.

Another simple estimator with no normality assumption. It has better
performance for large data than Sturges, but tends to overestimate
the number of bins. The number of bins is proportional to the cube
root of data size (asymptotically optimal). The estimate depends
only on size of the data.

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_scott
```python
from histograms import _hist_bin_scott
```

Scott histogram bin estimator.

The binwidth is proportional to the standard deviation of the data
and inversely proportional to the cube root of data size
(asymptotically optimal).

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_stone
```python
from histograms import _hist_bin_stone
```

Histogram bin estimator based on minimizing the estimated integrated squared error (ISE).

The number of bins is chosen by minimizing the estimated ISE against the unknown true distribution.
The ISE is estimated using cross-validation and can be regarded as a generalization of Scott's rule.
https://en.wikipedia.org/wiki/Histogram#Scott.27s_normal_reference_rule

This paper by Stone appears to be the origination of this rule.
http://digitalassets.lib.berkeley.edu/sdtr/ucb/text/34.pdf

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.
range : (float, float)
    The lower and upper range of the bins.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_doane
```python
from histograms import _hist_bin_doane
```

Doane's histogram bin estimator.

Improved version of Sturges' formula which works better for
non-normal data. See
stats.stackexchange.com/questions/55134/doanes-formula-for-histogram-binning

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_fd
```python
from histograms import _hist_bin_fd
```

The Freedman-Diaconis histogram bin estimator.

The Freedman-Diaconis rule uses interquartile range (IQR) to
estimate binwidth. It is considered a variation of the Scott rule
with more robustness as the IQR is less affected by outliers than
the standard deviation. However, the IQR depends on fewer points
than the standard deviation, so it is less accurate, especially for
long tailed distributions.

If the IQR is 0, this function returns 0 for the bin width.
Binwidth is inversely proportional to the cube root of data size
(asymptotically optimal).

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

---
## _hist_bin_auto
```python
from histograms import _hist_bin_auto
```

Histogram bin estimator that uses the minimum width of the
Freedman-Diaconis and Sturges estimators if the FD bin width is non-zero.
If the bin width from the FD estimator is 0, the Sturges estimator is used.

The FD estimator is usually the most robust method, but its width
estimate tends to be too large for small `x` and bad for data with limited
variance. The Sturges estimator is quite good for small (<1000) datasets
and is the default in the R language. This method gives good off-the-shelf
behaviour.

.. versionchanged:: 1.15.0
If there is limited variance the IQR can be 0, which results in the
FD bin width being 0 too. This is not a valid bin width, so
``np.histogram_bin_edges`` chooses 1 bin instead, which may not be optimal.
If the IQR is 0, it's unlikely any variance-based estimators will be of
use, so we revert to the Sturges estimator, which only uses the size of the
dataset in its calculation.

Parameters
----------
x : array_like
    Input data that is to be histogrammed, trimmed to range. May not
    be empty.

Returns
-------
h : An estimate of the optimal bin width for the given data.

See Also
--------
_hist_bin_fd, _hist_bin_sturges

---
## _ravel_and_check_weights
```python
from histograms import _ravel_and_check_weights
```

Check a and weights have matching shapes, and ravel both 

---
## _get_outer_edges
```python
from histograms import _get_outer_edges
```

Determine the outer bin edges to use, from either the data or the range
argument

---
## _unsigned_subtract
```python
from histograms import _unsigned_subtract
```

Subtract two values where a >= b, and produce an unsigned result

This is needed when finding the difference between the upper and lower
bound of an int16 histogram

---
## _get_bin_edges
```python
from histograms import _get_bin_edges
```

Computes the bins used internally by `histogram`.

Parameters
==========
a : ndarray
    Ravelled data array
bins, range
    Forwarded arguments from `histogram`.
weights : ndarray, optional
    Ravelled weights array, or None

Returns
=======
bin_edges : ndarray
    Array of bin edges
uniform_bins : (Number, Number, int):
    The upper bound, lowerbound, and number of bins, used in the optimized
    implementation of `histogram` that works on uniform bins.

---
## _search_sorted_inclusive
```python
from histograms import _search_sorted_inclusive
```

Like `searchsorted`, but where the last item in `v` is placed on the right.

In the context of a histogram, this makes the last bin edge inclusive

---
## _histogram_bin_edges_dispatcher
```python
from histograms import _histogram_bin_edges_dispatcher
```



---
## histogram_bin_edges
```python
from histograms import histogram_bin_edges
```

Function to calculate only the edges of the bins used by the `histogram`
function.

Parameters
----------
a : array_like
    Input data. The histogram is computed over the flattened array.
bins : int or sequence of scalars or str, optional
    If `bins` is an int, it defines the number of equal-width
    bins in the given range (10, by default). If `bins` is a
    sequence, it defines the bin edges, including the rightmost
    edge, allowing for non-uniform bin widths.

    If `bins` is a string from the list below, `histogram_bin_edges` will use
    the method chosen to calculate the optimal bin width and
    consequently the number of bins (see `Notes` for more detail on
    the estimators) from the data that falls within the requested
    range. While the bin width will be optimal for the actual data
    in the range, the number of bins will be computed to fill the
    entire range, including the empty portions. For visualisation,
    using the 'auto' option is suggested. Weighted data is not
    supported for automated bin size selection.

    'auto'
        Maximum of the 'sturges' and 'fd' estimators. Provides good
        all around performance.

    'fd' (Freedman Diaconis Estimator)
        Robust (resilient to outliers) estimator that takes into
        account data variability and data size.

    'doane'
        An improved version of Sturges' estimator that works better
        with non-normal datasets.

    'scott'
        Less robust estimator that takes into account data variability
        and data size.

    'stone'
        Estimator based on leave-one-out cross-validation estimate of
        the integrated squared error. Can be regarded as a generalization
        of Scott's rule.

    'rice'
        Estimator does not take variability into account, only data
        size. Commonly overestimates number of bins required.

    'sturges'
        R's default method, only accounts for data size. Only
        optimal for gaussian data and underestimates number of bins
        for large non-gaussian datasets.

    'sqrt'
        Square root (of data size) estimator, used by Excel and
        other programs for its speed and simplicity.

range : (float, float), optional
    The lower and upper range of the bins.  If not provided, range
    is simply ``(a.min(), a.max())``.  Values outside the range are
    ignored. The first element of the range must be less than or
    equal to the second. `range` affects the automatic bin
    computation as well. While bin width is computed to be optimal
    based on the actual data within `range`, the bin count will fill
    the entire range including portions containing no data.

weights : array_like, optional
    An array of weights, of the same shape as `a`.  Each value in
    `a` only contributes its associated weight towards the bin count
    (instead of 1). This is currently not used by any of the bin estimators,
    but may be in the future.

Returns
-------
bin_edges : array of dtype float
    The edges to pass into `histogram`

See Also
--------
histogram

Notes
-----
The methods to estimate the optimal number of bins are well founded
in literature, and are inspired by the choices R provides for
histogram visualisation. Note that having the number of bins
proportional to :math:`n^{1/3}` is asymptotically optimal, which is
why it appears in most estimators. These are simply plug-in methods
that give good starting points for number of bins. In the equations
below, :math:`h` is the binwidth and :math:`n_h` is the number of
bins. All estimators that compute bin counts are recast to bin width
using the `ptp` of the data. The final bin count is obtained from
``np.round(np.ceil(range / h))``. The final bin width is often less
than what is returned by the estimators below.

'auto' (maximum of the 'sturges' and 'fd' estimators)
    A compromise to get a good value. For small datasets the Sturges
    value will usually be chosen, while larger datasets will usually
    default to FD.  Avoids the overly conservative behaviour of FD
    and Sturges for small and large datasets respectively.
    Switchover point is usually :math:`a.size \approx 1000`.

'fd' (Freedman Diaconis Estimator)
    .. math:: h = 2 \frac{IQR}{n^{1/3}}

    The binwidth is proportional to the interquartile range (IQR)
    and inversely proportional to cube root of a.size. Can be too
    conservative for small datasets, but is quite good for large
    datasets. The IQR is very robust to outliers.

'scott'
    .. math:: h = \sigma \sqrt[3]{\frac{24 \sqrt{\pi}}{n}}

    The binwidth is proportional to the standard deviation of the
    data and inversely proportional to cube root of ``x.size``. Can
    be too conservative for small datasets, but is quite good for
    large datasets. The standard deviation is not very robust to
    outliers. Values are very similar to the Freedman-Diaconis
    estimator in the absence of outliers.

'rice'
    .. math:: n_h = 2n^{1/3}

    The number of bins is only proportional to cube root of
    ``a.size``. It tends to overestimate the number of bins and it
    does not take into account data variability.

'sturges'
    .. math:: n_h = \log _{2}(n) + 1

    The number of bins is the base 2 log of ``a.size``.  This
    estimator assumes normality of data and is too conservative for
    larger, non-normal datasets. This is the default method in R's
    ``hist`` method.

'doane'
    .. math:: n_h = 1 + \log_{2}(n) +
                    \log_{2}\left(1 + \frac{|g_1|}{\sigma_{g_1}}\right)

        g_1 = mean\left[\left(\frac{x - \mu}{\sigma}\right)^3\right]

        \sigma_{g_1} = \sqrt{\frac{6(n - 2)}{(n + 1)(n + 3)}}

    An improved version of Sturges' formula that produces better
    estimates for non-normal datasets. This estimator attempts to
    account for the skew of the data.

'sqrt'
    .. math:: n_h = \sqrt n

    The simplest and fastest estimator. Only takes into account the
    data size.

Examples
--------
>>> arr = np.array([0, 0, 0, 1, 2, 3, 3, 4, 5])
>>> np.histogram_bin_edges(arr, bins='auto', range=(0, 1))
array([0.  , 0.25, 0.5 , 0.75, 1.  ])
>>> np.histogram_bin_edges(arr, bins=2)
array([0. , 2.5, 5. ])

For consistency with histogram, an array of pre-computed bins is
passed through unmodified:

>>> np.histogram_bin_edges(arr, [1, 2])
array([1, 2])

This function allows one set of bins to be computed, and reused across
multiple histograms:

>>> shared_bins = np.histogram_bin_edges(arr, bins='auto')
>>> shared_bins
array([0., 1., 2., 3., 4., 5.])

>>> group_id = np.array([0, 1, 1, 0, 1, 1, 0, 1, 1])
>>> hist_0, _ = np.histogram(arr[group_id == 0], bins=shared_bins)
>>> hist_1, _ = np.histogram(arr[group_id == 1], bins=shared_bins)

>>> hist_0; hist_1
array([1, 1, 0, 1, 0])
array([2, 0, 1, 1, 2])

Which gives more easily comparable results than using separate bins for
each histogram:

>>> hist_0, bins_0 = np.histogram(arr[group_id == 0], bins='auto')
>>> hist_1, bins_1 = np.histogram(arr[group_id == 1], bins='auto')
>>> hist_0; hist_1
array([1, 1, 1])
array([2, 1, 1, 2])
>>> bins_0; bins_1
array([0., 1., 2., 3.])
array([0.  , 1.25, 2.5 , 3.75, 5.  ])

---
## _histogram_dispatcher
```python
from histograms import _histogram_dispatcher
```



---
## histogram
```python
from histograms import histogram
```

Compute the histogram of a dataset.

Parameters
----------
a : array_like
    Input data. The histogram is computed over the flattened array.
bins : int or sequence of scalars or str, optional
    If `bins` is an int, it defines the number of equal-width
    bins in the given range (10, by default). If `bins` is a
    sequence, it defines a monotonically increasing array of bin edges,
    including the rightmost edge, allowing for non-uniform bin widths.

    .. versionadded:: 1.11.0

    If `bins` is a string, it defines the method used to calculate the
    optimal bin width, as defined by `histogram_bin_edges`.

range : (float, float), optional
    The lower and upper range of the bins.  If not provided, range
    is simply ``(a.min(), a.max())``.  Values outside the range are
    ignored. The first element of the range must be less than or
    equal to the second. `range` affects the automatic bin
    computation as well. While bin width is computed to be optimal
    based on the actual data within `range`, the bin count will fill
    the entire range including portions containing no data.
weights : array_like, optional
    An array of weights, of the same shape as `a`.  Each value in
    `a` only contributes its associated weight towards the bin count
    (instead of 1). If `density` is True, the weights are
    normalized, so that the integral of the density over the range
    remains 1.
density : bool, optional
    If ``False``, the result will contain the number of samples in
    each bin. If ``True``, the result is the value of the
    probability *density* function at the bin, normalized such that
    the *integral* over the range is 1. Note that the sum of the
    histogram values will not be equal to 1 unless bins of unity
    width are chosen; it is not a probability *mass* function.

Returns
-------
hist : array
    The values of the histogram. See `density` and `weights` for a
    description of the possible semantics.
bin_edges : array of dtype float
    Return the bin edges ``(length(hist)+1)``.


See Also
--------
histogramdd, bincount, searchsorted, digitize, histogram_bin_edges

Notes
-----
All but the last (righthand-most) bin is half-open.  In other words,
if `bins` is::

  [1, 2, 3, 4]

then the first bin is ``[1, 2)`` (including 1, but excluding 2) and
the second ``[2, 3)``.  The last bin, however, is ``[3, 4]``, which
*includes* 4.


Examples
--------
>>> np.histogram([1, 2, 1], bins=[0, 1, 2, 3])
(array([0, 2, 1]), array([0, 1, 2, 3]))
>>> np.histogram(np.arange(4), bins=np.arange(5), density=True)
(array([0.25, 0.25, 0.25, 0.25]), array([0, 1, 2, 3, 4]))
>>> np.histogram([[1, 2, 1], [1, 0, 1]], bins=[0,1,2,3])
(array([1, 4, 1]), array([0, 1, 2, 3]))

>>> a = np.arange(5)
>>> hist, bin_edges = np.histogram(a, density=True)
>>> hist
array([0.5, 0. , 0.5, 0. , 0. , 0.5, 0. , 0.5, 0. , 0.5])
>>> hist.sum()
2.4999999999999996
>>> np.sum(hist * np.diff(bin_edges))
1.0

.. versionadded:: 1.11.0

Automated Bin Selection Methods example, using 2 peak random data
with 2000 points:

>>> import matplotlib.pyplot as plt
>>> rng = np.random.RandomState(10)  # deterministic random data
>>> a = np.hstack((rng.normal(size=1000),
...                rng.normal(loc=5, scale=2, size=1000)))
>>> _ = plt.hist(a, bins='auto')  # arguments are passed to np.histogram
>>> plt.title("Histogram with 'auto' bins")
Text(0.5, 1.0, "Histogram with 'auto' bins")
>>> plt.show()

---
## _histogramdd_dispatcher
```python
from histograms import _histogramdd_dispatcher
```



---
## histogramdd
```python
from histograms import histogramdd
```

Compute the multidimensional histogram of some data.

Parameters
----------
sample : (N, D) array, or (N, D) array_like
    The data to be histogrammed.

    Note the unusual interpretation of sample when an array_like:

    * When an array, each row is a coordinate in a D-dimensional space -
      such as ``histogramdd(np.array([p1, p2, p3]))``.
    * When an array_like, each element is the list of values for single
      coordinate - such as ``histogramdd((X, Y, Z))``.

    The first form should be preferred.

bins : sequence or int, optional
    The bin specification:

    * A sequence of arrays describing the monotonically increasing bin
      edges along each dimension.
    * The number of bins for each dimension (nx, ny, ... =bins)
    * The number of bins for all dimensions (nx=ny=...=bins).

range : sequence, optional
    A sequence of length D, each an optional (lower, upper) tuple giving
    the outer bin edges to be used if the edges are not given explicitly in
    `bins`.
    An entry of None in the sequence results in the minimum and maximum
    values being used for the corresponding dimension.
    The default, None, is equivalent to passing a tuple of D None values.
density : bool, optional
    If False, the default, returns the number of samples in each bin.
    If True, returns the probability *density* function at the bin,
    ``bin_count / sample_count / bin_volume``.
weights : (N,) array_like, optional
    An array of values `w_i` weighing each sample `(x_i, y_i, z_i, ...)`.
    Weights are normalized to 1 if density is True. If density is False,
    the values of the returned histogram are equal to the sum of the
    weights belonging to the samples falling into each bin.

Returns
-------
H : ndarray
    The multidimensional histogram of sample x. See density and weights
    for the different possible semantics.
edges : list
    A list of D arrays describing the bin edges for each dimension.

See Also
--------
histogram: 1-D histogram
histogram2d: 2-D histogram

Examples
--------
>>> r = np.random.randn(100,3)
>>> H, edges = np.histogramdd(r, bins = (5, 8, 4))
>>> H.shape, edges[0].size, edges[1].size, edges[2].size
((5, 8, 4), 6, 9, 5)

---
## jhat
```python
from histograms import jhat
```



---
## __name__
```python
from scimath import __name__
```

Wrapper functions to more user-friendly calling of certain math functions
whose output data-type is different than the input data-type in certain
domains of the input.

For example, for functions like `log` with branch cuts, the versions in this
module provide the mathematically valid answers in the complex plane::

  >>> import math
  >>> np.emath.log(-math.exp(1)) == (1+1j*math.pi)
  True

Similarly, `sqrt`, other base logarithms, `power` and trig functions are
correctly handled.  See their respective docstrings for specific examples.

Functions
---------

.. autosummary::
   :toctree: generated/

   sqrt
   log
   log2
   logn
   log10
   power
   arccos
   arcsin
   arctanh

---
## _tocomplex
```python
from scimath import _tocomplex
```

Convert its input `arr` to a complex array.

The input is returned as a complex array of the smallest type that will fit
the original data: types like single, byte, short, etc. become csingle,
while others become cdouble.

A copy of the input is always made.

Parameters
----------
arr : array

Returns
-------
array
    An array with the same input data as the input but in complex form.

Examples
--------

First, consider an input of type short:

>>> a = np.array([1,2,3],np.short)

>>> ac = np.lib.scimath._tocomplex(a); ac
array([1.+0.j, 2.+0.j, 3.+0.j], dtype=complex64)

>>> ac.dtype
dtype('complex64')

If the input is of type double, the output is correspondingly of the
complex double type as well:

>>> b = np.array([1,2,3],np.double)

>>> bc = np.lib.scimath._tocomplex(b); bc
array([1.+0.j, 2.+0.j, 3.+0.j])

>>> bc.dtype
dtype('complex128')

Note that even if the input was complex to begin with, a copy is still
made, since the astype() method always copies:

>>> c = np.array([1,2,3],np.csingle)

>>> cc = np.lib.scimath._tocomplex(c); cc
array([1.+0.j,  2.+0.j,  3.+0.j], dtype=complex64)

>>> c *= 2; c
array([2.+0.j,  4.+0.j,  6.+0.j], dtype=complex64)

>>> cc
array([1.+0.j,  2.+0.j,  3.+0.j], dtype=complex64)

---
## _fix_real_lt_zero
```python
from scimath import _fix_real_lt_zero
```

Convert `x` to complex if it has real, negative components.

Otherwise, output is just the array version of the input (via asarray).

Parameters
----------
x : array_like

Returns
-------
array

Examples
--------
>>> np.lib.scimath._fix_real_lt_zero([1,2])
array([1, 2])

>>> np.lib.scimath._fix_real_lt_zero([-1,2])
array([-1.+0.j,  2.+0.j])

---
## _fix_int_lt_zero
```python
from scimath import _fix_int_lt_zero
```

Convert `x` to double if it has real, negative components.

Otherwise, output is just the array version of the input (via asarray).

Parameters
----------
x : array_like

Returns
-------
array

Examples
--------
>>> np.lib.scimath._fix_int_lt_zero([1,2])
array([1, 2])

>>> np.lib.scimath._fix_int_lt_zero([-1,2])
array([-1.,  2.])

---
## _fix_real_abs_gt_1
```python
from scimath import _fix_real_abs_gt_1
```

Convert `x` to complex if it has real components x_i with abs(x_i)>1.

Otherwise, output is just the array version of the input (via asarray).

Parameters
----------
x : array_like

Returns
-------
array

Examples
--------
>>> np.lib.scimath._fix_real_abs_gt_1([0,1])
array([0, 1])

>>> np.lib.scimath._fix_real_abs_gt_1([0,2])
array([0.+0.j, 2.+0.j])

---
## _unary_dispatcher
```python
from scimath import _unary_dispatcher
```



---
## sqrt
```python
from scimath import sqrt
```

Compute the square root of x.

For negative input elements, a complex value is returned
(unlike `numpy.sqrt` which returns NaN).

Parameters
----------
x : array_like
   The input value(s).

Returns
-------
out : ndarray or scalar
   The square root of `x`. If `x` was a scalar, so is `out`,
   otherwise an array is returned.

See Also
--------
numpy.sqrt

Examples
--------
For real, non-negative inputs this works just like `numpy.sqrt`:

>>> np.emath.sqrt(1)
1.0
>>> np.emath.sqrt([1, 4])
array([1.,  2.])

But it automatically handles negative inputs:

>>> np.emath.sqrt(-1)
1j
>>> np.emath.sqrt([-1,4])
array([0.+1.j, 2.+0.j])

Different results are expected because:
floating point 0.0 and -0.0 are distinct.

For more control, explicitly use complex() as follows:

>>> np.emath.sqrt(complex(-4.0, 0.0))
2j
>>> np.emath.sqrt(complex(-4.0, -0.0))
-2j

---
## log
```python
from scimath import log
```

Compute the natural logarithm of `x`.

Return the "principal value" (for a description of this, see `numpy.log`)
of :math:`log_e(x)`. For real `x > 0`, this is a real number (``log(0)``
returns ``-inf`` and ``log(np.inf)`` returns ``inf``). Otherwise, the
complex principle value is returned.

Parameters
----------
x : array_like
   The value(s) whose log is (are) required.

Returns
-------
out : ndarray or scalar
   The log of the `x` value(s). If `x` was a scalar, so is `out`,
   otherwise an array is returned.

See Also
--------
numpy.log

Notes
-----
For a log() that returns ``NAN`` when real `x < 0`, use `numpy.log`
(note, however, that otherwise `numpy.log` and this `log` are identical,
i.e., both return ``-inf`` for `x = 0`, ``inf`` for `x = inf`, and,
notably, the complex principle value if ``x.imag != 0``).

Examples
--------
>>> np.emath.log(np.exp(1))
1.0

Negative arguments are handled "correctly" (recall that
``exp(log(x)) == x`` does *not* hold for real ``x < 0``):

>>> np.emath.log(-np.exp(1)) == (1 + np.pi * 1j)
True

---
## log10
```python
from scimath import log10
```

Compute the logarithm base 10 of `x`.

Return the "principal value" (for a description of this, see
`numpy.log10`) of :math:`log_{10}(x)`. For real `x > 0`, this
is a real number (``log10(0)`` returns ``-inf`` and ``log10(np.inf)``
returns ``inf``). Otherwise, the complex principle value is returned.

Parameters
----------
x : array_like or scalar
   The value(s) whose log base 10 is (are) required.

Returns
-------
out : ndarray or scalar
   The log base 10 of the `x` value(s). If `x` was a scalar, so is `out`,
   otherwise an array object is returned.

See Also
--------
numpy.log10

Notes
-----
For a log10() that returns ``NAN`` when real `x < 0`, use `numpy.log10`
(note, however, that otherwise `numpy.log10` and this `log10` are
identical, i.e., both return ``-inf`` for `x = 0`, ``inf`` for `x = inf`,
and, notably, the complex principle value if ``x.imag != 0``).

Examples
--------

(We set the printing precision so the example can be auto-tested)

>>> np.set_printoptions(precision=4)

>>> np.emath.log10(10**1)
1.0

>>> np.emath.log10([-10**1, -10**2, 10**2])
array([1.+1.3644j, 2.+1.3644j, 2.+0.j    ])

---
## _logn_dispatcher
```python
from scimath import _logn_dispatcher
```



---
## logn
```python
from scimath import logn
```

Take log base n of x.

If `x` contains negative inputs, the answer is computed and returned in the
complex domain.

Parameters
----------
n : array_like
   The integer base(s) in which the log is taken.
x : array_like
   The value(s) whose log base `n` is (are) required.

Returns
-------
out : ndarray or scalar
   The log base `n` of the `x` value(s). If `x` was a scalar, so is
   `out`, otherwise an array is returned.

Examples
--------
>>> np.set_printoptions(precision=4)

>>> np.emath.logn(2, [4, 8])
array([2., 3.])
>>> np.emath.logn(2, [-4, -8, 8])
array([2.+4.5324j, 3.+4.5324j, 3.+0.j    ])

---
## log2
```python
from scimath import log2
```

Compute the logarithm base 2 of `x`.

Return the "principal value" (for a description of this, see
`numpy.log2`) of :math:`log_2(x)`. For real `x > 0`, this is
a real number (``log2(0)`` returns ``-inf`` and ``log2(np.inf)`` returns
``inf``). Otherwise, the complex principle value is returned.

Parameters
----------
x : array_like
   The value(s) whose log base 2 is (are) required.

Returns
-------
out : ndarray or scalar
   The log base 2 of the `x` value(s). If `x` was a scalar, so is `out`,
   otherwise an array is returned.

See Also
--------
numpy.log2

Notes
-----
For a log2() that returns ``NAN`` when real `x < 0`, use `numpy.log2`
(note, however, that otherwise `numpy.log2` and this `log2` are
identical, i.e., both return ``-inf`` for `x = 0`, ``inf`` for `x = inf`,
and, notably, the complex principle value if ``x.imag != 0``).

Examples
--------
We set the printing precision so the example can be auto-tested:

>>> np.set_printoptions(precision=4)

>>> np.emath.log2(8)
3.0
>>> np.emath.log2([-4, -8, 8])
array([2.+4.5324j, 3.+4.5324j, 3.+0.j    ])

---
## _power_dispatcher
```python
from scimath import _power_dispatcher
```



---
## power
```python
from scimath import power
```

Return x to the power p, (x**p).

If `x` contains negative values, the output is converted to the
complex domain.

Parameters
----------
x : array_like
    The input value(s).
p : array_like of ints
    The power(s) to which `x` is raised. If `x` contains multiple values,
    `p` has to either be a scalar, or contain the same number of values
    as `x`. In the latter case, the result is
    ``x[0]**p[0], x[1]**p[1], ...``.

Returns
-------
out : ndarray or scalar
    The result of ``x**p``. If `x` and `p` are scalars, so is `out`,
    otherwise an array is returned.

See Also
--------
numpy.power

Examples
--------
>>> np.set_printoptions(precision=4)

>>> np.emath.power([2, 4], 2)
array([ 4, 16])
>>> np.emath.power([2, 4], -2)
array([0.25  ,  0.0625])
>>> np.emath.power([-2, 4], 2)
array([ 4.-0.j, 16.+0.j])

---
## arccos
```python
from scimath import arccos
```

Compute the inverse cosine of x.

Return the "principal value" (for a description of this, see
`numpy.arccos`) of the inverse cosine of `x`. For real `x` such that
`abs(x) <= 1`, this is a real number in the closed interval
:math:`[0, \pi]`.  Otherwise, the complex principle value is returned.

Parameters
----------
x : array_like or scalar
   The value(s) whose arccos is (are) required.

Returns
-------
out : ndarray or scalar
   The inverse cosine(s) of the `x` value(s). If `x` was a scalar, so
   is `out`, otherwise an array object is returned.

See Also
--------
numpy.arccos

Notes
-----
For an arccos() that returns ``NAN`` when real `x` is not in the
interval ``[-1,1]``, use `numpy.arccos`.

Examples
--------
>>> np.set_printoptions(precision=4)

>>> np.emath.arccos(1) # a scalar is returned
0.0

>>> np.emath.arccos([1,2])
array([0.-0.j   , 0.-1.317j])

---
## arcsin
```python
from scimath import arcsin
```

Compute the inverse sine of x.

Return the "principal value" (for a description of this, see
`numpy.arcsin`) of the inverse sine of `x`. For real `x` such that
`abs(x) <= 1`, this is a real number in the closed interval
:math:`[-\pi/2, \pi/2]`.  Otherwise, the complex principle value is
returned.

Parameters
----------
x : array_like or scalar
   The value(s) whose arcsin is (are) required.

Returns
-------
out : ndarray or scalar
   The inverse sine(s) of the `x` value(s). If `x` was a scalar, so
   is `out`, otherwise an array object is returned.

See Also
--------
numpy.arcsin

Notes
-----
For an arcsin() that returns ``NAN`` when real `x` is not in the
interval ``[-1,1]``, use `numpy.arcsin`.

Examples
--------
>>> np.set_printoptions(precision=4)

>>> np.emath.arcsin(0)
0.0

>>> np.emath.arcsin([0,1])
array([0.    , 1.5708])

---
## arctanh
```python
from scimath import arctanh
```

Compute the inverse hyperbolic tangent of `x`.

Return the "principal value" (for a description of this, see
`numpy.arctanh`) of ``arctanh(x)``. For real `x` such that
``abs(x) < 1``, this is a real number.  If `abs(x) > 1`, or if `x` is
complex, the result is complex. Finally, `x = 1` returns``inf`` and
``x=-1`` returns ``-inf``.

Parameters
----------
x : array_like
   The value(s) whose arctanh is (are) required.

Returns
-------
out : ndarray or scalar
   The inverse hyperbolic tangent(s) of the `x` value(s). If `x` was
   a scalar so is `out`, otherwise an array is returned.


See Also
--------
numpy.arctanh

Notes
-----
For an arctanh() that returns ``NAN`` when real `x` is not in the
interval ``(-1,1)``, use `numpy.arctanh` (this latter, however, does
return +/-inf for ``x = +/-1``).

Examples
--------
>>> np.set_printoptions(precision=4)

>>> from numpy.testing import suppress_warnings
>>> with suppress_warnings() as sup:
...     sup.filter(RuntimeWarning)
...     np.emath.arctanh(np.eye(2))
array([[inf,  0.],
       [ 0., inf]])
>>> np.emath.arctanh([1j])
array([0.+0.7854j])

---
## NumpyVersion
```python
from _version import NumpyVersion
```

Parse and compare numpy version strings.

NumPy has the following versioning scheme (numbers given are examples; they
can be > 9 in principle):

- Released version: '1.8.0', '1.8.1', etc.
- Alpha: '1.8.0a1', '1.8.0a2', etc.
- Beta: '1.8.0b1', '1.8.0b2', etc.
- Release candidates: '1.8.0rc1', '1.8.0rc2', etc.
- Development versions: '1.8.0.dev-f1234afa' (git commit hash appended)
- Development versions after a1: '1.8.0a1.dev-f1234afa',
                                 '1.8.0b2.dev-f1234afa',
                                 '1.8.1rc1.dev-f1234afa', etc.
- Development versions (no git hash available): '1.8.0.dev-Unknown'

Comparing needs to be done against a valid version string or other
`NumpyVersion` instance. Note that all development versions of the same
(pre-)release compare equal.

.. versionadded:: 1.9.0

Parameters
----------
vstring : str
    NumPy version string (``np.__version__``).

Examples
--------
>>> from numpy.lib import NumpyVersion
>>> if NumpyVersion(np.__version__) < '1.7.0':
...     print('skip')
>>> # skip

>>> NumpyVersion('1.7')  # raises ValueError, add ".0"
Traceback (most recent call last):
    ...
ValueError: Not a valid numpy version string

---
## __init__
```python
from _version import __init__
```



---
## _compare_version
```python
from _version import _compare_version
```

Compare major.minor.bugfix

---
## _compare_pre_release
```python
from _version import _compare_pre_release
```

Compare alpha/beta/rc/final.

---
## _compare
```python
from _version import _compare
```



---
## __lt__
```python
from _version import __lt__
```



---
## __le__
```python
from _version import __le__
```



---
## __eq__
```python
from _version import __eq__
```



---
## __ne__
```python
from _version import __ne__
```



---
## __gt__
```python
from _version import __gt__
```



---
## __ge__
```python
from _version import __ge__
```



---
## __repr__
```python
from _version import __repr__
```



---
## __name__
```python
from user_array import __name__
```

Standard container-class for easy multiple-inheritance.

Try to inherit from the ndarray instead of using this class as this is not
complete.

---
## container
```python
from user_array import container
```

container(data, dtype=None, copy=True)

Standard container-class for easy multiple-inheritance.

Methods
-------
copy
tostring
byteswap
astype

---
## __init__
```python
from user_array import __init__
```



---
## __repr__
```python
from user_array import __repr__
```



---
## __array__
```python
from user_array import __array__
```



---
## __len__
```python
from user_array import __len__
```



---
## __getitem__
```python
from user_array import __getitem__
```



---
## __setitem__
```python
from user_array import __setitem__
```



---
## __abs__
```python
from user_array import __abs__
```



---
## __neg__
```python
from user_array import __neg__
```



---
## __add__
```python
from user_array import __add__
```



---
## __iadd__
```python
from user_array import __iadd__
```



---
## __sub__
```python
from user_array import __sub__
```



---
## __rsub__
```python
from user_array import __rsub__
```



---
## __isub__
```python
from user_array import __isub__
```



---
## __mul__
```python
from user_array import __mul__
```



---
## __imul__
```python
from user_array import __imul__
```



---
## __div__
```python
from user_array import __div__
```



---
## __rdiv__
```python
from user_array import __rdiv__
```



---
## __idiv__
```python
from user_array import __idiv__
```



---
## __mod__
```python
from user_array import __mod__
```



---
## __rmod__
```python
from user_array import __rmod__
```



---
## __imod__
```python
from user_array import __imod__
```



---
## __divmod__
```python
from user_array import __divmod__
```



---
## __rdivmod__
```python
from user_array import __rdivmod__
```



---
## __pow__
```python
from user_array import __pow__
```



---
## __rpow__
```python
from user_array import __rpow__
```



---
## __ipow__
```python
from user_array import __ipow__
```



---
## __lshift__
```python
from user_array import __lshift__
```



---
## __rshift__
```python
from user_array import __rshift__
```



---
## __rlshift__
```python
from user_array import __rlshift__
```



---
## __rrshift__
```python
from user_array import __rrshift__
```



---
## __ilshift__
```python
from user_array import __ilshift__
```



---
## __irshift__
```python
from user_array import __irshift__
```



---
## __and__
```python
from user_array import __and__
```



---
## __rand__
```python
from user_array import __rand__
```



---
## __iand__
```python
from user_array import __iand__
```



---
## __xor__
```python
from user_array import __xor__
```



---
## __rxor__
```python
from user_array import __rxor__
```



---
## __ixor__
```python
from user_array import __ixor__
```



---
## __or__
```python
from user_array import __or__
```



---
## __ror__
```python
from user_array import __ror__
```



---
## __ior__
```python
from user_array import __ior__
```



---
## __pos__
```python
from user_array import __pos__
```



---
## __invert__
```python
from user_array import __invert__
```



---
## _scalarfunc
```python
from user_array import _scalarfunc
```



---
## __complex__
```python
from user_array import __complex__
```



---
## __float__
```python
from user_array import __float__
```



---
## __int__
```python
from user_array import __int__
```



---
## __hex__
```python
from user_array import __hex__
```



---
## __oct__
```python
from user_array import __oct__
```



---
## __lt__
```python
from user_array import __lt__
```



---
## __le__
```python
from user_array import __le__
```



---
## __eq__
```python
from user_array import __eq__
```



---
## __ne__
```python
from user_array import __ne__
```



---
## __gt__
```python
from user_array import __gt__
```



---
## __ge__
```python
from user_array import __ge__
```



---
## copy
```python
from user_array import copy
```



---
## tostring
```python
from user_array import tostring
```



---
## tobytes
```python
from user_array import tobytes
```



---
## byteswap
```python
from user_array import byteswap
```



---
## astype
```python
from user_array import astype
```



---
## _rc
```python
from user_array import _rc
```



---
## __array_wrap__
```python
from user_array import __array_wrap__
```



---
## __setattr__
```python
from user_array import __setattr__
```



---
## __getattr__
```python
from user_array import __getattr__
```



---
## __name__
```python
from format import __name__
```

Internal module for formatting output data in csv, html, xml,
and latex files. This module also applies to display formatting.

---
## _check_version
```python
from format import _check_version
```



---
## magic
```python
from format import magic
```

Return the magic string for the given file format version.

Parameters
----------
major : int in [0, 255]
minor : int in [0, 255]

Returns
-------
magic : str

Raises
------
ValueError if the version cannot be formatted.

---
## read_magic
```python
from format import read_magic
```

Read the magic string to get the version of the file format.

Parameters
----------
fp : filelike object

Returns
-------
major : int
minor : int

---
## dtype_to_descr
```python
from format import dtype_to_descr
```

Get a serializable descriptor from the dtype.

The .descr attribute of a dtype object cannot be round-tripped through
the dtype() constructor. Simple types, like dtype('float32'), have
a descr which looks like a record array with one field with '' as
a name. The dtype() constructor interprets this as a request to give
a default name.  Instead, we construct descriptor that can be passed to
dtype().

Parameters
----------
dtype : dtype
    The dtype of the array that will be written to disk.

Returns
-------
descr : object
    An object that can be passed to `numpy.dtype()` in order to
    replicate the input dtype.

---
## descr_to_dtype
```python
from format import descr_to_dtype
```

Returns a dtype based off the given description.

This is essentially the reverse of `dtype_to_descr()`. It will remove
the valueless padding fields created by, i.e. simple fields like
dtype('float32'), and then convert the description to its corresponding
dtype.

Parameters
----------
descr : object
    The object retrieved by dtype.descr. Can be passed to
    `numpy.dtype()` in order to replicate the input dtype.

Returns
-------
dtype : dtype
    The dtype constructed by the description.

---
## header_data_from_array_1_0
```python
from format import header_data_from_array_1_0
```

Get the dictionary of header metadata from a numpy.ndarray.

Parameters
----------
array : numpy.ndarray

Returns
-------
d : dict
    This has the appropriate entries for writing its string representation
    to the header of the file.

---
## _wrap_header
```python
from format import _wrap_header
```

Takes a stringified header, and attaches the prefix and padding to it

---
## _wrap_header_guess_version
```python
from format import _wrap_header_guess_version
```

Like `_wrap_header`, but chooses an appropriate version given the contents

---
## _write_array_header
```python
from format import _write_array_header
```

Write the header for an array and returns the version used

Parameters
----------
fp : filelike object
d : dict
    This has the appropriate entries for writing its string representation
    to the header of the file.
version : tuple or None
    None means use oldest that works. Providing an explicit version will
    raise a ValueError if the format does not allow saving this data.
    Default: None

---
## write_array_header_1_0
```python
from format import write_array_header_1_0
```

Write the header for an array using the 1.0 format.

Parameters
----------
fp : filelike object
d : dict
    This has the appropriate entries for writing its string
    representation to the header of the file.

---
## write_array_header_2_0
```python
from format import write_array_header_2_0
```

Write the header for an array using the 2.0 format.
    The 2.0 format allows storing very large structured arrays.

.. versionadded:: 1.9.0

Parameters
----------
fp : filelike object
d : dict
    This has the appropriate entries for writing its string
    representation to the header of the file.

---
## read_array_header_1_0
```python
from format import read_array_header_1_0
```

Read an array header from a filelike object using the 1.0 file format
version.

This will leave the file object located just after the header.

Parameters
----------
fp : filelike object
    A file object or something with a `.read()` method like a file.

Returns
-------
shape : tuple of int
    The shape of the array.
fortran_order : bool
    The array data will be written out directly if it is either
    C-contiguous or Fortran-contiguous. Otherwise, it will be made
    contiguous before writing it out.
dtype : dtype
    The dtype of the file's data.
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.

Raises
------
ValueError
    If the data is invalid.

---
## read_array_header_2_0
```python
from format import read_array_header_2_0
```

Read an array header from a filelike object using the 2.0 file format
version.

This will leave the file object located just after the header.

.. versionadded:: 1.9.0

Parameters
----------
fp : filelike object
    A file object or something with a `.read()` method like a file.
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.

Returns
-------
shape : tuple of int
    The shape of the array.
fortran_order : bool
    The array data will be written out directly if it is either
    C-contiguous or Fortran-contiguous. Otherwise, it will be made
    contiguous before writing it out.
dtype : dtype
    The dtype of the file's data.

Raises
------
ValueError
    If the data is invalid.

---
## _filter_header
```python
from format import _filter_header
```

Clean up 'L' in npz header ints.

Cleans up the 'L' in strings representing integers. Needed to allow npz
headers produced in Python2 to be read in Python3.

Parameters
----------
s : string
    Npy file header.

Returns
-------
header : str
    Cleaned up header.

---
## _read_array_header
```python
from format import _read_array_header
```

see read_array_header_1_0

---
## write_array
```python
from format import write_array
```

Write an array to an NPY file, including a header.

If the array is neither C-contiguous nor Fortran-contiguous AND the
file_like object is not a real file object, this function will have to
copy data in memory.

Parameters
----------
fp : file_like object
    An open, writable file object, or similar object with a
    ``.write()`` method.
array : ndarray
    The array to write to disk.
version : (int, int) or None, optional
    The version number of the format. None means use the oldest
    supported version that is able to store the data.  Default: None
allow_pickle : bool, optional
    Whether to allow writing pickled data. Default: True
pickle_kwargs : dict, optional
    Additional keyword arguments to pass to pickle.dump, excluding
    'protocol'. These are only useful when pickling objects in object
    arrays on Python 3 to Python 2 compatible format.

Raises
------
ValueError
    If the array cannot be persisted. This includes the case of
    allow_pickle=False and array being an object array.
Various other errors
    If the array contains Python objects as part of its dtype, the
    process of pickling them may raise various errors if the objects
    are not picklable.

---
## read_array
```python
from format import read_array
```

Read an array from an NPY file.

Parameters
----------
fp : file_like object
    If this is not a real file object, then this may take extra memory
    and time.
allow_pickle : bool, optional
    Whether to allow writing pickled data. Default: False

    .. versionchanged:: 1.16.3
        Made default False in response to CVE-2019-6446.

pickle_kwargs : dict
    Additional keyword arguments to pass to pickle.load. These are only
    useful when loading object arrays saved on Python 2 when using
    Python 3.
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.
    This option is ignored when `allow_pickle` is passed.  In that case
    the file is by definition trusted and the limit is unnecessary.

Returns
-------
array : ndarray
    The array from the data on disk.

Raises
------
ValueError
    If the data is invalid, or allow_pickle=False and the file contains
    an object array.

---
## open_memmap
```python
from format import open_memmap
```

Open a .npy file as a memory-mapped array.

This may be used to read an existing file or create a new one.

Parameters
----------
filename : str or path-like
    The name of the file on disk.  This may *not* be a file-like
    object.
mode : str, optional
    The mode in which to open the file; the default is 'r+'.  In
    addition to the standard file modes, 'c' is also accepted to mean
    "copy on write."  See `memmap` for the available mode strings.
dtype : data-type, optional
    The data type of the array if we are creating a new file in "write"
    mode, if not, `dtype` is ignored.  The default value is None, which
    results in a data-type of `float64`.
shape : tuple of int
    The shape of the array if we are creating a new file in "write"
    mode, in which case this parameter is required.  Otherwise, this
    parameter is ignored and is thus optional.
fortran_order : bool, optional
    Whether the array should be Fortran-contiguous (True) or
    C-contiguous (False, the default) if we are creating a new file in
    "write" mode.
version : tuple of int (major, minor) or None
    If the mode is a "write" mode, then this is the version of the file
    format used to create the file.  None means use the oldest
    supported version that is able to store the data.  Default: None
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.

Returns
-------
marray : memmap
    The memory-mapped array.

Raises
------
ValueError
    If the data or the mode is invalid.
OSError
    If the file is not found or cannot be opened correctly.

See Also
--------
numpy.memmap

---
## _read_bytes
```python
from format import _read_bytes
```

Read from file-like object until size bytes are read.
Raises ValueError if not EOF is encountered before size bytes are read.
Non-blocking objects only supported if they derive from io objects.

Required as e.g. ZipExtFile in python 2.6 can return less data than
requested.

---
## __name__
```python
from twodim_base import __name__
```

Basic functions for manipulating 2d arrays

---
## _min_int
```python
from twodim_base import _min_int
```

get small int that fits the range 

---
## _flip_dispatcher
```python
from twodim_base import _flip_dispatcher
```



---
## fliplr
```python
from twodim_base import fliplr
```

Reverse the order of elements along axis 1 (left/right).

For a 2-D array, this flips the entries in each row in the left/right
direction. Columns are preserved, but appear in a different order than
before.

Parameters
----------
m : array_like
    Input array, must be at least 2-D.

Returns
-------
f : ndarray
    A view of `m` with the columns reversed.  Since a view
    is returned, this operation is :math:`\mathcal O(1)`.

See Also
--------
flipud : Flip array in the up/down direction.
flip : Flip array in one or more dimensions.
rot90 : Rotate array counterclockwise.

Notes
-----
Equivalent to ``m[:,::-1]`` or ``np.flip(m, axis=1)``.
Requires the array to be at least 2-D.

Examples
--------
>>> A = np.diag([1.,2.,3.])
>>> A
array([[1.,  0.,  0.],
       [0.,  2.,  0.],
       [0.,  0.,  3.]])
>>> np.fliplr(A)
array([[0.,  0.,  1.],
       [0.,  2.,  0.],
       [3.,  0.,  0.]])

>>> A = np.random.randn(2,3,5)
>>> np.all(np.fliplr(A) == A[:,::-1,...])
True

---
## flipud
```python
from twodim_base import flipud
```

Reverse the order of elements along axis 0 (up/down).

For a 2-D array, this flips the entries in each column in the up/down
direction. Rows are preserved, but appear in a different order than before.

Parameters
----------
m : array_like
    Input array.

Returns
-------
out : array_like
    A view of `m` with the rows reversed.  Since a view is
    returned, this operation is :math:`\mathcal O(1)`.

See Also
--------
fliplr : Flip array in the left/right direction.
flip : Flip array in one or more dimensions.
rot90 : Rotate array counterclockwise.

Notes
-----
Equivalent to ``m[::-1, ...]`` or ``np.flip(m, axis=0)``.
Requires the array to be at least 1-D.

Examples
--------
>>> A = np.diag([1.0, 2, 3])
>>> A
array([[1.,  0.,  0.],
       [0.,  2.,  0.],
       [0.,  0.,  3.]])
>>> np.flipud(A)
array([[0.,  0.,  3.],
       [0.,  2.,  0.],
       [1.,  0.,  0.]])

>>> A = np.random.randn(2,3,5)
>>> np.all(np.flipud(A) == A[::-1,...])
True

>>> np.flipud([1,2])
array([2, 1])

---
## eye
```python
from twodim_base import eye
```

Return a 2-D array with ones on the diagonal and zeros elsewhere.

Parameters
----------
N : int
  Number of rows in the output.
M : int, optional
  Number of columns in the output. If None, defaults to `N`.
k : int, optional
  Index of the diagonal: 0 (the default) refers to the main diagonal,
  a positive value refers to an upper diagonal, and a negative value
  to a lower diagonal.
dtype : data-type, optional
  Data-type of the returned array.
order : {'C', 'F'}, optional
    Whether the output should be stored in row-major (C-style) or
    column-major (Fortran-style) order in memory.

    .. versionadded:: 1.14.0
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
I : ndarray of shape (N,M)
  An array where all elements are equal to zero, except for the `k`-th
  diagonal, whose values are equal to one.

See Also
--------
identity : (almost) equivalent function
diag : diagonal 2-D array from a 1-D array specified by the user.

Examples
--------
>>> np.eye(2, dtype=int)
array([[1, 0],
       [0, 1]])
>>> np.eye(3, k=1)
array([[0.,  1.,  0.],
       [0.,  0.,  1.],
       [0.,  0.,  0.]])

---
## _diag_dispatcher
```python
from twodim_base import _diag_dispatcher
```



---
## diag
```python
from twodim_base import diag
```

Extract a diagonal or construct a diagonal array.

See the more detailed documentation for ``numpy.diagonal`` if you use this
function to extract a diagonal and wish to write to the resulting array;
whether it returns a copy or a view depends on what version of numpy you
are using.

Parameters
----------
v : array_like
    If `v` is a 2-D array, return a copy of its `k`-th diagonal.
    If `v` is a 1-D array, return a 2-D array with `v` on the `k`-th
    diagonal.
k : int, optional
    Diagonal in question. The default is 0. Use `k>0` for diagonals
    above the main diagonal, and `k<0` for diagonals below the main
    diagonal.

Returns
-------
out : ndarray
    The extracted diagonal or constructed diagonal array.

See Also
--------
diagonal : Return specified diagonals.
diagflat : Create a 2-D array with the flattened input as a diagonal.
trace : Sum along diagonals.
triu : Upper triangle of an array.
tril : Lower triangle of an array.

Examples
--------
>>> x = np.arange(9).reshape((3,3))
>>> x
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])

>>> np.diag(x)
array([0, 4, 8])
>>> np.diag(x, k=1)
array([1, 5])
>>> np.diag(x, k=-1)
array([3, 7])

>>> np.diag(np.diag(x))
array([[0, 0, 0],
       [0, 4, 0],
       [0, 0, 8]])

---
## diagflat
```python
from twodim_base import diagflat
```

Create a two-dimensional array with the flattened input as a diagonal.

Parameters
----------
v : array_like
    Input data, which is flattened and set as the `k`-th
    diagonal of the output.
k : int, optional
    Diagonal to set; 0, the default, corresponds to the "main" diagonal,
    a positive (negative) `k` giving the number of the diagonal above
    (below) the main.

Returns
-------
out : ndarray
    The 2-D output array.

See Also
--------
diag : MATLAB work-alike for 1-D and 2-D arrays.
diagonal : Return specified diagonals.
trace : Sum along diagonals.

Examples
--------
>>> np.diagflat([[1,2], [3,4]])
array([[1, 0, 0, 0],
       [0, 2, 0, 0],
       [0, 0, 3, 0],
       [0, 0, 0, 4]])

>>> np.diagflat([1,2], 1)
array([[0, 1, 0],
       [0, 0, 2],
       [0, 0, 0]])

---
## tri
```python
from twodim_base import tri
```

An array with ones at and below the given diagonal and zeros elsewhere.

Parameters
----------
N : int
    Number of rows in the array.
M : int, optional
    Number of columns in the array.
    By default, `M` is taken equal to `N`.
k : int, optional
    The sub-diagonal at and below which the array is filled.
    `k` = 0 is the main diagonal, while `k` < 0 is below it,
    and `k` > 0 is above.  The default is 0.
dtype : dtype, optional
    Data type of the returned array.  The default is float.
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
tri : ndarray of shape (N, M)
    Array with its lower triangle filled with ones and zero elsewhere;
    in other words ``T[i,j] == 1`` for ``j <= i + k``, 0 otherwise.

Examples
--------
>>> np.tri(3, 5, 2, dtype=int)
array([[1, 1, 1, 0, 0],
       [1, 1, 1, 1, 0],
       [1, 1, 1, 1, 1]])

>>> np.tri(3, 5, -1)
array([[0.,  0.,  0.,  0.,  0.],
       [1.,  0.,  0.,  0.,  0.],
       [1.,  1.,  0.,  0.,  0.]])

---
## _trilu_dispatcher
```python
from twodim_base import _trilu_dispatcher
```



---
## tril
```python
from twodim_base import tril
```

Lower triangle of an array.

Return a copy of an array with elements above the `k`-th diagonal zeroed.
For arrays with ``ndim`` exceeding 2, `tril` will apply to the final two
axes.

Parameters
----------
m : array_like, shape (..., M, N)
    Input array.
k : int, optional
    Diagonal above which to zero elements.  `k = 0` (the default) is the
    main diagonal, `k < 0` is below it and `k > 0` is above.

Returns
-------
tril : ndarray, shape (..., M, N)
    Lower triangle of `m`, of same shape and data-type as `m`.

See Also
--------
triu : same thing, only for the upper triangle

Examples
--------
>>> np.tril([[1,2,3],[4,5,6],[7,8,9],[10,11,12]], -1)
array([[ 0,  0,  0],
       [ 4,  0,  0],
       [ 7,  8,  0],
       [10, 11, 12]])

>>> np.tril(np.arange(3*4*5).reshape(3, 4, 5))
array([[[ 0,  0,  0,  0,  0],
        [ 5,  6,  0,  0,  0],
        [10, 11, 12,  0,  0],
        [15, 16, 17, 18,  0]],
       [[20,  0,  0,  0,  0],
        [25, 26,  0,  0,  0],
        [30, 31, 32,  0,  0],
        [35, 36, 37, 38,  0]],
       [[40,  0,  0,  0,  0],
        [45, 46,  0,  0,  0],
        [50, 51, 52,  0,  0],
        [55, 56, 57, 58,  0]]])

---
## triu
```python
from twodim_base import triu
```

Upper triangle of an array.

Return a copy of an array with the elements below the `k`-th diagonal
zeroed. For arrays with ``ndim`` exceeding 2, `triu` will apply to the
final two axes.

Please refer to the documentation for `tril` for further details.

See Also
--------
tril : lower triangle of an array

Examples
--------
>>> np.triu([[1,2,3],[4,5,6],[7,8,9],[10,11,12]], -1)
array([[ 1,  2,  3],
       [ 4,  5,  6],
       [ 0,  8,  9],
       [ 0,  0, 12]])

>>> np.triu(np.arange(3*4*5).reshape(3, 4, 5))
array([[[ 0,  1,  2,  3,  4],
        [ 0,  6,  7,  8,  9],
        [ 0,  0, 12, 13, 14],
        [ 0,  0,  0, 18, 19]],
       [[20, 21, 22, 23, 24],
        [ 0, 26, 27, 28, 29],
        [ 0,  0, 32, 33, 34],
        [ 0,  0,  0, 38, 39]],
       [[40, 41, 42, 43, 44],
        [ 0, 46, 47, 48, 49],
        [ 0,  0, 52, 53, 54],
        [ 0,  0,  0, 58, 59]]])

---
## _vander_dispatcher
```python
from twodim_base import _vander_dispatcher
```



---
## vander
```python
from twodim_base import vander
```

Generate a Vandermonde matrix.

The columns of the output matrix are powers of the input vector. The
order of the powers is determined by the `increasing` boolean argument.
Specifically, when `increasing` is False, the `i`-th output column is
the input vector raised element-wise to the power of ``N - i - 1``. Such
a matrix with a geometric progression in each row is named for Alexandre-
Theophile Vandermonde.

Parameters
----------
x : array_like
    1-D input array.
N : int, optional
    Number of columns in the output.  If `N` is not specified, a square
    array is returned (``N = len(x)``).
increasing : bool, optional
    Order of the powers of the columns.  If True, the powers increase
    from left to right, if False (the default) they are reversed.

    .. versionadded:: 1.9.0

Returns
-------
out : ndarray
    Vandermonde matrix.  If `increasing` is False, the first column is
    ``x^(N-1)``, the second ``x^(N-2)`` and so forth. If `increasing` is
    True, the columns are ``x^0, x^1, ..., x^(N-1)``.

See Also
--------
polynomial.polynomial.polyvander

Examples
--------
>>> x = np.array([1, 2, 3, 5])
>>> N = 3
>>> np.vander(x, N)
array([[ 1,  1,  1],
       [ 4,  2,  1],
       [ 9,  3,  1],
       [25,  5,  1]])

>>> np.column_stack([x**(N-1-i) for i in range(N)])
array([[ 1,  1,  1],
       [ 4,  2,  1],
       [ 9,  3,  1],
       [25,  5,  1]])

>>> x = np.array([1, 2, 3, 5])
>>> np.vander(x)
array([[  1,   1,   1,   1],
       [  8,   4,   2,   1],
       [ 27,   9,   3,   1],
       [125,  25,   5,   1]])
>>> np.vander(x, increasing=True)
array([[  1,   1,   1,   1],
       [  1,   2,   4,   8],
       [  1,   3,   9,  27],
       [  1,   5,  25, 125]])

The determinant of a square Vandermonde matrix is the product
of the differences between the values of the input vector:

>>> np.linalg.det(np.vander(x))
48.000000000000043 # may vary
>>> (5-3)*(5-2)*(5-1)*(3-2)*(3-1)*(2-1)
48

---
## _histogram2d_dispatcher
```python
from twodim_base import _histogram2d_dispatcher
```



---
## histogram2d
```python
from twodim_base import histogram2d
```

Compute the bi-dimensional histogram of two data samples.

Parameters
----------
x : array_like, shape (N,)
    An array containing the x coordinates of the points to be
    histogrammed.
y : array_like, shape (N,)
    An array containing the y coordinates of the points to be
    histogrammed.
bins : int or array_like or [int, int] or [array, array], optional
    The bin specification:

      * If int, the number of bins for the two dimensions (nx=ny=bins).
      * If array_like, the bin edges for the two dimensions
        (x_edges=y_edges=bins).
      * If [int, int], the number of bins in each dimension
        (nx, ny = bins).
      * If [array, array], the bin edges in each dimension
        (x_edges, y_edges = bins).
      * A combination [int, array] or [array, int], where int
        is the number of bins and array is the bin edges.

range : array_like, shape(2,2), optional
    The leftmost and rightmost edges of the bins along each dimension
    (if not specified explicitly in the `bins` parameters):
    ``[[xmin, xmax], [ymin, ymax]]``. All values outside of this range
    will be considered outliers and not tallied in the histogram.
density : bool, optional
    If False, the default, returns the number of samples in each bin.
    If True, returns the probability *density* function at the bin,
    ``bin_count / sample_count / bin_area``.
weights : array_like, shape(N,), optional
    An array of values ``w_i`` weighing each sample ``(x_i, y_i)``.
    Weights are normalized to 1 if `density` is True. If `density` is
    False, the values of the returned histogram are equal to the sum of
    the weights belonging to the samples falling into each bin.

Returns
-------
H : ndarray, shape(nx, ny)
    The bi-dimensional histogram of samples `x` and `y`. Values in `x`
    are histogrammed along the first dimension and values in `y` are
    histogrammed along the second dimension.
xedges : ndarray, shape(nx+1,)
    The bin edges along the first dimension.
yedges : ndarray, shape(ny+1,)
    The bin edges along the second dimension.

See Also
--------
histogram : 1D histogram
histogramdd : Multidimensional histogram

Notes
-----
When `density` is True, then the returned histogram is the sample
density, defined such that the sum over bins of the product
``bin_value * bin_area`` is 1.

Please note that the histogram does not follow the Cartesian convention
where `x` values are on the abscissa and `y` values on the ordinate
axis.  Rather, `x` is histogrammed along the first dimension of the
array (vertical), and `y` along the second dimension of the array
(horizontal).  This ensures compatibility with `histogramdd`.

Examples
--------
>>> from matplotlib.image import NonUniformImage
>>> import matplotlib.pyplot as plt

Construct a 2-D histogram with variable bin width. First define the bin
edges:

>>> xedges = [0, 1, 3, 5]
>>> yedges = [0, 2, 3, 4, 6]

Next we create a histogram H with random bin content:

>>> x = np.random.normal(2, 1, 100)
>>> y = np.random.normal(1, 1, 100)
>>> H, xedges, yedges = np.histogram2d(x, y, bins=(xedges, yedges))
>>> # Histogram does not follow Cartesian convention (see Notes),
>>> # therefore transpose H for visualization purposes.
>>> H = H.T

:func:`imshow <matplotlib.pyplot.imshow>` can only display square bins:

>>> fig = plt.figure(figsize=(7, 3))
>>> ax = fig.add_subplot(131, title='imshow: square bins')
>>> plt.imshow(H, interpolation='nearest', origin='lower',
...         extent=[xedges[0], xedges[-1], yedges[0], yedges[-1]])
<matplotlib.image.AxesImage object at 0x...>

:func:`pcolormesh <matplotlib.pyplot.pcolormesh>` can display actual edges:

>>> ax = fig.add_subplot(132, title='pcolormesh: actual edges',
...         aspect='equal')
>>> X, Y = np.meshgrid(xedges, yedges)
>>> ax.pcolormesh(X, Y, H)
<matplotlib.collections.QuadMesh object at 0x...>

:class:`NonUniformImage <matplotlib.image.NonUniformImage>` can be used to
display actual bin edges with interpolation:

>>> ax = fig.add_subplot(133, title='NonUniformImage: interpolated',
...         aspect='equal', xlim=xedges[[0, -1]], ylim=yedges[[0, -1]])
>>> im = NonUniformImage(ax, interpolation='bilinear')
>>> xcenters = (xedges[:-1] + xedges[1:]) / 2
>>> ycenters = (yedges[:-1] + yedges[1:]) / 2
>>> im.set_data(xcenters, ycenters, H)
>>> ax.add_image(im)
>>> plt.show()

It is also possible to construct a 2-D histogram without specifying bin
edges:

>>> # Generate non-symmetric test data
>>> n = 10000
>>> x = np.linspace(1, 100, n)
>>> y = 2*np.log(x) + np.random.rand(n) - 0.5
>>> # Compute 2d histogram. Note the order of x/y and xedges/yedges
>>> H, yedges, xedges = np.histogram2d(y, x, bins=20)

Now we can plot the histogram using
:func:`pcolormesh <matplotlib.pyplot.pcolormesh>`, and a
:func:`hexbin <matplotlib.pyplot.hexbin>` for comparison.

>>> # Plot histogram using pcolormesh
>>> fig, (ax1, ax2) = plt.subplots(ncols=2, sharey=True)
>>> ax1.pcolormesh(xedges, yedges, H, cmap='rainbow')
>>> ax1.plot(x, 2*np.log(x), 'k-')
>>> ax1.set_xlim(x.min(), x.max())
>>> ax1.set_ylim(y.min(), y.max())
>>> ax1.set_xlabel('x')
>>> ax1.set_ylabel('y')
>>> ax1.set_title('histogram2d')
>>> ax1.grid()

>>> # Create hexbin plot for comparison
>>> ax2.hexbin(x, y, gridsize=20, cmap='rainbow')
>>> ax2.plot(x, 2*np.log(x), 'k-')
>>> ax2.set_title('hexbin')
>>> ax2.set_xlim(x.min(), x.max())
>>> ax2.set_xlabel('x')
>>> ax2.grid()

>>> plt.show()

---
## mask_indices
```python
from twodim_base import mask_indices
```

Return the indices to access (n, n) arrays, given a masking function.

Assume `mask_func` is a function that, for a square array a of size
``(n, n)`` with a possible offset argument `k`, when called as
``mask_func(a, k)`` returns a new array with zeros in certain locations
(functions like `triu` or `tril` do precisely this). Then this function
returns the indices where the non-zero values would be located.

Parameters
----------
n : int
    The returned indices will be valid to access arrays of shape (n, n).
mask_func : callable
    A function whose call signature is similar to that of `triu`, `tril`.
    That is, ``mask_func(x, k)`` returns a boolean array, shaped like `x`.
    `k` is an optional argument to the function.
k : scalar
    An optional argument which is passed through to `mask_func`. Functions
    like `triu`, `tril` take a second argument that is interpreted as an
    offset.

Returns
-------
indices : tuple of arrays.
    The `n` arrays of indices corresponding to the locations where
    ``mask_func(np.ones((n, n)), k)`` is True.

See Also
--------
triu, tril, triu_indices, tril_indices

Notes
-----
.. versionadded:: 1.4.0

Examples
--------
These are the indices that would allow you to access the upper triangular
part of any 3x3 array:

>>> iu = np.mask_indices(3, np.triu)

For example, if `a` is a 3x3 array:

>>> a = np.arange(9).reshape(3, 3)
>>> a
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
>>> a[iu]
array([0, 1, 2, 4, 5, 8])

An offset can be passed also to the masking function.  This gets us the
indices starting on the first diagonal right of the main one:

>>> iu1 = np.mask_indices(3, np.triu, 1)

with which we now extract only three elements:

>>> a[iu1]
array([1, 2, 5])

---
## tril_indices
```python
from twodim_base import tril_indices
```

Return the indices for the lower-triangle of an (n, m) array.

Parameters
----------
n : int
    The row dimension of the arrays for which the returned
    indices will be valid.
k : int, optional
    Diagonal offset (see `tril` for details).
m : int, optional
    .. versionadded:: 1.9.0

    The column dimension of the arrays for which the returned
    arrays will be valid.
    By default `m` is taken equal to `n`.


Returns
-------
inds : tuple of arrays
    The indices for the triangle. The returned tuple contains two arrays,
    each with the indices along one dimension of the array.

See also
--------
triu_indices : similar function, for upper-triangular.
mask_indices : generic function accepting an arbitrary mask function.
tril, triu

Notes
-----
.. versionadded:: 1.4.0

Examples
--------
Compute two different sets of indices to access 4x4 arrays, one for the
lower triangular part starting at the main diagonal, and one starting two
diagonals further right:

>>> il1 = np.tril_indices(4)
>>> il2 = np.tril_indices(4, 2)

Here is how they can be used with a sample array:

>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

Both for indexing:

>>> a[il1]
array([ 0,  4,  5, ..., 13, 14, 15])

And for assigning values:

>>> a[il1] = -1
>>> a
array([[-1,  1,  2,  3],
       [-1, -1,  6,  7],
       [-1, -1, -1, 11],
       [-1, -1, -1, -1]])

These cover almost the whole array (two diagonals right of the main one):

>>> a[il2] = -10
>>> a
array([[-10, -10, -10,   3],
       [-10, -10, -10, -10],
       [-10, -10, -10, -10],
       [-10, -10, -10, -10]])

---
## _trilu_indices_form_dispatcher
```python
from twodim_base import _trilu_indices_form_dispatcher
```



---
## tril_indices_from
```python
from twodim_base import tril_indices_from
```

Return the indices for the lower-triangle of arr.

See `tril_indices` for full details.

Parameters
----------
arr : array_like
    The indices will be valid for square arrays whose dimensions are
    the same as arr.
k : int, optional
    Diagonal offset (see `tril` for details).

Examples
--------

Create a 4 by 4 array.

>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

Pass the array to get the indices of the lower triangular elements.

>>> trili = np.tril_indices_from(a)
>>> trili
(array([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]), array([0, 0, 1, 0, 1, 2, 0, 1, 2, 3]))

>>> a[trili]
array([ 0,  4,  5,  8,  9, 10, 12, 13, 14, 15])

This is syntactic sugar for tril_indices().

>>> np.tril_indices(a.shape[0])
(array([0, 1, 1, 2, 2, 2, 3, 3, 3, 3]), array([0, 0, 1, 0, 1, 2, 0, 1, 2, 3]))

Use the `k` parameter to return the indices for the lower triangular array
up to the k-th diagonal.

>>> trili1 = np.tril_indices_from(a, k=1)
>>> a[trili1]
array([ 0,  1,  4,  5,  6,  8,  9, 10, 11, 12, 13, 14, 15])

See Also
--------
tril_indices, tril, triu_indices_from

Notes
-----
.. versionadded:: 1.4.0

---
## triu_indices
```python
from twodim_base import triu_indices
```

Return the indices for the upper-triangle of an (n, m) array.

Parameters
----------
n : int
    The size of the arrays for which the returned indices will
    be valid.
k : int, optional
    Diagonal offset (see `triu` for details).
m : int, optional
    .. versionadded:: 1.9.0

    The column dimension of the arrays for which the returned
    arrays will be valid.
    By default `m` is taken equal to `n`.


Returns
-------
inds : tuple, shape(2) of ndarrays, shape(`n`)
    The indices for the triangle. The returned tuple contains two arrays,
    each with the indices along one dimension of the array.  Can be used
    to slice a ndarray of shape(`n`, `n`).

See also
--------
tril_indices : similar function, for lower-triangular.
mask_indices : generic function accepting an arbitrary mask function.
triu, tril

Notes
-----
.. versionadded:: 1.4.0

Examples
--------
Compute two different sets of indices to access 4x4 arrays, one for the
upper triangular part starting at the main diagonal, and one starting two
diagonals further right:

>>> iu1 = np.triu_indices(4)
>>> iu2 = np.triu_indices(4, 2)

Here is how they can be used with a sample array:

>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

Both for indexing:

>>> a[iu1]
array([ 0,  1,  2, ..., 10, 11, 15])

And for assigning values:

>>> a[iu1] = -1
>>> a
array([[-1, -1, -1, -1],
       [ 4, -1, -1, -1],
       [ 8,  9, -1, -1],
       [12, 13, 14, -1]])

These cover only a small part of the whole array (two diagonals right
of the main one):

>>> a[iu2] = -10
>>> a
array([[ -1,  -1, -10, -10],
       [  4,  -1,  -1, -10],
       [  8,   9,  -1,  -1],
       [ 12,  13,  14,  -1]])

---
## triu_indices_from
```python
from twodim_base import triu_indices_from
```

Return the indices for the upper-triangle of arr.

See `triu_indices` for full details.

Parameters
----------
arr : ndarray, shape(N, N)
    The indices will be valid for square arrays.
k : int, optional
    Diagonal offset (see `triu` for details).

Returns
-------
triu_indices_from : tuple, shape(2) of ndarray, shape(N)
    Indices for the upper-triangle of `arr`.

Examples
--------

Create a 4 by 4 array.

>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

Pass the array to get the indices of the upper triangular elements.

>>> triui = np.triu_indices_from(a)
>>> triui
(array([0, 0, 0, 0, 1, 1, 1, 2, 2, 3]), array([0, 1, 2, 3, 1, 2, 3, 2, 3, 3]))

>>> a[triui]
array([ 0,  1,  2,  3,  5,  6,  7, 10, 11, 15])

This is syntactic sugar for triu_indices().

>>> np.triu_indices(a.shape[0])
(array([0, 0, 0, 0, 1, 1, 1, 2, 2, 3]), array([0, 1, 2, 3, 1, 2, 3, 2, 3, 3]))

Use the `k` parameter to return the indices for the upper triangular array
from the k-th diagonal.

>>> triuim1 = np.triu_indices_from(a, k=1)
>>> a[triuim1]
array([ 1,  2,  3,  6,  7, 11])


See Also
--------
triu_indices, triu, tril_indices_from

Notes
-----
.. versionadded:: 1.4.0

---
## __name__
```python
from index_tricks import __name__
```



---
## _ix__dispatcher
```python
from index_tricks import _ix__dispatcher
```



---
## ix_
```python
from index_tricks import ix_
```

Construct an open mesh from multiple sequences.

This function takes N 1-D sequences and returns N outputs with N
dimensions each, such that the shape is 1 in all but one dimension
and the dimension with the non-unit shape value cycles through all
N dimensions.

Using `ix_` one can quickly construct index arrays that will index
the cross product. ``a[np.ix_([1,3],[2,5])]`` returns the array
``[[a[1,2] a[1,5]], [a[3,2] a[3,5]]]``.

Parameters
----------
args : 1-D sequences
    Each sequence should be of integer or boolean type.
    Boolean sequences will be interpreted as boolean masks for the
    corresponding dimension (equivalent to passing in
    ``np.nonzero(boolean_sequence)``).

Returns
-------
out : tuple of ndarrays
    N arrays with N dimensions each, with N the number of input
    sequences. Together these arrays form an open mesh.

See Also
--------
ogrid, mgrid, meshgrid

Examples
--------
>>> a = np.arange(10).reshape(2, 5)
>>> a
array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9]])
>>> ixgrid = np.ix_([0, 1], [2, 4])
>>> ixgrid
(array([[0],
       [1]]), array([[2, 4]]))
>>> ixgrid[0].shape, ixgrid[1].shape
((2, 1), (1, 2))
>>> a[ixgrid]
array([[2, 4],
       [7, 9]])

>>> ixgrid = np.ix_([True, True], [2, 4])
>>> a[ixgrid]
array([[2, 4],
       [7, 9]])
>>> ixgrid = np.ix_([True, True], [False, False, True, False, True])
>>> a[ixgrid]
array([[2, 4],
       [7, 9]])

---
## nd_grid
```python
from index_tricks import nd_grid
```

Construct a multi-dimensional "meshgrid".

``grid = nd_grid()`` creates an instance which will return a mesh-grid
when indexed.  The dimension and number of the output arrays are equal
to the number of indexing dimensions.  If the step length is not a
complex number, then the stop is not inclusive.

However, if the step length is a **complex number** (e.g. 5j), then the
integer part of its magnitude is interpreted as specifying the
number of points to create between the start and stop values, where
the stop value **is inclusive**.

If instantiated with an argument of ``sparse=True``, the mesh-grid is
open (or not fleshed out) so that only one-dimension of each returned
argument is greater than 1.

Parameters
----------
sparse : bool, optional
    Whether the grid is sparse or not. Default is False.

Notes
-----
Two instances of `nd_grid` are made available in the NumPy namespace,
`mgrid` and `ogrid`, approximately defined as::

    mgrid = nd_grid(sparse=False)
    ogrid = nd_grid(sparse=True)

Users should use these pre-defined instances instead of using `nd_grid`
directly.

---
## MGridClass
```python
from index_tricks import MGridClass
```

An instance which returns a dense multi-dimensional "meshgrid".

An instance which returns a dense (or fleshed out) mesh-grid
when indexed, so that each returned argument has the same shape.
The dimensions and number of the output arrays are equal to the
number of indexing dimensions.  If the step length is not a complex
number, then the stop is not inclusive.

However, if the step length is a **complex number** (e.g. 5j), then
the integer part of its magnitude is interpreted as specifying the
number of points to create between the start and stop values, where
the stop value **is inclusive**.

Returns
-------
mesh-grid `ndarrays` all of the same dimensions

See Also
--------
ogrid : like `mgrid` but returns open (not fleshed out) mesh grids
meshgrid: return coordinate matrices from coordinate vectors
r_ : array concatenator
:ref:`how-to-partition`

Examples
--------
>>> np.mgrid[0:5, 0:5]
array([[[0, 0, 0, 0, 0],
        [1, 1, 1, 1, 1],
        [2, 2, 2, 2, 2],
        [3, 3, 3, 3, 3],
        [4, 4, 4, 4, 4]],
       [[0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4]]])
>>> np.mgrid[-1:1:5j]
array([-1. , -0.5,  0. ,  0.5,  1. ])

---
## OGridClass
```python
from index_tricks import OGridClass
```

An instance which returns an open multi-dimensional "meshgrid".

An instance which returns an open (i.e. not fleshed out) mesh-grid
when indexed, so that only one dimension of each returned array is
greater than 1.  The dimension and number of the output arrays are
equal to the number of indexing dimensions.  If the step length is
not a complex number, then the stop is not inclusive.

However, if the step length is a **complex number** (e.g. 5j), then
the integer part of its magnitude is interpreted as specifying the
number of points to create between the start and stop values, where
the stop value **is inclusive**.

Returns
-------
mesh-grid
    `ndarrays` with only one dimension not equal to 1

See Also
--------
mgrid : like `ogrid` but returns dense (or fleshed out) mesh grids
meshgrid: return coordinate matrices from coordinate vectors
r_ : array concatenator
:ref:`how-to-partition`

Examples
--------
>>> from numpy import ogrid
>>> ogrid[-1:1:5j]
array([-1. , -0.5,  0. ,  0.5,  1. ])
>>> ogrid[0:5,0:5]
[array([[0],
        [1],
        [2],
        [3],
        [4]]), array([[0, 1, 2, 3, 4]])]

---
## AxisConcatenator
```python
from index_tricks import AxisConcatenator
```

Translates slice objects to concatenation along an axis.

For detailed documentation on usage, see `r_`.

---
## RClass
```python
from index_tricks import RClass
```

Translates slice objects to concatenation along the first axis.

This is a simple way to build up arrays quickly. There are two use cases.

1. If the index expression contains comma separated arrays, then stack
   them along their first axis.
2. If the index expression contains slice notation or scalars then create
   a 1-D array with a range indicated by the slice notation.

If slice notation is used, the syntax ``start:stop:step`` is equivalent
to ``np.arange(start, stop, step)`` inside of the brackets. However, if
``step`` is an imaginary number (i.e. 100j) then its integer portion is
interpreted as a number-of-points desired and the start and stop are
inclusive. In other words ``start:stop:stepj`` is interpreted as
``np.linspace(start, stop, step, endpoint=1)`` inside of the brackets.
After expansion of slice notation, all comma separated sequences are
concatenated together.

Optional character strings placed as the first element of the index
expression can be used to change the output. The strings 'r' or 'c' result
in matrix output. If the result is 1-D and 'r' is specified a 1 x N (row)
matrix is produced. If the result is 1-D and 'c' is specified, then a N x 1
(column) matrix is produced. If the result is 2-D then both provide the
same matrix result.

A string integer specifies which axis to stack multiple comma separated
arrays along. A string of two comma-separated integers allows indication
of the minimum number of dimensions to force each entry into as the
second integer (the axis to concatenate along is still the first integer).

A string with three comma-separated integers allows specification of the
axis to concatenate along, the minimum number of dimensions to force the
entries to, and which axis should contain the start of the arrays which
are less than the specified number of dimensions. In other words the third
integer allows you to specify where the 1's should be placed in the shape
of the arrays that have their shapes upgraded. By default, they are placed
in the front of the shape tuple. The third argument allows you to specify
where the start of the array should be instead. Thus, a third argument of
'0' would place the 1's at the end of the array shape. Negative integers
specify where in the new shape tuple the last dimension of upgraded arrays
should be placed, so the default is '-1'.

Parameters
----------
Not a function, so takes no parameters


Returns
-------
A concatenated ndarray or matrix.

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
c_ : Translates slice objects to concatenation along the second axis.

Examples
--------
>>> np.r_[np.array([1,2,3]), 0, 0, np.array([4,5,6])]
array([1, 2, 3, ..., 4, 5, 6])
>>> np.r_[-1:1:6j, [0]*3, 5, 6]
array([-1. , -0.6, -0.2,  0.2,  0.6,  1. ,  0. ,  0. ,  0. ,  5. ,  6. ])

String integers specify the axis to concatenate along or the minimum
number of dimensions to force entries into.

>>> a = np.array([[0, 1, 2], [3, 4, 5]])
>>> np.r_['-1', a, a] # concatenate along last axis
array([[0, 1, 2, 0, 1, 2],
       [3, 4, 5, 3, 4, 5]])
>>> np.r_['0,2', [1,2,3], [4,5,6]] # concatenate along first axis, dim>=2
array([[1, 2, 3],
       [4, 5, 6]])

>>> np.r_['0,2,0', [1,2,3], [4,5,6]]
array([[1],
       [2],
       [3],
       [4],
       [5],
       [6]])
>>> np.r_['1,2,0', [1,2,3], [4,5,6]]
array([[1, 4],
       [2, 5],
       [3, 6]])

Using 'r' or 'c' as a first string argument creates a matrix.

>>> np.r_['r',[1,2,3], [4,5,6]]
matrix([[1, 2, 3, 4, 5, 6]])

---
## CClass
```python
from index_tricks import CClass
```

Translates slice objects to concatenation along the second axis.

This is short-hand for ``np.r_['-1,2,0', index expression]``, which is
useful because of its common occurrence. In particular, arrays will be
stacked along their last axis after being upgraded to at least 2-D with
1's post-pended to the shape (column vectors made out of 1-D arrays).

See Also
--------
column_stack : Stack 1-D arrays as columns into a 2-D array.
r_ : For more detailed documentation.

Examples
--------
>>> np.c_[np.array([1,2,3]), np.array([4,5,6])]
array([[1, 4],
       [2, 5],
       [3, 6]])
>>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])]
array([[1, 2, 3, ..., 4, 5, 6]])

---
## ndenumerate
```python
from index_tricks import ndenumerate
```

Multidimensional index iterator.

Return an iterator yielding pairs of array coordinates and values.

Parameters
----------
arr : ndarray
  Input array.

See Also
--------
ndindex, flatiter

Examples
--------
>>> a = np.array([[1, 2], [3, 4]])
>>> for index, x in np.ndenumerate(a):
...     print(index, x)
(0, 0) 1
(0, 1) 2
(1, 0) 3
(1, 1) 4

---
## ndindex
```python
from index_tricks import ndindex
```

An N-dimensional iterator object to index arrays.

Given the shape of an array, an `ndindex` instance iterates over
the N-dimensional index of the array. At each iteration a tuple
of indices is returned, the last dimension is iterated over first.

Parameters
----------
shape : ints, or a single tuple of ints
    The size of each dimension of the array can be passed as
    individual parameters or as the elements of a tuple.

See Also
--------
ndenumerate, flatiter

Examples
--------
Dimensions as individual arguments

>>> for index in np.ndindex(3, 2, 1):
...     print(index)
(0, 0, 0)
(0, 1, 0)
(1, 0, 0)
(1, 1, 0)
(2, 0, 0)
(2, 1, 0)

Same dimensions - but in a tuple ``(3, 2, 1)``

>>> for index in np.ndindex((3, 2, 1)):
...     print(index)
(0, 0, 0)
(0, 1, 0)
(1, 0, 0)
(1, 1, 0)
(2, 0, 0)
(2, 1, 0)

---
## IndexExpression
```python
from index_tricks import IndexExpression
```

A nicer way to build up index tuples for arrays.

.. note::
   Use one of the two predefined instances `index_exp` or `s_`
   rather than directly using `IndexExpression`.

For any index combination, including slicing and axis insertion,
``a[indices]`` is the same as ``a[np.index_exp[indices]]`` for any
array `a`. However, ``np.index_exp[indices]`` can be used anywhere
in Python code and returns a tuple of slice objects that can be
used in the construction of complex index expressions.

Parameters
----------
maketuple : bool
    If True, always returns a tuple.

See Also
--------
index_exp : Predefined instance that always returns a tuple:
   `index_exp = IndexExpression(maketuple=True)`.
s_ : Predefined instance without tuple conversion:
   `s_ = IndexExpression(maketuple=False)`.

Notes
-----
You can do all this with `slice()` plus a few special objects,
but there's a lot to remember and this version is simpler because
it uses the standard array indexing syntax.

Examples
--------
>>> np.s_[2::2]
slice(2, None, 2)
>>> np.index_exp[2::2]
(slice(2, None, 2),)

>>> np.array([0, 1, 2, 3, 4])[np.s_[2::2]]
array([2, 4])

---
## _fill_diagonal_dispatcher
```python
from index_tricks import _fill_diagonal_dispatcher
```



---
## fill_diagonal
```python
from index_tricks import fill_diagonal
```

Fill the main diagonal of the given array of any dimensionality.

For an array `a` with ``a.ndim >= 2``, the diagonal is the list of
locations with indices ``a[i, ..., i]`` all identical. This function
modifies the input array in-place, it does not return a value.

Parameters
----------
a : array, at least 2-D.
  Array whose diagonal is to be filled, it gets modified in-place.

val : scalar or array_like
  Value(s) to write on the diagonal. If `val` is scalar, the value is
  written along the diagonal. If array-like, the flattened `val` is
  written along the diagonal, repeating if necessary to fill all
  diagonal entries.

wrap : bool
  For tall matrices in NumPy version up to 1.6.2, the
  diagonal "wrapped" after N columns. You can have this behavior
  with this option. This affects only tall matrices.

See also
--------
diag_indices, diag_indices_from

Notes
-----
.. versionadded:: 1.4.0

This functionality can be obtained via `diag_indices`, but internally
this version uses a much faster implementation that never constructs the
indices and uses simple slicing.

Examples
--------
>>> a = np.zeros((3, 3), int)
>>> np.fill_diagonal(a, 5)
>>> a
array([[5, 0, 0],
       [0, 5, 0],
       [0, 0, 5]])

The same function can operate on a 4-D array:

>>> a = np.zeros((3, 3, 3, 3), int)
>>> np.fill_diagonal(a, 4)

We only show a few blocks for clarity:

>>> a[0, 0]
array([[4, 0, 0],
       [0, 0, 0],
       [0, 0, 0]])
>>> a[1, 1]
array([[0, 0, 0],
       [0, 4, 0],
       [0, 0, 0]])
>>> a[2, 2]
array([[0, 0, 0],
       [0, 0, 0],
       [0, 0, 4]])

The wrap option affects only tall matrices:

>>> # tall matrices no wrap
>>> a = np.zeros((5, 3), int)
>>> np.fill_diagonal(a, 4)
>>> a
array([[4, 0, 0],
       [0, 4, 0],
       [0, 0, 4],
       [0, 0, 0],
       [0, 0, 0]])

>>> # tall matrices wrap
>>> a = np.zeros((5, 3), int)
>>> np.fill_diagonal(a, 4, wrap=True)
>>> a
array([[4, 0, 0],
       [0, 4, 0],
       [0, 0, 4],
       [0, 0, 0],
       [4, 0, 0]])

>>> # wide matrices
>>> a = np.zeros((3, 5), int)
>>> np.fill_diagonal(a, 4, wrap=True)
>>> a
array([[4, 0, 0, 0, 0],
       [0, 4, 0, 0, 0],
       [0, 0, 4, 0, 0]])

The anti-diagonal can be filled by reversing the order of elements
using either `numpy.flipud` or `numpy.fliplr`.

>>> a = np.zeros((3, 3), int);
>>> np.fill_diagonal(np.fliplr(a), [1,2,3])  # Horizontal flip
>>> a
array([[0, 0, 1],
       [0, 2, 0],
       [3, 0, 0]])
>>> np.fill_diagonal(np.flipud(a), [1,2,3])  # Vertical flip
>>> a
array([[0, 0, 3],
       [0, 2, 0],
       [1, 0, 0]])

Note that the order in which the diagonal is filled varies depending
on the flip function.

---
## diag_indices
```python
from index_tricks import diag_indices
```

Return the indices to access the main diagonal of an array.

This returns a tuple of indices that can be used to access the main
diagonal of an array `a` with ``a.ndim >= 2`` dimensions and shape
(n, n, ..., n). For ``a.ndim = 2`` this is the usual diagonal, for
``a.ndim > 2`` this is the set of indices to access ``a[i, i, ..., i]``
for ``i = [0..n-1]``.

Parameters
----------
n : int
  The size, along each dimension, of the arrays for which the returned
  indices can be used.

ndim : int, optional
  The number of dimensions.

See Also
--------
diag_indices_from

Notes
-----
.. versionadded:: 1.4.0

Examples
--------
Create a set of indices to access the diagonal of a (4, 4) array:

>>> di = np.diag_indices(4)
>>> di
(array([0, 1, 2, 3]), array([0, 1, 2, 3]))
>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])
>>> a[di] = 100
>>> a
array([[100,   1,   2,   3],
       [  4, 100,   6,   7],
       [  8,   9, 100,  11],
       [ 12,  13,  14, 100]])

Now, we create indices to manipulate a 3-D array:

>>> d3 = np.diag_indices(2, 3)
>>> d3
(array([0, 1]), array([0, 1]), array([0, 1]))

And use it to set the diagonal of an array of zeros to 1:

>>> a = np.zeros((2, 2, 2), dtype=int)
>>> a[d3] = 1
>>> a
array([[[1, 0],
        [0, 0]],
       [[0, 0],
        [0, 1]]])

---
## _diag_indices_from
```python
from index_tricks import _diag_indices_from
```



---
## diag_indices_from
```python
from index_tricks import diag_indices_from
```

Return the indices to access the main diagonal of an n-dimensional array.

See `diag_indices` for full details.

Parameters
----------
arr : array, at least 2-D

See Also
--------
diag_indices

Notes
-----
.. versionadded:: 1.4.0

Examples
--------

Create a 4 by 4 array.

>>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])

Get the indices of the diagonal elements.

>>> di = np.diag_indices_from(a)
>>> di
(array([0, 1, 2, 3]), array([0, 1, 2, 3]))

>>> a[di]
array([ 0,  5, 10, 15])

This is simply syntactic sugar for diag_indices.

>>> np.diag_indices(a.shape[0])
(array([0, 1, 2, 3]), array([0, 1, 2, 3]))

---
## __init__
```python
from index_tricks import __init__
```



---
## __getitem__
```python
from index_tricks import __getitem__
```



---
## __len__
```python
from index_tricks import __len__
```



---
## __next__
```python
from index_tricks import __next__
```

Standard iterator method, updates the index and returns the index
tuple.

Returns
-------
val : tuple of ints
    Returns a tuple containing the indices of the current
    iteration.

---
## __iter__
```python
from index_tricks import __iter__
```



---
## ndincr
```python
from index_tricks import ndincr
```

Increment the multi-dimensional index by one.

This method is for backward compatibility only: do not use.

.. deprecated:: 1.20.0
    This method has been advised against since numpy 1.8.0, but only
    started emitting DeprecationWarning as of this version.

---
## __name__
```python
from npyio import __name__
```



---
## BagObj
```python
from npyio import BagObj
```

BagObj(obj)

Convert attribute look-ups to getitems on the object passed in.

Parameters
----------
obj : class instance
    Object on which attribute look-up is performed.

Examples
--------
>>> from numpy.lib.npyio import BagObj as BO
>>> class BagDemo:
...     def __getitem__(self, key): # An instance of BagObj(BagDemo)
...                                 # will call this method when any
...                                 # attribute look-up is required
...         result = "Doesn't matter what you want, "
...         return result + "you're gonna get this"
...
>>> demo_obj = BagDemo()
>>> bagobj = BO(demo_obj)
>>> bagobj.hello_there
"Doesn't matter what you want, you're gonna get this"
>>> bagobj.I_can_be_anything
"Doesn't matter what you want, you're gonna get this"

---
## zipfile_factory
```python
from npyio import zipfile_factory
```

Create a ZipFile.

Allows for Zip64, and the `file` argument can accept file, str, or
pathlib.Path objects. `args` and `kwargs` are passed to the zipfile.ZipFile
constructor.

---
## NpzFile
```python
from npyio import NpzFile
```

NpzFile(fid)

A dictionary-like object with lazy-loading of files in the zipped
archive provided on construction.

`NpzFile` is used to load files in the NumPy ``.npz`` data archive
format. It assumes that files in the archive have a ``.npy`` extension,
other files are ignored.

The arrays and file strings are lazily loaded on either
getitem access using ``obj['key']`` or attribute lookup using
``obj.f.key``. A list of all files (without ``.npy`` extensions) can
be obtained with ``obj.files`` and the ZipFile object itself using
``obj.zip``.

Attributes
----------
files : list of str
    List of all files in the archive with a ``.npy`` extension.
zip : ZipFile instance
    The ZipFile object initialized with the zipped archive.
f : BagObj instance
    An object on which attribute can be performed as an alternative
    to getitem access on the `NpzFile` instance itself.
allow_pickle : bool, optional
    Allow loading pickled data. Default: False

    .. versionchanged:: 1.16.3
        Made default False in response to CVE-2019-6446.

pickle_kwargs : dict, optional
    Additional keyword arguments to pass on to pickle.load.
    These are only useful when loading object arrays saved on
    Python 2 when using Python 3.
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.
    This option is ignored when `allow_pickle` is passed.  In that case
    the file is by definition trusted and the limit is unnecessary.

Parameters
----------
fid : file or str
    The zipped archive to open. This is either a file-like object
    or a string containing the path to the archive.
own_fid : bool, optional
    Whether NpzFile should close the file handle.
    Requires that `fid` is a file-like object.

Examples
--------
>>> from tempfile import TemporaryFile
>>> outfile = TemporaryFile()
>>> x = np.arange(10)
>>> y = np.sin(x)
>>> np.savez(outfile, x=x, y=y)
>>> _ = outfile.seek(0)

>>> npz = np.load(outfile)
>>> isinstance(npz, np.lib.npyio.NpzFile)
True
>>> npz
NpzFile 'object' with keys x, y
>>> sorted(npz.files)
['x', 'y']
>>> npz['x']  # getitem access
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> npz.f.x  # attribute lookup
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

---
## load
```python
from npyio import load
```

Load arrays or pickled objects from ``.npy``, ``.npz`` or pickled files.

.. warning:: Loading files that contain object arrays uses the ``pickle``
             module, which is not secure against erroneous or maliciously
             constructed data. Consider passing ``allow_pickle=False`` to
             load data that is known not to contain object arrays for the
             safer handling of untrusted sources.

Parameters
----------
file : file-like object, string, or pathlib.Path
    The file to read. File-like objects must support the
    ``seek()`` and ``read()`` methods and must always
    be opened in binary mode.  Pickled files require that the
    file-like object support the ``readline()`` method as well.
mmap_mode : {None, 'r+', 'r', 'w+', 'c'}, optional
    If not None, then memory-map the file, using the given mode (see
    `numpy.memmap` for a detailed description of the modes).  A
    memory-mapped array is kept on disk. However, it can be accessed
    and sliced like any ndarray.  Memory mapping is especially useful
    for accessing small fragments of large files without reading the
    entire file into memory.
allow_pickle : bool, optional
    Allow loading pickled object arrays stored in npy files. Reasons for
    disallowing pickles include security, as loading pickled data can
    execute arbitrary code. If pickles are disallowed, loading object
    arrays will fail. Default: False

    .. versionchanged:: 1.16.3
        Made default False in response to CVE-2019-6446.

fix_imports : bool, optional
    Only useful when loading Python 2 generated pickled files on Python 3,
    which includes npy/npz files containing object arrays. If `fix_imports`
    is True, pickle will try to map the old Python 2 names to the new names
    used in Python 3.
encoding : str, optional
    What encoding to use when reading Python 2 strings. Only useful when
    loading Python 2 generated pickled files in Python 3, which includes
    npy/npz files containing object arrays. Values other than 'latin1',
    'ASCII', and 'bytes' are not allowed, as they can corrupt numerical
    data. Default: 'ASCII'
max_header_size : int, optional
    Maximum allowed size of the header.  Large headers may not be safe
    to load securely and thus require explicitly passing a larger value.
    See :py:func:`ast.literal_eval()` for details.
    This option is ignored when `allow_pickle` is passed.  In that case
    the file is by definition trusted and the limit is unnecessary.

Returns
-------
result : array, tuple, dict, etc.
    Data stored in the file. For ``.npz`` files, the returned instance
    of NpzFile class must be closed to avoid leaking file descriptors.

Raises
------
OSError
    If the input file does not exist or cannot be read.
UnpicklingError
    If ``allow_pickle=True``, but the file cannot be loaded as a pickle.
ValueError
    The file contains an object array, but ``allow_pickle=False`` given.
EOFError
    When calling ``np.load`` multiple times on the same file handle,
    if all data has already been read

See Also
--------
save, savez, savez_compressed, loadtxt
memmap : Create a memory-map to an array stored in a file on disk.
lib.format.open_memmap : Create or load a memory-mapped ``.npy`` file.

Notes
-----
- If the file contains pickle data, then whatever object is stored
  in the pickle is returned.
- If the file is a ``.npy`` file, then a single array is returned.
- If the file is a ``.npz`` file, then a dictionary-like object is
  returned, containing ``{filename: array}`` key-value pairs, one for
  each file in the archive.
- If the file is a ``.npz`` file, the returned value supports the
  context manager protocol in a similar fashion to the open function::

    with load('foo.npz') as data:
        a = data['a']

  The underlying file descriptor is closed when exiting the 'with'
  block.

Examples
--------
Store data to disk, and load it again:

>>> np.save('/tmp/123', np.array([[1, 2, 3], [4, 5, 6]]))
>>> np.load('/tmp/123.npy')
array([[1, 2, 3],
       [4, 5, 6]])

Store compressed data to disk, and load it again:

>>> a=np.array([[1, 2, 3], [4, 5, 6]])
>>> b=np.array([1, 2])
>>> np.savez('/tmp/123.npz', a=a, b=b)
>>> data = np.load('/tmp/123.npz')
>>> data['a']
array([[1, 2, 3],
       [4, 5, 6]])
>>> data['b']
array([1, 2])
>>> data.close()

Mem-map the stored array, and then access the second row
directly from disk:

>>> X = np.load('/tmp/123.npy', mmap_mode='r')
>>> X[1, :]
memmap([4, 5, 6])

---
## _save_dispatcher
```python
from npyio import _save_dispatcher
```



---
## save
```python
from npyio import save
```

Save an array to a binary file in NumPy ``.npy`` format.

Parameters
----------
file : file, str, or pathlib.Path
    File or filename to which the data is saved.  If file is a file-object,
    then the filename is unchanged.  If file is a string or Path, a ``.npy``
    extension will be appended to the filename if it does not already
    have one.
arr : array_like
    Array data to be saved.
allow_pickle : bool, optional
    Allow saving object arrays using Python pickles. Reasons for disallowing
    pickles include security (loading pickled data can execute arbitrary
    code) and portability (pickled objects may not be loadable on different
    Python installations, for example if the stored objects require libraries
    that are not available, and not all pickled data is compatible between
    Python 2 and Python 3).
    Default: True
fix_imports : bool, optional
    Only useful in forcing objects in object arrays on Python 3 to be
    pickled in a Python 2 compatible way. If `fix_imports` is True, pickle
    will try to map the new Python 3 names to the old module names used in
    Python 2, so that the pickle data stream is readable with Python 2.

See Also
--------
savez : Save several arrays into a ``.npz`` archive
savetxt, load

Notes
-----
For a description of the ``.npy`` format, see :py:mod:`numpy.lib.format`.

Any data saved to the file is appended to the end of the file.

Examples
--------
>>> from tempfile import TemporaryFile
>>> outfile = TemporaryFile()

>>> x = np.arange(10)
>>> np.save(outfile, x)

>>> _ = outfile.seek(0) # Only needed here to simulate closing & reopening file
>>> np.load(outfile)
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])


>>> with open('test.npy', 'wb') as f:
...     np.save(f, np.array([1, 2]))
...     np.save(f, np.array([1, 3]))
>>> with open('test.npy', 'rb') as f:
...     a = np.load(f)
...     b = np.load(f)
>>> print(a, b)
# [1 2] [1 3]

---
## _savez_dispatcher
```python
from npyio import _savez_dispatcher
```



---
## savez
```python
from npyio import savez
```

Save several arrays into a single file in uncompressed ``.npz`` format.

Provide arrays as keyword arguments to store them under the
corresponding name in the output file: ``savez(fn, x=x, y=y)``.

If arrays are specified as positional arguments, i.e., ``savez(fn,
x, y)``, their names will be `arr_0`, `arr_1`, etc.

Parameters
----------
file : str or file
    Either the filename (string) or an open file (file-like object)
    where the data will be saved. If file is a string or a Path, the
    ``.npz`` extension will be appended to the filename if it is not
    already there.
args : Arguments, optional
    Arrays to save to the file. Please use keyword arguments (see
    `kwds` below) to assign names to arrays.  Arrays specified as
    args will be named "arr_0", "arr_1", and so on.
kwds : Keyword arguments, optional
    Arrays to save to the file. Each array will be saved to the
    output file with its corresponding keyword name.

Returns
-------
None

See Also
--------
save : Save a single array to a binary file in NumPy format.
savetxt : Save an array to a file as plain text.
savez_compressed : Save several arrays into a compressed ``.npz`` archive

Notes
-----
The ``.npz`` file format is a zipped archive of files named after the
variables they contain.  The archive is not compressed and each file
in the archive contains one variable in ``.npy`` format. For a
description of the ``.npy`` format, see :py:mod:`numpy.lib.format`.

When opening the saved ``.npz`` file with `load` a `NpzFile` object is
returned. This is a dictionary-like object which can be queried for
its list of arrays (with the ``.files`` attribute), and for the arrays
themselves.

Keys passed in `kwds` are used as filenames inside the ZIP archive.
Therefore, keys should be valid filenames; e.g., avoid keys that begin with
``/`` or contain ``.``.

When naming variables with keyword arguments, it is not possible to name a
variable ``file``, as this would cause the ``file`` argument to be defined
twice in the call to ``savez``.

Examples
--------
>>> from tempfile import TemporaryFile
>>> outfile = TemporaryFile()
>>> x = np.arange(10)
>>> y = np.sin(x)

Using `savez` with \*args, the arrays are saved with default names.

>>> np.savez(outfile, x, y)
>>> _ = outfile.seek(0) # Only needed here to simulate closing & reopening file
>>> npzfile = np.load(outfile)
>>> npzfile.files
['arr_0', 'arr_1']
>>> npzfile['arr_0']
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

Using `savez` with \**kwds, the arrays are saved with the keyword names.

>>> outfile = TemporaryFile()
>>> np.savez(outfile, x=x, y=y)
>>> _ = outfile.seek(0)
>>> npzfile = np.load(outfile)
>>> sorted(npzfile.files)
['x', 'y']
>>> npzfile['x']
array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

---
## _savez_compressed_dispatcher
```python
from npyio import _savez_compressed_dispatcher
```



---
## savez_compressed
```python
from npyio import savez_compressed
```

Save several arrays into a single file in compressed ``.npz`` format.

Provide arrays as keyword arguments to store them under the
corresponding name in the output file: ``savez(fn, x=x, y=y)``.

If arrays are specified as positional arguments, i.e., ``savez(fn,
x, y)``, their names will be `arr_0`, `arr_1`, etc.

Parameters
----------
file : str or file
    Either the filename (string) or an open file (file-like object)
    where the data will be saved. If file is a string or a Path, the
    ``.npz`` extension will be appended to the filename if it is not
    already there.
args : Arguments, optional
    Arrays to save to the file. Please use keyword arguments (see
    `kwds` below) to assign names to arrays.  Arrays specified as
    args will be named "arr_0", "arr_1", and so on.
kwds : Keyword arguments, optional
    Arrays to save to the file. Each array will be saved to the
    output file with its corresponding keyword name.

Returns
-------
None

See Also
--------
numpy.save : Save a single array to a binary file in NumPy format.
numpy.savetxt : Save an array to a file as plain text.
numpy.savez : Save several arrays into an uncompressed ``.npz`` file format
numpy.load : Load the files created by savez_compressed.

Notes
-----
The ``.npz`` file format is a zipped archive of files named after the
variables they contain.  The archive is compressed with
``zipfile.ZIP_DEFLATED`` and each file in the archive contains one variable
in ``.npy`` format. For a description of the ``.npy`` format, see
:py:mod:`numpy.lib.format`.


When opening the saved ``.npz`` file with `load` a `NpzFile` object is
returned. This is a dictionary-like object which can be queried for
its list of arrays (with the ``.files`` attribute), and for the arrays
themselves.

Examples
--------
>>> test_array = np.random.rand(3, 2)
>>> test_vector = np.random.rand(4)
>>> np.savez_compressed('/tmp/123', a=test_array, b=test_vector)
>>> loaded = np.load('/tmp/123.npz')
>>> print(np.array_equal(test_array, loaded['a']))
True
>>> print(np.array_equal(test_vector, loaded['b']))
True

---
## _savez
```python
from npyio import _savez
```



---
## _ensure_ndmin_ndarray_check_param
```python
from npyio import _ensure_ndmin_ndarray_check_param
```

Just checks if the param ndmin is supported on
_ensure_ndmin_ndarray. It is intended to be used as
verification before running anything expensive.
e.g. loadtxt, genfromtxt

---
## _ensure_ndmin_ndarray
```python
from npyio import _ensure_ndmin_ndarray
```

This is a helper function of loadtxt and genfromtxt to ensure
proper minimum dimension as requested

ndim : int. Supported values 1, 2, 3
            ^^ whenever this changes, keep in sync with
               _ensure_ndmin_ndarray_check_param

---
## _check_nonneg_int
```python
from npyio import _check_nonneg_int
```



---
## _preprocess_comments
```python
from npyio import _preprocess_comments
```

Generator that consumes a line iterated iterable and strips out the
multiple (or multi-character) comments from lines.
This is a pre-processing step to achieve feature parity with loadtxt
(we assume that this feature is a nieche feature).

---
## _read
```python
from npyio import _read
```

Read a NumPy array from a text file.

Parameters
----------
fname : str or file object
    The filename or the file to be read.
delimiter : str, optional
    Field delimiter of the fields in line of the file.
    Default is a comma, ','.  If None any sequence of whitespace is
    considered a delimiter.
comment : str or sequence of str or None, optional
    Character that begins a comment.  All text from the comment
    character to the end of the line is ignored.
    Multiple comments or multiple-character comment strings are supported,
    but may be slower and `quote` must be empty if used.
    Use None to disable all use of comments.
quote : str or None, optional
    Character that is used to quote string fields. Default is '"'
    (a double quote). Use None to disable quote support.
imaginary_unit : str, optional
    Character that represent the imaginay unit `sqrt(-1)`.
    Default is 'j'.
usecols : array_like, optional
    A one-dimensional array of integer column numbers.  These are the
    columns from the file to be included in the array.  If this value
    is not given, all the columns are used.
skiplines : int, optional
    Number of lines to skip before interpreting the data in the file.
max_rows : int, optional
    Maximum number of rows of data to read.  Default is to read the
    entire file.
converters : dict or callable, optional
    A function to parse all columns strings into the desired value, or
    a dictionary mapping column number to a parser function.
    E.g. if column 0 is a date string: ``converters = {0: datestr2num}``.
    Converters can also be used to provide a default value for missing
    data, e.g. ``converters = lambda s: float(s.strip() or 0)`` will
    convert empty fields to 0.
    Default: None
ndmin : int, optional
    Minimum dimension of the array returned.
    Allowed values are 0, 1 or 2.  Default is 0.
unpack : bool, optional
    If True, the returned array is transposed, so that arguments may be
    unpacked using ``x, y, z = read(...)``.  When used with a structured
    data-type, arrays are returned for each field.  Default is False.
dtype : numpy data type
    A NumPy dtype instance, can be a structured dtype to map to the
    columns of the file.
encoding : str, optional
    Encoding used to decode the inputfile. The special value 'bytes'
    (the default) enables backwards-compatible behavior for `converters`,
    ensuring that inputs to the converter functions are encoded
    bytes objects. The special value 'bytes' has no additional effect if
    ``converters=None``. If encoding is ``'bytes'`` or ``None``, the
    default system encoding is used.

Returns
-------
ndarray
    NumPy array.

Examples
--------
First we create a file for the example.

>>> s1 = '1.0,2.0,3.0\n4.0,5.0,6.0\n'
>>> with open('example1.csv', 'w') as f:
...     f.write(s1)
>>> a1 = read_from_filename('example1.csv')
>>> a1
array([[1., 2., 3.],
       [4., 5., 6.]])

The second example has columns with different data types, so a
one-dimensional array with a structured data type is returned.
The tab character is used as the field delimiter.

>>> s2 = '1.0\t10\talpha\n2.3\t25\tbeta\n4.5\t16\tgamma\n'
>>> with open('example2.tsv', 'w') as f:
...     f.write(s2)
>>> a2 = read_from_filename('example2.tsv', delimiter='\t')
>>> a2
array([(1. , 10, b'alpha'), (2.3, 25, b'beta'), (4.5, 16, b'gamma')],
      dtype=[('f0', '<f8'), ('f1', 'u1'), ('f2', 'S5')])

---
## loadtxt
```python
from npyio import loadtxt
```

Load data from a text file.

Parameters
----------
fname : file, str, pathlib.Path, list of str, generator
    File, filename, list, or generator to read.  If the filename
    extension is ``.gz`` or ``.bz2``, the file is first decompressed. Note
    that generators must return bytes or strings. The strings
    in a list or produced by a generator are treated as lines.
dtype : data-type, optional
    Data-type of the resulting array; default: float.  If this is a
    structured data-type, the resulting array will be 1-dimensional, and
    each row will be interpreted as an element of the array.  In this
    case, the number of columns used must match the number of fields in
    the data-type.
comments : str or sequence of str or None, optional
    The characters or list of characters used to indicate the start of a
    comment. None implies no comments. For backwards compatibility, byte
    strings will be decoded as 'latin1'. The default is '#'.
delimiter : str, optional
    The character used to separate the values. For backwards compatibility,
    byte strings will be decoded as 'latin1'. The default is whitespace.

    .. versionchanged:: 1.23.0
       Only single character delimiters are supported. Newline characters
       cannot be used as the delimiter.

converters : dict or callable, optional
    Converter functions to customize value parsing. If `converters` is
    callable, the function is applied to all columns, else it must be a
    dict that maps column number to a parser function.
    See examples for further details.
    Default: None.

    .. versionchanged:: 1.23.0
       The ability to pass a single callable to be applied to all columns
       was added.

skiprows : int, optional
    Skip the first `skiprows` lines, including comments; default: 0.
usecols : int or sequence, optional
    Which columns to read, with 0 being the first. For example,
    ``usecols = (1,4,5)`` will extract the 2nd, 5th and 6th columns.
    The default, None, results in all columns being read.

    .. versionchanged:: 1.11.0
        When a single column has to be read it is possible to use
        an integer instead of a tuple. E.g ``usecols = 3`` reads the
        fourth column the same way as ``usecols = (3,)`` would.
unpack : bool, optional
    If True, the returned array is transposed, so that arguments may be
    unpacked using ``x, y, z = loadtxt(...)``.  When used with a
    structured data-type, arrays are returned for each field.
    Default is False.
ndmin : int, optional
    The returned array will have at least `ndmin` dimensions.
    Otherwise mono-dimensional axes will be squeezed.
    Legal values: 0 (default), 1 or 2.

    .. versionadded:: 1.6.0
encoding : str, optional
    Encoding used to decode the inputfile. Does not apply to input streams.
    The special value 'bytes' enables backward compatibility workarounds
    that ensures you receive byte arrays as results if possible and passes
    'latin1' encoded strings to converters. Override this value to receive
    unicode arrays and pass strings as input to converters.  If set to None
    the system default is used. The default value is 'bytes'.

    .. versionadded:: 1.14.0
max_rows : int, optional
    Read `max_rows` rows of content after `skiprows` lines. The default is
    to read all the rows. Note that empty rows containing no data such as
    empty lines and comment lines are not counted towards `max_rows`,
    while such lines are counted in `skiprows`.

    .. versionadded:: 1.16.0

    .. versionchanged:: 1.23.0
        Lines containing no data, including comment lines (e.g., lines
        starting with '#' or as specified via `comments`) are not counted
        towards `max_rows`.
quotechar : unicode character or None, optional
    The character used to denote the start and end of a quoted item.
    Occurrences of the delimiter or comment characters are ignored within
    a quoted item. The default value is ``quotechar=None``, which means
    quoting support is disabled.

    If two consecutive instances of `quotechar` are found within a quoted
    field, the first is treated as an escape character. See examples.

    .. versionadded:: 1.23.0
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    Data read from the text file.

See Also
--------
load, fromstring, fromregex
genfromtxt : Load data with missing values handled as specified.
scipy.io.loadmat : reads MATLAB data files

Notes
-----
This function aims to be a fast reader for simply formatted files.  The
`genfromtxt` function provides more sophisticated handling of, e.g.,
lines with missing values.

Each row in the input text file must have the same number of values to be
able to read all values. If all rows do not have same number of values, a
subset of up to n columns (where n is the least number of values present
in all rows) can be read by specifying the columns via `usecols`.

.. versionadded:: 1.10.0

The strings produced by the Python float.hex method can be used as
input for floats.

Examples
--------
>>> from io import StringIO   # StringIO behaves like a file object
>>> c = StringIO("0 1\n2 3")
>>> np.loadtxt(c)
array([[0., 1.],
       [2., 3.]])

>>> d = StringIO("M 21 72\nF 35 58")
>>> np.loadtxt(d, dtype={'names': ('gender', 'age', 'weight'),
...                      'formats': ('S1', 'i4', 'f4')})
array([(b'M', 21, 72.), (b'F', 35, 58.)],
      dtype=[('gender', 'S1'), ('age', '<i4'), ('weight', '<f4')])

>>> c = StringIO("1,0,2\n3,0,4")
>>> x, y = np.loadtxt(c, delimiter=',', usecols=(0, 2), unpack=True)
>>> x
array([1., 3.])
>>> y
array([2., 4.])

The `converters` argument is used to specify functions to preprocess the
text prior to parsing. `converters` can be a dictionary that maps
preprocessing functions to each column:

>>> s = StringIO("1.618, 2.296\n3.141, 4.669\n")
>>> conv = {
...     0: lambda x: np.floor(float(x)),  # conversion fn for column 0
...     1: lambda x: np.ceil(float(x)),  # conversion fn for column 1
... }
>>> np.loadtxt(s, delimiter=",", converters=conv)
array([[1., 3.],
       [3., 5.]])

`converters` can be a callable instead of a dictionary, in which case it
is applied to all columns:

>>> s = StringIO("0xDE 0xAD\n0xC0 0xDE")
>>> import functools
>>> conv = functools.partial(int, base=16)
>>> np.loadtxt(s, converters=conv)
array([[222., 173.],
       [192., 222.]])

This example shows how `converters` can be used to convert a field
with a trailing minus sign into a negative number.

>>> s = StringIO('10.01 31.25-\n19.22 64.31\n17.57- 63.94')
>>> def conv(fld):
...     return -float(fld[:-1]) if fld.endswith(b'-') else float(fld)
...
>>> np.loadtxt(s, converters=conv)
array([[ 10.01, -31.25],
       [ 19.22,  64.31],
       [-17.57,  63.94]])

Using a callable as the converter can be particularly useful for handling
values with different formatting, e.g. floats with underscores:

>>> s = StringIO("1 2.7 100_000")
>>> np.loadtxt(s, converters=float)
array([1.e+00, 2.7e+00, 1.e+05])

This idea can be extended to automatically handle values specified in
many different formats:

>>> def conv(val):
...     try:
...         return float(val)
...     except ValueError:
...         return float.fromhex(val)
>>> s = StringIO("1, 2.5, 3_000, 0b4, 0x1.4000000000000p+2")
>>> np.loadtxt(s, delimiter=",", converters=conv, encoding=None)
array([1.0e+00, 2.5e+00, 3.0e+03, 1.8e+02, 5.0e+00])

Note that with the default ``encoding="bytes"``, the inputs to the
converter function are latin-1 encoded byte strings. To deactivate the
implicit encoding prior to conversion, use ``encoding=None``

>>> s = StringIO('10.01 31.25-\n19.22 64.31\n17.57- 63.94')
>>> conv = lambda x: -float(x[:-1]) if x.endswith('-') else float(x)
>>> np.loadtxt(s, converters=conv, encoding=None)
array([[ 10.01, -31.25],
       [ 19.22,  64.31],
       [-17.57,  63.94]])

Support for quoted fields is enabled with the `quotechar` parameter.
Comment and delimiter characters are ignored when they appear within a
quoted item delineated by `quotechar`:

>>> s = StringIO('"alpha, #42", 10.0\n"beta, #64", 2.0\n')
>>> dtype = np.dtype([("label", "U12"), ("value", float)])
>>> np.loadtxt(s, dtype=dtype, delimiter=",", quotechar='"')
array([('alpha, #42', 10.), ('beta, #64',  2.)],
      dtype=[('label', '<U12'), ('value', '<f8')])

Quoted fields can be separated by multiple whitespace characters:

>>> s = StringIO('"alpha, #42"       10.0\n"beta, #64" 2.0\n')
>>> dtype = np.dtype([("label", "U12"), ("value", float)])
>>> np.loadtxt(s, dtype=dtype, delimiter=None, quotechar='"')
array([('alpha, #42', 10.), ('beta, #64',  2.)],
      dtype=[('label', '<U12'), ('value', '<f8')])

Two consecutive quote characters within a quoted field are treated as a
single escaped character:

>>> s = StringIO('"Hello, my name is ""Monty""!"')
>>> np.loadtxt(s, dtype="U", delimiter=",", quotechar='"')
array('Hello, my name is "Monty"!', dtype='<U26')

Read subset of columns when all rows do not contain equal number of values:

>>> d = StringIO("1 2\n2 4\n3 9 12\n4 16 20")
>>> np.loadtxt(d, usecols=(0, 1))
array([[ 1.,  2.],
       [ 2.,  4.],
       [ 3.,  9.],
       [ 4., 16.]])

---
## _savetxt_dispatcher
```python
from npyio import _savetxt_dispatcher
```



---
## savetxt
```python
from npyio import savetxt
```

Save an array to a text file.

Parameters
----------
fname : filename or file handle
    If the filename ends in ``.gz``, the file is automatically saved in
    compressed gzip format.  `loadtxt` understands gzipped files
    transparently.
X : 1D or 2D array_like
    Data to be saved to a text file.
fmt : str or sequence of strs, optional
    A single format (%10.5f), a sequence of formats, or a
    multi-format string, e.g. 'Iteration %d -- %10.5f', in which
    case `delimiter` is ignored. For complex `X`, the legal options
    for `fmt` are:

    * a single specifier, `fmt='%.4e'`, resulting in numbers formatted
      like `' (%s+%sj)' % (fmt, fmt)`
    * a full string specifying every real and imaginary part, e.g.
      `' %.4e %+.4ej %.4e %+.4ej %.4e %+.4ej'` for 3 columns
    * a list of specifiers, one per column - in this case, the real
      and imaginary part must have separate specifiers,
      e.g. `['%.3e + %.3ej', '(%.15e%+.15ej)']` for 2 columns
delimiter : str, optional
    String or character separating columns.
newline : str, optional
    String or character separating lines.

    .. versionadded:: 1.5.0
header : str, optional
    String that will be written at the beginning of the file.

    .. versionadded:: 1.7.0
footer : str, optional
    String that will be written at the end of the file.

    .. versionadded:: 1.7.0
comments : str, optional
    String that will be prepended to the ``header`` and ``footer`` strings,
    to mark them as comments. Default: '# ',  as expected by e.g.
    ``numpy.loadtxt``.

    .. versionadded:: 1.7.0
encoding : {None, str}, optional
    Encoding used to encode the outputfile. Does not apply to output
    streams. If the encoding is something other than 'bytes' or 'latin1'
    you will not be able to load the file in NumPy versions < 1.14. Default
    is 'latin1'.

    .. versionadded:: 1.14.0


See Also
--------
save : Save an array to a binary file in NumPy ``.npy`` format
savez : Save several arrays into an uncompressed ``.npz`` archive
savez_compressed : Save several arrays into a compressed ``.npz`` archive

Notes
-----
Further explanation of the `fmt` parameter
(``%[flag]width[.precision]specifier``):

flags:
    ``-`` : left justify

    ``+`` : Forces to precede result with + or -.

    ``0`` : Left pad the number with zeros instead of space (see width).

width:
    Minimum number of characters to be printed. The value is not truncated
    if it has more characters.

precision:
    - For integer specifiers (eg. ``d,i,o,x``), the minimum number of
      digits.
    - For ``e, E`` and ``f`` specifiers, the number of digits to print
      after the decimal point.
    - For ``g`` and ``G``, the maximum number of significant digits.
    - For ``s``, the maximum number of characters.

specifiers:
    ``c`` : character

    ``d`` or ``i`` : signed decimal integer

    ``e`` or ``E`` : scientific notation with ``e`` or ``E``.

    ``f`` : decimal floating point

    ``g,G`` : use the shorter of ``e,E`` or ``f``

    ``o`` : signed octal

    ``s`` : string of characters

    ``u`` : unsigned decimal integer

    ``x,X`` : unsigned hexadecimal integer

This explanation of ``fmt`` is not complete, for an exhaustive
specification see [1]_.

References
----------
.. [1] `Format Specification Mini-Language
       <https://docs.python.org/library/string.html#format-specification-mini-language>`_,
       Python Documentation.

Examples
--------
>>> x = y = z = np.arange(0.0,5.0,1.0)
>>> np.savetxt('test.out', x, delimiter=',')   # X is an array
>>> np.savetxt('test.out', (x,y,z))   # x,y,z equal sized 1D arrays
>>> np.savetxt('test.out', x, fmt='%1.4e')   # use exponential notation

---
## fromregex
```python
from npyio import fromregex
```

Construct an array from a text file, using regular expression parsing.

The returned array is always a structured array, and is constructed from
all matches of the regular expression in the file. Groups in the regular
expression are converted to fields of the structured array.

Parameters
----------
file : path or file
    Filename or file object to read.

    .. versionchanged:: 1.22.0
        Now accepts `os.PathLike` implementations.
regexp : str or regexp
    Regular expression used to parse the file.
    Groups in the regular expression correspond to fields in the dtype.
dtype : dtype or list of dtypes
    Dtype for the structured array; must be a structured datatype.
encoding : str, optional
    Encoding used to decode the inputfile. Does not apply to input streams.

    .. versionadded:: 1.14.0

Returns
-------
output : ndarray
    The output array, containing the part of the content of `file` that
    was matched by `regexp`. `output` is always a structured array.

Raises
------
TypeError
    When `dtype` is not a valid dtype for a structured array.

See Also
--------
fromstring, loadtxt

Notes
-----
Dtypes for structured arrays can be specified in several forms, but all
forms specify at least the data type and field name. For details see
`basics.rec`.

Examples
--------
>>> from io import StringIO
>>> text = StringIO("1312 foo\n1534  bar\n444   qux")

>>> regexp = r"(\d+)\s+(...)"  # match [digits, whitespace, anything]
>>> output = np.fromregex(text, regexp,
...                       [('num', np.int64), ('key', 'S3')])
>>> output
array([(1312, b'foo'), (1534, b'bar'), ( 444, b'qux')],
      dtype=[('num', '<i8'), ('key', 'S3')])
>>> output['num']
array([1312, 1534,  444])

---
## genfromtxt
```python
from npyio import genfromtxt
```

Load data from a text file, with missing values handled as specified.

Each line past the first `skip_header` lines is split at the `delimiter`
character, and characters following the `comments` character are discarded.

Parameters
----------
fname : file, str, pathlib.Path, list of str, generator
    File, filename, list, or generator to read.  If the filename
    extension is ``.gz`` or ``.bz2``, the file is first decompressed. Note
    that generators must return bytes or strings. The strings
    in a list or produced by a generator are treated as lines.
dtype : dtype, optional
    Data type of the resulting array.
    If None, the dtypes will be determined by the contents of each
    column, individually.
comments : str, optional
    The character used to indicate the start of a comment.
    All the characters occurring on a line after a comment are discarded.
delimiter : str, int, or sequence, optional
    The string used to separate values.  By default, any consecutive
    whitespaces act as delimiter.  An integer or sequence of integers
    can also be provided as width(s) of each field.
skiprows : int, optional
    `skiprows` was removed in numpy 1.10. Please use `skip_header` instead.
skip_header : int, optional
    The number of lines to skip at the beginning of the file.
skip_footer : int, optional
    The number of lines to skip at the end of the file.
converters : variable, optional
    The set of functions that convert the data of a column to a value.
    The converters can also be used to provide a default value
    for missing data: ``converters = {3: lambda s: float(s or 0)}``.
missing : variable, optional
    `missing` was removed in numpy 1.10. Please use `missing_values`
    instead.
missing_values : variable, optional
    The set of strings corresponding to missing data.
filling_values : variable, optional
    The set of values to be used as default when the data are missing.
usecols : sequence, optional
    Which columns to read, with 0 being the first.  For example,
    ``usecols = (1, 4, 5)`` will extract the 2nd, 5th and 6th columns.
names : {None, True, str, sequence}, optional
    If `names` is True, the field names are read from the first line after
    the first `skip_header` lines. This line can optionally be preceded
    by a comment delimiter. If `names` is a sequence or a single-string of
    comma-separated names, the names will be used to define the field names
    in a structured dtype. If `names` is None, the names of the dtype
    fields will be used, if any.
excludelist : sequence, optional
    A list of names to exclude. This list is appended to the default list
    ['return','file','print']. Excluded names are appended with an
    underscore: for example, `file` would become `file_`.
deletechars : str, optional
    A string combining invalid characters that must be deleted from the
    names.
defaultfmt : str, optional
    A format used to define default field names, such as "f%i" or "f_%02i".
autostrip : bool, optional
    Whether to automatically strip white spaces from the variables.
replace_space : char, optional
    Character(s) used in replacement of white spaces in the variable
    names. By default, use a '_'.
case_sensitive : {True, False, 'upper', 'lower'}, optional
    If True, field names are case sensitive.
    If False or 'upper', field names are converted to upper case.
    If 'lower', field names are converted to lower case.
unpack : bool, optional
    If True, the returned array is transposed, so that arguments may be
    unpacked using ``x, y, z = genfromtxt(...)``.  When used with a
    structured data-type, arrays are returned for each field.
    Default is False.
usemask : bool, optional
    If True, return a masked array.
    If False, return a regular array.
loose : bool, optional
    If True, do not raise errors for invalid values.
invalid_raise : bool, optional
    If True, an exception is raised if an inconsistency is detected in the
    number of columns.
    If False, a warning is emitted and the offending lines are skipped.
max_rows : int,  optional
    The maximum number of rows to read. Must not be used with skip_footer
    at the same time.  If given, the value must be at least 1. Default is
    to read the entire file.

    .. versionadded:: 1.10.0
encoding : str, optional
    Encoding used to decode the inputfile. Does not apply when `fname` is
    a file object.  The special value 'bytes' enables backward compatibility
    workarounds that ensure that you receive byte arrays when possible
    and passes latin1 encoded strings to converters. Override this value to
    receive unicode arrays and pass strings as input to converters.  If set
    to None the system default is used. The default value is 'bytes'.

    .. versionadded:: 1.14.0
ndmin : int, optional
    Same parameter as `loadtxt`

    .. versionadded:: 1.23.0
${ARRAY_FUNCTION_LIKE}

    .. versionadded:: 1.20.0

Returns
-------
out : ndarray
    Data read from the text file. If `usemask` is True, this is a
    masked array.

See Also
--------
numpy.loadtxt : equivalent function when no data is missing.

Notes
-----
* When spaces are used as delimiters, or when no delimiter has been given
  as input, there should not be any missing data between two fields.
* When the variables are named (either by a flexible dtype or with `names`),
  there must not be any header in the file (else a ValueError
  exception is raised).
* Individual values are not stripped of spaces by default.
  When using a custom converter, make sure the function does remove spaces.

References
----------
.. [1] NumPy User Guide, section `I/O with NumPy
       <https://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html>`_.

Examples
--------
>>> from io import StringIO
>>> import numpy as np

Comma delimited file with mixed dtype

>>> s = StringIO(u"1,1.3,abcde")
>>> data = np.genfromtxt(s, dtype=[('myint','i8'),('myfloat','f8'),
... ('mystring','S5')], delimiter=",")
>>> data
array((1, 1.3, b'abcde'),
      dtype=[('myint', '<i8'), ('myfloat', '<f8'), ('mystring', 'S5')])

Using dtype = None

>>> _ = s.seek(0) # needed for StringIO example only
>>> data = np.genfromtxt(s, dtype=None,
... names = ['myint','myfloat','mystring'], delimiter=",")
>>> data
array((1, 1.3, b'abcde'),
      dtype=[('myint', '<i8'), ('myfloat', '<f8'), ('mystring', 'S5')])

Specifying dtype and names

>>> _ = s.seek(0)
>>> data = np.genfromtxt(s, dtype="i8,f8,S5",
... names=['myint','myfloat','mystring'], delimiter=",")
>>> data
array((1, 1.3, b'abcde'),
      dtype=[('myint', '<i8'), ('myfloat', '<f8'), ('mystring', 'S5')])

An example with fixed-width columns

>>> s = StringIO(u"11.3abcde")
>>> data = np.genfromtxt(s, dtype=None, names=['intvar','fltvar','strvar'],
...     delimiter=[1,3,5])
>>> data
array((1, 1.3, b'abcde'),
      dtype=[('intvar', '<i8'), ('fltvar', '<f8'), ('strvar', 'S5')])

An example to show comments

>>> f = StringIO('''
... text,# of chars
... hello world,11
... numpy,5''')
>>> np.genfromtxt(f, dtype='S12,S12', delimiter=',')
array([(b'text', b''), (b'hello world', b'11'), (b'numpy', b'5')],
  dtype=[('f0', 'S12'), ('f1', 'S12')])

---
## recfromtxt
```python
from npyio import recfromtxt
```

Load ASCII data from a file and return it in a record array.

If ``usemask=False`` a standard `recarray` is returned,
if ``usemask=True`` a MaskedRecords array is returned.

Parameters
----------
fname, kwargs : For a description of input parameters, see `genfromtxt`.

See Also
--------
numpy.genfromtxt : generic function

Notes
-----
By default, `dtype` is None, which means that the data-type of the output
array will be determined from the data.

---
## recfromcsv
```python
from npyio import recfromcsv
```

Load ASCII data stored in a comma-separated file.

The returned array is a record array (if ``usemask=False``, see
`recarray`) or a masked record array (if ``usemask=True``,
see `ma.mrecords.MaskedRecords`).

Parameters
----------
fname, kwargs : For a description of input parameters, see `genfromtxt`.

See Also
--------
numpy.genfromtxt : generic function to load ASCII data.

Notes
-----
By default, `dtype` is None, which means that the data-type of the output
array will be determined from the data.

---
## __init__
```python
from npyio import __init__
```



---
## __getattribute__
```python
from npyio import __getattribute__
```



---
## __dir__
```python
from npyio import __dir__
```

Enables dir(bagobj) to list the files in an NpzFile.

This also enables tab-completion in an interpreter or IPython.

---
## __enter__
```python
from npyio import __enter__
```



---
## __exit__
```python
from npyio import __exit__
```



---
## close
```python
from npyio import close
```



---
## __del__
```python
from npyio import __del__
```



---
## __iter__
```python
from npyio import __iter__
```



---
## __len__
```python
from npyio import __len__
```



---
## __getitem__
```python
from npyio import __getitem__
```



---
## __contains__
```python
from npyio import __contains__
```



---
## __repr__
```python
from npyio import __repr__
```



---
## WriteWrap
```python
from npyio import WriteWrap
```

Convert to bytes on bytestream inputs.

        

---
## write
```python
from npyio import write
```



---
## write_bytes
```python
from npyio import write_bytes
```



---
## write_normal
```python
from npyio import write_normal
```



---
## first_write
```python
from npyio import first_write
```



---
## encode_unicode_cols
```python
from npyio import encode_unicode_cols
```



---
## tobytes_first
```python
from npyio import tobytes_first
```



---
## _make_along_axis_idx
```python
from shape_base import _make_along_axis_idx
```



---
## _take_along_axis_dispatcher
```python
from shape_base import _take_along_axis_dispatcher
```



---
## take_along_axis
```python
from shape_base import take_along_axis
```

Take values from the input array by matching 1d index and data slices.

This iterates over matching 1d slices oriented along the specified axis in
the index and data arrays, and uses the former to look up values in the
latter. These slices can be different lengths.

Functions returning an index along an axis, like `argsort` and
`argpartition`, produce suitable indices for this function.

.. versionadded:: 1.15.0

Parameters
----------
arr : ndarray (Ni..., M, Nk...)
    Source array
indices : ndarray (Ni..., J, Nk...)
    Indices to take along each 1d slice of `arr`. This must match the
    dimension of arr, but dimensions Ni and Nj only need to broadcast
    against `arr`.
axis : int
    The axis to take 1d slices along. If axis is None, the input array is
    treated as if it had first been flattened to 1d, for consistency with
    `sort` and `argsort`.

Returns
-------
out: ndarray (Ni..., J, Nk...)
    The indexed result.

Notes
-----
This is equivalent to (but faster than) the following use of `ndindex` and
`s_`, which sets each of ``ii`` and ``kk`` to a tuple of indices::

    Ni, M, Nk = a.shape[:axis], a.shape[axis], a.shape[axis+1:]
    J = indices.shape[axis]  # Need not equal M
    out = np.empty(Ni + (J,) + Nk)

    for ii in ndindex(Ni):
        for kk in ndindex(Nk):
            a_1d       = a      [ii + s_[:,] + kk]
            indices_1d = indices[ii + s_[:,] + kk]
            out_1d     = out    [ii + s_[:,] + kk]
            for j in range(J):
                out_1d[j] = a_1d[indices_1d[j]]

Equivalently, eliminating the inner loop, the last two lines would be::

            out_1d[:] = a_1d[indices_1d]

See Also
--------
take : Take along an axis, using the same indices for every 1d slice
put_along_axis :
    Put values into the destination array by matching 1d index and data slices

Examples
--------

For this sample array

>>> a = np.array([[10, 30, 20], [60, 40, 50]])

We can sort either by using sort directly, or argsort and this function

>>> np.sort(a, axis=1)
array([[10, 20, 30],
       [40, 50, 60]])
>>> ai = np.argsort(a, axis=1)
>>> ai
array([[0, 2, 1],
       [1, 2, 0]])
>>> np.take_along_axis(a, ai, axis=1)
array([[10, 20, 30],
       [40, 50, 60]])

The same works for max and min, if you maintain the trivial dimension
with ``keepdims``:

>>> np.max(a, axis=1, keepdims=True)
array([[30],
       [60]])
>>> ai = np.argmax(a, axis=1, keepdims=True)
>>> ai
array([[1],
       [0]])
>>> np.take_along_axis(a, ai, axis=1)
array([[30],
       [60]])

If we want to get the max and min at the same time, we can stack the
indices first

>>> ai_min = np.argmin(a, axis=1, keepdims=True)
>>> ai_max = np.argmax(a, axis=1, keepdims=True)
>>> ai = np.concatenate([ai_min, ai_max], axis=1)
>>> ai
array([[0, 1],
       [1, 0]])
>>> np.take_along_axis(a, ai, axis=1)
array([[10, 30],
       [40, 60]])

---
## _put_along_axis_dispatcher
```python
from shape_base import _put_along_axis_dispatcher
```



---
## put_along_axis
```python
from shape_base import put_along_axis
```

Put values into the destination array by matching 1d index and data slices.

This iterates over matching 1d slices oriented along the specified axis in
the index and data arrays, and uses the former to place values into the
latter. These slices can be different lengths.

Functions returning an index along an axis, like `argsort` and
`argpartition`, produce suitable indices for this function.

.. versionadded:: 1.15.0

Parameters
----------
arr : ndarray (Ni..., M, Nk...)
    Destination array.
indices : ndarray (Ni..., J, Nk...)
    Indices to change along each 1d slice of `arr`. This must match the
    dimension of arr, but dimensions in Ni and Nj may be 1 to broadcast
    against `arr`.
values : array_like (Ni..., J, Nk...)
    values to insert at those indices. Its shape and dimension are
    broadcast to match that of `indices`.
axis : int
    The axis to take 1d slices along. If axis is None, the destination
    array is treated as if a flattened 1d view had been created of it.

Notes
-----
This is equivalent to (but faster than) the following use of `ndindex` and
`s_`, which sets each of ``ii`` and ``kk`` to a tuple of indices::

    Ni, M, Nk = a.shape[:axis], a.shape[axis], a.shape[axis+1:]
    J = indices.shape[axis]  # Need not equal M

    for ii in ndindex(Ni):
        for kk in ndindex(Nk):
            a_1d       = a      [ii + s_[:,] + kk]
            indices_1d = indices[ii + s_[:,] + kk]
            values_1d  = values [ii + s_[:,] + kk]
            for j in range(J):
                a_1d[indices_1d[j]] = values_1d[j]

Equivalently, eliminating the inner loop, the last two lines would be::

            a_1d[indices_1d] = values_1d

See Also
--------
take_along_axis :
    Take values from the input array by matching 1d index and data slices

Examples
--------

For this sample array

>>> a = np.array([[10, 30, 20], [60, 40, 50]])

We can replace the maximum values with:

>>> ai = np.argmax(a, axis=1, keepdims=True)
>>> ai
array([[1],
       [0]])
>>> np.put_along_axis(a, ai, 99, axis=1)
>>> a
array([[10, 99, 20],
       [99, 40, 50]])

---
## _apply_along_axis_dispatcher
```python
from shape_base import _apply_along_axis_dispatcher
```



---
## apply_along_axis
```python
from shape_base import apply_along_axis
```

Apply a function to 1-D slices along the given axis.

Execute `func1d(a, *args, **kwargs)` where `func1d` operates on 1-D arrays
and `a` is a 1-D slice of `arr` along `axis`.

This is equivalent to (but faster than) the following use of `ndindex` and
`s_`, which sets each of ``ii``, ``jj``, and ``kk`` to a tuple of indices::

    Ni, Nk = a.shape[:axis], a.shape[axis+1:]
    for ii in ndindex(Ni):
        for kk in ndindex(Nk):
            f = func1d(arr[ii + s_[:,] + kk])
            Nj = f.shape
            for jj in ndindex(Nj):
                out[ii + jj + kk] = f[jj]

Equivalently, eliminating the inner loop, this can be expressed as::

    Ni, Nk = a.shape[:axis], a.shape[axis+1:]
    for ii in ndindex(Ni):
        for kk in ndindex(Nk):
            out[ii + s_[...,] + kk] = func1d(arr[ii + s_[:,] + kk])

Parameters
----------
func1d : function (M,) -> (Nj...)
    This function should accept 1-D arrays. It is applied to 1-D
    slices of `arr` along the specified axis.
axis : integer
    Axis along which `arr` is sliced.
arr : ndarray (Ni..., M, Nk...)
    Input array.
args : any
    Additional arguments to `func1d`.
kwargs : any
    Additional named arguments to `func1d`.

    .. versionadded:: 1.9.0


Returns
-------
out : ndarray  (Ni..., Nj..., Nk...)
    The output array. The shape of `out` is identical to the shape of
    `arr`, except along the `axis` dimension. This axis is removed, and
    replaced with new dimensions equal to the shape of the return value
    of `func1d`. So if `func1d` returns a scalar `out` will have one
    fewer dimensions than `arr`.

See Also
--------
apply_over_axes : Apply a function repeatedly over multiple axes.

Examples
--------
>>> def my_func(a):
...     """Average first and last element of a 1-D array"""
...     return (a[0] + a[-1]) * 0.5
>>> b = np.array([[1,2,3], [4,5,6], [7,8,9]])
>>> np.apply_along_axis(my_func, 0, b)
array([4., 5., 6.])
>>> np.apply_along_axis(my_func, 1, b)
array([2.,  5.,  8.])

For a function that returns a 1D array, the number of dimensions in
`outarr` is the same as `arr`.

>>> b = np.array([[8,1,7], [4,3,9], [5,2,6]])
>>> np.apply_along_axis(sorted, 1, b)
array([[1, 7, 8],
       [3, 4, 9],
       [2, 5, 6]])

For a function that returns a higher dimensional array, those dimensions
are inserted in place of the `axis` dimension.

>>> b = np.array([[1,2,3], [4,5,6], [7,8,9]])
>>> np.apply_along_axis(np.diag, -1, b)
array([[[1, 0, 0],
        [0, 2, 0],
        [0, 0, 3]],
       [[4, 0, 0],
        [0, 5, 0],
        [0, 0, 6]],
       [[7, 0, 0],
        [0, 8, 0],
        [0, 0, 9]]])

---
## _apply_over_axes_dispatcher
```python
from shape_base import _apply_over_axes_dispatcher
```



---
## apply_over_axes
```python
from shape_base import apply_over_axes
```

Apply a function repeatedly over multiple axes.

`func` is called as `res = func(a, axis)`, where `axis` is the first
element of `axes`.  The result `res` of the function call must have
either the same dimensions as `a` or one less dimension.  If `res`
has one less dimension than `a`, a dimension is inserted before
`axis`.  The call to `func` is then repeated for each axis in `axes`,
with `res` as the first argument.

Parameters
----------
func : function
    This function must take two arguments, `func(a, axis)`.
a : array_like
    Input array.
axes : array_like
    Axes over which `func` is applied; the elements must be integers.

Returns
-------
apply_over_axis : ndarray
    The output array.  The number of dimensions is the same as `a`,
    but the shape can be different.  This depends on whether `func`
    changes the shape of its output with respect to its input.

See Also
--------
apply_along_axis :
    Apply a function to 1-D slices of an array along the given axis.

Notes
-----
This function is equivalent to tuple axis arguments to reorderable ufuncs
with keepdims=True. Tuple axis arguments to ufuncs have been available since
version 1.7.0.

Examples
--------
>>> a = np.arange(24).reshape(2,3,4)
>>> a
array([[[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]],
       [[12, 13, 14, 15],
        [16, 17, 18, 19],
        [20, 21, 22, 23]]])

Sum over axes 0 and 2. The result has same number of dimensions
as the original array:

>>> np.apply_over_axes(np.sum, a, [0,2])
array([[[ 60],
        [ 92],
        [124]]])

Tuple axis arguments to ufuncs are equivalent:

>>> np.sum(a, axis=(0,2), keepdims=True)
array([[[ 60],
        [ 92],
        [124]]])

---
## _expand_dims_dispatcher
```python
from shape_base import _expand_dims_dispatcher
```



---
## expand_dims
```python
from shape_base import expand_dims
```

Expand the shape of an array.

Insert a new axis that will appear at the `axis` position in the expanded
array shape.

Parameters
----------
a : array_like
    Input array.
axis : int or tuple of ints
    Position in the expanded axes where the new axis (or axes) is placed.

    .. deprecated:: 1.13.0
        Passing an axis where ``axis > a.ndim`` will be treated as
        ``axis == a.ndim``, and passing ``axis < -a.ndim - 1`` will
        be treated as ``axis == 0``. This behavior is deprecated.

    .. versionchanged:: 1.18.0
        A tuple of axes is now supported.  Out of range axes as
        described above are now forbidden and raise an `AxisError`.

Returns
-------
result : ndarray
    View of `a` with the number of dimensions increased.

See Also
--------
squeeze : The inverse operation, removing singleton dimensions
reshape : Insert, remove, and combine dimensions, and resize existing ones
doc.indexing, atleast_1d, atleast_2d, atleast_3d

Examples
--------
>>> x = np.array([1, 2])
>>> x.shape
(2,)

The following is equivalent to ``x[np.newaxis, :]`` or ``x[np.newaxis]``:

>>> y = np.expand_dims(x, axis=0)
>>> y
array([[1, 2]])
>>> y.shape
(1, 2)

The following is equivalent to ``x[:, np.newaxis]``:

>>> y = np.expand_dims(x, axis=1)
>>> y
array([[1],
       [2]])
>>> y.shape
(2, 1)

``axis`` may also be a tuple:

>>> y = np.expand_dims(x, axis=(0, 1))
>>> y
array([[[1, 2]]])

>>> y = np.expand_dims(x, axis=(2, 0))
>>> y
array([[[1],
        [2]]])

Note that some examples may use ``None`` instead of ``np.newaxis``.  These
are the same objects:

>>> np.newaxis is None
True

---
## _column_stack_dispatcher
```python
from shape_base import _column_stack_dispatcher
```



---
## column_stack
```python
from shape_base import column_stack
```

Stack 1-D arrays as columns into a 2-D array.

Take a sequence of 1-D arrays and stack them as columns
to make a single 2-D array. 2-D arrays are stacked as-is,
just like with `hstack`.  1-D arrays are turned into 2-D columns
first.

Parameters
----------
tup : sequence of 1-D or 2-D arrays.
    Arrays to stack. All of them must have the same first dimension.

Returns
-------
stacked : 2-D array
    The array formed by stacking the given arrays.

See Also
--------
stack, hstack, vstack, concatenate

Examples
--------
>>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.column_stack((a,b))
array([[1, 2],
       [2, 3],
       [3, 4]])

---
## _dstack_dispatcher
```python
from shape_base import _dstack_dispatcher
```



---
## dstack
```python
from shape_base import dstack
```

Stack arrays in sequence depth wise (along third axis).

This is equivalent to concatenation along the third axis after 2-D arrays
of shape `(M,N)` have been reshaped to `(M,N,1)` and 1-D arrays of shape
`(N,)` have been reshaped to `(1,N,1)`. Rebuilds arrays divided by
`dsplit`.

This function makes most sense for arrays with up to 3 dimensions. For
instance, for pixel-data with a height (first axis), width (second axis),
and r/g/b channels (third axis). The functions `concatenate`, `stack` and
`block` provide more general stacking and concatenation operations.

Parameters
----------
tup : sequence of arrays
    The arrays must have the same shape along all but the third axis.
    1-D or 2-D arrays must have the same shape.

Returns
-------
stacked : ndarray
    The array formed by stacking the given arrays, will be at least 3-D.

See Also
--------
concatenate : Join a sequence of arrays along an existing axis.
stack : Join a sequence of arrays along a new axis.
block : Assemble an nd-array from nested lists of blocks.
vstack : Stack arrays in sequence vertically (row wise).
hstack : Stack arrays in sequence horizontally (column wise).
column_stack : Stack 1-D arrays as columns into a 2-D array.
dsplit : Split array along third axis.

Examples
--------
>>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.dstack((a,b))
array([[[1, 2],
        [2, 3],
        [3, 4]]])

>>> a = np.array([[1],[2],[3]])
>>> b = np.array([[2],[3],[4]])
>>> np.dstack((a,b))
array([[[1, 2]],
       [[2, 3]],
       [[3, 4]]])

---
## _replace_zero_by_x_arrays
```python
from shape_base import _replace_zero_by_x_arrays
```



---
## _array_split_dispatcher
```python
from shape_base import _array_split_dispatcher
```



---
## array_split
```python
from shape_base import array_split
```

Split an array into multiple sub-arrays.

Please refer to the ``split`` documentation.  The only difference
between these functions is that ``array_split`` allows
`indices_or_sections` to be an integer that does *not* equally
divide the axis. For an array of length l that should be split
into n sections, it returns l % n sub-arrays of size l//n + 1
and the rest of size l//n.

See Also
--------
split : Split array into multiple sub-arrays of equal size.

Examples
--------
>>> x = np.arange(8.0)
>>> np.array_split(x, 3)
[array([0.,  1.,  2.]), array([3.,  4.,  5.]), array([6.,  7.])]

>>> x = np.arange(9)
>>> np.array_split(x, 4)
[array([0, 1, 2]), array([3, 4]), array([5, 6]), array([7, 8])]

---
## _split_dispatcher
```python
from shape_base import _split_dispatcher
```



---
## split
```python
from shape_base import split
```

Split an array into multiple sub-arrays as views into `ary`.

Parameters
----------
ary : ndarray
    Array to be divided into sub-arrays.
indices_or_sections : int or 1-D array
    If `indices_or_sections` is an integer, N, the array will be divided
    into N equal arrays along `axis`.  If such a split is not possible,
    an error is raised.

    If `indices_or_sections` is a 1-D array of sorted integers, the entries
    indicate where along `axis` the array is split.  For example,
    ``[2, 3]`` would, for ``axis=0``, result in

      - ary[:2]
      - ary[2:3]
      - ary[3:]

    If an index exceeds the dimension of the array along `axis`,
    an empty sub-array is returned correspondingly.
axis : int, optional
    The axis along which to split, default is 0.

Returns
-------
sub-arrays : list of ndarrays
    A list of sub-arrays as views into `ary`.

Raises
------
ValueError
    If `indices_or_sections` is given as an integer, but
    a split does not result in equal division.

See Also
--------
array_split : Split an array into multiple sub-arrays of equal or
              near-equal size.  Does not raise an exception if
              an equal division cannot be made.
hsplit : Split array into multiple sub-arrays horizontally (column-wise).
vsplit : Split array into multiple sub-arrays vertically (row wise).
dsplit : Split array into multiple sub-arrays along the 3rd axis (depth).
concatenate : Join a sequence of arrays along an existing axis.
stack : Join a sequence of arrays along a new axis.
hstack : Stack arrays in sequence horizontally (column wise).
vstack : Stack arrays in sequence vertically (row wise).
dstack : Stack arrays in sequence depth wise (along third dimension).

Examples
--------
>>> x = np.arange(9.0)
>>> np.split(x, 3)
[array([0.,  1.,  2.]), array([3.,  4.,  5.]), array([6.,  7.,  8.])]

>>> x = np.arange(8.0)
>>> np.split(x, [3, 5, 6, 10])
[array([0.,  1.,  2.]),
 array([3.,  4.]),
 array([5.]),
 array([6.,  7.]),
 array([], dtype=float64)]

---
## _hvdsplit_dispatcher
```python
from shape_base import _hvdsplit_dispatcher
```



---
## hsplit
```python
from shape_base import hsplit
```

Split an array into multiple sub-arrays horizontally (column-wise).

Please refer to the `split` documentation.  `hsplit` is equivalent
to `split` with ``axis=1``, the array is always split along the second
axis except for 1-D arrays, where it is split at ``axis=0``.

See Also
--------
split : Split an array into multiple sub-arrays of equal size.

Examples
--------
>>> x = np.arange(16.0).reshape(4, 4)
>>> x
array([[ 0.,   1.,   2.,   3.],
       [ 4.,   5.,   6.,   7.],
       [ 8.,   9.,  10.,  11.],
       [12.,  13.,  14.,  15.]])
>>> np.hsplit(x, 2)
[array([[  0.,   1.],
       [  4.,   5.],
       [  8.,   9.],
       [12.,  13.]]),
 array([[  2.,   3.],
       [  6.,   7.],
       [10.,  11.],
       [14.,  15.]])]
>>> np.hsplit(x, np.array([3, 6]))
[array([[ 0.,   1.,   2.],
       [ 4.,   5.,   6.],
       [ 8.,   9.,  10.],
       [12.,  13.,  14.]]),
 array([[ 3.],
       [ 7.],
       [11.],
       [15.]]),
 array([], shape=(4, 0), dtype=float64)]

With a higher dimensional array the split is still along the second axis.

>>> x = np.arange(8.0).reshape(2, 2, 2)
>>> x
array([[[0.,  1.],
        [2.,  3.]],
       [[4.,  5.],
        [6.,  7.]]])
>>> np.hsplit(x, 2)
[array([[[0.,  1.]],
       [[4.,  5.]]]),
 array([[[2.,  3.]],
       [[6.,  7.]]])]

With a 1-D array, the split is along axis 0.

>>> x = np.array([0, 1, 2, 3, 4, 5])
>>> np.hsplit(x, 2)
[array([0, 1, 2]), array([3, 4, 5])]

---
## vsplit
```python
from shape_base import vsplit
```

Split an array into multiple sub-arrays vertically (row-wise).

Please refer to the ``split`` documentation.  ``vsplit`` is equivalent
to ``split`` with `axis=0` (default), the array is always split along the
first axis regardless of the array dimension.

See Also
--------
split : Split an array into multiple sub-arrays of equal size.

Examples
--------
>>> x = np.arange(16.0).reshape(4, 4)
>>> x
array([[ 0.,   1.,   2.,   3.],
       [ 4.,   5.,   6.,   7.],
       [ 8.,   9.,  10.,  11.],
       [12.,  13.,  14.,  15.]])
>>> np.vsplit(x, 2)
[array([[0., 1., 2., 3.],
       [4., 5., 6., 7.]]), array([[ 8.,  9., 10., 11.],
       [12., 13., 14., 15.]])]
>>> np.vsplit(x, np.array([3, 6]))
[array([[ 0.,  1.,  2.,  3.],
       [ 4.,  5.,  6.,  7.],
       [ 8.,  9., 10., 11.]]), array([[12., 13., 14., 15.]]), array([], shape=(0, 4), dtype=float64)]

With a higher dimensional array the split is still along the first axis.

>>> x = np.arange(8.0).reshape(2, 2, 2)
>>> x
array([[[0.,  1.],
        [2.,  3.]],
       [[4.,  5.],
        [6.,  7.]]])
>>> np.vsplit(x, 2)
[array([[[0., 1.],
        [2., 3.]]]), array([[[4., 5.],
        [6., 7.]]])]

---
## dsplit
```python
from shape_base import dsplit
```

Split array into multiple sub-arrays along the 3rd axis (depth).

Please refer to the `split` documentation.  `dsplit` is equivalent
to `split` with ``axis=2``, the array is always split along the third
axis provided the array dimension is greater than or equal to 3.

See Also
--------
split : Split an array into multiple sub-arrays of equal size.

Examples
--------
>>> x = np.arange(16.0).reshape(2, 2, 4)
>>> x
array([[[ 0.,   1.,   2.,   3.],
        [ 4.,   5.,   6.,   7.]],
       [[ 8.,   9.,  10.,  11.],
        [12.,  13.,  14.,  15.]]])
>>> np.dsplit(x, 2)
[array([[[ 0.,  1.],
        [ 4.,  5.]],
       [[ 8.,  9.],
        [12., 13.]]]), array([[[ 2.,  3.],
        [ 6.,  7.]],
       [[10., 11.],
        [14., 15.]]])]
>>> np.dsplit(x, np.array([3, 6]))
[array([[[ 0.,   1.,   2.],
        [ 4.,   5.,   6.]],
       [[ 8.,   9.,  10.],
        [12.,  13.,  14.]]]),
 array([[[ 3.],
        [ 7.]],
       [[11.],
        [15.]]]),
array([], shape=(2, 2, 0), dtype=float64)]

---
## get_array_prepare
```python
from shape_base import get_array_prepare
```

Find the wrapper for the array with the highest priority.

In case of ties, leftmost wins. If no wrapper is found, return None

---
## get_array_wrap
```python
from shape_base import get_array_wrap
```

Find the wrapper for the array with the highest priority.

In case of ties, leftmost wins. If no wrapper is found, return None

---
## _kron_dispatcher
```python
from shape_base import _kron_dispatcher
```



---
## kron
```python
from shape_base import kron
```

Kronecker product of two arrays.

Computes the Kronecker product, a composite array made of blocks of the
second array scaled by the first.

Parameters
----------
a, b : array_like

Returns
-------
out : ndarray

See Also
--------
outer : The outer product

Notes
-----
The function assumes that the number of dimensions of `a` and `b`
are the same, if necessary prepending the smallest with ones.
If ``a.shape = (r0,r1,..,rN)`` and ``b.shape = (s0,s1,...,sN)``,
the Kronecker product has shape ``(r0*s0, r1*s1, ..., rN*SN)``.
The elements are products of elements from `a` and `b`, organized
explicitly by::

    kron(a,b)[k0,k1,...,kN] = a[i0,i1,...,iN] * b[j0,j1,...,jN]

where::

    kt = it * st + jt,  t = 0,...,N

In the common 2-D case (N=1), the block structure can be visualized::

    [[ a[0,0]*b,   a[0,1]*b,  ... , a[0,-1]*b  ],
     [  ...                              ...   ],
     [ a[-1,0]*b,  a[-1,1]*b, ... , a[-1,-1]*b ]]


Examples
--------
>>> np.kron([1,10,100], [5,6,7])
array([  5,   6,   7, ..., 500, 600, 700])
>>> np.kron([5,6,7], [1,10,100])
array([  5,  50, 500, ...,   7,  70, 700])

>>> np.kron(np.eye(2), np.ones((2,2)))
array([[1.,  1.,  0.,  0.],
       [1.,  1.,  0.,  0.],
       [0.,  0.,  1.,  1.],
       [0.,  0.,  1.,  1.]])

>>> a = np.arange(100).reshape((2,5,2,5))
>>> b = np.arange(24).reshape((2,3,4))
>>> c = np.kron(a,b)
>>> c.shape
(2, 10, 6, 20)
>>> I = (1,3,0,2)
>>> J = (0,2,1)
>>> J1 = (0,) + J             # extend to ndim=4
>>> S1 = (1,) + b.shape
>>> K = tuple(np.array(I) * np.array(S1) + np.array(J1))
>>> c[K] == a[I]*b[J]
True

---
## _tile_dispatcher
```python
from shape_base import _tile_dispatcher
```



---
## tile
```python
from shape_base import tile
```

Construct an array by repeating A the number of times given by reps.

If `reps` has length ``d``, the result will have dimension of
``max(d, A.ndim)``.

If ``A.ndim < d``, `A` is promoted to be d-dimensional by prepending new
axes. So a shape (3,) array is promoted to (1, 3) for 2-D replication,
or shape (1, 1, 3) for 3-D replication. If this is not the desired
behavior, promote `A` to d-dimensions manually before calling this
function.

If ``A.ndim > d``, `reps` is promoted to `A`.ndim by pre-pending 1's to it.
Thus for an `A` of shape (2, 3, 4, 5), a `reps` of (2, 2) is treated as
(1, 1, 2, 2).

Note : Although tile may be used for broadcasting, it is strongly
recommended to use numpy's broadcasting operations and functions.

Parameters
----------
A : array_like
    The input array.
reps : array_like
    The number of repetitions of `A` along each axis.

Returns
-------
c : ndarray
    The tiled output array.

See Also
--------
repeat : Repeat elements of an array.
broadcast_to : Broadcast an array to a new shape

Examples
--------
>>> a = np.array([0, 1, 2])
>>> np.tile(a, 2)
array([0, 1, 2, 0, 1, 2])
>>> np.tile(a, (2, 2))
array([[0, 1, 2, 0, 1, 2],
       [0, 1, 2, 0, 1, 2]])
>>> np.tile(a, (2, 1, 2))
array([[[0, 1, 2, 0, 1, 2]],
       [[0, 1, 2, 0, 1, 2]]])

>>> b = np.array([[1, 2], [3, 4]])
>>> np.tile(b, 2)
array([[1, 2, 1, 2],
       [3, 4, 3, 4]])
>>> np.tile(b, (2, 1))
array([[1, 2],
       [3, 4],
       [1, 2],
       [3, 4]])

>>> c = np.array([1,2,3,4])
>>> np.tile(c,(4,1))
array([[1, 2, 3, 4],
       [1, 2, 3, 4],
       [1, 2, 3, 4],
       [1, 2, 3, 4]])

---
## __name__
```python
from stride_tricks import __name__
```

Utilities that manipulate strides to achieve desirable effects.

An explanation of strides can be found in the "ndarray.rst" file in the
NumPy reference guide.

---
## DummyArray
```python
from stride_tricks import DummyArray
```

Dummy object that just exists to hang __array_interface__ dictionaries
and possibly keep alive a reference to a base array.

---
## _maybe_view_as_subclass
```python
from stride_tricks import _maybe_view_as_subclass
```



---
## as_strided
```python
from stride_tricks import as_strided
```

Create a view into the array with the given shape and strides.

.. warning:: This function has to be used with extreme care, see notes.

Parameters
----------
x : ndarray
    Array to create a new.
shape : sequence of int, optional
    The shape of the new array. Defaults to ``x.shape``.
strides : sequence of int, optional
    The strides of the new array. Defaults to ``x.strides``.
subok : bool, optional
    .. versionadded:: 1.10

    If True, subclasses are preserved.
writeable : bool, optional
    .. versionadded:: 1.12

    If set to False, the returned array will always be readonly.
    Otherwise it will be writable if the original array was. It
    is advisable to set this to False if possible (see Notes).

Returns
-------
view : ndarray

See also
--------
broadcast_to : broadcast an array to a given shape.
reshape : reshape an array.
lib.stride_tricks.sliding_window_view :
    userfriendly and safe function for the creation of sliding window views.

Notes
-----
``as_strided`` creates a view into the array given the exact strides
and shape. This means it manipulates the internal data structure of
ndarray and, if done incorrectly, the array elements can point to
invalid memory and can corrupt results or crash your program.
It is advisable to always use the original ``x.strides`` when
calculating new strides to avoid reliance on a contiguous memory
layout.

Furthermore, arrays created with this function often contain self
overlapping memory, so that two elements are identical.
Vectorized write operations on such arrays will typically be
unpredictable. They may even give different results for small, large,
or transposed arrays.

Since writing to these arrays has to be tested and done with great
care, you may want to use ``writeable=False`` to avoid accidental write
operations.

For these reasons it is advisable to avoid ``as_strided`` when
possible.

---
## _sliding_window_view_dispatcher
```python
from stride_tricks import _sliding_window_view_dispatcher
```



---
## sliding_window_view
```python
from stride_tricks import sliding_window_view
```

Create a sliding window view into the array with the given window shape.

Also known as rolling or moving window, the window slides across all
dimensions of the array and extracts subsets of the array at all window
positions.

.. versionadded:: 1.20.0

Parameters
----------
x : array_like
    Array to create the sliding window view from.
window_shape : int or tuple of int
    Size of window over each axis that takes part in the sliding window.
    If `axis` is not present, must have same length as the number of input
    array dimensions. Single integers `i` are treated as if they were the
    tuple `(i,)`.
axis : int or tuple of int, optional
    Axis or axes along which the sliding window is applied.
    By default, the sliding window is applied to all axes and
    `window_shape[i]` will refer to axis `i` of `x`.
    If `axis` is given as a `tuple of int`, `window_shape[i]` will refer to
    the axis `axis[i]` of `x`.
    Single integers `i` are treated as if they were the tuple `(i,)`.
subok : bool, optional
    If True, sub-classes will be passed-through, otherwise the returned
    array will be forced to be a base-class array (default).
writeable : bool, optional
    When true, allow writing to the returned view. The default is false,
    as this should be used with caution: the returned view contains the
    same memory location multiple times, so writing to one location will
    cause others to change.

Returns
-------
view : ndarray
    Sliding window view of the array. The sliding window dimensions are
    inserted at the end, and the original dimensions are trimmed as
    required by the size of the sliding window.
    That is, ``view.shape = x_shape_trimmed + window_shape``, where
    ``x_shape_trimmed`` is ``x.shape`` with every entry reduced by one less
    than the corresponding window size.

See Also
--------
lib.stride_tricks.as_strided: A lower-level and less safe routine for
    creating arbitrary views from custom shape and strides.
broadcast_to: broadcast an array to a given shape.

Notes
-----
For many applications using a sliding window view can be convenient, but
potentially very slow. Often specialized solutions exist, for example:

- `scipy.signal.fftconvolve`

- filtering functions in `scipy.ndimage`

- moving window functions provided by
  `bottleneck <https://github.com/pydata/bottleneck>`_.

As a rough estimate, a sliding window approach with an input size of `N`
and a window size of `W` will scale as `O(N*W)` where frequently a special
algorithm can achieve `O(N)`. That means that the sliding window variant
for a window size of 100 can be a 100 times slower than a more specialized
version.

Nevertheless, for small window sizes, when no custom algorithm exists, or
as a prototyping and developing tool, this function can be a good solution.

Examples
--------
>>> x = np.arange(6)
>>> x.shape
(6,)
>>> v = sliding_window_view(x, 3)
>>> v.shape
(4, 3)
>>> v
array([[0, 1, 2],
       [1, 2, 3],
       [2, 3, 4],
       [3, 4, 5]])

This also works in more dimensions, e.g.

>>> i, j = np.ogrid[:3, :4]
>>> x = 10*i + j
>>> x.shape
(3, 4)
>>> x
array([[ 0,  1,  2,  3],
       [10, 11, 12, 13],
       [20, 21, 22, 23]])
>>> shape = (2,2)
>>> v = sliding_window_view(x, shape)
>>> v.shape
(2, 3, 2, 2)
>>> v
array([[[[ 0,  1],
         [10, 11]],
        [[ 1,  2],
         [11, 12]],
        [[ 2,  3],
         [12, 13]]],
       [[[10, 11],
         [20, 21]],
        [[11, 12],
         [21, 22]],
        [[12, 13],
         [22, 23]]]])

The axis can be specified explicitly:

>>> v = sliding_window_view(x, 3, 0)
>>> v.shape
(1, 4, 3)
>>> v
array([[[ 0, 10, 20],
        [ 1, 11, 21],
        [ 2, 12, 22],
        [ 3, 13, 23]]])

The same axis can be used several times. In that case, every use reduces
the corresponding original dimension:

>>> v = sliding_window_view(x, (2, 3), (1, 1))
>>> v.shape
(3, 1, 2, 3)
>>> v
array([[[[ 0,  1,  2],
         [ 1,  2,  3]]],
       [[[10, 11, 12],
         [11, 12, 13]]],
       [[[20, 21, 22],
         [21, 22, 23]]]])

Combining with stepped slicing (`::step`), this can be used to take sliding
views which skip elements:

>>> x = np.arange(7)
>>> sliding_window_view(x, 5)[:, ::2]
array([[0, 2, 4],
       [1, 3, 5],
       [2, 4, 6]])

or views which move by multiple elements

>>> x = np.arange(7)
>>> sliding_window_view(x, 3)[::2, :]
array([[0, 1, 2],
       [2, 3, 4],
       [4, 5, 6]])

A common application of `sliding_window_view` is the calculation of running
statistics. The simplest example is the
`moving average <https://en.wikipedia.org/wiki/Moving_average>`_:

>>> x = np.arange(6)
>>> x.shape
(6,)
>>> v = sliding_window_view(x, 3)
>>> v.shape
(4, 3)
>>> v
array([[0, 1, 2],
       [1, 2, 3],
       [2, 3, 4],
       [3, 4, 5]])
>>> moving_average = v.mean(axis=-1)
>>> moving_average
array([1., 2., 3., 4.])

Note that a sliding window approach is often **not** optimal (see Notes).

---
## _broadcast_to
```python
from stride_tricks import _broadcast_to
```



---
## _broadcast_to_dispatcher
```python
from stride_tricks import _broadcast_to_dispatcher
```



---
## broadcast_to
```python
from stride_tricks import broadcast_to
```

Broadcast an array to a new shape.

Parameters
----------
array : array_like
    The array to broadcast.
shape : tuple or int
    The shape of the desired array. A single integer ``i`` is interpreted
    as ``(i,)``.
subok : bool, optional
    If True, then sub-classes will be passed-through, otherwise
    the returned array will be forced to be a base-class array (default).

Returns
-------
broadcast : array
    A readonly view on the original array with the given shape. It is
    typically not contiguous. Furthermore, more than one element of a
    broadcasted array may refer to a single memory location.

Raises
------
ValueError
    If the array is not compatible with the new shape according to NumPy's
    broadcasting rules.

See Also
--------
broadcast
broadcast_arrays
broadcast_shapes

Notes
-----
.. versionadded:: 1.10.0

Examples
--------
>>> x = np.array([1, 2, 3])
>>> np.broadcast_to(x, (3, 3))
array([[1, 2, 3],
       [1, 2, 3],
       [1, 2, 3]])

---
## _broadcast_shape
```python
from stride_tricks import _broadcast_shape
```

Returns the shape of the arrays that would result from broadcasting the
supplied arrays against each other.

---
## broadcast_shapes
```python
from stride_tricks import broadcast_shapes
```

Broadcast the input shapes into a single shape.

:ref:`Learn more about broadcasting here <basics.broadcasting>`.

.. versionadded:: 1.20.0

Parameters
----------
`*args` : tuples of ints, or ints
    The shapes to be broadcast against each other.

Returns
-------
tuple
    Broadcasted shape.

Raises
------
ValueError
    If the shapes are not compatible and cannot be broadcast according
    to NumPy's broadcasting rules.

See Also
--------
broadcast
broadcast_arrays
broadcast_to

Examples
--------
>>> np.broadcast_shapes((1, 2), (3, 1), (3, 2))
(3, 2)

>>> np.broadcast_shapes((6, 7), (5, 6, 1), (7,), (5, 1, 7))
(5, 6, 7)

---
## _broadcast_arrays_dispatcher
```python
from stride_tricks import _broadcast_arrays_dispatcher
```



---
## broadcast_arrays
```python
from stride_tricks import broadcast_arrays
```

Broadcast any number of arrays against each other.

Parameters
----------
`*args` : array_likes
    The arrays to broadcast.

subok : bool, optional
    If True, then sub-classes will be passed-through, otherwise
    the returned arrays will be forced to be a base-class array (default).

Returns
-------
broadcasted : list of arrays
    These arrays are views on the original arrays.  They are typically
    not contiguous.  Furthermore, more than one element of a
    broadcasted array may refer to a single memory location. If you need
    to write to the arrays, make copies first. While you can set the
    ``writable`` flag True, writing to a single output value may end up
    changing more than one location in the output array.

    .. deprecated:: 1.17
        The output is currently marked so that if written to, a deprecation
        warning will be emitted. A future version will set the
        ``writable`` flag False so writing to it will raise an error.

See Also
--------
broadcast
broadcast_to
broadcast_shapes

Examples
--------
>>> x = np.array([[1,2,3]])
>>> y = np.array([[4],[5]])
>>> np.broadcast_arrays(x, y)
[array([[1, 2, 3],
       [1, 2, 3]]), array([[4, 4, 4],
       [5, 5, 5]])]

Here is a useful idiom for getting contiguous copies instead of
non-contiguous views.

>>> [np.array(a) for a in np.broadcast_arrays(x, y)]
[array([[1, 2, 3],
       [1, 2, 3]]), array([[4, 4, 4],
       [5, 5, 5]])]

---
## __init__
```python
from stride_tricks import __init__
```



---
## show_runtime
```python
from utils import show_runtime
```

Print information about various resources in the system
including available intrinsic support and BLAS/LAPACK library
in use

.. versionadded:: 1.24.0

See Also
--------
show_config : Show libraries in the system on which NumPy was built.

Notes
-----
1. Information is derived with the help of `threadpoolctl <https://pypi.org/project/threadpoolctl/>`_
   library if available.
2. SIMD related information is derived from ``__cpu_features__``,
   ``__cpu_baseline__`` and ``__cpu_dispatch__``

---
## get_include
```python
from utils import get_include
```

Return the directory that contains the NumPy \*.h header files.

Extension modules that need to compile against NumPy should use this
function to locate the appropriate include directory.

Notes
-----
When using ``distutils``, for example in ``setup.py``::

    import numpy as np
    ...
    Extension('extension_name', ...
            include_dirs=[np.get_include()])
    ...

---
## _Deprecate
```python
from utils import _Deprecate
```

Decorator class to deprecate old functions.

Refer to `deprecate` for details.

See Also
--------
deprecate

---
## _get_indent
```python
from utils import _get_indent
```

Determines the leading whitespace that could be removed from all the lines.

---
## deprecate
```python
from utils import deprecate
```

Issues a DeprecationWarning, adds warning to `old_name`'s
docstring, rebinds ``old_name.__name__`` and returns the new
function object.

This function may also be used as a decorator.

Parameters
----------
func : function
    The function to be deprecated.
old_name : str, optional
    The name of the function to be deprecated. Default is None, in
    which case the name of `func` is used.
new_name : str, optional
    The new name for the function. Default is None, in which case the
    deprecation message is that `old_name` is deprecated. If given, the
    deprecation message is that `old_name` is deprecated and `new_name`
    should be used instead.
message : str, optional
    Additional explanation of the deprecation.  Displayed in the
    docstring after the warning.

Returns
-------
old_func : function
    The deprecated function.

Examples
--------
Note that ``olduint`` returns a value after printing Deprecation
Warning:

>>> olduint = np.deprecate(np.uint)
DeprecationWarning: `uint64` is deprecated! # may vary
>>> olduint(6)
6

---
## deprecate_with_doc
```python
from utils import deprecate_with_doc
```

Deprecates a function and includes the deprecation in its docstring.

This function is used as a decorator. It returns an object that can be
used to issue a DeprecationWarning, by passing the to-be decorated
function as argument, this adds warning to the to-be decorated function's
docstring and returns the new function object.

See Also
--------
deprecate : Decorate a function such that it issues a `DeprecationWarning`

Parameters
----------
msg : str
    Additional explanation of the deprecation. Displayed in the
    docstring after the warning.

Returns
-------
obj : object

---
## byte_bounds
```python
from utils import byte_bounds
```

Returns pointers to the end-points of an array.

Parameters
----------
a : ndarray
    Input array. It must conform to the Python-side of the array
    interface.

Returns
-------
(low, high) : tuple of 2 integers
    The first integer is the first byte of the array, the second
    integer is just past the last byte of the array.  If `a` is not
    contiguous it will not use every byte between the (`low`, `high`)
    values.

Examples
--------
>>> I = np.eye(2, dtype='f'); I.dtype
dtype('float32')
>>> low, high = np.byte_bounds(I)
>>> high - low == I.size*I.itemsize
True
>>> I = np.eye(2); I.dtype
dtype('float64')
>>> low, high = np.byte_bounds(I)
>>> high - low == I.size*I.itemsize
True

---
## who
```python
from utils import who
```

Print the NumPy arrays in the given dictionary.

If there is no dictionary passed in or `vardict` is None then returns
NumPy arrays in the globals() dictionary (all NumPy arrays in the
namespace).

Parameters
----------
vardict : dict, optional
    A dictionary possibly containing ndarrays.  Default is globals().

Returns
-------
out : None
    Returns 'None'.

Notes
-----
Prints out the name, shape, bytes and type of all of the ndarrays
present in `vardict`.

Examples
--------
>>> a = np.arange(10)
>>> b = np.ones(20)
>>> np.who()
Name            Shape            Bytes            Type
===========================================================
a               10               80               int64
b               20               160              float64
Upper bound on total bytes  =       240

>>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str',
... 'idx':5}
>>> np.who(d)
Name            Shape            Bytes            Type
===========================================================
x               2                16               float64
y               3                24               float64
Upper bound on total bytes  =       40

---
## _split_line
```python
from utils import _split_line
```



---
## _makenamedict
```python
from utils import _makenamedict
```



---
## _info
```python
from utils import _info
```

Provide information about ndarray obj.

Parameters
----------
obj : ndarray
    Must be ndarray, not checked.
output
    Where printed output goes.

Notes
-----
Copied over from the numarray module prior to its removal.
Adapted somewhat as only numpy is an option now.

Called by info.

---
## info
```python
from utils import info
```

Get help information for an array, function, class, or module.

Parameters
----------
object : object or str, optional
    Input object or name to get information about. If `object` is
    an `ndarray` instance, information about the array is printed.
    If `object` is a numpy object, its docstring is given. If it is
    a string, available modules are searched for matching objects.
    If None, information about `info` itself is returned.
maxwidth : int, optional
    Printing width.
output : file like object, optional
    File like object that the output is written to, default is
    ``None``, in which case ``sys.stdout`` will be used.
    The object has to be opened in 'w' or 'a' mode.
toplevel : str, optional
    Start search at this level.

See Also
--------
source, lookfor

Notes
-----
When used interactively with an object, ``np.info(obj)`` is equivalent
to ``help(obj)`` on the Python prompt or ``obj?`` on the IPython
prompt.

Examples
--------
>>> np.info(np.polyval) # doctest: +SKIP
   polyval(p, x)
     Evaluate the polynomial p at x.
     ...

When using a string for `object` it is possible to get multiple results.

>>> np.info('fft') # doctest: +SKIP
     *** Found in numpy ***
Core FFT routines
...
     *** Found in numpy.fft ***
 fft(a, n=None, axis=-1)
...
     *** Repeat reference found in numpy.fft.fftpack ***
     *** Total of 3 references found. ***

When the argument is an array, information about the array is printed.

>>> a = np.array([[1 + 2j, 3, -4], [-5j, 6, 0]], dtype=np.complex64)
>>> np.info(a)
class:  ndarray
shape:  (2, 3)
strides:  (24, 8)
itemsize:  8
aligned:  True
contiguous:  True
fortran:  False
data pointer: 0x562b6e0d2860  # may vary
byteorder:  little
byteswap:  False
type: complex64

---
## source
```python
from utils import source
```

Print or write to a file the source code for a NumPy object.

The source code is only returned for objects written in Python. Many
functions and classes are defined in C and will therefore not return
useful information.

Parameters
----------
object : numpy object
    Input object. This can be any object (function, class, module,
    ...).
output : file object, optional
    If `output` not supplied then source code is printed to screen
    (sys.stdout).  File object must be created with either write 'w' or
    append 'a' modes.

See Also
--------
lookfor, info

Examples
--------
>>> np.source(np.interp)                        #doctest: +SKIP
In file: /usr/lib/python2.6/dist-packages/numpy/lib/function_base.py
def interp(x, xp, fp, left=None, right=None):
    """.... (full docstring printed)"""
    if isinstance(x, (float, int, number)):
        return compiled_interp([x], xp, fp, left, right).item()
    else:
        return compiled_interp(x, xp, fp, left, right)

The source code is only returned for objects written in Python.

>>> np.source(np.array)                         #doctest: +SKIP
Not available for this object.

---
## lookfor
```python
from utils import lookfor
```

Do a keyword search on docstrings.

A list of objects that matched the search is displayed,
sorted by relevance. All given keywords need to be found in the
docstring for it to be returned as a result, but the order does
not matter.

Parameters
----------
what : str
    String containing words to look for.
module : str or list, optional
    Name of module(s) whose docstrings to go through.
import_modules : bool, optional
    Whether to import sub-modules in packages. Default is True.
regenerate : bool, optional
    Whether to re-generate the docstring cache. Default is False.
output : file-like, optional
    File-like object to write the output to. If omitted, use a pager.

See Also
--------
source, info

Notes
-----
Relevance is determined only roughly, by checking if the keywords occur
in the function name, at the start of a docstring, etc.

Examples
--------
>>> np.lookfor('binary representation') # doctest: +SKIP
Search results for 'binary representation'
------------------------------------------
numpy.binary_repr
    Return the binary representation of the input number as a string.
numpy.core.setup_common.long_double_representation
    Given a binary dump as given by GNU od -b, look for long double
numpy.base_repr
    Return a string representation of a number in the given base system.
...

---
## _lookfor_generate_cache
```python
from utils import _lookfor_generate_cache
```

Generate docstring cache for given module.

Parameters
----------
module : str, None, module
    Module for which to generate docstring cache
import_modules : bool
    Whether to import sub-modules in packages.
regenerate : bool
    Re-generate the docstring cache

Returns
-------
cache : dict {obj_full_name: (docstring, kind, index), ...}
    Docstring cache for the module, either cached one (regenerate=False)
    or newly generated.

---
## _getmembers
```python
from utils import _getmembers
```



---
## safe_eval
```python
from utils import safe_eval
```

Protected string evaluation.

Evaluate a string containing a Python literal expression without
allowing the execution of arbitrary non-literal code.

.. warning::

    This function is identical to :py:meth:`ast.literal_eval` and
    has the same security implications.  It may not always be safe
    to evaluate large input strings.

Parameters
----------
source : str
    The string to evaluate.

Returns
-------
obj : object
   The result of evaluating `source`.

Raises
------
SyntaxError
    If the code has invalid Python syntax, or if it contains
    non-literal code.

Examples
--------
>>> np.safe_eval('1')
1
>>> np.safe_eval('[1, 2, 3]')
[1, 2, 3]
>>> np.safe_eval('{"foo": ("bar", 10.0)}')
{'foo': ('bar', 10.0)}

>>> np.safe_eval('import os')
Traceback (most recent call last):
  ...
SyntaxError: invalid syntax

>>> np.safe_eval('open("/home/user/.ssh/id_dsa").read()')
Traceback (most recent call last):
  ...
ValueError: malformed node or string: <_ast.Call object at 0x...>

---
## _median_nancheck
```python
from utils import _median_nancheck
```

Utility function to check median result from data for NaN values at the end
and return NaN in that case. Input result can also be a MaskedArray.

Parameters
----------
data : array
    Sorted input data to median function
result : Array or MaskedArray
    Result of median function.
axis : int
    Axis along which the median was computed.

Returns
-------
result : scalar or ndarray
    Median or NaN in axes which contained NaN in the input.  If the input
    was an array, NaN will be inserted in-place.  If a scalar, either the
    input itself or a scalar NaN.

---
## _opt_info
```python
from utils import _opt_info
```

Returns a string contains the supported CPU features by the current build.

The string format can be explained as follows:
    - dispatched features that are supported by the running machine
      end with `*`.
    - dispatched features that are "not" supported by the running machine
      end with `?`.
    - remained features are representing the baseline.

---
## drop_metadata
```python
from utils import drop_metadata
```

Returns the dtype unchanged if it contained no metadata or a copy of the
dtype if it (or any of its structure dtypes) contained metadata.

This utility is used by `np.save` and `np.savez` to drop metadata before
saving.

.. note::

    Due to its limitation this function may move to a more appropriate
    home or change in the future and is considered semi-public API only.

.. warning::

    This function does not preserve more strange things like record dtypes
    and user dtypes may simply return the wrong thing.  If you need to be
    sure about the latter, check the result with:
    ``np.can_cast(new_dtype, dtype, casting="no")``.

---
## relevance
```python
from utils import relevance
```



---
## relevance_value
```python
from utils import relevance_value
```



---
## newfunc
```python
from utils import newfunc
```



---
## __name__
```python
from arrayterator import __name__
```



---
## Arrayterator
```python
from arrayterator import Arrayterator
```

Buffered iterator for big arrays.

`Arrayterator` creates a buffered iterator for reading big arrays in small
contiguous blocks. The class is useful for objects stored in the
file system. It allows iteration over the object *without* reading
everything in memory; instead, small blocks are read and iterated over.

`Arrayterator` can be used with any object that supports multidimensional
slices. This includes NumPy arrays, but also variables from
Scientific.IO.NetCDF or pynetcdf for example.

Parameters
----------
var : array_like
    The object to iterate over.
buf_size : int, optional
    The buffer size. If `buf_size` is supplied, the maximum amount of
    data that will be read into memory is `buf_size` elements.
    Default is None, which will read as many element as possible
    into memory.

Attributes
----------
var
buf_size
start
stop
step
shape
flat

See Also
--------
ndenumerate : Multidimensional array iterator.
flatiter : Flat array iterator.
memmap : Create a memory-map to an array stored in a binary file on disk.

Notes
-----
The algorithm works by first finding a "running dimension", along which
the blocks will be extracted. Given an array of dimensions
``(d1, d2, ..., dn)``, e.g. if `buf_size` is smaller than ``d1``, the
first dimension will be used. If, on the other hand,
``d1 < buf_size < d1*d2`` the second dimension will be used, and so on.
Blocks are extracted along this dimension, and when the last block is
returned the process continues from the next dimension, until all
elements have been read.

Examples
--------
>>> a = np.arange(3 * 4 * 5 * 6).reshape(3, 4, 5, 6)
>>> a_itor = np.lib.Arrayterator(a, 2)
>>> a_itor.shape
(3, 4, 5, 6)

Now we can iterate over ``a_itor``, and it will return arrays of size
two. Since `buf_size` was smaller than any dimension, the first
dimension will be iterated over first:

>>> for subarr in a_itor:
...     if not subarr.all():
...         print(subarr, subarr.shape) # doctest: +SKIP
>>> # [[[[0 1]]]] (1, 1, 1, 2)

---
## __init__
```python
from arrayterator import __init__
```



---
## __getattr__
```python
from arrayterator import __getattr__
```



---
## __getitem__
```python
from arrayterator import __getitem__
```

Return a new arrayterator.

---
## __array__
```python
from arrayterator import __array__
```

Return corresponding data.

---
## flat
```python
from arrayterator import flat
```

A 1-D flat iterator for Arrayterator objects.

This iterator returns elements of the array to be iterated over in
`Arrayterator` one by one. It is similar to `flatiter`.

See Also
--------
Arrayterator
flatiter

Examples
--------
>>> a = np.arange(3 * 4 * 5 * 6).reshape(3, 4, 5, 6)
>>> a_itor = np.lib.Arrayterator(a, 2)

>>> for subarr in a_itor.flat:
...     if not subarr:
...         print(subarr, type(subarr))
...
0 <class 'numpy.int64'>

---
## shape
```python
from arrayterator import shape
```

The shape of the array to be iterated over.

For an example, see `Arrayterator`.

---
## __iter__
```python
from arrayterator import __iter__
```



---
## _rot90_dispatcher
```python
from function_base import _rot90_dispatcher
```



---
## rot90
```python
from function_base import rot90
```

Rotate an array by 90 degrees in the plane specified by axes.

Rotation direction is from the first towards the second axis.
This means for a 2D array with the default `k` and `axes`, the
rotation will be counterclockwise.

Parameters
----------
m : array_like
    Array of two or more dimensions.
k : integer
    Number of times the array is rotated by 90 degrees.
axes : (2,) array_like
    The array is rotated in the plane defined by the axes.
    Axes must be different.

    .. versionadded:: 1.12.0

Returns
-------
y : ndarray
    A rotated view of `m`.

See Also
--------
flip : Reverse the order of elements in an array along the given axis.
fliplr : Flip an array horizontally.
flipud : Flip an array vertically.

Notes
-----
``rot90(m, k=1, axes=(1,0))``  is the reverse of
``rot90(m, k=1, axes=(0,1))``

``rot90(m, k=1, axes=(1,0))`` is equivalent to
``rot90(m, k=-1, axes=(0,1))``

Examples
--------
>>> m = np.array([[1,2],[3,4]], int)
>>> m
array([[1, 2],
       [3, 4]])
>>> np.rot90(m)
array([[2, 4],
       [1, 3]])
>>> np.rot90(m, 2)
array([[4, 3],
       [2, 1]])
>>> m = np.arange(8).reshape((2,2,2))
>>> np.rot90(m, 1, (1,2))
array([[[1, 3],
        [0, 2]],
       [[5, 7],
        [4, 6]]])

---
## _flip_dispatcher
```python
from function_base import _flip_dispatcher
```



---
## flip
```python
from function_base import flip
```

Reverse the order of elements in an array along the given axis.

The shape of the array is preserved, but the elements are reordered.

.. versionadded:: 1.12.0

Parameters
----------
m : array_like
    Input array.
axis : None or int or tuple of ints, optional
     Axis or axes along which to flip over. The default,
     axis=None, will flip over all of the axes of the input array.
     If axis is negative it counts from the last to the first axis.

     If axis is a tuple of ints, flipping is performed on all of the axes
     specified in the tuple.

     .. versionchanged:: 1.15.0
        None and tuples of axes are supported

Returns
-------
out : array_like
    A view of `m` with the entries of axis reversed.  Since a view is
    returned, this operation is done in constant time.

See Also
--------
flipud : Flip an array vertically (axis=0).
fliplr : Flip an array horizontally (axis=1).

Notes
-----
flip(m, 0) is equivalent to flipud(m).

flip(m, 1) is equivalent to fliplr(m).

flip(m, n) corresponds to ``m[...,::-1,...]`` with ``::-1`` at position n.

flip(m) corresponds to ``m[::-1,::-1,...,::-1]`` with ``::-1`` at all
positions.

flip(m, (0, 1)) corresponds to ``m[::-1,::-1,...]`` with ``::-1`` at
position 0 and position 1.

Examples
--------
>>> A = np.arange(8).reshape((2,2,2))
>>> A
array([[[0, 1],
        [2, 3]],
       [[4, 5],
        [6, 7]]])
>>> np.flip(A, 0)
array([[[4, 5],
        [6, 7]],
       [[0, 1],
        [2, 3]]])
>>> np.flip(A, 1)
array([[[2, 3],
        [0, 1]],
       [[6, 7],
        [4, 5]]])
>>> np.flip(A)
array([[[7, 6],
        [5, 4]],
       [[3, 2],
        [1, 0]]])
>>> np.flip(A, (0, 2))
array([[[5, 4],
        [7, 6]],
       [[1, 0],
        [3, 2]]])
>>> A = np.random.randn(3,4,5)
>>> np.all(np.flip(A,2) == A[:,:,::-1,...])
True

---
## iterable
```python
from function_base import iterable
```

Check whether or not an object can be iterated over.

Parameters
----------
y : object
  Input object.

Returns
-------
b : bool
  Return ``True`` if the object has an iterator method or is a
  sequence and ``False`` otherwise.


Examples
--------
>>> np.iterable([1, 2, 3])
True
>>> np.iterable(2)
False

Notes
-----
In most cases, the results of ``np.iterable(obj)`` are consistent with
``isinstance(obj, collections.abc.Iterable)``. One notable exception is
the treatment of 0-dimensional arrays::

    >>> from collections.abc import Iterable
    >>> a = np.array(1.0)  # 0-dimensional numpy array
    >>> isinstance(a, Iterable)
    True
    >>> np.iterable(a)
    False

---
## _average_dispatcher
```python
from function_base import _average_dispatcher
```



---
## average
```python
from function_base import average
```

Compute the weighted average along the specified axis.

Parameters
----------
a : array_like
    Array containing data to be averaged. If `a` is not an array, a
    conversion is attempted.
axis : None or int or tuple of ints, optional
    Axis or axes along which to average `a`.  The default,
    axis=None, will average over all of the elements of the input array.
    If axis is negative it counts from the last to the first axis.

    .. versionadded:: 1.7.0

    If axis is a tuple of ints, averaging is performed on all of the axes
    specified in the tuple instead of a single axis or all the axes as
    before.
weights : array_like, optional
    An array of weights associated with the values in `a`. Each value in
    `a` contributes to the average according to its associated weight.
    The weights array can either be 1-D (in which case its length must be
    the size of `a` along the given axis) or of the same shape as `a`.
    If `weights=None`, then all data in `a` are assumed to have a
    weight equal to one.  The 1-D calculation is::

        avg = sum(a * weights) / sum(weights)

    The only constraint on `weights` is that `sum(weights)` must not be 0.
returned : bool, optional
    Default is `False`. If `True`, the tuple (`average`, `sum_of_weights`)
    is returned, otherwise only the average is returned.
    If `weights=None`, `sum_of_weights` is equivalent to the number of
    elements over which the average is taken.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `a`.
    *Note:* `keepdims` will not work with instances of `numpy.matrix`
    or other classes whose methods do not support `keepdims`.

    .. versionadded:: 1.23.0

Returns
-------
retval, [sum_of_weights] : array_type or double
    Return the average along the specified axis. When `returned` is `True`,
    return a tuple with the average as the first element and the sum
    of the weights as the second element. `sum_of_weights` is of the
    same type as `retval`. The result dtype follows a genereal pattern.
    If `weights` is None, the result dtype will be that of `a` , or ``float64``
    if `a` is integral. Otherwise, if `weights` is not None and `a` is non-
    integral, the result type will be the type of lowest precision capable of
    representing values of both `a` and `weights`. If `a` happens to be
    integral, the previous rules still applies but the result dtype will
    at least be ``float64``.

Raises
------
ZeroDivisionError
    When all weights along axis are zero. See `numpy.ma.average` for a
    version robust to this type of error.
TypeError
    When the length of 1D `weights` is not the same as the shape of `a`
    along axis.

See Also
--------
mean

ma.average : average for masked arrays -- useful if your data contains
             "missing" values
numpy.result_type : Returns the type that results from applying the
                    numpy type promotion rules to the arguments.

Examples
--------
>>> data = np.arange(1, 5)
>>> data
array([1, 2, 3, 4])
>>> np.average(data)
2.5
>>> np.average(np.arange(1, 11), weights=np.arange(10, 0, -1))
4.0

>>> data = np.arange(6).reshape((3, 2))
>>> data
array([[0, 1],
       [2, 3],
       [4, 5]])
>>> np.average(data, axis=1, weights=[1./4, 3./4])
array([0.75, 2.75, 4.75])
>>> np.average(data, weights=[1./4, 3./4])
Traceback (most recent call last):
    ...
TypeError: Axis must be specified when shapes of a and weights differ.

>>> a = np.ones(5, dtype=np.float128)
>>> w = np.ones(5, dtype=np.complex64)
>>> avg = np.average(a, weights=w)
>>> print(avg.dtype)
complex256

With ``keepdims=True``, the following result has shape (3, 1).

>>> np.average(data, axis=1, keepdims=True)
array([[0.5],
       [2.5],
       [4.5]])

---
## asarray_chkfinite
```python
from function_base import asarray_chkfinite
```

Convert the input to an array, checking for NaNs or Infs.

Parameters
----------
a : array_like
    Input data, in any form that can be converted to an array.  This
    includes lists, lists of tuples, tuples, tuples of tuples, tuples
    of lists and ndarrays.  Success requires no NaNs or Infs.
dtype : data-type, optional
    By default, the data-type is inferred from the input data.
order : {'C', 'F', 'A', 'K'}, optional
    Memory layout.  'A' and 'K' depend on the order of input array a.
    'C' row-major (C-style),
    'F' column-major (Fortran-style) memory representation.
    'A' (any) means 'F' if `a` is Fortran contiguous, 'C' otherwise
    'K' (keep) preserve input order
    Defaults to 'C'.

Returns
-------
out : ndarray
    Array interpretation of `a`.  No copy is performed if the input
    is already an ndarray.  If `a` is a subclass of ndarray, a base
    class ndarray is returned.

Raises
------
ValueError
    Raises ValueError if `a` contains NaN (Not a Number) or Inf (Infinity).

See Also
--------
asarray : Create and array.
asanyarray : Similar function which passes through subclasses.
ascontiguousarray : Convert input to a contiguous array.
asfarray : Convert input to a floating point ndarray.
asfortranarray : Convert input to an ndarray with column-major
                 memory order.
fromiter : Create an array from an iterator.
fromfunction : Construct an array by executing a function on grid
               positions.

Examples
--------
Convert a list into an array.  If all elements are finite
``asarray_chkfinite`` is identical to ``asarray``.

>>> a = [1, 2]
>>> np.asarray_chkfinite(a, dtype=float)
array([1., 2.])

Raises ValueError if array_like contains Nans or Infs.

>>> a = [1, 2, np.inf]
>>> try:
...     np.asarray_chkfinite(a)
... except ValueError:
...     print('ValueError')
...
ValueError

---
## _piecewise_dispatcher
```python
from function_base import _piecewise_dispatcher
```



---
## piecewise
```python
from function_base import piecewise
```

Evaluate a piecewise-defined function.

Given a set of conditions and corresponding functions, evaluate each
function on the input data wherever its condition is true.

Parameters
----------
x : ndarray or scalar
    The input domain.
condlist : list of bool arrays or bool scalars
    Each boolean array corresponds to a function in `funclist`.  Wherever
    `condlist[i]` is True, `funclist[i](x)` is used as the output value.

    Each boolean array in `condlist` selects a piece of `x`,
    and should therefore be of the same shape as `x`.

    The length of `condlist` must correspond to that of `funclist`.
    If one extra function is given, i.e. if
    ``len(funclist) == len(condlist) + 1``, then that extra function
    is the default value, used wherever all conditions are false.
funclist : list of callables, f(x,*args,**kw), or scalars
    Each function is evaluated over `x` wherever its corresponding
    condition is True.  It should take a 1d array as input and give an 1d
    array or a scalar value as output.  If, instead of a callable,
    a scalar is provided then a constant function (``lambda x: scalar``) is
    assumed.
args : tuple, optional
    Any further arguments given to `piecewise` are passed to the functions
    upon execution, i.e., if called ``piecewise(..., ..., 1, 'a')``, then
    each function is called as ``f(x, 1, 'a')``.
kw : dict, optional
    Keyword arguments used in calling `piecewise` are passed to the
    functions upon execution, i.e., if called
    ``piecewise(..., ..., alpha=1)``, then each function is called as
    ``f(x, alpha=1)``.

Returns
-------
out : ndarray
    The output is the same shape and type as x and is found by
    calling the functions in `funclist` on the appropriate portions of `x`,
    as defined by the boolean arrays in `condlist`.  Portions not covered
    by any condition have a default value of 0.


See Also
--------
choose, select, where

Notes
-----
This is similar to choose or select, except that functions are
evaluated on elements of `x` that satisfy the corresponding condition from
`condlist`.

The result is::

        |--
        |funclist[0](x[condlist[0]])
  out = |funclist[1](x[condlist[1]])
        |...
        |funclist[n2](x[condlist[n2]])
        |--

Examples
--------
Define the sigma function, which is -1 for ``x < 0`` and +1 for ``x >= 0``.

>>> x = np.linspace(-2.5, 2.5, 6)
>>> np.piecewise(x, [x < 0, x >= 0], [-1, 1])
array([-1., -1., -1.,  1.,  1.,  1.])

Define the absolute value, which is ``-x`` for ``x <0`` and ``x`` for
``x >= 0``.

>>> np.piecewise(x, [x < 0, x >= 0], [lambda x: -x, lambda x: x])
array([2.5,  1.5,  0.5,  0.5,  1.5,  2.5])

Apply the same function to a scalar value.

>>> y = -2
>>> np.piecewise(y, [y < 0, y >= 0], [lambda x: -x, lambda x: x])
array(2)

---
## _select_dispatcher
```python
from function_base import _select_dispatcher
```



---
## select
```python
from function_base import select
```

Return an array drawn from elements in choicelist, depending on conditions.

Parameters
----------
condlist : list of bool ndarrays
    The list of conditions which determine from which array in `choicelist`
    the output elements are taken. When multiple conditions are satisfied,
    the first one encountered in `condlist` is used.
choicelist : list of ndarrays
    The list of arrays from which the output elements are taken. It has
    to be of the same length as `condlist`.
default : scalar, optional
    The element inserted in `output` when all conditions evaluate to False.

Returns
-------
output : ndarray
    The output at position m is the m-th element of the array in
    `choicelist` where the m-th element of the corresponding array in
    `condlist` is True.

See Also
--------
where : Return elements from one of two arrays depending on condition.
take, choose, compress, diag, diagonal

Examples
--------
>>> x = np.arange(6)
>>> condlist = [x<3, x>3]
>>> choicelist = [x, x**2]
>>> np.select(condlist, choicelist, 42)
array([ 0,  1,  2, 42, 16, 25])

>>> condlist = [x<=4, x>3]
>>> choicelist = [x, x**2]
>>> np.select(condlist, choicelist, 55)
array([ 0,  1,  2,  3,  4, 25])

---
## _copy_dispatcher
```python
from function_base import _copy_dispatcher
```



---
## copy
```python
from function_base import copy
```

Return an array copy of the given object.

Parameters
----------
a : array_like
    Input data.
order : {'C', 'F', 'A', 'K'}, optional
    Controls the memory layout of the copy. 'C' means C-order,
    'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,
    'C' otherwise. 'K' means match the layout of `a` as closely
    as possible. (Note that this function and :meth:`ndarray.copy` are very
    similar, but have different default values for their order=
    arguments.)
subok : bool, optional
    If True, then sub-classes will be passed-through, otherwise the
    returned array will be forced to be a base-class array (defaults to False).

    .. versionadded:: 1.19.0

Returns
-------
arr : ndarray
    Array interpretation of `a`.

See Also
--------
ndarray.copy : Preferred method for creating an array copy

Notes
-----
This is equivalent to:

>>> np.array(a, copy=True)  #doctest: +SKIP

Examples
--------
Create an array x, with a reference y and a copy z:

>>> x = np.array([1, 2, 3])
>>> y = x
>>> z = np.copy(x)

Note that, when we modify x, y changes, but not z:

>>> x[0] = 10
>>> x[0] == y[0]
True
>>> x[0] == z[0]
False

Note that, np.copy clears previously set WRITEABLE=False flag.

>>> a = np.array([1, 2, 3])
>>> a.flags["WRITEABLE"] = False
>>> b = np.copy(a)
>>> b.flags["WRITEABLE"]
True
>>> b[0] = 3
>>> b
array([3, 2, 3])

Note that np.copy is a shallow copy and will not copy object
elements within arrays. This is mainly important for arrays
containing Python objects. The new array will contain the
same object which may lead to surprises if that object can
be modified (is mutable):

>>> a = np.array([1, 'm', [2, 3, 4]], dtype=object)
>>> b = np.copy(a)
>>> b[2][0] = 10
>>> a
array([1, 'm', list([10, 3, 4])], dtype=object)

To ensure all elements within an ``object`` array are copied,
use `copy.deepcopy`:

>>> import copy
>>> a = np.array([1, 'm', [2, 3, 4]], dtype=object)
>>> c = copy.deepcopy(a)
>>> c[2][0] = 10
>>> c
array([1, 'm', list([10, 3, 4])], dtype=object)
>>> a
array([1, 'm', list([2, 3, 4])], dtype=object)

---
## _gradient_dispatcher
```python
from function_base import _gradient_dispatcher
```



---
## gradient
```python
from function_base import gradient
```

Return the gradient of an N-dimensional array.

The gradient is computed using second order accurate central differences
in the interior points and either first or second order accurate one-sides
(forward or backwards) differences at the boundaries.
The returned gradient hence has the same shape as the input array.

Parameters
----------
f : array_like
    An N-dimensional array containing samples of a scalar function.
varargs : list of scalar or array, optional
    Spacing between f values. Default unitary spacing for all dimensions.
    Spacing can be specified using:

    1. single scalar to specify a sample distance for all dimensions.
    2. N scalars to specify a constant sample distance for each dimension.
       i.e. `dx`, `dy`, `dz`, ...
    3. N arrays to specify the coordinates of the values along each
       dimension of F. The length of the array must match the size of
       the corresponding dimension
    4. Any combination of N scalars/arrays with the meaning of 2. and 3.

    If `axis` is given, the number of varargs must equal the number of axes.
    Default: 1.

edge_order : {1, 2}, optional
    Gradient is calculated using N-th order accurate differences
    at the boundaries. Default: 1.

    .. versionadded:: 1.9.1

axis : None or int or tuple of ints, optional
    Gradient is calculated only along the given axis or axes
    The default (axis = None) is to calculate the gradient for all the axes
    of the input array. axis may be negative, in which case it counts from
    the last to the first axis.

    .. versionadded:: 1.11.0

Returns
-------
gradient : ndarray or list of ndarray
    A list of ndarrays (or a single ndarray if there is only one dimension)
    corresponding to the derivatives of f with respect to each dimension.
    Each derivative has the same shape as f.

Examples
--------
>>> f = np.array([1, 2, 4, 7, 11, 16], dtype=float)
>>> np.gradient(f)
array([1. , 1.5, 2.5, 3.5, 4.5, 5. ])
>>> np.gradient(f, 2)
array([0.5 ,  0.75,  1.25,  1.75,  2.25,  2.5 ])

Spacing can be also specified with an array that represents the coordinates
of the values F along the dimensions.
For instance a uniform spacing:

>>> x = np.arange(f.size)
>>> np.gradient(f, x)
array([1. ,  1.5,  2.5,  3.5,  4.5,  5. ])

Or a non uniform one:

>>> x = np.array([0., 1., 1.5, 3.5, 4., 6.], dtype=float)
>>> np.gradient(f, x)
array([1. ,  3. ,  3.5,  6.7,  6.9,  2.5])

For two dimensional arrays, the return will be two arrays ordered by
axis. In this example the first array stands for the gradient in
rows and the second one in columns direction:

>>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=float))
[array([[ 2.,  2., -1.],
       [ 2.,  2., -1.]]), array([[1. , 2.5, 4. ],
       [1. , 1. , 1. ]])]

In this example the spacing is also specified:
uniform for axis=0 and non uniform for axis=1

>>> dx = 2.
>>> y = [1., 1.5, 3.5]
>>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=float), dx, y)
[array([[ 1. ,  1. , -0.5],
       [ 1. ,  1. , -0.5]]), array([[2. , 2. , 2. ],
       [2. , 1.7, 0.5]])]

It is possible to specify how boundaries are treated using `edge_order`

>>> x = np.array([0, 1, 2, 3, 4])
>>> f = x**2
>>> np.gradient(f, edge_order=1)
array([1.,  2.,  4.,  6.,  7.])
>>> np.gradient(f, edge_order=2)
array([0., 2., 4., 6., 8.])

The `axis` keyword can be used to specify a subset of axes of which the
gradient is calculated

>>> np.gradient(np.array([[1, 2, 6], [3, 4, 5]], dtype=float), axis=0)
array([[ 2.,  2., -1.],
       [ 2.,  2., -1.]])

Notes
-----
Assuming that :math:`f\in C^{3}` (i.e., :math:`f` has at least 3 continuous
derivatives) and let :math:`h_{*}` be a non-homogeneous stepsize, we
minimize the "consistency error" :math:`\eta_{i}` between the true gradient
and its estimate from a linear combination of the neighboring grid-points:

.. math::

    \eta_{i} = f_{i}^{\left(1\right)} -
                \left[ \alpha f\left(x_{i}\right) +
                        \beta f\left(x_{i} + h_{d}\right) +
                        \gamma f\left(x_{i}-h_{s}\right)
                \right]

By substituting :math:`f(x_{i} + h_{d})` and :math:`f(x_{i} - h_{s})`
with their Taylor series expansion, this translates into solving
the following the linear system:

.. math::

    \left\{
        \begin{array}{r}
            \alpha+\beta+\gamma=0 \\
            \beta h_{d}-\gamma h_{s}=1 \\
            \beta h_{d}^{2}+\gamma h_{s}^{2}=0
        \end{array}
    \right.

The resulting approximation of :math:`f_{i}^{(1)}` is the following:

.. math::

    \hat f_{i}^{(1)} =
        \frac{
            h_{s}^{2}f\left(x_{i} + h_{d}\right)
            + \left(h_{d}^{2} - h_{s}^{2}\right)f\left(x_{i}\right)
            - h_{d}^{2}f\left(x_{i}-h_{s}\right)}
            { h_{s}h_{d}\left(h_{d} + h_{s}\right)}
        + \mathcal{O}\left(\frac{h_{d}h_{s}^{2}
                            + h_{s}h_{d}^{2}}{h_{d}
                            + h_{s}}\right)

It is worth noting that if :math:`h_{s}=h_{d}`
(i.e., data are evenly spaced)
we find the standard second order approximation:

.. math::

    \hat f_{i}^{(1)}=
        \frac{f\left(x_{i+1}\right) - f\left(x_{i-1}\right)}{2h}
        + \mathcal{O}\left(h^{2}\right)

With a similar procedure the forward/backward approximations used for
boundaries can be derived.

References
----------
.. [1]  Quarteroni A., Sacco R., Saleri F. (2007) Numerical Mathematics
        (Texts in Applied Mathematics). New York: Springer.
.. [2]  Durran D. R. (1999) Numerical Methods for Wave Equations
        in Geophysical Fluid Dynamics. New York: Springer.
.. [3]  Fornberg B. (1988) Generation of Finite Difference Formulas on
        Arbitrarily Spaced Grids,
        Mathematics of Computation 51, no. 184 : 699-706.
        `PDF <http://www.ams.org/journals/mcom/1988-51-184/
        S0025-5718-1988-0935077-0/S0025-5718-1988-0935077-0.pdf>`_.

---
## _diff_dispatcher
```python
from function_base import _diff_dispatcher
```



---
## diff
```python
from function_base import diff
```

Calculate the n-th discrete difference along the given axis.

The first difference is given by ``out[i] = a[i+1] - a[i]`` along
the given axis, higher differences are calculated by using `diff`
recursively.

Parameters
----------
a : array_like
    Input array
n : int, optional
    The number of times values are differenced. If zero, the input
    is returned as-is.
axis : int, optional
    The axis along which the difference is taken, default is the
    last axis.
prepend, append : array_like, optional
    Values to prepend or append to `a` along axis prior to
    performing the difference.  Scalar values are expanded to
    arrays with length 1 in the direction of axis and the shape
    of the input array in along all other axes.  Otherwise the
    dimension and shape must match `a` except along axis.

    .. versionadded:: 1.16.0

Returns
-------
diff : ndarray
    The n-th differences. The shape of the output is the same as `a`
    except along `axis` where the dimension is smaller by `n`. The
    type of the output is the same as the type of the difference
    between any two elements of `a`. This is the same as the type of
    `a` in most cases. A notable exception is `datetime64`, which
    results in a `timedelta64` output array.

See Also
--------
gradient, ediff1d, cumsum

Notes
-----
Type is preserved for boolean arrays, so the result will contain
`False` when consecutive elements are the same and `True` when they
differ.

For unsigned integer arrays, the results will also be unsigned. This
should not be surprising, as the result is consistent with
calculating the difference directly:

>>> u8_arr = np.array([1, 0], dtype=np.uint8)
>>> np.diff(u8_arr)
array([255], dtype=uint8)
>>> u8_arr[1,...] - u8_arr[0,...]
255

If this is not desirable, then the array should be cast to a larger
integer type first:

>>> i16_arr = u8_arr.astype(np.int16)
>>> np.diff(i16_arr)
array([-1], dtype=int16)

Examples
--------
>>> x = np.array([1, 2, 4, 7, 0])
>>> np.diff(x)
array([ 1,  2,  3, -7])
>>> np.diff(x, n=2)
array([  1,   1, -10])

>>> x = np.array([[1, 3, 6, 10], [0, 5, 6, 8]])
>>> np.diff(x)
array([[2, 3, 4],
       [5, 1, 2]])
>>> np.diff(x, axis=0)
array([[-1,  2,  0, -2]])

>>> x = np.arange('1066-10-13', '1066-10-16', dtype=np.datetime64)
>>> np.diff(x)
array([1, 1], dtype='timedelta64[D]')

---
## _interp_dispatcher
```python
from function_base import _interp_dispatcher
```



---
## interp
```python
from function_base import interp
```

One-dimensional linear interpolation for monotonically increasing sample points.

Returns the one-dimensional piecewise linear interpolant to a function
with given discrete data points (`xp`, `fp`), evaluated at `x`.

Parameters
----------
x : array_like
    The x-coordinates at which to evaluate the interpolated values.

xp : 1-D sequence of floats
    The x-coordinates of the data points, must be increasing if argument
    `period` is not specified. Otherwise, `xp` is internally sorted after
    normalizing the periodic boundaries with ``xp = xp % period``.

fp : 1-D sequence of float or complex
    The y-coordinates of the data points, same length as `xp`.

left : optional float or complex corresponding to fp
    Value to return for `x < xp[0]`, default is `fp[0]`.

right : optional float or complex corresponding to fp
    Value to return for `x > xp[-1]`, default is `fp[-1]`.

period : None or float, optional
    A period for the x-coordinates. This parameter allows the proper
    interpolation of angular x-coordinates. Parameters `left` and `right`
    are ignored if `period` is specified.

    .. versionadded:: 1.10.0

Returns
-------
y : float or complex (corresponding to fp) or ndarray
    The interpolated values, same shape as `x`.

Raises
------
ValueError
    If `xp` and `fp` have different length
    If `xp` or `fp` are not 1-D sequences
    If `period == 0`

See Also
--------
scipy.interpolate

Warnings
--------
The x-coordinate sequence is expected to be increasing, but this is not
explicitly enforced.  However, if the sequence `xp` is non-increasing,
interpolation results are meaningless.

Note that, since NaN is unsortable, `xp` also cannot contain NaNs.

A simple check for `xp` being strictly increasing is::

    np.all(np.diff(xp) > 0)

Examples
--------
>>> xp = [1, 2, 3]
>>> fp = [3, 2, 0]
>>> np.interp(2.5, xp, fp)
1.0
>>> np.interp([0, 1, 1.5, 2.72, 3.14], xp, fp)
array([3.  , 3.  , 2.5 , 0.56, 0.  ])
>>> UNDEF = -99.0
>>> np.interp(3.14, xp, fp, right=UNDEF)
-99.0

Plot an interpolant to the sine function:

>>> x = np.linspace(0, 2*np.pi, 10)
>>> y = np.sin(x)
>>> xvals = np.linspace(0, 2*np.pi, 50)
>>> yinterp = np.interp(xvals, x, y)
>>> import matplotlib.pyplot as plt
>>> plt.plot(x, y, 'o')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.plot(xvals, yinterp, '-x')
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.show()

Interpolation with periodic x-coordinates:

>>> x = [-180, -170, -185, 185, -10, -5, 0, 365]
>>> xp = [190, -190, 350, -350]
>>> fp = [5, 10, 3, 4]
>>> np.interp(x, xp, fp, period=360)
array([7.5 , 5.  , 8.75, 6.25, 3.  , 3.25, 3.5 , 3.75])

Complex interpolation:

>>> x = [1.5, 4.0]
>>> xp = [2,3,5]
>>> fp = [1.0j, 0, 2+3j]
>>> np.interp(x, xp, fp)
array([0.+1.j , 1.+1.5j])

---
## _angle_dispatcher
```python
from function_base import _angle_dispatcher
```



---
## angle
```python
from function_base import angle
```

Return the angle of the complex argument.

Parameters
----------
z : array_like
    A complex number or sequence of complex numbers.
deg : bool, optional
    Return angle in degrees if True, radians if False (default).

Returns
-------
angle : ndarray or scalar
    The counterclockwise angle from the positive real axis on the complex
    plane in the range ``(-pi, pi]``, with dtype as numpy.float64.

    .. versionchanged:: 1.16.0
        This function works on subclasses of ndarray like `ma.array`.

See Also
--------
arctan2
absolute

Notes
-----
Although the angle of the complex number 0 is undefined, ``numpy.angle(0)``
returns the value 0.

Examples
--------
>>> np.angle([1.0, 1.0j, 1+1j])               # in radians
array([ 0.        ,  1.57079633,  0.78539816]) # may vary
>>> np.angle(1+1j, deg=True)                  # in degrees
45.0

---
## _unwrap_dispatcher
```python
from function_base import _unwrap_dispatcher
```



---
## unwrap
```python
from function_base import unwrap
```

Unwrap by taking the complement of large deltas with respect to the period.

This unwraps a signal `p` by changing elements which have an absolute
difference from their predecessor of more than ``max(discont, period/2)``
to their `period`-complementary values.

For the default case where `period` is :math:`2\pi` and `discont` is
:math:`\pi`, this unwraps a radian phase `p` such that adjacent differences
are never greater than :math:`\pi` by adding :math:`2k\pi` for some
integer :math:`k`.

Parameters
----------
p : array_like
    Input array.
discont : float, optional
    Maximum discontinuity between values, default is ``period/2``.
    Values below ``period/2`` are treated as if they were ``period/2``.
    To have an effect different from the default, `discont` should be
    larger than ``period/2``.
axis : int, optional
    Axis along which unwrap will operate, default is the last axis.
period : float, optional
    Size of the range over which the input wraps. By default, it is
    ``2 pi``.

    .. versionadded:: 1.21.0

Returns
-------
out : ndarray
    Output array.

See Also
--------
rad2deg, deg2rad

Notes
-----
If the discontinuity in `p` is smaller than ``period/2``,
but larger than `discont`, no unwrapping is done because taking
the complement would only make the discontinuity larger.

Examples
--------
>>> phase = np.linspace(0, np.pi, num=5)
>>> phase[3:] += np.pi
>>> phase
array([ 0.        ,  0.78539816,  1.57079633,  5.49778714,  6.28318531]) # may vary
>>> np.unwrap(phase)
array([ 0.        ,  0.78539816,  1.57079633, -0.78539816,  0.        ]) # may vary
>>> np.unwrap([0, 1, 2, -1, 0], period=4)
array([0, 1, 2, 3, 4])
>>> np.unwrap([ 1, 2, 3, 4, 5, 6, 1, 2, 3], period=6)
array([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> np.unwrap([2, 3, 4, 5, 2, 3, 4, 5], period=4)
array([2, 3, 4, 5, 6, 7, 8, 9])
>>> phase_deg = np.mod(np.linspace(0 ,720, 19), 360) - 180
>>> np.unwrap(phase_deg, period=360)
array([-180., -140., -100.,  -60.,  -20.,   20.,   60.,  100.,  140.,
        180.,  220.,  260.,  300.,  340.,  380.,  420.,  460.,  500.,
        540.])

---
## _sort_complex
```python
from function_base import _sort_complex
```



---
## sort_complex
```python
from function_base import sort_complex
```

Sort a complex array using the real part first, then the imaginary part.

Parameters
----------
a : array_like
    Input array

Returns
-------
out : complex ndarray
    Always returns a sorted complex array.

Examples
--------
>>> np.sort_complex([5, 3, 6, 2, 1])
array([1.+0.j, 2.+0.j, 3.+0.j, 5.+0.j, 6.+0.j])

>>> np.sort_complex([1 + 2j, 2 - 1j, 3 - 2j, 3 - 3j, 3 + 5j])
array([1.+2.j,  2.-1.j,  3.-3.j,  3.-2.j,  3.+5.j])

---
## _trim_zeros
```python
from function_base import _trim_zeros
```



---
## trim_zeros
```python
from function_base import trim_zeros
```

Trim the leading and/or trailing zeros from a 1-D array or sequence.

Parameters
----------
filt : 1-D array or sequence
    Input array.
trim : str, optional
    A string with 'f' representing trim from front and 'b' to trim from
    back. Default is 'fb', trim zeros from both front and back of the
    array.

Returns
-------
trimmed : 1-D array or sequence
    The result of trimming the input. The input data type is preserved.

Examples
--------
>>> a = np.array((0, 0, 0, 1, 2, 3, 0, 2, 1, 0))
>>> np.trim_zeros(a)
array([1, 2, 3, 0, 2, 1])

>>> np.trim_zeros(a, 'b')
array([0, 0, 0, ..., 0, 2, 1])

The input data type is preserved, list/tuple in means list/tuple out.

>>> np.trim_zeros([0, 1, 2, 0])
[1, 2]

---
## _extract_dispatcher
```python
from function_base import _extract_dispatcher
```



---
## extract
```python
from function_base import extract
```

Return the elements of an array that satisfy some condition.

This is equivalent to ``np.compress(ravel(condition), ravel(arr))``.  If
`condition` is boolean ``np.extract`` is equivalent to ``arr[condition]``.

Note that `place` does the exact opposite of `extract`.

Parameters
----------
condition : array_like
    An array whose nonzero or True entries indicate the elements of `arr`
    to extract.
arr : array_like
    Input array of the same size as `condition`.

Returns
-------
extract : ndarray
    Rank 1 array of values from `arr` where `condition` is True.

See Also
--------
take, put, copyto, compress, place

Examples
--------
>>> arr = np.arange(12).reshape((3, 4))
>>> arr
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])
>>> condition = np.mod(arr, 3)==0
>>> condition
array([[ True, False, False,  True],
       [False, False,  True, False],
       [False,  True, False, False]])
>>> np.extract(condition, arr)
array([0, 3, 6, 9])


If `condition` is boolean:

>>> arr[condition]
array([0, 3, 6, 9])

---
## _place_dispatcher
```python
from function_base import _place_dispatcher
```



---
## place
```python
from function_base import place
```

Change elements of an array based on conditional and input values.

Similar to ``np.copyto(arr, vals, where=mask)``, the difference is that
`place` uses the first N elements of `vals`, where N is the number of
True values in `mask`, while `copyto` uses the elements where `mask`
is True.

Note that `extract` does the exact opposite of `place`.

Parameters
----------
arr : ndarray
    Array to put data into.
mask : array_like
    Boolean mask array. Must have the same size as `a`.
vals : 1-D sequence
    Values to put into `a`. Only the first N elements are used, where
    N is the number of True values in `mask`. If `vals` is smaller
    than N, it will be repeated, and if elements of `a` are to be masked,
    this sequence must be non-empty.

See Also
--------
copyto, put, take, extract

Examples
--------
>>> arr = np.arange(6).reshape(2, 3)
>>> np.place(arr, arr>2, [44, 55])
>>> arr
array([[ 0,  1,  2],
       [44, 55, 44]])

---
## disp
```python
from function_base import disp
```

Display a message on a device.

Parameters
----------
mesg : str
    Message to display.
device : object
    Device to write message. If None, defaults to ``sys.stdout`` which is
    very similar to ``print``. `device` needs to have ``write()`` and
    ``flush()`` methods.
linefeed : bool, optional
    Option whether to print a line feed or not. Defaults to True.

Raises
------
AttributeError
    If `device` does not have a ``write()`` or ``flush()`` method.

Examples
--------
Besides ``sys.stdout``, a file-like object can also be used as it has
both required methods:

>>> from io import StringIO
>>> buf = StringIO()
>>> np.disp(u'"Display" in a file', device=buf)
>>> buf.getvalue()
'"Display" in a file\n'

---
## _parse_gufunc_signature
```python
from function_base import _parse_gufunc_signature
```

Parse string signatures for a generalized universal function.

Arguments
---------
signature : string
    Generalized universal function signature, e.g., ``(m,n),(n,p)->(m,p)``
    for ``np.matmul``.

Returns
-------
Tuple of input and output core dimensions parsed from the signature, each
of the form List[Tuple[str, ...]].

---
## _update_dim_sizes
```python
from function_base import _update_dim_sizes
```

Incrementally check and update core dimension sizes for a single argument.

Arguments
---------
dim_sizes : Dict[str, int]
    Sizes of existing core dimensions. Will be updated in-place.
arg : ndarray
    Argument to examine.
core_dims : Tuple[str, ...]
    Core dimensions for this argument.

---
## _parse_input_dimensions
```python
from function_base import _parse_input_dimensions
```

Parse broadcast and core dimensions for vectorize with a signature.

Arguments
---------
args : Tuple[ndarray, ...]
    Tuple of input arguments to examine.
input_core_dims : List[Tuple[str, ...]]
    List of core dimensions corresponding to each input.

Returns
-------
broadcast_shape : Tuple[int, ...]
    Common shape to broadcast all non-core dimensions to.
dim_sizes : Dict[str, int]
    Common sizes for named core dimensions.

---
## _calculate_shapes
```python
from function_base import _calculate_shapes
```

Helper for calculating broadcast shapes with core dimensions.

---
## _create_arrays
```python
from function_base import _create_arrays
```

Helper for creating output arrays in vectorize.

---
## vectorize
```python
from function_base import vectorize
```

vectorize(pyfunc=np._NoValue, otypes=None, doc=None, excluded=None,
cache=False, signature=None)

Returns an object that acts like pyfunc, but takes arrays as input.

Define a vectorized function which takes a nested sequence of objects or
numpy arrays as inputs and returns a single numpy array or a tuple of numpy
arrays. The vectorized function evaluates `pyfunc` over successive tuples
of the input arrays like the python map function, except it uses the
broadcasting rules of numpy.

The data type of the output of `vectorized` is determined by calling
the function with the first element of the input.  This can be avoided
by specifying the `otypes` argument.

Parameters
----------
pyfunc : callable, optional
    A python function or method.
    Can be omitted to produce a decorator with keyword arguments.
otypes : str or list of dtypes, optional
    The output data type. It must be specified as either a string of
    typecode characters or a list of data type specifiers. There should
    be one data type specifier for each output.
doc : str, optional
    The docstring for the function. If None, the docstring will be the
    ``pyfunc.__doc__``.
excluded : set, optional
    Set of strings or integers representing the positional or keyword
    arguments for which the function will not be vectorized.  These will be
    passed directly to `pyfunc` unmodified.

    .. versionadded:: 1.7.0

cache : bool, optional
    If `True`, then cache the first function call that determines the number
    of outputs if `otypes` is not provided.

    .. versionadded:: 1.7.0

signature : string, optional
    Generalized universal function signature, e.g., ``(m,n),(n)->(m)`` for
    vectorized matrix-vector multiplication. If provided, ``pyfunc`` will
    be called with (and expected to return) arrays with shapes given by the
    size of corresponding core dimensions. By default, ``pyfunc`` is
    assumed to take scalars as input and output.

    .. versionadded:: 1.12.0

Returns
-------
out : callable
    A vectorized function if ``pyfunc`` was provided,
    a decorator otherwise.

See Also
--------
frompyfunc : Takes an arbitrary Python function and returns a ufunc

Notes
-----
The `vectorize` function is provided primarily for convenience, not for
performance. The implementation is essentially a for loop.

If `otypes` is not specified, then a call to the function with the
first argument will be used to determine the number of outputs.  The
results of this call will be cached if `cache` is `True` to prevent
calling the function twice.  However, to implement the cache, the
original function must be wrapped which will slow down subsequent
calls, so only do this if your function is expensive.

The new keyword argument interface and `excluded` argument support
further degrades performance.

References
----------
.. [1] :doc:`/reference/c-api/generalized-ufuncs`

Examples
--------
>>> def myfunc(a, b):
...     "Return a-b if a>b, otherwise return a+b"
...     if a > b:
...         return a - b
...     else:
...         return a + b

>>> vfunc = np.vectorize(myfunc)
>>> vfunc([1, 2, 3, 4], 2)
array([3, 4, 1, 2])

The docstring is taken from the input function to `vectorize` unless it
is specified:

>>> vfunc.__doc__
'Return a-b if a>b, otherwise return a+b'
>>> vfunc = np.vectorize(myfunc, doc='Vectorized `myfunc`')
>>> vfunc.__doc__
'Vectorized `myfunc`'

The output type is determined by evaluating the first element of the input,
unless it is specified:

>>> out = vfunc([1, 2, 3, 4], 2)
>>> type(out[0])
<class 'numpy.int64'>
>>> vfunc = np.vectorize(myfunc, otypes=[float])
>>> out = vfunc([1, 2, 3, 4], 2)
>>> type(out[0])
<class 'numpy.float64'>

The `excluded` argument can be used to prevent vectorizing over certain
arguments.  This can be useful for array-like arguments of a fixed length
such as the coefficients for a polynomial as in `polyval`:

>>> def mypolyval(p, x):
...     _p = list(p)
...     res = _p.pop(0)
...     while _p:
...         res = res*x + _p.pop(0)
...     return res
>>> vpolyval = np.vectorize(mypolyval, excluded=['p'])
>>> vpolyval(p=[1, 2, 3], x=[0, 1])
array([3, 6])

Positional arguments may also be excluded by specifying their position:

>>> vpolyval.excluded.add(0)
>>> vpolyval([1, 2, 3], x=[0, 1])
array([3, 6])

The `signature` argument allows for vectorizing functions that act on
non-scalar arrays of fixed length. For example, you can use it for a
vectorized calculation of Pearson correlation coefficient and its p-value:

>>> import scipy.stats
>>> pearsonr = np.vectorize(scipy.stats.pearsonr,
...                 signature='(n),(n)->(),()')
>>> pearsonr([[0, 1, 2, 3]], [[1, 2, 3, 4], [4, 3, 2, 1]])
(array([ 1., -1.]), array([ 0.,  0.]))

Or for a vectorized convolution:

>>> convolve = np.vectorize(np.convolve, signature='(n),(m)->(k)')
>>> convolve(np.eye(4), [1, 2, 1])
array([[1., 2., 1., 0., 0., 0.],
       [0., 1., 2., 1., 0., 0.],
       [0., 0., 1., 2., 1., 0.],
       [0., 0., 0., 1., 2., 1.]])

Decorator syntax is supported.  The decorator can be called as
a function to provide keyword arguments.
>>>@np.vectorize
...def identity(x):
...    return x
...
>>>identity([0, 1, 2])
array([0, 1, 2])
>>>@np.vectorize(otypes=[float])
...def as_float(x):
...    return x
...
>>>as_float([0, 1, 2])
array([0., 1., 2.])

---
## _cov_dispatcher
```python
from function_base import _cov_dispatcher
```



---
## cov
```python
from function_base import cov
```

Estimate a covariance matrix, given data and weights.

Covariance indicates the level to which two variables vary together.
If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,
then the covariance matrix element :math:`C_{ij}` is the covariance of
:math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance
of :math:`x_i`.

See the notes for an outline of the algorithm.

Parameters
----------
m : array_like
    A 1-D or 2-D array containing multiple variables and observations.
    Each row of `m` represents a variable, and each column a single
    observation of all those variables. Also see `rowvar` below.
y : array_like, optional
    An additional set of variables and observations. `y` has the same form
    as that of `m`.
rowvar : bool, optional
    If `rowvar` is True (default), then each row represents a
    variable, with observations in the columns. Otherwise, the relationship
    is transposed: each column represents a variable, while the rows
    contain observations.
bias : bool, optional
    Default normalization (False) is by ``(N - 1)``, where ``N`` is the
    number of observations given (unbiased estimate). If `bias` is True,
    then normalization is by ``N``. These values can be overridden by using
    the keyword ``ddof`` in numpy versions >= 1.5.
ddof : int, optional
    If not ``None`` the default value implied by `bias` is overridden.
    Note that ``ddof=1`` will return the unbiased estimate, even if both
    `fweights` and `aweights` are specified, and ``ddof=0`` will return
    the simple average. See the notes for the details. The default value
    is ``None``.

    .. versionadded:: 1.5
fweights : array_like, int, optional
    1-D array of integer frequency weights; the number of times each
    observation vector should be repeated.

    .. versionadded:: 1.10
aweights : array_like, optional
    1-D array of observation vector weights. These relative weights are
    typically large for observations considered "important" and smaller for
    observations considered less "important". If ``ddof=0`` the array of
    weights can be used to assign probabilities to observation vectors.

    .. versionadded:: 1.10
dtype : data-type, optional
    Data-type of the result. By default, the return data-type will have
    at least `numpy.float64` precision.

    .. versionadded:: 1.20

Returns
-------
out : ndarray
    The covariance matrix of the variables.

See Also
--------
corrcoef : Normalized covariance matrix

Notes
-----
Assume that the observations are in the columns of the observation
array `m` and let ``f = fweights`` and ``a = aweights`` for brevity. The
steps to compute the weighted covariance are as follows::

    >>> m = np.arange(10, dtype=np.float64)
    >>> f = np.arange(10) * 2
    >>> a = np.arange(10) ** 2.
    >>> ddof = 1
    >>> w = f * a
    >>> v1 = np.sum(w)
    >>> v2 = np.sum(w * a)
    >>> m -= np.sum(m * w, axis=None, keepdims=True) / v1
    >>> cov = np.dot(m * w, m.T) * v1 / (v1**2 - ddof * v2)

Note that when ``a == 1``, the normalization factor
``v1 / (v1**2 - ddof * v2)`` goes over to ``1 / (np.sum(f) - ddof)``
as it should.

Examples
--------
Consider two variables, :math:`x_0` and :math:`x_1`, which
correlate perfectly, but in opposite directions:

>>> x = np.array([[0, 2], [1, 1], [2, 0]]).T
>>> x
array([[0, 1, 2],
       [2, 1, 0]])

Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance
matrix shows this clearly:

>>> np.cov(x)
array([[ 1., -1.],
       [-1.,  1.]])

Note that element :math:`C_{0,1}`, which shows the correlation between
:math:`x_0` and :math:`x_1`, is negative.

Further, note how `x` and `y` are combined:

>>> x = [-2.1, -1,  4.3]
>>> y = [3,  1.1,  0.12]
>>> X = np.stack((x, y), axis=0)
>>> np.cov(X)
array([[11.71      , -4.286     ], # may vary
       [-4.286     ,  2.144133]])
>>> np.cov(x, y)
array([[11.71      , -4.286     ], # may vary
       [-4.286     ,  2.144133]])
>>> np.cov(x)
array(11.71)

---
## _corrcoef_dispatcher
```python
from function_base import _corrcoef_dispatcher
```



---
## corrcoef
```python
from function_base import corrcoef
```

Return Pearson product-moment correlation coefficients.

Please refer to the documentation for `cov` for more detail.  The
relationship between the correlation coefficient matrix, `R`, and the
covariance matrix, `C`, is

.. math:: R_{ij} = \frac{ C_{ij} } { \sqrt{ C_{ii} C_{jj} } }

The values of `R` are between -1 and 1, inclusive.

Parameters
----------
x : array_like
    A 1-D or 2-D array containing multiple variables and observations.
    Each row of `x` represents a variable, and each column a single
    observation of all those variables. Also see `rowvar` below.
y : array_like, optional
    An additional set of variables and observations. `y` has the same
    shape as `x`.
rowvar : bool, optional
    If `rowvar` is True (default), then each row represents a
    variable, with observations in the columns. Otherwise, the relationship
    is transposed: each column represents a variable, while the rows
    contain observations.
bias : _NoValue, optional
    Has no effect, do not use.

    .. deprecated:: 1.10.0
ddof : _NoValue, optional
    Has no effect, do not use.

    .. deprecated:: 1.10.0
dtype : data-type, optional
    Data-type of the result. By default, the return data-type will have
    at least `numpy.float64` precision.

    .. versionadded:: 1.20

Returns
-------
R : ndarray
    The correlation coefficient matrix of the variables.

See Also
--------
cov : Covariance matrix

Notes
-----
Due to floating point rounding the resulting array may not be Hermitian,
the diagonal elements may not be 1, and the elements may not satisfy the
inequality abs(a) <= 1. The real and imaginary parts are clipped to the
interval [-1,  1] in an attempt to improve on that situation but is not
much help in the complex case.

This function accepts but discards arguments `bias` and `ddof`.  This is
for backwards compatibility with previous versions of this function.  These
arguments had no effect on the return values of the function and can be
safely ignored in this and previous versions of numpy.

Examples
--------
In this example we generate two random arrays, ``xarr`` and ``yarr``, and
compute the row-wise and column-wise Pearson correlation coefficients,
``R``. Since ``rowvar`` is  true by  default, we first find the row-wise
Pearson correlation coefficients between the variables of ``xarr``.

>>> import numpy as np
>>> rng = np.random.default_rng(seed=42)
>>> xarr = rng.random((3, 3))
>>> xarr
array([[0.77395605, 0.43887844, 0.85859792],
       [0.69736803, 0.09417735, 0.97562235],
       [0.7611397 , 0.78606431, 0.12811363]])
>>> R1 = np.corrcoef(xarr)
>>> R1
array([[ 1.        ,  0.99256089, -0.68080986],
       [ 0.99256089,  1.        , -0.76492172],
       [-0.68080986, -0.76492172,  1.        ]])

If we add another set of variables and observations ``yarr``, we can
compute the row-wise Pearson correlation coefficients between the
variables in ``xarr`` and ``yarr``.

>>> yarr = rng.random((3, 3))
>>> yarr
array([[0.45038594, 0.37079802, 0.92676499],
       [0.64386512, 0.82276161, 0.4434142 ],
       [0.22723872, 0.55458479, 0.06381726]])
>>> R2 = np.corrcoef(xarr, yarr)
>>> R2
array([[ 1.        ,  0.99256089, -0.68080986,  0.75008178, -0.934284  ,
        -0.99004057],
       [ 0.99256089,  1.        , -0.76492172,  0.82502011, -0.97074098,
        -0.99981569],
       [-0.68080986, -0.76492172,  1.        , -0.99507202,  0.89721355,
         0.77714685],
       [ 0.75008178,  0.82502011, -0.99507202,  1.        , -0.93657855,
        -0.83571711],
       [-0.934284  , -0.97074098,  0.89721355, -0.93657855,  1.        ,
         0.97517215],
       [-0.99004057, -0.99981569,  0.77714685, -0.83571711,  0.97517215,
         1.        ]])

Finally if we use the option ``rowvar=False``, the columns are now
being treated as the variables and we will find the column-wise Pearson
correlation coefficients between variables in ``xarr`` and ``yarr``.

>>> R3 = np.corrcoef(xarr, yarr, rowvar=False)
>>> R3
array([[ 1.        ,  0.77598074, -0.47458546, -0.75078643, -0.9665554 ,
         0.22423734],
       [ 0.77598074,  1.        , -0.92346708, -0.99923895, -0.58826587,
        -0.44069024],
       [-0.47458546, -0.92346708,  1.        ,  0.93773029,  0.23297648,
         0.75137473],
       [-0.75078643, -0.99923895,  0.93773029,  1.        ,  0.55627469,
         0.47536961],
       [-0.9665554 , -0.58826587,  0.23297648,  0.55627469,  1.        ,
        -0.46666491],
       [ 0.22423734, -0.44069024,  0.75137473,  0.47536961, -0.46666491,
         1.        ]])

---
## blackman
```python
from function_base import blackman
```

Return the Blackman window.

The Blackman window is a taper formed by using the first three
terms of a summation of cosines. It was designed to have close to the
minimal leakage possible.  It is close to optimal, only slightly worse
than a Kaiser window.

Parameters
----------
M : int
    Number of points in the output window. If zero or less, an empty
    array is returned.

Returns
-------
out : ndarray
    The window, with the maximum value normalized to one (the value one
    appears only if the number of samples is odd).

See Also
--------
bartlett, hamming, hanning, kaiser

Notes
-----
The Blackman window is defined as

.. math::  w(n) = 0.42 - 0.5 \cos(2\pi n/M) + 0.08 \cos(4\pi n/M)

Most references to the Blackman window come from the signal processing
literature, where it is used as one of many windowing functions for
smoothing values.  It is also known as an apodization (which means
"removing the foot", i.e. smoothing discontinuities at the beginning
and end of the sampled signal) or tapering function. It is known as a
"near optimal" tapering function, almost as good (by some measures)
as the kaiser window.

References
----------
Blackman, R.B. and Tukey, J.W., (1958) The measurement of power spectra,
Dover Publications, New York.

Oppenheim, A.V., and R.W. Schafer. Discrete-Time Signal Processing.
Upper Saddle River, NJ: Prentice-Hall, 1999, pp. 468-471.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> np.blackman(12)
array([-1.38777878e-17,   3.26064346e-02,   1.59903635e-01, # may vary
        4.14397981e-01,   7.36045180e-01,   9.67046769e-01,
        9.67046769e-01,   7.36045180e-01,   4.14397981e-01,
        1.59903635e-01,   3.26064346e-02,  -1.38777878e-17])

Plot the window and the frequency response:

>>> from numpy.fft import fft, fftshift
>>> window = np.blackman(51)
>>> plt.plot(window)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Blackman window")
Text(0.5, 1.0, 'Blackman window')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("Sample")
Text(0.5, 0, 'Sample')
>>> plt.show()

>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> A = fft(window, 2048) / 25.5
>>> mag = np.abs(fftshift(A))
>>> freq = np.linspace(-0.5, 0.5, len(A))
>>> with np.errstate(divide='ignore', invalid='ignore'):
...     response = 20 * np.log10(mag)
...
>>> response = np.clip(response, -100, 100)
>>> plt.plot(freq, response)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Frequency response of Blackman window")
Text(0.5, 1.0, 'Frequency response of Blackman window')
>>> plt.ylabel("Magnitude [dB]")
Text(0, 0.5, 'Magnitude [dB]')
>>> plt.xlabel("Normalized frequency [cycles per sample]")
Text(0.5, 0, 'Normalized frequency [cycles per sample]')
>>> _ = plt.axis('tight')
>>> plt.show()

---
## bartlett
```python
from function_base import bartlett
```

Return the Bartlett window.

The Bartlett window is very similar to a triangular window, except
that the end points are at zero.  It is often used in signal
processing for tapering a signal, without generating too much
ripple in the frequency domain.

Parameters
----------
M : int
    Number of points in the output window. If zero or less, an
    empty array is returned.

Returns
-------
out : array
    The triangular window, with the maximum value normalized to one
    (the value one appears only if the number of samples is odd), with
    the first and last samples equal to zero.

See Also
--------
blackman, hamming, hanning, kaiser

Notes
-----
The Bartlett window is defined as

.. math:: w(n) = \frac{2}{M-1} \left(
          \frac{M-1}{2} - \left|n - \frac{M-1}{2}\right|
          \right)

Most references to the Bartlett window come from the signal processing
literature, where it is used as one of many windowing functions for
smoothing values.  Note that convolution with this window produces linear
interpolation.  It is also known as an apodization (which means "removing
the foot", i.e. smoothing discontinuities at the beginning and end of the
sampled signal) or tapering function. The Fourier transform of the
Bartlett window is the product of two sinc functions. Note the excellent
discussion in Kanasewich [2]_.

References
----------
.. [1] M.S. Bartlett, "Periodogram Analysis and Continuous Spectra",
       Biometrika 37, 1-16, 1950.
.. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics",
       The University of Alberta Press, 1975, pp. 109-110.
.. [3] A.V. Oppenheim and R.W. Schafer, "Discrete-Time Signal
       Processing", Prentice-Hall, 1999, pp. 468-471.
.. [4] Wikipedia, "Window function",
       https://en.wikipedia.org/wiki/Window_function
.. [5] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
       "Numerical Recipes", Cambridge University Press, 1986, page 429.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> np.bartlett(12)
array([ 0.        ,  0.18181818,  0.36363636,  0.54545455,  0.72727273, # may vary
        0.90909091,  0.90909091,  0.72727273,  0.54545455,  0.36363636,
        0.18181818,  0.        ])

Plot the window and its frequency response (requires SciPy and matplotlib):

>>> from numpy.fft import fft, fftshift
>>> window = np.bartlett(51)
>>> plt.plot(window)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Bartlett window")
Text(0.5, 1.0, 'Bartlett window')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("Sample")
Text(0.5, 0, 'Sample')
>>> plt.show()

>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> A = fft(window, 2048) / 25.5
>>> mag = np.abs(fftshift(A))
>>> freq = np.linspace(-0.5, 0.5, len(A))
>>> with np.errstate(divide='ignore', invalid='ignore'):
...     response = 20 * np.log10(mag)
...
>>> response = np.clip(response, -100, 100)
>>> plt.plot(freq, response)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Frequency response of Bartlett window")
Text(0.5, 1.0, 'Frequency response of Bartlett window')
>>> plt.ylabel("Magnitude [dB]")
Text(0, 0.5, 'Magnitude [dB]')
>>> plt.xlabel("Normalized frequency [cycles per sample]")
Text(0.5, 0, 'Normalized frequency [cycles per sample]')
>>> _ = plt.axis('tight')
>>> plt.show()

---
## hanning
```python
from function_base import hanning
```

Return the Hanning window.

The Hanning window is a taper formed by using a weighted cosine.

Parameters
----------
M : int
    Number of points in the output window. If zero or less, an
    empty array is returned.

Returns
-------
out : ndarray, shape(M,)
    The window, with the maximum value normalized to one (the value
    one appears only if `M` is odd).

See Also
--------
bartlett, blackman, hamming, kaiser

Notes
-----
The Hanning window is defined as

.. math::  w(n) = 0.5 - 0.5\cos\left(\frac{2\pi{n}}{M-1}\right)
           \qquad 0 \leq n \leq M-1

The Hanning was named for Julius von Hann, an Austrian meteorologist.
It is also known as the Cosine Bell. Some authors prefer that it be
called a Hann window, to help avoid confusion with the very similar
Hamming window.

Most references to the Hanning window come from the signal processing
literature, where it is used as one of many windowing functions for
smoothing values.  It is also known as an apodization (which means
"removing the foot", i.e. smoothing discontinuities at the beginning
and end of the sampled signal) or tapering function.

References
----------
.. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power
       spectra, Dover Publications, New York.
.. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics",
       The University of Alberta Press, 1975, pp. 106-108.
.. [3] Wikipedia, "Window function",
       https://en.wikipedia.org/wiki/Window_function
.. [4] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
       "Numerical Recipes", Cambridge University Press, 1986, page 425.

Examples
--------
>>> np.hanning(12)
array([0.        , 0.07937323, 0.29229249, 0.57115742, 0.82743037,
       0.97974649, 0.97974649, 0.82743037, 0.57115742, 0.29229249,
       0.07937323, 0.        ])

Plot the window and its frequency response:

>>> import matplotlib.pyplot as plt
>>> from numpy.fft import fft, fftshift
>>> window = np.hanning(51)
>>> plt.plot(window)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Hann window")
Text(0.5, 1.0, 'Hann window')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("Sample")
Text(0.5, 0, 'Sample')
>>> plt.show()

>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> A = fft(window, 2048) / 25.5
>>> mag = np.abs(fftshift(A))
>>> freq = np.linspace(-0.5, 0.5, len(A))
>>> with np.errstate(divide='ignore', invalid='ignore'):
...     response = 20 * np.log10(mag)
...
>>> response = np.clip(response, -100, 100)
>>> plt.plot(freq, response)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Frequency response of the Hann window")
Text(0.5, 1.0, 'Frequency response of the Hann window')
>>> plt.ylabel("Magnitude [dB]")
Text(0, 0.5, 'Magnitude [dB]')
>>> plt.xlabel("Normalized frequency [cycles per sample]")
Text(0.5, 0, 'Normalized frequency [cycles per sample]')
>>> plt.axis('tight')
...
>>> plt.show()

---
## hamming
```python
from function_base import hamming
```

Return the Hamming window.

The Hamming window is a taper formed by using a weighted cosine.

Parameters
----------
M : int
    Number of points in the output window. If zero or less, an
    empty array is returned.

Returns
-------
out : ndarray
    The window, with the maximum value normalized to one (the value
    one appears only if the number of samples is odd).

See Also
--------
bartlett, blackman, hanning, kaiser

Notes
-----
The Hamming window is defined as

.. math::  w(n) = 0.54 - 0.46\cos\left(\frac{2\pi{n}}{M-1}\right)
           \qquad 0 \leq n \leq M-1

The Hamming was named for R. W. Hamming, an associate of J. W. Tukey
and is described in Blackman and Tukey. It was recommended for
smoothing the truncated autocovariance function in the time domain.
Most references to the Hamming window come from the signal processing
literature, where it is used as one of many windowing functions for
smoothing values.  It is also known as an apodization (which means
"removing the foot", i.e. smoothing discontinuities at the beginning
and end of the sampled signal) or tapering function.

References
----------
.. [1] Blackman, R.B. and Tukey, J.W., (1958) The measurement of power
       spectra, Dover Publications, New York.
.. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The
       University of Alberta Press, 1975, pp. 109-110.
.. [3] Wikipedia, "Window function",
       https://en.wikipedia.org/wiki/Window_function
.. [4] W.H. Press,  B.P. Flannery, S.A. Teukolsky, and W.T. Vetterling,
       "Numerical Recipes", Cambridge University Press, 1986, page 425.

Examples
--------
>>> np.hamming(12)
array([ 0.08      ,  0.15302337,  0.34890909,  0.60546483,  0.84123594, # may vary
        0.98136677,  0.98136677,  0.84123594,  0.60546483,  0.34890909,
        0.15302337,  0.08      ])

Plot the window and the frequency response:

>>> import matplotlib.pyplot as plt
>>> from numpy.fft import fft, fftshift
>>> window = np.hamming(51)
>>> plt.plot(window)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Hamming window")
Text(0.5, 1.0, 'Hamming window')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("Sample")
Text(0.5, 0, 'Sample')
>>> plt.show()

>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> A = fft(window, 2048) / 25.5
>>> mag = np.abs(fftshift(A))
>>> freq = np.linspace(-0.5, 0.5, len(A))
>>> response = 20 * np.log10(mag)
>>> response = np.clip(response, -100, 100)
>>> plt.plot(freq, response)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Frequency response of Hamming window")
Text(0.5, 1.0, 'Frequency response of Hamming window')
>>> plt.ylabel("Magnitude [dB]")
Text(0, 0.5, 'Magnitude [dB]')
>>> plt.xlabel("Normalized frequency [cycles per sample]")
Text(0.5, 0, 'Normalized frequency [cycles per sample]')
>>> plt.axis('tight')
...
>>> plt.show()

---
## _chbevl
```python
from function_base import _chbevl
```



---
## _i0_1
```python
from function_base import _i0_1
```



---
## _i0_2
```python
from function_base import _i0_2
```



---
## _i0_dispatcher
```python
from function_base import _i0_dispatcher
```



---
## i0
```python
from function_base import i0
```

Modified Bessel function of the first kind, order 0.

Usually denoted :math:`I_0`.

Parameters
----------
x : array_like of float
    Argument of the Bessel function.

Returns
-------
out : ndarray, shape = x.shape, dtype = float
    The modified Bessel function evaluated at each of the elements of `x`.

See Also
--------
scipy.special.i0, scipy.special.iv, scipy.special.ive

Notes
-----
The scipy implementation is recommended over this function: it is a
proper ufunc written in C, and more than an order of magnitude faster.

We use the algorithm published by Clenshaw [1]_ and referenced by
Abramowitz and Stegun [2]_, for which the function domain is
partitioned into the two intervals [0,8] and (8,inf), and Chebyshev
polynomial expansions are employed in each interval. Relative error on
the domain [0,30] using IEEE arithmetic is documented [3]_ as having a
peak of 5.8e-16 with an rms of 1.4e-16 (n = 30000).

References
----------
.. [1] C. W. Clenshaw, "Chebyshev series for mathematical functions", in
       *National Physical Laboratory Mathematical Tables*, vol. 5, London:
       Her Majesty's Stationery Office, 1962.
.. [2] M. Abramowitz and I. A. Stegun, *Handbook of Mathematical
       Functions*, 10th printing, New York: Dover, 1964, pp. 379.
       https://personal.math.ubc.ca/~cbm/aands/page_379.htm
.. [3] https://metacpan.org/pod/distribution/Math-Cephes/lib/Math/Cephes.pod#i0:-Modified-Bessel-function-of-order-zero

Examples
--------
>>> np.i0(0.)
array(1.0)
>>> np.i0([0, 1, 2, 3])
array([1.        , 1.26606588, 2.2795853 , 4.88079259])

---
## kaiser
```python
from function_base import kaiser
```

Return the Kaiser window.

The Kaiser window is a taper formed by using a Bessel function.

Parameters
----------
M : int
    Number of points in the output window. If zero or less, an
    empty array is returned.
beta : float
    Shape parameter for window.

Returns
-------
out : array
    The window, with the maximum value normalized to one (the value
    one appears only if the number of samples is odd).

See Also
--------
bartlett, blackman, hamming, hanning

Notes
-----
The Kaiser window is defined as

.. math::  w(n) = I_0\left( \beta \sqrt{1-\frac{4n^2}{(M-1)^2}}
           \right)/I_0(\beta)

with

.. math:: \quad -\frac{M-1}{2} \leq n \leq \frac{M-1}{2},

where :math:`I_0` is the modified zeroth-order Bessel function.

The Kaiser was named for Jim Kaiser, who discovered a simple
approximation to the DPSS window based on Bessel functions.  The Kaiser
window is a very good approximation to the Digital Prolate Spheroidal
Sequence, or Slepian window, which is the transform which maximizes the
energy in the main lobe of the window relative to total energy.

The Kaiser can approximate many other windows by varying the beta
parameter.

====  =======================
beta  Window shape
====  =======================
0     Rectangular
5     Similar to a Hamming
6     Similar to a Hanning
8.6   Similar to a Blackman
====  =======================

A beta value of 14 is probably a good starting point. Note that as beta
gets large, the window narrows, and so the number of samples needs to be
large enough to sample the increasingly narrow spike, otherwise NaNs will
get returned.

Most references to the Kaiser window come from the signal processing
literature, where it is used as one of many windowing functions for
smoothing values.  It is also known as an apodization (which means
"removing the foot", i.e. smoothing discontinuities at the beginning
and end of the sampled signal) or tapering function.

References
----------
.. [1] J. F. Kaiser, "Digital Filters" - Ch 7 in "Systems analysis by
       digital computer", Editors: F.F. Kuo and J.F. Kaiser, p 218-285.
       John Wiley and Sons, New York, (1966).
.. [2] E.R. Kanasewich, "Time Sequence Analysis in Geophysics", The
       University of Alberta Press, 1975, pp. 177-178.
.. [3] Wikipedia, "Window function",
       https://en.wikipedia.org/wiki/Window_function

Examples
--------
>>> import matplotlib.pyplot as plt
>>> np.kaiser(12, 14)
 array([7.72686684e-06, 3.46009194e-03, 4.65200189e-02, # may vary
        2.29737120e-01, 5.99885316e-01, 9.45674898e-01,
        9.45674898e-01, 5.99885316e-01, 2.29737120e-01,
        4.65200189e-02, 3.46009194e-03, 7.72686684e-06])


Plot the window and the frequency response:

>>> from numpy.fft import fft, fftshift
>>> window = np.kaiser(51, 14)
>>> plt.plot(window)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Kaiser window")
Text(0.5, 1.0, 'Kaiser window')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("Sample")
Text(0.5, 0, 'Sample')
>>> plt.show()

>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> A = fft(window, 2048) / 25.5
>>> mag = np.abs(fftshift(A))
>>> freq = np.linspace(-0.5, 0.5, len(A))
>>> response = 20 * np.log10(mag)
>>> response = np.clip(response, -100, 100)
>>> plt.plot(freq, response)
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Frequency response of Kaiser window")
Text(0.5, 1.0, 'Frequency response of Kaiser window')
>>> plt.ylabel("Magnitude [dB]")
Text(0, 0.5, 'Magnitude [dB]')
>>> plt.xlabel("Normalized frequency [cycles per sample]")
Text(0.5, 0, 'Normalized frequency [cycles per sample]')
>>> plt.axis('tight')
(-0.5, 0.5, -100.0, ...) # may vary
>>> plt.show()

---
## _sinc_dispatcher
```python
from function_base import _sinc_dispatcher
```



---
## sinc
```python
from function_base import sinc
```

Return the normalized sinc function.

The sinc function is equal to :math:`\sin(\pi x)/(\pi x)` for any argument
:math:`x\ne 0`. ``sinc(0)`` takes the limit value 1, making ``sinc`` not
only everywhere continuous but also infinitely differentiable.

.. note::

    Note the normalization factor of ``pi`` used in the definition.
    This is the most commonly used definition in signal processing.
    Use ``sinc(x / np.pi)`` to obtain the unnormalized sinc function
    :math:`\sin(x)/x` that is more common in mathematics.

Parameters
----------
x : ndarray
    Array (possibly multi-dimensional) of values for which to calculate
    ``sinc(x)``.

Returns
-------
out : ndarray
    ``sinc(x)``, which has the same shape as the input.

Notes
-----
The name sinc is short for "sine cardinal" or "sinus cardinalis".

The sinc function is used in various signal processing applications,
including in anti-aliasing, in the construction of a Lanczos resampling
filter, and in interpolation.

For bandlimited interpolation of discrete-time signals, the ideal
interpolation kernel is proportional to the sinc function.

References
----------
.. [1] Weisstein, Eric W. "Sinc Function." From MathWorld--A Wolfram Web
       Resource. http://mathworld.wolfram.com/SincFunction.html
.. [2] Wikipedia, "Sinc function",
       https://en.wikipedia.org/wiki/Sinc_function

Examples
--------
>>> import matplotlib.pyplot as plt
>>> x = np.linspace(-4, 4, 41)
>>> np.sinc(x)
 array([-3.89804309e-17,  -4.92362781e-02,  -8.40918587e-02, # may vary
        -8.90384387e-02,  -5.84680802e-02,   3.89804309e-17,
        6.68206631e-02,   1.16434881e-01,   1.26137788e-01,
        8.50444803e-02,  -3.89804309e-17,  -1.03943254e-01,
        -1.89206682e-01,  -2.16236208e-01,  -1.55914881e-01,
        3.89804309e-17,   2.33872321e-01,   5.04551152e-01,
        7.56826729e-01,   9.35489284e-01,   1.00000000e+00,
        9.35489284e-01,   7.56826729e-01,   5.04551152e-01,
        2.33872321e-01,   3.89804309e-17,  -1.55914881e-01,
       -2.16236208e-01,  -1.89206682e-01,  -1.03943254e-01,
       -3.89804309e-17,   8.50444803e-02,   1.26137788e-01,
        1.16434881e-01,   6.68206631e-02,   3.89804309e-17,
        -5.84680802e-02,  -8.90384387e-02,  -8.40918587e-02,
        -4.92362781e-02,  -3.89804309e-17])

>>> plt.plot(x, np.sinc(x))
[<matplotlib.lines.Line2D object at 0x...>]
>>> plt.title("Sinc Function")
Text(0.5, 1.0, 'Sinc Function')
>>> plt.ylabel("Amplitude")
Text(0, 0.5, 'Amplitude')
>>> plt.xlabel("X")
Text(0.5, 0, 'X')
>>> plt.show()

---
## _msort_dispatcher
```python
from function_base import _msort_dispatcher
```



---
## msort
```python
from function_base import msort
```

Return a copy of an array sorted along the first axis.

.. deprecated:: 1.24

   msort is deprecated, use ``np.sort(a, axis=0)`` instead.

Parameters
----------
a : array_like
    Array to be sorted.

Returns
-------
sorted_array : ndarray
    Array of the same type and shape as `a`.

See Also
--------
sort

Notes
-----
``np.msort(a)`` is equivalent to  ``np.sort(a, axis=0)``.

Examples
--------
>>> a = np.array([[1, 4], [3, 1]])
>>> np.msort(a)  # sort along the first axis
array([[1, 1],
       [3, 4]])

---
## _ureduce
```python
from function_base import _ureduce
```

Internal Function.
Call `func` with `a` as first argument swapping the axes to use extended
axis on functions that don't support it natively.

Returns result and a.shape with axis dims set to 1.

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
func : callable
    Reduction function capable of receiving a single axis argument.
    It is called with `a` as first argument followed by `kwargs`.
kwargs : keyword arguments
    additional keyword arguments to pass to `func`.

Returns
-------
result : tuple
    Result of func(a, **kwargs) and a.shape with axis dims set to 1
    which can be used to reshape the result to the same shape a ufunc with
    keepdims=True would produce.

---
## _median_dispatcher
```python
from function_base import _median_dispatcher
```



---
## median
```python
from function_base import median
```

Compute the median along the specified axis.

Returns the median of the array elements.

Parameters
----------
a : array_like
    Input array or object that can be converted to an array.
axis : {int, sequence of int, None}, optional
    Axis or axes along which the medians are computed. The default
    is to compute the median along a flattened version of the array.
    A sequence of axes is supported since version 1.9.0.
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output,
    but the type (of the output) will be cast if necessary.
overwrite_input : bool, optional
   If True, then allow use of memory of input array `a` for
   calculations. The input array will be modified by the call to
   `median`. This will save memory when you do not need to preserve
   the contents of the input array. Treat the input as undefined,
   but it will probably be fully or partially sorted. Default is
   False. If `overwrite_input` is ``True`` and `a` is not already an
   `ndarray`, an error will be raised.
keepdims : bool, optional
    If this is set to True, the axes which are reduced are left
    in the result as dimensions with size one. With this option,
    the result will broadcast correctly against the original `arr`.

    .. versionadded:: 1.9.0

Returns
-------
median : ndarray
    A new array holding the result. If the input contains integers
    or floats smaller than ``float64``, then the output data-type is
    ``np.float64``.  Otherwise, the data-type of the output is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
mean, percentile

Notes
-----
Given a vector ``V`` of length ``N``, the median of ``V`` is the
middle value of a sorted copy of ``V``, ``V_sorted`` - i
e., ``V_sorted[(N-1)/2]``, when ``N`` is odd, and the average of the
two middle values of ``V_sorted`` when ``N`` is even.

Examples
--------
>>> a = np.array([[10, 7, 4], [3, 2, 1]])
>>> a
array([[10,  7,  4],
       [ 3,  2,  1]])
>>> np.median(a)
3.5
>>> np.median(a, axis=0)
array([6.5, 4.5, 2.5])
>>> np.median(a, axis=1)
array([7.,  2.])
>>> m = np.median(a, axis=0)
>>> out = np.zeros_like(m)
>>> np.median(a, axis=0, out=m)
array([6.5,  4.5,  2.5])
>>> m
array([6.5,  4.5,  2.5])
>>> b = a.copy()
>>> np.median(b, axis=1, overwrite_input=True)
array([7.,  2.])
>>> assert not np.all(a==b)
>>> b = a.copy()
>>> np.median(b, axis=None, overwrite_input=True)
3.5
>>> assert not np.all(a==b)

---
## _median
```python
from function_base import _median
```



---
## _percentile_dispatcher
```python
from function_base import _percentile_dispatcher
```



---
## percentile
```python
from function_base import percentile
```

Compute the q-th percentile of the data along the specified axis.

Returns the q-th percentile(s) of the array elements.

Parameters
----------
a : array_like of real numbers
    Input array or object that can be converted to an array.
q : array_like of float
    Percentage or sequence of percentages for the percentiles to compute.
    Values must be between 0 and 100 inclusive.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the percentiles are computed. The
    default is to compute the percentile(s) along a flattened
    version of the array.

    .. versionchanged:: 1.9.0
        A tuple of axes is supported
out : ndarray, optional
    Alternative output array in which to place the result. It must
    have the same shape and buffer length as the expected output,
    but the type (of the output) will be cast if necessary.
overwrite_input : bool, optional
    If True, then allow the input array `a` to be modified by intermediate
    calculations, to save memory. In this case, the contents of the input
    `a` after this function completes is undefined.
method : str, optional
    This parameter specifies the method to use for estimating the
    percentile.  There are many different methods, some unique to NumPy.
    See the notes for explanation.  The options sorted by their R type
    as summarized in the H&F paper [1]_ are:

    1. 'inverted_cdf'
    2. 'averaged_inverted_cdf'
    3. 'closest_observation'
    4. 'interpolated_inverted_cdf'
    5. 'hazen'
    6. 'weibull'
    7. 'linear'  (default)
    8. 'median_unbiased'
    9. 'normal_unbiased'

    The first three methods are discontinuous.  NumPy further defines the
    following discontinuous variations of the default 'linear' (7.) option:

    * 'lower'
    * 'higher',
    * 'midpoint'
    * 'nearest'

    .. versionchanged:: 1.22.0
        This argument was previously called "interpolation" and only
        offered the "linear" default and last four options.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left in
    the result as dimensions with size one. With this option, the
    result will broadcast correctly against the original array `a`.

    .. versionadded:: 1.9.0

interpolation : str, optional
    Deprecated name for the method keyword argument.

    .. deprecated:: 1.22.0

Returns
-------
percentile : scalar or ndarray
    If `q` is a single percentile and `axis=None`, then the result
    is a scalar. If multiple percentiles are given, first axis of
    the result corresponds to the percentiles. The other axes are
    the axes that remain after the reduction of `a`. If the input
    contains integers or floats smaller than ``float64``, the output
    data-type is ``float64``. Otherwise, the output data-type is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
mean
median : equivalent to ``percentile(..., 50)``
nanpercentile
quantile : equivalent to percentile, except q in the range [0, 1].

Notes
-----
Given a vector ``V`` of length ``n``, the q-th percentile of ``V`` is
the value ``q/100`` of the way from the minimum to the maximum in a
sorted copy of ``V``. The values and distances of the two nearest
neighbors as well as the `method` parameter will determine the
percentile if the normalized ranking does not match the location of
``q`` exactly. This function is the same as the median if ``q=50``, the
same as the minimum if ``q=0`` and the same as the maximum if
``q=100``.

The optional `method` parameter specifies the method to use when the
desired percentile lies between two indexes ``i`` and ``j = i + 1``.
In that case, we first determine ``i + g``, a virtual index that lies
between ``i`` and ``j``, where  ``i`` is the floor and ``g`` is the
fractional part of the index. The final result is, then, an interpolation
of ``a[i]`` and ``a[j]`` based on ``g``. During the computation of ``g``,
``i`` and ``j`` are modified using correction constants ``alpha`` and
``beta`` whose choices depend on the ``method`` used. Finally, note that
since Python uses 0-based indexing, the code subtracts another 1 from the
index internally.

The following formula determines the virtual index ``i + g``, the location
of the percentile in the sorted sample:

.. math::
    i + g = (q / 100) * ( n - alpha - beta + 1 ) + alpha

The different methods then work as follows

inverted_cdf:
    method 1 of H&F [1]_.
    This method gives discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 ; then take i

averaged_inverted_cdf:
    method 2 of H&F [1]_.
    This method give discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 ; then average between bounds

closest_observation:
    method 3 of H&F [1]_.
    This method give discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 and index is odd ; then take j
    * if g = 0 and index is even ; then take i

interpolated_inverted_cdf:
    method 4 of H&F [1]_.
    This method give continuous results using:

    * alpha = 0
    * beta = 1

hazen:
    method 5 of H&F [1]_.
    This method give continuous results using:

    * alpha = 1/2
    * beta = 1/2

weibull:
    method 6 of H&F [1]_.
    This method give continuous results using:

    * alpha = 0
    * beta = 0

linear:
    method 7 of H&F [1]_.
    This method give continuous results using:

    * alpha = 1
    * beta = 1

median_unbiased:
    method 8 of H&F [1]_.
    This method is probably the best method if the sample
    distribution function is unknown (see reference).
    This method give continuous results using:

    * alpha = 1/3
    * beta = 1/3

normal_unbiased:
    method 9 of H&F [1]_.
    This method is probably the best method if the sample
    distribution function is known to be normal.
    This method give continuous results using:

    * alpha = 3/8
    * beta = 3/8

lower:
    NumPy method kept for backwards compatibility.
    Takes ``i`` as the interpolation point.

higher:
    NumPy method kept for backwards compatibility.
    Takes ``j`` as the interpolation point.

nearest:
    NumPy method kept for backwards compatibility.
    Takes ``i`` or ``j``, whichever is nearest.

midpoint:
    NumPy method kept for backwards compatibility.
    Uses ``(i + j) / 2``.

Examples
--------
>>> a = np.array([[10, 7, 4], [3, 2, 1]])
>>> a
array([[10,  7,  4],
       [ 3,  2,  1]])
>>> np.percentile(a, 50)
3.5
>>> np.percentile(a, 50, axis=0)
array([6.5, 4.5, 2.5])
>>> np.percentile(a, 50, axis=1)
array([7.,  2.])
>>> np.percentile(a, 50, axis=1, keepdims=True)
array([[7.],
       [2.]])

>>> m = np.percentile(a, 50, axis=0)
>>> out = np.zeros_like(m)
>>> np.percentile(a, 50, axis=0, out=out)
array([6.5, 4.5, 2.5])
>>> m
array([6.5, 4.5, 2.5])

>>> b = a.copy()
>>> np.percentile(b, 50, axis=1, overwrite_input=True)
array([7.,  2.])
>>> assert not np.all(a == b)

The different methods can be visualized graphically:

.. plot::

    import matplotlib.pyplot as plt

    a = np.arange(4)
    p = np.linspace(0, 100, 6001)
    ax = plt.gca()
    lines = [
        ('linear', '-', 'C0'),
        ('inverted_cdf', ':', 'C1'),
        # Almost the same as `inverted_cdf`:
        ('averaged_inverted_cdf', '-.', 'C1'),
        ('closest_observation', ':', 'C2'),
        ('interpolated_inverted_cdf', '--', 'C1'),
        ('hazen', '--', 'C3'),
        ('weibull', '-.', 'C4'),
        ('median_unbiased', '--', 'C5'),
        ('normal_unbiased', '-.', 'C6'),
        ]
    for method, style, color in lines:
        ax.plot(
            p, np.percentile(a, p, method=method),
            label=method, linestyle=style, color=color)
    ax.set(
        title='Percentiles for different methods and data: ' + str(a),
        xlabel='Percentile',
        ylabel='Estimated percentile value',
        yticks=a)
    ax.legend(bbox_to_anchor=(1.03, 1))
    plt.tight_layout()
    plt.show()

References
----------
.. [1] R. J. Hyndman and Y. Fan,
   "Sample quantiles in statistical packages,"
   The American Statistician, 50(4), pp. 361-365, 1996

---
## _quantile_dispatcher
```python
from function_base import _quantile_dispatcher
```



---
## quantile
```python
from function_base import quantile
```

Compute the q-th quantile of the data along the specified axis.

.. versionadded:: 1.15.0

Parameters
----------
a : array_like of real numbers
    Input array or object that can be converted to an array.
q : array_like of float
    Probability or sequence of probabilities for the quantiles to compute.
    Values must be between 0 and 1 inclusive.
axis : {int, tuple of int, None}, optional
    Axis or axes along which the quantiles are computed. The default is
    to compute the quantile(s) along a flattened version of the array.
out : ndarray, optional
    Alternative output array in which to place the result. It must have
    the same shape and buffer length as the expected output, but the
    type (of the output) will be cast if necessary.
overwrite_input : bool, optional
    If True, then allow the input array `a` to be modified by
    intermediate calculations, to save memory. In this case, the
    contents of the input `a` after this function completes is
    undefined.
method : str, optional
    This parameter specifies the method to use for estimating the
    quantile.  There are many different methods, some unique to NumPy.
    See the notes for explanation.  The options sorted by their R type
    as summarized in the H&F paper [1]_ are:

    1. 'inverted_cdf'
    2. 'averaged_inverted_cdf'
    3. 'closest_observation'
    4. 'interpolated_inverted_cdf'
    5. 'hazen'
    6. 'weibull'
    7. 'linear'  (default)
    8. 'median_unbiased'
    9. 'normal_unbiased'

    The first three methods are discontinuous.  NumPy further defines the
    following discontinuous variations of the default 'linear' (7.) option:

    * 'lower'
    * 'higher',
    * 'midpoint'
    * 'nearest'

    .. versionchanged:: 1.22.0
        This argument was previously called "interpolation" and only
        offered the "linear" default and last four options.

keepdims : bool, optional
    If this is set to True, the axes which are reduced are left in
    the result as dimensions with size one. With this option, the
    result will broadcast correctly against the original array `a`.

interpolation : str, optional
    Deprecated name for the method keyword argument.

    .. deprecated:: 1.22.0

Returns
-------
quantile : scalar or ndarray
    If `q` is a single probability and `axis=None`, then the result
    is a scalar. If multiple probabilies levels are given, first axis of
    the result corresponds to the quantiles. The other axes are
    the axes that remain after the reduction of `a`. If the input
    contains integers or floats smaller than ``float64``, the output
    data-type is ``float64``. Otherwise, the output data-type is the
    same as that of the input. If `out` is specified, that array is
    returned instead.

See Also
--------
mean
percentile : equivalent to quantile, but with q in the range [0, 100].
median : equivalent to ``quantile(..., 0.5)``
nanquantile

Notes
-----
Given a vector ``V`` of length ``n``, the q-th quantile of ``V`` is
the value ``q`` of the way from the minimum to the maximum in a
sorted copy of ``V``. The values and distances of the two nearest
neighbors as well as the `method` parameter will determine the
quantile if the normalized ranking does not match the location of
``q`` exactly. This function is the same as the median if ``q=0.5``, the
same as the minimum if ``q=0.0`` and the same as the maximum if
``q=1.0``.

The optional `method` parameter specifies the method to use when the
desired quantile lies between two indexes ``i`` and ``j = i + 1``.
In that case, we first determine ``i + g``, a virtual index that lies
between ``i`` and ``j``, where  ``i`` is the floor and ``g`` is the
fractional part of the index. The final result is, then, an interpolation
of ``a[i]`` and ``a[j]`` based on ``g``. During the computation of ``g``,
``i`` and ``j`` are modified using correction constants ``alpha`` and
``beta`` whose choices depend on the ``method`` used. Finally, note that
since Python uses 0-based indexing, the code subtracts another 1 from the
index internally.

The following formula determines the virtual index ``i + g``, the location
of the quantile in the sorted sample:

.. math::
    i + g = q * ( n - alpha - beta + 1 ) + alpha

The different methods then work as follows

inverted_cdf:
    method 1 of H&F [1]_.
    This method gives discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 ; then take i

averaged_inverted_cdf:
    method 2 of H&F [1]_.
    This method gives discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 ; then average between bounds

closest_observation:
    method 3 of H&F [1]_.
    This method gives discontinuous results:

    * if g > 0 ; then take j
    * if g = 0 and index is odd ; then take j
    * if g = 0 and index is even ; then take i

interpolated_inverted_cdf:
    method 4 of H&F [1]_.
    This method gives continuous results using:

    * alpha = 0
    * beta = 1

hazen:
    method 5 of H&F [1]_.
    This method gives continuous results using:

    * alpha = 1/2
    * beta = 1/2

weibull:
    method 6 of H&F [1]_.
    This method gives continuous results using:

    * alpha = 0
    * beta = 0

linear:
    method 7 of H&F [1]_.
    This method gives continuous results using:

    * alpha = 1
    * beta = 1

median_unbiased:
    method 8 of H&F [1]_.
    This method is probably the best method if the sample
    distribution function is unknown (see reference).
    This method gives continuous results using:

    * alpha = 1/3
    * beta = 1/3

normal_unbiased:
    method 9 of H&F [1]_.
    This method is probably the best method if the sample
    distribution function is known to be normal.
    This method gives continuous results using:

    * alpha = 3/8
    * beta = 3/8

lower:
    NumPy method kept for backwards compatibility.
    Takes ``i`` as the interpolation point.

higher:
    NumPy method kept for backwards compatibility.
    Takes ``j`` as the interpolation point.

nearest:
    NumPy method kept for backwards compatibility.
    Takes ``i`` or ``j``, whichever is nearest.

midpoint:
    NumPy method kept for backwards compatibility.
    Uses ``(i + j) / 2``.

Examples
--------
>>> a = np.array([[10, 7, 4], [3, 2, 1]])
>>> a
array([[10,  7,  4],
       [ 3,  2,  1]])
>>> np.quantile(a, 0.5)
3.5
>>> np.quantile(a, 0.5, axis=0)
array([6.5, 4.5, 2.5])
>>> np.quantile(a, 0.5, axis=1)
array([7.,  2.])
>>> np.quantile(a, 0.5, axis=1, keepdims=True)
array([[7.],
       [2.]])
>>> m = np.quantile(a, 0.5, axis=0)
>>> out = np.zeros_like(m)
>>> np.quantile(a, 0.5, axis=0, out=out)
array([6.5, 4.5, 2.5])
>>> m
array([6.5, 4.5, 2.5])
>>> b = a.copy()
>>> np.quantile(b, 0.5, axis=1, overwrite_input=True)
array([7.,  2.])
>>> assert not np.all(a == b)

See also `numpy.percentile` for a visualization of most methods.

References
----------
.. [1] R. J. Hyndman and Y. Fan,
   "Sample quantiles in statistical packages,"
   The American Statistician, 50(4), pp. 361-365, 1996

---
## _quantile_unchecked
```python
from function_base import _quantile_unchecked
```

Assumes that q is in [0, 1], and is an ndarray

---
## _quantile_is_valid
```python
from function_base import _quantile_is_valid
```



---
## _check_interpolation_as_method
```python
from function_base import _check_interpolation_as_method
```



---
## _compute_virtual_index
```python
from function_base import _compute_virtual_index
```

Compute the floating point indexes of an array for the linear
interpolation of quantiles.
n : array_like
    The sample sizes.
quantiles : array_like
    The quantiles values.
alpha : float
    A constant used to correct the index computed.
beta : float
    A constant used to correct the index computed.

alpha and beta values depend on the chosen method
(see quantile documentation)

Reference:
Hyndman&Fan paper "Sample Quantiles in Statistical Packages",
DOI: 10.1080/00031305.1996.10473566

---
## _get_gamma
```python
from function_base import _get_gamma
```

Compute gamma (a.k.a 'm' or 'weight') for the linear interpolation
of quantiles.

virtual_indexes : array_like
    The indexes where the percentile is supposed to be found in the sorted
    sample.
previous_indexes : array_like
    The floor values of virtual_indexes.
interpolation : dict
    The interpolation method chosen, which may have a specific rule
    modifying gamma.

gamma is usually the fractional part of virtual_indexes but can be modified
by the interpolation method.

---
## _lerp
```python
from function_base import _lerp
```

Compute the linear interpolation weighted by gamma on each point of
two same shape array.

a : array_like
    Left bound.
b : array_like
    Right bound.
t : array_like
    The interpolation weight.
out : array_like
    Output array.

---
## _get_gamma_mask
```python
from function_base import _get_gamma_mask
```



---
## _discret_interpolation_to_boundaries
```python
from function_base import _discret_interpolation_to_boundaries
```



---
## _closest_observation
```python
from function_base import _closest_observation
```



---
## _inverted_cdf
```python
from function_base import _inverted_cdf
```



---
## _quantile_ureduce_func
```python
from function_base import _quantile_ureduce_func
```



---
## _get_indexes
```python
from function_base import _get_indexes
```

Get the valid indexes of arr neighbouring virtual_indexes.
Note
This is a companion function to linear interpolation of
Quantiles

Returns
-------
(previous_indexes, next_indexes): Tuple
    A Tuple of virtual_indexes neighbouring indexes

---
## _quantile
```python
from function_base import _quantile
```

Private function that doesn't support extended axis or keepdims.
These methods are extended to this function using _ureduce
See nanpercentile for parameter usage
It computes the quantiles of the array for the given axis.
A linear interpolation is performed based on the `interpolation`.

By default, the method is "linear" where alpha == beta == 1 which
performs the 7th method of Hyndman&Fan.
With "median_unbiased" we get alpha == beta == 1/3
thus the 8th method of Hyndman&Fan.

---
## _trapz_dispatcher
```python
from function_base import _trapz_dispatcher
```



---
## trapz
```python
from function_base import trapz
```

Integrate along the given axis using the composite trapezoidal rule.

If `x` is provided, the integration happens in sequence along its
elements - they are not sorted.

Integrate `y` (`x`) along each 1d slice on the given axis, compute
:math:`\int y(x) dx`.
When `x` is specified, this integrates along the parametric curve,
computing :math:`\int_t y(t) dt =
\int_t y(t) \left.\frac{dx}{dt}\right|_{x=x(t)} dt`.

Parameters
----------
y : array_like
    Input array to integrate.
x : array_like, optional
    The sample points corresponding to the `y` values. If `x` is None,
    the sample points are assumed to be evenly spaced `dx` apart. The
    default is None.
dx : scalar, optional
    The spacing between sample points when `x` is None. The default is 1.
axis : int, optional
    The axis along which to integrate.

Returns
-------
trapz : float or ndarray
    Definite integral of `y` = n-dimensional array as approximated along
    a single axis by the trapezoidal rule. If `y` is a 1-dimensional array,
    then the result is a float. If `n` is greater than 1, then the result
    is an `n`-1 dimensional array.

See Also
--------
sum, cumsum

Notes
-----
Image [2]_ illustrates trapezoidal rule -- y-axis locations of points
will be taken from `y` array, by default x-axis distances between
points will be 1.0, alternatively they can be provided with `x` array
or with `dx` scalar.  Return value will be equal to combined area under
the red lines.


References
----------
.. [1] Wikipedia page: https://en.wikipedia.org/wiki/Trapezoidal_rule

.. [2] Illustration image:
       https://en.wikipedia.org/wiki/File:Composite_trapezoidal_rule_illustration.png

Examples
--------
Use the trapezoidal rule on evenly spaced points:

>>> np.trapz([1, 2, 3])
4.0

The spacing between sample points can be selected by either the
``x`` or ``dx`` arguments:

>>> np.trapz([1, 2, 3], x=[4, 6, 8])
8.0
>>> np.trapz([1, 2, 3], dx=2)
8.0

Using a decreasing ``x`` corresponds to integrating in reverse:

>>> np.trapz([1, 2, 3], x=[8, 6, 4])
-8.0

More generally ``x`` is used to integrate along a parametric curve. We can
estimate the integral :math:`\int_0^1 x^2 = 1/3` using:

>>> x = np.linspace(0, 1, num=50)
>>> y = x**2
>>> np.trapz(y, x)
0.33340274885464394

Or estimate the area of a circle, noting we repeat the sample which closes
the curve:

>>> theta = np.linspace(0, 2 * np.pi, num=1000, endpoint=True)
>>> np.trapz(np.cos(theta), x=np.sin(theta))
3.141571941375841

``np.trapz`` can be applied along a specified axis to do multiple
computations in one call:

>>> a = np.arange(6).reshape(2, 3)
>>> a
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.trapz(a, axis=0)
array([1.5, 2.5, 3.5])
>>> np.trapz(a, axis=1)
array([2.,  8.])

---
## _fake_trapz
```python
from function_base import _fake_trapz
```



---
## _meshgrid_dispatcher
```python
from function_base import _meshgrid_dispatcher
```



---
## meshgrid
```python
from function_base import meshgrid
```

Return a list of coordinate matrices from coordinate vectors.

Make N-D coordinate arrays for vectorized evaluations of
N-D scalar/vector fields over N-D grids, given
one-dimensional coordinate arrays x1, x2,..., xn.

.. versionchanged:: 1.9
   1-D and 0-D cases are allowed.

Parameters
----------
x1, x2,..., xn : array_like
    1-D arrays representing the coordinates of a grid.
indexing : {'xy', 'ij'}, optional
    Cartesian ('xy', default) or matrix ('ij') indexing of output.
    See Notes for more details.

    .. versionadded:: 1.7.0
sparse : bool, optional
    If True the shape of the returned coordinate array for dimension *i*
    is reduced from ``(N1, ..., Ni, ... Nn)`` to
    ``(1, ..., 1, Ni, 1, ..., 1)``.  These sparse coordinate grids are
    intended to be use with :ref:`basics.broadcasting`.  When all
    coordinates are used in an expression, broadcasting still leads to a
    fully-dimensonal result array.

    Default is False.

    .. versionadded:: 1.7.0
copy : bool, optional
    If False, a view into the original arrays are returned in order to
    conserve memory.  Default is True.  Please note that
    ``sparse=False, copy=False`` will likely return non-contiguous
    arrays.  Furthermore, more than one element of a broadcast array
    may refer to a single memory location.  If you need to write to the
    arrays, make copies first.

    .. versionadded:: 1.7.0

Returns
-------
X1, X2,..., XN : list of ndarrays
    For vectors `x1`, `x2`,..., `xn` with lengths ``Ni=len(xi)``,
    returns ``(N1, N2, N3,..., Nn)`` shaped arrays if indexing='ij'
    or ``(N2, N1, N3,..., Nn)`` shaped arrays if indexing='xy'
    with the elements of `xi` repeated to fill the matrix along
    the first dimension for `x1`, the second for `x2` and so on.

Notes
-----
This function supports both indexing conventions through the indexing
keyword argument.  Giving the string 'ij' returns a meshgrid with
matrix indexing, while 'xy' returns a meshgrid with Cartesian indexing.
In the 2-D case with inputs of length M and N, the outputs are of shape
(N, M) for 'xy' indexing and (M, N) for 'ij' indexing.  In the 3-D case
with inputs of length M, N and P, outputs are of shape (N, M, P) for
'xy' indexing and (M, N, P) for 'ij' indexing.  The difference is
illustrated by the following code snippet::

    xv, yv = np.meshgrid(x, y, indexing='ij')
    for i in range(nx):
        for j in range(ny):
            # treat xv[i,j], yv[i,j]

    xv, yv = np.meshgrid(x, y, indexing='xy')
    for i in range(nx):
        for j in range(ny):
            # treat xv[j,i], yv[j,i]

In the 1-D and 0-D case, the indexing and sparse keywords have no effect.

See Also
--------
mgrid : Construct a multi-dimensional "meshgrid" using indexing notation.
ogrid : Construct an open multi-dimensional "meshgrid" using indexing
        notation.
how-to-index

Examples
--------
>>> nx, ny = (3, 2)
>>> x = np.linspace(0, 1, nx)
>>> y = np.linspace(0, 1, ny)
>>> xv, yv = np.meshgrid(x, y)
>>> xv
array([[0. , 0.5, 1. ],
       [0. , 0.5, 1. ]])
>>> yv
array([[0.,  0.,  0.],
       [1.,  1.,  1.]])

The result of `meshgrid` is a coordinate grid:

>>> import matplotlib.pyplot as plt
>>> plt.plot(xv, yv, marker='o', color='k', linestyle='none')
>>> plt.show()

You can create sparse output arrays to save memory and computation time.

>>> xv, yv = np.meshgrid(x, y, sparse=True)
>>> xv
array([[0. ,  0.5,  1. ]])
>>> yv
array([[0.],
       [1.]])

`meshgrid` is very useful to evaluate functions on a grid. If the
function depends on all coordinates, both dense and sparse outputs can be
used.

>>> x = np.linspace(-5, 5, 101)
>>> y = np.linspace(-5, 5, 101)
>>> # full coordinate arrays
>>> xx, yy = np.meshgrid(x, y)
>>> zz = np.sqrt(xx**2 + yy**2)
>>> xx.shape, yy.shape, zz.shape
((101, 101), (101, 101), (101, 101))
>>> # sparse coordinate arrays
>>> xs, ys = np.meshgrid(x, y, sparse=True)
>>> zs = np.sqrt(xs**2 + ys**2)
>>> xs.shape, ys.shape, zs.shape
((1, 101), (101, 1), (101, 101))
>>> np.array_equal(zz, zs)
True

>>> h = plt.contourf(x, y, zs)
>>> plt.axis('scaled')
>>> plt.colorbar()
>>> plt.show()

---
## _delete_dispatcher
```python
from function_base import _delete_dispatcher
```



---
## delete
```python
from function_base import delete
```

Return a new array with sub-arrays along an axis deleted. For a one
dimensional array, this returns those entries not returned by
`arr[obj]`.

Parameters
----------
arr : array_like
    Input array.
obj : slice, int or array of ints
    Indicate indices of sub-arrays to remove along the specified axis.

    .. versionchanged:: 1.19.0
        Boolean indices are now treated as a mask of elements to remove,
        rather than being cast to the integers 0 and 1.

axis : int, optional
    The axis along which to delete the subarray defined by `obj`.
    If `axis` is None, `obj` is applied to the flattened array.

Returns
-------
out : ndarray
    A copy of `arr` with the elements specified by `obj` removed. Note
    that `delete` does not occur in-place. If `axis` is None, `out` is
    a flattened array.

See Also
--------
insert : Insert elements into an array.
append : Append elements at the end of an array.

Notes
-----
Often it is preferable to use a boolean mask. For example:

>>> arr = np.arange(12) + 1
>>> mask = np.ones(len(arr), dtype=bool)
>>> mask[[0,2,4]] = False
>>> result = arr[mask,...]

Is equivalent to ``np.delete(arr, [0,2,4], axis=0)``, but allows further
use of `mask`.

Examples
--------
>>> arr = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
>>> arr
array([[ 1,  2,  3,  4],
       [ 5,  6,  7,  8],
       [ 9, 10, 11, 12]])
>>> np.delete(arr, 1, 0)
array([[ 1,  2,  3,  4],
       [ 9, 10, 11, 12]])

>>> np.delete(arr, np.s_[::2], 1)
array([[ 2,  4],
       [ 6,  8],
       [10, 12]])
>>> np.delete(arr, [1,3,5], None)
array([ 1,  3,  5,  7,  8,  9, 10, 11, 12])

---
## _insert_dispatcher
```python
from function_base import _insert_dispatcher
```



---
## insert
```python
from function_base import insert
```

Insert values along the given axis before the given indices.

Parameters
----------
arr : array_like
    Input array.
obj : int, slice or sequence of ints
    Object that defines the index or indices before which `values` is
    inserted.

    .. versionadded:: 1.8.0

    Support for multiple insertions when `obj` is a single scalar or a
    sequence with one element (similar to calling insert multiple
    times).
values : array_like
    Values to insert into `arr`. If the type of `values` is different
    from that of `arr`, `values` is converted to the type of `arr`.
    `values` should be shaped so that ``arr[...,obj,...] = values``
    is legal.
axis : int, optional
    Axis along which to insert `values`.  If `axis` is None then `arr`
    is flattened first.

Returns
-------
out : ndarray
    A copy of `arr` with `values` inserted.  Note that `insert`
    does not occur in-place: a new array is returned. If
    `axis` is None, `out` is a flattened array.

See Also
--------
append : Append elements at the end of an array.
concatenate : Join a sequence of arrays along an existing axis.
delete : Delete elements from an array.

Notes
-----
Note that for higher dimensional inserts ``obj=0`` behaves very different
from ``obj=[0]`` just like ``arr[:,0,:] = values`` is different from
``arr[:,[0],:] = values``.

Examples
--------
>>> a = np.array([[1, 1], [2, 2], [3, 3]])
>>> a
array([[1, 1],
       [2, 2],
       [3, 3]])
>>> np.insert(a, 1, 5)
array([1, 5, 1, ..., 2, 3, 3])
>>> np.insert(a, 1, 5, axis=1)
array([[1, 5, 1],
       [2, 5, 2],
       [3, 5, 3]])

Difference between sequence and scalars:

>>> np.insert(a, [1], [[1],[2],[3]], axis=1)
array([[1, 1, 1],
       [2, 2, 2],
       [3, 3, 3]])
>>> np.array_equal(np.insert(a, 1, [1, 2, 3], axis=1),
...                np.insert(a, [1], [[1],[2],[3]], axis=1))
True

>>> b = a.flatten()
>>> b
array([1, 1, 2, 2, 3, 3])
>>> np.insert(b, [2, 2], [5, 6])
array([1, 1, 5, ..., 2, 3, 3])

>>> np.insert(b, slice(2, 4), [5, 6])
array([1, 1, 5, ..., 2, 3, 3])

>>> np.insert(b, [2, 2], [7.13, False]) # type casting
array([1, 1, 7, ..., 2, 3, 3])

>>> x = np.arange(8).reshape(2, 4)
>>> idx = (1, 3)
>>> np.insert(x, idx, 999, axis=1)
array([[  0, 999,   1,   2, 999,   3],
       [  4, 999,   5,   6, 999,   7]])

---
## _append_dispatcher
```python
from function_base import _append_dispatcher
```



---
## append
```python
from function_base import append
```

Append values to the end of an array.

Parameters
----------
arr : array_like
    Values are appended to a copy of this array.
values : array_like
    These values are appended to a copy of `arr`.  It must be of the
    correct shape (the same shape as `arr`, excluding `axis`).  If
    `axis` is not specified, `values` can be any shape and will be
    flattened before use.
axis : int, optional
    The axis along which `values` are appended.  If `axis` is not
    given, both `arr` and `values` are flattened before use.

Returns
-------
append : ndarray
    A copy of `arr` with `values` appended to `axis`.  Note that
    `append` does not occur in-place: a new array is allocated and
    filled.  If `axis` is None, `out` is a flattened array.

See Also
--------
insert : Insert elements into an array.
delete : Delete elements from an array.

Examples
--------
>>> np.append([1, 2, 3], [[4, 5, 6], [7, 8, 9]])
array([1, 2, 3, ..., 7, 8, 9])

When `axis` is specified, `values` must have the correct shape.

>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0)
array([[1, 2, 3],
       [4, 5, 6],
       [7, 8, 9]])
>>> np.append([[1, 2, 3], [4, 5, 6]], [7, 8, 9], axis=0)
Traceback (most recent call last):
    ...
ValueError: all the input arrays must have same number of dimensions, but
the array at index 0 has 2 dimension(s) and the array at index 1 has 1
dimension(s)

---
## _digitize_dispatcher
```python
from function_base import _digitize_dispatcher
```



---
## digitize
```python
from function_base import digitize
```

Return the indices of the bins to which each value in input array belongs.

=========  =============  ============================
`right`    order of bins  returned index `i` satisfies
=========  =============  ============================
``False``  increasing     ``bins[i-1] <= x < bins[i]``
``True``   increasing     ``bins[i-1] < x <= bins[i]``
``False``  decreasing     ``bins[i-1] > x >= bins[i]``
``True``   decreasing     ``bins[i-1] >= x > bins[i]``
=========  =============  ============================

If values in `x` are beyond the bounds of `bins`, 0 or ``len(bins)`` is
returned as appropriate.

Parameters
----------
x : array_like
    Input array to be binned. Prior to NumPy 1.10.0, this array had to
    be 1-dimensional, but can now have any shape.
bins : array_like
    Array of bins. It has to be 1-dimensional and monotonic.
right : bool, optional
    Indicating whether the intervals include the right or the left bin
    edge. Default behavior is (right==False) indicating that the interval
    does not include the right edge. The left bin end is open in this
    case, i.e., bins[i-1] <= x < bins[i] is the default behavior for
    monotonically increasing bins.

Returns
-------
indices : ndarray of ints
    Output array of indices, of same shape as `x`.

Raises
------
ValueError
    If `bins` is not monotonic.
TypeError
    If the type of the input is complex.

See Also
--------
bincount, histogram, unique, searchsorted

Notes
-----
If values in `x` are such that they fall outside the bin range,
attempting to index `bins` with the indices that `digitize` returns
will result in an IndexError.

.. versionadded:: 1.10.0

`np.digitize` is  implemented in terms of `np.searchsorted`. This means
that a binary search is used to bin the values, which scales much better
for larger number of bins than the previous linear search. It also removes
the requirement for the input array to be 1-dimensional.

For monotonically _increasing_ `bins`, the following are equivalent::

    np.digitize(x, bins, right=True)
    np.searchsorted(bins, x, side='left')

Note that as the order of the arguments are reversed, the side must be too.
The `searchsorted` call is marginally faster, as it does not do any
monotonicity checks. Perhaps more importantly, it supports all dtypes.

Examples
--------
>>> x = np.array([0.2, 6.4, 3.0, 1.6])
>>> bins = np.array([0.0, 1.0, 2.5, 4.0, 10.0])
>>> inds = np.digitize(x, bins)
>>> inds
array([1, 4, 3, 2])
>>> for n in range(x.size):
...   print(bins[inds[n]-1], "<=", x[n], "<", bins[inds[n]])
...
0.0 <= 0.2 < 1.0
4.0 <= 6.4 < 10.0
2.5 <= 3.0 < 4.0
1.0 <= 1.6 < 2.5

>>> x = np.array([1.2, 10.0, 12.4, 15.5, 20.])
>>> bins = np.array([0, 5, 10, 15, 20])
>>> np.digitize(x,bins,right=True)
array([1, 2, 3, 4, 4])
>>> np.digitize(x,bins,right=False)
array([1, 3, 3, 4, 5])

---
## __init__
```python
from function_base import __init__
```



---
## _init_stage_2
```python
from function_base import _init_stage_2
```



---
## _call_as_normal
```python
from function_base import _call_as_normal
```

Return arrays with the results of `pyfunc` broadcast (vectorized) over
`args` and `kwargs` not in `excluded`.

---
## __call__
```python
from function_base import __call__
```



---
## _get_ufunc_and_otypes
```python
from function_base import _get_ufunc_and_otypes
```

Return (ufunc, otypes).

---
## _vectorize_call
```python
from function_base import _vectorize_call
```

Vectorized call to `func` over positional `args`.

---
## _vectorize_call_with_signature
```python
from function_base import _vectorize_call_with_signature
```

Vectorized call over positional arguments with a signature.

---
## func
```python
from function_base import func
```



---
## _func
```python
from function_base import _func
```



---
## __name__
```python
from arraysetops import __name__
```

Set operations for arrays based on sorting.

Notes
-----

For floating point arrays, inaccurate results may appear due to usual round-off
and floating point comparison issues.

Speed could be gained in some operations by an implementation of
`numpy.sort`, that can provide directly the permutation vectors, thus avoiding
calls to `numpy.argsort`.

Original author: Robert Cimrman

---
## _ediff1d_dispatcher
```python
from arraysetops import _ediff1d_dispatcher
```



---
## ediff1d
```python
from arraysetops import ediff1d
```

The differences between consecutive elements of an array.

Parameters
----------
ary : array_like
    If necessary, will be flattened before the differences are taken.
to_end : array_like, optional
    Number(s) to append at the end of the returned differences.
to_begin : array_like, optional
    Number(s) to prepend at the beginning of the returned differences.

Returns
-------
ediff1d : ndarray
    The differences. Loosely, this is ``ary.flat[1:] - ary.flat[:-1]``.

See Also
--------
diff, gradient

Notes
-----
When applied to masked arrays, this function drops the mask information
if the `to_begin` and/or `to_end` parameters are used.

Examples
--------
>>> x = np.array([1, 2, 4, 7, 0])
>>> np.ediff1d(x)
array([ 1,  2,  3, -7])

>>> np.ediff1d(x, to_begin=-99, to_end=np.array([88, 99]))
array([-99,   1,   2, ...,  -7,  88,  99])

The returned array is always 1D.

>>> y = [[1, 2, 4], [1, 6, 24]]
>>> np.ediff1d(y)
array([ 1,  2, -3,  5, 18])

---
## _unpack_tuple
```python
from arraysetops import _unpack_tuple
```

Unpacks one-element tuples for use as return values 

---
## _unique_dispatcher
```python
from arraysetops import _unique_dispatcher
```



---
## unique
```python
from arraysetops import unique
```

Find the unique elements of an array.

Returns the sorted unique elements of an array. There are three optional
outputs in addition to the unique elements:

* the indices of the input array that give the unique values
* the indices of the unique array that reconstruct the input array
* the number of times each unique value comes up in the input array

Parameters
----------
ar : array_like
    Input array. Unless `axis` is specified, this will be flattened if it
    is not already 1-D.
return_index : bool, optional
    If True, also return the indices of `ar` (along the specified axis,
    if provided, or in the flattened array) that result in the unique array.
return_inverse : bool, optional
    If True, also return the indices of the unique array (for the specified
    axis, if provided) that can be used to reconstruct `ar`.
return_counts : bool, optional
    If True, also return the number of times each unique item appears
    in `ar`.
axis : int or None, optional
    The axis to operate on. If None, `ar` will be flattened. If an integer,
    the subarrays indexed by the given axis will be flattened and treated
    as the elements of a 1-D array with the dimension of the given axis,
    see the notes for more details.  Object arrays or structured arrays
    that contain objects are not supported if the `axis` kwarg is used. The
    default is None.

    .. versionadded:: 1.13.0

equal_nan : bool, optional
    If True, collapses multiple NaN values in the return array into one.

    .. versionadded:: 1.24

Returns
-------
unique : ndarray
    The sorted unique values.
unique_indices : ndarray, optional
    The indices of the first occurrences of the unique values in the
    original array. Only provided if `return_index` is True.
unique_inverse : ndarray, optional
    The indices to reconstruct the original array from the
    unique array. Only provided if `return_inverse` is True.
unique_counts : ndarray, optional
    The number of times each of the unique values comes up in the
    original array. Only provided if `return_counts` is True.

    .. versionadded:: 1.9.0

See Also
--------
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.
repeat : Repeat elements of an array.

Notes
-----
When an axis is specified the subarrays indexed by the axis are sorted.
This is done by making the specified axis the first dimension of the array
(move the axis to the first dimension to keep the order of the other axes)
and then flattening the subarrays in C order. The flattened subarrays are
then viewed as a structured type with each element given a label, with the
effect that we end up with a 1-D array of structured types that can be
treated in the same way as any other 1-D array. The result is that the
flattened subarrays are sorted in lexicographic order starting with the
first element.

.. versionchanged: NumPy 1.21
    If nan values are in the input array, a single nan is put
    to the end of the sorted unique values.

    Also for complex arrays all NaN values are considered equivalent
    (no matter whether the NaN is in the real or imaginary part).
    As the representant for the returned array the smallest one in the
    lexicographical order is chosen - see np.sort for how the lexicographical
    order is defined for complex arrays.

Examples
--------
>>> np.unique([1, 1, 2, 2, 3, 3])
array([1, 2, 3])
>>> a = np.array([[1, 1], [2, 3]])
>>> np.unique(a)
array([1, 2, 3])

Return the unique rows of a 2D array

>>> a = np.array([[1, 0, 0], [1, 0, 0], [2, 3, 4]])
>>> np.unique(a, axis=0)
array([[1, 0, 0], [2, 3, 4]])

Return the indices of the original array that give the unique values:

>>> a = np.array(['a', 'b', 'b', 'c', 'a'])
>>> u, indices = np.unique(a, return_index=True)
>>> u
array(['a', 'b', 'c'], dtype='<U1')
>>> indices
array([0, 1, 3])
>>> a[indices]
array(['a', 'b', 'c'], dtype='<U1')

Reconstruct the input array from the unique values and inverse:

>>> a = np.array([1, 2, 6, 4, 2, 3, 2])
>>> u, indices = np.unique(a, return_inverse=True)
>>> u
array([1, 2, 3, 4, 6])
>>> indices
array([0, 1, 4, 3, 1, 2, 1])
>>> u[indices]
array([1, 2, 6, 4, 2, 3, 2])

Reconstruct the input values from the unique values and counts:

>>> a = np.array([1, 2, 6, 4, 2, 3, 2])
>>> values, counts = np.unique(a, return_counts=True)
>>> values
array([1, 2, 3, 4, 6])
>>> counts
array([1, 3, 1, 1, 1])
>>> np.repeat(values, counts)
array([1, 2, 2, 2, 3, 4, 6])    # original order not preserved

---
## _unique1d
```python
from arraysetops import _unique1d
```

Find the unique elements of an array, ignoring shape.

---
## _intersect1d_dispatcher
```python
from arraysetops import _intersect1d_dispatcher
```



---
## intersect1d
```python
from arraysetops import intersect1d
```

Find the intersection of two arrays.

Return the sorted, unique values that are in both of the input arrays.

Parameters
----------
ar1, ar2 : array_like
    Input arrays. Will be flattened if not already 1D.
assume_unique : bool
    If True, the input arrays are both assumed to be unique, which
    can speed up the calculation.  If True but ``ar1`` or ``ar2`` are not
    unique, incorrect results and out-of-bounds indices could result.
    Default is False.
return_indices : bool
    If True, the indices which correspond to the intersection of the two
    arrays are returned. The first instance of a value is used if there are
    multiple. Default is False.

    .. versionadded:: 1.15.0

Returns
-------
intersect1d : ndarray
    Sorted 1D array of common and unique elements.
comm1 : ndarray
    The indices of the first occurrences of the common values in `ar1`.
    Only provided if `return_indices` is True.
comm2 : ndarray
    The indices of the first occurrences of the common values in `ar2`.
    Only provided if `return_indices` is True.


See Also
--------
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.

Examples
--------
>>> np.intersect1d([1, 3, 4, 3], [3, 1, 2, 1])
array([1, 3])

To intersect more than two arrays, use functools.reduce:

>>> from functools import reduce
>>> reduce(np.intersect1d, ([1, 3, 4, 3], [3, 1, 2, 1], [6, 3, 4, 2]))
array([3])

To return the indices of the values common to the input arrays
along with the intersected values:

>>> x = np.array([1, 1, 2, 3, 4])
>>> y = np.array([2, 1, 4, 6])
>>> xy, x_ind, y_ind = np.intersect1d(x, y, return_indices=True)
>>> x_ind, y_ind
(array([0, 2, 4]), array([1, 0, 2]))
>>> xy, x[x_ind], y[y_ind]
(array([1, 2, 4]), array([1, 2, 4]), array([1, 2, 4]))

---
## _setxor1d_dispatcher
```python
from arraysetops import _setxor1d_dispatcher
```



---
## setxor1d
```python
from arraysetops import setxor1d
```

Find the set exclusive-or of two arrays.

Return the sorted, unique values that are in only one (not both) of the
input arrays.

Parameters
----------
ar1, ar2 : array_like
    Input arrays.
assume_unique : bool
    If True, the input arrays are both assumed to be unique, which
    can speed up the calculation.  Default is False.

Returns
-------
setxor1d : ndarray
    Sorted 1D array of unique values that are in only one of the input
    arrays.

Examples
--------
>>> a = np.array([1, 2, 3, 2, 4])
>>> b = np.array([2, 3, 5, 7, 5])
>>> np.setxor1d(a,b)
array([1, 4, 5, 7])

---
## _in1d_dispatcher
```python
from arraysetops import _in1d_dispatcher
```



---
## in1d
```python
from arraysetops import in1d
```

Test whether each element of a 1-D array is also present in a second array.

Returns a boolean array the same length as `ar1` that is True
where an element of `ar1` is in `ar2` and False otherwise.

We recommend using :func:`isin` instead of `in1d` for new code.

Parameters
----------
ar1 : (M,) array_like
    Input array.
ar2 : array_like
    The values against which to test each value of `ar1`.
assume_unique : bool, optional
    If True, the input arrays are both assumed to be unique, which
    can speed up the calculation.  Default is False.
invert : bool, optional
    If True, the values in the returned array are inverted (that is,
    False where an element of `ar1` is in `ar2` and True otherwise).
    Default is False. ``np.in1d(a, b, invert=True)`` is equivalent
    to (but is faster than) ``np.invert(in1d(a, b))``.
kind : {None, 'sort', 'table'}, optional
    The algorithm to use. This will not affect the final result,
    but will affect the speed and memory use. The default, None,
    will select automatically based on memory considerations.

    * If 'sort', will use a mergesort-based approach. This will have
      a memory usage of roughly 6 times the sum of the sizes of
      `ar1` and `ar2`, not accounting for size of dtypes.
    * If 'table', will use a lookup table approach similar
      to a counting sort. This is only available for boolean and
      integer arrays. This will have a memory usage of the
      size of `ar1` plus the max-min value of `ar2`. `assume_unique`
      has no effect when the 'table' option is used.
    * If None, will automatically choose 'table' if
      the required memory allocation is less than or equal to
      6 times the sum of the sizes of `ar1` and `ar2`,
      otherwise will use 'sort'. This is done to not use
      a large amount of memory by default, even though
      'table' may be faster in most cases. If 'table' is chosen,
      `assume_unique` will have no effect.

    .. versionadded:: 1.8.0

Returns
-------
in1d : (M,) ndarray, bool
    The values `ar1[in1d]` are in `ar2`.

See Also
--------
isin                  : Version of this function that preserves the
                        shape of ar1.
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.

Notes
-----
`in1d` can be considered as an element-wise function version of the
python keyword `in`, for 1-D sequences. ``in1d(a, b)`` is roughly
equivalent to ``np.array([item in b for item in a])``.
However, this idea fails if `ar2` is a set, or similar (non-sequence)
container:  As ``ar2`` is converted to an array, in those cases
``asarray(ar2)`` is an object array rather than the expected array of
contained values.

Using ``kind='table'`` tends to be faster than `kind='sort'` if the
following relationship is true:
``log10(len(ar2)) > (log10(max(ar2)-min(ar2)) - 2.27) / 0.927``,
but may use greater memory. The default value for `kind` will
be automatically selected based only on memory usage, so one may
manually set ``kind='table'`` if memory constraints can be relaxed.

.. versionadded:: 1.4.0

Examples
--------
>>> test = np.array([0, 1, 2, 5, 0])
>>> states = [0, 2]
>>> mask = np.in1d(test, states)
>>> mask
array([ True, False,  True, False,  True])
>>> test[mask]
array([0, 2, 0])
>>> mask = np.in1d(test, states, invert=True)
>>> mask
array([False,  True, False,  True, False])
>>> test[mask]
array([1, 5])

---
## _isin_dispatcher
```python
from arraysetops import _isin_dispatcher
```



---
## isin
```python
from arraysetops import isin
```

Calculates ``element in test_elements``, broadcasting over `element` only.
Returns a boolean array of the same shape as `element` that is True
where an element of `element` is in `test_elements` and False otherwise.

Parameters
----------
element : array_like
    Input array.
test_elements : array_like
    The values against which to test each value of `element`.
    This argument is flattened if it is an array or array_like.
    See notes for behavior with non-array-like parameters.
assume_unique : bool, optional
    If True, the input arrays are both assumed to be unique, which
    can speed up the calculation.  Default is False.
invert : bool, optional
    If True, the values in the returned array are inverted, as if
    calculating `element not in test_elements`. Default is False.
    ``np.isin(a, b, invert=True)`` is equivalent to (but faster
    than) ``np.invert(np.isin(a, b))``.
kind : {None, 'sort', 'table'}, optional
    The algorithm to use. This will not affect the final result,
    but will affect the speed and memory use. The default, None,
    will select automatically based on memory considerations.

    * If 'sort', will use a mergesort-based approach. This will have
      a memory usage of roughly 6 times the sum of the sizes of
      `ar1` and `ar2`, not accounting for size of dtypes.
    * If 'table', will use a lookup table approach similar
      to a counting sort. This is only available for boolean and
      integer arrays. This will have a memory usage of the
      size of `ar1` plus the max-min value of `ar2`. `assume_unique`
      has no effect when the 'table' option is used.
    * If None, will automatically choose 'table' if
      the required memory allocation is less than or equal to
      6 times the sum of the sizes of `ar1` and `ar2`,
      otherwise will use 'sort'. This is done to not use
      a large amount of memory by default, even though
      'table' may be faster in most cases. If 'table' is chosen,
      `assume_unique` will have no effect.


Returns
-------
isin : ndarray, bool
    Has the same shape as `element`. The values `element[isin]`
    are in `test_elements`.

See Also
--------
in1d                  : Flattened version of this function.
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.

Notes
-----

`isin` is an element-wise function version of the python keyword `in`.
``isin(a, b)`` is roughly equivalent to
``np.array([item in b for item in a])`` if `a` and `b` are 1-D sequences.

`element` and `test_elements` are converted to arrays if they are not
already. If `test_elements` is a set (or other non-sequence collection)
it will be converted to an object array with one element, rather than an
array of the values contained in `test_elements`. This is a consequence
of the `array` constructor's way of handling non-sequence collections.
Converting the set to a list usually gives the desired behavior.

Using ``kind='table'`` tends to be faster than `kind='sort'` if the
following relationship is true:
``log10(len(ar2)) > (log10(max(ar2)-min(ar2)) - 2.27) / 0.927``,
but may use greater memory. The default value for `kind` will
be automatically selected based only on memory usage, so one may
manually set ``kind='table'`` if memory constraints can be relaxed.

.. versionadded:: 1.13.0

Examples
--------
>>> element = 2*np.arange(4).reshape((2, 2))
>>> element
array([[0, 2],
       [4, 6]])
>>> test_elements = [1, 2, 4, 8]
>>> mask = np.isin(element, test_elements)
>>> mask
array([[False,  True],
       [ True, False]])
>>> element[mask]
array([2, 4])

The indices of the matched values can be obtained with `nonzero`:

>>> np.nonzero(mask)
(array([0, 1]), array([1, 0]))

The test can also be inverted:

>>> mask = np.isin(element, test_elements, invert=True)
>>> mask
array([[ True, False],
       [False,  True]])
>>> element[mask]
array([0, 6])

Because of how `array` handles sets, the following does not
work as expected:

>>> test_set = {1, 2, 4, 8}
>>> np.isin(element, test_set)
array([[False, False],
       [False, False]])

Casting the set to a list gives the expected result:

>>> np.isin(element, list(test_set))
array([[False,  True],
       [ True, False]])

---
## _union1d_dispatcher
```python
from arraysetops import _union1d_dispatcher
```



---
## union1d
```python
from arraysetops import union1d
```

Find the union of two arrays.

Return the unique, sorted array of values that are in either of the two
input arrays.

Parameters
----------
ar1, ar2 : array_like
    Input arrays. They are flattened if they are not already 1D.

Returns
-------
union1d : ndarray
    Unique, sorted union of the input arrays.

See Also
--------
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.

Examples
--------
>>> np.union1d([-1, 0, 1], [-2, 0, 2])
array([-2, -1,  0,  1,  2])

To find the union of more than two arrays, use functools.reduce:

>>> from functools import reduce
>>> reduce(np.union1d, ([1, 3, 4, 3], [3, 1, 2, 1], [6, 3, 4, 2]))
array([1, 2, 3, 4, 6])

---
## _setdiff1d_dispatcher
```python
from arraysetops import _setdiff1d_dispatcher
```



---
## setdiff1d
```python
from arraysetops import setdiff1d
```

Find the set difference of two arrays.

Return the unique values in `ar1` that are not in `ar2`.

Parameters
----------
ar1 : array_like
    Input array.
ar2 : array_like
    Input comparison array.
assume_unique : bool
    If True, the input arrays are both assumed to be unique, which
    can speed up the calculation.  Default is False.

Returns
-------
setdiff1d : ndarray
    1D array of values in `ar1` that are not in `ar2`. The result
    is sorted when `assume_unique=False`, but otherwise only sorted
    if the input is sorted.

See Also
--------
numpy.lib.arraysetops : Module with a number of other functions for
                        performing set operations on arrays.

Examples
--------
>>> a = np.array([1, 2, 3, 2, 4, 1])
>>> b = np.array([3, 4, 5, 6])
>>> np.setdiff1d(a, b)
array([1, 2])

---
## reshape_uniq
```python
from arraysetops import reshape_uniq
```



---
## __name__
```python
from arraypad import __name__
```

The arraypad module contains a group of functions to pad values onto the edges
of an n-dimensional array.

---
## _round_if_needed
```python
from arraypad import _round_if_needed
```

Rounds arr inplace if destination dtype is integer.

Parameters
----------
arr : ndarray
    Input array.
dtype : dtype
    The dtype of the destination array.

---
## _slice_at_axis
```python
from arraypad import _slice_at_axis
```

Construct tuple of slices to slice an array in the given dimension.

Parameters
----------
sl : slice
    The slice for the given dimension.
axis : int
    The axis to which `sl` is applied. All other dimensions are left
    "unsliced".

Returns
-------
sl : tuple of slices
    A tuple with slices matching `shape` in length.

Examples
--------
>>> _slice_at_axis(slice(None, 3, -1), 1)
(slice(None, None, None), slice(None, 3, -1), (...,))

---
## _view_roi
```python
from arraypad import _view_roi
```

Get a view of the current region of interest during iterative padding.

When padding multiple dimensions iteratively corner values are
unnecessarily overwritten multiple times. This function reduces the
working area for the first dimensions so that corners are excluded.

Parameters
----------
array : ndarray
    The array with the region of interest.
original_area_slice : tuple of slices
    Denotes the area with original values of the unpadded array.
axis : int
    The currently padded dimension assuming that `axis` is padded before
    `axis` + 1.

Returns
-------
roi : ndarray
    The region of interest of the original `array`.

---
## _pad_simple
```python
from arraypad import _pad_simple
```

Pad array on all sides with either a single value or undefined values.

Parameters
----------
array : ndarray
    Array to grow.
pad_width : sequence of tuple[int, int]
    Pad width on both sides for each dimension in `arr`.
fill_value : scalar, optional
    If provided the padded area is filled with this value, otherwise
    the pad area left undefined.

Returns
-------
padded : ndarray
    The padded array with the same dtype as`array`. Its order will default
    to C-style if `array` is not F-contiguous.
original_area_slice : tuple
    A tuple of slices pointing to the area of the original array.

---
## _set_pad_area
```python
from arraypad import _set_pad_area
```

Set empty-padded area in given dimension.

Parameters
----------
padded : ndarray
    Array with the pad area which is modified inplace.
axis : int
    Dimension with the pad area to set.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.
value_pair : tuple of scalars or ndarrays
    Values inserted into the pad area on each side. It must match or be
    broadcastable to the shape of `arr`.

---
## _get_edges
```python
from arraypad import _get_edges
```

Retrieve edge values from empty-padded array in given dimension.

Parameters
----------
padded : ndarray
    Empty-padded array.
axis : int
    Dimension in which the edges are considered.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.

Returns
-------
left_edge, right_edge : ndarray
    Edge values of the valid area in `padded` in the given dimension. Its
    shape will always match `padded` except for the dimension given by
    `axis` which will have a length of 1.

---
## _get_linear_ramps
```python
from arraypad import _get_linear_ramps
```

Construct linear ramps for empty-padded array in given dimension.

Parameters
----------
padded : ndarray
    Empty-padded array.
axis : int
    Dimension in which the ramps are constructed.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.
end_value_pair : (scalar, scalar)
    End values for the linear ramps which form the edge of the fully padded
    array. These values are included in the linear ramps.

Returns
-------
left_ramp, right_ramp : ndarray
    Linear ramps to set on both sides of `padded`.

---
## _get_stats
```python
from arraypad import _get_stats
```

Calculate statistic for the empty-padded array in given dimension.

Parameters
----------
padded : ndarray
    Empty-padded array.
axis : int
    Dimension in which the statistic is calculated.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.
length_pair : 2-element sequence of None or int
    Gives the number of values in valid area from each side that is
    taken into account when calculating the statistic. If None the entire
    valid area in `padded` is considered.
stat_func : function
    Function to compute statistic. The expected signature is
    ``stat_func(x: ndarray, axis: int, keepdims: bool) -> ndarray``.

Returns
-------
left_stat, right_stat : ndarray
    Calculated statistic for both sides of `padded`.

---
## _set_reflect_both
```python
from arraypad import _set_reflect_both
```

Pad `axis` of `arr` with reflection.

Parameters
----------
padded : ndarray
    Input array of arbitrary shape.
axis : int
    Axis along which to pad `arr`.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.
method : str
    Controls method of reflection; options are 'even' or 'odd'.
include_edge : bool
    If true, edge value is included in reflection, otherwise the edge
    value forms the symmetric axis to the reflection.

Returns
-------
pad_amt : tuple of ints, length 2
    New index positions of padding to do along the `axis`. If these are
    both 0, padding is done in this dimension.

---
## _set_wrap_both
```python
from arraypad import _set_wrap_both
```

Pad `axis` of `arr` with wrapped values.

Parameters
----------
padded : ndarray
    Input array of arbitrary shape.
axis : int
    Axis along which to pad `arr`.
width_pair : (int, int)
    Pair of widths that mark the pad area on both sides in the given
    dimension.
original_period : int
    Original length of data on `axis` of `arr`.

Returns
-------
pad_amt : tuple of ints, length 2
    New index positions of padding to do along the `axis`. If these are
    both 0, padding is done in this dimension.

---
## _as_pairs
```python
from arraypad import _as_pairs
```

Broadcast `x` to an array with the shape (`ndim`, 2).

A helper function for `pad` that prepares and validates arguments like
`pad_width` for iteration in pairs.

Parameters
----------
x : {None, scalar, array-like}
    The object to broadcast to the shape (`ndim`, 2).
ndim : int
    Number of pairs the broadcasted `x` will have.
as_index : bool, optional
    If `x` is not None, try to round each element of `x` to an integer
    (dtype `np.intp`) and ensure every element is positive.

Returns
-------
pairs : nested iterables, shape (`ndim`, 2)
    The broadcasted version of `x`.

Raises
------
ValueError
    If `as_index` is True and `x` contains negative elements.
    Or if `x` is not broadcastable to the shape (`ndim`, 2).

---
## _pad_dispatcher
```python
from arraypad import _pad_dispatcher
```



---
## pad
```python
from arraypad import pad
```

Pad an array.

Parameters
----------
array : array_like of rank N
    The array to pad.
pad_width : {sequence, array_like, int}
    Number of values padded to the edges of each axis.
    ``((before_1, after_1), ... (before_N, after_N))`` unique pad widths
    for each axis.
    ``(before, after)`` or ``((before, after),)`` yields same before
    and after pad for each axis.
    ``(pad,)`` or ``int`` is a shortcut for before = after = pad width
    for all axes.
mode : str or function, optional
    One of the following string values or a user supplied function.

    'constant' (default)
        Pads with a constant value.
    'edge'
        Pads with the edge values of array.
    'linear_ramp'
        Pads with the linear ramp between end_value and the
        array edge value.
    'maximum'
        Pads with the maximum value of all or part of the
        vector along each axis.
    'mean'
        Pads with the mean value of all or part of the
        vector along each axis.
    'median'
        Pads with the median value of all or part of the
        vector along each axis.
    'minimum'
        Pads with the minimum value of all or part of the
        vector along each axis.
    'reflect'
        Pads with the reflection of the vector mirrored on
        the first and last values of the vector along each
        axis.
    'symmetric'
        Pads with the reflection of the vector mirrored
        along the edge of the array.
    'wrap'
        Pads with the wrap of the vector along the axis.
        The first values are used to pad the end and the
        end values are used to pad the beginning.
    'empty'
        Pads with undefined values.

        .. versionadded:: 1.17

    <function>
        Padding function, see Notes.
stat_length : sequence or int, optional
    Used in 'maximum', 'mean', 'median', and 'minimum'.  Number of
    values at edge of each axis used to calculate the statistic value.

    ``((before_1, after_1), ... (before_N, after_N))`` unique statistic
    lengths for each axis.

    ``(before, after)`` or ``((before, after),)`` yields same before
    and after statistic lengths for each axis.

    ``(stat_length,)`` or ``int`` is a shortcut for
    ``before = after = statistic`` length for all axes.

    Default is ``None``, to use the entire axis.
constant_values : sequence or scalar, optional
    Used in 'constant'.  The values to set the padded values for each
    axis.

    ``((before_1, after_1), ... (before_N, after_N))`` unique pad constants
    for each axis.

    ``(before, after)`` or ``((before, after),)`` yields same before
    and after constants for each axis.

    ``(constant,)`` or ``constant`` is a shortcut for
    ``before = after = constant`` for all axes.

    Default is 0.
end_values : sequence or scalar, optional
    Used in 'linear_ramp'.  The values used for the ending value of the
    linear_ramp and that will form the edge of the padded array.

    ``((before_1, after_1), ... (before_N, after_N))`` unique end values
    for each axis.

    ``(before, after)`` or ``((before, after),)`` yields same before
    and after end values for each axis.

    ``(constant,)`` or ``constant`` is a shortcut for
    ``before = after = constant`` for all axes.

    Default is 0.
reflect_type : {'even', 'odd'}, optional
    Used in 'reflect', and 'symmetric'.  The 'even' style is the
    default with an unaltered reflection around the edge value.  For
    the 'odd' style, the extended part of the array is created by
    subtracting the reflected values from two times the edge value.

Returns
-------
pad : ndarray
    Padded array of rank equal to `array` with shape increased
    according to `pad_width`.

Notes
-----
.. versionadded:: 1.7.0

For an array with rank greater than 1, some of the padding of later
axes is calculated from padding of previous axes.  This is easiest to
think about with a rank 2 array where the corners of the padded array
are calculated by using padded values from the first axis.

The padding function, if used, should modify a rank 1 array in-place. It
has the following signature::

    padding_func(vector, iaxis_pad_width, iaxis, kwargs)

where

    vector : ndarray
        A rank 1 array already padded with zeros.  Padded values are
        vector[:iaxis_pad_width[0]] and vector[-iaxis_pad_width[1]:].
    iaxis_pad_width : tuple
        A 2-tuple of ints, iaxis_pad_width[0] represents the number of
        values padded at the beginning of vector where
        iaxis_pad_width[1] represents the number of values padded at
        the end of vector.
    iaxis : int
        The axis currently being calculated.
    kwargs : dict
        Any keyword arguments the function requires.

Examples
--------
>>> a = [1, 2, 3, 4, 5]
>>> np.pad(a, (2, 3), 'constant', constant_values=(4, 6))
array([4, 4, 1, ..., 6, 6, 6])

>>> np.pad(a, (2, 3), 'edge')
array([1, 1, 1, ..., 5, 5, 5])

>>> np.pad(a, (2, 3), 'linear_ramp', end_values=(5, -4))
array([ 5,  3,  1,  2,  3,  4,  5,  2, -1, -4])

>>> np.pad(a, (2,), 'maximum')
array([5, 5, 1, 2, 3, 4, 5, 5, 5])

>>> np.pad(a, (2,), 'mean')
array([3, 3, 1, 2, 3, 4, 5, 3, 3])

>>> np.pad(a, (2,), 'median')
array([3, 3, 1, 2, 3, 4, 5, 3, 3])

>>> a = [[1, 2], [3, 4]]
>>> np.pad(a, ((3, 2), (2, 3)), 'minimum')
array([[1, 1, 1, 2, 1, 1, 1],
       [1, 1, 1, 2, 1, 1, 1],
       [1, 1, 1, 2, 1, 1, 1],
       [1, 1, 1, 2, 1, 1, 1],
       [3, 3, 3, 4, 3, 3, 3],
       [1, 1, 1, 2, 1, 1, 1],
       [1, 1, 1, 2, 1, 1, 1]])

>>> a = [1, 2, 3, 4, 5]
>>> np.pad(a, (2, 3), 'reflect')
array([3, 2, 1, 2, 3, 4, 5, 4, 3, 2])

>>> np.pad(a, (2, 3), 'reflect', reflect_type='odd')
array([-1,  0,  1,  2,  3,  4,  5,  6,  7,  8])

>>> np.pad(a, (2, 3), 'symmetric')
array([2, 1, 1, 2, 3, 4, 5, 5, 4, 3])

>>> np.pad(a, (2, 3), 'symmetric', reflect_type='odd')
array([0, 1, 1, 2, 3, 4, 5, 5, 6, 7])

>>> np.pad(a, (2, 3), 'wrap')
array([4, 5, 1, 2, 3, 4, 5, 1, 2, 3])

>>> def pad_with(vector, pad_width, iaxis, kwargs):
...     pad_value = kwargs.get('padder', 10)
...     vector[:pad_width[0]] = pad_value
...     vector[-pad_width[1]:] = pad_value
>>> a = np.arange(6)
>>> a = a.reshape((2, 3))
>>> np.pad(a, 2, pad_with)
array([[10, 10, 10, 10, 10, 10, 10],
       [10, 10, 10, 10, 10, 10, 10],
       [10, 10,  0,  1,  2, 10, 10],
       [10, 10,  3,  4,  5, 10, 10],
       [10, 10, 10, 10, 10, 10, 10],
       [10, 10, 10, 10, 10, 10, 10]])
>>> np.pad(a, 2, pad_with, padder=100)
array([[100, 100, 100, 100, 100, 100, 100],
       [100, 100, 100, 100, 100, 100, 100],
       [100, 100,   0,   1,   2, 100, 100],
       [100, 100,   3,   4,   5, 100, 100],
       [100, 100, 100, 100, 100, 100, 100],
       [100, 100, 100, 100, 100, 100, 100]])

---
## __name__
```python
from type_check import __name__
```

Automatically adapted for numpy Sep 19, 2005 by convertcode.py

---
## mintypecode
```python
from type_check import mintypecode
```

Return the character for the minimum-size type to which given types can
be safely cast.

The returned type character must represent the smallest size dtype such
that an array of the returned type can handle the data from an array of
all types in `typechars` (or if `typechars` is an array, then its
dtype.char).

Parameters
----------
typechars : list of str or array_like
    If a list of strings, each string should represent a dtype.
    If array_like, the character representation of the array dtype is used.
typeset : str or list of str, optional
    The set of characters that the returned character is chosen from.
    The default set is 'GDFgdf'.
default : str, optional
    The default character, this is returned if none of the characters in
    `typechars` matches a character in `typeset`.

Returns
-------
typechar : str
    The character representing the minimum-size type that was found.

See Also
--------
dtype, sctype2char, maximum_sctype

Examples
--------
>>> np.mintypecode(['d', 'f', 'S'])
'd'
>>> x = np.array([1.1, 2-3.j])
>>> np.mintypecode(x)
'D'

>>> np.mintypecode('abceh', default='G')
'G'

---
## _asfarray_dispatcher
```python
from type_check import _asfarray_dispatcher
```



---
## asfarray
```python
from type_check import asfarray
```

Return an array converted to a float type.

Parameters
----------
a : array_like
    The input array.
dtype : str or dtype object, optional
    Float type code to coerce input array `a`.  If `dtype` is one of the
    'int' dtypes, it is replaced with float64.

Returns
-------
out : ndarray
    The input `a` as a float ndarray.

Examples
--------
>>> np.asfarray([2, 3])
array([2.,  3.])
>>> np.asfarray([2, 3], dtype='float')
array([2.,  3.])
>>> np.asfarray([2, 3], dtype='int8')
array([2.,  3.])

---
## _real_dispatcher
```python
from type_check import _real_dispatcher
```



---
## real
```python
from type_check import real
```

Return the real part of the complex argument.

Parameters
----------
val : array_like
    Input array.

Returns
-------
out : ndarray or scalar
    The real component of the complex argument. If `val` is real, the type
    of `val` is used for the output.  If `val` has complex elements, the
    returned type is float.

See Also
--------
real_if_close, imag, angle

Examples
--------
>>> a = np.array([1+2j, 3+4j, 5+6j])
>>> a.real
array([1.,  3.,  5.])
>>> a.real = 9
>>> a
array([9.+2.j,  9.+4.j,  9.+6.j])
>>> a.real = np.array([9, 8, 7])
>>> a
array([9.+2.j,  8.+4.j,  7.+6.j])
>>> np.real(1 + 1j)
1.0

---
## _imag_dispatcher
```python
from type_check import _imag_dispatcher
```



---
## imag
```python
from type_check import imag
```

Return the imaginary part of the complex argument.

Parameters
----------
val : array_like
    Input array.

Returns
-------
out : ndarray or scalar
    The imaginary component of the complex argument. If `val` is real,
    the type of `val` is used for the output.  If `val` has complex
    elements, the returned type is float.

See Also
--------
real, angle, real_if_close

Examples
--------
>>> a = np.array([1+2j, 3+4j, 5+6j])
>>> a.imag
array([2.,  4.,  6.])
>>> a.imag = np.array([8, 10, 12])
>>> a
array([1. +8.j,  3.+10.j,  5.+12.j])
>>> np.imag(1 + 1j)
1.0

---
## _is_type_dispatcher
```python
from type_check import _is_type_dispatcher
```



---
## iscomplex
```python
from type_check import iscomplex
```

Returns a bool array, where True if input element is complex.

What is tested is whether the input has a non-zero imaginary part, not if
the input type is complex.

Parameters
----------
x : array_like
    Input array.

Returns
-------
out : ndarray of bools
    Output array.

See Also
--------
isreal
iscomplexobj : Return True if x is a complex type or an array of complex
               numbers.

Examples
--------
>>> np.iscomplex([1+1j, 1+0j, 4.5, 3, 2, 2j])
array([ True, False, False, False, False,  True])

---
## isreal
```python
from type_check import isreal
```

Returns a bool array, where True if input element is real.

If element has complex type with zero complex part, the return value
for that element is True.

Parameters
----------
x : array_like
    Input array.

Returns
-------
out : ndarray, bool
    Boolean array of same shape as `x`.

Notes
-----
`isreal` may behave unexpectedly for string or object arrays (see examples)

See Also
--------
iscomplex
isrealobj : Return True if x is not a complex type.

Examples
--------
>>> a = np.array([1+1j, 1+0j, 4.5, 3, 2, 2j], dtype=complex)
>>> np.isreal(a)
array([False,  True,  True,  True,  True, False])

The function does not work on string arrays.

>>> a = np.array([2j, "a"], dtype="U")
>>> np.isreal(a)  # Warns about non-elementwise comparison
False

Returns True for all elements in input array of ``dtype=object`` even if
any of the elements is complex.

>>> a = np.array([1, "2", 3+4j], dtype=object)
>>> np.isreal(a)
array([ True,  True,  True])

isreal should not be used with object arrays

>>> a = np.array([1+2j, 2+1j], dtype=object)
>>> np.isreal(a)
array([ True,  True])

---
## iscomplexobj
```python
from type_check import iscomplexobj
```

Check for a complex type or an array of complex numbers.

The type of the input is checked, not the value. Even if the input
has an imaginary part equal to zero, `iscomplexobj` evaluates to True.

Parameters
----------
x : any
    The input can be of any type and shape.

Returns
-------
iscomplexobj : bool
    The return value, True if `x` is of a complex type or has at least
    one complex element.

See Also
--------
isrealobj, iscomplex

Examples
--------
>>> np.iscomplexobj(1)
False
>>> np.iscomplexobj(1+0j)
True
>>> np.iscomplexobj([3, 1+0j, True])
True

---
## isrealobj
```python
from type_check import isrealobj
```

Return True if x is a not complex type or an array of complex numbers.

The type of the input is checked, not the value. So even if the input
has an imaginary part equal to zero, `isrealobj` evaluates to False
if the data type is complex.

Parameters
----------
x : any
    The input can be of any type and shape.

Returns
-------
y : bool
    The return value, False if `x` is of a complex type.

See Also
--------
iscomplexobj, isreal

Notes
-----
The function is only meant for arrays with numerical values but it
accepts all other objects. Since it assumes array input, the return
value of other objects may be True.

>>> np.isrealobj('A string')
True
>>> np.isrealobj(False)
True
>>> np.isrealobj(None)
True

Examples
--------
>>> np.isrealobj(1)
True
>>> np.isrealobj(1+0j)
False
>>> np.isrealobj([3, 1+0j, True])
False

---
## _getmaxmin
```python
from type_check import _getmaxmin
```



---
## _nan_to_num_dispatcher
```python
from type_check import _nan_to_num_dispatcher
```



---
## nan_to_num
```python
from type_check import nan_to_num
```

Replace NaN with zero and infinity with large finite numbers (default
behaviour) or with the numbers defined by the user using the `nan`,
`posinf` and/or `neginf` keywords.

If `x` is inexact, NaN is replaced by zero or by the user defined value in
`nan` keyword, infinity is replaced by the largest finite floating point
values representable by ``x.dtype`` or by the user defined value in
`posinf` keyword and -infinity is replaced by the most negative finite
floating point values representable by ``x.dtype`` or by the user defined
value in `neginf` keyword.

For complex dtypes, the above is applied to each of the real and
imaginary components of `x` separately.

If `x` is not inexact, then no replacements are made.

Parameters
----------
x : scalar or array_like
    Input data.
copy : bool, optional
    Whether to create a copy of `x` (True) or to replace values
    in-place (False). The in-place operation only occurs if
    casting to an array does not require a copy.
    Default is True.

    .. versionadded:: 1.13
nan : int, float, optional
    Value to be used to fill NaN values. If no value is passed
    then NaN values will be replaced with 0.0.

    .. versionadded:: 1.17
posinf : int, float, optional
    Value to be used to fill positive infinity values. If no value is
    passed then positive infinity values will be replaced with a very
    large number.

    .. versionadded:: 1.17
neginf : int, float, optional
    Value to be used to fill negative infinity values. If no value is
    passed then negative infinity values will be replaced with a very
    small (or negative) number.

    .. versionadded:: 1.17



Returns
-------
out : ndarray
    `x`, with the non-finite values replaced. If `copy` is False, this may
    be `x` itself.

See Also
--------
isinf : Shows which elements are positive or negative infinity.
isneginf : Shows which elements are negative infinity.
isposinf : Shows which elements are positive infinity.
isnan : Shows which elements are Not a Number (NaN).
isfinite : Shows which elements are finite (not NaN, not infinity)

Notes
-----
NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
(IEEE 754). This means that Not a Number is not equivalent to infinity.

Examples
--------
>>> np.nan_to_num(np.inf)
1.7976931348623157e+308
>>> np.nan_to_num(-np.inf)
-1.7976931348623157e+308
>>> np.nan_to_num(np.nan)
0.0
>>> x = np.array([np.inf, -np.inf, np.nan, -128, 128])
>>> np.nan_to_num(x)
array([ 1.79769313e+308, -1.79769313e+308,  0.00000000e+000, # may vary
       -1.28000000e+002,  1.28000000e+002])
>>> np.nan_to_num(x, nan=-9999, posinf=33333333, neginf=33333333)
array([ 3.3333333e+07,  3.3333333e+07, -9.9990000e+03,
       -1.2800000e+02,  1.2800000e+02])
>>> y = np.array([complex(np.inf, np.nan), np.nan, complex(np.nan, np.inf)])
array([  1.79769313e+308,  -1.79769313e+308,   0.00000000e+000, # may vary
     -1.28000000e+002,   1.28000000e+002])
>>> np.nan_to_num(y)
array([  1.79769313e+308 +0.00000000e+000j, # may vary
         0.00000000e+000 +0.00000000e+000j,
         0.00000000e+000 +1.79769313e+308j])
>>> np.nan_to_num(y, nan=111111, posinf=222222)
array([222222.+111111.j, 111111.     +0.j, 111111.+222222.j])

---
## _real_if_close_dispatcher
```python
from type_check import _real_if_close_dispatcher
```



---
## real_if_close
```python
from type_check import real_if_close
```

If input is complex with all imaginary parts close to zero, return
real parts.

"Close to zero" is defined as `tol` * (machine epsilon of the type for
`a`).

Parameters
----------
a : array_like
    Input array.
tol : float
    Tolerance in machine epsilons for the complex part of the elements
    in the array. If the tolerance is <=1, then the absolute tolerance
    is used.

Returns
-------
out : ndarray
    If `a` is real, the type of `a` is used for the output.  If `a`
    has complex elements, the returned type is float.

See Also
--------
real, imag, angle

Notes
-----
Machine epsilon varies from machine to machine and between data types
but Python floats on most platforms have a machine epsilon equal to
2.2204460492503131e-16.  You can use 'np.finfo(float).eps' to print
out the machine epsilon for floats.

Examples
--------
>>> np.finfo(float).eps
2.2204460492503131e-16 # may vary

>>> np.real_if_close([2.1 + 4e-14j, 5.2 + 3e-15j], tol=1000)
array([2.1, 5.2])
>>> np.real_if_close([2.1 + 4e-13j, 5.2 + 3e-15j], tol=1000)
array([2.1+4.e-13j, 5.2 + 3e-15j])

---
## typename
```python
from type_check import typename
```

Return a description for the given data type code.

Parameters
----------
char : str
    Data type code.

Returns
-------
out : str
    Description of the input data type code.

See Also
--------
dtype, typecodes

Examples
--------
>>> typechars = ['S1', '?', 'B', 'D', 'G', 'F', 'I', 'H', 'L', 'O', 'Q',
...              'S', 'U', 'V', 'b', 'd', 'g', 'f', 'i', 'h', 'l', 'q']
>>> for typechar in typechars:
...     print(typechar, ' : ', np.typename(typechar))
...
S1  :  character
?  :  bool
B  :  unsigned char
D  :  complex double precision
G  :  complex long double precision
F  :  complex single precision
I  :  unsigned integer
H  :  unsigned short
L  :  unsigned long integer
O  :  object
Q  :  unsigned long long integer
S  :  string
U  :  unicode
V  :  void
b  :  signed char
d  :  double precision
g  :  long precision
f  :  single precision
i  :  integer
h  :  short
l  :  long integer
q  :  long long integer

---
## _common_type_dispatcher
```python
from type_check import _common_type_dispatcher
```



---
## common_type
```python
from type_check import common_type
```

Return a scalar type which is common to the input arrays.

The return type will always be an inexact (i.e. floating point) scalar
type, even if all the arrays are integer arrays. If one of the inputs is
an integer array, the minimum precision type that is returned is a
64-bit floating point dtype.

All input arrays except int64 and uint64 can be safely cast to the
returned dtype without loss of information.

Parameters
----------
array1, array2, ... : ndarrays
    Input arrays.

Returns
-------
out : data type code
    Data type code.

See Also
--------
dtype, mintypecode

Examples
--------
>>> np.common_type(np.arange(2, dtype=np.float32))
<class 'numpy.float32'>
>>> np.common_type(np.arange(2, dtype=np.float32), np.arange(2))
<class 'numpy.float64'>
>>> np.common_type(np.arange(4), np.array([45, 6.j]), np.array([45.0]))
<class 'numpy.complex128'>

---
## __name__
```python
from polynomial import __name__
```

=================================================
Power Series (:mod:`numpy.polynomial.polynomial`)
=================================================

This module provides a number of objects (mostly functions) useful for
dealing with polynomials, including a `Polynomial` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with polynomial objects is in
the docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------
.. autosummary::
   :toctree: generated/

   Polynomial

Constants
---------
.. autosummary::
   :toctree: generated/

   polydomain
   polyzero
   polyone
   polyx

Arithmetic
----------
.. autosummary::
   :toctree: generated/

   polyadd
   polysub
   polymulx
   polymul
   polydiv
   polypow
   polyval
   polyval2d
   polyval3d
   polygrid2d
   polygrid3d

Calculus
--------
.. autosummary::
   :toctree: generated/

   polyder
   polyint

Misc Functions
--------------
.. autosummary::
   :toctree: generated/

   polyfromroots
   polyroots
   polyvalfromroots
   polyvander
   polyvander2d
   polyvander3d
   polycompanion
   polyfit
   polytrim
   polyline

See Also
--------
`numpy.polynomial`

---
## RankWarning
```python
from polynomial import RankWarning
```

Issued by `polyfit` when the Vandermonde matrix is rank deficient.

For more information, a way to suppress the warning, and an example of
`RankWarning` being issued, see `polyfit`.

---
## _poly_dispatcher
```python
from polynomial import _poly_dispatcher
```



---
## poly
```python
from polynomial import poly
```

Find the coefficients of a polynomial with the given sequence of roots.

.. note::
   This forms part of the old polynomial API. Since version 1.4, the
   new polynomial API defined in `numpy.polynomial` is preferred.
   A summary of the differences can be found in the
   :doc:`transition guide </reference/routines.polynomials>`.

Returns the coefficients of the polynomial whose leading coefficient
is one for the given sequence of zeros (multiple roots must be included
in the sequence as many times as their multiplicity; see Examples).
A square matrix (or array, which will be treated as a matrix) can also
be given, in which case the coefficients of the characteristic polynomial
of the matrix are returned.

Parameters
----------
seq_of_zeros : array_like, shape (N,) or (N, N)
    A sequence of polynomial roots, or a square array or matrix object.

Returns
-------
c : ndarray
    1D array of polynomial coefficients from highest to lowest degree:

    ``c[0] * x**(N) + c[1] * x**(N-1) + ... + c[N-1] * x + c[N]``
    where c[0] always equals 1.

Raises
------
ValueError
    If input is the wrong shape (the input must be a 1-D or square
    2-D array).

See Also
--------
polyval : Compute polynomial values.
roots : Return the roots of a polynomial.
polyfit : Least squares polynomial fit.
poly1d : A one-dimensional polynomial class.

Notes
-----
Specifying the roots of a polynomial still leaves one degree of
freedom, typically represented by an undetermined leading
coefficient. [1]_ In the case of this function, that coefficient -
the first one in the returned array - is always taken as one. (If
for some reason you have one other point, the only automatic way
presently to leverage that information is to use ``polyfit``.)

The characteristic polynomial, :math:`p_a(t)`, of an `n`-by-`n`
matrix **A** is given by

    :math:`p_a(t) = \mathrm{det}(t\, \mathbf{I} - \mathbf{A})`,

where **I** is the `n`-by-`n` identity matrix. [2]_

References
----------
.. [1] M. Sullivan and M. Sullivan, III, "Algebra and Trigonometry,
   Enhanced With Graphing Utilities," Prentice-Hall, pg. 318, 1996.

.. [2] G. Strang, "Linear Algebra and Its Applications, 2nd Edition,"
   Academic Press, pg. 182, 1980.

Examples
--------
Given a sequence of a polynomial's zeros:

>>> np.poly((0, 0, 0)) # Multiple root example
array([1., 0., 0., 0.])

The line above represents z**3 + 0*z**2 + 0*z + 0.

>>> np.poly((-1./2, 0, 1./2))
array([ 1.  ,  0.  , -0.25,  0.  ])

The line above represents z**3 - z/4

>>> np.poly((np.random.random(1)[0], 0, np.random.random(1)[0]))
array([ 1.        , -0.77086955,  0.08618131,  0.        ]) # random

Given a square array object:

>>> P = np.array([[0, 1./3], [-1./2, 0]])
>>> np.poly(P)
array([1.        , 0.        , 0.16666667])

Note how in all cases the leading coefficient is always 1.

---
## _roots_dispatcher
```python
from polynomial import _roots_dispatcher
```



---
## roots
```python
from polynomial import roots
```

The roots of the polynomial, where self(x) == 0 

---
## _polyint_dispatcher
```python
from polynomial import _polyint_dispatcher
```



---
## polyint
```python
from polynomial import polyint
```

Integrate a polynomial.

Returns the polynomial coefficients `c` integrated `m` times from
`lbnd` along `axis`.  At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.) The argument `c` is an array of
coefficients, from low to high degree along each axis, e.g., [1,2,3]
represents the polynomial ``1 + 2*x + 3*x**2`` while [[1,2],[1,2]]
represents ``1 + 1*x + 2*y + 2*x*y`` if axis=0 is ``x`` and axis=1 is
``y``.

Parameters
----------
c : array_like
    1-D array of polynomial coefficients, ordered from low to high.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at zero
    is the first value in the list, the value of the second integral
    at zero is the second value, etc.  If ``k == []`` (the default),
    all constants are set to zero.  If ``m == 1``, a single scalar can
    be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    Coefficient array of the integral.

Raises
------
ValueError
    If ``m < 1``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
polyder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.  Why
is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`. Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a` - perhaps not what one would have first thought.

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c = (1,2,3)
>>> P.polyint(c) # should return array([0, 1, 1, 1])
array([0.,  1.,  1.,  1.])
>>> P.polyint(c,3) # should return array([0, 0, 0, 1/6, 1/12, 1/20])
 array([ 0.        ,  0.        ,  0.        ,  0.16666667,  0.08333333, # may vary
         0.05      ])
>>> P.polyint(c,k=3) # should return array([3, 1, 1, 1])
array([3.,  1.,  1.,  1.])
>>> P.polyint(c,lbnd=-2) # should return array([6, 1, 1, 1])
array([6.,  1.,  1.,  1.])
>>> P.polyint(c,scl=-2) # should return array([0, -2, -2, -2])
array([ 0., -2., -2., -2.])

---
## _polyder_dispatcher
```python
from polynomial import _polyder_dispatcher
```



---
## polyder
```python
from polynomial import polyder
```

Differentiate a polynomial.

Returns the polynomial coefficients `c` differentiated `m` times along
`axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable).  The
argument `c` is an array of coefficients from low to high degree along
each axis, e.g., [1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``
while [[1,2],[1,2]] represents ``1 + 1*x + 2*y + 2*x*y`` if axis=0 is
``x`` and axis=1 is ``y``.

Parameters
----------
c : array_like
    Array of polynomial coefficients. If c is multidimensional the
    different axis correspond to different variables with the degree
    in each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change
    of variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Polynomial coefficients of the derivative.

See Also
--------
polyint

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c = (1,2,3,4) # 1 + 2x + 3x**2 + 4x**3
>>> P.polyder(c) # (d/dx)(c) = 2 + 6x + 12x**2
array([  2.,   6.,  12.])
>>> P.polyder(c,3) # (d**3/dx**3)(c) = 24
array([24.])
>>> P.polyder(c,scl=-1) # (d/d(-x))(c) = -2 - 6x - 12x**2
array([ -2.,  -6., -12.])
>>> P.polyder(c,2,-1) # (d**2/d(-x)**2)(c) = 6 + 24x
array([  6.,  24.])

---
## _polyfit_dispatcher
```python
from polynomial import _polyfit_dispatcher
```



---
## polyfit
```python
from polynomial import polyfit
```

Least-squares fit of a polynomial to data.

Return the coefficients of a polynomial of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * x + ... + c_n * x^n,

where `n` is `deg`.

Parameters
----------
x : array_like, shape (`M`,)
    x-coordinates of the `M` sample (data) points ``(x[i], y[i])``.
y : array_like, shape (`M`,) or (`M`, `K`)
    y-coordinates of the sample points.  Several sets of sample points
    sharing the same x-coordinates can be (independently) fit with one
    call to `polyfit` by passing in for `y` a 2-D array that contains
    one data set per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit.  Singular values smaller
    than `rcond`, relative to the largest singular value, will be
    ignored.  The default value is ``len(x)*eps``, where `eps` is the
    relative precision of the platform's float type, about 2e-16 in
    most cases.
full : bool, optional
    Switch determining the nature of the return value.  When ``False``
    (the default) just the coefficients are returned; when ``True``,
    diagnostic information from the singular value decomposition (used
    to solve the fit's matrix equation) is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

    .. versionadded:: 1.5.0

Returns
-------
coef : ndarray, shape (`deg` + 1,) or (`deg` + 1, `K`)
    Polynomial coefficients ordered from low to high.  If `y` was 2-D,
    the coefficients in column `k` of `coef` represent the polynomial
    fit to the data in `y`'s `k`-th column.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Raises
------
RankWarning
    Raised if the matrix in the least-squares fit is rank deficient.
    The warning is only raised if ``full == False``.  The warnings can
    be turned off by:

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.chebyshev.chebfit
numpy.polynomial.legendre.legfit
numpy.polynomial.laguerre.lagfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.hermite_e.hermefit
polyval : Evaluates a polynomial.
polyvander : Vandermonde matrix for powers.
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the polynomial `p` that minimizes
the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where the :math:`w_j` are the weights. This problem is solved by
setting up the (typically) over-determined matrix equation:

.. math:: V(x) * c = w * y,

where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
coefficients to be solved for, `w` are the weights, and `y` are the
observed values.  This equation is then solved using the singular value
decomposition of `V`.

If some of the singular values of `V` are so small that they are
neglected (and `full` == ``False``), a `RankWarning` will be raised.
This means that the coefficient values may be poorly determined.
Fitting to a lower order polynomial will usually get rid of the warning
(but may not be what you want, of course; if you have independent
reason(s) for choosing the degree which isn't working, you may have to:
a) reconsider those reasons, and/or b) reconsider the quality of your
data).  The `rcond` parameter can also be set to a value smaller than
its default, but the resulting fit may be spurious and have large
contributions from roundoff error.

Polynomial fits using double precision tend to "fail" at about
(polynomial) degree 20. Fits using Chebyshev or Legendre series are
generally better conditioned, but much can still depend on the
distribution of the sample points and the smoothness of the data.  If
the quality of the fit is inadequate, splines may be a good
alternative.

Examples
--------
>>> np.random.seed(123)
>>> from numpy.polynomial import polynomial as P
>>> x = np.linspace(-1,1,51) # x "data": [-1, -0.96, ..., 0.96, 1]
>>> y = x**3 - x + np.random.randn(len(x))  # x^3 - x + Gaussian noise
>>> c, stats = P.polyfit(x,y,3,full=True)
>>> np.random.seed(123)
>>> c # c[0], c[2] should be approx. 0, c[1] approx. -1, c[3] approx. 1
array([ 0.01909725, -1.30598256, -0.00577963,  1.02644286]) # may vary
>>> stats # note the large SSR, explaining the rather poor results
 [array([ 38.06116253]), 4, array([ 1.38446749,  1.32119158,  0.50443316, # may vary
          0.28853036]), 1.1324274851176597e-014]

Same thing without the added noise

>>> y = x**3 - x
>>> c, stats = P.polyfit(x,y,3,full=True)
>>> c # c[0], c[2] should be "very close to 0", c[1] ~= -1, c[3] ~= 1
array([-6.36925336e-18, -1.00000000e+00, -4.08053781e-16,  1.00000000e+00])
>>> stats # note the minuscule SSR
[array([  7.46346754e-31]), 4, array([ 1.38446749,  1.32119158, # may vary
           0.50443316,  0.28853036]), 1.1324274851176597e-014]

---
## _polyval_dispatcher
```python
from polynomial import _polyval_dispatcher
```



---
## polyval
```python
from polynomial import polyval
```

Evaluate a polynomial at points x.

If `c` is of length `n + 1`, this function returns the value

.. math:: p(x) = c_0 + c_1 * x + ... + c_n * x^n

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    with themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, compatible object
    The shape of the returned array is described above.

See Also
--------
polyval2d, polygrid2d, polyval3d, polygrid3d

Notes
-----
The evaluation uses Horner's method.

Examples
--------
>>> from numpy.polynomial.polynomial import polyval
>>> polyval(1, [1,2,3])
6.0
>>> a = np.arange(4).reshape(2,2)
>>> a
array([[0, 1],
       [2, 3]])
>>> polyval(a, [1,2,3])
array([[ 1.,   6.],
       [17.,  34.]])
>>> coef = np.arange(4).reshape(2,2) # multidimensional coefficients
>>> coef
array([[0, 1],
       [2, 3]])
>>> polyval([1,2], coef, tensor=True)
array([[2.,  4.],
       [4.,  7.]])
>>> polyval([1,2], coef, tensor=False)
array([2.,  7.])

---
## _binary_op_dispatcher
```python
from polynomial import _binary_op_dispatcher
```



---
## polyadd
```python
from polynomial import polyadd
```

Add one polynomial to another.

Returns the sum of two polynomials `c1` + `c2`.  The arguments are
sequences of coefficients from lowest order term to highest, i.e.,
[1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of polynomial coefficients ordered from low to high.

Returns
-------
out : ndarray
    The coefficient array representing their sum.

See Also
--------
polysub, polymulx, polymul, polydiv, polypow

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> sum = P.polyadd(c1,c2); sum
array([4.,  4.,  4.])
>>> P.polyval(2, sum) # 4 + 4(2) + 4(2**2)
28.0

---
## polysub
```python
from polynomial import polysub
```

Subtract one polynomial from another.

Returns the difference of two polynomials `c1` - `c2`.  The arguments
are sequences of coefficients from lowest order term to highest, i.e.,
[1,2,3] represents the polynomial ``1 + 2*x + 3*x**2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of polynomial coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of coefficients representing their difference.

See Also
--------
polyadd, polymulx, polymul, polydiv, polypow

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> P.polysub(c1,c2)
array([-2.,  0.,  2.])
>>> P.polysub(c2,c1) # -P.polysub(c1,c2)
array([ 2.,  0., -2.])

---
## polymul
```python
from polynomial import polymul
```

Multiply one polynomial by another.

Returns the product of two polynomials `c1` * `c2`.  The arguments are
sequences of coefficients, from lowest order term to highest, e.g.,
[1,2,3] represents the polynomial ``1 + 2*x + 3*x**2.``

Parameters
----------
c1, c2 : array_like
    1-D arrays of coefficients representing a polynomial, relative to the
    "standard" basis, and ordered from lowest order term to highest.

Returns
-------
out : ndarray
    Of the coefficients of their product.

See Also
--------
polyadd, polysub, polymulx, polydiv, polypow

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> P.polymul(c1,c2)
array([  3.,   8.,  14.,   8.,   3.])

---
## _polydiv_dispatcher
```python
from polynomial import _polydiv_dispatcher
```



---
## polydiv
```python
from polynomial import polydiv
```

Divide one polynomial by another.

Returns the quotient-with-remainder of two polynomials `c1` / `c2`.
The arguments are sequences of coefficients, from lowest order term
to highest, e.g., [1,2,3] represents ``1 + 2*x + 3*x**2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of polynomial coefficients ordered from low to high.

Returns
-------
[quo, rem] : ndarrays
    Of coefficient series representing the quotient and remainder.

See Also
--------
polyadd, polysub, polymulx, polymul, polypow

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> P.polydiv(c1,c2)
(array([3.]), array([-8., -4.]))
>>> P.polydiv(c2,c1)
(array([ 0.33333333]), array([ 2.66666667,  1.33333333])) # may vary

---
## _raise_power
```python
from polynomial import _raise_power
```



---
## poly1d
```python
from polynomial import poly1d
```

A one-dimensional polynomial class.

.. note::
   This forms part of the old polynomial API. Since version 1.4, the
   new polynomial API defined in `numpy.polynomial` is preferred.
   A summary of the differences can be found in the
   :doc:`transition guide </reference/routines.polynomials>`.

A convenience class, used to encapsulate "natural" operations on
polynomials so that said operations may take on their customary
form in code (see Examples).

Parameters
----------
c_or_r : array_like
    The polynomial's coefficients, in decreasing powers, or if
    the value of the second parameter is True, the polynomial's
    roots (values where the polynomial evaluates to 0).  For example,
    ``poly1d([1, 2, 3])`` returns an object that represents
    :math:`x^2 + 2x + 3`, whereas ``poly1d([1, 2, 3], True)`` returns
    one that represents :math:`(x-1)(x-2)(x-3) = x^3 - 6x^2 + 11x -6`.
r : bool, optional
    If True, `c_or_r` specifies the polynomial's roots; the default
    is False.
variable : str, optional
    Changes the variable used when printing `p` from `x` to `variable`
    (see Examples).

Examples
--------
Construct the polynomial :math:`x^2 + 2x + 3`:

>>> p = np.poly1d([1, 2, 3])
>>> print(np.poly1d(p))
   2
1 x + 2 x + 3

Evaluate the polynomial at :math:`x = 0.5`:

>>> p(0.5)
4.25

Find the roots:

>>> p.r
array([-1.+1.41421356j, -1.-1.41421356j])
>>> p(p.r)
array([ -4.44089210e-16+0.j,  -4.44089210e-16+0.j]) # may vary

These numbers in the previous line represent (0, 0) to machine precision

Show the coefficients:

>>> p.c
array([1, 2, 3])

Display the order (the leading zero-coefficients are removed):

>>> p.order
2

Show the coefficient of the k-th power in the polynomial
(which is equivalent to ``p.c[-(i+1)]``):

>>> p[1]
2

Polynomials can be added, subtracted, multiplied, and divided
(returns quotient and remainder):

>>> p * p
poly1d([ 1,  4, 10, 12,  9])

>>> (p**3 + 4) / p
(poly1d([ 1.,  4., 10., 12.,  9.]), poly1d([4.]))

``asarray(p)`` gives the coefficient array, so polynomials can be
used in all functions that accept arrays:

>>> p**2 # square of polynomial
poly1d([ 1,  4, 10, 12,  9])

>>> np.square(p) # square of individual coefficients
array([1, 4, 9])

The variable used in the string representation of `p` can be modified,
using the `variable` parameter:

>>> p = np.poly1d([1,2,3], variable='z')
>>> print(p)
   2
1 z + 2 z + 3

Construct a polynomial from its roots:

>>> np.poly1d([1, 2], True)
poly1d([ 1., -3.,  2.])

This is the same polynomial as obtained by:

>>> np.poly1d([1, -1]) * np.poly1d([1, -2])
poly1d([ 1, -3,  2])

---
## coeffs
```python
from polynomial import coeffs
```



---
## variable
```python
from polynomial import variable
```

The name of the polynomial variable 

---
## order
```python
from polynomial import order
```

The order or degree of the polynomial 

---
## _coeffs
```python
from polynomial import _coeffs
```



---
## __init__
```python
from polynomial import __init__
```



---
## __array__
```python
from polynomial import __array__
```



---
## __repr__
```python
from polynomial import __repr__
```



---
## __len__
```python
from polynomial import __len__
```



---
## __str__
```python
from polynomial import __str__
```



---
## __call__
```python
from polynomial import __call__
```



---
## __neg__
```python
from polynomial import __neg__
```



---
## __pos__
```python
from polynomial import __pos__
```



---
## __mul__
```python
from polynomial import __mul__
```



---
## __rmul__
```python
from polynomial import __rmul__
```



---
## __add__
```python
from polynomial import __add__
```



---
## __radd__
```python
from polynomial import __radd__
```



---
## __pow__
```python
from polynomial import __pow__
```



---
## __sub__
```python
from polynomial import __sub__
```



---
## __rsub__
```python
from polynomial import __rsub__
```



---
## __div__
```python
from polynomial import __div__
```



---
## __rdiv__
```python
from polynomial import __rdiv__
```



---
## __eq__
```python
from polynomial import __eq__
```



---
## __ne__
```python
from polynomial import __ne__
```



---
## __getitem__
```python
from polynomial import __getitem__
```



---
## __setitem__
```python
from polynomial import __setitem__
```



---
## __iter__
```python
from polynomial import __iter__
```



---
## integ
```python
from polynomial import integ
```

Return an antiderivative (indefinite integral) of this polynomial.

Refer to `polyint` for full documentation.

See Also
--------
polyint : equivalent function

---
## deriv
```python
from polynomial import deriv
```

Return a derivative of this polynomial.

Refer to `polyder` for full documentation.

See Also
--------
polyder : equivalent function

---
## fmt_float
```python
from polynomial import fmt_float
```



---
## __name__
```python
from _datasource import __name__
```

A file interface for handling local and remote data files.

The goal of datasource is to abstract some of the file system operations
when dealing with data files so the researcher doesn't have to know all the
low-level details.  Through datasource, a researcher can obtain and use a
file with one function call, regardless of location of the file.

DataSource is meant to augment standard python libraries, not replace them.
It should work seamlessly with standard file IO operations and the os
module.

DataSource files can originate locally or remotely:

- local files : '/home/guido/src/local/data.txt'
- URLs (http, ftp, ...) : 'http://www.scipy.org/not/real/data.txt'

DataSource files can also be compressed or uncompressed.  Currently only
gzip, bz2 and xz are supported.

Example::

    >>> # Create a DataSource, use os.curdir (default) for local storage.
    >>> from numpy import DataSource
    >>> ds = DataSource()
    >>>
    >>> # Open a remote file.
    >>> # DataSource downloads the file, stores it locally in:
    >>> #     './www.google.com/index.html'
    >>> # opens the file and returns a file object.
    >>> fp = ds.open('http://www.google.com/') # doctest: +SKIP
    >>>
    >>> # Use the file as you normally would
    >>> fp.read() # doctest: +SKIP
    >>> fp.close() # doctest: +SKIP

---
## _check_mode
```python
from _datasource import _check_mode
```

Check mode and that encoding and newline are compatible.

Parameters
----------
mode : str
    File open mode.
encoding : str
    File encoding.
newline : str
    Newline for text files.

---
## _FileOpeners
```python
from _datasource import _FileOpeners
```

Container for different methods to open (un-)compressed files.

`_FileOpeners` contains a dictionary that holds one method for each
supported file format. Attribute lookup is implemented in such a way
that an instance of `_FileOpeners` itself can be indexed with the keys
of that dictionary. Currently uncompressed files as well as files
compressed with ``gzip``, ``bz2`` or ``xz`` compression are supported.

Notes
-----
`_file_openers`, an instance of `_FileOpeners`, is made available for
use in the `_datasource` module.

Examples
--------
>>> import gzip
>>> np.lib._datasource._file_openers.keys()
[None, '.bz2', '.gz', '.xz', '.lzma']
>>> np.lib._datasource._file_openers['.gz'] is gzip.open
True

---
## open
```python
from _datasource import open
```

Open and return file-like object prepending Repository base URL.

If `path` is an URL, it will be downloaded, stored in the
DataSource directory and opened from there.

Parameters
----------
path : str
    Local file path or URL to open. This may, but does not have to,
    include the `baseurl` with which the `Repository` was
    initialized.
mode : {'r', 'w', 'a'}, optional
    Mode to open `path`.  Mode 'r' for reading, 'w' for writing,
    'a' to append. Available modes depend on the type of object
    specified by `path`. Default is 'r'.
encoding : {None, str}, optional
    Open text file with given encoding. The default encoding will be
    what `io.open` uses.
newline : {None, str}, optional
    Newline to use when reading text file.

Returns
-------
out : file object
    File object.

---
## DataSource
```python
from _datasource import DataSource
```

DataSource(destpath='.')

A generic data source file (file, http, ftp, ...).

DataSources can be local files or remote files/URLs.  The files may
also be compressed or uncompressed. DataSource hides some of the
low-level details of downloading the file, allowing you to simply pass
in a valid file path (or URL) and obtain a file object.

Parameters
----------
destpath : str or None, optional
    Path to the directory where the source file gets downloaded to for
    use.  If `destpath` is None, a temporary directory will be created.
    The default path is the current directory.

Notes
-----
URLs require a scheme string (``http://``) to be used, without it they
will fail::

    >>> repos = np.DataSource()
    >>> repos.exists('www.google.com/index.html')
    False
    >>> repos.exists('http://www.google.com/index.html')
    True

Temporary directories are deleted when the DataSource is deleted.

Examples
--------
::

    >>> ds = np.DataSource('/home/guido')
    >>> urlname = 'http://www.google.com/'
    >>> gfile = ds.open('http://www.google.com/')
    >>> ds.abspath(urlname)
    '/home/guido/www.google.com/index.html'

    >>> ds = np.DataSource(None)  # use with temporary file
    >>> ds.open('/home/guido/foobar.txt')
    <open file '/home/guido.foobar.txt', mode 'r' at 0x91d4430>
    >>> ds.abspath('/home/guido/foobar.txt')
    '/tmp/.../home/guido/foobar.txt'

---
## Repository
```python
from _datasource import Repository
```

Repository(baseurl, destpath='.')

A data repository where multiple DataSource's share a base
URL/directory.

`Repository` extends `DataSource` by prepending a base URL (or
directory) to all the files it handles. Use `Repository` when you will
be working with multiple files from one base URL.  Initialize
`Repository` with the base URL, then refer to each file by its filename
only.

Parameters
----------
baseurl : str
    Path to the local directory or remote location that contains the
    data files.
destpath : str or None, optional
    Path to the directory where the source file gets downloaded to for
    use.  If `destpath` is None, a temporary directory will be created.
    The default path is the current directory.

Examples
--------
To analyze all files in the repository, do something like this
(note: this is not self-contained code)::

    >>> repos = np.lib._datasource.Repository('/home/user/data/dir/')
    >>> for filename in filelist:
    ...     fp = repos.open(filename)
    ...     fp.analyze()
    ...     fp.close()

Similarly you could use a URL for a repository::

    >>> repos = np.lib._datasource.Repository('http://www.xyz.edu/data')

---
## __init__
```python
from _datasource import __init__
```

Create a Repository with a shared url or directory of baseurl.

---
## _load
```python
from _datasource import _load
```



---
## keys
```python
from _datasource import keys
```

Return the keys of currently supported file openers.

Parameters
----------
None

Returns
-------
keys : list
    The keys are None for uncompressed files and the file extension
    strings (i.e. ``'.gz'``, ``'.xz'``) for supported compression
    methods.

---
## __getitem__
```python
from _datasource import __getitem__
```



---
## __del__
```python
from _datasource import __del__
```



---
## _iszip
```python
from _datasource import _iszip
```

Test if the filename is a zip file by looking at the file extension.

        

---
## _iswritemode
```python
from _datasource import _iswritemode
```

Test if the given mode will open a file for writing.

---
## _splitzipext
```python
from _datasource import _splitzipext
```

Split zip extension from filename and return filename.

Returns
-------
base, zip_ext : {tuple}

---
## _possible_names
```python
from _datasource import _possible_names
```

Return a tuple containing compressed filename variations.

---
## _isurl
```python
from _datasource import _isurl
```

Test if path is a net location.  Tests the scheme and netloc.

---
## _cache
```python
from _datasource import _cache
```

Cache the file specified by path.

Creates a copy of the file in the datasource cache.

---
## _findfile
```python
from _datasource import _findfile
```

Extend DataSource method to prepend baseurl to ``path``.

---
## abspath
```python
from _datasource import abspath
```

Return absolute path of file in the Repository directory.

If `path` is an URL, then `abspath` will return either the location
the file exists locally or the location it would exist when opened
using the `open` method.

Parameters
----------
path : str
    Can be a local file or a remote URL. This may, but does not
    have to, include the `baseurl` with which the `Repository` was
    initialized.

Returns
-------
out : str
    Complete path, including the `DataSource` destination directory.

---
## _sanitize_relative_path
```python
from _datasource import _sanitize_relative_path
```

Return a sanitised relative path for which
os.path.abspath(os.path.join(base, path)).startswith(base)

---
## exists
```python
from _datasource import exists
```

Test if path exists prepending Repository base URL to path.

Test if `path` exists as (and in this order):

- a local file.
- a remote URL that has been downloaded and stored locally in the
  `DataSource` directory.
- a remote URL that has not been downloaded, but is valid and
  accessible.

Parameters
----------
path : str
    Can be a local file or a remote URL. This may, but does not
    have to, include the `baseurl` with which the `Repository` was
    initialized.

Returns
-------
out : bool
    True if `path` exists.

Notes
-----
When `path` is an URL, `exists` will return True if it's either
stored locally in the `DataSource` directory, or is a valid remote
URL.  `DataSource` does not discriminate between the two, the file
is accessible if it exists in either location.

---
## _fullpath
```python
from _datasource import _fullpath
```

Return complete path for path.  Prepends baseurl if necessary.

---
## listdir
```python
from _datasource import listdir
```

List files in the source Repository.

Returns
-------
files : list of str
    List of file names (not containing a directory part).

Notes
-----
Does not currently work for remote repositories.

---
## __name__
```python
from ufunclike import __name__
```



---
## _dispatcher
```python
from ufunclike import _dispatcher
```



---
## fix
```python
from ufunclike import fix
```

Round to nearest integer towards zero.

Round an array of floats element-wise to nearest integer towards zero.
The rounded values are returned as floats.

Parameters
----------
x : array_like
    An array of floats to be rounded
out : ndarray, optional
    A location into which the result is stored. If provided, it must have
    a shape that the input broadcasts to. If not provided or None, a
    freshly-allocated array is returned.

Returns
-------
out : ndarray of floats
    A float array with the same dimensions as the input.
    If second argument is not supplied then a float array is returned
    with the rounded values.

    If a second argument is supplied the result is stored there.
    The return value `out` is then a reference to that array.

See Also
--------
rint, trunc, floor, ceil
around : Round to given number of decimals

Examples
--------
>>> np.fix(3.14)
3.0
>>> np.fix(3)
3.0
>>> np.fix([2.1, 2.9, -2.1, -2.9])
array([ 2.,  2., -2., -2.])

---
## isposinf
```python
from ufunclike import isposinf
```

Test element-wise for positive infinity, return result as bool array.

Parameters
----------
x : array_like
    The input array.
out : array_like, optional
    A location into which the result is stored. If provided, it must have a
    shape that the input broadcasts to. If not provided or None, a
    freshly-allocated boolean array is returned.

Returns
-------
out : ndarray
    A boolean array with the same dimensions as the input.
    If second argument is not supplied then a boolean array is returned
    with values True where the corresponding element of the input is
    positive infinity and values False where the element of the input is
    not positive infinity.

    If a second argument is supplied the result is stored there. If the
    type of that array is a numeric type the result is represented as zeros
    and ones, if the type is boolean then as False and True.
    The return value `out` is then a reference to that array.

See Also
--------
isinf, isneginf, isfinite, isnan

Notes
-----
NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
(IEEE 754).

Errors result if the second argument is also supplied when x is a scalar
input, if first and second arguments have different shapes, or if the
first argument has complex values

Examples
--------
>>> np.isposinf(np.PINF)
True
>>> np.isposinf(np.inf)
True
>>> np.isposinf(np.NINF)
False
>>> np.isposinf([-np.inf, 0., np.inf])
array([False, False,  True])

>>> x = np.array([-np.inf, 0., np.inf])
>>> y = np.array([2, 2, 2])
>>> np.isposinf(x, y)
array([0, 0, 1])
>>> y
array([0, 0, 1])

---
## isneginf
```python
from ufunclike import isneginf
```

Test element-wise for negative infinity, return result as bool array.

Parameters
----------
x : array_like
    The input array.
out : array_like, optional
    A location into which the result is stored. If provided, it must have a
    shape that the input broadcasts to. If not provided or None, a
    freshly-allocated boolean array is returned.

Returns
-------
out : ndarray
    A boolean array with the same dimensions as the input.
    If second argument is not supplied then a numpy boolean array is
    returned with values True where the corresponding element of the
    input is negative infinity and values False where the element of
    the input is not negative infinity.

    If a second argument is supplied the result is stored there. If the
    type of that array is a numeric type the result is represented as
    zeros and ones, if the type is boolean then as False and True. The
    return value `out` is then a reference to that array.

See Also
--------
isinf, isposinf, isnan, isfinite

Notes
-----
NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic
(IEEE 754).

Errors result if the second argument is also supplied when x is a scalar
input, if first and second arguments have different shapes, or if the
first argument has complex values.

Examples
--------
>>> np.isneginf(np.NINF)
True
>>> np.isneginf(np.inf)
False
>>> np.isneginf(np.PINF)
False
>>> np.isneginf([-np.inf, 0., np.inf])
array([ True, False, False])

>>> x = np.array([-np.inf, 0., np.inf])
>>> y = np.array([2, 2, 2])
>>> np.isneginf(x, y)
array([1, 0, 0])
>>> y
array([1, 0, 0])

---
## __name__
```python
from helper import __name__
```

Discrete Fourier Transforms - helper.py

---
## _fftshift_dispatcher
```python
from helper import _fftshift_dispatcher
```



---
## fftshift
```python
from helper import fftshift
```

Shift the zero-frequency component to the center of the spectrum.

This function swaps half-spaces for all axes listed (defaults to all).
Note that ``y[0]`` is the Nyquist component only if ``len(x)`` is even.

Parameters
----------
x : array_like
    Input array.
axes : int or shape tuple, optional
    Axes over which to shift.  Default is None, which shifts all axes.

Returns
-------
y : ndarray
    The shifted array.

See Also
--------
ifftshift : The inverse of `fftshift`.

Examples
--------
>>> freqs = np.fft.fftfreq(10, 0.1)
>>> freqs
array([ 0.,  1.,  2., ..., -3., -2., -1.])
>>> np.fft.fftshift(freqs)
array([-5., -4., -3., -2., -1.,  0.,  1.,  2.,  3.,  4.])

Shift the zero-frequency component only along the second axis:

>>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
>>> freqs
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])
>>> np.fft.fftshift(freqs, axes=(1,))
array([[ 2.,  0.,  1.],
       [-4.,  3.,  4.],
       [-1., -3., -2.]])

---
## ifftshift
```python
from helper import ifftshift
```

The inverse of `fftshift`. Although identical for even-length `x`, the
functions differ by one sample for odd-length `x`.

Parameters
----------
x : array_like
    Input array.
axes : int or shape tuple, optional
    Axes over which to calculate.  Defaults to None, which shifts all axes.

Returns
-------
y : ndarray
    The shifted array.

See Also
--------
fftshift : Shift zero-frequency component to the center of the spectrum.

Examples
--------
>>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
>>> freqs
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])
>>> np.fft.ifftshift(np.fft.fftshift(freqs))
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])

---
## fftfreq
```python
from helper import fftfreq
```

Return the Discrete Fourier Transform sample frequencies.

The returned float array `f` contains the frequency bin centers in cycles
per unit of the sample spacing (with zero at the start).  For instance, if
the sample spacing is in seconds, then the frequency unit is cycles/second.

Given a window length `n` and a sample spacing `d`::

  f = [0, 1, ...,   n/2-1,     -n/2, ..., -1] / (d*n)   if n is even
  f = [0, 1, ..., (n-1)/2, -(n-1)/2, ..., -1] / (d*n)   if n is odd

Parameters
----------
n : int
    Window length.
d : scalar, optional
    Sample spacing (inverse of the sampling rate). Defaults to 1.

Returns
-------
f : ndarray
    Array of length `n` containing the sample frequencies.

Examples
--------
>>> signal = np.array([-2, 8, 6, 4, 1, 0, 3, 5], dtype=float)
>>> fourier = np.fft.fft(signal)
>>> n = signal.size
>>> timestep = 0.1
>>> freq = np.fft.fftfreq(n, d=timestep)
>>> freq
array([ 0.  ,  1.25,  2.5 , ..., -3.75, -2.5 , -1.25])

---
## rfftfreq
```python
from helper import rfftfreq
```

Return the Discrete Fourier Transform sample frequencies
(for usage with rfft, irfft).

The returned float array `f` contains the frequency bin centers in cycles
per unit of the sample spacing (with zero at the start).  For instance, if
the sample spacing is in seconds, then the frequency unit is cycles/second.

Given a window length `n` and a sample spacing `d`::

  f = [0, 1, ...,     n/2-1,     n/2] / (d*n)   if n is even
  f = [0, 1, ..., (n-1)/2-1, (n-1)/2] / (d*n)   if n is odd

Unlike `fftfreq` (but like `scipy.fftpack.rfftfreq`)
the Nyquist frequency component is considered to be positive.

Parameters
----------
n : int
    Window length.
d : scalar, optional
    Sample spacing (inverse of the sampling rate). Defaults to 1.

Returns
-------
f : ndarray
    Array of length ``n//2 + 1`` containing the sample frequencies.

Examples
--------
>>> signal = np.array([-2, 8, 6, 4, 1, 0, 3, 5, -3, 4], dtype=float)
>>> fourier = np.fft.rfft(signal)
>>> n = signal.size
>>> sample_rate = 100
>>> freq = np.fft.fftfreq(n, d=1./sample_rate)
>>> freq
array([  0.,  10.,  20., ..., -30., -20., -10.])
>>> freq = np.fft.rfftfreq(n, d=1./sample_rate)
>>> freq
array([  0.,  10.,  20.,  30.,  40.,  50.])

---
## __name__
```python
from _pocketfft import __name__
```

Discrete Fourier Transforms

Routines in this module:

fft(a, n=None, axis=-1, norm="backward")
ifft(a, n=None, axis=-1, norm="backward")
rfft(a, n=None, axis=-1, norm="backward")
irfft(a, n=None, axis=-1, norm="backward")
hfft(a, n=None, axis=-1, norm="backward")
ihfft(a, n=None, axis=-1, norm="backward")
fftn(a, s=None, axes=None, norm="backward")
ifftn(a, s=None, axes=None, norm="backward")
rfftn(a, s=None, axes=None, norm="backward")
irfftn(a, s=None, axes=None, norm="backward")
fft2(a, s=None, axes=(-2,-1), norm="backward")
ifft2(a, s=None, axes=(-2, -1), norm="backward")
rfft2(a, s=None, axes=(-2,-1), norm="backward")
irfft2(a, s=None, axes=(-2, -1), norm="backward")

i = inverse transform
r = transform of purely real data
h = Hermite transform
n = n-dimensional transform
2 = 2-dimensional transform
(Note: 2D routines are just nD routines with different default
behavior.)

---
## _raw_fft
```python
from _pocketfft import _raw_fft
```



---
## _get_forward_norm
```python
from _pocketfft import _get_forward_norm
```



---
## _get_backward_norm
```python
from _pocketfft import _get_backward_norm
```



---
## _swap_direction
```python
from _pocketfft import _swap_direction
```



---
## _fft_dispatcher
```python
from _pocketfft import _fft_dispatcher
```



---
## fft
```python
from _pocketfft import fft
```

Compute the one-dimensional discrete Fourier Transform.

This function computes the one-dimensional *n*-point discrete Fourier
Transform (DFT) with the efficient Fast Fourier Transform (FFT)
algorithm [CT].

Parameters
----------
a : array_like
    Input array, can be complex.
n : int, optional
    Length of the transformed axis of the output.
    If `n` is smaller than the length of the input, the input is cropped.
    If it is larger, the input is padded with zeros.  If `n` is not given,
    the length of the input along the axis specified by `axis` is used.
axis : int, optional
    Axis over which to compute the FFT.  If not given, the last axis is
    used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.

Raises
------
IndexError
    If `axis` is not a valid axis of `a`.

See Also
--------
numpy.fft : for definition of the DFT and conventions used.
ifft : The inverse of `fft`.
fft2 : The two-dimensional FFT.
fftn : The *n*-dimensional FFT.
rfftn : The *n*-dimensional FFT of real input.
fftfreq : Frequency bins for given FFT parameters.

Notes
-----
FFT (Fast Fourier Transform) refers to a way the discrete Fourier
Transform (DFT) can be calculated efficiently, by using symmetries in the
calculated terms.  The symmetry is highest when `n` is a power of 2, and
the transform is therefore most efficient for these sizes.

The DFT is defined, with the conventions used in this implementation, in
the documentation for the `numpy.fft` module.

References
----------
.. [CT] Cooley, James W., and John W. Tukey, 1965, "An algorithm for the
        machine calculation of complex Fourier series," *Math. Comput.*
        19: 297-301.

Examples
--------
>>> np.fft.fft(np.exp(2j * np.pi * np.arange(8) / 8))
array([-2.33486982e-16+1.14423775e-17j,  8.00000000e+00-1.25557246e-15j,
        2.33486982e-16+2.33486982e-16j,  0.00000000e+00+1.22464680e-16j,
       -1.14423775e-17+2.33486982e-16j,  0.00000000e+00+5.20784380e-16j,
        1.14423775e-17+1.14423775e-17j,  0.00000000e+00+1.22464680e-16j])

In this example, real input has an FFT which is Hermitian, i.e., symmetric
in the real part and anti-symmetric in the imaginary part, as described in
the `numpy.fft` documentation:

>>> import matplotlib.pyplot as plt
>>> t = np.arange(256)
>>> sp = np.fft.fft(np.sin(t))
>>> freq = np.fft.fftfreq(t.shape[-1])
>>> plt.plot(freq, sp.real, freq, sp.imag)
[<matplotlib.lines.Line2D object at 0x...>, <matplotlib.lines.Line2D object at 0x...>]
>>> plt.show()

---
## ifft
```python
from _pocketfft import ifft
```

Compute the one-dimensional inverse discrete Fourier Transform.

This function computes the inverse of the one-dimensional *n*-point
discrete Fourier transform computed by `fft`.  In other words,
``ifft(fft(a)) == a`` to within numerical accuracy.
For a general description of the algorithm and definitions,
see `numpy.fft`.

The input should be ordered in the same way as is returned by `fft`,
i.e.,

* ``a[0]`` should contain the zero frequency term,
* ``a[1:n//2]`` should contain the positive-frequency terms,
* ``a[n//2 + 1:]`` should contain the negative-frequency terms, in
  increasing order starting from the most negative frequency.

For an even number of input points, ``A[n//2]`` represents the sum of
the values at the positive and negative Nyquist frequencies, as the two
are aliased together. See `numpy.fft` for details.

Parameters
----------
a : array_like
    Input array, can be complex.
n : int, optional
    Length of the transformed axis of the output.
    If `n` is smaller than the length of the input, the input is cropped.
    If it is larger, the input is padded with zeros.  If `n` is not given,
    the length of the input along the axis specified by `axis` is used.
    See notes about padding issues.
axis : int, optional
    Axis over which to compute the inverse DFT.  If not given, the last
    axis is used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.

Raises
------
IndexError
    If `axis` is not a valid axis of `a`.

See Also
--------
numpy.fft : An introduction, with definitions and general explanations.
fft : The one-dimensional (forward) FFT, of which `ifft` is the inverse
ifft2 : The two-dimensional inverse FFT.
ifftn : The n-dimensional inverse FFT.

Notes
-----
If the input parameter `n` is larger than the size of the input, the input
is padded by appending zeros at the end.  Even though this is the common
approach, it might lead to surprising results.  If a different padding is
desired, it must be performed before calling `ifft`.

Examples
--------
>>> np.fft.ifft([0, 4, 0, 0])
array([ 1.+0.j,  0.+1.j, -1.+0.j,  0.-1.j]) # may vary

Create and plot a band-limited signal with random phases:

>>> import matplotlib.pyplot as plt
>>> t = np.arange(400)
>>> n = np.zeros((400,), dtype=complex)
>>> n[40:60] = np.exp(1j*np.random.uniform(0, 2*np.pi, (20,)))
>>> s = np.fft.ifft(n)
>>> plt.plot(t, s.real, label='real')
[<matplotlib.lines.Line2D object at ...>]
>>> plt.plot(t, s.imag, '--', label='imaginary')
[<matplotlib.lines.Line2D object at ...>]
>>> plt.legend()
<matplotlib.legend.Legend object at ...>
>>> plt.show()

---
## rfft
```python
from _pocketfft import rfft
```

Compute the one-dimensional discrete Fourier Transform for real input.

This function computes the one-dimensional *n*-point discrete Fourier
Transform (DFT) of a real-valued array by means of an efficient algorithm
called the Fast Fourier Transform (FFT).

Parameters
----------
a : array_like
    Input array
n : int, optional
    Number of points along transformation axis in the input to use.
    If `n` is smaller than the length of the input, the input is cropped.
    If it is larger, the input is padded with zeros. If `n` is not given,
    the length of the input along the axis specified by `axis` is used.
axis : int, optional
    Axis over which to compute the FFT. If not given, the last axis is
    used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.
    If `n` is even, the length of the transformed axis is ``(n/2)+1``.
    If `n` is odd, the length is ``(n+1)/2``.

Raises
------
IndexError
    If `axis` is not a valid axis of `a`.

See Also
--------
numpy.fft : For definition of the DFT and conventions used.
irfft : The inverse of `rfft`.
fft : The one-dimensional FFT of general (complex) input.
fftn : The *n*-dimensional FFT.
rfftn : The *n*-dimensional FFT of real input.

Notes
-----
When the DFT is computed for purely real input, the output is
Hermitian-symmetric, i.e. the negative frequency terms are just the complex
conjugates of the corresponding positive-frequency terms, and the
negative-frequency terms are therefore redundant.  This function does not
compute the negative frequency terms, and the length of the transformed
axis of the output is therefore ``n//2 + 1``.

When ``A = rfft(a)`` and fs is the sampling frequency, ``A[0]`` contains
the zero-frequency term 0*fs, which is real due to Hermitian symmetry.

If `n` is even, ``A[-1]`` contains the term representing both positive
and negative Nyquist frequency (+fs/2 and -fs/2), and must also be purely
real. If `n` is odd, there is no term at fs/2; ``A[-1]`` contains
the largest positive frequency (fs/2*(n-1)/n), and is complex in the
general case.

If the input `a` contains an imaginary part, it is silently discarded.

Examples
--------
>>> np.fft.fft([0, 1, 0, 0])
array([ 1.+0.j,  0.-1.j, -1.+0.j,  0.+1.j]) # may vary
>>> np.fft.rfft([0, 1, 0, 0])
array([ 1.+0.j,  0.-1.j, -1.+0.j]) # may vary

Notice how the final element of the `fft` output is the complex conjugate
of the second element, for real input. For `rfft`, this symmetry is
exploited to compute only the non-negative frequency terms.

---
## irfft
```python
from _pocketfft import irfft
```

Computes the inverse of `rfft`.

This function computes the inverse of the one-dimensional *n*-point
discrete Fourier Transform of real input computed by `rfft`.
In other words, ``irfft(rfft(a), len(a)) == a`` to within numerical
accuracy. (See Notes below for why ``len(a)`` is necessary here.)

The input is expected to be in the form returned by `rfft`, i.e. the
real zero-frequency term followed by the complex positive frequency terms
in order of increasing frequency.  Since the discrete Fourier Transform of
real input is Hermitian-symmetric, the negative frequency terms are taken
to be the complex conjugates of the corresponding positive frequency terms.

Parameters
----------
a : array_like
    The input array.
n : int, optional
    Length of the transformed axis of the output.
    For `n` output points, ``n//2+1`` input points are necessary.  If the
    input is longer than this, it is cropped.  If it is shorter than this,
    it is padded with zeros.  If `n` is not given, it is taken to be
    ``2*(m-1)`` where ``m`` is the length of the input along the axis
    specified by `axis`.
axis : int, optional
    Axis over which to compute the inverse FFT. If not given, the last
    axis is used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.
    The length of the transformed axis is `n`, or, if `n` is not given,
    ``2*(m-1)`` where ``m`` is the length of the transformed axis of the
    input. To get an odd number of output points, `n` must be specified.

Raises
------
IndexError
    If `axis` is not a valid axis of `a`.

See Also
--------
numpy.fft : For definition of the DFT and conventions used.
rfft : The one-dimensional FFT of real input, of which `irfft` is inverse.
fft : The one-dimensional FFT.
irfft2 : The inverse of the two-dimensional FFT of real input.
irfftn : The inverse of the *n*-dimensional FFT of real input.

Notes
-----
Returns the real valued `n`-point inverse discrete Fourier transform
of `a`, where `a` contains the non-negative frequency terms of a
Hermitian-symmetric sequence. `n` is the length of the result, not the
input.

If you specify an `n` such that `a` must be zero-padded or truncated, the
extra/removed values will be added/removed at high frequencies. One can
thus resample a series to `m` points via Fourier interpolation by:
``a_resamp = irfft(rfft(a), m)``.

The correct interpretation of the hermitian input depends on the length of
the original data, as given by `n`. This is because each input shape could
correspond to either an odd or even length signal. By default, `irfft`
assumes an even output length which puts the last entry at the Nyquist
frequency; aliasing with its symmetric counterpart. By Hermitian symmetry,
the value is thus treated as purely real. To avoid losing information, the
correct length of the real input **must** be given.

Examples
--------
>>> np.fft.ifft([1, -1j, -1, 1j])
array([0.+0.j,  1.+0.j,  0.+0.j,  0.+0.j]) # may vary
>>> np.fft.irfft([1, -1j, -1])
array([0.,  1.,  0.,  0.])

Notice how the last term in the input to the ordinary `ifft` is the
complex conjugate of the second term, and the output has zero imaginary
part everywhere.  When calling `irfft`, the negative frequencies are not
specified, and the output array is purely real.

---
## hfft
```python
from _pocketfft import hfft
```

Compute the FFT of a signal that has Hermitian symmetry, i.e., a real
spectrum.

Parameters
----------
a : array_like
    The input array.
n : int, optional
    Length of the transformed axis of the output. For `n` output
    points, ``n//2 + 1`` input points are necessary.  If the input is
    longer than this, it is cropped.  If it is shorter than this, it is
    padded with zeros.  If `n` is not given, it is taken to be ``2*(m-1)``
    where ``m`` is the length of the input along the axis specified by
    `axis`.
axis : int, optional
    Axis over which to compute the FFT. If not given, the last
    axis is used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.
    The length of the transformed axis is `n`, or, if `n` is not given,
    ``2*m - 2`` where ``m`` is the length of the transformed axis of
    the input. To get an odd number of output points, `n` must be
    specified, for instance as ``2*m - 1`` in the typical case,

Raises
------
IndexError
    If `axis` is not a valid axis of `a`.

See also
--------
rfft : Compute the one-dimensional FFT for real input.
ihfft : The inverse of `hfft`.

Notes
-----
`hfft`/`ihfft` are a pair analogous to `rfft`/`irfft`, but for the
opposite case: here the signal has Hermitian symmetry in the time
domain and is real in the frequency domain. So here it's `hfft` for
which you must supply the length of the result if it is to be odd.

* even: ``ihfft(hfft(a, 2*len(a) - 2)) == a``, within roundoff error,
* odd: ``ihfft(hfft(a, 2*len(a) - 1)) == a``, within roundoff error.

The correct interpretation of the hermitian input depends on the length of
the original data, as given by `n`. This is because each input shape could
correspond to either an odd or even length signal. By default, `hfft`
assumes an even output length which puts the last entry at the Nyquist
frequency; aliasing with its symmetric counterpart. By Hermitian symmetry,
the value is thus treated as purely real. To avoid losing information, the
shape of the full signal **must** be given.

Examples
--------
>>> signal = np.array([1, 2, 3, 4, 3, 2])
>>> np.fft.fft(signal)
array([15.+0.j,  -4.+0.j,   0.+0.j,  -1.-0.j,   0.+0.j,  -4.+0.j]) # may vary
>>> np.fft.hfft(signal[:4]) # Input first half of signal
array([15.,  -4.,   0.,  -1.,   0.,  -4.])
>>> np.fft.hfft(signal, 6)  # Input entire signal and truncate
array([15.,  -4.,   0.,  -1.,   0.,  -4.])


>>> signal = np.array([[1, 1.j], [-1.j, 2]])
>>> np.conj(signal.T) - signal   # check Hermitian symmetry
array([[ 0.-0.j,  -0.+0.j], # may vary
       [ 0.+0.j,  0.-0.j]])
>>> freq_spectrum = np.fft.hfft(signal)
>>> freq_spectrum
array([[ 1.,  1.],
       [ 2., -2.]])

---
## ihfft
```python
from _pocketfft import ihfft
```

Compute the inverse FFT of a signal that has Hermitian symmetry.

Parameters
----------
a : array_like
    Input array.
n : int, optional
    Length of the inverse FFT, the number of points along
    transformation axis in the input to use.  If `n` is smaller than
    the length of the input, the input is cropped.  If it is larger,
    the input is padded with zeros. If `n` is not given, the length of
    the input along the axis specified by `axis` is used.
axis : int, optional
    Axis over which to compute the inverse FFT. If not given, the last
    axis is used.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axis
    indicated by `axis`, or the last one if `axis` is not specified.
    The length of the transformed axis is ``n//2 + 1``.

See also
--------
hfft, irfft

Notes
-----
`hfft`/`ihfft` are a pair analogous to `rfft`/`irfft`, but for the
opposite case: here the signal has Hermitian symmetry in the time
domain and is real in the frequency domain. So here it's `hfft` for
which you must supply the length of the result if it is to be odd:

* even: ``ihfft(hfft(a, 2*len(a) - 2)) == a``, within roundoff error,
* odd: ``ihfft(hfft(a, 2*len(a) - 1)) == a``, within roundoff error.

Examples
--------
>>> spectrum = np.array([ 15, -4, 0, -1, 0, -4])
>>> np.fft.ifft(spectrum)
array([1.+0.j,  2.+0.j,  3.+0.j,  4.+0.j,  3.+0.j,  2.+0.j]) # may vary
>>> np.fft.ihfft(spectrum)
array([ 1.-0.j,  2.-0.j,  3.-0.j,  4.-0.j]) # may vary

---
## _cook_nd_args
```python
from _pocketfft import _cook_nd_args
```



---
## _raw_fftnd
```python
from _pocketfft import _raw_fftnd
```



---
## _fftn_dispatcher
```python
from _pocketfft import _fftn_dispatcher
```



---
## fftn
```python
from _pocketfft import fftn
```

Compute the N-dimensional discrete Fourier Transform.

This function computes the *N*-dimensional discrete Fourier Transform over
any number of axes in an *M*-dimensional array by means of the Fast Fourier
Transform (FFT).

Parameters
----------
a : array_like
    Input array, can be complex.
s : sequence of ints, optional
    Shape (length of each transformed axis) of the output
    (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
    This corresponds to ``n`` for ``fft(x, n)``.
    Along any axis, if the given shape is smaller than that of the input,
    the input is cropped.  If it is larger, the input is padded with zeros.
    if `s` is not given, the shape of the input along the axes specified
    by `axes` is used.
axes : sequence of ints, optional
    Axes over which to compute the FFT.  If not given, the last ``len(s)``
    axes are used, or all axes if `s` is also not specified.
    Repeated indices in `axes` means that the transform over that axis is
    performed multiple times.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or by a combination of `s` and `a`,
    as explained in the parameters section above.

Raises
------
ValueError
    If `s` and `axes` have different length.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
numpy.fft : Overall view of discrete Fourier transforms, with definitions
    and conventions used.
ifftn : The inverse of `fftn`, the inverse *n*-dimensional FFT.
fft : The one-dimensional FFT, with definitions and conventions used.
rfftn : The *n*-dimensional FFT of real input.
fft2 : The two-dimensional FFT.
fftshift : Shifts zero-frequency terms to centre of array

Notes
-----
The output, analogously to `fft`, contains the term for zero frequency in
the low-order corner of all axes, the positive frequency terms in the
first half of all axes, the term for the Nyquist frequency in the middle
of all axes and the negative frequency terms in the second half of all
axes, in order of decreasingly negative frequency.

See `numpy.fft` for details, definitions and conventions used.

Examples
--------
>>> a = np.mgrid[:3, :3, :3][0]
>>> np.fft.fftn(a, axes=(1, 2))
array([[[ 0.+0.j,   0.+0.j,   0.+0.j], # may vary
        [ 0.+0.j,   0.+0.j,   0.+0.j],
        [ 0.+0.j,   0.+0.j,   0.+0.j]],
       [[ 9.+0.j,   0.+0.j,   0.+0.j],
        [ 0.+0.j,   0.+0.j,   0.+0.j],
        [ 0.+0.j,   0.+0.j,   0.+0.j]],
       [[18.+0.j,   0.+0.j,   0.+0.j],
        [ 0.+0.j,   0.+0.j,   0.+0.j],
        [ 0.+0.j,   0.+0.j,   0.+0.j]]])
>>> np.fft.fftn(a, (2, 2), axes=(0, 1))
array([[[ 2.+0.j,  2.+0.j,  2.+0.j], # may vary
        [ 0.+0.j,  0.+0.j,  0.+0.j]],
       [[-2.+0.j, -2.+0.j, -2.+0.j],
        [ 0.+0.j,  0.+0.j,  0.+0.j]]])

>>> import matplotlib.pyplot as plt
>>> [X, Y] = np.meshgrid(2 * np.pi * np.arange(200) / 12,
...                      2 * np.pi * np.arange(200) / 34)
>>> S = np.sin(X) + np.cos(Y) + np.random.uniform(0, 1, X.shape)
>>> FS = np.fft.fftn(S)
>>> plt.imshow(np.log(np.abs(np.fft.fftshift(FS))**2))
<matplotlib.image.AxesImage object at 0x...>
>>> plt.show()

---
## ifftn
```python
from _pocketfft import ifftn
```

Compute the N-dimensional inverse discrete Fourier Transform.

This function computes the inverse of the N-dimensional discrete
Fourier Transform over any number of axes in an M-dimensional array by
means of the Fast Fourier Transform (FFT).  In other words,
``ifftn(fftn(a)) == a`` to within numerical accuracy.
For a description of the definitions and conventions used, see `numpy.fft`.

The input, analogously to `ifft`, should be ordered in the same way as is
returned by `fftn`, i.e. it should have the term for zero frequency
in all axes in the low-order corner, the positive frequency terms in the
first half of all axes, the term for the Nyquist frequency in the middle
of all axes and the negative frequency terms in the second half of all
axes, in order of decreasingly negative frequency.

Parameters
----------
a : array_like
    Input array, can be complex.
s : sequence of ints, optional
    Shape (length of each transformed axis) of the output
    (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
    This corresponds to ``n`` for ``ifft(x, n)``.
    Along any axis, if the given shape is smaller than that of the input,
    the input is cropped.  If it is larger, the input is padded with zeros.
    if `s` is not given, the shape of the input along the axes specified
    by `axes` is used.  See notes for issue on `ifft` zero padding.
axes : sequence of ints, optional
    Axes over which to compute the IFFT.  If not given, the last ``len(s)``
    axes are used, or all axes if `s` is also not specified.
    Repeated indices in `axes` means that the inverse transform over that
    axis is performed multiple times.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or by a combination of `s` or `a`,
    as explained in the parameters section above.

Raises
------
ValueError
    If `s` and `axes` have different length.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
numpy.fft : Overall view of discrete Fourier transforms, with definitions
     and conventions used.
fftn : The forward *n*-dimensional FFT, of which `ifftn` is the inverse.
ifft : The one-dimensional inverse FFT.
ifft2 : The two-dimensional inverse FFT.
ifftshift : Undoes `fftshift`, shifts zero-frequency terms to beginning
    of array.

Notes
-----
See `numpy.fft` for definitions and conventions used.

Zero-padding, analogously with `ifft`, is performed by appending zeros to
the input along the specified dimension.  Although this is the common
approach, it might lead to surprising results.  If another form of zero
padding is desired, it must be performed before `ifftn` is called.

Examples
--------
>>> a = np.eye(4)
>>> np.fft.ifftn(np.fft.fftn(a, axes=(0,)), axes=(1,))
array([[1.+0.j,  0.+0.j,  0.+0.j,  0.+0.j], # may vary
       [0.+0.j,  1.+0.j,  0.+0.j,  0.+0.j],
       [0.+0.j,  0.+0.j,  1.+0.j,  0.+0.j],
       [0.+0.j,  0.+0.j,  0.+0.j,  1.+0.j]])


Create and plot an image with band-limited frequency content:

>>> import matplotlib.pyplot as plt
>>> n = np.zeros((200,200), dtype=complex)
>>> n[60:80, 20:40] = np.exp(1j*np.random.uniform(0, 2*np.pi, (20, 20)))
>>> im = np.fft.ifftn(n).real
>>> plt.imshow(im)
<matplotlib.image.AxesImage object at 0x...>
>>> plt.show()

---
## fft2
```python
from _pocketfft import fft2
```

Compute the 2-dimensional discrete Fourier Transform.

This function computes the *n*-dimensional discrete Fourier Transform
over any axes in an *M*-dimensional array by means of the
Fast Fourier Transform (FFT).  By default, the transform is computed over
the last two axes of the input array, i.e., a 2-dimensional FFT.

Parameters
----------
a : array_like
    Input array, can be complex
s : sequence of ints, optional
    Shape (length of each transformed axis) of the output
    (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
    This corresponds to ``n`` for ``fft(x, n)``.
    Along each axis, if the given shape is smaller than that of the input,
    the input is cropped.  If it is larger, the input is padded with zeros.
    if `s` is not given, the shape of the input along the axes specified
    by `axes` is used.
axes : sequence of ints, optional
    Axes over which to compute the FFT.  If not given, the last two
    axes are used.  A repeated index in `axes` means the transform over
    that axis is performed multiple times.  A one-element sequence means
    that a one-dimensional FFT is performed.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or the last two axes if `axes` is not given.

Raises
------
ValueError
    If `s` and `axes` have different length, or `axes` not given and
    ``len(s) != 2``.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
numpy.fft : Overall view of discrete Fourier transforms, with definitions
     and conventions used.
ifft2 : The inverse two-dimensional FFT.
fft : The one-dimensional FFT.
fftn : The *n*-dimensional FFT.
fftshift : Shifts zero-frequency terms to the center of the array.
    For two-dimensional input, swaps first and third quadrants, and second
    and fourth quadrants.

Notes
-----
`fft2` is just `fftn` with a different default for `axes`.

The output, analogously to `fft`, contains the term for zero frequency in
the low-order corner of the transformed axes, the positive frequency terms
in the first half of these axes, the term for the Nyquist frequency in the
middle of the axes and the negative frequency terms in the second half of
the axes, in order of decreasingly negative frequency.

See `fftn` for details and a plotting example, and `numpy.fft` for
definitions and conventions used.


Examples
--------
>>> a = np.mgrid[:5, :5][0]
>>> np.fft.fft2(a)
array([[ 50.  +0.j        ,   0.  +0.j        ,   0.  +0.j        , # may vary
          0.  +0.j        ,   0.  +0.j        ],
       [-12.5+17.20477401j,   0.  +0.j        ,   0.  +0.j        ,
          0.  +0.j        ,   0.  +0.j        ],
       [-12.5 +4.0614962j ,   0.  +0.j        ,   0.  +0.j        ,
          0.  +0.j        ,   0.  +0.j        ],
       [-12.5 -4.0614962j ,   0.  +0.j        ,   0.  +0.j        ,
          0.  +0.j        ,   0.  +0.j        ],
       [-12.5-17.20477401j,   0.  +0.j        ,   0.  +0.j        ,
          0.  +0.j        ,   0.  +0.j        ]])

---
## ifft2
```python
from _pocketfft import ifft2
```

Compute the 2-dimensional inverse discrete Fourier Transform.

This function computes the inverse of the 2-dimensional discrete Fourier
Transform over any number of axes in an M-dimensional array by means of
the Fast Fourier Transform (FFT).  In other words, ``ifft2(fft2(a)) == a``
to within numerical accuracy.  By default, the inverse transform is
computed over the last two axes of the input array.

The input, analogously to `ifft`, should be ordered in the same way as is
returned by `fft2`, i.e. it should have the term for zero frequency
in the low-order corner of the two axes, the positive frequency terms in
the first half of these axes, the term for the Nyquist frequency in the
middle of the axes and the negative frequency terms in the second half of
both axes, in order of decreasingly negative frequency.

Parameters
----------
a : array_like
    Input array, can be complex.
s : sequence of ints, optional
    Shape (length of each axis) of the output (``s[0]`` refers to axis 0,
    ``s[1]`` to axis 1, etc.).  This corresponds to `n` for ``ifft(x, n)``.
    Along each axis, if the given shape is smaller than that of the input,
    the input is cropped.  If it is larger, the input is padded with zeros.
    if `s` is not given, the shape of the input along the axes specified
    by `axes` is used.  See notes for issue on `ifft` zero padding.
axes : sequence of ints, optional
    Axes over which to compute the FFT.  If not given, the last two
    axes are used.  A repeated index in `axes` means the transform over
    that axis is performed multiple times.  A one-element sequence means
    that a one-dimensional FFT is performed.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or the last two axes if `axes` is not given.

Raises
------
ValueError
    If `s` and `axes` have different length, or `axes` not given and
    ``len(s) != 2``.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
numpy.fft : Overall view of discrete Fourier transforms, with definitions
     and conventions used.
fft2 : The forward 2-dimensional FFT, of which `ifft2` is the inverse.
ifftn : The inverse of the *n*-dimensional FFT.
fft : The one-dimensional FFT.
ifft : The one-dimensional inverse FFT.

Notes
-----
`ifft2` is just `ifftn` with a different default for `axes`.

See `ifftn` for details and a plotting example, and `numpy.fft` for
definition and conventions used.

Zero-padding, analogously with `ifft`, is performed by appending zeros to
the input along the specified dimension.  Although this is the common
approach, it might lead to surprising results.  If another form of zero
padding is desired, it must be performed before `ifft2` is called.

Examples
--------
>>> a = 4 * np.eye(4)
>>> np.fft.ifft2(a)
array([[1.+0.j,  0.+0.j,  0.+0.j,  0.+0.j], # may vary
       [0.+0.j,  0.+0.j,  0.+0.j,  1.+0.j],
       [0.+0.j,  0.+0.j,  1.+0.j,  0.+0.j],
       [0.+0.j,  1.+0.j,  0.+0.j,  0.+0.j]])

---
## rfftn
```python
from _pocketfft import rfftn
```

Compute the N-dimensional discrete Fourier Transform for real input.

This function computes the N-dimensional discrete Fourier Transform over
any number of axes in an M-dimensional real array by means of the Fast
Fourier Transform (FFT).  By default, all axes are transformed, with the
real transform performed over the last axis, while the remaining
transforms are complex.

Parameters
----------
a : array_like
    Input array, taken to be real.
s : sequence of ints, optional
    Shape (length along each transformed axis) to use from the input.
    (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.).
    The final element of `s` corresponds to `n` for ``rfft(x, n)``, while
    for the remaining axes, it corresponds to `n` for ``fft(x, n)``.
    Along any axis, if the given shape is smaller than that of the input,
    the input is cropped.  If it is larger, the input is padded with zeros.
    if `s` is not given, the shape of the input along the axes specified
    by `axes` is used.
axes : sequence of ints, optional
    Axes over which to compute the FFT.  If not given, the last ``len(s)``
    axes are used, or all axes if `s` is also not specified.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : complex ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or by a combination of `s` and `a`,
    as explained in the parameters section above.
    The length of the last axis transformed will be ``s[-1]//2+1``,
    while the remaining transformed axes will have lengths according to
    `s`, or unchanged from the input.

Raises
------
ValueError
    If `s` and `axes` have different length.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
irfftn : The inverse of `rfftn`, i.e. the inverse of the n-dimensional FFT
     of real input.
fft : The one-dimensional FFT, with definitions and conventions used.
rfft : The one-dimensional FFT of real input.
fftn : The n-dimensional FFT.
rfft2 : The two-dimensional FFT of real input.

Notes
-----
The transform for real input is performed over the last transformation
axis, as by `rfft`, then the transform over the remaining axes is
performed as by `fftn`.  The order of the output is as for `rfft` for the
final transformation axis, and as for `fftn` for the remaining
transformation axes.

See `fft` for details, definitions and conventions used.

Examples
--------
>>> a = np.ones((2, 2, 2))
>>> np.fft.rfftn(a)
array([[[8.+0.j,  0.+0.j], # may vary
        [0.+0.j,  0.+0.j]],
       [[0.+0.j,  0.+0.j],
        [0.+0.j,  0.+0.j]]])

>>> np.fft.rfftn(a, axes=(2, 0))
array([[[4.+0.j,  0.+0.j], # may vary
        [4.+0.j,  0.+0.j]],
       [[0.+0.j,  0.+0.j],
        [0.+0.j,  0.+0.j]]])

---
## rfft2
```python
from _pocketfft import rfft2
```

Compute the 2-dimensional FFT of a real array.

Parameters
----------
a : array
    Input array, taken to be real.
s : sequence of ints, optional
    Shape of the FFT.
axes : sequence of ints, optional
    Axes over which to compute the FFT.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : ndarray
    The result of the real 2-D FFT.

See Also
--------
rfftn : Compute the N-dimensional discrete Fourier Transform for real
        input.

Notes
-----
This is really just `rfftn` with different default behavior.
For more details see `rfftn`.

Examples
--------
>>> a = np.mgrid[:5, :5][0]
>>> np.fft.rfft2(a)
array([[ 50.  +0.j        ,   0.  +0.j        ,   0.  +0.j        ],
       [-12.5+17.20477401j,   0.  +0.j        ,   0.  +0.j        ],
       [-12.5 +4.0614962j ,   0.  +0.j        ,   0.  +0.j        ],
       [-12.5 -4.0614962j ,   0.  +0.j        ,   0.  +0.j        ],
       [-12.5-17.20477401j,   0.  +0.j        ,   0.  +0.j        ]])

---
## irfftn
```python
from _pocketfft import irfftn
```

Computes the inverse of `rfftn`.

This function computes the inverse of the N-dimensional discrete
Fourier Transform for real input over any number of axes in an
M-dimensional array by means of the Fast Fourier Transform (FFT).  In
other words, ``irfftn(rfftn(a), a.shape) == a`` to within numerical
accuracy. (The ``a.shape`` is necessary like ``len(a)`` is for `irfft`,
and for the same reason.)

The input should be ordered in the same way as is returned by `rfftn`,
i.e. as for `irfft` for the final transformation axis, and as for `ifftn`
along all the other axes.

Parameters
----------
a : array_like
    Input array.
s : sequence of ints, optional
    Shape (length of each transformed axis) of the output
    (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). `s` is also the
    number of input points used along this axis, except for the last axis,
    where ``s[-1]//2+1`` points of the input are used.
    Along any axis, if the shape indicated by `s` is smaller than that of
    the input, the input is cropped.  If it is larger, the input is padded
    with zeros. If `s` is not given, the shape of the input along the axes
    specified by axes is used. Except for the last axis which is taken to
    be ``2*(m-1)`` where ``m`` is the length of the input along that axis.
axes : sequence of ints, optional
    Axes over which to compute the inverse FFT. If not given, the last
    `len(s)` axes are used, or all axes if `s` is also not specified.
    Repeated indices in `axes` means that the inverse transform over that
    axis is performed multiple times.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : ndarray
    The truncated or zero-padded input, transformed along the axes
    indicated by `axes`, or by a combination of `s` or `a`,
    as explained in the parameters section above.
    The length of each transformed axis is as given by the corresponding
    element of `s`, or the length of the input in every axis except for the
    last one if `s` is not given.  In the final transformed axis the length
    of the output when `s` is not given is ``2*(m-1)`` where ``m`` is the
    length of the final transformed axis of the input.  To get an odd
    number of output points in the final axis, `s` must be specified.

Raises
------
ValueError
    If `s` and `axes` have different length.
IndexError
    If an element of `axes` is larger than than the number of axes of `a`.

See Also
--------
rfftn : The forward n-dimensional FFT of real input,
        of which `ifftn` is the inverse.
fft : The one-dimensional FFT, with definitions and conventions used.
irfft : The inverse of the one-dimensional FFT of real input.
irfft2 : The inverse of the two-dimensional FFT of real input.

Notes
-----
See `fft` for definitions and conventions used.

See `rfft` for definitions and conventions used for real input.

The correct interpretation of the hermitian input depends on the shape of
the original data, as given by `s`. This is because each input shape could
correspond to either an odd or even length signal. By default, `irfftn`
assumes an even output length which puts the last entry at the Nyquist
frequency; aliasing with its symmetric counterpart. When performing the
final complex to real transform, the last value is thus treated as purely
real. To avoid losing information, the correct shape of the real input
**must** be given.

Examples
--------
>>> a = np.zeros((3, 2, 2))
>>> a[0, 0, 0] = 3 * 2 * 2
>>> np.fft.irfftn(a)
array([[[1.,  1.],
        [1.,  1.]],
       [[1.,  1.],
        [1.,  1.]],
       [[1.,  1.],
        [1.,  1.]]])

---
## irfft2
```python
from _pocketfft import irfft2
```

Computes the inverse of `rfft2`.

Parameters
----------
a : array_like
    The input array
s : sequence of ints, optional
    Shape of the real output to the inverse FFT.
axes : sequence of ints, optional
    The axes over which to compute the inverse fft.
    Default is the last two axes.
norm : {"backward", "ortho", "forward"}, optional
    .. versionadded:: 1.10.0

    Normalization mode (see `numpy.fft`). Default is "backward".
    Indicates which direction of the forward/backward pair of transforms
    is scaled and with what normalization factor.

    .. versionadded:: 1.20.0

        The "backward", "forward" values were added.

Returns
-------
out : ndarray
    The result of the inverse real 2-D FFT.

See Also
--------
rfft2 : The forward two-dimensional FFT of real input,
        of which `irfft2` is the inverse.
rfft : The one-dimensional FFT for real input.
irfft : The inverse of the one-dimensional FFT of real input.
irfftn : Compute the inverse of the N-dimensional FFT of real input.

Notes
-----
This is really `irfftn` with different defaults.
For more details see `irfftn`.

Examples
--------
>>> a = np.mgrid[:5, :5][0]
>>> A = np.fft.rfft2(a)
>>> np.fft.irfft2(A, s=a.shape)
array([[0., 0., 0., 0., 0.],
       [1., 1., 1., 1., 1.],
       [2., 2., 2., 2., 2.],
       [3., 3., 3., 3., 3.],
       [4., 4., 4., 4., 4.]])

---
## add_newdoc
```python
from constants import add_newdoc
```



---
## __name__
```python
from ufuncs import __name__
```



---
## __name__
```python
from _pickle import __name__
```



---
## __bit_generator_ctor
```python
from _pickle import __bit_generator_ctor
```

Pickling helper function that returns a bit generator object

Parameters
----------
bit_generator_name : str
    String containing the name of the BitGenerator

Returns
-------
bit_generator : BitGenerator
    BitGenerator instance

---
## __generator_ctor
```python
from _pickle import __generator_ctor
```

Pickling helper function that returns a Generator object

Parameters
----------
bit_generator_name : str
    String containing the core BitGenerator's name
bit_generator_ctor : callable, optional
    Callable function that takes bit_generator_name as its only argument
    and returns an instantized bit generator.

Returns
-------
rg : Generator
    Generator using the named core BitGenerator

---
## __randomstate_ctor
```python
from _pickle import __randomstate_ctor
```

Pickling helper function that returns a legacy RandomState-like object

Parameters
----------
bit_generator_name : str
    String containing the core BitGenerator's name
bit_generator_ctor : callable, optional
    Callable function that takes bit_generator_name as its only argument
    and returns an instantized bit generator.

Returns
-------
rs : RandomState
    Legacy RandomState using the named core BitGenerator

---
## __RandomState_ctor
```python
from __init__ import __RandomState_ctor
```

Return a RandomState instance.

This function exists solely to assist (un)pickling.

Note that the state of the RandomState returned here is irrelevant, as this
function's entire purpose is to return a newly allocated RandomState whose
state pickle can set.  Consequently the RandomState returned by this function
is a freshly allocated copy with a seed=0.

See https://github.com/numpy/numpy/issues/4763 for a detailed discussion

---
## __name__
```python
from defmatrix import __name__
```



---
## _convert_from_string
```python
from defmatrix import _convert_from_string
```



---
## asmatrix
```python
from defmatrix import asmatrix
```

Interpret the input as a matrix.

Unlike `matrix`, `asmatrix` does not make a copy if the input is already
a matrix or an ndarray.  Equivalent to ``matrix(data, copy=False)``.

Parameters
----------
data : array_like
    Input data.
dtype : data-type
   Data-type of the output matrix.

Returns
-------
mat : matrix
    `data` interpreted as a matrix.

Examples
--------
>>> x = np.array([[1, 2], [3, 4]])

>>> m = np.asmatrix(x)

>>> x[0,0] = 5

>>> m
matrix([[5, 2],
        [3, 4]])

---
## matrix
```python
from defmatrix import matrix
```

matrix(data, dtype=None, copy=True)

.. note:: It is no longer recommended to use this class, even for linear
          algebra. Instead use regular arrays. The class may be removed
          in the future.

Returns a matrix from an array-like object, or from a string of data.
A matrix is a specialized 2-D array that retains its 2-D nature
through operations.  It has certain special operators, such as ``*``
(matrix multiplication) and ``**`` (matrix power).

Parameters
----------
data : array_like or string
   If `data` is a string, it is interpreted as a matrix with commas
   or spaces separating columns, and semicolons separating rows.
dtype : data-type
   Data-type of the output matrix.
copy : bool
   If `data` is already an `ndarray`, then this flag determines
   whether the data is copied (the default), or whether a view is
   constructed.

See Also
--------
array

Examples
--------
>>> a = np.matrix('1 2; 3 4')
>>> a
matrix([[1, 2],
        [3, 4]])

>>> np.matrix([[1, 2], [3, 4]])
matrix([[1, 2],
        [3, 4]])

---
## _from_string
```python
from defmatrix import _from_string
```



---
## bmat
```python
from defmatrix import bmat
```

Build a matrix object from a string, nested sequence, or array.

Parameters
----------
obj : str or array_like
    Input data. If a string, variables in the current scope may be
    referenced by name.
ldict : dict, optional
    A dictionary that replaces local operands in current frame.
    Ignored if `obj` is not a string or `gdict` is None.
gdict : dict, optional
    A dictionary that replaces global operands in current frame.
    Ignored if `obj` is not a string.

Returns
-------
out : matrix
    Returns a matrix object, which is a specialized 2-D array.

See Also
--------
block :
    A generalization of this function for N-d arrays, that returns normal
    ndarrays.

Examples
--------
>>> A = np.mat('1 1; 1 1')
>>> B = np.mat('2 2; 2 2')
>>> C = np.mat('3 4; 5 6')
>>> D = np.mat('7 8; 9 0')

All the following expressions construct the same block matrix:

>>> np.bmat([[A, B], [C, D]])
matrix([[1, 1, 2, 2],
        [1, 1, 2, 2],
        [3, 4, 7, 8],
        [5, 6, 9, 0]])
>>> np.bmat(np.r_[np.c_[A, B], np.c_[C, D]])
matrix([[1, 1, 2, 2],
        [1, 1, 2, 2],
        [3, 4, 7, 8],
        [5, 6, 9, 0]])
>>> np.bmat('A,B; C,D')
matrix([[1, 1, 2, 2],
        [1, 1, 2, 2],
        [3, 4, 7, 8],
        [5, 6, 9, 0]])

---
## __new__
```python
from defmatrix import __new__
```



---
## __array_finalize__
```python
from defmatrix import __array_finalize__
```



---
## __getitem__
```python
from defmatrix import __getitem__
```



---
## __mul__
```python
from defmatrix import __mul__
```



---
## __rmul__
```python
from defmatrix import __rmul__
```



---
## __imul__
```python
from defmatrix import __imul__
```



---
## __pow__
```python
from defmatrix import __pow__
```



---
## __ipow__
```python
from defmatrix import __ipow__
```



---
## __rpow__
```python
from defmatrix import __rpow__
```



---
## _align
```python
from defmatrix import _align
```

A convenience function for operations that need to preserve axis
orientation.

---
## _collapse
```python
from defmatrix import _collapse
```

A convenience function for operations that want to collapse
to a scalar like _align, but are using keepdims=True

---
## tolist
```python
from defmatrix import tolist
```

Return the matrix as a (possibly nested) list.

See `ndarray.tolist` for full documentation.

See Also
--------
ndarray.tolist

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.tolist()
[[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]

---
## sum
```python
from defmatrix import sum
```

Returns the sum of the matrix elements, along the given axis.

Refer to `numpy.sum` for full documentation.

See Also
--------
numpy.sum

Notes
-----
This is the same as `ndarray.sum`, except that where an `ndarray` would
be returned, a `matrix` object is returned instead.

Examples
--------
>>> x = np.matrix([[1, 2], [4, 3]])
>>> x.sum()
10
>>> x.sum(axis=1)
matrix([[3],
        [7]])
>>> x.sum(axis=1, dtype='float')
matrix([[3.],
        [7.]])
>>> out = np.zeros((2, 1), dtype='float')
>>> x.sum(axis=1, dtype='float', out=np.asmatrix(out))
matrix([[3.],
        [7.]])

---
## squeeze
```python
from defmatrix import squeeze
```

Return a possibly reshaped matrix.

Refer to `numpy.squeeze` for more documentation.

Parameters
----------
axis : None or int or tuple of ints, optional
    Selects a subset of the axes of length one in the shape.
    If an axis is selected with shape entry greater than one,
    an error is raised.

Returns
-------
squeezed : matrix
    The matrix, but as a (1, N) matrix if it had shape (N, 1).

See Also
--------
numpy.squeeze : related function

Notes
-----
If `m` has a single column then that column is returned
as the single row of a matrix.  Otherwise `m` is returned.
The returned matrix is always either `m` itself or a view into `m`.
Supplying an axis keyword argument will not affect the returned matrix
but it may cause an error to be raised.

Examples
--------
>>> c = np.matrix([[1], [2]])
>>> c
matrix([[1],
        [2]])
>>> c.squeeze()
matrix([[1, 2]])
>>> r = c.T
>>> r
matrix([[1, 2]])
>>> r.squeeze()
matrix([[1, 2]])
>>> m = np.matrix([[1, 2], [3, 4]])
>>> m.squeeze()
matrix([[1, 2],
        [3, 4]])

---
## flatten
```python
from defmatrix import flatten
```

Return a flattened copy of the matrix.

All `N` elements of the matrix are placed into a single row.

Parameters
----------
order : {'C', 'F', 'A', 'K'}, optional
    'C' means to flatten in row-major (C-style) order. 'F' means to
    flatten in column-major (Fortran-style) order. 'A' means to
    flatten in column-major order if `m` is Fortran *contiguous* in
    memory, row-major order otherwise. 'K' means to flatten `m` in
    the order the elements occur in memory. The default is 'C'.

Returns
-------
y : matrix
    A copy of the matrix, flattened to a `(1, N)` matrix where `N`
    is the number of elements in the original matrix.

See Also
--------
ravel : Return a flattened array.
flat : A 1-D flat iterator over the matrix.

Examples
--------
>>> m = np.matrix([[1,2], [3,4]])
>>> m.flatten()
matrix([[1, 2, 3, 4]])
>>> m.flatten('F')
matrix([[1, 3, 2, 4]])

---
## mean
```python
from defmatrix import mean
```

Returns the average of the matrix elements along the given axis.

Refer to `numpy.mean` for full documentation.

See Also
--------
numpy.mean

Notes
-----
Same as `ndarray.mean` except that, where that returns an `ndarray`,
this returns a `matrix` object.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3, 4)))
>>> x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.mean()
5.5
>>> x.mean(0)
matrix([[4., 5., 6., 7.]])
>>> x.mean(1)
matrix([[ 1.5],
        [ 5.5],
        [ 9.5]])

---
## std
```python
from defmatrix import std
```

Return the standard deviation of the array elements along the given axis.

Refer to `numpy.std` for full documentation.

See Also
--------
numpy.std

Notes
-----
This is the same as `ndarray.std`, except that where an `ndarray` would
be returned, a `matrix` object is returned instead.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3, 4)))
>>> x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.std()
3.4520525295346629 # may vary
>>> x.std(0)
matrix([[ 3.26598632,  3.26598632,  3.26598632,  3.26598632]]) # may vary
>>> x.std(1)
matrix([[ 1.11803399],
        [ 1.11803399],
        [ 1.11803399]])

---
## var
```python
from defmatrix import var
```

Returns the variance of the matrix elements, along the given axis.

Refer to `numpy.var` for full documentation.

See Also
--------
numpy.var

Notes
-----
This is the same as `ndarray.var`, except that where an `ndarray` would
be returned, a `matrix` object is returned instead.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3, 4)))
>>> x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.var()
11.916666666666666
>>> x.var(0)
matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]]) # may vary
>>> x.var(1)
matrix([[1.25],
        [1.25],
        [1.25]])

---
## prod
```python
from defmatrix import prod
```

Return the product of the array elements over the given axis.

Refer to `prod` for full documentation.

See Also
--------
prod, ndarray.prod

Notes
-----
Same as `ndarray.prod`, except, where that returns an `ndarray`, this
returns a `matrix` object instead.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.prod()
0
>>> x.prod(0)
matrix([[  0,  45, 120, 231]])
>>> x.prod(1)
matrix([[   0],
        [ 840],
        [7920]])

---
## any
```python
from defmatrix import any
```

Test whether any array element along a given axis evaluates to True.

Refer to `numpy.any` for full documentation.

Parameters
----------
axis : int, optional
    Axis along which logical OR is performed
out : ndarray, optional
    Output to existing array instead of creating new one, must have
    same shape as expected output

Returns
-------
    any : bool, ndarray
        Returns a single bool if `axis` is ``None``; otherwise,
        returns `ndarray`

---
## all
```python
from defmatrix import all
```

Test whether all matrix elements along a given axis evaluate to True.

Parameters
----------
See `numpy.all` for complete descriptions

See Also
--------
numpy.all

Notes
-----
This is the same as `ndarray.all`, but it returns a `matrix` object.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> y = x[0]; y
matrix([[0, 1, 2, 3]])
>>> (x == y)
matrix([[ True,  True,  True,  True],
        [False, False, False, False],
        [False, False, False, False]])
>>> (x == y).all()
False
>>> (x == y).all(0)
matrix([[False, False, False, False]])
>>> (x == y).all(1)
matrix([[ True],
        [False],
        [False]])

---
## max
```python
from defmatrix import max
```

Return the maximum value along an axis.

Parameters
----------
See `amax` for complete descriptions

See Also
--------
amax, ndarray.max

Notes
-----
This is the same as `ndarray.max`, but returns a `matrix` object
where `ndarray.max` would return an ndarray.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.max()
11
>>> x.max(0)
matrix([[ 8,  9, 10, 11]])
>>> x.max(1)
matrix([[ 3],
        [ 7],
        [11]])

---
## argmax
```python
from defmatrix import argmax
```

Indexes of the maximum values along an axis.

Return the indexes of the first occurrences of the maximum values
along the specified axis.  If axis is None, the index is for the
flattened matrix.

Parameters
----------
See `numpy.argmax` for complete descriptions

See Also
--------
numpy.argmax

Notes
-----
This is the same as `ndarray.argmax`, but returns a `matrix` object
where `ndarray.argmax` would return an `ndarray`.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.argmax()
11
>>> x.argmax(0)
matrix([[2, 2, 2, 2]])
>>> x.argmax(1)
matrix([[3],
        [3],
        [3]])

---
## min
```python
from defmatrix import min
```

Return the minimum value along an axis.

Parameters
----------
See `amin` for complete descriptions.

See Also
--------
amin, ndarray.min

Notes
-----
This is the same as `ndarray.min`, but returns a `matrix` object
where `ndarray.min` would return an ndarray.

Examples
--------
>>> x = -np.matrix(np.arange(12).reshape((3,4))); x
matrix([[  0,  -1,  -2,  -3],
        [ -4,  -5,  -6,  -7],
        [ -8,  -9, -10, -11]])
>>> x.min()
-11
>>> x.min(0)
matrix([[ -8,  -9, -10, -11]])
>>> x.min(1)
matrix([[ -3],
        [ -7],
        [-11]])

---
## argmin
```python
from defmatrix import argmin
```

Indexes of the minimum values along an axis.

Return the indexes of the first occurrences of the minimum values
along the specified axis.  If axis is None, the index is for the
flattened matrix.

Parameters
----------
See `numpy.argmin` for complete descriptions.

See Also
--------
numpy.argmin

Notes
-----
This is the same as `ndarray.argmin`, but returns a `matrix` object
where `ndarray.argmin` would return an `ndarray`.

Examples
--------
>>> x = -np.matrix(np.arange(12).reshape((3,4))); x
matrix([[  0,  -1,  -2,  -3],
        [ -4,  -5,  -6,  -7],
        [ -8,  -9, -10, -11]])
>>> x.argmin()
11
>>> x.argmin(0)
matrix([[2, 2, 2, 2]])
>>> x.argmin(1)
matrix([[3],
        [3],
        [3]])

---
## ptp
```python
from defmatrix import ptp
```

Peak-to-peak (maximum - minimum) value along the given axis.

Refer to `numpy.ptp` for full documentation.

See Also
--------
numpy.ptp

Notes
-----
Same as `ndarray.ptp`, except, where that would return an `ndarray` object,
this returns a `matrix` object.

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.ptp()
11
>>> x.ptp(0)
matrix([[8, 8, 8, 8]])
>>> x.ptp(1)
matrix([[3],
        [3],
        [3]])

---
## I
```python
from defmatrix import I
```

Returns the (multiplicative) inverse of invertible `self`.

Parameters
----------
None

Returns
-------
ret : matrix object
    If `self` is non-singular, `ret` is such that ``ret * self`` ==
    ``self * ret`` == ``np.matrix(np.eye(self[0,:].size))`` all return
    ``True``.

Raises
------
numpy.linalg.LinAlgError: Singular matrix
    If `self` is singular.

See Also
--------
linalg.inv

Examples
--------
>>> m = np.matrix('[1, 2; 3, 4]'); m
matrix([[1, 2],
        [3, 4]])
>>> m.getI()
matrix([[-2. ,  1. ],
        [ 1.5, -0.5]])
>>> m.getI() * m
matrix([[ 1.,  0.], # may vary
        [ 0.,  1.]])

---
## A
```python
from defmatrix import A
```

Return `self` as an `ndarray` object.

Equivalent to ``np.asarray(self)``.

Parameters
----------
None

Returns
-------
ret : ndarray
    `self` as an `ndarray`

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.getA()
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])

---
## A1
```python
from defmatrix import A1
```

Return `self` as a flattened `ndarray`.

Equivalent to ``np.asarray(x).ravel()``

Parameters
----------
None

Returns
-------
ret : ndarray
    `self`, 1-D, as an `ndarray`

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.getA1()
array([ 0,  1,  2, ...,  9, 10, 11])

---
## ravel
```python
from defmatrix import ravel
```

Return a flattened matrix.

Refer to `numpy.ravel` for more documentation.

Parameters
----------
order : {'C', 'F', 'A', 'K'}, optional
    The elements of `m` are read using this index order. 'C' means to
    index the elements in C-like order, with the last axis index
    changing fastest, back to the first axis index changing slowest.
    'F' means to index the elements in Fortran-like index order, with
    the first index changing fastest, and the last index changing
    slowest. Note that the 'C' and 'F' options take no account of the
    memory layout of the underlying array, and only refer to the order
    of axis indexing.  'A' means to read the elements in Fortran-like
    index order if `m` is Fortran *contiguous* in memory, C-like order
    otherwise.  'K' means to read the elements in the order they occur
    in memory, except for reversing the data when strides are negative.
    By default, 'C' index order is used.

Returns
-------
ret : matrix
    Return the matrix flattened to shape `(1, N)` where `N`
    is the number of elements in the original matrix.
    A copy is made only if necessary.

See Also
--------
matrix.flatten : returns a similar output matrix but always a copy
matrix.flat : a flat iterator on the array.
numpy.ravel : related function which returns an ndarray

---
## T
```python
from defmatrix import T
```

Returns the transpose of the matrix.

Does *not* conjugate!  For the complex conjugate transpose, use ``.H``.

Parameters
----------
None

Returns
-------
ret : matrix object
    The (non-conjugated) transpose of the matrix.

See Also
--------
transpose, getH

Examples
--------
>>> m = np.matrix('[1, 2; 3, 4]')
>>> m
matrix([[1, 2],
        [3, 4]])
>>> m.getT()
matrix([[1, 3],
        [2, 4]])

---
## H
```python
from defmatrix import H
```

Returns the (complex) conjugate transpose of `self`.

Equivalent to ``np.transpose(self)`` if `self` is real-valued.

Parameters
----------
None

Returns
-------
ret : matrix object
    complex conjugate transpose of `self`

Examples
--------
>>> x = np.matrix(np.arange(12).reshape((3,4)))
>>> z = x - 1j*x; z
matrix([[  0. +0.j,   1. -1.j,   2. -2.j,   3. -3.j],
        [  4. -4.j,   5. -5.j,   6. -6.j,   7. -7.j],
        [  8. -8.j,   9. -9.j,  10.-10.j,  11.-11.j]])
>>> z.getH()
matrix([[ 0. -0.j,  4. +4.j,  8. +8.j],
        [ 1. +1.j,  5. +5.j,  9. +9.j],
        [ 2. +2.j,  6. +6.j, 10.+10.j],
        [ 3. +3.j,  7. +7.j, 11.+11.j]])

---
## __name__
```python
from laguerre import __name__
```

==================================================
Laguerre Series (:mod:`numpy.polynomial.laguerre`)
==================================================

This module provides a number of objects (mostly functions) useful for
dealing with Laguerre series, including a `Laguerre` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with such polynomials is in the
docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------
.. autosummary::
   :toctree: generated/

   Laguerre

Constants
---------
.. autosummary::
   :toctree: generated/

   lagdomain
   lagzero
   lagone
   lagx

Arithmetic
----------
.. autosummary::
   :toctree: generated/

   lagadd
   lagsub
   lagmulx
   lagmul
   lagdiv
   lagpow
   lagval
   lagval2d
   lagval3d
   laggrid2d
   laggrid3d

Calculus
--------
.. autosummary::
   :toctree: generated/

   lagder
   lagint

Misc Functions
--------------
.. autosummary::
   :toctree: generated/

   lagfromroots
   lagroots
   lagvander
   lagvander2d
   lagvander3d
   laggauss
   lagweight
   lagcompanion
   lagfit
   lagtrim
   lagline
   lag2poly
   poly2lag

See also
--------
`numpy.polynomial`

---
## poly2lag
```python
from laguerre import poly2lag
```

poly2lag(pol)

Convert a polynomial to a Laguerre series.

Convert an array representing the coefficients of a polynomial (relative
to the "standard" basis) ordered from lowest degree to highest, to an
array of the coefficients of the equivalent Laguerre series, ordered
from lowest to highest degree.

Parameters
----------
pol : array_like
    1-D array containing the polynomial coefficients

Returns
-------
c : ndarray
    1-D array containing the coefficients of the equivalent Laguerre
    series.

See Also
--------
lag2poly

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.laguerre import poly2lag
>>> poly2lag(np.arange(4))
array([ 23., -63.,  58., -18.])

---
## lag2poly
```python
from laguerre import lag2poly
```

Convert a Laguerre series to a polynomial.

Convert an array representing the coefficients of a Laguerre series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.

Parameters
----------
c : array_like
    1-D array containing the Laguerre series coefficients, ordered
    from lowest order term to highest.

Returns
-------
pol : ndarray
    1-D array containing the coefficients of the equivalent polynomial
    (relative to the "standard" basis) ordered from lowest order term
    to highest.

See Also
--------
poly2lag

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.laguerre import lag2poly
>>> lag2poly([ 23., -63.,  58., -18.])
array([0., 1., 2., 3.])

---
## lagline
```python
from laguerre import lagline
```

Laguerre series whose graph is a straight line.

Parameters
----------
off, scl : scalars
    The specified line is given by ``off + scl*x``.

Returns
-------
y : ndarray
    This module's representation of the Laguerre series for
    ``off + scl*x``.

See Also
--------
numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline

Examples
--------
>>> from numpy.polynomial.laguerre import lagline, lagval
>>> lagval(0,lagline(3, 2))
3.0
>>> lagval(1,lagline(3, 2))
5.0

---
## lagfromroots
```python
from laguerre import lagfromroots
```

Generate a Laguerre series with given roots.

The function returns the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

in Laguerre form, where the `r_n` are the roots specified in `roots`.
If a zero has multiplicity n, then it must appear in `roots` n times.
For instance, if 2 is a root of multiplicity three and 3 is a root of
multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
roots can appear in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * L_1(x) + ... +  c_n * L_n(x)

The coefficient of the last term is not generally 1 for monic
polynomials in Laguerre form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of coefficients.  If all roots are real then `out` is a
    real array, if some of the roots are complex, then `out` is complex
    even if all the coefficients in the result are real (see Examples
    below).

See Also
--------
numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.chebyshev.chebfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.hermite_e.hermefromroots

Examples
--------
>>> from numpy.polynomial.laguerre import lagfromroots, lagval
>>> coef = lagfromroots((-1, 0, 1))
>>> lagval((-1, 0, 1), coef)
array([0.,  0.,  0.])
>>> coef = lagfromroots((-1j, 1j))
>>> lagval((-1j, 1j), coef)
array([0.+0.j, 0.+0.j])

---
## lagadd
```python
from laguerre import lagadd
```

Add one Laguerre series to another.

Returns the sum of two Laguerre series `c1` + `c2`.  The arguments
are sequences of coefficients ordered from lowest order term to
highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Laguerre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the Laguerre series of their sum.

See Also
--------
lagsub, lagmulx, lagmul, lagdiv, lagpow

Notes
-----
Unlike multiplication, division, etc., the sum of two Laguerre series
is a Laguerre series (without having to "reproject" the result onto
the basis set) so addition, just like that of "standard" polynomials,
is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.laguerre import lagadd
>>> lagadd([1, 2, 3], [1, 2, 3, 4])
array([2.,  4.,  6.,  4.])

---
## lagsub
```python
from laguerre import lagsub
```

Subtract one Laguerre series from another.

Returns the difference of two Laguerre series `c1` - `c2`.  The
sequences of coefficients are from lowest order term to highest, i.e.,
[1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Laguerre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Laguerre series coefficients representing their difference.

See Also
--------
lagadd, lagmulx, lagmul, lagdiv, lagpow

Notes
-----
Unlike multiplication, division, etc., the difference of two Laguerre
series is a Laguerre series (without having to "reproject" the result
onto the basis set) so subtraction, just like that of "standard"
polynomials, is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.laguerre import lagsub
>>> lagsub([1, 2, 3, 4], [1, 2, 3])
array([0.,  0.,  0.,  4.])

---
## lagmulx
```python
from laguerre import lagmulx
```

Multiply a Laguerre series by x.

Multiply the Laguerre series `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of Laguerre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

See Also
--------
lagadd, lagsub, lagmul, lagdiv, lagpow

Notes
-----
The multiplication uses the recursion relationship for Laguerre
polynomials in the form

.. math::

    xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x))

Examples
--------
>>> from numpy.polynomial.laguerre import lagmulx
>>> lagmulx([1, 2, 3])
array([-1.,  -1.,  11.,  -9.])

---
## lagmul
```python
from laguerre import lagmul
```

Multiply one Laguerre series by another.

Returns the product of two Laguerre series `c1` * `c2`.  The arguments
are sequences of coefficients, from lowest order "term" to highest,
e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Laguerre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Laguerre series coefficients representing their product.

See Also
--------
lagadd, lagsub, lagmulx, lagdiv, lagpow

Notes
-----
In general, the (polynomial) product of two C-series results in terms
that are not in the Laguerre polynomial basis set.  Thus, to express
the product as a Laguerre series, it is necessary to "reproject" the
product onto said basis set, which may produce "unintuitive" (but
correct) results; see Examples section below.

Examples
--------
>>> from numpy.polynomial.laguerre import lagmul
>>> lagmul([1, 2, 3], [0, 1, 2])
array([  8., -13.,  38., -51.,  36.])

---
## lagdiv
```python
from laguerre import lagdiv
```

Divide one Laguerre series by another.

Returns the quotient-with-remainder of two Laguerre series
`c1` / `c2`.  The arguments are sequences of coefficients from lowest
order "term" to highest, e.g., [1,2,3] represents the series
``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Laguerre series coefficients ordered from low to
    high.

Returns
-------
[quo, rem] : ndarrays
    Of Laguerre series coefficients representing the quotient and
    remainder.

See Also
--------
lagadd, lagsub, lagmulx, lagmul, lagpow

Notes
-----
In general, the (polynomial) division of one Laguerre series by another
results in quotient and remainder terms that are not in the Laguerre
polynomial basis set.  Thus, to express these results as a Laguerre
series, it is necessary to "reproject" the results onto the Laguerre
basis set, which may produce "unintuitive" (but correct) results; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.laguerre import lagdiv
>>> lagdiv([  8., -13.,  38., -51.,  36.], [0, 1, 2])
(array([1., 2., 3.]), array([0.]))
>>> lagdiv([  9., -12.,  38., -51.,  36.], [0, 1, 2])
(array([1., 2., 3.]), array([1., 1.]))

---
## lagpow
```python
from laguerre import lagpow
```

Raise a Laguerre series to a power.

Returns the Laguerre series `c` raised to the power `pow`. The
argument `c` is a sequence of coefficients ordered from low to high.
i.e., [1,2,3] is the series  ``P_0 + 2*P_1 + 3*P_2.``

Parameters
----------
c : array_like
    1-D array of Laguerre series coefficients ordered from low to
    high.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Laguerre series of power.

See Also
--------
lagadd, lagsub, lagmulx, lagmul, lagdiv

Examples
--------
>>> from numpy.polynomial.laguerre import lagpow
>>> lagpow([1, 2, 3], 2)
array([ 14., -16.,  56., -72.,  54.])

---
## lagder
```python
from laguerre import lagder
```

Differentiate a Laguerre series.

Returns the Laguerre series coefficients `c` differentiated `m` times
along `axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable). The argument
`c` is an array of coefficients from low to high degree along each
axis, e.g., [1,2,3] represents the series ``1*L_0 + 2*L_1 + 3*L_2``
while [[1,2],[1,2]] represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) +
2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is
``y``.

Parameters
----------
c : array_like
    Array of Laguerre series coefficients. If `c` is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change of
    variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Laguerre series of the derivative.

See Also
--------
lagint

Notes
-----
In general, the result of differentiating a Laguerre series does not
resemble the same operation on a power series. Thus the result of this
function may be "unintuitive," albeit correct; see Examples section
below.

Examples
--------
>>> from numpy.polynomial.laguerre import lagder
>>> lagder([ 1.,  1.,  1., -3.])
array([1.,  2.,  3.])
>>> lagder([ 1.,  0.,  0., -4.,  3.], m=2)
array([1.,  2.,  3.])

---
## lagint
```python
from laguerre import lagint
```

Integrate a Laguerre series.

Returns the Laguerre series coefficients `c` integrated `m` times from
`lbnd` along `axis`. At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument `c` is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series ``L_0 + 2*L_1 + 3*L_2`` while [[1,2],[1,2]]
represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) +
2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.


Parameters
----------
c : array_like
    Array of Laguerre series coefficients. If `c` is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at
    ``lbnd`` is the first value in the list, the value of the second
    integral at ``lbnd`` is the second value, etc.  If ``k == []`` (the
    default), all constants are set to zero.  If ``m == 1``, a single
    scalar can be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    Laguerre series coefficients of the integral.

Raises
------
ValueError
    If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
lagder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.
Why is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`.  Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a` - perhaps not what one would have first thought.

Also note that, in general, the result of integrating a C-series needs
to be "reprojected" onto the C-series basis set.  Thus, typically,
the result of this function is "unintuitive," albeit correct; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.laguerre import lagint
>>> lagint([1,2,3])
array([ 1.,  1.,  1., -3.])
>>> lagint([1,2,3], m=2)
array([ 1.,  0.,  0., -4.,  3.])
>>> lagint([1,2,3], k=1)
array([ 2.,  1.,  1., -3.])
>>> lagint([1,2,3], lbnd=-1)
array([11.5,  1. ,  1. , -3. ])
>>> lagint([1,2], m=2, k=[1,2], lbnd=-1)
array([ 11.16666667,  -5.        ,  -3.        ,   2.        ]) # may vary

---
## lagval
```python
from laguerre import lagval
```

Evaluate a Laguerre series at points x.

If `c` is of length `n + 1`, this function returns the value:

.. math:: p(x) = c_0 * L_0(x) + c_1 * L_1(x) + ... + c_n * L_n(x)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, algebra_like
    The shape of the return value is described above.

See Also
--------
lagval2d, laggrid2d, lagval3d, laggrid3d

Notes
-----
The evaluation uses Clenshaw recursion, aka synthetic division.

Examples
--------
>>> from numpy.polynomial.laguerre import lagval
>>> coef = [1,2,3]
>>> lagval(1, coef)
-0.5
>>> lagval([[1,2],[3,4]], coef)
array([[-0.5, -4. ],
       [-4.5, -2. ]])

---
## lagval2d
```python
from laguerre import lagval2d
```

Evaluate a 2-D Laguerre series at points (x, y).

This function returns the values:

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * L_i(x) * L_j(y)

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` is a 1-D array a one is implicitly appended to its shape to make
it 2-D. The shape of the result will be c.shape[2:] + x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and if it isn't an ndarray it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in ``c[i,j]``. If `c` has
    dimension greater than two the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points formed with
    pairs of corresponding values from `x` and `y`.

See Also
--------
lagval, laggrid2d, lagval3d, laggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## laggrid2d
```python
from laguerre import laggrid2d
```

Evaluate a 2-D Laguerre series on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_j(b)

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape + y.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j is contained in `c[i,j]`. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional Chebyshev series at points in the
    Cartesian product of `x` and `y`.

See Also
--------
lagval, lagval2d, lagval3d, laggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## lagval3d
```python
from laguerre import lagval3d
```

Evaluate a 3-D Laguerre series at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * L_i(x) * L_j(y) * L_k(z)

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
lagval, lagval2d, laggrid2d, laggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## laggrid3d
```python
from laguerre import laggrid3d
```

Evaluate a 3-D Laguerre series on the Cartesian product of x, y, and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * L_i(a) * L_j(b) * L_k(c)

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
lagval, lagval2d, laggrid2d, lagval3d

Notes
-----

.. versionadded:: 1.7.0

---
## lagvander
```python
from laguerre import lagvander
```

Pseudo-Vandermonde matrix of given degree.

Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
`x`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., i] = L_i(x)

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the degree of the Laguerre polynomial.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
array ``V = lagvander(x, n)``, then ``np.dot(V, c)`` and
``lagval(x, c)`` are the same up to roundoff. This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of Laguerre series of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray
    The pseudo-Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where The last index is the degree of the
    corresponding Laguerre polynomial.  The dtype will be the same as
    the converted `x`.

Examples
--------
>>> from numpy.polynomial.laguerre import lagvander
>>> x = np.array([0, 1, 2])
>>> lagvander(x, 3)
array([[ 1.        ,  1.        ,  1.        ,  1.        ],
       [ 1.        ,  0.        , -0.5       , -0.66666667],
       [ 1.        , -1.        , -1.        , -0.33333333]])

---
## lagvander2d
```python
from laguerre import lagvander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = L_i(x) * L_j(y),

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the degrees of
the Laguerre polynomials.

If ``V = lagvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``lagval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D Laguerre
series of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
lagvander, lagvander3d, lagval2d, lagval3d

Notes
-----

.. versionadded:: 1.7.0

---
## lagvander3d
```python
from laguerre import lagvander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = L_i(x)*L_j(y)*L_k(z),

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the degrees of the Laguerre polynomials.

If ``V = lagvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and  ``np.dot(V, c.flat)`` and ``lagval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D Laguerre
series of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
lagvander, lagvander3d, lagval2d, lagval3d

Notes
-----

.. versionadded:: 1.7.0

---
## lagfit
```python
from laguerre import lagfit
```

Least squares fit of Laguerre series to data.

Return the coefficients of a Laguerre series of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x),

where ``n`` is `deg`.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,) or (M, K)
    y-coordinates of the sample points. Several data sets of sample
    points sharing the same x-coordinates can be fitted at once by
    passing in a 2D-array that contains one dataset per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller than
    this relative to the largest singular value will be ignored. The
    default value is len(x)*eps, where eps is the relative precision of
    the float type, about 2e-16 in most cases.
full : bool, optional
    Switch determining nature of return value. When it is False (the
    default) just the coefficients are returned, when True diagnostic
    information from the singular value decomposition is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

Returns
-------
coef : ndarray, shape (M,) or (M, K)
    Laguerre coefficients ordered from low to high. If `y` was 2-D,
    the coefficients for the data in column *k*  of `y` are in column
    *k*.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Warns
-----
RankWarning
    The rank of the coefficient matrix in the least-squares fit is
    deficient. The warning is only raised if ``full == False``.  The
    warnings can be turned off by

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.polynomial.polyfit
numpy.polynomial.legendre.legfit
numpy.polynomial.chebyshev.chebfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.hermite_e.hermefit
lagval : Evaluates a Laguerre series.
lagvander : pseudo Vandermonde matrix of Laguerre series.
lagweight : Laguerre weight function.
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the Laguerre series ``p`` that
minimizes the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where the :math:`w_j` are the weights. This problem is solved by
setting up as the (typically) overdetermined matrix equation

.. math:: V(x) * c = w * y,

where ``V`` is the weighted pseudo Vandermonde matrix of `x`, ``c`` are the
coefficients to be solved for, `w` are the weights, and `y` are the
observed values.  This equation is then solved using the singular value
decomposition of ``V``.

If some of the singular values of `V` are so small that they are
neglected, then a `RankWarning` will be issued. This means that the
coefficient values may be poorly determined. Using a lower order fit
will usually get rid of the warning.  The `rcond` parameter can also be
set to a value smaller than its default, but the resulting fit may be
spurious and have large contributions from roundoff error.

Fits using Laguerre series are probably most useful when the data can
be approximated by ``sqrt(w(x)) * p(x)``, where ``w(x)`` is the Laguerre
weight. In that case the weight ``sqrt(w(x[i]))`` should be used
together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
available as `lagweight`.

References
----------
.. [1] Wikipedia, "Curve fitting",
       https://en.wikipedia.org/wiki/Curve_fitting

Examples
--------
>>> from numpy.polynomial.laguerre import lagfit, lagval
>>> x = np.linspace(0, 10)
>>> err = np.random.randn(len(x))/10
>>> y = lagval(x, [1, 2, 3]) + err
>>> lagfit(x, y, 2)
array([ 0.96971004,  2.00193749,  3.00288744]) # may vary

---
## lagcompanion
```python
from laguerre import lagcompanion
```

Return the companion matrix of c.

The usual companion matrix of the Laguerre polynomials is already
symmetric when `c` is a basis Laguerre polynomial, so no scaling is
applied.

Parameters
----------
c : array_like
    1-D array of Laguerre series coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## lagroots
```python
from laguerre import lagroots
```

Compute the roots of a Laguerre series.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * L_i(x).

Parameters
----------
c : 1-D array_like
    1-D array of coefficients.

Returns
-------
out : ndarray
    Array of the roots of the series. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.polynomial.polyroots
numpy.polynomial.legendre.legroots
numpy.polynomial.chebyshev.chebroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the series for such
values. Roots with multiplicity greater than 1 will also show larger
errors as the value of the series near such points is relatively
insensitive to errors in the roots. Isolated roots near the origin can
be improved by a few iterations of Newton's method.

The Laguerre series basis polynomials aren't powers of `x` so the
results of this function may seem unintuitive.

Examples
--------
>>> from numpy.polynomial.laguerre import lagroots, lagfromroots
>>> coef = lagfromroots([0, 1, 2])
>>> coef
array([  2.,  -8.,  12.,  -6.])
>>> lagroots(coef)
array([-4.4408921e-16,  1.0000000e+00,  2.0000000e+00])

---
## laggauss
```python
from laguerre import laggauss
```

Gauss-Laguerre quadrature.

Computes the sample points and weights for Gauss-Laguerre quadrature.
These sample points and weights will correctly integrate polynomials of
degree :math:`2*deg - 1` or less over the interval :math:`[0, \inf]`
with the weight function :math:`f(x) = \exp(-x)`.

Parameters
----------
deg : int
    Number of sample points and weights. It must be >= 1.

Returns
-------
x : ndarray
    1-D ndarray containing the sample points.
y : ndarray
    1-D ndarray containing the weights.

Notes
-----

.. versionadded:: 1.7.0

The results have only been tested up to degree 100 higher degrees may
be problematic. The weights are determined by using the fact that

.. math:: w_k = c / (L'_n(x_k) * L_{n-1}(x_k))

where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
is the k'th root of :math:`L_n`, and then scaling the results to get
the right value when integrating 1.

---
## lagweight
```python
from laguerre import lagweight
```

Weight function of the Laguerre polynomials.

The weight function is :math:`exp(-x)` and the interval of integration
is :math:`[0, \inf]`. The Laguerre polynomials are orthogonal, but not
normalized, with respect to this weight function.

Parameters
----------
x : array_like
   Values at which the weight function will be computed.

Returns
-------
w : ndarray
   The weight function at `x`.

Notes
-----

.. versionadded:: 1.7.0

---
## Laguerre
```python
from laguerre import Laguerre
```

A Laguerre series class.

The Laguerre class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
attributes and methods listed in the `ABCPolyBase` documentation.

Parameters
----------
coef : array_like
    Laguerre coefficients in order of increasing degree, i.e,
    ``(1, 2, 3)`` gives ``1*L_0(x) + 2*L_1(X) + 3*L_2(x)``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [0, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [0, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## __name__
```python
from _polybase import __name__
```

Abstract base class for the various polynomial Classes.

The ABCPolyBase class provides the methods needed to implement the common API
for the various polynomial classes. It operates as a mixin, but uses the
abc module from the stdlib, hence it is only available for Python >= 2.6.

---
## ABCPolyBase
```python
from _polybase import ABCPolyBase
```

An abstract base class for immutable series classes.

ABCPolyBase provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' along with the
methods listed below.

.. versionadded:: 1.9.0

Parameters
----------
coef : array_like
    Series coefficients in order of increasing degree, i.e.,
    ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``, where
    ``P_i`` is the basis polynomials of degree ``i``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is the derived class domain.
window : (2,) array_like, optional
    Window, see domain for its use. The default value is the
    derived class window.
symbol : str, optional
    Symbol used to represent the independent variable in string 
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

Attributes
----------
coef : (N,) ndarray
    Series coefficients in order of increasing degree.
domain : (2,) ndarray
    Domain that is mapped to window.
window : (2,) ndarray
    Window that domain is mapped to.
symbol : str
    Symbol representing the independent variable.

Class Attributes
----------------
maxpower : int
    Maximum power allowed, i.e., the largest number ``n`` such that
    ``p(x)**n`` is allowed. This is to limit runaway polynomial size.
domain : (2,) ndarray
    Default domain of the class.
window : (2,) ndarray
    Default window of the class.

---
## symbol
```python
from _polybase import symbol
```



---
## domain
```python
from _polybase import domain
```



---
## window
```python
from _polybase import window
```



---
## basis_name
```python
from _polybase import basis_name
```



---
## _add
```python
from _polybase import _add
```



---
## _sub
```python
from _polybase import _sub
```



---
## _mul
```python
from _polybase import _mul
```



---
## _div
```python
from _polybase import _div
```



---
## _pow
```python
from _polybase import _pow
```



---
## _val
```python
from _polybase import _val
```



---
## _int
```python
from _polybase import _int
```



---
## _der
```python
from _polybase import _der
```



---
## _fit
```python
from _polybase import _fit
```



---
## _line
```python
from _polybase import _line
```



---
## _roots
```python
from _polybase import _roots
```



---
## _fromroots
```python
from _polybase import _fromroots
```



---
## has_samecoef
```python
from _polybase import has_samecoef
```

Check if coefficients match.

.. versionadded:: 1.6.0

Parameters
----------
other : class instance
    The other class must have the ``coef`` attribute.

Returns
-------
bool : boolean
    True if the coefficients are the same, False otherwise.

---
## has_samedomain
```python
from _polybase import has_samedomain
```

Check if domains match.

.. versionadded:: 1.6.0

Parameters
----------
other : class instance
    The other class must have the ``domain`` attribute.

Returns
-------
bool : boolean
    True if the domains are the same, False otherwise.

---
## has_samewindow
```python
from _polybase import has_samewindow
```

Check if windows match.

.. versionadded:: 1.6.0

Parameters
----------
other : class instance
    The other class must have the ``window`` attribute.

Returns
-------
bool : boolean
    True if the windows are the same, False otherwise.

---
## has_sametype
```python
from _polybase import has_sametype
```

Check if types match.

.. versionadded:: 1.7.0

Parameters
----------
other : object
    Class instance.

Returns
-------
bool : boolean
    True if other is same class as self

---
## _get_coefficients
```python
from _polybase import _get_coefficients
```

Interpret other as polynomial coefficients.

The `other` argument is checked to see if it is of the same
class as self with identical domain and window. If so,
return its coefficients, otherwise return `other`.

.. versionadded:: 1.9.0

Parameters
----------
other : anything
    Object to be checked.

Returns
-------
coef
    The coefficients of`other` if it is a compatible instance,
    of ABCPolyBase, otherwise `other`.

Raises
------
TypeError
    When `other` is an incompatible instance of ABCPolyBase.

---
## __init__
```python
from _polybase import __init__
```



---
## __repr__
```python
from _polybase import __repr__
```



---
## __format__
```python
from _polybase import __format__
```



---
## __str__
```python
from _polybase import __str__
```



---
## _generate_string
```python
from _polybase import _generate_string
```

Generate the full string representation of the polynomial, using
``term_method`` to generate each polynomial term.

---
## _str_term_unicode
```python
from _polybase import _str_term_unicode
```

String representation of single polynomial term using unicode
characters for superscripts and subscripts.

---
## _str_term_ascii
```python
from _polybase import _str_term_ascii
```

String representation of a single polynomial term using ** and _ to
represent superscripts and subscripts, respectively.

---
## _repr_latex_term
```python
from _polybase import _repr_latex_term
```



---
## _repr_latex_scalar
```python
from _polybase import _repr_latex_scalar
```



---
## _repr_latex_
```python
from _polybase import _repr_latex_
```



---
## __getstate__
```python
from _polybase import __getstate__
```



---
## __setstate__
```python
from _polybase import __setstate__
```



---
## __call__
```python
from _polybase import __call__
```



---
## __iter__
```python
from _polybase import __iter__
```



---
## __len__
```python
from _polybase import __len__
```



---
## __neg__
```python
from _polybase import __neg__
```



---
## __pos__
```python
from _polybase import __pos__
```



---
## __add__
```python
from _polybase import __add__
```



---
## __sub__
```python
from _polybase import __sub__
```



---
## __mul__
```python
from _polybase import __mul__
```



---
## __truediv__
```python
from _polybase import __truediv__
```



---
## __floordiv__
```python
from _polybase import __floordiv__
```



---
## __mod__
```python
from _polybase import __mod__
```



---
## __divmod__
```python
from _polybase import __divmod__
```



---
## __pow__
```python
from _polybase import __pow__
```



---
## __radd__
```python
from _polybase import __radd__
```



---
## __rsub__
```python
from _polybase import __rsub__
```



---
## __rmul__
```python
from _polybase import __rmul__
```



---
## __rdiv__
```python
from _polybase import __rdiv__
```



---
## __rtruediv__
```python
from _polybase import __rtruediv__
```



---
## __rfloordiv__
```python
from _polybase import __rfloordiv__
```



---
## __rmod__
```python
from _polybase import __rmod__
```



---
## __rdivmod__
```python
from _polybase import __rdivmod__
```



---
## __eq__
```python
from _polybase import __eq__
```



---
## __ne__
```python
from _polybase import __ne__
```



---
## copy
```python
from _polybase import copy
```

Return a copy.

Returns
-------
new_series : series
    Copy of self.

---
## degree
```python
from _polybase import degree
```

The degree of the series.

.. versionadded:: 1.5.0

Returns
-------
degree : int
    Degree of the series, one less than the number of coefficients.

Examples
--------

Create a polynomial object for ``1 + 7*x + 4*x**2``:

>>> poly = np.polynomial.Polynomial([1, 7, 4])
>>> print(poly)
1.0 + 7.0·x + 4.0·x²
>>> poly.degree()
2

Note that this method does not check for non-zero coefficients.
You must trim the polynomial to remove any trailing zeroes:

>>> poly = np.polynomial.Polynomial([1, 7, 0])
>>> print(poly)
1.0 + 7.0·x + 0.0·x²
>>> poly.degree()
2
>>> poly.trim().degree()
1

---
## cutdeg
```python
from _polybase import cutdeg
```

Truncate series to the given degree.

Reduce the degree of the series to `deg` by discarding the
high order terms. If `deg` is greater than the current degree a
copy of the current series is returned. This can be useful in least
squares where the coefficients of the high degree terms may be very
small.

.. versionadded:: 1.5.0

Parameters
----------
deg : non-negative int
    The series is reduced to degree `deg` by discarding the high
    order terms. The value of `deg` must be a non-negative integer.

Returns
-------
new_series : series
    New instance of series with reduced degree.

---
## trim
```python
from _polybase import trim
```

Remove trailing coefficients

Remove trailing coefficients until a coefficient is reached whose
absolute value greater than `tol` or the beginning of the series is
reached. If all the coefficients would be removed the series is set
to ``[0]``. A new series instance is returned with the new
coefficients.  The current instance remains unchanged.

Parameters
----------
tol : non-negative number.
    All trailing coefficients less than `tol` will be removed.

Returns
-------
new_series : series
    New instance of series with trimmed coefficients.

---
## truncate
```python
from _polybase import truncate
```

Truncate series to length `size`.

Reduce the series to length `size` by discarding the high
degree terms. The value of `size` must be a positive integer. This
can be useful in least squares where the coefficients of the
high degree terms may be very small.

Parameters
----------
size : positive int
    The series is reduced to length `size` by discarding the high
    degree terms. The value of `size` must be a positive integer.

Returns
-------
new_series : series
    New instance of series with truncated coefficients.

---
## convert
```python
from _polybase import convert
```

Convert series to a different kind and/or domain and/or window.

Parameters
----------
domain : array_like, optional
    The domain of the converted series. If the value is None,
    the default domain of `kind` is used.
kind : class, optional
    The polynomial series type class to which the current instance
    should be converted. If kind is None, then the class of the
    current instance is used.
window : array_like, optional
    The window of the converted series. If the value is None,
    the default window of `kind` is used.

Returns
-------
new_series : series
    The returned class can be of different type than the current
    instance and/or have a different domain and/or different
    window.

Notes
-----
Conversion between domains and class types can result in
numerically ill defined series.

---
## mapparms
```python
from _polybase import mapparms
```

Return the mapping parameters.

The returned values define a linear map ``off + scl*x`` that is
applied to the input arguments before the series is evaluated. The
map depends on the ``domain`` and ``window``; if the current
``domain`` is equal to the ``window`` the resulting map is the
identity.  If the coefficients of the series instance are to be
used by themselves outside this class, then the linear function
must be substituted for the ``x`` in the standard representation of
the base polynomials.

Returns
-------
off, scl : float or complex
    The mapping function is defined by ``off + scl*x``.

Notes
-----
If the current domain is the interval ``[l1, r1]`` and the window
is ``[l2, r2]``, then the linear mapping function ``L`` is
defined by the equations::

    L(l1) = l2
    L(r1) = r2

---
## integ
```python
from _polybase import integ
```

Integrate.

Return a series instance that is the definite integral of the
current series.

Parameters
----------
m : non-negative int
    The number of integrations to perform.
k : array_like
    Integration constants. The first constant is applied to the
    first integration, the second to the second, and so on. The
    list of values must less than or equal to `m` in length and any
    missing values are set to zero.
lbnd : Scalar
    The lower bound of the definite integral.

Returns
-------
new_series : series
    A new series representing the integral. The domain is the same
    as the domain of the integrated series.

---
## deriv
```python
from _polybase import deriv
```

Differentiate.

Return a series instance of that is the derivative of the current
series.

Parameters
----------
m : non-negative int
    Find the derivative of order `m`.

Returns
-------
new_series : series
    A new series representing the derivative. The domain is the same
    as the domain of the differentiated series.

---
## roots
```python
from _polybase import roots
```

Return the roots of the series polynomial.

Compute the roots for the series. Note that the accuracy of the
roots decreases the further outside the `domain` they lie.

Returns
-------
roots : ndarray
    Array containing the roots of the series.

---
## linspace
```python
from _polybase import linspace
```

Return x, y values at equally spaced points in domain.

Returns the x, y values at `n` linearly spaced points across the
domain.  Here y is the value of the polynomial at the points x. By
default the domain is the same as that of the series instance.
This method is intended mostly as a plotting aid.

.. versionadded:: 1.5.0

Parameters
----------
n : int, optional
    Number of point pairs to return. The default value is 100.
domain : {None, array_like}, optional
    If not None, the specified domain is used instead of that of
    the calling instance. It should be of the form ``[beg,end]``.
    The default is None which case the class domain is used.

Returns
-------
x, y : ndarray
    x is equal to linspace(self.domain[0], self.domain[1], n) and
    y is the series evaluated at element of x.

---
## fit
```python
from _polybase import fit
```

Least squares fit to data.

Return a series instance that is the least squares fit to the data
`y` sampled at `x`. The domain of the returned instance can be
specified and this will often result in a superior fit with less
chance of ill conditioning.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,)
    y-coordinates of the M sample points ``(x[i], y[i])``.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
domain : {None, [beg, end], []}, optional
    Domain to use for the returned series. If ``None``,
    then a minimal domain that covers the points `x` is chosen.  If
    ``[]`` the class domain is used. The default value was the
    class domain in NumPy 1.4 and ``None`` in later versions.
    The ``[]`` option was added in numpy 1.5.0.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller
    than this relative to the largest singular value will be
    ignored. The default value is len(x)*eps, where eps is the
    relative precision of the float type, about 2e-16 in most
    cases.
full : bool, optional
    Switch determining nature of return value. When it is False
    (the default) just the coefficients are returned, when True
    diagnostic information from the singular value decomposition is
    also returned.
w : array_like, shape (M,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have
    the same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

    .. versionadded:: 1.5.0
window : {[beg, end]}, optional
    Window to use for the returned series. The default
    value is the default class domain

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol representing the independent variable. Default is 'x'.

Returns
-------
new_series : series
    A series that represents the least squares fit to the data and
    has the domain and window specified in the call. If the
    coefficients for the unscaled and unshifted basis polynomials are
    of interest, do ``new_series.convert().coef``.

[resid, rank, sv, rcond] : list
    These values are only returned if ``full == True``

    - resid -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - sv -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `linalg.lstsq`.

---
## fromroots
```python
from _polybase import fromroots
```

Return series instance that has the specified roots.

Returns a series representing the product
``(x - r[0])*(x - r[1])*...*(x - r[n-1])``, where ``r`` is a
list of roots.

Parameters
----------
roots : array_like
    List of roots.
domain : {[], None, array_like}, optional
    Domain for the resulting series. If None the domain is the
    interval from the smallest root to the largest. If [] the
    domain is the class domain. The default is [].
window : {None, array_like}, optional
    Window for the returned series. If None the class window is
    used. The default is None.
symbol : str, optional
    Symbol representing the independent variable. Default is 'x'.

Returns
-------
new_series : series
    Series with the specified roots.

---
## identity
```python
from _polybase import identity
```

Identity function.

If ``p`` is the returned series, then ``p(x) == x`` for all
values of x.

Parameters
----------
domain : {None, array_like}, optional
    If given, the array must be of the form ``[beg, end]``, where
    ``beg`` and ``end`` are the endpoints of the domain. If None is
    given then the class domain is used. The default is None.
window : {None, array_like}, optional
    If given, the resulting array must be if the form
    ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
    the window. If None is given then the class window is used. The
    default is None.
symbol : str, optional
    Symbol representing the independent variable. Default is 'x'.

Returns
-------
new_series : series
     Series of representing the identity.

---
## basis
```python
from _polybase import basis
```

Series basis polynomial of degree `deg`.

Returns the series representing the basis polynomial of degree `deg`.

.. versionadded:: 1.7.0

Parameters
----------
deg : int
    Degree of the basis polynomial for the series. Must be >= 0.
domain : {None, array_like}, optional
    If given, the array must be of the form ``[beg, end]``, where
    ``beg`` and ``end`` are the endpoints of the domain. If None is
    given then the class domain is used. The default is None.
window : {None, array_like}, optional
    If given, the resulting array must be if the form
    ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
    the window. If None is given then the class window is used. The
    default is None.
symbol : str, optional
    Symbol representing the independent variable. Default is 'x'.

Returns
-------
new_series : series
    A series with the coefficient of the `deg` term set to one and
    all others zero.

---
## cast
```python
from _polybase import cast
```

Convert series to series of this class.

The `series` is expected to be an instance of some polynomial
series of one of the types supported by by the numpy.polynomial
module, but could be some other class that supports the convert
method.

.. versionadded:: 1.7.0

Parameters
----------
series : series
    The series instance to be converted.
domain : {None, array_like}, optional
    If given, the array must be of the form ``[beg, end]``, where
    ``beg`` and ``end`` are the endpoints of the domain. If None is
    given then the class domain is used. The default is None.
window : {None, array_like}, optional
    If given, the resulting array must be if the form
    ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
    the window. If None is given then the class window is used. The
    default is None.

Returns
-------
new_series : series
    A series of the same kind as the calling class and equal to
    `series` when evaluated.

See Also
--------
convert : similar instance method

---
## __name__
```python
from polyutils import __name__
```

Utility classes and functions for the polynomial modules.

This module provides: error and warning objects; a polynomial base class;
and some routines used in both the `polynomial` and `chebyshev` modules.

Warning objects
---------------

.. autosummary::
   :toctree: generated/

   RankWarning  raised in least-squares fit for rank-deficient matrix.

Functions
---------

.. autosummary::
   :toctree: generated/

   as_series    convert list of array_likes into 1-D arrays of common type.
   trimseq      remove trailing zeros.
   trimcoef     remove small trailing coefficients.
   getdomain    return the domain appropriate for a given set of abscissae.
   mapdomain    maps points between domains.
   mapparms     parameters of the linear map between domains.

---
## RankWarning
```python
from polyutils import RankWarning
```

Issued by chebfit when the design matrix is rank deficient.

---
## trimseq
```python
from polyutils import trimseq
```

Remove small Poly series coefficients.

Parameters
----------
seq : sequence
    Sequence of Poly series coefficients. This routine fails for
    empty sequences.

Returns
-------
series : sequence
    Subsequence with trailing zeros removed. If the resulting sequence
    would be empty, return the first element. The returned sequence may
    or may not be a view.

Notes
-----
Do not lose the type info if the sequence contains unknown objects.

---
## as_series
```python
from polyutils import as_series
```

Return argument as a list of 1-d arrays.

The returned list contains array(s) of dtype double, complex double, or
object.  A 1-d argument of shape ``(N,)`` is parsed into ``N`` arrays of
size one; a 2-d argument of shape ``(M,N)`` is parsed into ``M`` arrays
of size ``N`` (i.e., is "parsed by row"); and a higher dimensional array
raises a Value Error if it is not first reshaped into either a 1-d or 2-d
array.

Parameters
----------
alist : array_like
    A 1- or 2-d array_like
trim : boolean, optional
    When True, trailing zeros are removed from the inputs.
    When False, the inputs are passed through intact.

Returns
-------
[a1, a2,...] : list of 1-D arrays
    A copy of the input data as a list of 1-d arrays.

Raises
------
ValueError
    Raised when `as_series` cannot convert its input to 1-d arrays, or at
    least one of the resulting arrays is empty.

Examples
--------
>>> from numpy.polynomial import polyutils as pu
>>> a = np.arange(4)
>>> pu.as_series(a)
[array([0.]), array([1.]), array([2.]), array([3.])]
>>> b = np.arange(6).reshape((2,3))
>>> pu.as_series(b)
[array([0., 1., 2.]), array([3., 4., 5.])]

>>> pu.as_series((1, np.arange(3), np.arange(2, dtype=np.float16)))
[array([1.]), array([0., 1., 2.]), array([0., 1.])]

>>> pu.as_series([2, [1.1, 0.]])
[array([2.]), array([1.1])]

>>> pu.as_series([2, [1.1, 0.]], trim=False)
[array([2.]), array([1.1, 0. ])]

---
## trimcoef
```python
from polyutils import trimcoef
```

Remove "small" "trailing" coefficients from a polynomial.

"Small" means "small in absolute value" and is controlled by the
parameter `tol`; "trailing" means highest order coefficient(s), e.g., in
``[0, 1, 1, 0, 0]`` (which represents ``0 + x + x**2 + 0*x**3 + 0*x**4``)
both the 3-rd and 4-th order coefficients would be "trimmed."

Parameters
----------
c : array_like
    1-d array of coefficients, ordered from lowest order to highest.
tol : number, optional
    Trailing (i.e., highest order) elements with absolute value less
    than or equal to `tol` (default value is zero) are removed.

Returns
-------
trimmed : ndarray
    1-d array with trailing zeros removed.  If the resulting series
    would be empty, a series containing a single zero is returned.

Raises
------
ValueError
    If `tol` < 0

See Also
--------
trimseq

Examples
--------
>>> from numpy.polynomial import polyutils as pu
>>> pu.trimcoef((0,0,3,0,5,0,0))
array([0.,  0.,  3.,  0.,  5.])
>>> pu.trimcoef((0,0,1e-3,0,1e-5,0,0),1e-3) # item == tol is trimmed
array([0.])
>>> i = complex(0,1) # works for complex
>>> pu.trimcoef((3e-4,1e-3*(1-i),5e-4,2e-5*(1+i)), 1e-3)
array([0.0003+0.j   , 0.001 -0.001j])

---
## getdomain
```python
from polyutils import getdomain
```

Return a domain suitable for given abscissae.

Find a domain suitable for a polynomial or Chebyshev series
defined at the values supplied.

Parameters
----------
x : array_like
    1-d array of abscissae whose domain will be determined.

Returns
-------
domain : ndarray
    1-d array containing two values.  If the inputs are complex, then
    the two returned points are the lower left and upper right corners
    of the smallest rectangle (aligned with the axes) in the complex
    plane containing the points `x`. If the inputs are real, then the
    two points are the ends of the smallest interval containing the
    points `x`.

See Also
--------
mapparms, mapdomain

Examples
--------
>>> from numpy.polynomial import polyutils as pu
>>> points = np.arange(4)**2 - 5; points
array([-5, -4, -1,  4])
>>> pu.getdomain(points)
array([-5.,  4.])
>>> c = np.exp(complex(0,1)*np.pi*np.arange(12)/6) # unit circle
>>> pu.getdomain(c)
array([-1.-1.j,  1.+1.j])

---
## mapparms
```python
from polyutils import mapparms
```

Linear map parameters between domains.

Return the parameters of the linear map ``offset + scale*x`` that maps
`old` to `new` such that ``old[i] -> new[i]``, ``i = 0, 1``.

Parameters
----------
old, new : array_like
    Domains. Each domain must (successfully) convert to a 1-d array
    containing precisely two values.

Returns
-------
offset, scale : scalars
    The map ``L(x) = offset + scale*x`` maps the first domain to the
    second.

See Also
--------
getdomain, mapdomain

Notes
-----
Also works for complex numbers, and thus can be used to calculate the
parameters required to map any line in the complex plane to any other
line therein.

Examples
--------
>>> from numpy.polynomial import polyutils as pu
>>> pu.mapparms((-1,1),(-1,1))
(0.0, 1.0)
>>> pu.mapparms((1,-1),(-1,1))
(-0.0, -1.0)
>>> i = complex(0,1)
>>> pu.mapparms((-i,-1),(1,i))
((1+1j), (1-0j))

---
## mapdomain
```python
from polyutils import mapdomain
```

Apply linear map to input points.

The linear map ``offset + scale*x`` that maps the domain `old` to
the domain `new` is applied to the points `x`.

Parameters
----------
x : array_like
    Points to be mapped. If `x` is a subtype of ndarray the subtype
    will be preserved.
old, new : array_like
    The two domains that determine the map.  Each must (successfully)
    convert to 1-d arrays containing precisely two values.

Returns
-------
x_out : ndarray
    Array of points of the same shape as `x`, after application of the
    linear map between the two domains.

See Also
--------
getdomain, mapparms

Notes
-----
Effectively, this implements:

.. math::
    x\_out = new[0] + m(x - old[0])

where

.. math::
    m = \frac{new[1]-new[0]}{old[1]-old[0]}

Examples
--------
>>> from numpy.polynomial import polyutils as pu
>>> old_domain = (-1,1)
>>> new_domain = (0,2*np.pi)
>>> x = np.linspace(-1,1,6); x
array([-1. , -0.6, -0.2,  0.2,  0.6,  1. ])
>>> x_out = pu.mapdomain(x, old_domain, new_domain); x_out
array([ 0.        ,  1.25663706,  2.51327412,  3.76991118,  5.02654825, # may vary
        6.28318531])
>>> x - pu.mapdomain(x_out, new_domain, old_domain)
array([0., 0., 0., 0., 0., 0.])

Also works for complex numbers (and thus can be used to map any line in
the complex plane to any other line therein).

>>> i = complex(0,1)
>>> old = (-1 - i, 1 + i)
>>> new = (-1 + i, 1 - i)
>>> z = np.linspace(old[0], old[1], 6); z
array([-1. -1.j , -0.6-0.6j, -0.2-0.2j,  0.2+0.2j,  0.6+0.6j,  1. +1.j ])
>>> new_z = pu.mapdomain(z, old, new); new_z
array([-1.0+1.j , -0.6+0.6j, -0.2+0.2j,  0.2-0.2j,  0.6-0.6j,  1.0-1.j ]) # may vary

---
## _nth_slice
```python
from polyutils import _nth_slice
```



---
## _vander_nd
```python
from polyutils import _vander_nd
```

A generalization of the Vandermonde matrix for N dimensions

The result is built by combining the results of 1d Vandermonde matrices,

.. math::
    W[i_0, \ldots, i_M, j_0, \ldots, j_N] = \prod_{k=0}^N{V_k(x_k)[i_0, \ldots, i_M, j_k]}

where

.. math::
    N &= \texttt{len(points)} = \texttt{len(degrees)} = \texttt{len(vander\_fs)} \\
    M &= \texttt{points[k].ndim} \\
    V_k &= \texttt{vander\_fs[k]} \\
    x_k &= \texttt{points[k]} \\
    0 \le j_k &\le \texttt{degrees[k]}

Expanding the one-dimensional :math:`V_k` functions gives:

.. math::
    W[i_0, \ldots, i_M, j_0, \ldots, j_N] = \prod_{k=0}^N{B_{k, j_k}(x_k[i_0, \ldots, i_M])}

where :math:`B_{k,m}` is the m'th basis of the polynomial construction used along
dimension :math:`k`. For a regular polynomial, :math:`B_{k, m}(x) = P_m(x) = x^m`.

Parameters
----------
vander_fs : Sequence[function(array_like, int) -> ndarray]
    The 1d vander function to use for each axis, such as ``polyvander``
points : Sequence[array_like]
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
    This must be the same length as `vander_fs`.
degrees : Sequence[int]
    The maximum degree (inclusive) to use for each axis.
    This must be the same length as `vander_fs`.

Returns
-------
vander_nd : ndarray
    An array of shape ``points[0].shape + tuple(d + 1 for d in degrees)``.

---
## _vander_nd_flat
```python
from polyutils import _vander_nd_flat
```

Like `_vander_nd`, but flattens the last ``len(degrees)`` axes into a single axis

Used to implement the public ``<type>vander<n>d`` functions.

---
## _fromroots
```python
from polyutils import _fromroots
```

Helper function used to implement the ``<type>fromroots`` functions.

Parameters
----------
line_f : function(float, float) -> ndarray
    The ``<type>line`` function, such as ``polyline``
mul_f : function(array_like, array_like) -> ndarray
    The ``<type>mul`` function, such as ``polymul``
roots
    See the ``<type>fromroots`` functions for more detail

---
## _valnd
```python
from polyutils import _valnd
```

Helper function used to implement the ``<type>val<n>d`` functions.

Parameters
----------
val_f : function(array_like, array_like, tensor: bool) -> array_like
    The ``<type>val`` function, such as ``polyval``
c, args
    See the ``<type>val<n>d`` functions for more detail

---
## _gridnd
```python
from polyutils import _gridnd
```

Helper function used to implement the ``<type>grid<n>d`` functions.

Parameters
----------
val_f : function(array_like, array_like, tensor: bool) -> array_like
    The ``<type>val`` function, such as ``polyval``
c, args
    See the ``<type>grid<n>d`` functions for more detail

---
## _div
```python
from polyutils import _div
```

Helper function used to implement the ``<type>div`` functions.

Implementation uses repeated subtraction of c2 multiplied by the nth basis.
For some polynomial types, a more efficient approach may be possible.

Parameters
----------
mul_f : function(array_like, array_like) -> array_like
    The ``<type>mul`` function, such as ``polymul``
c1, c2
    See the ``<type>div`` functions for more detail

---
## _add
```python
from polyutils import _add
```

Helper function used to implement the ``<type>add`` functions. 

---
## _sub
```python
from polyutils import _sub
```

Helper function used to implement the ``<type>sub`` functions. 

---
## _fit
```python
from polyutils import _fit
```

Helper function used to implement the ``<type>fit`` functions.

Parameters
----------
vander_f : function(array_like, int) -> ndarray
    The 1d vander function, such as ``polyvander``
c1, c2
    See the ``<type>fit`` functions for more detail

---
## _pow
```python
from polyutils import _pow
```

Helper function used to implement the ``<type>pow`` functions.

Parameters
----------
mul_f : function(array_like, array_like) -> ndarray
    The ``<type>mul`` function, such as ``polymul``
c : array_like
    1-D array of array of series coefficients
pow, maxpower
    See the ``<type>pow`` functions for more detail

---
## _deprecate_as_int
```python
from polyutils import _deprecate_as_int
```

Like `operator.index`, but emits a deprecation warning when passed a float

Parameters
----------
x : int-like, or float with integral value
    Value to interpret as an integer
desc : str
    description to include in any error message

Raises
------
TypeError : if x is a non-integral float or non-numeric
DeprecationWarning : if x is an integral float

---
## format_float
```python
from polyutils import format_float
```



---
## set_default_printstyle
```python
from __init__ import set_default_printstyle
```

Set the default format for the string representation of polynomials.

Values for ``style`` must be valid inputs to ``__format__``, i.e. 'ascii'
or 'unicode'.

Parameters
----------
style : str
    Format string for default printing style. Must be either 'ascii' or
    'unicode'.

Notes
-----
The default format depends on the platform: 'unicode' is used on
Unix-based systems and 'ascii' on Windows. This determination is based on
default font support for the unicode superscript and subscript ranges.

Examples
--------
>>> p = np.polynomial.Polynomial([1, 2, 3])
>>> c = np.polynomial.Chebyshev([1, 2, 3])
>>> np.polynomial.set_default_printstyle('unicode')
>>> print(p)
1.0 + 2.0·x + 3.0·x²
>>> print(c)
1.0 + 2.0·T₁(x) + 3.0·T₂(x)
>>> np.polynomial.set_default_printstyle('ascii')
>>> print(p)
1.0 + 2.0 x + 3.0 x**2
>>> print(c)
1.0 + 2.0 T_1(x) + 3.0 T_2(x)
>>> # Formatting supersedes all class/package-level defaults
>>> print(f"{p:unicode}")
1.0 + 2.0·x + 3.0·x²

---
## __name__
```python
from hermite_e import __name__
```

===================================================================
HermiteE Series, "Probabilists" (:mod:`numpy.polynomial.hermite_e`)
===================================================================

This module provides a number of objects (mostly functions) useful for
dealing with Hermite_e series, including a `HermiteE` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with such polynomials is in the
docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------
.. autosummary::
   :toctree: generated/

   HermiteE

Constants
---------
.. autosummary::
   :toctree: generated/

   hermedomain
   hermezero
   hermeone
   hermex

Arithmetic
----------
.. autosummary::
   :toctree: generated/

   hermeadd
   hermesub
   hermemulx
   hermemul
   hermediv
   hermepow
   hermeval
   hermeval2d
   hermeval3d
   hermegrid2d
   hermegrid3d

Calculus
--------
.. autosummary::
   :toctree: generated/

   hermeder
   hermeint

Misc Functions
--------------
.. autosummary::
   :toctree: generated/

   hermefromroots
   hermeroots
   hermevander
   hermevander2d
   hermevander3d
   hermegauss
   hermeweight
   hermecompanion
   hermefit
   hermetrim
   hermeline
   herme2poly
   poly2herme

See also
--------
`numpy.polynomial`

---
## poly2herme
```python
from hermite_e import poly2herme
```

poly2herme(pol)

Convert a polynomial to a Hermite series.

Convert an array representing the coefficients of a polynomial (relative
to the "standard" basis) ordered from lowest degree to highest, to an
array of the coefficients of the equivalent Hermite series, ordered
from lowest to highest degree.

Parameters
----------
pol : array_like
    1-D array containing the polynomial coefficients

Returns
-------
c : ndarray
    1-D array containing the coefficients of the equivalent Hermite
    series.

See Also
--------
herme2poly

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.hermite_e import poly2herme
>>> poly2herme(np.arange(4))
array([  2.,  10.,   2.,   3.])

---
## herme2poly
```python
from hermite_e import herme2poly
```

Convert a Hermite series to a polynomial.

Convert an array representing the coefficients of a Hermite series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.

Parameters
----------
c : array_like
    1-D array containing the Hermite series coefficients, ordered
    from lowest order term to highest.

Returns
-------
pol : ndarray
    1-D array containing the coefficients of the equivalent polynomial
    (relative to the "standard" basis) ordered from lowest order term
    to highest.

See Also
--------
poly2herme

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.hermite_e import herme2poly
>>> herme2poly([  2.,  10.,   2.,   3.])
array([0.,  1.,  2.,  3.])

---
## hermeline
```python
from hermite_e import hermeline
```

Hermite series whose graph is a straight line.

Parameters
----------
off, scl : scalars
    The specified line is given by ``off + scl*x``.

Returns
-------
y : ndarray
    This module's representation of the Hermite series for
    ``off + scl*x``.

See Also
--------
numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite.hermline

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeline
>>> from numpy.polynomial.hermite_e import hermeline, hermeval
>>> hermeval(0,hermeline(3, 2))
3.0
>>> hermeval(1,hermeline(3, 2))
5.0

---
## hermefromroots
```python
from hermite_e import hermefromroots
```

Generate a HermiteE series with given roots.

The function returns the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

in HermiteE form, where the `r_n` are the roots specified in `roots`.
If a zero has multiplicity n, then it must appear in `roots` n times.
For instance, if 2 is a root of multiplicity three and 3 is a root of
multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
roots can appear in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * He_1(x) + ... +  c_n * He_n(x)

The coefficient of the last term is not generally 1 for monic
polynomials in HermiteE form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of coefficients.  If all roots are real then `out` is a
    real array, if some of the roots are complex, then `out` is complex
    even if all the coefficients in the result are real (see Examples
    below).

See Also
--------
numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.laguerre.lagfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.chebyshev.chebfromroots

Examples
--------
>>> from numpy.polynomial.hermite_e import hermefromroots, hermeval
>>> coef = hermefromroots((-1, 0, 1))
>>> hermeval((-1, 0, 1), coef)
array([0., 0., 0.])
>>> coef = hermefromroots((-1j, 1j))
>>> hermeval((-1j, 1j), coef)
array([0.+0.j, 0.+0.j])

---
## hermeadd
```python
from hermite_e import hermeadd
```

Add one Hermite series to another.

Returns the sum of two Hermite series `c1` + `c2`.  The arguments
are sequences of coefficients ordered from lowest order term to
highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the Hermite series of their sum.

See Also
--------
hermesub, hermemulx, hermemul, hermediv, hermepow

Notes
-----
Unlike multiplication, division, etc., the sum of two Hermite series
is a Hermite series (without having to "reproject" the result onto
the basis set) so addition, just like that of "standard" polynomials,
is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeadd
>>> hermeadd([1, 2, 3], [1, 2, 3, 4])
array([2.,  4.,  6.,  4.])

---
## hermesub
```python
from hermite_e import hermesub
```

Subtract one Hermite series from another.

Returns the difference of two Hermite series `c1` - `c2`.  The
sequences of coefficients are from lowest order term to highest, i.e.,
[1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Hermite series coefficients representing their difference.

See Also
--------
hermeadd, hermemulx, hermemul, hermediv, hermepow

Notes
-----
Unlike multiplication, division, etc., the difference of two Hermite
series is a Hermite series (without having to "reproject" the result
onto the basis set) so subtraction, just like that of "standard"
polynomials, is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.hermite_e import hermesub
>>> hermesub([1, 2, 3, 4], [1, 2, 3])
array([0., 0., 0., 4.])

---
## hermemulx
```python
from hermite_e import hermemulx
```

Multiply a Hermite series by x.

Multiply the Hermite series `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

Notes
-----
The multiplication uses the recursion relationship for Hermite
polynomials in the form

.. math::

    xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x)))

Examples
--------
>>> from numpy.polynomial.hermite_e import hermemulx
>>> hermemulx([1, 2, 3])
array([2.,  7.,  2.,  3.])

---
## hermemul
```python
from hermite_e import hermemul
```

Multiply one Hermite series by another.

Returns the product of two Hermite series `c1` * `c2`.  The arguments
are sequences of coefficients, from lowest order "term" to highest,
e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Hermite series coefficients representing their product.

See Also
--------
hermeadd, hermesub, hermemulx, hermediv, hermepow

Notes
-----
In general, the (polynomial) product of two C-series results in terms
that are not in the Hermite polynomial basis set.  Thus, to express
the product as a Hermite series, it is necessary to "reproject" the
product onto said basis set, which may produce "unintuitive" (but
correct) results; see Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermemul
>>> hermemul([1, 2, 3], [0, 1, 2])
array([14.,  15.,  28.,   7.,   6.])

---
## hermediv
```python
from hermite_e import hermediv
```

Divide one Hermite series by another.

Returns the quotient-with-remainder of two Hermite series
`c1` / `c2`.  The arguments are sequences of coefficients from lowest
order "term" to highest, e.g., [1,2,3] represents the series
``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
[quo, rem] : ndarrays
    Of Hermite series coefficients representing the quotient and
    remainder.

See Also
--------
hermeadd, hermesub, hermemulx, hermemul, hermepow

Notes
-----
In general, the (polynomial) division of one Hermite series by another
results in quotient and remainder terms that are not in the Hermite
polynomial basis set.  Thus, to express these results as a Hermite
series, it is necessary to "reproject" the results onto the Hermite
basis set, which may produce "unintuitive" (but correct) results; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermediv
>>> hermediv([ 14.,  15.,  28.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([0.]))
>>> hermediv([ 15.,  17.,  28.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([1., 2.]))

---
## hermepow
```python
from hermite_e import hermepow
```

Raise a Hermite series to a power.

Returns the Hermite series `c` raised to the power `pow`. The
argument `c` is a sequence of coefficients ordered from low to high.
i.e., [1,2,3] is the series  ``P_0 + 2*P_1 + 3*P_2.``

Parameters
----------
c : array_like
    1-D array of Hermite series coefficients ordered from low to
    high.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Hermite series of power.

See Also
--------
hermeadd, hermesub, hermemulx, hermemul, hermediv

Examples
--------
>>> from numpy.polynomial.hermite_e import hermepow
>>> hermepow([1, 2, 3], 2)
array([23.,  28.,  46.,  12.,   9.])

---
## hermeder
```python
from hermite_e import hermeder
```

Differentiate a Hermite_e series.

Returns the series coefficients `c` differentiated `m` times along
`axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable). The argument
`c` is an array of coefficients from low to high degree along each
axis, e.g., [1,2,3] represents the series ``1*He_0 + 2*He_1 + 3*He_2``
while [[1,2],[1,2]] represents ``1*He_0(x)*He_0(y) + 1*He_1(x)*He_0(y)
+ 2*He_0(x)*He_1(y) + 2*He_1(x)*He_1(y)`` if axis=0 is ``x`` and axis=1
is ``y``.

Parameters
----------
c : array_like
    Array of Hermite_e series coefficients. If `c` is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change of
    variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Hermite series of the derivative.

See Also
--------
hermeint

Notes
-----
In general, the result of differentiating a Hermite series does not
resemble the same operation on a power series. Thus the result of this
function may be "unintuitive," albeit correct; see Examples section
below.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeder
>>> hermeder([ 1.,  1.,  1.,  1.])
array([1.,  2.,  3.])
>>> hermeder([-0.25,  1.,  1./2.,  1./3.,  1./4 ], m=2)
array([1.,  2.,  3.])

---
## hermeint
```python
from hermite_e import hermeint
```

Integrate a Hermite_e series.

Returns the Hermite_e series coefficients `c` integrated `m` times from
`lbnd` along `axis`. At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument `c` is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]]
represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.

Parameters
----------
c : array_like
    Array of Hermite_e series coefficients. If c is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at
    ``lbnd`` is the first value in the list, the value of the second
    integral at ``lbnd`` is the second value, etc.  If ``k == []`` (the
    default), all constants are set to zero.  If ``m == 1``, a single
    scalar can be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    Hermite_e series coefficients of the integral.

Raises
------
ValueError
    If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
hermeder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.
Why is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`.  Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a` - perhaps not what one would have first thought.

Also note that, in general, the result of integrating a C-series needs
to be "reprojected" onto the C-series basis set.  Thus, typically,
the result of this function is "unintuitive," albeit correct; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeint
>>> hermeint([1, 2, 3]) # integrate once, value 0 at 0.
array([1., 1., 1., 1.])
>>> hermeint([1, 2, 3], m=2) # integrate twice, value & deriv 0 at 0
array([-0.25      ,  1.        ,  0.5       ,  0.33333333,  0.25      ]) # may vary
>>> hermeint([1, 2, 3], k=1) # integrate once, value 1 at 0.
array([2., 1., 1., 1.])
>>> hermeint([1, 2, 3], lbnd=-1) # integrate once, value 0 at -1
array([-1.,  1.,  1.,  1.])
>>> hermeint([1, 2, 3], m=2, k=[1, 2], lbnd=-1)
array([ 1.83333333,  0.        ,  0.5       ,  0.33333333,  0.25      ]) # may vary

---
## hermeval
```python
from hermite_e import hermeval
```

Evaluate an HermiteE series at points x.

If `c` is of length `n + 1`, this function returns the value:

.. math:: p(x) = c_0 * He_0(x) + c_1 * He_1(x) + ... + c_n * He_n(x)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    with themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, algebra_like
    The shape of the return value is described above.

See Also
--------
hermeval2d, hermegrid2d, hermeval3d, hermegrid3d

Notes
-----
The evaluation uses Clenshaw recursion, aka synthetic division.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeval
>>> coef = [1,2,3]
>>> hermeval(1, coef)
3.0
>>> hermeval([[1,2],[3,4]], coef)
array([[ 3., 14.],
       [31., 54.]])

---
## hermeval2d
```python
from hermite_e import hermeval2d
```

Evaluate a 2-D HermiteE series at points (x, y).

This function returns the values:

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * He_i(x) * He_j(y)

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` is a 1-D array a one is implicitly appended to its shape to make
it 2-D. The shape of the result will be c.shape[2:] + x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and if it isn't an ndarray it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in ``c[i,j]``. If `c` has
    dimension greater than two the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points formed with
    pairs of corresponding values from `x` and `y`.

See Also
--------
hermeval, hermegrid2d, hermeval3d, hermegrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermegrid2d
```python
from hermite_e import hermegrid2d
```

Evaluate a 2-D HermiteE series on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_j(b)

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
hermeval, hermeval2d, hermeval3d, hermegrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermeval3d
```python
from hermite_e import hermeval3d
```

Evaluate a 3-D Hermite_e series at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * He_i(x) * He_j(y) * He_k(z)

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
hermeval, hermeval2d, hermegrid2d, hermegrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermegrid3d
```python
from hermite_e import hermegrid3d
```

Evaluate a 3-D HermiteE series on the Cartesian product of x, y, and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * He_i(a) * He_j(b) * He_k(c)

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
hermeval, hermeval2d, hermegrid2d, hermeval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermevander
```python
from hermite_e import hermevander
```

Pseudo-Vandermonde matrix of given degree.

Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
`x`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., i] = He_i(x),

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the degree of the HermiteE polynomial.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
array ``V = hermevander(x, n)``, then ``np.dot(V, c)`` and
``hermeval(x, c)`` are the same up to roundoff. This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of HermiteE series of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray
    The pseudo-Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where The last index is the degree of the
    corresponding HermiteE polynomial.  The dtype will be the same as
    the converted `x`.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermevander
>>> x = np.array([-1, 0, 1])
>>> hermevander(x, 3)
array([[ 1., -1.,  0.,  2.],
       [ 1.,  0., -1., -0.],
       [ 1.,  1.,  0., -2.]])

---
## hermevander2d
```python
from hermite_e import hermevander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = He_i(x) * He_j(y),

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the degrees of
the HermiteE polynomials.

If ``V = hermevander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``hermeval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D HermiteE
series of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
hermevander, hermevander3d, hermeval2d, hermeval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermevander3d
```python
from hermite_e import hermevander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then Hehe pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = He_i(x)*He_j(y)*He_k(z),

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the degrees of the HermiteE polynomials.

If ``V = hermevander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and  ``np.dot(V, c.flat)`` and ``hermeval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D HermiteE
series of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
hermevander, hermevander3d, hermeval2d, hermeval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermefit
```python
from hermite_e import hermefit
```

Least squares fit of Hermite series to data.

Return the coefficients of a HermiteE series of degree `deg` that is
the least squares fit to the data values `y` given at points `x`. If
`y` is 1-D the returned coefficients will also be 1-D. If `y` is 2-D
multiple fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * He_1(x) + ... + c_n * He_n(x),

where `n` is `deg`.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,) or (M, K)
    y-coordinates of the sample points. Several data sets of sample
    points sharing the same x-coordinates can be fitted at once by
    passing in a 2D-array that contains one dataset per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller than
    this relative to the largest singular value will be ignored. The
    default value is len(x)*eps, where eps is the relative precision of
    the float type, about 2e-16 in most cases.
full : bool, optional
    Switch determining nature of return value. When it is False (the
    default) just the coefficients are returned, when True diagnostic
    information from the singular value decomposition is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

Returns
-------
coef : ndarray, shape (M,) or (M, K)
    Hermite coefficients ordered from low to high. If `y` was 2-D,
    the coefficients for the data in column k  of `y` are in column
    `k`.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Warns
-----
RankWarning
    The rank of the coefficient matrix in the least-squares fit is
    deficient. The warning is only raised if ``full = False``.  The
    warnings can be turned off by

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.chebyshev.chebfit
numpy.polynomial.legendre.legfit
numpy.polynomial.polynomial.polyfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.laguerre.lagfit
hermeval : Evaluates a Hermite series.
hermevander : pseudo Vandermonde matrix of Hermite series.
hermeweight : HermiteE weight function.
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the HermiteE series `p` that
minimizes the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where the :math:`w_j` are the weights. This problem is solved by
setting up the (typically) overdetermined matrix equation

.. math:: V(x) * c = w * y,

where `V` is the pseudo Vandermonde matrix of `x`, the elements of `c`
are the coefficients to be solved for, and the elements of `y` are the
observed values.  This equation is then solved using the singular value
decomposition of `V`.

If some of the singular values of `V` are so small that they are
neglected, then a `RankWarning` will be issued. This means that the
coefficient values may be poorly determined. Using a lower order fit
will usually get rid of the warning.  The `rcond` parameter can also be
set to a value smaller than its default, but the resulting fit may be
spurious and have large contributions from roundoff error.

Fits using HermiteE series are probably most useful when the data can
be approximated by ``sqrt(w(x)) * p(x)``, where `w(x)` is the HermiteE
weight. In that case the weight ``sqrt(w(x[i]))`` should be used
together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
available as `hermeweight`.

References
----------
.. [1] Wikipedia, "Curve fitting",
       https://en.wikipedia.org/wiki/Curve_fitting

Examples
--------
>>> from numpy.polynomial.hermite_e import hermefit, hermeval
>>> x = np.linspace(-10, 10)
>>> np.random.seed(123)
>>> err = np.random.randn(len(x))/10
>>> y = hermeval(x, [1, 2, 3]) + err
>>> hermefit(x, y, 2)
array([ 1.01690445,  1.99951418,  2.99948696]) # may vary

---
## hermecompanion
```python
from hermite_e import hermecompanion
```

Return the scaled companion matrix of c.

The basis polynomials are scaled so that the companion matrix is
symmetric when `c` is an HermiteE basis polynomial. This provides
better eigenvalue estimates than the unscaled case and for basis
polynomials the eigenvalues are guaranteed to be real if
`numpy.linalg.eigvalsh` is used to obtain them.

Parameters
----------
c : array_like
    1-D array of HermiteE series coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Scaled companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## hermeroots
```python
from hermite_e import hermeroots
```

Compute the roots of a HermiteE series.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * He_i(x).

Parameters
----------
c : 1-D array_like
    1-D array of coefficients.

Returns
-------
out : ndarray
    Array of the roots of the series. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.polynomial.polyroots
numpy.polynomial.legendre.legroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.chebyshev.chebroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the series for such
values. Roots with multiplicity greater than 1 will also show larger
errors as the value of the series near such points is relatively
insensitive to errors in the roots. Isolated roots near the origin can
be improved by a few iterations of Newton's method.

The HermiteE series basis polynomials aren't powers of `x` so the
results of this function may seem unintuitive.

Examples
--------
>>> from numpy.polynomial.hermite_e import hermeroots, hermefromroots
>>> coef = hermefromroots([-1, 0, 1])
>>> coef
array([0., 2., 0., 1.])
>>> hermeroots(coef)
array([-1.,  0.,  1.]) # may vary

---
## _normed_hermite_e_n
```python
from hermite_e import _normed_hermite_e_n
```

Evaluate a normalized HermiteE polynomial.

Compute the value of the normalized HermiteE polynomial of degree ``n``
at the points ``x``.


Parameters
----------
x : ndarray of double.
    Points at which to evaluate the function
n : int
    Degree of the normalized HermiteE function to be evaluated.

Returns
-------
values : ndarray
    The shape of the return value is described above.

Notes
-----
.. versionadded:: 1.10.0

This function is needed for finding the Gauss points and integration
weights for high degrees. The values of the standard HermiteE functions
overflow when n >= 207.

---
## hermegauss
```python
from hermite_e import hermegauss
```

Gauss-HermiteE quadrature.

Computes the sample points and weights for Gauss-HermiteE quadrature.
These sample points and weights will correctly integrate polynomials of
degree :math:`2*deg - 1` or less over the interval :math:`[-\inf, \inf]`
with the weight function :math:`f(x) = \exp(-x^2/2)`.

Parameters
----------
deg : int
    Number of sample points and weights. It must be >= 1.

Returns
-------
x : ndarray
    1-D ndarray containing the sample points.
y : ndarray
    1-D ndarray containing the weights.

Notes
-----

.. versionadded:: 1.7.0

The results have only been tested up to degree 100, higher degrees may
be problematic. The weights are determined by using the fact that

.. math:: w_k = c / (He'_n(x_k) * He_{n-1}(x_k))

where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
is the k'th root of :math:`He_n`, and then scaling the results to get
the right value when integrating 1.

---
## hermeweight
```python
from hermite_e import hermeweight
```

Weight function of the Hermite_e polynomials.

The weight function is :math:`\exp(-x^2/2)` and the interval of
integration is :math:`[-\inf, \inf]`. the HermiteE polynomials are
orthogonal, but not normalized, with respect to this weight function.

Parameters
----------
x : array_like
   Values at which the weight function will be computed.

Returns
-------
w : ndarray
   The weight function at `x`.

Notes
-----

.. versionadded:: 1.7.0

---
## HermiteE
```python
from hermite_e import HermiteE
```

An HermiteE series class.

The HermiteE class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
attributes and methods listed in the `ABCPolyBase` documentation.

Parameters
----------
coef : array_like
    HermiteE coefficients in order of increasing degree, i.e,
    ``(1, 2, 3)`` gives ``1*He_0(x) + 2*He_1(X) + 3*He_2(x)``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [-1, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [-1, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## __name__
```python
from chebyshev import __name__
```

====================================================
Chebyshev Series (:mod:`numpy.polynomial.chebyshev`)
====================================================

This module provides a number of objects (mostly functions) useful for
dealing with Chebyshev series, including a `Chebyshev` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with such polynomials is in the
docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------

.. autosummary::
   :toctree: generated/

   Chebyshev


Constants
---------

.. autosummary::
   :toctree: generated/

   chebdomain
   chebzero
   chebone
   chebx

Arithmetic
----------

.. autosummary::
   :toctree: generated/

   chebadd
   chebsub
   chebmulx
   chebmul
   chebdiv
   chebpow
   chebval
   chebval2d
   chebval3d
   chebgrid2d
   chebgrid3d

Calculus
--------

.. autosummary::
   :toctree: generated/

   chebder
   chebint

Misc Functions
--------------

.. autosummary::
   :toctree: generated/

   chebfromroots
   chebroots
   chebvander
   chebvander2d
   chebvander3d
   chebgauss
   chebweight
   chebcompanion
   chebfit
   chebpts1
   chebpts2
   chebtrim
   chebline
   cheb2poly
   poly2cheb
   chebinterpolate

See also
--------
`numpy.polynomial`

Notes
-----
The implementations of multiplication, division, integration, and
differentiation use the algebraic identities [1]_:

.. math::
    T_n(x) = \frac{z^n + z^{-n}}{2} \\
    z\frac{dx}{dz} = \frac{z - z^{-1}}{2}.

where

.. math:: x = \frac{z + z^{-1}}{2}.

These identities allow a Chebyshev series to be expressed as a finite,
symmetric Laurent series.  In this module, this sort of Laurent series
is referred to as a "z-series."

References
----------
.. [1] A. T. Benjamin, et al., "Combinatorial Trigonometry with Chebyshev
  Polynomials," *Journal of Statistical Planning and Inference 14*, 2008
  (https://web.archive.org/web/20080221202153/https://www.math.hmc.edu/~benjamin/papers/CombTrig.pdf, pg. 4)

---
## _cseries_to_zseries
```python
from chebyshev import _cseries_to_zseries
```

Convert Chebyshev series to z-series.

Convert a Chebyshev series to the equivalent z-series. The result is
never an empty array. The dtype of the return is the same as that of
the input. No checks are run on the arguments as this routine is for
internal use.

Parameters
----------
c : 1-D ndarray
    Chebyshev coefficients, ordered from low to high

Returns
-------
zs : 1-D ndarray
    Odd length symmetric z-series, ordered from  low to high.

---
## _zseries_to_cseries
```python
from chebyshev import _zseries_to_cseries
```

Convert z-series to a Chebyshev series.

Convert a z series to the equivalent Chebyshev series. The result is
never an empty array. The dtype of the return is the same as that of
the input. No checks are run on the arguments as this routine is for
internal use.

Parameters
----------
zs : 1-D ndarray
    Odd length symmetric z-series, ordered from  low to high.

Returns
-------
c : 1-D ndarray
    Chebyshev coefficients, ordered from  low to high.

---
## _zseries_mul
```python
from chebyshev import _zseries_mul
```

Multiply two z-series.

Multiply two z-series to produce a z-series.

Parameters
----------
z1, z2 : 1-D ndarray
    The arrays must be 1-D but this is not checked.

Returns
-------
product : 1-D ndarray
    The product z-series.

Notes
-----
This is simply convolution. If symmetric/anti-symmetric z-series are
denoted by S/A then the following rules apply:

S*S, A*A -> S
S*A, A*S -> A

---
## _zseries_div
```python
from chebyshev import _zseries_div
```

Divide the first z-series by the second.

Divide `z1` by `z2` and return the quotient and remainder as z-series.
Warning: this implementation only applies when both z1 and z2 have the
same symmetry, which is sufficient for present purposes.

Parameters
----------
z1, z2 : 1-D ndarray
    The arrays must be 1-D and have the same symmetry, but this is not
    checked.

Returns
-------

(quotient, remainder) : 1-D ndarrays
    Quotient and remainder as z-series.

Notes
-----
This is not the same as polynomial division on account of the desired form
of the remainder. If symmetric/anti-symmetric z-series are denoted by S/A
then the following rules apply:

S/S -> S,S
A/A -> S,A

The restriction to types of the same symmetry could be fixed but seems like
unneeded generality. There is no natural form for the remainder in the case
where there is no symmetry.

---
## _zseries_der
```python
from chebyshev import _zseries_der
```

Differentiate a z-series.

The derivative is with respect to x, not z. This is achieved using the
chain rule and the value of dx/dz given in the module notes.

Parameters
----------
zs : z-series
    The z-series to differentiate.

Returns
-------
derivative : z-series
    The derivative

Notes
-----
The zseries for x (ns) has been multiplied by two in order to avoid
using floats that are incompatible with Decimal and likely other
specialized scalar types. This scaling has been compensated by
multiplying the value of zs by two also so that the two cancels in the
division.

---
## _zseries_int
```python
from chebyshev import _zseries_int
```

Integrate a z-series.

The integral is with respect to x, not z. This is achieved by a change
of variable using dx/dz given in the module notes.

Parameters
----------
zs : z-series
    The z-series to integrate

Returns
-------
integral : z-series
    The indefinite integral

Notes
-----
The zseries for x (ns) has been multiplied by two in order to avoid
using floats that are incompatible with Decimal and likely other
specialized scalar types. This scaling has been compensated by
dividing the resulting zs by two.

---
## poly2cheb
```python
from chebyshev import poly2cheb
```

Convert a polynomial to a Chebyshev series.

Convert an array representing the coefficients of a polynomial (relative
to the "standard" basis) ordered from lowest degree to highest, to an
array of the coefficients of the equivalent Chebyshev series, ordered
from lowest to highest degree.

Parameters
----------
pol : array_like
    1-D array containing the polynomial coefficients

Returns
-------
c : ndarray
    1-D array containing the coefficients of the equivalent Chebyshev
    series.

See Also
--------
cheb2poly

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy import polynomial as P
>>> p = P.Polynomial(range(4))
>>> p
Polynomial([0., 1., 2., 3.], domain=[-1,  1], window=[-1,  1])
>>> c = p.convert(kind=P.Chebyshev)
>>> c
Chebyshev([1.  , 3.25, 1.  , 0.75], domain=[-1.,  1.], window=[-1.,  1.])
>>> P.chebyshev.poly2cheb(range(4))
array([1.  , 3.25, 1.  , 0.75])

---
## cheb2poly
```python
from chebyshev import cheb2poly
```

Convert a Chebyshev series to a polynomial.

Convert an array representing the coefficients of a Chebyshev series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.

Parameters
----------
c : array_like
    1-D array containing the Chebyshev series coefficients, ordered
    from lowest order term to highest.

Returns
-------
pol : ndarray
    1-D array containing the coefficients of the equivalent polynomial
    (relative to the "standard" basis) ordered from lowest order term
    to highest.

See Also
--------
poly2cheb

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy import polynomial as P
>>> c = P.Chebyshev(range(4))
>>> c
Chebyshev([0., 1., 2., 3.], domain=[-1,  1], window=[-1,  1])
>>> p = c.convert(kind=P.Polynomial)
>>> p
Polynomial([-2., -8.,  4., 12.], domain=[-1.,  1.], window=[-1.,  1.])
>>> P.chebyshev.cheb2poly(range(4))
array([-2.,  -8.,   4.,  12.])

---
## chebline
```python
from chebyshev import chebline
```

Chebyshev series whose graph is a straight line.

Parameters
----------
off, scl : scalars
    The specified line is given by ``off + scl*x``.

Returns
-------
y : ndarray
    This module's representation of the Chebyshev series for
    ``off + scl*x``.

See Also
--------
numpy.polynomial.polynomial.polyline
numpy.polynomial.legendre.legline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline

Examples
--------
>>> import numpy.polynomial.chebyshev as C
>>> C.chebline(3,2)
array([3, 2])
>>> C.chebval(-3, C.chebline(3,2)) # should be -3
-3.0

---
## chebfromroots
```python
from chebyshev import chebfromroots
```

Generate a Chebyshev series with given roots.

The function returns the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

in Chebyshev form, where the `r_n` are the roots specified in `roots`.
If a zero has multiplicity n, then it must appear in `roots` n times.
For instance, if 2 is a root of multiplicity three and 3 is a root of
multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
roots can appear in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * T_1(x) + ... +  c_n * T_n(x)

The coefficient of the last term is not generally 1 for monic
polynomials in Chebyshev form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of coefficients.  If all roots are real then `out` is a
    real array, if some of the roots are complex, then `out` is complex
    even if all the coefficients in the result are real (see Examples
    below).

See Also
--------
numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.laguerre.lagfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.hermite_e.hermefromroots

Examples
--------
>>> import numpy.polynomial.chebyshev as C
>>> C.chebfromroots((-1,0,1)) # x^3 - x relative to the standard basis
array([ 0.  , -0.25,  0.  ,  0.25])
>>> j = complex(0,1)
>>> C.chebfromroots((-j,j)) # x^2 + 1 relative to the standard basis
array([1.5+0.j, 0. +0.j, 0.5+0.j])

---
## chebadd
```python
from chebyshev import chebadd
```

Add one Chebyshev series to another.

Returns the sum of two Chebyshev series `c1` + `c2`.  The arguments
are sequences of coefficients ordered from lowest order term to
highest, i.e., [1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Chebyshev series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the Chebyshev series of their sum.

See Also
--------
chebsub, chebmulx, chebmul, chebdiv, chebpow

Notes
-----
Unlike multiplication, division, etc., the sum of two Chebyshev series
is a Chebyshev series (without having to "reproject" the result onto
the basis set) so addition, just like that of "standard" polynomials,
is simply "component-wise."

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> C.chebadd(c1,c2)
array([4., 4., 4.])

---
## chebsub
```python
from chebyshev import chebsub
```

Subtract one Chebyshev series from another.

Returns the difference of two Chebyshev series `c1` - `c2`.  The
sequences of coefficients are from lowest order term to highest, i.e.,
[1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Chebyshev series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Chebyshev series coefficients representing their difference.

See Also
--------
chebadd, chebmulx, chebmul, chebdiv, chebpow

Notes
-----
Unlike multiplication, division, etc., the difference of two Chebyshev
series is a Chebyshev series (without having to "reproject" the result
onto the basis set) so subtraction, just like that of "standard"
polynomials, is simply "component-wise."

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> C.chebsub(c1,c2)
array([-2.,  0.,  2.])
>>> C.chebsub(c2,c1) # -C.chebsub(c1,c2)
array([ 2.,  0., -2.])

---
## chebmulx
```python
from chebyshev import chebmulx
```

Multiply a Chebyshev series by x.

Multiply the polynomial `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of Chebyshev series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

Notes
-----

.. versionadded:: 1.5.0

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> C.chebmulx([1,2,3])
array([1. , 2.5, 1. , 1.5])

---
## chebmul
```python
from chebyshev import chebmul
```

Multiply one Chebyshev series by another.

Returns the product of two Chebyshev series `c1` * `c2`.  The arguments
are sequences of coefficients, from lowest order "term" to highest,
e.g., [1,2,3] represents the series ``T_0 + 2*T_1 + 3*T_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Chebyshev series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Chebyshev series coefficients representing their product.

See Also
--------
chebadd, chebsub, chebmulx, chebdiv, chebpow

Notes
-----
In general, the (polynomial) product of two C-series results in terms
that are not in the Chebyshev polynomial basis set.  Thus, to express
the product as a C-series, it is typically necessary to "reproject"
the product onto said basis set, which typically produces
"unintuitive live" (but correct) results; see Examples section below.

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> C.chebmul(c1,c2) # multiplication requires "reprojection"
array([  6.5,  12. ,  12. ,   4. ,   1.5])

---
## chebdiv
```python
from chebyshev import chebdiv
```

Divide one Chebyshev series by another.

Returns the quotient-with-remainder of two Chebyshev series
`c1` / `c2`.  The arguments are sequences of coefficients from lowest
order "term" to highest, e.g., [1,2,3] represents the series
``T_0 + 2*T_1 + 3*T_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Chebyshev series coefficients ordered from low to
    high.

Returns
-------
[quo, rem] : ndarrays
    Of Chebyshev series coefficients representing the quotient and
    remainder.

See Also
--------
chebadd, chebsub, chebmulx, chebmul, chebpow

Notes
-----
In general, the (polynomial) division of one C-series by another
results in quotient and remainder terms that are not in the Chebyshev
polynomial basis set.  Thus, to express these results as C-series, it
is typically necessary to "reproject" the results onto said basis
set, which typically produces "unintuitive" (but correct) results;
see Examples section below.

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> C.chebdiv(c1,c2) # quotient "intuitive," remainder not
(array([3.]), array([-8., -4.]))
>>> c2 = (0,1,2,3)
>>> C.chebdiv(c2,c1) # neither "intuitive"
(array([0., 2.]), array([-2., -4.]))

---
## chebpow
```python
from chebyshev import chebpow
```

Raise a Chebyshev series to a power.

Returns the Chebyshev series `c` raised to the power `pow`. The
argument `c` is a sequence of coefficients ordered from low to high.
i.e., [1,2,3] is the series  ``T_0 + 2*T_1 + 3*T_2.``

Parameters
----------
c : array_like
    1-D array of Chebyshev series coefficients ordered from low to
    high.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Chebyshev series of power.

See Also
--------
chebadd, chebsub, chebmulx, chebmul, chebdiv

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> C.chebpow([1, 2, 3, 4], 2)
array([15.5, 22. , 16. , ..., 12.5, 12. ,  8. ])

---
## chebder
```python
from chebyshev import chebder
```

Differentiate a Chebyshev series.

Returns the Chebyshev series coefficients `c` differentiated `m` times
along `axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable). The argument
`c` is an array of coefficients from low to high degree along each
axis, e.g., [1,2,3] represents the series ``1*T_0 + 2*T_1 + 3*T_2``
while [[1,2],[1,2]] represents ``1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) +
2*T_0(x)*T_1(y) + 2*T_1(x)*T_1(y)`` if axis=0 is ``x`` and axis=1 is
``y``.

Parameters
----------
c : array_like
    Array of Chebyshev series coefficients. If c is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change of
    variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Chebyshev series of the derivative.

See Also
--------
chebint

Notes
-----
In general, the result of differentiating a C-series needs to be
"reprojected" onto the C-series basis set. Thus, typically, the
result of this function is "unintuitive," albeit correct; see Examples
section below.

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c = (1,2,3,4)
>>> C.chebder(c)
array([14., 12., 24.])
>>> C.chebder(c,3)
array([96.])
>>> C.chebder(c,scl=-1)
array([-14., -12., -24.])
>>> C.chebder(c,2,-1)
array([12.,  96.])

---
## chebint
```python
from chebyshev import chebint
```

Integrate a Chebyshev series.

Returns the Chebyshev series coefficients `c` integrated `m` times from
`lbnd` along `axis`. At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument `c` is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series ``T_0 + 2*T_1 + 3*T_2`` while [[1,2],[1,2]]
represents ``1*T_0(x)*T_0(y) + 1*T_1(x)*T_0(y) + 2*T_0(x)*T_1(y) +
2*T_1(x)*T_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.

Parameters
----------
c : array_like
    Array of Chebyshev series coefficients. If c is multidimensional
    the different axis correspond to different variables with the
    degree in each axis given by the corresponding index.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at zero
    is the first value in the list, the value of the second integral
    at zero is the second value, etc.  If ``k == []`` (the default),
    all constants are set to zero.  If ``m == 1``, a single scalar can
    be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    C-series coefficients of the integral.

Raises
------
ValueError
    If ``m < 1``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
chebder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.
Why is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`.  Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a`- perhaps not what one would have first thought.

Also note that, in general, the result of integrating a C-series needs
to be "reprojected" onto the C-series basis set.  Thus, typically,
the result of this function is "unintuitive," albeit correct; see
Examples section below.

Examples
--------
>>> from numpy.polynomial import chebyshev as C
>>> c = (1,2,3)
>>> C.chebint(c)
array([ 0.5, -0.5,  0.5,  0.5])
>>> C.chebint(c,3)
array([ 0.03125   , -0.1875    ,  0.04166667, -0.05208333,  0.01041667, # may vary
    0.00625   ])
>>> C.chebint(c, k=3)
array([ 3.5, -0.5,  0.5,  0.5])
>>> C.chebint(c,lbnd=-2)
array([ 8.5, -0.5,  0.5,  0.5])
>>> C.chebint(c,scl=-2)
array([-1.,  1., -1., -1.])

---
## chebval
```python
from chebyshev import chebval
```

Evaluate a Chebyshev series at points x.

If `c` is of length `n + 1`, this function returns the value:

.. math:: p(x) = c_0 * T_0(x) + c_1 * T_1(x) + ... + c_n * T_n(x)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, algebra_like
    The shape of the return value is described above.

See Also
--------
chebval2d, chebgrid2d, chebval3d, chebgrid3d

Notes
-----
The evaluation uses Clenshaw recursion, aka synthetic division.

---
## chebval2d
```python
from chebyshev import chebval2d
```

Evaluate a 2-D Chebyshev series at points (x, y).

This function returns the values:

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * T_i(x) * T_j(y)

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` is a 1-D array a one is implicitly appended to its shape to make
it 2-D. The shape of the result will be c.shape[2:] + x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and if it isn't an ndarray it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in ``c[i,j]``. If `c` has
    dimension greater than 2 the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional Chebyshev series at points formed
    from pairs of corresponding values from `x` and `y`.

See Also
--------
chebval, chebgrid2d, chebval3d, chebgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebgrid2d
```python
from chebyshev import chebgrid2d
```

Evaluate a 2-D Chebyshev series on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * T_i(a) * T_j(b),

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape + y.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j is contained in `c[i,j]`. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional Chebyshev series at points in the
    Cartesian product of `x` and `y`.

See Also
--------
chebval, chebval2d, chebval3d, chebgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebval3d
```python
from chebyshev import chebval3d
```

Evaluate a 3-D Chebyshev series at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * T_i(x) * T_j(y) * T_k(z)

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
chebval, chebval2d, chebgrid2d, chebgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebgrid3d
```python
from chebyshev import chebgrid3d
```

Evaluate a 3-D Chebyshev series on the Cartesian product of x, y, and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * T_i(a) * T_j(b) * T_k(c)

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
chebval, chebval2d, chebgrid2d, chebval3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebvander
```python
from chebyshev import chebvander
```

Pseudo-Vandermonde matrix of given degree.

Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
`x`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., i] = T_i(x),

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the degree of the Chebyshev polynomial.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
matrix ``V = chebvander(x, n)``, then ``np.dot(V, c)`` and
``chebval(x, c)`` are the same up to roundoff.  This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of Chebyshev series of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray
    The pseudo Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where The last index is the degree of the
    corresponding Chebyshev polynomial.  The dtype will be the same as
    the converted `x`.

---
## chebvander2d
```python
from chebyshev import chebvander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = T_i(x) * T_j(y),

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the degrees of
the Chebyshev polynomials.

If ``V = chebvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``chebval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D Chebyshev
series of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
chebvander, chebvander3d, chebval2d, chebval3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebvander3d
```python
from chebyshev import chebvander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = T_i(x)*T_j(y)*T_k(z),

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the degrees of the Chebyshev polynomials.

If ``V = chebvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and ``np.dot(V, c.flat)`` and ``chebval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D Chebyshev
series of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
chebvander, chebvander3d, chebval2d, chebval3d

Notes
-----

.. versionadded:: 1.7.0

---
## chebfit
```python
from chebyshev import chebfit
```

Least squares fit of Chebyshev series to data.

Return the coefficients of a Chebyshev series of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * T_1(x) + ... + c_n * T_n(x),

where `n` is `deg`.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,) or (M, K)
    y-coordinates of the sample points. Several data sets of sample
    points sharing the same x-coordinates can be fitted at once by
    passing in a 2D-array that contains one dataset per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer,
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller than
    this relative to the largest singular value will be ignored. The
    default value is len(x)*eps, where eps is the relative precision of
    the float type, about 2e-16 in most cases.
full : bool, optional
    Switch determining nature of return value. When it is False (the
    default) just the coefficients are returned, when True diagnostic
    information from the singular value decomposition is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

    .. versionadded:: 1.5.0

Returns
-------
coef : ndarray, shape (M,) or (M, K)
    Chebyshev coefficients ordered from low to high. If `y` was 2-D,
    the coefficients for the data in column k  of `y` are in column
    `k`.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Warns
-----
RankWarning
    The rank of the coefficient matrix in the least-squares fit is
    deficient. The warning is only raised if ``full == False``.  The
    warnings can be turned off by

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.polynomial.polyfit
numpy.polynomial.legendre.legfit
numpy.polynomial.laguerre.lagfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.hermite_e.hermefit
chebval : Evaluates a Chebyshev series.
chebvander : Vandermonde matrix of Chebyshev series.
chebweight : Chebyshev weight function.
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the Chebyshev series `p` that
minimizes the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where :math:`w_j` are the weights. This problem is solved by setting up
as the (typically) overdetermined matrix equation

.. math:: V(x) * c = w * y,

where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
coefficients to be solved for, `w` are the weights, and `y` are the
observed values.  This equation is then solved using the singular value
decomposition of `V`.

If some of the singular values of `V` are so small that they are
neglected, then a `RankWarning` will be issued. This means that the
coefficient values may be poorly determined. Using a lower order fit
will usually get rid of the warning.  The `rcond` parameter can also be
set to a value smaller than its default, but the resulting fit may be
spurious and have large contributions from roundoff error.

Fits using Chebyshev series are usually better conditioned than fits
using power series, but much can depend on the distribution of the
sample points and the smoothness of the data. If the quality of the fit
is inadequate splines may be a good alternative.

References
----------
.. [1] Wikipedia, "Curve fitting",
       https://en.wikipedia.org/wiki/Curve_fitting

Examples
--------

---
## chebcompanion
```python
from chebyshev import chebcompanion
```

Return the scaled companion matrix of c.

The basis polynomials are scaled so that the companion matrix is
symmetric when `c` is a Chebyshev basis polynomial. This provides
better eigenvalue estimates than the unscaled case and for basis
polynomials the eigenvalues are guaranteed to be real if
`numpy.linalg.eigvalsh` is used to obtain them.

Parameters
----------
c : array_like
    1-D array of Chebyshev series coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Scaled companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## chebroots
```python
from chebyshev import chebroots
```

Compute the roots of a Chebyshev series.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * T_i(x).

Parameters
----------
c : 1-D array_like
    1-D array of coefficients.

Returns
-------
out : ndarray
    Array of the roots of the series. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.polynomial.polyroots
numpy.polynomial.legendre.legroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the series for such
values. Roots with multiplicity greater than 1 will also show larger
errors as the value of the series near such points is relatively
insensitive to errors in the roots. Isolated roots near the origin can
be improved by a few iterations of Newton's method.

The Chebyshev series basis polynomials aren't powers of `x` so the
results of this function may seem unintuitive.

Examples
--------
>>> import numpy.polynomial.chebyshev as cheb
>>> cheb.chebroots((-1, 1,-1, 1)) # T3 - T2 + T1 - T0 has real roots
array([ -5.00000000e-01,   2.60860684e-17,   1.00000000e+00]) # may vary

---
## chebinterpolate
```python
from chebyshev import chebinterpolate
```

Interpolate a function at the Chebyshev points of the first kind.

Returns the Chebyshev series that interpolates `func` at the Chebyshev
points of the first kind in the interval [-1, 1]. The interpolating
series tends to a minmax approximation to `func` with increasing `deg`
if the function is continuous in the interval.

.. versionadded:: 1.14.0

Parameters
----------
func : function
    The function to be approximated. It must be a function of a single
    variable of the form ``f(x, a, b, c...)``, where ``a, b, c...`` are
    extra arguments passed in the `args` parameter.
deg : int
    Degree of the interpolating polynomial
args : tuple, optional
    Extra arguments to be used in the function call. Default is no extra
    arguments.

Returns
-------
coef : ndarray, shape (deg + 1,)
    Chebyshev coefficients of the interpolating series ordered from low to
    high.

Examples
--------
>>> import numpy.polynomial.chebyshev as C
>>> C.chebfromfunction(lambda x: np.tanh(x) + 0.5, 8)
array([  5.00000000e-01,   8.11675684e-01,  -9.86864911e-17,
        -5.42457905e-02,  -2.71387850e-16,   4.51658839e-03,
         2.46716228e-17,  -3.79694221e-04,  -3.26899002e-16])

Notes
-----

The Chebyshev polynomials used in the interpolation are orthogonal when
sampled at the Chebyshev points of the first kind. If it is desired to
constrain some of the coefficients they can simply be set to the desired
value after the interpolation, no new interpolation or fit is needed. This
is especially useful if it is known apriori that some of coefficients are
zero. For instance, if the function is even then the coefficients of the
terms of odd degree in the result can be set to zero.

---
## chebgauss
```python
from chebyshev import chebgauss
```

Gauss-Chebyshev quadrature.

Computes the sample points and weights for Gauss-Chebyshev quadrature.
These sample points and weights will correctly integrate polynomials of
degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
the weight function :math:`f(x) = 1/\sqrt{1 - x^2}`.

Parameters
----------
deg : int
    Number of sample points and weights. It must be >= 1.

Returns
-------
x : ndarray
    1-D ndarray containing the sample points.
y : ndarray
    1-D ndarray containing the weights.

Notes
-----

.. versionadded:: 1.7.0

The results have only been tested up to degree 100, higher degrees may
be problematic. For Gauss-Chebyshev there are closed form solutions for
the sample points and weights. If n = `deg`, then

.. math:: x_i = \cos(\pi (2 i - 1) / (2 n))

.. math:: w_i = \pi / n

---
## chebweight
```python
from chebyshev import chebweight
```

The weight function of the Chebyshev polynomials.

The weight function is :math:`1/\sqrt{1 - x^2}` and the interval of
integration is :math:`[-1, 1]`. The Chebyshev polynomials are
orthogonal, but not normalized, with respect to this weight function.

Parameters
----------
x : array_like
   Values at which the weight function will be computed.

Returns
-------
w : ndarray
   The weight function at `x`.

Notes
-----

.. versionadded:: 1.7.0

---
## chebpts1
```python
from chebyshev import chebpts1
```

Chebyshev points of the first kind.

The Chebyshev points of the first kind are the points ``cos(x)``,
where ``x = [pi*(k + .5)/npts for k in range(npts)]``.

Parameters
----------
npts : int
    Number of sample points desired.

Returns
-------
pts : ndarray
    The Chebyshev points of the first kind.

See Also
--------
chebpts2

Notes
-----

.. versionadded:: 1.5.0

---
## chebpts2
```python
from chebyshev import chebpts2
```

Chebyshev points of the second kind.

The Chebyshev points of the second kind are the points ``cos(x)``,
where ``x = [pi*k/(npts - 1) for k in range(npts)]`` sorted in ascending
order.

Parameters
----------
npts : int
    Number of sample points desired.

Returns
-------
pts : ndarray
    The Chebyshev points of the second kind.

Notes
-----

.. versionadded:: 1.5.0

---
## Chebyshev
```python
from chebyshev import Chebyshev
```

A Chebyshev series class.

The Chebyshev class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
methods listed below.

Parameters
----------
coef : array_like
    Chebyshev coefficients in order of increasing degree, i.e.,
    ``(1, 2, 3)`` gives ``1*T_0(x) + 2*T_1(x) + 3*T_2(x)``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [-1, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [-1, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## interpolate
```python
from chebyshev import interpolate
```

Interpolate a function at the Chebyshev points of the first kind.

Returns the series that interpolates `func` at the Chebyshev points of
the first kind scaled and shifted to the `domain`. The resulting series
tends to a minmax approximation of `func` when the function is
continuous in the domain.

.. versionadded:: 1.14.0

Parameters
----------
func : function
    The function to be interpolated. It must be a function of a single
    variable of the form ``f(x, a, b, c...)``, where ``a, b, c...`` are
    extra arguments passed in the `args` parameter.
deg : int
    Degree of the interpolating polynomial.
domain : {None, [beg, end]}, optional
    Domain over which `func` is interpolated. The default is None, in
    which case the domain is [-1, 1].
args : tuple, optional
    Extra arguments to be used in the function call. Default is no
    extra arguments.

Returns
-------
polynomial : Chebyshev instance
    Interpolating Chebyshev instance.

Notes
-----
See `numpy.polynomial.chebfromfunction` for more details.

---
## polyline
```python
from polynomial import polyline
```

Returns an array representing a linear polynomial.

Parameters
----------
off, scl : scalars
    The "y-intercept" and "slope" of the line, respectively.

Returns
-------
y : ndarray
    This module's representation of the linear polynomial ``off +
    scl*x``.

See Also
--------
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> P.polyline(1,-1)
array([ 1, -1])
>>> P.polyval(1, P.polyline(1,-1)) # should be 0
0.0

---
## polyfromroots
```python
from polynomial import polyfromroots
```

Generate a monic polynomial with given roots.

Return the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

where the ``r_n`` are the roots specified in `roots`.  If a zero has
multiplicity n, then it must appear in `roots` n times. For instance,
if 2 is a root of multiplicity three and 3 is a root of multiplicity 2,
then `roots` looks something like [2, 2, 2, 3, 3]. The roots can appear
in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * x + ... +  x^n

The coefficient of the last term is 1 for monic polynomials in this
form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of the polynomial's coefficients If all the roots are
    real, then `out` is also real, otherwise it is complex.  (see
    Examples below).

See Also
--------
numpy.polynomial.chebyshev.chebfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.laguerre.lagfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.hermite_e.hermefromroots

Notes
-----
The coefficients are determined by multiplying together linear factors
of the form ``(x - r_i)``, i.e.

.. math:: p(x) = (x - r_0) (x - r_1) ... (x - r_n)

where ``n == len(roots) - 1``; note that this implies that ``1`` is always
returned for :math:`a_n`.

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> P.polyfromroots((-1,0,1)) # x(x - 1)(x + 1) = x^3 - x
array([ 0., -1.,  0.,  1.])
>>> j = complex(0,1)
>>> P.polyfromroots((-j,j)) # complex returned, though values are real
array([1.+0.j,  0.+0.j,  1.+0.j])

---
## polymulx
```python
from polynomial import polymulx
```

Multiply a polynomial by x.

Multiply the polynomial `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of polynomial coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

See Also
--------
polyadd, polysub, polymul, polydiv, polypow

Notes
-----

.. versionadded:: 1.5.0

---
## polypow
```python
from polynomial import polypow
```

Raise a polynomial to a power.

Returns the polynomial `c` raised to the power `pow`. The argument
`c` is a sequence of coefficients ordered from low to high. i.e.,
[1,2,3] is the series  ``1 + 2*x + 3*x**2.``

Parameters
----------
c : array_like
    1-D array of array of series coefficients ordered from low to
    high degree.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Power series of power.

See Also
--------
polyadd, polysub, polymulx, polymul, polydiv

Examples
--------
>>> from numpy.polynomial import polynomial as P
>>> P.polypow([1,2,3], 2)
array([ 1., 4., 10., 12., 9.])

---
## polyvalfromroots
```python
from polynomial import polyvalfromroots
```

Evaluate a polynomial specified by its roots at points x.

If `r` is of length `N`, this function returns the value

.. math:: p(x) = \prod_{n=1}^{N} (x - r_n)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `r`.

If `r` is a 1-D array, then `p(x)` will have the same shape as `x`.  If `r`
is multidimensional, then the shape of the result depends on the value of
`tensor`. If `tensor` is ``True`` the shape will be r.shape[1:] + x.shape;
that is, each polynomial is evaluated at every value of `x`. If `tensor` is
``False``, the shape will be r.shape[1:]; that is, each polynomial is
evaluated only for the corresponding broadcast value of `x`. Note that
scalars have shape (,).

.. versionadded:: 1.12

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    with themselves and with the elements of `r`.
r : array_like
    Array of roots. If `r` is multidimensional the first index is the
    root index, while the remaining indices enumerate multiple
    polynomials. For instance, in the two dimensional case the roots
    of each polynomial may be thought of as stored in the columns of `r`.
tensor : boolean, optional
    If True, the shape of the roots array is extended with ones on the
    right, one for each dimension of `x`. Scalars have dimension 0 for this
    action. The result is that every column of coefficients in `r` is
    evaluated for every element of `x`. If False, `x` is broadcast over the
    columns of `r` for the evaluation.  This keyword is useful when `r` is
    multidimensional. The default value is True.

Returns
-------
values : ndarray, compatible object
    The shape of the returned array is described above.

See Also
--------
polyroots, polyfromroots, polyval

Examples
--------
>>> from numpy.polynomial.polynomial import polyvalfromroots
>>> polyvalfromroots(1, [1,2,3])
0.0
>>> a = np.arange(4).reshape(2,2)
>>> a
array([[0, 1],
       [2, 3]])
>>> polyvalfromroots(a, [-1, 0, 1])
array([[-0.,   0.],
       [ 6.,  24.]])
>>> r = np.arange(-2, 2).reshape(2,2) # multidimensional coefficients
>>> r # each column of r defines one polynomial
array([[-2, -1],
       [ 0,  1]])
>>> b = [-2, 1]
>>> polyvalfromroots(b, r, tensor=True)
array([[-0.,  3.],
       [ 3., 0.]])
>>> polyvalfromroots(b, r, tensor=False)
array([-0.,  0.])

---
## polyval2d
```python
from polynomial import polyval2d
```

Evaluate a 2-D polynomial at points (x, y).

This function returns the value

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * x^i * y^j

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in `c[i,j]`. If `c` has
    dimension greater than two the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points formed with
    pairs of corresponding values from `x` and `y`.

See Also
--------
polyval, polygrid2d, polyval3d, polygrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## polygrid2d
```python
from polynomial import polygrid2d
```

Evaluate a 2-D polynomial on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * a^i * b^j

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape + y.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
polyval, polyval2d, polyval3d, polygrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## polyval3d
```python
from polynomial import polyval3d
```

Evaluate a 3-D polynomial at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * x^i * y^j * z^k

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
polyval, polyval2d, polygrid2d, polygrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## polygrid3d
```python
from polynomial import polygrid3d
```

Evaluate a 3-D polynomial on the Cartesian product of x, y and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * a^i * b^j * c^k

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
polyval, polyval2d, polygrid2d, polyval3d

Notes
-----

.. versionadded:: 1.7.0

---
## polyvander
```python
from polynomial import polyvander
```

Vandermonde matrix of given degree.

Returns the Vandermonde matrix of degree `deg` and sample points
`x`. The Vandermonde matrix is defined by

.. math:: V[..., i] = x^i,

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the power of `x`.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
matrix ``V = polyvander(x, n)``, then ``np.dot(V, c)`` and
``polyval(x, c)`` are the same up to roundoff. This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of polynomials of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray.
    The Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where the last index is the power of `x`.
    The dtype will be the same as the converted `x`.

See Also
--------
polyvander2d, polyvander3d

---
## polyvander2d
```python
from polynomial import polyvander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = x^i * y^j,

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the powers of
`x` and `y`.

If ``V = polyvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``polyval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D polynomials
of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg([1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
polyvander, polyvander3d, polyval2d, polyval3d

---
## polyvander3d
```python
from polynomial import polyvander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = x^i * y^j * z^k,

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the powers of `x`, `y`, and `z`.

If ``V = polyvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and  ``np.dot(V, c.flat)`` and ``polyval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D polynomials
of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg([1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
polyvander, polyvander3d, polyval2d, polyval3d

Notes
-----

.. versionadded:: 1.7.0

---
## polycompanion
```python
from polynomial import polycompanion
```

Return the companion matrix of c.

The companion matrix for power series cannot be made symmetric by
scaling the basis, so this function differs from those for the
orthogonal polynomials.

Parameters
----------
c : array_like
    1-D array of polynomial coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## polyroots
```python
from polynomial import polyroots
```

Compute the roots of a polynomial.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * x^i.

Parameters
----------
c : 1-D array_like
    1-D array of polynomial coefficients.

Returns
-------
out : ndarray
    Array of the roots of the polynomial. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.chebyshev.chebroots
numpy.polynomial.legendre.legroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the power series for such
values. Roots with multiplicity greater than 1 will also show larger
errors as the value of the series near such points is relatively
insensitive to errors in the roots. Isolated roots near the origin can
be improved by a few iterations of Newton's method.

Examples
--------
>>> import numpy.polynomial.polynomial as poly
>>> poly.polyroots(poly.polyfromroots((-1,0,1)))
array([-1.,  0.,  1.])
>>> poly.polyroots(poly.polyfromroots((-1,0,1))).dtype
dtype('float64')
>>> j = complex(0,1)
>>> poly.polyroots(poly.polyfromroots((-j,0,j)))
array([  0.00000000e+00+0.j,   0.00000000e+00+1.j,   2.77555756e-17-1.j]) # may vary

---
## Polynomial
```python
from polynomial import Polynomial
```

A power series class.

The Polynomial class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
attributes and methods listed in the `ABCPolyBase` documentation.

Parameters
----------
coef : array_like
    Polynomial coefficients in order of increasing degree, i.e.,
    ``(1, 2, 3)`` give ``1 + 2*x + 3*x**2``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [-1, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [-1, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## _str_term_unicode
```python
from polynomial import _str_term_unicode
```



---
## _str_term_ascii
```python
from polynomial import _str_term_ascii
```



---
## _repr_latex_term
```python
from polynomial import _repr_latex_term
```



---
## __name__
```python
from legendre import __name__
```

==================================================
Legendre Series (:mod:`numpy.polynomial.legendre`)
==================================================

This module provides a number of objects (mostly functions) useful for
dealing with Legendre series, including a `Legendre` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with such polynomials is in the
docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------
.. autosummary::
   :toctree: generated/

    Legendre

Constants
---------

.. autosummary::
   :toctree: generated/

   legdomain
   legzero
   legone
   legx

Arithmetic
----------

.. autosummary::
   :toctree: generated/

   legadd
   legsub
   legmulx
   legmul
   legdiv
   legpow
   legval
   legval2d
   legval3d
   leggrid2d
   leggrid3d

Calculus
--------

.. autosummary::
   :toctree: generated/

   legder
   legint

Misc Functions
--------------

.. autosummary::
   :toctree: generated/

   legfromroots
   legroots
   legvander
   legvander2d
   legvander3d
   leggauss
   legweight
   legcompanion
   legfit
   legtrim
   legline
   leg2poly
   poly2leg

See also
--------
numpy.polynomial

---
## poly2leg
```python
from legendre import poly2leg
```

Convert a polynomial to a Legendre series.

Convert an array representing the coefficients of a polynomial (relative
to the "standard" basis) ordered from lowest degree to highest, to an
array of the coefficients of the equivalent Legendre series, ordered
from lowest to highest degree.

Parameters
----------
pol : array_like
    1-D array containing the polynomial coefficients

Returns
-------
c : ndarray
    1-D array containing the coefficients of the equivalent Legendre
    series.

See Also
--------
leg2poly

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy import polynomial as P
>>> p = P.Polynomial(np.arange(4))
>>> p
Polynomial([0.,  1.,  2.,  3.], domain=[-1,  1], window=[-1,  1])
>>> c = P.Legendre(P.legendre.poly2leg(p.coef))
>>> c
Legendre([ 1.  ,  3.25,  1.  ,  0.75], domain=[-1,  1], window=[-1,  1]) # may vary

---
## leg2poly
```python
from legendre import leg2poly
```

Convert a Legendre series to a polynomial.

Convert an array representing the coefficients of a Legendre series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.

Parameters
----------
c : array_like
    1-D array containing the Legendre series coefficients, ordered
    from lowest order term to highest.

Returns
-------
pol : ndarray
    1-D array containing the coefficients of the equivalent polynomial
    (relative to the "standard" basis) ordered from lowest order term
    to highest.

See Also
--------
poly2leg

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy import polynomial as P
>>> c = P.Legendre(range(4))
>>> c
Legendre([0., 1., 2., 3.], domain=[-1,  1], window=[-1,  1])
>>> p = c.convert(kind=P.Polynomial)
>>> p
Polynomial([-1. , -3.5,  3. ,  7.5], domain=[-1.,  1.], window=[-1.,  1.])
>>> P.legendre.leg2poly(range(4))
array([-1. , -3.5,  3. ,  7.5])

---
## legline
```python
from legendre import legline
```

Legendre series whose graph is a straight line.



Parameters
----------
off, scl : scalars
    The specified line is given by ``off + scl*x``.

Returns
-------
y : ndarray
    This module's representation of the Legendre series for
    ``off + scl*x``.

See Also
--------
numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite.hermline
numpy.polynomial.hermite_e.hermeline

Examples
--------
>>> import numpy.polynomial.legendre as L
>>> L.legline(3,2)
array([3, 2])
>>> L.legval(-3, L.legline(3,2)) # should be -3
-3.0

---
## legfromroots
```python
from legendre import legfromroots
```

Generate a Legendre series with given roots.

The function returns the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

in Legendre form, where the `r_n` are the roots specified in `roots`.
If a zero has multiplicity n, then it must appear in `roots` n times.
For instance, if 2 is a root of multiplicity three and 3 is a root of
multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
roots can appear in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * L_1(x) + ... +  c_n * L_n(x)

The coefficient of the last term is not generally 1 for monic
polynomials in Legendre form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of coefficients.  If all roots are real then `out` is a
    real array, if some of the roots are complex, then `out` is complex
    even if all the coefficients in the result are real (see Examples
    below).

See Also
--------
numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.chebyshev.chebfromroots
numpy.polynomial.laguerre.lagfromroots
numpy.polynomial.hermite.hermfromroots
numpy.polynomial.hermite_e.hermefromroots

Examples
--------
>>> import numpy.polynomial.legendre as L
>>> L.legfromroots((-1,0,1)) # x^3 - x relative to the standard basis
array([ 0. , -0.4,  0. ,  0.4])
>>> j = complex(0,1)
>>> L.legfromroots((-j,j)) # x^2 + 1 relative to the standard basis
array([ 1.33333333+0.j,  0.00000000+0.j,  0.66666667+0.j]) # may vary

---
## legadd
```python
from legendre import legadd
```

Add one Legendre series to another.

Returns the sum of two Legendre series `c1` + `c2`.  The arguments
are sequences of coefficients ordered from lowest order term to
highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Legendre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the Legendre series of their sum.

See Also
--------
legsub, legmulx, legmul, legdiv, legpow

Notes
-----
Unlike multiplication, division, etc., the sum of two Legendre series
is a Legendre series (without having to "reproject" the result onto
the basis set) so addition, just like that of "standard" polynomials,
is simply "component-wise."

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> L.legadd(c1,c2)
array([4.,  4.,  4.])

---
## legsub
```python
from legendre import legsub
```

Subtract one Legendre series from another.

Returns the difference of two Legendre series `c1` - `c2`.  The
sequences of coefficients are from lowest order term to highest, i.e.,
[1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Legendre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Legendre series coefficients representing their difference.

See Also
--------
legadd, legmulx, legmul, legdiv, legpow

Notes
-----
Unlike multiplication, division, etc., the difference of two Legendre
series is a Legendre series (without having to "reproject" the result
onto the basis set) so subtraction, just like that of "standard"
polynomials, is simply "component-wise."

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> L.legsub(c1,c2)
array([-2.,  0.,  2.])
>>> L.legsub(c2,c1) # -C.legsub(c1,c2)
array([ 2.,  0., -2.])

---
## legmulx
```python
from legendre import legmulx
```

Multiply a Legendre series by x.

Multiply the Legendre series `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of Legendre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

See Also
--------
legadd, legmul, legdiv, legpow

Notes
-----
The multiplication uses the recursion relationship for Legendre
polynomials in the form

.. math::

  xP_i(x) = ((i + 1)*P_{i + 1}(x) + i*P_{i - 1}(x))/(2i + 1)

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> L.legmulx([1,2,3])
array([ 0.66666667, 2.2, 1.33333333, 1.8]) # may vary

---
## legmul
```python
from legendre import legmul
```

Multiply one Legendre series by another.

Returns the product of two Legendre series `c1` * `c2`.  The arguments
are sequences of coefficients, from lowest order "term" to highest,
e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Legendre series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Legendre series coefficients representing their product.

See Also
--------
legadd, legsub, legmulx, legdiv, legpow

Notes
-----
In general, the (polynomial) product of two C-series results in terms
that are not in the Legendre polynomial basis set.  Thus, to express
the product as a Legendre series, it is necessary to "reproject" the
product onto said basis set, which may produce "unintuitive" (but
correct) results; see Examples section below.

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c1 = (1,2,3)
>>> c2 = (3,2)
>>> L.legmul(c1,c2) # multiplication requires "reprojection"
array([  4.33333333,  10.4       ,  11.66666667,   3.6       ]) # may vary

---
## legdiv
```python
from legendre import legdiv
```

Divide one Legendre series by another.

Returns the quotient-with-remainder of two Legendre series
`c1` / `c2`.  The arguments are sequences of coefficients from lowest
order "term" to highest, e.g., [1,2,3] represents the series
``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Legendre series coefficients ordered from low to
    high.

Returns
-------
quo, rem : ndarrays
    Of Legendre series coefficients representing the quotient and
    remainder.

See Also
--------
legadd, legsub, legmulx, legmul, legpow

Notes
-----
In general, the (polynomial) division of one Legendre series by another
results in quotient and remainder terms that are not in the Legendre
polynomial basis set.  Thus, to express these results as a Legendre
series, it is necessary to "reproject" the results onto the Legendre
basis set, which may produce "unintuitive" (but correct) results; see
Examples section below.

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c1 = (1,2,3)
>>> c2 = (3,2,1)
>>> L.legdiv(c1,c2) # quotient "intuitive," remainder not
(array([3.]), array([-8., -4.]))
>>> c2 = (0,1,2,3)
>>> L.legdiv(c2,c1) # neither "intuitive"
(array([-0.07407407,  1.66666667]), array([-1.03703704, -2.51851852])) # may vary

---
## legpow
```python
from legendre import legpow
```

Raise a Legendre series to a power.

Returns the Legendre series `c` raised to the power `pow`. The
argument `c` is a sequence of coefficients ordered from low to high.
i.e., [1,2,3] is the series  ``P_0 + 2*P_1 + 3*P_2.``

Parameters
----------
c : array_like
    1-D array of Legendre series coefficients ordered from low to
    high.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Legendre series of power.

See Also
--------
legadd, legsub, legmulx, legmul, legdiv

---
## legder
```python
from legendre import legder
```

Differentiate a Legendre series.

Returns the Legendre series coefficients `c` differentiated `m` times
along `axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable). The argument
`c` is an array of coefficients from low to high degree along each
axis, e.g., [1,2,3] represents the series ``1*L_0 + 2*L_1 + 3*L_2``
while [[1,2],[1,2]] represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) +
2*L_0(x)*L_1(y) + 2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is
``y``.

Parameters
----------
c : array_like
    Array of Legendre series coefficients. If c is multidimensional the
    different axis correspond to different variables with the degree in
    each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change of
    variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Legendre series of the derivative.

See Also
--------
legint

Notes
-----
In general, the result of differentiating a Legendre series does not
resemble the same operation on a power series. Thus the result of this
function may be "unintuitive," albeit correct; see Examples section
below.

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c = (1,2,3,4)
>>> L.legder(c)
array([  6.,   9.,  20.])
>>> L.legder(c, 3)
array([60.])
>>> L.legder(c, scl=-1)
array([ -6.,  -9., -20.])
>>> L.legder(c, 2,-1)
array([  9.,  60.])

---
## legint
```python
from legendre import legint
```

Integrate a Legendre series.

Returns the Legendre series coefficients `c` integrated `m` times from
`lbnd` along `axis`. At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument `c` is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series ``L_0 + 2*L_1 + 3*L_2`` while [[1,2],[1,2]]
represents ``1*L_0(x)*L_0(y) + 1*L_1(x)*L_0(y) + 2*L_0(x)*L_1(y) +
2*L_1(x)*L_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.

Parameters
----------
c : array_like
    Array of Legendre series coefficients. If c is multidimensional the
    different axis correspond to different variables with the degree in
    each axis given by the corresponding index.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at
    ``lbnd`` is the first value in the list, the value of the second
    integral at ``lbnd`` is the second value, etc.  If ``k == []`` (the
    default), all constants are set to zero.  If ``m == 1``, a single
    scalar can be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    Legendre series coefficient array of the integral.

Raises
------
ValueError
    If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
legder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.
Why is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`.  Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a` - perhaps not what one would have first thought.

Also note that, in general, the result of integrating a C-series needs
to be "reprojected" onto the C-series basis set.  Thus, typically,
the result of this function is "unintuitive," albeit correct; see
Examples section below.

Examples
--------
>>> from numpy.polynomial import legendre as L
>>> c = (1,2,3)
>>> L.legint(c)
array([ 0.33333333,  0.4       ,  0.66666667,  0.6       ]) # may vary
>>> L.legint(c, 3)
array([  1.66666667e-02,  -1.78571429e-02,   4.76190476e-02, # may vary
         -1.73472348e-18,   1.90476190e-02,   9.52380952e-03])
>>> L.legint(c, k=3)
 array([ 3.33333333,  0.4       ,  0.66666667,  0.6       ]) # may vary
>>> L.legint(c, lbnd=-2)
array([ 7.33333333,  0.4       ,  0.66666667,  0.6       ]) # may vary
>>> L.legint(c, scl=2)
array([ 0.66666667,  0.8       ,  1.33333333,  1.2       ]) # may vary

---
## legval
```python
from legendre import legval
```

Evaluate a Legendre series at points x.

If `c` is of length `n + 1`, this function returns the value:

.. math:: p(x) = c_0 * L_0(x) + c_1 * L_1(x) + ... + c_n * L_n(x)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, algebra_like
    The shape of the return value is described above.

See Also
--------
legval2d, leggrid2d, legval3d, leggrid3d

Notes
-----
The evaluation uses Clenshaw recursion, aka synthetic division.

---
## legval2d
```python
from legendre import legval2d
```

Evaluate a 2-D Legendre series at points (x, y).

This function returns the values:

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * L_i(x) * L_j(y)

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` is a 1-D array a one is implicitly appended to its shape to make
it 2-D. The shape of the result will be c.shape[2:] + x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and if it isn't an ndarray it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in ``c[i,j]``. If `c` has
    dimension greater than two the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional Legendre series at points formed
    from pairs of corresponding values from `x` and `y`.

See Also
--------
legval, leggrid2d, legval3d, leggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## leggrid2d
```python
from legendre import leggrid2d
```

Evaluate a 2-D Legendre series on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * L_i(a) * L_j(b)

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape + y.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j is contained in `c[i,j]`. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional Chebyshev series at points in the
    Cartesian product of `x` and `y`.

See Also
--------
legval, legval2d, legval3d, leggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## legval3d
```python
from legendre import legval3d
```

Evaluate a 3-D Legendre series at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * L_i(x) * L_j(y) * L_k(z)

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
legval, legval2d, leggrid2d, leggrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## leggrid3d
```python
from legendre import leggrid3d
```

Evaluate a 3-D Legendre series on the Cartesian product of x, y, and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * L_i(a) * L_j(b) * L_k(c)

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
legval, legval2d, leggrid2d, legval3d

Notes
-----

.. versionadded:: 1.7.0

---
## legvander
```python
from legendre import legvander
```

Pseudo-Vandermonde matrix of given degree.

Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
`x`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., i] = L_i(x)

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the degree of the Legendre polynomial.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
array ``V = legvander(x, n)``, then ``np.dot(V, c)`` and
``legval(x, c)`` are the same up to roundoff. This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of Legendre series of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray
    The pseudo-Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where The last index is the degree of the
    corresponding Legendre polynomial.  The dtype will be the same as
    the converted `x`.

---
## legvander2d
```python
from legendre import legvander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = L_i(x) * L_j(y),

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the degrees of
the Legendre polynomials.

If ``V = legvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``legval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D Legendre
series of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to
    1-D arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
legvander, legvander3d, legval2d, legval3d

Notes
-----

.. versionadded:: 1.7.0

---
## legvander3d
```python
from legendre import legvander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = L_i(x)*L_j(y)*L_k(z),

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the degrees of the Legendre polynomials.

If ``V = legvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and ``np.dot(V, c.flat)`` and ``legval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D Legendre
series of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
legvander, legvander3d, legval2d, legval3d

Notes
-----

.. versionadded:: 1.7.0

---
## legfit
```python
from legendre import legfit
```

Least squares fit of Legendre series to data.

Return the coefficients of a Legendre series of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * L_1(x) + ... + c_n * L_n(x),

where `n` is `deg`.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,) or (M, K)
    y-coordinates of the sample points. Several data sets of sample
    points sharing the same x-coordinates can be fitted at once by
    passing in a 2D-array that contains one dataset per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller than
    this relative to the largest singular value will be ignored. The
    default value is len(x)*eps, where eps is the relative precision of
    the float type, about 2e-16 in most cases.
full : bool, optional
    Switch determining nature of return value. When it is False (the
    default) just the coefficients are returned, when True diagnostic
    information from the singular value decomposition is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

    .. versionadded:: 1.5.0

Returns
-------
coef : ndarray, shape (M,) or (M, K)
    Legendre coefficients ordered from low to high. If `y` was
    2-D, the coefficients for the data in column k of `y` are in
    column `k`. If `deg` is specified as a list, coefficients for
    terms not included in the fit are set equal to zero in the
    returned `coef`.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Warns
-----
RankWarning
    The rank of the coefficient matrix in the least-squares fit is
    deficient. The warning is only raised if ``full == False``.  The
    warnings can be turned off by

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.polynomial.polyfit
numpy.polynomial.chebyshev.chebfit
numpy.polynomial.laguerre.lagfit
numpy.polynomial.hermite.hermfit
numpy.polynomial.hermite_e.hermefit
legval : Evaluates a Legendre series.
legvander : Vandermonde matrix of Legendre series.
legweight : Legendre weight function (= 1).
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the Legendre series `p` that
minimizes the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where :math:`w_j` are the weights. This problem is solved by setting up
as the (typically) overdetermined matrix equation

.. math:: V(x) * c = w * y,

where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
coefficients to be solved for, `w` are the weights, and `y` are the
observed values.  This equation is then solved using the singular value
decomposition of `V`.

If some of the singular values of `V` are so small that they are
neglected, then a `RankWarning` will be issued. This means that the
coefficient values may be poorly determined. Using a lower order fit
will usually get rid of the warning.  The `rcond` parameter can also be
set to a value smaller than its default, but the resulting fit may be
spurious and have large contributions from roundoff error.

Fits using Legendre series are usually better conditioned than fits
using power series, but much can depend on the distribution of the
sample points and the smoothness of the data. If the quality of the fit
is inadequate splines may be a good alternative.

References
----------
.. [1] Wikipedia, "Curve fitting",
       https://en.wikipedia.org/wiki/Curve_fitting

Examples
--------

---
## legcompanion
```python
from legendre import legcompanion
```

Return the scaled companion matrix of c.

The basis polynomials are scaled so that the companion matrix is
symmetric when `c` is an Legendre basis polynomial. This provides
better eigenvalue estimates than the unscaled case and for basis
polynomials the eigenvalues are guaranteed to be real if
`numpy.linalg.eigvalsh` is used to obtain them.

Parameters
----------
c : array_like
    1-D array of Legendre series coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Scaled companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## legroots
```python
from legendre import legroots
```

Compute the roots of a Legendre series.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * L_i(x).

Parameters
----------
c : 1-D array_like
    1-D array of coefficients.

Returns
-------
out : ndarray
    Array of the roots of the series. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.polynomial.polyroots
numpy.polynomial.chebyshev.chebroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.hermite.hermroots
numpy.polynomial.hermite_e.hermeroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the series for such values.
Roots with multiplicity greater than 1 will also show larger errors as
the value of the series near such points is relatively insensitive to
errors in the roots. Isolated roots near the origin can be improved by
a few iterations of Newton's method.

The Legendre series basis polynomials aren't powers of ``x`` so the
results of this function may seem unintuitive.

Examples
--------
>>> import numpy.polynomial.legendre as leg
>>> leg.legroots((1, 2, 3, 4)) # 4L_3 + 3L_2 + 2L_1 + 1L_0, all real roots
array([-0.85099543, -0.11407192,  0.51506735]) # may vary

---
## leggauss
```python
from legendre import leggauss
```

Gauss-Legendre quadrature.

Computes the sample points and weights for Gauss-Legendre quadrature.
These sample points and weights will correctly integrate polynomials of
degree :math:`2*deg - 1` or less over the interval :math:`[-1, 1]` with
the weight function :math:`f(x) = 1`.

Parameters
----------
deg : int
    Number of sample points and weights. It must be >= 1.

Returns
-------
x : ndarray
    1-D ndarray containing the sample points.
y : ndarray
    1-D ndarray containing the weights.

Notes
-----

.. versionadded:: 1.7.0

The results have only been tested up to degree 100, higher degrees may
be problematic. The weights are determined by using the fact that

.. math:: w_k = c / (L'_n(x_k) * L_{n-1}(x_k))

where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
is the k'th root of :math:`L_n`, and then scaling the results to get
the right value when integrating 1.

---
## legweight
```python
from legendre import legweight
```

Weight function of the Legendre polynomials.

The weight function is :math:`1` and the interval of integration is
:math:`[-1, 1]`. The Legendre polynomials are orthogonal, but not
normalized, with respect to this weight function.

Parameters
----------
x : array_like
   Values at which the weight function will be computed.

Returns
-------
w : ndarray
   The weight function at `x`.

Notes
-----

.. versionadded:: 1.7.0

---
## Legendre
```python
from legendre import Legendre
```

A Legendre series class.

The Legendre class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
attributes and methods listed in the `ABCPolyBase` documentation.

Parameters
----------
coef : array_like
    Legendre coefficients in order of increasing degree, i.e.,
    ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [-1, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [-1, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## __name__
```python
from hermite import __name__
```

==============================================================
Hermite Series, "Physicists" (:mod:`numpy.polynomial.hermite`)
==============================================================

This module provides a number of objects (mostly functions) useful for
dealing with Hermite series, including a `Hermite` class that
encapsulates the usual arithmetic operations.  (General information
on how this module represents and works with such polynomials is in the
docstring for its "parent" sub-package, `numpy.polynomial`).

Classes
-------
.. autosummary::
   :toctree: generated/

   Hermite

Constants
---------
.. autosummary::
   :toctree: generated/

   hermdomain
   hermzero
   hermone
   hermx

Arithmetic
----------
.. autosummary::
   :toctree: generated/

   hermadd
   hermsub
   hermmulx
   hermmul
   hermdiv
   hermpow
   hermval
   hermval2d
   hermval3d
   hermgrid2d
   hermgrid3d

Calculus
--------
.. autosummary::
   :toctree: generated/

   hermder
   hermint

Misc Functions
--------------
.. autosummary::
   :toctree: generated/

   hermfromroots
   hermroots
   hermvander
   hermvander2d
   hermvander3d
   hermgauss
   hermweight
   hermcompanion
   hermfit
   hermtrim
   hermline
   herm2poly
   poly2herm

See also
--------
`numpy.polynomial`

---
## poly2herm
```python
from hermite import poly2herm
```

poly2herm(pol)

Convert a polynomial to a Hermite series.

Convert an array representing the coefficients of a polynomial (relative
to the "standard" basis) ordered from lowest degree to highest, to an
array of the coefficients of the equivalent Hermite series, ordered
from lowest to highest degree.

Parameters
----------
pol : array_like
    1-D array containing the polynomial coefficients

Returns
-------
c : ndarray
    1-D array containing the coefficients of the equivalent Hermite
    series.

See Also
--------
herm2poly

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.hermite import poly2herm
>>> poly2herm(np.arange(4))
array([1.   ,  2.75 ,  0.5  ,  0.375])

---
## herm2poly
```python
from hermite import herm2poly
```

Convert a Hermite series to a polynomial.

Convert an array representing the coefficients of a Hermite series,
ordered from lowest degree to highest, to an array of the coefficients
of the equivalent polynomial (relative to the "standard" basis) ordered
from lowest to highest degree.

Parameters
----------
c : array_like
    1-D array containing the Hermite series coefficients, ordered
    from lowest order term to highest.

Returns
-------
pol : ndarray
    1-D array containing the coefficients of the equivalent polynomial
    (relative to the "standard" basis) ordered from lowest order term
    to highest.

See Also
--------
poly2herm

Notes
-----
The easy way to do conversions between polynomial basis sets
is to use the convert method of a class instance.

Examples
--------
>>> from numpy.polynomial.hermite import herm2poly
>>> herm2poly([ 1.   ,  2.75 ,  0.5  ,  0.375])
array([0., 1., 2., 3.])

---
## hermline
```python
from hermite import hermline
```

Hermite series whose graph is a straight line.



Parameters
----------
off, scl : scalars
    The specified line is given by ``off + scl*x``.

Returns
-------
y : ndarray
    This module's representation of the Hermite series for
    ``off + scl*x``.

See Also
--------
numpy.polynomial.polynomial.polyline
numpy.polynomial.chebyshev.chebline
numpy.polynomial.legendre.legline
numpy.polynomial.laguerre.lagline
numpy.polynomial.hermite_e.hermeline

Examples
--------
>>> from numpy.polynomial.hermite import hermline, hermval
>>> hermval(0,hermline(3, 2))
3.0
>>> hermval(1,hermline(3, 2))
5.0

---
## hermfromroots
```python
from hermite import hermfromroots
```

Generate a Hermite series with given roots.

The function returns the coefficients of the polynomial

.. math:: p(x) = (x - r_0) * (x - r_1) * ... * (x - r_n),

in Hermite form, where the `r_n` are the roots specified in `roots`.
If a zero has multiplicity n, then it must appear in `roots` n times.
For instance, if 2 is a root of multiplicity three and 3 is a root of
multiplicity 2, then `roots` looks something like [2, 2, 2, 3, 3]. The
roots can appear in any order.

If the returned coefficients are `c`, then

.. math:: p(x) = c_0 + c_1 * H_1(x) + ... +  c_n * H_n(x)

The coefficient of the last term is not generally 1 for monic
polynomials in Hermite form.

Parameters
----------
roots : array_like
    Sequence containing the roots.

Returns
-------
out : ndarray
    1-D array of coefficients.  If all roots are real then `out` is a
    real array, if some of the roots are complex, then `out` is complex
    even if all the coefficients in the result are real (see Examples
    below).

See Also
--------
numpy.polynomial.polynomial.polyfromroots
numpy.polynomial.legendre.legfromroots
numpy.polynomial.laguerre.lagfromroots
numpy.polynomial.chebyshev.chebfromroots
numpy.polynomial.hermite_e.hermefromroots

Examples
--------
>>> from numpy.polynomial.hermite import hermfromroots, hermval
>>> coef = hermfromroots((-1, 0, 1))
>>> hermval((-1, 0, 1), coef)
array([0.,  0.,  0.])
>>> coef = hermfromroots((-1j, 1j))
>>> hermval((-1j, 1j), coef)
array([0.+0.j, 0.+0.j])

---
## hermadd
```python
from hermite import hermadd
```

Add one Hermite series to another.

Returns the sum of two Hermite series `c1` + `c2`.  The arguments
are sequences of coefficients ordered from lowest order term to
highest, i.e., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the Hermite series of their sum.

See Also
--------
hermsub, hermmulx, hermmul, hermdiv, hermpow

Notes
-----
Unlike multiplication, division, etc., the sum of two Hermite series
is a Hermite series (without having to "reproject" the result onto
the basis set) so addition, just like that of "standard" polynomials,
is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.hermite import hermadd
>>> hermadd([1, 2, 3], [1, 2, 3, 4])
array([2., 4., 6., 4.])

---
## hermsub
```python
from hermite import hermsub
```

Subtract one Hermite series from another.

Returns the difference of two Hermite series `c1` - `c2`.  The
sequences of coefficients are from lowest order term to highest, i.e.,
[1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Hermite series coefficients representing their difference.

See Also
--------
hermadd, hermmulx, hermmul, hermdiv, hermpow

Notes
-----
Unlike multiplication, division, etc., the difference of two Hermite
series is a Hermite series (without having to "reproject" the result
onto the basis set) so subtraction, just like that of "standard"
polynomials, is simply "component-wise."

Examples
--------
>>> from numpy.polynomial.hermite import hermsub
>>> hermsub([1, 2, 3, 4], [1, 2, 3])
array([0.,  0.,  0.,  4.])

---
## hermmulx
```python
from hermite import hermmulx
```

Multiply a Hermite series by x.

Multiply the Hermite series `c` by x, where x is the independent
variable.


Parameters
----------
c : array_like
    1-D array of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Array representing the result of the multiplication.

See Also
--------
hermadd, hermsub, hermmul, hermdiv, hermpow

Notes
-----
The multiplication uses the recursion relationship for Hermite
polynomials in the form

.. math::

    xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x))

Examples
--------
>>> from numpy.polynomial.hermite import hermmulx
>>> hermmulx([1, 2, 3])
array([2. , 6.5, 1. , 1.5])

---
## hermmul
```python
from hermite import hermmul
```

Multiply one Hermite series by another.

Returns the product of two Hermite series `c1` * `c2`.  The arguments
are sequences of coefficients, from lowest order "term" to highest,
e.g., [1,2,3] represents the series ``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
out : ndarray
    Of Hermite series coefficients representing their product.

See Also
--------
hermadd, hermsub, hermmulx, hermdiv, hermpow

Notes
-----
In general, the (polynomial) product of two C-series results in terms
that are not in the Hermite polynomial basis set.  Thus, to express
the product as a Hermite series, it is necessary to "reproject" the
product onto said basis set, which may produce "unintuitive" (but
correct) results; see Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite import hermmul
>>> hermmul([1, 2, 3], [0, 1, 2])
array([52.,  29.,  52.,   7.,   6.])

---
## hermdiv
```python
from hermite import hermdiv
```

Divide one Hermite series by another.

Returns the quotient-with-remainder of two Hermite series
`c1` / `c2`.  The arguments are sequences of coefficients from lowest
order "term" to highest, e.g., [1,2,3] represents the series
``P_0 + 2*P_1 + 3*P_2``.

Parameters
----------
c1, c2 : array_like
    1-D arrays of Hermite series coefficients ordered from low to
    high.

Returns
-------
[quo, rem] : ndarrays
    Of Hermite series coefficients representing the quotient and
    remainder.

See Also
--------
hermadd, hermsub, hermmulx, hermmul, hermpow

Notes
-----
In general, the (polynomial) division of one Hermite series by another
results in quotient and remainder terms that are not in the Hermite
polynomial basis set.  Thus, to express these results as a Hermite
series, it is necessary to "reproject" the results onto the Hermite
basis set, which may produce "unintuitive" (but correct) results; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite import hermdiv
>>> hermdiv([ 52.,  29.,  52.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([0.]))
>>> hermdiv([ 54.,  31.,  52.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([2., 2.]))
>>> hermdiv([ 53.,  30.,  52.,   7.,   6.], [0, 1, 2])
(array([1., 2., 3.]), array([1., 1.]))

---
## hermpow
```python
from hermite import hermpow
```

Raise a Hermite series to a power.

Returns the Hermite series `c` raised to the power `pow`. The
argument `c` is a sequence of coefficients ordered from low to high.
i.e., [1,2,3] is the series  ``P_0 + 2*P_1 + 3*P_2.``

Parameters
----------
c : array_like
    1-D array of Hermite series coefficients ordered from low to
    high.
pow : integer
    Power to which the series will be raised
maxpower : integer, optional
    Maximum power allowed. This is mainly to limit growth of the series
    to unmanageable size. Default is 16

Returns
-------
coef : ndarray
    Hermite series of power.

See Also
--------
hermadd, hermsub, hermmulx, hermmul, hermdiv

Examples
--------
>>> from numpy.polynomial.hermite import hermpow
>>> hermpow([1, 2, 3], 2)
array([81.,  52.,  82.,  12.,   9.])

---
## hermder
```python
from hermite import hermder
```

Differentiate a Hermite series.

Returns the Hermite series coefficients `c` differentiated `m` times
along `axis`.  At each iteration the result is multiplied by `scl` (the
scaling factor is for use in a linear change of variable). The argument
`c` is an array of coefficients from low to high degree along each
axis, e.g., [1,2,3] represents the series ``1*H_0 + 2*H_1 + 3*H_2``
while [[1,2],[1,2]] represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) +
2*H_0(x)*H_1(y) + 2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is
``y``.

Parameters
----------
c : array_like
    Array of Hermite series coefficients. If `c` is multidimensional the
    different axis correspond to different variables with the degree in
    each axis given by the corresponding index.
m : int, optional
    Number of derivatives taken, must be non-negative. (Default: 1)
scl : scalar, optional
    Each differentiation is multiplied by `scl`.  The end result is
    multiplication by ``scl**m``.  This is for use in a linear change of
    variable. (Default: 1)
axis : int, optional
    Axis over which the derivative is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
der : ndarray
    Hermite series of the derivative.

See Also
--------
hermint

Notes
-----
In general, the result of differentiating a Hermite series does not
resemble the same operation on a power series. Thus the result of this
function may be "unintuitive," albeit correct; see Examples section
below.

Examples
--------
>>> from numpy.polynomial.hermite import hermder
>>> hermder([ 1. ,  0.5,  0.5,  0.5])
array([1., 2., 3.])
>>> hermder([-0.5,  1./2.,  1./8.,  1./12.,  1./16.], m=2)
array([1., 2., 3.])

---
## hermint
```python
from hermite import hermint
```

Integrate a Hermite series.

Returns the Hermite series coefficients `c` integrated `m` times from
`lbnd` along `axis`. At each iteration the resulting series is
**multiplied** by `scl` and an integration constant, `k`, is added.
The scaling factor is for use in a linear change of variable.  ("Buyer
beware": note that, depending on what one is doing, one may want `scl`
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument `c` is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series ``H_0 + 2*H_1 + 3*H_2`` while [[1,2],[1,2]]
represents ``1*H_0(x)*H_0(y) + 1*H_1(x)*H_0(y) + 2*H_0(x)*H_1(y) +
2*H_1(x)*H_1(y)`` if axis=0 is ``x`` and axis=1 is ``y``.

Parameters
----------
c : array_like
    Array of Hermite series coefficients. If c is multidimensional the
    different axis correspond to different variables with the degree in
    each axis given by the corresponding index.
m : int, optional
    Order of integration, must be positive. (Default: 1)
k : {[], list, scalar}, optional
    Integration constant(s).  The value of the first integral at
    ``lbnd`` is the first value in the list, the value of the second
    integral at ``lbnd`` is the second value, etc.  If ``k == []`` (the
    default), all constants are set to zero.  If ``m == 1``, a single
    scalar can be given instead of a list.
lbnd : scalar, optional
    The lower bound of the integral. (Default: 0)
scl : scalar, optional
    Following each integration the result is *multiplied* by `scl`
    before the integration constant is added. (Default: 1)
axis : int, optional
    Axis over which the integral is taken. (Default: 0).

    .. versionadded:: 1.7.0

Returns
-------
S : ndarray
    Hermite series coefficients of the integral.

Raises
------
ValueError
    If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or
    ``np.ndim(scl) != 0``.

See Also
--------
hermder

Notes
-----
Note that the result of each integration is *multiplied* by `scl`.
Why is this important to note?  Say one is making a linear change of
variable :math:`u = ax + b` in an integral relative to `x`.  Then
:math:`dx = du/a`, so one will need to set `scl` equal to
:math:`1/a` - perhaps not what one would have first thought.

Also note that, in general, the result of integrating a C-series needs
to be "reprojected" onto the C-series basis set.  Thus, typically,
the result of this function is "unintuitive," albeit correct; see
Examples section below.

Examples
--------
>>> from numpy.polynomial.hermite import hermint
>>> hermint([1,2,3]) # integrate once, value 0 at 0.
array([1. , 0.5, 0.5, 0.5])
>>> hermint([1,2,3], m=2) # integrate twice, value & deriv 0 at 0
array([-0.5       ,  0.5       ,  0.125     ,  0.08333333,  0.0625    ]) # may vary
>>> hermint([1,2,3], k=1) # integrate once, value 1 at 0.
array([2. , 0.5, 0.5, 0.5])
>>> hermint([1,2,3], lbnd=-1) # integrate once, value 0 at -1
array([-2. ,  0.5,  0.5,  0.5])
>>> hermint([1,2,3], m=2, k=[1,2], lbnd=-1)
array([ 1.66666667, -0.5       ,  0.125     ,  0.08333333,  0.0625    ]) # may vary

---
## hermval
```python
from hermite import hermval
```

Evaluate an Hermite series at points x.

If `c` is of length `n + 1`, this function returns the value:

.. math:: p(x) = c_0 * H_0(x) + c_1 * H_1(x) + ... + c_n * H_n(x)

The parameter `x` is converted to an array only if it is a tuple or a
list, otherwise it is treated as a scalar. In either case, either `x`
or its elements must support multiplication and addition both with
themselves and with the elements of `c`.

If `c` is a 1-D array, then `p(x)` will have the same shape as `x`.  If
`c` is multidimensional, then the shape of the result depends on the
value of `tensor`. If `tensor` is true the shape will be c.shape[1:] +
x.shape. If `tensor` is false the shape will be c.shape[1:]. Note that
scalars have shape (,).

Trailing zeros in the coefficients will be used in the evaluation, so
they should be avoided if efficiency is a concern.

Parameters
----------
x : array_like, compatible object
    If `x` is a list or tuple, it is converted to an ndarray, otherwise
    it is left unchanged and treated as a scalar. In either case, `x`
    or its elements must support addition and multiplication with
    themselves and with the elements of `c`.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree n are contained in c[n]. If `c` is multidimensional the
    remaining indices enumerate multiple polynomials. In the two
    dimensional case the coefficients may be thought of as stored in
    the columns of `c`.
tensor : boolean, optional
    If True, the shape of the coefficient array is extended with ones
    on the right, one for each dimension of `x`. Scalars have dimension 0
    for this action. The result is that every column of coefficients in
    `c` is evaluated for every element of `x`. If False, `x` is broadcast
    over the columns of `c` for the evaluation.  This keyword is useful
    when `c` is multidimensional. The default value is True.

    .. versionadded:: 1.7.0

Returns
-------
values : ndarray, algebra_like
    The shape of the return value is described above.

See Also
--------
hermval2d, hermgrid2d, hermval3d, hermgrid3d

Notes
-----
The evaluation uses Clenshaw recursion, aka synthetic division.

Examples
--------
>>> from numpy.polynomial.hermite import hermval
>>> coef = [1,2,3]
>>> hermval(1, coef)
11.0
>>> hermval([[1,2],[3,4]], coef)
array([[ 11.,   51.],
       [115.,  203.]])

---
## hermval2d
```python
from hermite import hermval2d
```

Evaluate a 2-D Hermite series at points (x, y).

This function returns the values:

.. math:: p(x,y) = \sum_{i,j} c_{i,j} * H_i(x) * H_j(y)

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars and they
must have the same shape after conversion. In either case, either `x`
and `y` or their elements must support multiplication and addition both
with themselves and with the elements of `c`.

If `c` is a 1-D array a one is implicitly appended to its shape to make
it 2-D. The shape of the result will be c.shape[2:] + x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points `(x, y)`,
    where `x` and `y` must have the same shape. If `x` or `y` is a list
    or tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and if it isn't an ndarray it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term
    of multi-degree i,j is contained in ``c[i,j]``. If `c` has
    dimension greater than two the remaining indices enumerate multiple
    sets of coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points formed with
    pairs of corresponding values from `x` and `y`.

See Also
--------
hermval, hermgrid2d, hermval3d, hermgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermgrid2d
```python
from hermite import hermgrid2d
```

Evaluate a 2-D Hermite series on the Cartesian product of x and y.

This function returns the values:

.. math:: p(a,b) = \sum_{i,j} c_{i,j} * H_i(a) * H_j(b)

where the points `(a, b)` consist of all pairs formed by taking
`a` from `x` and `b` from `y`. The resulting points form a grid with
`x` in the first dimension and `y` in the second.

The parameters `x` and `y` are converted to arrays only if they are
tuples or a lists, otherwise they are treated as a scalars. In either
case, either `x` and `y` or their elements must support multiplication
and addition both with themselves and with the elements of `c`.

If `c` has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:] +
x.shape.

Parameters
----------
x, y : array_like, compatible objects
    The two dimensional series is evaluated at the points in the
    Cartesian product of `x` and `y`.  If `x` or `y` is a list or
    tuple, it is first converted to an ndarray, otherwise it is left
    unchanged and, if it isn't an ndarray, it is treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
hermval, hermval2d, hermval3d, hermgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermval3d
```python
from hermite import hermval3d
```

Evaluate a 3-D Hermite series at points (x, y, z).

This function returns the values:

.. math:: p(x,y,z) = \sum_{i,j,k} c_{i,j,k} * H_i(x) * H_j(y) * H_k(z)

The parameters `x`, `y`, and `z` are converted to arrays only if
they are tuples or a lists, otherwise they are treated as a scalars and
they must have the same shape after conversion. In either case, either
`x`, `y`, and `z` or their elements must support multiplication and
addition both with themselves and with the elements of `c`.

If `c` has fewer than 3 dimensions, ones are implicitly appended to its
shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape.

Parameters
----------
x, y, z : array_like, compatible object
    The three dimensional series is evaluated at the points
    `(x, y, z)`, where `x`, `y`, and `z` must have the same shape.  If
    any of `x`, `y`, or `z` is a list or tuple, it is first converted
    to an ndarray, otherwise it is left unchanged and if it isn't an
    ndarray it is  treated as a scalar.
c : array_like
    Array of coefficients ordered so that the coefficient of the term of
    multi-degree i,j,k is contained in ``c[i,j,k]``. If `c` has dimension
    greater than 3 the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the multidimensional polynomial on points formed with
    triples of corresponding values from `x`, `y`, and `z`.

See Also
--------
hermval, hermval2d, hermgrid2d, hermgrid3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermgrid3d
```python
from hermite import hermgrid3d
```

Evaluate a 3-D Hermite series on the Cartesian product of x, y, and z.

This function returns the values:

.. math:: p(a,b,c) = \sum_{i,j,k} c_{i,j,k} * H_i(a) * H_j(b) * H_k(c)

where the points `(a, b, c)` consist of all triples formed by taking
`a` from `x`, `b` from `y`, and `c` from `z`. The resulting points form
a grid with `x` in the first dimension, `y` in the second, and `z` in
the third.

The parameters `x`, `y`, and `z` are converted to arrays only if they
are tuples or a lists, otherwise they are treated as a scalars. In
either case, either `x`, `y`, and `z` or their elements must support
multiplication and addition both with themselves and with the elements
of `c`.

If `c` has fewer than three dimensions, ones are implicitly appended to
its shape to make it 3-D. The shape of the result will be c.shape[3:] +
x.shape + y.shape + z.shape.

Parameters
----------
x, y, z : array_like, compatible objects
    The three dimensional series is evaluated at the points in the
    Cartesian product of `x`, `y`, and `z`.  If `x`,`y`, or `z` is a
    list or tuple, it is first converted to an ndarray, otherwise it is
    left unchanged and, if it isn't an ndarray, it is treated as a
    scalar.
c : array_like
    Array of coefficients ordered so that the coefficients for terms of
    degree i,j are contained in ``c[i,j]``. If `c` has dimension
    greater than two the remaining indices enumerate multiple sets of
    coefficients.

Returns
-------
values : ndarray, compatible object
    The values of the two dimensional polynomial at points in the Cartesian
    product of `x` and `y`.

See Also
--------
hermval, hermval2d, hermgrid2d, hermval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermvander
```python
from hermite import hermvander
```

Pseudo-Vandermonde matrix of given degree.

Returns the pseudo-Vandermonde matrix of degree `deg` and sample points
`x`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., i] = H_i(x),

where `0 <= i <= deg`. The leading indices of `V` index the elements of
`x` and the last index is the degree of the Hermite polynomial.

If `c` is a 1-D array of coefficients of length `n + 1` and `V` is the
array ``V = hermvander(x, n)``, then ``np.dot(V, c)`` and
``hermval(x, c)`` are the same up to roundoff. This equivalence is
useful both for least squares fitting and for the evaluation of a large
number of Hermite series of the same degree and sample points.

Parameters
----------
x : array_like
    Array of points. The dtype is converted to float64 or complex128
    depending on whether any of the elements are complex. If `x` is
    scalar it is converted to a 1-D array.
deg : int
    Degree of the resulting matrix.

Returns
-------
vander : ndarray
    The pseudo-Vandermonde matrix. The shape of the returned matrix is
    ``x.shape + (deg + 1,)``, where The last index is the degree of the
    corresponding Hermite polynomial.  The dtype will be the same as
    the converted `x`.

Examples
--------
>>> from numpy.polynomial.hermite import hermvander
>>> x = np.array([-1, 0, 1])
>>> hermvander(x, 3)
array([[ 1., -2.,  2.,  4.],
       [ 1.,  0., -2., -0.],
       [ 1.,  2.,  2., -4.]])

---
## hermvander2d
```python
from hermite import hermvander2d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y)`. The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (deg[1] + 1)*i + j] = H_i(x) * H_j(y),

where `0 <= i <= deg[0]` and `0 <= j <= deg[1]`. The leading indices of
`V` index the points `(x, y)` and the last index encodes the degrees of
the Hermite polynomials.

If ``V = hermvander2d(x, y, [xdeg, ydeg])``, then the columns of `V`
correspond to the elements of a 2-D coefficient array `c` of shape
(xdeg + 1, ydeg + 1) in the order

.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...

and ``np.dot(V, c.flat)`` and ``hermval2d(x, y, c)`` will be the same
up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 2-D Hermite
series of the same degrees and sample points.

Parameters
----------
x, y : array_like
    Arrays of point coordinates, all of the same shape. The dtypes
    will be converted to either float64 or complex128 depending on
    whether any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg].

Returns
-------
vander2d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)`.  The dtype will be the same
    as the converted `x` and `y`.

See Also
--------
hermvander, hermvander3d, hermval2d, hermval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermvander3d
```python
from hermite import hermvander3d
```

Pseudo-Vandermonde matrix of given degrees.

Returns the pseudo-Vandermonde matrix of degrees `deg` and sample
points `(x, y, z)`. If `l, m, n` are the given degrees in `x, y, z`,
then The pseudo-Vandermonde matrix is defined by

.. math:: V[..., (m+1)(n+1)i + (n+1)j + k] = H_i(x)*H_j(y)*H_k(z),

where `0 <= i <= l`, `0 <= j <= m`, and `0 <= j <= n`.  The leading
indices of `V` index the points `(x, y, z)` and the last index encodes
the degrees of the Hermite polynomials.

If ``V = hermvander3d(x, y, z, [xdeg, ydeg, zdeg])``, then the columns
of `V` correspond to the elements of a 3-D coefficient array `c` of
shape (xdeg + 1, ydeg + 1, zdeg + 1) in the order

.. math:: c_{000}, c_{001}, c_{002},... , c_{010}, c_{011}, c_{012},...

and  ``np.dot(V, c.flat)`` and ``hermval3d(x, y, z, c)`` will be the
same up to roundoff. This equivalence is useful both for least squares
fitting and for the evaluation of a large number of 3-D Hermite
series of the same degrees and sample points.

Parameters
----------
x, y, z : array_like
    Arrays of point coordinates, all of the same shape. The dtypes will
    be converted to either float64 or complex128 depending on whether
    any of the elements are complex. Scalars are converted to 1-D
    arrays.
deg : list of ints
    List of maximum degrees of the form [x_deg, y_deg, z_deg].

Returns
-------
vander3d : ndarray
    The shape of the returned matrix is ``x.shape + (order,)``, where
    :math:`order = (deg[0]+1)*(deg[1]+1)*(deg[2]+1)`.  The dtype will
    be the same as the converted `x`, `y`, and `z`.

See Also
--------
hermvander, hermvander3d, hermval2d, hermval3d

Notes
-----

.. versionadded:: 1.7.0

---
## hermfit
```python
from hermite import hermfit
```

Least squares fit of Hermite series to data.

Return the coefficients of a Hermite series of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and the resulting
coefficients are stored in the corresponding columns of a 2-D return.
The fitted polynomial(s) are in the form

.. math::  p(x) = c_0 + c_1 * H_1(x) + ... + c_n * H_n(x),

where `n` is `deg`.

Parameters
----------
x : array_like, shape (M,)
    x-coordinates of the M sample points ``(x[i], y[i])``.
y : array_like, shape (M,) or (M, K)
    y-coordinates of the sample points. Several data sets of sample
    points sharing the same x-coordinates can be fitted at once by
    passing in a 2D-array that contains one dataset per column.
deg : int or 1-D array_like
    Degree(s) of the fitting polynomials. If `deg` is a single integer
    all terms up to and including the `deg`'th term are included in the
    fit. For NumPy versions >= 1.11.0 a list of integers specifying the
    degrees of the terms to include may be used instead.
rcond : float, optional
    Relative condition number of the fit. Singular values smaller than
    this relative to the largest singular value will be ignored. The
    default value is len(x)*eps, where eps is the relative precision of
    the float type, about 2e-16 in most cases.
full : bool, optional
    Switch determining nature of return value. When it is False (the
    default) just the coefficients are returned, when True diagnostic
    information from the singular value decomposition is also returned.
w : array_like, shape (`M`,), optional
    Weights. If not None, the weight ``w[i]`` applies to the unsquared
    residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
    chosen so that the errors of the products ``w[i]*y[i]`` all have the
    same variance.  When using inverse-variance weighting, use
    ``w[i] = 1/sigma(y[i])``.  The default value is None.

Returns
-------
coef : ndarray, shape (M,) or (M, K)
    Hermite coefficients ordered from low to high. If `y` was 2-D,
    the coefficients for the data in column k  of `y` are in column
    `k`.

[residuals, rank, singular_values, rcond] : list
    These values are only returned if ``full == True``

    - residuals -- sum of squared residuals of the least squares fit
    - rank -- the numerical rank of the scaled Vandermonde matrix
    - singular_values -- singular values of the scaled Vandermonde matrix
    - rcond -- value of `rcond`.

    For more details, see `numpy.linalg.lstsq`.

Warns
-----
RankWarning
    The rank of the coefficient matrix in the least-squares fit is
    deficient. The warning is only raised if ``full == False``.  The
    warnings can be turned off by

    >>> import warnings
    >>> warnings.simplefilter('ignore', np.RankWarning)

See Also
--------
numpy.polynomial.chebyshev.chebfit
numpy.polynomial.legendre.legfit
numpy.polynomial.laguerre.lagfit
numpy.polynomial.polynomial.polyfit
numpy.polynomial.hermite_e.hermefit
hermval : Evaluates a Hermite series.
hermvander : Vandermonde matrix of Hermite series.
hermweight : Hermite weight function
numpy.linalg.lstsq : Computes a least-squares fit from the matrix.
scipy.interpolate.UnivariateSpline : Computes spline fits.

Notes
-----
The solution is the coefficients of the Hermite series `p` that
minimizes the sum of the weighted squared errors

.. math:: E = \sum_j w_j^2 * |y_j - p(x_j)|^2,

where the :math:`w_j` are the weights. This problem is solved by
setting up the (typically) overdetermined matrix equation

.. math:: V(x) * c = w * y,

where `V` is the weighted pseudo Vandermonde matrix of `x`, `c` are the
coefficients to be solved for, `w` are the weights, `y` are the
observed values.  This equation is then solved using the singular value
decomposition of `V`.

If some of the singular values of `V` are so small that they are
neglected, then a `RankWarning` will be issued. This means that the
coefficient values may be poorly determined. Using a lower order fit
will usually get rid of the warning.  The `rcond` parameter can also be
set to a value smaller than its default, but the resulting fit may be
spurious and have large contributions from roundoff error.

Fits using Hermite series are probably most useful when the data can be
approximated by ``sqrt(w(x)) * p(x)``, where `w(x)` is the Hermite
weight. In that case the weight ``sqrt(w(x[i]))`` should be used
together with data values ``y[i]/sqrt(w(x[i]))``. The weight function is
available as `hermweight`.

References
----------
.. [1] Wikipedia, "Curve fitting",
       https://en.wikipedia.org/wiki/Curve_fitting

Examples
--------
>>> from numpy.polynomial.hermite import hermfit, hermval
>>> x = np.linspace(-10, 10)
>>> err = np.random.randn(len(x))/10
>>> y = hermval(x, [1, 2, 3]) + err
>>> hermfit(x, y, 2)
array([1.0218, 1.9986, 2.9999]) # may vary

---
## hermcompanion
```python
from hermite import hermcompanion
```

Return the scaled companion matrix of c.

The basis polynomials are scaled so that the companion matrix is
symmetric when `c` is an Hermite basis polynomial. This provides
better eigenvalue estimates than the unscaled case and for basis
polynomials the eigenvalues are guaranteed to be real if
`numpy.linalg.eigvalsh` is used to obtain them.

Parameters
----------
c : array_like
    1-D array of Hermite series coefficients ordered from low to high
    degree.

Returns
-------
mat : ndarray
    Scaled companion matrix of dimensions (deg, deg).

Notes
-----

.. versionadded:: 1.7.0

---
## hermroots
```python
from hermite import hermroots
```

Compute the roots of a Hermite series.

Return the roots (a.k.a. "zeros") of the polynomial

.. math:: p(x) = \sum_i c[i] * H_i(x).

Parameters
----------
c : 1-D array_like
    1-D array of coefficients.

Returns
-------
out : ndarray
    Array of the roots of the series. If all the roots are real,
    then `out` is also real, otherwise it is complex.

See Also
--------
numpy.polynomial.polynomial.polyroots
numpy.polynomial.legendre.legroots
numpy.polynomial.laguerre.lagroots
numpy.polynomial.chebyshev.chebroots
numpy.polynomial.hermite_e.hermeroots

Notes
-----
The root estimates are obtained as the eigenvalues of the companion
matrix, Roots far from the origin of the complex plane may have large
errors due to the numerical instability of the series for such
values. Roots with multiplicity greater than 1 will also show larger
errors as the value of the series near such points is relatively
insensitive to errors in the roots. Isolated roots near the origin can
be improved by a few iterations of Newton's method.

The Hermite series basis polynomials aren't powers of `x` so the
results of this function may seem unintuitive.

Examples
--------
>>> from numpy.polynomial.hermite import hermroots, hermfromroots
>>> coef = hermfromroots([-1, 0, 1])
>>> coef
array([0.   ,  0.25 ,  0.   ,  0.125])
>>> hermroots(coef)
array([-1.00000000e+00, -1.38777878e-17,  1.00000000e+00])

---
## _normed_hermite_n
```python
from hermite import _normed_hermite_n
```

Evaluate a normalized Hermite polynomial.

Compute the value of the normalized Hermite polynomial of degree ``n``
at the points ``x``.


Parameters
----------
x : ndarray of double.
    Points at which to evaluate the function
n : int
    Degree of the normalized Hermite function to be evaluated.

Returns
-------
values : ndarray
    The shape of the return value is described above.

Notes
-----
.. versionadded:: 1.10.0

This function is needed for finding the Gauss points and integration
weights for high degrees. The values of the standard Hermite functions
overflow when n >= 207.

---
## hermgauss
```python
from hermite import hermgauss
```

Gauss-Hermite quadrature.

Computes the sample points and weights for Gauss-Hermite quadrature.
These sample points and weights will correctly integrate polynomials of
degree :math:`2*deg - 1` or less over the interval :math:`[-\inf, \inf]`
with the weight function :math:`f(x) = \exp(-x^2)`.

Parameters
----------
deg : int
    Number of sample points and weights. It must be >= 1.

Returns
-------
x : ndarray
    1-D ndarray containing the sample points.
y : ndarray
    1-D ndarray containing the weights.

Notes
-----

.. versionadded:: 1.7.0

The results have only been tested up to degree 100, higher degrees may
be problematic. The weights are determined by using the fact that

.. math:: w_k = c / (H'_n(x_k) * H_{n-1}(x_k))

where :math:`c` is a constant independent of :math:`k` and :math:`x_k`
is the k'th root of :math:`H_n`, and then scaling the results to get
the right value when integrating 1.

---
## hermweight
```python
from hermite import hermweight
```

Weight function of the Hermite polynomials.

The weight function is :math:`\exp(-x^2)` and the interval of
integration is :math:`[-\inf, \inf]`. the Hermite polynomials are
orthogonal, but not normalized, with respect to this weight function.

Parameters
----------
x : array_like
   Values at which the weight function will be computed.

Returns
-------
w : ndarray
   The weight function at `x`.

Notes
-----

.. versionadded:: 1.7.0

---
## Hermite
```python
from hermite import Hermite
```

An Hermite series class.

The Hermite class provides the standard Python numerical methods
'+', '-', '*', '//', '%', 'divmod', '**', and '()' as well as the
attributes and methods listed in the `ABCPolyBase` documentation.

Parameters
----------
coef : array_like
    Hermite coefficients in order of increasing degree, i.e,
    ``(1, 2, 3)`` gives ``1*H_0(x) + 2*H_1(X) + 3*H_2(x)``.
domain : (2,) array_like, optional
    Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
    to the interval ``[window[0], window[1]]`` by shifting and scaling.
    The default value is [-1, 1].
window : (2,) array_like, optional
    Window, see `domain` for its use. The default value is [-1, 1].

    .. versionadded:: 1.6.0
symbol : str, optional
    Symbol used to represent the independent variable in string
    representations of the polynomial expression, e.g. for printing.
    The symbol must be a valid Python identifier. Default value is 'x'.

    .. versionadded:: 1.24

---
## __name__
```python
from test_compat import __name__
```



---
## test_isfileobj
```python
from test_compat import test_isfileobj
```



---
## __name__
```python
from test_numerictypes import __name__
```



---
## normalize_descr
```python
from test_numerictypes import normalize_descr
```

Normalize a description adding the platform byteorder.

---
## CreateZeros
```python
from test_numerictypes import CreateZeros
```

Check the creation of heterogeneous arrays zero-valued

---
## TestCreateZerosPlain
```python
from test_numerictypes import TestCreateZerosPlain
```

Check the creation of heterogeneous arrays zero-valued (plain)

---
## TestCreateZerosNested
```python
from test_numerictypes import TestCreateZerosNested
```

Check the creation of heterogeneous arrays zero-valued (nested)

---
## CreateValues
```python
from test_numerictypes import CreateValues
```

Check the creation of heterogeneous arrays with values

---
## TestCreateValuesPlainSingle
```python
from test_numerictypes import TestCreateValuesPlainSingle
```

Check the creation of heterogeneous arrays (plain, single row)

---
## TestCreateValuesPlainMultiple
```python
from test_numerictypes import TestCreateValuesPlainMultiple
```

Check the creation of heterogeneous arrays (plain, multiple rows)

---
## TestCreateValuesNestedSingle
```python
from test_numerictypes import TestCreateValuesNestedSingle
```

Check the creation of heterogeneous arrays (nested, single row)

---
## TestCreateValuesNestedMultiple
```python
from test_numerictypes import TestCreateValuesNestedMultiple
```

Check the creation of heterogeneous arrays (nested, multiple rows)

---
## ReadValuesPlain
```python
from test_numerictypes import ReadValuesPlain
```

Check the reading of values in heterogeneous arrays (plain)

---
## TestReadValuesPlainSingle
```python
from test_numerictypes import TestReadValuesPlainSingle
```

Check the creation of heterogeneous arrays (plain, single row)

---
## TestReadValuesPlainMultiple
```python
from test_numerictypes import TestReadValuesPlainMultiple
```

Check the values of heterogeneous arrays (plain, multiple rows)

---
## ReadValuesNested
```python
from test_numerictypes import ReadValuesNested
```

Check the reading of values in heterogeneous arrays (nested)

---
## TestReadValuesNestedSingle
```python
from test_numerictypes import TestReadValuesNestedSingle
```

Check the values of heterogeneous arrays (nested, single row)

---
## TestReadValuesNestedMultiple
```python
from test_numerictypes import TestReadValuesNestedMultiple
```

Check the values of heterogeneous arrays (nested, multiple rows)

---
## TestEmptyField
```python
from test_numerictypes import TestEmptyField
```



---
## TestCommonType
```python
from test_numerictypes import TestCommonType
```



---
## TestMultipleFields
```python
from test_numerictypes import TestMultipleFields
```



---
## TestIsSubDType
```python
from test_numerictypes import TestIsSubDType
```



---
## TestSctypeDict
```python
from test_numerictypes import TestSctypeDict
```



---
## TestBitName
```python
from test_numerictypes import TestBitName
```



---
## TestMaximumSctype
```python
from test_numerictypes import TestMaximumSctype
```



---
## Test_sctype2char
```python
from test_numerictypes import Test_sctype2char
```



---
## test_issctype
```python
from test_numerictypes import test_issctype
```



---
## TestDocStrings
```python
from test_numerictypes import TestDocStrings
```



---
## TestScalarTypeNames
```python
from test_numerictypes import TestScalarTypeNames
```



---
## test_zeros0D
```python
from test_numerictypes import test_zeros0D
```

Check creation of 0-dimensional objects

---
## test_zerosSD
```python
from test_numerictypes import test_zerosSD
```

Check creation of single-dimensional objects

---
## test_zerosMD
```python
from test_numerictypes import test_zerosMD
```

Check creation of multi-dimensional objects

---
## test_tuple
```python
from test_numerictypes import test_tuple
```

Check creation from tuples

---
## test_list_of_tuple
```python
from test_numerictypes import test_list_of_tuple
```

Check creation from list of tuples

---
## test_list_of_list_of_tuple
```python
from test_numerictypes import test_list_of_list_of_tuple
```

Check creation from list of list of tuples

---
## test_access_fields
```python
from test_numerictypes import test_access_fields
```



---
## test_access_top_fields
```python
from test_numerictypes import test_access_top_fields
```

Check reading the top fields of a nested array

---
## test_nested1_acessors
```python
from test_numerictypes import test_nested1_acessors
```

Check reading the nested fields of a nested array (1st level)

---
## test_nested2_acessors
```python
from test_numerictypes import test_nested2_acessors
```

Check reading the nested fields of a nested array (2nd level)

---
## test_nested1_descriptor
```python
from test_numerictypes import test_nested1_descriptor
```

Check access nested descriptors of a nested array (1st level)

---
## test_nested2_descriptor
```python
from test_numerictypes import test_nested2_descriptor
```

Check access nested descriptors of a nested array (2nd level)

---
## test_assign
```python
from test_numerictypes import test_assign
```



---
## test_scalar_loses1
```python
from test_numerictypes import test_scalar_loses1
```



---
## test_scalar_loses2
```python
from test_numerictypes import test_scalar_loses2
```



---
## test_scalar_wins
```python
from test_numerictypes import test_scalar_wins
```



---
## test_scalar_wins2
```python
from test_numerictypes import test_scalar_wins2
```



---
## test_scalar_wins3
```python
from test_numerictypes import test_scalar_wins3
```



---
## setup_method
```python
from test_numerictypes import setup_method
```



---
## _bad_call
```python
from test_numerictypes import _bad_call
```



---
## test_no_tuple
```python
from test_numerictypes import test_no_tuple
```



---
## test_return
```python
from test_numerictypes import test_return
```



---
## test_both_abstract
```python
from test_numerictypes import test_both_abstract
```



---
## test_same
```python
from test_numerictypes import test_same
```



---
## test_subclass
```python
from test_numerictypes import test_subclass
```



---
## test_subclass_backwards
```python
from test_numerictypes import test_subclass_backwards
```



---
## test_sibling_class
```python
from test_numerictypes import test_sibling_class
```



---
## test_nondtype_nonscalartype
```python
from test_numerictypes import test_nondtype_nonscalartype
```



---
## test_longdouble
```python
from test_numerictypes import test_longdouble
```



---
## test_ulong
```python
from test_numerictypes import test_ulong
```



---
## test_abstract
```python
from test_numerictypes import test_abstract
```



---
## test_int
```python
from test_numerictypes import test_int
```



---
## test_uint
```python
from test_numerictypes import test_uint
```



---
## test_float
```python
from test_numerictypes import test_float
```



---
## test_complex
```python
from test_numerictypes import test_complex
```



---
## test_other
```python
from test_numerictypes import test_other
```



---
## test_scalar_type
```python
from test_numerictypes import test_scalar_type
```



---
## test_other_type
```python
from test_numerictypes import test_other_type
```



---
## test_third_party_scalar_type
```python
from test_numerictypes import test_third_party_scalar_type
```



---
## test_array_instance
```python
from test_numerictypes import test_array_instance
```



---
## test_abstract_type
```python
from test_numerictypes import test_abstract_type
```



---
## test_non_type
```python
from test_numerictypes import test_non_type
```



---
## test_platform_dependent_aliases
```python
from test_numerictypes import test_platform_dependent_aliases
```



---
## test_names_are_unique
```python
from test_numerictypes import test_names_are_unique
```



---
## test_names_reflect_attributes
```python
from test_numerictypes import test_names_reflect_attributes
```

Test that names correspond to where the type is under ``np.`` 

---
## test_names_are_undersood_by_dtype
```python
from test_numerictypes import test_names_are_undersood_by_dtype
```

Test the dtype constructor maps names back to the type 

---
## __name__
```python
from test_scalar_methods import __name__
```

Test the scalar constructors, which also do type-coercion

---
## TestAsIntegerRatio
```python
from test_scalar_methods import TestAsIntegerRatio
```



---
## TestIsInteger
```python
from test_scalar_methods import TestIsInteger
```



---
## TestClassGetItem
```python
from test_scalar_methods import TestClassGetItem
```



---
## TestBitCount
```python
from test_scalar_methods import TestBitCount
```



---
## test_small
```python
from test_scalar_methods import test_small
```



---
## test_simple_fractions
```python
from test_scalar_methods import test_simple_fractions
```



---
## test_errors
```python
from test_scalar_methods import test_errors
```



---
## test_against_known_values
```python
from test_scalar_methods import test_against_known_values
```



---
## test_roundtrip
```python
from test_scalar_methods import test_roundtrip
```



---
## test_special
```python
from test_scalar_methods import test_special
```



---
## test_true
```python
from test_scalar_methods import test_true
```



---
## test_false
```python
from test_scalar_methods import test_false
```



---
## test_abc
```python
from test_scalar_methods import test_abc
```



---
## test_abc_complexfloating
```python
from test_scalar_methods import test_abc_complexfloating
```



---
## test_abc_complexfloating_subscript_tuple
```python
from test_scalar_methods import test_abc_complexfloating_subscript_tuple
```



---
## test_abc_non_numeric
```python
from test_scalar_methods import test_abc_non_numeric
```



---
## test_concrete
```python
from test_scalar_methods import test_concrete
```



---
## test_subscript_tuple
```python
from test_scalar_methods import test_subscript_tuple
```



---
## test_subscript_scalar
```python
from test_scalar_methods import test_subscript_scalar
```



---
## test_bit_count
```python
from test_scalar_methods import test_bit_count
```



---
## __name__
```python
from test_scalarmath import __name__
```



---
## TestTypes
```python
from test_scalarmath import TestTypes
```



---
## check_ufunc_scalar_equivalence
```python
from test_scalarmath import check_ufunc_scalar_equivalence
```



---
## test_array_scalar_ufunc_equivalence
```python
from test_scalarmath import test_array_scalar_ufunc_equivalence
```

This is a thorough test attempting to cover important promotion paths
and ensuring that arrays and scalars stay as aligned as possible.
However, if it creates troubles, it should maybe just be removed.

---
## test_array_scalar_ufunc_dtypes
```python
from test_scalarmath import test_array_scalar_ufunc_dtypes
```



---
## test_int_float_promotion_truediv
```python
from test_scalarmath import test_int_float_promotion_truediv
```



---
## TestBaseMath
```python
from test_scalarmath import TestBaseMath
```



---
## TestPower
```python
from test_scalarmath import TestPower
```



---
## floordiv_and_mod
```python
from test_scalarmath import floordiv_and_mod
```



---
## _signs
```python
from test_scalarmath import _signs
```



---
## TestModulus
```python
from test_scalarmath import TestModulus
```



---
## TestComplexDivision
```python
from test_scalarmath import TestComplexDivision
```



---
## TestConversion
```python
from test_scalarmath import TestConversion
```



---
## TestRepr
```python
from test_scalarmath import TestRepr
```



---
## TestMultiply
```python
from test_scalarmath import TestMultiply
```



---
## TestNegative
```python
from test_scalarmath import TestNegative
```



---
## TestSubtract
```python
from test_scalarmath import TestSubtract
```



---
## TestAbs
```python
from test_scalarmath import TestAbs
```



---
## TestBitShifts
```python
from test_scalarmath import TestBitShifts
```



---
## TestHash
```python
from test_scalarmath import TestHash
```



---
## recursionlimit
```python
from test_scalarmath import recursionlimit
```



---
## test_operator_object_left
```python
from test_scalarmath import test_operator_object_left
```



---
## test_operator_object_right
```python
from test_scalarmath import test_operator_object_right
```



---
## test_operator_scalars
```python
from test_scalarmath import test_operator_scalars
```



---
## test_longdouble_inf_loop
```python
from test_scalarmath import test_longdouble_inf_loop
```



---
## test_clongdouble_inf_loop
```python
from test_scalarmath import test_clongdouble_inf_loop
```



---
## test_scalar_integer_operation_overflow
```python
from test_scalarmath import test_scalar_integer_operation_overflow
```



---
## test_scalar_signed_integer_overflow
```python
from test_scalarmath import test_scalar_signed_integer_overflow
```



---
## test_scalar_unsigned_integer_overflow
```python
from test_scalarmath import test_scalar_unsigned_integer_overflow
```



---
## test_scalar_integer_operation_divbyzero
```python
from test_scalarmath import test_scalar_integer_operation_divbyzero
```



---
## test_subclass_deferral
```python
from test_scalarmath import test_subclass_deferral
```

This test covers scalar subclass deferral.  Note that this is exceedingly
complicated, especially since it tends to fall back to the array paths and
these additionally add the "array priority" mechanism.

The behaviour was modified subtly in 1.22 (to make it closer to how Python
scalars work).  Due to its complexity and the fact that subclassing NumPy
scalars is probably a bad idea to begin with.  There is probably room
for adjustments here.

---
## test_longdouble_complex
```python
from test_scalarmath import test_longdouble_complex
```



---
## test_pyscalar_subclasses
```python
from test_scalarmath import test_pyscalar_subclasses
```



---
## test_types
```python
from test_scalarmath import test_types
```



---
## test_type_add
```python
from test_scalarmath import test_type_add
```



---
## test_type_create
```python
from test_scalarmath import test_type_create
```



---
## test_leak
```python
from test_scalarmath import test_leak
```



---
## test_blocked
```python
from test_scalarmath import test_blocked
```



---
## test_lower_align
```python
from test_scalarmath import test_lower_align
```



---
## test_small_types
```python
from test_scalarmath import test_small_types
```



---
## test_large_types
```python
from test_scalarmath import test_large_types
```



---
## test_integers_to_negative_integer_power
```python
from test_scalarmath import test_integers_to_negative_integer_power
```



---
## test_mixed_types
```python
from test_scalarmath import test_mixed_types
```



---
## test_modular_power
```python
from test_scalarmath import test_modular_power
```



---
## test_modulus_basic
```python
from test_scalarmath import test_modulus_basic
```



---
## test_float_modulus_exact
```python
from test_scalarmath import test_float_modulus_exact
```



---
## test_float_modulus_roundoff
```python
from test_scalarmath import test_float_modulus_roundoff
```



---
## test_float_modulus_corner_cases
```python
from test_scalarmath import test_float_modulus_corner_cases
```



---
## test_inplace_floordiv_handling
```python
from test_scalarmath import test_inplace_floordiv_handling
```



---
## test_zero_division
```python
from test_scalarmath import test_zero_division
```



---
## test_signed_zeros
```python
from test_scalarmath import test_signed_zeros
```



---
## test_branches
```python
from test_scalarmath import test_branches
```



---
## test_int_from_long
```python
from test_scalarmath import test_int_from_long
```



---
## test_iinfo_long_values
```python
from test_scalarmath import test_iinfo_long_values
```



---
## test_int_raise_behaviour
```python
from test_scalarmath import test_int_raise_behaviour
```



---
## test_int_from_infinite_longdouble
```python
from test_scalarmath import test_int_from_infinite_longdouble
```



---
## test_int_from_infinite_longdouble___int__
```python
from test_scalarmath import test_int_from_infinite_longdouble___int__
```



---
## test_int_from_huge_longdouble
```python
from test_scalarmath import test_int_from_huge_longdouble
```



---
## test_int_from_longdouble
```python
from test_scalarmath import test_int_from_longdouble
```



---
## test_numpy_scalar_relational_operators
```python
from test_scalarmath import test_numpy_scalar_relational_operators
```



---
## test_scalar_comparison_to_none
```python
from test_scalarmath import test_scalar_comparison_to_none
```



---
## _test_type_repr
```python
from test_scalarmath import _test_type_repr
```



---
## test_float_repr
```python
from test_scalarmath import test_float_repr
```



---
## TestSizeOf
```python
from test_scalarmath import TestSizeOf
```



---
## test_seq_repeat
```python
from test_scalarmath import test_seq_repeat
```



---
## test_no_seq_repeat_basic_array_like
```python
from test_scalarmath import test_no_seq_repeat_basic_array_like
```



---
## test_exceptions
```python
from test_scalarmath import test_exceptions
```



---
## test_result
```python
from test_scalarmath import test_result
```



---
## _test_abs_func
```python
from test_scalarmath import _test_abs_func
```



---
## test_builtin_abs
```python
from test_scalarmath import test_builtin_abs
```



---
## test_numpy_abs
```python
from test_scalarmath import test_numpy_abs
```



---
## test_shift_all_bits
```python
from test_scalarmath import test_shift_all_bits
```

Shifts where the shift amount is the width of the type or wider 

---
## test_integer_hashes
```python
from test_scalarmath import test_integer_hashes
```



---
## test_float_and_complex_hashes
```python
from test_scalarmath import test_float_and_complex_hashes
```



---
## test_complex_hashes
```python
from test_scalarmath import test_complex_hashes
```



---
## myf_simple1
```python
from test_scalarmath import myf_simple1
```



---
## myf_simple2
```python
from test_scalarmath import myf_simple2
```



---
## op_func
```python
from test_scalarmath import op_func
```



---
## rop_func
```python
from test_scalarmath import rop_func
```



---
## overflow_error_func
```python
from test_scalarmath import overflow_error_func
```



---
## test_equal_nbytes
```python
from test_scalarmath import test_equal_nbytes
```



---
## test_error
```python
from test_scalarmath import test_error
```



---
## ArrayLike
```python
from test_scalarmath import ArrayLike
```



---
## __init__
```python
from test_scalarmath import __init__
```



---
## __array__
```python
from test_scalarmath import __array__
```



---
## __name__
```python
from test_item_selection import __name__
```



---
## TestTake
```python
from test_item_selection import TestTake
```



---
## TestPutMask
```python
from test_item_selection import TestPutMask
```



---
## TestPut
```python
from test_item_selection import TestPut
```



---
## test_simple
```python
from test_item_selection import test_simple
```



---
## test_refcounting
```python
from test_item_selection import test_refcounting
```



---
## test_unicode_mode
```python
from test_item_selection import test_unicode_mode
```



---
## test_empty_partition
```python
from test_item_selection import test_empty_partition
```



---
## test_empty_argpartition
```python
from test_item_selection import test_empty_argpartition
```



---
## test_empty
```python
from test_item_selection import test_empty
```



---
## __name__
```python
from test_array_coercion import __name__
```

Tests for array coercion, mainly through testing `np.array` results directly.
Note that other such tests exist, e.g., in `test_api.py` and many corner-cases
are tested (sometimes indirectly) elsewhere.

---
## arraylikes
```python
from test_array_coercion import arraylikes
```

Generator for functions converting an array into various array-likes.
If full is True (default) it includes array-likes not capable of handling
all dtypes.

---
## scalar_instances
```python
from test_array_coercion import scalar_instances
```



---
## is_parametric_dtype
```python
from test_array_coercion import is_parametric_dtype
```

Returns True if the dtype is a parametric legacy dtype (itemsize
is 0, or a datetime without units)

---
## TestStringDiscovery
```python
from test_array_coercion import TestStringDiscovery
```



---
## TestScalarDiscovery
```python
from test_array_coercion import TestScalarDiscovery
```



---
## TestTimeScalars
```python
from test_array_coercion import TestTimeScalars
```



---
## TestNested
```python
from test_array_coercion import TestNested
```



---
## TestBadSequences
```python
from test_array_coercion import TestBadSequences
```



---
## TestArrayLikes
```python
from test_array_coercion import TestArrayLikes
```



---
## TestAsArray
```python
from test_array_coercion import TestAsArray
```

Test expected behaviors of ``asarray``.

---
## TestSpecialAttributeLookupFailure
```python
from test_array_coercion import TestSpecialAttributeLookupFailure
```



---
## test_subarray_from_array_construction
```python
from test_array_coercion import test_subarray_from_array_construction
```



---
## test_empty_string
```python
from test_array_coercion import test_empty_string
```



---
## ndarray
```python
from test_array_coercion import ndarray
```



---
## MyArr
```python
from test_array_coercion import MyArr
```



---
## subclass
```python
from test_array_coercion import subclass
```



---
## _SequenceLike
```python
from test_array_coercion import _SequenceLike
```



---
## ArrayDunder
```python
from test_array_coercion import ArrayDunder
```



---
## ArrayInterface
```python
from test_array_coercion import ArrayInterface
```



---
## ArrayStruct
```python
from test_array_coercion import ArrayStruct
```



---
## test_basic_stringlength
```python
from test_array_coercion import test_basic_stringlength
```



---
## test_nested_arrays_stringlength
```python
from test_array_coercion import test_nested_arrays_stringlength
```



---
## test_unpack_first_level
```python
from test_array_coercion import test_unpack_first_level
```



---
## test_void_special_case
```python
from test_array_coercion import test_void_special_case
```



---
## test_char_special_case
```python
from test_array_coercion import test_char_special_case
```



---
## test_char_special_case_deep
```python
from test_array_coercion import test_char_special_case_deep
```



---
## test_unknown_object
```python
from test_array_coercion import test_unknown_object
```



---
## test_scalar
```python
from test_array_coercion import test_scalar
```



---
## test_scalar_promotion
```python
from test_array_coercion import test_scalar_promotion
```



---
## test_scalar_coercion
```python
from test_array_coercion import test_scalar_coercion
```



---
## test_scalar_coercion_same_as_cast_and_assignment
```python
from test_array_coercion import test_scalar_coercion_same_as_cast_and_assignment
```

Test that in most cases:
   * `np.array(scalar, dtype=dtype)`
   * `np.empty((), dtype=dtype)[()] = scalar`
   * `np.array(scalar).astype(dtype)`
should behave the same.  The only exceptions are parametric dtypes
(mainly datetime/timedelta without unit) and void without fields.

---
## test_pyscalar_subclasses
```python
from test_array_coercion import test_pyscalar_subclasses
```

NumPy arrays are read/write which means that anything but invariant
behaviour is on thin ice.  However, we currently are happy to discover
subclasses of Python float, int, complex the same as the base classes.
This should potentially be deprecated.

---
## test_default_dtype_instance
```python
from test_array_coercion import test_default_dtype_instance
```



---
## test_scalar_to_int_coerce_does_not_cast
```python
from test_array_coercion import test_scalar_to_int_coerce_does_not_cast
```

Signed integers are currently different in that they do not cast other
NumPy scalar, but instead use scalar.__int__(). The hardcoded
exception to this rule is `np.array(scalar, dtype=integer)`.

---
## test_coercion_basic
```python
from test_array_coercion import test_coercion_basic
```



---
## test_coercion_timedelta_convert_to_number
```python
from test_array_coercion import test_coercion_timedelta_convert_to_number
```



---
## test_coercion_assignment_datetime
```python
from test_array_coercion import test_coercion_assignment_datetime
```



---
## test_coercion_assignment_timedelta
```python
from test_array_coercion import test_coercion_assignment_timedelta
```



---
## test_nested_simple
```python
from test_array_coercion import test_nested_simple
```



---
## test_pathological_self_containing
```python
from test_array_coercion import test_pathological_self_containing
```



---
## test_nested_arraylikes
```python
from test_array_coercion import test_nested_arraylikes
```



---
## test_uneven_depth_ragged
```python
from test_array_coercion import test_uneven_depth_ragged
```



---
## test_empty_sequence
```python
from test_array_coercion import test_empty_sequence
```



---
## test_array_of_different_depths
```python
from test_array_coercion import test_array_of_different_depths
```



---
## test_growing_list
```python
from test_array_coercion import test_growing_list
```



---
## test_mutated_list
```python
from test_array_coercion import test_mutated_list
```



---
## test_replace_0d_array
```python
from test_array_coercion import test_replace_0d_array
```



---
## test_0d_object_special_case
```python
from test_array_coercion import test_0d_object_special_case
```



---
## test_object_assignment_special_case
```python
from test_array_coercion import test_object_assignment_special_case
```



---
## test_0d_generic_special_case
```python
from test_array_coercion import test_0d_generic_special_case
```



---
## test_arraylike_classes
```python
from test_array_coercion import test_arraylike_classes
```



---
## test_too_large_array_error_paths
```python
from test_array_coercion import test_too_large_array_error_paths
```

Test the error paths, including for memory leaks

---
## test_bad_array_like_attributes
```python
from test_array_coercion import test_bad_array_like_attributes
```



---
## test_bad_array_like_bad_length
```python
from test_array_coercion import test_bad_array_like_bad_length
```



---
## test_dtype_identity
```python
from test_array_coercion import test_dtype_identity
```

Confirm the intended behavior for *dtype* kwarg.

The result of ``asarray()`` should have the dtype provided through the
keyword argument, when used. This forces unique array handles to be
produced for unique np.dtype objects, but (for equivalent dtypes), the
underlying data (the base object) is shared with the original array
object.

Ref https://github.com/numpy/numpy/issues/1468

---
## WeirdArrayLike
```python
from test_array_coercion import WeirdArrayLike
```



---
## WeirdArrayInterface
```python
from test_array_coercion import WeirdArrayInterface
```



---
## test_deprecated
```python
from test_array_coercion import test_deprecated
```



---
## __len__
```python
from test_array_coercion import __len__
```



---
## __getitem__
```python
from test_array_coercion import __getitem__
```



---
## __init__
```python
from test_array_coercion import __init__
```



---
## __array__
```python
from test_array_coercion import __array__
```



---
## MyScalar
```python
from test_array_coercion import MyScalar
```



---
## mylist
```python
from test_array_coercion import mylist
```



---
## baditem
```python
from test_array_coercion import baditem
```



---
## ArraySubclass
```python
from test_array_coercion import ArraySubclass
```



---
## ArrayLike
```python
from test_array_coercion import ArrayLike
```



---
## BadInterface
```python
from test_array_coercion import BadInterface
```



---
## BadSequence
```python
from test_array_coercion import BadSequence
```



---
## __array_interface__
```python
from test_array_coercion import __array_interface__
```



---
## __float__
```python
from test_array_coercion import __float__
```



---
## __array_struct__
```python
from test_array_coercion import __array_struct__
```



---
## __getattr__
```python
from test_array_coercion import __getattr__
```



---
## __name__
```python
from test_limited_api import __name__
```



---
## test_limited_api
```python
from test_limited_api import test_limited_api
```

Test building a third-party C extension with the limited API.

---
## __name__
```python
from test_casting_floatingpoint_errors import __name__
```



---
## values_and_dtypes
```python
from test_casting_floatingpoint_errors import values_and_dtypes
```

Generate value+dtype pairs that generate floating point errors during
casts.  The invalid casts to integers will generate "invalid" value
warnings, the float casts all generate "overflow".

(The Python int/float paths don't need to get tested in all the same
situations, but it does not hurt.)

---
## check_operations
```python
from test_casting_floatingpoint_errors import check_operations
```

There are many dedicated paths in NumPy which cast and should check for
floating point errors which occurred during those casts.

---
## test_floatingpoint_errors_casting
```python
from test_casting_floatingpoint_errors import test_floatingpoint_errors_casting
```



---
## copyto_scalar
```python
from test_casting_floatingpoint_errors import copyto_scalar
```



---
## copyto
```python
from test_casting_floatingpoint_errors import copyto
```



---
## copyto_scalar_masked
```python
from test_casting_floatingpoint_errors import copyto_scalar_masked
```



---
## copyto_masked
```python
from test_casting_floatingpoint_errors import copyto_masked
```



---
## direct_cast
```python
from test_casting_floatingpoint_errors import direct_cast
```



---
## direct_cast_nd_strided
```python
from test_casting_floatingpoint_errors import direct_cast_nd_strided
```



---
## boolean_array_assignment
```python
from test_casting_floatingpoint_errors import boolean_array_assignment
```



---
## integer_array_assignment
```python
from test_casting_floatingpoint_errors import integer_array_assignment
```



---
## integer_array_assignment_with_subspace
```python
from test_casting_floatingpoint_errors import integer_array_assignment_with_subspace
```



---
## flat_assignment
```python
from test_casting_floatingpoint_errors import flat_assignment
```



---
## assignment
```python
from test_casting_floatingpoint_errors import assignment
```



---
## fill
```python
from test_casting_floatingpoint_errors import fill
```



---
## __name__
```python
from test_machar import __name__
```

Test machar. Given recent changes to hardcode type data, we might want to get
rid of both MachAr and this test at some point.

---
## TestMachAr
```python
from test_machar import TestMachAr
```



---
## _run_machar_highprec
```python
from test_machar import _run_machar_highprec
```



---
## test_underlow
```python
from test_machar import test_underlow
```



---
## __name__
```python
from test_unicode import __name__
```



---
## buffer_length
```python
from test_unicode import buffer_length
```



---
## test_string_cast
```python
from test_unicode import test_string_cast
```



---
## CreateZeros
```python
from test_unicode import CreateZeros
```

Check the creation of zero-valued arrays

---
## TestCreateZeros_1
```python
from test_unicode import TestCreateZeros_1
```

Check the creation of zero-valued arrays (size 1)

---
## TestCreateZeros_2
```python
from test_unicode import TestCreateZeros_2
```

Check the creation of zero-valued arrays (size 2)

---
## TestCreateZeros_1009
```python
from test_unicode import TestCreateZeros_1009
```

Check the creation of zero-valued arrays (size 1009)

---
## CreateValues
```python
from test_unicode import CreateValues
```

Check the creation of unicode arrays with values

---
## TestCreateValues_1_UCS2
```python
from test_unicode import TestCreateValues_1_UCS2
```

Check the creation of valued arrays (size 1, UCS2 values)

---
## TestCreateValues_1_UCS4
```python
from test_unicode import TestCreateValues_1_UCS4
```

Check the creation of valued arrays (size 1, UCS4 values)

---
## TestCreateValues_2_UCS2
```python
from test_unicode import TestCreateValues_2_UCS2
```

Check the creation of valued arrays (size 2, UCS2 values)

---
## TestCreateValues_2_UCS4
```python
from test_unicode import TestCreateValues_2_UCS4
```

Check the creation of valued arrays (size 2, UCS4 values)

---
## TestCreateValues_1009_UCS2
```python
from test_unicode import TestCreateValues_1009_UCS2
```

Check the creation of valued arrays (size 1009, UCS2 values)

---
## TestCreateValues_1009_UCS4
```python
from test_unicode import TestCreateValues_1009_UCS4
```

Check the creation of valued arrays (size 1009, UCS4 values)

---
## AssignValues
```python
from test_unicode import AssignValues
```

Check the assignment of unicode arrays with values

---
## TestAssignValues_1_UCS2
```python
from test_unicode import TestAssignValues_1_UCS2
```

Check the assignment of valued arrays (size 1, UCS2 values)

---
## TestAssignValues_1_UCS4
```python
from test_unicode import TestAssignValues_1_UCS4
```

Check the assignment of valued arrays (size 1, UCS4 values)

---
## TestAssignValues_2_UCS2
```python
from test_unicode import TestAssignValues_2_UCS2
```

Check the assignment of valued arrays (size 2, UCS2 values)

---
## TestAssignValues_2_UCS4
```python
from test_unicode import TestAssignValues_2_UCS4
```

Check the assignment of valued arrays (size 2, UCS4 values)

---
## TestAssignValues_1009_UCS2
```python
from test_unicode import TestAssignValues_1009_UCS2
```

Check the assignment of valued arrays (size 1009, UCS2 values)

---
## TestAssignValues_1009_UCS4
```python
from test_unicode import TestAssignValues_1009_UCS4
```

Check the assignment of valued arrays (size 1009, UCS4 values)

---
## ByteorderValues
```python
from test_unicode import ByteorderValues
```

Check the byteorder of unicode arrays in round-trip conversions

---
## TestByteorder_1_UCS2
```python
from test_unicode import TestByteorder_1_UCS2
```

Check the byteorder in unicode (size 1, UCS2 values)

---
## TestByteorder_1_UCS4
```python
from test_unicode import TestByteorder_1_UCS4
```

Check the byteorder in unicode (size 1, UCS4 values)

---
## TestByteorder_2_UCS2
```python
from test_unicode import TestByteorder_2_UCS2
```

Check the byteorder in unicode (size 2, UCS2 values)

---
## TestByteorder_2_UCS4
```python
from test_unicode import TestByteorder_2_UCS4
```

Check the byteorder in unicode (size 2, UCS4 values)

---
## TestByteorder_1009_UCS2
```python
from test_unicode import TestByteorder_1009_UCS2
```

Check the byteorder in unicode (size 1009, UCS2 values)

---
## TestByteorder_1009_UCS4
```python
from test_unicode import TestByteorder_1009_UCS4
```

Check the byteorder in unicode (size 1009, UCS4 values)

---
## content_check
```python
from test_unicode import content_check
```



---
## test_zeros0D
```python
from test_unicode import test_zeros0D
```



---
## test_zerosSD
```python
from test_unicode import test_zerosSD
```



---
## test_zerosMD
```python
from test_unicode import test_zerosMD
```



---
## test_values0D
```python
from test_unicode import test_values0D
```



---
## test_valuesSD
```python
from test_unicode import test_valuesSD
```



---
## test_valuesMD
```python
from test_unicode import test_valuesMD
```



---
## test_values_cast
```python
from test_unicode import test_values_cast
```



---
## test_values_updowncast
```python
from test_unicode import test_values_updowncast
```



---
## __name__
```python
from test_cpu_dispatcher import __name__
```



---
## test_dispatcher
```python
from test_cpu_dispatcher import test_dispatcher
```

Testing the utilities of the CPU dispatcher

---
## __name__
```python
from test_arrayprint import __name__
```



---
## TestArrayRepr
```python
from test_arrayprint import TestArrayRepr
```



---
## TestComplexArray
```python
from test_arrayprint import TestComplexArray
```



---
## TestArray2String
```python
from test_arrayprint import TestArray2String
```



---
## TestPrintOptions
```python
from test_arrayprint import TestPrintOptions
```

Test getting and setting global print options.

---
## test_unicode_object_array
```python
from test_arrayprint import test_unicode_object_array
```



---
## TestContextManager
```python
from test_arrayprint import TestContextManager
```



---
## test_nan_inf
```python
from test_arrayprint import test_nan_inf
```



---
## test_subclass
```python
from test_arrayprint import test_subclass
```



---
## test_object_subclass
```python
from test_arrayprint import test_object_subclass
```



---
## test_0d_object_subclass
```python
from test_arrayprint import test_0d_object_subclass
```



---
## test_self_containing
```python
from test_arrayprint import test_self_containing
```



---
## test_containing_list
```python
from test_arrayprint import test_containing_list
```



---
## test_void_scalar_recursion
```python
from test_arrayprint import test_void_scalar_recursion
```



---
## test_fieldless_structured
```python
from test_arrayprint import test_fieldless_structured
```



---
## test_str
```python
from test_arrayprint import test_str
```



---
## test_basic
```python
from test_arrayprint import test_basic
```



---
## test_unexpected_kwarg
```python
from test_arrayprint import test_unexpected_kwarg
```



---
## test_format_function
```python
from test_arrayprint import test_format_function
```

Test custom format function for each element in array.

---
## test_structure_format_mixed
```python
from test_arrayprint import test_structure_format_mixed
```



---
## test_structure_format_int
```python
from test_arrayprint import test_structure_format_int
```



---
## test_structure_format_float
```python
from test_arrayprint import test_structure_format_float
```



---
## test_unstructured_void_repr
```python
from test_arrayprint import test_unstructured_void_repr
```



---
## test_edgeitems_kwarg
```python
from test_arrayprint import test_edgeitems_kwarg
```



---
## test_summarize_1d
```python
from test_arrayprint import test_summarize_1d
```



---
## test_summarize_2d
```python
from test_arrayprint import test_summarize_2d
```



---
## test_summarize_structure
```python
from test_arrayprint import test_summarize_structure
```



---
## test_linewidth
```python
from test_arrayprint import test_linewidth
```



---
## test_wide_element
```python
from test_arrayprint import test_wide_element
```



---
## test_multiline_repr
```python
from test_arrayprint import test_multiline_repr
```



---
## test_nested_array_repr
```python
from test_arrayprint import test_nested_array_repr
```



---
## test_any_text
```python
from test_arrayprint import test_any_text
```



---
## test_refcount
```python
from test_arrayprint import test_refcount
```



---
## setup_method
```python
from test_arrayprint import setup_method
```



---
## teardown_method
```python
from test_arrayprint import teardown_method
```



---
## test_precision_zero
```python
from test_arrayprint import test_precision_zero
```



---
## test_formatter
```python
from test_arrayprint import test_formatter
```



---
## test_formatter_reset
```python
from test_arrayprint import test_formatter_reset
```



---
## test_0d_arrays
```python
from test_arrayprint import test_0d_arrays
```



---
## test_float_spacing
```python
from test_arrayprint import test_float_spacing
```



---
## test_bool_spacing
```python
from test_arrayprint import test_bool_spacing
```



---
## test_sign_spacing
```python
from test_arrayprint import test_sign_spacing
```



---
## test_float_overflow_nowarn
```python
from test_arrayprint import test_float_overflow_nowarn
```



---
## test_sign_spacing_structured
```python
from test_arrayprint import test_sign_spacing_structured
```



---
## test_floatmode
```python
from test_arrayprint import test_floatmode
```



---
## test_legacy_mode_scalars
```python
from test_arrayprint import test_legacy_mode_scalars
```



---
## test_legacy_stray_comma
```python
from test_arrayprint import test_legacy_stray_comma
```



---
## test_dtype_linewidth_wrapping
```python
from test_arrayprint import test_dtype_linewidth_wrapping
```



---
## test_dtype_endianness_repr
```python
from test_arrayprint import test_dtype_endianness_repr
```

there was an issue where
repr(array([0], dtype='<u2')) and repr(array([0], dtype='>u2'))
both returned the same thing:
array([0], dtype=uint16)
even though their dtypes have different endianness.

---
## test_linewidth_repr
```python
from test_arrayprint import test_linewidth_repr
```



---
## test_linewidth_str
```python
from test_arrayprint import test_linewidth_str
```



---
## test_edgeitems
```python
from test_arrayprint import test_edgeitems
```



---
## test_edgeitems_structured
```python
from test_arrayprint import test_edgeitems_structured
```



---
## test_bad_args
```python
from test_arrayprint import test_bad_args
```



---
## test_ctx_mgr
```python
from test_arrayprint import test_ctx_mgr
```



---
## test_ctx_mgr_restores
```python
from test_arrayprint import test_ctx_mgr_restores
```



---
## test_ctx_mgr_exceptions
```python
from test_arrayprint import test_ctx_mgr_exceptions
```



---
## test_ctx_mgr_as_smth
```python
from test_arrayprint import test_ctx_mgr_as_smth
```



---
## sub
```python
from test_arrayprint import sub
```



---
## DuckCounter
```python
from test_arrayprint import DuckCounter
```



---
## _format_function
```python
from test_arrayprint import _format_function
```



---
## make_str
```python
from test_arrayprint import make_str
```



---
## MultiLine
```python
from test_arrayprint import MultiLine
```



---
## MultiLineLong
```python
from test_arrayprint import MultiLineLong
```



---
## __new__
```python
from test_arrayprint import __new__
```



---
## __getitem__
```python
from test_arrayprint import __getitem__
```



---
## to_string
```python
from test_arrayprint import to_string
```



---
## __str__
```python
from test_arrayprint import __str__
```



---
## __repr__
```python
from test_arrayprint import __repr__
```



---
## __name__
```python
from test_scalarbuffer import __name__
```

Test scalar buffer interface adheres to PEP 3118

---
## TestScalarPEP3118
```python
from test_scalarbuffer import TestScalarPEP3118
```



---
## test_scalar_match_array
```python
from test_scalarbuffer import test_scalar_match_array
```



---
## test_scalar_dim
```python
from test_scalarbuffer import test_scalar_dim
```



---
## test_scalar_code_and_properties
```python
from test_scalarbuffer import test_scalar_code_and_properties
```



---
## test_scalar_buffers_readonly
```python
from test_scalarbuffer import test_scalar_buffers_readonly
```



---
## test_void_scalar_structured_data
```python
from test_scalarbuffer import test_void_scalar_structured_data
```



---
## _as_dict
```python
from test_scalarbuffer import _as_dict
```



---
## test_datetime_memoryview
```python
from test_scalarbuffer import test_datetime_memoryview
```



---
## test_str_ucs4
```python
from test_scalarbuffer import test_str_ucs4
```



---
## test_user_scalar_fails_buffer
```python
from test_scalarbuffer import test_user_scalar_fails_buffer
```



---
## __name__
```python
from test_indexerrors import __name__
```



---
## TestIndexErrors
```python
from test_indexerrors import TestIndexErrors
```

Tests to exercise indexerrors not covered by other tests.

---
## test_arraytypes_fasttake
```python
from test_indexerrors import test_arraytypes_fasttake
```

take from a 0-length dimension

---
## test_take_from_object
```python
from test_indexerrors import test_take_from_object
```



---
## test_multiindex_exceptions
```python
from test_indexerrors import test_multiindex_exceptions
```



---
## test_put_exceptions
```python
from test_indexerrors import test_put_exceptions
```



---
## test_iterators_exceptions
```python
from test_indexerrors import test_iterators_exceptions
```

cases in iterators.c

---
## test_mapping
```python
from test_indexerrors import test_mapping
```

cases from mapping.c

---
## test_mapping_error_message
```python
from test_indexerrors import test_mapping_error_message
```



---
## test_methods
```python
from test_indexerrors import test_methods
```

cases from methods.c

---
## assign
```python
from test_indexerrors import assign
```



---
## __name__
```python
from test_print import __name__
```



---
## test_float_types
```python
from test_print import test_float_types
```

Check formatting.

This is only for the str function, and only for simple types.
The precision of np.float32 and np.longdouble aren't the same as the
python float precision.

---
## test_nan_inf_float
```python
from test_print import test_nan_inf_float
```

Check formatting of nan & inf.

This is only for the str function, and only for simple types.
The precision of np.float32 and np.longdouble aren't the same as the
python float precision.

---
## test_complex_types
```python
from test_print import test_complex_types
```

Check formatting of complex types.

This is only for the str function, and only for simple types.
The precision of np.float32 and np.longdouble aren't the same as the
python float precision.

---
## test_complex_inf_nan
```python
from test_print import test_complex_inf_nan
```

Check inf/nan formatting of complex types.

---
## _test_redirected_print
```python
from test_print import _test_redirected_print
```



---
## test_float_type_print
```python
from test_print import test_float_type_print
```

Check formatting when using print 

---
## test_complex_type_print
```python
from test_print import test_complex_type_print
```

Check formatting when using print 

---
## test_scalar_format
```python
from test_print import test_scalar_format
```

Test the str.format method with NumPy scalar types

---
## TestCommaDecimalPointLocale
```python
from test_print import TestCommaDecimalPointLocale
```



---
## test_locale_single
```python
from test_print import test_locale_single
```



---
## test_locale_double
```python
from test_print import test_locale_double
```



---
## test_locale_longdouble
```python
from test_print import test_locale_longdouble
```



---
## __name__
```python
from test_half import __name__
```



---
## assert_raises_fpe
```python
from test_half import assert_raises_fpe
```



---
## TestHalf
```python
from test_half import TestHalf
```



---
## setup_method
```python
from test_half import setup_method
```



---
## test_half_conversions
```python
from test_half import test_half_conversions
```

Checks that all 16-bit values survive conversion
to/from 32-bit and 64-bit float

---
## test_half_conversion_to_string
```python
from test_half import test_half_conversion_to_string
```



---
## test_half_conversion_from_string
```python
from test_half import test_half_conversion_from_string
```



---
## test_half_conversion_rounding
```python
from test_half import test_half_conversion_rounding
```



---
## test_half_conversion_denormal_round_even
```python
from test_half import test_half_conversion_denormal_round_even
```



---
## test_nans_infs
```python
from test_half import test_nans_infs
```



---
## test_half_values
```python
from test_half import test_half_values
```

Confirms a small number of known half values

---
## test_half_rounding
```python
from test_half import test_half_rounding
```

Checks that rounding when converting to half is correct

---
## test_half_correctness
```python
from test_half import test_half_correctness
```

Take every finite float16, and check the casting functions with
a manual conversion.

---
## test_half_ordering
```python
from test_half import test_half_ordering
```

Make sure comparisons are working right

---
## test_half_funcs
```python
from test_half import test_half_funcs
```

Test the various ArrFuncs

---
## test_spacing_nextafter
```python
from test_half import test_spacing_nextafter
```

Test np.spacing and np.nextafter

---
## test_half_ufuncs
```python
from test_half import test_half_ufuncs
```

Test the various ufuncs

---
## test_half_coercion
```python
from test_half import test_half_coercion
```

Test that half gets coerced properly with the other types

---
## test_half_fpe
```python
from test_half import test_half_fpe
```



---
## test_half_array_interface
```python
from test_half import test_half_array_interface
```

Test that half is compatible with __array_interface__

---
## Dummy
```python
from test_half import Dummy
```



---
## __name__
```python
from test_arraymethod import __name__
```

This file tests the generic aspects of ArrayMethod.  At the time of writing
this is private API, but when added, public API may be added here.

---
## TestResolveDescriptors
```python
from test_arraymethod import TestResolveDescriptors
```



---
## TestSimpleStridedCall
```python
from test_arraymethod import TestSimpleStridedCall
```



---
## TestClassGetItem
```python
from test_arraymethod import TestClassGetItem
```



---
## test_invalid_arguments
```python
from test_arraymethod import test_invalid_arguments
```



---
## test_class_getitem
```python
from test_arraymethod import test_class_getitem
```

Test `ndarray.__class_getitem__`.

---
## test_subscript_tup
```python
from test_arraymethod import test_subscript_tup
```



---
## __name__
```python
from test_mem_overlap import __name__
```



---
## _indices_for_nelems
```python
from test_mem_overlap import _indices_for_nelems
```

Returns slices of length nelems, from start onwards, in direction sign.

---
## _indices_for_axis
```python
from test_mem_overlap import _indices_for_axis
```

Returns (src, dst) pairs of indices.

---
## _indices
```python
from test_mem_overlap import _indices
```

Returns ((axis0_src, axis0_dst), (axis1_src, axis1_dst), ... ) index pairs.

---
## _check_assignment
```python
from test_mem_overlap import _check_assignment
```

Check assignment arr[dstidx] = arr[srcidx] works.

---
## test_overlapping_assignments
```python
from test_mem_overlap import test_overlapping_assignments
```



---
## test_diophantine_fuzz
```python
from test_mem_overlap import test_diophantine_fuzz
```



---
## test_diophantine_overflow
```python
from test_mem_overlap import test_diophantine_overflow
```



---
## check_may_share_memory_exact
```python
from test_mem_overlap import check_may_share_memory_exact
```



---
## test_may_share_memory_manual
```python
from test_mem_overlap import test_may_share_memory_manual
```



---
## iter_random_view_pairs
```python
from test_mem_overlap import iter_random_view_pairs
```



---
## check_may_share_memory_easy_fuzz
```python
from test_mem_overlap import check_may_share_memory_easy_fuzz
```



---
## test_may_share_memory_easy_fuzz
```python
from test_mem_overlap import test_may_share_memory_easy_fuzz
```



---
## test_may_share_memory_harder_fuzz
```python
from test_mem_overlap import test_may_share_memory_harder_fuzz
```



---
## test_shares_memory_api
```python
from test_mem_overlap import test_shares_memory_api
```



---
## test_may_share_memory_bad_max_work
```python
from test_mem_overlap import test_may_share_memory_bad_max_work
```



---
## test_internal_overlap_diophantine
```python
from test_mem_overlap import test_internal_overlap_diophantine
```



---
## test_internal_overlap_slices
```python
from test_mem_overlap import test_internal_overlap_slices
```



---
## check_internal_overlap
```python
from test_mem_overlap import check_internal_overlap
```



---
## test_internal_overlap_manual
```python
from test_mem_overlap import test_internal_overlap_manual
```



---
## test_internal_overlap_fuzz
```python
from test_mem_overlap import test_internal_overlap_fuzz
```



---
## test_non_ndarray_inputs
```python
from test_mem_overlap import test_non_ndarray_inputs
```



---
## view_element_first_byte
```python
from test_mem_overlap import view_element_first_byte
```

Construct an array viewing the first byte of each element of `x`

---
## assert_copy_equivalent
```python
from test_mem_overlap import assert_copy_equivalent
```

Check that operation(*args, out=out) produces results
equivalent to out[...] = operation(*args, out=out.copy())

---
## TestUFunc
```python
from test_mem_overlap import TestUFunc
```

Test ufunc call memory overlap handling

---
## random_slice
```python
from test_mem_overlap import random_slice
```



---
## random_slice_fixed_size
```python
from test_mem_overlap import random_slice_fixed_size
```



---
## check
```python
from test_mem_overlap import check
```



---
## MyArray
```python
from test_mem_overlap import MyArray
```



---
## MyArray2
```python
from test_mem_overlap import MyArray2
```



---
## check_unary_fuzz
```python
from test_mem_overlap import check_unary_fuzz
```



---
## test_unary_ufunc_call_fuzz
```python
from test_mem_overlap import test_unary_ufunc_call_fuzz
```



---
## test_unary_ufunc_call_complex_fuzz
```python
from test_mem_overlap import test_unary_ufunc_call_complex_fuzz
```



---
## test_binary_ufunc_accumulate_fuzz
```python
from test_mem_overlap import test_binary_ufunc_accumulate_fuzz
```



---
## test_binary_ufunc_reduce_fuzz
```python
from test_mem_overlap import test_binary_ufunc_reduce_fuzz
```



---
## test_binary_ufunc_reduceat_fuzz
```python
from test_mem_overlap import test_binary_ufunc_reduceat_fuzz
```



---
## test_binary_ufunc_reduceat_manual
```python
from test_mem_overlap import test_binary_ufunc_reduceat_manual
```



---
## test_unary_gufunc_fuzz
```python
from test_mem_overlap import test_unary_gufunc_fuzz
```



---
## test_ufunc_at_manual
```python
from test_mem_overlap import test_ufunc_at_manual
```



---
## test_unary_ufunc_1d_manual
```python
from test_mem_overlap import test_unary_ufunc_1d_manual
```



---
## test_unary_ufunc_where_same
```python
from test_mem_overlap import test_unary_ufunc_where_same
```



---
## test_binary_ufunc_1d_manual
```python
from test_mem_overlap import test_binary_ufunc_1d_manual
```



---
## test_inplace_op_simple_manual
```python
from test_mem_overlap import test_inplace_op_simple_manual
```



---
## __init__
```python
from test_mem_overlap import __init__
```



---
## __array_interface__
```python
from test_mem_overlap import __array_interface__
```



---
## __array__
```python
from test_mem_overlap import __array__
```



---
## get_out_axis_size
```python
from test_mem_overlap import get_out_axis_size
```



---
## do_reduceat
```python
from test_mem_overlap import do_reduceat
```



---
## __name__
```python
from test_shape_base import __name__
```



---
## TestAtleast1d
```python
from test_shape_base import TestAtleast1d
```



---
## TestAtleast2d
```python
from test_shape_base import TestAtleast2d
```



---
## TestAtleast3d
```python
from test_shape_base import TestAtleast3d
```



---
## TestHstack
```python
from test_shape_base import TestHstack
```



---
## TestVstack
```python
from test_shape_base import TestVstack
```



---
## TestConcatenate
```python
from test_shape_base import TestConcatenate
```



---
## test_stack
```python
from test_shape_base import test_stack
```



---
## test_stack_out_and_dtype
```python
from test_shape_base import test_stack_out_and_dtype
```



---
## TestBlock
```python
from test_shape_base import TestBlock
```



---
## test_block_dispatcher
```python
from test_shape_base import test_block_dispatcher
```



---
## test_0D_array
```python
from test_shape_base import test_0D_array
```



---
## test_1D_array
```python
from test_shape_base import test_1D_array
```



---
## test_2D_array
```python
from test_shape_base import test_2D_array
```



---
## test_3D_array
```python
from test_shape_base import test_3D_array
```



---
## test_r1array
```python
from test_shape_base import test_r1array
```

Test to make sure equivalent Travis O's r1array function
        

---
## test_r2array
```python
from test_shape_base import test_r2array
```

Test to make sure equivalent Travis O's r2array function
        

---
## test_non_iterable
```python
from test_shape_base import test_non_iterable
```



---
## test_empty_input
```python
from test_shape_base import test_empty_input
```



---
## test_generator
```python
from test_shape_base import test_generator
```



---
## test_casting_and_dtype
```python
from test_shape_base import test_casting_and_dtype
```



---
## test_casting_and_dtype_type_error
```python
from test_shape_base import test_casting_and_dtype_type_error
```



---
## test_2D_array2
```python
from test_shape_base import test_2D_array2
```



---
## test_returns_copy
```python
from test_shape_base import test_returns_copy
```



---
## test_exceptions
```python
from test_shape_base import test_exceptions
```



---
## test_concatenate_axis_None
```python
from test_shape_base import test_concatenate_axis_None
```



---
## test_large_concatenate_axis_None
```python
from test_shape_base import test_large_concatenate_axis_None
```



---
## test_concatenate
```python
from test_shape_base import test_concatenate
```



---
## test_operator_concat
```python
from test_shape_base import test_operator_concat
```



---
## test_bad_out_shape
```python
from test_shape_base import test_bad_out_shape
```



---
## test_out_and_dtype
```python
from test_shape_base import test_out_and_dtype
```



---
## test_dtype_with_promotion
```python
from test_shape_base import test_dtype_with_promotion
```



---
## test_string_dtype_does_not_inspect
```python
from test_shape_base import test_string_dtype_does_not_inspect
```



---
## test_subarray_error
```python
from test_shape_base import test_subarray_error
```



---
## block
```python
from test_shape_base import block
```



---
## test_block_total_size_estimate
```python
from test_shape_base import test_block_total_size_estimate
```



---
## test_block_simple_row_wise
```python
from test_shape_base import test_block_simple_row_wise
```



---
## test_block_simple_column_wise
```python
from test_shape_base import test_block_simple_column_wise
```



---
## test_block_with_1d_arrays_row_wise
```python
from test_shape_base import test_block_with_1d_arrays_row_wise
```



---
## test_block_with_1d_arrays_multiple_rows
```python
from test_shape_base import test_block_with_1d_arrays_multiple_rows
```



---
## test_block_with_1d_arrays_column_wise
```python
from test_shape_base import test_block_with_1d_arrays_column_wise
```



---
## test_block_mixed_1d_and_2d
```python
from test_shape_base import test_block_mixed_1d_and_2d
```



---
## test_block_complicated
```python
from test_shape_base import test_block_complicated
```



---
## test_nested
```python
from test_shape_base import test_nested
```



---
## test_3d
```python
from test_shape_base import test_3d
```



---
## test_block_with_mismatched_shape
```python
from test_shape_base import test_block_with_mismatched_shape
```



---
## test_no_lists
```python
from test_shape_base import test_no_lists
```



---
## test_invalid_nesting
```python
from test_shape_base import test_invalid_nesting
```



---
## test_empty_lists
```python
from test_shape_base import test_empty_lists
```



---
## test_tuple
```python
from test_shape_base import test_tuple
```



---
## test_different_ndims
```python
from test_shape_base import test_different_ndims
```



---
## test_different_ndims_depths
```python
from test_shape_base import test_different_ndims_depths
```



---
## test_block_memory_order
```python
from test_shape_base import test_block_memory_order
```



---
## ArrayLike
```python
from test_shape_base import ArrayLike
```



---
## _block_force_concatenate
```python
from test_shape_base import _block_force_concatenate
```



---
## _block_force_slicing
```python
from test_shape_base import _block_force_slicing
```



---
## __name__
```python
from test_hashtable import __name__
```



---
## test_identity_hashtable
```python
from test_hashtable import test_identity_hashtable
```



---
## __name__
```python
from test_array_interface import __name__
```



---
## get_module
```python
from test_array_interface import get_module
```

Some codes to generate data and manage temporary buffers use when
sharing with numpy via the array interface protocol.

---
## test_cstruct
```python
from test_array_interface import test_cstruct
```



---
## data_source
```python
from test_array_interface import data_source
```

This class is for testing the timing of the PyCapsule destructor
invoked when numpy release its reference to the shared data as part of
the numpy array interface protocol. If the PyCapsule destructor is
called early the shared data is freed and invalid memory accesses will
occur.

---
## __init__
```python
from test_array_interface import __init__
```



---
## __array_struct__
```python
from test_array_interface import __array_struct__
```



---
## __name__
```python
from test_deprecations import __name__
```



---
## _DeprecationTestCase
```python
from test_deprecations import _DeprecationTestCase
```



---
## _VisibleDeprecationTestCase
```python
from test_deprecations import _VisibleDeprecationTestCase
```



---
## TestDatetime64Timezone
```python
from test_deprecations import TestDatetime64Timezone
```

Parsing of datetime64 with timezones deprecated in 1.11.0, because
datetime64 is now timezone naive rather than UTC only.

It will be quite a while before we can remove this, because, at the very
least, a lot of existing code uses the 'Z' modifier to avoid conversion
from local time to UTC, even if otherwise it handles time in a timezone
naive fashion.

---
## TestArrayDataAttributeAssignmentDeprecation
```python
from test_deprecations import TestArrayDataAttributeAssignmentDeprecation
```

Assigning the 'data' attribute of an ndarray is unsafe as pointed
out in gh-7093. Eventually, such assignment should NOT be allowed, but
in the interests of maintaining backwards compatibility, only a Deprecation-
Warning will be raised instead for the time being to give developers time to
refactor relevant code.

---
## TestBinaryReprInsufficientWidthParameterForRepresentation
```python
from test_deprecations import TestBinaryReprInsufficientWidthParameterForRepresentation
```

If a 'width' parameter is passed into ``binary_repr`` that is insufficient to
represent the number in base 2 (positive) or 2's complement (negative) form,
the function used to silently ignore the parameter and return a representation
using the minimal number of bits needed for the form in question. Such behavior
is now considered unsafe from a user perspective and will raise an error in the future.

---
## TestDTypeAttributeIsDTypeDeprecation
```python
from test_deprecations import TestDTypeAttributeIsDTypeDeprecation
```



---
## TestTestDeprecated
```python
from test_deprecations import TestTestDeprecated
```



---
## TestNonNumericConjugate
```python
from test_deprecations import TestNonNumericConjugate
```

Deprecate no-op behavior of ndarray.conjugate on non-numeric dtypes,
which conflicts with the error behavior of np.conjugate.

---
## TestNPY_CHAR
```python
from test_deprecations import TestNPY_CHAR
```



---
## TestPyArray_AS1D
```python
from test_deprecations import TestPyArray_AS1D
```



---
## TestPyArray_AS2D
```python
from test_deprecations import TestPyArray_AS2D
```



---
## TestDatetimeEvent
```python
from test_deprecations import TestDatetimeEvent
```



---
## TestTruthTestingEmptyArrays
```python
from test_deprecations import TestTruthTestingEmptyArrays
```



---
## TestBincount
```python
from test_deprecations import TestBincount
```



---
## TestGeneratorSum
```python
from test_deprecations import TestGeneratorSum
```



---
## TestFromstring
```python
from test_deprecations import TestFromstring
```



---
## TestFromStringAndFileInvalidData
```python
from test_deprecations import TestFromStringAndFileInvalidData
```



---
## Test_GetSet_NumericOps
```python
from test_deprecations import Test_GetSet_NumericOps
```



---
## TestShape1Fields
```python
from test_deprecations import TestShape1Fields
```



---
## TestNonZero
```python
from test_deprecations import TestNonZero
```



---
## TestToString
```python
from test_deprecations import TestToString
```



---
## TestDTypeCoercion
```python
from test_deprecations import TestDTypeCoercion
```



---
## BuiltInRoundComplexDType
```python
from test_deprecations import BuiltInRoundComplexDType
```



---
## TestIncorrectAdvancedIndexWithEmptyResult
```python
from test_deprecations import TestIncorrectAdvancedIndexWithEmptyResult
```



---
## TestNonExactMatchDeprecation
```python
from test_deprecations import TestNonExactMatchDeprecation
```



---
## TestMatrixInOuter
```python
from test_deprecations import TestMatrixInOuter
```



---
## FlatteningConcatenateUnsafeCast
```python
from test_deprecations import FlatteningConcatenateUnsafeCast
```



---
## TestDeprecatedUnpickleObjectScalar
```python
from test_deprecations import TestDeprecatedUnpickleObjectScalar
```

Technically, it should be impossible to create numpy object scalars,
but there was an unpickle path that would in theory allow it. That
path is invalid and must lead to the warning.

---
## TestSingleElementSignature
```python
from test_deprecations import TestSingleElementSignature
```



---
## TestCtypesGetter
```python
from test_deprecations import TestCtypesGetter
```



---
## TestPartitionBoolIndex
```python
from test_deprecations import TestPartitionBoolIndex
```



---
## TestMachAr
```python
from test_deprecations import TestMachAr
```



---
## TestQuantileInterpolationDeprecation
```python
from test_deprecations import TestQuantileInterpolationDeprecation
```



---
## TestMemEventHook
```python
from test_deprecations import TestMemEventHook
```



---
## TestArrayFinalizeNone
```python
from test_deprecations import TestArrayFinalizeNone
```



---
## TestAxisNotMAXDIMS
```python
from test_deprecations import TestAxisNotMAXDIMS
```



---
## TestLoadtxtParseIntsViaFloat
```python
from test_deprecations import TestLoadtxtParseIntsViaFloat
```



---
## TestScalarConversion
```python
from test_deprecations import TestScalarConversion
```



---
## TestPyIntConversion
```python
from test_deprecations import TestPyIntConversion
```



---
## TestDeprecatedGlobals
```python
from test_deprecations import TestDeprecatedGlobals
```



---
## test_future_scalar_attributes
```python
from test_deprecations import test_future_scalar_attributes
```



---
## TestRemovedGlobals
```python
from test_deprecations import TestRemovedGlobals
```



---
## TestDeprecatedFinfo
```python
from test_deprecations import TestDeprecatedFinfo
```



---
## TestFromnumeric
```python
from test_deprecations import TestFromnumeric
```



---
## TestMathAlias
```python
from test_deprecations import TestMathAlias
```



---
## setup_method
```python
from test_deprecations import setup_method
```



---
## teardown_method
```python
from test_deprecations import teardown_method
```



---
## assert_deprecated
```python
from test_deprecations import assert_deprecated
```

Test if DeprecationWarnings are given and raised.

This first checks if the function when called gives `num`
DeprecationWarnings, after that it tries to raise these
DeprecationWarnings and compares them with `exceptions`.
The exceptions can be different for cases where this code path
is simply not anticipated and the exception is replaced.

Parameters
----------
function : callable
    The function to test
num : int
    Number of DeprecationWarnings to expect. This should normally be 1.
ignore_others : bool
    Whether warnings of the wrong type should be ignored (note that
    the message is not checked)
function_fails : bool
    If the function would normally fail, setting this will check for
    warnings inside a try/except block.
exceptions : Exception or tuple of Exceptions
    Exception to expect when turning the warnings into an error.
    The default checks for DeprecationWarnings. If exceptions is
    empty the function is expected to run successfully.
args : tuple
    Arguments for `function`
kwargs : dict
    Keyword arguments for `function`

---
## assert_not_deprecated
```python
from test_deprecations import assert_not_deprecated
```

Test that warnings are not raised.

This is just a shorthand for:

self.assert_deprecated(function, num=0, ignore_others=True,
                exceptions=tuple(), args=args, kwargs=kwargs)

---
## test_string
```python
from test_deprecations import test_string
```



---
## test_datetime
```python
from test_deprecations import test_datetime
```



---
## test_data_attr_assignment
```python
from test_deprecations import test_data_attr_assignment
```



---
## test_insufficient_width_positive
```python
from test_deprecations import test_insufficient_width_positive
```



---
## test_insufficient_width_negative
```python
from test_deprecations import test_insufficient_width_negative
```



---
## test_deprecation_dtype_attribute_is_dtype
```python
from test_deprecations import test_deprecation_dtype_attribute_is_dtype
```



---
## test_assert_deprecated
```python
from test_deprecations import test_assert_deprecated
```



---
## test_conjugate
```python
from test_deprecations import test_conjugate
```



---
## test_npy_char_deprecation
```python
from test_deprecations import test_npy_char_deprecation
```



---
## test_npy_pyarrayas1d_deprecation
```python
from test_deprecations import test_npy_pyarrayas1d_deprecation
```



---
## test_npy_pyarrayas2d_deprecation
```python
from test_deprecations import test_npy_pyarrayas2d_deprecation
```



---
## test_3_tuple
```python
from test_deprecations import test_3_tuple
```



---
## test_1d
```python
from test_deprecations import test_1d
```



---
## test_2d
```python
from test_deprecations import test_2d
```



---
## test_bincount_minlength
```python
from test_deprecations import test_bincount_minlength
```



---
## test_generator_sum
```python
from test_deprecations import test_generator_sum
```



---
## test_fromstring
```python
from test_deprecations import test_fromstring
```



---
## test_deprecate_unparsable_data_file
```python
from test_deprecations import test_deprecate_unparsable_data_file
```



---
## test_deprecate_unparsable_string
```python
from test_deprecations import test_deprecate_unparsable_string
```



---
## test_get_numeric_ops
```python
from test_deprecations import test_get_numeric_ops
```



---
## test_shape_1_fields
```python
from test_deprecations import test_shape_1_fields
```



---
## test_zerod
```python
from test_deprecations import test_zerod
```



---
## test_tostring
```python
from test_deprecations import test_tostring
```



---
## test_tostring_matches_tobytes
```python
from test_deprecations import test_tostring_matches_tobytes
```



---
## test_dtype_coercion
```python
from test_deprecations import test_dtype_coercion
```



---
## test_array_construction
```python
from test_deprecations import test_array_construction
```



---
## test_not_deprecated
```python
from test_deprecations import test_not_deprecated
```



---
## test_deprecated
```python
from test_deprecations import test_deprecated
```



---
## test_empty_subspace
```python
from test_deprecations import test_empty_subspace
```



---
## test_empty_index_broadcast_not_deprecated
```python
from test_deprecations import test_empty_index_broadcast_not_deprecated
```



---
## test_non_exact_match
```python
from test_deprecations import test_non_exact_match
```



---
## test_deprecated_module
```python
from test_deprecations import test_deprecated_module
```



---
## test_both_passed
```python
from test_deprecations import test_both_passed
```



---
## test_mem_seteventhook
```python
from test_deprecations import test_mem_seteventhook
```



---
## test_use_none_is_deprecated
```python
from test_deprecations import test_use_none_is_deprecated
```



---
## test_deprecated_warning
```python
from test_deprecations import test_deprecated_warning
```



---
## test_deprecated_raised
```python
from test_deprecations import test_deprecated_raised
```



---
## test_float_conversion
```python
from test_deprecations import test_float_conversion
```



---
## test_behaviour
```python
from test_deprecations import test_behaviour
```



---
## test_deprecated_scalar
```python
from test_deprecations import test_deprecated_scalar
```



---
## test_type_aliases
```python
from test_deprecations import test_type_aliases
```



---
## test_attributeerror_includes_info
```python
from test_deprecations import test_attributeerror_includes_info
```



---
## test_deprecated_none
```python
from test_deprecations import test_deprecated_none
```



---
## test_round_
```python
from test_deprecations import test_round_
```



---
## test_cumproduct
```python
from test_deprecations import test_cumproduct
```



---
## test_product
```python
from test_deprecations import test_product
```



---
## test_sometrue
```python
from test_deprecations import test_sometrue
```



---
## test_alltrue
```python
from test_deprecations import test_alltrue
```



---
## test_deprecated_np_math
```python
from test_deprecations import test_deprecated_np_math
```



---
## test_deprecated_np_lib_math
```python
from test_deprecations import test_deprecated_np_lib_math
```



---
## dt
```python
from test_deprecations import dt
```



---
## vdt
```python
from test_deprecations import vdt
```



---
## foo
```python
from test_deprecations import foo
```



---
## NoFinalize
```python
from test_deprecations import NoFinalize
```



---
## scalar
```python
from test_deprecations import scalar
```



---
## assign
```python
from test_deprecations import assign
```



---
## create
```python
from test_deprecations import create
```



---
## __name__
```python
from test_errstate import __name__
```



---
## TestErrstate
```python
from test_errstate import TestErrstate
```



---
## test_invalid
```python
from test_errstate import test_invalid
```



---
## test_divide
```python
from test_errstate import test_divide
```



---
## test_errcall
```python
from test_errstate import test_errcall
```



---
## test_errstate_decorator
```python
from test_errstate import test_errstate_decorator
```



---
## foo
```python
from test_errstate import foo
```



---
## __name__
```python
from test_nep50_promotions import __name__
```

This file adds basic tests to test the NEP 50 style promotion compatibility
mode.  Most of these test are likely to be simply deleted again once NEP 50
is adopted in the main test suite.  A few may be moved elsewhere.

---
## _weak_promotion_enabled
```python
from test_nep50_promotions import _weak_promotion_enabled
```



---
## test_nep50_examples
```python
from test_nep50_promotions import test_nep50_examples
```



---
## test_nep50_weak_integers
```python
from test_nep50_promotions import test_nep50_weak_integers
```



---
## test_nep50_weak_integers_with_inexact
```python
from test_nep50_promotions import test_nep50_weak_integers_with_inexact
```



---
## test_weak_promotion_scalar_path
```python
from test_nep50_promotions import test_weak_promotion_scalar_path
```



---
## test_nep50_complex_promotion
```python
from test_nep50_promotions import test_nep50_complex_promotion
```



---
## test_nep50_integer_conversion_errors
```python
from test_nep50_promotions import test_nep50_integer_conversion_errors
```



---
## test_nep50_integer_regression
```python
from test_nep50_promotions import test_nep50_integer_regression
```



---
## test_nep50_with_axisconcatenator
```python
from test_nep50_promotions import test_nep50_with_axisconcatenator
```



---
## test_nep50_huge_integers
```python
from test_nep50_promotions import test_nep50_huge_integers
```



---
## test_nep50_in_concat_and_choose
```python
from test_nep50_promotions import test_nep50_in_concat_and_choose
```



---
## __name__
```python
from test_records import __name__
```



---
## TestFromrecords
```python
from test_records import TestFromrecords
```



---
## TestPathUsage
```python
from test_records import TestPathUsage
```



---
## TestRecord
```python
from test_records import TestRecord
```



---
## test_find_duplicate
```python
from test_records import test_find_duplicate
```



---
## test_fromrecords
```python
from test_records import test_fromrecords
```



---
## test_fromrecords_0len
```python
from test_records import test_fromrecords_0len
```

Verify fromrecords works with a 0-length input 

---
## test_fromrecords_2d
```python
from test_records import test_fromrecords_2d
```



---
## test_method_array
```python
from test_records import test_method_array
```



---
## test_method_array2
```python
from test_records import test_method_array2
```



---
## test_recarray_slices
```python
from test_records import test_recarray_slices
```



---
## test_recarray_fromarrays
```python
from test_records import test_recarray_fromarrays
```



---
## test_recarray_fromfile
```python
from test_records import test_recarray_fromfile
```



---
## test_recarray_from_obj
```python
from test_records import test_recarray_from_obj
```



---
## test_recarray_repr
```python
from test_records import test_recarray_repr
```



---
## test_0d_recarray_repr
```python
from test_records import test_0d_recarray_repr
```



---
## test_recarray_from_repr
```python
from test_records import test_recarray_from_repr
```



---
## test_recarray_views
```python
from test_records import test_recarray_views
```



---
## test_recarray_from_names
```python
from test_records import test_recarray_from_names
```



---
## test_recarray_conflict_fields
```python
from test_records import test_recarray_conflict_fields
```



---
## test_fromrecords_with_explicit_dtype
```python
from test_records import test_fromrecords_with_explicit_dtype
```



---
## test_recarray_stringtypes
```python
from test_records import test_recarray_stringtypes
```



---
## test_recarray_returntypes
```python
from test_records import test_recarray_returntypes
```



---
## test_zero_width_strings
```python
from test_records import test_zero_width_strings
```



---
## test_tofile_fromfile
```python
from test_records import test_tofile_fromfile
```



---
## setup_method
```python
from test_records import setup_method
```



---
## test_assignment1
```python
from test_records import test_assignment1
```



---
## test_assignment2
```python
from test_records import test_assignment2
```



---
## test_invalid_assignment
```python
from test_records import test_invalid_assignment
```



---
## test_nonwriteable_setfield
```python
from test_records import test_nonwriteable_setfield
```



---
## test_out_of_order_fields
```python
from test_records import test_out_of_order_fields
```



---
## test_pickle_1
```python
from test_records import test_pickle_1
```



---
## test_pickle_2
```python
from test_records import test_pickle_2
```



---
## test_pickle_3
```python
from test_records import test_pickle_3
```



---
## test_pickle_void
```python
from test_records import test_pickle_void
```



---
## test_objview_record
```python
from test_records import test_objview_record
```



---
## test_record_scalar_setitem
```python
from test_records import test_record_scalar_setitem
```



---
## test_missing_field
```python
from test_records import test_missing_field
```



---
## test_fromarrays_nested_structured_arrays
```python
from test_records import test_fromarrays_nested_structured_arrays
```



---
## test_assign_dtype_attribute
```python
from test_records import test_assign_dtype_attribute
```



---
## test_nested_fields_are_records
```python
from test_records import test_nested_fields_are_records
```

Test that nested structured types are treated as records too 

---
## test_nested_dtype_padding
```python
from test_records import test_nested_dtype_padding
```

test that trailing padding is preserved 

---
## C
```python
from test_records import C
```



---
## assign_invalid_column
```python
from test_records import assign_invalid_column
```



---
## __name__
```python
from test_mem_policy import __name__
```



---
## get_module
```python
from test_mem_policy import get_module
```

Add a memory policy that returns a false pointer 64 bytes into the
actual allocation, and fill the prefix with some text. Then check at each
memory manipulation that the prefix exists, to make sure all alloc/realloc/
free/calloc go via the functions here.

---
## test_set_policy
```python
from test_mem_policy import test_set_policy
```



---
## test_default_policy_singleton
```python
from test_mem_policy import test_default_policy_singleton
```



---
## test_policy_propagation
```python
from test_mem_policy import test_policy_propagation
```



---
## test_context_locality
```python
from test_mem_policy import test_context_locality
```



---
## concurrent_thread1
```python
from test_mem_policy import concurrent_thread1
```



---
## concurrent_thread2
```python
from test_mem_policy import concurrent_thread2
```



---
## test_thread_locality
```python
from test_mem_policy import test_thread_locality
```



---
## test_new_policy
```python
from test_mem_policy import test_new_policy
```



---
## test_switch_owner
```python
from test_mem_policy import test_switch_owner
```



---
## test_owner_is_base
```python
from test_mem_policy import test_owner_is_base
```



---
## MyArr
```python
from test_mem_policy import MyArr
```



---
## __name__
```python
from test_simd import __name__
```



---
## check_floatstatus
```python
from test_simd import check_floatstatus
```



---
## _Test_Utility
```python
from test_simd import _Test_Utility
```



---
## _SIMD_BOOL
```python
from test_simd import _SIMD_BOOL
```

To test all boolean vector types at once

---
## _SIMD_INT
```python
from test_simd import _SIMD_INT
```

To test all integer vector types at once

---
## _SIMD_FP32
```python
from test_simd import _SIMD_FP32
```

To only test single precision

---
## _SIMD_FP64
```python
from test_simd import _SIMD_FP64
```

To only test double precision

---
## _SIMD_FP
```python
from test_simd import _SIMD_FP
```

To test all float vector types at once

---
## _SIMD_ALL
```python
from test_simd import _SIMD_ALL
```

To test all vector types at once

---
## __getattr__
```python
from test_simd import __getattr__
```

To call NPV intrinsics without the attribute 'npyv' and
auto suffixing intrinsics according to class attribute 'sfx'

---
## _x2
```python
from test_simd import _x2
```



---
## _data
```python
from test_simd import _data
```



---
## _is_unsigned
```python
from test_simd import _is_unsigned
```



---
## _is_signed
```python
from test_simd import _is_signed
```



---
## _is_fp
```python
from test_simd import _is_fp
```



---
## _scalar_size
```python
from test_simd import _scalar_size
```



---
## _int_clip
```python
from test_simd import _int_clip
```



---
## _int_max
```python
from test_simd import _int_max
```



---
## _int_min
```python
from test_simd import _int_min
```



---
## _true_mask
```python
from test_simd import _true_mask
```



---
## _to_unsigned
```python
from test_simd import _to_unsigned
```



---
## _pinfinity
```python
from test_simd import _pinfinity
```



---
## _ninfinity
```python
from test_simd import _ninfinity
```



---
## _nan
```python
from test_simd import _nan
```



---
## _cpu_features
```python
from test_simd import _cpu_features
```



---
## _nlanes
```python
from test_simd import _nlanes
```



---
## _load_b
```python
from test_simd import _load_b
```



---
## test_operators_logical
```python
from test_simd import test_operators_logical
```



---
## test_tobits
```python
from test_simd import test_tobits
```



---
## test_pack
```python
from test_simd import test_pack
```

Pack multiple vectors into one
Test intrinsics:
    npyv_pack_b8_b16
    npyv_pack_b8_b32
    npyv_pack_b8_b64

---
## test_operators_crosstest
```python
from test_simd import test_operators_crosstest
```

Test intrinsics:
npyv_any_##SFX
npyv_all_##SFX

---
## test_operators_shift
```python
from test_simd import test_operators_shift
```



---
## test_arithmetic_subadd_saturated
```python
from test_simd import test_arithmetic_subadd_saturated
```



---
## test_math_max_min
```python
from test_simd import test_math_max_min
```



---
## test_reduce_max_min
```python
from test_simd import test_reduce_max_min
```

Test intrinsics:
npyv_reduce_max_##sfx
npyv_reduce_min_##sfx

---
## test_conversions
```python
from test_simd import test_conversions
```

Round to nearest even integer, assume CPU control register is set to rounding.
Test intrinsics:
    npyv_round_s32_##SFX

---
## test_arithmetic_fused
```python
from test_simd import test_arithmetic_fused
```



---
## test_abs
```python
from test_simd import test_abs
```



---
## test_sqrt
```python
from test_simd import test_sqrt
```



---
## test_square
```python
from test_simd import test_square
```



---
## test_rounding
```python
from test_simd import test_rounding
```

Test intrinsics:
npyv_rint_##SFX
npyv_ceil_##SFX
npyv_trunc_##SFX
npyv_floor##SFX

---
## test_max_min
```python
from test_simd import test_max_min
```

Test intrinsics:
npyv_max_##sfx
npyv_maxp_##sfx
npyv_maxn_##sfx
npyv_min_##sfx
npyv_minp_##sfx
npyv_minn_##sfx
npyv_reduce_max_##sfx
npyv_reduce_maxp_##sfx
npyv_reduce_maxn_##sfx
npyv_reduce_min_##sfx
npyv_reduce_minp_##sfx
npyv_reduce_minn_##sfx

---
## test_reciprocal
```python
from test_simd import test_reciprocal
```



---
## test_special_cases
```python
from test_simd import test_special_cases
```

Compare Not NaN. Test intrinsics:
npyv_notnan_##SFX

---
## test_unary_invalid_fpexception
```python
from test_simd import test_unary_invalid_fpexception
```



---
## test_comparison_with_nan
```python
from test_simd import test_comparison_with_nan
```



---
## test_memory_load
```python
from test_simd import test_memory_load
```



---
## test_memory_store
```python
from test_simd import test_memory_store
```



---
## test_memory_partial_load
```python
from test_simd import test_memory_partial_load
```



---
## test_memory_partial_store
```python
from test_simd import test_memory_partial_store
```



---
## test_memory_noncont_load
```python
from test_simd import test_memory_noncont_load
```



---
## test_memory_noncont_partial_load
```python
from test_simd import test_memory_noncont_partial_load
```



---
## test_memory_noncont_store
```python
from test_simd import test_memory_noncont_store
```



---
## test_memory_noncont_partial_store
```python
from test_simd import test_memory_noncont_partial_store
```



---
## test_lut
```python
from test_simd import test_lut
```

Test lookup table intrinsics:
npyv_lut32_##sfx
npyv_lut16_##sfx

---
## test_misc
```python
from test_simd import test_misc
```



---
## test_reorder
```python
from test_simd import test_reorder
```



---
## test_reorder_rev64
```python
from test_simd import test_reorder_rev64
```



---
## test_reorder_permi128
```python
from test_simd import test_reorder_permi128
```

Test permuting elements for each 128-bit lane.
npyv_permi128_##sfx

---
## test_operators_comparison
```python
from test_simd import test_operators_comparison
```



---
## test_conversion_boolean
```python
from test_simd import test_conversion_boolean
```



---
## test_conversion_expand
```python
from test_simd import test_conversion_expand
```

Test expand intrinsics:
npyv_expand_u16_u8
npyv_expand_u32_u16

---
## test_arithmetic_subadd
```python
from test_simd import test_arithmetic_subadd
```



---
## test_arithmetic_mul
```python
from test_simd import test_arithmetic_mul
```



---
## test_arithmetic_div
```python
from test_simd import test_arithmetic_div
```



---
## test_arithmetic_intdiv
```python
from test_simd import test_arithmetic_intdiv
```

Test integer division intrinsics:
npyv_divisor_##sfx
npyv_divc_##sfx

---
## test_arithmetic_reduce_sum
```python
from test_simd import test_arithmetic_reduce_sum
```

Test reduce sum intrinsics:
npyv_sum_##sfx

---
## test_arithmetic_reduce_sumup
```python
from test_simd import test_arithmetic_reduce_sumup
```

Test extend reduce sum intrinsics:
npyv_sumup_##sfx

---
## test_mask_conditional
```python
from test_simd import test_mask_conditional
```

Conditional addition and subtraction for all supported data types.
Test intrinsics:
    npyv_ifadd_##SFX, npyv_ifsub_##SFX

---
## to_bool
```python
from test_simd import to_bool
```



---
## trunc_div
```python
from test_simd import trunc_div
```

Divide towards zero works with large integers > 2^53,
and wrap around overflow similar to what C does.

---
## __name__
```python
from test_scalarinherit import __name__
```

Test printing of scalar types.

---
## A
```python
from test_scalarinherit import A
```



---
## B
```python
from test_scalarinherit import B
```



---
## C
```python
from test_scalarinherit import C
```



---
## D
```python
from test_scalarinherit import D
```



---
## B0
```python
from test_scalarinherit import B0
```



---
## C0
```python
from test_scalarinherit import C0
```



---
## HasNew
```python
from test_scalarinherit import HasNew
```



---
## B1
```python
from test_scalarinherit import B1
```



---
## TestInherit
```python
from test_scalarinherit import TestInherit
```



---
## TestCharacter
```python
from test_scalarinherit import TestCharacter
```



---
## __new__
```python
from test_scalarinherit import __new__
```



---
## test_init
```python
from test_scalarinherit import test_init
```



---
## test_init2
```python
from test_scalarinherit import test_init2
```



---
## test_gh_15395
```python
from test_scalarinherit import test_gh_15395
```



---
## test_char_radd
```python
from test_scalarinherit import test_char_radd
```



---
## test_char_repeat
```python
from test_scalarinherit import test_char_repeat
```



---
## MyStr
```python
from test_scalarinherit import MyStr
```



---
## MyBytes
```python
from test_scalarinherit import MyBytes
```



---
## __name__
```python
from test_indexing import __name__
```



---
## TestIndexing
```python
from test_indexing import TestIndexing
```



---
## TestFieldIndexing
```python
from test_indexing import TestFieldIndexing
```



---
## TestBroadcastedAssignments
```python
from test_indexing import TestBroadcastedAssignments
```



---
## TestSubclasses
```python
from test_indexing import TestSubclasses
```



---
## TestFancyIndexingCast
```python
from test_indexing import TestFancyIndexingCast
```



---
## TestFancyIndexingEquivalence
```python
from test_indexing import TestFancyIndexingEquivalence
```



---
## TestMultiIndexingAutomated
```python
from test_indexing import TestMultiIndexingAutomated
```

These tests use code to mimic the C-Code indexing for selection.

NOTE:

    * This still lacks tests for complex item setting.
    * If you change behavior of indexing, you might want to modify
      these tests to try more combinations.
    * Behavior was written to match numpy version 1.8. (though a
      first version matched 1.7.)
    * Only tuple indices are supported by the mimicking code.
      (and tested as of writing this)
    * Error types should match most of the time as long as there
      is only one error. For multiple errors, what gets raised
      will usually not be the same one. They are *not* tested.

Update 2016-11-30: It is probably not worth maintaining this test
indefinitely and it can be dropped if maintenance becomes a burden.

---
## TestFloatNonIntegerArgument
```python
from test_indexing import TestFloatNonIntegerArgument
```

These test that ``TypeError`` is raised when you try to use
non-integers as arguments to for indexing and slicing e.g. ``a[0.0:5]``
and ``a[0.5]``, or other functions like ``array.reshape(1., -1)``.

---
## TestBooleanIndexing
```python
from test_indexing import TestBooleanIndexing
```



---
## TestArrayToIndexDeprecation
```python
from test_indexing import TestArrayToIndexDeprecation
```

Creating an index from array not 0-D is an error.

    

---
## TestNonIntegerArrayLike
```python
from test_indexing import TestNonIntegerArrayLike
```

Tests that array_likes only valid if can safely cast to integer.

For instance, lists give IndexError when they cannot be safely cast to
an integer.

---
## TestMultipleEllipsisError
```python
from test_indexing import TestMultipleEllipsisError
```

An index can only have a single ellipsis.

    

---
## TestCApiAccess
```python
from test_indexing import TestCApiAccess
```



---
## test_index_no_floats
```python
from test_indexing import test_index_no_floats
```



---
## test_slicing_no_floats
```python
from test_indexing import test_slicing_no_floats
```



---
## test_index_no_array_to_index
```python
from test_indexing import test_index_no_array_to_index
```



---
## test_none_index
```python
from test_indexing import test_none_index
```



---
## test_empty_tuple_index
```python
from test_indexing import test_empty_tuple_index
```



---
## test_void_scalar_empty_tuple
```python
from test_indexing import test_void_scalar_empty_tuple
```



---
## test_same_kind_index_casting
```python
from test_indexing import test_same_kind_index_casting
```



---
## test_empty_fancy_index
```python
from test_indexing import test_empty_fancy_index
```



---
## test_ellipsis_index
```python
from test_indexing import test_ellipsis_index
```



---
## test_single_int_index
```python
from test_indexing import test_single_int_index
```



---
## test_single_bool_index
```python
from test_indexing import test_single_bool_index
```



---
## test_boolean_shape_mismatch
```python
from test_indexing import test_boolean_shape_mismatch
```



---
## test_boolean_indexing_onedim
```python
from test_indexing import test_boolean_indexing_onedim
```



---
## test_boolean_assignment_value_mismatch
```python
from test_indexing import test_boolean_assignment_value_mismatch
```



---
## test_boolean_assignment_needs_api
```python
from test_indexing import test_boolean_assignment_needs_api
```



---
## test_boolean_indexing_twodim
```python
from test_indexing import test_boolean_indexing_twodim
```



---
## test_boolean_indexing_list
```python
from test_indexing import test_boolean_indexing_list
```



---
## test_reverse_strides_and_subspace_bufferinit
```python
from test_indexing import test_reverse_strides_and_subspace_bufferinit
```



---
## test_reversed_strides_result_allocation
```python
from test_indexing import test_reversed_strides_result_allocation
```



---
## test_uncontiguous_subspace_assignment
```python
from test_indexing import test_uncontiguous_subspace_assignment
```



---
## test_too_many_fancy_indices_special_case
```python
from test_indexing import test_too_many_fancy_indices_special_case
```



---
## test_scalar_array_bool
```python
from test_indexing import test_scalar_array_bool
```



---
## test_everything_returns_views
```python
from test_indexing import test_everything_returns_views
```



---
## test_broaderrors_indexing
```python
from test_indexing import test_broaderrors_indexing
```



---
## test_trivial_fancy_out_of_bounds
```python
from test_indexing import test_trivial_fancy_out_of_bounds
```



---
## test_trivial_fancy_not_possible
```python
from test_indexing import test_trivial_fancy_not_possible
```



---
## test_nonbaseclass_values
```python
from test_indexing import test_nonbaseclass_values
```



---
## test_array_like_values
```python
from test_indexing import test_array_like_values
```



---
## test_subclass_writeable
```python
from test_indexing import test_subclass_writeable
```



---
## test_memory_order
```python
from test_indexing import test_memory_order
```



---
## test_scalar_return_type
```python
from test_indexing import test_scalar_return_type
```



---
## test_small_regressions
```python
from test_indexing import test_small_regressions
```



---
## test_unaligned
```python
from test_indexing import test_unaligned
```



---
## test_tuple_subclass
```python
from test_indexing import test_tuple_subclass
```



---
## test_broken_sequence_not_nd_index
```python
from test_indexing import test_broken_sequence_not_nd_index
```



---
## test_indexing_array_weird_strides
```python
from test_indexing import test_indexing_array_weird_strides
```



---
## test_indexing_array_negative_strides
```python
from test_indexing import test_indexing_array_negative_strides
```



---
## test_character_assignment
```python
from test_indexing import test_character_assignment
```



---
## test_too_many_advanced_indices
```python
from test_indexing import test_too_many_advanced_indices
```



---
## test_structured_advanced_indexing
```python
from test_indexing import test_structured_advanced_indexing
```



---
## test_nontuple_ndindex
```python
from test_indexing import test_nontuple_ndindex
```



---
## assign
```python
from test_indexing import assign
```



---
## test_prepending_ones
```python
from test_indexing import test_prepending_ones
```



---
## test_prepend_not_one
```python
from test_indexing import test_prepend_not_one
```



---
## test_simple_broadcasting_errors
```python
from test_indexing import test_simple_broadcasting_errors
```



---
## test_broadcast_error_reports_correct_shape
```python
from test_indexing import test_broadcast_error_reports_correct_shape
```



---
## test_index_is_larger
```python
from test_indexing import test_index_is_larger
```



---
## test_broadcast_subspace
```python
from test_indexing import test_broadcast_subspace
```



---
## test_basic
```python
from test_indexing import test_basic
```



---
## test_fancy_on_read_only
```python
from test_indexing import test_fancy_on_read_only
```



---
## test_finalize_gets_full_info
```python
from test_indexing import test_finalize_gets_full_info
```



---
## test_boolean_index_cast_assign
```python
from test_indexing import test_boolean_index_cast_assign
```



---
## test_object_assign
```python
from test_indexing import test_object_assign
```



---
## test_cast_equivalence
```python
from test_indexing import test_cast_equivalence
```



---
## setup_method
```python
from test_indexing import setup_method
```



---
## _get_multi_index
```python
from test_indexing import _get_multi_index
```

Mimic multi dimensional indexing.

Parameters
----------
arr : ndarray
    Array to be indexed.
indices : tuple of index objects

Returns
-------
out : ndarray
    An array equivalent to the indexing operation (but always a copy).
    `arr[indices]` should be identical.
no_copy : bool
    Whether the indexing operation requires a copy. If this is `True`,
    `np.may_share_memory(arr, arr[indices])` should be `True` (with
    some exceptions for scalars and possibly 0-d arrays).

Notes
-----
While the function may mostly match the errors of normal indexing this
is generally not the case.

---
## _check_multi_index
```python
from test_indexing import _check_multi_index
```

Check a multi index item getting and simple setting.

Parameters
----------
arr : ndarray
    Array to be indexed, must be a reshaped arange.
index : tuple of indexing objects
    Index being tested.

---
## _check_single_index
```python
from test_indexing import _check_single_index
```

Check a single index item getting and simple setting.

Parameters
----------
arr : ndarray
    Array to be indexed, must be an arange.
index : indexing object
    Index being tested. Must be a single index and not a tuple
    of indexing objects (see also `_check_multi_index`).

---
## _compare_index_result
```python
from test_indexing import _compare_index_result
```

Compare mimicked result to indexing result.
        

---
## test_boolean
```python
from test_indexing import test_boolean
```



---
## test_multidim
```python
from test_indexing import test_multidim
```



---
## test_1d
```python
from test_indexing import test_1d
```



---
## test_valid_indexing
```python
from test_indexing import test_valid_indexing
```



---
## test_valid_slicing
```python
from test_indexing import test_valid_slicing
```



---
## test_non_integer_argument_errors
```python
from test_indexing import test_non_integer_argument_errors
```



---
## test_non_integer_sequence_multiplication
```python
from test_indexing import test_non_integer_sequence_multiplication
```



---
## test_reduce_axis_float_index
```python
from test_indexing import test_reduce_axis_float_index
```



---
## test_bool_as_int_argument_errors
```python
from test_indexing import test_bool_as_int_argument_errors
```



---
## test_boolean_indexing_weirdness
```python
from test_indexing import test_boolean_indexing_weirdness
```



---
## test_boolean_indexing_fast_path
```python
from test_indexing import test_boolean_indexing_fast_path
```



---
## test_array_to_index_error
```python
from test_indexing import test_array_to_index_error
```



---
## test_getitem
```python
from test_indexing import test_getitem
```



---
## test_setitem
```python
from test_indexing import test_setitem
```



---
## f
```python
from test_indexing import f
```



---
## SubClass
```python
from test_indexing import SubClass
```



---
## Zero
```python
from test_indexing import Zero
```



---
## ArrayLike
```python
from test_indexing import ArrayLike
```



---
## TupleSubclass
```python
from test_indexing import TupleSubclass
```



---
## SequenceLike
```python
from test_indexing import SequenceLike
```



---
## func
```python
from test_indexing import func
```



---
## mult
```python
from test_indexing import mult
```



---
## __array_finalize__
```python
from test_indexing import __array_finalize__
```



---
## __index__
```python
from test_indexing import __index__
```



---
## __array__
```python
from test_indexing import __array__
```



---
## __len__
```python
from test_indexing import __len__
```



---
## __getitem__
```python
from test_indexing import __getitem__
```



---
## isskip
```python
from test_indexing import isskip
```



---
## __name__
```python
from test_umath import __name__
```



---
## interesting_binop_operands
```python
from test_umath import interesting_binop_operands
```

Helper to create "interesting" operands to cover common code paths:
* scalar inputs
* only first "values" is an array (e.g. scalar division fast-paths)
* Longer array (SIMD) placing the value of interest at different positions
* Oddly strided arrays which may not be SIMD compatible

It does not attempt to cover unaligned access or mixed dtypes.
These are normally handled by the casting/buffering machinery.

This is not a fixture (currently), since I believe a fixture normally
only yields once?

---
## on_powerpc
```python
from test_umath import on_powerpc
```

True if we are running on a Power PC platform.

---
## bad_arcsinh
```python
from test_umath import bad_arcsinh
```

The blocklisted trig functions are not accurate on aarch64/PPC for
complex256. Rather than dig through the actual problem skip the
test. This should be fixed when we can move past glibc2.17
which is the version in manylinux2014

---
## _FilterInvalids
```python
from test_umath import _FilterInvalids
```



---
## TestConstants
```python
from test_umath import TestConstants
```



---
## TestOut
```python
from test_umath import TestOut
```



---
## TestComparisons
```python
from test_umath import TestComparisons
```



---
## TestAdd
```python
from test_umath import TestAdd
```



---
## TestDivision
```python
from test_umath import TestDivision
```



---
## floor_divide_and_remainder
```python
from test_umath import floor_divide_and_remainder
```



---
## _signs
```python
from test_umath import _signs
```



---
## TestRemainder
```python
from test_umath import TestRemainder
```



---
## TestDivisionIntegerOverflowsAndDivideByZero
```python
from test_umath import TestDivisionIntegerOverflowsAndDivideByZero
```



---
## TestCbrt
```python
from test_umath import TestCbrt
```



---
## TestPower
```python
from test_umath import TestPower
```



---
## TestFloat_power
```python
from test_umath import TestFloat_power
```



---
## TestLog2
```python
from test_umath import TestLog2
```



---
## TestExp2
```python
from test_umath import TestExp2
```



---
## TestLogAddExp2
```python
from test_umath import TestLogAddExp2
```



---
## TestLog
```python
from test_umath import TestLog
```



---
## TestExp
```python
from test_umath import TestExp
```



---
## TestSpecialFloats
```python
from test_umath import TestSpecialFloats
```



---
## TestFPClass
```python
from test_umath import TestFPClass
```



---
## TestLDExp
```python
from test_umath import TestLDExp
```



---
## TestFRExp
```python
from test_umath import TestFRExp
```



---
## TestAVXUfuncs
```python
from test_umath import TestAVXUfuncs
```



---
## TestAVXFloat32Transcendental
```python
from test_umath import TestAVXFloat32Transcendental
```



---
## TestLogAddExp
```python
from test_umath import TestLogAddExp
```



---
## TestLog1p
```python
from test_umath import TestLog1p
```



---
## TestExpm1
```python
from test_umath import TestExpm1
```



---
## TestHypot
```python
from test_umath import TestHypot
```



---
## assert_hypot_isnan
```python
from test_umath import assert_hypot_isnan
```



---
## assert_hypot_isinf
```python
from test_umath import assert_hypot_isinf
```



---
## TestHypotSpecialValues
```python
from test_umath import TestHypotSpecialValues
```



---
## assert_arctan2_isnan
```python
from test_umath import assert_arctan2_isnan
```



---
## assert_arctan2_ispinf
```python
from test_umath import assert_arctan2_ispinf
```



---
## assert_arctan2_isninf
```python
from test_umath import assert_arctan2_isninf
```



---
## assert_arctan2_ispzero
```python
from test_umath import assert_arctan2_ispzero
```



---
## assert_arctan2_isnzero
```python
from test_umath import assert_arctan2_isnzero
```



---
## TestArctan2SpecialValues
```python
from test_umath import TestArctan2SpecialValues
```



---
## TestLdexp
```python
from test_umath import TestLdexp
```



---
## TestMaximum
```python
from test_umath import TestMaximum
```



---
## TestMinimum
```python
from test_umath import TestMinimum
```



---
## TestFmax
```python
from test_umath import TestFmax
```



---
## TestFmin
```python
from test_umath import TestFmin
```



---
## TestBool
```python
from test_umath import TestBool
```



---
## TestBitwiseUFuncs
```python
from test_umath import TestBitwiseUFuncs
```



---
## TestInt
```python
from test_umath import TestInt
```



---
## TestFloatingPoint
```python
from test_umath import TestFloatingPoint
```



---
## TestDegrees
```python
from test_umath import TestDegrees
```



---
## TestRadians
```python
from test_umath import TestRadians
```



---
## TestHeavside
```python
from test_umath import TestHeavside
```



---
## TestSign
```python
from test_umath import TestSign
```



---
## TestMinMax
```python
from test_umath import TestMinMax
```



---
## TestAbsoluteNegative
```python
from test_umath import TestAbsoluteNegative
```



---
## TestPositive
```python
from test_umath import TestPositive
```



---
## TestSpecialMethods
```python
from test_umath import TestSpecialMethods
```



---
## TestChoose
```python
from test_umath import TestChoose
```



---
## TestRationalFunctions
```python
from test_umath import TestRationalFunctions
```



---
## TestRoundingFunctions
```python
from test_umath import TestRoundingFunctions
```



---
## TestComplexFunctions
```python
from test_umath import TestComplexFunctions
```



---
## TestAttributes
```python
from test_umath import TestAttributes
```



---
## TestSubclass
```python
from test_umath import TestSubclass
```



---
## TestFrompyfunc
```python
from test_umath import TestFrompyfunc
```



---
## _check_branch_cut
```python
from test_umath import _check_branch_cut
```

Check for a branch cut in a function.

Assert that `x0` lies on a branch cut of function `f` and `f` is
continuous from the direction `dx`.

Parameters
----------
f : func
    Function to check
x0 : array-like
    Point on branch cut
dx : array-like
    Direction to check continuity in
re_sign, im_sign : {1, -1}
    Change of sign of the real or imaginary part expected
sig_zero_ok : bool
    Whether to check if the branch cut respects signed zero (if applicable)
dtype : dtype
    Dtype to check (should be complex)

---
## test_copysign
```python
from test_umath import test_copysign
```



---
## _test_nextafter
```python
from test_umath import _test_nextafter
```



---
## test_nextafter
```python
from test_umath import test_nextafter
```



---
## test_nextafterf
```python
from test_umath import test_nextafterf
```



---
## test_nextafterl
```python
from test_umath import test_nextafterl
```



---
## test_nextafter_0
```python
from test_umath import test_nextafter_0
```



---
## _test_spacing
```python
from test_umath import _test_spacing
```



---
## test_spacing
```python
from test_umath import test_spacing
```



---
## test_spacingf
```python
from test_umath import test_spacingf
```



---
## test_spacingl
```python
from test_umath import test_spacingl
```



---
## test_spacing_gfortran
```python
from test_umath import test_spacing_gfortran
```



---
## test_nextafter_vs_spacing
```python
from test_umath import test_nextafter_vs_spacing
```



---
## test_pos_nan
```python
from test_umath import test_pos_nan
```

Check np.nan is a positive nan.

---
## test_reduceat
```python
from test_umath import test_reduceat
```

Test bug in reduceat when structured arrays are not copied.

---
## test_reduceat_empty
```python
from test_umath import test_reduceat_empty
```

Reduceat should work with empty arrays

---
## test_complex_nan_comparisons
```python
from test_umath import test_complex_nan_comparisons
```



---
## test_rint_big_int
```python
from test_umath import test_rint_big_int
```



---
## test_memoverlap_accumulate
```python
from test_umath import test_memoverlap_accumulate
```



---
## test_memoverlap_accumulate_cmp
```python
from test_umath import test_memoverlap_accumulate_cmp
```



---
## test_memoverlap_accumulate_symmetric
```python
from test_umath import test_memoverlap_accumulate_symmetric
```



---
## test_signaling_nan_exceptions
```python
from test_umath import test_signaling_nan_exceptions
```



---
## test_outer_subclass_preserve
```python
from test_umath import test_outer_subclass_preserve
```



---
## test_outer_bad_subclass
```python
from test_umath import test_outer_bad_subclass
```



---
## test_outer_exceeds_maxdims
```python
from test_umath import test_outer_exceeds_maxdims
```



---
## test_bad_legacy_ufunc_silent_errors
```python
from test_umath import test_bad_legacy_ufunc_silent_errors
```



---
## test_bad_legacy_gufunc_silent_errors
```python
from test_umath import test_bad_legacy_gufunc_silent_errors
```



---
## setup_method
```python
from test_umath import setup_method
```



---
## teardown_method
```python
from test_umath import teardown_method
```



---
## test_pi
```python
from test_umath import test_pi
```



---
## test_e
```python
from test_umath import test_e
```



---
## test_euler_gamma
```python
from test_umath import test_euler_gamma
```



---
## test_out_subok
```python
from test_umath import test_out_subok
```



---
## test_out_wrap_subok
```python
from test_umath import test_out_wrap_subok
```



---
## test_comparison_functions
```python
from test_umath import test_comparison_functions
```



---
## test_ignore_object_identity_in_equal
```python
from test_umath import test_ignore_object_identity_in_equal
```



---
## test_ignore_object_identity_in_not_equal
```python
from test_umath import test_ignore_object_identity_in_not_equal
```



---
## test_error_in_equal_reduce
```python
from test_umath import test_error_in_equal_reduce
```



---
## test_object_dtype
```python
from test_umath import test_object_dtype
```



---
## test_object_nonbool_dtype_error
```python
from test_umath import test_object_nonbool_dtype_error
```



---
## test_large_integer_direct_comparison
```python
from test_umath import test_large_integer_direct_comparison
```



---
## test_unsigned_signed_direct_comparison
```python
from test_umath import test_unsigned_signed_direct_comparison
```



---
## test_reduce_alignment
```python
from test_umath import test_reduce_alignment
```



---
## test_division_int
```python
from test_umath import test_division_int
```



---
## test_division_int_boundary
```python
from test_umath import test_division_int_boundary
```



---
## test_division_int_reduce
```python
from test_umath import test_division_int_reduce
```



---
## test_division_int_timedelta
```python
from test_umath import test_division_int_timedelta
```



---
## test_division_complex
```python
from test_umath import test_division_complex
```



---
## test_zero_division_complex
```python
from test_umath import test_zero_division_complex
```



---
## test_floor_division_complex
```python
from test_umath import test_floor_division_complex
```



---
## test_floor_division_signed_zero
```python
from test_umath import test_floor_division_signed_zero
```



---
## test_floor_division_errors
```python
from test_umath import test_floor_division_errors
```



---
## test_floor_division_corner_cases
```python
from test_umath import test_floor_division_corner_cases
```



---
## test_remainder_basic
```python
from test_umath import test_remainder_basic
```



---
## test_float_remainder_exact
```python
from test_umath import test_float_remainder_exact
```



---
## test_float_remainder_roundoff
```python
from test_umath import test_float_remainder_roundoff
```



---
## test_float_divmod_errors
```python
from test_umath import test_float_divmod_errors
```



---
## test_float_remainder_errors
```python
from test_umath import test_float_remainder_errors
```



---
## test_float_remainder_overflow
```python
from test_umath import test_float_remainder_overflow
```



---
## test_float_divmod_corner_cases
```python
from test_umath import test_float_divmod_corner_cases
```



---
## test_float_remainder_corner_cases
```python
from test_umath import test_float_remainder_corner_cases
```



---
## test_signed_division_overflow
```python
from test_umath import test_signed_division_overflow
```



---
## test_divide_by_zero
```python
from test_umath import test_divide_by_zero
```



---
## test_overflows
```python
from test_umath import test_overflows
```



---
## test_cbrt_scalar
```python
from test_umath import test_cbrt_scalar
```



---
## test_cbrt
```python
from test_umath import test_cbrt
```



---
## test_power_float
```python
from test_umath import test_power_float
```



---
## test_power_complex
```python
from test_umath import test_power_complex
```



---
## test_power_zero
```python
from test_umath import test_power_zero
```



---
## test_zero_power_nonzero
```python
from test_umath import test_zero_power_nonzero
```



---
## test_fast_power
```python
from test_umath import test_fast_power
```



---
## test_integer_power
```python
from test_umath import test_integer_power
```



---
## test_integer_power_with_integer_zero_exponent
```python
from test_umath import test_integer_power_with_integer_zero_exponent
```



---
## test_integer_power_of_1
```python
from test_umath import test_integer_power_of_1
```



---
## test_integer_power_of_zero
```python
from test_umath import test_integer_power_of_zero
```



---
## test_integer_to_negative_power
```python
from test_umath import test_integer_to_negative_power
```



---
## test_float_to_inf_power
```python
from test_umath import test_float_to_inf_power
```



---
## test_type_conversion
```python
from test_umath import test_type_conversion
```



---
## test_log2_values
```python
from test_umath import test_log2_values
```



---
## test_log2_ints
```python
from test_umath import test_log2_ints
```



---
## test_log2_special
```python
from test_umath import test_log2_special
```



---
## test_exp2_values
```python
from test_umath import test_exp2_values
```



---
## test_logaddexp2_values
```python
from test_umath import test_logaddexp2_values
```



---
## test_logaddexp2_range
```python
from test_umath import test_logaddexp2_range
```



---
## test_inf
```python
from test_umath import test_inf
```



---
## test_nan
```python
from test_umath import test_nan
```



---
## test_reduce
```python
from test_umath import test_reduce
```



---
## test_log_values
```python
from test_umath import test_log_values
```



---
## test_log_strides
```python
from test_umath import test_log_strides
```



---
## test_exp_values
```python
from test_umath import test_exp_values
```



---
## test_exp_strides
```python
from test_umath import test_exp_strides
```



---
## test_exp_exceptions
```python
from test_umath import test_exp_exceptions
```



---
## test_sincos_values
```python
from test_umath import test_sincos_values
```



---
## test_sincos_underflow
```python
from test_umath import test_sincos_underflow
```



---
## test_sincos_errors
```python
from test_umath import test_sincos_errors
```



---
## test_sincos_overlaps
```python
from test_umath import test_sincos_overlaps
```



---
## test_sqrt_values
```python
from test_umath import test_sqrt_values
```



---
## test_abs_values
```python
from test_umath import test_abs_values
```



---
## test_square_values
```python
from test_umath import test_square_values
```



---
## test_reciprocal_values
```python
from test_umath import test_reciprocal_values
```



---
## test_tan
```python
from test_umath import test_tan
```



---
## test_arcsincos
```python
from test_umath import test_arcsincos
```



---
## test_arctan
```python
from test_umath import test_arctan
```



---
## test_sinh
```python
from test_umath import test_sinh
```



---
## test_cosh
```python
from test_umath import test_cosh
```



---
## test_tanh
```python
from test_umath import test_tanh
```



---
## test_arcsinh
```python
from test_umath import test_arcsinh
```



---
## test_arccosh
```python
from test_umath import test_arccosh
```



---
## test_arctanh
```python
from test_umath import test_arctanh
```



---
## test_exp2
```python
from test_umath import test_exp2
```



---
## test_expm1
```python
from test_umath import test_expm1
```



---
## test_unary_spurious_fpexception
```python
from test_umath import test_unary_spurious_fpexception
```



---
## test_divide_spurious_fpexception
```python
from test_umath import test_divide_spurious_fpexception
```



---
## test_fpclass
```python
from test_umath import test_fpclass
```



---
## test_fp_noncontiguous
```python
from test_umath import test_fp_noncontiguous
```



---
## test_ldexp
```python
from test_umath import test_ldexp
```



---
## test_frexp
```python
from test_umath import test_frexp
```



---
## test_avx_based_ufunc
```python
from test_umath import test_avx_based_ufunc
```



---
## test_exp_float32
```python
from test_umath import test_exp_float32
```



---
## test_log_float32
```python
from test_umath import test_log_float32
```



---
## test_sincos_float32
```python
from test_umath import test_sincos_float32
```



---
## test_strided_float32
```python
from test_umath import test_strided_float32
```



---
## test_logaddexp_values
```python
from test_umath import test_logaddexp_values
```



---
## test_logaddexp_range
```python
from test_umath import test_logaddexp_range
```



---
## test_log1p
```python
from test_umath import test_log1p
```



---
## test_special
```python
from test_umath import test_special
```



---
## test_complex
```python
from test_umath import test_complex
```



---
## test_simple
```python
from test_umath import test_simple
```



---
## test_nan_outputs
```python
from test_umath import test_nan_outputs
```



---
## test_nan_outputs2
```python
from test_umath import test_nan_outputs2
```



---
## test_no_fpe
```python
from test_umath import test_no_fpe
```



---
## test_one_one
```python
from test_umath import test_one_one
```



---
## test_zero_nzero
```python
from test_umath import test_zero_nzero
```



---
## test_zero_pzero
```python
from test_umath import test_zero_pzero
```



---
## test_zero_negative
```python
from test_umath import test_zero_negative
```



---
## test_zero_positive
```python
from test_umath import test_zero_positive
```



---
## test_positive_zero
```python
from test_umath import test_positive_zero
```



---
## test_negative_zero
```python
from test_umath import test_negative_zero
```



---
## test_any_ninf
```python
from test_umath import test_any_ninf
```



---
## test_any_pinf
```python
from test_umath import test_any_pinf
```



---
## test_inf_any
```python
from test_umath import test_inf_any
```



---
## test_inf_ninf
```python
from test_umath import test_inf_ninf
```



---
## test_inf_pinf
```python
from test_umath import test_inf_pinf
```



---
## test_nan_any
```python
from test_umath import test_nan_any
```



---
## _check_ldexp
```python
from test_umath import _check_ldexp
```



---
## test_ldexp_overflow
```python
from test_umath import test_ldexp_overflow
```



---
## test_reduce_complex
```python
from test_umath import test_reduce_complex
```



---
## test_float_nans
```python
from test_umath import test_float_nans
```



---
## test_object_nans
```python
from test_umath import test_object_nans
```



---
## test_complex_nans
```python
from test_umath import test_complex_nans
```



---
## test_object_array
```python
from test_umath import test_object_array
```



---
## test_strided_array
```python
from test_umath import test_strided_array
```



---
## test_precision
```python
from test_umath import test_precision
```



---
## test_exceptions
```python
from test_umath import test_exceptions
```



---
## test_truth_table_logical
```python
from test_umath import test_truth_table_logical
```



---
## test_truth_table_bitwise
```python
from test_umath import test_truth_table_bitwise
```



---
## test_values
```python
from test_umath import test_values
```



---
## test_types
```python
from test_umath import test_types
```



---
## test_identity
```python
from test_umath import test_identity
```



---
## test_reduction
```python
from test_umath import test_reduction
```



---
## test_logical_not
```python
from test_umath import test_logical_not
```



---
## test_floating_point
```python
from test_umath import test_floating_point
```



---
## test_degrees
```python
from test_umath import test_degrees
```



---
## test_radians
```python
from test_umath import test_radians
```



---
## test_heaviside
```python
from test_umath import test_heaviside
```



---
## test_sign
```python
from test_umath import test_sign
```



---
## test_sign_dtype_object
```python
from test_umath import test_sign_dtype_object
```



---
## test_sign_dtype_nan_object
```python
from test_umath import test_sign_dtype_nan_object
```



---
## test_minmax_blocked
```python
from test_umath import test_minmax_blocked
```



---
## test_lower_align
```python
from test_umath import test_lower_align
```



---
## test_reduce_reorder
```python
from test_umath import test_reduce_reorder
```



---
## test_minimize_no_warns
```python
from test_umath import test_minimize_no_warns
```



---
## test_abs_neg_blocked
```python
from test_umath import test_abs_neg_blocked
```



---
## test_noncontiguous
```python
from test_umath import test_noncontiguous
```



---
## test_valid
```python
from test_umath import test_valid
```



---
## test_invalid
```python
from test_umath import test_invalid
```



---
## test_wrap
```python
from test_umath import test_wrap
```



---
## test_wrap_and_prepare_out
```python
from test_umath import test_wrap_and_prepare_out
```



---
## test_wrap_with_iterable
```python
from test_umath import test_wrap_with_iterable
```



---
## test_priority_with_scalar
```python
from test_umath import test_priority_with_scalar
```



---
## test_old_wrap
```python
from test_umath import test_old_wrap
```



---
## test_priority
```python
from test_umath import test_priority
```



---
## test_failing_wrap
```python
from test_umath import test_failing_wrap
```



---
## test_failing_out_wrap
```python
from test_umath import test_failing_out_wrap
```



---
## test_none_wrap
```python
from test_umath import test_none_wrap
```



---
## test_default_prepare
```python
from test_umath import test_default_prepare
```



---
## test_prepare
```python
from test_umath import test_prepare
```



---
## test_prepare_out
```python
from test_umath import test_prepare_out
```



---
## test_failing_prepare
```python
from test_umath import test_failing_prepare
```



---
## test_array_too_many_args
```python
from test_umath import test_array_too_many_args
```



---
## test_ufunc_override
```python
from test_umath import test_ufunc_override
```



---
## test_ufunc_override_mro
```python
from test_umath import test_ufunc_override_mro
```



---
## test_ufunc_override_methods
```python
from test_umath import test_ufunc_override_methods
```



---
## test_ufunc_override_out
```python
from test_umath import test_ufunc_override_out
```



---
## test_ufunc_override_where
```python
from test_umath import test_ufunc_override_where
```



---
## test_ufunc_override_exception
```python
from test_umath import test_ufunc_override_exception
```



---
## test_ufunc_override_not_implemented
```python
from test_umath import test_ufunc_override_not_implemented
```



---
## test_ufunc_override_disabled
```python
from test_umath import test_ufunc_override_disabled
```



---
## test_gufunc_override
```python
from test_umath import test_gufunc_override
```



---
## test_ufunc_override_with_super
```python
from test_umath import test_ufunc_override_with_super
```



---
## test_array_ufunc_direct_call
```python
from test_umath import test_array_ufunc_direct_call
```



---
## test_mixed
```python
from test_umath import test_mixed
```



---
## test_lcm
```python
from test_umath import test_lcm
```



---
## test_lcm_object
```python
from test_umath import test_lcm_object
```



---
## test_gcd
```python
from test_umath import test_gcd
```



---
## test_gcd_object
```python
from test_umath import test_gcd_object
```



---
## _test_lcm_inner
```python
from test_umath import _test_lcm_inner
```



---
## _test_gcd_inner
```python
from test_umath import _test_gcd_inner
```



---
## test_lcm_overflow
```python
from test_umath import test_lcm_overflow
```



---
## test_gcd_overflow
```python
from test_umath import test_gcd_overflow
```



---
## test_decimal
```python
from test_umath import test_decimal
```



---
## test_float
```python
from test_umath import test_float
```



---
## test_builtin_long
```python
from test_umath import test_builtin_long
```



---
## test_object_direct
```python
from test_umath import test_object_direct
```

test direct implementation of these magic methods 

---
## test_object_indirect
```python
from test_umath import test_object_indirect
```

test implementations via __float__ 

---
## test_fraction
```python
from test_umath import test_fraction
```



---
## test_it
```python
from test_umath import test_it
```



---
## test_precisions_consistent
```python
from test_umath import test_precisions_consistent
```



---
## test_branch_cuts
```python
from test_umath import test_branch_cuts
```



---
## test_branch_cuts_complex64
```python
from test_umath import test_branch_cuts_complex64
```



---
## test_against_cmath
```python
from test_umath import test_against_cmath
```



---
## test_loss_of_precision
```python
from test_umath import test_loss_of_precision
```

Check loss of precision in complex arc* functions

---
## test_promotion_corner_cases
```python
from test_umath import test_promotion_corner_cases
```



---
## test_attributes
```python
from test_umath import test_attributes
```



---
## test_doc
```python
from test_umath import test_doc
```



---
## test_subclass_op
```python
from test_umath import test_subclass_op
```



---
## foo
```python
from test_umath import foo
```



---
## BadArr1
```python
from test_umath import BadArr1
```



---
## BadArr2
```python
from test_umath import BadArr2
```



---
## ArrayWrap
```python
from test_umath import ArrayWrap
```



---
## FunkyType
```python
from test_umath import FunkyType
```



---
## assert_complex_equal
```python
from test_umath import assert_complex_equal
```



---
## with_wrap
```python
from test_umath import with_wrap
```



---
## StoreArrayPrepareWrap
```python
from test_umath import StoreArrayPrepareWrap
```



---
## do_test
```python
from test_umath import do_test
```



---
## A
```python
from test_umath import A
```



---
## B
```python
from test_umath import B
```



---
## C
```python
from test_umath import C
```



---
## Ok
```python
from test_umath import Ok
```



---
## Bad
```python
from test_umath import Bad
```



---
## with_prepare
```python
from test_umath import with_prepare
```



---
## MyNDArray
```python
from test_umath import MyNDArray
```



---
## tres_mul
```python
from test_umath import tres_mul
```



---
## quatro_mul
```python
from test_umath import quatro_mul
```



---
## ASub
```python
from test_umath import ASub
```



---
## CSub
```python
from test_umath import CSub
```



---
## OverriddenArrayOld
```python
from test_umath import OverriddenArrayOld
```



---
## OverriddenArrayNew
```python
from test_umath import OverriddenArrayNew
```



---
## OptOut
```python
from test_umath import OptOut
```



---
## GreedyArray
```python
from test_umath import GreedyArray
```



---
## check
```python
from test_umath import check
```



---
## simple
```python
from test_umath import simple
```



---
## mul
```python
from test_umath import mul
```



---
## __array_finalize__
```python
from test_umath import __array_finalize__
```



---
## __array_prepare__
```python
from test_umath import __array_prepare__
```



---
## __new__
```python
from test_umath import __new__
```



---
## __array_wrap__
```python
from test_umath import __array_wrap__
```



---
## __eq__
```python
from test_umath import __eq__
```



---
## __ne__
```python
from test_umath import __ne__
```



---
## __array__
```python
from test_umath import __array__
```



---
## args
```python
from test_umath import args
```



---
## __repr__
```python
from test_umath import __repr__
```



---
## __array_ufunc__
```python
from test_umath import __array_ufunc__
```



---
## __init__
```python
from test_umath import __init__
```



---
## _unwrap
```python
from test_umath import _unwrap
```



---
## __floor__
```python
from test_umath import __floor__
```



---
## __ceil__
```python
from test_umath import __ceil__
```



---
## __trunc__
```python
from test_umath import __trunc__
```



---
## __float__
```python
from test_umath import __float__
```



---
## __name__
```python
from test_numeric import __name__
```



---
## TestResize
```python
from test_numeric import TestResize
```



---
## TestNonarrayArgs
```python
from test_numeric import TestNonarrayArgs
```



---
## TestIsscalar
```python
from test_numeric import TestIsscalar
```



---
## TestBoolScalar
```python
from test_numeric import TestBoolScalar
```



---
## TestBoolArray
```python
from test_numeric import TestBoolArray
```



---
## TestBoolCmp
```python
from test_numeric import TestBoolCmp
```



---
## TestSeterr
```python
from test_numeric import TestSeterr
```



---
## TestFloatExceptions
```python
from test_numeric import TestFloatExceptions
```



---
## TestTypes
```python
from test_numeric import TestTypes
```



---
## NIterError
```python
from test_numeric import NIterError
```



---
## TestFromiter
```python
from test_numeric import TestFromiter
```



---
## TestNonzero
```python
from test_numeric import TestNonzero
```



---
## TestIndex
```python
from test_numeric import TestIndex
```



---
## TestBinaryRepr
```python
from test_numeric import TestBinaryRepr
```



---
## TestBaseRepr
```python
from test_numeric import TestBaseRepr
```



---
## TestArrayComparisons
```python
from test_numeric import TestArrayComparisons
```



---
## assert_array_strict_equal
```python
from test_numeric import assert_array_strict_equal
```



---
## TestClip
```python
from test_numeric import TestClip
```



---
## TestAllclose
```python
from test_numeric import TestAllclose
```



---
## TestIsclose
```python
from test_numeric import TestIsclose
```



---
## TestStdVar
```python
from test_numeric import TestStdVar
```



---
## TestStdVarComplex
```python
from test_numeric import TestStdVarComplex
```



---
## TestCreationFuncs
```python
from test_numeric import TestCreationFuncs
```



---
## TestLikeFuncs
```python
from test_numeric import TestLikeFuncs
```

Test ones_like, zeros_like, empty_like and full_like

---
## TestCorrelate
```python
from test_numeric import TestCorrelate
```



---
## TestConvolve
```python
from test_numeric import TestConvolve
```



---
## TestArgwhere
```python
from test_numeric import TestArgwhere
```



---
## TestStringFunction
```python
from test_numeric import TestStringFunction
```



---
## TestRoll
```python
from test_numeric import TestRoll
```



---
## TestRollaxis
```python
from test_numeric import TestRollaxis
```



---
## TestMoveaxis
```python
from test_numeric import TestMoveaxis
```



---
## TestCross
```python
from test_numeric import TestCross
```



---
## test_outer_out_param
```python
from test_numeric import test_outer_out_param
```



---
## TestIndices
```python
from test_numeric import TestIndices
```



---
## TestRequire
```python
from test_numeric import TestRequire
```



---
## TestBroadcast
```python
from test_numeric import TestBroadcast
```



---
## TestKeepdims
```python
from test_numeric import TestKeepdims
```



---
## TestTensordot
```python
from test_numeric import TestTensordot
```



---
## test_copies
```python
from test_numeric import test_copies
```



---
## test_repeats
```python
from test_numeric import test_repeats
```



---
## test_zeroresize
```python
from test_numeric import test_zeroresize
```



---
## test_reshape_from_zero
```python
from test_numeric import test_reshape_from_zero
```



---
## test_negative_resize
```python
from test_numeric import test_negative_resize
```



---
## test_subclass
```python
from test_numeric import test_subclass
```



---
## test_choose
```python
from test_numeric import test_choose
```



---
## test_clip
```python
from test_numeric import test_clip
```



---
## test_compress
```python
from test_numeric import test_compress
```



---
## test_count_nonzero
```python
from test_numeric import test_count_nonzero
```



---
## test_cumproduct
```python
from test_numeric import test_cumproduct
```



---
## test_diagonal
```python
from test_numeric import test_diagonal
```



---
## test_mean
```python
from test_numeric import test_mean
```



---
## test_ptp
```python
from test_numeric import test_ptp
```



---
## test_prod
```python
from test_numeric import test_prod
```



---
## test_ravel
```python
from test_numeric import test_ravel
```



---
## test_repeat
```python
from test_numeric import test_repeat
```



---
## test_reshape
```python
from test_numeric import test_reshape
```



---
## test_round
```python
from test_numeric import test_round
```



---
## test_dunder_round
```python
from test_numeric import test_dunder_round
```



---
## test_dunder_round_edgecases
```python
from test_numeric import test_dunder_round_edgecases
```



---
## test_dunder_round_accuracy
```python
from test_numeric import test_dunder_round_accuracy
```



---
## test_round_py_consistency
```python
from test_numeric import test_round_py_consistency
```



---
## test_searchsorted
```python
from test_numeric import test_searchsorted
```



---
## test_size
```python
from test_numeric import test_size
```



---
## test_squeeze
```python
from test_numeric import test_squeeze
```



---
## test_std
```python
from test_numeric import test_std
```



---
## test_swapaxes
```python
from test_numeric import test_swapaxes
```



---
## test_sum
```python
from test_numeric import test_sum
```



---
## test_take
```python
from test_numeric import test_take
```



---
## test_trace
```python
from test_numeric import test_trace
```



---
## test_transpose
```python
from test_numeric import test_transpose
```



---
## test_var
```python
from test_numeric import test_var
```



---
## test_isscalar
```python
from test_numeric import test_isscalar
```



---
## test_logical
```python
from test_numeric import test_logical
```



---
## test_bitwise_or
```python
from test_numeric import test_bitwise_or
```



---
## test_bitwise_and
```python
from test_numeric import test_bitwise_and
```



---
## test_bitwise_xor
```python
from test_numeric import test_bitwise_xor
```



---
## setup_method
```python
from test_numeric import setup_method
```



---
## test_all_any
```python
from test_numeric import test_all_any
```



---
## test_logical_not_abs
```python
from test_numeric import test_logical_not_abs
```



---
## test_logical_and_or_xor
```python
from test_numeric import test_logical_and_or_xor
```



---
## test_float
```python
from test_numeric import test_float
```



---
## test_double
```python
from test_numeric import test_double
```



---
## test_default
```python
from test_numeric import test_default
```



---
## test_set
```python
from test_numeric import test_set
```



---
## test_divide_err
```python
from test_numeric import test_divide_err
```



---
## test_errobj
```python
from test_numeric import test_errobj
```



---
## test_errobj_noerrmask
```python
from test_numeric import test_errobj_noerrmask
```



---
## assert_raises_fpe
```python
from test_numeric import assert_raises_fpe
```



---
## assert_op_raises_fpe
```python
from test_numeric import assert_op_raises_fpe
```



---
## test_floating_exceptions
```python
from test_numeric import test_floating_exceptions
```



---
## test_warnings
```python
from test_numeric import test_warnings
```



---
## check_promotion_cases
```python
from test_numeric import check_promotion_cases
```



---
## test_coercion
```python
from test_numeric import test_coercion
```



---
## test_result_type
```python
from test_numeric import test_result_type
```



---
## test_promote_types_endian
```python
from test_numeric import test_promote_types_endian
```



---
## test_can_cast_and_promote_usertypes
```python
from test_numeric import test_can_cast_and_promote_usertypes
```



---
## test_promote_types_strings
```python
from test_numeric import test_promote_types_strings
```



---
## test_invalid_void_promotion
```python
from test_numeric import test_invalid_void_promotion
```



---
## test_valid_void_promotion
```python
from test_numeric import test_valid_void_promotion
```



---
## test_promote_identical_types_metadata
```python
from test_numeric import test_promote_identical_types_metadata
```



---
## test_promote_types_metadata
```python
from test_numeric import test_promote_types_metadata
```

Metadata handling in promotion does not appear formalized
right now in NumPy. This test should thus be considered to
document behaviour, rather than test the correct definition of it.

This test is very ugly, it was useful for rewriting part of the
promotion, but probably should eventually be replaced/deleted
(i.e. when metadata handling in promotion is better defined).

---
## test_can_cast
```python
from test_numeric import test_can_cast
```



---
## test_can_cast_simple_to_structured
```python
from test_numeric import test_can_cast_simple_to_structured
```



---
## test_can_cast_structured_to_simple
```python
from test_numeric import test_can_cast_structured_to_simple
```



---
## test_can_cast_values
```python
from test_numeric import test_can_cast_values
```



---
## makegen
```python
from test_numeric import makegen
```



---
## test_types
```python
from test_numeric import test_types
```



---
## test_lengths
```python
from test_numeric import test_lengths
```



---
## test_values
```python
from test_numeric import test_values
```



---
## load_data
```python
from test_numeric import load_data
```



---
## test_2592
```python
from test_numeric import test_2592
```



---
## test_empty_not_structured
```python
from test_numeric import test_empty_not_structured
```



---
## test_growth_and_complicated_dtypes
```python
from test_numeric import test_growth_and_complicated_dtypes
```



---
## test_empty_result
```python
from test_numeric import test_empty_result
```



---
## test_too_few_items
```python
from test_numeric import test_too_few_items
```



---
## test_failed_itemsetting
```python
from test_numeric import test_failed_itemsetting
```



---
## test_nonzero_trivial
```python
from test_numeric import test_nonzero_trivial
```



---
## test_nonzero_zerod
```python
from test_numeric import test_nonzero_zerod
```



---
## test_nonzero_onedim
```python
from test_numeric import test_nonzero_onedim
```



---
## test_nonzero_twodim
```python
from test_numeric import test_nonzero_twodim
```



---
## test_sparse
```python
from test_numeric import test_sparse
```



---
## test_return_type
```python
from test_numeric import test_return_type
```



---
## test_count_nonzero_axis
```python
from test_numeric import test_count_nonzero_axis
```



---
## test_count_nonzero_axis_all_dtypes
```python
from test_numeric import test_count_nonzero_axis_all_dtypes
```



---
## test_count_nonzero_axis_consistent
```python
from test_numeric import test_count_nonzero_axis_consistent
```



---
## test_countnonzero_axis_empty
```python
from test_numeric import test_countnonzero_axis_empty
```



---
## test_countnonzero_keepdims
```python
from test_numeric import test_countnonzero_keepdims
```



---
## test_array_method
```python
from test_numeric import test_array_method
```



---
## test_nonzero_invalid_object
```python
from test_numeric import test_nonzero_invalid_object
```



---
## test_nonzero_sideeffect_safety
```python
from test_numeric import test_nonzero_sideeffect_safety
```



---
## test_nonzero_sideffects_structured_void
```python
from test_numeric import test_nonzero_sideffects_structured_void
```



---
## test_nonzero_exception_safe
```python
from test_numeric import test_nonzero_exception_safe
```



---
## test_structured_threadsafety
```python
from test_numeric import test_structured_threadsafety
```



---
## test_boolean
```python
from test_numeric import test_boolean
```



---
## test_boolean_edgecase
```python
from test_numeric import test_boolean_edgecase
```



---
## test_zero
```python
from test_numeric import test_zero
```



---
## test_positive
```python
from test_numeric import test_positive
```



---
## test_negative
```python
from test_numeric import test_negative
```



---
## test_sufficient_width
```python
from test_numeric import test_sufficient_width
```



---
## test_neg_width_boundaries
```python
from test_numeric import test_neg_width_boundaries
```



---
## test_large_neg_int64
```python
from test_numeric import test_large_neg_int64
```



---
## test_base3
```python
from test_numeric import test_base3
```



---
## test_base_range
```python
from test_numeric import test_base_range
```



---
## test_array_equal
```python
from test_numeric import test_array_equal
```



---
## test_array_equal_equal_nan
```python
from test_numeric import test_array_equal_equal_nan
```



---
## test_none_compares_elementwise
```python
from test_numeric import test_none_compares_elementwise
```



---
## test_array_equiv
```python
from test_numeric import test_array_equiv
```



---
## test_compare_unstructured_voids
```python
from test_numeric import test_compare_unstructured_voids
```



---
## fastclip
```python
from test_numeric import fastclip
```



---
## clip
```python
from test_numeric import clip
```



---
## _generate_data
```python
from test_numeric import _generate_data
```



---
## _generate_data_complex
```python
from test_numeric import _generate_data_complex
```



---
## _generate_flt_data
```python
from test_numeric import _generate_flt_data
```



---
## _neg_byteorder
```python
from test_numeric import _neg_byteorder
```



---
## _generate_non_native_data
```python
from test_numeric import _generate_non_native_data
```



---
## _generate_int_data
```python
from test_numeric import _generate_int_data
```



---
## _generate_int32_data
```python
from test_numeric import _generate_int32_data
```



---
## test_ones_pathological
```python
from test_numeric import test_ones_pathological
```



---
## test_simple_double
```python
from test_numeric import test_simple_double
```



---
## test_simple_int
```python
from test_numeric import test_simple_int
```



---
## test_array_double
```python
from test_numeric import test_array_double
```



---
## test_simple_nonnative
```python
from test_numeric import test_simple_nonnative
```



---
## test_simple_complex
```python
from test_numeric import test_simple_complex
```



---
## test_clip_complex
```python
from test_numeric import test_clip_complex
```



---
## test_clip_non_contig
```python
from test_numeric import test_clip_non_contig
```



---
## test_simple_out
```python
from test_numeric import test_simple_out
```



---
## test_simple_int32_inout
```python
from test_numeric import test_simple_int32_inout
```



---
## test_simple_int64_out
```python
from test_numeric import test_simple_int64_out
```



---
## test_simple_int64_inout
```python
from test_numeric import test_simple_int64_inout
```



---
## test_simple_int32_out
```python
from test_numeric import test_simple_int32_out
```



---
## test_simple_inplace_01
```python
from test_numeric import test_simple_inplace_01
```



---
## test_simple_inplace_02
```python
from test_numeric import test_simple_inplace_02
```



---
## test_noncontig_inplace
```python
from test_numeric import test_noncontig_inplace
```



---
## test_type_cast_01
```python
from test_numeric import test_type_cast_01
```



---
## test_type_cast_02
```python
from test_numeric import test_type_cast_02
```



---
## test_type_cast_03
```python
from test_numeric import test_type_cast_03
```



---
## test_type_cast_04
```python
from test_numeric import test_type_cast_04
```



---
## test_type_cast_05
```python
from test_numeric import test_type_cast_05
```



---
## test_type_cast_06
```python
from test_numeric import test_type_cast_06
```



---
## test_type_cast_07
```python
from test_numeric import test_type_cast_07
```



---
## test_type_cast_08
```python
from test_numeric import test_type_cast_08
```



---
## test_type_cast_09
```python
from test_numeric import test_type_cast_09
```



---
## test_type_cast_10
```python
from test_numeric import test_type_cast_10
```



---
## test_type_cast_11
```python
from test_numeric import test_type_cast_11
```



---
## test_type_cast_12
```python
from test_numeric import test_type_cast_12
```



---
## test_clip_with_out_simple
```python
from test_numeric import test_clip_with_out_simple
```



---
## test_clip_with_out_simple2
```python
from test_numeric import test_clip_with_out_simple2
```



---
## test_clip_with_out_simple_int32
```python
from test_numeric import test_clip_with_out_simple_int32
```



---
## test_clip_with_out_array_int32
```python
from test_numeric import test_clip_with_out_array_int32
```



---
## test_clip_with_out_array_outint32
```python
from test_numeric import test_clip_with_out_array_outint32
```



---
## test_clip_with_out_transposed
```python
from test_numeric import test_clip_with_out_transposed
```



---
## test_clip_with_out_memory_overlap
```python
from test_numeric import test_clip_with_out_memory_overlap
```



---
## test_clip_inplace_array
```python
from test_numeric import test_clip_inplace_array
```



---
## test_clip_inplace_simple
```python
from test_numeric import test_clip_inplace_simple
```



---
## test_clip_func_takes_out
```python
from test_numeric import test_clip_func_takes_out
```



---
## test_clip_nan
```python
from test_numeric import test_clip_nan
```



---
## test_object_clip
```python
from test_numeric import test_object_clip
```



---
## test_clip_all_none
```python
from test_numeric import test_clip_all_none
```



---
## test_clip_invalid_casting
```python
from test_numeric import test_clip_invalid_casting
```



---
## test_clip_value_min_max_flip
```python
from test_numeric import test_clip_value_min_max_flip
```



---
## test_clip_problem_cases
```python
from test_numeric import test_clip_problem_cases
```



---
## test_clip_scalar_nan_propagation
```python
from test_numeric import test_clip_scalar_nan_propagation
```



---
## test_NaT_propagation
```python
from test_numeric import test_NaT_propagation
```



---
## test_clip_property
```python
from test_numeric import test_clip_property
```

A property-based test using Hypothesis.

This aims for maximum generality: it could in principle generate *any*
valid inputs to np.clip, and in practice generates much more varied
inputs than human testers come up with.

Because many of the inputs have tricky dependencies - compatible dtypes
and mutually-broadcastable shapes - we use `st.data()` strategy draw
values *inside* the test function, from strategies we construct based
on previous values.  An alternative would be to define a custom strategy
with `@st.composite`, but until we have duplicated code inline is fine.

That accounts for most of the function; the actual test is just three
lines to calculate and compare actual vs expected results!

---
## teardown_method
```python
from test_numeric import teardown_method
```



---
## tst_allclose
```python
from test_numeric import tst_allclose
```



---
## tst_not_allclose
```python
from test_numeric import tst_not_allclose
```



---
## test_ip_allclose
```python
from test_numeric import test_ip_allclose
```



---
## test_ip_not_allclose
```python
from test_numeric import test_ip_not_allclose
```



---
## test_no_parameter_modification
```python
from test_numeric import test_no_parameter_modification
```



---
## test_min_int
```python
from test_numeric import test_min_int
```



---
## test_equalnan
```python
from test_numeric import test_equalnan
```



---
## test_return_class_is_ndarray
```python
from test_numeric import test_return_class_is_ndarray
```



---
## _setup
```python
from test_numeric import _setup
```



---
## test_ip_isclose
```python
from test_numeric import test_ip_isclose
```



---
## tst_all_isclose
```python
from test_numeric import tst_all_isclose
```



---
## tst_none_isclose
```python
from test_numeric import tst_none_isclose
```



---
## tst_isclose_allclose
```python
from test_numeric import tst_isclose_allclose
```



---
## test_ip_all_isclose
```python
from test_numeric import test_ip_all_isclose
```



---
## test_ip_none_isclose
```python
from test_numeric import test_ip_none_isclose
```



---
## test_ip_isclose_allclose
```python
from test_numeric import test_ip_isclose_allclose
```



---
## test_equal_nan
```python
from test_numeric import test_equal_nan
```



---
## test_masked_arrays
```python
from test_numeric import test_masked_arrays
```



---
## test_scalar_return
```python
from test_numeric import test_scalar_return
```



---
## test_non_finite_scalar
```python
from test_numeric import test_non_finite_scalar
```



---
## test_timedelta
```python
from test_numeric import test_timedelta
```



---
## test_basic
```python
from test_numeric import test_basic
```



---
## test_scalars
```python
from test_numeric import test_scalars
```



---
## test_ddof1
```python
from test_numeric import test_ddof1
```



---
## test_ddof2
```python
from test_numeric import test_ddof2
```



---
## test_out_scalar
```python
from test_numeric import test_out_scalar
```



---
## check_function
```python
from test_numeric import check_function
```



---
## test_zeros
```python
from test_numeric import test_zeros
```



---
## test_ones
```python
from test_numeric import test_ones
```



---
## test_empty
```python
from test_numeric import test_empty
```



---
## test_full
```python
from test_numeric import test_full
```



---
## test_for_reference_leak
```python
from test_numeric import test_for_reference_leak
```



---
## compare_array_value
```python
from test_numeric import compare_array_value
```



---
## check_like_function
```python
from test_numeric import check_like_function
```



---
## test_ones_like
```python
from test_numeric import test_ones_like
```



---
## test_zeros_like
```python
from test_numeric import test_zeros_like
```



---
## test_empty_like
```python
from test_numeric import test_empty_like
```



---
## test_filled_like
```python
from test_numeric import test_filled_like
```



---
## test_dtype_str_bytes
```python
from test_numeric import test_dtype_str_bytes
```



---
## test_object
```python
from test_numeric import test_object
```



---
## test_no_overwrite
```python
from test_numeric import test_no_overwrite
```



---
## test_complex
```python
from test_numeric import test_complex
```



---
## test_zero_size
```python
from test_numeric import test_zero_size
```



---
## test_mode
```python
from test_numeric import test_mode
```



---
## test_nd
```python
from test_numeric import test_nd
```



---
## test_2D
```python
from test_numeric import test_2D
```



---
## test_list
```python
from test_numeric import test_list
```



---
## test_set_string_function
```python
from test_numeric import test_set_string_function
```



---
## test_roll1d
```python
from test_numeric import test_roll1d
```



---
## test_roll2d
```python
from test_numeric import test_roll2d
```



---
## test_roll_empty
```python
from test_numeric import test_roll_empty
```



---
## test_exceptions
```python
from test_numeric import test_exceptions
```



---
## test_results
```python
from test_numeric import test_results
```



---
## test_move_to_end
```python
from test_numeric import test_move_to_end
```



---
## test_move_new_position
```python
from test_numeric import test_move_new_position
```



---
## test_preserve_order
```python
from test_numeric import test_preserve_order
```



---
## test_move_multiples
```python
from test_numeric import test_move_multiples
```



---
## test_errors
```python
from test_numeric import test_errors
```



---
## test_array_likes
```python
from test_numeric import test_array_likes
```



---
## test_2x2
```python
from test_numeric import test_2x2
```



---
## test_2x3
```python
from test_numeric import test_2x3
```



---
## test_3x3
```python
from test_numeric import test_3x3
```



---
## test_broadcasting
```python
from test_numeric import test_broadcasting
```



---
## test_broadcasting_shapes
```python
from test_numeric import test_broadcasting_shapes
```



---
## test_uint8_int32_mixed_dtypes
```python
from test_numeric import test_uint8_int32_mixed_dtypes
```



---
## test_simple
```python
from test_numeric import test_simple
```



---
## test_single_input
```python
from test_numeric import test_single_input
```



---
## test_scalar_input
```python
from test_numeric import test_scalar_input
```



---
## generate_all_false
```python
from test_numeric import generate_all_false
```



---
## set_and_check_flag
```python
from test_numeric import set_and_check_flag
```



---
## test_require_each
```python
from test_numeric import test_require_each
```



---
## test_unknown_requirement
```python
from test_numeric import test_unknown_requirement
```



---
## test_non_array_input
```python
from test_numeric import test_non_array_input
```



---
## test_C_and_F_simul
```python
from test_numeric import test_C_and_F_simul
```



---
## test_ensure_array
```python
from test_numeric import test_ensure_array
```



---
## test_preserve_subtype
```python
from test_numeric import test_preserve_subtype
```



---
## test_broadcast_in_args
```python
from test_numeric import test_broadcast_in_args
```



---
## test_broadcast_single_arg
```python
from test_numeric import test_broadcast_single_arg
```



---
## test_number_of_arguments
```python
from test_numeric import test_number_of_arguments
```



---
## test_broadcast_error_kwargs
```python
from test_numeric import test_broadcast_error_kwargs
```



---
## test_shape_mismatch_error_message
```python
from test_numeric import test_shape_mismatch_error_message
```



---
## sub_array
```python
from test_numeric import sub_array
```



---
## test_raise
```python
from test_numeric import test_raise
```



---
## test_zero_dimension
```python
from test_numeric import test_zero_dimension
```



---
## test_zero_dimensional
```python
from test_numeric import test_zero_dimensional
```



---
## MyArray
```python
from test_numeric import MyArray
```



---
## res_type
```python
from test_numeric import res_type
```



---
## MyIter
```python
from test_numeric import MyIter
```



---
## C
```python
from test_numeric import C
```



---
## assert_equal_w_dt
```python
from test_numeric import assert_equal_w_dt
```



---
## BoolErrors
```python
from test_numeric import BoolErrors
```



---
## FalseThenTrue
```python
from test_numeric import FalseThenTrue
```



---
## TrueThenFalse
```python
from test_numeric import TrueThenFalse
```



---
## ThrowsAfter
```python
from test_numeric import ThrowsAfter
```



---
## func
```python
from test_numeric import func
```



---
## Foo
```python
from test_numeric import Foo
```



---
## MyNDArray
```python
from test_numeric import MyNDArray
```



---
## ArraySubclass
```python
from test_numeric import ArraySubclass
```



---
## sum
```python
from test_numeric import sum
```



---
## log_err
```python
from test_numeric import log_err
```



---
## __length_hint__
```python
from test_numeric import __length_hint__
```



---
## __iter__
```python
from test_numeric import __iter__
```



---
## __bool__
```python
from test_numeric import __bool__
```



---
## __init__
```python
from test_numeric import __init__
```



---
## __new__
```python
from test_numeric import __new__
```



---
## __name__
```python
from test_function_base import __name__
```



---
## PhysicalQuantity
```python
from test_function_base import PhysicalQuantity
```



---
## PhysicalQuantity2
```python
from test_function_base import PhysicalQuantity2
```



---
## TestLogspace
```python
from test_function_base import TestLogspace
```



---
## TestGeomspace
```python
from test_function_base import TestGeomspace
```



---
## TestLinspace
```python
from test_function_base import TestLinspace
```



---
## __new__
```python
from test_function_base import __new__
```



---
## __add__
```python
from test_function_base import __add__
```



---
## __sub__
```python
from test_function_base import __sub__
```



---
## __rsub__
```python
from test_function_base import __rsub__
```



---
## __mul__
```python
from test_function_base import __mul__
```



---
## __div__
```python
from test_function_base import __div__
```



---
## __rdiv__
```python
from test_function_base import __rdiv__
```



---
## test_basic
```python
from test_function_base import test_basic
```



---
## test_start_stop_array
```python
from test_function_base import test_start_stop_array
```



---
## test_base_array
```python
from test_function_base import test_base_array
```



---
## test_stop_base_array
```python
from test_function_base import test_stop_base_array
```



---
## test_dtype
```python
from test_function_base import test_dtype
```



---
## test_physical_quantities
```python
from test_function_base import test_physical_quantities
```



---
## test_subclass
```python
from test_function_base import test_subclass
```



---
## test_boundaries_match_start_and_stop_exactly
```python
from test_function_base import test_boundaries_match_start_and_stop_exactly
```



---
## test_nan_interior
```python
from test_function_base import test_nan_interior
```



---
## test_complex
```python
from test_function_base import test_complex
```



---
## test_start_stop_array_scalar
```python
from test_function_base import test_start_stop_array_scalar
```



---
## test_bounds
```python
from test_function_base import test_bounds
```



---
## test_corner
```python
from test_function_base import test_corner
```



---
## test_type
```python
from test_function_base import test_type
```



---
## test_array_interface
```python
from test_function_base import test_array_interface
```



---
## test_denormal_numbers
```python
from test_function_base import test_denormal_numbers
```



---
## test_equivalent_to_arange
```python
from test_function_base import test_equivalent_to_arange
```



---
## test_retstep
```python
from test_function_base import test_retstep
```



---
## test_object
```python
from test_function_base import test_object
```



---
## test_round_negative
```python
from test_function_base import test_round_negative
```



---
## test_any_step_zero_and_not_mult_inplace
```python
from test_function_base import test_any_step_zero_and_not_mult_inplace
```



---
## Arrayish
```python
from test_function_base import Arrayish
```

A generic object that supports the __array_interface__ and hence
can in principle be converted to a numeric scalar, but is not
otherwise recognized as numeric, but also happens to support
multiplication by floats.

Data should be an object that implements the buffer interface,
and contains at least 4 bytes.

---
## __init__
```python
from test_function_base import __init__
```



---
## __array_interface__
```python
from test_function_base import __array_interface__
```



---
## __name__
```python
from test_numpy_2_0_compat import __name__
```



---
## TestNumPy2Compatibility
```python
from test_numpy_2_0_compat import TestNumPy2Compatibility
```



---
## test_importable__core_stubs
```python
from test_numpy_2_0_compat import test_importable__core_stubs
```

Checks if stubs for `numpy._core` are importable.

---
## test_unpickle_numpy_2_0_file
```python
from test_numpy_2_0_compat import test_unpickle_numpy_2_0_file
```

Checks that NumPy 1.26 and pickle is able to load pickles
created with NumPy 2.0 without errors/warnings.

---
## test_numpy_load_numpy_2_0_file
```python
from test_numpy_2_0_compat import test_numpy_load_numpy_2_0_file
```

Checks that `numpy.load` for NumPy 1.26 is able to load pickles
created with NumPy 2.0 without errors/warnings.

---
## __name__
```python
from test_datetime import __name__
```



---
## TestDateTime
```python
from test_datetime import TestDateTime
```



---
## TestDateTimeData
```python
from test_datetime import TestDateTimeData
```



---
## test_comparisons_return_not_implemented
```python
from test_datetime import test_comparisons_return_not_implemented
```



---
## test_datetime_dtype_creation
```python
from test_datetime import test_datetime_dtype_creation
```



---
## test_datetime_casting_rules
```python
from test_datetime import test_datetime_casting_rules
```



---
## test_datetime_prefix_conversions
```python
from test_datetime import test_datetime_prefix_conversions
```



---
## test_prohibit_negative_datetime
```python
from test_datetime import test_prohibit_negative_datetime
```



---
## test_compare_generic_nat
```python
from test_datetime import test_compare_generic_nat
```



---
## test_datetime_nat_argsort_stability
```python
from test_datetime import test_datetime_nat_argsort_stability
```



---
## test_timedelta_nat_argsort_stability
```python
from test_datetime import test_timedelta_nat_argsort_stability
```



---
## test_datetime_timedelta_sort_nat
```python
from test_datetime import test_datetime_timedelta_sort_nat
```



---
## test_datetime_scalar_construction
```python
from test_datetime import test_datetime_scalar_construction
```



---
## test_datetime_scalar_construction_timezone
```python
from test_datetime import test_datetime_scalar_construction_timezone
```



---
## test_datetime_array_find_type
```python
from test_datetime import test_datetime_array_find_type
```



---
## test_timedelta_np_int_construction
```python
from test_datetime import test_timedelta_np_int_construction
```



---
## test_timedelta_scalar_construction
```python
from test_datetime import test_timedelta_scalar_construction
```



---
## test_timedelta_object_array_conversion
```python
from test_datetime import test_timedelta_object_array_conversion
```



---
## test_timedelta_0_dim_object_array_conversion
```python
from test_datetime import test_timedelta_0_dim_object_array_conversion
```



---
## test_timedelta_nat_format
```python
from test_datetime import test_timedelta_nat_format
```



---
## test_timedelta_scalar_construction_units
```python
from test_datetime import test_timedelta_scalar_construction_units
```



---
## test_datetime_nat_casting
```python
from test_datetime import test_datetime_nat_casting
```



---
## test_days_creation
```python
from test_datetime import test_days_creation
```



---
## test_days_to_pydate
```python
from test_datetime import test_days_to_pydate
```



---
## test_dtype_comparison
```python
from test_datetime import test_dtype_comparison
```



---
## test_pydatetime_creation
```python
from test_datetime import test_pydatetime_creation
```



---
## test_datetime_string_conversion
```python
from test_datetime import test_datetime_string_conversion
```



---
## test_time_byteswapping
```python
from test_datetime import test_time_byteswapping
```



---
## test_time_byteswapped_cast
```python
from test_datetime import test_time_byteswapped_cast
```



---
## test_datetime_conversions_byteorders
```python
from test_datetime import test_datetime_conversions_byteorders
```



---
## test_datetime_array_str
```python
from test_datetime import test_datetime_array_str
```



---
## test_timedelta_array_str
```python
from test_datetime import test_timedelta_array_str
```



---
## test_pickle
```python
from test_datetime import test_pickle
```



---
## test_setstate
```python
from test_datetime import test_setstate
```

Verify that datetime dtype __setstate__ can handle bad arguments

---
## test_dtype_promotion
```python
from test_datetime import test_dtype_promotion
```



---
## test_cast_overflow
```python
from test_datetime import test_cast_overflow
```



---
## test_pyobject_roundtrip
```python
from test_datetime import test_pyobject_roundtrip
```



---
## test_month_truncation
```python
from test_datetime import test_month_truncation
```



---
## test_different_unit_comparison
```python
from test_datetime import test_different_unit_comparison
```



---
## test_datetime_like
```python
from test_datetime import test_datetime_like
```



---
## test_datetime_unary
```python
from test_datetime import test_datetime_unary
```



---
## test_datetime_add
```python
from test_datetime import test_datetime_add
```



---
## test_datetime_subtract
```python
from test_datetime import test_datetime_subtract
```



---
## test_datetime_multiply
```python
from test_datetime import test_datetime_multiply
```



---
## test_timedelta_floor_divide
```python
from test_datetime import test_timedelta_floor_divide
```



---
## test_timedelta_floor_div_warnings
```python
from test_datetime import test_timedelta_floor_div_warnings
```



---
## test_timedelta_floor_div_precision
```python
from test_datetime import test_timedelta_floor_div_precision
```



---
## test_timedelta_floor_div_error
```python
from test_datetime import test_timedelta_floor_div_error
```



---
## test_timedelta_divmod
```python
from test_datetime import test_timedelta_divmod
```



---
## test_timedelta_divmod_warnings
```python
from test_datetime import test_timedelta_divmod_warnings
```



---
## test_datetime_divide
```python
from test_datetime import test_datetime_divide
```



---
## test_datetime_compare
```python
from test_datetime import test_datetime_compare
```



---
## test_datetime_compare_nat
```python
from test_datetime import test_datetime_compare_nat
```



---
## test_datetime_minmax
```python
from test_datetime import test_datetime_minmax
```



---
## test_hours
```python
from test_datetime import test_hours
```



---
## test_divisor_conversion_year
```python
from test_datetime import test_divisor_conversion_year
```



---
## test_divisor_conversion_month
```python
from test_datetime import test_divisor_conversion_month
```



---
## test_divisor_conversion_week
```python
from test_datetime import test_divisor_conversion_week
```



---
## test_divisor_conversion_day
```python
from test_datetime import test_divisor_conversion_day
```



---
## test_divisor_conversion_hour
```python
from test_datetime import test_divisor_conversion_hour
```



---
## test_divisor_conversion_minute
```python
from test_datetime import test_divisor_conversion_minute
```



---
## test_divisor_conversion_second
```python
from test_datetime import test_divisor_conversion_second
```



---
## test_divisor_conversion_fs
```python
from test_datetime import test_divisor_conversion_fs
```



---
## test_divisor_conversion_as
```python
from test_datetime import test_divisor_conversion_as
```



---
## test_string_parser_variants
```python
from test_datetime import test_string_parser_variants
```



---
## test_string_parser_error_check
```python
from test_datetime import test_string_parser_error_check
```



---
## test_creation_overflow
```python
from test_datetime import test_creation_overflow
```



---
## test_datetime_as_string
```python
from test_datetime import test_datetime_as_string
```



---
## test_datetime_as_string_timezone
```python
from test_datetime import test_datetime_as_string_timezone
```



---
## test_datetime_arange
```python
from test_datetime import test_datetime_arange
```



---
## test_datetime_arange_no_dtype
```python
from test_datetime import test_datetime_arange_no_dtype
```



---
## test_timedelta_arange
```python
from test_datetime import test_timedelta_arange
```



---
## test_timedelta_modulus
```python
from test_datetime import test_timedelta_modulus
```



---
## test_timedelta_modulus_error
```python
from test_datetime import test_timedelta_modulus_error
```



---
## test_timedelta_modulus_div_by_zero
```python
from test_datetime import test_timedelta_modulus_div_by_zero
```



---
## test_timedelta_modulus_type_resolution
```python
from test_datetime import test_timedelta_modulus_type_resolution
```



---
## test_timedelta_arange_no_dtype
```python
from test_datetime import test_timedelta_arange_no_dtype
```



---
## test_datetime_maximum_reduce
```python
from test_datetime import test_datetime_maximum_reduce
```



---
## test_timedelta_correct_mean
```python
from test_datetime import test_timedelta_correct_mean
```



---
## test_datetime_no_subtract_reducelike
```python
from test_datetime import test_datetime_no_subtract_reducelike
```



---
## test_datetime_busday_offset
```python
from test_datetime import test_datetime_busday_offset
```



---
## test_datetime_busdaycalendar
```python
from test_datetime import test_datetime_busdaycalendar
```



---
## test_datetime_busday_holidays_offset
```python
from test_datetime import test_datetime_busday_holidays_offset
```



---
## test_datetime_busday_holidays_count
```python
from test_datetime import test_datetime_busday_holidays_count
```



---
## test_datetime_is_busday
```python
from test_datetime import test_datetime_is_busday
```



---
## test_datetime_y2038
```python
from test_datetime import test_datetime_y2038
```



---
## test_isnat
```python
from test_datetime import test_isnat
```



---
## test_isnat_error
```python
from test_datetime import test_isnat_error
```



---
## test_isfinite_scalar
```python
from test_datetime import test_isfinite_scalar
```



---
## test_isfinite_isinf_isnan_units
```python
from test_datetime import test_isfinite_isinf_isnan_units
```

check isfinite, isinf, isnan for all units of <M, >M, <m, >m dtypes
        

---
## test_assert_equal
```python
from test_datetime import test_assert_equal
```



---
## test_corecursive_input
```python
from test_datetime import test_corecursive_input
```



---
## test_discovery_from_object_array
```python
from test_datetime import test_discovery_from_object_array
```



---
## test_limit_symmetry
```python
from test_datetime import test_limit_symmetry
```

Dates should have symmetric limits around the unix epoch at +/-np.int64

---
## test_limit_str_roundtrip
```python
from test_datetime import test_limit_str_roundtrip
```

Limits should roundtrip when converted to strings.

This tests the conversion to and from npy_datetimestruct.

---
## test_basic
```python
from test_datetime import test_basic
```



---
## test_bytes
```python
from test_datetime import test_bytes
```



---
## test_non_ascii
```python
from test_datetime import test_non_ascii
```



---
## custom
```python
from test_datetime import custom
```



---
## cast
```python
from test_datetime import cast
```



---
## cast2
```python
from test_datetime import cast2
```



---
## check
```python
from test_datetime import check
```



---
## __name__
```python
from test__exceptions import __name__
```

Tests of the ._exceptions module. Primarily for exercising the __str__ methods.

---
## TestArrayMemoryError
```python
from test__exceptions import TestArrayMemoryError
```



---
## TestUFuncNoLoopError
```python
from test__exceptions import TestUFuncNoLoopError
```



---
## TestAxisError
```python
from test__exceptions import TestAxisError
```



---
## test_pickling
```python
from test__exceptions import test_pickling
```

Test that `AxisError` can be pickled.

---
## test_str
```python
from test__exceptions import test_str
```



---
## test__size_to_string
```python
from test__exceptions import test__size_to_string
```

Test e._size_to_string 

---
## test__total_size
```python
from test__exceptions import test__total_size
```

Test e._total_size 

---
## test_attr
```python
from test__exceptions import test_attr
```

Validate attribute types.

---
## __name__
```python
from test_extint128 import __name__
```



---
## exc_iter
```python
from test_extint128 import exc_iter
```

Iterate over Cartesian product of *args, and if an exception is raised,
add information of the current iterate.

---
## test_safe_binop
```python
from test_extint128 import test_safe_binop
```



---
## test_to_128
```python
from test_extint128 import test_to_128
```



---
## test_to_64
```python
from test_extint128 import test_to_64
```



---
## test_mul_64_64
```python
from test_extint128 import test_mul_64_64
```



---
## test_add_128
```python
from test_extint128 import test_add_128
```



---
## test_sub_128
```python
from test_extint128 import test_sub_128
```



---
## test_neg_128
```python
from test_extint128 import test_neg_128
```



---
## test_shl_128
```python
from test_extint128 import test_shl_128
```



---
## test_shr_128
```python
from test_extint128 import test_shr_128
```



---
## test_gt_128
```python
from test_extint128 import test_gt_128
```



---
## test_divmod_128_64
```python
from test_extint128 import test_divmod_128_64
```



---
## test_floordiv_128_64
```python
from test_extint128 import test_floordiv_128_64
```



---
## test_ceildiv_128_64
```python
from test_extint128 import test_ceildiv_128_64
```



---
## iterate
```python
from test_extint128 import iterate
```



---
## __name__
```python
from test_cython import __name__
```



---
## install_temp
```python
from test_cython import install_temp
```



---
## test_is_timedelta64_object
```python
from test_cython import test_is_timedelta64_object
```



---
## test_is_datetime64_object
```python
from test_cython import test_is_datetime64_object
```



---
## test_get_datetime64_value
```python
from test_cython import test_get_datetime64_value
```



---
## test_get_timedelta64_value
```python
from test_cython import test_get_timedelta64_value
```



---
## test_get_datetime64_unit
```python
from test_cython import test_get_datetime64_unit
```



---
## test_abstract_scalars
```python
from test_cython import test_abstract_scalars
```



---
## test_conv_intp
```python
from test_cython import test_conv_intp
```



---
## myint
```python
from test_cython import myint
```



---
## __int__
```python
from test_cython import __int__
```



---
## __name__
```python
from test_umath_complex import __name__
```



---
## TestCexp
```python
from test_umath_complex import TestCexp
```



---
## TestClog
```python
from test_umath_complex import TestClog
```



---
## TestCsqrt
```python
from test_umath_complex import TestCsqrt
```



---
## TestCpow
```python
from test_umath_complex import TestCpow
```



---
## TestCabs
```python
from test_umath_complex import TestCabs
```



---
## TestCarg
```python
from test_umath_complex import TestCarg
```



---
## check_real_value
```python
from test_umath_complex import check_real_value
```



---
## check_complex_value
```python
from test_umath_complex import check_complex_value
```



---
## TestSpecialComplexAVX
```python
from test_umath_complex import TestSpecialComplexAVX
```



---
## TestComplexAbsoluteAVX
```python
from test_umath_complex import TestComplexAbsoluteAVX
```



---
## TestComplexAbsoluteMixedDTypes
```python
from test_umath_complex import TestComplexAbsoluteMixedDTypes
```



---
## test_simple
```python
from test_umath_complex import test_simple
```



---
## test_special_values
```python
from test_umath_complex import test_special_values
```



---
## test_special_values2
```python
from test_umath_complex import test_special_values2
```



---
## test_simple_conjugate
```python
from test_umath_complex import test_simple_conjugate
```



---
## setup_method
```python
from test_umath_complex import setup_method
```



---
## teardown_method
```python
from test_umath_complex import teardown_method
```



---
## test_scalar
```python
from test_umath_complex import test_scalar
```



---
## test_array
```python
from test_umath_complex import test_array
```



---
## test_fabs
```python
from test_umath_complex import test_fabs
```



---
## test_cabs_inf_nan
```python
from test_umath_complex import test_cabs_inf_nan
```



---
## test_zero
```python
from test_umath_complex import test_zero
```



---
## _check_ninf_inf
```python
from test_umath_complex import _check_ninf_inf
```



---
## _check_inf_inf
```python
from test_umath_complex import _check_inf_inf
```



---
## _check_ninf_nan
```python
from test_umath_complex import _check_ninf_nan
```



---
## _check_inf_nan
```python
from test_umath_complex import _check_inf_nan
```



---
## f
```python
from test_umath_complex import f
```



---
## g
```python
from test_umath_complex import g
```



---
## __name__
```python
from _locales import __name__
```

Provide class for testing in French locale

---
## find_comma_decimal_point_locale
```python
from _locales import find_comma_decimal_point_locale
```

See if platform has a decimal point as comma locale.

Find a locale that uses a comma instead of a period as the
decimal point.

Returns
-------
old_locale: str
    Locale when the function was called.
new_locale: {str, None)
    First French locale found, None if none found.

---
## CommaDecimalPointLocale
```python
from _locales import CommaDecimalPointLocale
```

Sets LC_NUMERIC to a locale with comma as decimal point.

Classes derived from this class have setup and teardown methods that run
tests with locale.LC_NUMERIC set to a locale where commas (',') are used as
the decimal point instead of periods ('.'). On exit the locale is restored
to the initial locale. It also serves as context manager with the same
effect. If no such locale is available, the test is skipped.

.. versionadded:: 1.15.0

---
## setup_method
```python
from _locales import setup_method
```



---
## teardown_method
```python
from _locales import teardown_method
```



---
## __enter__
```python
from _locales import __enter__
```



---
## __exit__
```python
from _locales import __exit__
```



---
## __name__
```python
from test_custom_dtypes import __name__
```



---
## TestSFloat
```python
from test_custom_dtypes import TestSFloat
```



---
## test_type_pickle
```python
from test_custom_dtypes import test_type_pickle
```



---
## test_is_numeric
```python
from test_custom_dtypes import test_is_numeric
```



---
## _get_array
```python
from test_custom_dtypes import _get_array
```



---
## test_sfloat_rescaled
```python
from test_custom_dtypes import test_sfloat_rescaled
```



---
## test_class_discovery
```python
from test_custom_dtypes import test_class_discovery
```



---
## test_scaled_float_from_floats
```python
from test_custom_dtypes import test_scaled_float_from_floats
```



---
## test_repr
```python
from test_custom_dtypes import test_repr
```



---
## test_dtype_name
```python
from test_custom_dtypes import test_dtype_name
```



---
## test_sfloat_from_float
```python
from test_custom_dtypes import test_sfloat_from_float
```



---
## test_sfloat_getitem
```python
from test_custom_dtypes import test_sfloat_getitem
```



---
## test_sfloat_casts
```python
from test_custom_dtypes import test_sfloat_casts
```



---
## test_sfloat_cast_internal_errors
```python
from test_custom_dtypes import test_sfloat_cast_internal_errors
```



---
## test_sfloat_promotion
```python
from test_custom_dtypes import test_sfloat_promotion
```



---
## test_basic_multiply
```python
from test_custom_dtypes import test_basic_multiply
```



---
## test_possible_and_impossible_reduce
```python
from test_custom_dtypes import test_possible_and_impossible_reduce
```



---
## test_basic_ufunc_at
```python
from test_custom_dtypes import test_basic_ufunc_at
```



---
## test_basic_multiply_promotion
```python
from test_custom_dtypes import test_basic_multiply_promotion
```



---
## test_basic_addition
```python
from test_custom_dtypes import test_basic_addition
```



---
## test_addition_cast_safety
```python
from test_custom_dtypes import test_addition_cast_safety
```

The addition method is special for the scaled float, because it
includes the "cast" between different factors, thus cast-safety
is influenced by the implementation.

---
## test_logical_ufuncs_casts_to_bool
```python
from test_custom_dtypes import test_logical_ufuncs_casts_to_bool
```



---
## test_wrapped_and_wrapped_reductions
```python
from test_custom_dtypes import test_wrapped_and_wrapped_reductions
```



---
## test_astype_class
```python
from test_custom_dtypes import test_astype_class
```



---
## test_creation_class
```python
from test_custom_dtypes import test_creation_class
```



---
## __name__
```python
from test_defchararray import __name__
```



---
## TestBasic
```python
from test_defchararray import TestBasic
```



---
## TestVecString
```python
from test_defchararray import TestVecString
```



---
## TestWhitespace
```python
from test_defchararray import TestWhitespace
```



---
## TestChar
```python
from test_defchararray import TestChar
```



---
## TestComparisons
```python
from test_defchararray import TestComparisons
```



---
## TestComparisonsMixed1
```python
from test_defchararray import TestComparisonsMixed1
```

Ticket #1276

---
## TestComparisonsMixed2
```python
from test_defchararray import TestComparisonsMixed2
```

Ticket #1276

---
## TestInformation
```python
from test_defchararray import TestInformation
```



---
## TestMethods
```python
from test_defchararray import TestMethods
```



---
## TestOperations
```python
from test_defchararray import TestOperations
```



---
## test_empty_indexing
```python
from test_defchararray import test_empty_indexing
```

Regression test for ticket 1948.

---
## test_add_types
```python
from test_defchararray import test_add_types
```



---
## test_from_object_array
```python
from test_defchararray import test_from_object_array
```



---
## test_from_object_array_unicode
```python
from test_defchararray import test_from_object_array_unicode
```



---
## test_from_string_array
```python
from test_defchararray import test_from_string_array
```



---
## test_from_unicode_array
```python
from test_defchararray import test_from_unicode_array
```



---
## test_unicode_upconvert
```python
from test_defchararray import test_unicode_upconvert
```



---
## test_from_string
```python
from test_defchararray import test_from_string
```



---
## test_from_unicode
```python
from test_defchararray import test_from_unicode
```



---
## test_non_existent_method
```python
from test_defchararray import test_non_existent_method
```



---
## test_non_string_array
```python
from test_defchararray import test_non_string_array
```



---
## test_invalid_args_tuple
```python
from test_defchararray import test_invalid_args_tuple
```



---
## test_invalid_type_descr
```python
from test_defchararray import test_invalid_type_descr
```



---
## test_invalid_function_args
```python
from test_defchararray import test_invalid_function_args
```



---
## test_invalid_result_type
```python
from test_defchararray import test_invalid_result_type
```



---
## test_broadcast_error
```python
from test_defchararray import test_broadcast_error
```



---
## setup_method
```python
from test_defchararray import setup_method
```



---
## test1
```python
from test_defchararray import test1
```



---
## test_it
```python
from test_defchararray import test_it
```



---
## test_not_equal
```python
from test_defchararray import test_not_equal
```



---
## test_equal
```python
from test_defchararray import test_equal
```



---
## test_greater_equal
```python
from test_defchararray import test_greater_equal
```



---
## test_less_equal
```python
from test_defchararray import test_less_equal
```



---
## test_greater
```python
from test_defchararray import test_greater
```



---
## test_less
```python
from test_defchararray import test_less
```



---
## test_type
```python
from test_defchararray import test_type
```



---
## test_len
```python
from test_defchararray import test_len
```



---
## test_count
```python
from test_defchararray import test_count
```



---
## test_endswith
```python
from test_defchararray import test_endswith
```



---
## test_find
```python
from test_defchararray import test_find
```



---
## test_index
```python
from test_defchararray import test_index
```



---
## test_isalnum
```python
from test_defchararray import test_isalnum
```



---
## test_isalpha
```python
from test_defchararray import test_isalpha
```



---
## test_isdigit
```python
from test_defchararray import test_isdigit
```



---
## test_islower
```python
from test_defchararray import test_islower
```



---
## test_isspace
```python
from test_defchararray import test_isspace
```



---
## test_istitle
```python
from test_defchararray import test_istitle
```



---
## test_isupper
```python
from test_defchararray import test_isupper
```



---
## test_rfind
```python
from test_defchararray import test_rfind
```



---
## test_rindex
```python
from test_defchararray import test_rindex
```



---
## test_startswith
```python
from test_defchararray import test_startswith
```



---
## test_capitalize
```python
from test_defchararray import test_capitalize
```



---
## test_center
```python
from test_defchararray import test_center
```



---
## test_decode
```python
from test_defchararray import test_decode
```



---
## test_encode
```python
from test_defchararray import test_encode
```



---
## test_expandtabs
```python
from test_defchararray import test_expandtabs
```



---
## test_join
```python
from test_defchararray import test_join
```



---
## test_ljust
```python
from test_defchararray import test_ljust
```



---
## test_lower
```python
from test_defchararray import test_lower
```



---
## test_lstrip
```python
from test_defchararray import test_lstrip
```



---
## test_partition
```python
from test_defchararray import test_partition
```



---
## test_replace
```python
from test_defchararray import test_replace
```



---
## test_rjust
```python
from test_defchararray import test_rjust
```



---
## test_rpartition
```python
from test_defchararray import test_rpartition
```



---
## test_rsplit
```python
from test_defchararray import test_rsplit
```



---
## test_rstrip
```python
from test_defchararray import test_rstrip
```



---
## test_strip
```python
from test_defchararray import test_strip
```



---
## test_split
```python
from test_defchararray import test_split
```



---
## test_splitlines
```python
from test_defchararray import test_splitlines
```



---
## test_swapcase
```python
from test_defchararray import test_swapcase
```



---
## test_title
```python
from test_defchararray import test_title
```



---
## test_upper
```python
from test_defchararray import test_upper
```



---
## test_isnumeric
```python
from test_defchararray import test_isnumeric
```



---
## test_isdecimal
```python
from test_defchararray import test_isdecimal
```



---
## test_add
```python
from test_defchararray import test_add
```



---
## test_radd
```python
from test_defchararray import test_radd
```



---
## test_mul
```python
from test_defchararray import test_mul
```



---
## test_rmul
```python
from test_defchararray import test_rmul
```



---
## test_mod
```python
from test_defchararray import test_mod
```

Ticket #856

---
## test_rmod
```python
from test_defchararray import test_rmod
```



---
## test_slice
```python
from test_defchararray import test_slice
```

Regression test for https://github.com/numpy/numpy/issues/5982

---
## fail
```python
from test_defchararray import fail
```



---
## __name__
```python
from test_conversion_utils import __name__
```

Tests for numpy/core/src/multiarray/conversion_utils.c

---
## StringConverterTestCase
```python
from test_conversion_utils import StringConverterTestCase
```



---
## TestByteorderConverter
```python
from test_conversion_utils import TestByteorderConverter
```

Tests of PyArray_ByteorderConverter 

---
## TestSortkindConverter
```python
from test_conversion_utils import TestSortkindConverter
```

Tests of PyArray_SortkindConverter 

---
## TestSelectkindConverter
```python
from test_conversion_utils import TestSelectkindConverter
```

Tests of PyArray_SelectkindConverter 

---
## TestSearchsideConverter
```python
from test_conversion_utils import TestSearchsideConverter
```

Tests of PyArray_SearchsideConverter 

---
## TestOrderConverter
```python
from test_conversion_utils import TestOrderConverter
```

Tests of PyArray_OrderConverter 

---
## TestClipmodeConverter
```python
from test_conversion_utils import TestClipmodeConverter
```

Tests of PyArray_ClipmodeConverter 

---
## TestCastingConverter
```python
from test_conversion_utils import TestCastingConverter
```

Tests of PyArray_CastingConverter 

---
## TestIntpConverter
```python
from test_conversion_utils import TestIntpConverter
```

Tests of PyArray_IntpConverter 

---
## _check_value_error
```python
from test_conversion_utils import _check_value_error
```



---
## _check_conv_assert_warn
```python
from test_conversion_utils import _check_conv_assert_warn
```



---
## _check
```python
from test_conversion_utils import _check
```

Takes valid non-deprecated inputs for converters,
runs converters on inputs, checks correctness of outputs,
warnings and errors

---
## test_wrong_type
```python
from test_conversion_utils import test_wrong_type
```



---
## test_wrong_value
```python
from test_conversion_utils import test_wrong_value
```



---
## test_valid
```python
from test_conversion_utils import test_valid
```



---
## test_flatten_invalid_order
```python
from test_conversion_utils import test_flatten_invalid_order
```



---
## test_basic
```python
from test_conversion_utils import test_basic
```



---
## test_none
```python
from test_conversion_utils import test_none
```



---
## test_float
```python
from test_conversion_utils import test_float
```



---
## test_too_large
```python
from test_conversion_utils import test_too_large
```



---
## test_too_many_dims
```python
from test_conversion_utils import test_too_many_dims
```



---
## __name__
```python
from test_scalarprint import __name__
```

Test printing of scalar types.

---
## TestRealScalars
```python
from test_scalarprint import TestRealScalars
```



---
## test_str
```python
from test_scalarprint import test_str
```



---
## test_scalar_cutoffs
```python
from test_scalarprint import test_scalar_cutoffs
```



---
## test_py2_float_print
```python
from test_scalarprint import test_py2_float_print
```



---
## test_dragon4
```python
from test_scalarprint import test_dragon4
```



---
## test_dragon4_interface
```python
from test_scalarprint import test_dragon4_interface
```



---
## test_ppc64_ibm_double_double128
```python
from test_scalarprint import test_ppc64_ibm_double_double128
```



---
## float32_roundtrip
```python
from test_scalarprint import float32_roundtrip
```



---
## float64_vs_python
```python
from test_scalarprint import float64_vs_python
```



---
## check
```python
from test_scalarprint import check
```



---
## userinput
```python
from test_scalarprint import userinput
```



---
## __name__
```python
from test_casting_unittests import __name__
```

The tests exercise the casting machinery in a more low-level manner.
The reason is mostly to test a new implementation of the casting machinery.

Unlike most tests in NumPy, these are closer to unit-tests rather
than integration tests.

---
## simple_dtype_instances
```python
from test_casting_unittests import simple_dtype_instances
```



---
## get_expected_stringlength
```python
from test_casting_unittests import get_expected_stringlength
```

Returns the string length when casting the basic dtypes to strings.
    

---
## Casting
```python
from test_casting_unittests import Casting
```



---
## _get_cancast_table
```python
from test_casting_unittests import _get_cancast_table
```



---
## TestChanges
```python
from test_casting_unittests import TestChanges
```

These test cases exercise some behaviour changes

---
## TestCasting
```python
from test_casting_unittests import TestCasting
```



---
## test_float_to_string
```python
from test_casting_unittests import test_float_to_string
```



---
## test_to_void
```python
from test_casting_unittests import test_to_void
```



---
## get_data
```python
from test_casting_unittests import get_data
```



---
## get_data_variation
```python
from test_casting_unittests import get_data_variation
```

Returns a copy of arr1 that may be non-contiguous or unaligned, and a
matching array for arr2 (although not a copy).

---
## test_simple_cancast
```python
from test_casting_unittests import test_simple_cancast
```



---
## test_simple_direct_casts
```python
from test_casting_unittests import test_simple_direct_casts
```

This test checks numeric direct casts for dtypes supported also by the
struct module (plus complex).  It tries to be test a wide range of
inputs, but skips over possibly undefined behaviour (e.g. int rollover).
Longdouble and CLongdouble are tested, but only using double precision.

If this test creates issues, it should possibly just be simplified
or even removed (checking whether unaligned/non-contiguous casts give
the same results is useful, though).

---
## test_numeric_to_times
```python
from test_casting_unittests import test_numeric_to_times
```



---
## test_time_to_time
```python
from test_casting_unittests import test_time_to_time
```



---
## string_with_modified_length
```python
from test_casting_unittests import string_with_modified_length
```



---
## test_string_cancast
```python
from test_casting_unittests import test_string_cancast
```



---
## test_simple_string_casts_roundtrip
```python
from test_casting_unittests import test_simple_string_casts_roundtrip
```

Tests casts from and to string by checking the roundtripping property.

The test also covers some string to string casts (but not all).

If this test creates issues, it should possibly just be simplified
or even removed (checking whether unaligned/non-contiguous casts give
the same results is useful, though).

---
## test_string_to_string_cancast
```python
from test_casting_unittests import test_string_to_string_cancast
```



---
## test_unicode_byteswapped_cast
```python
from test_casting_unittests import test_unicode_byteswapped_cast
```



---
## test_void_to_string_special_case
```python
from test_casting_unittests import test_void_to_string_special_case
```



---
## test_object_to_parametric_internal_error
```python
from test_casting_unittests import test_object_to_parametric_internal_error
```



---
## test_object_and_simple_resolution
```python
from test_casting_unittests import test_object_and_simple_resolution
```



---
## test_simple_to_object_resolution
```python
from test_casting_unittests import test_simple_to_object_resolution
```



---
## test_void_and_structured_with_subarray
```python
from test_casting_unittests import test_void_and_structured_with_subarray
```



---
## test_structured_field_offsets
```python
from test_casting_unittests import test_structured_field_offsets
```



---
## test_structured_view_offsets_paramteric
```python
from test_casting_unittests import test_structured_view_offsets_paramteric
```



---
## test_object_casts_NULL_None_equivalence
```python
from test_casting_unittests import test_object_casts_NULL_None_equivalence
```



---
## test_nonstandard_bool_to_other
```python
from test_casting_unittests import test_nonstandard_bool_to_other
```



---
## __name__
```python
from test_abc import __name__
```

test dill's ability to pickle abstract base class objects

---
## TestABC
```python
from test_abc import TestABC
```



---
## test_abstract
```python
from test_abc import test_abstract
```



---
## test_floats
```python
from test_abc import test_floats
```



---
## test_complex
```python
from test_abc import test_complex
```



---
## test_int
```python
from test_abc import test_int
```



---
## test_uint
```python
from test_abc import test_uint
```



---
## __name__
```python
from test_ufunc import __name__
```



---
## TestUfuncKwargs
```python
from test_ufunc import TestUfuncKwargs
```



---
## TestUfuncGenericLoops
```python
from test_ufunc import TestUfuncGenericLoops
```

Test generic loops.

The loops to be tested are:

    PyUFunc_ff_f_As_dd_d
    PyUFunc_ff_f
    PyUFunc_dd_d
    PyUFunc_gg_g
    PyUFunc_FF_F_As_DD_D
    PyUFunc_DD_D
    PyUFunc_FF_F
    PyUFunc_GG_G
    PyUFunc_OO_O
    PyUFunc_OO_O_method
    PyUFunc_f_f_As_d_d
    PyUFunc_d_d
    PyUFunc_f_f
    PyUFunc_g_g
    PyUFunc_F_F_As_D_D
    PyUFunc_F_F
    PyUFunc_D_D
    PyUFunc_G_G
    PyUFunc_O_O
    PyUFunc_O_O_method
    PyUFunc_On_Om

Where:

    f -- float
    d -- double
    g -- long double
    F -- complex float
    D -- complex double
    G -- complex long double
    O -- python object

It is difficult to assure that each of these loops is entered from the
Python level as the special cased loops are a moving target and the
corresponding types are architecture dependent. We probably need to
define C level testing ufuncs to get at them. For the time being, I've
just looked at the signatures registered in the build directory to find
relevant functions.

---
## _pickleable_module_global
```python
from test_ufunc import _pickleable_module_global
```



---
## TestUfunc
```python
from test_ufunc import TestUfunc
```



---
## test_ufunc_types
```python
from test_ufunc import test_ufunc_types
```

Check all ufuncs that the correct type is returned. Avoid
object and boolean types since many operations are not defined for
for them.

Choose the shape so even dot and matmul will succeed

---
## test_ufunc_noncontiguous
```python
from test_ufunc import test_ufunc_noncontiguous
```

Check that contiguous and non-contiguous calls to ufuncs
have the same results for values in range(9)

---
## test_ufunc_warn_with_nan
```python
from test_ufunc import test_ufunc_warn_with_nan
```



---
## test_ufunc_out_casterrors
```python
from test_ufunc import test_ufunc_out_casterrors
```



---
## test_ufunc_input_casterrors
```python
from test_ufunc import test_ufunc_input_casterrors
```



---
## test_ufunc_input_floatingpoint_error
```python
from test_ufunc import test_ufunc_input_floatingpoint_error
```



---
## test_trivial_loop_invalid_cast
```python
from test_ufunc import test_trivial_loop_invalid_cast
```



---
## test_reduce_casterrors
```python
from test_ufunc import test_reduce_casterrors
```



---
## test_object_reduce_cleanup_on_failure
```python
from test_ufunc import test_object_reduce_cleanup_on_failure
```



---
## test_ufunc_methods_floaterrors
```python
from test_ufunc import test_ufunc_methods_floaterrors
```



---
## _check_neg_zero
```python
from test_ufunc import _check_neg_zero
```



---
## test_addition_negative_zero
```python
from test_ufunc import test_addition_negative_zero
```



---
## test_addition_reduce_negative_zero
```python
from test_ufunc import test_addition_reduce_negative_zero
```



---
## TestLowlevelAPIAccess
```python
from test_ufunc import TestLowlevelAPIAccess
```



---
## test_kwarg_exact
```python
from test_ufunc import test_kwarg_exact
```



---
## test_sig_signature
```python
from test_ufunc import test_sig_signature
```



---
## test_sig_dtype
```python
from test_ufunc import test_sig_dtype
```



---
## test_extobj_refcount
```python
from test_ufunc import test_extobj_refcount
```



---
## test_unary_PyUFunc
```python
from test_ufunc import test_unary_PyUFunc
```



---
## f2
```python
from test_ufunc import f2
```



---
## test_binary_PyUFunc
```python
from test_ufunc import test_binary_PyUFunc
```



---
## foo
```python
from test_ufunc import foo
```



---
## test_unary_PyUFunc_O_O
```python
from test_ufunc import test_unary_PyUFunc_O_O
```



---
## test_unary_PyUFunc_O_O_method_simple
```python
from test_ufunc import test_unary_PyUFunc_O_O_method_simple
```



---
## test_binary_PyUFunc_OO_O
```python
from test_ufunc import test_binary_PyUFunc_OO_O
```



---
## test_binary_PyUFunc_OO_O_method
```python
from test_ufunc import test_binary_PyUFunc_OO_O_method
```



---
## test_binary_PyUFunc_On_Om_method
```python
from test_ufunc import test_binary_PyUFunc_On_Om_method
```



---
## test_python_complex_conjugate
```python
from test_ufunc import test_python_complex_conjugate
```



---
## test_unary_PyUFunc_O_O_method_full
```python
from test_ufunc import test_unary_PyUFunc_O_O_method_full
```

Compare the result of the object loop with non-object one

---
## test_pickle
```python
from test_ufunc import test_pickle
```



---
## test_pickle_withstring
```python
from test_ufunc import test_pickle_withstring
```



---
## test_pickle_name_is_qualname
```python
from test_ufunc import test_pickle_name_is_qualname
```



---
## test_reduceat_shifting_sum
```python
from test_ufunc import test_reduceat_shifting_sum
```



---
## test_all_ufunc
```python
from test_ufunc import test_all_ufunc
```

Try to check presence and results of all ufuncs.

The list of ufuncs comes from generate_umath.py and is as follows:

=====  ====  =============  ===============  ========================
done   args   function        types                notes
=====  ====  =============  ===============  ========================
n      1     conjugate      nums + O
n      1     absolute       nums + O         complex -> real
n      1     negative       nums + O
n      1     sign           nums + O         -> int
n      1     invert         bool + ints + O  flts raise an error
n      1     degrees        real + M         cmplx raise an error
n      1     radians        real + M         cmplx raise an error
n      1     arccos         flts + M
n      1     arccosh        flts + M
n      1     arcsin         flts + M
n      1     arcsinh        flts + M
n      1     arctan         flts + M
n      1     arctanh        flts + M
n      1     cos            flts + M
n      1     sin            flts + M
n      1     tan            flts + M
n      1     cosh           flts + M
n      1     sinh           flts + M
n      1     tanh           flts + M
n      1     exp            flts + M
n      1     expm1          flts + M
n      1     log            flts + M
n      1     log10          flts + M
n      1     log1p          flts + M
n      1     sqrt           flts + M         real x < 0 raises error
n      1     ceil           real + M
n      1     trunc          real + M
n      1     floor          real + M
n      1     fabs           real + M
n      1     rint           flts + M
n      1     isnan          flts             -> bool
n      1     isinf          flts             -> bool
n      1     isfinite       flts             -> bool
n      1     signbit        real             -> bool
n      1     modf           real             -> (frac, int)
n      1     logical_not    bool + nums + M  -> bool
n      2     left_shift     ints + O         flts raise an error
n      2     right_shift    ints + O         flts raise an error
n      2     add            bool + nums + O  boolean + is ||
n      2     subtract       bool + nums + O  boolean - is ^
n      2     multiply       bool + nums + O  boolean * is &
n      2     divide         nums + O
n      2     floor_divide   nums + O
n      2     true_divide    nums + O         bBhH -> f, iIlLqQ -> d
n      2     fmod           nums + M
n      2     power          nums + O
n      2     greater        bool + nums + O  -> bool
n      2     greater_equal  bool + nums + O  -> bool
n      2     less           bool + nums + O  -> bool
n      2     less_equal     bool + nums + O  -> bool
n      2     equal          bool + nums + O  -> bool
n      2     not_equal      bool + nums + O  -> bool
n      2     logical_and    bool + nums + M  -> bool
n      2     logical_or     bool + nums + M  -> bool
n      2     logical_xor    bool + nums + M  -> bool
n      2     maximum        bool + nums + O
n      2     minimum        bool + nums + O
n      2     bitwise_and    bool + ints + O  flts raise an error
n      2     bitwise_or     bool + ints + O  flts raise an error
n      2     bitwise_xor    bool + ints + O  flts raise an error
n      2     arctan2        real + M
n      2     remainder      ints + real + O
n      2     hypot          real + M
=====  ====  =============  ===============  ========================

Types other than those listed will be accepted, but they are cast to
the smallest compatible type for which the function is defined. The
casting rules are:

bool -> int8 -> float32
ints -> double

---
## test_signature0
```python
from test_ufunc import test_signature0
```



---
## test_signature1
```python
from test_ufunc import test_signature1
```



---
## test_signature2
```python
from test_ufunc import test_signature2
```



---
## test_signature3
```python
from test_ufunc import test_signature3
```



---
## test_signature4
```python
from test_ufunc import test_signature4
```



---
## test_signature5
```python
from test_ufunc import test_signature5
```



---
## test_signature6
```python
from test_ufunc import test_signature6
```



---
## test_signature7
```python
from test_ufunc import test_signature7
```



---
## test_signature8
```python
from test_ufunc import test_signature8
```



---
## test_signature9
```python
from test_ufunc import test_signature9
```



---
## test_signature10
```python
from test_ufunc import test_signature10
```



---
## test_signature_failure_extra_parenthesis
```python
from test_ufunc import test_signature_failure_extra_parenthesis
```



---
## test_signature_failure_mismatching_parenthesis
```python
from test_ufunc import test_signature_failure_mismatching_parenthesis
```



---
## test_signature_failure_signature_missing_input_arg
```python
from test_ufunc import test_signature_failure_signature_missing_input_arg
```



---
## test_signature_failure_signature_missing_output_arg
```python
from test_ufunc import test_signature_failure_signature_missing_output_arg
```



---
## test_get_signature
```python
from test_ufunc import test_get_signature
```



---
## test_forced_sig
```python
from test_ufunc import test_forced_sig
```



---
## test_signature_all_None
```python
from test_ufunc import test_signature_all_None
```



---
## test_signature_dtype_type
```python
from test_ufunc import test_signature_dtype_type
```



---
## test_signature_dtype_instances_allowed
```python
from test_ufunc import test_signature_dtype_instances_allowed
```



---
## test_partial_signature_mismatch
```python
from test_ufunc import test_partial_signature_mismatch
```



---
## test_partial_signature_mismatch_with_cache
```python
from test_ufunc import test_partial_signature_mismatch_with_cache
```



---
## test_use_output_signature_for_all_arguments
```python
from test_ufunc import test_use_output_signature_for_all_arguments
```



---
## test_signature_errors
```python
from test_ufunc import test_signature_errors
```



---
## test_forced_dtype_times
```python
from test_ufunc import test_forced_dtype_times
```



---
## test_cast_safety
```python
from test_ufunc import test_cast_safety
```

Basic test for the safest casts, because ufuncs inner loops can
indicate a cast-safety as well (which is normally always "no").

---
## test_true_divide
```python
from test_ufunc import test_true_divide
```



---
## test_sum_stability
```python
from test_ufunc import test_sum_stability
```



---
## test_sum
```python
from test_ufunc import test_sum
```



---
## test_sum_complex
```python
from test_ufunc import test_sum_complex
```



---
## test_sum_initial
```python
from test_ufunc import test_sum_initial
```



---
## test_sum_where
```python
from test_ufunc import test_sum_where
```



---
## test_inner1d
```python
from test_ufunc import test_inner1d
```



---
## test_broadcast
```python
from test_ufunc import test_broadcast
```



---
## test_out_broadcasts
```python
from test_ufunc import test_out_broadcasts
```



---
## test_out_broadcast_errors
```python
from test_ufunc import test_out_broadcast_errors
```



---
## test_type_cast
```python
from test_ufunc import test_type_cast
```



---
## test_endian
```python
from test_ufunc import test_endian
```



---
## test_incontiguous_array
```python
from test_ufunc import test_incontiguous_array
```



---
## test_output_argument
```python
from test_ufunc import test_output_argument
```



---
## test_axes_argument
```python
from test_ufunc import test_axes_argument
```



---
## test_axis_argument
```python
from test_ufunc import test_axis_argument
```



---
## test_keepdims_argument
```python
from test_ufunc import test_keepdims_argument
```



---
## test_innerwt
```python
from test_ufunc import test_innerwt
```



---
## test_innerwt_empty
```python
from test_ufunc import test_innerwt_empty
```

Test generalized ufunc with zero-sized operands

---
## test_cross1d
```python
from test_ufunc import test_cross1d
```

Test with fixed-sized signature.

---
## test_can_ignore_signature
```python
from test_ufunc import test_can_ignore_signature
```



---
## test_matrix_multiply
```python
from test_ufunc import test_matrix_multiply
```



---
## test_matrix_multiply_umath_empty
```python
from test_ufunc import test_matrix_multiply_umath_empty
```



---
## compare_matrix_multiply_results
```python
from test_ufunc import compare_matrix_multiply_results
```



---
## test_euclidean_pdist
```python
from test_ufunc import test_euclidean_pdist
```



---
## test_cumsum
```python
from test_ufunc import test_cumsum
```



---
## test_object_logical
```python
from test_ufunc import test_object_logical
```



---
## test_object_comparison
```python
from test_ufunc import test_object_comparison
```



---
## test_object_array_reduction
```python
from test_ufunc import test_object_array_reduction
```



---
## test_object_array_accumulate_inplace
```python
from test_ufunc import test_object_array_accumulate_inplace
```



---
## test_object_array_accumulate_failure
```python
from test_ufunc import test_object_array_accumulate_failure
```



---
## test_object_array_reduceat_inplace
```python
from test_ufunc import test_object_array_reduceat_inplace
```



---
## test_object_array_reduceat_failure
```python
from test_ufunc import test_object_array_reduceat_failure
```



---
## test_zerosize_reduction
```python
from test_ufunc import test_zerosize_reduction
```



---
## test_axis_out_of_bounds
```python
from test_ufunc import test_axis_out_of_bounds
```



---
## test_scalar_reduction
```python
from test_ufunc import test_scalar_reduction
```



---
## test_casting_out_param
```python
from test_ufunc import test_casting_out_param
```



---
## test_where_param
```python
from test_ufunc import test_where_param
```



---
## test_where_param_buffer_output
```python
from test_ufunc import test_where_param_buffer_output
```



---
## test_where_param_alloc
```python
from test_ufunc import test_where_param_alloc
```



---
## test_where_with_broadcasting
```python
from test_ufunc import test_where_with_broadcasting
```



---
## check_identityless_reduction
```python
from test_ufunc import check_identityless_reduction
```



---
## test_identityless_reduction_huge_array
```python
from test_ufunc import test_identityless_reduction_huge_array
```



---
## test_identityless_reduction_corder
```python
from test_ufunc import test_identityless_reduction_corder
```



---
## test_identityless_reduction_forder
```python
from test_ufunc import test_identityless_reduction_forder
```



---
## test_identityless_reduction_otherorder
```python
from test_ufunc import test_identityless_reduction_otherorder
```



---
## test_identityless_reduction_noncontig
```python
from test_ufunc import test_identityless_reduction_noncontig
```



---
## test_identityless_reduction_noncontig_unaligned
```python
from test_ufunc import test_identityless_reduction_noncontig_unaligned
```



---
## test_reduce_identity_depends_on_loop
```python
from test_ufunc import test_reduce_identity_depends_on_loop
```

The type of the result should always depend on the selected loop, not
necessarily the output (only relevant for object arrays).

---
## test_initial_reduction
```python
from test_ufunc import test_initial_reduction
```



---
## test_empty_reduction_and_idenity
```python
from test_ufunc import test_empty_reduction_and_idenity
```



---
## test_reduction_with_where
```python
from test_ufunc import test_reduction_with_where
```



---
## test_reduction_with_where_and_initial
```python
from test_ufunc import test_reduction_with_where_and_initial
```



---
## test_reduction_where_initial_needed
```python
from test_ufunc import test_reduction_where_initial_needed
```



---
## test_identityless_reduction_nonreorderable
```python
from test_ufunc import test_identityless_reduction_nonreorderable
```



---
## test_reduce_zero_axis
```python
from test_ufunc import test_reduce_zero_axis
```



---
## test_safe_casting
```python
from test_ufunc import test_safe_casting
```



---
## test_ufunc_custom_out
```python
from test_ufunc import test_ufunc_custom_out
```



---
## test_operand_flags
```python
from test_ufunc import test_operand_flags
```



---
## test_struct_ufunc
```python
from test_ufunc import test_struct_ufunc
```



---
## test_custom_ufunc
```python
from test_ufunc import test_custom_ufunc
```



---
## test_custom_ufunc_forced_sig
```python
from test_ufunc import test_custom_ufunc_forced_sig
```



---
## test_custom_array_like
```python
from test_ufunc import test_custom_array_like
```



---
## test_ufunc_at_basic
```python
from test_ufunc import test_ufunc_at_basic
```



---
## test_ufunc_at_inner_loops
```python
from test_ufunc import test_ufunc_at_inner_loops
```



---
## test_ufunc_at_inner_loops_complex
```python
from test_ufunc import test_ufunc_at_inner_loops_complex
```



---
## test_ufunc_at_ellipsis
```python
from test_ufunc import test_ufunc_at_ellipsis
```



---
## test_ufunc_at_negative
```python
from test_ufunc import test_ufunc_at_negative
```



---
## test_ufunc_at_large
```python
from test_ufunc import test_ufunc_at_large
```



---
## test_cast_index_fastpath
```python
from test_ufunc import test_cast_index_fastpath
```



---
## test_ufunc_at_scalar_value_fastpath
```python
from test_ufunc import test_ufunc_at_scalar_value_fastpath
```



---
## test_ufunc_at_multiD
```python
from test_ufunc import test_ufunc_at_multiD
```



---
## test_ufunc_at_0D
```python
from test_ufunc import test_ufunc_at_0D
```



---
## test_ufunc_at_dtypes
```python
from test_ufunc import test_ufunc_at_dtypes
```



---
## test_ufunc_at_boolean
```python
from test_ufunc import test_ufunc_at_boolean
```



---
## test_ufunc_at_advanced
```python
from test_ufunc import test_ufunc_at_advanced
```



---
## test_at_negative_indexes
```python
from test_ufunc import test_at_negative_indexes
```



---
## test_at_not_none_signature
```python
from test_ufunc import test_at_not_none_signature
```



---
## test_at_no_loop_for_op
```python
from test_ufunc import test_at_no_loop_for_op
```



---
## test_at_output_casting
```python
from test_ufunc import test_at_output_casting
```



---
## test_at_broadcast_failure
```python
from test_ufunc import test_at_broadcast_failure
```



---
## test_reduce_arguments
```python
from test_ufunc import test_reduce_arguments
```



---
## test_structured_equal
```python
from test_ufunc import test_structured_equal
```



---
## test_scalar_equal
```python
from test_ufunc import test_scalar_equal
```



---
## test_NotImplemented_not_returned
```python
from test_ufunc import test_NotImplemented_not_returned
```



---
## test_logical_ufuncs_object_signatures
```python
from test_ufunc import test_logical_ufuncs_object_signatures
```



---
## test_logical_ufuncs_mixed_object_signatures
```python
from test_ufunc import test_logical_ufuncs_mixed_object_signatures
```



---
## test_logical_ufuncs_support_anything
```python
from test_ufunc import test_logical_ufuncs_support_anything
```



---
## test_logical_ufuncs_reject_string
```python
from test_ufunc import test_logical_ufuncs_reject_string
```

Logical ufuncs are normally well defined by working with the boolean
equivalent, i.e. casting all inputs to bools should work.

However, casting strings to bools is *currently* weird, because it
actually uses `bool(int(str))`.  Thus we explicitly reject strings.
This test should succeed (and can probably just be removed) as soon as
string to bool casts are well defined in NumPy.

---
## test_logical_ufuncs_out_cast_check
```python
from test_ufunc import test_logical_ufuncs_out_cast_check
```



---
## test_reducelike_byteorder_resolution
```python
from test_ufunc import test_reducelike_byteorder_resolution
```



---
## test_reducelike_out_promotes
```python
from test_ufunc import test_reducelike_out_promotes
```



---
## test_reducelike_output_needs_identical_cast
```python
from test_ufunc import test_reducelike_output_needs_identical_cast
```



---
## test_reduce_noncontig_output
```python
from test_ufunc import test_reduce_noncontig_output
```



---
## test_reduceat_and_accumulate_out_shape_mismatch
```python
from test_ufunc import test_reduceat_and_accumulate_out_shape_mismatch
```



---
## test_reduce_wrong_dimension_output
```python
from test_ufunc import test_reduce_wrong_dimension_output
```



---
## test_reduce_output_does_not_broadcast_input
```python
from test_ufunc import test_reduce_output_does_not_broadcast_input
```



---
## test_reduce_output_subclass_ok
```python
from test_ufunc import test_reduce_output_subclass_ok
```



---
## test_no_doc_string
```python
from test_ufunc import test_no_doc_string
```



---
## test_invalid_args
```python
from test_ufunc import test_invalid_args
```



---
## test_nat_is_not_finite
```python
from test_ufunc import test_nat_is_not_finite
```



---
## test_nat_is_nan
```python
from test_ufunc import test_nat_is_nan
```



---
## test_nat_is_not_inf
```python
from test_ufunc import test_nat_is_not_inf
```



---
## test_resolve_dtypes_basic
```python
from test_ufunc import test_resolve_dtypes_basic
```



---
## test_weird_dtypes
```python
from test_ufunc import test_weird_dtypes
```



---
## test_resolve_dtypes_reduction
```python
from test_ufunc import test_resolve_dtypes_reduction
```



---
## test_resolve_dtypes_errors
```python
from test_ufunc import test_resolve_dtypes_errors
```



---
## test_resolve_dtypes_reduction_errors
```python
from test_ufunc import test_resolve_dtypes_reduction_errors
```



---
## test_loop_access
```python
from test_ufunc import test_loop_access
```



---
## test__get_strided_loop_errors_bad_strides
```python
from test_ufunc import test__get_strided_loop_errors_bad_strides
```



---
## test__get_strided_loop_errors_bad_call_info
```python
from test_ufunc import test__get_strided_loop_errors_bad_call_info
```



---
## test_long_arrays
```python
from test_ufunc import test_long_arrays
```



---
## conjugate
```python
from test_ufunc import conjugate
```



---
## logical_xor
```python
from test_ufunc import logical_xor
```



---
## MyFloat
```python
from test_ufunc import MyFloat
```



---
## call_ufunc
```python
from test_ufunc import call_ufunc
```



---
## permute_n
```python
from test_ufunc import permute_n
```



---
## slice_n
```python
from test_ufunc import slice_n
```



---
## broadcastable
```python
from test_ufunc import broadcastable
```



---
## HasComparisons
```python
from test_ufunc import HasComparisons
```



---
## MyArray
```python
from test_ufunc import MyArray
```



---
## ok
```python
from test_ufunc import ok
```



---
## err
```python
from test_ufunc import err
```



---
## t
```python
from test_ufunc import t
```



---
## add_inplace
```python
from test_ufunc import add_inplace
```



---
## MyThing
```python
from test_ufunc import MyThing
```



---
## MyA
```python
from test_ufunc import MyA
```



---
## MyArr
```python
from test_ufunc import MyArr
```



---
## call_info_t
```python
from test_ufunc import call_info_t
```



---
## __getattr__
```python
from test_ufunc import __getattr__
```



---
## __eq__
```python
from test_ufunc import __eq__
```



---
## __init__
```python
from test_ufunc import __init__
```



---
## __len__
```python
from test_ufunc import __len__
```



---
## __getitem__
```python
from test_ufunc import __getitem__
```



---
## __rmul__
```python
from test_ufunc import __rmul__
```



---
## __array_ufunc__
```python
from test_ufunc import __array_ufunc__
```



---
## __name__
```python
from test_dtype import __name__
```



---
## assert_dtype_equal
```python
from test_dtype import assert_dtype_equal
```



---
## assert_dtype_not_equal
```python
from test_dtype import assert_dtype_not_equal
```



---
## TestBuiltin
```python
from test_dtype import TestBuiltin
```



---
## TestRecord
```python
from test_dtype import TestRecord
```



---
## TestSubarray
```python
from test_dtype import TestSubarray
```



---
## iter_struct_object_dtypes
```python
from test_dtype import iter_struct_object_dtypes
```

Iterates over a few complex dtypes and object pattern which
fill the array with a given object (defaults to a singleton).

Yields
------
dtype : dtype
pattern : tuple
    Structured tuple for use with `np.array`.
count : int
    Number of objects stored in the dtype.
singleton : object
    A singleton object. The returned pattern is constructed so that
    all objects inside the datatype are set to the singleton.

---
## TestStructuredObjectRefcounting
```python
from test_dtype import TestStructuredObjectRefcounting
```

These tests cover various uses of complicated structured types which
include objects and thus require reference counting.

---
## TestStructuredDtypeSparseFields
```python
from test_dtype import TestStructuredDtypeSparseFields
```

Tests subarray fields which contain sparse dtypes so that
not all memory is used by the dtype work. Such dtype's should
leave the underlying memory unchanged.

---
## TestMonsterType
```python
from test_dtype import TestMonsterType
```

Test deeply nested subtypes.

---
## TestMetadata
```python
from test_dtype import TestMetadata
```



---
## TestString
```python
from test_dtype import TestString
```



---
## TestDtypeAttributeDeletion
```python
from test_dtype import TestDtypeAttributeDeletion
```



---
## TestDtypeAttributes
```python
from test_dtype import TestDtypeAttributes
```



---
## TestDTypeMakeCanonical
```python
from test_dtype import TestDTypeMakeCanonical
```



---
## TestPickling
```python
from test_dtype import TestPickling
```



---
## TestPromotion
```python
from test_dtype import TestPromotion
```

Test cases related to more complex DType promotions.  Further promotion
tests are defined in `test_numeric.py`

---
## test_rational_dtype
```python
from test_dtype import test_rational_dtype
```



---
## test_dtypes_are_true
```python
from test_dtype import test_dtypes_are_true
```



---
## test_invalid_dtype_string
```python
from test_dtype import test_invalid_dtype_string
```



---
## test_keyword_argument
```python
from test_dtype import test_keyword_argument
```



---
## test_ulong_dtype
```python
from test_dtype import test_ulong_dtype
```



---
## TestFromDTypeAttribute
```python
from test_dtype import TestFromDTypeAttribute
```



---
## TestDTypeClasses
```python
from test_dtype import TestDTypeClasses
```



---
## TestFromCTypes
```python
from test_dtype import TestFromCTypes
```



---
## TestUserDType
```python
from test_dtype import TestUserDType
```



---
## TestClassGetItem
```python
from test_dtype import TestClassGetItem
```



---
## test_result_type_integers_and_unitless_timedelta64
```python
from test_dtype import test_result_type_integers_and_unitless_timedelta64
```



---
## test_creating_dtype_with_dtype_class_errors
```python
from test_dtype import test_creating_dtype_with_dtype_class_errors
```



---
## test_run
```python
from test_dtype import test_run
```

Only test hash runs at all.

---
## test_dtype
```python
from test_dtype import test_dtype
```



---
## test_equivalent_dtype_hashing
```python
from test_dtype import test_equivalent_dtype_hashing
```



---
## test_invalid_types
```python
from test_dtype import test_invalid_types
```



---
## test_richcompare_invalid_dtype_equality
```python
from test_dtype import test_richcompare_invalid_dtype_equality
```



---
## test_richcompare_invalid_dtype_comparison
```python
from test_dtype import test_richcompare_invalid_dtype_comparison
```



---
## test_numeric_style_types_are_invalid
```python
from test_dtype import test_numeric_style_types_are_invalid
```



---
## test_remaining_dtypes_with_bad_bytesize
```python
from test_dtype import test_remaining_dtypes_with_bad_bytesize
```



---
## test_dtype_bytes_str_equivalence
```python
from test_dtype import test_dtype_bytes_str_equivalence
```



---
## test_dtype_from_bytes
```python
from test_dtype import test_dtype_from_bytes
```



---
## test_bad_param
```python
from test_dtype import test_bad_param
```



---
## test_field_order_equality
```python
from test_dtype import test_field_order_equality
```



---
## test_create_string_dtypes_directly
```python
from test_dtype import test_create_string_dtypes_directly
```



---
## test_create_invalid_string_errors
```python
from test_dtype import test_create_invalid_string_errors
```



---
## test_equivalent_record
```python
from test_dtype import test_equivalent_record
```

Test whether equivalent subarray dtypes hash the same.

---
## test_different_names
```python
from test_dtype import test_different_names
```



---
## test_different_titles
```python
from test_dtype import test_different_titles
```



---
## test_refcount_dictionary_setting
```python
from test_dtype import test_refcount_dictionary_setting
```



---
## test_mutate
```python
from test_dtype import test_mutate
```



---
## test_mutate_error
```python
from test_dtype import test_mutate_error
```



---
## test_not_lists
```python
from test_dtype import test_not_lists
```

Test if an appropriate exception is raised when passing bad values to
the dtype constructor.

---
## test_aligned_size
```python
from test_dtype import test_aligned_size
```



---
## test_union_struct
```python
from test_dtype import test_union_struct
```



---
## test_subarray_list
```python
from test_dtype import test_subarray_list
```



---
## test_comma_datetime
```python
from test_dtype import test_comma_datetime
```



---
## test_from_dictproxy
```python
from test_dtype import test_from_dictproxy
```



---
## test_from_dict_with_zero_width_field
```python
from test_dtype import test_from_dict_with_zero_width_field
```



---
## test_bool_commastring
```python
from test_dtype import test_bool_commastring
```



---
## test_nonint_offsets
```python
from test_dtype import test_nonint_offsets
```



---
## test_fields_by_index
```python
from test_dtype import test_fields_by_index
```



---
## test_multifield_index
```python
from test_dtype import test_multifield_index
```



---
## test_partial_dict
```python
from test_dtype import test_partial_dict
```



---
## test_fieldless_views
```python
from test_dtype import test_fieldless_views
```



---
## test_nonstructured_with_object
```python
from test_dtype import test_nonstructured_with_object
```



---
## test_single_subarray
```python
from test_dtype import test_single_subarray
```



---
## test_nonequivalent_record
```python
from test_dtype import test_nonequivalent_record
```

Test whether different subarray dtypes hash differently.

---
## test_shape_equal
```python
from test_dtype import test_shape_equal
```

Test some data types that are equal

---
## test_shape_simple
```python
from test_dtype import test_shape_simple
```

Test some simple cases that shouldn't be equal

---
## test_shape_monster
```python
from test_dtype import test_shape_monster
```

Test some more complicated cases that shouldn't be equal

---
## test_shape_sequence
```python
from test_dtype import test_shape_sequence
```



---
## test_shape_matches_ndim
```python
from test_dtype import test_shape_matches_ndim
```



---
## test_shape_invalid
```python
from test_dtype import test_shape_invalid
```



---
## test_alignment
```python
from test_dtype import test_alignment
```



---
## test_aligned_empty
```python
from test_dtype import test_aligned_empty
```



---
## test_subarray_base_item
```python
from test_dtype import test_subarray_base_item
```



---
## test_subarray_cast_copies
```python
from test_dtype import test_subarray_cast_copies
```



---
## test_structured_object_create_delete
```python
from test_dtype import test_structured_object_create_delete
```

Structured object reference counting in creation and deletion

---
## test_structured_object_item_setting
```python
from test_dtype import test_structured_object_item_setting
```

Structured object reference counting for simple item setting

---
## test_structured_object_indexing
```python
from test_dtype import test_structured_object_indexing
```

Structured object reference counting for advanced indexing.

---
## test_structured_object_take_and_repeat
```python
from test_dtype import test_structured_object_take_and_repeat
```

Structured object reference counting for specialized functions.
The older functions such as take and repeat use different code paths
then item setting (when writing this).

---
## test_sparse_field_assignment
```python
from test_dtype import test_sparse_field_assignment
```



---
## test_sparse_field_assignment_fancy
```python
from test_dtype import test_sparse_field_assignment_fancy
```



---
## test1
```python
from test_dtype import test1
```



---
## test_list_recursion
```python
from test_dtype import test_list_recursion
```



---
## test_tuple_recursion
```python
from test_dtype import test_tuple_recursion
```



---
## test_dict_recursion
```python
from test_dtype import test_dict_recursion
```



---
## test_no_metadata
```python
from test_dtype import test_no_metadata
```



---
## test_metadata_takes_dict
```python
from test_dtype import test_metadata_takes_dict
```



---
## test_metadata_rejects_nondict
```python
from test_dtype import test_metadata_rejects_nondict
```



---
## test_nested_metadata
```python
from test_dtype import test_nested_metadata
```



---
## test_base_metadata_copied
```python
from test_dtype import test_base_metadata_copied
```



---
## test_complex_dtype_str
```python
from test_dtype import test_complex_dtype_str
```



---
## test_repr_structured
```python
from test_dtype import test_repr_structured
```



---
## test_repr_structured_not_packed
```python
from test_dtype import test_repr_structured_not_packed
```



---
## test_repr_structured_datetime
```python
from test_dtype import test_repr_structured_datetime
```



---
## test_repr_str_subarray
```python
from test_dtype import test_repr_str_subarray
```



---
## test_base_dtype_with_object_type
```python
from test_dtype import test_base_dtype_with_object_type
```



---
## test_empty_string_to_object
```python
from test_dtype import test_empty_string_to_object
```



---
## test_void_subclass_unsized
```python
from test_dtype import test_void_subclass_unsized
```



---
## test_void_subclass_sized
```python
from test_dtype import test_void_subclass_sized
```



---
## test_void_subclass_fields
```python
from test_dtype import test_void_subclass_fields
```



---
## test_dtype_non_writable_attributes_deletion
```python
from test_dtype import test_dtype_non_writable_attributes_deletion
```



---
## test_dtype_writable_attributes_deletion
```python
from test_dtype import test_dtype_writable_attributes_deletion
```



---
## test_descr_has_trailing_void
```python
from test_dtype import test_descr_has_trailing_void
```



---
## test_name_dtype_subclass
```python
from test_dtype import test_name_dtype_subclass
```



---
## test_zero_stride
```python
from test_dtype import test_zero_stride
```



---
## check_canonical
```python
from test_dtype import check_canonical
```

Check most properties relevant to "canonical" versions of a dtype,
which is mainly native byte order for datatypes supporting this.

The main work is checking structured dtypes with fields, where we
reproduce most the actual logic used in the C-code.

---
## test_simple
```python
from test_dtype import test_simple
```



---
## test_object_flag_not_inherited
```python
from test_dtype import test_object_flag_not_inherited
```



---
## test_make_canonical_hypothesis
```python
from test_dtype import test_make_canonical_hypothesis
```



---
## test_structured
```python
from test_dtype import test_structured
```



---
## check_pickling
```python
from test_dtype import check_pickling
```



---
## test_builtin
```python
from test_dtype import test_builtin
```



---
## test_structured_aligned
```python
from test_dtype import test_structured_aligned
```



---
## test_structured_unaligned
```python
from test_dtype import test_structured_unaligned
```



---
## test_structured_padded
```python
from test_dtype import test_structured_padded
```



---
## test_structured_titles
```python
from test_dtype import test_structured_titles
```



---
## test_datetime
```python
from test_dtype import test_datetime
```



---
## test_metadata
```python
from test_dtype import test_metadata
```



---
## test_pickle_types
```python
from test_dtype import test_pickle_types
```



---
## test_complex_other_value_based
```python
from test_dtype import test_complex_other_value_based
```



---
## test_complex_scalar_value_based
```python
from test_dtype import test_complex_scalar_value_based
```



---
## test_complex_pyscalar_promote_rational
```python
from test_dtype import test_complex_pyscalar_promote_rational
```



---
## test_python_integer_promotion
```python
from test_dtype import test_python_integer_promotion
```



---
## test_float_int_pyscalar_promote_rational
```python
from test_dtype import test_float_int_pyscalar_promote_rational
```



---
## test_permutations_do_not_influence_result
```python
from test_dtype import test_permutations_do_not_influence_result
```



---
## test_recursion
```python
from test_dtype import test_recursion
```



---
## test_void_subtype
```python
from test_dtype import test_void_subtype
```



---
## test_void_subtype_recursion
```python
from test_dtype import test_void_subtype_recursion
```



---
## test_basic_dtypes_subclass_properties
```python
from test_dtype import test_basic_dtypes_subclass_properties
```



---
## test_dtype_superclass
```python
from test_dtype import test_dtype_superclass
```



---
## test_is_numeric
```python
from test_dtype import test_is_numeric
```



---
## test_integer_alias_names
```python
from test_dtype import test_integer_alias_names
```



---
## test_float_alias_names
```python
from test_dtype import test_float_alias_names
```



---
## check
```python
from test_dtype import check
```



---
## test_array
```python
from test_dtype import test_array
```



---
## test_padded_structure
```python
from test_dtype import test_padded_structure
```



---
## test_bit_fields
```python
from test_dtype import test_bit_fields
```



---
## test_pointer
```python
from test_dtype import test_pointer
```



---
## test_void_pointer
```python
from test_dtype import test_void_pointer
```



---
## test_union
```python
from test_dtype import test_union
```



---
## test_union_with_struct_packed
```python
from test_dtype import test_union_with_struct_packed
```



---
## test_union_packed
```python
from test_dtype import test_union_packed
```



---
## test_packed_structure
```python
from test_dtype import test_packed_structure
```



---
## test_large_packed_structure
```python
from test_dtype import test_large_packed_structure
```



---
## test_big_endian_structure_packed
```python
from test_dtype import test_big_endian_structure_packed
```



---
## test_little_endian_structure_packed
```python
from test_dtype import test_little_endian_structure_packed
```



---
## test_little_endian_structure
```python
from test_dtype import test_little_endian_structure
```



---
## test_big_endian_structure
```python
from test_dtype import test_big_endian_structure
```



---
## test_simple_endian_types
```python
from test_dtype import test_simple_endian_types
```



---
## test_pairs
```python
from test_dtype import test_pairs
```

Check that np.dtype('x,y') matches [np.dtype('x'), np.dtype('y')]
Example: np.dtype('d,I') -> dtype([('f0', '<f8'), ('f1', '<u4')])

---
## test_custom_structured_dtype
```python
from test_dtype import test_custom_structured_dtype
```



---
## test_custom_structured_dtype_errors
```python
from test_dtype import test_custom_structured_dtype_errors
```



---
## test_dtype_subclass
```python
from test_dtype import test_dtype_subclass
```



---
## test_subscript_tuple
```python
from test_dtype import test_subscript_tuple
```



---
## test_subscript_scalar
```python
from test_dtype import test_subscript_scalar
```



---
## make_dtype
```python
from test_dtype import make_dtype
```



---
## IntLike
```python
from test_dtype import IntLike
```



---
## user_def_subcls
```python
from test_dtype import user_def_subcls
```



---
## aligned_offset
```python
from test_dtype import aligned_offset
```



---
## dt
```python
from test_dtype import dt
```



---
## vdt
```python
from test_dtype import vdt
```



---
## PaddedStruct
```python
from test_dtype import PaddedStruct
```



---
## BitfieldStruct
```python
from test_dtype import BitfieldStruct
```



---
## Union
```python
from test_dtype import Union
```



---
## Struct
```python
from test_dtype import Struct
```



---
## PackedStructure
```python
from test_dtype import PackedStructure
```



---
## BigEndStruct
```python
from test_dtype import BigEndStruct
```



---
## LittleEndStruct
```python
from test_dtype import LittleEndStruct
```



---
## mytype
```python
from test_dtype import mytype
```



---
## __index__
```python
from test_dtype import __index__
```



---
## __int__
```python
from test_dtype import __int__
```



---
## __name__
```python
from test_umath_accuracy import __name__
```



---
## convert
```python
from test_umath_accuracy import convert
```



---
## TestAccuracy
```python
from test_umath_accuracy import TestAccuracy
```



---
## test_validate_transcendentals
```python
from test_umath_accuracy import test_validate_transcendentals
```



---
## test_validate_fp16_transcendentals
```python
from test_umath_accuracy import test_validate_fp16_transcendentals
```



---
## __name__
```python
from test_simd_module import __name__
```



---
## Test_SIMD_MODULE
```python
from test_simd_module import Test_SIMD_MODULE
```



---
## test_num_lanes
```python
from test_simd_module import test_num_lanes
```



---
## test_type_name
```python
from test_simd_module import test_type_name
```



---
## test_raises
```python
from test_simd_module import test_raises
```



---
## test_nomix
```python
from test_simd_module import test_nomix
```



---
## test_unsigned_overflow
```python
from test_simd_module import test_unsigned_overflow
```



---
## test_signed_overflow
```python
from test_simd_module import test_signed_overflow
```



---
## test_truncate_f32
```python
from test_simd_module import test_truncate_f32
```



---
## test_compare
```python
from test_simd_module import test_compare
```



---
## __name__
```python
from test_getlimits import __name__
```

Test functions for limits module.

---
## TestPythonFloat
```python
from test_getlimits import TestPythonFloat
```



---
## TestHalf
```python
from test_getlimits import TestHalf
```



---
## TestSingle
```python
from test_getlimits import TestSingle
```



---
## TestDouble
```python
from test_getlimits import TestDouble
```



---
## TestLongdouble
```python
from test_getlimits import TestLongdouble
```



---
## assert_finfo_equal
```python
from test_getlimits import assert_finfo_equal
```



---
## assert_iinfo_equal
```python
from test_getlimits import assert_iinfo_equal
```



---
## TestFinfo
```python
from test_getlimits import TestFinfo
```



---
## TestIinfo
```python
from test_getlimits import TestIinfo
```



---
## TestRepr
```python
from test_getlimits import TestRepr
```



---
## test_instances
```python
from test_getlimits import test_instances
```



---
## assert_ma_equal
```python
from test_getlimits import assert_ma_equal
```



---
## test_known_types
```python
from test_getlimits import test_known_types
```



---
## test_subnormal_warning
```python
from test_getlimits import test_subnormal_warning
```

Test that the subnormal is zero warning is not being raised.

---
## test_plausible_finfo
```python
from test_getlimits import test_plausible_finfo
```



---
## test_singleton
```python
from test_getlimits import test_singleton
```



---
## test_basic
```python
from test_getlimits import test_basic
```



---
## test_regression_gh23108
```python
from test_getlimits import test_regression_gh23108
```



---
## test_regression_gh23867
```python
from test_getlimits import test_regression_gh23867
```



---
## test_unsigned_max
```python
from test_getlimits import test_unsigned_max
```



---
## test_iinfo_repr
```python
from test_getlimits import test_iinfo_repr
```



---
## test_finfo_repr
```python
from test_getlimits import test_finfo_repr
```



---
## NonHashableWithDtype
```python
from test_getlimits import NonHashableWithDtype
```



---
## __name__
```python
from test_strings import __name__
```

Tests the usecols functionality during parsing
for all of the parsers defined in parsers.py

---
## test_mixed_string_comparison_ufuncs_fail
```python
from test_strings import test_mixed_string_comparison_ufuncs_fail
```



---
## test_mixed_string_comparisons_ufuncs_with_cast
```python
from test_strings import test_mixed_string_comparisons_ufuncs_with_cast
```



---
## test_string_comparisons
```python
from test_strings import test_string_comparisons
```



---
## test_string_comparisons_empty
```python
from test_strings import test_string_comparisons_empty
```



---
## test_float_to_string_cast
```python
from test_strings import test_float_to_string_cast
```



---
## __name__
```python
from test_dlpack import __name__
```



---
## TestDLPack
```python
from test_dlpack import TestDLPack
```



---
## test_dunder_dlpack_refcount
```python
from test_dlpack import test_dunder_dlpack_refcount
```



---
## test_dunder_dlpack_stream
```python
from test_dlpack import test_dunder_dlpack_stream
```



---
## test_strides_not_multiple_of_itemsize
```python
from test_dlpack import test_strides_not_multiple_of_itemsize
```



---
## test_from_dlpack_refcount
```python
from test_dlpack import test_from_dlpack_refcount
```



---
## test_dtype_passthrough
```python
from test_dlpack import test_dtype_passthrough
```



---
## test_invalid_dtype
```python
from test_dlpack import test_invalid_dtype
```



---
## test_invalid_byte_swapping
```python
from test_dlpack import test_invalid_byte_swapping
```



---
## test_non_contiguous
```python
from test_dlpack import test_non_contiguous
```



---
## test_higher_dims
```python
from test_dlpack import test_higher_dims
```



---
## test_dlpack_device
```python
from test_dlpack import test_dlpack_device
```



---
## dlpack_deleter_exception
```python
from test_dlpack import dlpack_deleter_exception
```



---
## test_dlpack_destructor_exception
```python
from test_dlpack import test_dlpack_destructor_exception
```



---
## test_readonly
```python
from test_dlpack import test_readonly
```



---
## test_ndim0
```python
from test_dlpack import test_ndim0
```



---
## test_size1dims_arrays
```python
from test_dlpack import test_size1dims_arrays
```



---
## __name__
```python
from test_einsum import __name__
```



---
## TestEinsum
```python
from test_einsum import TestEinsum
```



---
## TestEinsumPath
```python
from test_einsum import TestEinsumPath
```



---
## test_overlap
```python
from test_einsum import test_overlap
```



---
## test_einsum_errors
```python
from test_einsum import test_einsum_errors
```



---
## test_einsum_object_errors
```python
from test_einsum import test_einsum_object_errors
```



---
## test_einsum_views
```python
from test_einsum import test_einsum_views
```



---
## check_einsum_sums
```python
from test_einsum import check_einsum_sums
```



---
## test_einsum_sums_int8
```python
from test_einsum import test_einsum_sums_int8
```



---
## test_einsum_sums_uint8
```python
from test_einsum import test_einsum_sums_uint8
```



---
## test_einsum_sums_int16
```python
from test_einsum import test_einsum_sums_int16
```



---
## test_einsum_sums_uint16
```python
from test_einsum import test_einsum_sums_uint16
```



---
## test_einsum_sums_int32
```python
from test_einsum import test_einsum_sums_int32
```



---
## test_einsum_sums_uint32
```python
from test_einsum import test_einsum_sums_uint32
```



---
## test_einsum_sums_int64
```python
from test_einsum import test_einsum_sums_int64
```



---
## test_einsum_sums_uint64
```python
from test_einsum import test_einsum_sums_uint64
```



---
## test_einsum_sums_float16
```python
from test_einsum import test_einsum_sums_float16
```



---
## test_einsum_sums_float32
```python
from test_einsum import test_einsum_sums_float32
```



---
## test_einsum_sums_float64
```python
from test_einsum import test_einsum_sums_float64
```



---
## test_einsum_sums_longdouble
```python
from test_einsum import test_einsum_sums_longdouble
```



---
## test_einsum_sums_cfloat64
```python
from test_einsum import test_einsum_sums_cfloat64
```



---
## test_einsum_sums_cfloat128
```python
from test_einsum import test_einsum_sums_cfloat128
```



---
## test_einsum_sums_clongdouble
```python
from test_einsum import test_einsum_sums_clongdouble
```



---
## test_einsum_sums_object
```python
from test_einsum import test_einsum_sums_object
```



---
## test_einsum_misc
```python
from test_einsum import test_einsum_misc
```



---
## test_object_loop
```python
from test_einsum import test_object_loop
```



---
## test_subscript_range
```python
from test_einsum import test_subscript_range
```



---
## test_einsum_broadcast
```python
from test_einsum import test_einsum_broadcast
```



---
## test_einsum_fixedstridebug
```python
from test_einsum import test_einsum_fixedstridebug
```



---
## test_einsum_fixed_collapsingbug
```python
from test_einsum import test_einsum_fixed_collapsingbug
```



---
## test_einsum_failed_on_p9_and_s390x
```python
from test_einsum import test_einsum_failed_on_p9_and_s390x
```



---
## test_einsum_all_contig_non_contig_output
```python
from test_einsum import test_einsum_all_contig_non_contig_output
```



---
## test_different_paths
```python
from test_einsum import test_different_paths
```



---
## test_small_boolean_arrays
```python
from test_einsum import test_small_boolean_arrays
```



---
## test_out_is_res
```python
from test_einsum import test_out_is_res
```



---
## optimize_compare
```python
from test_einsum import optimize_compare
```



---
## test_hadamard_like_products
```python
from test_einsum import test_hadamard_like_products
```



---
## test_index_transformations
```python
from test_einsum import test_index_transformations
```



---
## test_complex
```python
from test_einsum import test_complex
```



---
## test_collapse
```python
from test_einsum import test_collapse
```



---
## test_expand
```python
from test_einsum import test_expand
```



---
## test_edge_cases
```python
from test_einsum import test_edge_cases
```



---
## test_inner_product
```python
from test_einsum import test_inner_product
```



---
## test_random_cases
```python
from test_einsum import test_random_cases
```



---
## test_combined_views_mapping
```python
from test_einsum import test_combined_views_mapping
```



---
## test_broadcasting_dot_cases
```python
from test_einsum import test_broadcasting_dot_cases
```



---
## test_output_order
```python
from test_einsum import test_output_order
```



---
## build_operands
```python
from test_einsum import build_operands
```



---
## assert_path_equal
```python
from test_einsum import assert_path_equal
```



---
## test_memory_contraints
```python
from test_einsum import test_memory_contraints
```



---
## test_long_paths
```python
from test_einsum import test_long_paths
```



---
## test_edge_paths
```python
from test_einsum import test_edge_paths
```



---
## test_path_type_input
```python
from test_einsum import test_path_type_input
```



---
## test_path_type_input_internal_trace
```python
from test_einsum import test_path_type_input_internal_trace
```



---
## test_path_type_input_invalid
```python
from test_einsum import test_path_type_input_invalid
```



---
## test_spaces
```python
from test_einsum import test_spaces
```



---
## CustomException
```python
from test_einsum import CustomException
```



---
## DestructoBox
```python
from test_einsum import DestructoBox
```



---
## Mult
```python
from test_einsum import Mult
```



---
## __init__
```python
from test_einsum import __init__
```



---
## __add__
```python
from test_einsum import __add__
```



---
## __radd__
```python
from test_einsum import __radd__
```



---
## __mul__
```python
from test_einsum import __mul__
```



---
## __rmul__
```python
from test_einsum import __rmul__
```



---
## __name__
```python
from test_api import __name__
```



---
## test_array_array
```python
from test_api import test_array_array
```



---
## test_array_impossible_casts
```python
from test_api import test_array_impossible_casts
```



---
## test_fastCopyAndTranspose
```python
from test_api import test_fastCopyAndTranspose
```



---
## test_array_astype
```python
from test_api import test_array_astype
```



---
## test_array_astype_to_string_discovery_empty
```python
from test_api import test_array_astype_to_string_discovery_empty
```



---
## test_array_astype_to_void
```python
from test_api import test_array_astype_to_void
```



---
## test_object_array_astype_to_void
```python
from test_api import test_object_array_astype_to_void
```



---
## test_array_astype_warning
```python
from test_api import test_array_astype_warning
```



---
## test_string_to_boolean_cast
```python
from test_api import test_string_to_boolean_cast
```

Currently, for `astype` strings are cast to booleans effectively by
calling `bool(int(string)`. This is not consistent (see gh-9875) and
will eventually be deprecated.

---
## test_string_to_boolean_cast_errors
```python
from test_api import test_string_to_boolean_cast_errors
```

These currently error out, since cast to integers fails, but should not
error out in the future.

---
## test_string_to_complex_cast
```python
from test_api import test_string_to_complex_cast
```



---
## test_none_to_nan_cast
```python
from test_api import test_none_to_nan_cast
```



---
## test_copyto_fromscalar
```python
from test_api import test_copyto_fromscalar
```



---
## test_copyto
```python
from test_api import test_copyto
```



---
## test_copyto_permut
```python
from test_api import test_copyto_permut
```



---
## test_copy_order
```python
from test_api import test_copy_order
```



---
## test_contiguous_flags
```python
from test_api import test_contiguous_flags
```



---
## test_broadcast_arrays
```python
from test_api import test_broadcast_arrays
```



---
## test_full_from_list
```python
from test_api import test_full_from_list
```



---
## test_astype_copyflag
```python
from test_api import test_astype_copyflag
```



---
## MyNDArray
```python
from test_api import MyNDArray
```



---
## check_copy_result
```python
from test_api import check_copy_result
```



---
## check_contig
```python
from test_api import check_contig
```



---
## __name__
```python
from test_longdouble import __name__
```



---
## test_scalar_extraction
```python
from test_longdouble import test_scalar_extraction
```

Confirm that extracting a value doesn't convert to python float

---
## test_repr_roundtrip
```python
from test_longdouble import test_repr_roundtrip
```



---
## test_repr_roundtrip_bytes
```python
from test_longdouble import test_repr_roundtrip_bytes
```



---
## test_array_and_stringlike_roundtrip
```python
from test_longdouble import test_array_and_stringlike_roundtrip
```

Test that string representations of long-double roundtrip both
for array casting and scalar coercion, see also gh-15608.

---
## test_bogus_string
```python
from test_longdouble import test_bogus_string
```



---
## test_fromstring
```python
from test_longdouble import test_fromstring
```



---
## test_fromstring_complex
```python
from test_longdouble import test_fromstring_complex
```



---
## test_fromstring_bogus
```python
from test_longdouble import test_fromstring_bogus
```



---
## test_fromstring_empty
```python
from test_longdouble import test_fromstring_empty
```



---
## test_fromstring_missing
```python
from test_longdouble import test_fromstring_missing
```



---
## TestFileBased
```python
from test_longdouble import TestFileBased
```



---
## test_repr_exact
```python
from test_longdouble import test_repr_exact
```



---
## test_format
```python
from test_longdouble import test_format
```



---
## test_percent
```python
from test_longdouble import test_percent
```



---
## test_array_repr
```python
from test_longdouble import test_array_repr
```



---
## TestCommaDecimalPointLocale
```python
from test_longdouble import TestCommaDecimalPointLocale
```



---
## test_longdouble_from_int
```python
from test_longdouble import test_longdouble_from_int
```



---
## test_longdouble_from_bool
```python
from test_longdouble import test_longdouble_from_bool
```



---
## test_musllinux_x86_64_signature
```python
from test_longdouble import test_musllinux_x86_64_signature
```



---
## test_eps_positive
```python
from test_longdouble import test_eps_positive
```



---
## test_fromfile_bogus
```python
from test_longdouble import test_fromfile_bogus
```



---
## test_fromfile_complex
```python
from test_longdouble import test_fromfile_complex
```



---
## test_fromfile
```python
from test_longdouble import test_fromfile
```



---
## test_genfromtxt
```python
from test_longdouble import test_genfromtxt
```



---
## test_loadtxt
```python
from test_longdouble import test_loadtxt
```



---
## test_tofile_roundtrip
```python
from test_longdouble import test_tofile_roundtrip
```



---
## test_repr_roundtrip_foreign
```python
from test_longdouble import test_repr_roundtrip_foreign
```



---
## test_fromstring_foreign_repr
```python
from test_longdouble import test_fromstring_foreign_repr
```



---
## test_fromstring_best_effort_float
```python
from test_longdouble import test_fromstring_best_effort_float
```



---
## test_fromstring_best_effort
```python
from test_longdouble import test_fromstring_best_effort
```



---
## test_fromstring_foreign
```python
from test_longdouble import test_fromstring_foreign
```



---
## test_fromstring_foreign_sep
```python
from test_longdouble import test_fromstring_foreign_sep
```



---
## test_fromstring_foreign_value
```python
from test_longdouble import test_fromstring_foreign_value
```



---
## __name__
```python
from test_overrides import __name__
```



---
## _return_not_implemented
```python
from test_overrides import _return_not_implemented
```



---
## dispatched_one_arg
```python
from test_overrides import dispatched_one_arg
```

Docstring.

---
## dispatched_two_arg
```python
from test_overrides import dispatched_two_arg
```

Docstring.

---
## TestGetImplementingArgs
```python
from test_overrides import TestGetImplementingArgs
```



---
## TestNDArrayArrayFunction
```python
from test_overrides import TestNDArrayArrayFunction
```



---
## TestArrayFunctionDispatch
```python
from test_overrides import TestArrayFunctionDispatch
```



---
## TestVerifyMatchingSignatures
```python
from test_overrides import TestVerifyMatchingSignatures
```



---
## _new_duck_type_and_implements
```python
from test_overrides import _new_duck_type_and_implements
```

Create a duck array type and implements functions.

---
## TestArrayFunctionImplementation
```python
from test_overrides import TestArrayFunctionImplementation
```



---
## TestNDArrayMethods
```python
from test_overrides import TestNDArrayMethods
```



---
## TestNumPyFunctions
```python
from test_overrides import TestNumPyFunctions
```



---
## TestArrayLike
```python
from test_overrides import TestArrayLike
```



---
## test_function_like
```python
from test_overrides import test_function_like
```



---
## test_scipy_trapz_support_shim
```python
from test_overrides import test_scipy_trapz_support_shim
```



---
## test_ndarray
```python
from test_overrides import test_ndarray
```



---
## test_ndarray_subclasses
```python
from test_overrides import test_ndarray_subclasses
```



---
## test_ndarray_and_duck_array
```python
from test_overrides import test_ndarray_and_duck_array
```



---
## test_ndarray_subclass_and_duck_array
```python
from test_overrides import test_ndarray_subclass_and_duck_array
```



---
## test_many_duck_arrays
```python
from test_overrides import test_many_duck_arrays
```



---
## test_too_many_duck_arrays
```python
from test_overrides import test_too_many_duck_arrays
```



---
## test_method
```python
from test_overrides import test_method
```



---
## test_no_wrapper
```python
from test_overrides import test_no_wrapper
```



---
## test_pickle
```python
from test_overrides import test_pickle
```



---
## test_name_and_docstring
```python
from test_overrides import test_name_and_docstring
```



---
## test_interface
```python
from test_overrides import test_interface
```



---
## test_not_implemented
```python
from test_overrides import test_not_implemented
```



---
## test_where_dispatch
```python
from test_overrides import test_where_dispatch
```



---
## test_verify_matching_signatures
```python
from test_overrides import test_verify_matching_signatures
```



---
## test_array_function_dispatch
```python
from test_overrides import test_array_function_dispatch
```



---
## MyArray
```python
from test_overrides import MyArray
```



---
## implements
```python
from test_overrides import implements
```

Register an __array_function__ implementations.

---
## test_one_arg
```python
from test_overrides import test_one_arg
```



---
## test_optional_args
```python
from test_overrides import test_optional_args
```



---
## test_signature_error_message_simple
```python
from test_overrides import test_signature_error_message_simple
```



---
## test_signature_error_message
```python
from test_overrides import test_signature_error_message
```



---
## test_dispatcher_error
```python
from test_overrides import test_dispatcher_error
```



---
## test_properties
```python
from test_overrides import test_properties
```



---
## test_bad_like_sig
```python
from test_overrides import test_bad_like_sig
```



---
## test_bad_like_passing
```python
from test_overrides import test_bad_like_passing
```



---
## test_too_many_args
```python
from test_overrides import test_too_many_args
```



---
## test_repr
```python
from test_overrides import test_repr
```



---
## test_set_module
```python
from test_overrides import test_set_module
```



---
## test_inspect_sum
```python
from test_overrides import test_inspect_sum
```



---
## test_override_sum
```python
from test_overrides import test_override_sum
```



---
## test_sum_on_mock_array
```python
from test_overrides import test_sum_on_mock_array
```



---
## test_sum_forwarding_implementation
```python
from test_overrides import test_sum_forwarding_implementation
```



---
## setup_method
```python
from test_overrides import setup_method
```



---
## add_method
```python
from test_overrides import add_method
```



---
## func_args
```python
from test_overrides import func_args
```



---
## test_array_like_not_implemented
```python
from test_overrides import test_array_like_not_implemented
```



---
## test_array_like
```python
from test_overrides import test_array_like
```



---
## test_no_array_function_like
```python
from test_overrides import test_no_array_function_like
```



---
## test_array_like_fromfile
```python
from test_overrides import test_array_like_fromfile
```



---
## test_exception_handling
```python
from test_overrides import test_exception_handling
```



---
## test_like_as_none
```python
from test_overrides import test_like_as_none
```



---
## MyClass
```python
from test_overrides import MyClass
```



---
## _copy_func
```python
from test_overrides import _copy_func
```



---
## OverrideSub
```python
from test_overrides import OverrideSub
```



---
## NoOverrideSub
```python
from test_overrides import NoOverrideSub
```



---
## Other
```python
from test_overrides import Other
```



---
## A
```python
from test_overrides import A
```



---
## B
```python
from test_overrides import B
```



---
## C
```python
from test_overrides import C
```



---
## D
```python
from test_overrides import D
```



---
## DuckArray
```python
from test_overrides import DuckArray
```



---
## f
```python
from test_overrides import f
```



---
## __array_function__
```python
from test_overrides import __array_function__
```



---
## decorator
```python
from test_overrides import decorator
```



---
## _
```python
from test_overrides import _
```



---
## func_with_option
```python
from test_overrides import func_with_option
```



---
## my_array_func_with_option
```python
from test_overrides import my_array_func_with_option
```



---
## func
```python
from test_overrides import func
```



---
## _dispatcher
```python
from test_overrides import _dispatcher
```



---
## dispatcher
```python
from test_overrides import dispatcher
```



---
## _dispatch
```python
from test_overrides import _dispatch
```



---
## ArrayProxy
```python
from test_overrides import ArrayProxy
```



---
## MyNoArrayFunctionArray
```python
from test_overrides import MyNoArrayFunctionArray
```



---
## _definition
```python
from test_overrides import _definition
```



---
## __array__
```python
from test_overrides import __array__
```



---
## MyArr
```python
from test_overrides import MyArr
```



---
## __init__
```python
from test_overrides import __init__
```



---
## sum
```python
from test_overrides import sum
```



---
## __name__
```python
from test_scalar_ctors import __name__
```

Test the scalar constructors, which also do type-coercion

---
## TestFromString
```python
from test_scalar_ctors import TestFromString
```



---
## TestExtraArgs
```python
from test_scalar_ctors import TestExtraArgs
```



---
## TestFromInt
```python
from test_scalar_ctors import TestFromInt
```



---
## TestArrayFromScalar
```python
from test_scalar_ctors import TestArrayFromScalar
```

gh-15467 

---
## test_void_via_length
```python
from test_scalar_ctors import test_void_via_length
```



---
## test_void_from_byteslike
```python
from test_scalar_ctors import test_void_from_byteslike
```



---
## test_void_arraylike_trumps_byteslike
```python
from test_scalar_ctors import test_void_arraylike_trumps_byteslike
```



---
## test_void_dtype_arg
```python
from test_scalar_ctors import test_void_dtype_arg
```



---
## test_void_from_integer_with_dtype
```python
from test_scalar_ctors import test_void_from_integer_with_dtype
```



---
## test_void_from_structure
```python
from test_scalar_ctors import test_void_from_structure
```



---
## test_void_bad_dtype
```python
from test_scalar_ctors import test_void_bad_dtype
```



---
## test_floating
```python
from test_scalar_ctors import test_floating
```



---
## test_floating_overflow
```python
from test_scalar_ctors import test_floating_overflow
```

Strings containing an unrepresentable float overflow 

---
## test_superclass
```python
from test_scalar_ctors import test_superclass
```



---
## test_datetime
```python
from test_scalar_ctors import test_datetime
```



---
## test_bool
```python
from test_scalar_ctors import test_bool
```



---
## test_void
```python
from test_scalar_ctors import test_void
```



---
## test_intp
```python
from test_scalar_ctors import test_intp
```



---
## test_uint64_from_negative
```python
from test_scalar_ctors import test_uint64_from_negative
```



---
## _do_test
```python
from test_scalar_ctors import _do_test
```



---
## test_integers
```python
from test_scalar_ctors import test_integers
```



---
## test_reals
```python
from test_scalar_ctors import test_reals
```



---
## test_complex
```python
from test_scalar_ctors import test_complex
```



---
## __name__
```python
from test_multiarray import __name__
```



---
## assert_arg_sorted
```python
from test_multiarray import assert_arg_sorted
```



---
## _aligned_zeros
```python
from test_multiarray import _aligned_zeros
```

Allocate a new ndarray with aligned memory.

The ndarray is guaranteed *not* aligned to twice the requested alignment.
Eg, if align=4, guarantees it is not aligned to 8. If align=None uses
dtype.alignment.

---
## TestFlags
```python
from test_multiarray import TestFlags
```



---
## TestHash
```python
from test_multiarray import TestHash
```



---
## TestAttributes
```python
from test_multiarray import TestAttributes
```



---
## TestArrayConstruction
```python
from test_multiarray import TestArrayConstruction
```



---
## TestAssignment
```python
from test_multiarray import TestAssignment
```



---
## TestDtypedescr
```python
from test_multiarray import TestDtypedescr
```



---
## TestZeroRank
```python
from test_multiarray import TestZeroRank
```



---
## TestScalarIndexing
```python
from test_multiarray import TestScalarIndexing
```



---
## TestCreation
```python
from test_multiarray import TestCreation
```

Test the np.array constructor

---
## TestStructured
```python
from test_multiarray import TestStructured
```



---
## TestBool
```python
from test_multiarray import TestBool
```



---
## TestZeroSizeFlexible
```python
from test_multiarray import TestZeroSizeFlexible
```



---
## TestMethods
```python
from test_multiarray import TestMethods
```



---
## TestCequenceMethods
```python
from test_multiarray import TestCequenceMethods
```



---
## TestBinop
```python
from test_multiarray import TestBinop
```



---
## TestTemporaryElide
```python
from test_multiarray import TestTemporaryElide
```



---
## TestCAPI
```python
from test_multiarray import TestCAPI
```



---
## TestSubscripting
```python
from test_multiarray import TestSubscripting
```



---
## TestPickling
```python
from test_multiarray import TestPickling
```



---
## TestFancyIndexing
```python
from test_multiarray import TestFancyIndexing
```



---
## TestStringCompare
```python
from test_multiarray import TestStringCompare
```



---
## TestArgmaxArgminCommon
```python
from test_multiarray import TestArgmaxArgminCommon
```



---
## TestArgmax
```python
from test_multiarray import TestArgmax
```



---
## TestArgmin
```python
from test_multiarray import TestArgmin
```



---
## TestMinMax
```python
from test_multiarray import TestMinMax
```



---
## TestNewaxis
```python
from test_multiarray import TestNewaxis
```



---
## TestClip
```python
from test_multiarray import TestClip
```



---
## TestCompress
```python
from test_multiarray import TestCompress
```



---
## TestPutmask
```python
from test_multiarray import TestPutmask
```



---
## TestTake
```python
from test_multiarray import TestTake
```



---
## TestLexsort
```python
from test_multiarray import TestLexsort
```



---
## TestIO
```python
from test_multiarray import TestIO
```

Test tofile, fromfile, tobytes, and fromstring

---
## TestFromBuffer
```python
from test_multiarray import TestFromBuffer
```



---
## TestFlat
```python
from test_multiarray import TestFlat
```



---
## TestResize
```python
from test_multiarray import TestResize
```



---
## TestRecord
```python
from test_multiarray import TestRecord
```



---
## TestView
```python
from test_multiarray import TestView
```



---
## _mean
```python
from test_multiarray import _mean
```



---
## _var
```python
from test_multiarray import _var
```



---
## _std
```python
from test_multiarray import _std
```



---
## TestStats
```python
from test_multiarray import TestStats
```



---
## TestVdot
```python
from test_multiarray import TestVdot
```



---
## TestDot
```python
from test_multiarray import TestDot
```



---
## MatmulCommon
```python
from test_multiarray import MatmulCommon
```

Common tests for '@' operator and numpy.matmul.

    

---
## TestMatmul
```python
from test_multiarray import TestMatmul
```



---
## TestMatmulOperator
```python
from test_multiarray import TestMatmulOperator
```



---
## TestMatmulInplace
```python
from test_multiarray import TestMatmulInplace
```



---
## test_matmul_axes
```python
from test_multiarray import test_matmul_axes
```



---
## TestInner
```python
from test_multiarray import TestInner
```



---
## TestChoose
```python
from test_multiarray import TestChoose
```



---
## TestRepeat
```python
from test_multiarray import TestRepeat
```



---
## TestNeighborhoodIter
```python
from test_multiarray import TestNeighborhoodIter
```



---
## TestStackedNeighborhoodIter
```python
from test_multiarray import TestStackedNeighborhoodIter
```



---
## TestWarnings
```python
from test_multiarray import TestWarnings
```



---
## TestMinScalarType
```python
from test_multiarray import TestMinScalarType
```



---
## TestPEP3118Dtype
```python
from test_multiarray import TestPEP3118Dtype
```



---
## TestNewBufferProtocol
```python
from test_multiarray import TestNewBufferProtocol
```

Test PEP3118 buffers 

---
## TestArrayCreationCopyArgument
```python
from test_multiarray import TestArrayCreationCopyArgument
```



---
## TestArrayAttributeDeletion
```python
from test_multiarray import TestArrayAttributeDeletion
```



---
## TestArrayInterface
```python
from test_multiarray import TestArrayInterface
```



---
## test_interface_no_shape
```python
from test_multiarray import test_interface_no_shape
```



---
## test_array_interface_itemsize
```python
from test_multiarray import test_array_interface_itemsize
```



---
## test_array_interface_empty_shape
```python
from test_multiarray import test_array_interface_empty_shape
```



---
## test_array_interface_offset
```python
from test_multiarray import test_array_interface_offset
```



---
## test_array_interface_unicode_typestr
```python
from test_multiarray import test_array_interface_unicode_typestr
```



---
## test_flat_element_deletion
```python
from test_multiarray import test_flat_element_deletion
```



---
## test_scalar_element_deletion
```python
from test_multiarray import test_scalar_element_deletion
```



---
## TestMapIter
```python
from test_multiarray import TestMapIter
```



---
## TestAsCArray
```python
from test_multiarray import TestAsCArray
```



---
## TestConversion
```python
from test_multiarray import TestConversion
```



---
## TestWhere
```python
from test_multiarray import TestWhere
```



---
## TestHashing
```python
from test_multiarray import TestHashing
```



---
## TestArrayPriority
```python
from test_multiarray import TestArrayPriority
```



---
## TestBytestringArrayNonzero
```python
from test_multiarray import TestBytestringArrayNonzero
```



---
## TestUnicodeEncoding
```python
from test_multiarray import TestUnicodeEncoding
```

Tests for encoding related bugs, such as UCS2 vs UCS4, round-tripping
issues, etc

---
## TestUnicodeArrayNonzero
```python
from test_multiarray import TestUnicodeArrayNonzero
```



---
## TestFormat
```python
from test_multiarray import TestFormat
```



---
## TestCTypes
```python
from test_multiarray import TestCTypes
```



---
## TestWritebackIfCopy
```python
from test_multiarray import TestWritebackIfCopy
```



---
## TestArange
```python
from test_multiarray import TestArange
```



---
## TestArrayFinalize
```python
from test_multiarray import TestArrayFinalize
```

Tests __array_finalize__ 

---
## test_orderconverter_with_nonASCII_unicode_ordering
```python
from test_multiarray import test_orderconverter_with_nonASCII_unicode_ordering
```



---
## test_equal_override
```python
from test_multiarray import test_equal_override
```



---
## test_equal_subclass_no_override
```python
from test_multiarray import test_equal_subclass_no_override
```



---
## test_no_loop_gives_all_true_or_false
```python
from test_multiarray import test_no_loop_gives_all_true_or_false
```



---
## test_comparisons_forwards_error
```python
from test_multiarray import test_comparisons_forwards_error
```



---
## test_richcompare_scalar_boolean_singleton_return
```python
from test_multiarray import test_richcompare_scalar_boolean_singleton_return
```



---
## test_ragged_comparison_fails
```python
from test_multiarray import test_ragged_comparison_fails
```



---
## test_npymath_complex
```python
from test_multiarray import test_npymath_complex
```



---
## test_npymath_real
```python
from test_multiarray import test_npymath_real
```



---
## test_uintalignment_and_alignment
```python
from test_multiarray import test_uintalignment_and_alignment
```



---
## TestAlignment
```python
from test_multiarray import TestAlignment
```



---
## test_getfield
```python
from test_multiarray import test_getfield
```



---
## TestViewDtype
```python
from test_multiarray import TestViewDtype
```

Verify that making a view of a non-contiguous array works as expected.

---
## test_sort_float
```python
from test_multiarray import test_sort_float
```



---
## test_sort_float16
```python
from test_multiarray import test_sort_float16
```



---
## test_sort_int
```python
from test_multiarray import test_sort_int
```



---
## test_sort_uint
```python
from test_multiarray import test_sort_uint
```



---
## test_private_get_ndarray_c_version
```python
from test_multiarray import test_private_get_ndarray_c_version
```



---
## test_argsort_float
```python
from test_multiarray import test_argsort_float
```



---
## test_argsort_int
```python
from test_multiarray import test_argsort_int
```



---
## test_gh_22683
```python
from test_multiarray import test_gh_22683
```



---
## test_gh_24459
```python
from test_multiarray import test_gh_24459
```



---
## setup_method
```python
from test_multiarray import setup_method
```



---
## test_writeable
```python
from test_multiarray import test_writeable
```



---
## test_writeable_any_base
```python
from test_multiarray import test_writeable_any_base
```



---
## test_writeable_from_readonly
```python
from test_multiarray import test_writeable_from_readonly
```



---
## test_writeable_from_buffer
```python
from test_multiarray import test_writeable_from_buffer
```



---
## test_writeable_pickle
```python
from test_multiarray import test_writeable_pickle
```



---
## test_writeable_from_c_data
```python
from test_multiarray import test_writeable_from_c_data
```



---
## test_warnonwrite
```python
from test_multiarray import test_warnonwrite
```



---
## test_readonly_flag_protocols
```python
from test_multiarray import test_readonly_flag_protocols
```



---
## test_otherflags
```python
from test_multiarray import test_otherflags
```



---
## test_string_align
```python
from test_multiarray import test_string_align
```



---
## test_void_align
```python
from test_multiarray import test_void_align
```



---
## test_int
```python
from test_multiarray import test_int
```



---
## test_attributes
```python
from test_multiarray import test_attributes
```



---
## test_dtypeattr
```python
from test_multiarray import test_dtypeattr
```



---
## test_int_subclassing
```python
from test_multiarray import test_int_subclassing
```



---
## test_stridesattr
```python
from test_multiarray import test_stridesattr
```



---
## test_set_stridesattr
```python
from test_multiarray import test_set_stridesattr
```



---
## test_fill
```python
from test_multiarray import test_fill
```



---
## test_fill_max_uint64
```python
from test_multiarray import test_fill_max_uint64
```



---
## test_fill_struct_array
```python
from test_multiarray import test_fill_struct_array
```



---
## test_fill_readonly
```python
from test_multiarray import test_fill_readonly
```



---
## test_array
```python
from test_multiarray import test_array
```



---
## test_array_empty
```python
from test_multiarray import test_array_empty
```



---
## test_0d_array_shape
```python
from test_multiarray import test_0d_array_shape
```



---
## test_array_copy_false
```python
from test_multiarray import test_array_copy_false
```



---
## test_array_copy_true
```python
from test_multiarray import test_array_copy_true
```



---
## test_array_cont
```python
from test_multiarray import test_array_cont
```



---
## test_bad_arguments_error
```python
from test_multiarray import test_bad_arguments_error
```



---
## test_array_as_keyword
```python
from test_multiarray import test_array_as_keyword
```



---
## test_assignment_broadcasting
```python
from test_multiarray import test_assignment_broadcasting
```



---
## test_assignment_errors
```python
from test_multiarray import test_assignment_errors
```



---
## test_unicode_assignment
```python
from test_multiarray import test_unicode_assignment
```



---
## test_stringlike_empty_list
```python
from test_multiarray import test_stringlike_empty_list
```



---
## test_longdouble_assignment
```python
from test_multiarray import test_longdouble_assignment
```



---
## test_cast_to_string
```python
from test_multiarray import test_cast_to_string
```



---
## test_construction
```python
from test_multiarray import test_construction
```



---
## test_byteorders
```python
from test_multiarray import test_byteorders
```



---
## test_structured_non_void
```python
from test_multiarray import test_structured_non_void
```



---
## test_ellipsis_subscript
```python
from test_multiarray import test_ellipsis_subscript
```



---
## test_empty_subscript
```python
from test_multiarray import test_empty_subscript
```



---
## test_invalid_subscript
```python
from test_multiarray import test_invalid_subscript
```



---
## test_ellipsis_subscript_assignment
```python
from test_multiarray import test_ellipsis_subscript_assignment
```



---
## test_empty_subscript_assignment
```python
from test_multiarray import test_empty_subscript_assignment
```



---
## test_invalid_subscript_assignment
```python
from test_multiarray import test_invalid_subscript_assignment
```



---
## test_newaxis
```python
from test_multiarray import test_newaxis
```



---
## test_invalid_newaxis
```python
from test_multiarray import test_invalid_newaxis
```



---
## test_constructor
```python
from test_multiarray import test_constructor
```



---
## test_output
```python
from test_multiarray import test_output
```



---
## test_real_imag
```python
from test_multiarray import test_real_imag
```



---
## test_overlapping_assignment
```python
from test_multiarray import test_overlapping_assignment
```



---
## test_from_attribute
```python
from test_multiarray import test_from_attribute
```



---
## test_from_string
```python
from test_multiarray import test_from_string
```



---
## test_void
```python
from test_multiarray import test_void
```



---
## test_structured_void_promotion
```python
from test_multiarray import test_structured_void_promotion
```



---
## test_too_big_error
```python
from test_multiarray import test_too_big_error
```



---
## test_malloc_fails
```python
from test_multiarray import test_malloc_fails
```



---
## test_zeros
```python
from test_multiarray import test_zeros
```



---
## test_zeros_big
```python
from test_multiarray import test_zeros_big
```



---
## test_zeros_obj
```python
from test_multiarray import test_zeros_obj
```



---
## test_zeros_obj_obj
```python
from test_multiarray import test_zeros_obj_obj
```



---
## test_zeros_like_like_zeros
```python
from test_multiarray import test_zeros_like_like_zeros
```



---
## test_empty_unicode
```python
from test_multiarray import test_empty_unicode
```



---
## test_sequence_non_homogeneous
```python
from test_multiarray import test_sequence_non_homogeneous
```



---
## test_non_sequence_sequence
```python
from test_multiarray import test_non_sequence_sequence
```

Should not segfault.

Class Fail breaks the sequence protocol for new style classes, i.e.,
those derived from object. Class Map is a mapping type indicated by
raising a ValueError. At some point we may raise a warning instead
of an error in the Fail case.

---
## test_no_len_object_type
```python
from test_multiarray import test_no_len_object_type
```



---
## test_false_len_sequence
```python
from test_multiarray import test_false_len_sequence
```



---
## test_false_len_iterable
```python
from test_multiarray import test_false_len_iterable
```



---
## test_failed_len_sequence
```python
from test_multiarray import test_failed_len_sequence
```



---
## test_array_too_big
```python
from test_multiarray import test_array_too_big
```



---
## _ragged_creation
```python
from test_multiarray import _ragged_creation
```



---
## test_ragged_ndim_object
```python
from test_multiarray import test_ragged_ndim_object
```



---
## test_ragged_shape_object
```python
from test_multiarray import test_ragged_shape_object
```



---
## test_array_of_ragged_array
```python
from test_multiarray import test_array_of_ragged_array
```



---
## test_deep_nonragged_object
```python
from test_multiarray import test_deep_nonragged_object
```



---
## test_object_initialized_to_None
```python
from test_multiarray import test_object_initialized_to_None
```



---
## test_creation_from_dtypemeta
```python
from test_multiarray import test_creation_from_dtypemeta
```



---
## test_subarray_field_access
```python
from test_multiarray import test_subarray_field_access
```



---
## test_subarray_comparison
```python
from test_multiarray import test_subarray_comparison
```



---
## test_empty_structured_array_comparison
```python
from test_multiarray import test_empty_structured_array_comparison
```



---
## test_structured_array_comparison_bad_broadcasts
```python
from test_multiarray import test_structured_array_comparison_bad_broadcasts
```



---
## test_structured_comparisons_with_promotion
```python
from test_multiarray import test_structured_comparisons_with_promotion
```



---
## test_void_comparison_failures
```python
from test_multiarray import test_void_comparison_failures
```



---
## test_casting
```python
from test_multiarray import test_casting
```



---
## test_objview
```python
from test_multiarray import test_objview
```



---
## test_setfield
```python
from test_multiarray import test_setfield
```



---
## test_setfield_object
```python
from test_multiarray import test_setfield_object
```



---
## test_zero_width_string
```python
from test_multiarray import test_zero_width_string
```



---
## test_base_attr
```python
from test_multiarray import test_base_attr
```



---
## test_assignment
```python
from test_multiarray import test_assignment
```



---
## test_scalar_assignment
```python
from test_multiarray import test_scalar_assignment
```



---
## test_structuredscalar_indexing
```python
from test_multiarray import test_structuredscalar_indexing
```



---
## test_multiindex_titles
```python
from test_multiarray import test_multiindex_titles
```



---
## test_structured_cast_promotion_fieldorder
```python
from test_multiarray import test_structured_cast_promotion_fieldorder
```



---
## test_structured_promotion_packs
```python
from test_multiarray import test_structured_promotion_packs
```



---
## test_structured_asarray_is_view
```python
from test_multiarray import test_structured_asarray_is_view
```



---
## test_test_interning
```python
from test_multiarray import test_test_interning
```



---
## test_sum
```python
from test_multiarray import test_sum
```



---
## check_count_nonzero
```python
from test_multiarray import check_count_nonzero
```



---
## test_count_nonzero
```python
from test_multiarray import test_count_nonzero
```



---
## test_count_nonzero_all
```python
from test_multiarray import test_count_nonzero_all
```



---
## test_count_nonzero_unaligned
```python
from test_multiarray import test_count_nonzero_unaligned
```



---
## _test_cast_from_flexible
```python
from test_multiarray import _test_cast_from_flexible
```



---
## test_cast_from_void
```python
from test_multiarray import test_cast_from_void
```



---
## test_cast_from_unicode
```python
from test_multiarray import test_cast_from_unicode
```



---
## test_cast_from_bytes
```python
from test_multiarray import test_cast_from_bytes
```



---
## _zeros
```python
from test_multiarray import _zeros
```



---
## test_create
```python
from test_multiarray import test_create
```



---
## _test_sort_partition
```python
from test_multiarray import _test_sort_partition
```



---
## test_sort
```python
from test_multiarray import test_sort
```



---
## test_argsort
```python
from test_multiarray import test_argsort
```



---
## test_partition
```python
from test_multiarray import test_partition
```



---
## test_argpartition
```python
from test_multiarray import test_argpartition
```



---
## test_resize
```python
from test_multiarray import test_resize
```



---
## test_view
```python
from test_multiarray import test_view
```



---
## test_dumps
```python
from test_multiarray import test_dumps
```



---
## test_pickle
```python
from test_multiarray import test_pickle
```



---
## test_pickle_empty
```python
from test_multiarray import test_pickle_empty
```

Checking if an empty array pickled and un-pickled will not cause a
segmentation fault

---
## test_pickle_with_buffercallback
```python
from test_multiarray import test_pickle_with_buffercallback
```



---
## test_all_where
```python
from test_multiarray import test_all_where
```



---
## test_any_where
```python
from test_multiarray import test_any_where
```



---
## test_compress
```python
from test_multiarray import test_compress
```



---
## test_choose
```python
from test_multiarray import test_choose
```



---
## test_prod
```python
from test_multiarray import test_prod
```



---
## test_repeat
```python
from test_multiarray import test_repeat
```



---
## test_reshape
```python
from test_multiarray import test_reshape
```



---
## test_round
```python
from test_multiarray import test_round
```



---
## test_squeeze
```python
from test_multiarray import test_squeeze
```



---
## test_transpose
```python
from test_multiarray import test_transpose
```



---
## test_sort_unsigned
```python
from test_multiarray import test_sort_unsigned
```



---
## test_sort_signed
```python
from test_multiarray import test_sort_signed
```



---
## test_sort_complex
```python
from test_multiarray import test_sort_complex
```



---
## test_sort_complex_byte_swapping
```python
from test_multiarray import test_sort_complex_byte_swapping
```



---
## test_sort_string
```python
from test_multiarray import test_sort_string
```



---
## test_sort_object
```python
from test_multiarray import test_sort_object
```



---
## test_sort_structured
```python
from test_multiarray import test_sort_structured
```



---
## test_sort_time
```python
from test_multiarray import test_sort_time
```



---
## test_sort_axis
```python
from test_multiarray import test_sort_axis
```



---
## test_sort_size_0
```python
from test_multiarray import test_sort_size_0
```



---
## test_sort_bad_ordering
```python
from test_multiarray import test_sort_bad_ordering
```



---
## test_void_sort
```python
from test_multiarray import test_void_sort
```



---
## test_sort_raises
```python
from test_multiarray import test_sort_raises
```



---
## test_sort_degraded
```python
from test_multiarray import test_sort_degraded
```



---
## test_copy
```python
from test_multiarray import test_copy
```



---
## test__deepcopy__
```python
from test_multiarray import test__deepcopy__
```



---
## test__deepcopy__catches_failure
```python
from test_multiarray import test__deepcopy__catches_failure
```



---
## test_sort_order
```python
from test_multiarray import test_sort_order
```



---
## test_sort_unicode_kind
```python
from test_multiarray import test_sort_unicode_kind
```



---
## test_searchsorted_floats
```python
from test_multiarray import test_searchsorted_floats
```



---
## test_searchsorted_complex
```python
from test_multiarray import test_searchsorted_complex
```



---
## test_searchsorted_n_elements
```python
from test_multiarray import test_searchsorted_n_elements
```



---
## test_searchsorted_unaligned_array
```python
from test_multiarray import test_searchsorted_unaligned_array
```



---
## test_searchsorted_resetting
```python
from test_multiarray import test_searchsorted_resetting
```



---
## test_searchsorted_type_specific
```python
from test_multiarray import test_searchsorted_type_specific
```



---
## test_searchsorted_unicode
```python
from test_multiarray import test_searchsorted_unicode
```



---
## test_searchsorted_with_invalid_sorter
```python
from test_multiarray import test_searchsorted_with_invalid_sorter
```



---
## test_searchsorted_with_sorter
```python
from test_multiarray import test_searchsorted_with_sorter
```



---
## test_searchsorted_return_type
```python
from test_multiarray import test_searchsorted_return_type
```



---
## test_argpartition_out_of_range
```python
from test_multiarray import test_argpartition_out_of_range
```



---
## test_partition_out_of_range
```python
from test_multiarray import test_partition_out_of_range
```



---
## test_argpartition_integer
```python
from test_multiarray import test_argpartition_integer
```



---
## test_partition_integer
```python
from test_multiarray import test_partition_integer
```



---
## test_partition_empty_array
```python
from test_multiarray import test_partition_empty_array
```



---
## test_argpartition_empty_array
```python
from test_multiarray import test_argpartition_empty_array
```



---
## assert_partitioned
```python
from test_multiarray import assert_partitioned
```



---
## test_partition_iterative
```python
from test_multiarray import test_partition_iterative
```



---
## test_partition_cdtype
```python
from test_multiarray import test_partition_cdtype
```



---
## test_partition_unicode_kind
```python
from test_multiarray import test_partition_unicode_kind
```



---
## test_partition_fuzz
```python
from test_multiarray import test_partition_fuzz
```



---
## test_argpartition_gh5524
```python
from test_multiarray import test_argpartition_gh5524
```



---
## test_flatten
```python
from test_multiarray import test_flatten
```



---
## test_arr_mult
```python
from test_multiarray import test_arr_mult
```



---
## test_no_dgemv
```python
from test_multiarray import test_no_dgemv
```



---
## test_dot
```python
from test_multiarray import test_dot
```



---
## test_dot_type_mismatch
```python
from test_multiarray import test_dot_type_mismatch
```



---
## test_dot_out_mem_overlap
```python
from test_multiarray import test_dot_out_mem_overlap
```



---
## test_dot_matmul_out
```python
from test_multiarray import test_dot_matmul_out
```



---
## test_dot_matmul_inner_array_casting_fails
```python
from test_multiarray import test_dot_matmul_inner_array_casting_fails
```



---
## test_matmul_out
```python
from test_multiarray import test_matmul_out
```



---
## test_diagonal
```python
from test_multiarray import test_diagonal
```



---
## test_diagonal_view_notwriteable
```python
from test_multiarray import test_diagonal_view_notwriteable
```



---
## test_diagonal_memleak
```python
from test_multiarray import test_diagonal_memleak
```



---
## test_size_zero_memleak
```python
from test_multiarray import test_size_zero_memleak
```



---
## test_trace
```python
from test_multiarray import test_trace
```



---
## test_trace_subclass
```python
from test_multiarray import test_trace_subclass
```



---
## test_put
```python
from test_multiarray import test_put
```



---
## test_ravel
```python
from test_multiarray import test_ravel
```



---
## test_ravel_subclass
```python
from test_multiarray import test_ravel_subclass
```



---
## test_swapaxes
```python
from test_multiarray import test_swapaxes
```



---
## test_conjugate
```python
from test_multiarray import test_conjugate
```



---
## test_conjugate_out
```python
from test_multiarray import test_conjugate_out
```



---
## test__complex__
```python
from test_multiarray import test__complex__
```



---
## test__complex__should_not_work
```python
from test_multiarray import test__complex__should_not_work
```



---
## test_array_contains
```python
from test_multiarray import test_array_contains
```



---
## test_inplace
```python
from test_multiarray import test_inplace
```



---
## test_ufunc_binop_interaction
```python
from test_multiarray import test_ufunc_binop_interaction
```



---
## test_ufunc_binop_bad_array_priority
```python
from test_multiarray import test_ufunc_binop_bad_array_priority
```



---
## test_ufunc_override_normalize_signature
```python
from test_multiarray import test_ufunc_override_normalize_signature
```



---
## test_array_ufunc_index
```python
from test_multiarray import test_array_ufunc_index
```



---
## test_out_override
```python
from test_multiarray import test_out_override
```



---
## test_pow_override_with_errors
```python
from test_multiarray import test_pow_override_with_errors
```



---
## test_pow_array_object_dtype
```python
from test_multiarray import test_pow_array_object_dtype
```



---
## test_pos_array_ufunc_override
```python
from test_multiarray import test_pos_array_ufunc_override
```



---
## test_extension_incref_elide
```python
from test_multiarray import test_extension_incref_elide
```



---
## test_extension_incref_elide_stack
```python
from test_multiarray import test_extension_incref_elide_stack
```



---
## test_temporary_with_cast
```python
from test_multiarray import test_temporary_with_cast
```



---
## test_elide_broadcast
```python
from test_multiarray import test_elide_broadcast
```



---
## test_elide_scalar
```python
from test_multiarray import test_elide_scalar
```



---
## test_elide_scalar_readonly
```python
from test_multiarray import test_elide_scalar_readonly
```



---
## test_elide_readonly
```python
from test_multiarray import test_elide_readonly
```



---
## test_elide_updateifcopy
```python
from test_multiarray import test_elide_updateifcopy
```



---
## test_IsPythonScalar
```python
from test_multiarray import test_IsPythonScalar
```



---
## test_intp_sequence_converters
```python
from test_multiarray import test_intp_sequence_converters
```



---
## test_intp_sequence_converters_errors
```python
from test_multiarray import test_intp_sequence_converters_errors
```



---
## test_test_zero_rank
```python
from test_multiarray import test_test_zero_rank
```



---
## test_correct_protocol5_error_message
```python
from test_multiarray import test_correct_protocol5_error_message
```



---
## test_record_array_with_object_dtype
```python
from test_multiarray import test_record_array_with_object_dtype
```



---
## test_f_contiguous_array
```python
from test_multiarray import test_f_contiguous_array
```



---
## test_non_contiguous_array
```python
from test_multiarray import test_non_contiguous_array
```



---
## test_roundtrip
```python
from test_multiarray import test_roundtrip
```



---
## _loads
```python
from test_multiarray import _loads
```



---
## test_version0_int8
```python
from test_multiarray import test_version0_int8
```



---
## test_version0_float32
```python
from test_multiarray import test_version0_float32
```



---
## test_version0_object
```python
from test_multiarray import test_version0_object
```



---
## test_version1_int8
```python
from test_multiarray import test_version1_int8
```



---
## test_version1_float32
```python
from test_multiarray import test_version1_float32
```



---
## test_version1_object
```python
from test_multiarray import test_version1_object
```



---
## test_subarray_int_shape
```python
from test_multiarray import test_subarray_int_shape
```



---
## test_datetime64_byteorder
```python
from test_multiarray import test_datetime64_byteorder
```



---
## test_list
```python
from test_multiarray import test_list
```



---
## test_tuple
```python
from test_multiarray import test_tuple
```



---
## test_mask
```python
from test_multiarray import test_mask
```



---
## test_mask2
```python
from test_multiarray import test_mask2
```



---
## test_assign_mask
```python
from test_multiarray import test_assign_mask
```



---
## test_assign_mask2
```python
from test_multiarray import test_assign_mask2
```



---
## test_string
```python
from test_multiarray import test_string
```



---
## test_mixed
```python
from test_multiarray import test_mixed
```



---
## test_unicode
```python
from test_multiarray import test_unicode
```



---
## test_np_argmin_argmax_keepdims
```python
from test_multiarray import test_np_argmin_argmax_keepdims
```



---
## test_all
```python
from test_multiarray import test_all
```



---
## test_output_shape
```python
from test_multiarray import test_output_shape
```



---
## test_ret_is_out
```python
from test_multiarray import test_ret_is_out
```



---
## test_np_vs_ndarray
```python
from test_multiarray import test_np_vs_ndarray
```



---
## test_object_with_NULLs
```python
from test_multiarray import test_object_with_NULLs
```



---
## test_combinations
```python
from test_multiarray import test_combinations
```



---
## test_maximum_signed_integers
```python
from test_multiarray import test_maximum_signed_integers
```



---
## test_minimum_signed_integers
```python
from test_multiarray import test_minimum_signed_integers
```



---
## test_scalar
```python
from test_multiarray import test_scalar
```



---
## test_axis
```python
from test_multiarray import test_axis
```



---
## test_datetime
```python
from test_multiarray import test_datetime
```



---
## test_basic
```python
from test_multiarray import test_basic
```



---
## _check_range
```python
from test_multiarray import _check_range
```



---
## _clip_type
```python
from test_multiarray import _clip_type
```



---
## test_record_array
```python
from test_multiarray import test_record_array
```



---
## test_max_or_min
```python
from test_multiarray import test_max_or_min
```



---
## test_nan
```python
from test_multiarray import test_nan
```



---
## test_truncate
```python
from test_multiarray import test_truncate
```



---
## tst_basic
```python
from test_multiarray import tst_basic
```



---
## test_ip_types
```python
from test_multiarray import test_ip_types
```



---
## test_mask_size
```python
from test_multiarray import test_mask_size
```



---
## test_byteorder
```python
from test_multiarray import test_byteorder
```



---
## test_overlaps
```python
from test_multiarray import test_overlaps
```



---
## test_kwargs
```python
from test_multiarray import test_kwargs
```



---
## test_raise
```python
from test_multiarray import test_raise
```



---
## test_clip
```python
from test_multiarray import test_clip
```



---
## test_wrap
```python
from test_multiarray import test_wrap
```



---
## test_out_overlap
```python
from test_multiarray import test_out_overlap
```



---
## test_object
```python
from test_multiarray import test_object
```



---
## test_invalid_axis
```python
from test_multiarray import test_invalid_axis
```



---
## x
```python
from test_multiarray import x
```



---
## tmp_filename
```python
from test_multiarray import tmp_filename
```



---
## test_nofile
```python
from test_multiarray import test_nofile
```



---
## test_bool_fromstring
```python
from test_multiarray import test_bool_fromstring
```



---
## test_uint64_fromstring
```python
from test_multiarray import test_uint64_fromstring
```



---
## test_int64_fromstring
```python
from test_multiarray import test_int64_fromstring
```



---
## test_fromstring_count0
```python
from test_multiarray import test_fromstring_count0
```



---
## test_empty_files_text
```python
from test_multiarray import test_empty_files_text
```



---
## test_empty_files_binary
```python
from test_multiarray import test_empty_files_binary
```



---
## test_roundtrip_file
```python
from test_multiarray import test_roundtrip_file
```



---
## test_roundtrip_dump_pathlib
```python
from test_multiarray import test_roundtrip_dump_pathlib
```



---
## test_roundtrip_binary_str
```python
from test_multiarray import test_roundtrip_binary_str
```



---
## test_roundtrip_str
```python
from test_multiarray import test_roundtrip_str
```



---
## test_roundtrip_repr
```python
from test_multiarray import test_roundtrip_repr
```



---
## test_unseekable_fromfile
```python
from test_multiarray import test_unseekable_fromfile
```



---
## test_io_open_unbuffered_fromfile
```python
from test_multiarray import test_io_open_unbuffered_fromfile
```



---
## test_largish_file
```python
from test_multiarray import test_largish_file
```



---
## test_io_open_buffered_fromfile
```python
from test_multiarray import test_io_open_buffered_fromfile
```



---
## test_file_position_after_fromfile
```python
from test_multiarray import test_file_position_after_fromfile
```



---
## test_file_position_after_tofile
```python
from test_multiarray import test_file_position_after_tofile
```



---
## test_load_object_array_fromfile
```python
from test_multiarray import test_load_object_array_fromfile
```



---
## test_fromfile_offset
```python
from test_multiarray import test_fromfile_offset
```



---
## test_fromfile_bad_dup
```python
from test_multiarray import test_fromfile_bad_dup
```



---
## _check_from
```python
from test_multiarray import _check_from
```



---
## decimal_sep_localization
```python
from test_multiarray import decimal_sep_localization
```

Including this fixture in a test will automatically
execute it with both types of decimal separator.

So::

    def test_decimal(decimal_sep_localization):
        pass

is equivalent to the following two tests::

    def test_decimal_period_separator():
        pass

    def test_decimal_comma_separator():
        with CommaDecimalPointLocale():
            pass

---
## test_inf
```python
from test_multiarray import test_inf
```



---
## test_numbers
```python
from test_multiarray import test_numbers
```



---
## test_binary
```python
from test_multiarray import test_binary
```



---
## test_counted_string
```python
from test_multiarray import test_counted_string
```



---
## test_string_with_ws
```python
from test_multiarray import test_string_with_ws
```



---
## test_counted_string_with_ws
```python
from test_multiarray import test_counted_string_with_ws
```



---
## test_ascii
```python
from test_multiarray import test_ascii
```



---
## test_malformed
```python
from test_multiarray import test_malformed
```



---
## test_long_sep
```python
from test_multiarray import test_long_sep
```



---
## test_dtype
```python
from test_multiarray import test_dtype
```



---
## test_dtype_bool
```python
from test_multiarray import test_dtype_bool
```



---
## test_tofile_sep
```python
from test_multiarray import test_tofile_sep
```



---
## test_tofile_format
```python
from test_multiarray import test_tofile_format
```



---
## test_tofile_cleanup
```python
from test_multiarray import test_tofile_cleanup
```



---
## test_fromfile_subarray_binary
```python
from test_multiarray import test_fromfile_subarray_binary
```



---
## test_parsing_subarray_unsupported
```python
from test_multiarray import test_parsing_subarray_unsupported
```



---
## test_read_shorter_than_count_subarray
```python
from test_multiarray import test_read_shorter_than_count_subarray
```



---
## test_array_base
```python
from test_multiarray import test_array_base
```



---
## test_empty
```python
from test_multiarray import test_empty
```



---
## test_mmap_close
```python
from test_multiarray import test_mmap_close
```



---
## test_contiguous
```python
from test_multiarray import test_contiguous
```



---
## test_discontiguous
```python
from test_multiarray import test_discontiguous
```



---
## test___array__
```python
from test_multiarray import test___array__
```



---
## test_refcount
```python
from test_multiarray import test_refcount
```



---
## test_index_getset
```python
from test_multiarray import test_index_getset
```



---
## test_check_reference
```python
from test_multiarray import test_check_reference
```



---
## test_int_shape
```python
from test_multiarray import test_int_shape
```



---
## test_none_shape
```python
from test_multiarray import test_none_shape
```



---
## test_0d_shape
```python
from test_multiarray import test_0d_shape
```



---
## test_invalid_arguments
```python
from test_multiarray import test_invalid_arguments
```



---
## test_freeform_shape
```python
from test_multiarray import test_freeform_shape
```



---
## test_zeros_appended
```python
from test_multiarray import test_zeros_appended
```



---
## test_obj_obj
```python
from test_multiarray import test_obj_obj
```



---
## test_empty_view
```python
from test_multiarray import test_empty_view
```



---
## test_check_weakref
```python
from test_multiarray import test_check_weakref
```



---
## test_field_rename
```python
from test_multiarray import test_field_rename
```



---
## test_multiple_field_name_occurrence
```python
from test_multiarray import test_multiple_field_name_occurrence
```



---
## test_bytes_fields
```python
from test_multiarray import test_bytes_fields
```



---
## test_multiple_field_name_unicode
```python
from test_multiarray import test_multiple_field_name_unicode
```



---
## test_fromarrays_unicode
```python
from test_multiarray import test_fromarrays_unicode
```



---
## test_unicode_order
```python
from test_multiarray import test_unicode_order
```



---
## test_field_names
```python
from test_multiarray import test_field_names
```



---
## test_record_hash
```python
from test_multiarray import test_record_hash
```



---
## test_record_no_hash
```python
from test_multiarray import test_record_no_hash
```



---
## test_empty_structure_creation
```python
from test_multiarray import test_empty_structure_creation
```



---
## test_multifield_indexing_view
```python
from test_multiarray import test_multifield_indexing_view
```



---
## test_python_type
```python
from test_multiarray import test_python_type
```



---
## test_keepdims
```python
from test_multiarray import test_keepdims
```



---
## test_out
```python
from test_multiarray import test_out
```



---
## test_dtype_from_input
```python
from test_multiarray import test_dtype_from_input
```



---
## test_dtype_from_dtype
```python
from test_multiarray import test_dtype_from_dtype
```



---
## test_ddof
```python
from test_multiarray import test_ddof
```



---
## test_ddof_too_big
```python
from test_multiarray import test_ddof_too_big
```



---
## test_mean_values
```python
from test_multiarray import test_mean_values
```



---
## test_mean_float16
```python
from test_multiarray import test_mean_float16
```



---
## test_mean_axis_error
```python
from test_multiarray import test_mean_axis_error
```



---
## test_mean_where
```python
from test_multiarray import test_mean_where
```



---
## test_var_values
```python
from test_multiarray import test_var_values
```



---
## test_var_complex_values
```python
from test_multiarray import test_var_complex_values
```



---
## test_var_dimensions
```python
from test_multiarray import test_var_dimensions
```



---
## test_var_complex_byteorder
```python
from test_multiarray import test_var_complex_byteorder
```



---
## test_var_axis_error
```python
from test_multiarray import test_var_axis_error
```



---
## test_var_where
```python
from test_multiarray import test_var_where
```



---
## test_std_values
```python
from test_multiarray import test_std_values
```



---
## test_std_where
```python
from test_multiarray import test_std_where
```



---
## test_subclass
```python
from test_multiarray import test_subclass
```



---
## test_vdot_array_order
```python
from test_multiarray import test_vdot_array_order
```



---
## test_vdot_uncontiguous
```python
from test_multiarray import test_vdot_uncontiguous
```



---
## test_dotmatmat
```python
from test_multiarray import test_dotmatmat
```



---
## test_dotmatvec
```python
from test_multiarray import test_dotmatvec
```



---
## test_dotmatvec2
```python
from test_multiarray import test_dotmatvec2
```



---
## test_dotvecmat
```python
from test_multiarray import test_dotvecmat
```



---
## test_dotvecmat2
```python
from test_multiarray import test_dotvecmat2
```



---
## test_dotvecmat3
```python
from test_multiarray import test_dotvecmat3
```



---
## test_dotvecvecouter
```python
from test_multiarray import test_dotvecvecouter
```



---
## test_dotvecvecinner
```python
from test_multiarray import test_dotvecvecinner
```



---
## test_dotcolumnvect1
```python
from test_multiarray import test_dotcolumnvect1
```



---
## test_dotcolumnvect2
```python
from test_multiarray import test_dotcolumnvect2
```



---
## test_dotvecscalar
```python
from test_multiarray import test_dotvecscalar
```



---
## test_dotvecscalar2
```python
from test_multiarray import test_dotvecscalar2
```



---
## test_vecobject
```python
from test_multiarray import test_vecobject
```



---
## test_dot_2args
```python
from test_multiarray import test_dot_2args
```



---
## test_dot_3args
```python
from test_multiarray import test_dot_3args
```



---
## test_dot_3args_errors
```python
from test_multiarray import test_dot_3args_errors
```



---
## test_dot_out_result
```python
from test_multiarray import test_dot_out_result
```



---
## test_dot_out_aliasing
```python
from test_multiarray import test_dot_out_aliasing
```



---
## test_dot_array_order
```python
from test_multiarray import test_dot_array_order
```



---
## test_accelerate_framework_sgemv_fix
```python
from test_multiarray import test_accelerate_framework_sgemv_fix
```



---
## test_huge_vectordot
```python
from test_multiarray import test_huge_vectordot
```



---
## test_dtype_discovery_fails
```python
from test_multiarray import test_dtype_discovery_fails
```



---
## test_exceptions
```python
from test_multiarray import test_exceptions
```



---
## test_shapes
```python
from test_multiarray import test_shapes
```



---
## test_result_types
```python
from test_multiarray import test_result_types
```



---
## test_scalar_output
```python
from test_multiarray import test_scalar_output
```



---
## test_vector_vector_values
```python
from test_multiarray import test_vector_vector_values
```



---
## test_vector_matrix_values
```python
from test_multiarray import test_vector_matrix_values
```



---
## test_matrix_vector_values
```python
from test_multiarray import test_matrix_vector_values
```



---
## test_matrix_matrix_values
```python
from test_multiarray import test_matrix_matrix_values
```



---
## test_out_arg
```python
from test_multiarray import test_out_arg
```



---
## test_empty_out
```python
from test_multiarray import test_empty_out
```



---
## test_out_contiguous
```python
from test_multiarray import test_out_contiguous
```



---
## test_dot_equivalent
```python
from test_multiarray import test_dot_equivalent
```



---
## test_matmul_object
```python
from test_multiarray import test_matmul_object
```



---
## test_matmul_object_type_scalar
```python
from test_multiarray import test_matmul_object_type_scalar
```



---
## test_matmul_empty
```python
from test_multiarray import test_matmul_empty
```



---
## test_matmul_exception_multiply
```python
from test_multiarray import test_matmul_exception_multiply
```



---
## test_matmul_exception_add
```python
from test_multiarray import test_matmul_exception_add
```



---
## test_matmul_bool
```python
from test_multiarray import test_matmul_bool
```



---
## test_array_priority_override
```python
from test_multiarray import test_array_priority_override
```



---
## test_matmul_raises
```python
from test_multiarray import test_matmul_raises
```



---
## test_inner_type_mismatch
```python
from test_multiarray import test_inner_type_mismatch
```



---
## test_inner_scalar_and_vector
```python
from test_multiarray import test_inner_scalar_and_vector
```



---
## test_vecself
```python
from test_multiarray import test_vecself
```



---
## test_inner_product_with_various_contiguities
```python
from test_multiarray import test_inner_product_with_various_contiguities
```



---
## test_3d_tensor
```python
from test_multiarray import test_3d_tensor
```



---
## test_broadcast1
```python
from test_multiarray import test_broadcast1
```



---
## test_broadcast2
```python
from test_multiarray import test_broadcast2
```



---
## test_output_dtype
```python
from test_multiarray import test_output_dtype
```



---
## test_axis_spec
```python
from test_multiarray import test_axis_spec
```



---
## test_simple2d
```python
from test_multiarray import test_simple2d
```



---
## test_mirror2d
```python
from test_multiarray import test_mirror2d
```



---
## test_simple
```python
from test_multiarray import test_simple
```



---
## test_mirror
```python
from test_multiarray import test_mirror
```



---
## test_circular
```python
from test_multiarray import test_circular
```



---
## test_simple_const
```python
from test_multiarray import test_simple_const
```



---
## test_simple_mirror
```python
from test_multiarray import test_simple_mirror
```



---
## test_simple_circular
```python
from test_multiarray import test_simple_circular
```



---
## test_simple_strict_within
```python
from test_multiarray import test_simple_strict_within
```



---
## test_complex_warning
```python
from test_multiarray import test_complex_warning
```



---
## test_usigned_shortshort
```python
from test_multiarray import test_usigned_shortshort
```



---
## test_usigned_short
```python
from test_multiarray import test_usigned_short
```



---
## test_usigned_int
```python
from test_multiarray import test_usigned_int
```



---
## test_usigned_longlong
```python
from test_multiarray import test_usigned_longlong
```



---
## _check
```python
from test_multiarray import _check
```



---
## test_native_padding
```python
from test_multiarray import test_native_padding
```



---
## test_native_padding_2
```python
from test_multiarray import test_native_padding_2
```



---
## test_trailing_padding
```python
from test_multiarray import test_trailing_padding
```



---
## test_native_padding_3
```python
from test_multiarray import test_native_padding_3
```



---
## test_padding_with_array_inside_struct
```python
from test_multiarray import test_padding_with_array_inside_struct
```



---
## test_byteorder_inside_struct
```python
from test_multiarray import test_byteorder_inside_struct
```



---
## test_intra_padding
```python
from test_multiarray import test_intra_padding
```



---
## test_char_vs_string
```python
from test_multiarray import test_char_vs_string
```



---
## test_field_order
```python
from test_multiarray import test_field_order
```



---
## test_unnamed_fields
```python
from test_multiarray import test_unnamed_fields
```



---
## _check_roundtrip
```python
from test_multiarray import _check_roundtrip
```



---
## test_roundtrip_half
```python
from test_multiarray import test_roundtrip_half
```



---
## test_roundtrip_single_types
```python
from test_multiarray import test_roundtrip_single_types
```



---
## test_roundtrip_scalar
```python
from test_multiarray import test_roundtrip_scalar
```



---
## test_invalid_buffer_format
```python
from test_multiarray import test_invalid_buffer_format
```



---
## test_export_simple_1d
```python
from test_multiarray import test_export_simple_1d
```



---
## test_export_simple_nd
```python
from test_multiarray import test_export_simple_nd
```



---
## test_export_discontiguous
```python
from test_multiarray import test_export_discontiguous
```



---
## test_export_record
```python
from test_multiarray import test_export_record
```



---
## test_export_subarray
```python
from test_multiarray import test_export_subarray
```



---
## test_export_endian
```python
from test_multiarray import test_export_endian
```



---
## test_export_flags
```python
from test_multiarray import test_export_flags
```



---
## test_export_and_pickle_user_dtype
```python
from test_multiarray import test_export_and_pickle_user_dtype
```



---
## test_padding
```python
from test_multiarray import test_padding
```



---
## test_reference_leak
```python
from test_multiarray import test_reference_leak
```



---
## test_padded_struct_array
```python
from test_multiarray import test_padded_struct_array
```



---
## test_relaxed_strides
```python
from test_multiarray import test_relaxed_strides
```



---
## test_relaxed_strides_buffer_info_leak
```python
from test_multiarray import test_relaxed_strides_buffer_info_leak
```

Test that alternating export of C- and F-order buffers from
an array which is both C- and F-order when relaxed strides is
active works.
This test defines array in the signature to ensure leaking more
references every time the test is run (catching the leak with
pytest-leaks).

---
## test_out_of_order_fields
```python
from test_multiarray import test_out_of_order_fields
```



---
## test_max_dims
```python
from test_multiarray import test_max_dims
```



---
## test_error_too_many_dims
```python
from test_multiarray import test_error_too_many_dims
```



---
## test_error_pointer_type
```python
from test_multiarray import test_error_pointer_type
```



---
## test_error_message_unsupported
```python
from test_multiarray import test_error_message_unsupported
```



---
## test_ctypes_integer_via_memoryview
```python
from test_multiarray import test_ctypes_integer_via_memoryview
```



---
## test_ctypes_struct_via_memoryview
```python
from test_multiarray import test_ctypes_struct_via_memoryview
```



---
## test_error_if_stored_buffer_info_is_corrupted
```python
from test_multiarray import test_error_if_stored_buffer_info_is_corrupted
```

If a user extends a NumPy array before 1.20 and then runs it
on NumPy 1.20+. A C-subclassed array might in theory modify
the new buffer-info field. This checks that an error is raised
if this happens (for buffer export), an error is written on delete.
This is a sanity check to help users transition to safe code, it
may be deleted at any point.

---
## test_no_suboffsets
```python
from test_multiarray import test_no_suboffsets
```



---
## RaiseOnBool
```python
from test_multiarray import RaiseOnBool
```



---
## test_scalars
```python
from test_multiarray import test_scalars
```



---
## test_compatible_cast
```python
from test_multiarray import test_compatible_cast
```



---
## test_buffer_interface
```python
from test_multiarray import test_buffer_interface
```



---
## test_array_interfaces
```python
from test_multiarray import test_array_interfaces
```



---
## test_order_mismatch
```python
from test_multiarray import test_order_mismatch
```



---
## test_striding_not_ok
```python
from test_multiarray import test_striding_not_ok
```



---
## test_multiarray_writable_attributes_deletion
```python
from test_multiarray import test_multiarray_writable_attributes_deletion
```



---
## test_multiarray_not_writable_attributes_deletion
```python
from test_multiarray import test_multiarray_not_writable_attributes_deletion
```



---
## test_multiarray_flags_writable_attribute_deletion
```python
from test_multiarray import test_multiarray_flags_writable_attribute_deletion
```



---
## test_multiarray_flags_not_writable_attribute_deletion
```python
from test_multiarray import test_multiarray_flags_not_writable_attribute_deletion
```



---
## Foo
```python
from test_multiarray import Foo
```



---
## test_scalar_interface
```python
from test_multiarray import test_scalar_interface
```



---
## ArrayLike
```python
from test_multiarray import ArrayLike
```



---
## DummyArray1
```python
from test_multiarray import DummyArray1
```



---
## DummyArray2
```python
from test_multiarray import DummyArray2
```



---
## DummyArray
```python
from test_multiarray import DummyArray
```



---
## test_mapiter
```python
from test_multiarray import test_mapiter
```



---
## test_1darray
```python
from test_multiarray import test_1darray
```



---
## test_2darray
```python
from test_multiarray import test_2darray
```



---
## test_3darray
```python
from test_multiarray import test_3darray
```



---
## test_array_scalar_relational_operation
```python
from test_multiarray import test_array_scalar_relational_operation
```



---
## test_to_bool_scalar
```python
from test_multiarray import test_to_bool_scalar
```



---
## test_to_int_scalar
```python
from test_multiarray import test_to_int_scalar
```



---
## test_exotic
```python
from test_multiarray import test_exotic
```



---
## test_ndim
```python
from test_multiarray import test_ndim
```



---
## test_dtype_mix
```python
from test_multiarray import test_dtype_mix
```



---
## test_foreign
```python
from test_multiarray import test_foreign
```



---
## test_error
```python
from test_multiarray import test_error
```



---
## test_empty_result
```python
from test_multiarray import test_empty_result
```



---
## test_largedim
```python
from test_multiarray import test_largedim
```



---
## TestSizeOf
```python
from test_multiarray import TestSizeOf
```



---
## test_arrays_not_hashable
```python
from test_multiarray import test_arrays_not_hashable
```



---
## test_collections_hashable
```python
from test_multiarray import test_collections_hashable
```



---
## Bar
```python
from test_multiarray import Bar
```



---
## Other
```python
from test_multiarray import Other
```



---
## test_ndarray_subclass
```python
from test_multiarray import test_ndarray_subclass
```



---
## test_ndarray_other
```python
from test_multiarray import test_ndarray_other
```



---
## test_subclass_subclass
```python
from test_multiarray import test_subclass_subclass
```



---
## test_subclass_other
```python
from test_multiarray import test_subclass_other
```



---
## test_empty_bstring_array_is_falsey
```python
from test_multiarray import test_empty_bstring_array_is_falsey
```



---
## test_whitespace_bstring_array_is_falsey
```python
from test_multiarray import test_whitespace_bstring_array_is_falsey
```



---
## test_all_null_bstring_array_is_falsey
```python
from test_multiarray import test_all_null_bstring_array_is_falsey
```



---
## test_null_inside_bstring_array_is_truthy
```python
from test_multiarray import test_null_inside_bstring_array_is_truthy
```



---
## test_round_trip
```python
from test_multiarray import test_round_trip
```

Tests that GETITEM, SETITEM, and PyArray_Scalar roundtrip 

---
## test_assign_scalar
```python
from test_multiarray import test_assign_scalar
```



---
## test_fill_scalar
```python
from test_multiarray import test_fill_scalar
```



---
## test_empty_ustring_array_is_falsey
```python
from test_multiarray import test_empty_ustring_array_is_falsey
```



---
## test_whitespace_ustring_array_is_falsey
```python
from test_multiarray import test_whitespace_ustring_array_is_falsey
```



---
## test_all_null_ustring_array_is_falsey
```python
from test_multiarray import test_all_null_ustring_array_is_falsey
```



---
## test_null_inside_ustring_array_is_truthy
```python
from test_multiarray import test_null_inside_ustring_array_is_truthy
```



---
## test_0d
```python
from test_multiarray import test_0d
```



---
## test_1d_no_format
```python
from test_multiarray import test_1d_no_format
```



---
## test_1d_format
```python
from test_multiarray import test_1d_format
```



---
## test_ctypes_is_available
```python
from test_multiarray import test_ctypes_is_available
```



---
## test_ctypes_is_not_available
```python
from test_multiarray import test_ctypes_is_not_available
```



---
## _make_readonly
```python
from test_multiarray import _make_readonly
```



---
## test_ctypes_data_as_holds_reference
```python
from test_multiarray import test_ctypes_data_as_holds_reference
```



---
## test_ctypes_as_parameter_holds_reference
```python
from test_multiarray import test_ctypes_as_parameter_holds_reference
```



---
## test_argmax_with_out
```python
from test_multiarray import test_argmax_with_out
```



---
## test_argmin_with_out
```python
from test_multiarray import test_argmin_with_out
```



---
## test_insert_noncontiguous
```python
from test_multiarray import test_insert_noncontiguous
```



---
## test_put_noncontiguous
```python
from test_multiarray import test_put_noncontiguous
```



---
## test_putmask_noncontiguous
```python
from test_multiarray import test_putmask_noncontiguous
```



---
## test_take_mode_raise
```python
from test_multiarray import test_take_mode_raise
```



---
## test_choose_mod_raise
```python
from test_multiarray import test_choose_mod_raise
```



---
## test_flatiter__array__
```python
from test_multiarray import test_flatiter__array__
```



---
## test_dot_out
```python
from test_multiarray import test_dot_out
```



---
## test_view_assign
```python
from test_multiarray import test_view_assign
```



---
## test_dealloc_warning
```python
from test_multiarray import test_dealloc_warning
```



---
## test_view_discard_refcount
```python
from test_multiarray import test_view_discard_refcount
```



---
## test_infinite
```python
from test_multiarray import test_infinite
```



---
## test_nan_step
```python
from test_multiarray import test_nan_step
```



---
## test_zero_step
```python
from test_multiarray import test_zero_step
```



---
## test_require_range
```python
from test_multiarray import test_require_range
```



---
## test_start_stop_kwarg
```python
from test_multiarray import test_start_stop_kwarg
```



---
## test_arange_booleans
```python
from test_multiarray import test_arange_booleans
```



---
## test_rejects_bad_dtypes
```python
from test_multiarray import test_rejects_bad_dtypes
```



---
## test_rejects_strings
```python
from test_multiarray import test_rejects_strings
```



---
## test_byteswapped
```python
from test_multiarray import test_byteswapped
```



---
## test_error_paths_and_promotion
```python
from test_multiarray import test_error_paths_and_promotion
```



---
## test_receives_base
```python
from test_multiarray import test_receives_base
```



---
## test_bad_finalize1
```python
from test_multiarray import test_bad_finalize1
```



---
## test_bad_finalize2
```python
from test_multiarray import test_bad_finalize2
```



---
## test_bad_finalize3
```python
from test_multiarray import test_bad_finalize3
```



---
## test_lifetime_on_error
```python
from test_multiarray import test_lifetime_on_error
```



---
## test_can_use_super
```python
from test_multiarray import test_can_use_super
```



---
## MyAlwaysEqual
```python
from test_multiarray import MyAlwaysEqual
```



---
## MyAlwaysEqualOld
```python
from test_multiarray import MyAlwaysEqualOld
```



---
## MyAlwaysEqualNew
```python
from test_multiarray import MyAlwaysEqualNew
```



---
## MyArr
```python
from test_multiarray import MyArr
```



---
## NotArray
```python
from test_multiarray import NotArray
```



---
## check
```python
from test_multiarray import check
```



---
## test_various_alignments
```python
from test_multiarray import test_various_alignments
```



---
## test_strided_loop_alignments
```python
from test_multiarray import test_strided_loop_alignments
```



---
## test_smaller_dtype_multiple
```python
from test_multiarray import test_smaller_dtype_multiple
```



---
## test_smaller_dtype_not_multiple
```python
from test_multiarray import test_smaller_dtype_not_multiple
```



---
## test_larger_dtype_multiple
```python
from test_multiarray import test_larger_dtype_multiple
```



---
## test_larger_dtype_not_multiple
```python
from test_multiarray import test_larger_dtype_not_multiple
```



---
## test_f_contiguous
```python
from test_multiarray import test_f_contiguous
```



---
## test_non_c_contiguous
```python
from test_multiarray import test_non_c_contiguous
```



---
## subclass
```python
from test_multiarray import subclass
```



---
## frominterface
```python
from test_multiarray import frominterface
```



---
## make_array
```python
from test_multiarray import make_array
```



---
## set_strides
```python
from test_multiarray import set_strides
```



---
## assign
```python
from test_multiarray import assign
```



---
## C
```python
from test_multiarray import C
```



---
## inject_str
```python
from test_multiarray import inject_str
```

replace ndarray.__str__ temporarily 

---
## bad_sequence
```python
from test_multiarray import bad_sequence
```



---
## subscript
```python
from test_multiarray import subscript
```



---
## Fail
```python
from test_multiarray import Fail
```



---
## Map
```python
from test_multiarray import Map
```



---
## Point2
```python
from test_multiarray import Point2
```



---
## A
```python
from test_multiarray import A
```



---
## testassign
```python
from test_multiarray import testassign
```



---
## check_round
```python
from test_multiarray import check_round
```



---
## Boom
```python
from test_multiarray import Boom
```



---
## Raiser
```python
from test_multiarray import Raiser
```



---
## assert_fortran
```python
from test_multiarray import assert_fortran
```



---
## assert_c
```python
from test_multiarray import assert_c
```



---
## MyObj
```python
from test_multiarray import MyObj
```



---
## Sub
```python
from test_multiarray import Sub
```



---
## MyArray
```python
from test_multiarray import MyArray
```



---
## ArraySubclass
```python
from test_multiarray import ArraySubclass
```



---
## Coerced
```python
from test_multiarray import Coerced
```



---
## array_impl
```python
from test_multiarray import array_impl
```



---
## op_impl
```python
from test_multiarray import op_impl
```



---
## rop_impl
```python
from test_multiarray import rop_impl
```



---
## iop_impl
```python
from test_multiarray import iop_impl
```



---
## array_ufunc_impl
```python
from test_multiarray import array_ufunc_impl
```



---
## make_obj
```python
from test_multiarray import make_obj
```



---
## BadPriority
```python
from test_multiarray import BadPriority
```



---
## LowPriority
```python
from test_multiarray import LowPriority
```



---
## SomeClass
```python
from test_multiarray import SomeClass
```



---
## CheckIndex
```python
from test_multiarray import CheckIndex
```



---
## OutClass
```python
from test_multiarray import OutClass
```



---
## PowerOnly
```python
from test_multiarray import PowerOnly
```



---
## pow_for
```python
from test_multiarray import pow_for
```



---
## fail
```python
from test_multiarray import fail
```



---
## dup_str
```python
from test_multiarray import dup_str
```



---
## dup_bigint
```python
from test_multiarray import dup_bigint
```



---
## test_dtype_init
```python
from test_multiarray import test_dtype_init
```



---
## test_dtype_unicode
```python
from test_multiarray import test_dtype_unicode
```



---
## TestArray
```python
from test_multiarray import TestArray
```



---
## Vec
```python
from test_multiarray import Vec
```



---
## aligned_array
```python
from test_multiarray import aligned_array
```



---
## as_aligned
```python
from test_multiarray import as_aligned
```



---
## assert_dot_close
```python
from test_multiarray import assert_dot_close
```



---
## BadObject
```python
from test_multiarray import BadObject
```



---
## random_ints
```python
from test_multiarray import random_ints
```



---
## add_not_multiply
```python
from test_multiarray import add_not_multiply
```



---
## multiply_not_add
```python
from test_multiarray import multiply_not_add
```



---
## aligned
```python
from test_multiarray import aligned
```



---
## make_ctype
```python
from test_multiarray import make_ctype
```



---
## foo
```python
from test_multiarray import foo
```



---
## __bool__
```python
from test_multiarray import __bool__
```



---
## int_types
```python
from test_multiarray import int_types
```



---
## __init__
```python
from test_multiarray import __init__
```



---
## __float__
```python
from test_multiarray import __float__
```



---
## __array_interface__
```python
from test_multiarray import __array_interface__
```



---
## NotConvertible
```python
from test_multiarray import NotConvertible
```



---
## test_empty_array
```python
from test_multiarray import test_empty_array
```



---
## check_array
```python
from test_multiarray import check_array
```



---
## test_array_int32
```python
from test_multiarray import test_array_int32
```



---
## test_array_int64
```python
from test_multiarray import test_array_int64
```



---
## test_array_float32
```python
from test_multiarray import test_array_float32
```



---
## test_array_float64
```python
from test_multiarray import test_array_float64
```



---
## __new__
```python
from test_multiarray import __new__
```



---
## _all
```python
from test_multiarray import _all
```



---
## SavesBase
```python
from test_multiarray import SavesBase
```



---
## BadAttributeArray
```python
from test_multiarray import BadAttributeArray
```



---
## RaisesInFinalize
```python
from test_multiarray import RaisesInFinalize
```



---
## Dummy
```python
from test_multiarray import Dummy
```



---
## SuperFinalize
```python
from test_multiarray import SuperFinalize
```



---
## __eq__
```python
from test_multiarray import __eq__
```



---
## __ne__
```python
from test_multiarray import __ne__
```



---
## __array_wrap__
```python
from test_multiarray import __array_wrap__
```



---
## __array__
```python
from test_multiarray import __array__
```



---
## __getitem__
```python
from test_multiarray import __getitem__
```



---
## __len__
```python
from test_multiarray import __len__
```



---
## __iter__
```python
from test_multiarray import __iter__
```



---
## __lt__
```python
from test_multiarray import __lt__
```



---
## raises_anything
```python
from test_multiarray import raises_anything
```



---
## __deepcopy__
```python
from test_multiarray import __deepcopy__
```



---
## __array_priority__
```python
from test_multiarray import __array_priority__
```



---
## __radd__
```python
from test_multiarray import __radd__
```



---
## __array_ufunc__
```python
from test_multiarray import __array_ufunc__
```



---
## __mul__
```python
from test_multiarray import __mul__
```



---
## __div__
```python
from test_multiarray import __div__
```



---
## __pow__
```python
from test_multiarray import __pow__
```



---
## __array_finalize__
```python
from test_multiarray import __array_finalize__
```



---
## __add__
```python
from test_multiarray import __add__
```



---
## __sub__
```python
from test_multiarray import __sub__
```



---
## __rmul__
```python
from test_multiarray import __rmul__
```



---
## __matmul__
```python
from test_multiarray import __matmul__
```



---
## __rmatmul__
```python
from test_multiarray import __rmatmul__
```



---
## HasTrunc
```python
from test_multiarray import HasTrunc
```



---
## __int__
```python
from test_multiarray import __int__
```



---
## first_out_arg
```python
from test_multiarray import first_out_arg
```



---
## __trunc__
```python
from test_multiarray import __trunc__
```



---
## __name__
```python
from test_memmap import __name__
```



---
## TestMemmap
```python
from test_memmap import TestMemmap
```



---
## setup_method
```python
from test_memmap import setup_method
```



---
## teardown_method
```python
from test_memmap import teardown_method
```



---
## test_roundtrip
```python
from test_memmap import test_roundtrip
```



---
## test_open_with_filename
```python
from test_memmap import test_open_with_filename
```



---
## test_unnamed_file
```python
from test_memmap import test_unnamed_file
```



---
## test_attributes
```python
from test_memmap import test_attributes
```



---
## test_filename
```python
from test_memmap import test_filename
```



---
## test_path
```python
from test_memmap import test_path
```



---
## test_filename_fileobj
```python
from test_memmap import test_filename_fileobj
```



---
## test_flush
```python
from test_memmap import test_flush
```



---
## test_del
```python
from test_memmap import test_del
```



---
## test_arithmetic_drops_references
```python
from test_memmap import test_arithmetic_drops_references
```



---
## test_indexing_drops_references
```python
from test_memmap import test_indexing_drops_references
```



---
## test_slicing_keeps_references
```python
from test_memmap import test_slicing_keeps_references
```



---
## test_view
```python
from test_memmap import test_view
```



---
## test_ufunc_return_ndarray
```python
from test_memmap import test_ufunc_return_ndarray
```



---
## test_getitem
```python
from test_memmap import test_getitem
```



---
## test_memmap_subclass
```python
from test_memmap import test_memmap_subclass
```



---
## test_mmap_offset_greater_than_allocation_granularity
```python
from test_memmap import test_mmap_offset_greater_than_allocation_granularity
```



---
## test_no_shape
```python
from test_memmap import test_no_shape
```



---
## test_empty_array
```python
from test_memmap import test_empty_array
```



---
## MemmapSubClass
```python
from test_memmap import MemmapSubClass
```



---
## __name__
```python
from test_nditer import __name__
```



---
## iter_multi_index
```python
from test_nditer import iter_multi_index
```



---
## iter_indices
```python
from test_nditer import iter_indices
```



---
## iter_iterindices
```python
from test_nditer import iter_iterindices
```



---
## test_iter_refcount
```python
from test_nditer import test_iter_refcount
```



---
## test_iter_best_order
```python
from test_nditer import test_iter_best_order
```



---
## test_iter_c_order
```python
from test_nditer import test_iter_c_order
```



---
## test_iter_f_order
```python
from test_nditer import test_iter_f_order
```



---
## test_iter_c_or_f_order
```python
from test_nditer import test_iter_c_or_f_order
```



---
## test_nditer_multi_index_set
```python
from test_nditer import test_nditer_multi_index_set
```



---
## test_nditer_multi_index_set_refcount
```python
from test_nditer import test_nditer_multi_index_set_refcount
```



---
## test_iter_best_order_multi_index_1d
```python
from test_nditer import test_iter_best_order_multi_index_1d
```



---
## test_iter_best_order_multi_index_2d
```python
from test_nditer import test_iter_best_order_multi_index_2d
```



---
## test_iter_best_order_multi_index_3d
```python
from test_nditer import test_iter_best_order_multi_index_3d
```



---
## test_iter_best_order_c_index_1d
```python
from test_nditer import test_iter_best_order_c_index_1d
```



---
## test_iter_best_order_c_index_2d
```python
from test_nditer import test_iter_best_order_c_index_2d
```



---
## test_iter_best_order_c_index_3d
```python
from test_nditer import test_iter_best_order_c_index_3d
```



---
## test_iter_best_order_f_index_1d
```python
from test_nditer import test_iter_best_order_f_index_1d
```



---
## test_iter_best_order_f_index_2d
```python
from test_nditer import test_iter_best_order_f_index_2d
```



---
## test_iter_best_order_f_index_3d
```python
from test_nditer import test_iter_best_order_f_index_3d
```



---
## test_iter_no_inner_full_coalesce
```python
from test_nditer import test_iter_no_inner_full_coalesce
```



---
## test_iter_no_inner_dim_coalescing
```python
from test_nditer import test_iter_no_inner_dim_coalescing
```



---
## test_iter_dim_coalescing
```python
from test_nditer import test_iter_dim_coalescing
```



---
## test_iter_broadcasting
```python
from test_nditer import test_iter_broadcasting
```



---
## test_iter_itershape
```python
from test_nditer import test_iter_itershape
```



---
## test_iter_broadcasting_errors
```python
from test_nditer import test_iter_broadcasting_errors
```



---
## test_iter_flags_errors
```python
from test_nditer import test_iter_flags_errors
```



---
## test_iter_slice
```python
from test_nditer import test_iter_slice
```



---
## test_iter_assign_mapping
```python
from test_nditer import test_iter_assign_mapping
```



---
## test_iter_nbo_align_contig
```python
from test_nditer import test_iter_nbo_align_contig
```



---
## test_iter_array_cast
```python
from test_nditer import test_iter_array_cast
```



---
## test_iter_array_cast_errors
```python
from test_nditer import test_iter_array_cast_errors
```



---
## test_iter_scalar_cast
```python
from test_nditer import test_iter_scalar_cast
```



---
## test_iter_scalar_cast_errors
```python
from test_nditer import test_iter_scalar_cast_errors
```



---
## test_iter_object_arrays_basic
```python
from test_nditer import test_iter_object_arrays_basic
```



---
## test_iter_object_arrays_conversions
```python
from test_nditer import test_iter_object_arrays_conversions
```



---
## test_iter_common_dtype
```python
from test_nditer import test_iter_common_dtype
```



---
## test_iter_copy_if_overlap
```python
from test_nditer import test_iter_copy_if_overlap
```



---
## test_iter_op_axes
```python
from test_nditer import test_iter_op_axes
```



---
## test_iter_op_axes_errors
```python
from test_nditer import test_iter_op_axes_errors
```



---
## test_iter_copy
```python
from test_nditer import test_iter_copy
```



---
## test_iter_copy_casts
```python
from test_nditer import test_iter_copy_casts
```



---
## test_iter_copy_casts_structured
```python
from test_nditer import test_iter_copy_casts_structured
```



---
## test_iter_copy_casts_structured2
```python
from test_nditer import test_iter_copy_casts_structured2
```



---
## test_iter_allocate_output_simple
```python
from test_nditer import test_iter_allocate_output_simple
```



---
## test_iter_allocate_output_buffered_readwrite
```python
from test_nditer import test_iter_allocate_output_buffered_readwrite
```



---
## test_iter_allocate_output_itorder
```python
from test_nditer import test_iter_allocate_output_itorder
```



---
## test_iter_allocate_output_opaxes
```python
from test_nditer import test_iter_allocate_output_opaxes
```



---
## test_iter_allocate_output_types_promotion
```python
from test_nditer import test_iter_allocate_output_types_promotion
```



---
## test_iter_allocate_output_types_byte_order
```python
from test_nditer import test_iter_allocate_output_types_byte_order
```



---
## test_iter_allocate_output_types_scalar
```python
from test_nditer import test_iter_allocate_output_types_scalar
```



---
## test_iter_allocate_output_subtype
```python
from test_nditer import test_iter_allocate_output_subtype
```



---
## test_iter_allocate_output_errors
```python
from test_nditer import test_iter_allocate_output_errors
```



---
## test_all_allocated
```python
from test_nditer import test_all_allocated
```



---
## test_iter_remove_axis
```python
from test_nditer import test_iter_remove_axis
```



---
## test_iter_remove_multi_index_inner_loop
```python
from test_nditer import test_iter_remove_multi_index_inner_loop
```



---
## test_iter_iterindex
```python
from test_nditer import test_iter_iterindex
```



---
## test_iter_iterrange
```python
from test_nditer import test_iter_iterrange
```



---
## test_iter_buffering
```python
from test_nditer import test_iter_buffering
```



---
## test_iter_write_buffering
```python
from test_nditer import test_iter_write_buffering
```



---
## test_iter_buffering_delayed_alloc
```python
from test_nditer import test_iter_buffering_delayed_alloc
```



---
## test_iter_buffered_cast_simple
```python
from test_nditer import test_iter_buffered_cast_simple
```



---
## test_iter_buffered_cast_byteswapped
```python
from test_nditer import test_iter_buffered_cast_byteswapped
```



---
## test_iter_buffered_cast_byteswapped_complex
```python
from test_nditer import test_iter_buffered_cast_byteswapped_complex
```



---
## test_iter_buffered_cast_structured_type
```python
from test_nditer import test_iter_buffered_cast_structured_type
```



---
## test_iter_buffered_cast_structured_type_failure_with_cleanup
```python
from test_nditer import test_iter_buffered_cast_structured_type_failure_with_cleanup
```



---
## test_buffered_cast_error_paths
```python
from test_nditer import test_buffered_cast_error_paths
```



---
## test_buffered_cast_error_paths_unraisable
```python
from test_nditer import test_buffered_cast_error_paths_unraisable
```



---
## test_iter_buffered_cast_subarray
```python
from test_nditer import test_iter_buffered_cast_subarray
```



---
## test_iter_buffering_badwriteback
```python
from test_nditer import test_iter_buffering_badwriteback
```



---
## test_iter_buffering_string
```python
from test_nditer import test_iter_buffering_string
```



---
## test_iter_buffering_growinner
```python
from test_nditer import test_iter_buffering_growinner
```



---
## test_iter_buffered_reduce_reuse
```python
from test_nditer import test_iter_buffered_reduce_reuse
```



---
## test_iter_no_broadcast
```python
from test_nditer import test_iter_no_broadcast
```



---
## TestIterNested
```python
from test_nditer import TestIterNested
```



---
## test_iter_reduction_error
```python
from test_nditer import test_iter_reduction_error
```



---
## test_iter_reduction
```python
from test_nditer import test_iter_reduction
```



---
## test_iter_buffering_reduction
```python
from test_nditer import test_iter_buffering_reduction
```



---
## test_iter_buffering_reduction_reuse_reduce_loops
```python
from test_nditer import test_iter_buffering_reduction_reuse_reduce_loops
```



---
## test_iter_writemasked_badinput
```python
from test_nditer import test_iter_writemasked_badinput
```



---
## _is_buffered
```python
from test_nditer import _is_buffered
```



---
## test_iter_writemasked
```python
from test_nditer import test_iter_writemasked
```



---
## test_iter_writemasked_broadcast_error
```python
from test_nditer import test_iter_writemasked_broadcast_error
```



---
## test_iter_writemasked_decref
```python
from test_nditer import test_iter_writemasked_decref
```



---
## test_iter_non_writable_attribute_deletion
```python
from test_nditer import test_iter_non_writable_attribute_deletion
```



---
## test_iter_writable_attribute_deletion
```python
from test_nditer import test_iter_writable_attribute_deletion
```



---
## test_iter_element_deletion
```python
from test_nditer import test_iter_element_deletion
```



---
## test_iter_allocated_array_dtypes
```python
from test_nditer import test_iter_allocated_array_dtypes
```



---
## test_0d_iter
```python
from test_nditer import test_0d_iter
```



---
## test_object_iter_cleanup
```python
from test_nditer import test_object_iter_cleanup
```



---
## test_object_iter_cleanup_reduce
```python
from test_nditer import test_object_iter_cleanup_reduce
```



---
## test_object_iter_cleanup_large_reduce
```python
from test_nditer import test_object_iter_cleanup_large_reduce
```



---
## test_iter_too_large
```python
from test_nditer import test_iter_too_large
```



---
## test_iter_too_large_with_multiindex
```python
from test_nditer import test_iter_too_large_with_multiindex
```



---
## test_writebacks
```python
from test_nditer import test_writebacks
```



---
## test_close_equivalent
```python
from test_nditer import test_close_equivalent
```

using a context amanger and using nditer.close are equivalent
    

---
## test_close_raises
```python
from test_nditer import test_close_raises
```



---
## test_close_parameters
```python
from test_nditer import test_close_parameters
```



---
## test_warn_noclose
```python
from test_nditer import test_warn_noclose
```



---
## test_partial_iteration_cleanup
```python
from test_nditer import test_partial_iteration_cleanup
```

Checks for reference counting leaks during cleanup.  Using explicit
reference counts lead to occasional false positives (at least in parallel
test setups).  This test now should still test leaks correctly when
run e.g. with pytest-valgrind or pytest-leaks

---
## test_partial_iteration_error
```python
from test_nditer import test_partial_iteration_error
```



---
## test_debug_print
```python
from test_nditer import test_debug_print
```

Matches the expected output of a debug print with the actual output.
Note that the iterator dump should not be considered stable API,
this test is mainly to ensure the print does not crash.

Currently uses a subprocess to avoid dealing with the C level `printf`s.

---
## assign_multi_index
```python
from test_nditer import assign_multi_index
```



---
## assign_index
```python
from test_nditer import assign_index
```



---
## assign_iterindex
```python
from test_nditer import assign_iterindex
```



---
## assign_iterrange
```python
from test_nditer import assign_iterrange
```



---
## MyNDArray
```python
from test_nditer import MyNDArray
```



---
## get_array
```python
from test_nditer import get_array
```



---
## assign_iter
```python
from test_nditer import assign_iter
```



---
## get_params
```python
from test_nditer import get_params
```



---
## test_basic
```python
from test_nditer import test_basic
```



---
## test_reorder
```python
from test_nditer import test_reorder
```



---
## test_flip_axes
```python
from test_nditer import test_flip_axes
```



---
## test_broadcast
```python
from test_nditer import test_broadcast
```



---
## test_dtype_copy
```python
from test_nditer import test_dtype_copy
```



---
## test_dtype_buffered
```python
from test_nditer import test_dtype_buffered
```



---
## test_0d
```python
from test_nditer import test_0d
```



---
## test_iter_nested_iters_dtype_buffered
```python
from test_nditer import test_iter_nested_iters_dtype_buffered
```



---
## T
```python
from test_nditer import T
```



---
## add_close
```python
from test_nditer import add_close
```



---
## add_context
```python
from test_nditer import add_context
```



---
## __bool__
```python
from test_nditer import __bool__
```



---
## __name__
```python
from test_cpu_features import __name__
```



---
## assert_features_equal
```python
from test_cpu_features import assert_features_equal
```



---
## _text_to_list
```python
from test_cpu_features import _text_to_list
```



---
## AbstractTest
```python
from test_cpu_features import AbstractTest
```



---
## TestEnvPrivation
```python
from test_cpu_features import TestEnvPrivation
```



---
## Test_X86_Features
```python
from test_cpu_features import Test_X86_Features
```



---
## Test_POWER_Features
```python
from test_cpu_features import Test_POWER_Features
```



---
## Test_ZARCH_Features
```python
from test_cpu_features import Test_ZARCH_Features
```



---
## Test_ARM_Features
```python
from test_cpu_features import Test_ARM_Features
```



---
## load_flags
```python
from test_cpu_features import load_flags
```



---
## test_features
```python
from test_cpu_features import test_features
```



---
## cpu_have
```python
from test_cpu_features import cpu_have
```



---
## load_flags_cpuinfo
```python
from test_cpu_features import load_flags_cpuinfo
```



---
## get_cpuinfo_item
```python
from test_cpu_features import get_cpuinfo_item
```



---
## load_flags_auxv
```python
from test_cpu_features import load_flags_auxv
```



---
## setup_class
```python
from test_cpu_features import setup_class
```



---
## _run
```python
from test_cpu_features import _run
```



---
## _expect_error
```python
from test_cpu_features import _expect_error
```



---
## setup_method
```python
from test_cpu_features import setup_method
```

Ensure that the environment is reset

---
## test_runtime_feature_selection
```python
from test_cpu_features import test_runtime_feature_selection
```

Ensure that when selecting `NPY_ENABLE_CPU_FEATURES`, only the
features exactly specified are dispatched.

---
## test_both_enable_disable_set
```python
from test_cpu_features import test_both_enable_disable_set
```

Ensure that when both environment variables are set then an
ImportError is thrown

---
## test_variable_too_long
```python
from test_cpu_features import test_variable_too_long
```

Test that an error is thrown if the environment variables are too long
to be processed. Current limit is 1024, but this may change later.

---
## test_impossible_feature_disable
```python
from test_cpu_features import test_impossible_feature_disable
```

Test that a RuntimeError is thrown if an impossible feature-disabling
request is made. This includes disabling a baseline feature.

---
## test_impossible_feature_enable
```python
from test_cpu_features import test_impossible_feature_enable
```

Test that a RuntimeError is thrown if an impossible feature-enabling
request is made. This includes enabling a feature not supported by the
machine, or disabling a baseline optimization.

---
## __name__
```python
from test_protocols import __name__
```



---
## test_getattr_warning
```python
from test_protocols import test_getattr_warning
```



---
## test_array_called
```python
from test_protocols import test_array_called
```



---
## Wrapper
```python
from test_protocols import Wrapper
```



---
## __init__
```python
from test_protocols import __init__
```



---
## __len__
```python
from test_protocols import __len__
```



---
## __getitem__
```python
from test_protocols import __getitem__
```



---
## __getattr__
```python
from test_protocols import __getattr__
```



---
## __repr__
```python
from test_protocols import __repr__
```



---
## __array__
```python
from test_protocols import __array__
```



---
## __name__
```python
from test_argparse import __name__
```

Tests for the private NumPy argument parsing functionality.
They mainly exists to ensure good test coverage without having to try the
weirder cases on actual numpy functions but test them in one place.

The test function is defined in C to be equivalent to (errors may not always
match exactly, and could be adjusted):

    def func(arg1, /, arg2, *, arg3):
        i = integer(arg1)  # reproducing the 'i' parsing in Python.
        return None

---
## test_invalid_integers
```python
from test_argparse import test_invalid_integers
```



---
## test_missing_arguments
```python
from test_argparse import test_missing_arguments
```



---
## test_too_many_positional
```python
from test_argparse import test_too_many_positional
```



---
## test_multiple_values
```python
from test_argparse import test_multiple_values
```



---
## test_string_fallbacks
```python
from test_argparse import test_string_fallbacks
```



---
## __name__
```python
from test_regression import __name__
```



---
## TestRegression
```python
from test_regression import TestRegression
```



---
## test_invalid_round
```python
from test_regression import test_invalid_round
```



---
## test_mem_empty
```python
from test_regression import test_mem_empty
```



---
## test_pickle_transposed
```python
from test_regression import test_pickle_transposed
```



---
## test_dtype_names
```python
from test_regression import test_dtype_names
```



---
## test_reduce
```python
from test_regression import test_reduce
```



---
## test_zeros_order
```python
from test_regression import test_zeros_order
```



---
## test_asarray_with_order
```python
from test_regression import test_asarray_with_order
```



---
## test_ravel_with_order
```python
from test_regression import test_ravel_with_order
```



---
## test_sort_bigendian
```python
from test_regression import test_sort_bigendian
```



---
## test_negative_nd_indexing
```python
from test_regression import test_negative_nd_indexing
```



---
## test_char_dump
```python
from test_regression import test_char_dump
```



---
## test_noncontiguous_fill
```python
from test_regression import test_noncontiguous_fill
```



---
## test_bool
```python
from test_regression import test_bool
```



---
## test_indexing1
```python
from test_regression import test_indexing1
```



---
## test_indexing2
```python
from test_regression import test_indexing2
```



---
## test_round
```python
from test_regression import test_round
```



---
## test_scalar_compare
```python
from test_regression import test_scalar_compare
```



---
## test_unicode_swapping
```python
from test_regression import test_unicode_swapping
```



---
## test_object_array_fill
```python
from test_regression import test_object_array_fill
```



---
## test_mem_dtype_align
```python
from test_regression import test_mem_dtype_align
```



---
## test_endian_bool_indexing
```python
from test_regression import test_endian_bool_indexing
```



---
## test_endian_where
```python
from test_regression import test_endian_where
```



---
## test_endian_recarray
```python
from test_regression import test_endian_recarray
```



---
## test_mem_dot
```python
from test_regression import test_mem_dot
```



---
## test_arange_endian
```python
from test_regression import test_arange_endian
```



---
## test_arange_inf_step
```python
from test_regression import test_arange_inf_step
```



---
## test_arange_underflow_stop_and_step
```python
from test_regression import test_arange_underflow_stop_and_step
```



---
## test_argmax
```python
from test_regression import test_argmax
```



---
## test_mem_divmod
```python
from test_regression import test_mem_divmod
```



---
## test_hstack_invalid_dims
```python
from test_regression import test_hstack_invalid_dims
```



---
## test_squeeze_type
```python
from test_regression import test_squeeze_type
```



---
## test_add_identity
```python
from test_regression import test_add_identity
```



---
## test_numpy_float_python_long_addition
```python
from test_regression import test_numpy_float_python_long_addition
```



---
## test_binary_repr_0
```python
from test_regression import test_binary_repr_0
```



---
## test_rec_iterate
```python
from test_regression import test_rec_iterate
```



---
## test_unicode_string_comparison
```python
from test_regression import test_unicode_string_comparison
```



---
## test_tobytes_FORTRANORDER_discontiguous
```python
from test_regression import test_tobytes_FORTRANORDER_discontiguous
```



---
## test_flat_assignment
```python
from test_regression import test_flat_assignment
```



---
## test_broadcast_flat_assignment
```python
from test_regression import test_broadcast_flat_assignment
```



---
## test_nonarray_assignment
```python
from test_regression import test_nonarray_assignment
```



---
## test_unpickle_dtype_with_object
```python
from test_regression import test_unpickle_dtype_with_object
```



---
## test_mem_array_creation_invalid_specification
```python
from test_regression import test_mem_array_creation_invalid_specification
```



---
## test_recarray_single_element
```python
from test_regression import test_recarray_single_element
```



---
## test_zero_sized_array_indexing
```python
from test_regression import test_zero_sized_array_indexing
```



---
## test_chararray_rstrip
```python
from test_regression import test_chararray_rstrip
```



---
## test_object_array_shape
```python
from test_regression import test_object_array_shape
```



---
## test_mem_around
```python
from test_regression import test_mem_around
```



---
## test_character_array_strip
```python
from test_regression import test_character_array_strip
```



---
## test_lexsort
```python
from test_regression import test_lexsort
```



---
## test_lexsort_invalid_sequence
```python
from test_regression import test_lexsort_invalid_sequence
```



---
## test_lexsort_zerolen_custom_strides
```python
from test_regression import test_lexsort_zerolen_custom_strides
```



---
## test_lexsort_zerolen_custom_strides_2d
```python
from test_regression import test_lexsort_zerolen_custom_strides_2d
```



---
## test_lexsort_invalid_axis
```python
from test_regression import test_lexsort_invalid_axis
```



---
## test_lexsort_zerolen_element
```python
from test_regression import test_lexsort_zerolen_element
```



---
## test_pickle_py2_bytes_encoding
```python
from test_regression import test_pickle_py2_bytes_encoding
```



---
## test_pickle_dtype
```python
from test_regression import test_pickle_dtype
```



---
## test_swap_real
```python
from test_regression import test_swap_real
```



---
## test_object_array_from_list
```python
from test_regression import test_object_array_from_list
```



---
## test_multiple_assign
```python
from test_regression import test_multiple_assign
```



---
## test_empty_array_type
```python
from test_regression import test_empty_array_type
```



---
## test_void_copyswap
```python
from test_regression import test_void_copyswap
```



---
## test_method_args
```python
from test_regression import test_method_args
```



---
## test_mem_lexsort_strings
```python
from test_regression import test_mem_lexsort_strings
```



---
## test_fancy_index
```python
from test_regression import test_fancy_index
```



---
## test_recarray_copy
```python
from test_regression import test_recarray_copy
```



---
## test_rec_fromarray
```python
from test_regression import test_rec_fromarray
```



---
## test_object_array_assign
```python
from test_regression import test_object_array_assign
```



---
## test_ndmin_float64
```python
from test_regression import test_ndmin_float64
```



---
## test_ndmin_order
```python
from test_regression import test_ndmin_order
```



---
## test_mem_axis_minimization
```python
from test_regression import test_mem_axis_minimization
```



---
## test_mem_float_imag
```python
from test_regression import test_mem_float_imag
```



---
## test_dtype_tuple
```python
from test_regression import test_dtype_tuple
```



---
## test_dtype_posttuple
```python
from test_regression import test_dtype_posttuple
```



---
## test_numeric_carray_compare
```python
from test_regression import test_numeric_carray_compare
```



---
## test_string_array_size
```python
from test_regression import test_string_array_size
```



---
## test_dtype_repr
```python
from test_regression import test_dtype_repr
```



---
## test_reshape_order
```python
from test_regression import test_reshape_order
```



---
## test_reshape_zero_strides
```python
from test_regression import test_reshape_zero_strides
```



---
## test_reshape_zero_size
```python
from test_regression import test_reshape_zero_size
```



---
## test_reshape_trailing_ones_strides
```python
from test_regression import test_reshape_trailing_ones_strides
```



---
## test_repeat_discont
```python
from test_regression import test_repeat_discont
```



---
## test_array_index
```python
from test_regression import test_array_index
```



---
## test_object_argmax
```python
from test_regression import test_object_argmax
```



---
## test_recarray_fields
```python
from test_regression import test_recarray_fields
```



---
## test_random_shuffle
```python
from test_regression import test_random_shuffle
```



---
## test_refcount_vdot
```python
from test_regression import test_refcount_vdot
```



---
## test_startswith
```python
from test_regression import test_startswith
```



---
## test_noncommutative_reduce_accumulate
```python
from test_regression import test_noncommutative_reduce_accumulate
```



---
## test_convolve_empty
```python
from test_regression import test_convolve_empty
```



---
## test_multidim_byteswap
```python
from test_regression import test_multidim_byteswap
```



---
## test_string_NULL
```python
from test_regression import test_string_NULL
```



---
## test_junk_in_string_fields_of_recarray
```python
from test_regression import test_junk_in_string_fields_of_recarray
```



---
## test_take_output
```python
from test_regression import test_take_output
```



---
## test_take_object_fail
```python
from test_regression import test_take_object_fail
```



---
## test_array_str_64bit
```python
from test_regression import test_array_str_64bit
```



---
## test_frompyfunc_endian
```python
from test_regression import test_frompyfunc_endian
```



---
## test_mem_string_arr
```python
from test_regression import test_mem_string_arr
```



---
## test_arr_transpose
```python
from test_regression import test_arr_transpose
```



---
## test_string_mergesort
```python
from test_regression import test_string_mergesort
```



---
## test_argmax_byteorder
```python
from test_regression import test_argmax_byteorder
```



---
## test_rand_seed
```python
from test_regression import test_rand_seed
```



---
## test_mem_deallocation_leak
```python
from test_regression import test_mem_deallocation_leak
```



---
## test_mem_on_invalid_dtype
```python
from test_regression import test_mem_on_invalid_dtype
```

Ticket #583

---
## test_dot_negative_stride
```python
from test_regression import test_dot_negative_stride
```



---
## test_object_casting
```python
from test_regression import test_object_casting
```



---
## test_unicode_scalar
```python
from test_regression import test_unicode_scalar
```



---
## test_arange_non_native_dtype
```python
from test_regression import test_arange_non_native_dtype
```



---
## test_bool_flat_indexing_invalid_nr_elements
```python
from test_regression import test_bool_flat_indexing_invalid_nr_elements
```



---
## test_mem_scalar_indexing
```python
from test_regression import test_mem_scalar_indexing
```



---
## test_binary_repr_0_width
```python
from test_regression import test_binary_repr_0_width
```



---
## test_fromstring
```python
from test_regression import test_fromstring
```



---
## test_searchsorted_variable_length
```python
from test_regression import test_searchsorted_variable_length
```



---
## test_string_argsort_with_zeros
```python
from test_regression import test_string_argsort_with_zeros
```



---
## test_string_sort_with_zeros
```python
from test_regression import test_string_sort_with_zeros
```



---
## test_copy_detection_zero_dim
```python
from test_regression import test_copy_detection_zero_dim
```



---
## test_flat_byteorder
```python
from test_regression import test_flat_byteorder
```



---
## test_sign_bit
```python
from test_regression import test_sign_bit
```



---
## test_flat_index_byteswap
```python
from test_regression import test_flat_index_byteswap
```



---
## test_copy_detection_corner_case
```python
from test_regression import test_copy_detection_corner_case
```



---
## test_copy_detection_corner_case2
```python
from test_regression import test_copy_detection_corner_case2
```



---
## test_object_array_refcounting
```python
from test_regression import test_object_array_refcounting
```



---
## test_mem_custom_float_to_array
```python
from test_regression import test_mem_custom_float_to_array
```



---
## test_object_array_refcount_self_assign
```python
from test_regression import test_object_array_refcount_self_assign
```



---
## test_mem_fromiter_invalid_dtype_string
```python
from test_regression import test_mem_fromiter_invalid_dtype_string
```



---
## test_reduce_big_object_array
```python
from test_regression import test_reduce_big_object_array
```



---
## test_mem_0d_array_index
```python
from test_regression import test_mem_0d_array_index
```



---
## test_nonnative_endian_fill
```python
from test_regression import test_nonnative_endian_fill
```



---
## test_dot_alignment_sse2
```python
from test_regression import test_dot_alignment_sse2
```



---
## test_astype_copy
```python
from test_regression import test_astype_copy
```



---
## test_compress_small_type
```python
from test_regression import test_compress_small_type
```



---
## test_attributes
```python
from test_regression import test_attributes
```



---
## test_recarray_tolist
```python
from test_regression import test_recarray_tolist
```



---
## test_nonscalar_item_method
```python
from test_regression import test_nonscalar_item_method
```



---
## test_char_array_creation
```python
from test_regression import test_char_array_creation
```



---
## test_unaligned_unicode_access
```python
from test_regression import test_unaligned_unicode_access
```



---
## test_sign_for_complex_nan
```python
from test_regression import test_sign_for_complex_nan
```



---
## test_for_equal_names
```python
from test_regression import test_for_equal_names
```



---
## test_for_object_scalar_creation
```python
from test_regression import test_for_object_scalar_creation
```



---
## test_array_resize_method_system_error
```python
from test_regression import test_array_resize_method_system_error
```



---
## test_for_zero_length_in_choose
```python
from test_regression import test_for_zero_length_in_choose
```

Ticket #882

---
## test_array_ndmin_overflow
```python
from test_regression import test_array_ndmin_overflow
```

Ticket #947.

---
## test_void_scalar_with_titles
```python
from test_regression import test_void_scalar_with_titles
```



---
## test_void_scalar_constructor
```python
from test_regression import test_void_scalar_constructor
```



---
## test_blasdot_uninitialized_memory
```python
from test_regression import test_blasdot_uninitialized_memory
```



---
## test_zeros
```python
from test_regression import test_zeros
```



---
## test_huge_arange
```python
from test_regression import test_huge_arange
```



---
## test_fromiter_bytes
```python
from test_regression import test_fromiter_bytes
```



---
## test_array_from_sequence_scalar_array
```python
from test_regression import test_array_from_sequence_scalar_array
```



---
## test_array_from_sequence_scalar_array2
```python
from test_regression import test_array_from_sequence_scalar_array2
```



---
## test_array_too_big
```python
from test_regression import test_array_too_big
```



---
## test_dtype_keyerrors_
```python
from test_regression import test_dtype_keyerrors_
```



---
## test_lexsort_buffer_length
```python
from test_regression import test_lexsort_buffer_length
```



---
## test_object_array_to_fixed_string
```python
from test_regression import test_object_array_to_fixed_string
```



---
## test_unicode_to_string_cast
```python
from test_regression import test_unicode_to_string_cast
```



---
## test_unicode_to_string_cast_error
```python
from test_regression import test_unicode_to_string_cast_error
```



---
## test_mixed_string_byte_array_creation
```python
from test_regression import test_mixed_string_byte_array_creation
```



---
## test_misaligned_objects_segfault
```python
from test_regression import test_misaligned_objects_segfault
```



---
## test_misaligned_scalars_segfault
```python
from test_regression import test_misaligned_scalars_segfault
```



---
## test_misaligned_dot_product_objects
```python
from test_regression import test_misaligned_dot_product_objects
```



---
## test_byteswap_complex_scalar
```python
from test_regression import test_byteswap_complex_scalar
```



---
## test_structured_arrays_with_objects1
```python
from test_regression import test_structured_arrays_with_objects1
```



---
## test_structured_arrays_with_objects2
```python
from test_regression import test_structured_arrays_with_objects2
```



---
## test_duplicate_title_and_name
```python
from test_regression import test_duplicate_title_and_name
```



---
## test_signed_integer_division_overflow
```python
from test_regression import test_signed_integer_division_overflow
```



---
## test_buffer_hashlib
```python
from test_regression import test_buffer_hashlib
```



---
## test_0d_string_scalar
```python
from test_regression import test_0d_string_scalar
```



---
## test_log1p_compiler_shenanigans
```python
from test_regression import test_log1p_compiler_shenanigans
```



---
## test_fromiter_comparison
```python
from test_regression import test_fromiter_comparison
```



---
## test_fromstring_crash
```python
from test_regression import test_fromstring_crash
```



---
## test_ticket_1539
```python
from test_regression import test_ticket_1539
```



---
## test_ticket_1538
```python
from test_regression import test_ticket_1538
```



---
## test_ticket_1434
```python
from test_regression import test_ticket_1434
```



---
## test_complex_nan_maximum
```python
from test_regression import test_complex_nan_maximum
```



---
## test_subclass_int_tuple_assignment
```python
from test_regression import test_subclass_int_tuple_assignment
```



---
## test_ufunc_no_unnecessary_views
```python
from test_regression import test_ufunc_no_unnecessary_views
```



---
## test_take_refcount
```python
from test_regression import test_take_refcount
```



---
## test_fromfile_tofile_seeks
```python
from test_regression import test_fromfile_tofile_seeks
```



---
## test_complex_scalar_warning
```python
from test_regression import test_complex_scalar_warning
```



---
## test_complex_scalar_complex_cast
```python
from test_regression import test_complex_scalar_complex_cast
```



---
## test_complex_boolean_cast
```python
from test_regression import test_complex_boolean_cast
```



---
## test_uint_int_conversion
```python
from test_regression import test_uint_int_conversion
```



---
## test_duplicate_field_names_assign
```python
from test_regression import test_duplicate_field_names_assign
```



---
## test_eq_string_and_object_array
```python
from test_regression import test_eq_string_and_object_array
```



---
## test_nonzero_byteswap
```python
from test_regression import test_nonzero_byteswap
```



---
## test_find_common_type_boolean
```python
from test_regression import test_find_common_type_boolean
```



---
## test_empty_mul
```python
from test_regression import test_empty_mul
```



---
## test_array_side_effect
```python
from test_regression import test_array_side_effect
```



---
## test_any_float
```python
from test_regression import test_any_float
```



---
## test_large_float_sum
```python
from test_regression import test_large_float_sum
```



---
## test_ufunc_casting_out
```python
from test_regression import test_ufunc_casting_out
```



---
## test_array_scalar_contiguous
```python
from test_regression import test_array_scalar_contiguous
```



---
## test_squeeze_contiguous
```python
from test_regression import test_squeeze_contiguous
```



---
## test_squeeze_axis_handling
```python
from test_regression import test_squeeze_axis_handling
```



---
## test_reduce_contiguous
```python
from test_regression import test_reduce_contiguous
```



---
## test_object_array_self_reference
```python
from test_regression import test_object_array_self_reference
```



---
## test_object_array_circular_reference
```python
from test_regression import test_object_array_circular_reference
```



---
## test_object_array_nested
```python
from test_regression import test_object_array_nested
```



---
## test_object_array_self_copy
```python
from test_regression import test_object_array_self_copy
```



---
## test_zerosize_accumulate
```python
from test_regression import test_zerosize_accumulate
```

Ticket #1733

---
## test_objectarray_setfield
```python
from test_regression import test_objectarray_setfield
```



---
## test_setting_rank0_string
```python
from test_regression import test_setting_rank0_string
```

Ticket #1736

---
## test_string_astype
```python
from test_regression import test_string_astype
```

Ticket #1748

---
## test_ticket_1756
```python
from test_regression import test_ticket_1756
```



---
## test_fields_strides
```python
from test_regression import test_fields_strides
```

gh-2355

---
## test_alignment_update
```python
from test_regression import test_alignment_update
```



---
## test_ticket_1770
```python
from test_regression import test_ticket_1770
```

Should not segfault on python 3k

---
## test_ticket_1608
```python
from test_regression import test_ticket_1608
```

x.flat shouldn't modify data

---
## test_pickle_string_overwrite
```python
from test_regression import test_pickle_string_overwrite
```



---
## test_pickle_bytes_overwrite
```python
from test_regression import test_pickle_bytes_overwrite
```



---
## test_pickle_py2_array_latin1_hack
```python
from test_regression import test_pickle_py2_array_latin1_hack
```



---
## test_pickle_py2_scalar_latin1_hack
```python
from test_regression import test_pickle_py2_scalar_latin1_hack
```



---
## test_structured_type_to_object
```python
from test_regression import test_structured_type_to_object
```



---
## test_assign_obj_listoflists
```python
from test_regression import test_assign_obj_listoflists
```



---
## test_memoryleak
```python
from test_regression import test_memoryleak
```



---
## test_ufunc_reduce_memoryleak
```python
from test_regression import test_ufunc_reduce_memoryleak
```



---
## test_search_sorted_invalid_arguments
```python
from test_regression import test_search_sorted_invalid_arguments
```



---
## test_string_truncation
```python
from test_regression import test_string_truncation
```



---
## test_string_truncation_ucs2
```python
from test_regression import test_string_truncation_ucs2
```



---
## test_unique_stable
```python
from test_regression import test_unique_stable
```



---
## test_unicode_alloc_dealloc_match
```python
from test_regression import test_unicode_alloc_dealloc_match
```



---
## test_refcount_error_in_clip
```python
from test_regression import test_refcount_error_in_clip
```



---
## test_searchsorted_wrong_dtype
```python
from test_regression import test_searchsorted_wrong_dtype
```



---
## test_complex64_alignment
```python
from test_regression import test_complex64_alignment
```



---
## test_structured_count_nonzero
```python
from test_regression import test_structured_count_nonzero
```



---
## test_copymodule_preserves_f_contiguity
```python
from test_regression import test_copymodule_preserves_f_contiguity
```



---
## test_fortran_order_buffer
```python
from test_regression import test_fortran_order_buffer
```



---
## test_assign_from_sequence_error
```python
from test_regression import test_assign_from_sequence_error
```



---
## test_format_on_flex_array_element
```python
from test_regression import test_format_on_flex_array_element
```



---
## test_deepcopy_on_0d_array
```python
from test_regression import test_deepcopy_on_0d_array
```



---
## test_deepcopy_F_order_object_array
```python
from test_regression import test_deepcopy_F_order_object_array
```



---
## test_deepcopy_empty_object_array
```python
from test_regression import test_deepcopy_empty_object_array
```



---
## test_bool_subscript_crash
```python
from test_regression import test_bool_subscript_crash
```



---
## test_richcompare_crash
```python
from test_regression import test_richcompare_crash
```



---
## test_richcompare_scalar_and_subclass
```python
from test_regression import test_richcompare_scalar_and_subclass
```



---
## test_pickle_empty_string
```python
from test_regression import test_pickle_empty_string
```



---
## test_frompyfunc_many_args
```python
from test_regression import test_frompyfunc_many_args
```



---
## test_repeat_broadcasting
```python
from test_regression import test_repeat_broadcasting
```



---
## test_frompyfunc_nout_0
```python
from test_regression import test_frompyfunc_nout_0
```



---
## test_leak_in_structured_dtype_comparison
```python
from test_regression import test_leak_in_structured_dtype_comparison
```



---
## test_empty_percentile
```python
from test_regression import test_empty_percentile
```



---
## test_void_compare_segfault
```python
from test_regression import test_void_compare_segfault
```



---
## test_reshape_size_overflow
```python
from test_regression import test_reshape_size_overflow
```



---
## test_invalid_structured_dtypes
```python
from test_regression import test_invalid_structured_dtypes
```



---
## test_correct_hash_dict
```python
from test_regression import test_correct_hash_dict
```



---
## test_scalar_copy
```python
from test_regression import test_scalar_copy
```



---
## test_void_item_memview
```python
from test_regression import test_void_item_memview
```



---
## test_void_getitem
```python
from test_regression import test_void_getitem
```



---
## test_structarray_title
```python
from test_regression import test_structarray_title
```



---
## test_dtype_scalar_squeeze
```python
from test_regression import test_dtype_scalar_squeeze
```



---
## test_field_access_by_title
```python
from test_regression import test_field_access_by_title
```



---
## test_pickle_module
```python
from test_regression import test_pickle_module
```



---
## test_object_casting_errors
```python
from test_regression import test_object_casting_errors
```



---
## test_eff1d_casting
```python
from test_regression import test_eff1d_casting
```



---
## test_pickle_datetime64_array
```python
from test_regression import test_pickle_datetime64_array
```



---
## test_bad_array_interface
```python
from test_regression import test_bad_array_interface
```



---
## test_2d__array__shape
```python
from test_regression import test_2d__array__shape
```



---
## test_to_ctypes
```python
from test_regression import test_to_ctypes
```



---
## test_complex_conversion_error
```python
from test_regression import test_complex_conversion_error
```



---
## test__array_interface__descr
```python
from test_regression import test__array_interface__descr
```



---
## test_dot_big_stride
```python
from test_regression import test_dot_big_stride
```



---
## test_frompyfunc_name
```python
from test_regression import test_frompyfunc_name
```



---
## test_ufunc_order
```python
from test_regression import test_ufunc_order
```



---
## test_nonbool_logical
```python
from test_regression import test_nonbool_logical
```



---
## rs
```python
from test_regression import rs
```



---
## bfa
```python
from test_regression import bfa
```



---
## bfb
```python
from test_regression import bfb
```



---
## index_tmp
```python
from test_regression import index_tmp
```



---
## BuggySequence
```python
from test_regression import BuggySequence
```



---
## ia
```python
from test_regression import ia
```



---
## MyFloat
```python
from test_regression import MyFloat
```



---
## VictimObject
```python
from test_regression import VictimObject
```



---
## TestArray
```python
from test_regression import TestArray
```



---
## test_type
```python
from test_regression import test_type
```



---
## Subclass
```python
from test_regression import Subclass
```



---
## OldSqueeze
```python
from test_regression import OldSqueeze
```



---
## Foo
```python
from test_regression import Foo
```



---
## passer
```python
from test_regression import passer
```



---
## f
```python
from test_regression import f
```



---
## T
```python
from test_regression import T
```



---
## cassé
```python
from test_regression import cassé
```



---
## get_idx
```python
from test_regression import get_idx
```



---
## __len__
```python
from test_regression import __len__
```



---
## __getitem__
```python
from test_regression import __getitem__
```



---
## __float__
```python
from test_regression import __float__
```



---
## __del__
```python
from test_regression import __del__
```



---
## __new__
```python
from test_regression import __new__
```



---
## __array_finalize__
```python
from test_regression import __array_finalize__
```



---
## squeeze
```python
from test_regression import squeeze
```



---
## __array__
```python
from test_regression import __array__
```



---
## __eq__
```python
from test_regression import __eq__
```



---
## __iter__
```python
from test_regression import __iter__
```



---
## __name__
```python
from test_linalg import __name__
```

Test functions for linalg module

---
## consistent_subclass
```python
from test_linalg import consistent_subclass
```



---
## assert_almost_equal
```python
from test_linalg import assert_almost_equal
```



---
## get_real_dtype
```python
from test_linalg import get_real_dtype
```



---
## get_complex_dtype
```python
from test_linalg import get_complex_dtype
```



---
## get_rtol
```python
from test_linalg import get_rtol
```



---
## LinalgCase
```python
from test_linalg import LinalgCase
```



---
## apply_tag
```python
from test_linalg import apply_tag
```

Add the given tag (a string) to each of the cases (a list of LinalgCase
objects)

---
## _make_generalized_cases
```python
from test_linalg import _make_generalized_cases
```



---
## _stride_comb_iter
```python
from test_linalg import _stride_comb_iter
```

Generate cartesian product of strides for all axes

---
## _make_strided_cases
```python
from test_linalg import _make_strided_cases
```



---
## LinalgTestCase
```python
from test_linalg import LinalgTestCase
```



---
## LinalgSquareTestCase
```python
from test_linalg import LinalgSquareTestCase
```



---
## LinalgNonsquareTestCase
```python
from test_linalg import LinalgNonsquareTestCase
```



---
## HermitianTestCase
```python
from test_linalg import HermitianTestCase
```



---
## LinalgGeneralizedSquareTestCase
```python
from test_linalg import LinalgGeneralizedSquareTestCase
```



---
## LinalgGeneralizedNonsquareTestCase
```python
from test_linalg import LinalgGeneralizedNonsquareTestCase
```



---
## HermitianGeneralizedTestCase
```python
from test_linalg import HermitianGeneralizedTestCase
```



---
## dot_generalized
```python
from test_linalg import dot_generalized
```



---
## identity_like_generalized
```python
from test_linalg import identity_like_generalized
```



---
## SolveCases
```python
from test_linalg import SolveCases
```



---
## TestSolve
```python
from test_linalg import TestSolve
```



---
## InvCases
```python
from test_linalg import InvCases
```



---
## TestInv
```python
from test_linalg import TestInv
```



---
## EigvalsCases
```python
from test_linalg import EigvalsCases
```



---
## TestEigvals
```python
from test_linalg import TestEigvals
```



---
## EigCases
```python
from test_linalg import EigCases
```



---
## TestEig
```python
from test_linalg import TestEig
```



---
## SVDBaseTests
```python
from test_linalg import SVDBaseTests
```



---
## SVDCases
```python
from test_linalg import SVDCases
```



---
## TestSVD
```python
from test_linalg import TestSVD
```



---
## SVDHermitianCases
```python
from test_linalg import SVDHermitianCases
```



---
## TestSVDHermitian
```python
from test_linalg import TestSVDHermitian
```



---
## CondCases
```python
from test_linalg import CondCases
```



---
## TestCond
```python
from test_linalg import TestCond
```



---
## PinvCases
```python
from test_linalg import PinvCases
```



---
## TestPinv
```python
from test_linalg import TestPinv
```



---
## PinvHermitianCases
```python
from test_linalg import PinvHermitianCases
```



---
## TestPinvHermitian
```python
from test_linalg import TestPinvHermitian
```



---
## DetCases
```python
from test_linalg import DetCases
```



---
## TestDet
```python
from test_linalg import TestDet
```



---
## LstsqCases
```python
from test_linalg import LstsqCases
```



---
## TestLstsq
```python
from test_linalg import TestLstsq
```



---
## TestMatrixPower
```python
from test_linalg import TestMatrixPower
```



---
## TestEigvalshCases
```python
from test_linalg import TestEigvalshCases
```



---
## TestEigvalsh
```python
from test_linalg import TestEigvalsh
```



---
## TestEighCases
```python
from test_linalg import TestEighCases
```



---
## TestEigh
```python
from test_linalg import TestEigh
```



---
## _TestNormBase
```python
from test_linalg import _TestNormBase
```



---
## _TestNormGeneral
```python
from test_linalg import _TestNormGeneral
```



---
## _TestNorm2D
```python
from test_linalg import _TestNorm2D
```



---
## _TestNorm
```python
from test_linalg import _TestNorm
```



---
## TestNorm_NonSystematic
```python
from test_linalg import TestNorm_NonSystematic
```



---
## _TestNormDoubleBase
```python
from test_linalg import _TestNormDoubleBase
```



---
## _TestNormSingleBase
```python
from test_linalg import _TestNormSingleBase
```



---
## _TestNormInt64Base
```python
from test_linalg import _TestNormInt64Base
```



---
## TestNormDouble
```python
from test_linalg import TestNormDouble
```



---
## TestNormSingle
```python
from test_linalg import TestNormSingle
```



---
## TestNormInt64
```python
from test_linalg import TestNormInt64
```



---
## TestMatrixRank
```python
from test_linalg import TestMatrixRank
```



---
## test_reduced_rank
```python
from test_linalg import test_reduced_rank
```



---
## TestQR
```python
from test_linalg import TestQR
```



---
## TestCholesky
```python
from test_linalg import TestCholesky
```



---
## test_byteorder_check
```python
from test_linalg import test_byteorder_check
```



---
## test_generalized_raise_multiloop
```python
from test_linalg import test_generalized_raise_multiloop
```



---
## test_xerbla_override
```python
from test_linalg import test_xerbla_override
```



---
## test_sdot_bug_8577
```python
from test_linalg import test_sdot_bug_8577
```



---
## TestMultiDot
```python
from test_linalg import TestMultiDot
```



---
## TestTensorinv
```python
from test_linalg import TestTensorinv
```



---
## TestTensorsolve
```python
from test_linalg import TestTensorsolve
```



---
## test_unsupported_commontype
```python
from test_linalg import test_unsupported_commontype
```



---
## test_blas64_dot
```python
from test_linalg import test_blas64_dot
```



---
## test_blas64_geqrf_lwork_smoketest
```python
from test_linalg import test_blas64_geqrf_lwork_smoketest
```



---
## __init__
```python
from test_linalg import __init__
```

A bundle of arguments to be passed to a test case, with an identifying
name, the operands a and b, and a set of tags to filter the tests

---
## check
```python
from test_linalg import check
```

Run the function `do` on this test case, expanding arguments

---
## __repr__
```python
from test_linalg import __repr__
```



---
## check_cases
```python
from test_linalg import check_cases
```

Run func on each of the cases with all of the tags in require, and none
of the tags in exclude

---
## test_sq_cases
```python
from test_linalg import test_sq_cases
```



---
## test_empty_sq_cases
```python
from test_linalg import test_empty_sq_cases
```



---
## test_nonsq_cases
```python
from test_linalg import test_nonsq_cases
```



---
## test_empty_nonsq_cases
```python
from test_linalg import test_empty_nonsq_cases
```



---
## test_herm_cases
```python
from test_linalg import test_herm_cases
```



---
## test_empty_herm_cases
```python
from test_linalg import test_empty_herm_cases
```



---
## test_generalized_sq_cases
```python
from test_linalg import test_generalized_sq_cases
```



---
## test_generalized_empty_sq_cases
```python
from test_linalg import test_generalized_empty_sq_cases
```



---
## test_generalized_nonsq_cases
```python
from test_linalg import test_generalized_nonsq_cases
```



---
## test_generalized_empty_nonsq_cases
```python
from test_linalg import test_generalized_empty_nonsq_cases
```



---
## test_generalized_herm_cases
```python
from test_linalg import test_generalized_herm_cases
```



---
## test_generalized_empty_herm_cases
```python
from test_linalg import test_generalized_empty_herm_cases
```



---
## do
```python
from test_linalg import do
```



---
## test_types
```python
from test_linalg import test_types
```



---
## test_0_size
```python
from test_linalg import test_0_size
```



---
## test_0_size_k
```python
from test_linalg import test_0_size_k
```



---
## test_empty_identity
```python
from test_linalg import test_empty_identity
```

Empty input should put an identity matrix in u or vh 

---
## test_basic_nonsvd
```python
from test_linalg import test_basic_nonsvd
```



---
## test_singular
```python
from test_linalg import test_singular
```



---
## test_nan
```python
from test_linalg import test_nan
```



---
## test_stacked_singular
```python
from test_linalg import test_stacked_singular
```



---
## test_zero
```python
from test_linalg import test_zero
```



---
## test_future_rcond
```python
from test_linalg import test_future_rcond
```



---
## test_empty_a_b
```python
from test_linalg import test_empty_a_b
```



---
## test_incompatible_dims
```python
from test_linalg import test_incompatible_dims
```



---
## test_large_power
```python
from test_linalg import test_large_power
```



---
## test_power_is_zero
```python
from test_linalg import test_power_is_zero
```



---
## test_power_is_one
```python
from test_linalg import test_power_is_one
```



---
## test_power_is_two
```python
from test_linalg import test_power_is_two
```



---
## test_power_is_minus_one
```python
from test_linalg import test_power_is_minus_one
```



---
## test_exceptions_bad_power
```python
from test_linalg import test_exceptions_bad_power
```



---
## test_exceptions_non_square
```python
from test_linalg import test_exceptions_non_square
```



---
## test_exceptions_not_invertible
```python
from test_linalg import test_exceptions_not_invertible
```



---
## test_invalid
```python
from test_linalg import test_invalid
```



---
## test_UPLO
```python
from test_linalg import test_UPLO
```



---
## check_dtype
```python
from test_linalg import check_dtype
```



---
## test_empty
```python
from test_linalg import test_empty
```



---
## test_vector_return_type
```python
from test_linalg import test_vector_return_type
```



---
## test_vector
```python
from test_linalg import test_vector
```



---
## test_axis
```python
from test_linalg import test_axis
```



---
## test_keepdims
```python
from test_linalg import test_keepdims
```



---
## test_matrix_empty
```python
from test_linalg import test_matrix_empty
```



---
## test_matrix_return_type
```python
from test_linalg import test_matrix_return_type
```



---
## test_matrix_2x2
```python
from test_linalg import test_matrix_2x2
```



---
## test_matrix_3x3
```python
from test_linalg import test_matrix_3x3
```



---
## test_bad_args
```python
from test_linalg import test_bad_args
```



---
## test_longdouble_norm
```python
from test_linalg import test_longdouble_norm
```



---
## test_intmin
```python
from test_linalg import test_intmin
```



---
## test_complex_high_ord
```python
from test_linalg import test_complex_high_ord
```



---
## test_matrix_rank
```python
from test_linalg import test_matrix_rank
```



---
## test_symmetric_rank
```python
from test_linalg import test_symmetric_rank
```



---
## check_qr
```python
from test_linalg import check_qr
```



---
## test_qr_empty
```python
from test_linalg import test_qr_empty
```



---
## test_mode_raw
```python
from test_linalg import test_mode_raw
```



---
## test_mode_all_but_economic
```python
from test_linalg import test_mode_all_but_economic
```



---
## check_qr_stacked
```python
from test_linalg import check_qr_stacked
```



---
## test_stacked_inputs
```python
from test_linalg import test_stacked_inputs
```



---
## test_basic_property
```python
from test_linalg import test_basic_property
```



---
## test_basic_function_with_three_arguments
```python
from test_linalg import test_basic_function_with_three_arguments
```



---
## test_basic_function_with_two_arguments
```python
from test_linalg import test_basic_function_with_two_arguments
```



---
## test_basic_function_with_dynamic_programming_optimization
```python
from test_linalg import test_basic_function_with_dynamic_programming_optimization
```



---
## test_vector_as_first_argument
```python
from test_linalg import test_vector_as_first_argument
```



---
## test_vector_as_last_argument
```python
from test_linalg import test_vector_as_last_argument
```



---
## test_vector_as_first_and_last_argument
```python
from test_linalg import test_vector_as_first_and_last_argument
```



---
## test_three_arguments_and_out
```python
from test_linalg import test_three_arguments_and_out
```



---
## test_two_arguments_and_out
```python
from test_linalg import test_two_arguments_and_out
```



---
## test_dynamic_programming_optimization_and_out
```python
from test_linalg import test_dynamic_programming_optimization_and_out
```



---
## test_dynamic_programming_logic
```python
from test_linalg import test_dynamic_programming_logic
```



---
## test_too_few_input_arrays
```python
from test_linalg import test_too_few_input_arrays
```



---
## test_non_square_handling
```python
from test_linalg import test_non_square_handling
```



---
## test_tensorinv_shape
```python
from test_linalg import test_tensorinv_shape
```



---
## test_tensorinv_ind_limit
```python
from test_linalg import test_tensorinv_ind_limit
```



---
## test_tensorinv_result
```python
from test_linalg import test_tensorinv_result
```



---
## test_tensorsolve_result
```python
from test_linalg import test_tensorsolve_result
```



---
## ArraySubclass
```python
from test_linalg import ArraySubclass
```



---
## hermitian
```python
from test_linalg import hermitian
```



---
## tz
```python
from test_linalg import tz
```



---
## _test
```python
from test_linalg import _test
```



---
## test_qr_mode_full_future_warning
```python
from test_deprecations import test_qr_mode_full_future_warning
```

Check mode='full' FutureWarning.

In numpy 1.8 the mode options 'full' and 'economic' in linalg.qr were
deprecated. The release date will probably be sometime in the summer
of 2013.

---
## test_eig_build
```python
from test_regression import test_eig_build
```



---
## test_eigh_build
```python
from test_regression import test_eigh_build
```



---
## test_svd_build
```python
from test_regression import test_svd_build
```



---
## test_norm_vector_badarg
```python
from test_regression import test_norm_vector_badarg
```



---
## test_lapack_endian
```python
from test_regression import test_lapack_endian
```



---
## test_large_svd_32bit
```python
from test_regression import test_large_svd_32bit
```



---
## test_svd_no_uv
```python
from test_regression import test_svd_no_uv
```



---
## test_norm_object_array
```python
from test_regression import test_norm_object_array
```



---
## test_lstsq_complex_larger_rhs
```python
from test_regression import test_lstsq_complex_larger_rhs
```



---
## __name__
```python
from test_old_ma import __name__
```



---
## eq
```python
from test_old_ma import eq
```



---
## TestMa
```python
from test_old_ma import TestMa
```



---
## TestUfuncs
```python
from test_old_ma import TestUfuncs
```



---
## TestArrayMethods
```python
from test_old_ma import TestArrayMethods
```



---
## eqmask
```python
from test_old_ma import eqmask
```



---
## setup_method
```python
from test_old_ma import setup_method
```



---
## test_testBasic1d
```python
from test_old_ma import test_testBasic1d
```



---
## test_testBasic2d
```python
from test_old_ma import test_testBasic2d
```



---
## test_testArithmetic
```python
from test_old_ma import test_testArithmetic
```



---
## test_testMixedArithmetic
```python
from test_old_ma import test_testMixedArithmetic
```



---
## test_testUfuncs1
```python
from test_old_ma import test_testUfuncs1
```



---
## test_xtestCount
```python
from test_old_ma import test_xtestCount
```



---
## test_testMinMax
```python
from test_old_ma import test_testMinMax
```



---
## test_testAddSumProd
```python
from test_old_ma import test_testAddSumProd
```



---
## test_testCI
```python
from test_old_ma import test_testCI
```



---
## test_testCopySize
```python
from test_old_ma import test_testCopySize
```



---
## test_testPut
```python
from test_old_ma import test_testPut
```



---
## test_testPut2
```python
from test_old_ma import test_testPut2
```



---
## test_testMaPut
```python
from test_old_ma import test_testMaPut
```



---
## test_testOddFeatures
```python
from test_old_ma import test_testOddFeatures
```



---
## test_testMinMax2
```python
from test_old_ma import test_testMinMax2
```



---
## test_testTakeTransposeInnerOuter
```python
from test_old_ma import test_testTakeTransposeInnerOuter
```



---
## test_testInplace
```python
from test_old_ma import test_testInplace
```



---
## test_testPickle
```python
from test_old_ma import test_testPickle
```



---
## test_testMasked
```python
from test_old_ma import test_testMasked
```



---
## test_testAverage1
```python
from test_old_ma import test_testAverage1
```



---
## test_testAverage2
```python
from test_old_ma import test_testAverage2
```



---
## test_testToPython
```python
from test_old_ma import test_testToPython
```



---
## test_testScalarArithmetic
```python
from test_old_ma import test_testScalarArithmetic
```



---
## test_testArrayMethods
```python
from test_old_ma import test_testArrayMethods
```



---
## test_testArrayAttributes
```python
from test_old_ma import test_testArrayAttributes
```



---
## test_testAPI
```python
from test_old_ma import test_testAPI
```



---
## test_testSingleElementSubscript
```python
from test_old_ma import test_testSingleElementSubscript
```



---
## test_assignment_by_condition
```python
from test_old_ma import test_assignment_by_condition
```



---
## test_assignment_by_condition_2
```python
from test_old_ma import test_assignment_by_condition_2
```



---
## test_testUfuncRegression
```python
from test_old_ma import test_testUfuncRegression
```



---
## test_reduce
```python
from test_old_ma import test_reduce
```



---
## test_minmax
```python
from test_old_ma import test_minmax
```



---
## test_nonzero
```python
from test_old_ma import test_nonzero
```



---
## test_trace
```python
from test_old_ma import test_trace
```



---
## test_clip
```python
from test_old_ma import test_clip
```



---
## test_ptp
```python
from test_old_ma import test_ptp
```



---
## test_swapaxes
```python
from test_old_ma import test_swapaxes
```



---
## test_cumprod
```python
from test_old_ma import test_cumprod
```



---
## test_cumsum
```python
from test_old_ma import test_cumsum
```



---
## test_varstd
```python
from test_old_ma import test_varstd
```



---
## TestMaskedArray
```python
from test_core import TestMaskedArray
```



---
## TestMaskedArrayArithmetic
```python
from test_core import TestMaskedArrayArithmetic
```



---
## TestMaskedArrayAttributes
```python
from test_core import TestMaskedArrayAttributes
```



---
## TestFillingValues
```python
from test_core import TestFillingValues
```



---
## TestUfuncs
```python
from test_core import TestUfuncs
```



---
## TestMaskedArrayInPlaceArithmetic
```python
from test_core import TestMaskedArrayInPlaceArithmetic
```



---
## TestMaskedArrayMethods
```python
from test_core import TestMaskedArrayMethods
```



---
## TestMaskedArrayMathMethods
```python
from test_core import TestMaskedArrayMathMethods
```



---
## TestMaskedArrayMathMethodsComplex
```python
from test_core import TestMaskedArrayMathMethodsComplex
```



---
## TestMaskedArrayFunctions
```python
from test_core import TestMaskedArrayFunctions
```



---
## TestMaskedFields
```python
from test_core import TestMaskedFields
```



---
## TestMaskedObjectArray
```python
from test_core import TestMaskedObjectArray
```



---
## TestMaskedView
```python
from test_core import TestMaskedView
```



---
## TestOptionalArgs
```python
from test_core import TestOptionalArgs
```



---
## TestMaskedConstant
```python
from test_core import TestMaskedConstant
```



---
## TestMaskedWhereAliases
```python
from test_core import TestMaskedWhereAliases
```



---
## test_masked_array
```python
from test_core import test_masked_array
```



---
## test_masked_array_no_copy
```python
from test_core import test_masked_array_no_copy
```



---
## test_append_masked_array
```python
from test_core import test_append_masked_array
```



---
## test_append_masked_array_along_axis
```python
from test_core import test_append_masked_array_along_axis
```



---
## test_default_fill_value_complex
```python
from test_core import test_default_fill_value_complex
```



---
## test_ufunc_with_output
```python
from test_core import test_ufunc_with_output
```



---
## test_ufunc_with_out_varied
```python
from test_core import test_ufunc_with_out_varied
```

Test that masked arrays are immune to gh-10459 

---
## test_astype_mask_ordering
```python
from test_core import test_astype_mask_ordering
```



---
## test_astype_basic
```python
from test_core import test_astype_basic
```



---
## test_fieldless_void
```python
from test_core import test_fieldless_void
```



---
## test_mask_shape_assignment_does_not_break_masked
```python
from test_core import test_mask_shape_assignment_does_not_break_masked
```



---
## test_doc_note
```python
from test_core import test_doc_note
```



---
## test_gh_22556
```python
from test_core import test_gh_22556
```



---
## test_gh_21022
```python
from test_core import test_gh_21022
```



---
## test_deepcopy_2d_obj
```python
from test_core import test_deepcopy_2d_obj
```



---
## test_deepcopy_0d_obj
```python
from test_core import test_deepcopy_0d_obj
```



---
## setup_method
```python
from test_core import setup_method
```



---
## test_basicattributes
```python
from test_core import test_basicattributes
```



---
## test_basic0d
```python
from test_core import test_basic0d
```



---
## test_basic1d
```python
from test_core import test_basic1d
```



---
## test_basic2d
```python
from test_core import test_basic2d
```



---
## test_concatenate_basic
```python
from test_core import test_concatenate_basic
```



---
## test_concatenate_alongaxis
```python
from test_core import test_concatenate_alongaxis
```



---
## test_concatenate_flexible
```python
from test_core import test_concatenate_flexible
```



---
## test_creation_ndmin
```python
from test_core import test_creation_ndmin
```



---
## test_creation_ndmin_from_maskedarray
```python
from test_core import test_creation_ndmin_from_maskedarray
```



---
## test_creation_maskcreation
```python
from test_core import test_creation_maskcreation
```



---
## test_masked_singleton_array_creation_warns
```python
from test_core import test_masked_singleton_array_creation_warns
```



---
## test_creation_with_list_of_maskedarrays
```python
from test_core import test_creation_with_list_of_maskedarrays
```



---
## test_creation_with_list_of_maskedarrays_no_bool_cast
```python
from test_core import test_creation_with_list_of_maskedarrays_no_bool_cast
```



---
## test_creation_from_ndarray_with_padding
```python
from test_core import test_creation_from_ndarray_with_padding
```



---
## test_unknown_keyword_parameter
```python
from test_core import test_unknown_keyword_parameter
```



---
## test_asarray
```python
from test_core import test_asarray
```



---
## test_asarray_default_order
```python
from test_core import test_asarray_default_order
```



---
## test_asarray_enforce_order
```python
from test_core import test_asarray_enforce_order
```



---
## test_fix_invalid
```python
from test_core import test_fix_invalid
```



---
## test_maskedelement
```python
from test_core import test_maskedelement
```



---
## test_set_element_as_object
```python
from test_core import test_set_element_as_object
```



---
## test_indexing
```python
from test_core import test_indexing
```



---
## test_setitem_no_warning
```python
from test_core import test_setitem_no_warning
```



---
## test_copy
```python
from test_core import test_copy
```



---
## test_copy_0d
```python
from test_core import test_copy_0d
```



---
## test_copy_on_python_builtins
```python
from test_core import test_copy_on_python_builtins
```



---
## test_copy_immutable
```python
from test_core import test_copy_immutable
```



---
## test_deepcopy
```python
from test_core import test_deepcopy
```



---
## test_format
```python
from test_core import test_format
```



---
## test_str_repr
```python
from test_core import test_str_repr
```



---
## test_str_repr_legacy
```python
from test_core import test_str_repr_legacy
```



---
## test_0d_unicode
```python
from test_core import test_0d_unicode
```



---
## test_pickling
```python
from test_core import test_pickling
```



---
## test_pickling_subbaseclass
```python
from test_core import test_pickling_subbaseclass
```



---
## test_pickling_maskedconstant
```python
from test_core import test_pickling_maskedconstant
```



---
## test_pickling_wstructured
```python
from test_core import test_pickling_wstructured
```



---
## test_pickling_keepalignment
```python
from test_core import test_pickling_keepalignment
```



---
## test_single_element_subscript
```python
from test_core import test_single_element_subscript
```



---
## test_topython
```python
from test_core import test_topython
```



---
## test_oddfeatures_1
```python
from test_core import test_oddfeatures_1
```



---
## test_oddfeatures_2
```python
from test_core import test_oddfeatures_2
```



---
## test_oddfeatures_3
```python
from test_core import test_oddfeatures_3
```



---
## test_filled_with_object_dtype
```python
from test_core import test_filled_with_object_dtype
```



---
## test_filled_with_flexible_dtype
```python
from test_core import test_filled_with_flexible_dtype
```



---
## test_filled_with_mvoid
```python
from test_core import test_filled_with_mvoid
```



---
## test_filled_with_nested_dtype
```python
from test_core import test_filled_with_nested_dtype
```



---
## test_filled_with_f_order
```python
from test_core import test_filled_with_f_order
```



---
## test_optinfo_propagation
```python
from test_core import test_optinfo_propagation
```



---
## test_optinfo_forward_propagation
```python
from test_core import test_optinfo_forward_propagation
```



---
## test_fancy_printoptions
```python
from test_core import test_fancy_printoptions
```



---
## test_flatten_structured_array
```python
from test_core import test_flatten_structured_array
```



---
## test_void0d
```python
from test_core import test_void0d
```



---
## test_mvoid_getitem
```python
from test_core import test_mvoid_getitem
```



---
## test_mvoid_iter
```python
from test_core import test_mvoid_iter
```



---
## test_mvoid_print
```python
from test_core import test_mvoid_print
```



---
## test_mvoid_multidim_print
```python
from test_core import test_mvoid_multidim_print
```



---
## test_object_with_array
```python
from test_core import test_object_with_array
```



---
## teardown_method
```python
from test_core import teardown_method
```



---
## test_basic_arithmetic
```python
from test_core import test_basic_arithmetic
```



---
## test_divide_on_different_shapes
```python
from test_core import test_divide_on_different_shapes
```



---
## test_mixed_arithmetic
```python
from test_core import test_mixed_arithmetic
```



---
## test_limits_arithmetic
```python
from test_core import test_limits_arithmetic
```



---
## test_masked_singleton_arithmetic
```python
from test_core import test_masked_singleton_arithmetic
```



---
## test_masked_singleton_equality
```python
from test_core import test_masked_singleton_equality
```



---
## test_arithmetic_with_masked_singleton
```python
from test_core import test_arithmetic_with_masked_singleton
```



---
## test_arithmetic_with_masked_singleton_on_1d_singleton
```python
from test_core import test_arithmetic_with_masked_singleton_on_1d_singleton
```



---
## test_scalar_arithmetic
```python
from test_core import test_scalar_arithmetic
```



---
## test_basic_ufuncs
```python
from test_core import test_basic_ufuncs
```



---
## test_count_func
```python
from test_core import test_count_func
```



---
## test_count_on_python_builtins
```python
from test_core import test_count_on_python_builtins
```



---
## test_minmax_func
```python
from test_core import test_minmax_func
```



---
## test_minimummaximum_func
```python
from test_core import test_minimummaximum_func
```



---
## test_minmax_reduce
```python
from test_core import test_minmax_reduce
```



---
## test_minmax_funcs_with_output
```python
from test_core import test_minmax_funcs_with_output
```



---
## test_minmax_methods
```python
from test_core import test_minmax_methods
```



---
## test_minmax_dtypes
```python
from test_core import test_minmax_dtypes
```



---
## test_addsumprod
```python
from test_core import test_addsumprod
```



---
## test_binops_d2D
```python
from test_core import test_binops_d2D
```



---
## test_domained_binops_d2D
```python
from test_core import test_domained_binops_d2D
```



---
## test_noshrinking
```python
from test_core import test_noshrinking
```



---
## test_ufunc_nomask
```python
from test_core import test_ufunc_nomask
```



---
## test_noshink_on_creation
```python
from test_core import test_noshink_on_creation
```



---
## test_mod
```python
from test_core import test_mod
```



---
## test_TakeTransposeInnerOuter
```python
from test_core import test_TakeTransposeInnerOuter
```



---
## test_imag_real
```python
from test_core import test_imag_real
```



---
## test_methods_with_output
```python
from test_core import test_methods_with_output
```



---
## test_eq_on_structured
```python
from test_core import test_eq_on_structured
```



---
## test_ne_on_structured
```python
from test_core import test_ne_on_structured
```



---
## test_eq_ne_structured_with_non_masked
```python
from test_core import test_eq_ne_structured_with_non_masked
```



---
## test_eq_ne_structured_extra
```python
from test_core import test_eq_ne_structured_extra
```



---
## test_eq_for_strings
```python
from test_core import test_eq_for_strings
```



---
## test_ne_for_strings
```python
from test_core import test_ne_for_strings
```



---
## test_eq_for_numeric
```python
from test_core import test_eq_for_numeric
```



---
## test_eq_broadcast_with_unmasked
```python
from test_core import test_eq_broadcast_with_unmasked
```



---
## test_comp_no_mask_not_broadcast
```python
from test_core import test_comp_no_mask_not_broadcast
```



---
## test_ne_for_numeric
```python
from test_core import test_ne_for_numeric
```



---
## test_comparisons_for_numeric
```python
from test_core import test_comparisons_for_numeric
```



---
## test_comparisons_strings
```python
from test_core import test_comparisons_strings
```



---
## test_eq_with_None
```python
from test_core import test_eq_with_None
```



---
## test_eq_with_scalar
```python
from test_core import test_eq_with_scalar
```



---
## test_eq_different_dimensions
```python
from test_core import test_eq_different_dimensions
```



---
## test_numpyarithmetic
```python
from test_core import test_numpyarithmetic
```



---
## test_keepmask
```python
from test_core import test_keepmask
```



---
## test_hardmask
```python
from test_core import test_hardmask
```



---
## test_hardmask_again
```python
from test_core import test_hardmask_again
```



---
## test_hardmask_oncemore_yay
```python
from test_core import test_hardmask_oncemore_yay
```



---
## test_smallmask
```python
from test_core import test_smallmask
```



---
## test_shrink_mask
```python
from test_core import test_shrink_mask
```



---
## test_flat
```python
from test_core import test_flat
```



---
## test_assign_dtype
```python
from test_core import test_assign_dtype
```



---
## test_check_on_scalar
```python
from test_core import test_check_on_scalar
```



---
## test_check_on_fields
```python
from test_core import test_check_on_fields
```



---
## test_fillvalue_conversion
```python
from test_core import test_fillvalue_conversion
```



---
## test_default_fill_value
```python
from test_core import test_default_fill_value
```



---
## test_default_fill_value_structured
```python
from test_core import test_default_fill_value_structured
```



---
## test_default_fill_value_void
```python
from test_core import test_default_fill_value_void
```



---
## test_fillvalue
```python
from test_core import test_fillvalue
```



---
## test_subarray_fillvalue
```python
from test_core import test_subarray_fillvalue
```



---
## test_fillvalue_exotic_dtype
```python
from test_core import test_fillvalue_exotic_dtype
```



---
## test_fillvalue_datetime_timedelta
```python
from test_core import test_fillvalue_datetime_timedelta
```



---
## test_extremum_fill_value
```python
from test_core import test_extremum_fill_value
```



---
## test_extremum_fill_value_subdtype
```python
from test_core import test_extremum_fill_value_subdtype
```



---
## test_fillvalue_individual_fields
```python
from test_core import test_fillvalue_individual_fields
```



---
## test_fillvalue_implicit_structured_array
```python
from test_core import test_fillvalue_implicit_structured_array
```



---
## test_fillvalue_as_arguments
```python
from test_core import test_fillvalue_as_arguments
```



---
## test_shape_argument
```python
from test_core import test_shape_argument
```



---
## test_fillvalue_in_view
```python
from test_core import test_fillvalue_in_view
```



---
## test_fillvalue_bytes_or_str
```python
from test_core import test_fillvalue_bytes_or_str
```



---
## test_testUfuncRegression
```python
from test_core import test_testUfuncRegression
```



---
## test_reduce
```python
from test_core import test_reduce
```



---
## test_minmax
```python
from test_core import test_minmax
```



---
## test_ndarray_mask
```python
from test_core import test_ndarray_mask
```



---
## test_treatment_of_NotImplemented
```python
from test_core import test_treatment_of_NotImplemented
```



---
## test_no_masked_nan_warnings
```python
from test_core import test_no_masked_nan_warnings
```



---
## test_inplace_addition_scalar
```python
from test_core import test_inplace_addition_scalar
```



---
## test_inplace_addition_array
```python
from test_core import test_inplace_addition_array
```



---
## test_inplace_subtraction_scalar
```python
from test_core import test_inplace_subtraction_scalar
```



---
## test_inplace_subtraction_array
```python
from test_core import test_inplace_subtraction_array
```



---
## test_inplace_multiplication_scalar
```python
from test_core import test_inplace_multiplication_scalar
```



---
## test_inplace_multiplication_array
```python
from test_core import test_inplace_multiplication_array
```



---
## test_inplace_division_scalar_int
```python
from test_core import test_inplace_division_scalar_int
```



---
## test_inplace_division_scalar_float
```python
from test_core import test_inplace_division_scalar_float
```



---
## test_inplace_division_array_float
```python
from test_core import test_inplace_division_array_float
```



---
## test_inplace_division_misc
```python
from test_core import test_inplace_division_misc
```



---
## test_datafriendly_add
```python
from test_core import test_datafriendly_add
```



---
## test_datafriendly_sub
```python
from test_core import test_datafriendly_sub
```



---
## test_datafriendly_mul
```python
from test_core import test_datafriendly_mul
```



---
## test_datafriendly_div
```python
from test_core import test_datafriendly_div
```



---
## test_datafriendly_pow
```python
from test_core import test_datafriendly_pow
```



---
## test_datafriendly_add_arrays
```python
from test_core import test_datafriendly_add_arrays
```



---
## test_datafriendly_sub_arrays
```python
from test_core import test_datafriendly_sub_arrays
```



---
## test_datafriendly_mul_arrays
```python
from test_core import test_datafriendly_mul_arrays
```



---
## test_inplace_addition_scalar_type
```python
from test_core import test_inplace_addition_scalar_type
```



---
## test_inplace_addition_array_type
```python
from test_core import test_inplace_addition_array_type
```



---
## test_inplace_subtraction_scalar_type
```python
from test_core import test_inplace_subtraction_scalar_type
```



---
## test_inplace_subtraction_array_type
```python
from test_core import test_inplace_subtraction_array_type
```



---
## test_inplace_multiplication_scalar_type
```python
from test_core import test_inplace_multiplication_scalar_type
```



---
## test_inplace_multiplication_array_type
```python
from test_core import test_inplace_multiplication_array_type
```



---
## test_inplace_floor_division_scalar_type
```python
from test_core import test_inplace_floor_division_scalar_type
```



---
## test_inplace_floor_division_array_type
```python
from test_core import test_inplace_floor_division_array_type
```



---
## test_inplace_division_scalar_type
```python
from test_core import test_inplace_division_scalar_type
```



---
## test_inplace_division_array_type
```python
from test_core import test_inplace_division_array_type
```



---
## test_inplace_pow_type
```python
from test_core import test_inplace_pow_type
```



---
## test_generic_methods
```python
from test_core import test_generic_methods
```



---
## test_allclose
```python
from test_core import test_allclose
```



---
## test_allclose_timedelta
```python
from test_core import test_allclose_timedelta
```



---
## test_allany
```python
from test_core import test_allany
```



---
## test_allany_oddities
```python
from test_core import test_allany_oddities
```



---
## test_argmax_argmin
```python
from test_core import test_argmax_argmin
```



---
## test_clip
```python
from test_core import test_clip
```



---
## test_clip_out
```python
from test_core import test_clip_out
```



---
## test_compress
```python
from test_core import test_compress
```



---
## test_compressed
```python
from test_core import test_compressed
```



---
## test_empty
```python
from test_core import test_empty
```



---
## test_zeros
```python
from test_core import test_zeros
```



---
## test_ones
```python
from test_core import test_ones
```



---
## test_put
```python
from test_core import test_put
```



---
## test_put_nomask
```python
from test_core import test_put_nomask
```



---
## test_put_hardmask
```python
from test_core import test_put_hardmask
```



---
## test_putmask
```python
from test_core import test_putmask
```



---
## test_ravel
```python
from test_core import test_ravel
```



---
## test_ravel_order
```python
from test_core import test_ravel_order
```



---
## test_reshape
```python
from test_core import test_reshape
```



---
## test_sort
```python
from test_core import test_sort
```



---
## test_stable_sort
```python
from test_core import test_stable_sort
```



---
## test_argsort_matches_sort
```python
from test_core import test_argsort_matches_sort
```



---
## test_sort_2d
```python
from test_core import test_sort_2d
```



---
## test_sort_flexible
```python
from test_core import test_sort_flexible
```



---
## test_argsort
```python
from test_core import test_argsort
```



---
## test_squeeze
```python
from test_core import test_squeeze
```



---
## test_swapaxes
```python
from test_core import test_swapaxes
```



---
## test_take
```python
from test_core import test_take
```



---
## test_take_masked_indices
```python
from test_core import test_take_masked_indices
```



---
## test_tolist
```python
from test_core import test_tolist
```



---
## test_tolist_specialcase
```python
from test_core import test_tolist_specialcase
```



---
## test_toflex
```python
from test_core import test_toflex
```



---
## test_fromflex
```python
from test_core import test_fromflex
```



---
## test_arraymethod
```python
from test_core import test_arraymethod
```



---
## test_arraymethod_0d
```python
from test_core import test_arraymethod_0d
```



---
## test_transpose_view
```python
from test_core import test_transpose_view
```



---
## test_diagonal_view
```python
from test_core import test_diagonal_view
```



---
## test_cumsumprod
```python
from test_core import test_cumsumprod
```



---
## test_cumsumprod_with_output
```python
from test_core import test_cumsumprod_with_output
```



---
## test_ptp
```python
from test_core import test_ptp
```



---
## test_add_object
```python
from test_core import test_add_object
```



---
## test_sum_object
```python
from test_core import test_sum_object
```



---
## test_prod_object
```python
from test_core import test_prod_object
```



---
## test_meananom_object
```python
from test_core import test_meananom_object
```



---
## test_anom_shape
```python
from test_core import test_anom_shape
```



---
## test_anom
```python
from test_core import test_anom
```



---
## test_trace
```python
from test_core import test_trace
```



---
## test_dot
```python
from test_core import test_dot
```



---
## test_dot_shape_mismatch
```python
from test_core import test_dot_shape_mismatch
```



---
## test_varmean_nomask
```python
from test_core import test_varmean_nomask
```



---
## test_varstd
```python
from test_core import test_varstd
```



---
## test_varstd_specialcases
```python
from test_core import test_varstd_specialcases
```



---
## test_varstd_ddof
```python
from test_core import test_varstd_ddof
```



---
## test_diag
```python
from test_core import test_diag
```



---
## test_axis_methods_nomask
```python
from test_core import test_axis_methods_nomask
```



---
## test_mean_overflow
```python
from test_core import test_mean_overflow
```



---
## test_diff_with_prepend
```python
from test_core import test_diff_with_prepend
```



---
## test_diff_with_append
```python
from test_core import test_diff_with_append
```



---
## test_diff_with_dim_0
```python
from test_core import test_diff_with_dim_0
```



---
## test_diff_with_n_0
```python
from test_core import test_diff_with_n_0
```



---
## test_masked_where_bool
```python
from test_core import test_masked_where_bool
```



---
## test_masked_equal_wlist
```python
from test_core import test_masked_equal_wlist
```



---
## test_masked_equal_fill_value
```python
from test_core import test_masked_equal_fill_value
```



---
## test_masked_where_condition
```python
from test_core import test_masked_where_condition
```



---
## test_masked_where_oddities
```python
from test_core import test_masked_where_oddities
```



---
## test_masked_where_shape_constraint
```python
from test_core import test_masked_where_shape_constraint
```



---
## test_masked_where_structured
```python
from test_core import test_masked_where_structured
```



---
## test_masked_where_mismatch
```python
from test_core import test_masked_where_mismatch
```



---
## test_masked_otherfunctions
```python
from test_core import test_masked_otherfunctions
```



---
## test_round
```python
from test_core import test_round
```



---
## test_round_with_output
```python
from test_core import test_round_with_output
```



---
## test_round_with_scalar
```python
from test_core import test_round_with_scalar
```



---
## test_identity
```python
from test_core import test_identity
```



---
## test_power
```python
from test_core import test_power
```



---
## test_power_with_broadcasting
```python
from test_core import test_power_with_broadcasting
```



---
## test_where
```python
from test_core import test_where
```



---
## test_where_object
```python
from test_core import test_where_object
```



---
## test_where_with_masked_choice
```python
from test_core import test_where_with_masked_choice
```



---
## test_where_with_masked_condition
```python
from test_core import test_where_with_masked_condition
```



---
## test_where_type
```python
from test_core import test_where_type
```



---
## test_where_broadcast
```python
from test_core import test_where_broadcast
```



---
## test_where_structured
```python
from test_core import test_where_structured
```



---
## test_where_structured_masked
```python
from test_core import test_where_structured_masked
```



---
## test_masked_invalid_error
```python
from test_core import test_masked_invalid_error
```



---
## test_masked_invalid_pandas
```python
from test_core import test_masked_invalid_pandas
```



---
## test_masked_invalid_full_mask
```python
from test_core import test_masked_invalid_full_mask
```



---
## test_choose
```python
from test_core import test_choose
```



---
## test_choose_with_out
```python
from test_core import test_choose_with_out
```



---
## test_make_mask_descr
```python
from test_core import test_make_mask_descr
```



---
## test_make_mask
```python
from test_core import test_make_mask
```



---
## test_mask_or
```python
from test_core import test_mask_or
```



---
## test_flatten_mask
```python
from test_core import test_flatten_mask
```



---
## test_on_ndarray
```python
from test_core import test_on_ndarray
```



---
## test_convolve
```python
from test_core import test_convolve
```



---
## test_set_records_masks
```python
from test_core import test_set_records_masks
```



---
## test_set_record_element
```python
from test_core import test_set_record_element
```



---
## test_set_record_slice
```python
from test_core import test_set_record_slice
```



---
## test_mask_element
```python
from test_core import test_mask_element
```

Check record access

---
## test_getmaskarray
```python
from test_core import test_getmaskarray
```



---
## test_view
```python
from test_core import test_view
```



---
## test_getitem
```python
from test_core import test_getitem
```



---
## test_setitem
```python
from test_core import test_setitem
```



---
## test_setitem_scalar
```python
from test_core import test_setitem_scalar
```



---
## test_element_len
```python
from test_core import test_element_len
```



---
## test_nested_ma
```python
from test_core import test_nested_ma
```



---
## test_view_to_nothing
```python
from test_core import test_view_to_nothing
```



---
## test_view_to_type
```python
from test_core import test_view_to_type
```



---
## test_view_to_simple_dtype
```python
from test_core import test_view_to_simple_dtype
```



---
## test_view_to_flexible_dtype
```python
from test_core import test_view_to_flexible_dtype
```



---
## test_view_to_subdtype
```python
from test_core import test_view_to_subdtype
```



---
## test_view_to_dtype_and_type
```python
from test_core import test_view_to_dtype_and_type
```



---
## test_ndarrayfuncs
```python
from test_core import test_ndarrayfuncs
```



---
## test_count
```python
from test_core import test_count
```



---
## _do_add_test
```python
from test_core import _do_add_test
```



---
## test_ufunc
```python
from test_core import test_ufunc
```



---
## test_operator
```python
from test_core import test_operator
```



---
## test_ctor
```python
from test_core import test_ctor
```



---
## test_pickle
```python
from test_core import test_pickle
```



---
## test__copy
```python
from test_core import test__copy
```



---
## test_immutable
```python
from test_core import test_immutable
```



---
## test_coercion_int
```python
from test_core import test_coercion_int
```



---
## test_coercion_float
```python
from test_core import test_coercion_float
```



---
## test_coercion_unicode
```python
from test_core import test_coercion_unicode
```



---
## test_coercion_bytes
```python
from test_core import test_coercion_bytes
```



---
## test_subclass
```python
from test_core import test_subclass
```



---
## test_attributes_readonly
```python
from test_core import test_attributes_readonly
```



---
## test_masked_values
```python
from test_core import test_masked_values
```



---
## method
```python
from test_core import method
```

This docstring

Has multiple lines

And notes

Notes
-----
original note

---
## NotBool
```python
from test_core import NotBool
```



---
## assign
```python
from test_core import assign
```



---
## MyClass
```python
from test_core import MyClass
```



---
## MyClass2
```python
from test_core import MyClass2
```



---
## Series
```python
from test_core import Series
```



---
## A
```python
from test_core import A
```



---
## M
```python
from test_core import M
```



---
## _test_index
```python
from test_core import _test_index
```



---
## testaxis
```python
from test_core import testaxis
```



---
## testkeepdims
```python
from test_core import testkeepdims
```



---
## Sub
```python
from test_core import Sub
```



---
## __bool__
```python
from test_core import __bool__
```



---
## __mul__
```python
from test_core import __mul__
```



---
## __rmul__
```python
from test_core import __rmul__
```



---
## __rdiv__
```python
from test_core import __rdiv__
```



---
## __array__
```python
from test_core import __array__
```



---
## compressed
```python
from test_core import compressed
```



---
## TestArgsort
```python
from test_deprecations import TestArgsort
```

gh-8701 

---
## TestMinimumMaximum
```python
from test_deprecations import TestMinimumMaximum
```



---
## TestFromtextfile
```python
from test_deprecations import TestFromtextfile
```



---
## _test_base
```python
from test_deprecations import _test_base
```



---
## test_function_ndarray
```python
from test_deprecations import test_function_ndarray
```



---
## test_function_maskedarray
```python
from test_deprecations import test_function_maskedarray
```



---
## test_method
```python
from test_deprecations import test_method
```



---
## test_axis_default
```python
from test_deprecations import test_axis_default
```



---
## test_fromtextfile_delimitor
```python
from test_deprecations import test_fromtextfile_delimitor
```



---
## __name__
```python
from test_subclassing import __name__
```

Tests suite for MaskedArray & subclassing.

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_subclassing.py 3473 2007-10-29 15:18:13Z jarrod.millman $

---
## assert_startswith
```python
from test_subclassing import assert_startswith
```



---
## SubArray
```python
from test_subclassing import SubArray
```



---
## SubMaskedArray
```python
from test_subclassing import SubMaskedArray
```

Pure subclass of MaskedArray, keeping some info on subclass.

---
## MSubArray
```python
from test_subclassing import MSubArray
```



---
## CSAIterator
```python
from test_subclassing import CSAIterator
```

Flat iterator object that uses its own setter/getter
(works around ndarray.flat not propagating subclass setters/getters
see https://github.com/numpy/numpy/issues/4564)
roughly following MaskedIterator

---
## ComplicatedSubArray
```python
from test_subclassing import ComplicatedSubArray
```



---
## WrappedArray
```python
from test_subclassing import WrappedArray
```

Wrapping a MaskedArray rather than subclassing to test that
ufunc deferrals are commutative.
See: https://github.com/numpy/numpy/issues/15200)

---
## TestSubclassing
```python
from test_subclassing import TestSubclassing
```



---
## ArrayNoInheritance
```python
from test_subclassing import ArrayNoInheritance
```

Quantity-like class that does not inherit from ndarray

---
## test_array_no_inheritance
```python
from test_subclassing import test_array_no_inheritance
```



---
## TestClassWrapping
```python
from test_subclassing import TestClassWrapping
```



---
## __new__
```python
from test_subclassing import __new__
```



---
## __array_finalize__
```python
from test_subclassing import __array_finalize__
```



---
## __add__
```python
from test_subclassing import __add__
```



---
## __iadd__
```python
from test_subclassing import __iadd__
```



---
## _series
```python
from test_subclassing import _series
```



---
## __init__
```python
from test_subclassing import __init__
```



---
## __iter__
```python
from test_subclassing import __iter__
```



---
## __getitem__
```python
from test_subclassing import __getitem__
```



---
## __setitem__
```python
from test_subclassing import __setitem__
```



---
## __next__
```python
from test_subclassing import __next__
```



---
## __str__
```python
from test_subclassing import __str__
```



---
## __repr__
```python
from test_subclassing import __repr__
```



---
## _validate_input
```python
from test_subclassing import _validate_input
```



---
## flat
```python
from test_subclassing import flat
```



---
## __array_wrap__
```python
from test_subclassing import __array_wrap__
```



---
## __array__
```python
from test_subclassing import __array__
```



---
## __array_ufunc__
```python
from test_subclassing import __array_ufunc__
```



---
## setup_method
```python
from test_subclassing import setup_method
```



---
## test_data_subclassing
```python
from test_subclassing import test_data_subclassing
```



---
## test_maskedarray_subclassing
```python
from test_subclassing import test_maskedarray_subclassing
```



---
## test_masked_unary_operations
```python
from test_subclassing import test_masked_unary_operations
```



---
## test_masked_binary_operations
```python
from test_subclassing import test_masked_binary_operations
```



---
## test_masked_binary_operations2
```python
from test_subclassing import test_masked_binary_operations2
```



---
## test_attributepropagation
```python
from test_subclassing import test_attributepropagation
```



---
## test_subclasspreservation
```python
from test_subclassing import test_subclasspreservation
```



---
## test_subclass_items
```python
from test_subclassing import test_subclass_items
```

test that getter and setter go via baseclass

---
## test_subclass_nomask_items
```python
from test_subclassing import test_subclass_nomask_items
```



---
## test_subclass_repr
```python
from test_subclassing import test_subclass_repr
```

test that repr uses the name of the subclass
and 'array' for np.ndarray

---
## test_subclass_str
```python
from test_subclassing import test_subclass_str
```

test str with subclass that has overridden str, setitem

---
## test_pure_subclass_info_preservation
```python
from test_subclassing import test_pure_subclass_info_preservation
```



---
## __getattr__
```python
from test_subclassing import __getattr__
```



---
## test_mixins_have_slots
```python
from test_subclassing import test_mixins_have_slots
```



---
## __name__
```python
from test_extras import __name__
```

Tests suite for MaskedArray.
Adapted from the original test_ma by Pierre Gerard-Marchant

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $

---
## TestGeneric
```python
from test_extras import TestGeneric
```



---
## TestAverage
```python
from test_extras import TestAverage
```



---
## TestConcatenator
```python
from test_extras import TestConcatenator
```



---
## TestNotMasked
```python
from test_extras import TestNotMasked
```



---
## TestCompressFunctions
```python
from test_extras import TestCompressFunctions
```



---
## TestApplyAlongAxis
```python
from test_extras import TestApplyAlongAxis
```



---
## TestApplyOverAxes
```python
from test_extras import TestApplyOverAxes
```



---
## TestMedian
```python
from test_extras import TestMedian
```



---
## TestCov
```python
from test_extras import TestCov
```



---
## TestCorrcoef
```python
from test_extras import TestCorrcoef
```



---
## TestPolynomial
```python
from test_extras import TestPolynomial
```



---
## TestArraySetOps
```python
from test_extras import TestArraySetOps
```



---
## TestShapeBase
```python
from test_extras import TestShapeBase
```



---
## TestNDEnumerate
```python
from test_extras import TestNDEnumerate
```



---
## TestStack
```python
from test_extras import TestStack
```



---
## test_masked_all
```python
from test_extras import test_masked_all
```



---
## test_masked_all_with_object_nested
```python
from test_extras import test_masked_all_with_object_nested
```



---
## test_masked_all_with_object
```python
from test_extras import test_masked_all_with_object
```



---
## test_masked_all_like
```python
from test_extras import test_masked_all_like
```



---
## check_clump
```python
from test_extras import check_clump
```



---
## test_clump_masked
```python
from test_extras import test_clump_masked
```



---
## test_clump_unmasked
```python
from test_extras import test_clump_unmasked
```



---
## test_flatnotmasked_contiguous
```python
from test_extras import test_flatnotmasked_contiguous
```



---
## test_testAverage1
```python
from test_extras import test_testAverage1
```



---
## test_testAverage2
```python
from test_extras import test_testAverage2
```



---
## test_testAverage3
```python
from test_extras import test_testAverage3
```



---
## test_testAverage4
```python
from test_extras import test_testAverage4
```



---
## test_onintegers_with_mask
```python
from test_extras import test_onintegers_with_mask
```



---
## test_complex
```python
from test_extras import test_complex
```



---
## test_basic_keepdims
```python
from test_extras import test_basic_keepdims
```



---
## test_masked_weights
```python
from test_extras import test_masked_weights
```



---
## test_1d
```python
from test_extras import test_1d
```



---
## test_2d
```python
from test_extras import test_2d
```



---
## test_masked_constant
```python
from test_extras import test_masked_constant
```



---
## test_edges
```python
from test_extras import test_edges
```



---
## test_contiguous
```python
from test_extras import test_contiguous
```



---
## test_compress_nd
```python
from test_extras import test_compress_nd
```



---
## test_compress_rowcols
```python
from test_extras import test_compress_rowcols
```



---
## test_mask_rowcols
```python
from test_extras import test_mask_rowcols
```



---
## test_mask_row_cols_axis_deprecation
```python
from test_extras import test_mask_row_cols_axis_deprecation
```



---
## test_dot
```python
from test_extras import test_dot
```



---
## test_dot_returns_maskedarray
```python
from test_extras import test_dot_returns_maskedarray
```



---
## test_dot_out
```python
from test_extras import test_dot_out
```



---
## test_3d
```python
from test_extras import test_3d
```



---
## test_3d_kwargs
```python
from test_extras import test_3d_kwargs
```



---
## test_basic
```python
from test_extras import test_basic
```



---
## test_pytype
```python
from test_extras import test_pytype
```



---
## test_inf
```python
from test_extras import test_inf
```



---
## test_non_masked
```python
from test_extras import test_non_masked
```



---
## test_docstring_examples
```python
from test_extras import test_docstring_examples
```

test the examples given in the docstring of ma.median

---
## test_axis_argument_errors
```python
from test_extras import test_axis_argument_errors
```



---
## test_masked_0d
```python
from test_extras import test_masked_0d
```



---
## test_masked_1d
```python
from test_extras import test_masked_1d
```



---
## test_1d_shape_consistency
```python
from test_extras import test_1d_shape_consistency
```



---
## test_2d_waxis
```python
from test_extras import test_2d_waxis
```



---
## test_neg_axis
```python
from test_extras import test_neg_axis
```



---
## test_out_1d
```python
from test_extras import test_out_1d
```



---
## test_out
```python
from test_extras import test_out
```



---
## test_keepdims_out
```python
from test_extras import test_keepdims_out
```



---
## test_single_non_masked_value_on_axis
```python
from test_extras import test_single_non_masked_value_on_axis
```



---
## test_nan
```python
from test_extras import test_nan
```



---
## test_out_nan
```python
from test_extras import test_out_nan
```



---
## test_nan_behavior
```python
from test_extras import test_nan_behavior
```



---
## test_ambigous_fill
```python
from test_extras import test_ambigous_fill
```



---
## test_special
```python
from test_extras import test_special
```



---
## test_empty
```python
from test_extras import test_empty
```



---
## test_object
```python
from test_extras import test_object
```



---
## setup_method
```python
from test_extras import setup_method
```



---
## test_1d_without_missing
```python
from test_extras import test_1d_without_missing
```



---
## test_2d_without_missing
```python
from test_extras import test_2d_without_missing
```



---
## test_1d_with_missing
```python
from test_extras import test_1d_with_missing
```



---
## test_2d_with_missing
```python
from test_extras import test_2d_with_missing
```



---
## test_ddof
```python
from test_extras import test_ddof
```



---
## test_bias
```python
from test_extras import test_bias
```



---
## test_polyfit
```python
from test_extras import test_polyfit
```



---
## test_polyfit_with_masked_NaNs
```python
from test_extras import test_polyfit_with_masked_NaNs
```



---
## test_unique_onlist
```python
from test_extras import test_unique_onlist
```



---
## test_unique_onmaskedarray
```python
from test_extras import test_unique_onmaskedarray
```



---
## test_unique_allmasked
```python
from test_extras import test_unique_allmasked
```



---
## test_ediff1d
```python
from test_extras import test_ediff1d
```



---
## test_ediff1d_tobegin
```python
from test_extras import test_ediff1d_tobegin
```



---
## test_ediff1d_toend
```python
from test_extras import test_ediff1d_toend
```



---
## test_ediff1d_tobegin_toend
```python
from test_extras import test_ediff1d_tobegin_toend
```



---
## test_ediff1d_ndarray
```python
from test_extras import test_ediff1d_ndarray
```



---
## test_intersect1d
```python
from test_extras import test_intersect1d
```



---
## test_setxor1d
```python
from test_extras import test_setxor1d
```



---
## test_isin
```python
from test_extras import test_isin
```



---
## test_in1d
```python
from test_extras import test_in1d
```



---
## test_in1d_invert
```python
from test_extras import test_in1d_invert
```



---
## test_union1d
```python
from test_extras import test_union1d
```



---
## test_setdiff1d
```python
from test_extras import test_setdiff1d
```



---
## test_setdiff1d_char_array
```python
from test_extras import test_setdiff1d_char_array
```



---
## test_atleast_2d
```python
from test_extras import test_atleast_2d
```



---
## test_shape_scalar
```python
from test_extras import test_shape_scalar
```



---
## test_ndenumerate_nomasked
```python
from test_extras import test_ndenumerate_nomasked
```



---
## test_ndenumerate_allmasked
```python
from test_extras import test_ndenumerate_allmasked
```



---
## test_ndenumerate_mixedmasked
```python
from test_extras import test_ndenumerate_mixedmasked
```



---
## test_stack_1d
```python
from test_extras import test_stack_1d
```



---
## test_stack_masks
```python
from test_extras import test_stack_masks
```



---
## test_stack_nd
```python
from test_extras import test_stack_nd
```



---
## myfunc
```python
from test_extras import myfunc
```



---
## __name__
```python
from test_mrecords import __name__
```

Tests suite for mrecords.

:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu

---
## TestMRecords
```python
from test_mrecords import TestMRecords
```



---
## TestView
```python
from test_mrecords import TestView
```



---
## TestMRecordsImport
```python
from test_mrecords import TestMRecordsImport
```



---
## test_record_array_with_object_field
```python
from test_mrecords import test_record_array_with_object_field
```



---
## test_byview
```python
from test_mrecords import test_byview
```



---
## test_get
```python
from test_mrecords import test_get
```



---
## test_set_fields
```python
from test_mrecords import test_set_fields
```



---
## test_set_fields_mask
```python
from test_mrecords import test_set_fields_mask
```



---
## test_set_mask
```python
from test_mrecords import test_set_mask
```



---
## test_set_mask_fromarray
```python
from test_mrecords import test_set_mask_fromarray
```



---
## test_set_mask_fromfields
```python
from test_mrecords import test_set_mask_fromfields
```



---
## test_set_elements
```python
from test_mrecords import test_set_elements
```



---
## test_setslices_hardmask
```python
from test_mrecords import test_setslices_hardmask
```



---
## test_hardmask
```python
from test_mrecords import test_hardmask
```



---
## test_pickling
```python
from test_mrecords import test_pickling
```



---
## test_filled
```python
from test_mrecords import test_filled
```



---
## test_tolist
```python
from test_mrecords import test_tolist
```



---
## test_withnames
```python
from test_mrecords import test_withnames
```



---
## test_exotic_formats
```python
from test_mrecords import test_exotic_formats
```



---
## setup_method
```python
from test_mrecords import setup_method
```



---
## test_view_by_itself
```python
from test_mrecords import test_view_by_itself
```



---
## test_view_simple_dtype
```python
from test_mrecords import test_view_simple_dtype
```



---
## test_view_flexible_type
```python
from test_mrecords import test_view_flexible_type
```



---
## test_fromarrays
```python
from test_mrecords import test_fromarrays
```



---
## test_fromrecords
```python
from test_mrecords import test_fromrecords
```



---
## test_fromrecords_wmask
```python
from test_mrecords import test_fromrecords_wmask
```



---
## test_fromtextfile
```python
from test_mrecords import test_fromtextfile
```



---
## test_addfield
```python
from test_mrecords import test_addfield
```



---
## test_masked_array_create
```python
from test_regression import test_masked_array_create
```



---
## test_masked_array
```python
from test_regression import test_masked_array
```



---
## test_mem_masked_where
```python
from test_regression import test_mem_masked_where
```



---
## test_masked_array_multiply
```python
from test_regression import test_masked_array_multiply
```



---
## test_masked_array_repeat
```python
from test_regression import test_masked_array_repeat
```



---
## test_masked_array_repr_unicode
```python
from test_regression import test_masked_array_repr_unicode
```



---
## test_atleast_2d
```python
from test_regression import test_atleast_2d
```



---
## test_set_fill_value_unicode_py3
```python
from test_regression import test_set_fill_value_unicode_py3
```



---
## test_var_sets_maskedarray_scalar
```python
from test_regression import test_var_sets_maskedarray_scalar
```



---
## test_ddof_corrcoef
```python
from test_regression import test_ddof_corrcoef
```



---
## test_mask_not_backmangled
```python
from test_regression import test_mask_not_backmangled
```



---
## test_empty_list_on_structured
```python
from test_regression import test_empty_list_on_structured
```



---
## test_masked_array_tobytes_fortran
```python
from test_regression import test_masked_array_tobytes_fortran
```



---
## test_structured_array
```python
from test_regression import test_structured_array
```



---
## __name__
```python
from test_indexing_functions import __name__
```



---
## test_take_function
```python
from test_indexing_functions import test_take_function
```

Indices respect relative order of a descending stable-sort

See https://github.com/numpy/numpy/issues/20778

---
## __name__
```python
from test_set_functions import __name__
```



---
## test_inverse_indices_shape
```python
from test_set_functions import test_inverse_indices_shape
```

Inverse indices share shape of input array

See https://github.com/numpy/numpy/issues/20638

---
## __name__
```python
from test_array_object import __name__
```



---
## test_validate_index
```python
from test_array_object import test_validate_index
```



---
## test_operators
```python
from test_array_object import test_operators
```



---
## test_python_scalar_construtors
```python
from test_array_object import test_python_scalar_construtors
```



---
## test_device_property
```python
from test_array_object import test_device_property
```



---
## test_array_properties
```python
from test_array_object import test_array_properties
```



---
## test___array__
```python
from test_array_object import test___array__
```



---
## test_allow_newaxis
```python
from test_array_object import test_allow_newaxis
```



---
## test_disallow_flat_indexing_with_newaxis
```python
from test_array_object import test_disallow_flat_indexing_with_newaxis
```



---
## test_disallow_mask_with_newaxis
```python
from test_array_object import test_disallow_mask_with_newaxis
```



---
## test_error_on_invalid_index
```python
from test_array_object import test_error_on_invalid_index
```



---
## test_mask_0d_array_without_errors
```python
from test_array_object import test_mask_0d_array_without_errors
```



---
## test_error_on_invalid_index_with_ellipsis
```python
from test_array_object import test_error_on_invalid_index_with_ellipsis
```



---
## test_array_keys_use_private_array
```python
from test_array_object import test_array_keys_use_private_array
```

Indexing operations convert array keys before indexing the internal array

Fails when array_api array keys are not converted into NumPy-proper arrays
in __getitem__(). This is achieved by passing array_api arrays with 0-sized
dimensions, which NumPy-proper treats erroneously - not sure why!

TODO: Find and use appropriate __setitem__() case.

---
## _array_vals
```python
from test_array_object import _array_vals
```



---
## _matmul_array_vals
```python
from test_array_object import _matmul_array_vals
```



---
## __name__
```python
from test_validation import __name__
```



---
## p
```python
from test_validation import p
```



---
## test_raises_on_invalid_types
```python
from test_validation import test_raises_on_invalid_types
```

Function raises TypeError when passed invalidly-typed inputs

---
## __name__
```python
from test_data_type_functions import __name__
```



---
## test_can_cast
```python
from test_data_type_functions import test_can_cast
```

can_cast() returns correct result

---
## test_isdtype_strictness
```python
from test_data_type_functions import test_isdtype_strictness
```



---
## __name__
```python
from test_elementwise_functions import __name__
```



---
## nargs
```python
from test_elementwise_functions import nargs
```



---
## test_function_types
```python
from test_elementwise_functions import test_function_types
```



---
## test_bitwise_shift_error
```python
from test_elementwise_functions import test_bitwise_shift_error
```



---
## _array_vals
```python
from test_elementwise_functions import _array_vals
```



---
## __name__
```python
from test_manipulation_functions import __name__
```



---
## test_concat_errors
```python
from test_manipulation_functions import test_concat_errors
```



---
## test_stack_errors
```python
from test_manipulation_functions import test_stack_errors
```



---
## test_reshape_copy
```python
from test_manipulation_functions import test_reshape_copy
```



---
## __name__
```python
from test_sorting_functions import __name__
```



---
## test_stable_desc_argsort
```python
from test_sorting_functions import test_stable_desc_argsort
```

Indices respect relative order of a descending stable-sort

See https://github.com/numpy/numpy/issues/20778

---
## __name__
```python
from test_creation_functions import __name__
```



---
## test_asarray_errors
```python
from test_creation_functions import test_asarray_errors
```



---
## test_asarray_copy
```python
from test_creation_functions import test_asarray_copy
```



---
## test_arange_errors
```python
from test_creation_functions import test_arange_errors
```



---
## test_empty_errors
```python
from test_creation_functions import test_empty_errors
```



---
## test_empty_like_errors
```python
from test_creation_functions import test_empty_like_errors
```



---
## test_eye_errors
```python
from test_creation_functions import test_eye_errors
```



---
## test_full_errors
```python
from test_creation_functions import test_full_errors
```



---
## test_full_like_errors
```python
from test_creation_functions import test_full_like_errors
```



---
## test_linspace_errors
```python
from test_creation_functions import test_linspace_errors
```



---
## test_ones_errors
```python
from test_creation_functions import test_ones_errors
```



---
## test_ones_like_errors
```python
from test_creation_functions import test_ones_like_errors
```



---
## test_zeros_errors
```python
from test_creation_functions import test_zeros_errors
```



---
## test_zeros_like_errors
```python
from test_creation_functions import test_zeros_like_errors
```



---
## test_meshgrid_dtype_errors
```python
from test_creation_functions import test_meshgrid_dtype_errors
```



---
## __name__
```python
from test_isfile import __name__
```



---
## TestIsFile
```python
from test_isfile import TestIsFile
```



---
## test_isfile
```python
from test_isfile import test_isfile
```

Test if all ``.pyi`` files are properly installed.

---
## __name__
```python
from test_typing import __name__
```



---
## _key_func
```python
from test_typing import _key_func
```

Split at the first occurrence of the ``:`` character.

Windows drive-letters (*e.g.* ``C:``) are ignored herein.

---
## _strip_filename
```python
from test_typing import _strip_filename
```

Strip the filename and line number from a mypy message.

---
## strip_func
```python
from test_typing import strip_func
```

`re.sub` helper function for stripping module names.

---
## run_mypy
```python
from test_typing import run_mypy
```

Clears the cache and run mypy before running any of the typing tests.

The mypy results are cached in `OUTPUT_MYPY` for further use.

The cache refresh can be skipped using

NUMPY_TYPING_TEST_CLEAR_CACHE=0 pytest numpy/typing/tests

---
## get_test_cases
```python
from test_typing import get_test_cases
```



---
## test_success
```python
from test_typing import test_success
```



---
## test_fail
```python
from test_typing import test_fail
```



---
## _test_fail
```python
from test_typing import _test_fail
```



---
## test_reveal
```python
from test_typing import test_reveal
```

Validate that mypy correctly infers the return-types of
the expressions in `path`.

---
## test_code_runs
```python
from test_typing import test_code_runs
```

Validate that the code in `path` properly during runtime.

---
## test_extended_precision
```python
from test_typing import test_extended_precision
```



---
## __name__
```python
from test_runtime import __name__
```

Test the runtime usage of `numpy.typing`.

---
## TypeTup
```python
from test_runtime import TypeTup
```



---
## test_get_args
```python
from test_runtime import test_get_args
```

Test `typing.get_args`.

---
## test_get_origin
```python
from test_runtime import test_get_origin
```

Test `typing.get_origin`.

---
## test_get_type_hints
```python
from test_runtime import test_get_type_hints
```

Test `typing.get_type_hints`.

---
## test_get_type_hints_str
```python
from test_runtime import test_get_type_hints_str
```

Test `typing.get_type_hints` with string-representation of types.

---
## test_keys
```python
from test_runtime import test_keys
```

Test that ``TYPES.keys()`` and ``numpy.typing.__all__`` are synced.

---
## TestRuntimeProtocol
```python
from test_runtime import TestRuntimeProtocol
```



---
## func
```python
from test_runtime import func
```



---
## test_isinstance
```python
from test_runtime import test_isinstance
```



---
## test_issubclass
```python
from test_runtime import test_issubclass
```



---
## __name__
```python
from arithmetic import __name__
```



---
## Object
```python
from arithmetic import Object
```



---
## __array__
```python
from arithmetic import __array__
```



---
## __sub__
```python
from arithmetic import __sub__
```



---
## __rsub__
```python
from arithmetic import __rsub__
```



---
## __floordiv__
```python
from arithmetic import __floordiv__
```



---
## __rfloordiv__
```python
from arithmetic import __rfloordiv__
```



---
## __mul__
```python
from arithmetic import __mul__
```



---
## __rmul__
```python
from arithmetic import __rmul__
```



---
## __pow__
```python
from arithmetic import __pow__
```



---
## __rpow__
```python
from arithmetic import __rpow__
```



---
## __name__
```python
from ndarray_conversion import __name__
```



---
## __name__
```python
from literal import __name__
```



---
## __name__
```python
from comparisons import __name__
```



---
## __name__
```python
from array_constructors import __name__
```



---
## Index
```python
from array_constructors import Index
```



---
## SubClass
```python
from array_constructors import SubClass
```



---
## func
```python
from array_constructors import func
```



---
## __index__
```python
from array_constructors import __index__
```



---
## __name__
```python
from dtype import __name__
```



---
## Test
```python
from dtype import Test
```



---
## __name__
```python
from ndarray_misc import __name__
```

Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods.

More extensive tests are performed for the methods'
function-based counterpart in `../from_numeric.py`.

---
## SubClass
```python
from ndarray_misc import SubClass
```



---
## __name__
```python
from ndarray_shape_manipulation import __name__
```



---
## __name__
```python
from ufunc_config import __name__
```

Typing tests for `numpy.core._ufunc_config`.

---
## func1
```python
from ufunc_config import func1
```



---
## func2
```python
from ufunc_config import func2
```



---
## func3
```python
from ufunc_config import func3
```



---
## Write1
```python
from ufunc_config import Write1
```



---
## Write2
```python
from ufunc_config import Write2
```



---
## Write3
```python
from ufunc_config import Write3
```



---
## write
```python
from ufunc_config import write
```



---
## __name__
```python
from simple_py3 import __name__
```



---
## __name__
```python
from random import __name__
```



---
## __name__
```python
from warnings_and_errors import __name__
```



---
## SubClass
```python
from numeric import SubClass
```



---
## __name__
```python
from lib_utils import __name__
```



---
## func
```python
from lib_utils import func
```



---
## __name__
```python
from modules import __name__
```



---
## __name__
```python
from lib_version import __name__
```



---
## __name__
```python
from scalars import __name__
```



---
## D
```python
from scalars import D
```



---
## C
```python
from scalars import C
```



---
## B
```python
from scalars import B
```



---
## A
```python
from scalars import A
```



---
## __index__
```python
from scalars import __index__
```



---
## __complex__
```python
from scalars import __complex__
```



---
## __int__
```python
from scalars import __int__
```



---
## __float__
```python
from scalars import __float__
```



---
## __name__
```python
from array_like import __name__
```



---
## A
```python
from array_like import A
```



---
## __array__
```python
from array_like import __array__
```



---
## ndarray_func
```python
from simple import ndarray_func
```



---
## iterable_func
```python
from simple import iterable_func
```



---
## __name__
```python
from flatiter import __name__
```



---
## __name__
```python
from mod import __name__
```



---
## Object
```python
from ufunclike import Object
```



---
## __ceil__
```python
from ufunclike import __ceil__
```



---
## __floor__
```python
from ufunclike import __floor__
```



---
## __ge__
```python
from ufunclike import __ge__
```



---
## __array__
```python
from ufunclike import __array__
```



---
## __name__
```python
from bitwise_ops import __name__
```



---
## __name__
```python
from _backend import __name__
```



---
## Backend
```python
from _backend import Backend
```



---
## __init__
```python
from _backend import __init__
```



---
## compile
```python
from _backend import compile
```

Compile the wrapper.

---
## f2py_build_generator
```python
from __init__ import f2py_build_generator
```



---
## __name__
```python
from _distutils import __name__
```

Locations where we look for configs, install stuff, etc

---
## DistutilsBackend
```python
from _distutils import DistutilsBackend
```



---
## __init__
```python
from _distutils import __init__
```



---
## compile
```python
from _distutils import compile
```



---
## __name__
```python
from _meson import __name__
```



---
## MesonTemplate
```python
from _meson import MesonTemplate
```

Template meson build file generation class.

---
## MesonBackend
```python
from _meson import MesonBackend
```



---
## _prepare_sources
```python
from _meson import _prepare_sources
```



---
## __init__
```python
from _meson import __init__
```



---
## meson_build_template
```python
from _meson import meson_build_template
```



---
## initialize_template
```python
from _meson import initialize_template
```



---
## sources_substitution
```python
from _meson import sources_substitution
```



---
## deps_substitution
```python
from _meson import deps_substitution
```



---
## libraries_substitution
```python
from _meson import libraries_substitution
```



---
## include_substitution
```python
from _meson import include_substitution
```



---
## generate_meson_build
```python
from _meson import generate_meson_build
```



---
## _move_exec_to_root
```python
from _meson import _move_exec_to_root
```



---
## write_meson_build
```python
from _meson import write_meson_build
```

Writes the meson build file at specified location

---
## _run_subprocess_command
```python
from _meson import _run_subprocess_command
```



---
## run_meson
```python
from _meson import run_meson
```



---
## compile
```python
from _meson import compile
```



---
## __name__
```python
from test_character import __name__
```



---
## TestCharacterString
```python
from test_character import TestCharacterString
```



---
## TestCharacter
```python
from test_character import TestCharacter
```



---
## TestMiscCharacter
```python
from test_character import TestMiscCharacter
```



---
## TestStringScalarArr
```python
from test_character import TestStringScalarArr
```



---
## TestStringAssumedLength
```python
from test_character import TestStringAssumedLength
```



---
## TestStringOptionalInOut
```python
from test_character import TestStringOptionalInOut
```



---
## TestNewCharHandling
```python
from test_character import TestNewCharHandling
```



---
## TestBCCharHandling
```python
from test_character import TestBCCharHandling
```



---
## test_input
```python
from test_character import test_input
```



---
## test_output
```python
from test_character import test_output
```



---
## test_array_input
```python
from test_character import test_array_input
```



---
## test_array_output
```python
from test_character import test_array_output
```



---
## test_2d_array_input
```python
from test_character import test_2d_array_input
```



---
## test_input_varia
```python
from test_character import test_input_varia
```



---
## test_array_input_varia
```python
from test_character import test_array_input_varia
```



---
## test_input_output
```python
from test_character import test_input_output
```



---
## test_inout
```python
from test_character import test_inout
```



---
## test_inout_varia
```python
from test_character import test_inout_varia
```



---
## test_array_inout
```python
from test_character import test_array_inout
```



---
## test_2d_array_inout
```python
from test_character import test_2d_array_inout
```



---
## test_return
```python
from test_character import test_return
```



---
## test_array_return
```python
from test_character import test_array_return
```



---
## test_optional
```python
from test_character import test_optional
```



---
## test_gh18684
```python
from test_character import test_gh18684
```



---
## test_gh6308
```python
from test_character import test_gh6308
```



---
## test_gh4519
```python
from test_character import test_gh4519
```



---
## test_gh3425
```python
from test_character import test_gh3425
```



---
## test_character_bc
```python
from test_character import test_character_bc
```



---
## test_char
```python
from test_character import test_char
```



---
## test_char_arr
```python
from test_character import test_char_arr
```



---
## test_gh24008
```python
from test_character import test_gh24008
```



---
## test_gh24662
```python
from test_character import test_gh24662
```



---
## test_gh25286
```python
from test_character import test_gh25286
```



---
## __name__
```python
from test_mixed import __name__
```



---
## TestMixed
```python
from test_mixed import TestMixed
```



---
## test_all
```python
from test_mixed import test_all
```



---
## test_docstring
```python
from test_mixed import test_docstring
```



---
## __name__
```python
from test_return_logical import __name__
```



---
## TestReturnLogical
```python
from test_return_logical import TestReturnLogical
```



---
## TestFReturnLogical
```python
from test_return_logical import TestFReturnLogical
```



---
## check_function
```python
from test_return_logical import check_function
```



---
## test_all_f77
```python
from test_return_logical import test_all_f77
```



---
## test_all_f90
```python
from test_return_logical import test_all_f90
```



---
## __name__
```python
from test_assumed_shape import __name__
```



---
## TestAssumedShapeSumExample
```python
from test_assumed_shape import TestAssumedShapeSumExample
```



---
## TestF2cmapOption
```python
from test_assumed_shape import TestF2cmapOption
```



---
## test_all
```python
from test_assumed_shape import test_all
```



---
## setup_method
```python
from test_assumed_shape import setup_method
```



---
## teardown_method
```python
from test_assumed_shape import teardown_method
```



---
## __name__
```python
from test_common import __name__
```



---
## TestCommonBlock
```python
from test_common import TestCommonBlock
```



---
## TestCommonWithUse
```python
from test_common import TestCommonWithUse
```



---
## test_common_block
```python
from test_common import test_common_block
```



---
## test_common_gh19161
```python
from test_common import test_common_gh19161
```



---
## __name__
```python
from test_pyf_src import __name__
```



---
## normalize_whitespace
```python
from test_pyf_src import normalize_whitespace
```

Remove leading and trailing whitespace, and convert internal
stretches of whitespace to a single space.

---
## test_from_template
```python
from test_pyf_src import test_from_template
```

Regression test for gh-10712.

---
## __name__
```python
from test_kind import __name__
```



---
## TestKind
```python
from test_kind import TestKind
```



---
## test_int
```python
from test_kind import test_int
```

Test `int` kind_func for integers up to 10**40.

---
## test_real
```python
from test_kind import test_real
```

Test (processor-dependent) `real` kind_func for real numbers
of up to 31 digits precision (extended/quadruple).

---
## test_quad_precision
```python
from test_kind import test_quad_precision
```

Test kind_func for quadruple precision [`real(16)`] of 32+ digits .

---
## __name__
```python
from test_isoc import __name__
```



---
## TestISOC
```python
from test_isoc import TestISOC
```



---
## test_process_f2cmap_dict
```python
from test_isoc import test_process_f2cmap_dict
```



---
## test_c_double
```python
from test_isoc import test_c_double
```



---
## test_bindc_function
```python
from test_isoc import test_bindc_function
```



---
## test_bindc_kinds
```python
from test_isoc import test_bindc_kinds
```



---
## test_bindc_add_arr
```python
from test_isoc import test_bindc_add_arr
```



---
## __name__
```python
from test_array_from_pyobj import __name__
```



---
## setup_module
```python
from test_array_from_pyobj import setup_module
```

Build the required testing extension module

---
## flags_info
```python
from test_array_from_pyobj import flags_info
```



---
## flags2names
```python
from test_array_from_pyobj import flags2names
```



---
## Intent
```python
from test_array_from_pyobj import Intent
```



---
## Type
```python
from test_array_from_pyobj import Type
```



---
## Array
```python
from test_array_from_pyobj import Array
```



---
## TestIntent
```python
from test_array_from_pyobj import TestIntent
```



---
## TestSharedMemory
```python
from test_array_from_pyobj import TestSharedMemory
```



---
## __init__
```python
from test_array_from_pyobj import __init__
```



---
## __getattr__
```python
from test_array_from_pyobj import __getattr__
```



---
## __str__
```python
from test_array_from_pyobj import __str__
```



---
## __repr__
```python
from test_array_from_pyobj import __repr__
```



---
## is_intent
```python
from test_array_from_pyobj import is_intent
```



---
## is_intent_exact
```python
from test_array_from_pyobj import is_intent_exact
```



---
## __new__
```python
from test_array_from_pyobj import __new__
```



---
## _init
```python
from test_array_from_pyobj import _init
```



---
## cast_types
```python
from test_array_from_pyobj import cast_types
```



---
## all_types
```python
from test_array_from_pyobj import all_types
```



---
## smaller_types
```python
from test_array_from_pyobj import smaller_types
```



---
## equal_types
```python
from test_array_from_pyobj import equal_types
```



---
## larger_types
```python
from test_array_from_pyobj import larger_types
```



---
## arr_equal
```python
from test_array_from_pyobj import arr_equal
```



---
## has_shared_memory
```python
from test_array_from_pyobj import has_shared_memory
```

Check that created array shares data with input array.

---
## test_in_out
```python
from test_array_from_pyobj import test_in_out
```



---
## setup_type
```python
from test_array_from_pyobj import setup_type
```



---
## num2seq
```python
from test_array_from_pyobj import num2seq
```



---
## num23seq
```python
from test_array_from_pyobj import num23seq
```



---
## test_in_from_2seq
```python
from test_array_from_pyobj import test_in_from_2seq
```



---
## test_in_from_2casttype
```python
from test_array_from_pyobj import test_in_from_2casttype
```



---
## test_in_nocopy
```python
from test_array_from_pyobj import test_in_nocopy
```

Test if intent(in) array can be passed without copies

---
## test_inout_2seq
```python
from test_array_from_pyobj import test_inout_2seq
```



---
## test_f_inout_23seq
```python
from test_array_from_pyobj import test_f_inout_23seq
```



---
## test_c_inout_23seq
```python
from test_array_from_pyobj import test_c_inout_23seq
```



---
## test_in_copy_from_2casttype
```python
from test_array_from_pyobj import test_in_copy_from_2casttype
```



---
## test_c_in_from_23seq
```python
from test_array_from_pyobj import test_c_in_from_23seq
```



---
## test_in_from_23casttype
```python
from test_array_from_pyobj import test_in_from_23casttype
```



---
## test_f_in_from_23casttype
```python
from test_array_from_pyobj import test_f_in_from_23casttype
```



---
## test_c_in_from_23casttype
```python
from test_array_from_pyobj import test_c_in_from_23casttype
```



---
## test_f_copy_in_from_23casttype
```python
from test_array_from_pyobj import test_f_copy_in_from_23casttype
```



---
## test_c_copy_in_from_23casttype
```python
from test_array_from_pyobj import test_c_copy_in_from_23casttype
```



---
## test_in_cache_from_2casttype
```python
from test_array_from_pyobj import test_in_cache_from_2casttype
```



---
## test_in_cache_from_2casttype_failure
```python
from test_array_from_pyobj import test_in_cache_from_2casttype_failure
```



---
## test_cache_hidden
```python
from test_array_from_pyobj import test_cache_hidden
```



---
## test_hidden
```python
from test_array_from_pyobj import test_hidden
```



---
## test_optional_none
```python
from test_array_from_pyobj import test_optional_none
```



---
## test_optional_from_2seq
```python
from test_array_from_pyobj import test_optional_from_2seq
```



---
## test_optional_from_23seq
```python
from test_array_from_pyobj import test_optional_from_23seq
```



---
## test_inplace
```python
from test_array_from_pyobj import test_inplace
```



---
## test_inplace_from_casttype
```python
from test_array_from_pyobj import test_inplace_from_casttype
```



---
## __name__
```python
from test_return_real import __name__
```



---
## TestReturnReal
```python
from test_return_real import TestReturnReal
```



---
## TestCReturnReal
```python
from test_return_real import TestCReturnReal
```



---
## TestFReturnReal
```python
from test_return_real import TestFReturnReal
```



---
## check_function
```python
from test_return_real import check_function
```



---
## test_all
```python
from test_return_real import test_all
```



---
## test_all_f77
```python
from test_return_real import test_all_f77
```



---
## test_all_f90
```python
from test_return_real import test_all_f90
```



---
## __name__
```python
from test_symbolic import __name__
```



---
## TestSymbolic
```python
from test_symbolic import TestSymbolic
```



---
## test_eliminate_quotes
```python
from test_symbolic import test_eliminate_quotes
```



---
## test_sanity
```python
from test_symbolic import test_sanity
```



---
## test_tostring_fortran
```python
from test_symbolic import test_tostring_fortran
```



---
## test_tostring_c
```python
from test_symbolic import test_tostring_c
```



---
## test_operations
```python
from test_symbolic import test_operations
```



---
## test_substitute
```python
from test_symbolic import test_substitute
```



---
## test_fromstring
```python
from test_symbolic import test_fromstring
```



---
## test_traverse
```python
from test_symbolic import test_traverse
```



---
## test_linear_solve
```python
from test_symbolic import test_linear_solve
```



---
## test_as_numer_denom
```python
from test_symbolic import test_as_numer_denom
```



---
## test_polynomial_atoms
```python
from test_symbolic import test_polynomial_atoms
```



---
## worker
```python
from test_symbolic import worker
```



---
## replace_visit
```python
from test_symbolic import replace_visit
```



---
## collect_symbols
```python
from test_symbolic import collect_symbols
```



---
## collect_symbols2
```python
from test_symbolic import collect_symbols2
```



---
## collect_symbols3
```python
from test_symbolic import collect_symbols3
```



---
## _cleanup
```python
from util import _cleanup
```



---
## get_module_dir
```python
from util import get_module_dir
```



---
## get_temp_module_name
```python
from util import get_temp_module_name
```



---
## _memoize
```python
from util import _memoize
```



---
## build_module
```python
from util import build_module
```

Compile and import a f2py module, built from the given files.

---
## build_code
```python
from util import build_code
```

Compile and import Fortran code using f2py.

---
## _get_compiler_status
```python
from util import _get_compiler_status
```



---
## has_c_compiler
```python
from util import has_c_compiler
```



---
## has_f77_compiler
```python
from util import has_f77_compiler
```



---
## has_f90_compiler
```python
from util import has_f90_compiler
```



---
## build_module_distutils
```python
from util import build_module_distutils
```

Build a module via distutils and import it.

---
## F2PyTest
```python
from util import F2PyTest
```



---
## getpath
```python
from util import getpath
```



---
## switchdir
```python
from util import switchdir
```



---
## module_name
```python
from util import module_name
```



---
## setup_method
```python
from util import setup_method
```



---
## __name__
```python
from test_size import __name__
```



---
## TestSizeSumExample
```python
from test_size import TestSizeSumExample
```



---
## test_all
```python
from test_size import test_all
```



---
## test_transpose
```python
from test_size import test_transpose
```



---
## test_flatten
```python
from test_size import test_flatten
```



---
## __name__
```python
from test_callback import __name__
```



---
## TestF77Callback
```python
from test_callback import TestF77Callback
```



---
## TestF77CallbackPythonTLS
```python
from test_callback import TestF77CallbackPythonTLS
```

Callback tests using Python thread-local storage instead of
compiler-provided

---
## TestF90Callback
```python
from test_callback import TestF90Callback
```



---
## TestGH18335
```python
from test_callback import TestGH18335
```

The reproduction of the reported issue requires specific input that
extensions may break the issue conditions, so the reproducer is
implemented as a separate test class. Do not extend this test with
other tests!

---
## TestGH25211
```python
from test_callback import TestGH25211
```



---
## test_all
```python
from test_callback import test_all
```



---
## test_docstring
```python
from test_callback import test_docstring
```



---
## check_function
```python
from test_callback import check_function
```



---
## test_string_callback
```python
from test_callback import test_string_callback
```



---
## test_string_callback_array
```python
from test_callback import test_string_callback_array
```



---
## test_threadsafety
```python
from test_callback import test_threadsafety
```



---
## test_hidden_callback
```python
from test_callback import test_hidden_callback
```



---
## test_gh17797
```python
from test_callback import test_gh17797
```



---
## test_gh18335
```python
from test_callback import test_gh18335
```



---
## A
```python
from test_callback import A
```



---
## callback
```python
from test_callback import callback
```



---
## cb
```python
from test_callback import cb
```



---
## runner
```python
from test_callback import runner
```



---
## incr
```python
from test_callback import incr
```



---
## foo
```python
from test_callback import foo
```



---
## bar
```python
from test_callback import bar
```



---
## __call__
```python
from test_callback import __call__
```



---
## mth
```python
from test_callback import mth
```



---
## __name__
```python
from test_string import __name__
```

This module tests the functionality of StringArray and ArrowStringArray.
Tests for the str accessors are in pandas/tests/strings/test_string_array.py

---
## TestString
```python
from test_string import TestString
```



---
## TestDocStringArguments
```python
from test_string import TestDocStringArguments
```



---
## TestFixedString
```python
from test_string import TestFixedString
```



---
## test_char
```python
from test_string import test_char
```



---
## test_example
```python
from test_string import test_example
```



---
## _sint
```python
from test_string import _sint
```

Return the content of a string buffer as integer value.

For example:
  _sint('1234') -> 4321
  _sint('123A') -> 17321

---
## _get_input
```python
from test_string import _get_input
```



---
## test_intent_in
```python
from test_string import test_intent_in
```



---
## test_intent_inout
```python
from test_string import test_intent_inout
```



---
## get_docdir
```python
from test_docs import get_docdir
```



---
## _path
```python
from test_docs import _path
```



---
## TestDocAdvanced
```python
from test_docs import TestDocAdvanced
```



---
## test_asterisk1
```python
from test_docs import test_asterisk1
```



---
## test_asterisk2
```python
from test_docs import test_asterisk2
```



---
## test_ftype
```python
from test_docs import test_ftype
```



---
## __name__
```python
from test_module_doc import __name__
```



---
## TestModuleDocString
```python
from test_module_doc import TestModuleDocString
```



---
## test_module_docstring
```python
from test_module_doc import test_module_docstring
```



---
## __name__
```python
from test_quoted_character import __name__
```

See https://github.com/numpy/numpy/pull/10676.

---
## TestQuotedCharacter
```python
from test_quoted_character import TestQuotedCharacter
```



---
## test_quoted_character
```python
from test_quoted_character import test_quoted_character
```



---
## __name__
```python
from test_parameter import __name__
```



---
## TestParameters
```python
from test_parameter import TestParameters
```



---
## test_constant_real_single
```python
from test_parameter import test_constant_real_single
```



---
## test_constant_real_double
```python
from test_parameter import test_constant_real_double
```



---
## test_constant_compound_int
```python
from test_parameter import test_constant_compound_int
```



---
## test_constant_non_compound_int
```python
from test_parameter import test_constant_non_compound_int
```



---
## test_constant_integer_int
```python
from test_parameter import test_constant_integer_int
```



---
## test_constant_integer_long
```python
from test_parameter import test_constant_integer_long
```



---
## test_constant_both
```python
from test_parameter import test_constant_both
```



---
## test_constant_no
```python
from test_parameter import test_constant_no
```



---
## test_constant_sum
```python
from test_parameter import test_constant_sum
```



---
## __name__
```python
from test_abstract_interface import __name__
```



---
## TestAbstractInterface
```python
from test_abstract_interface import TestAbstractInterface
```



---
## test_abstract_interface
```python
from test_abstract_interface import test_abstract_interface
```



---
## test_parse_abstract_interface
```python
from test_abstract_interface import test_parse_abstract_interface
```



---
## __name__
```python
from test_f2cmap import __name__
```



---
## TestF2Cmap
```python
from test_f2cmap import TestF2Cmap
```



---
## test_long_long_map
```python
from test_f2cmap import test_long_long_map
```



---
## __name__
```python
from test_semicolon_split import __name__
```



---
## TestMultiline
```python
from test_semicolon_split import TestMultiline
```



---
## TestCallstatement
```python
from test_semicolon_split import TestCallstatement
```



---
## test_multiline
```python
from test_semicolon_split import test_multiline
```



---
## test_callstatement
```python
from test_semicolon_split import test_callstatement
```



---
## __name__
```python
from test_compile_function import __name__
```

See https://github.com/numpy/numpy/pull/11937.

---
## setup_module
```python
from test_compile_function import setup_module
```



---
## test_f2py_init_compile
```python
from test_compile_function import test_f2py_init_compile
```



---
## test_f2py_init_compile_failure
```python
from test_compile_function import test_f2py_init_compile_failure
```



---
## test_f2py_init_compile_bad_cmd
```python
from test_compile_function import test_f2py_init_compile_bad_cmd
```



---
## test_compile_from_strings
```python
from test_compile_function import test_compile_from_strings
```



---
## __name__
```python
from test_block_docstring import __name__
```



---
## TestBlockDocString
```python
from test_block_docstring import TestBlockDocString
```



---
## test_block_docstring
```python
from test_block_docstring import test_block_docstring
```



---
## __name__
```python
from test_return_integer import __name__
```



---
## TestReturnInteger
```python
from test_return_integer import TestReturnInteger
```



---
## TestFReturnInteger
```python
from test_return_integer import TestFReturnInteger
```



---
## check_function
```python
from test_return_integer import check_function
```



---
## test_all_f77
```python
from test_return_integer import test_all_f77
```



---
## test_all_f90
```python
from test_return_integer import test_all_f90
```



---
## __name__
```python
from test_return_character import __name__
```



---
## TestReturnCharacter
```python
from test_return_character import TestReturnCharacter
```



---
## TestFReturnCharacter
```python
from test_return_character import TestFReturnCharacter
```



---
## check_function
```python
from test_return_character import check_function
```



---
## test_all_f77
```python
from test_return_character import test_all_f77
```



---
## test_all_f90
```python
from test_return_character import test_all_f90
```



---
## __name__
```python
from test_data import __name__
```



---
## TestData
```python
from test_data import TestData
```



---
## TestDataF77
```python
from test_data import TestDataF77
```



---
## TestDataMultiplierF77
```python
from test_data import TestDataMultiplierF77
```



---
## TestDataWithCommentsF77
```python
from test_data import TestDataWithCommentsF77
```



---
## test_data_stmts
```python
from test_data import test_data_stmts
```



---
## test_crackedlines
```python
from test_data import test_crackedlines
```



---
## __name__
```python
from test_value_attrspec import __name__
```



---
## TestValueAttr
```python
from test_value_attrspec import TestValueAttr
```



---
## test_long_long_map
```python
from test_value_attrspec import test_long_long_map
```



---
## __name__
```python
from test_return_complex import __name__
```



---
## TestReturnComplex
```python
from test_return_complex import TestReturnComplex
```



---
## TestFReturnComplex
```python
from test_return_complex import TestFReturnComplex
```



---
## check_function
```python
from test_return_complex import check_function
```



---
## test_all_f77
```python
from test_return_complex import test_all_f77
```



---
## test_all_f90
```python
from test_return_complex import test_all_f90
```



---
## __name__
```python
from test_crackfortran import __name__
```



---
## TestNoSpace
```python
from test_crackfortran import TestNoSpace
```



---
## TestPublicPrivate
```python
from test_crackfortran import TestPublicPrivate
```



---
## TestModuleProcedure
```python
from test_crackfortran import TestModuleProcedure
```



---
## TestExternal
```python
from test_crackfortran import TestExternal
```



---
## TestCrackFortran
```python
from test_crackfortran import TestCrackFortran
```



---
## TestMarkinnerspaces
```python
from test_crackfortran import TestMarkinnerspaces
```



---
## TestDimSpec
```python
from test_crackfortran import TestDimSpec
```

This test suite tests various expressions that are used as dimension
specifications.

There exists two usage cases where analyzing dimensions
specifications are important.

In the first case, the size of output arrays must be defined based
on the inputs to a Fortran function. Because Fortran supports
arbitrary bases for indexing, for instance, `arr(lower:upper)`,
f2py has to evaluate an expression `upper - lower + 1` where
`lower` and `upper` are arbitrary expressions of input parameters.
The evaluation is performed in C, so f2py has to translate Fortran
expressions to valid C expressions (an alternative approach is
that a developer specifies the corresponding C expressions in a
.pyf file).

In the second case, when user provides an input array with a given
size but some hidden parameters used in dimensions specifications
need to be determined based on the input array size. This is a
harder problem because f2py has to solve the inverse problem: find
a parameter `p` such that `upper(p) - lower(p) + 1` equals to the
size of input array. In the case when this equation cannot be
solved (e.g. because the input array size is wrong), raise an
error before calling the Fortran function (that otherwise would
likely crash Python process when the size of input arrays is
wrong). f2py currently supports this case only when the equation
is linear with respect to unknown parameter.

---
## TestModuleDeclaration
```python
from test_crackfortran import TestModuleDeclaration
```



---
## TestEval
```python
from test_crackfortran import TestEval
```



---
## TestFortranReader
```python
from test_crackfortran import TestFortranReader
```



---
## TestUnicodeComment
```python
from test_crackfortran import TestUnicodeComment
```



---
## TestNameArgsPatternBacktracking
```python
from test_crackfortran import TestNameArgsPatternBacktracking
```



---
## TestFunctionReturn
```python
from test_crackfortran import TestFunctionReturn
```



---
## TestFortranGroupCounters
```python
from test_crackfortran import TestFortranGroupCounters
```



---
## TestF77CommonBlockReader
```python
from test_crackfortran import TestF77CommonBlockReader
```



---
## test_module
```python
from test_crackfortran import test_module
```



---
## test_defaultPrivate
```python
from test_crackfortran import test_defaultPrivate
```



---
## test_defaultPublic
```python
from test_crackfortran import test_defaultPublic
```



---
## test_access_type
```python
from test_crackfortran import test_access_type
```



---
## test_nowrap_private_proceedures
```python
from test_crackfortran import test_nowrap_private_proceedures
```



---
## test_moduleOperators
```python
from test_crackfortran import test_moduleOperators
```



---
## test_notPublicPrivate
```python
from test_crackfortran import test_notPublicPrivate
```



---
## test_external_as_statement
```python
from test_crackfortran import test_external_as_statement
```



---
## test_external_as_attribute
```python
from test_crackfortran import test_external_as_attribute
```



---
## test_gh2848
```python
from test_crackfortran import test_gh2848
```



---
## test_do_not_touch_normal_spaces
```python
from test_crackfortran import test_do_not_touch_normal_spaces
```



---
## test_one_relevant_space
```python
from test_crackfortran import test_one_relevant_space
```



---
## test_ignore_inner_quotes
```python
from test_crackfortran import test_ignore_inner_quotes
```



---
## test_multiple_relevant_spaces
```python
from test_crackfortran import test_multiple_relevant_spaces
```



---
## test_array_size
```python
from test_crackfortran import test_array_size
```



---
## test_inv_array_size
```python
from test_crackfortran import test_inv_array_size
```



---
## test_dependencies
```python
from test_crackfortran import test_dependencies
```



---
## test_eval_scalar
```python
from test_crackfortran import test_eval_scalar
```



---
## test_input_encoding
```python
from test_crackfortran import test_input_encoding
```



---
## test_encoding_comment
```python
from test_crackfortran import test_encoding_comment
```



---
## test_nameargspattern_backtracking
```python
from test_crackfortran import test_nameargspattern_backtracking
```

address ReDOS vulnerability:
https://github.com/numpy/numpy/issues/23338

---
## test_function_rettype
```python
from test_crackfortran import test_function_rettype
```



---
## test_end_if_comment
```python
from test_crackfortran import test_end_if_comment
```



---
## test_gh22648
```python
from test_crackfortran import test_gh22648
```



---
## incr
```python
from test_crackfortran import incr
```



---
## __name__
```python
from test_f2py2e import __name__
```



---
## get_io_paths
```python
from test_f2py2e import get_io_paths
```

Takes in a temporary file for testing and returns the expected output and input paths

Here expected output is essentially one of any of the possible generated
files.

..note::

     Since this does not actually run f2py, none of these are guaranteed to
     exist, and module names are typically incorrect

Parameters
----------
fname_inp : str
            The input filename
mname : str, optional
            The name of the module, untitled by default

Returns
-------
genp : NamedTuple PPaths
        The possible paths which are generated, not all of which exist

---
## hello_world_f90
```python
from test_f2py2e import hello_world_f90
```

Generates a single f90 file for testing

---
## gh23598_warn
```python
from test_f2py2e import gh23598_warn
```

F90 file for testing warnings in gh23598

---
## gh22819_cli
```python
from test_f2py2e import gh22819_cli
```

F90 file for testing disallowed CLI arguments in ghff819

---
## hello_world_f77
```python
from test_f2py2e import hello_world_f77
```

Generates a single f77 file for testing

---
## retreal_f77
```python
from test_f2py2e import retreal_f77
```

Generates a single f77 file for testing

---
## f2cmap_f90
```python
from test_f2py2e import f2cmap_f90
```

Generates a single f90 file for testing

---
## test_gh22819_cli
```python
from test_f2py2e import test_gh22819_cli
```

Check that module names are handled correctly
gh-22819
Essentially, the -m name cannot be used to import the module, so the module
named in the .pyf needs to be used instead

CLI :: -m and a .pyf file

---
## test_gh22819_many_pyf
```python
from test_f2py2e import test_gh22819_many_pyf
```

Only one .pyf file allowed
gh-22819
CLI :: .pyf files

---
## test_gh23598_warn
```python
from test_f2py2e import test_gh23598_warn
```



---
## test_gen_pyf
```python
from test_f2py2e import test_gen_pyf
```

Ensures that a signature file is generated via the CLI
CLI :: -h

---
## test_gen_pyf_stdout
```python
from test_f2py2e import test_gen_pyf_stdout
```

Ensures that a signature file can be dumped to stdout
CLI :: -h

---
## test_gen_pyf_no_overwrite
```python
from test_f2py2e import test_gen_pyf_no_overwrite
```

Ensures that the CLI refuses to overwrite signature files
CLI :: -h without --overwrite-signature

---
## test_untitled_cli
```python
from test_f2py2e import test_untitled_cli
```

Check that modules are named correctly

CLI :: defaults

---
## test_no_py312_distutils_fcompiler
```python
from test_f2py2e import test_no_py312_distutils_fcompiler
```

Check that no distutils imports are performed on 3.12
CLI :: --fcompiler --help-link --backend distutils

---
## test_f2py_skip
```python
from test_f2py2e import test_f2py_skip
```

Tests that functions can be skipped
CLI :: skip:

---
## test_f2py_only
```python
from test_f2py2e import test_f2py_only
```

Test that functions can be kept by only:
CLI :: only:

---
## test_file_processing_switch
```python
from test_f2py2e import test_file_processing_switch
```

Tests that it is possible to return to file processing mode
CLI :: :
BUG: numpy-gh #20520

---
## test_mod_gen_f77
```python
from test_f2py2e import test_mod_gen_f77
```

Checks the generation of files based on a module name
CLI :: -m

---
## test_mod_gen_gh25263
```python
from test_f2py2e import test_mod_gen_gh25263
```

Check that pyf files are correctly generated with module structure
CLI :: -m <name> -h pyf_file
BUG: numpy-gh #20520

---
## test_lower_cmod
```python
from test_f2py2e import test_lower_cmod
```

Lowers cases by flag or when -h is present

CLI :: --[no-]lower

---
## test_lower_sig
```python
from test_f2py2e import test_lower_sig
```

Lowers cases in signature files by flag or when -h is present

CLI :: --[no-]lower -h

---
## test_build_dir
```python
from test_f2py2e import test_build_dir
```

Ensures that the build directory can be specified

CLI :: --build-dir

---
## test_overwrite
```python
from test_f2py2e import test_overwrite
```

Ensures that the build directory can be specified

CLI :: --overwrite-signature

---
## test_latexdoc
```python
from test_f2py2e import test_latexdoc
```

Ensures that TeX documentation is written out

CLI :: --latex-doc

---
## test_nolatexdoc
```python
from test_f2py2e import test_nolatexdoc
```

Ensures that TeX documentation is written out

CLI :: --no-latex-doc

---
## test_shortlatex
```python
from test_f2py2e import test_shortlatex
```

Ensures that truncated documentation is written out

TODO: Test to ensure this has no effect without --latex-doc
CLI :: --latex-doc --short-latex

---
## test_restdoc
```python
from test_f2py2e import test_restdoc
```

Ensures that RsT documentation is written out

CLI :: --rest-doc

---
## test_norestexdoc
```python
from test_f2py2e import test_norestexdoc
```

Ensures that TeX documentation is written out

CLI :: --no-rest-doc

---
## test_debugcapi
```python
from test_f2py2e import test_debugcapi
```

Ensures that debugging wrappers are written

CLI :: --debug-capi

---
## test_debugcapi_bld
```python
from test_f2py2e import test_debugcapi_bld
```

Ensures that debugging wrappers work

CLI :: --debug-capi -c

---
## test_wrapfunc_def
```python
from test_f2py2e import test_wrapfunc_def
```

Ensures that fortran subroutine wrappers for F77 are included by default

CLI :: --[no]-wrap-functions

---
## test_nowrapfunc
```python
from test_f2py2e import test_nowrapfunc
```

Ensures that fortran subroutine wrappers for F77 can be disabled

CLI :: --no-wrap-functions

---
## test_inclheader
```python
from test_f2py2e import test_inclheader
```

Add to the include directories

CLI :: -include
TODO: Document this in the help string

---
## test_inclpath
```python
from test_f2py2e import test_inclpath
```

Add to the include directories

CLI :: --include-paths

---
## test_hlink
```python
from test_f2py2e import test_hlink
```

Add to the include directories

CLI :: --help-link

---
## test_f2cmap
```python
from test_f2py2e import test_f2cmap
```

Check that Fortran-to-Python KIND specs can be passed

CLI :: --f2cmap

---
## test_quiet
```python
from test_f2py2e import test_quiet
```

Reduce verbosity

CLI :: --quiet

---
## test_verbose
```python
from test_f2py2e import test_verbose
```

Increase verbosity

CLI :: --verbose

---
## test_version
```python
from test_f2py2e import test_version
```

Ensure version

CLI :: -v

---
## test_npdistop
```python
from test_f2py2e import test_npdistop
```

CLI :: -c

---
## test_npd_fcompiler
```python
from test_f2py2e import test_npd_fcompiler
```

CLI :: -c --fcompiler

---
## test_npd_compiler
```python
from test_f2py2e import test_npd_compiler
```

CLI :: -c --compiler

---
## test_npd_help_fcompiler
```python
from test_f2py2e import test_npd_help_fcompiler
```

CLI :: -c --help-fcompiler

---
## test_npd_f77exec
```python
from test_f2py2e import test_npd_f77exec
```

CLI :: -c --f77exec

---
## test_npd_f90exec
```python
from test_f2py2e import test_npd_f90exec
```

CLI :: -c --f90exec

---
## test_npd_f77flags
```python
from test_f2py2e import test_npd_f77flags
```

CLI :: -c --f77flags

---
## test_npd_f90flags
```python
from test_f2py2e import test_npd_f90flags
```

CLI :: -c --f90flags

---
## test_npd_opt
```python
from test_f2py2e import test_npd_opt
```

CLI :: -c --opt

---
## test_npd_arch
```python
from test_f2py2e import test_npd_arch
```

CLI :: -c --arch

---
## test_npd_noopt
```python
from test_f2py2e import test_npd_noopt
```

CLI :: -c --noopt

---
## test_npd_noarch
```python
from test_f2py2e import test_npd_noarch
```

CLI :: -c --noarch

---
## test_npd_debug
```python
from test_f2py2e import test_npd_debug
```

CLI :: -c --debug

---
## test_npd_link_auto
```python
from test_f2py2e import test_npd_link_auto
```

CLI :: -c --link-<resource>

---
## test_npd_lib
```python
from test_f2py2e import test_npd_lib
```

CLI :: -c -L/path/to/lib/ -l<libname>

---
## test_npd_define
```python
from test_f2py2e import test_npd_define
```

CLI :: -D<define>

---
## test_npd_undefine
```python
from test_f2py2e import test_npd_undefine
```

CLI :: -U<name>

---
## test_npd_incl
```python
from test_f2py2e import test_npd_incl
```

CLI :: -I/path/to/include/

---
## test_npd_linker
```python
from test_f2py2e import test_npd_linker
```

CLI :: <filename>.o <filename>.so <filename>.a

---
## TestIntentInOut
```python
from test_regression import TestIntentInOut
```



---
## TestNegativeBounds
```python
from test_regression import TestNegativeBounds
```



---
## TestNumpyVersionAttribute
```python
from test_regression import TestNumpyVersionAttribute
```



---
## test_include_path
```python
from test_regression import test_include_path
```



---
## TestModuleAndSubroutine
```python
from test_regression import TestModuleAndSubroutine
```



---
## test_inout
```python
from test_regression import test_inout
```



---
## test_negbound
```python
from test_regression import test_negbound
```



---
## test_numpy_version_attribute
```python
from test_regression import test_numpy_version_attribute
```



---
## test_gh25337
```python
from test_regression import test_gh25337
```



---
## ubound
```python
from test_regression import ubound
```



---
## _GenericTest
```python
from test_utils import _GenericTest
```



---
## TestArrayEqual
```python
from test_utils import TestArrayEqual
```



---
## TestBuildErrorMessage
```python
from test_utils import TestBuildErrorMessage
```



---
## TestEqual
```python
from test_utils import TestEqual
```



---
## TestArrayAlmostEqual
```python
from test_utils import TestArrayAlmostEqual
```



---
## TestAlmostEqual
```python
from test_utils import TestAlmostEqual
```



---
## TestApproxEqual
```python
from test_utils import TestApproxEqual
```



---
## TestArrayAssertLess
```python
from test_utils import TestArrayAssertLess
```



---
## TestWarns
```python
from test_utils import TestWarns
```



---
## TestAssertAllclose
```python
from test_utils import TestAssertAllclose
```



---
## TestArrayAlmostEqualNulp
```python
from test_utils import TestArrayAlmostEqualNulp
```



---
## TestULP
```python
from test_utils import TestULP
```



---
## TestStringEqual
```python
from test_utils import TestStringEqual
```



---
## assert_warn_len_equal
```python
from test_utils import assert_warn_len_equal
```



---
## test_warn_len_equal_call_scenarios
```python
from test_utils import test_warn_len_equal_call_scenarios
```



---
## _get_fresh_mod
```python
from test_utils import _get_fresh_mod
```



---
## test_clear_and_catch_warnings
```python
from test_utils import test_clear_and_catch_warnings
```



---
## test_suppress_warnings_module
```python
from test_utils import test_suppress_warnings_module
```



---
## test_suppress_warnings_type
```python
from test_utils import test_suppress_warnings_type
```



---
## test_suppress_warnings_decorate_no_record
```python
from test_utils import test_suppress_warnings_decorate_no_record
```



---
## test_suppress_warnings_record
```python
from test_utils import test_suppress_warnings_record
```



---
## test_suppress_warnings_forwarding
```python
from test_utils import test_suppress_warnings_forwarding
```



---
## test_tempdir
```python
from test_utils import test_tempdir
```



---
## test_temppath
```python
from test_utils import test_temppath
```



---
## my_cacw
```python
from test_utils import my_cacw
```



---
## test_clear_and_catch_warnings_inherit
```python
from test_utils import test_clear_and_catch_warnings_inherit
```



---
## TestAssertNoGcCycles
```python
from test_utils import TestAssertNoGcCycles
```

Test assert_no_gc_cycles 

---
## _test_equal
```python
from test_utils import _test_equal
```



---
## _test_not_equal
```python
from test_utils import _test_not_equal
```



---
## test_array_rank1_eq
```python
from test_utils import test_array_rank1_eq
```

Test two equal array of rank 1 are found equal.

---
## test_array_rank1_noteq
```python
from test_utils import test_array_rank1_noteq
```

Test two different array of rank 1 are found not equal.

---
## test_array_rank2_eq
```python
from test_utils import test_array_rank2_eq
```

Test two equal array of rank 2 are found equal.

---
## test_array_diffshape
```python
from test_utils import test_array_diffshape
```

Test two arrays with different shapes are found not equal.

---
## test_objarray
```python
from test_utils import test_objarray
```

Test object arrays.

---
## test_array_likes
```python
from test_utils import test_array_likes
```



---
## setup_method
```python
from test_utils import setup_method
```



---
## test_generic_rank1
```python
from test_utils import test_generic_rank1
```

Test rank 1 array for all dtypes.

---
## test_0_ndim_array
```python
from test_utils import test_0_ndim_array
```



---
## test_generic_rank3
```python
from test_utils import test_generic_rank3
```

Test rank 3 array for all dtypes.

---
## test_nan_array
```python
from test_utils import test_nan_array
```



---
## test_string_arrays
```python
from test_utils import test_string_arrays
```

Test two arrays with different shapes are found not equal.

---
## test_recarrays
```python
from test_utils import test_recarrays
```

Test record arrays.

---
## test_masked_nan_inf
```python
from test_utils import test_masked_nan_inf
```



---
## test_subclass_that_overrides_eq
```python
from test_utils import test_subclass_that_overrides_eq
```



---
## test_subclass_that_does_not_implement_npall
```python
from test_utils import test_subclass_that_does_not_implement_npall
```



---
## test_suppress_overflow_warnings
```python
from test_utils import test_suppress_overflow_warnings
```



---
## test_array_vs_scalar_is_equal
```python
from test_utils import test_array_vs_scalar_is_equal
```

Test comparing an array with a scalar when all values are equal.

---
## test_array_vs_scalar_not_equal
```python
from test_utils import test_array_vs_scalar_not_equal
```

Test comparing an array with a scalar when not all values equal.

---
## test_array_vs_scalar_strict
```python
from test_utils import test_array_vs_scalar_strict
```

Test comparing an array with a scalar with strict option.

---
## test_array_vs_array_strict
```python
from test_utils import test_array_vs_array_strict
```

Test comparing two arrays with strict option.

---
## test_array_vs_float_array_strict
```python
from test_utils import test_array_vs_float_array_strict
```

Test comparing two arrays with strict option.

---
## test_build_err_msg_defaults
```python
from test_utils import test_build_err_msg_defaults
```



---
## test_build_err_msg_no_verbose
```python
from test_utils import test_build_err_msg_no_verbose
```



---
## test_build_err_msg_custom_names
```python
from test_utils import test_build_err_msg_custom_names
```



---
## test_build_err_msg_custom_precision
```python
from test_utils import test_build_err_msg_custom_precision
```



---
## test_nan_items
```python
from test_utils import test_nan_items
```



---
## test_inf_items
```python
from test_utils import test_inf_items
```



---
## test_datetime
```python
from test_utils import test_datetime
```



---
## test_nat_items
```python
from test_utils import test_nat_items
```



---
## test_non_numeric
```python
from test_utils import test_non_numeric
```



---
## test_complex_item
```python
from test_utils import test_complex_item
```



---
## test_negative_zero
```python
from test_utils import test_negative_zero
```



---
## test_complex
```python
from test_utils import test_complex
```



---
## test_object
```python
from test_utils import test_object
```



---
## test_closeness
```python
from test_utils import test_closeness
```



---
## test_simple
```python
from test_utils import test_simple
```



---
## test_nan
```python
from test_utils import test_nan
```



---
## test_inf
```python
from test_utils import test_inf
```



---
## test_subclass
```python
from test_utils import test_subclass
```



---
## test_subclass_that_cannot_be_bool
```python
from test_utils import test_subclass_that_cannot_be_bool
```



---
## test_nan_item
```python
from test_utils import test_nan_item
```



---
## test_inf_item
```python
from test_utils import test_inf_item
```



---
## test_simple_item
```python
from test_utils import test_simple_item
```



---
## test_error_message
```python
from test_utils import test_error_message
```

Check the message is formatted correctly for the decimal value.
Also check the message when input includes inf or nan (gh12200)

---
## test_error_message_2
```python
from test_utils import test_error_message_2
```

Check the message is formatted correctly when either x or y is a scalar.

---
## test_simple_0d_arrays
```python
from test_utils import test_simple_0d_arrays
```



---
## test_simple_items
```python
from test_utils import test_simple_items
```



---
## test_simple_arrays
```python
from test_utils import test_simple_arrays
```



---
## test_rank2
```python
from test_utils import test_rank2
```



---
## test_rank3
```python
from test_utils import test_rank3
```



---
## test_nan_noncompare
```python
from test_utils import test_nan_noncompare
```



---
## test_nan_noncompare_array
```python
from test_utils import test_nan_noncompare_array
```



---
## test_inf_compare
```python
from test_utils import test_inf_compare
```



---
## test_inf_compare_array
```python
from test_utils import test_inf_compare_array
```



---
## test_warn
```python
from test_utils import test_warn
```



---
## test_context_manager
```python
from test_utils import test_context_manager
```



---
## test_warn_wrong_warning
```python
from test_utils import test_warn_wrong_warning
```



---
## test_min_int
```python
from test_utils import test_min_int
```



---
## test_report_fail_percentage
```python
from test_utils import test_report_fail_percentage
```



---
## test_equal_nan
```python
from test_utils import test_equal_nan
```



---
## test_not_equal_nan
```python
from test_utils import test_not_equal_nan
```



---
## test_equal_nan_default
```python
from test_utils import test_equal_nan_default
```



---
## test_report_max_relative_error
```python
from test_utils import test_report_max_relative_error
```



---
## test_timedelta
```python
from test_utils import test_timedelta
```



---
## test_error_message_unsigned
```python
from test_utils import test_error_message_unsigned
```

Check the the message is formatted correctly when overflow can occur
(gh21768)

---
## test_float64_pass
```python
from test_utils import test_float64_pass
```



---
## test_float64_fail
```python
from test_utils import test_float64_fail
```



---
## test_float64_ignore_nan
```python
from test_utils import test_float64_ignore_nan
```



---
## test_float32_pass
```python
from test_utils import test_float32_pass
```



---
## test_float32_fail
```python
from test_utils import test_float32_fail
```



---
## test_float32_ignore_nan
```python
from test_utils import test_float32_ignore_nan
```



---
## test_float16_pass
```python
from test_utils import test_float16_pass
```



---
## test_float16_fail
```python
from test_utils import test_float16_fail
```



---
## test_float16_ignore_nan
```python
from test_utils import test_float16_ignore_nan
```



---
## test_complex128_pass
```python
from test_utils import test_complex128_pass
```



---
## test_complex128_fail
```python
from test_utils import test_complex128_fail
```



---
## test_complex64_pass
```python
from test_utils import test_complex64_pass
```



---
## test_complex64_fail
```python
from test_utils import test_complex64_fail
```



---
## test_equal
```python
from test_utils import test_equal
```



---
## test_single
```python
from test_utils import test_single
```



---
## test_double
```python
from test_utils import test_double
```



---
## test_regex
```python
from test_utils import test_regex
```



---
## mod
```python
from test_utils import mod
```



---
## warn_other_module
```python
from test_utils import warn_other_module
```



---
## warn
```python
from test_utils import warn
```



---
## test_passes
```python
from test_utils import test_passes
```



---
## test_asserts
```python
from test_utils import test_asserts
```



---
## test_fails
```python
from test_utils import test_fails
```

Test that in cases where the garbage cannot be collected, we raise an
error, instead of hanging forever trying to clear it.

---
## foo
```python
from test_utils import foo
```



---
## MyArray
```python
from test_utils import MyArray
```



---
## f
```python
from test_utils import f
```



---
## no_warnings
```python
from test_utils import no_warnings
```



---
## no_cycle
```python
from test_utils import no_cycle
```



---
## make_cycle
```python
from test_utils import make_cycle
```



---
## ReferenceCycleInDel
```python
from test_utils import ReferenceCycleInDel
```

An object that not only contains a reference cycle, but creates new
cycles whenever it's garbage-collected and its __del__ runs

---
## __eq__
```python
from test_utils import __eq__
```



---
## __ne__
```python
from test_utils import __ne__
```



---
## __array_function__
```python
from test_utils import __array_function__
```



---
## __lt__
```python
from test_utils import __lt__
```



---
## all
```python
from test_utils import all
```



---
## __del__
```python
from test_utils import __del__
```



---
## __name__
```python
from extbuild import __name__
```

Build a c-extension module on-the-fly in tests.
See build_and_import_extensions for usage hints

---
## build_and_import_extension
```python
from extbuild import build_and_import_extension
```

Build and imports a c-extension module `modname` from a list of function
fragments `functions`.


Parameters
----------
functions : list of fragments
    Each fragment is a sequence of func_name, calling convention, snippet.
prologue : string
    Code to precede the rest, usually extra ``#include`` or ``#define``
    macros.
build_dir : pathlib.Path
    Where to build the module, usually a temporary directory
include_dirs : list
    Extra directories to find include files when compiling
more_init : string
    Code to appear in the module PyMODINIT_FUNC

Returns
-------
out: module
    The module will have been loaded and is ready for use

Examples
--------
>>> functions = [("test_bytes", "METH_O", """
    if ( !PyBytesCheck(args)) {
        Py_RETURN_FALSE;
    }
    Py_RETURN_TRUE;
""")]
>>> mod = build_and_import_extension("testme", functions)
>>> assert not mod.test_bytes(u'abc')
>>> assert mod.test_bytes(b'abc')

---
## compile_extension_module
```python
from extbuild import compile_extension_module
```

Build an extension module and return the filename of the resulting
native code file.

Parameters
----------
name : string
    name of the module, possibly including dots if it is a module inside a
    package.
builddir : pathlib.Path
    Where to build the module, usually a temporary directory
include_dirs : list
    Extra directories to find include files when compiling
libraries : list
    Libraries to link into the extension module
library_dirs: list
    Where to find the libraries, ``-L`` passed to the linker

---
## _convert_str_to_file
```python
from extbuild import _convert_str_to_file
```

Helper function to create a file ``source.c`` in `dirname` that contains
the string in `source`. Returns the file name

---
## _make_methods
```python
from extbuild import _make_methods
```

Turns the name, signature, code in functions into complete functions
and lists them in a methods_table. Then turns the methods_table into a
``PyMethodDef`` structure and returns the resulting code fragment ready
for compilation

---
## _make_source
```python
from extbuild import _make_source
```

Combines the code fragments into source code ready to be compiled
    

---
## _c_compile
```python
from extbuild import _c_compile
```



---
## build
```python
from extbuild import build
```

use meson to build

---
## get_so_suffix
```python
from extbuild import get_so_suffix
```



---
## KnownFailureException
```python
from utils import KnownFailureException
```

Raise this exception to mark a test as a known failing test.

---
## assert_
```python
from utils import assert_
```

Assert that works in release mode.
Accepts callable msg to allow deferring evaluation until failure.

The Python built-in ``assert`` does not work when executing code in
optimized mode (the ``-O`` flag) - no byte-code is generated for it.

For documentation on usage, refer to the Python documentation.

---
## build_err_msg
```python
from utils import build_err_msg
```



---
## assert_equal
```python
from utils import assert_equal
```

Raises an AssertionError if two objects are not equal.

Given two objects (scalars, lists, tuples, dictionaries or numpy arrays),
check that all elements of these objects are equal. An exception is raised
at the first conflicting values.

When one of `actual` and `desired` is a scalar and the other is array_like,
the function checks that each element of the array_like object is equal to
the scalar.

This function handles NaN comparisons as if NaN was a "normal" number.
That is, AssertionError is not raised if both objects have NaNs in the same
positions.  This is in contrast to the IEEE standard on NaNs, which says
that NaN compared to anything must return False.

Parameters
----------
actual : array_like
    The object to check.
desired : array_like
    The expected object.
err_msg : str, optional
    The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
    If actual and desired are not equal.

Examples
--------
>>> np.testing.assert_equal([4,5], [4,6])
Traceback (most recent call last):
    ...
AssertionError:
Items are not equal:
item=1
 ACTUAL: 5
 DESIRED: 6

The following comparison does not raise an exception.  There are NaNs
in the inputs, but they are in the same positions.

>>> np.testing.assert_equal(np.array([1.0, 2.0, np.nan]), [1, 2, np.nan])

---
## print_assert_equal
```python
from utils import print_assert_equal
```

Test if two objects are equal, and print an error message if test fails.

The test is performed with ``actual == desired``.

Parameters
----------
test_string : str
    The message supplied to AssertionError.
actual : object
    The object to test for equality against `desired`.
desired : object
    The expected result.

Examples
--------
>>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 1])
>>> np.testing.print_assert_equal('Test XYZ of func xyz', [0, 1], [0, 2])
Traceback (most recent call last):
...
AssertionError: Test XYZ of func xyz failed
ACTUAL:
[0, 1]
DESIRED:
[0, 2]

---
## assert_almost_equal
```python
from utils import assert_almost_equal
```

Raises an AssertionError if two items are not equal up to desired
precision.

.. note:: It is recommended to use one of `assert_allclose`,
          `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
          instead of this function for more consistent floating point
          comparisons.

The test verifies that the elements of `actual` and `desired` satisfy.

    ``abs(desired-actual) < float64(1.5 * 10**(-decimal))``

That is a looser test than originally documented, but agrees with what the
actual implementation in `assert_array_almost_equal` did up to rounding
vagaries. An exception is raised at conflicting values. For ndarrays this
delegates to assert_array_almost_equal

Parameters
----------
actual : array_like
    The object to check.
desired : array_like
    The expected object.
decimal : int, optional
    Desired precision, default is 7.
err_msg : str, optional
    The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
  If actual and desired are not equal up to specified precision.

See Also
--------
assert_allclose: Compare two array_like objects for equality with desired
                 relative and/or absolute precision.
assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal

Examples
--------
>>> from numpy.testing import assert_almost_equal
>>> assert_almost_equal(2.3333333333333, 2.33333334)
>>> assert_almost_equal(2.3333333333333, 2.33333334, decimal=10)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not almost equal to 10 decimals
 ACTUAL: 2.3333333333333
 DESIRED: 2.33333334

>>> assert_almost_equal(np.array([1.0,2.3333333333333]),
...                     np.array([1.0,2.33333334]), decimal=9)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not almost equal to 9 decimals
<BLANKLINE>
Mismatched elements: 1 / 2 (50%)
Max absolute difference: 6.66669964e-09
Max relative difference: 2.85715698e-09
 x: array([1.         , 2.333333333])
 y: array([1.        , 2.33333334])

---
## assert_approx_equal
```python
from utils import assert_approx_equal
```

Raises an AssertionError if two items are not equal up to significant
digits.

.. note:: It is recommended to use one of `assert_allclose`,
          `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
          instead of this function for more consistent floating point
          comparisons.

Given two numbers, check that they are approximately equal.
Approximately equal is defined as the number of significant digits
that agree.

Parameters
----------
actual : scalar
    The object to check.
desired : scalar
    The expected object.
significant : int, optional
    Desired precision, default is 7.
err_msg : str, optional
    The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
  If actual and desired are not equal up to specified precision.

See Also
--------
assert_allclose: Compare two array_like objects for equality with desired
                 relative and/or absolute precision.
assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal

Examples
--------
>>> np.testing.assert_approx_equal(0.12345677777777e-20, 0.1234567e-20)
>>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345671e-20,
...                                significant=8)
>>> np.testing.assert_approx_equal(0.12345670e-20, 0.12345672e-20,
...                                significant=8)
Traceback (most recent call last):
    ...
AssertionError:
Items are not equal to 8 significant digits:
 ACTUAL: 1.234567e-21
 DESIRED: 1.2345672e-21

the evaluated condition that raises the exception is

>>> abs(0.12345670e-20/1e-21 - 0.12345672e-20/1e-21) >= 10**-(8-1)
True

---
## assert_array_compare
```python
from utils import assert_array_compare
```



---
## assert_array_equal
```python
from utils import assert_array_equal
```

Raises an AssertionError if two array_like objects are not equal.

Given two array_like objects, check that the shape is equal and all
elements of these objects are equal (but see the Notes for the special
handling of a scalar). An exception is raised at shape mismatch or
conflicting values. In contrast to the standard usage in numpy, NaNs
are compared like numbers, no assertion is raised if both objects have
NaNs in the same positions.

The usual caution for verifying equality with floating point numbers is
advised.

Parameters
----------
x : array_like
    The actual object to check.
y : array_like
    The desired, expected object.
err_msg : str, optional
    The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.
strict : bool, optional
    If True, raise an AssertionError when either the shape or the data
    type of the array_like objects does not match. The special
    handling for scalars mentioned in the Notes section is disabled.

    .. versionadded:: 1.24.0

Raises
------
AssertionError
    If actual and desired objects are not equal.

See Also
--------
assert_allclose: Compare two array_like objects for equality with desired
                 relative and/or absolute precision.
assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal

Notes
-----
When one of `x` and `y` is a scalar and the other is array_like, the
function checks that each element of the array_like object is equal to
the scalar. This behaviour can be disabled with the `strict` parameter.

Examples
--------
The first assert does not raise an exception:

>>> np.testing.assert_array_equal([1.0,2.33333,np.nan],
...                               [np.exp(0),2.33333, np.nan])

Assert fails with numerical imprecision with floats:

>>> np.testing.assert_array_equal([1.0,np.pi,np.nan],
...                               [1, np.sqrt(np.pi)**2, np.nan])
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not equal
<BLANKLINE>
Mismatched elements: 1 / 3 (33.3%)
Max absolute difference: 4.4408921e-16
Max relative difference: 1.41357986e-16
 x: array([1.      , 3.141593,      nan])
 y: array([1.      , 3.141593,      nan])

Use `assert_allclose` or one of the nulp (number of floating point values)
functions for these cases instead:

>>> np.testing.assert_allclose([1.0,np.pi,np.nan],
...                            [1, np.sqrt(np.pi)**2, np.nan],
...                            rtol=1e-10, atol=0)

As mentioned in the Notes section, `assert_array_equal` has special
handling for scalars. Here the test checks that each value in `x` is 3:

>>> x = np.full((2, 5), fill_value=3)
>>> np.testing.assert_array_equal(x, 3)

Use `strict` to raise an AssertionError when comparing a scalar with an
array:

>>> np.testing.assert_array_equal(x, 3, strict=True)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not equal
<BLANKLINE>
(shapes (2, 5), () mismatch)
 x: array([[3, 3, 3, 3, 3],
       [3, 3, 3, 3, 3]])
 y: array(3)

The `strict` parameter also ensures that the array data types match:

>>> x = np.array([2, 2, 2])
>>> y = np.array([2., 2., 2.], dtype=np.float32)
>>> np.testing.assert_array_equal(x, y, strict=True)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not equal
<BLANKLINE>
(dtypes int64, float32 mismatch)
 x: array([2, 2, 2])
 y: array([2., 2., 2.], dtype=float32)

---
## assert_array_almost_equal
```python
from utils import assert_array_almost_equal
```

Raises an AssertionError if two objects are not equal up to desired
precision.

.. note:: It is recommended to use one of `assert_allclose`,
          `assert_array_almost_equal_nulp` or `assert_array_max_ulp`
          instead of this function for more consistent floating point
          comparisons.

The test verifies identical shapes and that the elements of ``actual`` and
``desired`` satisfy.

    ``abs(desired-actual) < 1.5 * 10**(-decimal)``

That is a looser test than originally documented, but agrees with what the
actual implementation did up to rounding vagaries. An exception is raised
at shape mismatch or conflicting values. In contrast to the standard usage
in numpy, NaNs are compared like numbers, no assertion is raised if both
objects have NaNs in the same positions.

Parameters
----------
x : array_like
    The actual object to check.
y : array_like
    The desired, expected object.
decimal : int, optional
    Desired precision, default is 6.
err_msg : str, optional
  The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
    If actual and desired are not equal up to specified precision.

See Also
--------
assert_allclose: Compare two array_like objects for equality with desired
                 relative and/or absolute precision.
assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal

Examples
--------
the first assert does not raise an exception

>>> np.testing.assert_array_almost_equal([1.0,2.333,np.nan],
...                                      [1.0,2.333,np.nan])

>>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],
...                                      [1.0,2.33339,np.nan], decimal=5)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not almost equal to 5 decimals
<BLANKLINE>
Mismatched elements: 1 / 3 (33.3%)
Max absolute difference: 6.e-05
Max relative difference: 2.57136612e-05
 x: array([1.     , 2.33333,     nan])
 y: array([1.     , 2.33339,     nan])

>>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],
...                                      [1.0,2.33333, 5], decimal=5)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not almost equal to 5 decimals
<BLANKLINE>
x and y nan location mismatch:
 x: array([1.     , 2.33333,     nan])
 y: array([1.     , 2.33333, 5.     ])

---
## assert_array_less
```python
from utils import assert_array_less
```

Raises an AssertionError if two array_like objects are not ordered by less
than.

Given two array_like objects, check that the shape is equal and all
elements of the first object are strictly smaller than those of the
second object. An exception is raised at shape mismatch or incorrectly
ordered values. Shape mismatch does not raise if an object has zero
dimension. In contrast to the standard usage in numpy, NaNs are
compared, no assertion is raised if both objects have NaNs in the same
positions.

Parameters
----------
x : array_like
  The smaller object to check.
y : array_like
  The larger object to compare.
err_msg : string
  The error message to be printed in case of failure.
verbose : bool
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
  If x is not strictly smaller than y, element-wise.

See Also
--------
assert_array_equal: tests objects for equality
assert_array_almost_equal: test objects for equality up to precision

Examples
--------
>>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1.1, 2.0, np.nan])
>>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1, 2.0, np.nan])
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not less-ordered
<BLANKLINE>
Mismatched elements: 1 / 3 (33.3%)
Max absolute difference: 1.
Max relative difference: 0.5
 x: array([ 1.,  1., nan])
 y: array([ 1.,  2., nan])

>>> np.testing.assert_array_less([1.0, 4.0], 3)
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not less-ordered
<BLANKLINE>
Mismatched elements: 1 / 2 (50%)
Max absolute difference: 2.
Max relative difference: 0.66666667
 x: array([1., 4.])
 y: array(3)

>>> np.testing.assert_array_less([1.0, 2.0, 3.0], [4])
Traceback (most recent call last):
    ...
AssertionError:
Arrays are not less-ordered
<BLANKLINE>
(shapes (3,), (1,) mismatch)
 x: array([1., 2., 3.])
 y: array([4])

---
## runstring
```python
from utils import runstring
```



---
## assert_string_equal
```python
from utils import assert_string_equal
```

Test if two strings are equal.

If the given strings are equal, `assert_string_equal` does nothing.
If they are not equal, an AssertionError is raised, and the diff
between the strings is shown.

Parameters
----------
actual : str
    The string to test for equality against the expected string.
desired : str
    The expected string.

Examples
--------
>>> np.testing.assert_string_equal('abc', 'abc')
>>> np.testing.assert_string_equal('abc', 'abcd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
...
AssertionError: Differences in strings:
- abc+ abcd?    +

---
## rundocs
```python
from utils import rundocs
```

Run doctests found in the given file.

By default `rundocs` raises an AssertionError on failure.

Parameters
----------
filename : str
    The path to the file for which the doctests are run.
raise_on_error : bool
    Whether to raise an AssertionError when a doctest fails. Default is
    True.

Notes
-----
The doctests can be run by the user/developer by adding the ``doctests``
argument to the ``test()`` call. For example, to run all tests (including
doctests) for `numpy.lib`:

>>> np.lib.test(doctests=True)  # doctest: +SKIP

---
## check_support_sve
```python
from utils import check_support_sve
```

gh-22982

---
## _Dummy
```python
from utils import _Dummy
```



---
## assert_raises
```python
from utils import assert_raises
```

assert_raises(exception_class, callable, *args, **kwargs)
assert_raises(exception_class)

Fail unless an exception of class exception_class is thrown
by callable when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.

Alternatively, `assert_raises` can be used as a context manager:

>>> from numpy.testing import assert_raises
>>> with assert_raises(ZeroDivisionError):
...     1 / 0

is equivalent to

>>> def div(x, y):
...     return x / y
>>> assert_raises(ZeroDivisionError, div, 1, 0)

---
## assert_raises_regex
```python
from utils import assert_raises_regex
```

assert_raises_regex(exception_class, expected_regexp, callable, *args,
                    **kwargs)
assert_raises_regex(exception_class, expected_regexp)

Fail unless an exception of class exception_class and with message that
matches expected_regexp is thrown by callable when invoked with arguments
args and keyword arguments kwargs.

Alternatively, can be used as a context manager like `assert_raises`.

Notes
-----
.. versionadded:: 1.9.0

---
## decorate_methods
```python
from utils import decorate_methods
```

Apply a decorator to all methods in a class matching a regular expression.

The given decorator is applied to all public methods of `cls` that are
matched by the regular expression `testmatch`
(``testmatch.search(methodname)``). Methods that are private, i.e. start
with an underscore, are ignored.

Parameters
----------
cls : class
    Class whose methods to decorate.
decorator : function
    Decorator to apply to methods
testmatch : compiled regexp or str, optional
    The regular expression. Default value is None, in which case the
    nose default (``re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)``)
    is used.
    If `testmatch` is a string, it is compiled to a regular expression
    first.

---
## measure
```python
from utils import measure
```

Return elapsed time for executing code in the namespace of the caller.

The supplied code string is compiled with the Python builtin ``compile``.
The precision of the timing is 10 milli-seconds. If the code will execute
fast on this timescale, it can be executed many times to get reasonable
timing accuracy.

Parameters
----------
code_str : str
    The code to be timed.
times : int, optional
    The number of times the code is executed. Default is 1. The code is
    only compiled once.
label : str, optional
    A label to identify `code_str` with. This is passed into ``compile``
    as the second argument (for run-time error messages).

Returns
-------
elapsed : float
    Total elapsed time in seconds for executing `code_str` `times` times.

Examples
--------
>>> times = 10
>>> etime = np.testing.measure('for i in range(1000): np.sqrt(i**2)', times=times)
>>> print("Time for a single execution : ", etime / times, "s")  # doctest: +SKIP
Time for a single execution :  0.005 s

---
## _assert_valid_refcount
```python
from utils import _assert_valid_refcount
```

Check that ufuncs don't mishandle refcount of object `1`.
Used in a few regression tests.

---
## assert_allclose
```python
from utils import assert_allclose
```

Raises an AssertionError if two objects are not equal up to desired
tolerance.

Given two array_like objects, check that their shapes and all elements
are equal (but see the Notes for the special handling of a scalar). An
exception is raised if the shapes mismatch or any values conflict. In
contrast to the standard usage in numpy, NaNs are compared like numbers,
no assertion is raised if both objects have NaNs in the same positions.

The test is equivalent to ``allclose(actual, desired, rtol, atol)`` (note
that ``allclose`` has different default values). It compares the difference
between `actual` and `desired` to ``atol + rtol * abs(desired)``.

.. versionadded:: 1.5.0

Parameters
----------
actual : array_like
    Array obtained.
desired : array_like
    Array desired.
rtol : float, optional
    Relative tolerance.
atol : float, optional
    Absolute tolerance.
equal_nan : bool, optional.
    If True, NaNs will compare equal.
err_msg : str, optional
    The error message to be printed in case of failure.
verbose : bool, optional
    If True, the conflicting values are appended to the error message.

Raises
------
AssertionError
    If actual and desired are not equal up to specified precision.

See Also
--------
assert_array_almost_equal_nulp, assert_array_max_ulp

Notes
-----
When one of `actual` and `desired` is a scalar and the other is
array_like, the function checks that each element of the array_like
object is equal to the scalar.

Examples
--------
>>> x = [1e-5, 1e-3, 1e-1]
>>> y = np.arccos(np.cos(x))
>>> np.testing.assert_allclose(x, y, rtol=1e-5, atol=0)

---
## assert_array_almost_equal_nulp
```python
from utils import assert_array_almost_equal_nulp
```

Compare two arrays relatively to their spacing.

This is a relatively robust method to compare two arrays whose amplitude
is variable.

Parameters
----------
x, y : array_like
    Input arrays.
nulp : int, optional
    The maximum number of unit in the last place for tolerance (see Notes).
    Default is 1.

Returns
-------
None

Raises
------
AssertionError
    If the spacing between `x` and `y` for one or more elements is larger
    than `nulp`.

See Also
--------
assert_array_max_ulp : Check that all items of arrays differ in at most
    N Units in the Last Place.
spacing : Return the distance between x and the nearest adjacent number.

Notes
-----
An assertion is raised if the following condition is not met::

    abs(x - y) <= nulp * spacing(maximum(abs(x), abs(y)))

Examples
--------
>>> x = np.array([1., 1e-10, 1e-20])
>>> eps = np.finfo(x.dtype).eps
>>> np.testing.assert_array_almost_equal_nulp(x, x*eps/2 + x)

>>> np.testing.assert_array_almost_equal_nulp(x, x*eps + x)
Traceback (most recent call last):
  ...
AssertionError: X and Y are not equal to 1 ULP (max is 2)

---
## assert_array_max_ulp
```python
from utils import assert_array_max_ulp
```

Check that all items of arrays differ in at most N Units in the Last Place.

Parameters
----------
a, b : array_like
    Input arrays to be compared.
maxulp : int, optional
    The maximum number of units in the last place that elements of `a` and
    `b` can differ. Default is 1.
dtype : dtype, optional
    Data-type to convert `a` and `b` to if given. Default is None.

Returns
-------
ret : ndarray
    Array containing number of representable floating point numbers between
    items in `a` and `b`.

Raises
------
AssertionError
    If one or more elements differ by more than `maxulp`.

Notes
-----
For computing the ULP difference, this API does not differentiate between
various representations of NAN (ULP difference between 0x7fc00000 and 0xffc00000
is zero).

See Also
--------
assert_array_almost_equal_nulp : Compare two arrays relatively to their
    spacing.

Examples
--------
>>> a = np.linspace(0., 1., 100)
>>> res = np.testing.assert_array_max_ulp(a, np.arcsin(np.sin(a)))

---
## nulp_diff
```python
from utils import nulp_diff
```

For each item in x and y, return the number of representable floating
points between them.

Parameters
----------
x : array_like
    first input array
y : array_like
    second input array
dtype : dtype, optional
    Data-type to convert `x` and `y` to if given. Default is None.

Returns
-------
nulp : array_like
    number of representable floating point numbers between each item in x
    and y.

Notes
-----
For computing the ULP difference, this API does not differentiate between
various representations of NAN (ULP difference between 0x7fc00000 and 0xffc00000
is zero).

Examples
--------
# By definition, epsilon is the smallest number such as 1 + eps != 1, so
# there should be exactly one ULP between 1 and 1 + eps
>>> nulp_diff(1, 1 + np.finfo(x.dtype).eps)
1.0

---
## _integer_repr
```python
from utils import _integer_repr
```



---
## integer_repr
```python
from utils import integer_repr
```

Return the signed-magnitude interpretation of the binary representation
of x.

---
## _assert_warns_context
```python
from utils import _assert_warns_context
```



---
## assert_warns
```python
from utils import assert_warns
```

Fail unless the given callable throws the specified warning.

A warning of class warning_class should be thrown by the callable when
invoked with arguments args and keyword arguments kwargs.
If a different type of warning is thrown, it will not be caught.

If called with all arguments other than the warning class omitted, may be
used as a context manager:

    with assert_warns(SomeWarning):
        do_something()

The ability to be used as a context manager is new in NumPy v1.11.0.

.. versionadded:: 1.4.0

Parameters
----------
warning_class : class
    The class defining the warning that `func` is expected to throw.
func : callable, optional
    Callable to test
*args : Arguments
    Arguments for `func`.
**kwargs : Kwargs
    Keyword arguments for `func`.

Returns
-------
The value returned by `func`.

Examples
--------
>>> import warnings
>>> def deprecated_func(num):
...     warnings.warn("Please upgrade", DeprecationWarning)
...     return num*num
>>> with np.testing.assert_warns(DeprecationWarning):
...     assert deprecated_func(4) == 16
>>> # or passing a func
>>> ret = np.testing.assert_warns(DeprecationWarning, deprecated_func, 4)
>>> assert ret == 16

---
## _assert_no_warnings_context
```python
from utils import _assert_no_warnings_context
```



---
## assert_no_warnings
```python
from utils import assert_no_warnings
```

Fail if the given callable produces any warnings.

If called with all arguments omitted, may be used as a context manager:

    with assert_no_warnings():
        do_something()

The ability to be used as a context manager is new in NumPy v1.11.0.

.. versionadded:: 1.7.0

Parameters
----------
func : callable
    The callable to test.
\*args : Arguments
    Arguments passed to `func`.
\*\*kwargs : Kwargs
    Keyword arguments passed to `func`.

Returns
-------
The value returned by `func`.

---
## _gen_alignment_data
```python
from utils import _gen_alignment_data
```

generator producing data with different alignment and offsets
to test simd vectorization

Parameters
----------
dtype : dtype
    data type to produce
type : string
    'unary': create data for unary operations, creates one input
             and output array
    'binary': create data for unary operations, creates two input
             and output array
max_size : integer
    maximum size of data to produce

Returns
-------
if type is 'unary' yields one output, one input array and a message
containing information on the data
if type is 'binary' yields one output array, two input array and a message
containing information on the data

---
## IgnoreException
```python
from utils import IgnoreException
```

Ignoring this exception due to disabled feature

---
## tempdir
```python
from utils import tempdir
```

Context manager to provide a temporary test folder.

All arguments are passed as this to the underlying tempfile.mkdtemp
function.

---
## temppath
```python
from utils import temppath
```

Context manager for temporary files.

Context manager that returns the path to a closed temporary file. Its
parameters are the same as for tempfile.mkstemp and are passed directly
to that function. The underlying file is removed when the context is
exited, so it should be closed at that time.

Windows does not allow a temporary file to be opened if it is already
open, so the underlying file must be closed after opening before it
can be opened again.

---
## clear_and_catch_warnings
```python
from utils import clear_and_catch_warnings
```

Context manager that resets warning registry for catching warnings

Warnings can be slippery, because, whenever a warning is triggered, Python
adds a ``__warningregistry__`` member to the *calling* module.  This makes
it impossible to retrigger the warning in this module, whatever you put in
the warnings filters.  This context manager accepts a sequence of `modules`
as a keyword argument to its constructor and:

* stores and removes any ``__warningregistry__`` entries in given `modules`
  on entry;
* resets ``__warningregistry__`` to its previous state on exit.

This makes it possible to trigger any warning afresh inside the context
manager without disturbing the state of warnings outside.

For compatibility with Python 3.0, please consider all arguments to be
keyword-only.

Parameters
----------
record : bool, optional
    Specifies whether warnings should be captured by a custom
    implementation of ``warnings.showwarning()`` and be appended to a list
    returned by the context manager. Otherwise None is returned by the
    context manager. The objects appended to the list are arguments whose
    attributes mirror the arguments to ``showwarning()``.
modules : sequence, optional
    Sequence of modules for which to reset warnings registry on entry and
    restore on exit. To work correctly, all 'ignore' filters should
    filter by one of these modules.

Examples
--------
>>> import warnings
>>> with np.testing.clear_and_catch_warnings(
...         modules=[np.core.fromnumeric]):
...     warnings.simplefilter('always')
...     warnings.filterwarnings('ignore', module='np.core.fromnumeric')
...     # do something that raises a warning but ignore those in
...     # np.core.fromnumeric

---
## suppress_warnings
```python
from utils import suppress_warnings
```

Context manager and decorator doing much the same as
``warnings.catch_warnings``.

However, it also provides a filter mechanism to work around
https://bugs.python.org/issue4180.

This bug causes Python before 3.4 to not reliably show warnings again
after they have been ignored once (even within catch_warnings). It
means that no "ignore" filter can be used easily, since following
tests might need to see the warning. Additionally it allows easier
specificity for testing warnings and can be nested.

Parameters
----------
forwarding_rule : str, optional
    One of "always", "once", "module", or "location". Analogous to
    the usual warnings module filter mode, it is useful to reduce
    noise mostly on the outmost level. Unsuppressed and unrecorded
    warnings will be forwarded based on this rule. Defaults to "always".
    "location" is equivalent to the warnings "default", match by exact
    location the warning warning originated from.

Notes
-----
Filters added inside the context manager will be discarded again
when leaving it. Upon entering all filters defined outside a
context will be applied automatically.

When a recording filter is added, matching warnings are stored in the
``log`` attribute as well as in the list returned by ``record``.

If filters are added and the ``module`` keyword is given, the
warning registry of this module will additionally be cleared when
applying it, entering the context, or exiting it. This could cause
warnings to appear a second time after leaving the context if they
were configured to be printed once (default) and were already
printed before the context was entered.

Nesting this context manager will work as expected when the
forwarding rule is "always" (default). Unfiltered and unrecorded
warnings will be passed out and be matched by the outer level.
On the outmost level they will be printed (or caught by another
warnings context). The forwarding rule argument can modify this
behaviour.

Like ``catch_warnings`` this context manager is not threadsafe.

Examples
--------

With a context manager::

    with np.testing.suppress_warnings() as sup:
        sup.filter(DeprecationWarning, "Some text")
        sup.filter(module=np.ma.core)
        log = sup.record(FutureWarning, "Does this occur?")
        command_giving_warnings()
        # The FutureWarning was given once, the filtered warnings were
        # ignored. All other warnings abide outside settings (may be
        # printed/error)
        assert_(len(log) == 1)
        assert_(len(sup.log) == 1)  # also stored in log attribute

Or as a decorator::

    sup = np.testing.suppress_warnings()
    sup.filter(module=np.ma.core)  # module must match exactly
    @sup
    def some_function():
        # do something which causes a warning in np.ma.core
        pass

---
## _assert_no_gc_cycles_context
```python
from utils import _assert_no_gc_cycles_context
```



---
## assert_no_gc_cycles
```python
from utils import assert_no_gc_cycles
```

Fail if the given callable produces any reference cycles.

If called with all arguments omitted, may be used as a context manager:

    with assert_no_gc_cycles():
        do_something()

.. versionadded:: 1.15.0

Parameters
----------
func : callable
    The callable to test.
\*args : Arguments
    Arguments passed to `func`.
\*\*kwargs : Kwargs
    Keyword arguments passed to `func`.

Returns
-------
Nothing. The result is deliberately discarded to ensure that all cycles
are found.

---
## break_cycles
```python
from utils import break_cycles
```

Break reference cycles by calling gc.collect
Objects can call other objects' methods (for instance, another object's
 __del__) inside their own __del__. On PyPy, the interpreter only runs
between calls to gc.collect, so multiple calls are needed to completely
release all cycles.

---
## requires_memory
```python
from utils import requires_memory
```

Decorator to skip a test if not enough memory is available

---
## check_free_memory
```python
from utils import check_free_memory
```

Check whether `free_bytes` amount of memory is currently free.
Returns: None if enough memory available, otherwise error message

---
## _parse_size
```python
from utils import _parse_size
```

Convert memory size strings ('12 GB' etc.) to float

---
## _get_mem_available
```python
from utils import _get_mem_available
```

Return available memory in bytes, or None if unknown.

---
## _no_tracing
```python
from utils import _no_tracing
```

Decorator to temporarily turn off tracing for the duration of a test.
Needed in tests that check refcounting, otherwise the tracing itself
influences the refcounts

---
## _get_glibc_version
```python
from utils import _get_glibc_version
```



---
## GetPerformanceAttributes
```python
from utils import GetPerformanceAttributes
```



---
## memusage
```python
from utils import memusage
```

Return memory usage of running python. [Not implemented]

---
## jiffies
```python
from utils import jiffies
```

Return number of jiffies elapsed.

Return number of jiffies (1/100ths of a second) that this
process has been scheduled in user mode. See man 5 proc.

---
## _build_err_msg
```python
from utils import _build_err_msg
```



---
## isnumber
```python
from utils import isnumber
```



---
## istime
```python
from utils import istime
```



---
## func_assert_same_pos
```python
from utils import func_assert_same_pos
```

Handling nan/inf.

Combine results of running func on x and y, checking that they are True
at the same locations.

---
## compare
```python
from utils import compare
```



---
## nop
```python
from utils import nop
```



---
## _diff
```python
from utils import _diff
```



---
## _clear_registries
```python
from utils import _clear_registries
```



---
## _filter
```python
from utils import _filter
```



---
## filter
```python
from utils import filter
```

Add a new suppressing filter or apply it if the state is entered.

Parameters
----------
category : class, optional
    Warning class to filter
message : string, optional
    Regular expression matching the warning message.
module : module, optional
    Module to filter for. Note that the module (and its file)
    must match exactly and cannot be a submodule. This may make
    it unreliable for external modules.

Notes
-----
When added within a context, filters are only added inside
the context and will be forgotten when the context is exited.

---
## record
```python
from utils import record
```

Append a new recording filter or apply it if the state is entered.

All warnings matching will be appended to the ``log`` attribute.

Parameters
----------
category : class, optional
    Warning class to filter
message : string, optional
    Regular expression matching the warning message.
module : module, optional
    Module to filter for. Note that the module (and its file)
    must match exactly and cannot be a submodule. This may make
    it unreliable for external modules.

Returns
-------
log : list
    A list which will be filled with all matched warnings.

Notes
-----
When added within a context, filters are only added inside
the context and will be forgotten when the context is exited.

---
## _showwarning
```python
from utils import _showwarning
```



---
## decorator
```python
from utils import decorator
```



---
## new_func
```python
from utils import new_func
```



---
## __name__
```python
from test_type_check import __name__
```



---
## assert_all
```python
from test_type_check import assert_all
```



---
## TestCommonType
```python
from test_type_check import TestCommonType
```



---
## TestMintypecode
```python
from test_type_check import TestMintypecode
```



---
## TestIsscalar
```python
from test_type_check import TestIsscalar
```



---
## TestReal
```python
from test_type_check import TestReal
```



---
## TestImag
```python
from test_type_check import TestImag
```



---
## TestIscomplex
```python
from test_type_check import TestIscomplex
```



---
## TestIsreal
```python
from test_type_check import TestIsreal
```



---
## TestIscomplexobj
```python
from test_type_check import TestIscomplexobj
```



---
## TestIsrealobj
```python
from test_type_check import TestIsrealobj
```



---
## TestIsnan
```python
from test_type_check import TestIsnan
```



---
## TestIsfinite
```python
from test_type_check import TestIsfinite
```



---
## TestIsinf
```python
from test_type_check import TestIsinf
```



---
## TestIsposinf
```python
from test_type_check import TestIsposinf
```



---
## TestIsneginf
```python
from test_type_check import TestIsneginf
```



---
## TestNanToNum
```python
from test_type_check import TestNanToNum
```



---
## TestRealIfClose
```python
from test_type_check import TestRealIfClose
```



---
## TestArrayConversion
```python
from test_type_check import TestArrayConversion
```



---
## test_basic
```python
from test_type_check import test_basic
```



---
## test_default_1
```python
from test_type_check import test_default_1
```



---
## test_default_2
```python
from test_type_check import test_default_2
```



---
## test_default_3
```python
from test_type_check import test_default_3
```



---
## test_real
```python
from test_type_check import test_real
```



---
## test_cmplx
```python
from test_type_check import test_cmplx
```



---
## test_fail
```python
from test_type_check import test_fail
```



---
## test_pass
```python
from test_type_check import test_pass
```



---
## test_scalar
```python
from test_type_check import test_scalar
```



---
## test_list
```python
from test_type_check import test_list
```



---
## test_duck
```python
from test_type_check import test_duck
```



---
## test_pandas_duck
```python
from test_type_check import test_pandas_duck
```



---
## test_custom_dtype_duck
```python
from test_type_check import test_custom_dtype_duck
```



---
## test_goodvalues
```python
from test_type_check import test_goodvalues
```



---
## test_posinf
```python
from test_type_check import test_posinf
```



---
## test_neginf
```python
from test_type_check import test_neginf
```



---
## test_ind
```python
from test_type_check import test_ind
```



---
## test_integer
```python
from test_type_check import test_integer
```



---
## test_complex
```python
from test_type_check import test_complex
```



---
## test_complex1
```python
from test_type_check import test_complex1
```



---
## test_posinf_scalar
```python
from test_type_check import test_posinf_scalar
```



---
## test_neginf_scalar
```python
from test_type_check import test_neginf_scalar
```



---
## test_generic
```python
from test_type_check import test_generic
```



---
## test_array
```python
from test_type_check import test_array
```



---
## test_float
```python
from test_type_check import test_float
```



---
## test_complex_good
```python
from test_type_check import test_complex_good
```



---
## test_complex_bad
```python
from test_type_check import test_complex_bad
```



---
## test_complex_bad2
```python
from test_type_check import test_complex_bad2
```



---
## test_do_not_rewrite_previous_keyword
```python
from test_type_check import test_do_not_rewrite_previous_keyword
```



---
## test_asfarray
```python
from test_type_check import test_asfarray
```



---
## DummyComplexArray
```python
from test_type_check import DummyComplexArray
```



---
## PdComplex
```python
from test_type_check import PdComplex
```



---
## PdDtype
```python
from test_type_check import PdDtype
```



---
## DummyPd
```python
from test_type_check import DummyPd
```



---
## MyArray
```python
from test_type_check import MyArray
```



---
## dtype
```python
from test_type_check import dtype
```



---
## test_lookfor
```python
from test_utils import test_lookfor
```



---
## old_func
```python
from test_utils import old_func
```



---
## old_func2
```python
from test_utils import old_func2
```



---
## old_func3
```python
from test_utils import old_func3
```



---
## old_func4
```python
from test_utils import old_func4
```

Summary.

Further info.

---
## old_func5
```python
from test_utils import old_func5
```

Summary.

Bizarre indentation.

---
## old_func6
```python
from test_utils import old_func6
```

Also in PEP-257.

---
## old_func7
```python
from test_utils import old_func7
```



---
## test_deprecate_decorator
```python
from test_utils import test_deprecate_decorator
```



---
## test_deprecate_decorator_message
```python
from test_utils import test_deprecate_decorator_message
```



---
## test_deprecate_fn
```python
from test_utils import test_deprecate_fn
```



---
## test_deprecate_with_doc_decorator_message
```python
from test_utils import test_deprecate_with_doc_decorator_message
```



---
## test_deprecate_help_indentation
```python
from test_utils import test_deprecate_help_indentation
```



---
## _compare_docs
```python
from test_utils import _compare_docs
```



---
## test_deprecate_preserve_whitespace
```python
from test_utils import test_deprecate_preserve_whitespace
```



---
## test_deprecate_module
```python
from test_utils import test_deprecate_module
```



---
## test_safe_eval_nameconstant
```python
from test_utils import test_safe_eval_nameconstant
```



---
## TestByteBounds
```python
from test_utils import TestByteBounds
```



---
## test_assert_raises_regex_context_manager
```python
from test_utils import test_assert_raises_regex_context_manager
```



---
## test_info_method_heading
```python
from test_utils import test_info_method_heading
```



---
## test_drop_metadata
```python
from test_utils import test_drop_metadata
```



---
## test_drop_metadata_identity_and_copy
```python
from test_utils import test_drop_metadata_identity_and_copy
```



---
## test_byte_bounds
```python
from test_utils import test_byte_bounds
```



---
## test_unusual_order_positive_stride
```python
from test_utils import test_unusual_order_positive_stride
```



---
## test_unusual_order_negative_stride
```python
from test_utils import test_unusual_order_negative_stride
```



---
## test_strided
```python
from test_utils import test_strided
```



---
## NoPublicMethods
```python
from test_utils import NoPublicMethods
```



---
## WithPublicMethods
```python
from test_utils import WithPublicMethods
```



---
## _has_method_heading
```python
from test_utils import _has_method_heading
```



---
## _compare_dtypes
```python
from test_utils import _compare_dtypes
```



---
## first_method
```python
from test_utils import first_method
```



---
## __name__
```python
from test_financial_expired import __name__
```



---
## test_financial_expired
```python
from test_financial_expired import test_financial_expired
```



---
## __name__
```python
from test_twodim_base import __name__
```

Test functions for matrix module

---
## get_mat
```python
from test_twodim_base import get_mat
```



---
## TestEye
```python
from test_twodim_base import TestEye
```



---
## TestDiag
```python
from test_twodim_base import TestDiag
```



---
## TestFliplr
```python
from test_twodim_base import TestFliplr
```



---
## TestFlipud
```python
from test_twodim_base import TestFlipud
```



---
## TestHistogram2d
```python
from test_twodim_base import TestHistogram2d
```



---
## TestTri
```python
from test_twodim_base import TestTri
```



---
## test_tril_triu_ndim2
```python
from test_twodim_base import test_tril_triu_ndim2
```



---
## test_tril_triu_ndim3
```python
from test_twodim_base import test_tril_triu_ndim3
```



---
## test_tril_triu_with_inf
```python
from test_twodim_base import test_tril_triu_with_inf
```



---
## test_tril_triu_dtype
```python
from test_twodim_base import test_tril_triu_dtype
```



---
## test_mask_indices
```python
from test_twodim_base import test_mask_indices
```



---
## test_tril_indices
```python
from test_twodim_base import test_tril_indices
```



---
## TestTriuIndices
```python
from test_twodim_base import TestTriuIndices
```



---
## TestTrilIndicesFrom
```python
from test_twodim_base import TestTrilIndicesFrom
```



---
## TestTriuIndicesFrom
```python
from test_twodim_base import TestTriuIndicesFrom
```



---
## TestVander
```python
from test_twodim_base import TestVander
```



---
## test_basic
```python
from test_twodim_base import test_basic
```



---
## test_uint64
```python
from test_twodim_base import test_uint64
```



---
## test_diag
```python
from test_twodim_base import test_diag
```



---
## test_2d
```python
from test_twodim_base import test_2d
```



---
## test_diag2d
```python
from test_twodim_base import test_diag2d
```



---
## test_eye_bounds
```python
from test_twodim_base import test_eye_bounds
```



---
## test_strings
```python
from test_twodim_base import test_strings
```



---
## test_bool
```python
from test_twodim_base import test_bool
```



---
## test_order
```python
from test_twodim_base import test_order
```



---
## test_vector
```python
from test_twodim_base import test_vector
```



---
## test_matrix
```python
from test_twodim_base import test_matrix
```



---
## test_fortran_order
```python
from test_twodim_base import test_fortran_order
```



---
## test_diag_bounds
```python
from test_twodim_base import test_diag_bounds
```



---
## test_failure
```python
from test_twodim_base import test_failure
```



---
## test_simple
```python
from test_twodim_base import test_simple
```



---
## test_asym
```python
from test_twodim_base import test_asym
```



---
## test_density
```python
from test_twodim_base import test_density
```



---
## test_all_outliers
```python
from test_twodim_base import test_all_outliers
```



---
## test_empty
```python
from test_twodim_base import test_empty
```



---
## test_binparameter_combination
```python
from test_twodim_base import test_binparameter_combination
```



---
## test_dispatch
```python
from test_twodim_base import test_dispatch
```



---
## test_bad_length
```python
from test_twodim_base import test_bad_length
```



---
## test_dtype
```python
from test_twodim_base import test_dtype
```



---
## test_triu_indices
```python
from test_twodim_base import test_triu_indices
```



---
## test_exceptions
```python
from test_twodim_base import test_exceptions
```



---
## test_dtypes
```python
from test_twodim_base import test_dtypes
```



---
## ShouldDispatch
```python
from test_twodim_base import ShouldDispatch
```



---
## __array_function__
```python
from test_twodim_base import __array_function__
```



---
## __name__
```python
from test_polynomial import __name__
```

Tests for polynomial module.

---
## TestPolynomial
```python
from test_polynomial import TestPolynomial
```



---
## test_poly1d_str_and_repr
```python
from test_polynomial import test_poly1d_str_and_repr
```



---
## test_poly1d_resolution
```python
from test_polynomial import test_poly1d_resolution
```



---
## test_poly1d_math
```python
from test_polynomial import test_poly1d_math
```



---
## test_poly1d_misc
```python
from test_polynomial import test_poly1d_misc
```



---
## test_poly1d_variable_arg
```python
from test_polynomial import test_poly1d_variable_arg
```



---
## test_poly
```python
from test_polynomial import test_poly
```



---
## test_roots
```python
from test_polynomial import test_roots
```



---
## test_str_leading_zeros
```python
from test_polynomial import test_str_leading_zeros
```



---
## test_polyfit
```python
from test_polynomial import test_polyfit
```



---
## test_objects
```python
from test_polynomial import test_objects
```



---
## test_complex
```python
from test_polynomial import test_complex
```



---
## test_integ_coeffs
```python
from test_polynomial import test_integ_coeffs
```



---
## test_zero_dims
```python
from test_polynomial import test_zero_dims
```



---
## test_poly_int_overflow
```python
from test_polynomial import test_poly_int_overflow
```

Regression test for gh-5096.

---
## test_zero_poly_dtype
```python
from test_polynomial import test_zero_poly_dtype
```

Regression test for gh-16354.

---
## test_poly_eq
```python
from test_polynomial import test_poly_eq
```



---
## test_polydiv
```python
from test_polynomial import test_polydiv
```



---
## test_poly_coeffs_mutable
```python
from test_polynomial import test_poly_coeffs_mutable
```

Coefficients should be modifiable 

---
## __name__
```python
from test__iotools import __name__
```



---
## TestLineSplitter
```python
from test__iotools import TestLineSplitter
```

Tests the LineSplitter class.

---
## TestNameValidator
```python
from test__iotools import TestNameValidator
```



---
## _bytes_to_date
```python
from test__iotools import _bytes_to_date
```



---
## TestStringConverter
```python
from test__iotools import TestStringConverter
```

Test StringConverter

---
## TestMiscFunctions
```python
from test__iotools import TestMiscFunctions
```



---
## test_no_delimiter
```python
from test__iotools import test_no_delimiter
```

Test LineSplitter w/o delimiter

---
## test_space_delimiter
```python
from test__iotools import test_space_delimiter
```

Test space delimiter

---
## test_tab_delimiter
```python
from test__iotools import test_tab_delimiter
```

Test tab delimiter

---
## test_other_delimiter
```python
from test__iotools import test_other_delimiter
```

Test LineSplitter on delimiter

---
## test_constant_fixed_width
```python
from test__iotools import test_constant_fixed_width
```

Test LineSplitter w/ fixed-width fields

---
## test_variable_fixed_width
```python
from test__iotools import test_variable_fixed_width
```



---
## test_case_sensitivity
```python
from test__iotools import test_case_sensitivity
```

Test case sensitivity

---
## test_excludelist
```python
from test__iotools import test_excludelist
```

Test excludelist

---
## test_missing_names
```python
from test__iotools import test_missing_names
```

Test validate missing names

---
## test_validate_nb_names
```python
from test__iotools import test_validate_nb_names
```

Test validate nb names

---
## test_validate_wo_names
```python
from test__iotools import test_validate_wo_names
```

Test validate no names

---
## test_creation
```python
from test__iotools import test_creation
```

Test creation of a StringConverter

---
## test_upgrade
```python
from test__iotools import test_upgrade
```

Tests the upgrade method.

---
## test_missing
```python
from test__iotools import test_missing
```

Tests the use of missing values.

---
## test_upgrademapper
```python
from test__iotools import test_upgrademapper
```

Tests updatemapper

---
## test_string_to_object
```python
from test__iotools import test_string_to_object
```

Make sure that string-to-object functions are properly recognized

---
## test_keep_default
```python
from test__iotools import test_keep_default
```

Make sure we don't lose an explicit default

---
## test_keep_default_zero
```python
from test__iotools import test_keep_default_zero
```

Check that we don't lose a default of 0

---
## test_keep_missing_values
```python
from test__iotools import test_keep_missing_values
```

Check that we're not losing missing values

---
## test_int64_dtype
```python
from test__iotools import test_int64_dtype
```

Check that int64 integer types can be specified

---
## test_uint64_dtype
```python
from test__iotools import test_uint64_dtype
```

Check that uint64 integer types can be specified

---
## test_has_nested_dtype
```python
from test__iotools import test_has_nested_dtype
```

Test has_nested_dtype

---
## test_easy_dtype
```python
from test__iotools import test_easy_dtype
```

Test ndtype on dtypes

---
## test_flatten_dtype
```python
from test__iotools import test_flatten_dtype
```

Testing flatten_dtype

---
## _add_keepdims
```python
from test_shape_base import _add_keepdims
```

hack in keepdims behavior into a function taking an axis 

---
## TestTakeAlongAxis
```python
from test_shape_base import TestTakeAlongAxis
```



---
## TestPutAlongAxis
```python
from test_shape_base import TestPutAlongAxis
```



---
## TestApplyAlongAxis
```python
from test_shape_base import TestApplyAlongAxis
```



---
## TestApplyOverAxes
```python
from test_shape_base import TestApplyOverAxes
```



---
## TestExpandDims
```python
from test_shape_base import TestExpandDims
```



---
## TestArraySplit
```python
from test_shape_base import TestArraySplit
```



---
## TestSplit
```python
from test_shape_base import TestSplit
```



---
## TestColumnStack
```python
from test_shape_base import TestColumnStack
```



---
## TestDstack
```python
from test_shape_base import TestDstack
```



---
## TestHsplit
```python
from test_shape_base import TestHsplit
```

Only testing for integer splits.

    

---
## TestVsplit
```python
from test_shape_base import TestVsplit
```

Only testing for integer splits.

    

---
## TestDsplit
```python
from test_shape_base import TestDsplit
```



---
## TestSqueeze
```python
from test_shape_base import TestSqueeze
```



---
## TestKron
```python
from test_shape_base import TestKron
```



---
## TestTile
```python
from test_shape_base import TestTile
```



---
## TestMayShareMemory
```python
from test_shape_base import TestMayShareMemory
```



---
## compare_results
```python
from test_shape_base import compare_results
```

Compare lists of arrays.

---
## wrapped
```python
from test_shape_base import wrapped
```



---
## test_argequivalent
```python
from test_shape_base import test_argequivalent
```

Test it translates from arg<func> to <func> 

---
## test_invalid
```python
from test_shape_base import test_invalid
```

Test it errors when indices has too few dimensions 

---
## test_empty
```python
from test_shape_base import test_empty
```



---
## test_broadcast
```python
from test_shape_base import test_broadcast
```

Test that non-indexing dimensions are broadcast in both directions 

---
## test_replace_max
```python
from test_shape_base import test_replace_max
```



---
## test_simple
```python
from test_shape_base import test_simple
```



---
## test_simple101
```python
from test_shape_base import test_simple101
```



---
## test_preserve_subclass
```python
from test_shape_base import test_preserve_subclass
```



---
## test_subclass
```python
from test_shape_base import test_subclass
```



---
## test_scalar_array
```python
from test_shape_base import test_scalar_array
```



---
## test_0d_array
```python
from test_shape_base import test_0d_array
```



---
## test_axis_insertion
```python
from test_shape_base import test_axis_insertion
```



---
## test_subclass_preservation
```python
from test_shape_base import test_subclass_preservation
```



---
## test_axis_insertion_ma
```python
from test_shape_base import test_axis_insertion_ma
```



---
## test_tuple_func1d
```python
from test_shape_base import test_tuple_func1d
```



---
## test_with_iterable_object
```python
from test_shape_base import test_with_iterable_object
```



---
## test_functionality
```python
from test_shape_base import test_functionality
```



---
## test_axis_tuple
```python
from test_shape_base import test_axis_tuple
```



---
## test_axis_out_of_range
```python
from test_shape_base import test_axis_out_of_range
```



---
## test_repeated_axis
```python
from test_shape_base import test_repeated_axis
```



---
## test_subclasses
```python
from test_shape_base import test_subclasses
```



---
## test_integer_0_split
```python
from test_shape_base import test_integer_0_split
```



---
## test_integer_split
```python
from test_shape_base import test_integer_split
```



---
## test_integer_split_2D_rows
```python
from test_shape_base import test_integer_split_2D_rows
```



---
## test_integer_split_2D_cols
```python
from test_shape_base import test_integer_split_2D_cols
```



---
## test_integer_split_2D_default
```python
from test_shape_base import test_integer_split_2D_default
```

This will fail if we change default axis
        

---
## test_integer_split_2D_rows_greater_max_int32
```python
from test_shape_base import test_integer_split_2D_rows_greater_max_int32
```



---
## test_index_split_simple
```python
from test_shape_base import test_index_split_simple
```



---
## test_index_split_low_bound
```python
from test_shape_base import test_index_split_low_bound
```



---
## test_index_split_high_bound
```python
from test_shape_base import test_index_split_high_bound
```



---
## test_equal_split
```python
from test_shape_base import test_equal_split
```



---
## test_unequal_split
```python
from test_shape_base import test_unequal_split
```



---
## test_1D_arrays
```python
from test_shape_base import test_1D_arrays
```



---
## test_2D_arrays
```python
from test_shape_base import test_2D_arrays
```



---
## test_basic
```python
from test_shape_base import test_basic
```



---
## test_return_type
```python
from test_shape_base import test_return_type
```



---
## test_kron_smoke
```python
from test_shape_base import test_kron_smoke
```



---
## test_kron_ma
```python
from test_shape_base import test_kron_ma
```



---
## test_kron_shape
```python
from test_shape_base import test_kron_shape
```



---
## test_tile_one_repetition_on_array_gh4679
```python
from test_shape_base import test_tile_one_repetition_on_array_gh4679
```



---
## test_kroncompare
```python
from test_shape_base import test_kroncompare
```



---
## double
```python
from test_shape_base import double
```



---
## MyNDArray
```python
from test_shape_base import MyNDArray
```



---
## MinimalSubclass
```python
from test_shape_base import MinimalSubclass
```



---
## minimal_function
```python
from test_shape_base import minimal_function
```



---
## sum_to_0d
```python
from test_shape_base import sum_to_0d
```

Sum x, returning a 0d array of the same class 

---
## f1to2
```python
from test_shape_base import f1to2
```

produces an asymmetric non-square matrix from x

---
## sample_1d
```python
from test_shape_base import sample_1d
```



---
## never_call
```python
from test_shape_base import never_call
```



---
## empty_to_1
```python
from test_shape_base import empty_to_1
```



---
## myarray
```python
from test_shape_base import myarray
```



---
## __name__
```python
from test_ufunclike import __name__
```



---
## TestUfunclike
```python
from test_ufunclike import TestUfunclike
```



---
## test_isposinf
```python
from test_ufunclike import test_isposinf
```



---
## test_isneginf
```python
from test_ufunclike import test_isneginf
```



---
## test_fix
```python
from test_ufunclike import test_fix
```



---
## test_fix_with_subclass
```python
from test_ufunclike import test_fix_with_subclass
```



---
## test_scalar
```python
from test_ufunclike import test_scalar
```



---
## MyArray
```python
from test_ufunclike import MyArray
```



---
## __new__
```python
from test_ufunclike import __new__
```



---
## __array_wrap__
```python
from test_ufunclike import __array_wrap__
```



---
## __array_finalize__
```python
from test_ufunclike import __array_finalize__
```



---
## __name__
```python
from test_index_tricks import __name__
```



---
## TestRavelUnravelIndex
```python
from test_index_tricks import TestRavelUnravelIndex
```



---
## TestGrid
```python
from test_index_tricks import TestGrid
```



---
## TestConcatenator
```python
from test_index_tricks import TestConcatenator
```



---
## TestNdenumerate
```python
from test_index_tricks import TestNdenumerate
```



---
## TestIndexExpression
```python
from test_index_tricks import TestIndexExpression
```



---
## TestIx_
```python
from test_index_tricks import TestIx_
```



---
## test_c_
```python
from test_index_tricks import test_c_
```



---
## TestFillDiagonal
```python
from test_index_tricks import TestFillDiagonal
```



---
## test_diag_indices
```python
from test_index_tricks import test_diag_indices
```



---
## TestDiagIndicesFrom
```python
from test_index_tricks import TestDiagIndicesFrom
```



---
## test_ndindex
```python
from test_index_tricks import test_ndindex
```



---
## test_basic
```python
from test_index_tricks import test_basic
```



---
## test_empty_indices
```python
from test_index_tricks import test_empty_indices
```



---
## test_big_indices
```python
from test_index_tricks import test_big_indices
```



---
## test_dtypes
```python
from test_index_tricks import test_dtypes
```



---
## test_clipmodes
```python
from test_index_tricks import test_clipmodes
```



---
## test_writeability
```python
from test_index_tricks import test_writeability
```



---
## test_0d
```python
from test_index_tricks import test_0d
```



---
## test_empty_array_ravel
```python
from test_index_tricks import test_empty_array_ravel
```



---
## test_empty_array_unravel
```python
from test_index_tricks import test_empty_array_unravel
```



---
## test_linspace_equivalence
```python
from test_index_tricks import test_linspace_equivalence
```



---
## test_nd
```python
from test_index_tricks import test_nd
```



---
## test_sparse
```python
from test_index_tricks import test_sparse
```



---
## test_mgrid_size_none_handling
```python
from test_index_tricks import test_mgrid_size_none_handling
```



---
## test_accepts_npfloating
```python
from test_index_tricks import test_accepts_npfloating
```



---
## test_accepts_longdouble
```python
from test_index_tricks import test_accepts_longdouble
```



---
## test_accepts_npcomplexfloating
```python
from test_index_tricks import test_accepts_npcomplexfloating
```



---
## test_1d
```python
from test_index_tricks import test_1d
```



---
## test_mixed_type
```python
from test_index_tricks import test_mixed_type
```



---
## test_more_mixed_type
```python
from test_index_tricks import test_more_mixed_type
```



---
## test_complex_step
```python
from test_index_tricks import test_complex_step
```



---
## test_2d
```python
from test_index_tricks import test_2d
```



---
## test_regression_1
```python
from test_index_tricks import test_regression_1
```



---
## test_simple_1
```python
from test_index_tricks import test_simple_1
```



---
## test_shape_and_dtype
```python
from test_index_tricks import test_shape_and_dtype
```



---
## test_bool
```python
from test_index_tricks import test_bool
```



---
## test_1d_only
```python
from test_index_tricks import test_1d_only
```



---
## test_repeated_input
```python
from test_index_tricks import test_repeated_input
```



---
## test_tall_matrix
```python
from test_index_tricks import test_tall_matrix
```



---
## test_tall_matrix_wrap
```python
from test_index_tricks import test_tall_matrix_wrap
```



---
## test_wide_matrix
```python
from test_index_tricks import test_wide_matrix
```



---
## test_operate_4d_array
```python
from test_index_tricks import test_operate_4d_array
```



---
## test_low_dim_handling
```python
from test_index_tricks import test_low_dim_handling
```



---
## test_hetero_shape_handling
```python
from test_index_tricks import test_hetero_shape_handling
```



---
## test_diag_indices_from
```python
from test_index_tricks import test_diag_indices_from
```



---
## test_error_small_input
```python
from test_index_tricks import test_error_small_input
```



---
## test_error_shape_mismatch
```python
from test_index_tricks import test_error_shape_mismatch
```



---
## __name__
```python
from test_arrayterator import __name__
```



---
## test
```python
from test_arrayterator import test
```



---
## __name__
```python
from test__version import __name__
```

Tests for the NumpyVersion class.

---
## test_main_versions
```python
from test__version import test_main_versions
```



---
## test_version_1_point_10
```python
from test__version import test_version_1_point_10
```



---
## test_alpha_beta_rc
```python
from test__version import test_alpha_beta_rc
```



---
## test_dev_version
```python
from test__version import test_dev_version
```



---
## test_dev_a_b_rc_mixed
```python
from test__version import test_dev_a_b_rc_mixed
```



---
## test_dev0_version
```python
from test__version import test_dev0_version
```



---
## test_dev0_a_b_rc_mixed
```python
from test__version import test_dev0_a_b_rc_mixed
```



---
## test_raises
```python
from test__version import test_raises
```



---
## TextIO
```python
from test_io import TextIO
```

Helper IO class.

Writes encode strings to bytes if needed, reads return bytes.
This makes it easier to emulate files opened in binary mode
without needing to explicitly convert strings to bytes in
setting up the test data.

---
## strptime
```python
from test_io import strptime
```

This function is available in the datetime module only from Python >=
2.5.

---
## RoundtripTest
```python
from test_io import RoundtripTest
```



---
## TestSaveLoad
```python
from test_io import TestSaveLoad
```



---
## TestSavezLoad
```python
from test_io import TestSavezLoad
```



---
## TestSaveTxt
```python
from test_io import TestSaveTxt
```



---
## LoadTxtBase
```python
from test_io import LoadTxtBase
```



---
## TestLoadTxt
```python
from test_io import TestLoadTxt
```



---
## Testfromregex
```python
from test_io import Testfromregex
```



---
## TestFromTxt
```python
from test_io import TestFromTxt
```



---
## TestPathUsage
```python
from test_io import TestPathUsage
```



---
## test_gzip_load
```python
from test_io import test_gzip_load
```



---
## JustWriter
```python
from test_io import JustWriter
```



---
## JustReader
```python
from test_io import JustReader
```



---
## test_ducktyping
```python
from test_io import test_ducktyping
```



---
## test_gzip_loadtxt
```python
from test_io import test_gzip_loadtxt
```



---
## test_gzip_loadtxt_from_string
```python
from test_io import test_gzip_loadtxt_from_string
```



---
## test_npzfile_dict
```python
from test_io import test_npzfile_dict
```



---
## test_load_refcount
```python
from test_io import test_load_refcount
```



---
## test_load_multiple_arrays_until_eof
```python
from test_io import test_load_multiple_arrays_until_eof
```



---
## __init__
```python
from test_io import __init__
```



---
## write
```python
from test_io import write
```



---
## writelines
```python
from test_io import writelines
```



---
## roundtrip
```python
from test_io import roundtrip
```



---
## check_roundtrips
```python
from test_io import check_roundtrips
```



---
## test_array
```python
from test_io import test_array
```



---
## test_array_object
```python
from test_io import test_array_object
```



---
## test_1D
```python
from test_io import test_1D
```



---
## test_mmap
```python
from test_io import test_mmap
```



---
## test_record
```python
from test_io import test_record
```



---
## test_format_2_0
```python
from test_io import test_format_2_0
```



---
## test_big_arrays
```python
from test_io import test_big_arrays
```



---
## test_multiple_arrays
```python
from test_io import test_multiple_arrays
```



---
## test_named_arrays
```python
from test_io import test_named_arrays
```



---
## test_tuple_getitem_raises
```python
from test_io import test_tuple_getitem_raises
```



---
## test_BagObj
```python
from test_io import test_BagObj
```



---
## test_savez_filename_clashes
```python
from test_io import test_savez_filename_clashes
```



---
## test_not_closing_opened_fid
```python
from test_io import test_not_closing_opened_fid
```



---
## test_closing_fid
```python
from test_io import test_closing_fid
```



---
## test_closing_zipfile_after_load
```python
from test_io import test_closing_zipfile_after_load
```



---
## test_repr_lists_keys
```python
from test_io import test_repr_lists_keys
```



---
## test_0D_3D
```python
from test_io import test_0D_3D
```



---
## test_structured
```python
from test_io import test_structured
```



---
## test_structured_padded
```python
from test_io import test_structured_padded
```



---
## test_multifield_view
```python
from test_io import test_multifield_view
```



---
## test_delimiter
```python
from test_io import test_delimiter
```



---
## test_format
```python
from test_io import test_format
```



---
## test_header_footer
```python
from test_io import test_header_footer
```



---
## test_file_roundtrip
```python
from test_io import test_file_roundtrip
```



---
## test_complex_arrays
```python
from test_io import test_complex_arrays
```



---
## test_complex_negative_exponent
```python
from test_io import test_complex_negative_exponent
```



---
## test_custom_writer
```python
from test_io import test_custom_writer
```



---
## test_unicode
```python
from test_io import test_unicode
```



---
## test_unicode_roundtrip
```python
from test_io import test_unicode_roundtrip
```



---
## test_unicode_bytestream
```python
from test_io import test_unicode_bytestream
```



---
## test_unicode_stringstream
```python
from test_io import test_unicode_stringstream
```



---
## test_unicode_and_bytes_fmt
```python
from test_io import test_unicode_and_bytes_fmt
```



---
## test_large_zip
```python
from test_io import test_large_zip
```



---
## check_compressed
```python
from test_io import check_compressed
```



---
## test_compressed_gzip
```python
from test_io import test_compressed_gzip
```



---
## test_compressed_bz2
```python
from test_io import test_compressed_bz2
```



---
## test_compressed_lzma
```python
from test_io import test_compressed_lzma
```



---
## test_encoding
```python
from test_io import test_encoding
```



---
## test_stringload
```python
from test_io import test_stringload
```



---
## test_binary_decode
```python
from test_io import test_binary_decode
```



---
## test_converters_decode
```python
from test_io import test_converters_decode
```



---
## test_converters_nodecode
```python
from test_io import test_converters_nodecode
```



---
## setup_method
```python
from test_io import setup_method
```



---
## teardown_method
```python
from test_io import teardown_method
```



---
## test_missing
```python
from test_io import test_missing
```



---
## test_converters_with_usecols
```python
from test_io import test_converters_with_usecols
```



---
## test_comments_unicode
```python
from test_io import test_comments_unicode
```



---
## test_comments_byte
```python
from test_io import test_comments_byte
```



---
## test_comments_multiple
```python
from test_io import test_comments_multiple
```



---
## test_comments_multi_chars
```python
from test_io import test_comments_multi_chars
```



---
## test_skiprows
```python
from test_io import test_skiprows
```



---
## test_usecols
```python
from test_io import test_usecols
```



---
## test_bad_usecols
```python
from test_io import test_bad_usecols
```



---
## test_fancy_dtype
```python
from test_io import test_fancy_dtype
```



---
## test_shaped_dtype
```python
from test_io import test_shaped_dtype
```



---
## test_3d_shaped_dtype
```python
from test_io import test_3d_shaped_dtype
```



---
## test_str_dtype
```python
from test_io import test_str_dtype
```



---
## test_empty_file
```python
from test_io import test_empty_file
```



---
## test_unused_converter
```python
from test_io import test_unused_converter
```



---
## test_dtype_with_object
```python
from test_io import test_dtype_with_object
```



---
## test_uint64_type
```python
from test_io import test_uint64_type
```



---
## test_int64_type
```python
from test_io import test_int64_type
```



---
## test_from_float_hex
```python
from test_io import test_from_float_hex
```



---
## test_default_float_converter_no_default_hex_conversion
```python
from test_io import test_default_float_converter_no_default_hex_conversion
```

Ensure that fromhex is only used for values with the correct prefix and
is not called by default. Regression test related to gh-19598.

---
## test_default_float_converter_exception
```python
from test_io import test_default_float_converter_exception
```

Ensure that the exception message raised during failed floating point
conversion is correct. Regression test related to gh-19598.

---
## test_from_complex
```python
from test_io import test_from_complex
```



---
## test_complex_misformatted
```python
from test_io import test_complex_misformatted
```



---
## test_universal_newline
```python
from test_io import test_universal_newline
```



---
## test_empty_field_after_tab
```python
from test_io import test_empty_field_after_tab
```



---
## test_unpack_structured
```python
from test_io import test_unpack_structured
```



---
## test_ndmin_keyword
```python
from test_io import test_ndmin_keyword
```



---
## test_generator_source
```python
from test_io import test_generator_source
```



---
## test_bad_line
```python
from test_io import test_bad_line
```



---
## test_none_as_string
```python
from test_io import test_none_as_string
```



---
## test_binary_load
```python
from test_io import test_binary_load
```



---
## test_max_rows
```python
from test_io import test_max_rows
```



---
## test_max_rows_with_skiprows
```python
from test_io import test_max_rows_with_skiprows
```



---
## test_max_rows_with_read_continuation
```python
from test_io import test_max_rows_with_read_continuation
```



---
## test_max_rows_larger
```python
from test_io import test_max_rows_larger
```



---
## test_max_rows_empty_lines
```python
from test_io import test_max_rows_empty_lines
```



---
## test_record_2
```python
from test_io import test_record_2
```



---
## test_record_3
```python
from test_io import test_record_3
```



---
## test_record_unicode
```python
from test_io import test_record_unicode
```



---
## test_compiled_bytes
```python
from test_io import test_compiled_bytes
```



---
## test_bad_dtype_not_structured
```python
from test_io import test_bad_dtype_not_structured
```



---
## test_comments
```python
from test_io import test_comments
```



---
## test_skip_footer
```python
from test_io import test_skip_footer
```



---
## test_skip_footer_with_invalid
```python
from test_io import test_skip_footer_with_invalid
```



---
## test_header
```python
from test_io import test_header
```



---
## test_auto_dtype
```python
from test_io import test_auto_dtype
```



---
## test_auto_dtype_uniform
```python
from test_io import test_auto_dtype_uniform
```



---
## test_names_overwrite
```python
from test_io import test_names_overwrite
```



---
## test_bad_fname
```python
from test_io import test_bad_fname
```



---
## test_commented_header
```python
from test_io import test_commented_header
```



---
## test_names_and_comments_none
```python
from test_io import test_names_and_comments_none
```



---
## test_file_is_closed_on_error
```python
from test_io import test_file_is_closed_on_error
```



---
## test_autonames_and_usecols
```python
from test_io import test_autonames_and_usecols
```



---
## test_converters_with_usecols_and_names
```python
from test_io import test_converters_with_usecols_and_names
```



---
## test_converters_cornercases
```python
from test_io import test_converters_cornercases
```



---
## test_converters_cornercases2
```python
from test_io import test_converters_cornercases2
```



---
## test_invalid_converter
```python
from test_io import test_invalid_converter
```



---
## test_tricky_converter_bug1666
```python
from test_io import test_tricky_converter_bug1666
```



---
## test_dtype_with_converters
```python
from test_io import test_dtype_with_converters
```



---
## test_dtype_with_converters_and_usecols
```python
from test_io import test_dtype_with_converters_and_usecols
```



---
## test_dtype_with_object_no_converter
```python
from test_io import test_dtype_with_object_no_converter
```



---
## test_userconverters_with_explicit_dtype
```python
from test_io import test_userconverters_with_explicit_dtype
```



---
## test_utf8_userconverters_with_explicit_dtype
```python
from test_io import test_utf8_userconverters_with_explicit_dtype
```



---
## test_spacedelimiter
```python
from test_io import test_spacedelimiter
```



---
## test_integer_delimiter
```python
from test_io import test_integer_delimiter
```



---
## test_missing_with_tabs
```python
from test_io import test_missing_with_tabs
```



---
## test_usecols_as_css
```python
from test_io import test_usecols_as_css
```



---
## test_usecols_with_structured_dtype
```python
from test_io import test_usecols_with_structured_dtype
```



---
## test_usecols_with_integer
```python
from test_io import test_usecols_with_integer
```



---
## test_usecols_with_named_columns
```python
from test_io import test_usecols_with_named_columns
```



---
## test_fancy_dtype_alt
```python
from test_io import test_fancy_dtype_alt
```



---
## test_withmissing
```python
from test_io import test_withmissing
```



---
## test_user_missing_values
```python
from test_io import test_user_missing_values
```



---
## test_user_filling_values
```python
from test_io import test_user_filling_values
```



---
## test_withmissing_float
```python
from test_io import test_withmissing_float
```



---
## test_with_masked_column_uniform
```python
from test_io import test_with_masked_column_uniform
```



---
## test_with_masked_column_various
```python
from test_io import test_with_masked_column_various
```



---
## test_invalid_raise
```python
from test_io import test_invalid_raise
```



---
## test_invalid_raise_with_usecols
```python
from test_io import test_invalid_raise_with_usecols
```



---
## test_inconsistent_dtype
```python
from test_io import test_inconsistent_dtype
```



---
## test_default_field_format
```python
from test_io import test_default_field_format
```



---
## test_single_dtype_wo_names
```python
from test_io import test_single_dtype_wo_names
```



---
## test_single_dtype_w_explicit_names
```python
from test_io import test_single_dtype_w_explicit_names
```



---
## test_single_dtype_w_implicit_names
```python
from test_io import test_single_dtype_w_implicit_names
```



---
## test_easy_structured_dtype
```python
from test_io import test_easy_structured_dtype
```



---
## test_autostrip
```python
from test_io import test_autostrip
```



---
## test_replace_space
```python
from test_io import test_replace_space
```



---
## test_replace_space_known_dtype
```python
from test_io import test_replace_space_known_dtype
```



---
## test_incomplete_names
```python
from test_io import test_incomplete_names
```



---
## test_names_auto_completion
```python
from test_io import test_names_auto_completion
```



---
## test_names_with_usecols_bug1636
```python
from test_io import test_names_with_usecols_bug1636
```



---
## test_fixed_width_names
```python
from test_io import test_fixed_width_names
```



---
## test_filling_values
```python
from test_io import test_filling_values
```



---
## test_comments_is_none
```python
from test_io import test_comments_is_none
```



---
## test_latin1
```python
from test_io import test_latin1
```



---
## test_binary_decode_autodtype
```python
from test_io import test_binary_decode_autodtype
```



---
## test_utf8_byte_encoding
```python
from test_io import test_utf8_byte_encoding
```



---
## test_utf8_file
```python
from test_io import test_utf8_file
```



---
## test_utf8_file_nodtype_unicode
```python
from test_io import test_utf8_file_nodtype_unicode
```



---
## test_recfromtxt
```python
from test_io import test_recfromtxt
```



---
## test_recfromcsv
```python
from test_io import test_recfromcsv
```



---
## test_gft_using_filename
```python
from test_io import test_gft_using_filename
```



---
## test_gft_from_gzip
```python
from test_io import test_gft_from_gzip
```



---
## test_gft_using_generator
```python
from test_io import test_gft_using_generator
```



---
## test_auto_dtype_largeint
```python
from test_io import test_auto_dtype_largeint
```



---
## test_unpack_float_data
```python
from test_io import test_unpack_float_data
```



---
## test_unpack_auto_dtype
```python
from test_io import test_unpack_auto_dtype
```



---
## test_unpack_single_name
```python
from test_io import test_unpack_single_name
```



---
## test_squeeze_scalar
```python
from test_io import test_squeeze_scalar
```



---
## test_loadtxt
```python
from test_io import test_loadtxt
```



---
## test_save_load
```python
from test_io import test_save_load
```



---
## test_save_load_memmap
```python
from test_io import test_save_load_memmap
```



---
## test_save_load_memmap_readwrite
```python
from test_io import test_save_load_memmap_readwrite
```



---
## test_savez_load
```python
from test_io import test_savez_load
```



---
## test_savez_compressed_load
```python
from test_io import test_savez_compressed_load
```



---
## test_genfromtxt
```python
from test_io import test_genfromtxt
```



---
## flush
```python
from test_io import flush
```



---
## read
```python
from test_io import read
```



---
## seek
```python
from test_io import seek
```



---
## writer
```python
from test_io import writer
```



---
## CustomWriter
```python
from test_io import CustomWriter
```



---
## check_large_zip
```python
from test_io import check_large_zip
```



---
## CrazyInt
```python
from test_io import CrazyInt
```



---
## count
```python
from test_io import count
```



---
## f
```python
from test_io import f
```



---
## __index__
```python
from test_io import __index__
```



---
## __name__
```python
from test_arraysetops import __name__
```

Test functions for 1D array set operations.

---
## TestSetOps
```python
from test_arraysetops import TestSetOps
```



---
## TestUnique
```python
from test_arraysetops import TestUnique
```



---
## test_intersect1d
```python
from test_arraysetops import test_intersect1d
```



---
## test_intersect1d_array_like
```python
from test_arraysetops import test_intersect1d_array_like
```



---
## test_intersect1d_indices
```python
from test_arraysetops import test_intersect1d_indices
```



---
## test_setxor1d
```python
from test_arraysetops import test_setxor1d
```



---
## test_ediff1d
```python
from test_arraysetops import test_ediff1d
```



---
## test_ediff1d_forbidden_type_casts
```python
from test_arraysetops import test_ediff1d_forbidden_type_casts
```



---
## test_ediff1d_scalar_handling
```python
from test_arraysetops import test_ediff1d_scalar_handling
```



---
## test_isin
```python
from test_arraysetops import test_isin
```



---
## test_in1d
```python
from test_arraysetops import test_in1d
```



---
## test_in1d_char_array
```python
from test_arraysetops import test_in1d_char_array
```



---
## test_in1d_invert
```python
from test_arraysetops import test_in1d_invert
```

Test in1d's invert parameter

---
## test_in1d_ravel
```python
from test_arraysetops import test_in1d_ravel
```



---
## test_in1d_hit_alternate_algorithm
```python
from test_arraysetops import test_in1d_hit_alternate_algorithm
```

Hit the standard isin code with integers

---
## test_in1d_boolean
```python
from test_arraysetops import test_in1d_boolean
```

Test that in1d works for boolean input

---
## test_in1d_timedelta
```python
from test_arraysetops import test_in1d_timedelta
```

Test that in1d works for timedelta input

---
## test_in1d_table_timedelta_fails
```python
from test_arraysetops import test_in1d_table_timedelta_fails
```



---
## test_in1d_mixed_dtype
```python
from test_arraysetops import test_in1d_mixed_dtype
```

Test that in1d works as expected for mixed dtype input.

---
## test_in1d_mixed_boolean
```python
from test_arraysetops import test_in1d_mixed_boolean
```

Test that in1d works as expected for bool/int input.

---
## test_in1d_first_array_is_object
```python
from test_arraysetops import test_in1d_first_array_is_object
```



---
## test_in1d_second_array_is_object
```python
from test_arraysetops import test_in1d_second_array_is_object
```



---
## test_in1d_both_arrays_are_object
```python
from test_arraysetops import test_in1d_both_arrays_are_object
```



---
## test_in1d_both_arrays_have_structured_dtype
```python
from test_arraysetops import test_in1d_both_arrays_have_structured_dtype
```



---
## test_in1d_with_arrays_containing_tuples
```python
from test_arraysetops import test_in1d_with_arrays_containing_tuples
```



---
## test_in1d_errors
```python
from test_arraysetops import test_in1d_errors
```

Test that in1d raises expected errors.

---
## test_union1d
```python
from test_arraysetops import test_union1d
```



---
## test_setdiff1d
```python
from test_arraysetops import test_setdiff1d
```



---
## test_setdiff1d_unique
```python
from test_arraysetops import test_setdiff1d_unique
```



---
## test_setdiff1d_char_array
```python
from test_arraysetops import test_setdiff1d_char_array
```



---
## test_manyways
```python
from test_arraysetops import test_manyways
```



---
## test_unique_1d
```python
from test_arraysetops import test_unique_1d
```



---
## test_unique_axis_errors
```python
from test_arraysetops import test_unique_axis_errors
```



---
## test_unique_axis_list
```python
from test_arraysetops import test_unique_axis_list
```



---
## test_unique_axis
```python
from test_arraysetops import test_unique_axis
```



---
## test_unique_1d_with_axis
```python
from test_arraysetops import test_unique_1d_with_axis
```



---
## test_unique_axis_zeros
```python
from test_arraysetops import test_unique_axis_zeros
```



---
## test_unique_masked
```python
from test_arraysetops import test_unique_masked
```



---
## test_unique_sort_order_with_axis
```python
from test_arraysetops import test_unique_sort_order_with_axis
```



---
## _run_axis_tests
```python
from test_arraysetops import _run_axis_tests
```



---
## test_unique_nanequals
```python
from test_arraysetops import test_unique_nanequals
```



---
## Test
```python
from test_arraysetops import Test
```



---
## _isin_slow
```python
from test_arraysetops import _isin_slow
```



---
## assert_isin_equal
```python
from test_arraysetops import assert_isin_equal
```



---
## check_all
```python
from test_arraysetops import check_all
```



---
## __array__
```python
from test_arraysetops import __array__
```



---
## get_mat
```python
from test_function_base import get_mat
```



---
## _make_complex
```python
from test_function_base import _make_complex
```

Like real + 1j * imag, but behaves as expected when imag contains non-finite
values

---
## TestRot90
```python
from test_function_base import TestRot90
```



---
## TestFlip
```python
from test_function_base import TestFlip
```



---
## TestAny
```python
from test_function_base import TestAny
```



---
## TestAll
```python
from test_function_base import TestAll
```



---
## TestCopy
```python
from test_function_base import TestCopy
```



---
## TestAverage
```python
from test_function_base import TestAverage
```



---
## TestSelect
```python
from test_function_base import TestSelect
```



---
## TestInsert
```python
from test_function_base import TestInsert
```



---
## TestAmax
```python
from test_function_base import TestAmax
```



---
## TestAmin
```python
from test_function_base import TestAmin
```



---
## TestPtp
```python
from test_function_base import TestPtp
```



---
## TestCumsum
```python
from test_function_base import TestCumsum
```



---
## TestProd
```python
from test_function_base import TestProd
```



---
## TestCumprod
```python
from test_function_base import TestCumprod
```



---
## TestDiff
```python
from test_function_base import TestDiff
```



---
## TestDelete
```python
from test_function_base import TestDelete
```



---
## TestGradient
```python
from test_function_base import TestGradient
```



---
## TestAngle
```python
from test_function_base import TestAngle
```



---
## TestTrimZeros
```python
from test_function_base import TestTrimZeros
```



---
## TestExtins
```python
from test_function_base import TestExtins
```



---
## _foo1
```python
from test_function_base import _foo1
```



---
## _foo2
```python
from test_function_base import _foo2
```



---
## TestVectorize
```python
from test_function_base import TestVectorize
```



---
## TestLeaks
```python
from test_function_base import TestLeaks
```



---
## TestDigitize
```python
from test_function_base import TestDigitize
```



---
## TestUnwrap
```python
from test_function_base import TestUnwrap
```



---
## TestFilterwindows
```python
from test_function_base import TestFilterwindows
```



---
## TestTrapz
```python
from test_function_base import TestTrapz
```



---
## TestSinc
```python
from test_function_base import TestSinc
```



---
## TestUnique
```python
from test_function_base import TestUnique
```



---
## TestCheckFinite
```python
from test_function_base import TestCheckFinite
```



---
## TestCorrCoef
```python
from test_function_base import TestCorrCoef
```



---
## TestCov
```python
from test_function_base import TestCov
```



---
## Test_I0
```python
from test_function_base import Test_I0
```



---
## TestKaiser
```python
from test_function_base import TestKaiser
```



---
## TestMsort
```python
from test_function_base import TestMsort
```



---
## TestMeshgrid
```python
from test_function_base import TestMeshgrid
```



---
## TestPiecewise
```python
from test_function_base import TestPiecewise
```



---
## TestBincount
```python
from test_function_base import TestBincount
```



---
## TestInterp
```python
from test_function_base import TestInterp
```



---
## TestPercentile
```python
from test_function_base import TestPercentile
```



---
## TestQuantile
```python
from test_function_base import TestQuantile
```



---
## TestLerp
```python
from test_function_base import TestLerp
```



---
## TestMedian
```python
from test_function_base import TestMedian
```



---
## TestAdd_newdoc_ufunc
```python
from test_function_base import TestAdd_newdoc_ufunc
```



---
## TestAdd_newdoc
```python
from test_function_base import TestAdd_newdoc
```



---
## TestAddDocstring
```python
from test_function_base import TestAddDocstring
```



---
## TestSortComplex
```python
from test_function_base import TestSortComplex
```



---
## test_axes
```python
from test_function_base import test_axes
```



---
## test_rotation_axes
```python
from test_function_base import test_rotation_axes
```



---
## test_basic_lr
```python
from test_function_base import test_basic_lr
```



---
## test_basic_ud
```python
from test_function_base import test_basic_ud
```



---
## test_3d_swap_axis0
```python
from test_function_base import test_3d_swap_axis0
```



---
## test_3d_swap_axis1
```python
from test_function_base import test_3d_swap_axis1
```



---
## test_3d_swap_axis2
```python
from test_function_base import test_3d_swap_axis2
```



---
## test_4d
```python
from test_function_base import test_4d
```



---
## test_default_axis
```python
from test_function_base import test_default_axis
```



---
## test_multiple_axes
```python
from test_function_base import test_multiple_axes
```



---
## test_nd
```python
from test_function_base import test_nd
```



---
## test_order
```python
from test_function_base import test_order
```



---
## test_subok
```python
from test_function_base import test_subok
```



---
## test_basic_keepdims
```python
from test_function_base import test_basic_keepdims
```



---
## test_weights
```python
from test_function_base import test_weights
```



---
## test_returned
```python
from test_function_base import test_returned
```



---
## test_subclasses
```python
from test_function_base import test_subclasses
```



---
## test_upcasting
```python
from test_function_base import test_upcasting
```



---
## test_object_dtype
```python
from test_function_base import test_object_dtype
```



---
## test_average_class_without_dtype
```python
from test_function_base import test_average_class_without_dtype
```



---
## _select
```python
from test_function_base import _select
```



---
## test_broadcasting
```python
from test_function_base import test_broadcasting
```



---
## test_return_dtype
```python
from test_function_base import test_return_dtype
```



---
## test_deprecated_empty
```python
from test_function_base import test_deprecated_empty
```



---
## test_non_bool_deprecation
```python
from test_function_base import test_non_bool_deprecation
```



---
## test_many_arguments
```python
from test_function_base import test_many_arguments
```



---
## test_multidim
```python
from test_function_base import test_multidim
```



---
## test_0d
```python
from test_function_base import test_0d
```



---
## test_index_array_copied
```python
from test_function_base import test_index_array_copied
```



---
## test_structured_array
```python
from test_function_base import test_structured_array
```



---
## test_index_floats
```python
from test_function_base import test_index_floats
```



---
## test_index_out_of_bounds
```python
from test_function_base import test_index_out_of_bounds
```



---
## test_axis
```python
from test_function_base import test_axis
```



---
## test_n
```python
from test_function_base import test_n
```



---
## test_times
```python
from test_function_base import test_times
```



---
## test_prepend
```python
from test_function_base import test_prepend
```



---
## test_append
```python
from test_function_base import test_append
```



---
## setup_method
```python
from test_function_base import setup_method
```



---
## _check_inverse_of_slicing
```python
from test_function_base import _check_inverse_of_slicing
```



---
## test_slices
```python
from test_function_base import test_slices
```



---
## test_fancy
```python
from test_function_base import test_fancy
```



---
## test_single
```python
from test_function_base import test_single
```



---
## test_array_order_preserve
```python
from test_function_base import test_array_order_preserve
```



---
## test_single_item_array
```python
from test_function_base import test_single_item_array
```



---
## test_single_item_array_non_int
```python
from test_function_base import test_single_item_array_non_int
```



---
## test_args
```python
from test_function_base import test_args
```



---
## test_badargs
```python
from test_function_base import test_badargs
```



---
## test_datetime64
```python
from test_function_base import test_datetime64
```



---
## test_masked
```python
from test_function_base import test_masked
```



---
## test_second_order_accurate
```python
from test_function_base import test_second_order_accurate
```



---
## test_spacing
```python
from test_function_base import test_spacing
```



---
## test_specific_axes
```python
from test_function_base import test_specific_axes
```



---
## test_timedelta64
```python
from test_function_base import test_timedelta64
```



---
## test_inexact_dtypes
```python
from test_function_base import test_inexact_dtypes
```



---
## test_values
```python
from test_function_base import test_values
```



---
## test_f_decreasing_unsigned_int
```python
from test_function_base import test_f_decreasing_unsigned_int
```



---
## test_f_signed_int_big_jump
```python
from test_function_base import test_f_signed_int_big_jump
```



---
## test_x_decreasing_unsigned
```python
from test_function_base import test_x_decreasing_unsigned
```



---
## test_x_signed_int_big_jump
```python
from test_function_base import test_x_signed_int_big_jump
```



---
## test_return_type
```python
from test_function_base import test_return_type
```



---
## values
```python
from test_function_base import values
```



---
## test_leading_skip
```python
from test_function_base import test_leading_skip
```



---
## test_trailing_skip
```python
from test_function_base import test_trailing_skip
```



---
## test_all_zero
```python
from test_function_base import test_all_zero
```



---
## test_size_zero
```python
from test_function_base import test_size_zero
```



---
## test_overflow
```python
from test_function_base import test_overflow
```



---
## test_no_trim
```python
from test_function_base import test_no_trim
```



---
## test_list_to_list
```python
from test_function_base import test_list_to_list
```



---
## test_place
```python
from test_function_base import test_place
```



---
## test_both
```python
from test_function_base import test_both
```



---
## test_simple
```python
from test_function_base import test_simple
```



---
## test_scalar
```python
from test_function_base import test_scalar
```



---
## test_large
```python
from test_function_base import test_large
```



---
## test_ufunc
```python
from test_function_base import test_ufunc
```



---
## test_keywords
```python
from test_function_base import test_keywords
```



---
## test_keywords_with_otypes_order1
```python
from test_function_base import test_keywords_with_otypes_order1
```



---
## test_keywords_with_otypes_order2
```python
from test_function_base import test_keywords_with_otypes_order2
```



---
## test_keywords_with_otypes_order3
```python
from test_function_base import test_keywords_with_otypes_order3
```



---
## test_keywords_with_otypes_several_kwd_args1
```python
from test_function_base import test_keywords_with_otypes_several_kwd_args1
```



---
## test_keywords_with_otypes_several_kwd_args2
```python
from test_function_base import test_keywords_with_otypes_several_kwd_args2
```



---
## test_keywords_no_func_code
```python
from test_function_base import test_keywords_no_func_code
```



---
## test_keywords2_ticket_2100
```python
from test_function_base import test_keywords2_ticket_2100
```



---
## test_keywords3_ticket_2100
```python
from test_function_base import test_keywords3_ticket_2100
```



---
## test_keywords4_ticket_2100
```python
from test_function_base import test_keywords4_ticket_2100
```



---
## test_keywords5_ticket_2100
```python
from test_function_base import test_keywords5_ticket_2100
```



---
## test_coverage1_ticket_2100
```python
from test_function_base import test_coverage1_ticket_2100
```



---
## test_assigning_docstring
```python
from test_function_base import test_assigning_docstring
```



---
## test_UnboundMethod_ticket_1156
```python
from test_function_base import test_UnboundMethod_ticket_1156
```



---
## test_execution_order_ticket_1487
```python
from test_function_base import test_execution_order_ticket_1487
```



---
## test_string_ticket_1892
```python
from test_function_base import test_string_ticket_1892
```



---
## test_cache
```python
from test_function_base import test_cache
```



---
## test_otypes
```python
from test_function_base import test_otypes
```



---
## test_parse_gufunc_signature
```python
from test_function_base import test_parse_gufunc_signature
```



---
## test_signature_simple
```python
from test_function_base import test_signature_simple
```



---
## test_signature_mean_last
```python
from test_function_base import test_signature_mean_last
```



---
## test_signature_center
```python
from test_function_base import test_signature_center
```



---
## test_signature_two_outputs
```python
from test_function_base import test_signature_two_outputs
```



---
## test_signature_outer
```python
from test_function_base import test_signature_outer
```



---
## test_signature_computed_size
```python
from test_function_base import test_signature_computed_size
```



---
## test_signature_excluded
```python
from test_function_base import test_signature_excluded
```



---
## test_signature_otypes
```python
from test_function_base import test_signature_otypes
```



---
## test_signature_invalid_inputs
```python
from test_function_base import test_signature_invalid_inputs
```



---
## test_signature_invalid_outputs
```python
from test_function_base import test_signature_invalid_outputs
```



---
## test_size_zero_output
```python
from test_function_base import test_size_zero_output
```



---
## test_name
```python
from test_function_base import test_name
```



---
## test_decorator
```python
from test_function_base import test_decorator
```



---
## test_docstring
```python
from test_function_base import test_docstring
```



---
## test_partial
```python
from test_function_base import test_partial
```



---
## test_signature_otypes_decorator
```python
from test_function_base import test_signature_otypes_decorator
```



---
## test_bad_input
```python
from test_function_base import test_bad_input
```



---
## test_no_keywords
```python
from test_function_base import test_no_keywords
```



---
## test_positional_regression_9477
```python
from test_function_base import test_positional_regression_9477
```



---
## A
```python
from test_function_base import A
```



---
## test_frompyfunc_leaks
```python
from test_function_base import test_frompyfunc_leaks
```



---
## test_forward
```python
from test_function_base import test_forward
```



---
## test_reverse
```python
from test_function_base import test_reverse
```



---
## test_random
```python
from test_function_base import test_random
```



---
## test_right_basic
```python
from test_function_base import test_right_basic
```



---
## test_right_open
```python
from test_function_base import test_right_open
```



---
## test_right_open_reverse
```python
from test_function_base import test_right_open_reverse
```



---
## test_right_open_random
```python
from test_function_base import test_right_open_random
```



---
## test_monotonic
```python
from test_function_base import test_monotonic
```



---
## test_casting_error
```python
from test_function_base import test_casting_error
```



---
## test_large_integers_increasing
```python
from test_function_base import test_large_integers_increasing
```



---
## test_large_integers_decreasing
```python
from test_function_base import test_large_integers_decreasing
```



---
## test_period
```python
from test_function_base import test_period
```



---
## test_hanning
```python
from test_function_base import test_hanning
```



---
## test_hamming
```python
from test_function_base import test_hamming
```



---
## test_bartlett
```python
from test_function_base import test_bartlett
```



---
## test_blackman
```python
from test_function_base import test_blackman
```



---
## test_kaiser
```python
from test_function_base import test_kaiser
```



---
## test_ndim
```python
from test_function_base import test_ndim
```



---
## test_array_like
```python
from test_function_base import test_array_like
```



---
## test_dtype_order
```python
from test_function_base import test_dtype_order
```



---
## test_non_array
```python
from test_function_base import test_non_array
```



---
## test_ddof
```python
from test_function_base import test_ddof
```



---
## test_bias
```python
from test_function_base import test_bias
```



---
## test_xy
```python
from test_function_base import test_xy
```



---
## test_empty
```python
from test_function_base import test_empty
```



---
## test_extreme
```python
from test_function_base import test_extreme
```



---
## test_corrcoef_dtype
```python
from test_function_base import test_corrcoef_dtype
```



---
## test_wrong_ddof
```python
from test_function_base import test_wrong_ddof
```



---
## test_1D_rowvar
```python
from test_function_base import test_1D_rowvar
```



---
## test_1D_variance
```python
from test_function_base import test_1D_variance
```



---
## test_fweights
```python
from test_function_base import test_fweights
```



---
## test_aweights
```python
from test_function_base import test_aweights
```



---
## test_unit_fweights_and_aweights
```python
from test_function_base import test_unit_fweights_and_aweights
```



---
## test_cov_dtype
```python
from test_function_base import test_cov_dtype
```



---
## test_int_beta
```python
from test_function_base import test_int_beta
```



---
## test_single_input
```python
from test_function_base import test_single_input
```



---
## test_no_input
```python
from test_function_base import test_no_input
```



---
## test_indexing
```python
from test_function_base import test_indexing
```



---
## test_sparse
```python
from test_function_base import test_sparse
```



---
## test_invalid_arguments
```python
from test_function_base import test_invalid_arguments
```



---
## test_writeback
```python
from test_function_base import test_writeback
```



---
## test_nd_shape
```python
from test_function_base import test_nd_shape
```



---
## test_nd_values
```python
from test_function_base import test_nd_values
```



---
## test_nd_indexing
```python
from test_function_base import test_nd_indexing
```



---
## test_two_conditions
```python
from test_function_base import test_two_conditions
```



---
## test_scalar_domains_three_conditions
```python
from test_function_base import test_scalar_domains_three_conditions
```



---
## test_default
```python
from test_function_base import test_default
```



---
## test_0d_comparison
```python
from test_function_base import test_0d_comparison
```



---
## test_0d_0d_condition
```python
from test_function_base import test_0d_0d_condition
```



---
## test_multidimensional_extrafunc
```python
from test_function_base import test_multidimensional_extrafunc
```



---
## test_simple2
```python
from test_function_base import test_simple2
```



---
## test_simple_weight
```python
from test_function_base import test_simple_weight
```



---
## test_simple_weight2
```python
from test_function_base import test_simple_weight2
```



---
## test_with_minlength
```python
from test_function_base import test_with_minlength
```



---
## test_with_minlength_smaller_than_maxvalue
```python
from test_function_base import test_with_minlength_smaller_than_maxvalue
```



---
## test_with_minlength_and_weights
```python
from test_function_base import test_with_minlength_and_weights
```



---
## test_empty_with_minlength
```python
from test_function_base import test_empty_with_minlength
```



---
## test_with_incorrect_minlength
```python
from test_function_base import test_with_incorrect_minlength
```



---
## test_dtype_reference_leaks
```python
from test_function_base import test_dtype_reference_leaks
```



---
## test_error_not_1d
```python
from test_function_base import test_error_not_1d
```



---
## test_exceptions
```python
from test_function_base import test_exceptions
```



---
## test_right_left_behavior
```python
from test_function_base import test_right_left_behavior
```



---
## test_scalar_interpolation_point
```python
from test_function_base import test_scalar_interpolation_point
```



---
## test_non_finite_behavior_exact_x
```python
from test_function_base import test_non_finite_behavior_exact_x
```



---
## sc
```python
from test_function_base import sc
```

scale function used by the below tests 

---
## test_non_finite_any_nan
```python
from test_function_base import test_non_finite_any_nan
```

test that nans are propagated 

---
## test_non_finite_inf
```python
from test_function_base import test_non_finite_inf
```

Test that interp between opposite infs gives nan 

---
## test_non_finite_half_inf_xf
```python
from test_function_base import test_non_finite_half_inf_xf
```

Test that interp where both axes have a bound at inf gives nan 

---
## test_non_finite_half_inf_x
```python
from test_function_base import test_non_finite_half_inf_x
```

Test interp where the x axis has a bound at inf 

---
## test_non_finite_half_inf_f
```python
from test_function_base import test_non_finite_half_inf_f
```

Test interp where the f axis has a bound at inf 

---
## test_complex_interp
```python
from test_function_base import test_complex_interp
```



---
## test_zero_dimensional_interpolation_point
```python
from test_function_base import test_zero_dimensional_interpolation_point
```



---
## test_if_len_x_is_small
```python
from test_function_base import test_if_len_x_is_small
```



---
## test_fraction
```python
from test_function_base import test_fraction
```



---
## test_api
```python
from test_function_base import test_api
```



---
## test_2D
```python
from test_function_base import test_2D
```



---
## test_linear_nan_1D
```python
from test_function_base import test_linear_nan_1D
```



---
## test_linear_interpolation
```python
from test_function_base import test_linear_interpolation
```



---
## test_lower_higher
```python
from test_function_base import test_lower_higher
```



---
## test_midpoint
```python
from test_function_base import test_midpoint
```



---
## test_nearest
```python
from test_function_base import test_nearest
```



---
## test_linear_interpolation_extrapolation
```python
from test_function_base import test_linear_interpolation_extrapolation
```



---
## test_sequence
```python
from test_function_base import test_sequence
```



---
## test_scalar_q
```python
from test_function_base import test_scalar_q
```



---
## test_exception
```python
from test_function_base import test_exception
```



---
## test_percentile_list
```python
from test_function_base import test_percentile_list
```



---
## test_percentile_out
```python
from test_function_base import test_percentile_out
```



---
## test_percentile_empty_dim
```python
from test_function_base import test_percentile_empty_dim
```



---
## test_percentile_no_overwrite
```python
from test_function_base import test_percentile_no_overwrite
```



---
## test_no_p_overwrite
```python
from test_function_base import test_no_p_overwrite
```



---
## test_percentile_overwrite
```python
from test_function_base import test_percentile_overwrite
```



---
## test_extended_axis
```python
from test_function_base import test_extended_axis
```



---
## test_extended_axis_invalid
```python
from test_function_base import test_extended_axis_invalid
```



---
## test_keepdims
```python
from test_function_base import test_keepdims
```



---
## test_keepdims_out
```python
from test_function_base import test_keepdims_out
```



---
## test_out
```python
from test_function_base import test_out
```



---
## test_out_nan
```python
from test_function_base import test_out_nan
```



---
## test_nan_behavior
```python
from test_function_base import test_nan_behavior
```



---
## test_nan_q
```python
from test_function_base import test_nan_q
```



---
## test_nat_basic
```python
from test_function_base import test_nat_basic
```



---
## V
```python
from test_function_base import V
```



---
## test_max_ulp
```python
from test_function_base import test_max_ulp
```



---
## test_correct_quantile_value
```python
from test_function_base import test_correct_quantile_value
```



---
## test_quantile_preserve_int_type
```python
from test_function_base import test_quantile_preserve_int_type
```



---
## test_quantile_monotonic
```python
from test_function_base import test_quantile_monotonic
```



---
## test_quantile_monotonic_hypo
```python
from test_function_base import test_quantile_monotonic_hypo
```



---
## test_quantile_scalar_nan
```python
from test_function_base import test_quantile_scalar_nan
```



---
## test_quantile_identification_equation
```python
from test_function_base import test_quantile_identification_equation
```



---
## test_quantile_add_and_multiply_constant
```python
from test_function_base import test_quantile_add_and_multiply_constant
```



---
## test_linear_interpolation_formula_monotonic
```python
from test_function_base import test_linear_interpolation_formula_monotonic
```



---
## test_linear_interpolation_formula_bounded
```python
from test_function_base import test_linear_interpolation_formula_bounded
```



---
## test_linear_interpolation_formula_symmetric
```python
from test_function_base import test_linear_interpolation_formula_symmetric
```



---
## test_linear_interpolation_formula_0d_inputs
```python
from test_function_base import test_linear_interpolation_formula_0d_inputs
```



---
## test_axis_keyword
```python
from test_function_base import test_axis_keyword
```



---
## test_overwrite_keyword
```python
from test_function_base import test_overwrite_keyword
```



---
## test_subclass2
```python
from test_function_base import test_subclass2
```

Check that we return subclasses, even if a NaN scalar.

---
## test_nat_behavior
```python
from test_function_base import test_nat_behavior
```



---
## test_ufunc_arg
```python
from test_function_base import test_ufunc_arg
```



---
## test_string_arg
```python
from test_function_base import test_string_arg
```



---
## test_add_doc
```python
from test_function_base import test_add_doc
```



---
## test_errors_are_ignored
```python
from test_function_base import test_errors_are_ignored
```



---
## test_add_same_docstring
```python
from test_function_base import test_add_same_docstring
```



---
## test_different_docstring_fails
```python
from test_function_base import test_different_docstring_fails
```



---
## test_sort_real
```python
from test_function_base import test_sort_real
```



---
## test_sort_complex
```python
from test_function_base import test_sort_complex
```



---
## subclass
```python
from test_function_base import subclass
```



---
## SubClass
```python
from test_function_base import SubClass
```



---
## addsubtract
```python
from test_function_base import addsubtract
```



---
## foo
```python
from test_function_base import foo
```



---
## mypolyval
```python
from test_function_base import mypolyval
```



---
## f
```python
from test_function_base import f
```



---
## Foo
```python
from test_function_base import Foo
```



---
## mean
```python
from test_function_base import mean
```



---
## center
```python
from test_function_base import center
```



---
## f2
```python
from test_function_base import f2
```



---
## bound
```python
from test_function_base import bound
```



---
## unbound
```python
from test_function_base import unbound
```



---
## array_like
```python
from test_function_base import array_like
```



---
## MySubClass
```python
from test_function_base import MySubClass
```



---
## MySubclass
```python
from test_function_base import MySubclass
```



---
## func
```python
from test_function_base import func
```

docstring

---
## bar
```python
from test_function_base import bar
```



---
## __array_wrap__
```python
from test_function_base import __array_wrap__
```



---
## __name__
```python
from test_arraypad import __name__
```

Tests for the array padding functions.

---
## TestAsPairs
```python
from test_arraypad import TestAsPairs
```



---
## TestConditionalShortcuts
```python
from test_arraypad import TestConditionalShortcuts
```



---
## TestStatistic
```python
from test_arraypad import TestStatistic
```



---
## TestConstant
```python
from test_arraypad import TestConstant
```



---
## TestLinearRamp
```python
from test_arraypad import TestLinearRamp
```



---
## TestReflect
```python
from test_arraypad import TestReflect
```



---
## TestEmptyArray
```python
from test_arraypad import TestEmptyArray
```

Check how padding behaves on arrays with an empty dimension.

---
## TestSymmetric
```python
from test_arraypad import TestSymmetric
```



---
## TestWrap
```python
from test_arraypad import TestWrap
```



---
## TestEdge
```python
from test_arraypad import TestEdge
```



---
## TestEmpty
```python
from test_arraypad import TestEmpty
```



---
## test_legacy_vector_functionality
```python
from test_arraypad import test_legacy_vector_functionality
```



---
## test_unicode_mode
```python
from test_arraypad import test_unicode_mode
```



---
## test_object_input
```python
from test_arraypad import test_object_input
```



---
## TestPadWidth
```python
from test_arraypad import TestPadWidth
```



---
## test_kwargs
```python
from test_arraypad import test_kwargs
```

Test behavior of pad's kwargs for the given mode.

---
## test_constant_zero_default
```python
from test_arraypad import test_constant_zero_default
```



---
## test_unsupported_mode
```python
from test_arraypad import test_unsupported_mode
```



---
## test_non_contiguous_array
```python
from test_arraypad import test_non_contiguous_array
```



---
## test_memory_layout_persistence
```python
from test_arraypad import test_memory_layout_persistence
```

Test if C and F order is preserved for all pad modes.

---
## test_dtype_persistence
```python
from test_arraypad import test_dtype_persistence
```



---
## test_single_value
```python
from test_arraypad import test_single_value
```

Test casting for a single value.

---
## test_two_values
```python
from test_arraypad import test_two_values
```

Test proper casting for two different values.

---
## test_with_none
```python
from test_arraypad import test_with_none
```



---
## test_pass_through
```python
from test_arraypad import test_pass_through
```

Test if `x` already matching desired output are passed through.

---
## test_as_index
```python
from test_arraypad import test_as_index
```

Test results if `as_index=True`.

---
## test_exceptions
```python
from test_arraypad import test_exceptions
```

Ensure faulty usage is discovered.

---
## test_zero_padding_shortcuts
```python
from test_arraypad import test_zero_padding_shortcuts
```



---
## test_shallow_statistic_range
```python
from test_arraypad import test_shallow_statistic_range
```



---
## test_clip_statistic_range
```python
from test_arraypad import test_clip_statistic_range
```



---
## test_check_mean_stat_length
```python
from test_arraypad import test_check_mean_stat_length
```



---
## test_check_maximum_1
```python
from test_arraypad import test_check_maximum_1
```



---
## test_check_maximum_2
```python
from test_arraypad import test_check_maximum_2
```



---
## test_check_maximum_stat_length
```python
from test_arraypad import test_check_maximum_stat_length
```



---
## test_check_minimum_1
```python
from test_arraypad import test_check_minimum_1
```



---
## test_check_minimum_2
```python
from test_arraypad import test_check_minimum_2
```



---
## test_check_minimum_stat_length
```python
from test_arraypad import test_check_minimum_stat_length
```



---
## test_check_median
```python
from test_arraypad import test_check_median
```



---
## test_check_median_01
```python
from test_arraypad import test_check_median_01
```



---
## test_check_median_02
```python
from test_arraypad import test_check_median_02
```



---
## test_check_median_stat_length
```python
from test_arraypad import test_check_median_stat_length
```



---
## test_check_mean_shape_one
```python
from test_arraypad import test_check_mean_shape_one
```



---
## test_check_mean_2
```python
from test_arraypad import test_check_mean_2
```



---
## test_same_prepend_append
```python
from test_arraypad import test_same_prepend_append
```

Test that appended and prepended values are equal 

---
## test_check_negative_stat_length
```python
from test_arraypad import test_check_negative_stat_length
```



---
## test_simple_stat_length
```python
from test_arraypad import test_simple_stat_length
```



---
## test_zero_stat_length_valid
```python
from test_arraypad import test_zero_stat_length_valid
```



---
## test_zero_stat_length_invalid
```python
from test_arraypad import test_zero_stat_length_invalid
```



---
## test_check_constant
```python
from test_arraypad import test_check_constant
```



---
## test_check_constant_zeros
```python
from test_arraypad import test_check_constant_zeros
```



---
## test_check_constant_float
```python
from test_arraypad import test_check_constant_float
```



---
## test_check_constant_float2
```python
from test_arraypad import test_check_constant_float2
```



---
## test_check_constant_float3
```python
from test_arraypad import test_check_constant_float3
```



---
## test_check_constant_odd_pad_amount
```python
from test_arraypad import test_check_constant_odd_pad_amount
```



---
## test_check_constant_pad_2d
```python
from test_arraypad import test_check_constant_pad_2d
```



---
## test_check_large_integers
```python
from test_arraypad import test_check_large_integers
```



---
## test_check_object_array
```python
from test_arraypad import test_check_object_array
```



---
## test_pad_empty_dimension
```python
from test_arraypad import test_pad_empty_dimension
```



---
## test_check_simple
```python
from test_arraypad import test_check_simple
```



---
## test_check_2d
```python
from test_arraypad import test_check_2d
```



---
## test_object_array
```python
from test_arraypad import test_object_array
```



---
## test_end_values
```python
from test_arraypad import test_end_values
```

Ensure that end values are exact.

---
## test_negative_difference
```python
from test_arraypad import test_negative_difference
```

Check correct behavior of unsigned dtypes if there is a negative
difference between the edge to pad and `end_values`. Check both cases
to be independent of implementation. Test behavior for all other dtypes
in case dtype casting interferes with complex dtypes. See gh-14191.

---
## test_check_odd_method
```python
from test_arraypad import test_check_odd_method
```



---
## test_check_large_pad
```python
from test_arraypad import test_check_large_pad
```



---
## test_check_shape
```python
from test_arraypad import test_check_shape
```



---
## test_check_01
```python
from test_arraypad import test_check_01
```



---
## test_check_02
```python
from test_arraypad import test_check_02
```



---
## test_check_03
```python
from test_arraypad import test_check_03
```



---
## test_pad_non_empty_dimension
```python
from test_arraypad import test_pad_non_empty_dimension
```



---
## test_check_large_pad_odd
```python
from test_arraypad import test_check_large_pad_odd
```



---
## test_pad_with_zero
```python
from test_arraypad import test_pad_with_zero
```



---
## test_repeated_wrapping
```python
from test_arraypad import test_repeated_wrapping
```

Check wrapping on each side individually if the wrapped area is longer
than the original array.

---
## test_repeated_wrapping_multiple_origin
```python
from test_arraypad import test_repeated_wrapping_multiple_origin
```

Assert that 'wrap' pads only with multiples of the original area if
the pad width is larger than the original array.

---
## test_check_width_shape_1_2
```python
from test_arraypad import test_check_width_shape_1_2
```



---
## test_simple
```python
from test_arraypad import test_simple
```



---
## _padwithtens
```python
from test_arraypad import _padwithtens
```



---
## test_misshaped_pad_width
```python
from test_arraypad import test_misshaped_pad_width
```



---
## test_misshaped_pad_width_2
```python
from test_arraypad import test_misshaped_pad_width_2
```



---
## test_negative_pad_width
```python
from test_arraypad import test_negative_pad_width
```



---
## test_bad_type
```python
from test_arraypad import test_bad_type
```



---
## test_pad_width_as_ndarray
```python
from test_arraypad import test_pad_width_as_ndarray
```



---
## test_zero_pad_width
```python
from test_arraypad import test_zero_pad_width
```



---
## __name__
```python
from test_mixins import __name__
```



---
## ArrayLike
```python
from test_mixins import ArrayLike
```



---
## wrap_array_like
```python
from test_mixins import wrap_array_like
```



---
## _assert_equal_type_and_value
```python
from test_mixins import _assert_equal_type_and_value
```



---
## TestNDArrayOperatorsMixin
```python
from test_mixins import TestNDArrayOperatorsMixin
```



---
## __init__
```python
from test_mixins import __init__
```



---
## __array_ufunc__
```python
from test_mixins import __array_ufunc__
```



---
## __repr__
```python
from test_mixins import __repr__
```



---
## test_array_like_add
```python
from test_mixins import test_array_like_add
```



---
## test_inplace
```python
from test_mixins import test_inplace
```



---
## test_opt_out
```python
from test_mixins import test_opt_out
```



---
## test_subclass
```python
from test_mixins import test_subclass
```



---
## test_object
```python
from test_mixins import test_object
```



---
## test_unary_methods
```python
from test_mixins import test_unary_methods
```



---
## test_forward_binary_methods
```python
from test_mixins import test_forward_binary_methods
```



---
## test_reflected_binary_methods
```python
from test_mixins import test_reflected_binary_methods
```



---
## test_matmul
```python
from test_mixins import test_matmul
```



---
## test_ufunc_at
```python
from test_mixins import test_ufunc_at
```



---
## test_ufunc_two_outputs
```python
from test_mixins import test_ufunc_two_outputs
```



---
## check
```python
from test_mixins import check
```



---
## OptOut
```python
from test_mixins import OptOut
```

Object that opts out of __array_ufunc__.

---
## SubArrayLike
```python
from test_mixins import SubArrayLike
```

Should take precedence over ArrayLike.

---
## __add__
```python
from test_mixins import __add__
```



---
## __radd__
```python
from test_mixins import __radd__
```



---
## __name__
```python
from test_packbits import __name__
```



---
## test_packbits
```python
from test_packbits import test_packbits
```



---
## test_packbits_empty
```python
from test_packbits import test_packbits_empty
```



---
## test_packbits_empty_with_axis
```python
from test_packbits import test_packbits_empty_with_axis
```



---
## test_packbits_large
```python
from test_packbits import test_packbits_large
```



---
## test_packbits_very_large
```python
from test_packbits import test_packbits_very_large
```



---
## test_unpackbits
```python
from test_packbits import test_unpackbits
```



---
## test_pack_unpack_order
```python
from test_packbits import test_pack_unpack_order
```



---
## test_unpackbits_empty
```python
from test_packbits import test_unpackbits_empty
```



---
## test_unpackbits_empty_with_axis
```python
from test_packbits import test_unpackbits_empty_with_axis
```



---
## test_unpackbits_large
```python
from test_packbits import test_unpackbits_large
```



---
## TestCount
```python
from test_packbits import TestCount
```



---
## test_roundtrip
```python
from test_packbits import test_roundtrip
```



---
## test_count
```python
from test_packbits import test_count
```



---
## test_roundtrip_axis
```python
from test_packbits import test_roundtrip_axis
```



---
## test_axis_count
```python
from test_packbits import test_axis_count
```



---
## test_bad_count
```python
from test_packbits import test_bad_count
```



---
## __name__
```python
from test__datasource import __name__
```



---
## urlopen_stub
```python
from test__datasource import urlopen_stub
```

Stub to replace urlopen for testing.

---
## setup_module
```python
from test__datasource import setup_module
```



---
## teardown_module
```python
from test__datasource import teardown_module
```



---
## valid_textfile
```python
from test__datasource import valid_textfile
```



---
## invalid_textfile
```python
from test__datasource import invalid_textfile
```



---
## valid_httpurl
```python
from test__datasource import valid_httpurl
```



---
## invalid_httpurl
```python
from test__datasource import invalid_httpurl
```



---
## valid_baseurl
```python
from test__datasource import valid_baseurl
```



---
## invalid_baseurl
```python
from test__datasource import invalid_baseurl
```



---
## valid_httpfile
```python
from test__datasource import valid_httpfile
```



---
## invalid_httpfile
```python
from test__datasource import invalid_httpfile
```



---
## TestDataSourceOpen
```python
from test__datasource import TestDataSourceOpen
```



---
## TestDataSourceExists
```python
from test__datasource import TestDataSourceExists
```



---
## TestDataSourceAbspath
```python
from test__datasource import TestDataSourceAbspath
```



---
## TestRepositoryAbspath
```python
from test__datasource import TestRepositoryAbspath
```



---
## TestRepositoryExists
```python
from test__datasource import TestRepositoryExists
```



---
## TestOpenFunc
```python
from test__datasource import TestOpenFunc
```



---
## test_del_attr_handling
```python
from test__datasource import test_del_attr_handling
```



---
## setup_method
```python
from test__datasource import setup_method
```



---
## teardown_method
```python
from test__datasource import teardown_method
```



---
## test_ValidHTTP
```python
from test__datasource import test_ValidHTTP
```



---
## test_InvalidHTTP
```python
from test__datasource import test_InvalidHTTP
```



---
## test_InvalidHTTPCacheURLError
```python
from test__datasource import test_InvalidHTTPCacheURLError
```



---
## test_ValidFile
```python
from test__datasource import test_ValidFile
```



---
## test_InvalidFile
```python
from test__datasource import test_InvalidFile
```



---
## test_ValidGzipFile
```python
from test__datasource import test_ValidGzipFile
```



---
## test_ValidBz2File
```python
from test__datasource import test_ValidBz2File
```



---
## test_sandboxing
```python
from test__datasource import test_sandboxing
```



---
## test_windows_os_sep
```python
from test__datasource import test_windows_os_sep
```



---
## test_RemoveHTTPFile
```python
from test__datasource import test_RemoveHTTPFile
```



---
## test_CachedHTTPFile
```python
from test__datasource import test_CachedHTTPFile
```



---
## test_DataSourceOpen
```python
from test__datasource import test_DataSourceOpen
```



---
## __name__
```python
from test_stride_tricks import __name__
```



---
## assert_shapes_correct
```python
from test_stride_tricks import assert_shapes_correct
```



---
## assert_incompatible_shapes_raise
```python
from test_stride_tricks import assert_incompatible_shapes_raise
```



---
## assert_same_as_ufunc
```python
from test_stride_tricks import assert_same_as_ufunc
```



---
## test_same
```python
from test_stride_tricks import test_same
```



---
## test_broadcast_kwargs
```python
from test_stride_tricks import test_broadcast_kwargs
```



---
## test_one_off
```python
from test_stride_tricks import test_one_off
```



---
## test_same_input_shapes
```python
from test_stride_tricks import test_same_input_shapes
```



---
## test_two_compatible_by_ones_input_shapes
```python
from test_stride_tricks import test_two_compatible_by_ones_input_shapes
```



---
## test_two_compatible_by_prepending_ones_input_shapes
```python
from test_stride_tricks import test_two_compatible_by_prepending_ones_input_shapes
```



---
## test_incompatible_shapes_raise_valueerror
```python
from test_stride_tricks import test_incompatible_shapes_raise_valueerror
```



---
## test_same_as_ufunc
```python
from test_stride_tricks import test_same_as_ufunc
```



---
## test_broadcast_to_succeeds
```python
from test_stride_tricks import test_broadcast_to_succeeds
```



---
## test_broadcast_to_raises
```python
from test_stride_tricks import test_broadcast_to_raises
```



---
## test_broadcast_shape
```python
from test_stride_tricks import test_broadcast_shape
```



---
## test_broadcast_shapes_succeeds
```python
from test_stride_tricks import test_broadcast_shapes_succeeds
```



---
## test_broadcast_shapes_raises
```python
from test_stride_tricks import test_broadcast_shapes_raises
```



---
## test_as_strided
```python
from test_stride_tricks import test_as_strided
```



---
## TestSlidingWindowView
```python
from test_stride_tricks import TestSlidingWindowView
```



---
## as_strided_writeable
```python
from test_stride_tricks import as_strided_writeable
```



---
## VerySimpleSubClass
```python
from test_stride_tricks import VerySimpleSubClass
```



---
## SimpleSubClass
```python
from test_stride_tricks import SimpleSubClass
```



---
## test_subclasses
```python
from test_stride_tricks import test_subclasses
```



---
## test_writeable
```python
from test_stride_tricks import test_writeable
```



---
## test_writeable_memoryview
```python
from test_stride_tricks import test_writeable_memoryview
```



---
## test_reference_types
```python
from test_stride_tricks import test_reference_types
```



---
## test_1d
```python
from test_stride_tricks import test_1d
```



---
## test_2d
```python
from test_stride_tricks import test_2d
```



---
## test_2d_with_axis
```python
from test_stride_tricks import test_2d_with_axis
```



---
## test_2d_repeated_axis
```python
from test_stride_tricks import test_2d_repeated_axis
```



---
## test_2d_without_axis
```python
from test_stride_tricks import test_2d_without_axis
```



---
## test_errors
```python
from test_stride_tricks import test_errors
```



---
## test_subok
```python
from test_stride_tricks import test_subok
```



---
## __new__
```python
from test_stride_tricks import __new__
```



---
## __array_finalize__
```python
from test_stride_tricks import __array_finalize__
```



---
## MyArray
```python
from test_stride_tricks import MyArray
```



---
## __name__
```python
from test_recfunctions import __name__
```



---
## TestRecFunctions
```python
from test_recfunctions import TestRecFunctions
```



---
## TestRecursiveFillFields
```python
from test_recfunctions import TestRecursiveFillFields
```



---
## TestMergeArrays
```python
from test_recfunctions import TestMergeArrays
```



---
## TestAppendFields
```python
from test_recfunctions import TestAppendFields
```



---
## TestStackArrays
```python
from test_recfunctions import TestStackArrays
```



---
## TestJoinBy
```python
from test_recfunctions import TestJoinBy
```



---
## TestJoinBy2
```python
from test_recfunctions import TestJoinBy2
```



---
## TestAppendFieldsObj
```python
from test_recfunctions import TestAppendFieldsObj
```

Test append_fields with arrays containing objects

---
## setup_method
```python
from test_recfunctions import setup_method
```



---
## test_zip_descr
```python
from test_recfunctions import test_zip_descr
```



---
## test_drop_fields
```python
from test_recfunctions import test_drop_fields
```



---
## test_rename_fields
```python
from test_recfunctions import test_rename_fields
```



---
## test_get_names
```python
from test_recfunctions import test_get_names
```



---
## test_get_names_flat
```python
from test_recfunctions import test_get_names_flat
```



---
## test_get_fieldstructure
```python
from test_recfunctions import test_get_fieldstructure
```



---
## test_find_duplicates
```python
from test_recfunctions import test_find_duplicates
```



---
## test_find_duplicates_ignoremask
```python
from test_recfunctions import test_find_duplicates_ignoremask
```



---
## test_repack_fields
```python
from test_recfunctions import test_repack_fields
```



---
## test_structured_to_unstructured
```python
from test_recfunctions import test_structured_to_unstructured
```



---
## test_unstructured_to_structured
```python
from test_recfunctions import test_unstructured_to_structured
```



---
## test_field_assignment_by_name
```python
from test_recfunctions import test_field_assignment_by_name
```



---
## test_simple_flexible
```python
from test_recfunctions import test_simple_flexible
```



---
## test_masked_flexible
```python
from test_recfunctions import test_masked_flexible
```



---
## test_solo
```python
from test_recfunctions import test_solo
```



---
## test_solo_w_flatten
```python
from test_recfunctions import test_solo_w_flatten
```



---
## test_standard
```python
from test_recfunctions import test_standard
```



---
## test_flatten
```python
from test_recfunctions import test_flatten
```



---
## test_flatten_wflexible
```python
from test_recfunctions import test_flatten_wflexible
```



---
## test_wmasked_arrays
```python
from test_recfunctions import test_wmasked_arrays
```



---
## test_w_singlefield
```python
from test_recfunctions import test_w_singlefield
```



---
## test_w_shorter_flex
```python
from test_recfunctions import test_w_shorter_flex
```



---
## test_singlerecord
```python
from test_recfunctions import test_singlerecord
```



---
## test_append_single
```python
from test_recfunctions import test_append_single
```



---
## test_append_double
```python
from test_recfunctions import test_append_double
```



---
## test_append_on_flex
```python
from test_recfunctions import test_append_on_flex
```



---
## test_append_on_nested
```python
from test_recfunctions import test_append_on_nested
```



---
## test_unnamed_fields
```python
from test_recfunctions import test_unnamed_fields
```



---
## test_unnamed_and_named_fields
```python
from test_recfunctions import test_unnamed_and_named_fields
```



---
## test_matching_named_fields
```python
from test_recfunctions import test_matching_named_fields
```



---
## test_defaults
```python
from test_recfunctions import test_defaults
```



---
## test_autoconversion
```python
from test_recfunctions import test_autoconversion
```



---
## test_checktitles
```python
from test_recfunctions import test_checktitles
```



---
## test_subdtype
```python
from test_recfunctions import test_subdtype
```



---
## test_inner_join
```python
from test_recfunctions import test_inner_join
```



---
## test_join
```python
from test_recfunctions import test_join
```



---
## test_join_subdtype
```python
from test_recfunctions import test_join_subdtype
```



---
## test_outer_join
```python
from test_recfunctions import test_outer_join
```



---
## test_leftouter_join
```python
from test_recfunctions import test_leftouter_join
```



---
## test_different_field_order
```python
from test_recfunctions import test_different_field_order
```



---
## test_duplicate_keys
```python
from test_recfunctions import test_duplicate_keys
```



---
## test_same_name_different_dtypes_key
```python
from test_recfunctions import test_same_name_different_dtypes_key
```



---
## test_same_name_different_dtypes
```python
from test_recfunctions import test_same_name_different_dtypes
```



---
## test_subarray_key
```python
from test_recfunctions import test_subarray_key
```



---
## test_padded_dtype
```python
from test_recfunctions import test_padded_dtype
```



---
## test_no_r1postfix
```python
from test_recfunctions import test_no_r1postfix
```



---
## test_no_postfix
```python
from test_recfunctions import test_no_postfix
```



---
## test_no_r2postfix
```python
from test_recfunctions import test_no_r2postfix
```



---
## test_two_keys_two_vars
```python
from test_recfunctions import test_two_keys_two_vars
```



---
## test_append_to_objects
```python
from test_recfunctions import test_append_to_objects
```

Test append_fields when the base array contains objects

---
## subarray
```python
from test_recfunctions import subarray
```



---
## structured
```python
from test_recfunctions import structured
```



---
## inspect
```python
from test_recfunctions import inspect
```



---
## __name__
```python
from test_nanfunctions import __name__
```



---
## TestSignatureMatch
```python
from test_nanfunctions import TestSignatureMatch
```



---
## TestNanFunctions_MinMax
```python
from test_nanfunctions import TestNanFunctions_MinMax
```



---
## TestNanFunctions_ArgminArgmax
```python
from test_nanfunctions import TestNanFunctions_ArgminArgmax
```



---
## TestNanFunctions_NumberTypes
```python
from test_nanfunctions import TestNanFunctions_NumberTypes
```



---
## SharedNanFunctionsTestsMixin
```python
from test_nanfunctions import SharedNanFunctionsTestsMixin
```



---
## TestNanFunctions_SumProd
```python
from test_nanfunctions import TestNanFunctions_SumProd
```



---
## TestNanFunctions_CumSumProd
```python
from test_nanfunctions import TestNanFunctions_CumSumProd
```



---
## TestNanFunctions_MeanVarStd
```python
from test_nanfunctions import TestNanFunctions_MeanVarStd
```



---
## TestNanFunctions_Median
```python
from test_nanfunctions import TestNanFunctions_Median
```



---
## TestNanFunctions_Percentile
```python
from test_nanfunctions import TestNanFunctions_Percentile
```



---
## TestNanFunctions_Quantile
```python
from test_nanfunctions import TestNanFunctions_Quantile
```



---
## test__nan_mask
```python
from test_nanfunctions import test__nan_mask
```



---
## test__replace_nan
```python
from test_nanfunctions import test__replace_nan
```

Test that _replace_nan returns the original array if there are no
NaNs, not a copy.

---
## get_signature
```python
from test_nanfunctions import get_signature
```

Construct a signature and replace all default parameter-values.

---
## test_signature_match
```python
from test_nanfunctions import test_signature_match
```



---
## test_exhaustiveness
```python
from test_nanfunctions import test_exhaustiveness
```

Validate that all nan functions are actually tested.

---
## test_mutation
```python
from test_nanfunctions import test_mutation
```



---
## test_keepdims
```python
from test_nanfunctions import test_keepdims
```



---
## test_out
```python
from test_nanfunctions import test_out
```



---
## test_dtype_from_input
```python
from test_nanfunctions import test_dtype_from_input
```



---
## test_result_values
```python
from test_nanfunctions import test_result_values
```



---
## test_allnans
```python
from test_nanfunctions import test_allnans
```



---
## test_masked
```python
from test_nanfunctions import test_masked
```



---
## test_scalar
```python
from test_nanfunctions import test_scalar
```



---
## test_subclass
```python
from test_nanfunctions import test_subclass
```



---
## test_object_array
```python
from test_nanfunctions import test_object_array
```



---
## test_initial
```python
from test_nanfunctions import test_initial
```



---
## test_where
```python
from test_nanfunctions import test_where
```



---
## test_empty
```python
from test_nanfunctions import test_empty
```



---
## test_nanfunc
```python
from test_nanfunctions import test_nanfunc
```



---
## test_nanfunc_q
```python
from test_nanfunctions import test_nanfunc_q
```



---
## test_nanfunc_ddof
```python
from test_nanfunctions import test_nanfunc_ddof
```



---
## test_dtype_from_dtype
```python
from test_nanfunctions import test_dtype_from_dtype
```



---
## test_dtype_from_char
```python
from test_nanfunctions import test_dtype_from_char
```



---
## test_dtype_error
```python
from test_nanfunctions import test_dtype_error
```



---
## test_out_dtype_error
```python
from test_nanfunctions import test_out_dtype_error
```



---
## test_ddof
```python
from test_nanfunctions import test_ddof
```



---
## test_ddof_too_big
```python
from test_nanfunctions import test_ddof_too_big
```



---
## test_keepdims_out
```python
from test_nanfunctions import test_keepdims_out
```



---
## test_small_large
```python
from test_nanfunctions import test_small_large
```



---
## test_extended_axis_invalid
```python
from test_nanfunctions import test_extended_axis_invalid
```



---
## test_float_special
```python
from test_nanfunctions import test_float_special
```



---
## test_complex
```python
from test_nanfunctions import test_complex
```



---
## test_multiple_percentiles
```python
from test_nanfunctions import test_multiple_percentiles
```



---
## test_regression
```python
from test_nanfunctions import test_regression
```



---
## test_basic
```python
from test_nanfunctions import test_basic
```



---
## test_no_p_overwrite
```python
from test_nanfunctions import test_no_p_overwrite
```



---
## MyNDArray
```python
from test_nanfunctions import MyNDArray
```



---
## __name__
```python
from test_loadtxt import __name__
```

Tests specific to `np.loadtxt` added during the move of loadtxt to be backed
by C code.
These tests complement those found in `test_io.py`.

---
## test_scientific_notation
```python
from test_loadtxt import test_scientific_notation
```

Test that both 'e' and 'E' are parsed correctly.

---
## test_comment_multiple_chars
```python
from test_loadtxt import test_comment_multiple_chars
```



---
## mixed_types_structured
```python
from test_loadtxt import mixed_types_structured
```

Fixture providing hetergeneous input data with a structured dtype, along
with the associated structured array.

---
## test_structured_dtype_and_skiprows_no_empty_lines
```python
from test_loadtxt import test_structured_dtype_and_skiprows_no_empty_lines
```



---
## test_unpack_structured
```python
from test_loadtxt import test_unpack_structured
```



---
## test_structured_dtype_with_shape
```python
from test_loadtxt import test_structured_dtype_with_shape
```



---
## test_structured_dtype_with_multi_shape
```python
from test_loadtxt import test_structured_dtype_with_multi_shape
```



---
## test_nested_structured_subarray
```python
from test_loadtxt import test_nested_structured_subarray
```



---
## test_structured_dtype_offsets
```python
from test_loadtxt import test_structured_dtype_offsets
```



---
## test_exception_negative_row_limits
```python
from test_loadtxt import test_exception_negative_row_limits
```

skiprows and max_rows should raise for negative parameters.

---
## test_exception_noninteger_row_limits
```python
from test_loadtxt import test_exception_noninteger_row_limits
```



---
## test_ndmin_single_row_or_col
```python
from test_loadtxt import test_ndmin_single_row_or_col
```



---
## test_bad_ndmin
```python
from test_loadtxt import test_bad_ndmin
```



---
## test_blank_lines_spaces_delimit
```python
from test_loadtxt import test_blank_lines_spaces_delimit
```



---
## test_blank_lines_normal_delimiter
```python
from test_loadtxt import test_blank_lines_normal_delimiter
```



---
## test_maxrows_no_blank_lines
```python
from test_loadtxt import test_maxrows_no_blank_lines
```



---
## test_exception_message_bad_values
```python
from test_loadtxt import test_exception_message_bad_values
```



---
## test_converters_negative_indices
```python
from test_loadtxt import test_converters_negative_indices
```



---
## test_converters_negative_indices_with_usecols
```python
from test_loadtxt import test_converters_negative_indices_with_usecols
```



---
## test_ragged_error
```python
from test_loadtxt import test_ragged_error
```



---
## test_ragged_usecols
```python
from test_loadtxt import test_ragged_usecols
```



---
## test_empty_usecols
```python
from test_loadtxt import test_empty_usecols
```



---
## test_large_unicode_characters
```python
from test_loadtxt import test_large_unicode_characters
```



---
## test_unicode_with_converter
```python
from test_loadtxt import test_unicode_with_converter
```



---
## test_converter_with_structured_dtype
```python
from test_loadtxt import test_converter_with_structured_dtype
```



---
## test_converter_with_unicode_dtype
```python
from test_loadtxt import test_converter_with_unicode_dtype
```

With the default 'bytes' encoding, tokens are encoded prior to being
passed to the converter. This means that the output of the converter may
be bytes instead of unicode as expected by `read_rows`.

This test checks that outputs from the above scenario are properly decoded
prior to parsing by `read_rows`.

---
## test_read_huge_row
```python
from test_loadtxt import test_read_huge_row
```



---
## test_huge_float
```python
from test_loadtxt import test_huge_float
```



---
## test_string_no_length_given
```python
from test_loadtxt import test_string_no_length_given
```

The given dtype is just 'S' or 'U' with no length. In these cases, the
length of the resulting dtype is determined by the longest string found
in the file.

---
## test_float_conversion
```python
from test_loadtxt import test_float_conversion
```

Some tests that the conversion to float64 works as accurately as the
Python built-in `float` function. In a naive version of the float parser,
these strings resulted in values that were off by an ULP or two.

---
## test_bool
```python
from test_loadtxt import test_bool
```



---
## test_integer_signs
```python
from test_loadtxt import test_integer_signs
```



---
## test_implicit_cast_float_to_int_fails
```python
from test_loadtxt import test_implicit_cast_float_to_int_fails
```



---
## test_complex_parsing
```python
from test_loadtxt import test_complex_parsing
```



---
## test_read_from_generator
```python
from test_loadtxt import test_read_from_generator
```



---
## test_read_from_generator_multitype
```python
from test_loadtxt import test_read_from_generator_multitype
```



---
## test_read_from_bad_generator
```python
from test_loadtxt import test_read_from_bad_generator
```



---
## test_object_cleanup_on_read_error
```python
from test_loadtxt import test_object_cleanup_on_read_error
```



---
## test_character_not_bytes_compatible
```python
from test_loadtxt import test_character_not_bytes_compatible
```

Test exception when a character cannot be encoded as 'S'.

---
## test_invalid_converter
```python
from test_loadtxt import test_invalid_converter
```



---
## test_converters_dict_raises_non_integer_key
```python
from test_loadtxt import test_converters_dict_raises_non_integer_key
```



---
## test_converters_dict_raises_non_col_key
```python
from test_loadtxt import test_converters_dict_raises_non_col_key
```



---
## test_converters_dict_raises_val_not_callable
```python
from test_loadtxt import test_converters_dict_raises_val_not_callable
```



---
## test_quoted_field
```python
from test_loadtxt import test_quoted_field
```



---
## test_quoted_field_with_whitepace_delimiter
```python
from test_loadtxt import test_quoted_field_with_whitepace_delimiter
```



---
## test_quote_support_default
```python
from test_loadtxt import test_quote_support_default
```

Support for quoted fields is disabled by default.

---
## test_quotechar_multichar_error
```python
from test_loadtxt import test_quotechar_multichar_error
```



---
## test_comment_multichar_error_with_quote
```python
from test_loadtxt import test_comment_multichar_error_with_quote
```



---
## test_structured_dtype_with_quotes
```python
from test_loadtxt import test_structured_dtype_with_quotes
```



---
## test_quoted_field_is_not_empty
```python
from test_loadtxt import test_quoted_field_is_not_empty
```



---
## test_quoted_field_is_not_empty_nonstrict
```python
from test_loadtxt import test_quoted_field_is_not_empty_nonstrict
```



---
## test_consecutive_quotechar_escaped
```python
from test_loadtxt import test_consecutive_quotechar_escaped
```



---
## test_warn_on_no_data
```python
from test_loadtxt import test_warn_on_no_data
```

Check that a UserWarning is emitted when no data is read from input.

---
## test_warn_on_skipped_data
```python
from test_loadtxt import test_warn_on_skipped_data
```



---
## test_byteswapping_and_unaligned
```python
from test_loadtxt import test_byteswapping_and_unaligned
```



---
## test_unicode_whitespace_stripping
```python
from test_loadtxt import test_unicode_whitespace_stripping
```



---
## test_unicode_whitespace_stripping_complex
```python
from test_loadtxt import test_unicode_whitespace_stripping_complex
```



---
## test_bad_complex
```python
from test_loadtxt import test_bad_complex
```



---
## test_nul_character_error
```python
from test_loadtxt import test_nul_character_error
```



---
## test_no_thousands_support
```python
from test_loadtxt import test_no_thousands_support
```



---
## test_bad_newline_in_iterator
```python
from test_loadtxt import test_bad_newline_in_iterator
```



---
## test_good_newline_in_iterator
```python
from test_loadtxt import test_good_newline_in_iterator
```



---
## test_universal_newlines_quoted
```python
from test_loadtxt import test_universal_newlines_quoted
```



---
## test_null_character
```python
from test_loadtxt import test_null_character
```



---
## test_iterator_fails_getting_next_line
```python
from test_loadtxt import test_iterator_fails_getting_next_line
```



---
## TestCReaderUnitTests
```python
from test_loadtxt import TestCReaderUnitTests
```



---
## test_delimiter_comment_collision_raises
```python
from test_loadtxt import test_delimiter_comment_collision_raises
```



---
## test_delimiter_quotechar_collision_raises
```python
from test_loadtxt import test_delimiter_quotechar_collision_raises
```



---
## test_comment_quotechar_collision_raises
```python
from test_loadtxt import test_comment_quotechar_collision_raises
```



---
## test_delimiter_and_multiple_comments_collision_raises
```python
from test_loadtxt import test_delimiter_and_multiple_comments_collision_raises
```



---
## test_collision_with_default_delimiter_raises
```python
from test_loadtxt import test_collision_with_default_delimiter_raises
```



---
## test_control_character_newline_raises
```python
from test_loadtxt import test_control_character_newline_raises
```



---
## test_parametric_unit_discovery
```python
from test_loadtxt import test_parametric_unit_discovery
```

Check that the correct unit (e.g. month, day, second) is discovered from
the data when a user specifies a unitless datetime.

---
## test_str_dtype_unit_discovery_with_converter
```python
from test_loadtxt import test_str_dtype_unit_discovery_with_converter
```



---
## test_control_character_empty
```python
from test_loadtxt import test_control_character_empty
```



---
## test_control_characters_as_bytes
```python
from test_loadtxt import test_control_characters_as_bytes
```

Byte control characters (comments, delimiter) are supported.

---
## test_field_growing_cases
```python
from test_loadtxt import test_field_growing_cases
```



---
## gen
```python
from test_loadtxt import gen
```



---
## conv
```python
from test_loadtxt import conv
```



---
## BadSequence
```python
from test_loadtxt import BadSequence
```



---
## test_not_an_filelike
```python
from test_loadtxt import test_not_an_filelike
```



---
## test_filelike_read_fails
```python
from test_loadtxt import test_filelike_read_fails
```



---
## test_filelike_bad_read
```python
from test_loadtxt import test_filelike_bad_read
```



---
## test_not_an_iter
```python
from test_loadtxt import test_not_an_iter
```



---
## test_bad_type
```python
from test_loadtxt import test_bad_type
```



---
## test_bad_encoding
```python
from test_loadtxt import test_bad_encoding
```



---
## test_manual_universal_newlines
```python
from test_loadtxt import test_manual_universal_newlines
```



---
## __len__
```python
from test_loadtxt import __len__
```



---
## __getitem__
```python
from test_loadtxt import __getitem__
```



---
## BadFileLike
```python
from test_loadtxt import BadFileLike
```



---
## read
```python
from test_loadtxt import read
```



---
## __name__
```python
from test_format import __name__
```



---
## BytesIOSRandomSize
```python
from test_format import BytesIOSRandomSize
```



---
## roundtrip
```python
from test_format import roundtrip
```



---
## roundtrip_randsize
```python
from test_format import roundtrip_randsize
```



---
## roundtrip_truncated
```python
from test_format import roundtrip_truncated
```



---
## assert_equal_
```python
from test_format import assert_equal_
```



---
## test_roundtrip
```python
from test_format import test_roundtrip
```



---
## test_roundtrip_randsize
```python
from test_format import test_roundtrip_randsize
```



---
## test_roundtrip_truncated
```python
from test_format import test_roundtrip_truncated
```



---
## test_long_str
```python
from test_format import test_long_str
```



---
## test_memmap_roundtrip
```python
from test_format import test_memmap_roundtrip
```



---
## test_compressed_roundtrip
```python
from test_format import test_compressed_roundtrip
```



---
## test_load_padded_dtype
```python
from test_format import test_load_padded_dtype
```



---
## test_python2_python3_interoperability
```python
from test_format import test_python2_python3_interoperability
```



---
## test_pickle_python2_python3
```python
from test_format import test_pickle_python2_python3
```



---
## test_pickle_disallow
```python
from test_format import test_pickle_disallow
```



---
## test_descr_to_dtype
```python
from test_format import test_descr_to_dtype
```



---
## test_version_2_0
```python
from test_format import test_version_2_0
```



---
## test_version_2_0_memmap
```python
from test_format import test_version_2_0_memmap
```



---
## test_huge_header
```python
from test_format import test_huge_header
```



---
## test_huge_header_npz
```python
from test_format import test_huge_header_npz
```



---
## test_write_version
```python
from test_format import test_write_version
```



---
## test_read_magic
```python
from test_format import test_read_magic
```



---
## test_read_magic_bad_magic
```python
from test_format import test_read_magic_bad_magic
```



---
## test_read_version_1_0_bad_magic
```python
from test_format import test_read_version_1_0_bad_magic
```



---
## test_bad_magic_args
```python
from test_format import test_bad_magic_args
```



---
## test_large_header
```python
from test_format import test_large_header
```



---
## test_read_array_header_1_0
```python
from test_format import test_read_array_header_1_0
```



---
## test_read_array_header_2_0
```python
from test_format import test_read_array_header_2_0
```



---
## test_bad_header
```python
from test_format import test_bad_header
```



---
## test_large_file_support
```python
from test_format import test_large_file_support
```



---
## test_large_archive
```python
from test_format import test_large_archive
```



---
## test_empty_npz
```python
from test_format import test_empty_npz
```



---
## test_unicode_field_names
```python
from test_format import test_unicode_field_names
```



---
## test_header_growth_axis
```python
from test_format import test_header_growth_axis
```



---
## test_metadata_dtype
```python
from test_format import test_metadata_dtype
```



---
## read
```python
from test_format import read
```



---
## __name__
```python
from test_histograms import __name__
```



---
## TestHistogram
```python
from test_histograms import TestHistogram
```



---
## TestHistogramOptimBinNums
```python
from test_histograms import TestHistogramOptimBinNums
```

Provide test coverage when using provided estimators for optimal number of
bins

---
## TestHistogramdd
```python
from test_histograms import TestHistogramdd
```



---
## setup_method
```python
from test_histograms import setup_method
```



---
## teardown_method
```python
from test_histograms import teardown_method
```



---
## test_simple
```python
from test_histograms import test_simple
```



---
## test_one_bin
```python
from test_histograms import test_one_bin
```



---
## test_density
```python
from test_histograms import test_density
```



---
## test_outliers
```python
from test_histograms import test_outliers
```



---
## test_arr_weights_mismatch
```python
from test_histograms import test_arr_weights_mismatch
```



---
## test_type
```python
from test_histograms import test_type
```



---
## test_f32_rounding
```python
from test_histograms import test_f32_rounding
```



---
## test_bool_conversion
```python
from test_histograms import test_bool_conversion
```



---
## test_weights
```python
from test_histograms import test_weights
```



---
## test_exotic_weights
```python
from test_histograms import test_exotic_weights
```



---
## test_no_side_effects
```python
from test_histograms import test_no_side_effects
```



---
## test_empty
```python
from test_histograms import test_empty
```



---
## test_error_binnum_type
```python
from test_histograms import test_error_binnum_type
```



---
## test_finite_range
```python
from test_histograms import test_finite_range
```



---
## test_invalid_range
```python
from test_histograms import test_invalid_range
```



---
## test_bin_edge_cases
```python
from test_histograms import test_bin_edge_cases
```



---
## test_last_bin_inclusive_range
```python
from test_histograms import test_last_bin_inclusive_range
```



---
## test_bin_array_dims
```python
from test_histograms import test_bin_array_dims
```



---
## test_unsigned_monotonicity_check
```python
from test_histograms import test_unsigned_monotonicity_check
```



---
## test_object_array_of_0d
```python
from test_histograms import test_object_array_of_0d
```



---
## test_some_nan_values
```python
from test_histograms import test_some_nan_values
```



---
## test_datetime
```python
from test_histograms import test_datetime
```



---
## do_signed_overflow_bounds
```python
from test_histograms import do_signed_overflow_bounds
```



---
## test_signed_overflow_bounds
```python
from test_histograms import test_signed_overflow_bounds
```



---
## do_precision_lower_bound
```python
from test_histograms import do_precision_lower_bound
```



---
## do_precision_upper_bound
```python
from test_histograms import do_precision_upper_bound
```



---
## do_precision
```python
from test_histograms import do_precision
```



---
## test_precision
```python
from test_histograms import test_precision
```



---
## test_histogram_bin_edges
```python
from test_histograms import test_histogram_bin_edges
```



---
## test_big_arrays
```python
from test_histograms import test_big_arrays
```



---
## test_gh_23110
```python
from test_histograms import test_gh_23110
```



---
## test_small
```python
from test_histograms import test_small
```

Smaller datasets have the potential to cause issues with the data
adaptive methods, especially the FD method. All bin numbers have been
precalculated.

---
## test_incorrect_methods
```python
from test_histograms import test_incorrect_methods
```

Check a Value Error is thrown when an unknown string is passed in

---
## test_novariance
```python
from test_histograms import test_novariance
```

Check that methods handle no variance in data
Primarily for Scott and FD as the SD and IQR are both 0 in this case

---
## test_limited_variance
```python
from test_histograms import test_limited_variance
```

Check when IQR is 0, but variance exists, we return the sturges value
and not the fd value.

---
## test_outlier
```python
from test_histograms import test_outlier
```

Check the FD, Scott and Doane with outliers.

The FD estimates a smaller binwidth since it's less affected by
outliers. Since the range is so (artificially) large, this means more
bins, most of which will be empty, but the data of interest usually is
unaffected. The Scott estimator is more affected and returns fewer bins,
despite most of the variance being in one area of the data. The Doane
estimator lies somewhere between the other two.

---
## test_scott_vs_stone
```python
from test_histograms import test_scott_vs_stone
```

Verify that Scott's rule and Stone's rule converges for normally distributed data

---
## test_simple_range
```python
from test_histograms import test_simple_range
```

Straightforward testing with a mixture of linspace data (for
consistency). Adding in a 3rd mixture that will then be
completely ignored. All test values have been precomputed and
the shouldn't change.

---
## test_signed_integer_data
```python
from test_histograms import test_signed_integer_data
```



---
## test_simple_weighted
```python
from test_histograms import test_simple_weighted
```

Check that weighted data raises a TypeError

---
## test_shape_3d
```python
from test_histograms import test_shape_3d
```



---
## test_shape_4d
```python
from test_histograms import test_shape_4d
```



---
## test_identical_samples
```python
from test_histograms import test_identical_samples
```



---
## test_bins_errors
```python
from test_histograms import test_bins_errors
```



---
## test_inf_edges
```python
from test_histograms import test_inf_edges
```



---
## test_rightmost_binedge
```python
from test_histograms import test_rightmost_binedge
```



---
## test_equal_edges
```python
from test_histograms import test_equal_edges
```

Test that adjacent entries in an edge array can be equal 

---
## test_edge_dtype
```python
from test_histograms import test_edge_dtype
```

Test that if an edge array is input, its type is preserved 

---
## test_large_integers
```python
from test_histograms import test_large_integers
```



---
## test_density_non_uniform_2d
```python
from test_histograms import test_density_non_uniform_2d
```



---
## test_density_non_uniform_1d
```python
from test_histograms import test_density_non_uniform_1d
```



---
## nbins_ratio
```python
from test_histograms import nbins_ratio
```



---
## test_poly1d
```python
from test_regression import test_poly1d
```



---
## test_cov_parameters
```python
from test_regression import test_cov_parameters
```



---
## test_mem_digitize
```python
from test_regression import test_mem_digitize
```



---
## test_unique_zero_sized
```python
from test_regression import test_unique_zero_sized
```



---
## test_mem_vectorise
```python
from test_regression import test_mem_vectorise
```



---
## test_mgrid_single_element
```python
from test_regression import test_mgrid_single_element
```



---
## test_refcount_vectorize
```python
from test_regression import test_refcount_vectorize
```



---
## test_poly1d_nan_roots
```python
from test_regression import test_poly1d_nan_roots
```



---
## test_mem_polymul
```python
from test_regression import test_mem_polymul
```



---
## test_mem_string_concat
```python
from test_regression import test_mem_string_concat
```



---
## test_poly_div
```python
from test_regression import test_poly_div
```



---
## test_poly_eq
```python
from test_regression import test_poly_eq
```



---
## test_polyfit_build
```python
from test_regression import test_polyfit_build
```



---
## test_polydiv_type
```python
from test_regression import test_polydiv_type
```



---
## test_histogramdd_too_many_bins
```python
from test_regression import test_histogramdd_too_many_bins
```



---
## test_polyint_type
```python
from test_regression import test_polyint_type
```



---
## test_ndenumerate_crash
```python
from test_regression import test_ndenumerate_crash
```



---
## test_asfarray_none
```python
from test_regression import test_asfarray_none
```



---
## test_large_fancy_indexing
```python
from test_regression import test_large_fancy_indexing
```



---
## test_void_coercion
```python
from test_regression import test_void_coercion
```



---
## test_who_with_0dim_array
```python
from test_regression import test_who_with_0dim_array
```



---
## test_include_dirs
```python
from test_regression import test_include_dirs
```



---
## test_polyder_return_type
```python
from test_regression import test_polyder_return_type
```



---
## test_append_fields_dtype_list
```python
from test_regression import test_append_fields_dtype_list
```



---
## test_loadtxt_fields_subarrays
```python
from test_regression import test_loadtxt_fields_subarrays
```



---
## test_nansum_with_boolean
```python
from test_regression import test_nansum_with_boolean
```



---
## test_py3_compat
```python
from test_regression import test_py3_compat
```



---
## p
```python
from test_regression import p
```



---
## dp
```python
from test_regression import dp
```



---
## dp2
```python
from test_regression import dp2
```



---
## C
```python
from test_regression import C
```

Old-style class in python2, normal class in python3

---
## __name__
```python
from test_pocketfft import __name__
```



---
## fft1
```python
from test_pocketfft import fft1
```



---
## TestFFTShift
```python
from test_pocketfft import TestFFTShift
```



---
## TestFFT1D
```python
from test_pocketfft import TestFFT1D
```



---
## test_fft_with_order
```python
from test_pocketfft import test_fft_with_order
```



---
## TestFFTThreadSafe
```python
from test_pocketfft import TestFFTThreadSafe
```



---
## test_fft_n
```python
from test_pocketfft import test_fft_n
```



---
## test_identity
```python
from test_pocketfft import test_identity
```



---
## test_fft
```python
from test_pocketfft import test_fft
```



---
## test_ifft
```python
from test_pocketfft import test_ifft
```



---
## test_fft2
```python
from test_pocketfft import test_fft2
```



---
## test_ifft2
```python
from test_pocketfft import test_ifft2
```



---
## test_fftn
```python
from test_pocketfft import test_fftn
```



---
## test_ifftn
```python
from test_pocketfft import test_ifftn
```



---
## test_rfft
```python
from test_pocketfft import test_rfft
```



---
## test_irfft
```python
from test_pocketfft import test_irfft
```



---
## test_rfft2
```python
from test_pocketfft import test_rfft2
```



---
## test_irfft2
```python
from test_pocketfft import test_irfft2
```



---
## test_rfftn
```python
from test_pocketfft import test_rfftn
```



---
## test_irfftn
```python
from test_pocketfft import test_irfftn
```



---
## test_hfft
```python
from test_pocketfft import test_hfft
```



---
## test_ihfft
```python
from test_pocketfft import test_ihfft
```



---
## test_axes
```python
from test_pocketfft import test_axes
```



---
## test_all_1d_norm_preserving
```python
from test_pocketfft import test_all_1d_norm_preserving
```



---
## test_dtypes
```python
from test_pocketfft import test_dtypes
```



---
## _test_mtsame
```python
from test_pocketfft import _test_mtsame
```



---
## worker
```python
from test_pocketfft import worker
```



---
## __name__
```python
from test_helper import __name__
```

Test functions for fftpack.helper module

Copied from fftpack.helper by Pearu Peterson, October 2005

---
## TestFFTShift
```python
from test_helper import TestFFTShift
```



---
## TestFFTFreq
```python
from test_helper import TestFFTFreq
```



---
## TestRFFTFreq
```python
from test_helper import TestRFFTFreq
```



---
## TestIRFFTN
```python
from test_helper import TestIRFFTN
```



---
## test_definition
```python
from test_helper import test_definition
```



---
## test_inverse
```python
from test_helper import test_inverse
```



---
## test_axes_keyword
```python
from test_helper import test_axes_keyword
```



---
## test_uneven_dims
```python
from test_helper import test_uneven_dims
```

Test 2D input, which has uneven dimension sizes 

---
## test_equal_to_original
```python
from test_helper import test_equal_to_original
```

Test that the new (>=v1.15) implementation (see #10073) is equal to the original (<=v1.14) 

---
## test_not_last_axis_success
```python
from test_helper import test_not_last_axis_success
```



---
## original_fftshift
```python
from test_helper import original_fftshift
```

How fftshift was implemented in v1.14

---
## original_ifftshift
```python
from test_helper import original_ifftshift
```

How ifftshift was implemented in v1.14 

---
## __name__
```python
from test_generator_mt19937 import __name__
```



---
## endpoint
```python
from test_generator_mt19937 import endpoint
```



---
## TestSeed
```python
from test_generator_mt19937 import TestSeed
```



---
## TestBinomial
```python
from test_generator_mt19937 import TestBinomial
```



---
## TestMultinomial
```python
from test_generator_mt19937 import TestMultinomial
```



---
## TestMultivariateHypergeometric
```python
from test_generator_mt19937 import TestMultivariateHypergeometric
```



---
## TestSetState
```python
from test_generator_mt19937 import TestSetState
```



---
## TestIntegers
```python
from test_generator_mt19937 import TestIntegers
```



---
## TestRandomDist
```python
from test_generator_mt19937 import TestRandomDist
```



---
## TestBroadcast
```python
from test_generator_mt19937 import TestBroadcast
```



---
## TestThread
```python
from test_generator_mt19937 import TestThread
```



---
## TestSingleEltArrayInput
```python
from test_generator_mt19937 import TestSingleEltArrayInput
```



---
## test_jumped
```python
from test_generator_mt19937 import test_jumped
```



---
## test_broadcast_size_error
```python
from test_generator_mt19937 import test_broadcast_size_error
```



---
## test_broadcast_size_scalar
```python
from test_generator_mt19937 import test_broadcast_size_scalar
```



---
## test_ragged_shuffle
```python
from test_generator_mt19937 import test_ragged_shuffle
```



---
## test_single_arg_integer_exception
```python
from test_generator_mt19937 import test_single_arg_integer_exception
```



---
## test_c_contig_req_out
```python
from test_generator_mt19937 import test_c_contig_req_out
```



---
## test_contig_req_out
```python
from test_generator_mt19937 import test_contig_req_out
```



---
## test_generator_ctor_old_style_pickle
```python
from test_generator_mt19937 import test_generator_ctor_old_style_pickle
```



---
## test_scalar
```python
from test_generator_mt19937 import test_scalar
```



---
## test_array
```python
from test_generator_mt19937 import test_array
```



---
## test_seedsequence
```python
from test_generator_mt19937 import test_seedsequence
```



---
## test_invalid_scalar
```python
from test_generator_mt19937 import test_invalid_scalar
```



---
## test_invalid_array
```python
from test_generator_mt19937 import test_invalid_array
```



---
## test_noninstantized_bitgen
```python
from test_generator_mt19937 import test_noninstantized_bitgen
```



---
## test_n_zero
```python
from test_generator_mt19937 import test_n_zero
```



---
## test_p_is_nan
```python
from test_generator_mt19937 import test_p_is_nan
```



---
## test_basic
```python
from test_generator_mt19937 import test_basic
```



---
## test_zero_probability
```python
from test_generator_mt19937 import test_zero_probability
```



---
## test_int_negative_interval
```python
from test_generator_mt19937 import test_int_negative_interval
```



---
## test_size
```python
from test_generator_mt19937 import test_size
```



---
## test_invalid_prob
```python
from test_generator_mt19937 import test_invalid_prob
```



---
## test_invalid_n
```python
from test_generator_mt19937 import test_invalid_n
```



---
## test_p_non_contiguous
```python
from test_generator_mt19937 import test_p_non_contiguous
```



---
## test_multinomial_pvals_float32
```python
from test_generator_mt19937 import test_multinomial_pvals_float32
```



---
## setup_method
```python
from test_generator_mt19937 import setup_method
```



---
## test_argument_validation
```python
from test_generator_mt19937 import test_argument_validation
```



---
## test_edge_cases
```python
from test_generator_mt19937 import test_edge_cases
```



---
## test_typical_cases
```python
from test_generator_mt19937 import test_typical_cases
```



---
## test_repeatability1
```python
from test_generator_mt19937 import test_repeatability1
```



---
## test_repeatability2
```python
from test_generator_mt19937 import test_repeatability2
```



---
## test_repeatability3
```python
from test_generator_mt19937 import test_repeatability3
```



---
## test_gaussian_reset
```python
from test_generator_mt19937 import test_gaussian_reset
```



---
## test_gaussian_reset_in_media_res
```python
from test_generator_mt19937 import test_gaussian_reset_in_media_res
```



---
## test_negative_binomial
```python
from test_generator_mt19937 import test_negative_binomial
```



---
## test_unsupported_type
```python
from test_generator_mt19937 import test_unsupported_type
```



---
## test_bounds_checking
```python
from test_generator_mt19937 import test_bounds_checking
```



---
## test_bounds_checking_array
```python
from test_generator_mt19937 import test_bounds_checking_array
```



---
## test_rng_zero_and_extremes
```python
from test_generator_mt19937 import test_rng_zero_and_extremes
```



---
## test_rng_zero_and_extremes_array
```python
from test_generator_mt19937 import test_rng_zero_and_extremes_array
```



---
## test_full_range
```python
from test_generator_mt19937 import test_full_range
```



---
## test_full_range_array
```python
from test_generator_mt19937 import test_full_range_array
```



---
## test_in_bounds_fuzz
```python
from test_generator_mt19937 import test_in_bounds_fuzz
```



---
## test_scalar_array_equiv
```python
from test_generator_mt19937 import test_scalar_array_equiv
```



---
## test_repeatability
```python
from test_generator_mt19937 import test_repeatability
```



---
## test_repeatability_broadcasting
```python
from test_generator_mt19937 import test_repeatability_broadcasting
```



---
## test_repeatability_32bit_boundary
```python
from test_generator_mt19937 import test_repeatability_32bit_boundary
```



---
## test_repeatability_32bit_boundary_broadcasting
```python
from test_generator_mt19937 import test_repeatability_32bit_boundary_broadcasting
```



---
## test_int64_uint64_broadcast_exceptions
```python
from test_generator_mt19937 import test_int64_uint64_broadcast_exceptions
```



---
## test_int64_uint64_corner_case
```python
from test_generator_mt19937 import test_int64_uint64_corner_case
```



---
## test_respect_dtype_singleton
```python
from test_generator_mt19937 import test_respect_dtype_singleton
```



---
## test_respect_dtype_array
```python
from test_generator_mt19937 import test_respect_dtype_array
```



---
## test_zero_size
```python
from test_generator_mt19937 import test_zero_size
```



---
## test_error_byteorder
```python
from test_generator_mt19937 import test_error_byteorder
```



---
## test_integers_small_dtype_chisquared
```python
from test_generator_mt19937 import test_integers_small_dtype_chisquared
```



---
## test_integers
```python
from test_generator_mt19937 import test_integers
```



---
## test_integers_masked
```python
from test_generator_mt19937 import test_integers_masked
```



---
## test_integers_closed
```python
from test_generator_mt19937 import test_integers_closed
```



---
## test_integers_max_int
```python
from test_generator_mt19937 import test_integers_max_int
```



---
## test_random
```python
from test_generator_mt19937 import test_random
```



---
## test_random_float
```python
from test_generator_mt19937 import test_random_float
```



---
## test_random_float_scalar
```python
from test_generator_mt19937 import test_random_float_scalar
```



---
## test_random_distribution_of_lsb
```python
from test_generator_mt19937 import test_random_distribution_of_lsb
```



---
## test_random_unsupported_type
```python
from test_generator_mt19937 import test_random_unsupported_type
```



---
## test_choice_uniform_replace
```python
from test_generator_mt19937 import test_choice_uniform_replace
```



---
## test_choice_nonuniform_replace
```python
from test_generator_mt19937 import test_choice_nonuniform_replace
```



---
## test_choice_uniform_noreplace
```python
from test_generator_mt19937 import test_choice_uniform_noreplace
```



---
## test_choice_nonuniform_noreplace
```python
from test_generator_mt19937 import test_choice_nonuniform_noreplace
```



---
## test_choice_noninteger
```python
from test_generator_mt19937 import test_choice_noninteger
```



---
## test_choice_multidimensional_default_axis
```python
from test_generator_mt19937 import test_choice_multidimensional_default_axis
```



---
## test_choice_multidimensional_custom_axis
```python
from test_generator_mt19937 import test_choice_multidimensional_custom_axis
```



---
## test_choice_exceptions
```python
from test_generator_mt19937 import test_choice_exceptions
```



---
## test_choice_return_shape
```python
from test_generator_mt19937 import test_choice_return_shape
```



---
## test_choice_nan_probabilities
```python
from test_generator_mt19937 import test_choice_nan_probabilities
```



---
## test_choice_p_non_contiguous
```python
from test_generator_mt19937 import test_choice_p_non_contiguous
```



---
## test_choice_return_type
```python
from test_generator_mt19937 import test_choice_return_type
```



---
## test_choice_large_sample
```python
from test_generator_mt19937 import test_choice_large_sample
```



---
## test_bytes
```python
from test_generator_mt19937 import test_bytes
```



---
## test_shuffle
```python
from test_generator_mt19937 import test_shuffle
```



---
## test_shuffle_custom_axis
```python
from test_generator_mt19937 import test_shuffle_custom_axis
```



---
## test_shuffle_custom_axis_empty
```python
from test_generator_mt19937 import test_shuffle_custom_axis_empty
```



---
## test_shuffle_axis_nonsquare
```python
from test_generator_mt19937 import test_shuffle_axis_nonsquare
```



---
## test_shuffle_masked
```python
from test_generator_mt19937 import test_shuffle_masked
```



---
## test_shuffle_exceptions
```python
from test_generator_mt19937 import test_shuffle_exceptions
```



---
## test_shuffle_not_writeable
```python
from test_generator_mt19937 import test_shuffle_not_writeable
```



---
## test_permutation
```python
from test_generator_mt19937 import test_permutation
```



---
## test_permutation_custom_axis
```python
from test_generator_mt19937 import test_permutation_custom_axis
```



---
## test_permutation_exceptions
```python
from test_generator_mt19937 import test_permutation_exceptions
```



---
## test_permuted
```python
from test_generator_mt19937 import test_permuted
```



---
## test_permuted_with_strides
```python
from test_generator_mt19937 import test_permuted_with_strides
```



---
## test_permuted_empty
```python
from test_generator_mt19937 import test_permuted_empty
```



---
## test_permuted_out_with_wrong_shape
```python
from test_generator_mt19937 import test_permuted_out_with_wrong_shape
```



---
## test_permuted_out_with_wrong_type
```python
from test_generator_mt19937 import test_permuted_out_with_wrong_type
```



---
## test_permuted_not_writeable
```python
from test_generator_mt19937 import test_permuted_not_writeable
```



---
## test_beta
```python
from test_generator_mt19937 import test_beta
```



---
## test_binomial
```python
from test_generator_mt19937 import test_binomial
```



---
## test_chisquare
```python
from test_generator_mt19937 import test_chisquare
```



---
## test_dirichlet
```python
from test_generator_mt19937 import test_dirichlet
```



---
## test_dirichlet_size
```python
from test_generator_mt19937 import test_dirichlet_size
```



---
## test_dirichlet_bad_alpha
```python
from test_generator_mt19937 import test_dirichlet_bad_alpha
```



---
## test_dirichlet_alpha_non_contiguous
```python
from test_generator_mt19937 import test_dirichlet_alpha_non_contiguous
```



---
## test_dirichlet_small_alpha
```python
from test_generator_mt19937 import test_dirichlet_small_alpha
```



---
## test_dirichlet_moderately_small_alpha
```python
from test_generator_mt19937 import test_dirichlet_moderately_small_alpha
```



---
## test_dirichlet_multiple_zeros_in_alpha
```python
from test_generator_mt19937 import test_dirichlet_multiple_zeros_in_alpha
```



---
## test_exponential
```python
from test_generator_mt19937 import test_exponential
```



---
## test_exponential_0
```python
from test_generator_mt19937 import test_exponential_0
```



---
## test_f
```python
from test_generator_mt19937 import test_f
```



---
## test_gamma
```python
from test_generator_mt19937 import test_gamma
```



---
## test_gamma_0
```python
from test_generator_mt19937 import test_gamma_0
```



---
## test_geometric
```python
from test_generator_mt19937 import test_geometric
```



---
## test_geometric_exceptions
```python
from test_generator_mt19937 import test_geometric_exceptions
```



---
## test_gumbel
```python
from test_generator_mt19937 import test_gumbel
```



---
## test_gumbel_0
```python
from test_generator_mt19937 import test_gumbel_0
```



---
## test_hypergeometric
```python
from test_generator_mt19937 import test_hypergeometric
```



---
## test_laplace
```python
from test_generator_mt19937 import test_laplace
```



---
## test_laplace_0
```python
from test_generator_mt19937 import test_laplace_0
```



---
## test_logistic
```python
from test_generator_mt19937 import test_logistic
```



---
## test_lognormal
```python
from test_generator_mt19937 import test_lognormal
```



---
## test_lognormal_0
```python
from test_generator_mt19937 import test_lognormal_0
```



---
## test_logseries
```python
from test_generator_mt19937 import test_logseries
```



---
## test_logseries_zero
```python
from test_generator_mt19937 import test_logseries_zero
```



---
## test_logseries_exceptions
```python
from test_generator_mt19937 import test_logseries_exceptions
```



---
## test_multinomial
```python
from test_generator_mt19937 import test_multinomial
```



---
## test_multivariate_normal
```python
from test_generator_mt19937 import test_multivariate_normal
```



---
## test_multivariate_normal_disallow_complex
```python
from test_generator_mt19937 import test_multivariate_normal_disallow_complex
```



---
## test_multivariate_normal_basic_stats
```python
from test_generator_mt19937 import test_multivariate_normal_basic_stats
```



---
## test_negative_binomial_exceptions
```python
from test_generator_mt19937 import test_negative_binomial_exceptions
```



---
## test_negative_binomial_p0_exception
```python
from test_generator_mt19937 import test_negative_binomial_p0_exception
```



---
## test_negative_binomial_invalid_p_n_combination
```python
from test_generator_mt19937 import test_negative_binomial_invalid_p_n_combination
```



---
## test_noncentral_chisquare
```python
from test_generator_mt19937 import test_noncentral_chisquare
```



---
## test_noncentral_f
```python
from test_generator_mt19937 import test_noncentral_f
```



---
## test_noncentral_f_nan
```python
from test_generator_mt19937 import test_noncentral_f_nan
```



---
## test_normal
```python
from test_generator_mt19937 import test_normal
```



---
## test_normal_0
```python
from test_generator_mt19937 import test_normal_0
```



---
## test_pareto
```python
from test_generator_mt19937 import test_pareto
```



---
## test_poisson
```python
from test_generator_mt19937 import test_poisson
```



---
## test_poisson_exceptions
```python
from test_generator_mt19937 import test_poisson_exceptions
```



---
## test_power
```python
from test_generator_mt19937 import test_power
```



---
## test_rayleigh
```python
from test_generator_mt19937 import test_rayleigh
```



---
## test_rayleigh_0
```python
from test_generator_mt19937 import test_rayleigh_0
```



---
## test_standard_cauchy
```python
from test_generator_mt19937 import test_standard_cauchy
```



---
## test_standard_exponential
```python
from test_generator_mt19937 import test_standard_exponential
```



---
## test_standard_expoential_type_error
```python
from test_generator_mt19937 import test_standard_expoential_type_error
```



---
## test_standard_gamma
```python
from test_generator_mt19937 import test_standard_gamma
```



---
## test_standard_gammma_scalar_float
```python
from test_generator_mt19937 import test_standard_gammma_scalar_float
```



---
## test_standard_gamma_float
```python
from test_generator_mt19937 import test_standard_gamma_float
```



---
## test_standard_gammma_float_out
```python
from test_generator_mt19937 import test_standard_gammma_float_out
```



---
## test_standard_gamma_unknown_type
```python
from test_generator_mt19937 import test_standard_gamma_unknown_type
```



---
## test_out_size_mismatch
```python
from test_generator_mt19937 import test_out_size_mismatch
```



---
## test_standard_gamma_0
```python
from test_generator_mt19937 import test_standard_gamma_0
```



---
## test_standard_normal
```python
from test_generator_mt19937 import test_standard_normal
```



---
## test_standard_normal_unsupported_type
```python
from test_generator_mt19937 import test_standard_normal_unsupported_type
```



---
## test_standard_t
```python
from test_generator_mt19937 import test_standard_t
```



---
## test_triangular
```python
from test_generator_mt19937 import test_triangular
```



---
## test_uniform
```python
from test_generator_mt19937 import test_uniform
```



---
## test_uniform_range_bounds
```python
from test_generator_mt19937 import test_uniform_range_bounds
```



---
## test_uniform_zero_range
```python
from test_generator_mt19937 import test_uniform_zero_range
```



---
## test_uniform_neg_range
```python
from test_generator_mt19937 import test_uniform_neg_range
```



---
## test_scalar_exception_propagation
```python
from test_generator_mt19937 import test_scalar_exception_propagation
```



---
## test_vonmises
```python
from test_generator_mt19937 import test_vonmises
```



---
## test_vonmises_small
```python
from test_generator_mt19937 import test_vonmises_small
```



---
## test_vonmises_nan
```python
from test_generator_mt19937 import test_vonmises_nan
```



---
## test_vonmises_large_kappa
```python
from test_generator_mt19937 import test_vonmises_large_kappa
```



---
## test_vonmises_large_kappa_range
```python
from test_generator_mt19937 import test_vonmises_large_kappa_range
```



---
## test_wald
```python
from test_generator_mt19937 import test_wald
```



---
## test_weibull
```python
from test_generator_mt19937 import test_weibull
```



---
## test_weibull_0
```python
from test_generator_mt19937 import test_weibull_0
```



---
## test_zipf
```python
from test_generator_mt19937 import test_zipf
```



---
## test_noncentral_f_small_df
```python
from test_generator_mt19937 import test_noncentral_f_small_df
```



---
## test_multinomial_pval_broadcast
```python
from test_generator_mt19937 import test_multinomial_pval_broadcast
```



---
## test_invalid_pvals_broadcast
```python
from test_generator_mt19937 import test_invalid_pvals_broadcast
```



---
## test_empty_outputs
```python
from test_generator_mt19937 import test_empty_outputs
```



---
## check_function
```python
from test_generator_mt19937 import check_function
```



---
## test_exp
```python
from test_generator_mt19937 import test_exp
```



---
## test_one_arg_funcs
```python
from test_generator_mt19937 import test_one_arg_funcs
```



---
## test_two_arg_funcs
```python
from test_generator_mt19937 import test_two_arg_funcs
```



---
## test_three_arg_funcs
```python
from test_generator_mt19937 import test_three_arg_funcs
```



---
## ThrowingFloat
```python
from test_generator_mt19937 import ThrowingFloat
```



---
## ThrowingInteger
```python
from test_generator_mt19937 import ThrowingInteger
```



---
## gen_random
```python
from test_generator_mt19937 import gen_random
```



---
## __float__
```python
from test_generator_mt19937 import __float__
```



---
## __int__
```python
from test_generator_mt19937 import __int__
```



---
## __name__
```python
from test_randomstate import __name__
```



---
## int_func
```python
from test_randomstate import int_func
```



---
## restore_singleton_bitgen
```python
from test_randomstate import restore_singleton_bitgen
```

Ensures that the singleton bitgen is restored after a test

---
## assert_mt19937_state_equal
```python
from test_randomstate import assert_mt19937_state_equal
```



---
## TestSeed
```python
from test_randomstate import TestSeed
```



---
## TestBinomial
```python
from test_randomstate import TestBinomial
```



---
## TestMultinomial
```python
from test_randomstate import TestMultinomial
```



---
## TestSetState
```python
from test_randomstate import TestSetState
```



---
## TestRandint
```python
from test_randomstate import TestRandint
```



---
## TestRandomDist
```python
from test_randomstate import TestRandomDist
```



---
## TestBroadcast
```python
from test_randomstate import TestBroadcast
```



---
## TestThread
```python
from test_randomstate import TestThread
```



---
## TestSingleEltArrayInput
```python
from test_randomstate import TestSingleEltArrayInput
```



---
## test_integer_dtype
```python
from test_randomstate import test_integer_dtype
```



---
## test_integer_repeat
```python
from test_randomstate import test_integer_repeat
```



---
## test_broadcast_size_error
```python
from test_randomstate import test_broadcast_size_error
```



---
## test_randomstate_ctor_old_style_pickle
```python
from test_randomstate import test_randomstate_ctor_old_style_pickle
```



---
## test_hot_swap
```python
from test_randomstate import test_hot_swap
```



---
## test_seed_alt_bit_gen
```python
from test_randomstate import test_seed_alt_bit_gen
```



---
## test_state_error_alt_bit_gen
```python
from test_randomstate import test_state_error_alt_bit_gen
```



---
## test_swap_worked
```python
from test_randomstate import test_swap_worked
```



---
## test_swapped_singleton_against_direct
```python
from test_randomstate import test_swapped_singleton_against_direct
```



---
## test_scalar
```python
from test_randomstate import test_scalar
```



---
## test_array
```python
from test_randomstate import test_array
```



---
## test_invalid_scalar
```python
from test_randomstate import test_invalid_scalar
```



---
## test_invalid_array
```python
from test_randomstate import test_invalid_array
```



---
## test_invalid_array_shape
```python
from test_randomstate import test_invalid_array_shape
```



---
## test_cannot_seed
```python
from test_randomstate import test_cannot_seed
```



---
## test_invalid_initialization
```python
from test_randomstate import test_invalid_initialization
```



---
## test_n_zero
```python
from test_randomstate import test_n_zero
```



---
## test_p_is_nan
```python
from test_randomstate import test_p_is_nan
```



---
## test_basic
```python
from test_randomstate import test_basic
```



---
## test_zero_probability
```python
from test_randomstate import test_zero_probability
```



---
## test_int_negative_interval
```python
from test_randomstate import test_int_negative_interval
```



---
## test_size
```python
from test_randomstate import test_size
```



---
## test_invalid_prob
```python
from test_randomstate import test_invalid_prob
```



---
## test_invalid_n
```python
from test_randomstate import test_invalid_n
```



---
## test_p_non_contiguous
```python
from test_randomstate import test_p_non_contiguous
```



---
## test_multinomial_pvals_float32
```python
from test_randomstate import test_multinomial_pvals_float32
```



---
## test_multinomial_n_float
```python
from test_randomstate import test_multinomial_n_float
```



---
## setup_method
```python
from test_randomstate import setup_method
```



---
## test_gaussian_reset
```python
from test_randomstate import test_gaussian_reset
```



---
## test_gaussian_reset_in_media_res
```python
from test_randomstate import test_gaussian_reset_in_media_res
```



---
## test_backwards_compatibility
```python
from test_randomstate import test_backwards_compatibility
```



---
## test_negative_binomial
```python
from test_randomstate import test_negative_binomial
```



---
## test_get_state_warning
```python
from test_randomstate import test_get_state_warning
```



---
## test_invalid_legacy_state_setting
```python
from test_randomstate import test_invalid_legacy_state_setting
```



---
## test_pickle
```python
from test_randomstate import test_pickle
```



---
## test_state_setting
```python
from test_randomstate import test_state_setting
```



---
## test_repr
```python
from test_randomstate import test_repr
```



---
## test_unsupported_type
```python
from test_randomstate import test_unsupported_type
```



---
## test_bounds_checking
```python
from test_randomstate import test_bounds_checking
```



---
## test_rng_zero_and_extremes
```python
from test_randomstate import test_rng_zero_and_extremes
```



---
## test_full_range
```python
from test_randomstate import test_full_range
```



---
## test_in_bounds_fuzz
```python
from test_randomstate import test_in_bounds_fuzz
```



---
## test_repeatability
```python
from test_randomstate import test_repeatability
```



---
## test_repeatability_32bit_boundary_broadcasting
```python
from test_randomstate import test_repeatability_32bit_boundary_broadcasting
```



---
## test_int64_uint64_corner_case
```python
from test_randomstate import test_int64_uint64_corner_case
```



---
## test_respect_dtype_singleton
```python
from test_randomstate import test_respect_dtype_singleton
```



---
## test_rand
```python
from test_randomstate import test_rand
```



---
## test_rand_singleton
```python
from test_randomstate import test_rand_singleton
```



---
## test_randn
```python
from test_randomstate import test_randn
```



---
## test_randint
```python
from test_randomstate import test_randint
```



---
## test_random_integers
```python
from test_randomstate import test_random_integers
```



---
## test_tomaxint
```python
from test_randomstate import test_tomaxint
```



---
## test_random_integers_max_int
```python
from test_randomstate import test_random_integers_max_int
```



---
## test_random_integers_deprecated
```python
from test_randomstate import test_random_integers_deprecated
```



---
## test_random_sample
```python
from test_randomstate import test_random_sample
```



---
## test_choice_uniform_replace
```python
from test_randomstate import test_choice_uniform_replace
```



---
## test_choice_nonuniform_replace
```python
from test_randomstate import test_choice_nonuniform_replace
```



---
## test_choice_uniform_noreplace
```python
from test_randomstate import test_choice_uniform_noreplace
```



---
## test_choice_nonuniform_noreplace
```python
from test_randomstate import test_choice_nonuniform_noreplace
```



---
## test_choice_noninteger
```python
from test_randomstate import test_choice_noninteger
```



---
## test_choice_exceptions
```python
from test_randomstate import test_choice_exceptions
```



---
## test_choice_return_shape
```python
from test_randomstate import test_choice_return_shape
```



---
## test_choice_nan_probabilities
```python
from test_randomstate import test_choice_nan_probabilities
```



---
## test_choice_p_non_contiguous
```python
from test_randomstate import test_choice_p_non_contiguous
```



---
## test_bytes
```python
from test_randomstate import test_bytes
```



---
## test_shuffle
```python
from test_randomstate import test_shuffle
```



---
## test_shuffle_masked
```python
from test_randomstate import test_shuffle_masked
```



---
## test_permutation
```python
from test_randomstate import test_permutation
```



---
## test_beta
```python
from test_randomstate import test_beta
```



---
## test_binomial
```python
from test_randomstate import test_binomial
```



---
## test_chisquare
```python
from test_randomstate import test_chisquare
```



---
## test_dirichlet
```python
from test_randomstate import test_dirichlet
```



---
## test_dirichlet_size
```python
from test_randomstate import test_dirichlet_size
```



---
## test_dirichlet_bad_alpha
```python
from test_randomstate import test_dirichlet_bad_alpha
```



---
## test_dirichlet_alpha_non_contiguous
```python
from test_randomstate import test_dirichlet_alpha_non_contiguous
```



---
## test_exponential
```python
from test_randomstate import test_exponential
```



---
## test_exponential_0
```python
from test_randomstate import test_exponential_0
```



---
## test_f
```python
from test_randomstate import test_f
```



---
## test_gamma
```python
from test_randomstate import test_gamma
```



---
## test_gamma_0
```python
from test_randomstate import test_gamma_0
```



---
## test_geometric
```python
from test_randomstate import test_geometric
```



---
## test_geometric_exceptions
```python
from test_randomstate import test_geometric_exceptions
```



---
## test_gumbel
```python
from test_randomstate import test_gumbel
```



---
## test_gumbel_0
```python
from test_randomstate import test_gumbel_0
```



---
## test_hypergeometric
```python
from test_randomstate import test_hypergeometric
```



---
## test_laplace
```python
from test_randomstate import test_laplace
```



---
## test_laplace_0
```python
from test_randomstate import test_laplace_0
```



---
## test_logistic
```python
from test_randomstate import test_logistic
```



---
## test_lognormal
```python
from test_randomstate import test_lognormal
```



---
## test_lognormal_0
```python
from test_randomstate import test_lognormal_0
```



---
## test_logseries
```python
from test_randomstate import test_logseries
```



---
## test_logseries_zero
```python
from test_randomstate import test_logseries_zero
```



---
## test_logseries_exceptions
```python
from test_randomstate import test_logseries_exceptions
```



---
## test_multinomial
```python
from test_randomstate import test_multinomial
```



---
## test_multivariate_normal
```python
from test_randomstate import test_multivariate_normal
```



---
## test_negative_binomial_exceptions
```python
from test_randomstate import test_negative_binomial_exceptions
```



---
## test_noncentral_chisquare
```python
from test_randomstate import test_noncentral_chisquare
```



---
## test_noncentral_f
```python
from test_randomstate import test_noncentral_f
```



---
## test_noncentral_f_nan
```python
from test_randomstate import test_noncentral_f_nan
```



---
## test_normal
```python
from test_randomstate import test_normal
```



---
## test_normal_0
```python
from test_randomstate import test_normal_0
```



---
## test_pareto
```python
from test_randomstate import test_pareto
```



---
## test_poisson
```python
from test_randomstate import test_poisson
```



---
## test_poisson_exceptions
```python
from test_randomstate import test_poisson_exceptions
```



---
## test_power
```python
from test_randomstate import test_power
```



---
## test_rayleigh
```python
from test_randomstate import test_rayleigh
```



---
## test_rayleigh_0
```python
from test_randomstate import test_rayleigh_0
```



---
## test_standard_cauchy
```python
from test_randomstate import test_standard_cauchy
```



---
## test_standard_exponential
```python
from test_randomstate import test_standard_exponential
```



---
## test_standard_gamma
```python
from test_randomstate import test_standard_gamma
```



---
## test_standard_gamma_0
```python
from test_randomstate import test_standard_gamma_0
```



---
## test_standard_normal
```python
from test_randomstate import test_standard_normal
```



---
## test_randn_singleton
```python
from test_randomstate import test_randn_singleton
```



---
## test_standard_t
```python
from test_randomstate import test_standard_t
```



---
## test_triangular
```python
from test_randomstate import test_triangular
```



---
## test_uniform
```python
from test_randomstate import test_uniform
```



---
## test_uniform_range_bounds
```python
from test_randomstate import test_uniform_range_bounds
```



---
## test_scalar_exception_propagation
```python
from test_randomstate import test_scalar_exception_propagation
```



---
## test_vonmises
```python
from test_randomstate import test_vonmises
```



---
## test_vonmises_small
```python
from test_randomstate import test_vonmises_small
```



---
## test_vonmises_large
```python
from test_randomstate import test_vonmises_large
```



---
## test_vonmises_nan
```python
from test_randomstate import test_vonmises_nan
```



---
## test_wald
```python
from test_randomstate import test_wald
```



---
## test_weibull
```python
from test_randomstate import test_weibull
```



---
## test_weibull_0
```python
from test_randomstate import test_weibull_0
```



---
## test_zipf
```python
from test_randomstate import test_zipf
```



---
## set_seed
```python
from test_randomstate import set_seed
```



---
## test_noncentral_f_small_df
```python
from test_randomstate import test_noncentral_f_small_df
```



---
## check_function
```python
from test_randomstate import check_function
```



---
## test_exp
```python
from test_randomstate import test_exp
```



---
## test_one_arg_funcs
```python
from test_randomstate import test_one_arg_funcs
```



---
## test_two_arg_funcs
```python
from test_randomstate import test_two_arg_funcs
```



---
## test_three_arg_funcs
```python
from test_randomstate import test_three_arg_funcs
```



---
## test_shuffle_invalid_objects
```python
from test_randomstate import test_shuffle_invalid_objects
```



---
## ThrowingFloat
```python
from test_randomstate import ThrowingFloat
```



---
## ThrowingInteger
```python
from test_randomstate import ThrowingInteger
```



---
## gen_random
```python
from test_randomstate import gen_random
```



---
## __float__
```python
from test_randomstate import __float__
```



---
## __int__
```python
from test_randomstate import __int__
```



---
## __name__
```python
from test_direct import __name__
```



---
## assert_state_equal
```python
from test_direct import assert_state_equal
```



---
## uint32_to_float32
```python
from test_direct import uint32_to_float32
```



---
## uniform32_from_uint64
```python
from test_direct import uniform32_from_uint64
```



---
## uniform32_from_uint53
```python
from test_direct import uniform32_from_uint53
```



---
## uniform32_from_uint32
```python
from test_direct import uniform32_from_uint32
```



---
## uniform32_from_uint
```python
from test_direct import uniform32_from_uint
```



---
## uniform_from_uint
```python
from test_direct import uniform_from_uint
```



---
## uniform_from_uint64
```python
from test_direct import uniform_from_uint64
```



---
## uniform_from_uint32
```python
from test_direct import uniform_from_uint32
```



---
## uniform_from_dsfmt
```python
from test_direct import uniform_from_dsfmt
```



---
## gauss_from_uint
```python
from test_direct import gauss_from_uint
```



---
## test_seedsequence
```python
from test_direct import test_seedsequence
```



---
## test_generator_spawning
```python
from test_direct import test_generator_spawning
```

Test spawning new generators and bit_generators directly.
    

---
## test_non_spawnable
```python
from test_direct import test_non_spawnable
```



---
## Base
```python
from test_direct import Base
```



---
## TestPhilox
```python
from test_direct import TestPhilox
```



---
## TestPCG64
```python
from test_direct import TestPCG64
```



---
## TestPCG64DXSM
```python
from test_direct import TestPCG64DXSM
```



---
## TestMT19937
```python
from test_direct import TestMT19937
```



---
## TestSFC64
```python
from test_direct import TestSFC64
```



---
## TestDefaultRNG
```python
from test_direct import TestDefaultRNG
```



---
## FakeSeedSequence
```python
from test_direct import FakeSeedSequence
```



---
## setup_class
```python
from test_direct import setup_class
```



---
## _read_csv
```python
from test_direct import _read_csv
```



---
## test_raw
```python
from test_direct import test_raw
```



---
## test_random_raw
```python
from test_direct import test_random_raw
```



---
## test_gauss_inv
```python
from test_direct import test_gauss_inv
```



---
## test_uniform_double
```python
from test_direct import test_uniform_double
```



---
## test_uniform_float
```python
from test_direct import test_uniform_float
```



---
## test_repr
```python
from test_direct import test_repr
```



---
## test_str
```python
from test_direct import test_str
```



---
## test_pickle
```python
from test_direct import test_pickle
```



---
## test_invalid_state_type
```python
from test_direct import test_invalid_state_type
```



---
## test_invalid_state_value
```python
from test_direct import test_invalid_state_value
```



---
## test_invalid_init_type
```python
from test_direct import test_invalid_init_type
```



---
## test_invalid_init_values
```python
from test_direct import test_invalid_init_values
```



---
## test_benchmark
```python
from test_direct import test_benchmark
```



---
## test_cffi
```python
from test_direct import test_cffi
```



---
## test_ctypes
```python
from test_direct import test_ctypes
```



---
## test_getstate
```python
from test_direct import test_getstate
```



---
## test_set_key
```python
from test_direct import test_set_key
```



---
## test_advance_symmetry
```python
from test_direct import test_advance_symmetry
```



---
## test_advange_large
```python
from test_direct import test_advange_large
```



---
## test_seed_float_array
```python
from test_direct import test_seed_float_array
```



---
## test_state_tuple
```python
from test_direct import test_state_tuple
```



---
## test_seed
```python
from test_direct import test_seed
```



---
## test_passthrough
```python
from test_direct import test_passthrough
```



---
## generate_state
```python
from test_direct import generate_state
```



---
## __name__
```python
from test_extending import __name__
```



---
## test_cython
```python
from test_extending import test_cython
```



---
## test_numba
```python
from test_extending import test_numba
```



---
## test_cffi
```python
from test_extending import test_cffi
```



---
## load
```python
from test_extending import load
```



---
## __name__
```python
from test_smoke import __name__
```



---
## dtype
```python
from test_smoke import dtype
```



---
## params_0
```python
from test_smoke import params_0
```



---
## params_1
```python
from test_smoke import params_1
```



---
## comp_state
```python
from test_smoke import comp_state
```



---
## warmup
```python
from test_smoke import warmup
```



---
## RNG
```python
from test_smoke import RNG
```



---
## TestMT19937
```python
from test_smoke import TestMT19937
```



---
## TestPhilox
```python
from test_smoke import TestPhilox
```



---
## TestSFC64
```python
from test_smoke import TestSFC64
```



---
## TestPCG64
```python
from test_smoke import TestPCG64
```



---
## TestPCG64DXSM
```python
from test_smoke import TestPCG64DXSM
```



---
## TestDefaultRNG
```python
from test_smoke import TestDefaultRNG
```



---
## setup_class
```python
from test_smoke import setup_class
```



---
## _extra_setup
```python
from test_smoke import _extra_setup
```



---
## _reset_state
```python
from test_smoke import _reset_state
```



---
## test_init
```python
from test_smoke import test_init
```



---
## test_advance
```python
from test_smoke import test_advance
```



---
## test_jump
```python
from test_smoke import test_jump
```



---
## test_uniform
```python
from test_smoke import test_uniform
```



---
## test_uniform_array
```python
from test_smoke import test_uniform_array
```



---
## test_random
```python
from test_smoke import test_random
```



---
## test_standard_normal_zig
```python
from test_smoke import test_standard_normal_zig
```



---
## test_standard_normal
```python
from test_smoke import test_standard_normal
```



---
## test_standard_gamma
```python
from test_smoke import test_standard_gamma
```



---
## test_standard_exponential
```python
from test_smoke import test_standard_exponential
```



---
## test_standard_exponential_float
```python
from test_smoke import test_standard_exponential_float
```



---
## test_standard_exponential_float_log
```python
from test_smoke import test_standard_exponential_float_log
```



---
## test_standard_cauchy
```python
from test_smoke import test_standard_cauchy
```



---
## test_standard_t
```python
from test_smoke import test_standard_t
```



---
## test_binomial
```python
from test_smoke import test_binomial
```



---
## test_reset_state
```python
from test_smoke import test_reset_state
```



---
## test_entropy_init
```python
from test_smoke import test_entropy_init
```



---
## test_seed
```python
from test_smoke import test_seed
```



---
## test_reset_state_gauss
```python
from test_smoke import test_reset_state_gauss
```



---
## test_reset_state_uint32
```python
from test_smoke import test_reset_state_uint32
```



---
## test_reset_state_float
```python
from test_smoke import test_reset_state_float
```



---
## test_shuffle
```python
from test_smoke import test_shuffle
```



---
## test_permutation
```python
from test_smoke import test_permutation
```



---
## test_beta
```python
from test_smoke import test_beta
```



---
## test_bytes
```python
from test_smoke import test_bytes
```



---
## test_chisquare
```python
from test_smoke import test_chisquare
```



---
## test_exponential
```python
from test_smoke import test_exponential
```



---
## test_f
```python
from test_smoke import test_f
```



---
## test_gamma
```python
from test_smoke import test_gamma
```



---
## test_geometric
```python
from test_smoke import test_geometric
```



---
## test_gumbel
```python
from test_smoke import test_gumbel
```



---
## test_laplace
```python
from test_smoke import test_laplace
```



---
## test_logitic
```python
from test_smoke import test_logitic
```



---
## test_logseries
```python
from test_smoke import test_logseries
```



---
## test_negative_binomial
```python
from test_smoke import test_negative_binomial
```



---
## test_noncentral_chisquare
```python
from test_smoke import test_noncentral_chisquare
```



---
## test_noncentral_f
```python
from test_smoke import test_noncentral_f
```



---
## test_normal
```python
from test_smoke import test_normal
```



---
## test_pareto
```python
from test_smoke import test_pareto
```



---
## test_poisson
```python
from test_smoke import test_poisson
```



---
## test_power
```python
from test_smoke import test_power
```



---
## test_integers
```python
from test_smoke import test_integers
```



---
## test_rayleigh
```python
from test_smoke import test_rayleigh
```



---
## test_vonmises
```python
from test_smoke import test_vonmises
```



---
## test_wald
```python
from test_smoke import test_wald
```



---
## test_weibull
```python
from test_smoke import test_weibull
```



---
## test_zipf
```python
from test_smoke import test_zipf
```



---
## test_hypergeometric
```python
from test_smoke import test_hypergeometric
```



---
## test_triangular
```python
from test_smoke import test_triangular
```



---
## test_multivariate_normal
```python
from test_smoke import test_multivariate_normal
```



---
## test_multinomial
```python
from test_smoke import test_multinomial
```



---
## test_dirichlet
```python
from test_smoke import test_dirichlet
```



---
## test_pickle
```python
from test_smoke import test_pickle
```



---
## test_seed_array
```python
from test_smoke import test_seed_array
```



---
## test_uniform_float
```python
from test_smoke import test_uniform_float
```



---
## test_gamma_floats
```python
from test_smoke import test_gamma_floats
```



---
## test_normal_floats
```python
from test_smoke import test_normal_floats
```



---
## test_normal_zig_floats
```python
from test_smoke import test_normal_zig_floats
```



---
## test_output_fill
```python
from test_smoke import test_output_fill
```



---
## test_output_filling_uniform
```python
from test_smoke import test_output_filling_uniform
```



---
## test_output_filling_exponential
```python
from test_smoke import test_output_filling_exponential
```



---
## test_output_filling_gamma
```python
from test_smoke import test_output_filling_gamma
```



---
## test_output_filling_gamma_broadcast
```python
from test_smoke import test_output_filling_gamma_broadcast
```



---
## test_output_fill_error
```python
from test_smoke import test_output_fill_error
```



---
## test_integers_broadcast
```python
from test_smoke import test_integers_broadcast
```



---
## test_integers_numpy
```python
from test_smoke import test_integers_numpy
```



---
## test_integers_broadcast_errors
```python
from test_smoke import test_integers_broadcast_errors
```



---
## test_numpy_state
```python
from test_smoke import test_numpy_state
```



---
## test_default_is_pcg64
```python
from test_smoke import test_default_is_pcg64
```



---
## __name__
```python
from test_randomstate_regression import __name__
```



---
## TestRegression
```python
from test_randomstate_regression import TestRegression
```



---
## test_multinomial_empty
```python
from test_randomstate_regression import test_multinomial_empty
```



---
## test_multinomial_1d_pval
```python
from test_randomstate_regression import test_multinomial_1d_pval
```



---
## test_VonMises_range
```python
from test_randomstate_regression import test_VonMises_range
```



---
## test_hypergeometric_range
```python
from test_randomstate_regression import test_hypergeometric_range
```



---
## test_logseries_convergence
```python
from test_randomstate_regression import test_logseries_convergence
```



---
## test_shuffle_mixed_dimension
```python
from test_randomstate_regression import test_shuffle_mixed_dimension
```



---
## test_call_within_randomstate
```python
from test_randomstate_regression import test_call_within_randomstate
```



---
## test_multivariate_normal_size_types
```python
from test_randomstate_regression import test_multivariate_normal_size_types
```



---
## test_beta_small_parameters
```python
from test_randomstate_regression import test_beta_small_parameters
```



---
## test_choice_sum_of_probs_tolerance
```python
from test_randomstate_regression import test_choice_sum_of_probs_tolerance
```



---
## test_shuffle_of_array_of_different_length_strings
```python
from test_randomstate_regression import test_shuffle_of_array_of_different_length_strings
```



---
## test_shuffle_of_array_of_objects
```python
from test_randomstate_regression import test_shuffle_of_array_of_objects
```



---
## test_permutation_subclass
```python
from test_randomstate_regression import test_permutation_subclass
```



---
## test_warns_byteorder
```python
from test_randomstate_regression import test_warns_byteorder
```



---
## test_named_argument_initialization
```python
from test_randomstate_regression import test_named_argument_initialization
```



---
## test_choice_retun_dtype
```python
from test_randomstate_regression import test_choice_retun_dtype
```



---
## test_randint_117
```python
from test_randomstate_regression import test_randint_117
```



---
## test_p_zero_stream
```python
from test_randomstate_regression import test_p_zero_stream
```



---
## test_n_zero_stream
```python
from test_randomstate_regression import test_n_zero_stream
```



---
## N
```python
from test_randomstate_regression import N
```



---
## M
```python
from test_randomstate_regression import M
```



---
## __array__
```python
from test_randomstate_regression import __array__
```



---
## __name__
```python
from test_seed_sequence import __name__
```



---
## test_reference_data
```python
from test_seed_sequence import test_reference_data
```

Check that SeedSequence generates data the same as the C++ reference.

https://gist.github.com/imneme/540829265469e673d045

---
## test_zero_padding
```python
from test_seed_sequence import test_zero_padding
```

Ensure that the implicit zero-padding does not cause problems.
    

---
## __name__
```python
from test_generator_mt19937_regressions import __name__
```



---
## TestRegression
```python
from test_generator_mt19937_regressions import TestRegression
```



---
## setup_method
```python
from test_generator_mt19937_regressions import setup_method
```



---
## test_vonmises_range
```python
from test_generator_mt19937_regressions import test_vonmises_range
```



---
## test_hypergeometric_range
```python
from test_generator_mt19937_regressions import test_hypergeometric_range
```



---
## test_logseries_convergence
```python
from test_generator_mt19937_regressions import test_logseries_convergence
```



---
## test_shuffle_mixed_dimension
```python
from test_generator_mt19937_regressions import test_shuffle_mixed_dimension
```



---
## test_call_within_randomstate
```python
from test_generator_mt19937_regressions import test_call_within_randomstate
```



---
## test_multivariate_normal_size_types
```python
from test_generator_mt19937_regressions import test_multivariate_normal_size_types
```



---
## test_beta_small_parameters
```python
from test_generator_mt19937_regressions import test_beta_small_parameters
```



---
## test_beta_very_small_parameters
```python
from test_generator_mt19937_regressions import test_beta_very_small_parameters
```



---
## test_beta_ridiculously_small_parameters
```python
from test_generator_mt19937_regressions import test_beta_ridiculously_small_parameters
```



---
## test_choice_sum_of_probs_tolerance
```python
from test_generator_mt19937_regressions import test_choice_sum_of_probs_tolerance
```



---
## test_shuffle_of_array_of_different_length_strings
```python
from test_generator_mt19937_regressions import test_shuffle_of_array_of_different_length_strings
```



---
## test_shuffle_of_array_of_objects
```python
from test_generator_mt19937_regressions import test_shuffle_of_array_of_objects
```



---
## test_permutation_subclass
```python
from test_generator_mt19937_regressions import test_permutation_subclass
```



---
## test_gamma_0
```python
from test_generator_mt19937_regressions import test_gamma_0
```



---
## test_geometric_tiny_prob
```python
from test_generator_mt19937_regressions import test_geometric_tiny_prob
```



---
## N
```python
from test_generator_mt19937_regressions import N
```



---
## M
```python
from test_generator_mt19937_regressions import M
```



---
## __array__
```python
from test_generator_mt19937_regressions import __array__
```



---
## __name__
```python
from test_random import __name__
```



---
## TestSeed
```python
from test_random import TestSeed
```



---
## TestBinomial
```python
from test_random import TestBinomial
```



---
## TestMultinomial
```python
from test_random import TestMultinomial
```



---
## TestSetState
```python
from test_random import TestSetState
```



---
## TestRandint
```python
from test_random import TestRandint
```



---
## TestRandomDist
```python
from test_random import TestRandomDist
```



---
## TestBroadcast
```python
from test_random import TestBroadcast
```



---
## TestThread
```python
from test_random import TestThread
```



---
## TestSingleEltArrayInput
```python
from test_random import TestSingleEltArrayInput
```



---
## test_scalar
```python
from test_random import test_scalar
```



---
## test_array
```python
from test_random import test_array
```



---
## test_invalid_scalar
```python
from test_random import test_invalid_scalar
```



---
## test_invalid_array
```python
from test_random import test_invalid_array
```



---
## test_invalid_array_shape
```python
from test_random import test_invalid_array_shape
```



---
## test_n_zero
```python
from test_random import test_n_zero
```



---
## test_p_is_nan
```python
from test_random import test_p_is_nan
```



---
## test_basic
```python
from test_random import test_basic
```



---
## test_zero_probability
```python
from test_random import test_zero_probability
```



---
## test_int_negative_interval
```python
from test_random import test_int_negative_interval
```



---
## test_size
```python
from test_random import test_size
```



---
## test_multidimensional_pvals
```python
from test_random import test_multidimensional_pvals
```



---
## setup_method
```python
from test_random import setup_method
```



---
## test_gaussian_reset
```python
from test_random import test_gaussian_reset
```



---
## test_gaussian_reset_in_media_res
```python
from test_random import test_gaussian_reset_in_media_res
```



---
## test_backwards_compatibility
```python
from test_random import test_backwards_compatibility
```



---
## test_negative_binomial
```python
from test_random import test_negative_binomial
```



---
## test_set_invalid_state
```python
from test_random import test_set_invalid_state
```



---
## test_unsupported_type
```python
from test_random import test_unsupported_type
```



---
## test_bounds_checking
```python
from test_random import test_bounds_checking
```



---
## test_rng_zero_and_extremes
```python
from test_random import test_rng_zero_and_extremes
```



---
## test_full_range
```python
from test_random import test_full_range
```



---
## test_in_bounds_fuzz
```python
from test_random import test_in_bounds_fuzz
```



---
## test_repeatability
```python
from test_random import test_repeatability
```



---
## test_int64_uint64_corner_case
```python
from test_random import test_int64_uint64_corner_case
```



---
## test_respect_dtype_singleton
```python
from test_random import test_respect_dtype_singleton
```



---
## test_rand
```python
from test_random import test_rand
```



---
## test_randn
```python
from test_random import test_randn
```



---
## test_randint
```python
from test_random import test_randint
```



---
## test_random_integers
```python
from test_random import test_random_integers
```



---
## test_random_integers_max_int
```python
from test_random import test_random_integers_max_int
```



---
## test_random_integers_deprecated
```python
from test_random import test_random_integers_deprecated
```



---
## test_random
```python
from test_random import test_random
```



---
## test_choice_uniform_replace
```python
from test_random import test_choice_uniform_replace
```



---
## test_choice_nonuniform_replace
```python
from test_random import test_choice_nonuniform_replace
```



---
## test_choice_uniform_noreplace
```python
from test_random import test_choice_uniform_noreplace
```



---
## test_choice_nonuniform_noreplace
```python
from test_random import test_choice_nonuniform_noreplace
```



---
## test_choice_noninteger
```python
from test_random import test_choice_noninteger
```



---
## test_choice_exceptions
```python
from test_random import test_choice_exceptions
```



---
## test_choice_return_shape
```python
from test_random import test_choice_return_shape
```



---
## test_choice_nan_probabilities
```python
from test_random import test_choice_nan_probabilities
```



---
## test_bytes
```python
from test_random import test_bytes
```



---
## test_shuffle
```python
from test_random import test_shuffle
```



---
## test_shuffle_masked
```python
from test_random import test_shuffle_masked
```



---
## test_shuffle_untyped_warning
```python
from test_random import test_shuffle_untyped_warning
```



---
## test_shuffle_no_object_unpacking
```python
from test_random import test_shuffle_no_object_unpacking
```



---
## test_shuffle_memoryview
```python
from test_random import test_shuffle_memoryview
```



---
## test_shuffle_not_writeable
```python
from test_random import test_shuffle_not_writeable
```



---
## test_beta
```python
from test_random import test_beta
```



---
## test_binomial
```python
from test_random import test_binomial
```



---
## test_chisquare
```python
from test_random import test_chisquare
```



---
## test_dirichlet
```python
from test_random import test_dirichlet
```



---
## test_dirichlet_size
```python
from test_random import test_dirichlet_size
```



---
## test_dirichlet_bad_alpha
```python
from test_random import test_dirichlet_bad_alpha
```



---
## test_exponential
```python
from test_random import test_exponential
```



---
## test_exponential_0
```python
from test_random import test_exponential_0
```



---
## test_f
```python
from test_random import test_f
```



---
## test_gamma
```python
from test_random import test_gamma
```



---
## test_gamma_0
```python
from test_random import test_gamma_0
```



---
## test_geometric
```python
from test_random import test_geometric
```



---
## test_gumbel
```python
from test_random import test_gumbel
```



---
## test_gumbel_0
```python
from test_random import test_gumbel_0
```



---
## test_hypergeometric
```python
from test_random import test_hypergeometric
```



---
## test_laplace
```python
from test_random import test_laplace
```



---
## test_laplace_0
```python
from test_random import test_laplace_0
```



---
## test_logistic
```python
from test_random import test_logistic
```



---
## test_lognormal
```python
from test_random import test_lognormal
```



---
## test_lognormal_0
```python
from test_random import test_lognormal_0
```



---
## test_logseries
```python
from test_random import test_logseries
```



---
## test_multinomial
```python
from test_random import test_multinomial
```



---
## test_multivariate_normal
```python
from test_random import test_multivariate_normal
```



---
## test_noncentral_chisquare
```python
from test_random import test_noncentral_chisquare
```



---
## test_noncentral_f
```python
from test_random import test_noncentral_f
```



---
## test_normal
```python
from test_random import test_normal
```



---
## test_normal_0
```python
from test_random import test_normal_0
```



---
## test_pareto
```python
from test_random import test_pareto
```



---
## test_poisson
```python
from test_random import test_poisson
```



---
## test_poisson_exceptions
```python
from test_random import test_poisson_exceptions
```



---
## test_power
```python
from test_random import test_power
```



---
## test_rayleigh
```python
from test_random import test_rayleigh
```



---
## test_rayleigh_0
```python
from test_random import test_rayleigh_0
```



---
## test_standard_cauchy
```python
from test_random import test_standard_cauchy
```



---
## test_standard_exponential
```python
from test_random import test_standard_exponential
```



---
## test_standard_gamma
```python
from test_random import test_standard_gamma
```



---
## test_standard_gamma_0
```python
from test_random import test_standard_gamma_0
```



---
## test_standard_normal
```python
from test_random import test_standard_normal
```



---
## test_standard_t
```python
from test_random import test_standard_t
```



---
## test_triangular
```python
from test_random import test_triangular
```



---
## test_uniform
```python
from test_random import test_uniform
```



---
## test_uniform_range_bounds
```python
from test_random import test_uniform_range_bounds
```



---
## test_scalar_exception_propagation
```python
from test_random import test_scalar_exception_propagation
```



---
## test_vonmises
```python
from test_random import test_vonmises
```



---
## test_vonmises_small
```python
from test_random import test_vonmises_small
```



---
## test_wald
```python
from test_random import test_wald
```



---
## test_weibull
```python
from test_random import test_weibull
```



---
## test_weibull_0
```python
from test_random import test_weibull_0
```



---
## test_zipf
```python
from test_random import test_zipf
```



---
## setSeed
```python
from test_random import setSeed
```



---
## test_noncentral_f_small_df
```python
from test_random import test_noncentral_f_small_df
```



---
## check_function
```python
from test_random import check_function
```



---
## test_exp
```python
from test_random import test_exp
```



---
## test_one_arg_funcs
```python
from test_random import test_one_arg_funcs
```



---
## test_two_arg_funcs
```python
from test_random import test_two_arg_funcs
```



---
## test_three_arg_funcs
```python
from test_random import test_three_arg_funcs
```



---
## MyArr
```python
from test_random import MyArr
```



---
## ThrowingFloat
```python
from test_random import ThrowingFloat
```



---
## ThrowingInteger
```python
from test_random import ThrowingInteger
```



---
## gen_random
```python
from test_random import gen_random
```



---
## __float__
```python
from test_random import __float__
```



---
## __int__
```python
from test_random import __int__
```



---
## test_VonMises_range
```python
from test_regression import test_VonMises_range
```



---
## test_hypergeometric_range
```python
from test_regression import test_hypergeometric_range
```



---
## test_logseries_convergence
```python
from test_regression import test_logseries_convergence
```



---
## test_shuffle_mixed_dimension
```python
from test_regression import test_shuffle_mixed_dimension
```



---
## test_call_within_randomstate
```python
from test_regression import test_call_within_randomstate
```



---
## test_multivariate_normal_size_types
```python
from test_regression import test_multivariate_normal_size_types
```



---
## test_beta_small_parameters
```python
from test_regression import test_beta_small_parameters
```



---
## test_choice_sum_of_probs_tolerance
```python
from test_regression import test_choice_sum_of_probs_tolerance
```



---
## test_shuffle_of_array_of_different_length_strings
```python
from test_regression import test_shuffle_of_array_of_different_length_strings
```



---
## test_shuffle_of_array_of_objects
```python
from test_regression import test_shuffle_of_array_of_objects
```



---
## test_permutation_subclass
```python
from test_regression import test_permutation_subclass
```



---
## N
```python
from test_regression import N
```



---
## M
```python
from test_regression import M
```



---
## parse_distributions_h
```python
from parse import parse_distributions_h
```

Parse distributions.h located in inc_dir for CFFI, filling in the ffi.cdef

Read the function declarations without the "#define ..." macros that will
be filled in when loading the library.

---
## __name__
```python
from extending import __name__
```



---
## normals
```python
from extending import normals
```



---
## numbacall
```python
from extending import numbacall
```



---
## numpycall
```python
from extending import numpycall
```



---
## bounded_uint
```python
from extending import bounded_uint
```



---
## bounded_uints
```python
from extending import bounded_uints
```



---
## __name__
```python
from extending_distributions import __name__
```

Building the required library in this example requires a source distribution
of NumPy or clone of the NumPy git repository since distributions.c is not
included in binary distributions.

On *nix, execute in numpy/random/src/distributions

export ${PYTHON_VERSION}=3.8 # Python version
export PYTHON_INCLUDE=#path to Python's include folder, usually \
    ${PYTHON_HOME}/include/python${PYTHON_VERSION}m
export NUMPY_INCLUDE=#path to numpy's include folder, usually \
    ${PYTHON_HOME}/lib/python${PYTHON_VERSION}/site-packages/numpy/core/include
gcc -shared -o libdistributions.so -fPIC distributions.c \
    -I${NUMPY_INCLUDE} -I${PYTHON_INCLUDE}
mv libdistributions.so ../../_examples/numba/

On Windows

rem PYTHON_HOME and PYTHON_VERSION are setup dependent, this is an example
set PYTHON_HOME=c:\Anaconda
set PYTHON_VERSION=38
cl.exe /LD .\distributions.c -DDLL_EXPORT \
    -I%PYTHON_HOME%\lib\site-packages\numpy\core\include \
    -I%PYTHON_HOME%\include %PYTHON_HOME%\libs\python%PYTHON_VERSION%.lib
move distributions.dll ../../_examples/numba/

---
## normals
```python
from extending_distributions import normals
```



---
## __name__
```python
from test_matrix_linalg import __name__
```

Test functions for linalg module using the matrix class.

---
## MatrixTestCase
```python
from test_matrix_linalg import MatrixTestCase
```



---
## TestSolveMatrix
```python
from test_matrix_linalg import TestSolveMatrix
```



---
## TestInvMatrix
```python
from test_matrix_linalg import TestInvMatrix
```



---
## TestEigvalsMatrix
```python
from test_matrix_linalg import TestEigvalsMatrix
```



---
## TestEigMatrix
```python
from test_matrix_linalg import TestEigMatrix
```



---
## TestSVDMatrix
```python
from test_matrix_linalg import TestSVDMatrix
```



---
## TestCondMatrix
```python
from test_matrix_linalg import TestCondMatrix
```



---
## TestPinvMatrix
```python
from test_matrix_linalg import TestPinvMatrix
```



---
## TestDetMatrix
```python
from test_matrix_linalg import TestDetMatrix
```



---
## TestLstsqMatrix
```python
from test_matrix_linalg import TestLstsqMatrix
```



---
## _TestNorm2DMatrix
```python
from test_matrix_linalg import _TestNorm2DMatrix
```



---
## TestNormDoubleMatrix
```python
from test_matrix_linalg import TestNormDoubleMatrix
```



---
## TestNormSingleMatrix
```python
from test_matrix_linalg import TestNormSingleMatrix
```



---
## TestNormInt64Matrix
```python
from test_matrix_linalg import TestNormInt64Matrix
```



---
## TestQRMatrix
```python
from test_matrix_linalg import TestQRMatrix
```



---
## __name__
```python
from test_defmatrix import __name__
```



---
## TestCtor
```python
from test_defmatrix import TestCtor
```



---
## TestProperties
```python
from test_defmatrix import TestProperties
```



---
## TestCasting
```python
from test_defmatrix import TestCasting
```



---
## TestAlgebra
```python
from test_defmatrix import TestAlgebra
```



---
## TestMatrixReturn
```python
from test_defmatrix import TestMatrixReturn
```



---
## TestIndexing
```python
from test_defmatrix import TestIndexing
```



---
## TestNewScalarIndexing
```python
from test_defmatrix import TestNewScalarIndexing
```



---
## TestPower
```python
from test_defmatrix import TestPower
```



---
## TestShape
```python
from test_defmatrix import TestShape
```



---
## test_basic
```python
from test_defmatrix import test_basic
```



---
## test_exceptions
```python
from test_defmatrix import test_exceptions
```



---
## test_bmat_nondefault_str
```python
from test_defmatrix import test_bmat_nondefault_str
```



---
## test_sum
```python
from test_defmatrix import test_sum
```

Test whether matrix.sum(axis=1) preserves orientation.
Fails in NumPy <= 0.9.6.2127.

---
## test_prod
```python
from test_defmatrix import test_prod
```



---
## test_max
```python
from test_defmatrix import test_max
```



---
## test_min
```python
from test_defmatrix import test_min
```



---
## test_ptp
```python
from test_defmatrix import test_ptp
```



---
## test_var
```python
from test_defmatrix import test_var
```



---
## test_pinv
```python
from test_defmatrix import test_pinv
```



---
## test_comparisons
```python
from test_defmatrix import test_comparisons
```



---
## test_asmatrix
```python
from test_defmatrix import test_asmatrix
```



---
## test_noaxis
```python
from test_defmatrix import test_noaxis
```



---
## test_repr
```python
from test_defmatrix import test_repr
```



---
## test_make_bool_matrix_from_str
```python
from test_defmatrix import test_make_bool_matrix_from_str
```



---
## test_pow
```python
from test_defmatrix import test_pow
```

Test raising a matrix to an integer power works as expected.

---
## test_scalar_type_pow
```python
from test_defmatrix import test_scalar_type_pow
```



---
## test_notimplemented
```python
from test_defmatrix import test_notimplemented
```

Check that 'not implemented' operations produce a failure.

---
## test_instance_methods
```python
from test_defmatrix import test_instance_methods
```



---
## test_dimesions
```python
from test_defmatrix import test_dimesions
```



---
## test_array_from_matrix_list
```python
from test_defmatrix import test_array_from_matrix_list
```



---
## test_array_to_list
```python
from test_defmatrix import test_array_to_list
```



---
## test_fancy_indexing
```python
from test_defmatrix import test_fancy_indexing
```



---
## test_matrix_element
```python
from test_defmatrix import test_matrix_element
```



---
## test_scalar_indexing
```python
from test_defmatrix import test_scalar_indexing
```



---
## test_row_column_indexing
```python
from test_defmatrix import test_row_column_indexing
```



---
## test_boolean_indexing
```python
from test_defmatrix import test_boolean_indexing
```



---
## test_list_indexing
```python
from test_defmatrix import test_list_indexing
```



---
## test_returntype
```python
from test_defmatrix import test_returntype
```



---
## test_list
```python
from test_defmatrix import test_list
```



---
## test_shape
```python
from test_defmatrix import test_shape
```



---
## test_numpy_ravel
```python
from test_defmatrix import test_numpy_ravel
```



---
## test_member_ravel
```python
from test_defmatrix import test_member_ravel
```



---
## test_member_flatten
```python
from test_defmatrix import test_member_flatten
```



---
## test_numpy_ravel_order
```python
from test_defmatrix import test_numpy_ravel_order
```



---
## test_matrix_ravel_order
```python
from test_defmatrix import test_matrix_ravel_order
```



---
## test_array_memory_sharing
```python
from test_defmatrix import test_array_memory_sharing
```



---
## test_matrix_memory_sharing
```python
from test_defmatrix import test_matrix_memory_sharing
```



---
## test_expand_dims_matrix
```python
from test_defmatrix import test_expand_dims_matrix
```



---
## __name__
```python
from test_interaction import __name__
```

Tests of interaction of matrix with other parts of numpy.

Note that tests with MaskedArray and linalg are done in separate files.

---
## test_fancy_indexing
```python
from test_interaction import test_fancy_indexing
```



---
## test_polynomial_mapdomain
```python
from test_interaction import test_polynomial_mapdomain
```



---
## test_sort_matrix_none
```python
from test_interaction import test_sort_matrix_none
```



---
## test_partition_matrix_none
```python
from test_interaction import test_partition_matrix_none
```



---
## test_dot_scalar_and_matrix_of_objects
```python
from test_interaction import test_dot_scalar_and_matrix_of_objects
```



---
## test_inner_scalar_and_matrix
```python
from test_interaction import test_inner_scalar_and_matrix
```



---
## test_inner_scalar_and_matrix_of_objects
```python
from test_interaction import test_inner_scalar_and_matrix_of_objects
```



---
## test_iter_allocate_output_subtype
```python
from test_interaction import test_iter_allocate_output_subtype
```



---
## like_function
```python
from test_interaction import like_function
```



---
## test_array_astype
```python
from test_interaction import test_array_astype
```



---
## test_stack
```python
from test_interaction import test_stack
```



---
## test_object_scalar_multiply
```python
from test_interaction import test_object_scalar_multiply
```



---
## test_nanfunctions_matrices
```python
from test_interaction import test_nanfunctions_matrices
```



---
## test_nanfunctions_matrices_general
```python
from test_interaction import test_nanfunctions_matrices_general
```



---
## test_average_matrix
```python
from test_interaction import test_average_matrix
```



---
## test_trapz_matrix
```python
from test_interaction import test_trapz_matrix
```



---
## test_ediff1d_matrix
```python
from test_interaction import test_ediff1d_matrix
```



---
## test_apply_along_axis_matrix
```python
from test_interaction import test_apply_along_axis_matrix
```



---
## test_kron_matrix
```python
from test_interaction import test_kron_matrix
```



---
## TestConcatenatorMatrix
```python
from test_interaction import TestConcatenatorMatrix
```



---
## test_array_equal_error_message_matrix
```python
from test_interaction import test_array_equal_error_message_matrix
```



---
## test_array_almost_equal_matrix
```python
from test_interaction import test_array_almost_equal_matrix
```



---
## double
```python
from test_interaction import double
```



---
## test_matrix
```python
from test_interaction import test_matrix
```



---
## test_matrix_scalar
```python
from test_interaction import test_matrix_scalar
```



---
## test_matrix_builder
```python
from test_interaction import test_matrix_builder
```



---
## TestDot
```python
from test_numeric import TestDot
```



---
## test_matscalar
```python
from test_numeric import test_matscalar
```



---
## __name__
```python
from test_masked_matrix import __name__
```



---
## MMatrix
```python
from test_masked_matrix import MMatrix
```



---
## TestMaskedMatrix
```python
from test_masked_matrix import TestMaskedMatrix
```



---
## TestSubclassing
```python
from test_masked_matrix import TestSubclassing
```



---
## TestConcatenator
```python
from test_masked_matrix import TestConcatenator
```



---
## __new__
```python
from test_masked_matrix import __new__
```



---
## __array_finalize__
```python
from test_masked_matrix import __array_finalize__
```



---
## _series
```python
from test_masked_matrix import _series
```



---
## test_matrix_indexing
```python
from test_masked_matrix import test_matrix_indexing
```



---
## test_pickling_subbaseclass
```python
from test_masked_matrix import test_pickling_subbaseclass
```



---
## test_count_mean_with_matrix
```python
from test_masked_matrix import test_count_mean_with_matrix
```



---
## test_flat
```python
from test_masked_matrix import test_flat
```



---
## test_allany_onmatrices
```python
from test_masked_matrix import test_allany_onmatrices
```



---
## test_compressed
```python
from test_masked_matrix import test_compressed
```



---
## test_ravel
```python
from test_masked_matrix import test_ravel
```



---
## test_view
```python
from test_masked_matrix import test_view
```



---
## setup_method
```python
from test_masked_matrix import setup_method
```



---
## test_maskedarray_subclassing
```python
from test_masked_matrix import test_maskedarray_subclassing
```



---
## test_masked_unary_operations
```python
from test_masked_matrix import test_masked_unary_operations
```



---
## test_masked_binary_operations
```python
from test_masked_matrix import test_masked_binary_operations
```



---
## test_masked_binary_operations2
```python
from test_masked_matrix import test_masked_binary_operations2
```



---
## test_matrix_builder
```python
from test_masked_matrix import test_matrix_builder
```



---
## test_matrix
```python
from test_masked_matrix import test_matrix
```



---
## test_type
```python
from test_multiarray import test_type
```



---
## test_keywords
```python
from test_multiarray import test_keywords
```



---
## test_kron_matrix
```python
from test_regression import test_kron_matrix
```



---
## test_matrix_properties
```python
from test_regression import test_matrix_properties
```



---
## test_matrix_multiply_by_1d_vector
```python
from test_regression import test_matrix_multiply_by_1d_vector
```



---
## test_matrix_std_argmax
```python
from test_regression import test_matrix_std_argmax
```



---
## mul
```python
from test_regression import mul
```



---
## __name__
```python
from test_chebyshev import __name__
```

Tests for chebyshev module.

---
## trim
```python
from test_chebyshev import trim
```



---
## TestPrivate
```python
from test_chebyshev import TestPrivate
```



---
## TestConstants
```python
from test_chebyshev import TestConstants
```



---
## TestArithmetic
```python
from test_chebyshev import TestArithmetic
```



---
## TestEvaluation
```python
from test_chebyshev import TestEvaluation
```



---
## TestIntegral
```python
from test_chebyshev import TestIntegral
```



---
## TestDerivative
```python
from test_chebyshev import TestDerivative
```



---
## TestVander
```python
from test_chebyshev import TestVander
```



---
## TestFitting
```python
from test_chebyshev import TestFitting
```



---
## TestInterpolate
```python
from test_chebyshev import TestInterpolate
```



---
## TestCompanion
```python
from test_chebyshev import TestCompanion
```



---
## TestGauss
```python
from test_chebyshev import TestGauss
```



---
## TestMisc
```python
from test_chebyshev import TestMisc
```



---
## test__cseries_to_zseries
```python
from test_chebyshev import test__cseries_to_zseries
```



---
## test__zseries_to_cseries
```python
from test_chebyshev import test__zseries_to_cseries
```



---
## test_chebdomain
```python
from test_chebyshev import test_chebdomain
```



---
## test_chebzero
```python
from test_chebyshev import test_chebzero
```



---
## test_chebone
```python
from test_chebyshev import test_chebone
```



---
## test_chebx
```python
from test_chebyshev import test_chebx
```



---
## test_chebadd
```python
from test_chebyshev import test_chebadd
```



---
## test_chebsub
```python
from test_chebyshev import test_chebsub
```



---
## test_chebmulx
```python
from test_chebyshev import test_chebmulx
```



---
## test_chebmul
```python
from test_chebyshev import test_chebmul
```



---
## test_chebdiv
```python
from test_chebyshev import test_chebdiv
```



---
## test_chebpow
```python
from test_chebyshev import test_chebpow
```



---
## test_chebval
```python
from test_chebyshev import test_chebval
```



---
## test_chebval2d
```python
from test_chebyshev import test_chebval2d
```



---
## test_chebval3d
```python
from test_chebyshev import test_chebval3d
```



---
## test_chebgrid2d
```python
from test_chebyshev import test_chebgrid2d
```



---
## test_chebgrid3d
```python
from test_chebyshev import test_chebgrid3d
```



---
## test_chebint
```python
from test_chebyshev import test_chebint
```



---
## test_chebint_axis
```python
from test_chebyshev import test_chebint_axis
```



---
## test_chebder
```python
from test_chebyshev import test_chebder
```



---
## test_chebder_axis
```python
from test_chebyshev import test_chebder_axis
```



---
## test_chebvander
```python
from test_chebyshev import test_chebvander
```



---
## test_chebvander2d
```python
from test_chebyshev import test_chebvander2d
```



---
## test_chebvander3d
```python
from test_chebyshev import test_chebvander3d
```



---
## test_chebfit
```python
from test_chebyshev import test_chebfit
```



---
## f
```python
from test_chebyshev import f
```



---
## test_raises
```python
from test_chebyshev import test_raises
```



---
## test_dimensions
```python
from test_chebyshev import test_dimensions
```



---
## test_approximation
```python
from test_chebyshev import test_approximation
```



---
## test_linear_root
```python
from test_chebyshev import test_linear_root
```



---
## test_100
```python
from test_chebyshev import test_100
```



---
## test_chebfromroots
```python
from test_chebyshev import test_chebfromroots
```



---
## test_chebroots
```python
from test_chebyshev import test_chebroots
```



---
## test_chebtrim
```python
from test_chebyshev import test_chebtrim
```



---
## test_chebline
```python
from test_chebyshev import test_chebline
```



---
## test_cheb2poly
```python
from test_chebyshev import test_cheb2poly
```



---
## test_poly2cheb
```python
from test_chebyshev import test_poly2cheb
```



---
## test_weight
```python
from test_chebyshev import test_weight
```



---
## test_chebpts1
```python
from test_chebyshev import test_chebpts1
```



---
## test_chebpts2
```python
from test_chebyshev import test_chebpts2
```



---
## f2
```python
from test_chebyshev import f2
```



---
## powx
```python
from test_chebyshev import powx
```



---
## __name__
```python
from test_hermite_e import __name__
```

Tests for hermite_e module.

---
## trim
```python
from test_hermite_e import trim
```



---
## TestConstants
```python
from test_hermite_e import TestConstants
```



---
## TestArithmetic
```python
from test_hermite_e import TestArithmetic
```



---
## TestEvaluation
```python
from test_hermite_e import TestEvaluation
```



---
## TestIntegral
```python
from test_hermite_e import TestIntegral
```



---
## TestDerivative
```python
from test_hermite_e import TestDerivative
```



---
## TestVander
```python
from test_hermite_e import TestVander
```



---
## TestFitting
```python
from test_hermite_e import TestFitting
```



---
## TestCompanion
```python
from test_hermite_e import TestCompanion
```



---
## TestGauss
```python
from test_hermite_e import TestGauss
```



---
## TestMisc
```python
from test_hermite_e import TestMisc
```



---
## test_hermedomain
```python
from test_hermite_e import test_hermedomain
```



---
## test_hermezero
```python
from test_hermite_e import test_hermezero
```



---
## test_hermeone
```python
from test_hermite_e import test_hermeone
```



---
## test_hermex
```python
from test_hermite_e import test_hermex
```



---
## test_hermeadd
```python
from test_hermite_e import test_hermeadd
```



---
## test_hermesub
```python
from test_hermite_e import test_hermesub
```



---
## test_hermemulx
```python
from test_hermite_e import test_hermemulx
```



---
## test_hermemul
```python
from test_hermite_e import test_hermemul
```



---
## test_hermediv
```python
from test_hermite_e import test_hermediv
```



---
## test_hermepow
```python
from test_hermite_e import test_hermepow
```



---
## test_hermeval
```python
from test_hermite_e import test_hermeval
```



---
## test_hermeval2d
```python
from test_hermite_e import test_hermeval2d
```



---
## test_hermeval3d
```python
from test_hermite_e import test_hermeval3d
```



---
## test_hermegrid2d
```python
from test_hermite_e import test_hermegrid2d
```



---
## test_hermegrid3d
```python
from test_hermite_e import test_hermegrid3d
```



---
## test_hermeint
```python
from test_hermite_e import test_hermeint
```



---
## test_hermeint_axis
```python
from test_hermite_e import test_hermeint_axis
```



---
## test_hermeder
```python
from test_hermite_e import test_hermeder
```



---
## test_hermeder_axis
```python
from test_hermite_e import test_hermeder_axis
```



---
## test_hermevander
```python
from test_hermite_e import test_hermevander
```



---
## test_hermevander2d
```python
from test_hermite_e import test_hermevander2d
```



---
## test_hermevander3d
```python
from test_hermite_e import test_hermevander3d
```



---
## test_hermefit
```python
from test_hermite_e import test_hermefit
```



---
## test_raises
```python
from test_hermite_e import test_raises
```



---
## test_dimensions
```python
from test_hermite_e import test_dimensions
```



---
## test_linear_root
```python
from test_hermite_e import test_linear_root
```



---
## test_100
```python
from test_hermite_e import test_100
```



---
## test_hermefromroots
```python
from test_hermite_e import test_hermefromroots
```



---
## test_hermeroots
```python
from test_hermite_e import test_hermeroots
```



---
## test_hermetrim
```python
from test_hermite_e import test_hermetrim
```



---
## test_hermeline
```python
from test_hermite_e import test_hermeline
```



---
## test_herme2poly
```python
from test_hermite_e import test_herme2poly
```



---
## test_poly2herme
```python
from test_hermite_e import test_poly2herme
```



---
## test_weight
```python
from test_hermite_e import test_weight
```



---
## f
```python
from test_hermite_e import f
```



---
## f2
```python
from test_hermite_e import f2
```



---
## trim
```python
from test_polynomial import trim
```



---
## TestConstants
```python
from test_polynomial import TestConstants
```



---
## TestArithmetic
```python
from test_polynomial import TestArithmetic
```



---
## TestEvaluation
```python
from test_polynomial import TestEvaluation
```



---
## TestIntegral
```python
from test_polynomial import TestIntegral
```



---
## TestDerivative
```python
from test_polynomial import TestDerivative
```



---
## TestVander
```python
from test_polynomial import TestVander
```



---
## TestCompanion
```python
from test_polynomial import TestCompanion
```



---
## TestMisc
```python
from test_polynomial import TestMisc
```



---
## test_polydomain
```python
from test_polynomial import test_polydomain
```



---
## test_polyzero
```python
from test_polynomial import test_polyzero
```



---
## test_polyone
```python
from test_polynomial import test_polyone
```



---
## test_polyx
```python
from test_polynomial import test_polyx
```



---
## test_copy
```python
from test_polynomial import test_copy
```



---
## test_pickle
```python
from test_polynomial import test_pickle
```



---
## test_polyadd
```python
from test_polynomial import test_polyadd
```



---
## test_polysub
```python
from test_polynomial import test_polysub
```



---
## test_polymulx
```python
from test_polynomial import test_polymulx
```



---
## test_polymul
```python
from test_polynomial import test_polymul
```



---
## test_polypow
```python
from test_polynomial import test_polypow
```



---
## test_polyval
```python
from test_polynomial import test_polyval
```



---
## test_polyvalfromroots
```python
from test_polynomial import test_polyvalfromroots
```



---
## test_polyval2d
```python
from test_polynomial import test_polyval2d
```



---
## test_polyval3d
```python
from test_polynomial import test_polyval3d
```



---
## test_polygrid2d
```python
from test_polynomial import test_polygrid2d
```



---
## test_polygrid3d
```python
from test_polynomial import test_polygrid3d
```



---
## test_polyint
```python
from test_polynomial import test_polyint
```



---
## test_polyint_axis
```python
from test_polynomial import test_polyint_axis
```



---
## test_polyder
```python
from test_polynomial import test_polyder
```



---
## test_polyder_axis
```python
from test_polynomial import test_polyder_axis
```



---
## test_polyvander
```python
from test_polynomial import test_polyvander
```



---
## test_polyvander2d
```python
from test_polynomial import test_polyvander2d
```



---
## test_polyvander3d
```python
from test_polynomial import test_polyvander3d
```



---
## test_polyvandernegdeg
```python
from test_polynomial import test_polyvandernegdeg
```



---
## test_raises
```python
from test_polynomial import test_raises
```



---
## test_dimensions
```python
from test_polynomial import test_dimensions
```



---
## test_linear_root
```python
from test_polynomial import test_linear_root
```



---
## test_polyfromroots
```python
from test_polynomial import test_polyfromroots
```



---
## test_polyroots
```python
from test_polynomial import test_polyroots
```



---
## test_polytrim
```python
from test_polynomial import test_polytrim
```



---
## test_polyline
```python
from test_polynomial import test_polyline
```



---
## test_polyline_zero
```python
from test_polynomial import test_polyline_zero
```



---
## C
```python
from test_polynomial import C
```



---
## f
```python
from test_polynomial import f
```



---
## f2
```python
from test_polynomial import f2
```



---
## __name__
```python
from test_laguerre import __name__
```

Tests for laguerre module.

---
## trim
```python
from test_laguerre import trim
```



---
## TestConstants
```python
from test_laguerre import TestConstants
```



---
## TestArithmetic
```python
from test_laguerre import TestArithmetic
```



---
## TestEvaluation
```python
from test_laguerre import TestEvaluation
```



---
## TestIntegral
```python
from test_laguerre import TestIntegral
```



---
## TestDerivative
```python
from test_laguerre import TestDerivative
```



---
## TestVander
```python
from test_laguerre import TestVander
```



---
## TestFitting
```python
from test_laguerre import TestFitting
```



---
## TestCompanion
```python
from test_laguerre import TestCompanion
```



---
## TestGauss
```python
from test_laguerre import TestGauss
```



---
## TestMisc
```python
from test_laguerre import TestMisc
```



---
## test_lagdomain
```python
from test_laguerre import test_lagdomain
```



---
## test_lagzero
```python
from test_laguerre import test_lagzero
```



---
## test_lagone
```python
from test_laguerre import test_lagone
```



---
## test_lagx
```python
from test_laguerre import test_lagx
```



---
## test_lagadd
```python
from test_laguerre import test_lagadd
```



---
## test_lagsub
```python
from test_laguerre import test_lagsub
```



---
## test_lagmulx
```python
from test_laguerre import test_lagmulx
```



---
## test_lagmul
```python
from test_laguerre import test_lagmul
```



---
## test_lagdiv
```python
from test_laguerre import test_lagdiv
```



---
## test_lagpow
```python
from test_laguerre import test_lagpow
```



---
## test_lagval
```python
from test_laguerre import test_lagval
```



---
## test_lagval2d
```python
from test_laguerre import test_lagval2d
```



---
## test_lagval3d
```python
from test_laguerre import test_lagval3d
```



---
## test_laggrid2d
```python
from test_laguerre import test_laggrid2d
```



---
## test_laggrid3d
```python
from test_laguerre import test_laggrid3d
```



---
## test_lagint
```python
from test_laguerre import test_lagint
```



---
## test_lagint_axis
```python
from test_laguerre import test_lagint_axis
```



---
## test_lagder
```python
from test_laguerre import test_lagder
```



---
## test_lagder_axis
```python
from test_laguerre import test_lagder_axis
```



---
## test_lagvander
```python
from test_laguerre import test_lagvander
```



---
## test_lagvander2d
```python
from test_laguerre import test_lagvander2d
```



---
## test_lagvander3d
```python
from test_laguerre import test_lagvander3d
```



---
## test_lagfit
```python
from test_laguerre import test_lagfit
```



---
## test_raises
```python
from test_laguerre import test_raises
```



---
## test_dimensions
```python
from test_laguerre import test_dimensions
```



---
## test_linear_root
```python
from test_laguerre import test_linear_root
```



---
## test_100
```python
from test_laguerre import test_100
```



---
## test_lagfromroots
```python
from test_laguerre import test_lagfromroots
```



---
## test_lagroots
```python
from test_laguerre import test_lagroots
```



---
## test_lagtrim
```python
from test_laguerre import test_lagtrim
```



---
## test_lagline
```python
from test_laguerre import test_lagline
```



---
## test_lag2poly
```python
from test_laguerre import test_lag2poly
```



---
## test_poly2lag
```python
from test_laguerre import test_poly2lag
```



---
## test_weight
```python
from test_laguerre import test_weight
```



---
## f
```python
from test_laguerre import f
```



---
## __name__
```python
from test_legendre import __name__
```

Tests for legendre module.

---
## trim
```python
from test_legendre import trim
```



---
## TestConstants
```python
from test_legendre import TestConstants
```



---
## TestArithmetic
```python
from test_legendre import TestArithmetic
```



---
## TestEvaluation
```python
from test_legendre import TestEvaluation
```



---
## TestIntegral
```python
from test_legendre import TestIntegral
```



---
## TestDerivative
```python
from test_legendre import TestDerivative
```



---
## TestVander
```python
from test_legendre import TestVander
```



---
## TestFitting
```python
from test_legendre import TestFitting
```



---
## TestCompanion
```python
from test_legendre import TestCompanion
```



---
## TestGauss
```python
from test_legendre import TestGauss
```



---
## TestMisc
```python
from test_legendre import TestMisc
```



---
## test_legdomain
```python
from test_legendre import test_legdomain
```



---
## test_legzero
```python
from test_legendre import test_legzero
```



---
## test_legone
```python
from test_legendre import test_legone
```



---
## test_legx
```python
from test_legendre import test_legx
```



---
## test_legadd
```python
from test_legendre import test_legadd
```



---
## test_legsub
```python
from test_legendre import test_legsub
```



---
## test_legmulx
```python
from test_legendre import test_legmulx
```



---
## test_legmul
```python
from test_legendre import test_legmul
```



---
## test_legdiv
```python
from test_legendre import test_legdiv
```



---
## test_legpow
```python
from test_legendre import test_legpow
```



---
## test_legval
```python
from test_legendre import test_legval
```



---
## test_legval2d
```python
from test_legendre import test_legval2d
```



---
## test_legval3d
```python
from test_legendre import test_legval3d
```



---
## test_leggrid2d
```python
from test_legendre import test_leggrid2d
```



---
## test_leggrid3d
```python
from test_legendre import test_leggrid3d
```



---
## test_legint
```python
from test_legendre import test_legint
```



---
## test_legint_axis
```python
from test_legendre import test_legint_axis
```



---
## test_legint_zerointord
```python
from test_legendre import test_legint_zerointord
```



---
## test_legder
```python
from test_legendre import test_legder
```



---
## test_legder_axis
```python
from test_legendre import test_legder_axis
```



---
## test_legder_orderhigherthancoeff
```python
from test_legendre import test_legder_orderhigherthancoeff
```



---
## test_legvander
```python
from test_legendre import test_legvander
```



---
## test_legvander2d
```python
from test_legendre import test_legvander2d
```



---
## test_legvander3d
```python
from test_legendre import test_legvander3d
```



---
## test_legvander_negdeg
```python
from test_legendre import test_legvander_negdeg
```



---
## test_legfit
```python
from test_legendre import test_legfit
```



---
## test_raises
```python
from test_legendre import test_raises
```



---
## test_dimensions
```python
from test_legendre import test_dimensions
```



---
## test_linear_root
```python
from test_legendre import test_linear_root
```



---
## test_100
```python
from test_legendre import test_100
```



---
## test_legfromroots
```python
from test_legendre import test_legfromroots
```



---
## test_legroots
```python
from test_legendre import test_legroots
```



---
## test_legtrim
```python
from test_legendre import test_legtrim
```



---
## test_legline
```python
from test_legendre import test_legline
```



---
## test_legline_zeroscl
```python
from test_legendre import test_legline_zeroscl
```



---
## test_leg2poly
```python
from test_legendre import test_leg2poly
```



---
## test_poly2leg
```python
from test_legendre import test_poly2leg
```



---
## test_weight
```python
from test_legendre import test_weight
```



---
## f
```python
from test_legendre import f
```



---
## f2
```python
from test_legendre import f2
```



---
## __name__
```python
from test_printing import __name__
```



---
## TestStrUnicodeSuperSubscripts
```python
from test_printing import TestStrUnicodeSuperSubscripts
```



---
## TestStrAscii
```python
from test_printing import TestStrAscii
```



---
## TestLinebreaking
```python
from test_printing import TestLinebreaking
```



---
## test_set_default_printoptions
```python
from test_printing import test_set_default_printoptions
```



---
## test_complex_coefficients
```python
from test_printing import test_complex_coefficients
```

Test both numpy and built-in complex.

---
## test_numeric_object_coefficients
```python
from test_printing import test_numeric_object_coefficients
```



---
## test_nonnumeric_object_coefficients
```python
from test_printing import test_nonnumeric_object_coefficients
```

Test coef fallback for object arrays of non-numeric coefficients.

---
## TestFormat
```python
from test_printing import TestFormat
```



---
## test_symbol
```python
from test_printing import test_symbol
```



---
## TestRepr
```python
from test_printing import TestRepr
```



---
## TestLatexRepr
```python
from test_printing import TestLatexRepr
```

Test the latex repr used by Jupyter

---
## TestPrintOptions
```python
from test_printing import TestPrintOptions
```

Test the output is properly configured via printoptions.
The exponential notation is enabled automatically when the values 
are too small or too large.

---
## use_unicode
```python
from test_printing import use_unicode
```



---
## test_polynomial_str
```python
from test_printing import test_polynomial_str
```



---
## test_chebyshev_str
```python
from test_printing import test_chebyshev_str
```



---
## test_legendre_str
```python
from test_printing import test_legendre_str
```



---
## test_hermite_str
```python
from test_printing import test_hermite_str
```



---
## test_hermiteE_str
```python
from test_printing import test_hermiteE_str
```



---
## test_laguerre_str
```python
from test_printing import test_laguerre_str
```



---
## use_ascii
```python
from test_printing import use_ascii
```



---
## test_single_line_one_less
```python
from test_printing import test_single_line_one_less
```



---
## test_num_chars_is_linewidth
```python
from test_printing import test_num_chars_is_linewidth
```



---
## test_first_linebreak_multiline_one_less_than_linewidth
```python
from test_printing import test_first_linebreak_multiline_one_less_than_linewidth
```



---
## test_first_linebreak_multiline_on_linewidth
```python
from test_printing import test_first_linebreak_multiline_on_linewidth
```



---
## test_linewidth_printoption
```python
from test_printing import test_linewidth_printoption
```



---
## test_format_unicode
```python
from test_printing import test_format_unicode
```



---
## test_format_ascii
```python
from test_printing import test_format_ascii
```



---
## test_empty_formatstr
```python
from test_printing import test_empty_formatstr
```



---
## test_bad_formatstr
```python
from test_printing import test_bad_formatstr
```



---
## test_legendre_repr
```python
from test_printing import test_legendre_repr
```



---
## test_hermite_repr
```python
from test_printing import test_hermite_repr
```



---
## test_hermiteE_repr
```python
from test_printing import test_hermiteE_repr
```



---
## test_laguerre_repr
```python
from test_printing import test_laguerre_repr
```



---
## as_latex
```python
from test_printing import as_latex
```



---
## test_simple_polynomial
```python
from test_printing import test_simple_polynomial
```



---
## test_basis_func
```python
from test_printing import test_basis_func
```



---
## test_multichar_basis_func
```python
from test_printing import test_multichar_basis_func
```



---
## test_symbol_basic
```python
from test_printing import test_symbol_basic
```



---
## test_str
```python
from test_printing import test_str
```



---
## test_latex
```python
from test_printing import test_latex
```



---
## test_fixed
```python
from test_printing import test_fixed
```



---
## test_switch_to_exp
```python
from test_printing import test_switch_to_exp
```



---
## test_non_finite
```python
from test_printing import test_non_finite
```



---
## __name__
```python
from test_hermite import __name__
```

Tests for hermite module.

---
## trim
```python
from test_hermite import trim
```



---
## TestConstants
```python
from test_hermite import TestConstants
```



---
## TestArithmetic
```python
from test_hermite import TestArithmetic
```



---
## TestEvaluation
```python
from test_hermite import TestEvaluation
```



---
## TestIntegral
```python
from test_hermite import TestIntegral
```



---
## TestDerivative
```python
from test_hermite import TestDerivative
```



---
## TestVander
```python
from test_hermite import TestVander
```



---
## TestFitting
```python
from test_hermite import TestFitting
```



---
## TestCompanion
```python
from test_hermite import TestCompanion
```



---
## TestGauss
```python
from test_hermite import TestGauss
```



---
## TestMisc
```python
from test_hermite import TestMisc
```



---
## test_hermdomain
```python
from test_hermite import test_hermdomain
```



---
## test_hermzero
```python
from test_hermite import test_hermzero
```



---
## test_hermone
```python
from test_hermite import test_hermone
```



---
## test_hermx
```python
from test_hermite import test_hermx
```



---
## test_hermadd
```python
from test_hermite import test_hermadd
```



---
## test_hermsub
```python
from test_hermite import test_hermsub
```



---
## test_hermmulx
```python
from test_hermite import test_hermmulx
```



---
## test_hermmul
```python
from test_hermite import test_hermmul
```



---
## test_hermdiv
```python
from test_hermite import test_hermdiv
```



---
## test_hermpow
```python
from test_hermite import test_hermpow
```



---
## test_hermval
```python
from test_hermite import test_hermval
```



---
## test_hermval2d
```python
from test_hermite import test_hermval2d
```



---
## test_hermval3d
```python
from test_hermite import test_hermval3d
```



---
## test_hermgrid2d
```python
from test_hermite import test_hermgrid2d
```



---
## test_hermgrid3d
```python
from test_hermite import test_hermgrid3d
```



---
## test_hermint
```python
from test_hermite import test_hermint
```



---
## test_hermint_axis
```python
from test_hermite import test_hermint_axis
```



---
## test_hermder
```python
from test_hermite import test_hermder
```



---
## test_hermder_axis
```python
from test_hermite import test_hermder_axis
```



---
## test_hermvander
```python
from test_hermite import test_hermvander
```



---
## test_hermvander2d
```python
from test_hermite import test_hermvander2d
```



---
## test_hermvander3d
```python
from test_hermite import test_hermvander3d
```



---
## test_hermfit
```python
from test_hermite import test_hermfit
```



---
## test_raises
```python
from test_hermite import test_raises
```



---
## test_dimensions
```python
from test_hermite import test_dimensions
```



---
## test_linear_root
```python
from test_hermite import test_linear_root
```



---
## test_100
```python
from test_hermite import test_100
```



---
## test_hermfromroots
```python
from test_hermite import test_hermfromroots
```



---
## test_hermroots
```python
from test_hermite import test_hermroots
```



---
## test_hermtrim
```python
from test_hermite import test_hermtrim
```



---
## test_hermline
```python
from test_hermite import test_hermline
```



---
## test_herm2poly
```python
from test_hermite import test_herm2poly
```



---
## test_poly2herm
```python
from test_hermite import test_poly2herm
```



---
## test_weight
```python
from test_hermite import test_weight
```



---
## f
```python
from test_hermite import f
```



---
## f2
```python
from test_hermite import f2
```



---
## __name__
```python
from test_classes import __name__
```

Test inter-conversion of different polynomial classes.

This tests the convert and cast methods of all the polynomial classes.

---
## Poly
```python
from test_classes import Poly
```



---
## assert_poly_almost_equal
```python
from test_classes import assert_poly_almost_equal
```



---
## test_conversion
```python
from test_classes import test_conversion
```



---
## test_cast
```python
from test_classes import test_cast
```



---
## test_identity
```python
from test_classes import test_identity
```



---
## test_basis
```python
from test_classes import test_basis
```



---
## test_fromroots
```python
from test_classes import test_fromroots
```



---
## test_bad_conditioned_fit
```python
from test_classes import test_bad_conditioned_fit
```



---
## test_fit
```python
from test_classes import test_fit
```



---
## test_equal
```python
from test_classes import test_equal
```



---
## test_not_equal
```python
from test_classes import test_not_equal
```



---
## test_add
```python
from test_classes import test_add
```



---
## test_sub
```python
from test_classes import test_sub
```



---
## test_mul
```python
from test_classes import test_mul
```



---
## test_floordiv
```python
from test_classes import test_floordiv
```



---
## test_truediv
```python
from test_classes import test_truediv
```



---
## test_mod
```python
from test_classes import test_mod
```



---
## test_divmod
```python
from test_classes import test_divmod
```



---
## test_roots
```python
from test_classes import test_roots
```



---
## test_degree
```python
from test_classes import test_degree
```



---
## test_copy
```python
from test_classes import test_copy
```



---
## test_integ
```python
from test_classes import test_integ
```



---
## test_deriv
```python
from test_classes import test_deriv
```



---
## test_linspace
```python
from test_classes import test_linspace
```



---
## test_pow
```python
from test_classes import test_pow
```



---
## test_call
```python
from test_classes import test_call
```



---
## test_cutdeg
```python
from test_classes import test_cutdeg
```



---
## test_truncate
```python
from test_classes import test_truncate
```



---
## test_trim
```python
from test_classes import test_trim
```



---
## test_mapparms
```python
from test_classes import test_mapparms
```



---
## test_ufunc_override
```python
from test_classes import test_ufunc_override
```



---
## TestInterpolate
```python
from test_classes import TestInterpolate
```



---
## f
```python
from test_classes import f
```



---
## test_raises
```python
from test_classes import test_raises
```



---
## test_dimensions
```python
from test_classes import test_dimensions
```



---
## test_approximation
```python
from test_classes import test_approximation
```



---
## powx
```python
from test_classes import powx
```



---
## __name__
```python
from test_symbol import __name__
```

Tests related to the ``symbol`` attribute of the ABCPolyBase class.

---
## TestInit
```python
from test_symbol import TestInit
```

Test polynomial creation with symbol kwarg.

---
## TestUnaryOperators
```python
from test_symbol import TestUnaryOperators
```



---
## TestBinaryOperatorsSameSymbol
```python
from test_symbol import TestBinaryOperatorsSameSymbol
```

Ensure symbol is preserved for numeric operations on polynomials with
the same symbol

---
## TestBinaryOperatorsDifferentSymbol
```python
from test_symbol import TestBinaryOperatorsDifferentSymbol
```



---
## TestEquality
```python
from test_symbol import TestEquality
```



---
## TestExtraMethods
```python
from test_symbol import TestExtraMethods
```

Test other methods for manipulating/creating polynomial objects.

---
## test_composition
```python
from test_symbol import test_composition
```



---
## test_fit
```python
from test_symbol import test_fit
```



---
## test_froomroots
```python
from test_symbol import test_froomroots
```



---
## test_identity
```python
from test_symbol import test_identity
```



---
## test_basis
```python
from test_symbol import test_basis
```



---
## test_default_symbol
```python
from test_symbol import test_default_symbol
```



---
## test_symbol_bad_input
```python
from test_symbol import test_symbol_bad_input
```



---
## test_valid_symbols
```python
from test_symbol import test_valid_symbols
```

Values for symbol that should pass input validation.

---
## test_property
```python
from test_symbol import test_property
```

'symbol' attribute is read only.

---
## test_change_symbol
```python
from test_symbol import test_change_symbol
```



---
## test_neg
```python
from test_symbol import test_neg
```



---
## test_scalarmul
```python
from test_symbol import test_scalarmul
```



---
## test_rscalarmul
```python
from test_symbol import test_rscalarmul
```



---
## test_pow
```python
from test_symbol import test_pow
```



---
## test_add
```python
from test_symbol import test_add
```



---
## test_sub
```python
from test_symbol import test_sub
```



---
## test_polymul
```python
from test_symbol import test_polymul
```



---
## test_divmod
```python
from test_symbol import test_divmod
```



---
## test_radd
```python
from test_symbol import test_radd
```



---
## test_rsub
```python
from test_symbol import test_rsub
```



---
## test_rmul
```python
from test_symbol import test_rmul
```



---
## test_rdivmod
```python
from test_symbol import test_rdivmod
```



---
## test_binops_fails
```python
from test_symbol import test_binops_fails
```



---
## test_eq
```python
from test_symbol import test_eq
```



---
## test_neq
```python
from test_symbol import test_neq
```



---
## test_copy
```python
from test_symbol import test_copy
```



---
## test_trim
```python
from test_symbol import test_trim
```



---
## test_truncate
```python
from test_symbol import test_truncate
```



---
## test_convert
```python
from test_symbol import test_convert
```



---
## test_integ
```python
from test_symbol import test_integ
```



---
## test_deriv
```python
from test_symbol import test_deriv
```



---
## __name__
```python
from test_polyutils import __name__
```

Tests for polyutils module.

---
## TestMisc
```python
from test_polyutils import TestMisc
```



---
## TestDomain
```python
from test_polyutils import TestDomain
```



---
## test_trimseq
```python
from test_polyutils import test_trimseq
```



---
## test_as_series
```python
from test_polyutils import test_as_series
```



---
## test_trimcoef
```python
from test_polyutils import test_trimcoef
```



---
## test_vander_nd_exception
```python
from test_polyutils import test_vander_nd_exception
```



---
## test_div_zerodiv
```python
from test_polyutils import test_div_zerodiv
```



---
## test_pow_too_large
```python
from test_polyutils import test_pow_too_large
```



---
## test_getdomain
```python
from test_polyutils import test_getdomain
```



---
## test_mapdomain
```python
from test_polyutils import test_mapdomain
```



---
## test_mapparms
```python
from test_polyutils import test_mapparms
```



---
## MyNDArray
```python
from test_polyutils import MyNDArray
```



---
## query_yes_no
```python
from __main__ import query_yes_no
```

Ask a yes/no question via input() and return their answer.

"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
    It must be "yes" (the default), "no" or None (meaning
    an answer is required of the user).

The "answer" return value is True for "yes" or False for "no".

Credit goes to (c) https://stackoverflow.com/questions/3041986/apt-command-line-interface-like-yes-no-input

---
## cli_detect
```python
from __main__ import cli_detect
```

CLI assistant using ARGV and ArgumentParser
:param argv:
:return: 0 if everything is fine, anything else equal trouble

---
## __name__
```python
from _streams import __name__
```



---
## UnreliableObjectReceiveStream
```python
from _streams import UnreliableObjectReceiveStream
```

An interface for receiving objects.

This interface makes no guarantees that the received messages arrive in the order in
which they were sent, or that no messages are missed.

Asynchronously iterating over objects of this type will yield objects matching the
given type parameter.

---
## UnreliableObjectSendStream
```python
from _streams import UnreliableObjectSendStream
```

An interface for sending objects.

This interface makes no guarantees that the messages sent will reach the
recipient(s) in the same order in which they were sent, or at all.

---
## UnreliableObjectStream
```python
from _streams import UnreliableObjectStream
```

A bidirectional message stream which does not guarantee the order or reliability of
message delivery.

---
## ObjectReceiveStream
```python
from _streams import ObjectReceiveStream
```

A receive message stream which guarantees that messages are received in the same
order in which they were sent, and that no messages are missed.

---
## ObjectSendStream
```python
from _streams import ObjectSendStream
```

A send message stream which guarantees that messages are delivered in the same order
in which they were sent, without missing any messages in the middle.

---
## ObjectStream
```python
from _streams import ObjectStream
```

A bidirectional message stream which guarantees the order and reliability of message
delivery.

---
## ByteReceiveStream
```python
from _streams import ByteReceiveStream
```

An interface for receiving bytes from a single peer.

Iterating this byte stream will yield a byte string of arbitrary length, but no more
than 65536 bytes.

---
## ByteSendStream
```python
from _streams import ByteSendStream
```

An interface for sending bytes to a single peer.

---
## ByteStream
```python
from _streams import ByteStream
```

A bidirectional byte stream.

---
## Listener
```python
from _streams import Listener
```

An interface for objects that let you accept incoming connections.

---
## __aiter__
```python
from _streams import __aiter__
```



---
## __name__
```python
from _eventloop import __name__
```



---
## AsyncBackend
```python
from _eventloop import AsyncBackend
```



---
## run
```python
from _eventloop import run
```

Run the given coroutine function in an asynchronous event loop.

The current thread must not be already running an event loop.

:param func: a coroutine function
:param args: positional arguments to ``func``
:param backend: name of the asynchronous event loop implementation – currently
    either ``asyncio`` or ``trio``
:param backend_options: keyword arguments to call the backend ``run()``
    implementation with (documented :ref:`here <backend options>`)
:return: the return value of the coroutine function
:raises RuntimeError: if an asynchronous event loop is already running in this
    thread
:raises LookupError: if the named backend is not found

---
## current_token
```python
from _eventloop import current_token
```

:return:

---
## current_time
```python
from _eventloop import current_time
```

Return the current value of the event loop's internal clock.

:return: the clock value (seconds)

---
## cancelled_exception_class
```python
from _eventloop import cancelled_exception_class
```

Return the exception class that is raised in a task if it's cancelled.

---
## create_cancel_scope
```python
from _eventloop import create_cancel_scope
```



---
## current_effective_deadline
```python
from _eventloop import current_effective_deadline
```

Return the nearest deadline among all the cancel scopes effective for the
current task.

:return:
    - a clock value from the event loop's internal clock
    - ``inf`` if there is no deadline in effect
    - ``-inf`` if the current scope has been cancelled
:rtype: float

---
## create_task_group
```python
from _eventloop import create_task_group
```



---
## create_event
```python
from _eventloop import create_event
```



---
## create_lock
```python
from _eventloop import create_lock
```



---
## create_semaphore
```python
from _eventloop import create_semaphore
```



---
## create_capacity_limiter
```python
from _eventloop import create_capacity_limiter
```



---
## check_cancelled
```python
from _eventloop import check_cancelled
```



---
## run_async_from_thread
```python
from _eventloop import run_async_from_thread
```



---
## run_sync_from_thread
```python
from _eventloop import run_sync_from_thread
```



---
## create_blocking_portal
```python
from _eventloop import create_blocking_portal
```



---
## setup_process_pool_exit_at_shutdown
```python
from _eventloop import setup_process_pool_exit_at_shutdown
```



---
## create_tcp_listener
```python
from _eventloop import create_tcp_listener
```



---
## create_unix_listener
```python
from _eventloop import create_unix_listener
```



---
## current_default_thread_limiter
```python
from _eventloop import current_default_thread_limiter
```



---
## open_signal_receiver
```python
from _eventloop import open_signal_receiver
```



---
## get_current_task
```python
from _eventloop import get_current_task
```



---
## get_running_tasks
```python
from _eventloop import get_running_tasks
```



---
## create_test_runner
```python
from _eventloop import create_test_runner
```



---
## __name__
```python
from _tasks import __name__
```



---
## TaskStatus
```python
from _tasks import TaskStatus
```



---
## TaskGroup
```python
from _tasks import TaskGroup
```

Groups several asynchronous tasks together.

:ivar cancel_scope: the cancel scope inherited by all child tasks
:vartype cancel_scope: CancelScope

---
## started
```python
from _tasks import started
```



---
## start_soon
```python
from _tasks import start_soon
```

Start a new task in this task group.

:param func: a coroutine function
:param args: positional arguments to call the function with
:param name: name of the task, for the purposes of introspection and debugging

.. versionadded:: 3.0

---
## __name__
```python
from _testing import __name__
```



---
## TestRunner
```python
from _testing import TestRunner
```

Encapsulates a running event loop. Every call made through this object will use the
same event loop.

---
## __enter__
```python
from _testing import __enter__
```



---
## __exit__
```python
from _testing import __exit__
```



---
## run_asyncgen_fixture
```python
from _testing import run_asyncgen_fixture
```

Run an async generator fixture.

:param fixture_func: the fixture function
:param kwargs: keyword arguments to call the fixture function with
:return: an iterator yielding the value yielded from the async generator

---
## run_fixture
```python
from _testing import run_fixture
```

Run an async fixture.

:param fixture_func: the fixture function
:param kwargs: keyword arguments to call the fixture function with
:return: the return value of the fixture function

---
## run_test
```python
from _testing import run_test
```

Run an async test function.

:param test_func: the test function
:param kwargs: keyword arguments to call the test function with

---
## __name__
```python
from _sockets import __name__
```



---
## _NullAsyncContextManager
```python
from _sockets import _NullAsyncContextManager
```



---
## SocketAttribute
```python
from _sockets import SocketAttribute
```



---
## _SocketProvider
```python
from _sockets import _SocketProvider
```



---
## SocketStream
```python
from _sockets import SocketStream
```

Transports bytes over a socket.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## UNIXSocketStream
```python
from _sockets import UNIXSocketStream
```



---
## SocketListener
```python
from _sockets import SocketListener
```

Listens to incoming socket connections.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## UDPSocket
```python
from _sockets import UDPSocket
```

Represents an unconnected UDP socket.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## ConnectedUDPSocket
```python
from _sockets import ConnectedUDPSocket
```

Represents an connected UDP socket.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## UNIXDatagramSocket
```python
from _sockets import UNIXDatagramSocket
```

Represents an unconnected Unix datagram socket.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## ConnectedUNIXDatagramSocket
```python
from _sockets import ConnectedUNIXDatagramSocket
```

Represents a connected Unix datagram socket.

Supports all relevant extra attributes from :class:`~SocketAttribute`.

---
## extra_attributes
```python
from _sockets import extra_attributes
```



---
## _raw_socket
```python
from _sockets import _raw_socket
```



---
## __name__
```python
from _resources import __name__
```



---
## AsyncResource
```python
from _resources import AsyncResource
```

Abstract base class for all closeable asynchronous resources.

Works as an asynchronous context manager which returns the instance itself on enter,
and calls :meth:`aclose` on exit.

---
## __name__
```python
from _subprocesses import __name__
```



---
## Process
```python
from _subprocesses import Process
```

An asynchronous version of :class:`subprocess.Popen`.

---
## terminate
```python
from _subprocesses import terminate
```

Terminates the process, gracefully if possible.

On Windows, this calls ``TerminateProcess()``.
On POSIX systems, this sends ``SIGTERM`` to the process.

.. seealso:: :meth:`subprocess.Popen.terminate`

---
## kill
```python
from _subprocesses import kill
```

Kills the process.

On Windows, this calls ``TerminateProcess()``.
On POSIX systems, this sends ``SIGKILL`` to the process.

.. seealso:: :meth:`subprocess.Popen.kill`

---
## send_signal
```python
from _subprocesses import send_signal
```

Send a signal to the subprocess.

.. seealso:: :meth:`subprocess.Popen.send_signal`

:param signal: the signal number (e.g. :data:`signal.SIGHUP`)

---
## pid
```python
from _subprocesses import pid
```

The process ID of the process.

---
## returncode
```python
from _subprocesses import returncode
```

The return code of the process. If the process has not yet terminated, this will
be ``None``.

---
## stdin
```python
from _subprocesses import stdin
```

The stream for the standard input of the process.

---
## stdout
```python
from _subprocesses import stdout
```

The stream for the standard output of the process.

---
## stderr
```python
from _subprocesses import stderr
```

The stream for the standard error output of the process.

---
## __name__
```python
from _trio import __name__
```



---
## CancelScope
```python
from _trio import CancelScope
```



---
## TaskGroup
```python
from _trio import TaskGroup
```



---
## BlockingPortal
```python
from _trio import BlockingPortal
```



---
## ReceiveStreamWrapper
```python
from _trio import ReceiveStreamWrapper
```



---
## SendStreamWrapper
```python
from _trio import SendStreamWrapper
```



---
## Process
```python
from _trio import Process
```



---
## _ProcessPoolShutdownInstrument
```python
from _trio import _ProcessPoolShutdownInstrument
```



---
## _TrioSocketMixin
```python
from _trio import _TrioSocketMixin
```



---
## SocketStream
```python
from _trio import SocketStream
```



---
## UNIXSocketStream
```python
from _trio import UNIXSocketStream
```



---
## TCPSocketListener
```python
from _trio import TCPSocketListener
```



---
## UNIXSocketListener
```python
from _trio import UNIXSocketListener
```



---
## UDPSocket
```python
from _trio import UDPSocket
```



---
## ConnectedUDPSocket
```python
from _trio import ConnectedUDPSocket
```



---
## UNIXDatagramSocket
```python
from _trio import UNIXDatagramSocket
```



---
## ConnectedUNIXDatagramSocket
```python
from _trio import ConnectedUNIXDatagramSocket
```



---
## Event
```python
from _trio import Event
```



---
## Lock
```python
from _trio import Lock
```



---
## Semaphore
```python
from _trio import Semaphore
```



---
## CapacityLimiter
```python
from _trio import CapacityLimiter
```



---
## _SignalReceiver
```python
from _trio import _SignalReceiver
```



---
## TestRunner
```python
from _trio import TestRunner
```



---
## TrioTaskInfo
```python
from _trio import TrioTaskInfo
```



---
## TrioBackend
```python
from _trio import TrioBackend
```



---
## __new__
```python
from _trio import __new__
```



---
## __init__
```python
from _trio import __init__
```



---
## __enter__
```python
from _trio import __enter__
```



---
## __exit__
```python
from _trio import __exit__
```



---
## cancel
```python
from _trio import cancel
```



---
## deadline
```python
from _trio import deadline
```



---
## cancel_called
```python
from _trio import cancel_called
```



---
## cancelled_caught
```python
from _trio import cancelled_caught
```



---
## shield
```python
from _trio import shield
```



---
## start_soon
```python
from _trio import start_soon
```



---
## _spawn_task_from_thread
```python
from _trio import _spawn_task_from_thread
```



---
## terminate
```python
from _trio import terminate
```



---
## kill
```python
from _trio import kill
```



---
## send_signal
```python
from _trio import send_signal
```



---
## pid
```python
from _trio import pid
```



---
## returncode
```python
from _trio import returncode
```



---
## stdin
```python
from _trio import stdin
```



---
## stdout
```python
from _trio import stdout
```



---
## stderr
```python
from _trio import stderr
```



---
## after_run
```python
from _trio import after_run
```



---
## _check_closed
```python
from _trio import _check_closed
```



---
## _raw_socket
```python
from _trio import _raw_socket
```



---
## _convert_socket_error
```python
from _trio import _convert_socket_error
```



---
## is_set
```python
from _trio import is_set
```



---
## statistics
```python
from _trio import statistics
```



---
## set
```python
from _trio import set
```



---
## acquire_nowait
```python
from _trio import acquire_nowait
```



---
## locked
```python
from _trio import locked
```



---
## release
```python
from _trio import release
```



---
## max_value
```python
from _trio import max_value
```



---
## value
```python
from _trio import value
```



---
## total_tokens
```python
from _trio import total_tokens
```



---
## borrowed_tokens
```python
from _trio import borrowed_tokens
```



---
## available_tokens
```python
from _trio import available_tokens
```



---
## acquire_on_behalf_of_nowait
```python
from _trio import acquire_on_behalf_of_nowait
```



---
## release_on_behalf_of
```python
from _trio import release_on_behalf_of
```



---
## __aiter__
```python
from _trio import __aiter__
```



---
## _main_task_finished
```python
from _trio import _main_task_finished
```



---
## _call_in_runner_task
```python
from _trio import _call_in_runner_task
```



---
## run_asyncgen_fixture
```python
from _trio import run_asyncgen_fixture
```



---
## run_fixture
```python
from _trio import run_fixture
```



---
## run_test
```python
from _trio import run_test
```



---
## has_pending_cancellation
```python
from _trio import has_pending_cancellation
```



---
## run
```python
from _trio import run
```



---
## current_token
```python
from _trio import current_token
```



---
## current_time
```python
from _trio import current_time
```



---
## cancelled_exception_class
```python
from _trio import cancelled_exception_class
```



---
## create_cancel_scope
```python
from _trio import create_cancel_scope
```



---
## current_effective_deadline
```python
from _trio import current_effective_deadline
```



---
## create_task_group
```python
from _trio import create_task_group
```



---
## create_event
```python
from _trio import create_event
```



---
## create_lock
```python
from _trio import create_lock
```



---
## create_semaphore
```python
from _trio import create_semaphore
```



---
## create_capacity_limiter
```python
from _trio import create_capacity_limiter
```



---
## check_cancelled
```python
from _trio import check_cancelled
```



---
## run_async_from_thread
```python
from _trio import run_async_from_thread
```



---
## run_sync_from_thread
```python
from _trio import run_sync_from_thread
```



---
## create_blocking_portal
```python
from _trio import create_blocking_portal
```



---
## setup_process_pool_exit_at_shutdown
```python
from _trio import setup_process_pool_exit_at_shutdown
```



---
## create_tcp_listener
```python
from _trio import create_tcp_listener
```



---
## create_unix_listener
```python
from _trio import create_unix_listener
```



---
## current_default_thread_limiter
```python
from _trio import current_default_thread_limiter
```



---
## open_signal_receiver
```python
from _trio import open_signal_receiver
```



---
## get_current_task
```python
from _trio import get_current_task
```



---
## get_running_tasks
```python
from _trio import get_running_tasks
```



---
## create_test_runner
```python
from _trio import create_test_runner
```



---
## wrapper
```python
from _trio import wrapper
```



---
## convert_item
```python
from _trio import convert_item
```



---
## __name__
```python
from _asyncio import __name__
```



---
## find_root_task
```python
from _asyncio import find_root_task
```



---
## get_callable_name
```python
from _asyncio import get_callable_name
```



---
## _task_started
```python
from _asyncio import _task_started
```

Return ``True`` if the task has been started and has not finished.

---
## is_anyio_cancellation
```python
from _asyncio import is_anyio_cancellation
```



---
## CancelScope
```python
from _asyncio import CancelScope
```



---
## TaskState
```python
from _asyncio import TaskState
```

Encapsulates auxiliary task information that cannot be added to the Task instance
itself because there are no guarantees about its implementation.

---
## _AsyncioTaskStatus
```python
from _asyncio import _AsyncioTaskStatus
```



---
## TaskGroup
```python
from _asyncio import TaskGroup
```



---
## WorkerThread
```python
from _asyncio import WorkerThread
```



---
## BlockingPortal
```python
from _asyncio import BlockingPortal
```



---
## StreamReaderWrapper
```python
from _asyncio import StreamReaderWrapper
```



---
## StreamWriterWrapper
```python
from _asyncio import StreamWriterWrapper
```



---
## Process
```python
from _asyncio import Process
```



---
## _forcibly_shutdown_process_pool_on_exit
```python
from _asyncio import _forcibly_shutdown_process_pool_on_exit
```

Forcibly shuts down worker processes belonging to this event loop.

---
## StreamProtocol
```python
from _asyncio import StreamProtocol
```



---
## DatagramProtocol
```python
from _asyncio import DatagramProtocol
```



---
## SocketStream
```python
from _asyncio import SocketStream
```



---
## _RawSocketMixin
```python
from _asyncio import _RawSocketMixin
```



---
## UNIXSocketStream
```python
from _asyncio import UNIXSocketStream
```



---
## TCPSocketListener
```python
from _asyncio import TCPSocketListener
```



---
## UNIXSocketListener
```python
from _asyncio import UNIXSocketListener
```



---
## UDPSocket
```python
from _asyncio import UDPSocket
```



---
## ConnectedUDPSocket
```python
from _asyncio import ConnectedUDPSocket
```



---
## UNIXDatagramSocket
```python
from _asyncio import UNIXDatagramSocket
```



---
## ConnectedUNIXDatagramSocket
```python
from _asyncio import ConnectedUNIXDatagramSocket
```



---
## Event
```python
from _asyncio import Event
```



---
## Lock
```python
from _asyncio import Lock
```



---
## Semaphore
```python
from _asyncio import Semaphore
```



---
## CapacityLimiter
```python
from _asyncio import CapacityLimiter
```



---
## _SignalReceiver
```python
from _asyncio import _SignalReceiver
```



---
## AsyncIOTaskInfo
```python
from _asyncio import AsyncIOTaskInfo
```



---
## TestRunner
```python
from _asyncio import TestRunner
```



---
## AsyncIOBackend
```python
from _asyncio import AsyncIOBackend
```



---
## _State
```python
from _asyncio import _State
```



---
## Runner
```python
from _asyncio import Runner
```



---
## _cancel_all_tasks
```python
from _asyncio import _cancel_all_tasks
```



---
## __new__
```python
from _asyncio import __new__
```



---
## __init__
```python
from _asyncio import __init__
```



---
## __enter__
```python
from _asyncio import __enter__
```



---
## __exit__
```python
from _asyncio import __exit__
```



---
## _effectively_cancelled
```python
from _asyncio import _effectively_cancelled
```



---
## _parent_cancellation_is_visible_to_us
```python
from _asyncio import _parent_cancellation_is_visible_to_us
```



---
## _uncancel
```python
from _asyncio import _uncancel
```



---
## _timeout
```python
from _asyncio import _timeout
```



---
## _deliver_cancellation
```python
from _asyncio import _deliver_cancellation
```

Deliver cancellation to directly contained tasks and nested cancel scopes.

Schedule another run at the end if we still have tasks eligible for
cancellation.

:param origin: the cancel scope that originated the cancellation
:return: ``True`` if the delivery needs to be retried on the next cycle

---
## _restart_cancellation_in_parent
```python
from _asyncio import _restart_cancellation_in_parent
```

Restart the cancellation effort in the closest directly cancelled parent scope.

---
## cancel
```python
from _asyncio import cancel
```



---
## deadline
```python
from _asyncio import deadline
```



---
## cancel_called
```python
from _asyncio import cancel_called
```



---
## cancelled_caught
```python
from _asyncio import cancelled_caught
```



---
## shield
```python
from _asyncio import shield
```



---
## started
```python
from _asyncio import started
```



---
## _spawn
```python
from _asyncio import _spawn
```



---
## start_soon
```python
from _asyncio import start_soon
```



---
## _report_result
```python
from _asyncio import _report_result
```



---
## run
```python
from _asyncio import run
```

Run a coroutine inside the embedded event loop.

---
## stop
```python
from _asyncio import stop
```



---
## _spawn_task_from_thread
```python
from _asyncio import _spawn_task_from_thread
```



---
## terminate
```python
from _asyncio import terminate
```



---
## kill
```python
from _asyncio import kill
```



---
## send_signal
```python
from _asyncio import send_signal
```



---
## pid
```python
from _asyncio import pid
```



---
## returncode
```python
from _asyncio import returncode
```



---
## stdin
```python
from _asyncio import stdin
```



---
## stdout
```python
from _asyncio import stdout
```



---
## stderr
```python
from _asyncio import stderr
```



---
## connection_made
```python
from _asyncio import connection_made
```



---
## connection_lost
```python
from _asyncio import connection_lost
```



---
## data_received
```python
from _asyncio import data_received
```



---
## eof_received
```python
from _asyncio import eof_received
```



---
## pause_writing
```python
from _asyncio import pause_writing
```



---
## resume_writing
```python
from _asyncio import resume_writing
```



---
## datagram_received
```python
from _asyncio import datagram_received
```



---
## error_received
```python
from _asyncio import error_received
```



---
## _raw_socket
```python
from _asyncio import _raw_socket
```



---
## _wait_until_readable
```python
from _asyncio import _wait_until_readable
```



---
## _wait_until_writable
```python
from _asyncio import _wait_until_writable
```



---
## set
```python
from _asyncio import set
```



---
## is_set
```python
from _asyncio import is_set
```



---
## statistics
```python
from _asyncio import statistics
```



---
## acquire_nowait
```python
from _asyncio import acquire_nowait
```



---
## locked
```python
from _asyncio import locked
```



---
## release
```python
from _asyncio import release
```



---
## value
```python
from _asyncio import value
```



---
## max_value
```python
from _asyncio import max_value
```



---
## total_tokens
```python
from _asyncio import total_tokens
```



---
## borrowed_tokens
```python
from _asyncio import borrowed_tokens
```



---
## available_tokens
```python
from _asyncio import available_tokens
```



---
## acquire_on_behalf_of_nowait
```python
from _asyncio import acquire_on_behalf_of_nowait
```



---
## release_on_behalf_of
```python
from _asyncio import release_on_behalf_of
```



---
## _deliver
```python
from _asyncio import _deliver
```



---
## __aiter__
```python
from _asyncio import __aiter__
```



---
## has_pending_cancellation
```python
from _asyncio import has_pending_cancellation
```



---
## get_loop
```python
from _asyncio import get_loop
```

Return embedded event loop.

---
## _exception_handler
```python
from _asyncio import _exception_handler
```



---
## _raise_async_exceptions
```python
from _asyncio import _raise_async_exceptions
```



---
## run_asyncgen_fixture
```python
from _asyncio import run_asyncgen_fixture
```



---
## run_fixture
```python
from _asyncio import run_fixture
```



---
## run_test
```python
from _asyncio import run_test
```



---
## current_token
```python
from _asyncio import current_token
```



---
## current_time
```python
from _asyncio import current_time
```



---
## cancelled_exception_class
```python
from _asyncio import cancelled_exception_class
```



---
## create_cancel_scope
```python
from _asyncio import create_cancel_scope
```



---
## current_effective_deadline
```python
from _asyncio import current_effective_deadline
```



---
## create_task_group
```python
from _asyncio import create_task_group
```



---
## create_event
```python
from _asyncio import create_event
```



---
## create_lock
```python
from _asyncio import create_lock
```



---
## create_semaphore
```python
from _asyncio import create_semaphore
```



---
## create_capacity_limiter
```python
from _asyncio import create_capacity_limiter
```



---
## check_cancelled
```python
from _asyncio import check_cancelled
```



---
## run_async_from_thread
```python
from _asyncio import run_async_from_thread
```



---
## run_sync_from_thread
```python
from _asyncio import run_sync_from_thread
```



---
## create_blocking_portal
```python
from _asyncio import create_blocking_portal
```



---
## setup_process_pool_exit_at_shutdown
```python
from _asyncio import setup_process_pool_exit_at_shutdown
```



---
## create_tcp_listener
```python
from _asyncio import create_tcp_listener
```



---
## create_unix_listener
```python
from _asyncio import create_unix_listener
```



---
## current_default_thread_limiter
```python
from _asyncio import current_default_thread_limiter
```



---
## open_signal_receiver
```python
from _asyncio import open_signal_receiver
```



---
## get_current_task
```python
from _asyncio import get_current_task
```



---
## get_running_tasks
```python
from _asyncio import get_running_tasks
```



---
## create_test_runner
```python
from _asyncio import create_test_runner
```



---
## close
```python
from _asyncio import close
```

Shutdown and close event loop.

---
## _lazy_init
```python
from _asyncio import _lazy_init
```



---
## _on_sigint
```python
from _asyncio import _on_sigint
```



---
## _do_shutdown
```python
from _asyncio import _do_shutdown
```



---
## task_done
```python
from _asyncio import task_done
```



---
## callback
```python
from _asyncio import callback
```



---
## wrapper
```python
from _asyncio import wrapper
```



---
## __name__
```python
from _signals import __name__
```



---
## open_signal_receiver
```python
from _signals import open_signal_receiver
```

Start receiving operating system signals.

:param signals: signals to receive (e.g. ``signal.SIGINT``)
:return: an asynchronous context manager for an asynchronous iterator which yields
    signal numbers

.. warning:: Windows does not support signals natively so it is best to avoid
    relying on this in cross-platform applications.

.. warning:: On asyncio, this permanently replaces any previous signal handler for
    the given signals, as set via :meth:`~asyncio.loop.add_signal_handler`.

---
## __name__
```python
from _fileio import __name__
```



---
## AsyncFile
```python
from _fileio import AsyncFile
```

An asynchronous file object.

This class wraps a standard file object and provides async friendly versions of the
following blocking methods (where available on the original file object):

* read
* read1
* readline
* readlines
* readinto
* readinto1
* write
* writelines
* truncate
* seek
* tell
* flush

All other methods are directly passed through.

This class supports the asynchronous context manager protocol which closes the
underlying file at the end of the context block.

This class also supports asynchronous iteration::

    async with await open_file(...) as f:
        async for line in f:
            print(line)

---
## wrap_file
```python
from _fileio import wrap_file
```

Wrap an existing file as an asynchronous file.

:param file: an existing file-like object
:return: an asynchronous file object

---
## _PathIterator
```python
from _fileio import _PathIterator
```



---
## Path
```python
from _fileio import Path
```

An asynchronous version of :class:`pathlib.Path`.

This class cannot be substituted for :class:`pathlib.Path` or
:class:`pathlib.PurePath`, but it is compatible with the :class:`os.PathLike`
interface.

It implements the Python 3.10 version of :class:`pathlib.Path` interface, except for
the deprecated :meth:`~pathlib.Path.link_to` method.

Any methods that do disk I/O need to be awaited on. These methods are:

* :meth:`~pathlib.Path.absolute`
* :meth:`~pathlib.Path.chmod`
* :meth:`~pathlib.Path.cwd`
* :meth:`~pathlib.Path.exists`
* :meth:`~pathlib.Path.expanduser`
* :meth:`~pathlib.Path.group`
* :meth:`~pathlib.Path.hardlink_to`
* :meth:`~pathlib.Path.home`
* :meth:`~pathlib.Path.is_block_device`
* :meth:`~pathlib.Path.is_char_device`
* :meth:`~pathlib.Path.is_dir`
* :meth:`~pathlib.Path.is_fifo`
* :meth:`~pathlib.Path.is_file`
* :meth:`~pathlib.Path.is_mount`
* :meth:`~pathlib.Path.lchmod`
* :meth:`~pathlib.Path.lstat`
* :meth:`~pathlib.Path.mkdir`
* :meth:`~pathlib.Path.open`
* :meth:`~pathlib.Path.owner`
* :meth:`~pathlib.Path.read_bytes`
* :meth:`~pathlib.Path.read_text`
* :meth:`~pathlib.Path.readlink`
* :meth:`~pathlib.Path.rename`
* :meth:`~pathlib.Path.replace`
* :meth:`~pathlib.Path.rmdir`
* :meth:`~pathlib.Path.samefile`
* :meth:`~pathlib.Path.stat`
* :meth:`~pathlib.Path.touch`
* :meth:`~pathlib.Path.unlink`
* :meth:`~pathlib.Path.write_bytes`
* :meth:`~pathlib.Path.write_text`

Additionally, the following methods return an async iterator yielding
:class:`~.Path` objects:

* :meth:`~pathlib.Path.glob`
* :meth:`~pathlib.Path.iterdir`
* :meth:`~pathlib.Path.rglob`

---
## __init__
```python
from _fileio import __init__
```



---
## __getattr__
```python
from _fileio import __getattr__
```



---
## wrapped
```python
from _fileio import wrapped
```

The wrapped file object.

---
## __fspath__
```python
from _fileio import __fspath__
```



---
## __str__
```python
from _fileio import __str__
```



---
## __repr__
```python
from _fileio import __repr__
```



---
## __bytes__
```python
from _fileio import __bytes__
```



---
## __hash__
```python
from _fileio import __hash__
```



---
## __eq__
```python
from _fileio import __eq__
```



---
## __lt__
```python
from _fileio import __lt__
```



---
## __le__
```python
from _fileio import __le__
```



---
## __gt__
```python
from _fileio import __gt__
```



---
## __ge__
```python
from _fileio import __ge__
```



---
## __truediv__
```python
from _fileio import __truediv__
```



---
## __rtruediv__
```python
from _fileio import __rtruediv__
```



---
## parts
```python
from _fileio import parts
```



---
## drive
```python
from _fileio import drive
```



---
## root
```python
from _fileio import root
```



---
## anchor
```python
from _fileio import anchor
```



---
## parents
```python
from _fileio import parents
```



---
## parent
```python
from _fileio import parent
```



---
## name
```python
from _fileio import name
```



---
## suffix
```python
from _fileio import suffix
```



---
## suffixes
```python
from _fileio import suffixes
```



---
## stem
```python
from _fileio import stem
```



---
## as_posix
```python
from _fileio import as_posix
```



---
## as_uri
```python
from _fileio import as_uri
```



---
## is_relative_to
```python
from _fileio import is_relative_to
```



---
## glob
```python
from _fileio import glob
```



---
## is_absolute
```python
from _fileio import is_absolute
```



---
## is_reserved
```python
from _fileio import is_reserved
```



---
## iterdir
```python
from _fileio import iterdir
```



---
## joinpath
```python
from _fileio import joinpath
```



---
## rglob
```python
from _fileio import rglob
```



---
## with_name
```python
from _fileio import with_name
```



---
## with_stem
```python
from _fileio import with_stem
```



---
## with_suffix
```python
from _fileio import with_suffix
```



---
## with_segments
```python
from _fileio import with_segments
```



---
## from_uri
```python
from _fileio import from_uri
```



---
## full_match
```python
from _fileio import full_match
```



---
## match
```python
from _fileio import match
```



---
## relative_to
```python
from _fileio import relative_to
```



---
## sync_write_text
```python
from _fileio import sync_write_text
```



---
## get_next_value
```python
from _fileio import get_next_value
```



---
## EventStatistics
```python
from _synchronization import EventStatistics
```

:ivar int tasks_waiting: number of tasks waiting on :meth:`~.Event.wait`

---
## CapacityLimiterStatistics
```python
from _synchronization import CapacityLimiterStatistics
```

:ivar int borrowed_tokens: number of tokens currently borrowed by tasks
:ivar float total_tokens: total number of available tokens
:ivar tuple borrowers: tasks or other objects currently holding tokens borrowed from
    this limiter
:ivar int tasks_waiting: number of tasks waiting on
    :meth:`~.CapacityLimiter.acquire` or
    :meth:`~.CapacityLimiter.acquire_on_behalf_of`

---
## LockStatistics
```python
from _synchronization import LockStatistics
```

:ivar bool locked: flag indicating if this lock is locked or not
:ivar ~anyio.TaskInfo owner: task currently holding the lock (or ``None`` if the
    lock is not held by any task)
:ivar int tasks_waiting: number of tasks waiting on :meth:`~.Lock.acquire`

---
## ConditionStatistics
```python
from _synchronization import ConditionStatistics
```

:ivar int tasks_waiting: number of tasks blocked on :meth:`~.Condition.wait`
:ivar ~anyio.LockStatistics lock_statistics: statistics of the underlying
    :class:`~.Lock`

---
## SemaphoreStatistics
```python
from _synchronization import SemaphoreStatistics
```

:ivar int tasks_waiting: number of tasks waiting on :meth:`~.Semaphore.acquire`

---
## EventAdapter
```python
from _synchronization import EventAdapter
```



---
## LockAdapter
```python
from _synchronization import LockAdapter
```



---
## Condition
```python
from _synchronization import Condition
```



---
## SemaphoreAdapter
```python
from _synchronization import SemaphoreAdapter
```



---
## CapacityLimiter
```python
from _synchronization import CapacityLimiter
```



---
## CapacityLimiterAdapter
```python
from _synchronization import CapacityLimiterAdapter
```



---
## ResourceGuard
```python
from _synchronization import ResourceGuard
```

A context manager for ensuring that a resource is only used by a single task at a
time.

Entering this context manager while the previous has not exited it yet will trigger
:exc:`BusyResourceError`.

:param action: the action to guard against (visible in the :exc:`BusyResourceError`
    when triggered, e.g. "Another task is already {action} this resource")

.. versionadded:: 4.1

---
## __new__
```python
from _synchronization import __new__
```



---
## is_set
```python
from _synchronization import is_set
```



---
## statistics
```python
from _synchronization import statistics
```



---
## _event
```python
from _synchronization import _event
```



---
## acquire_nowait
```python
from _synchronization import acquire_nowait
```



---
## locked
```python
from _synchronization import locked
```

Return True if the lock is set.

---
## _lock
```python
from _synchronization import _lock
```



---
## _check_acquired
```python
from _synchronization import _check_acquired
```



---
## notify
```python
from _synchronization import notify
```

Notify exactly n listeners.

---
## notify_all
```python
from _synchronization import notify_all
```

Notify all the listeners.

---
## value
```python
from _synchronization import value
```



---
## max_value
```python
from _synchronization import max_value
```



---
## _semaphore
```python
from _synchronization import _semaphore
```



---
## total_tokens
```python
from _synchronization import total_tokens
```



---
## borrowed_tokens
```python
from _synchronization import borrowed_tokens
```



---
## available_tokens
```python
from _synchronization import available_tokens
```



---
## acquire_on_behalf_of_nowait
```python
from _synchronization import acquire_on_behalf_of_nowait
```



---
## release_on_behalf_of
```python
from _synchronization import release_on_behalf_of
```



---
## _limiter
```python
from _synchronization import _limiter
```



---
## create_memory_object_stream
```python
from _streams import create_memory_object_stream
```

Create a memory object stream.

The stream's item type can be annotated like
:func:`create_memory_object_stream[T_Item]`.

:param max_buffer_size: number of items held in the buffer until ``send()`` starts
    blocking
:param item_type: old way of marking the streams with the right generic type for
    static typing (does nothing on AnyIO 4)

    .. deprecated:: 4.0
      Use ``create_memory_object_stream[YourItemType](...)`` instead.
:return: a tuple of (send stream, receive stream)

---
## __new__
```python
from _streams import __new__
```



---
## get_all_backends
```python
from _eventloop import get_all_backends
```

Return a tuple of the names of all built-in backends.

---
## get_cancelled_exc_class
```python
from _eventloop import get_cancelled_exc_class
```

Return the current async library's cancellation exception class.

---
## claim_worker_thread
```python
from _eventloop import claim_worker_thread
```



---
## get_async_backend
```python
from _eventloop import get_async_backend
```



---
## _IgnoredTaskStatus
```python
from _tasks import _IgnoredTaskStatus
```



---
## CancelScope
```python
from _tasks import CancelScope
```

Wraps a unit of work that can be made separately cancellable.

:param deadline: The time (clock value) when this scope is cancelled automatically
:param shield: ``True`` to shield the cancel scope from external cancellation

---
## fail_after
```python
from _tasks import fail_after
```

Create a context manager which raises a :class:`TimeoutError` if does not finish in
time.

:param delay: maximum allowed time (in seconds) before raising the exception, or
    ``None`` to disable the timeout
:param shield: ``True`` to shield the cancel scope from external cancellation
:return: a context manager that yields a cancel scope
:rtype: :class:`~typing.ContextManager`\[:class:`~anyio.CancelScope`\]

---
## move_on_after
```python
from _tasks import move_on_after
```

Create a cancel scope with a deadline that expires after the given delay.

:param delay: maximum allowed time (in seconds) before exiting the context block, or
    ``None`` to disable the timeout
:param shield: ``True`` to shield the cancel scope from external cancellation
:return: a cancel scope

---
## current_effective_deadline
```python
from _tasks import current_effective_deadline
```

Return the nearest deadline among all the cancel scopes effective for the current
task.

:return: a clock value from the event loop's internal clock (or ``float('inf')`` if
    there is no deadline in effect, or ``float('-inf')`` if the current scope has
    been cancelled)
:rtype: float

---
## create_task_group
```python
from _tasks import create_task_group
```

Create a task group.

:return: a task group

---
## __new__
```python
from _tasks import __new__
```



---
## cancel
```python
from _tasks import cancel
```

Cancel this scope immediately.

---
## deadline
```python
from _tasks import deadline
```



---
## cancel_called
```python
from _tasks import cancel_called
```

``True`` if :meth:`cancel` has been called.

---
## cancelled_caught
```python
from _tasks import cancelled_caught
```

``True`` if this scope suppressed a cancellation exception it itself raised.

This is typically used to check if any work was interrupted, or to see if the
scope was cancelled due to its deadline being reached. The value will, however,
only be ``True`` if the cancellation was triggered by the scope itself (and not
an outer scope).

---
## shield
```python
from _tasks import shield
```



---
## __enter__
```python
from _tasks import __enter__
```



---
## __exit__
```python
from _tasks import __exit__
```



---
## __name__
```python
from _typedattr import __name__
```



---
## typed_attribute
```python
from _typedattr import typed_attribute
```

Return a unique object, used to mark typed attributes.

---
## TypedAttributeSet
```python
from _typedattr import TypedAttributeSet
```

Superclass for typed attribute collections.

Checks that every public attribute of every subclass has a type annotation.

---
## TypedAttributeProvider
```python
from _typedattr import TypedAttributeProvider
```

Base class for classes that wish to provide typed extra attributes.

---
## __init_subclass__
```python
from _typedattr import __init_subclass__
```



---
## extra_attributes
```python
from _typedattr import extra_attributes
```

A mapping of the extra attributes to callables that return the corresponding
values.

If the provider wraps another provider, the attributes from that wrapper should
also be included in the returned mapping (but the wrapper may override the
callables from the wrapped instance).

---
## extra
```python
from _typedattr import extra
```

extra(attribute, default=undefined)

Return the value of the given typed extra attribute.

:param attribute: the attribute (member of a :class:`~TypedAttributeSet`) to
    look for
:param default: the value that should be returned if no value is found for the
    attribute
:raises ~anyio.TypedAttributeLookupError: if the search failed and no default
    value was given

---
## TaskInfo
```python
from _testing import TaskInfo
```

Represents an asynchronous task.

:ivar int id: the unique identifier of the task
:ivar parent_id: the identifier of the parent task, if any
:vartype parent_id: Optional[int]
:ivar str name: the description of the task (if any)
:ivar ~collections.abc.Coroutine coro: the coroutine object of the task

---
## get_current_task
```python
from _testing import get_current_task
```

Return the current task.

:return: a representation of the current task

---
## get_running_tasks
```python
from _testing import get_running_tasks
```

Return a list of running tasks in the current event loop.

:return: a list of task info objects

---
## __init__
```python
from _testing import __init__
```



---
## __eq__
```python
from _testing import __eq__
```



---
## __hash__
```python
from _testing import __hash__
```



---
## __repr__
```python
from _testing import __repr__
```



---
## has_pending_cancellation
```python
from _testing import has_pending_cancellation
```

Return ``True`` if the task has a cancellation pending, ``False`` otherwise.

---
## getnameinfo
```python
from _sockets import getnameinfo
```

Look up the host name of an IP address.

:param sockaddr: socket address (e.g. (ipaddress, port) for IPv4)
:param flags: flags to pass to upstream ``getnameinfo()``
:return: a tuple of (host name, service name)

.. seealso:: :func:`socket.getnameinfo`

---
## wait_socket_readable
```python
from _sockets import wait_socket_readable
```

Wait until the given socket has data to be read.

This does **NOT** work on Windows when using the asyncio backend with a proactor
event loop (default on py3.8+).

.. warning:: Only use this on raw sockets that have not been wrapped by any higher
    level constructs like socket streams!

:param sock: a socket object
:raises ~anyio.ClosedResourceError: if the socket was closed while waiting for the
    socket to become readable
:raises ~anyio.BusyResourceError: if another task is already waiting for the socket
    to become readable

---
## wait_socket_writable
```python
from _sockets import wait_socket_writable
```

Wait until the given socket can be written to.

This does **NOT** work on Windows when using the asyncio backend with a proactor
event loop (default on py3.8+).

.. warning:: Only use this on raw sockets that have not been wrapped by any higher
    level constructs like socket streams!

:param sock: a socket object
:raises ~anyio.ClosedResourceError: if the socket was closed while waiting for the
    socket to become writable
:raises ~anyio.BusyResourceError: if another task is already waiting for the socket
    to become writable

---
## convert_ipv6_sockaddr
```python
from _sockets import convert_ipv6_sockaddr
```

Convert a 4-tuple IPv6 socket address to a 2-tuple (address, port) format.

If the scope ID is nonzero, it is added to the address, separated with ``%``.
Otherwise the flow id and scope id are simply cut off from the tuple.
Any other kinds of socket addresses are returned as-is.

:param sockaddr: the result of :meth:`~socket.socket.getsockname`
:return: the converted socket address

---
## BrokenResourceError
```python
from _exceptions import BrokenResourceError
```

Raised when trying to use a resource that has been rendered unusable due to external
causes (e.g. a send stream whose peer has disconnected).

---
## BrokenWorkerProcess
```python
from _exceptions import BrokenWorkerProcess
```

Raised by :func:`run_sync_in_process` if the worker process terminates abruptly or
otherwise misbehaves.

---
## BusyResourceError
```python
from _exceptions import BusyResourceError
```

Raised when two tasks are trying to read from or write to the same resource
concurrently.

---
## ClosedResourceError
```python
from _exceptions import ClosedResourceError
```

Raised when trying to use a resource that has been closed.

---
## DelimiterNotFound
```python
from _exceptions import DelimiterNotFound
```

Raised during
:meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
maximum number of bytes has been read without the delimiter being found.

---
## EndOfStream
```python
from _exceptions import EndOfStream
```

Raised when trying to read from a stream that has been closed from the other end.

---
## IncompleteRead
```python
from _exceptions import IncompleteRead
```

Raised during
:meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_exactly` or
:meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
connection is closed before the requested amount of bytes has been read.

---
## TypedAttributeLookupError
```python
from _exceptions import TypedAttributeLookupError
```

Raised by :meth:`~anyio.TypedAttributeProvider.extra` when the given typed attribute
is not found and no default value has been given.

---
## WouldBlock
```python
from _exceptions import WouldBlock
```

Raised by ``X_nowait`` functions if ``X()`` would block.

---
## iterate_exceptions
```python
from _exceptions import iterate_exceptions
```



---
## __name__
```python
from buffered import __name__
```



---
## BufferedByteReceiveStream
```python
from buffered import BufferedByteReceiveStream
```

Wraps any bytes-based receive stream and uses a buffer to provide sophisticated
receiving capabilities in the form of a byte stream.

---
## buffer
```python
from buffered import buffer
```

The bytes currently in the buffer.

---
## extra_attributes
```python
from buffered import extra_attributes
```



---
## MemoryObjectStreamStatistics
```python
from memory import MemoryObjectStreamStatistics
```



---
## MemoryObjectItemReceiver
```python
from memory import MemoryObjectItemReceiver
```



---
## MemoryObjectStreamState
```python
from memory import MemoryObjectStreamState
```



---
## MemoryObjectReceiveStream
```python
from memory import MemoryObjectReceiveStream
```



---
## MemoryObjectSendStream
```python
from memory import MemoryObjectSendStream
```



---
## __repr__
```python
from memory import __repr__
```



---
## statistics
```python
from memory import statistics
```

Return statistics about the current state of this stream.

.. versionadded:: 3.0

---
## __post_init__
```python
from memory import __post_init__
```



---
## receive_nowait
```python
from memory import receive_nowait
```

Receive the next item if it can be done without waiting.

:return: the received item
:raises ~anyio.ClosedResourceError: if this send stream has been closed
:raises ~anyio.EndOfStream: if the buffer is empty and this stream has been
    closed from the sending end
:raises ~anyio.WouldBlock: if there are no items in the buffer and no tasks
    waiting to send

---
## clone
```python
from memory import clone
```

Create a clone of this send stream.

Each clone can be closed separately. Only when all clones have been closed will
the sending end of the memory stream be considered closed by the receiving ends.

:return: the cloned stream

---
## __exit__
```python
from memory import __exit__
```



---
## __del__
```python
from memory import __del__
```



---
## send_nowait
```python
from memory import send_nowait
```

Send an item immediately if it can be done without waiting.

:param item: the item to send
:raises ~anyio.ClosedResourceError: if this send stream has been closed
:raises ~anyio.BrokenResourceError: if the stream has been closed from the
    receiving end
:raises ~anyio.WouldBlock: if the buffer is full and there are no tasks waiting
    to receive

---
## __name__
```python
from stapled import __name__
```



---
## StapledByteStream
```python
from stapled import StapledByteStream
```

Combines two byte streams into a single, bidirectional byte stream.

Extra attributes will be provided from both streams, with the receive stream
providing the values in case of a conflict.

:param ByteSendStream send_stream: the sending byte stream
:param ByteReceiveStream receive_stream: the receiving byte stream

---
## StapledObjectStream
```python
from stapled import StapledObjectStream
```

Combines two object streams into a single, bidirectional object stream.

Extra attributes will be provided from both streams, with the receive stream
providing the values in case of a conflict.

:param ObjectSendStream send_stream: the sending object stream
:param ObjectReceiveStream receive_stream: the receiving object stream

---
## MultiListener
```python
from stapled import MultiListener
```

Combines multiple listeners into one, serving connections from all of them at once.

Any MultiListeners in the given collection of listeners will have their listeners
moved into this one.

Extra attributes are provided from each listener, with each successive listener
overriding any conflicting attributes from the previous one.

:param listeners: listeners to serve
:type listeners: Sequence[Listener[T_Stream]]

---
## extra_attributes
```python
from stapled import extra_attributes
```



---
## __post_init__
```python
from stapled import __post_init__
```



---
## TLSAttribute
```python
from tls import TLSAttribute
```

Contains Transport Layer Security related attributes.

---
## TLSStream
```python
from tls import TLSStream
```

A stream wrapper that encrypts all sent data and decrypts received data.

This class has no public initializer; use :meth:`wrap` instead.
All extra attributes from :class:`~TLSAttribute` are supported.

:var AnyByteStream transport_stream: the wrapped stream

---
## TLSListener
```python
from tls import TLSListener
```

A convenience listener that wraps another listener and auto-negotiates a TLS session
on every accepted connection.

If the TLS handshake times out or raises an exception,
:meth:`handle_handshake_error` is called to do whatever post-mortem processing is
deemed necessary.

Supports only the :attr:`~TLSAttribute.standard_compatible` extra attribute.

:param Listener listener: the listener to wrap
:param ssl_context: the SSL context object
:param standard_compatible: a flag passed through to :meth:`TLSStream.wrap`
:param handshake_timeout: time limit for the TLS handshake
    (passed to :func:`~anyio.fail_after`)

---
## extra_attributes
```python
from tls import extra_attributes
```



---
## __name__
```python
from file import __name__
```

gr.File() component

---
## FileStreamAttribute
```python
from file import FileStreamAttribute
```



---
## _BaseFileStream
```python
from file import _BaseFileStream
```



---
## FileReadStream
```python
from file import FileReadStream
```

A byte stream that reads from a file in the file system.

:param file: a file that has been opened for reading in binary mode

.. versionadded:: 3.0

---
## FileWriteStream
```python
from file import FileWriteStream
```

A byte stream that writes to a file in the file system.

:param file: a file that has been opened for writing in binary mode

.. versionadded:: 3.0

---
## __init__
```python
from file import __init__
```

Parameters:
value: Default file to display, given as str file path. If callable, the function will be called whenever the app loads to set the initial value of the component.
file_count: if single, allows user to upload one file. If "multiple", user uploads multiple files. If "directory", user uploads all files in selected directory. Return type will be list for each file in case of "multiple" or "directory".
file_types: List of file extensions or types of files to be uploaded (e.g. ['image', '.json', '.mp4']). "file" allows any file to be uploaded, "image" allows only image files to be uploaded, "audio" allows only audio files to be uploaded, "video" allows only video files to be uploaded, "text" allows only text files to be uploaded.
type: Type of value to be returned by component. "file" returns a temporary file object with the same base name as the uploaded file, whose full path can be retrieved by file_obj.name, "binary" returns an bytes object.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
height: The maximum height of the file component, in pixels. If more files are uploaded than can fit in the height, a scrollbar will appear.
interactive: if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## extra_attributes
```python
from file import extra_attributes
```



---
## TextReceiveStream
```python
from text import TextReceiveStream
```

Stream wrapper that decodes bytes to strings using the given encoding.

Decoding is done using :class:`~codecs.IncrementalDecoder` which returns any
completely received unicode characters as soon as they come in.

:param transport_stream: any bytes-based receive stream
:param encoding: character encoding to use for decoding bytes to strings (defaults
    to ``utf-8``)
:param errors: handling scheme for decoding errors (defaults to ``strict``; see the
    `codecs module documentation`_ for a comprehensive list of options)

.. _codecs module documentation:
    https://docs.python.org/3/library/codecs.html#codec-objects

---
## TextSendStream
```python
from text import TextSendStream
```

Sends strings to the wrapped stream as bytes using the given encoding.

:param AnyByteSendStream transport_stream: any bytes-based send stream
:param str encoding: character encoding to use for encoding strings to bytes
    (defaults to ``utf-8``)
:param str errors: handling scheme for encoding errors (defaults to ``strict``; see
    the `codecs module documentation`_ for a comprehensive list of options)

.. _codecs module documentation:
    https://docs.python.org/3/library/codecs.html#codec-objects

---
## TextStream
```python
from text import TextStream
```

A bidirectional stream that decodes bytes to strings on receive and encodes strings
to bytes on send.

Extra attributes will be provided from both streams, with the receive stream
providing the values in case of a conflict.

:param AnyByteStream transport_stream: any bytes-based stream
:param str encoding: character encoding to use for encoding/decoding strings to/from
    bytes (defaults to ``utf-8``)
:param str errors: handling scheme for encoding errors (defaults to ``strict``; see
    the `codecs module documentation`_ for a comprehensive list of options)

.. _codecs module documentation:
    https://docs.python.org/3/library/codecs.html#codec-objects

---
## __post_init__
```python
from text import __post_init__
```



---
## extra_attributes
```python
from text import extra_attributes
```



---
## __name__
```python
from blocks_configs import __name__
```



---
## Plot
```python
from plot import Plot
```

Used to display various kinds of plots (matplotlib, plotly, or bokeh are supported)
Preprocessing: this component does *not* accept input.
Postprocessing: expects either a {matplotlib.figure.Figure}, a {plotly.graph_objects._figure.Figure}, or a {dict} corresponding to a bokeh plot (json_item format)

Demos: altair_plot, outbreak_forecast, blocks_kinematics, stock_forecast, map_airbnb
Guides: plot-component-for-maps

---
## AltairPlot
```python
from plot import AltairPlot
```



---
## __init__
```python
from plot import __init__
```

Parameters:
value: Optionally, supply a default plot object to display, must be a matplotlib, plotly, altair, or bokeh figure, or a callable. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## get_config
```python
from plot import get_config
```



---
## update
```python
from plot import update
```



---
## postprocess
```python
from plot import postprocess
```

Parameters:
    y: plot data
Returns:
    plot type mapped to plot base64 data

---
## style
```python
from plot import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## create_legend
```python
from plot import create_legend
```



---
## create_scale
```python
from plot import create_scale
```



---
## __name__
```python
from model3d import __name__
```

gr.Model3D() component.

---
## Model3D
```python
from model3d import Model3D
```

Component allows users to upload or view 3D Model files (.obj, .glb, or .gltf).
Preprocessing: This component passes the uploaded file as a {str}filepath.
Postprocessing: expects function to return a {str} or {pathlib.Path} filepath of type (.obj, glb, or .gltf)

Demos: model3D
Guides: how-to-use-3D-model-component

---
## __init__
```python
from model3d import __init__
```

Parameters:
value: path to (.obj, glb, or .gltf) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component.
clear_color: background color of scene, should be a tuple of 4 floats between 0 and 1 representing RGBA values.
camera_position: initial camera position of scene, provided as a tuple of `(alpha, beta, radius)`. Each value is optional. If provided, `alpha` and `beta` should be in degrees reflecting the angular position along the longitudinal and latitudinal axes, respectively. Radius corresponds to the distance from the center of the object to the camera.
zoom_speed: the speed of zooming in and out of the scene when the cursor wheel is rotated or when screen is pinched on a mobile device. Should be a positive float, increase this value to make zooming faster, decrease to make it slower. Affects the wheelPrecision property of the camera.
height: height of the model3D component, in pixels.
label: component name in interface.
show_label: if True, will display label.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## example_inputs
```python
from model3d import example_inputs
```



---
## update
```python
from model3d import update
```



---
## preprocess
```python
from model3d import preprocess
```

Parameters:
    x: JSON object with filename as 'name' property and base64 data as 'data' property
Returns:
    string file path to temporary file with the 3D image model

---
## postprocess
```python
from model3d import postprocess
```

Parameters:
    y: path to the model
Returns:
    file name mapped to base64 url data

---
## as_example
```python
from model3d import as_example
```



---
## __name__
```python
from login_button import __name__
```

Predefined button to sign in with Hugging Face in a Gradio Space.

---
## LoginButton
```python
from login_button import LoginButton
```

Button that redirects the user to Sign with Hugging Face using OAuth.

---
## __init__
```python
from login_button import __init__
```



---
## activate
```python
from login_button import activate
```



---
## _check_login_status
```python
from login_button import _check_login_status
```



---
## __name__
```python
from annotated_image import __name__
```

gr.AnnotatedImage() component.

---
## AnnotatedImage
```python
from annotated_image import AnnotatedImage
```

Displays a base image and colored subsections on top of that image. Subsections can take the from of rectangles (e.g. object detection) or masks (e.g. image segmentation).
Preprocessing: this component does *not* accept input.
Postprocessing: expects a {Tuple[numpy.ndarray | PIL.Image | str, List[Tuple[numpy.ndarray | Tuple[int, int, int, int], str]]]} consisting of a base image and a list of subsections, that are either (x1, y1, x2, y2) tuples identifying object boundaries, or 0-1 confidence masks of the same shape as the image. A label is provided for each subsection.

Demos: image_segmentation

---
## __init__
```python
from annotated_image import __init__
```

Parameters:
value: Tuple of base image and list of (subsection, label) pairs.
show_legend: If True, will show a legend of the subsections.
height: Height of the displayed image.
width: Width of the displayed image.
color_map: A dictionary mapping labels to colors. The colors must be specified as hex codes.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## update
```python
from annotated_image import update
```



---
## postprocess
```python
from annotated_image import postprocess
```

Parameters:
    y: Tuple of base image and list of subsections, with each subsection a two-part tuple where the first element is a 4 element bounding box or a 0-1 confidence mask, and the second element is the label.
Returns:
    Tuple of base image file and list of subsections, with each subsection a two-part tuple where the first element image path of the mask, and the second element is the label.

---
## style
```python
from annotated_image import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## hex_to_rgb
```python
from annotated_image import hex_to_rgb
```



---
## __name__
```python
from highlighted_text import __name__
```

gr.HighlightedText() component.

---
## HighlightedText
```python
from highlighted_text import HighlightedText
```

Displays text that contains spans that are highlighted by category or numerical value.
Preprocessing: passes a list of tuples as a {List[Tuple[str, float | str | None]]]} into the function. If no labels are provided, the text will be displayed as a single span.
Postprocessing: expects a {List[Tuple[str, float | str]]]} consisting of spans of text and their associated labels, or a {Dict} with two keys: (1) "text" whose value is the complete text, and (2) "entities", which is a list of dictionaries, each of which have the keys: "entity" (consisting of the entity label, can alternatively be called "entity_group"), "start" (the character index where the label starts), and "end" (the character index where the label ends). Entities should not overlap.

Demos: diff_texts, text_analysis
Guides: named-entity-recognition

---
## __init__
```python
from highlighted_text import __init__
```

Parameters:
value: Default value to show. If callable, the function will be called whenever the app loads to set the initial value of the component.
color_map: A dictionary mapping labels to colors. The colors may be specified as hex codes or by their names. For example: {"person": "red", "location": "#FFEE22"}
show_legend: whether to show span categories in a separate legend or inline.
combine_adjacent: If True, will merge the labels of adjacent tokens belonging to the same category.
adjacent_separator: Specifies the separator to be used between tokens if combine_adjacent is True.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
interactive: If True, the component will be editable, and allow user to select spans of text and label them.

---
## update
```python
from highlighted_text import update
```



---
## postprocess
```python
from highlighted_text import postprocess
```

Parameters:
    y: List of (word, category) tuples, or a dictionary of two keys: "text", and "entities", which itself is a list of dictionaries, each of which have the keys: "entity" (or "entity_group"), "start", and "end"
Returns:
    List of (word, category) tuples

---
## style
```python
from highlighted_text import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from clear_button import __name__
```

Predefined buttons with bound events that can be included in a gr.Blocks for convenience. 

---
## ClearButton
```python
from clear_button import ClearButton
```

Button that clears the value of a component or a list of components when clicked. It is instantiated with the list of components to clear.
Preprocessing: passes the button value as a {str} into the function
Postprocessing: expects a {str} to be returned from a function, which is set as the label of the button

---
## __init__
```python
from clear_button import __init__
```



---
## add
```python
from clear_button import add
```

Adds a component or list of components to the list of components that will be cleared when the button is clicked.

---
## __name__
```python
from bar_plot import __name__
```

gr.BarPlot() component.

---
## BarPlot
```python
from bar_plot import BarPlot
```

Create a bar plot.

Preprocessing: this component does *not* accept input.
Postprocessing: expects a pandas dataframe with the data to plot.

Demos: bar_plot, chicago-bikeshare-dashboard

---
## __init__
```python
from bar_plot import __init__
```

Parameters:
value: The pandas dataframe containing the data to display in a scatter plot.
x: Column corresponding to the x axis.
y: Column corresponding to the y axis.
color: The column to determine the bar color. Must be categorical (discrete values).
vertical: If True, the bars will be displayed vertically. If False, the x and y axis will be switched, displaying the bars horizontally. Default is True.
group: The column with which to split the overall plot into smaller subplots.
title: The title to display on top of the chart.
tooltip: The column (or list of columns) to display on the tooltip when a user hovers over a bar.
x_title: The title given to the x axis. By default, uses the value of the x parameter.
y_title: The title given to the y axis. By default, uses the value of the y parameter.
x_label_angle: The angle (in degrees) of the x axis labels. Positive values are clockwise, and negative values are counter-clockwise.
y_label_angle: The angle (in degrees) of the y axis labels. Positive values are clockwise, and negative values are counter-clockwise.
color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
group_title: The label displayed on top of the subplot columns (or rows if vertical=True). Use an empty string to omit.
color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
height: The height of the plot in pixels.
width: The width of the plot in pixels.
y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
caption: The (optional) caption to display below the plot.
interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
label: The (optional) label to display on the top left corner of the plot.
show_label: Whether the label should be displayed.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
visible: Whether the plot should be visible.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
sort: Specifies the sorting axis as either "x", "y", "-x" or "-y". If None, no sorting is applied.
show_actions_button: Whether to show the actions button on the top right corner of the plot.

---
## get_block_name
```python
from bar_plot import get_block_name
```



---
## update
```python
from bar_plot import update
```

Update an existing BarPlot component.

If updating any of the plot properties (color, size, etc) the value, x, and y parameters must be specified.

Parameters:
    value: The pandas dataframe containing the data to display in a scatter plot.
    x: Column corresponding to the x axis.
    y: Column corresponding to the y axis.
    color: The column to determine the bar color. Must be categorical (discrete values).
    vertical: If True, the bars will be displayed vertically. If False, the x and y axis will be switched, displaying the bars horizontally. Default is True.
    group: The column with which to split the overall plot into smaller subplots.
    title: The title to display on top of the chart.
    tooltip: The column (or list of columns) to display on the tooltip when a user hovers over a bar.
    x_title: The title given to the x axis. By default, uses the value of the x parameter.
    y_title: The title given to the y axis. By default, uses the value of the y parameter.
    x_label_angle: The angle (in degrees) of the x axis labels. Positive values are clockwise, and negative values are counter-clockwise.
    y_label_angle: The angle (in degrees) of the y axis labels. Positive values are clockwise, and negative values are counter-clockwise.
    color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
    group_title: The label displayed on top of the subplot columns (or rows if vertical=True). Use an empty string to omit.
    color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
    height: The height of the plot in pixels.
    width: The width of the plot in pixels.
    y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
    caption: The (optional) caption to display below the plot.
    interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
    label: The (optional) label to display on the top left corner of the plot.
    show_label: Whether the label should be displayed.
    visible: Whether the plot should be visible.
    sort: Specifies the sorting axis as either "x", "y", "-x" or "-y". If None, no sorting is applied.

---
## create_plot
```python
from bar_plot import create_plot
```

Helper for creating the bar plot.

---
## postprocess
```python
from bar_plot import postprocess
```



---
## DataframeData
```python
from dataframe import DataframeData
```

This is a dataclass to represent all the data that is sent to or received from the frontend.

---
## Dataframe
```python
from dataframe import Dataframe
```

Accepts or displays 2D input through a spreadsheet-like component for dataframes.
Preprocessing: passes the uploaded spreadsheet data as a {pandas.DataFrame}, {numpy.array}, or {List[List]} depending on `type`
Postprocessing: expects a {pandas.DataFrame}, {pandas.Styler}, {numpy.array}, {List[List]}, {List}, a {Dict} with keys `data` (and optionally `headers`), or {str} path to a csv, which is rendered in the spreadsheet.
Examples-format: a {str} filepath to a csv with data, a pandas dataframe, or a list of lists (excluding headers) where each sublist is a row of data.
Demos: filter_records, matrix_transpose, tax_calculator

---
## update
```python
from dataframe import update
```



---
## preprocess
```python
from dataframe import preprocess
```

Parameters:
    x: Dictionary equivalent of DataframeData containing `headers`, `data`, and optionally `metadata` keys
Returns:
    The Dataframe data in requested format

---
## postprocess
```python
from dataframe import postprocess
```

Parameters:
    y: dataframe in given format
Returns:
    JSON object with key 'headers' for list of header names, 'data' for 2D array of string or numeric data

---
## __get_cell_style
```python
from dataframe import __get_cell_style
```



---
## __extract_metadata
```python
from dataframe import __extract_metadata
```



---
## __process_counts
```python
from dataframe import __process_counts
```



---
## __validate_headers
```python
from dataframe import __validate_headers
```



---
## as_example
```python
from dataframe import as_example
```



---
## __name__
```python
from checkboxgroup import __name__
```

gr.CheckboxGroup() component

---
## CheckboxGroup
```python
from checkboxgroup import CheckboxGroup
```

Creates a set of checkboxes of which a subset can be checked.
Preprocessing: passes the list of checked checkboxes as a {List[str | int | float]} or their indices as a {List[int]} into the function, depending on `type`.
Postprocessing: expects a {List[str | int | float]}, each element of which becomes a checked checkbox.
Examples-format: a {List[str | int | float]} representing the values to be checked.
Demos: sentence_builder, titanic_survival

---
## __init__
```python
from checkboxgroup import __init__
```

Parameters:
choices: A list of string or numeric options to select from. An option can also be a tuple of the form (name, value), where name is the displayed name of the checkbox button and value is the value to be passed to the function, or returned by the function.
value: Default selected list of options. If a single choice is selected, it can be passed in as a string or numeric type. If callable, the function will be called whenever the app loads to set the initial value of the component.
type: Type of value to be returned by component. "value" returns the list of strings of the choices selected, "index" returns the list of indices of the choices selected.
label: Component name in interface.
info: Additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: If True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: Relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: Minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: If True, choices in this checkbox group will be checkable; if False, checking will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## example_inputs
```python
from checkboxgroup import example_inputs
```



---
## update
```python
from checkboxgroup import update
```



---
## preprocess
```python
from checkboxgroup import preprocess
```

Parameters:
    x: list of selected choices
Returns:
    list of selected choice values as strings or indices within choice list

---
## postprocess
```python
from checkboxgroup import postprocess
```

Parameters:
    y: List of selected choice values. If a single choice is selected, it can be passed in as a string
Returns:
    List of selected choices

---
## get_interpretation_neighbors
```python
from checkboxgroup import get_interpretation_neighbors
```



---
## get_interpretation_scores
```python
from checkboxgroup import get_interpretation_scores
```

Returns:
For each tuple in the list, the first value represents the interpretation score if the input is False, and the second if the input is True.

---
## style
```python
from checkboxgroup import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## as_example
```python
from checkboxgroup import as_example
```



---
## __name__
```python
from file_explorer import __name__
```

gr.FileExplorer() component

---
## FileExplorer
```python
from file_explorer import FileExplorer
```

Creates a file explorer component that allows users to browse and select files on the machine hosting the Gradio app.
Preprocessing: passes the selected file or directory as a {str} path (relative to root) or {list[str]} depending on `file_count`
Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files.
Examples-format: a {str} path to a local file that populates the component.
Demos: zip_to_json, zip_files

---
## __init__
```python
from file_explorer import __init__
```

Parameters:
glob: The glob-style pattern used to select which files to display, e.g. "*" to match all files, "*.png" to match all .png files, "**/*.txt" to match any .txt file in any subdirectory, etc. The default value matches all files and folders recursively. See the Python glob documentation at https://docs.python.org/3/library/glob.html for more information.
value: The file (or list of files, depending on the `file_count` parameter) to show as "selected" when the component is first loaded. If a callable is provided, it will be called when the app loads to set the initial value of the component. If not provided, no files are shown as selected.
file_count: Whether to allow single or multiple files to be selected. If "single", the component will return a single absolute file path as a string. If "multiple", the component will return a list of absolute file paths as a list of strings.
root: Path to root directory to select files from. If not provided, defaults to current working directory.
ignore_glob: The glob-tyle pattern that will be used to exclude files from the list. For example, "*.py" will exclude all .py files from the list. See the Python glob documentation at https://docs.python.org/3/library/glob.html for more information.
label: Component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
height: The maximum height of the file component, in pixels. If more files are uploaded than can fit in the height, a scrollbar will appear.
interactive: if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## preprocess
```python
from file_explorer import preprocess
```

Parameters:
    x: File path segments as a list of list of strings for each file relative to the root.
Returns:
    File path selected, as an absolute path.

---
## _strip_root
```python
from file_explorer import _strip_root
```



---
## postprocess
```python
from file_explorer import postprocess
```

Parameters:
    y: file path
Returns:
    list representing filepath, where each string is a directory level relative to the root.

---
## ls
```python
from file_explorer import ls
```

Parameters:
    y: file path as a list of strings for each directory level relative to the root.
Returns:
    tuple of list of files in directory, then list of folders in directory

---
## _safe_join
```python
from file_explorer import _safe_join
```



---
## expand_braces
```python
from file_explorer import expand_braces
```



---
## make_tree
```python
from file_explorer import make_tree
```



---
## make_node
```python
from file_explorer import make_node
```



---
## __name__
```python
from number import __name__
```

gr.Number() component.

---
## Number
```python
from number import Number
```

Creates a numeric field for user to enter numbers as input or display numeric output.
Preprocessing: passes field value as a {float} or {int} into the function, depending on `precision`.
Postprocessing: expects an {int} or {float} returned from the function and sets field value to it.
Examples-format: a {float} or {int} representing the number's value.

Demos: tax_calculator, titanic_survival, blocks_simple_squares

---
## __init__
```python
from number import __init__
```

Parameters:
value: default value. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will be editable; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
precision: Precision to round input/output to. If set to 0, will round to nearest integer and convert type to int. If None, no rounding happens.
minimum: Minimum value. Only applied when component is used as an input. If a user provides a smaller value, a gr.Error exception is raised by the backend.
maximum: Maximum value. Only applied when component is used as an input. If a user provides a larger value, a gr.Error exception is raised by the backend.
step: The interval between allowed numbers in the component. Can be used along with optional parameters `minimum` and `maximum` to create a range of legal values starting from `minimum` and incrementing according to this parameter.

---
## _round_to_precision
```python
from number import _round_to_precision
```

Round to a given precision.

If precision is None, no rounding happens. If 0, num is converted to int.

Parameters:
    num: Number to round.
    precision: Precision to round to.
Returns:
    rounded number

---
## update
```python
from number import update
```



---
## preprocess
```python
from number import preprocess
```

Parameters:
    x: numeric input
Returns:
    number representing function input

---
## postprocess
```python
from number import postprocess
```

Any postprocessing needed to be performed on function output.

Parameters:
    y: numeric output
Returns:
    number representing function output

---
## set_interpret_parameters
```python
from number import set_interpret_parameters
```

Calculates interpretation scores of numeric values close to the input number.
Parameters:
    steps: Number of nearby values to measure in each direction (above and below the input number).
    delta: Size of step in each direction between nearby values.
    delta_type: "percent" if delta step between nearby values should be a calculated as a percent, or "absolute" if delta should be a constant step change.

---
## get_interpretation_neighbors
```python
from number import get_interpretation_neighbors
```



---
## get_interpretation_scores
```python
from number import get_interpretation_scores
```

Returns:
Each tuple set represents a numeric value near the input and its corresponding interpretation score.

---
## HTML
```python
from html import HTML
```

Used to display arbitrary HTML output.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a valid HTML {str}.

Demos: text_analysis
Guides: key-features

---
## update
```python
from html import update
```



---
## Code
```python
from code import Code
```

Wrapper around Python code objects.

---
## __init__
```python
from code import __init__
```



---
## postprocess
```python
from code import postprocess
```



---
## update
```python
from code import update
```



---
## Dataset
```python
from dataset import Dataset
```

Represents an HDF5 dataset

---
## __init__
```python
from dataset import __init__
```



---
## update
```python
from dataset import update
```



---
## get_config
```python
from dataset import get_config
```



---
## preprocess
```python
from dataset import preprocess
```

Any preprocessing needed to be performed on function input.

---
## postprocess
```python
from dataset import postprocess
```



---
## __name__
```python
from slider import __name__
```

gr.Slider() component.

---
## Slider
```python
from slider import Slider
```

Creates a slider that ranges from `minimum` to `maximum` with a step size of `step`.
Preprocessing: passes slider value as a {float} into the function.
Postprocessing: expects an {int} or {float} returned from function and sets slider value to it as long as it is within range.
Examples-format: A {float} or {int} representing the slider's value.

Demos: sentence_builder, slider_release, generate_tone, titanic_survival, interface_random_slider, blocks_random_slider
Guides: create-your-own-friends-with-a-gan

---
## __init__
```python
from slider import __init__
```

Parameters:
minimum: minimum value for slider.
maximum: maximum value for slider.
value: default value. If callable, the function will be called whenever the app loads to set the initial value of the component. Ignored if randomized=True.
step: increment between slider values.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, slider will be adjustable; if False, adjusting will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
randomize: If True, the value of the slider when the app loads is taken uniformly at random from the range given by the minimum and maximum.

---
## api_info
```python
from slider import api_info
```



---
## example_inputs
```python
from slider import example_inputs
```



---
## get_random_value
```python
from slider import get_random_value
```



---
## update
```python
from slider import update
```



---
## postprocess
```python
from slider import postprocess
```

Any postprocessing needed to be performed on function output.
Parameters:
    y: numeric output
Returns:
    numeric output or minimum number if None

---
## set_interpret_parameters
```python
from slider import set_interpret_parameters
```

Calculates interpretation scores of numeric values ranging between the minimum and maximum values of the slider.
Parameters:
    steps: Number of neighboring values to measure between the minimum and maximum values of the slider range.

---
## get_interpretation_neighbors
```python
from slider import get_interpretation_neighbors
```



---
## style
```python
from slider import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from status_tracker import __name__
```

gr.StatusTracker() component.

---
## StatusTracker
```python
from status_tracker import StatusTracker
```



---
## __init__
```python
from status_tracker import __init__
```



---
## __name__
```python
from color_picker import __name__
```

gr.ColorPicker() component.

---
## ColorPicker
```python
from color_picker import ColorPicker
```

Creates a color picker for user to select a color as string input.
Preprocessing: passes selected color value as a {str} into the function.
Postprocessing: expects a {str} returned from function and sets color picker value to it.
Examples-format: a {str} with a hexadecimal representation of a color, e.g. "#ff0000" for red.
Demos: color_picker, color_generator

---
## __init__
```python
from color_picker import __init__
```

Parameters:
value: default text to provide in color picker. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will be rendered as an editable color picker; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## example_inputs
```python
from color_picker import example_inputs
```



---
## update
```python
from color_picker import update
```



---
## preprocess
```python
from color_picker import preprocess
```

Any preprocessing needed to be performed on function input.
Parameters:
    x: text
Returns:
    text

---
## postprocess
```python
from color_picker import postprocess
```

Any postprocessing needed to be performed on function output.
Parameters:
    y: text
Returns:
    text

---
## Interpretation
```python
from interpretation import Interpretation
```

Used to create an interpretation widget for a component.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a {dict} with keys "original" and "interpretation".

Guides: custom-interpretations-with-blocks

---
## update
```python
from interpretation import update
```



---
## __name__
```python
from textbox import __name__
```

gr.Textbox() component.

---
## Textbox
```python
from textbox import Textbox
```

Creates a textarea for user to enter string input or display string output.
Preprocessing: passes textarea value as a {str} into the function.
Postprocessing: expects a {str} returned from function and sets textarea value to it.
Examples-format: a {str} representing the textbox input.

Demos: hello_world, diff_texts, sentence_builder
Guides: creating-a-chatbot, real-time-speech-recognition

---
## __init__
```python
from textbox import __init__
```

Parameters:
value: default text to provide in textarea. If callable, the function will be called whenever the app loads to set the initial value of the component.
lines: minimum number of line rows to provide in textarea.
max_lines: maximum number of line rows to provide in textarea.
placeholder: placeholder hint to provide behind textarea.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
autofocus: If True, will focus on the textbox when the page loads. Use this carefully, as it can cause usability issues for sighted and non-sighted users.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
type: The type of textbox. One of: 'text', 'password', 'email', Default is 'text'.
text_align: How to align the text in the textbox, can be: "left", "right", or None (default). If None, the alignment is left if `rtl` is False, or right if `rtl` is True. Can only be changed if `type` is "text".
rtl: If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.
show_copy_button: If True, includes a copy button to copy the text in the textbox. Only applies if show_label is True.
autoscroll: If True, will automatically scroll to the bottom of the textbox when the value changes, unless the user scrolls up. If False, will not scroll to the bottom of the textbox when the value changes.

---
## update
```python
from textbox import update
```



---
## preprocess
```python
from textbox import preprocess
```

Preprocesses input (converts it to a string) before passing it to the function.
Parameters:
    x: text
Returns:
    text

---
## postprocess
```python
from textbox import postprocess
```

Postproccess the function output y by converting it to a str before passing it to the frontend.
Parameters:
    y: function output to postprocess.
Returns:
    text

---
## set_interpret_parameters
```python
from textbox import set_interpret_parameters
```

Calculates interpretation score of characters in input by splitting input into tokens, then using a "leave one out" method to calculate the score of each token by removing each token and measuring the delta of the output value.
Parameters:
    separator: Separator to use to split input into tokens.
    replacement: In the "leave one out" step, the text that the token should be replaced with. If None, the token is removed altogether.

---
## tokenize
```python
from textbox import tokenize
```

Tokenizes an input string by dividing into "words" delimited by self.interpretation_separator

---
## get_masked_inputs
```python
from textbox import get_masked_inputs
```

Constructs partially-masked sentences for SHAP interpretation

---
## get_interpretation_scores
```python
from textbox import get_interpretation_scores
```

Returns:
Each tuple set represents a set of characters and their corresponding interpretation score.

---
## style
```python
from textbox import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## File
```python
from file import File
```

Creates a file component that allows uploading generic file (when used as an input) and or displaying generic files (output).
Preprocessing: passes the uploaded file as a {tempfile._TemporaryFileWrapper} or {List[tempfile._TemporaryFileWrapper]} depending on `file_count` (or a {bytes}/{List[bytes]} depending on `type`)
Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files.
Examples-format: a {str} path to a local file that populates the component.
Demos: zip_to_json, zip_files

---
## update
```python
from file import update
```



---
## preprocess
```python
from file import preprocess
```

Parameters:
    x: List of JSON objects with filename as 'name' property and base64 data as 'data' property
Returns:
    File objects in requested format

---
## postprocess
```python
from file import postprocess
```

Parameters:
    y: file path
Returns:
    JSON object with key 'name' for filename, 'data' for base64 url, and 'size' for filesize in bytes

---
## as_example
```python
from file import as_example
```



---
## api_info
```python
from file import api_info
```



---
## serialized_info
```python
from file import serialized_info
```



---
## example_inputs
```python
from file import example_inputs
```



---
## process_single_file
```python
from file import process_single_file
```



---
## __name__
```python
from scatter_plot import __name__
```

gr.ScatterPlot() component.

---
## ScatterPlot
```python
from scatter_plot import ScatterPlot
```

Create a scatter plot.

Preprocessing: this component does *not* accept input.
Postprocessing: expects a pandas dataframe with the data to plot.

Demos: scatter_plot
Guides: creating-a-dashboard-from-bigquery-data

---
## __init__
```python
from scatter_plot import __init__
```

Parameters:
value: The pandas dataframe containing the data to display in a scatter plot, or a callable. If callable, the function will be called whenever the app loads to set the initial value of the component.
x: Column corresponding to the x axis.
y: Column corresponding to the y axis.
color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values.
size: The column used to determine the point size. Should contain numeric data so that gradio can map the data to the point size.
shape: The column used to determine the point shape. Should contain categorical data. Gradio will map each unique value to a different shape.
title: The title to display on top of the chart.
tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot.
x_title: The title given to the x-axis. By default, uses the value of the x parameter.
y_title: The title given to the y-axis. By default, uses the value of the y parameter.
x_label_angle:  The angle for the x axis labels rotation. Positive values are clockwise, and negative values are counter-clockwise.
y_label_angle:  The angle for the y axis labels rotation. Positive values are clockwise, and negative values are counter-clockwise.
color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
size_legend_title: The title given to the size legend. By default, uses the value of the size parameter.
shape_legend_title: The title given to the shape legend. By default, uses the value of the shape parameter.
color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
size_legend_position: The position of the size legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
shape_legend_position: The position of the shape legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
height: The height of the plot in pixels.
width: The width of the plot in pixels.
x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max].
y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
caption: The (optional) caption to display below the plot.
interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
label: The (optional) label to display on the top left corner of the plot.
every:  If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: Whether the label should be displayed.
visible: Whether the plot should be visible.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
show_actions_button: Whether to show the actions button on the top right corner of the plot.

---
## get_block_name
```python
from scatter_plot import get_block_name
```



---
## update
```python
from scatter_plot import update
```

Update an existing plot component.

If updating any of the plot properties (color, size, etc) the value, x, and y parameters must be specified.

Parameters:
    value: The pandas dataframe containing the data to display in a scatter plot.
    x: Column corresponding to the x axis.
    y: Column corresponding to the y axis.
    color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values.
    size: The column used to determine the point size. Should contain numeric data so that gradio can map the data to the point size.
    shape: The column used to determine the point shape. Should contain categorical data. Gradio will map each unique value to a different shape.
    title: The title to display on top of the chart.
    tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot.
    x_title: The title given to the x axis. By default, uses the value of the x parameter.
    y_title: The title given to the y axis. By default, uses the value of the y parameter.
    x_label_angle:  The angle for the x axis labels rotation. Positive values are clockwise, and negative values are counter-clockwise.
    y_label_angle:  The angle for the y axis labels rotation. Positive values are clockwise, and negative values are counter-clockwise.
    color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
    size_legend_title: The title given to the size legend. By default, uses the value of the size parameter.
    shape_legend_title: The title given to the shape legend. By default, uses the value of the shape parameter.
    color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
    size_legend_position: The position of the size legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
    shape_legend_position: The position of the shape legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
    height: The height of the plot in pixels.
    width: The width of the plot in pixels.
    x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max].
    y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
    interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
    caption: The (optional) caption to display below the plot.
    label: The (optional) label to display in the top left corner of the plot.
    show_label: Whether the label should be displayed.
    visible: Whether the plot should be visible.

---
## create_plot
```python
from scatter_plot import create_plot
```

Helper for creating the scatter plot.

---
## postprocess
```python
from scatter_plot import postprocess
```



---
## __name__
```python
from button import __name__
```

gr.Button() component.

---
## Button
```python
from button import Button
```

Used to create a button, that can be assigned arbitrary click() events. The label (value) of the button can be used as an input or set via the output of a function.

Preprocessing: passes the button value as a {str} into the function
Postprocessing: expects a {str} to be returned from a function, which is set as the label of the button
Demos: blocks_inputs, blocks_kinematics

---
## __init__
```python
from button import __init__
```

Parameters:
value: Default text for the button to display. If callable, the function will be called whenever the app loads to set the initial value of the component.
variant: 'primary' for main call-to-action, 'secondary' for a more subdued style, 'stop' for a stop button.
size: Size of the button. Can be "sm" or "lg".
icon: URL or path to the icon file to display within the button. If None, no icon will be displayed. Must be within the working directory of the Gradio app or an external URL.
link: URL to open when the button is clicked. If None, no link will be used.
visible: If False, component will be hidden.
interactive: If False, the Button will be in a disabled state.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.

---
## update
```python
from button import update
```



---
## style
```python
from button import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from carousel import __name__
```

gr.Carousel() component.

---
## Carousel
```python
from carousel import Carousel
```

Deprecated Component

---
## __init__
```python
from carousel import __init__
```



---
## postprocess
```python
from markdown import postprocess
```

Parameters:
    y: markdown representation
Returns:
    HTML rendering of markdown

---
## update
```python
from markdown import update
```



---
## as_example
```python
from markdown import as_example
```



---
## __name__
```python
from label import __name__
```

gr.Label() component.

---
## Label
```python
from label import Label
```

Displays a classification label, along with confidence scores of top categories, if provided.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a {Dict[str, float]} of classes and confidences, or {str} with just the class or an {int}/{float} for regression outputs, or a {str} path to a .json file containing a json dictionary in the structure produced by Label.postprocess().

Demos: main_note, titanic_survival
Guides: image-classification-in-pytorch, image-classification-in-tensorflow, image-classification-with-vision-transformers, building-a-pictionary-app

---
## __init__
```python
from label import __init__
```

Parameters:
value: Default value to show in the component. If a str or number is provided, simply displays the string or number. If a {Dict[str, float]} of classes and confidences is provided, displays the top class on top and the `num_top_classes` below, along with their confidence bars. If callable, the function will be called whenever the app loads to set the initial value of the component.
num_top_classes: number of most confident classes to show.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
color: The background color of the label (either a valid css color name or hexadecimal string).

---
## postprocess
```python
from label import postprocess
```

Parameters:
    y: a dictionary mapping labels to confidence value, or just a string/numerical label by itself
Returns:
    Object with key 'label' representing primary label, and key 'confidences' representing a list of label-confidence pairs

---
## update
```python
from label import update
```



---
## style
```python
from label import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from radio import __name__
```

gr.Radio() component.

---
## Radio
```python
from radio import Radio
```

Creates a set of (string or numeric type) radio buttons of which only one can be selected.
Preprocessing: passes the value of the selected radio button as a {str} or {int} or {float} or its index as an {int} into the function, depending on `type`.
Postprocessing: expects a {str} or {int} or {float} corresponding to the value of the radio button to be selected.
Examples-format: a {str} representing the radio option to select.

Demos: sentence_builder, titanic_survival, blocks_essay

---
## __init__
```python
from radio import __init__
```

Parameters:
choices: A list of string or numeric options to select from. An option can also be a tuple of the form (name, value), where name is the displayed name of the radio button and value is the value to be passed to the function, or returned by the function.
value: The option selected by default. If None, no option is selected by default. If callable, the function will be called whenever the app loads to set the initial value of the component.
type: Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
label: Component name in interface.
info: Additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: Relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: Minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: If True, choices in this radio group will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## example_inputs
```python
from radio import example_inputs
```



---
## update
```python
from radio import update
```



---
## preprocess
```python
from radio import preprocess
```

Parameters:
    x: selected choice
Returns:
    value of the selected choice as string or index within choice list

---
## get_interpretation_neighbors
```python
from radio import get_interpretation_neighbors
```



---
## get_interpretation_scores
```python
from radio import get_interpretation_scores
```

Returns:
Each value represents the interpretation score corresponding to each choice.

---
## style
```python
from radio import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## as_example
```python
from radio import as_example
```



---
## __name__
```python
from chatbot import __name__
```

gr.Chatbot() component.

---
## Chatbot
```python
from chatbot import Chatbot
```

Displays a chatbot output showing both user submitted messages and responses. Supports a subset of Markdown including bold, italics, code, tables. Also supports audio/video/image files, which are displayed in the Chatbot, and other kinds of files which are displayed as links.
Preprocessing: passes the messages in the Chatbot as a {List[List[str | None | Tuple]]}, i.e. a list of lists. The inner list has 2 elements: the user message and the response message. See `Postprocessing` for the format of these messages.
Postprocessing: expects function to return a {List[List[str | None | Tuple]]}, i.e. a list of lists. The inner list should have 2 elements: the user message and the response message. The individual messages can be (1) strings in valid Markdown, (2) tuples if sending files: (a filepath or URL to a file, [optional string alt text]) -- if the file is image/video/audio, it is displayed in the Chatbot, or (3) None, in which case the message is not displayed.

Demos: chatbot_simple, chatbot_multimodal
Guides: creating-a-chatbot

---
## __init__
```python
from chatbot import __init__
```

Parameters:
value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component.
color_map: This parameter is deprecated.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
height: height of the component in pixels.
latex_delimiters: A list of dicts of the form {"left": open delimiter (str), "right": close delimiter (str), "display": whether to display in newline (bool)} that will be used to render LaTeX expressions. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only expressions enclosed in $$ delimiters will be rendered as LaTeX, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html).
rtl: If True, sets the direction of the rendered text to right-to-left. Default is False, which renders text left-to-right.
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
show_copy_button: If True, will show a copy button for each chatbot message.
avatar_images: Tuple of two avatar image paths or URLs for user and bot (in that order). Pass None for either the user or bot image to skip. Must be within the working directory of the Gradio app or an external URL.
sanitize_html: If False, will disable HTML sanitization for chatbot messages. This is not recommended, as it can lead to security vulnerabilities.
render_markdown: If False, will disable Markdown rendering for chatbot messages.
bubble_full_width: If False, the chat bubble will fit to the content of the message. If True (default), the chat bubble will be the full width of the component.
line_breaks: If True (default), will enable Github-flavored Markdown line breaks in chatbot messages. If False, single new lines will be ignored. Only applies if `render_markdown` is True.
layout: If "panel", will display the chatbot in a llm style layout. If "bubble", will display the chatbot with message bubbles, with the user and bot messages on alterating sides. Will default to "bubble".

---
## update
```python
from chatbot import update
```



---
## _preprocess_chat_messages
```python
from chatbot import _preprocess_chat_messages
```



---
## preprocess
```python
from chatbot import preprocess
```



---
## _postprocess_chat_messages
```python
from chatbot import _postprocess_chat_messages
```



---
## postprocess
```python
from chatbot import postprocess
```

Parameters:
    y: List of lists representing the message and response pairs. Each message and response should be a string, which may be in Markdown format.  It can also be a tuple whose first element is a string or pathlib.Path filepath or URL to an image/video/audio, and second (optional) element is the alt text, in which case the media file is displayed. It can also be None, in which case that message is not displayed.
Returns:
    List of lists representing the message and response. Each message and response will be a string of HTML, or a dictionary with media information. Or None if the message is not to be displayed.

---
## style
```python
from chatbot import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __init__
```python
from audio import __init__
```



---
## example_inputs
```python
from audio import example_inputs
```



---
## update
```python
from audio import update
```



---
## preprocess
```python
from audio import preprocess
```

Parameters:
    x: dictionary with keys "name", "data", "is_file", "crop_min", "crop_max".
Returns:
    audio in requested format

---
## set_interpret_parameters
```python
from audio import set_interpret_parameters
```

Calculates interpretation score of audio subsections by splitting the audio into subsections, then using a "leave one out" method to calculate the score of each subsection by removing the subsection and measuring the delta of the output value.
Parameters:
    segments: Number of interpretation segments to split audio into.

---
## tokenize
```python
from audio import tokenize
```



---
## get_masked_inputs
```python
from audio import get_masked_inputs
```



---
## postprocess
```python
from audio import postprocess
```

Parameters:
    y: audio data in either of the following formats: a tuple of (sample_rate, data), or a string filepath or URL to an audio file, or None.
Returns:
    base64 url data

---
## stream_output
```python
from audio import stream_output
```



---
## check_streamable
```python
from audio import check_streamable
```



---
## as_example
```python
from audio import as_example
```



---
## __name__
```python
from duplicate_button import __name__
```

Predefined buttons with bound events that can be included in a gr.Blocks for convenience. 

---
## DuplicateButton
```python
from duplicate_button import DuplicateButton
```

Button that triggers a Spaces Duplication, when the demo is on Hugging Face Spaces. Does nothing locally.
Preprocessing: passes the button value as a {str} into the function
Postprocessing: expects a {str} to be returned from a function, which is set as the label of the button

---
## __init__
```python
from duplicate_button import __init__
```

Parameters:
value: Default text for the button to display. If callable, the function will be called whenever the app loads to set the initial value of the component.
variant: 'primary' for main call-to-action, 'secondary' for a more subdued style, 'stop' for a stop button.
size: Size of the button. Can be "sm" or "lg".
icon: URL or path to the icon file to display within the button. If None, no icon will be displayed.
link: URL to open when the button is clicked. If None, no link will be used.
visible: If False, component will be hidden.
interactive: If False, the Button will be in a disabled state.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.

---
## activate
```python
from duplicate_button import activate
```



---
## __name__
```python
from json_component import __name__
```

gr.JSON() component.

---
## JSON
```python
from json_component import JSON
```

Used to display arbitrary JSON output prettily.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a {str} filepath to a file containing valid JSON -- or a {list} or {dict} that is valid JSON

Demos: zip_to_json, blocks_xray

---
## __init__
```python
from json_component import __init__
```

Parameters:
value: Default value. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## update
```python
from json_component import update
```



---
## postprocess
```python
from json_component import postprocess
```

Parameters:
    y: either a string filepath to a JSON file, or a Python list or dict that can be converted to JSON
Returns:
    JSON output in Python list or dict format

---
## style
```python
from json_component import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from line_plot import __name__
```

gr.LinePlot() component

---
## LinePlot
```python
from line_plot import LinePlot
```

Create a line plot.

Preprocessing: this component does *not* accept input.
Postprocessing: expects a pandas dataframe with the data to plot.

Demos: line_plot, live_dashboard

---
## __init__
```python
from line_plot import __init__
```

Parameters:
value: The pandas dataframe containing the data to display in a scatter plot.
x: Column corresponding to the x axis.
y: Column corresponding to the y axis.
color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values.
stroke_dash: The column to determine the symbol used to draw the line, e.g. dashed lines, dashed lines with points.
overlay_point: Whether to draw a point on the line for each (x, y) coordinate pair.
title: The title to display on top of the chart.
tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot.
x_title: The title given to the x axis. By default, uses the value of the x parameter.
y_title: The title given to the y axis. By default, uses the value of the y parameter.
x_label_angle: The angle for the x axis labels. Positive values are clockwise, and negative values are counter-clockwise.
y_label_angle: The angle for the y axis labels. Positive values are clockwise, and negative values are counter-clockwise.
color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
stroke_dash_legend_title: The title given to the stroke_dash legend. By default, uses the value of the stroke_dash parameter.
color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
stroke_dash_legend_position: The position of the stoke_dash legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation.
height: The height of the plot in pixels.
width: The width of the plot in pixels.
x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max].
y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
caption: The (optional) caption to display below the plot.
interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
label: The (optional) label to display on the top left corner of the plot.
show_label: Whether the label should be displayed.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
visible: Whether the plot should be visible.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
show_actions_button: Whether to show the actions button on the top right corner of the plot.

---
## get_block_name
```python
from line_plot import get_block_name
```



---
## update
```python
from line_plot import update
```

Update an existing plot component.

If updating any of the plot properties (color, size, etc) the value, x, and y parameters must be specified.

Parameters:
    value: The pandas dataframe containing the data to display in a scatter plot.
    x: Column corresponding to the x axis.
    y: Column corresponding to the y axis.
    color: The column to determine the point color. If the column contains numeric data, gradio will interpolate the column data so that small values correspond to light colors and large values correspond to dark values.
    stroke_dash: The column to determine the symbol used to draw the line, e.g. dashed lines, dashed lines with points.
    overlay_point: Whether to draw a point on the line for each (x, y) coordinate pair.
    title: The title to display on top of the chart.
    tooltip: The column (or list of columns) to display on the tooltip when a user hovers a point on the plot.
    x_title: The title given to the x axis. By default, uses the value of the x parameter.
    y_title: The title given to the y axis. By default, uses the value of the y parameter.
    x_label_angle:  The angle for the x axis labels. Positive values are clockwise, and negative values are counter-clockwise.
    y_label_angle:  The angle for the y axis labels. Positive values are clockwise, and negative values are counter-clockwise.
    color_legend_title: The title given to the color legend. By default, uses the value of color parameter.
    stroke_dash_legend_title: The title given to the stroke legend. By default, uses the value of stroke parameter.
    color_legend_position: The position of the color legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation
    stroke_dash_legend_position: The position of the stoke_dash legend. If the string value 'none' is passed, this legend is omitted. For other valid position values see: https://vega.github.io/vega/docs/legends/#orientation
    height: The height of the plot in pixels.
    width: The width of the plot in pixels.
    x_lim: A tuple or list containing the limits for the x-axis, specified as [x_min, x_max].
    y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max].
    caption: The (optional) caption to display below the plot.
    interactive: Whether users should be able to interact with the plot by panning or zooming with their mouse or trackpad.
    label: The (optional) label to display in the top left corner of the plot.
    show_label: Whether the label should be displayed.
    visible: Whether the plot should be visible.

---
## create_plot
```python
from line_plot import create_plot
```

Helper for creating the scatter plot.

---
## postprocess
```python
from line_plot import postprocess
```



---
## __name__
```python
from upload_button import __name__
```

gr.UploadButton() component.

---
## UploadButton
```python
from upload_button import UploadButton
```

Used to create an upload button, when clicked allows a user to upload files that satisfy the specified file type or generic files (if file_type not set).
Preprocessing: passes the uploaded file as a {file-object} or {List[file-object]} depending on `file_count` (or a {bytes}/{List[bytes]} depending on `type`)
Postprocessing: expects function to return a {str} path to a file, or {List[str]} consisting of paths to files.
Examples-format: a {str} path to a local file that populates the component.
Demos: upload_button

---
## __init__
```python
from upload_button import __init__
```

Parameters:
label: Text to display on the button. Defaults to "Upload a File".
value: File or list of files to upload by default.
variant: 'primary' for main call-to-action, 'secondary' for a more subdued style, 'stop' for a stop button.
visible: If False, component will be hidden.
size: Size of the button. Can be "sm" or "lg".
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: If False, the UploadButton will be in a disabled state.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
type: Type of value to be returned by component. "file" returns a temporary file object with the same base name as the uploaded file, whose full path can be retrieved by file_obj.name, "binary" returns an bytes object.
file_count: if single, allows user to upload one file. If "multiple", user uploads multiple files. If "directory", user uploads all files in selected directory. Return type will be list for each file in case of "multiple" or "directory".
file_types: List of type of files to be uploaded. "file" allows any file to be uploaded, "image" allows only image files to be uploaded, "audio" allows only audio files to be uploaded, "video" allows only video files to be uploaded, "text" allows only text files to be uploaded.

---
## update
```python
from upload_button import update
```



---
## preprocess
```python
from upload_button import preprocess
```

Parameters:
    x: List of JSON objects with filename as 'name' property and base64 data as 'data' property
Returns:
    File objects in requested format

---
## style
```python
from upload_button import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## process_single_file
```python
from upload_button import process_single_file
```



---
## __name__
```python
from gallery import __name__
```

gr.Gallery() component.

---
## Gallery
```python
from gallery import Gallery
```

Used to display a list of images as a gallery that can be scrolled through.
Preprocessing: this component does *not* accept input.
Postprocessing: expects a list of images in any format, {List[numpy.array | PIL.Image | str | pathlib.Path]}, or a {List} of (image, {str} caption) tuples and displays them.

Demos: fake_gan

---
## __init__
```python
from gallery import __init__
```

Parameters:
value: List of images to display in the gallery by default. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
columns: Represents the number of images that should be shown in one row, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). If fewer than 6 are given then the last will be used for all subsequent breakpoints
rows: Represents the number of rows in the image grid, for each of the six standard screen sizes (<576px, <768px, <992px, <1200px, <1400px, >1400px). If fewer than 6 are given then the last will be used for all subsequent breakpoints
height: The height of the gallery component, in pixels. If more images are displayed than can fit in the height, a scrollbar will appear.
allow_preview: If True, images in the gallery will be enlarged when they are clicked. Default is True.
preview: If True, Gallery will start in preview mode, which shows all of the images as thumbnails and allows the user to click on them to view them in full size. Only works if allow_preview is True.
selected_index: The index of the image that should be initially selected. If None, no image will be selected at start. If provided, will set Gallery to preview mode unless allow_preview is set to False.
object_fit: CSS object-fit property for the thumbnail images in the gallery. Can be "contain", "cover", "fill", "none", or "scale-down".
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.
show_download_button: If True, will show a download button in the corner of the selected image. If False, the icon does not appear. Default is True.

---
## update
```python
from gallery import update
```



---
## postprocess
```python
from gallery import postprocess
```

Parameters:
    y: list of images, or list of (image, caption) tuples
Returns:
    list of string file paths to images in temp directory

---
## style
```python
from gallery import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## __name__
```python
from dropdown import __name__
```

gr.Dropdown() component.

---
## Dropdown
```python
from dropdown import Dropdown
```

Creates a dropdown of choices from which entries can be selected.
Preprocessing: passes the value of the selected dropdown entry as a {str} or its index as an {int} into the function, depending on `type`.
Postprocessing: expects a {str} corresponding to the value of the dropdown entry to be selected.
Examples-format: a {str} representing the drop down value to select.
Demos: sentence_builder, titanic_survival

---
## __init__
```python
from dropdown import __init__
```

Parameters:
choices: A list of string options to choose from. An option can also be a tuple of the form (name, value), where name is the displayed name of the dropdown choice and value is the value to be passed to the function, or returned by the function.
value: default value(s) selected in dropdown. If None, no value is selected by default. If callable, the function will be called whenever the app loads to set the initial value of the component.
type: Type of value to be returned by component. "value" returns the string of the choice selected, "index" returns the index of the choice selected.
multiselect: if True, multiple choices can be selected.
allow_custom_value: If True, allows user to enter a custom value that is not in the list of choices.
max_choices: maximum number of choices that can be selected. If None, no limit is enforced.
filterable: If True, user will be able to type into the dropdown and filter the choices by typing. Can only be set to False if `allow_custom_value` is False.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, choices in this dropdown will be selectable; if False, selection will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## api_info
```python
from dropdown import api_info
```



---
## example_inputs
```python
from dropdown import example_inputs
```



---
## update
```python
from dropdown import update
```



---
## preprocess
```python
from dropdown import preprocess
```

Parameters:
    x: selected choice(s)
Returns:
    selected choice(s) as string or index within choice list or list of string or indices

---
## _warn_if_invalid_choice
```python
from dropdown import _warn_if_invalid_choice
```



---
## postprocess
```python
from dropdown import postprocess
```



---
## set_interpret_parameters
```python
from dropdown import set_interpret_parameters
```

Calculates interpretation score of each choice by comparing the output against each of the outputs when alternative choices are selected.

---
## get_interpretation_neighbors
```python
from dropdown import get_interpretation_neighbors
```



---
## get_interpretation_scores
```python
from dropdown import get_interpretation_scores
```

Returns:
Each value represents the interpretation score corresponding to each choice.

---
## style
```python
from dropdown import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## as_example
```python
from dropdown import as_example
```



---
## __name__
```python
from video import __name__
```

gr.Video() component.

---
## Video
```python
from video import Video
```

Creates a video component that can be used to upload/record videos (as an input) or display videos (as an output).
For the video to be playable in the browser it must have a compatible container and codec combination. Allowed
combinations are .mp4 with h264 codec, .ogg with theora codec, and .webm with vp9 codec. If the component detects
that the output video would not be playable in the browser it will attempt to convert it to a playable mp4 video.
If the conversion fails, the original video is returned.
Preprocessing: passes the uploaded video as a {str} filepath or URL whose extension can be modified by `format`.
Postprocessing: expects a {str} or {pathlib.Path} filepath to a video which is displayed, or a {Tuple[str | pathlib.Path, str | pathlib.Path | None]} where the first element is a filepath to a video and the second element is an optional filepath to a subtitle file.
Examples-format: a {str} filepath to a local file that contains the video, or a {Tuple[str, str]} where the first element is a filepath to a video file and the second element is a filepath to a subtitle file.
Demos: video_identity, video_subtitle

---
## __init__
```python
from video import __init__
```

Parameters:
value: A path or URL for the default value that Video component is going to take. Can also be a tuple consisting of (video filepath, subtitle filepath). If a subtitle file is provided, it should be of type .srt or .vtt. Or can be callable, in which case the function will be called whenever the app loads to set the initial value of the component.
format: Format of video format to be returned by component, such as 'avi' or 'mp4'. Use 'mp4' to ensure browser playability. If set to None, video will keep uploaded format.
source: Source of video. "upload" creates a box where user can drop an video file, "webcam" allows user to record a video from their webcam.
height: Height of the displayed video in pixels.
width: Width of the displayed video in pixels.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will allow users to upload a video; if False, can only be used to display videos. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
mirror_webcam: If True webcam will be mirrored. Default is True.
include_audio: Whether the component should record/retain the audio track for a video. By default, audio is excluded for webcam videos and included for uploaded videos.
autoplay: Whether to automatically play the video when the component is used as an output. Note: browsers will not autoplay video files if the user has not interacted with the page yet.
show_share_button: If True, will show a share icon in the corner of the component that allows user to share outputs to Hugging Face Spaces Discussions. If False, icon does not appear. If set to None (default behavior), then the icon appears if this Gradio app is launched on Spaces, but not otherwise.

---
## update
```python
from video import update
```



---
## preprocess
```python
from video import preprocess
```

Parameters:
    x: A tuple of (video file data, subtitle file data) or just video file data.
Returns:
    A string file path or URL to the preprocessed video. Subtitle file data is ignored.

---
## postprocess
```python
from video import postprocess
```

Processes a video to ensure that it is in the correct format before returning it to the front end.
Parameters:
    y: video data in either of the following formats: a tuple of (video filepath, optional subtitle filepath), or just a filepath or URL to an video file, or None.
Returns:
    a tuple with the two dictionary, reresent to video and (optional) subtitle, which following formats:
    - The first dictionary represents the video file and contains the following keys:
        - 'name': a file path to a temporary copy of the processed video.
        - 'data': None
        - 'is_file': True
    - The second dictionary represents the subtitle file and contains the following keys:
        - 'name': None
        - 'data': Base64 encode the processed subtitle data.
        - 'is_file': False
    - If subtitle is None, returns (video, None).
    - If both video and subtitle are None, returns None.

---
## _format_video
```python
from video import _format_video
```

Processes a video to ensure that it is in the correct format.
Parameters:
    video: video data in either of the following formats: a string filepath or URL to an video file, or None.
Returns:
    a dictionary with the following keys:

    - 'name': a file path to a temporary copy of the processed video.
    - 'data': None
    - 'is_file': True

---
## _format_subtitle
```python
from video import _format_subtitle
```

Convert subtitle format to VTT and process the video to ensure it meets the HTML5 requirements.
Parameters:
    subtitle: subtitle path in either of the VTT and SRT format.
Returns:
    a dictionary with the following keys:
    - 'name': None
    - 'data': base64-encoded subtitle data.
    - 'is_file': False

---
## style
```python
from video import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## srt_to_vtt
```python
from video import srt_to_vtt
```

Convert an SRT subtitle file to a VTT subtitle file

---
## update
```python
from image import update
```



---
## _format_image
```python
from image import _format_image
```

Helper method to format an image based on self.type

---
## preprocess
```python
from image import preprocess
```

Parameters:
    x: base64 url data, or (if tool == "sketch") a dict of image and mask base64 url data
Returns:
    image in requested format, or (if tool == "sketch") a dict of image and mask in requested format

---
## postprocess
```python
from image import postprocess
```

Parameters:
    y: image as a numpy array, PIL Image, string/Path filepath, or string URL
Returns:
    base64 url data

---
## set_interpret_parameters
```python
from image import set_interpret_parameters
```

Calculates interpretation score of image subsections by splitting the image into subsections, then using a "leave one out" method to calculate the score of each subsection by whiting out the subsection and measuring the delta of the output value.
Parameters:
    segments: Number of interpretation segments to split image into.

---
## _segment_by_slic
```python
from image import _segment_by_slic
```

Helper method that segments an image into superpixels using slic.
Parameters:
    x: base64 representation of an image

---
## tokenize
```python
from image import tokenize
```

Segments image into tokens, masks, and leave-one-out-tokens
Parameters:
    x: base64 representation of an image
Returns:
    tokens: list of tokens, used by the get_masked_input() method
    leave_one_out_tokens: list of left-out tokens, used by the get_interpretation_neighbors() method
    masks: list of masks, used by the get_interpretation_neighbors() method

---
## get_masked_inputs
```python
from image import get_masked_inputs
```



---
## get_interpretation_scores
```python
from image import get_interpretation_scores
```

Returns:
A 2D array representing the interpretation score of each pixel of the image.

---
## style
```python
from image import style
```

This method is deprecated. Please set these arguments in the constructor instead.

---
## check_streamable
```python
from image import check_streamable
```



---
## as_example
```python
from image import as_example
```



---
## _Keywords
```python
from base import _Keywords
```



---
## Component
```python
from base import Component
```

A base class for defining the methods that all gradio components should have.

---
## server
```python
from base import server
```



---
## IOComponent
```python
from base import IOComponent
```

A base class for defining methods that all input/output components should have.

---
## FormComponent
```python
from base import FormComponent
```



---
## component
```python
from base import component
```



---
## get_component_instance
```python
from base import get_component_instance
```

Returns a component instance from a string, dict, or Component object.
Parameters:
    comp: the component to instantiate. If a string, must be the name of a component, e.g. "dropdown". If a dict, must have a "name" key, e.g. {"name": "dropdown", "choices": ["a", "b"]}. If a Component object, will be returned as is.
    render: whether to render the component. If True, renders the component (if not already rendered). If False, does not do anything.
    unrender: whether to unrender the component. If True, unrenders the the component (if already rendered) -- this is useful when constructing an Interface or ChatInterface inside of a Blocks. If False, does not do anything.

---
## DataframeData
```python
from base import DataframeData
```



---
## preprocess
```python
from base import preprocess
```

Any preprocessing needed to be performed on function input.

---
## postprocess
```python
from base import postprocess
```

Any postprocessing needed to be performed on function output.

---
## style
```python
from base import style
```

This method is deprecated. Please set these arguments in the Components constructor instead.

---
## get_config
```python
from base import get_config
```



---
## hash_file
```python
from base import hash_file
```



---
## hash_url
```python
from base import hash_url
```



---
## hash_bytes
```python
from base import hash_bytes
```



---
## hash_base64
```python
from base import hash_base64
```



---
## make_temp_copy_if_needed
```python
from base import make_temp_copy_if_needed
```

Returns a temporary file path for a copy of the given file path if it does
not already exist. Otherwise returns the path to the existing temp file.

---
## download_temp_copy_if_needed
```python
from base import download_temp_copy_if_needed
```

Downloads a file and makes a temporary file path for a copy if does not already
exist. Otherwise returns the path to the existing temp file.

---
## base64_to_temp_file_if_needed
```python
from base import base64_to_temp_file_if_needed
```

Converts a base64 encoding to a file and returns the path to the file if
the file doesn't already exist. Otherwise returns the path to the existing file.

---
## pil_to_temp_file
```python
from base import pil_to_temp_file
```



---
## img_array_to_temp_file
```python
from base import img_array_to_temp_file
```



---
## audio_to_temp_file
```python
from base import audio_to_temp_file
```



---
## file_bytes_to_file
```python
from base import file_bytes_to_file
```



---
## get_load_fn_and_initial_value
```python
from base import get_load_fn_and_initial_value
```



---
## attach_load_event
```python
from base import attach_load_event
```

Add a load event that runs `callable`, optionally every `every` seconds.

---
## as_example
```python
from base import as_example
```

Return the input data in a way that can be displayed by the examples dataset component in the front-end.

---
## get_expected_parent
```python
from base import get_expected_parent
```



---
## __name__
```python
from checkbox import __name__
```

gr.Checkbox() component.

---
## Checkbox
```python
from checkbox import Checkbox
```

Creates a checkbox that can be set to `True` or `False`.

Preprocessing: passes the status of the checkbox as a {bool} into the function.
Postprocessing: expects a {bool} returned from the function and, if it is True, checks the checkbox.
Examples-format: a {bool} representing whether the box is checked.
Demos: sentence_builder, titanic_survival

---
## __init__
```python
from checkbox import __init__
```

Parameters:
value: if True, checked by default. If callable, the function will be called whenever the app loads to set the initial value of the component.
label: component name in interface.
info: additional component description.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, this checkbox can be checked; if False, checking will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## update
```python
from checkbox import update
```



---
## get_interpretation_neighbors
```python
from checkbox import get_interpretation_neighbors
```



---
## get_interpretation_scores
```python
from checkbox import get_interpretation_scores
```

Returns:
The first value represents the interpretation score if the input is False, and the second if the input is True.

---
## State
```python
from state import State
```

Special hidden component that stores session state across runs of the demo by the
same user. The value of the State variable is cleared when the user refreshes the page.

Preprocessing: No preprocessing is performed
Postprocessing: No postprocessing is performed
Demos: blocks_simple_squares
Guides: real-time-speech-recognition

---
## Variable
```python
from state import Variable
```

Variable was renamed to State. This class is kept for backwards compatibility.

---
## get_block_name
```python
from state import get_block_name
```



---
## __name__
```python
from logout_button import __name__
```

Predefined button to sign out from Hugging Face in a Gradio Space.

---
## LogoutButton
```python
from logout_button import LogoutButton
```

Button to log out a user from a Space.

---
## __init__
```python
from logout_button import __init__
```



---
## __name__
```python
from timeseries import __name__
```



---
## Timeseries
```python
from timeseries import Timeseries
```

Creates a component that can be used to upload/preview timeseries csv files or display a dataframe consisting of a time series graphically.
Preprocessing: passes the uploaded timeseries data as a {pandas.DataFrame} into the function
Postprocessing: expects a {pandas.DataFrame} or {str} path to a csv to be returned, which is then displayed as a timeseries graph
Examples-format: a {str} filepath of csv data with time series data.
Demos: fraud_detector

---
## __init__
```python
from timeseries import __init__
```

Parameters:
value: File path for the timeseries csv file. If callable, the function will be called whenever the app loads to set the initial value of the component.
x: Column name of x (time) series. None if csv has no headers, in which case first column is x series.
y: Column name of y series, or list of column names if multiple series. None if csv has no headers, in which case every column after first is a y series.
label: component name in interface.
every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
colors: an ordered list of colors to use for each line plot
show_label: if True, will display label.
container: If True, will place the component in a container - providing some extra padding around the border.
scale: relative width compared to adjacent Components in a Row. For example, if Component A has scale=2, and Component B has scale=1, A will be twice as wide as B. Should be an integer.
min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
interactive: if True, will allow users to upload a timeseries csv; if False, can only be used to display timeseries data. If not provided, this is inferred based on whether the component is used as an input or output.
visible: If False, component will be hidden.
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.

---
## update
```python
from timeseries import update
```



---
## preprocess
```python
from timeseries import preprocess
```

Parameters:
    x: Dict with keys 'data': 2D array of str, numeric, or bool data, 'headers': list of strings for header names, 'range': optional two element list designating start of end of subrange.
Returns:
    Dataframe of timeseries data

---
## postprocess
```python
from timeseries import postprocess
```

Parameters:
    y: csv or dataframe with timeseries data
Returns:
    JSON object with key 'headers' for list of header names, 'data' for 2D array of string or numeric data

---
## as_example
```python
from timeseries import as_example
```



---
## __name__
```python
from builder_app import __name__
```



---
## get_docstr
```python
from builder_app import get_docstr
```



---
## get_doc_theme_var_groups
```python
from builder_app import get_doc_theme_var_groups
```



---
## load_theme
```python
from builder_app import load_theme
```



---
## generate_theme_code
```python
from builder_app import generate_theme_code
```



---
## render_variables
```python
from builder_app import render_variables
```



---
## attach_rerender
```python
from builder_app import attach_rerender
```



---
## load_color
```python
from builder_app import load_color
```



---
## load_size
```python
from builder_app import load_size
```



---
## undo
```python
from builder_app import undo
```



---
## upload_to_hub
```python
from builder_app import upload_to_hub
```



---
## pad_to_4
```python
from builder_app import pad_to_4
```



---
## chat
```python
from builder_app import chat
```



---
## go
```python
from builder_app import go
```



---
## clear
```python
from builder_app import clear
```



---
## __name__
```python
from monochrome import __name__
```



---
## Monochrome
```python
from monochrome import Monochrome
```



---
## __init__
```python
from monochrome import __init__
```



---
## __name__
```python
from soft import __name__
```



---
## Soft
```python
from soft import Soft
```



---
## __init__
```python
from soft import __init__
```



---
## builder
```python
from __init__ import builder
```



---
## __name__
```python
from upload_theme import __name__
```



---
## main
```python
from upload_theme import main
```



---
## upload_theme
```python
from upload_theme import upload_theme
```



---
## Default
```python
from default import Default
```



---
## __init__
```python
from default import __init__
```



---
## __name__
```python
from app import __name__
```



---
## chat
```python
from app import chat
```



---
## go
```python
from app import go
```



---
## clear
```python
from app import clear
```



---
## __name__
```python
from glass import __name__
```



---
## Glass
```python
from glass import Glass
```



---
## __init__
```python
from glass import __init__
```



---
## ThemeClass
```python
from base import ThemeClass
```



---
## Base
```python
from base import Base
```



---
## _get_theme_css
```python
from base import _get_theme_css
```



---
## to_dict
```python
from base import to_dict
```

Convert the theme into a python dictionary.

---
## load
```python
from base import load
```

Load a serialized binary representation of an object from a stream.

Parameters
----------
stream : IO[bytes]
    The binary stream (file-like object) from where the serialized object must be loaded.
kwargs
    Any extra keyword arguments that are needed in the concrete implementation of ``load``.

Returns
-------
obj : Any
    The python object that was loaded.

---
## from_dict
```python
from base import from_dict
```

Create a theme instance from a dictionary representation.

Parameters:
    theme: The dictionary representation of the theme.

---
## dump
```python
from base import dump
```

Write a serialized binary representation of an object to a stream.

Parameters
----------
obj : Any
    The python object that must be serialized and written.
stream : IO[bytes]
    The binary stream (file-like object) where the serialized object must be written to.
kwargs
    Any extra keyword arguments that are needed in the concrete implementation of ``dump``.

---
## from_hub
```python
from base import from_hub
```

Load a theme from the hub.

This DOES NOT require a HuggingFace account for downloading publicly available themes.

Parameters:
    repo_name: string of the form <author>/<theme-name>@<semantic-version-expression>.  If a semantic version expression is omitted, the latest version will be fetched.
    hf_token: HuggingFace Token. Only needed to download private themes.

---
## _get_next_version
```python
from base import _get_next_version
```



---
## _theme_version_exists
```python
from base import _theme_version_exists
```



---
## push_to_hub
```python
from base import push_to_hub
```

Upload a theme to the HuggingFace hub.

This requires a HuggingFace account.

Parameters:
    repo_name: The name of the repository to store the theme assets, e.g. 'my_theme' or 'sunset'.
    org_name: The name of the org to save the space in. If None (the default), the username corresponding to the logged in user, or hƒ_token is used.
    version: A semantic version tag for theme. Bumping the version tag lets you publish updates to a theme without changing the look of applications that already loaded your theme.
    hf_token: API token for your HuggingFace account
    theme_name: Name for the name. If None, defaults to repo_name
    description: A long form description to your theme.

---
## set
```python
from base import set
```

Parameters:
body_background_fill: The background of the entire app.
body_background_fill_dark: The background of the entire app in dark mode.
body_text_color: The default text color.
body_text_color_dark: The default text color in dark mode.
body_text_size: The default text size.
body_text_color_subdued: The text color used for softer, less important text.
body_text_color_subdued_dark: The text color used for softer, less important text in dark mode.
body_text_weight: The default text weight.
embed_radius: The corner radius used for embedding when the app is embedded within a page.
background_fill_primary: The background primarily used for items placed directly on the page.
background_fill_primary_dark: The background primarily used for items placed directly on the page in dark mode.
background_fill_secondary: The background primarily used for items placed on top of another item.
background_fill_secondary_dark: The background primarily used for items placed on top of another item in dark mode.
border_color_accent: The border color used for accented items.
border_color_accent_dark: The border color used for accented items in dark mode.
border_color_accent_subdued: The subdued border color for accented items.
border_color_accent_subdued_dark: The subdued border color for accented items in dark mode.
border_color_primary: The border color primarily used for items placed directly on the page.
border_color_primary_dark: The border color primarily used for items placed directly on the page in dark mode.
color_accent: The color used for accented items.
color_accent_soft: The softer color used for accented items.
color_accent_soft_dark: The softer color used for accented items in dark mode.
link_text_color: The text color used for links.
link_text_color_dark: The text color used for links in dark mode.
link_text_color_active: The text color used for links when they are active.
link_text_color_active_dark: The text color used for links when they are active in dark mode.
link_text_color_hover: The text color used for links when they are hovered over.
link_text_color_hover_dark: The text color used for links when they are hovered over in dark mode.
link_text_color_visited: The text color used for links when they have been visited.
link_text_color_visited_dark: The text color used for links when they have been visited in dark mode.
prose_text_size: The text size used for markdown and other prose.
prose_text_weight: The text weight used for markdown and other prose.
prose_header_text_weight: The text weight of a header used for markdown and other prose.
shadow_drop: Drop shadow used by other shadowed items.
shadow_drop_lg: Larger drop shadow used by other shadowed items.
shadow_inset: Inset shadow used by other shadowed items.
shadow_spread: Size of shadow spread used by shadowed items.
shadow_spread_dark: Size of shadow spread used by shadowed items in dark mode.
block_background_fill: The background around an item.
block_background_fill_dark: The background around an item in dark mode.
block_border_color: The border color around an item.
block_border_color_dark: The border color around an item in dark mode.
block_border_width: The border width around an item.
block_border_width_dark: The border width around an item in dark mode.
block_info_text_color: The color of the info text.
block_info_text_color_dark: The color of the info text in dark mode.
block_info_text_size: The size of the info text.
block_info_text_weight: The weight of the info text.
block_label_background_fill: The background of the title label of a media element (e.g. image).
block_label_background_fill_dark: The background of the title label of a media element (e.g. image) in dark mode.
block_label_border_color: The border color of the title label of a media element (e.g. image).
block_label_border_color_dark: The border color of the title label of a media element (e.g. image) in dark mode.
block_label_border_width: The border width of the title label of a media element (e.g. image).
block_label_border_width_dark: The border width of the title label of a media element (e.g. image) in dark mode.
block_label_shadow: The shadow of the title label of a media element (e.g. image).
block_label_text_color: The text color of the title label of a media element (e.g. image).
block_label_text_color_dark: The text color of the title label of a media element (e.g. image) in dark mode.
block_label_margin: The margin of the title label of a media element (e.g. image) from its surrounding container.
block_label_padding: The padding of the title label of a media element (e.g. image).
block_label_radius: The corner radius of the title label of a media element (e.g. image).
block_label_right_radius: The corner radius of a right-aligned helper label.
block_label_text_size: The text size of the title label of a media element (e.g. image).
block_label_text_weight: The text weight of the title label of a media element (e.g. image).
block_padding: The padding around an item.
block_radius: The corner radius around an item.
block_shadow: The shadow under an item.
block_shadow_dark: The shadow under an item in dark mode.
block_title_background_fill: The background of the title of a form element (e.g. textbox).
block_title_background_fill_dark: The background of the title of a form element (e.g. textbox) in dark mode.
block_title_border_color: The border color of the title of a form element (e.g. textbox).
block_title_border_color_dark: The border color of the title of a form element (e.g. textbox) in dark mode.
block_title_border_width: The border width of the title of a form element (e.g. textbox).
block_title_border_width_dark: The border width of the title of a form element (e.g. textbox) in dark mode.
block_title_text_color: The text color of the title of a form element (e.g. textbox).
block_title_text_color_dark: The text color of the title of a form element (e.g. textbox) in dark mode.
block_title_padding: The padding of the title of a form element (e.g. textbox).
block_title_radius: The corner radius of the title of a form element (e.g. textbox).
block_title_text_size: The text size of the title of a form element (e.g. textbox).
block_title_text_weight: The text weight of the title of a form element (e.g. textbox).
container_radius: The corner radius of a layout component that holds other content.
form_gap_width: The border gap between form elements, (e.g. consecutive textboxes).
layout_gap: The gap between items within a row or column.
panel_background_fill: The background of a panel.
panel_background_fill_dark: The background of a panel in dark mode.
panel_border_color: The border color of a panel.
panel_border_color_dark: The border color of a panel in dark mode.
panel_border_width: The border width of a panel.
panel_border_width_dark: The border width of a panel in dark mode.
section_header_text_size: The text size of a section header (e.g. tab name).
section_header_text_weight: The text weight of a section header (e.g. tab name).
chatbot_code_background_color: The background color of code blocks in the chatbot.
chatbot_code_background_color_dark: The background color of code blocks in the chatbot in dark mode.
checkbox_background_color: The background of a checkbox square or radio circle.
checkbox_background_color_dark: The background of a checkbox square or radio circle in dark mode.
checkbox_background_color_focus: The background of a checkbox square or radio circle when focused.
checkbox_background_color_focus_dark: The background of a checkbox square or radio circle when focused in dark mode.
checkbox_background_color_hover: The background of a checkbox square or radio circle when hovered over.
checkbox_background_color_hover_dark: The background of a checkbox square or radio circle when hovered over in dark mode.
checkbox_background_color_selected: The background of a checkbox square or radio circle when selected.
checkbox_background_color_selected_dark: The background of a checkbox square or radio circle when selected in dark mode.
checkbox_border_color: The border color of a checkbox square or radio circle.
checkbox_border_color_dark: The border color of a checkbox square or radio circle in dark mode.
checkbox_border_color_focus: The border color of a checkbox square or radio circle when focused.
checkbox_border_color_focus_dark: The border color of a checkbox square or radio circle when focused in dark mode.
checkbox_border_color_hover: The border color of a checkbox square or radio circle when hovered over.
checkbox_border_color_hover_dark: The border color of a checkbox square or radio circle when hovered over in dark mode.
checkbox_border_color_selected: The border color of a checkbox square or radio circle when selected.
checkbox_border_color_selected_dark: The border color of a checkbox square or radio circle when selected in dark mode.
checkbox_border_radius: The corner radius of a checkbox square.
checkbox_border_width: The border width of a checkbox square or radio circle.
checkbox_border_width_dark: The border width of a checkbox square or radio circle in dark mode.
checkbox_check: The checkmark visual of a checkbox square.
radio_circle: The circle visual of a radio circle.
checkbox_shadow: The shadow of a checkbox square or radio circle.
checkbox_label_background_fill: The background of the surrounding button of a checkbox or radio element.
checkbox_label_background_fill_dark: The background of the surrounding button of a checkbox or radio element in dark mode.
checkbox_label_background_fill_hover: The background of the surrounding button of a checkbox or radio element when hovered over.
checkbox_label_background_fill_hover_dark: The background of the surrounding button of a checkbox or radio element when hovered over in dark mode.
checkbox_label_background_fill_selected: The background of the surrounding button of a checkbox or radio element when selected.
checkbox_label_background_fill_selected_dark: The background of the surrounding button of a checkbox or radio element when selected in dark mode.
checkbox_label_border_color: The border color of the surrounding button of a checkbox or radio element.
checkbox_label_border_color_dark: The border color of the surrounding button of a checkbox or radio element in dark mode.
checkbox_label_border_color_hover: The border color of the surrounding button of a checkbox or radio element when hovered over.
checkbox_label_border_color_hover_dark: The border color of the surrounding button of a checkbox or radio element when hovered over in dark mode.
checkbox_label_border_width: The border width of the surrounding button of a checkbox or radio element.
checkbox_label_border_width_dark: The border width of the surrounding button of a checkbox or radio element in dark mode.
checkbox_label_gap: The gap consecutive checkbox or radio elements.
checkbox_label_padding: The padding of the surrounding button of a checkbox or radio element.
checkbox_label_shadow: The shadow of the surrounding button of a checkbox or radio element.
checkbox_label_text_size: The text size of the label accompanying a checkbox or radio element.
checkbox_label_text_weight: The text weight of the label accompanying a checkbox or radio element.
checkbox_label_text_color: The text color of the label accompanying a checkbox or radio element.
checkbox_label_text_color_dark: The text color of the label accompanying a checkbox or radio element in dark mode.
checkbox_label_text_color_selected: The text color of the label accompanying a checkbox or radio element when selected.
checkbox_label_text_color_selected_dark: The text color of the label accompanying a checkbox or radio element when selected in dark mode.
error_background_fill: The background of an error message.
error_background_fill_dark: The background of an error message in dark mode.
error_border_color: The border color of an error message.
error_border_color_dark: The border color of an error message in dark mode.
error_border_width: The border width of an error message.
error_border_width_dark: The border width of an error message in dark mode.
error_text_color: The text color of an error message.
error_text_color_dark: The text color of an error message in dark mode.
input_background_fill: The background of an input field.
input_background_fill_dark: The background of an input field in dark mode.
input_background_fill_focus: The background of an input field when focused.
input_background_fill_focus_dark: The background of an input field when focused in dark mode.
input_background_fill_hover: The background of an input field when hovered over.
input_background_fill_hover_dark: The background of an input field when hovered over in dark mode.
input_border_color: The border color of an input field.
input_border_color_dark: The border color of an input field in dark mode.
input_border_color_focus: The border color of an input field when focused.
input_border_color_focus_dark: The border color of an input field when focused in dark mode.
input_border_color_hover: The border color of an input field when hovered over.
input_border_color_hover_dark: The border color of an input field when hovered over in dark mode.
input_border_width: The border width of an input field.
input_border_width_dark: The border width of an input field in dark mode.
input_padding: The padding of an input field.
input_placeholder_color: The placeholder text color of an input field.
input_placeholder_color_dark: The placeholder text color of an input field in dark mode.
input_radius: The corner radius of an input field.
input_shadow: The shadow of an input field.
input_shadow_dark: The shadow of an input field in dark mode.
input_shadow_focus: The shadow of an input field when focused.
input_shadow_focus_dark: The shadow of an input field when focused in dark mode.
input_text_size: The text size of an input field.
input_text_weight: The text weight of an input field.
loader_color: The color of the loading animation while a request is pending.
loader_color_dark: The color of the loading animation while a request is pending in dark mode.
slider_color: The color of the slider in a range element.
slider_color_dark: The color of the slider in a range element in dark mode.
stat_background_fill: The background used for stats visuals (e.g. confidence bars in label).
stat_background_fill_dark: The background used for stats visuals (e.g. confidence bars in label) in dark mode.
table_border_color: The border color of a table.
table_border_color_dark: The border color of a table in dark mode.
table_even_background_fill: The background of even rows in a table.
table_even_background_fill_dark: The background of even rows in a table in dark mode.
table_odd_background_fill: The background of odd rows in a table.
table_odd_background_fill_dark: The background of odd rows in a table in dark mode.
table_radius: The corner radius of a table.
table_row_focus: The background of a focused row in a table.
table_row_focus_dark: The background of a focused row in a table in dark mode.
button_border_width: The border width of a button.
button_border_width_dark: The border width of a button in dark mode.
button_cancel_background_fill: The background of a button of "cancel" variant.
button_cancel_background_fill_dark: The background of a button of "cancel" variant in dark mode.
button_cancel_background_fill_hover: The background of a button of "cancel" variant when hovered over.
button_cancel_background_fill_hover_dark: The background of a button of "cancel" variant when hovered over in dark mode.
button_cancel_border_color: The border color of a button of "cancel" variant.
button_cancel_border_color_dark: The border color of a button of "cancel" variant in dark mode.
button_cancel_border_color_hover: The border color of a button of "cancel" variant when hovered over.
button_cancel_border_color_hover_dark: The border color of a button of "cancel" variant when hovered over in dark mode.
button_cancel_text_color: The text color of a button of "cancel" variant.
button_cancel_text_color_dark: The text color of a button of "cancel" variant in dark mode.
button_cancel_text_color_hover: The text color of a button of "cancel" variant when hovered over.
button_cancel_text_color_hover_dark: The text color of a button of "cancel" variant when hovered over in dark mode.
button_large_padding: The padding of a button with the default "large" size.
button_large_radius: The corner radius of a button with the default "large" size.
button_large_text_size: The text size of a button with the default "large" size.
button_large_text_weight: The text weight of a button with the default "large" size.
button_primary_background_fill: The background of a button of "primary" variant.
button_primary_background_fill_dark: The background of a button of "primary" variant in dark mode.
button_primary_background_fill_hover: The background of a button of "primary" variant when hovered over.
button_primary_background_fill_hover_dark: The background of a button of "primary" variant when hovered over in dark mode.
button_primary_border_color: The border color of a button of "primary" variant.
button_primary_border_color_dark: The border color of a button of "primary" variant in dark mode.
button_primary_border_color_hover: The border color of a button of "primary" variant when hovered over.
button_primary_border_color_hover_dark: The border color of a button of "primary" variant when hovered over in dark mode.
button_primary_text_color: The text color of a button of "primary" variant.
button_primary_text_color_dark: The text color of a button of "primary" variant in dark mode.
button_primary_text_color_hover: The text color of a button of "primary" variant when hovered over.
button_primary_text_color_hover_dark: The text color of a button of "primary" variant when hovered over in dark mode.
button_secondary_background_fill: The background of a button of default "secondary" variant.
button_secondary_background_fill_dark: The background of a button of default "secondary" variant in dark mode.
button_secondary_background_fill_hover: The background of a button of default "secondary" variant when hovered over.
button_secondary_background_fill_hover_dark: The background of a button of default "secondary" variant when hovered over in dark mode.
button_secondary_border_color: The border color of a button of default "secondary" variant.
button_secondary_border_color_dark: The border color of a button of default "secondary" variant in dark mode.
button_secondary_border_color_hover: The border color of a button of default "secondary" variant when hovered over.
button_secondary_border_color_hover_dark: The border color of a button of default "secondary" variant when hovered over in dark mode.
button_secondary_text_color: The text color of a button of default "secondary" variant.
button_secondary_text_color_dark: The text color of a button of default "secondary" variant in dark mode.
button_secondary_text_color_hover: The text color of a button of default "secondary" variant when hovered over.
button_secondary_text_color_hover_dark: The text color of a button of default "secondary" variant when hovered over in dark mode.
button_shadow: The shadow under a button.
button_shadow_active: The shadow under a button when pressed.
button_shadow_hover: The shadow under a button when hovered over.
button_small_padding: The padding of a button set to "small" size.
button_small_radius: The corner radius of a button set to "small" size.
button_small_text_size: The text size of a button set to "small" size.
button_small_text_weight: The text weight of a button set to "small" size.
button_transition: The transition animation duration of a button between regular, hover, and focused states.

---
## expand_shortcut
```python
from base import expand_shortcut
```



---
## repl_func
```python
from base import repl_func
```



---
## __name__
```python
from readme_content import __name__
```



---
## __name__
```python
from sizes import __name__
```



---
## Size
```python
from sizes import Size
```



---
## __init__
```python
from sizes import __init__
```



---
## expand
```python
from sizes import expand
```



---
## __name__
```python
from theme_dropdown import __name__
```



---
## create_theme_dropdown
```python
from theme_dropdown import create_theme_dropdown
```



---
## make_else_if
```python
from theme_dropdown import make_else_if
```



---
## __name__
```python
from fonts import __name__
```



---
## FontEncoder
```python
from fonts import FontEncoder
```



---
## as_font
```python
from fonts import as_font
```



---
## Font
```python
from fonts import Font
```



---
## GoogleFont
```python
from fonts import GoogleFont
```



---
## default
```python
from fonts import default
```



---
## __init__
```python
from fonts import __init__
```



---
## __str__
```python
from fonts import __str__
```



---
## stylesheet
```python
from fonts import stylesheet
```



---
## __eq__
```python
from fonts import __eq__
```



---
## __repr__
```python
from fonts import __repr__
```



---
## __name__
```python
from semver_match import __name__
```



---
## ThemeAsset
```python
from semver_match import ThemeAsset
```



---
## get_theme_assets
```python
from semver_match import get_theme_assets
```



---
## get_matching_version
```python
from semver_match import get_matching_version
```



---
## __post_init__
```python
from semver_match import __post_init__
```



---
## Color
```python
from colors import Color
```



---
## expand
```python
from colors import expand
```



---
## __name__
```python
from configuration import __name__
```



---
## _normalize_name
```python
from configuration import _normalize_name
```

Make a name consistent regardless of source (environment or file)

---
## _disassemble_key
```python
from configuration import _disassemble_key
```



---
## get_configuration_files
```python
from configuration import get_configuration_files
```



---
## Configuration
```python
from configuration import Configuration
```

Handles management of configuration.

Provides an interface to accessing and managing configuration files.

This class converts provides an API that takes "section.key-name" style
keys and stores the value associated with it as "key-name" under the
section "section".

This allows for a clean interface wherein the both the section and the
key-name are preserved in an easy to manage form in the configuration files
and the data stored is also nice.

---
## __init__
```python
from configuration import __init__
```



---
## load
```python
from configuration import load
```

Loads configuration from configuration files and environment

---
## get_file_to_edit
```python
from configuration import get_file_to_edit
```

Returns the file with highest priority in configuration

---
## items
```python
from configuration import items
```

Returns key-value pairs like dict.items() representing the loaded
configuration

---
## get_value
```python
from configuration import get_value
```

Get a value from the configuration.

---
## set_value
```python
from configuration import set_value
```

Modify a value in the configuration.

---
## unset_value
```python
from configuration import unset_value
```

Unset a value in the configuration.

---
## save
```python
from configuration import save
```

Save the current in-memory state.

---
## _ensure_have_load_only
```python
from configuration import _ensure_have_load_only
```



---
## _dictionary
```python
from configuration import _dictionary
```

A dictionary representing the loaded configuration.

---
## _load_config_files
```python
from configuration import _load_config_files
```

Loads configuration from configuration files

---
## _load_file
```python
from configuration import _load_file
```



---
## _construct_parser
```python
from configuration import _construct_parser
```



---
## _load_environment_vars
```python
from configuration import _load_environment_vars
```

Loads configuration from environment variables

---
## _normalized_keys
```python
from configuration import _normalized_keys
```

Normalizes items to construct a dictionary with normalized keys.

This routine is where the names become keys and are made the same
regardless of source - configuration files or environment.

---
## get_environ_vars
```python
from configuration import get_environ_vars
```

Returns a generator with all environmental vars with prefix PIP_

---
## iter_config_files
```python
from configuration import iter_config_files
```

Yields variant and configuration files associated with it.

This should be treated like items of a dictionary. The order
here doesn't affect what gets overridden. That is controlled
by OVERRIDE_ORDER. However this does control the order they are
displayed to the user. It's probably most ergononmic to display
things in the same order as OVERRIDE_ORDER

---
## get_values_in_config
```python
from configuration import get_values_in_config
```

Get values present in a config file

---
## _get_parser_to_modify
```python
from configuration import _get_parser_to_modify
```



---
## _mark_as_modified
```python
from configuration import _mark_as_modified
```



---
## __repr__
```python
from configuration import __repr__
```



---
## __name__
```python
from pyproject import __name__
```



---
## _is_list_of_str
```python
from pyproject import _is_list_of_str
```



---
## make_pyproject_path
```python
from pyproject import make_pyproject_path
```



---
## load_pyproject_toml
```python
from pyproject import load_pyproject_toml
```

Load the pyproject.toml file.

Parameters:
    use_pep517 - Has the user requested PEP 517 processing? None
                 means the user hasn't explicitly specified.
    pyproject_toml - Location of the project's pyproject.toml file
    setup_py - Location of the project's setup.py file
    req_name - The name of the requirement we're processing (for
               error reporting)

Returns:
    None if we should use the legacy code path, otherwise a tuple
    (
        requirements from pyproject.toml,
        name of PEP 517 backend,
        requirements we should check are installed after setting
            up the build environment
        directory paths to import the backend from (backend-path),
            relative to the project root.
    )

---
## _hash_dict
```python
from cache import _hash_dict
```

Return a stable sha224 of a dictionary.

---
## SimpleWheelCache
```python
from cache import SimpleWheelCache
```

A cache of wheels for future installs.

---
## EphemWheelCache
```python
from cache import EphemWheelCache
```

A SimpleWheelCache that creates it's own temporary cache directory

---
## CacheEntry
```python
from cache import CacheEntry
```



---
## WheelCache
```python
from cache import WheelCache
```

Wraps EphemWheelCache and SimpleWheelCache into a single Cache

This Cache allows for gracefully degradation, using the ephem wheel cache
when a certain link is not found in the simple wheel cache first.

---
## _get_cache_path_parts
```python
from cache import _get_cache_path_parts
```

Get parts of part that must be os.path.joined with cache_dir

---
## _get_candidates
```python
from cache import _get_candidates
```



---
## get_path_for_link
```python
from cache import get_path_for_link
```



---
## get
```python
from cache import get
```



---
## get_ephem_path_for_link
```python
from cache import get_ephem_path_for_link
```



---
## get_cache_entry
```python
from cache import get_cache_entry
```

Returns a CacheEntry with a link to a cached item if it exists or
None. The cache entry indicates if the item was found in the persistent
or ephemeral cache.

---
## record_download_origin
```python
from cache import record_download_origin
```



---
## _is_kebab_case
```python
from exceptions import _is_kebab_case
```



---
## _prefix_with_indent
```python
from exceptions import _prefix_with_indent
```



---
## PipError
```python
from exceptions import PipError
```

The base pip error.

---
## DiagnosticPipError
```python
from exceptions import DiagnosticPipError
```

An error, that presents diagnostic information to the user.

This contains a bunch of logic, to enable pretty presentation of our error
messages. Each error gets a unique reference. Each error can also include
additional context, a hint and/or a note -- which are presented with the
main error message in a consistent style.

This is adapted from the error output styling in `sphinx-theme-builder`.

---
## InstallationError
```python
from exceptions import InstallationError
```

General exception during installation

---
## MissingPyProjectBuildRequires
```python
from exceptions import MissingPyProjectBuildRequires
```

Raised when pyproject.toml has `build-system`, but no `build-system.requires`.

---
## InvalidPyProjectBuildRequires
```python
from exceptions import InvalidPyProjectBuildRequires
```

Raised when pyproject.toml an invalid `build-system.requires`.

---
## NoneMetadataError
```python
from exceptions import NoneMetadataError
```

Raised when accessing a Distribution's "METADATA" or "PKG-INFO".

This signifies an inconsistency, when the Distribution claims to have
the metadata file (if not, raise ``FileNotFoundError`` instead), but is
not actually able to produce its content. This may be due to permission
errors.

---
## UserInstallationInvalid
```python
from exceptions import UserInstallationInvalid
```

A --user install is requested on an environment without user site.

---
## InvalidSchemeCombination
```python
from exceptions import InvalidSchemeCombination
```



---
## DistributionNotFound
```python
from exceptions import DistributionNotFound
```

Raised when a distribution cannot be found to satisfy a requirement

---
## RequirementsFileParseError
```python
from exceptions import RequirementsFileParseError
```

Raised when a general error occurs parsing a requirements file line.

---
## BestVersionAlreadyInstalled
```python
from exceptions import BestVersionAlreadyInstalled
```

Raised when the most up-to-date version of a package is already
installed.

---
## BadCommand
```python
from exceptions import BadCommand
```

Raised when virtualenv or a command is not found

---
## CommandError
```python
from exceptions import CommandError
```

Raised when there is an error in command-line arguments

---
## PreviousBuildDirError
```python
from exceptions import PreviousBuildDirError
```

Raised when there's a previous conflicting build directory

---
## NetworkConnectionError
```python
from exceptions import NetworkConnectionError
```

HTTP connection error

---
## InvalidWheelFilename
```python
from exceptions import InvalidWheelFilename
```

Invalid wheel filename.

---
## UnsupportedWheel
```python
from exceptions import UnsupportedWheel
```

Unsupported wheel.

---
## InvalidWheel
```python
from exceptions import InvalidWheel
```

Invalid (e.g. corrupt) wheel.

---
## MetadataInconsistent
```python
from exceptions import MetadataInconsistent
```

Built metadata contains inconsistent information.

This is raised when the metadata contains values (e.g. name and version)
that do not match the information previously obtained from sdist filename,
user-supplied ``#egg=`` value, or an install requirement name.

---
## MetadataInvalid
```python
from exceptions import MetadataInvalid
```

Metadata is invalid.

---
## InstallationSubprocessError
```python
from exceptions import InstallationSubprocessError
```

A subprocess call failed.

---
## MetadataGenerationFailed
```python
from exceptions import MetadataGenerationFailed
```



---
## HashErrors
```python
from exceptions import HashErrors
```

Multiple HashError instances rolled into one for reporting

---
## HashError
```python
from exceptions import HashError
```

A failure to verify a package against known-good hashes

:cvar order: An int sorting hash exception classes by difficulty of
    recovery (lower being harder), so the user doesn't bother fretting
    about unpinned packages when he has deeper issues, like VCS
    dependencies, to deal with. Also keeps error reports in a
    deterministic order.
:cvar head: A section heading for display above potentially many
    exceptions of this kind
:ivar req: The InstallRequirement that triggered this error. This is
    pasted on after the exception is instantiated, because it's not
    typically available earlier.

---
## VcsHashUnsupported
```python
from exceptions import VcsHashUnsupported
```

A hash was provided for a version-control-system-based requirement, but
we don't have a method for hashing those.

---
## DirectoryUrlHashUnsupported
```python
from exceptions import DirectoryUrlHashUnsupported
```

A hash was provided for a version-control-system-based requirement, but
we don't have a method for hashing those.

---
## HashMissing
```python
from exceptions import HashMissing
```

A hash was needed for a requirement but is absent.

---
## HashUnpinned
```python
from exceptions import HashUnpinned
```

A requirement had a hash specified but was not pinned to a specific
version.

---
## HashMismatch
```python
from exceptions import HashMismatch
```

Distribution file hash values don't match.

:ivar package_name: The name of the package that triggered the hash
    mismatch. Feel free to write to this after the exception is raise to
    improve its error message.

---
## UnsupportedPythonVersion
```python
from exceptions import UnsupportedPythonVersion
```

Unsupported python version according to Requires-Python package
metadata.

---
## ConfigurationFileCouldNotBeLoaded
```python
from exceptions import ConfigurationFileCouldNotBeLoaded
```

When there are errors while loading a configuration file

---
## ExternallyManagedEnvironment
```python
from exceptions import ExternallyManagedEnvironment
```

The current environment is externally managed.

This is raised when the current environment is externally managed, as
defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
and displayed when the error is bubbled up to the user.

:param error: The error message read from ``EXTERNALLY-MANAGED``.

---
## UninstallMissingRecord
```python
from exceptions import UninstallMissingRecord
```



---
## LegacyDistutilsInstall
```python
from exceptions import LegacyDistutilsInstall
```



---
## __rich_console__
```python
from exceptions import __rich_console__
```



---
## append
```python
from exceptions import append
```



---
## __bool__
```python
from exceptions import __bool__
```



---
## body
```python
from exceptions import body
```



---
## _requirement_name
```python
from exceptions import _requirement_name
```

Return a description of the requirement that triggered me.

This default implementation returns long description of the req, with
line numbers

---
## _hash_comparison
```python
from exceptions import _hash_comparison
```

Return a comparison of actual and expected hash values.

Example::

       Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
                    or 123451234512345123451234512345123451234512345
            Got        bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef

---
## _iter_externally_managed_error_keys
```python
from exceptions import _iter_externally_managed_error_keys
```



---
## from_config
```python
from exceptions import from_config
```



---
## hash_then_or
```python
from exceptions import hash_then_or
```



---
## __name__
```python
from wheel_builder import __name__
```

Orchestrator for building wheels from InstallRequirements.

---
## _contains_egg_info
```python
from wheel_builder import _contains_egg_info
```

Determine whether the string looks like an egg_info.

:param s: The string to parse. E.g. foo-2.1

---
## _should_build
```python
from wheel_builder import _should_build
```

Return whether an InstallRequirement should be built into a wheel.

---
## should_build_for_wheel_command
```python
from wheel_builder import should_build_for_wheel_command
```



---
## should_build_for_install_command
```python
from wheel_builder import should_build_for_install_command
```



---
## _should_cache
```python
from wheel_builder import _should_cache
```

Return whether a built InstallRequirement can be stored in the persistent
wheel cache, assuming the wheel cache is available, and _should_build()
has determined a wheel needs to be built.

---
## _get_cache_dir
```python
from wheel_builder import _get_cache_dir
```

Return the persistent or temporary cache directory where the built
wheel need to be stored.

---
## _verify_one
```python
from wheel_builder import _verify_one
```



---
## _build_one
```python
from wheel_builder import _build_one
```

Build one wheel.

:return: The filename of the built wheel, or None if the build failed.

---
## _build_one_inside_env
```python
from wheel_builder import _build_one_inside_env
```



---
## _clean_one_legacy
```python
from wheel_builder import _clean_one_legacy
```



---
## build
```python
from wheel_builder import build
```

Build wheels.

:return: The list of InstallRequirement that succeeded to build and
    the list of InstallRequirement that failed to build.

---
## __name__
```python
from self_outdated_check import __name__
```



---
## _get_statefile_name
```python
from self_outdated_check import _get_statefile_name
```



---
## _convert_date
```python
from self_outdated_check import _convert_date
```

Convert an ISO format string to a date.

Handles the format 2020-01-22T14:24:01Z (trailing Z)
which is not supported by older versions of fromisoformat.

---
## SelfCheckState
```python
from self_outdated_check import SelfCheckState
```



---
## UpgradePrompt
```python
from self_outdated_check import UpgradePrompt
```



---
## was_installed_by_pip
```python
from self_outdated_check import was_installed_by_pip
```

Checks whether pkg was installed by pip

This is used not to display the upgrade message when pip is in fact
installed by system package manager, such as dnf on Fedora.

---
## _get_current_remote_pip_version
```python
from self_outdated_check import _get_current_remote_pip_version
```



---
## _self_version_check_logic
```python
from self_outdated_check import _self_version_check_logic
```



---
## pip_self_version_check
```python
from self_outdated_check import pip_self_version_check
```

Check for an update for pip.

Limit the frequency of checks to once per week. State is stored either in
the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
of the pip script path.

---
## __init__
```python
from self_outdated_check import __init__
```



---
## key
```python
from self_outdated_check import key
```



---
## get
```python
from self_outdated_check import get
```

Check if we have a not-outdated version loaded already.

---
## set
```python
from self_outdated_check import set
```



---
## __rich__
```python
from self_outdated_check import __rich__
```



---
## __name__
```python
from build_env import __name__
```

Build Environment used for isolation during sdist building

---
## _dedup
```python
from build_env import _dedup
```



---
## _Prefix
```python
from build_env import _Prefix
```



---
## get_runnable_pip
```python
from build_env import get_runnable_pip
```

Get a file to pass to a Python executable, to run the currently-running pip.

This is used to run a pip subprocess, for installing requirements into the build
environment.

---
## _get_system_sitepackages
```python
from build_env import _get_system_sitepackages
```

Get system site packages

Usually from site.getsitepackages,
but fallback on `get_purelib()/get_platlib()` if unavailable
(e.g. in a virtualenv created by virtualenv<20)

Returns normalized set of strings.

---
## BuildEnvironment
```python
from build_env import BuildEnvironment
```

Creates and manages an isolated environment to install build deps

---
## NoOpBuildEnvironment
```python
from build_env import NoOpBuildEnvironment
```

A no-op drop-in replacement for BuildEnvironment

---
## __init__
```python
from build_env import __init__
```



---
## __enter__
```python
from build_env import __enter__
```



---
## __exit__
```python
from build_env import __exit__
```



---
## check_requirements
```python
from build_env import check_requirements
```

Return 2 sets:
- conflicting requirements: set of (installed, wanted) reqs tuples
- missing requirements: set of reqs

---
## install_requirements
```python
from build_env import install_requirements
```



---
## _install_requirements
```python
from build_env import _install_requirements
```



---
## cleanup
```python
from build_env import cleanup
```



---
## vendored
```python
from __init__ import vendored
```



---
## Credentials
```python
from auth import Credentials
```



---
## KeyRingBaseProvider
```python
from auth import KeyRingBaseProvider
```

Keyring base provider interface

---
## KeyRingNullProvider
```python
from auth import KeyRingNullProvider
```

Keyring null provider

---
## KeyRingPythonProvider
```python
from auth import KeyRingPythonProvider
```

Keyring interface which uses locally imported `keyring`

---
## KeyRingCliProvider
```python
from auth import KeyRingCliProvider
```

Provider which uses `keyring` cli

Instead of calling the keyring package installed alongside pip
we call keyring on the command line which will enable pip to
use which ever installation of keyring is available first in
PATH.

---
## get_keyring_provider
```python
from auth import get_keyring_provider
```



---
## MultiDomainBasicAuth
```python
from auth import MultiDomainBasicAuth
```



---
## get_auth_info
```python
from auth import get_auth_info
```



---
## save_auth_info
```python
from auth import save_auth_info
```



---
## _get_password
```python
from auth import _get_password
```

Mirror the implementation of keyring.get_password using cli

---
## _set_password
```python
from auth import _set_password
```

Mirror the implementation of keyring.set_password using cli

---
## keyring_provider
```python
from auth import keyring_provider
```



---
## use_keyring
```python
from auth import use_keyring
```



---
## _get_keyring_auth
```python
from auth import _get_keyring_auth
```

Return the tuple auth for a given url from keyring.

---
## _get_index_url
```python
from auth import _get_index_url
```

Return the original index URL matching the requested URL.

Cached or dynamically generated credentials may work against
the original index URL rather than just the netloc.

The provided url should have had its username and password
removed already. If the original index url had credentials then
they will be included in the return value.

Returns None if no matching index was found, or if --no-index
was specified by the user.

---
## _get_new_credentials
```python
from auth import _get_new_credentials
```

Find and return credentials for the specified URL.

---
## _get_url_and_credentials
```python
from auth import _get_url_and_credentials
```

Return the credentials to use for the provided URL.

If allowed, netrc and keyring may be used to obtain the
correct credentials.

Returns (url_without_credentials, username, password). Note
that even if the original URL contains credentials, this
function may return a different username and password.

---
## _prompt_for_password
```python
from auth import _prompt_for_password
```



---
## _should_save_password_to_keyring
```python
from auth import _should_save_password_to_keyring
```



---
## warn_on_401
```python
from auth import warn_on_401
```

Response callback to warn about incorrect credentials.

---
## save_credentials
```python
from auth import save_credentials
```

Response callback to save credentials on success.

---
## PATH_as_shutil_which_determines_it
```python
from auth import PATH_as_shutil_which_determines_it
```



---
## __name__
```python
from xmlrpc import __name__
```

xmlrpclib.Transport implementation

---
## PipXmlrpcTransport
```python
from xmlrpc import PipXmlrpcTransport
```

Provide a `xmlrpclib.Transport` implementation via a `PipSession`
object.

---
## __init__
```python
from xmlrpc import __init__
```



---
## request
```python
from xmlrpc import request
```



---
## _get_http_response_size
```python
from download import _get_http_response_size
```



---
## _prepare_download
```python
from download import _prepare_download
```



---
## sanitize_content_filename
```python
from download import sanitize_content_filename
```

Sanitize the "filename" value from a Content-Disposition header.

---
## parse_content_disposition
```python
from download import parse_content_disposition
```

Parse the "filename" value from a Content-Disposition header, and
return the default filename if the result is empty.

---
## _get_http_response_filename
```python
from download import _get_http_response_filename
```

Get an ideal filename from the given HTTP response, falling back to
the link filename if not provided.

---
## _http_get_download
```python
from download import _http_get_download
```



---
## Downloader
```python
from download import Downloader
```



---
## BatchDownloader
```python
from download import BatchDownloader
```



---
## __call__
```python
from download import __call__
```

Download the files given by links into location.

---
## looks_like_ci
```python
from session import looks_like_ci
```

Return whether it looks like pip is running under CI.

---
## user_agent
```python
from session import user_agent
```

Return a string representing the user agent.

---
## LocalFSAdapter
```python
from session import LocalFSAdapter
```



---
## _SSLContextAdapterMixin
```python
from session import _SSLContextAdapterMixin
```

Mixin to add the ``ssl_context`` constructor argument to HTTP adapters.

The additional argument is forwarded directly to the pool manager. This allows us
to dynamically decide what SSL store to use at runtime, which is used to implement
the optional ``truststore`` backend.

---
## HTTPAdapter
```python
from session import HTTPAdapter
```



---
## CacheControlAdapter
```python
from session import CacheControlAdapter
```



---
## InsecureHTTPAdapter
```python
from session import InsecureHTTPAdapter
```



---
## InsecureCacheControlAdapter
```python
from session import InsecureCacheControlAdapter
```



---
## PipSession
```python
from session import PipSession
```



---
## send
```python
from session import send
```



---
## init_poolmanager
```python
from session import init_poolmanager
```



---
## cert_verify
```python
from session import cert_verify
```



---
## update_index_urls
```python
from session import update_index_urls
```

:param new_index_urls: New index urls to update the authentication
handler with.

---
## add_trusted_host
```python
from session import add_trusted_host
```

:param host: It is okay to provide a host that has previously been
    added.
:param source: An optional source string, for logging where the host
    string came from.

---
## iter_secure_origins
```python
from session import iter_secure_origins
```



---
## is_secure_origin
```python
from session import is_secure_origin
```



---
## request
```python
from session import request
```



---
## is_from_cache
```python
from cache import is_from_cache
```



---
## suppressed_cache_errors
```python
from cache import suppressed_cache_errors
```

If we can't access the cache then we can just skip caching and process
requests as if caching wasn't enabled.

---
## SafeFileCache
```python
from cache import SafeFileCache
```

A file based cache which is safe to use even when the target directory may
not be accessible or writable.

There is a race condition when two processes try to write and/or read the
same entry at the same time, since each entry consists of two separate
files (https://github.com/psf/cachecontrol/issues/324).  We therefore have
additional logic that makes sure that both files to be present before
returning an entry; this fixes the read side of the race condition.

For the write side, we assume that the server will only ever return the
same data for the same URL, which ought to be the case for files pip is
downloading.  PyPI does not have a mechanism to swap out a wheel for
another wheel, for example.  If this assumption is not true, the
CacheControl issue will need to be fixed.

---
## _get_cache_path
```python
from cache import _get_cache_path
```



---
## _write
```python
from cache import _write
```



---
## set
```python
from cache import set
```



---
## delete
```python
from cache import delete
```



---
## get_body
```python
from cache import get_body
```

Return the body as file-like object.

---
## set_body
```python
from cache import set_body
```



---
## raise_for_status
```python
from utils import raise_for_status
```



---
## response_chunks
```python
from utils import response_chunks
```

Given a requests Response, provide the data chunks.

---
## __name__
```python
from lazy_wheel import __name__
```

Lazy ZIP over HTTP

---
## HTTPRangeRequestUnsupported
```python
from lazy_wheel import HTTPRangeRequestUnsupported
```



---
## dist_from_wheel_url
```python
from lazy_wheel import dist_from_wheel_url
```

Return a distribution object from the given wheel URL.

This uses HTTP range requests to only fetch the portion of the wheel
containing metadata, just enough for the object to be constructed.
If such requests are not supported, HTTPRangeRequestUnsupported
is raised.

---
## LazyZipOverHTTP
```python
from lazy_wheel import LazyZipOverHTTP
```

File-like object mapped to a ZIP file over HTTP.

This uses HTTP range requests to lazily fetch the file's content,
which is supposed to be fed to ZipFile.  If such requests are not
supported by the server, raise HTTPRangeRequestUnsupported
during initialization.

---
## __init__
```python
from lazy_wheel import __init__
```



---
## mode
```python
from lazy_wheel import mode
```

Opening mode, which is always rb.

---
## name
```python
from lazy_wheel import name
```

Path to the underlying file.

---
## seekable
```python
from lazy_wheel import seekable
```

Return whether random access is supported, which is True.

---
## close
```python
from lazy_wheel import close
```

Close the file.

---
## closed
```python
from lazy_wheel import closed
```

Whether the file is closed.

---
## read
```python
from lazy_wheel import read
```

Read up to size bytes from the object and return them.

As a convenience, if size is unspecified or -1,
all bytes until EOF are returned.  Fewer than
size bytes may be returned if EOF is reached.

---
## readable
```python
from lazy_wheel import readable
```

Return whether the file is readable, which is True.

---
## seek
```python
from lazy_wheel import seek
```

Change stream position and return the new absolute position.

Seek to offset relative position indicated by whence:
* 0: Start of stream (the default).  pos should be >= 0;
* 1: Current position - pos may be negative;
* 2: End of stream - pos usually negative.

---
## tell
```python
from lazy_wheel import tell
```

Return the current position.

---
## truncate
```python
from lazy_wheel import truncate
```

Resize the stream to the given size in bytes.

If size is unspecified resize to the current position.
The current stream position isn't changed.

Return the new file size.

---
## writable
```python
from lazy_wheel import writable
```

Return False.

---
## __enter__
```python
from lazy_wheel import __enter__
```



---
## __exit__
```python
from lazy_wheel import __exit__
```



---
## _stay
```python
from lazy_wheel import _stay
```

Return a context manager keeping the position.

At the end of the block, seek back to original position.

---
## _check_zip
```python
from lazy_wheel import _check_zip
```

Check and download until the file is a valid ZIP.

---
## _stream_response
```python
from lazy_wheel import _stream_response
```

Return HTTP response to a range request from start to end.

---
## _merge
```python
from lazy_wheel import _merge
```

Return a generator of intervals to be fetched.

Args:
    start (int): Start of needed interval
    end (int): End of needed interval
    left (int): Index of first overlapping downloaded data
    right (int): Index after last overlapping downloaded data

---
## _download
```python
from lazy_wheel import _download
```

Download bytes from start to end inclusively.

---
## BrokenStdoutLoggingError
```python
from logging import BrokenStdoutLoggingError
```

Raised if BrokenPipeError occurs for the stdout stream while logging.

---
## _is_broken_pipe_error
```python
from logging import _is_broken_pipe_error
```



---
## indent_log
```python
from logging import indent_log
```

A context manager which will cause the log output to be indented for any
log messages emitted inside it.

---
## get_indentation
```python
from logging import get_indentation
```



---
## IndentingFormatter
```python
from logging import IndentingFormatter
```



---
## IndentedRenderable
```python
from logging import IndentedRenderable
```



---
## RichPipStreamHandler
```python
from logging import RichPipStreamHandler
```



---
## BetterRotatingFileHandler
```python
from logging import BetterRotatingFileHandler
```



---
## MaxLevelFilter
```python
from logging import MaxLevelFilter
```



---
## ExcludeLoggerFilter
```python
from logging import ExcludeLoggerFilter
```

A logging Filter that excludes records from a logger (or its children).

---
## setup_logging
```python
from logging import setup_logging
```

Configures and sets up all of the logging

Returns the requested logging level, as its integer value.

---
## get_message_start
```python
from logging import get_message_start
```

Return the start of the formatted log message (not counting the
prefix to add to each line).

---
## __rich_console__
```python
from logging import __rich_console__
```



---
## _open
```python
from logging import _open
```



---
## filter
```python
from logging import filter
```



---
## get_pip_version
```python
from misc import get_pip_version
```



---
## normalize_version_info
```python
from misc import normalize_version_info
```

Convert a tuple of ints representing a Python version to one of length
three.

:param py_version_info: a tuple of ints representing a Python version,
    or None to specify no version. The tuple can have any length.

:return: a tuple of length three if `py_version_info` is non-None.
    Otherwise, return `py_version_info` unchanged (i.e. None).

---
## ensure_dir
```python
from misc import ensure_dir
```

os.path.makedirs without EEXIST.

---
## get_prog
```python
from misc import get_prog
```



---
## rmtree
```python
from misc import rmtree
```



---
## _onerror_ignore
```python
from misc import _onerror_ignore
```



---
## _onerror_reraise
```python
from misc import _onerror_reraise
```



---
## rmtree_errorhandler
```python
from misc import rmtree_errorhandler
```

`rmtree` error handler to 'force' a file remove (i.e. like `rm -f`).

* If a file is readonly then it's write flag is set and operation is
  retried.

* `onerror` is the original callback from `rmtree(... onerror=onerror)`
  that is chained at the end if the "rm -f" still fails.

---
## display_path
```python
from misc import display_path
```

Gives the display value for a given path, making it relative to cwd
if possible.

---
## backup_dir
```python
from misc import backup_dir
```

Figure out the name of a directory to back up the given dir to
(adding .bak, .bak2, etc)

---
## ask_path_exists
```python
from misc import ask_path_exists
```



---
## _check_no_input
```python
from misc import _check_no_input
```

Raise an error if no input is allowed.

---
## ask
```python
from misc import ask
```

Ask the message interactively, with the given possible responses

---
## ask_input
```python
from misc import ask_input
```

Ask for input interactively.

---
## ask_password
```python
from misc import ask_password
```

Ask for a password interactively.

---
## strtobool
```python
from misc import strtobool
```

Convert a string representation of truth to true (1) or false (0).

True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
'val' is anything else.

---
## format_size
```python
from misc import format_size
```



---
## tabulate
```python
from misc import tabulate
```

Return a list of formatted rows and a list of column sizes.

For example::

>>> tabulate([['foobar', 2000], [0xdeadbeef]])
(['foobar     2000', '3735928559'], [10, 4])

---
## is_installable_dir
```python
from misc import is_installable_dir
```

Is path is a directory containing pyproject.toml or setup.py?

If pyproject.toml exists, this is a PEP 517 project. Otherwise we look for
a legacy setuptools layout by identifying setup.py. We don't check for the
setup.cfg because using it without setup.py is only available for PEP 517
projects, which are already covered by the pyproject.toml check.

---
## read_chunks
```python
from misc import read_chunks
```

Yield pieces of data from a file-like object until EOF.

---
## normalize_path
```python
from misc import normalize_path
```

Convert a path to its canonical, case-normalized, absolute version.

---
## splitext
```python
from misc import splitext
```

Like os.path.splitext, but take off .tar too

---
## renames
```python
from misc import renames
```

Like os.renames(), but handles renaming across devices.

---
## is_local
```python
from misc import is_local
```

Return True if path is within sys.prefix, if we're running in a virtualenv.

If we're not in a virtualenv, all paths are considered "local."

Caution: this function assumes the head of path has been normalized
with normalize_path.

---
## write_output
```python
from misc import write_output
```



---
## StreamWrapper
```python
from misc import StreamWrapper
```



---
## enum
```python
from misc import enum
```



---
## build_netloc
```python
from misc import build_netloc
```

Build a netloc from a host-port pair

---
## build_url_from_netloc
```python
from misc import build_url_from_netloc
```

Build a full URL from a netloc.

---
## parse_netloc
```python
from misc import parse_netloc
```

Return the host-port pair from a netloc.

---
## split_auth_from_netloc
```python
from misc import split_auth_from_netloc
```

Parse out and remove the auth information from a netloc.

Returns: (netloc, (username, password)).

---
## redact_netloc
```python
from misc import redact_netloc
```

Replace the sensitive data in a netloc with "****", if it exists.

For example:
    - "user:pass@example.com" returns "user:****@example.com"
    - "accesstoken@example.com" returns "****@example.com"

---
## _transform_url
```python
from misc import _transform_url
```

Transform and replace netloc in a url.

transform_netloc is a function taking the netloc and returning a
tuple. The first element of this tuple is the new netloc. The
entire tuple is returned.

Returns a tuple containing the transformed url as item 0 and the
original tuple returned by transform_netloc as item 1.

---
## _get_netloc
```python
from misc import _get_netloc
```



---
## _redact_netloc
```python
from misc import _redact_netloc
```



---
## split_auth_netloc_from_url
```python
from misc import split_auth_netloc_from_url
```

Parse a url into separate netloc, auth, and url with no auth.

Returns: (url_without_auth, netloc, (username, password))

---
## remove_auth_from_url
```python
from misc import remove_auth_from_url
```

Return a copy of url with 'username:password@' removed.

---
## redact_auth_from_url
```python
from misc import redact_auth_from_url
```

Replace the password in a given url with ****.

---
## redact_auth_from_requirement
```python
from misc import redact_auth_from_requirement
```

Replace the password in a given requirement url with ****.

---
## HiddenText
```python
from misc import HiddenText
```



---
## hide_value
```python
from misc import hide_value
```



---
## hide_url
```python
from misc import hide_url
```



---
## protect_pip_from_modification_on_windows
```python
from misc import protect_pip_from_modification_on_windows
```

Protection of pip.exe from modification on Windows

On Windows, any operation modifying pip should be run as:
    python -m pip ...

---
## check_externally_managed
```python
from misc import check_externally_managed
```

Check whether the current environment is externally managed.

If the ``EXTERNALLY-MANAGED`` config file is found, the current environment
is considered externally managed, and an ExternallyManagedEnvironment is
raised.

---
## is_console_interactive
```python
from misc import is_console_interactive
```

Is this console interactive?

---
## hash_file
```python
from misc import hash_file
```

Return (hash, length) for path using hashlib.sha256()

---
## pairwise
```python
from misc import pairwise
```

Return paired elements.

For example:
    s -> (s0, s1), (s2, s3), (s4, s5), ...

---
## partition
```python
from misc import partition
```

Use a predicate to partition entries into false entries and true entries,
like

    partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9

---
## ConfiguredBuildBackendHookCaller
```python
from misc import ConfiguredBuildBackendHookCaller
```



---
## warn_if_run_as_root
```python
from misc import warn_if_run_as_root
```

Output a warning for sudo users on Unix.

In a virtual environment, sudo pip still writes to virtualenv.
On Windows, users may run pip as Administrator without issues.
This warning only applies to Unix root users outside of virtualenv.

---
## from_stream
```python
from misc import from_stream
```



---
## encoding
```python
from misc import encoding
```



---
## __repr__
```python
from misc import __repr__
```



---
## __str__
```python
from misc import __str__
```



---
## __eq__
```python
from misc import __eq__
```



---
## build_wheel
```python
from misc import build_wheel
```



---
## build_sdist
```python
from misc import build_sdist
```



---
## build_editable
```python
from misc import build_editable
```



---
## get_requires_for_build_wheel
```python
from misc import get_requires_for_build_wheel
```



---
## get_requires_for_build_sdist
```python
from misc import get_requires_for_build_sdist
```



---
## get_requires_for_build_editable
```python
from misc import get_requires_for_build_editable
```



---
## prepare_metadata_for_build_wheel
```python
from misc import prepare_metadata_for_build_wheel
```



---
## prepare_metadata_for_build_editable
```python
from misc import prepare_metadata_for_build_editable
```



---
## __name__
```python
from egg_link import __name__
```



---
## _egg_link_names
```python
from egg_link import _egg_link_names
```

Convert a Name metadata value to a .egg-link name, by applying
the same substitution as pkg_resources's safe_name function.
Note: we cannot use canonicalize_name because it has a different logic.

We also look for the raw name (without normalization) as setuptools 69 changed
the way it names .egg-link files (https://github.com/pypa/setuptools/issues/4167).

---
## egg_link_path_from_sys_path
```python
from egg_link import egg_link_path_from_sys_path
```

Look for a .egg-link file for project name, by walking sys.path.

---
## egg_link_path_from_location
```python
from egg_link import egg_link_path_from_location
```

Return the path for the .egg-link file if it exists, otherwise, None.

There's 3 scenarios:
1) not in a virtualenv
   try to find in site.USER_SITE, then site_packages
2) in a no-global virtualenv
   try to find in site_packages
3) in a yes-global virtualenv
   try to find in site_packages, then site.USER_SITE
   (don't look in global location)

For #1 and #3, there could be odd cases, where there's an egg-link in 2
locations.

This method will just return the first one found.

---
## has_tls
```python
from compat import has_tls
```



---
## get_path_uid
```python
from compat import get_path_uid
```

Return path's uid.

Does not follow symlinks:
    https://github.com/pypa/pip/pull/935#discussion_r5307003

Placed this function in compat due to differences on AIX and
Jython, that should eventually go away.

:raises OSError: When path is a symlink or can't be read.

---
## open_text_resource
```python
from compat import open_text_resource
```



---
## __name__
```python
from encoding import __name__
```



---
## auto_decode
```python
from encoding import auto_decode
```

Check a bytes string for a BOM to correctly detect the encoding

Fallback to locale.getpreferredencoding(False) like open() on Python3

---
## PipDeprecationWarning
```python
from deprecation import PipDeprecationWarning
```



---
## _showwarning
```python
from deprecation import _showwarning
```



---
## install_warning_logger
```python
from deprecation import install_warning_logger
```



---
## __name__
```python
from subprocess import __name__
```



---
## make_command
```python
from subprocess import make_command
```

Create a CommandArgs object.

---
## format_command_args
```python
from subprocess import format_command_args
```

Format command arguments for display.

---
## reveal_command_args
```python
from subprocess import reveal_command_args
```

Return the arguments in their raw, unredacted form.

---
## call_subprocess
```python
from subprocess import call_subprocess
```

Args:
show_stdout: if true, use INFO to log the subprocess's stderr and
  stdout streams.  Otherwise, use DEBUG.  Defaults to False.
extra_ok_returncodes: an iterable of integer return codes that are
  acceptable, in addition to 0. Defaults to None, which means [].
unset_environ: an iterable of environment variable names to unset
  prior to calling subprocess.Popen().
log_failed_cmd: if false, failed commands are not logged, only raised.
stdout_only: if true, return only stdout, else return both. When true,
  logging of both stdout and stderr occurs when the subprocess has
  terminated, else logging occurs as subprocess output is produced.

---
## runner_with_spinner_message
```python
from subprocess import runner_with_spinner_message
```

Provide a subprocess_runner that shows a spinner message.

Intended for use with for BuildBackendHookCaller. Thus, the runner has
an API that matches what's expected by BuildBackendHookCaller.subprocess_runner.

---
## runner
```python
from subprocess import runner
```



---
## __name__
```python
from filesystem import __name__
```



---
## check_path_owner
```python
from filesystem import check_path_owner
```



---
## adjacent_tmp_file
```python
from filesystem import adjacent_tmp_file
```

Return a file-like object pointing to a tmp file next to path.

The file is created securely and is ensured to be written to disk
after the context reaches its end.

kwargs will be passed to tempfile.NamedTemporaryFile to control
the way the temporary file will be opened.

---
## test_writable_dir
```python
from filesystem import test_writable_dir
```

Check if a directory is writable.

Uses os.access() on POSIX, tries creating files on Windows.

---
## _test_writable_dir_win
```python
from filesystem import _test_writable_dir_win
```



---
## find_files
```python
from filesystem import find_files
```

Returns a list of absolute paths of files beneath path, recursively,
with filenames which match the UNIX-style shell glob pattern.

---
## file_size
```python
from filesystem import file_size
```



---
## format_file_size
```python
from filesystem import format_file_size
```



---
## directory_size
```python
from filesystem import directory_size
```



---
## format_directory_size
```python
from filesystem import format_directory_size
```



---
## __name__
```python
from direct_url_helpers import __name__
```



---
## direct_url_as_pep440_direct_reference
```python
from direct_url_helpers import direct_url_as_pep440_direct_reference
```

Convert a DirectUrl to a pip requirement string.

---
## direct_url_for_editable
```python
from direct_url_helpers import direct_url_for_editable
```



---
## direct_url_from_link
```python
from direct_url_helpers import direct_url_from_link
```



---
## __name__
```python
from _jaraco_text import __name__
```

Functions brought over from jaraco.text.

These functions are not supposed to be used within `pip._internal`. These are
helper functions brought over from `jaraco.text` to enable vendoring newer
copies of `pkg_resources` without having to vendor `jaraco.text` and its entire
dependency cone; something that our vendoring setup is not currently capable of
handling.

License reproduced from original source below:

Copyright Jason R. Coombs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

---
## _nonblank
```python
from _jaraco_text import _nonblank
```



---
## yield_lines
```python
from _jaraco_text import yield_lines
```

Yield valid lines of a string or iterable.

>>> list(yield_lines(''))
[]
>>> list(yield_lines(['foo', 'bar']))
['foo', 'bar']
>>> list(yield_lines('foo\nbar'))
['foo', 'bar']
>>> list(yield_lines('\nfoo\n#bar\nbaz #comment'))
['foo', 'baz #comment']
>>> list(yield_lines(['foo\nbar', 'baz', 'bing\n\n\n']))
['foo', 'bar', 'baz', 'bing']

---
## _
```python
from _jaraco_text import _
```



---
## drop_comment
```python
from _jaraco_text import drop_comment
```

Drop comments.

>>> drop_comment('foo # bar')
'foo'

A hash without a space may be in a URL.

>>> drop_comment('http://example.com/foo#bar')
'http://example.com/foo#bar'

---
## join_continuation
```python
from _jaraco_text import join_continuation
```

Join lines continued by a trailing backslash.

>>> list(join_continuation(['foo \\', 'bar', 'baz']))
['foobar', 'baz']
>>> list(join_continuation(['foo \\', 'bar', 'baz']))
['foobar', 'baz']
>>> list(join_continuation(['foo \\', 'bar \\', 'baz']))
['foobarbaz']

Not sure why, but...
The character preceding the backslash is also elided.

>>> list(join_continuation(['goo\\', 'dly']))
['godly']

A terrible idea, but...
If no line is available to continue, suppress the lines.

>>> list(join_continuation(['foo', 'bar\\', 'baz\\']))
['foo']

---
## __name__
```python
from temp_dir import __name__
```



---
## global_tempdir_manager
```python
from temp_dir import global_tempdir_manager
```



---
## TempDirectoryTypeRegistry
```python
from temp_dir import TempDirectoryTypeRegistry
```

Manages temp directory behavior

---
## tempdir_registry
```python
from temp_dir import tempdir_registry
```

Provides a scoped global tempdir registry that can be used to dictate
whether directories should be deleted.

---
## _Default
```python
from temp_dir import _Default
```



---
## TempDirectory
```python
from temp_dir import TempDirectory
```

Helper class that owns and cleans up a temporary directory.

This class can be used as a context manager or as an OO representation of a
temporary directory.

Attributes:
    path
        Location to the created temporary directory
    delete
        Whether the directory should be deleted when exiting
        (when used as a contextmanager)

Methods:
    cleanup()
        Deletes the temporary directory

When used as a context manager, if the delete attribute is True, on
exiting the context the temporary directory is deleted.

---
## AdjacentTempDirectory
```python
from temp_dir import AdjacentTempDirectory
```

Helper class that creates a temporary directory adjacent to a real one.

Attributes:
    original
        The original directory to create a temp directory for.
    path
        After calling create() or entering, contains the full
        path to the temporary directory.
    delete
        Whether the directory should be deleted when exiting
        (when used as a contextmanager)

---
## __init__
```python
from temp_dir import __init__
```



---
## set_delete
```python
from temp_dir import set_delete
```

Indicate whether a TempDirectory of the given kind should be
auto-deleted.

---
## get_delete
```python
from temp_dir import get_delete
```

Get configured auto-delete flag for a given TempDirectory type,
default True.

---
## path
```python
from temp_dir import path
```



---
## __repr__
```python
from temp_dir import __repr__
```



---
## __enter__
```python
from temp_dir import __enter__
```



---
## __exit__
```python
from temp_dir import __exit__
```



---
## _create
```python
from temp_dir import _create
```



---
## cleanup
```python
from temp_dir import cleanup
```

Remove the temporary directory created and reset state

---
## _generate_names
```python
from temp_dir import _generate_names
```

Generates a series of temporary names.

The algorithm replaces the leading characters in the name
with ones that are valid filesystem characters, but are not
valid package names (for both Python and pip definitions of
package).

---
## onerror
```python
from temp_dir import onerror
```

Log a warning for a `rmtree` error and continue

---
## __name__
```python
from retry import __name__
```



---
## retry
```python
from retry import retry
```

Decorator to automatically retry a function on error.

If the function raises, the function is recalled with the same arguments
until it returns or the time limit is reached. When the time limit is
surpassed, the last exception raised is reraised.

:param wait: The time to wait after an error before retrying, in seconds.
:param stop_after_delay: The time limit after which retries will cease,
    in seconds.

---
## wrapper
```python
from retry import wrapper
```



---
## retry_wrapped
```python
from retry import retry_wrapped
```



---
## __name__
```python
from appdirs import __name__
```

This code wraps the vendored appdirs module to so the return values are
compatible for the current pip code base.

The intention is to rewrite current usages gradually, keeping the tests pass,
and eventually drop this after all usages are changed.

---
## user_cache_dir
```python
from appdirs import user_cache_dir
```



---
## _macos_user_config_dir
```python
from appdirs import _macos_user_config_dir
```



---
## user_config_dir
```python
from appdirs import user_config_dir
```



---
## site_config_dirs
```python
from appdirs import site_config_dirs
```



---
## __name__
```python
from setuptools_build import __name__
```



---
## make_setuptools_shim_args
```python
from setuptools_build import make_setuptools_shim_args
```

Get setuptools command arguments with shim wrapped setup file invocation.

:param setup_py_path: The path to setup.py to be wrapped.
:param global_options: Additional global options.
:param no_user_config: If True, disables personal user configuration.
:param unbuffered_output: If True, adds the unbuffered switch to the
 argument list.

---
## make_setuptools_bdist_wheel_args
```python
from setuptools_build import make_setuptools_bdist_wheel_args
```



---
## make_setuptools_clean_args
```python
from setuptools_build import make_setuptools_clean_args
```



---
## make_setuptools_develop_args
```python
from setuptools_build import make_setuptools_develop_args
```



---
## make_setuptools_egg_info_args
```python
from setuptools_build import make_setuptools_egg_info_args
```



---
## __name__
```python
from packaging import __name__
```



---
## check_requires_python
```python
from packaging import check_requires_python
```

Check if the given Python version matches a "Requires-Python" specifier.

:param version_info: A 3-tuple of ints representing a Python
    major-minor-micro version to check (e.g. `sys.version_info[:3]`).

:return: `True` if the given Python version satisfies the requirement.
    Otherwise, return `False`.

:raises InvalidSpecifier: If `requires_python` has an invalid format.

---
## get_requirement
```python
from packaging import get_requirement
```

Construct a packaging.Requirement object with caching

---
## safe_extra
```python
from packaging import safe_extra
```

Convert an arbitrary string to a standard 'extra' name

Any runs of non-alphanumeric characters are replaced with a single '_',
and the result is always lowercased.

This function is duplicated from ``pkg_resources``. Note that this is not
the same to either ``canonicalize_name`` or ``_egg_link_name``.

---
## __name__
```python
from entrypoints import __name__
```



---
## _wrapper
```python
from entrypoints import _wrapper
```

Central wrapper for all old entrypoints.

Historically pip has had several entrypoints defined. Because of issues
arising from PATH, sys.path, multiple Pythons, their interactions, and most
of them having a pip installed, users suffer every time an entrypoint gets
moved.

To alleviate this pain, and provide a mechanism for warning users and
directing them to an appropriate place for help, we now define all of
our old entrypoints as wrappers for the current one.

---
## get_best_invocation_for_this_pip
```python
from entrypoints import get_best_invocation_for_this_pip
```

Try to figure out the best way to invoke pip in the current environment.

---
## get_best_invocation_for_this_python
```python
from entrypoints import get_best_invocation_for_this_python
```

Try to figure out the best way to invoke the current Python.

---
## __name__
```python
from filetypes import __name__
```

Filetype information.

---
## is_archive_file
```python
from filetypes import is_archive_file
```

Return True if `name` is a considered as an archive file.

---
## __name__
```python
from compatibility_tags import __name__
```

Generate and work with PEP 425 Compatibility Tags.

---
## version_info_to_nodot
```python
from compatibility_tags import version_info_to_nodot
```



---
## _mac_platforms
```python
from compatibility_tags import _mac_platforms
```



---
## _custom_manylinux_platforms
```python
from compatibility_tags import _custom_manylinux_platforms
```



---
## _get_custom_platforms
```python
from compatibility_tags import _get_custom_platforms
```



---
## _expand_allowed_platforms
```python
from compatibility_tags import _expand_allowed_platforms
```



---
## _get_python_version
```python
from compatibility_tags import _get_python_version
```



---
## _get_custom_interpreter
```python
from compatibility_tags import _get_custom_interpreter
```



---
## get_supported
```python
from compatibility_tags import get_supported
```

Return a list of supported tags for each version specified in
`versions`.

:param version: a string version, of the form "33" or "32",
    or None. The version will be assumed to support our ABI.
:param platform: specify a list of platforms you want valid
    tags for, or None. If None, use the local system platform.
:param impl: specify the exact implementation you want valid
    tags for, or None. If None, use the local interpreter impl.
:param abis: specify a list of abis you want valid
    tags for, or None. If None, use the local interpreter abi.

---
## __name__
```python
from datetime import __name__
```

For when pip wants to check the date or time.

---
## today_is_later_than
```python
from datetime import today_is_later_than
```



---
## __name__
```python
from urls import __name__
```



---
## path_to_url
```python
from urls import path_to_url
```

Convert a path to a file: URL.  The path will be made absolute and have
quoted path parts.

---
## url_to_path
```python
from urls import url_to_path
```

Convert a file: URL to a path.

---
## __name__
```python
from hashes import __name__
```



---
## Hashes
```python
from hashes import Hashes
```

A wrapper that builds multiple hashes at once and checks them against
known-good values

---
## MissingHashes
```python
from hashes import MissingHashes
```

A workalike for Hashes used when we're missing a hash for a requirement

It computes the actual hash of the requirement and raises a HashMissing
exception showing it to the user.

---
## __init__
```python
from hashes import __init__
```

Don't offer the ``hashes`` kwarg.

---
## __and__
```python
from hashes import __and__
```



---
## digest_count
```python
from hashes import digest_count
```



---
## is_hash_allowed
```python
from hashes import is_hash_allowed
```

Return whether the given hex digest is allowed.

---
## check_against_chunks
```python
from hashes import check_against_chunks
```

Check good hashes against ones built from iterable of chunks of
data.

Raise HashMismatch if none match.

---
## _raise
```python
from hashes import _raise
```



---
## check_against_file
```python
from hashes import check_against_file
```

Check good hashes against a file-like object

Raise HashMismatch if none match.

---
## check_against_path
```python
from hashes import check_against_path
```



---
## has_one_of
```python
from hashes import has_one_of
```

Return whether any of the given hashes are allowed.

---
## __bool__
```python
from hashes import __bool__
```

Return whether I know any known-good hashes.

---
## __eq__
```python
from hashes import __eq__
```



---
## __hash__
```python
from hashes import __hash__
```



---
## __name__
```python
from virtualenv import __name__
```



---
## _running_under_venv
```python
from virtualenv import _running_under_venv
```

Checks if sys.base_prefix and sys.prefix match.

This handles PEP 405 compliant virtual environments.

---
## _running_under_legacy_virtualenv
```python
from virtualenv import _running_under_legacy_virtualenv
```

Checks if sys.real_prefix is set.

This handles virtual environments created with pypa's virtualenv.

---
## running_under_virtualenv
```python
from virtualenv import running_under_virtualenv
```

True if we're running inside a virtual environment, False otherwise.

---
## _get_pyvenv_cfg_lines
```python
from virtualenv import _get_pyvenv_cfg_lines
```

Reads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines

Returns None, if it could not read/access the file.

---
## _no_global_under_venv
```python
from virtualenv import _no_global_under_venv
```

Check `{sys.prefix}/pyvenv.cfg` for system site-packages inclusion

PEP 405 specifies that when system site-packages are not supposed to be
visible from a virtual environment, `pyvenv.cfg` must contain the following
line:

    include-system-site-packages = false

Additionally, log a warning if accessing the file fails.

---
## _no_global_under_legacy_virtualenv
```python
from virtualenv import _no_global_under_legacy_virtualenv
```

Check if "no-global-site-packages.txt" exists beside site.py

This mirrors logic in pypa/virtualenv for determining whether system
site-packages are visible in the virtual environment.

---
## virtualenv_no_global
```python
from virtualenv import virtualenv_no_global
```

Returns a boolean, whether running in venv with no system site-packages.

---
## __name__
```python
from _log import __name__
```

Customize logging

Defines custom logger class for the `logger.verbose(...)` method.

init_logging() must be called before any other modules that call logging.getLogger.

---
## VerboseLogger
```python
from _log import VerboseLogger
```

Custom Logger, defining a verbose log-level

VERBOSE is between INFO and DEBUG.

---
## getLogger
```python
from _log import getLogger
```

logging.getLogger, but ensures our VerboseLogger class is returned

---
## init_logging
```python
from _log import init_logging
```

Register our VerboseLogger and VERBOSE log level.

Should be called before any calls to getLogger(),
i.e. in pip._internal.__init__

---
## verbose
```python
from _log import verbose
```



---
## __name__
```python
from glibc import __name__
```



---
## glibc_version_string
```python
from glibc import glibc_version_string
```

Returns glibc version string, or None if not using glibc.

---
## glibc_version_string_confstr
```python
from glibc import glibc_version_string_confstr
```

Primary implementation of glibc_version_string using os.confstr.

---
## glibc_version_string_ctypes
```python
from glibc import glibc_version_string_ctypes
```

Fallback implementation of glibc_version_string using ctypes.

---
## libc_ver
```python
from glibc import libc_ver
```

Try to determine the glibc version

Returns a tuple of strings (lib, version) which default to empty strings
in case the lookup fails.

---
## parse_wheel
```python
from wheel import parse_wheel
```

Extract information from the provided wheel, ensuring it meets basic
standards.

Returns the name of the .dist-info directory and the parsed WHEEL metadata.

---
## wheel_dist_info_dir
```python
from wheel import wheel_dist_info_dir
```

Returns the name of the contained .dist-info directory.

Raises AssertionError or UnsupportedWheel if not found, >1 found, or
it doesn't match the provided name.

---
## read_wheel_metadata_file
```python
from wheel import read_wheel_metadata_file
```



---
## wheel_metadata
```python
from wheel import wheel_metadata
```

Return the WHEEL metadata of an extracted wheel, if possible.
Otherwise, raise UnsupportedWheel.

---
## wheel_version
```python
from wheel import wheel_version
```

Given WHEEL metadata, return the parsed Wheel-Version.
Otherwise, raise UnsupportedWheel.

---
## check_compatibility
```python
from wheel import check_compatibility
```

Raises errors or warns if called with an incompatible Wheel-Version.

pip should refuse to install a Wheel-Version that's a major series
ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
installing a version only minor version ahead (e.g 1.2 > 1.1).

version: a 2-tuple representing a Wheel-Version (Major, Minor)
name: name of wheel or package to raise exception about

:raises UnsupportedWheel: when an incompatible Wheel-Version is given

---
## __name__
```python
from unpacking import __name__
```

Utilities related archives.

---
## current_umask
```python
from unpacking import current_umask
```

Get the current umask which involves having to set it temporarily.

---
## split_leading_dir
```python
from unpacking import split_leading_dir
```



---
## has_leading_dir
```python
from unpacking import has_leading_dir
```

Returns true if all the paths have the same leading path name
(i.e., everything is in one subdirectory in an archive)

---
## is_within_directory
```python
from unpacking import is_within_directory
```

Return true if the absolute path of target is within the directory

---
## _get_default_mode_plus_executable
```python
from unpacking import _get_default_mode_plus_executable
```



---
## set_extracted_file_to_default_mode_plus_executable
```python
from unpacking import set_extracted_file_to_default_mode_plus_executable
```

Make file present at path have execute for user/group/world
(chmod +x) is no-op on windows per python docs

---
## zip_item_is_executable
```python
from unpacking import zip_item_is_executable
```



---
## unzip_file
```python
from unpacking import unzip_file
```

Unzip the file (with path `filename`) to the destination `location`.  All
files are written based on system defaults and umask (i.e. permissions are
not preserved), except that regular file members with any execute
permissions (user, group, or world) have "chmod +x" applied after being
written. Note that for windows, any execute changes using os.chmod are
no-ops per the python docs.

---
## untar_file
```python
from unpacking import untar_file
```

Untar the file (with path `filename`) to the destination `location`.
All files are written based on system defaults and umask (i.e. permissions
are not preserved), except that regular file members with any execute
permissions (user, group, or world) have "chmod +x" applied on top of the
default.  Note that for windows, any execute changes using os.chmod are
no-ops per the python docs.

---
## _untar_without_filter
```python
from unpacking import _untar_without_filter
```

Fallback for Python without tarfile.data_filter

---
## unpack_file
```python
from unpacking import unpack_file
```



---
## pip_filter
```python
from unpacking import pip_filter
```



---
## LinkHash
```python
from link import LinkHash
```

Links to content may have embedded hash values. This class parses those.

`name` must be any member of `_SUPPORTED_HASHES`.

This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
be JSON-serializable to conform to PEP 610, this class contains the logic for
parsing a hash name and value for correctness, and then checking whether that hash
conforms to a schema with `.is_hash_allowed()`.

---
## MetadataFile
```python
from link import MetadataFile
```

Information about a core metadata file associated with a distribution.

---
## supported_hashes
```python
from link import supported_hashes
```



---
## _clean_url_path_part
```python
from link import _clean_url_path_part
```

Clean a "part" of a URL path (i.e. after splitting on "@" characters).

---
## _clean_file_url_path
```python
from link import _clean_file_url_path
```

Clean the first part of a URL path that corresponds to a local
filesystem path (i.e. the first part after splitting on "@" characters).

---
## _clean_url_path
```python
from link import _clean_url_path
```

Clean the path portion of a URL.

---
## _ensure_quoted_url
```python
from link import _ensure_quoted_url
```

Make sure a link is fully quoted.
For example, if ' ' occurs in the URL, it will be replaced with "%20",
and without double-quoting other characters.

---
## Link
```python
from link import Link
```

Represents a parsed link from a Package Index's simple URL

---
## _CleanResult
```python
from link import _CleanResult
```

Convert link for equivalency check.

This is used in the resolver to check whether two URL-specified requirements
likely point to the same distribution and can be considered equivalent. This
equivalency logic avoids comparing URLs literally, which can be too strict
(e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users.

Currently this does three things:

1. Drop the basic auth part. This is technically wrong since a server can
   serve different content based on auth, but if it does that, it is even
   impossible to guarantee two URLs without auth are equivalent, since
   the user can input different auth information when prompted. So the
   practical solution is to assume the auth doesn't affect the response.
2. Parse the query to avoid the ordering issue. Note that ordering under the
   same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are
   still considered different.
3. Explicitly drop most of the fragment part, except ``subdirectory=`` and
   hash values, since it should have no impact the downloaded content. Note
   that this drops the "egg=" part historically used to denote the requested
   project (and extras), which is wrong in the strictest sense, but too many
   people are supplying it inconsistently to cause superfluous resolution
   conflicts, so we choose to also ignore them.

---
## _clean_link
```python
from link import _clean_link
```



---
## links_equivalent
```python
from link import links_equivalent
```



---
## __post_init__
```python
from link import __post_init__
```



---
## find_hash_url_fragment
```python
from link import find_hash_url_fragment
```

Search a string for a checksum algorithm name and encoded output value.

---
## as_dict
```python
from link import as_dict
```



---
## as_hashes
```python
from link import as_hashes
```



---
## is_hash_allowed
```python
from link import is_hash_allowed
```

Return True if the link has a hash and it is allowed by `hashes`.

---
## __init__
```python
from link import __init__
```

:param url: url of the resource pointed to (href of the link)
:param comes_from: instance of IndexContent where the link was found,
    or string.
:param requires_python: String containing the `Requires-Python`
    metadata field, specified in PEP 345. This may be specified by
    a data-requires-python attribute in the HTML link tag, as
    described in PEP 503.
:param yanked_reason: the reason the file has been yanked, if the
    file has been yanked, or None if the file hasn't been yanked.
    This is the value of the "data-yanked" attribute, if present, in
    a simple repository HTML link. If the file has been yanked but
    no reason was provided, this should be the empty string. See
    PEP 592 for more information and the specification.
:param metadata_file_data: the metadata attached to the file, or None if
    no such metadata is provided. This argument, if not None, indicates
    that a separate metadata file exists, and also optionally supplies
    hashes for that file.
:param cache_link_parsing: A flag that is used elsewhere to determine
    whether resources retrieved from this link should be cached. PyPI
    URLs should generally have this set to False, for example.
:param hashes: A mapping of hash names to digests to allow us to
    determine the validity of a download.

---
## from_json
```python
from link import from_json
```

Convert an pypi json document from a simple repository page into a Link.

---
## from_element
```python
from link import from_element
```

Convert an anchor element's attributes in a simple repository page to a Link.

---
## __str__
```python
from link import __str__
```



---
## __repr__
```python
from link import __repr__
```



---
## __hash__
```python
from link import __hash__
```



---
## __eq__
```python
from link import __eq__
```



---
## __lt__
```python
from link import __lt__
```



---
## url
```python
from link import url
```



---
## filename
```python
from link import filename
```



---
## file_path
```python
from link import file_path
```



---
## scheme
```python
from link import scheme
```



---
## netloc
```python
from link import netloc
```

This can contain auth information.

---
## path
```python
from link import path
```



---
## splitext
```python
from link import splitext
```



---
## ext
```python
from link import ext
```



---
## url_without_fragment
```python
from link import url_without_fragment
```



---
## _egg_fragment
```python
from link import _egg_fragment
```



---
## subdirectory_fragment
```python
from link import subdirectory_fragment
```



---
## metadata_link
```python
from link import metadata_link
```

Return a link to the associated core metadata file (if any).

---
## hash
```python
from link import hash
```



---
## hash_name
```python
from link import hash_name
```



---
## show_url
```python
from link import show_url
```



---
## is_file
```python
from link import is_file
```



---
## is_existing_dir
```python
from link import is_existing_dir
```



---
## is_wheel
```python
from link import is_wheel
```



---
## is_vcs
```python
from link import is_vcs
```



---
## is_yanked
```python
from link import is_yanked
```



---
## has_hash
```python
from link import has_hash
```



---
## __name__
```python
from selection_prefs import __name__
```



---
## SelectionPreferences
```python
from selection_prefs import SelectionPreferences
```

Encapsulates the candidate selection preferences for downloading
and installing files.

---
## __init__
```python
from selection_prefs import __init__
```

Create a SelectionPreferences object.

:param allow_yanked: Whether files marked as yanked (in the sense
    of PEP 592) are permitted to be candidates for install.
:param format_control: A FormatControl object or None. Used to control
    the selection of source packages / binary packages when consulting
    the index and links.
:param prefer_binary: Whether to prefer an old, but valid, binary
    dist over a new source dist.
:param ignore_requires_python: Whether to ignore incompatible
    "Requires-Python" values in links. Defaults to False.

---
## __name__
```python
from direct_url import __name__
```

PEP 610 

---
## DirectUrlValidationError
```python
from direct_url import DirectUrlValidationError
```



---
## _get
```python
from direct_url import _get
```

Get value from dictionary and verify expected type.

---
## _get_required
```python
from direct_url import _get_required
```



---
## _exactly_one_of
```python
from direct_url import _exactly_one_of
```



---
## _filter_none
```python
from direct_url import _filter_none
```

Make dict excluding None values.

---
## VcsInfo
```python
from direct_url import VcsInfo
```



---
## ArchiveInfo
```python
from direct_url import ArchiveInfo
```



---
## DirInfo
```python
from direct_url import DirInfo
```



---
## DirectUrl
```python
from direct_url import DirectUrl
```



---
## _from_dict
```python
from direct_url import _from_dict
```



---
## _to_dict
```python
from direct_url import _to_dict
```



---
## __init__
```python
from direct_url import __init__
```



---
## hash
```python
from direct_url import hash
```



---
## _remove_auth_from_netloc
```python
from direct_url import _remove_auth_from_netloc
```



---
## redacted_url
```python
from direct_url import redacted_url
```

url with user:password part removed unless it is formed with
environment variables as specified in PEP 610, or it is ``git``
in the case of a git URL.

---
## validate
```python
from direct_url import validate
```



---
## from_dict
```python
from direct_url import from_dict
```



---
## to_dict
```python
from direct_url import to_dict
```



---
## from_json
```python
from direct_url import from_json
```



---
## to_json
```python
from direct_url import to_json
```



---
## is_local_editable
```python
from direct_url import is_local_editable
```



---
## PackageIndex
```python
from index import PackageIndex
```

This class represents a package index compatible with PyPI, the Python
Package Index.

---
## __init__
```python
from index import __init__
```

Initialise an instance.

:param url: The URL of the index. If not specified, the URL for PyPI is
            used.

---
## _url_for_path
```python
from index import _url_for_path
```



---
## __name__
```python
from target_python import __name__
```



---
## TargetPython
```python
from target_python import TargetPython
```

Encapsulates the properties of a Python interpreter one is targeting
for a package install, download, etc.

---
## __init__
```python
from target_python import __init__
```

:param platforms: A list of strings or None. If None, searches for
    packages that are supported by the current system. Otherwise, will
    find packages that can be built on the platforms passed in. These
    packages will only be downloaded for distribution: they will
    not be built locally.
:param py_version_info: An optional tuple of ints representing the
    Python version information to use (e.g. `sys.version_info[:3]`).
    This can have length 1, 2, or 3 when provided.
:param abis: A list of strings or None. This is passed to
    compatibility_tags.py's get_supported() function as is.
:param implementation: A string or None. This is passed to
    compatibility_tags.py's get_supported() function as is.

---
## format_given
```python
from target_python import format_given
```

Format the given, non-None attributes for display.

---
## get_sorted_tags
```python
from target_python import get_sorted_tags
```

Return the supported PEP 425 tags to check wheel candidates against.

The tags are returned in order of preference (most preferred first).

---
## get_unsorted_tags
```python
from target_python import get_unsorted_tags
```

Exactly the same as get_sorted_tags, but returns a set.

This is important for performance.

---
## __name__
```python
from search_scope import __name__
```



---
## SearchScope
```python
from search_scope import SearchScope
```

Encapsulates the locations that pip is configured to search.

---
## create
```python
from search_scope import create
```

Create a SearchScope object after normalizing the `find_links`.

---
## get_formatted_locations
```python
from search_scope import get_formatted_locations
```



---
## get_index_urls_locations
```python
from search_scope import get_index_urls_locations
```

Returns the locations found via self.index_urls

Checks the url_name on the main (first in the list) index and
use this url_name to produce all locations

---
## mkurl_pypi_url
```python
from search_scope import mkurl_pypi_url
```



---
## __name__
```python
from candidate import __name__
```



---
## InstallationCandidate
```python
from candidate import InstallationCandidate
```

Represents a potential "candidate" for installation.

---
## __init__
```python
from candidate import __init__
```



---
## __str__
```python
from candidate import __str__
```



---
## __name__
```python
from format_control import __name__
```



---
## FormatControl
```python
from format_control import FormatControl
```

Helper for managing formats from which a package can be installed.

---
## __init__
```python
from format_control import __init__
```



---
## __eq__
```python
from format_control import __eq__
```



---
## __repr__
```python
from format_control import __repr__
```



---
## handle_mutual_excludes
```python
from format_control import handle_mutual_excludes
```



---
## get_allowed_formats
```python
from format_control import get_allowed_formats
```



---
## disallow_binaries
```python
from format_control import disallow_binaries
```



---
## __name__
```python
from installation_report import __name__
```



---
## InstallationReport
```python
from installation_report import InstallationReport
```



---
## __init__
```python
from installation_report import __init__
```



---
## _install_req_to_dict
```python
from installation_report import _install_req_to_dict
```



---
## to_dict
```python
from installation_report import to_dict
```



---
## __name__
```python
from scheme import __name__
```

For types associated with installation schemes.

For a general overview of available schemes and their context, see
https://docs.python.org/3/install/index.html#alternate-installation.

---
## Scheme
```python
from scheme import Scheme
```

A Scheme holds paths which are used as the base directories for
artifacts associated with a Python package.

---
## get_formatted_file_tags
```python
from wheel import get_formatted_file_tags
```

Return the wheel's tags as a sorted list of strings.

---
## support_index_min
```python
from wheel import support_index_min
```

Return the lowest index that one of the wheel's file_tag combinations
achieves in the given list of supported tags.

For example, if there are 8 supported tags and one of the file tags
is first in the list, then return 0.

:param tags: the PEP 425 tags to check the wheel against, in order
    with most preferred first.

:raises ValueError: If none of the wheel's file tags match one of
    the supported tags.

---
## find_most_preferred_tag
```python
from wheel import find_most_preferred_tag
```

Return the priority of the most preferred tag that one of the wheel's file
tag combinations achieves in the given list of supported tags using the given
tag_to_priority mapping, where lower priorities are more-preferred.

This is used in place of support_index_min in some cases in order to avoid
an expensive linear scan of a large list of tags.

:param tags: the PEP 425 tags to check the wheel against.
:param tag_to_priority: a mapping from tag to priority of that tag, where
    lower is more preferred.

:raises ValueError: If none of the wheel's file tags match one of
    the supported tags.

---
## supported
```python
from wheel import supported
```

Return whether the wheel is compatible with one of the given tags.

:param tags: the PEP 425 tags to check the wheel against.

---
## __name__
```python
from cmdoptions import __name__
```

shared options and groups

The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.

---
## raise_option_error
```python
from cmdoptions import raise_option_error
```

Raise an option parsing error using parser.error().

Args:
  parser: an OptionParser instance.
  option: an Option instance.
  msg: the error text.

---
## make_option_group
```python
from cmdoptions import make_option_group
```

Return an OptionGroup object
group  -- assumed to be dict with 'name' and 'options' keys
parser -- an optparse Parser

---
## check_dist_restriction
```python
from cmdoptions import check_dist_restriction
```

Function for determining if custom platform options are allowed.

:param options: The OptionParser options.
:param check_target: Whether or not to check if --target is being used.

---
## _path_option_check
```python
from cmdoptions import _path_option_check
```



---
## _package_name_option_check
```python
from cmdoptions import _package_name_option_check
```



---
## PipOption
```python
from cmdoptions import PipOption
```



---
## exists_action
```python
from cmdoptions import exists_action
```



---
## extra_index_url
```python
from cmdoptions import extra_index_url
```



---
## find_links
```python
from cmdoptions import find_links
```



---
## trusted_host
```python
from cmdoptions import trusted_host
```



---
## constraints
```python
from cmdoptions import constraints
```



---
## requirements
```python
from cmdoptions import requirements
```



---
## editable
```python
from cmdoptions import editable
```



---
## _handle_src
```python
from cmdoptions import _handle_src
```



---
## _get_format_control
```python
from cmdoptions import _get_format_control
```

Get a format_control object.

---
## _handle_no_binary
```python
from cmdoptions import _handle_no_binary
```



---
## _handle_only_binary
```python
from cmdoptions import _handle_only_binary
```



---
## no_binary
```python
from cmdoptions import no_binary
```



---
## only_binary
```python
from cmdoptions import only_binary
```



---
## _convert_python_version
```python
from cmdoptions import _convert_python_version
```

Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.

:return: A 2-tuple (version_info, error_msg), where `error_msg` is
    non-None if and only if there was a parsing error.

---
## _handle_python_version
```python
from cmdoptions import _handle_python_version
```

Handle a provided --python-version value.

---
## add_target_python_options
```python
from cmdoptions import add_target_python_options
```



---
## make_target_python
```python
from cmdoptions import make_target_python
```



---
## prefer_binary
```python
from cmdoptions import prefer_binary
```



---
## _handle_no_cache_dir
```python
from cmdoptions import _handle_no_cache_dir
```

Process a value provided for the --no-cache-dir option.

This is an optparse.Option callback for the --no-cache-dir option.

---
## _handle_no_use_pep517
```python
from cmdoptions import _handle_no_use_pep517
```

Process a value provided for the --no-use-pep517 option.

This is an optparse.Option callback for the no_use_pep517 option.

---
## _handle_config_settings
```python
from cmdoptions import _handle_config_settings
```



---
## _handle_merge_hash
```python
from cmdoptions import _handle_merge_hash
```

Given a value spelled "algo:digest", append the digest to a list
pointed to in a dict by the algo name.

---
## check_list_path_option
```python
from cmdoptions import check_list_path_option
```



---
## __name__
```python
from index_command import __name__
```

Contains command classes which may interact with an index / the network.

Unlike its sister module, req_command, this module still uses lazy imports
so commands which don't always hit the network (e.g. list w/o --outdated or
--uptodate) don't need waste time importing PipSession and friends.

---
## _create_truststore_ssl_context
```python
from index_command import _create_truststore_ssl_context
```



---
## SessionCommandMixin
```python
from index_command import SessionCommandMixin
```

A class mixin for command classes needing _build_session().

---
## _pip_self_version_check
```python
from index_command import _pip_self_version_check
```



---
## IndexGroupCommand
```python
from index_command import IndexGroupCommand
```

Abstract base class for commands with the index_group options.

This also corresponds to the commands that permit the pip version check.

---
## __init__
```python
from index_command import __init__
```



---
## _get_index_urls
```python
from index_command import _get_index_urls
```

Return a list of index urls from user-provided options.

---
## get_default_session
```python
from index_command import get_default_session
```

Get a default-managed session.

---
## _build_session
```python
from index_command import _build_session
```



---
## handle_pip_version_check
```python
from index_command import handle_pip_version_check
```

Do the pip version check if not disabled.

This overrides the default behavior of not doing the check.

---
## PrettyHelpFormatter
```python
from parser import PrettyHelpFormatter
```

A prettier/less verbose help formatter for optparse.

---
## UpdatingDefaultsHelpFormatter
```python
from parser import UpdatingDefaultsHelpFormatter
```

Custom help formatter for use in ConfigOptionParser.

This is updates the defaults before expanding them, allowing
them to show up correctly in the help listing.

Also redact auth from url type options

---
## CustomOptionParser
```python
from parser import CustomOptionParser
```



---
## ConfigOptionParser
```python
from parser import ConfigOptionParser
```

Custom option parser which updates its defaults by checking the
configuration files and environmental variables

---
## format_option_strings
```python
from parser import format_option_strings
```



---
## _format_option_strings
```python
from parser import _format_option_strings
```

Return a comma-separated list of option strings and metavars.

:param option:  tuple of (short opt, long opt), e.g: ('-f', '--format')
:param mvarfmt: metavar format string
:param optsep:  separator

---
## format_heading
```python
from parser import format_heading
```



---
## format_usage
```python
from parser import format_usage
```

Ensure there is only one newline between usage and the first heading
if there is no description.

---
## format_description
```python
from parser import format_description
```



---
## format_epilog
```python
from parser import format_epilog
```



---
## indent_lines
```python
from parser import indent_lines
```



---
## expand_default
```python
from parser import expand_default
```



---
## insert_option_group
```python
from parser import insert_option_group
```

Insert an OptionGroup at a given position.

---
## option_list_all
```python
from parser import option_list_all
```

Get a list of all options, including those in option groups.

---
## check_default
```python
from parser import check_default
```



---
## _get_ordered_configuration_items
```python
from parser import _get_ordered_configuration_items
```



---
## _update_defaults
```python
from parser import _update_defaults
```

Updates the given defaults with values from the config files and
the environ. Does a little special handling for certain types of
options (lists).

---
## get_default_values
```python
from parser import get_default_values
```

Overriding to make updating the defaults after instantiation of
the option parser possible, _update_defaults() does the dirty work.

---
## error
```python
from parser import error
```



---
## __name__
```python
from command_context import __name__
```



---
## CommandContextMixIn
```python
from command_context import CommandContextMixIn
```



---
## __init__
```python
from command_context import __init__
```



---
## main_context
```python
from command_context import main_context
```



---
## enter_context
```python
from command_context import enter_context
```



---
## __name__
```python
from spinners import __name__
```



---
## SpinnerInterface
```python
from spinners import SpinnerInterface
```



---
## InteractiveSpinner
```python
from spinners import InteractiveSpinner
```



---
## NonInteractiveSpinner
```python
from spinners import NonInteractiveSpinner
```



---
## RateLimiter
```python
from spinners import RateLimiter
```



---
## open_spinner
```python
from spinners import open_spinner
```



---
## hidden_cursor
```python
from spinners import hidden_cursor
```



---
## spin
```python
from spinners import spin
```



---
## finish
```python
from spinners import finish
```



---
## __init__
```python
from spinners import __init__
```



---
## _write
```python
from spinners import _write
```



---
## _update
```python
from spinners import _update
```



---
## ready
```python
from spinners import ready
```



---
## reset
```python
from spinners import reset
```



---
## __name__
```python
from autocompletion import __name__
```

Logic that powers autocompletion installed by ``pip completion``.

---
## autocomplete
```python
from autocompletion import autocomplete
```

Entry Point for completion of main and subcommand options.

---
## get_path_completion_type
```python
from autocompletion import get_path_completion_type
```

Get the type of path completion (``file``, ``dir``, ``path`` or None)

:param cwords: same as the environmental variable ``COMP_WORDS``
:param cword: same as the environmental variable ``COMP_CWORD``
:param opts: The available options to check
:return: path completion type (``file``, ``dir``, ``path`` or None)

---
## auto_complete_paths
```python
from autocompletion import auto_complete_paths
```

If ``completion_type`` is ``file`` or ``path``, list all regular files
and directories starting with ``current``; otherwise only list directories
starting with ``current``.

:param current: The word to be completed
:param completion_type: path completion type(``file``, ``path`` or ``dir``)
:return: A generator of regular files and/or directories

---
## __name__
```python
from base_command import __name__
```

Base Command class, and related routines

---
## Command
```python
from base_command import Command
```



---
## __init__
```python
from base_command import __init__
```



---
## add_options
```python
from base_command import add_options
```



---
## handle_pip_version_check
```python
from base_command import handle_pip_version_check
```

This is a no-op so that commands by default do not do the pip version
check.

---
## run
```python
from base_command import run
```



---
## _run_wrapper
```python
from base_command import _run_wrapper
```



---
## parse_args
```python
from base_command import parse_args
```



---
## main
```python
from base_command import main
```



---
## _main
```python
from base_command import _main
```



---
## _inner_run
```python
from base_command import _inner_run
```



---
## __name__
```python
from main_parser import __name__
```

A single place for constructing and exposing the main parser

---
## create_main_parser
```python
from main_parser import create_main_parser
```

Creates and returns the main parser for pip's CLI

---
## identify_python_interpreter
```python
from main_parser import identify_python_interpreter
```



---
## parse_command
```python
from main_parser import parse_command
```



---
## __name__
```python
from progress_bars import __name__
```



---
## _rich_progress_bar
```python
from progress_bars import _rich_progress_bar
```



---
## _raw_progress_bar
```python
from progress_bars import _raw_progress_bar
```



---
## get_download_progress_renderer
```python
from progress_bars import get_download_progress_renderer
```

Get an object that can be used to render the download progress.

Returns a callable, that takes an iterable to "wrap".

---
## write_progress
```python
from progress_bars import write_progress
```



---
## __name__
```python
from req_command import __name__
```

Contains the RequirementCommand base class.

This class is in a separate module so the commands that do not always
need PackageFinder capability don't unnecessarily import the
PackageFinder machinery and all its vendored dependencies, etc.

---
## with_cleanup
```python
from req_command import with_cleanup
```

Decorator for common logic related to managing temporary
directories.

---
## RequirementCommand
```python
from req_command import RequirementCommand
```



---
## configure_tempdir_registry
```python
from req_command import configure_tempdir_registry
```



---
## wrapper
```python
from req_command import wrapper
```



---
## __init__
```python
from req_command import __init__
```



---
## determine_resolver_variant
```python
from req_command import determine_resolver_variant
```

Determines which resolver should be used, based on the given options.

---
## make_requirement_preparer
```python
from req_command import make_requirement_preparer
```

Create a RequirementPreparer instance for the given parameters.

---
## make_resolver
```python
from req_command import make_resolver
```

Create a Resolver instance for the given parameters.

---
## get_requirements
```python
from req_command import get_requirements
```

Parse command-line arguments into the corresponding requirements.

---
## trace_basic_info
```python
from req_command import trace_basic_info
```

Trace basic information about the provided objects.

---
## _build_package_finder
```python
from req_command import _build_package_finder
```

Create a package finder appropriate to this requirement command.

:param ignore_requires_python: Whether to ignore incompatible
    "Requires-Python" values in links. Defaults to False.

---
## __name__
```python
from check import __name__
```



---
## PackageDetails
```python
from check import PackageDetails
```



---
## create_package_set_from_installed
```python
from check import create_package_set_from_installed
```

Converts a list of distributions into a PackageSet.

---
## check_package_set
```python
from check import check_package_set
```

Check if a package set is consistent

If should_ignore is passed, it should be a callable that takes a
package name and returns a boolean.

---
## check_install_conflicts
```python
from check import check_install_conflicts
```

For checking if the dependency graph would be consistent after     installing given requirements
    

---
## check_unsupported
```python
from check import check_unsupported
```



---
## _simulate_installation_of
```python
from check import _simulate_installation_of
```

Computes the version of packages after installing to_install.

---
## _create_whitelist
```python
from check import _create_whitelist
```



---
## __name__
```python
from freeze import __name__
```



---
## _EditableInfo
```python
from freeze import _EditableInfo
```



---
## freeze
```python
from freeze import freeze
```



---
## _format_as_name_version
```python
from freeze import _format_as_name_version
```



---
## _get_editable_info
```python
from freeze import _get_editable_info
```

Compute and return values (req, comments) for use in
FrozenRequirement.from_dist().

---
## FrozenRequirement
```python
from freeze import FrozenRequirement
```



---
## __init__
```python
from freeze import __init__
```



---
## from_dist
```python
from freeze import from_dist
```



---
## __str__
```python
from freeze import __str__
```



---
## _get_prepared_distribution
```python
from prepare import _get_prepared_distribution
```

Prepare a distribution for installation.

---
## unpack_vcs_link
```python
from prepare import unpack_vcs_link
```



---
## File
```python
from prepare import File
```



---
## get_http_url
```python
from prepare import get_http_url
```



---
## get_file_url
```python
from prepare import get_file_url
```

Get file and optionally check its hash.

---
## unpack_url
```python
from prepare import unpack_url
```

Unpack link into location, downloading if required.

:param hashes: A Hashes object, one of whose embedded hashes must match,
    or HashMismatch will be raised. If the Hashes is empty, no matches are
    required, and unhashable types of requirements (like VCS ones, which
    would ordinarily raise HashUnsupported) are allowed.

---
## _check_download_dir
```python
from prepare import _check_download_dir
```

Check download_dir for previously downloaded file with correct hash
If a correct file is found return its path else None

---
## RequirementPreparer
```python
from prepare import RequirementPreparer
```

Prepares a Requirement

---
## __post_init__
```python
from prepare import __post_init__
```



---
## _log_preparing_link
```python
from prepare import _log_preparing_link
```

Provide context for the requirement being prepared.

---
## _ensure_link_req_src_dir
```python
from prepare import _ensure_link_req_src_dir
```

Ensure source_dir of a linked InstallRequirement.

---
## _get_linked_req_hashes
```python
from prepare import _get_linked_req_hashes
```



---
## _fetch_metadata_only
```python
from prepare import _fetch_metadata_only
```



---
## _fetch_metadata_using_link_data_attr
```python
from prepare import _fetch_metadata_using_link_data_attr
```

Fetch metadata from the data-dist-info-metadata attribute, if possible.

---
## _fetch_metadata_using_lazy_wheel
```python
from prepare import _fetch_metadata_using_lazy_wheel
```

Fetch metadata using lazy wheel, if possible.

---
## _complete_partial_requirements
```python
from prepare import _complete_partial_requirements
```

Download any requirements which were only fetched by metadata.

---
## prepare_linked_requirement
```python
from prepare import prepare_linked_requirement
```

Prepare a requirement to be obtained from req.link.

---
## prepare_linked_requirements_more
```python
from prepare import prepare_linked_requirements_more
```

Prepare linked requirements more, if needed.

---
## _prepare_linked_requirement
```python
from prepare import _prepare_linked_requirement
```



---
## save_linked_requirement
```python
from prepare import save_linked_requirement
```



---
## prepare_editable_requirement
```python
from prepare import prepare_editable_requirement
```

Prepare an editable requirement.

---
## prepare_installed_requirement
```python
from prepare import prepare_installed_requirement
```

Prepare an already-installed requirement.

---
## __name__
```python
from req_install import __name__
```



---
## InstallRequirement
```python
from req_install import InstallRequirement
```

Represents something that may be installed later on, may have information
about where to fetch the relevant requirement and also contains logic for
installing the said requirement.

---
## check_invalid_constraint_type
```python
from req_install import check_invalid_constraint_type
```



---
## _has_option
```python
from req_install import _has_option
```



---
## check_legacy_setup_py_options
```python
from req_install import check_legacy_setup_py_options
```



---
## __init__
```python
from req_install import __init__
```



---
## __str__
```python
from req_install import __str__
```



---
## __repr__
```python
from req_install import __repr__
```



---
## format_debug
```python
from req_install import format_debug
```

An un-tested helper for getting state, for debugging.

---
## name
```python
from req_install import name
```



---
## supports_pyproject_editable
```python
from req_install import supports_pyproject_editable
```



---
## specifier
```python
from req_install import specifier
```



---
## is_direct
```python
from req_install import is_direct
```

Whether this requirement was specified as a direct URL.

---
## is_pinned
```python
from req_install import is_pinned
```

Return whether I am pinned to an exact version.

For example, some-package==1.2 is pinned; some-package>1.2 is not.

---
## match_markers
```python
from req_install import match_markers
```



---
## has_hash_options
```python
from req_install import has_hash_options
```

Return whether any known-good hashes are specified as options.

These activate --require-hashes mode; hashes specified as part of a
URL do not.

---
## hashes
```python
from req_install import hashes
```

Return a hash-comparer that considers my option- and URL-based
hashes to be known-good.

Hashes in URLs--ones embedded in the requirements file, not ones
downloaded from an index server--are almost peers with ones from
flags. They satisfy --require-hashes (whether it was implicitly or
explicitly activated) but do not activate it. md5 and sha224 are not
allowed in flags, which should nudge people toward good algos. We
always OR all hashes together, even ones from URLs.

:param trust_internet: Whether to trust URL-based (#md5=...) hashes
    downloaded from the internet, as by populate_link()

---
## from_path
```python
from req_install import from_path
```

Format a nice indicator to show where this "comes from" 

---
## ensure_build_location
```python
from req_install import ensure_build_location
```



---
## _set_requirement
```python
from req_install import _set_requirement
```

Set requirement after generating metadata.

---
## warn_on_mismatching_name
```python
from req_install import warn_on_mismatching_name
```



---
## check_if_exists
```python
from req_install import check_if_exists
```

Find an installed distribution that satisfies or conflicts
with this requirement, and set self.satisfied_by or
self.should_reinstall appropriately.

---
## is_wheel
```python
from req_install import is_wheel
```



---
## is_wheel_from_cache
```python
from req_install import is_wheel_from_cache
```



---
## unpacked_source_directory
```python
from req_install import unpacked_source_directory
```



---
## setup_py_path
```python
from req_install import setup_py_path
```



---
## setup_cfg_path
```python
from req_install import setup_cfg_path
```



---
## pyproject_toml_path
```python
from req_install import pyproject_toml_path
```



---
## load_pyproject_toml
```python
from req_install import load_pyproject_toml
```

Load the pyproject.toml file.

After calling this routine, all of the attributes related to PEP 517
processing for this requirement have been set. In particular, the
use_pep517 attribute can be used to determine whether we should
follow the PEP 517 or legacy (setup.py) code path.

---
## isolated_editable_sanity_check
```python
from req_install import isolated_editable_sanity_check
```

Check that an editable requirement if valid for use with PEP 517/518.

This verifies that an editable that has a pyproject.toml either supports PEP 660
or as a setup.py or a setup.cfg

---
## prepare_metadata
```python
from req_install import prepare_metadata
```

Ensure that project metadata is available.

Under PEP 517 and PEP 660, call the backend hook to prepare the metadata.
Under legacy processing, call setup.py egg-info.

---
## metadata
```python
from req_install import metadata
```



---
## get_dist
```python
from req_install import get_dist
```



---
## assert_source_matches_version
```python
from req_install import assert_source_matches_version
```



---
## ensure_has_source_dir
```python
from req_install import ensure_has_source_dir
```

Ensure that a source_dir is set.

This will create a temporary build dir if the name of the requirement
isn't known yet.

:param parent_dir: The ideal pip parent_dir for the source_dir.
    Generally src_dir for editables and build_dir for sdists.
:return: self.source_dir

---
## needs_unpacked_archive
```python
from req_install import needs_unpacked_archive
```



---
## ensure_pristine_source_checkout
```python
from req_install import ensure_pristine_source_checkout
```

Ensure the source directory has not yet been built in.

---
## update_editable
```python
from req_install import update_editable
```



---
## uninstall
```python
from req_install import uninstall
```

Uninstall the distribution currently satisfying this requirement.

Prompts before removing or modifying files unless
``auto_confirm`` is True.

Refuses to delete or modify files outside of ``sys.prefix`` -
thus uninstallation within a virtual environment can only
modify that virtual environment, even if the virtualenv is
linked to global site-packages.

---
## _get_archive_name
```python
from req_install import _get_archive_name
```



---
## archive
```python
from req_install import archive
```

Saves archive to provided build_dir.

Used for saving downloaded VCS requirements as part of `pip download`.

---
## install
```python
from req_install import install
```



---
## _clean_zip_name
```python
from req_install import _clean_zip_name
```



---
## __name__
```python
from req_set import __name__
```



---
## RequirementSet
```python
from req_set import RequirementSet
```



---
## __init__
```python
from req_set import __init__
```

Create a RequirementSet.

---
## __str__
```python
from req_set import __str__
```



---
## __repr__
```python
from req_set import __repr__
```



---
## add_unnamed_requirement
```python
from req_set import add_unnamed_requirement
```



---
## add_named_requirement
```python
from req_set import add_named_requirement
```



---
## has_requirement
```python
from req_set import has_requirement
```



---
## get_requirement
```python
from req_set import get_requirement
```



---
## all_requirements
```python
from req_set import all_requirements
```



---
## requirements_to_install
```python
from req_set import requirements_to_install
```

Return the list of requirements that need to be installed.

TODO remove this property together with the legacy resolver, since the new
     resolver only returns requirements that need to be installed.

---
## __name__
```python
from req_uninstall import __name__
```



---
## _script_names
```python
from req_uninstall import _script_names
```

Create the fully qualified name of the files created by
{console,gui}_scripts for the given ``dist``.
Returns the list of file names

---
## _unique
```python
from req_uninstall import _unique
```



---
## uninstallation_paths
```python
from req_uninstall import uninstallation_paths
```

Yield all the uninstallation paths for dist based on RECORD-without-.py[co]

Yield paths to all the files in RECORD. For each .py file in RECORD, add
the .pyc and .pyo in the same directory.

UninstallPathSet.add() takes care of the __pycache__ .py[co].

If RECORD is not found, raises an error,
with possible information from the INSTALLER file.

https://packaging.python.org/specifications/recording-installed-packages/

---
## compact
```python
from req_uninstall import compact
```

Compact a path set to contain the minimal number of paths
necessary to contain all paths in the set. If /a/path/ and
/a/path/to/a/file.txt are both in the set, leave only the
shorter path.

---
## compress_for_rename
```python
from req_uninstall import compress_for_rename
```

Returns a set containing the paths that need to be renamed.

This set may include directories when the original sequence of paths
included every file on disk.

---
## compress_for_output_listing
```python
from req_uninstall import compress_for_output_listing
```

Returns a tuple of 2 sets of which paths to display to user

The first set contains paths that would be deleted. Files of a package
are not added and the top-level directory of the package has a '*' added
at the end - to signify that all it's contents are removed.

The second set contains files that would have been skipped in the above
folders.

---
## StashedUninstallPathSet
```python
from req_uninstall import StashedUninstallPathSet
```

A set of file rename operations to stash files while
tentatively uninstalling them.

---
## UninstallPathSet
```python
from req_uninstall import UninstallPathSet
```

A set of file paths to be removed in the uninstallation of a
requirement.

---
## UninstallPthEntries
```python
from req_uninstall import UninstallPthEntries
```



---
## unique
```python
from req_uninstall import unique
```



---
## norm_join
```python
from req_uninstall import norm_join
```



---
## __init__
```python
from req_uninstall import __init__
```



---
## _get_directory_stash
```python
from req_uninstall import _get_directory_stash
```

Stashes a directory.

Directories are stashed adjacent to their original location if
possible, or else moved/copied into the user's temp dir.

---
## _get_file_stash
```python
from req_uninstall import _get_file_stash
```

Stashes a file.

If no root has been provided, one will be created for the directory
in the user's temp directory.

---
## stash
```python
from req_uninstall import stash
```

Stashes the directory or file and returns its new location.
Handle symlinks as files to avoid modifying the symlink targets.

---
## commit
```python
from req_uninstall import commit
```

Remove temporary save dir: rollback will no longer be possible.

---
## rollback
```python
from req_uninstall import rollback
```



---
## can_rollback
```python
from req_uninstall import can_rollback
```



---
## _permitted
```python
from req_uninstall import _permitted
```

Return True if the given path is one we are permitted to
remove/modify, False otherwise.

---
## add
```python
from req_uninstall import add
```



---
## add_pth
```python
from req_uninstall import add_pth
```



---
## remove
```python
from req_uninstall import remove
```



---
## _allowed_to_proceed
```python
from req_uninstall import _allowed_to_proceed
```

Display which files would be deleted and prompt for confirmation

---
## from_dist
```python
from req_uninstall import from_dist
```



---
## _display
```python
from req_uninstall import _display
```



---
## iter_scripts_to_remove
```python
from req_uninstall import iter_scripts_to_remove
```



---
## InstallationResult
```python
from __init__ import InstallationResult
```



---
## _validate_requirements
```python
from __init__ import _validate_requirements
```



---
## install_given_reqs
```python
from __init__ import install_given_reqs
```

Install everything in the given list.

(to be called after having downloaded and unpacked the packages)

---
## __name__
```python
from req_file import __name__
```

Requirements file parsing

---
## ParsedRequirement
```python
from req_file import ParsedRequirement
```



---
## ParsedLine
```python
from req_file import ParsedLine
```



---
## parse_requirements
```python
from req_file import parse_requirements
```

Parse a requirements file and yield ParsedRequirement instances.

:param filename:    Path or url of requirements file.
:param session:     PipSession instance.
:param finder:      Instance of pip.index.PackageFinder.
:param options:     cli options.
:param constraint:  If true, parsing a constraint file rather than
    requirements file.

---
## preprocess
```python
from req_file import preprocess
```

Split, filter, and join lines, and return a line iterator

:param content: the content of the requirements file

---
## handle_requirement_line
```python
from req_file import handle_requirement_line
```



---
## handle_option_line
```python
from req_file import handle_option_line
```



---
## handle_line
```python
from req_file import handle_line
```

Handle a single parsed requirements line; This can result in
creating/yielding requirements, or updating the finder.

:param line:        The parsed line to be processed.
:param options:     CLI options.
:param finder:      The finder - updated by non-requirement lines.
:param session:     The session - updated by non-requirement lines.

Returns a ParsedRequirement object if the line is a requirement line,
otherwise returns None.

For lines that contain requirements, the only options that have an effect
are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
requirement. Other options from SUPPORTED_OPTIONS may be present, but are
ignored.

For lines that do not contain requirements, the only options that have an
effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
be present, but are ignored. These lines may contain multiple options
(although our docs imply only one is supported), and all our parsed and
affect the finder.

---
## RequirementsFileParser
```python
from req_file import RequirementsFileParser
```



---
## get_line_parser
```python
from req_file import get_line_parser
```



---
## break_args_options
```python
from req_file import break_args_options
```

Break up the line into an args and options string.  We only want to shlex
(and then optparse) the options, not the args.  args can contain markers
which are corrupted by shlex.

---
## OptionParsingError
```python
from req_file import OptionParsingError
```



---
## build_parser
```python
from req_file import build_parser
```

Return a parser for parsing requirement lines

---
## join_lines
```python
from req_file import join_lines
```

Joins a line ending in '' with the previous line (except when following
comments).  The joined line takes on the index of the first line.

---
## ignore_comments
```python
from req_file import ignore_comments
```

Strips comments and filter empty lines.

---
## expand_env_variables
```python
from req_file import expand_env_variables
```

Replace all environment variables that can be retrieved via `os.getenv`.

The only allowed format for environment variables defined in the
requirement file is `${MY_VARIABLE_1}` to ensure two things:

1. Strings that contain a `$` aren't accidentally (partially) expanded.
2. Ensure consistency across platforms for requirement files.

These points are the result of a discussion on the `github pull
request #3514 <https://github.com/pypa/pip/pull/3514>`_.

Valid characters in variable names follow the `POSIX standard
<http://pubs.opengroup.org/onlinepubs/9699919799/>`_ and are limited
to uppercase letter, digits and the `_` (underscore).

---
## get_file_content
```python
from req_file import get_file_content
```

Gets the content of a file; it may be a filename, file: URL, or
http: URL.  Returns (location, content).  Content is unicode.
Respects # -*- coding: declarations on the retrieved files.

:param url:         File path or url.
:param session:     PipSession instance.

---
## __init__
```python
from req_file import __init__
```



---
## parse
```python
from req_file import parse
```

Parse a given file, yielding parsed lines.

---
## _parse_and_recurse
```python
from req_file import _parse_and_recurse
```



---
## _parse_file
```python
from req_file import _parse_file
```



---
## parse_line
```python
from req_file import parse_line
```



---
## parser_exit
```python
from req_file import parser_exit
```



---
## __name__
```python
from constructors import __name__
```



---
## _strip_extras
```python
from constructors import _strip_extras
```



---
## convert_extras
```python
from constructors import convert_extras
```



---
## _set_requirement_extras
```python
from constructors import _set_requirement_extras
```

Returns a new requirement based on the given one, with the supplied extras. If the
given requirement already has extras those are replaced (or dropped if no new extras
are given).

---
## parse_editable
```python
from constructors import parse_editable
```

Parses an editable requirement into:
    - a requirement name
    - an URL
    - extras
    - editable options
Accepted requirements:
    svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir
    .[some_extra]

---
## check_first_requirement_in_file
```python
from constructors import check_first_requirement_in_file
```

Check if file is parsable as a requirements file.

This is heavily based on ``pkg_resources.parse_requirements``, but
simplified to just check the first meaningful line.

:raises InvalidRequirement: If the first meaningful line cannot be parsed
    as an requirement.

---
## deduce_helpful_msg
```python
from constructors import deduce_helpful_msg
```

Returns helpful msg in case requirements file does not exist,
or cannot be parsed.

:params req: Requirements file path

---
## RequirementParts
```python
from constructors import RequirementParts
```



---
## parse_req_from_editable
```python
from constructors import parse_req_from_editable
```



---
## install_req_from_editable
```python
from constructors import install_req_from_editable
```



---
## _looks_like_path
```python
from constructors import _looks_like_path
```

Checks whether the string "looks like" a path on the filesystem.

This does not check whether the target actually exists, only judge from the
appearance.

Returns true if any of the following conditions is true:
* a path separator is found (either os.path.sep or os.path.altsep);
* a dot is found (which represents the current directory).

---
## _get_url_from_path
```python
from constructors import _get_url_from_path
```

First, it checks whether a provided path is an installable directory. If it
is, returns the path.

If false, check if the path is an archive file (such as a .whl).
The function checks if the path is a file. If false, if the path has
an @, it will treat it as a PEP 440 URL requirement and return the path.

---
## parse_req_from_line
```python
from constructors import parse_req_from_line
```



---
## install_req_from_line
```python
from constructors import install_req_from_line
```

Creates an InstallRequirement from a name, which might be a
requirement, directory containing 'setup.py', filename, or URL.

:param line_source: An optional string describing where the line is from,
    for logging purposes in case of an error.

---
## install_req_from_req_string
```python
from constructors import install_req_from_req_string
```



---
## install_req_from_parsed_requirement
```python
from constructors import install_req_from_parsed_requirement
```



---
## install_req_from_link_and_ireq
```python
from constructors import install_req_from_link_and_ireq
```



---
## install_req_drop_extras
```python
from constructors import install_req_drop_extras
```

Creates a new InstallationRequirement using the given template but without
any extras. Sets the original requirement as the new one's parent
(comes_from).

---
## install_req_extend_extras
```python
from constructors import install_req_extend_extras
```

Returns a copy of an installation requirement with some additional extras.
Makes a shallow copy of the ireq object.

---
## with_source
```python
from constructors import with_source
```



---
## _parse_req_string
```python
from constructors import _parse_req_string
```



---
## BaseResolver
```python
from base import BaseResolver
```



---
## resolve
```python
from base import resolve
```



---
## get_installation_order
```python
from base import get_installation_order
```



---
## looks_like_hash
```python
from git import looks_like_hash
```



---
## Git
```python
from git import Git
```



---
## get_base_rev_args
```python
from git import get_base_rev_args
```



---
## is_immutable_rev_checkout
```python
from git import is_immutable_rev_checkout
```



---
## get_git_version
```python
from git import get_git_version
```



---
## get_current_branch
```python
from git import get_current_branch
```

Return the current branch, or None if HEAD isn't at a branch
(e.g. detached HEAD).

---
## get_revision_sha
```python
from git import get_revision_sha
```

Return (sha_or_none, is_branch), where sha_or_none is a commit hash
if the revision names a remote branch or tag, otherwise None.

Args:
  dest: the repository directory.
  rev: the revision name.

---
## _should_fetch
```python
from git import _should_fetch
```

Return true if rev is a ref or is a commit that we don't have locally.

Branches and tags are not considered in this method because they are
assumed to be always available locally (which is a normal outcome of
``git clone`` and ``git fetch --tags``).

---
## resolve_revision
```python
from git import resolve_revision
```

Resolve a revision to a new RevOptions object with the SHA1 of the
branch, tag, or ref if found.

Args:
  rev_options: a RevOptions object.

---
## is_commit_id_equal
```python
from git import is_commit_id_equal
```

Return whether the current commit hash equals the given name.

Args:
  dest: the repository directory.
  name: a string name.

---
## fetch_new
```python
from git import fetch_new
```



---
## switch
```python
from git import switch
```



---
## update
```python
from git import update
```



---
## get_remote_url
```python
from git import get_remote_url
```

Return URL of the first remote encountered.

Raises RemoteNotFoundError if the repository does not have a remote
url configured.

---
## _git_remote_to_pip_url
```python
from git import _git_remote_to_pip_url
```

Convert a remote url from what git uses to what pip accepts.

There are 3 legal forms **url** may take:

    1. A fully qualified url: ssh://git@example.com/foo/bar.git
    2. A local project.git folder: /path/to/bare/repository.git
    3. SCP shorthand for form 1: git@example.com:foo/bar.git

Form 1 is output as-is. Form 2 must be converted to URI and form 3 must
be converted to form 1.

See the corresponding test test_git_remote_url_to_pip() for examples of
sample inputs/outputs.

---
## has_commit
```python
from git import has_commit
```

Check if rev is a commit that is available in the local repository.

---
## get_revision
```python
from git import get_revision
```



---
## get_subdirectory
```python
from git import get_subdirectory
```

Return the path to Python project root, relative to the repo root.
Return None if the project root is in the repo root.

---
## get_url_rev_and_auth
```python
from git import get_url_rev_and_auth
```

Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
That's required because although they use SSH they sometimes don't
work with a ssh:// scheme (e.g. GitHub). But we need a scheme for
parsing. Hence we remove it again afterwards and return it as a stub.

---
## update_submodules
```python
from git import update_submodules
```



---
## get_repository_root
```python
from git import get_repository_root
```



---
## should_add_vcs_url_prefix
```python
from git import should_add_vcs_url_prefix
```

In either https or ssh form, requirements must be prefixed with git+.

---
## __name__
```python
from mercurial import __name__
```



---
## Mercurial
```python
from mercurial import Mercurial
```



---
## get_base_rev_args
```python
from mercurial import get_base_rev_args
```



---
## fetch_new
```python
from mercurial import fetch_new
```



---
## switch
```python
from mercurial import switch
```



---
## update
```python
from mercurial import update
```



---
## get_remote_url
```python
from mercurial import get_remote_url
```



---
## get_revision
```python
from mercurial import get_revision
```

Return the repository-local changeset revision number, as an integer.

---
## get_requirement_revision
```python
from mercurial import get_requirement_revision
```

Return the changeset identification hash, as a 40-character
hexadecimal string

---
## is_commit_id_equal
```python
from mercurial import is_commit_id_equal
```

Always assume the versions don't match

---
## get_subdirectory
```python
from mercurial import get_subdirectory
```

Return the path to Python project root, relative to the repo root.
Return None if the project root is in the repo root.

---
## get_repository_root
```python
from mercurial import get_repository_root
```



---
## __name__
```python
from bazaar import __name__
```



---
## Bazaar
```python
from bazaar import Bazaar
```



---
## get_base_rev_args
```python
from bazaar import get_base_rev_args
```



---
## fetch_new
```python
from bazaar import fetch_new
```



---
## switch
```python
from bazaar import switch
```



---
## update
```python
from bazaar import update
```



---
## get_url_rev_and_auth
```python
from bazaar import get_url_rev_and_auth
```



---
## get_remote_url
```python
from bazaar import get_remote_url
```



---
## get_revision
```python
from bazaar import get_revision
```



---
## is_commit_id_equal
```python
from bazaar import is_commit_id_equal
```

Always assume the versions don't match

---
## __name__
```python
from versioncontrol import __name__
```

Handles all VCS (version control) support

---
## is_url
```python
from versioncontrol import is_url
```

Return true if the name looks like a URL.

---
## make_vcs_requirement_url
```python
from versioncontrol import make_vcs_requirement_url
```

Return the URL for a VCS requirement.

Args:
  repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+").
  project_name: the (unescaped) project name.

---
## find_path_to_project_root_from_repo_root
```python
from versioncontrol import find_path_to_project_root_from_repo_root
```

Find the the Python project's root by searching up the filesystem from
`location`. Return the path to project root relative to `repo_root`.
Return None if the project root is `repo_root`, or cannot be found.

---
## RemoteNotFoundError
```python
from versioncontrol import RemoteNotFoundError
```



---
## RemoteNotValidError
```python
from versioncontrol import RemoteNotValidError
```



---
## RevOptions
```python
from versioncontrol import RevOptions
```

Encapsulates a VCS-specific revision to install, along with any VCS
install options.

Args:
    vc_class: a VersionControl subclass.
    rev: the name of the revision to install.
    extra_args: a list of extra options.

---
## VcsSupport
```python
from versioncontrol import VcsSupport
```



---
## VersionControl
```python
from versioncontrol import VersionControl
```



---
## __init__
```python
from versioncontrol import __init__
```



---
## __repr__
```python
from versioncontrol import __repr__
```



---
## arg_rev
```python
from versioncontrol import arg_rev
```



---
## to_args
```python
from versioncontrol import to_args
```

Return the VCS-specific command arguments.

---
## to_display
```python
from versioncontrol import to_display
```



---
## make_new
```python
from versioncontrol import make_new
```

Make a copy of the current instance, but with a new rev.

Args:
  rev: the name of the revision for the new object.

---
## __iter__
```python
from versioncontrol import __iter__
```



---
## backends
```python
from versioncontrol import backends
```



---
## dirnames
```python
from versioncontrol import dirnames
```



---
## all_schemes
```python
from versioncontrol import all_schemes
```



---
## register
```python
from versioncontrol import register
```



---
## unregister
```python
from versioncontrol import unregister
```



---
## get_backend_for_dir
```python
from versioncontrol import get_backend_for_dir
```

Return a VersionControl object if a repository of that type is found
at the given directory.

---
## get_backend_for_scheme
```python
from versioncontrol import get_backend_for_scheme
```

Return a VersionControl object or None.

---
## get_backend
```python
from versioncontrol import get_backend
```

Return a VersionControl object or None.

---
## should_add_vcs_url_prefix
```python
from versioncontrol import should_add_vcs_url_prefix
```

Return whether the vcs prefix (e.g. "git+") should be added to a
repository's remote url when used in a requirement.

---
## get_subdirectory
```python
from versioncontrol import get_subdirectory
```

Return the path to Python project root, relative to the repo root.
Return None if the project root is in the repo root.

---
## get_requirement_revision
```python
from versioncontrol import get_requirement_revision
```

Return the revision string that should be used in a requirement.

---
## get_src_requirement
```python
from versioncontrol import get_src_requirement
```

Return the requirement string to use to redownload the files
currently at the given repository directory.

Args:
  project_name: the (unescaped) project name.

The return value has a form similar to the following:

    {repository_url}@{revision}#egg={project_name}

---
## get_base_rev_args
```python
from versioncontrol import get_base_rev_args
```

Return the base revision arguments for a vcs command.

Args:
  rev: the name of a revision to install.  Cannot be None.

---
## is_immutable_rev_checkout
```python
from versioncontrol import is_immutable_rev_checkout
```

Return true if the commit hash checked out at dest matches
the revision in url.

Always return False, if the VCS does not support immutable commit
hashes.

This method does not check if there are local uncommitted changes
in dest after checkout, as pip currently has no use case for that.

---
## make_rev_options
```python
from versioncontrol import make_rev_options
```

Return a RevOptions object.

Args:
  rev: the name of a revision to install.
  extra_args: a list of extra options.

---
## _is_local_repository
```python
from versioncontrol import _is_local_repository
```

posix absolute paths start with os.path.sep,
win32 ones start with drive (like c:\folder)

---
## get_netloc_and_auth
```python
from versioncontrol import get_netloc_and_auth
```

Parse the repository URL's netloc, and return the new netloc to use
along with auth information.

Args:
  netloc: the original repository URL netloc.
  scheme: the repository URL's scheme without the vcs prefix.

This is mainly for the Subversion class to override, so that auth
information can be provided via the --username and --password options
instead of through the URL.  For other subclasses like Git without
such an option, auth information must stay in the URL.

Returns: (netloc, (username, password)).

---
## get_url_rev_and_auth
```python
from versioncontrol import get_url_rev_and_auth
```

Parse the repository URL to use, and return the URL, revision,
and auth info to use.

Returns: (url, rev, (username, password)).

---
## make_rev_args
```python
from versioncontrol import make_rev_args
```

Return the RevOptions "extra arguments" to use in obtain().

---
## get_url_rev_options
```python
from versioncontrol import get_url_rev_options
```

Return the URL and RevOptions object to use in obtain(),
as a tuple (url, rev_options).

---
## normalize_url
```python
from versioncontrol import normalize_url
```

Normalize a URL for comparison by unquoting it and removing any
trailing slash.

---
## compare_urls
```python
from versioncontrol import compare_urls
```

Compare two repo URLs for identity, ignoring incidental differences.

---
## fetch_new
```python
from versioncontrol import fetch_new
```

Fetch a revision from a repository, in the case that this is the
first fetch from the repository.

Args:
  dest: the directory to fetch the repository to.
  rev_options: a RevOptions object.
  verbosity: verbosity level.

---
## switch
```python
from versioncontrol import switch
```

Switch the repo at ``dest`` to point to ``URL``.

Args:
  rev_options: a RevOptions object.

---
## update
```python
from versioncontrol import update
```

Update an already-existing repo to the given ``rev_options``.

Args:
  rev_options: a RevOptions object.

---
## is_commit_id_equal
```python
from versioncontrol import is_commit_id_equal
```

Return whether the id of the current commit equals the given name.

Args:
  dest: the repository directory.
  name: a string name.

---
## obtain
```python
from versioncontrol import obtain
```

Install or update in editable mode the package represented by this
VersionControl object.

:param dest: the repository directory in which to install or update.
:param url: the repository URL starting with a vcs prefix.
:param verbosity: verbosity level.

---
## unpack
```python
from versioncontrol import unpack
```

Clean up current location and download the url repository
(and vcs infos) into location

:param url: the repository URL starting with a vcs prefix.
:param verbosity: verbosity level.

---
## get_remote_url
```python
from versioncontrol import get_remote_url
```

Return the url used at location

Raises RemoteNotFoundError if the repository does not have a remote
url configured.

---
## get_revision
```python
from versioncontrol import get_revision
```

Return the current commit id of the files at the given location.

---
## run_command
```python
from versioncontrol import run_command
```

Run a VCS subcommand
This is simply a wrapper around call_subprocess that adds the VCS
command name, and checks that the VCS is available

---
## is_repository_directory
```python
from versioncontrol import is_repository_directory
```

Return whether a directory path is a repository directory.

---
## get_repository_root
```python
from versioncontrol import get_repository_root
```

Return the "root" (top-level) directory controlled by the vcs,
or `None` if the directory is not in any.

It is meant to be overridden to implement smarter detection
mechanisms for specific vcs.

This can do more than is_repository_directory() alone. For
example, the Git override checks that Git is actually available.

---
## __name__
```python
from subversion import __name__
```



---
## Subversion
```python
from subversion import Subversion
```



---
## should_add_vcs_url_prefix
```python
from subversion import should_add_vcs_url_prefix
```



---
## get_base_rev_args
```python
from subversion import get_base_rev_args
```



---
## get_revision
```python
from subversion import get_revision
```

Return the maximum revision for all files under a given location

---
## get_netloc_and_auth
```python
from subversion import get_netloc_and_auth
```

This override allows the auth information to be passed to svn via the
--username and --password options instead of via the URL.

---
## get_url_rev_and_auth
```python
from subversion import get_url_rev_and_auth
```



---
## make_rev_args
```python
from subversion import make_rev_args
```



---
## get_remote_url
```python
from subversion import get_remote_url
```



---
## _get_svn_url_rev
```python
from subversion import _get_svn_url_rev
```



---
## is_commit_id_equal
```python
from subversion import is_commit_id_equal
```

Always assume the versions don't match

---
## __init__
```python
from subversion import __init__
```



---
## call_vcs_version
```python
from subversion import call_vcs_version
```

Query the version of the currently installed Subversion client.

:return: A tuple containing the parts of the version information or
    ``()`` if the version returned from ``svn`` could not be parsed.
:raises: BadCommand: If ``svn`` is not installed.

---
## get_vcs_version
```python
from subversion import get_vcs_version
```

Return the version of the currently installed Subversion client.

If the version of the Subversion client has already been queried,
a cached value will be used.

:return: A tuple containing the parts of the version information or
    ``()`` if the version returned from ``svn`` could not be parsed.
:raises: BadCommand: If ``svn`` is not installed.

---
## get_remote_call_options
```python
from subversion import get_remote_call_options
```

Return options to be used on calls to Subversion that contact the server.

These options are applicable for the following ``svn`` subcommands used
in this class.

    - checkout
    - switch
    - update

:return: A list of command line arguments to pass to ``svn``.

---
## fetch_new
```python
from subversion import fetch_new
```



---
## switch
```python
from subversion import switch
```



---
## update
```python
from subversion import update
```



---
## _should_use_sysconfig
```python
from __init__ import _should_use_sysconfig
```

This function determines the value of _USE_SYSCONFIG.

By default, pip uses sysconfig on Python 3.10+.
But Python distributors can override this decision by setting:
    sysconfig._PIP_USE_SYSCONFIG = True / False
Rationale in https://github.com/pypa/pip/issues/10647

This is a function for testability, but should be constant during any one
run.

---
## _looks_like_bpo_44860
```python
from __init__ import _looks_like_bpo_44860
```

The resolution to bpo-44860 will change this incorrect platlib.

See <https://bugs.python.org/issue44860>.

---
## _looks_like_red_hat_patched_platlib_purelib
```python
from __init__ import _looks_like_red_hat_patched_platlib_purelib
```



---
## _looks_like_red_hat_lib
```python
from __init__ import _looks_like_red_hat_lib
```

Red Hat patches platlib in unix_prefix and unix_home, but not purelib.

This is the only way I can see to tell a Red Hat-patched Python.

---
## _looks_like_debian_scheme
```python
from __init__ import _looks_like_debian_scheme
```

Debian adds two additional schemes.

---
## _looks_like_red_hat_scheme
```python
from __init__ import _looks_like_red_hat_scheme
```

Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``.

Red Hat's ``00251-change-user-install-location.patch`` changes the install
command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is
(fortunately?) done quite unconditionally, so we create a default command
object without any configuration to detect this.

---
## _looks_like_slackware_scheme
```python
from __init__ import _looks_like_slackware_scheme
```

Slackware patches sysconfig but fails to patch distutils and site.

Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
path, but does not do the same to the site module.

---
## _looks_like_msys2_mingw_scheme
```python
from __init__ import _looks_like_msys2_mingw_scheme
```

MSYS2 patches distutils and sysconfig to use a UNIX-like scheme.

However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is
likely going to be included in their 3.10 release, so we ignore the warning.
See msys2/MINGW-packages#9319.

MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase,
and is missing the final ``"site-packages"``.

---
## _fix_abiflags
```python
from __init__ import _fix_abiflags
```



---
## _warn_mismatched
```python
from __init__ import _warn_mismatched
```



---
## _warn_if_mismatch
```python
from __init__ import _warn_if_mismatch
```



---
## _log_context
```python
from __init__ import _log_context
```



---
## get_scheme
```python
from __init__ import get_scheme
```



---
## get_bin_prefix
```python
from __init__ import get_bin_prefix
```



---
## get_bin_user
```python
from __init__ import get_bin_user
```



---
## _looks_like_deb_system_dist_packages
```python
from __init__ import _looks_like_deb_system_dist_packages
```

Check if the value is Debian's APT-controlled dist-packages.

Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the
default package path controlled by APT, but does not patch ``sysconfig`` to
do the same. This is similar to the bug worked around in ``get_scheme()``,
but here the default is ``deb_system`` instead of ``unix_local``. Ultimately
we can't do anything about this Debian bug, and this detection allows us to
skip the warning when needed.

---
## get_purelib
```python
from __init__ import get_purelib
```

Return the default pure-Python lib location.

---
## get_platlib
```python
from __init__ import get_platlib
```

Return the default platform-shared lib location.

---
## __name__
```python
from _sysconfig import __name__
```



---
## _should_use_osx_framework_prefix
```python
from _sysconfig import _should_use_osx_framework_prefix
```

Check for Apple's ``osx_framework_library`` scheme.

Python distributed by Apple's Command Line Tools has this special scheme
that's used when:

* This is a framework build.
* We are installing into the system prefix.

This does not account for ``pip install --prefix`` (also means we're not
installing to the system prefix), which should use ``posix_prefix``, but
logic here means ``_infer_prefix()`` outputs ``osx_framework_library``. But
since ``prefix`` is not available for ``sysconfig.get_default_scheme()``,
which is the stdlib replacement for ``_infer_prefix()``, presumably Apple
wouldn't be able to magically switch between ``osx_framework_library`` and
``posix_prefix``. ``_infer_prefix()`` returning ``osx_framework_library``
means its behavior is consistent whether we use the stdlib implementation
or our own, and we deal with this special case in ``get_scheme()`` instead.

---
## _infer_prefix
```python
from _sysconfig import _infer_prefix
```

Try to find a prefix scheme for the current platform.

This tries:

* A special ``osx_framework_library`` for Python distributed by Apple's
  Command Line Tools, when not running in a virtual environment.
* Implementation + OS, used by PyPy on Windows (``pypy_nt``).
* Implementation without OS, used by PyPy on POSIX (``pypy``).
* OS + "prefix", used by CPython on POSIX (``posix_prefix``).
* Just the OS name, used by CPython on Windows (``nt``).

If none of the above works, fall back to ``posix_prefix``.

---
## _infer_user
```python
from _sysconfig import _infer_user
```

Try to find a user scheme for the current platform.

---
## _infer_home
```python
from _sysconfig import _infer_home
```

Try to find a home for the current platform.

---
## get_scheme
```python
from _sysconfig import get_scheme
```

Get the "scheme" corresponding to the input parameters.

:param dist_name: the name of the package to retrieve the scheme for, used
    in the headers scheme path
:param user: indicates to use the "user" scheme
:param home: indicates to use the "home" scheme
:param root: root under which other directories are re-based
:param isolated: ignored, but kept for distutils compatibility (where
    this controls whether the user-site pydistutils.cfg is honored)
:param prefix: indicates to use the "prefix" scheme and provides the
    base directory for the same

---
## get_bin_prefix
```python
from _sysconfig import get_bin_prefix
```



---
## get_purelib
```python
from _sysconfig import get_purelib
```



---
## get_platlib
```python
from _sysconfig import get_platlib
```



---
## distutils_scheme
```python
from _distutils import distutils_scheme
```

Return a distutils install scheme

---
## get_scheme
```python
from _distutils import get_scheme
```

Get the "scheme" corresponding to the input parameters. The distutils
documentation provides the context for the available schemes:
https://docs.python.org/3/install/index.html#alternate-installation

:param dist_name: the name of the package to retrieve the scheme for, used
    in the headers scheme path
:param user: indicates to use the "user" scheme
:param home: indicates to use the "home" scheme and provides the base
    directory for the same
:param root: root under which other directories are re-based
:param isolated: equivalent to --no-user-cfg, i.e. do not consider
    ~/.pydistutils.cfg (posix) or ~/pydistutils.cfg (non-posix) for
    scheme paths
:param prefix: indicates to use the "prefix" scheme and provides the
    base directory for the same

---
## get_bin_prefix
```python
from _distutils import get_bin_prefix
```



---
## get_purelib
```python
from _distutils import get_purelib
```



---
## get_platlib
```python
from _distutils import get_platlib
```



---
## get_major_minor_version
```python
from base import get_major_minor_version
```

Return the major-minor version of the current Python as a string, e.g.
"3.7" or "3.10".

---
## change_root
```python
from base import change_root
```

Return 'pathname' with 'new_root' prepended.

If 'pathname' is relative, this is equivalent to os.path.join(new_root, pathname).
Otherwise, it requires making 'pathname' relative and then joining the
two, which is tricky on DOS/Windows and Mac OS.

This is borrowed from Python's standard library's distutils module.

---
## get_src_prefix
```python
from base import get_src_prefix
```



---
## is_osx_framework
```python
from base import is_osx_framework
```



---
## __name__
```python
from collector import __name__
```

The main purpose of this module is to expose LinkCollector.collect_sources().

---
## _match_vcs_scheme
```python
from collector import _match_vcs_scheme
```

Look for VCS schemes in the URL.

Returns the matched VCS scheme, or None if there's no match.

---
## _NotAPIContent
```python
from collector import _NotAPIContent
```



---
## _ensure_api_header
```python
from collector import _ensure_api_header
```

Check the Content-Type header to ensure the response contains a Simple
API Response.

Raises `_NotAPIContent` if the content type is not a valid content-type.

---
## _NotHTTP
```python
from collector import _NotHTTP
```



---
## _ensure_api_response
```python
from collector import _ensure_api_response
```

Send a HEAD request to the URL, and ensure the response contains a simple
API Response.

Raises `_NotHTTP` if the URL is not available for a HEAD request, or
`_NotAPIContent` if the content type is not a valid content type.

---
## _get_simple_response
```python
from collector import _get_simple_response
```

Access an Simple API response with GET, and return the response.

This consists of three parts:

1. If the URL looks suspiciously like an archive, send a HEAD first to
   check the Content-Type is HTML or Simple API, to avoid downloading a
   large file. Raise `_NotHTTP` if the content type cannot be determined, or
   `_NotAPIContent` if it is not HTML or a Simple API.
2. Actually perform the request. Raise HTTP exceptions on network failures.
3. Check the Content-Type header to make sure we got a Simple API response,
   and raise `_NotAPIContent` otherwise.

---
## _get_encoding_from_headers
```python
from collector import _get_encoding_from_headers
```

Determine if we have any encoding information in our headers.

---
## CacheablePageContent
```python
from collector import CacheablePageContent
```



---
## ParseLinks
```python
from collector import ParseLinks
```



---
## with_cached_index_content
```python
from collector import with_cached_index_content
```

Given a function that parses an Iterable[Link] from an IndexContent, cache the
function's result (keyed by CacheablePageContent), unless the IndexContent
`page` has `page.cache_link_parsing == False`.

---
## parse_links
```python
from collector import parse_links
```

Parse a Simple API's Index Content, and yield its anchor elements as Link objects.

---
## IndexContent
```python
from collector import IndexContent
```

Represents one response (or page), along with its URL.

:param encoding: the encoding to decode the given content.
:param url: the URL from which the HTML was downloaded.
:param cache_link_parsing: whether links parsed from this page's url
                           should be cached. PyPI index urls should
                           have this set to False, for example.

---
## HTMLLinkParser
```python
from collector import HTMLLinkParser
```

HTMLParser that keeps the first base HREF and a list of all anchor
elements' attributes.

---
## _handle_get_simple_fail
```python
from collector import _handle_get_simple_fail
```



---
## _make_index_content
```python
from collector import _make_index_content
```



---
## _get_index_content
```python
from collector import _get_index_content
```



---
## CollectedSources
```python
from collector import CollectedSources
```



---
## LinkCollector
```python
from collector import LinkCollector
```

Responsible for collecting Link objects from all configured locations,
making network requests as needed.

The class's main method is its collect_sources() method.

---
## __init__
```python
from collector import __init__
```



---
## __eq__
```python
from collector import __eq__
```



---
## __hash__
```python
from collector import __hash__
```



---
## __call__
```python
from collector import __call__
```



---
## wrapper
```python
from collector import wrapper
```



---
## wrapper_wrapper
```python
from collector import wrapper_wrapper
```



---
## __str__
```python
from collector import __str__
```



---
## handle_starttag
```python
from collector import handle_starttag
```



---
## get_href
```python
from collector import get_href
```



---
## create
```python
from collector import create
```

:param session: The Session to use to make requests.
:param suppress_no_index: Whether to ignore the --no-index option
    when constructing the SearchScope object.

---
## find_links
```python
from collector import find_links
```



---
## fetch_response
```python
from collector import fetch_response
```

Fetch an HTML page containing package links.

---
## collect_sources
```python
from collector import collect_sources
```



---
## __name__
```python
from sources import __name__
```



---
## LinkSource
```python
from sources import LinkSource
```



---
## _is_html_file
```python
from sources import _is_html_file
```



---
## _FlatDirectoryToUrls
```python
from sources import _FlatDirectoryToUrls
```

Scans directory and caches results

---
## _FlatDirectorySource
```python
from sources import _FlatDirectorySource
```

Link source specified by ``--find-links=<path-to-dir>``.

This looks the content of the directory, and returns:

* ``page_candidates``: Links listed on each HTML file in the directory.
* ``file_candidates``: Archives in the directory.

---
## _LocalFileSource
```python
from sources import _LocalFileSource
```

``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
the option, it is converted to a URL first. This returns:

* ``page_candidates``: Links listed on an HTML file.
* ``file_candidates``: The non-HTML file.

---
## _RemoteFileSource
```python
from sources import _RemoteFileSource
```

``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

This returns:

* ``page_candidates``: Links listed on an HTML file.
* ``file_candidates``: The non-HTML file.

---
## _IndexDirectorySource
```python
from sources import _IndexDirectorySource
```

``--[extra-]index-url=<path-to-directory>``.

This is treated like a remote URL; ``candidates_from_page`` contains logic
for this by appending ``index.html`` to the link.

---
## build_source
```python
from sources import build_source
```



---
## link
```python
from sources import link
```



---
## page_candidates
```python
from sources import page_candidates
```



---
## file_links
```python
from sources import file_links
```



---
## __init__
```python
from sources import __init__
```



---
## _scan_directory
```python
from sources import _scan_directory
```

Scans directory once and populates both page_candidates
and project_name_to_urls at the same time

---
## project_name_to_urls
```python
from sources import project_name_to_urls
```



---
## __name__
```python
from package_finder import __name__
```

Routines related to PyPI, indexes

---
## _check_link_requires_python
```python
from package_finder import _check_link_requires_python
```

Return whether the given Python version is compatible with a link's
"Requires-Python" value.

:param version_info: A 3-tuple of ints representing the Python
    major-minor-micro version to check.
:param ignore_requires_python: Whether to ignore the "Requires-Python"
    value if the given Python version isn't compatible.

---
## LinkType
```python
from package_finder import LinkType
```



---
## LinkEvaluator
```python
from package_finder import LinkEvaluator
```

Responsible for evaluating links for a particular project.

---
## filter_unallowed_hashes
```python
from package_finder import filter_unallowed_hashes
```

Filter out candidates whose hashes aren't allowed, and return a new
list of candidates.

If at least one candidate has an allowed hash, then all candidates with
either an allowed hash or no hash specified are returned.  Otherwise,
the given candidates are returned.

Including the candidates with no hash specified when there is a match
allows a warning to be logged if there is a more preferred candidate
with no hash specified.  Returning all candidates in the case of no
matches lets pip report the hash of the candidate that would otherwise
have been installed (e.g. permitting the user to more easily update
their requirements file with the desired hash).

---
## CandidatePreferences
```python
from package_finder import CandidatePreferences
```

Encapsulates some of the preferences for filtering and sorting
InstallationCandidate objects.

---
## BestCandidateResult
```python
from package_finder import BestCandidateResult
```

A collection of candidates, returned by `PackageFinder.find_best_candidate`.

This class is only intended to be instantiated by CandidateEvaluator's
`compute_best_candidate()` method.

---
## CandidateEvaluator
```python
from package_finder import CandidateEvaluator
```

Responsible for filtering and sorting candidates for installation based
on what tags are valid.

---
## PackageFinder
```python
from package_finder import PackageFinder
```

This finds packages.

This is meant to match easy_install's technique for looking for
packages, by reading pages and looking for appropriate links.

---
## _find_name_version_sep
```python
from package_finder import _find_name_version_sep
```

Find the separator's index based on the package's canonical name.

:param fragment: A <package>+<version> filename "fragment" (stem) or
    egg fragment.
:param canonical_name: The package's canonical name.

This function is needed since the canonicalized name does not necessarily
have the same length as the egg info's name part. An example::

>>> fragment = 'foo__bar-1.0'
>>> canonical_name = 'foo-bar'
>>> _find_name_version_sep(fragment, canonical_name)
8

---
## _extract_version_from_fragment
```python
from package_finder import _extract_version_from_fragment
```

Parse the version string from a <package>+<version> filename
"fragment" (stem) or egg fragment.

:param fragment: The string to parse. E.g. foo-2.1
:param canonical_name: The canonicalized name of the package this
    belongs to.

---
## __init__
```python
from package_finder import __init__
```

This constructor is primarily meant to be used by the create() class
method and from tests.

:param format_control: A FormatControl object, used to control
    the selection of source packages / binary packages when consulting
    the index and links.
:param candidate_prefs: Options to use when creating a
    CandidateEvaluator object.

---
## evaluate_link
```python
from package_finder import evaluate_link
```

Determine whether a link is a candidate for installation.

:return: A tuple (result, detail), where *result* is an enum
    representing whether the evaluation found a candidate, or the reason
    why one is not found. If a candidate is found, *detail* will be the
    candidate's version string; if one is not found, it contains the
    reason the link fails to qualify.

---
## iter_all
```python
from package_finder import iter_all
```

Iterate through all candidates.

---
## iter_applicable
```python
from package_finder import iter_applicable
```

Iterate through the applicable candidates.

---
## create
```python
from package_finder import create
```

Create a PackageFinder.

:param selection_prefs: The candidate selection preferences, as a
    SelectionPreferences object.
:param target_python: The target Python interpreter to use when
    checking compatibility. If None (the default), a TargetPython
    object will be constructed from the running Python.

---
## get_applicable_candidates
```python
from package_finder import get_applicable_candidates
```

Return the applicable candidates from a list of candidates.

---
## _sort_key
```python
from package_finder import _sort_key
```

Function to pass as the `key` argument to a call to sorted() to sort
InstallationCandidates by preference.

Returns a tuple such that tuples sorting as greater using Python's
default comparison operator are more preferred.

The preference is as follows:

First and foremost, candidates with allowed (matching) hashes are
always preferred over candidates without matching hashes. This is
because e.g. if the only candidate with an allowed hash is yanked,
we still want to use that candidate.

Second, excepting hash considerations, candidates that have been
yanked (in the sense of PEP 592) are always less preferred than
candidates that haven't been yanked. Then:

If not finding wheels, they are sorted by version only.
If finding wheels, then the sort order is by version, then:
  1. existing installs
  2. wheels ordered via Wheel.support_index_min(self._supported_tags)
  3. source archives
If prefer_binary was set, then all wheels are sorted above sources.

Note: it was considered to embed this logic into the Link
      comparison operators, but then different sdist links
      with the same version, would have to be considered equal

---
## sort_best_candidate
```python
from package_finder import sort_best_candidate
```

Return the best candidate per the instance's sort order, or None if
no candidate is acceptable.

---
## compute_best_candidate
```python
from package_finder import compute_best_candidate
```

Compute and return a `BestCandidateResult` instance.

---
## target_python
```python
from package_finder import target_python
```



---
## search_scope
```python
from package_finder import search_scope
```



---
## find_links
```python
from package_finder import find_links
```



---
## index_urls
```python
from package_finder import index_urls
```



---
## trusted_hosts
```python
from package_finder import trusted_hosts
```



---
## allow_all_prereleases
```python
from package_finder import allow_all_prereleases
```



---
## set_allow_all_prereleases
```python
from package_finder import set_allow_all_prereleases
```



---
## prefer_binary
```python
from package_finder import prefer_binary
```



---
## set_prefer_binary
```python
from package_finder import set_prefer_binary
```



---
## requires_python_skipped_reasons
```python
from package_finder import requires_python_skipped_reasons
```



---
## make_link_evaluator
```python
from package_finder import make_link_evaluator
```



---
## _sort_links
```python
from package_finder import _sort_links
```

Returns elements of links in order, non-egg links first, egg links
second, while eliminating duplicates

---
## _log_skipped_link
```python
from package_finder import _log_skipped_link
```



---
## get_install_candidate
```python
from package_finder import get_install_candidate
```

If the link is a candidate for install, convert it to an
InstallationCandidate and return it. Otherwise, return None.

---
## evaluate_links
```python
from package_finder import evaluate_links
```

Convert links that are candidates to InstallationCandidate objects.

---
## process_project_url
```python
from package_finder import process_project_url
```



---
## find_all_candidates
```python
from package_finder import find_all_candidates
```

Find all available InstallationCandidate for project_name

This checks index_urls and find_links.
All versions found are returned as an InstallationCandidate list.

See LinkEvaluator.evaluate_link() for details on which files
are accepted.

---
## make_candidate_evaluator
```python
from package_finder import make_candidate_evaluator
```

Create a CandidateEvaluator object to use.

---
## find_best_candidate
```python
from package_finder import find_best_candidate
```

Find matches for the given project and specifier.

:param specifier: An optional object implementing `filter`
    (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
    versions.

:return: A `BestCandidateResult` instance.

---
## find_requirement
```python
from package_finder import find_requirement
```

Try to find a Link matching req

Expects req, an InstallRequirement and upgrade, a boolean
Returns a InstallationCandidate if found,
Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise

---
## _format_versions
```python
from package_finder import _format_versions
```



---
## _should_install_candidate
```python
from package_finder import _should_install_candidate
```



---
## ConfigurationCommand
```python
from configuration import ConfigurationCommand
```

Manage local and global configuration.

Subcommands:

- list: List the active configuration (or from the file specified)
- edit: Edit the configuration file in an editor
- get: Get the value associated with command.option
- set: Set the command.option=value
- unset: Unset the value associated with command.option
- debug: List the configuration files and values defined under them

Configuration keys should be dot separated command and option name,
with the special prefix "global" affecting any command. For example,
"pip config set global.index-url https://example.org/" would configure
the index url for all commands, but "pip config set download.timeout 10"
would configure a 10 second timeout only for "pip download" commands.

If none of --user, --global and --site are passed, a virtual
environment configuration file is used if one is active and the file
exists. Otherwise, all modifications happen to the user file by
default.

---
## add_options
```python
from configuration import add_options
```



---
## run
```python
from configuration import run
```



---
## _determine_file
```python
from configuration import _determine_file
```



---
## list_values
```python
from configuration import list_values
```



---
## get_name
```python
from configuration import get_name
```



---
## set_name_value
```python
from configuration import set_name_value
```



---
## unset_name
```python
from configuration import unset_name
```



---
## list_config_values
```python
from configuration import list_config_values
```

List config key-value pairs across different config files

---
## print_config_file_values
```python
from configuration import print_config_file_values
```

Get key-value pairs from the file of a variant

---
## print_env_var_values
```python
from configuration import print_env_var_values
```

Get key-values pairs present as environment variables

---
## open_in_editor
```python
from configuration import open_in_editor
```



---
## _get_n_args
```python
from configuration import _get_n_args
```

Helper to make sure the command got the right number of arguments

---
## _save_configuration
```python
from configuration import _save_configuration
```



---
## _determine_editor
```python
from configuration import _determine_editor
```



---
## __name__
```python
from show import __name__
```



---
## ShowCommand
```python
from show import ShowCommand
```

Show information about one or more installed packages.

The output is in RFC-compliant mail header format.

---
## _PackageInfo
```python
from show import _PackageInfo
```



---
## search_packages_info
```python
from show import search_packages_info
```

Gather details from installed distributions. Print distribution name,
version, location, and installed files. Installed files requires a
pip generated 'installed-files.txt' in the distributions '.egg-info'
directory.

---
## print_results
```python
from show import print_results
```

Print the information from installed distributions found.

---
## add_options
```python
from show import add_options
```



---
## run
```python
from show import run
```



---
## _get_requiring_packages
```python
from show import _get_requiring_packages
```



---
## ListCommand
```python
from list import ListCommand
```

List installed packages, including editables.

Packages are listed in a case-insensitive sorted order.

---
## format_for_columns
```python
from list import format_for_columns
```

Convert the package data into something usable
by output_package_listing_columns.

---
## format_for_json
```python
from list import format_for_json
```



---
## _DistWithLatestInfo
```python
from list import _DistWithLatestInfo
```

Give the distribution object a couple of extra fields.

These will be populated during ``get_outdated()``. This is dirty but
makes the rest of the code much cleaner.

---
## add_options
```python
from list import add_options
```



---
## handle_pip_version_check
```python
from list import handle_pip_version_check
```



---
## _build_package_finder
```python
from list import _build_package_finder
```

Create a package finder appropriate to this list command.

---
## run
```python
from list import run
```



---
## get_outdated
```python
from list import get_outdated
```



---
## get_uptodate
```python
from list import get_uptodate
```



---
## get_not_required
```python
from list import get_not_required
```



---
## iter_packages_latest_infos
```python
from list import iter_packages_latest_infos
```



---
## output_package_listing
```python
from list import output_package_listing
```



---
## output_package_listing_columns
```python
from list import output_package_listing_columns
```



---
## latest_info
```python
from list import latest_info
```



---
## CheckCommand
```python
from check import CheckCommand
```

Verify installed packages have compatible dependencies.

---
## run
```python
from check import run
```



---
## IndexCommand
```python
from index import IndexCommand
```

Inspect information available from package indexes.

---
## add_options
```python
from index import add_options
```



---
## run
```python
from index import run
```



---
## _build_package_finder
```python
from index import _build_package_finder
```

Create a package finder appropriate to the index command.

---
## get_available_package_versions
```python
from index import get_available_package_versions
```



---
## CompletionCommand
```python
from completion import CompletionCommand
```

A helper command to be used for command completion.

---
## add_options
```python
from completion import add_options
```



---
## run
```python
from completion import run
```

Prints the completion code of the given shell

---
## add_options
```python
from download import add_options
```



---
## CacheCommand
```python
from cache import CacheCommand
```

Inspect and manage pip's wheel cache.

Subcommands:

- dir: Show the cache directory.
- info: Show information about the cache.
- list: List filenames of packages stored in the cache.
- remove: Remove one or more package from the cache.
- purge: Remove all items from the cache.

``<pattern>`` can be a glob expression or a package name.

---
## add_options
```python
from cache import add_options
```



---
## run
```python
from cache import run
```



---
## get_cache_dir
```python
from cache import get_cache_dir
```



---
## get_cache_info
```python
from cache import get_cache_info
```



---
## list_cache_items
```python
from cache import list_cache_items
```



---
## format_for_human
```python
from cache import format_for_human
```



---
## format_for_abspath
```python
from cache import format_for_abspath
```



---
## remove_cache_items
```python
from cache import remove_cache_items
```



---
## purge_cache
```python
from cache import purge_cache
```



---
## _cache_dir
```python
from cache import _cache_dir
```



---
## _find_http_files
```python
from cache import _find_http_files
```



---
## _find_wheels
```python
from cache import _find_wheels
```



---
## create_command
```python
from __init__ import create_command
```

Create an instance of the Command class with the given name.

---
## get_similar_commands
```python
from __init__ import get_similar_commands
```

Command name auto-correct.

---
## __name__
```python
from hash import __name__
```



---
## HashCommand
```python
from hash import HashCommand
```

Compute a hash of a local package archive.

These can be used with --hash in a requirements file to do repeatable
installs.

---
## _hash_of_file
```python
from hash import _hash_of_file
```

Return the hash digest of a file.

---
## add_options
```python
from hash import add_options
```



---
## run
```python
from hash import run
```



---
## InspectCommand
```python
from inspect import InspectCommand
```

Inspect the content of a Python environment and produce a report in JSON format.

---
## add_options
```python
from inspect import add_options
```



---
## run
```python
from inspect import run
```



---
## _dist_to_dict
```python
from inspect import _dist_to_dict
```



---
## show_value
```python
from debug import show_value
```



---
## show_sys_implementation
```python
from debug import show_sys_implementation
```



---
## create_vendor_txt_map
```python
from debug import create_vendor_txt_map
```



---
## get_module_from_module_name
```python
from debug import get_module_from_module_name
```



---
## get_vendor_version_from_module
```python
from debug import get_vendor_version_from_module
```



---
## show_actual_vendor_versions
```python
from debug import show_actual_vendor_versions
```

Log the actual version and print extra info if there is
a conflict or if the actual version could not be imported.

---
## show_vendor_versions
```python
from debug import show_vendor_versions
```



---
## show_tags
```python
from debug import show_tags
```



---
## ca_bundle_info
```python
from debug import ca_bundle_info
```



---
## DebugCommand
```python
from debug import DebugCommand
```

Display debug information.

---
## add_options
```python
from debug import add_options
```



---
## run
```python
from debug import run
```



---
## __name__
```python
from uninstall import __name__
```



---
## UninstallCommand
```python
from uninstall import UninstallCommand
```

Uninstall packages.

pip is able to uninstall most installed packages. Known exceptions are:

- Pure distutils packages installed with ``python setup.py install``, which
  leave behind no metadata to determine what files were installed.
- Script wrappers installed by ``python setup.py develop``.

---
## add_options
```python
from uninstall import add_options
```



---
## run
```python
from uninstall import run
```



---
## _should_suppress_build_backends
```python
from freeze import _should_suppress_build_backends
```



---
## _dev_pkgs
```python
from freeze import _dev_pkgs
```



---
## FreezeCommand
```python
from freeze import FreezeCommand
```

Output installed packages in requirements format.

packages are listed in a case-insensitive sorted order.

---
## add_options
```python
from freeze import add_options
```



---
## run
```python
from freeze import run
```



---
## SearchCommand
```python
from search import SearchCommand
```

Search for PyPI packages whose name or summary contains <query>.

---
## transform_hits
```python
from search import transform_hits
```

The list from pypi is really a list of versions. We want a list of
packages with the list of versions stored inline. This converts the
list from pypi into one we can use.

---
## print_dist_installation_info
```python
from search import print_dist_installation_info
```



---
## print_results
```python
from search import print_results
```



---
## highest_version
```python
from search import highest_version
```



---
## TransformedHit
```python
from search import TransformedHit
```



---
## add_options
```python
from search import add_options
```



---
## run
```python
from search import run
```



---
## __name__
```python
from install import __name__
```



---
## InstallCommand
```python
from install import InstallCommand
```

Install packages from:

- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.

pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.

---
## get_lib_location_guesses
```python
from install import get_lib_location_guesses
```



---
## site_packages_writable
```python
from install import site_packages_writable
```



---
## decide_user_install
```python
from install import decide_user_install
```

Determine whether to do a user install based on the input options.

If use_user_site is False, no additional checks are done.
If use_user_site is True, it is checked for compatibility with other
options.
If use_user_site is None, the default behaviour depends on the environment,
which is provided by the other arguments.

---
## create_os_error_message
```python
from install import create_os_error_message
```

Format an error message for an OSError

It may occur anytime during the execution of the install command.

---
## add_options
```python
from install import add_options
```



---
## run
```python
from install import run
```



---
## _handle_target_dir
```python
from install import _handle_target_dir
```



---
## _determine_conflicts
```python
from install import _determine_conflicts
```



---
## _warn_about_conflicts
```python
from install import _warn_about_conflicts
```



---
## HelpCommand
```python
from help import HelpCommand
```

Show help for commands

---
## run
```python
from help import run
```



---
## WheelCommand
```python
from wheel import WheelCommand
```

Build Wheel archives for your requirements and dependencies.

Wheel is a built-package format, and offers the advantage of not
recompiling your software during every install. For more details, see the
wheel docs: https://wheel.readthedocs.io/en/latest/

'pip wheel' uses the build system interface as described here:
https://pip.pypa.io/en/stable/reference/build-system/

---
## add_options
```python
from wheel import add_options
```



---
## run
```python
from wheel import run
```



---
## __name__
```python
from _json import __name__
```



---
## json_name
```python
from _json import json_name
```



---
## msg_to_json
```python
from _json import msg_to_json
```

Convert a Message object into a JSON-compatible dictionary.

---
## sanitise_header
```python
from _json import sanitise_header
```



---
## _should_use_importlib_metadata
```python
from __init__ import _should_use_importlib_metadata
```

Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.

By default, pip uses ``importlib.metadata`` on Python 3.11+, and
``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:

* If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
  dictates whether ``importlib.metadata`` is used, regardless of Python
  version.
* On Python 3.11+, Python distributors can patch ``importlib.metadata``
  to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This
  makes pip use ``pkg_resources`` (unless the user set the aforementioned
  environment variable to *True*).

---
## Backend
```python
from __init__ import Backend
```



---
## select_backend
```python
from __init__ import select_backend
```



---
## get_default_environment
```python
from __init__ import get_default_environment
```

Get the default representation for the current environment.

This returns an Environment instance from the chosen backend. The default
Environment instance should be built from ``sys.path`` and may use caching
to share instance state accorss calls.

---
## get_environment
```python
from __init__ import get_environment
```

Get a representation of the environment specified by ``paths``.

This returns an Environment instance from the chosen backend based on the
given import paths. The backend must build a fresh instance representing
the state of installed distributions when this function is called.

---
## get_directory_distribution
```python
from __init__ import get_directory_distribution
```

Get the distribution metadata representation in the specified directory.

This returns a Distribution instance from the chosen backend based on
the given on-disk ``.dist-info`` directory.

---
## get_wheel_distribution
```python
from __init__ import get_wheel_distribution
```

Get the representation of the specified wheel's distribution metadata.

This returns a Distribution instance from the chosen backend based on
the given wheel's ``.dist-info`` directory.

:param canonical_name: Normalized project name of the given wheel.

---
## get_metadata_distribution
```python
from __init__ import get_metadata_distribution
```

Get the dist representation of the specified METADATA file contents.

This returns a Distribution instance from the chosen backend sourced from the data
in `metadata_contents`.

:param metadata_contents: Contents of a METADATA file within a dist, or one served
                          via PEP 658.
:param filename: Filename for the dist this metadata represents.
:param canonical_name: Normalized project name of the given dist.

---
## __name__
```python
from pkg_resources import __name__
```



---
## EntryPoint
```python
from pkg_resources import EntryPoint
```



---
## InMemoryMetadata
```python
from pkg_resources import InMemoryMetadata
```

IMetadataProvider that reads metadata files from a dictionary.

This also maps metadata decoding exceptions to our internal exception type.

---
## Distribution
```python
from pkg_resources import Distribution
```



---
## Environment
```python
from pkg_resources import Environment
```



---
## __init__
```python
from pkg_resources import __init__
```



---
## has_metadata
```python
from pkg_resources import has_metadata
```



---
## get_metadata
```python
from pkg_resources import get_metadata
```



---
## get_metadata_lines
```python
from pkg_resources import get_metadata_lines
```



---
## metadata_isdir
```python
from pkg_resources import metadata_isdir
```



---
## metadata_listdir
```python
from pkg_resources import metadata_listdir
```



---
## run_script
```python
from pkg_resources import run_script
```



---
## _extra_mapping
```python
from pkg_resources import _extra_mapping
```



---
## from_directory
```python
from pkg_resources import from_directory
```



---
## from_metadata_file_contents
```python
from pkg_resources import from_metadata_file_contents
```



---
## from_wheel
```python
from pkg_resources import from_wheel
```



---
## location
```python
from pkg_resources import location
```



---
## installed_location
```python
from pkg_resources import installed_location
```



---
## info_location
```python
from pkg_resources import info_location
```



---
## installed_by_distutils
```python
from pkg_resources import installed_by_distutils
```



---
## canonical_name
```python
from pkg_resources import canonical_name
```



---
## version
```python
from pkg_resources import version
```



---
## raw_version
```python
from pkg_resources import raw_version
```



---
## is_file
```python
from pkg_resources import is_file
```



---
## iter_distutils_script_names
```python
from pkg_resources import iter_distutils_script_names
```



---
## read_text
```python
from pkg_resources import read_text
```



---
## iter_entry_points
```python
from pkg_resources import iter_entry_points
```



---
## _metadata_impl
```python
from pkg_resources import _metadata_impl
```

:raises NoneMetadataError: if the distribution reports `has_metadata()`
True but `get_metadata()` returns None.

---
## iter_dependencies
```python
from pkg_resources import iter_dependencies
```



---
## iter_provided_extras
```python
from pkg_resources import iter_provided_extras
```



---
## default
```python
from pkg_resources import default
```



---
## from_paths
```python
from pkg_resources import from_paths
```



---
## _iter_distributions
```python
from pkg_resources import _iter_distributions
```



---
## _search_distribution
```python
from pkg_resources import _search_distribution
```

Find a distribution matching the ``name`` in the environment.

This searches from *all* distributions available in the environment, to
match the behavior of ``pkg_resources.get_distribution()``.

---
## get_distribution
```python
from pkg_resources import get_distribution
```



---
## BaseEntryPoint
```python
from base import BaseEntryPoint
```



---
## _convert_installed_files_path
```python
from base import _convert_installed_files_path
```

Convert a legacy installed-files.txt path into modern RECORD path.

The legacy format stores paths relative to the info directory, while the
modern format stores paths relative to the package root, e.g. the
site-packages directory.

:param entry: Path parts of the installed-files.txt entry.
:param info: Path parts of the egg-info directory relative to package root.
:returns: The converted entry.

For best compatibility with symlinks, this does not use ``abspath()`` or
``Path.resolve()``, but tries to work with path parts:

1. While ``entry`` starts with ``..``, remove the equal amounts of parts
   from ``info``; if ``info`` is empty, start appending ``..`` instead.
2. Join the two directly.

---
## RequiresEntry
```python
from base import RequiresEntry
```



---
## BaseDistribution
```python
from base import BaseDistribution
```



---
## BaseEnvironment
```python
from base import BaseEnvironment
```

An environment containing distributions to introspect.

---
## Wheel
```python
from base import Wheel
```



---
## FilesystemWheel
```python
from base import FilesystemWheel
```



---
## MemoryWheel
```python
from base import MemoryWheel
```



---
## name
```python
from base import name
```



---
## value
```python
from base import value
```



---
## group
```python
from base import group
```



---
## from_directory
```python
from base import from_directory
```

Load the distribution from a metadata directory.

:param directory: Path to a metadata directory, e.g. ``.dist-info``.

---
## from_metadata_file_contents
```python
from base import from_metadata_file_contents
```

Load the distribution from the contents of a METADATA file.

This is used to implement PEP 658 by generating a "shallow" dist object that can
be used for resolution without downloading or building the actual dist yet.

:param metadata_contents: The contents of a METADATA file.
:param filename: File name for the dist with this metadata.
:param project_name: Name of the project this dist represents.

---
## from_wheel
```python
from base import from_wheel
```

Load the distribution from a given wheel.

:param wheel: A concrete wheel definition.
:param name: File name of the wheel.

:raises InvalidWheel: Whenever loading of the wheel causes a
    :py:exc:`zipfile.BadZipFile` exception to be thrown.
:raises UnsupportedWheel: If the wheel is a valid zip, but malformed
    internally.

---
## location
```python
from base import location
```

Where the distribution is loaded from.

A string value is not necessarily a filesystem path, since distributions
can be loaded from other sources, e.g. arbitrary zip archives. ``None``
means the distribution is created in-memory.

Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
this is a symbolic link, we want to preserve the relative path between
it and files in the distribution.

---
## editable_project_location
```python
from base import editable_project_location
```

The project location for editable distributions.

This is the directory where pyproject.toml or setup.py is located.
None if the distribution is not installed in editable mode.

---
## installed_location
```python
from base import installed_location
```

The distribution's "installed" location.

This should generally be a ``site-packages`` directory. This is
usually ``dist.location``, except for legacy develop-installed packages,
where ``dist.location`` is the source code location, and this is where
the ``.egg-link`` file is.

The returned location is normalized (in particular, with symlinks removed).

---
## info_location
```python
from base import info_location
```

Location of the .[egg|dist]-info directory or file.

Similarly to ``location``, a string value is not necessarily a
filesystem path. ``None`` means the distribution is created in-memory.

For a modern .dist-info installation on disk, this should be something
like ``{location}/{raw_name}-{version}.dist-info``.

Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
this is a symbolic link, we want to preserve the relative path between
it and other files in the distribution.

---
## installed_by_distutils
```python
from base import installed_by_distutils
```

Whether this distribution is installed with legacy distutils format.

A distribution installed with "raw" distutils not patched by setuptools
uses one single file at ``info_location`` to store metadata. We need to
treat this specially on uninstallation.

---
## installed_as_egg
```python
from base import installed_as_egg
```

Whether this distribution is installed as an egg.

This usually indicates the distribution was installed by (older versions
of) easy_install.

---
## installed_with_setuptools_egg_info
```python
from base import installed_with_setuptools_egg_info
```

Whether this distribution is installed with the ``.egg-info`` format.

This usually indicates the distribution was installed with setuptools
with an old pip version or with ``single-version-externally-managed``.

Note that this ensure the metadata store is a directory. distutils can
also installs an ``.egg-info``, but as a file, not a directory. This
property is *False* for that case. Also see ``installed_by_distutils``.

---
## installed_with_dist_info
```python
from base import installed_with_dist_info
```

Whether this distribution is installed with the "modern format".

This indicates a "modern" installation, e.g. storing metadata in the
``.dist-info`` directory. This applies to installations made by
setuptools (but through pip, not directly), or anything using the
standardized build backend interface (PEP 517).

---
## canonical_name
```python
from base import canonical_name
```



---
## version
```python
from base import version
```



---
## raw_version
```python
from base import raw_version
```



---
## setuptools_filename
```python
from base import setuptools_filename
```

Convert a project name to its setuptools-compatible filename.

This is a copy of ``pkg_resources.to_filename()`` for compatibility.

---
## direct_url
```python
from base import direct_url
```

Obtain a DirectUrl from this distribution.

Returns None if the distribution has no `direct_url.json` metadata,
or if `direct_url.json` is invalid.

---
## installer
```python
from base import installer
```



---
## requested
```python
from base import requested
```



---
## editable
```python
from base import editable
```



---
## local
```python
from base import local
```

If distribution is installed in the current virtual environment.

Always True if we're not in a virtualenv.

---
## in_usersite
```python
from base import in_usersite
```



---
## in_site_packages
```python
from base import in_site_packages
```



---
## is_file
```python
from base import is_file
```

Check whether an entry in the info directory is a file.

---
## iter_distutils_script_names
```python
from base import iter_distutils_script_names
```

Find distutils 'scripts' entries metadata.

If 'scripts' is supplied in ``setup.py``, distutils records those in the
installed distribution's ``scripts`` directory, a file for each script.

---
## read_text
```python
from base import read_text
```

Read a file in the info directory.

:raise FileNotFoundError: If ``path`` does not exist in the directory.
:raise NoneMetadataError: If ``path`` exists in the info directory, but
    cannot be read.

---
## iter_entry_points
```python
from base import iter_entry_points
```



---
## _metadata_impl
```python
from base import _metadata_impl
```



---
## metadata
```python
from base import metadata
```

Metadata of distribution parsed from e.g. METADATA or PKG-INFO.

This should return an empty message if the metadata file is unavailable.

:raises NoneMetadataError: If the metadata file is available, but does
    not contain valid metadata.

---
## metadata_dict
```python
from base import metadata_dict
```

PEP 566 compliant JSON-serializable representation of METADATA or PKG-INFO.

This should return an empty dict if the metadata file is unavailable.

:raises NoneMetadataError: If the metadata file is available, but does
    not contain valid metadata.

---
## metadata_version
```python
from base import metadata_version
```

Value of "Metadata-Version:" in distribution metadata, if available.

---
## raw_name
```python
from base import raw_name
```

Value of "Name:" in distribution metadata.

---
## requires_python
```python
from base import requires_python
```

Value of "Requires-Python:" in distribution metadata.

If the key does not exist or contains an invalid value, an empty
SpecifierSet should be returned.

---
## iter_dependencies
```python
from base import iter_dependencies
```



---
## iter_raw_dependencies
```python
from base import iter_raw_dependencies
```

Raw Requires-Dist metadata.

---
## iter_provided_extras
```python
from base import iter_provided_extras
```

Extras provided by this distribution.

For modern .dist-info distributions, this is the collection of
"Provides-Extra:" entries in distribution metadata.

The return value of this function is expected to be normalised names,
per PEP 685, with the returned value being handled appropriately by
`iter_dependencies`.

---
## _iter_declared_entries_from_record
```python
from base import _iter_declared_entries_from_record
```



---
## _iter_declared_entries_from_legacy
```python
from base import _iter_declared_entries_from_legacy
```



---
## iter_declared_entries
```python
from base import iter_declared_entries
```

Iterate through file entries declared in this distribution.

For modern .dist-info distributions, this is the files listed in the
``RECORD`` metadata file. For legacy setuptools distributions, this
comes from ``installed-files.txt``, with entries normalized to be
compatible with the format used by ``RECORD``.

:return: An iterator for listed entries, or None if the distribution
    contains neither ``RECORD`` nor ``installed-files.txt``.

---
## _iter_requires_txt_entries
```python
from base import _iter_requires_txt_entries
```

Parse a ``requires.txt`` in an egg-info directory.

This is an INI-ish format where an egg-info stores dependencies. A
section name describes extra other environment markers, while each entry
is an arbitrary string (not a key-value pair) representing a dependency
as a requirement string (no markers).

There is a construct in ``importlib.metadata`` called ``Sectioned`` that
does mostly the same, but the format is currently considered private.

---
## _iter_egg_info_extras
```python
from base import _iter_egg_info_extras
```

Get extras from the egg-info directory.

---
## _iter_egg_info_dependencies
```python
from base import _iter_egg_info_dependencies
```

Get distribution dependencies from the egg-info directory.

To ease parsing, this converts a legacy dependency entry into a PEP 508
requirement string. Like ``_iter_requires_txt_entries()``, there is code
in ``importlib.metadata`` that does mostly the same, but not do exactly
what we need.

Namely, ``importlib.metadata`` does not normalize the extra name before
putting it into the requirement string, which causes marker comparison
to fail because the dist-info format do normalize. This is consistent in
all currently available PEP 517 backends, although not standardized.

---
## _add_egg_info_requires
```python
from base import _add_egg_info_requires
```

Add egg-info requires.txt information to the metadata.

---
## default
```python
from base import default
```



---
## from_paths
```python
from base import from_paths
```



---
## get_distribution
```python
from base import get_distribution
```

Given a requirement name, return the installed distributions.

The name may not be normalized. The implementation must canonicalize
it for lookup.

---
## _iter_distributions
```python
from base import _iter_distributions
```

Iterate through installed distributions.

This function should be implemented by subclass, but never called
directly. Use the public ``iter_distribution()`` instead, which
implements additional logic to make sure the distributions are valid.

---
## iter_all_distributions
```python
from base import iter_all_distributions
```

Iterate through all installed distributions without any filtering.

---
## iter_installed_distributions
```python
from base import iter_installed_distributions
```

Return a list of installed distributions.

This is based on ``iter_all_distributions()`` with additional filtering
options. Note that ``iter_installed_distributions()`` without arguments
is *not* equal to ``iter_all_distributions()``, since some of the
configurations exclude packages by default.

:param local_only: If True (default), only return installations
local to the current virtualenv, if in a virtualenv.
:param skip: An iterable of canonicalized project names to ignore;
    defaults to ``stdlib_pkgs``.
:param include_editables: If False, don't report editables.
:param editables_only: If True, only report editables.
:param user_only: If True, only report installations in the user
site directory.

---
## as_zipfile
```python
from base import as_zipfile
```



---
## make_distribution_for_install_requirement
```python
from __init__ import make_distribution_for_install_requirement
```

Returns a Distribution for the given InstallRequirement

---
## SourceDistribution
```python
from sdist import SourceDistribution
```

Represents a source distribution.

The preparation step for these needs metadata for the packages to be
generated, either using PEP 517 or using the legacy `setup.py egg_info`.

---
## build_tracker_id
```python
from sdist import build_tracker_id
```

Identify this requirement uniquely by its link.

---
## get_metadata_distribution
```python
from sdist import get_metadata_distribution
```



---
## prepare_distribution_metadata
```python
from sdist import prepare_distribution_metadata
```



---
## _prepare_build_backend
```python
from sdist import _prepare_build_backend
```



---
## _get_build_requires_wheel
```python
from sdist import _get_build_requires_wheel
```



---
## _get_build_requires_editable
```python
from sdist import _get_build_requires_editable
```



---
## _install_build_reqs
```python
from sdist import _install_build_reqs
```



---
## _raise_conflicts
```python
from sdist import _raise_conflicts
```



---
## _raise_missing_reqs
```python
from sdist import _raise_missing_reqs
```



---
## InstalledDistribution
```python
from installed import InstalledDistribution
```

Represents an installed package.

This does not need any preparation as the required information has already
been computed.

---
## build_tracker_id
```python
from installed import build_tracker_id
```



---
## get_metadata_distribution
```python
from installed import get_metadata_distribution
```



---
## prepare_distribution_metadata
```python
from installed import prepare_distribution_metadata
```



---
## AbstractDistribution
```python
from base import AbstractDistribution
```

A base class for handling installable artifacts.

The requirements for anything installable are as follows:

 - we must be able to determine the requirement name
   (or we can't correctly handle the non-upgrade case).

 - for packages with setup requirements, we must also be able
   to determine their requirements without installing additional
   packages (for the same reason as run-time dependencies)

 - we must be able to create a Distribution object exposing the
   above metadata.

 - if we need to do work in the build tracker, we must be able to generate a unique
   string to identify the requirement in the build tracker.

---
## build_tracker_id
```python
from base import build_tracker_id
```

A string that uniquely identifies this requirement to the build tracker.

If None, then this dist has no work to do in the build tracker, and
``.prepare_distribution_metadata()`` will not be called.

---
## get_metadata_distribution
```python
from base import get_metadata_distribution
```



---
## prepare_distribution_metadata
```python
from base import prepare_distribution_metadata
```



---
## WheelDistribution
```python
from wheel import WheelDistribution
```

Represents a wheel distribution.

This does not need any preparation as wheels can be directly unpacked.

---
## build_tracker_id
```python
from wheel import build_tracker_id
```



---
## get_metadata_distribution
```python
from wheel import get_metadata_distribution
```

Loads the metadata from the wheel file into memory and returns a
Distribution that uses it, not relying on the wheel file or
requirement.

---
## prepare_distribution_metadata
```python
from wheel import prepare_distribution_metadata
```



---
## __name__
```python
from editable_legacy import __name__
```

Legacy editable installation process, i.e. `setup.py develop`.

---
## install_editable
```python
from editable_legacy import install_editable
```

Install a package in editable mode. Most arguments are pass-through
to setuptools.

---
## rehash
```python
from wheel import rehash
```

Return (encoded_digest, length) for path using hashlib.sha256()

---
## csv_io_kwargs
```python
from wheel import csv_io_kwargs
```

Return keyword arguments to properly open a CSV file
in the given mode.

---
## fix_script
```python
from wheel import fix_script
```

Replace #!python with #!/path/to/python
Return True if file was changed.

---
## wheel_root_is_purelib
```python
from wheel import wheel_root_is_purelib
```



---
## get_entrypoints
```python
from wheel import get_entrypoints
```



---
## message_about_scripts_not_on_PATH
```python
from wheel import message_about_scripts_not_on_PATH
```

Determine if any scripts are not on PATH and format a warning.
Returns a warning message if one or more scripts are not on PATH,
otherwise None.

---
## _normalized_outrows
```python
from wheel import _normalized_outrows
```

Normalize the given rows of a RECORD file.

Items in each row are converted into str. Rows are then sorted to make
the value more predictable for tests.

Each row is a 3-tuple (path, hash, size) and corresponds to a record of
a RECORD file (see PEP 376 and PEP 427 for details).  For the rows
passed to this function, the size can be an integer as an int or string,
or the empty string.

---
## _record_to_fs_path
```python
from wheel import _record_to_fs_path
```



---
## _fs_to_record_path
```python
from wheel import _fs_to_record_path
```



---
## get_csv_rows_for_installed
```python
from wheel import get_csv_rows_for_installed
```

:param installed: A map from archive RECORD path to installation RECORD
path.

---
## get_console_script_specs
```python
from wheel import get_console_script_specs
```

Given the mapping from entrypoint name to callable, return the relevant
console script specs.

---
## ZipBackedFile
```python
from wheel import ZipBackedFile
```



---
## ScriptFile
```python
from wheel import ScriptFile
```



---
## MissingCallableSuffix
```python
from wheel import MissingCallableSuffix
```



---
## _raise_for_invalid_entrypoint
```python
from wheel import _raise_for_invalid_entrypoint
```



---
## PipScriptMaker
```python
from wheel import PipScriptMaker
```



---
## _install_wheel
```python
from wheel import _install_wheel
```

Install a wheel.

:param name: Name of the project to install
:param wheel_zip: open ZipFile for wheel being installed
:param scheme: Distutils scheme dictating the install directories
:param req_description: String used in place of the requirement, for
    logging
:param pycompile: Whether to byte-compile installed Python files
:param warn_script_location: Whether to check that scripts are installed
    into a directory on PATH
:raises UnsupportedWheel:
    * when the directory holds an unpacked wheel with incompatible
      Wheel-Version
    * when the .dist-info dir does not match the wheel

---
## req_error_context
```python
from wheel import req_error_context
```



---
## install_wheel
```python
from wheel import install_wheel
```



---
## File
```python
from wheel import File
```



---
## _getinfo
```python
from wheel import _getinfo
```



---
## save
```python
from wheel import save
```



---
## make
```python
from wheel import make
```



---
## record_installed
```python
from wheel import record_installed
```

Map archive RECORD paths to installation RECORD paths.

---
## is_dir_path
```python
from wheel import is_dir_path
```



---
## assert_no_path_traversal
```python
from wheel import assert_no_path_traversal
```



---
## root_scheme_file_maker
```python
from wheel import root_scheme_file_maker
```



---
## data_scheme_file_maker
```python
from wheel import data_scheme_file_maker
```



---
## is_data_scheme_path
```python
from wheel import is_data_scheme_path
```



---
## is_script_scheme_path
```python
from wheel import is_script_scheme_path
```



---
## is_entrypoint_wrapper
```python
from wheel import is_entrypoint_wrapper
```



---
## pyc_source_file_paths
```python
from wheel import pyc_source_file_paths
```



---
## pyc_output_path
```python
from wheel import pyc_output_path
```

Return the path the pyc file would have been written to.

---
## _generate_file
```python
from wheel import _generate_file
```



---
## make_root_scheme_file
```python
from wheel import make_root_scheme_file
```



---
## make_data_scheme_file
```python
from wheel import make_data_scheme_file
```



---
## __name__
```python
from wheel_legacy import __name__
```



---
## format_command_result
```python
from wheel_legacy import format_command_result
```

Format command information for logging.

---
## get_legacy_build_wheel_path
```python
from wheel_legacy import get_legacy_build_wheel_path
```

Return the path to the wheel in the temporary build directory.

---
## build_wheel_legacy
```python
from wheel_legacy import build_wheel_legacy
```

Build one unpacked package using the "legacy" build process.

Returns path to wheel if successfully built. Otherwise, returns None.

---
## generate_metadata
```python
from metadata import generate_metadata
```

Generate metadata using mechanisms described in PEP 517.

Returns the generated metadata directory.

---
## __name__
```python
from metadata_editable import __name__
```

Metadata generation logic for source distributions.

---
## generate_editable_metadata
```python
from metadata_editable import generate_editable_metadata
```

Generate metadata using mechanisms described in PEP 660.

Returns the generated metadata directory.

---
## __name__
```python
from wheel_editable import __name__
```



---
## build_wheel_editable
```python
from wheel_editable import build_wheel_editable
```

Build one InstallRequirement using the PEP 660 build process.

Returns path to wheel if successfully built. Otherwise, returns None.

---
## __name__
```python
from metadata_legacy import __name__
```

Metadata generation logic for legacy source distributions.

---
## _find_egg_info
```python
from metadata_legacy import _find_egg_info
```

Find an .egg-info subdirectory in `directory`.

---
## generate_metadata
```python
from metadata_legacy import generate_metadata
```

Generate metadata using setup.py-based defacto mechanisms.

Returns the generated metadata directory.

---
## build_wheel_pep517
```python
from wheel import build_wheel_pep517
```

Build one InstallRequirement using the PEP 517 build process.

Returns path to wheel if successfully built. Otherwise, returns None.

---
## __name__
```python
from build_tracker import __name__
```



---
## update_env_context_manager
```python
from build_tracker import update_env_context_manager
```



---
## get_build_tracker
```python
from build_tracker import get_build_tracker
```



---
## TrackerId
```python
from build_tracker import TrackerId
```

Uniquely identifying string provided to the build tracker.

---
## BuildTracker
```python
from build_tracker import BuildTracker
```

Ensure that an sdist cannot request itself as a setup requirement.

When an sdist is prepared, it identifies its setup requirements in the
context of ``BuildTracker.track()``. If a requirement shows up recursively, this
raises an exception.

This stops fork bombs embedded in malicious packages.

---
## __init__
```python
from build_tracker import __init__
```



---
## __enter__
```python
from build_tracker import __enter__
```



---
## __exit__
```python
from build_tracker import __exit__
```



---
## _entry_path
```python
from build_tracker import _entry_path
```



---
## add
```python
from build_tracker import add
```

Add an InstallRequirement to build tracking.

---
## remove
```python
from build_tracker import remove
```

Remove an InstallRequirement from build tracking.

---
## cleanup
```python
from build_tracker import cleanup
```



---
## track
```python
from build_tracker import track
```

Ensure that `key` cannot install itself as a setup requirement.

:raises LookupError: If `key` was already provided in a parent invocation of
                     the context introduced by this method.

---
## _check_dist_requires_python
```python
from resolver import _check_dist_requires_python
```

Check whether the given Python version is compatible with a distribution's
"Requires-Python" value.

:param version_info: A 3-tuple of ints representing the Python
    major-minor-micro version to check.
:param ignore_requires_python: Whether to ignore the "Requires-Python"
    value if the given Python version isn't compatible.

:raises UnsupportedPythonVersion: When the given Python version isn't
    compatible.

---
## _add_requirement_to_set
```python
from resolver import _add_requirement_to_set
```

Add install_req as a requirement to install.

:param parent_req_name: The name of the requirement that needed this
    added. The name is used because when multiple unnamed requirements
    resolve to the same name, we could otherwise end up with dependency
    links that point outside the Requirements set. parent_req must
    already be added. Note that None implies that this is a user
    supplied requirement, vs an inferred one.
:param extras_requested: an iterable of extras used to evaluate the
    environment markers.
:return: Additional requirements to scan. That is either [] if
    the requirement is not applicable, or [install_req] if the
    requirement is applicable and has just been added.

---
## _is_upgrade_allowed
```python
from resolver import _is_upgrade_allowed
```



---
## _set_req_to_reinstall
```python
from resolver import _set_req_to_reinstall
```

Set a requirement to be installed.

---
## _check_skip_installed
```python
from resolver import _check_skip_installed
```

Check if req_to_install should be skipped.

This will check if the req is installed, and whether we should upgrade
or reinstall it, taking into account all the relevant user options.

After calling this req_to_install will only have satisfied_by set to
None if the req_to_install is to be upgraded/reinstalled etc. Any
other value will be a dist recording the current thing installed that
satisfies the requirement.

Note that for vcs urls and the like we can't assess skipping in this
routine - we simply identify that we need to pull the thing down,
then later on it is pulled down and introspected to assess upgrade/
reinstalls etc.

:return: A text reason for why it was skipped, or None.

---
## _find_requirement_link
```python
from resolver import _find_requirement_link
```



---
## _populate_link
```python
from resolver import _populate_link
```

Ensure that if a link can be found for this, that it is found.

Note that req.link may still be None - if the requirement is already
installed and not needed to be upgraded based on the return value of
_is_upgrade_allowed().

If preparer.require_hashes is True, don't use the wheel cache, because
cached wheels, always built locally, have different hashes than the
files downloaded from the index server and thus throw false hash
mismatches. Furthermore, cached wheels at present have undeterministic
contents due to file modification times.

---
## _get_dist_for
```python
from resolver import _get_dist_for
```

Takes a InstallRequirement and returns a single AbstractDist         representing a prepared variant of the same.
        

---
## _resolve_one
```python
from resolver import _resolve_one
```

Prepare a single requirements file.

:return: A list of additional InstallRequirements to also install.

---
## get_installation_order
```python
from resolver import get_installation_order
```

Get order for installation of requirements in RequirementSet.

The returned list contains a requirement before another that depends on
it. This helps ensure that the environment is kept consistent as they
get installed one-by-one.

The current implementation creates a topological ordering of the
dependency graph, giving more weight to packages with less
or no dependencies, while breaking any cycles in the graph at
arbitrary points. We make no guarantees about where the cycle
would be broken, other than it *would* be broken.

---
## add_req
```python
from resolver import add_req
```



---
## schedule
```python
from resolver import schedule
```



---
## __name__
```python
from provider import __name__
```



---
## _get_with_identifier
```python
from provider import _get_with_identifier
```

Get item from a package name lookup mapping with a resolver identifier.

This extra logic is needed when the target mapping is keyed by package
name, which cannot be directly looked up with an identifier (which may
contain requested extras). Additional logic is added to also look up a value
by "cleaning up" the extras from the identifier.

---
## PipProvider
```python
from provider import PipProvider
```

Pip's provider implementation for resolvelib.

:params constraints: A mapping of constraints specified by the user. Keys
    are canonicalized project names.
:params ignore_dependencies: Whether the user specified ``--no-deps``.
:params upgrade_strategy: The user-specified upgrade strategy.
:params user_requested: A set of canonicalized package names that the user
    supplied for pip to install/upgrade.

---
## __init__
```python
from provider import __init__
```



---
## identify
```python
from provider import identify
```



---
## get_preference
```python
from provider import get_preference
```

Produce a sort key for given requirement based on preference.

The lower the return value is, the more preferred this group of
arguments is.

Currently pip considers the following in order:

* Prefer if any of the known requirements is "direct", e.g. points to an
  explicit URL.
* If equal, prefer if any requirement is "pinned", i.e. contains
  operator ``===`` or ``==``.
* If equal, calculate an approximate "depth" and resolve requirements
  closer to the user-specified requirements first. If the depth cannot
  by determined (eg: due to no matching parents), it is considered
  infinite.
* Order user-specified requirements by the order they are specified.
* If equal, prefers "non-free" requirements, i.e. contains at least one
  operator, such as ``>=`` or ``<``.
* If equal, order alphabetically for consistency (helps debuggability).

---
## find_matches
```python
from provider import find_matches
```



---
## is_satisfied_by
```python
from provider import is_satisfied_by
```



---
## get_dependencies
```python
from provider import get_dependencies
```



---
## is_backtrack_cause
```python
from provider import is_backtrack_cause
```



---
## _eligible_for_upgrade
```python
from provider import _eligible_for_upgrade
```

Are upgrades allowed for this project?

This checks the upgrade strategy, and whether the project was one
that the user specified in the command line, in order to decide
whether we should upgrade if there's a newer version available.

(Note that we don't need access to the `--upgrade` flag, because
an upgrade strategy of "to-satisfy-only" means that `--upgrade`
was not specified).

---
## __name__
```python
from found_candidates import __name__
```

Utilities to lazily create and visit candidates found.

Creating and visiting a candidate is a *very* costly operation. It involves
fetching, extracting, potentially building modules from source, and verifying
distribution metadata. It is therefore crucial for performance to keep
everything here lazy all the way down, so we only touch candidates that we
absolutely need, and not "download the world" when we only need one version of
something.

---
## _iter_built
```python
from found_candidates import _iter_built
```

Iterator for ``FoundCandidates``.

This iterator is used when the package is not already installed. Candidates
from index come later in their normal ordering.

---
## _iter_built_with_prepended
```python
from found_candidates import _iter_built_with_prepended
```

Iterator for ``FoundCandidates``.

This iterator is used when the resolver prefers the already-installed
candidate and NOT to upgrade. The installed candidate is therefore
always yielded first, and candidates from index come later in their
normal ordering, except skipped when the version is already installed.

---
## _iter_built_with_inserted
```python
from found_candidates import _iter_built_with_inserted
```

Iterator for ``FoundCandidates``.

This iterator is used when the resolver prefers to upgrade an
already-installed package. Candidates from index are returned in their
normal ordering, except replaced when the version is already installed.

The implementation iterates through and yields other candidates, inserting
the installed candidate exactly once before we start yielding older or
equivalent candidates, or after all other candidates if they are all newer.

---
## FoundCandidates
```python
from found_candidates import FoundCandidates
```

A lazy sequence to provide candidates to the resolver.

The intended usage is to return this from `find_matches()` so the resolver
can iterate through the sequence multiple times, but only access the index
page when remote packages are actually needed. This improve performances
when suitable candidates are already installed on disk.

---
## __init__
```python
from found_candidates import __init__
```



---
## __getitem__
```python
from found_candidates import __getitem__
```



---
## __iter__
```python
from found_candidates import __iter__
```



---
## __len__
```python
from found_candidates import __len__
```



---
## __bool__
```python
from found_candidates import __bool__
```



---
## __name__
```python
from reporter import __name__
```



---
## PipReporter
```python
from reporter import PipReporter
```



---
## PipDebuggingReporter
```python
from reporter import PipDebuggingReporter
```

A reporter that does an info log for every event it sees.

---
## __init__
```python
from reporter import __init__
```



---
## rejecting_candidate
```python
from reporter import rejecting_candidate
```



---
## starting
```python
from reporter import starting
```



---
## starting_round
```python
from reporter import starting_round
```



---
## ending_round
```python
from reporter import ending_round
```



---
## ending
```python
from reporter import ending
```



---
## adding_requirement
```python
from reporter import adding_requirement
```



---
## pinning
```python
from reporter import pinning
```



---
## __name__
```python
from factory import __name__
```



---
## CollectedRootRequirements
```python
from factory import CollectedRootRequirements
```



---
## Factory
```python
from factory import Factory
```



---
## ConflictCause
```python
from factory import ConflictCause
```



---
## __init__
```python
from factory import __init__
```



---
## force_reinstall
```python
from factory import force_reinstall
```



---
## _fail_if_link_is_unsupported_wheel
```python
from factory import _fail_if_link_is_unsupported_wheel
```



---
## _make_extras_candidate
```python
from factory import _make_extras_candidate
```



---
## _make_candidate_from_dist
```python
from factory import _make_candidate_from_dist
```



---
## _make_candidate_from_link
```python
from factory import _make_candidate_from_link
```



---
## _make_base_candidate_from_link
```python
from factory import _make_base_candidate_from_link
```



---
## _iter_found_candidates
```python
from factory import _iter_found_candidates
```



---
## _iter_explicit_candidates_from_base
```python
from factory import _iter_explicit_candidates_from_base
```

Produce explicit candidates from the base given an extra-ed package.

:param base_requirements: Requirements known to the resolver. The
    requirements are guaranteed to not have extras.
:param extras: The extras to inject into the explicit requirements'
    candidates.

---
## _iter_candidates_from_constraints
```python
from factory import _iter_candidates_from_constraints
```

Produce explicit candidates from constraints.

This creates "fake" InstallRequirement objects that are basically clones
of what "should" be the template, but with original_link set to link.

---
## find_candidates
```python
from factory import find_candidates
```



---
## _make_requirements_from_install_req
```python
from factory import _make_requirements_from_install_req
```

Returns requirement objects associated with the given InstallRequirement. In
most cases this will be a single object but the following special cases exist:
    - the InstallRequirement has markers that do not apply -> result is empty
    - the InstallRequirement has both a constraint (or link) and extras
        -> result is split in two requirement objects: one with the constraint
        (or link) and one with the extra. This allows centralized constraint
        handling for the base, resulting in fewer candidate rejections.

---
## collect_root_requirements
```python
from factory import collect_root_requirements
```



---
## make_requirement_from_candidate
```python
from factory import make_requirement_from_candidate
```



---
## make_requirements_from_spec
```python
from factory import make_requirements_from_spec
```

Returns requirement objects associated with the given specifier. In most cases
this will be a single object but the following special cases exist:
    - the specifier has markers that do not apply -> result is empty
    - the specifier has both a constraint and extras -> result is split
        in two requirement objects: one with the constraint and one with the
        extra. This allows centralized constraint handling for the base,
        resulting in fewer candidate rejections.

---
## make_requires_python_requirement
```python
from factory import make_requires_python_requirement
```



---
## get_wheel_cache_entry
```python
from factory import get_wheel_cache_entry
```

Look up the link in the wheel cache.

If ``preparer.require_hashes`` is True, don't use the wheel cache,
because cached wheels, always built locally, have different hashes
than the files downloaded from the index server and thus throw false
hash mismatches. Furthermore, cached wheels at present have
nondeterministic contents due to file modification times.

---
## get_dist_to_uninstall
```python
from factory import get_dist_to_uninstall
```



---
## _report_requires_python_error
```python
from factory import _report_requires_python_error
```



---
## _report_single_requirement_conflict
```python
from factory import _report_single_requirement_conflict
```



---
## get_installation_error
```python
from factory import get_installation_error
```



---
## _get_installed_candidate
```python
from factory import _get_installed_candidate
```

Get the candidate for the currently-installed version.

---
## iter_index_candidate_infos
```python
from factory import iter_index_candidate_infos
```



---
## text_join
```python
from factory import text_join
```



---
## describe_trigger
```python
from factory import describe_trigger
```



---
## is_pinned
```python
from factory import is_pinned
```



---
## ExplicitRequirement
```python
from requirements import ExplicitRequirement
```



---
## SpecifierRequirement
```python
from requirements import SpecifierRequirement
```



---
## SpecifierWithoutExtrasRequirement
```python
from requirements import SpecifierWithoutExtrasRequirement
```

Requirement backed by an install requirement on a base package.
Trims extras from its install requirement if there are any.

---
## RequiresPythonRequirement
```python
from requirements import RequiresPythonRequirement
```

A requirement representing Requires-Python metadata.

---
## UnsatisfiableRequirement
```python
from requirements import UnsatisfiableRequirement
```

A requirement that cannot be satisfied.

---
## project_name
```python
from requirements import project_name
```



---
## name
```python
from requirements import name
```



---
## format_for_error
```python
from requirements import format_for_error
```



---
## get_candidate_lookup
```python
from requirements import get_candidate_lookup
```



---
## is_satisfied_by
```python
from requirements import is_satisfied_by
```



---
## _equal
```python
from requirements import _equal
```



---
## get_topological_weights
```python
from resolver import get_topological_weights
```

Assign weights to each node based on how "deep" they are.

This implementation may change at any point in the future without prior
notice.

We first simplify the dependency graph by pruning any leaves and giving them
the highest weight: a package without any dependencies should be installed
first. This is done again and again in the same way, giving ever less weight
to the newly found leaves. The loop stops when no leaves are left: all
remaining packages have at least one dependency left in the graph.

Then we continue with the remaining graph, by taking the length for the
longest path to any node from root, ignoring any paths that contain a single
node twice (i.e. cycles). This is done through a depth-first search through
the graph, while keeping track of the path to the node.

Cycles in the graph result would result in node being revisited while also
being on its own path. In this case, take no action. This helps ensure we
don't get stuck in a cycle.

When assigning weight, the longer path (i.e. larger length) is preferred.

We are only interested in the weights of packages that are in the
requirement_keys.

---
## _req_set_item_sorter
```python
from resolver import _req_set_item_sorter
```

Key function used to sort install requirements for installation.

Based on the "weight" mapping calculated in ``get_installation_order()``.
The canonical package name is returned as the second member as a tie-
breaker to ensure the result is predictable, which is useful in tests.

---
## visit
```python
from resolver import visit
```



---
## __name__
```python
from candidates import __name__
```



---
## as_base_candidate
```python
from candidates import as_base_candidate
```

The runtime version of BaseCandidate.

---
## make_install_req_from_link
```python
from candidates import make_install_req_from_link
```



---
## make_install_req_from_editable
```python
from candidates import make_install_req_from_editable
```



---
## _make_install_req_from_dist
```python
from candidates import _make_install_req_from_dist
```



---
## _InstallRequirementBackedCandidate
```python
from candidates import _InstallRequirementBackedCandidate
```

A candidate backed by an ``InstallRequirement``.

This represents a package request with the target not being already
in the environment, and needs to be fetched and installed. The backing
``InstallRequirement`` is responsible for most of the leg work; this
class exposes appropriate information to the resolver.

:param link: The link passed to the ``InstallRequirement``. The backing
    ``InstallRequirement`` will use this link to fetch the distribution.
:param source_link: The link this candidate "originates" from. This is
    different from ``link`` when the link is found in the wheel cache.
    ``link`` would point to the wheel cache, while this points to the
    found remote link (e.g. from pypi.org).

---
## LinkCandidate
```python
from candidates import LinkCandidate
```



---
## EditableCandidate
```python
from candidates import EditableCandidate
```



---
## AlreadyInstalledCandidate
```python
from candidates import AlreadyInstalledCandidate
```



---
## ExtrasCandidate
```python
from candidates import ExtrasCandidate
```

A candidate that has 'extras', indicating additional dependencies.

Requirements can be for a project with dependencies, something like
foo[extra].  The extras don't affect the project/version being installed
directly, but indicate that we need additional dependencies. We model that
by having an artificial ExtrasCandidate that wraps the "base" candidate.

The ExtrasCandidate differs from the base in the following ways:

1. It has a unique name, of the form foo[extra]. This causes the resolver
   to treat it as a separate node in the dependency graph.
2. When we're getting the candidate's dependencies,
   a) We specify that we want the extra dependencies as well.
   b) We add a dependency on the base candidate.
      See below for why this is needed.
3. We return None for the underlying InstallRequirement, as the base
   candidate will provide it, and we don't want to end up with duplicates.

The dependency on the base candidate is needed so that the resolver can't
decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
respectively forces the resolver to recognise that this is a conflict.

---
## RequiresPythonCandidate
```python
from candidates import RequiresPythonCandidate
```



---
## __init__
```python
from candidates import __init__
```



---
## __str__
```python
from candidates import __str__
```



---
## __repr__
```python
from candidates import __repr__
```



---
## __hash__
```python
from candidates import __hash__
```



---
## __eq__
```python
from candidates import __eq__
```



---
## source_link
```python
from candidates import source_link
```



---
## project_name
```python
from candidates import project_name
```



---
## name
```python
from candidates import name
```



---
## version
```python
from candidates import version
```



---
## format_for_error
```python
from candidates import format_for_error
```



---
## _prepare_distribution
```python
from candidates import _prepare_distribution
```



---
## _check_metadata_consistency
```python
from candidates import _check_metadata_consistency
```

Check for consistency of project name and version of dist.

---
## _prepare
```python
from candidates import _prepare
```



---
## iter_dependencies
```python
from candidates import iter_dependencies
```



---
## get_install_requirement
```python
from candidates import get_install_requirement
```



---
## is_editable
```python
from candidates import is_editable
```



---
## is_installed
```python
from candidates import is_installed
```



---
## format_name
```python
from base import format_name
```



---
## Constraint
```python
from base import Constraint
```



---
## Requirement
```python
from base import Requirement
```



---
## _match_link
```python
from base import _match_link
```



---
## Candidate
```python
from base import Candidate
```



---
## empty
```python
from base import empty
```

Construct an ExtensionArray of this dtype with the given shape.

Analogous to numpy.empty.

Parameters
----------
shape : int or tuple[int]

Returns
-------
ExtensionArray

---
## from_ireq
```python
from base import from_ireq
```



---
## __bool__
```python
from base import __bool__
```



---
## is_satisfied_by
```python
from base import is_satisfied_by
```



---
## project_name
```python
from base import project_name
```

The "project name" of the candidate.

This is different from ``name`` if this candidate contains extras,
in which case ``name`` would contain the ``[...]`` part, while this
refers to the name of the project.

---
## get_candidate_lookup
```python
from base import get_candidate_lookup
```



---
## format_for_error
```python
from base import format_for_error
```



---
## is_installed
```python
from base import is_installed
```



---
## is_editable
```python
from base import is_editable
```



---
## source_link
```python
from base import source_link
```



---
## get_install_requirement
```python
from base import get_install_requirement
```



---
## __name__
```python
from _dists import __name__
```



---
## WheelDistribution
```python
from _dists import WheelDistribution
```

An ``importlib.metadata.Distribution`` read from a wheel.

Although ``importlib.metadata.PathDistribution`` accepts ``zipfile.Path``,
its implementation is too "lazy" for pip's needs (we can't keep the ZipFile
handle open for the entire lifetime of the distribution object).

This implementation eagerly reads the entire metadata directory into the
memory instead, and operates from that.

---
## Distribution
```python
from _dists import Distribution
```



---
## __init__
```python
from _dists import __init__
```



---
## from_zipfile
```python
from _dists import from_zipfile
```



---
## iterdir
```python
from _dists import iterdir
```



---
## read_text
```python
from _dists import read_text
```



---
## from_directory
```python
from _dists import from_directory
```



---
## from_metadata_file_contents
```python
from _dists import from_metadata_file_contents
```



---
## from_wheel
```python
from _dists import from_wheel
```



---
## location
```python
from _dists import location
```



---
## info_location
```python
from _dists import info_location
```



---
## installed_location
```python
from _dists import installed_location
```



---
## canonical_name
```python
from _dists import canonical_name
```



---
## version
```python
from _dists import version
```



---
## raw_version
```python
from _dists import raw_version
```



---
## is_file
```python
from _dists import is_file
```



---
## iter_distutils_script_names
```python
from _dists import iter_distutils_script_names
```



---
## iter_entry_points
```python
from _dists import iter_entry_points
```



---
## _metadata_impl
```python
from _dists import _metadata_impl
```



---
## iter_provided_extras
```python
from _dists import iter_provided_extras
```



---
## iter_dependencies
```python
from _dists import iter_dependencies
```



---
## BadMetadata
```python
from _compat import BadMetadata
```



---
## BasePath
```python
from _compat import BasePath
```

A protocol that various path objects conform.

This exists because importlib.metadata uses both ``pathlib.Path`` and
``zipfile.Path``, and we need a common base for type hints (Union does not
work well since ``zipfile.Path`` is too new for our linter setup).

This does not mean to be exhaustive, but only contains things that present
in both classes *that we need*.

---
## get_info_location
```python
from _compat import get_info_location
```

Find the path to the distribution's metadata directory.

HACK: This relies on importlib.metadata's private ``_path`` attribute. Not
all distributions exist on disk, so importlib.metadata is correct to not
expose the attribute as public. But pip's code base is old and not as clean,
so we do this to avoid having to rewrite too many things. Hopefully we can
eliminate this some day.

---
## parse_name_and_version_from_info_directory
```python
from _compat import parse_name_and_version_from_info_directory
```

Get a name and version from the metadata directory name.

This is much faster than reading distribution metadata.

---
## get_dist_canonical_name
```python
from _compat import get_dist_canonical_name
```

Get the distribution's normalized name.

The ``name`` attribute is only available in Python 3.10 or later. We are
targeting exactly that, but Mypy does not know this.

---
## __str__
```python
from _compat import __str__
```



---
## parent
```python
from _compat import parent
```



---
## __name__
```python
from _envs import __name__
```



---
## _looks_like_wheel
```python
from _envs import _looks_like_wheel
```



---
## _DistributionFinder
```python
from _envs import _DistributionFinder
```

Finder to locate distributions.

The main purpose of this class is to memoize found distributions' names, so
only one distribution is returned for each package name. At lot of pip code
assumes this (because it is setuptools's behavior), and not doing the same
can potentially cause a distribution in lower precedence path to override a
higher precedence one if the caller is not careful.

Eventually we probably want to make it possible to see lower precedence
installations as well. It's useful feature, after all.

---
## _emit_egg_deprecation
```python
from _envs import _emit_egg_deprecation
```



---
## Environment
```python
from _envs import Environment
```



---
## __init__
```python
from _envs import __init__
```



---
## _find_impl
```python
from _envs import _find_impl
```

Find distributions in a location.

---
## find
```python
from _envs import find
```

Find distributions in a location.

The path can be either a directory, or a ZIP archive.

---
## find_linked
```python
from _envs import find_linked
```

Read location in egg-link files and return distributions in there.

The path should be a directory; otherwise this returns nothing. This
follows how setuptools does this for compatibility. The first non-empty
line in the egg-link is read as a path (resolved against the egg-link's
containing directory if relative). Distributions found at that linked
location are returned.

---
## _find_eggs_in_dir
```python
from _envs import _find_eggs_in_dir
```



---
## _find_eggs_in_zip
```python
from _envs import _find_eggs_in_zip
```



---
## find_eggs
```python
from _envs import find_eggs
```

Find eggs in a location.

This actually uses the old *pkg_resources* backend. We likely want to
deprecate this so we can eventually remove the *pkg_resources*
dependency entirely. Before that, this should first emit a deprecation
warning for some versions when using the fallback since importing
*pkg_resources* is slow for those who don't need it.

---
## default
```python
from _envs import default
```



---
## from_paths
```python
from _envs import from_paths
```



---
## _iter_distributions
```python
from _envs import _iter_distributions
```



---
## get_distribution
```python
from _envs import get_distribution
```



---
## __name__
```python
from _openssl import __name__
```



---
## _configure_context
```python
from _openssl import _configure_context
```



---
## _capath_contains_certs
```python
from _openssl import _capath_contains_certs
```

Check whether capath exists and contains certs in the expected format.

---
## _verify_peercerts_impl
```python
from _openssl import _verify_peercerts_impl
```



---
## inject_into_ssl
```python
from _api import inject_into_ssl
```

Injects the :class:`truststore.SSLContext` into the ``ssl``
module by replacing :class:`ssl.SSLContext`.

---
## extract_from_ssl
```python
from _api import extract_from_ssl
```

Restores the :class:`ssl.SSLContext` class to its original state

---
## SSLContext
```python
from _api import SSLContext
```

SSLContext API that uses system certificates on all platforms

---
## _verify_peercerts
```python
from _api import _verify_peercerts
```

Verifies the peer certificates from an SSLSocket or SSLObject
against the certificates in the OS trust store.

---
## __class__
```python
from _api import __class__
```



---
## wrap_socket
```python
from _api import wrap_socket
```



---
## wrap_bio
```python
from _api import wrap_bio
```



---
## load_verify_locations
```python
from _api import load_verify_locations
```



---
## load_cert_chain
```python
from _api import load_cert_chain
```



---
## load_default_certs
```python
from _api import load_default_certs
```



---
## set_alpn_protocols
```python
from _api import set_alpn_protocols
```



---
## set_npn_protocols
```python
from _api import set_npn_protocols
```



---
## set_ciphers
```python
from _api import set_ciphers
```



---
## get_ciphers
```python
from _api import get_ciphers
```



---
## session_stats
```python
from _api import session_stats
```



---
## cert_store_stats
```python
from _api import cert_store_stats
```



---
## get_ca_certs
```python
from _api import get_ca_certs
```



---
## check_hostname
```python
from _api import check_hostname
```



---
## hostname_checks_common_name
```python
from _api import hostname_checks_common_name
```



---
## keylog_filename
```python
from _api import keylog_filename
```



---
## maximum_version
```python
from _api import maximum_version
```



---
## minimum_version
```python
from _api import minimum_version
```



---
## post_handshake_auth
```python
from _api import post_handshake_auth
```



---
## protocol
```python
from _api import protocol
```



---
## security_level
```python
from _api import security_level
```



---
## verify_flags
```python
from _api import verify_flags
```



---
## verify_mode
```python
from _api import verify_mode
```



---
## _get_unverified_chain_bytes
```python
from _api import _get_unverified_chain_bytes
```



---
## TruststoreSSLObject
```python
from _api import TruststoreSSLObject
```



---
## do_handshake
```python
from _api import do_handshake
```



---
## __name__
```python
from _macos import __name__
```



---
## _load_cdll
```python
from _macos import _load_cdll
```

Loads a CDLL by name, falling back to known path on 10.16+

---
## _handle_osstatus
```python
from _macos import _handle_osstatus
```

Raises an error if the OSStatus value is non-zero.

---
## CFConst
```python
from _macos import CFConst
```

CoreFoundation constants

---
## _bytes_to_cf_data_ref
```python
from _macos import _bytes_to_cf_data_ref
```



---
## _bytes_to_cf_string
```python
from _macos import _bytes_to_cf_string
```

Given a Python binary data, create a CFString.
The string must be CFReleased by the caller.

---
## _cf_string_ref_to_str
```python
from _macos import _cf_string_ref_to_str
```

Creates a Unicode string from a CFString object. Used entirely for error
reporting.
Yes, it annoys me quite a lot that this function is this complex.

---
## _der_certs_to_cf_cert_array
```python
from _macos import _der_certs_to_cf_cert_array
```

Builds a CFArray of SecCertificateRefs from a list of DER-encoded certificates.
Responsibility of the caller to call CoreFoundation.CFRelease on the CFArray.

---
## _configure_context
```python
from _macos import _configure_context
```



---
## _verify_peercerts_impl
```python
from _macos import _verify_peercerts_impl
```



---
## __name__
```python
from _ssl_constants import __name__
```



---
## _set_ssl_context_verify_mode
```python
from _ssl_constants import _set_ssl_context_verify_mode
```



---
## CERT_CONTEXT
```python
from _windows import CERT_CONTEXT
```



---
## CERT_ENHKEY_USAGE
```python
from _windows import CERT_ENHKEY_USAGE
```



---
## CERT_USAGE_MATCH
```python
from _windows import CERT_USAGE_MATCH
```



---
## CERT_CHAIN_PARA
```python
from _windows import CERT_CHAIN_PARA
```



---
## CERT_TRUST_STATUS
```python
from _windows import CERT_TRUST_STATUS
```



---
## CERT_CHAIN_ELEMENT
```python
from _windows import CERT_CHAIN_ELEMENT
```



---
## CERT_SIMPLE_CHAIN
```python
from _windows import CERT_SIMPLE_CHAIN
```



---
## CERT_CHAIN_CONTEXT
```python
from _windows import CERT_CHAIN_CONTEXT
```



---
## SSL_EXTRA_CERT_CHAIN_POLICY_PARA
```python
from _windows import SSL_EXTRA_CERT_CHAIN_POLICY_PARA
```



---
## CERT_CHAIN_POLICY_PARA
```python
from _windows import CERT_CHAIN_POLICY_PARA
```



---
## CERT_CHAIN_POLICY_STATUS
```python
from _windows import CERT_CHAIN_POLICY_STATUS
```



---
## CERT_CHAIN_ENGINE_CONFIG
```python
from _windows import CERT_CHAIN_ENGINE_CONFIG
```



---
## _handle_win_error
```python
from _windows import _handle_win_error
```



---
## _verify_peercerts_impl
```python
from _windows import _verify_peercerts_impl
```

Verify the cert_chain from the server using Windows APIs.

---
## _get_and_verify_cert_chain
```python
from _windows import _get_and_verify_cert_chain
```



---
## _verify_using_custom_ca_certs
```python
from _windows import _verify_using_custom_ca_certs
```



---
## _configure_context
```python
from _windows import _configure_context
```



---
## pack
```python
from __init__ import pack
```

Pack object `o` and write it to `stream`

See :class:`Packer` for options.

---
## packb
```python
from __init__ import packb
```

Pack object `o` and return packed bytes

See :class:`Packer` for options.

---
## unpack
```python
from __init__ import unpack
```

Unpack an object from `stream`.

Raises `ExtraData` when `stream` contains extra bytes.
See :class:`Unpacker` for options.

---
## UnpackException
```python
from exceptions import UnpackException
```

Base class for some exceptions raised while unpacking.

NOTE: unpack may raise exception other than subclass of
UnpackException.  If you want to catch all error, catch
Exception instead.

---
## BufferFull
```python
from exceptions import BufferFull
```



---
## OutOfData
```python
from exceptions import OutOfData
```



---
## StackError
```python
from exceptions import StackError
```

Too nested

---
## ExtraData
```python
from exceptions import ExtraData
```

ExtraData is raised when there is trailing data.

This exception is raised while only one-shot (not streaming)
unpack.

---
## __name__
```python
from fallback import __name__
```

Fallback pure Python implementation of msgpack

---
## _check_type_strict
```python
from fallback import _check_type_strict
```



---
## _get_data_from_buffer
```python
from fallback import _get_data_from_buffer
```



---
## unpackb
```python
from fallback import unpackb
```

Unpack an object from `packed`.

Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``ValueError`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.

See :class:`Unpacker` for options.

---
## Unpacker
```python
from fallback import Unpacker
```

Streaming unpacker.

Arguments:

:param file_like:
    File-like object having `.read(n)` method.
    If specified, unpacker reads serialized data from it and `.feed()` is not usable.

:param int read_size:
    Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)

:param bool use_list:
    If true, unpack msgpack array to Python list.
    Otherwise, unpack to Python tuple. (default: True)

:param bool raw:
    If true, unpack msgpack raw to Python bytes.
    Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).

:param int timestamp:
    Control how timestamp type is unpacked:

        0 - Timestamp
        1 - float  (Seconds from the EPOCH)
        2 - int  (Nanoseconds from the EPOCH)
        3 - datetime.datetime  (UTC).

:param bool strict_map_key:
    If true (default), only str or bytes are accepted for map (dict) keys.

:param object_hook:
    When specified, it should be callable.
    Unpacker calls it with a dict argument after unpacking msgpack map.
    (See also simplejson)

:param object_pairs_hook:
    When specified, it should be callable.
    Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
    (See also simplejson)

:param str unicode_errors:
    The error handler for decoding unicode. (default: 'strict')
    This option should be used only when you have msgpack data which
    contains invalid UTF-8 string.

:param int max_buffer_size:
    Limits size of data waiting unpacked.  0 means 2**32-1.
    The default value is 100*1024*1024 (100MiB).
    Raises `BufferFull` exception when it is insufficient.
    You should set this parameter when unpacking data from untrusted source.

:param int max_str_len:
    Deprecated, use *max_buffer_size* instead.
    Limits max length of str. (default: max_buffer_size)

:param int max_bin_len:
    Deprecated, use *max_buffer_size* instead.
    Limits max length of bin. (default: max_buffer_size)

:param int max_array_len:
    Limits max length of array.
    (default: max_buffer_size)

:param int max_map_len:
    Limits max length of map.
    (default: max_buffer_size//2)

:param int max_ext_len:
    Deprecated, use *max_buffer_size* instead.
    Limits max size of ext type.  (default: max_buffer_size)

Example of streaming deserialize from file-like object::

    unpacker = Unpacker(file_like)
    for o in unpacker:
        process(o)

Example of streaming deserialize from socket::

    unpacker = Unpacker()
    while True:
        buf = sock.recv(1024**2)
        if not buf:
            break
        unpacker.feed(buf)
        for o in unpacker:
            process(o)

Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``OutOfData`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.

---
## Packer
```python
from fallback import Packer
```

MessagePack Packer

Usage::

    packer = Packer()
    astream.write(packer.pack(a))
    astream.write(packer.pack(b))

Packer's constructor has some keyword arguments:

:param default:
    When specified, it should be callable.
    Convert user type to builtin type that Packer supports.
    See also simplejson's document.

:param bool use_single_float:
    Use single precision float type for float. (default: False)

:param bool autoreset:
    Reset buffer after each pack and return its content as `bytes`. (default: True).
    If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.

:param bool use_bin_type:
    Use bin type introduced in msgpack spec 2.0 for bytes.
    It also enables str8 type for unicode. (default: True)

:param bool strict_types:
    If set to true, types will be checked to be exact. Derived classes
    from serializable types will not be serialized and will be
    treated as unsupported type and forwarded to default.
    Additionally tuples will not be serialized as lists.
    This is useful when trying to implement accurate serialization
    for python types.

:param bool datetime:
    If set to true, datetime with tzinfo is packed into Timestamp type.
    Note that the tzinfo is stripped in the timestamp.
    You can get UTC datetime with `timestamp=3` option of the Unpacker.

:param str unicode_errors:
    The error handler for encoding unicode. (default: 'strict')
    DO NOT USE THIS!!  This option is kept for very specific usage.

Example of streaming deserialize from file-like object::

    unpacker = Unpacker(file_like)
    for o in unpacker:
        process(o)

Example of streaming deserialize from socket::

    unpacker = Unpacker()
    while True:
        buf = sock.recv(1024**2)
        if not buf:
            break
        unpacker.feed(buf)
        for o in unpacker:
            process(o)

Raises ``ExtraData`` when *packed* contains extra bytes.
Raises ``OutOfData`` when *packed* is incomplete.
Raises ``FormatError`` when *packed* is not valid msgpack.
Raises ``StackError`` when *packed* contains too nested.
Other exceptions can be raised during unpacking.

---
## StringIO
```python
from fallback import StringIO
```



---
## __init__
```python
from fallback import __init__
```



---
## feed
```python
from fallback import feed
```



---
## _consume
```python
from fallback import _consume
```

Gets rid of the used parts of the buffer.

---
## _got_extradata
```python
from fallback import _got_extradata
```



---
## _get_extradata
```python
from fallback import _get_extradata
```



---
## read_bytes
```python
from fallback import read_bytes
```



---
## _read
```python
from fallback import _read
```



---
## _reserve
```python
from fallback import _reserve
```



---
## _read_header
```python
from fallback import _read_header
```



---
## _unpack
```python
from fallback import _unpack
```



---
## __iter__
```python
from fallback import __iter__
```



---
## __next__
```python
from fallback import __next__
```



---
## skip
```python
from fallback import skip
```



---
## unpack
```python
from fallback import unpack
```



---
## read_array_header
```python
from fallback import read_array_header
```



---
## read_map_header
```python
from fallback import read_map_header
```



---
## tell
```python
from fallback import tell
```



---
## _pack
```python
from fallback import _pack
```



---
## pack
```python
from fallback import pack
```



---
## pack_map_pairs
```python
from fallback import pack_map_pairs
```



---
## pack_array_header
```python
from fallback import pack_array_header
```



---
## pack_map_header
```python
from fallback import pack_map_header
```



---
## pack_ext_type
```python
from fallback import pack_ext_type
```



---
## _pack_array_header
```python
from fallback import _pack_array_header
```



---
## _pack_map_header
```python
from fallback import _pack_map_header
```



---
## _pack_map_pairs
```python
from fallback import _pack_map_pairs
```



---
## _pack_raw_header
```python
from fallback import _pack_raw_header
```



---
## _pack_bin_header
```python
from fallback import _pack_bin_header
```



---
## bytes
```python
from fallback import bytes
```

Return internal buffer contents as bytes object

---
## reset
```python
from fallback import reset
```

Reset internal buffer.

This method is useful only when autoreset=False.

---
## getbuffer
```python
from fallback import getbuffer
```

Return view of internal buffer.

---
## write
```python
from fallback import write
```



---
## getvalue
```python
from fallback import getvalue
```



---
## ExtType
```python
from ext import ExtType
```

ExtType represents ext type in msgpack.

---
## Timestamp
```python
from ext import Timestamp
```

Timestamp represents the Timestamp extension type in msgpack.

When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`.
When using pure-Python msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and
unpack `Timestamp`.

This class is immutable: Do not override seconds and nanoseconds.

---
## __new__
```python
from ext import __new__
```



---
## __repr__
```python
from ext import __repr__
```

String representation of Timestamp.

---
## __eq__
```python
from ext import __eq__
```

Check for equality with another Timestamp object

---
## __ne__
```python
from ext import __ne__
```

not-equals method (see :func:`__eq__()`)

---
## __hash__
```python
from ext import __hash__
```



---
## from_bytes
```python
from ext import from_bytes
```

Unpack bytes into a `Timestamp` object.

Used for pure-Python msgpack unpacking.

:param b: Payload from msgpack ext message with code -1
:type b: bytes

:returns: Timestamp object unpacked from msgpack ext payload
:rtype: Timestamp

---
## to_bytes
```python
from ext import to_bytes
```

Pack this Timestamp object into bytes.

Used for pure-Python msgpack packing.

:returns data: Payload for EXT message with code -1 (timestamp type)
:rtype: bytes

---
## from_unix
```python
from ext import from_unix
```

Create a Timestamp from posix timestamp in seconds.

:param unix_float: Posix timestamp in seconds.
:type unix_float: int or float

---
## to_unix
```python
from ext import to_unix
```

Get the timestamp as a floating-point value.

:returns: posix timestamp
:rtype: float

---
## from_unix_nano
```python
from ext import from_unix_nano
```

Create a Timestamp from posix timestamp in nanoseconds.

:param int unix_ns: Posix timestamp in nanoseconds.
:rtype: Timestamp

---
## to_unix_nano
```python
from ext import to_unix_nano
```

Get the timestamp as a unixtime in nanoseconds.

:returns: posix timestamp in nanoseconds
:rtype: int

---
## to_datetime
```python
from ext import to_datetime
```

Get the timestamp as a UTC datetime.

:rtype: `datetime.datetime`

---
## from_datetime
```python
from ext import from_datetime
```

Create a Timestamp from datetime with tzinfo.

:rtype: Timestamp

---
## __name__
```python
from locators import __name__
```



---
## get_all_distribution_names
```python
from locators import get_all_distribution_names
```

Return all distribution names known by an index.
:param url: The URL of the index.
:return: A list of all known distribution names.

---
## RedirectHandler
```python
from locators import RedirectHandler
```

A class to work around a bug in some Python 3.2.x releases.

---
## Locator
```python
from locators import Locator
```

A base class for locators - things that locate distributions.

---
## PyPIRPCLocator
```python
from locators import PyPIRPCLocator
```

This locator uses XML-RPC to locate distributions. It therefore
cannot be used with simple mirrors (that only mirror file content).

---
## PyPIJSONLocator
```python
from locators import PyPIJSONLocator
```

This locator uses PyPI's JSON interface. It's very limited in functionality
and probably not worth using.

---
## Page
```python
from locators import Page
```

This class represents a scraped HTML page.

---
## SimpleScrapingLocator
```python
from locators import SimpleScrapingLocator
```

A locator which scrapes HTML pages to locate downloads for a distribution.
This runs multiple threads to do the I/O; performance is at least as good
as pip's PackageFinder, which works in an analogous fashion.

---
## DirectoryLocator
```python
from locators import DirectoryLocator
```

This class locates distributions in a directory tree.

---
## JSONLocator
```python
from locators import JSONLocator
```

This locator uses special extended metadata (not available on PyPI) and is
the basis of performant dependency resolution in distlib. Other locators
require archive downloads before dependencies can be determined! As you
might imagine, that can be slow.

---
## DistPathLocator
```python
from locators import DistPathLocator
```

This locator finds installed distributions in a path. It can be useful for
adding to an :class:`AggregatingLocator`.

---
## AggregatingLocator
```python
from locators import AggregatingLocator
```

This class allows you to chain and/or merge a list of locators.

---
## DependencyFinder
```python
from locators import DependencyFinder
```

Locate dependencies for distributions.

---
## http_error_302
```python
from locators import http_error_302
```



---
## __init__
```python
from locators import __init__
```

Initialise an instance, using the specified locator
to locate distributions.

---
## get_errors
```python
from locators import get_errors
```

Return any errors which have occurred.

---
## clear_errors
```python
from locators import clear_errors
```

Clear any errors which may have been logged.

---
## clear_cache
```python
from locators import clear_cache
```



---
## _get_scheme
```python
from locators import _get_scheme
```



---
## _set_scheme
```python
from locators import _set_scheme
```



---
## _get_project
```python
from locators import _get_project
```



---
## get_distribution_names
```python
from locators import get_distribution_names
```

Return all the distribution names known to this locator.

---
## get_project
```python
from locators import get_project
```

For a given project, get a dictionary mapping available versions to Distribution
instances.

This calls _get_project to do all the work, and just implements a caching layer on top.

---
## score_url
```python
from locators import score_url
```

Give an url a score which can be used to choose preferred URLs
for a given project release.

---
## prefer_url
```python
from locators import prefer_url
```

Choose one of two URLs where both are candidates for distribution
archives for the same version of a distribution (for example,
.tar.gz vs. zip).

The current implementation favours https:// URLs over http://, archives
from PyPI over those from other locations, wheel compatibility (if a
wheel) and then the archive name.

---
## split_filename
```python
from locators import split_filename
```

Attempt to split a filename in project name, version and Python version.

---
## convert_url_to_download_info
```python
from locators import convert_url_to_download_info
```

See if a URL is a candidate for a download URL for a project (the URL
has typically been scraped from an HTML page).

If it is, a dictionary is returned with keys "name", "version",
"filename" and "url"; otherwise, None is returned.

---
## _get_digest
```python
from locators import _get_digest
```

Get a digest from a dictionary by looking at a "digests" dictionary
or keys of the form 'algo_digest'.

Returns a 2-tuple (algo, digest) if found, else None. Currently
looks only for SHA256, then MD5.

---
## _update_version_data
```python
from locators import _update_version_data
```

Update a result dictionary (the final result from _get_project) with a
dictionary for a specific version, which typically holds information
gleaned from a filename or URL for an archive for the distribution.

---
## locate
```python
from locators import locate
```

Find the most recent distribution which matches the given
requirement.

:param requirement: A requirement of the form 'foo (1.0)' or perhaps
                    'foo (>= 1.0, < 2.0, != 1.3)'
:param prereleases: If ``True``, allow pre-release versions
                    to be located. Otherwise, pre-release versions
                    are not returned.
:return: A :class:`Distribution` instance, or ``None`` if no such
         distribution could be located.

---
## links
```python
from locators import links
```

Return the URLs of all the links on a page together with information
about their "rel" attribute, for determining which ones to treat as
downloads and which ones to queue for further scraping.

---
## _prepare_threads
```python
from locators import _prepare_threads
```

Threads are created only when get_project is called, and terminate
before it returns. They are there primarily to parallelise I/O (i.e.
fetching web pages).

---
## _wait_threads
```python
from locators import _wait_threads
```

Tell all the threads to terminate (by sending a sentinel value) and
wait for them to do so.

---
## _is_platform_dependent
```python
from locators import _is_platform_dependent
```

Does an URL refer to a platform-specific download?

---
## _process_download
```python
from locators import _process_download
```

See if an URL is a suitable download for a project.

If it is, register information in the result dictionary (for
_get_project) about the specific version it's for.

Note that the return value isn't actually used other than as a boolean
value.

---
## _should_queue
```python
from locators import _should_queue
```

Determine whether a link URL from a referring page and with a
particular "rel" attribute should be queued for scraping.

---
## _fetch
```python
from locators import _fetch
```

Get a URL to fetch from the work queue, get the HTML page, examine its
links for download candidates and candidates for further scraping.

This is a handy method to run in a thread.

---
## get_page
```python
from locators import get_page
```

Get the HTML for an URL, possibly from an in-memory cache.

XXX TODO Note: this cache is never actually cleared. It's assumed that
the data won't get stale over the lifetime of a locator instance (not
necessarily true for the default_locator).

---
## should_include
```python
from locators import should_include
```

Should a filename be considered as a candidate for a distribution
archive? As well as the filename, the directory which contains it
is provided, though not used by the current implementation.

---
## add_distribution
```python
from locators import add_distribution
```

Add a distribution to the finder. This will update internal information
about who provides what.
:param dist: The distribution to add.

---
## remove_distribution
```python
from locators import remove_distribution
```

Remove a distribution from the finder. This will update internal
information about who provides what.
:param dist: The distribution to remove.

---
## get_matcher
```python
from locators import get_matcher
```

Get a version matcher for a requirement.
:param reqt: The requirement
:type reqt: str
:return: A version matcher (an instance of
         :class:`distlib.version.Matcher`).

---
## find_providers
```python
from locators import find_providers
```

Find the distributions which can fulfill a requirement.

:param reqt: The requirement.
 :type reqt: str
:return: A set of distribution which can fulfill the requirement.

---
## try_to_replace
```python
from locators import try_to_replace
```

Attempt to replace one provider with another. This is typically used
when resolving dependencies from multiple sources, e.g. A requires
(B >= 1.0) while C requires (B >= 1.1).

For successful replacement, ``provider`` must meet all the requirements
which ``other`` fulfills.

:param provider: The provider we are trying to replace with.
:param other: The provider we're trying to replace.
:param problems: If False is returned, this will contain what
                 problems prevented replacement. This is currently
                 a tuple of the literal string 'cantreplace',
                 ``provider``, ``other``  and the set of requirements
                 that ``provider`` couldn't fulfill.
:return: True if we can replace ``other`` with ``provider``, else
         False.

---
## find
```python
from locators import find
```

Find a distribution and all distributions it depends on.

:param requirement: The requirement specifying the distribution to
                    find, or a Distribution instance.
:param meta_extras: A list of meta extras such as :test:, :build: and
                    so on.
:param prereleases: If ``True``, allow pre-release versions to be
                    returned - otherwise, don't return prereleases
                    unless they're all that's available.

Return a set of :class:`Distribution` instances and a set of
problems.

The distributions returned should be such that they have the
:attr:`required` attribute set to ``True`` if they were
from the ``requirement`` passed to ``find()``, and they have the
:attr:`build_time_dependency` attribute set to ``True`` unless they
are post-installation dependencies of the ``requirement``.

The problems should be a tuple consisting of the string
``'unsatisfied'`` and the requirement which couldn't be satisfied
by any distribution known to the locator.

---
## same_project
```python
from locators import same_project
```



---
## clean
```python
from locators import clean
```

Tidy up an URL.

---
## MetadataMissingError
```python
from metadata import MetadataMissingError
```

A required metadata is missing

---
## MetadataConflictError
```python
from metadata import MetadataConflictError
```

Attempt to read or write metadata fields that are conflictual.

---
## MetadataUnrecognizedVersionError
```python
from metadata import MetadataUnrecognizedVersionError
```

Unknown metadata version number.

---
## MetadataInvalidError
```python
from metadata import MetadataInvalidError
```

A metadata value is invalid

---
## _version2fieldlist
```python
from metadata import _version2fieldlist
```



---
## _best_version
```python
from metadata import _best_version
```

Detect the best version depending on the fields used.

---
## _get_name_and_version
```python
from metadata import _get_name_and_version
```

Return the distribution name with version.

If for_filename is true, return a filename-escaped form.

---
## LegacyMetadata
```python
from metadata import LegacyMetadata
```

The legacy metadata of a release.

Supports versions 1.0, 1.1, 1.2, 2.0 and 1.3/2.1 (auto-detected). You can
instantiate the class with one of these arguments (or none):
- *path*, the path to a metadata file
- *fileobj* give a file-like object with metadata as content
- *mapping* is a dict-like object
- *scheme* is a version scheme name

---
## _has_marker
```python
from metadata import _has_marker
```



---
## set_metadata_version
```python
from metadata import set_metadata_version
```



---
## _write_field
```python
from metadata import _write_field
```



---
## __getitem__
```python
from metadata import __getitem__
```



---
## __setitem__
```python
from metadata import __setitem__
```



---
## __delitem__
```python
from metadata import __delitem__
```



---
## __contains__
```python
from metadata import __contains__
```



---
## _convert_name
```python
from metadata import _convert_name
```



---
## _default_value
```python
from metadata import _default_value
```



---
## _remove_line_prefix
```python
from metadata import _remove_line_prefix
```



---
## __getattr__
```python
from metadata import __getattr__
```



---
## get_fullname
```python
from metadata import get_fullname
```

Return the distribution name with version.

If filesafe is true, return a filename-escaped form.

---
## is_field
```python
from metadata import is_field
```

return True if name is a valid metadata key

---
## is_multi_field
```python
from metadata import is_multi_field
```



---
## read
```python
from metadata import read
```

Read the metadata values from a file path.

---
## read_file
```python
from metadata import read_file
```

Read the metadata values from a file object.

---
## write
```python
from metadata import write
```



---
## write_file
```python
from metadata import write_file
```

Write the PKG-INFO format data to a file object.

---
## update
```python
from metadata import update
```

Set metadata values from the given iterable `other` and kwargs.

Behavior is like `dict.update`: If `other` has a ``keys`` method,
they are looped over and ``self[key]`` is assigned ``other[key]``.
Else, ``other`` is an iterable of ``(key, value)`` iterables.

Keys that don't match a metadata field or that have an empty value are
dropped.

---
## set
```python
from metadata import set
```

Control then set a metadata field.

---
## get
```python
from metadata import get
```

Get a metadata field.

---
## check
```python
from metadata import check
```

Check if the metadata is compliant. If strict is True then raise if
no Name or Version are provided

---
## todict
```python
from metadata import todict
```



---
## add_requirements
```python
from metadata import add_requirements
```



---
## keys
```python
from metadata import keys
```



---
## __iter__
```python
from metadata import __iter__
```



---
## values
```python
from metadata import values
```



---
## items
```python
from metadata import items
```



---
## __getattribute__
```python
from metadata import __getattribute__
```



---
## _validate_value
```python
from metadata import _validate_value
```



---
## __setattr__
```python
from metadata import __setattr__
```



---
## name_and_version
```python
from metadata import name_and_version
```



---
## provides
```python
from metadata import provides
```



---
## get_requirements
```python
from metadata import get_requirements
```

Base method to get dependencies, given a set of extras
to satisfy and an optional environment context.
:param reqts: A list of sometimes-wanted dependencies,
              perhaps dependent on extras and environment.
:param extras: A list of optional components being requested.
:param env: An optional environment for marker evaluation.

---
## dictionary
```python
from metadata import dictionary
```



---
## dependencies
```python
from metadata import dependencies
```



---
## _validate_mapping
```python
from metadata import _validate_mapping
```



---
## validate
```python
from metadata import validate
```



---
## _from_legacy
```python
from metadata import _from_legacy
```



---
## _to_legacy
```python
from metadata import _to_legacy
```



---
## _set
```python
from metadata import _set
```



---
## are_valid_constraints
```python
from metadata import are_valid_constraints
```



---
## process_entries
```python
from metadata import process_entries
```



---
## UnsupportedVersionError
```python
from version import UnsupportedVersionError
```

This is an unsupported version.

---
## Matcher
```python
from version import Matcher
```



---
## _pep_440_key
```python
from version import _pep_440_key
```



---
## NormalizedVersion
```python
from version import NormalizedVersion
```

A rational version.

Good:
    1.2         # equivalent to "1.2.0"
    1.2.0
    1.2a1
    1.2.3a2
    1.2.3b1
    1.2.3c1
    1.2.3.4
    TODO: fill this out

Bad:
    1           # minimum two numbers
    1.2a        # release level must have a release serial
    1.2.3b

---
## _match_prefix
```python
from version import _match_prefix
```



---
## NormalizedMatcher
```python
from version import NormalizedMatcher
```



---
## _suggest_semantic_version
```python
from version import _suggest_semantic_version
```

Try to suggest a semantic form for a version for which
_suggest_normalized_version couldn't come up with anything.

---
## _suggest_normalized_version
```python
from version import _suggest_normalized_version
```

Suggest a normalized version close to the given version string.

If you have a version string that isn't rational (i.e. NormalizedVersion
doesn't like it) then you might be able to get an equivalent (or close)
rational version from this function.

This does a number of simple normalizations to the given string, based
on observation of versions currently in use on PyPI. Given a dump of
those version during PyCon 2009, 4287 of them:
- 2312 (53.93%) match NormalizedVersion without change
  with the automatic suggestion
- 3474 (81.04%) match when using this suggestion method

@param s {str} An irrational version string.
@returns A rational version string, or None, if couldn't determine one.

---
## _legacy_key
```python
from version import _legacy_key
```



---
## LegacyVersion
```python
from version import LegacyVersion
```



---
## LegacyMatcher
```python
from version import LegacyMatcher
```



---
## is_semver
```python
from version import is_semver
```



---
## _semantic_key
```python
from version import _semantic_key
```



---
## SemanticVersion
```python
from version import SemanticVersion
```



---
## SemanticMatcher
```python
from version import SemanticMatcher
```



---
## VersionScheme
```python
from version import VersionScheme
```



---
## get_scheme
```python
from version import get_scheme
```



---
## _check_compatible
```python
from version import _check_compatible
```



---
## parse_requirement
```python
from version import parse_requirement
```



---
## exact_version
```python
from version import exact_version
```



---
## _adjust_local
```python
from version import _adjust_local
```



---
## _match_lt
```python
from version import _match_lt
```



---
## _match_gt
```python
from version import _match_gt
```



---
## _match_le
```python
from version import _match_le
```



---
## _match_ge
```python
from version import _match_ge
```



---
## _match_eq
```python
from version import _match_eq
```



---
## _match_arbitrary
```python
from version import _match_arbitrary
```



---
## _match_ne
```python
from version import _match_ne
```



---
## _match_compatible
```python
from version import _match_compatible
```



---
## get_parts
```python
from version import get_parts
```



---
## make_tuple
```python
from version import make_tuple
```



---
## is_valid_version
```python
from version import is_valid_version
```



---
## is_valid_matcher
```python
from version import is_valid_matcher
```



---
## is_valid_constraint_list
```python
from version import is_valid_constraint_list
```

Used for processing some metadata fields

---
## suggest
```python
from version import suggest
```



---
## quote
```python
from compat import quote
```



---
## ZipExtFile
```python
from compat import ZipExtFile
```



---
## ZipFile
```python
from compat import ZipFile
```



---
## CertificateError
```python
from compat import CertificateError
```



---
## _dnsname_match
```python
from compat import _dnsname_match
```

Matching according to RFC 6125, section 6.4.3

http://tools.ietf.org/html/rfc6125#section-6.4.3

---
## match_hostname
```python
from compat import match_hostname
```

Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
rules are followed, but IP addresses are not accepted for *hostname*.

CertificateError is raised on failure. On success, the function
returns nothing.

---
## Container
```python
from compat import Container
```

A generic container for when multiple values need to be returned

---
## which
```python
from compat import which
```

Given a command, mode, and a PATH string, return the path which
conforms to the given mode on the PATH, or None if there is no such
file.

`mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
of os.environ.get("PATH"), or can be overridden with a custom search
path.

---
## __init__
```python
from compat import __init__
```



---
## __enter__
```python
from compat import __enter__
```



---
## __exit__
```python
from compat import __exit__
```



---
## open
```python
from compat import open
```



---
## python_implementation
```python
from compat import python_implementation
```

Return a string identifying the Python implementation.

---
## callable
```python
from compat import callable
```



---
## fsencode
```python
from compat import fsencode
```



---
## fsdecode
```python
from compat import fsdecode
```



---
## _get_normal_name
```python
from compat import _get_normal_name
```

Imitates get_normal_name in tokenizer.c.

---
## detect_encoding
```python
from compat import detect_encoding
```

The detect_encoding() function is used to detect the encoding that should
be used to decode a Python source file.  It requires one argument, readline,
in the same way as the tokenize() generator.

It will call readline a maximum of twice, and return the encoding used
(as a string) and a list of any lines (left as bytes) it has read in.

It detects the encoding from the presence of a utf-8 bom or an encoding
cookie as specified in pep-0263.  If both a bom and a cookie are present,
but disagree, a SyntaxError will be raised.  If the encoding cookie is an
invalid charset, raise a SyntaxError.  Note that if a utf-8 bom is found,
'utf-8-sig' is returned.

If no encoding is specified, then the default of 'utf-8' will be returned.

---
## ChainMap
```python
from compat import ChainMap
```

A ChainMap groups multiple dicts (or other mappings) together
to create a single, updateable view.

The underlying mappings are stored in a list.  That list is public and can
accessed or updated using the *maps* attribute.  There is no other state.

Lookups search the underlying mappings successively until a key is found.
In contrast, writes, updates, and deletions only operate on the first
mapping.

---
## cache_from_source
```python
from compat import cache_from_source
```



---
## OrderedDict
```python
from compat import OrderedDict
```

Dictionary that remembers insertion order

---
## valid_ident
```python
from compat import valid_ident
```



---
## ConvertingDict
```python
from compat import ConvertingDict
```

A converting dictionary wrapper.

---
## pop
```python
from compat import pop
```



---
## ConvertingList
```python
from compat import ConvertingList
```

A converting list wrapper.

---
## ConvertingTuple
```python
from compat import ConvertingTuple
```

A converting tuple wrapper.

---
## BaseConfigurator
```python
from compat import BaseConfigurator
```

The configurator base class which defines some useful defaults.

---
## _access_check
```python
from compat import _access_check
```



---
## read_or_stop
```python
from compat import read_or_stop
```



---
## find_cookie
```python
from compat import find_cookie
```



---
## __missing__
```python
from compat import __missing__
```



---
## __getitem__
```python
from compat import __getitem__
```



---
## get
```python
from compat import get
```



---
## __len__
```python
from compat import __len__
```



---
## __iter__
```python
from compat import __iter__
```

od.__iter__() <==> iter(od)

---
## __contains__
```python
from compat import __contains__
```



---
## __bool__
```python
from compat import __bool__
```



---
## __repr__
```python
from compat import __repr__
```

od.__repr__() <==> repr(od)

---
## fromkeys
```python
from compat import fromkeys
```

OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
and values equal to v (which defaults to None).

---
## copy
```python
from compat import copy
```

od.copy() -> a shallow copy of od

---
## new_child
```python
from compat import new_child
```

New ChainMap with a new dict followed by all previous maps.

---
## parents
```python
from compat import parents
```

New ChainMap from maps[1:].

---
## __setitem__
```python
from compat import __setitem__
```



---
## __delitem__
```python
from compat import __delitem__
```



---
## popitem
```python
from compat import popitem
```

od.popitem() -> (k, v), return and remove a (key, value) pair.
Pairs are returned in LIFO order if last is true or FIFO order if false.

---
## clear
```python
from compat import clear
```

od.clear() -> None.  Remove all items from od.

---
## __reversed__
```python
from compat import __reversed__
```

od.__reversed__() <==> reversed(od)

---
## keys
```python
from compat import keys
```

od.keys() -> list of keys in od

---
## values
```python
from compat import values
```

od.values() -> list of values in od

---
## items
```python
from compat import items
```

od.items() -> list of (key, value) pairs in od

---
## iterkeys
```python
from compat import iterkeys
```

od.iterkeys() -> an iterator over the keys in od

---
## itervalues
```python
from compat import itervalues
```

od.itervalues -> an iterator over the values in od

---
## iteritems
```python
from compat import iteritems
```

od.iteritems -> an iterator over the (key, value) items in od

---
## update
```python
from compat import update
```

od.update(E, **F) -> None.  Update od from dict/iterable E and F.

If E is a dict instance, does:           for k in E: od[k] = E[k]
If E has a .keys() method, does:         for k in E.keys(): od[k] = E[k]
Or if E is an iterable of items, does:   for k, v in E: od[k] = v
In either case, this is followed by:     for k, v in F.items(): od[k] = v

---
## setdefault
```python
from compat import setdefault
```

od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od

---
## __reduce__
```python
from compat import __reduce__
```

Return state information for pickling

---
## __eq__
```python
from compat import __eq__
```

od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
while comparison to a regular mapping is order-insensitive.

---
## __ne__
```python
from compat import __ne__
```



---
## viewkeys
```python
from compat import viewkeys
```

od.viewkeys() -> a set-like object providing a view on od's keys

---
## viewvalues
```python
from compat import viewvalues
```

od.viewvalues() -> an object providing a view on od's values

---
## viewitems
```python
from compat import viewitems
```

od.viewitems() -> a set-like object providing a view on od's items

---
## resolve
```python
from compat import resolve
```

Resolve strings to objects using standard import and attribute
syntax.

---
## ext_convert
```python
from compat import ext_convert
```

Default converter for the ext:// protocol.

---
## cfg_convert
```python
from compat import cfg_convert
```

Default converter for the cfg:// protocol.

---
## convert
```python
from compat import convert
```

Convert values to an appropriate type. dicts, lists and tuples are
replaced by their converting alternatives. Strings are checked to
see if they have a conversion format and are converted if they do.

---
## configure_custom
```python
from compat import configure_custom
```

Configure an object with a user-supplied factory.

---
## as_tuple
```python
from compat import as_tuple
```

Utility function which converts lists to tuples.

---
## _recursive_repr
```python
from compat import _recursive_repr
```

Decorator to make a repr function return fillvalue for a recursive
call

---
## decorating_function
```python
from compat import decorating_function
```



---
## wrapper
```python
from compat import wrapper
```



---
## _get_pypirc_command
```python
from index import _get_pypirc_command
```

Get the distutils command for interacting with PyPI configurations.
:return: the command.

---
## read_configuration
```python
from index import read_configuration
```

Read the PyPI access configuration as supported by distutils. This populates
``username``, ``password``, ``realm`` and ``url`` attributes from the
configuration.

---
## save_configuration
```python
from index import save_configuration
```

Save the PyPI access configuration. You must have set ``username`` and
``password`` attributes before calling this method.

---
## check_credentials
```python
from index import check_credentials
```

Check that ``username`` and ``password`` have been set, and raise an
exception if not.

---
## register
```python
from index import register
```

Register a distribution on PyPI, using the provided metadata.

:param metadata: A :class:`Metadata` instance defining at least a name
                 and version number for the distribution to be
                 registered.
:return: The HTTP response received from PyPI upon submission of the
        request.

---
## _reader
```python
from index import _reader
```

Thread runner for reading lines of from a subprocess into a buffer.

:param name: The logical name of the stream (used for logging only).
:param stream: The stream to read from. This will typically a pipe
               connected to the output stream of a subprocess.
:param outbuf: The list to append the read lines to.

---
## get_sign_command
```python
from index import get_sign_command
```

Return a suitable command for signing a file.

:param filename: The pathname to the file to be signed.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
                      private key used for signing.
:param keystore: The path to a directory which contains the keys
                 used in verification. If not specified, the
                 instance's ``gpg_home`` attribute is used instead.
:return: The signing command as a list suitable to be
         passed to :class:`subprocess.Popen`.

---
## run_command
```python
from index import run_command
```

Run a command in a child process , passing it any input data specified.

:param cmd: The command to run.
:param input_data: If specified, this must be a byte string containing
                   data to be sent to the child process.
:return: A tuple consisting of the subprocess' exit code, a list of
         lines read from the subprocess' ``stdout``, and a list of
         lines read from the subprocess' ``stderr``.

---
## sign_file
```python
from index import sign_file
```

Sign a file.

:param filename: The pathname to the file to be signed.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
                      private key used for signing.
:param keystore: The path to a directory which contains the keys
                 used in signing. If not specified, the instance's
                 ``gpg_home`` attribute is used instead.
:return: The absolute pathname of the file where the signature is
         stored.

---
## upload_file
```python
from index import upload_file
```

Upload a release file to the index.

:param metadata: A :class:`Metadata` instance defining at least a name
                 and version number for the file to be uploaded.
:param filename: The pathname of the file to be uploaded.
:param signer: The identifier of the signer of the file.
:param sign_password: The passphrase for the signer's
                      private key used for signing.
:param filetype: The type of the file being uploaded. This is the
                distutils command which produced that file, e.g.
                ``sdist`` or ``bdist_wheel``.
:param pyversion: The version of Python which the release relates
                  to. For code compatible with any Python, this would
                  be ``source``, otherwise it would be e.g. ``3.2``.
:param keystore: The path to a directory which contains the keys
                 used in signing. If not specified, the instance's
                 ``gpg_home`` attribute is used instead.
:return: The HTTP response received from PyPI upon submission of the
        request.

---
## upload_documentation
```python
from index import upload_documentation
```

Upload documentation to the index.

:param metadata: A :class:`Metadata` instance defining at least a name
                 and version number for the documentation to be
                 uploaded.
:param doc_dir: The pathname of the directory which contains the
                documentation. This should be the directory that
                contains the ``index.html`` for the documentation.
:return: The HTTP response received from PyPI upon submission of the
        request.

---
## get_verify_command
```python
from index import get_verify_command
```

Return a suitable command for verifying a file.

:param signature_filename: The pathname to the file containing the
                           signature.
:param data_filename: The pathname to the file containing the
                      signed data.
:param keystore: The path to a directory which contains the keys
                 used in verification. If not specified, the
                 instance's ``gpg_home`` attribute is used instead.
:return: The verifying command as a list suitable to be
         passed to :class:`subprocess.Popen`.

---
## verify_signature
```python
from index import verify_signature
```

Verify a signature for a file.

:param signature_filename: The pathname to the file containing the
                           signature.
:param data_filename: The pathname to the file containing the
                      signed data.
:param keystore: The path to a directory which contains the keys
                 used in verification. If not specified, the
                 instance's ``gpg_home`` attribute is used instead.
:return: True if the signature was verified, else False.

---
## download_file
```python
from index import download_file
```

This is a convenience method for downloading a file from an URL.
Normally, this will be a file from the index, though currently
no check is made for this (i.e. a file can be downloaded from
anywhere).

The method is just like the :func:`urlretrieve` function in the
standard library, except that it allows digest computation to be
done during download and checking that the downloaded data
matched any expected value.

:param url: The URL of the file to be downloaded (assumed to be
            available via an HTTP GET request).
:param destfile: The pathname where the downloaded file is to be
                 saved.
:param digest: If specified, this must be a (hasher, value)
               tuple, where hasher is the algorithm used (e.g.
               ``'md5'``) and ``value`` is the expected value.
:param reporthook: The same as for :func:`urlretrieve` in the
                   standard library.

---
## send_request
```python
from index import send_request
```

Send a standard library :class:`Request` to PyPI and return its
response.

:param req: The request to send.
:return: The HTTP response from PyPI (a standard library HTTPResponse).

---
## encode_request
```python
from index import encode_request
```

Encode fields and files for posting to an HTTP server.

:param fields: The fields to send as a list of (fieldname, value)
               tuples.
:param files: The files to send as a list of (fieldname, filename,
              file_bytes) tuple.

---
## search
```python
from index import search
```



---
## __name__
```python
from manifest import __name__
```

Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.

---
## Manifest
```python
from manifest import Manifest
```

A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.

---
## __init__
```python
from manifest import __init__
```

Initialise an instance.

:param base: The base directory to explore under.

---
## findall
```python
from manifest import findall
```

Find all files under the base and set ``allfiles`` to the absolute
pathnames of files found.

---
## add
```python
from manifest import add
```

Add a file to the manifest.

:param item: The pathname to add. This can be relative to the base.

---
## add_many
```python
from manifest import add_many
```

Add a list of files to the manifest.

:param items: The pathnames to add. These can be relative to the base.

---
## sorted
```python
from manifest import sorted
```

Return sorted files in directory order

---
## clear
```python
from manifest import clear
```

Clear all collected files.

---
## process_directive
```python
from manifest import process_directive
```

Process a directive which either adds some files from ``allfiles`` to
``files``, or removes some files from ``files``.

:param directive: The directive to process. This should be in a format
             compatible with distutils ``MANIFEST.in`` files:

             http://docs.python.org/distutils/sourcedist.html#commands

---
## _parse_directive
```python
from manifest import _parse_directive
```

Validate a directive.
:param directive: The directive to validate.
:return: A tuple of action, patterns, thedir, dir_patterns

---
## _include_pattern
```python
from manifest import _include_pattern
```

Select strings (presumably filenames) from 'self.files' that
match 'pattern', a Unix-style wildcard (glob) pattern.

Patterns are not quite the same as implemented by the 'fnmatch'
module: '*' and '?'  match non-special characters, where "special"
is platform-dependent: slash on Unix; colon, slash, and backslash on
DOS/Windows; and colon on Mac OS.

If 'anchor' is true (the default), then the pattern match is more
stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
'anchor' is false, both of these will match.

If 'prefix' is supplied, then only filenames starting with 'prefix'
(itself a pattern) and ending with 'pattern', with anything in between
them, will match.  'anchor' is ignored in this case.

If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
'pattern' is assumed to be either a string containing a regex or a
regex object -- no translation is done, the regex is just compiled
and used as-is.

Selected strings will be added to self.files.

Return True if files are found.

---
## _exclude_pattern
```python
from manifest import _exclude_pattern
```

Remove strings (presumably filenames) from 'files' that match
'pattern'.

Other parameters are the same as for 'include_pattern()', above.
The list 'self.files' is modified in place. Return True if files are
found.

This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
packaging source distributions

---
## _translate_pattern
```python
from manifest import _translate_pattern
```

Translate a shell-like wildcard pattern to a compiled regular
expression.

Return the compiled regex.  If 'is_regex' true,
then 'pattern' is directly compiled to a regex (if it's a string)
or just returned as-is (assumes it's a regex object).

---
## _glob_to_re
```python
from manifest import _glob_to_re
```

Translate a shell-like glob pattern to a regular expression.

Return a string containing the regex.  Differs from
'fnmatch.translate()' in that '*' does not match "special characters"
(which are platform-specific).

---
## add_dir
```python
from manifest import add_dir
```



---
## parse_marker
```python
from util import parse_marker
```

Parse a marker string and return a dictionary containing a marker expression.

The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
the expression grammar, or strings. A string contained in quotes is to be
interpreted as a literal string, and a string not contained in quotes is a
variable (such as os_name).

---
## parse_requirement
```python
from util import parse_requirement
```

Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement.

---
## get_resources_dests
```python
from util import get_resources_dests
```

Find destinations for resources files

---
## in_venv
```python
from util import in_venv
```



---
## get_executable
```python
from util import get_executable
```



---
## proceed
```python
from util import proceed
```



---
## extract_by_key
```python
from util import extract_by_key
```



---
## read_exports
```python
from util import read_exports
```



---
## write_exports
```python
from util import write_exports
```



---
## tempdir
```python
from util import tempdir
```



---
## chdir
```python
from util import chdir
```



---
## socket_timeout
```python
from util import socket_timeout
```



---
## cached_property
```python
from util import cached_property
```



---
## convert_path
```python
from util import convert_path
```

Return 'pathname' as a name that will work on the native filesystem.

The path is split on '/' and put back together again using the current
directory separator.  Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem.  Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.

---
## FileOperator
```python
from util import FileOperator
```



---
## resolve
```python
from util import resolve
```



---
## ExportEntry
```python
from util import ExportEntry
```



---
## get_export_entry
```python
from util import get_export_entry
```



---
## get_cache_base
```python
from util import get_cache_base
```

Return the default base location for distlib caches. If the directory does
not exist, it is created. Use the suffix provided for the base directory,
and default to '.distlib' if it isn't provided.

On Windows, if LOCALAPPDATA is defined in the environment, then it is
assumed to be a directory, and will be the parent directory of the result.
On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
directory - using os.expanduser('~') - will be the parent directory of
the result.

The result is just the directory '.distlib' in the parent directory as
determined above, or with the name specified with ``suffix``.

---
## path_to_cache_dir
```python
from util import path_to_cache_dir
```

Convert an absolute path to a directory name for use in a cache.

The algorithm used is:

#. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
#. Any occurrence of ``os.sep`` is replaced with ``'--'``.
#. ``'.cache'`` is appended.

---
## ensure_slash
```python
from util import ensure_slash
```



---
## parse_credentials
```python
from util import parse_credentials
```



---
## get_process_umask
```python
from util import get_process_umask
```



---
## is_string_sequence
```python
from util import is_string_sequence
```



---
## split_filename
```python
from util import split_filename
```

Extract name, version, python version from a filename (no extension)

Return name, version, pyver or None

---
## parse_name_and_version
```python
from util import parse_name_and_version
```

A utility method used to get name and version from a string.

From e.g. a Provides-Dist value.

:param p: A value in a form 'foo (1.0)'
:return: The name and version as a tuple.

---
## get_extras
```python
from util import get_extras
```



---
## _get_external_data
```python
from util import _get_external_data
```



---
## get_project_data
```python
from util import get_project_data
```



---
## get_package_data
```python
from util import get_package_data
```



---
## Cache
```python
from util import Cache
```

A class implementing a cache for resources that need to live in the file system
e.g. shared libraries. This class was moved from resources to here because it
could be used by other modules, e.g. the wheel module.

---
## EventMixin
```python
from util import EventMixin
```

A very simple publish/subscribe system.

---
## Sequencer
```python
from util import Sequencer
```



---
## unarchive
```python
from util import unarchive
```



---
## zip_dir
```python
from util import zip_dir
```

zip a directory tree into a BytesIO object

---
## Progress
```python
from util import Progress
```



---
## iglob
```python
from util import iglob
```

Extended globbing function that supports ** and {opt1,opt2,opt3}.

---
## _iglob
```python
from util import _iglob
```



---
## Transport
```python
from util import Transport
```



---
## ServerProxy
```python
from util import ServerProxy
```



---
## _csv_open
```python
from util import _csv_open
```



---
## CSVBase
```python
from util import CSVBase
```



---
## CSVReader
```python
from util import CSVReader
```



---
## CSVWriter
```python
from util import CSVWriter
```



---
## Configurator
```python
from util import Configurator
```



---
## SubprocessMixin
```python
from util import SubprocessMixin
```

Mixin for running subprocesses and capturing their output

---
## normalize_name
```python
from util import normalize_name
```

Normalize a python package name a la PEP 503

---
## PyPIRCFile
```python
from util import PyPIRCFile
```



---
## _load_pypirc
```python
from util import _load_pypirc
```

Read the PyPI access configuration as supported by distutils.

---
## _store_pypirc
```python
from util import _store_pypirc
```



---
## get_host_platform
```python
from util import get_host_platform
```

Return a string that identifies the current platform.  This is used mainly to
distinguish platform-specific build directories and platform-specific built
distributions.  Typically includes the OS name and version and the
architecture (as supplied by 'os.uname()'), although the exact information
included depends on the OS; eg. on Linux, the kernel version isn't
particularly important.

Examples of returned values:
   linux-i586
   linux-alpha (?)
   solaris-2.6-sun4u

Windows will return one of:
   win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
   win32 (all others - specifically, sys.platform is returned)

For other non-POSIX platforms, currently just returns 'sys.platform'.

---
## get_platform
```python
from util import get_platform
```



---
## marker_var
```python
from util import marker_var
```



---
## marker_expr
```python
from util import marker_expr
```



---
## marker_and
```python
from util import marker_and
```



---
## marker
```python
from util import marker
```



---
## get_rel_path
```python
from util import get_rel_path
```



---
## read_stream
```python
from util import read_stream
```



---
## __get__
```python
from util import __get__
```



---
## _init_record
```python
from util import _init_record
```



---
## record_as_written
```python
from util import record_as_written
```



---
## newer
```python
from util import newer
```

Tell if the target is newer than the source.

Returns true if 'source' exists and is more recently modified than
'target', or if 'source' exists and 'target' doesn't.

Returns false if both exist and 'target' is the same age or younger
than 'source'. Raise PackagingFileError if 'source' does not exist.

Note that this test is not very accurate: files created in the same
second will have the same "age".

---
## copy_file
```python
from util import copy_file
```



---
## copy_stream
```python
from util import copy_stream
```



---
## write_binary_file
```python
from util import write_binary_file
```



---
## write_text_file
```python
from util import write_text_file
```



---
## set_mode
```python
from util import set_mode
```



---
## ensure_dir
```python
from util import ensure_dir
```



---
## byte_compile
```python
from util import byte_compile
```



---
## ensure_removed
```python
from util import ensure_removed
```



---
## is_writable
```python
from util import is_writable
```



---
## commit
```python
from util import commit
```

Commit recorded changes, turn off recording, return
changes.

---
## rollback
```python
from util import rollback
```



---
## value
```python
from util import value
```



---
## __eq__
```python
from util import __eq__
```



---
## prefix_to_dir
```python
from util import prefix_to_dir
```

Converts a resource prefix to a directory name in the cache.

---
## add
```python
from util import add
```



---
## remove
```python
from util import remove
```



---
## get_subscribers
```python
from util import get_subscribers
```

Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.

---
## publish
```python
from util import publish
```

Publish a event and return a list of values returned by its
subscribers.

:param event: The event to publish.
:param args: The positional arguments to pass to the event's
             subscribers.
:param kwargs: The keyword arguments to pass to the event's
               subscribers.

---
## add_node
```python
from util import add_node
```



---
## remove_node
```python
from util import remove_node
```



---
## is_step
```python
from util import is_step
```



---
## get_steps
```python
from util import get_steps
```



---
## strong_connections
```python
from util import strong_connections
```



---
## dot
```python
from util import dot
```



---
## check_path
```python
from util import check_path
```



---
## update
```python
from util import update
```



---
## increment
```python
from util import increment
```



---
## start
```python
from util import start
```



---
## stop
```python
from util import stop
```



---
## maximum
```python
from util import maximum
```



---
## percentage
```python
from util import percentage
```



---
## format_duration
```python
from util import format_duration
```



---
## ETA
```python
from util import ETA
```



---
## speed
```python
from util import speed
```



---
## HTTPSConnection
```python
from util import HTTPSConnection
```



---
## HTTPSHandler
```python
from util import HTTPSHandler
```



---
## HTTPSOnlyHandler
```python
from util import HTTPSOnlyHandler
```



---
## make_connection
```python
from util import make_connection
```



---
## SafeTransport
```python
from util import SafeTransport
```



---
## next
```python
from util import next
```



---
## writerow
```python
from util import writerow
```



---
## configure_custom
```python
from util import configure_custom
```



---
## inc_convert
```python
from util import inc_convert
```

Default converter for the inc:// protocol.

---
## reader
```python
from util import reader
```

Read lines from a subprocess' output stream and either pass to a progress
callable (if specified) or write progress information to sys.stderr.

---
## run_command
```python
from util import run_command
```



---
## read
```python
from util import read
```



---
## strongconnect
```python
from util import strongconnect
```



---
## extraction_filter
```python
from util import extraction_filter
```

Run tarfile.tar_filter, but raise the expected ValueError

---
## connect
```python
from util import connect
```



---
## _conn_maker
```python
from util import _conn_maker
```

This is called to create a connection instance. Normally you'd
pass a connection class to do_open, but it doesn't actually check for
a class, and just expects a callable. As long as we behave just as a
constructor would have, we should be OK. If it ever changes so that
we *must* pass a class, we'll create an UnsafeHTTPSConnection class
which just sets check_domain to False in the class definition, and
choose which one to pass to do_open.

---
## https_open
```python
from util import https_open
```



---
## http_open
```python
from util import http_open
```



---
## convert
```python
from util import convert
```



---
## get_versions
```python
from util import get_versions
```

Return a list of operator, version tuples if any are
specified, else None.

---
## __name__
```python
from database import __name__
```

PEP 376 implementation.

---
## _Cache
```python
from database import _Cache
```

A simple cache mapping names and .dist-info paths to distributions

---
## DistributionPath
```python
from database import DistributionPath
```

Represents a set of distributions installed on a path (typically sys.path).

---
## Distribution
```python
from database import Distribution
```

A base class for distributions, whether installed or from indexes.
Either way, it must have some metadata, so that's all that's needed
for construction.

---
## BaseInstalledDistribution
```python
from database import BaseInstalledDistribution
```

This is the base class for installed distributions (whether PEP 376 or
legacy).

---
## InstalledDistribution
```python
from database import InstalledDistribution
```

Created with the *path* of the ``.dist-info`` directory provided to the
constructor. It reads the metadata contained in ``pydist.json`` when it is
instantiated., or uses a passed in Metadata instance (useful for when
dry-run mode is being used).

---
## EggInfoDistribution
```python
from database import EggInfoDistribution
```

Created with the *path* of the ``.egg-info`` directory or file provided
to the constructor. It reads the metadata contained in the file itself, or
if the given path happens to be a directory, the metadata is read from the
file ``PKG-INFO`` under that directory.

---
## DependencyGraph
```python
from database import DependencyGraph
```

Represents a dependency graph between distributions.

The dependency relationships are stored in an ``adjacency_list`` that maps
distributions to a list of ``(other, label)`` tuples where  ``other``
is a distribution and the edge is labeled with ``label`` (i.e. the version
specifier, if such was provided). Also, for more efficient traversal, for
every distribution ``x``, a list of predecessors is kept in
``reverse_list[x]``. An edge from distribution ``a`` to
distribution ``b`` means that ``a`` depends on ``b``. If any missing
dependencies are found, they are stored in ``missing``, which is a
dictionary that maps distributions to a list of requirements that were not
provided by any other distributions.

---
## make_graph
```python
from database import make_graph
```

Makes a dependency graph from the given distributions.

:parameter dists: a list of distributions
:type dists: list of :class:`distutils2.database.InstalledDistribution` and
             :class:`distutils2.database.EggInfoDistribution` instances
:rtype: a :class:`DependencyGraph` instance

---
## get_dependent_dists
```python
from database import get_dependent_dists
```

Recursively generate a list of distributions from *dists* that are
dependent on *dist*.

:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested

---
## get_required_dists
```python
from database import get_required_dists
```

Recursively generate a list of distributions from *dists* that are
required by *dist*.

:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested
             in finding the dependencies.

---
## make_dist
```python
from database import make_dist
```

A convenience method for making a dist given just a name and version.

---
## __init__
```python
from database import __init__
```



---
## clear
```python
from database import clear
```

Clear the cache, setting it to its initial state.

---
## add
```python
from database import add
```

Add a distribution to the cache.
:param dist: The distribution to add.

---
## _get_cache_enabled
```python
from database import _get_cache_enabled
```



---
## _set_cache_enabled
```python
from database import _set_cache_enabled
```



---
## clear_cache
```python
from database import clear_cache
```

Clears the internal cache.

---
## _yield_distributions
```python
from database import _yield_distributions
```

Yield .dist-info and/or .egg(-info) distributions.

---
## _generate_cache
```python
from database import _generate_cache
```

Scan the path for distributions and populate the cache with
those that are found.

---
## distinfo_dirname
```python
from database import distinfo_dirname
```

The *name* and *version* parameters are converted into their
filename-escaped form, i.e. any ``'-'`` characters are replaced
with ``'_'`` other than the one in ``'dist-info'`` and the one
separating the name from the version number.

:parameter name: is converted to a standard distribution name by replacing
                 any runs of non- alphanumeric characters with a single
                 ``'-'``.
:type name: string
:parameter version: is converted to a standard version string. Spaces
                    become dots, and all other non-alphanumeric characters
                    (except dots) become dashes, with runs of multiple
                    dashes condensed to a single dash.
:type version: string
:returns: directory name
:rtype: string

---
## get_distributions
```python
from database import get_distributions
```

Provides an iterator that looks for distributions and returns
:class:`InstalledDistribution` or
:class:`EggInfoDistribution` instances for each one of them.

:rtype: iterator of :class:`InstalledDistribution` and
        :class:`EggInfoDistribution` instances

---
## get_distribution
```python
from database import get_distribution
```

Looks for a named distribution on the path.

This function only returns the first result found, as no more than one
value is expected. If nothing is found, ``None`` is returned.

:rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
        or ``None``

---
## provides_distribution
```python
from database import provides_distribution
```

Iterates over all distributions to find which distributions provide *name*.
If a *version* is provided, it will be used to filter the results.

This function only returns the first result found, since no more than
one values are expected. If the directory is not found, returns ``None``.

:parameter version: a version specifier that indicates the version
                    required, conforming to the format in ``PEP-345``

:type name: string
:type version: string

---
## get_file_path
```python
from database import get_file_path
```

Return the path to a resource file.

---
## get_exported_entries
```python
from database import get_exported_entries
```

Return all of the exported entries in a particular category.

:param category: The category to search for entries.
:param name: If specified, only entries with that name are returned.

---
## source_url
```python
from database import source_url
```

The source archive download URL for this distribution.

---
## name_and_version
```python
from database import name_and_version
```

A utility property which displays the name and version in parentheses.

---
## provides
```python
from database import provides
```

A set of distribution names and versions provided by this distribution.
:return: A set of "name (version)" strings.

---
## _get_requirements
```python
from database import _get_requirements
```



---
## run_requires
```python
from database import run_requires
```



---
## meta_requires
```python
from database import meta_requires
```



---
## build_requires
```python
from database import build_requires
```



---
## test_requires
```python
from database import test_requires
```



---
## dev_requires
```python
from database import dev_requires
```



---
## matches_requirement
```python
from database import matches_requirement
```

Say if this instance matches (fulfills) a requirement.
:param req: The requirement to match.
:rtype req: str
:return: True if it matches, else False.

---
## __repr__
```python
from database import __repr__
```

Representation of the graph

---
## __eq__
```python
from database import __eq__
```



---
## __hash__
```python
from database import __hash__
```

Compute hash in a way which matches the equality test.

---
## get_hash
```python
from database import get_hash
```

Get the hash of some data, using a particular hash algorithm, if
specified.

:param data: The data to be hashed.
:type data: bytes
:param hasher: The name of a hash implementation, supported by hashlib,
               or ``None``. Examples of valid values are ``'sha1'``,
               ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
               ``'sha512'``. If no hasher is specified, the ``hasher``
               attribute of the :class:`InstalledDistribution` instance
               is used. If the hasher is determined to be ``None``, MD5
               is used as the hashing algorithm.
:returns: The hash of the data. If a hasher was explicitly specified,
          the returned hash will be prefixed with the specified hasher
          followed by '='.
:rtype: str

---
## __str__
```python
from database import __str__
```



---
## _get_records
```python
from database import _get_records
```

Get the list of installed files for the distribution
:return: A list of tuples of path, hash and size. Note that hash and
         size might be ``None`` for some entries. The path is exactly
         as stored in the file (which is as in PEP 376).

---
## exports
```python
from database import exports
```

Return the information exported by this distribution.
:return: A dictionary of exports, mapping an export category to a dict
         of :class:`ExportEntry` instances describing the individual
         export entries, and keyed by name.

---
## read_exports
```python
from database import read_exports
```

Read exports data from a file in .ini format.

:return: A dictionary of exports, mapping an export category to a list
         of :class:`ExportEntry` instances describing the individual
         export entries.

---
## write_exports
```python
from database import write_exports
```

Write a dictionary of exports to a file in .ini format.
:param exports: A dictionary of exports, mapping an export category to
                a list of :class:`ExportEntry` instances describing the
                individual export entries.

---
## get_resource_path
```python
from database import get_resource_path
```

NOTE: This API may change in the future.

Return the absolute path to a resource file with the given relative
path.

:param relative_path: The path, relative to .dist-info, of the resource
                      of interest.
:return: The absolute path where the resource is to be found.

---
## list_installed_files
```python
from database import list_installed_files
```

Iterates over the ``installed-files.txt`` entries and returns a tuple
``(path, hash, size)`` for each line.

:returns: a list of (path, hash, size)

---
## write_installed_files
```python
from database import write_installed_files
```

Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
existing ``RECORD`` file is silently overwritten.

prefix is used to determine when to write absolute paths.

---
## check_installed_files
```python
from database import check_installed_files
```

Checks that the hashes and sizes of the files in ``RECORD`` are
matched by the files themselves. Returns a (possibly empty) list of
mismatches. Each entry in the mismatch list will be a tuple consisting
of the path, 'exists', 'size' or 'hash' according to what didn't match
(existence is checked first, then size, then hash), the expected
value and the actual value.

---
## shared_locations
```python
from database import shared_locations
```

A dictionary of shared locations whose keys are in the set 'prefix',
'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
The corresponding value is the absolute path of that category for
this distribution, and takes into account any paths selected by the
user at installation time (e.g. via command-line arguments). In the
case of the 'namespace' key, this would be a list of absolute paths
for the roots of namespace packages in this distribution.

The first time this property is accessed, the relevant information is
read from the SHARED file in the .dist-info directory.

---
## write_shared_locations
```python
from database import write_shared_locations
```

Write shared location information to the SHARED file in .dist-info.
:param paths: A dictionary as described in the documentation for
:meth:`shared_locations`.
:param dry_run: If True, the action is logged but no file is actually
                written.
:return: The path of the file written to.

---
## get_distinfo_resource
```python
from database import get_distinfo_resource
```



---
## get_distinfo_file
```python
from database import get_distinfo_file
```

Returns a path located under the ``.dist-info`` directory. Returns a
string representing the path.

:parameter path: a ``'/'``-separated path relative to the
                 ``.dist-info`` directory or an absolute path;
                 If *path* is an absolute path and doesn't start
                 with the ``.dist-info`` directory path,
                 a :class:`DistlibException` is raised
:type path: str
:rtype: str

---
## list_distinfo_files
```python
from database import list_distinfo_files
```

Iterates over the ``installed-files.txt`` entries and returns paths for
each line if the path is pointing to a file located in the
``.egg-info`` directory or one of its subdirectories.

:parameter absolute: If *absolute* is ``True``, each returned path is
                  transformed into a local absolute path. Otherwise the
                  raw value from ``installed-files.txt`` is returned.
:type absolute: boolean
:returns: iterator of paths

---
## _get_metadata
```python
from database import _get_metadata
```



---
## add_distribution
```python
from database import add_distribution
```

Add the *distribution* to the graph.

:type distribution: :class:`distutils2.database.InstalledDistribution`
                    or :class:`distutils2.database.EggInfoDistribution`

---
## add_edge
```python
from database import add_edge
```

Add an edge from distribution *x* to distribution *y* with the given
*label*.

:type x: :class:`distutils2.database.InstalledDistribution` or
         :class:`distutils2.database.EggInfoDistribution`
:type y: :class:`distutils2.database.InstalledDistribution` or
         :class:`distutils2.database.EggInfoDistribution`
:type label: ``str`` or ``None``

---
## add_missing
```python
from database import add_missing
```

Add a missing *requirement* for the given *distribution*.

:type distribution: :class:`distutils2.database.InstalledDistribution`
                    or :class:`distutils2.database.EggInfoDistribution`
:type requirement: ``str``

---
## _repr_dist
```python
from database import _repr_dist
```



---
## repr_node
```python
from database import repr_node
```

Prints only a subgraph

---
## to_dot
```python
from database import to_dot
```

Writes a DOT output for the graph to the provided file *f*.

If *skip_disconnected* is set to ``True``, then all distributions
that are not dependent on any other distribution are skipped.

:type f: has to support ``file``-like operations
:type skip_disconnected: ``bool``

---
## topological_sort
```python
from database import topological_sort
```

Perform a topological sort of the graph.
:return: A tuple, the first element of which is a topologically sorted
         list of distributions, and the second element of which is a
         list of distributions that cannot be sorted because they have
         circular dependencies and so form a cycle.

---
## set_name_and_version
```python
from database import set_name_and_version
```



---
## parse_requires_data
```python
from database import parse_requires_data
```

Create a list of dependencies from a requires.txt file.

*data*: the contents of a setuptools-produced requires.txt file.

---
## parse_requires_path
```python
from database import parse_requires_path
```

Create a list of dependencies from a requires.txt file.

*req_path*: the path to a setuptools-produced requires.txt file.

---
## _md5
```python
from database import _md5
```



---
## _size
```python
from database import _size
```



---
## DistlibException
```python
from __init__ import DistlibException
```



---
## NullHandler
```python
from __init__ import NullHandler
```



---
## createLock
```python
from __init__ import createLock
```



---
## _is_version_marker
```python
from markers import _is_version_marker
```



---
## _is_literal
```python
from markers import _is_literal
```



---
## _get_versions
```python
from markers import _get_versions
```



---
## Evaluator
```python
from markers import Evaluator
```

This class is used to evaluate marker expressions.

---
## default_context
```python
from markers import default_context
```



---
## interpret
```python
from markers import interpret
```

Interpret a marker and return a result depending on environment.

:param marker: The marker to interpret.
:type marker: str
:param execution_context: The context used for name lookup.
:type execution_context: mapping

---
## __name__
```python
from resources import __name__
```



---
## ResourceCache
```python
from resources import ResourceCache
```



---
## ResourceBase
```python
from resources import ResourceBase
```



---
## Resource
```python
from resources import Resource
```

A class representing an in-package resource, such as a data file. This is
not normally instantiated by user code, but rather by a
:class:`ResourceFinder` which manages the resource.

---
## ResourceContainer
```python
from resources import ResourceContainer
```



---
## ResourceFinder
```python
from resources import ResourceFinder
```

Resource finder for file system resources.

---
## ZipResourceFinder
```python
from resources import ZipResourceFinder
```

Resource finder for resources in .zip files.

---
## register_finder
```python
from resources import register_finder
```



---
## finder
```python
from resources import finder
```

Return a resource finder for a package.
:param package: The name of the package.
:return: A :class:`ResourceFinder` instance for the package.

---
## finder_for_path
```python
from resources import finder_for_path
```

Return a resource finder for a path, which should represent a container.

:param path: The path.
:return: A :class:`ResourceFinder` instance for the path.

---
## __init__
```python
from resources import __init__
```



---
## is_stale
```python
from resources import is_stale
```

Is the cache stale for the given resource?

:param resource: The :class:`Resource` being cached.
:param path: The path of the resource in the cache.
:return: True if the cache is stale.

---
## get
```python
from resources import get
```

Get a resource into the cache,

:param resource: A :class:`Resource` instance.
:return: The pathname of the resource in the cache.

---
## as_stream
```python
from resources import as_stream
```

Get the resource as a stream.

This is not a property to make it obvious that it returns a new stream
each time.

---
## file_path
```python
from resources import file_path
```



---
## bytes
```python
from resources import bytes
```



---
## size
```python
from resources import size
```



---
## resources
```python
from resources import resources
```



---
## _adjust_path
```python
from resources import _adjust_path
```



---
## _make_path
```python
from resources import _make_path
```



---
## _find
```python
from resources import _find
```



---
## get_cache_info
```python
from resources import get_cache_info
```



---
## find
```python
from resources import find
```



---
## get_stream
```python
from resources import get_stream
```



---
## get_bytes
```python
from resources import get_bytes
```



---
## get_size
```python
from resources import get_size
```



---
## get_resources
```python
from resources import get_resources
```



---
## is_container
```python
from resources import is_container
```



---
## iterator
```python
from resources import iterator
```



---
## _is_directory
```python
from resources import _is_directory
```



---
## allowed
```python
from resources import allowed
```



---
## __name__
```python
from scripts import __name__
```



---
## enquote_executable
```python
from scripts import enquote_executable
```



---
## ScriptMaker
```python
from scripts import ScriptMaker
```

A class to copy or create scripts from source scripts or callable
specifications.

---
## __init__
```python
from scripts import __init__
```



---
## _get_alternate_executable
```python
from scripts import _get_alternate_executable
```



---
## _build_shebang
```python
from scripts import _build_shebang
```

Build a shebang line. In the simple case (on Windows, or a shebang line
which is not too long or contains spaces) use a simple formulation for
the shebang. Otherwise, use /bin/sh as the executable, with a contrived
shebang which allows the script to run either under Python or sh, using
suitable quoting. Thanks to Harald Nordgren for his input.

See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
          https://hg.mozilla.org/mozilla-central/file/tip/mach

---
## _get_shebang
```python
from scripts import _get_shebang
```



---
## _get_script_text
```python
from scripts import _get_script_text
```



---
## get_manifest
```python
from scripts import get_manifest
```



---
## _write_script
```python
from scripts import _write_script
```



---
## get_script_filenames
```python
from scripts import get_script_filenames
```



---
## _make_script
```python
from scripts import _make_script
```



---
## _copy_script
```python
from scripts import _copy_script
```



---
## dry_run
```python
from scripts import dry_run
```



---
## make
```python
from scripts import make
```

Make a script.

:param specification: The specification, which is either a valid export
                      entry specification (to make a script from a
                      callable) or a filename (to make a script by
                      copying from a source location).
:param options: A dictionary of options controlling script generation.
:return: A list of all absolute pathnames written to.

---
## make_multiple
```python
from scripts import make_multiple
```

Take a list of specifications and make scripts from them,
:param specifications: A list of specifications.
:return: A list of all absolute pathnames written to,

---
## _is_shell
```python
from scripts import _is_shell
```

Determine if the specified executable is a script
(contains a #! line)

---
## _fix_jython_executable
```python
from scripts import _fix_jython_executable
```



---
## _get_launcher
```python
from scripts import _get_launcher
```



---
## _get_suffixes
```python
from wheel import _get_suffixes
```



---
## _load_dynamic
```python
from wheel import _load_dynamic
```



---
## Mounter
```python
from wheel import Mounter
```



---
## _get_glibc_version
```python
from wheel import _get_glibc_version
```



---
## compatible_tags
```python
from wheel import compatible_tags
```

Return (pyver, abi, arch) tuples compatible with this Python.

---
## is_compatible
```python
from wheel import is_compatible
```

Determine if a wheel is compatible with the running system.

---
## _derive_abi
```python
from wheel import _derive_abi
```



---
## add
```python
from wheel import add
```



---
## remove
```python
from wheel import remove
```



---
## find_module
```python
from wheel import find_module
```



---
## load_module
```python
from wheel import load_module
```



---
## filename
```python
from wheel import filename
```

Build and return a filename from the various components.

---
## exists
```python
from wheel import exists
```



---
## tags
```python
from wheel import tags
```



---
## metadata
```python
from wheel import metadata
```



---
## get_wheel_metadata
```python
from wheel import get_wheel_metadata
```



---
## info
```python
from wheel import info
```



---
## process_shebang
```python
from wheel import process_shebang
```



---
## get_hash
```python
from wheel import get_hash
```



---
## write_record
```python
from wheel import write_record
```



---
## write_records
```python
from wheel import write_records
```



---
## build_zip
```python
from wheel import build_zip
```



---
## build
```python
from wheel import build
```

Build a wheel from files in specified paths, and use any specified tags
when determining the name of the wheel.

---
## skip_entry
```python
from wheel import skip_entry
```

Determine whether an archive entry should be skipped when verifying
or installing.

---
## install
```python
from wheel import install
```

Install a wheel to the specified paths. If kwarg ``warner`` is
specified, it should be a callable, which will be called with two
tuples indicating the wheel version of this software and the wheel
version in the file, if there is a discrepancy in the versions.
This can be used to issue any warnings to raise any exceptions.
If kwarg ``lib_only`` is True, only the purelib/platlib files are
installed, and the headers, scripts, data and dist-info metadata are
not written. If kwarg ``bytecode_hashed_invalidation`` is True, written
bytecode will try to use file-hash based invalidation (PEP-552) on
supported interpreter versions (CPython 2.7+).

The return value is a :class:`InstalledDistribution` instance unless
``options.lib_only`` is True, in which case the return value is ``None``.

---
## _get_dylib_cache
```python
from wheel import _get_dylib_cache
```



---
## _get_extensions
```python
from wheel import _get_extensions
```



---
## is_mountable
```python
from wheel import is_mountable
```

Determine if a wheel is asserted as mountable by its metadata.

---
## mount
```python
from wheel import mount
```



---
## unmount
```python
from wheel import unmount
```



---
## verify
```python
from wheel import verify
```



---
## update
```python
from wheel import update
```

Update the contents of a wheel in a generic way. The modifier should
be a callable which expects a dictionary argument: its keys are
archive-entry paths, and its values are absolute filesystem paths
where the contents the corresponding archive entries can be found. The
modifier is free to change the contents of the files pointed to, add
new entries and remove entries, before returning. This method will
extract the entire contents of the wheel to a temporary location, call
the modifier, and then use the passed (and possibly updated)
dictionary to write a new wheel. If ``dest_dir`` is specified, the new
wheel is written there -- otherwise, the original wheel is overwritten.

The modifier should return True if it updated the wheel, else False.
This method returns the same value the modifier returns.

---
## sorter
```python
from wheel import sorter
```



---
## get_version
```python
from wheel import get_version
```



---
## update_version
```python
from wheel import update_version
```



---
## __name__
```python
from serialize import __name__
```



---
## Serializer
```python
from serialize import Serializer
```



---
## dumps
```python
from serialize import dumps
```



---
## serialize
```python
from serialize import serialize
```



---
## loads
```python
from serialize import loads
```



---
## prepare_response
```python
from serialize import prepare_response
```

Verify our vary headers match and construct a real urllib3
HTTPResponse object.

---
## _loads_v4
```python
from serialize import _loads_v4
```



---
## __name__
```python
from wrapper import __name__
```



---
## CacheControl
```python
from wrapper import CacheControl
```



---
## __name__
```python
from controller import __name__
```

The httplib2 algorithms ported for use with requests.

---
## parse_uri
```python
from controller import parse_uri
```

Parses a URI using the regex given in Appendix B of RFC 3986.

(scheme, authority, path, query, fragment) = parse_uri(uri)

---
## CacheController
```python
from controller import CacheController
```

An interface to see if request should cached or not.

---
## __init__
```python
from controller import __init__
```



---
## _urlnorm
```python
from controller import _urlnorm
```

Normalize the URL to create a safe key for the cache

---
## cache_url
```python
from controller import cache_url
```



---
## parse_cache_control
```python
from controller import parse_cache_control
```



---
## _load_from_cache
```python
from controller import _load_from_cache
```

Load a cached response, or return None if it's not available.

---
## cached_request
```python
from controller import cached_request
```

Return a cached response if it exists in the cache, otherwise
return False.

---
## conditional_headers
```python
from controller import conditional_headers
```



---
## _cache_set
```python
from controller import _cache_set
```

Store the data in the cache.

---
## cache_response
```python
from controller import cache_response
```

Algorithm for caching requests.

This assumes a requests Response object.

---
## update_cached_response
```python
from controller import update_cached_response
```

On a 304 we will get a new set of headers that we want to
update our cached value with, assuming we have one.

This should only ever be called when we've sent an ETag and
gotten a 304 as the response.

---
## __name__
```python
from filewrapper import __name__
```



---
## CallbackFileWrapper
```python
from filewrapper import CallbackFileWrapper
```

Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.

All attributes are proxied to the underlying file object.

This class uses members with a double underscore (__) leading prefix so as
not to accidentally shadow an attribute.

The data is stored in a temporary file until it is all available.  As long
as the temporary files directory is disk-based (sometimes it's a
memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory
pressure is high.  For small files the disk usually won't be used at all,
it'll all be in the filesystem memory cache, so there should be no
performance impact.

---
## __init__
```python
from filewrapper import __init__
```



---
## __getattr__
```python
from filewrapper import __getattr__
```



---
## __is_fp_closed
```python
from filewrapper import __is_fp_closed
```



---
## _close
```python
from filewrapper import _close
```



---
## read
```python
from filewrapper import read
```



---
## _safe_read
```python
from filewrapper import _safe_read
```



---
## __name__
```python
from heuristics import __name__
```



---
## expire_after
```python
from heuristics import expire_after
```



---
## datetime_to_header
```python
from heuristics import datetime_to_header
```



---
## BaseHeuristic
```python
from heuristics import BaseHeuristic
```



---
## OneDayCache
```python
from heuristics import OneDayCache
```

Cache the response by providing an expires 1 day in the
future.

---
## ExpiresAfter
```python
from heuristics import ExpiresAfter
```

Cache **all** requests for a defined time period.

---
## LastModified
```python
from heuristics import LastModified
```

If there is no Expires header already, fall back on Last-Modified
using the heuristic from
http://tools.ietf.org/html/rfc7234#section-4.2.2
to calculate a reasonable value.

Firefox also does something like this per
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ
http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
Unlike mozilla we limit this to 24-hr.

---
## warning
```python
from heuristics import warning
```



---
## update_headers
```python
from heuristics import update_headers
```



---
## apply
```python
from heuristics import apply
```



---
## __init__
```python
from heuristics import __init__
```



---
## __name__
```python
from adapter import __name__
```



---
## CacheControlAdapter
```python
from adapter import CacheControlAdapter
```



---
## __init__
```python
from adapter import __init__
```



---
## send
```python
from adapter import send
```

Send a request. Use the request information to see if it
exists in the cache and cache the response if we need to and can.

---
## build_response
```python
from adapter import build_response
```

Build a response by making a request or using the cache.

This will end up calling send and returning a potentially
cached response

---
## close
```python
from adapter import close
```



---
## _update_chunk_length
```python
from adapter import _update_chunk_length
```



---
## BaseCache
```python
from cache import BaseCache
```



---
## DictCache
```python
from cache import DictCache
```



---
## SeparateBodyBaseCache
```python
from cache import SeparateBodyBaseCache
```

In this variant, the body is not stored mixed in with the metadata, but is
passed in (as a bytes-like object) in a separate call to ``set_body()``.

That is, the expected interaction pattern is::

    cache.set(key, serialized_metadata)
    cache.set_body(key)

Similarly, the body should be loaded separately via ``get_body()``.

---
## close
```python
from cache import close
```



---
## __name__
```python
from _cmd import __name__
```



---
## setup_logging
```python
from _cmd import setup_logging
```



---
## get_session
```python
from _cmd import get_session
```



---
## get_args
```python
from _cmd import get_args
```



---
## main
```python
from _cmd import main
```



---
## where
```python
from certs import where
```



---
## TOMLDecodeError
```python
from _parser import TOMLDecodeError
```

An error raised if a document is not valid TOML.

---
## load
```python
from _parser import load
```

Parse TOML from a binary file object.

---
## loads
```python
from _parser import loads
```

Parse TOML from a string.

---
## Flags
```python
from _parser import Flags
```

Flags that map to parsed keys/namespaces.

---
## NestedDict
```python
from _parser import NestedDict
```



---
## Output
```python
from _parser import Output
```



---
## skip_chars
```python
from _parser import skip_chars
```



---
## skip_until
```python
from _parser import skip_until
```



---
## skip_comment
```python
from _parser import skip_comment
```



---
## skip_comments_and_array_ws
```python
from _parser import skip_comments_and_array_ws
```



---
## create_dict_rule
```python
from _parser import create_dict_rule
```



---
## create_list_rule
```python
from _parser import create_list_rule
```



---
## key_value_rule
```python
from _parser import key_value_rule
```



---
## parse_key_value_pair
```python
from _parser import parse_key_value_pair
```



---
## parse_key
```python
from _parser import parse_key
```



---
## parse_key_part
```python
from _parser import parse_key_part
```



---
## parse_one_line_basic_str
```python
from _parser import parse_one_line_basic_str
```



---
## parse_array
```python
from _parser import parse_array
```



---
## parse_inline_table
```python
from _parser import parse_inline_table
```



---
## parse_basic_str_escape
```python
from _parser import parse_basic_str_escape
```



---
## parse_basic_str_escape_multiline
```python
from _parser import parse_basic_str_escape_multiline
```



---
## parse_hex_char
```python
from _parser import parse_hex_char
```



---
## parse_literal_str
```python
from _parser import parse_literal_str
```



---
## parse_multiline_str
```python
from _parser import parse_multiline_str
```



---
## parse_basic_str
```python
from _parser import parse_basic_str
```



---
## parse_value
```python
from _parser import parse_value
```



---
## suffixed_err
```python
from _parser import suffixed_err
```

Return a `TOMLDecodeError` where error message is suffixed with
coordinates in source.

---
## is_unicode_scalar_value
```python
from _parser import is_unicode_scalar_value
```



---
## make_safe_parse_float
```python
from _parser import make_safe_parse_float
```

A decorator to make `parse_float` safe.

`parse_float` must not return dicts or lists, because these types
would be mixed with parsed TOML tables and arrays, thus confusing
the parser. The returned decorated callable raises `ValueError`
instead of returning illegal types.

---
## add_pending
```python
from _parser import add_pending
```



---
## finalize_pending
```python
from _parser import finalize_pending
```



---
## unset_all
```python
from _parser import unset_all
```



---
## set
```python
from _parser import set
```



---
## is_
```python
from _parser import is_
```



---
## get_or_create_nest
```python
from _parser import get_or_create_nest
```



---
## append_nest_to_list
```python
from _parser import append_nest_to_list
```



---
## coord_repr
```python
from _parser import coord_repr
```



---
## safe_parse_float
```python
from _parser import safe_parse_float
```



---
## __name__
```python
from _re import __name__
```



---
## match_to_datetime
```python
from _re import match_to_datetime
```

Convert a `RE_DATETIME` match to `datetime.datetime` or `datetime.date`.

Raises ValueError if the match does not correspond to a valid date
or datetime.

---
## cached_tz
```python
from _re import cached_tz
```



---
## match_to_localtime
```python
from _re import match_to_localtime
```



---
## match_to_number
```python
from _re import match_to_number
```



---
## write_json
```python
from _impl import write_json
```



---
## read_json
```python
from _impl import read_json
```



---
## BackendUnavailable
```python
from _impl import BackendUnavailable
```

Will be raised if the backend cannot be imported in the hook process.

---
## BackendInvalid
```python
from _impl import BackendInvalid
```

Will be raised if the backend is invalid.

---
## HookMissing
```python
from _impl import HookMissing
```

Will be raised on missing hooks (if a fallback can't be used).

---
## UnsupportedOperation
```python
from _impl import UnsupportedOperation
```

May be raised by build_sdist if the backend indicates that it can't.

---
## default_subprocess_runner
```python
from _impl import default_subprocess_runner
```

The default method of calling the wrapper subprocess.

This uses :func:`subprocess.check_call` under the hood.

---
## quiet_subprocess_runner
```python
from _impl import quiet_subprocess_runner
```

Call the subprocess while suppressing output.

This uses :func:`subprocess.check_output` under the hood.

---
## norm_and_check
```python
from _impl import norm_and_check
```

Normalise and check a backend path.

Ensure that the requested backend path is specified as a relative path,
and resolves to a location under the given source tree.

Return an absolute version of the requested path.

---
## BuildBackendHookCaller
```python
from _impl import BuildBackendHookCaller
```

A wrapper to call the build backend hooks for a source directory.
    

---
## __init__
```python
from _impl import __init__
```

:param source_dir: The source directory to invoke the build backend for
:param build_backend: The build backend spec
:param backend_path: Additional path entries for the build backend spec
:param runner: The :ref:`subprocess runner <Subprocess Runners>` to use
:param python_executable:
    The Python executable used to invoke the build backend

---
## subprocess_runner
```python
from _impl import subprocess_runner
```

A context manager for temporarily overriding the default
:ref:`subprocess runner <Subprocess Runners>`.

.. code-block:: python

    hook_caller = BuildBackendHookCaller(...)
    with hook_caller.subprocess_runner(quiet_subprocess_runner):
        ...

---
## _supported_features
```python
from _impl import _supported_features
```

Return the list of optional features supported by the backend.

---
## get_requires_for_build_wheel
```python
from _impl import get_requires_for_build_wheel
```

Get additional dependencies required for building a wheel.

:returns: A list of :pep:`dependency specifiers <508>`.
:rtype: list[str]

.. admonition:: Fallback

    If the build backend does not defined a hook with this name, an
    empty list will be returned.

---
## prepare_metadata_for_build_wheel
```python
from _impl import prepare_metadata_for_build_wheel
```

Prepare a ``*.dist-info`` folder with metadata for this project.

:returns: Name of the newly created subfolder within
          ``metadata_directory``, containing the metadata.
:rtype: str

.. admonition:: Fallback

    If the build backend does not define a hook with this name and
    ``_allow_fallback`` is truthy, the backend will be asked to build a
    wheel via the ``build_wheel`` hook and the dist-info extracted from
    that will be returned.

---
## build_wheel
```python
from _impl import build_wheel
```

Build a wheel from this project.

:returns:
    The name of the newly created wheel within ``wheel_directory``.

.. admonition:: Interaction with fallback

    If the ``build_wheel`` hook was called in the fallback for
    :meth:`prepare_metadata_for_build_wheel`, the build backend would
    not be invoked. Instead, the previously built wheel will be copied
    to ``wheel_directory`` and the name of that file will be returned.

---
## get_requires_for_build_editable
```python
from _impl import get_requires_for_build_editable
```

Get additional dependencies required for building an editable wheel.

:returns: A list of :pep:`dependency specifiers <508>`.
:rtype: list[str]

.. admonition:: Fallback

    If the build backend does not defined a hook with this name, an
    empty list will be returned.

---
## prepare_metadata_for_build_editable
```python
from _impl import prepare_metadata_for_build_editable
```

Prepare a ``*.dist-info`` folder with metadata for this project.

:returns: Name of the newly created subfolder within
          ``metadata_directory``, containing the metadata.
:rtype: str

.. admonition:: Fallback

    If the build backend does not define a hook with this name and
    ``_allow_fallback`` is truthy, the backend will be asked to build a
    wheel via the ``build_editable`` hook and the dist-info
    extracted from that will be returned.

---
## build_editable
```python
from _impl import build_editable
```

Build an editable wheel from this project.

:returns:
    The name of the newly created wheel within ``wheel_directory``.

.. admonition:: Interaction with fallback

    If the ``build_editable`` hook was called in the fallback for
    :meth:`prepare_metadata_for_build_editable`, the build backend
    would not be invoked. Instead, the previously built wheel will be
    copied to ``wheel_directory`` and the name of that file will be
    returned.

---
## get_requires_for_build_sdist
```python
from _impl import get_requires_for_build_sdist
```

Get additional dependencies required for building an sdist.

:returns: A list of :pep:`dependency specifiers <508>`.
:rtype: list[str]

---
## build_sdist
```python
from _impl import build_sdist
```

Build an sdist from this project.

:returns:
    The name of the newly created sdist within ``wheel_directory``.

---
## _call_hook
```python
from _impl import _call_hook
```



---
## iter_fields
```python
from filepost import iter_fields
```

.. deprecated:: 1.6

Iterate over fields.

The addition of :class:`~urllib3.fields.RequestField` makes this function
obsolete. Instead, use :func:`iter_field_objects`, which returns
:class:`~urllib3.fields.RequestField` objects.

Supports list of (k, v) tuples and dicts.

---
## _replace_multiple
```python
from fields import _replace_multiple
```



---
## replacer
```python
from fields import replacer
```



---
## __name__
```python
from request import __name__
```



---
## RequestMethods
```python
from request import RequestMethods
```

Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`urllib3.HTTPConnectionPool` and
:class:`urllib3.PoolManager`.

Provides behavior for making common types of HTTP request methods and
decides which type of request field encoding to use.

Specifically,

:meth:`.request_encode_url` is for sending requests whose fields are
encoded in the URL (such as GET, HEAD, DELETE).

:meth:`.request_encode_body` is for sending requests whose fields are
encoded in the *body* of the request using multipart or www-form-urlencoded
(such as for POST, PUT, PATCH).

:meth:`.request` is for making any kind of request, it will look up the
appropriate encoding format and use one of the above two methods to make
the request.

Initializer parameters:

:param headers:
    Headers to include with all requests, unless other headers are given
    explicitly.

---
## __init__
```python
from request import __init__
```



---
## urlopen
```python
from request import urlopen
```



---
## request
```python
from request import request
```

Make a request using :meth:`urlopen` with the appropriate encoding of
``fields`` based on the ``method`` used.

This is a convenience method that requires the least amount of manual
effort. It can be used in most situations, while still having the
option to drop down to more specific methods when necessary, such as
:meth:`request_encode_url`, :meth:`request_encode_body`,
or even the lowest level :meth:`urlopen`.

---
## request_encode_url
```python
from request import request_encode_url
```

Make a request using :meth:`urlopen` with the ``fields`` encoded in
the url. This is useful for request methods like GET, HEAD, DELETE, etc.

---
## request_encode_body
```python
from request import request_encode_body
```

Make a request using :meth:`urlopen` with the ``fields`` encoded in
the body. This is useful for request methods like POST, PUT, PATCH, etc.

When ``encode_multipart=True`` (default), then
:func:`urllib3.encode_multipart_formdata` is used to encode
the payload with the appropriate content type. Otherwise
:func:`urllib.parse.urlencode` is used with the
'application/x-www-form-urlencoded' content type.

Multipart encoding must be used when posting files, and it's reasonably
safe to use it in other times too. However, it may break request
signing, such as with OAuth.

Supports an optional ``fields`` parameter of key/value strings AND
key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
the MIME type is optional. For example::

    fields = {
        'foo': 'bar',
        'fakefile': ('foofile.txt', 'contents of foofile'),
        'realfile': ('barfile.txt', open('realfile').read()),
        'typedfile': ('bazfile.bin', open('bazfile').read(),
                      'image/jpeg'),
        'nonamefile': 'contents of nonamefile field',
    }

When uploading a file, providing a filename (the first parameter of the
tuple) is optional but recommended to best mimic behavior of browsers.

Note that if ``headers`` are supplied, the 'Content-Type' header will
be overwritten because it depends on the dynamic random boundary string
which is used to compose the body of the request. The random boundary
string can be explicitly set with the ``multipart_boundary`` parameter.

---
## RequestModule
```python
from request import RequestModule
```



---
## __call__
```python
from request import __call__
```

If user tries to call this module directly urllib3 v2.x style raise an error to the user
suggesting they may need urllib3 v2

---
## _validate_proxy_scheme_url_selection
```python
from poolmanager import _validate_proxy_scheme_url_selection
```

Validates that were not attempting to do TLS in TLS connections on
Python2 or with unsupported SSL implementations.

---
## __getattr__
```python
from response import __getattr__
```



---
## from_httplib
```python
from response import from_httplib
```

Given an :class:`http.client.HTTPResponse` instance ``r``, return a
corresponding :class:`urllib3.response.HTTPResponse` object.

Remaining parameters are passed to the HTTPResponse constructor, along
with ``original_response=r``.

---
## _is_using_tunnel
```python
from connection import _is_using_tunnel
```



---
## _prepare_conn
```python
from connection import _prepare_conn
```



---
## ConnectionError
```python
from connection import ConnectionError
```



---
## BrokenPipeError
```python
from connection import BrokenPipeError
```



---
## pop
```python
from _collections import pop
```

D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
If key is not found, d is returned if given, otherwise KeyError is raised.

---
## from_httplib
```python
from _collections import from_httplib
```

Read headers from a Python 2 httplib message object.

---
## RLock
```python
from _collections import RLock
```



---
## __enter__
```python
from _collections import __enter__
```



---
## __exit__
```python
from _collections import __exit__
```



---
## SubjectAltNameWarning
```python
from exceptions import SubjectAltNameWarning
```

Warned when connecting to a host with a certificate missing a SAN.

---
## SNIMissingWarning
```python
from exceptions import SNIMissingWarning
```

Warned when making a HTTPS request without SNI available.

---
## _absolute_url
```python
from connectionpool import _absolute_url
```



---
## _prepare_conn
```python
from connectionpool import _prepare_conn
```

Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket`
and establish the tunnel if proxy is used.

---
## _is_ssl_error_message_from_http_proxy
```python
from connectionpool import _is_ssl_error_message_from_http_proxy
```



---
## _LoaderProtocol
```python
from __init__ import _LoaderProtocol
```



---
## _ZipLoaderModule
```python
from __init__ import _ZipLoaderModule
```



---
## PEP440Warning
```python
from __init__ import PEP440Warning
```

Used when there is an issue with a version or specifier not complying with
PEP 440.

---
## _declare_state
```python
from __init__ import _declare_state
```



---
## _sget_dict
```python
from __init__ import _sget_dict
```



---
## _sset_dict
```python
from __init__ import _sset_dict
```



---
## _sget_object
```python
from __init__ import _sget_object
```



---
## _sset_object
```python
from __init__ import _sset_object
```



---
## get_supported_platform
```python
from __init__ import get_supported_platform
```

Return this platform's maximum compatible version.

distutils.util.get_platform() normally reports the minimum version
of macOS that would be required to *use* extensions produced by
distutils.  But what we want when checking compatibility is to know the
version of macOS that we are *running*.  To allow usage of packages that
explicitly require a newer version of macOS, we must also know the
current version of the OS.

If this condition occurs for any other platform with a version in its
platform strings, this function should be extended accordingly.

---
## ResolutionError
```python
from __init__ import ResolutionError
```

Abstract base for dependency resolution errors

---
## VersionConflict
```python
from __init__ import VersionConflict
```

An already-installed version conflicts with the requested version.

Should be initialized with the installed Distribution and the requested
Requirement.

---
## ContextualVersionConflict
```python
from __init__ import ContextualVersionConflict
```

A VersionConflict that accepts a third parameter, the set of the
requirements that required the installed Distribution.

---
## DistributionNotFound
```python
from __init__ import DistributionNotFound
```

A requested distribution was not found

---
## UnknownExtra
```python
from __init__ import UnknownExtra
```

Distribution doesn't have an "extra feature" of the given name

---
## register_loader_type
```python
from __init__ import register_loader_type
```

Register `provider_factory` to make providers for `loader_type`

`loader_type` is the type or class of a PEP 302 ``module.__loader__``,
and `provider_factory` is a function that, passed a *module* object,
returns an ``IResourceProvider`` for that module.

---
## get_provider
```python
from __init__ import get_provider
```

Return an IResourceProvider for the named module or requirement

---
## _macos_vers
```python
from __init__ import _macos_vers
```



---
## _macos_arch
```python
from __init__ import _macos_arch
```



---
## get_build_platform
```python
from __init__ import get_build_platform
```

Return this platform's string for platform-specific distributions

XXX Currently this is the same as ``distutils.util.get_platform()``, but it
needs some hacks for Linux and macOS.

---
## compatible_platforms
```python
from __init__ import compatible_platforms
```

Can code for the `provided` platform run on the `required` platform?

Returns true if either platform is ``None``, or the platforms are equal.

XXX Needs compatibility checks for Linux and other unixy OSes.

---
## get_distribution
```python
from __init__ import get_distribution
```

Return a current distribution object for a Requirement or string

---
## load_entry_point
```python
from __init__ import load_entry_point
```

Return the `name` entry point of `group` or raise ImportError

---
## get_entry_map
```python
from __init__ import get_entry_map
```

Return the entry point map for `group`, or the full entry map

---
## get_entry_info
```python
from __init__ import get_entry_info
```

Return the EntryPoint object for `group`+`name`, or ``None``

---
## IMetadataProvider
```python
from __init__ import IMetadataProvider
```



---
## IResourceProvider
```python
from __init__ import IResourceProvider
```

An object that provides access to package resources

---
## WorkingSet
```python
from __init__ import WorkingSet
```

A collection of active distributions on sys.path (or a similar list)

---
## _ReqExtras
```python
from __init__ import _ReqExtras
```

Map each requirement to the extras that demanded it.

---
## Environment
```python
from __init__ import Environment
```

Searchable snapshot of distributions on a search path

---
## ExtractionError
```python
from __init__ import ExtractionError
```

An error occurred extracting a resource

The following attributes are available from instances of this exception:

manager
    The resource manager that raised this exception

cache_path
    The base directory for resource extraction

original_error
    The exception instance that caused extraction to fail

---
## ResourceManager
```python
from __init__ import ResourceManager
```

Manage resource extraction and packages

---
## get_default_cache
```python
from __init__ import get_default_cache
```

Return the ``PYTHON_EGG_CACHE`` environment variable
or a platform-relevant user cache dir for an app
named "Python-Eggs".

---
## safe_name
```python
from __init__ import safe_name
```

Convert an arbitrary string to a standard distribution name

Any runs of non-alphanumeric/. characters are replaced with a single '-'.

---
## safe_version
```python
from __init__ import safe_version
```

Convert an arbitrary string to a standard version string

---
## _forgiving_version
```python
from __init__ import _forgiving_version
```

Fallback when ``safe_version`` is not safe enough
>>> parse_version(_forgiving_version('0.23ubuntu1'))
<Version('0.23.dev0+sanitized.ubuntu1')>
>>> parse_version(_forgiving_version('0.23-'))
<Version('0.23.dev0+sanitized')>
>>> parse_version(_forgiving_version('0.-_'))
<Version('0.dev0+sanitized')>
>>> parse_version(_forgiving_version('42.+?1'))
<Version('42.dev0+sanitized.1')>
>>> parse_version(_forgiving_version('hello world'))
<Version('0.dev0+sanitized.hello.world')>

---
## _safe_segment
```python
from __init__ import _safe_segment
```

Convert an arbitrary string into a safe segment

---
## safe_extra
```python
from __init__ import safe_extra
```

Convert an arbitrary string to a standard 'extra' name

Any runs of non-alphanumeric characters are replaced with a single '_',
and the result is always lowercased.

---
## to_filename
```python
from __init__ import to_filename
```

Convert a project or version name to its filename-escaped form

Any '-' characters are currently replaced with '_'.

---
## invalid_marker
```python
from __init__ import invalid_marker
```

Validate text as a PEP 508 environment marker; return an exception
if invalid or False otherwise.

---
## evaluate_marker
```python
from __init__ import evaluate_marker
```

Evaluate a PEP 508 environment marker.
Return a boolean indicating the marker result in this environment.
Raise SyntaxError if marker is invalid.

This implementation uses the 'pyparsing' module.

---
## NullProvider
```python
from __init__ import NullProvider
```

Try to implement resources and metadata for arbitrary PEP 302 loaders

---
## EggProvider
```python
from __init__ import EggProvider
```

Provider based on a virtual filesystem

---
## DefaultProvider
```python
from __init__ import DefaultProvider
```

Provides access to package resources in the filesystem

---
## EmptyProvider
```python
from __init__ import EmptyProvider
```

Provider that returns nothing for all requests

---
## ZipManifests
```python
from __init__ import ZipManifests
```

zip manifest builder

---
## MemoizedZipManifests
```python
from __init__ import MemoizedZipManifests
```

Memoized zipfile manifests.

---
## ZipProvider
```python
from __init__ import ZipProvider
```

Resource support for zips and eggs

---
## FileMetadata
```python
from __init__ import FileMetadata
```

Metadata handler for standalone PKG-INFO files

Usage::

    metadata = FileMetadata("/path/to/PKG-INFO")

This provider rejects all data and metadata requests except for PKG-INFO,
which is treated as existing, and will be the contents of the file at
the provided location.

---
## PathMetadata
```python
from __init__ import PathMetadata
```

Metadata provider for egg directories

Usage::

    # Development eggs:

    egg_info = "/path/to/PackageName.egg-info"
    base_dir = os.path.dirname(egg_info)
    metadata = PathMetadata(base_dir, egg_info)
    dist_name = os.path.splitext(os.path.basename(egg_info))[0]
    dist = Distribution(basedir, project_name=dist_name, metadata=metadata)

    # Unpacked egg directories:

    egg_path = "/path/to/PackageName-ver-pyver-etc.egg"
    metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO'))
    dist = Distribution.from_filename(egg_path, metadata=metadata)

---
## EggMetadata
```python
from __init__ import EggMetadata
```

Metadata provider for .egg files

---
## register_finder
```python
from __init__ import register_finder
```

Register `distribution_finder` to find distributions in sys.path items

`importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
handler), and `distribution_finder` is a callable that, passed a path
item and the importer instance, yields ``Distribution`` instances found on
that path item.  See ``pkg_resources.find_on_path`` for an example.

---
## find_eggs_in_zip
```python
from __init__ import find_eggs_in_zip
```

Find eggs in zip files; possibly multiple nested eggs.

---
## find_nothing
```python
from __init__ import find_nothing
```



---
## find_on_path
```python
from __init__ import find_on_path
```

Yield distributions accessible on a sys.path directory

---
## dist_factory
```python
from __init__ import dist_factory
```

Return a dist_factory for the given entry.

---
## NoDists
```python
from __init__ import NoDists
```

>>> bool(NoDists())
False

>>> list(NoDists()('anything'))
[]

---
## safe_listdir
```python
from __init__ import safe_listdir
```

Attempt to list contents of path, but suppress some exceptions.

---
## distributions_from_metadata
```python
from __init__ import distributions_from_metadata
```



---
## non_empty_lines
```python
from __init__ import non_empty_lines
```

Yield non-empty lines from file at path

---
## resolve_egg_link
```python
from __init__ import resolve_egg_link
```

Given a path to an .egg-link, resolve distributions
present in the referenced path.

---
## register_namespace_handler
```python
from __init__ import register_namespace_handler
```

Register `namespace_handler` to declare namespace packages

`importer_type` is the type or class of a PEP 302 "Importer" (sys.path item
handler), and `namespace_handler` is a callable like this::

    def namespace_handler(importer, path_entry, moduleName, module):
        # return a path_entry to use for child packages

Namespace handlers are only called if the importer object has already
agreed that it can handle the relevant path item, and they should only
return a subpath if the module __path__ does not already contain an
equivalent subpath.  For an example namespace handler, see
``pkg_resources.file_ns_handler``.

---
## _handle_ns
```python
from __init__ import _handle_ns
```

Ensure that named package includes a subpath of path_item (if needed)

---
## _rebuild_mod_path
```python
from __init__ import _rebuild_mod_path
```

Rebuild module.__path__ ensuring that all entries are ordered
corresponding to their sys.path order

---
## declare_namespace
```python
from __init__ import declare_namespace
```

Declare that package 'packageName' is a namespace package

---
## fixup_namespace_packages
```python
from __init__ import fixup_namespace_packages
```

Ensure that previously-declared namespace packages include path_item

---
## file_ns_handler
```python
from __init__ import file_ns_handler
```

Compute an ns-package subpath for a filesystem or zipfile importer

---
## null_ns_handler
```python
from __init__ import null_ns_handler
```



---
## normalize_path
```python
from __init__ import normalize_path
```

Normalize a file/dir name for comparison purposes

---
## _cygwin_patch
```python
from __init__ import _cygwin_patch
```

Contrary to POSIX 2008, on Cygwin, getcwd (3) contains
symlink components. Using
os.path.abspath() works around this limitation. A fix in os.getcwd()
would probably better, in Cygwin even more so, except
that this seems to be by design...

---
## _is_egg_path
```python
from __init__ import _is_egg_path
```

Determine if given path appears to be an egg.

---
## _is_zip_egg
```python
from __init__ import _is_zip_egg
```



---
## _is_unpacked_egg
```python
from __init__ import _is_unpacked_egg
```

Determine if given path appears to be an unpacked egg.

---
## _set_parent_ns
```python
from __init__ import _set_parent_ns
```



---
## _version_from_file
```python
from __init__ import _version_from_file
```

Given an iterable of lines from a Metadata file, return
the value of the Version field, if present, or None otherwise.

---
## EggInfoDistribution
```python
from __init__ import EggInfoDistribution
```



---
## DistInfoDistribution
```python
from __init__ import DistInfoDistribution
```

Wrap an actual or potential sys.path entry
w/metadata, .dist-info style.

---
## issue_warning
```python
from __init__ import issue_warning
```



---
## parse_requirements
```python
from __init__ import parse_requirements
```

Yield ``Requirement`` objects for each specification in `strs`.

`strs` must be a string, or a (possibly-nested) iterable thereof.

---
## RequirementParseError
```python
from __init__ import RequirementParseError
```

Compatibility wrapper for InvalidRequirement

---
## Requirement
```python
from __init__ import Requirement
```



---
## _always_object
```python
from __init__ import _always_object
```

Ensure object appears in the mro even
for old-style classes.

---
## _find_adapter
```python
from __init__ import _find_adapter
```

Return an adapter factory for `ob` from `registry`

---
## ensure_directory
```python
from __init__ import ensure_directory
```

Ensure that the parent directory of `path` exists

---
## _bypass_ensure_directory
```python
from __init__ import _bypass_ensure_directory
```

Sandbox-bypassing version of ensure_directory()

---
## split_sections
```python
from __init__ import split_sections
```

Split a string or iterable thereof into (section, content) pairs

Each ``section`` is a stripped version of the section header ("[section]")
and each ``content`` is a list of stripped lines excluding blank lines and
comment-only lines.  If there are any such lines before the first section
header, they're returned in a first ``section`` of ``None``.

---
## _mkstemp
```python
from __init__ import _mkstemp
```



---
## PkgResourcesDeprecationWarning
```python
from __init__ import PkgResourcesDeprecationWarning
```

Base class for warning about deprecations in ``pkg_resources``

This class is not derived from ``DeprecationWarning``, and as such is
visible by default.

---
## _read_utf8_with_fallback
```python
from __init__ import _read_utf8_with_fallback
```

See setuptools.unicode_utils._read_utf8_with_fallback

---
## _call_aside
```python
from __init__ import _call_aside
```



---
## _initialize
```python
from __init__ import _initialize
```

Set up global resource manager (deliberately not state-saved)

---
## _initialize_master_working_set
```python
from __init__ import _initialize_master_working_set
```

Prepare the master working set and make the ``require()``
API available.

This function has explicit effects on the global state
of pkg_resources. It is intended to be invoked once at
the initialization of this module.

Invocation by other packages is unsupported and done
at their own risk.

---
## load_module
```python
from __init__ import load_module
```

Imports a module given its name and returns a handle to it.

---
## dist
```python
from __init__ import dist
```



---
## req
```python
from __init__ import req
```



---
## report
```python
from __init__ import report
```



---
## with_context
```python
from __init__ import with_context
```

If required_by is non-empty, return a version of self that is a
ContextualVersionConflict.

---
## required_by
```python
from __init__ import required_by
```



---
## requirers
```python
from __init__ import requirers
```



---
## requirers_str
```python
from __init__ import requirers_str
```



---
## has_metadata
```python
from __init__ import has_metadata
```



---
## get_metadata
```python
from __init__ import get_metadata
```



---
## get_metadata_lines
```python
from __init__ import get_metadata_lines
```



---
## metadata_isdir
```python
from __init__ import metadata_isdir
```



---
## metadata_listdir
```python
from __init__ import metadata_listdir
```



---
## run_script
```python
from __init__ import run_script
```



---
## get_resource_filename
```python
from __init__ import get_resource_filename
```



---
## get_resource_stream
```python
from __init__ import get_resource_stream
```



---
## get_resource_string
```python
from __init__ import get_resource_string
```



---
## has_resource
```python
from __init__ import has_resource
```



---
## resource_isdir
```python
from __init__ import resource_isdir
```



---
## resource_listdir
```python
from __init__ import resource_listdir
```



---
## _build_master
```python
from __init__ import _build_master
```

Prepare the master working set.

---
## _build_from_requirements
```python
from __init__ import _build_from_requirements
```

Build a working set from a requirement spec. Rewrites sys.path.

---
## add_entry
```python
from __init__ import add_entry
```

Add a path item to ``.entries``, finding any distributions on it

``find_distributions(entry, True)`` is used to find distributions
corresponding to the path entry, and they are added.  `entry` is
always appended to ``.entries``, even if it is already present.
(This is because ``sys.path`` can contain the same value more than
once, and the ``.entries`` of the ``sys.path`` WorkingSet should always
equal ``sys.path``.)

---
## find
```python
from __init__ import find
```

Find a distribution matching requirement `req`

If there is an active distribution for the requested project, this
returns it as long as it meets the version requirement specified by
`req`.  But, if there is an active distribution for the project and it
does *not* meet the `req` requirement, ``VersionConflict`` is raised.
If there is no active distribution for the requested project, ``None``
is returned.

---
## iter_entry_points
```python
from __init__ import iter_entry_points
```

Yield entry point objects from `group` matching `name`

If `name` is None, yields all entry points in `group` from all
distributions in the working set, otherwise only ones matching
both `group` and `name` are yielded (in distribution order).

---
## resolve
```python
from __init__ import resolve
```

Resolve the entry point from its module and attrs.

---
## _resolve_dist
```python
from __init__ import _resolve_dist
```



---
## find_plugins
```python
from __init__ import find_plugins
```

Find all activatable distributions in `plugin_env`

Example usage::

    distributions, errors = working_set.find_plugins(
        Environment(plugin_dirlist)
    )
    # add plugins+libs to sys.path
    map(working_set.add, distributions)
    # display errors
    print('Could not load', errors)

The `plugin_env` should be an ``Environment`` instance that contains
only distributions that are in the project's "plugin directory" or
directories. The `full_env`, if supplied, should be an ``Environment``
contains all currently-available distributions.  If `full_env` is not
supplied, one is created automatically from the ``WorkingSet`` this
method is called on, which will typically mean that every directory on
``sys.path`` will be scanned for distributions.

`installer` is a standard installer callback as used by the
``resolve()`` method. The `fallback` flag indicates whether we should
attempt to resolve older versions of a plugin if the newest version
cannot be resolved.

This method returns a 2-tuple: (`distributions`, `error_info`), where
`distributions` is a list of the distributions found in `plugin_env`
that were loadable, along with any other distributions that are needed
to resolve their dependencies.  `error_info` is a dictionary mapping
unloadable plugin distributions to an exception instance describing the
error that occurred. Usually this will be a ``DistributionNotFound`` or
``VersionConflict`` instance.

---
## require
```python
from __init__ import require
```



---
## subscribe
```python
from __init__ import subscribe
```

Invoke `callback` for all distributions

If `existing=True` (default),
call on all existing ones, as well.

---
## _added_new
```python
from __init__ import _added_new
```



---
## markers_pass
```python
from __init__ import markers_pass
```

Evaluate markers for req against each extra that
demanded it.

Return False if the req has a marker and fails
evaluation. Otherwise, return True.

---
## can_add
```python
from __init__ import can_add
```

Is distribution `dist` acceptable for this environment?

The distribution must match the platform and python version
requirements specified when this environment was created, or False
is returned.

---
## remove
```python
from __init__ import remove
```

Remove `dist` from the environment

---
## best_match
```python
from __init__ import best_match
```

Find distribution best matching `req` and usable on `working_set`

This calls the ``find(req)`` method of the `working_set` to see if a
suitable distribution is already active.  (This may raise
``VersionConflict`` if an unsuitable version of the project is already
active in the specified `working_set`.)  If a suitable distribution
isn't active, this method returns the newest distribution in the
environment that meets the ``Requirement`` in `req`.  If no suitable
distribution is found, and `installer` is supplied, then the result of
calling the environment's ``obtain(req, installer)`` method will be
returned.

---
## obtain
```python
from __init__ import obtain
```

Obtain a distribution matching `requirement` (e.g. via download)

Obtain a distro that matches requirement (e.g. via download).  In the
base ``Environment`` class, this routine just returns
``installer(requirement)``, unless `installer` is None, in which case
None is returned instead.  This method is a hook that allows subclasses
to attempt other ways of obtaining a distribution before falling back
to the `installer` argument.

---
## resource_filename
```python
from __init__ import resource_filename
```

Return a true filesystem path for specified resource

---
## resource_stream
```python
from __init__ import resource_stream
```

Return a readable file-like object for specified resource

---
## resource_string
```python
from __init__ import resource_string
```

Return specified resource as :obj:`bytes`

---
## extraction_error
```python
from __init__ import extraction_error
```

Give an error message for problems extracting file(s)

---
## get_cache_path
```python
from __init__ import get_cache_path
```

Return absolute location in cache for `archive_name` and `names`

The parent directory of the resulting path will be created if it does
not already exist.  `archive_name` should be the base filename of the
enclosing egg (which may not be the name of the enclosing zipfile!),
including its ".egg" extension.  `names`, if provided, should be a
sequence of path name parts "under" the egg's extraction location.

This method should only be called by resource providers that need to
obtain an extraction location, and only for names they intend to
extract, as it tracks the generated names for possible cleanup later.

---
## _warn_unsafe_extraction_path
```python
from __init__ import _warn_unsafe_extraction_path
```

If the default extraction path is overridden and set to an insecure
location, such as /tmp, it opens up an opportunity for an attacker to
replace an extracted file with an unauthorized payload. Warn the user
if a known insecure location is used.

See Distribute #375 for more details.

---
## postprocess
```python
from __init__ import postprocess
```

Perform any platform-specific postprocessing of `tempname`

This is where Mac header rewrites should be done; other platforms don't
have anything special they should do.

Resource providers should call this method ONLY after successfully
extracting a compressed resource.  They must NOT call it on resources
that are already in the filesystem.

`tempname` is the current (temporary) name of the file, and `filename`
is the name it will be renamed to by the caller after this routine
returns.

---
## set_extraction_path
```python
from __init__ import set_extraction_path
```

Set the base path where resources will be extracted to, if needed.

If you do not call this routine before any extractions take place, the
path defaults to the return value of ``get_default_cache()``.  (Which
is based on the ``PYTHON_EGG_CACHE`` environment variable, with various
platform-specific fallbacks.  See that routine's documentation for more
details.)

Resources are extracted to subdirectories of this path based upon
information given by the ``IResourceProvider``.  You may set this to a
temporary directory, but then you must call ``cleanup_resources()`` to
delete the extracted files when done.  There is no guarantee that
``cleanup_resources()`` will be able to remove all extracted files.

(Note: you may not change the extraction path for a given resource
manager once resources have been extracted, unless you first call
``cleanup_resources()``.)

---
## cleanup_resources
```python
from __init__ import cleanup_resources
```

Delete all extracted resource files and directories, returning a list
of the file and directory names that could not be successfully removed.
This function does not have any concurrency protection, so it should
generally only be called when the extraction path is a temporary
directory exclusive to a single process.  This method is not
automatically called; you must call it explicitly or register it as an
``atexit`` function if you wish to ensure cleanup of a temporary
directory used for extractions.

---
## _get_metadata_path
```python
from __init__ import _get_metadata_path
```



---
## _has
```python
from __init__ import _has
```



---
## _isdir
```python
from __init__ import _isdir
```



---
## _listdir
```python
from __init__ import _listdir
```



---
## _fn
```python
from __init__ import _fn
```



---
## _validate_resource_path
```python
from __init__ import _validate_resource_path
```

Validate the resource paths according to the docs.
https://setuptools.pypa.io/en/latest/pkg_resources.html#basic-resource-access

>>> warned = getfixture('recwarn')
>>> warnings.simplefilter('always')
>>> vrp = NullProvider._validate_resource_path
>>> vrp('foo/bar.txt')
>>> bool(warned)
False
>>> vrp('../foo/bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('/foo/bar.txt')
>>> bool(warned)
True
>>> vrp('foo/../../bar.txt')
>>> bool(warned)
True
>>> warned.clear()
>>> vrp('foo/f../bar.txt')
>>> bool(warned)
False

Windows path separators are straight-up disallowed.
>>> vrp(r'\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path is not allowed.

>>> vrp(r'C:\foo/bar.txt')
Traceback (most recent call last):
...
ValueError: Use of .. or absolute path in a resource path is not allowed.

Blank values are allowed

>>> vrp('')
>>> bool(warned)
False

Non-string values are not.

>>> vrp(None)
Traceback (most recent call last):
...
AttributeError: ...

---
## _setup_prefix
```python
from __init__ import _setup_prefix
```



---
## _set_egg
```python
from __init__ import _set_egg
```



---
## _register
```python
from __init__ import _register
```



---
## manifest_mod
```python
from __init__ import manifest_mod
```



---
## _zipinfo_name
```python
from __init__ import _zipinfo_name
```



---
## _parts
```python
from __init__ import _parts
```



---
## zipinfo
```python
from __init__ import zipinfo
```



---
## _get_date_and_size
```python
from __init__ import _get_date_and_size
```



---
## _extract_resource
```python
from __init__ import _extract_resource
```



---
## _is_current
```python
from __init__ import _is_current
```

Return True if the file_path is current for this zip_path

---
## _get_eager_resources
```python
from __init__ import _get_eager_resources
```



---
## _index
```python
from __init__ import _index
```



---
## _eager_to_zip
```python
from __init__ import _eager_to_zip
```



---
## _resource_to_zip
```python
from __init__ import _resource_to_zip
```



---
## _warn_on_replacement
```python
from __init__ import _warn_on_replacement
```



---
## safe_sys_path_index
```python
from __init__ import safe_sys_path_index
```

Workaround for #520 and #513.

---
## position_in_sys_path
```python
from __init__ import position_in_sys_path
```

Return the ordinal of the path based on its position in sys.path

---
## _normalize_cached
```python
from __init__ import _normalize_cached
```



---
## _parse_extras
```python
from __init__ import _parse_extras
```



---
## parse_group
```python
from __init__ import parse_group
```

Parse an entry point group

---
## parse_map
```python
from __init__ import parse_map
```

Parse a map of entry point groups

---
## is_version_line
```python
from __init__ import is_version_line
```



---
## from_location
```python
from __init__ import from_location
```



---
## _reload_version
```python
from __init__ import _reload_version
```

Packages installed by distutils (e.g. numpy or scipy),
which uses an old safe_version, and so
their version numbers can get mangled when
converted to filenames (e.g., 1.11.0.dev0+2329eae to
1.11.0.dev0_2329eae). These distributions will not be
parsed properly
downstream by Distribution and safe_version, so
take an extra step and try to get the version number from
the metadata file itself instead of the filename.

---
## hashcmp
```python
from __init__ import hashcmp
```



---
## __ne__
```python
from __init__ import __ne__
```



---
## key
```python
from __init__ import key
```



---
## parsed_version
```python
from __init__ import parsed_version
```



---
## _forgiving_parsed_version
```python
from __init__ import _forgiving_parsed_version
```



---
## _dep_map
```python
from __init__ import _dep_map
```



---
## _filter_extras
```python
from __init__ import _filter_extras
```

Given a mapping of extras to dependencies, strip off
environment markers and filter out any dependencies
not matching the markers.

---
## _build_dep_map
```python
from __init__ import _build_dep_map
```



---
## _get_metadata_path_for_display
```python
from __init__ import _get_metadata_path_for_display
```

Return the path to the given metadata file, if available.

---
## _get_metadata
```python
from __init__ import _get_metadata
```



---
## activate
```python
from __init__ import activate
```

Ensure distribution is importable on `path` (default=sys.path)

---
## egg_name
```python
from __init__ import egg_name
```

Return what this distribution's standard .egg filename should be

---
## from_filename
```python
from __init__ import from_filename
```



---
## as_requirement
```python
from __init__ import as_requirement
```

Return a ``Requirement`` that matches this distribution exactly

---
## insert_on
```python
from __init__ import insert_on
```

Ensure self.location is on path

If replace=False (default):
    - If location is already in path anywhere, do nothing.
    - Else:
      - If it's an egg and its parent directory is on path,
        insert just ahead of the parent.
      - Else: add to the end of path.
If replace=True:
    - If location is already on path anywhere (not eggs)
      or higher priority than its parent (eggs)
      do nothing.
    - Else:
      - If it's an egg and its parent directory is on path,
        insert just ahead of the parent,
        removing any lower-priority entries.
      - Else: add it to the front of path.

---
## check_version_conflict
```python
from __init__ import check_version_conflict
```



---
## has_version
```python
from __init__ import has_version
```



---
## clone
```python
from __init__ import clone
```

Copy this distribution, substituting in any changed keyword args

---
## _parsed_pkg_info
```python
from __init__ import _parsed_pkg_info
```

Parse and cache metadata

---
## _compute_dependencies
```python
from __init__ import _compute_dependencies
```

Recompute this distribution's dependencies.

---
## reqs_for_extra
```python
from __init__ import reqs_for_extra
```



---
## __name__
```python
from resolvers import __name__
```



---
## ResolverException
```python
from resolvers import ResolverException
```

A base class for all exceptions raised by this module.

Exceptions derived by this class should all be handled in this module. Any
bubbling pass the resolver should be treated as a bug.

---
## RequirementsConflicted
```python
from resolvers import RequirementsConflicted
```



---
## InconsistentCandidate
```python
from resolvers import InconsistentCandidate
```



---
## Criterion
```python
from resolvers import Criterion
```

Representation of possible resolution results of a package.

This holds three attributes:

* `information` is a collection of `RequirementInformation` pairs.
  Each pair is a requirement contributing to this criterion, and the
  candidate that provides the requirement.
* `incompatibilities` is a collection of all known not-to-work candidates
  to exclude from consideration.
* `candidates` is a collection containing all possible candidates deducted
  from the union of contributing requirements and known incompatibilities.
  It should never be empty, except when the criterion is an attribute of a
  raised `RequirementsConflicted` (in which case it is always empty).

.. note::
    This class is intended to be externally immutable. **Do not** mutate
    any of its attribute containers.

---
## ResolutionError
```python
from resolvers import ResolutionError
```



---
## ResolutionImpossible
```python
from resolvers import ResolutionImpossible
```



---
## ResolutionTooDeep
```python
from resolvers import ResolutionTooDeep
```



---
## Resolution
```python
from resolvers import Resolution
```

Stateful resolution object.

This is designed as a one-off object that holds information to kick start
the resolution process, and holds the results afterwards.

---
## _has_route_to_root
```python
from resolvers import _has_route_to_root
```



---
## _build_result
```python
from resolvers import _build_result
```



---
## Resolver
```python
from resolvers import Resolver
```

The thing that performs the actual resolution work.

---
## __init__
```python
from resolvers import __init__
```



---
## __str__
```python
from resolvers import __str__
```



---
## __repr__
```python
from resolvers import __repr__
```



---
## iter_requirement
```python
from resolvers import iter_requirement
```



---
## iter_parent
```python
from resolvers import iter_parent
```



---
## state
```python
from resolvers import state
```



---
## _push_new_state
```python
from resolvers import _push_new_state
```

Push a new state into history.

This new state will be used to hold resolution results of the next
coming round.

---
## _add_to_criteria
```python
from resolvers import _add_to_criteria
```



---
## _remove_information_from_criteria
```python
from resolvers import _remove_information_from_criteria
```

Remove information from parents of criteria.

Concretely, removes all values from each criterion's ``information``
field that have one of ``parents`` as provider of the requirement.

:param criteria: The criteria to update.
:param parents: Identifiers for which to remove information from all criteria.

---
## _get_preference
```python
from resolvers import _get_preference
```



---
## _is_current_pin_satisfying
```python
from resolvers import _is_current_pin_satisfying
```



---
## _get_updated_criteria
```python
from resolvers import _get_updated_criteria
```



---
## _attempt_to_pin_criterion
```python
from resolvers import _attempt_to_pin_criterion
```



---
## _backjump
```python
from resolvers import _backjump
```

Perform backjumping.

When we enter here, the stack is like this::

    [ state Z ]
    [ state Y ]
    [ state X ]
    .... earlier states are irrelevant.

1. No pins worked for Z, so it does not have a pin.
2. We want to reset state Y to unpinned, and pin another candidate.
3. State X holds what state Y was before the pin, but does not
   have the incompatibility information gathered in state Y.

Each iteration of the loop will:

1.  Identify Z. The incompatibility is not always caused by the latest
    state. For example, given three requirements A, B and C, with
    dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
    last state might be related to C, so we want to discard the
    previous state.
2.  Discard Z.
3.  Discard Y but remember its incompatibility information gathered
    previously, and the failure we're dealing with right now.
4.  Push a new state Y' based on X, and apply the incompatibility
    information from Y to Y'.
5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
    the new Z and go back to step 2.
5b. If the incompatibilities apply cleanly, end backtracking.

---
## resolve
```python
from resolvers import resolve
```

Take a collection of constraints, spit out the resolution result.

The return value is a representation to the final resolution result. It
is a tuple subclass with three public members:

* `mapping`: A dict of resolved candidates. Each key is an identifier
    of a requirement (as returned by the provider's `identify` method),
    and the value is the resolved candidate.
* `graph`: A `DirectedGraph` instance representing the dependency tree.
    The vertices are keys of `mapping`, and each edge represents *why*
    a particular package is included. A special vertex `None` is
    included to represent parents of user-supplied requirements.
* `criteria`: A dict of "criteria" that hold detailed information on
    how edges in the graph are derived. Each key is an identifier of a
    requirement, and the value is a `Criterion` instance.

The following exceptions may be raised if a resolution cannot be found:

* `ResolutionImpossible`: A resolution cannot be found for the given
    combination of requirements. The `causes` attribute of the
    exception is a list of (requirement, parent), giving the
    requirements that could not be satisfied.
* `ResolutionTooDeep`: The dependency tree is too deeply nested and
    the resolver gave up. This is usually caused by a circular
    dependency, but you can try to resolve this by increasing the
    `max_rounds` argument.

---
## _patch_criteria
```python
from resolvers import _patch_criteria
```



---
## __name__
```python
from providers import __name__
```



---
## AbstractProvider
```python
from providers import AbstractProvider
```

Delegate class to provide the required interface for the resolver.

---
## AbstractResolver
```python
from providers import AbstractResolver
```

The thing that performs the actual resolution work.

---
## identify
```python
from providers import identify
```

Given a requirement, return an identifier for it.

This is used to identify a requirement, e.g. whether two requirements
should have their specifier parts merged.

---
## get_preference
```python
from providers import get_preference
```

Produce a sort key for given requirement based on preference.

The preference is defined as "I think this requirement should be
resolved first". The lower the return value is, the more preferred
this group of arguments is.

:param identifier: An identifier as returned by ``identify()``. This
    identifies the dependency matches which should be returned.
:param resolutions: Mapping of candidates currently pinned by the
    resolver. Each key is an identifier, and the value is a candidate.
    The candidate may conflict with requirements from ``information``.
:param candidates: Mapping of each dependency's possible candidates.
    Each value is an iterator of candidates.
:param information: Mapping of requirement information of each package.
    Each value is an iterator of *requirement information*.
:param backtrack_causes: Sequence of requirement information that were
    the requirements that caused the resolver to most recently backtrack.

A *requirement information* instance is a named tuple with two members:

* ``requirement`` specifies a requirement contributing to the current
  list of candidates.
* ``parent`` specifies the candidate that provides (depended on) the
  requirement, or ``None`` to indicate a root requirement.

The preference could depend on various issues, including (not
necessarily in this order):

* Is this package pinned in the current resolution result?
* How relaxed is the requirement? Stricter ones should probably be
  worked on first? (I don't know, actually.)
* How many possibilities are there to satisfy this requirement? Those
  with few left should likely be worked on first, I guess?
* Are there any known conflicts for this requirement? We should
  probably work on those with the most known conflicts.

A sortable value should be returned (this will be used as the ``key``
parameter of the built-in sorting function). The smaller the value is,
the more preferred this requirement is (i.e. the sorting function
is called with ``reverse=False``).

---
## find_matches
```python
from providers import find_matches
```

Find all possible candidates that satisfy the given constraints.

:param identifier: An identifier as returned by ``identify()``. This
    identifies the dependency matches of which should be returned.
:param requirements: A mapping of requirements that all returned
    candidates must satisfy. Each key is an identifier, and the value
    an iterator of requirements for that dependency.
:param incompatibilities: A mapping of known incompatibilities of
    each dependency. Each key is an identifier, and the value an
    iterator of incompatibilities known to the resolver. All
    incompatibilities *must* be excluded from the return value.

This should try to get candidates based on the requirements' types.
For VCS, local, and archive requirements, the one-and-only match is
returned, and for a "named" requirement, the index(es) should be
consulted to find concrete candidates for this requirement.

The return value should produce candidates ordered by preference; the
most preferred candidate should come first. The return type may be one
of the following:

* A callable that returns an iterator that yields candidates.
* An collection of candidates.
* An iterable of candidates. This will be consumed immediately into a
  list of candidates.

---
## is_satisfied_by
```python
from providers import is_satisfied_by
```

Whether the given requirement can be satisfied by a candidate.

The candidate is guaranteed to have been generated from the
requirement.

A boolean should be returned to indicate whether ``candidate`` is a
viable solution to the requirement.

---
## get_dependencies
```python
from providers import get_dependencies
```

Get dependencies of a candidate.

This should return a collection of requirements that `candidate`
specifies as its dependencies.

---
## __init__
```python
from providers import __init__
```



---
## resolve
```python
from providers import resolve
```

Take a collection of constraints, spit out the resolution result.

This returns a representation of the final resolution state, with one
guarenteed attribute ``mapping`` that contains resolved candidates as
values. The keys are their respective identifiers.

:param requirements: A collection of constraints.
:param kwargs: Additional keyword arguments that subclasses may accept.

:raises: ``self.base_exception`` or its subclass.

---
## __name__
```python
from structs import __name__
```



---
## DirectedGraph
```python
from structs import DirectedGraph
```

A graph structure with directed edges.

---
## IteratorMapping
```python
from structs import IteratorMapping
```



---
## _FactoryIterableView
```python
from structs import _FactoryIterableView
```

Wrap an iterator factory returned by `find_matches()`.

Calling `iter()` on this class would invoke the underlying iterator
factory, making it a "collection with ordering" that can be iterated
through multiple times, but lacks random access methods presented in
built-in Python sequence types.

---
## _SequenceIterableView
```python
from structs import _SequenceIterableView
```

Wrap an iterable returned by find_matches().

This is essentially just a proxy to the underlying sequence that provides
the same interface as `_FactoryIterableView`.

---
## build_iter_view
```python
from structs import build_iter_view
```

Build an iterable view from the value returned by `find_matches()`.

---
## __init__
```python
from structs import __init__
```



---
## __iter__
```python
from structs import __iter__
```



---
## __len__
```python
from structs import __len__
```



---
## __contains__
```python
from structs import __contains__
```



---
## copy
```python
from structs import copy
```

Return a shallow copy of this graph.

---
## add
```python
from structs import add
```

Add a new vertex to the graph.

---
## remove
```python
from structs import remove
```

Remove a vertex from the graph, disconnecting all edges from/to it.

---
## connected
```python
from structs import connected
```



---
## connect
```python
from structs import connect
```

Connect two existing vertices.

Nothing happens if the vertices are already connected.

---
## iter_edges
```python
from structs import iter_edges
```



---
## iter_children
```python
from structs import iter_children
```



---
## iter_parents
```python
from structs import iter_parents
```



---
## __repr__
```python
from structs import __repr__
```



---
## __bool__
```python
from structs import __bool__
```



---
## __getitem__
```python
from structs import __getitem__
```



---
## __name__
```python
from reporters import __name__
```



---
## BaseReporter
```python
from reporters import BaseReporter
```

Delegate class to provider progress reporting for the resolver.

---
## starting
```python
from reporters import starting
```

Called before the resolution actually starts.

---
## starting_round
```python
from reporters import starting_round
```

Called before each round of resolution starts.

The index is zero-based.

---
## ending_round
```python
from reporters import ending_round
```

Called before each round of resolution ends.

This is NOT called if the resolution ends at this round. Use `ending`
if you want to report finalization. The index is zero-based.

---
## ending
```python
from reporters import ending
```

Called before the resolution ends successfully.

---
## adding_requirement
```python
from reporters import adding_requirement
```

Called when adding a new requirement into the resolve criteria.

:param requirement: The additional requirement to be applied to filter
    the available candidaites.
:param parent: The candidate that requires ``requirement`` as a
    dependency, or None if ``requirement`` is one of the root
    requirements passed in from ``Resolver.resolve()``.

---
## resolving_conflicts
```python
from reporters import resolving_conflicts
```

Called when starting to attempt requirement conflict resolution.

:param causes: The information on the collision that caused the backtracking.

---
## rejecting_candidate
```python
from reporters import rejecting_candidate
```

Called when rejecting a candidate during backtracking.

---
## pinning
```python
from reporters import pinning
```

Called when adding a candidate to the potential solution.

---
## _first_item_as_path_if_multipath
```python
from unix import _first_item_as_path_if_multipath
```



---
## __name__
```python
from file_cache import __name__
```



---
## _secure_open_write
```python
from file_cache import _secure_open_write
```



---
## _FileCacheMixin
```python
from file_cache import _FileCacheMixin
```

Shared implementation for both FileCache variants.

---
## FileCache
```python
from file_cache import FileCache
```

Traditional FileCache: body is stored in memory, so not suitable for large
downloads.

---
## SeparateBodyFileCache
```python
from file_cache import SeparateBodyFileCache
```

Memory-efficient FileCache: body is stored in a separate file, reducing
peak memory usage.

---
## url_to_file_path
```python
from file_cache import url_to_file_path
```

Return the file cache path based on the URL.

This does not ensure the file exists!

---
## __init__
```python
from file_cache import __init__
```



---
## encode
```python
from file_cache import encode
```



---
## _fn
```python
from file_cache import _fn
```



---
## get
```python
from file_cache import get
```



---
## set
```python
from file_cache import set
```



---
## _write
```python
from file_cache import _write
```

Safely write the data to the given path.

---
## _delete
```python
from file_cache import _delete
```



---
## delete
```python
from file_cache import delete
```



---
## get_body
```python
from file_cache import get_body
```



---
## set_body
```python
from file_cache import set_body
```



---
## __name__
```python
from redis_cache import __name__
```



---
## RedisCache
```python
from redis_cache import RedisCache
```



---
## __init__
```python
from redis_cache import __init__
```



---
## get
```python
from redis_cache import get
```



---
## set
```python
from redis_cache import set
```



---
## delete
```python
from redis_cache import delete
```



---
## clear
```python
from redis_cache import clear
```

Helper for clearing all the keys in a database. Use with
caution!

---
## close
```python
from redis_cache import close
```

Redis uses connection pooling, no need to close the connection.

---
## __name__
```python
from _in_process import __name__
```

This is invoked in a subprocess to call the build backend hooks.

It expects:
- Command line args: hook_name, control_dir
- Environment variables:
      PEP517_BUILD_BACKEND=entry.point:spec
      PEP517_BACKEND_PATH=paths (separated with os.pathsep)
- control_dir/input.json:
  - {"kwargs": {...}}

Results:
- control_dir/output.json
  - {"return_val": ...}

---
## write_json
```python
from _in_process import write_json
```



---
## read_json
```python
from _in_process import read_json
```



---
## BackendUnavailable
```python
from _in_process import BackendUnavailable
```

Raised if we cannot import the backend

---
## BackendInvalid
```python
from _in_process import BackendInvalid
```

Raised if the backend is invalid

---
## HookMissing
```python
from _in_process import HookMissing
```

Raised if a hook is missing and we are not executing the fallback

---
## contained_in
```python
from _in_process import contained_in
```

Test if a file is located within the given directory.

---
## _build_backend
```python
from _in_process import _build_backend
```

Find and load the build backend

---
## _supported_features
```python
from _in_process import _supported_features
```

Return the list of options features supported by the backend.

Returns a list of strings.
The only possible value is 'build_editable'.

---
## get_requires_for_build_wheel
```python
from _in_process import get_requires_for_build_wheel
```

Invoke the optional get_requires_for_build_wheel hook

Returns [] if the hook is not defined.

---
## get_requires_for_build_editable
```python
from _in_process import get_requires_for_build_editable
```

Invoke the optional get_requires_for_build_editable hook

Returns [] if the hook is not defined.

---
## prepare_metadata_for_build_wheel
```python
from _in_process import prepare_metadata_for_build_wheel
```

Invoke optional prepare_metadata_for_build_wheel

Implements a fallback by building a wheel if the hook isn't defined,
unless _allow_fallback is False in which case HookMissing is raised.

---
## prepare_metadata_for_build_editable
```python
from _in_process import prepare_metadata_for_build_editable
```

Invoke optional prepare_metadata_for_build_editable

Implements a fallback by building an editable wheel if the hook isn't
defined, unless _allow_fallback is False in which case HookMissing is
raised.

---
## _dist_info_files
```python
from _in_process import _dist_info_files
```

Identify the .dist-info folder inside a wheel ZipFile.

---
## _get_wheel_metadata_from_wheel
```python
from _in_process import _get_wheel_metadata_from_wheel
```

Extract the metadata from a wheel.

Fallback for when the build backend does not
define the 'get_wheel_metadata' hook.

---
## _find_already_built_wheel
```python
from _in_process import _find_already_built_wheel
```

Check for a wheel already built during the get_wheel_metadata hook.
    

---
## build_wheel
```python
from _in_process import build_wheel
```

Invoke the mandatory build_wheel hook.

If a wheel was already built in the
prepare_metadata_for_build_wheel fallback, this
will copy it rather than rebuilding the wheel.

---
## build_editable
```python
from _in_process import build_editable
```

Invoke the optional build_editable hook.

If a wheel was already built in the
prepare_metadata_for_build_editable fallback, this
will copy it rather than rebuilding the wheel.

---
## get_requires_for_build_sdist
```python
from _in_process import get_requires_for_build_sdist
```

Invoke the optional get_requires_for_build_wheel hook

Returns [] if the hook is not defined.

---
## _DummyException
```python
from _in_process import _DummyException
```

Nothing should ever raise this exception

---
## GotUnsupportedOperation
```python
from _in_process import GotUnsupportedOperation
```

For internal use when backend raises UnsupportedOperation

---
## build_sdist
```python
from _in_process import build_sdist
```

Invoke the mandatory build_sdist hook.

---
## main
```python
from _in_process import main
```



---
## __init__
```python
from _in_process import __init__
```



---
## _in_proc_script_path
```python
from __init__ import _in_proc_script_path
```



---
## __name__
```python
from queue import __name__
```



---
## LifoQueue
```python
from queue import LifoQueue
```



---
## _init
```python
from queue import _init
```



---
## _qsize
```python
from queue import _qsize
```



---
## _put
```python
from queue import _put
```



---
## _get
```python
from queue import _get
```



---
## __name__
```python
from ssltransport import __name__
```



---
## SSLTransport
```python
from ssltransport import SSLTransport
```

The SSLTransport wraps an existing socket and establishes an SSL connection.

Contrary to Python's implementation of SSLSocket, it allows you to chain
multiple TLS connections together. It's particularly useful if you need to
implement TLS within TLS.

The class supports most of the socket API operations.

---
## _validate_ssl_context_for_tls_in_tls
```python
from ssltransport import _validate_ssl_context_for_tls_in_tls
```

Raises a ProxySchemeUnsupported if the provided ssl_context can't be used
for TLS in TLS.

The only requirement is that the ssl_context provides the 'wrap_bio'
methods.

---
## __init__
```python
from ssltransport import __init__
```

Create an SSLTransport around socket using the provided ssl_context.

---
## __enter__
```python
from ssltransport import __enter__
```



---
## __exit__
```python
from ssltransport import __exit__
```



---
## fileno
```python
from ssltransport import fileno
```



---
## read
```python
from ssltransport import read
```



---
## recv
```python
from ssltransport import recv
```



---
## recv_into
```python
from ssltransport import recv_into
```



---
## sendall
```python
from ssltransport import sendall
```



---
## send
```python
from ssltransport import send
```



---
## makefile
```python
from ssltransport import makefile
```

Python's httpclient uses makefile and buffered io when reading HTTP
messages and we need to support it.

This is unfortunately a copy and paste of socket.py makefile with small
changes to point to the socket directly.

---
## unwrap
```python
from ssltransport import unwrap
```



---
## close
```python
from ssltransport import close
```



---
## getpeercert
```python
from ssltransport import getpeercert
```



---
## version
```python
from ssltransport import version
```



---
## cipher
```python
from ssltransport import cipher
```



---
## selected_alpn_protocol
```python
from ssltransport import selected_alpn_protocol
```



---
## selected_npn_protocol
```python
from ssltransport import selected_npn_protocol
```



---
## shared_ciphers
```python
from ssltransport import shared_ciphers
```



---
## compression
```python
from ssltransport import compression
```



---
## settimeout
```python
from ssltransport import settimeout
```



---
## gettimeout
```python
from ssltransport import gettimeout
```



---
## _decref_socketios
```python
from ssltransport import _decref_socketios
```



---
## _wrap_ssl_read
```python
from ssltransport import _wrap_ssl_read
```



---
## _ssl_io_loop
```python
from ssltransport import _ssl_io_loop
```

Performs an I/O loop between incoming/outgoing and the socket.

---
## __name__
```python
from proxy import __name__
```



---
## connection_requires_http_tunnel
```python
from proxy import connection_requires_http_tunnel
```

Returns True if the connection requires an HTTP CONNECT through the proxy.

:param URL proxy_url:
    URL of the proxy.
:param ProxyConfig proxy_config:
    Proxy configuration from poolmanager.py
:param str destination_scheme:
    The scheme of the destination. (i.e https, http, etc)

---
## create_proxy_ssl_context
```python
from proxy import create_proxy_ssl_context
```

Generates a default proxy ssl context if one hasn't been provided by the
user.

---
## __name__
```python
from wait import __name__
```



---
## NoWayToWaitForSocketError
```python
from wait import NoWayToWaitForSocketError
```



---
## select_wait_for_socket
```python
from wait import select_wait_for_socket
```



---
## poll_wait_for_socket
```python
from wait import poll_wait_for_socket
```



---
## null_wait_for_socket
```python
from wait import null_wait_for_socket
```



---
## _have_working_poll
```python
from wait import _have_working_poll
```



---
## wait_for_socket
```python
from wait import wait_for_socket
```



---
## wait_for_read
```python
from wait import wait_for_read
```

Waits for reading to be available on a given socket.
Returns True if the socket is readable, or False if the timeout expired.

---
## wait_for_write
```python
from wait import wait_for_write
```

Waits for writing to be available on a given socket.
Returns True if the socket is readable, or False if the timeout expired.

---
## _retry_on_intr
```python
from wait import _retry_on_intr
```



---
## do_poll
```python
from wait import do_poll
```



---
## make_headers
```python
from request import make_headers
```

Shortcuts for generating request headers.

:param keep_alive:
    If ``True``, adds 'connection: keep-alive' header.

:param accept_encoding:
    Can be a boolean, list, or string.
    ``True`` translates to 'gzip,deflate'.  If either the ``brotli`` or
    ``brotlicffi`` package is installed 'gzip,deflate,br' is used instead.
    List will get joined by comma.
    String will be used as provided.

:param user_agent:
    String representing the user-agent you want, such as
    "python-urllib3/0.6"

:param basic_auth:
    Colon-separated username:password string for 'authorization: basic ...'
    auth header.

:param proxy_basic_auth:
    Colon-separated username:password string for 'proxy-authorization: basic ...'
    auth header.

:param disable_cache:
    If ``True``, adds 'cache-control: no-cache' header.

Example:

.. code-block:: python

    import urllib3

    print(urllib3.util.make_headers(keep_alive=True, user_agent="Batman/1.0"))
    # {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
    print(urllib3.util.make_headers(accept_encoding=True))
    # {'accept-encoding': 'gzip,deflate'}

---
## set_file_position
```python
from request import set_file_position
```

If a position is provided, move file to that point.
Otherwise, we'll attempt to record a position for future use.

---
## rewind_body
```python
from request import rewind_body
```

Attempt to rewind body to a certain position.
Primarily used for request redirects and retries.

:param body:
    File-like object that supports seek.

:param int pos:
    Position to seek to in file.

---
## __name__
```python
from timeout import __name__
```



---
## Timeout
```python
from timeout import Timeout
```

Timeout configuration.

Timeouts can be defined as a default for a pool:

.. code-block:: python

    import urllib3

    timeout = urllib3.util.Timeout(connect=2.0, read=7.0)

    http = urllib3.PoolManager(timeout=timeout)

    resp = http.request("GET", "https://example.com/")

    print(resp.status)

Or per-request (which overrides the default for the pool):

.. code-block:: python

   response = http.request("GET", "https://example.com/", timeout=Timeout(10))

Timeouts can be disabled by setting all the parameters to ``None``:

.. code-block:: python

   no_timeout = Timeout(connect=None, read=None)
   response = http.request("GET", "https://example.com/", timeout=no_timeout)


:param total:
    This combines the connect and read timeouts into one; the read timeout
    will be set to the time leftover from the connect attempt. In the
    event that both a connect timeout and a total are specified, or a read
    timeout and a total are specified, the shorter timeout will be applied.

    Defaults to None.

:type total: int, float, or None

:param connect:
    The maximum amount of time (in seconds) to wait for a connection
    attempt to a server to succeed. Omitting the parameter will default the
    connect timeout to the system default, probably `the global default
    timeout in socket.py
    <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
    None will set an infinite timeout for connection attempts.

:type connect: int, float, or None

:param read:
    The maximum amount of time (in seconds) to wait between consecutive
    read operations for a response from the server. Omitting the parameter
    will default the read timeout to the system default, probably `the
    global default timeout in socket.py
    <http://hg.python.org/cpython/file/603b4d593758/Lib/socket.py#l535>`_.
    None will set an infinite timeout.

:type read: int, float, or None

.. note::

    Many factors can affect the total amount of time for urllib3 to return
    an HTTP response.

    For example, Python's DNS resolver does not obey the timeout specified
    on the socket. Other factors that can affect total request time include
    high CPU load, high swap, the program running at a low priority level,
    or other behaviors.

    In addition, the read and total timeouts only measure the time between
    read operations on the socket connecting the client and the server,
    not the total amount of time for the request to return a complete
    response. For most requests, the timeout is raised because the server
    has not sent the first byte in the specified time. This is not always
    the case; if a server streams one byte every fifteen seconds, a timeout
    of 20 seconds will not trigger, even though the request will take
    several minutes to complete.

---
## __init__
```python
from timeout import __init__
```



---
## __repr__
```python
from timeout import __repr__
```



---
## resolve_default_timeout
```python
from timeout import resolve_default_timeout
```



---
## _validate_timeout
```python
from timeout import _validate_timeout
```

Check that a timeout attribute is valid.

:param value: The timeout value to validate
:param name: The name of the timeout attribute to validate. This is
    used to specify in error messages.
:return: The validated and casted version of the given value.
:raises ValueError: If it is a numeric value less than or equal to
    zero, or the type is not an integer, float, or None.

---
## from_float
```python
from timeout import from_float
```

Create a new Timeout from a legacy timeout value.

The timeout value used by httplib.py sets the same timeout on the
connect(), and recv() socket requests. This creates a :class:`Timeout`
object that sets the individual timeouts to the ``timeout`` value
passed to this function.

:param timeout: The legacy timeout value.
:type timeout: integer, float, :attr:`urllib3.util.Timeout.DEFAULT_TIMEOUT`, or None
:return: Timeout object
:rtype: :class:`Timeout`

---
## clone
```python
from timeout import clone
```

Create a copy of the timeout object

Timeout properties are stored per-pool but each request needs a fresh
Timeout object to ensure each one has its own start/stop configured.

:return: a copy of the timeout object
:rtype: :class:`Timeout`

---
## start_connect
```python
from timeout import start_connect
```

Start the timeout clock, used during a connect() attempt

:raises urllib3.exceptions.TimeoutStateError: if you attempt
    to start a timer that has been started already.

---
## get_connect_duration
```python
from timeout import get_connect_duration
```

Gets the time elapsed since the call to :meth:`start_connect`.

:return: Elapsed time in seconds.
:rtype: float
:raises urllib3.exceptions.TimeoutStateError: if you attempt
    to get duration for a timer that hasn't been started.

---
## connect_timeout
```python
from timeout import connect_timeout
```

Get the value to use when setting a connection timeout.

This will be a positive float or integer, the value None
(never timeout), or the default system timeout.

:return: Connect timeout.
:rtype: int, float, :attr:`Timeout.DEFAULT_TIMEOUT` or None

---
## read_timeout
```python
from timeout import read_timeout
```

Get the value for the read timeout.

This assumes some time has elapsed in the connection timeout and
computes the read timeout appropriately.

If self.total is set, the read timeout is dependent on the amount of
time taken by the connect timeout. If the connection time has not been
established, a :exc:`~urllib3.exceptions.TimeoutStateError` will be
raised.

:return: Value to use for the read timeout.
:rtype: int, float or None
:raises urllib3.exceptions.TimeoutStateError: If :meth:`start_connect`
    has not yet been called on this object.

---
## is_fp_closed
```python
from response import is_fp_closed
```

Checks whether a given file-like object is closed.

:param obj:
    The file-like object to check.

---
## assert_header_parsing
```python
from response import assert_header_parsing
```

Asserts whether all headers have been successfully parsed.
Extracts encountered errors from the result of parsing headers.

Only works on Python 3.

:param http.client.HTTPMessage headers: Headers to verify.

:raises urllib3.exceptions.HeaderParsingError:
    If parsing errors are found.

---
## is_response_to_head
```python
from response import is_response_to_head
```

Checks whether the request of a response has been a HEAD-request.

:param http.client.HTTPResponse response:
    Response to check if the originating request
    used 'HEAD' as a method.

---
## __name__
```python
from ssl_ import __name__
```



---
## _const_compare_digest_backport
```python
from ssl_ import _const_compare_digest_backport
```

Compare two digests of equal length in constant time.

The digests must be of type str/bytes.
Returns True if the digests match, and False otherwise.

---
## assert_fingerprint
```python
from ssl_ import assert_fingerprint
```

Checks if given fingerprint matches the supplied certificate.

:param cert:
    Certificate as bytes object.
:param fingerprint:
    Fingerprint as string of hexdigits, can be interspersed by colons.

---
## resolve_cert_reqs
```python
from ssl_ import resolve_cert_reqs
```

Resolves the argument to a numeric constant, which can be passed to
the wrap_socket function/method from the ssl module.
Defaults to :data:`ssl.CERT_REQUIRED`.
If given a string it is assumed to be the name of the constant in the
:mod:`ssl` module or its abbreviation.
(So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
If it's neither `None` nor a string we assume it is already the numeric
constant which can directly be passed to wrap_socket.

---
## resolve_ssl_version
```python
from ssl_ import resolve_ssl_version
```

like resolve_cert_reqs

---
## create_urllib3_context
```python
from ssl_ import create_urllib3_context
```

Creates and configures an :class:`ssl.SSLContext` instance for use with urllib3.

:param ssl_version:
    The desired protocol version to use. This will default to
    PROTOCOL_SSLv23 which will negotiate the highest protocol that both
    the server and your installation of OpenSSL support.

    This parameter is deprecated instead use 'ssl_minimum_version'.
:param ssl_minimum_version:
    The minimum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
:param ssl_maximum_version:
    The maximum version of TLS to be used. Use the 'ssl.TLSVersion' enum for specifying the value.
    Not recommended to set to anything other than 'ssl.TLSVersion.MAXIMUM_SUPPORTED' which is the
    default value.
:param cert_reqs:
    Whether to require the certificate verification. This defaults to
    ``ssl.CERT_REQUIRED``.
:param options:
    Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
    ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``, and ``ssl.OP_NO_TICKET``.
:param ciphers:
    Which cipher suites to allow the server to select. Defaults to either system configured
    ciphers if OpenSSL 1.1.1+, otherwise uses a secure default set of ciphers.
:returns:
    Constructed SSLContext object with specified options
:rtype: SSLContext

---
## ssl_wrap_socket
```python
from ssl_ import ssl_wrap_socket
```

All arguments except for server_hostname, ssl_context, tls_in_tls, ca_cert_data and
ca_cert_dir have the same meaning as they do when using
:func:`ssl.create_default_context`, :meth:`ssl.SSLContext.load_cert_chain`,
:meth:`ssl.SSLContext.set_ciphers` and :meth:`ssl.SSLContext.wrap_socket`.

:param server_hostname:
    When SNI is supported, the expected hostname of the certificate
:param ssl_context:
    A pre-made :class:`SSLContext` object. If none is provided, one will
    be created using :func:`create_urllib3_context`.
:param ciphers:
    A string of ciphers we wish the client to support.
:param ca_cert_dir:
    A directory containing CA certificates in multiple separate files, as
    supported by OpenSSL's -CApath flag or the capath argument to
    SSLContext.load_verify_locations().
:param key_password:
    Optional password if the keyfile is encrypted.
:param ca_cert_data:
    Optional string containing CA certificates in PEM format suitable for
    passing as the cadata parameter to SSLContext.load_verify_locations()
:param tls_in_tls:
    Use SSLTransport to wrap the existing socket.

---
## is_ipaddress
```python
from ssl_ import is_ipaddress
```

Detects whether the hostname given is an IPv4 or IPv6 address.
Also detects IPv6 addresses with Zone IDs.

:param str hostname: Hostname to examine.
:return: True if the hostname is an IP address, False otherwise.

---
## _is_key_file_encrypted
```python
from ssl_ import _is_key_file_encrypted
```

Detects if a key file is encrypted or not.

---
## _ssl_wrap_socket_impl
```python
from ssl_ import _ssl_wrap_socket_impl
```



---
## disable_check_hostname
```python
from ssl_ import disable_check_hostname
```



---
## SSLContext
```python
from ssl_ import SSLContext
```



---
## __init__
```python
from ssl_ import __init__
```



---
## load_cert_chain
```python
from ssl_ import load_cert_chain
```



---
## load_verify_locations
```python
from ssl_ import load_verify_locations
```



---
## set_ciphers
```python
from ssl_ import set_ciphers
```



---
## wrap_socket
```python
from ssl_ import wrap_socket
```



---
## _RetryMeta
```python
from retry import _RetryMeta
```



---
## Retry
```python
from retry import Retry
```

Retry configuration.

Each retry attempt will create a new Retry object with updated values, so
they can be safely reused.

Retries can be defined as a default for a pool:

.. code-block:: python

    retries = Retry(connect=5, read=2, redirect=5)
    http = PoolManager(retries=retries)
    response = http.request("GET", "https://example.com/")

Or per-request (which overrides the default for the pool):

.. code-block:: python

    response = http.request("GET", "https://example.com/", retries=Retry(10))

Retries can be disabled by passing ``False``:

.. code-block:: python

    response = http.request("GET", "https://example.com/", retries=False)

Errors will be wrapped in :class:`~urllib3.exceptions.MaxRetryError` unless
retries are disabled, in which case the causing exception will be raised.

:param int total:
    Total number of retries to allow. Takes precedence over other counts.

    Set to ``None`` to remove this constraint and fall back on other
    counts.

    Set to ``0`` to fail on the first retry.

    Set to ``False`` to disable and imply ``raise_on_redirect=False``.

:param int connect:
    How many connection-related errors to retry on.

    These are errors raised before the request is sent to the remote server,
    which we assume has not triggered the server to process the request.

    Set to ``0`` to fail on the first retry of this type.

:param int read:
    How many times to retry on read errors.

    These errors are raised after the request was sent to the server, so the
    request may have side-effects.

    Set to ``0`` to fail on the first retry of this type.

:param int redirect:
    How many redirects to perform. Limit this to avoid infinite redirect
    loops.

    A redirect is a HTTP response with a status code 301, 302, 303, 307 or
    308.

    Set to ``0`` to fail on the first retry of this type.

    Set to ``False`` to disable and imply ``raise_on_redirect=False``.

:param int status:
    How many times to retry on bad status codes.

    These are retries made on responses, where status code matches
    ``status_forcelist``.

    Set to ``0`` to fail on the first retry of this type.

:param int other:
    How many times to retry on other errors.

    Other errors are errors that are not connect, read, redirect or status errors.
    These errors might be raised after the request was sent to the server, so the
    request might have side-effects.

    Set to ``0`` to fail on the first retry of this type.

    If ``total`` is not set, it's a good idea to set this to 0 to account
    for unexpected edge cases and avoid infinite retry loops.

:param Collection allowed_methods:
    Set of uppercased HTTP method verbs that we should retry on.

    By default, we only retry on methods which are considered to be
    idempotent (multiple requests with the same parameters end with the
    same state). See :attr:`Retry.DEFAULT_ALLOWED_METHODS`.

    Set to a ``None`` value to retry on any verb.

:param Collection status_forcelist:
    A set of integer HTTP status codes that we should force a retry on.
    A retry is initiated if the request method is in ``allowed_methods``
    and the response status code is in ``status_forcelist``.

    By default, this is disabled with ``None``.

:param float backoff_factor:
    A backoff factor to apply between attempts after the second try
    (most errors are resolved immediately by a second try without a
    delay). urllib3 will sleep for::

        {backoff factor} * (2 ** ({number of previous retries}))

    seconds. If `backoff_jitter` is non-zero, this sleep is extended by::

        random.uniform(0, {backoff jitter})

    seconds. For example, if the backoff_factor is 0.1, then :func:`Retry.sleep` will
    sleep for [0.0s, 0.2s, 0.4s, 0.8s, ...] between retries. No backoff will ever
    be longer than `backoff_max`.

    By default, backoff is disabled (factor set to 0).

:param bool raise_on_redirect: Whether, if the number of redirects is
    exhausted, to raise a MaxRetryError, or to return a response with a
    response code in the 3xx range.

:param bool raise_on_status: Similar meaning to ``raise_on_redirect``:
    whether we should raise an exception, or return a response,
    if status falls in ``status_forcelist`` range and retries have
    been exhausted.

:param tuple history: The history of the request encountered during
    each call to :meth:`~Retry.increment`. The list is in the order
    the requests occurred. Each list item is of class :class:`RequestHistory`.

:param bool respect_retry_after_header:
    Whether to respect Retry-After header on status codes defined as
    :attr:`Retry.RETRY_AFTER_STATUS_CODES` or not.

:param Collection remove_headers_on_redirect:
    Sequence of headers to remove from the request when a response
    indicating a redirect is returned before firing off the redirected
    request.

---
## DEFAULT_METHOD_WHITELIST
```python
from retry import DEFAULT_METHOD_WHITELIST
```



---
## DEFAULT_REDIRECT_HEADERS_BLACKLIST
```python
from retry import DEFAULT_REDIRECT_HEADERS_BLACKLIST
```



---
## BACKOFF_MAX
```python
from retry import BACKOFF_MAX
```



---
## __init__
```python
from retry import __init__
```



---
## new
```python
from retry import new
```



---
## from_int
```python
from retry import from_int
```

Backwards-compatibility for the old retries format.

---
## get_backoff_time
```python
from retry import get_backoff_time
```

Formula for computing the current backoff

:rtype: float

---
## parse_retry_after
```python
from retry import parse_retry_after
```



---
## get_retry_after
```python
from retry import get_retry_after
```

Get the value of Retry-After in seconds.

---
## sleep_for_retry
```python
from retry import sleep_for_retry
```



---
## _sleep_backoff
```python
from retry import _sleep_backoff
```



---
## sleep
```python
from retry import sleep
```

Sleep between retry attempts.

This method will respect a server's ``Retry-After`` response header
and sleep the duration of the time requested. If that is not present, it
will use an exponential backoff. By default, the backoff factor is 0 and
this method will return immediately.

---
## _is_connection_error
```python
from retry import _is_connection_error
```

Errors when we're fairly sure that the server did not receive the
request, so it should be safe to retry.

---
## _is_read_error
```python
from retry import _is_read_error
```

Errors that occur after the request has been started, so we should
assume that the server began processing it.

---
## _is_method_retryable
```python
from retry import _is_method_retryable
```

Checks if a given HTTP method should be retried upon, depending if
it is included in the allowed_methods

---
## is_retry
```python
from retry import is_retry
```

Is this method/status code retryable? (Based on allowlists and control
variables such as the number of total retries to allow, whether to
respect the Retry-After header, whether this header is present, and
whether the returned status code is on the list of status codes to
be retried upon on the presence of the aforementioned header)

---
## is_exhausted
```python
from retry import is_exhausted
```

Are we out of retries?

---
## increment
```python
from retry import increment
```

Return a new Retry object with incremented retry counters.

:param response: A response object, or None, if the server did not
    return a response.
:type response: :class:`~urllib3.response.BaseHTTPResponse`
:param Exception error: An error encountered during the request, or
    None if the response was received successfully.

:return: A new ``Retry`` object.

---
## __repr__
```python
from retry import __repr__
```



---
## __getattr__
```python
from retry import __getattr__
```



---
## __name__
```python
from url import __name__
```



---
## Url
```python
from url import Url
```

Data structure for representing an HTTP URL. Used as a return value for
:func:`parse_url`. Both the scheme and host are normalized as they are
both case-insensitive according to RFC 3986.

---
## split_first
```python
from url import split_first
```

.. deprecated:: 1.25

Given a string and an iterable of delimiters, split on the first found
delimiter. Return two split parts and the matched delimiter.

If not found, then the first part is the full input string.

Example::

    >>> split_first('foo/bar?baz', '?/=')
    ('foo', 'bar?baz', '/')
    >>> split_first('foo/bar?baz', '123')
    ('foo/bar?baz', '', None)

Scales linearly with number of delims. Not ideal for large number of delims.

---
## _encode_invalid_chars
```python
from url import _encode_invalid_chars
```

Percent-encodes a URI component without reapplying
onto an already percent-encoded component.

---
## _remove_path_dot_segments
```python
from url import _remove_path_dot_segments
```



---
## _normalize_host
```python
from url import _normalize_host
```



---
## _idna_encode
```python
from url import _idna_encode
```



---
## _encode_target
```python
from url import _encode_target
```

Percent-encodes a request target so that there are no invalid characters

Pre-condition for this function is that 'target' must start with '/'.
If that is the case then _TARGET_RE will always produce a match.

---
## parse_url
```python
from url import parse_url
```

Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
performed to parse incomplete urls. Fields not provided will be None.
This parser is RFC 3986 and RFC 6874 compliant.

The parser logic and helper functions are based heavily on
work done in the ``rfc3986`` module.

:param str url: URL to parse into a :class:`.Url` namedtuple.

Partly backwards-compatible with :mod:`urllib.parse`.

Example:

.. code-block:: python

    import urllib3

    print( urllib3.util.parse_url('http://google.com/mail/'))
    # Url(scheme='http', host='google.com', port=None, path='/mail/', ...)

    print( urllib3.util.parse_url('google.com:80'))
    # Url(scheme=None, host='google.com', port=80, path=None, ...)

    print( urllib3.util.parse_url('/foo?bar'))
    # Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)

---
## get_host
```python
from url import get_host
```

Deprecated. Use :func:`parse_url` instead.

---
## __new__
```python
from url import __new__
```



---
## hostname
```python
from url import hostname
```

For backwards-compatibility with urlparse. We're nice like that.

---
## request_uri
```python
from url import request_uri
```

Absolute path including the query string.

---
## netloc
```python
from url import netloc
```

Network location including host and port.

If you need the equivalent of urllib.parse's ``netloc``,
use the ``authority`` property instead.

---
## url
```python
from url import url
```

Convert self into a url

This function should more or less round-trip with :func:`.parse_url`. The
returned url may not be exactly the same as the url inputted to
:func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
with a blank port will have : removed).

Example:

.. code-block:: python

    import urllib3

    U = urllib3.util.parse_url("https://google.com/mail/")

    print(U.url)
    # "https://google.com/mail/"

    print( urllib3.util.Url("https", "username:password",
                            "host.com", 80, "/path", "query", "fragment"
                            ).url
        )
    # "https://username:password@host.com:80/path?query#fragment"

---
## __str__
```python
from url import __str__
```



---
## ensure_type
```python
from url import ensure_type
```



---
## is_connection_dropped
```python
from connection import is_connection_dropped
```

Returns True if the connection is dropped and should be closed.
:param conn: :class:`urllib3.connection.HTTPConnection` object.

---
## create_connection
```python
from connection import create_connection
```

Connect to *address* and return the socket object.

Convenience function.  Connect to *address* (a 2-tuple ``(host,
port)``) and return the socket object.  Passing the optional
*timeout* parameter will set the timeout on the socket instance
before attempting to connect.  If no *timeout* is supplied, the
global default timeout setting returned by :func:`socket.getdefaulttimeout`
is used.  If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
An host of '' or port 0 tells the OS to use the default.

---
## _set_socket_options
```python
from connection import _set_socket_options
```



---
## allowed_gai_family
```python
from connection import allowed_gai_family
```

This function is designed to work in the context of
getaddrinfo, where family=socket.AF_UNSPEC is the default and
will perform a DNS search for both IPv6 and IPv4 records.

---
## _has_ipv6
```python
from connection import _has_ipv6
```

Returns True if the system can bind an IPv6 address.

---
## __name__
```python
from ssl_match_hostname import __name__
```

The match_hostname() function from Python 3.5, essential when using SSL.

---
## CertificateError
```python
from ssl_match_hostname import CertificateError
```



---
## _dnsname_match
```python
from ssl_match_hostname import _dnsname_match
```

Matching according to RFC 6125, section 6.4.3

http://tools.ietf.org/html/rfc6125#section-6.4.3

---
## _to_unicode
```python
from ssl_match_hostname import _to_unicode
```



---
## _ipaddress_match
```python
from ssl_match_hostname import _ipaddress_match
```

Exact matching of IP addresses.

RFC 9110 section 4.3.5: "A reference identity of IP-ID contains the decoded
bytes of the IP address. An IP version 4 address is 4 octets, and an IP
version 6 address is 16 octets. [...] A reference identity of type IP-ID
matches if the address is identical to an iPAddress value of the
subjectAltName extension of the certificate."

---
## match_hostname
```python
from ssl_match_hostname import match_hostname
```

Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
rules are followed, but IP addresses are not accepted for *hostname*.

CertificateError is raised on failure. On success, the function
returns nothing.

---
## __name__
```python
from securetransport import __name__
```

SecureTranport support for urllib3 via ctypes.

This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
this is to give macOS users an alternative solution to the problem, and that
solution is to use SecureTransport.

We use ctypes here because this solution must not require a compiler. That's
because pip is not allowed to require a compiler either.

This is not intended to be a seriously long-term solution to this problem.
The hope is that PEP 543 will eventually solve this issue for us, at which
point we can retire this contrib module. But in the short term, we need to
solve the impending tire fire that is Python on Mac without this kind of
contrib module. So...here we are.

To use this module, simply import and inject it::

    import pip._vendor.urllib3.contrib.securetransport as securetransport
    securetransport.inject_into_urllib3()

Happy TLSing!

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

.. code-block::

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.

---
## inject_into_urllib3
```python
from securetransport import inject_into_urllib3
```

Monkey-patch urllib3 with SecureTransport-backed SSL-support.

---
## extract_from_urllib3
```python
from securetransport import extract_from_urllib3
```

Undo monkey-patching by :func:`inject_into_urllib3`.

---
## _read_callback
```python
from securetransport import _read_callback
```

SecureTransport read callback. This is called by ST to request that data
be returned from the socket.

---
## _write_callback
```python
from securetransport import _write_callback
```

SecureTransport write callback. This is called by ST to request that data
actually be sent on the network.

---
## WrappedSocket
```python
from securetransport import WrappedSocket
```

API-compatibility wrapper for Python's OpenSSL wrapped socket object.

Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
collector of PyPy.

---
## SecureTransportContext
```python
from securetransport import SecureTransportContext
```

I am a wrapper class for the SecureTransport library, to translate the
interface of the standard library ``SSLContext`` object to calls into
SecureTransport.

---
## __init__
```python
from securetransport import __init__
```



---
## _raise_on_error
```python
from securetransport import _raise_on_error
```

A context manager that can be used to wrap calls that do I/O from
SecureTransport. If any of the I/O callbacks hit an exception, this
context manager will correctly propagate the exception after the fact.
This avoids silently swallowing those exceptions.

It also correctly forces the socket closed.

---
## _set_ciphers
```python
from securetransport import _set_ciphers
```

Sets up the allowed ciphers. By default this matches the set in
util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
custom and doesn't allow changing at this time, mostly because parsing
OpenSSL cipher strings is going to be a freaking nightmare.

---
## _set_alpn_protocols
```python
from securetransport import _set_alpn_protocols
```

Sets up the ALPN protocols on the context.

---
## _custom_validate
```python
from securetransport import _custom_validate
```

Called when we have set custom validation. We do this in two cases:
first, when cert validation is entirely disabled; and second, when
using a custom trust DB.
Raises an SSLError if the connection is not trusted.

---
## _evaluate_trust
```python
from securetransport import _evaluate_trust
```



---
## handshake
```python
from securetransport import handshake
```

Actually performs the TLS handshake. This is run automatically by
wrapped socket, and shouldn't be needed in user code.

---
## fileno
```python
from securetransport import fileno
```



---
## _decref_socketios
```python
from securetransport import _decref_socketios
```



---
## recv
```python
from securetransport import recv
```



---
## recv_into
```python
from securetransport import recv_into
```



---
## settimeout
```python
from securetransport import settimeout
```



---
## gettimeout
```python
from securetransport import gettimeout
```



---
## send
```python
from securetransport import send
```



---
## sendall
```python
from securetransport import sendall
```



---
## shutdown
```python
from securetransport import shutdown
```



---
## close
```python
from securetransport import close
```



---
## getpeercert
```python
from securetransport import getpeercert
```



---
## version
```python
from securetransport import version
```



---
## _reuse
```python
from securetransport import _reuse
```



---
## _drop
```python
from securetransport import _drop
```



---
## makefile
```python
from securetransport import makefile
```



---
## check_hostname
```python
from securetransport import check_hostname
```

SecureTransport cannot have its hostname checking disabled. For more,
see the comment on getpeercert() in this file.

---
## options
```python
from securetransport import options
```



---
## verify_mode
```python
from securetransport import verify_mode
```



---
## set_default_verify_paths
```python
from securetransport import set_default_verify_paths
```



---
## load_default_certs
```python
from securetransport import load_default_certs
```



---
## set_ciphers
```python
from securetransport import set_ciphers
```



---
## load_verify_locations
```python
from securetransport import load_verify_locations
```



---
## load_cert_chain
```python
from securetransport import load_cert_chain
```



---
## set_alpn_protocols
```python
from securetransport import set_alpn_protocols
```

Sets the ALPN protocols that will later be set on the context.

Raises a NotImplementedError if ALPN is not supported.

---
## wrap_socket
```python
from securetransport import wrap_socket
```



---
## __name__
```python
from socks import __name__
```

This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.

The SOCKS implementation supports the full range of urllib3 features. It also
supports the following SOCKS features:

- SOCKS4A (``proxy_url='socks4a://...``)
- SOCKS4 (``proxy_url='socks4://...``)
- SOCKS5 with remote DNS (``proxy_url='socks5h://...``)
- SOCKS5 with local DNS (``proxy_url='socks5://...``)
- Usernames and passwords for the SOCKS proxy

.. note::
   It is recommended to use ``socks5h://`` or ``socks4a://`` schemes in
   your ``proxy_url`` to ensure that DNS resolution is done from the remote
   server instead of client-side when connecting to a domain name.

SOCKS4 supports IPv4 and domain names with the SOCKS4A extension. SOCKS5
supports IPv4, IPv6, and domain names.

When connecting to a SOCKS4 proxy the ``username`` portion of the ``proxy_url``
will be sent as the ``userid`` section of the SOCKS request:

.. code-block:: python

    proxy_url="socks4a://<userid>@proxy-host"

When connecting to a SOCKS5 proxy the ``username`` and ``password`` portion
of the ``proxy_url`` will be sent as the username/password to authenticate
with the proxy:

.. code-block:: python

    proxy_url="socks5h://<username>:<password>@proxy-host"

---
## SOCKSConnection
```python
from socks import SOCKSConnection
```

A plain-text HTTP connection that connects via a SOCKS proxy.

---
## SOCKSHTTPSConnection
```python
from socks import SOCKSHTTPSConnection
```



---
## SOCKSHTTPConnectionPool
```python
from socks import SOCKSHTTPConnectionPool
```



---
## SOCKSHTTPSConnectionPool
```python
from socks import SOCKSHTTPSConnectionPool
```



---
## SOCKSProxyManager
```python
from socks import SOCKSProxyManager
```

A version of the urllib3 ProxyManager that routes connections via the
defined SOCKS proxy.

---
## __init__
```python
from socks import __init__
```



---
## _new_conn
```python
from socks import _new_conn
```

Establish a new connection via the SOCKS proxy.

---
## __name__
```python
from _appengine_environ import __name__
```

This module provides means to detect the App Engine environment.

---
## is_appengine
```python
from _appengine_environ import is_appengine
```



---
## is_appengine_sandbox
```python
from _appengine_environ import is_appengine_sandbox
```

Reports if the app is running in the first generation sandbox.

The second generation runtimes are technically still in a sandbox, but it
is much less restrictive, so generally you shouldn't need to check for it.
see https://cloud.google.com/appengine/docs/standard/runtimes

---
## is_local_appengine
```python
from _appengine_environ import is_local_appengine
```



---
## is_prod_appengine
```python
from _appengine_environ import is_prod_appengine
```



---
## is_prod_appengine_mvms
```python
from _appengine_environ import is_prod_appengine_mvms
```

Deprecated.

---
## __name__
```python
from pyopenssl import __name__
```

Module for using pyOpenSSL as a TLS backend. This module was relevant before
the standard library ``ssl`` module supported SNI, but now that we've dropped
support for Python 2.7 all relevant Python versions support SNI so
**this module is no longer recommended**.

This needs the following packages installed:

* `pyOpenSSL`_ (tested with 16.0.0)
* `cryptography`_ (minimum 1.3.4, from pyopenssl)
* `idna`_ (minimum 2.0)

However, pyOpenSSL depends on cryptography, so while we use all three directly here we
end up having relatively few packages required.

You can install them with the following command:

.. code-block:: bash

    $ python -m pip install pyopenssl cryptography idna

To activate certificate checking, call
:func:`~urllib3.contrib.pyopenssl.inject_into_urllib3` from your Python code
before you begin making HTTP requests. This can be done in a ``sitecustomize``
module, or at any other time before your application begins using ``urllib3``,
like this:

.. code-block:: python

    try:
        import urllib3.contrib.pyopenssl
        urllib3.contrib.pyopenssl.inject_into_urllib3()
    except ImportError:
        pass

.. _pyopenssl: https://www.pyopenssl.org
.. _cryptography: https://cryptography.io
.. _idna: https://github.com/kjd/idna

---
## inject_into_urllib3
```python
from pyopenssl import inject_into_urllib3
```

Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.

---
## extract_from_urllib3
```python
from pyopenssl import extract_from_urllib3
```

Undo monkey-patching by :func:`inject_into_urllib3`.

---
## _validate_dependencies_met
```python
from pyopenssl import _validate_dependencies_met
```

Verifies that PyOpenSSL's package-level dependencies have been met.
Throws `ImportError` if they are not met.

---
## _dnsname_to_stdlib
```python
from pyopenssl import _dnsname_to_stdlib
```

Converts a dNSName SubjectAlternativeName field to the form used by the
standard library on the given Python version.

Cryptography produces a dNSName as a unicode string that was idna-decoded
from ASCII bytes. We need to idna-encode that string to get it back, and
then on Python 3 we also need to convert to unicode via UTF-8 (the stdlib
uses PyUnicode_FromStringAndSize on it, which decodes via UTF-8).

If the name cannot be idna-encoded then we return None signalling that
the name given should be skipped.

---
## get_subj_alt_name
```python
from pyopenssl import get_subj_alt_name
```

Given an PyOpenSSL certificate, provides all the subject alternative names.

---
## WrappedSocket
```python
from pyopenssl import WrappedSocket
```

API-compatibility wrapper for Python OpenSSL's Connection-class.

---
## PyOpenSSLContext
```python
from pyopenssl import PyOpenSSLContext
```

I am a wrapper class for the PyOpenSSL ``Context`` object. I am responsible
for translating the interface of the standard library ``SSLContext`` object
to calls into PyOpenSSL.

---
## _verify_callback
```python
from pyopenssl import _verify_callback
```



---
## idna_encode
```python
from pyopenssl import idna_encode
```

Borrowed wholesale from the Python Cryptography Project. It turns out
that we can't just safely call `idna.encode`: it can explode for
wildcard names. This avoids that problem.

---
## __init__
```python
from pyopenssl import __init__
```



---
## fileno
```python
from pyopenssl import fileno
```



---
## _decref_socketios
```python
from pyopenssl import _decref_socketios
```



---
## recv
```python
from pyopenssl import recv
```



---
## recv_into
```python
from pyopenssl import recv_into
```



---
## settimeout
```python
from pyopenssl import settimeout
```



---
## _send_until_done
```python
from pyopenssl import _send_until_done
```



---
## sendall
```python
from pyopenssl import sendall
```



---
## shutdown
```python
from pyopenssl import shutdown
```



---
## close
```python
from pyopenssl import close
```



---
## getpeercert
```python
from pyopenssl import getpeercert
```



---
## version
```python
from pyopenssl import version
```



---
## _reuse
```python
from pyopenssl import _reuse
```



---
## _drop
```python
from pyopenssl import _drop
```



---
## makefile
```python
from pyopenssl import makefile
```



---
## options
```python
from pyopenssl import options
```



---
## verify_mode
```python
from pyopenssl import verify_mode
```



---
## set_default_verify_paths
```python
from pyopenssl import set_default_verify_paths
```



---
## set_ciphers
```python
from pyopenssl import set_ciphers
```



---
## load_verify_locations
```python
from pyopenssl import load_verify_locations
```



---
## load_cert_chain
```python
from pyopenssl import load_cert_chain
```



---
## set_alpn_protocols
```python
from pyopenssl import set_alpn_protocols
```



---
## wrap_socket
```python
from pyopenssl import wrap_socket
```



---
## UnsupportedExtension
```python
from pyopenssl import UnsupportedExtension
```



---
## AppEnginePlatformWarning
```python
from appengine import AppEnginePlatformWarning
```



---
## AppEnginePlatformError
```python
from appengine import AppEnginePlatformError
```



---
## AppEngineManager
```python
from appengine import AppEngineManager
```

Connection manager for Google App Engine sandbox applications.

This manager uses the URLFetch service directly instead of using the
emulated httplib, and is subject to URLFetch limitations as described in
the App Engine documentation `here
<https://cloud.google.com/appengine/docs/python/urlfetch>`_.

Notably it will raise an :class:`AppEnginePlatformError` if:
    * URLFetch is not available.
    * If you attempt to use this on App Engine Flexible, as full socket
      support is available.
    * If a request size is more than 10 megabytes.
    * If a response size is more than 32 megabytes.
    * If you use an unsupported request method such as OPTIONS.

Beyond those cases, it will raise normal urllib3 errors.

---
## __enter__
```python
from appengine import __enter__
```



---
## __exit__
```python
from appengine import __exit__
```



---
## _urlfetch_response_to_http_response
```python
from appengine import _urlfetch_response_to_http_response
```



---
## _get_absolute_timeout
```python
from appengine import _get_absolute_timeout
```



---
## _get_retries
```python
from appengine import _get_retries
```



---
## __name__
```python
from ntlmpool import __name__
```

NTLM authenticating pool, contributed by erikcederstran

Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10

---
## NTLMConnectionPool
```python
from ntlmpool import NTLMConnectionPool
```

Implements an NTLM authentication version of an urllib3 connection pool

---
## __init__
```python
from ntlmpool import __init__
```

authurl is a random URL on the server that is protected by NTLM.
user is the Windows user, probably in the DOMAIN\username format.
pw is the password for the user.

---
## _new_conn
```python
from ntlmpool import _new_conn
```



---
## urlopen
```python
from ntlmpool import urlopen
```



---
## __name__
```python
from low_level import __name__
```

Low-level helpers for the SecureTransport bindings.

These are Python functions that are not directly related to the high-level APIs
but are necessary to get them to work. They include a whole bunch of low-level
CoreFoundation messing about and memory management. The concerns in this module
are almost entirely about trying to avoid memory leaks and providing
appropriate and useful assistance to the higher-level code.

---
## _cf_data_from_bytes
```python
from low_level import _cf_data_from_bytes
```

Given a bytestring, create a CFData object from it. This CFData object must
be CFReleased by the caller.

---
## _cf_dictionary_from_tuples
```python
from low_level import _cf_dictionary_from_tuples
```

Given a list of Python tuples, create an associated CFDictionary.

---
## _cfstr
```python
from low_level import _cfstr
```

Given a Python binary data, create a CFString.
The string must be CFReleased by the caller.

---
## _create_cfstring_array
```python
from low_level import _create_cfstring_array
```

Given a list of Python binary data, create an associated CFMutableArray.
The array must be CFReleased by the caller.

Raises an ssl.SSLError on failure.

---
## _cf_string_to_unicode
```python
from low_level import _cf_string_to_unicode
```

Creates a Unicode string from a CFString object. Used entirely for error
reporting.

Yes, it annoys me quite a lot that this function is this complex.

---
## _assert_no_error
```python
from low_level import _assert_no_error
```

Checks the return code and throws an exception if there is an error to
report

---
## _cert_array_from_pem
```python
from low_level import _cert_array_from_pem
```

Given a bundle of certs in PEM format, turns them into a CFArray of certs
that can be used to validate a cert chain.

---
## _is_cert
```python
from low_level import _is_cert
```

Returns True if a given CFTypeRef is a certificate.

---
## _is_identity
```python
from low_level import _is_identity
```

Returns True if a given CFTypeRef is an identity.

---
## _temporary_keychain
```python
from low_level import _temporary_keychain
```

This function creates a temporary Mac keychain that we can use to work with
credentials. This keychain uses a one-time password and a temporary file to
store the data. We expect to have one keychain per socket. The returned
SecKeychainRef must be freed by the caller, including calling
SecKeychainDelete.

Returns a tuple of the SecKeychainRef and the path to the temporary
directory that contains it.

---
## _load_items_from_file
```python
from low_level import _load_items_from_file
```

Given a single file, loads all the trust objects from it into arrays and
the keychain.
Returns a tuple of lists: the first list is a list of identities, the
second a list of certs.

---
## _load_client_cert_chain
```python
from low_level import _load_client_cert_chain
```

Load certificates and maybe keys from a number of files. Has the end goal
of returning a CFArray containing one SecIdentityRef, and then zero or more
SecCertificateRef objects, suitable for use as a client certificate trust
chain.

---
## _build_tls_unknown_ca_alert
```python
from low_level import _build_tls_unknown_ca_alert
```

Builds a TLS alert record for an unknown CA.

---
## __name__
```python
from bindings import __name__
```

This module uses ctypes to bind a whole bunch of functions and constants from
SecureTransport. The goal here is to provide the low-level API to
SecureTransport. These are essentially the C-level functions and constants, and
they're pretty gross to work with.

This code is a bastardised version of the code found in Will Bond's oscrypto
library. An enormous debt is owed to him for blazing this trail for us. For
that reason, this code should be considered to be covered both by urllib3's
license and by oscrypto's:

    Copyright (c) 2015-2016 Will Bond <will@wbond.net>

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the "Software"),
    to deal in the Software without restriction, including without limitation
    the rights to use, copy, modify, merge, publish, distribute, sublicense,
    and/or sell copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    DEALINGS IN THE SOFTWARE.

---
## load_cdll
```python
from bindings import load_cdll
```

Loads a CDLL by name, falling back to known path on 10.16+

---
## CFConst
```python
from bindings import CFConst
```

A class object that acts as essentially a namespace for CoreFoundation
constants.

---
## SecurityConst
```python
from bindings import SecurityConst
```

A class object that acts as essentially a namespace for Security constants.

---
## __name__
```python
from makefile import __name__
```

backports.makefile
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``socket.makefile`` method for use with anything that
wants to create a "fake" socket object.

---
## backport_makefile
```python
from makefile import backport_makefile
```

Backport of ``socket.makefile`` from Python 3.5.

---
## __name__
```python
from weakref_finalize import __name__
```

backports.weakref_finalize
~~~~~~~~~~~~~~~~~~

Backports the Python 3 ``weakref.finalize`` method.

---
## weakref_finalize
```python
from weakref_finalize import weakref_finalize
```

Class for finalization of weakrefable objects
finalize(obj, func, *args, **kwargs) returns a callable finalizer
object which will be called when obj is garbage collected. The
first time the finalizer is called it evaluates func(*arg, **kwargs)
and returns the result. After this the finalizer is dead, and
calling it just returns None.
When the program exits any remaining finalizers for which the
atexit attribute is true will be run in reverse order of creation.
By default atexit is true.

---
## _Info
```python
from weakref_finalize import _Info
```



---
## __init__
```python
from weakref_finalize import __init__
```



---
## __call__
```python
from weakref_finalize import __call__
```

If alive then mark as dead and return func(*args, **kwargs);
otherwise return None

---
## detach
```python
from weakref_finalize import detach
```

If alive then mark as dead and return (obj, func, args, kwargs);
otherwise return None

---
## peek
```python
from weakref_finalize import peek
```

If alive then return (obj, func, args, kwargs);
otherwise return None

---
## alive
```python
from weakref_finalize import alive
```

Whether finalizer is alive

---
## atexit
```python
from weakref_finalize import atexit
```



---
## __repr__
```python
from weakref_finalize import __repr__
```



---
## _select_for_exit
```python
from weakref_finalize import _select_for_exit
```



---
## _exitfunc
```python
from weakref_finalize import _exitfunc
```



---
## __name__
```python
from collections_abc import __name__
```



---
## __name__
```python
from catalog import __name__
```

babel.messages.catalog
~~~~~~~~~~~~~~~~~~~~~~

Data structures for message catalogs.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## get_close_matches
```python
from catalog import get_close_matches
```

A modified version of ``difflib.get_close_matches``.

It just passes ``autojunk=False`` to the ``SequenceMatcher``, to work
around https://github.com/python/cpython/issues/90825.

---
## _parse_datetime_header
```python
from catalog import _parse_datetime_header
```



---
## Message
```python
from catalog import Message
```

Representation of a single message in a catalog.

---
## TranslationError
```python
from catalog import TranslationError
```

Exception thrown by translation checkers when invalid message
translations are encountered.

---
## parse_separated_header
```python
from catalog import parse_separated_header
```



---
## Catalog
```python
from catalog import Catalog
```

Representation of a message catalog.

---
## __init__
```python
from catalog import __init__
```

Initialize the catalog object.

:param locale: the locale identifier or `Locale` object, or `None`
               if the catalog is not bound to a locale (which basically
               means it's a template)
:param domain: the message domain
:param header_comment: the header comment as string, or `None` for the
                       default header
:param project: the project's name
:param version: the project's version
:param copyright_holder: the copyright holder of the catalog
:param msgid_bugs_address: the email address or URL to submit bug
                           reports to
:param creation_date: the date the catalog was created
:param revision_date: the date the catalog was revised
:param last_translator: the name and email of the last translator
:param language_team: the name and email of the language team
:param charset: the encoding to use in the output (defaults to utf-8)
:param fuzzy: the fuzzy bit on the catalog header

---
## __repr__
```python
from catalog import __repr__
```



---
## __cmp__
```python
from catalog import __cmp__
```

Compare Messages, taking into account plural ids

---
## __gt__
```python
from catalog import __gt__
```



---
## __lt__
```python
from catalog import __lt__
```



---
## __ge__
```python
from catalog import __ge__
```



---
## __le__
```python
from catalog import __le__
```



---
## __eq__
```python
from catalog import __eq__
```



---
## __ne__
```python
from catalog import __ne__
```



---
## is_identical
```python
from catalog import is_identical
```

Checks if catalogs are identical, taking into account messages and
headers.

---
## clone
```python
from catalog import clone
```



---
## check
```python
from catalog import check
```

Run various validation checks on the translations in the catalog.

For every message which fails validation, this method yield a
``(message, errors)`` tuple, where ``message`` is the `Message` object
and ``errors`` is a sequence of `TranslationError` objects.

:rtype: ``generator`` of ``(message, errors)``

---
## fuzzy
```python
from catalog import fuzzy
```

Whether the translation is fuzzy.

>>> Message('foo').fuzzy
False
>>> msg = Message('foo', 'foo', flags=['fuzzy'])
>>> msg.fuzzy
True
>>> msg
<Message 'foo' (flags: ['fuzzy'])>

:type:  `bool`

---
## pluralizable
```python
from catalog import pluralizable
```

Whether the message is plurizable.

>>> Message('foo').pluralizable
False
>>> Message(('foo', 'bar')).pluralizable
True

:type:  `bool`

---
## python_format
```python
from catalog import python_format
```

Whether the message contains Python-style parameters.

>>> Message('foo %(name)s bar').python_format
True
>>> Message(('foo %(name)s', 'foo %(name)s')).python_format
True

:type:  `bool`

---
## _set_locale
```python
from catalog import _set_locale
```



---
## _get_locale
```python
from catalog import _get_locale
```



---
## _get_locale_identifier
```python
from catalog import _get_locale_identifier
```



---
## _get_header_comment
```python
from catalog import _get_header_comment
```



---
## _set_header_comment
```python
from catalog import _set_header_comment
```



---
## _get_mime_headers
```python
from catalog import _get_mime_headers
```



---
## _force_text
```python
from catalog import _force_text
```



---
## _set_mime_headers
```python
from catalog import _set_mime_headers
```



---
## num_plurals
```python
from catalog import num_plurals
```

The number of plurals used by the catalog or locale.

>>> Catalog(locale='en').num_plurals
2
>>> Catalog(locale='ga').num_plurals
5

:type: `int`

---
## plural_expr
```python
from catalog import plural_expr
```

The plural expression used by the catalog or locale.

>>> Catalog(locale='en').plural_expr
'(n != 1)'
>>> Catalog(locale='ga').plural_expr
'(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4)'
>>> Catalog(locale='ding').plural_expr  # unknown locale
'(n != 1)'

:type: `str`

---
## plural_forms
```python
from catalog import plural_forms
```

Return the plural forms declaration for the locale.

>>> Catalog(locale='en').plural_forms
'nplurals=2; plural=(n != 1);'
>>> Catalog(locale='pt_BR').plural_forms
'nplurals=2; plural=(n > 1);'

:type: `str`

---
## __contains__
```python
from catalog import __contains__
```

Return whether the catalog has a message with the specified ID.

---
## __len__
```python
from catalog import __len__
```

The number of messages in the catalog.

This does not include the special ``msgid ""`` entry.

---
## __iter__
```python
from catalog import __iter__
```

Iterates through all the entries in the catalog, in the order they
were added, yielding a `Message` object for every entry.

:rtype: ``iterator``

---
## __delitem__
```python
from catalog import __delitem__
```

Delete the message with the specified ID.

---
## __getitem__
```python
from catalog import __getitem__
```

Return the message with the specified ID.

:param id: the message ID

---
## __setitem__
```python
from catalog import __setitem__
```

Add or update the message with the specified ID.

>>> catalog = Catalog()
>>> catalog[u'foo'] = Message(u'foo')
>>> catalog[u'foo']
<Message u'foo' (flags: [])>

If a message with that ID is already in the catalog, it is updated
to include the locations and flags of the new message.

>>> catalog = Catalog()
>>> catalog[u'foo'] = Message(u'foo', locations=[('main.py', 1)])
>>> catalog[u'foo'].locations
[('main.py', 1)]
>>> catalog[u'foo'] = Message(u'foo', locations=[('utils.py', 5)])
>>> catalog[u'foo'].locations
[('main.py', 1), ('utils.py', 5)]

:param id: the message ID
:param message: the `Message` object

---
## add
```python
from catalog import add
```

Add or update the message with the specified ID.

>>> catalog = Catalog()
>>> catalog.add(u'foo')
<Message ...>
>>> catalog[u'foo']
<Message u'foo' (flags: [])>

This method simply constructs a `Message` object with the given
arguments and invokes `__setitem__` with that object.

:param id: the message ID, or a ``(singular, plural)`` tuple for
           pluralizable messages
:param string: the translated message string, or a
               ``(singular, plural)`` tuple for pluralizable messages
:param locations: a sequence of ``(filename, lineno)`` tuples
:param flags: a set or sequence of flags
:param auto_comments: a sequence of automatic comments
:param user_comments: a sequence of user comments
:param previous_id: the previous message ID, or a ``(singular, plural)``
                    tuple for pluralizable messages
:param lineno: the line number on which the msgid line was found in the
               PO file, if any
:param context: the message context

---
## get
```python
from catalog import get
```

Return the message with the specified ID and context.

:param id: the message ID
:param context: the message context, or ``None`` for no context

---
## delete
```python
from catalog import delete
```

Delete the message with the specified ID and context.

:param id: the message ID
:param context: the message context, or ``None`` for no context

---
## update
```python
from catalog import update
```

Update the catalog based on the given template catalog.

>>> from babel.messages import Catalog
>>> template = Catalog()
>>> template.add('green', locations=[('main.py', 99)])
<Message ...>
>>> template.add('blue', locations=[('main.py', 100)])
<Message ...>
>>> template.add(('salad', 'salads'), locations=[('util.py', 42)])
<Message ...>
>>> catalog = Catalog(locale='de_DE')
>>> catalog.add('blue', u'blau', locations=[('main.py', 98)])
<Message ...>
>>> catalog.add('head', u'Kopf', locations=[('util.py', 33)])
<Message ...>
>>> catalog.add(('salad', 'salads'), (u'Salat', u'Salate'),
...             locations=[('util.py', 38)])
<Message ...>

>>> catalog.update(template)
>>> len(catalog)
3

>>> msg1 = catalog['green']
>>> msg1.string
>>> msg1.locations
[('main.py', 99)]

>>> msg2 = catalog['blue']
>>> msg2.string
u'blau'
>>> msg2.locations
[('main.py', 100)]

>>> msg3 = catalog['salad']
>>> msg3.string
(u'Salat', u'Salate')
>>> msg3.locations
[('util.py', 42)]

Messages that are in the catalog but not in the template are removed
from the main collection, but can still be accessed via the `obsolete`
member:

>>> 'head' in catalog
False
>>> list(catalog.obsolete.values())
[<Message 'head' (flags: [])>]

:param template: the reference catalog, usually read from a POT file
:param no_fuzzy_matching: whether to use fuzzy matching of message IDs

---
## _to_fuzzy_match_key
```python
from catalog import _to_fuzzy_match_key
```

Converts a message key to a string suitable for fuzzy matching.

---
## _key_for
```python
from catalog import _key_for
```

The key for a message is just the singular ID even for pluralizable
messages, but is a ``(msgid, msgctxt)`` tuple for context-specific
messages.

---
## values_to_compare
```python
from catalog import values_to_compare
```



---
## _merge
```python
from catalog import _merge
```



---
## __name__
```python
from checkers import __name__
```

babel.messages.checkers
~~~~~~~~~~~~~~~~~~~~~~~

Various routines that help with validation of translations.

:since: version 0.9

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## num_plurals
```python
from checkers import num_plurals
```

Verify the number of plurals in the translation.

---
## python_format
```python
from checkers import python_format
```

Verify the format string placeholders in the translation.

---
## _validate_format
```python
from checkers import _validate_format
```

Test format string `alternative` against `format`.  `format` can be the
msgid of a message and `alternative` one of the `msgstr`\s.  The two
arguments are not interchangeable as `alternative` may contain less
placeholders if `format` uses named placeholders.

The behavior of this function is undefined if the string does not use
string formatting.

If the string formatting of `alternative` is compatible to `format` the
function returns `None`, otherwise a `TranslationError` is raised.

Examples for compatible format strings:

>>> _validate_format('Hello %s!', 'Hallo %s!')
>>> _validate_format('Hello %i!', 'Hallo %d!')

Example for an incompatible format strings:

>>> _validate_format('Hello %(name)s!', 'Hallo %s!')
Traceback (most recent call last):
  ...
TranslationError: the format strings are of different kinds

This function is used by the `python_format` checker.

:param format: The original format string
:param alternative: The alternative format string that should be checked
                    against format
:raises TranslationError: on formatting errors

---
## _find_checkers
```python
from checkers import _find_checkers
```



---
## _parse
```python
from checkers import _parse
```



---
## _compatible
```python
from checkers import _compatible
```



---
## _check_positional
```python
from checkers import _check_positional
```



---
## __name__
```python
from pofile import __name__
```

babel.messages.pofile
~~~~~~~~~~~~~~~~~~~~~

Reading and writing of files in the ``gettext`` PO (portable object)
format.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## unescape
```python
from pofile import unescape
```

Reverse `escape` the given string.

>>> print(unescape('"Say:\\n  \\"hello, world!\\"\\n"'))
Say:
  "hello, world!"
<BLANKLINE>

:param string: the string to unescape

---
## denormalize
```python
from pofile import denormalize
```



---
## PoFileError
```python
from pofile import PoFileError
```

Exception thrown by PoParser when an invalid po file is encountered.

---
## _NormalizedString
```python
from pofile import _NormalizedString
```



---
## PoFileParser
```python
from pofile import PoFileParser
```

Support class to  read messages from a ``gettext`` PO (portable object) file
and add them to a `Catalog`

See `read_po` for simple cases.

---
## read_po
```python
from pofile import read_po
```

Read messages from a ``gettext`` PO (portable object) file from the given
file-like object (or an iterable of lines) and return a `Catalog`.

>>> from datetime import datetime
>>> from io import StringIO
>>> buf = StringIO('''
... #: main.py:1
... #, fuzzy, python-format
... msgid "foo %(name)s"
... msgstr "quux %(name)s"
...
... # A user comment
... #. An auto comment
... #: main.py:3
... msgid "bar"
... msgid_plural "baz"
... msgstr[0] "bar"
... msgstr[1] "baaz"
... ''')
>>> catalog = read_po(buf)
>>> catalog.revision_date = datetime(2007, 4, 1)

>>> for message in catalog:
...     if message.id:
...         print((message.id, message.string))
...         print(' ', (message.locations, sorted(list(message.flags))))
...         print(' ', (message.user_comments, message.auto_comments))
(u'foo %(name)s', u'quux %(name)s')
  ([(u'main.py', 1)], [u'fuzzy', u'python-format'])
  ([], [])
((u'bar', u'baz'), (u'bar', u'baaz'))
  ([(u'main.py', 3)], [])
  ([u'A user comment'], [u'An auto comment'])

.. versionadded:: 1.0
   Added support for explicit charset argument.

:param fileobj: the file-like object (or iterable of lines) to read the PO file from
:param locale: the locale identifier or `Locale` object, or `None`
               if the catalog is not bound to a locale (which basically
               means it's a template)
:param domain: the message domain
:param ignore_obsolete: whether to ignore obsolete messages in the input
:param charset: the character set of the catalog.
:param abort_invalid: abort read if po file is invalid

---
## escape
```python
from pofile import escape
```

Escape the given string so that it can be included in double-quoted
strings in ``PO`` files.

>>> escape('''Say:
...   "hello, world!"
... ''')
'"Say:\\n  \\"hello, world!\\"\\n"'

:param string: the string to escape

---
## normalize
```python
from pofile import normalize
```

Convert a string into a format that is appropriate for .po files.

>>> print(normalize('''Say:
...   "hello, world!"
... ''', width=None))
""
"Say:\n"
"  \"hello, world!\"\n"

>>> print(normalize('''Say:
...   "Lorem ipsum dolor sit amet, consectetur adipisicing elit, "
... ''', width=32))
""
"Say:\n"
"  \"Lorem ipsum dolor sit "
"amet, consectetur adipisicing"
" elit, \"\n"

:param string: the string to normalize
:param prefix: a string that should be prepended to every line
:param width: the maximum line width; use `None`, 0, or a negative number
              to completely disable line wrapping

---
## write_po
```python
from pofile import write_po
```

Write a ``gettext`` PO (portable object) template file for a given
message catalog to the provided file-like object.

>>> catalog = Catalog()
>>> catalog.add(u'foo %(name)s', locations=[('main.py', 1)],
...             flags=('fuzzy',))
<Message...>
>>> catalog.add((u'bar', u'baz'), locations=[('main.py', 3)])
<Message...>
>>> from io import BytesIO
>>> buf = BytesIO()
>>> write_po(buf, catalog, omit_header=True)
>>> print(buf.getvalue().decode("utf8"))
#: main.py:1
#, fuzzy, python-format
msgid "foo %(name)s"
msgstr ""
<BLANKLINE>
#: main.py:3
msgid "bar"
msgid_plural "baz"
msgstr[0] ""
msgstr[1] ""
<BLANKLINE>
<BLANKLINE>

:param fileobj: the file-like object to write to
:param catalog: the `Catalog` instance
:param width: the maximum line width for the generated output; use `None`,
              0, or a negative number to completely disable line wrapping
:param no_location: do not emit a location comment for every message
:param omit_header: do not include the ``msgid ""`` entry at the top of the
                    output
:param sort_output: whether to sort the messages in the output by msgid
:param sort_by_file: whether to sort the messages in the output by their
                     locations
:param ignore_obsolete: whether to ignore obsolete messages and not include
                        them in the output; by default they are included as
                        comments
:param include_previous: include the old msgid as a comment when
                         updating the catalog
:param include_lineno: include line number in the location comment

---
## generate_po
```python
from pofile import generate_po
```

Yield text strings representing a ``gettext`` PO (portable object) file.

See `write_po()` for a more detailed description.

---
## _sort_messages
```python
from pofile import _sort_messages
```

Sort the given message iterable by the given criteria.

Always returns a list.

:param messages: An iterable of Messages.
:param sort_by: Sort by which criteria? Options are `message` and `location`.
:return: list[Message]

---
## replace_escapes
```python
from pofile import replace_escapes
```



---
## __init__
```python
from pofile import __init__
```



---
## append
```python
from pofile import append
```



---
## __bool__
```python
from pofile import __bool__
```



---
## __repr__
```python
from pofile import __repr__
```



---
## __cmp__
```python
from pofile import __cmp__
```



---
## __gt__
```python
from pofile import __gt__
```



---
## __lt__
```python
from pofile import __lt__
```



---
## __ge__
```python
from pofile import __ge__
```



---
## __le__
```python
from pofile import __le__
```



---
## __eq__
```python
from pofile import __eq__
```



---
## __ne__
```python
from pofile import __ne__
```



---
## _reset_message_state
```python
from pofile import _reset_message_state
```



---
## _add_message
```python
from pofile import _add_message
```

Add a message to the catalog based on the current parser state and
clear the state ready to process the next message.

---
## _finish_current_message
```python
from pofile import _finish_current_message
```



---
## _process_message_line
```python
from pofile import _process_message_line
```



---
## _process_keyword_line
```python
from pofile import _process_keyword_line
```



---
## _process_string_continuation_line
```python
from pofile import _process_string_continuation_line
```



---
## _process_comment
```python
from pofile import _process_comment
```



---
## parse
```python
from pofile import parse
```

Reads from the file-like object `fileobj` and adds any po file
units found in it to the `Catalog` supplied to the constructor.

---
## _invalid_pofile
```python
from pofile import _invalid_pofile
```



---
## _format_comment
```python
from pofile import _format_comment
```



---
## _format_message
```python
from pofile import _format_message
```



---
## __name__
```python
from jslexer import __name__
```

babel.messages.jslexer
~~~~~~~~~~~~~~~~~~~~~~

A simple JavaScript 1.5 lexer which is used for the JavaScript
extractor.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## Token
```python
from jslexer import Token
```



---
## get_rules
```python
from jslexer import get_rules
```

Get a tokenization rule list given the passed syntax options.

Internal to this module.

---
## indicates_division
```python
from jslexer import indicates_division
```

A helper function that helps the tokenizer to decide if the current
token may be followed by a division operator.

---
## unquote_string
```python
from jslexer import unquote_string
```

Unquote a string with JavaScript rules.  The string has to start with
string delimiters (``'``, ``"`` or the back-tick/grave accent (for template strings).)

---
## tokenize
```python
from jslexer import tokenize
```

Tokenize JavaScript/JSX source.  Returns a generator of tokens.

:param jsx: Enable (limited) JSX parsing.
:param dotted: Read dotted names as single name token.
:param template_string: Support ES6 template strings
:param lineno: starting line number (optional)

---
## BaseError
```python
from frontend import BaseError
```



---
## OptionError
```python
from frontend import OptionError
```



---
## SetupError
```python
from frontend import SetupError
```



---
## ConfigurationError
```python
from frontend import ConfigurationError
```

Raised for errors in configuration files.

---
## listify_value
```python
from frontend import listify_value
```

Make a list out of an argument.

Values from `distutils` argument parsing are always single strings;
values from `optparse` parsing may be lists of strings that may need
to be further split.

No matter the input, this function returns a flat list of whitespace-trimmed
strings, with `None` values filtered out.

>>> listify_value("foo bar")
['foo', 'bar']
>>> listify_value(["foo bar"])
['foo', 'bar']
>>> listify_value([["foo"], "bar"])
['foo', 'bar']
>>> listify_value([["foo"], ["bar", None, "foo"]])
['foo', 'bar', 'foo']
>>> listify_value("foo, bar, quux", ",")
['foo', 'bar', 'quux']

:param arg: A string or a list of strings
:param split: The argument to pass to `str.split()`.
:return:

---
## CommandMixin
```python
from frontend import CommandMixin
```



---
## CompileCatalog
```python
from frontend import CompileCatalog
```



---
## _make_directory_filter
```python
from frontend import _make_directory_filter
```

Build a directory_filter function based on a list of ignore patterns.

---
## ExtractMessages
```python
from frontend import ExtractMessages
```



---
## InitCatalog
```python
from frontend import InitCatalog
```



---
## UpdateCatalog
```python
from frontend import UpdateCatalog
```



---
## CommandLineInterface
```python
from frontend import CommandLineInterface
```

Command-line interface.

This class provides a simple command-line interface to the message
extraction and PO file generation functionality.

---
## main
```python
from frontend import main
```



---
## parse_mapping
```python
from frontend import parse_mapping
```



---
## parse_mapping_cfg
```python
from frontend import parse_mapping_cfg
```

Parse an extraction method mapping from a file-like object.

:param fileobj: a readable file-like object containing the configuration
                text to parse

---
## _parse_config_object
```python
from frontend import _parse_config_object
```



---
## _parse_mapping_toml
```python
from frontend import _parse_mapping_toml
```

Parse an extraction method mapping from a binary file-like object.

.. warning: As of this version of Babel, this is a private API subject to changes.

:param fileobj: a readable binary file-like object containing the configuration TOML to parse
:param filename: the name of the file being parsed, for error messages
:param style: whether the file is in the style of a `pyproject.toml` file, i.e. whether to look for `tool.babel`.

---
## _parse_spec
```python
from frontend import _parse_spec
```



---
## parse_keywords
```python
from frontend import parse_keywords
```

Parse keywords specifications from the given list of strings.

>>> import pprint
>>> keywords = ['_', 'dgettext:2', 'dngettext:2,3', 'pgettext:1c,2',
...             'polymorphic:1', 'polymorphic:2,2t', 'polymorphic:3c,3t']
>>> pprint.pprint(parse_keywords(keywords))
{'_': None,
 'dgettext': (2,),
 'dngettext': (2, 3),
 'pgettext': ((1, 'c'), 2),
 'polymorphic': {None: (1,), 2: (2,), 3: ((3, 'c'),)}}

The input keywords are in GNU Gettext style; see :doc:`cmdline` for details.

The output is a dictionary mapping keyword names to a dictionary of specifications.
Keys in this dictionary are numbers of arguments, where ``None`` means that all numbers
of arguments are matched, and a number means only calls with that number of arguments
are matched (which happens when using the "t" specifier). However, as a special
case for backwards compatibility, if the dictionary of specifications would
be ``{None: x}``, i.e., there is only one specification and it matches all argument
counts, then it is collapsed into just ``x``.

A specification is either a tuple or None. If a tuple, each element can be either a number
``n``, meaning that the nth argument should be extracted as a message, or the tuple
``(n, 'c')``, meaning that the nth argument should be extracted as context for the
messages. A ``None`` specification is equivalent to ``(1,)``, extracting the first
argument.

---
## __getattr__
```python
from frontend import __getattr__
```



---
## initialize_options
```python
from frontend import initialize_options
```



---
## ensure_finalized
```python
from frontend import ensure_finalized
```



---
## finalize_options
```python
from frontend import finalize_options
```



---
## run
```python
from frontend import run
```

Main entry point of the command-line interface.

:param argv: list of arguments passed on the command-line

---
## _run_domain
```python
from frontend import _run_domain
```



---
## cli_directory_filter
```python
from frontend import cli_directory_filter
```



---
## _build_callback
```python
from frontend import _build_callback
```



---
## _get_mappings
```python
from frontend import _get_mappings
```



---
## _configure_logging
```python
from frontend import _configure_logging
```



---
## _help
```python
from frontend import _help
```



---
## _configure_command
```python
from frontend import _configure_command
```

:type cmdname: str
:type argv: list[str]

---
## callback
```python
from frontend import callback
```



---
## __name__
```python
from mofile import __name__
```

babel.messages.mofile
~~~~~~~~~~~~~~~~~~~~~

Writing of files in the ``gettext`` MO (machine object) format.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## read_mo
```python
from mofile import read_mo
```

Read a binary MO file from the given file-like object and return a
corresponding `Catalog` object.

:param fileobj: the file-like object to read the MO file from

:note: The implementation of this function is heavily based on the
       ``GNUTranslations._parse`` method of the ``gettext`` module in the
       standard library.

---
## write_mo
```python
from mofile import write_mo
```

Write a catalog to the specified file-like object using the GNU MO file
format.

>>> import sys
>>> from babel.messages import Catalog
>>> from gettext import GNUTranslations
>>> from io import BytesIO

>>> catalog = Catalog(locale='en_US')
>>> catalog.add('foo', 'Voh')
<Message ...>
>>> catalog.add((u'bar', u'baz'), (u'Bahr', u'Batz'))
<Message ...>
>>> catalog.add('fuz', 'Futz', flags=['fuzzy'])
<Message ...>
>>> catalog.add('Fizz', '')
<Message ...>
>>> catalog.add(('Fuzz', 'Fuzzes'), ('', ''))
<Message ...>
>>> buf = BytesIO()

>>> write_mo(buf, catalog)
>>> x = buf.seek(0)
>>> translations = GNUTranslations(fp=buf)
>>> if sys.version_info[0] >= 3:
...     translations.ugettext = translations.gettext
...     translations.ungettext = translations.ngettext
>>> translations.ugettext('foo')
u'Voh'
>>> translations.ungettext('bar', 'baz', 1)
u'Bahr'
>>> translations.ungettext('bar', 'baz', 2)
u'Batz'
>>> translations.ugettext('fuz')
u'fuz'
>>> translations.ugettext('Fizz')
u'Fizz'
>>> translations.ugettext('Fuzz')
u'Fuzz'
>>> translations.ugettext('Fuzzes')
u'Fuzzes'

:param fileobj: the file-like object to write to
:param catalog: the `Catalog` instance
:param use_fuzzy: whether translations marked as "fuzzy" should be included
                  in the output

---
## __name__
```python
from plurals import __name__
```

babel.messages.plurals
~~~~~~~~~~~~~~~~~~~~~~

Plural form definitions.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## _PluralTuple
```python
from plurals import _PluralTuple
```

A tuple with plural information.

---
## get_plural
```python
from plurals import get_plural
```

A tuple with the information catalogs need to perform proper
pluralization.  The first item of the tuple is the number of plural
forms, the second the plural expression.

>>> get_plural(locale='en')
(2, '(n != 1)')
>>> get_plural(locale='ga')
(5, '(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4)')

The object returned is a special tuple with additional members:

>>> tup = get_plural("ja")
>>> tup.num_plurals
1
>>> tup.plural_expr
'0'
>>> tup.plural_forms
'nplurals=1; plural=0;'

Converting the tuple into a string prints the plural forms for a
gettext catalog:

>>> str(tup)
'nplurals=1; plural=0;'

---
## __str__
```python
from plurals import __str__
```



---
## __name__
```python
from setuptools_frontend import __name__
```



---
## check_message_extractors
```python
from setuptools_frontend import check_message_extractors
```

Validate the ``message_extractors`` keyword argument to ``setup()``.

:param dist: the distutils/setuptools ``Distribution`` object
:param name: the name of the keyword argument (should always be
             "message_extractors")
:param value: the value of the keyword argument
:raise `DistutilsSetupError`: if the value is not valid

---
## compile_catalog
```python
from setuptools_frontend import compile_catalog
```

Catalog compilation command for use in ``setup.py`` scripts.

If correctly installed, this command is available to Setuptools-using
setup scripts automatically. For projects using plain old ``distutils``,
the command needs to be registered explicitly in ``setup.py``::

    from babel.messages.setuptools_frontend import compile_catalog

    setup(
        ...
        cmdclass = {'compile_catalog': compile_catalog}
    )

.. versionadded:: 0.9

---
## extract_messages
```python
from setuptools_frontend import extract_messages
```

Message extraction command for use in ``setup.py`` scripts.

If correctly installed, this command is available to Setuptools-using
setup scripts automatically. For projects using plain old ``distutils``,
the command needs to be registered explicitly in ``setup.py``::

    from babel.messages.setuptools_frontend import extract_messages

    setup(
        ...
        cmdclass = {'extract_messages': extract_messages}
    )

---
## init_catalog
```python
from setuptools_frontend import init_catalog
```

New catalog initialization command for use in ``setup.py`` scripts.

If correctly installed, this command is available to Setuptools-using
setup scripts automatically. For projects using plain old ``distutils``,
the command needs to be registered explicitly in ``setup.py``::

    from babel.messages.setuptools_frontend import init_catalog

    setup(
        ...
        cmdclass = {'init_catalog': init_catalog}
    )

---
## update_catalog
```python
from setuptools_frontend import update_catalog
```

Catalog merging command for use in ``setup.py`` scripts.

If correctly installed, this command is available to Setuptools-using
setup scripts automatically. For projects using plain old ``distutils``,
the command needs to be registered explicitly in ``setup.py``::

    from babel.messages.setuptools_frontend import update_catalog

    setup(
        ...
        cmdclass = {'update_catalog': update_catalog}
    )

.. versionadded:: 0.9

---
## find_entrypoints
```python
from _compat import find_entrypoints
```

Find entrypoints of a given group using either `importlib.metadata` or the
older `pkg_resources` mechanism.

Yields tuples of the entrypoint name and a callable function that will
load the actual entrypoint.

---
## _strip_comment_tags
```python
from extract import _strip_comment_tags
```

Helper function for `extract` that strips comment tags from strings
in a list of comment lines.  This functions operates in-place.

---
## default_directory_filter
```python
from extract import default_directory_filter
```



---
## extract_from_dir
```python
from extract import extract_from_dir
```

Extract messages from any source files found in the given directory.

This function generates tuples of the form ``(filename, lineno, message,
comments, context)``.

Which extraction method is used per file is determined by the `method_map`
parameter, which maps extended glob patterns to extraction method names.
For example, the following is the default mapping:

>>> method_map = [
...     ('**.py', 'python')
... ]

This basically says that files with the filename extension ".py" at any
level inside the directory should be processed by the "python" extraction
method. Files that don't match any of the mapping patterns are ignored. See
the documentation of the `pathmatch` function for details on the pattern
syntax.

The following extended mapping would also use the "genshi" extraction
method on any file in "templates" subdirectory:

>>> method_map = [
...     ('**/templates/**.*', 'genshi'),
...     ('**.py', 'python')
... ]

The dictionary provided by the optional `options_map` parameter augments
these mappings. It uses extended glob patterns as keys, and the values are
dictionaries mapping options names to option values (both strings).

The glob patterns of the `options_map` do not necessarily need to be the
same as those used in the method mapping. For example, while all files in
the ``templates`` folders in an application may be Genshi applications, the
options for those files may differ based on extension:

>>> options_map = {
...     '**/templates/**.txt': {
...         'template_class': 'genshi.template:TextTemplate',
...         'encoding': 'latin-1'
...     },
...     '**/templates/**.html': {
...         'include_attrs': ''
...     }
... }

:param dirname: the path to the directory to extract messages from.  If
                not given the current working directory is used.
:param method_map: a list of ``(pattern, method)`` tuples that maps of
                   extraction method names to extended glob patterns
:param options_map: a dictionary of additional options (optional)
:param keywords: a dictionary mapping keywords (i.e. names of functions
                 that should be recognized as translation functions) to
                 tuples that specify which of their arguments contain
                 localizable strings
:param comment_tags: a list of tags of translator comments to search for
                     and include in the results
:param callback: a function that is called for every file that message are
                 extracted from, just before the extraction itself is
                 performed; the function is passed the filename, the name
                 of the extraction method and and the options dictionary as
                 positional arguments, in that order
:param strip_comment_tags: a flag that if set to `True` causes all comment
                           tags to be removed from the collected comments.
:param directory_filter: a callback to determine whether a directory should
                         be recursed into. Receives the full directory path;
                         should return True if the directory is valid.
:see: `pathmatch`

---
## check_and_call_extract_file
```python
from extract import check_and_call_extract_file
```

Checks if the given file matches an extraction method mapping, and if so, calls extract_from_file.

Note that the extraction method mappings are based relative to dirpath.
So, given an absolute path to a file `filepath`, we want to check using
just the relative path from `dirpath` to `filepath`.

Yields 5-tuples (filename, lineno, messages, comments, context).

:param filepath: An absolute path to a file that exists.
:param method_map: a list of ``(pattern, method)`` tuples that maps of
                   extraction method names to extended glob patterns
:param options_map: a dictionary of additional options (optional)
:param callback: a function that is called for every file that message are
                 extracted from, just before the extraction itself is
                 performed; the function is passed the filename, the name
                 of the extraction method and and the options dictionary as
                 positional arguments, in that order
:param keywords: a dictionary mapping keywords (i.e. names of functions
                 that should be recognized as translation functions) to
                 tuples that specify which of their arguments contain
                 localizable strings
:param comment_tags: a list of tags of translator comments to search for
                     and include in the results
:param strip_comment_tags: a flag that if set to `True` causes all comment
                           tags to be removed from the collected comments.
:param dirpath: the path to the directory to extract messages from.
:return: iterable of 5-tuples (filename, lineno, messages, comments, context)
:rtype: Iterable[tuple[str, int, str|tuple[str], list[str], str|None]

---
## extract_from_file
```python
from extract import extract_from_file
```

Extract messages from a specific file.

This function returns a list of tuples of the form ``(lineno, message, comments, context)``.

:param filename: the path to the file to extract messages from
:param method: a string specifying the extraction method (.e.g. "python")
:param keywords: a dictionary mapping keywords (i.e. names of functions
                 that should be recognized as translation functions) to
                 tuples that specify which of their arguments contain
                 localizable strings
:param comment_tags: a list of translator tags to search for and include
                     in the results
:param strip_comment_tags: a flag that if set to `True` causes all comment
                           tags to be removed from the collected comments.
:param options: a dictionary of additional options (optional)
:returns: list of tuples of the form ``(lineno, message, comments, context)``
:rtype: list[tuple[int, str|tuple[str], list[str], str|None]

---
## _match_messages_against_spec
```python
from extract import _match_messages_against_spec
```



---
## _find_extractor
```python
from extract import _find_extractor
```



---
## extract_nothing
```python
from extract import extract_nothing
```

Pseudo extractor that does not actually extract anything, but simply
returns an empty list.

---
## extract_python
```python
from extract import extract_python
```

Extract messages from Python source code.

It returns an iterator yielding tuples in the following form ``(lineno,
funcname, message, comments)``.

:param fileobj: the seekable, file-like object the messages should be
                extracted from
:param keywords: a list of keywords (i.e. function names) that should be
                 recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
                     in the results
:param options: a dictionary of additional options (optional)
:rtype: ``iterator``

---
## _parse_python_string
```python
from extract import _parse_python_string
```



---
## extract_javascript
```python
from extract import extract_javascript
```

Extract messages from JavaScript source code.

:param fileobj: the seekable, file-like object the messages should be
                extracted from
:param keywords: a list of keywords (i.e. function names) that should be
                 recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
                     in the results
:param options: a dictionary of additional options (optional)
                Supported options are:
                * `jsx` -- set to false to disable JSX/E4X support.
                * `template_string` -- if `True`, supports gettext(`key`)
                * `parse_template_string` -- if `True` will parse the
                                             contents of javascript
                                             template strings.
:param lineno: line number offset (for parsing embedded fragments)

---
## parse_template_string
```python
from extract import parse_template_string
```

Parse JavaScript template string.

:param template_string: the template string to be parsed
:param keywords: a list of keywords (i.e. function names) that should be
                 recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
                     in the results
:param options: a dictionary of additional options (optional)
:param lineno: starting line number (optional)

---
## _PyOptions
```python
from extract import _PyOptions
```



---
## _JSOptions
```python
from extract import _JSOptions
```



---
## _FileObj
```python
from extract import _FileObj
```



---
## _strip
```python
from extract import _strip
```



---
## seek
```python
from extract import seek
```



---
## tell
```python
from extract import tell
```



---
## __name__
```python
from _win32 import __name__
```



---
## valuestodict
```python
from _win32 import valuestodict
```

Convert a registry key's values to a dictionary.

---
## get_localzone_name
```python
from _win32 import get_localzone_name
```



---
## _get_localzone
```python
from _win32 import _get_localzone
```



---
## get_localzone
```python
from __init__ import get_localzone
```

Returns the current underlying local timezone object.
Generally this function does not need to be used, it's a
better idea to use the :data:`LOCALTZ` singleton instead.

---
## _tz_from_env
```python
from _unix import _tz_from_env
```



---
## _get_localzone
```python
from _unix import _get_localzone
```

Tries to find the local timezone configuration.
This method prefers finding the timezone name and passing that to
zoneinfo or pytz, over passing in the localtime file, as in the later
case the zoneinfo name is unknown.
The parameter _root makes the function look for files like /etc/localtime
beneath the _root directory. This is primarily used by the tests.
In normal usage you call the function without parameters.

---
## __name__
```python
from _fallback import __name__
```

babel.localtime._fallback
~~~~~~~~~~~~~~~~~~~~~~~~~

Emulated fallback local timezone when all else fails.

:copyright: (c) 2013-2024 by the Babel Team.
:license: BSD, see LICENSE for more details.

---
## _FallbackLocalTimezone
```python
from _fallback import _FallbackLocalTimezone
```



---
## utcoffset
```python
from _fallback import utcoffset
```



---
## dst
```python
from _fallback import dst
```



---
## tzname
```python
from _fallback import tzname
```



---
## _isdst
```python
from _fallback import _isdst
```



---
## _get_tzinfo
```python
from _helpers import _get_tzinfo
```

Get the tzinfo from `zoneinfo` or `pytz`

:param tzenv: timezone in the form of Continent/City
:return: tzinfo object or None if not found

---
## _get_tzinfo_or_raise
```python
from _helpers import _get_tzinfo_or_raise
```



---
## _get_tzinfo_from_file
```python
from _helpers import _get_tzinfo_from_file
```



---
## __name__
```python
from test_dimension_scales import __name__
```



---
## BaseDataset
```python
from test_dimension_scales import BaseDataset
```

data is a 3-dimensional dataset with dimensions [z, y, x]

The z dimension is labeled. It does not have any attached scales.
The y dimension is not labeled. It has one attached scale.
The x dimension is labeled. It has two attached scales.

data2 is a 3-dimensional dataset with no associated dimension scales.

---
## TestH5DSBindings
```python
from test_dimension_scales import TestH5DSBindings
```

Feature: Datasets can be created from existing data

---
## TestDimensionManager
```python
from test_dimension_scales import TestDimensionManager
```



---
## TestDimensionsHighLevel
```python
from test_dimension_scales import TestDimensionsHighLevel
```



---
## setUp
```python
from test_dimension_scales import setUp
```



---
## tearDown
```python
from test_dimension_scales import tearDown
```



---
## test_create_dimensionscale
```python
from test_dimension_scales import test_create_dimensionscale
```

Create a dimension scale from existing dataset 

---
## test_attach_dimensionscale
```python
from test_dimension_scales import test_attach_dimensionscale
```



---
## test_detach_dimensionscale
```python
from test_dimension_scales import test_detach_dimensionscale
```



---
## test_label_dimensionscale
```python
from test_dimension_scales import test_label_dimensionscale
```



---
## test_iter_dimensionscales
```python
from test_dimension_scales import test_iter_dimensionscales
```



---
## test_make_scale
```python
from test_dimension_scales import test_make_scale
```



---
## test_get_dimension
```python
from test_dimension_scales import test_get_dimension
```



---
## test_len
```python
from test_dimension_scales import test_len
```



---
## test_iter
```python
from test_dimension_scales import test_iter
```



---
## test_repr
```python
from test_dimension_scales import test_repr
```



---
## test_get_label
```python
from test_dimension_scales import test_get_label
```



---
## test_set_label
```python
from test_dimension_scales import test_set_label
```



---
## test_detach_scale
```python
from test_dimension_scales import test_detach_scale
```



---
## test_attach_scale
```python
from test_dimension_scales import test_attach_scale
```



---
## test_get_dimension_scale
```python
from test_dimension_scales import test_get_dimension_scale
```



---
## test_get_items
```python
from test_dimension_scales import test_get_items
```



---
## test_get_keys
```python
from test_dimension_scales import test_get_keys
```



---
## test_get_values
```python
from test_dimension_scales import test_get_values
```



---
## test_attributes
```python
from test_dimension_scales import test_attributes
```



---
## test_is_scale
```python
from test_dimension_scales import test_is_scale
```

Test Dataset.is_scale property

---
## func
```python
from test_dimension_scales import func
```



---
## __name__
```python
from test_attribute_create import __name__
```

Tests the h5py.AttributeManager.create() method.

---
## TestArray
```python
from test_attribute_create import TestArray
```

Check that top-level array types can be created and read.

---
## test_int
```python
from test_attribute_create import test_int
```



---
## test_string_dtype
```python
from test_attribute_create import test_string_dtype
```



---
## test_str
```python
from test_attribute_create import test_str
```



---
## test_tuple_of_unicode
```python
from test_attribute_create import test_tuple_of_unicode
```



---
## test_shape
```python
from test_attribute_create import test_shape
```



---
## test_dtype
```python
from test_attribute_create import test_dtype
```



---
## test_key_type
```python
from test_attribute_create import test_key_type
```



---
## __name__
```python
from test_file_image import __name__
```



---
## TestFileImage
```python
from test_file_image import TestFileImage
```



---
## test_load_from_image
```python
from test_file_image import test_load_from_image
```



---
## test_open_from_image
```python
from test_file_image import test_open_from_image
```



---
## writable_file
```python
from conftest import writable_file
```



---
## __name__
```python
from test_h5d_direct_chunk import __name__
```



---
## TestWriteDirectChunk
```python
from test_h5d_direct_chunk import TestWriteDirectChunk
```



---
## TestReadDirectChunk
```python
from test_h5d_direct_chunk import TestReadDirectChunk
```



---
## TestReadDirectChunkToOut
```python
from test_h5d_direct_chunk import TestReadDirectChunkToOut
```



---
## test_write_direct_chunk
```python
from test_h5d_direct_chunk import test_write_direct_chunk
```



---
## test_read_compressed_offsets
```python
from test_h5d_direct_chunk import test_read_compressed_offsets
```



---
## test_read_uncompressed_offsets
```python
from test_h5d_direct_chunk import test_read_uncompressed_offsets
```



---
## test_read_write_chunk
```python
from test_h5d_direct_chunk import test_read_write_chunk
```



---
## test_uncompressed_data
```python
from test_h5d_direct_chunk import test_uncompressed_data
```



---
## test_compressed_data
```python
from test_h5d_direct_chunk import test_compressed_data
```



---
## test_fail_buffer_too_small
```python
from test_h5d_direct_chunk import test_fail_buffer_too_small
```



---
## test_fail_buffer_readonly
```python
from test_h5d_direct_chunk import test_fail_buffer_readonly
```



---
## test_fail_buffer_not_contiguous
```python
from test_h5d_direct_chunk import test_fail_buffer_not_contiguous
```



---
## __name__
```python
from test_h5f import __name__
```



---
## TestFileID
```python
from test_h5f import TestFileID
```



---
## TestCacheConfig
```python
from test_h5f import TestCacheConfig
```



---
## TestVlenData
```python
from test_h5f import TestVlenData
```



---
## test_descriptor_core
```python
from test_h5f import test_descriptor_core
```



---
## test_descriptor_sec2
```python
from test_h5f import test_descriptor_sec2
```



---
## test_descriptor_direct
```python
from test_h5f import test_descriptor_direct
```



---
## test_simple_gets
```python
from test_h5f import test_simple_gets
```



---
## test_hitrate_reset
```python
from test_h5f import test_hitrate_reset
```



---
## test_mdc_config_get
```python
from test_h5f import test_mdc_config_get
```



---
## test_vlen_strings
```python
from test_h5f import test_vlen_strings
```



---
## __name__
```python
from test_dataset_getitem import __name__
```

Tests the h5py.Dataset.__getitem__ method.

This module does not specifically test type conversion.  The "type" axis
therefore only tests objects which interact with the slicing system in
unreliable ways; for example, compound and array types.

See test_dataset_getitem_types for type-conversion tests.

Tests are organized into TestCases by dataset shape and type.  Test
methods vary by slicing arg type.

1. Dataset shape:
    Empty
    Scalar
    1D
    3D

2. Type:
    Float
    Compound
    Array

3. Slicing arg types:
    Ellipsis
    Empty tuple
    Regular slice
    MultiBlockSlice
    Indexing
    Index list
    Boolean mask
    Field names

---
## TestEmpty
```python
from test_dataset_getitem import TestEmpty
```



---
## TestScalarFloat
```python
from test_dataset_getitem import TestScalarFloat
```



---
## TestScalarCompound
```python
from test_dataset_getitem import TestScalarCompound
```



---
## TestScalarArray
```python
from test_dataset_getitem import TestScalarArray
```



---
## Test1DZeroFloat
```python
from test_dataset_getitem import Test1DZeroFloat
```



---
## Test1DFloat
```python
from test_dataset_getitem import Test1DFloat
```



---
## Test2DZeroFloat
```python
from test_dataset_getitem import Test2DZeroFloat
```



---
## Test2DFloat
```python
from test_dataset_getitem import Test2DFloat
```



---
## TestVeryLargeArray
```python
from test_dataset_getitem import TestVeryLargeArray
```



---
## test_read_no_fill_value
```python
from test_dataset_getitem import test_read_no_fill_value
```



---
## TestBoolIndex
```python
from test_dataset_getitem import TestBoolIndex
```

Tests for indexing with Boolean arrays

---
## setUp
```python
from test_dataset_getitem import setUp
```



---
## test_ndim
```python
from test_dataset_getitem import test_ndim
```

Verify number of dimensions 

---
## test_shape
```python
from test_dataset_getitem import test_shape
```

Verify shape 

---
## test_size
```python
from test_dataset_getitem import test_size
```



---
## test_nbytes
```python
from test_dataset_getitem import test_nbytes
```

Verify nbytes 

---
## test_ellipsis
```python
from test_dataset_getitem import test_ellipsis
```



---
## test_tuple
```python
from test_dataset_getitem import test_tuple
```



---
## test_slice
```python
from test_dataset_getitem import test_slice
```

slice -> ndarray of shape (0,) 

---
## test_multi_block_slice
```python
from test_dataset_getitem import test_multi_block_slice
```

MultiBlockSlice -> ValueError 

---
## test_index
```python
from test_dataset_getitem import test_index
```

index -> out of range 

---
## test_indexlist
```python
from test_dataset_getitem import test_indexlist
```

see issue #473 

---
## test_mask
```python
from test_dataset_getitem import test_mask
```

mask -> ndarray of matching shape 

---
## test_fieldnames
```python
from test_dataset_getitem import test_fieldnames
```

field name -> ValueError (no fields) 

---
## test_slice_stop_less_than_start
```python
from test_dataset_getitem import test_slice_stop_less_than_start
```



---
## test_slice_simple
```python
from test_dataset_getitem import test_slice_simple
```



---
## test_slice_zerosize
```python
from test_dataset_getitem import test_slice_zerosize
```



---
## test_slice_strides
```python
from test_dataset_getitem import test_slice_strides
```



---
## test_slice_negindexes
```python
from test_dataset_getitem import test_slice_negindexes
```



---
## test_slice_outofrange
```python
from test_dataset_getitem import test_slice_outofrange
```



---
## test_slice_backwards
```python
from test_dataset_getitem import test_slice_backwards
```

we disallow negative steps 

---
## test_slice_zerostride
```python
from test_dataset_getitem import test_slice_zerostride
```



---
## test_index_simple
```python
from test_dataset_getitem import test_index_simple
```



---
## test_index_neg
```python
from test_dataset_getitem import test_index_neg
```



---
## test_index_none
```python
from test_dataset_getitem import test_index_none
```



---
## test_index_illegal
```python
from test_dataset_getitem import test_index_illegal
```

Illegal slicing argument 

---
## test_index_outofrange
```python
from test_dataset_getitem import test_index_outofrange
```



---
## test_indexlist_simple
```python
from test_dataset_getitem import test_indexlist_simple
```



---
## test_indexlist_numpyarray
```python
from test_dataset_getitem import test_indexlist_numpyarray
```



---
## test_indexlist_single_index_ellipsis
```python
from test_dataset_getitem import test_indexlist_single_index_ellipsis
```



---
## test_indexlist_numpyarray_single_index_ellipsis
```python
from test_dataset_getitem import test_indexlist_numpyarray_single_index_ellipsis
```



---
## test_indexlist_numpyarray_ellipsis
```python
from test_dataset_getitem import test_indexlist_numpyarray_ellipsis
```



---
## test_indexlist_empty
```python
from test_dataset_getitem import test_indexlist_empty
```



---
## test_indexlist_outofrange
```python
from test_dataset_getitem import test_indexlist_outofrange
```



---
## test_indexlist_nonmonotonic
```python
from test_dataset_getitem import test_indexlist_nonmonotonic
```

we require index list values to be strictly increasing 

---
## test_indexlist_monotonic_negative
```python
from test_dataset_getitem import test_indexlist_monotonic_negative
```



---
## test_indexlist_repeated
```python
from test_dataset_getitem import test_indexlist_repeated
```

we forbid repeated index values 

---
## test_mask_true
```python
from test_dataset_getitem import test_mask_true
```



---
## test_mask_false
```python
from test_dataset_getitem import test_mask_false
```



---
## test_mask_partial
```python
from test_dataset_getitem import test_mask_partial
```



---
## test_mask_wrongsize
```python
from test_dataset_getitem import test_mask_wrongsize
```

we require the boolean mask shape to match exactly 

---
## test_index_emptylist
```python
from test_dataset_getitem import test_index_emptylist
```



---
## test_select_first_axis
```python
from test_dataset_getitem import test_select_first_axis
```



---
## test_wrong_size
```python
from test_dataset_getitem import test_wrong_size
```



---
## __name__
```python
from test_h5z import __name__
```



---
## H5ZClass2T
```python
from test_h5z import H5ZClass2T
```

H5Z_class2_t structure defining a filter

---
## test_register_filter
```python
from test_h5z import test_register_filter
```



---
## test_unregister_filter
```python
from test_h5z import test_unregister_filter
```



---
## failing_filter_callback
```python
from test_h5z import failing_filter_callback
```



---
## __name__
```python
from test_group import __name__
```

Group test module.

Tests all methods and properties of Group objects, with the following
exceptions:

1. Method create_dataset is tested in module test_dataset

---
## BaseGroup
```python
from test_group import BaseGroup
```



---
## TestCreate
```python
from test_group import TestCreate
```

Feature: New groups can be created via .create_group method

---
## TestDatasetAssignment
```python
from test_group import TestDatasetAssignment
```

Feature: Datasets can be created by direct assignment of data

---
## TestDtypeAssignment
```python
from test_group import TestDtypeAssignment
```

Feature: Named types can be created by direct assignment of dtypes

---
## TestRequire
```python
from test_group import TestRequire
```

Feature: Groups can be auto-created, or opened via .require_group

---
## TestDelete
```python
from test_group import TestDelete
```

Feature: Objects can be unlinked via "del" operator

---
## TestOpen
```python
from test_group import TestOpen
```

Feature: Objects can be opened via indexing syntax obj[name]

---
## TestRepr
```python
from test_group import TestRepr
```

Opened and closed groups provide a useful __repr__ string

---
## BaseMapping
```python
from test_group import BaseMapping
```

Base class for mapping tests

---
## TestLen
```python
from test_group import TestLen
```

Feature: The Python len() function returns the number of groups

---
## TestContains
```python
from test_group import TestContains
```

Feature: The Python "in" builtin tests for membership

---
## TestIter
```python
from test_group import TestIter
```

Feature: You can iterate over group members via "for x in y", etc.

---
## TestTrackOrder
```python
from test_group import TestTrackOrder
```



---
## TestPy3Dict
```python
from test_group import TestPy3Dict
```



---
## TestAdditionalMappingFuncs
```python
from test_group import TestAdditionalMappingFuncs
```

Feature: Other dict methods (pop, pop_item, clear, update, setdefault) are
available.

---
## TestGet
```python
from test_group import TestGet
```

Feature: The .get method allows access to objects and metadata

---
## TestVisit
```python
from test_group import TestVisit
```

Feature: The .visit and .visititems methods allow iterative access to
group and subgroup members

---
## TestVisitLinks
```python
from test_group import TestVisitLinks
```

Feature: The .visit_links and .visititems_links methods allow iterative access to
links contained in the group and its subgroups.

---
## TestSoftLinks
```python
from test_group import TestSoftLinks
```

Feature: Create and manage soft links with the high-level interface

---
## TestExternalLinks
```python
from test_group import TestExternalLinks
```

Feature: Create and manage external links

---
## TestExtLinkBugs
```python
from test_group import TestExtLinkBugs
```

Bugs: Specific regressions for external links

---
## TestCopy
```python
from test_group import TestCopy
```



---
## TestMove
```python
from test_group import TestMove
```

Feature: Group.move moves links in a file

---
## TestMutableMapping
```python
from test_group import TestMutableMapping
```

Tests if the registration of Group as a MutableMapping
behaves as expected

---
## setUp
```python
from test_group import setUp
```



---
## tearDown
```python
from test_group import tearDown
```



---
## test_create
```python
from test_group import test_create
```

Creating external links 

---
## test_create_intermediate
```python
from test_group import test_create_intermediate
```

Intermediate groups can be created automatically 

---
## test_create_exception
```python
from test_group import test_create_exception
```

Name conflict causes group creation to fail with ValueError 

---
## test_unicode
```python
from test_group import test_unicode
```

Unicode names are correctly stored 

---
## test_unicode_default
```python
from test_group import test_unicode_default
```

Unicode names convertible to ASCII are stored as ASCII (issue 239)
        

---
## test_type
```python
from test_group import test_type
```

Names should be strings or bytes 

---
## test_appropriate_low_level_id
```python
from test_group import test_appropriate_low_level_id
```

Binding a group to a non-group identifier fails with ValueError 

---
## test_ndarray
```python
from test_group import test_ndarray
```

Dataset auto-creation by direct assignment 

---
## test_name_bytes
```python
from test_group import test_name_bytes
```

Named type creation 

---
## test_dtype
```python
from test_group import test_dtype
```

Named type creation 

---
## test_open_existing
```python
from test_group import test_open_existing
```

Existing group is opened and returned 

---
## test_require_exception
```python
from test_group import test_require_exception
```

Opening conflicting object results in TypeError 

---
## test_intermediate_create_dataset
```python
from test_group import test_intermediate_create_dataset
```

Intermediate is created if it doesn't exist 

---
## test_intermediate_create_group
```python
from test_group import test_intermediate_create_group
```



---
## test_require_shape
```python
from test_group import test_require_shape
```



---
## test_delete
```python
from test_group import test_delete
```

Object deletion via "del" 

---
## test_nonexisting
```python
from test_group import test_nonexisting
```

Deleting non-existent object raises KeyError 

---
## test_readonly_delete_exception
```python
from test_group import test_readonly_delete_exception
```

Deleting object in readonly file raises KeyError 

---
## test_open
```python
from test_group import test_open
```

Simple obj[name] opening 

---
## test_nonexistent
```python
from test_group import test_nonexistent
```

Opening missing objects raises KeyError 

---
## test_reference
```python
from test_group import test_reference
```

Objects can be opened by HDF5 object reference 

---
## test_reference_numpyobj
```python
from test_group import test_reference_numpyobj
```

Object can be opened by numpy.object_ containing object ref

Test for issue 181, issue 202.

---
## test_invalid_ref
```python
from test_group import test_invalid_ref
```

Invalid region references should raise an exception 

---
## test_path_type_validation
```python
from test_group import test_path_type_validation
```

Access with non bytes or str types should raise an exception 

---
## test_repr
```python
from test_group import test_repr
```

Opened and closed groups provide a useful __repr__ string 

---
## test_len
```python
from test_group import test_len
```

len() returns number of group members 

---
## test_contains
```python
from test_group import test_contains
```

"in" builtin works for membership (byte and Unicode) 

---
## test_exc
```python
from test_group import test_exc
```

KeyError raised when attempting to open broken link 

---
## test_empty
```python
from test_group import test_empty
```

Empty strings work properly and aren't contained 

---
## test_dot
```python
from test_group import test_dot
```

Current group "." is always contained 

---
## test_root
```python
from test_group import test_root
```

Root group (by itself) is contained 

---
## test_trailing_slash
```python
from test_group import test_trailing_slash
```

Trailing slashes are unconditionally ignored 

---
## test_softlinks
```python
from test_group import test_softlinks
```

Broken softlinks are contained, but their members are not 

---
## test_oddball_paths
```python
from test_group import test_oddball_paths
```

Technically legitimate (but odd-looking) paths 

---
## test_iter
```python
from test_group import test_iter
```

"for x in y" iteration 

---
## test_iter_zero
```python
from test_group import test_iter_zero
```

Iteration works properly for the case with no group members 

---
## populate
```python
from test_group import populate
```



---
## test_track_order
```python
from test_group import test_track_order
```



---
## test_no_track_order
```python
from test_group import test_no_track_order
```



---
## test_keys
```python
from test_group import test_keys
```

.keys provides a key view 

---
## test_values
```python
from test_group import test_values
```

.values provides a value view 

---
## test_items
```python
from test_group import test_items
```

.items provides an item view 

---
## test_pop_item
```python
from test_group import test_pop_item
```

.pop_item exists and removes item

---
## test_pop
```python
from test_group import test_pop
```

.pop exists and removes specified item

---
## test_pop_default
```python
from test_group import test_pop_default
```

.pop falls back to default

---
## test_pop_raises
```python
from test_group import test_pop_raises
```

.pop raises KeyError for non-existence

---
## test_clear
```python
from test_group import test_clear
```

.clear removes groups

---
## test_update_dict
```python
from test_group import test_update_dict
```

.update works with dict

---
## test_update_iter
```python
from test_group import test_update_iter
```

.update works with list

---
## test_update_kwargs
```python
from test_group import test_update_kwargs
```

.update works with kwargs

---
## test_setdefault
```python
from test_group import test_setdefault
```

.setdefault gets group if it exists

---
## test_setdefault_with_default
```python
from test_group import test_setdefault_with_default
```

.setdefault gets default if group doesn't exist

---
## test_setdefault_no_default
```python
from test_group import test_setdefault_no_default
```

.setdefault gets None if group doesn't exist, but as None isn't defined
as data for a dataset, this should raise a TypeError.

---
## test_get_default
```python
from test_group import test_get_default
```

Object is returned, or default if it doesn't exist 

---
## test_get_class
```python
from test_group import test_get_class
```

Object class is returned with getclass option 

---
## test_get_link_class
```python
from test_group import test_get_link_class
```

Get link classes 

---
## test_get_link
```python
from test_group import test_get_link
```

Get link values 

---
## test_visit
```python
from test_group import test_visit
```

All subgroups are visited 

---
## test_visititems
```python
from test_group import test_visititems
```

All links are visited 

---
## test_bailout
```python
from test_group import test_bailout
```

Returning a non-None value immediately aborts iteration 

---
## test_visit_links
```python
from test_group import test_visit_links
```

All subgroups and links are visited 

---
## test_spath
```python
from test_group import test_spath
```

SoftLink path attribute 

---
## test_srepr
```python
from test_group import test_srepr
```

SoftLink path repr 

---
## test_epath
```python
from test_group import test_epath
```

External link paths attributes 

---
## test_erepr
```python
from test_group import test_erepr
```

External link repr 

---
## test_exc_missingfile
```python
from test_group import test_exc_missingfile
```

KeyError raised when attempting to open missing file 

---
## test_close_file
```python
from test_group import test_close_file
```

Files opened by accessing external links can be closed

Issue 189.

---
## test_unicode_encode
```python
from test_group import test_unicode_encode
```

Check that external links encode unicode filenames properly
Testing issue #732

---
## test_unicode_decode
```python
from test_group import test_unicode_decode
```

Check that external links decode unicode filenames properly
Testing issue #732

---
## test_unicode_hdf5_path
```python
from test_group import test_unicode_hdf5_path
```

Check that external links handle unicode hdf5 paths properly
Testing issue #333

---
## test_issue_212
```python
from test_group import test_issue_212
```

Issue 212

Fails with:

AttributeError: 'SharedConfig' object has no attribute 'lapl'

---
## test_copy_path_to_path
```python
from test_group import test_copy_path_to_path
```



---
## test_copy_path_to_group
```python
from test_group import test_copy_path_to_group
```



---
## test_copy_group_to_path
```python
from test_group import test_copy_group_to_path
```



---
## test_copy_group_to_group
```python
from test_group import test_copy_group_to_group
```



---
## test_copy_dataset
```python
from test_group import test_copy_dataset
```



---
## test_copy_shallow
```python
from test_group import test_copy_shallow
```



---
## test_copy_without_attributes
```python
from test_group import test_copy_without_attributes
```



---
## test_copy_soft_links
```python
from test_group import test_copy_soft_links
```



---
## test_copy_external_links
```python
from test_group import test_copy_external_links
```



---
## test_copy_refs
```python
from test_group import test_copy_refs
```



---
## test_move_hardlink
```python
from test_group import test_move_hardlink
```

Moving an object 

---
## test_move_softlink
```python
from test_group import test_move_softlink
```

Moving a soft link 

---
## test_move_conflict
```python
from test_group import test_move_conflict
```

Move conflict raises ValueError 

---
## test_short_circuit
```python
from test_group import test_short_circuit
```

Test that a null-move works 

---
## test_resolution
```python
from test_group import test_resolution
```



---
## test_validity
```python
from test_group import test_validity
```

Test that the required functions are implemented.

---
## closer
```python
from test_group import closer
```



---
## w
```python
from test_group import w
```



---
## __name__
```python
from test_errors import __name__
```



---
## _access_not_existing_object
```python
from test_errors import _access_not_existing_object
```

Create a file and access not existing key

---
## test_unsilence_errors
```python
from test_errors import test_unsilence_errors
```

Check that HDF5 errors can be muted/unmuted from h5py

---
## test_thread_hdf5_silence_error_membership
```python
from test_errors import test_thread_hdf5_silence_error_membership
```

Verify the error printing is squashed in all threads.

No console messages should be shown from membership tests

---
## test_thread_hdf5_silence_error_attr
```python
from test_errors import test_thread_hdf5_silence_error_attr
```

Verify the error printing is squashed in all threads.

No console messages should be shown for non-existing attributes

---
## test
```python
from test_errors import test
```



---
## __name__
```python
from test_dataset_swmr import __name__
```



---
## TestDatasetSwmrRead
```python
from test_dataset_swmr import TestDatasetSwmrRead
```

Testing SWMR functions when reading a dataset.
Skip this test if the HDF5 library does not have the SWMR features.

---
## TestDatasetSwmrWrite
```python
from test_dataset_swmr import TestDatasetSwmrWrite
```

Testing SWMR functions when reading a dataset.
Skip this test if the HDF5 library does not have the SWMR features.

---
## setUp
```python
from test_dataset_swmr import setUp
```

First setup a file with a small chunked and empty dataset.
No data written yet.

---
## test_initial_swmr_mode_on
```python
from test_dataset_swmr import test_initial_swmr_mode_on
```

Verify that the file is initially in SWMR mode

---
## test_read_data
```python
from test_dataset_swmr import test_read_data
```



---
## test_refresh
```python
from test_dataset_swmr import test_refresh
```



---
## test_force_swmr_mode_on_raises
```python
from test_dataset_swmr import test_force_swmr_mode_on_raises
```

Verify when reading a file cannot be forcibly switched to swmr mode.
When reading with SWMR the file must be opened with swmr=True.

---
## test_force_swmr_mode_off_raises
```python
from test_dataset_swmr import test_force_swmr_mode_off_raises
```

Switching SWMR write mode off is only possible by closing the file.
Attempts to forcibly switch off the SWMR mode should raise a ValueError.

---
## test_initial_swmr_mode_off
```python
from test_dataset_swmr import test_initial_swmr_mode_off
```

Verify that the file is not initially in SWMR mode

---
## test_switch_swmr_mode_on
```python
from test_dataset_swmr import test_switch_swmr_mode_on
```

Switch to SWMR mode and verify 

---
## test_switch_swmr_mode_off_raises
```python
from test_dataset_swmr import test_switch_swmr_mode_off_raises
```

Switching SWMR write mode off is only possible by closing the file.
Attempts to forcibly switch off the SWMR mode should raise a ValueError.

---
## test_extend_dset
```python
from test_dataset_swmr import test_extend_dset
```

Extend and flush a SWMR dataset
        

---
## test_extend_dset_multiple
```python
from test_dataset_swmr import test_extend_dset_multiple
```



---
## __name__
```python
from test_slicing import __name__
```

Dataset slicing test module.

Tests all supported slicing operations, including read/write and
broadcasting operations.  Does not test type conversion except for
corner cases overlapping with slicing; for example, when selecting
specific fields of a compound type.

---
## BaseSlicing
```python
from test_slicing import BaseSlicing
```



---
## TestSingleElement
```python
from test_slicing import TestSingleElement
```

Feature: Retrieving a single element works with NumPy semantics

---
## TestObjectIndex
```python
from test_slicing import TestObjectIndex
```

Feature: numpy.object_ subtypes map to real Python objects

---
## TestSimpleSlicing
```python
from test_slicing import TestSimpleSlicing
```

Feature: Simple NumPy-style slices (start:stop:step) are supported.

---
## TestArraySlicing
```python
from test_slicing import TestArraySlicing
```

Feature: Array types are handled appropriately

---
## TestZeroLengthSlicing
```python
from test_slicing import TestZeroLengthSlicing
```

Slices resulting in empty arrays

---
## TestFieldNames
```python
from test_slicing import TestFieldNames
```

Field names for read & write

---
## TestMultiBlockSlice
```python
from test_slicing import TestMultiBlockSlice
```



---
## setUp
```python
from test_slicing import setUp
```



---
## tearDown
```python
from test_slicing import tearDown
```



---
## test_single_index
```python
from test_slicing import test_single_index
```

Single-element selection with [index] yields array scalar 

---
## test_single_null
```python
from test_slicing import test_single_null
```

Single-element selection with [()] yields ndarray 

---
## test_scalar_index
```python
from test_slicing import test_scalar_index
```

Slicing with [...] yields scalar ndarray 

---
## test_scalar_null
```python
from test_slicing import test_scalar_null
```

Slicing with [()] yields array scalar 

---
## test_compound
```python
from test_slicing import test_compound
```

Compound scalar is numpy.void, not tuple (issue 135) 

---
## test_reference
```python
from test_slicing import test_reference
```

Indexing a reference dataset returns a h5py.Reference instance 

---
## test_regref
```python
from test_slicing import test_regref
```

Indexing a region reference dataset returns a h5py.RegionReference
        

---
## test_reference_field
```python
from test_slicing import test_reference_field
```

Compound types of which a reference is an element work right 

---
## test_scalar
```python
from test_slicing import test_scalar
```

Indexing returns a real Python object on scalar datasets 

---
## test_bytestr
```python
from test_slicing import test_bytestr
```

Indexing a byte string dataset returns a real python byte string
        

---
## test_negative_stop
```python
from test_slicing import test_negative_stop
```

Negative stop indexes work as they do in NumPy 

---
## test_write
```python
from test_slicing import test_write
```

Test write with field selections 

---
## test_read
```python
from test_slicing import test_read
```

Test read with field selections 

---
## test_write_broadcast
```python
from test_slicing import test_write_broadcast
```

Array fill from constant is not supported (issue 211).
        

---
## test_write_element
```python
from test_slicing import test_write_element
```

Write a single element to the array

Issue 211.

---
## test_write_slices
```python
from test_slicing import test_write_slices
```

Write slices to array type 

---
## test_roundtrip
```python
from test_slicing import test_roundtrip
```

Read the contents of an array and write them back

Issue 211.

---
## test_slice_zero_length_dimension
```python
from test_slicing import test_slice_zero_length_dimension
```

Slice a dataset with a zero in its shape vector
along the zero-length dimension 

---
## test_slice_other_dimension
```python
from test_slicing import test_slice_other_dimension
```

Slice a dataset with a zero in its shape vector
along a non-zero-length dimension 

---
## test_slice_of_length_zero
```python
from test_slicing import test_slice_of_length_zero
```

Get a slice of length zero from a non-empty dataset 

---
## test_unicode_names
```python
from test_slicing import test_unicode_names
```

Unicode field names for for read and write 

---
## test_write_noncompound
```python
from test_slicing import test_write_noncompound
```

Test write with non-compound source (single-field) 

---
## test_default
```python
from test_slicing import test_default
```



---
## test_default_explicit
```python
from test_slicing import test_default_explicit
```



---
## test_start
```python
from test_slicing import test_start
```



---
## test_count
```python
from test_slicing import test_count
```



---
## test_count_more_than_length_error
```python
from test_slicing import test_count_more_than_length_error
```



---
## test_stride
```python
from test_slicing import test_stride
```



---
## test_stride_zero_error
```python
from test_slicing import test_stride_zero_error
```



---
## test_stride_block_equal
```python
from test_slicing import test_stride_block_equal
```



---
## test_block_more_than_stride_error
```python
from test_slicing import test_block_more_than_stride_error
```



---
## test_stride_more_than_block
```python
from test_slicing import test_stride_more_than_block
```



---
## test_block_overruns_extent_error
```python
from test_slicing import test_block_overruns_extent_error
```



---
## test_fully_described
```python
from test_slicing import test_fully_described
```



---
## test_count_calculated
```python
from test_slicing import test_count_calculated
```



---
## test_zero_count_calculated_error
```python
from test_slicing import test_zero_count_calculated_error
```



---
## __name__
```python
from test_h5pl import __name__
```



---
## test_default
```python
from test_h5pl import test_default
```



---
## test_append
```python
from test_h5pl import test_append
```



---
## test_prepend
```python
from test_h5pl import test_prepend
```



---
## test_insert
```python
from test_h5pl import test_insert
```



---
## test_replace
```python
from test_h5pl import test_replace
```



---
## test_remove
```python
from test_h5pl import test_remove
```



---
## __name__
```python
from test_attrs import __name__
```

Attributes testing module

Covers all operations which access the .attrs property, with the
exception of data read/write and type conversion.  Those operations
are tested by module test_attrs_data.

---
## BaseAttrs
```python
from test_attrs import BaseAttrs
```



---
## TestRepr
```python
from test_attrs import TestRepr
```

Feature: AttributeManager provide a helpful
__repr__ string

---
## TestAccess
```python
from test_attrs import TestAccess
```

Feature: Attribute creation/retrieval via special methods

---
## TestDelete
```python
from test_attrs import TestDelete
```

Feature: Deletion of attributes using __delitem__

---
## TestUnicode
```python
from test_attrs import TestUnicode
```

Feature: Attributes can be accessed via Unicode or byte strings

---
## TestCreate
```python
from test_attrs import TestCreate
```

Options for explicit attribute creation

---
## TestMutableMapping
```python
from test_attrs import TestMutableMapping
```

Tests if the registration of AttributeManager as a MutableMapping
behaves as expected

---
## TestVlen
```python
from test_attrs import TestVlen
```



---
## TestTrackOrder
```python
from test_attrs import TestTrackOrder
```



---
## TestDatatype
```python
from test_attrs import TestDatatype
```



---
## test_python_int_uint64
```python
from test_attrs import test_python_int_uint64
```



---
## setUp
```python
from test_attrs import setUp
```



---
## tearDown
```python
from test_attrs import tearDown
```



---
## test_repr
```python
from test_attrs import test_repr
```



---
## test_create
```python
from test_attrs import test_create
```

Attribute creation by direct assignment 

---
## test_create_2
```python
from test_attrs import test_create_2
```

Attribute creation by create() method 

---
## test_modify
```python
from test_attrs import test_modify
```

Attributes are modified by direct assignment

---
## test_modify_2
```python
from test_attrs import test_modify_2
```

Attributes are modified by modify() method 

---
## test_overwrite
```python
from test_attrs import test_overwrite
```

Attributes are silently overwritten 

---
## test_rank
```python
from test_attrs import test_rank
```

Attribute rank is preserved 

---
## test_single
```python
from test_attrs import test_single
```

Attributes of shape (1,) don't become scalars 

---
## test_access_exc
```python
from test_attrs import test_access_exc
```

Attempt to access missing item raises KeyError 

---
## test_get_id
```python
from test_attrs import test_get_id
```



---
## test_delete
```python
from test_attrs import test_delete
```

Deletion via "del" 

---
## test_delete_exc
```python
from test_attrs import test_delete_exc
```

Attempt to delete missing item raises KeyError 

---
## test_ascii
```python
from test_attrs import test_ascii
```

Access via pure-ASCII byte string 

---
## test_raw
```python
from test_attrs import test_raw
```

Access via non-ASCII byte string 

---
## test_unicode
```python
from test_attrs import test_unicode
```

Access via Unicode string with non-ascii characters 

---
## test_named
```python
from test_attrs import test_named
```

Attributes created from named types link to the source type object
        

---
## test_empty
```python
from test_attrs import test_empty
```

Create attribute with h5py.Empty value
        

---
## test_resolution
```python
from test_attrs import test_resolution
```



---
## test_validity
```python
from test_attrs import test_validity
```

Test that the required functions are implemented.

---
## test_vlen
```python
from test_attrs import test_vlen
```



---
## test_vlen_s1
```python
from test_attrs import test_vlen_s1
```



---
## fill_attrs
```python
from test_attrs import fill_attrs
```



---
## test_track_order
```python
from test_attrs import test_track_order
```



---
## test_no_track_order
```python
from test_attrs import test_no_track_order
```



---
## fill_attrs2
```python
from test_attrs import fill_attrs2
```



---
## test_track_order_overwrite_delete
```python
from test_attrs import test_track_order_overwrite_delete
```



---
## test_datatype
```python
from test_attrs import test_datatype
```



---
## __name__
```python
from test_attrs_data import __name__
```

Attribute data transfer testing module

Covers all data read/write and type-conversion operations for attributes.

---
## BaseAttrs
```python
from test_attrs_data import BaseAttrs
```



---
## TestScalar
```python
from test_attrs_data import TestScalar
```

Feature: Scalar types map correctly to array scalars

---
## TestArray
```python
from test_attrs_data import TestArray
```

Feature: Non-scalar types are correctly retrieved as ndarrays

---
## TestTypes
```python
from test_attrs_data import TestTypes
```

Feature: All supported types can be stored in attributes

---
## TestEmpty
```python
from test_attrs_data import TestEmpty
```



---
## TestWriteException
```python
from test_attrs_data import TestWriteException
```

Ensure failed attribute writes don't leave garbage behind.

---
## setUp
```python
from test_attrs_data import setUp
```



---
## tearDown
```python
from test_attrs_data import tearDown
```



---
## test_int
```python
from test_attrs_data import test_int
```

Storage of integer types 

---
## test_compound
```python
from test_attrs_data import test_compound
```

Compound scalars are read as numpy.void 

---
## test_compound_with_vlen_fields
```python
from test_attrs_data import test_compound_with_vlen_fields
```

Compound scalars with vlen fields can be written and read 

---
## test_nesting_compound_with_vlen_fields
```python
from test_attrs_data import test_nesting_compound_with_vlen_fields
```

Compound scalars with nested compound vlen fields can be written and read 

---
## test_vlen_compound_with_vlen_string
```python
from test_attrs_data import test_vlen_compound_with_vlen_string
```

Compound scalars with vlen compounds containing vlen strings can be written and read 

---
## test_single
```python
from test_attrs_data import test_single
```

Single-element arrays are correctly recovered 

---
## test_multi
```python
from test_attrs_data import test_multi
```

Rank-1 arrays are correctly recovered 

---
## test_float
```python
from test_attrs_data import test_float
```

Storage of floating point types 

---
## test_complex
```python
from test_attrs_data import test_complex
```

Storage of complex types 

---
## test_string
```python
from test_attrs_data import test_string
```

Storage of fixed-length strings 

---
## test_bool
```python
from test_attrs_data import test_bool
```

Storage of NumPy booleans 

---
## test_vlen_string_array
```python
from test_attrs_data import test_vlen_string_array
```

Storage of vlen byte string arrays

---
## test_string_scalar
```python
from test_attrs_data import test_string_scalar
```

Storage of variable-length byte string scalars (auto-creation) 

---
## test_unicode_scalar
```python
from test_attrs_data import test_unicode_scalar
```

Storage of variable-length unicode strings (auto-creation) 

---
## test_read
```python
from test_attrs_data import test_read
```



---
## test_write
```python
from test_attrs_data import test_write
```

ValueError on string write wipes out attribute 

---
## test_modify
```python
from test_attrs_data import test_modify
```



---
## test_values
```python
from test_attrs_data import test_values
```



---
## test_items
```python
from test_attrs_data import test_items
```



---
## test_itervalues
```python
from test_attrs_data import test_itervalues
```



---
## test_iteritems
```python
from test_attrs_data import test_iteritems
```



---
## __name__
```python
from test_h5t import __name__
```



---
## TestCompound
```python
from test_h5t import TestCompound
```

Feature: Compound types can be created from Python dtypes

---
## TestTypeFloatID
```python
from test_h5t import TestTypeFloatID
```

Test TypeFloatID.

---
## test_ref
```python
from test_h5t import test_ref
```

Reference types are correctly stored in compound types (issue 144)
        

---
## test_out_of_order_offsets
```python
from test_h5t import test_out_of_order_offsets
```



---
## test_custom_float_promotion
```python
from test_h5t import test_custom_float_promotion
```

Custom floats are correctly promoted to standard floats on read.

---
## __name__
```python
from test_big_endian_file import __name__
```



---
## test_vlen_big_endian
```python
from test_big_endian_file import test_vlen_big_endian
```



---
## TestEndianess
```python
from test_big_endian_file import TestEndianess
```



---
## test_simple_int_be
```python
from test_big_endian_file import test_simple_int_be
```



---
## __name__
```python
from test_h5p import __name__
```



---
## TestLibver
```python
from test_h5p import TestLibver
```

Feature: Setting/getting lib ver bounds

---
## TestDA
```python
from test_h5p import TestDA
```

Feature: setting/getting chunk cache size on a dataset access property list

---
## TestFA
```python
from test_h5p import TestFA
```

Feature: setting/getting mdc config on a file access property list

---
## TestPL
```python
from test_h5p import TestPL
```



---
## test_libver
```python
from test_h5p import test_libver
```

Test libver bounds set/get 

---
## test_libver_v18
```python
from test_h5p import test_libver_v18
```

Test libver bounds set/get for H5F_LIBVER_V18

---
## test_libver_v110
```python
from test_h5p import test_libver_v110
```

Test libver bounds set/get for H5F_LIBVER_V110

---
## test_libver_v112
```python
from test_h5p import test_libver_v112
```

Test libver bounds set/get for H5F_LIBVER_V112

---
## test_chunk_cache
```python
from test_h5p import test_chunk_cache
```

test get/set chunk cache 

---
## test_efile_prefix
```python
from test_h5p import test_efile_prefix
```

test get/set efile prefix 

---
## test_virtual_prefix
```python
from test_h5p import test_virtual_prefix
```

test get/set virtual prefix 

---
## test_mdc_config
```python
from test_h5p import test_mdc_config
```

test get/set mdc config 

---
## test_set_alignment
```python
from test_h5p import test_set_alignment
```

test get/set chunk cache 

---
## test_set_file_locking
```python
from test_h5p import test_set_file_locking
```

test get/set file locking

---
## test_obj_track_times
```python
from test_h5p import test_obj_track_times
```

tests if the object track times  set/get

---
## test_link_creation_tracking
```python
from test_h5p import test_link_creation_tracking
```

tests the link creation order set/get

---
## test_attr_phase_change
```python
from test_h5p import test_attr_phase_change
```

test the attribute phase change

---
## __name__
```python
from test_dims_dimensionproxy import __name__
```

Tests the h5py.Dataset.dims.DimensionProxy class.

---
## TestItems
```python
from test_dims_dimensionproxy import TestItems
```



---
## test_empty
```python
from test_dims_dimensionproxy import test_empty
```

no dimension scales -> empty list 

---
## __name__
```python
from test_h5o import __name__
```



---
## SampleException
```python
from test_h5o import SampleException
```



---
## throwing
```python
from test_h5o import throwing
```



---
## TestVisit
```python
from test_h5o import TestVisit
```



---
## test_visit
```python
from test_h5o import test_visit
```



---
## __name__
```python
from test_datatype import __name__
```

File-resident datatype tests.

Tests "committed" file-resident datatype objects.

---
## TestCreation
```python
from test_datatype import TestCreation
```

Feature: repr() works sensibly on datatype objects

---
## test_repr
```python
from test_datatype import test_repr
```

repr() on datatype objects 

---
## test_appropriate_low_level_id
```python
from test_datatype import test_appropriate_low_level_id
```

Binding a group to a non-TypeID identifier fails with ValueError 

---
## TestCase
```python
from common import TestCase
```

Base class for unit tests.

---
## closed_tempfile
```python
from common import closed_tempfile
```

Context manager which yields the path to a closed temporary file with the
suffix `suffix`. The file will be deleted on exiting the context. An
additional argument `text` can be provided to have the file contain `text`.

---
## insubprocess
```python
from common import insubprocess
```

Runs a test in its own subprocess

---
## subproc_env
```python
from common import subproc_env
```

Set environment variables for the @insubprocess decorator

---
## setUpClass
```python
from common import setUpClass
```



---
## tearDownClass
```python
from common import tearDownClass
```



---
## mktemp
```python
from common import mktemp
```



---
## mktemp_mpi
```python
from common import mktemp_mpi
```



---
## setUp
```python
from common import setUp
```



---
## tearDown
```python
from common import tearDown
```



---
## assertSameElements
```python
from common import assertSameElements
```



---
## assertArrayEqual
```python
from common import assertArrayEqual
```

Make sure dset and arr have the same shape, dtype and contents, to
within the given precision, optionally ignoring differences in dtype alignment.

Note that dset may be a NumPy array or an HDF5 dataset.

---
## assertNumpyBehavior
```python
from common import assertNumpyBehavior
```

Apply slicing arguments "s" to both dset and arr.

Succeeds if the results of the slicing are identical, or the
exception raised is of the same type for both.

"arr" must be a Numpy array; "dset" may be a NumPy array or dataset.

---
## wrapper
```python
from common import wrapper
```



---
## decorator
```python
from common import decorator
```



---
## __name__
```python
from test_dataset import __name__
```



---
## BaseDataset
```python
from test_dataset import BaseDataset
```



---
## TestRepr
```python
from test_dataset import TestRepr
```

Feature: repr(Dataset) behaves sensibly

---
## TestCreateShape
```python
from test_dataset import TestCreateShape
```

Feature: Datasets can be created from a shape only

---
## TestCreateData
```python
from test_dataset import TestCreateData
```

Feature: Datasets can be created from existing data

---
## TestReadDirectly
```python
from test_dataset import TestReadDirectly
```

Feature: Read data directly from Dataset into a Numpy array

---
## TestWriteDirectly
```python
from test_dataset import TestWriteDirectly
```

Feature: Write Numpy array directly into Dataset

---
## TestCreateRequire
```python
from test_dataset import TestCreateRequire
```

Feature: Datasets can be created only if they don't exist in the file

---
## TestCreateChunked
```python
from test_dataset import TestCreateChunked
```

Feature: Datasets can be created by manually specifying chunks

---
## TestCreateFillvalue
```python
from test_dataset import TestCreateFillvalue
```

Feature: Datasets can be created with fill value

---
## TestFillTime
```python
from test_dataset import TestFillTime
```

Feature: Datasets created with specified fill time property

---
## test_get_unset_fill_value
```python
from test_dataset import test_get_unset_fill_value
```



---
## TestCreateNamedType
```python
from test_dataset import TestCreateNamedType
```

Feature: Datasets created from an existing named type

---
## TestCreateGzip
```python
from test_dataset import TestCreateGzip
```

Feature: Datasets created with gzip compression

---
## TestCreateCompressionNumber
```python
from test_dataset import TestCreateCompressionNumber
```

Feature: Datasets created with a compression code

---
## TestCreateLZF
```python
from test_dataset import TestCreateLZF
```

Feature: Datasets created with LZF compression

---
## TestCreateSZIP
```python
from test_dataset import TestCreateSZIP
```

Feature: Datasets created with LZF compression

---
## TestCreateShuffle
```python
from test_dataset import TestCreateShuffle
```

Feature: Datasets can use shuffling filter

---
## TestCreateFletcher32
```python
from test_dataset import TestCreateFletcher32
```

Feature: Datasets can use the fletcher32 filter

---
## TestCreateScaleOffset
```python
from test_dataset import TestCreateScaleOffset
```

Feature: Datasets can use the scale/offset filter

---
## TestExternal
```python
from test_dataset import TestExternal
```

Feature: Datasets with the external storage property

---
## TestAutoCreate
```python
from test_dataset import TestAutoCreate
```

Feature: Datasets auto-created from data produce the correct types

---
## TestCreateLike
```python
from test_dataset import TestCreateLike
```



---
## TestChunkIterator
```python
from test_dataset import TestChunkIterator
```



---
## TestResize
```python
from test_dataset import TestResize
```

Feature: Datasets created with "maxshape" may be resized

---
## TestDtype
```python
from test_dataset import TestDtype
```

Feature: Dataset dtype is available as .dtype property

---
## TestLen
```python
from test_dataset import TestLen
```

Feature: Size of first axis is available via Python's len

---
## TestIter
```python
from test_dataset import TestIter
```

Feature: Iterating over a dataset yields rows

---
## TestStrings
```python
from test_dataset import TestStrings
```

Feature: Datasets created with vlen and fixed datatypes correctly
translate to and from HDF5

---
## TestCompound
```python
from test_dataset import TestCompound
```

Feature: Compound types correctly round-trip

---
## TestSubarray
```python
from test_dataset import TestSubarray
```



---
## TestEnum
```python
from test_dataset import TestEnum
```

Feature: Enum datatype info is preserved, read/write as integer

---
## TestFloats
```python
from test_dataset import TestFloats
```

Test support for mini and extended-precision floats

---
## TestTrackTimes
```python
from test_dataset import TestTrackTimes
```

Feature: track_times

---
## TestZeroShape
```python
from test_dataset import TestZeroShape
```

Features of datasets with (0,)-shape axes

---
## TestRegionRefs
```python
from test_dataset import TestRegionRefs
```

Various features of region references

---
## TestAstype
```python
from test_dataset import TestAstype
```

.astype() wrapper & context manager
    

---
## TestScalarCompound
```python
from test_dataset import TestScalarCompound
```

Retrieval of a single field from a scalar compound dataset should
strip the field info

---
## TestVlen
```python
from test_dataset import TestVlen
```



---
## TestLowOpen
```python
from test_dataset import TestLowOpen
```



---
## test_get_chunk_details
```python
from test_dataset import test_get_chunk_details
```



---
## test_chunk_iter
```python
from test_dataset import test_chunk_iter
```

H5Dchunk_iter() for chunk information

---
## test_empty_shape
```python
from test_dataset import test_empty_shape
```



---
## test_zero_storage_size
```python
from test_dataset import test_zero_storage_size
```



---
## test_python_int_uint64
```python
from test_dataset import test_python_int_uint64
```



---
## test_setitem_fancy_indexing
```python
from test_dataset import test_setitem_fancy_indexing
```



---
## test_vlen_spacepad
```python
from test_dataset import test_vlen_spacepad
```



---
## test_vlen_nullterm
```python
from test_dataset import test_vlen_nullterm
```



---
## test_allow_unknown_filter
```python
from test_dataset import test_allow_unknown_filter
```



---
## test_dset_chunk_cache
```python
from test_dataset import test_dset_chunk_cache
```

Chunk cache configuration for individual datasets.

---
## TestCommutative
```python
from test_dataset import TestCommutative
```

Test the symmetry of operators, at least with the numpy types.
Issue: https://github.com/h5py/h5py/issues/1947

---
## TestVirtualPrefix
```python
from test_dataset import TestVirtualPrefix
```

Test setting virtual prefix

---
## test_array_copy
```python
from test_dataset import test_array_copy
```



---
## test_array_copy_false
```python
from test_dataset import test_array_copy_false
```



---
## setUp
```python
from test_dataset import setUp
```



---
## tearDown
```python
from test_dataset import tearDown
```



---
## test_repr_open
```python
from test_dataset import test_repr_open
```

repr() works on live and dead datasets 

---
## test_create_scalar
```python
from test_dataset import test_create_scalar
```

Create a scalar dataset from existing array 

---
## test_create_simple
```python
from test_dataset import test_create_simple
```

Create a size-1 dataset 

---
## test_create_integer
```python
from test_dataset import test_create_integer
```

Create a size-1 dataset with integer shape

---
## test_create_extended
```python
from test_dataset import test_create_extended
```

Create an extended dataset from existing data 

---
## test_create_integer_extended
```python
from test_dataset import test_create_integer_extended
```

Create an extended dataset 

---
## test_default_dtype
```python
from test_dataset import test_default_dtype
```

Confirm that the default dtype is float 

---
## test_missing_shape
```python
from test_dataset import test_missing_shape
```

Missing shape raises TypeError 

---
## test_long_double
```python
from test_dataset import test_long_double
```

Confirm that the default dtype is float 

---
## test_complex256
```python
from test_dataset import test_complex256
```

Confirm that the default dtype is float 

---
## test_name_bytes
```python
from test_dataset import test_name_bytes
```



---
## test_dataset_intermediate_group
```python
from test_dataset import test_dataset_intermediate_group
```

Create dataset with missing intermediate groups 

---
## test_reshape
```python
from test_dataset import test_reshape
```

Create from existing data, and make it fit a new shape 

---
## test_appropriate_low_level_id
```python
from test_dataset import test_appropriate_low_level_id
```

Binding Dataset to a non-DatasetID identifier fails with ValueError 

---
## check_h5_string
```python
from test_dataset import check_h5_string
```



---
## test_create_bytestring
```python
from test_dataset import test_create_bytestring
```

Creating dataset with byte string yields vlen ASCII dataset 

---
## test_create_np_s
```python
from test_dataset import test_create_np_s
```



---
## test_create_strings
```python
from test_dataset import test_create_strings
```



---
## test_create_np_u
```python
from test_dataset import test_create_np_u
```



---
## test_empty_create_via_None_shape
```python
from test_dataset import test_empty_create_via_None_shape
```



---
## test_empty_create_via_Empty_class
```python
from test_dataset import test_empty_create_via_Empty_class
```



---
## test_create_incompatible_data
```python
from test_dataset import test_create_incompatible_data
```



---
## test_read_direct
```python
from test_dataset import test_read_direct
```



---
## test_no_sel
```python
from test_dataset import test_no_sel
```



---
## test_empty
```python
from test_dataset import test_empty
```



---
## test_wrong_shape
```python
from test_dataset import test_wrong_shape
```



---
## test_not_c_contiguous
```python
from test_dataset import test_not_c_contiguous
```



---
## test_write_direct
```python
from test_dataset import test_write_direct
```



---
## test_create
```python
from test_dataset import test_create
```

Enum datasets can be created and type correctly round-trips 

---
## test_create_existing
```python
from test_dataset import test_create_existing
```

require_dataset yields existing dataset 

---
## test_create_1D
```python
from test_dataset import test_create_1D
```

Create dataset with "maxshape" using integer maxshape

---
## test_shape_conflict
```python
from test_dataset import test_shape_conflict
```

require_dataset with shape conflict yields TypeError 

---
## test_type_conflict
```python
from test_dataset import test_type_conflict
```

require_dataset with object type conflict yields TypeError 

---
## test_dtype_conflict
```python
from test_dataset import test_dtype_conflict
```

require_dataset with dtype conflict (strict mode) yields TypeError
        

---
## test_dtype_exact
```python
from test_dataset import test_dtype_exact
```

require_dataset with exactly dtype match 

---
## test_dtype_close
```python
from test_dataset import test_dtype_close
```

require_dataset with convertible type succeeds (non-strict mode)
        

---
## test_create_chunks
```python
from test_dataset import test_create_chunks
```

Create via chunks tuple 

---
## test_create_chunks_integer
```python
from test_dataset import test_create_chunks_integer
```

Create via chunks integer 

---
## test_chunks_mismatch
```python
from test_dataset import test_chunks_mismatch
```

Illegal chunk size raises ValueError 

---
## test_chunks_false
```python
from test_dataset import test_chunks_false
```

Chunked format required for given storage options 

---
## test_chunks_scalar
```python
from test_dataset import test_chunks_scalar
```

Attempting to create chunked scalar dataset raises TypeError 

---
## test_auto_chunks
```python
from test_dataset import test_auto_chunks
```

Auto-chunking of datasets 

---
## test_auto_chunks_abuse
```python
from test_dataset import test_auto_chunks_abuse
```

Auto-chunking with pathologically large element sizes 

---
## test_scalar_assignment
```python
from test_dataset import test_scalar_assignment
```

Test scalar assignment of chunked dataset 

---
## test_auto_chunks_no_shape
```python
from test_dataset import test_auto_chunks_no_shape
```

Auto-chunking of empty datasets not allowed

---
## test_create_fillval
```python
from test_dataset import test_create_fillval
```

Fill value is reflected in dataset contents 

---
## test_property
```python
from test_dataset import test_property
```

Fill value is recoverable via property 

---
## test_property_none
```python
from test_dataset import test_property_none
```

.fillvalue property works correctly if not set 

---
## test_compound
```python
from test_dataset import test_compound
```

Fill value works with compound types 

---
## test_exc
```python
from test_dataset import test_exc
```

Bogus fill value raises ValueError 

---
## test_fill_time_default
```python
from test_dataset import test_fill_time_default
```

Fill time default to IFSET 

---
## test_compressed_default
```python
from test_dataset import test_compressed_default
```

Fill time is IFSET for compressed dataset (chunked) 

---
## test_fill_time_never
```python
from test_dataset import test_fill_time_never
```

Fill time set to NEVER 

---
## test_fill_time_alloc
```python
from test_dataset import test_fill_time_alloc
```

Fill time explicitly set to ALLOC 

---
## test_fill_time_ifset
```python
from test_dataset import test_fill_time_ifset
```

Fill time explicitly set to IFSET 

---
## test_invalid_fill_time
```python
from test_dataset import test_invalid_fill_time
```

Choice of fill_time is 'alloc', 'never', 'ifset' 

---
## test_non_str_fill_time
```python
from test_dataset import test_non_str_fill_time
```

fill_time must be a string 

---
## test_resize_chunk_fill_time_default
```python
from test_dataset import test_resize_chunk_fill_time_default
```

The resize dataset will be filled (by default fill value 0) 

---
## test_resize_chunk_fill_time_never
```python
from test_dataset import test_resize_chunk_fill_time_never
```

The resize dataset won't be filled 

---
## test_named
```python
from test_dataset import test_named
```

Named type object works and links the dataset to type 

---
## test_gzip
```python
from test_dataset import test_gzip
```

Create with explicit gzip options 

---
## test_gzip_implicit
```python
from test_dataset import test_gzip_implicit
```

Create with implicit gzip level (level 4) 

---
## test_gzip_number
```python
from test_dataset import test_gzip_number
```

Create with gzip level by specifying integer 

---
## test_gzip_exc
```python
from test_dataset import test_gzip_exc
```

Illegal gzip level (explicit or implicit) raises ValueError 

---
## test_compression_number
```python
from test_dataset import test_compression_number
```

Create with compression number of gzip (h5py.h5z.FILTER_DEFLATE) and a compression level of 7

---
## test_compression_number_invalid
```python
from test_dataset import test_compression_number_invalid
```

Create with invalid compression numbers  

---
## test_lzf
```python
from test_dataset import test_lzf
```

Create with explicit lzf 

---
## test_lzf_exc
```python
from test_dataset import test_lzf_exc
```

Giving lzf options raises ValueError 

---
## test_szip
```python
from test_dataset import test_szip
```

Create with explicit szip 

---
## test_shuffle
```python
from test_dataset import test_shuffle
```

Enable shuffle filter 

---
## test_fletcher32
```python
from test_dataset import test_fletcher32
```

Enable fletcher32 filter 

---
## test_float_fails_without_options
```python
from test_dataset import test_float_fails_without_options
```

Ensure that a scale factor is required for scaleoffset compression of floating point data 

---
## test_non_integer
```python
from test_dataset import test_non_integer
```

Check when scaleoffset is negetive

---
## test_unsupport_dtype
```python
from test_dataset import test_unsupport_dtype
```

Check when dtype is unsupported type

---
## test_float
```python
from test_dataset import test_float
```

Scaleoffset filter works for floating point data 

---
## test_int
```python
from test_dataset import test_int
```



---
## test_int_with_minbits
```python
from test_dataset import test_int_with_minbits
```

Scaleoffset filter works for integer data with specified precision 

---
## test_int_with_minbits_lossy
```python
from test_dataset import test_int_with_minbits_lossy
```

Scaleoffset filter works for integer data with specified precision 

---
## test_contents
```python
from test_dataset import test_contents
```

Create and access an external dataset 

---
## test_contents_efile_prefix
```python
from test_dataset import test_contents_efile_prefix
```

Create and access an external dataset using an efile_prefix

---
## test_name_str
```python
from test_dataset import test_name_str
```

External argument may be a file name str only 

---
## test_name_path
```python
from test_dataset import test_name_path
```

External argument may be a file name path only 

---
## test_iter_multi
```python
from test_dataset import test_iter_multi
```

External argument may be an iterable of multiple tuples 

---
## test_invalid
```python
from test_dataset import test_invalid
```

Test with invalid external lists 

---
## test_create_expandable
```python
from test_dataset import test_create_expandable
```

Create expandable external dataset 

---
## assert_string_type
```python
from test_dataset import assert_string_type
```



---
## test_vlen_bytes
```python
from test_dataset import test_vlen_bytes
```

Vlen bytes dataset maps to vlen ascii in the file 

---
## test_vlen_unicode
```python
from test_dataset import test_vlen_unicode
```

Vlen unicode dataset maps to vlen utf-8 in the file 

---
## test_string_fixed
```python
from test_dataset import test_string_fixed
```

Assignment of fixed-length byte string produces a fixed-length
ascii dataset 

---
## test_no_chunks
```python
from test_dataset import test_no_chunks
```



---
## test_track_times
```python
from test_dataset import test_track_times
```



---
## test_maxshape
```python
from test_dataset import test_maxshape
```

Test when other.maxshape != other.shape 

---
## test_1d
```python
from test_dataset import test_1d
```



---
## test_2d
```python
from test_dataset import test_2d
```



---
## test_2d_partial_slice
```python
from test_dataset import test_2d_partial_slice
```



---
## test_resize
```python
from test_dataset import test_resize
```

Datasets may be resized up to maxshape 

---
## test_resize_1D
```python
from test_dataset import test_resize_1D
```

Datasets may be resized up to maxshape using integer maxshape

---
## test_resize_over
```python
from test_dataset import test_resize_over
```

Resizing past maxshape triggers an exception 

---
## test_resize_nonchunked
```python
from test_dataset import test_resize_nonchunked
```

Resizing non-chunked dataset raises TypeError 

---
## test_resize_axis
```python
from test_dataset import test_resize_axis
```

Resize specified axis 

---
## test_axis_exc
```python
from test_dataset import test_axis_exc
```

Illegal axis raises ValueError 

---
## test_zero_dim
```python
from test_dataset import test_zero_dim
```

Allow zero-length initial dims for unlimited axes (issue 111) 

---
## test_dtype
```python
from test_dataset import test_dtype
```

Retrieve dtype from dataset 

---
## test_dtype_complex32
```python
from test_dataset import test_dtype_complex32
```

Retrieve dtype from complex float16 dataset (gh-2156) 

---
## test_len
```python
from test_dataset import test_len
```

Python len() (under 32 bits) 

---
## test_len_big
```python
from test_dataset import test_len_big
```

Python len() vs Dataset.len() 

---
## test_iter
```python
from test_dataset import test_iter
```

Iterating over a dataset yields rows 

---
## test_iter_scalar
```python
from test_dataset import test_iter_scalar
```

Iterating over scalar dataset raises TypeError 

---
## test_vlen_bytes_fillvalue
```python
from test_dataset import test_vlen_bytes_fillvalue
```

Vlen bytes dataset handles fillvalue 

---
## test_vlen_unicode_fillvalue
```python
from test_dataset import test_vlen_unicode_fillvalue
```

Vlen unicode dataset handles fillvalue 

---
## test_fixed_ascii
```python
from test_dataset import test_fixed_ascii
```

Fixed-length bytes dataset maps to fixed-length ascii in the file
        

---
## test_fixed_bytes_fillvalue
```python
from test_dataset import test_fixed_bytes_fillvalue
```

Vlen bytes dataset handles fillvalue 

---
## test_fixed_utf8
```python
from test_dataset import test_fixed_utf8
```



---
## test_fixed_utf_8_fillvalue
```python
from test_dataset import test_fixed_utf_8_fillvalue
```

Vlen unicode dataset handles fillvalue 

---
## test_fixed_unicode
```python
from test_dataset import test_fixed_unicode
```

Fixed-length unicode datasets are unsupported (raise TypeError) 

---
## test_roundtrip_vlen_bytes
```python
from test_dataset import test_roundtrip_vlen_bytes
```

writing and reading to vlen bytes dataset preserves type and content
        

---
## test_roundtrip_fixed_bytes
```python
from test_dataset import test_roundtrip_fixed_bytes
```

Writing to and reading from fixed-length bytes dataset preserves
type and content 

---
## test_retrieve_vlen_unicode
```python
from test_dataset import test_retrieve_vlen_unicode
```



---
## test_asstr
```python
from test_dataset import test_asstr
```



---
## test_asstr_fixed
```python
from test_dataset import test_asstr_fixed
```



---
## test_unicode_write_error
```python
from test_dataset import test_unicode_write_error
```

Encoding error when writing a non-ASCII string to an ASCII vlen dataset

---
## test_unicode_write_bytes
```python
from test_dataset import test_unicode_write_bytes
```

Writing valid utf-8 byte strings to a unicode vlen dataset is OK
        

---
## test_vlen_bytes_write_ascii_str
```python
from test_dataset import test_vlen_bytes_write_ascii_str
```

Writing an ascii str to ascii vlen dataset is OK
        

---
## test_rt
```python
from test_dataset import test_rt
```

Compound types are read back in correct order (issue 236)

---
## test_assign
```python
from test_dataset import test_assign
```



---
## test_fields
```python
from test_dataset import test_fields
```



---
## test_nested_compound_vlen
```python
from test_dataset import test_nested_compound_vlen
```



---
## test_write_list
```python
from test_dataset import test_write_list
```



---
## test_write_array
```python
from test_dataset import test_write_array
```



---
## test_readwrite
```python
from test_dataset import test_readwrite
```

Enum datasets can be read/written as integers 

---
## _exectest
```python
from test_dataset import _exectest
```



---
## test_mini
```python
from test_dataset import test_mini
```

Mini-floats round trip 

---
## test_mini_mapping
```python
from test_dataset import test_mini_mapping
```

Test mapping for float16 

---
## test_disable_track_times
```python
from test_dataset import test_disable_track_times
```

check that when track_times=False, the time stamp=0 (Jan 1, 1970) 

---
## test_invalid_track_times
```python
from test_dataset import test_invalid_track_times
```

check that when give track_times an invalid value 

---
## test_array_conversion
```python
from test_dataset import test_array_conversion
```

Empty datasets can be converted to NumPy arrays 

---
## test_reading
```python
from test_dataset import test_reading
```

Slicing into empty datasets works correctly 

---
## test_create_ref
```python
from test_dataset import test_create_ref
```

Region references can be used as slicing arguments 

---
## test_empty_region
```python
from test_dataset import test_empty_region
```



---
## test_scalar_dataset
```python
from test_dataset import test_scalar_dataset
```



---
## test_ref_shape
```python
from test_dataset import test_ref_shape
```

Region reference shape and selection shape 

---
## test_astype_wrapper
```python
from test_dataset import test_astype_wrapper
```



---
## test_astype_wrapper_len
```python
from test_dataset import test_astype_wrapper_len
```



---
## test_astype_wrapper_asarray
```python
from test_dataset import test_astype_wrapper_asarray
```



---
## test_scalar_compound
```python
from test_dataset import test_scalar_compound
```



---
## test_reuse_from_other
```python
from test_dataset import test_reuse_from_other
```



---
## test_reuse_struct_from_other
```python
from test_dataset import test_reuse_struct_from_other
```



---
## test_convert
```python
from test_dataset import test_convert
```



---
## test_multidim
```python
from test_dataset import test_multidim
```



---
## _help_float_testing
```python
from test_dataset import _help_float_testing
```

Helper for testing various vlen numpy data types.
:param np_dt: Numpy datatype to test
:param dataset_name: String name of the dataset to create for testing.

---
## test_numpy_float16
```python
from test_dataset import test_numpy_float16
```



---
## test_numpy_float32
```python
from test_dataset import test_numpy_float32
```



---
## test_numpy_float64_from_dtype
```python
from test_dataset import test_numpy_float64_from_dtype
```



---
## test_numpy_float64_2
```python
from test_dataset import test_numpy_float64_2
```



---
## test_non_contiguous_arrays
```python
from test_dataset import test_non_contiguous_arrays
```

Test that non-contiguous arrays are stored correctly

---
## test_asstr_array_dtype
```python
from test_dataset import test_asstr_array_dtype
```



---
## test_get_access_list
```python
from test_dataset import test_get_access_list
```

Test H5Dget_access_plist 

---
## test_dapl
```python
from test_dataset import test_dapl
```

Test the dapl keyword to h5d.open 

---
## test_numpy_commutative
```python
from test_dataset import test_numpy_commutative
```

Create a h5py dataset, extract one element convert to numpy
Check that it returns symmetric response to == and !=

---
## test_basetype_commutative
```python
from test_dataset import test_basetype_commutative
```

Create a h5py dataset and check basetype compatibility.
Check that operation is symmetric, even if it is potentially
not meaningful.

---
## test_virtual_prefix_create
```python
from test_dataset import test_virtual_prefix_create
```



---
## test_virtual_prefix_require
```python
from test_dataset import test_virtual_prefix_require
```



---
## check_vlen_ascii
```python
from test_dataset import check_vlen_ascii
```



---
## check_vlen_utf8
```python
from test_dataset import check_vlen_utf8
```



---
## callback
```python
from test_dataset import callback
```



---
## __name__
```python
from test_file import __name__
```



---
## TestFileOpen
```python
from test_file import TestFileOpen
```

Feature: Opening files with Python-style modes.

---
## TestSpaceStrategy
```python
from test_file import TestSpaceStrategy
```

Feature: Create file with specified file space strategy

---
## TestPageBuffering
```python
from test_file import TestPageBuffering
```

Feature: Use page buffering

---
## TestModes
```python
from test_file import TestModes
```

Feature: File mode can be retrieved via file.mode

---
## TestDrivers
```python
from test_file import TestDrivers
```

Feature: Files can be opened with low-level HDF5 drivers. Does not
include MPI drivers (see bottom).

---
## TestNewLibver
```python
from test_file import TestNewLibver
```

Feature: File format compatibility bounds can be specified when
opening a file.

---
## TestUserblock
```python
from test_file import TestUserblock
```

Feature: Files can be create with user blocks

---
## TestContextManager
```python
from test_file import TestContextManager
```

Feature: File objects can be used as context managers

---
## TestUnicode
```python
from test_file import TestUnicode
```

Feature: Unicode filenames are supported

---
## TestFileProperty
```python
from test_file import TestFileProperty
```

Feature: A File object can be retrieved from any child object,
via the .file property

---
## TestClose
```python
from test_file import TestClose
```

Feature: Files can be closed

---
## TestFlush
```python
from test_file import TestFlush
```

Feature: Files can be flushed

---
## TestRepr
```python
from test_file import TestRepr
```

Feature: File objects provide a helpful __repr__ string

---
## TestFilename
```python
from test_file import TestFilename
```

Feature: The name of a File object can be retrieved via .filename

---
## TestCloseInvalidatesOpenObjectIDs
```python
from test_file import TestCloseInvalidatesOpenObjectIDs
```

Ensure that closing a file invalidates object IDs, as appropriate

---
## TestPathlibSupport
```python
from test_file import TestPathlibSupport
```

Check that h5py doesn't break on pathlib

---
## TestPickle
```python
from test_file import TestPickle
```

Check that h5py.File can't be pickled

---
## TestMPI
```python
from test_file import TestMPI
```



---
## TestSWMRMode
```python
from test_file import TestSWMRMode
```

Feature: Create file that switches on SWMR mode

---
## TestFileLocking
```python
from test_file import TestFileLocking
```

Test h5py.File file locking option

---
## test_file_locking_external_link
```python
from test_file import test_file_locking_external_link
```

Test that same file locking is used for external link

---
## test_close_gc
```python
from test_file import test_close_gc
```



---
## test_default
```python
from test_file import test_default
```

Opening with no libver arg 

---
## test_create
```python
from test_file import test_create
```

Mode 'w' opens file in overwrite mode 

---
## test_create_exclusive
```python
from test_file import test_create_exclusive
```

Mode 'w-' opens file in exclusive mode 

---
## test_append
```python
from test_file import test_append
```

Mode 'a' opens file in append/readwrite mode, creating if necessary 

---
## test_append_permissions
```python
from test_file import test_append_permissions
```

Mode 'a' fails when file is read-only 

---
## test_readonly
```python
from test_file import test_readonly
```

Core driver can be used to open existing files 

---
## test_readwrite
```python
from test_file import test_readwrite
```

Mode 'r+' opens existing file in readwrite mode 

---
## test_nonexistent_file
```python
from test_file import test_nonexistent_file
```

Modes 'r' and 'r+' do not create files 

---
## test_invalid_mode
```python
from test_file import test_invalid_mode
```

Invalid modes raise ValueError 

---
## test_create_with_space_strategy
```python
from test_file import test_create_with_space_strategy
```

Create file with file space strategy 

---
## test_only_with_page_strategy
```python
from test_file import test_only_with_page_strategy
```

Allow page buffering only with fs_strategy="page".
        

---
## test_check_page_buf_size
```python
from test_file import test_check_page_buf_size
```

Verify set page buffer size, and minimum meta and raw eviction criteria.

---
## test_too_small_pbs
```python
from test_file import test_too_small_pbs
```

Page buffer size must be greater than file space page size.

---
## test_open_nonpage_pbs
```python
from test_file import test_open_nonpage_pbs
```

Open non-PAGE file with page buffer set.

---
## test_smaller_pbs
```python
from test_file import test_smaller_pbs
```

Adjust page buffer size automatically when smaller than file page.

---
## test_actual_pbs
```python
from test_file import test_actual_pbs
```

Verify actual page buffer size.

---
## test_mode_attr
```python
from test_file import test_mode_attr
```

Mode equivalent can be retrieved via property 

---
## test_mode_external
```python
from test_file import test_mode_external
```

Mode property works for files opened via external links

Issue 190.

---
## test_stdio
```python
from test_file import test_stdio
```

Stdio driver is supported on posix 

---
## test_direct
```python
from test_file import test_direct
```

DIRECT driver is supported on Linux

---
## test_sec2
```python
from test_file import test_sec2
```

Sec2 driver is supported on posix 

---
## test_core
```python
from test_file import test_core
```

Core driver is supported (no backing store) 

---
## test_backing
```python
from test_file import test_backing
```

Core driver saves to file when backing store used 

---
## test_blocksize
```python
from test_file import test_blocksize
```

Core driver supports variable block size 

---
## test_split
```python
from test_file import test_split
```

Split stores metadata in a separate file 

---
## test_fileobj
```python
from test_file import test_fileobj
```

Python file object driver is supported 

---
## setUpClass
```python
from test_file import setUpClass
```



---
## test_single
```python
from test_file import test_single
```

Opening with single libver arg 

---
## test_single_v108
```python
from test_file import test_single_v108
```

Opening with "v108" libver arg 

---
## test_single_v110
```python
from test_file import test_single_v110
```

Opening with "v110" libver arg 

---
## test_single_v112
```python
from test_file import test_single_v112
```

Opening with "v112" libver arg 

---
## test_multiple
```python
from test_file import test_multiple
```

Opening with two libver args 

---
## test_none
```python
from test_file import test_none
```

Omitting libver arg results in maximum compatibility 

---
## test_create_blocksize
```python
from test_file import test_create_blocksize
```

User blocks created with w, w-, x and properties work correctly 

---
## test_write_only
```python
from test_file import test_write_only
```

User block only allowed for write 

---
## test_match_existing
```python
from test_file import test_match_existing
```

User block size must match that of file when opening for append 

---
## test_power_of_two
```python
from test_file import test_power_of_two
```

User block size must be a power of 2 and at least 512 

---
## test_write_block
```python
from test_file import test_write_block
```

Test that writing to a user block does not destroy the file 

---
## test_context_manager
```python
from test_file import test_context_manager
```

File objects can be used in with statements 

---
## test_unicode
```python
from test_file import test_unicode
```

Unicode filenames can be used, and retrieved properly via .filename
        

---
## test_unicode_hdf5_python_consistent
```python
from test_file import test_unicode_hdf5_python_consistent
```

Unicode filenames can be used, and seen correctly from python
        

---
## test_nonexistent_file_unicode
```python
from test_file import test_nonexistent_file_unicode
```

Modes 'r' and 'r+' do not create files even when given unicode names

---
## test_property
```python
from test_file import test_property
```

File object can be retrieved from subgroup 

---
## test_close
```python
from test_file import test_close
```

Closing a file invalidates any of the file's open objects 

---
## test_mode
```python
from test_file import test_mode
```

Retrieved File objects have a meaningful mode attribute 

---
## test_closed_file
```python
from test_file import test_closed_file
```

Trying to modify closed file raises ValueError 

---
## test_close_multiple_default_driver
```python
from test_file import test_close_multiple_default_driver
```



---
## test_flush
```python
from test_file import test_flush
```

Flush via .flush method 

---
## test_repr
```python
from test_file import test_repr
```

__repr__ behaves itself when files are open and closed 

---
## test_filename
```python
from test_file import test_filename
```

.filename behaves properly for string data 

---
## test_close_one_handle
```python
from test_file import test_close_one_handle
```



---
## test_pathlib_accepted_file
```python
from test_file import test_pathlib_accepted_file
```

Check that pathlib is accepted by h5py.File 

---
## test_pathlib_name_match
```python
from test_file import test_pathlib_name_match
```

Check that using pathlib does not affect naming 

---
## test_dump_error
```python
from test_file import test_dump_error
```



---
## test_mpio
```python
from test_file import test_mpio
```

MPIO driver and options 

---
## test_mpio_append
```python
from test_file import test_mpio_append
```

Testing creation of file with append 

---
## test_mpi_atomic
```python
from test_file import test_mpi_atomic
```

Enable atomic mode for MPIO driver 

---
## test_close_multiple_mpio_driver
```python
from test_file import test_close_multiple_mpio_driver
```

MPIO driver and options 

---
## test_file_mode_generalizes
```python
from test_file import test_file_mode_generalizes
```



---
## test_swmr_mode_consistency
```python
from test_file import test_swmr_mode_consistency
```



---
## test_reopen
```python
from test_file import test_reopen
```

Test file locking when opening twice the same file

---
## test_unsupported_locking
```python
from test_file import test_unsupported_locking
```

Test with erroneous file locking value

---
## test_multiprocess
```python
from test_file import test_multiprocess
```

Test file locking option from different concurrent processes

---
## open_in_subprocess
```python
from test_file import open_in_subprocess
```

Open HDF5 file in a subprocess and return True on success

---
## __name__
```python
from test_selections import __name__
```

Tests for the (internal) selections module

---
## BaseSelection
```python
from test_selections import BaseSelection
```



---
## TestTypeGeneration
```python
from test_selections import TestTypeGeneration
```

Internal feature: Determine output types from dataset dtype and fields.

---
## TestScalarSliceRules
```python
from test_selections import TestScalarSliceRules
```

Internal feature: selections rules for scalar datasets

---
## TestSelection
```python
from test_selections import TestSelection
```

High-level routes to generate a selection
    

---
## setUp
```python
from test_selections import setUp
```



---
## tearDown
```python
from test_selections import tearDown
```



---
## test_simple
```python
from test_selections import test_simple
```

Non-compound types are handled appropriately 

---
## test_simple_fieldexc
```python
from test_selections import test_simple_fieldexc
```

Field names for non-field types raises ValueError 

---
## test_compound_simple
```python
from test_selections import test_compound_simple
```

Compound types with elemental subtypes 

---
## test_args
```python
from test_selections import test_args
```

Permissible arguments for scalar slicing 

---
## test_selection
```python
from test_selections import test_selection
```



---
## __name__
```python
from test_ros3 import __name__
```

Read-only S3 virtual file driver (VFD) test module.

---
## test_ros3
```python
from test_ros3 import test_ros3
```

ROS3 driver and options 

---
## test_ros3_s3_fails
```python
from test_ros3 import test_ros3_s3_fails
```

ROS3 exceptions for s3:// location

---
## test_ros3_s3uri
```python
from test_ros3 import test_ros3_s3uri
```

Use S3 URI with ROS3 driver

---
## test_ros3_temp_token
```python
from test_ros3 import test_ros3_temp_token
```

Set and get S3 access token

---
## TestVlen
```python
from test_dtype import TestVlen
```

Check that storage of vlen strings is carried out correctly.

---
## TestEmptyVlen
```python
from test_dtype import TestEmptyVlen
```



---
## TestExplicitCast
```python
from test_dtype import TestExplicitCast
```



---
## TestOffsets
```python
from test_dtype import TestOffsets
```

Check that compound members with aligned or manual offsets are handled
correctly.

---
## TestStrings
```python
from test_dtype import TestStrings
```



---
## TestDateTime
```python
from test_dtype import TestDateTime
```



---
## TestBitfield
```python
from test_dtype import TestBitfield
```

Test H5T_NATIVE_B8 reading

---
## test_opaque
```python
from test_dtype import test_opaque
```



---
## assertVlenArrayEqual
```python
from test_dtype import assertVlenArrayEqual
```



---
## test_compound
```python
from test_dtype import test_compound
```



---
## test_compound_vlen_bool
```python
from test_dtype import test_compound_vlen_bool
```



---
## test_compound_vlen_enum
```python
from test_dtype import test_compound_vlen_enum
```



---
## test_vlen_enum
```python
from test_dtype import test_vlen_enum
```



---
## test_write_empty_vlen
```python
from test_dtype import test_write_empty_vlen
```



---
## test_f2_casting
```python
from test_dtype import test_f2_casting
```



---
## test_compound_vlen
```python
from test_dtype import test_compound_vlen
```



---
## test_aligned_offsets
```python
from test_dtype import test_aligned_offsets
```



---
## test_aligned_data
```python
from test_dtype import test_aligned_data
```



---
## test_compound_robustness
```python
from test_dtype import test_compound_robustness
```



---
## test_out_of_order_offsets
```python
from test_dtype import test_out_of_order_offsets
```



---
## test_float_round_tripping
```python
from test_dtype import test_float_round_tripping
```



---
## test_vlen_utf8
```python
from test_dtype import test_vlen_utf8
```



---
## test_vlen_ascii
```python
from test_dtype import test_vlen_ascii
```



---
## test_fixed_utf8
```python
from test_dtype import test_fixed_utf8
```



---
## test_fixed_ascii
```python
from test_dtype import test_fixed_ascii
```



---
## test_timedelta
```python
from test_dtype import test_timedelta
```



---
## test_b8_bool
```python
from test_dtype import test_b8_bool
```



---
## test_b8_bool_compound
```python
from test_dtype import test_b8_bool_compound
```



---
## test_b8_bool_compound_nested
```python
from test_dtype import test_b8_bool_compound_nested
```



---
## test_b8_bool_compound_mixed_types
```python
from test_dtype import test_b8_bool_compound_mixed_types
```



---
## test_b8_bool_array
```python
from test_dtype import test_b8_bool_array
```



---
## _test_b8
```python
from test_dtype import _test_b8
```



---
## test_b16_uint16
```python
from test_dtype import test_b16_uint16
```



---
## a
```python
from test_dtype import a
```



---
## __name__
```python
from test_h5 import __name__
```



---
## fixnames
```python
from test_h5 import fixnames
```



---
## TestH5
```python
from test_h5 import TestH5
```



---
## test_config
```python
from test_h5 import test_config
```



---
## test_cnames_get
```python
from test_h5 import test_cnames_get
```



---
## test_cnames_set
```python
from test_h5 import test_cnames_set
```



---
## test_cnames_set_exc
```python
from test_h5 import test_cnames_set_exc
```



---
## test_repr
```python
from test_h5 import test_repr
```



---
## __name__
```python
from test_file2 import __name__
```

Tests the h5py.File object.

---
## nfiles
```python
from test_file2 import nfiles
```



---
## ngroups
```python
from test_file2 import ngroups
```



---
## TestDealloc
```python
from test_file2 import TestDealloc
```

Behavior on object deallocation.  Note most of this behavior is
delegated to FileID.

---
## TestDriverRegistration
```python
from test_file2 import TestDriverRegistration
```



---
## TestCache
```python
from test_file2 import TestCache
```



---
## TestFileObj
```python
from test_file2 import TestFileObj
```



---
## TestTrackOrder
```python
from test_file2 import TestTrackOrder
```



---
## TestFileMetaBlockSize
```python
from test_file2 import TestFileMetaBlockSize
```

Feature: The meta block size can be manipulated, changing how metadata
is aggregated and the offset of the first dataset.

---
## test_autoclose
```python
from test_file2 import test_autoclose
```

File objects close automatically when out of scope, but
other objects remain open. 

---
## test_register_driver
```python
from test_file2 import test_register_driver
```



---
## test_unregister_driver
```python
from test_file2 import test_unregister_driver
```



---
## test_defaults
```python
from test_file2 import test_defaults
```



---
## test_nbytes
```python
from test_file2 import test_nbytes
```



---
## test_nslots
```python
from test_file2 import test_nslots
```



---
## test_w0
```python
from test_file2 import test_w0
```



---
## check_write
```python
from test_file2 import check_write
```



---
## check_read
```python
from test_file2 import check_read
```



---
## test_BytesIO
```python
from test_file2 import test_BytesIO
```



---
## test_file
```python
from test_file2 import test_file
```



---
## test_TemporaryFile
```python
from test_file2 import test_TemporaryFile
```



---
## test_exception_open
```python
from test_file2 import test_exception_open
```



---
## test_exception_read
```python
from test_file2 import test_exception_read
```



---
## test_exception_write
```python
from test_file2 import test_exception_write
```



---
## test_exception_close
```python
from test_file2 import test_exception_close
```



---
## test_exception_writeonly
```python
from test_file2 import test_exception_writeonly
```



---
## test_method_vanish
```python
from test_file2 import test_method_vanish
```



---
## populate
```python
from test_file2 import populate
```



---
## test_track_order
```python
from test_file2 import test_track_order
```



---
## test_no_track_order
```python
from test_file2 import test_no_track_order
```



---
## test_file_create_with_meta_block_size_4096
```python
from test_file2 import test_file_create_with_meta_block_size_4096
```



---
## test_file_create_with_meta_block_size_512
```python
from test_file2 import test_file_create_with_meta_block_size_512
```



---
## set_fapl
```python
from test_file2 import set_fapl
```



---
## BrokenBytesIO
```python
from test_file2 import BrokenBytesIO
```



---
## readinto
```python
from test_file2 import readinto
```



---
## write
```python
from test_file2 import write
```



---
## __name__
```python
from test_completions import __name__
```



---
## TestCompletions
```python
from test_completions import TestCompletions
```



---
## test_group_completions
```python
from test_completions import test_group_completions
```



---
## test_attrs_completions
```python
from test_completions import test_attrs_completions
```



---
## __name__
```python
from test_filters import __name__
```



---
## TestFilters
```python
from test_filters import TestFilters
```



---
## test_filter_ref_obj
```python
from test_filters import test_filter_ref_obj
```



---
## test_filter_ref_obj_eq
```python
from test_filters import test_filter_ref_obj_eq
```



---
## test_filters_available
```python
from test_filters import test_filters_available
```



---
## setUp
```python
from test_filters import setUp
```

like TestCase.setUp but also store the file path 

---
## test_wr_szip_fletcher32_64bit
```python
from test_filters import test_wr_szip_fletcher32_64bit
```

test combination of szip, fletcher32, and 64bit arrays

The fletcher32 checksum must be computed after the szip
compression is applied.

References:
- GitHub issue #953
- https://lists.hdfgroup.org/pipermail/
  hdf-forum_lists.hdfgroup.org/2018-January/010753.html

---
## test_wr_scaleoffset_fletcher32
```python
from test_filters import test_wr_scaleoffset_fletcher32
```

make sure that scaleoffset + fletcher32 is prevented
        

---
## __name__
```python
from test_base import __name__
```



---
## BaseTest
```python
from test_base import BaseTest
```



---
## TestName
```python
from test_base import TestName
```

Feature: .name attribute returns the object name

---
## TestParent
```python
from test_base import TestParent
```

test the parent group of the high-level interface objects

---
## TestMapping
```python
from test_base import TestMapping
```

Test if the registration of Group as a
Mapping behaves as expected

---
## TestRepr
```python
from test_base import TestRepr
```

repr() works correctly with Unicode names

---
## test_is_hdf5
```python
from test_base import test_is_hdf5
```



---
## setUp
```python
from test_base import setUp
```



---
## tearDown
```python
from test_base import tearDown
```



---
## test_anonymous
```python
from test_base import test_anonymous
```

Anonymous objects have name None 

---
## test_object_parent
```python
from test_base import test_object_parent
```



---
## test_keys
```python
from test_base import test_keys
```



---
## test_values
```python
from test_base import test_values
```



---
## test_items
```python
from test_base import test_items
```



---
## _check_type
```python
from test_base import _check_type
```



---
## test_group
```python
from test_base import test_group
```

Group repr() with unicode 

---
## test_dataset
```python
from test_base import test_dataset
```

Dataset repr() with unicode 

---
## test_namedtype
```python
from test_base import test_namedtype
```

Named type repr() with unicode 

---
## test_empty
```python
from test_base import test_empty
```



---
## test_file
```python
from test_base import test_file
```

File object repr() with unicode 

---
## __name__
```python
from test_objects import __name__
```

demonstrate dill's ability to pickle different python types
test pickling of all Python Standard Library objects (currently: CH 1-14 @ 2.7)

---
## TestObjects
```python
from test_objects import TestObjects
```



---
## test_invalid
```python
from test_objects import test_invalid
```



---
## test_equality
```python
from test_objects import test_equality
```



---
## test_hash
```python
from test_objects import test_hash
```



---
## __name__
```python
from test_file_alignment import __name__
```



---
## is_aligned
```python
from test_file_alignment import is_aligned
```



---
## dataset_name
```python
from test_file_alignment import dataset_name
```



---
## TestFileAlignment
```python
from test_file_alignment import TestFileAlignment
```

Ensure that setting the file alignment has the desired effect
in the internal structure.

---
## test_no_alignment_set
```python
from test_file_alignment import test_no_alignment_set
```



---
## test_alignment_set_above_threshold
```python
from test_file_alignment import test_alignment_set_above_threshold
```



---
## test_alignment_set_below_threshold
```python
from test_file_alignment import test_alignment_set_below_threshold
```



---
## __name__
```python
from files import __name__
```



---
## _set_fapl_mpio
```python
from files import _set_fapl_mpio
```

Set file access property list for mpio driver

---
## _set_fapl_fileobj
```python
from files import _set_fapl_fileobj
```

Set the Python file object driver in a file access property list

---
## register_driver
```python
from files import register_driver
```

Register a custom driver.

Parameters
----------
name : str
    The name of the driver.
set_fapl : callable[PropFAID, **kwargs] -> NoneType
    The function to set the fapl to use your custom driver.

---
## unregister_driver
```python
from files import unregister_driver
```

Unregister a custom driver.

Parameters
----------
name : str
    The name of the driver.

---
## registered_drivers
```python
from files import registered_drivers
```

Return a frozenset of the names of all of the registered drivers.
    

---
## make_fapl
```python
from files import make_fapl
```

Set up a file access property list 

---
## make_fcpl
```python
from files import make_fcpl
```

Set up a file creation property list 

---
## make_fid
```python
from files import make_fid
```

Get a new FileID by opening or creating a file.
Also validates mode argument.

---
## File
```python
from files import File
```

A MkDocs File object.

It represents how the contents of one file should be populated in the destination site.

A file always has its `abs_dest_path` (obtained by joining `dest_dir` and `dest_path`),
where the `dest_dir` is understood to be the *site* directory.

`content_bytes`/`content_string` (new in MkDocs 1.6) can always be used to obtain the file's
content. But it may be backed by one of the two sources:

*   A physical source file at `abs_src_path` (by default obtained by joining `src_dir` and
    `src_uri`). `src_dir` is understood to be the *docs* directory.

    Then `content_bytes`/`content_string` will read the file at `abs_src_path`.

    `src_dir` *should* be populated for real files and should be `None` for generated files.

*   Since MkDocs 1.6 a file may alternatively be stored in memory - `content_string`/`content_bytes`.

    Then `src_dir` and `abs_src_path` will remain `None`. `content_bytes`/`content_string` need
    to be written to, or populated through the `content` argument in the constructor.

    But `src_uri` is still populated for such files as well! The virtual file pretends as if it
    originated from that path in the `docs` directory, and other values are derived.

For static files the file is just copied to the destination, and `dest_uri` equals `src_uri`.

For Markdown files (determined by the file extension in `src_uri`) the destination content
will be the rendered content, and `dest_uri` will have the `.html` extension and some
additional transformations to the path, based on `use_directory_urls`.

---
## attrs
```python
from files import attrs
```

Attributes attached to this object 

---
## filename
```python
from files import filename
```

File name on disk

---
## driver
```python
from files import driver
```

Low-level HDF5 file driver used to open file

---
## mode
```python
from files import mode
```

Python mode used to open file 

---
## libver
```python
from files import libver
```

File format version bounds (2-tuple: low, high)

---
## userblock_size
```python
from files import userblock_size
```

User block size (in bytes) 

---
## meta_block_size
```python
from files import meta_block_size
```

Meta block size (in bytes) 

---
## swmr_mode
```python
from files import swmr_mode
```



---
## __init__
```python
from files import __init__
```



---
## close
```python
from files import close
```

Close the file.  All open objects become invalid 

---
## flush
```python
from files import flush
```

Tell the HDF5 library to flush its buffers.
        

---
## __enter__
```python
from files import __enter__
```



---
## __exit__
```python
from files import __exit__
```



---
## __repr__
```python
from files import __repr__
```



---
## atomic
```python
from files import atomic
```



---
## filename_encode
```python
from compat import filename_encode
```

Encode filename for use in the HDF5 library.

Due to how HDF5 handles filenames on different systems, this should be
called on any filenames passed to the HDF5 library. See the documentation on
filenames in h5py for more information.

---
## filename_decode
```python
from compat import filename_decode
```

Decode filename used by HDF5 library.

Due to how HDF5 handles filenames on different systems, this should be
called on any filenames passed from the HDF5 library. See the documentation
on filenames in h5py for more information.

---
## __name__
```python
from selections import __name__
```

High-level access to HDF5 dataspace selections

---
## select
```python
from selections import select
```

High-level routine to generate a selection from arbitrary arguments
to __getitem__.  The arguments should be the following:

shape
    Shape of the "source" dataspace.

args
    Either a single argument or a tuple of arguments.  See below for
    supported classes of argument.

dataset
    A h5py.Dataset instance representing the source dataset.

Argument classes:

Single Selection instance
    Returns the argument.

numpy.ndarray
    Must be a boolean mask.  Returns a PointSelection instance.

RegionReference
    Returns a Selection instance.

Indices, slices, ellipses, MultiBlockSlices only
    Returns a SimpleSelection instance

Indices, slices, ellipses, lists or boolean index arrays
    Returns a FancySelection instance.

---
## Selection
```python
from selections import Selection
```

Base class for HDF5 dataspace selections.  Subclasses support the
"selection protocol", which means they have at least the following
members:

__init__(shape)   => Create a new selection on "shape"-tuple
__getitem__(args) => Perform a selection with the range specified.
                     What args are allowed depends on the
                     particular subclass in use.

id (read-only) =>      h5py.h5s.SpaceID instance
shape (read-only) =>   The shape of the dataspace.
mshape  (read-only) => The shape of the selection region.
                       Not guaranteed to fit within "shape", although
                       the total number of points is less than
                       product(shape).
nselect (read-only) => Number of selected points.  Always equal to
                       product(mshape).

broadcast(target_shape) => Return an iterable which yields dataspaces
                           for read, based on target_shape.

The base class represents "unshaped" selections (1-D).

---
## PointSelection
```python
from selections import PointSelection
```

Represents a point-wise selection.  You can supply sequences of
points to the three methods append(), prepend() and set(), or
instantiate it with a single boolean array using from_mask().

---
## SimpleSelection
```python
from selections import SimpleSelection
```

A single "rectangular" (regular) selection composed of only slices
and integer arguments.  Can participate in broadcasting.

---
## FancySelection
```python
from selections import FancySelection
```

Implements advanced NumPy-style selection operations in addition to
the standard slice-and-int behavior.

Indexing arguments may be ints, slices, lists of indices, or
per-axis (1D) boolean arrays.

Broadcasting is not supported for these selections.

---
## guess_shape
```python
from selections import guess_shape
```

Given a dataspace, try to deduce the shape of the selection.

Returns one of:
    * A tuple with the selection shape, same length as the dataspace
    * A 1D selection shape for point-based and multiple-hyperslab selections
    * None, for unselected scalars and for NULL dataspaces

---
## __init__
```python
from selections import __init__
```



---
## id
```python
from selections import id
```

SpaceID instance 

---
## shape
```python
from selections import shape
```

Shape of whole dataspace 

---
## nselect
```python
from selections import nselect
```

Number of elements currently selected 

---
## mshape
```python
from selections import mshape
```



---
## array_shape
```python
from selections import array_shape
```



---
## expand_shape
```python
from selections import expand_shape
```



---
## broadcast
```python
from selections import broadcast
```



---
## __getitem__
```python
from selections import __getitem__
```



---
## _perform_selection
```python
from selections import _perform_selection
```

Internal method which actually performs the selection 

---
## from_mask
```python
from selections import from_mask
```

Create a point-wise selection from a NumPy boolean array 

---
## append
```python
from selections import append
```

Add the sequence of points to the end of the current selection 

---
## prepend
```python
from selections import prepend
```

Add the sequence of points to the beginning of the current selection 

---
## set
```python
from selections import set
```

Replace the current selection with the given sequence of points

---
## get_n_axis
```python
from selections import get_n_axis
```

Determine the number of elements selected along a particular axis.

To do this, we "mask off" the axis by making a hyperslab selection
which leaves only the first point along the axis.  For a 2D dataset
with selection box shape (X, Y), for axis 1, this would leave a
selection of shape (X, 1).  We count the number of points N_leftover
remaining in the selection and compute the axis selection length by
N_axis = N/N_leftover.

---
## make_new_dset
```python
from dataset import make_new_dset
```

Return a new low-level dataset identifier 

---
## open_dset
```python
from dataset import open_dset
```

Return an existing low-level dataset identifier 

---
## AstypeWrapper
```python
from dataset import AstypeWrapper
```

Wrapper to convert data on reading from a dataset.
    

---
## AsStrWrapper
```python
from dataset import AsStrWrapper
```

Wrapper to decode strings on reading the dataset

---
## FieldsWrapper
```python
from dataset import FieldsWrapper
```

Wrapper to extract named fields from a dataset with a struct dtype

---
## readtime_dtype
```python
from dataset import readtime_dtype
```

Make a NumPy compound dtype with a subset of available fields

---
## ChunkIterator
```python
from dataset import ChunkIterator
```

Class to iterate through list of chunks of a given dataset

---
## __getitem__
```python
from dataset import __getitem__
```

Read a slice from the HDF5 dataset.

Takes slices and recarray-style field names (more than one is
allowed!) in any order.  Obeys basic NumPy rules, including
broadcasting.

Also supports:

* Boolean "mask" array indexing

---
## __len__
```python
from dataset import __len__
```

The size of the first axis.  TypeError if scalar.

Limited to 2**32 on 32-bit systems; Dataset.len() is preferred.

---
## __array__
```python
from dataset import __array__
```

Create a Numpy array containing the whole dataset.  DON'T THINK
THIS MEANS DATASETS ARE INTERCHANGEABLE WITH ARRAYS.  For one thing,
you have to read the whole dataset every time this method is called.

---
## CollectiveContext
```python
from dataset import CollectiveContext
```

Manages collective I/O in MPI mode 

---
## __iter__
```python
from dataset import __iter__
```

Iterate over the first axis.  TypeError if scalar.

BEWARE: Modifications to the yielded data are *NOT* written to file.

---
## __next__
```python
from dataset import __next__
```



---
## astype
```python
from dataset import astype
```

Get a wrapper allowing you to perform reads to a
different destination type, e.g.:

>>> double_precision = dataset.astype('f8')[0:100:2]

---
## asstr
```python
from dataset import asstr
```

Get a wrapper to read string data as Python strings:

>>> str_array = dataset.asstr()[:]

The parameters have the same meaning as in ``bytes.decode()``.
If ``encoding`` is unspecified, it will use the encoding in the HDF5
datatype (either ascii or utf-8).

---
## fields
```python
from dataset import fields
```

Get a wrapper to read a subset of fields from a compound data type:

>>> 2d_coords = dataset.fields(['x', 'y'])[:]

If names is a string, a single field is extracted, and the resulting
arrays will have that dtype. Otherwise, it should be an iterable,
and the read data will have a compound dtype.

---
## dims
```python
from dataset import dims
```

Access dimension scales attached to this dataset. 

---
## ndim
```python
from dataset import ndim
```

Numpy-style attribute giving the number of dimensions

---
## shape
```python
from dataset import shape
```



---
## size
```python
from dataset import size
```

Numpy-style attribute giving the total dataset size

---
## nbytes
```python
from dataset import nbytes
```

Numpy-style attribute giving the raw dataset size as the number of bytes

---
## _selector
```python
from dataset import _selector
```

Internal object for optimised selection of data

---
## _fast_reader
```python
from dataset import _fast_reader
```

Internal object for optimised reading of data

---
## dtype
```python
from dataset import dtype
```

Numpy dtype representing the datatype

---
## chunks
```python
from dataset import chunks
```

Dataset chunks (or None)

---
## compression
```python
from dataset import compression
```

Compression strategy (or None)

---
## compression_opts
```python
from dataset import compression_opts
```

Compression setting.  Int(0-9) for gzip, 2-tuple for szip. 

---
## shuffle
```python
from dataset import shuffle
```

Shuffle filter present (T/F)

---
## fletcher32
```python
from dataset import fletcher32
```

Fletcher32 filter is present (T/F)

---
## scaleoffset
```python
from dataset import scaleoffset
```

Scale/offset filter settings. For integer data types, this is
the number of bits stored, or 0 for auto-detected. For floating
point data types, this is the number of decimal places retained.
If the scale/offset filter is not in use, this is None.

---
## external
```python
from dataset import external
```

External file settings. Returns a list of tuples of
(name, offset, size) for each external file entry, or returns None
if no external files are used.

---
## maxshape
```python
from dataset import maxshape
```

Shape up to which this dataset can be resized.  Axes with value
None have no resize limit. 

---
## fillvalue
```python
from dataset import fillvalue
```

Fill value for this dataset (0 by default)

---
## _extent_type
```python
from dataset import _extent_type
```

Get extent type for this dataset - SIMPLE, SCALAR or NULL

---
## _is_empty
```python
from dataset import _is_empty
```

Check if extent type is empty

---
## resize
```python
from dataset import resize
```

Resize the dataset, or the specified axis.

The dataset must be stored in chunked format; it can be resized up to
the "maximum shape" (keyword maxshape) specified at creation time.
The rank of the dataset cannot be changed.

"Size" should be a shape tuple, or if an axis is specified, an integer.

BEWARE: This functions differently than the NumPy resize() method!
The data is not "reshuffled" to fit in the new shape; each axis is
grown or shrunk independently.  The coordinates of existing data are
fixed.

---
## len
```python
from dataset import len
```

The size of the first axis.  TypeError if scalar.

Use of this method is preferred to len(dset), as Python's built-in
len() cannot handle values greater then 2**32 on 32-bit systems.

---
## iter_chunks
```python
from dataset import iter_chunks
```

Return chunk iterator.  If set, the sel argument is a slice or
tuple of slices that defines the region to be used. If not set, the
entire dataspace will be used for the iterator.

For each chunk within the given region, the iterator yields a tuple of
slices that gives the intersection of the given chunk with the
selection area.

A TypeError will be raised if the dataset is not chunked.

A ValueError will be raised if the selection region is invalid.

---
## _fast_read_ok
```python
from dataset import _fast_read_ok
```

Is this dataset suitable for simple reading

---
## __setitem__
```python
from dataset import __setitem__
```

Write to the HDF5 dataset from a Numpy array.

NumPy's broadcasting rules are honored, for "simple" indexing
(slices and integers).  For advanced indexing, the shapes must
match.

---
## read_direct
```python
from dataset import read_direct
```

Read data directly from HDF5 into an existing NumPy array.

The destination array must be C-contiguous and writable.
Selections must be the output of numpy.s_[<args>].

Broadcasting is supported for simple indexing.

---
## write_direct
```python
from dataset import write_direct
```

Write data directly to HDF5 from a NumPy array.

The source array must be C-contiguous.  Selections must be
the output of numpy.s_[<args>].

Broadcasting is supported for simple indexing.

---
## __repr__
```python
from dataset import __repr__
```



---
## make_scale
```python
from dataset import make_scale
```

Make this dataset an HDF5 dimension scale.

You can then attach it to dimensions of other datasets like this::

    other_ds.dims[0].attach_scale(ds)

You can optionally pass a name to associate with this scale.

---
## is_scale
```python
from dataset import is_scale
```

Return ``True`` if this dataset is also a dimension scale.

Return ``False`` otherwise.

---
## __enter__
```python
from dataset import __enter__
```



---
## __exit__
```python
from dataset import __exit__
```



---
## collective
```python
from dataset import collective
```

Context manager for MPI collective reads & writes 

---
## refresh
```python
from dataset import refresh
```

Refresh the dataset metadata by reloading from the file.

This is part of the SWMR features and only exist when the HDF5
library version >=1.9.178

---
## flush
```python
from dataset import flush
```

Flush the dataset data and metadata to the file.
If the dataset is chunked, raw data chunks are written to the file.

This is part of the SWMR features and only exist when the HDF5
library version >=1.9.178

---
## is_virtual
```python
from dataset import is_virtual
```

Check if this is a virtual dataset

---
## virtual_sources
```python
from dataset import virtual_sources
```

Get a list of the data mappings for a virtual dataset

---
## __name__
```python
from vds import __name__
```

High-level interface for creating HDF5 virtual datasets

---
## VDSmap
```python
from vds import VDSmap
```

Defines a region in a virtual dataset mapping to part of a source dataset
    

---
## _convert_space_for_key
```python
from vds import _convert_space_for_key
```

Converts the space with the given key. Mainly used to allow unlimited
dimensions in virtual space selection.

---
## VirtualSource
```python
from vds import VirtualSource
```

Source definition for virtual data sets.

Instantiate this class to represent an entire source dataset, and then
slice it to indicate which regions should be used in the virtual dataset.

path_or_dataset
    The path to a file, or an h5py dataset. If a dataset is given,
    no other parameters are allowed, as the relevant values are taken from
    the dataset instead.
name
    The name of the source dataset within the file.
shape
    A tuple giving the shape of the dataset.
dtype
    Numpy dtype or string.
maxshape
    The source dataset is resizable up to this shape. Use None for
    axes you want to be unlimited.

---
## VirtualLayout
```python
from vds import VirtualLayout
```

Object for building a virtual dataset.

Instantiate this class to define a virtual dataset, assign to slices of it
(using VirtualSource objects), and then pass it to
group.create_virtual_dataset() to add the virtual dataset to a file.

This class does not allow access to the data; the virtual dataset must
be created in a file before it can be used.

shape
    A tuple giving the shape of the dataset.
dtype
    Numpy dtype or string.
maxshape
    The virtual dataset is resizable up to this shape. Use None for
    axes you want to be unlimited.
filename
    The name of the destination file, if known in advance. Mappings from
    data in the same file will be stored with filename '.', allowing the
    file to be renamed later.

---
## __init__
```python
from vds import __init__
```



---
## shape
```python
from vds import shape
```



---
## __getitem__
```python
from vds import __getitem__
```



---
## __setitem__
```python
from vds import __setitem__
```



---
## _source_file_name
```python
from vds import _source_file_name
```



---
## _get_dcpl
```python
from vds import _get_dcpl
```

Get the property list containing virtual dataset mappings

If the destination filename wasn't known when the VirtualLayout was
created, it is handled here.

---
## make_dataset
```python
from vds import make_dataset
```

Return a new low-level dataset identifier for a virtual dataset 

---
## __name__
```python
from selections2 import __name__
```

Implements a portion of the selection operations.

---
## read_dtypes
```python
from selections2 import read_dtypes
```

Returns a 2-tuple containing:

1. Output dataset dtype
2. Dtype containing HDF5-appropriate description of destination

---
## read_selections_scalar
```python
from selections2 import read_selections_scalar
```

Returns a 2-tuple containing:

1. Output dataset shape
2. HDF5 dataspace containing source selection.

Works for scalar datasets.

---
## ScalarReadSelection
```python
from selections2 import ScalarReadSelection
```

Implements slicing for scalar datasets.

---
## select_read
```python
from selections2 import select_read
```

Top-level dispatch function for reading.

At the moment, only supports reading from scalar datasets.

---
## __init__
```python
from selections2 import __init__
```



---
## __iter__
```python
from selections2 import __iter__
```



---
## __name__
```python
from group import __name__
```

Implements support for high-level access to HDF5 groups.

---
## Group
```python
from group import Group
```

Represents an HDF5 group.
    

---
## HardLink
```python
from group import HardLink
```

Represents a hard link in an HDF5 file.  Provided only so that
Group.get works in a sensible way.  Has no other function.

---
## SoftLink
```python
from group import SoftLink
```

Represents a symbolic ("soft") link in an HDF5 file.  The path
may be absolute or relative.  No checking is performed to ensure
that the target actually exists.

---
## ExternalLink
```python
from group import ExternalLink
```

Represents an HDF5 external link.  Paths may be absolute or relative.
No checking is performed to ensure either the target or file exists.

---
## __init__
```python
from group import __init__
```



---
## create_group
```python
from group import create_group
```

Create and return a new subgroup.

Name may be absolute or relative.  Fails if the target name already
exists.

track_order
    Track dataset/group/attribute creation order under this group
    if True. If None use global default h5.get_config().track_order.

---
## create_dataset
```python
from group import create_dataset
```

Create a new HDF5 dataset

name
    Name of the dataset (absolute or relative).  Provide None to make
    an anonymous dataset.
shape
    Dataset shape.  Use "()" for scalar datasets.  Required if "data"
    isn't provided.
dtype
    Numpy dtype or string.  If omitted, dtype('f') will be used.
    Required if "data" isn't provided; otherwise, overrides data
    array's dtype.
data
    Provide data to initialize the dataset.  If used, you can omit
    shape and dtype arguments.

Keyword-only arguments:

chunks
    (Tuple or int) Chunk shape, or True to enable auto-chunking. Integers can
    be used for 1D shape.

maxshape
    (Tuple or int) Make the dataset resizable up to this shape. Use None for
    axes you want to be unlimited. Integers can be used for 1D shape.
compression
    (String or int) Compression strategy.  Legal values are 'gzip',
    'szip', 'lzf'.  If an integer in range(10), this indicates gzip
    compression level. Otherwise, an integer indicates the number of a
    dynamically loaded compression filter.
compression_opts
    Compression settings.  This is an integer for gzip, 2-tuple for
    szip, etc. If specifying a dynamically loaded compression filter
    number, this must be a tuple of values.
scaleoffset
    (Integer) Enable scale/offset filter for (usually) lossy
    compression of integer or floating-point data. For integer
    data, the value of scaleoffset is the number of bits to
    retain (pass 0 to let HDF5 determine the minimum number of
    bits necessary for lossless compression). For floating point
    data, scaleoffset is the number of digits after the decimal
    place to retain; stored values thus have absolute error
    less than 0.5*10**(-scaleoffset).
shuffle
    (T/F) Enable shuffle filter.
fletcher32
    (T/F) Enable fletcher32 error detection. Not permitted in
    conjunction with the scale/offset filter.
fillvalue
    (Scalar) Use this value for uninitialized parts of the dataset.
track_times
    (T/F) Enable dataset creation timestamps.
track_order
    (T/F) Track attribute creation order if True. If omitted use
    global default h5.get_config().track_order.
external
    (Iterable of tuples) Sets the external storage property, thus
    designating that the dataset will be stored in one or more
    non-HDF5 files external to the HDF5 file.  Adds each tuple
    of (name, offset, size) to the dataset's list of external files.
    Each name must be a str, bytes, or os.PathLike; each offset and
    size, an integer.  If only a name is given instead of an iterable
    of tuples, it is equivalent to [(name, 0, h5py.h5f.UNLIMITED)].
efile_prefix
    (String) External dataset file prefix for dataset access property
    list. Does not persist in the file.
virtual_prefix
    (String) Virtual dataset file prefix for dataset access property
    list. Does not persist in the file.
allow_unknown_filter
    (T/F) Do not check that the requested filter is available for use.
    This should only be used with ``write_direct_chunk``, where the caller
    compresses the data before handing it to h5py.
rdcc_nbytes
    Total size of the dataset's chunk cache in bytes. The default size
    is 1024**2 (1 MiB).
rdcc_w0
    The chunk preemption policy for this dataset.  This must be
    between 0 and 1 inclusive and indicates the weighting according to
    which chunks which have been fully read or written are penalized
    when determining which chunks to flush from cache.  A value of 0
    means fully read or written chunks are treated no differently than
    other chunks (the preemption is strictly LRU) while a value of 1
    means fully read or written chunks are always preempted before
    other chunks.  If your application only reads or writes data once,
    this can be safely set to 1.  Otherwise, this should be set lower
    depending on how often you re-read or re-write the same data.  The
    default value is 0.75.
rdcc_nslots
    The number of chunk slots in the dataset's chunk cache. Increasing
    this value reduces the number of cache collisions, but slightly
    increases the memory used. Due to the hashing strategy, this value
    should ideally be a prime number. As a rule of thumb, this value
    should be at least 10 times the number of chunks that can fit in
    rdcc_nbytes bytes. For maximum performance, this value should be set
    approximately 100 times that number of chunks. The default value is
    521.

---
## require_dataset
```python
from group import require_dataset
```

Open a dataset, creating it if it doesn't exist.

If keyword "exact" is False (default), an existing dataset must have
the same shape and a conversion-compatible dtype to be returned.  If
True, the shape and dtype must match exactly.

If keyword "maxshape" is given, the maxshape and dtype must match
instead.

If any of the keywords "rdcc_nslots", "rdcc_nbytes", or "rdcc_w0" are
given, they will be used to configure the dataset's chunk cache.

Other dataset keywords (see create_dataset) may be provided, but are
only used if a new dataset is to be created.

Raises TypeError if an incompatible object already exists, or if the
shape, maxshape or dtype don't match according to the above rules.

---
## create_dataset_like
```python
from group import create_dataset_like
```

Create a dataset similar to `other`.

name
    Name of the dataset (absolute or relative).  Provide None to make
    an anonymous dataset.
other
    The dataset which the new dataset should mimic. All properties, such
    as shape, dtype, chunking, ... will be taken from it, but no data
    or attributes are being copied.

Any dataset keywords (see create_dataset) may be provided, including
shape and dtype, in which case the provided values take precedence over
those from `other`.

---
## require_group
```python
from group import require_group
```

Return a group, creating it if it doesn't exist.

TypeError is raised if something with that name already exists that
isn't a group.

---
## __getitem__
```python
from group import __getitem__
```

Open an object in the file 

---
## get
```python
from group import get
```

Retrieve an item or other information.

"name" given only:
    Return the item, or "default" if it doesn't exist

"getclass" is True:
    Return the class of object (Group, Dataset, etc.), or "default"
    if nothing with that name exists

"getlink" is True:
    Return HardLink, SoftLink or ExternalLink instances.  Return
    "default" if nothing with that name exists.

"getlink" and "getclass" are True:
    Return HardLink, SoftLink and ExternalLink classes.  Return
    "default" if nothing with that name exists.

Example:

>>> cls = group.get('foo', getclass=True)
>>> if cls == SoftLink:

---
## __setitem__
```python
from group import __setitem__
```

Add an object to the group.  The name must not already be in use.

The action taken depends on the type of object assigned:

Named HDF5 object (Dataset, Group, Datatype)
    A hard link is created at "name" which points to the
    given object.

SoftLink or ExternalLink
    Create the corresponding link.

Numpy ndarray
    The array is converted to a dataset object, with default
    settings (contiguous storage, etc.).

Numpy dtype
    Commit a copy of the datatype as a named datatype in the file.

Anything else
    Attempt to convert it to an ndarray and store it.  Scalar
    values are stored as scalar datasets. Raise ValueError if we
    can't understand the resulting array dtype.

---
## __delitem__
```python
from group import __delitem__
```

Delete (unlink) an item from this group. 

---
## __len__
```python
from group import __len__
```

Number of members attached to this group 

---
## __iter__
```python
from group import __iter__
```

Iterate over member names 

---
## __reversed__
```python
from group import __reversed__
```

Iterate over member names in reverse order. 

---
## __contains__
```python
from group import __contains__
```

Test if a member name exists 

---
## copy
```python
from group import copy
```

Copy an object or group.

 The source can be a path, Group, Dataset, or Datatype object.  The
 destination can be either a path or a Group object.  The source and
 destinations need not be in the same file.

 If the source is a Group object, all objects contained in that group
 will be copied recursively.

 When the destination is a Group object, by default the target will
 be created in that group with its current name (basename of obj.name).
 You can override that by setting "name" to a string.

 There are various options which all default to "False":

  - shallow: copy only immediate members of a group.

  - expand_soft: expand soft links into new objects.

  - expand_external: expand external links into new objects.

  - expand_refs: copy objects that are pointed to by references.

  - without_attrs: copy object without copying attributes.

Example:

 >>> f = File('myfile.hdf5', 'w')
 >>> f.create_group("MyGroup")
 >>> list(f.keys())
 ['MyGroup']
 >>> f.copy('MyGroup', 'MyCopy')
 >>> list(f.keys())
 ['MyGroup', 'MyCopy']

 

---
## move
```python
from group import move
```

Move a link to a new location in the file.

If "source" is a hard link, this effectively renames the object.  If
"source" is a soft or external link, the link itself is moved, with its
value unmodified.

---
## visit
```python
from group import visit
```

Recursively visit all names in this group and subgroups.

Note: visit ignores soft and external links. To visit those, use
visit_links.

You supply a callable (function, method or callable object); it
will be called exactly once for each link in this group and every
group below it. Your callable must conform to the signature:

    func(<member name>) => <None or return value>

Returning None continues iteration, returning anything else stops
and immediately returns that value from the visit method.  No
particular order of iteration within groups is guaranteed.

Example:

>>> # List the entire contents of the file
>>> f = File("foo.hdf5")
>>> list_of_names = []
>>> f.visit(list_of_names.append)

---
## visititems
```python
from group import visititems
```

Recursively visit names and objects in this group.

Note: visititems ignores soft and external links. To visit those, use
visititems_links.

You supply a callable (function, method or callable object); it
will be called exactly once for each link in this group and every
group below it. Your callable must conform to the signature:

    func(<member name>, <object>) => <None or return value>

Returning None continues iteration, returning anything else stops
and immediately returns that value from the visit method.  No
particular order of iteration within groups is guaranteed.

Example:

# Get a list of all datasets in the file
>>> mylist = []
>>> def func(name, obj):
...     if isinstance(obj, Dataset):
...         mylist.append(name)
...
>>> f = File('foo.hdf5')
>>> f.visititems(func)

---
## visit_links
```python
from group import visit_links
```

Recursively visit all names in this group and subgroups.
Each link will be visited exactly once, regardless of its target.

You supply a callable (function, method or callable object); it
will be called exactly once for each link in this group and every
group below it. Your callable must conform to the signature:

    func(<member name>) => <None or return value>

Returning None continues iteration, returning anything else stops
and immediately returns that value from the visit method.  No
particular order of iteration within groups is guaranteed.

Example:

>>> # List the entire contents of the file
>>> f = File("foo.hdf5")
>>> list_of_names = []
>>> f.visit_links(list_of_names.append)

---
## visititems_links
```python
from group import visititems_links
```

Recursively visit links in this group.
Each link will be visited exactly once, regardless of its target.

You supply a callable (function, method or callable object); it
will be called exactly once for each link in this group and every
group below it. Your callable must conform to the signature:

    func(<member name>, <link>) => <None or return value>

Returning None continues iteration, returning anything else stops
and immediately returns that value from the visit method.  No
particular order of iteration within groups is guaranteed.

Example:

# Get a list of all softlinks in the file
>>> mylist = []
>>> def func(name, link):
...     if isinstance(link, SoftLink):
...         mylist.append(name)
...
>>> f = File('foo.hdf5')
>>> f.visititems_links(func)

---
## __repr__
```python
from group import __repr__
```



---
## path
```python
from group import path
```

Soft link path, i.e. the part inside the HDF5 file. 

---
## filename
```python
from group import filename
```

Path to the external HDF5 file in the filesystem. 

---
## create_virtual_dataset
```python
from group import create_virtual_dataset
```

Create a new virtual dataset in this group.

See virtual datasets in the docs for more information.

name
    (str) Name of the new dataset

layout
    (VirtualLayout) Defines the sources for the virtual dataset

fillvalue
    The value to use where there is no data.

---
## build_virtual_dataset
```python
from group import build_virtual_dataset
```

Assemble a virtual dataset in this group.

This is used as a context manager::

    with f.build_virtual_dataset('virt', (10, 1000), np.uint32) as layout:
        layout[0] = h5py.VirtualSource('foo.h5', 'data', (1000,))

name
    (str) Name of the new dataset
shape
    (tuple) Shape of the dataset
dtype
    A numpy dtype for data read from the virtual dataset
maxshape
    (tuple, optional) Maximum dimensions if the dataset can grow.
    Use None for unlimited dimensions.
fillvalue
    The value used where no data is available.

---
## proxy
```python
from group import proxy
```

Use the text name of the object, not bytes 

---
## __name__
```python
from datatype import __name__
```

Implements high-level access to committed datatypes in the file.

---
## Datatype
```python
from datatype import Datatype
```

Represents an HDF5 named datatype stored in a file.

To store a datatype, simply assign it to a name in a group:

>>> MyGroup["name"] = numpy.dtype("f")
>>> named_type = MyGroup["name"]
>>> assert named_type.dtype == numpy.dtype("f")

---
## dtype
```python
from datatype import dtype
```

Numpy dtype equivalent for this datatype

---
## __init__
```python
from datatype import __init__
```

Create a new Datatype object by binding to a low-level TypeID.
        

---
## __repr__
```python
from datatype import __repr__
```



---
## __name__
```python
from attrs import __name__
```

Plugin for supporting the attrs library (http://www.attrs.org)

---
## AttributeManager
```python
from attrs import AttributeManager
```

Allows dictionary-style access to an HDF5 object's attributes.

These are created exclusively by the library and are available as
a Python attribute at <object>.attrs

Like Group objects, attributes provide a minimal dictionary-
style interface.  Anything which can be reasonably converted to a
Numpy array or Numpy scalar can be stored.

Attributes are automatically created on assignment with the
syntax <obj>.attrs[name] = value, with the HDF5 type automatically
deduced from the value.  Existing attributes are overwritten.

To modify an existing attribute while preserving its type, use the
method modify().  To specify an attribute of a particular type and
shape, use create().

---
## __init__
```python
from attrs import __init__
```



---
## __getitem__
```python
from attrs import __getitem__
```

Read the value of an attribute.
        

---
## get_id
```python
from attrs import get_id
```

Get a low-level AttrID object for the named attribute.
        

---
## __setitem__
```python
from attrs import __setitem__
```

Set a new attribute, overwriting any existing attribute.

The type and shape of the attribute are determined from the data.  To
use a specific type or shape, or to preserve the type of an attribute,
use the methods create() and modify().

---
## __delitem__
```python
from attrs import __delitem__
```

Delete an attribute (which must already exist). 

---
## create
```python
from attrs import create
```

Create a new attribute, overwriting any existing attribute.

name
    Name of the new attribute (required)
data
    An array to initialize the attribute (required)
shape
    Shape of the attribute.  Overrides data.shape if both are
    given, in which case the total number of points must be unchanged.
dtype
    Data type of the attribute.  Overrides data.dtype if both
    are given.

---
## modify
```python
from attrs import modify
```

Change the value of an attribute while preserving its type.

Differs from __setitem__ in that if the attribute already exists, its
type is preserved.  This can be very useful for interacting with
externally generated files.

If the attribute doesn't exist, it will be automatically created.

---
## __len__
```python
from attrs import __len__
```

Number of attributes attached to the object. 

---
## __iter__
```python
from attrs import __iter__
```

Iterate over the names of attributes. 

---
## __contains__
```python
from attrs import __contains__
```

Determine if an attribute exists, by name. 

---
## __repr__
```python
from attrs import __repr__
```



---
## iter_cb
```python
from attrs import iter_cb
```

Callback to gather attribute names 

---
## __name__
```python
from dims import __name__
```

Implements support for HDF5 dimension scales.

---
## DimensionProxy
```python
from dims import DimensionProxy
```

Represents an HDF5 "dimension".

---
## DimensionManager
```python
from dims import DimensionManager
```

Represents a collection of dimension associated with a dataset.

Like AttributeManager, an instance of this class is returned when
accessing the ".dims" property on a Dataset.

---
## label
```python
from dims import label
```



---
## __init__
```python
from dims import __init__
```

Private constructor.
        

---
## __hash__
```python
from dims import __hash__
```



---
## __eq__
```python
from dims import __eq__
```



---
## __iter__
```python
from dims import __iter__
```

Iterate over the dimensions. 

---
## __len__
```python
from dims import __len__
```

Number of dimensions associated with the dataset. 

---
## __getitem__
```python
from dims import __getitem__
```

Return a Dimension object
        

---
## attach_scale
```python
from dims import attach_scale
```

Attach a scale to this dimension.

Provide the Dataset of the scale you would like to attach.

---
## detach_scale
```python
from dims import detach_scale
```

Remove a scale from this dimension.

Provide the Dataset of the scale you would like to remove.

---
## items
```python
from dims import items
```

Get a list of (name, Dataset) pairs with all scales on this
dimension.

---
## keys
```python
from dims import keys
```

Get a list of names for the scales on this dimension. 

---
## values
```python
from dims import values
```

Get a list of Dataset for scales on this dimension. 

---
## __repr__
```python
from dims import __repr__
```



---
## create_scale
```python
from dims import create_scale
```

Create a new dimension, from an initial scale.

Provide the dataset and a name for the scale.

---
## f
```python
from dims import f
```

Iterate over scales to find a matching name 

---
## is_hdf5
```python
from base import is_hdf5
```

Determine if a file is valid HDF5 (False if it doesn't exist). 

---
## find_item_type
```python
from base import find_item_type
```

Find the item type of a simple object or collection of objects.

E.g. [[['a']]] -> str

The focus is on collections where all items have the same type; we'll return
None if that's not the case.

The aim is to treat numpy arrays of Python objects like normal Python
collections, while treating arrays with specific dtypes differently.
We're also only interested in array-like collections - lists and tuples,
possibly nested - not things like sets or dicts.

---
## guess_dtype
```python
from base import guess_dtype
```

Attempt to guess an appropriate dtype for the object, returning None
if nothing is appropriate (or if it should be left up the the array
constructor to figure out)

---
## is_float16_dtype
```python
from base import is_float16_dtype
```



---
## array_for_new_object
```python
from base import array_for_new_object
```

Prepare an array from data used to create a new dataset or attribute

---
## default_lapl
```python
from base import default_lapl
```

Default link access property list 

---
## default_lcpl
```python
from base import default_lcpl
```

Default link creation property list 

---
## is_empty_dataspace
```python
from base import is_empty_dataspace
```

Check if an object's dataspace is empty 

---
## CommonStateObject
```python
from base import CommonStateObject
```

Mixin class that allows sharing information between objects which
reside in the same HDF5 file.  Requires that the host class have
a ".id" attribute which returns a low-level ObjectID subclass.

Also implements Unicode operations.

---
## _RegionProxy
```python
from base import _RegionProxy
```

Proxy object which handles region references.

To create a new region reference (datasets only), use slicing syntax:

    >>> newref = obj.regionref[0:10:2]

To determine the target dataset shape from an existing reference:

    >>> shape = obj.regionref.shape(existingref)

where <obj> may be any object in the file. To determine the shape of
the selection in use on the target dataset:

    >>> selection_shape = obj.regionref.selection(existingref)

---
## HLObject
```python
from base import HLObject
```

Base class for high-level interface objects.

---
## KeysViewHDF5
```python
from base import KeysViewHDF5
```



---
## ValuesViewHDF5
```python
from base import ValuesViewHDF5
```

Wraps e.g. a Group or AttributeManager to provide a value view.

Note that __contains__ will have poor performance as it has
to scan all the links or attributes.

---
## ItemsViewHDF5
```python
from base import ItemsViewHDF5
```

Wraps e.g. a Group or AttributeManager to provide an items view.

---
## MappingHDF5
```python
from base import MappingHDF5
```

Wraps a Group, AttributeManager or DimensionManager object to provide
an immutable mapping interface.

We don't inherit directly from MutableMapping because certain
subclasses, for example DimensionManager, are read-only.

---
## MutableMappingHDF5
```python
from base import MutableMappingHDF5
```

Wraps a Group or AttributeManager object to provide a mutable
mapping interface, in contrast to the read-only mapping of
MappingHDF5.

---
## Empty
```python
from base import Empty
```

Proxy object to represent empty/null dataspaces (a.k.a H5S_NULL).

This can have an associated dtype, but has no shape or data. This is not
the same as an array with shape (0,).

---
## product
```python
from base import product
```

Calculate a numeric product

For small amounts of data (e.g. shape tuples), this simple code is much
faster than calling numpy.prod().

---
## cached_property
```python
from base import cached_property
```



---
## _lapl
```python
from base import _lapl
```

Fetch the link access property list appropriate for this object
        

---
## _lcpl
```python
from base import _lcpl
```

Fetch the link creation property list appropriate for this object
        

---
## _e
```python
from base import _e
```

Encode a name according to the current file settings.

Returns name, or 2-tuple (name, lcpl) if lcpl is True

- Binary strings are always passed as-is, h5t.CSET_ASCII
- Unicode strings are encoded utf8, h5t.CSET_UTF8

If name is None, returns either None or (None, None) appropriately.

---
## _d
```python
from base import _d
```

Decode a name according to the current file settings.

- Try to decode utf8
- Failing that, return the byte string

If name is None, returns None.

---
## __getitem__
```python
from base import __getitem__
```

Override numpy.ndarray's __getitem__ method to work as desired.

This function adds lists and Series as valid boolean indexers
(ndarrays only supports ndarray with dtype=bool).

If resulting ndim != 1, plain ndarray is returned instead of
corresponding `Index` subclass.

---
## shape
```python
from base import shape
```

Return a tuple of the shape of the underlying data.

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.shape
(3,)

---
## selection
```python
from base import selection
```

Get the shape of the target dataspace selection referred to by *ref*
        

---
## file
```python
from base import file
```

Return a File instance associated with this object 

---
## parent
```python
from base import parent
```

Return the parent group of this object.

This is always equivalent to obj.file[posixpath.dirname(obj.name)].
ValueError if this object is anonymous.

---
## id
```python
from base import id
```

Low-level identifier appropriate for this object 

---
## ref
```python
from base import ref
```

An (opaque) HDF5 reference to this object 

---
## regionref
```python
from base import regionref
```

Create a region reference (Datasets only).

The syntax is regionref[<slices>]. For example, dset.regionref[...]
creates a region reference in which the whole dataset is selected.

Can also be used to determine the shape of the referenced dataset
(via .shape property), or the shape of the selection (via the
.selection property).

---
## attrs
```python
from base import attrs
```

Attributes attached to this object 

---
## __getnewargs__
```python
from base import __getnewargs__
```

Disable pickle.

Handles for HDF5 objects can't be reliably deserialised, because the
recipient may not have access to the same files. So we do this to
fail early.

If you really want to pickle h5py objects and can live with some
limitations, look at the h5pickle project on PyPI.

---
## __getstate__
```python
from base import __getstate__
```



---
## __reversed__
```python
from base import __reversed__
```



---
## keys
```python
from base import keys
```

Get a view object on member names 

---
## values
```python
from base import values
```

Return an array representing the data in the Index.

.. warning::

   We recommend using :attr:`Index.array` or
   :meth:`Index.to_numpy`, depending on whether you need
   a reference to the underlying data or a NumPy array.

Returns
-------
array: numpy.ndarray or ExtensionArray

See Also
--------
Index.array : Reference to the underlying data.
Index.to_numpy : A NumPy array representing the underlying data.

Examples
--------
For :class:`pandas.Index`:

>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.values
array([1, 2, 3])

For :class:`pandas.IntervalIndex`:

>>> idx = pd.interval_range(start=0, end=5)
>>> idx.values
<IntervalArray>
[(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]]
Length: 5, dtype: interval[int64, right]

---
## items
```python
from base import items
```



---
## _ipython_key_completions_
```python
from base import _ipython_key_completions_
```

Custom tab completions for __getitem__ in IPython >=5.0. 

---
## __get__
```python
from base import __get__
```



---
## get_lcpl
```python
from base import get_lcpl
```

Create an appropriate link creation property list 

---
## _gen_filter_tuples
```python
from filters import _gen_filter_tuples
```

Bootstrap function to figure out what filters are available. 

---
## _external_entry
```python
from filters import _external_entry
```

Check for and return a well-formed entry tuple for
a call to h5p.set_external. 

---
## _normalize_external
```python
from filters import _normalize_external
```

Normalize external into a well-formed list of tuples and return. 

---
## FilterRefBase
```python
from filters import FilterRefBase
```

Base class for referring to an HDF5 and describing its options

Your subclass must define filter_id, and may define a filter_options tuple.

---
## Gzip
```python
from filters import Gzip
```



---
## fill_dcpl
```python
from filters import fill_dcpl
```

Generate a dataset creation property list.

Undocumented and subject to change without warning.

---
## get_filters
```python
from filters import get_filters
```

Extract a dictionary of active filters from a DCPL, along with
their settings.

Undocumented and subject to change without warning.

---
## guess_chunk
```python
from filters import guess_chunk
```

Guess an appropriate chunk layout for a dataset, given its shape and
the size of each element in bytes.  Will allocate chunks only as large
as MAX_SIZE.  Chunks are generally close to some power-of-2 fraction of
each axis, slightly favoring bigger values for the last index.

Undocumented and subject to change without warning.

---
## _kwargs
```python
from filters import _kwargs
```



---
## __hash__
```python
from filters import __hash__
```



---
## __eq__
```python
from filters import __eq__
```



---
## __len__
```python
from filters import __len__
```



---
## __iter__
```python
from filters import __iter__
```



---
## __getitem__
```python
from filters import __getitem__
```



---
## __init__
```python
from filters import __init__
```



---
## rq_tuple
```python
from filters import rq_tuple
```

Check if chunks/maxshape match dataset rank 

---
## get_data_file_path
```python
from __init__ import get_data_file_path
```

Returns the path to the test data file given by `basename`

---
## __name__
```python
from test_highlevel_vds import __name__
```

Unit test for the high level vds interface for eiger
https://support.hdfgroup.org/HDF5/docNewFeatures/VDS/HDF5-VDS-requirements-use-cases-2014-12-10.pdf

---
## TestEigerHighLevel
```python
from test_highlevel_vds import TestEigerHighLevel
```



---
## ExcaliburData
```python
from test_highlevel_vds import ExcaliburData
```



---
## TestExcaliburHighLevel
```python
from test_highlevel_vds import TestExcaliburHighLevel
```



---
## TestPercivalHighLevel
```python
from test_highlevel_vds import TestPercivalHighLevel
```



---
## SlicingTestCase
```python
from test_highlevel_vds import SlicingTestCase
```



---
## IndexingTestCase
```python
from test_highlevel_vds import IndexingTestCase
```



---
## RelativeLinkTestCase
```python
from test_highlevel_vds import RelativeLinkTestCase
```



---
## RelativeLinkBuildVDSTestCase
```python
from test_highlevel_vds import RelativeLinkBuildVDSTestCase
```



---
## VDSUnlimitedTestCase
```python
from test_highlevel_vds import VDSUnlimitedTestCase
```



---
## setUp
```python
from test_highlevel_vds import setUp
```



---
## test_eiger_high_level
```python
from test_highlevel_vds import test_eiger_high_level
```



---
## tearDown
```python
from test_highlevel_vds import tearDown
```



---
## sensor_module_dimensions
```python
from test_highlevel_vds import sensor_module_dimensions
```



---
## fem_stripe_dimensions
```python
from test_highlevel_vds import fem_stripe_dimensions
```



---
## generate_sensor_module_image
```python
from test_highlevel_vds import generate_sensor_module_image
```



---
## generate_fem_stripe_image
```python
from test_highlevel_vds import generate_fem_stripe_image
```



---
## create_excalibur_fem_stripe_datafile
```python
from test_highlevel_vds import create_excalibur_fem_stripe_datafile
```



---
## test_excalibur_high_level
```python
from test_highlevel_vds import test_excalibur_high_level
```



---
## test_percival_high_level
```python
from test_highlevel_vds import test_percival_high_level
```



---
## test_percival_source_from_dataset
```python
from test_highlevel_vds import test_percival_source_from_dataset
```



---
## make_virtual_ds
```python
from test_highlevel_vds import make_virtual_ds
```



---
## test_slice_source
```python
from test_highlevel_vds import test_slice_source
```



---
## test_inspection
```python
from test_highlevel_vds import test_inspection
```



---
## test_mismatched_selections
```python
from test_highlevel_vds import test_mismatched_selections
```



---
## test_index_layout
```python
from test_highlevel_vds import test_index_layout
```



---
## make_vds
```python
from test_highlevel_vds import make_vds
```



---
## test_relative_vds
```python
from test_highlevel_vds import test_relative_vds
```



---
## test_unlimited_axis
```python
from test_highlevel_vds import test_unlimited_axis
```



---
## __name__
```python
from test_virtual_source import __name__
```



---
## TestVirtualSource
```python
from test_virtual_source import TestVirtualSource
```



---
## test_full_slice
```python
from test_virtual_source import test_full_slice
```



---
## test_integer_indexed
```python
from test_virtual_source import test_integer_indexed
```



---
## test_integer_single_indexed
```python
from test_virtual_source import test_integer_single_indexed
```



---
## test_two_integer_indexed
```python
from test_virtual_source import test_two_integer_indexed
```



---
## test_single_range
```python
from test_virtual_source import test_single_range
```



---
## test_shape_calculation_positive_step
```python
from test_virtual_source import test_shape_calculation_positive_step
```



---
## test_double_range
```python
from test_virtual_source import test_double_range
```



---
## test_double_strided_range
```python
from test_virtual_source import test_double_strided_range
```



---
## test_negative_start_index
```python
from test_virtual_source import test_negative_start_index
```



---
## test_negative_stop_index
```python
from test_virtual_source import test_negative_stop_index
```



---
## test_negative_start_and_stop_index
```python
from test_virtual_source import test_negative_start_and_stop_index
```



---
## test_ellipsis
```python
from test_virtual_source import test_ellipsis
```



---
## test_ellipsis_end
```python
from test_virtual_source import test_ellipsis_end
```



---
## test_ellipsis_start
```python
from test_virtual_source import test_ellipsis_start
```



---
## test_ellipsis_sandwich
```python
from test_virtual_source import test_ellipsis_sandwich
```



---
## test_integer_shape
```python
from test_virtual_source import test_integer_shape
```



---
## test_integer_maxshape
```python
from test_virtual_source import test_integer_maxshape
```



---
## test_extra_args
```python
from test_virtual_source import test_extra_args
```



---
## test_repeated_slice
```python
from test_virtual_source import test_repeated_slice
```



---
## __name__
```python
from test_lowlevel_vds import __name__
```

Unit test for the low level vds interface for eiger
https://support.hdfgroup.org/HDF5/docNewFeatures/VDS/HDF5-VDS-requirements-use-cases-2014-12-10.pdf

---
## TestEigerLowLevel
```python
from test_lowlevel_vds import TestEigerLowLevel
```



---
## ExcaliburData
```python
from test_lowlevel_vds import ExcaliburData
```



---
## TestExcaliburLowLevel
```python
from test_lowlevel_vds import TestExcaliburLowLevel
```



---
## TestPercivalLowLevel
```python
from test_lowlevel_vds import TestPercivalLowLevel
```



---
## test_virtual_prefix
```python
from test_lowlevel_vds import test_virtual_prefix
```



---
## setUp
```python
from test_lowlevel_vds import setUp
```



---
## test_eiger_low_level
```python
from test_lowlevel_vds import test_eiger_low_level
```



---
## tearDown
```python
from test_lowlevel_vds import tearDown
```



---
## sensor_module_dimensions
```python
from test_lowlevel_vds import sensor_module_dimensions
```



---
## fem_stripe_dimensions
```python
from test_lowlevel_vds import fem_stripe_dimensions
```



---
## generate_sensor_module_image
```python
from test_lowlevel_vds import generate_sensor_module_image
```



---
## generate_fem_stripe_image
```python
from test_lowlevel_vds import generate_fem_stripe_image
```



---
## create_excalibur_fem_stripe_datafile
```python
from test_lowlevel_vds import create_excalibur_fem_stripe_datafile
```



---
## test_excalibur_low_level
```python
from test_lowlevel_vds import test_excalibur_low_level
```



---
## test_percival_low_level
```python
from test_lowlevel_vds import test_percival_low_level
```



---
## __name__
```python
from py38 import __name__
```



---
## __name__
```python
from _path import __name__
```



---
## Symlink
```python
from _path import Symlink
```

A string indicating the target of a symlink.

---
## TreeMaker
```python
from _path import TreeMaker
```



---
## _ensure_tree_maker
```python
from _path import _ensure_tree_maker
```



---
## build
```python
from _path import build
```

Build a set of files/directories, as described by the spec.

Each key represents a pathname, and the value represents
the content. Content may be a nested directory.

>>> spec = {
...     'README.txt': "A README file",
...     "foo": {
...         "__init__.py": "",
...         "bar": {
...             "__init__.py": "",
...         },
...         "baz.py": "# Some code",
...         "bar.py": Symlink("baz.py"),
...     },
...     "bing": Symlink("foo"),
... }
>>> target = getfixture('tmp_path')
>>> build(spec, target)
>>> target.joinpath('foo/baz.py').read_text(encoding='utf-8')
'# Some code'
>>> target.joinpath('bing/bar.py').read_text(encoding='utf-8')
'# Some code'

---
## create
```python
from _path import create
```



---
## _
```python
from _path import _
```



---
## __truediv__
```python
from _path import __truediv__
```



---
## mkdir
```python
from _path import mkdir
```



---
## write_text
```python
from _path import write_text
```



---
## write_bytes
```python
from _path import write_bytes
```



---
## symlink_to
```python
from _path import symlink_to
```



---
## __name__
```python
from test_reader import __name__
```



---
## MultiplexedPathTest
```python
from test_reader import MultiplexedPathTest
```



---
## NamespaceReaderTest
```python
from test_reader import NamespaceReaderTest
```



---
## setUp
```python
from test_reader import setUp
```



---
## test_init_no_paths
```python
from test_reader import test_init_no_paths
```



---
## test_init_file
```python
from test_reader import test_init_file
```



---
## test_iterdir
```python
from test_reader import test_iterdir
```



---
## test_iterdir_duplicate
```python
from test_reader import test_iterdir_duplicate
```



---
## test_is_dir
```python
from test_reader import test_is_dir
```



---
## test_is_file
```python
from test_reader import test_is_file
```



---
## test_open_file
```python
from test_reader import test_open_file
```



---
## test_join_path
```python
from test_reader import test_join_path
```



---
## test_join_path_compound
```python
from test_reader import test_join_path_compound
```



---
## test_join_path_common_subdir
```python
from test_reader import test_join_path_common_subdir
```



---
## test_repr
```python
from test_reader import test_repr
```



---
## test_name
```python
from test_reader import test_name
```



---
## test_init_error
```python
from test_reader import test_init_error
```



---
## test_resource_path
```python
from test_reader import test_resource_path
```



---
## test_files
```python
from test_reader import test_files
```



---
## __name__
```python
from test_compatibilty_files import __name__
```



---
## CompatibilityFilesTests
```python
from test_compatibilty_files import CompatibilityFilesTests
```



---
## CompatibilityFilesNoReaderTests
```python
from test_compatibilty_files import CompatibilityFilesNoReaderTests
```



---
## package
```python
from test_compatibilty_files import package
```



---
## files
```python
from test_compatibilty_files import files
```



---
## test_spec_path_iter
```python
from test_compatibilty_files import test_spec_path_iter
```



---
## test_child_path_iter
```python
from test_compatibilty_files import test_child_path_iter
```



---
## test_orphan_path_iter
```python
from test_compatibilty_files import test_orphan_path_iter
```



---
## test_spec_path_is
```python
from test_compatibilty_files import test_spec_path_is
```



---
## test_child_path_is
```python
from test_compatibilty_files import test_child_path_is
```



---
## test_orphan_path_is
```python
from test_compatibilty_files import test_orphan_path_is
```



---
## test_spec_path_name
```python
from test_compatibilty_files import test_spec_path_name
```



---
## test_child_path_name
```python
from test_compatibilty_files import test_child_path_name
```



---
## test_orphan_path_name
```python
from test_compatibilty_files import test_orphan_path_name
```



---
## test_spec_path_open
```python
from test_compatibilty_files import test_spec_path_open
```



---
## test_child_path_open
```python
from test_compatibilty_files import test_child_path_open
```



---
## test_orphan_path_open
```python
from test_compatibilty_files import test_orphan_path_open
```



---
## test_open_invalid_mode
```python
from test_compatibilty_files import test_open_invalid_mode
```



---
## test_orphan_path_invalid
```python
from test_compatibilty_files import test_orphan_path_invalid
```



---
## test_wrap_spec
```python
from test_compatibilty_files import test_wrap_spec
```



---
## test_spec_path_joinpath
```python
from test_compatibilty_files import test_spec_path_joinpath
```



---
## __name__
```python
from test_resource import __name__
```



---
## ResourceTests
```python
from test_resource import ResourceTests
```



---
## ResourceDiskTests
```python
from test_resource import ResourceDiskTests
```



---
## ResourceZipTests
```python
from test_resource import ResourceZipTests
```



---
## names
```python
from test_resource import names
```



---
## ResourceLoaderTests
```python
from test_resource import ResourceLoaderTests
```



---
## ResourceCornerCaseTests
```python
from test_resource import ResourceCornerCaseTests
```



---
## ResourceFromZipsTest01
```python
from test_resource import ResourceFromZipsTest01
```



---
## ResourceFromZipsTest02
```python
from test_resource import ResourceFromZipsTest02
```



---
## DeletingZipsTest
```python
from test_resource import DeletingZipsTest
```

Having accessed resources in a zip file should not keep an open
reference to the zip.

---
## ResourceFromNamespaceTests
```python
from test_resource import ResourceFromNamespaceTests
```



---
## ResourceFromNamespaceDiskTests
```python
from test_resource import ResourceFromNamespaceDiskTests
```



---
## ResourceFromNamespaceZipTests
```python
from test_resource import ResourceFromNamespaceZipTests
```



---
## test_is_file_exists
```python
from test_resource import test_is_file_exists
```



---
## test_is_file_missing
```python
from test_resource import test_is_file_missing
```



---
## test_is_dir
```python
from test_resource import test_is_dir
```



---
## test_resource_contents
```python
from test_resource import test_resource_contents
```



---
## test_is_file
```python
from test_resource import test_is_file
```



---
## test_resource_missing
```python
from test_resource import test_resource_missing
```



---
## test_package_has_no_reader_fallback
```python
from test_resource import test_package_has_no_reader_fallback
```

Test odd ball packages which:
# 1. Do not have a ResourceReader as a loader
# 2. Are not on the file system
# 3. Are not in a zip file

---
## test_is_submodule_resource
```python
from test_resource import test_is_submodule_resource
```



---
## test_read_submodule_resource_by_name
```python
from test_resource import test_read_submodule_resource_by_name
```



---
## test_submodule_contents
```python
from test_resource import test_submodule_contents
```



---
## test_submodule_contents_by_name
```python
from test_resource import test_submodule_contents_by_name
```



---
## test_as_file_directory
```python
from test_resource import test_as_file_directory
```



---
## test_unrelated_contents
```python
from test_resource import test_unrelated_contents
```

Test thata zip with two unrelated subpackages return
distinct resources. Ref python/importlib_resources#44.

---
## test_iterdir_does_not_keep_open
```python
from test_resource import test_iterdir_does_not_keep_open
```



---
## test_is_file_does_not_keep_open
```python
from test_resource import test_is_file_does_not_keep_open
```



---
## test_is_file_failure_does_not_keep_open
```python
from test_resource import test_is_file_failure_does_not_keep_open
```



---
## test_as_file_does_not_keep_open
```python
from test_resource import test_as_file_does_not_keep_open
```



---
## test_entered_path_does_not_keep_open
```python
from test_resource import test_entered_path_does_not_keep_open
```

Mimic what certifi does on import to make its bundle
available for the process duration.

---
## test_read_binary_does_not_keep_open
```python
from test_resource import test_read_binary_does_not_keep_open
```



---
## test_read_text_does_not_keep_open
```python
from test_resource import test_read_text_does_not_keep_open
```



---
## test_submodule_sub_contents
```python
from test_resource import test_submodule_sub_contents
```



---
## test_submodule_sub_contents_by_name
```python
from test_resource import test_submodule_sub_contents_by_name
```



---
## Reader
```python
from util import Reader
```



---
## create_package_from_loader
```python
from util import create_package_from_loader
```



---
## create_package
```python
from util import create_package
```



---
## CommonTestsBase
```python
from util import CommonTestsBase
```

Tests shared by test_open, test_path, and test_read.

---
## ModuleSetup
```python
from util import ModuleSetup
```



---
## ZipSetup
```python
from util import ZipSetup
```



---
## DiskSetup
```python
from util import DiskSetup
```



---
## CommonTests
```python
from util import CommonTests
```



---
## get_resource_reader
```python
from util import get_resource_reader
```



---
## open_resource
```python
from util import open_resource
```



---
## resource_path
```python
from util import resource_path
```



---
## is_resource
```python
from util import is_resource
```



---
## contents
```python
from util import contents
```



---
## execute
```python
from util import execute
```

Call the pertinent legacy API function (e.g. open_text, path)
on package and path.

---
## test_package_name
```python
from util import test_package_name
```

Passing in the package name should succeed.

---
## test_package_object
```python
from util import test_package_object
```

Passing in the package itself should succeed.

---
## test_string_path
```python
from util import test_string_path
```

Passing in a string for the path should succeed.

---
## test_pathlib_path
```python
from util import test_pathlib_path
```

Passing in a pathlib.PurePath object for the path should succeed.

---
## test_importing_module_as_side_effect
```python
from util import test_importing_module_as_side_effect
```

The anchor package can already be imported.

---
## test_missing_path
```python
from util import test_missing_path
```

Attempting to open or read or request the path for a
non-existent path should succeed if open_resource
can return a viable data stream.

---
## test_extant_path
```python
from util import test_extant_path
```



---
## test_useless_loader
```python
from util import test_useless_loader
```



---
## setUp
```python
from util import setUp
```



---
## load_fixture
```python
from util import load_fixture
```



---
## tree_on_path
```python
from util import tree_on_path
```



---
## part
```python
from util import part
```



---
## __name__
```python
from test_functional import __name__
```



---
## StringAnchorMixin
```python
from test_functional import StringAnchorMixin
```



---
## ModuleAnchorMixin
```python
from test_functional import ModuleAnchorMixin
```



---
## FunctionalAPIBase
```python
from test_functional import FunctionalAPIBase
```



---
## FunctionalAPITest_StringAnchor
```python
from test_functional import FunctionalAPITest_StringAnchor
```



---
## FunctionalAPITest_ModuleAnchor
```python
from test_functional import FunctionalAPITest_ModuleAnchor
```



---
## anchor01
```python
from test_functional import anchor01
```



---
## anchor02
```python
from test_functional import anchor02
```



---
## setUp
```python
from test_functional import setUp
```



---
## _gen_resourcetxt_path_parts
```python
from test_functional import _gen_resourcetxt_path_parts
```

Yield various names of a text file in anchor02, each in a subTest

---
## assertEndsWith
```python
from test_functional import assertEndsWith
```

Assert that `string` ends with `suffix`.

Used to ignore an architecture-specific UTF-16 byte-order mark.

---
## test_read_text
```python
from test_functional import test_read_text
```



---
## test_read_binary
```python
from test_functional import test_read_binary
```



---
## test_open_text
```python
from test_functional import test_open_text
```



---
## test_open_binary
```python
from test_functional import test_open_binary
```



---
## test_path
```python
from test_functional import test_path
```



---
## test_is_resource
```python
from test_functional import test_is_resource
```



---
## test_contents
```python
from test_functional import test_contents
```



---
## test_common_errors
```python
from test_functional import test_common_errors
```



---
## test_text_errors
```python
from test_functional import test_text_errors
```



---
## __name__
```python
from test_contents import __name__
```



---
## ContentsTests
```python
from test_contents import ContentsTests
```



---
## ContentsDiskTests
```python
from test_contents import ContentsDiskTests
```



---
## ContentsZipTests
```python
from test_contents import ContentsZipTests
```



---
## ContentsNamespaceTests
```python
from test_contents import ContentsNamespaceTests
```



---
## test_contents
```python
from test_contents import test_contents
```



---
## make_zip_file
```python
from zip import make_zip_file
```

Zip the files in tree into a new zipfile at dst.

---
## walk
```python
from zip import walk
```



---
## __name__
```python
from test_files import __name__
```



---
## suppress_known_deprecation
```python
from test_files import suppress_known_deprecation
```



---
## FilesTests
```python
from test_files import FilesTests
```



---
## OpenDiskTests
```python
from test_files import OpenDiskTests
```



---
## OpenZipTests
```python
from test_files import OpenZipTests
```



---
## OpenNamespaceTests
```python
from test_files import OpenNamespaceTests
```



---
## OpenNamespaceZipTests
```python
from test_files import OpenNamespaceZipTests
```



---
## DirectSpec
```python
from test_files import DirectSpec
```

Override behavior of ModuleSetup to write a full spec directly.

---
## ModulesFiles
```python
from test_files import ModulesFiles
```



---
## ModuleFilesDiskTests
```python
from test_files import ModuleFilesDiskTests
```



---
## ModuleFilesZipTests
```python
from test_files import ModuleFilesZipTests
```



---
## ImplicitContextFiles
```python
from test_files import ImplicitContextFiles
```



---
## ImplicitContextFilesDiskTests
```python
from test_files import ImplicitContextFilesDiskTests
```



---
## ImplicitContextFilesZipTests
```python
from test_files import ImplicitContextFilesZipTests
```



---
## test_read_bytes
```python
from test_files import test_read_bytes
```



---
## test_read_text
```python
from test_files import test_read_text
```



---
## test_traversable
```python
from test_files import test_traversable
```



---
## test_joinpath_with_multiple_args
```python
from test_files import test_joinpath_with_multiple_args
```



---
## test_old_parameter
```python
from test_files import test_old_parameter
```

Files used to take a 'package' parameter. Make sure anyone
passing by name is still supported.

---
## test_non_paths_in_dunder_path
```python
from test_files import test_non_paths_in_dunder_path
```

Non-path items in a namespace package's ``__path__`` are ignored.

As reported in python/importlib_resources#311, some tools
like Setuptools, when creating editable packages, will inject
non-paths into a namespace package's ``__path__``, a
sentinel like
``__editable__.sample_namespace-1.0.finder.__path_hook__``
to cause the ``PathEntryFinder`` to be called when searching
for packages. In that case, resources should still be loadable.

---
## load_fixture
```python
from test_files import load_fixture
```



---
## test_module_resources
```python
from test_files import test_module_resources
```

A module can have resources found adjacent to the module.

---
## test_implicit_files_package
```python
from test_files import test_implicit_files_package
```

Without any parameter, files() will infer the location as the caller.

---
## test_implicit_files_submodule
```python
from test_files import test_implicit_files_submodule
```

Without any parameter, files() will infer the location as the caller.

---
## _compile_importlib
```python
from test_files import _compile_importlib
```

Make a compiled-only copy of the importlib resources package.

---
## test_implicit_files_with_compiled_importlib
```python
from test_files import test_implicit_files_with_compiled_importlib
```

Caller detection works for compiled-only resources module.

python/cpython#123085

---
## __name__
```python
from test_open import __name__
```



---
## CommonBinaryTests
```python
from test_open import CommonBinaryTests
```



---
## CommonTextTests
```python
from test_open import CommonTextTests
```



---
## OpenTests
```python
from test_open import OpenTests
```



---
## OpenDiskTests
```python
from test_open import OpenDiskTests
```



---
## OpenDiskNamespaceTests
```python
from test_open import OpenDiskNamespaceTests
```



---
## OpenZipTests
```python
from test_open import OpenZipTests
```



---
## OpenNamespaceZipTests
```python
from test_open import OpenNamespaceZipTests
```



---
## execute
```python
from test_open import execute
```



---
## test_open_binary
```python
from test_open import test_open_binary
```



---
## test_open_text_default_encoding
```python
from test_open import test_open_text_default_encoding
```



---
## test_open_text_given_encoding
```python
from test_open import test_open_text_given_encoding
```



---
## test_open_text_with_errors
```python
from test_open import test_open_text_with_errors
```

Raises UnicodeError without the 'errors' argument.

---
## test_open_binary_FileNotFoundError
```python
from test_open import test_open_binary_FileNotFoundError
```



---
## test_open_text_FileNotFoundError
```python
from test_open import test_open_text_FileNotFoundError
```



---
## __name__
```python
from test_custom import __name__
```



---
## SimpleLoader
```python
from test_custom import SimpleLoader
```

A simple loader that only implements a resource reader.

---
## MagicResources
```python
from test_custom import MagicResources
```

Magically returns the resources at path.

---
## CustomTraversableResourcesTests
```python
from test_custom import CustomTraversableResourcesTests
```



---
## __init__
```python
from test_custom import __init__
```



---
## get_resource_reader
```python
from test_custom import get_resource_reader
```



---
## files
```python
from test_custom import files
```



---
## setUp
```python
from test_custom import setUp
```



---
## test_custom_loader
```python
from test_custom import test_custom_loader
```



---
## __name__
```python
from test_read import __name__
```



---
## CommonBinaryTests
```python
from test_read import CommonBinaryTests
```



---
## CommonTextTests
```python
from test_read import CommonTextTests
```



---
## ReadTests
```python
from test_read import ReadTests
```



---
## ReadDiskTests
```python
from test_read import ReadDiskTests
```



---
## ReadZipTests
```python
from test_read import ReadZipTests
```



---
## ReadNamespaceTests
```python
from test_read import ReadNamespaceTests
```



---
## ReadNamespaceZipTests
```python
from test_read import ReadNamespaceZipTests
```



---
## execute
```python
from test_read import execute
```



---
## test_read_bytes
```python
from test_read import test_read_bytes
```



---
## test_read_text_default_encoding
```python
from test_read import test_read_text_default_encoding
```



---
## test_read_text_given_encoding
```python
from test_read import test_read_text_given_encoding
```



---
## test_read_text_with_errors
```python
from test_read import test_read_text_with_errors
```

Raises UnicodeError without the 'errors' argument.

---
## test_read_submodule_resource
```python
from test_read import test_read_submodule_resource
```



---
## test_read_submodule_resource_by_name
```python
from test_read import test_read_submodule_resource_by_name
```



---
## __name__
```python
from test_path import __name__
```



---
## CommonTests
```python
from test_path import CommonTests
```



---
## PathTests
```python
from test_path import PathTests
```



---
## PathDiskTests
```python
from test_path import PathDiskTests
```



---
## PathMemoryTests
```python
from test_path import PathMemoryTests
```



---
## PathZipTests
```python
from test_path import PathZipTests
```



---
## execute
```python
from test_path import execute
```



---
## test_reading
```python
from test_path import test_reading
```

Path should be readable and a pathlib.Path instance.

---
## test_natural_path
```python
from test_path import test_natural_path
```

Guarantee the internal implementation detail that
file-system-backed resources do not get the tempdir
treatment.

---
## setUp
```python
from test_path import setUp
```



---
## test_remove_in_context_manager
```python
from test_path import test_remove_in_context_manager
```

It is not an error if the file that was temporarily stashed on the
file system is removed inside the `with` stanza.

---
## _block_standard
```python
from adapters import _block_standard
```

Wrap _adapters.TraversableResourcesLoader.get_resource_reader
and intercept any standard library readers.

---
## _skip_degenerate
```python
from adapters import _skip_degenerate
```

Mask any degenerate reader. Ref #298.

---
## TraversableResourcesLoader
```python
from adapters import TraversableResourcesLoader
```

Adapt loaders to provide TraversableResources and other
compatibility.

Ensures the readers from importlib_resources are preferred
over stdlib readers.

---
## wrap_spec
```python
from adapters import wrap_spec
```

Override _adapters.wrap_spec to use TraversableResourcesLoader
from above. Ensures that future behavior is always available on older
Pythons.

---
## wrapper
```python
from adapters import wrapper
```

If the reader is from the standard library, return None to allow
allow likely newer implementations in this library to take precedence.

---
## get_resource_reader
```python
from adapters import get_resource_reader
```



---
## _standard_reader
```python
from adapters import _standard_reader
```



---
## _zip_reader
```python
from adapters import _zip_reader
```



---
## _namespace_reader
```python
from adapters import _namespace_reader
```



---
## _file_reader
```python
from adapters import _file_reader
```



---
## __name__
```python
from py312 import __name__
```



---
## isolated_modules
```python
from py312 import isolated_modules
```

Save modules on entry and cleanup on exit.

---
## __name__
```python
from _build_config import __name__
```



---
## build_config
```python
from _build_config import build_config
```

Return a dictionary containing build configuration settings.

All dictionary keys and values are strings, for example ``False`` is
returned as ``"False"``.

    .. versionadded:: 1.1.0

---
## __name__
```python
from bokeh_util import __name__
```



---
## filled_to_bokeh
```python
from bokeh_util import filled_to_bokeh
```



---
## lines_to_bokeh
```python
from bokeh_util import lines_to_bokeh
```



---
## __name__
```python
from mpl_renderer import __name__
```



---
## MplRenderer
```python
from mpl_renderer import MplRenderer
```

Utility renderer using Matplotlib to render a grid of plots over the same (x, y) range.

Args:
    nrows (int, optional): Number of rows of plots, default ``1``.
    ncols (int, optional): Number of columns of plots, default ``1``.
    figsize (tuple(float, float), optional): Figure size in inches, default ``(9, 9)``.
    show_frame (bool, optional): Whether to show frame and axes ticks, default ``True``.
    backend (str, optional): Matplotlib backend to use or ``None`` for default backend.
        Default ``None``.
    gridspec_kw (dict, optional): Gridspec keyword arguments to pass to ``plt.subplots``,
        default None.

---
## MplTestRenderer
```python
from mpl_renderer import MplTestRenderer
```

Test renderer implemented using Matplotlib.

No whitespace around plots and no spines/ticks displayed.
Uses Agg backend, so can only save to file/buffer, cannot call ``show()``.

---
## MplDebugRenderer
```python
from mpl_renderer import MplDebugRenderer
```

Debug renderer implemented using Matplotlib.

Extends ``MplRenderer`` to add extra information to help in debugging such as markers, arrows,
text, etc.

---
## __init__
```python
from mpl_renderer import __init__
```



---
## __del__
```python
from mpl_renderer import __del__
```



---
## _autoscale
```python
from mpl_renderer import _autoscale
```



---
## _get_ax
```python
from mpl_renderer import _get_ax
```



---
## filled
```python
from mpl_renderer import filled
```



---
## grid
```python
from mpl_renderer import grid
```

Plot quad grid lines on a single Axes.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    ax (int or Matplotlib Axes, optional): Which Axes to plot on, default ``0``.
    color (str, optional): Color to plot grid lines, default ``"black"``.
    alpha (float, optional): Opacity to plot lines with, default ``0.1``.
    point_color (str, optional): Color to plot grid points or ``None`` if grid points
        should not be plotted, default ``None``.
    quad_as_tri_alpha (float, optional): Opacity to plot ``quad_as_tri`` grid, default 0.

Colors may be a string color or the letter ``"C"`` followed by an integer in the range
``"C0"`` to ``"C9"`` to use a color from the ``tab10`` colormap.

Warning:
    ``quad_as_tri_alpha > 0`` plots all quads as though they are unmasked.

---
## lines
```python
from mpl_renderer import lines
```



---
## mask
```python
from mpl_renderer import mask
```

Plot masked out grid points as circles on a single Axes.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (masked array of shape (ny, nx): z-values.
    ax (int or Matplotlib Axes, optional): Which Axes to plot on, default ``0``.
    color (str, optional): Circle color, default ``"black"``.

---
## save
```python
from mpl_renderer import save
```

Save plots to SVG or PNG file.

Args:
    filename (str): Filename to save to.
    transparent (bool, optional): Whether background should be transparent, default
        ``False``.

---
## save_to_buffer
```python
from mpl_renderer import save_to_buffer
```

Save plots to an ``io.BytesIO`` buffer.

Return:
    BytesIO: PNG image buffer.

---
## show
```python
from mpl_renderer import show
```

Show plots in an interactive window, in the usual Matplotlib manner.
        

---
## title
```python
from mpl_renderer import title
```

Set the title of a single Axes.

Args:
    title (str): Title text.
    ax (int or Matplotlib Axes, optional): Which Axes to set the title of, default ``0``.
    color (str, optional): Color to set title. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``tab10`` colormap. Default is ``None`` which uses Matplotlib's default title color
        that depends on the stylesheet in use.

---
## z_values
```python
from mpl_renderer import z_values
```

Show ``z`` values on a single Axes.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (array-like of shape (ny, nx): z-values.
    ax (int or Matplotlib Axes, optional): Which Axes to plot on, default ``0``.
    color (str, optional): Color of added text. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``tab10`` colormap. Default ``"green"``.
    fmt (str, optional): Format to display z-values, default ``".1f"``.
    quad_as_tri (bool, optional): Whether to show z-values at the ``quad_as_tri`` centers
        of quads.

Warning:
    ``quad_as_tri=True`` shows z-values for all quads, even if masked.

---
## _arrow
```python
from mpl_renderer import _arrow
```



---
## point_numbers
```python
from mpl_renderer import point_numbers
```



---
## quad_numbers
```python
from mpl_renderer import quad_numbers
```



---
## z_levels
```python
from mpl_renderer import z_levels
```



---
## __name__
```python
from mpl_util import __name__
```



---
## filled_to_mpl_paths
```python
from mpl_util import filled_to_mpl_paths
```



---
## lines_to_mpl_paths
```python
from mpl_util import lines_to_mpl_paths
```



---
## Renderer
```python
from renderer import Renderer
```

Abstract base class for renderers.

---
## _grid_as_2d
```python
from renderer import _grid_as_2d
```



---
## filled
```python
from renderer import filled
```



---
## grid
```python
from renderer import grid
```



---
## lines
```python
from renderer import lines
```



---
## mask
```python
from renderer import mask
```



---
## multi_filled
```python
from renderer import multi_filled
```

Plot multiple sets of filled contours on a single axes.

Args:
    multi_filled (list of filled contour arrays): Multiple filled contour sets as returned
        by :meth:`.ContourGenerator.multi_filled`.
    fill_type (FillType or str): Type of filled data as returned by
        :attr:`~.ContourGenerator.fill_type`, or string equivalent.
    ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
        default ``0``.
    color (str or None, optional): If a string color then this same color is used for all
        filled contours. If ``None``, the default, then the filled contour sets use colors
        from the ``tab10`` colormap in order, wrapping around to the beginning if more than
        10 sets of filled contours are rendered.
    kwargs: All other keyword argument are passed on to
        :meth:`.Renderer.filled` unchanged.

.. versionadded:: 1.3.0

---
## multi_lines
```python
from renderer import multi_lines
```

Plot multiple sets of contour lines on a single axes.

Args:
    multi_lines (list of contour line arrays): Multiple contour line sets as returned by
        :meth:`.ContourGenerator.multi_lines`.
    line_type (LineType or str): Type of line data as returned by
        :attr:`~.ContourGenerator.line_type`, or string equivalent.
    ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
        default ``0``.
    color (str or None, optional): If a string color then this same color is used for all
        lines. If ``None``, the default, then the line sets use colors from the ``tab10``
        colormap in order, wrapping around to the beginning if more than 10 sets of lines
        are rendered.
    kwargs: All other keyword argument are passed on to
        :meth:`Renderer.lines` unchanged.

.. versionadded:: 1.3.0

---
## save
```python
from renderer import save
```



---
## save_to_buffer
```python
from renderer import save_to_buffer
```



---
## show
```python
from renderer import show
```



---
## title
```python
from renderer import title
```



---
## z_values
```python
from renderer import z_values
```



---
## __name__
```python
from bokeh_renderer import __name__
```



---
## BokehRenderer
```python
from bokeh_renderer import BokehRenderer
```

Utility renderer using Bokeh to render a grid of plots over the same (x, y) range.

Args:
    nrows (int, optional): Number of rows of plots, default ``1``.
    ncols (int, optional): Number of columns of plots, default ``1``.
    figsize (tuple(float, float), optional): Figure size in inches (assuming 100 dpi), default
        ``(9, 9)``.
    show_frame (bool, optional): Whether to show frame and axes ticks, default ``True``.
    want_svg (bool, optional): Whether output is required in SVG format or not, default
        ``False``.

Warning:
    :class:`~.BokehRenderer`, unlike :class:`~.MplRenderer`, needs to be told in advance if
    output to SVG format will be required later, otherwise it will assume PNG output.

---
## __init__
```python
from bokeh_renderer import __init__
```



---
## _convert_color
```python
from bokeh_renderer import _convert_color
```



---
## _get_figure
```python
from bokeh_renderer import _get_figure
```



---
## filled
```python
from bokeh_renderer import filled
```

Plot filled contours on a single plot.

Args:
    filled (sequence of arrays): Filled contour data as returned by
        :meth:`~.ContourGenerator.filled`.
    fill_type (FillType or str): Type of :meth:`~.ContourGenerator.filled` data as returned
        by :attr:`~.ContourGenerator.fill_type`, or a string equivalent.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot with. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"C0"``.
    alpha (float, optional): Opacity to plot with, default ``0.7``.

---
## grid
```python
from bokeh_renderer import grid
```

Plot quad grid lines on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot grid lines, default ``"black"``.
    alpha (float, optional): Opacity to plot lines with, default ``0.1``.
    point_color (str, optional): Color to plot grid points or ``None`` if grid points
        should not be plotted, default ``None``.
    quad_as_tri_alpha (float, optional): Opacity to plot ``quad_as_tri`` grid, default
        ``0``.

Colors may be a string color or the letter ``"C"`` followed by an integer in the range
``"C0"`` to ``"C9"`` to use a color from the ``Category10`` palette.

Warning:
    ``quad_as_tri_alpha > 0`` plots all quads as though they are unmasked.

---
## lines
```python
from bokeh_renderer import lines
```

Plot contour lines on a single plot.

Args:
    lines (sequence of arrays): Contour line data as returned by
        :meth:`~.ContourGenerator.lines`.
    line_type (LineType or str): Type of :meth:`~.ContourGenerator.lines` data as returned
        by :attr:`~.ContourGenerator.line_type`, or a string equivalent.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot lines. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"C0"``.
    alpha (float, optional): Opacity to plot lines with, default ``1.0``.
    linewidth (float, optional): Width of lines, default ``1``.

Note:
    Assumes all lines are open line strips not closed line loops.

---
## mask
```python
from bokeh_renderer import mask
```

Plot masked out grid points as circles on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (masked array of shape (ny, nx): z-values.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Circle color, default ``"black"``.

---
## save
```python
from bokeh_renderer import save
```

Save plots to SVG or PNG file.

Args:
    filename (str): Filename to save to.
    transparent (bool, optional): Whether background should be transparent, default
        ``False``.
    webdriver (WebDriver, optional): Selenium WebDriver instance to use to create the image.

        .. versionadded:: 1.1.1

Warning:
    To output to SVG file, ``want_svg=True`` must have been passed to the constructor.

---
## save_to_buffer
```python
from bokeh_renderer import save_to_buffer
```

Save plots to an ``io.BytesIO`` buffer.

Args:
    webdriver (WebDriver, optional): Selenium WebDriver instance to use to create the image.

        .. versionadded:: 1.1.1

Return:
    BytesIO: PNG image buffer.

---
## show
```python
from bokeh_renderer import show
```

Show plots in web browser, in usual Bokeh manner.
        

---
## title
```python
from bokeh_renderer import title
```

Set the title of a single plot.

Args:
    title (str): Title text.
    ax (int or Bokeh Figure, optional): Which plot to set the title of, default ``0``.
    color (str, optional): Color to set title. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``None`` which is ``black``.

---
## z_values
```python
from bokeh_renderer import z_values
```

Show ``z`` values on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (array-like of shape (ny, nx): z-values.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color of added text. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"green"``.
    fmt (str, optional): Format to display z-values, default ``".1f"``.
    quad_as_tri (bool, optional): Whether to show z-values at the ``quad_as_tri`` centres
        of quads.

Warning:
    ``quad_as_tri=True`` shows z-values for all quads, even if masked.

---
## simple
```python
from data import simple
```

Return simple test data consisting of the sum of two gaussians.

Args:
    shape (tuple(int, int)): 2D shape of data to return.
    want_mask (bool, optional): Whether test data should be masked or not, default ``False``.

Return:
    Tuple of 3 arrays: ``x``, ``y``, ``z`` test data, ``z`` will be masked if
    ``want_mask=True``.

---
## random
```python
from data import random
```

Return random test data in the range 0 to 1.

Args:
    shape (tuple(int, int)): 2D shape of data to return.
    seed (int, optional): Seed for random number generator, default 2187.
    mask_fraction (float, optional): Fraction of elements to mask, default 0.

Return:
    Tuple of 3 arrays: ``x``, ``y``, ``z`` test data, ``z`` will be masked if
    ``mask_fraction`` is greater than zero.

---
## __name__
```python
from asgi import __name__
```



---
## create_event
```python
from asgi import create_event
```



---
## ASGIResponseStream
```python
from asgi import ASGIResponseStream
```



---
## ASGITransport
```python
from asgi import ASGITransport
```

A custom AsyncTransport that handles sending requests directly to an ASGI app.

```python
transport = httpx.ASGITransport(
    app=app,
    root_path="/submount",
    client=("1.2.3.4", 123)
)
client = httpx.AsyncClient(transport=transport)
```

Arguments:

* `app` - The ASGI application.
* `raise_app_exceptions` - Boolean indicating if exceptions in the application
   should be raised. Default to `True`. Can be set to `False` for use cases
   such as testing the content of a client 500 response.
* `root_path` - The root path on which the ASGI application should be mounted.
* `client` - A two-tuple indicating the client IP and port of incoming requests.
```

---
## __init__
```python
from asgi import __init__
```



---
## map_httpcore_exceptions
```python
from default import map_httpcore_exceptions
```



---
## ResponseStream
```python
from default import ResponseStream
```



---
## HTTPTransport
```python
from default import HTTPTransport
```



---
## AsyncResponseStream
```python
from default import AsyncResponseStream
```



---
## AsyncHTTPTransport
```python
from default import AsyncHTTPTransport
```



---
## __iter__
```python
from default import __iter__
```



---
## close
```python
from default import close
```



---
## __enter__
```python
from default import __enter__
```



---
## __exit__
```python
from default import __exit__
```



---
## handle_request
```python
from default import handle_request
```



---
## BaseTransport
```python
from base import BaseTransport
```



---
## AsyncBaseTransport
```python
from base import AsyncBaseTransport
```



---
## __enter__
```python
from base import __enter__
```



---
## __exit__
```python
from base import __exit__
```



---
## handle_request
```python
from base import handle_request
```

Send a single HTTP request and return a response.

Developers shouldn't typically ever need to call into this API directly,
since the Client class provides all the higher level user-facing API
niceties.

In order to properly release any network resources, the response
stream should *either* be consumed immediately, with a call to
`response.stream.read()`, or else the `handle_request` call should
be followed with a try/finally block to ensuring the stream is
always closed.

Example usage:

    with httpx.HTTPTransport() as transport:
        req = httpx.Request(
            method=b"GET",
            url=(b"https", b"www.example.com", 443, b"/"),
            headers=[(b"Host", b"www.example.com")],
        )
        resp = transport.handle_request(req)
        body = resp.stream.read()
        print(resp.status_code, resp.headers, body)


Takes a `Request` instance as the only argument.

Returns a `Response` instance.

---
## MockTransport
```python
from mock import MockTransport
```



---
## handle_request
```python
from mock import handle_request
```



---
## _skip_leading_empty_chunks
```python
from wsgi import _skip_leading_empty_chunks
```



---
## WSGIByteStream
```python
from wsgi import WSGIByteStream
```



---
## WSGITransport
```python
from wsgi import WSGITransport
```

A custom transport that handles sending requests directly to an WSGI app.
The simplest way to use this functionality is to use the `app` argument.

```
client = httpx.Client(app=app)
```

Alternatively, you can setup the transport instance explicitly.
This allows you to include any additional configuration arguments specific
to the WSGITransport class:

```
transport = httpx.WSGITransport(
    app=app,
    script_name="/submount",
    remote_addr="1.2.3.4"
)
client = httpx.Client(transport=transport)
```

Arguments:

* `app` - The WSGI application.
* `raise_app_exceptions` - Boolean indicating if exceptions in the application
   should be raised. Default to `True`. Can be set to `False` for use cases
   such as testing the content of a client 500 response.
* `script_name` - The root path on which the WSGI application should be mounted.
* `remote_addr` - A string indicating the client IP of incoming requests.
```

---
## __iter__
```python
from wsgi import __iter__
```



---
## close
```python
from wsgi import close
```



---
## handle_request
```python
from wsgi import handle_request
```



---
## __name__
```python
from test_sniffio import __name__
```



---
## test_basics_cvar
```python
from test_sniffio import test_basics_cvar
```



---
## test_basics_tlocal
```python
from test_sniffio import test_basics_tlocal
```



---
## test_asyncio
```python
from test_sniffio import test_asyncio
```



---
## test_curio
```python
from test_sniffio import test_curio
```



---
## _match_path
```python
from patterns import _match_path
```

Internal function same as :func:`match_path` but does not check arguments.

---
## filter_paths
```python
from patterns import filter_paths
```

Filters from a set of paths based on acceptable patterns and
ignorable patterns.
:param paths:
    A list of path names that will be filtered based on matching and
    ignored patterns.
:param included_patterns:
    Allow filenames matching wildcard patterns specified in this list.
    If no pattern list is specified, ["*"] is used as the default pattern,
    which matches all files.
:param excluded_patterns:
    Ignores filenames matching wildcard patterns specified in this list.
    If no pattern list is specified, no files are ignored.
:param case_sensitive:
    ``True`` if matching should be case-sensitive; ``False`` otherwise.
:returns:
    A list of pathnames that matched the allowable patterns and passed
    through the ignored patterns.

---
## match_any_paths
```python
from patterns import match_any_paths
```

Matches from a set of paths based on acceptable patterns and
ignorable patterns.
See ``filter_paths()`` for signature details.

---
## UnsupportedLibcError
```python
from __init__ import UnsupportedLibcError
```



---
## WatchdogShutdownError
```python
from __init__ import WatchdogShutdownError
```

Semantic exception used to signal an external shutdown event.

---
## BaseThread
```python
from __init__ import BaseThread
```

Convenience class for creating stoppable threads.

---
## load_class
```python
from __init__ import load_class
```

Loads and returns a class definition provided a dotted path
specification the last part of the dotted path is the class name
and there is at least one module name preceding the class name.

Notes
-----
You will need to ensure that the module you are trying to load
exists in the Python path.

Examples
--------
- module.name.ClassName    # Provided module.name is in the Python path.
- module.ClassName         # Provided module is in the Python path.

What won't work:
- ClassName
- modle.name.ClassName     # Typo in module name.
- module.name.ClasNam      # Typo in classname.

---
## stopped_event
```python
from __init__ import stopped_event
```



---
## should_keep_running
```python
from __init__ import should_keep_running
```

Determines whether the thread should continue running.

---
## on_thread_stop
```python
from __init__ import on_thread_stop
```

Override this method instead of :meth:`stop()`.
:meth:`stop()` calls this method.

This method is called immediately after the thread is signaled to stop.

---
## on_thread_start
```python
from __init__ import on_thread_start
```

Override this method instead of :meth:`start()`. :meth:`start()`
calls this method.

This method is called right before this thread is started and this
object's run() method is invoked.

---
## __name__
```python
from event_debouncer import __name__
```



---
## EventDebouncer
```python
from event_debouncer import EventDebouncer
```

Background thread for debouncing event handling.

When an event is received, wait until the configured debounce interval
passes before calling the callback.  If additional events are received
before the interval passes, reset the timer and keep waiting.  When the
debouncing interval passes, the callback will be called with a list of
events in the order in which they were received.

---
## __init__
```python
from event_debouncer import __init__
```



---
## handle_event
```python
from event_debouncer import handle_event
```



---
## stop
```python
from event_debouncer import stop
```



---
## run
```python
from event_debouncer import run
```



---
## __name__
```python
from dirsnapshot import __name__
```

:module: watchdog.utils.dirsnapshot
:synopsis: Directory snapshots and comparison.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

.. ADMONITION:: Where are the moved events? They "disappeared"

        This implementation does not take partition boundaries
        into consideration. It will only work when the directory
        tree is entirely on the same file system. More specifically,
        any part of the code that depends on inode numbers can
        break if partition boundaries are crossed. In these cases,
        the snapshot diff will represent file/directory movement as
        created and deleted events.

Classes
-------
.. autoclass:: DirectorySnapshot
   :members:
   :show-inheritance:

.. autoclass:: DirectorySnapshotDiff
   :members:
   :show-inheritance:

.. autoclass:: EmptyDirectorySnapshot
   :members:
   :show-inheritance:

---
## DirectorySnapshotDiff
```python
from dirsnapshot import DirectorySnapshotDiff
```

Compares two directory snapshots and creates an object that represents
the difference between the two snapshots.

:param ref:
    The reference directory snapshot.
:type ref:
    :class:`DirectorySnapshot`
:param snapshot:
    The directory snapshot which will be compared
    with the reference snapshot.
:type snapshot:
    :class:`DirectorySnapshot`
:param ignore_device:
    A boolean indicating whether to ignore the device id or not.
    By default, a file may be uniquely identified by a combination of its first
    inode and its device id. The problem is that the device id may (or may not)
    change between system boots. This problem would cause the DirectorySnapshotDiff
    to think a file has been deleted and created again but it would be the
    exact same file.
    Set to True only if you are sure you will always use the same device.
:type ignore_device:
    :class:`bool`

---
## DirectorySnapshot
```python
from dirsnapshot import DirectorySnapshot
```

A snapshot of stat information of files in a directory.

:param path:
    The directory path for which a snapshot should be taken.
:type path:
    ``str``
:param recursive:
    ``True`` if the entire directory tree should be included in the
    snapshot; ``False`` otherwise.
:type recursive:
    ``bool``
:param stat:
    Use custom stat function that returns a stat structure for path.
    Currently only st_dev, st_ino, st_mode and st_mtime are needed.

    A function taking a ``path`` as argument which will be called
    for every entry in the directory tree.
:param listdir:
    Use custom listdir function. For details see ``os.scandir``.

---
## EmptyDirectorySnapshot
```python
from dirsnapshot import EmptyDirectorySnapshot
```

Class to implement an empty snapshot. This is used together with
DirectorySnapshot and DirectorySnapshotDiff in order to get all the files/folders
in the directory as created.

---
## __init__
```python
from dirsnapshot import __init__
```



---
## __str__
```python
from dirsnapshot import __str__
```



---
## __repr__
```python
from dirsnapshot import __repr__
```



---
## files_created
```python
from dirsnapshot import files_created
```

List of files that were created.

---
## files_deleted
```python
from dirsnapshot import files_deleted
```

List of files that were deleted.

---
## files_modified
```python
from dirsnapshot import files_modified
```

List of files that were modified.

---
## files_moved
```python
from dirsnapshot import files_moved
```

List of files that were moved.

Each event is a two-tuple the first item of which is the path
that has been renamed to the second item in the tuple.

---
## dirs_modified
```python
from dirsnapshot import dirs_modified
```

List of directories that were modified.

---
## dirs_moved
```python
from dirsnapshot import dirs_moved
```

List of directories that were moved.

Each event is a two-tuple the first item of which is the path
that has been renamed to the second item in the tuple.

---
## dirs_deleted
```python
from dirsnapshot import dirs_deleted
```

List of directories that were deleted.

---
## dirs_created
```python
from dirsnapshot import dirs_created
```

List of directories that were created.

---
## ContextManager
```python
from dirsnapshot import ContextManager
```

Context manager that creates two directory snapshots and a
diff object that represents the difference between the two snapshots.

:param path:
    The directory path for which a snapshot should be taken.
:type path:
    ``str``
:param recursive:
    ``True`` if the entire directory tree should be included in the
    snapshot; ``False`` otherwise.
:type recursive:
    ``bool``
:param stat:
    Use custom stat function that returns a stat structure for path.
    Currently only st_dev, st_ino, st_mode and st_mtime are needed.

    A function taking a ``path`` as argument which will be called
    for every entry in the directory tree.
:param listdir:
    Use custom listdir function. For details see ``os.scandir``.
:param ignore_device:
    A boolean indicating whether to ignore the device id or not.
    By default, a file may be uniquely identified by a combination of its first
    inode and its device id. The problem is that the device id may (or may not)
    change between system boots. This problem would cause the DirectorySnapshotDiff
    to think a file has been deleted and created again but it would be the
    exact same file.
    Set to True only if you are sure you will always use the same device.
:type ignore_device:
    :class:`bool`

---
## walk
```python
from dirsnapshot import walk
```



---
## paths
```python
from dirsnapshot import paths
```

Mock up method to return a set of file/directory paths in the snapshot. As
the snapshot is intended to be empty, it always returns an empty set.

:returns:
    An empty set.

---
## path
```python
from dirsnapshot import path
```

Mock up method to return the path of the received inode. As the snapshot
is intended to be empty, it always returns None.

:returns:
    None.

---
## inode
```python
from dirsnapshot import inode
```

Returns an id for path.

---
## isdir
```python
from dirsnapshot import isdir
```



---
## mtime
```python
from dirsnapshot import mtime
```



---
## size
```python
from dirsnapshot import size
```



---
## stat_info
```python
from dirsnapshot import stat_info
```

Returns a stat information object for the specified path from
the snapshot.

Attached information is subject to change. Do not use unless
you specify `stat` in constructor. Use :func:`inode`, :func:`mtime`,
:func:`isdir` instead.

:param path:
    The path for which stat information should be obtained
    from a snapshot.

---
## __sub__
```python
from dirsnapshot import __sub__
```

Allow subtracting a DirectorySnapshot object instance from
another.

:returns:
    A :class:`DirectorySnapshotDiff` object.

---
## __enter__
```python
from dirsnapshot import __enter__
```



---
## __exit__
```python
from dirsnapshot import __exit__
```



---
## get_snapshot
```python
from dirsnapshot import get_snapshot
```



---
## get_inode
```python
from dirsnapshot import get_inode
```



---
## __name__
```python
from delayed_queue import __name__
```

:module: watchdog.utils.delayed_queue
:author: thomas.amland@gmail.com (Thomas Amland)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

---
## DelayedQueue
```python
from delayed_queue import DelayedQueue
```



---
## __init__
```python
from delayed_queue import __init__
```



---
## put
```python
from delayed_queue import put
```

Add element to queue.

---
## close
```python
from delayed_queue import close
```

Close queue, indicating no more items will be added.

---
## get
```python
from delayed_queue import get
```

Remove and return an element from the queue, or this queue has been
closed raise the Closed exception.

---
## remove
```python
from delayed_queue import remove
```

Remove and return the first items for which predicate is True,
ignoring delay.

---
## __name__
```python
from platform import __name__
```



---
## get_platform_name
```python
from platform import get_platform_name
```



---
## is_linux
```python
from platform import is_linux
```



---
## is_bsd
```python
from platform import is_bsd
```



---
## is_darwin
```python
from platform import is_darwin
```



---
## is_windows
```python
from platform import is_windows
```



---
## __name__
```python
from process_watcher import __name__
```



---
## ProcessWatcher
```python
from process_watcher import ProcessWatcher
```



---
## __init__
```python
from process_watcher import __init__
```



---
## run
```python
from process_watcher import run
```



---
## __name__
```python
from bricks import __name__
```

Utility collections or "bricks".

:module: watchdog.utils.bricks
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: lalinsky@gmail.com (Lukáš Lalinský)
:author: python@rcn.com (Raymond Hettinger)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

Classes
=======
.. autoclass:: OrderedSetQueue
   :members:
   :show-inheritance:
   :inherited-members:

.. autoclass:: OrderedSet

---
## SkipRepeatsQueue
```python
from bricks import SkipRepeatsQueue
```

Thread-safe implementation of an special queue where a
put of the last-item put'd will be dropped.

The implementation leverages locking already implemented in the base class
redefining only the primitives.

Queued items must be immutable and hashable so that they can be used
as dictionary keys. You must implement **only read-only properties** and
the :meth:`Item.__hash__()`, :meth:`Item.__eq__()`, and
:meth:`Item.__ne__()` methods for items to be hashable.

An example implementation follows::

    class Item:
        def __init__(self, a, b):
            self._a = a
            self._b = b

        @property
        def a(self):
            return self._a

        @property
        def b(self):
            return self._b

        def _key(self):
            return (self._a, self._b)

        def __eq__(self, item):
            return self._key() == item._key()

        def __ne__(self, item):
            return self._key() != item._key()

        def __hash__(self):
            return hash(self._key())

based on the OrderedSetQueue below

---
## _init
```python
from bricks import _init
```



---
## put
```python
from bricks import put
```

This method will be used by `eventlet`, when enabled, so we cannot use force proper keyword-only
arguments nor touch the signature. Also, the `timeout` argument will be ignored in that case.

---
## _put
```python
from bricks import _put
```



---
## _get
```python
from bricks import _get
```



---
## __name__
```python
from echo import __name__
```

Echo calls made to functions and methods in a module.

"Echoing" a function call means printing out the name of the function
and the values of its arguments before making the call (which is more
commonly referred to as "tracing", but Python already has a trace module).

Example: to echo calls made to functions in "my_module" do:

  import echo
  import my_module
  echo.echo_module(my_module)

Example: to echo calls made to functions in "my_module.my_class" do:

  echo.echo_class(my_module.my_class)

Alternatively, echo.echo can be used to decorate functions. Calls to the
decorated function will be echoed.

Example:
-------
  @echo.echo
  def my_function(args):
      pass

---
## name
```python
from echo import name
```

Return an item's name.

---
## is_classmethod
```python
from echo import is_classmethod
```

Determine if an instancemethod is a classmethod.

---
## is_static_method
```python
from echo import is_static_method
```

Returns True if method is an instance method of klass.

---
## is_class_private_name
```python
from echo import is_class_private_name
```

Determine if a name is a class private name.

---
## method_name
```python
from echo import method_name
```

Return a method's name.

This function returns the name the method is accessed by from
outside the class (i.e. it prefixes "private" methods appropriately).

---
## format_arg_value
```python
from echo import format_arg_value
```

Return a string representing a (name, value) pair.

---
## echo
```python
from echo import echo
```

Echo calls to a function.

Returns a decorated version of the input function which "echoes" calls
made to it by writing out the function's name and the arguments it was
called with.

---
## echo_instancemethod
```python
from echo import echo_instancemethod
```

Change an instancemethod so that calls to it are echoed.

Replacing a classmethod is a little more tricky.
See: http://www.python.org/doc/current/ref/types.html

---
## echo_class
```python
from echo import echo_class
```

Echo calls to class methods and static functions

---
## echo_module
```python
from echo import echo_module
```

Echo calls to functions and methods in a module.

---
## wrapped
```python
from echo import wrapped
```



---
## __name__
```python
from fsevents import __name__
```

:module: watchdog.observers.fsevents
:synopsis: FSEvents based emitter implementation.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: macOS

---
## FSEventsEmitter
```python
from fsevents import FSEventsEmitter
```

macOS FSEvents Emitter class.

:param event_queue:
    The event queue to fill with events.
:param watch:
    A watch object representing the directory to monitor.
:type watch:
    :class:`watchdog.observers.api.ObservedWatch`
:param timeout:
    Read events blocking timeout (in seconds).
:param event_filter:
    Collection of event types to emit, or None for no filtering (default).
:param suppress_history:
    The FSEvents API may emit historic events up to 30 sec before the watch was
    started. When ``suppress_history`` is ``True``, those events will be suppressed
    by creating a directory snapshot of the watched path before starting the stream
    as a reference to suppress old events. Warning: This may result in significant
    memory usage in case of a large number of items in the watched path.
:type timeout:
    ``float``

---
## FSEventsObserver
```python
from fsevents import FSEventsObserver
```



---
## __init__
```python
from fsevents import __init__
```



---
## on_thread_stop
```python
from fsevents import on_thread_stop
```



---
## queue_event
```python
from fsevents import queue_event
```



---
## _is_recursive_event
```python
from fsevents import _is_recursive_event
```



---
## _queue_created_event
```python
from fsevents import _queue_created_event
```



---
## _queue_deleted_event
```python
from fsevents import _queue_deleted_event
```



---
## _queue_modified_event
```python
from fsevents import _queue_modified_event
```



---
## _queue_renamed_event
```python
from fsevents import _queue_renamed_event
```



---
## _is_historic_created_event
```python
from fsevents import _is_historic_created_event
```



---
## _is_meta_mod
```python
from fsevents import _is_meta_mod
```

Returns True if the event indicates a change in metadata.

---
## queue_events
```python
from fsevents import queue_events
```



---
## events_callback
```python
from fsevents import events_callback
```

Callback passed to FSEventStreamCreate(), it will receive all
FS events and queue them.

---
## run
```python
from fsevents import run
```



---
## on_thread_start
```python
from fsevents import on_thread_start
```



---
## _encode_path
```python
from fsevents import _encode_path
```

Encode path only if bytes were passed to this emitter.

---
## schedule
```python
from fsevents import schedule
```



---
## __name__
```python
from inotify import __name__
```

:module: watchdog.observers.inotify
:synopsis: ``inotify(7)`` based emitter implementation.
:author: Sebastien Martini <seb@dbzteam.org>
:author: Luke McCarthy <luke@iogopro.co.uk>
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: Tim Cuthbertson <tim+github@gfxmonk.net>
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: Linux 2.6.13+.

.. ADMONITION:: About system requirements

    Recommended minimum kernel version: 2.6.25.

    Quote from the inotify(7) man page:

        "Inotify was merged into the 2.6.13 Linux kernel. The required library
        interfaces were added to glibc in version 2.4. (IN_DONT_FOLLOW,
        IN_MASK_ADD, and IN_ONLYDIR were only added in version 2.5.)"

    Therefore, you must ensure the system is running at least these versions
    appropriate libraries and the kernel.

.. ADMONITION:: About recursiveness, event order, and event coalescing

    Quote from the inotify(7) man page:

        If successive output inotify events produced on the inotify file
        descriptor are identical (same wd, mask, cookie, and name) then they
        are coalesced into a single event if the older event has not yet been
        read (but see BUGS).

        The events returned by reading from an inotify file descriptor form
        an ordered queue. Thus, for example, it is guaranteed that when
        renaming from one directory to another, events will be produced in
        the correct order on the inotify file descriptor.

        ...

        Inotify monitoring of directories is not recursive: to monitor
        subdirectories under a directory, additional watches must be created.

    This emitter implementation therefore automatically adds watches for
    sub-directories if running in recursive mode.

Some extremely useful articles and documentation:

.. _inotify FAQ: http://inotify.aiken.cz/?section=inotify&page=faq&lang=en
.. _intro to inotify: http://www.linuxjournal.com/article/8478

---
## InotifyEmitter
```python
from inotify import InotifyEmitter
```

inotify(7)-based event emitter.

:param event_queue:
    The event queue to fill with events.
:param watch:
    A watch object representing the directory to monitor.
:type watch:
    :class:`watchdog.observers.api.ObservedWatch`
:param timeout:
    Read events blocking timeout (in seconds).
:type timeout:
    ``float``
:param event_filter:
    Collection of event types to emit, or None for no filtering (default).
:type event_filter:
    Iterable[:class:`watchdog.events.FileSystemEvent`] | None

---
## InotifyFullEmitter
```python
from inotify import InotifyFullEmitter
```

inotify(7)-based event emitter. By default this class produces move events even if they are not matched
Such move events will have a ``None`` value for the unmatched part.

---
## InotifyObserver
```python
from inotify import InotifyObserver
```

Observer thread that schedules watching directories and dispatches
calls to event handlers.

---
## __init__
```python
from inotify import __init__
```



---
## on_thread_start
```python
from inotify import on_thread_start
```



---
## on_thread_stop
```python
from inotify import on_thread_stop
```



---
## queue_events
```python
from inotify import queue_events
```



---
## _decode_path
```python
from inotify import _decode_path
```

Decode path only if unicode string was passed to this emitter.

---
## get_event_mask_from_filter
```python
from inotify import get_event_mask_from_filter
```

Optimization: Only include events we are filtering in inotify call.

---
## ObserverType
```python
from __init__ import ObserverType
```



---
## _get_observer_cls
```python
from __init__ import _get_observer_cls
```



---
## EventQueue
```python
from api import EventQueue
```

Thread-safe event queue based on a special queue that skips adding
the same event (:class:`FileSystemEvent`) multiple times consecutively.
Thus avoiding dispatching multiple event handling
calls when multiple identical events are produced quicker than an observer
can consume them.

---
## ObservedWatch
```python
from api import ObservedWatch
```

An scheduled watch.

:param path:
    Path string.
:param recursive:
    ``True`` if watch is recursive; ``False`` otherwise.
:param event_filter:
    Optional collection of :class:`watchdog.events.FileSystemEvent` to watch

---
## EventEmitter
```python
from api import EventEmitter
```

Producer thread base class subclassed by event emitters
that generate events and populate a queue with them.

:param event_queue:
    The event queue to populate with generated events.
:type event_queue:
    :class:`watchdog.events.EventQueue`
:param watch:
    The watch to observe and produce events for.
:type watch:
    :class:`ObservedWatch`
:param timeout:
    Timeout (in seconds) between successive attempts at reading events.
:type timeout:
    ``float``
:param event_filter:
    Collection of event types to emit, or None for no filtering (default).
:type event_filter:
    Iterable[:class:`watchdog.events.FileSystemEvent`] | None

---
## EventDispatcher
```python
from api import EventDispatcher
```

Consumer thread base class subclassed by event observer threads
that dispatch events from an event queue to appropriate event handlers.

:param timeout:
    Timeout value (in seconds) passed to emitters
    constructions in the child class BaseObserver.
:type timeout:
    ``float``

---
## BaseObserver
```python
from api import BaseObserver
```

Base observer.

---
## path
```python
from api import path
```

The path that this watch monitors.

---
## is_recursive
```python
from api import is_recursive
```

Determines whether subdirectories are watched for the path.

---
## event_filter
```python
from api import event_filter
```

Collection of event types watched for the path

---
## __eq__
```python
from api import __eq__
```



---
## __ne__
```python
from api import __ne__
```



---
## __hash__
```python
from api import __hash__
```



---
## timeout
```python
from api import timeout
```

Timeout value to construct emitters with.

---
## watch
```python
from api import watch
```

The watch associated with this emitter.

---
## queue_event
```python
from api import queue_event
```

Queues a single event.

:param event:
    Event to be queued.
:type event:
    An instance of :class:`watchdog.events.FileSystemEvent`
    or a subclass.

---
## queue_events
```python
from api import queue_events
```

Override this method to populate the event queue with events
per interval period.

:param timeout:
    Timeout (in seconds) between successive attempts at
    reading events.
:type timeout:
    ``float``

---
## stop
```python
from api import stop
```



---
## event_queue
```python
from api import event_queue
```

The event queue which is populated with file system events
by emitters and from which events are dispatched by a dispatcher
thread.

---
## dispatch_events
```python
from api import dispatch_events
```



---
## _add_emitter
```python
from api import _add_emitter
```



---
## _remove_emitter
```python
from api import _remove_emitter
```



---
## _clear_emitters
```python
from api import _clear_emitters
```



---
## _add_handler_for_watch
```python
from api import _add_handler_for_watch
```



---
## _remove_handlers_for_watch
```python
from api import _remove_handlers_for_watch
```



---
## emitters
```python
from api import emitters
```

Returns event emitter created by this observer.

---
## start
```python
from api import start
```



---
## schedule
```python
from api import schedule
```

Schedules watching a path and calls appropriate methods specified
in the given event handler in response to file system events.

:param event_handler:
    An event handler instance that has appropriate event handling
    methods which will be called by the observer in response to
    file system events.
:type event_handler:
    :class:`watchdog.events.FileSystemEventHandler` or a subclass
:param path:
    Directory path that will be monitored.
:type path:
    ``str``
:param recursive:
    ``True`` if events will be emitted for sub-directories
    traversed recursively; ``False`` otherwise.
:type recursive:
    ``bool``
:param event_filter:
    Collection of event types to emit, or None for no filtering (default).
:type event_filter:
    Iterable[:class:`watchdog.events.FileSystemEvent`] | None
:return:
    An :class:`ObservedWatch` object instance representing
    a watch.

---
## add_handler_for_watch
```python
from api import add_handler_for_watch
```

Adds a handler for the given watch.

:param event_handler:
    An event handler instance that has appropriate event handling
    methods which will be called by the observer in response to
    file system events.
:type event_handler:
    :class:`watchdog.events.FileSystemEventHandler` or a subclass
:param watch:
    The watch to add a handler for.
:type watch:
    An instance of :class:`ObservedWatch` or a subclass of
    :class:`ObservedWatch`

---
## remove_handler_for_watch
```python
from api import remove_handler_for_watch
```

Removes a handler for the given watch.

:param event_handler:
    An event handler instance that has appropriate event handling
    methods which will be called by the observer in response to
    file system events.
:type event_handler:
    :class:`watchdog.events.FileSystemEventHandler` or a subclass
:param watch:
    The watch to remove a handler for.
:type watch:
    An instance of :class:`ObservedWatch` or a subclass of
    :class:`ObservedWatch`

---
## unschedule
```python
from api import unschedule
```

Unschedules a watch.

:param watch:
    The watch to unschedule.
:type watch:
    An instance of :class:`ObservedWatch` or a subclass of
    :class:`ObservedWatch`

---
## unschedule_all
```python
from api import unschedule_all
```

Unschedules all watches and detaches all associated event handlers.

---
## on_thread_stop
```python
from api import on_thread_stop
```



---
## __name__
```python
from inotify_buffer import __name__
```

:module: watchdog.observers.inotify_buffer
:synopsis: A wrapper for ``Inotify``.
:author: thomas.amland@gmail.com (Thomas Amland)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: linux

---
## InotifyBuffer
```python
from inotify_buffer import InotifyBuffer
```

A wrapper for `Inotify` that holds events for `delay` seconds. During
this time, IN_MOVED_FROM and IN_MOVED_TO events are paired.

---
## __init__
```python
from inotify_buffer import __init__
```



---
## read_event
```python
from inotify_buffer import read_event
```

Returns a single event or a tuple of from/to events in case of a
paired move event. If this buffer has been closed, immediately return
None.

---
## on_thread_stop
```python
from inotify_buffer import on_thread_stop
```



---
## close
```python
from inotify_buffer import close
```



---
## _group_events
```python
from inotify_buffer import _group_events
```

Group any matching move events

---
## run
```python
from inotify_buffer import run
```

Read event from `inotify` and add them to `queue`. When reading a
IN_MOVE_TO event, remove the previous added matching IN_MOVE_FROM event
and add them back to the queue as a tuple.

---
## matching_from_event
```python
from inotify_buffer import matching_from_event
```



---
## __name__
```python
from winapi import __name__
```

:module: watchdog.observers.winapi
:synopsis: Windows API-Python interface (removes dependency on ``pywin32``).
:author: theller@ctypes.org (Thomas Heller)
:author: will@willmcgugan.com (Will McGugan)
:author: ryan@rfk.id.au (Ryan Kelly)
:author: yesudeep@gmail.com (Yesudeep Mangalapilly)
:author: thomas.amland@gmail.com (Thomas Amland)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: windows

---
## OVERLAPPED
```python
from winapi import OVERLAPPED
```



---
## _errcheck_bool
```python
from winapi import _errcheck_bool
```



---
## _errcheck_handle
```python
from winapi import _errcheck_handle
```



---
## _errcheck_dword
```python
from winapi import _errcheck_dword
```



---
## FileNotifyInformation
```python
from winapi import FileNotifyInformation
```



---
## _parse_event_buffer
```python
from winapi import _parse_event_buffer
```



---
## _is_observed_path_deleted
```python
from winapi import _is_observed_path_deleted
```



---
## _generate_observed_path_deleted_event
```python
from winapi import _generate_observed_path_deleted_event
```



---
## get_directory_handle
```python
from winapi import get_directory_handle
```

Returns a Windows handle to the specified directory path.

---
## close_directory_handle
```python
from winapi import close_directory_handle
```



---
## read_directory_changes
```python
from winapi import read_directory_changes
```

Read changes to the directory using the specified directory handle.

https://timgolden.me.uk/pywin32-docs/win32file__ReadDirectoryChangesW_meth.html

---
## WinAPINativeEvent
```python
from winapi import WinAPINativeEvent
```



---
## read_events
```python
from winapi import read_events
```



---
## is_added
```python
from winapi import is_added
```



---
## is_removed
```python
from winapi import is_removed
```



---
## is_modified
```python
from winapi import is_modified
```



---
## is_renamed_old
```python
from winapi import is_renamed_old
```



---
## is_renamed_new
```python
from winapi import is_renamed_new
```



---
## is_removed_self
```python
from winapi import is_removed_self
```



---
## __name__
```python
from read_directory_changes import __name__
```



---
## WindowsApiEmitter
```python
from read_directory_changes import WindowsApiEmitter
```

Windows API-based emitter that uses ReadDirectoryChangesW
to detect file system changes for a watch.

---
## WindowsApiObserver
```python
from read_directory_changes import WindowsApiObserver
```

Observer thread that schedules watching directories and dispatches
calls to event handlers.

---
## __init__
```python
from read_directory_changes import __init__
```



---
## on_thread_start
```python
from read_directory_changes import on_thread_start
```



---
## on_thread_stop
```python
from read_directory_changes import on_thread_stop
```



---
## _read_events
```python
from read_directory_changes import _read_events
```



---
## queue_events
```python
from read_directory_changes import queue_events
```



---
## start
```python
from read_directory_changes import start
```

PyPy needs some time before receiving events, see #792.

---
## __name__
```python
from kqueue import __name__
```

:module: watchdog.observers.kqueue
:synopsis: ``kqueue(2)`` based emitter implementation.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: macOS and BSD with kqueue(2).

.. WARNING:: kqueue is a very heavyweight way to monitor file systems.
             Each kqueue-detected directory modification triggers
             a full directory scan. Traversing the entire directory tree
             and opening file descriptors for all files will create
             performance problems. We need to find a way to re-scan
             only those directories which report changes and do a diff
             between two sub-DirectorySnapshots perhaps.

.. ADMONITION:: About OS X performance guidelines

    Quote from the `macOS File System Performance Guidelines`_:

        "When you only want to track changes on a file or directory, be sure to
        open it using the ``O_EVTONLY`` flag. This flag prevents the file or
        directory from being marked as open or in use. This is important
        if you are tracking files on a removable volume and the user tries to
        unmount the volume. With this flag in place, the system knows it can
        dismiss the volume. If you had opened the files or directories without
        this flag, the volume would be marked as busy and would not be
        unmounted."

    ``O_EVTONLY`` is defined as ``0x8000`` in the OS X header files.
    More information here: http://www.mlsite.net/blog/?p=2312

Classes
-------
.. autoclass:: KqueueEmitter
   :members:
   :show-inheritance:

Collections and Utility Classes
-------------------------------
.. autoclass:: KeventDescriptor
   :members:
   :show-inheritance:

.. autoclass:: KeventDescriptorSet
   :members:
   :show-inheritance:

.. _macOS File System Performance Guidelines:
    http://developer.apple.com/library/ios/#documentation/Performance/Conceptual/FileSystem/Articles/TrackingChanges.html#//apple_ref/doc/uid/20001993-CJBJFIDD

---
## absolute_path
```python
from kqueue import absolute_path
```



---
## is_deleted
```python
from kqueue import is_deleted
```

Determines whether the given kevent represents deletion.

---
## is_modified
```python
from kqueue import is_modified
```

Determines whether the given kevent represents modification.

---
## is_attrib_modified
```python
from kqueue import is_attrib_modified
```

Determines whether the given kevent represents attribute modification.

---
## is_renamed
```python
from kqueue import is_renamed
```

Determines whether the given kevent represents movement.

---
## KeventDescriptorSet
```python
from kqueue import KeventDescriptorSet
```

Thread-safe kevent descriptor collection.

---
## KeventDescriptor
```python
from kqueue import KeventDescriptor
```

A kevent descriptor convenience data structure to keep together:

    * kevent
    * directory status
    * path
    * file descriptor

:param path:
    Path string for which a kevent descriptor will be created.
:param is_directory:
    ``True`` if the path refers to a directory; ``False`` otherwise.
:type is_directory:
    ``bool``

---
## KqueueEmitter
```python
from kqueue import KqueueEmitter
```

kqueue(2)-based event emitter.

.. ADMONITION:: About ``kqueue(2)`` behavior and this implementation

          ``kqueue(2)`` monitors file system events only for
          open descriptors, which means, this emitter does a lot of
          book-keeping behind the scenes to keep track of open
          descriptors for every entry in the monitored directory tree.

          This also means the number of maximum open file descriptors
          on your system must be increased **manually**.
          Usually, issuing a call to ``ulimit`` should suffice::

              ulimit -n 1024

          Ensure that you pick a number that is larger than the
          number of files you expect to be monitored.

          ``kqueue(2)`` does not provide enough information about the
          following things:

          * The destination path of a file or directory that is renamed.
          * Creation of a file or directory within a directory; in this
            case, ``kqueue(2)`` only indicates a modified event on the
            parent directory.

          Therefore, this emitter takes a snapshot of the directory
          tree when ``kqueue(2)`` detects a change on the file system
          to be able to determine the above information.

:param event_queue:
    The event queue to fill with events.
:param watch:
    A watch object representing the directory to monitor.
:type watch:
    :class:`watchdog.observers.api.ObservedWatch`
:param timeout:
    Read events blocking timeout (in seconds).
:type timeout:
    ``float``
:param event_filter:
    Collection of event types to emit, or None for no filtering (default).
:type event_filter:
    Iterable[:class:`watchdog.events.FileSystemEvent`] | None
:param stat: stat function. See ``os.stat`` for details.

---
## KqueueObserver
```python
from kqueue import KqueueObserver
```

Observer thread that schedules watching directories and dispatches
calls to event handlers.

---
## __init__
```python
from kqueue import __init__
```



---
## kevents
```python
from kqueue import kevents
```

List of kevents monitored.

---
## paths
```python
from kqueue import paths
```

List of paths for which kevents have been created.

---
## get_for_fd
```python
from kqueue import get_for_fd
```

Given a file descriptor, returns the kevent descriptor object
for it.

:param fd:
    OS file descriptor.
:type fd:
    ``int``
:returns:
    A :class:`KeventDescriptor` object.

---
## get
```python
from kqueue import get
```

Obtains a :class:`KeventDescriptor` object for the specified path.

:param path:
    Path for which the descriptor will be obtained.

---
## __contains__
```python
from kqueue import __contains__
```

Determines whether a :class:`KeventDescriptor has been registered
for the specified path.

:param path:
    Path for which the descriptor will be obtained.

---
## add
```python
from kqueue import add
```

Adds a :class:`KeventDescriptor` to the collection for the given
path.

:param path:
    The path for which a :class:`KeventDescriptor` object will be
    added.
:param is_directory:
    ``True`` if the path refers to a directory; ``False`` otherwise.
:type is_directory:
    ``bool``

---
## remove
```python
from kqueue import remove
```

Removes the :class:`KeventDescriptor` object for the given path
if it already exists.

:param path:
    Path for which the :class:`KeventDescriptor` object will be
    removed.

---
## clear
```python
from kqueue import clear
```

Clears the collection and closes all open descriptors.

---
## _get
```python
from kqueue import _get
```

Returns a kevent descriptor for a given path.

---
## _has_path
```python
from kqueue import _has_path
```

Determines whether a :class:`KeventDescriptor` for the specified
path exists already in the collection.

---
## _add_descriptor
```python
from kqueue import _add_descriptor
```

Adds a descriptor to the collection.

:param descriptor:
    An instance of :class:`KeventDescriptor` to be added.

---
## _remove_descriptor
```python
from kqueue import _remove_descriptor
```

Removes a descriptor from the collection.

:param descriptor:
    An instance of :class:`KeventDescriptor` to be removed.

---
## fd
```python
from kqueue import fd
```

OS file descriptor for the kevent descriptor.

---
## path
```python
from kqueue import path
```

The path associated with the kevent descriptor.

---
## kevent
```python
from kqueue import kevent
```

The kevent object associated with the kevent descriptor.

---
## is_directory
```python
from kqueue import is_directory
```

Determines whether the kevent descriptor refers to a directory.

:returns:
    ``True`` or ``False``

---
## close
```python
from kqueue import close
```

Closes the file descriptor associated with a kevent descriptor.

---
## key
```python
from kqueue import key
```



---
## __eq__
```python
from kqueue import __eq__
```



---
## __ne__
```python
from kqueue import __ne__
```



---
## __hash__
```python
from kqueue import __hash__
```



---
## __repr__
```python
from kqueue import __repr__
```



---
## _register_kevent
```python
from kqueue import _register_kevent
```

Registers a kevent descriptor for the given path.

:param path:
    Path for which a kevent descriptor will be created.
:param is_directory:
    ``True`` if the path refers to a directory; ``False`` otherwise.
:type is_directory:
    ``bool``

---
## _unregister_kevent
```python
from kqueue import _unregister_kevent
```

Convenience function to close the kevent descriptor for a
specified kqueue-monitored path.

:param path:
    Path for which the kevent descriptor will be closed.

---
## queue_event
```python
from kqueue import queue_event
```

Handles queueing a single event object.

:param event:
    An instance of :class:`watchdog.events.FileSystemEvent`
    or a subclass.

---
## _gen_kqueue_events
```python
from kqueue import _gen_kqueue_events
```

Generate events from the kevent list returned from the call to
:meth:`select.kqueue.control`.

.. NOTE:: kqueue only tells us about deletions, file modifications,
          attribute modifications. The other events, namely,
          file creation, directory modification, file rename,
          directory rename, directory creation, etc. are
          determined by comparing directory snapshots.

---
## _parent_dir_modified
```python
from kqueue import _parent_dir_modified
```

Helper to generate a DirModifiedEvent on the parent of src_path.

---
## _gen_renamed_events
```python
from kqueue import _gen_renamed_events
```

Compares information from two directory snapshots (one taken before
the rename operation and another taken right after) to determine the
destination path of the file system object renamed, and yields
the appropriate events to be queued.

---
## _read_events
```python
from kqueue import _read_events
```

Reads events from a call to the blocking
:meth:`select.kqueue.control()` method.

:param timeout:
    Blocking timeout for reading events.
:type timeout:
    ``float`` (seconds)

---
## queue_events
```python
from kqueue import queue_events
```

Queues events by reading them from a call to the blocking
:meth:`select.kqueue.control()` method.

:param timeout:
    Blocking timeout for reading events.
:type timeout:
    ``float`` (seconds)

---
## on_thread_stop
```python
from kqueue import on_thread_stop
```



---
## custom_stat
```python
from kqueue import custom_stat
```



---
## __name__
```python
from inotify_c import __name__
```



---
## InotifyConstants
```python
from inotify_c import InotifyConstants
```



---
## InotifyEventStruct
```python
from inotify_c import InotifyEventStruct
```

Structure representation of the inotify_event structure
(used in buffer size calculations)::

    struct inotify_event {
        __s32 wd;            /* watch descriptor */
        __u32 mask;          /* watch mask */
        __u32 cookie;        /* cookie to synchronize two events */
        __u32 len;           /* length (including nulls) of name */
        char  name[0];       /* stub for possible name */
    };

---
## Inotify
```python
from inotify_c import Inotify
```

Linux inotify(7) API wrapper class.

:param path:
    The directory path for which we want an inotify object.
:type path:
    :class:`bytes`
:param recursive:
    ``True`` if subdirectories should be monitored; ``False`` otherwise.

---
## InotifyEvent
```python
from inotify_c import InotifyEvent
```

Inotify event struct wrapper.

:param wd:
    Watch descriptor
:param mask:
    Event mask
:param cookie:
    Event cookie
:param name:
    Base name of the event source path.
:param src_path:
    Full event source path.

---
## __init__
```python
from inotify_c import __init__
```



---
## event_mask
```python
from inotify_c import event_mask
```

The event mask for this inotify instance.

---
## path
```python
from inotify_c import path
```

The path associated with the inotify instance.

---
## is_recursive
```python
from inotify_c import is_recursive
```

Whether we are watching directories recursively.

---
## fd
```python
from inotify_c import fd
```

The file descriptor associated with the inotify instance.

---
## clear_move_records
```python
from inotify_c import clear_move_records
```

Clear cached records of MOVED_FROM events

---
## source_for_move
```python
from inotify_c import source_for_move
```

The source path corresponding to the given MOVED_TO event.

If the source path is outside the monitored directories, None
is returned instead.

---
## remember_move_from_event
```python
from inotify_c import remember_move_from_event
```

Save this event as the source event for future MOVED_TO events to
reference.

---
## add_watch
```python
from inotify_c import add_watch
```

Adds a watch for the given path.

:param path:
    Path to begin monitoring.

---
## remove_watch
```python
from inotify_c import remove_watch
```

Removes a watch for the given path.

:param path:
    Path string for which the watch will be removed.

---
## close
```python
from inotify_c import close
```

Closes the inotify instance and removes all associated watches.

---
## read_events
```python
from inotify_c import read_events
```

Reads events from inotify and yields them.

---
## _close_resources
```python
from inotify_c import _close_resources
```



---
## _add_dir_watch
```python
from inotify_c import _add_dir_watch
```

Adds a watch (optionally recursively) for the given directory path
to monitor events specified by the mask.

:param path:
    Path to monitor
:param recursive:
    ``True`` to monitor recursively.
:param mask:
    Event bit mask.

---
## _add_watch
```python
from inotify_c import _add_watch
```

Adds a watch for the given path to monitor events specified by the
mask.

:param path:
    Path to monitor
:param mask:
    Event bit mask.

---
## _raise_error
```python
from inotify_c import _raise_error
```

Raises errors for inotify failures.

---
## _parse_event_buffer
```python
from inotify_c import _parse_event_buffer
```

Parses an event buffer of ``inotify_event`` structs returned by
inotify::

    struct inotify_event {
        __s32 wd;            /* watch descriptor */
        __u32 mask;          /* watch mask */
        __u32 cookie;        /* cookie to synchronize two events */
        __u32 len;           /* length (including nulls) of name */
        char  name[0];       /* stub for possible name */
    };

The ``cookie`` member of this struct is used to pair two related
events, for example, it pairs an IN_MOVED_FROM event with an
IN_MOVED_TO event.

---
## src_path
```python
from inotify_c import src_path
```



---
## wd
```python
from inotify_c import wd
```



---
## mask
```python
from inotify_c import mask
```



---
## cookie
```python
from inotify_c import cookie
```



---
## name
```python
from inotify_c import name
```



---
## is_modify
```python
from inotify_c import is_modify
```



---
## is_close_write
```python
from inotify_c import is_close_write
```



---
## is_close_nowrite
```python
from inotify_c import is_close_nowrite
```



---
## is_open
```python
from inotify_c import is_open
```



---
## is_access
```python
from inotify_c import is_access
```



---
## is_delete
```python
from inotify_c import is_delete
```



---
## is_delete_self
```python
from inotify_c import is_delete_self
```



---
## is_create
```python
from inotify_c import is_create
```



---
## is_moved_from
```python
from inotify_c import is_moved_from
```



---
## is_moved_to
```python
from inotify_c import is_moved_to
```



---
## is_move
```python
from inotify_c import is_move
```



---
## is_move_self
```python
from inotify_c import is_move_self
```



---
## is_attrib
```python
from inotify_c import is_attrib
```



---
## is_ignored
```python
from inotify_c import is_ignored
```



---
## is_directory
```python
from inotify_c import is_directory
```



---
## key
```python
from inotify_c import key
```



---
## __eq__
```python
from inotify_c import __eq__
```



---
## __ne__
```python
from inotify_c import __ne__
```



---
## __hash__
```python
from inotify_c import __hash__
```



---
## _get_mask_string
```python
from inotify_c import _get_mask_string
```



---
## __repr__
```python
from inotify_c import __repr__
```



---
## _recursive_simulate
```python
from inotify_c import _recursive_simulate
```



---
## __name__
```python
from polling import __name__
```

:module: watchdog.observers.polling
:synopsis: Polling emitter implementation.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

Classes
-------
.. autoclass:: PollingObserver
   :members:
   :show-inheritance:

.. autoclass:: PollingObserverVFS
   :members:
   :show-inheritance:
   :special-members:

---
## PollingEmitter
```python
from polling import PollingEmitter
```

Platform-independent emitter that polls a directory to detect file
system changes.

---
## PollingObserver
```python
from polling import PollingObserver
```

Platform-independent observer that polls a directory to detect file
system changes.

---
## PollingObserverVFS
```python
from polling import PollingObserverVFS
```

File system independent observer that polls a directory to detect changes.

---
## __init__
```python
from polling import __init__
```

:param stat: stat function. See ``os.stat`` for details.
:param listdir: listdir function. See ``os.scandir`` for details.
:type polling_interval: int
:param polling_interval: interval in seconds between polling the file system.

---
## on_thread_start
```python
from polling import on_thread_start
```



---
## queue_events
```python
from polling import queue_events
```



---
## __name__
```python
from fsevents2 import __name__
```

:module: watchdog.observers.fsevents2
:synopsis: FSEvents based emitter implementation.
:author: thomas.amland@gmail.com (Thomas Amland)
:author: contact@tiger-222.fr (Mickaël Schoentgen)
:platforms: macOS

---
## FSEventsQueue
```python
from fsevents2 import FSEventsQueue
```

Low level FSEvents client.

---
## NativeEvent
```python
from fsevents2 import NativeEvent
```



---
## FSEventsEmitter
```python
from fsevents2 import FSEventsEmitter
```

FSEvents based event emitter. Handles conversion of native events.

---
## FSEventsObserver2
```python
from fsevents2 import FSEventsObserver2
```



---
## __init__
```python
from fsevents2 import __init__
```



---
## run
```python
from fsevents2 import run
```



---
## stop
```python
from fsevents2 import stop
```



---
## _callback
```python
from fsevents2 import _callback
```



---
## read_events
```python
from fsevents2 import read_events
```

Returns a list or one or more events, or None if there are no more
events to be read.

---
## _event_type
```python
from fsevents2 import _event_type
```



---
## __repr__
```python
from fsevents2 import __repr__
```



---
## on_thread_stop
```python
from fsevents2 import on_thread_stop
```



---
## queue_events
```python
from fsevents2 import queue_events
```



---
## Trick
```python
from __init__ import Trick
```

Your tricks should subclass this class.

---
## LoggerTrick
```python
from __init__ import LoggerTrick
```

A simple trick that does only logs events.

---
## ShellCommandTrick
```python
from __init__ import ShellCommandTrick
```

Executes shell commands in response to matched events.

---
## AutoRestartTrick
```python
from __init__ import AutoRestartTrick
```

Starts a long-running subprocess and restarts it on matched events.

The command parameter is a list of command arguments, such as
`['bin/myserver', '-c', 'etc/myconfig.ini']`.

Call `start()` after creating the Trick. Call `stop()` when stopping
the process.

---
## generate_yaml
```python
from __init__ import generate_yaml
```



---
## on_any_event
```python
from __init__ import on_any_event
```



---
## is_process_running
```python
from __init__ import is_process_running
```



---
## _start_process
```python
from __init__ import _start_process
```



---
## _stop_process
```python
from __init__ import _stop_process
```



---
## _restart_process
```python
from __init__ import _restart_process
```



---
## kill_process
```python
from __init__ import kill_process
```



---
## TestDictEqual
```python
from test_utils import TestDictEqual
```



---
## TestListEqual
```python
from test_utils import TestListEqual
```



---
## test_none
```python
from test_utils import test_none
```



---
## test_equal_dictionaries
```python
from test_utils import test_equal_dictionaries
```



---
## test_equal_dictionaries_with_nan
```python
from test_utils import test_equal_dictionaries_with_nan
```



---
## test_missing_key
```python
from test_utils import test_missing_key
```



---
## test_additional_key
```python
from test_utils import test_additional_key
```



---
## test_missing_value
```python
from test_utils import test_missing_value
```



---
## test_empty_dictionaries
```python
from test_utils import test_empty_dictionaries
```



---
## test_one_none
```python
from test_utils import test_one_none
```



---
## test_same_item
```python
from test_utils import test_same_item
```



---
## test_nested_equal
```python
from test_utils import test_nested_equal
```



---
## test_nested_dict_unequal
```python
from test_utils import test_nested_dict_unequal
```



---
## test_mixed_nested_equal
```python
from test_utils import test_mixed_nested_equal
```



---
## test_nested_list_unequal
```python
from test_utils import test_nested_list_unequal
```



---
## test_equal_lists
```python
from test_utils import test_equal_lists
```



---
## test_equal_lists_with_nan
```python
from test_utils import test_equal_lists_with_nan
```



---
## test_unsorted_lists
```python
from test_utils import test_unsorted_lists
```



---
## test_first_list_larger
```python
from test_utils import test_first_list_larger
```



---
## test_second_list_larger
```python
from test_utils import test_second_list_larger
```



---
## test_list_with_none_unequal
```python
from test_utils import test_list_with_none_unequal
```



---
## test_list_with_none_equal
```python
from test_utils import test_list_with_none_equal
```



---
## test_empty_list
```python
from test_utils import test_empty_list
```



---
## test_same_list
```python
from test_utils import test_same_list
```



---
## test_equal_nested_lists
```python
from test_utils import test_equal_nested_lists
```



---
## test_unequal_nested_lists
```python
from test_utils import test_unequal_nested_lists
```



---
## __name__
```python
from _suite import __name__
```

Python representations of the JSON Schema Test Suite tests.

---
## _find_suite
```python
from _suite import _find_suite
```



---
## Suite
```python
from _suite import Suite
```



---
## Version
```python
from _suite import Version
```



---
## _Case
```python
from _suite import _Case
```



---
## _Test
```python
from _suite import _Test
```



---
## _someone_save_us_the_module_of_the_caller
```python
from _suite import _someone_save_us_the_module_of_the_caller
```

The FQON of the module 2nd stack frames up from here.

This is intended to allow us to dynamically return test case classes that
are indistinguishable from being defined in the module that wants them.

Otherwise, trial will mis-print the FQON, and copy pasting it won't re-run
the class that really is running.

Save us all, this is all so so so so so terrible.

---
## __attrs_post_init__
```python
from _suite import __attrs_post_init__
```



---
## benchmark
```python
from _suite import benchmark
```



---
## version
```python
from _suite import version
```



---
## cases
```python
from _suite import cases
```



---
## format_cases
```python
from _suite import format_cases
```



---
## optional_cases_of
```python
from _suite import optional_cases_of
```



---
## to_unittest_testcase
```python
from _suite import to_unittest_testcase
```



---
## _cases_in
```python
from _suite import _cases_in
```



---
## from_dict
```python
from _suite import from_dict
```



---
## __repr__
```python
from _suite import __repr__
```



---
## fully_qualified_name
```python
from _suite import fully_qualified_name
```



---
## to_unittest_method
```python
from _suite import to_unittest_method
```



---
## validate
```python
from _suite import validate
```



---
## validate_ignoring_errors
```python
from _suite import validate_ignoring_errors
```



---
## fn
```python
from _suite import fn
```



---
## TestDeprecations
```python
from test_deprecations import TestDeprecations
```



---
## test_version
```python
from test_deprecations import test_version
```

As of v4.0.0, __version__ is deprecated in favor of importlib.metadata.

---
## test_validators_ErrorTree
```python
from test_deprecations import test_validators_ErrorTree
```

As of v4.0.0, importing ErrorTree from jsonschema.validators is
deprecated in favor of doing so from jsonschema.exceptions.

---
## test_import_ErrorTree
```python
from test_deprecations import test_import_ErrorTree
```

As of v4.18.0, importing ErrorTree from the package root is
deprecated in favor of doing so from jsonschema.exceptions.

---
## test_ErrorTree_setitem
```python
from test_deprecations import test_ErrorTree_setitem
```

As of v4.20.0, setting items on an ErrorTree is deprecated.

---
## test_import_FormatError
```python
from test_deprecations import test_import_FormatError
```

As of v4.18.0, importing FormatError from the package root is
deprecated in favor of doing so from jsonschema.exceptions.

---
## test_import_Validator
```python
from test_deprecations import test_import_Validator
```

As of v4.19.0, importing Validator from the package root is
deprecated in favor of doing so from jsonschema.protocols.

---
## test_validators_validators
```python
from test_deprecations import test_validators_validators
```

As of v4.0.0, accessing jsonschema.validators.validators is
deprecated.

---
## test_validators_meta_schemas
```python
from test_deprecations import test_validators_meta_schemas
```

As of v4.0.0, accessing jsonschema.validators.meta_schemas is
deprecated.

---
## test_RefResolver_in_scope
```python
from test_deprecations import test_RefResolver_in_scope
```

As of v4.0.0, RefResolver.in_scope is deprecated.

---
## test_Validator_is_valid_two_arguments
```python
from test_deprecations import test_Validator_is_valid_two_arguments
```

As of v4.0.0, calling is_valid with two arguments (to provide a
different schema) is deprecated.

---
## test_Validator_iter_errors_two_arguments
```python
from test_deprecations import test_Validator_iter_errors_two_arguments
```

As of v4.0.0, calling iter_errors with two arguments (to provide a
different schema) is deprecated.

---
## test_Validator_resolver
```python
from test_deprecations import test_Validator_resolver
```

As of v4.18.0, accessing Validator.resolver is deprecated.

---
## test_RefResolver
```python
from test_deprecations import test_RefResolver
```

As of v4.18.0, RefResolver is fully deprecated.

---
## test_RefResolutionError
```python
from test_deprecations import test_RefResolutionError
```

As of v4.18.0, RefResolutionError is deprecated in favor of directly
catching errors from the referencing library.

---
## test_catching_Unresolvable_directly
```python
from test_deprecations import test_catching_Unresolvable_directly
```

This behavior is the intended behavior (i.e. it's not deprecated), but
given we do "tricksy" things in the iterim to wrap exceptions in a
multiple inheritance subclass, we need to be extra sure it works and
stays working.

---
## test_catching_Unresolvable_via_RefResolutionError
```python
from test_deprecations import test_catching_Unresolvable_via_RefResolutionError
```

Until RefResolutionError is removed, it is still possible to catch
exceptions from reference resolution using it, even though they may
have been raised by referencing.

---
## test_WrappedReferencingError_hashability
```python
from test_deprecations import test_WrappedReferencingError_hashability
```

Ensure the wrapped referencing errors are hashable when possible.

---
## test_Validator_subclassing
```python
from test_deprecations import test_Validator_subclassing
```

As of v4.12.0, subclassing a validator class produces an explicit
deprecation warning.

This was never intended to be public API (and some comments over the
years in issues said so, but obviously that's not a great way to make
sure it's followed).

A future version will explicitly raise an error.

---
## test_FormatChecker_cls_checks
```python
from test_deprecations import test_FormatChecker_cls_checks
```

As of v4.14.0, FormatChecker.cls_checks is deprecated without
replacement.

---
## test_draftN_format_checker
```python
from test_deprecations import test_draftN_format_checker
```

As of v4.16.0, accessing jsonschema.draftn_format_checker is deprecated
in favor of Validator.FORMAT_CHECKER.

---
## test_import_cli
```python
from test_deprecations import test_import_cli
```

As of v4.17.0, importing jsonschema.cli is deprecated.

---
## test_cli
```python
from test_deprecations import test_cli
```

As of v4.17.0, the jsonschema CLI is deprecated.

---
## test_automatic_remote_retrieval
```python
from test_deprecations import test_automatic_remote_retrieval
```

Automatic retrieval of remote references is deprecated as of v4.18.0.

---
## fake_urlopen
```python
from test_deprecations import fake_urlopen
```



---
## Subclass
```python
from test_deprecations import Subclass
```



---
## AnotherSubclass
```python
from test_deprecations import AnotherSubclass
```



---
## TestBestMatch
```python
from test_exceptions import TestBestMatch
```



---
## TestByRelevance
```python
from test_exceptions import TestByRelevance
```



---
## TestErrorTree
```python
from test_exceptions import TestErrorTree
```



---
## TestErrorInitReprStr
```python
from test_exceptions import TestErrorInitReprStr
```



---
## TestHashable
```python
from test_exceptions import TestHashable
```



---
## best_match_of
```python
from test_exceptions import best_match_of
```



---
## test_shallower_errors_are_better_matches
```python
from test_exceptions import test_shallower_errors_are_better_matches
```



---
## test_oneOf_and_anyOf_are_weak_matches
```python
from test_exceptions import test_oneOf_and_anyOf_are_weak_matches
```

A property you *must* match is probably better than one you have to
match a part of.

---
## test_if_the_most_relevant_error_is_anyOf_it_is_traversed
```python
from test_exceptions import test_if_the_most_relevant_error_is_anyOf_it_is_traversed
```

If the most relevant error is an anyOf, then we traverse its context
and select the otherwise *least* relevant error, since in this case
that means the most specific, deep, error inside the instance.

I.e. since only one of the schemas must match, we look for the most
relevant one.

---
## test_no_anyOf_traversal_for_equally_relevant_errors
```python
from test_exceptions import test_no_anyOf_traversal_for_equally_relevant_errors
```

We don't traverse into an anyOf (as above) if all of its context errors
seem to be equally "wrong" against the instance.

---
## test_anyOf_traversal_for_single_equally_relevant_error
```python
from test_exceptions import test_anyOf_traversal_for_single_equally_relevant_error
```

We *do* traverse anyOf with a single nested error, even though it is
vacuously equally relevant to itself.

---
## test_anyOf_traversal_for_single_sibling_errors
```python
from test_exceptions import test_anyOf_traversal_for_single_sibling_errors
```

We *do* traverse anyOf with a single subschema that fails multiple
times (e.g. on multiple items).

---
## test_anyOf_traversal_for_non_type_matching_sibling_errors
```python
from test_exceptions import test_anyOf_traversal_for_non_type_matching_sibling_errors
```

We *do* traverse anyOf with multiple subschemas when one does not type
match.

---
## test_if_the_most_relevant_error_is_oneOf_it_is_traversed
```python
from test_exceptions import test_if_the_most_relevant_error_is_oneOf_it_is_traversed
```

If the most relevant error is an oneOf, then we traverse its context
and select the otherwise *least* relevant error, since in this case
that means the most specific, deep, error inside the instance.

I.e. since only one of the schemas must match, we look for the most
relevant one.

---
## test_no_oneOf_traversal_for_equally_relevant_errors
```python
from test_exceptions import test_no_oneOf_traversal_for_equally_relevant_errors
```

We don't traverse into an oneOf (as above) if all of its context errors
seem to be equally "wrong" against the instance.

---
## test_oneOf_traversal_for_single_equally_relevant_error
```python
from test_exceptions import test_oneOf_traversal_for_single_equally_relevant_error
```

We *do* traverse oneOf with a single nested error, even though it is
vacuously equally relevant to itself.

---
## test_oneOf_traversal_for_single_sibling_errors
```python
from test_exceptions import test_oneOf_traversal_for_single_sibling_errors
```

We *do* traverse oneOf with a single subschema that fails multiple
times (e.g. on multiple items).

---
## test_oneOf_traversal_for_non_type_matching_sibling_errors
```python
from test_exceptions import test_oneOf_traversal_for_non_type_matching_sibling_errors
```

We *do* traverse oneOf with multiple subschemas when one does not type
match.

---
## test_if_the_most_relevant_error_is_allOf_it_is_traversed
```python
from test_exceptions import test_if_the_most_relevant_error_is_allOf_it_is_traversed
```

Now, if the error is allOf, we traverse but select the *most* relevant
error from the context, because all schemas here must match anyways.

---
## test_nested_context_for_oneOf
```python
from test_exceptions import test_nested_context_for_oneOf
```

We traverse into nested contexts (a oneOf containing an error in a
nested oneOf here).

---
## test_it_prioritizes_matching_types
```python
from test_exceptions import test_it_prioritizes_matching_types
```



---
## test_it_prioritizes_matching_union_types
```python
from test_exceptions import test_it_prioritizes_matching_union_types
```



---
## test_boolean_schemas
```python
from test_exceptions import test_boolean_schemas
```



---
## test_one_error
```python
from test_exceptions import test_one_error
```



---
## test_no_errors
```python
from test_exceptions import test_no_errors
```



---
## test_short_paths_are_better_matches
```python
from test_exceptions import test_short_paths_are_better_matches
```



---
## test_global_errors_are_even_better_matches
```python
from test_exceptions import test_global_errors_are_even_better_matches
```



---
## test_weak_keywords_are_lower_priority
```python
from test_exceptions import test_weak_keywords_are_lower_priority
```



---
## test_strong_keywords_are_higher_priority
```python
from test_exceptions import test_strong_keywords_are_higher_priority
```



---
## test_it_knows_how_many_total_errors_it_contains
```python
from test_exceptions import test_it_knows_how_many_total_errors_it_contains
```



---
## test_it_contains_an_item_if_the_item_had_an_error
```python
from test_exceptions import test_it_contains_an_item_if_the_item_had_an_error
```



---
## test_it_does_not_contain_an_item_if_the_item_had_no_error
```python
from test_exceptions import test_it_does_not_contain_an_item_if_the_item_had_no_error
```



---
## test_keywords_that_failed_appear_in_errors_dict
```python
from test_exceptions import test_keywords_that_failed_appear_in_errors_dict
```



---
## test_it_creates_a_child_tree_for_each_nested_path
```python
from test_exceptions import test_it_creates_a_child_tree_for_each_nested_path
```



---
## test_children_have_their_errors_dicts_built
```python
from test_exceptions import test_children_have_their_errors_dicts_built
```



---
## test_multiple_errors_with_instance
```python
from test_exceptions import test_multiple_errors_with_instance
```



---
## test_it_does_not_contain_subtrees_that_are_not_in_the_instance
```python
from test_exceptions import test_it_does_not_contain_subtrees_that_are_not_in_the_instance
```



---
## test_if_its_in_the_tree_anyhow_it_does_not_raise_an_error
```python
from test_exceptions import test_if_its_in_the_tree_anyhow_it_does_not_raise_an_error
```

If a keyword refers to a path that isn't in the instance, the
tree still properly returns a subtree for that path.

---
## test_iter
```python
from test_exceptions import test_iter
```



---
## test_repr_single
```python
from test_exceptions import test_repr_single
```



---
## test_repr_multiple
```python
from test_exceptions import test_repr_multiple
```



---
## test_repr_empty
```python
from test_exceptions import test_repr_empty
```



---
## make_error
```python
from test_exceptions import make_error
```



---
## assertShows
```python
from test_exceptions import assertShows
```



---
## test_it_calls_super_and_sets_args
```python
from test_exceptions import test_it_calls_super_and_sets_args
```



---
## test_repr
```python
from test_exceptions import test_repr
```



---
## test_unset_error
```python
from test_exceptions import test_unset_error
```



---
## test_empty_paths
```python
from test_exceptions import test_empty_paths
```



---
## test_one_item_paths
```python
from test_exceptions import test_one_item_paths
```



---
## test_multiple_item_paths
```python
from test_exceptions import test_multiple_item_paths
```



---
## test_uses_pprint
```python
from test_exceptions import test_uses_pprint
```



---
## test_does_not_reorder_dicts
```python
from test_exceptions import test_does_not_reorder_dicts
```



---
## test_str_works_with_instances_having_overriden_eq_operator
```python
from test_exceptions import test_str_works_with_instances_having_overriden_eq_operator
```

Check for #164 which rendered exceptions unusable when a
`ValidationError` involved instances with an `__eq__` method
that returned truthy values.

---
## test_hashable
```python
from test_exceptions import test_hashable
```



---
## DontEQMeBro
```python
from test_exceptions import DontEQMeBro
```



---
## __eq__
```python
from test_exceptions import __eq__
```



---
## __ne__
```python
from test_exceptions import __ne__
```



---
## __name__
```python
from test_jsonschema_test_suite import __name__
```

Test runner for the JSON Schema official test suite

Tests comprehensive correctness of each draft's validator.

See https://github.com/json-schema-org/JSON-Schema-Test-Suite for details.

---
## skip
```python
from test_jsonschema_test_suite import skip
```



---
## missing_format
```python
from test_jsonschema_test_suite import missing_format
```



---
## complex_email_validation
```python
from test_jsonschema_test_suite import complex_email_validation
```



---
## leap_second
```python
from test_jsonschema_test_suite import leap_second
```



---
## skipper
```python
from test_jsonschema_test_suite import skipper
```



---
## allowed_leading_zeros
```python
from test_jsonschema_test_suite import allowed_leading_zeros
```



---
## __name__
```python
from test_validators import __name__
```



---
## fail
```python
from test_validators import fail
```



---
## TestCreateAndExtend
```python
from test_validators import TestCreateAndExtend
```



---
## TestValidationErrorMessages
```python
from test_validators import TestValidationErrorMessages
```



---
## TestValidationErrorDetails
```python
from test_validators import TestValidationErrorDetails
```



---
## MetaSchemaTestsMixin
```python
from test_validators import MetaSchemaTestsMixin
```



---
## ValidatorTestMixin
```python
from test_validators import ValidatorTestMixin
```



---
## AntiDraft6LeakMixin
```python
from test_validators import AntiDraft6LeakMixin
```

Make sure functionality from draft 6 doesn't leak backwards in time.

---
## TestDraft3Validator
```python
from test_validators import TestDraft3Validator
```



---
## TestDraft4Validator
```python
from test_validators import TestDraft4Validator
```



---
## TestDraft6Validator
```python
from test_validators import TestDraft6Validator
```



---
## TestDraft7Validator
```python
from test_validators import TestDraft7Validator
```



---
## TestDraft201909Validator
```python
from test_validators import TestDraft201909Validator
```



---
## TestDraft202012Validator
```python
from test_validators import TestDraft202012Validator
```



---
## TestLatestValidator
```python
from test_validators import TestLatestValidator
```

These really apply to multiple versions but are easiest to test on one.

---
## TestValidatorFor
```python
from test_validators import TestValidatorFor
```



---
## TestValidate
```python
from test_validators import TestValidate
```



---
## TestThreading
```python
from test_validators import TestThreading
```

Threading-related functionality tests.

jsonschema doesn't promise thread safety, and its validation behavior
across multiple threads may change at any time, but that means it isn't
safe to share *validators* across threads, not that anytime one has
multiple threads that jsonschema won't work (it certainly is intended to).

These tests ensure that this minimal level of functionality continues to
work.

---
## TestReferencing
```python
from test_validators import TestReferencing
```



---
## TestRefResolver
```python
from test_validators import TestRefResolver
```



---
## sorted_errors
```python
from test_validators import sorted_errors
```



---
## ReallyFakeRequests
```python
from test_validators import ReallyFakeRequests
```



---
## _ReallyFakeJSONResponse
```python
from test_validators import _ReallyFakeJSONResponse
```



---
## setUp
```python
from test_validators import setUp
```



---
## test_attrs
```python
from test_validators import test_attrs
```



---
## test_init
```python
from test_validators import test_init
```



---
## test_iter_errors_successful
```python
from test_validators import test_iter_errors_successful
```



---
## test_iter_errors_one_error
```python
from test_validators import test_iter_errors_one_error
```



---
## test_iter_errors_multiple_errors
```python
from test_validators import test_iter_errors_multiple_errors
```



---
## test_if_a_version_is_provided_it_is_registered
```python
from test_validators import test_if_a_version_is_provided_it_is_registered
```



---
## test_repr
```python
from test_validators import test_repr
```



---
## test_long_repr
```python
from test_validators import test_long_repr
```



---
## test_repr_no_version
```python
from test_validators import test_repr_no_version
```



---
## test_dashes_are_stripped_from_validator_names
```python
from test_validators import test_dashes_are_stripped_from_validator_names
```



---
## test_if_a_version_is_not_provided_it_is_not_registered
```python
from test_validators import test_if_a_version_is_not_provided_it_is_not_registered
```



---
## test_validates_registers_meta_schema_id
```python
from test_validators import test_validates_registers_meta_schema_id
```



---
## test_validates_registers_meta_schema_draft6_id
```python
from test_validators import test_validates_registers_meta_schema_draft6_id
```



---
## test_create_default_types
```python
from test_validators import test_create_default_types
```



---
## test_check_schema_with_different_metaschema
```python
from test_validators import test_check_schema_with_different_metaschema
```

One can create a validator class whose metaschema uses a different
dialect than itself.

---
## test_check_schema_with_different_metaschema_defaults_to_self
```python
from test_validators import test_check_schema_with_different_metaschema_defaults_to_self
```

A validator whose metaschema doesn't declare $schema defaults to its
own validation behavior, not the latest "normal" specification.

---
## test_extend
```python
from test_validators import test_extend
```



---
## test_extend_idof
```python
from test_validators import test_extend_idof
```

Extending a validator preserves its notion of schema IDs.

---
## test_extend_applicable_validators
```python
from test_validators import test_extend_applicable_validators
```

Extending a validator preserves its notion of applicable validators.

---
## message_for
```python
from test_validators import message_for
```



---
## test_single_type_failure
```python
from test_validators import test_single_type_failure
```



---
## test_single_type_list_failure
```python
from test_validators import test_single_type_list_failure
```



---
## test_multiple_type_failure
```python
from test_validators import test_multiple_type_failure
```



---
## test_object_with_named_type_failure
```python
from test_validators import test_object_with_named_type_failure
```



---
## test_minimum
```python
from test_validators import test_minimum
```



---
## test_maximum
```python
from test_validators import test_maximum
```



---
## test_dependencies_single_element
```python
from test_validators import test_dependencies_single_element
```



---
## test_object_without_title_type_failure_draft3
```python
from test_validators import test_object_without_title_type_failure_draft3
```



---
## test_dependencies_list_draft3
```python
from test_validators import test_dependencies_list_draft3
```



---
## test_dependencies_list_draft7
```python
from test_validators import test_dependencies_list_draft7
```



---
## test_additionalItems_single_failure
```python
from test_validators import test_additionalItems_single_failure
```



---
## test_additionalItems_multiple_failures
```python
from test_validators import test_additionalItems_multiple_failures
```



---
## test_additionalProperties_single_failure
```python
from test_validators import test_additionalProperties_single_failure
```



---
## test_additionalProperties_multiple_failures
```python
from test_validators import test_additionalProperties_multiple_failures
```



---
## test_const
```python
from test_validators import test_const
```



---
## test_contains_draft_6
```python
from test_validators import test_contains_draft_6
```



---
## test_invalid_format_default_message
```python
from test_validators import test_invalid_format_default_message
```



---
## test_additionalProperties_false_patternProperties
```python
from test_validators import test_additionalProperties_false_patternProperties
```



---
## test_False_schema
```python
from test_validators import test_False_schema
```



---
## test_multipleOf
```python
from test_validators import test_multipleOf
```



---
## test_minItems
```python
from test_validators import test_minItems
```



---
## test_maxItems
```python
from test_validators import test_maxItems
```



---
## test_minItems_1
```python
from test_validators import test_minItems_1
```



---
## test_maxItems_0
```python
from test_validators import test_maxItems_0
```



---
## test_minLength
```python
from test_validators import test_minLength
```



---
## test_maxLength
```python
from test_validators import test_maxLength
```



---
## test_minLength_1
```python
from test_validators import test_minLength_1
```



---
## test_maxLength_0
```python
from test_validators import test_maxLength_0
```



---
## test_minProperties
```python
from test_validators import test_minProperties
```



---
## test_maxProperties
```python
from test_validators import test_maxProperties
```



---
## test_minProperties_1
```python
from test_validators import test_minProperties_1
```



---
## test_maxProperties_0
```python
from test_validators import test_maxProperties_0
```



---
## test_prefixItems_with_items
```python
from test_validators import test_prefixItems_with_items
```



---
## test_prefixItems_with_multiple_extra_items
```python
from test_validators import test_prefixItems_with_multiple_extra_items
```



---
## test_pattern
```python
from test_validators import test_pattern
```



---
## test_does_not_contain
```python
from test_validators import test_does_not_contain
```



---
## test_contains_too_few
```python
from test_validators import test_contains_too_few
```



---
## test_contains_too_few_both_constrained
```python
from test_validators import test_contains_too_few_both_constrained
```



---
## test_contains_too_many
```python
from test_validators import test_contains_too_many
```

`contains` + `maxContains` produces only one error, even if there are
many more incorrectly matching elements.

---
## test_contains_too_many_both_constrained
```python
from test_validators import test_contains_too_many_both_constrained
```



---
## test_exclusiveMinimum
```python
from test_validators import test_exclusiveMinimum
```



---
## test_exclusiveMaximum
```python
from test_validators import test_exclusiveMaximum
```



---
## test_required
```python
from test_validators import test_required
```



---
## test_dependentRequired
```python
from test_validators import test_dependentRequired
```



---
## test_oneOf_matches_none
```python
from test_validators import test_oneOf_matches_none
```



---
## test_oneOf_matches_too_many
```python
from test_validators import test_oneOf_matches_too_many
```



---
## test_unevaluated_items
```python
from test_validators import test_unevaluated_items
```



---
## test_unevaluated_items_on_invalid_type
```python
from test_validators import test_unevaluated_items_on_invalid_type
```



---
## test_unevaluated_properties_invalid_against_subschema
```python
from test_validators import test_unevaluated_properties_invalid_against_subschema
```



---
## test_unevaluated_properties_disallowed
```python
from test_validators import test_unevaluated_properties_disallowed
```



---
## test_unevaluated_properties_on_invalid_type
```python
from test_validators import test_unevaluated_properties_on_invalid_type
```



---
## test_single_item
```python
from test_validators import test_single_item
```



---
## test_heterogeneous_additionalItems_with_Items
```python
from test_validators import test_heterogeneous_additionalItems_with_Items
```



---
## test_heterogeneous_items_prefixItems
```python
from test_validators import test_heterogeneous_items_prefixItems
```



---
## test_heterogeneous_unevaluatedItems_prefixItems
```python
from test_validators import test_heterogeneous_unevaluatedItems_prefixItems
```



---
## test_heterogeneous_properties_additionalProperties
```python
from test_validators import test_heterogeneous_properties_additionalProperties
```

Not valid deserialized JSON, but this should not blow up.

---
## test_heterogeneous_properties_unevaluatedProperties
```python
from test_validators import test_heterogeneous_properties_unevaluatedProperties
```

Not valid deserialized JSON, but this should not blow up.

---
## test_anyOf
```python
from test_validators import test_anyOf
```



---
## test_type
```python
from test_validators import test_type
```



---
## test_single_nesting
```python
from test_validators import test_single_nesting
```



---
## test_multiple_nesting
```python
from test_validators import test_multiple_nesting
```



---
## test_recursive
```python
from test_validators import test_recursive
```



---
## test_additionalProperties
```python
from test_validators import test_additionalProperties
```



---
## test_patternProperties
```python
from test_validators import test_patternProperties
```



---
## test_additionalItems
```python
from test_validators import test_additionalItems
```



---
## test_additionalItems_with_items
```python
from test_validators import test_additionalItems_with_items
```



---
## test_propertyNames
```python
from test_validators import test_propertyNames
```



---
## test_if_then
```python
from test_validators import test_if_then
```



---
## test_if_else
```python
from test_validators import test_if_else
```



---
## test_boolean_schema_False
```python
from test_validators import test_boolean_schema_False
```



---
## test_ref
```python
from test_validators import test_ref
```



---
## test_prefixItems
```python
from test_validators import test_prefixItems
```



---
## test_contains_none
```python
from test_validators import test_contains_none
```



---
## test_ref_sibling
```python
from test_validators import test_ref_sibling
```



---
## test_invalid_properties
```python
from test_validators import test_invalid_properties
```



---
## test_minItems_invalid_string
```python
from test_validators import test_minItems_invalid_string
```



---
## test_enum_allows_empty_arrays
```python
from test_validators import test_enum_allows_empty_arrays
```

Technically, all the spec says is they SHOULD have elements, not MUST.

(As of Draft 6. Previous drafts do say MUST).

See #529.

---
## test_enum_allows_non_unique_items
```python
from test_validators import test_enum_allows_non_unique_items
```

Technically, all the spec says is they SHOULD be unique, not MUST.

(As of Draft 6. Previous drafts do say MUST).

See #529.

---
## test_schema_with_invalid_regex
```python
from test_validators import test_schema_with_invalid_regex
```



---
## test_schema_with_invalid_regex_with_disabled_format_validation
```python
from test_validators import test_schema_with_invalid_regex_with_disabled_format_validation
```



---
## test_it_implements_the_validator_protocol
```python
from test_validators import test_it_implements_the_validator_protocol
```



---
## test_valid_instances_are_valid
```python
from test_validators import test_valid_instances_are_valid
```



---
## test_invalid_instances_are_not_valid
```python
from test_validators import test_invalid_instances_are_not_valid
```



---
## test_non_existent_properties_are_ignored
```python
from test_validators import test_non_existent_properties_are_ignored
```



---
## test_evolve
```python
from test_validators import test_evolve
```



---
## test_evolve_with_subclass
```python
from test_validators import test_evolve_with_subclass
```

Subclassing validators isn't supported public API, but some users have
done it, because we don't actually error entirely when it's done :/

We need to deprecate doing so first to help as many of these users
ensure they can move to supported APIs, but this test ensures that in
the interim, we haven't broken those users.

---
## test_is_type_is_true_for_valid_type
```python
from test_validators import test_is_type_is_true_for_valid_type
```



---
## test_is_type_is_false_for_invalid_type
```python
from test_validators import test_is_type_is_false_for_invalid_type
```



---
## test_is_type_evades_bool_inheriting_from_int
```python
from test_validators import test_is_type_evades_bool_inheriting_from_int
```



---
## test_it_can_validate_with_decimals
```python
from test_validators import test_it_can_validate_with_decimals
```



---
## test_it_returns_true_for_formats_it_does_not_know_about
```python
from test_validators import test_it_returns_true_for_formats_it_does_not_know_about
```



---
## test_it_does_not_validate_formats_by_default
```python
from test_validators import test_it_does_not_validate_formats_by_default
```



---
## test_it_validates_formats_if_a_checker_is_provided
```python
from test_validators import test_it_validates_formats_if_a_checker_is_provided
```



---
## test_non_string_custom_type
```python
from test_validators import test_non_string_custom_type
```



---
## test_it_properly_formats_tuples_in_errors
```python
from test_validators import test_it_properly_formats_tuples_in_errors
```

A tuple instance properly formats validation errors for uniqueItems.

See #224

---
## test_check_redefined_sequence
```python
from test_validators import test_check_redefined_sequence
```

Allow array to validate against another defined sequence type

---
## test_it_creates_a_ref_resolver_if_not_provided
```python
from test_validators import test_it_creates_a_ref_resolver_if_not_provided
```



---
## test_it_upconverts_from_deprecated_RefResolvers
```python
from test_validators import test_it_upconverts_from_deprecated_RefResolvers
```



---
## test_it_upconverts_from_yet_older_deprecated_legacy_RefResolvers
```python
from test_validators import test_it_upconverts_from_yet_older_deprecated_legacy_RefResolvers
```

Legacy RefResolvers support only the context manager form of
resolution.

---
## test_True_is_not_a_schema
```python
from test_validators import test_True_is_not_a_schema
```



---
## test_False_is_not_a_schema
```python
from test_validators import test_False_is_not_a_schema
```



---
## test_True_is_not_a_schema_even_if_you_forget_to_check
```python
from test_validators import test_True_is_not_a_schema_even_if_you_forget_to_check
```



---
## test_False_is_not_a_schema_even_if_you_forget_to_check
```python
from test_validators import test_False_is_not_a_schema_even_if_you_forget_to_check
```



---
## test_any_type_is_valid_for_type_any
```python
from test_validators import test_any_type_is_valid_for_type_any
```



---
## test_any_type_is_redefinable
```python
from test_validators import test_any_type_is_redefinable
```

Sigh, because why not.

---
## test_is_type_is_true_for_any_type
```python
from test_validators import test_is_type_is_true_for_any_type
```



---
## test_is_type_does_not_evade_bool_if_it_is_being_tested
```python
from test_validators import test_is_type_does_not_evade_bool_if_it_is_being_tested
```



---
## test_ref_resolvers_may_have_boolean_schemas_stored
```python
from test_validators import test_ref_resolvers_may_have_boolean_schemas_stored
```



---
## test_draft_3
```python
from test_validators import test_draft_3
```



---
## test_draft_4
```python
from test_validators import test_draft_4
```



---
## test_draft_6
```python
from test_validators import test_draft_6
```



---
## test_draft_7
```python
from test_validators import test_draft_7
```



---
## test_draft_201909
```python
from test_validators import test_draft_201909
```



---
## test_draft_202012
```python
from test_validators import test_draft_202012
```



---
## test_True
```python
from test_validators import test_True
```



---
## test_False
```python
from test_validators import test_False
```



---
## test_custom_validator
```python
from test_validators import test_custom_validator
```



---
## test_custom_validator_draft6
```python
from test_validators import test_custom_validator_draft6
```



---
## test_validator_for_jsonschema_default
```python
from test_validators import test_validator_for_jsonschema_default
```



---
## test_validator_for_custom_default
```python
from test_validators import test_validator_for_custom_default
```



---
## test_warns_if_meta_schema_specified_was_not_found
```python
from test_validators import test_warns_if_meta_schema_specified_was_not_found
```



---
## test_does_not_warn_if_meta_schema_is_unspecified
```python
from test_validators import test_does_not_warn_if_meta_schema_is_unspecified
```



---
## test_validator_for_custom_default_with_schema
```python
from test_validators import test_validator_for_custom_default_with_schema
```



---
## assertUses
```python
from test_validators import assertUses
```



---
## test_draft3_validator_is_chosen
```python
from test_validators import test_draft3_validator_is_chosen
```



---
## test_draft4_validator_is_chosen
```python
from test_validators import test_draft4_validator_is_chosen
```



---
## test_draft6_validator_is_chosen
```python
from test_validators import test_draft6_validator_is_chosen
```



---
## test_draft7_validator_is_chosen
```python
from test_validators import test_draft7_validator_is_chosen
```



---
## test_draft202012_validator_is_chosen
```python
from test_validators import test_draft202012_validator_is_chosen
```



---
## test_draft202012_validator_is_the_default
```python
from test_validators import test_draft202012_validator_is_the_default
```



---
## test_validation_error_message
```python
from test_validators import test_validation_error_message
```



---
## test_schema_error_message
```python
from test_validators import test_schema_error_message
```



---
## test_it_uses_best_match
```python
from test_validators import test_it_uses_best_match
```



---
## test_validation_across_a_second_thread
```python
from test_validators import test_validation_across_a_second_thread
```



---
## test_registry_with_retrieve
```python
from test_validators import test_registry_with_retrieve
```



---
## test_custom_registries_do_not_autoretrieve_remote_resources
```python
from test_validators import test_custom_registries_do_not_autoretrieve_remote_resources
```



---
## test_it_does_not_retrieve_schema_urls_from_the_network
```python
from test_validators import test_it_does_not_retrieve_schema_urls_from_the_network
```



---
## test_it_resolves_local_refs
```python
from test_validators import test_it_resolves_local_refs
```



---
## test_it_resolves_local_refs_with_id
```python
from test_validators import test_it_resolves_local_refs_with_id
```



---
## test_it_retrieves_stored_refs
```python
from test_validators import test_it_retrieves_stored_refs
```



---
## test_it_retrieves_unstored_refs_via_requests
```python
from test_validators import test_it_retrieves_unstored_refs_via_requests
```



---
## test_it_retrieves_unstored_refs_via_urlopen
```python
from test_validators import test_it_retrieves_unstored_refs_via_urlopen
```



---
## test_it_retrieves_local_refs_via_urlopen
```python
from test_validators import test_it_retrieves_local_refs_via_urlopen
```



---
## test_it_can_construct_a_base_uri_from_a_schema
```python
from test_validators import test_it_can_construct_a_base_uri_from_a_schema
```



---
## test_it_can_construct_a_base_uri_from_a_schema_without_id
```python
from test_validators import test_it_can_construct_a_base_uri_from_a_schema_without_id
```



---
## test_custom_uri_scheme_handlers
```python
from test_validators import test_custom_uri_scheme_handlers
```



---
## test_cache_remote_on
```python
from test_validators import test_cache_remote_on
```



---
## test_cache_remote_off
```python
from test_validators import test_cache_remote_off
```



---
## test_if_you_give_it_junk_you_get_a_resolution_error
```python
from test_validators import test_if_you_give_it_junk_you_get_a_resolution_error
```



---
## test_helpful_error_message_on_failed_pop_scope
```python
from test_validators import test_helpful_error_message_on_failed_pop_scope
```



---
## test_pointer_within_schema_with_different_id
```python
from test_validators import test_pointer_within_schema_with_different_id
```

See #1085.

---
## test_newly_created_validator_with_ref_resolver
```python
from test_validators import test_newly_created_validator_with_ref_resolver
```

See https://github.com/python-jsonschema/jsonschema/issues/1061#issuecomment-1624266555.

---
## test_refresolver_with_pointer_in_schema_with_no_id
```python
from test_validators import test_refresolver_with_pointer_in_schema_with_no_id
```

See https://github.com/python-jsonschema/jsonschema/issues/1124#issuecomment-1632574249.

---
## key
```python
from test_validators import key
```



---
## get
```python
from test_validators import get
```



---
## json
```python
from test_validators import json
```



---
## id_of
```python
from test_validators import id_of
```



---
## check
```python
from test_validators import check
```



---
## LegacyRefResolver
```python
from test_validators import LegacyRefResolver
```



---
## validate
```python
from test_validators import validate
```



---
## retrieve
```python
from test_validators import retrieve
```



---
## fake_urlopen
```python
from test_validators import fake_urlopen
```



---
## handler
```python
from test_validators import handler
```



---
## handle
```python
from test_validators import handle
```



---
## OhNo
```python
from test_validators import OhNo
```



---
## resolving
```python
from test_validators import resolving
```



---
## __name__
```python
from fuzz_validate import __name__
```

Fuzzing setup for OSS-Fuzz.

See https://github.com/google/oss-fuzz/tree/master/projects/jsonschema for the
other half of the setup here.

---
## test_schemas
```python
from fuzz_validate import test_schemas
```



---
## main
```python
from fuzz_validate import main
```



---
## __name__
```python
from test_cli import __name__
```



---
## fake_validator
```python
from test_cli import fake_validator
```



---
## fake_open
```python
from test_cli import fake_open
```



---
## _message_for
```python
from test_cli import _message_for
```



---
## TestCLI
```python
from test_cli import TestCLI
```



---
## TestParser
```python
from test_cli import TestParser
```



---
## TestCLIIntegration
```python
from test_cli import TestCLIIntegration
```



---
## FakeValidator
```python
from test_cli import FakeValidator
```



---
## open
```python
from test_cli import open
```



---
## run_cli
```python
from test_cli import run_cli
```



---
## assertOutputs
```python
from test_cli import assertOutputs
```



---
## test_invalid_instance
```python
from test_cli import test_invalid_instance
```



---
## test_invalid_instance_pretty_output
```python
from test_cli import test_invalid_instance_pretty_output
```



---
## test_invalid_instance_explicit_plain_output
```python
from test_cli import test_invalid_instance_explicit_plain_output
```



---
## test_invalid_instance_multiple_errors
```python
from test_cli import test_invalid_instance_multiple_errors
```



---
## test_invalid_instance_multiple_errors_pretty_output
```python
from test_cli import test_invalid_instance_multiple_errors_pretty_output
```



---
## test_multiple_invalid_instances
```python
from test_cli import test_multiple_invalid_instances
```



---
## test_multiple_invalid_instances_pretty_output
```python
from test_cli import test_multiple_invalid_instances_pretty_output
```



---
## test_custom_error_format
```python
from test_cli import test_custom_error_format
```



---
## test_invalid_schema
```python
from test_cli import test_invalid_schema
```



---
## test_invalid_schema_pretty_output
```python
from test_cli import test_invalid_schema_pretty_output
```



---
## test_invalid_schema_multiple_errors
```python
from test_cli import test_invalid_schema_multiple_errors
```



---
## test_invalid_schema_multiple_errors_pretty_output
```python
from test_cli import test_invalid_schema_multiple_errors_pretty_output
```



---
## test_invalid_schema_with_invalid_instance
```python
from test_cli import test_invalid_schema_with_invalid_instance
```

"Validating" an instance that's invalid under an invalid schema
just shows the schema error.

---
## test_invalid_schema_with_invalid_instance_pretty_output
```python
from test_cli import test_invalid_schema_with_invalid_instance_pretty_output
```



---
## test_invalid_instance_continues_with_the_rest
```python
from test_cli import test_invalid_instance_continues_with_the_rest
```



---
## test_custom_error_format_applies_to_schema_errors
```python
from test_cli import test_custom_error_format_applies_to_schema_errors
```



---
## test_instance_is_invalid_JSON
```python
from test_cli import test_instance_is_invalid_JSON
```



---
## test_instance_is_invalid_JSON_pretty_output
```python
from test_cli import test_instance_is_invalid_JSON_pretty_output
```



---
## test_instance_is_invalid_JSON_on_stdin
```python
from test_cli import test_instance_is_invalid_JSON_on_stdin
```



---
## test_instance_is_invalid_JSON_on_stdin_pretty_output
```python
from test_cli import test_instance_is_invalid_JSON_on_stdin_pretty_output
```



---
## test_schema_is_invalid_JSON
```python
from test_cli import test_schema_is_invalid_JSON
```



---
## test_schema_is_invalid_JSON_pretty_output
```python
from test_cli import test_schema_is_invalid_JSON_pretty_output
```



---
## test_schema_and_instance_are_both_invalid_JSON
```python
from test_cli import test_schema_and_instance_are_both_invalid_JSON
```

Only the schema error is reported, as we abort immediately.

---
## test_schema_and_instance_are_both_invalid_JSON_pretty_output
```python
from test_cli import test_schema_and_instance_are_both_invalid_JSON_pretty_output
```

Only the schema error is reported, as we abort immediately.

---
## test_instance_does_not_exist
```python
from test_cli import test_instance_does_not_exist
```



---
## test_instance_does_not_exist_pretty_output
```python
from test_cli import test_instance_does_not_exist_pretty_output
```



---
## test_schema_does_not_exist
```python
from test_cli import test_schema_does_not_exist
```



---
## test_schema_does_not_exist_pretty_output
```python
from test_cli import test_schema_does_not_exist_pretty_output
```



---
## test_neither_instance_nor_schema_exist
```python
from test_cli import test_neither_instance_nor_schema_exist
```



---
## test_neither_instance_nor_schema_exist_pretty_output
```python
from test_cli import test_neither_instance_nor_schema_exist_pretty_output
```



---
## test_successful_validation
```python
from test_cli import test_successful_validation
```



---
## test_successful_validation_pretty_output
```python
from test_cli import test_successful_validation_pretty_output
```



---
## test_successful_validation_of_stdin
```python
from test_cli import test_successful_validation_of_stdin
```



---
## test_successful_validation_of_stdin_pretty_output
```python
from test_cli import test_successful_validation_of_stdin_pretty_output
```



---
## test_successful_validation_of_just_the_schema
```python
from test_cli import test_successful_validation_of_just_the_schema
```



---
## test_successful_validation_of_just_the_schema_pretty_output
```python
from test_cli import test_successful_validation_of_just_the_schema_pretty_output
```



---
## test_successful_validation_via_explicit_base_uri
```python
from test_cli import test_successful_validation_via_explicit_base_uri
```



---
## test_unsuccessful_validation_via_explicit_base_uri
```python
from test_cli import test_unsuccessful_validation_via_explicit_base_uri
```



---
## test_nonexistent_file_with_explicit_base_uri
```python
from test_cli import test_nonexistent_file_with_explicit_base_uri
```



---
## test_invalid_explicit_base_uri
```python
from test_cli import test_invalid_explicit_base_uri
```



---
## test_it_validates_using_the_latest_validator_when_unspecified
```python
from test_cli import test_it_validates_using_the_latest_validator_when_unspecified
```



---
## test_it_validates_using_draft7_when_specified
```python
from test_cli import test_it_validates_using_draft7_when_specified
```

Specifically, `const` validation applies for Draft 7.

---
## test_it_validates_using_draft4_when_specified
```python
from test_cli import test_it_validates_using_draft4_when_specified
```

Specifically, `const` validation *does not* apply for Draft 4.

---
## test_find_validator_by_fully_qualified_object_name
```python
from test_cli import test_find_validator_by_fully_qualified_object_name
```



---
## test_find_validator_in_jsonschema
```python
from test_cli import test_find_validator_in_jsonschema
```



---
## cli_output_for
```python
from test_cli import cli_output_for
```



---
## test_unknown_output
```python
from test_cli import test_unknown_output
```



---
## test_useless_error_format
```python
from test_cli import test_useless_error_format
```



---
## test_license
```python
from test_cli import test_license
```



---
## test_version
```python
from test_cli import test_version
```



---
## test_no_arguments_shows_usage_notes
```python
from test_cli import test_no_arguments_shows_usage_notes
```



---
## __init__
```python
from test_cli import __init__
```



---
## iter_errors
```python
from test_cli import iter_errors
```



---
## check_schema
```python
from test_cli import check_schema
```



---
## boom
```python
from test_format import boom
```



---
## TestFormatChecker
```python
from test_format import TestFormatChecker
```



---
## test_it_can_validate_no_formats
```python
from test_format import test_it_can_validate_no_formats
```



---
## test_it_raises_a_key_error_for_unknown_formats
```python
from test_format import test_it_raises_a_key_error_for_unknown_formats
```



---
## test_it_can_register_cls_checkers
```python
from test_format import test_it_can_register_cls_checkers
```



---
## test_it_can_register_checkers
```python
from test_format import test_it_can_register_checkers
```



---
## test_it_catches_registered_errors
```python
from test_format import test_it_catches_registered_errors
```



---
## test_format_error_causes_become_validation_error_causes
```python
from test_format import test_format_error_causes_become_validation_error_causes
```



---
## test_format_checkers_come_with_defaults
```python
from test_format import test_format_checkers_come_with_defaults
```



---
## test_repr
```python
from test_format import test_repr
```



---
## __name__
```python
from test_types import __name__
```



---
## equals_2
```python
from test_types import equals_2
```



---
## is_namedtuple
```python
from test_types import is_namedtuple
```



---
## is_object_or_named_tuple
```python
from test_types import is_object_or_named_tuple
```



---
## TestTypeChecker
```python
from test_types import TestTypeChecker
```



---
## TestCustomTypes
```python
from test_types import TestCustomTypes
```



---
## test_is_type
```python
from test_types import test_is_type
```



---
## test_is_unknown_type
```python
from test_types import test_is_unknown_type
```



---
## test_checks_can_be_added_at_init
```python
from test_types import test_checks_can_be_added_at_init
```



---
## test_redefine_existing_type
```python
from test_types import test_redefine_existing_type
```



---
## test_remove
```python
from test_types import test_remove
```



---
## test_remove_unknown_type
```python
from test_types import test_remove_unknown_type
```



---
## test_redefine_many
```python
from test_types import test_redefine_many
```



---
## test_remove_multiple
```python
from test_types import test_remove_multiple
```



---
## test_type_check_can_raise_key_error
```python
from test_types import test_type_check_can_raise_key_error
```

Make sure no one writes:

    try:
        self._type_checkers[type](...)
    except KeyError:

ignoring the fact that the function itself can raise that.

---
## test_repr
```python
from test_types import test_repr
```



---
## test_simple_type_can_be_extended
```python
from test_types import test_simple_type_can_be_extended
```



---
## test_object_can_be_extended
```python
from test_types import test_object_can_be_extended
```



---
## test_object_extensions_require_custom_validators
```python
from test_types import test_object_extensions_require_custom_validators
```



---
## test_object_extensions_can_handle_custom_validators
```python
from test_types import test_object_extensions_can_handle_custom_validators
```



---
## test_unknown_type
```python
from test_types import test_unknown_type
```



---
## raises_keyerror
```python
from test_types import raises_keyerror
```



---
## int_or_str_int
```python
from test_types import int_or_str_int
```



---
## coerce_named_tuple
```python
from test_types import coerce_named_tuple
```



---
## coerced
```python
from test_types import coerced
```



---
## __name__
```python
from validator_creation import __name__
```



---
## __name__
```python
from const_vs_enum import __name__
```

A benchmark for comparing equivalent validation of `const` and `enum`.

---
## __name__
```python
from unused_registry import __name__
```

An unused schema registry should not cause slower validation.

"Unused" here means one where no reference resolution is occurring anyhow.

See https://github.com/python-jsonschema/jsonschema/issues/1088.

---
## __name__
```python
from issue232 import __name__
```

A performance benchmark using the example from issue #232.

See https://github.com/python-jsonschema/jsonschema/pull/232.

---
## __name__
```python
from json_schema_test_suite import __name__
```

A performance benchmark using the official test suite.

This benchmarks jsonschema using every valid example in the
JSON-Schema-Test-Suite. It will take some time to complete.

---
## __name__
```python
from contains import __name__
```

A benchmark for validation of the `contains` keyword.

---
## __name__
```python
from useless_keywords import __name__
```

A benchmark for validation of schemas containing lots of useless keywords.

Checks we filter them out once, ahead of time.

---
## __name__
```python
from subcomponents import __name__
```

A benchmark which tries to compare the possible slow subparts of validation.

---
## registry_data_structures
```python
from subcomponents import registry_data_structures
```



---
## registry_add
```python
from subcomponents import registry_add
```



---
## __name__
```python
from useless_applicator_schemas import __name__
```

A benchmark for validation of applicators containing lots of useless schemas.

Signals a small possible optimization to remove all such schemas ahead of time.

---
## __name__
```python
from nested_schemas import __name__
```

Validating highly nested schemas shouldn't cause exponential time blowups.

See https://github.com/python-jsonschema/jsonschema/issues/1097.

---
## nested_schema
```python
from nested_schemas import nested_schema
```

Produce a schema which validates deeply nested objects and arrays.

---
## PolarsDataFrame
```python
from dataframe import PolarsDataFrame
```



---
## PolarsLazyFrame
```python
from dataframe import PolarsLazyFrame
```



---
## __narwhals_dataframe__
```python
from dataframe import __narwhals_dataframe__
```



---
## _from_native_frame
```python
from dataframe import _from_native_frame
```



---
## _from_native_object
```python
from dataframe import _from_native_object
```



---
## __getattr__
```python
from dataframe import __getattr__
```



---
## __narwhals_lazyframe__
```python
from dataframe import __narwhals_lazyframe__
```



---
## func
```python
from dataframe import func
```



---
## PolarsSeries
```python
from series import PolarsSeries
```



---
## PolarsSeriesDateTimeNamespace
```python
from series import PolarsSeriesDateTimeNamespace
```



---
## PolarsSeriesStringNamespace
```python
from series import PolarsSeriesStringNamespace
```



---
## PolarsSeriesCatNamespace
```python
from series import PolarsSeriesCatNamespace
```



---
## __narwhals_series__
```python
from series import __narwhals_series__
```



---
## _from_native_series
```python
from series import _from_native_series
```



---
## _from_native_object
```python
from series import _from_native_object
```



---
## __getattr__
```python
from series import __getattr__
```



---
## func
```python
from series import func
```



---
## PolarsGroupBy
```python
from group_by import PolarsGroupBy
```



---
## PolarsLazyGroupBy
```python
from group_by import PolarsLazyGroupBy
```



---
## extract_native
```python
from utils import extract_native
```



---
## extract_args_kwargs
```python
from utils import extract_args_kwargs
```



---
## native_to_narwhals_dtype
```python
from utils import native_to_narwhals_dtype
```



---
## narwhals_to_native_dtype
```python
from utils import narwhals_to_native_dtype
```



---
## convert_str_slice_to_int_slice
```python
from utils import convert_str_slice_to_int_slice
```



---
## __name__
```python
from namespace import __name__
```



---
## PolarsNamespace
```python
from namespace import PolarsNamespace
```



---
## PolarsSelectors
```python
from namespace import PolarsSelectors
```



---
## __init__
```python
from namespace import __init__
```



---
## __getattr__
```python
from namespace import __getattr__
```



---
## nth
```python
from namespace import nth
```



---
## len
```python
from namespace import len
```



---
## concat
```python
from namespace import concat
```



---
## lit
```python
from namespace import lit
```



---
## mean
```python
from namespace import mean
```



---
## mean_horizontal
```python
from namespace import mean_horizontal
```



---
## selectors
```python
from namespace import selectors
```



---
## by_dtype
```python
from namespace import by_dtype
```



---
## numeric
```python
from namespace import numeric
```



---
## boolean
```python
from namespace import boolean
```



---
## string
```python
from namespace import string
```



---
## categorical
```python
from namespace import categorical
```



---
## all
```python
from namespace import all
```



---
## func
```python
from namespace import func
```



---
## PolarsExpr
```python
from expr import PolarsExpr
```



---
## PolarsExprDateTimeNamespace
```python
from expr import PolarsExprDateTimeNamespace
```



---
## PolarsExprStringNamespace
```python
from expr import PolarsExprStringNamespace
```



---
## PolarsExprCatNamespace
```python
from expr import PolarsExprCatNamespace
```



---
## PolarsExprNameNamespace
```python
from expr import PolarsExprNameNamespace
```



---
## __repr__
```python
from expr import __repr__
```



---
## _from_native_expr
```python
from expr import _from_native_expr
```



---
## __getattr__
```python
from expr import __getattr__
```



---
## DaskLazyFrame
```python
from dataframe import DaskLazyFrame
```



---
## n_unique
```python
from group_by import n_unique
```



---
## DaskLazyGroupBy
```python
from group_by import DaskLazyGroupBy
```



---
## agg_dask
```python
from group_by import agg_dask
```

This should be the fastpath, but cuDF is too far behind to use it.

- https://github.com/rapidsai/cudf/issues/15118
- https://github.com/rapidsai/cudf/issues/15084

---
## chunk
```python
from group_by import chunk
```



---
## _from_native_frame
```python
from group_by import _from_native_frame
```



---
## DaskSelectorNamespace
```python
from selectors import DaskSelectorNamespace
```



---
## DaskSelector
```python
from selectors import DaskSelector
```



---
## __init__
```python
from selectors import __init__
```



---
## __repr__
```python
from selectors import __repr__
```



---
## _to_expr
```python
from selectors import _to_expr
```



---
## __sub__
```python
from selectors import __sub__
```



---
## __or__
```python
from selectors import __or__
```



---
## __and__
```python
from selectors import __and__
```



---
## __invert__
```python
from selectors import __invert__
```



---
## __rsub__
```python
from selectors import __rsub__
```



---
## __rand__
```python
from selectors import __rand__
```



---
## __ror__
```python
from selectors import __ror__
```



---
## func
```python
from selectors import func
```



---
## call
```python
from selectors import call
```



---
## maybe_evaluate
```python
from utils import maybe_evaluate
```



---
## parse_exprs_and_named_exprs
```python
from utils import parse_exprs_and_named_exprs
```



---
## add_row_index
```python
from utils import add_row_index
```



---
## validate_comparand
```python
from utils import validate_comparand
```



---
## DaskNamespace
```python
from namespace import DaskNamespace
```



---
## DaskWhen
```python
from namespace import DaskWhen
```



---
## DaskThen
```python
from namespace import DaskThen
```



---
## col
```python
from namespace import col
```



---
## min
```python
from namespace import min
```



---
## max
```python
from namespace import max
```



---
## sum
```python
from namespace import sum
```



---
## all_horizontal
```python
from namespace import all_horizontal
```



---
## any_horizontal
```python
from namespace import any_horizontal
```



---
## sum_horizontal
```python
from namespace import sum_horizontal
```



---
## _create_expr_from_series
```python
from namespace import _create_expr_from_series
```



---
## _create_compliant_series
```python
from namespace import _create_compliant_series
```



---
## _create_series_from_scalar
```python
from namespace import _create_series_from_scalar
```



---
## _create_expr_from_callable
```python
from namespace import _create_expr_from_callable
```



---
## when
```python
from namespace import when
```



---
## __call__
```python
from namespace import __call__
```



---
## then
```python
from namespace import then
```



---
## otherwise
```python
from namespace import otherwise
```



---
## convert_if_dtype
```python
from namespace import convert_if_dtype
```



---
## DaskExpr
```python
from expr import DaskExpr
```



---
## DaskExprStringNamespace
```python
from expr import DaskExprStringNamespace
```



---
## DaskExprDateTimeNamespace
```python
from expr import DaskExprDateTimeNamespace
```



---
## DaskExprNameNamespace
```python
from expr import DaskExprNameNamespace
```



---
## __narwhals_expr__
```python
from expr import __narwhals_expr__
```



---
## __narwhals_namespace__
```python
from expr import __narwhals_namespace__
```



---
## from_column_names
```python
from expr import from_column_names
```



---
## from_column_indices
```python
from expr import from_column_indices
```



---
## _from_call
```python
from expr import _from_call
```



---
## ArrowDataFrame
```python
from dataframe import ArrowDataFrame
```



---
## ArrowSeries
```python
from series import ArrowSeries
```



---
## ArrowSeriesDateTimeNamespace
```python
from series import ArrowSeriesDateTimeNamespace
```



---
## ArrowSeriesCatNamespace
```python
from series import ArrowSeriesCatNamespace
```



---
## ArrowSeriesStringNamespace
```python
from series import ArrowSeriesStringNamespace
```



---
## _from_iterable
```python
from series import _from_iterable
```



---
## __narwhals_namespace__
```python
from series import __narwhals_namespace__
```



---
## __rand__
```python
from series import __rand__
```



---
## __ror__
```python
from series import __ror__
```



---
## get_function_name_option
```python
from group_by import get_function_name_option
```

Map specific pyarrow compute function to respective option to match polars behaviour.

---
## ArrowGroupBy
```python
from group_by import ArrowGroupBy
```



---
## agg_arrow
```python
from group_by import agg_arrow
```



---
## ArrowSelectorNamespace
```python
from selectors import ArrowSelectorNamespace
```



---
## ArrowSelector
```python
from selectors import ArrowSelector
```



---
## validate_column_comparand
```python
from utils import validate_column_comparand
```

Validate RHS of binary operation.

If the comparison isn't supported, return `NotImplemented` so that the
"right-hand-side" operation (e.g. `__radd__`) can be tried.

If RHS is length 1, return the scalar value, so that the underlying
library can broadcast it.

---
## validate_dataframe_comparand
```python
from utils import validate_dataframe_comparand
```

Validate RHS of binary operation.

If the comparison isn't supported, return `NotImplemented` so that the
"right-hand-side" operation (e.g. `__radd__`) can be tried.

---
## horizontal_concat
```python
from utils import horizontal_concat
```

Concatenate (native) DataFrames horizontally.

Should be in namespace.

---
## vertical_concat
```python
from utils import vertical_concat
```

Concatenate (native) DataFrames vertically.

Should be in namespace.

---
## floordiv_compat
```python
from utils import floordiv_compat
```



---
## cast_for_truediv
```python
from utils import cast_for_truediv
```



---
## broadcast_series
```python
from utils import broadcast_series
```



---
## convert_slice_to_nparray
```python
from utils import convert_slice_to_nparray
```



---
## select_rows
```python
from utils import select_rows
```



---
## ArrowNamespace
```python
from namespace import ArrowNamespace
```



---
## ArrowWhen
```python
from namespace import ArrowWhen
```



---
## ArrowThen
```python
from namespace import ArrowThen
```



---
## _lit_arrow_series
```python
from namespace import _lit_arrow_series
```



---
## ArrowExpr
```python
from expr import ArrowExpr
```



---
## ArrowExprCatNamespace
```python
from expr import ArrowExprCatNamespace
```



---
## ArrowExprDateTimeNamespace
```python
from expr import ArrowExprDateTimeNamespace
```



---
## ArrowExprStringNamespace
```python
from expr import ArrowExprStringNamespace
```



---
## ArrowExprNameNamespace
```python
from expr import ArrowExprNameNamespace
```



---
## DtypeKind
```python
from dataframe import DtypeKind
```



---
## map_interchange_dtype_to_narwhals_dtype
```python
from dataframe import map_interchange_dtype_to_narwhals_dtype
```



---
## InterchangeFrame
```python
from dataframe import InterchangeFrame
```



---
## InterchangeSeries
```python
from series import InterchangeSeries
```



---
## map_duckdb_dtype_to_narwhals_dtype
```python
from dataframe import map_duckdb_dtype_to_narwhals_dtype
```



---
## DuckDBInterchangeFrame
```python
from dataframe import DuckDBInterchangeFrame
```



---
## DuckDBInterchangeSeries
```python
from series import DuckDBInterchangeSeries
```



---
## map_ibis_dtype_to_narwhals_dtype
```python
from dataframe import map_ibis_dtype_to_narwhals_dtype
```



---
## IbisInterchangeFrame
```python
from dataframe import IbisInterchangeFrame
```



---
## IbisInterchangeSeries
```python
from series import IbisInterchangeSeries
```



---
## PandasLikeDataFrame
```python
from dataframe import PandasLikeDataFrame
```



---
## _validate_columns
```python
from dataframe import _validate_columns
```



---
## PandasLikeSeries
```python
from series import PandasLikeSeries
```



---
## PandasLikeSeriesCatNamespace
```python
from series import PandasLikeSeriesCatNamespace
```



---
## PandasLikeSeriesStringNamespace
```python
from series import PandasLikeSeriesStringNamespace
```



---
## PandasLikeSeriesDateTimeNamespace
```python
from series import PandasLikeSeriesDateTimeNamespace
```



---
## _rename
```python
from series import _rename
```



---
## PandasLikeGroupBy
```python
from group_by import PandasLikeGroupBy
```



---
## agg_pandas
```python
from group_by import agg_pandas
```

This should be the fastpath, but cuDF is too far behind to use it.

- https://github.com/rapidsai/cudf/issues/15118
- https://github.com/rapidsai/cudf/issues/15084

---
## func
```python
from group_by import func
```



---
## PandasSelectorNamespace
```python
from selectors import PandasSelectorNamespace
```



---
## PandasSelector
```python
from selectors import PandasSelector
```



---
## create_native_series
```python
from utils import create_native_series
```



---
## native_series_from_iterable
```python
from utils import native_series_from_iterable
```

Return native series.

---
## set_axis
```python
from utils import set_axis
```



---
## get_dtype_backend
```python
from utils import get_dtype_backend
```



---
## to_datetime
```python
from utils import to_datetime
```



---
## int_dtype_mapper
```python
from utils import int_dtype_mapper
```



---
## PandasLikeNamespace
```python
from namespace import PandasLikeNamespace
```



---
## PandasWhen
```python
from namespace import PandasWhen
```



---
## PandasThen
```python
from namespace import PandasThen
```



---
## _lit_pandas_series
```python
from namespace import _lit_pandas_series
```



---
## PandasLikeExpr
```python
from expr import PandasLikeExpr
```



---
## PandasLikeExprCatNamespace
```python
from expr import PandasLikeExprCatNamespace
```



---
## PandasLikeExprStringNamespace
```python
from expr import PandasLikeExprStringNamespace
```



---
## PandasLikeExprDateTimeNamespace
```python
from expr import PandasLikeExprDateTimeNamespace
```



---
## PandasLikeExprNameNamespace
```python
from expr import PandasLikeExprNameNamespace
```



---
## DataFrame
```python
from __init__ import DataFrame
```

Narwhals DataFrame, backed by a native dataframe.

The native dataframe might be pandas.DataFrame, polars.DataFrame, ...

This class is not meant to be instantiated directly - instead, use
`narwhals.from_native`.

---
## LazyFrame
```python
from __init__ import LazyFrame
```

Narwhals DataFrame, backed by a native dataframe.

The native dataframe might be pandas.DataFrame, polars.LazyFrame, ...

This class is not meant to be instantiated directly - instead, use
`narwhals.from_native`.

---
## Series
```python
from __init__ import Series
```

Narwhals Series, backed by a native series.

The native series might be pandas.Series, polars.Series, ...

This class is not meant to be instantiated directly - instead, use
`narwhals.from_native`, making sure to pass `allow_series=True` or
`series_only=True`.

---
## Expr
```python
from __init__ import Expr
```



---
## Schema
```python
from __init__ import Schema
```

Ordered mapping of column names to their data type.

Arguments:
    schema: Mapping[str, DType] | Iterable[tuple[str, DType]] | None
        The schema definition given by column names and their associated.
        *instantiated* Narwhals data type. Accepts a mapping or an iterable of tuples.

Examples:
    Define a schema by passing *instantiated* data types.

    >>> import narwhals.stable.v1 as nw
    >>> schema = nw.Schema({"foo": nw.Int8(), "bar": nw.String()})
    >>> schema  # doctest:+SKIP
    Schema({'foo': Int8, 'bar': String})

    Access the data type associated with a specific column name.

    >>> schema["foo"]
    Int8

    Access various schema properties using the `names`, `dtypes`, and `len` methods.

    >>> schema.names()
    ['foo', 'bar']
    >>> schema.dtypes()
    [Int8, String]
    >>> schema.len()
    2

---
## _stableify
```python
from __init__ import _stableify
```



---
## from_native
```python
from __init__ import from_native
```

Convert dataframe/series to Narwhals DataFrame, LazyFrame, or Series.

Arguments:
    native_dataframe: Raw object from user.
        Depending on the other arguments, input object can be:

        - pandas.DataFrame
        - polars.DataFrame
        - polars.LazyFrame
        - anything with a `__narwhals_dataframe__` or `__narwhals_lazyframe__` method
        - pandas.Series
        - polars.Series
        - anything with a `__narwhals_series__` method
    strict: Whether to raise if object can't be converted (default) or
        to just leave it as-is.
    eager_only: Whether to only allow eager objects.
    eager_or_interchange_only: Whether to only allow eager objects or objects which
        implement the Dataframe Interchange Protocol.
    series_only: Whether to only allow series.
    allow_series: Whether to allow series (default is only dataframe / lazyframe).

Returns:
    narwhals.DataFrame or narwhals.LazyFrame or narwhals.Series

---
## narwhalify
```python
from __init__ import narwhalify
```

Decorate function so it becomes dataframe-agnostic.

`narwhalify` will try to convert any dataframe/series-like object into the narwhal
respective DataFrame/Series, while leaving the other parameters as they are.

Similarly, if the output of the function is a narwhals DataFrame or Series, it will be
converted back to the original dataframe/series type, while if the output is another
type it will be left as is.

By setting `strict=True`, then every input and every output will be required to be a
dataframe/series-like object.

Instead of writing

```python
import narwhals.stable.v1 as nw


def func(df):
    df = nw.from_native(df, strict=False)
    df = df.group_by("a").agg(nw.col("b").sum())
    return nw.to_native(df)
```

you can just write

```python
import narwhals.stable.v1 as nw


@nw.narwhalify
def func(df):
    return df.group_by("a").agg(nw.col("b").sum())
```

You can also pass in extra arguments, e.g.

```python
@nw.narwhalify(eager_only=True)
```

that will get passed down to `nw.from_native`.

Arguments:
    func: Function to wrap in a `from_native`-`to_native` block.
    strict: Whether to raise if object can't be converted or to just leave it as-is
        (default).
    eager_only: Whether to only allow eager objects.
    eager_or_interchange_only: Whether to only allow eager objects or objects which
        implement the Dataframe Interchange Protocol.
    series_only: Whether to only allow series.
    allow_series: Whether to allow series (default is only dataframe / lazyframe).

---
## all
```python
from __init__ import all
```

Instantiate an expression representing all columns.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
    >>> df_pl = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.all() * 2)

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       a   b
    0  2   8
    1  4  10
    2  6  12
    >>> func(df_pl)
    shape: (3, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 2   ┆ 8   │
    │ 4   ┆ 10  │
    │ 6   ┆ 12  │
    └─────┴─────┘

---
## col
```python
from __init__ import col
```

Creates an expression that references one or more columns by their name(s).

Arguments:
    names: Name(s) of the columns to use in the aggregation function.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [3, 4]})
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [3, 4]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.col("a") * nw.col("b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a
    0  3
    1  8
    >>> func(df_pl)
    shape: (2, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 3   │
    │ 8   │
    └─────┘

---
## nth
```python
from __init__ import nth
```

Creates an expression that references one or more columns by their index(es).

Notes:
    `nth` is not supported for Polars version<1.0.0. Please use [`col`](/api-reference/narwhals/#narwhals.col) instead.

Arguments:
    indices: One or more indices representing the columns to retrieve.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import pyarrow as pa
    >>> import narwhals.stable.v1 as nw
    >>> data = {"a": [1, 2], "b": [3, 4]}
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)
    >>> df_pa = pa.table(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.nth(0) * 2)

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a
    0  2
    1  4
    >>> func(df_pl)  # doctest: +SKIP
    shape: (2, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 2   │
    │ 4   │
    └─────┘
    >>> func(df_pa)
    pyarrow.Table
    a: int64
    ----
    a: [[2,4]]

---
## len
```python
from __init__ import len
```

Return the number of rows.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [5, 10]})
    >>> df_pl = pl.DataFrame({"a": [1, 2], "b": [5, 10]})

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.len())

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
       len
    0    2
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ len │
    │ --- │
    │ u32 │
    ╞═════╡
    │ 2   │
    └─────┘

---
## lit
```python
from __init__ import lit
```

Return an expression representing a literal value.

Arguments:
    value: The value to use as literal.
    dtype: The data type of the literal value. If not provided, the data type will be inferred.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2]})
    >>> df_pd = pd.DataFrame({"a": [1, 2]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.with_columns(nw.lit(3).alias("b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a  b
    0  1  3
    1  2  3
    >>> func(df_pl)
    shape: (2, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ i64 ┆ i32 │
    ╞═════╪═════╡
    │ 1   ┆ 3   │
    │ 2   ┆ 3   │
    └─────┴─────┘

---
## mean
```python
from __init__ import mean
```

Get the mean value.

Note:
    Syntactic sugar for ``nw.col(columns).mean()``

Arguments:
    columns: Name(s) of the columns to use in the aggregation function

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pl = pl.DataFrame({"a": [1, 8, 3]})
    >>> df_pd = pd.DataFrame({"a": [1, 8, 3]})

    We define a dataframe agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.mean("a"))

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)
         a
    0  4.0
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ f64 │
    ╞═════╡
    │ 4.0 │
    └─────┘

---
## sum
```python
from __init__ import sum
```

Sum all values.

Note:
    Syntactic sugar for ``nw.col(columns).sum()``

Arguments:
    columns: Name(s) of the columns to use in the aggregation function

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2]})
    >>> df_pd = pd.DataFrame({"a": [1, 2]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.sum("a"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a
    0  3
    >>> func(df_pl)
    shape: (1, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 3   │
    └─────┘

---
## sum_horizontal
```python
from __init__ import sum_horizontal
```

Sum all values horizontally across columns.

Warning:
    Unlike Polars, we support horizontal sum over numeric columns only.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts
        expression input.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {"a": [1, 2, 3], "b": [5, 10, None]}
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.sum_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
          a
    0   6.0
    1  12.0
    2   3.0
    >>> func(df_pl)
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 6   │
    │ 12  │
    │ 3   │
    └─────┘

---
## all_horizontal
```python
from __init__ import all_horizontal
```

Compute the bitwise AND horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts expression input.

Notes:
    pandas and Polars handle null values differently.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {
    ...     "a": [False, False, True, True, False, None],
    ...     "b": [False, True, True, None, None, None],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select("a", "b", all=nw.all_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
           a      b    all
    0  False  False  False
    1  False   True  False
    2   True   True   True
    3   True   None  False
    4  False   None  False
    5   None   None  False

    >>> func(df_pl)
    shape: (6, 3)
    ┌───────┬───────┬───────┐
    │ a     ┆ b     ┆ all   │
    │ ---   ┆ ---   ┆ ---   │
    │ bool  ┆ bool  ┆ bool  │
    ╞═══════╪═══════╪═══════╡
    │ false ┆ false ┆ false │
    │ false ┆ true  ┆ false │
    │ true  ┆ true  ┆ true  │
    │ true  ┆ null  ┆ null  │
    │ false ┆ null  ┆ false │
    │ null  ┆ null  ┆ null  │
    └───────┴───────┴───────┘

---
## any_horizontal
```python
from __init__ import any_horizontal
```

Compute the bitwise OR horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts expression input.

Notes:
    pandas and Polars handle null values differently.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {
    ...     "a": [False, False, True, True, False, None],
    ...     "b": [False, True, True, None, None, None],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select("a", "b", any=nw.any_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
           a      b    any
    0  False  False  False
    1  False   True   True
    2   True   True   True
    3   True   None   True
    4  False   None  False
    5   None   None  False

    >>> func(df_pl)
    shape: (6, 3)
    ┌───────┬───────┬───────┐
    │ a     ┆ b     ┆ any   │
    │ ---   ┆ ---   ┆ ---   │
    │ bool  ┆ bool  ┆ bool  │
    ╞═══════╪═══════╪═══════╡
    │ false ┆ false ┆ false │
    │ false ┆ true  ┆ true  │
    │ true  ┆ true  ┆ true  │
    │ true  ┆ null  ┆ true  │
    │ false ┆ null  ┆ null  │
    │ null  ┆ null  ┆ null  │
    └───────┴───────┴───────┘

---
## mean_horizontal
```python
from __init__ import mean_horizontal
```

Compute the mean of all values horizontally across columns.

Arguments:
    exprs: Name(s) of the columns to use in the aggregation function. Accepts
        expression input.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {
    ...     "a": [1, 8, 3],
    ...     "b": [4, 5, None],
    ...     "c": ["x", "y", "z"],
    ... }
    >>> df_pl = pl.DataFrame(data)
    >>> df_pd = pd.DataFrame(data)

    We define a dataframe-agnostic function that computes the horizontal mean of "a"
    and "b" columns:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.select(nw.mean_horizontal("a", "b"))

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
         a
    0  2.5
    1  6.5
    2  3.0
    >>> func(df_pl)
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ f64 │
    ╞═════╡
    │ 2.5 │
    │ 6.5 │
    │ 3.0 │
    └─────┘

---
## is_ordered_categorical
```python
from __init__ import is_ordered_categorical
```

Return whether indices of categories are semantically meaningful.

This is a convenience function to accessing what would otherwise be
the `is_ordered` property from the DataFrame Interchange Protocol,
see https://data-apis.org/dataframe-protocol/latest/API.html.

- For Polars:
  - Enums are always ordered.
  - Categoricals are ordered if `dtype.ordering == "physical"`.
- For pandas-like APIs:
  - Categoricals are ordered if `dtype.cat.ordered == True`.
- For PyArrow table:
  - Categoricals are ordered if `dtype.type.ordered == True`.

Examples:
    >>> import narwhals.stable.v1 as nw
    >>> import pandas as pd
    >>> import polars as pl
    >>> data = ["x", "y"]
    >>> s_pd = pd.Series(data, dtype=pd.CategoricalDtype(ordered=True))
    >>> s_pl = pl.Series(data, dtype=pl.Categorical(ordering="physical"))

    Let's define a library-agnostic function:

    >>> @nw.narwhalify
    ... def func(s):
    ...     return nw.is_ordered_categorical(s)

    Then, we can pass any supported library to `func`:

    >>> func(s_pd)
    True
    >>> func(s_pl)
    True

---
## maybe_align_index
```python
from __init__ import maybe_align_index
```

Align `lhs` to the Index of `rhs`, if they're both pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this only checks that `lhs` and `rhs`
    are the same length.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2]}, index=[3, 4])
    >>> s_pd = pd.Series([6, 7], index=[4, 3])
    >>> df = nw.from_native(df_pd)
    >>> s = nw.from_native(s_pd, series_only=True)
    >>> nw.to_native(nw.maybe_align_index(df, s))
       a
    4  2
    3  1

---
## maybe_convert_dtypes
```python
from __init__ import maybe_convert_dtypes
```

Convert columns or series to the best possible dtypes using dtypes supporting ``pd.NA``, if df is pandas-like.

Arguments:
    obj: DataFrame or Series.
    *args: Additional arguments which gets passed through.
    **kwargs: Additional arguments which gets passed through.

Notes:
    For non-pandas-like inputs, this is a no-op.
    Also, `args` and `kwargs` just get passed down to the underlying library as-is.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> import numpy as np
    >>> df_pd = pd.DataFrame(
    ...     {
    ...         "a": pd.Series([1, 2, 3], dtype=np.dtype("int32")),
    ...         "b": pd.Series([True, False, np.nan], dtype=np.dtype("O")),
    ...     }
    ... )
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_convert_dtypes(df)).dtypes  # doctest: +NORMALIZE_WHITESPACE
    a             Int32
    b           boolean
    dtype: object

---
## maybe_get_index
```python
from __init__ import maybe_get_index
```

Get the index of a DataFrame or a Series, if it's pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this returns `None`.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]})
    >>> df = nw.from_native(df_pd)
    >>> nw.maybe_get_index(df)
    RangeIndex(start=0, stop=2, step=1)
    >>> series_pd = pd.Series([1, 2])
    >>> series = nw.from_native(series_pd, series_only=True)
    >>> nw.maybe_get_index(series)
    RangeIndex(start=0, stop=2, step=1)

---
## maybe_set_index
```python
from __init__ import maybe_set_index
```

Set columns `columns` to be the index of `df`, if `df` is pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already aligns indices for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this is a no-op.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]})
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_set_index(df, "b"))  # doctest: +NORMALIZE_WHITESPACE
       a
    b
    4  1
    5  2

---
## maybe_reset_index
```python
from __init__ import maybe_reset_index
```

Reset the index to the default integer index of a DataFrame or a Series, if it's pandas-like.

Notes:
    This is only really intended for backwards-compatibility purposes,
    for example if your library already resets the index for users.
    If you're designing a new library, we highly encourage you to not
    rely on the Index.
    For non-pandas-like inputs, this is a no-op.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pd = pd.DataFrame({"a": [1, 2], "b": [4, 5]}, index=([6, 7]))
    >>> df = nw.from_native(df_pd)
    >>> nw.to_native(nw.maybe_reset_index(df))
       a  b
    0  1  4
    1  2  5
    >>> series_pd = pd.Series([1, 2])
    >>> series = nw.from_native(series_pd, series_only=True)
    >>> nw.maybe_get_index(series)
    RangeIndex(start=0, stop=2, step=1)

---
## get_native_namespace
```python
from __init__ import get_native_namespace
```

Get native namespace from object.

Examples:
    >>> import polars as pl
    >>> import pandas as pd
    >>> import narwhals.stable.v1 as nw
    >>> df = nw.from_native(pd.DataFrame({"a": [1, 2, 3]}))
    >>> nw.get_native_namespace(df)
    <module 'pandas'...>
    >>> df = nw.from_native(pl.DataFrame({"a": [1, 2, 3]}))
    >>> nw.get_native_namespace(df)
    <module 'polars'...>

---
## When
```python
from __init__ import When
```



---
## Then
```python
from __init__ import Then
```



---
## when
```python
from __init__ import when
```

Start a `when-then-otherwise` expression.

Expression similar to an `if-else` statement in Python. Always initiated by a `pl.when(<condition>).then(<value if condition>)`., and optionally followed by chaining one or more `.when(<condition>).then(<value>)` statements.
Chained when-then operations should be read as Python `if, elif, ... elif` blocks, not as `if, if, ... if`, i.e. the first condition that evaluates to `True` will be picked.
If none of the conditions are `True`, an optional `.otherwise(<value if all statements are false>)` can be appended at the end. If not appended, and none of the conditions are `True`, `None` will be returned.

Arguments:
    predicates: Condition(s) that must be met in order to apply the subsequent statement. Accepts one or more boolean expressions, which are implicitly combined with `&`. String input is parsed as a column name.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> df_pl = pl.DataFrame({"a": [1, 2, 3], "b": [5, 10, 15]})
    >>> df_pd = pd.DataFrame({"a": [1, 2, 3], "b": [5, 10, 15]})

    We define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df_any):
    ...     return df_any.with_columns(
    ...         nw.when(nw.col("a") < 3).then(5).otherwise(6).alias("a_when")
    ...     )

    We can then pass either pandas or polars to `func`:

    >>> func(df_pd)
       a   b  a_when
    0  1   5       5
    1  2  10       5
    2  3  15       6
    >>> func(df_pl)
    shape: (3, 3)
    ┌─────┬─────┬────────┐
    │ a   ┆ b   ┆ a_when │
    │ --- ┆ --- ┆ ---    │
    │ i64 ┆ i64 ┆ i32    │
    ╞═════╪═════╪════════╡
    │ 1   ┆ 5   ┆ 5      │
    │ 2   ┆ 10  ┆ 5      │
    │ 3   ┆ 15  ┆ 6      │
    └─────┴─────┴────────┘

---
## new_series
```python
from __init__ import new_series
```

Instantiate Narwhals Series from raw data.

Arguments:
    name: Name of resulting Series.
    values: Values of make Series from.
    dtype: (Narwhals) dtype. If not provided, the native library
        may auto-infer it from `values`.
    native_namespace: The native library to use for DataFrame creation.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {"a": [1, 2, 3], "b": [4, 5, 6]}

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     values = [4, 1, 2]
    ...     native_namespace = nw.get_native_namespace(df)
    ...     return nw.new_series("c", values, nw.Int32, native_namespace=native_namespace)

    Let's see what happens when passing pandas / Polars input:

    >>> func(pd.DataFrame(data))
    0    4
    1    1
    2    2
    Name: c, dtype: int32
    >>> func(pl.DataFrame(data))  # doctest: +NORMALIZE_WHITESPACE
    shape: (3,)
    Series: 'c' [i32]
    [
       4
       1
       2
    ]

---
## from_dict
```python
from __init__ import from_dict
```

Instantiate DataFrame from dictionary.

Notes:
    For pandas-like dataframes, conversion to schema is applied after dataframe
    creation.

Arguments:
    data: Dictionary to create DataFrame from.
    schema: The DataFrame schema as Schema or dict of {name: type}.
    native_namespace: The native library to use for DataFrame creation. Only
        necessary if inputs are not Narwhals Series.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> data = {"a": [1, 2, 3], "b": [4, 5, 6]}

    Let's create a new dataframe of the same class as the dataframe we started with, from a dict of new data:

    >>> @nw.narwhalify
    ... def func(df):
    ...     new_data = {"c": [5, 2], "d": [1, 4]}
    ...     native_namespace = nw.get_native_namespace(df)
    ...     return nw.from_dict(new_data, native_namespace=native_namespace)

    Let's see what happens when passing pandas / Polars input:

    >>> func(pd.DataFrame(data))
       c  d
    0  5  1
    1  2  4
    >>> func(pl.DataFrame(data))
    shape: (2, 2)
    ┌─────┬─────┐
    │ c   ┆ d   │
    │ --- ┆ --- │
    │ i64 ┆ i64 │
    ╞═════╪═════╡
    │ 5   ┆ 1   │
    │ 2   ┆ 4   │
    └─────┴─────┘

---
## _series
```python
from __init__ import _series
```



---
## _lazyframe
```python
from __init__ import _lazyframe
```



---
## lazy
```python
from __init__ import lazy
```

Lazify the DataFrame (if possible).

If a library does not support lazy execution, then this is a no-op.

Examples:
    Construct pandas, Polars and PyArrow DataFrames:

    >>> import pandas as pd
    >>> import polars as pl
    >>> import pyarrow as pa
    >>> import narwhals.stable.v1 as nw
    >>> df = {"foo": [1, 2, 3], "bar": [6.0, 7.0, 8.0], "ham": ["a", "b", "c"]}
    >>> df_pd = pd.DataFrame(df)
    >>> df_pl = pl.DataFrame(df)
    >>> df_pa = pa.table(df)

    We define a library agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.lazy()

    Note that then, pandas and pyarrow dataframe stay eager, but Polars DataFrame becomes a Polars LazyFrame:

    >>> func(df_pd)
       foo  bar ham
    0    1  6.0   a
    1    2  7.0   b
    2    3  8.0   c
    >>> func(df_pl)
    <LazyFrame ...>
    >>> func(df_pa)
    pyarrow.Table
    foo: int64
    bar: double
    ham: string
    ----
    foo: [[1,2,3]]
    bar: [[6,7,8]]
    ham: [["a","b","c"]]

---
## to_dict
```python
from __init__ import to_dict
```

Convert DataFrame to a dictionary mapping column name to values.

Arguments:
    as_series: If set to true ``True``, then the values are Narwhals Series,
                otherwise the values are Any.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import pyarrow as pa
    >>> import narwhals.stable.v1 as nw
    >>> df = {
    ...     "A": [1, 2, 3, 4, 5],
    ...     "fruits": ["banana", "banana", "apple", "apple", "banana"],
    ...     "B": [5, 4, 3, 2, 1],
    ...     "animals": ["beetle", "fly", "beetle", "beetle", "beetle"],
    ...     "optional": [28, 300, None, 2, -30],
    ... }
    >>> df_pd = pd.DataFrame(df)
    >>> df_pl = pl.DataFrame(df)
    >>> df_pa = pa.table(df)

    We define a library agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.to_dict(as_series=False)

    We can then pass either pandas, Polars or PyArrow to `func`:

    >>> func(df_pd)
    {'A': [1, 2, 3, 4, 5], 'fruits': ['banana', 'banana', 'apple', 'apple', 'banana'], 'B': [5, 4, 3, 2, 1], 'animals': ['beetle', 'fly', 'beetle', 'beetle', 'beetle'], 'optional': [28.0, 300.0, nan, 2.0, -30.0]}
    >>> func(df_pl)
    {'A': [1, 2, 3, 4, 5], 'fruits': ['banana', 'banana', 'apple', 'apple', 'banana'], 'B': [5, 4, 3, 2, 1], 'animals': ['beetle', 'fly', 'beetle', 'beetle', 'beetle'], 'optional': [28, 300, None, 2, -30]}
    >>> func(df_pa)
    {'A': [1, 2, 3, 4, 5], 'fruits': ['banana', 'banana', 'apple', 'apple', 'banana'], 'B': [5, 4, 3, 2, 1], 'animals': ['beetle', 'fly', 'beetle', 'beetle', 'beetle'], 'optional': [28, 300, None, 2, -30]}

---
## is_duplicated
```python
from __init__ import is_duplicated
```

Get a mask of all duplicated rows in this DataFrame.

Examples:
    >>> import narwhals.stable.v1 as nw
    >>> import pandas as pd
    >>> import polars as pl
    >>> df_pd = pd.DataFrame(
    ...     {
    ...         "a": [1, 2, 3, 1],
    ...         "b": ["x", "y", "z", "x"],
    ...     }
    ... )
    >>> df_pl = pl.DataFrame(
    ...     {
    ...         "a": [1, 2, 3, 1],
    ...         "b": ["x", "y", "z", "x"],
    ...     }
    ... )

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.is_duplicated()

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)  # doctest: +NORMALIZE_WHITESPACE
    0     True
    1    False
    2    False
    3     True
    dtype: bool

    >>> func(df_pl)  # doctest: +NORMALIZE_WHITESPACE
    shape: (4,)
    Series: '' [bool]
    [
        true
        false
        false
        true
    ]

---
## is_unique
```python
from __init__ import is_unique
```

Get a mask of all unique rows in this DataFrame.

Examples:
    >>> import narwhals.stable.v1 as nw
    >>> import pandas as pd
    >>> import polars as pl
    >>> df_pd = pd.DataFrame(
    ...     {
    ...         "a": [1, 2, 3, 1],
    ...         "b": ["x", "y", "z", "x"],
    ...     }
    ... )
    >>> df_pl = pl.DataFrame(
    ...     {
    ...         "a": [1, 2, 3, 1],
    ...         "b": ["x", "y", "z", "x"],
    ...     }
    ... )

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(df):
    ...     return df.is_unique()

    We can then pass either pandas or Polars to `func`:

    >>> func(df_pd)  # doctest: +NORMALIZE_WHITESPACE
    0    False
    1     True
    2     True
    3    False
    dtype: bool

    >>> func(df_pl)  # doctest: +NORMALIZE_WHITESPACE
    shape: (4,)
    Series: '' [bool]
    [
        false
         true
         true
        false
    ]

---
## _l1_norm
```python
from __init__ import _l1_norm
```



---
## _dataframe
```python
from __init__ import _dataframe
```



---
## collect
```python
from __init__ import collect
```

Materialize this LazyFrame into a DataFrame.

Returns:
    DataFrame

Examples:
    >>> import narwhals.stable.v1 as nw
    >>> import polars as pl
    >>> lf_pl = pl.LazyFrame(
    ...     {
    ...         "a": ["a", "b", "a", "b", "b", "c"],
    ...         "b": [1, 2, 3, 4, 5, 6],
    ...         "c": [6, 5, 4, 3, 2, 1],
    ...     }
    ... )
    >>> lf = nw.from_native(lf_pl)
    >>> lf
    ┌───────────────────────────────────────┐
    | Narwhals LazyFrame                    |
    | Use `.to_native` to see native output |
    └───────────────────────────────────────┘
    >>> df = lf.group_by("a").agg(nw.all().sum()).collect()
    >>> df.to_native().sort("a")
    shape: (3, 3)
    ┌─────┬─────┬─────┐
    │ a   ┆ b   ┆ c   │
    │ --- ┆ --- ┆ --- │
    │ str ┆ i64 ┆ i64 │
    ╞═════╪═════╪═════╡
    │ a   ┆ 4   ┆ 10  │
    │ b   ┆ 11  ┆ 10  │
    │ c   ┆ 6   ┆ 1   │
    └─────┴─────┴─────┘

---
## to_frame
```python
from __init__ import to_frame
```

Convert to dataframe.

Examples:
    >>> import pandas as pd
    >>> import polars as pl
    >>> import narwhals.stable.v1 as nw
    >>> s = [1, 2, 3]
    >>> s_pd = pd.Series(s, name="a")
    >>> s_pl = pl.Series("a", s)

    We define a library agnostic function:

    >>> @nw.narwhalify
    ... def func(s):
    ...     return s.to_frame()

    We can then pass either pandas or Polars to `func`:

    >>> func(s_pd)
       a
    0  1
    1  2
    2  3
    >>> func(s_pl)
    shape: (3, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ i64 │
    ╞═════╡
    │ 1   │
    │ 2   │
    │ 3   │
    └─────┘

---
## value_counts
```python
from __init__ import value_counts
```

Count the occurrences of unique values.

Arguments:
    sort: Sort the output by count in descending order. If set to False (default),
        the order of the output is random.
    parallel: Execute the computation in parallel. Used for Polars only.
    name: Give the resulting count column a specific name; if `normalize` is True
        defaults to "proportion", otherwise defaults to "count".
    normalize: If true gives relative frequencies of the unique values

Examples:
    >>> import narwhals.stable.v1 as nw
    >>> import pandas as pd
    >>> import polars as pl
    >>> s_pd = pd.Series([1, 1, 2, 3, 2], name="s")
    >>> s_pl = pl.Series(values=[1, 1, 2, 3, 2], name="s")

    Let's define a dataframe-agnostic function:

    >>> @nw.narwhalify
    ... def func(s):
    ...     return s.value_counts(sort=True)

    We can then pass either pandas or Polars to `func`:

    >>> func(s_pd)  # doctest: +NORMALIZE_WHITESPACE
       s  count
    0  1      2
    1  2      2
    2  3      1

    >>> func(s_pl)  # doctest: +NORMALIZE_WHITESPACE
    shape: (3, 2)
    ┌─────┬───────┐
    │ s   ┆ count │
    │ --- ┆ ---   │
    │ i64 ┆ u32   │
    ╞═════╪═══════╡
    │ 1   ┆ 2     │
    │ 2   ┆ 2     │
    │ 3   ┆ 1     │
    └─────┴───────┘

---
## from_when
```python
from __init__ import from_when
```



---
## then
```python
from __init__ import then
```



---
## from_then
```python
from __init__ import from_then
```



---
## otherwise
```python
from __init__ import otherwise
```



---
## Datetime
```python
from _dtypes import Datetime
```

Data type representing a calendar date and time of day.

Arguments:
    time_unit: Unit of time. Defaults to `'us'` (microseconds).
    time_zone: Time zone string, as defined in zoneinfo (to see valid strings run
        `import zoneinfo; zoneinfo.available_timezones()` for a full list).

Notes:
    Adapted from Polars implementation at:
    https://github.com/pola-rs/polars/blob/py-1.7.1/py-polars/polars/datatypes/classes.py#L398-L457

---
## Duration
```python
from _dtypes import Duration
```

Data type representing a time duration.

Arguments:
    time_unit: Unit of time. Defaults to `'us'` (microseconds).

Notes:
    Adapted from Polars implementation at:
    https://github.com/pola-rs/polars/blob/py-1.7.1/py-polars/polars/datatypes/classes.py#L460-L502

---
## __hash__
```python
from _dtypes import __hash__
```



---
## _TqdmLoggingHandler
```python
from logging import _TqdmLoggingHandler
```



---
## _is_console_logging_handler
```python
from logging import _is_console_logging_handler
```



---
## _get_first_found_console_logging_handler
```python
from logging import _get_first_found_console_logging_handler
```



---
## logging_redirect_tqdm
```python
from logging import logging_redirect_tqdm
```

Context manager redirecting console logging to `tqdm.write()`, leaving
other logging handlers (e.g. log files) unaffected.

Parameters
----------
loggers  : list, optional
  Which handlers to redirect (default: [logging.root]).
tqdm_class  : optional

Example
-------
```python
import logging
from tqdm import trange
from tqdm.contrib.logging import logging_redirect_tqdm

LOG = logging.getLogger(__name__)

if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO)
    with logging_redirect_tqdm():
        for i in trange(9):
            if i == 4:
                LOG.info("console logging redirected to `tqdm.write()`")
    # logging restored
```

---
## tqdm_logging_redirect
```python
from logging import tqdm_logging_redirect
```

Convenience shortcut for:
```python
with tqdm_class(*args, **tqdm_kwargs) as pbar:
    with logging_redirect_tqdm(loggers=loggers, tqdm_class=tqdm_class):
        yield pbar
```

Parameters
----------
tqdm_class  : optional, (default: tqdm.std.tqdm).
loggers  : optional, list.
**tqdm_kwargs  : passed to `tqdm_class`.

---
## __name__
```python
from concurrent import __name__
```

Thin wrappers around `concurrent.futures`.

---
## ensure_lock
```python
from concurrent import ensure_lock
```

get (create if necessary) and then restore `tqdm_class`'s lock

---
## _executor_map
```python
from concurrent import _executor_map
```

Implementation of `thread_map` and `process_map`.

Parameters
----------
tqdm_class  : [default: tqdm.auto.tqdm].
max_workers  : [default: min(32, cpu_count() + 4)].
chunksize  : [default: 1].
lock_name  : [default: "":str].

---
## thread_map
```python
from concurrent import thread_map
```

Equivalent of `list(map(fn, *iterables))`
driven by `concurrent.futures.ThreadPoolExecutor`.

Parameters
----------
tqdm_class  : optional
    `tqdm` class to use for bars [default: tqdm.auto.tqdm].
max_workers  : int, optional
    Maximum number of workers to spawn; passed to
    `concurrent.futures.ThreadPoolExecutor.__init__`.
    [default: max(32, cpu_count() + 4)].

---
## process_map
```python
from concurrent import process_map
```

Equivalent of `list(map(fn, *iterables))`
driven by `concurrent.futures.ProcessPoolExecutor`.

Parameters
----------
tqdm_class  : optional
    `tqdm` class to use for bars [default: tqdm.auto.tqdm].
max_workers  : int, optional
    Maximum number of workers to spawn; passed to
    `concurrent.futures.ProcessPoolExecutor.__init__`.
    [default: min(32, cpu_count() + 4)].
chunksize  : int, optional
    Size of chunks sent to worker processes; passed to
    `concurrent.futures.ProcessPoolExecutor.map`. [default: 1].
lock_name  : str, optional
    Member of `tqdm_class.get_lock()` to use [default: mp_lock].

---
## __name__
```python
from bells import __name__
```

Even more features than `tqdm.auto` (all the bells & whistles):

- `tqdm.auto`
- `tqdm.tqdm.pandas`
- `tqdm.contrib.telegram`
    + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}`
- `tqdm.contrib.discord`
    + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}`

---
## __name__
```python
from telegram import __name__
```

Sends updates to a Telegram bot.

Usage:
>>> from tqdm.contrib.telegram import tqdm, trange
>>> for i in trange(10, token='{token}', chat_id='{chat_id}'):
...     ...

![screenshot](https://tqdm.github.io/img/screenshot-telegram.gif)

---
## TelegramIO
```python
from telegram import TelegramIO
```

Non-blocking file-like IO using a Telegram Bot.

---
## tqdm_telegram
```python
from telegram import tqdm_telegram
```

Standard `tqdm.auto.tqdm` but also sends updates to a Telegram Bot.
May take a few seconds to create (`__init__`).

- create a bot <https://core.telegram.org/bots#6-botfather>
- copy its `{token}`
- add the bot to a chat and send it a message such as `/start`
- go to <https://api.telegram.org/bot`{token}`/getUpdates> to find out
  the `{chat_id}`
- paste the `{token}` & `{chat_id}` below

>>> from tqdm.contrib.telegram import tqdm, trange
>>> for i in tqdm(iterable, token='{token}', chat_id='{chat_id}'):
...     ...

---
## ttgrange
```python
from telegram import ttgrange
```

Shortcut for `tqdm.contrib.telegram.tqdm(range(*args), **kwargs)`.

---
## __init__
```python
from telegram import __init__
```

Parameters
----------
token  : str, required. Telegram token
    [default: ${TQDM_TELEGRAM_TOKEN}].
chat_id  : str, required. Telegram chat ID
    [default: ${TQDM_TELEGRAM_CHAT_ID}].

See `tqdm.auto.tqdm.__init__` for other parameters.

---
## message_id
```python
from telegram import message_id
```



---
## write
```python
from telegram import write
```

Replaces internal `message_id`'s text with `s`.

---
## delete
```python
from telegram import delete
```

Deletes internal `message_id`.

---
## display
```python
from telegram import display
```



---
## clear
```python
from telegram import clear
```



---
## close
```python
from telegram import close
```



---
## __name__
```python
from discord import __name__
```

Sends updates to a Discord bot.

Usage:
>>> from tqdm.contrib.discord import tqdm, trange
>>> for i in trange(10, token='{token}', channel_id='{channel_id}'):
...     ...

![screenshot](https://tqdm.github.io/img/screenshot-discord.png)

---
## DiscordIO
```python
from discord import DiscordIO
```

Non-blocking file-like IO using a Discord Bot.

---
## tqdm_discord
```python
from discord import tqdm_discord
```

Standard `tqdm.auto.tqdm` but also sends updates to a Discord Bot.
May take a few seconds to create (`__init__`).

- create a discord bot (not public, no requirement of OAuth2 code
  grant, only send message permissions) & invite it to a channel:
  <https://discordpy.readthedocs.io/en/latest/discord.html>
- copy the bot `{token}` & `{channel_id}` and paste below

>>> from tqdm.contrib.discord import tqdm, trange
>>> for i in tqdm(iterable, token='{token}', channel_id='{channel_id}'):
...     ...

---
## tdrange
```python
from discord import tdrange
```

Shortcut for `tqdm.contrib.discord.tqdm(range(*args), **kwargs)`.

---
## __init__
```python
from discord import __init__
```

Parameters
----------
token  : str, required. Discord token
    [default: ${TQDM_DISCORD_TOKEN}].
channel_id  : int, required. Discord channel ID
    [default: ${TQDM_DISCORD_CHANNEL_ID}].
mininterval  : float, optional.
  Minimum of [default: 1.5] to avoid rate limit.

See `tqdm.auto.tqdm.__init__` for other parameters.

---
## write
```python
from discord import write
```

Replaces internal `message`'s text with `s`.

---
## display
```python
from discord import display
```



---
## clear
```python
from discord import clear
```



---
## DummyTqdmFile
```python
from __init__ import DummyTqdmFile
```

Dummy file-like that will write to tqdm

---
## builtin_iterable
```python
from __init__ import builtin_iterable
```

Returns `func`

---
## tenumerate
```python
from __init__ import tenumerate
```

Equivalent of `numpy.ndenumerate` or builtin `enumerate`.

Parameters
----------
tqdm_class  : [default: tqdm.auto.tqdm].

---
## tzip
```python
from __init__ import tzip
```

Equivalent of builtin `zip`.

Parameters
----------
tqdm_class  : [default: tqdm.auto.tqdm].

---
## tmap
```python
from __init__ import tmap
```

Equivalent of builtin `map`.

Parameters
----------
tqdm_class  : [default: tqdm.auto.tqdm].

---
## __name__
```python
from slack import __name__
```

Sends updates to a Slack app.

Usage:
>>> from tqdm.contrib.slack import tqdm, trange
>>> for i in trange(10, token='{token}', channel='{channel}'):
...     ...

![screenshot](https://tqdm.github.io/img/screenshot-slack.png)

---
## SlackIO
```python
from slack import SlackIO
```

Non-blocking file-like IO using a Slack app.

---
## tqdm_slack
```python
from slack import tqdm_slack
```

Standard `tqdm.auto.tqdm` but also sends updates to a Slack app.
May take a few seconds to create (`__init__`).

- create a Slack app with the `chat:write` scope & invite it to a
  channel: <https://api.slack.com/authentication/basics>
- copy the bot `{token}` & `{channel}` and paste below
>>> from tqdm.contrib.slack import tqdm, trange
>>> for i in tqdm(iterable, token='{token}', channel='{channel}'):
...     ...

---
## tsrange
```python
from slack import tsrange
```

Shortcut for `tqdm.contrib.slack.tqdm(range(*args), **kwargs)`.

---
## __init__
```python
from slack import __init__
```

Parameters
----------
token  : str, required. Slack token
    [default: ${TQDM_SLACK_TOKEN}].
channel  : int, required. Slack channel
    [default: ${TQDM_SLACK_CHANNEL}].
mininterval  : float, optional.
  Minimum of [default: 1.5] to avoid rate limit.

See `tqdm.auto.tqdm.__init__` for other parameters.

---
## write
```python
from slack import write
```

Replaces internal `message`'s text with `s`.

---
## display
```python
from slack import display
```



---
## clear
```python
from slack import clear
```



---
## __name__
```python
from itertools import __name__
```

Thin wrappers around `itertools`.

---
## product
```python
from itertools import product
```

Equivalent of `itertools.product`.

Parameters
----------
tqdm_class  : [default: tqdm.auto.tqdm].

---
## __name__
```python
from utils_worker import __name__
```

IO/concurrency helpers for `tqdm.contrib`.

---
## MonoWorker
```python
from utils_worker import MonoWorker
```

Supports one running task and one waiting task.
The waiting task is the most recent submitted (others are discarded).

---
## __init__
```python
from utils_worker import __init__
```



---
## submit
```python
from utils_worker import submit
```

`func(*args, **kwargs)` may replace currently waiting task.

---
## suppress_exceptions
```python
from __init__ import suppress_exceptions
```

yield the results of calling each element of callables, suppressing
any indicated exceptions.

---
## __name__
```python
from platform_ import __name__
```



---
## _data_root_Windows
```python
from platform_ import _data_root_Windows
```



---
## _data_root_Linux
```python
from platform_ import _data_root_Linux
```

Use freedesktop.org Base Dir Specification to determine storage
location.

---
## _config_root_Linux
```python
from platform_ import _config_root_Linux
```

Use freedesktop.org Base Dir Specification to determine config
location.

---
## Keyring
```python
from null import Keyring
```

Keyring that return None on every operation.

>>> kr = Keyring()
>>> kr.get_password('svc', 'user')

---
## priority
```python
from null import priority
```



---
## get_password
```python
from null import get_password
```



---
## __name__
```python
from kwallet import __name__
```



---
## _id_from_argv
```python
from kwallet import _id_from_argv
```

Safely infer an app id from sys.argv.

---
## DBusKeyring
```python
from kwallet import DBusKeyring
```

KDE KWallet 5 via D-Bus

---
## DBusKeyringKWallet4
```python
from kwallet import DBusKeyringKWallet4
```

KDE KWallet 4 via D-Bus

---
## priority
```python
from kwallet import priority
```



---
## __init__
```python
from kwallet import __init__
```



---
## _migrate
```python
from kwallet import _migrate
```



---
## connected
```python
from kwallet import connected
```



---
## get_password
```python
from kwallet import get_password
```

Get password of the username for the service

---
## get_credential
```python
from kwallet import get_credential
```

Gets the first username and password for a service.
Returns a Credential instance

The username can be omitted, but if there is one, it will forward to
get_password.
Otherwise, it will return the first username and password combo that it finds.

---
## set_password
```python
from kwallet import set_password
```

Set password for the username of the service

---
## delete_password
```python
from kwallet import delete_password
```

Delete the password for the username of the service.

---
## __name__
```python
from fail import __name__
```



---
## Keyring
```python
from fail import Keyring
```

Keyring that raises error on every operation.

>>> kr = Keyring()
>>> kr.get_password('svc', 'user')
Traceback (most recent call last):
...
keyring.errors.NoKeyringError: ...No recommended backend...

---
## priority
```python
from fail import priority
```



---
## get_password
```python
from fail import get_password
```



---
## __name__
```python
from SecretService import __name__
```



---
## Keyring
```python
from SecretService import Keyring
```

Secret Service Keyring

---
## priority
```python
from SecretService import priority
```



---
## get_preferred_collection
```python
from SecretService import get_preferred_collection
```

If self.preferred_collection contains a D-Bus path,
the collection at that address is returned. Otherwise,
the default collection is returned.

---
## unlock
```python
from SecretService import unlock
```



---
## get_password
```python
from SecretService import get_password
```

Get password of the username for the service

---
## set_password
```python
from SecretService import set_password
```

Set password for the username of the service

---
## delete_password
```python
from SecretService import delete_password
```

Delete the stored password (only the first one)

---
## get_credential
```python
from SecretService import get_credential
```

Gets the first username and password for a service.
Returns a Credential instance

The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing  the username and password
Otherwise, it will return the first username and password combo that it finds.

---
## __name__
```python
from Windows import __name__
```



---
## Persistence
```python
from Windows import Persistence
```



---
## DecodingCredential
```python
from Windows import DecodingCredential
```



---
## WinVaultKeyring
```python
from Windows import WinVaultKeyring
```

WinVaultKeyring stores encrypted passwords using the Windows Credential
Manager.

Requires pywin32

This backend does some gymnastics to simulate multi-user support,
which WinVault doesn't support natively. See
https://github.com/jaraco/keyring/issues/47#issuecomment-75763152
for details on the implementation, but here's the gist:

Passwords are stored under the service name unless there is a collision
(another password with the same service name but different user name),
in which case the previous password is moved into a compound name:
{username}@{service}

---
## __get__
```python
from Windows import __get__
```



---
## __set__
```python
from Windows import __set__
```

Set the persistence value on the Keyring. Value may be
one of the win32cred.CRED_PERSIST_* constants or a
string representing one of those constants. For example,
'local machine' or 'session'.

---
## value
```python
from Windows import value
```

Attempt to decode the credential blob as UTF-16 then UTF-8.

---
## priority
```python
from Windows import priority
```

If available, the preferred backend on Windows.

---
## _compound_name
```python
from Windows import _compound_name
```



---
## get_password
```python
from Windows import get_password
```



---
## _get_password
```python
from Windows import _get_password
```



---
## set_password
```python
from Windows import set_password
```



---
## _set_password
```python
from Windows import _set_password
```



---
## delete_password
```python
from Windows import delete_password
```



---
## _delete_password
```python
from Windows import _delete_password
```



---
## get_credential
```python
from Windows import get_credential
```



---
## __name__
```python
from libsecret import __name__
```



---
## Keyring
```python
from libsecret import Keyring
```

libsecret Keyring

---
## schema
```python
from libsecret import schema
```



---
## collection
```python
from libsecret import collection
```



---
## priority
```python
from libsecret import priority
```



---
## get_password
```python
from libsecret import get_password
```

Get password of the username for the service

---
## set_password
```python
from libsecret import set_password
```

Set password for the username of the service

---
## delete_password
```python
from libsecret import delete_password
```

Delete the stored password (only the first one)

---
## get_credential
```python
from libsecret import get_credential
```

Get the first username and password for a service.
Return a Credential instance

The username can be omitted, but if there is one, it will use get_password
and return a SimpleCredential containing  the username and password
Otherwise, it will return the first username and password combo that it finds.

---
## __name__
```python
from chainer import __name__
```



---
## ChainerBackend
```python
from chainer import ChainerBackend
```

>>> ChainerBackend()
<keyring.backends.chainer.ChainerBackend object at ...>

---
## priority
```python
from chainer import priority
```

If there are backends to chain, high priority
Otherwise very low priority since our operation when empty
is the same as null.

---
## backends
```python
from chainer import backends
```

Discover all keyrings for chaining.

---
## get_password
```python
from chainer import get_password
```



---
## set_password
```python
from chainer import set_password
```



---
## delete_password
```python
from chainer import delete_password
```



---
## get_credential
```python
from chainer import get_credential
```



---
## allow
```python
from chainer import allow
```



---
## is_ascii_printable
```python
from backend import is_ascii_printable
```



---
## BackendBasicTests
```python
from backend import BackendBasicTests
```

Test for the keyring's basic functions. password_set and password_get

---
## _init_properties
```python
from backend import _init_properties
```



---
## cleanup
```python
from backend import cleanup
```



---
## check_set_get
```python
from backend import check_set_get
```



---
## test_password_set_get
```python
from backend import test_password_set_get
```



---
## test_set_after_set_blank
```python
from backend import test_set_after_set_blank
```



---
## test_difficult_chars
```python
from backend import test_difficult_chars
```



---
## test_delete_present
```python
from backend import test_delete_present
```



---
## test_delete_not_present
```python
from backend import test_delete_not_present
```



---
## test_delete_one_in_group
```python
from backend import test_delete_one_in_group
```



---
## test_name_property
```python
from backend import test_name_property
```



---
## test_unicode_chars
```python
from backend import test_unicode_chars
```



---
## test_unicode_and_ascii_chars
```python
from backend import test_unicode_and_ascii_chars
```



---
## test_different_user
```python
from backend import test_different_user
```

Issue #47 reports that WinVault isn't storing passwords for
multiple users. This test exercises that test for each of the
backends.

---
## test_credential
```python
from backend import test_credential
```



---
## test_empty_username
```python
from backend import test_empty_username
```



---
## test_set_properties
```python
from backend import test_set_properties
```



---
## test_new_with_properties
```python
from backend import test_new_with_properties
```



---
## ImportKiller
```python
from util import ImportKiller
```

Context manager to make an import of a given name or names fail.

---
## NoNoneDictMutator
```python
from util import NoNoneDictMutator
```

Helper context manager to make and unmake changes to a dict.

A None is not a valid value for the destination, and so means that the
associated name should be removed.

---
## Environ
```python
from util import Environ
```

A context manager to temporarily change the os.environ

---
## random_string
```python
from util import random_string
```

Generate a random string with length <i>k</i>

---
## find_module
```python
from util import find_module
```



---
## load_module
```python
from util import load_module
```



---
## warn_keychain
```python
from __init__ import warn_keychain
```



---
## Keyring
```python
from __init__ import Keyring
```

macOS Keychain

---
## priority
```python
from __init__ import priority
```

Preferred for all macOS environments.

---
## set_password
```python
from __init__ import set_password
```



---
## get_password
```python
from __init__ import get_password
```



---
## delete_password
```python
from __init__ import delete_password
```



---
## with_keychain
```python
from __init__ import with_keychain
```



---
## error
```python
from api import error
```



---
## k_
```python
from api import k_
```



---
## create_cf
```python
from api import create_cf
```



---
## _
```python
from api import _
```



---
## create_query
```python
from api import create_query
```



---
## cfstr_to_str
```python
from api import cfstr_to_str
```



---
## Error
```python
from api import Error
```



---
## NotFound
```python
from api import NotFound
```



---
## KeychainDenied
```python
from api import KeychainDenied
```



---
## SecAuthFailure
```python
from api import SecAuthFailure
```



---
## find_generic_password
```python
from api import find_generic_password
```



---
## set_generic_password
```python
from api import set_generic_password
```



---
## delete_generic_password
```python
from api import delete_generic_password
```



---
## raise_for_status
```python
from api import raise_for_status
```



---
## AugmentedHelpFormatter
```python
from client import AugmentedHelpFormatter
```



---
## BadStatus
```python
from client import BadStatus
```

Exception raised when there is something wrong with the status file.

For example:
- No status file found
- Status file malformed
- Process whose pid is in the status file does not exist

---
## main
```python
from client import main
```



---
## fail
```python
from client import fail
```



---
## action
```python
from client import action
```

Decorator to tie an action function to a subparser.

---
## do_start
```python
from client import do_start
```

Start daemon (it must not already be running).

This is where mypy flags are set from the command line.

Setting flags is a bit awkward; you have to use e.g.:

  dmypy start -- --strict

since we don't want to duplicate mypy's huge list of flags.

---
## do_restart
```python
from client import do_restart
```

Restart daemon (it may or may not be running; but not hanging).

We first try to stop it politely if it's running.  This also sets
mypy flags from the command line (see do_start()).

---
## restart_server
```python
from client import restart_server
```

Restart daemon (it may or may not be running; but not hanging).

---
## start_server
```python
from client import start_server
```

Start the server from command arguments and wait for it.

---
## wait_for_server
```python
from client import wait_for_server
```

Wait until the server is up.

Exit if it doesn't happen within the timeout.

---
## do_run
```python
from client import do_run
```

Do a check, starting (or restarting) the daemon as necessary

Restarts the daemon if the running daemon reports that it is
required (due to a configuration change, for example).

Setting flags is a bit awkward; you have to use e.g.:

  dmypy run -- --strict a.py b.py ...

since we don't want to duplicate mypy's huge list of flags.
(The -- is only necessary if flags are specified.)

---
## do_status
```python
from client import do_status
```

Print daemon status.

This verifies that it is responsive to requests.

---
## do_stop
```python
from client import do_stop
```

Stop daemon via a 'stop' request.

---
## do_kill
```python
from client import do_kill
```

Kill daemon process with SIGKILL.

---
## do_check
```python
from client import do_check
```

Ask the daemon to check a list of files.

---
## do_recheck
```python
from client import do_recheck
```

Ask the daemon to recheck the previous list of files, with optional modifications.

If at least one of --remove or --update is given, the server will
update the list of files to check accordingly and assume that any other files
are unchanged.  If none of these flags are given, the server will call stat()
on each file last checked to determine its status.

Files given in --update ought to exist.  Files given in --remove need not exist;
if they don't they will be ignored.
The lists may be empty but oughtn't contain duplicates or overlap.

NOTE: The list of files is lost when the daemon is restarted.

---
## do_suggest
```python
from client import do_suggest
```

Ask the daemon for a suggested signature.

This just prints whatever the daemon reports as output.
For now it may be closer to a list of call sites.

---
## do_inspect
```python
from client import do_inspect
```

Ask daemon to print the type of an expression.

---
## check_output
```python
from client import check_output
```

Print the output from a check or recheck command.

Call sys.exit() unless the status code is zero.

---
## show_stats
```python
from client import show_stats
```



---
## do_hang
```python
from client import do_hang
```

Hang for 100 seconds, as a debug hack.

---
## do_daemon
```python
from client import do_daemon
```

Serve requests in the foreground.

---
## do_help
```python
from client import do_help
```

Print full help (same as dmypy --help).

---
## get_status
```python
from client import get_status
```

Read status file and check if the process is alive.

Return (pid, connection_name) on success.

Raise BadStatus if something's wrong.

---
## check_status
```python
from client import check_status
```

Check if the process is alive.

Return (pid, connection_name) on success.

Raise BadStatus if something's wrong.

---
## read_status
```python
from client import read_status
```

Read status file.

Raise BadStatus if the status file doesn't exist or contains
invalid JSON or the JSON is not a dict.

---
## is_running
```python
from client import is_running
```

Check if the server is running cleanly

---
## console_entry
```python
from client import console_entry
```



---
## register
```python
from client import register
```



---
## __name__
```python
from testipc import __name__
```



---
## server
```python
from testipc import server
```



---
## server_multi_message_echo
```python
from testipc import server_multi_message_echo
```



---
## IPCTests
```python
from testipc import IPCTests
```



---
## setUp
```python
from testipc import setUp
```



---
## test_transaction_large
```python
from testipc import test_transaction_large
```



---
## test_connect_twice
```python
from testipc import test_connect_twice
```



---
## test_multiple_messages
```python
from testipc import test_multiple_messages
```



---
## test_connect_alot
```python
from testipc import test_connect_alot
```



---
## __name__
```python
from testerrorstream import __name__
```

Tests for mypy incremental error output.

---
## ErrorStreamSuite
```python
from testerrorstream import ErrorStreamSuite
```



---
## test_error_stream
```python
from testerrorstream import test_error_stream
```

Perform a single error streaming test case.

The argument contains the description of the test case.

---
## run_case
```python
from testerrorstream import run_case
```



---
## flush_errors
```python
from testerrorstream import flush_errors
```



---
## __name__
```python
from testsolve import __name__
```

Test cases for the constraint solver used in type inference.

---
## SolveSuite
```python
from testsolve import SolveSuite
```



---
## setUp
```python
from testsolve import setUp
```



---
## test_empty_input
```python
from testsolve import test_empty_input
```



---
## test_simple_supertype_constraints
```python
from testsolve import test_simple_supertype_constraints
```



---
## test_simple_subtype_constraints
```python
from testsolve import test_simple_subtype_constraints
```



---
## test_both_kinds_of_constraints
```python
from testsolve import test_both_kinds_of_constraints
```



---
## test_unsatisfiable_constraints
```python
from testsolve import test_unsatisfiable_constraints
```



---
## test_exactly_specified_result
```python
from testsolve import test_exactly_specified_result
```



---
## test_multiple_variables
```python
from testsolve import test_multiple_variables
```



---
## test_no_constraints_for_var
```python
from testsolve import test_no_constraints_for_var
```



---
## test_simple_constraints_with_dynamic_type
```python
from testsolve import test_simple_constraints_with_dynamic_type
```



---
## test_both_normal_and_any_types_in_results
```python
from testsolve import test_both_normal_and_any_types_in_results
```



---
## test_poly_no_constraints
```python
from testsolve import test_poly_no_constraints
```



---
## test_poly_trivial_free
```python
from testsolve import test_poly_trivial_free
```



---
## test_poly_free_pair
```python
from testsolve import test_poly_free_pair
```



---
## test_poly_free_pair_with_bounds
```python
from testsolve import test_poly_free_pair_with_bounds
```



---
## test_poly_free_pair_with_bounds_uninhabited
```python
from testsolve import test_poly_free_pair_with_bounds_uninhabited
```



---
## test_poly_bounded_chain
```python
from testsolve import test_poly_bounded_chain
```



---
## test_poly_reverse_overlapping_chain
```python
from testsolve import test_poly_reverse_overlapping_chain
```



---
## test_poly_reverse_split_chain
```python
from testsolve import test_poly_reverse_split_chain
```



---
## test_poly_unsolvable_chain
```python
from testsolve import test_poly_unsolvable_chain
```



---
## test_simple_chain_closure
```python
from testsolve import test_simple_chain_closure
```



---
## test_reverse_chain_closure
```python
from testsolve import test_reverse_chain_closure
```



---
## test_secondary_constraint_closure
```python
from testsolve import test_secondary_constraint_closure
```



---
## assert_solve
```python
from testsolve import assert_solve
```



---
## assert_transitive_closure
```python
from testsolve import assert_transitive_closure
```



---
## supc
```python
from testsolve import supc
```



---
## subc
```python
from testsolve import subc
```



---
## __name__
```python
from testoutput import __name__
```

Test cases for `--output=json`.

These cannot be run by the usual unit test runner because of the backslashes in
the output, which get normalized to forward slashes by the test suite on Windows.

---
## OutputJSONsuite
```python
from testoutput import OutputJSONsuite
```



---
## test_output_json
```python
from testoutput import test_output_json
```

Runs Mypy in a subprocess, and ensures that `--output=json` works as intended.

---
## run_case
```python
from testoutput import run_case
```



---
## __name__
```python
from testdaemon import __name__
```

End-to-end test cases for the daemon (dmypy).

These are special because they run multiple shell commands.

This also includes some unit tests.

---
## DaemonSuite
```python
from testdaemon import DaemonSuite
```



---
## test_daemon
```python
from testdaemon import test_daemon
```



---
## parse_script
```python
from testdaemon import parse_script
```

Parse testcase.input into steps.

Each command starts with a line starting with '$'.
The first line (less '$') is sent to the shell.
The remaining lines are expected output.

---
## run_cmd
```python
from testdaemon import run_cmd
```



---
## DaemonUtilitySuite
```python
from testdaemon import DaemonUtilitySuite
```

Unit tests for helpers

---
## run_case
```python
from testdaemon import run_case
```



---
## test_filter_out_missing_top_level_packages
```python
from testdaemon import test_filter_out_missing_top_level_packages
```



---
## make_file
```python
from testdaemon import make_file
```



---
## makepath
```python
from testdaemon import makepath
```



---
## __name__
```python
from testmodulefinder import __name__
```



---
## ModuleFinderSuite
```python
from testmodulefinder import ModuleFinderSuite
```



---
## ModuleFinderSitePackagesSuite
```python
from testmodulefinder import ModuleFinderSitePackagesSuite
```



---
## setUp
```python
from testmodulefinder import setUp
```



---
## test__no_namespace_packages__nsx
```python
from testmodulefinder import test__no_namespace_packages__nsx
```

If namespace_packages is False, we shouldn't find nsx

---
## test__no_namespace_packages__nsx_a
```python
from testmodulefinder import test__no_namespace_packages__nsx_a
```

If namespace_packages is False, we shouldn't find nsx.a.

---
## test__no_namespace_packages__find_a_in_pkg1
```python
from testmodulefinder import test__no_namespace_packages__find_a_in_pkg1
```

Find find pkg1/a.py for "a" with namespace_packages False.

---
## test__no_namespace_packages__find_b_in_pkg2
```python
from testmodulefinder import test__no_namespace_packages__find_b_in_pkg2
```



---
## test__find_nsx_as_namespace_pkg_in_pkg1
```python
from testmodulefinder import test__find_nsx_as_namespace_pkg_in_pkg1
```

There's no __init__.py in any of the nsx dirs, return
the path to the first one found in mypypath.

---
## test__find_nsx_a_init_in_pkg1
```python
from testmodulefinder import test__find_nsx_a_init_in_pkg1
```

Find nsx-pkg1/nsx/a/__init__.py for "nsx.a" in namespace mode.

---
## test__find_nsx_b_init_in_pkg2
```python
from testmodulefinder import test__find_nsx_b_init_in_pkg2
```

Find nsx-pkg2/nsx/b/__init__.py for "nsx.b" in namespace mode.

---
## test__find_nsx_c_c_in_pkg3
```python
from testmodulefinder import test__find_nsx_c_c_in_pkg3
```

Find nsx-pkg3/nsx/c/c.py for "nsx.c.c" in namespace mode.

---
## test__find_nsy_a__init_pyi
```python
from testmodulefinder import test__find_nsy_a__init_pyi
```

Prefer nsy-pkg1/a/__init__.pyi file over __init__.py.

---
## test__find_nsy_b__init_py
```python
from testmodulefinder import test__find_nsy_b__init_py
```

There is a nsy-pkg2/nsy/b.pyi, but also a nsy-pkg2/nsy/b/__init__.py.
We expect to find the latter when looking up "nsy.b" as
a package is preferred over a module.

---
## test__find_nsy_c_pyi
```python
from testmodulefinder import test__find_nsy_c_pyi
```

There is a nsy-pkg2/nsy/c.pyi and nsy-pkg2/nsy/c.py
We expect to find the former when looking up "nsy.b" as
.pyi is preferred over .py.

---
## test__find_a_in_pkg1
```python
from testmodulefinder import test__find_a_in_pkg1
```



---
## test__find_b_init_in_pkg2
```python
from testmodulefinder import test__find_b_init_in_pkg2
```



---
## test__find_d_nowhere
```python
from testmodulefinder import test__find_d_nowhere
```



---
## path
```python
from testmodulefinder import path
```



---
## test__packages_with_ns
```python
from testmodulefinder import test__packages_with_ns
```



---
## test__packages_without_ns
```python
from testmodulefinder import test__packages_without_ns
```



---
## __name__
```python
from testfinegrained import __name__
```

Test cases for fine-grained incremental checking.

Each test cases runs a batch build followed by one or more fine-grained
incremental steps. We verify that each step produces the expected output.

See the comment at the top of test-data/unit/fine-grained.test for more
information.

N.B.: Unlike most of the other test suites, testfinegrained does not
rely on an alt_lib_path for finding source files. This means that they
can test interactions with the lib_path that is built implicitly based
on specified sources.

---
## FineGrainedSuite
```python
from testfinegrained import FineGrainedSuite
```



---
## normalize_messages
```python
from testfinegrained import normalize_messages
```



---
## TestMessageSorting
```python
from testfinegrained import TestMessageSorting
```



---
## should_skip
```python
from testfinegrained import should_skip
```



---
## run_case
```python
from testfinegrained import run_case
```



---
## get_options
```python
from testfinegrained import get_options
```



---
## run_check
```python
from testfinegrained import run_check
```



---
## build
```python
from testfinegrained import build
```



---
## format_triggered
```python
from testfinegrained import format_triggered
```



---
## get_build_steps
```python
from testfinegrained import get_build_steps
```

Get the number of regular incremental steps to run, from the test source

---
## perform_step
```python
from testfinegrained import perform_step
```

Perform one fine-grained incremental build step (after some file updates/deletions).

Return (mypy output, triggered targets).

---
## parse_sources
```python
from testfinegrained import parse_sources
```

Return target BuildSources for a test case.

Normally, the unit tests will check all files included in the test
case. This differs from how testcheck works by default, as dmypy
doesn't currently support following imports.

You can override this behavior and instruct the tests to check
multiple modules by using a comment like this in the test case
input:

  # cmd: main a.py

You can also use `# cmdN:` to have a different cmd for incremental
step N (2, 3, ...).

---
## maybe_suggest
```python
from testfinegrained import maybe_suggest
```



---
## maybe_inspect
```python
from testfinegrained import maybe_inspect
```



---
## get_suggest
```python
from testfinegrained import get_suggest
```



---
## get_inspect
```python
from testfinegrained import get_inspect
```



---
## test_simple_sorting
```python
from testfinegrained import test_simple_sorting
```



---
## test_long_form_sorting
```python
from testfinegrained import test_long_form_sorting
```



---
## test_mypy_error_prefix
```python
from testfinegrained import test_mypy_error_prefix
```



---
## test_new_file_at_the_end
```python
from testfinegrained import test_new_file_at_the_end
```



---
## __name__
```python
from testfinegrainedcache import __name__
```

Tests for fine-grained incremental checking using the cache.

All of the real code for this lives in testfinegrained.py.

---
## FineGrainedCacheSuite
```python
from testfinegrainedcache import FineGrainedCacheSuite
```



---
## __name__
```python
from testparse import __name__
```

Tests for the mypy parser.

---
## ParserSuite
```python
from testparse import ParserSuite
```



---
## test_parser
```python
from testparse import test_parser
```

Perform a single parser test case.

The argument contains the description of the test case.

---
## ParseErrorSuite
```python
from testparse import ParseErrorSuite
```



---
## test_parse_error
```python
from testparse import test_parse_error
```



---
## run_case
```python
from testparse import run_case
```



---
## __name__
```python
from testcmdline import __name__
```

Test cases for the command line.

To begin we test that "mypy <directory>[/]" always recurses down the
whole tree.

---
## PythonCmdlineSuite
```python
from testcmdline import PythonCmdlineSuite
```



---
## test_python_cmdline
```python
from testcmdline import test_python_cmdline
```



---
## parse_args
```python
from testcmdline import parse_args
```

Parse the first line of the program for the command line.

This should have the form

  # cmd: mypy <options>

For example:

  # cmd: mypy pkg/

---
## parse_cwd
```python
from testcmdline import parse_cwd
```

Parse the second line of the program for the command line.

This should have the form

  # cwd: <directory>

For example:

  # cwd: main/subdir

---
## run_case
```python
from testcmdline import run_case
```



---
## __name__
```python
from test_find_sources import __name__
```



---
## FakeFSCache
```python
from test_find_sources import FakeFSCache
```



---
## normalise_path
```python
from test_find_sources import normalise_path
```



---
## normalise_build_source_list
```python
from test_find_sources import normalise_build_source_list
```



---
## crawl
```python
from test_find_sources import crawl
```



---
## find_sources_in_dir
```python
from test_find_sources import find_sources_in_dir
```



---
## find_sources
```python
from test_find_sources import find_sources
```



---
## SourceFinderSuite
```python
from test_find_sources import SourceFinderSuite
```



---
## __init__
```python
from test_find_sources import __init__
```



---
## isfile
```python
from test_find_sources import isfile
```



---
## isdir
```python
from test_find_sources import isdir
```



---
## listdir
```python
from test_find_sources import listdir
```



---
## init_under_package_root
```python
from test_find_sources import init_under_package_root
```



---
## setUp
```python
from test_find_sources import setUp
```



---
## tearDown
```python
from test_find_sources import tearDown
```



---
## test_crawl_no_namespace
```python
from test_find_sources import test_crawl_no_namespace
```



---
## test_crawl_namespace
```python
from test_find_sources import test_crawl_namespace
```



---
## test_crawl_namespace_explicit_base
```python
from test_find_sources import test_crawl_namespace_explicit_base
```



---
## test_crawl_namespace_multi_dir
```python
from test_find_sources import test_crawl_namespace_multi_dir
```



---
## test_find_sources_in_dir_no_namespace
```python
from test_find_sources import test_find_sources_in_dir_no_namespace
```



---
## test_find_sources_in_dir_namespace
```python
from test_find_sources import test_find_sources_in_dir_namespace
```



---
## test_find_sources_in_dir_namespace_explicit_base
```python
from test_find_sources import test_find_sources_in_dir_namespace_explicit_base
```



---
## test_find_sources_in_dir_namespace_multi_dir
```python
from test_find_sources import test_find_sources_in_dir_namespace_multi_dir
```



---
## test_find_sources_exclude
```python
from test_find_sources import test_find_sources_exclude
```



---
## __name__
```python
from testpep561 import __name__
```



---
## PEP561Suite
```python
from testpep561 import PEP561Suite
```



---
## virtualenv
```python
from testpep561 import virtualenv
```

Context manager that creates a virtualenv in a temporary directory

Returns the path to the created Python executable

---
## upgrade_pip
```python
from testpep561 import upgrade_pip
```

Install pip>=21.3.1. Required for editable installs with PEP 660.

---
## install_package
```python
from testpep561 import install_package
```

Install a package from test-data/packages/pkg/

---
## test_pep561
```python
from testpep561 import test_pep561
```

Test running mypy on files that depend on PEP 561 packages.

---
## parse_pkgs
```python
from testpep561 import parse_pkgs
```



---
## parse_mypy_args
```python
from testpep561 import parse_mypy_args
```



---
## test_mypy_path_is_respected
```python
from testpep561 import test_mypy_path_is_respected
```



---
## run_case
```python
from testpep561 import run_case
```



---
## __name__
```python
from update_data import __name__
```



---
## update_testcase_output
```python
from update_data import update_testcase_output
```



---
## _iter_fixes
```python
from update_data import _iter_fixes
```



---
## __name__
```python
from testdiff import __name__
```

Test cases for AST diff (used for fine-grained incremental checking)

---
## ASTDiffSuite
```python
from testdiff import ASTDiffSuite
```



---
## run_case
```python
from testdiff import run_case
```



---
## build
```python
from testdiff import build
```



---
## __name__
```python
from testargs import __name__
```

Ensure the argparse parser and Options class are in sync.

In particular, verify that the argparse defaults are the same as the Options
defaults, and that argparse doesn't assign any new members to the Options
object it creates.

---
## ArgSuite
```python
from testargs import ArgSuite
```



---
## test_coherence
```python
from testargs import test_coherence
```



---
## test_executable_inference
```python
from testargs import test_executable_inference
```

Test the --python-executable flag with --python-version

---
## __name__
```python
from typefixture import __name__
```

Fixture used in type-related test cases.

It contains class TypeInfos and Type objects.

---
## TypeFixture
```python
from typefixture import TypeFixture
```

Helper class that is used as a fixture in type-related unit tests.

The members are initialized to contain various type-related values.

---
## InterfaceTypeFixture
```python
from typefixture import InterfaceTypeFixture
```

Extension of TypeFixture that contains additional generic
interface types.

---
## __init__
```python
from typefixture import __init__
```



---
## _add_bool_dunder
```python
from typefixture import _add_bool_dunder
```



---
## callable
```python
from typefixture import callable
```

callable(a1, ..., an, r) constructs a callable with argument types
a1, ... an and return type r.

---
## callable_type
```python
from typefixture import callable_type
```

callable_type(a1, ..., an, r) constructs a callable with
argument types a1, ... an and return type r, and which
represents a type.

---
## callable_default
```python
from typefixture import callable_default
```

callable_default(min_args, a1, ..., an, r) constructs a
callable with argument types a1, ... an and return type r,
with min_args mandatory fixed arguments.

---
## callable_var_arg
```python
from typefixture import callable_var_arg
```

callable_var_arg(min_args, a1, ..., an, r) constructs a callable
with argument types a1, ... *an and return type r.

---
## make_type_info
```python
from typefixture import make_type_info
```

Make a TypeInfo suitable for use in unit tests.

---
## def_alias_1
```python
from typefixture import def_alias_1
```



---
## def_alias_2
```python
from typefixture import def_alias_2
```



---
## non_rec_alias
```python
from typefixture import non_rec_alias
```



---
## make_type_var
```python
from typefixture import make_type_var
```



---
## make_type_var_tuple
```python
from typefixture import make_type_var_tuple
```



---
## __name__
```python
from visitors import __name__
```

Visitor classes pulled out from different tests

These are here because we don't currently support having interpreted
classes subtype compiled ones but pytest grabs the python file
even if the test was compiled.

---
## SkippedNodeSearcher
```python
from visitors import SkippedNodeSearcher
```



---
## ignore_node
```python
from visitors import ignore_node
```

Return True if node is to be omitted from test case output.

---
## TypeAssertTransformVisitor
```python
from visitors import TypeAssertTransformVisitor
```



---
## __init__
```python
from visitors import __init__
```



---
## visit_assignment_stmt
```python
from visitors import visit_assignment_stmt
```



---
## visit_name_expr
```python
from visitors import visit_name_expr
```



---
## visit_int_expr
```python
from visitors import visit_int_expr
```



---
## type
```python
from visitors import type
```



---
## __name__
```python
from teststubgen import __name__
```



---
## StubgenCmdLineSuite
```python
from teststubgen import StubgenCmdLineSuite
```

Test cases for processing command-line options and finding files.

---
## StubgenCliParseSuite
```python
from teststubgen import StubgenCliParseSuite
```



---
## StubgenUtilSuite
```python
from teststubgen import StubgenUtilSuite
```

Unit tests for stubgen utility functions.

---
## StubgenHelpersSuite
```python
from teststubgen import StubgenHelpersSuite
```



---
## StubgenPythonSuite
```python
from teststubgen import StubgenPythonSuite
```

Data-driven end-to-end test cases that generate stub files.

You can use these magic test case name suffixes:

*_semanal
    Run semantic analysis (slow as this uses real stubs -- only use
    when necessary)
*_import
    Import module and perform runtime introspection (in the current
    process!)

You can use these magic comments:

# flags: --some-stubgen-option ...
    Specify custom stubgen options

# modules: module1 module2 ...
    Specify which modules to output (by default only 'main')

---
## TestBaseClass
```python
from teststubgen import TestBaseClass
```



---
## TestClass
```python
from teststubgen import TestClass
```

TestClass(self: TestClass, arg0: str) -> None
TestClass(self: TestClass, arg0: str, arg1: str) -> None

---
## StubgencSuite
```python
from teststubgen import StubgencSuite
```

Unit tests for stub generation from C modules using introspection.

Note that these don't cover a lot!

---
## ArgSigSuite
```python
from teststubgen import ArgSigSuite
```



---
## IsValidTypeSuite
```python
from teststubgen import IsValidTypeSuite
```



---
## ModuleInspectSuite
```python
from teststubgen import ModuleInspectSuite
```



---
## module_to_path
```python
from teststubgen import module_to_path
```



---
## test_files_found
```python
from teststubgen import test_files_found
```



---
## test_packages_found
```python
from teststubgen import test_packages_found
```



---
## test_module_not_found
```python
from teststubgen import test_module_not_found
```



---
## make_file
```python
from teststubgen import make_file
```



---
## run
```python
from teststubgen import run
```



---
## test_walk_packages
```python
from teststubgen import test_walk_packages
```



---
## test_parse_signature
```python
from teststubgen import test_parse_signature
```



---
## test_parse_signature_with_args
```python
from teststubgen import test_parse_signature_with_args
```



---
## test_parse_signature_with_optional_args
```python
from teststubgen import test_parse_signature_with_optional_args
```



---
## test_parse_signature_with_default_arg
```python
from teststubgen import test_parse_signature_with_default_arg
```



---
## test_parse_signature_with_qualified_function
```python
from teststubgen import test_parse_signature_with_qualified_function
```



---
## test_parse_signature_with_kw_only_arg
```python
from teststubgen import test_parse_signature_with_kw_only_arg
```



---
## test_parse_signature_with_star_arg
```python
from teststubgen import test_parse_signature_with_star_arg
```



---
## test_parse_signature_with_star_star_arg
```python
from teststubgen import test_parse_signature_with_star_star_arg
```



---
## assert_parse_signature
```python
from teststubgen import assert_parse_signature
```



---
## test_build_signature
```python
from teststubgen import test_build_signature
```



---
## test_parse_all_signatures
```python
from teststubgen import test_parse_all_signatures
```



---
## test_find_unique_signatures
```python
from teststubgen import test_find_unique_signatures
```



---
## test_infer_sig_from_docstring
```python
from teststubgen import test_infer_sig_from_docstring
```



---
## test_infer_sig_from_docstring_duplicate_args
```python
from teststubgen import test_infer_sig_from_docstring_duplicate_args
```



---
## test_infer_sig_from_docstring_bad_indentation
```python
from teststubgen import test_infer_sig_from_docstring_bad_indentation
```



---
## test_infer_arg_sig_from_anon_docstring
```python
from teststubgen import test_infer_arg_sig_from_anon_docstring
```



---
## test_infer_prop_type_from_docstring
```python
from teststubgen import test_infer_prop_type_from_docstring
```



---
## test_infer_sig_from_docstring_square_brackets
```python
from teststubgen import test_infer_sig_from_docstring_square_brackets
```



---
## test_remove_misplaced_type_comments_1
```python
from teststubgen import test_remove_misplaced_type_comments_1
```



---
## test_remove_misplaced_type_comments_2
```python
from teststubgen import test_remove_misplaced_type_comments_2
```



---
## test_remove_misplaced_type_comments_3
```python
from teststubgen import test_remove_misplaced_type_comments_3
```



---
## test_remove_misplaced_type_comments_4
```python
from teststubgen import test_remove_misplaced_type_comments_4
```



---
## test_remove_misplaced_type_comments_5
```python
from teststubgen import test_remove_misplaced_type_comments_5
```



---
## test_remove_misplaced_type_comments_bytes
```python
from teststubgen import test_remove_misplaced_type_comments_bytes
```



---
## test_common_dir_prefix_unix
```python
from teststubgen import test_common_dir_prefix_unix
```



---
## test_common_dir_prefix_win
```python
from teststubgen import test_common_dir_prefix_win
```



---
## test_is_blacklisted_path
```python
from teststubgen import test_is_blacklisted_path
```



---
## test_is_non_library_module
```python
from teststubgen import test_is_non_library_module
```



---
## run_case
```python
from teststubgen import run_case
```



---
## run_case_inner
```python
from teststubgen import run_case_inner
```



---
## parse_flags
```python
from teststubgen import parse_flags
```



---
## parse_modules
```python
from teststubgen import parse_modules
```



---
## add_file
```python
from teststubgen import add_file
```



---
## test_infer_hash_sig
```python
from teststubgen import test_infer_hash_sig
```



---
## test_infer_getitem_sig
```python
from teststubgen import test_infer_getitem_sig
```



---
## test_infer_setitem_sig
```python
from teststubgen import test_infer_setitem_sig
```



---
## test_infer_eq_op_sig
```python
from teststubgen import test_infer_eq_op_sig
```



---
## test_infer_binary_op_sig
```python
from teststubgen import test_infer_binary_op_sig
```



---
## test_infer_equality_op_sig
```python
from teststubgen import test_infer_equality_op_sig
```



---
## test_infer_unary_op_sig
```python
from teststubgen import test_infer_unary_op_sig
```



---
## test_infer_cast_sig
```python
from teststubgen import test_infer_cast_sig
```



---
## test_generate_class_stub_no_crash_for_object
```python
from teststubgen import test_generate_class_stub_no_crash_for_object
```



---
## test_generate_class_stub_variable_type_annotation
```python
from teststubgen import test_generate_class_stub_variable_type_annotation
```



---
## test_generate_c_type_inheritance
```python
from teststubgen import test_generate_c_type_inheritance
```



---
## test_generate_c_type_inheritance_same_module
```python
from teststubgen import test_generate_c_type_inheritance_same_module
```



---
## test_generate_c_type_inheritance_other_module
```python
from teststubgen import test_generate_c_type_inheritance_other_module
```



---
## test_generate_c_type_inheritance_builtin_type
```python
from teststubgen import test_generate_c_type_inheritance_builtin_type
```



---
## test_generate_c_type_with_docstring
```python
from teststubgen import test_generate_c_type_with_docstring
```



---
## test_generate_c_type_with_docstring_no_self_arg
```python
from teststubgen import test_generate_c_type_with_docstring_no_self_arg
```



---
## test_generate_c_type_classmethod
```python
from teststubgen import test_generate_c_type_classmethod
```



---
## test_generate_c_type_classmethod_with_overloads
```python
from teststubgen import test_generate_c_type_classmethod_with_overloads
```



---
## test_generate_c_type_with_docstring_empty_default
```python
from teststubgen import test_generate_c_type_with_docstring_empty_default
```



---
## test_generate_c_function_other_module_arg
```python
from teststubgen import test_generate_c_function_other_module_arg
```

Test that if argument references type from other module, module will be imported.

---
## test_generate_c_function_same_module
```python
from teststubgen import test_generate_c_function_same_module
```

Test that if annotation references type from same module but using full path, no module
will be imported, and type specification will be striped to local reference.

---
## test_generate_c_function_other_module
```python
from teststubgen import test_generate_c_function_other_module
```

Test that if annotation references type from other module, module will be imported.

---
## test_generate_c_function_same_module_nested
```python
from teststubgen import test_generate_c_function_same_module_nested
```

Test that if annotation references type from same module but using full path, no module
will be imported, and type specification will be stripped to local reference.

---
## test_generate_c_function_same_module_compound
```python
from teststubgen import test_generate_c_function_same_module_compound
```

Test that if annotation references type from same module but using full path, no module
will be imported, and type specification will be stripped to local reference.

---
## test_generate_c_function_other_module_nested
```python
from teststubgen import test_generate_c_function_other_module_nested
```

Test that if annotation references type from other module, module will be imported,
and the import will be restricted to one of the known modules.

---
## test_generate_c_function_no_crash_for_non_str_docstring
```python
from teststubgen import test_generate_c_function_no_crash_for_non_str_docstring
```



---
## test_generate_c_property_with_pybind11
```python
from teststubgen import test_generate_c_property_with_pybind11
```

Signatures included by PyBind11 inside property.fget are read.

---
## test_generate_c_property_with_rw_property
```python
from teststubgen import test_generate_c_property_with_rw_property
```



---
## test_generate_c_type_with_single_arg_generic
```python
from teststubgen import test_generate_c_type_with_single_arg_generic
```



---
## test_generate_c_type_with_double_arg_generic
```python
from teststubgen import test_generate_c_type_with_double_arg_generic
```



---
## test_generate_c_type_with_nested_generic
```python
from teststubgen import test_generate_c_type_with_nested_generic
```



---
## test_generate_c_type_with_generic_using_other_module_first
```python
from teststubgen import test_generate_c_type_with_generic_using_other_module_first
```



---
## test_generate_c_type_with_generic_using_other_module_last
```python
from teststubgen import test_generate_c_type_with_generic_using_other_module_last
```



---
## test_generate_c_type_with_overload_pybind11
```python
from teststubgen import test_generate_c_type_with_overload_pybind11
```



---
## test_generate_c_type_with_overload_shiboken
```python
from teststubgen import test_generate_c_type_with_overload_shiboken
```



---
## test_repr
```python
from teststubgen import test_repr
```



---
## test_is_valid_type
```python
from teststubgen import test_is_valid_type
```



---
## test_python_module
```python
from teststubgen import test_python_module
```



---
## test_python_package
```python
from teststubgen import test_python_package
```



---
## test_c_module
```python
from teststubgen import test_c_module
```



---
## test_non_existent
```python
from teststubgen import test_non_existent
```



---
## TestClassVariableCls
```python
from teststubgen import TestClassVariableCls
```



---
## test
```python
from teststubgen import test
```

test(self: TestClass, arg0: Dict[str, argparse.Action])

---
## get_attribute
```python
from teststubgen import get_attribute
```

(self: TestClass) -> str

---
## __init__
```python
from teststubgen import __init__
```



---
## attribute
```python
from teststubgen import attribute
```



---
## __name__
```python
from teststubinfo import __name__
```



---
## TestStubInfo
```python
from teststubinfo import TestStubInfo
```



---
## test_is_legacy_bundled_packages
```python
from teststubinfo import test_is_legacy_bundled_packages
```



---
## __name__
```python
from testtypegen import __name__
```

Test cases for the type checker: exporting inferred types

---
## TypeExportSuite
```python
from testtypegen import TypeExportSuite
```



---
## run_case
```python
from testtypegen import run_case
```



---
## __name__
```python
from testinfer import __name__
```

Test cases for type inference helper functions.

---
## MapActualsToFormalsSuite
```python
from testinfer import MapActualsToFormalsSuite
```

Test cases for argmap.map_actuals_to_formals.

---
## expand_caller_kinds
```python
from testinfer import expand_caller_kinds
```



---
## expand_callee_kinds
```python
from testinfer import expand_callee_kinds
```



---
## OperandDisjointDictSuite
```python
from testinfer import OperandDisjointDictSuite
```

Test cases for checker.DisjointDict, which is used for type inference with operands.

---
## OperandComparisonGroupingSuite
```python
from testinfer import OperandComparisonGroupingSuite
```

Test cases for checker.group_comparison_operands.

---
## test_basic
```python
from testinfer import test_basic
```



---
## test_positional_only
```python
from testinfer import test_positional_only
```



---
## test_optional
```python
from testinfer import test_optional
```



---
## test_callee_star
```python
from testinfer import test_callee_star
```



---
## test_caller_star
```python
from testinfer import test_caller_star
```



---
## test_too_many_caller_args
```python
from testinfer import test_too_many_caller_args
```



---
## test_tuple_star
```python
from testinfer import test_tuple_star
```



---
## make_tuple
```python
from testinfer import make_tuple
```



---
## test_named_args
```python
from testinfer import test_named_args
```



---
## test_some_named_args
```python
from testinfer import test_some_named_args
```



---
## test_missing_named_arg
```python
from testinfer import test_missing_named_arg
```



---
## test_duplicate_named_arg
```python
from testinfer import test_duplicate_named_arg
```



---
## test_varargs_and_bare_asterisk
```python
from testinfer import test_varargs_and_bare_asterisk
```



---
## test_keyword_varargs
```python
from testinfer import test_keyword_varargs
```



---
## test_both_kinds_of_varargs
```python
from testinfer import test_both_kinds_of_varargs
```



---
## test_special_cases
```python
from testinfer import test_special_cases
```



---
## assert_map
```python
from testinfer import assert_map
```



---
## assert_vararg_map
```python
from testinfer import assert_vararg_map
```



---
## new
```python
from testinfer import new
```



---
## test_independent_maps
```python
from testinfer import test_independent_maps
```



---
## test_partial_merging
```python
from testinfer import test_partial_merging
```



---
## test_full_merging
```python
from testinfer import test_full_merging
```



---
## test_merge_with_multiple_overlaps
```python
from testinfer import test_merge_with_multiple_overlaps
```



---
## literal_keymap
```python
from testinfer import literal_keymap
```



---
## test_basic_cases
```python
from testinfer import test_basic_cases
```



---
## test_multiple_groups
```python
from testinfer import test_multiple_groups
```



---
## test_multiple_groups_coalescing
```python
from testinfer import test_multiple_groups_coalescing
```



---
## test_multiple_groups_different_operators
```python
from testinfer import test_multiple_groups_different_operators
```



---
## test_single_pair
```python
from testinfer import test_single_pair
```



---
## test_empty_pair_list
```python
from testinfer import test_empty_pair_list
```



---
## __name__
```python
from testformatter import __name__
```



---
## FancyErrorFormattingTestCases
```python
from testformatter import FancyErrorFormattingTestCases
```



---
## test_trim_source
```python
from testformatter import test_trim_source
```



---
## test_split_words
```python
from testformatter import test_split_words
```



---
## __name__
```python
from testmypyc import __name__
```

A basic check to make sure that we are using a mypyc-compiled version when expected.

---
## MypycTest
```python
from testmypyc import MypycTest
```



---
## test_using_mypyc
```python
from testmypyc import test_using_mypyc
```



---
## __name__
```python
from testconstraints import __name__
```



---
## ConstraintsSuite
```python
from testconstraints import ConstraintsSuite
```



---
## setUp
```python
from testconstraints import setUp
```



---
## test_no_type_variables
```python
from testconstraints import test_no_type_variables
```



---
## test_basic_type_variable
```python
from testconstraints import test_basic_type_variable
```



---
## test_basic_type_var_tuple_subtype
```python
from testconstraints import test_basic_type_var_tuple_subtype
```



---
## test_basic_type_var_tuple
```python
from testconstraints import test_basic_type_var_tuple
```



---
## test_type_var_tuple_with_prefix_and_suffix
```python
from testconstraints import test_type_var_tuple_with_prefix_and_suffix
```



---
## test_unpack_homogenous_tuple
```python
from testconstraints import test_unpack_homogenous_tuple
```



---
## test_unpack_homogenous_tuple_with_prefix_and_suffix
```python
from testconstraints import test_unpack_homogenous_tuple_with_prefix_and_suffix
```



---
## test_unpack_with_prefix_and_suffix
```python
from testconstraints import test_unpack_with_prefix_and_suffix
```



---
## test_unpack_tuple_length_non_match
```python
from testconstraints import test_unpack_tuple_length_non_match
```



---
## test_var_length_tuple_with_fixed_length_tuple
```python
from testconstraints import test_var_length_tuple_with_fixed_length_tuple
```



---
## __name__
```python
from testgraph import __name__
```

Test cases for graph processing code in build.py.

---
## GraphSuite
```python
from testgraph import GraphSuite
```



---
## test_topsort
```python
from testgraph import test_topsort
```



---
## test_scc
```python
from testgraph import test_scc
```



---
## _make_manager
```python
from testgraph import _make_manager
```



---
## test_sorted_components
```python
from testgraph import test_sorted_components
```



---
## test_order_ascc
```python
from testgraph import test_order_ascc
```



---
## __name__
```python
from testsemanal import __name__
```

Semantic analyzer test cases

---
## get_semanal_options
```python
from testsemanal import get_semanal_options
```



---
## SemAnalSuite
```python
from testsemanal import SemAnalSuite
```



---
## test_semanal
```python
from testsemanal import test_semanal
```

Perform a semantic analysis test case.

The testcase argument contains a description of the test case
(inputs and output).

---
## SemAnalErrorSuite
```python
from testsemanal import SemAnalErrorSuite
```



---
## test_semanal_error
```python
from testsemanal import test_semanal_error
```

Perform a test case.

---
## SemAnalSymtableSuite
```python
from testsemanal import SemAnalSymtableSuite
```



---
## SemAnalTypeInfoSuite
```python
from testsemanal import SemAnalTypeInfoSuite
```



---
## TypeInfoMap
```python
from testsemanal import TypeInfoMap
```



---
## run_case
```python
from testsemanal import run_case
```

Perform a test case.

---
## __str__
```python
from testsemanal import __str__
```



---
## __name__
```python
from testfscache import __name__
```

Unit tests for file system cache.

---
## TestFileSystemCache
```python
from testfscache import TestFileSystemCache
```



---
## setUp
```python
from testfscache import setUp
```



---
## tearDown
```python
from testfscache import tearDown
```



---
## test_isfile_case_1
```python
from testfscache import test_isfile_case_1
```



---
## test_isfile_case_2
```python
from testfscache import test_isfile_case_2
```



---
## test_isfile_case_3
```python
from testfscache import test_isfile_case_3
```



---
## test_isfile_case_other_directory
```python
from testfscache import test_isfile_case_other_directory
```



---
## make_file
```python
from testfscache import make_file
```



---
## isfile_case
```python
from testfscache import isfile_case
```



---
## __name__
```python
from test_ref_info import __name__
```

Test exporting line-level reference information (undocumented feature)

---
## RefInfoSuite
```python
from test_ref_info import RefInfoSuite
```



---
## run_case
```python
from test_ref_info import run_case
```



---
## __name__
```python
from testdeps import __name__
```

Test cases for generating node-level dependencies (for fine-grained incremental checking)

---
## GetDependenciesSuite
```python
from testdeps import GetDependenciesSuite
```



---
## run_case
```python
from testdeps import run_case
```



---
## build
```python
from testdeps import build
```



---
## __name__
```python
from testtypes import __name__
```

Test cases for mypy types and type operations.

---
## TypesSuite
```python
from testtypes import TypesSuite
```



---
## TypeOpsSuite
```python
from testtypes import TypeOpsSuite
```



---
## JoinSuite
```python
from testtypes import JoinSuite
```



---
## MeetSuite
```python
from testtypes import MeetSuite
```



---
## SameTypeSuite
```python
from testtypes import SameTypeSuite
```



---
## RemoveLastKnownValueSuite
```python
from testtypes import RemoveLastKnownValueSuite
```



---
## ShallowOverloadMatchingSuite
```python
from testtypes import ShallowOverloadMatchingSuite
```



---
## make_call
```python
from testtypes import make_call
```



---
## TestExpandTypeLimitGetProperType
```python
from testtypes import TestExpandTypeLimitGetProperType
```



---
## setUp
```python
from testtypes import setUp
```



---
## test_any
```python
from testtypes import test_any
```



---
## test_simple_unbound_type
```python
from testtypes import test_simple_unbound_type
```



---
## test_generic_unbound_type
```python
from testtypes import test_generic_unbound_type
```



---
## test_callable_type
```python
from testtypes import test_callable_type
```



---
## test_callable_type_with_default_args
```python
from testtypes import test_callable_type_with_default_args
```



---
## test_callable_type_with_var_args
```python
from testtypes import test_callable_type_with_var_args
```



---
## test_tuple_type_upper
```python
from testtypes import test_tuple_type_upper
```



---
## test_type_variable_binding
```python
from testtypes import test_type_variable_binding
```



---
## test_generic_function_type
```python
from testtypes import test_generic_function_type
```



---
## test_type_alias_expand_once
```python
from testtypes import test_type_alias_expand_once
```



---
## test_type_alias_expand_all
```python
from testtypes import test_type_alias_expand_all
```



---
## test_recursive_nested_in_non_recursive
```python
from testtypes import test_recursive_nested_in_non_recursive
```



---
## test_indirection_no_infinite_recursion
```python
from testtypes import test_indirection_no_infinite_recursion
```



---
## test_trivial_expand
```python
from testtypes import test_trivial_expand
```



---
## test_trivial_expand_recursive
```python
from testtypes import test_trivial_expand_recursive
```



---
## test_expand_naked_type_var
```python
from testtypes import test_expand_naked_type_var
```



---
## test_expand_basic_generic_types
```python
from testtypes import test_expand_basic_generic_types
```



---
## assert_expand
```python
from testtypes import assert_expand
```



---
## test_trivial_erase
```python
from testtypes import test_trivial_erase
```



---
## test_erase_with_type_variable
```python
from testtypes import test_erase_with_type_variable
```



---
## test_erase_with_generic_type
```python
from testtypes import test_erase_with_generic_type
```



---
## test_erase_with_generic_type_recursive
```python
from testtypes import test_erase_with_generic_type_recursive
```



---
## test_erase_with_tuple_type
```python
from testtypes import test_erase_with_tuple_type
```



---
## test_erase_with_function_type
```python
from testtypes import test_erase_with_function_type
```



---
## test_erase_with_type_object
```python
from testtypes import test_erase_with_type_object
```



---
## test_erase_with_type_type
```python
from testtypes import test_erase_with_type_type
```



---
## assert_erase
```python
from testtypes import assert_erase
```



---
## test_is_more_precise
```python
from testtypes import test_is_more_precise
```



---
## test_is_proper_subtype
```python
from testtypes import test_is_proper_subtype
```



---
## test_is_proper_subtype_covariance
```python
from testtypes import test_is_proper_subtype_covariance
```



---
## test_is_proper_subtype_contravariance
```python
from testtypes import test_is_proper_subtype_contravariance
```



---
## test_is_proper_subtype_invariance
```python
from testtypes import test_is_proper_subtype_invariance
```



---
## test_is_proper_subtype_and_subtype_literal_types
```python
from testtypes import test_is_proper_subtype_and_subtype_literal_types
```



---
## test_subtype_aliases
```python
from testtypes import test_subtype_aliases
```



---
## test_empty_tuple_always_false
```python
from testtypes import test_empty_tuple_always_false
```



---
## test_nonempty_tuple_always_true
```python
from testtypes import test_nonempty_tuple_always_true
```



---
## test_union_can_be_true_if_any_true
```python
from testtypes import test_union_can_be_true_if_any_true
```



---
## test_union_can_not_be_true_if_none_true
```python
from testtypes import test_union_can_not_be_true_if_none_true
```



---
## test_union_can_be_false_if_any_false
```python
from testtypes import test_union_can_be_false_if_any_false
```



---
## test_union_can_not_be_false_if_none_false
```python
from testtypes import test_union_can_not_be_false_if_none_false
```



---
## test_true_only_of_false_type_is_uninhabited
```python
from testtypes import test_true_only_of_false_type_is_uninhabited
```



---
## test_true_only_of_true_type_is_idempotent
```python
from testtypes import test_true_only_of_true_type_is_idempotent
```



---
## test_true_only_of_instance
```python
from testtypes import test_true_only_of_instance
```



---
## test_true_only_of_union
```python
from testtypes import test_true_only_of_union
```



---
## test_false_only_of_true_type_is_uninhabited
```python
from testtypes import test_false_only_of_true_type_is_uninhabited
```



---
## test_false_only_tuple
```python
from testtypes import test_false_only_tuple
```



---
## test_false_only_of_false_type_is_idempotent
```python
from testtypes import test_false_only_of_false_type_is_idempotent
```



---
## test_false_only_of_instance
```python
from testtypes import test_false_only_of_instance
```



---
## test_false_only_of_union
```python
from testtypes import test_false_only_of_union
```



---
## test_simplified_union
```python
from testtypes import test_simplified_union
```



---
## test_simplified_union_with_literals
```python
from testtypes import test_simplified_union_with_literals
```



---
## test_simplified_union_with_str_literals
```python
from testtypes import test_simplified_union_with_str_literals
```



---
## test_simplify_very_large_union
```python
from testtypes import test_simplify_very_large_union
```



---
## test_simplified_union_with_str_instance_literals
```python
from testtypes import test_simplified_union_with_str_instance_literals
```



---
## test_simplified_union_with_mixed_str_literals
```python
from testtypes import test_simplified_union_with_mixed_str_literals
```



---
## assert_simplified_union
```python
from testtypes import assert_simplified_union
```



---
## tuple
```python
from testtypes import tuple
```



---
## callable
```python
from testtypes import callable
```

callable(a1, ..., an, r) constructs a callable with argument types
a1, ... an and return type r.

---
## test_trivial_cases
```python
from testtypes import test_trivial_cases
```



---
## test_class_subtyping
```python
from testtypes import test_class_subtyping
```



---
## test_tuples
```python
from testtypes import test_tuples
```



---
## test_var_tuples
```python
from testtypes import test_var_tuples
```



---
## test_function_types
```python
from testtypes import test_function_types
```



---
## test_type_vars
```python
from testtypes import test_type_vars
```



---
## test_none
```python
from testtypes import test_none
```



---
## test_unbound_type
```python
from testtypes import test_unbound_type
```



---
## test_any_type
```python
from testtypes import test_any_type
```



---
## test_mixed_truth_restricted_type_simple
```python
from testtypes import test_mixed_truth_restricted_type_simple
```



---
## test_mixed_truth_restricted_type
```python
from testtypes import test_mixed_truth_restricted_type
```



---
## test_other_mixed_types
```python
from testtypes import test_other_mixed_types
```



---
## test_simple_generics
```python
from testtypes import test_simple_generics
```



---
## test_generics_invariant
```python
from testtypes import test_generics_invariant
```



---
## test_generics_covariant
```python
from testtypes import test_generics_covariant
```



---
## test_generics_contravariant
```python
from testtypes import test_generics_contravariant
```



---
## test_generics_with_multiple_args
```python
from testtypes import test_generics_with_multiple_args
```



---
## test_generics_with_inheritance
```python
from testtypes import test_generics_with_inheritance
```



---
## test_generics_with_inheritance_and_shared_supertype
```python
from testtypes import test_generics_with_inheritance_and_shared_supertype
```



---
## test_generic_types_and_any
```python
from testtypes import test_generic_types_and_any
```



---
## test_callables_with_any
```python
from testtypes import test_callables_with_any
```



---
## test_overloaded
```python
from testtypes import test_overloaded
```



---
## test_overloaded_with_any
```python
from testtypes import test_overloaded_with_any
```



---
## test_join_interface_types
```python
from testtypes import test_join_interface_types
```



---
## test_join_interface_and_class_types
```python
from testtypes import test_join_interface_and_class_types
```



---
## test_join_class_types_with_interface_result
```python
from testtypes import test_join_class_types_with_interface_result
```



---
## test_generic_interfaces
```python
from testtypes import test_generic_interfaces
```



---
## test_simple_type_objects
```python
from testtypes import test_simple_type_objects
```



---
## test_type_type
```python
from testtypes import test_type_type
```



---
## test_literal_type
```python
from testtypes import test_literal_type
```



---
## test_variadic_tuple_joins
```python
from testtypes import test_variadic_tuple_joins
```



---
## assert_join
```python
from testtypes import assert_join
```



---
## assert_simple_join
```python
from testtypes import assert_simple_join
```



---
## var_tuple
```python
from testtypes import var_tuple
```

Construct a variable-length tuple type

---
## type_callable
```python
from testtypes import type_callable
```

type_callable(a1, ..., an, r) constructs a callable with
argument types a1, ... an and return type r, and which
represents a type.

---
## test_dynamic_type
```python
from testtypes import test_dynamic_type
```



---
## test_generic_types_and_dynamic
```python
from testtypes import test_generic_types_and_dynamic
```



---
## test_callables_with_dynamic
```python
from testtypes import test_callables_with_dynamic
```



---
## test_meet_interface_types
```python
from testtypes import test_meet_interface_types
```



---
## test_meet_interface_and_class_types
```python
from testtypes import test_meet_interface_and_class_types
```



---
## test_meet_class_types_with_shared_interfaces
```python
from testtypes import test_meet_class_types_with_shared_interfaces
```



---
## test_meet_with_generic_interfaces
```python
from testtypes import test_meet_with_generic_interfaces
```



---
## assert_meet_uninhabited
```python
from testtypes import assert_meet_uninhabited
```



---
## test_variadic_tuple_meets
```python
from testtypes import test_variadic_tuple_meets
```



---
## assert_meet
```python
from testtypes import assert_meet
```



---
## assert_simple_meet
```python
from testtypes import assert_simple_meet
```



---
## assert_same
```python
from testtypes import assert_same
```



---
## assert_not_same
```python
from testtypes import assert_not_same
```



---
## assert_simple_is_same
```python
from testtypes import assert_simple_is_same
```



---
## test_optional
```python
from testtypes import test_optional
```



---
## test_two_instances
```python
from testtypes import test_two_instances
```



---
## test_multiple_same_instances
```python
from testtypes import test_multiple_same_instances
```



---
## test_single_last_known_value
```python
from testtypes import test_single_last_known_value
```



---
## test_last_known_values_with_merge
```python
from testtypes import test_last_known_values_with_merge
```



---
## test_generics
```python
from testtypes import test_generics
```



---
## assert_union_result
```python
from testtypes import assert_union_result
```



---
## test_simple
```python
from testtypes import test_simple
```



---
## test_match_using_types
```python
from testtypes import test_match_using_types
```



---
## test_none_special_cases
```python
from testtypes import test_none_special_cases
```



---
## test_optional_arg
```python
from testtypes import test_optional_arg
```



---
## test_two_args
```python
from testtypes import test_two_args
```



---
## assert_find_shallow_matching_overload_item
```python
from testtypes import assert_find_shallow_matching_overload_item
```



---
## make_overload
```python
from testtypes import make_overload
```



---
## test_count_get_proper_type
```python
from testtypes import test_count_get_proper_type
```



---
## ov
```python
from testtypes import ov
```



---
## __name__
```python
from testapi import __name__
```



---
## APISuite
```python
from testapi import APISuite
```



---
## setUp
```python
from testapi import setUp
```



---
## tearDown
```python
from testapi import tearDown
```



---
## test_capture_bad_opt
```python
from testapi import test_capture_bad_opt
```

stderr should be captured when a bad option is passed.

---
## test_capture_empty
```python
from testapi import test_capture_empty
```

stderr should be captured when a bad option is passed.

---
## test_capture_help
```python
from testapi import test_capture_help
```

stdout should be captured when --help is passed.

---
## test_capture_version
```python
from testapi import test_capture_version
```

stdout should be captured when --version is passed.

---
## __name__
```python
from teststubtest import __name__
```



---
## use_tmp_dir
```python
from teststubtest import use_tmp_dir
```



---
## run_stubtest
```python
from teststubtest import run_stubtest
```



---
## Case
```python
from teststubtest import Case
```



---
## collect_cases
```python
from teststubtest import collect_cases
```

run_stubtest used to be slow, so we used this decorator to combine cases.

If you're reading this and bored, feel free to refactor this and make it more like
other mypy tests.

---
## StubtestUnit
```python
from teststubtest import StubtestUnit
```



---
## remove_color_code
```python
from teststubtest import remove_color_code
```



---
## StubtestMiscUnit
```python
from teststubtest import StubtestMiscUnit
```



---
## __init__
```python
from teststubtest import __init__
```



---
## test
```python
from teststubtest import test
```



---
## test_basic_good
```python
from teststubtest import test_basic_good
```



---
## test_types
```python
from teststubtest import test_types
```



---
## test_coroutines
```python
from teststubtest import test_coroutines
```



---
## test_arg_name
```python
from teststubtest import test_arg_name
```



---
## test_arg_kind
```python
from teststubtest import test_arg_kind
```



---
## test_private_parameters
```python
from teststubtest import test_private_parameters
```



---
## test_default_presence
```python
from teststubtest import test_default_presence
```



---
## test_default_value
```python
from teststubtest import test_default_value
```



---
## test_static_class_method
```python
from teststubtest import test_static_class_method
```



---
## test_arg_mismatch
```python
from teststubtest import test_arg_mismatch
```



---
## test_varargs_varkwargs
```python
from teststubtest import test_varargs_varkwargs
```



---
## test_overload
```python
from teststubtest import test_overload
```



---
## test_property
```python
from teststubtest import test_property
```



---
## test_var
```python
from teststubtest import test_var
```



---
## test_type_alias
```python
from teststubtest import test_type_alias
```



---
## test_enum
```python
from teststubtest import test_enum
```



---
## test_decorator
```python
from teststubtest import test_decorator
```



---
## test_all_at_runtime_not_stub
```python
from teststubtest import test_all_at_runtime_not_stub
```



---
## test_all_in_stub_not_at_runtime
```python
from teststubtest import test_all_in_stub_not_at_runtime
```



---
## test_all_in_stub_different_to_all_at_runtime
```python
from teststubtest import test_all_in_stub_different_to_all_at_runtime
```



---
## test_missing
```python
from teststubtest import test_missing
```



---
## test_missing_no_runtime_all
```python
from teststubtest import test_missing_no_runtime_all
```



---
## test_missing_no_runtime_all_terrible
```python
from teststubtest import test_missing_no_runtime_all_terrible
```



---
## test_non_public_1
```python
from teststubtest import test_non_public_1
```



---
## test_non_public_2
```python
from teststubtest import test_non_public_2
```



---
## test_dunders
```python
from teststubtest import test_dunders
```



---
## test_not_subclassable
```python
from teststubtest import test_not_subclassable
```



---
## test_has_runtime_final_decorator
```python
from teststubtest import test_has_runtime_final_decorator
```



---
## test_name_mangling
```python
from teststubtest import test_name_mangling
```



---
## test_mro
```python
from teststubtest import test_mro
```



---
## test_good_literal
```python
from teststubtest import test_good_literal
```



---
## test_bad_literal
```python
from teststubtest import test_bad_literal
```



---
## test_special_subtype
```python
from teststubtest import test_special_subtype
```



---
## test_runtime_typing_objects
```python
from teststubtest import test_runtime_typing_objects
```



---
## test_named_tuple
```python
from teststubtest import test_named_tuple
```



---
## test_named_tuple_typing_and_collections
```python
from teststubtest import test_named_tuple_typing_and_collections
```



---
## test_type_var
```python
from teststubtest import test_type_var
```



---
## test_metaclass_match
```python
from teststubtest import test_metaclass_match
```



---
## test_metaclass_abcmeta
```python
from teststubtest import test_metaclass_abcmeta
```



---
## test_abstract_methods
```python
from teststubtest import test_abstract_methods
```



---
## test_abstract_properties
```python
from teststubtest import test_abstract_properties
```



---
## test_type_check_only
```python
from teststubtest import test_type_check_only
```



---
## test_output
```python
from teststubtest import test_output
```



---
## test_ignore_flags
```python
from teststubtest import test_ignore_flags
```



---
## test_allowlist
```python
from teststubtest import test_allowlist
```



---
## test_mypy_build
```python
from teststubtest import test_mypy_build
```



---
## test_missing_stubs
```python
from teststubtest import test_missing_stubs
```



---
## test_only_py
```python
from teststubtest import test_only_py
```



---
## test_get_typeshed_stdlib_modules
```python
from teststubtest import test_get_typeshed_stdlib_modules
```



---
## test_signature
```python
from teststubtest import test_signature
```



---
## test_builtin_signature_with_unrepresentable_default
```python
from teststubtest import test_builtin_signature_with_unrepresentable_default
```



---
## test_config_file
```python
from teststubtest import test_config_file
```



---
## test_no_modules
```python
from teststubtest import test_no_modules
```



---
## test_module_and_typeshed
```python
from teststubtest import test_module_and_typeshed
```



---
## f
```python
from teststubtest import f
```



---
## TestGetTerminalSize
```python
from testutil import TestGetTerminalSize
```



---
## TestWriteJunitXml
```python
from testutil import TestWriteJunitXml
```



---
## test_get_terminal_size_in_pty_defaults_to_80
```python
from testutil import test_get_terminal_size_in_pty_defaults_to_80
```



---
## test_parse_location_windows
```python
from testutil import test_parse_location_windows
```



---
## test_junit_pass
```python
from testutil import test_junit_pass
```



---
## test_junit_fail_escape_xml_chars
```python
from testutil import test_junit_fail_escape_xml_chars
```



---
## test_junit_fail_two_files
```python
from testutil import test_junit_fail_two_files
```



---
## test_serious_error
```python
from testutil import test_serious_error
```



---
## __name__
```python
from testreports import __name__
```

Test cases for reports generated by mypy.

---
## CoberturaReportSuite
```python
from testreports import CoberturaReportSuite
```



---
## test_get_line_rate
```python
from testreports import test_get_line_rate
```



---
## test_as_xml
```python
from testreports import test_as_xml
```



---
## __name__
```python
from testmerge import __name__
```

Test cases for AST merge (used for fine-grained incremental checking)

---
## ASTMergeSuite
```python
from testmerge import ASTMergeSuite
```



---
## setup
```python
from testmerge import setup
```



---
## run_case
```python
from testmerge import run_case
```



---
## build
```python
from testmerge import build
```



---
## build_increment
```python
from testmerge import build_increment
```



---
## dump
```python
from testmerge import dump
```



---
## dump_asts
```python
from testmerge import dump_asts
```



---
## dump_symbol_tables
```python
from testmerge import dump_symbol_tables
```



---
## dump_symbol_table
```python
from testmerge import dump_symbol_table
```



---
## format_symbol_table_node
```python
from testmerge import format_symbol_table_node
```



---
## dump_typeinfos
```python
from testmerge import dump_typeinfos
```



---
## dump_typeinfos_recursive
```python
from testmerge import dump_typeinfos_recursive
```



---
## dump_typeinfo
```python
from testmerge import dump_typeinfo
```



---
## dump_types
```python
from testmerge import dump_types
```



---
## format_type
```python
from testmerge import format_type
```



---
## __name__
```python
from testsubtypes import __name__
```



---
## SubtypingSuite
```python
from testsubtypes import SubtypingSuite
```



---
## setUp
```python
from testsubtypes import setUp
```



---
## test_trivial_cases
```python
from testsubtypes import test_trivial_cases
```



---
## test_instance_subtyping
```python
from testsubtypes import test_instance_subtyping
```



---
## test_simple_generic_instance_subtyping_invariant
```python
from testsubtypes import test_simple_generic_instance_subtyping_invariant
```



---
## test_simple_generic_instance_subtyping_covariant
```python
from testsubtypes import test_simple_generic_instance_subtyping_covariant
```



---
## test_simple_generic_instance_subtyping_contravariant
```python
from testsubtypes import test_simple_generic_instance_subtyping_contravariant
```



---
## test_generic_subtyping_with_inheritance_invariant
```python
from testsubtypes import test_generic_subtyping_with_inheritance_invariant
```



---
## test_generic_subtyping_with_inheritance_covariant
```python
from testsubtypes import test_generic_subtyping_with_inheritance_covariant
```



---
## test_generic_subtyping_with_inheritance_contravariant
```python
from testsubtypes import test_generic_subtyping_with_inheritance_contravariant
```



---
## test_interface_subtyping
```python
from testsubtypes import test_interface_subtyping
```



---
## test_generic_interface_subtyping
```python
from testsubtypes import test_generic_interface_subtyping
```



---
## test_basic_callable_subtyping
```python
from testsubtypes import test_basic_callable_subtyping
```



---
## test_default_arg_callable_subtyping
```python
from testsubtypes import test_default_arg_callable_subtyping
```



---
## test_var_arg_callable_subtyping_1
```python
from testsubtypes import test_var_arg_callable_subtyping_1
```



---
## test_var_arg_callable_subtyping_2
```python
from testsubtypes import test_var_arg_callable_subtyping_2
```



---
## test_var_arg_callable_subtyping_3
```python
from testsubtypes import test_var_arg_callable_subtyping_3
```



---
## test_var_arg_callable_subtyping_4
```python
from testsubtypes import test_var_arg_callable_subtyping_4
```



---
## test_var_arg_callable_subtyping_5
```python
from testsubtypes import test_var_arg_callable_subtyping_5
```



---
## test_var_arg_callable_subtyping_6
```python
from testsubtypes import test_var_arg_callable_subtyping_6
```



---
## test_var_arg_callable_subtyping_7
```python
from testsubtypes import test_var_arg_callable_subtyping_7
```



---
## test_var_arg_callable_subtyping_8
```python
from testsubtypes import test_var_arg_callable_subtyping_8
```



---
## test_var_arg_callable_subtyping_9
```python
from testsubtypes import test_var_arg_callable_subtyping_9
```



---
## test_type_callable_subtyping
```python
from testsubtypes import test_type_callable_subtyping
```



---
## test_type_var_tuple
```python
from testsubtypes import test_type_var_tuple
```



---
## test_type_var_tuple_with_prefix_suffix
```python
from testsubtypes import test_type_var_tuple_with_prefix_suffix
```



---
## test_type_var_tuple_unpacked_variable_length_tuple
```python
from testsubtypes import test_type_var_tuple_unpacked_variable_length_tuple
```



---
## assert_subtype
```python
from testsubtypes import assert_subtype
```



---
## assert_not_subtype
```python
from testsubtypes import assert_not_subtype
```



---
## assert_strict_subtype
```python
from testsubtypes import assert_strict_subtype
```



---
## assert_equivalent
```python
from testsubtypes import assert_equivalent
```



---
## assert_unrelated
```python
from testsubtypes import assert_unrelated
```



---
## __name__
```python
from testtransform import __name__
```

Identity AST transform test cases

---
## TransformSuite
```python
from testtransform import TransformSuite
```



---
## test_transform
```python
from testtransform import test_transform
```

Perform an identity transform test case.

---
## run_case
```python
from testtransform import run_case
```



---
## run_mypy
```python
from helpers import run_mypy
```



---
## diff_ranges
```python
from helpers import diff_ranges
```



---
## render_diff_range
```python
from helpers import render_diff_range
```



---
## assert_string_arrays_equal
```python
from helpers import assert_string_arrays_equal
```

Assert that two string arrays are equal.

Display any differences in a human-readable form.

---
## assert_module_equivalence
```python
from helpers import assert_module_equivalence
```



---
## assert_target_equivalence
```python
from helpers import assert_target_equivalence
```

Compare actual and expected targets (order sensitive).

---
## show_align_message
```python
from helpers import show_align_message
```

Align s1 and s2 so that the their first difference is highlighted.

For example, if s1 is 'foobar' and s2 is 'fobar', display the
following lines:

  E: foobar
  A: fobar
       ^

If s1 and s2 are long, only display a fragment of the strings around the
first difference. If s1 is very short, do nothing.

---
## clean_up
```python
from helpers import clean_up
```

Remove common directory prefix from all strings in a.

This uses a naive string replace; it seems to work well enough. Also
remove trailing carriage returns.

---
## local_sys_path_set
```python
from helpers import local_sys_path_set
```

Temporary insert current directory into sys.path.

This can be used by test cases that do runtime imports, for example
by the stubgen tests.

---
## testfile_pyversion
```python
from helpers import testfile_pyversion
```



---
## normalize_error_messages
```python
from helpers import normalize_error_messages
```

Translate an array of error messages to use / as path separator.

---
## retry_on_error
```python
from helpers import retry_on_error
```

Retry callback with exponential backoff when it raises OSError.

If the function still generates an error after max_wait seconds, propagate
the exception.

This can be effective against random file system operation failures on
Windows.

---
## good_repr
```python
from helpers import good_repr
```



---
## assert_equal
```python
from helpers import assert_equal
```



---
## typename
```python
from helpers import typename
```



---
## assert_type
```python
from helpers import assert_type
```



---
## parse_options
```python
from helpers import parse_options
```

Parse comments like '# flags: --foo' in a test case.

---
## split_lines
```python
from helpers import split_lines
```

Returns a single list of string lines from the byte streams in args.

---
## write_and_fudge_mtime
```python
from helpers import write_and_fudge_mtime
```



---
## perform_file_operations
```python
from helpers import perform_file_operations
```



---
## check_test_output_files
```python
from helpers import check_test_output_files
```



---
## normalize_file_output
```python
from helpers import normalize_file_output
```

Normalize file output for comparison.

---
## find_test_files
```python
from helpers import find_test_files
```



---
## __name__
```python
from testpythoneval import __name__
```

Test cases for running mypy programs using a Python interpreter.

Each test case type checks a program then runs it using Python. The
output (stdout) of the program is compared to expected output. Type checking
uses full builtins and other stubs.

Note: Currently Python interpreter paths are hard coded.

Note: These test cases are *not* included in the main test suite, as including
      this suite would slow down the main suite too much.

---
## PythonEvaluationSuite
```python
from testpythoneval import PythonEvaluationSuite
```



---
## test_python_evaluation
```python
from testpythoneval import test_python_evaluation
```

Runs Mypy in a subprocess.

If this passes without errors, executes the script again with a given Python
version.

---
## adapt_output
```python
from testpythoneval import adapt_output
```

Translates the generic _program.py into the actual filename.

---
## run_case
```python
from testpythoneval import run_case
```



---
## UpdateFile
```python
from data import UpdateFile
```



---
## DeleteFile
```python
from data import DeleteFile
```



---
## _file_arg_to_module
```python
from data import _file_arg_to_module
```



---
## parse_test_case
```python
from data import parse_test_case
```

Parse and prepare a single case from suite with test case descriptions.

This method is part of the setup phase, just before the test case is run.

---
## DataDrivenTestCase
```python
from data import DataDrivenTestCase
```

Holds parsed data-driven test cases, and handles directory setup and teardown.

---
## module_from_path
```python
from data import module_from_path
```



---
## TestItem
```python
from data import TestItem
```

Parsed test caseitem.

An item is of the form
  [id arg]
  .. data ..

---
## parse_test_data
```python
from data import parse_test_data
```

Parse a list of lines that represent a sequence of test items.

---
## strip_list
```python
from data import strip_list
```

Return a stripped copy of l.

Strip whitespace at the end of all lines, and strip all empty
lines from the end of the array.

---
## collapse_line_continuation
```python
from data import collapse_line_continuation
```



---
## expand_variables
```python
from data import expand_variables
```



---
## expand_errors
```python
from data import expand_errors
```

Transform comments such as '# E: message' or
'# E:3: message' in input.

The result is lines like 'fnam:line: error: message'.

---
## fix_win_path
```python
from data import fix_win_path
```

Changes Windows paths to Linux paths in error messages.

E.g. foo\bar.py -> foo/bar.py.

---
## fix_cobertura_filename
```python
from data import fix_cobertura_filename
```

Changes filename paths to Linux paths in Cobertura output files.

E.g. filename="pkg\subpkg\a.py" -> filename="pkg/subpkg/a.py".

---
## pytest_addoption
```python
from data import pytest_addoption
```



---
## pytest_cmdline_main
```python
from data import pytest_cmdline_main
```



---
## pytest_pycollect_makeitem
```python
from data import pytest_pycollect_makeitem
```

Called by pytest on each object in modules configured in conftest.py files.

collector is pytest.Collector, returns Optional[pytest.Class]

---
## split_test_cases
```python
from data import split_test_cases
```

Iterate over raw test cases in file, at collection time, ignoring sub items.

The collection phase is slow, so any heavy processing should be deferred to after
uninteresting tests are filtered (when using -k PATTERN switch).

---
## DataSuiteCollector
```python
from data import DataSuiteCollector
```



---
## DataFileFix
```python
from data import DataFileFix
```



---
## DataFileCollector
```python
from data import DataFileCollector
```

Represents a single `.test` data driven test file.

More context: https://github.com/python/mypy/issues/11662

---
## add_test_name_suffix
```python
from data import add_test_name_suffix
```



---
## is_incremental
```python
from data import is_incremental
```



---
## has_stable_flags
```python
from data import has_stable_flags
```



---
## DataSuite
```python
from data import DataSuite
```



---
## _case_fail
```python
from data import _case_fail
```



---
## runtest
```python
from data import runtest
```



---
## setup
```python
from data import setup
```

Setup fixtures (ad-hoc)

---
## teardown
```python
from data import teardown
```



---
## reportinfo
```python
from data import reportinfo
```



---
## repr_failure
```python
from data import repr_failure
```



---
## find_steps
```python
from data import find_steps
```

Return a list of descriptions of file operations for each incremental step.

The first list item corresponds to the first incremental step, the second for the
second step, etc. Each operation can either be a file modification/creation (UpdateFile)
or deletion (DeleteFile).

Defaults to having two steps if there aern't any operations.

---
## trimmed_newlines
```python
from data import trimmed_newlines
```



---
## collect
```python
from data import collect
```



---
## from_parent
```python
from data import from_parent
```



---
## enqueue_fix
```python
from data import enqueue_fix
```



---
## _apply_fixes
```python
from data import _apply_fixes
```



---
## run_case
```python
from data import run_case
```



---
## _item_fail
```python
from data import _item_fail
```



---
## __name__
```python
from testcheck import __name__
```

Type checker test cases

---
## TypeCheckSuite
```python
from testcheck import TypeCheckSuite
```



---
## run_case
```python
from testcheck import run_case
```



---
## _sort_output_if_needed
```python
from testcheck import _sort_output_if_needed
```



---
## run_case_once
```python
from testcheck import run_case_once
```



---
## verify_cache
```python
from testcheck import verify_cache
```



---
## find_error_message_paths
```python
from testcheck import find_error_message_paths
```



---
## find_module_files
```python
from testcheck import find_module_files
```



---
## find_missing_cache_files
```python
from testcheck import find_missing_cache_files
```



---
## parse_module
```python
from testcheck import parse_module
```

Return the module and program names for a test case.

Normally, the unit tests will parse the default ('__main__')
module and follow all the imports listed there. You can override
this behavior and instruct the tests to check multiple modules
by using a comment like this in the test case input:

  # cmd: mypy -m foo.bar foo.baz

You can also use `# cmdN:` to have a different cmd for incremental
step N (2, 3, ...).

Return a list of tuples (module name, file name, program text).

---
## _filename
```python
from testcheck import _filename
```



---
## __name__
```python
from singledispatch import __name__
```



---
## SingledispatchTypeVars
```python
from singledispatch import SingledispatchTypeVars
```



---
## RegisterCallableInfo
```python
from singledispatch import RegisterCallableInfo
```



---
## get_singledispatch_info
```python
from singledispatch import get_singledispatch_info
```



---
## get_first_arg
```python
from singledispatch import get_first_arg
```

Get the element that corresponds to the first argument passed to the function

---
## make_fake_register_class_instance
```python
from singledispatch import make_fake_register_class_instance
```



---
## fail
```python
from singledispatch import fail
```

Emit an error message.

This tries to emit an error message at the location specified by `context`, falling back to the
location specified by `ctx.context`. This is helpful when the only context information about
where you want to put the error message may be None (like it is for `CallableType.definition`)
and falling back to the location of the calling function is fine.

---
## create_singledispatch_function_callback
```python
from singledispatch import create_singledispatch_function_callback
```

Called for functools.singledispatch

---
## singledispatch_register_callback
```python
from singledispatch import singledispatch_register_callback
```

Called for functools._SingleDispatchCallable.register

---
## register_function
```python
from singledispatch import register_function
```

Register a function

---
## get_dispatch_type
```python
from singledispatch import get_dispatch_type
```



---
## call_singledispatch_function_after_register_argument
```python
from singledispatch import call_singledispatch_function_after_register_argument
```

Called on the function after passing a type to register

---
## call_singledispatch_function_callback
```python
from singledispatch import call_singledispatch_function_callback
```

Called for functools._SingleDispatchCallable.__call__

---
## __name__
```python
from enums import __name__
```

This file contains a variety of plugins for refining how mypy infers types of
expressions involving Enums.

Currently, this file focuses on providing better inference for expressions like
'SomeEnum.FOO.name' and 'SomeEnum.FOO.value'. Note that the type of both expressions
will vary depending on exactly which instance of SomeEnum we're looking at.

Note that this file does *not* contain all special-cased logic related to enums:
we actually bake some of it directly in to the semantic analysis layer (see
semanal_enum.py).

---
## enum_name_callback
```python
from enums import enum_name_callback
```

This plugin refines the 'name' attribute in enums to act as if
they were declared to be final.

For example, the expression 'MyEnum.FOO.name' normally is inferred
to be of type 'str'.

This plugin will instead make the inferred type be a 'str' where the
last known value is 'Literal["FOO"]'. This means it would be legal to
use 'MyEnum.FOO.name' in contexts that expect a Literal type, just like
any other Final variable or attribute.

This plugin assumes that the provided context is an attribute access
matching one of the strings found in 'ENUM_NAME_ACCESS'.

---
## _first
```python
from enums import _first
```

Return the first value from any iterable.

Returns ``None`` if the iterable is empty.

---
## _infer_value_type_with_auto_fallback
```python
from enums import _infer_value_type_with_auto_fallback
```

Figure out the type of an enum value accounting for `auto()`.

This method is a no-op for a `None` proper_type and also in the case where
the type is not "enum.auto"

---
## _implements_new
```python
from enums import _implements_new
```

Check whether __new__ comes from enum.Enum or was implemented in a
subclass. In the latter case, we must infer Any as long as mypy can't infer
the type of _value_ from assignments in __new__.

---
## enum_member_callback
```python
from enums import enum_member_callback
```

By default `member(1)` will be infered as `member[int]`,
we want to improve the inference to be `Literal[1]` here.

---
## enum_value_callback
```python
from enums import enum_value_callback
```

This plugin refines the 'value' attribute in enums to refer to
the original underlying value. For example, suppose we have the
following:

    class SomeEnum:
        FOO = A()
        BAR = B()

By default, mypy will infer that 'SomeEnum.FOO.value' and
'SomeEnum.BAR.value' both are of type 'Any'. This plugin refines
this inference so that mypy understands the expressions are
actually of types 'A' and 'B' respectively. This better reflects
the actual runtime behavior.

This plugin works simply by looking up the original value assigned
to the enum. For example, when this plugin sees 'SomeEnum.BAR.value',
it will look up whatever type 'BAR' had in the SomeEnum TypeInfo and
use that as the inferred type of the overall expression.

This plugin assumes that the provided context is an attribute access
matching one of the strings found in 'ENUM_VALUE_ACCESS'.

---
## _extract_underlying_field_name
```python
from enums import _extract_underlying_field_name
```

If the given type corresponds to some Enum instance, returns the
original name of that enum. For example, if we receive in the type
corresponding to 'SomeEnum.FOO', we return the string "SomeEnum.Foo".

This helper takes advantage of the fact that Enum instances are valid
to use inside Literal[...] types. An expression like 'SomeEnum.FOO' is
actually represented by an Instance type with a Literal enum fallback.

We can examine this Literal fallback to retrieve the string.

---
## __name__
```python
from functools import __name__
```

Plugin for supporting the functools standard library module.

---
## _MethodInfo
```python
from functools import _MethodInfo
```



---
## functools_total_ordering_maker_callback
```python
from functools import functools_total_ordering_maker_callback
```

Add dunder methods to classes decorated with functools.total_ordering.

---
## _find_other_type
```python
from functools import _find_other_type
```

Find the type of the ``other`` argument in a comparison method.

---
## _analyze_class
```python
from functools import _analyze_class
```

Analyze the class body, its parents, and return the comparison methods found.

---
## partial_new_callback
```python
from functools import partial_new_callback
```

Infer a more precise return type for functools.partial

---
## partial_call_callback
```python
from functools import partial_call_callback
```

Infer a more precise return type for functools.partial.__call__.

---
## DefaultPlugin
```python
from default import DefaultPlugin
```

Type checker plugin that is enabled by default.

---
## typed_dict_get_signature_callback
```python
from default import typed_dict_get_signature_callback
```

Try to infer a better signature type for TypedDict.get.

This is used to get better type context for the second argument that
depends on a TypedDict value type.

---
## typed_dict_get_callback
```python
from default import typed_dict_get_callback
```

Infer a precise return type for TypedDict.get with literal first argument.

---
## typed_dict_pop_signature_callback
```python
from default import typed_dict_pop_signature_callback
```

Try to infer a better signature type for TypedDict.pop.

This is used to get better type context for the second argument that
depends on a TypedDict value type.

---
## typed_dict_pop_callback
```python
from default import typed_dict_pop_callback
```

Type check and infer a precise return type for TypedDict.pop.

---
## typed_dict_setdefault_signature_callback
```python
from default import typed_dict_setdefault_signature_callback
```

Try to infer a better signature type for TypedDict.setdefault.

This is used to get better type context for the second argument that
depends on a TypedDict value type.

---
## typed_dict_setdefault_callback
```python
from default import typed_dict_setdefault_callback
```

Type check TypedDict.setdefault and infer a precise return type.

---
## typed_dict_delitem_callback
```python
from default import typed_dict_delitem_callback
```

Type check TypedDict.__delitem__.

---
## typed_dict_update_signature_callback
```python
from default import typed_dict_update_signature_callback
```

Try to infer a better signature type for methods that update `TypedDict`.

This includes: `TypedDict.update`, `TypedDict.__or__`, `TypedDict.__ror__`,
and `TypedDict.__ior__`.

---
## int_pow_callback
```python
from default import int_pow_callback
```

Infer a more precise return type for int.__pow__.

---
## int_neg_callback
```python
from default import int_neg_callback
```

Infer a more precise return type for int.__neg__ and int.__pos__.

This is mainly used to infer the return type as LiteralType
if the original underlying object is a LiteralType object.

---
## int_pos_callback
```python
from default import int_pos_callback
```

Infer a more precise return type for int.__pos__.

This is identical to __neg__, except the value is not inverted.

---
## tuple_mul_callback
```python
from default import tuple_mul_callback
```

Infer a more precise return type for tuple.__mul__ and tuple.__rmul__.

This is used to return a specific sized tuple if multiplied by Literal int

---
## get_function_hook
```python
from default import get_function_hook
```



---
## get_function_signature_hook
```python
from default import get_function_signature_hook
```



---
## get_method_signature_hook
```python
from default import get_method_signature_hook
```



---
## get_method_hook
```python
from default import get_method_hook
```



---
## get_attribute_hook
```python
from default import get_attribute_hook
```



---
## get_class_decorator_hook
```python
from default import get_class_decorator_hook
```



---
## get_class_decorator_hook_2
```python
from default import get_class_decorator_hook_2
```



---
## _get_decorator_bool_argument
```python
from common import _get_decorator_bool_argument
```

Return the bool argument for the decorator.

This handles both @decorator(...) and @decorator.

---
## _get_bool_argument
```python
from common import _get_bool_argument
```

Return the boolean value for an argument to a call or the
default if it's not found.

---
## _get_argument
```python
from common import _get_argument
```

Return the expression for the specific argument.

---
## find_shallow_matching_overload_item
```python
from common import find_shallow_matching_overload_item
```

Perform limited lookup of a matching overload item.

Full overload resolution is only supported during type checking, but plugins
sometimes need to resolve overloads. This can be used in some such use cases.

Resolve overloads based on these things only:

* Match using argument kinds and names
* If formal argument has type None, only accept the "None" expression in the callee
* If formal argument has type Literal[True] or Literal[False], only accept the
  relevant bool literal

Return the first matching overload item, or the last one if nothing matches.

---
## _get_callee_type
```python
from common import _get_callee_type
```

Return the type of the callee, regardless of its syntatic form.

---
## add_method
```python
from common import add_method
```

Adds a new method to a class.
Deprecated, use add_method_to_class() instead.

---
## MethodSpec
```python
from common import MethodSpec
```

Represents a method signature to be added, except for `name`.

---
## add_method_to_class
```python
from common import add_method_to_class
```

Adds a new method to a class definition.

---
## add_overloaded_method_to_class
```python
from common import add_overloaded_method_to_class
```

Adds a new overloaded method to a class definition.

---
## _prepare_class_namespace
```python
from common import _prepare_class_namespace
```



---
## _add_method_by_spec
```python
from common import _add_method_by_spec
```



---
## add_attribute_to_class
```python
from common import add_attribute_to_class
```

Adds a new attribute to a class definition.
This currently only generates the symbol table entry and no corresponding AssignmentStatement

---
## deserialize_and_fixup_type
```python
from common import deserialize_and_fixup_type
```



---
## DataclassAttribute
```python
from dataclasses import DataclassAttribute
```



---
## DataclassTransformer
```python
from dataclasses import DataclassTransformer
```

Implement the behavior of @dataclass.

Note that this may be executed multiple times on the same class, so
everything here must be idempotent.

This runs after the main semantic analysis pass, so you can assume that
there are no placeholders.

---
## add_dataclass_tag
```python
from dataclasses import add_dataclass_tag
```



---
## dataclass_tag_callback
```python
from dataclasses import dataclass_tag_callback
```

Record that we have a dataclass in the main semantic analysis pass.

The later pass implemented by DataclassTransformer will use this
to detect dataclasses in base classes.

---
## dataclass_class_maker_callback
```python
from dataclasses import dataclass_class_maker_callback
```

Hooks into the class typechecking process to add support for dataclasses.

---
## _get_transform_spec
```python
from dataclasses import _get_transform_spec
```

Find the relevant transform parameters from the decorator/parent class/metaclass that
triggered the dataclasses plugin.

Although the resulting DataclassTransformSpec is based on the typing.dataclass_transform
function, we also use it for traditional dataclasses.dataclass classes as well for simplicity.
In those cases, we return a default spec rather than one based on a call to
`typing.dataclass_transform`.

---
## _is_dataclasses_decorator
```python
from dataclasses import _is_dataclasses_decorator
```



---
## _has_direct_dataclass_transform_metaclass
```python
from dataclasses import _has_direct_dataclass_transform_metaclass
```



---
## _get_expanded_dataclasses_fields
```python
from dataclasses import _get_expanded_dataclasses_fields
```

For a given type, determine what dataclasses it can be: for each class, return the field types.
For generic classes, the field types are expanded.
If the type contains Any or a non-dataclass, returns None; in the latter case, also reports an error.

---
## _meet_replace_sigs
```python
from dataclasses import _meet_replace_sigs
```

Produces the lowest bound of the 'replace' signatures of multiple dataclasses.

---
## replace_function_sig_callback
```python
from dataclasses import replace_function_sig_callback
```

Returns a signature for the 'dataclasses.replace' function that's dependent on the type
of the first positional argument.

---
## is_processed_dataclass
```python
from dataclasses import is_processed_dataclass
```



---
## check_post_init
```python
from dataclasses import check_post_init
```



---
## __init__
```python
from dataclasses import __init__
```



---
## to_argument
```python
from dataclasses import to_argument
```



---
## expand_type
```python
from dataclasses import expand_type
```



---
## to_var
```python
from dataclasses import to_var
```



---
## serialize
```python
from dataclasses import serialize
```



---
## deserialize
```python
from dataclasses import deserialize
```



---
## expand_typevar_from_subtype
```python
from dataclasses import expand_typevar_from_subtype
```

Expands type vars in the context of a subtype when an attribute is inherited
from a generic super type.

---
## transform
```python
from dataclasses import transform
```

Apply all the necessary transformations to the underlying
dataclass so as to ensure it is fully type checked according
to the rules in PEP 557.

---
## _add_internal_replace_method
```python
from dataclasses import _add_internal_replace_method
```

Stashes the signature of 'dataclasses.replace(...)' for this specific dataclass
to be used later whenever 'dataclasses.replace' is called for this dataclass.

---
## _add_internal_post_init_method
```python
from dataclasses import _add_internal_post_init_method
```



---
## add_slots
```python
from dataclasses import add_slots
```



---
## reset_init_only_vars
```python
from dataclasses import reset_init_only_vars
```

Remove init-only vars from the class and reset init var declarations.

---
## _get_assignment_statements_from_if_statement
```python
from dataclasses import _get_assignment_statements_from_if_statement
```



---
## _get_assignment_statements_from_block
```python
from dataclasses import _get_assignment_statements_from_block
```



---
## collect_attributes
```python
from dataclasses import collect_attributes
```

Collect all attributes declared in the dataclass and its parents.

All assignments of the form

  a: SomeType
  b: SomeOtherType = ...

are collected.

Return None if some dataclass base class hasn't been processed
yet and thus we'll need to ask for another pass.

---
## _freeze
```python
from dataclasses import _freeze
```

Converts all attributes to @property methods in order to
emulate frozen classes.

---
## _propertize_callables
```python
from dataclasses import _propertize_callables
```

Converts all attributes with callable types to @property methods.

This avoids the typechecker getting confused and thinking that
`my_dataclass_instance.callable_attr(foo)` is going to receive a
`self` argument (it is not).

---
## _is_kw_only_type
```python
from dataclasses import _is_kw_only_type
```

Checks if the type of the node is the KW_ONLY sentinel value.

---
## _add_dataclass_fields_magic_attribute
```python
from dataclasses import _add_dataclass_fields_magic_attribute
```



---
## _collect_field_args
```python
from dataclasses import _collect_field_args
```

Returns a tuple where the first value represents whether or not
the expression is a call to dataclass.field and the second is a
dictionary of the keyword arguments that field() was called with.

---
## _get_bool_arg
```python
from dataclasses import _get_bool_arg
```



---
## _get_default_init_value_for_field_specifier
```python
from dataclasses import _get_default_init_value_for_field_specifier
```

Find a default value for the `init` parameter of the specifier being called. If the
specifier's type signature includes an `init` parameter with a type of `Literal[True]` or
`Literal[False]`, return the appropriate boolean value from the literal. Otherwise,
fall back to the standard default of `True`.

---
## _infer_dataclass_attr_init_type
```python
from dataclasses import _infer_dataclass_attr_init_type
```

Infer __init__ argument type for an attribute.

In particular, possibly use the signature of __set__.

---
## Converter
```python
from attrs import Converter
```

Holds information about a `converter=` argument

---
## Attribute
```python
from attrs import Attribute
```

The value of an attr.ib() call.

---
## _determine_eq_order
```python
from attrs import _determine_eq_order
```

Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
value of order.

---
## _get_decorator_optional_bool_argument
```python
from attrs import _get_decorator_optional_bool_argument
```

Return the Optional[bool] argument for the decorator.

This handles both @decorator(...) and @decorator.

---
## attr_tag_callback
```python
from attrs import attr_tag_callback
```

Record that we have an attrs class in the main semantic analysis pass.

The later pass implemented by attr_class_maker_callback will use this
to detect attrs classes in base classes.

---
## attr_class_maker_callback
```python
from attrs import attr_class_maker_callback
```

Add necessary dunder methods to classes decorated with attr.s.

attrs is a package that lets you define classes without writing dull boilerplate code.

At a quick glance, the decorator searches the class body for assignments of `attr.ib`s (or
annotated variables if auto_attribs=True), then depending on how the decorator is called,
it will add an __init__ or all the compare methods.
For frozen=True it will turn the attrs into properties.

Hashability will be set according to https://www.attrs.org/en/stable/hashing.html.

See https://www.attrs.org/en/stable/how-does-it-work.html for information on how attrs works.

If this returns False, some required metadata was not ready yet and we need another
pass.

---
## _get_frozen
```python
from attrs import _get_frozen
```

Return whether this class is frozen.

---
## _analyze_class
```python
from attrs import _analyze_class
```

Analyze the class body of an attr maker, its parents, and return the Attributes found.

auto_attribs=True means we'll generate attributes from type annotations also.
auto_attribs=None means we'll detect which mode to use.
kw_only=True means that all attributes created here will be keyword only args in __init__.

---
## _add_empty_metadata
```python
from attrs import _add_empty_metadata
```

Add empty metadata to mark that we've finished processing this class.

---
## _detect_auto_attribs
```python
from attrs import _detect_auto_attribs
```

Return whether auto_attribs should be enabled or disabled.

It's disabled if there are any unannotated attribs()

---
## _attributes_from_assignment
```python
from attrs import _attributes_from_assignment
```

Return Attribute objects that are created by this assignment.

The assignments can look like this:
    x = attr.ib()
    x = y = attr.ib()
    x, y = attr.ib(), attr.ib()
or if auto_attribs is enabled also like this:
    x: type
    x: type = default_value
    x: type = attr.ib(...)

---
## _cleanup_decorator
```python
from attrs import _cleanup_decorator
```

Handle decorators in class bodies.

`x.default` will set a default value on x
`x.validator` and `x.default` will get removed to avoid throwing a type error.

---
## _attribute_from_auto_attrib
```python
from attrs import _attribute_from_auto_attrib
```

Return an Attribute for a new type assignment.

---
## _attribute_from_attrib_maker
```python
from attrs import _attribute_from_attrib_maker
```

Return an Attribute from the assignment or None if you can't make one.

---
## _parse_converter
```python
from attrs import _parse_converter
```

Return the Converter object from an Expression.

---
## is_valid_overloaded_converter
```python
from attrs import is_valid_overloaded_converter
```



---
## _parse_assignments
```python
from attrs import _parse_assignments
```

Convert a possibly complex assignment expression into lists of lvalues and rvalues.

---
## _add_order
```python
from attrs import _add_order
```

Generate all the ordering methods for this class.

---
## _make_frozen
```python
from attrs import _make_frozen
```

Turn all the attributes into properties to simulate frozen classes.

---
## _add_init
```python
from attrs import _add_init
```

Generate an __init__ method for the attributes and add it to the class.

---
## _add_attrs_magic_attribute
```python
from attrs import _add_attrs_magic_attribute
```



---
## _add_slots
```python
from attrs import _add_slots
```



---
## _add_match_args
```python
from attrs import _add_match_args
```



---
## _remove_hashability
```python
from attrs import _remove_hashability
```

Remove hashability from a class.

---
## MethodAdder
```python
from attrs import MethodAdder
```

Helper to add methods to a TypeInfo.

ctx: The ClassDefCtx we are using on which we will add methods.

---
## _get_attrs_init_type
```python
from attrs import _get_attrs_init_type
```

If `typ` refers to an attrs class, get the type of its initializer method.

---
## _fail_not_attrs_class
```python
from attrs import _fail_not_attrs_class
```



---
## _get_expanded_attr_types
```python
from attrs import _get_expanded_attr_types
```

For a given type, determine what attrs classes it can be: for each class, return the field types.
For generic classes, the field types are expanded.
If the type contains Any or a non-attrs type, returns None; in the latter case, also reports an error.

---
## _meet_fields
```python
from attrs import _meet_fields
```

"Meet" the fields of a list of attrs classes, i.e. for each field, its new type will be the lower bound.

---
## evolve_function_sig_callback
```python
from attrs import evolve_function_sig_callback
```

Generate a signature for the 'attr.evolve' function that's specific to the call site
and dependent on the type of the first argument.

---
## fields_function_sig_callback
```python
from attrs import fields_function_sig_callback
```

Provide the signature for `attrs.fields`.

---
## argument
```python
from attrs import argument
```

Return this attribute as an argument to __init__.

---
## serialize
```python
from attrs import serialize
```

Serialize this object so it can be saved and restored.

---
## deserialize
```python
from attrs import deserialize
```

Return the Attribute that was serialized.

---
## expand_typevar_from_subtype
```python
from attrs import expand_typevar_from_subtype
```

Expands type vars in the context of a subtype when an attribute is inherited
from a generic super type.

---
## add_method
```python
from attrs import add_method
```

Add a method: def <method_name>(self, <args>) -> <ret_type>): ... to info.

self_type: The type to use for the self argument or None to use the inferred self type.
tvd: If the method is generic these should be the type variables.

---
## __name__
```python
from proper_plugin import __name__
```

This plugin is helpful for mypy development itself.
By default, it is not enabled for mypy users.

It also can be used by plugin developers as a part of their CI checks.

It finds missing ``get_proper_type()`` call, which can lead to multiple errors.

---
## ProperTypePlugin
```python
from proper_plugin import ProperTypePlugin
```

A plugin to ensure that every type is expanded before doing any special-casing.

This solves the problem that we have hundreds of call sites like:

    if isinstance(typ, UnionType):
        ...  # special-case union

But after introducing a new type TypeAliasType (and removing immediate expansion)
all these became dangerous because typ may be e.g. an alias to union.

---
## isinstance_proper_hook
```python
from proper_plugin import isinstance_proper_hook
```



---
## is_special_target
```python
from proper_plugin import is_special_target
```

Whitelist some special cases for use in isinstance() with improper types.

---
## is_improper_type
```python
from proper_plugin import is_improper_type
```

Is this a type that is not a subtype of ProperType?

---
## is_dangerous_target
```python
from proper_plugin import is_dangerous_target
```

Is this a dangerous target (right argument) for an isinstance() check?

---
## proper_type_hook
```python
from proper_plugin import proper_type_hook
```

Check if this get_proper_type() call is not redundant.

---
## proper_types_hook
```python
from proper_plugin import proper_types_hook
```

Check if this get_proper_types() call is not redundant.

---
## get_proper_type_instance
```python
from proper_plugin import get_proper_type_instance
```



---
## plugin
```python
from proper_plugin import plugin
```



---
## get_function_hook
```python
from proper_plugin import get_function_hook
```



---
## __name__
```python
from ctypes import __name__
```

Plugin to provide accurate types for some parts of the ctypes module.

---
## _find_simplecdata_base_arg
```python
from ctypes import _find_simplecdata_base_arg
```

Try to find a parametrized _SimpleCData in tp's bases and return its single type argument.

None is returned if _SimpleCData appears nowhere in tp's (direct or indirect) bases.

---
## _autoconvertible_to_cdata
```python
from ctypes import _autoconvertible_to_cdata
```

Get a type that is compatible with all types that can be implicitly converted to the given
CData type.

Examples:
* c_int -> Union[c_int, int]
* c_char_p -> Union[c_char_p, bytes, int, NoneType]
* MyStructure -> MyStructure

---
## _autounboxed_cdata
```python
from ctypes import _autounboxed_cdata
```

Get the auto-unboxed version of a CData type, if applicable.

For *direct* _SimpleCData subclasses, the only type argument of _SimpleCData in the bases list
is returned.
For all other CData types, including indirect _SimpleCData subclasses, tp is returned as-is.

---
## _get_array_element_type
```python
from ctypes import _get_array_element_type
```

Get the element type of the Array type tp, or None if not specified.

---
## array_constructor_callback
```python
from ctypes import array_constructor_callback
```

Callback to provide an accurate signature for the ctypes.Array constructor.

---
## array_getitem_callback
```python
from ctypes import array_getitem_callback
```

Callback to provide an accurate return type for ctypes.Array.__getitem__.

---
## array_setitem_callback
```python
from ctypes import array_setitem_callback
```

Callback to provide an accurate signature for ctypes.Array.__setitem__.

---
## array_iter_callback
```python
from ctypes import array_iter_callback
```

Callback to provide an accurate return type for ctypes.Array.__iter__.

---
## array_value_callback
```python
from ctypes import array_value_callback
```

Callback to provide an accurate type for ctypes.Array.value.

---
## array_raw_callback
```python
from ctypes import array_raw_callback
```

Callback to provide an accurate type for ctypes.Array.raw.

---
## __name__
```python
from update import __name__
```

Update build by processing changes using fine-grained dependencies.

Use fine-grained dependencies to update targets in other modules that
may be affected by externally-visible changes in the changed modules.

This forms the core of the fine-grained incremental daemon mode. This
module is not used at all by the 'classic' (non-daemon) incremental
mode.

Here is some motivation for this mode:

* By keeping program state in memory between incremental runs, we
  only have to process changed modules, not their dependencies. The
  classic incremental mode has to deserialize the symbol tables of
  all dependencies of changed modules, which can be slow for large
  programs.

* Fine-grained dependencies allow processing only the relevant parts
  of modules indirectly affected by a change. Say, if only one function
  in a large module is affected by a change in another module, only this
  function is processed. The classic incremental mode always processes
  an entire file as a unit, which is typically much slower.

* It's possible to independently process individual modules within an
  import cycle (SCC). Small incremental changes can be fast independent
  of the size of the related SCC. In classic incremental mode, any change
  within a SCC requires the entire SCC to be processed, which can slow
  things down considerably.

Some terms:

* A *target* is a function/method definition or the top level of a module.
  We refer to targets using their fully qualified name (e.g.
  'mod.Cls.method'). Targets are the smallest units of processing during
  fine-grained incremental checking.

* A *trigger* represents the properties of a part of a program, and it
  gets triggered/fired when these properties change. For example,
  '<mod.func>' refers to a module-level function. It gets triggered if
  the signature of the function changes, or if the function is removed,
  for example.

Some program state is maintained across multiple build increments in
memory:

* The full ASTs of all modules are stored in memory all the time (this
  includes the type map).

* A fine-grained dependency map is maintained, which maps triggers to
  affected program locations (these can be targets, triggers, or
  classes). The latter determine what other parts of a program need to
  be processed again due to a fired trigger.

Here's a summary of how a fine-grained incremental program update happens:

* Determine which modules have changes in their source code since the
  previous update.

* Process changed modules one at a time. Perform a separate full update
  for each changed module, but only report the errors after all modules
  have been processed, since the intermediate states can generate bogus
  errors due to only seeing a partial set of changes.

* Each changed module is processed in full. We parse the module, and
  run semantic analysis to create a new AST and symbol table for the
  module. Reuse the existing ASTs and symbol tables of modules that
  have no changes in their source code. At the end of this stage, we have
  two ASTs and symbol tables for the changed module (the old and the new
  versions). The latter AST has not yet been type checked.

* Take a snapshot of the old symbol table. This is used later to determine
  which properties of the module have changed and which triggers to fire.

* Merge the old AST with the new AST, preserving the identities of
  externally visible AST nodes for which we can find a corresponding node
  in the new AST. (Look at mypy.server.astmerge for the details.) This
  way all external references to AST nodes in the changed module will
  continue to point to the right nodes (assuming they still have a valid
  target).

* Type check the new module.

* Take another snapshot of the symbol table of the changed module.
  Look at the differences between the old and new snapshots to determine
  which parts of the changed modules have changed. The result is a set of
  fired triggers.

* Using the dependency map and the fired triggers, decide which other
  targets have become stale and need to be reprocessed.

* Create new fine-grained dependencies for the changed module. We don't
  garbage collect old dependencies, since extra dependencies are relatively
  harmless (they take some memory and can theoretically slow things down
  a bit by causing redundant work). This is implemented in
  mypy.server.deps.

* Strip the stale AST nodes that we found above. This returns them to a
  state resembling the end of semantic analysis pass 1. We'll run semantic
  analysis again on the existing AST nodes, and since semantic analysis
  is not idempotent, we need to revert some changes made during semantic
  analysis. This is implemented in mypy.server.aststrip.

* Run semantic analyzer passes 2 and 3 on the stale AST nodes, and type
  check them. We also need to do the symbol table snapshot comparison
  dance to find any changes, and we need to merge ASTs to preserve AST node
  identities.

* If some triggers haven been fired, continue processing and repeat the
  previous steps until no triggers are fired.

This is module is tested using end-to-end fine-grained incremental mode
test cases (test-data/unit/fine-grained*.test).

---
## FineGrainedBuildManager
```python
from update import FineGrainedBuildManager
```



---
## find_unloaded_deps
```python
from update import find_unloaded_deps
```

Find all the deps of the nodes in initial that haven't had their tree loaded.

The key invariant here is that if a module is loaded, so are all
of their dependencies. This means that when we encounter a loaded
module, we don't need to explore its dependencies.  (This
invariant is slightly violated when dependencies are added, which
can be handled by calling find_unloaded_deps directly on the new
dependencies.)

---
## ensure_deps_loaded
```python
from update import ensure_deps_loaded
```

Ensure that the dependencies on a module are loaded.

Dependencies are loaded into the 'deps' dictionary.

This also requires loading dependencies from any parent modules,
since dependencies will get stored with parent modules when a module
doesn't exist.

---
## ensure_trees_loaded
```python
from update import ensure_trees_loaded
```

Ensure that the modules in initial and their deps have loaded trees.

---
## NormalUpdate
```python
from update import NormalUpdate
```



---
## BlockedUpdate
```python
from update import BlockedUpdate
```



---
## update_module_isolated
```python
from update import update_module_isolated
```

Build a new version of one changed module only.

Don't propagate changes to elsewhere in the program. Raise CompileError on
encountering a blocking error.

Args:
    module: Changed module (modified, created or deleted)
    path: Path of the changed module
    manager: Build manager
    graph: Build graph
    force_removed: If True, consider the module removed from the build even it the
        file exists

Returns a named tuple describing the result (see above for details).

---
## find_relative_leaf_module
```python
from update import find_relative_leaf_module
```

Find a module in a list that directly imports no other module in the list.

If no such module exists, return the lexicographically first module from the list.
Always return one of the items in the modules list.

NOTE: If both 'abc' and 'typing' have changed, an effect of the above rule is that
    we prefer 'abc', even if both are in the same SCC. This works around a false
    positive in 'typing', at least in tests.

Args:
    modules: List of (module, path) tuples (non-empty)
    graph: Program import graph that contains all modules in the module list

---
## delete_module
```python
from update import delete_module
```



---
## dedupe_modules
```python
from update import dedupe_modules
```



---
## get_module_to_path_map
```python
from update import get_module_to_path_map
```



---
## get_sources
```python
from update import get_sources
```



---
## calculate_active_triggers
```python
from update import calculate_active_triggers
```

Determine activated triggers by comparing old and new symbol tables.

For example, if only the signature of function m.f is different in the new
symbol table, return {'<m.f>'}.

---
## replace_modules_with_new_variants
```python
from update import replace_modules_with_new_variants
```

Replace modules with newly builds versions.

Retain the identities of externally visible AST nodes in the
old ASTs so that references to the affected modules from other
modules will still be valid (unless something was deleted or
replaced with an incompatible definition, in which case there
will be dangling references that will be handled by
propagate_changes_using_dependencies).

---
## propagate_changes_using_dependencies
```python
from update import propagate_changes_using_dependencies
```

Transitively rechecks targets based on triggers and the dependency map.

Returns a list (module id, path) tuples representing modules that contain
a target that needs to be reprocessed but that has not been parsed yet.

Processed targets should be appended to processed_targets (used in tests only,
to test the order of processing targets).

---
## find_targets_recursive
```python
from update import find_targets_recursive
```

Find names of all targets that need to reprocessed, given some triggers.

Returns: A tuple containing a:
 * Dictionary from module id to a set of stale targets.
 * A set of module ids for unparsed modules with stale targets.

---
## reprocess_nodes
```python
from update import reprocess_nodes
```

Reprocess a set of nodes within a single module.

Return fired triggers.

---
## find_symbol_tables_recursive
```python
from update import find_symbol_tables_recursive
```

Find all nested symbol tables.

Args:
    prefix: Full name prefix (used for return value keys and to filter result so that
        cross references to other modules aren't included)
    symbols: Root symbol table

Returns a dictionary from full name to corresponding symbol table.

---
## update_deps
```python
from update import update_deps
```



---
## lookup_target
```python
from update import lookup_target
```

Look up a target by fully-qualified name.

The first item in the return tuple is a list of deferred nodes that
needs to be reprocessed. If the target represents a TypeInfo corresponding
to a protocol, return it as a second item in the return tuple, otherwise None.

---
## is_verbose
```python
from update import is_verbose
```



---
## target_from_node
```python
from update import target_from_node
```

Return the target name corresponding to a deferred node.

Args:
    module: Must be module id of the module that defines 'node'

Returns the target name, or None if the node is not a valid target in the given
module (for example, if it's actually defined in another module).

---
## refresh_suppressed_submodules
```python
from update import refresh_suppressed_submodules
```

Look for submodules that are now suppressed in target package.

If a submodule a.b gets added, we need to mark it as suppressed
in modules that contain "from a import b". Previously we assumed
that 'a.b' is not a module but a regular name.

This is only relevant when following imports normally.

Args:
    module: target package in which to look for submodules
    path: path of the module
    refresh_file: function that reads the AST of a module (returns error messages)

Return a list of errors from refresh_file() if it was called. If the
return value is None, we didn't call refresh_file().

---
## extract_fnam_from_message
```python
from update import extract_fnam_from_message
```



---
## extract_possible_fnam_from_message
```python
from update import extract_possible_fnam_from_message
```



---
## sort_messages_preserving_file_order
```python
from update import sort_messages_preserving_file_order
```

Sort messages so that the order of files is preserved.

An update generates messages so that the files can be in a fairly
arbitrary order.  Preserve the order of files to avoid messages
getting reshuffled continuously.  If there are messages in
additional files, sort them towards the end.

---
## __init__
```python
from update import __init__
```

Initialize fine-grained build based on a batch build.

Args:
    result: Result from the initialized build.
            The manager and graph will be taken over by this class.
    manager: State of the build (mutated by this class)
    graph: Additional state of the build (mutated by this class)

---
## update
```python
from update import update
```

Update previous build result by processing changed modules.

Also propagate changes to other modules as needed, but only process
those parts of other modules that are affected by the changes. Retain
the existing ASTs and symbol tables of unaffected modules.

Reuses original BuildManager and Graph.

Args:
    changed_modules: Modules changed since the previous update/build; each is
        a (module id, path) tuple. Includes modified and added modules.
        Assume this is correct; it's not validated here.
    removed_modules: Modules that have been deleted since the previous update
        or removed from the build.
    followed: If True, the modules were found through following imports

Returns:
    A list of errors.

---
## trigger
```python
from update import trigger
```

Trigger a specific target explicitly.

This is intended for use by the suggestions engine.

---
## flush_cache
```python
from update import flush_cache
```

Flush AST cache.

This needs to be called after each increment, or file changes won't
be detected reliably.

---
## update_one
```python
from update import update_one
```

Process a module from the list of changed modules.

Returns:
    Tuple with these items:

    - Updated list of pending changed modules as (module id, path) tuples
    - Module which was actually processed as (id, path) tuple
    - If there was a blocking error, the error messages from it

---
## update_module
```python
from update import update_module
```

Update a single modified module.

If the module contains imports of previously unseen modules, only process one of
the new modules and return the remaining work to be done.

Args:
    module: Id of the module
    path: File system path of the module
    force_removed: If True, consider module removed from the build even if path
        exists (used for removing an existing file from the build)
    followed: Was this found via import following?

Returns:
    Tuple with these items:

    - Remaining modules to process as (module id, path) tuples
    - Module which was actually processed as (id, path) tuple
    - If there was a blocking error, the error messages from it

---
## restore
```python
from update import restore
```



---
## key
```python
from update import key
```



---
## not_found
```python
from update import not_found
```



---
## __name__
```python
from astdiff import __name__
```

Utilities for comparing two versions of a module symbol table.

The goal is to find which AST nodes have externally visible changes, so
that we can fire triggers and re-process other parts of the program
that are stale because of the changes.

Only look at detail at definitions at the current module -- don't
recurse into other modules.

A summary of the module contents:

* snapshot_symbol_table(...) creates an opaque snapshot description of a
  module/class symbol table (recursing into nested class symbol tables).

* compare_symbol_table_snapshots(...) compares two snapshots for the same
  module id and returns fully qualified names of differences (which act as
  triggers).

To compare two versions of a module symbol table, take snapshots of both
versions and compare the snapshots. The use of snapshots makes it easy to
compare two versions of the *same* symbol table that is being mutated.

Summary of how this works for certain kinds of differences:

* If a symbol table node is deleted or added (only present in old/new version
  of the symbol table), it is considered different, of course.

* If a symbol table node refers to a different sort of thing in the new version,
  it is considered different (for example, if a class is replaced with a
  function).

* If the signature of a function has changed, it is considered different.

* If the type of a variable changes, it is considered different.

* If the MRO of a class changes, or a non-generic class is turned into a
  generic class, the class is considered different (there are other such "big"
  differences that cause a class to be considered changed). However, just changes
  to attributes or methods don't generally constitute a difference at the
  class level -- these are handled at attribute level (say, 'mod.Cls.method'
  is different rather than 'mod.Cls' being different).

* If an imported name targets a different name (say, 'from x import y' is
  replaced with 'from z import y'), the name in the module is considered
  different. If the target of an import continues to have the same name,
  but it's specifics change, this doesn't mean that the imported name is
  treated as changed. Say, there is 'from x import y' in 'm', and the
  type of 'x.y' has changed. This doesn't mean that that 'm.y' is considered
  changed. Instead, processing the difference in 'm' will be handled through
  fine-grained dependencies.

---
## compare_symbol_table_snapshots
```python
from astdiff import compare_symbol_table_snapshots
```

Return names that are different in two snapshots of a symbol table.

Only shallow (intra-module) differences are considered. References to things defined
outside the module are compared based on the name of the target only.

Recurse into class symbol tables (if the class is defined in the target module).

Return a set of fully-qualified names (e.g., 'mod.func' or 'mod.Class.method').

---
## snapshot_symbol_table
```python
from astdiff import snapshot_symbol_table
```

Create a snapshot description that represents the state of a symbol table.

The snapshot has a representation based on nested tuples and dicts
that makes it easy and fast to find differences.

Only "shallow" state is included in the snapshot -- references to
things defined in other modules are represented just by the names of
the targets.

---
## snapshot_definition
```python
from astdiff import snapshot_definition
```

Create a snapshot description of a symbol table node.

The representation is nested tuples and dicts. Only externally
visible attributes are included.

---
## snapshot_type
```python
from astdiff import snapshot_type
```

Create a snapshot representation of a type using nested tuples.

---
## snapshot_optional_type
```python
from astdiff import snapshot_optional_type
```



---
## snapshot_types
```python
from astdiff import snapshot_types
```



---
## snapshot_simple_type
```python
from astdiff import snapshot_simple_type
```



---
## encode_optional_str
```python
from astdiff import encode_optional_str
```



---
## SnapshotTypeVisitor
```python
from astdiff import SnapshotTypeVisitor
```

Creates a read-only, self-contained snapshot of a type object.

Properties of a snapshot:

- Contains (nested) tuples and other immutable primitive objects only.
- References to AST nodes are replaced with full names of targets.
- Has no references to mutable or non-primitive objects.
- Two snapshots represent the same object if and only if they are
  equal.
- Results must be sortable. It's important that tuples have
  consistent types and can't arbitrarily mix str and None values,
  for example, since they can't be compared.

---
## snapshot_untyped_signature
```python
from astdiff import snapshot_untyped_signature
```

Create a snapshot of the signature of a function that has no explicit signature.

If the arguments to a function without signature change, it must be
considered as different. We have this special casing since we don't store
the implicit signature anywhere, and we'd rather not construct new
Callable objects in this module (the idea is to only read properties of
the AST here).

---
## visit_unbound_type
```python
from astdiff import visit_unbound_type
```



---
## visit_any
```python
from astdiff import visit_any
```



---
## visit_none_type
```python
from astdiff import visit_none_type
```



---
## visit_uninhabited_type
```python
from astdiff import visit_uninhabited_type
```



---
## visit_erased_type
```python
from astdiff import visit_erased_type
```



---
## visit_deleted_type
```python
from astdiff import visit_deleted_type
```



---
## visit_instance
```python
from astdiff import visit_instance
```



---
## visit_type_var
```python
from astdiff import visit_type_var
```



---
## visit_param_spec
```python
from astdiff import visit_param_spec
```



---
## visit_type_var_tuple
```python
from astdiff import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from astdiff import visit_unpack_type
```



---
## visit_parameters
```python
from astdiff import visit_parameters
```



---
## visit_callable_type
```python
from astdiff import visit_callable_type
```



---
## normalize_callable_variables
```python
from astdiff import normalize_callable_variables
```

Normalize all type variable ids to run from -1 to -len(variables).

---
## visit_tuple_type
```python
from astdiff import visit_tuple_type
```



---
## visit_typeddict_type
```python
from astdiff import visit_typeddict_type
```



---
## visit_literal_type
```python
from astdiff import visit_literal_type
```



---
## visit_union_type
```python
from astdiff import visit_union_type
```



---
## visit_overloaded
```python
from astdiff import visit_overloaded
```



---
## visit_partial_type
```python
from astdiff import visit_partial_type
```



---
## visit_type_type
```python
from astdiff import visit_type_type
```



---
## visit_type_alias_type
```python
from astdiff import visit_type_alias_type
```



---
## __name__
```python
from aststrip import __name__
```

Strip/reset AST in-place to match state after semantic analyzer pre-analysis.

Fine-grained incremental mode reruns semantic analysis main pass
and type checking for *existing* AST nodes (targets) when changes are
propagated using fine-grained dependencies.  AST nodes attributes are
sometimes changed during semantic analysis main pass, and running
semantic analysis again on those nodes would produce incorrect
results, since this pass isn't idempotent. This pass resets AST
nodes to reflect the state after semantic pre-analysis, so that we
can rerun semantic analysis.
(The above is in contrast to behavior with modules that have source code
changes, for which we re-parse the entire module and reconstruct a fresh
AST. No stripping is required in this case. Both modes of operation should
have the same outcome.)
Notes:
* This is currently pretty fragile, as we must carefully undo whatever
  changes can be made in semantic analysis main pass, including changes
  to symbol tables.
* We reuse existing AST nodes because it makes it relatively straightforward
  to reprocess only a single target within a module efficiently. If there
  was a way to parse a single target within a file, in time proportional to
  the size of the target, we'd rather create fresh AST nodes than strip them.
  (This is possible only in Python 3.8+)
* Currently we don't actually reset all changes, but only those known to affect
  non-idempotent semantic analysis behavior.
  TODO: It would be more principled and less fragile to reset everything
      changed in semantic analysis main pass and later.
* Reprocessing may recreate AST nodes (such as Var nodes, and TypeInfo nodes
  created with assignment statements) that will get different identities from
  the original AST. Thus running an AST merge is necessary after stripping,
  even though some identities are preserved.

---
## strip_target
```python
from aststrip import strip_target
```

Reset a fine-grained incremental target to state before semantic analysis.

All TypeInfos are killed. Therefore we need to preserve the variables
defined as attributes on self. This is done by patches (callbacks)
returned from this function that re-add these variables when called.

Args:
    node: node to strip
    saved_attrs: collect attributes here that may need to be re-added to
        classes afterwards if stripping a class body (this dict is mutated)

---
## NodeStripVisitor
```python
from aststrip import NodeStripVisitor
```



---
## __init__
```python
from aststrip import __init__
```



---
## strip_file_top_level
```python
from aststrip import strip_file_top_level
```

Strip a module top-level (don't recursive into functions).

---
## visit_block
```python
from aststrip import visit_block
```



---
## visit_class_def
```python
from aststrip import visit_class_def
```

Strip class body and type info, but don't strip methods.

---
## save_implicit_attributes
```python
from aststrip import save_implicit_attributes
```

Produce callbacks that re-add attributes defined on self.

---
## visit_func_def
```python
from aststrip import visit_func_def
```



---
## visit_decorator
```python
from aststrip import visit_decorator
```



---
## visit_overloaded_func_def
```python
from aststrip import visit_overloaded_func_def
```



---
## visit_assignment_stmt
```python
from aststrip import visit_assignment_stmt
```



---
## visit_import_from
```python
from aststrip import visit_import_from
```



---
## visit_import_all
```python
from aststrip import visit_import_all
```



---
## visit_for_stmt
```python
from aststrip import visit_for_stmt
```



---
## visit_name_expr
```python
from aststrip import visit_name_expr
```



---
## visit_member_expr
```python
from aststrip import visit_member_expr
```



---
## visit_index_expr
```python
from aststrip import visit_index_expr
```



---
## visit_op_expr
```python
from aststrip import visit_op_expr
```



---
## strip_ref_expr
```python
from aststrip import strip_ref_expr
```



---
## visit_call_expr
```python
from aststrip import visit_call_expr
```



---
## visit_super_expr
```python
from aststrip import visit_super_expr
```



---
## process_lvalue_in_method
```python
from aststrip import process_lvalue_in_method
```



---
## enter_class
```python
from aststrip import enter_class
```



---
## enter_method
```python
from aststrip import enter_method
```



---
## __name__
```python
from deps import __name__
```

Generate fine-grained dependencies for AST nodes, for use in the daemon mode.

Dependencies are stored in a map from *triggers* to *sets of affected locations*.

A trigger is a string that represents a program property that has changed, such
as the signature of a specific function. Triggers are written as '<...>' (angle
brackets). When a program property changes, we determine the relevant trigger(s)
and all affected locations. The latter are stale and will have to be reprocessed.

An affected location is a string than can refer to a *target* (a non-nested
function or method, or a module top level), a class, or a trigger (for
recursively triggering other triggers).

Here's an example representation of a simple dependency map (in format
"<trigger> -> locations"):

  <m.A.g> -> m.f
  <m.A> -> <m.f>, m.A, m.f

Assuming 'A' is a class, this means that

1) if a property of 'm.A.g', such as the signature, is changed, we need
   to process target (function) 'm.f'

2) if the MRO or other significant property of class 'm.A' changes, we
   need to process target 'm.f', the entire class 'm.A', and locations
   triggered by trigger '<m.f>' (this explanation is a bit simplified;
   see below for more details).

The triggers to fire are determined using mypy.server.astdiff.

Examples of triggers:

* '<mod.x>' represents a module attribute/function/class. If any externally
  visible property of 'x' changes, this gets fired. For changes within
  classes, only "big" changes cause the class to be triggered (such as a
  change in MRO). Smaller changes, such as changes to some attributes, don't
  trigger the entire class.
* '<mod.Cls.x>' represents the type and kind of attribute/method 'x' of
  class 'mod.Cls'. This can also refer to an attribute inherited from a
  base class (relevant if it's accessed through a value of type 'Cls'
  instead of the base class type).
* '<package.mod>' represents the existence of module 'package.mod'. This
  gets triggered if 'package.mod' is created or deleted, or if it gets
  changed into something other than a module.

Examples of locations:

* 'mod' is the top level of module 'mod' (doesn't include any function bodies,
  but includes class bodies not nested within a function).
* 'mod.f' is function 'f' in module 'mod' (module-level variables aren't separate
  locations but are included in the module top level). Functions also include
  any nested functions and classes -- such nested definitions aren't separate
  locations, for simplicity of implementation.
* 'mod.Cls.f' is method 'f' of 'mod.Cls'. Non-method attributes aren't locations.
* 'mod.Cls' represents each method in class 'mod.Cls' + the top-level of the
  module 'mod'. (To simplify the implementation, there is no location that only
  includes the body of a class without the entire surrounding module top level.)
* Trigger '<...>' as a location is an indirect way of referring to to all
  locations triggered by the trigger. These indirect locations keep the
  dependency map smaller and easier to manage.

Triggers can be triggered by program changes such as these:

* Addition or deletion of an attribute (or module).
* Change of the kind of thing a name represents (such as a change from a function
  to a class).
* Change of the static type of a name.

Changes in the body of a function that aren't reflected in the signature don't
cause the function to be triggered. More generally, we trigger only on changes
that may affect type checking results outside the module that contains the
change.

We don't generate dependencies from builtins and certain other stdlib modules,
since these change very rarely, and they would just increase the size of the
dependency map significantly without significant benefit.

Test cases for this module live in 'test-data/unit/deps*.test'.

---
## get_dependencies
```python
from deps import get_dependencies
```

Get all dependencies of a node, recursively.

---
## get_dependencies_of_target
```python
from deps import get_dependencies_of_target
```

Get dependencies of a target -- don't recursive into nested targets.

---
## DependencyVisitor
```python
from deps import DependencyVisitor
```



---
## get_type_triggers
```python
from deps import get_type_triggers
```



---
## TypeTriggersVisitor
```python
from deps import TypeTriggersVisitor
```



---
## merge_dependencies
```python
from deps import merge_dependencies
```



---
## non_trivial_bases
```python
from deps import non_trivial_bases
```



---
## has_user_bases
```python
from deps import has_user_bases
```



---
## dump_all_dependencies
```python
from deps import dump_all_dependencies
```

Generate dependencies for all interesting modules and print them to stdout.

---
## __init__
```python
from deps import __init__
```



---
## visit_mypy_file
```python
from deps import visit_mypy_file
```



---
## visit_func_def
```python
from deps import visit_func_def
```



---
## visit_decorator
```python
from deps import visit_decorator
```



---
## visit_class_def
```python
from deps import visit_class_def
```



---
## visit_newtype_expr
```python
from deps import visit_newtype_expr
```



---
## process_type_info
```python
from deps import process_type_info
```



---
## visit_import
```python
from deps import visit_import
```



---
## visit_import_from
```python
from deps import visit_import_from
```



---
## visit_import_all
```python
from deps import visit_import_all
```



---
## visit_block
```python
from deps import visit_block
```



---
## visit_assignment_stmt
```python
from deps import visit_assignment_stmt
```



---
## process_lvalue
```python
from deps import process_lvalue
```

Generate additional dependencies for an lvalue.

---
## is_self_member_ref
```python
from deps import is_self_member_ref
```

Does memberexpr to refer to an attribute of self?

---
## get_non_partial_lvalue_type
```python
from deps import get_non_partial_lvalue_type
```



---
## visit_operator_assignment_stmt
```python
from deps import visit_operator_assignment_stmt
```



---
## visit_for_stmt
```python
from deps import visit_for_stmt
```



---
## visit_with_stmt
```python
from deps import visit_with_stmt
```



---
## visit_del_stmt
```python
from deps import visit_del_stmt
```



---
## process_global_ref_expr
```python
from deps import process_global_ref_expr
```



---
## visit_name_expr
```python
from deps import visit_name_expr
```



---
## visit_member_expr
```python
from deps import visit_member_expr
```



---
## get_unimported_fullname
```python
from deps import get_unimported_fullname
```

If e refers to an unimported definition, infer the fullname of this.

Return None if e doesn't refer to an unimported definition or if we can't
determine the name.

---
## visit_super_expr
```python
from deps import visit_super_expr
```



---
## visit_call_expr
```python
from deps import visit_call_expr
```



---
## process_isinstance_call
```python
from deps import process_isinstance_call
```

Process "isinstance(...)" in a way to avoid some extra dependencies.

---
## visit_cast_expr
```python
from deps import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from deps import visit_assert_type_expr
```



---
## visit_type_application
```python
from deps import visit_type_application
```



---
## visit_index_expr
```python
from deps import visit_index_expr
```



---
## visit_unary_expr
```python
from deps import visit_unary_expr
```



---
## visit_op_expr
```python
from deps import visit_op_expr
```



---
## visit_comparison_expr
```python
from deps import visit_comparison_expr
```



---
## process_binary_op
```python
from deps import process_binary_op
```



---
## add_operator_method_dependency
```python
from deps import add_operator_method_dependency
```



---
## add_operator_method_dependency_for_type
```python
from deps import add_operator_method_dependency_for_type
```



---
## visit_generator_expr
```python
from deps import visit_generator_expr
```



---
## visit_dictionary_comprehension
```python
from deps import visit_dictionary_comprehension
```



---
## visit_star_expr
```python
from deps import visit_star_expr
```



---
## visit_yield_from_expr
```python
from deps import visit_yield_from_expr
```



---
## visit_await_expr
```python
from deps import visit_await_expr
```



---
## add_type_alias_deps
```python
from deps import add_type_alias_deps
```



---
## add_dependency
```python
from deps import add_dependency
```

Add dependency from trigger to a target.

If the target is not given explicitly, use the current target.

---
## add_type_dependencies
```python
from deps import add_type_dependencies
```

Add dependencies to all components of a type.

Args:
    target: If not None, override the default (current) target of the
        generated dependency.

---
## add_attribute_dependency
```python
from deps import add_attribute_dependency
```

Add dependencies for accessing a named attribute of a type.

---
## attribute_triggers
```python
from deps import attribute_triggers
```

Return all triggers associated with the attribute of a type.

---
## add_attribute_dependency_for_expr
```python
from deps import add_attribute_dependency_for_expr
```



---
## add_iter_dependency
```python
from deps import add_iter_dependency
```



---
## use_logical_deps
```python
from deps import use_logical_deps
```



---
## visit_instance
```python
from deps import visit_instance
```



---
## visit_type_alias_type
```python
from deps import visit_type_alias_type
```



---
## visit_any
```python
from deps import visit_any
```



---
## visit_none_type
```python
from deps import visit_none_type
```



---
## visit_callable_type
```python
from deps import visit_callable_type
```



---
## visit_overloaded
```python
from deps import visit_overloaded
```



---
## visit_erased_type
```python
from deps import visit_erased_type
```



---
## visit_deleted_type
```python
from deps import visit_deleted_type
```



---
## visit_partial_type
```python
from deps import visit_partial_type
```



---
## visit_tuple_type
```python
from deps import visit_tuple_type
```



---
## visit_type_type
```python
from deps import visit_type_type
```



---
## visit_type_var
```python
from deps import visit_type_var
```



---
## visit_param_spec
```python
from deps import visit_param_spec
```



---
## visit_type_var_tuple
```python
from deps import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from deps import visit_unpack_type
```



---
## visit_parameters
```python
from deps import visit_parameters
```



---
## visit_typeddict_type
```python
from deps import visit_typeddict_type
```



---
## visit_literal_type
```python
from deps import visit_literal_type
```



---
## visit_unbound_type
```python
from deps import visit_unbound_type
```



---
## visit_uninhabited_type
```python
from deps import visit_uninhabited_type
```



---
## visit_union_type
```python
from deps import visit_union_type
```



---
## __name__
```python
from subexpr import __name__
```

Find all subexpressions of an AST node.

---
## get_subexpressions
```python
from subexpr import get_subexpressions
```



---
## SubexpressionFinder
```python
from subexpr import SubexpressionFinder
```



---
## __init__
```python
from subexpr import __init__
```



---
## visit_int_expr
```python
from subexpr import visit_int_expr
```



---
## visit_name_expr
```python
from subexpr import visit_name_expr
```



---
## visit_float_expr
```python
from subexpr import visit_float_expr
```



---
## visit_str_expr
```python
from subexpr import visit_str_expr
```



---
## visit_bytes_expr
```python
from subexpr import visit_bytes_expr
```



---
## visit_unicode_expr
```python
from subexpr import visit_unicode_expr
```



---
## visit_complex_expr
```python
from subexpr import visit_complex_expr
```



---
## visit_ellipsis
```python
from subexpr import visit_ellipsis
```



---
## visit_super_expr
```python
from subexpr import visit_super_expr
```



---
## visit_type_var_expr
```python
from subexpr import visit_type_var_expr
```



---
## visit_type_alias_expr
```python
from subexpr import visit_type_alias_expr
```



---
## visit_namedtuple_expr
```python
from subexpr import visit_namedtuple_expr
```



---
## visit_typeddict_expr
```python
from subexpr import visit_typeddict_expr
```



---
## visit__promote_expr
```python
from subexpr import visit__promote_expr
```



---
## visit_newtype_expr
```python
from subexpr import visit_newtype_expr
```



---
## visit_member_expr
```python
from subexpr import visit_member_expr
```



---
## visit_yield_from_expr
```python
from subexpr import visit_yield_from_expr
```



---
## visit_yield_expr
```python
from subexpr import visit_yield_expr
```



---
## visit_call_expr
```python
from subexpr import visit_call_expr
```



---
## visit_op_expr
```python
from subexpr import visit_op_expr
```



---
## visit_comparison_expr
```python
from subexpr import visit_comparison_expr
```



---
## visit_slice_expr
```python
from subexpr import visit_slice_expr
```



---
## visit_cast_expr
```python
from subexpr import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from subexpr import visit_assert_type_expr
```



---
## visit_reveal_expr
```python
from subexpr import visit_reveal_expr
```



---
## visit_assignment_expr
```python
from subexpr import visit_assignment_expr
```



---
## visit_unary_expr
```python
from subexpr import visit_unary_expr
```



---
## visit_list_expr
```python
from subexpr import visit_list_expr
```



---
## visit_tuple_expr
```python
from subexpr import visit_tuple_expr
```



---
## visit_dict_expr
```python
from subexpr import visit_dict_expr
```



---
## visit_set_expr
```python
from subexpr import visit_set_expr
```



---
## visit_index_expr
```python
from subexpr import visit_index_expr
```



---
## visit_generator_expr
```python
from subexpr import visit_generator_expr
```



---
## visit_dictionary_comprehension
```python
from subexpr import visit_dictionary_comprehension
```



---
## visit_list_comprehension
```python
from subexpr import visit_list_comprehension
```



---
## visit_set_comprehension
```python
from subexpr import visit_set_comprehension
```



---
## visit_conditional_expr
```python
from subexpr import visit_conditional_expr
```



---
## visit_type_application
```python
from subexpr import visit_type_application
```



---
## visit_lambda_expr
```python
from subexpr import visit_lambda_expr
```



---
## visit_star_expr
```python
from subexpr import visit_star_expr
```



---
## visit_await_expr
```python
from subexpr import visit_await_expr
```



---
## add
```python
from subexpr import add
```



---
## __name__
```python
from mergecheck import __name__
```

Check for duplicate AST nodes after merge.

---
## check_consistency
```python
from mergecheck import check_consistency
```

Fail if there are two AST nodes with the same fullname reachable from 'o'.

Raise AssertionError on failure and print some debugging output.

---
## path_to_str
```python
from mergecheck import path_to_str
```



---
## __name__
```python
from target import __name__
```



---
## trigger_to_target
```python
from target import trigger_to_target
```



---
## __name__
```python
from astmerge import __name__
```

Merge a new version of a module AST and symbol table to older versions of those.

When the source code of a module has a change in fine-grained incremental mode,
we build a new AST from the updated source. However, other parts of the program
may have direct references to parts of the old AST (namely, those nodes exposed
in the module symbol table). The merge operation changes the identities of new
AST nodes that have a correspondence in the old AST to the old ones so that
existing cross-references in other modules will continue to point to the correct
nodes. Also internal cross-references within the new AST are replaced. AST nodes
that aren't externally visible will get new, distinct object identities. This
applies to most expression and statement nodes, for example.

We perform this merge operation so that we don't have to update all
external references (which would be slow and fragile) or always perform
translation when looking up references (which would be hard to retrofit).

The AST merge operation is performed after semantic analysis. Semantic
analysis has to deal with potentially multiple aliases to certain AST
nodes (in particular, MypyFile nodes). Type checking assumes that we
don't have multiple variants of a single AST node visible to the type
checker.

Discussion of some notable special cases:

* If a node is replaced with a different kind of node (say, a function is
  replaced with a class), we don't perform the merge. Fine-grained dependencies
  will be used to rebind all references to the node.

* If a function is replaced with another function with an identical signature,
  call sites continue to point to the same object (by identity) and don't need
  to be reprocessed. Similarly, if a class is replaced with a class that is
  sufficiently similar (MRO preserved, etc.), class references don't need any
  processing. A typical incremental update to a file only changes a few
  externally visible things in a module, and this means that often only few
  external references need any processing, even if the modified module is large.

* A no-op update of a module should not require any processing outside the
  module, since all relevant object identities are preserved.

* The AST diff operation (mypy.server.astdiff) and the top-level fine-grained
  incremental logic (mypy.server.update) handle the cases where the new AST has
  differences from the old one that may need to be propagated to elsewhere in the
  program.

See the main entry point merge_asts for more details.

---
## merge_asts
```python
from astmerge import merge_asts
```

Merge a new version of a module AST to a previous version.

The main idea is to preserve the identities of externally visible
nodes in the old AST (that have a corresponding node in the new AST).
All old node state (outside identity) will come from the new AST.

When this returns, 'old' will refer to the merged AST, but 'new_symbols'
will be the new symbol table. 'new' and 'old_symbols' will no longer be
valid.

---
## replacement_map_from_symbol_table
```python
from astmerge import replacement_map_from_symbol_table
```

Create a new-to-old object identity map by comparing two symbol table revisions.

Both symbol tables must refer to revisions of the same module id. The symbol tables
are compared recursively (recursing into nested class symbol tables), but only within
the given module prefix. Don't recurse into other modules accessible through the symbol
table.

---
## replace_nodes_in_ast
```python
from astmerge import replace_nodes_in_ast
```

Replace all references to replacement map keys within an AST node, recursively.

Also replace the *identity* of any nodes that have replacements. Return the
*replaced* version of the argument node (which may have a different identity, if
it's included in the replacement map).

---
## NodeReplaceVisitor
```python
from astmerge import NodeReplaceVisitor
```

Transform some nodes to new identities in an AST.

Only nodes that live in the symbol table may be
replaced, which simplifies the implementation some. Also
replace all references to the old identities.

---
## TypeReplaceVisitor
```python
from astmerge import TypeReplaceVisitor
```

Similar to NodeReplaceVisitor, but for type objects.

Note: this visitor may sometimes visit unanalyzed types
such as 'UnboundType' and 'RawExpressionType' For example, see
NodeReplaceVisitor.process_base_func.

---
## replace_nodes_in_symbol_table
```python
from astmerge import replace_nodes_in_symbol_table
```



---
## __init__
```python
from astmerge import __init__
```



---
## visit_mypy_file
```python
from astmerge import visit_mypy_file
```



---
## visit_block
```python
from astmerge import visit_block
```



---
## visit_func_def
```python
from astmerge import visit_func_def
```



---
## visit_overloaded_func_def
```python
from astmerge import visit_overloaded_func_def
```



---
## visit_class_def
```python
from astmerge import visit_class_def
```



---
## process_base_func
```python
from astmerge import process_base_func
```



---
## process_type_var_def
```python
from astmerge import process_type_var_def
```



---
## process_param_spec_def
```python
from astmerge import process_param_spec_def
```



---
## process_type_var_tuple_def
```python
from astmerge import process_type_var_tuple_def
```



---
## visit_assignment_stmt
```python
from astmerge import visit_assignment_stmt
```



---
## visit_name_expr
```python
from astmerge import visit_name_expr
```



---
## visit_member_expr
```python
from astmerge import visit_member_expr
```



---
## visit_ref_expr
```python
from astmerge import visit_ref_expr
```



---
## visit_namedtuple_expr
```python
from astmerge import visit_namedtuple_expr
```



---
## visit_cast_expr
```python
from astmerge import visit_cast_expr
```



---
## visit_assert_type_expr
```python
from astmerge import visit_assert_type_expr
```



---
## visit_super_expr
```python
from astmerge import visit_super_expr
```



---
## visit_call_expr
```python
from astmerge import visit_call_expr
```



---
## visit_newtype_expr
```python
from astmerge import visit_newtype_expr
```



---
## visit_lambda_expr
```python
from astmerge import visit_lambda_expr
```



---
## visit_typeddict_expr
```python
from astmerge import visit_typeddict_expr
```



---
## visit_enum_call_expr
```python
from astmerge import visit_enum_call_expr
```



---
## visit_var
```python
from astmerge import visit_var
```



---
## visit_type_alias
```python
from astmerge import visit_type_alias
```



---
## fixup
```python
from astmerge import fixup
```



---
## fixup_and_reset_typeinfo
```python
from astmerge import fixup_and_reset_typeinfo
```

Fix-up type info and reset subtype caches.

This needs to be called at least once per each merged TypeInfo, as otherwise we
may leak stale caches.

---
## fixup_type
```python
from astmerge import fixup_type
```



---
## process_type_info
```python
from astmerge import process_type_info
```



---
## process_synthetic_type_info
```python
from astmerge import process_synthetic_type_info
```



---
## replace_statements
```python
from astmerge import replace_statements
```



---
## visit_instance
```python
from astmerge import visit_instance
```



---
## visit_type_alias_type
```python
from astmerge import visit_type_alias_type
```



---
## visit_any
```python
from astmerge import visit_any
```



---
## visit_none_type
```python
from astmerge import visit_none_type
```



---
## visit_callable_type
```python
from astmerge import visit_callable_type
```



---
## visit_overloaded
```python
from astmerge import visit_overloaded
```



---
## visit_erased_type
```python
from astmerge import visit_erased_type
```



---
## visit_deleted_type
```python
from astmerge import visit_deleted_type
```



---
## visit_partial_type
```python
from astmerge import visit_partial_type
```



---
## visit_tuple_type
```python
from astmerge import visit_tuple_type
```



---
## visit_type_type
```python
from astmerge import visit_type_type
```



---
## visit_type_var
```python
from astmerge import visit_type_var
```



---
## visit_param_spec
```python
from astmerge import visit_param_spec
```



---
## visit_type_var_tuple
```python
from astmerge import visit_type_var_tuple
```



---
## visit_unpack_type
```python
from astmerge import visit_unpack_type
```



---
## visit_parameters
```python
from astmerge import visit_parameters
```



---
## visit_typeddict_type
```python
from astmerge import visit_typeddict_type
```



---
## visit_raw_expression_type
```python
from astmerge import visit_raw_expression_type
```



---
## visit_literal_type
```python
from astmerge import visit_literal_type
```



---
## visit_unbound_type
```python
from astmerge import visit_unbound_type
```



---
## visit_type_list
```python
from astmerge import visit_type_list
```



---
## visit_callable_argument
```python
from astmerge import visit_callable_argument
```



---
## visit_ellipsis_type
```python
from astmerge import visit_ellipsis_type
```



---
## visit_uninhabited_type
```python
from astmerge import visit_uninhabited_type
```



---
## visit_union_type
```python
from astmerge import visit_union_type
```



---
## visit_placeholder_type
```python
from astmerge import visit_placeholder_type
```



---
## __name__
```python
from objgraph import __name__
```

Find all objects reachable from a root object.

---
## isproperty
```python
from objgraph import isproperty
```



---
## get_edge_candidates
```python
from objgraph import get_edge_candidates
```



---
## get_edges
```python
from objgraph import get_edges
```



---
## get_reachable_graph
```python
from objgraph import get_reachable_graph
```



---
## get_path
```python
from objgraph import get_path
```



---
## __name__
```python
from trigger import __name__
```

AST triggers that are used for fine-grained dependency handling.

---
## make_trigger
```python
from trigger import make_trigger
```



---
## make_wildcard_trigger
```python
from trigger import make_wildcard_trigger
```

Special trigger fired when any top-level name is changed in a module.

Note that this is different from a module trigger, as module triggers are only
fired if the module is created, deleted, or replaced with a non-module, whereas
a wildcard trigger is triggered for namespace changes.

This is used for "from m import *" dependencies.

---
## __name__
```python
from test_parse_data import __name__
```

A "meta test" which tests the parsing of .test files. This is not meant to become exhaustive
but to ensure we maintain a basic level of ergonomics for mypy contributors.

---
## _run_pytest
```python
from test_parse_data import _run_pytest
```



---
## ParseTestDataSuite
```python
from test_parse_data import ParseTestDataSuite
```



---
## test_parse_invalid_case
```python
from test_parse_data import test_parse_invalid_case
```



---
## test_parse_invalid_section
```python
from test_parse_data import test_parse_invalid_section
```



---
## test_bad_ge_version_check
```python
from test_parse_data import test_bad_ge_version_check
```



---
## test_bad_eq_version_check
```python
from test_parse_data import test_bad_eq_version_check
```



---
## __name__
```python
from _pytest import __name__
```



---
## PytestResult
```python
from _pytest import PytestResult
```



---
## dedent_docstring
```python
from _pytest import dedent_docstring
```



---
## run_pytest_data_suite
```python
from _pytest import run_pytest_data_suite
```

Runs a suite of data test cases through pytest until either tests pass
or until a maximum number of attempts (needed for incremental tests).

:param data_suite: the actual "suite" i.e. the contents of a .test file

---
## __name__
```python
from test_diff_helper import __name__
```



---
## DiffHelperSuite
```python
from test_diff_helper import DiffHelperSuite
```



---
## test_render_diff_range
```python
from test_diff_helper import test_render_diff_range
```



---
## test_diff_ranges
```python
from test_diff_helper import test_diff_ranges
```



---
## __name__
```python
from test_update_data import __name__
```

A "meta test" which tests the `--update-data` feature for updating .test files.
Updating the expected output, especially when it's in the form of inline (comment) assertions,
can be brittle, which is why we're "meta-testing" here.

---
## _run_pytest_update_data
```python
from test_update_data import _run_pytest_update_data
```

Runs a suite of data test cases through 'pytest --update-data' until either tests pass
or until a maximum number of attempts (needed for incremental tests).

---
## UpdateDataSuite
```python
from test_update_data import UpdateDataSuite
```



---
## test_update_data
```python
from test_update_data import test_update_data
```



---
## Highlight
```python
from code import Highlight
```

Directive to set the highlighting language for code blocks, as well
as the threshold for line numbers.

---
## dedent_lines
```python
from code import dedent_lines
```



---
## container_wrapper
```python
from code import container_wrapper
```



---
## CodeBlock
```python
from code import CodeBlock
```

Directive for a code block with special highlighting or line numbering
settings.

---
## LiteralIncludeReader
```python
from code import LiteralIncludeReader
```



---
## LiteralInclude
```python
from code import LiteralInclude
```

Like ``.. include:: :literal:``, but only warns if the include file is
not found, and does not raise errors.  Also has several options for
selecting what to include.

---
## setup
```python
from code import setup
```



---
## run
```python
from code import run
```



---
## parse_options
```python
from code import parse_options
```



---
## read_file
```python
from code import read_file
```



---
## read
```python
from code import read
```



---
## show_diff
```python
from code import show_diff
```



---
## pyobject_filter
```python
from code import pyobject_filter
```



---
## lines_filter
```python
from code import lines_filter
```



---
## start_filter
```python
from code import start_filter
```



---
## end_filter
```python
from code import end_filter
```



---
## prepend_filter
```python
from code import prepend_filter
```



---
## append_filter
```python
from code import append_filter
```



---
## dedent_filter
```python
from code import dedent_filter
```



---
## optional_int
```python
from __init__ import optional_int
```

Check for an integer argument or None value; raise ``ValueError`` if not.

---
## ObjectDescription
```python
from __init__ import ObjectDescription
```

Directive to describe a class, function or similar object.  Not used
directly, but subclassed (in domain-specific directives) to add custom
behavior.

---
## DefaultRole
```python
from __init__ import DefaultRole
```

Set the default interpreted text role.  Overridden from docutils.

---
## DefaultDomain
```python
from __init__ import DefaultDomain
```

Directive to (re-)set the default domain for this source file.

---
## get_field_type_map
```python
from __init__ import get_field_type_map
```



---
## get_signatures
```python
from __init__ import get_signatures
```

Retrieve the signatures to document from the directive arguments.  By
default, signatures are given as arguments, one per line.

---
## handle_signature
```python
from __init__ import handle_signature
```



---
## add_target_and_index
```python
from __init__ import add_target_and_index
```



---
## before_content
```python
from __init__ import before_content
```



---
## transform_content
```python
from __init__ import transform_content
```

Insert *type* and *default* as a field list.

---
## after_content
```python
from __init__ import after_content
```



---
## _object_hierarchy_parts
```python
from __init__ import _object_hierarchy_parts
```



---
## _toc_entry_name
```python
from __init__ import _toc_entry_name
```



---
## int_or_nothing
```python
from other import int_or_nothing
```



---
## TocTree
```python
from other import TocTree
```

Directive to notify Sphinx about the hierarchical structure of the docs,
and to include a table-of-contents like tree in the current document.

---
## Author
```python
from other import Author
```

Directive to give the name of the author of the current document
or section. Shown in the output only if the show_authors option is on.

---
## SeeAlso
```python
from other import SeeAlso
```

An admonition mentioning things to look at as reference.

---
## TabularColumns
```python
from other import TabularColumns
```

Directive to give an explicit tabulary column definition to LaTeX.

---
## Centered
```python
from other import Centered
```

Directive to create a centered line of bold text.

---
## Acks
```python
from other import Acks
```

Directive for a list of names.

---
## HList
```python
from other import HList
```

Directive for a list that gets compacted horizontally.

---
## Only
```python
from other import Only
```

Directive to only include text if the given tag(s) are enabled.

---
## Include
```python
from other import Include
```

Like the standard "Include" directive, but interprets absolute paths
"correctly", i.e. relative to source directory.

---
## setup
```python
from other import setup
```



---
## run
```python
from other import run
```



---
## parse_content
```python
from other import parse_content
```



---
## _insert_input
```python
from other import _insert_input
```



---
## Figure
```python
from patches import Figure
```

The figure directive which applies `:name:` option to the figure node
instead of the image node.

---
## CSVTable
```python
from patches import CSVTable
```

The csv-table directive which searches a CSV file from Sphinx project's source
directory when an absolute path is given via :file: option.

---
## Code
```python
from patches import Code
```

Parse and mark up content of a code block.

This is compatible with docutils' :rst:dir:`code` directive.

---
## MathDirective
```python
from patches import MathDirective
```



---
## Rubric
```python
from patches import Rubric
```

A patch of the docutils' :rst:dir:`rubric` directive,
which adds a level option to specify the heading level of the rubric.

---
## setup
```python
from patches import setup
```



---
## run
```python
from patches import run
```



---
## add_target
```python
from patches import add_target
```



---
## handle_exception
```python
from build import handle_exception
```



---
## jobs_argument
```python
from build import jobs_argument
```

Special type to handle 'auto' flags passed to 'sphinx-build' via -j flag. Can
be expanded to handle other special scaling requests, such as setting job count
to cpu_count.

---
## get_parser
```python
from build import get_parser
```



---
## make_main
```python
from build import make_main
```

Sphinx build "make mode" entry.

---
## _parse_arguments
```python
from build import _parse_arguments
```



---
## _parse_confdir
```python
from build import _parse_confdir
```



---
## _parse_doctreedir
```python
from build import _parse_doctreedir
```



---
## _validate_filenames
```python
from build import _validate_filenames
```



---
## _validate_colour_support
```python
from build import _validate_colour_support
```



---
## _parse_logging
```python
from build import _parse_logging
```



---
## _parse_confoverrides
```python
from build import _parse_confoverrides
```



---
## build_main
```python
from build import build_main
```

Sphinx build "main" command-line entry.

---
## _bug_report_info
```python
from build import _bug_report_info
```



---
## main
```python
from build import main
```



---
## SupportsWrite
```python
from build import SupportsWrite
```



---
## write
```python
from build import write
```



---
## __name__
```python
from quickstart import __name__
```

Quickly setup documentation source to work with Sphinx.

---
## term_input
```python
from quickstart import term_input
```



---
## ValidationError
```python
from quickstart import ValidationError
```

Raised for validation errors.

---
## is_path
```python
from quickstart import is_path
```



---
## is_path_or_empty
```python
from quickstart import is_path_or_empty
```



---
## allow_empty
```python
from quickstart import allow_empty
```



---
## nonempty
```python
from quickstart import nonempty
```



---
## choice
```python
from quickstart import choice
```



---
## boolean
```python
from quickstart import boolean
```



---
## suffix
```python
from quickstart import suffix
```



---
## ok
```python
from quickstart import ok
```



---
## do_prompt
```python
from quickstart import do_prompt
```



---
## QuickstartRenderer
```python
from quickstart import QuickstartRenderer
```



---
## ask_user
```python
from quickstart import ask_user
```

Ask the user for quickstart values missing from *d*.

Values are:

* path:      root path
* sep:       separate source and build dirs (bool)
* dot:       replacement for dot in _templates etc.
* project:   project name
* author:    author names
* version:   version of project
* release:   release of project
* language:  document language
* suffix:    source file suffix
* master:    master document name
* extensions:  extensions to use (list)
* makefile:  make Makefile
* batchfile: make command file

---
## generate
```python
from quickstart import generate
```

Generate project based on values in *d*.

---
## valid_dir
```python
from quickstart import valid_dir
```



---
## get_parser
```python
from quickstart import get_parser
```



---
## main
```python
from quickstart import main
```



---
## val
```python
from quickstart import val
```



---
## __init__
```python
from quickstart import __init__
```



---
## _has_custom_template
```python
from quickstart import _has_custom_template
```

Check if custom template file exists.

Note: Please don't use this function from extensions.
      It will be removed in the future without deprecation period.

---
## render
```python
from quickstart import render
```



---
## write_file
```python
from quickstart import write_file
```



---
## __name__
```python
from make_mode import __name__
```

sphinx-build -M command-line handling.

This replaces the old, platform-dependent and once-generated content
of Makefile / make.bat.

This is in its own module so that importing it is fast.  It should not
import the main Sphinx modules (like sphinx.applications, sphinx.builders).

---
## Make
```python
from make_mode import Make
```



---
## run_make_mode
```python
from make_mode import run_make_mode
```



---
## __init__
```python
from make_mode import __init__
```



---
## builddir_join
```python
from make_mode import builddir_join
```



---
## build_clean
```python
from make_mode import build_clean
```



---
## build_help
```python
from make_mode import build_help
```



---
## build_latexpdf
```python
from make_mode import build_latexpdf
```



---
## build_latexpdfja
```python
from make_mode import build_latexpdfja
```



---
## build_info
```python
from make_mode import build_info
```



---
## build_gettext
```python
from make_mode import build_gettext
```



---
## run_generic_build
```python
from make_mode import run_generic_build
```



---
## __name__
```python
from citation import __name__
```

The citation domain.

---
## CitationDomain
```python
from citation import CitationDomain
```

Domain for citations.

---
## CitationDefinitionTransform
```python
from citation import CitationDefinitionTransform
```

Mark citation definition labels as not smartquoted.

---
## CitationReferenceTransform
```python
from citation import CitationReferenceTransform
```

Replace citation references by pending_xref nodes before the default
docutils transform tries to resolve them.

---
## setup
```python
from citation import setup
```



---
## citations
```python
from citation import citations
```



---
## citation_refs
```python
from citation import citation_refs
```



---
## clear_doc
```python
from citation import clear_doc
```



---
## merge_domaindata
```python
from citation import merge_domaindata
```



---
## note_citation
```python
from citation import note_citation
```



---
## note_citation_reference
```python
from citation import note_citation_reference
```



---
## check_consistency
```python
from citation import check_consistency
```



---
## resolve_xref
```python
from citation import resolve_xref
```



---
## resolve_any_xref
```python
from citation import resolve_any_xref
```



---
## apply
```python
from citation import apply
```



---
## IndexDomain
```python
from index import IndexDomain
```

Mathematics domain.

---
## IndexDirective
```python
from index import IndexDirective
```

Directive to add entries to the index.

---
## IndexRole
```python
from index import IndexRole
```



---
## setup
```python
from index import setup
```



---
## entries
```python
from index import entries
```



---
## clear_doc
```python
from index import clear_doc
```



---
## merge_domaindata
```python
from index import merge_domaindata
```



---
## process_doc
```python
from index import process_doc
```

Process a document after it is read by the environment.

---
## ObjType
```python
from __init__ import ObjType
```

An ObjType is the description for a type of object that a domain can
document.  In the object_types attribute of Domain subclasses, object type
names are mapped to instances of this class.

Constructor arguments:

- *lname*: localized name of the type (do not include domain name)
- *roles*: all the roles that can refer to an object of this type
- *attrs*: object attributes -- currently only "searchprio" is known,
  which defines the object's priority in the full-text search index,
  see :meth:`Domain.get_objects()`.

---
## IndexEntry
```python
from __init__ import IndexEntry
```



---
## Domain
```python
from __init__ import Domain
```

A Domain is meant to be a group of "object" description directives for
objects of a similar nature, and corresponding roles to create references to
them.  Examples would be Python modules, classes, functions etc., elements
of a templating language, Sphinx roles and directives, etc.

Each domain has a separate storage for information about existing objects
and how to reference them in `self.data`, which must be a dictionary.  It
also must implement several functions that expose the object information in
a uniform way to parts of Sphinx that allow the user to reference or search
for objects in a domain-agnostic way.

About `self.data`: since all object and cross-referencing information is
stored on a BuildEnvironment instance, the `domain.data` object is also
stored in the `env.domaindata` dict under the key `domain.name`.  Before the
build process starts, every active domain is instantiated and given the
environment object; the `domaindata` dict must then either be nonexistent or
a dictionary whose 'version' key is equal to the domain class'
:attr:`data_version` attribute.  Otherwise, `OSError` is raised and the
pickled environment is discarded.

---
## generate
```python
from __init__ import generate
```



---
## add_object_type
```python
from __init__ import add_object_type
```

Add an object type.

---
## role
```python
from __init__ import role
```

Return a role adapter function that always gives the registered
role its full name ('domain:name') as the first argument.

---
## clear_doc
```python
from __init__ import clear_doc
```

Remove specified data of a document.

This method is called on the removal of the document.

.. seealso:: :event:`env-purge-doc`

---
## merge_domaindata
```python
from __init__ import merge_domaindata
```



---
## process_doc
```python
from __init__ import process_doc
```

Process a document and gather specific data from it.

This method is called after the document is read.

.. seealso:: :event:`doctree-read`

---
## check_consistency
```python
from __init__ import check_consistency
```

Do consistency checks.

---
## process_field_xref
```python
from __init__ import process_field_xref
```



---
## resolve_xref
```python
from __init__ import resolve_xref
```



---
## resolve_any_xref
```python
from __init__ import resolve_any_xref
```



---
## get_objects
```python
from __init__ import get_objects
```



---
## get_type_name
```python
from __init__ import get_type_name
```



---
## get_enumerable_node_type
```python
from __init__ import get_enumerable_node_type
```

Get type of enumerable nodes.

---
## get_full_qualified_name
```python
from __init__ import get_full_qualified_name
```



---
## role_adapter
```python
from __init__ import role_adapter
```



---
## DirectiveAdapter
```python
from __init__ import DirectiveAdapter
```



---
## __name__
```python
from changeset import __name__
```

The changeset domain.

---
## ChangeSet
```python
from changeset import ChangeSet
```



---
## VersionChange
```python
from changeset import VersionChange
```

Directive to describe a change/addition/deprecation in a specific version.

---
## ChangeSetDomain
```python
from changeset import ChangeSetDomain
```

Domain for changesets.

---
## setup
```python
from changeset import setup
```



---
## run
```python
from changeset import run
```



---
## changesets
```python
from changeset import changesets
```



---
## note_changeset
```python
from changeset import note_changeset
```



---
## clear_doc
```python
from changeset import clear_doc
```



---
## merge_domaindata
```python
from changeset import merge_domaindata
```



---
## process_doc
```python
from changeset import process_doc
```



---
## get_changesets_for
```python
from changeset import get_changesets_for
```



---
## MathReferenceRole
```python
from math import MathReferenceRole
```



---
## MathDomain
```python
from math import MathDomain
```

Mathematics domain.

---
## setup
```python
from math import setup
```



---
## result_nodes
```python
from math import result_nodes
```



---
## equations
```python
from math import equations
```



---
## note_equation
```python
from math import note_equation
```



---
## get_equation_number_for
```python
from math import get_equation_number_for
```



---
## process_doc
```python
from math import process_doc
```



---
## clear_doc
```python
from math import clear_doc
```



---
## merge_domaindata
```python
from math import merge_domaindata
```



---
## resolve_xref
```python
from math import resolve_xref
```



---
## resolve_any_xref
```python
from math import resolve_any_xref
```



---
## get_objects
```python
from math import get_objects
```



---
## has_equations
```python
from math import has_equations
```



---
## math_node
```python
from math import math_node
```



---
## JSObject
```python
from javascript import JSObject
```

Description of a JavaScript object.

---
## JSCallable
```python
from javascript import JSCallable
```

Description of a JavaScript function, method or constructor.

---
## JSConstructor
```python
from javascript import JSConstructor
```

Like a callable but with a different prefix.

---
## JSModule
```python
from javascript import JSModule
```

Directive to mark description of a new JavaScript module.

This directive specifies the module name that will be used by objects that
follow this directive.

Options
-------

no-index
    If the ``:no-index:`` option is specified, no linkable elements will be
    created, and the module won't be added to the global module index. This
    is useful for splitting up the module definition across multiple
    sections or files.

:param mod_name: Module name

---
## JSXRefRole
```python
from javascript import JSXRefRole
```



---
## JavaScriptDomain
```python
from javascript import JavaScriptDomain
```

JavaScript language domain.

---
## setup
```python
from javascript import setup
```



---
## get_display_prefix
```python
from javascript import get_display_prefix
```



---
## handle_signature
```python
from javascript import handle_signature
```

Breaks down construct signatures

Parses out prefix and argument list from construct definition. The
namespace and class will be determined by the nesting of domain
directives.

---
## _object_hierarchy_parts
```python
from javascript import _object_hierarchy_parts
```



---
## add_target_and_index
```python
from javascript import add_target_and_index
```



---
## get_index_text
```python
from javascript import get_index_text
```



---
## before_content
```python
from javascript import before_content
```

Handle object nesting before content

:py:class:`JSObject` represents JavaScript language constructs. For
constructs that are nestable, this method will build up a stack of the
nesting hierarchy so that it can be later de-nested correctly, in
:py:meth:`after_content`.

For constructs that aren't nestable, the stack is bypassed, and instead
only the most recent object is tracked. This object prefix name will be
removed with :py:meth:`after_content`.

The following keys are used in ``self.env.ref_context``:

    js:objects
        Stores the object prefix history. With each nested element, we
        add the object prefix to this list. When we exit that object's
        nesting level, :py:meth:`after_content` is triggered and the
        prefix is removed from the end of the list.

    js:object
        Current object prefix. This should generally reflect the last
        element in the prefix history

---
## after_content
```python
from javascript import after_content
```

Handle object de-nesting after content

If this class is a nestable object, removing the last nested class prefix
ends further nesting in the object.

If this class is not a nestable object, the list of classes should not
be altered as we didn't affect the nesting levels in
:py:meth:`before_content`.

---
## _toc_entry_name
```python
from javascript import _toc_entry_name
```



---
## run
```python
from javascript import run
```



---
## process_link
```python
from javascript import process_link
```



---
## objects
```python
from javascript import objects
```



---
## note_object
```python
from javascript import note_object
```



---
## modules
```python
from javascript import modules
```



---
## note_module
```python
from javascript import note_module
```



---
## clear_doc
```python
from javascript import clear_doc
```



---
## merge_domaindata
```python
from javascript import merge_domaindata
```



---
## find_obj
```python
from javascript import find_obj
```



---
## resolve_xref
```python
from javascript import resolve_xref
```



---
## resolve_any_xref
```python
from javascript import resolve_any_xref
```



---
## get_objects
```python
from javascript import get_objects
```



---
## get_full_qualified_name
```python
from javascript import get_full_qualified_name
```



---
## ReSTMarkup
```python
from rst import ReSTMarkup
```

Description of generic reST markup.

---
## parse_directive
```python
from rst import parse_directive
```

Parse a directive signature.

Returns (directive, arguments) string tuple.  If no arguments are given,
returns (directive, '').

---
## ReSTDirective
```python
from rst import ReSTDirective
```

Description of a reST directive.

---
## ReSTDirectiveOption
```python
from rst import ReSTDirectiveOption
```

Description of an option for reST directive.

---
## ReSTRole
```python
from rst import ReSTRole
```

Description of a reST role.

---
## ReSTDomain
```python
from rst import ReSTDomain
```

ReStructuredText domain.

---
## setup
```python
from rst import setup
```



---
## add_target_and_index
```python
from rst import add_target_and_index
```



---
## get_index_text
```python
from rst import get_index_text
```



---
## _object_hierarchy_parts
```python
from rst import _object_hierarchy_parts
```



---
## _toc_entry_name
```python
from rst import _toc_entry_name
```



---
## handle_signature
```python
from rst import handle_signature
```



---
## before_content
```python
from rst import before_content
```



---
## after_content
```python
from rst import after_content
```



---
## current_directive
```python
from rst import current_directive
```



---
## objects
```python
from rst import objects
```



---
## note_object
```python
from rst import note_object
```



---
## clear_doc
```python
from rst import clear_doc
```



---
## merge_domaindata
```python
from rst import merge_domaindata
```



---
## resolve_xref
```python
from rst import resolve_xref
```



---
## resolve_any_xref
```python
from rst import resolve_any_xref
```



---
## get_objects
```python
from rst import get_objects
```



---
## _TranslationProxy
```python
from __init__ import _TranslationProxy
```

The proxy implementation attempts to be as complete as possible, so that
the lazy objects should mostly work as expected, for example for sorting.

---
## init
```python
from __init__ import init
```



---
## init_console
```python
from __init__ import init_console
```

Initialize locale for console.

.. versionadded:: 1.8

---
## get_translator
```python
from __init__ import get_translator
```



---
## is_translator_registered
```python
from __init__ import is_translator_registered
```



---
## get_translation
```python
from __init__ import get_translation
```

Get a translation function based on the *catalog* and *namespace*.

The extension can use this API to translate the messages on the
extension::

    import os
    from sphinx.locale import get_translation

    MESSAGE_CATALOG_NAME = 'myextension'  # name of *.pot, *.po and *.mo files
    _ = get_translation(MESSAGE_CATALOG_NAME)
    text = _('Hello Sphinx!')


    def setup(app):
        package_dir = os.path.abspath(os.path.dirname(__file__))
        locale_dir = os.path.join(package_dir, 'locales')
        app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)

With this code, sphinx searches a message catalog from
``${package_dir}/locales/${language}/LC_MESSAGES/myextension.mo``.
The :confval:`language` is used for the searching.

.. versionadded:: 1.8

---
## __copy__
```python
from __init__ import __copy__
```



---
## __rmod__
```python
from __init__ import __rmod__
```



---
## gettext
```python
from __init__ import gettext
```



---
## __name__
```python
from texinfo import __name__
```

Texinfo builder.

---
## find_subsections
```python
from texinfo import find_subsections
```

Return a list of subsections for the given ``section``.

---
## smart_capwords
```python
from texinfo import smart_capwords
```

Like string.capwords() but does not capitalize words that already
contain a capital letter.

---
## TexinfoWriter
```python
from texinfo import TexinfoWriter
```

Texinfo writer for generating Texinfo documents.

---
## TexinfoTranslator
```python
from texinfo import TexinfoTranslator
```



---
## __init__
```python
from texinfo import __init__
```



---
## translate
```python
from texinfo import translate
```



---
## finish
```python
from texinfo import finish
```



---
## init_settings
```python
from texinfo import init_settings
```



---
## collect_node_names
```python
from texinfo import collect_node_names
```

Generates a unique id for each section.

Assigns the attribute ``node_name`` to each section.

---
## collect_node_menus
```python
from texinfo import collect_node_menus
```

Collect the menu entries for each "node" section.

---
## collect_rellinks
```python
from texinfo import collect_rellinks
```

Collect the relative links (next, previous, up) for each "node".

---
## escape
```python
from texinfo import escape
```

Return a string with Texinfo command characters escaped.

---
## escape_arg
```python
from texinfo import escape_arg
```

Return an escaped string suitable for use as an argument
to a Texinfo command.

---
## escape_id
```python
from texinfo import escape_id
```

Return an escaped string suitable for node names and anchors.

---
## escape_menu
```python
from texinfo import escape_menu
```

Return an escaped string suitable for menu entries.

---
## ensure_eol
```python
from texinfo import ensure_eol
```

Ensure the last line in body is terminated by new line.

---
## format_menu_entry
```python
from texinfo import format_menu_entry
```



---
## add_menu_entries
```python
from texinfo import add_menu_entries
```



---
## add_menu
```python
from texinfo import add_menu
```



---
## tex_image_length
```python
from texinfo import tex_image_length
```



---
## collect_indices
```python
from texinfo import collect_indices
```



---
## collect_footnotes
```python
from texinfo import collect_footnotes
```



---
## get_short_id
```python
from texinfo import get_short_id
```

Return a shorter 'id' associated with ``id``.

---
## add_anchor
```python
from texinfo import add_anchor
```



---
## add_xref
```python
from texinfo import add_xref
```



---
## visit_document
```python
from texinfo import visit_document
```



---
## depart_document
```python
from texinfo import depart_document
```



---
## visit_Text
```python
from texinfo import visit_Text
```



---
## depart_Text
```python
from texinfo import depart_Text
```



---
## visit_section
```python
from texinfo import visit_section
```



---
## depart_section
```python
from texinfo import depart_section
```



---
## visit_title
```python
from texinfo import visit_title
```



---
## depart_title
```python
from texinfo import depart_title
```



---
## visit_rubric
```python
from texinfo import visit_rubric
```



---
## depart_rubric
```python
from texinfo import depart_rubric
```



---
## visit_subtitle
```python
from texinfo import visit_subtitle
```



---
## depart_subtitle
```python
from texinfo import depart_subtitle
```



---
## visit_target
```python
from texinfo import visit_target
```



---
## depart_target
```python
from texinfo import depart_target
```



---
## visit_reference
```python
from texinfo import visit_reference
```



---
## depart_reference
```python
from texinfo import depart_reference
```



---
## visit_number_reference
```python
from texinfo import visit_number_reference
```



---
## visit_title_reference
```python
from texinfo import visit_title_reference
```



---
## visit_paragraph
```python
from texinfo import visit_paragraph
```



---
## depart_paragraph
```python
from texinfo import depart_paragraph
```



---
## visit_block_quote
```python
from texinfo import visit_block_quote
```



---
## depart_block_quote
```python
from texinfo import depart_block_quote
```



---
## visit_literal_block
```python
from texinfo import visit_literal_block
```



---
## depart_literal_block
```python
from texinfo import depart_literal_block
```



---
## visit_line_block
```python
from texinfo import visit_line_block
```



---
## depart_line_block
```python
from texinfo import depart_line_block
```



---
## visit_line
```python
from texinfo import visit_line
```



---
## depart_line
```python
from texinfo import depart_line
```



---
## visit_strong
```python
from texinfo import visit_strong
```



---
## depart_strong
```python
from texinfo import depart_strong
```



---
## visit_emphasis
```python
from texinfo import visit_emphasis
```



---
## depart_emphasis
```python
from texinfo import depart_emphasis
```



---
## is_samp
```python
from texinfo import is_samp
```



---
## visit_literal
```python
from texinfo import visit_literal
```



---
## depart_literal
```python
from texinfo import depart_literal
```



---
## visit_superscript
```python
from texinfo import visit_superscript
```



---
## depart_superscript
```python
from texinfo import depart_superscript
```



---
## visit_subscript
```python
from texinfo import visit_subscript
```



---
## depart_subscript
```python
from texinfo import depart_subscript
```



---
## visit_footnote
```python
from texinfo import visit_footnote
```



---
## visit_collected_footnote
```python
from texinfo import visit_collected_footnote
```



---
## depart_collected_footnote
```python
from texinfo import depart_collected_footnote
```



---
## visit_footnote_reference
```python
from texinfo import visit_footnote_reference
```



---
## visit_citation
```python
from texinfo import visit_citation
```



---
## depart_citation
```python
from texinfo import depart_citation
```



---
## visit_citation_reference
```python
from texinfo import visit_citation_reference
```



---
## depart_citation_reference
```python
from texinfo import depart_citation_reference
```



---
## visit_bullet_list
```python
from texinfo import visit_bullet_list
```



---
## depart_bullet_list
```python
from texinfo import depart_bullet_list
```



---
## visit_enumerated_list
```python
from texinfo import visit_enumerated_list
```



---
## depart_enumerated_list
```python
from texinfo import depart_enumerated_list
```



---
## visit_list_item
```python
from texinfo import visit_list_item
```



---
## depart_list_item
```python
from texinfo import depart_list_item
```



---
## visit_option_list
```python
from texinfo import visit_option_list
```



---
## depart_option_list
```python
from texinfo import depart_option_list
```



---
## visit_option_list_item
```python
from texinfo import visit_option_list_item
```



---
## depart_option_list_item
```python
from texinfo import depart_option_list_item
```



---
## visit_option_group
```python
from texinfo import visit_option_group
```



---
## depart_option_group
```python
from texinfo import depart_option_group
```



---
## visit_option
```python
from texinfo import visit_option
```



---
## depart_option
```python
from texinfo import depart_option
```



---
## visit_option_string
```python
from texinfo import visit_option_string
```



---
## depart_option_string
```python
from texinfo import depart_option_string
```



---
## visit_option_argument
```python
from texinfo import visit_option_argument
```



---
## depart_option_argument
```python
from texinfo import depart_option_argument
```



---
## visit_description
```python
from texinfo import visit_description
```



---
## depart_description
```python
from texinfo import depart_description
```



---
## visit_definition_list
```python
from texinfo import visit_definition_list
```



---
## depart_definition_list
```python
from texinfo import depart_definition_list
```



---
## visit_definition_list_item
```python
from texinfo import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from texinfo import depart_definition_list_item
```



---
## visit_term
```python
from texinfo import visit_term
```



---
## depart_term
```python
from texinfo import depart_term
```



---
## visit_classifier
```python
from texinfo import visit_classifier
```



---
## depart_classifier
```python
from texinfo import depart_classifier
```



---
## visit_definition
```python
from texinfo import visit_definition
```



---
## depart_definition
```python
from texinfo import depart_definition
```



---
## visit_table
```python
from texinfo import visit_table
```



---
## depart_table
```python
from texinfo import depart_table
```



---
## visit_tabular_col_spec
```python
from texinfo import visit_tabular_col_spec
```



---
## depart_tabular_col_spec
```python
from texinfo import depart_tabular_col_spec
```



---
## visit_colspec
```python
from texinfo import visit_colspec
```



---
## depart_colspec
```python
from texinfo import depart_colspec
```



---
## visit_tgroup
```python
from texinfo import visit_tgroup
```



---
## depart_tgroup
```python
from texinfo import depart_tgroup
```



---
## visit_thead
```python
from texinfo import visit_thead
```



---
## depart_thead
```python
from texinfo import depart_thead
```



---
## visit_tbody
```python
from texinfo import visit_tbody
```



---
## depart_tbody
```python
from texinfo import depart_tbody
```



---
## visit_row
```python
from texinfo import visit_row
```



---
## depart_row
```python
from texinfo import depart_row
```



---
## visit_entry
```python
from texinfo import visit_entry
```



---
## depart_entry
```python
from texinfo import depart_entry
```



---
## visit_field_list
```python
from texinfo import visit_field_list
```



---
## depart_field_list
```python
from texinfo import depart_field_list
```



---
## visit_field
```python
from texinfo import visit_field
```



---
## depart_field
```python
from texinfo import depart_field
```



---
## visit_field_name
```python
from texinfo import visit_field_name
```



---
## depart_field_name
```python
from texinfo import depart_field_name
```



---
## visit_field_body
```python
from texinfo import visit_field_body
```



---
## depart_field_body
```python
from texinfo import depart_field_body
```



---
## visit_admonition
```python
from texinfo import visit_admonition
```



---
## _visit_named_admonition
```python
from texinfo import _visit_named_admonition
```



---
## depart_admonition
```python
from texinfo import depart_admonition
```



---
## visit_docinfo
```python
from texinfo import visit_docinfo
```



---
## visit_generated
```python
from texinfo import visit_generated
```



---
## visit_header
```python
from texinfo import visit_header
```



---
## visit_footer
```python
from texinfo import visit_footer
```



---
## visit_container
```python
from texinfo import visit_container
```



---
## depart_container
```python
from texinfo import depart_container
```



---
## visit_decoration
```python
from texinfo import visit_decoration
```



---
## depart_decoration
```python
from texinfo import depart_decoration
```



---
## visit_topic
```python
from texinfo import visit_topic
```



---
## depart_topic
```python
from texinfo import depart_topic
```



---
## visit_transition
```python
from texinfo import visit_transition
```



---
## depart_transition
```python
from texinfo import depart_transition
```



---
## visit_attribution
```python
from texinfo import visit_attribution
```



---
## depart_attribution
```python
from texinfo import depart_attribution
```



---
## visit_raw
```python
from texinfo import visit_raw
```



---
## visit_figure
```python
from texinfo import visit_figure
```



---
## depart_figure
```python
from texinfo import depart_figure
```



---
## visit_caption
```python
from texinfo import visit_caption
```



---
## depart_caption
```python
from texinfo import depart_caption
```



---
## visit_image
```python
from texinfo import visit_image
```



---
## depart_image
```python
from texinfo import depart_image
```



---
## visit_compound
```python
from texinfo import visit_compound
```



---
## depart_compound
```python
from texinfo import depart_compound
```



---
## visit_sidebar
```python
from texinfo import visit_sidebar
```



---
## depart_sidebar
```python
from texinfo import depart_sidebar
```



---
## visit_label
```python
from texinfo import visit_label
```



---
## depart_label
```python
from texinfo import depart_label
```



---
## visit_legend
```python
from texinfo import visit_legend
```



---
## depart_legend
```python
from texinfo import depart_legend
```



---
## visit_substitution_reference
```python
from texinfo import visit_substitution_reference
```



---
## depart_substitution_reference
```python
from texinfo import depart_substitution_reference
```



---
## visit_substitution_definition
```python
from texinfo import visit_substitution_definition
```



---
## visit_system_message
```python
from texinfo import visit_system_message
```



---
## visit_comment
```python
from texinfo import visit_comment
```



---
## visit_problematic
```python
from texinfo import visit_problematic
```



---
## depart_problematic
```python
from texinfo import depart_problematic
```



---
## unimplemented_visit
```python
from texinfo import unimplemented_visit
```



---
## unknown_departure
```python
from texinfo import unknown_departure
```



---
## visit_productionlist
```python
from texinfo import visit_productionlist
```



---
## visit_production
```python
from texinfo import visit_production
```



---
## depart_production
```python
from texinfo import depart_production
```



---
## visit_literal_emphasis
```python
from texinfo import visit_literal_emphasis
```



---
## depart_literal_emphasis
```python
from texinfo import depart_literal_emphasis
```



---
## visit_literal_strong
```python
from texinfo import visit_literal_strong
```



---
## depart_literal_strong
```python
from texinfo import depart_literal_strong
```



---
## visit_index
```python
from texinfo import visit_index
```



---
## visit_versionmodified
```python
from texinfo import visit_versionmodified
```



---
## depart_versionmodified
```python
from texinfo import depart_versionmodified
```



---
## visit_start_of_file
```python
from texinfo import visit_start_of_file
```



---
## depart_start_of_file
```python
from texinfo import depart_start_of_file
```



---
## visit_centered
```python
from texinfo import visit_centered
```



---
## visit_seealso
```python
from texinfo import visit_seealso
```



---
## depart_seealso
```python
from texinfo import depart_seealso
```



---
## visit_meta
```python
from texinfo import visit_meta
```



---
## visit_glossary
```python
from texinfo import visit_glossary
```



---
## depart_glossary
```python
from texinfo import depart_glossary
```



---
## visit_acks
```python
from texinfo import visit_acks
```



---
## visit_desc
```python
from texinfo import visit_desc
```



---
## depart_desc
```python
from texinfo import depart_desc
```



---
## visit_desc_signature
```python
from texinfo import visit_desc_signature
```



---
## depart_desc_signature
```python
from texinfo import depart_desc_signature
```



---
## visit_desc_signature_line
```python
from texinfo import visit_desc_signature_line
```



---
## depart_desc_signature_line
```python
from texinfo import depart_desc_signature_line
```



---
## visit_desc_content
```python
from texinfo import visit_desc_content
```



---
## depart_desc_content
```python
from texinfo import depart_desc_content
```



---
## visit_desc_inline
```python
from texinfo import visit_desc_inline
```



---
## depart_desc_inline
```python
from texinfo import depart_desc_inline
```



---
## visit_desc_name
```python
from texinfo import visit_desc_name
```



---
## depart_desc_name
```python
from texinfo import depart_desc_name
```



---
## visit_desc_addname
```python
from texinfo import visit_desc_addname
```



---
## depart_desc_addname
```python
from texinfo import depart_desc_addname
```



---
## visit_desc_type
```python
from texinfo import visit_desc_type
```



---
## depart_desc_type
```python
from texinfo import depart_desc_type
```



---
## visit_desc_returns
```python
from texinfo import visit_desc_returns
```



---
## depart_desc_returns
```python
from texinfo import depart_desc_returns
```



---
## visit_desc_parameterlist
```python
from texinfo import visit_desc_parameterlist
```



---
## depart_desc_parameterlist
```python
from texinfo import depart_desc_parameterlist
```



---
## visit_desc_type_parameter_list
```python
from texinfo import visit_desc_type_parameter_list
```



---
## depart_desc_type_parameter_list
```python
from texinfo import depart_desc_type_parameter_list
```



---
## visit_desc_parameter
```python
from texinfo import visit_desc_parameter
```



---
## visit_desc_type_parameter
```python
from texinfo import visit_desc_type_parameter
```



---
## visit_desc_optional
```python
from texinfo import visit_desc_optional
```



---
## depart_desc_optional
```python
from texinfo import depart_desc_optional
```



---
## visit_desc_annotation
```python
from texinfo import visit_desc_annotation
```



---
## depart_desc_annotation
```python
from texinfo import depart_desc_annotation
```



---
## visit_inline
```python
from texinfo import visit_inline
```



---
## depart_inline
```python
from texinfo import depart_inline
```



---
## visit_abbreviation
```python
from texinfo import visit_abbreviation
```



---
## depart_abbreviation
```python
from texinfo import depart_abbreviation
```



---
## visit_manpage
```python
from texinfo import visit_manpage
```



---
## depart_manpage
```python
from texinfo import depart_manpage
```



---
## visit_download_reference
```python
from texinfo import visit_download_reference
```



---
## depart_download_reference
```python
from texinfo import depart_download_reference
```



---
## visit_hlist
```python
from texinfo import visit_hlist
```



---
## depart_hlist
```python
from texinfo import depart_hlist
```



---
## visit_hlistcol
```python
from texinfo import visit_hlistcol
```



---
## depart_hlistcol
```python
from texinfo import depart_hlistcol
```



---
## visit_pending_xref
```python
from texinfo import visit_pending_xref
```



---
## depart_pending_xref
```python
from texinfo import depart_pending_xref
```



---
## visit_math
```python
from texinfo import visit_math
```



---
## visit_math_block
```python
from texinfo import visit_math_block
```



---
## add_node_name
```python
from texinfo import add_node_name
```



---
## _add_detailed_menu
```python
from texinfo import _add_detailed_menu
```



---
## generate
```python
from texinfo import generate
```



---
## footnotes_under
```python
from texinfo import footnotes_under
```



---
## ManualPageWriter
```python
from manpage import ManualPageWriter
```



---
## NestedInlineTransform
```python
from manpage import NestedInlineTransform
```

Flatten nested inline nodes:

Before:
    <strong>foo=<emphasis>1</emphasis>
    &bar=<emphasis>2</emphasis></strong>
After:
    <strong>foo=</strong><emphasis>var</emphasis>
    <strong>&bar=</strong><emphasis>2</emphasis>

---
## ManualPageTranslator
```python
from manpage import ManualPageTranslator
```

Custom man page translator.

---
## apply
```python
from manpage import apply
```



---
## visit_start_of_file
```python
from manpage import visit_start_of_file
```



---
## depart_start_of_file
```python
from manpage import depart_start_of_file
```



---
## visit_desc
```python
from manpage import visit_desc
```



---
## depart_desc
```python
from manpage import depart_desc
```



---
## visit_desc_signature
```python
from manpage import visit_desc_signature
```



---
## depart_desc_signature
```python
from manpage import depart_desc_signature
```



---
## visit_desc_signature_line
```python
from manpage import visit_desc_signature_line
```



---
## depart_desc_signature_line
```python
from manpage import depart_desc_signature_line
```



---
## visit_desc_content
```python
from manpage import visit_desc_content
```



---
## depart_desc_content
```python
from manpage import depart_desc_content
```



---
## visit_desc_inline
```python
from manpage import visit_desc_inline
```



---
## depart_desc_inline
```python
from manpage import depart_desc_inline
```



---
## visit_desc_name
```python
from manpage import visit_desc_name
```



---
## depart_desc_name
```python
from manpage import depart_desc_name
```



---
## visit_desc_addname
```python
from manpage import visit_desc_addname
```



---
## depart_desc_addname
```python
from manpage import depart_desc_addname
```



---
## visit_desc_type
```python
from manpage import visit_desc_type
```



---
## depart_desc_type
```python
from manpage import depart_desc_type
```



---
## visit_desc_returns
```python
from manpage import visit_desc_returns
```



---
## depart_desc_returns
```python
from manpage import depart_desc_returns
```



---
## visit_desc_parameterlist
```python
from manpage import visit_desc_parameterlist
```



---
## depart_desc_parameterlist
```python
from manpage import depart_desc_parameterlist
```



---
## visit_desc_type_parameter_list
```python
from manpage import visit_desc_type_parameter_list
```



---
## depart_desc_type_parameter_list
```python
from manpage import depart_desc_type_parameter_list
```



---
## visit_desc_parameter
```python
from manpage import visit_desc_parameter
```



---
## depart_desc_parameter
```python
from manpage import depart_desc_parameter
```



---
## visit_desc_type_parameter
```python
from manpage import visit_desc_type_parameter
```



---
## depart_desc_type_parameter
```python
from manpage import depart_desc_type_parameter
```



---
## visit_desc_optional
```python
from manpage import visit_desc_optional
```



---
## depart_desc_optional
```python
from manpage import depart_desc_optional
```



---
## visit_desc_annotation
```python
from manpage import visit_desc_annotation
```



---
## depart_desc_annotation
```python
from manpage import depart_desc_annotation
```



---
## visit_versionmodified
```python
from manpage import visit_versionmodified
```



---
## depart_versionmodified
```python
from manpage import depart_versionmodified
```



---
## visit_seealso
```python
from manpage import visit_seealso
```



---
## depart_seealso
```python
from manpage import depart_seealso
```



---
## visit_productionlist
```python
from manpage import visit_productionlist
```



---
## visit_production
```python
from manpage import visit_production
```



---
## depart_production
```python
from manpage import depart_production
```



---
## visit_number_reference
```python
from manpage import visit_number_reference
```



---
## visit_centered
```python
from manpage import visit_centered
```



---
## depart_centered
```python
from manpage import depart_centered
```



---
## visit_compact_paragraph
```python
from manpage import visit_compact_paragraph
```



---
## depart_compact_paragraph
```python
from manpage import depart_compact_paragraph
```



---
## visit_download_reference
```python
from manpage import visit_download_reference
```



---
## depart_download_reference
```python
from manpage import depart_download_reference
```



---
## visit_toctree
```python
from manpage import visit_toctree
```



---
## visit_index
```python
from manpage import visit_index
```



---
## visit_tabular_col_spec
```python
from manpage import visit_tabular_col_spec
```



---
## visit_glossary
```python
from manpage import visit_glossary
```



---
## depart_glossary
```python
from manpage import depart_glossary
```



---
## visit_acks
```python
from manpage import visit_acks
```



---
## visit_hlist
```python
from manpage import visit_hlist
```



---
## depart_hlist
```python
from manpage import depart_hlist
```



---
## visit_hlistcol
```python
from manpage import visit_hlistcol
```



---
## depart_hlistcol
```python
from manpage import depart_hlistcol
```



---
## visit_literal_emphasis
```python
from manpage import visit_literal_emphasis
```



---
## depart_literal_emphasis
```python
from manpage import depart_literal_emphasis
```



---
## visit_literal_strong
```python
from manpage import visit_literal_strong
```



---
## depart_literal_strong
```python
from manpage import depart_literal_strong
```



---
## visit_abbreviation
```python
from manpage import visit_abbreviation
```



---
## depart_abbreviation
```python
from manpage import depart_abbreviation
```



---
## visit_manpage
```python
from manpage import visit_manpage
```



---
## depart_manpage
```python
from manpage import depart_manpage
```



---
## visit_meta
```python
from manpage import visit_meta
```



---
## __name__
```python
from html5 import __name__
```

Experimental docutils writers for HTML5 handling Sphinx's custom nodes.

---
## multiply_length
```python
from html5 import multiply_length
```

Multiply *length* (width or height) by *scale*.

---
## HTML5Translator
```python
from html5 import HTML5Translator
```

Our custom HTML translator.

---
## __init__
```python
from html5 import __init__
```



---
## visit_start_of_file
```python
from html5 import visit_start_of_file
```



---
## depart_start_of_file
```python
from html5 import depart_start_of_file
```



---
## visit_desc
```python
from html5 import visit_desc
```



---
## depart_desc
```python
from html5 import depart_desc
```



---
## visit_desc_signature
```python
from html5 import visit_desc_signature
```



---
## depart_desc_signature
```python
from html5 import depart_desc_signature
```



---
## visit_desc_signature_line
```python
from html5 import visit_desc_signature_line
```



---
## depart_desc_signature_line
```python
from html5 import depart_desc_signature_line
```



---
## visit_desc_content
```python
from html5 import visit_desc_content
```



---
## depart_desc_content
```python
from html5 import depart_desc_content
```



---
## visit_desc_inline
```python
from html5 import visit_desc_inline
```



---
## depart_desc_inline
```python
from html5 import depart_desc_inline
```



---
## visit_desc_name
```python
from html5 import visit_desc_name
```



---
## depart_desc_name
```python
from html5 import depart_desc_name
```



---
## visit_desc_addname
```python
from html5 import visit_desc_addname
```



---
## depart_desc_addname
```python
from html5 import depart_desc_addname
```



---
## visit_desc_type
```python
from html5 import visit_desc_type
```



---
## depart_desc_type
```python
from html5 import depart_desc_type
```



---
## visit_desc_returns
```python
from html5 import visit_desc_returns
```



---
## depart_desc_returns
```python
from html5 import depart_desc_returns
```



---
## _visit_sig_parameter_list
```python
from html5 import _visit_sig_parameter_list
```

Visit a signature parameters or type parameters list.

The *parameter_group* value is the type of child nodes acting as required parameters
or as a set of contiguous optional parameters.

---
## _depart_sig_parameter_list
```python
from html5 import _depart_sig_parameter_list
```



---
## visit_desc_parameterlist
```python
from html5 import visit_desc_parameterlist
```



---
## depart_desc_parameterlist
```python
from html5 import depart_desc_parameterlist
```



---
## visit_desc_type_parameter_list
```python
from html5 import visit_desc_type_parameter_list
```



---
## depart_desc_type_parameter_list
```python
from html5 import depart_desc_type_parameter_list
```



---
## visit_desc_parameter
```python
from html5 import visit_desc_parameter
```



---
## depart_desc_parameter
```python
from html5 import depart_desc_parameter
```



---
## visit_desc_type_parameter
```python
from html5 import visit_desc_type_parameter
```



---
## depart_desc_type_parameter
```python
from html5 import depart_desc_type_parameter
```



---
## visit_desc_optional
```python
from html5 import visit_desc_optional
```



---
## depart_desc_optional
```python
from html5 import depart_desc_optional
```



---
## visit_desc_annotation
```python
from html5 import visit_desc_annotation
```



---
## depart_desc_annotation
```python
from html5 import depart_desc_annotation
```



---
## visit_versionmodified
```python
from html5 import visit_versionmodified
```



---
## depart_versionmodified
```python
from html5 import depart_versionmodified
```



---
## visit_reference
```python
from html5 import visit_reference
```



---
## visit_number_reference
```python
from html5 import visit_number_reference
```



---
## depart_number_reference
```python
from html5 import depart_number_reference
```



---
## visit_comment
```python
from html5 import visit_comment
```



---
## visit_admonition
```python
from html5 import visit_admonition
```



---
## depart_admonition
```python
from html5 import depart_admonition
```



---
## visit_seealso
```python
from html5 import visit_seealso
```



---
## depart_seealso
```python
from html5 import depart_seealso
```



---
## get_secnumber
```python
from html5 import get_secnumber
```



---
## add_secnumber
```python
from html5 import add_secnumber
```



---
## add_fignumber
```python
from html5 import add_fignumber
```



---
## add_permalink_ref
```python
from html5 import add_permalink_ref
```



---
## visit_bullet_list
```python
from html5 import visit_bullet_list
```



---
## visit_definition
```python
from html5 import visit_definition
```



---
## depart_definition
```python
from html5 import depart_definition
```



---
## visit_classifier
```python
from html5 import visit_classifier
```



---
## depart_classifier
```python
from html5 import depart_classifier
```



---
## visit_term
```python
from html5 import visit_term
```



---
## depart_term
```python
from html5 import depart_term
```



---
## visit_title
```python
from html5 import visit_title
```



---
## depart_title
```python
from html5 import depart_title
```



---
## visit_rubric
```python
from html5 import visit_rubric
```



---
## depart_rubric
```python
from html5 import depart_rubric
```



---
## visit_literal_block
```python
from html5 import visit_literal_block
```



---
## visit_caption
```python
from html5 import visit_caption
```



---
## depart_caption
```python
from html5 import depart_caption
```



---
## visit_doctest_block
```python
from html5 import visit_doctest_block
```



---
## visit_block_quote
```python
from html5 import visit_block_quote
```



---
## depart_block_quote
```python
from html5 import depart_block_quote
```



---
## visit_literal
```python
from html5 import visit_literal
```



---
## depart_literal
```python
from html5 import depart_literal
```



---
## visit_productionlist
```python
from html5 import visit_productionlist
```



---
## depart_productionlist
```python
from html5 import depart_productionlist
```



---
## visit_production
```python
from html5 import visit_production
```



---
## depart_production
```python
from html5 import depart_production
```



---
## visit_centered
```python
from html5 import visit_centered
```



---
## depart_centered
```python
from html5 import depart_centered
```



---
## visit_compact_paragraph
```python
from html5 import visit_compact_paragraph
```



---
## depart_compact_paragraph
```python
from html5 import depart_compact_paragraph
```



---
## visit_download_reference
```python
from html5 import visit_download_reference
```



---
## depart_download_reference
```python
from html5 import depart_download_reference
```



---
## visit_figure
```python
from html5 import visit_figure
```



---
## visit_image
```python
from html5 import visit_image
```



---
## depart_image
```python
from html5 import depart_image
```



---
## visit_toctree
```python
from html5 import visit_toctree
```



---
## visit_index
```python
from html5 import visit_index
```



---
## visit_tabular_col_spec
```python
from html5 import visit_tabular_col_spec
```



---
## visit_glossary
```python
from html5 import visit_glossary
```



---
## depart_glossary
```python
from html5 import depart_glossary
```



---
## visit_acks
```python
from html5 import visit_acks
```



---
## depart_acks
```python
from html5 import depart_acks
```



---
## visit_hlist
```python
from html5 import visit_hlist
```



---
## depart_hlist
```python
from html5 import depart_hlist
```



---
## visit_hlistcol
```python
from html5 import visit_hlistcol
```



---
## depart_hlistcol
```python
from html5 import depart_hlistcol
```



---
## visit_Text
```python
from html5 import visit_Text
```



---
## visit_note
```python
from html5 import visit_note
```



---
## depart_note
```python
from html5 import depart_note
```



---
## visit_warning
```python
from html5 import visit_warning
```



---
## depart_warning
```python
from html5 import depart_warning
```



---
## visit_attention
```python
from html5 import visit_attention
```



---
## depart_attention
```python
from html5 import depart_attention
```



---
## visit_caution
```python
from html5 import visit_caution
```



---
## depart_caution
```python
from html5 import depart_caution
```



---
## visit_danger
```python
from html5 import visit_danger
```



---
## depart_danger
```python
from html5 import depart_danger
```



---
## visit_error
```python
from html5 import visit_error
```



---
## depart_error
```python
from html5 import depart_error
```



---
## visit_hint
```python
from html5 import visit_hint
```



---
## depart_hint
```python
from html5 import depart_hint
```



---
## visit_important
```python
from html5 import visit_important
```



---
## depart_important
```python
from html5 import depart_important
```



---
## visit_tip
```python
from html5 import visit_tip
```



---
## depart_tip
```python
from html5 import depart_tip
```



---
## visit_literal_emphasis
```python
from html5 import visit_literal_emphasis
```



---
## depart_literal_emphasis
```python
from html5 import depart_literal_emphasis
```



---
## visit_literal_strong
```python
from html5 import visit_literal_strong
```



---
## depart_literal_strong
```python
from html5 import depart_literal_strong
```



---
## visit_abbreviation
```python
from html5 import visit_abbreviation
```



---
## depart_abbreviation
```python
from html5 import depart_abbreviation
```



---
## visit_manpage
```python
from html5 import visit_manpage
```



---
## depart_manpage
```python
from html5 import depart_manpage
```



---
## visit_table
```python
from html5 import visit_table
```



---
## depart_table
```python
from html5 import depart_table
```



---
## visit_row
```python
from html5 import visit_row
```



---
## visit_field_list
```python
from html5 import visit_field_list
```



---
## depart_field_list
```python
from html5 import depart_field_list
```



---
## visit_field
```python
from html5 import visit_field
```



---
## visit_math
```python
from html5 import visit_math
```



---
## depart_math
```python
from html5 import depart_math
```



---
## visit_math_block
```python
from html5 import visit_math_block
```



---
## depart_math_block
```python
from html5 import depart_math_block
```



---
## visit_footnote_reference
```python
from html5 import visit_footnote_reference
```



---
## append_fignumber
```python
from html5 import append_fignumber
```



---
## HTMLWriter
```python
from html import HTMLWriter
```



---
## translate
```python
from html import translate
```



---
## __name__
```python
from xml import __name__
```

:mod:`pandas.io.formats.xml` is a module for formatting data in XML.

---
## XMLWriter
```python
from xml import XMLWriter
```



---
## PseudoXMLWriter
```python
from xml import PseudoXMLWriter
```



---
## __init__
```python
from xml import __init__
```



---
## translate
```python
from xml import translate
```



---
## supports
```python
from xml import supports
```

All format-specific elements are supported.

---
## Cell
```python
from text import Cell
```

Represents a cell in a table.
It can span multiple columns or multiple lines.

---
## Table
```python
from text import Table
```

Represents a table, handling cells that can span multiple lines
or rows, like::

   +-----------+-----+
   | AAA       | BBB |
   +-----+-----+     |
   |     | XXX |     |
   |     +-----+-----+
   | DDD | CCC       |
   +-----+-----------+

This class can be used in two ways, either:

- With absolute positions: call ``table[line, col] = Cell(...)``,
  this overwrites any existing cell(s) at these positions.

- With relative positions: call the ``add_row()`` and
  ``add_cell(Cell(...))`` as needed.

Cells spanning multiple rows or multiple columns (having a
colspan or rowspan greater than one) are automatically referenced
by all the table cells they cover. This is a useful
representation as we can simply check
``if self[x, y] is self[x, y+1]`` to recognize a rowspan.

Colwidth is not automatically computed, it has to be given, either
at construction time, or during the table construction.

Example usage::

   table = Table([6, 6])
   table.add_cell(Cell("foo"))
   table.add_cell(Cell("bar"))
   table.set_separator()
   table.add_row()
   table.add_cell(Cell("FOO"))
   table.add_cell(Cell("BAR"))
   print(table)
   +--------+--------+
   | foo    | bar    |
   |========|========|
   | FOO    | BAR    |
   +--------+--------+

---
## TextWrapper
```python
from text import TextWrapper
```

Custom subclass that uses a different word separator regex.

---
## my_wrap
```python
from text import my_wrap
```



---
## TextWriter
```python
from text import TextWriter
```



---
## TextTranslator
```python
from text import TextTranslator
```



---
## __hash__
```python
from text import __hash__
```



---
## add_row
```python
from text import add_row
```

Add a row to the table, to use with ``add_cell()``.  It is not needed
to call ``add_row()`` before the first ``add_cell()``.

---
## set_separator
```python
from text import set_separator
```

Sets the separator below the current line.

---
## add_cell
```python
from text import add_cell
```

Add a cell to the current line, to use with ``add_row()``.  To add
a cell spanning multiple lines or rows, simply set the
``cell.colspan`` or ``cell.rowspan`` BEFORE inserting it into
the table.

---
## __setitem__
```python
from text import __setitem__
```



---
## _ensure_has_line
```python
from text import _ensure_has_line
```



---
## _ensure_has_column
```python
from text import _ensure_has_column
```



---
## cell_width
```python
from text import cell_width
```

Give the cell width, according to the given source (either
``self.colwidth`` or ``self.measured_widths``).
This takes into account cells spanning multiple columns.

---
## cells
```python
from text import cells
```



---
## rewrap
```python
from text import rewrap
```

Call ``cell.wrap()`` on all cells, and measure each column width
after wrapping (result written in ``self.measured_widths``).

---
## physical_lines_for_line
```python
from text import physical_lines_for_line
```

For a given line, compute the number of physical lines it spans
due to text wrapping.

---
## _wrap_chunks
```python
from text import _wrap_chunks
```

The original _wrap_chunks uses len() to calculate width.

This method respects wide/fullwidth characters for width adjustment.

---
## _break_word
```python
from text import _break_word
```

Break line by unicode width instead of len(word).

---
## _split
```python
from text import _split
```

Override original method that only split by 'wordsep_re'.

This '_split' splits wide-characters into chunks by one character.

---
## _handle_long_word
```python
from text import _handle_long_word
```

Override original method for using self._break_word() instead of slice.

---
## translate
```python
from text import translate
```



---
## add_text
```python
from text import add_text
```



---
## new_state
```python
from text import new_state
```



---
## end_state
```python
from text import end_state
```



---
## visit_document
```python
from text import visit_document
```



---
## depart_document
```python
from text import depart_document
```



---
## visit_section
```python
from text import visit_section
```



---
## depart_section
```python
from text import depart_section
```



---
## visit_topic
```python
from text import visit_topic
```



---
## depart_topic
```python
from text import depart_topic
```



---
## visit_rubric
```python
from text import visit_rubric
```



---
## depart_rubric
```python
from text import depart_rubric
```



---
## visit_compound
```python
from text import visit_compound
```



---
## depart_compound
```python
from text import depart_compound
```



---
## visit_glossary
```python
from text import visit_glossary
```



---
## depart_glossary
```python
from text import depart_glossary
```



---
## visit_title
```python
from text import visit_title
```



---
## get_section_number_string
```python
from text import get_section_number_string
```



---
## depart_title
```python
from text import depart_title
```



---
## visit_subtitle
```python
from text import visit_subtitle
```



---
## depart_subtitle
```python
from text import depart_subtitle
```



---
## visit_attribution
```python
from text import visit_attribution
```



---
## depart_attribution
```python
from text import depart_attribution
```



---
## visit_desc
```python
from text import visit_desc
```



---
## depart_desc
```python
from text import depart_desc
```



---
## visit_desc_signature
```python
from text import visit_desc_signature
```



---
## depart_desc_signature
```python
from text import depart_desc_signature
```



---
## visit_desc_signature_line
```python
from text import visit_desc_signature_line
```



---
## depart_desc_signature_line
```python
from text import depart_desc_signature_line
```



---
## visit_desc_content
```python
from text import visit_desc_content
```



---
## depart_desc_content
```python
from text import depart_desc_content
```



---
## visit_desc_inline
```python
from text import visit_desc_inline
```



---
## depart_desc_inline
```python
from text import depart_desc_inline
```



---
## visit_desc_name
```python
from text import visit_desc_name
```



---
## depart_desc_name
```python
from text import depart_desc_name
```



---
## visit_desc_addname
```python
from text import visit_desc_addname
```



---
## depart_desc_addname
```python
from text import depart_desc_addname
```



---
## visit_desc_type
```python
from text import visit_desc_type
```



---
## depart_desc_type
```python
from text import depart_desc_type
```



---
## visit_desc_returns
```python
from text import visit_desc_returns
```



---
## depart_desc_returns
```python
from text import depart_desc_returns
```



---
## _visit_sig_parameter_list
```python
from text import _visit_sig_parameter_list
```

Visit a signature parameters or type parameters list.

The *parameter_group* value is the type of a child node acting as a required parameter
or as a set of contiguous optional parameters.

---
## _depart_sig_parameter_list
```python
from text import _depart_sig_parameter_list
```



---
## visit_desc_parameterlist
```python
from text import visit_desc_parameterlist
```



---
## depart_desc_parameterlist
```python
from text import depart_desc_parameterlist
```



---
## visit_desc_type_parameter_list
```python
from text import visit_desc_type_parameter_list
```



---
## depart_desc_type_parameter_list
```python
from text import depart_desc_type_parameter_list
```



---
## visit_desc_parameter
```python
from text import visit_desc_parameter
```



---
## visit_desc_type_parameter
```python
from text import visit_desc_type_parameter
```



---
## visit_desc_optional
```python
from text import visit_desc_optional
```



---
## depart_desc_optional
```python
from text import depart_desc_optional
```



---
## visit_desc_annotation
```python
from text import visit_desc_annotation
```



---
## depart_desc_annotation
```python
from text import depart_desc_annotation
```



---
## visit_figure
```python
from text import visit_figure
```



---
## depart_figure
```python
from text import depart_figure
```



---
## visit_caption
```python
from text import visit_caption
```



---
## depart_caption
```python
from text import depart_caption
```



---
## visit_productionlist
```python
from text import visit_productionlist
```



---
## visit_footnote
```python
from text import visit_footnote
```



---
## depart_footnote
```python
from text import depart_footnote
```



---
## visit_citation
```python
from text import visit_citation
```



---
## depart_citation
```python
from text import depart_citation
```



---
## visit_label
```python
from text import visit_label
```



---
## visit_legend
```python
from text import visit_legend
```



---
## depart_legend
```python
from text import depart_legend
```



---
## visit_option_list
```python
from text import visit_option_list
```



---
## depart_option_list
```python
from text import depart_option_list
```



---
## visit_option_list_item
```python
from text import visit_option_list_item
```



---
## depart_option_list_item
```python
from text import depart_option_list_item
```



---
## visit_option_group
```python
from text import visit_option_group
```



---
## depart_option_group
```python
from text import depart_option_group
```



---
## visit_option
```python
from text import visit_option
```



---
## depart_option
```python
from text import depart_option
```



---
## visit_option_string
```python
from text import visit_option_string
```



---
## depart_option_string
```python
from text import depart_option_string
```



---
## visit_option_argument
```python
from text import visit_option_argument
```



---
## depart_option_argument
```python
from text import depart_option_argument
```



---
## visit_description
```python
from text import visit_description
```



---
## depart_description
```python
from text import depart_description
```



---
## visit_tabular_col_spec
```python
from text import visit_tabular_col_spec
```



---
## visit_colspec
```python
from text import visit_colspec
```



---
## visit_tgroup
```python
from text import visit_tgroup
```



---
## depart_tgroup
```python
from text import depart_tgroup
```



---
## visit_thead
```python
from text import visit_thead
```



---
## depart_thead
```python
from text import depart_thead
```



---
## visit_tbody
```python
from text import visit_tbody
```



---
## depart_tbody
```python
from text import depart_tbody
```



---
## visit_row
```python
from text import visit_row
```



---
## depart_row
```python
from text import depart_row
```



---
## visit_entry
```python
from text import visit_entry
```



---
## depart_entry
```python
from text import depart_entry
```



---
## visit_table
```python
from text import visit_table
```



---
## depart_table
```python
from text import depart_table
```



---
## visit_acks
```python
from text import visit_acks
```



---
## visit_image
```python
from text import visit_image
```



---
## visit_transition
```python
from text import visit_transition
```



---
## visit_bullet_list
```python
from text import visit_bullet_list
```



---
## depart_bullet_list
```python
from text import depart_bullet_list
```



---
## visit_enumerated_list
```python
from text import visit_enumerated_list
```



---
## depart_enumerated_list
```python
from text import depart_enumerated_list
```



---
## visit_definition_list
```python
from text import visit_definition_list
```



---
## depart_definition_list
```python
from text import depart_definition_list
```



---
## visit_list_item
```python
from text import visit_list_item
```



---
## depart_list_item
```python
from text import depart_list_item
```



---
## visit_definition_list_item
```python
from text import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from text import depart_definition_list_item
```



---
## visit_term
```python
from text import visit_term
```



---
## depart_term
```python
from text import depart_term
```



---
## visit_classifier
```python
from text import visit_classifier
```



---
## depart_classifier
```python
from text import depart_classifier
```



---
## visit_definition
```python
from text import visit_definition
```



---
## depart_definition
```python
from text import depart_definition
```



---
## visit_field_list
```python
from text import visit_field_list
```



---
## depart_field_list
```python
from text import depart_field_list
```



---
## visit_field
```python
from text import visit_field
```



---
## depart_field
```python
from text import depart_field
```



---
## visit_field_name
```python
from text import visit_field_name
```



---
## depart_field_name
```python
from text import depart_field_name
```



---
## visit_field_body
```python
from text import visit_field_body
```



---
## depart_field_body
```python
from text import depart_field_body
```



---
## visit_centered
```python
from text import visit_centered
```



---
## depart_centered
```python
from text import depart_centered
```



---
## visit_hlist
```python
from text import visit_hlist
```



---
## depart_hlist
```python
from text import depart_hlist
```



---
## visit_hlistcol
```python
from text import visit_hlistcol
```



---
## depart_hlistcol
```python
from text import depart_hlistcol
```



---
## visit_admonition
```python
from text import visit_admonition
```



---
## depart_admonition
```python
from text import depart_admonition
```



---
## _visit_admonition
```python
from text import _visit_admonition
```



---
## _depart_admonition
```python
from text import _depart_admonition
```



---
## visit_versionmodified
```python
from text import visit_versionmodified
```



---
## depart_versionmodified
```python
from text import depart_versionmodified
```



---
## visit_literal_block
```python
from text import visit_literal_block
```



---
## depart_literal_block
```python
from text import depart_literal_block
```



---
## visit_doctest_block
```python
from text import visit_doctest_block
```



---
## depart_doctest_block
```python
from text import depart_doctest_block
```



---
## visit_line_block
```python
from text import visit_line_block
```



---
## depart_line_block
```python
from text import depart_line_block
```



---
## visit_line
```python
from text import visit_line
```



---
## depart_line
```python
from text import depart_line
```



---
## visit_block_quote
```python
from text import visit_block_quote
```



---
## depart_block_quote
```python
from text import depart_block_quote
```



---
## visit_compact_paragraph
```python
from text import visit_compact_paragraph
```



---
## depart_compact_paragraph
```python
from text import depart_compact_paragraph
```



---
## visit_paragraph
```python
from text import visit_paragraph
```



---
## depart_paragraph
```python
from text import depart_paragraph
```



---
## visit_target
```python
from text import visit_target
```



---
## visit_index
```python
from text import visit_index
```



---
## visit_toctree
```python
from text import visit_toctree
```



---
## visit_substitution_definition
```python
from text import visit_substitution_definition
```



---
## visit_pending_xref
```python
from text import visit_pending_xref
```



---
## depart_pending_xref
```python
from text import depart_pending_xref
```



---
## visit_reference
```python
from text import visit_reference
```



---
## depart_reference
```python
from text import depart_reference
```



---
## visit_number_reference
```python
from text import visit_number_reference
```



---
## visit_download_reference
```python
from text import visit_download_reference
```



---
## depart_download_reference
```python
from text import depart_download_reference
```



---
## visit_emphasis
```python
from text import visit_emphasis
```



---
## depart_emphasis
```python
from text import depart_emphasis
```



---
## visit_literal_emphasis
```python
from text import visit_literal_emphasis
```



---
## depart_literal_emphasis
```python
from text import depart_literal_emphasis
```



---
## visit_strong
```python
from text import visit_strong
```



---
## depart_strong
```python
from text import depart_strong
```



---
## visit_literal_strong
```python
from text import visit_literal_strong
```



---
## depart_literal_strong
```python
from text import depart_literal_strong
```



---
## visit_abbreviation
```python
from text import visit_abbreviation
```



---
## depart_abbreviation
```python
from text import depart_abbreviation
```



---
## visit_manpage
```python
from text import visit_manpage
```



---
## depart_manpage
```python
from text import depart_manpage
```



---
## visit_title_reference
```python
from text import visit_title_reference
```



---
## depart_title_reference
```python
from text import depart_title_reference
```



---
## visit_literal
```python
from text import visit_literal
```



---
## depart_literal
```python
from text import depart_literal
```



---
## visit_subscript
```python
from text import visit_subscript
```



---
## depart_subscript
```python
from text import depart_subscript
```



---
## visit_superscript
```python
from text import visit_superscript
```



---
## depart_superscript
```python
from text import depart_superscript
```



---
## visit_footnote_reference
```python
from text import visit_footnote_reference
```



---
## visit_citation_reference
```python
from text import visit_citation_reference
```



---
## visit_Text
```python
from text import visit_Text
```



---
## depart_Text
```python
from text import depart_Text
```



---
## visit_generated
```python
from text import visit_generated
```



---
## depart_generated
```python
from text import depart_generated
```



---
## visit_inline
```python
from text import visit_inline
```



---
## depart_inline
```python
from text import depart_inline
```



---
## visit_container
```python
from text import visit_container
```



---
## depart_container
```python
from text import depart_container
```



---
## visit_problematic
```python
from text import visit_problematic
```



---
## depart_problematic
```python
from text import depart_problematic
```



---
## visit_system_message
```python
from text import visit_system_message
```



---
## visit_comment
```python
from text import visit_comment
```



---
## visit_meta
```python
from text import visit_meta
```



---
## visit_raw
```python
from text import visit_raw
```



---
## visit_math
```python
from text import visit_math
```



---
## depart_math
```python
from text import depart_math
```



---
## visit_math_block
```python
from text import visit_math_block
```



---
## depart_math_block
```python
from text import depart_math_block
```



---
## writesep
```python
from text import writesep
```

Called on the line *before* lineno.
Called with no *lineno* for the last sep.

---
## do_format
```python
from text import do_format
```



---
## collected_footnote
```python
from latex import collected_footnote
```

Footnotes that are collected are assigned this class.

---
## UnsupportedError
```python
from latex import UnsupportedError
```



---
## LaTeXWriter
```python
from latex import LaTeXWriter
```



---
## Table
```python
from latex import Table
```

A table data

---
## TableCell
```python
from latex import TableCell
```

Data of a cell in a table.

---
## escape_abbr
```python
from latex import escape_abbr
```

Adjust spacing after abbreviations.

---
## rstdim_to_latexdim
```python
from latex import rstdim_to_latexdim
```

Convert `width_str` with rst length to LaTeX length.

---
## LaTeXTranslator
```python
from latex import LaTeXTranslator
```



---
## translate
```python
from latex import translate
```



---
## is_longtable
```python
from latex import is_longtable
```

True if and only if table uses longtable environment.

---
## get_table_type
```python
from latex import get_table_type
```

Returns the LaTeX environment name for the table.

The class currently supports:

* longtable
* tabular
* tabulary

---
## get_colspec
```python
from latex import get_colspec
```

Returns a column spec of table.

This is what LaTeX calls the 'preamble argument' of the used table environment.

.. note::

   The ``\\X`` and ``T`` column type specifiers are defined in
   ``sphinxlatextables.sty``.

---
## add_cell
```python
from latex import add_cell
```

Adds a new cell to a table.

It will be located at current position: (``self.row``, ``self.col``).

---
## cell
```python
from latex import cell
```

Returns a cell object (i.e. rectangular area) containing given position.

If no option arguments: ``row`` or ``col`` are given, the current position;
``self.row`` and ``self.col`` are used to get a cell object by default.

---
## width
```python
from latex import width
```

Returns the cell width.

---
## height
```python
from latex import height
```

Returns the cell height.

---
## pushbody
```python
from latex import pushbody
```



---
## popbody
```python
from latex import popbody
```



---
## astext
```python
from latex import astext
```



---
## hypertarget
```python
from latex import hypertarget
```



---
## hypertarget_to
```python
from latex import hypertarget_to
```



---
## hyperlink
```python
from latex import hyperlink
```



---
## hyperpageref
```python
from latex import hyperpageref
```



---
## escape
```python
from latex import escape
```



---
## idescape
```python
from latex import idescape
```



---
## babel_renewcommand
```python
from latex import babel_renewcommand
```



---
## generate_indices
```python
from latex import generate_indices
```



---
## render
```python
from latex import render
```



---
## table
```python
from latex import table
```

Get current table.

---
## visit_document
```python
from latex import visit_document
```



---
## depart_document
```python
from latex import depart_document
```



---
## visit_start_of_file
```python
from latex import visit_start_of_file
```



---
## depart_start_of_file
```python
from latex import depart_start_of_file
```



---
## visit_section
```python
from latex import visit_section
```



---
## depart_section
```python
from latex import depart_section
```



---
## visit_problematic
```python
from latex import visit_problematic
```



---
## depart_problematic
```python
from latex import depart_problematic
```



---
## visit_topic
```python
from latex import visit_topic
```



---
## depart_topic
```python
from latex import depart_topic
```



---
## visit_glossary
```python
from latex import visit_glossary
```



---
## depart_glossary
```python
from latex import depart_glossary
```



---
## visit_productionlist
```python
from latex import visit_productionlist
```



---
## depart_productionlist
```python
from latex import depart_productionlist
```



---
## visit_production
```python
from latex import visit_production
```



---
## depart_production
```python
from latex import depart_production
```



---
## visit_transition
```python
from latex import visit_transition
```



---
## depart_transition
```python
from latex import depart_transition
```



---
## visit_title
```python
from latex import visit_title
```



---
## depart_title
```python
from latex import depart_title
```



---
## visit_subtitle
```python
from latex import visit_subtitle
```



---
## depart_subtitle
```python
from latex import depart_subtitle
```



---
## visit_desc
```python
from latex import visit_desc
```



---
## depart_desc
```python
from latex import depart_desc
```



---
## _visit_signature_line
```python
from latex import _visit_signature_line
```



---
## _depart_signature_line
```python
from latex import _depart_signature_line
```



---
## visit_desc_signature
```python
from latex import visit_desc_signature
```



---
## depart_desc_signature
```python
from latex import depart_desc_signature
```



---
## visit_desc_signature_line
```python
from latex import visit_desc_signature_line
```



---
## depart_desc_signature_line
```python
from latex import depart_desc_signature_line
```



---
## visit_desc_content
```python
from latex import visit_desc_content
```



---
## depart_desc_content
```python
from latex import depart_desc_content
```



---
## visit_desc_inline
```python
from latex import visit_desc_inline
```



---
## depart_desc_inline
```python
from latex import depart_desc_inline
```



---
## visit_desc_name
```python
from latex import visit_desc_name
```



---
## depart_desc_name
```python
from latex import depart_desc_name
```



---
## visit_desc_addname
```python
from latex import visit_desc_addname
```



---
## depart_desc_addname
```python
from latex import depart_desc_addname
```



---
## visit_desc_type
```python
from latex import visit_desc_type
```



---
## depart_desc_type
```python
from latex import depart_desc_type
```



---
## visit_desc_returns
```python
from latex import visit_desc_returns
```



---
## depart_desc_returns
```python
from latex import depart_desc_returns
```



---
## _visit_sig_parameter_list
```python
from latex import _visit_sig_parameter_list
```

Visit a signature parameters or type parameters list.

The *parameter_group* value is the type of a child node acting as a required parameter
or as a set of contiguous optional parameters.

The caller is responsible for closing adding surrounding LaTeX macro argument start
and stop tokens.

---
## visit_desc_parameterlist
```python
from latex import visit_desc_parameterlist
```



---
## depart_desc_parameterlist
```python
from latex import depart_desc_parameterlist
```



---
## visit_desc_type_parameter_list
```python
from latex import visit_desc_type_parameter_list
```



---
## depart_desc_type_parameter_list
```python
from latex import depart_desc_type_parameter_list
```



---
## _visit_sig_parameter
```python
from latex import _visit_sig_parameter
```



---
## _depart_sig_parameter
```python
from latex import _depart_sig_parameter
```



---
## visit_desc_parameter
```python
from latex import visit_desc_parameter
```



---
## depart_desc_parameter
```python
from latex import depart_desc_parameter
```



---
## visit_desc_type_parameter
```python
from latex import visit_desc_type_parameter
```



---
## depart_desc_type_parameter
```python
from latex import depart_desc_type_parameter
```



---
## visit_desc_optional
```python
from latex import visit_desc_optional
```



---
## depart_desc_optional
```python
from latex import depart_desc_optional
```



---
## visit_desc_annotation
```python
from latex import visit_desc_annotation
```



---
## depart_desc_annotation
```python
from latex import depart_desc_annotation
```



---
## visit_seealso
```python
from latex import visit_seealso
```



---
## depart_seealso
```python
from latex import depart_seealso
```



---
## visit_rubric
```python
from latex import visit_rubric
```



---
## depart_rubric
```python
from latex import depart_rubric
```



---
## visit_footnote
```python
from latex import visit_footnote
```



---
## depart_footnote
```python
from latex import depart_footnote
```



---
## visit_label
```python
from latex import visit_label
```



---
## visit_tabular_col_spec
```python
from latex import visit_tabular_col_spec
```



---
## visit_table
```python
from latex import visit_table
```



---
## depart_table
```python
from latex import depart_table
```



---
## visit_colspec
```python
from latex import visit_colspec
```



---
## depart_colspec
```python
from latex import depart_colspec
```



---
## visit_tgroup
```python
from latex import visit_tgroup
```



---
## depart_tgroup
```python
from latex import depart_tgroup
```



---
## visit_thead
```python
from latex import visit_thead
```



---
## depart_thead
```python
from latex import depart_thead
```



---
## visit_tbody
```python
from latex import visit_tbody
```



---
## depart_tbody
```python
from latex import depart_tbody
```



---
## visit_row
```python
from latex import visit_row
```



---
## depart_row
```python
from latex import depart_row
```



---
## visit_entry
```python
from latex import visit_entry
```



---
## depart_entry
```python
from latex import depart_entry
```



---
## visit_acks
```python
from latex import visit_acks
```



---
## visit_bullet_list
```python
from latex import visit_bullet_list
```



---
## depart_bullet_list
```python
from latex import depart_bullet_list
```



---
## visit_enumerated_list
```python
from latex import visit_enumerated_list
```



---
## depart_enumerated_list
```python
from latex import depart_enumerated_list
```



---
## visit_list_item
```python
from latex import visit_list_item
```



---
## depart_list_item
```python
from latex import depart_list_item
```



---
## visit_definition_list
```python
from latex import visit_definition_list
```



---
## depart_definition_list
```python
from latex import depart_definition_list
```



---
## visit_definition_list_item
```python
from latex import visit_definition_list_item
```



---
## depart_definition_list_item
```python
from latex import depart_definition_list_item
```



---
## visit_term
```python
from latex import visit_term
```



---
## depart_term
```python
from latex import depart_term
```



---
## visit_classifier
```python
from latex import visit_classifier
```



---
## depart_classifier
```python
from latex import depart_classifier
```



---
## visit_definition
```python
from latex import visit_definition
```



---
## depart_definition
```python
from latex import depart_definition
```



---
## visit_field_list
```python
from latex import visit_field_list
```



---
## depart_field_list
```python
from latex import depart_field_list
```



---
## visit_field
```python
from latex import visit_field
```



---
## depart_field
```python
from latex import depart_field
```



---
## visit_paragraph
```python
from latex import visit_paragraph
```



---
## depart_paragraph
```python
from latex import depart_paragraph
```



---
## visit_centered
```python
from latex import visit_centered
```



---
## depart_centered
```python
from latex import depart_centered
```



---
## visit_hlist
```python
from latex import visit_hlist
```



---
## depart_hlist
```python
from latex import depart_hlist
```



---
## visit_hlistcol
```python
from latex import visit_hlistcol
```



---
## depart_hlistcol
```python
from latex import depart_hlistcol
```



---
## latex_image_length
```python
from latex import latex_image_length
```



---
## is_inline
```python
from latex import is_inline
```

Check whether a node represents an inline element.

---
## visit_image
```python
from latex import visit_image
```



---
## depart_image
```python
from latex import depart_image
```



---
## visit_figure
```python
from latex import visit_figure
```



---
## depart_figure
```python
from latex import depart_figure
```



---
## visit_caption
```python
from latex import visit_caption
```



---
## depart_caption
```python
from latex import depart_caption
```



---
## visit_legend
```python
from latex import visit_legend
```



---
## depart_legend
```python
from latex import depart_legend
```



---
## visit_admonition
```python
from latex import visit_admonition
```



---
## depart_admonition
```python
from latex import depart_admonition
```



---
## _visit_named_admonition
```python
from latex import _visit_named_admonition
```



---
## _depart_named_admonition
```python
from latex import _depart_named_admonition
```



---
## visit_versionmodified
```python
from latex import visit_versionmodified
```



---
## depart_versionmodified
```python
from latex import depart_versionmodified
```



---
## visit_target
```python
from latex import visit_target
```



---
## depart_target
```python
from latex import depart_target
```



---
## visit_attribution
```python
from latex import visit_attribution
```



---
## depart_attribution
```python
from latex import depart_attribution
```



---
## visit_index
```python
from latex import visit_index
```



---
## visit_raw
```python
from latex import visit_raw
```



---
## visit_reference
```python
from latex import visit_reference
```



---
## depart_reference
```python
from latex import depart_reference
```



---
## visit_number_reference
```python
from latex import visit_number_reference
```



---
## visit_download_reference
```python
from latex import visit_download_reference
```



---
## depart_download_reference
```python
from latex import depart_download_reference
```



---
## visit_pending_xref
```python
from latex import visit_pending_xref
```



---
## depart_pending_xref
```python
from latex import depart_pending_xref
```



---
## visit_emphasis
```python
from latex import visit_emphasis
```



---
## depart_emphasis
```python
from latex import depart_emphasis
```



---
## visit_literal_emphasis
```python
from latex import visit_literal_emphasis
```



---
## depart_literal_emphasis
```python
from latex import depart_literal_emphasis
```



---
## visit_strong
```python
from latex import visit_strong
```



---
## depart_strong
```python
from latex import depart_strong
```



---
## visit_literal_strong
```python
from latex import visit_literal_strong
```



---
## depart_literal_strong
```python
from latex import depart_literal_strong
```



---
## visit_abbreviation
```python
from latex import visit_abbreviation
```



---
## depart_abbreviation
```python
from latex import depart_abbreviation
```



---
## visit_manpage
```python
from latex import visit_manpage
```



---
## depart_manpage
```python
from latex import depart_manpage
```



---
## visit_title_reference
```python
from latex import visit_title_reference
```



---
## depart_title_reference
```python
from latex import depart_title_reference
```



---
## visit_thebibliography
```python
from latex import visit_thebibliography
```



---
## depart_thebibliography
```python
from latex import depart_thebibliography
```



---
## visit_citation
```python
from latex import visit_citation
```



---
## depart_citation
```python
from latex import depart_citation
```



---
## visit_citation_reference
```python
from latex import visit_citation_reference
```



---
## depart_citation_reference
```python
from latex import depart_citation_reference
```



---
## visit_literal
```python
from latex import visit_literal
```



---
## depart_literal
```python
from latex import depart_literal
```



---
## visit_footnote_reference
```python
from latex import visit_footnote_reference
```



---
## visit_footnotemark
```python
from latex import visit_footnotemark
```



---
## depart_footnotemark
```python
from latex import depart_footnotemark
```



---
## visit_footnotetext
```python
from latex import visit_footnotetext
```



---
## depart_footnotetext
```python
from latex import depart_footnotetext
```



---
## visit_captioned_literal_block
```python
from latex import visit_captioned_literal_block
```



---
## depart_captioned_literal_block
```python
from latex import depart_captioned_literal_block
```



---
## visit_literal_block
```python
from latex import visit_literal_block
```



---
## depart_literal_block
```python
from latex import depart_literal_block
```



---
## visit_line
```python
from latex import visit_line
```



---
## depart_line
```python
from latex import depart_line
```



---
## visit_line_block
```python
from latex import visit_line_block
```



---
## depart_line_block
```python
from latex import depart_line_block
```



---
## visit_block_quote
```python
from latex import visit_block_quote
```



---
## depart_block_quote
```python
from latex import depart_block_quote
```



---
## visit_option
```python
from latex import visit_option
```



---
## depart_option
```python
from latex import depart_option
```



---
## visit_option_argument
```python
from latex import visit_option_argument
```

The delimiter between an option and its argument.

---
## depart_option_argument
```python
from latex import depart_option_argument
```



---
## visit_option_group
```python
from latex import visit_option_group
```



---
## depart_option_group
```python
from latex import depart_option_group
```



---
## visit_option_list
```python
from latex import visit_option_list
```



---
## depart_option_list
```python
from latex import depart_option_list
```



---
## visit_option_list_item
```python
from latex import visit_option_list_item
```



---
## depart_option_list_item
```python
from latex import depart_option_list_item
```



---
## visit_option_string
```python
from latex import visit_option_string
```



---
## visit_description
```python
from latex import visit_description
```



---
## depart_description
```python
from latex import depart_description
```



---
## visit_superscript
```python
from latex import visit_superscript
```



---
## depart_superscript
```python
from latex import depart_superscript
```



---
## visit_subscript
```python
from latex import visit_subscript
```



---
## depart_subscript
```python
from latex import depart_subscript
```



---
## visit_inline
```python
from latex import visit_inline
```



---
## depart_inline
```python
from latex import depart_inline
```



---
## visit_generated
```python
from latex import visit_generated
```



---
## depart_generated
```python
from latex import depart_generated
```



---
## visit_compound
```python
from latex import visit_compound
```



---
## depart_compound
```python
from latex import depart_compound
```



---
## visit_container
```python
from latex import visit_container
```



---
## depart_container
```python
from latex import depart_container
```



---
## visit_decoration
```python
from latex import visit_decoration
```



---
## depart_decoration
```python
from latex import depart_decoration
```



---
## visit_header
```python
from latex import visit_header
```



---
## visit_footer
```python
from latex import visit_footer
```



---
## visit_docinfo
```python
from latex import visit_docinfo
```



---
## encode
```python
from latex import encode
```



---
## encode_uri
```python
from latex import encode_uri
```



---
## visit_Text
```python
from latex import visit_Text
```



---
## depart_Text
```python
from latex import depart_Text
```



---
## visit_comment
```python
from latex import visit_comment
```



---
## visit_meta
```python
from latex import visit_meta
```



---
## visit_system_message
```python
from latex import visit_system_message
```



---
## depart_system_message
```python
from latex import depart_system_message
```



---
## visit_math
```python
from latex import visit_math
```



---
## visit_math_block
```python
from latex import visit_math_block
```



---
## visit_math_reference
```python
from latex import visit_math_reference
```



---
## depart_math_reference
```python
from latex import depart_math_reference
```



---
## generate
```python
from latex import generate
```



---
## next_sibling
```python
from latex import next_sibling
```



---
## has_multi_line
```python
from latex import has_multi_line
```



---
## get_enumtype
```python
from latex import get_enumtype
```



---
## get_nested_level
```python
from latex import get_nested_level
```



---
## add_target
```python
from latex import add_target
```



---
## style
```python
from latex import style
```



---
## has_dup_label
```python
from latex import has_dup_label
```



---
## BooleanParser
```python
from tags import BooleanParser
```

Only allow conditional expressions and binary operators.

---
## Tags
```python
from tags import Tags
```



---
## parse_compare
```python
from tags import parse_compare
```



---
## __iter__
```python
from tags import __iter__
```



---
## __contains__
```python
from tags import __contains__
```



---
## has
```python
from tags import has
```



---
## add
```python
from tags import add
```



---
## remove
```python
from tags import remove
```



---
## tags
```python
from tags import tags
```



---
## eval_condition
```python
from tags import eval_condition
```

Evaluate a boolean condition.

Only conditional expressions and binary operators (and, or, not)
are permitted, and operate on tag names, where truthy values mean
the tag is present and vice versa.

---
## _eval_node
```python
from tags import _eval_node
```



---
## getLogger
```python
from logging import getLogger
```

Get logger wrapped by :class:`sphinx.util.logging.SphinxLoggerAdapter`.

Sphinx logger always uses ``sphinx.*`` namespace to be independent from
settings of root logger.  It ensures logging is consistent even if a
third-party extension or imported application resets logger settings.

Example usage::

    >>> from sphinx.util import logging
    >>> logger = logging.getLogger(__name__)
    >>> logger.info('Hello, this is an extension!')
    Hello, this is an extension!

---
## convert_serializable
```python
from logging import convert_serializable
```

Convert LogRecord serializable.

---
## SphinxLogRecord
```python
from logging import SphinxLogRecord
```

Log record class supporting location

---
## SphinxInfoLogRecord
```python
from logging import SphinxInfoLogRecord
```

Info log record class supporting location

---
## SphinxWarningLogRecord
```python
from logging import SphinxWarningLogRecord
```

Warning log record class supporting location

---
## SphinxLoggerAdapter
```python
from logging import SphinxLoggerAdapter
```

LoggerAdapter allowing ``type`` and ``subtype`` keywords.

---
## WarningStreamHandler
```python
from logging import WarningStreamHandler
```

StreamHandler for warnings.

---
## NewLineStreamHandler
```python
from logging import NewLineStreamHandler
```

StreamHandler which switches line terminator by record.nonl flag.

---
## MemoryHandler
```python
from logging import MemoryHandler
```

Handler buffering all logs.

---
## pending_warnings
```python
from logging import pending_warnings
```

Context manager to postpone logging warnings temporarily.

Similar to :func:`pending_logging`.

---
## suppress_logging
```python
from logging import suppress_logging
```

Context manager to suppress logging all logs temporarily.

For example::

    >>> with suppress_logging():
    >>>     logger.warning('Warning message!')  # suppressed
    >>>     some_long_process()
    >>>

---
## pending_logging
```python
from logging import pending_logging
```

Context manager to postpone logging all logs temporarily.

For example::

    >>> with pending_logging():
    >>>     logger.warning('Warning message!')  # not flushed yet
    >>>     some_long_process()
    >>>
    Warning message!  # the warning is flushed here

---
## skip_warningiserror
```python
from logging import skip_warningiserror
```

Context manager to skip WarningIsErrorFilter temporarily.

---
## prefixed_warnings
```python
from logging import prefixed_warnings
```

Context manager to prepend prefix to all warning log records temporarily.

For example::

    >>> with prefixed_warnings("prefix:"):
    >>>     logger.warning('Warning message!')  # => prefix: Warning message!

.. versionadded:: 2.0

---
## LogCollector
```python
from logging import LogCollector
```



---
## InfoFilter
```python
from logging import InfoFilter
```

Filter error and warning messages.

---
## is_suppressed_warning
```python
from logging import is_suppressed_warning
```

Check whether the warning is suppressed or not.

---
## WarningSuppressor
```python
from logging import WarningSuppressor
```

Filter logs by `suppress_warnings`.

---
## WarningIsErrorFilter
```python
from logging import WarningIsErrorFilter
```

Raise exception if warning emitted.

---
## DisableWarningIsErrorFilter
```python
from logging import DisableWarningIsErrorFilter
```

Disable WarningIsErrorFilter if this filter installed.

---
## MessagePrefixFilter
```python
from logging import MessagePrefixFilter
```

Prepend prefix to all log records.

---
## OnceFilter
```python
from logging import OnceFilter
```

Show the message only once.

---
## SphinxLogRecordTranslator
```python
from logging import SphinxLogRecordTranslator
```

Converts a log record to one Sphinx expects

* Make a instance of SphinxLogRecord
* docname to path if location given
* append warning type/subtype to message if :confval:`show_warning_types` is ``True``

---
## InfoLogRecordTranslator
```python
from logging import InfoLogRecordTranslator
```

LogRecordTranslator for INFO level log records.

---
## WarningLogRecordTranslator
```python
from logging import WarningLogRecordTranslator
```

LogRecordTranslator for WARNING level log records.

---
## get_node_location
```python
from logging import get_node_location
```



---
## ColorizeFormatter
```python
from logging import ColorizeFormatter
```



---
## SafeEncodingWriter
```python
from logging import SafeEncodingWriter
```

Stream writer which ignores UnicodeEncodeError silently

---
## LastMessagesWriter
```python
from logging import LastMessagesWriter
```

Stream writer storing last 10 messages in memory to save trackback

---
## setup
```python
from logging import setup
```

Setup root logger for Sphinx

---
## getMessage
```python
from logging import getMessage
```



---
## prefix
```python
from logging import prefix
```



---
## log
```python
from logging import log
```



---
## verbose
```python
from logging import verbose
```



---
## process
```python
from logging import process
```



---
## handle
```python
from logging import handle
```



---
## warning
```python
from logging import warning
```

Log a sphinx warning.

It is recommended to include a ``type`` and ``subtype`` for warnings as
these can be displayed to the user using :confval:`show_warning_types`
and used in :confval:`suppress_warnings` to suppress specific warnings.

It is also recommended to specify a ``location`` whenever possible
to help users in correcting the warning.

:param msg: The message, which may contain placeholders for ``args``.
:param args: The arguments to substitute into ``msg``.
:param type: The type of the warning.
:param subtype: The subtype of the warning.
:param location: The source location of the warning's origin,
    which can be a string (the ``docname`` or ``docname:lineno``),
    a tuple of ``(docname, lineno)``,
    or the docutils node object.
:param nonl: Whether to append a new line terminator to the message.
:param color: A color code for the message.
:param once: Do not log this warning,
    if a previous warning already has same ``msg``, ``args`` and ``once=True``.

---
## shouldFlush
```python
from logging import shouldFlush
```



---
## flush
```python
from logging import flush
```



---
## flushTo
```python
from logging import flushTo
```



---
## collect
```python
from logging import collect
```



---
## write
```python
from logging import write
```



---
## terminal_safe
```python
from console import terminal_safe
```

Safely encode a string for printing to the terminal.

---
## get_terminal_width
```python
from console import get_terminal_width
```

Return the width of the terminal in columns.

---
## term_width_line
```python
from console import term_width_line
```



---
## color_terminal
```python
from console import color_terminal
```



---
## nocolor
```python
from console import nocolor
```



---
## coloron
```python
from console import coloron
```



---
## strip_colors
```python
from console import strip_colors
```

Remove the ANSI color codes in a string *s*.

.. caution::

   This function is not meant to be used in production and should only
   be used for testing Sphinx's output messages.

.. seealso:: :func:`strip_escape_sequences`

---
## strip_escape_sequences
```python
from console import strip_escape_sequences
```

Remove the ANSI CSI colors and "erase in line" sequences.

Other `escape sequences `__ (e.g., VT100-specific functions) are not
supported and only control sequences *natively* known to Sphinx (i.e.,
colors declared in this module and "erase entire line" (``'\x1b[2K'``))
are eliminated by this function.

.. caution::

   This function is not meant to be used in production and should only
   be used for testing Sphinx's output messages that were not tempered
   with by third-party extensions.

.. versionadded:: 7.3

   This function is added as an *experimental* feature.

__ https://en.wikipedia.org/wiki/ANSI_escape_code

---
## create_color_func
```python
from console import create_color_func
```



---
## reset
```python
from console import reset
```



---
## bold
```python
from console import bold
```



---
## faint
```python
from console import faint
```



---
## standout
```python
from console import standout
```



---
## underline
```python
from console import underline
```



---
## blink
```python
from console import blink
```



---
## black
```python
from console import black
```



---
## white
```python
from console import white
```



---
## red
```python
from console import red
```



---
## green
```python
from console import green
```



---
## yellow
```python
from console import yellow
```



---
## blue
```python
from console import blue
```



---
## fuchsia
```python
from console import fuchsia
```



---
## teal
```python
from console import teal
```



---
## darkgray
```python
from console import darkgray
```



---
## lightgray
```python
from console import lightgray
```



---
## darkred
```python
from console import darkred
```



---
## darkgreen
```python
from console import darkgreen
```



---
## brown
```python
from console import brown
```



---
## darkblue
```python
from console import darkblue
```



---
## purple
```python
from console import purple
```



---
## turquoise
```python
from console import turquoise
```



---
## escseq
```python
from console import escseq
```



---
## inner
```python
from console import inner
```



---
## __name__
```python
from _timestamps import __name__
```



---
## _format_rfc3339_microseconds
```python
from _timestamps import _format_rfc3339_microseconds
```

Return an RFC 3339 formatted string representing the given timestamp.

:param timestamp: The timestamp to format, in microseconds.

---
## nested_parse_to_nodes
```python
from parsing import nested_parse_to_nodes
```

Parse *text* into nodes.

:param state:
    The state machine state. Must be a subclass of ``RSTState``.
:param text:
    Text, in string form. ``StringList`` is also accepted.
:param source:
    The text's source, used when creating a new ``StringList``.
:param offset:
    The offset of the content.
:param allow_section_headings:
    Are titles (sections) allowed in *text*?
    Note that this option bypasses Docutils' usual checks on
    doctree structure, and misuse of this option can lead to
    an incoherent doctree. In Docutils, section nodes should
    only be children of ``Structural`` nodes, which includes
    ``document``, ``section``, and ``sidebar`` nodes.
:param keep_title_context:
    If this is False (the default), then *content* is parsed as if it were
    an independent document, meaning that title decorations (e.g. underlines)
    do not need to match the surrounding document.
    This is useful when the parsed content comes from
    a completely different context, such as docstrings.
    If this is True, then title underlines must match those in
    the surrounding document, otherwise the behaviour is undefined.

.. versionadded:: 7.4

---
## _fresh_title_style_context
```python
from parsing import _fresh_title_style_context
```



---
## _text_to_string_list
```python
from parsing import _text_to_string_list
```



---
## __name__
```python
from build_phase import __name__
```

Build phase of Sphinx application.

---
## BuildPhase
```python
from build_phase import BuildPhase
```

Build phase of Sphinx application.

---
## __name__
```python
from texescape import __name__
```

TeX escaping helper.

---
## escape
```python
from texescape import escape
```

Escape text for LaTeX output.

---
## hlescape
```python
from texescape import hlescape
```

Escape text for LaTeX highlighter.

---
## escape_abbr
```python
from texescape import escape_abbr
```

Adjust spacing after abbreviations. Works with @ letter or other.

---
## init
```python
from texescape import init
```



---
## __name__
```python
from _io import __name__
```



---
## TeeStripANSI
```python
from _io import TeeStripANSI
```

File-like object writing to two streams.

---
## SupportsWrite
```python
from _io import SupportsWrite
```



---
## __init__
```python
from _io import __init__
```



---
## write
```python
from _io import write
```



---
## flush
```python
from _io import flush
```



---
## __name__
```python
from docutils import __name__
```

Utility functions for docutils.

---
## docutils_namespace
```python
from docutils import docutils_namespace
```

Create namespace for reST parsers.

---
## is_directive_registered
```python
from docutils import is_directive_registered
```

Check the *name* directive is already registered.

---
## register_directive
```python
from docutils import register_directive
```

Register a directive to docutils.

This modifies global state of docutils.  So it is better to use this
inside ``docutils_namespace()`` to prevent side-effects.

---
## is_role_registered
```python
from docutils import is_role_registered
```

Check the *name* role is already registered.

---
## register_role
```python
from docutils import register_role
```

Register a role to docutils.

This modifies global state of docutils.  So it is better to use this
inside ``docutils_namespace()`` to prevent side-effects.

---
## unregister_role
```python
from docutils import unregister_role
```

Unregister a role from docutils.

---
## is_node_registered
```python
from docutils import is_node_registered
```

Check the *node* is already registered.

---
## register_node
```python
from docutils import register_node
```

Register a node to docutils.

This modifies global state of some visitors.  So it is better to use this
inside ``docutils_namespace()`` to prevent side-effects.

---
## unregister_node
```python
from docutils import unregister_node
```

Unregister a node from docutils.

This is inverse of ``nodes._add_nodes_class_names()``.

---
## patched_get_language
```python
from docutils import patched_get_language
```



---
## patched_rst_get_language
```python
from docutils import patched_rst_get_language
```

Patch docutils.parsers.rst.languages.get_language().
Starting from docutils 0.17, get_language() in ``rst.languages``
also has a reporter, which needs to be disabled temporarily.

This should also work for old versions of docutils,
because reporter is none by default.

refs: https://github.com/sphinx-doc/sphinx/issues/10179

---
## using_user_docutils_conf
```python
from docutils import using_user_docutils_conf
```

Let docutils know the location of ``docutils.conf`` for Sphinx.

---
## patch_docutils
```python
from docutils import patch_docutils
```

Patch to docutils temporarily.

---
## CustomReSTDispatcher
```python
from docutils import CustomReSTDispatcher
```

Custom reST's mark-up dispatcher.

This replaces docutils's directives and roles dispatch mechanism for reST parser
by original one temporarily.

---
## ElementLookupError
```python
from docutils import ElementLookupError
```



---
## sphinx_domains
```python
from docutils import sphinx_domains
```

Monkey-patch directive and role dispatch, so that domain-specific
markup takes precedence.

---
## WarningStream
```python
from docutils import WarningStream
```



---
## LoggingReporter
```python
from docutils import LoggingReporter
```



---
## NullReporter
```python
from docutils import NullReporter
```

A dummy reporter; write nothing.

---
## switch_source_input
```python
from docutils import switch_source_input
```

Switch current source input of state temporarily.

---
## SphinxFileOutput
```python
from docutils import SphinxFileOutput
```

Better FileOutput class for Sphinx.

---
## SphinxDirective
```python
from docutils import SphinxDirective
```

A base class for Sphinx directives.

This class provides helper methods for Sphinx directives.

.. versionadded:: 1.8

.. note:: The subclasses of this class might not work with docutils.
          This class is strongly coupled with Sphinx.

---
## SphinxRole
```python
from docutils import SphinxRole
```

A base class for Sphinx roles.

This class provides helper methods for Sphinx roles.

.. versionadded:: 2.0

.. note:: The subclasses of this class might not work with docutils.
          This class is strongly coupled with Sphinx.

---
## ReferenceRole
```python
from docutils import ReferenceRole
```

A base class for reference roles.

The reference roles can accept ``link title <target>`` style as a text for
the role.  The parsed result; link title and target will be stored to
``self.title`` and ``self.target``.

.. versionadded:: 2.0

---
## SphinxTranslator
```python
from docutils import SphinxTranslator
```

A base class for Sphinx translators.

This class adds a support for visitor/departure method for super node class
if visitor/departure method for node class is not found.

It also provides helper methods for Sphinx translators.

.. versionadded:: 2.0

.. note:: The subclasses of this class might not work with docutils.
          This class is strongly coupled with Sphinx.

---
## new_document
```python
from docutils import new_document
```

Return a new empty document object.  This is an alternative of docutils'.

This is a simple wrapper for ``docutils.utils.new_document()``.  It
caches the result of docutils' and use it on second call for instantiation.
This makes an instantiation of document nodes much faster.

---
## __init__
```python
from docutils import __init__
```



---
## __enter__
```python
from docutils import __enter__
```



---
## __exit__
```python
from docutils import __exit__
```



---
## enable
```python
from docutils import enable
```



---
## disable
```python
from docutils import disable
```



---
## directive
```python
from docutils import directive
```



---
## role
```python
from docutils import role
```



---
## lookup_domain_element
```python
from docutils import lookup_domain_element
```

Lookup a markup element (directive or role), given its name which can
be a full name (with domain).

---
## write
```python
from docutils import write
```



---
## from_reporter
```python
from docutils import from_reporter
```

Create an instance of LoggingReporter from other reporter object.

---
## env
```python
from docutils import env
```

Reference to the :class:`.BuildEnvironment` object.

.. versionadded:: 2.0

---
## config
```python
from docutils import config
```

Reference to the :class:`.Config` object.

.. versionadded:: 2.0

---
## get_source_info
```python
from docutils import get_source_info
```



---
## set_source_info
```python
from docutils import set_source_info
```



---
## get_location
```python
from docutils import get_location
```

Get current location info for logging.

.. versionadded:: 4.2

---
## parse_content_to_nodes
```python
from docutils import parse_content_to_nodes
```

Parse the directive's content into nodes.

:param allow_section_headings:
    Are titles (sections) allowed in the directive's content?
    Note that this option bypasses Docutils' usual checks on
    doctree structure, and misuse of this option can lead to
    an incoherent doctree. In Docutils, section nodes should
    only be children of ``Structural`` nodes, which includes
    ``document``, ``section``, and ``sidebar`` nodes.

.. versionadded:: 7.4

---
## parse_text_to_nodes
```python
from docutils import parse_text_to_nodes
```

Parse *text* into nodes.

:param text:
    Text, in string form. ``StringList`` is also accepted.
:param allow_section_headings:
    Are titles (sections) allowed in *text*?
    Note that this option bypasses Docutils' usual checks on
    doctree structure, and misuse of this option can lead to
    an incoherent doctree. In Docutils, section nodes should
    only be children of ``Structural`` nodes, which includes
    ``document``, ``section``, and ``sidebar`` nodes.
:param offset:
    The offset of the content.

.. versionadded:: 7.4

---
## parse_inline
```python
from docutils import parse_inline
```

Parse *text* as inline elements.

:param text:
    The text to parse, which should be a single line or paragraph.
    This cannot contain any structural elements (headings,
    transitions, directives, etc).
:param lineno:
    The line number where the interpreted text begins.
:returns:
    A list of nodes (text and inline elements) and a list of system_messages.

.. versionadded:: 7.4

---
## __call__
```python
from docutils import __call__
```



---
## run
```python
from docutils import run
```



---
## dispatch_visit
```python
from docutils import dispatch_visit
```

Dispatch node to appropriate visitor method.
The priority of visitor method is:

1. ``self.visit_{node_class}()``
2. ``self.visit_{super_node_class}()``
3. ``self.unknown_visit()``

---
## dispatch_departure
```python
from docutils import dispatch_departure
```

Dispatch node to appropriate departure method.
The priority of departure method is:

1. ``self.depart_{node_class}()``
2. ``self.depart_{super_node_class}()``
3. ``self.unknown_departure()``

---
## unknown_visit
```python
from docutils import unknown_visit
```



---
## __name__
```python
from fileutil import __name__
```

File utility functions for Sphinx.

---
## _template_basename
```python
from fileutil import _template_basename
```

Given an input filename:
If the input looks like a template, then return the filename output should
be written to.  Otherwise, return no result (None).

---
## copy_asset_file
```python
from fileutil import copy_asset_file
```

Copy an asset file to destination.

On copying, it expands the template variables if context argument is given and
the asset is a template file.

:param source: The path to source file
:param destination: The path to destination file or directory
:param context: The template variables.  If not given, template files are simply copied
:param renderer: The template engine.  If not given, SphinxRenderer is used by default
:param bool force: Overwrite the destination file even if it exists.

---
## copy_asset
```python
from fileutil import copy_asset
```

Copy asset files to destination recursively.

On copying, it expands the template variables if context argument is given and
the asset is a template file.

Use ``copy_asset_file`` instead to copy a single file.

:param source: The path to source file or directory
:param destination: The path to destination directory
:param excluded: The matcher to determine the given path should be copied or not
:param context: The template variables.  If not given, template files are simply copied
:param renderer: The template engine.  If not given, SphinxRenderer is used by default
:param onerror: The error handler.
:param bool force: Overwrite the destination file even if it exists.

---
## docname_join
```python
from __init__ import docname_join
```



---
## get_filetype
```python
from __init__ import get_filetype
```



---
## FilenameUniqDict
```python
from __init__ import FilenameUniqDict
```

A dictionary that automatically generates unique names for its keys,
interpreted as filenames, and keeps track of a set of docnames they
appear in.  Used for images and downloadable files in the environment.

---
## _md5
```python
from __init__ import _md5
```

Deprecated wrapper around hashlib.md5

To be removed in Sphinx 9.0

---
## _sha1
```python
from __init__ import _sha1
```

Deprecated wrapper around hashlib.sha1

To be removed in Sphinx 9.0

---
## DownloadFiles
```python
from __init__ import DownloadFiles
```

A special dictionary for download files.

.. important:: This class would be refactored in nearly future.
               Hence don't hack this directly.

---
## UnicodeDecodeErrorHandler
```python
from __init__ import UnicodeDecodeErrorHandler
```

Custom error handler for open() that warns and replaces.

---
## Tee
```python
from __init__ import Tee
```

File-like object writing to two streams.

---
## parselinenos
```python
from __init__ import parselinenos
```

Parse a line number spec (such as "1,2,4-6") and return a list of
wanted line numbers.

---
## import_object
```python
from __init__ import import_object
```

Check the exisitence of uninitialized instance attribute when failed to import
the attribute.

---
## encode_uri
```python
from __init__ import encode_uri
```



---
## isurl
```python
from __init__ import isurl
```

Check *url* is URL or not.

---
## add_file
```python
from __init__ import add_file
```



---
## purge_doc
```python
from __init__ import purge_doc
```



---
## merge_other
```python
from __init__ import merge_other
```

Merge in specified data regarding docnames from a different `BuildEnvironment`
object which coming from a subprocess in parallel builds.

.. seealso:: :event:`env-merge-info`

---
## __name__
```python
from docfields import __name__
```

Utility code for "Doc fields".

"Doc fields" are reST field lists in object descriptions that will
be domain-specifically transformed to a more appealing presentation.

---
## _is_single_paragraph
```python
from docfields import _is_single_paragraph
```

True if the node only contains one paragraph (and system messages).

---
## Field
```python
from docfields import Field
```

A doc field that is never grouped.  It can have an argument or not, the
argument can be linked using a specified *rolename*.  Field should be used
for doc fields that usually don't occur more than once.

The body can be linked using a specified *bodyrolename* if the content is
just a single inline or text node.

Example::

   :returns: description of the return value
   :rtype: description of the return type

---
## GroupedField
```python
from docfields import GroupedField
```

A doc field that is grouped; i.e., all fields of that type will be
transformed into one field with its body being a bulleted list.  It always
has an argument.  The argument can be linked using the given *rolename*.
GroupedField should be used for doc fields that can occur more than once.
If *can_collapse* is true, this field will revert to a Field if only used
once.

Example::

   :raises ErrorClass: description when it is raised

---
## TypedField
```python
from docfields import TypedField
```

A doc field that is grouped and has type information for the arguments.  It
always has an argument.  The argument can be linked using the given
*rolename*, the type using the given *typerolename*.

Two uses are possible: either parameter and type description are given
separately, using a field from *names* and one from *typenames*,
respectively, or both are given using a field from *names*, see the example.

Example::

   :param foo: description of parameter foo
   :type foo:  SomeClass

   -- or --

   :param SomeClass foo: description of parameter foo

---
## DocFieldTransformer
```python
from docfields import DocFieldTransformer
```

Transforms field lists in "doc field" syntax into better-looking
equivalents, using the field type definitions given on a domain.

---
## __init__
```python
from docfields import __init__
```



---
## make_xref
```python
from docfields import make_xref
```



---
## make_xrefs
```python
from docfields import make_xrefs
```



---
## make_entry
```python
from docfields import make_entry
```



---
## make_field
```python
from docfields import make_field
```



---
## transform_all
```python
from docfields import transform_all
```

Transform all field list children of a node.

---
## transform
```python
from docfields import transform
```

Transform a single field list *node*.

---
## handle_item
```python
from docfields import handle_item
```



---
## display_chunk
```python
from display import display_chunk
```



---
## status_iterator
```python
from display import status_iterator
```



---
## SkipProgressMessage
```python
from display import SkipProgressMessage
```



---
## progress_message
```python
from display import progress_message
```



---
## __enter__
```python
from display import __enter__
```



---
## __exit__
```python
from display import __exit__
```



---
## wrapper
```python
from display import wrapper
```



---
## __name__
```python
from docstrings import __name__
```

Templating for ops docstrings

---
## separate_metadata
```python
from docstrings import separate_metadata
```

Separate docstring into metadata and others.

---
## prepare_docstring
```python
from docstrings import prepare_docstring
```

Convert a docstring into lines of parseable reST.  Remove common leading
indentation, where the indentation of the first line is ignored.

Return the docstring as a list of lines usable for inserting into a docutils
ViewList (used as argument of nested_parse().)  An empty line is added to
act as a separator between this docstring and following content.

---
## prepare_commentdoc
```python
from docstrings import prepare_commentdoc
```

Extract documentation comment lines (starting with #:) and return them
as a list of lines.  Returns an empty list if there is no documentation.

---
## __name__
```python
from matching import __name__
```

Pattern-matching utility functions for Sphinx.

---
## _translate_pattern
```python
from matching import _translate_pattern
```

Translate a shell-style glob pattern to a regular expression.

Adapted from the fnmatch module, but enhanced so that single stars don't
match slashes.

---
## compile_matchers
```python
from matching import compile_matchers
```



---
## Matcher
```python
from matching import Matcher
```

A pattern matcher for Multiple shell-style glob patterns.

Note: this modifies the patterns to work with copy_asset().
      For example, "**/index.rst" matches with "index.rst"

---
## patmatch
```python
from matching import patmatch
```

Return if name matches the regular expression (pattern)
``pat```. Adapted from fnmatch module.

---
## patfilter
```python
from matching import patfilter
```

Return the subset of the list ``names`` that match
the regular expression (pattern) ``pat``.

Adapted from fnmatch module.

---
## get_matching_files
```python
from matching import get_matching_files
```

Get all file names in a directory, recursively.

Filter file names by the glob-style include_patterns and exclude_patterns.
The default values include all files ("**") and exclude nothing ("").

Only files matching some pattern in *include_patterns* are included, and
exclusions from *exclude_patterns* take priority over inclusions.

---
## __init__
```python
from matching import __init__
```



---
## __call__
```python
from matching import __call__
```



---
## match
```python
from matching import match
```



---
## __name__
```python
from png import __name__
```

PNG image manipulation helpers.

---
## read_png_depth
```python
from png import read_png_depth
```

Read the special tEXt chunk indicating the depth from a PNG file.

---
## write_png_depth
```python
from png import write_png_depth
```

Write the special tEXt chunk indicating the depth to a PNG file.

The chunk is placed immediately before the special IEND chunk.

---
## unwrap
```python
from inspect import unwrap
```

Get an original object from wrapped object (wrapped functions).

Mocked objects are returned as is.

---
## unwrap_all
```python
from inspect import unwrap_all
```

Get an original object from wrapped object.

Unlike :func:`unwrap`, this unwraps partial functions, wrapped functions,
class methods and static methods.

When specified, *stop* is a predicate indicating whether an object should
be unwrapped or not.

---
## getall
```python
from inspect import getall
```

Get the ``__all__`` attribute of an object as a sequence.

This returns ``None`` if the given ``obj.__all__`` does not exist and
raises :exc:`ValueError` if ``obj.__all__`` is not a list or tuple of
strings.

---
## getannotations
```python
from inspect import getannotations
```

Safely get the ``__annotations__`` attribute of an object.

---
## getglobals
```python
from inspect import getglobals
```

Safely get :attr:`obj.__globals__ <function.__globals__>`.

---
## getmro
```python
from inspect import getmro
```

Safely get :attr:`obj.__mro__ <class.__mro__>`.

---
## getorigbases
```python
from inspect import getorigbases
```

Safely get ``obj.__orig_bases__``.

This returns ``None`` if the object is not a class or if ``__orig_bases__``
is not well-defined (e.g., a non-tuple object or an empty sequence).

---
## getslots
```python
from inspect import getslots
```

Safely get :term:`obj.__slots__ <__slots__>` as a dictionary if any.

- This returns ``None`` if ``obj.__slots__`` does not exist.
- This raises a :exc:`TypeError` if *obj* is not a class.
- This raises a :exc:`ValueError` if ``obj.__slots__`` is invalid.

---
## isenumclass
```python
from inspect import isenumclass
```

Check if the object is an :class:`enumeration class <enum.Enum>`.

---
## isenumattribute
```python
from inspect import isenumattribute
```

Check if the object is an enumeration attribute.

---
## unpartial
```python
from inspect import unpartial
```

Get an original object from a partial-like object.

If *obj* is not a partial object, it is returned as is.

.. seealso:: :func:`ispartial`

---
## ispartial
```python
from inspect import ispartial
```

Check if the object is a partial function or method.

---
## isclassmethod
```python
from inspect import isclassmethod
```

Check if the object is a :class:`classmethod`.

---
## isstaticmethod
```python
from inspect import isstaticmethod
```

Check if the object is a :class:`staticmethod`.

---
## isdescriptor
```python
from inspect import isdescriptor
```

Check if the object is a :external+python:term:`descriptor`.

---
## isabstractmethod
```python
from inspect import isabstractmethod
```

Check if the object is an :func:`abstractmethod`.

---
## isboundmethod
```python
from inspect import isboundmethod
```

Check if the method is a bound method.

---
## is_cython_function_or_method
```python
from inspect import is_cython_function_or_method
```

Check if the object is a function or method in cython.

---
## isattributedescriptor
```python
from inspect import isattributedescriptor
```

Check if the object is an attribute-like descriptor.

---
## is_singledispatch_function
```python
from inspect import is_singledispatch_function
```

Check if the object is a :func:`~functools.singledispatch` function.

---
## is_singledispatch_method
```python
from inspect import is_singledispatch_method
```

Check if the object is a :class:`~functools.singledispatchmethod`.

---
## isfunction
```python
from inspect import isfunction
```

Check if the object is a user-defined function.

Partial objects are unwrapped before checking them.

.. seealso:: :external+python:func:`inspect.isfunction`

---
## isbuiltin
```python
from inspect import isbuiltin
```

Check if the object is a built-in function or method.

Partial objects are unwrapped before checking them.

.. seealso:: :external+python:func:`inspect.isbuiltin`

---
## isroutine
```python
from inspect import isroutine
```

Check if the object is a kind of function or method.

Partial objects are unwrapped before checking them.

.. seealso:: :external+python:func:`inspect.isroutine`

---
## iscoroutinefunction
```python
from inspect import iscoroutinefunction
```

Check if the object is a :external+python:term:`coroutine` function.

---
## _is_wrapped_coroutine
```python
from inspect import _is_wrapped_coroutine
```

Check if the object is wrapped coroutine-function.

---
## isproperty
```python
from inspect import isproperty
```

Check if the object is property (possibly cached).

---
## isgenericalias
```python
from inspect import isgenericalias
```

Check if the object is a generic alias.

---
## safe_getattr
```python
from inspect import safe_getattr
```

A getattr() that turns all exceptions into AttributeErrors.

---
## object_description
```python
from inspect import object_description
```

A repr() implementation that returns text safe to use in reST context.

Maintains a set of 'seen' object IDs to detect and avoid infinite recursion.

---
## is_builtin_class_method
```python
from inspect import is_builtin_class_method
```

Check whether *attr_name* is implemented on a builtin class.

    >>> is_builtin_class_method(int, '__init__')
    True


This function is needed since CPython implements ``int.__init__`` via
descriptors, but PyPy implementation is written in pure Python code.

---
## DefaultValue
```python
from inspect import DefaultValue
```

A simple wrapper for default value of the parameters of overload functions.

---
## TypeAliasForwardRef
```python
from inspect import TypeAliasForwardRef
```

Pseudo typing class for :confval:`autodoc_type_aliases`.

This avoids the error on evaluating the type inside :func:`typing.get_type_hints()`.

---
## TypeAliasModule
```python
from inspect import TypeAliasModule
```

Pseudo module class for :confval:`autodoc_type_aliases`.

---
## TypeAliasNamespace
```python
from inspect import TypeAliasNamespace
```

Pseudo namespace class for :confval:`autodoc_type_aliases`.

Useful for looking up nested objects via ``namespace.foo.bar.Class``.

---
## _should_unwrap
```python
from inspect import _should_unwrap
```

Check the function should be unwrapped on getting signature.

---
## signature
```python
from inspect import signature
```

Return a Signature object for the given *subject*.

:param bound_method: Specify *subject* is a bound method or not

---
## evaluate_signature
```python
from inspect import evaluate_signature
```

Evaluate unresolved type annotations in a signature object.

---
## _evaluate_forwardref
```python
from inspect import _evaluate_forwardref
```

Evaluate a forward reference.

---
## _evaluate
```python
from inspect import _evaluate
```

Evaluate unresolved type annotation.

---
## stringify_signature
```python
from inspect import stringify_signature
```

Stringify a :class:`~inspect.Signature` object.

:param show_annotation: If enabled, show annotations on the signature
:param show_return_annotation: If enabled, show annotation of the return value
:param unqualified_typehints: If enabled, show annotations as unqualified
                              (ex. io.StringIO -> StringIO)

---
## signature_from_str
```python
from inspect import signature_from_str
```

Create a :class:`~inspect.Signature` object from a string.

---
## signature_from_ast
```python
from inspect import signature_from_ast
```

Create a :class:`~inspect.Signature` object from an AST node.

---
## _define
```python
from inspect import _define
```



---
## getdoc
```python
from inspect import getdoc
```

Get the docstring for the object.

This tries to obtain the docstring for some kind of objects additionally:

* partial functions
* inherited docstring
* inherited decorated methods

---
## _getdoc_internal
```python
from inspect import _getdoc_internal
```



---
## _SupportsGet
```python
from inspect import _SupportsGet
```



---
## _SupportsSet
```python
from inspect import _SupportsSet
```



---
## _SupportsDelete
```python
from inspect import _SupportsDelete
```



---
## __init__
```python
from inspect import __init__
```



---
## __eq__
```python
from inspect import __eq__
```



---
## __repr__
```python
from inspect import __repr__
```



---
## __call__
```python
from inspect import __call__
```



---
## __hash__
```python
from inspect import __hash__
```



---
## __getattr__
```python
from inspect import __getattr__
```



---
## __getitem__
```python
from inspect import __getitem__
```



---
## __get__
```python
from inspect import __get__
```



---
## __set__
```python
from inspect import __set__
```



---
## __delete__
```python
from inspect import __delete__
```



---
## __name__
```python
from cfamily import __name__
```

Utility functions common to the C and C++ domains.

---
## verify_description_mode
```python
from cfamily import verify_description_mode
```



---
## NoOldIdError
```python
from cfamily import NoOldIdError
```



---
## ASTBaseBase
```python
from cfamily import ASTBaseBase
```



---
## ASTAttribute
```python
from cfamily import ASTAttribute
```



---
## ASTCPPAttribute
```python
from cfamily import ASTCPPAttribute
```



---
## ASTGnuAttribute
```python
from cfamily import ASTGnuAttribute
```



---
## ASTGnuAttributeList
```python
from cfamily import ASTGnuAttributeList
```



---
## ASTIdAttribute
```python
from cfamily import ASTIdAttribute
```

For simple attributes defined by the user.

---
## ASTParenAttribute
```python
from cfamily import ASTParenAttribute
```

For paren attributes defined by the user.

---
## ASTAttributeList
```python
from cfamily import ASTAttributeList
```



---
## ASTBaseParenExprList
```python
from cfamily import ASTBaseParenExprList
```



---
## UnsupportedMultiCharacterCharLiteral
```python
from cfamily import UnsupportedMultiCharacterCharLiteral
```



---
## DefinitionError
```python
from cfamily import DefinitionError
```



---
## BaseParser
```python
from cfamily import BaseParser
```



---
## __eq__
```python
from cfamily import __eq__
```



---
## clone
```python
from cfamily import clone
```



---
## _stringify
```python
from cfamily import _stringify
```



---
## __str__
```python
from cfamily import __str__
```



---
## get_display_string
```python
from cfamily import get_display_string
```



---
## __repr__
```python
from cfamily import __repr__
```



---
## describe_signature
```python
from cfamily import describe_signature
```



---
## __init__
```python
from cfamily import __init__
```



---
## __hash__
```python
from cfamily import __hash__
```



---
## __len__
```python
from cfamily import __len__
```



---
## __add__
```python
from cfamily import __add__
```



---
## _make_multi_error
```python
from cfamily import _make_multi_error
```



---
## language
```python
from cfamily import language
```



---
## status
```python
from cfamily import status
```



---
## fail
```python
from cfamily import fail
```



---
## warn
```python
from cfamily import warn
```



---
## match
```python
from cfamily import match
```



---
## skip_string
```python
from cfamily import skip_string
```



---
## skip_word
```python
from cfamily import skip_word
```



---
## skip_ws
```python
from cfamily import skip_ws
```



---
## skip_word_and_ws
```python
from cfamily import skip_word_and_ws
```



---
## skip_string_and_ws
```python
from cfamily import skip_string_and_ws
```



---
## eof
```python
from cfamily import eof
```



---
## current_char
```python
from cfamily import current_char
```



---
## matched_text
```python
from cfamily import matched_text
```



---
## read_rest
```python
from cfamily import read_rest
```



---
## assert_end
```python
from cfamily import assert_end
```



---
## id_attributes
```python
from cfamily import id_attributes
```



---
## paren_attributes
```python
from cfamily import paren_attributes
```



---
## _parse_balanced_token_seq
```python
from cfamily import _parse_balanced_token_seq
```



---
## _parse_attribute
```python
from cfamily import _parse_attribute
```



---
## _parse_attribute_list
```python
from cfamily import _parse_attribute_list
```



---
## _parse_paren_expression_list
```python
from cfamily import _parse_paren_expression_list
```



---
## __name__
```python
from http_date import __name__
```

Convert times to and from HTTP-date serialisations.

Reference: https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1

---
## epoch_to_rfc1123
```python
from http_date import epoch_to_rfc1123
```

Return HTTP-date string from epoch offset.

---
## rfc1123_to_epoch
```python
from http_date import rfc1123_to_epoch
```

Return epoch offset from HTTP-date string.

---
## __name__
```python
from index_entries import __name__
```



---
## split_index_msg
```python
from index_entries import split_index_msg
```



---
## _split_into
```python
from index_entries import _split_into
```

Split an index entry into a given number of parts at semicolons.

---
## DataURI
```python
from images import DataURI
```



---
## get_image_size
```python
from images import get_image_size
```



---
## guess_mimetype
```python
from images import guess_mimetype
```



---
## get_image_extension
```python
from images import get_image_extension
```



---
## parse_data_uri
```python
from images import parse_data_uri
```



---
## _image_type_from_file
```python
from images import _image_type_from_file
```



---
## __name__
```python
from osutil import __name__
```

Operating system-related utility functions for Sphinx.

---
## os_path
```python
from osutil import os_path
```



---
## canon_path
```python
from osutil import canon_path
```

Return path in OS-independent form

---
## path_stabilize
```python
from osutil import path_stabilize
```

Normalize path separator and unicode string

---
## relative_uri
```python
from osutil import relative_uri
```

Return a relative URL from ``base`` to ``to``.

---
## ensuredir
```python
from osutil import ensuredir
```

Ensure that a path exists.

---
## _last_modified_time
```python
from osutil import _last_modified_time
```

Return the last modified time of ``filename``.

The time is returned as integer microseconds.
The lowest common denominator of modern file-systems seems to be
microsecond-level precision.

We prefer to err on the side of re-rendering a file,
so we round up to the nearest microsecond.

---
## _copy_times
```python
from osutil import _copy_times
```

Copy a file's modification times.

---
## copyfile
```python
from osutil import copyfile
```

Copy a file and its modification times, if possible.

:param source: An existing source to copy.
:param dest: The destination path.
:param bool force: Overwrite the destination file even if it exists.
:raise FileNotFoundError: The *source* does not exist.

.. note:: :func:`copyfile` is a no-op if *source* and *dest* are identical.

---
## make_filename
```python
from osutil import make_filename
```



---
## make_filename_from_project
```python
from osutil import make_filename_from_project
```



---
## relpath
```python
from osutil import relpath
```

Return a relative filepath to *path* either from the current directory or
from an optional *start* directory.

This is an alternative of ``os.path.relpath()``.  This returns original path
if *path* and *start* are on different drives (for Windows platform).

---
## _chdir
```python
from osutil import _chdir
```

Remove this fall-back once support for Python 3.10 is removed.

---
## FileAvoidWrite
```python
from osutil import FileAvoidWrite
```

File-like object that buffers output and only writes if content changed.

Use this class like when writing to a file to avoid touching the original
file if the content hasn't changed. This is useful in scenarios where file
mtime is used to invalidate caches or trigger new behavior.

When writing to this file handle, all writes are buffered until the object
is closed.

Objects can be used as context managers.

---
## rmtree
```python
from osutil import rmtree
```



---
## __init__
```python
from osutil import __init__
```



---
## __enter__
```python
from osutil import __enter__
```



---
## __exit__
```python
from osutil import __exit__
```



---
## write
```python
from osutil import write
```



---
## close
```python
from osutil import close
```

Stop accepting writes and write file, if needed.

---
## __getattr__
```python
from osutil import __getattr__
```



---
## __name__
```python
from template import __name__
```

Templates utility functions for Sphinx.

---
## BaseRenderer
```python
from template import BaseRenderer
```



---
## FileRenderer
```python
from template import FileRenderer
```



---
## SphinxRenderer
```python
from template import SphinxRenderer
```



---
## LaTeXRenderer
```python
from template import LaTeXRenderer
```



---
## ReSTRenderer
```python
from template import ReSTRenderer
```



---
## SphinxTemplateLoader
```python
from template import SphinxTemplateLoader
```

A loader supporting template inheritance

---
## __init__
```python
from template import __init__
```



---
## render
```python
from template import render
```



---
## render_string
```python
from template import render_string
```



---
## render_from_file
```python
from template import render_from_file
```



---
## get_source
```python
from template import get_source
```



---
## save_traceback
```python
from exceptions import save_traceback
```

Save the given exception's traceback in a temporary file.

---
## format_exception_cut_frames
```python
from exceptions import format_exception_cut_frames
```

Format an exception with traceback, but only the last x frames.

---
## __name__
```python
from i18n import __name__
```

Docutils transforms used by Sphinx when reading documents.

---
## LocaleFileInfoBase
```python
from i18n import LocaleFileInfoBase
```



---
## CatalogInfo
```python
from i18n import CatalogInfo
```



---
## CatalogRepository
```python
from i18n import CatalogRepository
```

A repository for message catalogs.

---
## docname_to_domain
```python
from i18n import docname_to_domain
```

Convert docname to domain for catalogs.

---
## babel_format_date
```python
from i18n import babel_format_date
```



---
## format_date
```python
from i18n import format_date
```



---
## get_image_filename_for_language
```python
from i18n import get_image_filename_for_language
```



---
## search_image_for_language
```python
from i18n import search_image_for_language
```



---
## DateFormatter
```python
from i18n import DateFormatter
```



---
## TimeFormatter
```python
from i18n import TimeFormatter
```



---
## DatetimeFormatter
```python
from i18n import DatetimeFormatter
```



---
## po_file
```python
from i18n import po_file
```



---
## mo_file
```python
from i18n import mo_file
```



---
## po_path
```python
from i18n import po_path
```



---
## mo_path
```python
from i18n import mo_path
```



---
## is_outdated
```python
from i18n import is_outdated
```



---
## write_mo
```python
from i18n import write_mo
```



---
## __init__
```python
from i18n import __init__
```



---
## locale_dirs
```python
from i18n import locale_dirs
```



---
## pofiles
```python
from i18n import pofiles
```



---
## catalogs
```python
from i18n import catalogs
```



---
## __call__
```python
from i18n import __call__
```



---
## get_node_equation_number
```python
from math import get_node_equation_number
```



---
## wrap_displaymath
```python
from math import wrap_displaymath
```



---
## is_equation
```python
from math import is_equation
```



---
## __name__
```python
from _pathlib import __name__
```

What follows is awful and will be gone in Sphinx 9.

Instances of _StrPath should not be constructed except in Sphinx itself.
Consumers of Sphinx APIs should prefer using ``pathlib.Path`` objects
where possible. _StrPath objects can be treated as equivalent to ``Path``,
save that ``_StrPath.replace`` is overriden with ``str.replace``.

To continue treating path-like objects as strings, use ``os.fspath``,
or explicit string coercion.

In Sphinx 9, ``Path`` objects will be expected and returned in all instances
that ``_StrPath`` is currently used.

---
## _StrPath
```python
from _pathlib import _StrPath
```



---
## replace
```python
from _pathlib import replace
```



---
## __getattr__
```python
from _pathlib import __getattr__
```



---
## __add__
```python
from _pathlib import __add__
```



---
## __bool__
```python
from _pathlib import __bool__
```



---
## __contains__
```python
from _pathlib import __contains__
```



---
## __eq__
```python
from _pathlib import __eq__
```



---
## __hash__
```python
from _pathlib import __hash__
```



---
## __getitem__
```python
from _pathlib import __getitem__
```



---
## __len__
```python
from _pathlib import __len__
```



---
## NodeMatcher
```python
from nodes import NodeMatcher
```

A helper class for Node.findall().

It checks that the given node is an instance of the specified node-classes and
has the specified node-attributes.

For example, following example searches ``reference`` node having ``refdomain``
and ``reftype`` attributes::

    matcher = NodeMatcher(nodes.reference, refdomain='std', reftype='citation')
    matcher.findall(doctree)
    # => [<reference ...>, <reference ...>, ...]

A special value ``typing.Any`` matches any kind of node-attributes.  For example,
following example searches ``reference`` node having ``refdomain`` attributes::

    matcher = NodeMatcher(nodes.reference, refdomain=Any)
    matcher.findall(doctree)
    # => [<reference ...>, <reference ...>, ...]

---
## get_full_module_name
```python
from nodes import get_full_module_name
```

Return full module dotted path like: 'docutils.nodes.paragraph'

:param nodes.Node node: target node
:return: full module dotted path

---
## repr_domxml
```python
from nodes import repr_domxml
```

return DOM XML representation of the specified node like:
'<paragraph translatable="False"><inline classes="versionadded">Added in version...'

:param nodes.Node node: target node
:param int length:
   length of return value to be striped. if false-value is specified, repr_domxml
   returns full of DOM XML representation.
:return: DOM XML representation

---
## apply_source_workaround
```python
from nodes import apply_source_workaround
```



---
## is_translatable
```python
from nodes import is_translatable
```



---
## extract_messages
```python
from nodes import extract_messages
```

Extract translatable messages from a document tree.

---
## get_node_source
```python
from nodes import get_node_source
```



---
## get_node_line
```python
from nodes import get_node_line
```



---
## traverse_parent
```python
from nodes import traverse_parent
```



---
## get_prev_node
```python
from nodes import get_prev_node
```



---
## traverse_translatable_index
```python
from nodes import traverse_translatable_index
```

Traverse translatable index node from a document tree.

---
## nested_parse_with_titles
```python
from nodes import nested_parse_with_titles
```

Version of state.nested_parse() that allows titles and does not require
titles to have the same decoration as the calling document.

This is useful when the parsed content comes from a completely different
context, such as docstrings.

This function is retained for compatibility and will be deprecated in
Sphinx 8. Prefer ``nested_parse_to_nodes()``.

---
## clean_astext
```python
from nodes import clean_astext
```

Like node.astext(), but ignore images.

---
## split_explicit_title
```python
from nodes import split_explicit_title
```

Split role content into title and target, if given.

---
## process_index_entry
```python
from nodes import process_index_entry
```



---
## inline_all_toctrees
```python
from nodes import inline_all_toctrees
```

Inline all toctrees in the *tree*.

Record all docnames in *docnameset*, and output docnames with *colorfunc*.

---
## _make_id
```python
from nodes import _make_id
```

Convert `string` into an identifier and return it.

This function is a modified version of ``docutils.nodes.make_id()`` of
docutils-0.16.

Changes:

* Allow to use capital alphabet characters
* Allow to use dots (".") and underscores ("_") for an identifier
  without a leading character.

# Author: David Goodger <goodger@python.org>
# Maintainer: docutils-develop@lists.sourceforge.net
# Copyright: This module has been placed in the public domain.

---
## find_pending_xref_condition
```python
from nodes import find_pending_xref_condition
```

Pick matched pending_xref_condition node up from the pending_xref.

---
## make_refnode
```python
from nodes import make_refnode
```

Shortcut to create a reference node.

---
## set_source_info
```python
from nodes import set_source_info
```



---
## set_role_source_info
```python
from nodes import set_role_source_info
```



---
## copy_source_info
```python
from nodes import copy_source_info
```



---
## is_smartquotable
```python
from nodes import is_smartquotable
```

Check whether the node is smart-quotable or not.

---
## process_only_nodes
```python
from nodes import process_only_nodes
```

Filter ``only`` nodes which do not match *tags*.

---
## _only_node_keep_children
```python
from nodes import _only_node_keep_children
```

Keep children if tags match or error.

---
## _copy_except__document
```python
from nodes import _copy_except__document
```

Monkey-patch ```nodes.Element.copy``` to not copy the ``_document``
attribute.

xref: https://github.com/sphinx-doc/sphinx/issues/11116#issuecomment-1376767086

---
## _deepcopy
```python
from nodes import _deepcopy
```

Monkey-patch ```nodes.Element.deepcopy``` for speed.

---
## match
```python
from nodes import match
```



---
## _get_tls_cacert
```python
from requests import _get_tls_cacert
```

Get additional CA cert for a specific URL.

---
## get
```python
from requests import get
```

Sends a GET request like ``requests.get()``.

This sets up User-Agent header and TLS verification automatically.

---
## head
```python
from requests import head
```

Sends a HEAD request like ``requests.head()``.

This sets up User-Agent header and TLS verification automatically.

---
## _Session
```python
from requests import _Session
```



---
## request
```python
from requests import request
```

Sends a request with an HTTP verb and url.

This sets up User-Agent header and TLS verification automatically.

---
## is_invalid_builtin_class
```python
from typing import is_invalid_builtin_class
```

Check *obj* is an invalid built-in class.

---
## ExtensionMetadata
```python
from typing import ExtensionMetadata
```

The metadata returned by an extension's ``setup()`` function.

See :ref:`ext-metadata`.

---
## get_type_hints
```python
from typing import get_type_hints
```

Return a dictionary containing type hints for a function, method, module or class
object.

This is a simple wrapper of `typing.get_type_hints()` that does not raise an error on
runtime.

---
## is_system_TypeVar
```python
from typing import is_system_TypeVar
```

Check *typ* is system defined TypeVar.

---
## _is_annotated_form
```python
from typing import _is_annotated_form
```

Check if *obj* is an annotated type.

---
## _is_unpack_form
```python
from typing import _is_unpack_form
```

Check if the object is :class:`typing.Unpack` or equivalent.

---
## restify
```python
from typing import restify
```

Convert a type-like object to a reST reference.

:param mode: Specify a method how annotations will be stringified.

             'fully-qualified-except-typing'
                 Show the module name and qualified name of the annotation except
                 the "typing" module.
             'smart'
                 Show the name of the annotation.

---
## _format_literal_arg_restify
```python
from typing import _format_literal_arg_restify
```



---
## stringify_annotation
```python
from typing import stringify_annotation
```

Stringify type annotation object.

:param annotation: The annotation to stringified.
:param mode: Specify a method how annotations will be stringified.

             'fully-qualified-except-typing'
                 Show the module name and qualified name of the annotation except
                 the "typing" module.
             'smart'
                 Show the name of the annotation.
             'fully-qualified'
                 Show the module name and qualified name of the annotation.

---
## _format_literal_arg_stringify
```python
from typing import _format_literal_arg_stringify
```



---
## __getattr__
```python
from typing import __getattr__
```



---
## RoleFunction
```python
from typing import RoleFunction
```



---
## SerialTasks
```python
from parallel import SerialTasks
```

Has the same interface as ParallelTasks, but executes tasks directly.

---
## ParallelTasks
```python
from parallel import ParallelTasks
```

Executes *nproc* tasks in parallel after forking.

---
## make_chunks
```python
from parallel import make_chunks
```



---
## __init__
```python
from parallel import __init__
```



---
## add_task
```python
from parallel import add_task
```



---
## join
```python
from parallel import join
```



---
## _process
```python
from parallel import _process
```



---
## terminate
```python
from parallel import terminate
```



---
## _join_one
```python
from parallel import _join_one
```



---
## escape
```python
from rst import escape
```



---
## textwidth
```python
from rst import textwidth
```

Get width of text.

---
## heading
```python
from rst import heading
```

Create a heading for *level*.

---
## default_role
```python
from rst import default_role
```



---
## prepend_prolog
```python
from rst import prepend_prolog
```

Prepend a string to content body as prolog.

---
## append_epilog
```python
from rst import append_epilog
```

Append a string to content body as epilog.

---
## charwidth
```python
from rst import charwidth
```



---
## __name__
```python
from inventory import __name__
```

Inventory utility functions for Sphinx.

---
## InventoryFileReader
```python
from inventory import InventoryFileReader
```

A file reader for an inventory file.

This reader supports mixture of texts and compressed texts.

---
## InventoryFile
```python
from inventory import InventoryFile
```



---
## __init__
```python
from inventory import __init__
```



---
## read_buffer
```python
from inventory import read_buffer
```



---
## readline
```python
from inventory import readline
```



---
## readlines
```python
from inventory import readlines
```



---
## read_compressed_chunks
```python
from inventory import read_compressed_chunks
```



---
## read_compressed_lines
```python
from inventory import read_compressed_lines
```



---
## load
```python
from inventory import load
```



---
## load_v1
```python
from inventory import load_v1
```



---
## load_v2
```python
from inventory import load_v2
```



---
## dump
```python
from inventory import dump
```



---
## escape
```python
from inventory import escape
```



---
## TexinfoBuilder
```python
from texinfo import TexinfoBuilder
```

Builds Texinfo output to create Info documentation.

---
## default_texinfo_documents
```python
from texinfo import default_texinfo_documents
```

Better default texinfo_documents settings.

---
## setup
```python
from texinfo import setup
```



---
## init
```python
from texinfo import init
```



---
## get_outdated_docs
```python
from texinfo import get_outdated_docs
```



---
## get_target_uri
```python
from texinfo import get_target_uri
```



---
## get_relative_uri
```python
from texinfo import get_relative_uri
```



---
## init_document_data
```python
from texinfo import init_document_data
```



---
## write
```python
from texinfo import write
```



---
## assemble_doctree
```python
from texinfo import assemble_doctree
```



---
## copy_assets
```python
from texinfo import copy_assets
```



---
## copy_image_files
```python
from texinfo import copy_image_files
```



---
## copy_support_files
```python
from texinfo import copy_support_files
```



---
## __name__
```python
from changes import __name__
```

Changelog builder.

---
## ChangesBuilder
```python
from changes import ChangesBuilder
```

Write a summary with all versionadded/changed/deprecated/removed directives.

---
## setup
```python
from changes import setup
```



---
## init
```python
from changes import init
```



---
## get_outdated_docs
```python
from changes import get_outdated_docs
```



---
## write
```python
from changes import write
```



---
## hl
```python
from changes import hl
```



---
## finish
```python
from changes import finish
```



---
## ManualPageBuilder
```python
from manpage import ManualPageBuilder
```

Builds groff output in manual page format.

---
## default_man_pages
```python
from manpage import default_man_pages
```

Better default man_pages settings.

---
## setup
```python
from manpage import setup
```



---
## init
```python
from manpage import init
```



---
## get_outdated_docs
```python
from manpage import get_outdated_docs
```



---
## get_target_uri
```python
from manpage import get_target_uri
```



---
## write
```python
from manpage import write
```



---
## finish
```python
from manpage import finish
```



---
## __name__
```python
from gettext import __name__
```

The MessageCatalogBuilder class.

---
## Message
```python
from gettext import Message
```

An entry of translatable message.

---
## Catalog
```python
from gettext import Catalog
```

Catalog of translatable messages.

---
## MsgOrigin
```python
from gettext import MsgOrigin
```

Origin holder for Catalog message origin.

---
## GettextRenderer
```python
from gettext import GettextRenderer
```



---
## I18nTags
```python
from gettext import I18nTags
```

Dummy tags module for I18nBuilder.

To ensure that all text inside ``only`` nodes is translated,
this class always returns ``True`` regardless the defined tags.

---
## I18nBuilder
```python
from gettext import I18nBuilder
```

General i18n builder.

---
## should_write
```python
from gettext import should_write
```



---
## _is_node_in_substitution_definition
```python
from gettext import _is_node_in_substitution_definition
```

Check "node" to test if it is in a substitution definition.

---
## MessageCatalogBuilder
```python
from gettext import MessageCatalogBuilder
```

Builds gettext-style message catalogs (.pot files).

---
## _gettext_compact_validator
```python
from gettext import _gettext_compact_validator
```



---
## setup
```python
from gettext import setup
```



---
## __init__
```python
from gettext import __init__
```



---
## add
```python
from gettext import add
```



---
## __iter__
```python
from gettext import __iter__
```



---
## render
```python
from gettext import render
```



---
## eval_condition
```python
from gettext import eval_condition
```



---
## init
```python
from gettext import init
```



---
## get_target_uri
```python
from gettext import get_target_uri
```



---
## get_outdated_docs
```python
from gettext import get_outdated_docs
```



---
## prepare_writing
```python
from gettext import prepare_writing
```



---
## compile_catalogs
```python
from gettext import compile_catalogs
```



---
## write_doc
```python
from gettext import write_doc
```



---
## _collect_templates
```python
from gettext import _collect_templates
```



---
## _extract_from_template
```python
from gettext import _extract_from_template
```



---
## build
```python
from gettext import build
```



---
## finish
```python
from gettext import finish
```



---
## escape
```python
from gettext import escape
```



---
## _relpath
```python
from gettext import _relpath
```



---
## XMLBuilder
```python
from xml import XMLBuilder
```

Builds Docutils-native XML.

---
## PseudoXMLBuilder
```python
from xml import PseudoXMLBuilder
```

Builds pseudo-XML for display purposes.

---
## setup
```python
from xml import setup
```



---
## init
```python
from xml import init
```



---
## get_outdated_docs
```python
from xml import get_outdated_docs
```



---
## get_target_uri
```python
from xml import get_target_uri
```



---
## prepare_writing
```python
from xml import prepare_writing
```



---
## write_doc
```python
from xml import write_doc
```



---
## finish
```python
from xml import finish
```



---
## Builder
```python
from __init__ import Builder
```

Builds target formats from the reST sources.

---
## get_translator_class
```python
from __init__ import get_translator_class
```

Return a class of translator.

---
## create_translator
```python
from __init__ import create_translator
```

Return an instance of translator.

This method returns an instance of ``default_translator_class`` by default.
Users can replace the translator class with ``app.set_translator()`` API.

---
## create_template_bridge
```python
from __init__ import create_template_bridge
```

Return the template bridge configured.

---
## get_target_uri
```python
from __init__ import get_target_uri
```



---
## get_relative_uri
```python
from __init__ import get_relative_uri
```



---
## get_outdated_docs
```python
from __init__ import get_outdated_docs
```

Return a list of docnames to re-read.

This method is called before reading the documents.

.. seealso:: :event:`env-get-outdated`

---
## get_asset_paths
```python
from __init__ import get_asset_paths
```



---
## post_process_images
```python
from __init__ import post_process_images
```

Pick the best candidate for an image and link down-scaled images to
their high resolution version.

---
## compile_catalogs
```python
from __init__ import compile_catalogs
```



---
## compile_all_catalogs
```python
from __init__ import compile_all_catalogs
```



---
## compile_specific_catalogs
```python
from __init__ import compile_specific_catalogs
```



---
## compile_update_catalogs
```python
from __init__ import compile_update_catalogs
```



---
## build_all
```python
from __init__ import build_all
```

Build all source files.

---
## build_specific
```python
from __init__ import build_specific
```

Only rebuild as much as needed for changes in the *filenames*.

---
## build_update
```python
from __init__ import build_update
```

Only rebuild what was changed or added since last build.

---
## _read_serial
```python
from __init__ import _read_serial
```



---
## _read_parallel
```python
from __init__ import _read_parallel
```



---
## read_doc
```python
from __init__ import read_doc
```

Parse a file and add/update inventory entries for the doctree.

---
## write_doctree
```python
from __init__ import write_doctree
```

Write the doctree to a file, to be used as a cache by re-builds.

---
## _write_serial
```python
from __init__ import _write_serial
```



---
## _write_parallel
```python
from __init__ import _write_parallel
```



---
## prepare_writing
```python
from __init__ import prepare_writing
```



---
## copy_assets
```python
from __init__ import copy_assets
```



---
## write_doc
```python
from __init__ import write_doc
```



---
## write_doc_serialized
```python
from __init__ import write_doc_serialized
```



---
## cleanup
```python
from __init__ import cleanup
```



---
## get_builder_config
```python
from __init__ import get_builder_config
```

Return a builder specific option.

This method allows customization of common builder settings by
inserting the name of the current builder in the option key.
If the key does not exist, use default as builder name.

---
## cat2relpath
```python
from __init__ import cat2relpath
```



---
## to_domain
```python
from __init__ import to_domain
```



---
## read_process
```python
from __init__ import read_process
```



---
## write_process
```python
from __init__ import write_process
```



---
## on_chunk_done
```python
from __init__ import on_chunk_done
```



---
## TextBuilder
```python
from text import TextBuilder
```



---
## setup
```python
from text import setup
```



---
## init
```python
from text import init
```



---
## get_outdated_docs
```python
from text import get_outdated_docs
```



---
## get_target_uri
```python
from text import get_target_uri
```



---
## prepare_writing
```python
from text import prepare_writing
```



---
## write_doc
```python
from text import write_doc
```



---
## finish
```python
from text import finish
```



---
## __name__
```python
from linkcheck import __name__
```

The CheckExternalLinksBuilder class.

---
## CheckExternalLinksBuilder
```python
from linkcheck import CheckExternalLinksBuilder
```

Checks for broken external links.

---
## HyperlinkCollector
```python
from linkcheck import HyperlinkCollector
```



---
## Hyperlink
```python
from linkcheck import Hyperlink
```



---
## HyperlinkAvailabilityChecker
```python
from linkcheck import HyperlinkAvailabilityChecker
```



---
## CheckRequest
```python
from linkcheck import CheckRequest
```



---
## CheckResult
```python
from linkcheck import CheckResult
```



---
## HyperlinkAvailabilityCheckWorker
```python
from linkcheck import HyperlinkAvailabilityCheckWorker
```

A worker class for checking the availability of hyperlinks.

---
## _get_request_headers
```python
from linkcheck import _get_request_headers
```



---
## contains_anchor
```python
from linkcheck import contains_anchor
```

Determine if an anchor is contained within an HTTP response.

---
## AnchorCheckParser
```python
from linkcheck import AnchorCheckParser
```

Specialised HTML parser that looks for a specific anchor.

---
## _allowed_redirect
```python
from linkcheck import _allowed_redirect
```



---
## RateLimit
```python
from linkcheck import RateLimit
```



---
## rewrite_github_anchor
```python
from linkcheck import rewrite_github_anchor
```

Rewrite anchor name of the hyperlink to github.com

The hyperlink anchors in github.com are dynamically generated.  This rewrites
them before checking and makes them comparable.

---
## compile_linkcheck_allowed_redirects
```python
from linkcheck import compile_linkcheck_allowed_redirects
```

Compile patterns in linkcheck_allowed_redirects to the regexp objects.

---
## setup
```python
from linkcheck import setup
```



---
## init
```python
from linkcheck import init
```



---
## finish
```python
from linkcheck import finish
```



---
## process_result
```python
from linkcheck import process_result
```



---
## write_linkstat
```python
from linkcheck import write_linkstat
```



---
## write_entry
```python
from linkcheck import write_entry
```



---
## run
```python
from linkcheck import run
```



---
## find_uri
```python
from linkcheck import find_uri
```

Find a URI for a given node.

This call can be used to retrieve a URI from a provided node. If no
URI exists for a provided node, this call will return ``None``.

This method can be useful for extension developers who wish to
easily inject hyperlinks into a builder by only needing to override
this method.

:param node: A node class
:returns: URI of the node

---
## _add_uri
```python
from linkcheck import _add_uri
```

Registers a node's URI into a builder's collection of hyperlinks.

Provides the ability to register a URI value determined from a node
into the linkcheck's builder. URI's processed through this call can
be manipulated through a ``linkcheck-process-uri`` event before the
builder attempts to validate.

:param uri: URI to add
:param node: A node class where the URI was found

---
## __init__
```python
from linkcheck import __init__
```



---
## check
```python
from linkcheck import check
```



---
## invoke_threads
```python
from linkcheck import invoke_threads
```



---
## shutdown_threads
```python
from linkcheck import shutdown_threads
```



---
## is_ignored_uri
```python
from linkcheck import is_ignored_uri
```



---
## _check
```python
from linkcheck import _check
```



---
## _retrieval_methods
```python
from linkcheck import _retrieval_methods
```



---
## _check_uri
```python
from linkcheck import _check_uri
```



---
## limit_rate
```python
from linkcheck import limit_rate
```



---
## handle_starttag
```python
from linkcheck import handle_starttag
```



---
## __name__
```python
from dirhtml import __name__
```

Directory HTML builders.

---
## DirectoryHTMLBuilder
```python
from dirhtml import DirectoryHTMLBuilder
```

A StandaloneHTMLBuilder that creates all HTML pages as "index.html" in
a directory given by their pagename, so that generated URLs don't have
``.html`` in them.

---
## setup
```python
from dirhtml import setup
```



---
## get_target_uri
```python
from dirhtml import get_target_uri
```



---
## get_outfilename
```python
from dirhtml import get_outfilename
```



---
## __name__
```python
from singlehtml import __name__
```

Single HTML builders.

---
## SingleFileHTMLBuilder
```python
from singlehtml import SingleFileHTMLBuilder
```

A StandaloneHTMLBuilder subclass that puts the whole document tree on one
HTML page.

---
## setup
```python
from singlehtml import setup
```



---
## get_outdated_docs
```python
from singlehtml import get_outdated_docs
```



---
## get_target_uri
```python
from singlehtml import get_target_uri
```



---
## get_relative_uri
```python
from singlehtml import get_relative_uri
```



---
## fix_refuris
```python
from singlehtml import fix_refuris
```



---
## _get_local_toctree
```python
from singlehtml import _get_local_toctree
```



---
## assemble_doctree
```python
from singlehtml import assemble_doctree
```



---
## assemble_toc_secnumbers
```python
from singlehtml import assemble_toc_secnumbers
```



---
## assemble_toc_fignumbers
```python
from singlehtml import assemble_toc_fignumbers
```



---
## get_doc_context
```python
from singlehtml import get_doc_context
```



---
## write
```python
from singlehtml import write
```



---
## finish
```python
from singlehtml import finish
```



---
## write_additional_files
```python
from singlehtml import write_additional_files
```



---
## __name__
```python
from dummy import __name__
```

Do syntax checks, but no writing.

---
## DummyBuilder
```python
from dummy import DummyBuilder
```



---
## setup
```python
from dummy import setup
```



---
## init
```python
from dummy import init
```



---
## get_outdated_docs
```python
from dummy import get_outdated_docs
```



---
## get_target_uri
```python
from dummy import get_target_uri
```



---
## prepare_writing
```python
from dummy import prepare_writing
```



---
## write_doc
```python
from dummy import write_doc
```



---
## finish
```python
from dummy import finish
```



---
## __name__
```python
from _epub_base import __name__
```

Base class of epub2/epub3 builders.

---
## ManifestItem
```python
from _epub_base import ManifestItem
```



---
## Spine
```python
from _epub_base import Spine
```



---
## Guide
```python
from _epub_base import Guide
```



---
## NavPoint
```python
from _epub_base import NavPoint
```



---
## sphinx_smarty_pants
```python
from _epub_base import sphinx_smarty_pants
```



---
## EpubBuilder
```python
from _epub_base import EpubBuilder
```

Builder that outputs epub files.

It creates the metainfo files container.opf, toc.ncx, mimetype, and
META-INF/container.xml.  Afterwards, all necessary files are zipped to an
epub file.

---
## init
```python
from _epub_base import init
```



---
## create_build_info
```python
from _epub_base import create_build_info
```



---
## get_theme_config
```python
from _epub_base import get_theme_config
```



---
## make_id
```python
from _epub_base import make_id
```

Return a unique id for name.

---
## get_refnodes
```python
from _epub_base import get_refnodes
```

Collect section titles, their depth in the toc and the refuri.

---
## check_refnodes
```python
from _epub_base import check_refnodes
```



---
## get_toc
```python
from _epub_base import get_toc
```

Get the total table of contents, containing the root_doc
and pre and post files not managed by sphinx.

---
## toc_add_files
```python
from _epub_base import toc_add_files
```

Add the root_doc, pre and post files to a list of refnodes.
        

---
## fix_fragment
```python
from _epub_base import fix_fragment
```

Return a href/id attribute with colons replaced by hyphens.

---
## fix_ids
```python
from _epub_base import fix_ids
```

Replace colons with hyphens in href and id attributes.

Some readers crash because they interpret the part as a
transport protocol specification.

---
## add_visible_links
```python
from _epub_base import add_visible_links
```

Add visible link targets for external links

---
## write_doc
```python
from _epub_base import write_doc
```

Write one document file.

This method is overwritten in order to fix fragment identifiers
and to add visible external links.

---
## fix_genindex
```python
from _epub_base import fix_genindex
```

Fix href attributes for genindex pages.

---
## is_vector_graphics
```python
from _epub_base import is_vector_graphics
```

Does the filename extension indicate a vector graphic format?

---
## copy_image_files_pil
```python
from _epub_base import copy_image_files_pil
```

Copy images using Pillow, the Python Imaging Library.
The method tries to read and write the files with Pillow, converting
the format and resizing the image if necessary/possible.

---
## copy_image_files
```python
from _epub_base import copy_image_files
```

Copy image files to destination directory.
This overwritten method can use Pillow to convert image files.

---
## copy_download_files
```python
from _epub_base import copy_download_files
```



---
## handle_page
```python
from _epub_base import handle_page
```

Create a rendered page.

This method is overwritten for genindex pages in order to fix href link
attributes.

---
## build_mimetype
```python
from _epub_base import build_mimetype
```

Write the metainfo file mimetype.

---
## build_container
```python
from _epub_base import build_container
```

Write the metainfo file META-INF/container.xml.

---
## content_metadata
```python
from _epub_base import content_metadata
```

Create a dictionary with all metadata for the content.opf
file properly escaped.

---
## build_content
```python
from _epub_base import build_content
```

Write the metainfo file content.opf It contains bibliographic data,
a file list and the spine (the reading order).

---
## new_navpoint
```python
from _epub_base import new_navpoint
```

Create a new entry in the toc from the node at given level.

---
## build_navpoints
```python
from _epub_base import build_navpoints
```

Create the toc navigation structure.

Subelements of a node are nested inside the navpoint.  For nested nodes
the parent node is reinserted in the subnav.

---
## toc_metadata
```python
from _epub_base import toc_metadata
```

Create a dictionary with all metadata for the toc.ncx file
properly escaped.

---
## build_toc
```python
from _epub_base import build_toc
```

Write the metainfo file toc.ncx.

---
## build_epub
```python
from _epub_base import build_epub
```

Write the epub file.

It is a zip file with the mimetype file stored uncompressed as the first
entry.

---
## update_node_id
```python
from _epub_base import update_node_id
```

Update IDs of given *node*.

---
## make_footnote_ref
```python
from _epub_base import make_footnote_ref
```

Create a footnote_reference node with children

---
## make_footnote
```python
from _epub_base import make_footnote
```

Create a footnote node with children

---
## footnote_spot
```python
from _epub_base import footnote_spot
```

Find or create a spot to place footnotes.

The function returns the tuple (parent, index).

---
## __name__
```python
from epub3 import __name__
```

Build epub3 files.

Originally derived from epub.py.

---
## NavPoint
```python
from epub3 import NavPoint
```



---
## Epub3Builder
```python
from epub3 import Epub3Builder
```

Builder that outputs epub3 files.

It creates the metainfo files content.opf, nav.xhtml, toc.ncx, mimetype,
and META-INF/container.xml. Afterwards, all necessary files are zipped to
an epub file.

---
## validate_config_values
```python
from epub3 import validate_config_values
```



---
## convert_epub_css_files
```python
from epub3 import convert_epub_css_files
```

Convert string styled epub_css_files to tuple styled one.

---
## setup
```python
from epub3 import setup
```



---
## handle_finish
```python
from epub3 import handle_finish
```

Create the metainfo files and finally the epub.

---
## content_metadata
```python
from epub3 import content_metadata
```

Create a dictionary with all metadata for the content.opf
file properly escaped.

---
## prepare_writing
```python
from epub3 import prepare_writing
```



---
## build_navlist
```python
from epub3 import build_navlist
```

Create the toc navigation structure.

This method is almost same as build_navpoints method in epub.py.
This is because the logical navigation structure of epub3 is not
different from one of epub2.

The difference from build_navpoints method is templates which are used
when generating navigation documents.

---
## navigation_doc_metadata
```python
from epub3 import navigation_doc_metadata
```

Create a dictionary with all metadata for the nav.xhtml file
properly escaped.

---
## build_navigation_doc
```python
from epub3 import build_navigation_doc
```

Write the metainfo file nav.xhtml.

---
## __name__
```python
from imgconverter import __name__
```

Image converter extension for Sphinx

---
## ImagemagickConverter
```python
from imgconverter import ImagemagickConverter
```



---
## setup
```python
from imgconverter import setup
```



---
## is_available
```python
from imgconverter import is_available
```

Confirms the converter is available or not.

---
## convert
```python
from imgconverter import convert
```

Converts the image to expected one.

---
## __name__
```python
from extlinks import __name__
```

Extension to save typing and prevent hard-coding of base URLs in reST files.

This adds a new config value called ``extlinks`` that is created like this::

   extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...}

Now you can use e.g. :exmpl:`foo` in your documents.  This will create a
link to ``https://example.invalid/foo.html``.  The link caption depends on
the *caption* value given:

- If it is ``None``, the caption will be the full URL.
- If it is a string, it must contain ``%s`` exactly once.  In this case the
  caption will be *caption* with the role content substituted for ``%s``.

You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.

Both, the url string and the caption string must escape ``%`` as ``%%``.

---
## ExternalLinksChecker
```python
from extlinks import ExternalLinksChecker
```

For each external link, check if it can be replaced by an extlink.

We treat each ``reference`` node without ``internal`` attribute as an external link.

---
## make_link_role
```python
from extlinks import make_link_role
```



---
## setup_link_roles
```python
from extlinks import setup_link_roles
```



---
## setup
```python
from extlinks import setup
```



---
## run
```python
from extlinks import run
```



---
## check_uri
```python
from extlinks import check_uri
```

If the URI in ``refnode`` has a replacement in ``extlinks``,
emit a warning with a replacement suggestion.

---
## role
```python
from extlinks import role
```



---
## __name__
```python
from apidoc import __name__
```

Creates reST files corresponding to Python modules for code documentation.

Parses a directory tree looking for Python modules and packages and creates
ReST files appropriately to create code documentation with Sphinx.  It also
creates a modules index (named modules.<suffix>).

This is derived from the "sphinx-autopackage" script, which is:
Copyright 2008 Société des arts technologiques (SAT),
https://sat.qc.ca/

---
## is_initpy
```python
from apidoc import is_initpy
```

Check *filename* is __init__ file or not.

---
## module_join
```python
from apidoc import module_join
```

Join module names with dots.

---
## is_packagedir
```python
from apidoc import is_packagedir
```

Check given *files* contains __init__ file.

---
## write_file
```python
from apidoc import write_file
```

Write the output file for module/package <name>.

---
## create_module_file
```python
from apidoc import create_module_file
```

Build the text of the file and write the file.

---
## create_package_file
```python
from apidoc import create_package_file
```

Build the text of the file and write the file.

Also create submodules if necessary.

:returns: list of written files

---
## create_modules_toc_file
```python
from apidoc import create_modules_toc_file
```

Create the module's index.

---
## is_skipped_package
```python
from apidoc import is_skipped_package
```

Check if we want to skip this module.

---
## is_skipped_module
```python
from apidoc import is_skipped_module
```

Check if we want to skip this module.

---
## walk
```python
from apidoc import walk
```

Walk through the directory and list files and subdirectories up.

---
## has_child_module
```python
from apidoc import has_child_module
```

Check the given directory contains child module/s (at least one).

---
## recurse_tree
```python
from apidoc import recurse_tree
```

Look for every file in the directory tree and create the corresponding
ReST files.

---
## is_excluded
```python
from apidoc import is_excluded
```

Check if the directory is in the exclude list.

Note: by having trailing slashes, we avoid common prefix issues, like
      e.g. an exclude "foo" also accidentally excluding "foobar".

---
## get_parser
```python
from apidoc import get_parser
```



---
## CliOptions
```python
from apidoc import CliOptions
```

Arguments parsed from the command line.

---
## main
```python
from apidoc import main
```

Parse and check the command line arguments.

---
## __name__
```python
from mathjax import __name__
```

Allow `MathJax`_ to be used to display math in Sphinx's HTML writer.

This requires the MathJax JavaScript library on your webserver/computer.

.. _MathJax: https://www.mathjax.org/

---
## html_visit_math
```python
from mathjax import html_visit_math
```



---
## html_visit_displaymath
```python
from mathjax import html_visit_displaymath
```



---
## install_mathjax
```python
from mathjax import install_mathjax
```



---
## setup
```python
from mathjax import setup
```



---
## GraphvizError
```python
from graphviz import GraphvizError
```



---
## ClickableMapDefinition
```python
from graphviz import ClickableMapDefinition
```

A manipulator for clickable map file of graphviz.

---
## graphviz
```python
from graphviz import graphviz
```



---
## figure_wrapper
```python
from graphviz import figure_wrapper
```



---
## align_spec
```python
from graphviz import align_spec
```



---
## Graphviz
```python
from graphviz import Graphviz
```

Directive to insert arbitrary dot markup.

---
## GraphvizSimple
```python
from graphviz import GraphvizSimple
```

Directive to insert arbitrary dot markup.

---
## fix_svg_relative_paths
```python
from graphviz import fix_svg_relative_paths
```

Change relative links in generated svg files to be relative to imgpath.

---
## render_dot
```python
from graphviz import render_dot
```

Render graphviz code into a PNG or PDF output file.

---
## render_dot_html
```python
from graphviz import render_dot_html
```



---
## html_visit_graphviz
```python
from graphviz import html_visit_graphviz
```



---
## render_dot_latex
```python
from graphviz import render_dot_latex
```



---
## latex_visit_graphviz
```python
from graphviz import latex_visit_graphviz
```



---
## render_dot_texinfo
```python
from graphviz import render_dot_texinfo
```



---
## texinfo_visit_graphviz
```python
from graphviz import texinfo_visit_graphviz
```



---
## text_visit_graphviz
```python
from graphviz import text_visit_graphviz
```



---
## man_visit_graphviz
```python
from graphviz import man_visit_graphviz
```



---
## on_config_inited
```python
from graphviz import on_config_inited
```



---
## setup
```python
from graphviz import setup
```



---
## __init__
```python
from graphviz import __init__
```



---
## parse
```python
from graphviz import parse
```



---
## generate_clickable_map
```python
from graphviz import generate_clickable_map
```

Generate clickable map tags if clickable item exists.

If not exists, this only returns empty string.

---
## run
```python
from graphviz import run
```



---
## __name__
```python
from githubpages import __name__
```

To publish HTML docs at GitHub Pages, create .nojekyll file.

---
## _get_domain_from_url
```python
from githubpages import _get_domain_from_url
```

Get the domain from a URL.

---
## create_nojekyll_and_cname
```python
from githubpages import create_nojekyll_and_cname
```

Manage the ``.nojekyll`` and ``CNAME`` files for GitHub Pages.

For HTML-format builders (e.g. 'html', 'dirhtml') we unconditionally create
the ``.nojekyll`` file to signal that GitHub Pages should not run Jekyll
processing.

If the :confval:`html_baseurl` option is set, we also create a CNAME file
with the domain from ``html_baseurl``, so long as it is not a ``github.io``
domain.

If this extension is loaded and the domain in ``html_baseurl`` no longer
requires a CNAME file, we remove any existing ``CNAME`` files from the
output directory.

---
## setup
```python
from githubpages import setup
```



---
## __name__
```python
from duration import __name__
```

Measure document reading durations.

---
## DurationDomain
```python
from duration import DurationDomain
```

A domain for durations of Sphinx processing.

---
## on_builder_inited
```python
from duration import on_builder_inited
```

Initialize DurationDomain on bootstrap.

This clears the results of the last build.

---
## on_source_read
```python
from duration import on_source_read
```

Start to measure reading duration.

---
## on_doctree_read
```python
from duration import on_doctree_read
```

Record a reading duration.

---
## on_build_finished
```python
from duration import on_build_finished
```

Display duration ranking on the current build.

---
## setup
```python
from duration import setup
```



---
## _DurationDomainData
```python
from duration import _DurationDomainData
```



---
## reading_durations
```python
from duration import reading_durations
```



---
## note_reading_duration
```python
from duration import note_reading_duration
```



---
## clear
```python
from duration import clear
```



---
## clear_doc
```python
from duration import clear_doc
```



---
## merge_domaindata
```python
from duration import merge_domaindata
```



---
## __name__
```python
from linkcode import __name__
```

Add external links to module code in Python object descriptions.

---
## LinkcodeError
```python
from linkcode import LinkcodeError
```



---
## doctree_read
```python
from linkcode import doctree_read
```



---
## setup
```python
from linkcode import setup
```



---
## __name__
```python
from coverage import __name__
```

Check Python modules and C API for coverage.

Mostly written by Josip Dzolonga for the Google Highly Open Participation
contest.

---
## write_header
```python
from coverage import write_header
```



---
## compile_regex_list
```python
from coverage import compile_regex_list
```



---
## _write_table
```python
from coverage import _write_table
```



---
## _add_line
```python
from coverage import _add_line
```



---
## _add_row
```python
from coverage import _add_row
```



---
## _load_modules
```python
from coverage import _load_modules
```

Recursively load all submodules.

:param mod_name: The name of a module to load submodules for.
:param ignored_module_exps: A list of regexes for modules to ignore.
:returns: A set of modules names including the provided module name,
    ``mod_name``
:raises ImportError: If the module indicated by ``mod_name`` could not be
    loaded.

---
## _determine_py_coverage_modules
```python
from coverage import _determine_py_coverage_modules
```

Return a sorted list of modules to check for coverage.

Figure out which of the two operating modes to use:

- If 'coverage_modules' is not specified, we check coverage for all modules
  seen in the documentation tree. Any objects found in these modules that are
  not documented will be noted. This will therefore only identify missing
  objects, but it requires no additional configuration.

- If 'coverage_modules' is specified, we check coverage for all modules
  specified in this configuration value. Any objects found in these modules
  that are not documented will be noted. In addition, any objects from other
  modules that are documented will be noted. This will therefore identify both
  missing modules and missing objects, but it requires manual configuration.

---
## CoverageBuilder
```python
from coverage import CoverageBuilder
```

Evaluates coverage of code in the documentation.

---
## setup
```python
from coverage import setup
```



---
## init
```python
from coverage import init
```



---
## get_outdated_docs
```python
from coverage import get_outdated_docs
```



---
## write
```python
from coverage import write
```



---
## build_c_coverage
```python
from coverage import build_c_coverage
```



---
## write_c_coverage
```python
from coverage import write_c_coverage
```



---
## ignore_pyobj
```python
from coverage import ignore_pyobj
```



---
## build_py_coverage
```python
from coverage import build_py_coverage
```



---
## _write_py_statistics
```python
from coverage import _write_py_statistics
```

Outputs the table of ``op``.

---
## write_py_coverage
```python
from coverage import write_py_coverage
```



---
## finish
```python
from coverage import finish
```



---
## __name__
```python
from imgmath import __name__
```

Render math in HTML via dvipng or dvisvgm.

---
## MathExtError
```python
from imgmath import MathExtError
```



---
## InvokeError
```python
from imgmath import InvokeError
```

errors on invoking converters.

---
## read_svg_depth
```python
from imgmath import read_svg_depth
```

Read the depth from comment at last line of SVG file
    

---
## write_svg_depth
```python
from imgmath import write_svg_depth
```

Write the depth to SVG file as a comment at end of file
    

---
## generate_latex_macro
```python
from imgmath import generate_latex_macro
```

Generate LaTeX macro.

---
## ensure_tempdir
```python
from imgmath import ensure_tempdir
```

Create temporary directory.

use only one tempdir per build -- the use of a directory is cleaner
than using temporary files, since we can clean up everything at once
just removing the whole directory (see cleanup_tempdir)

---
## compile_math
```python
from imgmath import compile_math
```

Compile LaTeX macros for math to DVI.

---
## convert_dvi_to_image
```python
from imgmath import convert_dvi_to_image
```

Convert DVI file to specific image format.

---
## convert_dvi_to_png
```python
from imgmath import convert_dvi_to_png
```

Convert DVI file to PNG image.

---
## convert_dvi_to_svg
```python
from imgmath import convert_dvi_to_svg
```

Convert DVI file to SVG image.

---
## render_math
```python
from imgmath import render_math
```

Render the LaTeX math expression *math* using latex and dvipng or
dvisvgm.

Return the image absolute filename and the "depth",
that is, the distance of image bottom and baseline in pixels, if the
option to use preview_latex is switched on.

Error handling may seem strange, but follows a pattern: if LaTeX or dvipng
(dvisvgm) aren't available, only a warning is generated (since that enables
people on machines without these programs to at least build the rest of the
docs successfully).  If the programs are there, however, they may not fail
since that indicates a problem in the math source.

---
## render_maths_to_base64
```python
from imgmath import render_maths_to_base64
```



---
## clean_up_files
```python
from imgmath import clean_up_files
```



---
## get_tooltip
```python
from imgmath import get_tooltip
```



---
## html_visit_math
```python
from imgmath import html_visit_math
```



---
## html_visit_displaymath
```python
from imgmath import html_visit_displaymath
```



---
## setup
```python
from imgmath import setup
```



---
## __init__
```python
from imgmath import __init__
```



---
## __name__
```python
from inheritance_diagram import __name__
```

Defines a docutils directive for inserting inheritance diagrams.

Provide the directive with one or more classes or modules (separated
by whitespace).  For modules, all of the classes in that module will
be used.

Example::

   Given the following classes:

   class A: pass
   class B(A): pass
   class C(A): pass
   class D(B, C): pass
   class E(B): pass

   .. inheritance-diagram: D E

   Produces a graph like the following:

               A
              / \
             B   C
            / \ /
           E   D

The graph is inserted as a PNG+image map into HTML and a PDF in
LaTeX.

---
## try_import
```python
from inheritance_diagram import try_import
```

Import a object or module using *name* and *currentmodule*.
*name* should be a relative name from *currentmodule* or
a fully-qualified name.

Returns imported object or module.  If failed, returns None value.

---
## import_classes
```python
from inheritance_diagram import import_classes
```

Import a class using its fully-qualified *name*.

---
## InheritanceException
```python
from inheritance_diagram import InheritanceException
```



---
## InheritanceGraph
```python
from inheritance_diagram import InheritanceGraph
```

Given a list of classes, determines the set of classes that they inherit
from all the way to the root "object", and then is able to generate a
graphviz dot graph from them.

---
## inheritance_diagram
```python
from inheritance_diagram import inheritance_diagram
```

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

---
## InheritanceDiagram
```python
from inheritance_diagram import InheritanceDiagram
```

Run when the inheritance_diagram directive is first encountered.

---
## get_graph_hash
```python
from inheritance_diagram import get_graph_hash
```



---
## html_visit_inheritance_diagram
```python
from inheritance_diagram import html_visit_inheritance_diagram
```

Output the graph for HTML.  This will insert a PNG with clickable
image map.

---
## latex_visit_inheritance_diagram
```python
from inheritance_diagram import latex_visit_inheritance_diagram
```

Output the graph for LaTeX.  This will insert a PDF.

---
## texinfo_visit_inheritance_diagram
```python
from inheritance_diagram import texinfo_visit_inheritance_diagram
```

Output the graph for Texinfo.  This will insert a PNG.

---
## skip
```python
from inheritance_diagram import skip
```



---
## setup
```python
from inheritance_diagram import setup
```



---
## __init__
```python
from inheritance_diagram import __init__
```

*class_names* is a list of child classes to show bases from.

If *show_builtins* is True, then Python builtins will be shown
in the graph.

---
## _import_classes
```python
from inheritance_diagram import _import_classes
```

Import a list of classes.

---
## _class_info
```python
from inheritance_diagram import _class_info
```

Return name and bases for all classes that are ancestors of
*classes*.

*parts* gives the number of dotted name parts to include in the
displayed node names, from right to left. If given as a negative, the
number of parts to drop from the left. A value of 0 displays the full
dotted name. E.g. ``sphinx.ext.inheritance_diagram.InheritanceGraph``
with ``parts=2`` or ``parts=-2`` gets displayed as
``inheritance_diagram.InheritanceGraph``, and as
``ext.inheritance_diagram.InheritanceGraph`` with ``parts=3`` or
``parts=-1``.

*top_classes* gives the name(s) of the top most ancestor class to
traverse to. Multiple names can be specified separated by comma.

---
## class_name
```python
from inheritance_diagram import class_name
```

Given a class object, return a fully-qualified name.

This works for things I've tested in matplotlib so far, but may not be
completely general.

---
## get_all_class_names
```python
from inheritance_diagram import get_all_class_names
```

Get all of the class names involved in the graph.

---
## _format_node_attrs
```python
from inheritance_diagram import _format_node_attrs
```



---
## _format_graph_attrs
```python
from inheritance_diagram import _format_graph_attrs
```



---
## generate_dot
```python
from inheritance_diagram import generate_dot
```

Generate a graphviz dot graph from the classes that were passed in
to __init__.

*name* is the name of the graph.

*urls* is a dictionary mapping class names to HTTP URLs.

*graph_attrs*, *node_attrs*, *edge_attrs* are dictionaries containing
key/value pairs to pass on as graphviz properties.

---
## run
```python
from inheritance_diagram import run
```



---
## recurse
```python
from inheritance_diagram import recurse
```



---
## is_allowed_version
```python
from doctest import is_allowed_version
```

Check `spec` satisfies `version` or not.

This obeys PEP-440 specifiers:
https://peps.python.org/pep-0440/#version-specifiers

Some examples:

    >>> is_allowed_version('<=3.5', '3.3')
    True
    >>> is_allowed_version('<=3.2', '3.3')
    False
    >>> is_allowed_version('>3.2, <4.0', '3.3')
    True

---
## TestDirective
```python
from doctest import TestDirective
```

Base class for doctest-related directives.

---
## TestsetupDirective
```python
from doctest import TestsetupDirective
```



---
## TestcleanupDirective
```python
from doctest import TestcleanupDirective
```



---
## DoctestDirective
```python
from doctest import DoctestDirective
```



---
## TestcodeDirective
```python
from doctest import TestcodeDirective
```



---
## TestoutputDirective
```python
from doctest import TestoutputDirective
```



---
## TestGroup
```python
from doctest import TestGroup
```



---
## TestCode
```python
from doctest import TestCode
```



---
## SphinxDocTestRunner
```python
from doctest import SphinxDocTestRunner
```



---
## DocTestBuilder
```python
from doctest import DocTestBuilder
```

Runs test snippets in the documentation.

---
## run
```python
from doctest import run
```



---
## add_code
```python
from doctest import add_code
```



---
## __repr__
```python
from doctest import __repr__
```



---
## summarize
```python
from doctest import summarize
```



---
## _DocTestRunner__patched_linecache_getlines
```python
from doctest import _DocTestRunner__patched_linecache_getlines
```



---
## init
```python
from doctest import init
```



---
## __del__
```python
from doctest import __del__
```



---
## _out
```python
from doctest import _out
```



---
## _warn_out
```python
from doctest import _warn_out
```



---
## get_target_uri
```python
from doctest import get_target_uri
```



---
## get_outdated_docs
```python
from doctest import get_outdated_docs
```



---
## finish
```python
from doctest import finish
```



---
## write
```python
from doctest import write
```



---
## get_filename_for_node
```python
from doctest import get_filename_for_node
```

Try to get the file which actually contains the doctest, not the
filename of the document it's included in.

---
## get_line_number
```python
from doctest import get_line_number
```

Get the real line number or admit we don't know.

---
## skipped
```python
from doctest import skipped
```



---
## test_doc
```python
from doctest import test_doc
```



---
## compile
```python
from doctest import compile
```



---
## test_group
```python
from doctest import test_group
```



---
## s
```python
from doctest import s
```



---
## run_setup_cleanup
```python
from doctest import run_setup_cleanup
```



---
## condition
```python
from doctest import condition
```



---
## __name__
```python
from ifconfig import __name__
```

Provides the ``ifconfig`` directive.

The ``ifconfig`` directive enables writing documentation
that is included depending on configuration variables.

Usage::

    .. ifconfig:: releaselevel in ('alpha', 'beta', 'rc')

       This stuff is only included in the built docs for unstable versions.

The argument for ``ifconfig`` is a plain Python expression, evaluated in the
namespace of the project configuration (that is, all variables from
``conf.py`` are available.)

---
## ifconfig
```python
from ifconfig import ifconfig
```



---
## IfConfig
```python
from ifconfig import IfConfig
```



---
## process_ifconfig_nodes
```python
from ifconfig import process_ifconfig_nodes
```



---
## setup
```python
from ifconfig import setup
```



---
## run
```python
from ifconfig import run
```



---
## __name__
```python
from todo import __name__
```

Allow todos to be inserted into your documentation.

Inclusion of todos can be switched of by a configuration variable.
The todolist directive collects all todos of your project and lists them along
with a backlink to the original location.

---
## todo_node
```python
from todo import todo_node
```



---
## todolist
```python
from todo import todolist
```



---
## Todo
```python
from todo import Todo
```

A todo entry, displayed (if configured) in the form of an admonition.

---
## TodoDomain
```python
from todo import TodoDomain
```



---
## TodoList
```python
from todo import TodoList
```

A list of all todo entries.

---
## TodoListProcessor
```python
from todo import TodoListProcessor
```



---
## visit_todo_node
```python
from todo import visit_todo_node
```



---
## depart_todo_node
```python
from todo import depart_todo_node
```



---
## latex_visit_todo_node
```python
from todo import latex_visit_todo_node
```



---
## latex_depart_todo_node
```python
from todo import latex_depart_todo_node
```



---
## setup
```python
from todo import setup
```



---
## run
```python
from todo import run
```



---
## todos
```python
from todo import todos
```



---
## clear_doc
```python
from todo import clear_doc
```



---
## merge_domaindata
```python
from todo import merge_domaindata
```



---
## process_doc
```python
from todo import process_doc
```



---
## __init__
```python
from todo import __init__
```



---
## process
```python
from todo import process
```



---
## create_todo_reference
```python
from todo import create_todo_reference
```



---
## resolve_reference
```python
from todo import resolve_reference
```

Resolve references in the todo content.

---
## __name__
```python
from viewcode import __name__
```

Add links to module code in Python object descriptions.

---
## viewcode_anchor
```python
from viewcode import viewcode_anchor
```

Node for viewcode anchors.

This node will be processed in the resolving phase.
For viewcode supported builders, they will be all converted to the anchors.
For not supported builders, they will be removed.

---
## _get_full_modname
```python
from viewcode import _get_full_modname
```



---
## is_supported_builder
```python
from viewcode import is_supported_builder
```



---
## doctree_read
```python
from viewcode import doctree_read
```



---
## env_merge_info
```python
from viewcode import env_merge_info
```



---
## env_purge_doc
```python
from viewcode import env_purge_doc
```



---
## ViewcodeAnchorTransform
```python
from viewcode import ViewcodeAnchorTransform
```

Convert or remove viewcode_anchor nodes depends on builder.

---
## get_module_filename
```python
from viewcode import get_module_filename
```

Get module filename for *modname*.

---
## should_generate_module_page
```python
from viewcode import should_generate_module_page
```

Check generation of module page is needed.

---
## collect_pages
```python
from viewcode import collect_pages
```



---
## setup
```python
from viewcode import setup
```



---
## has_tag
```python
from viewcode import has_tag
```



---
## run
```python
from viewcode import run
```



---
## convert_viewcode_anchors
```python
from viewcode import convert_viewcode_anchors
```



---
## remove_viewcode_anchors
```python
from viewcode import remove_viewcode_anchors
```



---
## __name__
```python
from autosectionlabel import __name__
```

Allow reference sections by :ref: role using its title.

---
## get_node_depth
```python
from autosectionlabel import get_node_depth
```



---
## register_sections_as_label
```python
from autosectionlabel import register_sections_as_label
```



---
## setup
```python
from autosectionlabel import setup
```



---
## ModuleAnalyzer
```python
from __init__ import ModuleAnalyzer
```



---
## get_module_source
```python
from __init__ import get_module_source
```

Try to find the source code for a module.

Returns ('filename', 'source'). One of it can be None if
no filename or source found

---
## for_string
```python
from __init__ import for_string
```



---
## for_file
```python
from __init__ import for_file
```



---
## for_module
```python
from __init__ import for_module
```



---
## analyze
```python
from __init__ import analyze
```

Analyze the source code.

---
## find_attr_docs
```python
from __init__ import find_attr_docs
```

Find class and module-level attributes and their documentation.

---
## find_tags
```python
from __init__ import find_tags
```

Find class, function and method definitions and their location.

---
## filter_whitespace
```python
from parser import filter_whitespace
```



---
## get_assign_targets
```python
from parser import get_assign_targets
```

Get list of targets from Assign and AnnAssign node.

---
## get_lvar_names
```python
from parser import get_lvar_names
```

Convert assignment-AST to variable names.

This raises `TypeError` if the assignment does not create new variable::

    ary[0] = 'foo'
    dic["bar"] = 'baz'
    # => TypeError

---
## dedent_docstring
```python
from parser import dedent_docstring
```

Remove common leading indentation from docstring.

---
## Token
```python
from parser import Token
```

Better token wrapper for tokenize module.

---
## TokenProcessor
```python
from parser import TokenProcessor
```



---
## AfterCommentParser
```python
from parser import AfterCommentParser
```

Python source code parser to pick up comments after assignments.

This parser takes code which starts with an assignment statement,
and returns the comment for the variable if one exists.

---
## VariableCommentPicker
```python
from parser import VariableCommentPicker
```

Python source code parser to pick up variable comments.

---
## DefinitionFinder
```python
from parser import DefinitionFinder
```

Python source code parser to detect location of functions,
classes and methods.

---
## dummy
```python
from parser import dummy
```



---
## __eq__
```python
from parser import __eq__
```



---
## match
```python
from parser import match
```



---
## __repr__
```python
from parser import __repr__
```



---
## get_line
```python
from parser import get_line
```

Returns specified line.

---
## fetch_token
```python
from parser import fetch_token
```

Fetch the next token from source code.

Returns ``None`` if sequence finished.

---
## fetch_until
```python
from parser import fetch_until
```

Fetch tokens until specified token appeared.

.. note:: This also handles parenthesis well.

---
## fetch_rvalue
```python
from parser import fetch_rvalue
```

Fetch right-hand value of assignment.

---
## get_qualname_for
```python
from parser import get_qualname_for
```

Get qualified name for given object as a list of string(s).

---
## add_entry
```python
from parser import add_entry
```



---
## add_final_entry
```python
from parser import add_final_entry
```



---
## add_overload_entry
```python
from parser import add_overload_entry
```



---
## add_variable_comment
```python
from parser import add_variable_comment
```



---
## add_variable_annotation
```python
from parser import add_variable_annotation
```



---
## is_final
```python
from parser import is_final
```



---
## is_overload
```python
from parser import is_overload
```



---
## get_self
```python
from parser import get_self
```

Returns the name of the first argument if in a function.

---
## visit
```python
from parser import visit
```

Updates self.previous to the given node.

---
## visit_Import
```python
from parser import visit_Import
```

Handles Import node and record the order of definitions.

---
## visit_ImportFrom
```python
from parser import visit_ImportFrom
```

Handles Import node and record the order of definitions.

---
## visit_Assign
```python
from parser import visit_Assign
```

Handles Assign node and pick up a variable comment.

---
## visit_AnnAssign
```python
from parser import visit_AnnAssign
```

Handles AnnAssign node and pick up a variable comment.

---
## visit_Expr
```python
from parser import visit_Expr
```

Handles Expr node and pick up a comment if string.

---
## visit_Try
```python
from parser import visit_Try
```

Handles Try node and processes body and else-clause.

.. note:: pycode parser ignores objects definition in except-clause.

---
## visit_ClassDef
```python
from parser import visit_ClassDef
```

Handles ClassDef node and set context.

---
## visit_FunctionDef
```python
from parser import visit_FunctionDef
```

Handles FunctionDef node and set context.

---
## visit_AsyncFunctionDef
```python
from parser import visit_AsyncFunctionDef
```

Handles AsyncFunctionDef node and set context.

---
## add_definition
```python
from parser import add_definition
```

Add a location of definition.

---
## parse_definition
```python
from parser import parse_definition
```

Parse the location of definitions from the code.

---
## finalize_block
```python
from parser import finalize_block
```

Finalize definition block.

---
## parse_comments
```python
from parser import parse_comments
```

Parse the code and pick up comments.

---
## unparse
```python
from ast import unparse
```

Unparse an AST to string.

---
## _UnparseVisitor
```python
from ast import _UnparseVisitor
```



---
## _visit_op
```python
from ast import _visit_op
```



---
## visit_arg
```python
from ast import visit_arg
```



---
## _visit_arg_with_default
```python
from ast import _visit_arg_with_default
```

Unparse a single argument to a string.

---
## visit_arguments
```python
from ast import visit_arguments
```



---
## visit_Attribute
```python
from ast import visit_Attribute
```



---
## visit_BinOp
```python
from ast import visit_BinOp
```



---
## visit_BoolOp
```python
from ast import visit_BoolOp
```



---
## visit_Call
```python
from ast import visit_Call
```



---
## visit_Constant
```python
from ast import visit_Constant
```



---
## visit_Dict
```python
from ast import visit_Dict
```



---
## visit_Lambda
```python
from ast import visit_Lambda
```



---
## visit_List
```python
from ast import visit_List
```



---
## visit_Name
```python
from ast import visit_Name
```



---
## visit_Set
```python
from ast import visit_Set
```



---
## visit_Slice
```python
from ast import visit_Slice
```



---
## visit_Subscript
```python
from ast import visit_Subscript
```



---
## visit_UnaryOp
```python
from ast import visit_UnaryOp
```



---
## visit_Tuple
```python
from ast import visit_Tuple
```



---
## generic_visit
```python
from ast import generic_visit
```



---
## is_simple_tuple
```python
from ast import is_simple_tuple
```



---
## BaseSplitter
```python
from ja import BaseSplitter
```



---
## MecabSplitter
```python
from ja import MecabSplitter
```



---
## JanomeSplitter
```python
from ja import JanomeSplitter
```



---
## DefaultSplitter
```python
from ja import DefaultSplitter
```



---
## SearchJapanese
```python
from ja import SearchJapanese
```

Japanese search implementation: uses no stemmer, but word splitting is quite
complicated.

---
## __init__
```python
from ja import __init__
```



---
## split
```python
from ja import split
```



---
## init_native
```python
from ja import init_native
```



---
## init_ctypes
```python
from ja import init_ctypes
```



---
## __del__
```python
from ja import __del__
```



---
## init_tokenizer
```python
from ja import init_tokenizer
```



---
## ctype_
```python
from ja import ctype_
```



---
## ts_
```python
from ja import ts_
```



---
## init
```python
from ja import init
```



---
## word_filter
```python
from ja import word_filter
```



---
## stem
```python
from ja import stem
```



---
## __name__
```python
from pt import __name__
```

Portuguese search language: includes the JS Portuguese stemmer.

---
## SearchPortuguese
```python
from pt import SearchPortuguese
```



---
## init
```python
from pt import init
```



---
## stem
```python
from pt import stem
```



---
## SearchLanguage
```python
from __init__ import SearchLanguage
```

This class is the base class for search natural language preprocessors.  If
you want to add support for a new language, you should override the methods
of this class.

You should override `lang` class property too (e.g. 'en', 'fr' and so on).

.. attribute:: stopwords

   This is a set of stop words of the target language.  Default `stopwords`
   is empty.  This word is used for building index and embedded in JS.

.. attribute:: js_splitter_code

   Return splitter function of JavaScript version.  The function should be
   named as ``splitQuery``.  And it should take a string and return list of
   strings.

   .. versionadded:: 3.0

.. attribute:: js_stemmer_code

   Return stemmer class of JavaScript version.  This class' name should be
   ``Stemmer`` and this class must have ``stemWord`` method.  This string is
   embedded as-is in searchtools.js.

   This class is used to preprocess search word which Sphinx HTML readers
   type, before searching index. Default implementation does nothing.

---
## parse_stop_word
```python
from __init__ import parse_stop_word
```

Parse snowball style word list like this:

* https://snowball.tartarus.org/algorithms/finnish/stop.txt

---
## _JavaScriptIndex
```python
from __init__ import _JavaScriptIndex
```

The search index as JavaScript file that calls a function
on the documentation search object to register the index.

---
## _is_meta_keywords
```python
from __init__ import _is_meta_keywords
```



---
## WordStore
```python
from __init__ import WordStore
```



---
## WordCollector
```python
from __init__ import WordCollector
```

A special visitor that collects words for the `IndexBuilder`.

---
## IndexBuilder
```python
from __init__ import IndexBuilder
```

Helper class that creates a search index based on the doctrees
passed to the `feed` method.

---
## word_filter
```python
from __init__ import word_filter
```

Return true if the target word should be registered in the search index.
This method is called after stemming.

---
## get_terms
```python
from __init__ import get_terms
```

Return a mapping of document and title terms to their corresponding sorted document IDs.

When a term is only found within a single document, then the value for that term will be
an integer value.  When a term is found within multiple documents, the value will be a list
of integers.

---
## label
```python
from __init__ import label
```



---
## prune
```python
from __init__ import prune
```

Remove data for all docnames not in the list.

---
## _word_collector
```python
from __init__ import _word_collector
```



---
## context_for_searchtool
```python
from __init__ import context_for_searchtool
```



---
## get_js_stemmer_rawcodes
```python
from __init__ import get_js_stemmer_rawcodes
```

Returns a list of non-minified stemmer JS files to copy.

---
## get_js_stemmer_rawcode
```python
from __init__ import get_js_stemmer_rawcode
```



---
## get_js_stemmer_code
```python
from __init__ import get_js_stemmer_code
```

Returns JS code that will be inserted into language_data.js.

---
## load_terms
```python
from __init__ import load_terms
```



---
## _visit_nodes
```python
from __init__ import _visit_nodes
```



---
## __name__
```python
from no import __name__
```

Norwegian search language: includes the JS Norwegian stemmer.

---
## SearchNorwegian
```python
from no import SearchNorwegian
```



---
## init
```python
from no import init
```



---
## stem
```python
from no import stem
```



---
## SearchRussian
```python
from ru import SearchRussian
```



---
## init
```python
from ru import init
```



---
## stem
```python
from ru import stem
```



---
## SearchFinnish
```python
from fi import SearchFinnish
```



---
## init
```python
from fi import init
```



---
## stem
```python
from fi import stem
```



---
## __name__
```python
from hu import __name__
```

Hungarian search language: includes the JS Hungarian stemmer.

---
## SearchHungarian
```python
from hu import SearchHungarian
```



---
## init
```python
from hu import init
```



---
## stem
```python
from hu import stem
```



---
## SearchFrench
```python
from fr import SearchFrench
```



---
## init
```python
from fr import init
```



---
## stem
```python
from fr import stem
```



---
## SearchDutch
```python
from nl import SearchDutch
```



---
## init
```python
from nl import init
```



---
## stem
```python
from nl import stem
```



---
## __name__
```python
from zh import __name__
```

Chinese search language: includes routine to split words.

---
## SearchChinese
```python
from zh import SearchChinese
```

Chinese search implementation

---
## init
```python
from zh import init
```



---
## split
```python
from zh import split
```



---
## word_filter
```python
from zh import word_filter
```



---
## stem
```python
from zh import stem
```



---
## SearchSwedish
```python
from sv import SearchSwedish
```



---
## init
```python
from sv import init
```



---
## stem
```python
from sv import stem
```



---
## SearchEnglish
```python
from en import SearchEnglish
```



---
## init
```python
from en import init
```



---
## stem
```python
from en import stem
```



---
## __name__
```python
from tr import __name__
```

Turkish search language: includes the JS Turkish stemmer.

---
## SearchTurkish
```python
from tr import SearchTurkish
```



---
## init
```python
from tr import init
```



---
## stem
```python
from tr import stem
```



---
## __name__
```python
from ro import __name__
```

Romanian search language: includes the JS Romanian stemmer.

---
## SearchRomanian
```python
from ro import SearchRomanian
```



---
## init
```python
from ro import init
```



---
## stem
```python
from ro import stem
```



---
## SearchSpanish
```python
from es import SearchSpanish
```



---
## init
```python
from es import init
```



---
## stem
```python
from es import stem
```



---
## SearchItalian
```python
from it import SearchItalian
```



---
## init
```python
from it import init
```



---
## stem
```python
from it import stem
```



---
## SearchGerman
```python
from de import SearchGerman
```



---
## init
```python
from de import init
```



---
## stem
```python
from de import stem
```



---
## SearchDanish
```python
from da import SearchDanish
```



---
## init
```python
from da import init
```



---
## stem
```python
from da import stem
```



---
## assert_node
```python
from util import assert_node
```



---
## etree_parse
```python
from util import etree_parse
```

Parse a file into a (safe) XML element tree.

---
## SphinxTestApp
```python
from util import SphinxTestApp
```

A subclass of :class:`~sphinx.application.Sphinx` for tests.

The constructor uses some better default values for the initialization
parameters and supports arbitrary keywords stored in the :attr:`extras`
read-only mapping.

It is recommended to use::

    @pytest.mark.sphinx('html')
    def test(app):
        app = ...

instead of::

    def test():
        app = SphinxTestApp('html', srcdir=srcdir)

In the former case, the 'app' fixture takes care of setting the source
directory, whereas in the latter, the user must provide it themselves.

---
## SphinxTestAppWrapperForSkipBuilding
```python
from util import SphinxTestAppWrapperForSkipBuilding
```

A wrapper for SphinxTestApp.

This class is used to speed up the test by skipping ``app.build()``
if it has already been built and there are any output files.

---
## _clean_up_global_state
```python
from util import _clean_up_global_state
```



---
## __getattr__
```python
from util import __getattr__
```



---
## status
```python
from util import status
```

The in-memory text I/O for the application status messages.

---
## warning
```python
from util import warning
```

The in-memory text I/O for the application warning messages.

---
## cleanup
```python
from util import cleanup
```



---
## build
```python
from util import build
```



---
## __name__
```python
from restructuredtext import __name__
```



---
## parse
```python
from restructuredtext import parse
```

Parse a string as reStructuredText with Sphinx application.

---
## getumask
```python
from path import getumask
```

Get current umask value

---
## path
```python
from path import path
```

Represents a path which behaves like a string.

---
## parent
```python
from path import parent
```

The name of the directory the file or directory is in.

---
## basename
```python
from path import basename
```

Basename part of path.

---
## abspath
```python
from path import abspath
```

Returns the absolute path.

---
## isabs
```python
from path import isabs
```

Returns ``True`` if the path is absolute.

---
## isdir
```python
from path import isdir
```



---
## isfile
```python
from path import isfile
```



---
## islink
```python
from path import islink
```



---
## ismount
```python
from path import ismount
```

Returns ``True`` if the path is a mount point.

---
## rmtree
```python
from path import rmtree
```

Removes the file or directory and any files or directories it may
contain.

:param ignore_errors:
    If ``True`` errors are silently ignored, otherwise an exception
    is raised in case an error occurs.

:param onerror:
    A callback which gets called with the arguments `func`, `path` and
    `exc_info`. `func` is one of :func:`os.listdir`, :func:`os.remove`
    or :func:`os.rmdir`. `path` is the argument to the function which
    caused it to fail and `exc_info` is a tuple as returned by
    :func:`sys.exc_info`.

---
## copytree
```python
from path import copytree
```

Recursively copy a directory to the given `destination`. If the given
`destination` does not exist it will be created.

:param symlinks:
    If ``True`` symbolic links in the source tree result in symbolic
    links in the destination tree otherwise the contents of the files
    pointed to by the symbolic links are copied.

---
## movetree
```python
from path import movetree
```

Recursively move the file or directory to the given `destination`
similar to the  Unix "mv" command.

If the `destination` is a file it may be overwritten depending on the
:func:`os.rename` semantics.

---
## unlink
```python
from path import unlink
```

Removes a file.

---
## stat
```python
from path import stat
```

Return an os.stat() tuple.

---
## utime
```python
from path import utime
```



---
## open
```python
from path import open
```

Return an opened file with the given mode.

If ensure is True, create parent directories if needed.

---
## write_text
```python
from path import write_text
```

Write text data into path using the specified encoding.
If ensure is True create missing parent directories.

---
## read_text
```python
from path import read_text
```

Read and return a Unicode string from reading the path.

---
## read_bytes
```python
from path import read_bytes
```

Returns the bytes in the file.

---
## write_bytes
```python
from path import write_bytes
```

Writes the given `bytes` to the file.

:param append:
    If ``True`` given `bytes` are added at the end of the file.

---
## exists
```python
from path import exists
```



---
## lexists
```python
from path import lexists
```

Returns ``True`` if the path exists unless it is a broken symbolic
link.

---
## makedirs
```python
from path import makedirs
```

Recursively create directories.

---
## joinpath
```python
from path import joinpath
```

Joins the path with the argument given and returns the result.

---
## listdir
```python
from path import listdir
```

List directory contents, possibly filter by the given fil func
and possibly sorted.

---
## pytest_configure
```python
from fixtures import pytest_configure
```

Register custom markers

---
## rootdir
```python
from fixtures import rootdir
```



---
## SharedResult
```python
from fixtures import SharedResult
```



---
## app_params
```python
from fixtures import app_params
```

Parameters that are specified by 'pytest.mark.sphinx' for
sphinx.application.Sphinx initialization

---
## test_params
```python
from fixtures import test_params
```

Test parameters that are specified by 'pytest.mark.test_params'

:param Union[str] shared_result:
   If the value is provided, app._status and app._warning objects will be
   shared in the parametrized test functions and/or test functions that
   have same 'shared_result' value.
   **NOTE**: You can not specify both shared_result and srcdir.

---
## app
```python
from fixtures import app
```

Provides the 'sphinx.application.Sphinx' object

---
## status
```python
from fixtures import status
```

Back-compatibility for testing with previous @with_app decorator

---
## warning
```python
from fixtures import warning
```

Back-compatibility for testing with previous @with_app decorator

---
## make_app
```python
from fixtures import make_app
```

Provides make_app function to initialize SphinxTestApp instance.
if you want to initialize 'app' in your test function. please use this
instead of using SphinxTestApp class directory.

---
## shared_result
```python
from fixtures import shared_result
```



---
## _shared_result_cache
```python
from fixtures import _shared_result_cache
```



---
## if_graphviz_found
```python
from fixtures import if_graphviz_found
```

The test will be skipped when using 'if_graphviz_found' fixture and graphviz
dot command is not found.

---
## sphinx_test_tempdir
```python
from fixtures import sphinx_test_tempdir
```

Temporary directory.

---
## rollback_sysmodules
```python
from fixtures import rollback_sysmodules
```

Rollback sys.modules to its value before testing to unload modules
during tests.

For example, used in test_ext_autosummary.py to permit unloading the
target module to clear its cache.

---
## store
```python
from fixtures import store
```



---
## restore
```python
from fixtures import restore
```



---
## make
```python
from fixtures import make
```



---
## SphinxDanglingReferences
```python
from references import SphinxDanglingReferences
```

DanglingReferences transform which does not output info messages.

---
## SphinxDomains
```python
from references import SphinxDomains
```

Collect objects to Sphinx domains for cross references.

---
## setup
```python
from references import setup
```



---
## SphinxTransform
```python
from __init__ import SphinxTransform
```

A base class of Transforms.

Compared with ``docutils.transforms.Transform``, this class improves accessibility to
Sphinx APIs.

---
## SphinxTransformer
```python
from __init__ import SphinxTransformer
```

A transformer for Sphinx.

---
## DefaultSubstitutions
```python
from __init__ import DefaultSubstitutions
```

Replace some substitutions if they aren't defined in the document.

---
## _calculate_translation_progress
```python
from __init__ import _calculate_translation_progress
```



---
## MoveModuleTargets
```python
from __init__ import MoveModuleTargets
```

Move module targets that are the first thing in a section to the section
title.

XXX Python specific

---
## HandleCodeBlocks
```python
from __init__ import HandleCodeBlocks
```

Several code block related transformations.

---
## AutoNumbering
```python
from __init__ import AutoNumbering
```

Register IDs of tables, figures and literal_blocks to assign numbers.

---
## SortIds
```python
from __init__ import SortIds
```

Sort section IDs so that the "id[0-9]+" one comes last.

---
## ApplySourceWorkaround
```python
from __init__ import ApplySourceWorkaround
```

Update source and rawsource attributes

---
## AutoIndexUpgrader
```python
from __init__ import AutoIndexUpgrader
```

Detect old style (4 column based indices) and automatically upgrade to new style.

---
## ExtraTranslatableNodes
```python
from __init__ import ExtraTranslatableNodes
```

Make nodes translatable

---
## UnreferencedFootnotesDetector
```python
from __init__ import UnreferencedFootnotesDetector
```

Detect unreferenced footnotes and emit warnings

---
## DoctestTransform
```python
from __init__ import DoctestTransform
```

Set "doctest" style to each doctest_block node

---
## FilterSystemMessages
```python
from __init__ import FilterSystemMessages
```

Filter system messages from a doctree.

---
## SphinxContentsFilter
```python
from __init__ import SphinxContentsFilter
```

Used with BuildEnvironment.add_toc_from() to discard cross-file links
within table-of-contents link nodes.

---
## SphinxSmartQuotes
```python
from __init__ import SphinxSmartQuotes
```

Customized SmartQuotes to avoid transform for some extra node types.

refs: sphinx.parsers.RSTParser

---
## DoctreeReadEvent
```python
from __init__ import DoctreeReadEvent
```

Emit :event:`doctree-read` event.

---
## GlossarySorter
```python
from __init__ import GlossarySorter
```

Sort glossaries that have the ``sorted`` flag.

---
## ReorderConsecutiveTargetAndIndexNodes
```python
from __init__ import ReorderConsecutiveTargetAndIndexNodes
```

Index nodes interspersed between target nodes prevent other
Transformations from combining those target nodes,
e.g. ``PropagateTargets``.  This transformation reorders them:

Given the following ``document`` as input::

    <document>
        <target ids="id1" ...>
        <index entries="...1...">
        <target ids="id2" ...>
        <target ids="id3" ...>
        <index entries="...2...">
        <target ids="id4" ...>

The transformed result will be::

    <document>
        <index entries="...1...">
        <index entries="...2...">
        <target ids="id1" ...>
        <target ids="id2" ...>
        <target ids="id3" ...>
        <target ids="id4" ...>

---
## _reorder_index_target_nodes
```python
from __init__ import _reorder_index_target_nodes
```

Sort target and index nodes.

Find all consecutive target and index nodes starting from ``start_node``,
and move all index nodes to before the first target node.

---
## _sort_key
```python
from __init__ import _sort_key
```



---
## app
```python
from __init__ import app
```

Reference to the :class:`.Sphinx` object.

---
## env
```python
from __init__ import env
```

Reference to the :class:`.BuildEnvironment` object.

---
## config
```python
from __init__ import config
```

Reference to the :class:`.Config` object.

---
## set_environment
```python
from __init__ import set_environment
```



---
## _handle_default_substitution
```python
from __init__ import _handle_default_substitution
```



---
## is_available
```python
from __init__ import is_available
```



---
## get_tokens
```python
from __init__ import get_tokens
```



---
## is_translatable_node
```python
from __init__ import is_translatable_node
```



---
## __name__
```python
from compact_bullet_list import __name__
```

Docutils transforms used by Sphinx when reading documents.

---
## RefOnlyListChecker
```python
from compact_bullet_list import RefOnlyListChecker
```

Raise `nodes.NodeFound` if non-simple list item is encountered.

Here 'simple' means a list item containing only a paragraph with a
single reference in it.

---
## RefOnlyBulletListTransform
```python
from compact_bullet_list import RefOnlyBulletListTransform
```

Change refonly bullet lists to use compact_paragraphs.

Specifically implemented for 'Indices and Tables' section, which looks
odd when html_compact_lists is false.

---
## setup
```python
from compact_bullet_list import setup
```



---
## default_visit
```python
from compact_bullet_list import default_visit
```



---
## visit_bullet_list
```python
from compact_bullet_list import visit_bullet_list
```



---
## visit_list_item
```python
from compact_bullet_list import visit_list_item
```



---
## invisible_visit
```python
from compact_bullet_list import invisible_visit
```

Invisible nodes should be ignored.

---
## apply
```python
from compact_bullet_list import apply
```



---
## check_refonly_list
```python
from compact_bullet_list import check_refonly_list
```

Check for list with only references in it.

---
## publish_msgstr
```python
from i18n import publish_msgstr
```

Publish msgstr (single line) into docutils document

:param sphinx.application.Sphinx app: sphinx application
:param str source: source text
:param str source_path: source path for warning indication
:param source_line: source line for warning indication
:param sphinx.config.Config config: sphinx config
:param docutils.frontend.Values settings: docutils settings
:return: document
:rtype: docutils.nodes.document

---
## parse_noqa
```python
from i18n import parse_noqa
```



---
## PreserveTranslatableMessages
```python
from i18n import PreserveTranslatableMessages
```

Preserve original translatable messages before translation

---
## _NodeUpdater
```python
from i18n import _NodeUpdater
```

Contains logic for updating one node with the translated content.

---
## Locale
```python
from i18n import Locale
```

Replace translatable nodes with their translated doctree.

---
## TranslationProgressTotaliser
```python
from i18n import TranslationProgressTotaliser
```

Calculate the number of translated and untranslated nodes.

---
## AddTranslationClasses
```python
from i18n import AddTranslationClasses
```

Add ``translated`` or ``untranslated`` classes to indicate translation status.

---
## RemoveTranslatableInline
```python
from i18n import RemoveTranslatableInline
```

Remove inline nodes used for translation as placeholders.

---
## setup
```python
from i18n import setup
```



---
## apply
```python
from i18n import apply
```



---
## compare_references
```python
from i18n import compare_references
```

Warn about mismatches between references in original and translated content.

---
## update_title_mapping
```python
from i18n import update_title_mapping
```



---
## update_autofootnote_references
```python
from i18n import update_autofootnote_references
```



---
## update_refnamed_references
```python
from i18n import update_refnamed_references
```



---
## update_refnamed_footnote_references
```python
from i18n import update_refnamed_footnote_references
```



---
## update_citation_references
```python
from i18n import update_citation_references
```



---
## update_pending_xrefs
```python
from i18n import update_pending_xrefs
```



---
## update_leaves
```python
from i18n import update_leaves
```



---
## list_replace_or_append
```python
from i18n import list_replace_or_append
```



---
## get_ref_key
```python
from i18n import get_ref_key
```



---
## _load_subcommand_descriptions
```python
from __init__ import _load_subcommand_descriptions
```



---
## _RootArgumentParser
```python
from __init__ import _RootArgumentParser
```



---
## _create_parser
```python
from __init__ import _create_parser
```



---
## _parse_command
```python
from __init__ import _parse_command
```



---
## _load_subcommand
```python
from __init__ import _load_subcommand
```



---
## _create_sub_parser
```python
from __init__ import _create_sub_parser
```



---
## _SubcommandModule
```python
from __init__ import _SubcommandModule
```



---
## format_help
```python
from __init__ import format_help
```



---
## _format_optional_arguments
```python
from __init__ import _format_optional_arguments
```



---
## _format_metavar
```python
from __init__ import _format_metavar
```



---
## BuildEnvironment
```python
from __init__ import BuildEnvironment
```

The environment in which the ReST files are translated.
Stores an inventory of cross-file targets and provides doctree
transformations to resolve links to them.

---
## _traverse_toctree
```python
from __init__ import _traverse_toctree
```



---
## _DomainsType
```python
from __init__ import _DomainsType
```



---
## _update_config
```python
from __init__ import _update_config
```

Update configurations by new one.

---
## _update_settings
```python
from __init__ import _update_settings
```

Update settings by new config.

---
## set_versioning_method
```python
from __init__ import set_versioning_method
```

Set the doctree versioning method for this environment.

Versioning methods are a builder property; only builders with the same
versioning method can share the same doctree directory.  Therefore, we
raise an exception if the user tries to use an environment with an
incompatible versioning method.

---
## merge_info_from
```python
from __init__ import merge_info_from
```

Merge global information gathered about *docnames* while reading them
from the *other* environment.

This possibly comes from a parallel build process.

---
## path2doc
```python
from __init__ import path2doc
```

Return the docname for the filename if the file is document.

*filename* should be absolute or relative to the source directory.

---
## doc2path
```python
from __init__ import doc2path
```

Return the filename for the document name.

If *base* is True, return absolute path under self.srcdir.
If *base* is False, return relative path to self.srcdir.

---
## relfn2path
```python
from __init__ import relfn2path
```

Return paths to a file referenced from a document, relative to
documentation root and absolute.

In the input "filename", absolute filenames are taken as relative to the
source dir, while relative filenames are relative to the dir of the
containing document.

---
## found_docs
```python
from __init__ import found_docs
```

Contains all existing docnames.

---
## find_files
```python
from __init__ import find_files
```

Find all source files in the source dir and put them in
self.found_docs.

---
## get_outdated_files
```python
from __init__ import get_outdated_files
```

Return (added, changed, removed) sets.

---
## check_dependents
```python
from __init__ import check_dependents
```



---
## prepare_settings
```python
from __init__ import prepare_settings
```

Prepare to set up environment for reading.

---
## docname
```python
from __init__ import docname
```

Returns the docname of the document currently being parsed.

---
## parser
```python
from __init__ import parser
```

Returns the parser being used for to parse the current document.

---
## new_serialno
```python
from __init__ import new_serialno
```

Return a serial number, e.g. for index entry targets.

The number is guaranteed to be unique in the current document.

---
## note_dependency
```python
from __init__ import note_dependency
```

Add *filename* as a dependency of the current document.

This means that the document will be rebuilt if this file changes.

*filename* should be absolute or relative to the source directory.

---
## note_included
```python
from __init__ import note_included
```

Add *filename* as a included from other document.

This means the document is not orphaned.

*filename* should be absolute or relative to the source directory.

---
## note_reread
```python
from __init__ import note_reread
```

Add the current document to the list of documents that will
automatically be re-read at the next build.

---
## get_domain
```python
from __init__ import get_domain
```

Return the domain instance with the specified name.

Raises an ExtensionError if the domain is not registered.

---
## get_doctree
```python
from __init__ import get_doctree
```

Read the doctree for a file from the pickle and return it.

---
## master_doctree
```python
from __init__ import master_doctree
```



---
## get_and_resolve_doctree
```python
from __init__ import get_and_resolve_doctree
```

Read the doctree from the pickle, resolve cross-references and
toctrees and return it.

---
## resolve_toctree
```python
from __init__ import resolve_toctree
```

Resolve a *toctree* node into individual bullet lists with titles
as items, returning None (if no containing titles are found) or
a new node.

If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,
to the value of the *maxdepth* option on the *toctree* node.
If *titles_only* is True, only toplevel document titles will be in the
resulting tree.
If *collapse* is True, all branches not containing docname will
be collapsed.

---
## resolve_references
```python
from __init__ import resolve_references
```



---
## apply_post_transforms
```python
from __init__ import apply_post_transforms
```

Apply all post-transforms.

---
## collect_relations
```python
from __init__ import collect_relations
```



---
## ObjectEntry
```python
from __init__ import ObjectEntry
```



---
## ModuleEntry
```python
from __init__ import ModuleEntry
```



---
## PyFunction
```python
from __init__ import PyFunction
```

Description of a function.

---
## PyDecoratorFunction
```python
from __init__ import PyDecoratorFunction
```

Description of a decorator.

---
## PyVariable
```python
from __init__ import PyVariable
```

Description of a variable.

---
## PyClasslike
```python
from __init__ import PyClasslike
```

Description of a class-like object (classes, interfaces, exceptions).

---
## PyMethod
```python
from __init__ import PyMethod
```

Description of a method.

---
## PyClassMethod
```python
from __init__ import PyClassMethod
```

Description of a classmethod.

---
## PyStaticMethod
```python
from __init__ import PyStaticMethod
```

Description of a staticmethod.

---
## PyDecoratorMethod
```python
from __init__ import PyDecoratorMethod
```

Description of a decoratormethod.

---
## PyAttribute
```python
from __init__ import PyAttribute
```

Description of an attribute.

---
## PyProperty
```python
from __init__ import PyProperty
```

Description of an attribute.

---
## PyTypeAlias
```python
from __init__ import PyTypeAlias
```

Description of a type alias.

---
## PyModule
```python
from __init__ import PyModule
```

Directive to mark description of a new module.

---
## PyCurrentModule
```python
from __init__ import PyCurrentModule
```

This directive is just to tell Sphinx that we're documenting
stuff in module foo, but links to module foo won't lead here.

---
## PyXRefRole
```python
from __init__ import PyXRefRole
```



---
## filter_meta_fields
```python
from __init__ import filter_meta_fields
```

Filter ``:meta:`` field from its docstring.

---
## PythonModuleIndex
```python
from __init__ import PythonModuleIndex
```

Index subclass to provide the Python module index.

---
## PythonDomain
```python
from __init__ import PythonDomain
```

Python language domain.

---
## builtin_resolver
```python
from __init__ import builtin_resolver
```

Do not emit nitpicky warnings for built-in types.

---
## get_signature_prefix
```python
from __init__ import get_signature_prefix
```



---
## needs_arglist
```python
from __init__ import needs_arglist
```



---
## get_index_text
```python
from __init__ import get_index_text
```



---
## process_link
```python
from __init__ import process_link
```



---
## objects
```python
from __init__ import objects
```



---
## note_object
```python
from __init__ import note_object
```

Note a generic object for cross reference.

.. versionadded:: 3.0

---
## modules
```python
from __init__ import modules
```



---
## note_module
```python
from __init__ import note_module
```

Note a python module for cross reference.

.. versionadded:: 2.1

---
## find_obj
```python
from __init__ import find_obj
```

Find a Python object for "name", perhaps using the given module
and/or classname.  Returns a list of (name, object entry) tuples.

---
## _make_module_refnode
```python
from __init__ import _make_module_refnode
```



---
## istyping
```python
from __init__ import istyping
```



---
## __name__
```python
from _object import __name__
```



---
## PyXrefMixin
```python
from _object import PyXrefMixin
```



---
## PyField
```python
from _object import PyField
```



---
## PyGroupedField
```python
from _object import PyGroupedField
```



---
## PyTypedField
```python
from _object import PyTypedField
```



---
## PyObject
```python
from _object import PyObject
```

Description of a general Python object.

:cvar allow_nesting: Class is an object that allows for nested namespaces
:vartype allow_nesting: bool

---
## make_xref
```python
from _object import make_xref
```



---
## make_xrefs
```python
from _object import make_xrefs
```



---
## get_signature_prefix
```python
from _object import get_signature_prefix
```

May return a prefix to put before the object name in the
signature.

---
## needs_arglist
```python
from _object import needs_arglist
```

May return true if an empty argument list is to be generated even if
the document contains none.

---
## handle_signature
```python
from _object import handle_signature
```

Transform a Python signature into RST nodes.

Return (fully qualified name of the thing, classname if any).

If inside a class, the current class name is handled intelligently:
* it is stripped from the displayed name if present
* it is added to the full name (return value) if not present

---
## _object_hierarchy_parts
```python
from _object import _object_hierarchy_parts
```



---
## get_index_text
```python
from _object import get_index_text
```

Return the text for the index entry of the object.

---
## add_target_and_index
```python
from _object import add_target_and_index
```



---
## before_content
```python
from _object import before_content
```

Handle object nesting before content

:py:class:`PyObject` represents Python language constructs. For
constructs that are nestable, such as a Python classes, this method will
build up a stack of the nesting hierarchy so that it can be later
de-nested correctly, in :py:meth:`after_content`.

For constructs that aren't nestable, the stack is bypassed, and instead
only the most recent object is tracked. This object prefix name will be
removed with :py:meth:`after_content`.

---
## after_content
```python
from _object import after_content
```

Handle object de-nesting after content

If this class is a nestable object, removing the last nested class prefix
ends further nesting in the object.

If this class is not a nestable object, the list of classes should not
be altered as we didn't affect the nesting levels in
:py:meth:`before_content`.

---
## _toc_entry_name
```python
from _object import _toc_entry_name
```



---
## __name__
```python
from _annotations import __name__
```



---
## parse_reftarget
```python
from _annotations import parse_reftarget
```

Parse a type string and return (reftype, reftarget, title, refspecific flag)

---
## type_to_xref
```python
from _annotations import type_to_xref
```

Convert a type string to a cross reference node.

---
## _parse_annotation
```python
from _annotations import _parse_annotation
```

Parse type annotation.

---
## _TypeParameterListParser
```python
from _annotations import _TypeParameterListParser
```



---
## _parse_type_list
```python
from _annotations import _parse_type_list
```

Parse a list of type parameters according to PEP 695.

---
## _parse_arglist
```python
from _annotations import _parse_arglist
```

Parse a list of arguments using AST parser

---
## _pseudo_parse_arglist
```python
from _annotations import _pseudo_parse_arglist
```

"Parse" a list of arguments separated by commas.

Arguments can have "optional" annotations given by enclosing them in
brackets.  Currently, this will split at any comma, even if it's inside a
string literal (e.g. default argument value).

---
## unparse
```python
from _annotations import unparse
```



---
## _unparse_pep_604_annotation
```python
from _annotations import _unparse_pep_604_annotation
```



---
## __init__
```python
from _annotations import __init__
```



---
## fetch_type_param_spec
```python
from _annotations import fetch_type_param_spec
```



---
## parse
```python
from _annotations import parse
```



---
## _build_identifier
```python
from _annotations import _build_identifier
```



---
## _pformat_token
```python
from _annotations import _pformat_token
```



---
## triplewise
```python
from _annotations import triplewise
```



---
## GenericObject
```python
from __init__ import GenericObject
```

A generic x-ref directive registered with Sphinx.add_object_type().

---
## EnvVar
```python
from __init__ import EnvVar
```



---
## EnvVarXRefRole
```python
from __init__ import EnvVarXRefRole
```

Cross-referencing role for environment variables (adds an index entry).

---
## ConfigurationValue
```python
from __init__ import ConfigurationValue
```



---
## Target
```python
from __init__ import Target
```

Generic target for user-defined cross-reference types.

---
## Cmdoption
```python
from __init__ import Cmdoption
```

Description of a command-line option (.. option).

---
## Program
```python
from __init__ import Program
```

Directive to name the program for which options are documented.

---
## OptionXRefRole
```python
from __init__ import OptionXRefRole
```



---
## split_term_classifiers
```python
from __init__ import split_term_classifiers
```



---
## make_glossary_term
```python
from __init__ import make_glossary_term
```



---
## Glossary
```python
from __init__ import Glossary
```

Directive to create a glossary with cross-reference targets for :term:
roles.

---
## token_xrefs
```python
from __init__ import token_xrefs
```



---
## ProductionList
```python
from __init__ import ProductionList
```

Directive to list grammar productions.

---
## TokenXRefRole
```python
from __init__ import TokenXRefRole
```



---
## StandardDomain
```python
from __init__ import StandardDomain
```

Domain for all objects that don't fit into another domain or are added
via the application interface.

---
## warn_missing_reference
```python
from __init__ import warn_missing_reference
```



---
## result_nodes
```python
from __init__ import result_nodes
```



---
## format_type
```python
from __init__ import format_type
```

Formats the ``:type:`` option.

---
## format_default
```python
from __init__ import format_default
```

Formats the ``:default:`` option.

---
## note_hyperlink_target
```python
from __init__ import note_hyperlink_target
```

Add a hyperlink target for cross reference.

.. warning::

   This is only for internal use.  Please don't use this from your extension.
   ``document.note_explicit_target()`` or ``note_implicit_target()`` are recommended to
   add a hyperlink target to the document.

   This only adds a hyperlink target to the StandardDomain.  And this does not add a
   node_id to node.  Therefore, it is very fragile to calling this without
   understanding hyperlink target framework in both docutils and Sphinx.

.. versionadded:: 3.0

---
## _terms
```python
from __init__ import _terms
```

.. note:: Will be removed soon. internal use only.

---
## _note_term
```python
from __init__ import _note_term
```

Note a term for cross reference.

.. note:: Will be removed soon. internal use only.

---
## progoptions
```python
from __init__ import progoptions
```



---
## labels
```python
from __init__ import labels
```



---
## anonlabels
```python
from __init__ import anonlabels
```



---
## add_program_option
```python
from __init__ import add_program_option
```



---
## build_reference_node
```python
from __init__ import build_reference_node
```



---
## _resolve_ref_xref
```python
from __init__ import _resolve_ref_xref
```



---
## _resolve_numref_xref
```python
from __init__ import _resolve_numref_xref
```



---
## _resolve_keyword_xref
```python
from __init__ import _resolve_keyword_xref
```



---
## _resolve_doc_xref
```python
from __init__ import _resolve_doc_xref
```



---
## _resolve_option_xref
```python
from __init__ import _resolve_option_xref
```



---
## _resolve_term_xref
```python
from __init__ import _resolve_term_xref
```



---
## _resolve_obj_xref
```python
from __init__ import _resolve_obj_xref
```



---
## is_enumerable_node
```python
from __init__ import is_enumerable_node
```



---
## get_numfig_title
```python
from __init__ import get_numfig_title
```

Get the title of enumerable nodes to refer them using its title

---
## get_fignumber
```python
from __init__ import get_fignumber
```



---
## has_child
```python
from __init__ import has_child
```



---
## __name__
```python
from _ids import __name__
```



---
## _make_phony_error_name
```python
from __init__ import _make_phony_error_name
```



---
## CPPObject
```python
from __init__ import CPPObject
```

Description of a C++ language object.

---
## CPPTypeObject
```python
from __init__ import CPPTypeObject
```



---
## CPPConceptObject
```python
from __init__ import CPPConceptObject
```



---
## CPPMemberObject
```python
from __init__ import CPPMemberObject
```



---
## CPPFunctionObject
```python
from __init__ import CPPFunctionObject
```



---
## CPPClassObject
```python
from __init__ import CPPClassObject
```



---
## CPPUnionObject
```python
from __init__ import CPPUnionObject
```



---
## CPPEnumObject
```python
from __init__ import CPPEnumObject
```



---
## CPPEnumeratorObject
```python
from __init__ import CPPEnumeratorObject
```



---
## CPPNamespaceObject
```python
from __init__ import CPPNamespaceObject
```

This directive is just to tell Sphinx that we're documenting stuff in
namespace foo.

---
## CPPNamespacePushObject
```python
from __init__ import CPPNamespacePushObject
```



---
## CPPNamespacePopObject
```python
from __init__ import CPPNamespacePopObject
```



---
## AliasNode
```python
from __init__ import AliasNode
```



---
## AliasTransform
```python
from __init__ import AliasTransform
```



---
## CPPAliasObject
```python
from __init__ import CPPAliasObject
```



---
## CPPXRefRole
```python
from __init__ import CPPXRefRole
```



---
## CPPExprRole
```python
from __init__ import CPPExprRole
```



---
## CPPDomain
```python
from __init__ import CPPDomain
```

C++ language domain.

There are two 'object type' attributes being used::

- Each object created from directives gets an assigned .objtype from ObjectDescription.run.
  This is simply the directive name.
- Each declaration (see the distinction in the directives dict below) has a nested .ast of
  type ASTDeclaration. That object has .objectType which corresponds to the keys in the
  object_types dict below. They are the core different types of declarations in C++ that
  one can document.

---
## _add_enumerator_to_parent
```python
from __init__ import _add_enumerator_to_parent
```



---
## object_type
```python
from __init__ import object_type
```



---
## display_object_type
```python
from __init__ import display_object_type
```



---
## parse_definition
```python
from __init__ import parse_definition
```



---
## describe_signature
```python
from __init__ import describe_signature
```



---
## _render_symbol
```python
from __init__ import _render_symbol
```



---
## _resolve_xref_inner
```python
from __init__ import _resolve_xref_inner
```



---
## initStuff
```python
from __init__ import initStuff
```



---
## checkType
```python
from __init__ import checkType
```



---
## findWarning
```python
from __init__ import findWarning
```



---
## __name__
```python
from _ast import __name__
```



---
## ASTBase
```python
from _ast import ASTBase
```



---
## ASTIdentifier
```python
from _ast import ASTIdentifier
```



---
## ASTNestedNameElement
```python
from _ast import ASTNestedNameElement
```



---
## ASTNestedName
```python
from _ast import ASTNestedName
```



---
## ASTExpression
```python
from _ast import ASTExpression
```



---
## ASTLiteral
```python
from _ast import ASTLiteral
```



---
## ASTPointerLiteral
```python
from _ast import ASTPointerLiteral
```



---
## ASTBooleanLiteral
```python
from _ast import ASTBooleanLiteral
```



---
## ASTNumberLiteral
```python
from _ast import ASTNumberLiteral
```



---
## ASTStringLiteral
```python
from _ast import ASTStringLiteral
```



---
## ASTCharLiteral
```python
from _ast import ASTCharLiteral
```



---
## ASTUserDefinedLiteral
```python
from _ast import ASTUserDefinedLiteral
```



---
## ASTThisLiteral
```python
from _ast import ASTThisLiteral
```



---
## ASTFoldExpr
```python
from _ast import ASTFoldExpr
```



---
## ASTParenExpr
```python
from _ast import ASTParenExpr
```



---
## ASTIdExpression
```python
from _ast import ASTIdExpression
```



---
## ASTPostfixOp
```python
from _ast import ASTPostfixOp
```



---
## ASTPostfixArray
```python
from _ast import ASTPostfixArray
```



---
## ASTPostfixMember
```python
from _ast import ASTPostfixMember
```



---
## ASTPostfixMemberOfPointer
```python
from _ast import ASTPostfixMemberOfPointer
```



---
## ASTPostfixInc
```python
from _ast import ASTPostfixInc
```



---
## ASTPostfixDec
```python
from _ast import ASTPostfixDec
```



---
## ASTPostfixCallExpr
```python
from _ast import ASTPostfixCallExpr
```



---
## ASTPostfixExpr
```python
from _ast import ASTPostfixExpr
```



---
## ASTExplicitCast
```python
from _ast import ASTExplicitCast
```



---
## ASTTypeId
```python
from _ast import ASTTypeId
```



---
## ASTUnaryOpExpr
```python
from _ast import ASTUnaryOpExpr
```



---
## ASTSizeofParamPack
```python
from _ast import ASTSizeofParamPack
```



---
## ASTSizeofType
```python
from _ast import ASTSizeofType
```



---
## ASTSizeofExpr
```python
from _ast import ASTSizeofExpr
```



---
## ASTAlignofExpr
```python
from _ast import ASTAlignofExpr
```



---
## ASTNoexceptExpr
```python
from _ast import ASTNoexceptExpr
```



---
## ASTNewExpr
```python
from _ast import ASTNewExpr
```



---
## ASTDeleteExpr
```python
from _ast import ASTDeleteExpr
```



---
## ASTCastExpr
```python
from _ast import ASTCastExpr
```



---
## ASTBinOpExpr
```python
from _ast import ASTBinOpExpr
```



---
## ASTConditionalExpr
```python
from _ast import ASTConditionalExpr
```



---
## ASTBracedInitList
```python
from _ast import ASTBracedInitList
```



---
## ASTAssignmentExpr
```python
from _ast import ASTAssignmentExpr
```



---
## ASTCommaExpr
```python
from _ast import ASTCommaExpr
```



---
## ASTFallbackExpr
```python
from _ast import ASTFallbackExpr
```



---
## ASTOperator
```python
from _ast import ASTOperator
```



---
## ASTOperatorBuildIn
```python
from _ast import ASTOperatorBuildIn
```



---
## ASTOperatorLiteral
```python
from _ast import ASTOperatorLiteral
```



---
## ASTOperatorType
```python
from _ast import ASTOperatorType
```



---
## ASTTemplateArgConstant
```python
from _ast import ASTTemplateArgConstant
```



---
## ASTTemplateArgs
```python
from _ast import ASTTemplateArgs
```



---
## ASTTrailingTypeSpec
```python
from _ast import ASTTrailingTypeSpec
```



---
## ASTTrailingTypeSpecFundamental
```python
from _ast import ASTTrailingTypeSpecFundamental
```



---
## ASTTrailingTypeSpecDecltypeAuto
```python
from _ast import ASTTrailingTypeSpecDecltypeAuto
```



---
## ASTTrailingTypeSpecDecltype
```python
from _ast import ASTTrailingTypeSpecDecltype
```



---
## ASTTrailingTypeSpecName
```python
from _ast import ASTTrailingTypeSpecName
```



---
## ASTFunctionParameter
```python
from _ast import ASTFunctionParameter
```



---
## ASTNoexceptSpec
```python
from _ast import ASTNoexceptSpec
```



---
## ASTParametersQualifiers
```python
from _ast import ASTParametersQualifiers
```



---
## ASTExplicitSpec
```python
from _ast import ASTExplicitSpec
```



---
## ASTDeclSpecsSimple
```python
from _ast import ASTDeclSpecsSimple
```



---
## ASTDeclSpecs
```python
from _ast import ASTDeclSpecs
```



---
## ASTArray
```python
from _ast import ASTArray
```



---
## ASTDeclarator
```python
from _ast import ASTDeclarator
```



---
## ASTDeclaratorNameParamQual
```python
from _ast import ASTDeclaratorNameParamQual
```



---
## ASTDeclaratorNameBitField
```python
from _ast import ASTDeclaratorNameBitField
```



---
## ASTDeclaratorPtr
```python
from _ast import ASTDeclaratorPtr
```



---
## ASTDeclaratorRef
```python
from _ast import ASTDeclaratorRef
```



---
## ASTDeclaratorParamPack
```python
from _ast import ASTDeclaratorParamPack
```



---
## ASTDeclaratorMemPtr
```python
from _ast import ASTDeclaratorMemPtr
```



---
## ASTDeclaratorParen
```python
from _ast import ASTDeclaratorParen
```



---
## ASTPackExpansionExpr
```python
from _ast import ASTPackExpansionExpr
```



---
## ASTParenExprList
```python
from _ast import ASTParenExprList
```



---
## ASTInitializer
```python
from _ast import ASTInitializer
```



---
## ASTType
```python
from _ast import ASTType
```



---
## ASTTemplateParamConstrainedTypeWithInit
```python
from _ast import ASTTemplateParamConstrainedTypeWithInit
```



---
## ASTTypeWithInit
```python
from _ast import ASTTypeWithInit
```



---
## ASTTypeUsing
```python
from _ast import ASTTypeUsing
```



---
## ASTConcept
```python
from _ast import ASTConcept
```



---
## ASTBaseClass
```python
from _ast import ASTBaseClass
```



---
## ASTClass
```python
from _ast import ASTClass
```



---
## ASTUnion
```python
from _ast import ASTUnion
```



---
## ASTEnum
```python
from _ast import ASTEnum
```



---
## ASTEnumerator
```python
from _ast import ASTEnumerator
```



---
## ASTTemplateParam
```python
from _ast import ASTTemplateParam
```



---
## ASTTemplateKeyParamPackIdDefault
```python
from _ast import ASTTemplateKeyParamPackIdDefault
```



---
## ASTTemplateParamType
```python
from _ast import ASTTemplateParamType
```



---
## ASTTemplateParamTemplateType
```python
from _ast import ASTTemplateParamTemplateType
```



---
## ASTTemplateParamNonType
```python
from _ast import ASTTemplateParamNonType
```



---
## ASTTemplateParams
```python
from _ast import ASTTemplateParams
```



---
## ASTTemplateIntroductionParameter
```python
from _ast import ASTTemplateIntroductionParameter
```



---
## ASTTemplateIntroduction
```python
from _ast import ASTTemplateIntroduction
```



---
## ASTTemplateDeclarationPrefix
```python
from _ast import ASTTemplateDeclarationPrefix
```



---
## ASTRequiresClause
```python
from _ast import ASTRequiresClause
```



---
## ASTDeclaration
```python
from _ast import ASTDeclaration
```



---
## ASTNamespace
```python
from _ast import ASTNamespace
```



---
## __init__
```python
from _ast import __init__
```



---
## __eq__
```python
from _ast import __eq__
```



---
## __hash__
```python
from _ast import __hash__
```



---
## _stringify
```python
from _ast import _stringify
```



---
## is_anon
```python
from _ast import is_anon
```



---
## get_id
```python
from _ast import get_id
```



---
## __str__
```python
from _ast import __str__
```



---
## get_display_string
```python
from _ast import get_display_string
```



---
## describe_signature
```python
from _ast import describe_signature
```



---
## identifier
```python
from _ast import identifier
```



---
## is_operator
```python
from _ast import is_operator
```



---
## name
```python
from _ast import name
```



---
## num_templates
```python
from _ast import num_templates
```



---
## _describe_identifier
```python
from _ast import _describe_identifier
```



---
## get_name_no_template
```python
from _ast import get_name_no_template
```



---
## function_params
```python
from _ast import function_params
```



---
## get_modifiers_id
```python
from _ast import get_modifiers_id
```



---
## get_param_id
```python
from _ast import get_param_id
```



---
## mergeWith
```python
from _ast import mergeWith
```



---
## isPack
```python
from _ast import isPack
```



---
## trailingReturn
```python
from _ast import trailingReturn
```



---
## require_space_after_declSpecs
```python
from _ast import require_space_after_declSpecs
```



---
## get_ptr_suffix_id
```python
from _ast import get_ptr_suffix_id
```



---
## get_type_id
```python
from _ast import get_type_id
```



---
## is_function_type
```python
from _ast import is_function_type
```



---
## get_type_declaration_prefix
```python
from _ast import get_type_declaration_prefix
```



---
## get_identifier
```python
from _ast import get_identifier
```



---
## describe_signature_as_introducer
```python
from _ast import describe_signature_as_introducer
```



---
## get_id_as_arg
```python
from _ast import get_id_as_arg
```



---
## get_requires_clause_in_last
```python
from _ast import get_requires_clause_in_last
```



---
## get_id_except_requires_clause_in_last
```python
from _ast import get_id_except_requires_clause_in_last
```



---
## clone
```python
from _ast import clone
```



---
## get_newest_id
```python
from _ast import get_newest_id
```



---
## _add_anno
```python
from _ast import _add_anno
```



---
## _add
```python
from _ast import _add
```



---
## makeLine
```python
from _ast import makeLine
```



---
## DefinitionParser
```python
from _parser import DefinitionParser
```



---
## language
```python
from _parser import language
```



---
## id_attributes
```python
from _parser import id_attributes
```



---
## paren_attributes
```python
from _parser import paren_attributes
```



---
## _parse_string
```python
from _parser import _parse_string
```



---
## _parse_literal
```python
from _parser import _parse_literal
```



---
## _parse_fold_or_paren_expression
```python
from _parser import _parse_fold_or_paren_expression
```



---
## _parse_primary_expression
```python
from _parser import _parse_primary_expression
```



---
## _parse_initializer_list
```python
from _parser import _parse_initializer_list
```



---
## _parse_paren_expression_list
```python
from _parser import _parse_paren_expression_list
```



---
## _parse_initializer_clause
```python
from _parser import _parse_initializer_clause
```



---
## _parse_braced_init_list
```python
from _parser import _parse_braced_init_list
```



---
## _parse_expression_list_or_braced_init_list
```python
from _parser import _parse_expression_list_or_braced_init_list
```



---
## _parse_postfix_expression
```python
from _parser import _parse_postfix_expression
```



---
## _parse_unary_expression
```python
from _parser import _parse_unary_expression
```



---
## _parse_cast_expression
```python
from _parser import _parse_cast_expression
```



---
## _parse_logical_or_expression
```python
from _parser import _parse_logical_or_expression
```



---
## _parse_conditional_expression_tail
```python
from _parser import _parse_conditional_expression_tail
```



---
## _parse_assignment_expression
```python
from _parser import _parse_assignment_expression
```



---
## _parse_constant_expression
```python
from _parser import _parse_constant_expression
```



---
## _parse_expression
```python
from _parser import _parse_expression
```



---
## _parse_expression_fallback
```python
from _parser import _parse_expression_fallback
```



---
## _parse_operator
```python
from _parser import _parse_operator
```



---
## _parse_template_argument_list
```python
from _parser import _parse_template_argument_list
```



---
## _parse_nested_name
```python
from _parser import _parse_nested_name
```



---
## _parse_simple_type_specifiers
```python
from _parser import _parse_simple_type_specifiers
```



---
## _parse_trailing_type_spec
```python
from _parser import _parse_trailing_type_spec
```



---
## _parse_parameters_and_qualifiers
```python
from _parser import _parse_parameters_and_qualifiers
```



---
## _parse_decl_specs_simple
```python
from _parser import _parse_decl_specs_simple
```

Just parse the simple ones.

---
## _parse_decl_specs
```python
from _parser import _parse_decl_specs
```



---
## _parse_declarator_name_suffix
```python
from _parser import _parse_declarator_name_suffix
```



---
## _parse_declarator
```python
from _parser import _parse_declarator
```



---
## _parse_initializer
```python
from _parser import _parse_initializer
```



---
## _parse_type
```python
from _parser import _parse_type
```

named=False|'single'|True: 'single' is e.g., for function objects which
doesn't need to name the arguments, but otherwise is a single name

---
## _parse_type_with_init
```python
from _parser import _parse_type_with_init
```



---
## _parse_type_using
```python
from _parser import _parse_type_using
```



---
## _parse_concept
```python
from _parser import _parse_concept
```



---
## _parse_class
```python
from _parser import _parse_class
```



---
## _parse_union
```python
from _parser import _parse_union
```



---
## _parse_enum
```python
from _parser import _parse_enum
```



---
## _parse_enumerator
```python
from _parser import _parse_enumerator
```



---
## _parse_template_parameter
```python
from _parser import _parse_template_parameter
```



---
## _parse_template_parameter_list
```python
from _parser import _parse_template_parameter_list
```



---
## _parse_template_introduction
```python
from _parser import _parse_template_introduction
```



---
## _parse_requires_clause
```python
from _parser import _parse_requires_clause
```



---
## _parse_template_declaration_prefix
```python
from _parser import _parse_template_declaration_prefix
```



---
## _check_template_consistency
```python
from _parser import _check_template_consistency
```



---
## parse_declaration
```python
from _parser import parse_declaration
```



---
## parse_namespace_object
```python
from _parser import parse_namespace_object
```



---
## parse_xref_object
```python
from _parser import parse_xref_object
```



---
## parse_expression
```python
from _parser import parse_expression
```



---
## _udl
```python
from _parser import _udl
```



---
## _parse_bin_op_expr
```python
from _parser import _parse_bin_op_expr
```



---
## parser
```python
from _parser import parser
```



---
## parse_and_expr
```python
from _parser import parse_and_expr
```



---
## __name__
```python
from _symbol import __name__
```



---
## _DuplicateSymbolError
```python
from _symbol import _DuplicateSymbolError
```



---
## SymbolLookupResult
```python
from _symbol import SymbolLookupResult
```



---
## LookupKey
```python
from _symbol import LookupKey
```



---
## _is_specialization
```python
from _symbol import _is_specialization
```



---
## Symbol
```python
from _symbol import Symbol
```



---
## __init__
```python
from _symbol import __init__
```



---
## __str__
```python
from _symbol import __str__
```



---
## __copy__
```python
from _symbol import __copy__
```



---
## __deepcopy__
```python
from _symbol import __deepcopy__
```



---
## debug_print
```python
from _symbol import debug_print
```



---
## _assert_invariants
```python
from _symbol import _assert_invariants
```



---
## __setattr__
```python
from _symbol import __setattr__
```



---
## __repr__
```python
from _symbol import __repr__
```



---
## _fill_empty
```python
from _symbol import _fill_empty
```



---
## _add_template_and_function_params
```python
from _symbol import _add_template_and_function_params
```



---
## remove
```python
from _symbol import remove
```



---
## clear_doc
```python
from _symbol import clear_doc
```



---
## get_all_symbols
```python
from _symbol import get_all_symbols
```



---
## children_recurse_anon
```python
from _symbol import children_recurse_anon
```



---
## get_lookup_key
```python
from _symbol import get_lookup_key
```



---
## get_full_nested_name
```python
from _symbol import get_full_nested_name
```



---
## _find_first_named_symbol
```python
from _symbol import _find_first_named_symbol
```



---
## _find_named_symbols
```python
from _symbol import _find_named_symbols
```



---
## _symbol_lookup
```python
from _symbol import _symbol_lookup
```



---
## _add_symbols
```python
from _symbol import _add_symbols
```



---
## merge_with
```python
from _symbol import merge_with
```



---
## add_name
```python
from _symbol import add_name
```



---
## add_declaration
```python
from _symbol import add_declaration
```



---
## find_identifier
```python
from _symbol import find_identifier
```



---
## direct_lookup
```python
from _symbol import direct_lookup
```



---
## find_name
```python
from _symbol import find_name
```



---
## find_declaration
```python
from _symbol import find_declaration
```



---
## to_string
```python
from _symbol import to_string
```



---
## dump
```python
from _symbol import dump
```



---
## matches
```python
from _symbol import matches
```



---
## candidates
```python
from _symbol import candidates
```



---
## onMissingQualifiedSymbol
```python
from _symbol import onMissingQualifiedSymbol
```



---
## makeCandSymbol
```python
from _symbol import makeCandSymbol
```



---
## unconditionalAdd
```python
from _symbol import unconditionalAdd
```



---
## QualifiedSymbolIsTemplateParam
```python
from _symbol import QualifiedSymbolIsTemplateParam
```



---
## handleDuplicateDeclaration
```python
from _symbol import handleDuplicateDeclaration
```



---
## CObject
```python
from __init__ import CObject
```

Description of a C language object.

---
## CMemberObject
```python
from __init__ import CMemberObject
```



---
## CFunctionObject
```python
from __init__ import CFunctionObject
```



---
## CMacroObject
```python
from __init__ import CMacroObject
```



---
## CStructObject
```python
from __init__ import CStructObject
```



---
## CUnionObject
```python
from __init__ import CUnionObject
```



---
## CEnumObject
```python
from __init__ import CEnumObject
```



---
## CEnumeratorObject
```python
from __init__ import CEnumeratorObject
```



---
## CTypeObject
```python
from __init__ import CTypeObject
```



---
## CNamespaceObject
```python
from __init__ import CNamespaceObject
```

This directive is just to tell Sphinx that we're documenting stuff in
namespace foo.

---
## CNamespacePushObject
```python
from __init__ import CNamespacePushObject
```



---
## CNamespacePopObject
```python
from __init__ import CNamespacePopObject
```



---
## CAliasObject
```python
from __init__ import CAliasObject
```



---
## CXRefRole
```python
from __init__ import CXRefRole
```



---
## CExprRole
```python
from __init__ import CExprRole
```



---
## CDomain
```python
from __init__ import CDomain
```

C language domain.

---
## ASTParameters
```python
from _ast import ASTParameters
```



---
## ASTDeclaratorNameParam
```python
from _ast import ASTDeclaratorNameParam
```



---
## ASTMacroParameter
```python
from _ast import ASTMacroParameter
```



---
## ASTMacro
```python
from _ast import ASTMacro
```



---
## ASTStruct
```python
from _ast import ASTStruct
```



---
## _parse_paren_expression
```python
from _parser import _parse_paren_expression
```



---
## _parse_simple_type_specifier
```python
from _parser import _parse_simple_type_specifier
```



---
## _parse_parameters
```python
from _parser import _parse_parameters
```



---
## _parse_macro
```python
from _parser import _parse_macro
```



---
## _parse_struct
```python
from _parser import _parse_struct
```



---
## _children
```python
from _symbol import _children
```



---
## _add_child
```python
from _symbol import _add_child
```



---
## _remove_child
```python
from _symbol import _remove_child
```



---
## _add_function_params
```python
from _symbol import _add_function_params
```



---
## children
```python
from _symbol import children
```



---
## FootnoteDocnameUpdater
```python
from transforms import FootnoteDocnameUpdater
```

Add docname to footnote and footnote_reference nodes.

---
## SubstitutionDefinitionsRemover
```python
from transforms import SubstitutionDefinitionsRemover
```

Remove ``substitution_definition`` nodes from doctrees.

---
## ShowUrlsTransform
```python
from transforms import ShowUrlsTransform
```

Expand references to inline text or footnotes.

For more information, see :confval:`latex_show_urls`.

.. note:: This transform is used for integrated doctree

---
## FootnoteCollector
```python
from transforms import FootnoteCollector
```

Collect footnotes and footnote references on the document

---
## LaTeXFootnoteTransform
```python
from transforms import LaTeXFootnoteTransform
```

Convert footnote definitions and references to appropriate form to LaTeX.

* Replace footnotes on restricted zone (e.g. headings) by footnotemark node.
  In addition, append a footnotetext node after the zone.

  Before::

      <section>
          <title>
              headings having footnotes
              <footnote_reference>
                  1
          <footnote ids="id1">
              <label>
                  1
              <paragraph>
                  footnote body

  After::

      <section>
          <title>
              headings having footnotes
              <footnotemark refid="id1">
                  1
          <footnotetext ids="id1">
              <label>
                  1
              <paragraph>
                  footnote body

* Integrate footnote definitions and footnote references to single footnote node

  Before::

      blah blah blah
      <footnote_reference refid="id1">
          1
      blah blah blah ...

      <footnote ids="id1">
          <label>
              1
          <paragraph>
              footnote body

  After::

      blah blah blah
      <footnote ids="id1">
          <label>
              1
          <paragraph>
              footnote body
      blah blah blah ...

* Replace second and subsequent footnote references which refers same footnote definition
  by footnotemark node.  Additionally, the footnote definition node is marked as
  "referred".

  Before::

      blah blah blah
      <footnote_reference refid="id1">
          1
      blah blah blah
      <footnote_reference refid="id1">
          1
      blah blah blah ...

      <footnote ids="id1">
          <label>
              1
          <paragraph>
              footnote body

  After::

      blah blah blah
      <footnote ids="id1" referred=True>
          <label>
              1
          <paragraph>
              footnote body
      blah blah blah
      <footnotemark refid="id1">
          1
      blah blah blah ...

* Remove unreferenced footnotes

  Before::

      <footnote ids="id1">
          <label>
              1
          <paragraph>
              Unreferenced footnote!

  After::

      <!-- nothing! -->

* Move footnotes in a title of table or thead to head of tbody

  Before::

      <table>
          <title>
              title having footnote_reference
              <footnote_reference refid="id1">
                  1
          <tgroup>
              <thead>
                  <row>
                      <entry>
                          header having footnote_reference
                          <footnote_reference refid="id2">
                              2
              <tbody>
                  <row>
                  ...

      <footnote ids="id1">
          <label>
              1
          <paragraph>
              footnote body

      <footnote ids="id2">
          <label>
              2
          <paragraph>
              footnote body

  After::

      <table>
          <title>
              title having footnote_reference
              <footnotemark refid="id1">
                  1
          <tgroup>
              <thead>
                  <row>
                      <entry>
                          header having footnote_reference
                          <footnotemark refid="id2">
                              2
              <tbody>
                  <footnotetext ids="id1">
                      <label>
                          1
                      <paragraph>
                          footnote body

                  <footnotetext ids="id2">
                      <label>
                          2
                      <paragraph>
                          footnote body
                  <row>
                  ...

---
## LaTeXFootnoteVisitor
```python
from transforms import LaTeXFootnoteVisitor
```



---
## BibliographyTransform
```python
from transforms import BibliographyTransform
```

Gather bibliography entries to tail of document.

Before::

    <document>
        <paragraph>
            blah blah blah
        <citation>
            ...
        <paragraph>
            blah blah blah
        <citation>
            ...
        ...

After::

    <document>
        <paragraph>
            blah blah blah
        <paragraph>
            blah blah blah
        ...
        <thebibliography>
            <citation>
                ...
            <citation>
                ...

---
## CitationReferenceTransform
```python
from transforms import CitationReferenceTransform
```

Replace pending_xref nodes for citation by citation_reference.

To handle citation reference easily on LaTeX writer, this converts
pending_xref nodes to citation_reference.

---
## MathReferenceTransform
```python
from transforms import MathReferenceTransform
```

Replace pending_xref nodes for math by math_reference.

To handle math reference easily on LaTeX writer, this converts pending_xref
nodes to math_reference.

---
## LiteralBlockTransform
```python
from transforms import LiteralBlockTransform
```

Replace container nodes for literal_block by captioned_literal_block.

---
## DocumentTargetTransform
```python
from transforms import DocumentTargetTransform
```

Add :doc label to the first section of each document.

---
## IndexInSectionTitleTransform
```python
from transforms import IndexInSectionTitleTransform
```

Move index nodes in section title to outside of the title.

LaTeX index macro is not compatible with some handling of section titles
such as uppercasing done on LaTeX side (cf. fncychap handling of ``\chapter``).
Moving the index node to after the title node fixes that.

Before::

    <section>
        <title>
            blah blah <index entries=[...]/>blah
        <paragraph>
            blah blah blah
        ...

After::

    <section>
        <title>
            blah blah blah
        <index entries=[...]/>
        <paragraph>
            blah blah blah
        ...

---
## setup
```python
from transforms import setup
```



---
## apply
```python
from transforms import apply
```



---
## run
```python
from transforms import run
```



---
## expand_show_urls
```python
from transforms import expand_show_urls
```



---
## get_docname_for_node
```python
from transforms import get_docname_for_node
```



---
## create_footnote
```python
from transforms import create_footnote
```



---
## renumber_footnotes
```python
from transforms import renumber_footnotes
```



---
## unknown_visit
```python
from transforms import unknown_visit
```



---
## unknown_departure
```python
from transforms import unknown_departure
```



---
## visit_footnote
```python
from transforms import visit_footnote
```



---
## visit_footnote_reference
```python
from transforms import visit_footnote_reference
```



---
## restrict
```python
from transforms import restrict
```



---
## unrestrict
```python
from transforms import unrestrict
```



---
## visit_figure
```python
from transforms import visit_figure
```



---
## depart_figure
```python
from transforms import depart_figure
```



---
## visit_term
```python
from transforms import visit_term
```



---
## depart_term
```python
from transforms import depart_term
```



---
## visit_caption
```python
from transforms import visit_caption
```



---
## depart_caption
```python
from transforms import depart_caption
```



---
## visit_title
```python
from transforms import visit_title
```



---
## depart_title
```python
from transforms import depart_title
```



---
## visit_thead
```python
from transforms import visit_thead
```



---
## depart_thead
```python
from transforms import depart_thead
```



---
## depart_table
```python
from transforms import depart_table
```



---
## depart_footnote
```python
from transforms import depart_footnote
```



---
## get_footnote_by_reference
```python
from transforms import get_footnote_by_reference
```



---
## BuiltInTheme
```python
from theming import BuiltInTheme
```

A built-in LaTeX theme.

---
## UserTheme
```python
from theming import UserTheme
```

A user defined LaTeX theme.

---
## ThemeFactory
```python
from theming import ThemeFactory
```

A factory class for LaTeX Themes.

---
## update
```python
from theming import update
```

Override theme settings by user's configuration.

---
## load_builtin_themes
```python
from theming import load_builtin_themes
```

Load built-in themes.

---
## get
```python
from theming import get
```

Get a theme for given *name*.

---
## find_user_theme
```python
from theming import find_user_theme
```

Find a theme named as *name* from latex_theme_path.

---
## ExtBabel
```python
from util import ExtBabel
```



---
## uses_cyrillic
```python
from util import uses_cyrillic
```



---
## is_supported_language
```python
from util import is_supported_language
```



---
## language_name
```python
from util import language_name
```



---
## get_mainlanguage_options
```python
from util import get_mainlanguage_options
```

Return options for polyglossia's ``\setmainlanguage``.

---
## LaTeXBuilder
```python
from __init__ import LaTeXBuilder
```

Builds LaTeX output to create PDF.

---
## validate_config_values
```python
from __init__ import validate_config_values
```



---
## validate_latex_theme_options
```python
from __init__ import validate_latex_theme_options
```



---
## install_packages_for_ja
```python
from __init__ import install_packages_for_ja
```

Install packages for Japanese.

---
## default_latex_engine
```python
from __init__ import default_latex_engine
```

Better default latex_engine settings for specific languages.

---
## default_latex_docclass
```python
from __init__ import default_latex_docclass
```

Better default latex_docclass settings for specific languages.

---
## default_latex_use_xindy
```python
from __init__ import default_latex_use_xindy
```

Better default latex_use_xindy settings for specific engines.

---
## default_latex_documents
```python
from __init__ import default_latex_documents
```

Better default latex_documents settings.

---
## init_document_data
```python
from __init__ import init_document_data
```



---
## init_context
```python
from __init__ import init_context
```



---
## init_babel
```python
from __init__ import init_babel
```



---
## init_multilingual
```python
from __init__ import init_multilingual
```



---
## write_stylesheet
```python
from __init__ import write_stylesheet
```



---
## get_contentsname
```python
from __init__ import get_contentsname
```



---
## update_doc_context
```python
from __init__ import update_doc_context
```



---
## assemble_doctree
```python
from __init__ import assemble_doctree
```



---
## copy_support_files
```python
from __init__ import copy_support_files
```

Copy TeX support files from texinputs.

---
## copy_latex_additional_files
```python
from __init__ import copy_latex_additional_files
```



---
## copy_image_files
```python
from __init__ import copy_image_files
```



---
## write_message_catalog
```python
from __init__ import write_message_catalog
```



---
## captioned_literal_block
```python
from nodes import captioned_literal_block
```

A node for a container of literal_block having a caption.

---
## footnotemark
```python
from nodes import footnotemark
```

A node represents ``\footnotemark``.

---
## footnotetext
```python
from nodes import footnotetext
```

A node represents ``\footnotetext``.

---
## math_reference
```python
from nodes import math_reference
```

A node for a reference for equation.

---
## thebibliography
```python
from nodes import thebibliography
```

A node for wrapping bibliographies.

---
## KeyboardTransform
```python
from transforms import KeyboardTransform
```

Transform :kbd: role to more detailed form.

Before::

    <literal class="kbd">
        Control-x

After::

    <literal class="kbd compound">
        <literal class="kbd">
            Control
        -
        <literal class="kbd">
            x

---
## is_multiwords_key
```python
from transforms import is_multiwords_key
```



---
## __name__
```python
from _assets import __name__
```



---
## _CascadingStyleSheet
```python
from _assets import _CascadingStyleSheet
```



---
## _JavaScript
```python
from _assets import _JavaScript
```



---
## _file_checksum
```python
from _assets import _file_checksum
```



---
## __init__
```python
from _assets import __init__
```



---
## __str__
```python
from _assets import __str__
```



---
## __eq__
```python
from _assets import __eq__
```



---
## __hash__
```python
from _assets import __hash__
```



---
## __setattr__
```python
from _assets import __setattr__
```



---
## __delattr__
```python
from _assets import __delattr__
```



---
## __getattr__
```python
from _assets import __getattr__
```



---
## __getitem__
```python
from _assets import __getitem__
```



---
## _stable_hash
```python
from __init__ import _stable_hash
```

Return a stable hash for a Python data structure.

We can't just use the md5 of str(obj) as the order of collections
may be random.

---
## convert_locale_to_language_tag
```python
from __init__ import convert_locale_to_language_tag
```

Convert a locale string to a language tag (ex. en_US -> en-US).

refs: BCP 47 (:rfc:`5646`)

---
## BuildInfo
```python
from __init__ import BuildInfo
```

buildinfo file manipulator.

HTMLBuilder and its family are storing their own envdata to ``.buildinfo``.
This class is a manipulator for the file.

---
## StandaloneHTMLBuilder
```python
from __init__ import StandaloneHTMLBuilder
```

Builds standalone HTML docs.

---
## convert_html_css_files
```python
from __init__ import convert_html_css_files
```

Convert string styled html_css_files to tuple styled one.

---
## convert_html_js_files
```python
from __init__ import convert_html_js_files
```

Convert string styled html_js_files to tuple styled one.

---
## setup_resource_paths
```python
from __init__ import setup_resource_paths
```

Set up relative resource paths.

---
## validate_math_renderer
```python
from __init__ import validate_math_renderer
```



---
## validate_html_extra_path
```python
from __init__ import validate_html_extra_path
```

Check html_extra_paths setting.

---
## validate_html_static_path
```python
from __init__ import validate_html_static_path
```

Check html_static_paths setting.

---
## validate_html_logo
```python
from __init__ import validate_html_logo
```

Check html_logo setting.

---
## validate_html_favicon
```python
from __init__ import validate_html_favicon
```

Check html_favicon setting.

---
## error_on_html_sidebars_string_values
```python
from __init__ import error_on_html_sidebars_string_values
```

Support removed in Sphinx 2.

---
## error_on_html_4
```python
from __init__ import error_on_html_4
```

Error on HTML 4.

---
## create_build_info
```python
from __init__ import create_build_info
```



---
## _get_translations_js
```python
from __init__ import _get_translations_js
```



---
## _get_style_filenames
```python
from __init__ import _get_style_filenames
```



---
## get_theme_config
```python
from __init__ import get_theme_config
```



---
## init_templates
```python
from __init__ import init_templates
```



---
## init_highlighter
```python
from __init__ import init_highlighter
```



---
## css_files
```python
from __init__ import css_files
```



---
## init_css_files
```python
from __init__ import init_css_files
```



---
## add_css_file
```python
from __init__ import add_css_file
```



---
## script_files
```python
from __init__ import script_files
```



---
## init_js_files
```python
from __init__ import init_js_files
```



---
## add_js_file
```python
from __init__ import add_js_file
```



---
## math_renderer_name
```python
from __init__ import math_renderer_name
```



---
## render_partial
```python
from __init__ import render_partial
```

Utility: Render a lone doctree node.

---
## get_doc_context
```python
from __init__ import get_doc_context
```

Collect items for the template context of a page.

---
## gen_indices
```python
from __init__ import gen_indices
```



---
## gen_pages_from_extensions
```python
from __init__ import gen_pages_from_extensions
```



---
## gen_additional_pages
```python
from __init__ import gen_additional_pages
```



---
## write_genindex
```python
from __init__ import write_genindex
```



---
## write_domain_indices
```python
from __init__ import write_domain_indices
```



---
## copy_download_files
```python
from __init__ import copy_download_files
```



---
## create_pygments_style_file
```python
from __init__ import create_pygments_style_file
```

Create a style file for pygments.

---
## copy_translation_js
```python
from __init__ import copy_translation_js
```

Copy a JavaScript file for translations.

---
## copy_stemmer_js
```python
from __init__ import copy_stemmer_js
```

Copy a JavaScript file for stemmer.

---
## copy_theme_static_files
```python
from __init__ import copy_theme_static_files
```



---
## copy_html_static_files
```python
from __init__ import copy_html_static_files
```



---
## copy_html_logo
```python
from __init__ import copy_html_logo
```



---
## copy_html_favicon
```python
from __init__ import copy_html_favicon
```



---
## copy_static_files
```python
from __init__ import copy_static_files
```



---
## copy_extra_files
```python
from __init__ import copy_extra_files
```

Copy html_extra_path files.

---
## write_buildinfo
```python
from __init__ import write_buildinfo
```



---
## load_indexer
```python
from __init__ import load_indexer
```



---
## index_page
```python
from __init__ import index_page
```



---
## _get_local_toctree
```python
from __init__ import _get_local_toctree
```



---
## get_outfilename
```python
from __init__ import get_outfilename
```



---
## add_sidebars
```python
from __init__ import add_sidebars
```



---
## handle_page
```python
from __init__ import handle_page
```



---
## update_page_context
```python
from __init__ import update_page_context
```



---
## handle_finish
```python
from __init__ import handle_finish
```



---
## dump_inventory
```python
from __init__ import dump_inventory
```



---
## dump_search_index
```python
from __init__ import dump_search_index
```



---
## to_relpath
```python
from __init__ import to_relpath
```



---
## onerror
```python
from __init__ import onerror
```



---
## has_wildcard
```python
from __init__ import has_wildcard
```



---
## pathto
```python
from __init__ import pathto
```



---
## hasdoc
```python
from __init__ import hasdoc
```



---
## css_tag
```python
from __init__ import css_tag
```



---
## js_tag
```python
from __init__ import js_tag
```



---
## _filter_enum_dict
```python
from importer import _filter_enum_dict
```

Find the attributes to document of an enumeration class.

The output consists of triplets ``(attribute name, defining class, value)``
where the attribute name can appear more than once during the iteration
but with different defining class. The order of occurrence is guided by
the MRO of *enum_class*.

---
## mangle
```python
from importer import mangle
```

Mangle the given name.

---
## unmangle
```python
from importer import unmangle
```

Unmangle the given name.

---
## import_module
```python
from importer import import_module
```

Call importlib.import_module(modname), convert exceptions to ImportError.

---
## _reload_module
```python
from importer import _reload_module
```

Call importlib.reload(module), convert exceptions to ImportError

---
## import_object
```python
from importer import import_object
```



---
## Attribute
```python
from importer import Attribute
```



---
## get_object_members
```python
from importer import get_object_members
```

Get members and attributes of target object.

---
## get_class_members
```python
from importer import get_class_members
```

Get members and attributes of target class.

---
## is_native_api
```python
from importer import is_native_api
```

Check whether *obj* is the same as ``Enum.__dict__[name]``.

---
## should_ignore
```python
from importer import should_ignore
```



---
## query
```python
from importer import query
```



---
## __name__
```python
from preserve_defaults import __name__
```

Preserve function defaults.

Preserve the default argument values of function signatures in source code
and keep them not evaluated for readability.

---
## DefaultValue
```python
from preserve_defaults import DefaultValue
```



---
## get_function_def
```python
from preserve_defaults import get_function_def
```

Get FunctionDef object from living object.

This tries to parse original code for living object and returns
AST node for given *obj*.

---
## _get_arguments
```python
from preserve_defaults import _get_arguments
```

Parse 'ast.arguments' from an object.

This tries to parse the original code for an object and returns
an 'ast.arguments' node.

---
## _is_lambda
```python
from preserve_defaults import _is_lambda
```



---
## _get_arguments_inner
```python
from preserve_defaults import _get_arguments_inner
```



---
## get_default_value
```python
from preserve_defaults import get_default_value
```



---
## update_defvalue
```python
from preserve_defaults import update_defvalue
```

Update defvalue info of *obj* using type_comments.

---
## setup
```python
from preserve_defaults import setup
```



---
## __init__
```python
from preserve_defaults import __init__
```



---
## __repr__
```python
from preserve_defaults import __repr__
```



---
## _All
```python
from __init__ import _All
```

A special value for :*-members: that matches to any member.

---
## _Empty
```python
from __init__ import _Empty
```

A special value for :exclude-members: that never matches to any member.

---
## members_option
```python
from __init__ import members_option
```

Used to convert the :members: option to auto directives.

---
## exclude_members_option
```python
from __init__ import exclude_members_option
```

Used to convert the :exclude-members: option.

---
## inherited_members_option
```python
from __init__ import inherited_members_option
```

Used to convert the :inherited-members: option to auto directives.

---
## member_order_option
```python
from __init__ import member_order_option
```

Used to convert the :member-order: option to auto directives.

---
## class_doc_from_option
```python
from __init__ import class_doc_from_option
```

Used to convert the :class-doc-from: option to autoclass directives.

---
## annotation_option
```python
from __init__ import annotation_option
```



---
## bool_option
```python
from __init__ import bool_option
```

Used to convert flag options to auto directives.  (Instead of
directives.flag(), which returns None).

---
## merge_members_option
```python
from __init__ import merge_members_option
```

Merge :private-members: and :special-members: options to the
:members: option.

---
## cut_lines
```python
from __init__ import cut_lines
```

Return a listener that removes the first *pre* and last *post*
lines of every docstring.  If *what* is a sequence of strings,
only docstrings of a type in *what* will be processed.

Use like this (e.g. in the ``setup()`` function of :file:`conf.py`)::

   from sphinx.ext.autodoc import cut_lines
   app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))

This can (and should) be used in place of :confval:`automodule_skip_lines`.

---
## ObjectMember
```python
from __init__ import ObjectMember
```

A member of object.

This is used for the result of `Documenter.get_module_members()` to
represent each member of the object.

---
## Documenter
```python
from __init__ import Documenter
```

A Documenter knows how to autodocument a single object type.  When
registered with the AutoDirective, it will be used to document objects
of that type when needed by autodoc.

Its *objtype* attribute selects what auto directive it is assigned to
(the directive name is 'auto' + objtype), and what directive it generates
by default, though that can be overridden by an attribute called
*directivetype*.

A Documenter has an *option_spec* that works like a docutils directive's;
in fact, it will be used to parse an auto directive's options that matches
the Documenter.

---
## ModuleDocumenter
```python
from __init__ import ModuleDocumenter
```

Specialized Documenter subclass for modules.

---
## ModuleLevelDocumenter
```python
from __init__ import ModuleLevelDocumenter
```

Specialized Documenter subclass for objects on module level (functions,
classes, data/constants).

---
## ClassLevelDocumenter
```python
from __init__ import ClassLevelDocumenter
```

Specialized Documenter subclass for objects on class level (methods,
attributes).

---
## DocstringSignatureMixin
```python
from __init__ import DocstringSignatureMixin
```

Mixin for FunctionDocumenter and MethodDocumenter to provide the
feature of reading the signature from the docstring.

---
## DocstringStripSignatureMixin
```python
from __init__ import DocstringStripSignatureMixin
```

Mixin for AttributeDocumenter to provide the
feature of stripping any function signature from the docstring.

---
## FunctionDocumenter
```python
from __init__ import FunctionDocumenter
```

Specialized Documenter subclass for functions.

---
## DecoratorDocumenter
```python
from __init__ import DecoratorDocumenter
```

Specialized Documenter subclass for decorator functions.

---
## ClassDocumenter
```python
from __init__ import ClassDocumenter
```

Specialized Documenter subclass for classes.

---
## ExceptionDocumenter
```python
from __init__ import ExceptionDocumenter
```

Specialized ClassDocumenter subclass for exceptions.

---
## DataDocumenterMixinBase
```python
from __init__ import DataDocumenterMixinBase
```



---
## GenericAliasMixin
```python
from __init__ import GenericAliasMixin
```

Mixin for DataDocumenter and AttributeDocumenter to provide the feature for
supporting GenericAliases.

---
## UninitializedGlobalVariableMixin
```python
from __init__ import UninitializedGlobalVariableMixin
```

Mixin for DataDocumenter to provide the feature for supporting uninitialized
(type annotation only) global variables.

---
## DataDocumenter
```python
from __init__ import DataDocumenter
```

Specialized Documenter subclass for data items.

---
## MethodDocumenter
```python
from __init__ import MethodDocumenter
```

Specialized Documenter subclass for methods (normal, static and class).

---
## NonDataDescriptorMixin
```python
from __init__ import NonDataDescriptorMixin
```

Mixin for AttributeDocumenter to provide the feature for supporting non
data-descriptors.

.. note:: This mix-in must be inherited after other mix-ins.  Otherwise, docstring
          and :value: header will be suppressed unexpectedly.

---
## SlotsMixin
```python
from __init__ import SlotsMixin
```

Mixin for AttributeDocumenter to provide the feature for supporting __slots__.

---
## RuntimeInstanceAttributeMixin
```python
from __init__ import RuntimeInstanceAttributeMixin
```

Mixin for AttributeDocumenter to provide the feature for supporting runtime
instance attributes (that are defined in __init__() methods with doc-comments).

Example:

    class Foo:
        def __init__(self):
            self.attr = None  #: This is a target of this mix-in.

---
## UninitializedInstanceAttributeMixin
```python
from __init__ import UninitializedInstanceAttributeMixin
```

Mixin for AttributeDocumenter to provide the feature for supporting uninitialized
instance attributes (PEP-526 styled, annotation only attributes).

Example:

    class Foo:
        attr: int  #: This is a target of this mix-in.

---
## AttributeDocumenter
```python
from __init__ import AttributeDocumenter
```

Specialized Documenter subclass for attributes.

---
## PropertyDocumenter
```python
from __init__ import PropertyDocumenter
```

Specialized Documenter subclass for properties.

---
## autodoc_attrgetter
```python
from __init__ import autodoc_attrgetter
```

Alternative getattr() for types

---
## process
```python
from __init__ import process
```



---
## get_attr
```python
from __init__ import get_attr
```

getattr() override for types such as Zope interfaces.

---
## can_document_member
```python
from __init__ import can_document_member
```



---
## documenters
```python
from __init__ import documenters
```

Returns registered Documenter classes

---
## add_line
```python
from __init__ import add_line
```

Append one line of generated reST to the output.

---
## resolve_name
```python
from __init__ import resolve_name
```



---
## parse_name
```python
from __init__ import parse_name
```



---
## get_real_modname
```python
from __init__ import get_real_modname
```



---
## check_module
```python
from __init__ import check_module
```

Check if *self.object* is really defined in the module given by
*self.modname*.

---
## format_args
```python
from __init__ import format_args
```



---
## format_name
```python
from __init__ import format_name
```

Format the name of *self.object*.

This normally should be something that can be parsed by the generated
directive, but doesn't need to be (Sphinx will display it unparsed
then).

---
## _call_format_args
```python
from __init__ import _call_format_args
```



---
## format_signature
```python
from __init__ import format_signature
```



---
## add_directive_header
```python
from __init__ import add_directive_header
```



---
## get_doc
```python
from __init__ import get_doc
```



---
## get_sourcename
```python
from __init__ import get_sourcename
```



---
## add_content
```python
from __init__ import add_content
```



---
## get_object_members
```python
from __init__ import get_object_members
```



---
## filter_members
```python
from __init__ import filter_members
```

Filter the given member list.

Members are skipped if

- they are private (except if given explicitly or the private-members
  option is set)
- they are special methods (except if given explicitly or the
  special-members option is set)
- they are undocumented (except if the undoc-members option is set)

The user can override the skipping decision by connecting to the
``autodoc-skip-member`` event.

---
## document_members
```python
from __init__ import document_members
```



---
## sort_members
```python
from __init__ import sort_members
```



---
## get_module_members
```python
from __init__ import get_module_members
```

Get members of target module.

---
## _find_signature
```python
from __init__ import _find_signature
```



---
## merge_default_value
```python
from __init__ import merge_default_value
```

Merge default values of actual implementation to the overload variants.

---
## annotate_to_first_argument
```python
from __init__ import annotate_to_first_argument
```

Annotate type hint to the first argument of function if needed.

---
## _get_signature
```python
from __init__ import _get_signature
```



---
## get_overloaded_signatures
```python
from __init__ import get_overloaded_signatures
```



---
## get_canonical_fullname
```python
from __init__ import get_canonical_fullname
```



---
## get_variable_comment
```python
from __init__ import get_variable_comment
```



---
## should_suppress_directive_header
```python
from __init__ import should_suppress_directive_header
```



---
## should_suppress_value_header
```python
from __init__ import should_suppress_value_header
```



---
## update_content
```python
from __init__ import update_content
```



---
## update_annotations
```python
from __init__ import update_annotations
```

Update __annotations__ to support type_comment and so on.

---
## get_module_comment
```python
from __init__ import get_module_comment
```



---
## isslotsattribute
```python
from __init__ import isslotsattribute
```

Check the subject is an attribute in __slots__.

---
## is_runtime_instance_attribute
```python
from __init__ import is_runtime_instance_attribute
```

Check the subject is an attribute defined in __init__().

---
## is_runtime_instance_attribute_not_commented
```python
from __init__ import is_runtime_instance_attribute_not_commented
```

Check the subject is an attribute defined in __init__() without comment.

---
## is_uninitialized_instance_attribute
```python
from __init__ import is_uninitialized_instance_attribute
```

Check the subject is an annotation only attribute.

---
## is_function_or_method
```python
from __init__ import is_function_or_method
```



---
## get_attribute_comment
```python
from __init__ import get_attribute_comment
```



---
## _get_property_getter
```python
from __init__ import _get_property_getter
```



---
## is_filtered_inherited_member
```python
from __init__ import is_filtered_inherited_member
```



---
## dummy
```python
from __init__ import dummy
```



---
## get_user_defined_function_or_method
```python
from __init__ import get_user_defined_function_or_method
```

Get the `attr` function or method from `obj`, if it is user-defined.

---
## keyfunc
```python
from __init__ import keyfunc
```



---
## __name__
```python
from directive import __name__
```



---
## DummyOptionSpec
```python
from directive import DummyOptionSpec
```

An option_spec allows any options.

---
## DocumenterBridge
```python
from directive import DocumenterBridge
```

A parameters container for Documenters.

---
## process_documenter_options
```python
from directive import process_documenter_options
```

Recognize options of Documenter from user input.

---
## parse_generated_content
```python
from directive import parse_generated_content
```

Parse an item of content generated by Documenter.

---
## AutodocDirective
```python
from directive import AutodocDirective
```

A directive class for all autodoc directives. It works as a dispatcher of Documenters.

It invokes a Documenter upon running. After the processing, it parses and returns
the content generated by Documenter.

---
## __bool__
```python
from directive import __bool__
```

Behaves like some options are defined.

---
## __getitem__
```python
from directive import __getitem__
```



---
## __init__
```python
from directive import __init__
```



---
## run
```python
from directive import run
```



---
## __name__
```python
from typehints import __name__
```

Generating content for autodoc using typehints

---
## record_typehints
```python
from typehints import record_typehints
```

Record type hints to env object.

---
## merge_typehints
```python
from typehints import merge_typehints
```



---
## insert_field_list
```python
from typehints import insert_field_list
```



---
## modify_field_list
```python
from typehints import modify_field_list
```



---
## augment_descriptions_with_types
```python
from typehints import augment_descriptions_with_types
```



---
## setup
```python
from typehints import setup
```



---
## __name__
```python
from type_comment import __name__
```

Update annotations info of living objects using type_comments.

---
## not_suppressed
```python
from type_comment import not_suppressed
```

Check given *argtypes* is suppressed type_comment or not.

---
## signature_from_ast
```python
from type_comment import signature_from_ast
```

Return a Signature object for the given *node*.

:param bound_method: Specify *node* is a bound method or not

---
## get_type_comment
```python
from type_comment import get_type_comment
```

Get type_comment'ed FunctionDef object from living object.

This tries to parse original code for living object and returns
Signature for given *obj*.

---
## update_annotations_using_type_comments
```python
from type_comment import update_annotations_using_type_comments
```

Update annotations info of *obj* using type_comments.

---
## setup
```python
from type_comment import setup
```



---
## _MockObject
```python
from mock import _MockObject
```

Used by autodoc_mock_imports.

---
## _make_subclass
```python
from mock import _make_subclass
```



---
## _MockModule
```python
from mock import _MockModule
```

Used by autodoc_mock_imports.

---
## MockLoader
```python
from mock import MockLoader
```

A loader for mocking.

---
## MockFinder
```python
from mock import MockFinder
```

A finder for mocking.

---
## mock
```python
from mock import mock
```

Insert mock modules during context::

with mock(['target.module.name']):
    # mock modules are enabled here
    ...

---
## ismockmodule
```python
from mock import ismockmodule
```

Check if the object is a mocked module.

---
## ismock
```python
from mock import ismock
```

Check if the object is mocked.

---
## undecorate
```python
from mock import undecorate
```

Unwrap mock if *subject* is decorated by mocked object.

If not decorated, returns given *subject* itself.

---
## __new__
```python
from mock import __new__
```



---
## __len__
```python
from mock import __len__
```



---
## __contains__
```python
from mock import __contains__
```



---
## __iter__
```python
from mock import __iter__
```



---
## __mro_entries__
```python
from mock import __mro_entries__
```



---
## __getitem__
```python
from mock import __getitem__
```



---
## __getattr__
```python
from mock import __getattr__
```



---
## __call__
```python
from mock import __call__
```



---
## create_module
```python
from mock import create_module
```



---
## exec_module
```python
from mock import exec_module
```



---
## find_spec
```python
from mock import find_spec
```



---
## invalidate_caches
```python
from mock import invalidate_caches
```

Invalidate mocked modules on sys.modules.

---
## _patch_python_domain
```python
from __init__ import _patch_python_domain
```



---
## _process_docstring
```python
from __init__ import _process_docstring
```

Process the docstring for a given python object.

Called when autodoc has read and processed a docstring. `lines` is a list
of docstring lines that `_process_docstring` modifies in place to change
what Sphinx outputs.

The following settings in conf.py control what styles of docstrings will
be parsed:

* ``napoleon_google_docstring`` -- parse Google style docstrings
* ``napoleon_numpy_docstring`` -- parse NumPy style docstrings

Parameters
----------
app : sphinx.application.Sphinx
    Application object representing the Sphinx process.
what : str
    A string specifying the type of the object to which the docstring
    belongs. Valid values: "module", "class", "exception", "function",
    "method", "attribute".
name : str
    The fully qualified name of the object.
obj : module, class, exception, function, method, or attribute
    The object to which the docstring belongs.
options : sphinx.ext.autodoc.Options
    The options given to the directive: an object with attributes
    inherited_members, undoc_members, show_inheritance and no_index that
    are True if the flag option of same name was given to the auto
    directive.
lines : list of str
    The lines of the docstring, see above.

    .. note:: `lines` is modified *in place*

---
## _skip_member
```python
from __init__ import _skip_member
```

Determine if private and special class members are included in docs.

The following settings in conf.py determine if private and special class
members or init methods are included in the generated documentation:

* ``napoleon_include_init_with_doc`` --
  include init methods if they have docstrings
* ``napoleon_include_private_with_doc`` --
  include private members if they have docstrings
* ``napoleon_include_special_with_doc`` --
  include special members if they have docstrings

Parameters
----------
app : sphinx.application.Sphinx
    Application object representing the Sphinx process
what : str
    A string specifying the type of the object to which the member
    belongs. Valid values: "module", "class", "exception", "function",
    "method", "attribute".
name : str
    The name of the member.
obj : module, class, exception, function, method, or attribute.
    For example, if the member is the __init__ method of class A, then
    `obj` will be `A.__init__`.
skip : bool
    A boolean indicating if autodoc will skip this member if `_skip_member`
    does not override the decision
options : sphinx.ext.autodoc.Options
    The options given to the directive: an object with attributes
    inherited_members, undoc_members, show_inheritance and no_index that
    are True if the flag option of same name was given to the auto
    directive.

Returns
-------
bool
    True if the member should be skipped during creation of the docs,
    False if it should be included in the docs.

---
## __name__
```python
from docstring import __name__
```

Classes for docstring parsing and formatting.

---
## Deque
```python
from docstring import Deque
```

A subclass of deque that mimics ``pockets.iterators.modify_iter``.

The `.Deque.get` and `.Deque.next` methods are added.

---
## _convert_type_spec
```python
from docstring import _convert_type_spec
```

Convert type specification to reference in reST.

---
## GoogleDocstring
```python
from docstring import GoogleDocstring
```

Convert Google style docstrings to reStructuredText.

Parameters
----------
docstring : :obj:`str` or :obj:`list` of :obj:`str`
    The docstring to parse, given either as a string or split into
    individual lines.
config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
    The configuration settings to use. If not given, defaults to the
    config object on `app`; or if `app` is not given defaults to the
    a new :class:`sphinx.ext.napoleon.Config` object.


Other Parameters
----------------
app : :class:`sphinx.application.Sphinx`, optional
    Application object representing the Sphinx process.
what : :obj:`str`, optional
    A string specifying the type of the object to which the docstring
    belongs. Valid values: "module", "class", "exception", "function",
    "method", "attribute".
name : :obj:`str`, optional
    The fully qualified name of the object.
obj : module, class, exception, function, method, or attribute
    The object to which the docstring belongs.
options : :class:`sphinx.ext.autodoc.Options`, optional
    The options given to the directive: an object with attributes
    inherited_members, undoc_members, show_inheritance and no_index that
    are True if the flag option of same name was given to the auto
    directive.


Example
-------
>>> from sphinx.ext.napoleon import Config
>>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)
>>> docstring = '''One line summary.
...
... Extended description.
...
... Args:
...   arg1(int): Description of `arg1`
...   arg2(str): Description of `arg2`
... Returns:
...   str: Description of return value.
... '''
>>> print(GoogleDocstring(docstring, config))
One line summary.
<BLANKLINE>
Extended description.
<BLANKLINE>
:param arg1: Description of `arg1`
:type arg1: int
:param arg2: Description of `arg2`
:type arg2: str
<BLANKLINE>
:returns: Description of return value.
:rtype: str
<BLANKLINE>

---
## _recombine_set_tokens
```python
from docstring import _recombine_set_tokens
```



---
## _tokenize_type_spec
```python
from docstring import _tokenize_type_spec
```



---
## _token_type
```python
from docstring import _token_type
```



---
## _convert_numpy_type_spec
```python
from docstring import _convert_numpy_type_spec
```



---
## NumpyDocstring
```python
from docstring import NumpyDocstring
```

Convert NumPy style docstrings to reStructuredText.

Parameters
----------
docstring : :obj:`str` or :obj:`list` of :obj:`str`
    The docstring to parse, given either as a string or split into
    individual lines.
config: :obj:`sphinx.ext.napoleon.Config` or :obj:`sphinx.config.Config`
    The configuration settings to use. If not given, defaults to the
    config object on `app`; or if `app` is not given defaults to the
    a new :class:`sphinx.ext.napoleon.Config` object.


Other Parameters
----------------
app : :class:`sphinx.application.Sphinx`, optional
    Application object representing the Sphinx process.
what : :obj:`str`, optional
    A string specifying the type of the object to which the docstring
    belongs. Valid values: "module", "class", "exception", "function",
    "method", "attribute".
name : :obj:`str`, optional
    The fully qualified name of the object.
obj : module, class, exception, function, method, or attribute
    The object to which the docstring belongs.
options : :class:`sphinx.ext.autodoc.Options`, optional
    The options given to the directive: an object with attributes
    inherited_members, undoc_members, show_inheritance and no_index that
    are True if the flag option of same name was given to the auto
    directive.


Example
-------
>>> from sphinx.ext.napoleon import Config
>>> config = Config(napoleon_use_param=True, napoleon_use_rtype=True)
>>> docstring = '''One line summary.
...
... Extended description.
...
... Parameters
... ----------
... arg1 : int
...     Description of `arg1`
... arg2 : str
...     Description of `arg2`
... Returns
... -------
... str
...     Description of return value.
... '''
>>> print(NumpyDocstring(docstring, config))
One line summary.
<BLANKLINE>
Extended description.
<BLANKLINE>
:param arg1: Description of `arg1`
:type arg1: int
:param arg2: Description of `arg2`
:type arg2: str
<BLANKLINE>
:returns: Description of return value.
:rtype: str
<BLANKLINE>

Methods
-------
__str__()
    Return the parsed docstring in reStructuredText format.

    Returns
    -------
    str
        UTF-8 encoded version of the docstring.

__unicode__()
    Return the parsed docstring in reStructuredText format.

    Returns
    -------
    unicode
        Unicode version of the docstring.

lines()
    Return the parsed lines of the docstring in reStructuredText format.

    Returns
    -------
    list(str)
        The lines of the docstring in a list.

---
## get
```python
from docstring import get
```

Return the nth element of the stack, or ``self.sentinel`` if n is
greater than the stack size.

---
## next
```python
from docstring import next
```



---
## __init__
```python
from docstring import __init__
```



---
## __str__
```python
from docstring import __str__
```

Return the parsed docstring in reStructuredText format.

Returns
-------
unicode
    Unicode version of the docstring.

---
## lines
```python
from docstring import lines
```

Return the parsed lines of the docstring in reStructuredText format.

Returns
-------
list(str)
    The lines of the docstring in a list.

---
## _consume_indented_block
```python
from docstring import _consume_indented_block
```



---
## _consume_contiguous
```python
from docstring import _consume_contiguous
```



---
## _consume_empty
```python
from docstring import _consume_empty
```



---
## _consume_field
```python
from docstring import _consume_field
```



---
## _consume_fields
```python
from docstring import _consume_fields
```



---
## _consume_inline_attribute
```python
from docstring import _consume_inline_attribute
```



---
## _consume_returns_section
```python
from docstring import _consume_returns_section
```



---
## _consume_usage_section
```python
from docstring import _consume_usage_section
```



---
## _consume_section_header
```python
from docstring import _consume_section_header
```



---
## _consume_to_end
```python
from docstring import _consume_to_end
```



---
## _consume_to_next_section
```python
from docstring import _consume_to_next_section
```



---
## _dedent
```python
from docstring import _dedent
```



---
## _escape_args_and_kwargs
```python
from docstring import _escape_args_and_kwargs
```



---
## _fix_field_desc
```python
from docstring import _fix_field_desc
```



---
## _format_admonition
```python
from docstring import _format_admonition
```



---
## _format_block
```python
from docstring import _format_block
```



---
## _format_docutils_params
```python
from docstring import _format_docutils_params
```



---
## _format_field
```python
from docstring import _format_field
```



---
## _format_fields
```python
from docstring import _format_fields
```



---
## _get_current_indent
```python
from docstring import _get_current_indent
```



---
## _get_indent
```python
from docstring import _get_indent
```



---
## _get_initial_indent
```python
from docstring import _get_initial_indent
```



---
## _get_min_indent
```python
from docstring import _get_min_indent
```



---
## _indent
```python
from docstring import _indent
```



---
## _is_indented
```python
from docstring import _is_indented
```



---
## _is_list
```python
from docstring import _is_list
```



---
## _is_section_header
```python
from docstring import _is_section_header
```



---
## _is_section_break
```python
from docstring import _is_section_break
```



---
## _load_custom_sections
```python
from docstring import _load_custom_sections
```



---
## _parse
```python
from docstring import _parse
```



---
## _parse_admonition
```python
from docstring import _parse_admonition
```



---
## _parse_attribute_docstring
```python
from docstring import _parse_attribute_docstring
```



---
## _parse_attributes_section
```python
from docstring import _parse_attributes_section
```



---
## _parse_examples_section
```python
from docstring import _parse_examples_section
```



---
## _parse_custom_generic_section
```python
from docstring import _parse_custom_generic_section
```



---
## _parse_custom_params_style_section
```python
from docstring import _parse_custom_params_style_section
```



---
## _parse_custom_returns_style_section
```python
from docstring import _parse_custom_returns_style_section
```



---
## _parse_usage_section
```python
from docstring import _parse_usage_section
```



---
## _parse_generic_section
```python
from docstring import _parse_generic_section
```



---
## _parse_keyword_arguments_section
```python
from docstring import _parse_keyword_arguments_section
```



---
## _parse_methods_section
```python
from docstring import _parse_methods_section
```



---
## _parse_notes_section
```python
from docstring import _parse_notes_section
```



---
## _parse_other_parameters_section
```python
from docstring import _parse_other_parameters_section
```



---
## _parse_parameters_section
```python
from docstring import _parse_parameters_section
```



---
## _parse_raises_section
```python
from docstring import _parse_raises_section
```



---
## _parse_receives_section
```python
from docstring import _parse_receives_section
```



---
## _parse_references_section
```python
from docstring import _parse_references_section
```



---
## _parse_returns_section
```python
from docstring import _parse_returns_section
```



---
## _parse_see_also_section
```python
from docstring import _parse_see_also_section
```



---
## _parse_warns_section
```python
from docstring import _parse_warns_section
```



---
## _parse_yields_section
```python
from docstring import _parse_yields_section
```



---
## _partition_field_on_colon
```python
from docstring import _partition_field_on_colon
```



---
## _strip_empty
```python
from docstring import _strip_empty
```



---
## _lookup_annotation
```python
from docstring import _lookup_annotation
```



---
## takewhile_set
```python
from docstring import takewhile_set
```



---
## combine_set
```python
from docstring import combine_set
```



---
## postprocess
```python
from docstring import postprocess
```



---
## is_numeric
```python
from docstring import is_numeric
```



---
## convert_obj
```python
from docstring import convert_obj
```



---
## _get_location
```python
from docstring import _get_location
```



---
## _parse_numpydoc_see_also_section
```python
from docstring import _parse_numpydoc_see_also_section
```

Derived from the NumpyDoc implementation of _parse_see_also.

See Also
--------
func_name : Descriptive text
    continued text
another_func_name : Descriptive text
func_name1, func_name2, :meth:`func_name`, func_name3

---
## parse_item_name
```python
from docstring import parse_item_name
```

Match ':role:`name`' or 'name'

---
## push_item
```python
from docstring import push_item
```



---
## translate
```python
from docstring import translate
```



---
## __name__
```python
from generate import __name__
```

Generates reST source files for autosummary.

Usable as a library or script to generate automatic RST source files for
items referred to in autosummary:: directives.

Each generated RST file contains a single auto*:: directive which
extracts the docstring of the referred item.

Example Makefile rule::

   generate:
           sphinx-autogen -o source/generated source/*.rst

---
## DummyApplication
```python
from generate import DummyApplication
```

Dummy Application class for sphinx-autogen command.

---
## AutosummaryEntry
```python
from generate import AutosummaryEntry
```



---
## setup_documenters
```python
from generate import setup_documenters
```



---
## _underline
```python
from generate import _underline
```



---
## AutosummaryRenderer
```python
from generate import AutosummaryRenderer
```

A helper class for rendering.

---
## _split_full_qualified_name
```python
from generate import _split_full_qualified_name
```

Split full qualified name to a pair of modname and qualname.

A qualname is an abbreviation for "Qualified name" introduced at PEP-3155
(https://peps.python.org/pep-3155/).  It is a dotted path name
from the module top-level.

A "full" qualified name means a string containing both module name and
qualified name.

.. note:: This function actually imports the module to check its existence.
          Therefore you need to mock 3rd party modules if needed before
          calling this function.

---
## ModuleScanner
```python
from generate import ModuleScanner
```



---
## members_of
```python
from generate import members_of
```

Get the members of ``obj``, possibly ignoring the ``__all__`` module attribute

Follows the ``conf.autosummary_ignore_module_all`` setting.

---
## generate_autosummary_content
```python
from generate import generate_autosummary_content
```



---
## _skip_member
```python
from generate import _skip_member
```



---
## _get_class_members
```python
from generate import _get_class_members
```



---
## _get_module_members
```python
from generate import _get_module_members
```



---
## _get_all_members
```python
from generate import _get_all_members
```



---
## _get_members
```python
from generate import _get_members
```



---
## _get_module_attrs
```python
from generate import _get_module_attrs
```

Find module attributes with docstrings.

---
## _get_modules
```python
from generate import _get_modules
```



---
## generate_autosummary_docs
```python
from generate import generate_autosummary_docs
```

Generate autosummary documentation for the given sources.

:returns: list of generated files (both new and existing ones)

---
## find_autosummary_in_files
```python
from generate import find_autosummary_in_files
```

Find out what items are documented in source/*.rst.

See `find_autosummary_in_lines`.

---
## find_autosummary_in_docstring
```python
from generate import find_autosummary_in_docstring
```

Find out what items are documented in the given object's docstring.

See `find_autosummary_in_lines`.

---
## find_autosummary_in_lines
```python
from generate import find_autosummary_in_lines
```

Find out what items appear in autosummary:: directives in the
given lines.

Returns a list of (name, toctree, template) where *name* is a name
of an object and *toctree* the :toctree: path of the corresponding
autosummary directive (relative to the root of the file name), and
*template* the value of the :template: option. *toctree* and
*template* ``None`` if the directive does not have the
corresponding options set.

---
## get_parser
```python
from generate import get_parser
```



---
## main
```python
from generate import main
```



---
## __init__
```python
from generate import __init__
```



---
## emit_firstresult
```python
from generate import emit_firstresult
```



---
## render
```python
from generate import render
```

Render a template file.

---
## get_object_type
```python
from generate import get_object_type
```



---
## is_skipped
```python
from generate import is_skipped
```



---
## scan
```python
from generate import scan
```



---
## autosummary_toc
```python
from __init__ import autosummary_toc
```



---
## autosummary_toc_visit_html
```python
from __init__ import autosummary_toc_visit_html
```

Hide autosummary toctree list in HTML output.

---
## autosummary_noop
```python
from __init__ import autosummary_noop
```



---
## autosummary_table
```python
from __init__ import autosummary_table
```



---
## autosummary_table_visit_html
```python
from __init__ import autosummary_table_visit_html
```

Make the first column of the table non-breaking.

---
## FakeApplication
```python
from __init__ import FakeApplication
```



---
## FakeDirective
```python
from __init__ import FakeDirective
```



---
## get_documenter
```python
from __init__ import get_documenter
```

Get an autodoc.Documenter class suitable for documenting the given
object.

*obj* is the Python object to be documented, and *parent* is an
another Python object (e.g. a module or a class) to which *obj*
belongs to.

---
## Autosummary
```python
from __init__ import Autosummary
```

Pretty table containing short signatures and summaries of functions etc.

autosummary can also optionally generate a hidden toctree:: node.

---
## strip_arg_typehint
```python
from __init__ import strip_arg_typehint
```

Strip a type hint from argument definition.

---
## _cleanup_signature
```python
from __init__ import _cleanup_signature
```

Clean up signature using inspect.signautre() for mangle_signature()

---
## mangle_signature
```python
from __init__ import mangle_signature
```

Reformat a function signature to a more compact form.

---
## extract_summary
```python
from __init__ import extract_summary
```

Extract summary from docstring.

---
## limited_join
```python
from __init__ import limited_join
```

Join a number of strings into one, limiting the length to *max_chars*.

If the string overflows this limit, replace the last fitting item by
*overflow_marker*.

Returns: joined_string

---
## ImportExceptionGroup
```python
from __init__ import ImportExceptionGroup
```

Exceptions raised during importing the target objects.

It contains an error messages and a list of exceptions as its arguments.

---
## get_import_prefixes_from_env
```python
from __init__ import get_import_prefixes_from_env
```

Obtain current Python import prefixes (for `import_by_name`)
from ``document.env``

---
## import_by_name
```python
from __init__ import import_by_name
```



---
## _import_by_name
```python
from __init__ import _import_by_name
```

Import a Python object given its full name.

---
## import_ivar_by_name
```python
from __init__ import import_ivar_by_name
```

Import an instance variable that has the given *name*, under one of the
*prefixes*.  The first name that succeeds is used.

---
## AutoLink
```python
from __init__ import AutoLink
```

Smart linking role.

Expands to ':obj:`text`' if `text` is an object that can be imported;
otherwise expands to '*text*'.

---
## get_rst_suffix
```python
from __init__ import get_rst_suffix
```



---
## process_generate_options
```python
from __init__ import process_generate_options
```



---
## create_documenter
```python
from __init__ import create_documenter
```

Get an autodoc.Documenter class suitable for documenting the given
object.

Wraps get_documenter and is meant as a hook for extensions.

---
## get_items
```python
from __init__ import get_items
```

Try to import the given names, and return a list of
``[(name, signature, summary_string, real_name), ...]``.

---
## get_table
```python
from __init__ import get_table
```

Generate a proper list of table nodes for autosummary:: directive.

*items* is a list produced by :meth:`get_items`.

---
## get_supported_format
```python
from __init__ import get_supported_format
```



---
## append_row
```python
from __init__ import append_row
```



---
## __name__
```python
from _load import __name__
```

This module contains the code for loading intersphinx inventories.

---
## validate_intersphinx_mapping
```python
from _load import validate_intersphinx_mapping
```

Validate and normalise :confval:`intersphinx_mapping`.

Ensure that:

* Keys are non-empty strings.
* Values are two-element tuples or lists.
* The first element of each value pair (the target URI)
  is a non-empty string.
* The second element of each value pair (inventory locations)
  is a tuple of non-empty strings or None.

---
## load_mappings
```python
from _load import load_mappings
```

Load all intersphinx mappings into the environment.

The intersphinx mappings are expected to be normalized.

---
## _fetch_inventory_group
```python
from _load import _fetch_inventory_group
```



---
## fetch_inventory
```python
from _load import fetch_inventory
```

Fetch, parse and return an intersphinx inventory file.

---
## _fetch_inventory
```python
from _load import _fetch_inventory
```

Fetch, parse and return an intersphinx inventory file.

---
## _get_safe_url
```python
from _load import _get_safe_url
```

Gets version of *url* with basic auth passwords obscured. This function
returns results suitable for printing and logging.

E.g.: https://user:12345@example.com => https://user@example.com

:param url: a url
:type url: ``str``

:return: *url* with password removed
:rtype: ``str``

---
## _strip_basic_auth
```python
from _load import _strip_basic_auth
```

Returns *url* with basic auth credentials removed. Also returns the
basic auth username and password if they're present in *url*.

E.g.: https://user:pass@example.com => https://example.com

*url* need not include basic auth credentials.

:param url: url which may or may not contain basic auth credentials
:type url: ``str``

:return: *url* with any basic auth creds removed
:rtype: ``str``

---
## _read_from_url
```python
from _load import _read_from_url
```

Reads data from *url* with an HTTP *GET*.

This function supports fetching from resources which use basic HTTP auth as
laid out by RFC1738 § 3.1. See § 5 for grammar definitions for URLs.

.. seealso:

   https://www.ietf.org/rfc/rfc1738.txt

:param url: URL of an HTTP resource
:type url: ``str``

:return: data read from resource described by *url*
:rtype: ``file``-like object

---
## __name__
```python
from _resolve import __name__
```

This module provides logic for resolving references to intersphinx targets.

---
## _create_element_from_result
```python
from _resolve import _create_element_from_result
```



---
## _resolve_reference_in_domain_by_target
```python
from _resolve import _resolve_reference_in_domain_by_target
```



---
## _resolve_reference_in_domain
```python
from _resolve import _resolve_reference_in_domain
```



---
## _resolve_reference
```python
from _resolve import _resolve_reference
```



---
## inventory_exists
```python
from _resolve import inventory_exists
```



---
## resolve_reference_in_inventory
```python
from _resolve import resolve_reference_in_inventory
```

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried in the given inventory with the target as is.

Requires ``inventory_exists(env, inv_name)``.

---
## resolve_reference_any_inventory
```python
from _resolve import resolve_reference_any_inventory
```

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried with the target as is in any inventory.

---
## resolve_reference_detect_inventory
```python
from _resolve import resolve_reference_detect_inventory
```

Attempt to resolve a missing reference via intersphinx references.

Resolution is tried first with the target as is in any inventory.
If this does not succeed, then the target is split by the first ``:``,
to form ``inv_name:newtarget``. If ``inv_name`` is a named inventory, then resolution
is tried in that inventory with the new target.

---
## missing_reference
```python
from _resolve import missing_reference
```

Attempt to resolve a missing reference via intersphinx references.

---
## IntersphinxDispatcher
```python
from _resolve import IntersphinxDispatcher
```

Custom dispatcher for external role.

This enables :external:***:/:external+***: roles on parsing reST document.

---
## IntersphinxRole
```python
from _resolve import IntersphinxRole
```



---
## IntersphinxRoleResolver
```python
from _resolve import IntersphinxRoleResolver
```

pending_xref node resolver for intersphinx role.

This resolves pending_xref nodes generated by :intersphinx:***: role.

---
## install_dispatcher
```python
from _resolve import install_dispatcher
```

Enable IntersphinxDispatcher.

.. note:: The installed dispatcher will be uninstalled on disabling sphinx_domain
          automatically.

---
## role
```python
from _resolve import role
```



---
## __init__
```python
from _resolve import __init__
```



---
## run
```python
from _resolve import run
```



---
## get_inventory_and_name_suffix
```python
from _resolve import get_inventory_and_name_suffix
```

Extract an inventory name (if any) and ``domain+name`` suffix from a role *name*.
and the domain+name suffix.

The role name is expected to be of one of the following forms:

- ``external+inv:name`` -- explicit inventory and name, any domain.
- ``external+inv:domain:name`` -- explicit inventory, domain and name.
- ``external:name`` -- any inventory and domain, explicit name.
- ``external:domain:name`` -- any inventory, explicit domain and name.

---
## _get_domain_role
```python
from _resolve import _get_domain_role
```

Convert the *name* string into a domain and a role name.

- If *name* contains no ``:``, return ``(None, name)``.
- If *name* contains a single ``:``, the domain/role is split on this.
- If *name* contains multiple ``:``, return ``(None, None)``.

---
## _emit_warning
```python
from _resolve import _emit_warning
```



---
## _concat_strings
```python
from _resolve import _concat_strings
```



---
## get_role_name
```python
from _resolve import get_role_name
```



---
## is_existent_role
```python
from _resolve import is_existent_role
```



---
## invoke_role
```python
from _resolve import invoke_role
```

Invoke the role described by a ``(domain, role name)`` pair.

---
## __name__
```python
from _cli import __name__
```



---
## inspect_main
```python
from _cli import inspect_main
```

Debug functionality to print out an inventory

---
## MockConfig
```python
from _cli import MockConfig
```



---
## __name__
```python
from _shared import __name__
```

This module contains code shared between intersphinx modules.

---
## _IntersphinxProject
```python
from _shared import _IntersphinxProject
```



---
## InventoryAdapter
```python
from _shared import InventoryAdapter
```

Inventory adapter for environment

---
## __init__
```python
from _shared import __init__
```



---
## __repr__
```python
from _shared import __repr__
```



---
## __eq__
```python
from _shared import __eq__
```



---
## __hash__
```python
from _shared import __hash__
```



---
## __setattr__
```python
from _shared import __setattr__
```



---
## __delattr__
```python
from _shared import __delattr__
```



---
## cache
```python
from _shared import cache
```

Intersphinx cache.

- Key is the URI of the remote inventory.
- Element one is the key given in the Sphinx :confval:`intersphinx_mapping`.
- Element two is a time value for cache invalidation, an integer.
- Element three is the loaded remote inventory of type :class:`!Inventory`.

---
## main_inventory
```python
from _shared import main_inventory
```



---
## named_inventory
```python
from _shared import named_inventory
```



---
## clear
```python
from _shared import clear
```



---
## HighlightSetting
```python
from code import HighlightSetting
```



---
## HighlightLanguageTransform
```python
from code import HighlightLanguageTransform
```

Apply highlight_language to all literal_block nodes.

This refers both :confval:`highlight_language` setting and
:rst:dir:`highlight` directive.  After processing, this transform
removes ``highlightlang`` node from doctree.

---
## HighlightLanguageVisitor
```python
from code import HighlightLanguageVisitor
```



---
## TrimDoctestFlagsTransform
```python
from code import TrimDoctestFlagsTransform
```

Trim doctest flags like ``# doctest: +FLAG`` from python code-blocks.

see :confval:`trim_doctest_flags` for more information.

---
## apply
```python
from code import apply
```



---
## unknown_visit
```python
from code import unknown_visit
```



---
## unknown_departure
```python
from code import unknown_departure
```



---
## visit_document
```python
from code import visit_document
```



---
## depart_document
```python
from code import depart_document
```



---
## visit_start_of_file
```python
from code import visit_start_of_file
```



---
## depart_start_of_file
```python
from code import depart_start_of_file
```



---
## visit_highlightlang
```python
from code import visit_highlightlang
```



---
## visit_literal_block
```python
from code import visit_literal_block
```



---
## strip_doctest_flags
```python
from code import strip_doctest_flags
```



---
## is_pyconsole
```python
from code import is_pyconsole
```



---
## SphinxPostTransform
```python
from __init__ import SphinxPostTransform
```

A base class of post-transforms.

Post transforms are invoked to modify the document to restructure it for outputting.
They resolve references, convert images, do special transformation for each output
formats and so on.  This class helps to implement these post transforms.

---
## ReferencesResolver
```python
from __init__ import ReferencesResolver
```

Resolves cross-references on doctrees.

---
## OnlyNodeTransform
```python
from __init__ import OnlyNodeTransform
```



---
## SigElementFallbackTransform
```python
from __init__ import SigElementFallbackTransform
```

Fallback various desc_* nodes to inline if translator does not support them.

---
## PropagateDescDomain
```python
from __init__ import PropagateDescDomain
```

Add the domain name of the parent node as a class in each desc_signature node.

---
## is_supported
```python
from __init__ import is_supported
```

Check this transform working for current builder.

---
## resolve_anyref
```python
from __init__ import resolve_anyref
```

Resolve reference generated by the "any" role.

---
## find_pending_xref_condition
```python
from __init__ import find_pending_xref_condition
```



---
## fallback
```python
from __init__ import fallback
```

Translate nodes of type *node_type* to docutils inline nodes.

The original node type name is stored as a string in a private
``_sig_node_type`` attribute if the latter did not exist.

---
## has_visitor
```python
from __init__ import has_visitor
```



---
## stringify
```python
from __init__ import stringify
```



---
## matches_ignore
```python
from __init__ import matches_ignore
```



---
## BaseImageConverter
```python
from images import BaseImageConverter
```



---
## ImageDownloader
```python
from images import ImageDownloader
```



---
## DataURIExtractor
```python
from images import DataURIExtractor
```



---
## get_filename_for
```python
from images import get_filename_for
```



---
## ImageConverter
```python
from images import ImageConverter
```

A base class for image converters.

An image converter is kind of Docutils transform module.  It is used to
convert image files which are not supported by a builder to the
appropriate format for that builder.

For example, :py:class:`LaTeX builder <.LaTeXBuilder>` supports PDF,
PNG and JPEG as image formats.  However it does not support SVG images.
For such case, using image converters allows to embed these
unsupported images into the document.  One of the image converters;
:ref:`sphinx.ext.imgconverter <sphinx.ext.imgconverter>` can convert
a SVG image to PNG format using Imagemagick internally.

There are three steps to make your custom image converter:

1. Make a subclass of ``ImageConverter`` class
2. Override ``conversion_rules``, ``is_available()`` and ``convert()``
3. Register your image converter to Sphinx using
   :py:meth:`.Sphinx.add_post_transform`

---
## setup
```python
from images import setup
```



---
## apply
```python
from images import apply
```



---
## match
```python
from images import match
```



---
## handle
```python
from images import handle
```



---
## imagedir
```python
from images import imagedir
```



---
## get_conversion_rule
```python
from images import get_conversion_rule
```



---
## is_available
```python
from images import is_available
```

Return the image converter is available or not.

---
## guess_mimetypes
```python
from images import guess_mimetypes
```



---
## convert
```python
from images import convert
```

Convert an image file to the expected format.

*_from* is a path of the source image file, and *_to* is a path
of the destination file.

---
## terminal_safe
```python
from errors import terminal_safe
```

Safely encode a string for printing to the terminal.

---
## strip_colors
```python
from errors import strip_colors
```



---
## error_info
```python
from errors import error_info
```



---
## save_traceback
```python
from errors import save_traceback
```

Save the given exception's traceback in a temporary file.

---
## handle_exception
```python
from errors import handle_exception
```



---
## print_err
```python
from errors import print_err
```



---
## print_red
```python
from errors import print_red
```



---
## __name__
```python
from colour import __name__
```

Format coloured console output.

---
## terminal_supports_colour
```python
from colour import terminal_supports_colour
```

Return True if coloured terminal output is supported.

---
## disable_colour
```python
from colour import disable_colour
```



---
## enable_colour
```python
from colour import enable_colour
```



---
## colourise
```python
from colour import colourise
```



---
## _create_colour_func
```python
from colour import _create_colour_func
```



---
## inner
```python
from colour import inner
```



---
## _create_input_mode_colour_func
```python
from colour import _create_input_mode_colour_func
```



---
## __name__
```python
from toctree import __name__
```

Toctree adapter for sphinx.environment.

---
## TocTreeCollector
```python
from toctree import TocTreeCollector
```



---
## _make_anchor_name
```python
from toctree import _make_anchor_name
```



---
## setup
```python
from toctree import setup
```



---
## clear_doc
```python
from toctree import clear_doc
```



---
## merge_other
```python
from toctree import merge_other
```



---
## process_doc
```python
from toctree import process_doc
```

Build a TOC from the doctree and store it in the inventory.

---
## get_updated_docs
```python
from toctree import get_updated_docs
```



---
## assign_section_numbers
```python
from toctree import assign_section_numbers
```

Assign a section number to each heading under a numbered toctree.

---
## assign_figure_numbers
```python
from toctree import assign_figure_numbers
```

Assign a figure number to each figure under a numbered toctree.

---
## build_toc
```python
from toctree import build_toc
```



---
## _walk_toc
```python
from toctree import _walk_toc
```



---
## _walk_toctree
```python
from toctree import _walk_toctree
```



---
## get_figtype
```python
from toctree import get_figtype
```



---
## get_section_number
```python
from toctree import get_section_number
```



---
## get_next_fignumber
```python
from toctree import get_next_fignumber
```



---
## register_fignumber
```python
from toctree import register_fignumber
```



---
## _walk_doctree
```python
from toctree import _walk_doctree
```



---
## _walk_doc
```python
from toctree import _walk_doc
```



---
## MetadataCollector
```python
from metadata import MetadataCollector
```

metadata collector for sphinx.environment.

---
## setup
```python
from metadata import setup
```



---
## clear_doc
```python
from metadata import clear_doc
```



---
## merge_other
```python
from metadata import merge_other
```



---
## process_doc
```python
from metadata import process_doc
```

Process the docinfo part of the doctree as metadata.

Keep processing minimal -- just return what docutils says.

---
## __name__
```python
from asset import __name__
```

Assets adapter for sphinx.environment.

---
## ImageCollector
```python
from asset import ImageCollector
```

Image files collector for sphinx.environment.

---
## DownloadFileCollector
```python
from asset import DownloadFileCollector
```

Download files collector for sphinx.environment.

---
## setup
```python
from asset import setup
```



---
## clear_doc
```python
from asset import clear_doc
```



---
## merge_other
```python
from asset import merge_other
```



---
## process_doc
```python
from asset import process_doc
```

Process downloadable file paths.

---
## collect_candidates
```python
from asset import collect_candidates
```



---
## EnvironmentCollector
```python
from __init__ import EnvironmentCollector
```

An EnvironmentCollector is a specific data collector from each document.

It gathers data and stores :py:class:`BuildEnvironment
<sphinx.environment.BuildEnvironment>` as a database.
Examples of specific data would be images, download files, section titles, metadatas, index
entries and toctrees, etc.

.. note::

    This class essentially wraps a sub-set of :ref:`Sphinx event callbacks <events>`.

---
## enable
```python
from __init__ import enable
```



---
## disable
```python
from __init__ import disable
```



---
## get_updated_docs
```python
from __init__ import get_updated_docs
```

Return a list of docnames to re-read.

This method is called after reading the whole of documents.

.. seealso:: :event:`env-get-updated`

---
## DependenciesCollector
```python
from dependencies import DependenciesCollector
```

dependencies collector for sphinx.environment.

---
## setup
```python
from dependencies import setup
```



---
## clear_doc
```python
from dependencies import clear_doc
```



---
## merge_other
```python
from dependencies import merge_other
```



---
## process_doc
```python
from dependencies import process_doc
```

Process docutils-generated dependency info.

---
## __name__
```python
from title import __name__
```

The title collector components for sphinx.environment.

---
## TitleCollector
```python
from title import TitleCollector
```

title collector for sphinx.environment.

---
## setup
```python
from title import setup
```



---
## clear_doc
```python
from title import clear_doc
```



---
## merge_other
```python
from title import merge_other
```



---
## process_doc
```python
from title import process_doc
```

Add a title node to the document (just copy the first section title),
and store that title in the environment.

---
## note_toctree
```python
from toctree import note_toctree
```

Note a TOC tree directive in a document and gather information about
file relations from it.

---
## document_toc
```python
from toctree import document_toc
```

Get the (local) table of contents for a document.

Note that this is only the sections within the document.
For a ToC tree that shows the document's place in the
ToC structure, use `get_toctree_for`.

---
## global_toctree_for_doc
```python
from toctree import global_toctree_for_doc
```

Get the global ToC tree at a given document.

This gives the global ToC, with all ancestors and their siblings.

---
## _resolve_toctree
```python
from toctree import _resolve_toctree
```

Resolve a *toctree* node into individual bullet lists with titles
as items, returning None (if no containing titles are found) or
a new node.

If *prune* is True, the tree is pruned to *maxdepth*, or if that is 0,
to the value of the *maxdepth* option on the *toctree* node.
If *titles_only* is True, only toplevel document titles will be in the
resulting tree.
If *collapse* is True, all branches not containing docname will
be collapsed.

---
## _entries_from_toctree
```python
from toctree import _entries_from_toctree
```

Return TOC entries for a toctree node.

---
## _toctree_entry
```python
from toctree import _toctree_entry
```



---
## _toctree_url_entry
```python
from toctree import _toctree_url_entry
```



---
## _toctree_self_entry
```python
from toctree import _toctree_self_entry
```



---
## _toctree_generated_entry
```python
from toctree import _toctree_generated_entry
```



---
## _toctree_standard_entry
```python
from toctree import _toctree_standard_entry
```



---
## _toctree_add_classes
```python
from toctree import _toctree_add_classes
```

Add 'toctree-l%d' and 'current' classes to the toctree.

---
## _toctree_copy
```python
from toctree import _toctree_copy
```

Utility: Cut and deep-copy a TOC at a specified depth.

---
## _get_toctree_ancestors
```python
from toctree import _get_toctree_ancestors
```



---
## TocTree
```python
from toctree import TocTree
```



---
## __init__
```python
from toctree import __init__
```



---
## note
```python
from toctree import note
```



---
## resolve
```python
from toctree import resolve
```



---
## get_toctree_ancestors
```python
from toctree import get_toctree_ancestors
```



---
## get_toc_for
```python
from toctree import get_toc_for
```



---
## get_toctree_for
```python
from toctree import get_toctree_for
```



---
## ImageAdapter
```python
from asset import ImageAdapter
```



---
## __init__
```python
from asset import __init__
```



---
## get_original_image_uri
```python
from asset import get_original_image_uri
```

Get the original image URI.

---
## __name__
```python
from indexentries import __name__
```

Index entries adapters for sphinx.environment.

---
## IndexEntries
```python
from indexentries import IndexEntries
```



---
## _add_entry
```python
from indexentries import _add_entry
```



---
## _key_func_0
```python
from indexentries import _key_func_0
```

Sort the index entries for same keyword.

---
## _key_func_1
```python
from indexentries import _key_func_1
```

Sort the index entries

---
## _key_func_2
```python
from indexentries import _key_func_2
```

Sort the sub-index entries

---
## _group_by_func
```python
from indexentries import _group_by_func
```

Group the entries by letter or category key.

---
## __init__
```python
from indexentries import __init__
```



---
## create_index
```python
from indexentries import create_index
```

Create the real index from the collected index entries.

---
## __name__
```python
from sample_vault_kms_client import __name__
```

A sample KmsClient implementation.

---
## VaultClient
```python
from sample_vault_kms_client import VaultClient
```

An example of a KmsClient implementation with master keys
managed by Hashicorp Vault KMS.
See Vault documentation: https://www.vaultproject.io/api/secret/transit
Not for production use!

---
## parquet_write_read_with_vault
```python
from sample_vault_kms_client import parquet_write_read_with_vault
```

An example for writing an encrypted parquet and reading an
encrypted parquet using master keys managed by Hashicorp Vault KMS.
Note that for this implementation requests dependency is needed
and environment properties VAULT_URL and VAULT_TOKEN should be set.
Please enable the transit engine.

---
## main
```python
from sample_vault_kms_client import main
```



---
## __init__
```python
from sample_vault_kms_client import __init__
```

Create a VaultClient instance.

Parameters
----------
kms_connection_config : KmsConnectionConfig
   configuration parameters to connect to vault,
   e.g. URL and access token

---
## wrap_key
```python
from sample_vault_kms_client import wrap_key
```

Call Vault to wrap key key_bytes with key
identified by master_key_identifier.

---
## unwrap_key
```python
from sample_vault_kms_client import unwrap_key
```

Call Vault to unwrap wrapped_key with key
identified by master_key_identifier

---
## kms_factory
```python
from sample_vault_kms_client import kms_factory
```



---
## __name__
```python
from write_dataset_encrypted import __name__
```



---
## kms_factory
```python
from write_dataset_encrypted import kms_factory
```



---
## FlightServer
```python
from server import FlightServer
```



---
## main
```python
from server import main
```



---
## descriptor_to_key
```python
from server import descriptor_to_key
```



---
## _make_flight_info
```python
from server import _make_flight_info
```



---
## list_flights
```python
from server import list_flights
```



---
## get_flight_info
```python
from server import get_flight_info
```



---
## do_put
```python
from server import do_put
```



---
## do_get
```python
from server import do_get
```



---
## list_actions
```python
from server import list_actions
```



---
## do_action
```python
from server import do_action
```



---
## _shutdown
```python
from server import _shutdown
```

Shut down after a delay.

---
## list_flights
```python
from client import list_flights
```



---
## do_action
```python
from client import do_action
```



---
## push_data
```python
from client import push_data
```



---
## get_flight
```python
from client import get_flight
```



---
## _add_common_arguments
```python
from client import _add_common_arguments
```



---
## __name__
```python
from middleware import __name__
```

Example of invisibly propagating a request ID with middleware.

---
## TraceContext
```python
from middleware import TraceContext
```



---
## TracingServerMiddleware
```python
from middleware import TracingServerMiddleware
```



---
## TracingServerMiddlewareFactory
```python
from middleware import TracingServerMiddlewareFactory
```



---
## TracingClientMiddleware
```python
from middleware import TracingClientMiddleware
```



---
## TracingClientMiddlewareFactory
```python
from middleware import TracingClientMiddlewareFactory
```



---
## FlightServer
```python
from middleware import FlightServer
```



---
## main
```python
from middleware import main
```



---
## current_trace_id
```python
from middleware import current_trace_id
```



---
## set_trace_id
```python
from middleware import set_trace_id
```



---
## __init__
```python
from middleware import __init__
```



---
## sending_headers
```python
from middleware import sending_headers
```



---
## start_call
```python
from middleware import start_call
```



---
## received_headers
```python
from middleware import received_headers
```



---
## list_actions
```python
from middleware import list_actions
```



---
## do_action
```python
from middleware import do_action
```



---
## __name__
```python
from open_id_connect_url import __name__
```



---
## OpenIdConnect
```python
from open_id_connect_url import OpenIdConnect
```

OpenID Connect authentication class. An instance of it would be used as a
dependency.

---
## __init__
```python
from open_id_connect_url import __init__
```



---
## __name__
```python
from oauth2 import __name__
```



---
## OAuth2PasswordRequestForm
```python
from oauth2 import OAuth2PasswordRequestForm
```

This is a dependency class to collect the `username` and `password` as form data
for an OAuth2 password flow.

The OAuth2 specification dictates that for a password flow the data should be
collected using form data (instead of JSON) and that it should have the specific
fields `username` and `password`.

All the initialization parameters are extracted from the request.

Read more about it in the
[FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).

## Example

```python
from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.security import OAuth2PasswordRequestForm

app = FastAPI()


@app.post("/login")
def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]):
    data = {}
    data["scopes"] = []
    for scope in form_data.scopes:
        data["scopes"].append(scope)
    if form_data.client_id:
        data["client_id"] = form_data.client_id
    if form_data.client_secret:
        data["client_secret"] = form_data.client_secret
    return data
```

Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
You could have custom internal logic to separate it by colon caracters (`:`) or
similar, and get the two parts `items` and `read`. Many applications do that to
group and organize permissions, you could do it as well in your application, just
know that that it is application specific, it's not part of the specification.

---
## OAuth2PasswordRequestFormStrict
```python
from oauth2 import OAuth2PasswordRequestFormStrict
```

This is a dependency class to collect the `username` and `password` as form data
for an OAuth2 password flow.

The OAuth2 specification dictates that for a password flow the data should be
collected using form data (instead of JSON) and that it should have the specific
fields `username` and `password`.

All the initialization parameters are extracted from the request.

The only difference between `OAuth2PasswordRequestFormStrict` and
`OAuth2PasswordRequestForm` is that `OAuth2PasswordRequestFormStrict` requires the
client to send the form field `grant_type` with the value `"password"`, which
is required in the OAuth2 specification (it seems that for no particular reason),
while for `OAuth2PasswordRequestForm` `grant_type` is optional.

Read more about it in the
[FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).

## Example

```python
from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.security import OAuth2PasswordRequestForm

app = FastAPI()


@app.post("/login")
def login(form_data: Annotated[OAuth2PasswordRequestFormStrict, Depends()]):
    data = {}
    data["scopes"] = []
    for scope in form_data.scopes:
        data["scopes"].append(scope)
    if form_data.client_id:
        data["client_id"] = form_data.client_id
    if form_data.client_secret:
        data["client_secret"] = form_data.client_secret
    return data
```

Note that for OAuth2 the scope `items:read` is a single scope in an opaque string.
You could have custom internal logic to separate it by colon caracters (`:`) or
similar, and get the two parts `items` and `read`. Many applications do that to
group and organize permissions, you could do it as well in your application, just
know that that it is application specific, it's not part of the specification.


grant_type: the OAuth2 spec says it is required and MUST be the fixed string "password".
    This dependency is strict about it. If you want to be permissive, use instead the
    OAuth2PasswordRequestForm dependency class.
username: username string. The OAuth2 spec requires the exact field name "username".
password: password string. The OAuth2 spec requires the exact field name "password".
scope: Optional string. Several scopes (each one a string) separated by spaces. E.g.
    "items:read items:write users:read profile openid"
client_id: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
    using HTTP Basic auth, as: client_id:client_secret
client_secret: optional string. OAuth2 recommends sending the client_id and client_secret (if any)
    using HTTP Basic auth, as: client_id:client_secret

---
## OAuth2
```python
from oauth2 import OAuth2
```

This is the base class for OAuth2 authentication, an instance of it would be used
as a dependency. All other OAuth2 classes inherit from it and customize it for
each OAuth2 flow.

You normally would not create a new class inheriting from it but use one of the
existing subclasses, and maybe compose them if you want to support multiple flows.

Read more about it in the
[FastAPI docs for Security](https://fastapi.tiangolo.com/tutorial/security/).

---
## OAuth2PasswordBearer
```python
from oauth2 import OAuth2PasswordBearer
```

OAuth2 flow for authentication using a bearer token obtained with a password.
An instance of it would be used as a dependency.

Read more about it in the
[FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).

---
## OAuth2AuthorizationCodeBearer
```python
from oauth2 import OAuth2AuthorizationCodeBearer
```

OAuth2 flow for authentication using a bearer token obtained with an OAuth2 code
flow. An instance of it would be used as a dependency.

---
## SecurityScopes
```python
from oauth2 import SecurityScopes
```

This is a special class that you can define in a parameter in a dependency to
obtain the OAuth2 scopes required by all the dependencies in the same chain.

This way, multiple dependencies can have different scopes, even when used in the
same *path operation*. And with this, you can access all the scopes required in
all those dependencies in a single place.

Read more about it in the
[FastAPI docs for OAuth2 scopes](https://fastapi.tiangolo.com/advanced/security/oauth2-scopes/).

---
## __init__
```python
from oauth2 import __init__
```



---
## __name__
```python
from api_key import __name__
```



---
## APIKeyBase
```python
from api_key import APIKeyBase
```



---
## APIKeyQuery
```python
from api_key import APIKeyQuery
```

API key authentication using a query parameter.

This defines the name of the query parameter that should be provided in the request
with the API key and integrates that into the OpenAPI documentation. It extracts
the key value sent in the query parameter automatically and provides it as the
dependency result. But it doesn't define how to send that API key to the client.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be a string containing the key value.

## Example

```python
from fastapi import Depends, FastAPI
from fastapi.security import APIKeyQuery

app = FastAPI()

query_scheme = APIKeyQuery(name="api_key")


@app.get("/items/")
async def read_items(api_key: str = Depends(query_scheme)):
    return {"api_key": api_key}
```

---
## APIKeyHeader
```python
from api_key import APIKeyHeader
```

API key authentication using a header.

This defines the name of the header that should be provided in the request with
the API key and integrates that into the OpenAPI documentation. It extracts
the key value sent in the header automatically and provides it as the dependency
result. But it doesn't define how to send that key to the client.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be a string containing the key value.

## Example

```python
from fastapi import Depends, FastAPI
from fastapi.security import APIKeyHeader

app = FastAPI()

header_scheme = APIKeyHeader(name="x-key")


@app.get("/items/")
async def read_items(key: str = Depends(header_scheme)):
    return {"key": key}
```

---
## APIKeyCookie
```python
from api_key import APIKeyCookie
```

API key authentication using a cookie.

This defines the name of the cookie that should be provided in the request with
the API key and integrates that into the OpenAPI documentation. It extracts
the key value sent in the cookie automatically and provides it as the dependency
result. But it doesn't define how to set that cookie.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be a string containing the key value.

## Example

```python
from fastapi import Depends, FastAPI
from fastapi.security import APIKeyCookie

app = FastAPI()

cookie_scheme = APIKeyCookie(name="session")


@app.get("/items/")
async def read_items(session: str = Depends(cookie_scheme)):
    return {"session": session}
```

---
## __init__
```python
from api_key import __init__
```



---
## get_authorization_scheme_param
```python
from utils import get_authorization_scheme_param
```



---
## HTTPBasicCredentials
```python
from http import HTTPBasicCredentials
```

The HTTP Basic credentials given as the result of using `HTTPBasic` in a
dependency.

Read more about it in the
[FastAPI docs for HTTP Basic Auth](https://fastapi.tiangolo.com/advanced/security/http-basic-auth/).

---
## HTTPAuthorizationCredentials
```python
from http import HTTPAuthorizationCredentials
```

The HTTP authorization credentials in the result of using `HTTPBearer` or
`HTTPDigest` in a dependency.

The HTTP authorization header value is split by the first space.

The first part is the `scheme`, the second part is the `credentials`.

For example, in an HTTP Bearer token scheme, the client will send a header
like:

```
Authorization: Bearer deadbeef12346
```

In this case:

* `scheme` will have the value `"Bearer"`
* `credentials` will have the value `"deadbeef12346"`

---
## HTTPBase
```python
from http import HTTPBase
```



---
## HTTPBasic
```python
from http import HTTPBasic
```

HTTP Basic authentication.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be an `HTTPBasicCredentials` object containing the
`username` and the `password`.

Read more about it in the
[FastAPI docs for HTTP Basic Auth](https://fastapi.tiangolo.com/advanced/security/http-basic-auth/).

## Example

```python
from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.security import HTTPBasic, HTTPBasicCredentials

app = FastAPI()

security = HTTPBasic()


@app.get("/users/me")
def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
    return {"username": credentials.username, "password": credentials.password}
```

---
## HTTPBearer
```python
from http import HTTPBearer
```

HTTP Bearer token authentication.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be an `HTTPAuthorizationCredentials` object containing
the `scheme` and the `credentials`.

## Example

```python
from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer

app = FastAPI()

security = HTTPBearer()


@app.get("/users/me")
def read_current_user(
    credentials: Annotated[HTTPAuthorizationCredentials, Depends(security)]
):
    return {"scheme": credentials.scheme, "credentials": credentials.credentials}
```

---
## HTTPDigest
```python
from http import HTTPDigest
```

HTTP Digest authentication.

## Usage

Create an instance object and use that object as the dependency in `Depends()`.

The dependency result will be an `HTTPAuthorizationCredentials` object containing
the `scheme` and the `credentials`.

## Example

```python
from typing import Annotated

from fastapi import Depends, FastAPI
from fastapi.security import HTTPAuthorizationCredentials, HTTPDigest

app = FastAPI()

security = HTTPDigest()


@app.get("/users/me")
def read_current_user(
    credentials: Annotated[HTTPAuthorizationCredentials, Depends(security)]
):
    return {"scheme": credentials.scheme, "credentials": credentials.credentials}
```

---
## SecurityBase
```python
from base import SecurityBase
```



---
## SecurityRequirement
```python
from models import SecurityRequirement
```



---
## Dependant
```python
from models import Dependant
```



---
## __post_init__
```python
from models import __post_init__
```



---
## ensure_multipart_is_installed
```python
from utils import ensure_multipart_is_installed
```



---
## get_param_sub_dependant
```python
from utils import get_param_sub_dependant
```



---
## get_parameterless_sub_dependant
```python
from utils import get_parameterless_sub_dependant
```



---
## get_sub_dependant
```python
from utils import get_sub_dependant
```



---
## get_flat_dependant
```python
from utils import get_flat_dependant
```



---
## _get_flat_fields_from_params
```python
from utils import _get_flat_fields_from_params
```



---
## get_flat_params
```python
from utils import get_flat_params
```



---
## get_typed_signature
```python
from utils import get_typed_signature
```



---
## get_typed_annotation
```python
from utils import get_typed_annotation
```



---
## get_typed_return_annotation
```python
from utils import get_typed_return_annotation
```



---
## get_dependant
```python
from utils import get_dependant
```



---
## add_non_field_param_to_dependency
```python
from utils import add_non_field_param_to_dependency
```



---
## ParamDetails
```python
from utils import ParamDetails
```



---
## analyze_param
```python
from utils import analyze_param
```



---
## add_param_to_fields
```python
from utils import add_param_to_fields
```



---
## is_coroutine_callable
```python
from utils import is_coroutine_callable
```



---
## is_async_gen_callable
```python
from utils import is_async_gen_callable
```



---
## is_gen_callable
```python
from utils import is_gen_callable
```



---
## SolvedDependency
```python
from utils import SolvedDependency
```



---
## _validate_value_with_model_field
```python
from utils import _validate_value_with_model_field
```



---
## _get_multidict_value
```python
from utils import _get_multidict_value
```



---
## request_params_to_args
```python
from utils import request_params_to_args
```



---
## _should_embed_body_fields
```python
from utils import _should_embed_body_fields
```



---
## get_body_field
```python
from utils import get_body_field
```

Get a ModelField representing the request body for a path operation, combining
all body parameters into a single field if necessary.

Used to check if it's form data (with `isinstance(body_field, params.Form)`)
or JSON and to generate the JSON Schema for a request body.

This is **not** used to validate/parse the request body, that's done with each
individual body parameter.

---
## BaseModelWithConfig
```python
from models import BaseModelWithConfig
```



---
## Contact
```python
from models import Contact
```



---
## License
```python
from models import License
```



---
## Info
```python
from models import Info
```



---
## ServerVariable
```python
from models import ServerVariable
```



---
## Server
```python
from models import Server
```



---
## Reference
```python
from models import Reference
```



---
## Discriminator
```python
from models import Discriminator
```



---
## XML
```python
from models import XML
```



---
## ExternalDocumentation
```python
from models import ExternalDocumentation
```



---
## Schema
```python
from models import Schema
```



---
## Example
```python
from models import Example
```



---
## ParameterInType
```python
from models import ParameterInType
```



---
## Encoding
```python
from models import Encoding
```



---
## MediaType
```python
from models import MediaType
```



---
## ParameterBase
```python
from models import ParameterBase
```



---
## Parameter
```python
from models import Parameter
```



---
## Header
```python
from models import Header
```



---
## RequestBody
```python
from models import RequestBody
```



---
## Link
```python
from models import Link
```



---
## Operation
```python
from models import Operation
```



---
## PathItem
```python
from models import PathItem
```



---
## SecuritySchemeType
```python
from models import SecuritySchemeType
```



---
## SecurityBase
```python
from models import SecurityBase
```



---
## APIKeyIn
```python
from models import APIKeyIn
```



---
## APIKey
```python
from models import APIKey
```



---
## HTTPBase
```python
from models import HTTPBase
```



---
## HTTPBearer
```python
from models import HTTPBearer
```



---
## OAuthFlow
```python
from models import OAuthFlow
```



---
## OAuthFlowImplicit
```python
from models import OAuthFlowImplicit
```



---
## OAuthFlowPassword
```python
from models import OAuthFlowPassword
```



---
## OAuthFlowClientCredentials
```python
from models import OAuthFlowClientCredentials
```



---
## OAuthFlowAuthorizationCode
```python
from models import OAuthFlowAuthorizationCode
```



---
## OAuthFlows
```python
from models import OAuthFlows
```



---
## OAuth2
```python
from models import OAuth2
```



---
## OpenIdConnect
```python
from models import OpenIdConnect
```



---
## Components
```python
from models import Components
```



---
## Tag
```python
from models import Tag
```



---
## OpenAPI
```python
from models import OpenAPI
```



---
## EmailStr
```python
from models import EmailStr
```



---
## Config
```python
from models import Config
```



---
## __get_validators__
```python
from models import __get_validators__
```



---
## validate
```python
from models import validate
```



---
## _validate
```python
from models import _validate
```



---
## __get_pydantic_json_schema__
```python
from models import __get_pydantic_json_schema__
```



---
## __get_pydantic_core_schema__
```python
from models import __get_pydantic_core_schema__
```



---
## __name__
```python
from docs import __name__
```



---
## get_swagger_ui_html
```python
from docs import get_swagger_ui_html
```

Generate and return the HTML  that loads Swagger UI for the interactive
API docs (normally served at `/docs`).

You would only call this function yourself if you needed to override some parts,
for example the URLs to use to load Swagger UI's JavaScript and CSS.

Read more about it in the
[FastAPI docs for Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-swagger-ui/)
and the [FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).

---
## get_redoc_html
```python
from docs import get_redoc_html
```

Generate and return the HTML response that loads ReDoc for the alternative
API docs (normally served at `/redoc`).

You would only call this function yourself if you needed to override some parts,
for example the URLs to use to load ReDoc's JavaScript and CSS.

Read more about it in the
[FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).

---
## get_swagger_ui_oauth2_redirect_html
```python
from docs import get_swagger_ui_oauth2_redirect_html
```

Generate the HTML response with the OAuth2 redirection for Swagger UI.

You normally don't need to use or change this.

---
## get_openapi_security_definitions
```python
from utils import get_openapi_security_definitions
```



---
## _get_openapi_operation_parameters
```python
from utils import _get_openapi_operation_parameters
```



---
## get_openapi_operation_request_body
```python
from utils import get_openapi_operation_request_body
```



---
## generate_operation_id
```python
from utils import generate_operation_id
```



---
## generate_operation_summary
```python
from utils import generate_operation_summary
```



---
## get_openapi_operation_metadata
```python
from utils import get_openapi_operation_metadata
```



---
## get_openapi_path
```python
from utils import get_openapi_path
```



---
## get_fields_from_routes
```python
from utils import get_fields_from_routes
```



---
## get_openapi
```python
from utils import get_openapi
```



---
## __name__
```python
from _tripcolor import __name__
```



---
## tripcolor
```python
from _tripcolor import tripcolor
```

Create a pseudocolor plot of an unstructured triangular grid.

Call signatures::

  tripcolor(triangulation, c, *, ...)
  tripcolor(x, y, c, *, [triangles=triangles], [mask=mask], ...)

The triangular grid can be specified either by passing a `.Triangulation`
object as the first parameter, or by passing the points *x*, *y* and
optionally the *triangles* and a *mask*. See `.Triangulation` for an
explanation of these parameters.

It is possible to pass the triangles positionally, i.e.
``tripcolor(x, y, triangles, c, ...)``. However, this is discouraged.
For more clarity, pass *triangles* via keyword argument.

If neither of *triangulation* or *triangles* are given, the triangulation
is calculated on the fly. In this case, it does not make sense to provide
colors at the triangle faces via *c* or *facecolors* because there are
multiple possible triangulations for a group of points and you don't know
which triangles will be constructed.

Parameters
----------
triangulation : `.Triangulation`
    An already created triangular grid.
x, y, triangles, mask
    Parameters defining the triangular grid. See `.Triangulation`.
    This is mutually exclusive with specifying *triangulation*.
c : array-like
    The color values, either for the points or for the triangles. Which one
    is automatically inferred from the length of *c*, i.e. does it match
    the number of points or the number of triangles. If there are the same
    number of points and triangles in the triangulation it is assumed that
    color values are defined at points; to force the use of color values at
    triangles use the keyword argument ``facecolors=c`` instead of just
    ``c``.
    This parameter is position-only.
facecolors : array-like, optional
    Can be used alternatively to *c* to specify colors at the triangle
    faces. This parameter takes precedence over *c*.
shading : {'flat', 'gouraud'}, default: 'flat'
    If  'flat' and the color values *c* are defined at points, the color
    values used for each triangle are from the mean c of the triangle's
    three points. If *shading* is 'gouraud' then color values must be
    defined at points.
other_parameters
    All other parameters are the same as for `~.Axes.pcolor`.

---
## __name__
```python
from _trifinder import __name__
```



---
## TriFinder
```python
from _trifinder import TriFinder
```

Abstract base class for classes used to find the triangles of a
Triangulation in which (x, y) points lie.

Rather than instantiate an object of a class derived from TriFinder, it is
usually better to use the function `.Triangulation.get_trifinder`.

Derived classes implement __call__(x, y) where x and y are array-like point
coordinates of the same shape.

---
## TrapezoidMapTriFinder
```python
from _trifinder import TrapezoidMapTriFinder
```

`~matplotlib.tri.TriFinder` class implemented using the trapezoid
map algorithm from the book "Computational Geometry, Algorithms and
Applications", second edition, by M. de Berg, M. van Kreveld, M. Overmars
and O. Schwarzkopf.

The triangulation must be valid, i.e. it must not have duplicate points,
triangles formed from colinear points, or overlapping triangles.  The
algorithm has some tolerance to triangles formed from colinear points, but
this should not be relied upon.

---
## __init__
```python
from _trifinder import __init__
```



---
## __call__
```python
from _trifinder import __call__
```

Return an array containing the indices of the triangles in which the
specified *x*, *y* points lie, or -1 for points that do not lie within
a triangle.

*x*, *y* are array-like x and y coordinates of the same shape and any
number of dimensions.

Returns integer array with the same shape and *x* and *y*.

---
## _get_tree_stats
```python
from _trifinder import _get_tree_stats
```

Return a python list containing the statistics about the node tree:
0: number of nodes (tree size)
1: number of unique nodes
2: number of trapezoids (tree leaf nodes)
3: number of unique trapezoids
4: maximum parent count (max number of times a node is repeated in
       tree)
5: maximum depth of tree (one more than the maximum number of
       comparisons needed to search through the tree)
6: mean of all trapezoid depths (one more than the average number
       of comparisons needed to search through the tree)

---
## _initialize
```python
from _trifinder import _initialize
```

Initialize the underlying C++ object.  Can be called multiple times if,
for example, the triangulation is modified.

---
## _print_tree
```python
from _trifinder import _print_tree
```

Print a text representation of the node tree, which is useful for
debugging purposes.

---
## __name__
```python
from _triangulation import __name__
```



---
## Triangulation
```python
from _triangulation import Triangulation
```

An unstructured triangular grid consisting of npoints points and
ntri triangles.  The triangles can either be specified by the user
or automatically generated using a Delaunay triangulation.

Parameters
----------
x, y : (npoints,) array-like
    Coordinates of grid points.
triangles : (ntri, 3) array-like of int, optional
    For each triangle, the indices of the three points that make
    up the triangle, ordered in an anticlockwise manner.  If not
    specified, the Delaunay triangulation is calculated.
mask : (ntri,) array-like of bool, optional
    Which triangles are masked out.

Attributes
----------
triangles : (ntri, 3) array of int
    For each triangle, the indices of the three points that make
    up the triangle, ordered in an anticlockwise manner. If you want to
    take the *mask* into account, use `get_masked_triangles` instead.
mask : (ntri, 3) array of bool or None
    Masked out triangles.
is_delaunay : bool
    Whether the Triangulation is a calculated Delaunay
    triangulation (where *triangles* was not specified) or not.

Notes
-----
For a Triangulation to be valid it must not have duplicate points,
triangles formed from colinear points, or overlapping triangles.

---
## __init__
```python
from _triangulation import __init__
```



---
## calculate_plane_coefficients
```python
from _triangulation import calculate_plane_coefficients
```

Calculate plane equation coefficients for all unmasked triangles from
the point (x, y) coordinates and specified z-array of shape (npoints).
The returned array has shape (npoints, 3) and allows z-value at (x, y)
position in triangle tri to be calculated using
``z = array[tri, 0] * x  + array[tri, 1] * y + array[tri, 2]``.

---
## edges
```python
from _triangulation import edges
```

Return integer array of shape (nedges, 2) containing all edges of
non-masked triangles.

Each row defines an edge by its start point index and end point
index.  Each edge appears only once, i.e. for an edge between points
*i*  and *j*, there will only be either *(i, j)* or *(j, i)*.

---
## get_cpp_triangulation
```python
from _triangulation import get_cpp_triangulation
```

Return the underlying C++ Triangulation object, creating it
if necessary.

---
## get_masked_triangles
```python
from _triangulation import get_masked_triangles
```

Return an array of triangles taking the mask into account.

---
## get_from_args_and_kwargs
```python
from _triangulation import get_from_args_and_kwargs
```

Return a Triangulation object from the args and kwargs, and
the remaining args and kwargs with the consumed values removed.

There are two alternatives: either the first argument is a
Triangulation object, in which case it is returned, or the args
and kwargs are sufficient to create a new Triangulation to
return.  In the latter case, see Triangulation.__init__ for
the possible args and kwargs.

---
## _extract_triangulation_params
```python
from _triangulation import _extract_triangulation_params
```



---
## get_trifinder
```python
from _triangulation import get_trifinder
```

Return the default `matplotlib.tri.TriFinder` of this
triangulation, creating it if necessary.  This allows the same
TriFinder object to be easily shared.

---
## neighbors
```python
from _triangulation import neighbors
```

Return integer array of shape (ntri, 3) containing neighbor triangles.

For each triangle, the indices of the three triangles that
share the same edges, or -1 if there is no such neighboring
triangle.  ``neighbors[i, j]`` is the triangle that is the neighbor
to the edge from point index ``triangles[i, j]`` to point index
``triangles[i, (j+1)%3]``.

---
## set_mask
```python
from _triangulation import set_mask
```

Set or clear the mask array.

Parameters
----------
mask : None or bool array of length ntri

---
## __name__
```python
from _trirefine import __name__
```

Mesh refinement for triangular grids.

---
## TriRefiner
```python
from _trirefine import TriRefiner
```

Abstract base class for classes implementing mesh refinement.

A TriRefiner encapsulates a Triangulation object and provides tools for
mesh refinement and interpolation.

Derived classes must implement:

- ``refine_triangulation(return_tri_index=False, **kwargs)`` , where
  the optional keyword arguments *kwargs* are defined in each
  TriRefiner concrete implementation, and which returns:

  - a refined triangulation,
  - optionally (depending on *return_tri_index*), for each
    point of the refined triangulation: the index of
    the initial triangulation triangle to which it belongs.

- ``refine_field(z, triinterpolator=None, **kwargs)``, where:

  - *z* array of field values (to refine) defined at the base
    triangulation nodes,
  - *triinterpolator* is an optional `~matplotlib.tri.TriInterpolator`,
  - the other optional keyword arguments *kwargs* are defined in
    each TriRefiner concrete implementation;

  and which returns (as a tuple) a refined triangular mesh and the
  interpolated values of the field at the refined triangulation nodes.

---
## UniformTriRefiner
```python
from _trirefine import UniformTriRefiner
```

Uniform mesh refinement by recursive subdivisions.

Parameters
----------
triangulation : `~matplotlib.tri.Triangulation`
    The encapsulated triangulation (to be refined)

---
## __init__
```python
from _trirefine import __init__
```



---
## refine_triangulation
```python
from _trirefine import refine_triangulation
```

Compute a uniformly refined triangulation *refi_triangulation* of
the encapsulated :attr:`triangulation`.

This function refines the encapsulated triangulation by splitting each
father triangle into 4 child sub-triangles built on the edges midside
nodes, recursing *subdiv* times.  In the end, each triangle is hence
divided into ``4**subdiv`` child triangles.

Parameters
----------
return_tri_index : bool, default: False
    Whether an index table indicating the father triangle index of each
    point is returned.
subdiv : int, default: 3
    Recursion level for the subdivision.
    Each triangle is divided into ``4**subdiv`` child triangles;
    hence, the default results in 64 refined subtriangles for each
    triangle of the initial triangulation.

Returns
-------
refi_triangulation : `~matplotlib.tri.Triangulation`
    The refined triangulation.
found_index : int array
    Index of the initial triangulation containing triangle, for each
    point of *refi_triangulation*.
    Returned only if *return_tri_index* is set to True.

---
## refine_field
```python
from _trirefine import refine_field
```

Refine a field defined on the encapsulated triangulation.

Parameters
----------
z : (npoints,) array-like
    Values of the field to refine, defined at the nodes of the
    encapsulated triangulation. (``n_points`` is the number of points
    in the initial triangulation)
triinterpolator : `~matplotlib.tri.TriInterpolator`, optional
    Interpolator used for field interpolation. If not specified,
    a `~matplotlib.tri.CubicTriInterpolator` will be used.
subdiv : int, default: 3
    Recursion level for the subdivision.
    Each triangle is divided into ``4**subdiv`` child triangles.

Returns
-------
refi_tri : `~matplotlib.tri.Triangulation`
     The returned refined triangulation.
refi_z : 1D array of length: *refi_tri* node count.
     The returned interpolated field (at *refi_tri* nodes).

---
## _refine_triangulation_once
```python
from _trirefine import _refine_triangulation_once
```

Refine a `.Triangulation` by splitting each triangle into 4
child-masked_triangles built on the edges midside nodes.

Masked triangles, if present, are also split, but their children
returned masked.

If *ancestors* is not provided, returns only a new triangulation:
child_triangulation.

If the array-like key table *ancestor* is given, it shall be of shape
(ntri,) where ntri is the number of *triangulation* masked_triangles.
In this case, the function returns
(child_triangulation, child_ancestors)
child_ancestors is defined so that the 4 child masked_triangles share
the same index as their father: child_ancestors.shape = (4 * ntri,).

---
## __name__
```python
from _triplot import __name__
```



---
## triplot
```python
from _triplot import triplot
```

Draw an unstructured triangular grid as lines and/or markers.

Call signatures::

  triplot(triangulation, ...)
  triplot(x, y, [triangles], *, [mask=mask], ...)

The triangular grid can be specified either by passing a `.Triangulation`
object as the first parameter, or by passing the points *x*, *y* and
optionally the *triangles* and a *mask*. If neither of *triangulation* or
*triangles* are given, the triangulation is calculated on the fly.

Parameters
----------
triangulation : `.Triangulation`
    An already created triangular grid.
x, y, triangles, mask
    Parameters defining the triangular grid. See `.Triangulation`.
    This is mutually exclusive with specifying *triangulation*.
other_parameters
    All other args and kwargs are forwarded to `~.Axes.plot`.

Returns
-------
lines : `~matplotlib.lines.Line2D`
    The drawn triangles edges.
markers : `~matplotlib.lines.Line2D`
    The drawn marker nodes.

---
## __name__
```python
from _tritools import __name__
```

Tools for triangular grids.

---
## TriAnalyzer
```python
from _tritools import TriAnalyzer
```

Define basic tools for triangular mesh analysis and improvement.

A TriAnalyzer encapsulates a `.Triangulation` object and provides basic
tools for mesh analysis and mesh improvement.

Attributes
----------
scale_factors

Parameters
----------
triangulation : `~matplotlib.tri.Triangulation`
    The encapsulated triangulation to analyze.

---
## __init__
```python
from _tritools import __init__
```



---
## scale_factors
```python
from _tritools import scale_factors
```

Factors to rescale the triangulation into a unit square.

Returns
-------
(float, float)
    Scaling factors (kx, ky) so that the triangulation
    ``[triangulation.x * kx, triangulation.y * ky]``
    fits exactly inside a unit square.

---
## circle_ratios
```python
from _tritools import circle_ratios
```

Return a measure of the triangulation triangles flatness.

The ratio of the incircle radius over the circumcircle radius is a
widely used indicator of a triangle flatness.
It is always ``<= 0.5`` and ``== 0.5`` only for equilateral
triangles. Circle ratios below 0.01 denote very flat triangles.

To avoid unduly low values due to a difference of scale between the 2
axis, the triangular mesh can first be rescaled to fit inside a unit
square with `scale_factors` (Only if *rescale* is True, which is
its default value).

Parameters
----------
rescale : bool, default: True
    If True, internally rescale (based on `scale_factors`), so that the
    (unmasked) triangles fit exactly inside a unit square mesh.

Returns
-------
masked array
    Ratio of the incircle radius over the circumcircle radius, for
    each 'rescaled' triangle of the encapsulated triangulation.
    Values corresponding to masked triangles are masked out.

---
## get_flat_tri_mask
```python
from _tritools import get_flat_tri_mask
```

Eliminate excessively flat border triangles from the triangulation.

Returns a mask *new_mask* which allows to clean the encapsulated
triangulation from its border-located flat triangles
(according to their :meth:`circle_ratios`).
This mask is meant to be subsequently applied to the triangulation
using `.Triangulation.set_mask`.
*new_mask* is an extension of the initial triangulation mask
in the sense that an initially masked triangle will remain masked.

The *new_mask* array is computed recursively; at each step flat
triangles are removed only if they share a side with the current mesh
border. Thus, no new holes in the triangulated domain will be created.

Parameters
----------
min_circle_ratio : float, default: 0.01
    Border triangles with incircle/circumcircle radii ratio r/R will
    be removed if r/R < *min_circle_ratio*.
rescale : bool, default: True
    If True, first, internally rescale (based on `scale_factors`) so
    that the (unmasked) triangles fit exactly inside a unit square
    mesh.  This rescaling accounts for the difference of scale which
    might exist between the 2 axis.

Returns
-------
array of bool
    Mask to apply to encapsulated triangulation.
    All the initially masked triangles remain masked in the
    *new_mask*.

Notes
-----
The rationale behind this function is that a Delaunay
triangulation - of an unstructured set of points - sometimes contains
almost flat triangles at its border, leading to artifacts in plots
(especially for high-resolution contouring).
Masked with computed *new_mask*, the encapsulated
triangulation would contain no more unmasked border triangles
with a circle ratio below *min_circle_ratio*, thus improving the
mesh quality for subsequent plots or interpolation.

---
## _get_compressed_triangulation
```python
from _tritools import _get_compressed_triangulation
```

Compress (if masked) the encapsulated triangulation.

Returns minimal-length triangles array (*compressed_triangles*) and
coordinates arrays (*compressed_x*, *compressed_y*) that can still
describe the unmasked triangles of the encapsulated triangulation.

Returns
-------
compressed_triangles : array-like
    the returned compressed triangulation triangles
compressed_x : array-like
    the returned compressed triangulation 1st coordinate
compressed_y : array-like
    the returned compressed triangulation 2nd coordinate
tri_renum : int array
    renumbering table to translate the triangle numbers from the
    encapsulated triangulation into the new (compressed) renumbering.
    -1 for masked triangles (deleted from *compressed_triangles*).
node_renum : int array
    renumbering table to translate the point numbers from the
    encapsulated triangulation into the new (compressed) renumbering.
    -1 for unused points (i.e. those deleted from *compressed_x* and
    *compressed_y*).

---
## _total_to_compress_renum
```python
from _tritools import _total_to_compress_renum
```

Parameters
----------
valid : 1D bool array
    Validity mask.

Returns
-------
int array
    Array so that (`valid_array` being a compressed array
    based on a `masked_array` with mask ~*valid*):

    - For all i with valid[i] = True:
      valid_array[renum[i]] = masked_array[i]
    - For all i with valid[i] = False:
      renum[i] = -1 (invalid value)

---
## __name__
```python
from _triinterpolate import __name__
```

Interpolation inside triangular grids.

---
## TriInterpolator
```python
from _triinterpolate import TriInterpolator
```

Abstract base class for classes used to interpolate on a triangular grid.

Derived classes implement the following methods:

- ``__call__(x, y)``,
  where x, y are array-like point coordinates of the same shape, and
  that returns a masked array of the same shape containing the
  interpolated z-values.

- ``gradient(x, y)``,
  where x, y are array-like point coordinates of the same
  shape, and that returns a list of 2 masked arrays of the same shape
  containing the 2 derivatives of the interpolator (derivatives of
  interpolated z values with respect to x and y).

---
## LinearTriInterpolator
```python
from _triinterpolate import LinearTriInterpolator
```

Linear interpolator on a triangular grid.

Each triangle is represented by a plane so that an interpolated value at
point (x, y) lies on the plane of the triangle containing (x, y).
Interpolated values are therefore continuous across the triangulation, but
their first derivatives are discontinuous at edges between triangles.

Parameters
----------
triangulation : `~matplotlib.tri.Triangulation`
    The triangulation to interpolate over.
z : (npoints,) array-like
    Array of values, defined at grid points, to interpolate between.
trifinder : `~matplotlib.tri.TriFinder`, optional
    If this is not specified, the Triangulation's default TriFinder will
    be used by calling `.Triangulation.get_trifinder`.

Methods
-------
`__call__` (x, y) : Returns interpolated values at (x, y) points.
`gradient` (x, y) : Returns interpolated derivatives at (x, y) points.

---
## CubicTriInterpolator
```python
from _triinterpolate import CubicTriInterpolator
```

Cubic interpolator on a triangular grid.

In one-dimension - on a segment - a cubic interpolating function is
defined by the values of the function and its derivative at both ends.
This is almost the same in 2D inside a triangle, except that the values
of the function and its 2 derivatives have to be defined at each triangle
node.

The CubicTriInterpolator takes the value of the function at each node -
provided by the user - and internally computes the value of the
derivatives, resulting in a smooth interpolation.
(As a special feature, the user can also impose the value of the
derivatives at each node, but this is not supposed to be the common
usage.)

Parameters
----------
triangulation : `~matplotlib.tri.Triangulation`
    The triangulation to interpolate over.
z : (npoints,) array-like
    Array of values, defined at grid points, to interpolate between.
kind : {'min_E', 'geom', 'user'}, optional
    Choice of the smoothing algorithm, in order to compute
    the interpolant derivatives (defaults to 'min_E'):

    - if 'min_E': (default) The derivatives at each node is computed
      to minimize a bending energy.
    - if 'geom': The derivatives at each node is computed as a
      weighted average of relevant triangle normals. To be used for
      speed optimization (large grids).
    - if 'user': The user provides the argument *dz*, no computation
      is hence needed.

trifinder : `~matplotlib.tri.TriFinder`, optional
    If not specified, the Triangulation's default TriFinder will
    be used by calling `.Triangulation.get_trifinder`.
dz : tuple of array-likes (dzdx, dzdy), optional
    Used only if  *kind* ='user'. In this case *dz* must be provided as
    (dzdx, dzdy) where dzdx, dzdy are arrays of the same shape as *z* and
    are the interpolant first derivatives at the *triangulation* points.

Methods
-------
`__call__` (x, y) : Returns interpolated values at (x, y) points.
`gradient` (x, y) : Returns interpolated derivatives at (x, y) points.

Notes
-----
This note is a bit technical and details how the cubic interpolation is
computed.

The interpolation is based on a Clough-Tocher subdivision scheme of
the *triangulation* mesh (to make it clearer, each triangle of the
grid will be divided in 3 child-triangles, and on each child triangle
the interpolated function is a cubic polynomial of the 2 coordinates).
This technique originates from FEM (Finite Element Method) analysis;
the element used is a reduced Hsieh-Clough-Tocher (HCT)
element. Its shape functions are described in [1]_.
The assembled function is guaranteed to be C1-smooth, i.e. it is
continuous and its first derivatives are also continuous (this
is easy to show inside the triangles but is also true when crossing the
edges).

In the default case (*kind* ='min_E'), the interpolant minimizes a
curvature energy on the functional space generated by the HCT element
shape functions - with imposed values but arbitrary derivatives at each
node. The minimized functional is the integral of the so-called total
curvature (implementation based on an algorithm from [2]_ - PCG sparse
solver):

.. math::

    E(z) = \frac{1}{2} \int_{\Omega} \left(
        \left( \frac{\partial^2{z}}{\partial{x}^2} \right)^2 +
        \left( \frac{\partial^2{z}}{\partial{y}^2} \right)^2 +
        2\left( \frac{\partial^2{z}}{\partial{y}\partial{x}} \right)^2
    \right) dx\,dy

If the case *kind* ='geom' is chosen by the user, a simple geometric
approximation is used (weighted average of the triangle normal
vectors), which could improve speed on very large grids.

References
----------
.. [1] Michel Bernadou, Kamal Hassan, "Basis functions for general
    Hsieh-Clough-Tocher triangles, complete or reduced.",
    International Journal for Numerical Methods in Engineering,
    17(5):784 - 789. 2.01.
.. [2] C.T. Kelley, "Iterative Methods for Optimization".

---
## _ReducedHCT_Element
```python
from _triinterpolate import _ReducedHCT_Element
```

Implementation of reduced HCT triangular element with explicit shape
functions.

Computes z, dz, d2z and the element stiffness matrix for bending energy:
E(f) = integral( (d2z/dx2 + d2z/dy2)**2 dA)

*** Reference for the shape functions: ***
[1] Basis functions for general Hsieh-Clough-Tocher _triangles, complete or
    reduced.
    Michel Bernadou, Kamal Hassan
    International Journal for Numerical Methods in Engineering.
    17(5):784 - 789.  2.01

*** Element description: ***
9 dofs: z and dz given at 3 apex
C1 (conform)

---
## _DOF_estimator
```python
from _triinterpolate import _DOF_estimator
```

Abstract base class for classes used to estimate a function's first
derivatives, and deduce the dofs for a CubicTriInterpolator using a
reduced HCT element formulation.

Derived classes implement ``compute_df(self, **kwargs)``, returning
``np.vstack([dfx, dfy]).T`` where ``dfx, dfy`` are the estimation of the 2
gradient coordinates.

---
## _DOF_estimator_user
```python
from _triinterpolate import _DOF_estimator_user
```

dz is imposed by user; accounts for scaling if any.

---
## _DOF_estimator_geom
```python
from _triinterpolate import _DOF_estimator_geom
```

Fast 'geometric' approximation, recommended for large arrays.

---
## _DOF_estimator_min_E
```python
from _triinterpolate import _DOF_estimator_min_E
```

The 'smoothest' approximation, df is computed through global minimization
of the bending energy:
  E(f) = integral[(d2z/dx2 + d2z/dy2 + 2 d2z/dxdy)**2 dA]

---
## _Sparse_Matrix_coo
```python
from _triinterpolate import _Sparse_Matrix_coo
```



---
## _cg
```python
from _triinterpolate import _cg
```

Use Preconditioned Conjugate Gradient iteration to solve A x = b
A simple Jacobi (diagonal) preconditioner is used.

Parameters
----------
A : _Sparse_Matrix_coo
    *A* must have been compressed before by compress_csc or
    compress_csr method.
b : array
    Right hand side of the linear system.
x0 : array, optional
    Starting guess for the solution. Defaults to the zero vector.
tol : float, optional
    Tolerance to achieve. The algorithm terminates when the relative
    residual is below tol. Default is 1e-10.
maxiter : int, optional
    Maximum number of iterations.  Iteration will stop after *maxiter*
    steps even if the specified tolerance has not been achieved. Defaults
    to 1000.

Returns
-------
x : array
    The converged solution.
err : float
    The absolute error np.linalg.norm(A.dot(x) - b)

---
## _safe_inv22_vectorized
```python
from _triinterpolate import _safe_inv22_vectorized
```

Inversion of arrays of (2, 2) matrices, returns 0 for rank-deficient
matrices.

*M* : array of (2, 2) matrices to inverse, shape (n, 2, 2)

---
## _pseudo_inv22sym_vectorized
```python
from _triinterpolate import _pseudo_inv22sym_vectorized
```

Inversion of arrays of (2, 2) SYMMETRIC matrices; returns the
(Moore-Penrose) pseudo-inverse for rank-deficient matrices.

In case M is of rank 1, we have M = trace(M) x P where P is the orthogonal
projection on Im(M), and we return trace(M)^-1 x P == M / trace(M)**2
In case M is of rank 0, we return the null matrix.

*M* : array of (2, 2) matrices to inverse, shape (n, 2, 2)

---
## _scalar_vectorized
```python
from _triinterpolate import _scalar_vectorized
```

Scalar product between scalars and matrices.

---
## _transpose_vectorized
```python
from _triinterpolate import _transpose_vectorized
```

Transposition of an array of matrices *M*.

---
## _roll_vectorized
```python
from _triinterpolate import _roll_vectorized
```

Roll an array of matrices along *axis* (0: rows, 1: columns) according to
an array of indices *roll_indices*.

---
## _to_matrix_vectorized
```python
from _triinterpolate import _to_matrix_vectorized
```

Build an array of matrices from individuals np.arrays of identical shapes.

Parameters
----------
M
    ncols-list of nrows-lists of shape sh.

Returns
-------
M_res : np.array of shape (sh, nrow, ncols)
    *M_res* satisfies ``M_res[..., i, j] = M[i][j]``.

---
## _extract_submatrices
```python
from _triinterpolate import _extract_submatrices
```

Extract selected blocks of a matrices *M* depending on parameters
*block_indices* and *block_size*.

Returns the array of extracted matrices *Mres* so that ::

    M_res[..., ir, :] = M[(block_indices*block_size+ir), :]

---
## __init__
```python
from _triinterpolate import __init__
```

Create a sparse matrix in coo format.
*vals*: arrays of values of non-null entries of the matrix
*rows*: int arrays of rows of non-null entries of the matrix
*cols*: int arrays of cols of non-null entries of the matrix
*shape*: 2-tuple (n, m) of matrix shape

---
## _interpolate_multikeys
```python
from _triinterpolate import _interpolate_multikeys
```

Versatile (private) method defined for all TriInterpolators.

:meth:`_interpolate_multikeys` is a wrapper around method
:meth:`_interpolate_single_key` (to be defined in the child
subclasses).
:meth:`_interpolate_single_key actually performs the interpolation,
but only for 1-dimensional inputs and at valid locations (inside
unmasked triangles of the triangulation).

The purpose of :meth:`_interpolate_multikeys` is to implement the
following common tasks needed in all subclasses implementations:

- calculation of containing triangles
- dealing with more than one interpolation request at the same
  location (e.g., if the 2 derivatives are requested, it is
  unnecessary to compute the containing triangles twice)
- scaling according to self._unit_x, self._unit_y
- dealing with points outside of the grid (with fill value np.nan)
- dealing with multi-dimensional *x*, *y* arrays: flattening for
  :meth:`_interpolate_params` call and final reshaping.

(Note that np.vectorize could do most of those things very well for
you, but it does it by function evaluations over successive tuples of
the input arrays. Therefore, this tends to be more time-consuming than
using optimized numpy functions - e.g., np.dot - which can be used
easily on the flattened inputs, in the child-subclass methods
:meth:`_interpolate_single_key`.)

It is guaranteed that the calls to :meth:`_interpolate_single_key`
will be done with flattened (1-d) array-like input parameters *x*, *y*
and with flattened, valid `tri_index` arrays (no -1 index allowed).

Parameters
----------
x, y : array-like
    x and y coordinates where interpolated values are requested.
tri_index : array-like of int, optional
    Array of the containing triangle indices, same shape as
    *x* and *y*. Defaults to None. If None, these indices
    will be computed by a TriFinder instance.
    (Note: For point outside the grid, tri_index[ipt] shall be -1).
return_keys : tuple of keys from {'z', 'dzdx', 'dzdy'}
    Defines the interpolation arrays to return, and in which order.

Returns
-------
list of arrays
    Each array-like contains the expected interpolated values in the
    order defined by *return_keys* parameter.

---
## _interpolate_single_key
```python
from _triinterpolate import _interpolate_single_key
```



---
## __call__
```python
from _triinterpolate import __call__
```



---
## gradient
```python
from _triinterpolate import gradient
```



---
## _compute_dof
```python
from _triinterpolate import _compute_dof
```

Compute and return nodal dofs according to kind.

Parameters
----------
kind : {'min_E', 'geom', 'user'}
    Choice of the _DOF_estimator subclass to estimate the gradient.
dz : tuple of array-likes (dzdx, dzdy), optional
    Used only if *kind*=user; in this case passed to the
    :class:`_DOF_estimator_user`.

Returns
-------
array-like, shape (npts, 2)
    Estimation of the gradient at triangulation nodes (stored as
    degree of freedoms of reduced-HCT triangle elements).

---
## _get_alpha_vec
```python
from _triinterpolate import _get_alpha_vec
```

Fast (vectorized) function to compute barycentric coordinates alpha.

Parameters
----------
x, y : array-like of dim 1 (shape (nx,))
    Coordinates of the points whose points barycentric coordinates are
    requested.
tris_pts : array like of dim 3 (shape: (nx, 3, 2))
    Coordinates of the containing triangles apexes.

Returns
-------
array of dim 2 (shape (nx, 3))
    Barycentric coordinates of the points inside the containing
    triangles.

---
## _get_jacobian
```python
from _triinterpolate import _get_jacobian
```

Fast (vectorized) function to compute triangle jacobian matrix.

Parameters
----------
tris_pts : array like of dim 3 (shape: (nx, 3, 2))
    Coordinates of the containing triangles apexes.

Returns
-------
array of dim 3 (shape (nx, 2, 2))
    Barycentric coordinates of the points inside the containing
    triangles.
    J[itri, :, :] is the jacobian matrix at apex 0 of the triangle
    itri, so that the following (matrix) relationship holds:
       [dz/dksi] = [J] x [dz/dx]
    with x: global coordinates
         ksi: element parametric coordinates in triangle first apex
         local basis.

---
## _compute_tri_eccentricities
```python
from _triinterpolate import _compute_tri_eccentricities
```

Compute triangle eccentricities.

Parameters
----------
tris_pts : array like of dim 3 (shape: (nx, 3, 2))
    Coordinates of the triangles apexes.

Returns
-------
array like of dim 2 (shape: (nx, 3))
    The so-called eccentricity parameters [1] needed for HCT triangular
    element.

---
## get_function_values
```python
from _triinterpolate import get_function_values
```

Parameters
----------
alpha : is a (N x 3 x 1) array (array of column-matrices) of
barycentric coordinates,
ecc : is a (N x 3 x 1) array (array of column-matrices) of triangle
eccentricities,
dofs : is a (N x 1 x 9) arrays (arrays of row-matrices) of computed
degrees of freedom.

Returns
-------
Returns the N-array of interpolated function values.

---
## get_function_derivatives
```python
from _triinterpolate import get_function_derivatives
```

Parameters
----------
*alpha* is a (N x 3 x 1) array (array of column-matrices of
barycentric coordinates)
*J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
triangle first apex)
*ecc* is a (N x 3 x 1) array (array of column-matrices of triangle
eccentricities)
*dofs* is a (N x 1 x 9) arrays (arrays of row-matrices) of computed
degrees of freedom.

Returns
-------
Returns the values of interpolated function derivatives [dz/dx, dz/dy]
in global coordinates at locations alpha, as a column-matrices of
shape (N x 2 x 1).

---
## get_function_hessians
```python
from _triinterpolate import get_function_hessians
```

Parameters
----------
*alpha* is a (N x 3 x 1) array (array of column-matrices) of
barycentric coordinates
*J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
triangle first apex)
*ecc* is a (N x 3 x 1) array (array of column-matrices) of triangle
eccentricities
*dofs* is a (N x 1 x 9) arrays (arrays of row-matrices) of computed
degrees of freedom.

Returns
-------
Returns the values of interpolated function 2nd-derivatives
[d2z/dx2, d2z/dy2, d2z/dxdy] in global coordinates at locations alpha,
as a column-matrices of shape (N x 3 x 1).

---
## get_d2Sidksij2
```python
from _triinterpolate import get_d2Sidksij2
```

Parameters
----------
*alpha* is a (N x 3 x 1) array (array of column-matrices) of
barycentric coordinates
*ecc* is a (N x 3 x 1) array (array of column-matrices) of triangle
eccentricities

Returns
-------
Returns the arrays d2sdksi2 (N x 3 x 1) Hessian of shape functions
expressed in covariant coordinates in first apex basis.

---
## get_bending_matrices
```python
from _triinterpolate import get_bending_matrices
```

Parameters
----------
*J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
triangle first apex)
*ecc* is a (N x 3 x 1) array (array of column-matrices) of triangle
eccentricities

Returns
-------
Returns the element K matrices for bending energy expressed in
GLOBAL nodal coordinates.
K_ij = integral [ (d2zi/dx2 + d2zi/dy2) * (d2zj/dx2 + d2zj/dy2) dA]
tri_J is needed to rotate dofs from local basis to global basis

---
## get_Hrot_from_J
```python
from _triinterpolate import get_Hrot_from_J
```

Parameters
----------
*J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
triangle first apex)

Returns
-------
Returns H_rot used to rotate Hessian from local basis of first apex,
to global coordinates.
if *return_area* is True, returns also the triangle area (0.5*det(J))

---
## get_Kff_and_Ff
```python
from _triinterpolate import get_Kff_and_Ff
```

Build K and F for the following elliptic formulation:
minimization of curvature energy with value of function at node
imposed and derivatives 'free'.

Build the global Kff matrix in cco format.
Build the full Ff vec Ff = - Kfc x Uc.

Parameters
----------
*J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
triangle first apex)
*ecc* is a (N x 3 x 1) array (array of column-matrices) of triangle
eccentricities
*triangles* is a (N x 3) array of nodes indexes.
*Uc* is (N x 3) array of imposed displacements at nodes

Returns
-------
(Kff_rows, Kff_cols, Kff_vals) Kff matrix in coo format - Duplicate
(row, col) entries must be summed.
Ff: force vector - dim npts * 3

---
## compute_dz
```python
from _triinterpolate import compute_dz
```

Elliptic solver for bending energy minimization.
Uses a dedicated 'toy' sparse Jacobi PCG solver.

---
## compute_dof_from_df
```python
from _triinterpolate import compute_dof_from_df
```

Compute reduced-HCT elements degrees of freedom, from the gradient.

---
## get_dof_vec
```python
from _triinterpolate import get_dof_vec
```

Compute the dof vector of a triangle, from the value of f, df and
of the local Jacobian at each node.

Parameters
----------
tri_z : shape (3,) array
    f nodal values.
tri_dz : shape (3, 2) array
    df/dx, df/dy nodal values.
J
    Jacobian matrix in local basis of apex 0.

Returns
-------
dof : shape (9,) array
    For each apex ``iapex``::

        dof[iapex*3+0] = f(Ai)
        dof[iapex*3+1] = df(Ai).(AiAi+)
        dof[iapex*3+2] = df(Ai).(AiAi-)

---
## compute_geom_weights
```python
from _triinterpolate import compute_geom_weights
```

Build the (nelems, 3) weights coeffs of _triangles angles,
renormalized so that np.sum(weights, axis=1) == np.ones(nelems)

---
## compute_geom_grads
```python
from _triinterpolate import compute_geom_grads
```

Compute the (global) gradient component of f assumed linear (~f).
returns array df of shape (nelems, 2)
df[ielem].dM[ielem] = dz[ielem] i.e. df = dz x dM = dM.T^-1 x dz

---
## dot
```python
from _triinterpolate import dot
```

Dot product of self by a vector *V* in sparse-dense to dense format
*V* dense vector of shape (self.m,).

---
## compress_csc
```python
from _triinterpolate import compress_csc
```

Compress rows, cols, vals / summing duplicates. Sort for csc format.

---
## compress_csr
```python
from _triinterpolate import compress_csr
```

Compress rows, cols, vals / summing duplicates. Sort for csr format.

---
## to_dense
```python
from _triinterpolate import to_dense
```

Return a dense matrix representing self, mainly for debugging purposes.

---
## __str__
```python
from _triinterpolate import __str__
```



---
## diag
```python
from _triinterpolate import diag
```

Return the (dense) vector of the diagonal elements.

---
## __name__
```python
from _tricontour import __name__
```



---
## TriContourSet
```python
from _tricontour import TriContourSet
```

Create and store a set of contour lines or filled regions for
a triangular grid.

This class is typically not instantiated directly by the user but by
`~.Axes.tricontour` and `~.Axes.tricontourf`.

%(contour_set_attributes)s

---
## tricontour
```python
from _tricontour import tricontour
```

%(_tricontour_doc)s

linewidths : float or array-like, default: :rc:`contour.linewidth`
    The line width of the contour lines.

    If a number, all levels will be plotted with this linewidth.

    If a sequence, the levels in ascending order will be plotted with
    the linewidths in the order specified.

    If None, this falls back to :rc:`lines.linewidth`.

linestyles : {*None*, 'solid', 'dashed', 'dashdot', 'dotted'}, optional
    If *linestyles* is *None*, the default is 'solid' unless the lines are
    monochrome.  In that case, negative contours will take their linestyle
    from :rc:`contour.negative_linestyle` setting.

    *linestyles* can also be an iterable of the above strings specifying a
    set of linestyles to be used. If this iterable is shorter than the
    number of contour levels it will be repeated as necessary.

---
## tricontourf
```python
from _tricontour import tricontourf
```

%(_tricontour_doc)s

hatches : list[str], optional
    A list of crosshatch patterns to use on the filled areas.
    If None, no hatching will be added to the contour.

Notes
-----
`.tricontourf` fills intervals that are closed at the top; that is, for
boundaries *z1* and *z2*, the filled region is::

    z1 < Z <= z2

except for the lowest interval, which is closed on both sides (i.e. it
includes the lowest value).

---
## __init__
```python
from _tricontour import __init__
```

Draw triangular grid contour lines or filled regions,
depending on whether keyword arg *filled* is False
(default) or True.

The first argument of the initializer must be an `~.axes.Axes`
object.  The remaining arguments and keyword arguments
are described in the docstring of `~.Axes.tricontour`.

---
## _process_args
```python
from _tricontour import _process_args
```

Process args and kwargs.

---
## _contour_args
```python
from _tricontour import _contour_args
```



---
## __name__
```python
from _axes import __name__
```



---
## _make_axes_method
```python
from _axes import _make_axes_method
```

Patch the qualname for functions that are directly added to Axes.

Some Axes functionality is defined in functions in other submodules.
These are simply added as attributes to Axes. As a result, their
``__qualname__`` is e.g. only "table" and not "Axes.table". This
function fixes that.

Note that the function itself is patched, so that
``matplotlib.table.table.__qualname__` will also show "Axes.table".
However, since these functions are not intended to be standalone,
this is bearable.

---
## Axes
```python
from _axes import Axes
```

An Axes object encapsulates all the elements of an individual (sub-)plot in
a figure.

It contains most of the (sub-)plot elements: `~.axis.Axis`,
`~.axis.Tick`, `~.lines.Line2D`, `~.text.Text`, `~.patches.Polygon`, etc.,
and sets the coordinate system.

Like all visible elements in a figure, Axes is an `.Artist` subclass.

The `Axes` instance supports callbacks through a callbacks attribute which
is a `~.cbook.CallbackRegistry` instance.  The events you can connect to
are 'xlim_changed' and 'ylim_changed' and the callback will be called with
func(*ax*) where *ax* is the `Axes` instance.

.. note::

    As a user, you do not instantiate Axes directly, but use Axes creation
    methods instead; e.g. from `.pyplot` or `.Figure`:
    `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` or `.Figure.add_axes`.

Attributes
----------
dataLim : `.Bbox`
    The bounding box enclosing all data displayed in the Axes.
viewLim : `.Bbox`
    The view limits in data coordinates.

---
## get_title
```python
from _axes import get_title
```

Get an Axes title.

Get one of the three available Axes titles. The available titles
are positioned above the Axes in the center, flush with the left
edge, and flush with the right edge.

Parameters
----------
loc : {'center', 'left', 'right'}, str, default: 'center'
    Which title to return.

Returns
-------
str
    The title text string.

---
## set_title
```python
from _axes import set_title
```

Set a title for the Axes.

Set one of the three available Axes titles. The available titles
are positioned above the Axes in the center, flush with the left
edge, and flush with the right edge.

Parameters
----------
label : str
    Text to use for the title

fontdict : dict

    .. admonition:: Discouraged

       The use of *fontdict* is discouraged. Parameters should be passed as
       individual keyword arguments or using dictionary-unpacking
       ``set_title(..., **fontdict)``.

    A dictionary controlling the appearance of the title text,
    the default *fontdict* is::

       {'fontsize': rcParams['axes.titlesize'],
        'fontweight': rcParams['axes.titleweight'],
        'color': rcParams['axes.titlecolor'],
        'verticalalignment': 'baseline',
        'horizontalalignment': loc}

loc : {'center', 'left', 'right'}, default: :rc:`axes.titlelocation`
    Which title to set.

y : float, default: :rc:`axes.titley`
    Vertical Axes location for the title (1.0 is the top).  If
    None (the default) and :rc:`axes.titley` is also None, y is
    determined automatically to avoid decorators on the Axes.

pad : float, default: :rc:`axes.titlepad`
    The offset of the title from the top of the Axes, in points.

Returns
-------
`.Text`
    The matplotlib text instance representing the title

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    Other keyword arguments are text properties, see `.Text` for a list
    of valid text properties.

---
## get_legend_handles_labels
```python
from _axes import get_legend_handles_labels
```

Return handles and labels for legend

``ax.legend()`` is equivalent to ::

  h, l = ax.get_legend_handles_labels()
  ax.legend(h, l)

---
## legend
```python
from _axes import legend
```

Place a legend on the Axes.

Call signatures::

    legend()
    legend(handles, labels)
    legend(handles=handles)
    legend(labels)

The call signatures correspond to the following different ways to use
this method:

**1. Automatic detection of elements to be shown in the legend**

The elements to be added to the legend are automatically determined,
when you do not pass in any extra arguments.

In this case, the labels are taken from the artist. You can specify
them either at artist creation or by calling the
:meth:`~.Artist.set_label` method on the artist::

    ax.plot([1, 2, 3], label='Inline label')
    ax.legend()

or::

    line, = ax.plot([1, 2, 3])
    line.set_label('Label via method')
    ax.legend()

.. note::
    Specific artists can be excluded from the automatic legend element
    selection by using a label starting with an underscore, "_".
    A string starting with an underscore is the default label for all
    artists, so calling `.Axes.legend` without any arguments and
    without setting the labels manually will result in a ``UserWarning``
    and an empty legend being drawn.


**2. Explicitly listing the artists and labels in the legend**

For full control of which artists have a legend entry, it is possible
to pass an iterable of legend artists followed by an iterable of
legend labels respectively::

    ax.legend([line1, line2, line3], ['label1', 'label2', 'label3'])


**3. Explicitly listing the artists in the legend**

This is similar to 2, but the labels are taken from the artists'
label properties. Example::

    line1, = ax.plot([1, 2, 3], label='label1')
    line2, = ax.plot([1, 2, 3], label='label2')
    ax.legend(handles=[line1, line2])


**4. Labeling existing plot elements**

.. admonition:: Discouraged

    This call signature is discouraged, because the relation between
    plot elements and labels is only implicit by their order and can
    easily be mixed up.

To make a legend for all artists on an Axes, call this function with
an iterable of strings, one for each legend item. For example::

    ax.plot([1, 2, 3])
    ax.plot([5, 6, 7])
    ax.legend(['First line', 'Second line'])


Parameters
----------
handles : list of (`.Artist` or tuple of `.Artist`), optional
    A list of Artists (lines, patches) to be added to the legend.
    Use this together with *labels*, if you need full control on what
    is shown in the legend and the automatic mechanism described above
    is not sufficient.

    The length of handles and labels should be the same in this
    case. If they are not, they are truncated to the smaller length.

    If an entry contains a tuple, then the legend handler for all Artists in the
    tuple will be placed alongside a single label.

labels : list of str, optional
    A list of labels to show next to the artists.
    Use this together with *handles*, if you need full control on what
    is shown in the legend and the automatic mechanism described above
    is not sufficient.

Returns
-------
`~matplotlib.legend.Legend`

Other Parameters
----------------
%(_legend_kw_axes)s

See Also
--------
.Figure.legend

Notes
-----
Some artists are not supported by this function.  See
:ref:`legend_guide` for details.

Examples
--------
.. plot:: gallery/text_labels_and_annotations/legend.py

---
## _remove_legend
```python
from _axes import _remove_legend
```



---
## inset_axes
```python
from _axes import inset_axes
```

Add a child inset Axes to this existing Axes.


Parameters
----------
bounds : [x0, y0, width, height]
    Lower-left corner of inset Axes, and its width and height.

transform : `.Transform`
    Defaults to `ax.transAxes`, i.e. the units of *rect* are in
    Axes-relative coordinates.

projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
    The projection type of the inset `~.axes.Axes`. *str* is the name
    of a custom projection, see `~matplotlib.projections`. The default
    None results in a 'rectilinear' projection.

polar : bool, default: False
    If True, equivalent to projection='polar'.

axes_class : subclass type of `~.axes.Axes`, optional
    The `.axes.Axes` subclass that is instantiated.  This parameter
    is incompatible with *projection* and *polar*.  See
    :ref:`axisartist_users-guide-index` for examples.

zorder : number
    Defaults to 5 (same as `.Axes.legend`).  Adjust higher or lower
    to change whether it is above or below data plotted on the
    parent Axes.

**kwargs
    Other keyword arguments are passed on to the inset Axes class.

Returns
-------
ax
    The created `~.axes.Axes` instance.

Examples
--------
This example makes two inset Axes, the first is in Axes-relative
coordinates, and the second in data-coordinates::

    fig, ax = plt.subplots()
    ax.plot(range(10))
    axin1 = ax.inset_axes([0.8, 0.1, 0.15, 0.15])
    axin2 = ax.inset_axes(
            [5, 7, 2.3, 2.3], transform=ax.transData)

---
## indicate_inset
```python
from _axes import indicate_inset
```

Add an inset indicator to the Axes.  This is a rectangle on the plot
at the position indicated by *bounds* that optionally has lines that
connect the rectangle to an inset Axes (`.Axes.inset_axes`).

Warnings
--------
This method is experimental as of 3.0, and the API may change.

Parameters
----------
bounds : [x0, y0, width, height]
    Lower-left corner of rectangle to be marked, and its width
    and height.

inset_ax : `.Axes`
    An optional inset Axes to draw connecting lines to.  Two lines are
    drawn connecting the indicator box to the inset Axes on corners
    chosen so as to not overlap with the indicator box.

transform : `.Transform`
    Transform for the rectangle coordinates. Defaults to
    `ax.transAxes`, i.e. the units of *rect* are in Axes-relative
    coordinates.

facecolor : :mpltype:`color`, default: 'none'
    Facecolor of the rectangle.

edgecolor : :mpltype:`color`, default: '0.5'
    Color of the rectangle and color of the connecting lines.

alpha : float, default: 0.5
    Transparency of the rectangle and connector lines.

zorder : float, default: 4.99
    Drawing order of the rectangle and connector lines.  The default,
    4.99, is just below the default level of inset Axes.

**kwargs
    Other keyword arguments are passed on to the `.Rectangle` patch:

    %(Rectangle:kwdoc)s

Returns
-------
rectangle_patch : `.patches.Rectangle`
     The indicator frame.

connector_lines : 4-tuple of `.patches.ConnectionPatch`
    The four connector lines connecting to (lower_left, upper_left,
    lower_right upper_right) corners of *inset_ax*. Two lines are
    set with visibility to *False*,  but the user can set the
    visibility to True if the automatic choice is not deemed correct.

---
## indicate_inset_zoom
```python
from _axes import indicate_inset_zoom
```

Add an inset indicator rectangle to the Axes based on the axis
limits for an *inset_ax* and draw connectors between *inset_ax*
and the rectangle.

Warnings
--------
This method is experimental as of 3.0, and the API may change.

Parameters
----------
inset_ax : `.Axes`
    Inset Axes to draw connecting lines to.  Two lines are
    drawn connecting the indicator box to the inset Axes on corners
    chosen so as to not overlap with the indicator box.

**kwargs
    Other keyword arguments are passed on to `.Axes.indicate_inset`

Returns
-------
rectangle_patch : `.patches.Rectangle`
     Rectangle artist.

connector_lines : 4-tuple of `.patches.ConnectionPatch`
    Each of four connector lines coming from the rectangle drawn on
    this axis, in the order lower left, upper left, lower right,
    upper right.
    Two are set with visibility to *False*,  but the user can
    set the visibility to *True* if the automatic choice is not deemed
    correct.

---
## secondary_xaxis
```python
from _axes import secondary_xaxis
```

Add a second x-axis to this `~.axes.Axes`.

For example if we want to have a second scale for the data plotted on
the xaxis.

%(_secax_docstring)s

Examples
--------
The main axis shows frequency, and the secondary axis shows period.

.. plot::

    fig, ax = plt.subplots()
    ax.loglog(range(1, 360, 5), range(1, 360, 5))
    ax.set_xlabel('frequency [Hz]')

    def invert(x):
        # 1/x with special treatment of x == 0
        x = np.array(x).astype(float)
        near_zero = np.isclose(x, 0)
        x[near_zero] = np.inf
        x[~near_zero] = 1 / x[~near_zero]
        return x

    # the inverse of 1/x is itself
    secax = ax.secondary_xaxis('top', functions=(invert, invert))
    secax.set_xlabel('Period [s]')
    plt.show()

To add a secondary axis relative to your data, you can pass a transform
to the new axis.

.. plot::

    fig, ax = plt.subplots()
    ax.plot(range(0, 5), range(-1, 4))

    # Pass 'ax.transData' as a transform to place the axis
    # relative to your data at y=0
    secax = ax.secondary_xaxis(0, transform=ax.transData)

---
## secondary_yaxis
```python
from _axes import secondary_yaxis
```

Add a second y-axis to this `~.axes.Axes`.

For example if we want to have a second scale for the data plotted on
the yaxis.

%(_secax_docstring)s

Examples
--------
Add a secondary Axes that converts from radians to degrees

.. plot::

    fig, ax = plt.subplots()
    ax.plot(range(1, 360, 5), range(1, 360, 5))
    ax.set_ylabel('degrees')
    secax = ax.secondary_yaxis('right', functions=(np.deg2rad,
                                                   np.rad2deg))
    secax.set_ylabel('radians')

To add a secondary axis relative to your data, you can pass a transform
to the new axis.

.. plot::

    fig, ax = plt.subplots()
    ax.plot(range(0, 5), range(-1, 4))

    # Pass 'ax.transData' as a transform to place the axis
    # relative to your data at x=3
    secax = ax.secondary_yaxis(3, transform=ax.transData)

---
## text
```python
from _axes import text
```

Add text to the Axes.

Add the text *s* to the Axes at location *x*, *y* in data coordinates,
with a default ``horizontalalignment`` on the ``left`` and
``verticalalignment`` at the ``baseline``. See
:doc:`/gallery/text_labels_and_annotations/text_alignment`.

Parameters
----------
x, y : float
    The position to place the text. By default, this is in data
    coordinates. The coordinate system can be changed using the
    *transform* parameter.

s : str
    The text.

fontdict : dict, default: None

    .. admonition:: Discouraged

       The use of *fontdict* is discouraged. Parameters should be passed as
       individual keyword arguments or using dictionary-unpacking
       ``text(..., **fontdict)``.

    A dictionary to override the default text properties. If fontdict
    is None, the defaults are determined by `.rcParams`.

Returns
-------
`.Text`
    The created `.Text` instance.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties.
    Other miscellaneous text parameters.

    %(Text:kwdoc)s

Examples
--------
Individual keyword arguments can be used to override any given
parameter::

    >>> text(x, y, s, fontsize=12)

The default transform specifies that text is in data coords,
alternatively, you can specify text in axis coords ((0, 0) is
lower-left and (1, 1) is upper-right).  The example below places
text in the center of the Axes::

    >>> text(0.5, 0.5, 'matplotlib', horizontalalignment='center',
    ...      verticalalignment='center', transform=ax.transAxes)

You can put a rectangular box around the text instance (e.g., to
set a background color) by using the keyword *bbox*.  *bbox* is
a dictionary of `~matplotlib.patches.Rectangle`
properties.  For example::

    >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))

---
## annotate
```python
from _axes import annotate
```



---
## axhline
```python
from _axes import axhline
```

Add a horizontal line across the Axes.

Parameters
----------
y : float, default: 0
    y position in data coordinates of the horizontal line.

xmin : float, default: 0
    Should be between 0 and 1, 0 being the far left of the plot, 1 the
    far right of the plot.

xmax : float, default: 1
    Should be between 0 and 1, 0 being the far left of the plot, 1 the
    far right of the plot.

Returns
-------
`~matplotlib.lines.Line2D`

Other Parameters
----------------
**kwargs
    Valid keyword arguments are `.Line2D` properties, except for
    'transform':

    %(Line2D:kwdoc)s

See Also
--------
hlines : Add horizontal lines in data coordinates.
axhspan : Add a horizontal span (rectangle) across the axis.
axline : Add a line with an arbitrary slope.

Examples
--------
* draw a thick red hline at 'y' = 0 that spans the xrange::

    >>> axhline(linewidth=4, color='r')

* draw a default hline at 'y' = 1 that spans the xrange::

    >>> axhline(y=1)

* draw a default hline at 'y' = .5 that spans the middle half of
  the xrange::

    >>> axhline(y=.5, xmin=0.25, xmax=0.75)

---
## axvline
```python
from _axes import axvline
```

Add a vertical line across the Axes.

Parameters
----------
x : float, default: 0
    x position in data coordinates of the vertical line.

ymin : float, default: 0
    Should be between 0 and 1, 0 being the bottom of the plot, 1 the
    top of the plot.

ymax : float, default: 1
    Should be between 0 and 1, 0 being the bottom of the plot, 1 the
    top of the plot.

Returns
-------
`~matplotlib.lines.Line2D`

Other Parameters
----------------
**kwargs
    Valid keyword arguments are `.Line2D` properties, except for
    'transform':

    %(Line2D:kwdoc)s

See Also
--------
vlines : Add vertical lines in data coordinates.
axvspan : Add a vertical span (rectangle) across the axis.
axline : Add a line with an arbitrary slope.

Examples
--------
* draw a thick red vline at *x* = 0 that spans the yrange::

    >>> axvline(linewidth=4, color='r')

* draw a default vline at *x* = 1 that spans the yrange::

    >>> axvline(x=1)

* draw a default vline at *x* = .5 that spans the middle half of
  the yrange::

    >>> axvline(x=.5, ymin=0.25, ymax=0.75)

---
## _check_no_units
```python
from _axes import _check_no_units
```



---
## axline
```python
from _axes import axline
```

Add an infinitely long straight line.

The line can be defined either by two points *xy1* and *xy2*, or
by one point *xy1* and a *slope*.

This draws a straight line "on the screen", regardless of the x and y
scales, and is thus also suitable for drawing exponential decays in
semilog plots, power laws in loglog plots, etc. However, *slope*
should only be used with linear scales; It has no clear meaning for
all other scales, and thus the behavior is undefined. Please specify
the line using the points *xy1*, *xy2* for non-linear scales.

The *transform* keyword argument only applies to the points *xy1*,
*xy2*. The *slope* (if given) is always in data coordinates. This can
be used e.g. with ``ax.transAxes`` for drawing grid lines with a fixed
slope.

Parameters
----------
xy1, xy2 : (float, float)
    Points for the line to pass through.
    Either *xy2* or *slope* has to be given.
slope : float, optional
    The slope of the line. Either *xy2* or *slope* has to be given.

Returns
-------
`.AxLine`

Other Parameters
----------------
**kwargs
    Valid kwargs are `.Line2D` properties

    %(Line2D:kwdoc)s

See Also
--------
axhline : for horizontal lines
axvline : for vertical lines

Examples
--------
Draw a thick red line passing through (0, 0) and (1, 1)::

    >>> axline((0, 0), (1, 1), linewidth=4, color='r')

---
## axhspan
```python
from _axes import axhspan
```

Add a horizontal span (rectangle) across the Axes.

The rectangle spans from *ymin* to *ymax* vertically, and, by default,
the whole x-axis horizontally.  The x-span can be set using *xmin*
(default: 0) and *xmax* (default: 1) which are in axis units; e.g.
``xmin = 0.5`` always refers to the middle of the x-axis regardless of
the limits set by `~.Axes.set_xlim`.

Parameters
----------
ymin : float
    Lower y-coordinate of the span, in data units.
ymax : float
    Upper y-coordinate of the span, in data units.
xmin : float, default: 0
    Lower x-coordinate of the span, in x-axis (0-1) units.
xmax : float, default: 1
    Upper x-coordinate of the span, in x-axis (0-1) units.

Returns
-------
`~matplotlib.patches.Rectangle`
    Horizontal span (rectangle) from (xmin, ymin) to (xmax, ymax).

Other Parameters
----------------
**kwargs : `~matplotlib.patches.Rectangle` properties

%(Rectangle:kwdoc)s

See Also
--------
axvspan : Add a vertical span across the Axes.

---
## axvspan
```python
from _axes import axvspan
```

Add a vertical span (rectangle) across the Axes.

The rectangle spans from *xmin* to *xmax* horizontally, and, by
default, the whole y-axis vertically.  The y-span can be set using
*ymin* (default: 0) and *ymax* (default: 1) which are in axis units;
e.g. ``ymin = 0.5`` always refers to the middle of the y-axis
regardless of the limits set by `~.Axes.set_ylim`.

Parameters
----------
xmin : float
    Lower x-coordinate of the span, in data units.
xmax : float
    Upper x-coordinate of the span, in data units.
ymin : float, default: 0
    Lower y-coordinate of the span, in y-axis units (0-1).
ymax : float, default: 1
    Upper y-coordinate of the span, in y-axis units (0-1).

Returns
-------
`~matplotlib.patches.Rectangle`
    Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax).

Other Parameters
----------------
**kwargs : `~matplotlib.patches.Rectangle` properties

%(Rectangle:kwdoc)s

See Also
--------
axhspan : Add a horizontal span across the Axes.

Examples
--------
Draw a vertical, green, translucent rectangle from x = 1.25 to
x = 1.55 that spans the yrange of the Axes.

>>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)

---
## hlines
```python
from _axes import hlines
```

Plot horizontal lines at each *y* from *xmin* to *xmax*.

Parameters
----------
y : float or array-like
    y-indexes where to plot the lines.

xmin, xmax : float or array-like
    Respective beginning and end of each line. If scalars are
    provided, all lines will have the same length.

colors : :mpltype:`color` or list of color , default: :rc:`lines.color`

linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'

label : str, default: ''

Returns
-------
`~matplotlib.collections.LineCollection`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs :  `~matplotlib.collections.LineCollection` properties.

See Also
--------
vlines : vertical lines
axhline : horizontal line across the Axes

---
## vlines
```python
from _axes import vlines
```

Plot vertical lines at each *x* from *ymin* to *ymax*.

Parameters
----------
x : float or array-like
    x-indexes where to plot the lines.

ymin, ymax : float or array-like
    Respective beginning and end of each line. If scalars are
    provided, all lines will have the same length.

colors : :mpltype:`color` or list of color, default: :rc:`lines.color`

linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'

label : str, default: ''

Returns
-------
`~matplotlib.collections.LineCollection`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs : `~matplotlib.collections.LineCollection` properties.

See Also
--------
hlines : horizontal lines
axvline : vertical line across the Axes

---
## eventplot
```python
from _axes import eventplot
```

Plot identical parallel lines at the given positions.

This type of plot is commonly used in neuroscience for representing
neural events, where it is usually called a spike raster, dot raster,
or raster plot.

However, it is useful in any situation where you wish to show the
timing or position of multiple sets of discrete events, such as the
arrival times of people to a business on each day of the month or the
date of hurricanes each year of the last century.

Parameters
----------
positions : array-like or list of array-like
    A 1D array-like defines the positions of one sequence of events.

    Multiple groups of events may be passed as a list of array-likes.
    Each group can be styled independently by passing lists of values
    to *lineoffsets*, *linelengths*, *linewidths*, *colors* and
    *linestyles*.

    Note that *positions* can be a 2D array, but in practice different
    event groups usually have different counts so that one will use a
    list of different-length arrays rather than a 2D array.

orientation : {'horizontal', 'vertical'}, default: 'horizontal'
    The direction of the event sequence:

    - 'horizontal': the events are arranged horizontally.
      The indicator lines are vertical.
    - 'vertical': the events are arranged vertically.
      The indicator lines are horizontal.

lineoffsets : float or array-like, default: 1
    The offset of the center of the lines from the origin, in the
    direction orthogonal to *orientation*.

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

linelengths : float or array-like, default: 1
    The total height of the lines (i.e. the lines stretches from
    ``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

linewidths : float or array-like, default: :rc:`lines.linewidth`
    The line width(s) of the event lines, in points.

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

colors : :mpltype:`color` or list of color, default: :rc:`lines.color`
    The color(s) of the event lines.

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

alpha : float or array-like, default: 1
    The alpha blending value(s), between 0 (transparent) and 1
    (opaque).

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

linestyles : str or tuple or list of such values, default: 'solid'
    Default is 'solid'. Valid strings are ['solid', 'dashed',
    'dashdot', 'dotted', '-', '--', '-.', ':']. Dash tuples
    should be of the form::

        (offset, onoffseq),

    where *onoffseq* is an even length tuple of on and off ink
    in points.

    If *positions* is 2D, this can be a sequence with length matching
    the length of *positions*.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Other keyword arguments are line collection properties.  See
    `.LineCollection` for a list of the valid properties.

Returns
-------
list of `.EventCollection`
    The `.EventCollection` that were added.

Notes
-----
For *linelengths*, *linewidths*, *colors*, *alpha* and *linestyles*, if
only a single value is given, that value is applied to all lines. If an
array-like is given, it must have the same length as *positions*, and
each value will be applied to the corresponding row of the array.

Examples
--------
.. plot:: gallery/lines_bars_and_markers/eventplot_demo.py

---
## plot
```python
from _axes import plot
```

Plot y versus x as lines and/or markers.

Call signatures::

    plot([x], y, [fmt], *, data=None, **kwargs)
    plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

The coordinates of the points or line nodes are given by *x*, *y*.

The optional parameter *fmt* is a convenient way for defining basic
formatting like color, marker and linestyle. It's a shortcut string
notation described in the *Notes* section below.

>>> plot(x, y)        # plot x and y using default line style and color
>>> plot(x, y, 'bo')  # plot x and y using blue circle markers
>>> plot(y)           # plot y using x as index array 0..N-1
>>> plot(y, 'r+')     # ditto, but with red plusses

You can use `.Line2D` properties as keyword arguments for more
control on the appearance. Line properties and *fmt* can be mixed.
The following two calls yield identical results:

>>> plot(x, y, 'go--', linewidth=2, markersize=12)
>>> plot(x, y, color='green', marker='o', linestyle='dashed',
...      linewidth=2, markersize=12)

When conflicting with *fmt*, keyword arguments take precedence.


**Plotting labelled data**

There's a convenient way for plotting objects with labelled data (i.e.
data that can be accessed by index ``obj['y']``). Instead of giving
the data in *x* and *y*, you can provide the object in the *data*
parameter and just give the labels for *x* and *y*::

>>> plot('xlabel', 'ylabel', data=obj)

All indexable objects are supported. This could e.g. be a `dict`, a
`pandas.DataFrame` or a structured numpy array.


**Plotting multiple sets of data**

There are various ways to plot multiple sets of data.

- The most straight forward way is just to call `plot` multiple times.
  Example:

  >>> plot(x1, y1, 'bo')
  >>> plot(x2, y2, 'go')

- If *x* and/or *y* are 2D arrays, a separate data set will be drawn
  for every column. If both *x* and *y* are 2D, they must have the
  same shape. If only one of them is 2D with shape (N, m) the other
  must have length N and will be used for every data set m.

  Example:

  >>> x = [1, 2, 3]
  >>> y = np.array([[1, 2], [3, 4], [5, 6]])
  >>> plot(x, y)

  is equivalent to:

  >>> for col in range(y.shape[1]):
  ...     plot(x, y[:, col])

- The third way is to specify multiple sets of *[x]*, *y*, *[fmt]*
  groups::

  >>> plot(x1, y1, 'g^', x2, y2, 'g-')

  In this case, any additional keyword argument applies to all
  datasets. Also, this syntax cannot be combined with the *data*
  parameter.

By default, each line is assigned a different style specified by a
'style cycle'. The *fmt* and line property parameters are only
necessary if you want explicit deviations from these defaults.
Alternatively, you can also change the style cycle using
:rc:`axes.prop_cycle`.


Parameters
----------
x, y : array-like or scalar
    The horizontal / vertical coordinates of the data points.
    *x* values are optional and default to ``range(len(y))``.

    Commonly, these parameters are 1D arrays.

    They can also be scalars, or two-dimensional (in that case, the
    columns represent separate data sets).

    These arguments cannot be passed as keywords.

fmt : str, optional
    A format string, e.g. 'ro' for red circles. See the *Notes*
    section for a full description of the format strings.

    Format strings are just an abbreviation for quickly setting
    basic line properties. All of these and more can also be
    controlled by keyword arguments.

    This argument cannot be passed as keyword.

data : indexable object, optional
    An object with labelled data. If given, provide the label names to
    plot in *x* and *y*.

    .. note::
        Technically there's a slight ambiguity in calls where the
        second label is a valid *fmt*. ``plot('n', 'o', data=obj)``
        could be ``plt(x, y)`` or ``plt(y, fmt)``. In such cases,
        the former interpretation is chosen, but a warning is issued.
        You may suppress the warning by adding an empty format string
        ``plot('n', 'o', '', data=obj)``.

Returns
-------
list of `.Line2D`
    A list of lines representing the plotted data.

Other Parameters
----------------
scalex, scaley : bool, default: True
    These parameters determine if the view limits are adapted to the
    data limits. The values are passed on to
    `~.axes.Axes.autoscale_view`.

**kwargs : `~matplotlib.lines.Line2D` properties, optional
    *kwargs* are used to specify properties like a line label (for
    auto legends), linewidth, antialiasing, marker face color.
    Example::

    >>> plot([1, 2, 3], [1, 2, 3], 'go-', label='line 1', linewidth=2)
    >>> plot([1, 2, 3], [1, 4, 9], 'rs', label='line 2')

    If you specify multiple lines with one plot call, the kwargs apply
    to all those lines. In case the label object is iterable, each
    element is used as labels for each set of data.

    Here is a list of available `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
scatter : XY scatter plot with markers of varying size and/or color (
    sometimes also called bubble chart).

Notes
-----
**Format Strings**

A format string consists of a part for color, marker and line::

    fmt = '[marker][line][color]'

Each of them is optional. If not provided, the value from the style
cycle is used. Exception: If ``line`` is given, but no ``marker``,
the data will be a line without markers.

Other combinations such as ``[color][marker][line]`` are also
supported, but note that their parsing may be ambiguous.

**Markers**

=============   ===============================
character       description
=============   ===============================
``'.'``         point marker
``','``         pixel marker
``'o'``         circle marker
``'v'``         triangle_down marker
``'^'``         triangle_up marker
``'<'``         triangle_left marker
``'>'``         triangle_right marker
``'1'``         tri_down marker
``'2'``         tri_up marker
``'3'``         tri_left marker
``'4'``         tri_right marker
``'8'``         octagon marker
``'s'``         square marker
``'p'``         pentagon marker
``'P'``         plus (filled) marker
``'*'``         star marker
``'h'``         hexagon1 marker
``'H'``         hexagon2 marker
``'+'``         plus marker
``'x'``         x marker
``'X'``         x (filled) marker
``'D'``         diamond marker
``'d'``         thin_diamond marker
``'|'``         vline marker
``'_'``         hline marker
=============   ===============================

**Line Styles**

=============    ===============================
character        description
=============    ===============================
``'-'``          solid line style
``'--'``         dashed line style
``'-.'``         dash-dot line style
``':'``          dotted line style
=============    ===============================

Example format strings::

    'b'    # blue markers with default shape
    'or'   # red circles
    '-g'   # green solid line
    '--'   # dashed line with default color
    '^k:'  # black triangle_up markers connected by a dotted line

**Colors**

The supported color abbreviations are the single letter codes

=============    ===============================
character        color
=============    ===============================
``'b'``          blue
``'g'``          green
``'r'``          red
``'c'``          cyan
``'m'``          magenta
``'y'``          yellow
``'k'``          black
``'w'``          white
=============    ===============================

and the ``'CN'`` colors that index into the default property cycle.

If the color is the only part of the format string, you can
additionally use any  `matplotlib.colors` spec, e.g. full names
(``'green'``) or hex strings (``'#008000'``).

---
## plot_date
```python
from _axes import plot_date
```

Plot coercing the axis to treat floats as dates.

.. deprecated:: 3.9

    This method exists for historic reasons and will be removed in version 3.11.

    - ``datetime``-like data should directly be plotted using
      `~.Axes.plot`.
    -  If you need to plot plain numeric data as :ref:`date-format` or
       need to set a timezone, call ``ax.xaxis.axis_date`` /
       ``ax.yaxis.axis_date`` before `~.Axes.plot`. See
       `.Axis.axis_date`.

Similar to `.plot`, this plots *y* vs. *x* as lines or markers.
However, the axis labels are formatted as dates depending on *xdate*
and *ydate*.  Note that `.plot` will work with `datetime` and
`numpy.datetime64` objects without resorting to this method.

Parameters
----------
x, y : array-like
    The coordinates of the data points. If *xdate* or *ydate* is
    *True*, the respective values *x* or *y* are interpreted as
    :ref:`Matplotlib dates <date-format>`.

fmt : str, optional
    The plot format string. For details, see the corresponding
    parameter in `.plot`.

tz : timezone string or `datetime.tzinfo`, default: :rc:`timezone`
    The time zone to use in labeling dates.

xdate : bool, default: True
    If *True*, the *x*-axis will be interpreted as Matplotlib dates.

ydate : bool, default: False
    If *True*, the *y*-axis will be interpreted as Matplotlib dates.

Returns
-------
list of `.Line2D`
    Objects representing the plotted data.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
matplotlib.dates : Helper functions on dates.
matplotlib.dates.date2num : Convert dates to num.
matplotlib.dates.num2date : Convert num to dates.
matplotlib.dates.drange : Create an equally spaced sequence of dates.

Notes
-----
If you are using custom date tickers and formatters, it may be
necessary to set the formatters/locators after the call to
`.plot_date`. `.plot_date` will set the default tick locator to
`.AutoDateLocator` (if the tick locator is not already set to a
`.DateLocator` instance) and the default tick formatter to
`.AutoDateFormatter` (if the tick formatter is not already set to a
`.DateFormatter` instance).

---
## loglog
```python
from _axes import loglog
```

Make a plot with log scaling on both the x- and y-axis.

Call signatures::

    loglog([x], y, [fmt], data=None, **kwargs)
    loglog([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
both the x-axis and the y-axis to log scaling. All the concepts and
parameters of plot can be used here as well.

The additional parameters *base*, *subs* and *nonpositive* control the
x/y-axis properties. They are just forwarded to `.Axes.set_xscale` and
`.Axes.set_yscale`. To use different properties on the x-axis and the
y-axis, use e.g.
``ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)``.

Parameters
----------
base : float, default: 10
    Base of the logarithm.

subs : sequence, optional
    The location of the minor ticks. If *None*, reasonable locations
    are automatically chosen depending on the number of decades in the
    plot. See `.Axes.set_xscale`/`.Axes.set_yscale` for details.

nonpositive : {'mask', 'clip'}, default: 'clip'
    Non-positive values can be masked as invalid, or clipped to a very
    small positive number.

**kwargs
    All parameters supported by `.plot`.

Returns
-------
list of `.Line2D`
    Objects representing the plotted data.

---
## semilogx
```python
from _axes import semilogx
```

Make a plot with log scaling on the x-axis.

Call signatures::

    semilogx([x], y, [fmt], data=None, **kwargs)
    semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
the x-axis to log scaling. All the concepts and parameters of plot can
be used here as well.

The additional parameters *base*, *subs*, and *nonpositive* control the
x-axis properties. They are just forwarded to `.Axes.set_xscale`.

Parameters
----------
base : float, default: 10
    Base of the x logarithm.

subs : array-like, optional
    The location of the minor xticks. If *None*, reasonable locations
    are automatically chosen depending on the number of decades in the
    plot. See `.Axes.set_xscale` for details.

nonpositive : {'mask', 'clip'}, default: 'clip'
    Non-positive values in x can be masked as invalid, or clipped to a
    very small positive number.

**kwargs
    All parameters supported by `.plot`.

Returns
-------
list of `.Line2D`
    Objects representing the plotted data.

---
## semilogy
```python
from _axes import semilogy
```

Make a plot with log scaling on the y-axis.

Call signatures::

    semilogy([x], y, [fmt], data=None, **kwargs)
    semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around `.plot` which additionally changes
the y-axis to log scaling. All the concepts and parameters of plot can
be used here as well.

The additional parameters *base*, *subs*, and *nonpositive* control the
y-axis properties. They are just forwarded to `.Axes.set_yscale`.

Parameters
----------
base : float, default: 10
    Base of the y logarithm.

subs : array-like, optional
    The location of the minor yticks. If *None*, reasonable locations
    are automatically chosen depending on the number of decades in the
    plot. See `.Axes.set_yscale` for details.

nonpositive : {'mask', 'clip'}, default: 'clip'
    Non-positive values in y can be masked as invalid, or clipped to a
    very small positive number.

**kwargs
    All parameters supported by `.plot`.

Returns
-------
list of `.Line2D`
    Objects representing the plotted data.

---
## acorr
```python
from _axes import acorr
```

Plot the autocorrelation of *x*.

Parameters
----------
x : array-like
    Not run through Matplotlib's unit conversion, so this should
    be a unit-less array.

detrend : callable, default: `.mlab.detrend_none` (no detrending)
    A detrending function applied to *x*.  It must have the
    signature ::

        detrend(x: np.ndarray) -> np.ndarray

normed : bool, default: True
    If ``True``, input vectors are normalised to unit length.

usevlines : bool, default: True
    Determines the plot style.

    If ``True``, vertical lines are plotted from 0 to the acorr value
    using `.Axes.vlines`. Additionally, a horizontal line is plotted
    at y=0 using `.Axes.axhline`.

    If ``False``, markers are plotted at the acorr values using
    `.Axes.plot`.

maxlags : int, default: 10
    Number of lags to show. If ``None``, will return all
    ``2 * len(x) - 1`` lags.

Returns
-------
lags : array (length ``2*maxlags+1``)
    The lag vector.
c : array  (length ``2*maxlags+1``)
    The auto correlation vector.
line : `.LineCollection` or `.Line2D`
    `.Artist` added to the Axes of the correlation:

    - `.LineCollection` if *usevlines* is True.
    - `.Line2D` if *usevlines* is False.
b : `~matplotlib.lines.Line2D` or None
    Horizontal line at 0 if *usevlines* is True
    None *usevlines* is False.

Other Parameters
----------------
linestyle : `~matplotlib.lines.Line2D` property, optional
    The linestyle for plotting the data points.
    Only used if *usevlines* is ``False``.

marker : str, default: 'o'
    The marker for plotting the data points.
    Only used if *usevlines* is ``False``.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additional parameters are passed to `.Axes.vlines` and
    `.Axes.axhline` if *usevlines* is ``True``; otherwise they are
    passed to `.Axes.plot`.

Notes
-----
The cross correlation is performed with `numpy.correlate` with
``mode = "full"``.

---
## xcorr
```python
from _axes import xcorr
```

Plot the cross correlation between *x* and *y*.

The correlation with lag k is defined as
:math:`\sum_n x[n+k] \cdot y^*[n]`, where :math:`y^*` is the complex
conjugate of :math:`y`.

Parameters
----------
x, y : array-like of length n
    Neither *x* nor *y* are run through Matplotlib's unit conversion, so
    these should be unit-less arrays.

detrend : callable, default: `.mlab.detrend_none` (no detrending)
    A detrending function applied to *x* and *y*.  It must have the
    signature ::

        detrend(x: np.ndarray) -> np.ndarray

normed : bool, default: True
    If ``True``, input vectors are normalised to unit length.

usevlines : bool, default: True
    Determines the plot style.

    If ``True``, vertical lines are plotted from 0 to the xcorr value
    using `.Axes.vlines`. Additionally, a horizontal line is plotted
    at y=0 using `.Axes.axhline`.

    If ``False``, markers are plotted at the xcorr values using
    `.Axes.plot`.

maxlags : int, default: 10
    Number of lags to show. If None, will return all ``2 * len(x) - 1``
    lags.

Returns
-------
lags : array (length ``2*maxlags+1``)
    The lag vector.
c : array  (length ``2*maxlags+1``)
    The auto correlation vector.
line : `.LineCollection` or `.Line2D`
    `.Artist` added to the Axes of the correlation:

    - `.LineCollection` if *usevlines* is True.
    - `.Line2D` if *usevlines* is False.
b : `~matplotlib.lines.Line2D` or None
    Horizontal line at 0 if *usevlines* is True
    None *usevlines* is False.

Other Parameters
----------------
linestyle : `~matplotlib.lines.Line2D` property, optional
    The linestyle for plotting the data points.
    Only used if *usevlines* is ``False``.

marker : str, default: 'o'
    The marker for plotting the data points.
    Only used if *usevlines* is ``False``.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additional parameters are passed to `.Axes.vlines` and
    `.Axes.axhline` if *usevlines* is ``True``; otherwise they are
    passed to `.Axes.plot`.

Notes
-----
The cross correlation is performed with `numpy.correlate` with
``mode = "full"``.

---
## step
```python
from _axes import step
```

Make a step plot.

Call signatures::

    step(x, y, [fmt], *, data=None, where='pre', **kwargs)
    step(x, y, [fmt], x2, y2, [fmt2], ..., *, where='pre', **kwargs)

This is just a thin wrapper around `.plot` which changes some
formatting options. Most of the concepts and parameters of plot can be
used here as well.

.. note::

    This method uses a standard plot with a step drawstyle: The *x*
    values are the reference positions and steps extend left/right/both
    directions depending on *where*.

    For the common case where you know the values and edges of the
    steps, use `~.Axes.stairs` instead.

Parameters
----------
x : array-like
    1D sequence of x positions. It is assumed, but not checked, that
    it is uniformly increasing.

y : array-like
    1D sequence of y levels.

fmt : str, optional
    A format string, e.g. 'g' for a green line. See `.plot` for a more
    detailed description.

    Note: While full format strings are accepted, it is recommended to
    only specify the color. Line styles are currently ignored (use
    the keyword argument *linestyle* instead). Markers are accepted
    and plotted on the given positions, however, this is a rarely
    needed feature for step plots.

where : {'pre', 'post', 'mid'}, default: 'pre'
    Define where the steps should be placed:

    - 'pre': The y value is continued constantly to the left from
      every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
      value ``y[i]``.
    - 'post': The y value is continued constantly to the right from
      every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
      value ``y[i]``.
    - 'mid': Steps occur half-way between the *x* positions.

data : indexable object, optional
    An object with labelled data. If given, provide the label names to
    plot in *x* and *y*.

**kwargs
    Additional parameters are the same as those for `.plot`.

Returns
-------
list of `.Line2D`
    Objects representing the plotted data.

---
## _convert_dx
```python
from _axes import _convert_dx
```

Small helper to do logic of width conversion flexibly.

*dx* and *x0* have units, but *xconv* has already been converted
to unitless (and is an ndarray).  This allows the *dx* to have units
that are different from *x0*, but are still accepted by the
``__add__`` operator of *x0*.

---
## bar
```python
from _axes import bar
```

Make a bar plot.

The bars are positioned at *x* with the given *align*\ment. Their
dimensions are given by *height* and *width*. The vertical baseline
is *bottom* (default 0).

Many parameters can take either a single value applying to all bars
or a sequence of values, one for each bar.

Parameters
----------
x : float or array-like
    The x coordinates of the bars. See also *align* for the
    alignment of the bars to the coordinates.

height : float or array-like
    The height(s) of the bars.

    Note that if *bottom* has units (e.g. datetime), *height* should be in
    units that are a difference from the value of *bottom* (e.g. timedelta).

width : float or array-like, default: 0.8
    The width(s) of the bars.

    Note that if *x* has units (e.g. datetime), then *width* should be in
    units that are a difference (e.g. timedelta) around the *x* values.

bottom : float or array-like, default: 0
    The y coordinate(s) of the bottom side(s) of the bars.

    Note that if *bottom* has units, then the y-axis will get a Locator and
    Formatter appropriate for the units (e.g. dates, or categorical).

align : {'center', 'edge'}, default: 'center'
    Alignment of the bars to the *x* coordinates:

    - 'center': Center the base on the *x* positions.
    - 'edge': Align the left edges of the bars with the *x* positions.

    To align the bars on the right edge pass a negative *width* and
    ``align='edge'``.

Returns
-------
`.BarContainer`
    Container with all the bars and optionally errorbars.

Other Parameters
----------------
color : :mpltype:`color` or list of :mpltype:`color`, optional
    The colors of the bar faces.

edgecolor : :mpltype:`color` or list of :mpltype:`color`, optional
    The colors of the bar edges.

linewidth : float or array-like, optional
    Width of the bar edge(s). If 0, don't draw edges.

tick_label : str or list of str, optional
    The tick labels of the bars.
    Default: None (Use default numeric labels.)

label : str or list of str, optional
    A single label is attached to the resulting `.BarContainer` as a
    label for the whole dataset.
    If a list is provided, it must be the same length as *x* and
    labels the individual bars. Repeated labels are not de-duplicated
    and will cause repeated label entries, so this is best used when
    bars also differ in style (e.g., by passing a list to *color*.)

xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional
    If not *None*, add horizontal / vertical errorbars to the bar tips.
    The values are +/- sizes relative to the data:

    - scalar: symmetric +/- values for all bars
    - shape(N,): symmetric +/- values for each bar
    - shape(2, N): Separate - and + values for each bar. First row
      contains the lower errors, the second row contains the upper
      errors.
    - *None*: No errorbar. (Default)

    See :doc:`/gallery/statistics/errorbar_features` for an example on
    the usage of *xerr* and *yerr*.

ecolor : :mpltype:`color` or list of :mpltype:`color`, default: 'black'
    The line color of the errorbars.

capsize : float, default: :rc:`errorbar.capsize`
   The length of the error bar caps in points.

error_kw : dict, optional
    Dictionary of keyword arguments to be passed to the
    `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined
    here take precedence over the independent keyword arguments.

log : bool, default: False
    If *True*, set the y-axis to be log scale.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs : `.Rectangle` properties

%(Rectangle:kwdoc)s

See Also
--------
barh : Plot a horizontal bar plot.

Notes
-----
Stacked bars can be achieved by passing individual *bottom* values per
bar. See :doc:`/gallery/lines_bars_and_markers/bar_stacked`.

---
## barh
```python
from _axes import barh
```

Make a horizontal bar plot.

The bars are positioned at *y* with the given *align*\ment. Their
dimensions are given by *width* and *height*. The horizontal baseline
is *left* (default 0).

Many parameters can take either a single value applying to all bars
or a sequence of values, one for each bar.

Parameters
----------
y : float or array-like
    The y coordinates of the bars. See also *align* for the
    alignment of the bars to the coordinates.

width : float or array-like
    The width(s) of the bars.

    Note that if *left* has units (e.g. datetime), *width* should be in
    units that are a difference from the value of *left* (e.g. timedelta).

height : float or array-like, default: 0.8
    The heights of the bars.

    Note that if *y* has units (e.g. datetime), then *height* should be in
    units that are a difference (e.g. timedelta) around the *y* values.

left : float or array-like, default: 0
    The x coordinates of the left side(s) of the bars.

    Note that if *left* has units, then the x-axis will get a Locator and
    Formatter appropriate for the units (e.g. dates, or categorical).

align : {'center', 'edge'}, default: 'center'
    Alignment of the base to the *y* coordinates*:

    - 'center': Center the bars on the *y* positions.
    - 'edge': Align the bottom edges of the bars with the *y*
      positions.

    To align the bars on the top edge pass a negative *height* and
    ``align='edge'``.

Returns
-------
`.BarContainer`
    Container with all the bars and optionally errorbars.

Other Parameters
----------------
color : :mpltype:`color` or list of :mpltype:`color`, optional
    The colors of the bar faces.

edgecolor : :mpltype:`color` or list of :mpltype:`color`, optional
    The colors of the bar edges.

linewidth : float or array-like, optional
    Width of the bar edge(s). If 0, don't draw edges.

tick_label : str or list of str, optional
    The tick labels of the bars.
    Default: None (Use default numeric labels.)

label : str or list of str, optional
    A single label is attached to the resulting `.BarContainer` as a
    label for the whole dataset.
    If a list is provided, it must be the same length as *y* and
    labels the individual bars. Repeated labels are not de-duplicated
    and will cause repeated label entries, so this is best used when
    bars also differ in style (e.g., by passing a list to *color*.)

xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional
    If not *None*, add horizontal / vertical errorbars to the bar tips.
    The values are +/- sizes relative to the data:

    - scalar: symmetric +/- values for all bars
    - shape(N,): symmetric +/- values for each bar
    - shape(2, N): Separate - and + values for each bar. First row
      contains the lower errors, the second row contains the upper
      errors.
    - *None*: No errorbar. (default)

    See :doc:`/gallery/statistics/errorbar_features` for an example on
    the usage of *xerr* and *yerr*.

ecolor : :mpltype:`color` or list of :mpltype:`color`, default: 'black'
    The line color of the errorbars.

capsize : float, default: :rc:`errorbar.capsize`
   The length of the error bar caps in points.

error_kw : dict, optional
    Dictionary of keyword arguments to be passed to the
    `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined
    here take precedence over the independent keyword arguments.

log : bool, default: False
    If ``True``, set the x-axis to be log scale.

data : indexable object, optional
    If given, all parameters also accept a string ``s``, which is
    interpreted as ``data[s]`` (unless this raises an exception).

**kwargs : `.Rectangle` properties

%(Rectangle:kwdoc)s

See Also
--------
bar : Plot a vertical bar plot.

Notes
-----
Stacked bars can be achieved by passing individual *left* values per
bar. See
:doc:`/gallery/lines_bars_and_markers/horizontal_barchart_distribution`.

---
## bar_label
```python
from _axes import bar_label
```

Label a bar plot.

Adds labels to bars in the given `.BarContainer`.
You may need to adjust the axis limits to fit the labels.

Parameters
----------
container : `.BarContainer`
    Container with all the bars and optionally errorbars, likely
    returned from `.bar` or `.barh`.

labels : array-like, optional
    A list of label texts, that should be displayed. If not given, the
    label texts will be the data values formatted with *fmt*.

fmt : str or callable, default: '%g'
    An unnamed %-style or {}-style format string for the label or a
    function to call with the value as the first argument.
    When *fmt* is a string and can be interpreted in both formats,
    %-style takes precedence over {}-style.

    .. versionadded:: 3.7
       Support for {}-style format string and callables.

label_type : {'edge', 'center'}, default: 'edge'
    The label type. Possible values:

    - 'edge': label placed at the end-point of the bar segment, and the
      value displayed will be the position of that end-point.
    - 'center': label placed in the center of the bar segment, and the
      value displayed will be the length of that segment.
      (useful for stacked bars, i.e.,
      :doc:`/gallery/lines_bars_and_markers/bar_label_demo`)

padding : float, default: 0
    Distance of label from the end of the bar, in points.

**kwargs
    Any remaining keyword arguments are passed through to
    `.Axes.annotate`. The alignment parameters (
    *horizontalalignment* / *ha*, *verticalalignment* / *va*) are
    not supported because the labels are automatically aligned to
    the bars.

Returns
-------
list of `.Annotation`
    A list of `.Annotation` instances for the labels.

---
## broken_barh
```python
from _axes import broken_barh
```

Plot a horizontal sequence of rectangles.

A rectangle is drawn for each element of *xranges*. All rectangles
have the same vertical position and size defined by *yrange*.

Parameters
----------
xranges : sequence of tuples (*xmin*, *xwidth*)
    The x-positions and extents of the rectangles. For each tuple
    (*xmin*, *xwidth*) a rectangle is drawn from *xmin* to *xmin* +
    *xwidth*.
yrange : (*ymin*, *yheight*)
    The y-position and extent for all the rectangles.

Returns
-------
`~.collections.PolyCollection`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs : `.PolyCollection` properties

    Each *kwarg* can be either a single argument applying to all
    rectangles, e.g.::

        facecolors='black'

    or a sequence of arguments over which is cycled, e.g.::

        facecolors=('black', 'blue')

    would create interleaving black and blue rectangles.

    Supported keywords:

    %(PolyCollection:kwdoc)s

---
## stem
```python
from _axes import stem
```

Create a stem plot.

A stem plot draws lines perpendicular to a baseline at each location
*locs* from the baseline to *heads*, and places a marker there. For
vertical stem plots (the default), the *locs* are *x* positions, and
the *heads* are *y* values. For horizontal stem plots, the *locs* are
*y* positions, and the *heads* are *x* values.

Call signature::

  stem([locs,] heads, linefmt=None, markerfmt=None, basefmt=None)

The *locs*-positions are optional. *linefmt* may be provided as
positional, but all other formats must be provided as keyword
arguments.

Parameters
----------
locs : array-like, default: (0, 1, ..., len(heads) - 1)
    For vertical stem plots, the x-positions of the stems.
    For horizontal stem plots, the y-positions of the stems.

heads : array-like
    For vertical stem plots, the y-values of the stem heads.
    For horizontal stem plots, the x-values of the stem heads.

linefmt : str, optional
    A string defining the color and/or linestyle of the vertical lines:

    =========  =============
    Character  Line Style
    =========  =============
    ``'-'``    solid line
    ``'--'``   dashed line
    ``'-.'``   dash-dot line
    ``':'``    dotted line
    =========  =============

    Default: 'C0-', i.e. solid line with the first color of the color
    cycle.

    Note: Markers specified through this parameter (e.g. 'x') will be
    silently ignored. Instead, markers should be specified using
    *markerfmt*.

markerfmt : str, optional
    A string defining the color and/or shape of the markers at the stem
    heads. If the marker is not given, use the marker 'o', i.e. filled
    circles. If the color is not given, use the color from *linefmt*.

basefmt : str, default: 'C3-' ('C2-' in classic mode)
    A format string defining the properties of the baseline.

orientation : {'vertical', 'horizontal'}, default: 'vertical'
    The orientation of the stems.

bottom : float, default: 0
    The y/x-position of the baseline (depending on *orientation*).

label : str, optional
    The label to use for the stems in legends.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

Returns
-------
`.StemContainer`
    The container may be treated like a tuple
    (*markerline*, *stemlines*, *baseline*)

Notes
-----
.. seealso::
    The MATLAB function
    `stem <https://www.mathworks.com/help/matlab/ref/stem.html>`_
    which inspired this method.

---
## pie
```python
from _axes import pie
```

Plot a pie chart.

Make a pie chart of array *x*.  The fractional area of each wedge is
given by ``x/sum(x)``.

The wedges are plotted counterclockwise, by default starting from the
x-axis.

Parameters
----------
x : 1D array-like
    The wedge sizes.

explode : array-like, default: None
    If not *None*, is a ``len(x)`` array which specifies the fraction
    of the radius with which to offset each wedge.

labels : list, default: None
    A sequence of strings providing the labels for each wedge

colors : :mpltype:`color` or list of :mpltype:`color`, default: None
    A sequence of colors through which the pie chart will cycle.  If
    *None*, will use the colors in the currently active cycle.

hatch : str or list, default: None
    Hatching pattern applied to all pie wedges or sequence of patterns
    through which the chart will cycle. For a list of valid patterns,
    see :doc:`/gallery/shapes_and_collections/hatch_style_reference`.

    .. versionadded:: 3.7

autopct : None or str or callable, default: None
    If not *None*, *autopct* is a string or function used to label the
    wedges with their numeric value. The label will be placed inside
    the wedge. If *autopct* is a format string, the label will be
    ``fmt % pct``. If *autopct* is a function, then it will be called.

pctdistance : float, default: 0.6
    The relative distance along the radius at which the text
    generated by *autopct* is drawn. To draw the text outside the pie,
    set *pctdistance* > 1. This parameter is ignored if *autopct* is
    ``None``.

labeldistance : float or None, default: 1.1
    The relative distance along the radius at which the labels are
    drawn. To draw the labels inside the pie, set  *labeldistance* < 1.
    If set to ``None``, labels are not drawn but are still stored for
    use in `.legend`.

shadow : bool or dict, default: False
    If bool, whether to draw a shadow beneath the pie. If dict, draw a shadow
    passing the properties in the dict to `.Shadow`.

    .. versionadded:: 3.8
        *shadow* can be a dict.

startangle : float, default: 0 degrees
    The angle by which the start of the pie is rotated,
    counterclockwise from the x-axis.

radius : float, default: 1
    The radius of the pie.

counterclock : bool, default: True
    Specify fractions direction, clockwise or counterclockwise.

wedgeprops : dict, default: None
    Dict of arguments passed to each `.patches.Wedge` of the pie.
    For example, ``wedgeprops = {'linewidth': 3}`` sets the width of
    the wedge border lines equal to 3. By default, ``clip_on=False``.
    When there is a conflict between these properties and other
    keywords, properties passed to *wedgeprops* take precedence.

textprops : dict, default: None
    Dict of arguments to pass to the text objects.

center : (float, float), default: (0, 0)
    The coordinates of the center of the chart.

frame : bool, default: False
    Plot Axes frame with the chart if true.

rotatelabels : bool, default: False
    Rotate each label to the angle of the corresponding slice if true.

normalize : bool, default: True
    When *True*, always make a full pie by normalizing x so that
    ``sum(x) == 1``. *False* makes a partial pie if ``sum(x) <= 1``
    and raises a `ValueError` for ``sum(x) > 1``.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

Returns
-------
patches : list
    A sequence of `matplotlib.patches.Wedge` instances

texts : list
    A list of the label `.Text` instances.

autotexts : list
    A list of `.Text` instances for the numeric labels. This will only
    be returned if the parameter *autopct* is not *None*.

Notes
-----
The pie chart will probably look best if the figure and Axes are
square, or the Axes aspect is equal.
This method sets the aspect ratio of the axis to "equal".
The Axes aspect ratio can be controlled with `.Axes.set_aspect`.

---
## _errorevery_to_mask
```python
from _axes import _errorevery_to_mask
```

Normalize `errorbar`'s *errorevery* to be a boolean mask for data *x*.

This function is split out to be usable both by 2D and 3D errorbars.

---
## errorbar
```python
from _axes import errorbar
```

Plot y versus x as lines and/or markers with attached errorbars.

*x*, *y* define the data locations, *xerr*, *yerr* define the errorbar
sizes. By default, this draws the data markers/lines as well as the
errorbars. Use fmt='none' to draw errorbars without any data markers.

.. versionadded:: 3.7
   Caps and error lines are drawn in polar coordinates on polar plots.


Parameters
----------
x, y : float or array-like
    The data positions.

xerr, yerr : float or array-like, shape(N,) or shape(2, N), optional
    The errorbar sizes:

    - scalar: Symmetric +/- values for all data points.
    - shape(N,): Symmetric +/-values for each data point.
    - shape(2, N): Separate - and + values for each bar. First row
      contains the lower errors, the second row contains the upper
      errors.
    - *None*: No errorbar.

    All values must be >= 0.

    See :doc:`/gallery/statistics/errorbar_features`
    for an example on the usage of ``xerr`` and ``yerr``.

fmt : str, default: ''
    The format for the data points / data lines. See `.plot` for
    details.

    Use 'none' (case-insensitive) to plot errorbars without any data
    markers.

ecolor : :mpltype:`color`, default: None
    The color of the errorbar lines.  If None, use the color of the
    line connecting the markers.

elinewidth : float, default: None
    The linewidth of the errorbar lines. If None, the linewidth of
    the current style is used.

capsize : float, default: :rc:`errorbar.capsize`
    The length of the error bar caps in points.

capthick : float, default: None
    An alias to the keyword argument *markeredgewidth* (a.k.a. *mew*).
    This setting is a more sensible name for the property that
    controls the thickness of the error bar cap in points. For
    backwards compatibility, if *mew* or *markeredgewidth* are given,
    then they will over-ride *capthick*. This may change in future
    releases.

barsabove : bool, default: False
    If True, will plot the errorbars above the plot
    symbols. Default is below.

lolims, uplims, xlolims, xuplims : bool or array-like, default: False
    These arguments can be used to indicate that a value gives only
    upper/lower limits.  In that case a caret symbol is used to
    indicate this. *lims*-arguments may be scalars, or array-likes of
    the same length as *xerr* and *yerr*.  To use limits with inverted
    axes, `~.Axes.set_xlim` or `~.Axes.set_ylim` must be called before
    :meth:`errorbar`.  Note the tricky parameter names: setting e.g.
    *lolims* to True means that the y-value is a *lower* limit of the
    True value, so, only an *upward*-pointing arrow will be drawn!

errorevery : int or (int, int), default: 1
    draws error bars on a subset of the data. *errorevery* =N draws
    error bars on the points (x[::N], y[::N]).
    *errorevery* =(start, N) draws error bars on the points
    (x[start::N], y[start::N]). e.g. errorevery=(6, 3)
    adds error bars to the data at (x[6], x[9], x[12], x[15], ...).
    Used to avoid overlapping error bars when two series share x-axis
    values.

Returns
-------
`.ErrorbarContainer`
    The container contains:

    - data_line : A `~matplotlib.lines.Line2D` instance of x, y plot markers
      and/or line.
    - caplines : A tuple of `~matplotlib.lines.Line2D` instances of the error
      bar caps.
    - barlinecols : A tuple of `.LineCollection` with the horizontal and
      vertical error ranges.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    All other keyword arguments are passed on to the `~.Axes.plot` call
    drawing the markers. For example, this code makes big red squares
    with thick green edges::

        x, y, yerr = rand(3, 10)
        errorbar(x, y, yerr, marker='s', mfc='red',
                 mec='green', ms=20, mew=4)

    where *mfc*, *mec*, *ms* and *mew* are aliases for the longer
    property names, *markerfacecolor*, *markeredgecolor*, *markersize*
    and *markeredgewidth*.

    Valid kwargs for the marker properties are:

    - *dashes*
    - *dash_capstyle*
    - *dash_joinstyle*
    - *drawstyle*
    - *fillstyle*
    - *linestyle*
    - *marker*
    - *markeredgecolor*
    - *markeredgewidth*
    - *markerfacecolor*
    - *markerfacecoloralt*
    - *markersize*
    - *markevery*
    - *solid_capstyle*
    - *solid_joinstyle*

    Refer to the corresponding `.Line2D` property for more details:

    %(Line2D:kwdoc)s

---
## boxplot
```python
from _axes import boxplot
```

Draw a box and whisker plot.

The box extends from the first quartile (Q1) to the third
quartile (Q3) of the data, with a line at the median.
The whiskers extend from the box to the farthest data point
lying within 1.5x the inter-quartile range (IQR) from the box.
Flier points are those past the end of the whiskers.
See https://en.wikipedia.org/wiki/Box_plot for reference.

.. code-block:: none

          Q1-1.5IQR   Q1   median  Q3   Q3+1.5IQR
                       |-----:-----|
       o      |--------|     :     |--------|    o  o
                       |-----:-----|
     flier             <----------->            fliers
                            IQR


Parameters
----------
x : Array or a sequence of vectors.
    The input data.  If a 2D array, a boxplot is drawn for each column
    in *x*.  If a sequence of 1D arrays, a boxplot is drawn for each
    array in *x*.

notch : bool, default: :rc:`boxplot.notch`
    Whether to draw a notched boxplot (`True`), or a rectangular
    boxplot (`False`).  The notches represent the confidence interval
    (CI) around the median.  The documentation for *bootstrap*
    describes how the locations of the notches are computed by
    default, but their locations may also be overridden by setting the
    *conf_intervals* parameter.

    .. note::

        In cases where the values of the CI are less than the
        lower quartile or greater than the upper quartile, the
        notches will extend beyond the box, giving it a
        distinctive "flipped" appearance. This is expected
        behavior and consistent with other statistical
        visualization packages.

sym : str, optional
    The default symbol for flier points.  An empty string ('') hides
    the fliers.  If `None`, then the fliers default to 'b+'.  More
    control is provided by the *flierprops* parameter.

vert : bool, default: :rc:`boxplot.vertical`
    If `True`, draws vertical boxes.
    If `False`, draw horizontal boxes.

whis : float or (float, float), default: 1.5
    The position of the whiskers.

    If a float, the lower whisker is at the lowest datum above
    ``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum
    below ``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and
    third quartiles.  The default value of ``whis = 1.5`` corresponds
    to Tukey's original definition of boxplots.

    If a pair of floats, they indicate the percentiles at which to
    draw the whiskers (e.g., (5, 95)).  In particular, setting this to
    (0, 100) results in whiskers covering the whole range of the data.

    In the edge case where ``Q1 == Q3``, *whis* is automatically set
    to (0, 100) (cover the whole range of the data) if *autorange* is
    True.

    Beyond the whiskers, data are considered outliers and are plotted
    as individual points.

bootstrap : int, optional
    Specifies whether to bootstrap the confidence intervals
    around the median for notched boxplots. If *bootstrap* is
    None, no bootstrapping is performed, and notches are
    calculated using a Gaussian-based asymptotic approximation
    (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and
    Kendall and Stuart, 1967). Otherwise, bootstrap specifies
    the number of times to bootstrap the median to determine its
    95% confidence intervals. Values between 1000 and 10000 are
    recommended.

usermedians : 1D array-like, optional
    A 1D array-like of length ``len(x)``.  Each entry that is not
    `None` forces the value of the median for the corresponding
    dataset.  For entries that are `None`, the medians are computed
    by Matplotlib as normal.

conf_intervals : array-like, optional
    A 2D array-like of shape ``(len(x), 2)``.  Each entry that is not
    None forces the location of the corresponding notch (which is
    only drawn if *notch* is `True`).  For entries that are `None`,
    the notches are computed by the method specified by the other
    parameters (e.g., *bootstrap*).

positions : array-like, optional
    The positions of the boxes. The ticks and limits are
    automatically set to match the positions. Defaults to
    ``range(1, N+1)`` where N is the number of boxes to be drawn.

widths : float or array-like
    The widths of the boxes.  The default is 0.5, or ``0.15*(distance
    between extreme positions)``, if that is smaller.

patch_artist : bool, default: :rc:`boxplot.patchartist`
    If `False` produces boxes with the Line2D artist. Otherwise,
    boxes are drawn with Patch artists.

tick_labels : list of str, optional
    The tick labels of each boxplot.
    Ticks are always placed at the box *positions*. If *tick_labels* is given,
    the ticks are labelled accordingly. Otherwise, they keep their numeric
    values.

    .. versionchanged:: 3.9
        Renamed from *labels*, which is deprecated since 3.9
        and will be removed in 3.11.

manage_ticks : bool, default: True
    If True, the tick locations and labels will be adjusted to match
    the boxplot positions.

autorange : bool, default: False
    When `True` and the data are distributed such that the 25th and
    75th percentiles are equal, *whis* is set to (0, 100) such
    that the whisker ends are at the minimum and maximum of the data.

meanline : bool, default: :rc:`boxplot.meanline`
    If `True` (and *showmeans* is `True`), will try to render the
    mean as a line spanning the full width of the box according to
    *meanprops* (see below).  Not recommended if *shownotches* is also
    True.  Otherwise, means will be shown as points.

zorder : float, default: ``Line2D.zorder = 2``
    The zorder of the boxplot.

Returns
-------
dict
  A dictionary mapping each component of the boxplot to a list
  of the `.Line2D` instances created. That dictionary has the
  following keys (assuming vertical boxplots):

  - ``boxes``: the main body of the boxplot showing the
    quartiles and the median's confidence intervals if
    enabled.

  - ``medians``: horizontal lines at the median of each box.

  - ``whiskers``: the vertical lines extending to the most
    extreme, non-outlier data points.

  - ``caps``: the horizontal lines at the ends of the
    whiskers.

  - ``fliers``: points representing data that extend beyond
    the whiskers (fliers).

  - ``means``: points or lines representing the means.

Other Parameters
----------------
showcaps : bool, default: :rc:`boxplot.showcaps`
    Show the caps on the ends of whiskers.
showbox : bool, default: :rc:`boxplot.showbox`
    Show the central box.
showfliers : bool, default: :rc:`boxplot.showfliers`
    Show the outliers beyond the caps.
showmeans : bool, default: :rc:`boxplot.showmeans`
    Show the arithmetic means.
capprops : dict, default: None
    The style of the caps.
capwidths : float or array, default: None
    The widths of the caps.
boxprops : dict, default: None
    The style of the box.
whiskerprops : dict, default: None
    The style of the whiskers.
flierprops : dict, default: None
    The style of the fliers.
medianprops : dict, default: None
    The style of the median.
meanprops : dict, default: None
    The style of the mean.
label : str or list of str, optional
    Legend labels. Use a single string when all boxes have the same style and
    you only want a single legend entry for them. Use a list of strings to
    label all boxes individually. To be distinguishable, the boxes should be
    styled individually, which is currently only possible by modifying the
    returned artists, see e.g. :doc:`/gallery/statistics/boxplot_demo`.

    In the case of a single string, the legend entry will technically be
    associated with the first box only. By default, the legend will show the
    median line (``result["medians"]``); if *patch_artist* is True, the legend
    will show the box `.Patch` artists (``result["boxes"]``) instead.

    .. versionadded:: 3.9

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

See Also
--------
.Axes.bxp : Draw a boxplot from pre-computed statistics.
violinplot : Draw an estimate of the probability density function.

---
## bxp
```python
from _axes import bxp
```

Draw a box and whisker plot from pre-computed statistics.

The box extends from the first quartile *q1* to the third
quartile *q3* of the data, with a line at the median (*med*).
The whiskers extend from *whislow* to *whishi*.
Flier points are markers past the end of the whiskers.
See https://en.wikipedia.org/wiki/Box_plot for reference.

.. code-block:: none

           whislow    q1    med    q3    whishi
                       |-----:-----|
       o      |--------|     :     |--------|    o  o
                       |-----:-----|
     flier                                      fliers

.. note::
    This is a low-level drawing function for when you already
    have the statistical parameters. If you want a boxplot based
    on a dataset, use `~.Axes.boxplot` instead.

Parameters
----------
bxpstats : list of dicts
  A list of dictionaries containing stats for each boxplot.
  Required keys are:

  - ``med``: Median (scalar).
  - ``q1``, ``q3``: First & third quartiles (scalars).
  - ``whislo``, ``whishi``: Lower & upper whisker positions (scalars).

  Optional keys are:

  - ``mean``: Mean (scalar).  Needed if ``showmeans=True``.
  - ``fliers``: Data beyond the whiskers (array-like).
    Needed if ``showfliers=True``.
  - ``cilo``, ``cihi``: Lower & upper confidence intervals
    about the median. Needed if ``shownotches=True``.
  - ``label``: Name of the dataset (str).  If available,
    this will be used a tick label for the boxplot

positions : array-like, default: [1, 2, ..., n]
  The positions of the boxes. The ticks and limits
  are automatically set to match the positions.

widths : float or array-like, default: None
  The widths of the boxes.  The default is
  ``clip(0.15*(distance between extreme positions), 0.15, 0.5)``.

capwidths : float or array-like, default: None
  Either a scalar or a vector and sets the width of each cap.
  The default is ``0.5*(width of the box)``, see *widths*.

vert : bool, default: True
  If `True` (default), makes the boxes vertical.
  If `False`, makes horizontal boxes.

patch_artist : bool, default: False
  If `False` produces boxes with the `.Line2D` artist.
  If `True` produces boxes with the `~matplotlib.patches.Patch` artist.

shownotches, showmeans, showcaps, showbox, showfliers : bool
  Whether to draw the CI notches, the mean value (both default to
  False), the caps, the box, and the fliers (all three default to
  True).

boxprops, whiskerprops, capprops, flierprops, medianprops, meanprops : dict, optional
  Artist properties for the boxes, whiskers, caps, fliers, medians, and
  means.

meanline : bool, default: False
  If `True` (and *showmeans* is `True`), will try to render the mean
  as a line spanning the full width of the box according to
  *meanprops*. Not recommended if *shownotches* is also True.
  Otherwise, means will be shown as points.

manage_ticks : bool, default: True
  If True, the tick locations and labels will be adjusted to match the
  boxplot positions.

label : str or list of str, optional
    Legend labels. Use a single string when all boxes have the same style and
    you only want a single legend entry for them. Use a list of strings to
    label all boxes individually. To be distinguishable, the boxes should be
    styled individually, which is currently only possible by modifying the
    returned artists, see e.g. :doc:`/gallery/statistics/boxplot_demo`.

    In the case of a single string, the legend entry will technically be
    associated with the first box only. By default, the legend will show the
    median line (``result["medians"]``); if *patch_artist* is True, the legend
    will show the box `.Patch` artists (``result["boxes"]``) instead.

    .. versionadded:: 3.9

zorder : float, default: ``Line2D.zorder = 2``
  The zorder of the resulting boxplot.

Returns
-------
dict
  A dictionary mapping each component of the boxplot to a list
  of the `.Line2D` instances created. That dictionary has the
  following keys (assuming vertical boxplots):

  - ``boxes``: main bodies of the boxplot showing the quartiles, and
    the median's confidence intervals if enabled.
  - ``medians``: horizontal lines at the median of each box.
  - ``whiskers``: vertical lines up to the last non-outlier data.
  - ``caps``: horizontal lines at the ends of the whiskers.
  - ``fliers``: points representing data beyond the whiskers (fliers).
  - ``means``: points or lines representing the means.

See Also
--------
boxplot : Draw a boxplot from data instead of pre-computed statistics.

---
## _parse_scatter_color_args
```python
from _axes import _parse_scatter_color_args
```

Helper function to process color related arguments of `.Axes.scatter`.

Argument precedence for facecolors:

- c (if not None)
- kwargs['facecolor']
- kwargs['facecolors']
- kwargs['color'] (==kwcolor)
- 'b' if in classic mode else the result of ``get_next_color_func()``

Argument precedence for edgecolors:

- kwargs['edgecolor']
- edgecolors (is an explicit kw argument in scatter())
- kwargs['color'] (==kwcolor)
- 'face' if not in classic mode else None

Parameters
----------
c : :mpltype:`color` or array-like or list of :mpltype:`color` or None
    See argument description of `.Axes.scatter`.
edgecolors : :mpltype:`color` or sequence of color or {'face', 'none'} or None
    See argument description of `.Axes.scatter`.
kwargs : dict
    Additional kwargs. If these keys exist, we pop and process them:
    'facecolors', 'facecolor', 'edgecolor', 'color'
    Note: The dict is modified by this function.
xsize : int
    The size of the x and y arrays passed to `.Axes.scatter`.
get_next_color_func : callable
    A callable that returns a color. This color is used as facecolor
    if no other color is provided.

    Note, that this is a function rather than a fixed color value to
    support conditional evaluation of the next color.  As of the
    current implementation obtaining the next color from the
    property cycle advances the cycle. This must only happen if we
    actually use the color, which will only be decided within this
    method.

Returns
-------
c
    The input *c* if it was not *None*, else a color derived from the
    other inputs or defaults.
colors : array(N, 4) or None
    The facecolors as RGBA values, or *None* if a colormap is used.
edgecolors
    The edgecolor.

---
## scatter
```python
from _axes import scatter
```

A scatter plot of *y* vs. *x* with varying marker size and/or color.

Parameters
----------
x, y : float or array-like, shape (n, )
    The data positions.

s : float or array-like, shape (n, ), optional
    The marker size in points**2 (typographic points are 1/72 in.).
    Default is ``rcParams['lines.markersize'] ** 2``.

    The linewidth and edgecolor can visually interact with the marker
    size, and can lead to artifacts if the marker size is smaller than
    the linewidth.

    If the linewidth is greater than 0 and the edgecolor is anything
    but *'none'*, then the effective size of the marker will be
    increased by half the linewidth because the stroke will be centered
    on the edge of the shape.

    To eliminate the marker edge either set *linewidth=0* or
    *edgecolor='none'*.

c : array-like or list of :mpltype:`color` or :mpltype:`color`, optional
    The marker colors. Possible values:

    - A scalar or sequence of n numbers to be mapped to colors using
      *cmap* and *norm*.
    - A 2D array in which the rows are RGB or RGBA.
    - A sequence of colors of length n.
    - A single color format string.

    Note that *c* should not be a single numeric RGB or RGBA sequence
    because that is indistinguishable from an array of values to be
    colormapped. If you want to specify the same RGB or RGBA value for
    all points, use a 2D array with a single row.  Otherwise,
    value-matching will have precedence in case of a size matching with
    *x* and *y*.

    If you wish to specify a single color for all points
    prefer the *color* keyword argument.

    Defaults to `None`. In that case the marker color is determined
    by the value of *color*, *facecolor* or *facecolors*. In case
    those are not specified or `None`, the marker color is determined
    by the next color of the ``Axes``' current "shape and fill" color
    cycle. This cycle defaults to :rc:`axes.prop_cycle`.

marker : `~.markers.MarkerStyle`, default: :rc:`scatter.marker`
    The marker style. *marker* can be either an instance of the class
    or the text shorthand for a particular marker.
    See :mod:`matplotlib.markers` for more information about marker
    styles.

%(cmap_doc)s

    This parameter is ignored if *c* is RGB(A).

%(norm_doc)s

    This parameter is ignored if *c* is RGB(A).

%(vmin_vmax_doc)s

    This parameter is ignored if *c* is RGB(A).

alpha : float, default: None
    The alpha blending value, between 0 (transparent) and 1 (opaque).

linewidths : float or array-like, default: :rc:`lines.linewidth`
    The linewidth of the marker edges. Note: The default *edgecolors*
    is 'face'. You may want to change this as well.

edgecolors : {'face', 'none', *None*} or :mpltype:`color` or list of :mpltype:`color`, default: :rc:`scatter.edgecolors`
    The edge color of the marker. Possible values:

    - 'face': The edge color will always be the same as the face color.
    - 'none': No patch boundary will be drawn.
    - A color or sequence of colors.

    For non-filled markers, *edgecolors* is ignored. Instead, the color
    is determined like with 'face', i.e. from *c*, *colors*, or
    *facecolors*.

plotnonfinite : bool, default: False
    Whether to plot points with nonfinite *c* (i.e. ``inf``, ``-inf``
    or ``nan``). If ``True`` the points are drawn with the *bad*
    colormap color (see `.Colormap.set_bad`).

Returns
-------
`~matplotlib.collections.PathCollection`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
**kwargs : `~matplotlib.collections.Collection` properties

See Also
--------
plot : To plot scatter plots when markers are identical in size and
    color.

Notes
-----
* The `.plot` function will be faster for scatterplots where markers
  don't vary in size or color.

* Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which
  case all masks will be combined and only unmasked points will be
  plotted.

* Fundamentally, scatter works with 1D arrays; *x*, *y*, *s*, and *c*
  may be input as N-D arrays, but within scatter they will be
  flattened. The exception is *c*, which will be flattened only if its
  size matches the size of *x* and *y*.

---
## hexbin
```python
from _axes import hexbin
```

Make a 2D hexagonal binning plot of points *x*, *y*.

If *C* is *None*, the value of the hexagon is determined by the number
of points in the hexagon. Otherwise, *C* specifies values at the
coordinate (x[i], y[i]). For each hexagon, these values are reduced
using *reduce_C_function*.

Parameters
----------
x, y : array-like
    The data positions. *x* and *y* must be of the same length.

C : array-like, optional
    If given, these values are accumulated in the bins. Otherwise,
    every point has a value of 1. Must be of the same length as *x*
    and *y*.

gridsize : int or (int, int), default: 100
    If a single int, the number of hexagons in the *x*-direction.
    The number of hexagons in the *y*-direction is chosen such that
    the hexagons are approximately regular.

    Alternatively, if a tuple (*nx*, *ny*), the number of hexagons
    in the *x*-direction and the *y*-direction. In the
    *y*-direction, counting is done along vertically aligned
    hexagons, not along the zig-zag chains of hexagons; see the
    following illustration.

    .. plot::

       import numpy
       import matplotlib.pyplot as plt

       np.random.seed(19680801)
       n= 300
       x = np.random.standard_normal(n)
       y = np.random.standard_normal(n)

       fig, ax = plt.subplots(figsize=(4, 4))
       h = ax.hexbin(x, y, gridsize=(5, 3))
       hx, hy = h.get_offsets().T
       ax.plot(hx[24::3], hy[24::3], 'ro-')
       ax.plot(hx[-3:], hy[-3:], 'ro-')
       ax.set_title('gridsize=(5, 3)')
       ax.axis('off')

    To get approximately regular hexagons, choose
    :math:`n_x = \sqrt{3}\,n_y`.

bins : 'log' or int or sequence, default: None
    Discretization of the hexagon values.

    - If *None*, no binning is applied; the color of each hexagon
      directly corresponds to its count value.
    - If 'log', use a logarithmic scale for the colormap.
      Internally, :math:`log_{10}(i+1)` is used to determine the
      hexagon color. This is equivalent to ``norm=LogNorm()``.
    - If an integer, divide the counts in the specified number
      of bins, and color the hexagons accordingly.
    - If a sequence of values, the values of the lower bound of
      the bins to be used.

xscale : {'linear', 'log'}, default: 'linear'
    Use a linear or log10 scale on the horizontal axis.

yscale : {'linear', 'log'}, default: 'linear'
    Use a linear or log10 scale on the vertical axis.

mincnt : int >= 0, default: *None*
    If not *None*, only display cells with at least *mincnt*
    number of points in the cell.

marginals : bool, default: *False*
    If marginals is *True*, plot the marginal density as
    colormapped rectangles along the bottom of the x-axis and
    left of the y-axis.

extent : 4-tuple of float, default: *None*
    The limits of the bins (xmin, xmax, ymin, ymax).
    The default assigns the limits based on
    *gridsize*, *x*, *y*, *xscale* and *yscale*.

    If *xscale* or *yscale* is set to 'log', the limits are
    expected to be the exponent for a power of 10. E.g. for
    x-limits of 1 and 50 in 'linear' scale and y-limits
    of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3).

Returns
-------
`~matplotlib.collections.PolyCollection`
    A `.PolyCollection` defining the hexagonal bins.

    - `.PolyCollection.get_offsets` contains a Mx2 array containing
      the x, y positions of the M hexagon centers.
    - `.PolyCollection.get_array` contains the values of the M
      hexagons.

    If *marginals* is *True*, horizontal
    bar and vertical bar (both PolyCollections) will be attached
    to the return collection as attributes *hbar* and *vbar*.

Other Parameters
----------------
%(cmap_doc)s

%(norm_doc)s

%(vmin_vmax_doc)s

alpha : float between 0 and 1, optional
    The alpha blending value, between 0 (transparent) and 1 (opaque).

linewidths : float, default: *None*
    If *None*, defaults to :rc:`patch.linewidth`.

edgecolors : {'face', 'none', *None*} or color, default: 'face'
    The color of the hexagon edges. Possible values are:

    - 'face': Draw the edges in the same color as the fill color.
    - 'none': No edges are drawn. This can sometimes lead to unsightly
      unpainted pixels between the hexagons.
    - *None*: Draw outlines in the default color.
    - An explicit color.

reduce_C_function : callable, default: `numpy.mean`
    The function to aggregate *C* within the bins. It is ignored if
    *C* is not given. This must have the signature::

        def reduce_C_function(C: array) -> float

    Commonly used functions are:

    - `numpy.mean`: average of the points
    - `numpy.sum`: integral of the point values
    - `numpy.amax`: value taken from the largest point

    By default will only reduce cells with at least 1 point because some
    reduction functions (such as `numpy.amax`) will error/warn with empty
    input. Changing *mincnt* will adjust the cutoff, and if set to 0 will
    pass empty input to the reduction function.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs : `~matplotlib.collections.PolyCollection` properties
    All other keyword arguments are passed on to `.PolyCollection`:

    %(PolyCollection:kwdoc)s

See Also
--------
hist2d : 2D histogram rectangular bins

---
## arrow
```python
from _axes import arrow
```

Add an arrow to the Axes.

This draws an arrow from ``(x, y)`` to ``(x+dx, y+dy)``.

Parameters
----------
%(FancyArrow)s

Returns
-------
`.FancyArrow`
    The created `.FancyArrow` object.

Notes
-----
The resulting arrow is affected by the Axes aspect ratio and limits.
This may produce an arrow whose head is not square with its stem. To
create an arrow whose head is square with its stem,
use :meth:`annotate` for example:

>>> ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
...             arrowprops=dict(arrowstyle="->"))

---
## quiverkey
```python
from _axes import quiverkey
```



---
## _quiver_units
```python
from _axes import _quiver_units
```



---
## quiver
```python
from _axes import quiver
```

%(quiver_doc)s

---
## barbs
```python
from _axes import barbs
```

%(barbs_doc)s

---
## fill
```python
from _axes import fill
```

Plot filled polygons.

Parameters
----------
*args : sequence of x, y, [color]
    Each polygon is defined by the lists of *x* and *y* positions of
    its nodes, optionally followed by a *color* specifier. See
    :mod:`matplotlib.colors` for supported color specifiers. The
    standard color cycle is used for polygons without a color
    specifier.

    You can plot multiple polygons by providing multiple *x*, *y*,
    *[color]* groups.

    For example, each of the following is legal::

        ax.fill(x, y)                    # a polygon with default color
        ax.fill(x, y, "b")               # a blue polygon
        ax.fill(x, y, x2, y2)            # two polygons
        ax.fill(x, y, "b", x2, y2, "r")  # a blue and a red polygon

data : indexable object, optional
    An object with labelled data. If given, provide the label names to
    plot in *x* and *y*, e.g.::

        ax.fill("time", "signal",
                data={"time": [0, 1, 2], "signal": [0, 1, 0]})

Returns
-------
list of `~matplotlib.patches.Polygon`

Other Parameters
----------------
**kwargs : `~matplotlib.patches.Polygon` properties

Notes
-----
Use :meth:`fill_between` if you would like to fill the region between
two curves.

---
## _fill_between_x_or_y
```python
from _axes import _fill_between_x_or_y
```

Fill the area between two {dir} curves.

The curves are defined by the points (*{ind}*, *{dep}1*) and (*{ind}*,
*{dep}2*).  This creates one or multiple polygons describing the filled
area.

You may exclude some {dir} sections from filling using *where*.

By default, the edges connect the given points directly.  Use *step*
if the filling should be a step function, i.e. constant in between
*{ind}*.

Parameters
----------
{ind} : array (length N)
    The {ind} coordinates of the nodes defining the curves.

{dep}1 : array (length N) or scalar
    The {dep} coordinates of the nodes defining the first curve.

{dep}2 : array (length N) or scalar, default: 0
    The {dep} coordinates of the nodes defining the second curve.

where : array of bool (length N), optional
    Define *where* to exclude some {dir} regions from being filled.
    The filled regions are defined by the coordinates ``{ind}[where]``.
    More precisely, fill between ``{ind}[i]`` and ``{ind}[i+1]`` if
    ``where[i] and where[i+1]``.  Note that this definition implies
    that an isolated *True* value between two *False* values in *where*
    will not result in filling.  Both sides of the *True* position
    remain unfilled due to the adjacent *False* values.

interpolate : bool, default: False
    This option is only relevant if *where* is used and the two curves
    are crossing each other.

    Semantically, *where* is often used for *{dep}1* > *{dep}2* or
    similar.  By default, the nodes of the polygon defining the filled
    region will only be placed at the positions in the *{ind}* array.
    Such a polygon cannot describe the above semantics close to the
    intersection.  The {ind}-sections containing the intersection are
    simply clipped.

    Setting *interpolate* to *True* will calculate the actual
    intersection point and extend the filled region up to this point.

step : {{'pre', 'post', 'mid'}}, optional
    Define *step* if the filling should be a step function,
    i.e. constant in between *{ind}*.  The value determines where the
    step will occur:

    - 'pre': The y value is continued constantly to the left from
      every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
      value ``y[i]``.
    - 'post': The y value is continued constantly to the right from
      every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
      value ``y[i]``.
    - 'mid': Steps occur half-way between the *x* positions.

Returns
-------
`.PolyCollection`
    A `.PolyCollection` containing the plotted polygons.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    All other keyword arguments are passed on to `.PolyCollection`.
    They control the `.Polygon` properties:

    %(PolyCollection:kwdoc)s

See Also
--------
fill_between : Fill between two sets of y-values.
fill_betweenx : Fill between two sets of x-values.

---
## fill_between
```python
from _axes import fill_between
```



---
## fill_betweenx
```python
from _axes import fill_betweenx
```



---
## imshow
```python
from _axes import imshow
```

Display data as an image, i.e., on a 2D regular raster.

The input may either be actual RGB(A) data, or 2D scalar data, which
will be rendered as a pseudocolor image. For displaying a grayscale
image, set up the colormapping using the parameters
``cmap='gray', vmin=0, vmax=255``.

The number of pixels used to render an image is set by the Axes size
and the figure *dpi*. This can lead to aliasing artifacts when
the image is resampled, because the displayed image size will usually
not match the size of *X* (see
:doc:`/gallery/images_contours_and_fields/image_antialiasing`).
The resampling can be controlled via the *interpolation* parameter
and/or :rc:`image.interpolation`.

Parameters
----------
X : array-like or PIL image
    The image data. Supported array shapes are:

    - (M, N): an image with scalar data. The values are mapped to
      colors using normalization and a colormap. See parameters *norm*,
      *cmap*, *vmin*, *vmax*.
    - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
    - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
      i.e. including transparency.

    The first two dimensions (M, N) define the rows and columns of
    the image.

    Out-of-range RGB(A) values are clipped.

%(cmap_doc)s

    This parameter is ignored if *X* is RGB(A).

%(norm_doc)s

    This parameter is ignored if *X* is RGB(A).

%(vmin_vmax_doc)s

    This parameter is ignored if *X* is RGB(A).

aspect : {'equal', 'auto'} or float or None, default: None
    The aspect ratio of the Axes.  This parameter is particularly
    relevant for images since it determines whether data pixels are
    square.

    This parameter is a shortcut for explicitly calling
    `.Axes.set_aspect`. See there for further details.

    - 'equal': Ensures an aspect ratio of 1. Pixels will be square
      (unless pixel sizes are explicitly made non-square in data
      coordinates using *extent*).
    - 'auto': The Axes is kept fixed and the aspect is adjusted so
      that the data fit in the Axes. In general, this will result in
      non-square pixels.

    Normally, None (the default) means to use :rc:`image.aspect`.  However, if
    the image uses a transform that does not contain the axes data transform,
    then None means to not modify the axes aspect at all (in that case, directly
    call `.Axes.set_aspect` if desired).

interpolation : str, default: :rc:`image.interpolation`
    The interpolation method used.

    Supported values are 'none', 'antialiased', 'nearest', 'bilinear',
    'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite',
    'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell',
    'sinc', 'lanczos', 'blackman'.

    The data *X* is resampled to the pixel size of the image on the
    figure canvas, using the interpolation method to either up- or
    downsample the data.

    If *interpolation* is 'none', then for the ps, pdf, and svg
    backends no down- or upsampling occurs, and the image data is
    passed to the backend as a native image.  Note that different ps,
    pdf, and svg viewers may display these raw pixels differently. On
    other backends, 'none' is the same as 'nearest'.

    If *interpolation* is the default 'antialiased', then 'nearest'
    interpolation is used if the image is upsampled by more than a
    factor of three (i.e. the number of display pixels is at least
    three times the size of the data array).  If the upsampling rate is
    smaller than 3, or the image is downsampled, then 'hanning'
    interpolation is used to act as an anti-aliasing filter, unless the
    image happens to be upsampled by exactly a factor of two or one.

    See
    :doc:`/gallery/images_contours_and_fields/interpolation_methods`
    for an overview of the supported interpolation methods, and
    :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
    a discussion of image antialiasing.

    Some interpolation methods require an additional radius parameter,
    which can be set by *filterrad*. Additionally, the antigrain image
    resize filter is controlled by the parameter *filternorm*.

interpolation_stage : {'data', 'rgba'}, default: 'data'
    If 'data', interpolation
    is carried out on the data provided by the user.  If 'rgba', the
    interpolation is carried out after the colormapping has been
    applied (visual interpolation).

alpha : float or array-like, optional
    The alpha blending value, between 0 (transparent) and 1 (opaque).
    If *alpha* is an array, the alpha blending values are applied pixel
    by pixel, and *alpha* must have the same shape as *X*.

origin : {'upper', 'lower'}, default: :rc:`image.origin`
    Place the [0, 0] index of the array in the upper left or lower
    left corner of the Axes. The convention (the default) 'upper' is
    typically used for matrices and images.

    Note that the vertical axis points upward for 'lower'
    but downward for 'upper'.

    See the :ref:`imshow_extent` tutorial for
    examples and a more detailed description.

extent : floats (left, right, bottom, top), optional
    The bounding box in data coordinates that the image will fill.
    These values may be unitful and match the units of the Axes.
    The image is stretched individually along x and y to fill the box.

    The default extent is determined by the following conditions.
    Pixels have unit size in data coordinates. Their centers are on
    integer coordinates, and their center coordinates range from 0 to
    columns-1 horizontally and from 0 to rows-1 vertically.

    Note that the direction of the vertical axis and thus the default
    values for top and bottom depend on *origin*:

    - For ``origin == 'upper'`` the default is
      ``(-0.5, numcols-0.5, numrows-0.5, -0.5)``.
    - For ``origin == 'lower'`` the default is
      ``(-0.5, numcols-0.5, -0.5, numrows-0.5)``.

    See the :ref:`imshow_extent` tutorial for
    examples and a more detailed description.

filternorm : bool, default: True
    A parameter for the antigrain image resize filter (see the
    antigrain documentation).  If *filternorm* is set, the filter
    normalizes integer values and corrects the rounding errors. It
    doesn't do anything with the source floating point values, it
    corrects only integers according to the rule of 1.0 which means
    that any sum of pixel weights must be equal to 1.0.  So, the
    filter function must produce a graph of the proper shape.

filterrad : float > 0, default: 4.0
    The filter radius for filters that have a radius parameter, i.e.
    when interpolation is one of: 'sinc', 'lanczos' or 'blackman'.

resample : bool, default: :rc:`image.resample`
    When *True*, use a full resampling method.  When *False*, only
    resample when the output image is larger than the input image.

url : str, optional
    Set the url of the created `.AxesImage`. See `.Artist.set_url`.

Returns
-------
`~matplotlib.image.AxesImage`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs : `~matplotlib.artist.Artist` properties
    These parameters are passed on to the constructor of the
    `.AxesImage` artist.

See Also
--------
matshow : Plot a matrix or an array as an image.

Notes
-----
Unless *extent* is used, pixel centers will be located at integer
coordinates. In other words: the origin will coincide with the center
of pixel (0, 0).

There are two common representations for RGB images with an alpha
channel:

-   Straight (unassociated) alpha: R, G, and B channels represent the
    color of the pixel, disregarding its opacity.
-   Premultiplied (associated) alpha: R, G, and B channels represent
    the color of the pixel, adjusted for its opacity by multiplication.

`~matplotlib.pyplot.imshow` expects RGB images adopting the straight
(unassociated) alpha representation.

---
## _pcolorargs
```python
from _axes import _pcolorargs
```



---
## pcolor
```python
from _axes import pcolor
```

Create a pseudocolor plot with a non-regular rectangular grid.

Call signature::

    pcolor([X, Y,] C, **kwargs)

*X* and *Y* can be used to specify the corners of the quadrilaterals.

.. hint::

    ``pcolor()`` can be very slow for large arrays. In most
    cases you should use the similar but much faster
    `~.Axes.pcolormesh` instead. See
    :ref:`Differences between pcolor() and pcolormesh()
    <differences-pcolor-pcolormesh>` for a discussion of the
    differences.

Parameters
----------
C : 2D array-like
    The color-mapped values.  Color-mapping is controlled by *cmap*,
    *norm*, *vmin*, and *vmax*.

X, Y : array-like, optional
    The coordinates of the corners of quadrilaterals of a pcolormesh::

        (X[i+1, j], Y[i+1, j])       (X[i+1, j+1], Y[i+1, j+1])
                              ●╶───╴●
                              │     │
                              ●╶───╴●
            (X[i, j], Y[i, j])       (X[i, j+1], Y[i, j+1])

    Note that the column index corresponds to the x-coordinate, and
    the row index corresponds to y. For details, see the
    :ref:`Notes <axes-pcolormesh-grid-orientation>` section below.

    If ``shading='flat'`` the dimensions of *X* and *Y* should be one
    greater than those of *C*, and the quadrilateral is colored due
    to the value at ``C[i, j]``.  If *X*, *Y* and *C* have equal
    dimensions, a warning will be raised and the last row and column
    of *C* will be ignored.

    If ``shading='nearest'``, the dimensions of *X* and *Y* should be
    the same as those of *C* (if not, a ValueError will be raised). The
    color ``C[i, j]`` will be centered on ``(X[i, j], Y[i, j])``.

    If *X* and/or *Y* are 1-D arrays or column vectors they will be
    expanded as needed into the appropriate 2D arrays, making a
    rectangular grid.

shading : {'flat', 'nearest', 'auto'}, default: :rc:`pcolor.shading`
    The fill style for the quadrilateral. Possible values:

    - 'flat': A solid color is used for each quad. The color of the
      quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by
      ``C[i, j]``. The dimensions of *X* and *Y* should be
      one greater than those of *C*; if they are the same as *C*,
      then a deprecation warning is raised, and the last row
      and column of *C* are dropped.
    - 'nearest': Each grid point will have a color centered on it,
      extending halfway between the adjacent grid centers.  The
      dimensions of *X* and *Y* must be the same as *C*.
    - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one
      larger than *C*.  Choose 'nearest' if dimensions are the same.

    See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
    for more description.

%(cmap_doc)s

%(norm_doc)s

%(vmin_vmax_doc)s

edgecolors : {'none', None, 'face', color, color sequence}, optional
    The color of the edges. Defaults to 'none'. Possible values:

    - 'none' or '': No edge.
    - *None*: :rc:`patch.edgecolor` will be used. Note that currently
      :rc:`patch.force_edgecolor` has to be True for this to work.
    - 'face': Use the adjacent face color.
    - A color or sequence of colors will set the edge color.

    The singular form *edgecolor* works as an alias.

alpha : float, default: None
    The alpha blending value of the face color, between 0 (transparent)
    and 1 (opaque). Note: The edgecolor is currently not affected by
    this.

snap : bool, default: False
    Whether to snap the mesh to pixel boundaries.

Returns
-------
`matplotlib.collections.PolyQuadMesh`

Other Parameters
----------------
antialiaseds : bool, default: False
    The default *antialiaseds* is False if the default
    *edgecolors*\ ="none" is used.  This eliminates artificial lines
    at patch boundaries, and works regardless of the value of alpha.
    If *edgecolors* is not "none", then the default *antialiaseds*
    is taken from :rc:`patch.antialiased`.
    Stroking the edges may be preferred if *alpha* is 1, but will
    cause artifacts otherwise.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additionally, the following arguments are allowed. They are passed
    along to the `~matplotlib.collections.PolyQuadMesh` constructor:

%(PolyCollection:kwdoc)s

See Also
--------
pcolormesh : for an explanation of the differences between
    pcolor and pcolormesh.
imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a
    faster alternative.

Notes
-----
**Masked arrays**

*X*, *Y* and *C* may be masked arrays. If either ``C[i, j]``, or one
of the vertices surrounding ``C[i, j]`` (*X* or *Y* at
``[i, j], [i+1, j], [i, j+1], [i+1, j+1]``) is masked, nothing is
plotted.

.. _axes-pcolor-grid-orientation:

**Grid orientation**

The grid orientation follows the standard matrix convention: An array
*C* with shape (nrows, ncolumns) is plotted with the column number as
*X* and the row number as *Y*.

---
## pcolormesh
```python
from _axes import pcolormesh
```

Create a pseudocolor plot with a non-regular rectangular grid.

Call signature::

    pcolormesh([X, Y,] C, **kwargs)

*X* and *Y* can be used to specify the corners of the quadrilaterals.

.. hint::

   `~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster
   and preferred in most cases. For a detailed discussion on the
   differences see :ref:`Differences between pcolor() and pcolormesh()
   <differences-pcolor-pcolormesh>`.

Parameters
----------
C : array-like
    The mesh data. Supported array shapes are:

    - (M, N) or M*N: a mesh with scalar data. The values are mapped to
      colors using normalization and a colormap. See parameters *norm*,
      *cmap*, *vmin*, *vmax*.
    - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
    - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
      i.e. including transparency.

    The first two dimensions (M, N) define the rows and columns of
    the mesh data.

X, Y : array-like, optional
    The coordinates of the corners of quadrilaterals of a pcolormesh::

        (X[i+1, j], Y[i+1, j])       (X[i+1, j+1], Y[i+1, j+1])
                              ●╶───╴●
                              │     │
                              ●╶───╴●
            (X[i, j], Y[i, j])       (X[i, j+1], Y[i, j+1])

    Note that the column index corresponds to the x-coordinate, and
    the row index corresponds to y. For details, see the
    :ref:`Notes <axes-pcolormesh-grid-orientation>` section below.

    If ``shading='flat'`` the dimensions of *X* and *Y* should be one
    greater than those of *C*, and the quadrilateral is colored due
    to the value at ``C[i, j]``.  If *X*, *Y* and *C* have equal
    dimensions, a warning will be raised and the last row and column
    of *C* will be ignored.

    If ``shading='nearest'`` or ``'gouraud'``, the dimensions of *X*
    and *Y* should be the same as those of *C* (if not, a ValueError
    will be raised).  For ``'nearest'`` the color ``C[i, j]`` is
    centered on ``(X[i, j], Y[i, j])``.  For ``'gouraud'``, a smooth
    interpolation is carried out between the quadrilateral corners.

    If *X* and/or *Y* are 1-D arrays or column vectors they will be
    expanded as needed into the appropriate 2D arrays, making a
    rectangular grid.

%(cmap_doc)s

%(norm_doc)s

%(vmin_vmax_doc)s

edgecolors : {'none', None, 'face', color, color sequence}, optional
    The color of the edges. Defaults to 'none'. Possible values:

    - 'none' or '': No edge.
    - *None*: :rc:`patch.edgecolor` will be used. Note that currently
      :rc:`patch.force_edgecolor` has to be True for this to work.
    - 'face': Use the adjacent face color.
    - A color or sequence of colors will set the edge color.

    The singular form *edgecolor* works as an alias.

alpha : float, default: None
    The alpha blending value, between 0 (transparent) and 1 (opaque).

shading : {'flat', 'nearest', 'gouraud', 'auto'}, optional
    The fill style for the quadrilateral; defaults to
    :rc:`pcolor.shading`. Possible values:

    - 'flat': A solid color is used for each quad. The color of the
      quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by
      ``C[i, j]``. The dimensions of *X* and *Y* should be
      one greater than those of *C*; if they are the same as *C*,
      then a deprecation warning is raised, and the last row
      and column of *C* are dropped.
    - 'nearest': Each grid point will have a color centered on it,
      extending halfway between the adjacent grid centers.  The
      dimensions of *X* and *Y* must be the same as *C*.
    - 'gouraud': Each quad will be Gouraud shaded: The color of the
      corners (i', j') are given by ``C[i', j']``. The color values of
      the area in between is interpolated from the corner values.
      The dimensions of *X* and *Y* must be the same as *C*. When
      Gouraud shading is used, *edgecolors* is ignored.
    - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one
      larger than *C*.  Choose 'nearest' if dimensions are the same.

    See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
    for more description.

snap : bool, default: False
    Whether to snap the mesh to pixel boundaries.

rasterized : bool, optional
    Rasterize the pcolormesh when drawing vector graphics.  This can
    speed up rendering and produce smaller files for large data sets.
    See also :doc:`/gallery/misc/rasterization_demo`.

Returns
-------
`matplotlib.collections.QuadMesh`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additionally, the following arguments are allowed. They are passed
    along to the `~matplotlib.collections.QuadMesh` constructor:

%(QuadMesh:kwdoc)s

See Also
--------
pcolor : An alternative implementation with slightly different
    features. For a detailed discussion on the differences see
    :ref:`Differences between pcolor() and pcolormesh()
    <differences-pcolor-pcolormesh>`.
imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a
    faster alternative.

Notes
-----
**Masked arrays**

*C* may be a masked array. If ``C[i, j]`` is masked, the corresponding
quadrilateral will be transparent. Masking of *X* and *Y* is not
supported. Use `~.Axes.pcolor` if you need this functionality.

.. _axes-pcolormesh-grid-orientation:

**Grid orientation**

The grid orientation follows the standard matrix convention: An array
*C* with shape (nrows, ncolumns) is plotted with the column number as
*X* and the row number as *Y*.

.. _differences-pcolor-pcolormesh:

**Differences between pcolor() and pcolormesh()**

Both methods are used to create a pseudocolor plot of a 2D array
using quadrilaterals.

The main difference lies in the created object and internal data
handling:
While `~.Axes.pcolor` returns a `.PolyQuadMesh`, `~.Axes.pcolormesh`
returns a `.QuadMesh`. The latter is more specialized for the given
purpose and thus is faster. It should almost always be preferred.

There is also a slight difference in the handling of masked arrays.
Both `~.Axes.pcolor` and `~.Axes.pcolormesh` support masked arrays
for *C*. However, only `~.Axes.pcolor` supports masked arrays for *X*
and *Y*. The reason lies in the internal handling of the masked values.
`~.Axes.pcolor` leaves out the respective polygons from the
PolyQuadMesh. `~.Axes.pcolormesh` sets the facecolor of the masked
elements to transparent. You can see the difference when using
edgecolors. While all edges are drawn irrespective of masking in a
QuadMesh, the edge between two adjacent masked quadrilaterals in
`~.Axes.pcolor` is not drawn as the corresponding polygons do not
exist in the PolyQuadMesh. Because PolyQuadMesh draws each individual
polygon, it also supports applying hatches and linestyles to the collection.

Another difference is the support of Gouraud shading in
`~.Axes.pcolormesh`, which is not available with `~.Axes.pcolor`.

---
## pcolorfast
```python
from _axes import pcolorfast
```

Create a pseudocolor plot with a non-regular rectangular grid.

Call signature::

  ax.pcolorfast([X, Y], C, /, **kwargs)

This method is similar to `~.Axes.pcolor` and `~.Axes.pcolormesh`.
It's designed to provide the fastest pcolor-type plotting with the
Agg backend. To achieve this, it uses different algorithms internally
depending on the complexity of the input grid (regular rectangular,
non-regular rectangular or arbitrary quadrilateral).

.. warning::

   This method is experimental. Compared to `~.Axes.pcolor` or
   `~.Axes.pcolormesh` it has some limitations:

   - It supports only flat shading (no outlines)
   - It lacks support for log scaling of the axes.
   - It does not have a pyplot wrapper.

Parameters
----------
C : array-like
    The image data. Supported array shapes are:

    - (M, N): an image with scalar data.  Color-mapping is controlled
      by *cmap*, *norm*, *vmin*, and *vmax*.
    - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
    - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
      i.e. including transparency.

    The first two dimensions (M, N) define the rows and columns of
    the image.

    This parameter can only be passed positionally.

X, Y : tuple or array-like, default: ``(0, N)``, ``(0, M)``
    *X* and *Y* are used to specify the coordinates of the
    quadrilaterals. There are different ways to do this:

    - Use tuples ``X=(xmin, xmax)`` and ``Y=(ymin, ymax)`` to define
      a *uniform rectangular grid*.

      The tuples define the outer edges of the grid. All individual
      quadrilaterals will be of the same size. This is the fastest
      version.

    - Use 1D arrays *X*, *Y* to specify a *non-uniform rectangular
      grid*.

      In this case *X* and *Y* have to be monotonic 1D arrays of length
      *N+1* and *M+1*, specifying the x and y boundaries of the cells.

      The speed is intermediate. Note: The grid is checked, and if
      found to be uniform the fast version is used.

    - Use 2D arrays *X*, *Y* if you need an *arbitrary quadrilateral
      grid* (i.e. if the quadrilaterals are not rectangular).

      In this case *X* and *Y* are 2D arrays with shape (M + 1, N + 1),
      specifying the x and y coordinates of the corners of the colored
      quadrilaterals.

      This is the most general, but the slowest to render.  It may
      produce faster and more compact output using ps, pdf, and
      svg backends, however.

    These arguments can only be passed positionally.

%(cmap_doc)s

    This parameter is ignored if *C* is RGB(A).

%(norm_doc)s

    This parameter is ignored if *C* is RGB(A).

%(vmin_vmax_doc)s

    This parameter is ignored if *C* is RGB(A).

alpha : float, default: None
    The alpha blending value, between 0 (transparent) and 1 (opaque).

snap : bool, default: False
    Whether to snap the mesh to pixel boundaries.

Returns
-------
`.AxesImage` or `.PcolorImage` or `.QuadMesh`
    The return type depends on the type of grid:

    - `.AxesImage` for a regular rectangular grid.
    - `.PcolorImage` for a non-regular rectangular grid.
    - `.QuadMesh` for a non-rectangular grid.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Supported additional parameters depend on the type of grid.
    See return types of *image* for further description.

---
## contour
```python
from _axes import contour
```

Plot contour lines.

Call signature::

    contour([X, Y,] Z, [levels], **kwargs)
%(contour_doc)s

---
## contourf
```python
from _axes import contourf
```

Plot filled contours.

Call signature::

    contourf([X, Y,] Z, [levels], **kwargs)
%(contour_doc)s

---
## clabel
```python
from _axes import clabel
```

Label a contour plot.

Adds labels to line contours in given `.ContourSet`.

Parameters
----------
CS : `.ContourSet` instance
    Line contours to label.

levels : array-like, optional
    A list of level values, that should be labeled. The list must be
    a subset of ``CS.levels``. If not given, all levels are labeled.

**kwargs
    All other parameters are documented in `~.ContourLabeler.clabel`.

---
## hist
```python
from _axes import hist
```

Compute and plot a histogram.

This method uses `numpy.histogram` to bin the data in *x* and count the
number of values in each bin, then draws the distribution either as a
`.BarContainer` or `.Polygon`. The *bins*, *range*, *density*, and
*weights* parameters are forwarded to `numpy.histogram`.

If the data has already been binned and counted, use `~.bar` or
`~.stairs` to plot the distribution::

    counts, bins = np.histogram(x)
    plt.stairs(counts, bins)

Alternatively, plot pre-computed bins and counts using ``hist()`` by
treating each bin as a single point with a weight equal to its count::

    plt.hist(bins[:-1], bins, weights=counts)

The data input *x* can be a singular array, a list of datasets of
potentially different lengths ([*x0*, *x1*, ...]), or a 2D ndarray in
which each column is a dataset. Note that the ndarray form is
transposed relative to the list form. If the input is an array, then
the return value is a tuple (*n*, *bins*, *patches*); if the input is a
sequence of arrays, then the return value is a tuple
([*n0*, *n1*, ...], *bins*, [*patches0*, *patches1*, ...]).

Masked arrays are not supported.

Parameters
----------
x : (n,) array or sequence of (n,) arrays
    Input values, this takes either a single array or a sequence of
    arrays which are not required to be of the same length.

bins : int or sequence or str, default: :rc:`hist.bins`
    If *bins* is an integer, it defines the number of equal-width bins
    in the range.

    If *bins* is a sequence, it defines the bin edges, including the
    left edge of the first bin and the right edge of the last bin;
    in this case, bins may be unequally spaced.  All but the last
    (righthand-most) bin is half-open.  In other words, if *bins* is::

        [1, 2, 3, 4]

    then the first bin is ``[1, 2)`` (including 1, but excluding 2) and
    the second ``[2, 3)``.  The last bin, however, is ``[3, 4]``, which
    *includes* 4.

    If *bins* is a string, it is one of the binning strategies
    supported by `numpy.histogram_bin_edges`: 'auto', 'fd', 'doane',
    'scott', 'stone', 'rice', 'sturges', or 'sqrt'.

range : tuple or None, default: None
    The lower and upper range of the bins. Lower and upper outliers
    are ignored. If not provided, *range* is ``(x.min(), x.max())``.
    Range has no effect if *bins* is a sequence.

    If *bins* is a sequence or *range* is specified, autoscaling
    is based on the specified bin range instead of the
    range of x.

density : bool, default: False
    If ``True``, draw and return a probability density: each bin
    will display the bin's raw count divided by the total number of
    counts *and the bin width*
    (``density = counts / (sum(counts) * np.diff(bins))``),
    so that the area under the histogram integrates to 1
    (``np.sum(density * np.diff(bins)) == 1``).

    If *stacked* is also ``True``, the sum of the histograms is
    normalized to 1.

weights : (n,) array-like or None, default: None
    An array of weights, of the same shape as *x*.  Each value in
    *x* only contributes its associated weight towards the bin count
    (instead of 1).  If *density* is ``True``, the weights are
    normalized, so that the integral of the density over the range
    remains 1.

cumulative : bool or -1, default: False
    If ``True``, then a histogram is computed where each bin gives the
    counts in that bin plus all bins for smaller values. The last bin
    gives the total number of datapoints.

    If *density* is also ``True`` then the histogram is normalized such
    that the last bin equals 1.

    If *cumulative* is a number less than 0 (e.g., -1), the direction
    of accumulation is reversed.  In this case, if *density* is also
    ``True``, then the histogram is normalized such that the first bin
    equals 1.

bottom : array-like, scalar, or None, default: None
    Location of the bottom of each bin, i.e. bins are drawn from
    ``bottom`` to ``bottom + hist(x, bins)`` If a scalar, the bottom
    of each bin is shifted by the same amount. If an array, each bin
    is shifted independently and the length of bottom must match the
    number of bins. If None, defaults to 0.

histtype : {'bar', 'barstacked', 'step', 'stepfilled'}, default: 'bar'
    The type of histogram to draw.

    - 'bar' is a traditional bar-type histogram.  If multiple data
      are given the bars are arranged side by side.
    - 'barstacked' is a bar-type histogram where multiple
      data are stacked on top of each other.
    - 'step' generates a lineplot that is by default unfilled.
    - 'stepfilled' generates a lineplot that is by default filled.

align : {'left', 'mid', 'right'}, default: 'mid'
    The horizontal alignment of the histogram bars.

    - 'left': bars are centered on the left bin edges.
    - 'mid': bars are centered between the bin edges.
    - 'right': bars are centered on the right bin edges.

orientation : {'vertical', 'horizontal'}, default: 'vertical'
    If 'horizontal', `~.Axes.barh` will be used for bar-type histograms
    and the *bottom* kwarg will be the left edges.

rwidth : float or None, default: None
    The relative width of the bars as a fraction of the bin width.  If
    ``None``, automatically compute the width.

    Ignored if *histtype* is 'step' or 'stepfilled'.

log : bool, default: False
    If ``True``, the histogram axis will be set to a log scale.

color : :mpltype:`color` or list of :mpltype:`color` or None, default: None
    Color or sequence of colors, one per dataset.  Default (``None``)
    uses the standard line color sequence.

label : str or list of str, optional
    String, or sequence of strings to match multiple datasets.  Bar
    charts yield multiple patches per dataset, but only the first gets
    the label, so that `~.Axes.legend` will work as expected.

stacked : bool, default: False
    If ``True``, multiple data are stacked on top of each other If
    ``False`` multiple data are arranged side by side if histtype is
    'bar' or on top of each other if histtype is 'step'

Returns
-------
n : array or list of arrays
    The values of the histogram bins. See *density* and *weights* for a
    description of the possible semantics.  If input *x* is an array,
    then this is an array of length *nbins*. If input is a sequence of
    arrays ``[data1, data2, ...]``, then this is a list of arrays with
    the values of the histograms for each of the arrays in the same
    order.  The dtype of the array *n* (or of its element arrays) will
    always be float even if no weighting or normalization is used.

bins : array
    The edges of the bins. Length nbins + 1 (nbins left edges and right
    edge of last bin).  Always a single array even when multiple data
    sets are passed in.

patches : `.BarContainer` or list of a single `.Polygon` or list of such objects
    Container of individual artists used to create the histogram
    or list of such containers if there are multiple input datasets.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    `~matplotlib.patches.Patch` properties

See Also
--------
hist2d : 2D histogram with rectangular bins
hexbin : 2D histogram with hexagonal bins
stairs : Plot a pre-computed histogram
bar : Plot a pre-computed histogram

Notes
-----
For large numbers of bins (>1000), plotting can be significantly
accelerated by using `~.Axes.stairs` to plot a pre-computed histogram
(``plt.stairs(*np.histogram(data))``), or by setting *histtype* to
'step' or 'stepfilled' rather than 'bar' or 'barstacked'.

---
## stairs
```python
from _axes import stairs
```

Draw a stepwise constant function as a line or a filled plot.

*edges* define the x-axis positions of the steps. *values* the function values
between these steps. Depending on *fill*, the function is drawn either as a
continuous line with vertical segments at the edges, or as a filled area.

Parameters
----------
values : array-like
    The step heights.

edges : array-like
    The step positions, with ``len(edges) == len(vals) + 1``,
    between which the curve takes on vals values.

orientation : {'vertical', 'horizontal'}, default: 'vertical'
    The direction of the steps. Vertical means that *values* are along
    the y-axis, and edges are along the x-axis.

baseline : float, array-like or None, default: 0
    The bottom value of the bounding edges or when
    ``fill=True``, position of lower edge. If *fill* is
    True or an array is passed to *baseline*, a closed
    path is drawn.

fill : bool, default: False
    Whether the area under the step curve should be filled.

Returns
-------
StepPatch : `~matplotlib.patches.StepPatch`

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    `~matplotlib.patches.StepPatch` properties

---
## hist2d
```python
from _axes import hist2d
```

Make a 2D histogram plot.

Parameters
----------
x, y : array-like, shape (n, )
    Input values

bins : None or int or [int, int] or array-like or [array, array]

    The bin specification:

    - If int, the number of bins for the two dimensions
      (``nx = ny = bins``).
    - If ``[int, int]``, the number of bins in each dimension
      (``nx, ny = bins``).
    - If array-like, the bin edges for the two dimensions
      (``x_edges = y_edges = bins``).
    - If ``[array, array]``, the bin edges in each dimension
      (``x_edges, y_edges = bins``).

    The default value is 10.

range : array-like shape(2, 2), optional
    The leftmost and rightmost edges of the bins along each dimension
    (if not specified explicitly in the bins parameters): ``[[xmin,
    xmax], [ymin, ymax]]``. All values outside of this range will be
    considered outliers and not tallied in the histogram.

density : bool, default: False
    Normalize histogram.  See the documentation for the *density*
    parameter of `~.Axes.hist` for more details.

weights : array-like, shape (n, ), optional
    An array of values w_i weighing each sample (x_i, y_i).

cmin, cmax : float, default: None
    All bins that has count less than *cmin* or more than *cmax* will not be
    displayed (set to NaN before passing to `~.Axes.pcolormesh`) and these count
    values in the return value count histogram will also be set to nan upon
    return.

Returns
-------
h : 2D array
    The bi-dimensional histogram of samples x and y. Values in x are
    histogrammed along the first dimension and values in y are
    histogrammed along the second dimension.
xedges : 1D array
    The bin edges along the x-axis.
yedges : 1D array
    The bin edges along the y-axis.
image : `~.matplotlib.collections.QuadMesh`

Other Parameters
----------------
%(cmap_doc)s

%(norm_doc)s

%(vmin_vmax_doc)s

alpha : ``0 <= scalar <= 1`` or ``None``, optional
    The alpha blending value.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additional parameters are passed along to the
    `~.Axes.pcolormesh` method and `~matplotlib.collections.QuadMesh`
    constructor.

See Also
--------
hist : 1D histogram plotting
hexbin : 2D histogram with hexagonal bins

Notes
-----
- Currently ``hist2d`` calculates its own axis limits, and any limits
  previously set are ignored.
- Rendering the histogram with a logarithmic color scale is
  accomplished by passing a `.colors.LogNorm` instance to the *norm*
  keyword argument. Likewise, power-law normalization (similar
  in effect to gamma correction) can be accomplished with
  `.colors.PowerNorm`.

---
## ecdf
```python
from _axes import ecdf
```

Compute and plot the empirical cumulative distribution function of *x*.

.. versionadded:: 3.8

Parameters
----------
x : 1d array-like
    The input data.  Infinite entries are kept (and move the relevant
    end of the ecdf from 0/1), but NaNs and masked values are errors.

weights : 1d array-like or None, default: None
    The weights of the entries; must have the same shape as *x*.
    Weights corresponding to NaN data points are dropped, and then the
    remaining weights are normalized to sum to 1.  If unset, all
    entries have the same weight.

complementary : bool, default: False
    Whether to plot a cumulative distribution function, which increases
    from 0 to 1 (the default), or a complementary cumulative
    distribution function, which decreases from 1 to 0.

orientation : {"vertical", "horizontal"}, default: "vertical"
    Whether the entries are plotted along the x-axis ("vertical", the
    default) or the y-axis ("horizontal").  This parameter takes the
    same values as in `~.Axes.hist`.

compress : bool, default: False
    Whether multiple entries with the same values are grouped together
    (with a summed weight) before plotting.  This is mainly useful if
    *x* contains many identical data points, to decrease the rendering
    complexity of the plot. If *x* contains no duplicate points, this
    has no effect and just uses some time and memory.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

Returns
-------
`.Line2D`

Notes
-----
The ecdf plot can be thought of as a cumulative histogram with one bin
per data entry; i.e. it reports on the entire dataset without any
arbitrary binning.

If *x* contains NaNs or masked entries, either remove them first from
the array (if they should not taken into account), or replace them by
-inf or +inf (if they should be sorted at the beginning or the end of
the array).

---
## psd
```python
from _axes import psd
```

Plot the power spectral density.

The power spectral density :math:`P_{xx}` by Welch's average
periodogram method.  The vector *x* is divided into *NFFT* length
segments.  Each segment is detrended by function *detrend* and
windowed by function *window*.  *noverlap* gives the length of
the overlap between segments.  The :math:`|\mathrm{fft}(i)|^2`
of each segment :math:`i` are averaged to compute :math:`P_{xx}`,
with a scaling to correct for power loss due to windowing.

If len(*x*) < *NFFT*, it will be zero padded to *NFFT*.

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data

%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between segments.

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

return_line : bool, default: False
    Whether to include the line object plotted in the returned values.

Returns
-------
Pxx : 1-D array
    The values for the power spectrum :math:`P_{xx}` before scaling
    (real valued).

freqs : 1-D array
    The frequencies corresponding to the elements in *Pxx*.

line : `~matplotlib.lines.Line2D`
    The line created by this function.
    Only returned if *return_line* is True.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
specgram
    Differs in the default overlap; in not returning the mean of the
    segment periodograms; in returning the times of the segments; and
    in plotting a colormap instead of a line.
magnitude_spectrum
    Plots the magnitude spectrum.
csd
    Plots the spectral density between two signals.

Notes
-----
For plotting, the power is plotted as
:math:`10\log_{10}(P_{xx})` for decibels, though *Pxx* itself
is returned.

References
----------
Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
John Wiley & Sons (1986)

---
## csd
```python
from _axes import csd
```

Plot the cross-spectral density.

The cross spectral density :math:`P_{xy}` by Welch's average
periodogram method.  The vectors *x* and *y* are divided into
*NFFT* length segments.  Each segment is detrended by function
*detrend* and windowed by function *window*.  *noverlap* gives
the length of the overlap between segments.  The product of
the direct FFTs of *x* and *y* are averaged over each segment
to compute :math:`P_{xy}`, with a scaling to correct for power
loss due to windowing.

If len(*x*) < *NFFT* or len(*y*) < *NFFT*, they will be zero
padded to *NFFT*.

Parameters
----------
x, y : 1-D arrays or sequences
    Arrays or sequences containing the data.

%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between segments.

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

return_line : bool, default: False
    Whether to include the line object plotted in the returned values.

Returns
-------
Pxy : 1-D array
    The values for the cross spectrum :math:`P_{xy}` before scaling
    (complex valued).

freqs : 1-D array
    The frequencies corresponding to the elements in *Pxy*.

line : `~matplotlib.lines.Line2D`
    The line created by this function.
    Only returned if *return_line* is True.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
psd : is equivalent to setting ``y = x``.

Notes
-----
For plotting, the power is plotted as
:math:`10 \log_{10}(P_{xy})` for decibels, though :math:`P_{xy}` itself
is returned.

References
----------
Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
John Wiley & Sons (1986)

---
## magnitude_spectrum
```python
from _axes import magnitude_spectrum
```

Plot the magnitude spectrum.

Compute the magnitude spectrum of *x*.  Data is padded to a
length of *pad_to* and the windowing function *window* is applied to
the signal.

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data.

%(Spectral)s

%(Single_Spectrum)s

scale : {'default', 'linear', 'dB'}
    The scaling of the values in the *spec*.  'linear' is no scaling.
    'dB' returns the values in dB scale, i.e., the dB amplitude
    (20 * log10). 'default' is 'linear'.

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

Returns
-------
spectrum : 1-D array
    The values for the magnitude spectrum before scaling (real valued).

freqs : 1-D array
    The frequencies corresponding to the elements in *spectrum*.

line : `~matplotlib.lines.Line2D`
    The line created by this function.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
psd
    Plots the power spectral density.
angle_spectrum
    Plots the angles of the corresponding frequencies.
phase_spectrum
    Plots the phase (unwrapped angle) of the corresponding frequencies.
specgram
    Can plot the magnitude spectrum of segments within the signal in a
    colormap.

---
## angle_spectrum
```python
from _axes import angle_spectrum
```

Plot the angle spectrum.

Compute the angle spectrum (wrapped phase spectrum) of *x*.
Data is padded to a length of *pad_to* and the windowing function
*window* is applied to the signal.

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data.

%(Spectral)s

%(Single_Spectrum)s

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

Returns
-------
spectrum : 1-D array
    The values for the angle spectrum in radians (real valued).

freqs : 1-D array
    The frequencies corresponding to the elements in *spectrum*.

line : `~matplotlib.lines.Line2D`
    The line created by this function.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
magnitude_spectrum
    Plots the magnitudes of the corresponding frequencies.
phase_spectrum
    Plots the unwrapped version of this function.
specgram
    Can plot the angle spectrum of segments within the signal in a
    colormap.

---
## phase_spectrum
```python
from _axes import phase_spectrum
```

Plot the phase spectrum.

Compute the phase spectrum (unwrapped angle spectrum) of *x*.
Data is padded to a length of *pad_to* and the windowing function
*window* is applied to the signal.

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data

%(Spectral)s

%(Single_Spectrum)s

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

Returns
-------
spectrum : 1-D array
    The values for the phase spectrum in radians (real valued).

freqs : 1-D array
    The frequencies corresponding to the elements in *spectrum*.

line : `~matplotlib.lines.Line2D`
    The line created by this function.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

See Also
--------
magnitude_spectrum
    Plots the magnitudes of the corresponding frequencies.
angle_spectrum
    Plots the wrapped version of this function.
specgram
    Can plot the phase spectrum of segments within the signal in a
    colormap.

---
## cohere
```python
from _axes import cohere
```

Plot the coherence between *x* and *y*.

Coherence is the normalized cross spectral density:

.. math::

  C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}

Parameters
----------
%(Spectral)s

%(PSD)s

noverlap : int, default: 0 (no overlap)
    The number of points of overlap between blocks.

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

Returns
-------
Cxy : 1-D array
    The coherence vector.

freqs : 1-D array
    The frequencies for the elements in *Cxy*.

Other Parameters
----------------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Keyword arguments control the `.Line2D` properties:

    %(Line2D:kwdoc)s

References
----------
Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
John Wiley & Sons (1986)

---
## specgram
```python
from _axes import specgram
```

Plot a spectrogram.

Compute and plot a spectrogram of data in *x*.  Data are split into
*NFFT* length segments and the spectrum of each section is
computed.  The windowing function *window* is applied to each
segment, and the amount of overlap of each segment is
specified with *noverlap*. The spectrogram is plotted as a colormap
(using imshow).

Parameters
----------
x : 1-D array or sequence
    Array or sequence containing the data.

%(Spectral)s

%(PSD)s

mode : {'default', 'psd', 'magnitude', 'angle', 'phase'}
    What sort of spectrum to use.  Default is 'psd', which takes the
    power spectral density.  'magnitude' returns the magnitude
    spectrum.  'angle' returns the phase spectrum without unwrapping.
    'phase' returns the phase spectrum with unwrapping.

noverlap : int, default: 128
    The number of points of overlap between blocks.

scale : {'default', 'linear', 'dB'}
    The scaling of the values in the *spec*.  'linear' is no scaling.
    'dB' returns the values in dB scale.  When *mode* is 'psd',
    this is dB power (10 * log10).  Otherwise, this is dB amplitude
    (20 * log10). 'default' is 'dB' if *mode* is 'psd' or
    'magnitude' and 'linear' otherwise.  This must be 'linear'
    if *mode* is 'angle' or 'phase'.

Fc : int, default: 0
    The center frequency of *x*, which offsets the x extents of the
    plot to reflect the frequency range used when a signal is acquired
    and then filtered and downsampled to baseband.

cmap : `.Colormap`, default: :rc:`image.cmap`

xextent : *None* or (xmin, xmax)
    The image extent along the x-axis. The default sets *xmin* to the
    left border of the first bin (*spectrum* column) and *xmax* to the
    right border of the last bin. Note that for *noverlap>0* the width
    of the bins is smaller than those of the segments.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

**kwargs
    Additional keyword arguments are passed on to `~.axes.Axes.imshow`
    which makes the specgram image. The origin keyword argument
    is not supported.

Returns
-------
spectrum : 2D array
    Columns are the periodograms of successive segments.

freqs : 1-D array
    The frequencies corresponding to the rows in *spectrum*.

t : 1-D array
    The times corresponding to midpoints of segments (i.e., the columns
    in *spectrum*).

im : `.AxesImage`
    The image created by imshow containing the spectrogram.

See Also
--------
psd
    Differs in the default overlap; in returning the mean of the
    segment periodograms; in not returning times; and in generating a
    line plot instead of colormap.
magnitude_spectrum
    A single spectrum, similar to having a single segment when *mode*
    is 'magnitude'. Plots a line instead of a colormap.
angle_spectrum
    A single spectrum, similar to having a single segment when *mode*
    is 'angle'. Plots a line instead of a colormap.
phase_spectrum
    A single spectrum, similar to having a single segment when *mode*
    is 'phase'. Plots a line instead of a colormap.

Notes
-----
The parameters *detrend* and *scale_by_freq* do only apply when *mode*
is set to 'psd'.

---
## spy
```python
from _axes import spy
```

Plot the sparsity pattern of a 2D array.

This visualizes the non-zero values of the array.

Two plotting styles are available: image and marker. Both
are available for full arrays, but only the marker style
works for `scipy.sparse.spmatrix` instances.

**Image style**

If *marker* and *markersize* are *None*, `~.Axes.imshow` is used. Any
extra remaining keyword arguments are passed to this method.

**Marker style**

If *Z* is a `scipy.sparse.spmatrix` or *marker* or *markersize* are
*None*, a `.Line2D` object will be returned with the value of marker
determining the marker type, and any remaining keyword arguments
passed to `~.Axes.plot`.

Parameters
----------
Z : (M, N) array-like
    The array to be plotted.

precision : float or 'present', default: 0
    If *precision* is 0, any non-zero value will be plotted. Otherwise,
    values of :math:`|Z| > precision` will be plotted.

    For `scipy.sparse.spmatrix` instances, you can also
    pass 'present'. In this case any value present in the array
    will be plotted, even if it is identically zero.

aspect : {'equal', 'auto', None} or float, default: 'equal'
    The aspect ratio of the Axes.  This parameter is particularly
    relevant for images since it determines whether data pixels are
    square.

    This parameter is a shortcut for explicitly calling
    `.Axes.set_aspect`. See there for further details.

    - 'equal': Ensures an aspect ratio of 1. Pixels will be square.
    - 'auto': The Axes is kept fixed and the aspect is adjusted so
      that the data fit in the Axes. In general, this will result in
      non-square pixels.
    - *None*: Use :rc:`image.aspect`.

origin : {'upper', 'lower'}, default: :rc:`image.origin`
    Place the [0, 0] index of the array in the upper left or lower left
    corner of the Axes. The convention 'upper' is typically used for
    matrices and images.

Returns
-------
`~matplotlib.image.AxesImage` or `.Line2D`
    The return type depends on the plotting style (see above).

Other Parameters
----------------
**kwargs
    The supported additional parameters depend on the plotting style.

    For the image style, you can pass the following additional
    parameters of `~.Axes.imshow`:

    - *cmap*
    - *alpha*
    - *url*
    - any `.Artist` properties (passed on to the `.AxesImage`)

    For the marker style, you can pass any `.Line2D` property except
    for *linestyle*:

    %(Line2D:kwdoc)s

---
## matshow
```python
from _axes import matshow
```

Plot the values of a 2D matrix or array as color-coded image.

The matrix will be shown the way it would be printed, with the first
row at the top.  Row and column numbering is zero-based.

Parameters
----------
Z : (M, N) array-like
    The matrix to be displayed.

Returns
-------
`~matplotlib.image.AxesImage`

Other Parameters
----------------
**kwargs : `~matplotlib.axes.Axes.imshow` arguments

See Also
--------
imshow : More general function to plot data on a 2D regular raster.

Notes
-----
This is just a convenience function wrapping `.imshow` to set useful
defaults for displaying a matrix. In particular:

- Set ``origin='upper'``.
- Set ``interpolation='nearest'``.
- Set ``aspect='equal'``.
- Ticks are placed to the left and above.
- Ticks are formatted to show integer indices.

---
## violinplot
```python
from _axes import violinplot
```

Make a violin plot.

Make a violin plot for each column of *dataset* or each vector in
sequence *dataset*.  Each filled area extends to represent the
entire data range, with optional lines at the mean, the median,
the minimum, the maximum, and user-specified quantiles.

Parameters
----------
dataset : Array or a sequence of vectors.
  The input data.

positions : array-like, default: [1, 2, ..., n]
  The positions of the violins; i.e. coordinates on the x-axis for
  vertical violins (or y-axis for horizontal violins).

vert : bool, default: True.
  If true, creates a vertical violin plot.
  Otherwise, creates a horizontal violin plot.

widths : float or array-like, default: 0.5
  The maximum width of each violin in units of the *positions* axis.
  The default is 0.5, which is half the available space when using default
  *positions*.

showmeans : bool, default: False
  Whether to show the mean with a line.

showextrema : bool, default: True
  Whether to show extrema with a line.

showmedians : bool, default: False
  Whether to show the median with a line.

quantiles : array-like, default: None
  If not None, set a list of floats in interval [0, 1] for each violin,
  which stands for the quantiles that will be rendered for that
  violin.

points : int, default: 100
  The number of points to evaluate each of the gaussian kernel density
  estimations at.

bw_method : {'scott', 'silverman'} or float or callable, default: 'scott'
  The method used to calculate the estimator bandwidth.  If a
  float, this will be used directly as `kde.factor`.  If a
  callable, it should take a `matplotlib.mlab.GaussianKDE` instance as
  its only parameter and return a float.

side : {'both', 'low', 'high'}, default: 'both'
    'both' plots standard violins. 'low'/'high' only
    plots the side below/above the positions value.

data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

Returns
-------
dict
  A dictionary mapping each component of the violinplot to a
  list of the corresponding collection instances created. The
  dictionary has the following keys:

  - ``bodies``: A list of the `~.collections.PolyCollection`
    instances containing the filled area of each violin.

  - ``cmeans``: A `~.collections.LineCollection` instance that marks
    the mean values of each of the violin's distribution.

  - ``cmins``: A `~.collections.LineCollection` instance that marks
    the bottom of each violin's distribution.

  - ``cmaxes``: A `~.collections.LineCollection` instance that marks
    the top of each violin's distribution.

  - ``cbars``: A `~.collections.LineCollection` instance that marks
    the centers of each violin's distribution.

  - ``cmedians``: A `~.collections.LineCollection` instance that
    marks the median values of each of the violin's distribution.

  - ``cquantiles``: A `~.collections.LineCollection` instance created
    to identify the quantile values of each of the violin's
    distribution.

See Also
--------
.Axes.violin : Draw a violin from pre-computed statistics.
boxplot : Draw a box and whisker plot.

---
## violin
```python
from _axes import violin
```

Draw a violin plot from pre-computed statistics.

Draw a violin plot for each column of *vpstats*. Each filled area
extends to represent the entire data range, with optional lines at the
mean, the median, the minimum, the maximum, and the quantiles values.

Parameters
----------
vpstats : list of dicts
  A list of dictionaries containing stats for each violin plot.
  Required keys are:

  - ``coords``: A list of scalars containing the coordinates that
    the violin's kernel density estimate were evaluated at.

  - ``vals``: A list of scalars containing the values of the
    kernel density estimate at each of the coordinates given
    in *coords*.

  - ``mean``: The mean value for this violin's dataset.

  - ``median``: The median value for this violin's dataset.

  - ``min``: The minimum value for this violin's dataset.

  - ``max``: The maximum value for this violin's dataset.

  Optional keys are:

  - ``quantiles``: A list of scalars containing the quantile values
    for this violin's dataset.

positions : array-like, default: [1, 2, ..., n]
  The positions of the violins; i.e. coordinates on the x-axis for
  vertical violins (or y-axis for horizontal violins).

vert : bool, default: True.
  If true, plots the violins vertically.
  Otherwise, plots the violins horizontally.

widths : float or array-like, default: 0.5
  The maximum width of each violin in units of the *positions* axis.
  The default is 0.5, which is half available space when using default
  *positions*.

showmeans : bool, default: False
  Whether to show the mean with a line.

showextrema : bool, default: True
  Whether to show extrema with a line.

showmedians : bool, default: False
  Whether to show the median with a line.

side : {'both', 'low', 'high'}, default: 'both'
    'both' plots standard violins. 'low'/'high' only
    plots the side below/above the positions value.

Returns
-------
dict
  A dictionary mapping each component of the violinplot to a
  list of the corresponding collection instances created. The
  dictionary has the following keys:

  - ``bodies``: A list of the `~.collections.PolyCollection`
    instances containing the filled area of each violin.

  - ``cmeans``: A `~.collections.LineCollection` instance that marks
    the mean values of each of the violin's distribution.

  - ``cmins``: A `~.collections.LineCollection` instance that marks
    the bottom of each violin's distribution.

  - ``cmaxes``: A `~.collections.LineCollection` instance that marks
    the top of each violin's distribution.

  - ``cbars``: A `~.collections.LineCollection` instance that marks
    the centers of each violin's distribution.

  - ``cmedians``: A `~.collections.LineCollection` instance that
    marks the median values of each of the violin's distribution.

  - ``cquantiles``: A `~.collections.LineCollection` instance created
    to identify the quantiles values of each of the violin's
    distribution.

See Also
--------
violin :
    Draw a violin plot from data instead of pre-computed statistics.

---
## _get_aspect_ratio
```python
from _axes import _get_aspect_ratio
```

Convenience method to calculate the aspect ratio of the Axes in
the display coordinate system.

---
## sign
```python
from _axes import sign
```



---
## _upcast_err
```python
from _axes import _upcast_err
```

Safely handle tuple of containers that carry units.

This function covers the case where the input to the xerr/yerr is a
length 2 tuple of equal length ndarray-subclasses that carry the
unit information in the container.

If we have a tuple of nested numpy array (subclasses), we defer
coercing the units to be consistent to the underlying unit
library (and implicitly the broadcasting).

Otherwise, fallback to casting to an object array.

---
## apply_mask
```python
from _axes import apply_mask
```



---
## merge_kw_rc
```python
from _axes import merge_kw_rc
```



---
## do_plot
```python
from _axes import do_plot
```



---
## do_patch
```python
from _axes import do_patch
```



---
## invalid_shape_exception
```python
from _axes import invalid_shape_exception
```



---
## on_changed
```python
from _axes import on_changed
```



---
## _kde_method
```python
from _axes import _kde_method
```



---
## get_next_color
```python
from _axes import get_next_color
```



---
## get_interp_point
```python
from _axes import get_interp_point
```



---
## _interp_grid
```python
from _axes import _interp_grid
```



---
## _axis_method_wrapper
```python
from _base import _axis_method_wrapper
```

Helper to generate Axes methods wrapping Axis methods.

After ::

    get_foo = _axis_method_wrapper("xaxis", "get_bar")

(in the body of a class) ``get_foo`` is a method that forwards it arguments
to the ``get_bar`` method of the ``xaxis`` attribute, and gets its
signature and docstring from ``Axis.get_bar``.

The docstring of ``get_foo`` is built by replacing "this Axis" by "the
{attr_name}" (i.e., "the xaxis", "the yaxis") in the wrapped method's
dedented docstring; additional replacements can be given in *doc_sub*.

---
## _TransformedBoundsLocator
```python
from _base import _TransformedBoundsLocator
```

Axes locator for `.Axes.inset_axes` and similarly positioned Axes.

The locator is a callable object used in `.Axes.set_aspect` to compute the
Axes location depending on the renderer.

---
## _process_plot_format
```python
from _base import _process_plot_format
```

Convert a MATLAB style color/line style format string to a (*linestyle*,
*marker*, *color*) tuple.

Example format strings include:

* 'ko': black circles
* '.b': blue dots
* 'r--': red dashed lines
* 'C2--': the third color in the color cycle, dashed lines

The format is absolute in the sense that if a linestyle or marker is not
defined in *fmt*, there is no line or marker. This is expressed by
returning 'None' for the respective quantity.

See Also
--------
matplotlib.Line2D.lineStyles, matplotlib.colors.cnames
    All possible styles and color format strings.

---
## _process_plot_var_args
```python
from _base import _process_plot_var_args
```

Process variable length arguments to `~.Axes.plot`, to support ::

  plot(t, s)
  plot(t1, s1, t2, s2)
  plot(t1, s1, 'ko', t2, s2)
  plot(t1, s1, 'ko', t2, s2, 'r--', t3, e3)

an arbitrary number of *x*, *y*, *fmt* are allowed

---
## _AxesBase
```python
from _base import _AxesBase
```



---
## _draw_rasterized
```python
from _base import _draw_rasterized
```

A helper function for rasterizing the list of artists.

The bookkeeping to track if we are or are not in rasterizing mode
with the mixed-mode backends is relatively complicated and is now
handled in the matplotlib.artist.allow_rasterization decorator.

This helper defines the absolute minimum methods and attributes on a
shim class to be compatible with that decorator and then uses it to
rasterize the list of artists.

This is maybe too-clever, but allows us to reuse the same code that is
used on normal artists to participate in the "are we rasterizing"
accounting.

Please do not use this outside of the "rasterize below a given zorder"
functionality of Axes.

Parameters
----------
figure : matplotlib.figure.Figure
    The figure all of the artists belong to (not checked).  We need this
    because we can at the figure level suppress composition and insert each
    rasterized artist as its own image.

artists : List[matplotlib.artist.Artist]
    The list of Artists to be rasterized.  These are assumed to all
    be in the same Figure.

renderer : matplotlib.backendbases.RendererBase
    The currently active renderer

Returns
-------
None

---
## __init__
```python
from _base import __init__
```



---
## __set_name__
```python
from _base import __set_name__
```



---
## __call__
```python
from _base import __call__
```



---
## set_prop_cycle
```python
from _base import set_prop_cycle
```

Set the property cycle of the Axes.

The property cycle controls the style properties such as color,
marker and linestyle of future plot commands. The style properties
of data already added to the Axes are not modified.

Call signatures::

  set_prop_cycle(cycler)
  set_prop_cycle(label=values[, label2=values2[, ...]])
  set_prop_cycle(label, values)

Form 1 sets given `~cycler.Cycler` object.

Form 2 creates a `~cycler.Cycler` which cycles over one or more
properties simultaneously and set it as the property cycle of the
Axes. If multiple properties are given, their value lists must have
the same length. This is just a shortcut for explicitly creating a
cycler and passing it to the function, i.e. it's short for
``set_prop_cycle(cycler(label=values, label2=values2, ...))``.

Form 3 creates a `~cycler.Cycler` for a single property and set it
as the property cycle of the Axes. This form exists for compatibility
with the original `cycler.cycler` interface. Its use is discouraged
in favor of the kwarg form, i.e. ``set_prop_cycle(label=values)``.

Parameters
----------
cycler : `~cycler.Cycler`
    Set the given Cycler. *None* resets to the cycle defined by the
    current style.

    .. ACCEPTS: `~cycler.Cycler`

label : str
    The property key. Must be a valid `.Artist` property.
    For example, 'color' or 'linestyle'. Aliases are allowed,
    such as 'c' for 'color' and 'lw' for 'linewidth'.

values : iterable
    Finite-length iterable of the property values. These values
    are validated and will raise a ValueError if invalid.

See Also
--------
matplotlib.rcsetup.cycler
    Convenience function for creating validated cyclers for properties.
cycler.cycler
    The original function for creating unvalidated cyclers.

Examples
--------
Setting the property cycle for a single property:

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'])

Setting the property cycle for simultaneously cycling over multiple
properties (e.g. red circle, green plus, blue cross):

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
...                   marker=['o', '+', 'x'])

---
## get_next_color
```python
from _base import get_next_color
```

Return the next color in the cycle.

---
## _getdefaults
```python
from _base import _getdefaults
```

If some keys in the property cycle (excluding those in the set
*ignore*) are absent or set to None in the dict *kw*, return a copy
of the next entry in the property cycle, excluding keys in *ignore*.
Otherwise, don't advance the property cycle, and return an empty dict.

---
## _setdefaults
```python
from _base import _setdefaults
```

Add to the dict *kw* the entries in the dict *default* that are absent
or set to None in *kw*.

---
## _makeline
```python
from _base import _makeline
```



---
## _makefill
```python
from _base import _makefill
```



---
## _plot_args
```python
from _base import _plot_args
```

Process the arguments of ``plot([x], y, [fmt], **kwargs)`` calls.

This processes a single set of ([x], y, [fmt]) parameters; i.e. for
``plot(x, y, x2, y2)`` it will be called twice. Once for (x, y) and
once for (x2, y2).

x and y may be 2D and thus can still represent multiple datasets.

For multiple datasets, if the keyword argument *label* is a list, this
will unpack the list and assign the individual labels to the datasets.

Parameters
----------
tup : tuple
    A tuple of the positional parameters. This can be one of

    - (y,)
    - (x, y)
    - (y, fmt)
    - (x, y, fmt)

kwargs : dict
    The keyword arguments passed to ``plot()``.

return_kwargs : bool
    Whether to also return the effective keyword arguments after label
    unpacking as well.

ambiguous_fmt_datakey : bool
    Whether the format string in *tup* could also have been a
    misspelled data key.

Returns
-------
result
    If *return_kwargs* is false, a list of Artists representing the
    dataset(s).
    If *return_kwargs* is true, a list of (Artist, effective_kwargs)
    representing the dataset(s). See *return_kwargs*.
    The Artist is either `.Line2D` (if called from ``plot()``) or
    `.Polygon` otherwise.

---
## _axis_map
```python
from _base import _axis_map
```

A mapping of axis names, e.g. 'x', to `Axis` instances.

---
## __str__
```python
from _base import __str__
```



---
## __init_subclass__
```python
from _base import __init_subclass__
```



---
## __getstate__
```python
from _base import __getstate__
```



---
## __setstate__
```python
from _base import __setstate__
```



---
## __repr__
```python
from _base import __repr__
```



---
## get_subplotspec
```python
from _base import get_subplotspec
```

Return the `.SubplotSpec` associated with the subplot, or None.

---
## set_subplotspec
```python
from _base import set_subplotspec
```

Set the `.SubplotSpec`. associated with the subplot.

---
## get_gridspec
```python
from _base import get_gridspec
```

Return the `.GridSpec` associated with the subplot, or None.

---
## get_window_extent
```python
from _base import get_window_extent
```

Return the Axes bounding box in display space.

This bounding box does not include the spines, ticks, ticklabels,
or other labels.  For a bounding box including these elements use
`~matplotlib.axes.Axes.get_tightbbox`.

See Also
--------
matplotlib.axes.Axes.get_tightbbox
matplotlib.axis.Axis.get_tightbbox
matplotlib.spines.Spine.get_window_extent

---
## _init_axis
```python
from _base import _init_axis
```



---
## set_figure
```python
from _base import set_figure
```



---
## _unstale_viewLim
```python
from _base import _unstale_viewLim
```



---
## viewLim
```python
from _base import viewLim
```



---
## _request_autoscale_view
```python
from _base import _request_autoscale_view
```

Mark a single axis, or all of them, as stale wrt. autoscaling.

No computation is performed until the next autoscaling; thus, separate
calls to control individual axises incur negligible performance cost.

Parameters
----------
axis : str, default: "all"
    Either an element of ``self._axis_names``, or "all".
tight : bool or None, default: None

---
## _set_lim_and_transforms
```python
from _base import _set_lim_and_transforms
```

Set the *_xaxis_transform*, *_yaxis_transform*, *transScale*,
*transData*, *transLimits* and *transAxes* transformations.

.. note::

    This method is primarily used by rectilinear projections of the
    `~matplotlib.axes.Axes` class, and is meant to be overridden by
    new kinds of projection Axes that need different transformations
    and limits. (See `~matplotlib.projections.polar.PolarAxes` for an
    example.)

---
## get_xaxis_transform
```python
from _base import get_xaxis_transform
```

Get the transformation used for drawing x-axis labels, ticks
and gridlines.  The x-direction is in data coordinates and the
y-direction is in axis coordinates.

.. note::

    This transformation is primarily used by the
    `~matplotlib.axis.Axis` class, and is meant to be
    overridden by new kinds of projections that may need to
    place axis elements in different locations.

Parameters
----------
which : {'grid', 'tick1', 'tick2'}

---
## get_xaxis_text1_transform
```python
from _base import get_xaxis_text1_transform
```

Returns
-------
transform : Transform
    The transform used for drawing x-axis labels, which will add
    *pad_points* of padding (in points) between the axis and the label.
    The x-direction is in data coordinates and the y-direction is in
    axis coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.

---
## get_xaxis_text2_transform
```python
from _base import get_xaxis_text2_transform
```

Returns
-------
transform : Transform
    The transform used for drawing secondary x-axis labels, which will
    add *pad_points* of padding (in points) between the axis and the
    label.  The x-direction is in data coordinates and the y-direction
    is in axis coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.

---
## get_yaxis_transform
```python
from _base import get_yaxis_transform
```

Get the transformation used for drawing y-axis labels, ticks
and gridlines.  The x-direction is in axis coordinates and the
y-direction is in data coordinates.

.. note::

    This transformation is primarily used by the
    `~matplotlib.axis.Axis` class, and is meant to be
    overridden by new kinds of projections that may need to
    place axis elements in different locations.

Parameters
----------
which : {'grid', 'tick1', 'tick2'}

---
## get_yaxis_text1_transform
```python
from _base import get_yaxis_text1_transform
```

Returns
-------
transform : Transform
    The transform used for drawing y-axis labels, which will add
    *pad_points* of padding (in points) between the axis and the label.
    The x-direction is in axis coordinates and the y-direction is in
    data coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.

---
## get_yaxis_text2_transform
```python
from _base import get_yaxis_text2_transform
```

Returns
-------
transform : Transform
    The transform used for drawing secondart y-axis labels, which will
    add *pad_points* of padding (in points) between the axis and the
    label.  The x-direction is in axis coordinates and the y-direction
    is in data coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.

---
## _update_transScale
```python
from _base import _update_transScale
```



---
## get_position
```python
from _base import get_position
```

Return the position of the Axes within the figure as a `.Bbox`.

Parameters
----------
original : bool
    If ``True``, return the original position. Otherwise, return the
    active position. For an explanation of the positions see
    `.set_position`.

Returns
-------
`.Bbox`

---
## set_position
```python
from _base import set_position
```

Set the Axes position.

Axes have two position attributes. The 'original' position is the
position allocated for the Axes. The 'active' position is the
position the Axes is actually drawn at. These positions are usually
the same unless a fixed aspect is set to the Axes. See
`.Axes.set_aspect` for details.

Parameters
----------
pos : [left, bottom, width, height] or `~matplotlib.transforms.Bbox`
    The new position of the Axes in `.Figure` coordinates.

which : {'both', 'active', 'original'}, default: 'both'
    Determines which position variables to change.

See Also
--------
matplotlib.transforms.Bbox.from_bounds
matplotlib.transforms.Bbox.from_extents

---
## _set_position
```python
from _base import _set_position
```

Private version of set_position.

Call this internally to get the same functionality of `set_position`,
but not to take the axis out of the constrained_layout hierarchy.

---
## reset_position
```python
from _base import reset_position
```

Reset the active position to the original position.

This undoes changes to the active position (as defined in
`.set_position`) which may have been performed to satisfy fixed-aspect
constraints.

---
## set_axes_locator
```python
from _base import set_axes_locator
```

Set the Axes locator.

Parameters
----------
locator : Callable[[Axes, Renderer], Bbox]

---
## get_axes_locator
```python
from _base import get_axes_locator
```

Return the axes_locator.

---
## _set_artist_props
```python
from _base import _set_artist_props
```

Set the boilerplate props for artists added to Axes.

---
## _gen_axes_patch
```python
from _base import _gen_axes_patch
```

Returns
-------
Patch
    The patch used to draw the background of the Axes.  It is also used
    as the clipping path for any data elements on the Axes.

    In the standard Axes, this is a rectangle, but in other projections
    it may not be.

Notes
-----
Intended to be overridden by new projection types.

---
## _gen_axes_spines
```python
from _base import _gen_axes_spines
```

Returns
-------
dict
    Mapping of spine names to `.Line2D` or `.Patch` instances that are
    used to draw Axes spines.

    In the standard Axes, spines are single line segments, but in other
    projections they may not be.

Notes
-----
Intended to be overridden by new projection types.

---
## sharex
```python
from _base import sharex
```

Share the x-axis with *other*.

This is equivalent to passing ``sharex=other`` when constructing the
Axes, and cannot be used if the x-axis is already being shared with
another Axes.  Note that it is not possible to unshare axes.

---
## sharey
```python
from _base import sharey
```

Share the y-axis with *other*.

This is equivalent to passing ``sharey=other`` when constructing the
Axes, and cannot be used if the y-axis is already being shared with
another Axes.  Note that it is not possible to unshare axes.

---
## __clear
```python
from _base import __clear
```

Clear the Axes.

---
## clear
```python
from _base import clear
```

Clear the Axes.

---
## cla
```python
from _base import cla
```

Clear the Axes.

---
## ArtistList
```python
from _base import ArtistList
```

A sublist of Axes children based on their type.

The type-specific children sublists were made immutable in Matplotlib
3.7.  In the future these artist lists may be replaced by tuples. Use
as if this is a tuple already.

---
## artists
```python
from _base import artists
```



---
## collections
```python
from _base import collections
```



---
## images
```python
from _base import images
```



---
## lines
```python
from _base import lines
```



---
## patches
```python
from _base import patches
```



---
## tables
```python
from _base import tables
```



---
## texts
```python
from _base import texts
```



---
## get_facecolor
```python
from _base import get_facecolor
```

Get the facecolor of the Axes.

---
## set_facecolor
```python
from _base import set_facecolor
```

Set the facecolor of the Axes.

Parameters
----------
color : :mpltype:`color`

---
## _set_title_offset_trans
```python
from _base import _set_title_offset_trans
```

Set the offset for the title either from :rc:`axes.titlepad`
or from set_title kwarg ``pad``.

---
## get_aspect
```python
from _base import get_aspect
```

Return the aspect ratio of the Axes scaling.

This is either "auto" or a float giving the ratio of y/x-scale.

---
## set_aspect
```python
from _base import set_aspect
```

Set the aspect ratio of the Axes scaling, i.e. y/x-scale.

Parameters
----------
aspect : {'auto', 'equal'} or float
    Possible values:

    - 'auto': fill the position rectangle with data.
    - 'equal': same as ``aspect=1``, i.e. same scaling for x and y.
    - *float*: The displayed size of 1 unit in y-data coordinates will
      be *aspect* times the displayed size of 1 unit in x-data
      coordinates; e.g. for ``aspect=2`` a square in data coordinates
      will be rendered with a height of twice its width.

adjustable : None or {'box', 'datalim'}, optional
    If not ``None``, this defines which parameter will be adjusted to
    meet the required aspect. See `.set_adjustable` for further
    details.

anchor : None or str or (float, float), optional
    If not ``None``, this defines where the Axes will be drawn if there
    is extra space due to aspect constraints. The most common way
    to specify the anchor are abbreviations of cardinal directions:

    =====   =====================
    value   description
    =====   =====================
    'C'     centered
    'SW'    lower left corner
    'S'     middle of bottom edge
    'SE'    lower right corner
    etc.
    =====   =====================

    See `~.Axes.set_anchor` for further details.

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
    Set the position in case of extra space.

---
## get_adjustable
```python
from _base import get_adjustable
```

Return whether the Axes will adjust its physical dimension ('box') or
its data limits ('datalim') to achieve the desired aspect ratio.

See Also
--------
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_aspect
    For a description of aspect handling.

---
## set_adjustable
```python
from _base import set_adjustable
```

Set how the Axes adjusts to achieve the required aspect ratio.

Parameters
----------
adjustable : {'box', 'datalim'}
    If 'box', change the physical dimensions of the Axes.
    If 'datalim', change the ``x`` or ``y`` data limits.

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    For a description of aspect handling.

Notes
-----
Shared Axes (of which twinned Axes are a special case)
impose restrictions on how aspect ratios can be imposed.
For twinned Axes, use 'datalim'.  For Axes that share both
x and y, use 'box'.  Otherwise, either 'datalim' or 'box'
may be used.  These limitations are partly a requirement
to avoid over-specification, and partly a result of the
particular implementation we are currently using, in
which the adjustments for aspect ratios are done sequentially
and independently on each Axes as it is drawn.

---
## get_box_aspect
```python
from _base import get_box_aspect
```

Return the Axes box aspect, i.e. the ratio of height to width.

The box aspect is ``None`` (i.e. chosen depending on the available
figure space) unless explicitly specified.

See Also
--------
matplotlib.axes.Axes.set_box_aspect
    for a description of box aspect.
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.

---
## set_box_aspect
```python
from _base import set_box_aspect
```

Set the Axes box aspect, i.e. the ratio of height to width.

This defines the aspect of the Axes in figure space and is not to be
confused with the data aspect (see `~.Axes.set_aspect`).

Parameters
----------
aspect : float or None
    Changes the physical dimensions of the Axes, such that the ratio
    of the Axes height to the Axes width in physical units is equal to
    *aspect*. Defining a box aspect will change the *adjustable*
    property to 'datalim' (see `~.Axes.set_adjustable`).

    *None* will disable a fixed box aspect so that height and width
    of the Axes are chosen independently.

See Also
--------
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.

---
## get_anchor
```python
from _base import get_anchor
```

Get the anchor location.

See Also
--------
matplotlib.axes.Axes.set_anchor
    for a description of the anchor.
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.

---
## set_anchor
```python
from _base import set_anchor
```

Define the anchor location.

The actual drawing area (active position) of the Axes may be smaller
than the Bbox (original position) when a fixed aspect is required. The
anchor defines where the drawing area will be located within the
available space.

Parameters
----------
anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
    Either an (*x*, *y*) pair of relative coordinates (0 is left or
    bottom, 1 is right or top), 'C' (center), or a cardinal direction
    ('SW', southwest, is bottom left, etc.).  str inputs are shorthands
    for (*x*, *y*) coordinates, as shown in the following diagram::

       ┌─────────────────┬─────────────────┬─────────────────┐
       │ 'NW' (0.0, 1.0) │ 'N' (0.5, 1.0)  │ 'NE' (1.0, 1.0) │
       ├─────────────────┼─────────────────┼─────────────────┤
       │ 'W'  (0.0, 0.5) │ 'C' (0.5, 0.5)  │ 'E'  (1.0, 0.5) │
       ├─────────────────┼─────────────────┼─────────────────┤
       │ 'SW' (0.0, 0.0) │ 'S' (0.5, 0.0)  │ 'SE' (1.0, 0.0) │
       └─────────────────┴─────────────────┴─────────────────┘

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.

---
## get_data_ratio
```python
from _base import get_data_ratio
```

Return the aspect ratio of the scaled data.

Notes
-----
This method is intended to be overridden by new projection types.

---
## apply_aspect
```python
from _base import apply_aspect
```

Adjust the Axes for a specified data aspect ratio.

Depending on `.get_adjustable` this will modify either the
Axes box (position) or the view limits. In the former case,
`~matplotlib.axes.Axes.get_anchor` will affect the position.

Parameters
----------
position : None or .Bbox

    .. note::
        This parameter exists for historic reasons and is considered
        internal. End users should not use it.

    If not ``None``, this defines the position of the
    Axes within the figure as a Bbox. See `~.Axes.get_position`
    for further details.

Notes
-----
This is called automatically when each Axes is drawn.  You may need
to call it yourself if you need to update the Axes position and/or
view limits before the Figure is drawn.

An alternative with a broader scope is `.Figure.draw_without_rendering`,
which updates all stale components of a figure, not only the positioning /
view limits of a single Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    For a description of aspect ratio handling.
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
    Set the position in case of extra space.
matplotlib.figure.Figure.draw_without_rendering
    Update all stale components of a figure.

Examples
--------
A typical usage example would be the following. `~.Axes.imshow` sets the
aspect to 1, but adapting the Axes position and extent to reflect this is
deferred until rendering for performance reasons. If you want to know the
Axes size before, you need to call `.apply_aspect` to get the correct
values.

>>> fig, ax = plt.subplots()
>>> ax.imshow(np.zeros((3, 3)))
>>> ax.bbox.width, ax.bbox.height
(496.0, 369.59999999999997)
>>> ax.apply_aspect()
>>> ax.bbox.width, ax.bbox.height
(369.59999999999997, 369.59999999999997)

---
## axis
```python
from _base import axis
```

Convenience method to get or set some axis properties.

Call signatures::

  xmin, xmax, ymin, ymax = axis()
  xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax])
  xmin, xmax, ymin, ymax = axis(option)
  xmin, xmax, ymin, ymax = axis(**kwargs)

Parameters
----------
xmin, xmax, ymin, ymax : float, optional
    The axis limits to be set.  This can also be achieved using ::

        ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))

option : bool or str
    If a bool, turns axis lines and labels on or off. If a string,
    possible values are:

    ================ ===========================================================
    Value            Description
    ================ ===========================================================
    'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_off()`.
    'on' or `True`   Do not hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_on()`.
    'equal'          Set equal scaling (i.e., make circles circular) by
                     changing the axis limits. This is the same as
                     ``ax.set_aspect('equal', adjustable='datalim')``.
                     Explicit data limits may not be respected in this case.
    'scaled'         Set equal scaling (i.e., make circles circular) by
                     changing dimensions of the plot box. This is the same as
                     ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
                     Additionally, further autoscaling will be disabled.
    'tight'          Set limits just large enough to show all data, then
                     disable further autoscaling.
    'auto'           Automatic scaling (fill plot box with data).
    'image'          'scaled' with axis limits equal to data limits.
    'square'         Square plot; similar to 'scaled', but initially forcing
                     ``xmax-xmin == ymax-ymin``.
    ================ ===========================================================

emit : bool, default: True
    Whether observers are notified of the axis limit change.
    This option is passed on to `~.Axes.set_xlim` and
    `~.Axes.set_ylim`.

Returns
-------
xmin, xmax, ymin, ymax : float
    The axis limits.

See Also
--------
matplotlib.axes.Axes.set_xlim
matplotlib.axes.Axes.set_ylim

Notes
-----
For 3D Axes, this method additionally takes *zmin*, *zmax* as
parameters and likewise returns them.

---
## get_legend
```python
from _base import get_legend
```

Return the `.Legend` instance, or None if no legend is defined.

---
## get_images
```python
from _base import get_images
```

Return a list of `.AxesImage`\s contained by the Axes.

---
## get_lines
```python
from _base import get_lines
```

Return a list of lines contained by the Axes.

---
## get_xaxis
```python
from _base import get_xaxis
```

[*Discouraged*] Return the XAxis instance.

.. admonition:: Discouraged

    The use of this function is discouraged. You should instead
    directly access the attribute ``ax.xaxis``.

---
## get_yaxis
```python
from _base import get_yaxis
```

[*Discouraged*] Return the YAxis instance.

.. admonition:: Discouraged

    The use of this function is discouraged. You should instead
    directly access the attribute ``ax.yaxis``.

---
## _sci
```python
from _base import _sci
```

Set the current image.

This image will be the target of colormap functions like
``pyplot.viridis``, and other functions such as `~.pyplot.clim`.  The
current image is an attribute of the current Axes.

---
## _gci
```python
from _base import _gci
```

Helper for `~matplotlib.pyplot.gci`; do not use elsewhere.

---
## has_data
```python
from _base import has_data
```

Return whether any artists have been added to the Axes.

This should not be used to determine whether the *dataLim*
need to be updated, and may not actually be useful for
anything.

---
## add_artist
```python
from _base import add_artist
```

Add an `.Artist` to the Axes; return the artist.

Use `add_artist` only for artists for which there is no dedicated
"add" method; and if necessary, use a method such as `update_datalim`
to manually update the dataLim if the artist is to be included in
autoscaling.

If no ``transform`` has been specified when creating the artist (e.g.
``artist.get_transform() == None``) then the transform is set to
``ax.transData``.

---
## add_child_axes
```python
from _base import add_child_axes
```

Add an `.AxesBase` to the Axes' children; return the child Axes.

This is the lowlevel version.  See `.axes.Axes.inset_axes`.

---
## add_collection
```python
from _base import add_collection
```

Add a `.Collection` to the Axes; return the collection.

---
## add_image
```python
from _base import add_image
```

Add an `.AxesImage` to the Axes; return the image.

---
## _update_image_limits
```python
from _base import _update_image_limits
```



---
## add_line
```python
from _base import add_line
```

Add a `.Line2D` to the Axes; return the line.

---
## _add_text
```python
from _base import _add_text
```

Add a `.Text` to the Axes; return the text.

---
## _update_line_limits
```python
from _base import _update_line_limits
```

Figures out the data limit of the given line, updating self.dataLim.

---
## add_patch
```python
from _base import add_patch
```

Add a `.Patch` to the Axes; return the patch.

---
## _update_patch_limits
```python
from _base import _update_patch_limits
```

Update the data limits for the given patch.

---
## add_table
```python
from _base import add_table
```

Add a `.Table` to the Axes; return the table.

---
## add_container
```python
from _base import add_container
```

Add a `.Container` to the Axes' containers; return the container.

---
## _unit_change_handler
```python
from _base import _unit_change_handler
```

Process axis units changes: requests updates to data and view limits.

---
## relim
```python
from _base import relim
```

Recompute the data limits based on current artists.

At present, `.Collection` instances are not supported.

Parameters
----------
visible_only : bool, default: False
    Whether to exclude invisible artists.

---
## update_datalim
```python
from _base import update_datalim
```

Extend the `~.Axes.dataLim` Bbox to include the given points.

If no data is set currently, the Bbox will ignore its limits and set
the bound to be the bounds of the xydata (*xys*). Otherwise, it will
compute the bounds of the union of its current data and the data in
*xys*.

Parameters
----------
xys : 2D array-like
    The points to include in the data limits Bbox. This can be either
    a list of (x, y) tuples or a (N, 2) array.

updatex, updatey : bool, default: True
    Whether to update the x/y limits.

---
## _process_unit_info
```python
from _base import _process_unit_info
```

Set axis units based on *datasets* and *kwargs*, and optionally apply
unit conversions to *datasets*.

Parameters
----------
datasets : list
    List of (axis_name, dataset) pairs (where the axis name is defined
    as in `._axis_map`).  Individual datasets can also be None
    (which gets passed through).
kwargs : dict
    Other parameters from which unit info (i.e., the *xunits*,
    *yunits*, *zunits* (for 3D Axes), *runits* and *thetaunits* (for
    polar) entries) is popped, if present.  Note that this dict is
    mutated in-place!
convert : bool, default: True
    Whether to return the original datasets or the converted ones.

Returns
-------
list
    Either the original datasets if *convert* is False, or the
    converted ones if *convert* is True (the default).

---
## in_axes
```python
from _base import in_axes
```

Return whether the given event (in display coords) is in the Axes.

---
## get_autoscale_on
```python
from _base import get_autoscale_on
```

Return True if each axis is autoscaled, False otherwise.

---
## set_autoscale_on
```python
from _base import set_autoscale_on
```

Set whether autoscaling is applied to each axis on the next draw or
call to `.Axes.autoscale_view`.

Parameters
----------
b : bool

---
## use_sticky_edges
```python
from _base import use_sticky_edges
```



---
## get_xmargin
```python
from _base import get_xmargin
```

Retrieve autoscaling margin of the x-axis.

.. versionadded:: 3.9

Returns
-------
xmargin : float

See Also
--------
matplotlib.axes.Axes.set_xmargin

---
## get_ymargin
```python
from _base import get_ymargin
```

Retrieve autoscaling margin of the y-axis.

.. versionadded:: 3.9

Returns
-------
ymargin : float

See Also
--------
matplotlib.axes.Axes.set_ymargin

---
## set_xmargin
```python
from _base import set_xmargin
```

Set padding of X data limits prior to autoscaling.

*m* times the data interval will be added to each end of that interval
before it is used in autoscaling.  If *m* is negative, this will clip
the data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 will
result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
of [0.2, 1.8].

Parameters
----------
m : float greater than -0.5

---
## set_ymargin
```python
from _base import set_ymargin
```

Set padding of Y data limits prior to autoscaling.

*m* times the data interval will be added to each end of that interval
before it is used in autoscaling.  If *m* is negative, this will clip
the data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 will
result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
of [0.2, 1.8].

Parameters
----------
m : float greater than -0.5

---
## margins
```python
from _base import margins
```

Set or retrieve autoscaling margins.

The padding added to each limit of the Axes is the *margin*
times the data interval. All input parameters must be floats
greater than -0.5. Passing both positional and keyword
arguments is invalid and will raise a TypeError. If no
arguments (positional or otherwise) are provided, the current
margins will remain unchanged and simply be returned.

Specifying any margin changes only the autoscaling; for example,
if *xmargin* is not None, then *xmargin* times the X data
interval will be added to each end of that interval before
it is used in autoscaling.

Parameters
----------
*margins : float, optional
    If a single positional argument is provided, it specifies
    both margins of the x-axis and y-axis limits. If two
    positional arguments are provided, they will be interpreted
    as *xmargin*, *ymargin*. If setting the margin on a single
    axis is desired, use the keyword arguments described below.

x, y : float, optional
    Specific margin values for the x-axis and y-axis,
    respectively. These cannot be used with positional
    arguments, but can be used individually to alter on e.g.,
    only the y-axis.

tight : bool or None, default: True
    The *tight* parameter is passed to `~.axes.Axes.autoscale_view`,
    which is executed after a margin is changed; the default
    here is *True*, on the assumption that when margins are
    specified, no additional padding to match tick marks is
    usually desired.  Setting *tight* to *None* preserves
    the previous setting.

Returns
-------
xmargin, ymargin : float

Notes
-----
If a previously used Axes method such as :meth:`pcolor` has set
:attr:`use_sticky_edges` to `True`, only the limits not set by
the "sticky artists" will be modified. To force all of the
margins to be set, set :attr:`use_sticky_edges` to `False`
before calling :meth:`margins`.

---
## set_rasterization_zorder
```python
from _base import set_rasterization_zorder
```

Set the zorder threshold for rasterization for vector graphics output.

All artists with a zorder below the given value will be rasterized if
they support rasterization.

This setting is ignored for pixel-based output.

See also :doc:`/gallery/misc/rasterization_demo`.

Parameters
----------
z : float or None
    The zorder below which artists are rasterized.
    If ``None`` rasterization based on zorder is deactivated.

---
## get_rasterization_zorder
```python
from _base import get_rasterization_zorder
```

Return the zorder value below which artists will be rasterized.

---
## autoscale
```python
from _base import autoscale
```

Autoscale the axis view to the data (toggle).

Convenience method for simple axis view autoscaling.
It turns autoscaling on or off, and then,
if autoscaling for either axis is on, it performs
the autoscaling on the specified axis or Axes.

Parameters
----------
enable : bool or None, default: True
    True turns autoscaling on, False turns it off.
    None leaves the autoscaling state unchanged.
axis : {'both', 'x', 'y'}, default: 'both'
    The axis on which to operate.  (For 3D Axes, *axis* can also be set
    to 'z', and 'both' refers to all three Axes.)
tight : bool or None, default: None
    If True, first set the margins to zero.  Then, this argument is
    forwarded to `~.axes.Axes.autoscale_view` (regardless of
    its value); see the description of its behavior there.

---
## autoscale_view
```python
from _base import autoscale_view
```

Autoscale the view limits using the data limits.

Parameters
----------
tight : bool or None
    If *True*, only expand the axis limits using the margins.  Note
    that unlike for `autoscale`, ``tight=True`` does *not* set the
    margins to zero.

    If *False* and :rc:`axes.autolimit_mode` is 'round_numbers', then
    after expansion by the margins, further expand the axis limits
    using the axis major locator.

    If None (the default), reuse the value set in the previous call to
    `autoscale_view` (the initial value is False, but the default style
    sets :rc:`axes.autolimit_mode` to 'data', in which case this
    behaves like True).

scalex : bool, default: True
    Whether to autoscale the x-axis.

scaley : bool, default: True
    Whether to autoscale the y-axis.

Notes
-----
The autoscaling preserves any preexisting axis direction reversal.

The data limits are not updated automatically when artist data are
changed after the artist has been added to an Axes instance.  In that
case, use :meth:`matplotlib.axes.Axes.relim` prior to calling
autoscale_view.

If the views of the Axes are fixed, e.g. via `set_xlim`, they will
not be changed by autoscale_view().
See :meth:`matplotlib.axes.Axes.autoscale` for an alternative.

---
## _update_title_position
```python
from _base import _update_title_position
```

Update the title position based on the bounding box enclosing
all the ticklabels and x-axis spine and xlabel...

---
## draw
```python
from _base import draw
```



---
## draw_artist
```python
from _base import draw_artist
```

Efficiently redraw a single artist.

---
## redraw_in_frame
```python
from _base import redraw_in_frame
```

Efficiently redraw Axes data, but not axis ticks, labels, etc.

---
## get_frame_on
```python
from _base import get_frame_on
```

Get whether the Axes rectangle patch is drawn.

---
## set_frame_on
```python
from _base import set_frame_on
```

Set whether the Axes rectangle patch is drawn.

Parameters
----------
b : bool

---
## get_axisbelow
```python
from _base import get_axisbelow
```

Get whether axis ticks and gridlines are above or below most artists.

Returns
-------
bool or 'line'

See Also
--------
set_axisbelow

---
## set_axisbelow
```python
from _base import set_axisbelow
```

Set whether axis ticks and gridlines are above or below most artists.

This controls the zorder of the ticks and gridlines. For more
information on the zorder see :doc:`/gallery/misc/zorder_demo`.

Parameters
----------
b : bool or 'line'
    Possible values:

    - *True* (zorder = 0.5): Ticks and gridlines are below patches and
      lines, though still above images.
    - 'line' (zorder = 1.5): Ticks and gridlines are above patches
      (e.g. rectangles, with default zorder = 1) but still below lines
      and markers (with their default zorder = 2).
    - *False* (zorder = 2.5): Ticks and gridlines are above patches
      and lines / markers.

Notes
-----
For more control, call the `~.Artist.set_zorder` method of each axis.

See Also
--------
get_axisbelow

---
## grid
```python
from _base import grid
```

Configure the grid lines.

Parameters
----------
visible : bool or None, optional
    Whether to show the grid lines.  If any *kwargs* are supplied, it
    is assumed you want the grid on and *visible* will be set to True.

    If *visible* is *None* and there are no *kwargs*, this toggles the
    visibility of the lines.

which : {'major', 'minor', 'both'}, optional
    The grid lines to apply the changes on.

axis : {'both', 'x', 'y'}, optional
    The axis to apply the changes on.

**kwargs : `~matplotlib.lines.Line2D` properties
    Define the line properties of the grid, e.g.::

        grid(color='r', linestyle='-', linewidth=2)

    Valid keyword arguments are:

    %(Line2D:kwdoc)s

Notes
-----
The axis is drawn as a unit, so the effective zorder for drawing the
grid is determined by the zorder of each axis, not by the zorder of the
`.Line2D` objects comprising the grid.  Therefore, to set grid zorder,
use `.set_axisbelow` or, for more control, call the
`~.Artist.set_zorder` method of each axis.

---
## ticklabel_format
```python
from _base import ticklabel_format
```

Configure the `.ScalarFormatter` used by default for linear Axes.

If a parameter is not set, the corresponding property of the formatter
is left unchanged.

Parameters
----------
axis : {'x', 'y', 'both'}, default: 'both'
    The axis to configure.  Only major ticks are affected.

style : {'sci', 'scientific', 'plain'}
    Whether to use scientific notation.
    The formatter default is to use scientific notation.
    'sci' is equivalent to 'scientific'.

scilimits : pair of ints (m, n)
    Scientific notation is used only for numbers outside the range
    10\ :sup:`m` to 10\ :sup:`n` (and only if the formatter is
    configured to use scientific notation at all).  Use (0, 0) to
    include all numbers.  Use (m, m) where m != 0 to fix the order of
    magnitude to 10\ :sup:`m`.
    The formatter default is :rc:`axes.formatter.limits`.

useOffset : bool or float
    If True, the offset is calculated as needed.
    If False, no offset is used.
    If a numeric value, it sets the offset.
    The formatter default is :rc:`axes.formatter.useoffset`.

useLocale : bool
    Whether to format the number using the current locale or using the
    C (English) locale.  This affects e.g. the decimal separator.  The
    formatter default is :rc:`axes.formatter.use_locale`.

useMathText : bool
    Render the offset and scientific notation in mathtext.
    The formatter default is :rc:`axes.formatter.use_mathtext`.

Raises
------
AttributeError
    If the current formatter is not a `.ScalarFormatter`.

---
## locator_params
```python
from _base import locator_params
```

Control behavior of major tick locators.

Because the locator is involved in autoscaling, `~.Axes.autoscale_view`
is called automatically after the parameters are changed.

Parameters
----------
axis : {'both', 'x', 'y'}, default: 'both'
    The axis on which to operate.  (For 3D Axes, *axis* can also be
    set to 'z', and 'both' refers to all three axes.)
tight : bool or None, optional
    Parameter passed to `~.Axes.autoscale_view`.
    Default is None, for no change.

Other Parameters
----------------
**kwargs
    Remaining keyword arguments are passed to directly to the
    ``set_params()`` method of the locator. Supported keywords depend
    on the type of the locator. See for example
    `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator`
    used by default for linear.

Examples
--------
When plotting small subplots, one might want to reduce the maximum
number of ticks and use tight bounds, for example::

    ax.locator_params(tight=True, nbins=4)

---
## tick_params
```python
from _base import tick_params
```

Change the appearance of ticks, tick labels, and gridlines.

Tick properties that are not explicitly set using the keyword
arguments remain unchanged unless *reset* is True. For the current
style settings, see `.Axis.get_tick_params`.

Parameters
----------
axis : {'x', 'y', 'both'}, default: 'both'
    The axis to which the parameters are applied.
which : {'major', 'minor', 'both'}, default: 'major'
    The group of ticks to which the parameters are applied.
reset : bool, default: False
    Whether to reset the ticks to defaults before updating them.

Other Parameters
----------------
direction : {'in', 'out', 'inout'}
    Puts ticks inside the Axes, outside the Axes, or both.
length : float
    Tick length in points.
width : float
    Tick width in points.
color : :mpltype:`color`
    Tick color.
pad : float
    Distance in points between tick and label.
labelsize : float or str
    Tick label font size in points or as a string (e.g., 'large').
labelcolor : :mpltype:`color`
    Tick label color.
labelfontfamily : str
    Tick label font.
colors : :mpltype:`color`
    Tick color and label color.
zorder : float
    Tick and label zorder.
bottom, top, left, right : bool
    Whether to draw the respective ticks.
labelbottom, labeltop, labelleft, labelright : bool
    Whether to draw the respective tick labels.
labelrotation : float
    Tick label rotation
grid_color : :mpltype:`color`
    Gridline color.
grid_alpha : float
    Transparency of gridlines: 0 (transparent) to 1 (opaque).
grid_linewidth : float
    Width of gridlines in points.
grid_linestyle : str
    Any valid `.Line2D` line style spec.

Examples
--------
::

    ax.tick_params(direction='out', length=6, width=2, colors='r',
                   grid_color='r', grid_alpha=0.5)

This will make all major ticks be red, pointing out of the box,
and with dimensions 6 points by 2 points.  Tick labels will
also be red.  Gridlines will be red and translucent.

---
## set_axis_off
```python
from _base import set_axis_off
```

Hide all visual components of the x- and y-axis.

This sets a flag to suppress drawing of all axis decorations, i.e.
axis labels, axis spines, and the axis tick component (tick markers,
tick labels, and grid lines). Individual visibility settings of these
components are ignored as long as `set_axis_off()` is in effect.

---
## set_axis_on
```python
from _base import set_axis_on
```

Do not hide all visual components of the x- and y-axis.

This reverts the effect of a prior `.set_axis_off()` call. Whether the
individual axis decorations are drawn is controlled by their respective
visibility settings.

This is on by default.

---
## get_xlabel
```python
from _base import get_xlabel
```

Get the xlabel text string.

---
## set_xlabel
```python
from _base import set_xlabel
```

Set the label for the x-axis.

Parameters
----------
xlabel : str
    The label text.

labelpad : float, default: :rc:`axes.labelpad`
    Spacing in points from the Axes bounding box including ticks
    and tick labels.  If None, the previous value is left as is.

loc : {'left', 'center', 'right'}, default: :rc:`xaxis.labellocation`
    The label position. This is a high-level alternative for passing
    parameters *x* and *horizontalalignment*.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    `.Text` properties control the appearance of the label.

See Also
--------
text : Documents the properties supported by `.Text`.

---
## invert_xaxis
```python
from _base import invert_xaxis
```

Invert the x-axis.

See Also
--------
xaxis_inverted
get_xlim, set_xlim
get_xbound, set_xbound

---
## get_xbound
```python
from _base import get_xbound
```

Return the lower and upper x-axis bounds, in increasing order.

See Also
--------
set_xbound
get_xlim, set_xlim
invert_xaxis, xaxis_inverted

---
## set_xbound
```python
from _base import set_xbound
```

Set the lower and upper numerical bounds of the x-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscalex_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.

    .. ACCEPTS: (lower: float, upper: float)

See Also
--------
get_xbound
get_xlim, set_xlim
invert_xaxis, xaxis_inverted

---
## get_xlim
```python
from _base import get_xlim
```

Return the x-axis view limits.

Returns
-------
left, right : (float, float)
    The current x-axis limits in data coordinates.

See Also
--------
.Axes.set_xlim
.Axes.set_xbound, .Axes.get_xbound
.Axes.invert_xaxis, .Axes.xaxis_inverted

Notes
-----
The x-axis may be inverted, in which case the *left* value will
be greater than the *right* value.

---
## _validate_converted_limits
```python
from _base import _validate_converted_limits
```

Raise ValueError if converted limits are non-finite.

Note that this function also accepts None as a limit argument.

Returns
-------
The limit value after call to convert(), or None if limit is None.

---
## set_xlim
```python
from _base import set_xlim
```

Set the x-axis view limits.

Parameters
----------
left : float, optional
    The left xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The left and right xlims may also be passed as the tuple
    (*left*, *right*) as the first positional argument (or as
    the *left* keyword argument).

    .. ACCEPTS: (left: float, right: float)

right : float, optional
    The right xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the x-axis. True turns on,
    False turns off, None leaves unchanged.

xmin, xmax : float, optional
    They are equivalent to left and right respectively, and it is an
    error to pass both *xmin* and *left* or *xmax* and *right*.

Returns
-------
left, right : (float, float)
    The new x-axis limits in data coordinates.

See Also
--------
get_xlim
set_xbound, get_xbound
invert_xaxis, xaxis_inverted

Notes
-----
The *left* value may be greater than the *right* value, in which
case the x-axis values will decrease from left to right.

Examples
--------
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)

One limit may be left unchanged.

>>> set_xlim(right=right_lim)

Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose *x* represents the number of
years before present. The x-axis limits might be set like the
following so 5000 years ago is on the left of the plot and the
present is on the right.

>>> set_xlim(5000, 0)

---
## get_ylabel
```python
from _base import get_ylabel
```

Get the ylabel text string.

---
## set_ylabel
```python
from _base import set_ylabel
```

Set the label for the y-axis.

Parameters
----------
ylabel : str
    The label text.

labelpad : float, default: :rc:`axes.labelpad`
    Spacing in points from the Axes bounding box including ticks
    and tick labels.  If None, the previous value is left as is.

loc : {'bottom', 'center', 'top'}, default: :rc:`yaxis.labellocation`
    The label position. This is a high-level alternative for passing
    parameters *y* and *horizontalalignment*.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    `.Text` properties control the appearance of the label.

See Also
--------
text : Documents the properties supported by `.Text`.

---
## invert_yaxis
```python
from _base import invert_yaxis
```

Invert the y-axis.

See Also
--------
yaxis_inverted
get_ylim, set_ylim
get_ybound, set_ybound

---
## get_ybound
```python
from _base import get_ybound
```

Return the lower and upper y-axis bounds, in increasing order.

See Also
--------
set_ybound
get_ylim, set_ylim
invert_yaxis, yaxis_inverted

---
## set_ybound
```python
from _base import set_ybound
```

Set the lower and upper numerical bounds of the y-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscaley_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.

 .. ACCEPTS: (lower: float, upper: float)

See Also
--------
get_ybound
get_ylim, set_ylim
invert_yaxis, yaxis_inverted

---
## get_ylim
```python
from _base import get_ylim
```

Return the y-axis view limits.

Returns
-------
bottom, top : (float, float)
    The current y-axis limits in data coordinates.

See Also
--------
.Axes.set_ylim
.Axes.set_ybound, .Axes.get_ybound
.Axes.invert_yaxis, .Axes.yaxis_inverted

Notes
-----
The y-axis may be inverted, in which case the *bottom* value
will be greater than the *top* value.

---
## set_ylim
```python
from _base import set_ylim
```

Set the y-axis view limits.

Parameters
----------
bottom : float, optional
    The bottom ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The bottom and top ylims may also be passed as the tuple
    (*bottom*, *top*) as the first positional argument (or as
    the *bottom* keyword argument).

    .. ACCEPTS: (bottom: float, top: float)

top : float, optional
    The top ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the y-axis. *True* turns on,
    *False* turns off, *None* leaves unchanged.

ymin, ymax : float, optional
    They are equivalent to bottom and top respectively, and it is an
    error to pass both *ymin* and *bottom* or *ymax* and *top*.

Returns
-------
bottom, top : (float, float)
    The new y-axis limits in data coordinates.

See Also
--------
get_ylim
set_ybound, get_ybound
invert_yaxis, yaxis_inverted

Notes
-----
The *bottom* value may be greater than the *top* value, in which
case the y-axis values will decrease from *bottom* to *top*.

Examples
--------
>>> set_ylim(bottom, top)
>>> set_ylim((bottom, top))
>>> bottom, top = set_ylim(bottom, top)

One limit may be left unchanged.

>>> set_ylim(top=top_lim)

Limits may be passed in reverse order to flip the direction of
the y-axis. For example, suppose ``y`` represents depth of the
ocean in m. The y-axis limits might be set like the following
so 5000 m depth is at the bottom of the plot and the surface,
0 m, is at the top.

>>> set_ylim(5000, 0)

---
## format_xdata
```python
from _base import format_xdata
```

Return *x* formatted as an x-value.

This function will use the `.fmt_xdata` attribute if it is not None,
else will fall back on the xaxis major formatter.

---
## format_ydata
```python
from _base import format_ydata
```

Return *y* formatted as a y-value.

This function will use the `.fmt_ydata` attribute if it is not None,
else will fall back on the yaxis major formatter.

---
## format_coord
```python
from _base import format_coord
```

Return a format string formatting the *x*, *y* coordinates.

---
## minorticks_on
```python
from _base import minorticks_on
```

Display minor ticks on the Axes.

Displaying minor ticks may reduce performance; you may turn them off
using `minorticks_off()` if drawing speed is a problem.

---
## minorticks_off
```python
from _base import minorticks_off
```

Remove minor ticks from the Axes.

---
## can_zoom
```python
from _base import can_zoom
```

Return whether this Axes supports the zoom box button functionality.

---
## can_pan
```python
from _base import can_pan
```

Return whether this Axes supports any pan/zoom button functionality.

---
## get_navigate
```python
from _base import get_navigate
```

Get whether the Axes responds to navigation commands.

---
## set_navigate
```python
from _base import set_navigate
```

Set whether the Axes responds to navigation toolbar commands.

Parameters
----------
b : bool

See Also
--------
matplotlib.axes.Axes.set_forward_navigation_events

---
## get_navigate_mode
```python
from _base import get_navigate_mode
```

Get the navigation toolbar button status: 'PAN', 'ZOOM', or None.

---
## set_navigate_mode
```python
from _base import set_navigate_mode
```

Set the navigation toolbar button status.

.. warning::
    This is not a user-API function.

---
## _get_view
```python
from _base import _get_view
```

Save information required to reproduce the current view.

This method is called before a view is changed, such as during a pan or zoom
initiated by the user.  It returns an opaque object that describes the current
view, in a format compatible with :meth:`_set_view`.

The default implementation saves the view limits and autoscaling state.
Subclasses may override this as needed, as long as :meth:`_set_view` is also
adjusted accordingly.

---
## _set_view
```python
from _base import _set_view
```

Apply a previously saved view.

This method is called when restoring a view (with the return value of
:meth:`_get_view` as argument), such as with the navigation buttons.

Subclasses that override :meth:`_get_view` also need to override this method
accordingly.

---
## _prepare_view_from_bbox
```python
from _base import _prepare_view_from_bbox
```

Helper function to prepare the new bounds from a bbox.

This helper function returns the new x and y bounds from the zoom
bbox. This a convenience method to abstract the bbox logic
out of the base setter.

---
## _set_view_from_bbox
```python
from _base import _set_view_from_bbox
```

Update view from a selection bbox.

.. note::

    Intended to be overridden by new projection types, but if not, the
    default implementation sets the view limits to the bbox directly.

Parameters
----------
bbox : 4-tuple or 3 tuple
    * If bbox is a 4 tuple, it is the selected bounding box limits,
      in *display* coordinates.
    * If bbox is a 3 tuple, it is an (xp, yp, scl) triple, where
      (xp, yp) is the center of zooming and scl the scale factor to
      zoom by.

direction : str
    The direction to apply the bounding box.
        * `'in'` - The bounding box describes the view directly, i.e.,
                   it zooms in.
        * `'out'` - The bounding box describes the size to make the
                    existing view, i.e., it zooms out.

mode : str or None
    The selection mode, whether to apply the bounding box in only the
    `'x'` direction, `'y'` direction or both (`None`).

twinx : bool
    Whether this axis is twinned in the *x*-direction.

twiny : bool
    Whether this axis is twinned in the *y*-direction.

---
## start_pan
```python
from _base import start_pan
```

Called when a pan operation has started.

Parameters
----------
x, y : float
    The mouse coordinates in display coords.
button : `.MouseButton`
    The pressed mouse button.

Notes
-----
This is intended to be overridden by new projection types.

---
## end_pan
```python
from _base import end_pan
```

Called when a pan operation completes (when the mouse button is up.)

Notes
-----
This is intended to be overridden by new projection types.

---
## _get_pan_points
```python
from _base import _get_pan_points
```

Helper function to return the new points after a pan.

This helper function returns the points on the axis after a pan has
occurred. This is a convenience method to abstract the pan logic
out of the base setter.

---
## drag_pan
```python
from _base import drag_pan
```

Called when the mouse moves during a pan operation.

Parameters
----------
button : `.MouseButton`
    The pressed mouse button.
key : str or None
    The pressed key, if any.
x, y : float
    The mouse coordinates in display coords.

Notes
-----
This is intended to be overridden by new projection types.

---
## get_children
```python
from _base import get_children
```



---
## contains
```python
from _base import contains
```



---
## contains_point
```python
from _base import contains_point
```

Return whether *point* (pair of pixel coordinates) is inside the Axes
patch.

---
## get_default_bbox_extra_artists
```python
from _base import get_default_bbox_extra_artists
```

Return a default list of artists that are used for the bounding box
calculation.

Artists are excluded either by not being visible or
``artist.set_in_layout(False)``.

---
## get_tightbbox
```python
from _base import get_tightbbox
```

Return the tight bounding box of the Axes, including axis and their
decorators (xlabel, title, etc).

Artists that have ``artist.set_in_layout(False)`` are not included
in the bbox.

Parameters
----------
renderer : `.RendererBase` subclass
    renderer that will be used to draw the figures (i.e.
    ``fig.canvas.get_renderer()``)

bbox_extra_artists : list of `.Artist` or ``None``
    List of artists to include in the tight bounding box.  If
    ``None`` (default), then all artist children of the Axes are
    included in the tight bounding box.

call_axes_locator : bool, default: True
    If *call_axes_locator* is ``False``, it does not call the
    ``_axes_locator`` attribute, which is necessary to get the correct
    bounding box. ``call_axes_locator=False`` can be used if the
    caller is only interested in the relative size of the tightbbox
    compared to the Axes bbox.

for_layout_only : default: False
    The bounding box will *not* include the x-extent of the title and
    the xlabel, or the y-extent of the ylabel.

Returns
-------
`.BboxBase`
    Bounding box in figure pixel coordinates.

See Also
--------
matplotlib.axes.Axes.get_window_extent
matplotlib.axis.Axis.get_tightbbox
matplotlib.spines.Spine.get_window_extent

---
## _make_twin_axes
```python
from _base import _make_twin_axes
```

Make a twinx Axes of self. This is used for twinx and twiny.

---
## twinx
```python
from _base import twinx
```

Create a twin Axes sharing the xaxis.

Create a new Axes with an invisible x-axis and an independent
y-axis positioned opposite to the original one (i.e. at right). The
x-axis autoscale setting will be inherited from the original
Axes.  To ensure that the tick marks of both y-axes align, see
`~matplotlib.ticker.LinearLocator`.

Returns
-------
Axes
    The newly created Axes instance

Notes
-----
For those who are 'picking' artists while using twinx, pick
events are only called for the artists in the top-most Axes.

---
## twiny
```python
from _base import twiny
```

Create a twin Axes sharing the yaxis.

Create a new Axes with an invisible y-axis and an independent
x-axis positioned opposite to the original one (i.e. at top). The
y-axis autoscale setting will be inherited from the original Axes.
To ensure that the tick marks of both x-axes align, see
`~matplotlib.ticker.LinearLocator`.

Returns
-------
Axes
    The newly created Axes instance

Notes
-----
For those who are 'picking' artists while using twiny, pick
events are only called for the artists in the top-most Axes.

---
## get_shared_x_axes
```python
from _base import get_shared_x_axes
```

Return an immutable view on the shared x-axes Grouper.

---
## get_shared_y_axes
```python
from _base import get_shared_y_axes
```

Return an immutable view on the shared y-axes Grouper.

---
## label_outer
```python
from _base import label_outer
```

Only show "outer" labels and tick labels.

x-labels are only kept for subplots on the last row (or first row, if
labels are on the top side); y-labels only for subplots on the first
column (or last column, if labels are on the right side).

Parameters
----------
remove_inner_ticks : bool, default: False
    If True, remove the inner ticks as well (not only tick labels).

    .. versionadded:: 3.8

---
## _label_outer_xaxis
```python
from _base import _label_outer_xaxis
```



---
## _label_outer_yaxis
```python
from _base import _label_outer_yaxis
```



---
## set_forward_navigation_events
```python
from _base import set_forward_navigation_events
```

Set how pan/zoom events are forwarded to Axes below this one.

Parameters
----------
forward : bool or "auto"
    Possible values:

    - True: Forward events to other axes with lower or equal zorder.
    - False: Events are only executed on this axes.
    - "auto": Default behaviour (*True* for axes with an invisible
      patch and *False* otherwise)

See Also
--------
matplotlib.axes.Axes.set_navigate

---
## get_forward_navigation_events
```python
from _base import get_forward_navigation_events
```

Get how pan/zoom events are forwarded to Axes below this one.

---
## _MinimalArtist
```python
from _base import _MinimalArtist
```



---
## wrapper
```python
from _base import wrapper
```



---
## __len__
```python
from _base import __len__
```



---
## __iter__
```python
from _base import __iter__
```



---
## __getitem__
```python
from _base import __getitem__
```



---
## __add__
```python
from _base import __add__
```



---
## __radd__
```python
from _base import __radd__
```



---
## handle_single_axis
```python
from _base import handle_single_axis
```



---
## format_deltas
```python
from _base import format_deltas
```



---
## get_rasterized
```python
from _base import get_rasterized
```



---
## get_agg_filter
```python
from _base import get_agg_filter
```



---
## _SubplotBaseMeta
```python
from __init__ import _SubplotBaseMeta
```



---
## SubplotBase
```python
from __init__ import SubplotBase
```



---
## subplot_class_factory
```python
from __init__ import subplot_class_factory
```



---
## __instancecheck__
```python
from __init__ import __instancecheck__
```



---
## __name__
```python
from _secondary_axes import __name__
```



---
## SecondaryAxis
```python
from _secondary_axes import SecondaryAxis
```

General class to hold a Secondary_X/Yaxis.

---
## __init__
```python
from _secondary_axes import __init__
```

See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
While there is no need for this to be private, it should really be
called by those higher level functions.

---
## set_alignment
```python
from _secondary_axes import set_alignment
```

Set if axes spine and labels are drawn at top or bottom (or left/right)
of the Axes.

Parameters
----------
align : {'top', 'bottom', 'left', 'right'}
    Either 'top' or 'bottom' for orientation='x' or
    'left' or 'right' for orientation='y' axis.

---
## set_location
```python
from _secondary_axes import set_location
```

Set the vertical or horizontal location of the axes in
parent-normalized coordinates.

Parameters
----------
location : {'top', 'bottom', 'left', 'right'} or float
    The position to put the secondary axis.  Strings can be 'top' or
    'bottom' for orientation='x' and 'right' or 'left' for
    orientation='y'. A float indicates the relative position on the
    parent Axes to put the new Axes, 0.0 being the bottom (or left)
    and 1.0 being the top (or right).

transform : `.Transform`, optional
    Transform for the location to use. Defaults to
    the parent's ``transAxes``, so locations are normally relative to
    the parent axes.

    .. versionadded:: 3.9

---
## apply_aspect
```python
from _secondary_axes import apply_aspect
```



---
## set_ticks
```python
from _secondary_axes import set_ticks
```



---
## set_functions
```python
from _secondary_axes import set_functions
```

Set how the secondary axis converts limits from the parent Axes.

Parameters
----------
functions : 2-tuple of func, or `Transform` with an inverse.
    Transform between the parent axis values and the secondary axis
    values.

    If supplied as a 2-tuple of functions, the first function is
    the forward transform function and the second is the inverse
    transform.

    If a transform is supplied, then the transform must have an
    inverse.

---
## draw
```python
from _secondary_axes import draw
```

Draw the secondary Axes.

Consults the parent Axes for its limits and converts them
using the converter specified by
`~.axes._secondary_axes.set_functions` (or *functions*
parameter when Axes initialized.)

---
## _set_scale
```python
from _secondary_axes import _set_scale
```

Check if parent has set its scale

---
## _set_lims
```python
from _secondary_axes import _set_lims
```

Set the limits based on parent limits and the convert method
between the parent and this secondary Axes.

---
## set_aspect
```python
from _secondary_axes import set_aspect
```

Secondary Axes cannot set the aspect ratio, so calling this just
sets a warning.

---
## set_color
```python
from _secondary_axes import set_color
```

Change the color of the secondary Axes and all decorators.

Parameters
----------
color : :mpltype:`color`

---
## _QueryReference
```python
from roles import _QueryReference
```

Wraps a reference or pending reference to add a query string.

The query string is generated from the attributes added to this node.

Also equivalent to a `~docutils.nodes.literal` node.

---
## _visit_query_reference_node
```python
from roles import _visit_query_reference_node
```

Resolve *node* into query strings on its ``reference`` children.

Then act as if this is a `~docutils.nodes.literal`.

---
## _depart_query_reference_node
```python
from roles import _depart_query_reference_node
```

Act as if this is a `~docutils.nodes.literal`.

---
## _rcparam_role
```python
from roles import _rcparam_role
```

Sphinx role ``:rc:`` to highlight and link ``rcParams`` entries.

Usage: Give the desired ``rcParams`` key as parameter.

:code:`:rc:`figure.dpi`` will render as: :rc:`figure.dpi`

---
## _mpltype_role
```python
from roles import _mpltype_role
```

Sphinx role ``:mpltype:`` for custom matplotlib types.

In Matplotlib, there are a number of type-like concepts that do not have a
direct type representation; example: color. This role allows to properly
highlight them in the docs and link to their definition.

Currently supported values:

- :code:`:mpltype:`color`` will render as: :mpltype:`color`

---
## to_query_string
```python
from roles import to_query_string
```

Generate query string from node attributes.

---
## __name__
```python
from figmpl_directive import __name__
```

Add a ``figure-mpl`` directive that is a responsive version of ``figure``.

This implementation is very similar to ``.. figure::``, except it also allows a
``srcset=`` argument to be passed to the image tag, hence allowing responsive
resolution images.

There is no particular reason this could not be used standalone, but is meant
to be used with :doc:`/api/sphinxext_plot_directive_api`.

Note that the directory organization is a bit different than ``.. figure::``.
See the *FigureMpl* documentation below.

---
## figmplnode
```python
from figmpl_directive import figmplnode
```



---
## FigureMpl
```python
from figmpl_directive import FigureMpl
```

Implements a directive to allow an optional hidpi image.

Meant to be used with the *plot_srcset* configuration option in conf.py,
and gets set in the TEMPLATE of plot_directive.py

e.g.::

    .. figure-mpl:: plot_directive/some_plots-1.png
        :alt: bar
        :srcset: plot_directive/some_plots-1.png,
                 plot_directive/some_plots-1.2x.png 2.00x
        :class: plot-directive

The resulting html (at ``some_plots.html``) is::

    <img src="sphx_glr_bar_001_hidpi.png"
        srcset="_images/some_plot-1.png,
                _images/some_plots-1.2x.png 2.00x",
        alt="bar"
        class="plot_directive" />

Note that the handling of subdirectories is different than that used by the sphinx
figure directive::

    .. figure-mpl:: plot_directive/nestedpage/index-1.png
        :alt: bar
        :srcset: plot_directive/nestedpage/index-1.png
                 plot_directive/nestedpage/index-1.2x.png 2.00x
        :class: plot_directive

The resulting html (at ``nestedpage/index.html``)::

    <img src="../_images/nestedpage-index-1.png"
        srcset="../_images/nestedpage-index-1.png,
                ../_images/_images/nestedpage-index-1.2x.png 2.00x",
        alt="bar"
        class="sphx-glr-single-img" />

where the subdirectory is included in the image name for uniqueness.

---
## _parse_srcsetNodes
```python
from figmpl_directive import _parse_srcsetNodes
```

parse srcset...

---
## _copy_images_figmpl
```python
from figmpl_directive import _copy_images_figmpl
```



---
## visit_figmpl_html
```python
from figmpl_directive import visit_figmpl_html
```



---
## visit_figmpl_latex
```python
from figmpl_directive import visit_figmpl_latex
```



---
## depart_figmpl_html
```python
from figmpl_directive import depart_figmpl_html
```



---
## depart_figmpl_latex
```python
from figmpl_directive import depart_figmpl_latex
```



---
## figurempl_addnode
```python
from figmpl_directive import figurempl_addnode
```



---
## setup
```python
from figmpl_directive import setup
```



---
## run
```python
from figmpl_directive import run
```



---
## __name__
```python
from mathmpl import __name__
```

A role and directive to display mathtext in Sphinx
==================================================

The ``mathmpl`` Sphinx extension creates a mathtext image in Matplotlib and
shows it in html output. Thus, it is a true and faithful representation of what
you will see if you pass a given LaTeX string to Matplotlib (see
:ref:`mathtext`).

.. warning::
    In most cases, you will likely want to use one of `Sphinx's builtin Math
    extensions
    <https://www.sphinx-doc.org/en/master/usage/extensions/math.html>`__
    instead of this one. The builtin Sphinx math directive uses MathJax to
    render mathematical expressions, and addresses accessibility concerns that
    ``mathmpl`` doesn't address.

Mathtext may be included in two ways:

1. Inline, using the role::

     This text uses inline math: :mathmpl:`\alpha > \beta`.

   which produces:

     This text uses inline math: :mathmpl:`\alpha > \beta`.

2. Standalone, using the directive::

     Here is some standalone math:

     .. mathmpl::

         \alpha > \beta

   which produces:

     Here is some standalone math:

     .. mathmpl::

         \alpha > \beta

Options
-------

The ``mathmpl`` role and directive both support the following options:

fontset : str, default: 'cm'
    The font set to use when displaying math. See :rc:`mathtext.fontset`.

fontsize : float
    The font size, in points. Defaults to the value from the extension
    configuration option defined below.

Configuration options
---------------------

The mathtext extension has the following configuration options:

mathmpl_fontsize : float, default: 10.0
    Default font size, in points.

mathmpl_srcset : list of str, default: []
    Additional image sizes to generate when embedding in HTML, to support
    `responsive resolution images
    <https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images>`__.
    The list should contain additional x-descriptors (``'1.5x'``, ``'2x'``,
    etc.) to generate (1x is the default and always included.)

---
## latex_math
```python
from mathmpl import latex_math
```



---
## fontset_choice
```python
from mathmpl import fontset_choice
```



---
## math_role
```python
from mathmpl import math_role
```



---
## MathDirective
```python
from mathmpl import MathDirective
```

The ``.. mathmpl::`` directive, as documented in the module's docstring.

---
## latex2png
```python
from mathmpl import latex2png
```



---
## latex2html
```python
from mathmpl import latex2html
```



---
## _config_inited
```python
from mathmpl import _config_inited
```



---
## setup
```python
from mathmpl import setup
```



---
## run
```python
from mathmpl import run
```



---
## visit_latex_math_html
```python
from mathmpl import visit_latex_math_html
```



---
## depart_latex_math_html
```python
from mathmpl import depart_latex_math_html
```



---
## visit_latex_math_latex
```python
from mathmpl import visit_latex_math_latex
```



---
## depart_latex_math_latex
```python
from mathmpl import depart_latex_math_latex
```



---
## __name__
```python
from plot_directive import __name__
```

A directive for including a Matplotlib plot in a Sphinx document
================================================================

This is a Sphinx extension providing a reStructuredText directive
``.. plot::`` for including a plot in a Sphinx document.

In HTML output, ``.. plot::`` will include a .png file with a link
to a high-res .png and .pdf.  In LaTeX output, it will include a .pdf.

The plot content may be defined in one of three ways:

1. **A path to a source file** as the argument to the directive::

     .. plot:: path/to/plot.py

   When a path to a source file is given, the content of the
   directive may optionally contain a caption for the plot::

     .. plot:: path/to/plot.py

        The plot caption.

   Additionally, one may specify the name of a function to call (with
   no arguments) immediately after importing the module::

     .. plot:: path/to/plot.py plot_function1

2. Included as **inline content** to the directive::

     .. plot::

        import matplotlib.pyplot as plt
        plt.plot([1, 2, 3], [4, 5, 6])
        plt.title("A plotting exammple")

3. Using **doctest** syntax::

     .. plot::

        A plotting example:
        >>> import matplotlib.pyplot as plt
        >>> plt.plot([1, 2, 3], [4, 5, 6])

Options
-------

The ``.. plot::`` directive supports the following options:

``:format:`` : {'python', 'doctest'}
    The format of the input.  If unset, the format is auto-detected.

``:include-source:`` : bool
    Whether to display the source code. The default can be changed using
    the ``plot_include_source`` variable in :file:`conf.py` (which itself
    defaults to False).

``:show-source-link:`` : bool
    Whether to show a link to the source in HTML. The default can be
    changed using the ``plot_html_show_source_link`` variable in
    :file:`conf.py` (which itself defaults to True).

``:context:`` : bool or str
    If provided, the code will be run in the context of all previous plot
    directives for which the ``:context:`` option was specified.  This only
    applies to inline code plot directives, not those run from files. If
    the ``:context: reset`` option is specified, the context is reset
    for this and future plots, and previous figures are closed prior to
    running the code. ``:context: close-figs`` keeps the context but closes
    previous figures before running the code.

``:nofigs:`` : bool
    If specified, the code block will be run, but no figures will be
    inserted.  This is usually useful with the ``:context:`` option.

``:caption:`` : str
    If specified, the option's argument will be used as a caption for the
    figure. This overwrites the caption given in the content, when the plot
    is generated from a file.

Additionally, this directive supports all the options of the `image directive
<https://docutils.sourceforge.io/docs/ref/rst/directives.html#image>`_,
except for ``:target:`` (since plot will add its own target).  These include
``:alt:``, ``:height:``, ``:width:``, ``:scale:``, ``:align:`` and ``:class:``.

Configuration options
---------------------

The plot directive has the following configuration options:

plot_include_source
    Default value for the include-source option (default: False).

plot_html_show_source_link
    Whether to show a link to the source in HTML (default: True).

plot_pre_code
    Code that should be executed before each plot. If None (the default),
    it will default to a string containing::

        import numpy as np
        from matplotlib import pyplot as plt

plot_basedir
    Base directory, to which ``plot::`` file names are relative to.
    If None or empty (the default), file names are relative to the
    directory where the file containing the directive is.

plot_formats
    File formats to generate (default: ['png', 'hires.png', 'pdf']).
    List of tuples or strings::

        [(suffix, dpi), suffix, ...]

    that determine the file format and the DPI. For entries whose
    DPI was omitted, sensible defaults are chosen. When passing from
    the command line through sphinx_build the list should be passed as
    suffix:dpi,suffix:dpi, ...

plot_html_show_formats
    Whether to show links to the files in HTML (default: True).

plot_rcparams
    A dictionary containing any non-standard rcParams that should
    be applied before each plot (default: {}).

plot_apply_rcparams
    By default, rcParams are applied when ``:context:`` option is not used
    in a plot directive.  If set, this configuration option overrides this
    behavior and applies rcParams before each plot.

plot_working_directory
    By default, the working directory will be changed to the directory of
    the example, so the code can get at its data files, if any.  Also its
    path will be added to `sys.path` so it can import any helper modules
    sitting beside it.  This configuration option can be used to specify
    a central directory (also added to `sys.path`) where data files and
    helper modules for all code are located.

plot_template
    Provide a customized template for preparing restructured text.

plot_srcset
    Allow the srcset image option for responsive image resolutions. List of
    strings with the multiplicative factors followed by an "x".
    e.g. ["2.0x", "1.5x"].  "2.0x" will create a png with the default "png"
    resolution from plot_formats, multiplied by 2. If plot_srcset is
    specified, the plot directive uses the
    :doc:`/api/sphinxext_figmpl_directive_api` (instead of the usual figure
    directive) in the intermediary rst file that is generated.
    The plot_srcset option is incompatible with *singlehtml* builds, and an
    error will be raised.

Notes on how it works
---------------------

The plot directive runs the code it is given, either in the source file or the
code under the directive. The figure created (if any) is saved in the sphinx
build directory under a subdirectory named ``plot_directive``.  It then creates
an intermediate rst file that calls a ``.. figure:`` directive (or
``.. figmpl::`` directive if ``plot_srcset`` is being used) and has links to
the ``*.png`` files in the ``plot_directive`` directory.  These translations can
be customized by changing the *plot_template*.  See the source of
:doc:`/api/sphinxext_plot_directive_api` for the templates defined in *TEMPLATE*
and *TEMPLATE_SRCSET*.

---
## _option_boolean
```python
from plot_directive import _option_boolean
```



---
## _option_context
```python
from plot_directive import _option_context
```



---
## _option_format
```python
from plot_directive import _option_format
```



---
## mark_plot_labels
```python
from plot_directive import mark_plot_labels
```

To make plots referenceable, we need to move the reference from the
"htmlonly" (or "latexonly") node to the actual figure node itself.

---
## PlotDirective
```python
from plot_directive import PlotDirective
```

The ``.. plot::`` directive, as documented in the module's docstring.

---
## _copy_css_file
```python
from plot_directive import _copy_css_file
```



---
## setup
```python
from plot_directive import setup
```



---
## contains_doctest
```python
from plot_directive import contains_doctest
```



---
## _split_code_at_show
```python
from plot_directive import _split_code_at_show
```

Split code at plt.show().

---
## ImageFile
```python
from plot_directive import ImageFile
```



---
## out_of_date
```python
from plot_directive import out_of_date
```

Return whether *derived* is out-of-date relative to *original* or any of
the RST files included in it using the RST include directive (*includes*).
*derived* and *original* are full paths, and *includes* is optionally a
list of full paths which may have been included in the *original*.

---
## PlotError
```python
from plot_directive import PlotError
```



---
## _run_code
```python
from plot_directive import _run_code
```

Import a Python module from a path, and run the function given by
name, if function_name is not None.

---
## clear_state
```python
from plot_directive import clear_state
```



---
## get_plot_formats
```python
from plot_directive import get_plot_formats
```



---
## _parse_srcset
```python
from plot_directive import _parse_srcset
```

Parse srcset for multiples...

---
## render_figures
```python
from plot_directive import render_figures
```

Run a pyplot script and save the images in *output_dir*.

Save the images under *output_dir* with file names derived from
*output_base*

---
## run
```python
from plot_directive import run
```

Run the plot directive.

---
## __init__
```python
from plot_directive import __init__
```



---
## filename
```python
from plot_directive import filename
```



---
## filenames
```python
from plot_directive import filenames
```



---
## out_of_date_one
```python
from plot_directive import out_of_date_one
```



---
## __name__
```python
from _backend_gtk import __name__
```

Common code for GTK3 and GTK4 backends.

---
## _shutdown_application
```python
from _backend_gtk import _shutdown_application
```



---
## _create_application
```python
from _backend_gtk import _create_application
```



---
## mpl_to_gtk_cursor_name
```python
from _backend_gtk import mpl_to_gtk_cursor_name
```



---
## TimerGTK
```python
from _backend_gtk import TimerGTK
```

Subclass of `.TimerBase` using GTK timer events.

---
## _FigureCanvasGTK
```python
from _backend_gtk import _FigureCanvasGTK
```



---
## _FigureManagerGTK
```python
from _backend_gtk import _FigureManagerGTK
```

Attributes
----------
canvas : `FigureCanvas`
    The FigureCanvas instance
num : int or str
    The Figure number
toolbar : Gtk.Toolbar or Gtk.Box
    The toolbar
vbox : Gtk.VBox
    The Gtk.VBox containing the canvas and toolbar
window : Gtk.Window
    The Gtk.Window

---
## _NavigationToolbar2GTK
```python
from _backend_gtk import _NavigationToolbar2GTK
```



---
## RubberbandGTK
```python
from _backend_gtk import RubberbandGTK
```



---
## ConfigureSubplotsGTK
```python
from _backend_gtk import ConfigureSubplotsGTK
```



---
## _BackendGTK
```python
from _backend_gtk import _BackendGTK
```



---
## __init__
```python
from _backend_gtk import __init__
```



---
## _timer_start
```python
from _backend_gtk import _timer_start
```



---
## _timer_stop
```python
from _backend_gtk import _timer_stop
```



---
## _timer_set_interval
```python
from _backend_gtk import _timer_set_interval
```



---
## _on_timer
```python
from _backend_gtk import _on_timer
```



---
## destroy
```python
from _backend_gtk import destroy
```



---
## start_main_loop
```python
from _backend_gtk import start_main_loop
```



---
## show
```python
from _backend_gtk import show
```



---
## full_screen_toggle
```python
from _backend_gtk import full_screen_toggle
```



---
## get_window_title
```python
from _backend_gtk import get_window_title
```



---
## set_window_title
```python
from _backend_gtk import set_window_title
```



---
## resize
```python
from _backend_gtk import resize
```



---
## set_message
```python
from _backend_gtk import set_message
```



---
## draw_rubberband
```python
from _backend_gtk import draw_rubberband
```



---
## remove_rubberband
```python
from _backend_gtk import remove_rubberband
```



---
## _update_buttons_checked
```python
from _backend_gtk import _update_buttons_checked
```



---
## pan
```python
from _backend_gtk import pan
```



---
## zoom
```python
from _backend_gtk import zoom
```



---
## set_history_buttons
```python
from _backend_gtk import set_history_buttons
```



---
## trigger
```python
from _backend_gtk import trigger
```



---
## __name__
```python
from backend_template import __name__
```

A fully functional, do-nothing backend intended as a template for backend
writers.  It is fully functional in that you can select it as a backend e.g.
with ::

    import matplotlib
    matplotlib.use("template")

and your program will (should!) run without error, though no output is
produced.  This provides a starting point for backend writers; you can
selectively implement drawing methods (`~.RendererTemplate.draw_path`,
`~.RendererTemplate.draw_image`, etc.) and slowly see your figure come to life
instead having to have a full-blown implementation before getting any results.

Copy this file to a directory outside the Matplotlib source tree, somewhere
where Python can import it (by adding the directory to your ``sys.path`` or by
packaging it as a normal Python package); if the backend is importable as
``import my.backend`` you can then select it using ::

    import matplotlib
    matplotlib.use("module://my.backend")

If your backend implements support for saving figures (i.e. has a `print_xyz`
method), you can register it as the default handler for a given file type::

    from matplotlib.backend_bases import register_backend
    register_backend('xyz', 'my_backend', 'XYZ File Format')
    ...
    plt.savefig("figure.xyz")

---
## RendererTemplate
```python
from backend_template import RendererTemplate
```

The renderer handles drawing/rendering operations.

This is a minimal do-nothing class that can be used to get started when
writing a new backend.  Refer to `.backend_bases.RendererBase` for
documentation of the methods.

---
## GraphicsContextTemplate
```python
from backend_template import GraphicsContextTemplate
```

The graphics context provides the color, line styles, etc.  See the cairo
and postscript backends for examples of mapping the graphics context
attributes (cap styles, join styles, line widths, colors) to a particular
backend.  In cairo this is done by wrapping a cairo.Context object and
forwarding the appropriate calls to it using a dictionary mapping styles
to gdk constants.  In Postscript, all the work is done by the renderer,
mapping line styles to postscript calls.

If it's more appropriate to do the mapping at the renderer level (as in
the postscript backend), you don't need to override any of the GC methods.
If it's more appropriate to wrap an instance (as in the cairo backend) and
do the mapping here, you'll need to override several of the setter
methods.

The base GraphicsContext stores colors as an RGB tuple on the unit
interval, e.g., (0.5, 0.0, 1.0). You may need to map this to colors
appropriate for your backend.

---
## FigureManagerTemplate
```python
from backend_template import FigureManagerTemplate
```

Helper class for pyplot mode, wraps everything up into a neat bundle.

For non-interactive backends, the base class is sufficient.  For
interactive backends, see the documentation of the `.FigureManagerBase`
class for the list of methods that can/should be overridden.

---
## FigureCanvasTemplate
```python
from backend_template import FigureCanvasTemplate
```

The canvas the figure renders into.  Calls the draw and print fig
methods, creates the renderers, etc.

Note: GUI templates will want to connect events for button presses,
mouse movements and key presses to functions that call the base
class methods button_press_event, button_release_event,
motion_notify_event, key_press_event, and key_release_event.  See the
implementations of the interactive backends for examples.

Attributes
----------
figure : `~matplotlib.figure.Figure`
    A high-level Figure instance

---
## __init__
```python
from backend_template import __init__
```



---
## draw_path
```python
from backend_template import draw_path
```



---
## draw_image
```python
from backend_template import draw_image
```



---
## draw_text
```python
from backend_template import draw_text
```



---
## flipy
```python
from backend_template import flipy
```



---
## get_canvas_width_height
```python
from backend_template import get_canvas_width_height
```



---
## get_text_width_height_descent
```python
from backend_template import get_text_width_height_descent
```



---
## new_gc
```python
from backend_template import new_gc
```



---
## points_to_pixels
```python
from backend_template import points_to_pixels
```



---
## draw
```python
from backend_template import draw
```

Draw the figure using the renderer.

It is important that this method actually walk the artist tree
even if not output is produced because this will trigger
deferred work (like computing limits auto-limits and tick
values) that users may want access to before saving to disk.

---
## print_foo
```python
from backend_template import print_foo
```

Write out format foo.

This method is normally called via `.Figure.savefig` and
`.FigureCanvasBase.print_figure`, which take care of setting the figure
facecolor, edgecolor, and dpi to the desired output values, and will
restore them to the original values.  Therefore, `print_foo` does not
need to handle these settings.

---
## get_default_filetype
```python
from backend_template import get_default_filetype
```



---
## __name__
```python
from backend_qtcairo import __name__
```



---
## FigureCanvasQTCairo
```python
from backend_qtcairo import FigureCanvasQTCairo
```



---
## _BackendQTCairo
```python
from backend_qtcairo import _BackendQTCairo
```



---
## draw
```python
from backend_qtcairo import draw
```



---
## paintEvent
```python
from backend_qtcairo import paintEvent
```



---
## __name__
```python
from backend_qt import __name__
```



---
## _create_qApp
```python
from backend_qt import _create_qApp
```



---
## _allow_interrupt_qt
```python
from backend_qt import _allow_interrupt_qt
```

A context manager that allows terminating a plot by sending a SIGINT.

---
## TimerQT
```python
from backend_qt import TimerQT
```

Subclass of `.TimerBase` using QTimer events.

---
## FigureCanvasQT
```python
from backend_qt import FigureCanvasQT
```



---
## MainWindow
```python
from backend_qt import MainWindow
```



---
## FigureManagerQT
```python
from backend_qt import FigureManagerQT
```

Attributes
----------
canvas : `FigureCanvas`
    The FigureCanvas instance
num : int or str
    The Figure number
toolbar : qt.QToolBar
    The qt.QToolBar
window : qt.QMainWindow
    The qt.QMainWindow

---
## NavigationToolbar2QT
```python
from backend_qt import NavigationToolbar2QT
```



---
## SubplotToolQt
```python
from backend_qt import SubplotToolQt
```



---
## ToolbarQt
```python
from backend_qt import ToolbarQt
```



---
## ConfigureSubplotsQt
```python
from backend_qt import ConfigureSubplotsQt
```



---
## SaveFigureQt
```python
from backend_qt import SaveFigureQt
```



---
## RubberbandQt
```python
from backend_qt import RubberbandQt
```



---
## HelpQt
```python
from backend_qt import HelpQt
```



---
## ToolCopyToClipboardQT
```python
from backend_qt import ToolCopyToClipboardQT
```



---
## _BackendQT
```python
from backend_qt import _BackendQT
```



---
## prepare_notifier
```python
from backend_qt import prepare_notifier
```



---
## handle_sigint
```python
from backend_qt import handle_sigint
```



---
## __init__
```python
from backend_qt import __init__
```



---
## __del__
```python
from backend_qt import __del__
```



---
## _timer_set_single_shot
```python
from backend_qt import _timer_set_single_shot
```



---
## _timer_set_interval
```python
from backend_qt import _timer_set_interval
```



---
## _timer_start
```python
from backend_qt import _timer_start
```



---
## _timer_stop
```python
from backend_qt import _timer_stop
```



---
## _update_pixel_ratio
```python
from backend_qt import _update_pixel_ratio
```



---
## _update_screen
```python
from backend_qt import _update_screen
```



---
## showEvent
```python
from backend_qt import showEvent
```



---
## set_cursor
```python
from backend_qt import set_cursor
```



---
## mouseEventCoords
```python
from backend_qt import mouseEventCoords
```

Calculate mouse coordinates in physical pixels.

Qt uses logical pixels, but the figure is scaled to physical
pixels for rendering.  Transform to physical pixels so that
all of the down-stream transforms work as expected.

Also, the origin is different and needs to be corrected.

---
## enterEvent
```python
from backend_qt import enterEvent
```



---
## leaveEvent
```python
from backend_qt import leaveEvent
```



---
## mousePressEvent
```python
from backend_qt import mousePressEvent
```



---
## mouseDoubleClickEvent
```python
from backend_qt import mouseDoubleClickEvent
```



---
## mouseMoveEvent
```python
from backend_qt import mouseMoveEvent
```



---
## mouseReleaseEvent
```python
from backend_qt import mouseReleaseEvent
```



---
## wheelEvent
```python
from backend_qt import wheelEvent
```



---
## keyPressEvent
```python
from backend_qt import keyPressEvent
```



---
## keyReleaseEvent
```python
from backend_qt import keyReleaseEvent
```



---
## resizeEvent
```python
from backend_qt import resizeEvent
```



---
## sizeHint
```python
from backend_qt import sizeHint
```



---
## minumumSizeHint
```python
from backend_qt import minumumSizeHint
```



---
## _mpl_modifiers
```python
from backend_qt import _mpl_modifiers
```



---
## _get_key
```python
from backend_qt import _get_key
```



---
## flush_events
```python
from backend_qt import flush_events
```



---
## start_event_loop
```python
from backend_qt import start_event_loop
```



---
## stop_event_loop
```python
from backend_qt import stop_event_loop
```



---
## draw
```python
from backend_qt import draw
```

Render the figure, and queue a request for a Qt draw.

---
## draw_idle
```python
from backend_qt import draw_idle
```

Queue redraw of the Agg buffer and request Qt paintEvent.

---
## blit
```python
from backend_qt import blit
```



---
## _draw_idle
```python
from backend_qt import _draw_idle
```



---
## drawRectangle
```python
from backend_qt import drawRectangle
```



---
## closeEvent
```python
from backend_qt import closeEvent
```



---
## full_screen_toggle
```python
from backend_qt import full_screen_toggle
```



---
## _widgetclosed
```python
from backend_qt import _widgetclosed
```



---
## resize
```python
from backend_qt import resize
```



---
## start_main_loop
```python
from backend_qt import start_main_loop
```



---
## show
```python
from backend_qt import show
```



---
## destroy
```python
from backend_qt import destroy
```



---
## get_window_title
```python
from backend_qt import get_window_title
```



---
## set_window_title
```python
from backend_qt import set_window_title
```



---
## _icon
```python
from backend_qt import _icon
```

Construct a `.QIcon` from an image file *name*, including the extension
and relative to Matplotlib's "images" data directory.

---
## edit_parameters
```python
from backend_qt import edit_parameters
```



---
## _update_buttons_checked
```python
from backend_qt import _update_buttons_checked
```



---
## pan
```python
from backend_qt import pan
```



---
## zoom
```python
from backend_qt import zoom
```



---
## set_message
```python
from backend_qt import set_message
```



---
## draw_rubberband
```python
from backend_qt import draw_rubberband
```



---
## remove_rubberband
```python
from backend_qt import remove_rubberband
```



---
## configure_subplots
```python
from backend_qt import configure_subplots
```



---
## save_figure
```python
from backend_qt import save_figure
```



---
## set_history_buttons
```python
from backend_qt import set_history_buttons
```



---
## update_from_current_subplotpars
```python
from backend_qt import update_from_current_subplotpars
```



---
## _export_values
```python
from backend_qt import _export_values
```



---
## _on_value_changed
```python
from backend_qt import _on_value_changed
```



---
## _tight_layout
```python
from backend_qt import _tight_layout
```



---
## _reset
```python
from backend_qt import _reset
```



---
## add_toolitem
```python
from backend_qt import add_toolitem
```



---
## _add_to_group
```python
from backend_qt import _add_to_group
```



---
## toggle_toolitem
```python
from backend_qt import toggle_toolitem
```



---
## remove_toolitem
```python
from backend_qt import remove_toolitem
```



---
## trigger
```python
from backend_qt import trigger
```



---
## _may_clear_sock
```python
from backend_qt import _may_clear_sock
```



---
## handler
```python
from backend_qt import handler
```



---
## _draw_rect_callback
```python
from backend_qt import _draw_rect_callback
```



---
## __name__
```python
from backend_gtk3cairo import __name__
```



---
## FigureCanvasGTK3Cairo
```python
from backend_gtk3cairo import FigureCanvasGTK3Cairo
```



---
## _BackendGTK3Cairo
```python
from backend_gtk3cairo import _BackendGTK3Cairo
```



---
## on_draw_event
```python
from backend_gtk3cairo import on_draw_event
```



---
## __name__
```python
from backend_tkagg import __name__
```



---
## FigureCanvasTkAgg
```python
from backend_tkagg import FigureCanvasTkAgg
```



---
## _BackendTkAgg
```python
from backend_tkagg import _BackendTkAgg
```



---
## draw
```python
from backend_tkagg import draw
```



---
## blit
```python
from backend_tkagg import blit
```



---
## __name__
```python
from backend_gtk4agg import __name__
```



---
## FigureCanvasGTK4Agg
```python
from backend_gtk4agg import FigureCanvasGTK4Agg
```



---
## _BackendGTK4Agg
```python
from backend_gtk4agg import _BackendGTK4Agg
```



---
## on_draw_event
```python
from backend_gtk4agg import on_draw_event
```



---
## BackendFilter
```python
from registry import BackendFilter
```

Filter used with :meth:`~matplotlib.backends.registry.BackendRegistry.list_builtin`

.. versionadded:: 3.9

---
## BackendRegistry
```python
from registry import BackendRegistry
```

Registry of backends available within Matplotlib.

This is the single source of truth for available backends.

All use of ``BackendRegistry`` should be via the singleton instance
``backend_registry`` which can be imported from ``matplotlib.backends``.

Each backend has a name, a module name containing the backend code, and an
optional GUI framework that must be running if the backend is interactive.
There are three sources of backends: built-in (source code is within the
Matplotlib repository), explicit ``module://some.backend`` syntax (backend is
obtained by loading the module), or via an entry point (self-registering
backend in an external package).

.. versionadded:: 3.9

---
## _backend_module_name
```python
from registry import _backend_module_name
```



---
## _clear
```python
from registry import _clear
```



---
## _ensure_entry_points_loaded
```python
from registry import _ensure_entry_points_loaded
```



---
## _get_gui_framework_by_loading
```python
from registry import _get_gui_framework_by_loading
```



---
## _read_entry_points
```python
from registry import _read_entry_points
```



---
## _validate_and_store_entry_points
```python
from registry import _validate_and_store_entry_points
```



---
## backend_for_gui_framework
```python
from registry import backend_for_gui_framework
```

Return the name of the backend corresponding to the specified GUI framework.

Parameters
----------
framework : str
    GUI framework such as "qt".

Returns
-------
str or None
    Backend name or None if GUI framework not recognised.

---
## is_valid_backend
```python
from registry import is_valid_backend
```

Return True if the backend name is valid, False otherwise.

A backend name is valid if it is one of the built-in backends or has been
dynamically added via an entry point. Those beginning with ``module://`` are
always considered valid and are added to the current list of all backends
within this function.

Even if a name is valid, it may not be importable or usable. This can only be
determined by loading and using the backend module.

Parameters
----------
backend : str
    Name of backend.

Returns
-------
bool
    True if backend is valid, False otherwise.

---
## list_all
```python
from registry import list_all
```

Return list of all known backends.

These include built-in backends and those obtained at runtime either from entry
points or explicit ``module://some.backend`` syntax.

Entry points will be loaded if they haven't been already.

Returns
-------
list of str
    Backend names.

---
## list_builtin
```python
from registry import list_builtin
```

Return list of backends that are built into Matplotlib.

Parameters
----------
filter_ : `~.BackendFilter`, optional
    Filter to apply to returned backends. For example, to return only
    non-interactive backends use `.BackendFilter.NON_INTERACTIVE`.

Returns
-------
list of str
    Backend names.

---
## list_gui_frameworks
```python
from registry import list_gui_frameworks
```

Return list of GUI frameworks used by Matplotlib backends.

Returns
-------
list of str
    GUI framework names.

---
## load_backend_module
```python
from registry import load_backend_module
```

Load and return the module containing the specified backend.

Parameters
----------
backend : str
    Name of backend to load.

Returns
-------
Module
    Module containing backend.

---
## resolve_backend
```python
from registry import resolve_backend
```

Return the backend and GUI framework for the specified backend name.

If the GUI framework is not yet known then it will be determined by loading the
backend module and checking the ``FigureCanvas.required_interactive_framework``
attribute.

This function only loads entry points if they have not already been loaded and
the backend is not built-in and not of ``module://some.backend`` format.

Parameters
----------
backend : str or None
    Name of backend, or None to use the default backend.

Returns
-------
backend : str
    The backend name.
framework : str or None
    The GUI framework, which will be None for a backend that is non-interactive.

---
## resolve_gui_or_backend
```python
from registry import resolve_gui_or_backend
```

Return the backend and GUI framework for the specified string that may be
either a GUI framework or a backend name, tested in that order.

This is for use with the IPython %matplotlib magic command which may be a GUI
framework such as ``%matplotlib qt`` or a backend name such as
``%matplotlib qtagg``.

This function only loads entry points if they have not already been loaded and
the backend is not built-in and not of ``module://some.backend`` format.

Parameters
----------
gui_or_backend : str or None
    Name of GUI framework or backend, or None to use the default backend.

Returns
-------
backend : str
    The backend name.
framework : str or None
    The GUI framework, which will be None for a backend that is non-interactive.

---
## backward_compatible_entry_points
```python
from registry import backward_compatible_entry_points
```



---
## __name__
```python
from backend_qt5agg import __name__
```

Render to qt from agg

---
## _BackendQT5Agg
```python
from backend_qt5agg import _BackendQT5Agg
```



---
## __name__
```python
from backend_qt5 import __name__
```



---
## _BackendQT5
```python
from backend_qt5 import _BackendQT5
```



---
## __getattr__
```python
from backend_qt5 import __getattr__
```



---
## __name__
```python
from backend_gtk3agg import __name__
```



---
## FigureCanvasGTK3Agg
```python
from backend_gtk3agg import FigureCanvasGTK3Agg
```



---
## _BackendGTK3Cairo
```python
from backend_gtk3agg import _BackendGTK3Cairo
```



---
## __init__
```python
from backend_gtk3agg import __init__
```



---
## on_draw_event
```python
from backend_gtk3agg import on_draw_event
```



---
## blit
```python
from backend_gtk3agg import blit
```



---
## __name__
```python
from backend_cairo import __name__
```

A Cairo backend for Matplotlib
==============================
:Author: Steve Chaplin and others

This backend depends on cairocffi or pycairo.

---
## _set_rgba
```python
from backend_cairo import _set_rgba
```



---
## _append_path
```python
from backend_cairo import _append_path
```



---
## _cairo_font_args_from_font_prop
```python
from backend_cairo import _cairo_font_args_from_font_prop
```

Convert a `.FontProperties` or a `.FontEntry` to arguments that can be
passed to `.Context.select_font_face`.

---
## RendererCairo
```python
from backend_cairo import RendererCairo
```



---
## GraphicsContextCairo
```python
from backend_cairo import GraphicsContextCairo
```



---
## _CairoRegion
```python
from backend_cairo import _CairoRegion
```



---
## FigureCanvasCairo
```python
from backend_cairo import FigureCanvasCairo
```



---
## _BackendCairo
```python
from backend_cairo import _BackendCairo
```



---
## attr
```python
from backend_cairo import attr
```



---
## __init__
```python
from backend_cairo import __init__
```



---
## set_context
```python
from backend_cairo import set_context
```



---
## _fill_and_stroke
```python
from backend_cairo import _fill_and_stroke
```



---
## draw_path
```python
from backend_cairo import draw_path
```



---
## draw_markers
```python
from backend_cairo import draw_markers
```



---
## draw_image
```python
from backend_cairo import draw_image
```



---
## draw_text
```python
from backend_cairo import draw_text
```



---
## _draw_mathtext
```python
from backend_cairo import _draw_mathtext
```



---
## get_canvas_width_height
```python
from backend_cairo import get_canvas_width_height
```



---
## get_text_width_height_descent
```python
from backend_cairo import get_text_width_height_descent
```



---
## new_gc
```python
from backend_cairo import new_gc
```



---
## points_to_pixels
```python
from backend_cairo import points_to_pixels
```



---
## restore
```python
from backend_cairo import restore
```



---
## set_alpha
```python
from backend_cairo import set_alpha
```



---
## set_antialiased
```python
from backend_cairo import set_antialiased
```



---
## get_antialiased
```python
from backend_cairo import get_antialiased
```



---
## set_capstyle
```python
from backend_cairo import set_capstyle
```



---
## set_clip_rectangle
```python
from backend_cairo import set_clip_rectangle
```



---
## set_clip_path
```python
from backend_cairo import set_clip_path
```



---
## set_dashes
```python
from backend_cairo import set_dashes
```



---
## set_foreground
```python
from backend_cairo import set_foreground
```



---
## get_rgb
```python
from backend_cairo import get_rgb
```



---
## set_joinstyle
```python
from backend_cairo import set_joinstyle
```



---
## set_linewidth
```python
from backend_cairo import set_linewidth
```



---
## _renderer
```python
from backend_cairo import _renderer
```



---
## get_renderer
```python
from backend_cairo import get_renderer
```



---
## copy_from_bbox
```python
from backend_cairo import copy_from_bbox
```



---
## restore_region
```python
from backend_cairo import restore_region
```



---
## print_png
```python
from backend_cairo import print_png
```



---
## print_rgba
```python
from backend_cairo import print_rgba
```



---
## _get_printed_image_surface
```python
from backend_cairo import _get_printed_image_surface
```



---
## _save
```python
from backend_cairo import _save
```



---
## __name__
```python
from backend_pdf import __name__
```

A PDF Matplotlib backend.

Author: Jouni K Seppänen <jks@iki.fi> and others.

---
## _fill
```python
from backend_pdf import _fill
```

Make one string from sequence of strings, with whitespace in between.

The whitespace is chosen to form lines of at most *linelen* characters,
if possible.

---
## _create_pdf_info_dict
```python
from backend_pdf import _create_pdf_info_dict
```

Create a PDF infoDict based on user-supplied metadata.

A default ``Creator``, ``Producer``, and ``CreationDate`` are added, though
the user metadata may override it. The date may be the current time, or a
time set by the ``SOURCE_DATE_EPOCH`` environment variable.

Metadata is verified to have the correct keys and their expected types. Any
unknown keys/types will raise a warning.

Parameters
----------
backend : str
    The name of the backend to use in the Producer value.

metadata : dict[str, Union[str, datetime, Name]]
    A dictionary of metadata supplied by the user with information
    following the PDF specification, also defined in
    `~.backend_pdf.PdfPages` below.

    If any value is *None*, then the key will be removed. This can be used
    to remove any pre-defined values.

Returns
-------
dict[str, Union[str, datetime, Name]]
    A validated dictionary of metadata.

---
## _datetime_to_pdf
```python
from backend_pdf import _datetime_to_pdf
```

Convert a datetime to a PDF string representing it.

Used for PDF and PGF.

---
## _calculate_quad_point_coordinates
```python
from backend_pdf import _calculate_quad_point_coordinates
```

Calculate the coordinates of rectangle when rotated by angle around x, y

---
## _get_coordinates_of_block
```python
from backend_pdf import _get_coordinates_of_block
```

Get the coordinates of rotated rectangle and rectangle that covers the
rotated rectangle.

---
## _get_link_annotation
```python
from backend_pdf import _get_link_annotation
```

Create a link annotation object for embedding URLs.

---
## pdfRepr
```python
from backend_pdf import pdfRepr
```



---
## _font_supports_glyph
```python
from backend_pdf import _font_supports_glyph
```

Returns True if the font is able to provide codepoint *glyph* in a PDF.

For a Type 3 font, this method returns True only for single-byte
characters. For Type 42 fonts this method return True if the character is
from the Basic Multilingual Plane.

---
## Reference
```python
from backend_pdf import Reference
```

PDF reference object.

Use PdfFile.reserveObject() to create References.

---
## Name
```python
from backend_pdf import Name
```

PDF name object.

---
## Verbatim
```python
from backend_pdf import Verbatim
```

Store verbatim PDF command content for later inclusion in the stream.

---
## Op
```python
from backend_pdf import Op
```

PDF operators (not an exhaustive list).

---
## Stream
```python
from backend_pdf import Stream
```

PDF stream object.

This has no pdfRepr method. Instead, call begin(), then output the
contents of the stream by calling write(), and finally call end().

---
## _get_pdf_charprocs
```python
from backend_pdf import _get_pdf_charprocs
```



---
## PdfFile
```python
from backend_pdf import PdfFile
```

PDF file object.

---
## RendererPdf
```python
from backend_pdf import RendererPdf
```



---
## GraphicsContextPdf
```python
from backend_pdf import GraphicsContextPdf
```



---
## PdfPages
```python
from backend_pdf import PdfPages
```

A multi-page PDF file.

Examples
--------
>>> import matplotlib.pyplot as plt
>>> # Initialize:
>>> with PdfPages('foo.pdf') as pdf:
...     # As many times as you like, create a figure fig and save it:
...     fig = plt.figure()
...     pdf.savefig(fig)
...     # When no figure is specified the current figure is saved
...     pdf.savefig()

Notes
-----
In reality `PdfPages` is a thin wrapper around `PdfFile`, in order to avoid
confusion when using `~.pyplot.savefig` and forgetting the format argument.

---
## FigureCanvasPdf
```python
from backend_pdf import FigureCanvasPdf
```



---
## _BackendPdf
```python
from backend_pdf import _BackendPdf
```



---
## is_string_like
```python
from backend_pdf import is_string_like
```



---
## is_date
```python
from backend_pdf import is_date
```



---
## check_trapped
```python
from backend_pdf import check_trapped
```



---
## __init__
```python
from backend_pdf import __init__
```

Create a new PdfPages object.

Parameters
----------
filename : str or path-like or file-like
    Plots using `PdfPages.savefig` will be written to a file at this location.
    The file is opened when a figure is saved for the first time (overwriting
    any older file with the same name).

keep_empty : bool, optional
    If set to False, then empty pdf files will be deleted automatically
    when closed.

metadata : dict, optional
    Information dictionary object (see PDF reference section 10.2.1
    'Document Information Dictionary'), e.g.:
    ``{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}``.

    The standard keys are 'Title', 'Author', 'Subject', 'Keywords',
    'Creator', 'Producer', 'CreationDate', 'ModDate', and
    'Trapped'. Values have been predefined for 'Creator', 'Producer'
    and 'CreationDate'. They can be removed by setting them to `None`.

---
## __repr__
```python
from backend_pdf import __repr__
```



---
## write
```python
from backend_pdf import write
```



---
## __str__
```python
from backend_pdf import __str__
```



---
## __eq__
```python
from backend_pdf import __eq__
```



---
## __lt__
```python
from backend_pdf import __lt__
```



---
## __hash__
```python
from backend_pdf import __hash__
```



---
## paint_path
```python
from backend_pdf import paint_path
```

Return the PDF operator to paint a path.

Parameters
----------
fill : bool
    Fill the path with the fill color.
stroke : bool
    Stroke the outline of the path with the line color.

---
## _writeHeader
```python
from backend_pdf import _writeHeader
```



---
## end
```python
from backend_pdf import end
```

Finalize stream.

---
## _flush
```python
from backend_pdf import _flush
```

Flush the compression object.

---
## newPage
```python
from backend_pdf import newPage
```



---
## newTextnote
```python
from backend_pdf import newTextnote
```



---
## _get_subsetted_psname
```python
from backend_pdf import _get_subsetted_psname
```



---
## finalize
```python
from backend_pdf import finalize
```

Make sure every pushed graphics state is popped.

---
## close
```python
from backend_pdf import close
```

Finalize this object, making the underlying file a complete
PDF file.

---
## output
```python
from backend_pdf import output
```



---
## beginStream
```python
from backend_pdf import beginStream
```



---
## endStream
```python
from backend_pdf import endStream
```



---
## outputStream
```python
from backend_pdf import outputStream
```



---
## _write_annotations
```python
from backend_pdf import _write_annotations
```



---
## fontName
```python
from backend_pdf import fontName
```

Select a font based on fontprop and return a name suitable for
Op.selectfont. If fontprop is a string, it will be interpreted
as the filename of the font.

---
## dviFontName
```python
from backend_pdf import dviFontName
```

Given a dvi font object, return a name suitable for Op.selectfont.
This registers the font information in ``self.dviFontInfo`` if not yet
registered.

---
## writeFonts
```python
from backend_pdf import writeFonts
```



---
## _write_afm_font
```python
from backend_pdf import _write_afm_font
```



---
## _embedTeXFont
```python
from backend_pdf import _embedTeXFont
```



---
## createType1Descriptor
```python
from backend_pdf import createType1Descriptor
```



---
## _get_xobject_glyph_name
```python
from backend_pdf import _get_xobject_glyph_name
```



---
## embedTTF
```python
from backend_pdf import embedTTF
```

Embed the TTF font from the named file into the document.

---
## alphaState
```python
from backend_pdf import alphaState
```

Return name of an ExtGState that sets alpha to the given value.

---
## _soft_mask_state
```python
from backend_pdf import _soft_mask_state
```

Return an ExtGState that sets the soft mask to the given shading.

Parameters
----------
smask : Reference
    Reference to a shading in DeviceGray color space, whose luminosity
    is to be used as the alpha channel.

Returns
-------
Name

---
## writeExtGSTates
```python
from backend_pdf import writeExtGSTates
```



---
## _write_soft_mask_groups
```python
from backend_pdf import _write_soft_mask_groups
```



---
## hatchPattern
```python
from backend_pdf import hatchPattern
```



---
## writeHatches
```python
from backend_pdf import writeHatches
```



---
## addGouraudTriangles
```python
from backend_pdf import addGouraudTriangles
```

Add a Gouraud triangle shading.

Parameters
----------
points : np.ndarray
    Triangle vertices, shape (n, 3, 2)
    where n = number of triangles, 3 = vertices, 2 = x, y.
colors : np.ndarray
    Vertex colors, shape (n, 3, 1) or (n, 3, 4)
    as with points, but last dimension is either (gray,)
    or (r, g, b, alpha).

Returns
-------
Name, Reference

---
## writeGouraudTriangles
```python
from backend_pdf import writeGouraudTriangles
```



---
## imageObject
```python
from backend_pdf import imageObject
```

Return name of an image XObject representing the given image.

---
## _unpack
```python
from backend_pdf import _unpack
```

Unpack image array *im* into ``(data, alpha)``, which have shape
``(height, width, 3)`` (RGB) or ``(height, width, 1)`` (grayscale or
alpha), except that alpha is None if the image is fully opaque.

---
## _writePng
```python
from backend_pdf import _writePng
```

Write the image *img* into the pdf file using png
predictors with Flate compression.

---
## _writeImg
```python
from backend_pdf import _writeImg
```

Write the image *data*, of shape ``(height, width, 1)`` (grayscale) or
``(height, width, 3)`` (RGB), as pdf object *id* and with the soft mask
(alpha channel) *smask*, which should be either None or a ``(height,
width, 1)`` array.

---
## writeImages
```python
from backend_pdf import writeImages
```



---
## markerObject
```python
from backend_pdf import markerObject
```

Return name of a marker XObject representing the given path.

---
## writeMarkers
```python
from backend_pdf import writeMarkers
```



---
## pathCollectionObject
```python
from backend_pdf import pathCollectionObject
```



---
## writePathCollectionTemplates
```python
from backend_pdf import writePathCollectionTemplates
```



---
## pathOperations
```python
from backend_pdf import pathOperations
```



---
## writePath
```python
from backend_pdf import writePath
```



---
## reserveObject
```python
from backend_pdf import reserveObject
```

Reserve an ID for an indirect object.

The name is used for debugging in case we forget to print out
the object with writeObject.

---
## recordXref
```python
from backend_pdf import recordXref
```



---
## writeObject
```python
from backend_pdf import writeObject
```



---
## writeXref
```python
from backend_pdf import writeXref
```

Write out the xref table.

---
## writeInfoDict
```python
from backend_pdf import writeInfoDict
```

Write out the info dictionary, checking it for good form

---
## writeTrailer
```python
from backend_pdf import writeTrailer
```

Write out the PDF trailer.

---
## check_gc
```python
from backend_pdf import check_gc
```



---
## get_image_magnification
```python
from backend_pdf import get_image_magnification
```



---
## draw_image
```python
from backend_pdf import draw_image
```



---
## draw_path
```python
from backend_pdf import draw_path
```



---
## draw_path_collection
```python
from backend_pdf import draw_path_collection
```



---
## draw_markers
```python
from backend_pdf import draw_markers
```



---
## draw_gouraud_triangles
```python
from backend_pdf import draw_gouraud_triangles
```



---
## _setup_textpos
```python
from backend_pdf import _setup_textpos
```



---
## draw_mathtext
```python
from backend_pdf import draw_mathtext
```



---
## draw_tex
```python
from backend_pdf import draw_tex
```



---
## encode_string
```python
from backend_pdf import encode_string
```



---
## draw_text
```python
from backend_pdf import draw_text
```



---
## _draw_xobject_glyph
```python
from backend_pdf import _draw_xobject_glyph
```

Draw a multibyte character from a Type 3 font as an XObject.

---
## new_gc
```python
from backend_pdf import new_gc
```



---
## stroke
```python
from backend_pdf import stroke
```

Predicate: does the path need to be stroked (its outline drawn)?
This tests for the various conditions that disable stroking
the path, in which case it would presumably be filled.

---
## fill
```python
from backend_pdf import fill
```

Predicate: does the path need to be filled?

An optional argument can be used to specify an alternative
_fillcolor, as needed by RendererPdf.draw_markers.

---
## paint
```python
from backend_pdf import paint
```

Return the appropriate pdf operator to cause the path to be
stroked, filled, or both.

---
## capstyle_cmd
```python
from backend_pdf import capstyle_cmd
```



---
## joinstyle_cmd
```python
from backend_pdf import joinstyle_cmd
```



---
## linewidth_cmd
```python
from backend_pdf import linewidth_cmd
```



---
## dash_cmd
```python
from backend_pdf import dash_cmd
```



---
## alpha_cmd
```python
from backend_pdf import alpha_cmd
```



---
## hatch_cmd
```python
from backend_pdf import hatch_cmd
```



---
## rgb_cmd
```python
from backend_pdf import rgb_cmd
```



---
## fillcolor_cmd
```python
from backend_pdf import fillcolor_cmd
```



---
## push
```python
from backend_pdf import push
```



---
## pop
```python
from backend_pdf import pop
```



---
## clip_cmd
```python
from backend_pdf import clip_cmd
```

Set clip rectangle. Calls `.pop()` and `.push()`.

---
## delta
```python
from backend_pdf import delta
```

Copy properties of other into self and return PDF commands
needed to transform *self* into *other*.

---
## copy_properties
```python
from backend_pdf import copy_properties
```

Copy properties of other into self.

---
## __enter__
```python
from backend_pdf import __enter__
```



---
## __exit__
```python
from backend_pdf import __exit__
```



---
## _ensure_file
```python
from backend_pdf import _ensure_file
```



---
## infodict
```python
from backend_pdf import infodict
```

Return a modifiable information dictionary object
(see PDF reference section 10.2.1 'Document Information
Dictionary').

---
## savefig
```python
from backend_pdf import savefig
```

Save a `.Figure` to this file as a new page.

Any other keyword arguments are passed to `~.Figure.savefig`.

Parameters
----------
figure : `.Figure` or int, default: the active figure
    The figure, or index of the figure, that is saved to the file.

---
## get_pagecount
```python
from backend_pdf import get_pagecount
```

Return the current number of pages in the multipage pdf file.

---
## attach_note
```python
from backend_pdf import attach_note
```

Add a new text note to the page to be saved next. The optional
positionRect specifies the position of the new note on the
page. It is outside the page per default to make sure it is
invisible on printouts.

---
## get_default_filetype
```python
from backend_pdf import get_default_filetype
```



---
## print_pdf
```python
from backend_pdf import print_pdf
```



---
## draw
```python
from backend_pdf import draw
```



---
## toStr
```python
from backend_pdf import toStr
```



---
## cvt
```python
from backend_pdf import cvt
```

Convert font coordinates to PDF glyph coordinates.

---
## embedTTFType3
```python
from backend_pdf import embedTTFType3
```

The Type 3-specific part of embedding a Truetype font

---
## embedTTFType42
```python
from backend_pdf import embedTTFType42
```

The Type 42-specific part of embedding a Truetype font

---
## get_char_width
```python
from backend_pdf import get_char_width
```



---
## __name__
```python
from backend_wxagg import __name__
```



---
## FigureCanvasWxAgg
```python
from backend_wxagg import FigureCanvasWxAgg
```



---
## _BackendWxAgg
```python
from backend_wxagg import _BackendWxAgg
```



---
## draw
```python
from backend_wxagg import draw
```

Render the figure using agg.

---
## blit
```python
from backend_wxagg import blit
```



---
## _create_bitmap
```python
from backend_wxagg import _create_bitmap
```

Create a wx.Bitmap from the renderer RGBA buffer

---
## __name__
```python
from backend_pgf import __name__
```



---
## _get_preamble
```python
from backend_pgf import _get_preamble
```

Prepare a LaTeX preamble based on the rcParams configuration.

---
## _tex_escape
```python
from backend_pgf import _tex_escape
```

Do some necessary and/or useful substitutions for texts to be included in
LaTeX documents.

---
## _writeln
```python
from backend_pgf import _writeln
```



---
## _escape_and_apply_props
```python
from backend_pgf import _escape_and_apply_props
```

Generate a TeX string that renders string *s* with font properties *prop*,
also applying any required escapes to *s*.

---
## _metadata_to_str
```python
from backend_pgf import _metadata_to_str
```

Convert metadata key/value to a form that hyperref accepts.

---
## make_pdf_to_png_converter
```python
from backend_pgf import make_pdf_to_png_converter
```

Return a function that converts a pdf file to a png file.

---
## LatexError
```python
from backend_pgf import LatexError
```



---
## LatexManager
```python
from backend_pgf import LatexManager
```

The LatexManager opens an instance of the LaTeX application for
determining the metrics of text elements. The LaTeX environment can be
modified by setting fonts and/or a custom preamble in `.rcParams`.

---
## _get_image_inclusion_command
```python
from backend_pgf import _get_image_inclusion_command
```



---
## RendererPgf
```python
from backend_pgf import RendererPgf
```



---
## FigureCanvasPgf
```python
from backend_pgf import FigureCanvasPgf
```



---
## _BackendPgf
```python
from backend_pgf import _BackendPgf
```



---
## PdfPages
```python
from backend_pgf import PdfPages
```

A multi-page PDF file using the pgf backend

Examples
--------
>>> import matplotlib.pyplot as plt
>>> # Initialize:
>>> with PdfPages('foo.pdf') as pdf:
...     # As many times as you like, create a figure fig and save it:
...     fig = plt.figure()
...     pdf.savefig(fig)
...     # When no figure is specified the current figure is saved
...     pdf.savefig()

---
## __init__
```python
from backend_pgf import __init__
```

Create a new PdfPages object.

Parameters
----------
filename : str or path-like
    Plots using `PdfPages.savefig` will be written to a file at this
    location. Any older file with the same name is overwritten.

keep_empty : bool, default: True
    If set to False, then empty pdf files will be deleted automatically
    when closed.

metadata : dict, optional
    Information dictionary object (see PDF reference section 10.2.1
    'Document Information Dictionary'), e.g.:
    ``{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome'}``.

    The standard keys are 'Title', 'Author', 'Subject', 'Keywords',
    'Creator', 'Producer', 'CreationDate', 'ModDate', and
    'Trapped'. Values have been predefined for 'Creator', 'Producer'
    and 'CreationDate'. They can be removed by setting them to `None`.

    Note that some versions of LaTeX engines may ignore the 'Producer'
    key and set it to themselves.

---
## __str__
```python
from backend_pgf import __str__
```



---
## _build_latex_header
```python
from backend_pgf import _build_latex_header
```



---
## _get_cached_or_new
```python
from backend_pgf import _get_cached_or_new
```

Return the previous LatexManager if the header and tex system did not
change, or a new instance otherwise.

---
## _get_cached_or_new_impl
```python
from backend_pgf import _get_cached_or_new_impl
```



---
## _stdin_writeln
```python
from backend_pgf import _stdin_writeln
```



---
## _expect
```python
from backend_pgf import _expect
```



---
## _expect_prompt
```python
from backend_pgf import _expect_prompt
```



---
## _setup_latex_process
```python
from backend_pgf import _setup_latex_process
```



---
## get_width_height_descent
```python
from backend_pgf import get_width_height_descent
```

Get the width, total height, and descent (in TeX points) for a text
typeset by the current LaTeX environment.

---
## _get_box_metrics
```python
from backend_pgf import _get_box_metrics
```

Get the width, total height and descent (in TeX points) for a TeX
command's output in the current LaTeX environment.

---
## draw_markers
```python
from backend_pgf import draw_markers
```



---
## draw_path
```python
from backend_pgf import draw_path
```



---
## _print_pgf_clip
```python
from backend_pgf import _print_pgf_clip
```



---
## _print_pgf_path_styles
```python
from backend_pgf import _print_pgf_path_styles
```



---
## _print_pgf_path
```python
from backend_pgf import _print_pgf_path
```



---
## _pgf_path_draw
```python
from backend_pgf import _pgf_path_draw
```



---
## option_scale_image
```python
from backend_pgf import option_scale_image
```



---
## option_image_nocomposite
```python
from backend_pgf import option_image_nocomposite
```



---
## draw_image
```python
from backend_pgf import draw_image
```



---
## draw_tex
```python
from backend_pgf import draw_tex
```



---
## draw_text
```python
from backend_pgf import draw_text
```



---
## get_text_width_height_descent
```python
from backend_pgf import get_text_width_height_descent
```



---
## flipy
```python
from backend_pgf import flipy
```



---
## get_canvas_width_height
```python
from backend_pgf import get_canvas_width_height
```



---
## points_to_pixels
```python
from backend_pgf import points_to_pixels
```



---
## get_default_filetype
```python
from backend_pgf import get_default_filetype
```



---
## _print_pgf_to_fh
```python
from backend_pgf import _print_pgf_to_fh
```



---
## print_pgf
```python
from backend_pgf import print_pgf
```

Output pgf macros for drawing the figure so it can be included and
rendered in latex documents.

---
## print_pdf
```python
from backend_pgf import print_pdf
```

Use LaTeX to compile a pgf generated figure to pdf.

---
## print_png
```python
from backend_pgf import print_png
```

Use LaTeX to compile a pgf figure to pdf and convert it to png.

---
## get_renderer
```python
from backend_pgf import get_renderer
```



---
## draw
```python
from backend_pgf import draw
```



---
## _write_header
```python
from backend_pgf import _write_header
```



---
## __enter__
```python
from backend_pgf import __enter__
```



---
## __exit__
```python
from backend_pgf import __exit__
```



---
## close
```python
from backend_pgf import close
```

Finalize this object, running LaTeX in a temporary directory
and moving the final pdf file to *filename*.

---
## _run_latex
```python
from backend_pgf import _run_latex
```



---
## savefig
```python
from backend_pgf import savefig
```

Save a `.Figure` to this file as a new page.

Any other keyword arguments are passed to `~.Figure.savefig`.

Parameters
----------
figure : `.Figure` or int, default: the active figure
    The figure, or index of the figure, that is saved to the file.

---
## get_pagecount
```python
from backend_pgf import get_pagecount
```

Return the current number of pages in the multipage pdf file.

---
## finalize_latex
```python
from backend_pgf import finalize_latex
```



---
## __name__
```python
from backend_mixed import __name__
```



---
## MixedModeRenderer
```python
from backend_mixed import MixedModeRenderer
```

A helper class to implement a renderer that switches between
vector and raster drawing.  An example may be a PDF writer, where
most things are drawn with PDF vector commands, but some very
complex objects, such as quad meshes, are rasterised and then
output as images.

---
## __init__
```python
from backend_mixed import __init__
```

Parameters
----------
figure : `~matplotlib.figure.Figure`
    The figure instance.
width : scalar
    The width of the canvas in logical units
height : scalar
    The height of the canvas in logical units
dpi : float
    The dpi of the canvas
vector_renderer : `~matplotlib.backend_bases.RendererBase`
    An instance of a subclass of
    `~matplotlib.backend_bases.RendererBase` that will be used for the
    vector drawing.
raster_renderer_class : `~matplotlib.backend_bases.RendererBase`
    The renderer class to use for the raster drawing.  If not provided,
    this will use the Agg backend (which is currently the only viable
    option anyway.)

---
## __getattr__
```python
from backend_mixed import __getattr__
```



---
## start_rasterizing
```python
from backend_mixed import start_rasterizing
```

Enter "raster" mode.  All subsequent drawing commands (until
`stop_rasterizing` is called) will be drawn with the raster backend.

---
## stop_rasterizing
```python
from backend_mixed import stop_rasterizing
```

Exit "raster" mode.  All of the drawing that was done since
the last `start_rasterizing` call will be copied to the
vector backend by calling draw_image.

---
## __name__
```python
from backend_macosx import __name__
```



---
## TimerMac
```python
from backend_macosx import TimerMac
```

Subclass of `.TimerBase` using CFRunLoop timer events.

---
## _allow_interrupt_macos
```python
from backend_macosx import _allow_interrupt_macos
```

A context manager that allows terminating a plot by sending a SIGINT.

---
## FigureCanvasMac
```python
from backend_macosx import FigureCanvasMac
```



---
## NavigationToolbar2Mac
```python
from backend_macosx import NavigationToolbar2Mac
```



---
## FigureManagerMac
```python
from backend_macosx import FigureManagerMac
```



---
## _BackendMac
```python
from backend_macosx import _BackendMac
```



---
## __init__
```python
from backend_macosx import __init__
```



---
## draw
```python
from backend_macosx import draw
```

Render the figure and update the macosx canvas.

---
## draw_idle
```python
from backend_macosx import draw_idle
```



---
## _single_shot_timer
```python
from backend_macosx import _single_shot_timer
```

Add a single shot timer with the given callback

---
## _draw_idle
```python
from backend_macosx import _draw_idle
```

Draw method for singleshot timer

This draw method can be added to a singleshot timer, which can
accumulate draws while the eventloop is spinning. This method will
then only draw the first time and short-circuit the others.

---
## blit
```python
from backend_macosx import blit
```



---
## resize
```python
from backend_macosx import resize
```



---
## start_event_loop
```python
from backend_macosx import start_event_loop
```



---
## draw_rubberband
```python
from backend_macosx import draw_rubberband
```



---
## remove_rubberband
```python
from backend_macosx import remove_rubberband
```



---
## save_figure
```python
from backend_macosx import save_figure
```



---
## _close_button_pressed
```python
from backend_macosx import _close_button_pressed
```



---
## destroy
```python
from backend_macosx import destroy
```



---
## start_main_loop
```python
from backend_macosx import start_main_loop
```



---
## show
```python
from backend_macosx import show
```



---
## callback_func
```python
from backend_macosx import callback_func
```



---
## __name__
```python
from backend_gtk4 import __name__
```



---
## FigureCanvasGTK4
```python
from backend_gtk4 import FigureCanvasGTK4
```



---
## NavigationToolbar2GTK4
```python
from backend_gtk4 import NavigationToolbar2GTK4
```



---
## ToolbarGTK4
```python
from backend_gtk4 import ToolbarGTK4
```



---
## SaveFigureGTK4
```python
from backend_gtk4 import SaveFigureGTK4
```



---
## HelpGTK4
```python
from backend_gtk4 import HelpGTK4
```



---
## ToolCopyToClipboardGTK4
```python
from backend_gtk4 import ToolCopyToClipboardGTK4
```



---
## FigureManagerGTK4
```python
from backend_gtk4 import FigureManagerGTK4
```



---
## _BackendGTK4
```python
from backend_gtk4 import _BackendGTK4
```



---
## __init__
```python
from backend_gtk4 import __init__
```



---
## destroy
```python
from backend_gtk4 import destroy
```



---
## set_cursor
```python
from backend_gtk4 import set_cursor
```



---
## _mpl_coords
```python
from backend_gtk4 import _mpl_coords
```

Convert the *xy* position of a GTK event, or of the current cursor
position if *xy* is None, to Matplotlib coordinates.

GTK use logical pixels, but the figure is scaled to physical pixels for
rendering.  Transform to physical pixels so that all of the down-stream
transforms work as expected.

Also, the origin is different and needs to be corrected.

---
## scroll_event
```python
from backend_gtk4 import scroll_event
```



---
## button_press_event
```python
from backend_gtk4 import button_press_event
```



---
## button_release_event
```python
from backend_gtk4 import button_release_event
```



---
## key_press_event
```python
from backend_gtk4 import key_press_event
```



---
## key_release_event
```python
from backend_gtk4 import key_release_event
```



---
## motion_notify_event
```python
from backend_gtk4 import motion_notify_event
```



---
## enter_notify_event
```python
from backend_gtk4 import enter_notify_event
```



---
## leave_notify_event
```python
from backend_gtk4 import leave_notify_event
```



---
## resize_event
```python
from backend_gtk4 import resize_event
```



---
## _mpl_modifiers
```python
from backend_gtk4 import _mpl_modifiers
```



---
## _get_key
```python
from backend_gtk4 import _get_key
```



---
## _update_device_pixel_ratio
```python
from backend_gtk4 import _update_device_pixel_ratio
```



---
## _draw_rubberband
```python
from backend_gtk4 import _draw_rubberband
```



---
## _draw_func
```python
from backend_gtk4 import _draw_func
```



---
## _post_draw
```python
from backend_gtk4 import _post_draw
```



---
## on_draw_event
```python
from backend_gtk4 import on_draw_event
```



---
## draw
```python
from backend_gtk4 import draw
```



---
## draw_idle
```python
from backend_gtk4 import draw_idle
```



---
## flush_events
```python
from backend_gtk4 import flush_events
```



---
## save_figure
```python
from backend_gtk4 import save_figure
```



---
## add_toolitem
```python
from backend_gtk4 import add_toolitem
```



---
## _find_child_at_position
```python
from backend_gtk4 import _find_child_at_position
```



---
## _add_button
```python
from backend_gtk4 import _add_button
```



---
## _call_tool
```python
from backend_gtk4 import _call_tool
```



---
## toggle_toolitem
```python
from backend_gtk4 import toggle_toolitem
```



---
## remove_toolitem
```python
from backend_gtk4 import remove_toolitem
```



---
## _add_separator
```python
from backend_gtk4 import _add_separator
```



---
## set_message
```python
from backend_gtk4 import set_message
```



---
## trigger
```python
from backend_gtk4 import trigger
```



---
## _normalize_shortcut
```python
from backend_gtk4 import _normalize_shortcut
```

Convert Matplotlib key presses to GTK+ accelerator identifiers.

Related to `FigureCanvasGTK4._get_key`.

---
## _is_valid_shortcut
```python
from backend_gtk4 import _is_valid_shortcut
```

Check for a valid shortcut to be displayed.

- GTK will never send 'cmd+' (see `FigureCanvasGTK4._get_key`).
- The shortcut window only shows keyboard shortcuts, not mouse buttons.

---
## idle_draw
```python
from backend_gtk4 import idle_draw
```



---
## on_response
```python
from backend_gtk4 import on_response
```



---
## __name__
```python
from backend_tkcairo import __name__
```



---
## FigureCanvasTkCairo
```python
from backend_tkcairo import FigureCanvasTkCairo
```



---
## _BackendTkCairo
```python
from backend_tkcairo import _BackendTkCairo
```



---
## draw
```python
from backend_tkcairo import draw
```



---
## __name__
```python
from backend_gtk3 import __name__
```



---
## _mpl_to_gtk_cursor
```python
from backend_gtk3 import _mpl_to_gtk_cursor
```



---
## FigureCanvasGTK3
```python
from backend_gtk3 import FigureCanvasGTK3
```



---
## NavigationToolbar2GTK3
```python
from backend_gtk3 import NavigationToolbar2GTK3
```



---
## ToolbarGTK3
```python
from backend_gtk3 import ToolbarGTK3
```



---
## SaveFigureGTK3
```python
from backend_gtk3 import SaveFigureGTK3
```



---
## HelpGTK3
```python
from backend_gtk3 import HelpGTK3
```



---
## ToolCopyToClipboardGTK3
```python
from backend_gtk3 import ToolCopyToClipboardGTK3
```



---
## FigureManagerGTK3
```python
from backend_gtk3 import FigureManagerGTK3
```



---
## _BackendGTK3
```python
from backend_gtk3 import _BackendGTK3
```



---
## __init__
```python
from backend_gtk3 import __init__
```



---
## destroy
```python
from backend_gtk3 import destroy
```



---
## set_cursor
```python
from backend_gtk3 import set_cursor
```



---
## _mpl_coords
```python
from backend_gtk3 import _mpl_coords
```

Convert the position of a GTK event, or of the current cursor position
if *event* is None, to Matplotlib coordinates.

GTK use logical pixels, but the figure is scaled to physical pixels for
rendering.  Transform to physical pixels so that all of the down-stream
transforms work as expected.

Also, the origin is different and needs to be corrected.

---
## scroll_event
```python
from backend_gtk3 import scroll_event
```



---
## button_press_event
```python
from backend_gtk3 import button_press_event
```



---
## button_release_event
```python
from backend_gtk3 import button_release_event
```



---
## key_press_event
```python
from backend_gtk3 import key_press_event
```



---
## key_release_event
```python
from backend_gtk3 import key_release_event
```



---
## motion_notify_event
```python
from backend_gtk3 import motion_notify_event
```



---
## enter_notify_event
```python
from backend_gtk3 import enter_notify_event
```



---
## leave_notify_event
```python
from backend_gtk3 import leave_notify_event
```



---
## size_allocate
```python
from backend_gtk3 import size_allocate
```



---
## _mpl_modifiers
```python
from backend_gtk3 import _mpl_modifiers
```



---
## _get_key
```python
from backend_gtk3 import _get_key
```



---
## _update_device_pixel_ratio
```python
from backend_gtk3 import _update_device_pixel_ratio
```



---
## configure_event
```python
from backend_gtk3 import configure_event
```



---
## _draw_rubberband
```python
from backend_gtk3 import _draw_rubberband
```



---
## _post_draw
```python
from backend_gtk3 import _post_draw
```



---
## on_draw_event
```python
from backend_gtk3 import on_draw_event
```



---
## draw
```python
from backend_gtk3 import draw
```



---
## draw_idle
```python
from backend_gtk3 import draw_idle
```



---
## flush_events
```python
from backend_gtk3 import flush_events
```



---
## save_figure
```python
from backend_gtk3 import save_figure
```



---
## add_toolitem
```python
from backend_gtk3 import add_toolitem
```



---
## _add_button
```python
from backend_gtk3 import _add_button
```



---
## _call_tool
```python
from backend_gtk3 import _call_tool
```



---
## toggle_toolitem
```python
from backend_gtk3 import toggle_toolitem
```



---
## remove_toolitem
```python
from backend_gtk3 import remove_toolitem
```



---
## _add_separator
```python
from backend_gtk3 import _add_separator
```



---
## set_message
```python
from backend_gtk3 import set_message
```



---
## trigger
```python
from backend_gtk3 import trigger
```



---
## _normalize_shortcut
```python
from backend_gtk3 import _normalize_shortcut
```

Convert Matplotlib key presses to GTK+ accelerator identifiers.

Related to `FigureCanvasGTK3._get_key`.

---
## _is_valid_shortcut
```python
from backend_gtk3 import _is_valid_shortcut
```

Check for a valid shortcut to be displayed.

- GTK will never send 'cmd+' (see `FigureCanvasGTK3._get_key`).
- The shortcut window only shows keyboard shortcuts, not mouse buttons.

---
## _show_shortcuts_window
```python
from backend_gtk3 import _show_shortcuts_window
```



---
## _show_shortcuts_dialog
```python
from backend_gtk3 import _show_shortcuts_dialog
```



---
## idle_draw
```python
from backend_gtk3 import idle_draw
```



---
## on_notify_filter
```python
from backend_gtk3 import on_notify_filter
```



---
## __name__
```python
from backend_wxcairo import __name__
```



---
## FigureCanvasWxCairo
```python
from backend_wxcairo import FigureCanvasWxCairo
```



---
## _BackendWxCairo
```python
from backend_wxcairo import _BackendWxCairo
```



---
## draw
```python
from backend_wxcairo import draw
```



---
## __name__
```python
from backend_nbagg import __name__
```

Interactive figures in the IPython notebook.

---
## connection_info
```python
from backend_nbagg import connection_info
```

Return a string showing the figure and connection status for the backend.

This is intended as a diagnostic tool, and not for general use.

---
## NavigationIPy
```python
from backend_nbagg import NavigationIPy
```



---
## FigureManagerNbAgg
```python
from backend_nbagg import FigureManagerNbAgg
```



---
## FigureCanvasNbAgg
```python
from backend_nbagg import FigureCanvasNbAgg
```



---
## CommSocket
```python
from backend_nbagg import CommSocket
```

Manages the Comm connection between IPython and the browser (client).

Comms are 2 way, with the CommSocket being able to publish a message
via the send_json method, and handle a message with on_message. On the
JS side figure.send_message and figure.ws.onmessage do the sending and
receiving respectively.

---
## _BackendNbAgg
```python
from backend_nbagg import _BackendNbAgg
```



---
## __init__
```python
from backend_nbagg import __init__
```



---
## create_with_canvas
```python
from backend_nbagg import create_with_canvas
```



---
## display_js
```python
from backend_nbagg import display_js
```



---
## show
```python
from backend_nbagg import show
```



---
## reshow
```python
from backend_nbagg import reshow
```

A special method to re-show the figure in the notebook.

---
## connected
```python
from backend_nbagg import connected
```



---
## get_javascript
```python
from backend_nbagg import get_javascript
```



---
## _create_comm
```python
from backend_nbagg import _create_comm
```



---
## destroy
```python
from backend_nbagg import destroy
```



---
## clearup_closed
```python
from backend_nbagg import clearup_closed
```

Clear up any closed Comms.

---
## remove_comm
```python
from backend_nbagg import remove_comm
```



---
## is_open
```python
from backend_nbagg import is_open
```



---
## on_close
```python
from backend_nbagg import on_close
```



---
## send_json
```python
from backend_nbagg import send_json
```



---
## send_binary
```python
from backend_nbagg import send_binary
```



---
## on_message
```python
from backend_nbagg import on_message
```



---
## _on_close
```python
from backend_nbagg import _on_close
```



---
## __name__
```python
from backend_webagg_core import __name__
```

Displays Agg images in the browser, with interactivity.

---
## _handle_key
```python
from backend_webagg_core import _handle_key
```



---
## TimerTornado
```python
from backend_webagg_core import TimerTornado
```



---
## TimerAsyncio
```python
from backend_webagg_core import TimerAsyncio
```



---
## FigureCanvasWebAggCore
```python
from backend_webagg_core import FigureCanvasWebAggCore
```



---
## NavigationToolbar2WebAgg
```python
from backend_webagg_core import NavigationToolbar2WebAgg
```



---
## FigureManagerWebAgg
```python
from backend_webagg_core import FigureManagerWebAgg
```



---
## _BackendWebAggCoreAgg
```python
from backend_webagg_core import _BackendWebAggCoreAgg
```



---
## __init__
```python
from backend_webagg_core import __init__
```



---
## _timer_start
```python
from backend_webagg_core import _timer_start
```



---
## _timer_stop
```python
from backend_webagg_core import _timer_stop
```



---
## _timer_set_interval
```python
from backend_webagg_core import _timer_set_interval
```



---
## show
```python
from backend_webagg_core import show
```



---
## draw
```python
from backend_webagg_core import draw
```



---
## blit
```python
from backend_webagg_core import blit
```



---
## draw_idle
```python
from backend_webagg_core import draw_idle
```



---
## set_cursor
```python
from backend_webagg_core import set_cursor
```



---
## set_image_mode
```python
from backend_webagg_core import set_image_mode
```

Set the image mode for any subsequent images which will be sent
to the clients. The modes may currently be either 'full' or 'diff'.

Note: diff images may not contain transparency, therefore upon
draw this mode may be changed if the resulting image has any
transparent component.

---
## get_diff_image
```python
from backend_webagg_core import get_diff_image
```



---
## handle_event
```python
from backend_webagg_core import handle_event
```



---
## handle_unknown_event
```python
from backend_webagg_core import handle_unknown_event
```



---
## handle_ack
```python
from backend_webagg_core import handle_ack
```



---
## handle_draw
```python
from backend_webagg_core import handle_draw
```



---
## _handle_mouse
```python
from backend_webagg_core import _handle_mouse
```



---
## handle_toolbar_button
```python
from backend_webagg_core import handle_toolbar_button
```



---
## handle_refresh
```python
from backend_webagg_core import handle_refresh
```



---
## handle_resize
```python
from backend_webagg_core import handle_resize
```



---
## handle_send_image_mode
```python
from backend_webagg_core import handle_send_image_mode
```



---
## handle_set_device_pixel_ratio
```python
from backend_webagg_core import handle_set_device_pixel_ratio
```



---
## handle_set_dpi_ratio
```python
from backend_webagg_core import handle_set_dpi_ratio
```



---
## _handle_set_device_pixel_ratio
```python
from backend_webagg_core import _handle_set_device_pixel_ratio
```



---
## send_event
```python
from backend_webagg_core import send_event
```



---
## set_message
```python
from backend_webagg_core import set_message
```



---
## draw_rubberband
```python
from backend_webagg_core import draw_rubberband
```



---
## remove_rubberband
```python
from backend_webagg_core import remove_rubberband
```



---
## save_figure
```python
from backend_webagg_core import save_figure
```

Save the current figure

---
## pan
```python
from backend_webagg_core import pan
```



---
## zoom
```python
from backend_webagg_core import zoom
```



---
## set_history_buttons
```python
from backend_webagg_core import set_history_buttons
```



---
## resize
```python
from backend_webagg_core import resize
```



---
## set_window_title
```python
from backend_webagg_core import set_window_title
```



---
## get_window_title
```python
from backend_webagg_core import get_window_title
```



---
## add_web_socket
```python
from backend_webagg_core import add_web_socket
```



---
## remove_web_socket
```python
from backend_webagg_core import remove_web_socket
```



---
## handle_json
```python
from backend_webagg_core import handle_json
```



---
## refresh_all
```python
from backend_webagg_core import refresh_all
```



---
## get_javascript
```python
from backend_webagg_core import get_javascript
```



---
## get_static_file_path
```python
from backend_webagg_core import get_static_file_path
```



---
## _send_event
```python
from backend_webagg_core import _send_event
```



---
## __name__
```python
from backend_gtk4cairo import __name__
```



---
## FigureCanvasGTK4Cairo
```python
from backend_gtk4cairo import FigureCanvasGTK4Cairo
```



---
## _BackendGTK4Cairo
```python
from backend_gtk4cairo import _BackendGTK4Cairo
```



---
## _set_device_pixel_ratio
```python
from backend_gtk4cairo import _set_device_pixel_ratio
```



---
## on_draw_event
```python
from backend_gtk4cairo import on_draw_event
```



---
## __name__
```python
from backend_wx import __name__
```

A wxPython backend for matplotlib.

Originally contributed by Jeremy O'Donoghue (jeremy@o-donoghue.com) and John
Hunter (jdhunter@ace.bsd.uchicago.edu).

Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4.

---
## _create_wxapp
```python
from backend_wx import _create_wxapp
```



---
## TimerWx
```python
from backend_wx import TimerWx
```

Subclass of `.TimerBase` using wx.Timer events.

---
## RendererWx
```python
from backend_wx import RendererWx
```

The renderer handles all the drawing primitives using a graphics
context instance that controls the colors/styles. It acts as the
'renderer' instance used by many classes in the hierarchy.

---
## GraphicsContextWx
```python
from backend_wx import GraphicsContextWx
```

The graphics context provides the color, line styles, etc.

This class stores a reference to a wxMemoryDC, and a
wxGraphicsContext that draws to it.  Creating a wxGraphicsContext
seems to be fairly heavy, so these objects are cached based on the
bitmap object that is passed in.

The base GraphicsContext stores colors as an RGB tuple on the unit
interval, e.g., (0.5, 0.0, 1.0).  wxPython uses an int interval, but
since wxPython colour management is rather simple, I have not chosen
to implement a separate colour manager class.

---
## _FigureCanvasWxBase
```python
from backend_wx import _FigureCanvasWxBase
```

The FigureCanvas contains the figure and does event handling.

In the wxPython backend, it is derived from wxPanel, and (usually) lives
inside a frame instantiated by a FigureManagerWx. The parent window
probably implements a wx.Sizer to control the displayed control size - but
we give a hint as to our preferred minimum size.

---
## FigureCanvasWx
```python
from backend_wx import FigureCanvasWx
```



---
## FigureFrameWx
```python
from backend_wx import FigureFrameWx
```



---
## FigureManagerWx
```python
from backend_wx import FigureManagerWx
```

Container/controller for the FigureCanvas and GUI frame.

It is instantiated by Gcf whenever a new figure is created.  Gcf is
responsible for managing multiple instances of FigureManagerWx.

Attributes
----------
canvas : `FigureCanvas`
    a FigureCanvasWx(wx.Panel) instance
window : wxFrame
    a wxFrame instance - wxpython.org/Phoenix/docs/html/Frame.html

---
## _load_bitmap
```python
from backend_wx import _load_bitmap
```

Load a wx.Bitmap from a file in the "images" directory of the Matplotlib
data.

---
## _set_frame_icon
```python
from backend_wx import _set_frame_icon
```



---
## NavigationToolbar2Wx
```python
from backend_wx import NavigationToolbar2Wx
```



---
## ToolbarWx
```python
from backend_wx import ToolbarWx
```



---
## ConfigureSubplotsWx
```python
from backend_wx import ConfigureSubplotsWx
```



---
## SaveFigureWx
```python
from backend_wx import SaveFigureWx
```



---
## RubberbandWx
```python
from backend_wx import RubberbandWx
```



---
## _HelpDialog
```python
from backend_wx import _HelpDialog
```



---
## HelpWx
```python
from backend_wx import HelpWx
```



---
## ToolCopyToClipboardWx
```python
from backend_wx import ToolCopyToClipboardWx
```



---
## _BackendWx
```python
from backend_wx import _BackendWx
```



---
## __init__
```python
from backend_wx import __init__
```



---
## _timer_start
```python
from backend_wx import _timer_start
```



---
## _timer_stop
```python
from backend_wx import _timer_stop
```



---
## _timer_set_interval
```python
from backend_wx import _timer_set_interval
```



---
## flipy
```python
from backend_wx import flipy
```



---
## get_text_width_height_descent
```python
from backend_wx import get_text_width_height_descent
```



---
## get_canvas_width_height
```python
from backend_wx import get_canvas_width_height
```



---
## handle_clip_rectangle
```python
from backend_wx import handle_clip_rectangle
```



---
## convert_path
```python
from backend_wx import convert_path
```



---
## draw_path
```python
from backend_wx import draw_path
```



---
## draw_image
```python
from backend_wx import draw_image
```



---
## draw_text
```python
from backend_wx import draw_text
```



---
## new_gc
```python
from backend_wx import new_gc
```



---
## get_wx_font
```python
from backend_wx import get_wx_font
```

Return a wx font.  Cache font instances for efficiency.

---
## points_to_pixels
```python
from backend_wx import points_to_pixels
```



---
## select
```python
from backend_wx import select
```

Select the current bitmap into this wxDC instance.

---
## unselect
```python
from backend_wx import unselect
```

Select a Null bitmap into this wxDC instance.

---
## set_foreground
```python
from backend_wx import set_foreground
```



---
## set_linewidth
```python
from backend_wx import set_linewidth
```



---
## set_capstyle
```python
from backend_wx import set_capstyle
```



---
## set_joinstyle
```python
from backend_wx import set_joinstyle
```



---
## get_wxcolour
```python
from backend_wx import get_wxcolour
```

Convert an RGB(A) color to a wx.Colour.

---
## Copy_to_Clipboard
```python
from backend_wx import Copy_to_Clipboard
```

Copy bitmap of canvas to system clipboard.

---
## _update_device_pixel_ratio
```python
from backend_wx import _update_device_pixel_ratio
```



---
## draw_idle
```python
from backend_wx import draw_idle
```



---
## flush_events
```python
from backend_wx import flush_events
```



---
## start_event_loop
```python
from backend_wx import start_event_loop
```



---
## stop_event_loop
```python
from backend_wx import stop_event_loop
```



---
## _get_imagesave_wildcards
```python
from backend_wx import _get_imagesave_wildcards
```

Return the wildcard string for the filesave dialog.

---
## gui_repaint
```python
from backend_wx import gui_repaint
```

Update the displayed image on the GUI canvas, using the supplied
wx.PaintDC device context.

---
## _on_paint
```python
from backend_wx import _on_paint
```

Called when wxPaintEvt is generated.

---
## _on_size
```python
from backend_wx import _on_size
```

Called when wxEventSize is generated.

In this application we attempt to resize to fit the window, so it
is better to take the performance hit and redraw the whole window.

---
## _mpl_modifiers
```python
from backend_wx import _mpl_modifiers
```



---
## _get_key
```python
from backend_wx import _get_key
```



---
## _mpl_coords
```python
from backend_wx import _mpl_coords
```

Convert a wx position, defaulting to the current cursor position, to
Matplotlib coordinates.

---
## _on_key_down
```python
from backend_wx import _on_key_down
```

Capture key press.

---
## _on_key_up
```python
from backend_wx import _on_key_up
```

Release key.

---
## set_cursor
```python
from backend_wx import set_cursor
```



---
## _set_capture
```python
from backend_wx import _set_capture
```

Control wx mouse capture.

---
## _on_capture_lost
```python
from backend_wx import _on_capture_lost
```

Capture changed or lost

---
## _on_mouse_button
```python
from backend_wx import _on_mouse_button
```

Start measuring on an axis.

---
## _on_mouse_wheel
```python
from backend_wx import _on_mouse_wheel
```

Translate mouse wheel events into matplotlib events

---
## _on_motion
```python
from backend_wx import _on_motion
```

Start measuring on an axis.

---
## _on_enter
```python
from backend_wx import _on_enter
```

Mouse has entered the window.

---
## _on_leave
```python
from backend_wx import _on_leave
```

Mouse has left the window.

---
## draw
```python
from backend_wx import draw
```

Render the figure using RendererWx instance renderer, or using a
previously defined renderer if none is specified.

---
## _print_image
```python
from backend_wx import _print_image
```



---
## _on_close
```python
from backend_wx import _on_close
```



---
## create_with_canvas
```python
from backend_wx import create_with_canvas
```



---
## start_main_loop
```python
from backend_wx import start_main_loop
```



---
## show
```python
from backend_wx import show
```



---
## destroy
```python
from backend_wx import destroy
```



---
## full_screen_toggle
```python
from backend_wx import full_screen_toggle
```



---
## get_window_title
```python
from backend_wx import get_window_title
```



---
## set_window_title
```python
from backend_wx import set_window_title
```



---
## resize
```python
from backend_wx import resize
```



---
## _icon
```python
from backend_wx import _icon
```

Construct a `wx.Bitmap` suitable for use as icon from an image file
*name*, including the extension and relative to Matplotlib's "images"
data directory.

---
## _update_buttons_checked
```python
from backend_wx import _update_buttons_checked
```



---
## zoom
```python
from backend_wx import zoom
```



---
## pan
```python
from backend_wx import pan
```



---
## save_figure
```python
from backend_wx import save_figure
```



---
## draw_rubberband
```python
from backend_wx import draw_rubberband
```



---
## remove_rubberband
```python
from backend_wx import remove_rubberband
```



---
## set_message
```python
from backend_wx import set_message
```



---
## set_history_buttons
```python
from backend_wx import set_history_buttons
```



---
## _get_tool_pos
```python
from backend_wx import _get_tool_pos
```

Find the position (index) of a wx.ToolBarToolBase in a ToolBar.

``ToolBar.GetToolPos`` is not useful because wx assigns the same Id to
all Separators and StretchableSpaces.

---
## add_toolitem
```python
from backend_wx import add_toolitem
```



---
## toggle_toolitem
```python
from backend_wx import toggle_toolitem
```



---
## remove_toolitem
```python
from backend_wx import remove_toolitem
```



---
## trigger
```python
from backend_wx import trigger
```



---
## handler
```python
from backend_wx import handler
```



---
## __name__
```python
from backend_qt5cairo import __name__
```



---
## _BackendQT5Cairo
```python
from backend_qt5cairo import _BackendQT5Cairo
```



---
## __name__
```python
from _backend_tk import __name__
```



---
## _restore_foreground_window_at_end
```python
from _backend_tk import _restore_foreground_window_at_end
```



---
## _blit
```python
from _backend_tk import _blit
```

Thin wrapper to blit called via tkapp.call.

*argsid* is a unique string identifier to fetch the correct arguments from
the ``_blit_args`` dict, since arguments cannot be passed directly.

---
## blit
```python
from _backend_tk import blit
```

Blit *aggimage* to *photoimage*.

*offsets* is a tuple describing how to fill the ``offset`` field of the
``Tk_PhotoImageBlock`` struct: it should be (0, 1, 2, 3) for RGBA8888 data,
(2, 1, 0, 3) for little-endian ARBG32 (i.e. GBRA8888) data and (1, 2, 3, 0)
for big-endian ARGB32 (i.e. ARGB8888) data.

If *bbox* is passed, it defines the region that gets blitted. That region
will be composed with the previous data according to the alpha channel.
Blitting will be clipped to pixels inside the canvas, including silently
doing nothing if the *bbox* region is entirely outside the canvas.

Tcl events must be dispatched to trigger a blit from a non-Tcl thread.

---
## TimerTk
```python
from _backend_tk import TimerTk
```

Subclass of `backend_bases.TimerBase` using Tk timer events.

---
## FigureCanvasTk
```python
from _backend_tk import FigureCanvasTk
```



---
## FigureManagerTk
```python
from _backend_tk import FigureManagerTk
```

Attributes
----------
canvas : `FigureCanvas`
    The FigureCanvas instance
num : int or str
    The Figure number
toolbar : tk.Toolbar
    The tk.Toolbar
window : tk.Window
    The tk.Window

---
## NavigationToolbar2Tk
```python
from _backend_tk import NavigationToolbar2Tk
```



---
## add_tooltip
```python
from _backend_tk import add_tooltip
```



---
## RubberbandTk
```python
from _backend_tk import RubberbandTk
```



---
## ToolbarTk
```python
from _backend_tk import ToolbarTk
```



---
## SaveFigureTk
```python
from _backend_tk import SaveFigureTk
```



---
## ConfigureSubplotsTk
```python
from _backend_tk import ConfigureSubplotsTk
```



---
## HelpTk
```python
from _backend_tk import HelpTk
```



---
## _BackendTk
```python
from _backend_tk import _BackendTk
```



---
## __init__
```python
from _backend_tk import __init__
```



---
## _timer_start
```python
from _backend_tk import _timer_start
```



---
## _timer_stop
```python
from _backend_tk import _timer_stop
```



---
## _on_timer
```python
from _backend_tk import _on_timer
```



---
## _update_device_pixel_ratio
```python
from _backend_tk import _update_device_pixel_ratio
```



---
## resize
```python
from _backend_tk import resize
```



---
## draw_idle
```python
from _backend_tk import draw_idle
```



---
## get_tk_widget
```python
from _backend_tk import get_tk_widget
```

Return the Tk widget used to implement FigureCanvasTkAgg.

Although the initial implementation uses a Tk canvas,  this routine
is intended to hide that fact.

---
## _event_mpl_coords
```python
from _backend_tk import _event_mpl_coords
```



---
## motion_notify_event
```python
from _backend_tk import motion_notify_event
```



---
## enter_notify_event
```python
from _backend_tk import enter_notify_event
```



---
## leave_notify_event
```python
from _backend_tk import leave_notify_event
```



---
## button_press_event
```python
from _backend_tk import button_press_event
```



---
## button_dblclick_event
```python
from _backend_tk import button_dblclick_event
```



---
## button_release_event
```python
from _backend_tk import button_release_event
```



---
## scroll_event
```python
from _backend_tk import scroll_event
```



---
## scroll_event_windows
```python
from _backend_tk import scroll_event_windows
```



---
## _mpl_modifiers
```python
from _backend_tk import _mpl_modifiers
```



---
## _get_key
```python
from _backend_tk import _get_key
```



---
## key_press
```python
from _backend_tk import key_press
```



---
## key_release
```python
from _backend_tk import key_release
```



---
## new_timer
```python
from _backend_tk import new_timer
```



---
## flush_events
```python
from _backend_tk import flush_events
```



---
## start_event_loop
```python
from _backend_tk import start_event_loop
```



---
## stop_event_loop
```python
from _backend_tk import stop_event_loop
```



---
## set_cursor
```python
from _backend_tk import set_cursor
```



---
## create_with_canvas
```python
from _backend_tk import create_with_canvas
```



---
## start_main_loop
```python
from _backend_tk import start_main_loop
```



---
## _update_window_dpi
```python
from _backend_tk import _update_window_dpi
```



---
## show
```python
from _backend_tk import show
```



---
## destroy
```python
from _backend_tk import destroy
```



---
## get_window_title
```python
from _backend_tk import get_window_title
```



---
## set_window_title
```python
from _backend_tk import set_window_title
```



---
## full_screen_toggle
```python
from _backend_tk import full_screen_toggle
```



---
## _rescale
```python
from _backend_tk import _rescale
```



---
## _update_buttons_checked
```python
from _backend_tk import _update_buttons_checked
```



---
## pan
```python
from _backend_tk import pan
```



---
## zoom
```python
from _backend_tk import zoom
```



---
## set_message
```python
from _backend_tk import set_message
```



---
## draw_rubberband
```python
from _backend_tk import draw_rubberband
```



---
## remove_rubberband
```python
from _backend_tk import remove_rubberband
```



---
## _set_image_for_button
```python
from _backend_tk import _set_image_for_button
```

Set the image for a button based on its pixel size.

The pixel size is determined by the DPI scaling of the window.

---
## _Button
```python
from _backend_tk import _Button
```



---
## _Spacer
```python
from _backend_tk import _Spacer
```



---
## save_figure
```python
from _backend_tk import save_figure
```



---
## set_history_buttons
```python
from _backend_tk import set_history_buttons
```



---
## showtip
```python
from _backend_tk import showtip
```

Display text in tooltip window.

---
## hidetip
```python
from _backend_tk import hidetip
```



---
## add_toolitem
```python
from _backend_tk import add_toolitem
```



---
## _get_groupframe
```python
from _backend_tk import _get_groupframe
```



---
## _add_separator
```python
from _backend_tk import _add_separator
```



---
## _button_click
```python
from _backend_tk import _button_click
```



---
## toggle_toolitem
```python
from _backend_tk import toggle_toolitem
```



---
## remove_toolitem
```python
from _backend_tk import remove_toolitem
```



---
## trigger
```python
from _backend_tk import trigger
```



---
## filter_destroy
```python
from _backend_tk import filter_destroy
```



---
## idle_draw
```python
from _backend_tk import idle_draw
```



---
## delayed_destroy
```python
from _backend_tk import delayed_destroy
```



---
## _get_color
```python
from _backend_tk import _get_color
```



---
## _is_dark
```python
from _backend_tk import _is_dark
```



---
## _recolor_icon
```python
from _backend_tk import _recolor_icon
```



---
## __name__
```python
from qt_compat import __name__
```

Qt binding and backend selector.

The selection logic is as follows:
- if any of PyQt6, PySide6, PyQt5, or PySide2 have already been
  imported (checked in that order), use it;
- otherwise, if the QT_API environment variable (used by Enthought) is set, use
  it to determine which binding to use;
- otherwise, use whatever the rcParams indicate.

---
## _setup_pyqt5plus
```python
from qt_compat import _setup_pyqt5plus
```



---
## _exec
```python
from qt_compat import _exec
```



---
## _isdeleted
```python
from qt_compat import _isdeleted
```



---
## __name__
```python
from backend_svg import __name__
```



---
## _escape_cdata
```python
from backend_svg import _escape_cdata
```



---
## _escape_comment
```python
from backend_svg import _escape_comment
```



---
## _escape_attrib
```python
from backend_svg import _escape_attrib
```



---
## _quote_escape_attrib
```python
from backend_svg import _quote_escape_attrib
```



---
## _short_float_fmt
```python
from backend_svg import _short_float_fmt
```

Create a short string representation of a float, which is %f
formatting with trailing zeros and the decimal point removed.

---
## XMLWriter
```python
from backend_svg import XMLWriter
```

Parameters
----------
file : writable text file-like object

---
## _generate_transform
```python
from backend_svg import _generate_transform
```



---
## _generate_css
```python
from backend_svg import _generate_css
```



---
## _check_is_str
```python
from backend_svg import _check_is_str
```



---
## _check_is_iterable_of_str
```python
from backend_svg import _check_is_iterable_of_str
```



---
## RendererSVG
```python
from backend_svg import RendererSVG
```



---
## FigureCanvasSVG
```python
from backend_svg import FigureCanvasSVG
```



---
## _BackendSVG
```python
from backend_svg import _BackendSVG
```



---
## __init__
```python
from backend_svg import __init__
```



---
## __flush
```python
from backend_svg import __flush
```



---
## start
```python
from backend_svg import start
```

Open a new element.  Attributes can be given as keyword
arguments, or as a string/string dictionary. The method returns
an opaque identifier that can be passed to the :meth:`close`
method, to close all open elements up to and including this one.

Parameters
----------
tag
    Element tag.
attrib
    Attribute dictionary.  Alternatively, attributes can be given as
    keyword arguments.

Returns
-------
An element identifier.

---
## comment
```python
from backend_svg import comment
```

Add a comment to the output stream.

Parameters
----------
comment : str
    Comment text.

---
## data
```python
from backend_svg import data
```

Add character data to the output stream.

Parameters
----------
text : str
    Character data.

---
## end
```python
from backend_svg import end
```

Close the current element (opened by the most recent call to
:meth:`start`).

Parameters
----------
tag
    Element tag.  If given, the tag must match the start tag.  If
    omitted, the current element is closed.
indent : bool, default: True

---
## close
```python
from backend_svg import close
```

Close open elements, up to (and including) the element identified
by the given identifier.

Parameters
----------
id
    Element identifier, as returned by the :meth:`start` method.

---
## element
```python
from backend_svg import element
```

Add an entire element.  This is the same as calling :meth:`start`,
:meth:`data`, and :meth:`end` in sequence. The *text* argument can be
omitted.

---
## flush
```python
from backend_svg import flush
```

Flush the output stream.

---
## finalize
```python
from backend_svg import finalize
```



---
## _write_metadata
```python
from backend_svg import _write_metadata
```



---
## _write_default_style
```python
from backend_svg import _write_default_style
```



---
## _make_id
```python
from backend_svg import _make_id
```



---
## _make_flip_transform
```python
from backend_svg import _make_flip_transform
```



---
## _get_hatch
```python
from backend_svg import _get_hatch
```

Create a new hatch pattern

---
## _write_hatches
```python
from backend_svg import _write_hatches
```



---
## _get_style_dict
```python
from backend_svg import _get_style_dict
```

Generate a style string from the GraphicsContext and rgbFace.

---
## _get_style
```python
from backend_svg import _get_style
```



---
## _get_clip_attrs
```python
from backend_svg import _get_clip_attrs
```



---
## _write_clips
```python
from backend_svg import _write_clips
```



---
## open_group
```python
from backend_svg import open_group
```



---
## close_group
```python
from backend_svg import close_group
```



---
## option_image_nocomposite
```python
from backend_svg import option_image_nocomposite
```



---
## _convert_path
```python
from backend_svg import _convert_path
```



---
## draw_path
```python
from backend_svg import draw_path
```



---
## draw_markers
```python
from backend_svg import draw_markers
```



---
## draw_path_collection
```python
from backend_svg import draw_path_collection
```



---
## _draw_gouraud_triangle
```python
from backend_svg import _draw_gouraud_triangle
```



---
## draw_gouraud_triangles
```python
from backend_svg import draw_gouraud_triangles
```



---
## option_scale_image
```python
from backend_svg import option_scale_image
```



---
## get_image_magnification
```python
from backend_svg import get_image_magnification
```



---
## draw_image
```python
from backend_svg import draw_image
```



---
## _update_glyph_map_defs
```python
from backend_svg import _update_glyph_map_defs
```

Emit definitions for not-yet-defined glyphs, and record them as having
been defined.

---
## _adjust_char_id
```python
from backend_svg import _adjust_char_id
```



---
## _draw_text_as_path
```python
from backend_svg import _draw_text_as_path
```



---
## _draw_text_as_text
```python
from backend_svg import _draw_text_as_text
```



---
## draw_text
```python
from backend_svg import draw_text
```



---
## flipy
```python
from backend_svg import flipy
```



---
## get_canvas_width_height
```python
from backend_svg import get_canvas_width_height
```



---
## get_text_width_height_descent
```python
from backend_svg import get_text_width_height_descent
```



---
## print_svg
```python
from backend_svg import print_svg
```

Parameters
----------
filename : str or path-like or file-like
    Output target; if a string, a file will be opened for writing.

metadata : dict[str, Any], optional
    Metadata in the SVG file defined as key-value pairs of strings,
    datetimes, or lists of strings, e.g., ``{'Creator': 'My software',
    'Contributor': ['Me', 'My Friend'], 'Title': 'Awesome'}``.

    The standard keys and their value types are:

    * *str*: ``'Coverage'``, ``'Description'``, ``'Format'``,
      ``'Identifier'``, ``'Language'``, ``'Relation'``, ``'Source'``,
      ``'Title'``, and ``'Type'``.
    * *str* or *list of str*: ``'Contributor'``, ``'Creator'``,
      ``'Keywords'``, ``'Publisher'``, and ``'Rights'``.
    * *str*, *date*, *datetime*, or *tuple* of same: ``'Date'``. If a
      non-*str*, then it will be formatted as ISO 8601.

    Values have been predefined for ``'Creator'``, ``'Date'``,
    ``'Format'``, and ``'Type'``. They can be removed by setting them
    to `None`.

    Information is encoded as `Dublin Core Metadata`__.

    .. _DC: https://www.dublincore.org/specifications/dublin-core/

    __ DC_

---
## print_svgz
```python
from backend_svg import print_svgz
```



---
## get_default_filetype
```python
from backend_svg import get_default_filetype
```



---
## draw
```python
from backend_svg import draw
```



---
## ensure_metadata
```python
from backend_svg import ensure_metadata
```



---
## _normalize_sans
```python
from backend_svg import _normalize_sans
```



---
## _expand_family_entry
```python
from backend_svg import _expand_family_entry
```



---
## _get_all_quoted_names
```python
from backend_svg import _get_all_quoted_names
```



---
## __name__
```python
from _backend_pdf_ps import __name__
```

Common functionality between the PDF and PS backends.

---
## _cached_get_afm_from_fname
```python
from _backend_pdf_ps import _cached_get_afm_from_fname
```



---
## get_glyphs_subset
```python
from _backend_pdf_ps import get_glyphs_subset
```

Subset a TTF font

Reads the named fontfile and restricts the font to the characters.
Returns a serialization of the subset font as file-like object.

Parameters
----------
fontfile : str
    Path to the font file
characters : str
    Continuous set of characters to include in subset

---
## CharacterTracker
```python
from _backend_pdf_ps import CharacterTracker
```

Helper for font subsetting by the pdf and ps backends.

Maintains a mapping of font paths to the set of character codepoints that
are being used from that font.

---
## RendererPDFPSBase
```python
from _backend_pdf_ps import RendererPDFPSBase
```



---
## __init__
```python
from _backend_pdf_ps import __init__
```



---
## track
```python
from _backend_pdf_ps import track
```

Record that string *s* is being typeset using font *font*.

---
## track_glyph
```python
from _backend_pdf_ps import track_glyph
```

Record that codepoint *glyph* is being typeset using font *font*.

---
## flipy
```python
from _backend_pdf_ps import flipy
```



---
## option_scale_image
```python
from _backend_pdf_ps import option_scale_image
```



---
## option_image_nocomposite
```python
from _backend_pdf_ps import option_image_nocomposite
```



---
## get_canvas_width_height
```python
from _backend_pdf_ps import get_canvas_width_height
```



---
## get_text_width_height_descent
```python
from _backend_pdf_ps import get_text_width_height_descent
```



---
## _get_font_afm
```python
from _backend_pdf_ps import _get_font_afm
```



---
## _get_font_ttf
```python
from _backend_pdf_ps import _get_font_ttf
```



---
## __name__
```python
from backend_webagg import __name__
```

Displays Agg images in the browser, with interactivity.

---
## FigureManagerWebAgg
```python
from backend_webagg import FigureManagerWebAgg
```



---
## FigureCanvasWebAgg
```python
from backend_webagg import FigureCanvasWebAgg
```



---
## WebAggApplication
```python
from backend_webagg import WebAggApplication
```



---
## ipython_inline_display
```python
from backend_webagg import ipython_inline_display
```



---
## _BackendWebAgg
```python
from backend_webagg import _BackendWebAgg
```



---
## pyplot_show
```python
from backend_webagg import pyplot_show
```



---
## FavIcon
```python
from backend_webagg import FavIcon
```



---
## SingleFigurePage
```python
from backend_webagg import SingleFigurePage
```



---
## AllFiguresPage
```python
from backend_webagg import AllFiguresPage
```



---
## MplJs
```python
from backend_webagg import MplJs
```



---
## Download
```python
from backend_webagg import Download
```



---
## WebSocket
```python
from backend_webagg import WebSocket
```



---
## __init__
```python
from backend_webagg import __init__
```



---
## initialize
```python
from backend_webagg import initialize
```



---
## start
```python
from backend_webagg import start
```



---
## get
```python
from backend_webagg import get
```



---
## open
```python
from backend_webagg import open
```



---
## on_close
```python
from backend_webagg import on_close
```



---
## on_message
```python
from backend_webagg import on_message
```



---
## send_json
```python
from backend_webagg import send_json
```



---
## send_binary
```python
from backend_webagg import send_binary
```



---
## random_ports
```python
from backend_webagg import random_ports
```

Generate a list of n random ports near the given port.

The first 5 ports will be sequential, and the remaining n-5 will be
randomly selected in the range [port-2*n, port+2*n].

---
## shutdown
```python
from backend_webagg import shutdown
```



---
## catch_sigint
```python
from backend_webagg import catch_sigint
```



---
## __name__
```python
from backend_ps import __name__
```

A PostScript backend, which can produce both PostScript .ps and .eps.

---
## __getattr__
```python
from backend_ps import __getattr__
```



---
## _get_papertype
```python
from backend_ps import _get_papertype
```



---
## _nums_to_str
```python
from backend_ps import _nums_to_str
```



---
## _move_path_to_path_or_stream
```python
from backend_ps import _move_path_to_path_or_stream
```

Move the contents of file at *src* to path-or-filelike *dst*.

If *dst* is a path, the metadata of *src* are *not* copied.

---
## _font_to_ps_type3
```python
from backend_ps import _font_to_ps_type3
```

Subset *chars* from the font at *font_path* into a Type 3 font.

Parameters
----------
font_path : path-like
    Path to the font to be subsetted.
chars : str
    The characters to include in the subsetted font.

Returns
-------
str
    The string representation of a Type 3 font, which can be included
    verbatim into a PostScript file.

---
## _font_to_ps_type42
```python
from backend_ps import _font_to_ps_type42
```

Subset *chars* from the font at *font_path* into a Type 42 font at *fh*.

Parameters
----------
font_path : path-like
    Path to the font to be subsetted.
chars : str
    The characters to include in the subsetted font.
fh : file-like
    Where to write the font.

---
## _log_if_debug_on
```python
from backend_ps import _log_if_debug_on
```

Wrap `RendererPS` method *meth* to emit a PS comment with the method name,
if the global flag `debugPS` is set.

---
## RendererPS
```python
from backend_ps import RendererPS
```

The renderer handles all the drawing primitives using a graphics
context instance that controls the colors/styles.

---
## _Orientation
```python
from backend_ps import _Orientation
```



---
## FigureCanvasPS
```python
from backend_ps import FigureCanvasPS
```



---
## _convert_psfrags
```python
from backend_ps import _convert_psfrags
```

When we want to use the LaTeX backend with postscript, we write PSFrag tags
to a temporary postscript file, each one marking a position for LaTeX to
render some text. convert_psfrags generates a LaTeX document containing the
commands to convert those tags to text. LaTeX/dvips produces the postscript
file that includes the actual text.

---
## _try_distill
```python
from backend_ps import _try_distill
```



---
## gs_distill
```python
from backend_ps import gs_distill
```

Use ghostscript's pswrite or epswrite device to distill a file.
This yields smaller files without illegal encapsulated postscript
operators. The output is low-level, converting text to outlines.

---
## xpdf_distill
```python
from backend_ps import xpdf_distill
```

Use ghostscript's ps2pdf and xpdf's/poppler's pdftops to distill a file.
This yields smaller files without illegal encapsulated postscript
operators. This distiller is preferred, generating high-level postscript
output that treats text as text.

---
## get_bbox_header
```python
from backend_ps import get_bbox_header
```

Return a postscript header string for the given bbox lbrt=(l, b, r, t).
Optionally, return rotate command.

---
## _get_bbox_header
```python
from backend_ps import _get_bbox_header
```

Return a PostScript header string for bounding box *lbrt*=(l, b, r, t).

---
## _get_rotate_command
```python
from backend_ps import _get_rotate_command
```

Return a PostScript 90° rotation command for bounding box *lbrt*=(l, b, r, t).

---
## pstoeps
```python
from backend_ps import pstoeps
```

Convert the postscript to encapsulated postscript.  The bbox of
the eps file will be replaced with the given *bbox* argument. If
None, original bbox will be used.

---
## _BackendPS
```python
from backend_ps import _BackendPS
```



---
## wrapper
```python
from backend_ps import wrapper
```



---
## __init__
```python
from backend_ps import __init__
```



---
## _is_transparent
```python
from backend_ps import _is_transparent
```



---
## set_color
```python
from backend_ps import set_color
```



---
## set_linewidth
```python
from backend_ps import set_linewidth
```



---
## _linejoin_cmd
```python
from backend_ps import _linejoin_cmd
```



---
## set_linejoin
```python
from backend_ps import set_linejoin
```



---
## _linecap_cmd
```python
from backend_ps import _linecap_cmd
```



---
## set_linecap
```python
from backend_ps import set_linecap
```



---
## set_linedash
```python
from backend_ps import set_linedash
```



---
## set_font
```python
from backend_ps import set_font
```



---
## create_hatch
```python
from backend_ps import create_hatch
```



---
## get_image_magnification
```python
from backend_ps import get_image_magnification
```

Get the factor by which to magnify images passed to draw_image.
Allows a backend to have images at a different resolution to other
artists.

---
## _convert_path
```python
from backend_ps import _convert_path
```



---
## _get_clip_cmd
```python
from backend_ps import _get_clip_cmd
```



---
## draw_image
```python
from backend_ps import draw_image
```



---
## draw_path
```python
from backend_ps import draw_path
```



---
## draw_markers
```python
from backend_ps import draw_markers
```



---
## draw_path_collection
```python
from backend_ps import draw_path_collection
```



---
## draw_tex
```python
from backend_ps import draw_tex
```



---
## draw_text
```python
from backend_ps import draw_text
```



---
## draw_mathtext
```python
from backend_ps import draw_mathtext
```

Draw the math text using matplotlib.mathtext.

---
## draw_gouraud_triangles
```python
from backend_ps import draw_gouraud_triangles
```



---
## _draw_ps
```python
from backend_ps import _draw_ps
```

Emit the PostScript snippet *ps* with all the attributes from *gc*
applied.  *ps* must consist of PostScript commands to construct a path.

The *fill* and/or *stroke* kwargs can be set to False if the *ps*
string already includes filling and/or stroking, in which case
`_draw_ps` is just supplying properties and clipping.

---
## swap_if_landscape
```python
from backend_ps import swap_if_landscape
```



---
## get_default_filetype
```python
from backend_ps import get_default_filetype
```



---
## _print_ps
```python
from backend_ps import _print_ps
```



---
## _print_figure
```python
from backend_ps import _print_figure
```

Render the figure to a filesystem path or a file-like object.

Parameters are as for `.print_figure`, except that *dsc_comments* is a
string containing Document Structuring Convention comments,
generated from the *metadata* parameter to `.print_figure`.

---
## _print_figure_tex
```python
from backend_ps import _print_figure_tex
```

If :rc:`text.usetex` is True, a temporary pair of tex/eps files
are created to allow tex to manage the text layout via the PSFrags
package. These files are processed to yield the final ps or eps file.

The rest of the behavior is as for `._print_figure`.

---
## draw
```python
from backend_ps import draw
```



---
## print_figure_impl
```python
from backend_ps import print_figure_impl
```



---
## __name__
```python
from backend_qtagg import __name__
```

Render to qt from agg.

---
## FigureCanvasQTAgg
```python
from backend_qtagg import FigureCanvasQTAgg
```



---
## _BackendQTAgg
```python
from backend_qtagg import _BackendQTAgg
```



---
## paintEvent
```python
from backend_qtagg import paintEvent
```

Copy the image from the Agg canvas to the qt.drawable.

In Qt, all drawing should be done inside of here when a widget is
shown onscreen.

---
## print_figure
```python
from backend_qtagg import print_figure
```



---
## __name__
```python
from backend_agg import __name__
```

An `Anti-Grain Geometry`_ (AGG) backend.

Features that are implemented:

* capstyles and join styles
* dashes
* linewidth
* lines, rectangles, ellipses
* clipping to a rectangle
* output to RGBA and Pillow-supported image formats
* alpha blending
* DPI scaling properly - everything scales properly (dashes, linewidths, etc)
* draw polygon
* freetype2 w/ ft2font

Still TODO:

* integrate screen dpi w/ ppi and text

.. _Anti-Grain Geometry: http://agg.sourceforge.net/antigrain.com

---
## get_hinting_flag
```python
from backend_agg import get_hinting_flag
```



---
## RendererAgg
```python
from backend_agg import RendererAgg
```

The renderer handles all the drawing primitives using a graphics
context instance that controls the colors/styles

---
## FigureCanvasAgg
```python
from backend_agg import FigureCanvasAgg
```



---
## _BackendAgg
```python
from backend_agg import _BackendAgg
```



---
## __init__
```python
from backend_agg import __init__
```



---
## __getstate__
```python
from backend_agg import __getstate__
```



---
## __setstate__
```python
from backend_agg import __setstate__
```



---
## _update_methods
```python
from backend_agg import _update_methods
```



---
## draw_path
```python
from backend_agg import draw_path
```



---
## draw_mathtext
```python
from backend_agg import draw_mathtext
```

Draw mathtext using :mod:`matplotlib.mathtext`.

---
## draw_text
```python
from backend_agg import draw_text
```



---
## get_text_width_height_descent
```python
from backend_agg import get_text_width_height_descent
```



---
## draw_tex
```python
from backend_agg import draw_tex
```



---
## get_canvas_width_height
```python
from backend_agg import get_canvas_width_height
```



---
## _prepare_font
```python
from backend_agg import _prepare_font
```

Get the `.FT2Font` for *font_prop*, clear its buffer, and set its size.

---
## points_to_pixels
```python
from backend_agg import points_to_pixels
```



---
## buffer_rgba
```python
from backend_agg import buffer_rgba
```

Get the image as a `memoryview` to the renderer's buffer.

`draw` must be called at least once before this function will work and
to update the renderer for any subsequent changes to the Figure.

---
## tostring_argb
```python
from backend_agg import tostring_argb
```

Get the image as ARGB `bytes`.

`draw` must be called at least once before this function will work and
to update the renderer for any subsequent changes to the Figure.

---
## tostring_rgb
```python
from backend_agg import tostring_rgb
```

Get the image as RGB `bytes`.

`draw` must be called at least once before this function will work and
to update the renderer for any subsequent changes to the Figure.

---
## clear
```python
from backend_agg import clear
```



---
## option_image_nocomposite
```python
from backend_agg import option_image_nocomposite
```



---
## option_scale_image
```python
from backend_agg import option_scale_image
```



---
## restore_region
```python
from backend_agg import restore_region
```



---
## start_filter
```python
from backend_agg import start_filter
```

Start filtering. It simply creates a new canvas (the old one is saved).

---
## stop_filter
```python
from backend_agg import stop_filter
```

Save the current canvas as an image and apply post processing.

The *post_processing* function::

   def post_processing(image, dpi):
     # ny, nx, depth = image.shape
     # image (numpy array) has RGBA channels and has a depth of 4.
     ...
     # create a new_image (numpy array of 4 channels, size can be
     # different). The resulting image may have offsets from
     # lower-left corner of the original image
     return new_image, offset_x, offset_y

The saved renderer is restored and the returned image from
post_processing is plotted (using draw_image) on it.

---
## copy_from_bbox
```python
from backend_agg import copy_from_bbox
```



---
## draw
```python
from backend_agg import draw
```



---
## get_renderer
```python
from backend_agg import get_renderer
```



---
## print_raw
```python
from backend_agg import print_raw
```



---
## _print_pil
```python
from backend_agg import _print_pil
```

Draw the canvas, then save it using `.image.imsave` (to which
*pil_kwargs* and *metadata* are forwarded).

---
## print_png
```python
from backend_agg import print_png
```

Write the figure to a PNG file.

Parameters
----------
filename_or_obj : str or path-like or file-like
    The file to write to.

metadata : dict, optional
    Metadata in the PNG file as key-value pairs of bytes or latin-1
    encodable strings.
    According to the PNG specification, keys must be shorter than 79
    chars.

    The `PNG specification`_ defines some common keywords that may be
    used as appropriate:

    - Title: Short (one line) title or caption for image.
    - Author: Name of image's creator.
    - Description: Description of image (possibly long).
    - Copyright: Copyright notice.
    - Creation Time: Time of original image creation
      (usually RFC 1123 format).
    - Software: Software used to create the image.
    - Disclaimer: Legal disclaimer.
    - Warning: Warning of nature of content.
    - Source: Device used to create the image.
    - Comment: Miscellaneous comment;
      conversion from other image format.

    Other keywords may be invented for other purposes.

    If 'Software' is not given, an autogenerated value for Matplotlib
    will be used.  This can be removed by setting it to *None*.

    For more details see the `PNG specification`_.

    .. _PNG specification:                 https://www.w3.org/TR/2003/REC-PNG-20031110/#11keywords

pil_kwargs : dict, optional
    Keyword arguments passed to `PIL.Image.Image.save`.

    If the 'pnginfo' key is present, it completely overrides
    *metadata*, including the default 'Software' key.

---
## print_to_buffer
```python
from backend_agg import print_to_buffer
```



---
## print_jpg
```python
from backend_agg import print_jpg
```



---
## print_tif
```python
from backend_agg import print_tif
```



---
## print_webp
```python
from backend_agg import print_webp
```



---
## __name__
```python
from test_marker import __name__
```



---
## test_marker_fillstyle
```python
from test_marker import test_marker_fillstyle
```



---
## test_markers_valid
```python
from test_marker import test_markers_valid
```



---
## test_markers_invalid
```python
from test_marker import test_markers_invalid
```



---
## UnsnappedMarkerStyle
```python
from test_marker import UnsnappedMarkerStyle
```

A MarkerStyle where the snap threshold is force-disabled.

This is used to compare to polygon/star/asterisk markers which do not have
any snap threshold set.

---
## test_poly_marker
```python
from test_marker import test_poly_marker
```



---
## test_star_marker
```python
from test_marker import test_star_marker
```



---
## test_asterisk_marker
```python
from test_marker import test_asterisk_marker
```



---
## test_text_marker
```python
from test_marker import test_text_marker
```



---
## test_marker_clipping
```python
from test_marker import test_marker_clipping
```



---
## test_marker_init_transforms
```python
from test_marker import test_marker_init_transforms
```

Test that initializing marker with transform is a simple addition.

---
## test_marker_init_joinstyle
```python
from test_marker import test_marker_init_joinstyle
```



---
## test_marker_init_captyle
```python
from test_marker import test_marker_init_captyle
```



---
## test_marker_transformed
```python
from test_marker import test_marker_transformed
```



---
## test_marker_rotated_invalid
```python
from test_marker import test_marker_rotated_invalid
```



---
## test_marker_rotated
```python
from test_marker import test_marker_rotated
```



---
## test_marker_scaled
```python
from test_marker import test_marker_scaled
```



---
## test_alt_transform
```python
from test_marker import test_alt_transform
```



---
## _recache
```python
from test_marker import _recache
```



---
## draw_ref_marker
```python
from test_marker import draw_ref_marker
```



---
## __name__
```python
from test_determinism import __name__
```

Test output reproducibility.

---
## _save_figure
```python
from test_determinism import _save_figure
```



---
## test_determinism_check
```python
from test_determinism import test_determinism_check
```

Output three times the same graphs and checks that the outputs are exactly
the same.

Parameters
----------
objects : str
    Objects to be included in the test document: 'm' for markers, 'h' for
    hatch patterns, 'i' for images.
fmt : {"pdf", "ps", "svg"}
    Output format.

---
## test_determinism_source_date_epoch
```python
from test_determinism import test_determinism_source_date_epoch
```

Test SOURCE_DATE_EPOCH support. Output a document with the environment
variable SOURCE_DATE_EPOCH set to 2000-01-01 00:00 UTC and check that the
document contains the timestamp that corresponds to this date (given as an
argument).

Parameters
----------
fmt : {"pdf", "ps", "svg"}
    Output format.
string : bytes
    Timestamp string for 2000-01-01 00:00 UTC.

---
## __name__
```python
from test_backend_tk import __name__
```



---
## _isolated_tk_test
```python
from test_backend_tk import _isolated_tk_test
```

A decorator to run *func* in a subprocess and assert that it prints
"success" *success_count* times and nothing on stderr.

TkAgg tests seem to have interactions between tests, so isolate each test
in a subprocess. See GH#18261

---
## test_blit
```python
from test_backend_tk import test_blit
```



---
## test_figuremanager_preserves_host_mainloop
```python
from test_backend_tk import test_figuremanager_preserves_host_mainloop
```



---
## test_figuremanager_cleans_own_mainloop
```python
from test_backend_tk import test_figuremanager_cleans_own_mainloop
```



---
## test_never_update
```python
from test_backend_tk import test_never_update
```



---
## test_missing_back_button
```python
from test_backend_tk import test_missing_back_button
```



---
## test_canvas_focus
```python
from test_backend_tk import test_canvas_focus
```



---
## test_embedding
```python
from test_backend_tk import test_embedding
```



---
## test_func
```python
from test_backend_tk import test_func
```



---
## do_plot
```python
from test_backend_tk import do_plot
```



---
## legitimate_quit
```python
from test_backend_tk import legitimate_quit
```



---
## target
```python
from test_backend_tk import target
```



---
## Toolbar
```python
from test_backend_tk import Toolbar
```



---
## check_focus
```python
from test_backend_tk import check_focus
```



---
## test_figure
```python
from test_backend_tk import test_figure
```



---
## __name__
```python
from test_skew import __name__
```



---
## SkewXTick
```python
from test_skew import SkewXTick
```



---
## SkewXAxis
```python
from test_skew import SkewXAxis
```



---
## SkewSpine
```python
from test_skew import SkewSpine
```



---
## SkewXAxes
```python
from test_skew import SkewXAxes
```



---
## test_set_line_coll_dash_image
```python
from test_skew import test_set_line_coll_dash_image
```



---
## test_skew_rectangle
```python
from test_skew import test_skew_rectangle
```



---
## draw
```python
from test_skew import draw
```



---
## get_view_interval
```python
from test_skew import get_view_interval
```



---
## _get_tick
```python
from test_skew import _get_tick
```



---
## _adjust_location
```python
from test_skew import _adjust_location
```



---
## _init_axis
```python
from test_skew import _init_axis
```



---
## _gen_axes_spines
```python
from test_skew import _gen_axes_spines
```



---
## _set_lim_and_transforms
```python
from test_skew import _set_lim_and_transforms
```

This is called once when the plot is created to set up all the
transforms for the data, text and grids.

---
## lower_xlim
```python
from test_skew import lower_xlim
```



---
## upper_xlim
```python
from test_skew import upper_xlim
```



---
## __name__
```python
from test_cycles import __name__
```



---
## test_colorcycle_basic
```python
from test_cycles import test_colorcycle_basic
```



---
## test_marker_cycle
```python
from test_cycles import test_marker_cycle
```



---
## test_valid_marker_cycles
```python
from test_cycles import test_valid_marker_cycles
```



---
## test_marker_cycle_kwargs_arrays_iterators
```python
from test_cycles import test_marker_cycle_kwargs_arrays_iterators
```



---
## test_linestylecycle_basic
```python
from test_cycles import test_linestylecycle_basic
```



---
## test_fillcycle_basic
```python
from test_cycles import test_fillcycle_basic
```



---
## test_fillcycle_ignore
```python
from test_cycles import test_fillcycle_ignore
```



---
## test_property_collision_plot
```python
from test_cycles import test_property_collision_plot
```



---
## test_property_collision_fill
```python
from test_cycles import test_property_collision_fill
```



---
## test_valid_input_forms
```python
from test_cycles import test_valid_input_forms
```



---
## test_cycle_reset
```python
from test_cycles import test_cycle_reset
```



---
## test_invalid_input_forms
```python
from test_cycles import test_invalid_input_forms
```



---
## __name__
```python
from test_artist import __name__
```



---
## test_patch_transform_of_none
```python
from test_artist import test_patch_transform_of_none
```



---
## test_collection_transform_of_none
```python
from test_artist import test_collection_transform_of_none
```



---
## test_clipping
```python
from test_artist import test_clipping
```



---
## test_clipping_zoom
```python
from test_artist import test_clipping_zoom
```



---
## test_cull_markers
```python
from test_artist import test_cull_markers
```



---
## test_hatching
```python
from test_artist import test_hatching
```



---
## test_remove
```python
from test_artist import test_remove
```



---
## test_default_edges
```python
from test_artist import test_default_edges
```



---
## test_properties
```python
from test_artist import test_properties
```



---
## test_setp
```python
from test_artist import test_setp
```



---
## test_None_zorder
```python
from test_artist import test_None_zorder
```



---
## test_artist_inspector_get_valid_values
```python
from test_artist import test_artist_inspector_get_valid_values
```



---
## test_artist_inspector_get_aliases
```python
from test_artist import test_artist_inspector_get_aliases
```



---
## test_set_alpha
```python
from test_artist import test_set_alpha
```



---
## test_set_alpha_for_array
```python
from test_artist import test_set_alpha_for_array
```



---
## test_callbacks
```python
from test_artist import test_callbacks
```



---
## test_set_signature
```python
from test_artist import test_set_signature
```

Test autogenerated ``set()`` for Artist subclasses.

---
## test_set_is_overwritten
```python
from test_artist import test_set_is_overwritten
```

set() defined in Artist subclasses should not be overwritten.

---
## test_format_cursor_data_BoundaryNorm
```python
from test_artist import test_format_cursor_data_BoundaryNorm
```

Test if cursor data is correct when using BoundaryNorm.

---
## test_auto_no_rasterize
```python
from test_artist import test_auto_no_rasterize
```



---
## test_draw_wraper_forward_input
```python
from test_artist import test_draw_wraper_forward_input
```



---
## TestArtist
```python
from test_artist import TestArtist
```



---
## func
```python
from test_artist import func
```



---
## MyArtist1
```python
from test_artist import MyArtist1
```



---
## MyArtist2
```python
from test_artist import MyArtist2
```



---
## MyArtist3
```python
from test_artist import MyArtist3
```



---
## MyArtist4
```python
from test_artist import MyArtist4
```



---
## Gen1
```python
from test_artist import Gen1
```



---
## Gen2
```python
from test_artist import Gen2
```



---
## TestKlass
```python
from test_artist import TestKlass
```



---
## set_f
```python
from test_artist import set_f
```



---
## set_myparam1
```python
from test_artist import set_myparam1
```



---
## set_myparam2
```python
from test_artist import set_myparam2
```



---
## set
```python
from test_artist import set
```

Not overwritten.

---
## draw
```python
from test_artist import draw
```



---
## __name__
```python
from test_backend_webagg import __name__
```



---
## test_webagg_fallback
```python
from test_backend_webagg import test_webagg_fallback
```



---
## test_webagg_core_no_toolbar
```python
from test_backend_webagg import test_webagg_core_no_toolbar
```



---
## __name__
```python
from test_backend_pdf import __name__
```



---
## test_use14corefonts
```python
from test_backend_pdf import test_use14corefonts
```



---
## test_embed_fonts
```python
from test_backend_pdf import test_embed_fonts
```



---
## test_multipage_pagecount
```python
from test_backend_pdf import test_multipage_pagecount
```



---
## test_multipage_properfinalize
```python
from test_backend_pdf import test_multipage_properfinalize
```



---
## test_multipage_keep_empty
```python
from test_backend_pdf import test_multipage_keep_empty
```



---
## test_composite_image
```python
from test_backend_pdf import test_composite_image
```



---
## test_indexed_image
```python
from test_backend_pdf import test_indexed_image
```



---
## test_savefig_metadata
```python
from test_backend_pdf import test_savefig_metadata
```



---
## test_invalid_metadata
```python
from test_backend_pdf import test_invalid_metadata
```



---
## test_multipage_metadata
```python
from test_backend_pdf import test_multipage_metadata
```



---
## test_text_urls
```python
from test_backend_pdf import test_text_urls
```



---
## test_text_rotated_urls
```python
from test_backend_pdf import test_text_rotated_urls
```



---
## test_text_urls_tex
```python
from test_backend_pdf import test_text_urls_tex
```



---
## test_pdfpages_fspath
```python
from test_backend_pdf import test_pdfpages_fspath
```



---
## test_hatching_legend
```python
from test_backend_pdf import test_hatching_legend
```

Test for correct hatching on patches in legend

---
## test_grayscale_alpha
```python
from test_backend_pdf import test_grayscale_alpha
```

Masking images with NaN did not work for grayscale images

---
## test_pdf_eps_savefig_when_color_is_none
```python
from test_backend_pdf import test_pdf_eps_savefig_when_color_is_none
```



---
## test_failing_latex
```python
from test_backend_pdf import test_failing_latex
```

Test failing latex subprocess call

---
## test_empty_rasterized
```python
from test_backend_pdf import test_empty_rasterized
```



---
## test_kerning
```python
from test_backend_pdf import test_kerning
```



---
## test_glyphs_subset
```python
from test_backend_pdf import test_glyphs_subset
```



---
## test_multi_font_type3
```python
from test_backend_pdf import test_multi_font_type3
```



---
## test_multi_font_type42
```python
from test_backend_pdf import test_multi_font_type42
```



---
## test_otf_font_smoke
```python
from test_backend_pdf import test_otf_font_smoke
```



---
## __name__
```python
from test_lines import __name__
```

Tests specific to the lines module.

---
## test_segment_hits
```python
from test_lines import test_segment_hits
```

Test a problematic case.

---
## test_invisible_Line_rendering
```python
from test_lines import test_invisible_Line_rendering
```

GitHub issue #1256 identified a bug in Line.draw method

Despite visibility attribute set to False, the draw method was not
returning early enough and some pre-rendering code was executed
though not necessary.

Consequence was an excessive draw time for invisible Line instances
holding a large number of points (Npts> 10**6)

---
## test_set_line_coll_dash
```python
from test_lines import test_set_line_coll_dash
```



---
## test_invalid_line_data
```python
from test_lines import test_invalid_line_data
```



---
## test_line_dashes
```python
from test_lines import test_line_dashes
```



---
## test_line_colors
```python
from test_lines import test_line_colors
```



---
## test_valid_colors
```python
from test_lines import test_valid_colors
```



---
## test_linestyle_variants
```python
from test_lines import test_linestyle_variants
```



---
## test_valid_linestyles
```python
from test_lines import test_valid_linestyles
```



---
## test_drawstyle_variants
```python
from test_lines import test_drawstyle_variants
```



---
## test_no_subslice_with_transform
```python
from test_lines import test_no_subslice_with_transform
```



---
## test_valid_drawstyles
```python
from test_lines import test_valid_drawstyles
```



---
## test_set_drawstyle
```python
from test_lines import test_set_drawstyle
```



---
## test_set_line_coll_dash_image
```python
from test_lines import test_set_line_coll_dash_image
```



---
## test_marker_fill_styles
```python
from test_lines import test_marker_fill_styles
```



---
## test_markerfacecolor_fillstyle
```python
from test_lines import test_markerfacecolor_fillstyle
```

Test that markerfacecolor does not override fillstyle='none'.

---
## test_lw_scaling
```python
from test_lines import test_lw_scaling
```



---
## test_is_sorted_and_has_non_nan
```python
from test_lines import test_is_sorted_and_has_non_nan
```



---
## test_step_markers
```python
from test_lines import test_step_markers
```



---
## test_markevery
```python
from test_lines import test_markevery
```



---
## test_markevery_figure_line_unsupported_relsize
```python
from test_lines import test_markevery_figure_line_unsupported_relsize
```



---
## test_marker_as_markerstyle
```python
from test_lines import test_marker_as_markerstyle
```



---
## test_striped_lines
```python
from test_lines import test_striped_lines
```



---
## test_odd_dashes
```python
from test_lines import test_odd_dashes
```



---
## test_picking
```python
from test_lines import test_picking
```



---
## test_input_copy
```python
from test_lines import test_input_copy
```



---
## test_markevery_prop_cycle
```python
from test_lines import test_markevery_prop_cycle
```

Test that we can set markevery prop_cycle.

---
## test_axline_setters
```python
from test_lines import test_axline_setters
```



---
## add_test
```python
from test_lines import add_test
```



---
## add_ref
```python
from test_lines import add_ref
```



---
## __name__
```python
from test_basic import __name__
```



---
## test_simple
```python
from test_basic import test_simple
```



---
## test_override_builtins
```python
from test_basic import test_override_builtins
```



---
## test_lazy_imports
```python
from test_basic import test_lazy_imports
```



---
## __name__
```python
from test_backend_bases import __name__
```



---
## test_uses_per_path
```python
from test_backend_bases import test_uses_per_path
```



---
## test_canvas_ctor
```python
from test_backend_bases import test_canvas_ctor
```



---
## test_get_default_filename
```python
from test_backend_bases import test_get_default_filename
```



---
## test_canvas_change
```python
from test_backend_bases import test_canvas_change
```



---
## test_non_gui_warning
```python
from test_backend_bases import test_non_gui_warning
```



---
## test_grab_clear
```python
from test_backend_bases import test_grab_clear
```



---
## test_location_event_position
```python
from test_backend_bases import test_location_event_position
```



---
## test_location_event_position_twin
```python
from test_backend_bases import test_location_event_position_twin
```



---
## test_pick
```python
from test_backend_bases import test_pick
```



---
## test_interactive_zoom
```python
from test_backend_bases import test_interactive_zoom
```



---
## test_widgetlock_zoompan
```python
from test_backend_bases import test_widgetlock_zoompan
```



---
## test_interactive_colorbar
```python
from test_backend_bases import test_interactive_colorbar
```



---
## test_toolbar_zoompan
```python
from test_backend_bases import test_toolbar_zoompan
```



---
## test_toolbar_home_restores_autoscale
```python
from test_backend_bases import test_toolbar_home_restores_autoscale
```



---
## test_draw
```python
from test_backend_bases import test_draw
```



---
## test_interactive_pan
```python
from test_backend_bases import test_interactive_pan
```



---
## test_toolmanager_remove
```python
from test_backend_bases import test_toolmanager_remove
```



---
## test_toolmanager_get_tool
```python
from test_backend_bases import test_toolmanager_get_tool
```



---
## test_toolmanager_update_keymap
```python
from test_backend_bases import test_toolmanager_update_keymap
```



---
## test_interactive_pan_zoom_events
```python
from test_backend_bases import test_interactive_pan_zoom_events
```



---
## check
```python
from test_backend_bases import check
```



---
## handle_pick
```python
from test_backend_bases import handle_pick
```



---
## __name__
```python
from test_ft2font import __name__
```



---
## test_fallback_errors
```python
from test_ft2font import test_fallback_errors
```



---
## test_ft2font_positive_hinting_factor
```python
from test_ft2font import test_ft2font_positive_hinting_factor
```



---
## test_fallback_smoke
```python
from test_ft2font import test_fallback_smoke
```



---
## test_font_fallback_chinese
```python
from test_ft2font import test_font_fallback_chinese
```



---
## test_fallback_missing
```python
from test_ft2font import test_fallback_missing
```



---
## test__get_fontmap
```python
from test_ft2font import test__get_fontmap
```



---
## __name__
```python
from test_backend_pgf import __name__
```



---
## compare_figure
```python
from test_backend_pgf import compare_figure
```



---
## test_tex_special_chars
```python
from test_backend_pgf import test_tex_special_chars
```



---
## create_figure
```python
from test_backend_pgf import create_figure
```



---
## test_xelatex
```python
from test_backend_pgf import test_xelatex
```



---
## test_pdflatex
```python
from test_backend_pgf import test_pdflatex
```



---
## test_rcupdate
```python
from test_backend_pgf import test_rcupdate
```



---
## test_pathclip
```python
from test_backend_pgf import test_pathclip
```



---
## test_mixedmode
```python
from test_backend_pgf import test_mixedmode
```



---
## test_bbox_inches
```python
from test_backend_pgf import test_bbox_inches
```



---
## test_pdf_pages
```python
from test_backend_pgf import test_pdf_pages
```



---
## test_pdf_pages_metadata_check
```python
from test_backend_pgf import test_pdf_pages_metadata_check
```



---
## test_multipage_keep_empty
```python
from test_backend_pgf import test_multipage_keep_empty
```



---
## test_tex_restart_after_error
```python
from test_backend_pgf import test_tex_restart_after_error
```



---
## test_bbox_inches_tight
```python
from test_backend_pgf import test_bbox_inches_tight
```



---
## test_png_transparency
```python
from test_backend_pgf import test_png_transparency
```



---
## test_unknown_font
```python
from test_backend_pgf import test_unknown_font
```



---
## test_minus_signs_with_tex
```python
from test_backend_pgf import test_minus_signs_with_tex
```



---
## test_sketch_params
```python
from test_backend_pgf import test_sketch_params
```



---
## __name__
```python
from test_simplification import __name__
```



---
## test_clipping
```python
from test_simplification import test_clipping
```



---
## test_overflow
```python
from test_simplification import test_overflow
```



---
## test_diamond
```python
from test_simplification import test_diamond
```



---
## test_clipping_out_of_bounds
```python
from test_simplification import test_clipping_out_of_bounds
```



---
## test_noise
```python
from test_simplification import test_noise
```



---
## test_antiparallel_simplification
```python
from test_simplification import test_antiparallel_simplification
```



---
## test_angled_antiparallel
```python
from test_simplification import test_angled_antiparallel
```



---
## test_sine_plus_noise
```python
from test_simplification import test_sine_plus_noise
```



---
## test_simplify_curve
```python
from test_simplification import test_simplify_curve
```



---
## test_closed_path_nan_removal
```python
from test_simplification import test_closed_path_nan_removal
```



---
## test_closed_path_clipping
```python
from test_simplification import test_closed_path_clipping
```



---
## test_hatch
```python
from test_simplification import test_hatch
```



---
## test_fft_peaks
```python
from test_simplification import test_fft_peaks
```



---
## test_start_with_moveto
```python
from test_simplification import test_start_with_moveto
```



---
## test_throw_rendering_complexity_exceeded
```python
from test_simplification import test_throw_rendering_complexity_exceeded
```



---
## test_clipper
```python
from test_simplification import test_clipper
```



---
## test_para_equal_perp
```python
from test_simplification import test_para_equal_perp
```



---
## test_clipping_with_nans
```python
from test_simplification import test_clipping_with_nans
```



---
## test_clipping_full
```python
from test_simplification import test_clipping_full
```



---
## _get_simplified
```python
from test_simplification import _get_simplified
```



---
## __name__
```python
from test_spines import __name__
```



---
## test_spine_class
```python
from test_spines import test_spine_class
```

Test Spines and SpinesProxy in isolation.

---
## test_spines_axes_positions
```python
from test_spines import test_spines_axes_positions
```



---
## test_spines_data_positions
```python
from test_spines import test_spines_data_positions
```



---
## test_spine_nonlinear_data_positions
```python
from test_spines import test_spine_nonlinear_data_positions
```



---
## test_spines_capstyle
```python
from test_spines import test_spines_capstyle
```



---
## test_label_without_ticks
```python
from test_spines import test_label_without_ticks
```



---
## test_spines_black_axes
```python
from test_spines import test_spines_black_axes
```



---
## SpineMock
```python
from test_spines import SpineMock
```



---
## __init__
```python
from test_spines import __init__
```



---
## set
```python
from test_spines import set
```



---
## set_val
```python
from test_spines import set_val
```



---
## __name__
```python
from test_mathtext import __name__
```



---
## baseline_images
```python
from test_mathtext import baseline_images
```



---
## test_mathtext_rendering
```python
from test_mathtext import test_mathtext_rendering
```



---
## test_mathtext_rendering_svgastext
```python
from test_mathtext import test_mathtext_rendering_svgastext
```



---
## test_mathtext_rendering_lightweight
```python
from test_mathtext import test_mathtext_rendering_lightweight
```



---
## test_mathfont_rendering
```python
from test_mathtext import test_mathfont_rendering
```



---
## test_short_long_accents
```python
from test_mathtext import test_short_long_accents
```



---
## test_fontinfo
```python
from test_mathtext import test_fontinfo
```



---
## test_mathtext_exceptions
```python
from test_mathtext import test_mathtext_exceptions
```



---
## test_get_unicode_index_exception
```python
from test_mathtext import test_get_unicode_index_exception
```



---
## test_single_minus_sign
```python
from test_mathtext import test_single_minus_sign
```



---
## test_spaces
```python
from test_mathtext import test_spaces
```



---
## test_operator_space
```python
from test_mathtext import test_operator_space
```



---
## test_inverted_delimiters
```python
from test_mathtext import test_inverted_delimiters
```



---
## test_genfrac_displaystyle
```python
from test_mathtext import test_genfrac_displaystyle
```



---
## test_mathtext_fallback_valid
```python
from test_mathtext import test_mathtext_fallback_valid
```



---
## test_mathtext_fallback_invalid
```python
from test_mathtext import test_mathtext_fallback_invalid
```



---
## test_mathtext_fallback
```python
from test_mathtext import test_mathtext_fallback
```



---
## test_math_to_image
```python
from test_mathtext import test_math_to_image
```



---
## test_math_fontfamily
```python
from test_mathtext import test_math_fontfamily
```



---
## test_default_math_fontfamily
```python
from test_mathtext import test_default_math_fontfamily
```



---
## test_argument_order
```python
from test_mathtext import test_argument_order
```



---
## test_mathtext_cmr10_minus_sign
```python
from test_mathtext import test_mathtext_cmr10_minus_sign
```



---
## test_mathtext_operators
```python
from test_mathtext import test_mathtext_operators
```



---
## test_boldsymbol
```python
from test_mathtext import test_boldsymbol
```



---
## __name__
```python
from test_arrow_patches import __name__
```



---
## draw_arrow
```python
from test_arrow_patches import draw_arrow
```



---
## test_fancyarrow
```python
from test_arrow_patches import test_fancyarrow
```



---
## test_boxarrow
```python
from test_arrow_patches import test_boxarrow
```



---
## __prepare_fancyarrow_dpi_cor_test
```python
from test_arrow_patches import __prepare_fancyarrow_dpi_cor_test
```

Convenience function that prepares and returns a FancyArrowPatch. It aims
at being used to test that the size of the arrow head does not depend on
the DPI value of the exported picture.

NB: this function *is not* a test in itself!

---
## test_fancyarrow_dpi_cor_100dpi
```python
from test_arrow_patches import test_fancyarrow_dpi_cor_100dpi
```

Check the export of a FancyArrowPatch @ 100 DPI. FancyArrowPatch is
instantiated through a dedicated function because another similar test
checks a similar export but with a different DPI value.

Remark: test only a rasterized format.

---
## test_fancyarrow_dpi_cor_200dpi
```python
from test_arrow_patches import test_fancyarrow_dpi_cor_200dpi
```

As test_fancyarrow_dpi_cor_100dpi, but exports @ 200 DPI. The relative size
of the arrow head should be the same.

---
## test_fancyarrow_dash
```python
from test_arrow_patches import test_fancyarrow_dash
```



---
## test_arrow_styles
```python
from test_arrow_patches import test_arrow_styles
```



---
## test_connection_styles
```python
from test_arrow_patches import test_connection_styles
```



---
## test_invalid_intersection
```python
from test_arrow_patches import test_invalid_intersection
```



---
## __name__
```python
from test_streamplot import __name__
```



---
## velocity_field
```python
from test_streamplot import velocity_field
```



---
## swirl_velocity_field
```python
from test_streamplot import swirl_velocity_field
```



---
## test_startpoints
```python
from test_streamplot import test_startpoints
```



---
## test_colormap
```python
from test_streamplot import test_colormap
```



---
## test_linewidth
```python
from test_streamplot import test_linewidth
```



---
## test_masks_and_nans
```python
from test_streamplot import test_masks_and_nans
```



---
## test_maxlength
```python
from test_streamplot import test_maxlength
```



---
## test_maxlength_no_broken
```python
from test_streamplot import test_maxlength_no_broken
```



---
## test_direction
```python
from test_streamplot import test_direction
```



---
## test_streamplot_limits
```python
from test_streamplot import test_streamplot_limits
```



---
## test_streamplot_grid
```python
from test_streamplot import test_streamplot_grid
```



---
## test_streamplot_inputs
```python
from test_streamplot import test_streamplot_inputs
```



---
## __name__
```python
from test_axis import __name__
```



---
## test_tick_labelcolor_array
```python
from test_axis import test_tick_labelcolor_array
```



---
## __name__
```python
from test_tightlayout import __name__
```



---
## example_plot
```python
from test_tightlayout import example_plot
```



---
## test_tight_layout1
```python
from test_tightlayout import test_tight_layout1
```

Test tight_layout for a single subplot.

---
## test_tight_layout2
```python
from test_tightlayout import test_tight_layout2
```

Test tight_layout for multiple subplots.

---
## test_tight_layout3
```python
from test_tightlayout import test_tight_layout3
```

Test tight_layout for multiple subplots.

---
## test_tight_layout4
```python
from test_tightlayout import test_tight_layout4
```

Test tight_layout for subplot2grid.

---
## test_tight_layout5
```python
from test_tightlayout import test_tight_layout5
```

Test tight_layout for image.

---
## test_tight_layout6
```python
from test_tightlayout import test_tight_layout6
```

Test tight_layout for gridspec.

---
## test_tight_layout7
```python
from test_tightlayout import test_tight_layout7
```



---
## test_tight_layout8
```python
from test_tightlayout import test_tight_layout8
```

Test automatic use of tight_layout.

---
## test_tight_layout9
```python
from test_tightlayout import test_tight_layout9
```



---
## test_outward_ticks
```python
from test_tightlayout import test_outward_ticks
```

Test automatic use of tight_layout.

---
## add_offsetboxes
```python
from test_tightlayout import add_offsetboxes
```

Surround ax with OffsetBoxes

---
## test_tight_layout_offsetboxes
```python
from test_tightlayout import test_tight_layout_offsetboxes
```



---
## test_empty_layout
```python
from test_tightlayout import test_empty_layout
```

Test that tight layout doesn't cause an error when there are no Axes.

---
## test_verybig_decorators
```python
from test_tightlayout import test_verybig_decorators
```

Test that no warning emitted when xlabel/ylabel too big.

---
## test_big_decorators_horizontal
```python
from test_tightlayout import test_big_decorators_horizontal
```

Test that doesn't warn when xlabel too big.

---
## test_big_decorators_vertical
```python
from test_tightlayout import test_big_decorators_vertical
```

Test that doesn't warn when ylabel too big.

---
## test_badsubplotgrid
```python
from test_tightlayout import test_badsubplotgrid
```



---
## test_collapsed
```python
from test_tightlayout import test_collapsed
```



---
## test_suptitle
```python
from test_tightlayout import test_suptitle
```



---
## test_non_agg_renderer
```python
from test_tightlayout import test_non_agg_renderer
```



---
## test_manual_colorbar
```python
from test_tightlayout import test_manual_colorbar
```



---
## test_clipped_to_axes
```python
from test_tightlayout import test_clipped_to_axes
```



---
## test_tight_pads
```python
from test_tightlayout import test_tight_pads
```



---
## test_tight_kwargs
```python
from test_tightlayout import test_tight_kwargs
```



---
## test_tight_toggle
```python
from test_tightlayout import test_tight_toggle
```



---
## _subplots
```python
from test_tightlayout import _subplots
```



---
## __init__
```python
from test_tightlayout import __init__
```



---
## __name__
```python
from test_backend_ps import __name__
```



---
## test_savefig_to_stringio
```python
from test_backend_ps import test_savefig_to_stringio
```



---
## test_patheffects
```python
from test_backend_ps import test_patheffects
```



---
## test_tilde_in_tempfilename
```python
from test_backend_ps import test_tilde_in_tempfilename
```



---
## test_transparency
```python
from test_backend_ps import test_transparency
```



---
## test_transparency_tex
```python
from test_backend_ps import test_transparency_tex
```



---
## test_bbox
```python
from test_backend_ps import test_bbox
```



---
## test_failing_latex
```python
from test_backend_ps import test_failing_latex
```

Test failing latex subprocess call

---
## test_partial_usetex
```python
from test_backend_ps import test_partial_usetex
```



---
## test_usetex_preamble
```python
from test_backend_ps import test_usetex_preamble
```



---
## test_useafm
```python
from test_backend_ps import test_useafm
```



---
## test_type3_font
```python
from test_backend_ps import test_type3_font
```



---
## test_colored_hatch_zero_linewidth
```python
from test_backend_ps import test_colored_hatch_zero_linewidth
```



---
## test_text_clip
```python
from test_backend_ps import test_text_clip
```



---
## test_d_glyph
```python
from test_backend_ps import test_d_glyph
```



---
## test_type42_font_without_prep
```python
from test_backend_ps import test_type42_font_without_prep
```



---
## test_fonttype
```python
from test_backend_ps import test_fonttype
```



---
## test_linedash
```python
from test_backend_ps import test_linedash
```

Test that dashed lines do not break PS output

---
## test_empty_line
```python
from test_backend_ps import test_empty_line
```



---
## test_no_duplicate_definition
```python
from test_backend_ps import test_no_duplicate_definition
```



---
## test_multi_font_type3
```python
from test_backend_ps import test_multi_font_type3
```



---
## test_multi_font_type42
```python
from test_backend_ps import test_multi_font_type42
```



---
## test_path_collection
```python
from test_backend_ps import test_path_collection
```



---
## test_colorbar_shift
```python
from test_backend_ps import test_colorbar_shift
```



---
## test_auto_papersize_deprecation
```python
from test_backend_ps import test_auto_papersize_deprecation
```



---
## __name__
```python
from test_type1font import __name__
```



---
## test_Type1Font
```python
from test_type1font import test_Type1Font
```



---
## test_Type1Font_2
```python
from test_type1font import test_Type1Font_2
```



---
## test_tokenize
```python
from test_type1font import test_tokenize
```



---
## test_tokenize_errors
```python
from test_type1font import test_tokenize_errors
```



---
## test_overprecision
```python
from test_type1font import test_overprecision
```



---
## test_encrypt_decrypt_roundtrip
```python
from test_type1font import test_encrypt_decrypt_roundtrip
```



---
## convert
```python
from test_type1font import convert
```



---
## bin_after
```python
from test_type1font import bin_after
```



---
## __name__
```python
from test_animation import __name__
```



---
## anim
```python
from test_animation import anim
```

Create a simple animation (with options).

---
## NullMovieWriter
```python
from test_animation import NullMovieWriter
```

A minimal MovieWriter.  It doesn't actually write anything.
It just saves the arguments that were given to the setup() and
grab_frame() methods as attributes, and counts how many times
grab_frame() is called.

This class doesn't have an __init__ method with the appropriate
signature, and it doesn't define an isAvailable() method, so
it cannot be added to the 'writers' registry.

---
## test_null_movie_writer
```python
from test_animation import test_null_movie_writer
```



---
## test_animation_delete
```python
from test_animation import test_animation_delete
```



---
## test_movie_writer_dpi_default
```python
from test_animation import test_movie_writer_dpi_default
```



---
## RegisteredNullMovieWriter
```python
from test_animation import RegisteredNullMovieWriter
```



---
## gen_writers
```python
from test_animation import gen_writers
```



---
## test_save_animation_smoketest
```python
from test_animation import test_save_animation_smoketest
```



---
## test_grabframe
```python
from test_animation import test_grabframe
```



---
## test_animation_repr_html
```python
from test_animation import test_animation_repr_html
```



---
## test_no_length_frames
```python
from test_animation import test_no_length_frames
```



---
## test_movie_writer_registry
```python
from test_animation import test_movie_writer_registry
```



---
## test_embed_limit
```python
from test_animation import test_embed_limit
```



---
## test_cleanup_temporaries
```python
from test_animation import test_cleanup_temporaries
```



---
## test_failing_ffmpeg
```python
from test_animation import test_failing_ffmpeg
```

Test that we correctly raise a CalledProcessError when ffmpeg fails.

To do so, mock ffmpeg using a simple executable shell script that
succeeds when called with no arguments (so that it gets registered by
`isAvailable`), but fails otherwise, and add it to the $PATH.

---
## test_funcanimation_cache_frame_data
```python
from test_animation import test_funcanimation_cache_frame_data
```



---
## test_draw_frame
```python
from test_animation import test_draw_frame
```



---
## test_exhausted_animation
```python
from test_animation import test_exhausted_animation
```



---
## test_no_frame_warning
```python
from test_animation import test_no_frame_warning
```



---
## test_animation_frame
```python
from test_animation import test_animation_frame
```



---
## test_save_count_override_warnings_has_length
```python
from test_animation import test_save_count_override_warnings_has_length
```



---
## test_save_count_override_warnings_scaler
```python
from test_animation import test_save_count_override_warnings_scaler
```



---
## test_disable_cache_warning
```python
from test_animation import test_disable_cache_warning
```



---
## test_movie_writer_invalid_path
```python
from test_animation import test_movie_writer_invalid_path
```



---
## init
```python
from test_animation import init
```



---
## animate
```python
from test_animation import animate
```



---
## setup
```python
from test_animation import setup
```



---
## grab_frame
```python
from test_animation import grab_frame
```



---
## finish
```python
from test_animation import finish
```



---
## DummyMovieWriter
```python
from test_animation import DummyMovieWriter
```



---
## __init__
```python
from test_animation import __init__
```



---
## isAvailable
```python
from test_animation import isAvailable
```



---
## Frame
```python
from test_animation import Frame
```



---
## frames_generator
```python
from test_animation import frames_generator
```



---
## update
```python
from test_animation import update
```



---
## _run
```python
from test_animation import _run
```



---
## __name__
```python
from test_container import __name__
```



---
## test_stem_remove
```python
from test_container import test_stem_remove
```



---
## test_errorbar_remove
```python
from test_container import test_errorbar_remove
```



---
## test_nonstring_label
```python
from test_container import test_nonstring_label
```



---
## __name__
```python
from test_pickle import __name__
```



---
## test_simple
```python
from test_pickle import test_simple
```



---
## _generate_complete_test_figure
```python
from test_pickle import _generate_complete_test_figure
```



---
## test_complete
```python
from test_pickle import test_complete
```



---
## _pickle_load_subprocess
```python
from test_pickle import _pickle_load_subprocess
```



---
## test_pickle_load_from_subprocess
```python
from test_pickle import test_pickle_load_from_subprocess
```



---
## test_gcf
```python
from test_pickle import test_gcf
```



---
## test_no_pyplot
```python
from test_pickle import test_no_pyplot
```



---
## test_renderer
```python
from test_pickle import test_renderer
```



---
## test_image
```python
from test_pickle import test_image
```



---
## test_polar
```python
from test_pickle import test_polar
```



---
## TransformBlob
```python
from test_pickle import TransformBlob
```



---
## test_transform
```python
from test_pickle import test_transform
```



---
## test_rrulewrapper
```python
from test_pickle import test_rrulewrapper
```



---
## test_shared
```python
from test_pickle import test_shared
```



---
## test_inset_and_secondary
```python
from test_pickle import test_inset_and_secondary
```



---
## test_cmap
```python
from test_pickle import test_cmap
```



---
## test_unpickle_canvas
```python
from test_pickle import test_unpickle_canvas
```



---
## test_mpl_toolkits
```python
from test_pickle import test_mpl_toolkits
```



---
## test_standard_norm
```python
from test_pickle import test_standard_norm
```



---
## test_dynamic_norm
```python
from test_pickle import test_dynamic_norm
```



---
## test_vertexselector
```python
from test_pickle import test_vertexselector
```



---
## test_cycler
```python
from test_pickle import test_cycler
```



---
## _test_axeswidget_interactive
```python
from test_pickle import _test_axeswidget_interactive
```



---
## test_axeswidget_interactive
```python
from test_pickle import test_axeswidget_interactive
```



---
## __init__
```python
from test_pickle import __init__
```



---
## __name__
```python
from test_dates import __name__
```



---
## test_date_numpyx
```python
from test_dates import test_date_numpyx
```



---
## test_date_date2num_numpy
```python
from test_dates import test_date_date2num_numpy
```



---
## test_date2num_NaT
```python
from test_dates import test_date2num_NaT
```



---
## test_date2num_NaT_scalar
```python
from test_dates import test_date2num_NaT_scalar
```



---
## test_date2num_masked
```python
from test_dates import test_date2num_masked
```



---
## test_date_empty
```python
from test_dates import test_date_empty
```



---
## test_date_not_empty
```python
from test_dates import test_date_not_empty
```



---
## test_axhline
```python
from test_dates import test_axhline
```



---
## test_date_axhspan
```python
from test_dates import test_date_axhspan
```



---
## test_date_axvspan
```python
from test_dates import test_date_axvspan
```



---
## test_date_axhline
```python
from test_dates import test_date_axhline
```



---
## test_date_axvline
```python
from test_dates import test_date_axvline
```



---
## test_too_many_date_ticks
```python
from test_dates import test_too_many_date_ticks
```



---
## _new_epoch_decorator
```python
from test_dates import _new_epoch_decorator
```



---
## test_RRuleLocator
```python
from test_dates import test_RRuleLocator
```



---
## test_RRuleLocator_dayrange
```python
from test_dates import test_RRuleLocator_dayrange
```



---
## test_RRuleLocator_close_minmax
```python
from test_dates import test_RRuleLocator_close_minmax
```



---
## test_DateFormatter
```python
from test_dates import test_DateFormatter
```



---
## test_locator_set_formatter
```python
from test_dates import test_locator_set_formatter
```

Test if setting the locator only will update the AutoDateFormatter to use
the new locator.

---
## test_date_formatter_callable
```python
from test_dates import test_date_formatter_callable
```



---
## test_date_formatter_usetex
```python
from test_dates import test_date_formatter_usetex
```



---
## test_drange
```python
from test_dates import test_drange
```

This test should check if drange works as expected, and if all the
rounding errors are fixed

---
## test_auto_date_locator
```python
from test_dates import test_auto_date_locator
```



---
## test_auto_date_locator_intmult
```python
from test_dates import test_auto_date_locator_intmult
```



---
## test_concise_formatter_subsecond
```python
from test_dates import test_concise_formatter_subsecond
```



---
## test_concise_formatter
```python
from test_dates import test_concise_formatter
```



---
## test_concise_formatter_show_offset
```python
from test_dates import test_concise_formatter_show_offset
```



---
## test_concise_converter_stays
```python
from test_dates import test_concise_converter_stays
```



---
## test_offset_changes
```python
from test_dates import test_offset_changes
```



---
## test_concise_formatter_usetex
```python
from test_dates import test_concise_formatter_usetex
```



---
## test_concise_formatter_formats
```python
from test_dates import test_concise_formatter_formats
```



---
## test_concise_formatter_zformats
```python
from test_dates import test_concise_formatter_zformats
```



---
## test_concise_formatter_tz
```python
from test_dates import test_concise_formatter_tz
```



---
## test_auto_date_locator_intmult_tz
```python
from test_dates import test_auto_date_locator_intmult_tz
```



---
## test_date_inverted_limit
```python
from test_dates import test_date_inverted_limit
```



---
## _test_date2num_dst
```python
from test_dates import _test_date2num_dst
```



---
## test_date2num_dst
```python
from test_dates import test_date2num_dst
```



---
## test_date2num_dst_pandas
```python
from test_dates import test_date2num_dst_pandas
```



---
## _test_rrulewrapper
```python
from test_dates import _test_rrulewrapper
```



---
## test_rrulewrapper
```python
from test_dates import test_rrulewrapper
```



---
## test_rrulewrapper_pytz
```python
from test_dates import test_rrulewrapper_pytz
```



---
## test_yearlocator_pytz
```python
from test_dates import test_yearlocator_pytz
```



---
## test_YearLocator
```python
from test_dates import test_YearLocator
```



---
## test_DayLocator
```python
from test_dates import test_DayLocator
```



---
## test_tz_utc
```python
from test_dates import test_tz_utc
```



---
## test_num2timedelta
```python
from test_dates import test_num2timedelta
```



---
## test_datetime64_in_list
```python
from test_dates import test_datetime64_in_list
```



---
## test_change_epoch
```python
from test_dates import test_change_epoch
```



---
## test_warn_notintervals
```python
from test_dates import test_warn_notintervals
```



---
## test_change_converter
```python
from test_dates import test_change_converter
```



---
## test_change_interval_multiples
```python
from test_dates import test_change_interval_multiples
```



---
## test_DateLocator
```python
from test_dates import test_DateLocator
```



---
## test_datestr2num
```python
from test_dates import test_datestr2num
```



---
## test_concise_formatter_exceptions
```python
from test_dates import test_concise_formatter_exceptions
```



---
## test_concise_formatter_call
```python
from test_dates import test_concise_formatter_call
```



---
## test_datetime_masked
```python
from test_dates import test_datetime_masked
```



---
## test_num2date_error
```python
from test_dates import test_num2date_error
```



---
## test_num2date_roundoff
```python
from test_dates import test_num2date_roundoff
```



---
## test_DateFormatter_settz
```python
from test_dates import test_DateFormatter_settz
```



---
## wrapper
```python
from test_dates import wrapper
```



---
## _Locator
```python
from test_dates import _Locator
```



---
## callable_formatting_function
```python
from test_dates import callable_formatting_function
```



---
## _create_auto_date_locator
```python
from test_dates import _create_auto_date_locator
```



---
## dt_tzaware
```python
from test_dates import dt_tzaware
```

This bug specifically occurs because of the normalization behavior of
pandas Timestamp objects, so in order to replicate it, we need a
datetime-like object that applies timezone normalization after
subtraction.

---
## date_range
```python
from test_dates import date_range
```



---
## tz_convert
```python
from test_dates import tz_convert
```



---
## attach_tz
```python
from test_dates import attach_tz
```



---
## _create_year_locator
```python
from test_dates import _create_year_locator
```



---
## _get_unit
```python
from test_dates import _get_unit
```



---
## __sub__
```python
from test_dates import __sub__
```



---
## __add__
```python
from test_dates import __add__
```



---
## astimezone
```python
from test_dates import astimezone
```



---
## mk_tzaware
```python
from test_dates import mk_tzaware
```



---
## __name__
```python
from test_table import __name__
```



---
## test_non_square
```python
from test_table import test_non_square
```



---
## test_zorder
```python
from test_table import test_zorder
```



---
## test_label_colours
```python
from test_table import test_label_colours
```



---
## test_diff_cell_table
```python
from test_table import test_diff_cell_table
```



---
## test_customcell
```python
from test_table import test_customcell
```



---
## test_auto_column
```python
from test_table import test_auto_column
```



---
## test_table_cells
```python
from test_table import test_table_cells
```



---
## test_table_bbox
```python
from test_table import test_table_bbox
```



---
## test_table_unit
```python
from test_table import test_table_unit
```



---
## FakeUnit
```python
from test_table import FakeUnit
```



---
## __init__
```python
from test_table import __init__
```



---
## __repr__
```python
from test_table import __repr__
```



---
## __name__
```python
from test_backend_gtk3 import __name__
```



---
## test_correct_key
```python
from test_backend_gtk3 import test_correct_key
```



---
## send
```python
from test_backend_gtk3 import send
```



---
## receive
```python
from test_backend_gtk3 import receive
```



---
## __name__
```python
from test_texmanager import __name__
```



---
## test_fontconfig_preamble
```python
from test_texmanager import test_fontconfig_preamble
```

Test that the preamble is included in the source.

---
## test_font_selection
```python
from test_texmanager import test_font_selection
```



---
## test_unicode_characters
```python
from test_texmanager import test_unicode_characters
```



---
## test_openin_any_paranoid
```python
from test_texmanager import test_openin_any_paranoid
```



---
## __name__
```python
from test_pyplot import __name__
```



---
## test_pyplot_up_to_date
```python
from test_pyplot import test_pyplot_up_to_date
```



---
## test_copy_docstring_and_deprecators
```python
from test_pyplot import test_copy_docstring_and_deprecators
```



---
## test_pyplot_box
```python
from test_pyplot import test_pyplot_box
```



---
## test_stackplot_smoke
```python
from test_pyplot import test_stackplot_smoke
```



---
## test_nrows_error
```python
from test_pyplot import test_nrows_error
```



---
## test_ioff
```python
from test_pyplot import test_ioff
```



---
## test_ion
```python
from test_pyplot import test_ion
```



---
## test_nested_ion_ioff
```python
from test_pyplot import test_nested_ion_ioff
```



---
## test_close
```python
from test_pyplot import test_close
```



---
## test_subplot_reuse
```python
from test_pyplot import test_subplot_reuse
```



---
## test_axes_kwargs
```python
from test_pyplot import test_axes_kwargs
```



---
## test_subplot_replace_projection
```python
from test_pyplot import test_subplot_replace_projection
```



---
## test_subplot_kwarg_collision
```python
from test_pyplot import test_subplot_kwarg_collision
```



---
## test_gca
```python
from test_pyplot import test_gca
```



---
## test_subplot_projection_reuse
```python
from test_pyplot import test_subplot_projection_reuse
```



---
## test_subplot_polar_normalization
```python
from test_pyplot import test_subplot_polar_normalization
```



---
## test_subplot_change_projection
```python
from test_pyplot import test_subplot_change_projection
```



---
## test_polar_second_call
```python
from test_pyplot import test_polar_second_call
```



---
## test_fallback_position
```python
from test_pyplot import test_fallback_position
```



---
## test_set_current_figure_via_subfigure
```python
from test_pyplot import test_set_current_figure_via_subfigure
```



---
## test_set_current_axes_on_subfigure
```python
from test_pyplot import test_set_current_axes_on_subfigure
```



---
## test_pylab_integration
```python
from test_pyplot import test_pylab_integration
```



---
## test_doc_pyplot_summary
```python
from test_pyplot import test_doc_pyplot_summary
```

Test that pyplot_summary lists all the plot functions.

---
## test_minor_ticks
```python
from test_pyplot import test_minor_ticks
```



---
## test_switch_backend_no_close
```python
from test_pyplot import test_switch_backend_no_close
```



---
## figure_hook_example
```python
from test_pyplot import figure_hook_example
```



---
## test_figure_hook
```python
from test_pyplot import test_figure_hook
```



---
## func
```python
from test_pyplot import func
```



---
## wrapper_func
```python
from test_pyplot import wrapper_func
```



---
## extract_documented_functions
```python
from test_pyplot import extract_documented_functions
```

Return a list of all the functions that are mentioned in the
autosummary blocks contained in *lines*.

An autosummary block looks like this::

    .. autosummary::
       :toctree: _as_gen
       :template: autosummary.rst
       :nosignatures:

       plot
       plot_date

---
## __name__
```python
from test_backends_interactive import __name__
```



---
## _WaitForStringPopen
```python
from test_backends_interactive import _WaitForStringPopen
```

A Popen that passes flags that allow triggering KeyboardInterrupt.

---
## _get_available_interactive_backends
```python
from test_backends_interactive import _get_available_interactive_backends
```



---
## _get_testable_interactive_backends
```python
from test_backends_interactive import _get_testable_interactive_backends
```



---
## _test_toolbar_button_la_mode_icon
```python
from test_backends_interactive import _test_toolbar_button_la_mode_icon
```



---
## _test_interactive_impl
```python
from test_backends_interactive import _test_interactive_impl
```



---
## test_interactive_backend
```python
from test_backends_interactive import test_interactive_backend
```



---
## _test_thread_impl
```python
from test_backends_interactive import _test_thread_impl
```



---
## test_interactive_thread_safety
```python
from test_backends_interactive import test_interactive_thread_safety
```



---
## _impl_test_lazy_auto_backend_selection
```python
from test_backends_interactive import _impl_test_lazy_auto_backend_selection
```



---
## test_lazy_auto_backend_selection
```python
from test_backends_interactive import test_lazy_auto_backend_selection
```



---
## _implqt5agg
```python
from test_backends_interactive import _implqt5agg
```



---
## _implcairo
```python
from test_backends_interactive import _implcairo
```



---
## _implcore
```python
from test_backends_interactive import _implcore
```



---
## test_qt5backends_uses_qt5
```python
from test_backends_interactive import test_qt5backends_uses_qt5
```



---
## _impl_missing
```python
from test_backends_interactive import _impl_missing
```



---
## test_qt_missing
```python
from test_backends_interactive import test_qt_missing
```



---
## _impl_test_cross_Qt_imports
```python
from test_backends_interactive import _impl_test_cross_Qt_imports
```



---
## qt5_and_qt6_pairs
```python
from test_backends_interactive import qt5_and_qt6_pairs
```



---
## test_cross_Qt_imports
```python
from test_backends_interactive import test_cross_Qt_imports
```



---
## test_webagg
```python
from test_backends_interactive import test_webagg
```



---
## _lazy_headless
```python
from test_backends_interactive import _lazy_headless
```



---
## test_lazy_linux_headless
```python
from test_backends_interactive import test_lazy_linux_headless
```



---
## _test_number_of_draws_script
```python
from test_backends_interactive import _test_number_of_draws_script
```



---
## test_blitting_events
```python
from test_backends_interactive import test_blitting_events
```



---
## _impl_test_interactive_timers
```python
from test_backends_interactive import _impl_test_interactive_timers
```



---
## test_interactive_timers
```python
from test_backends_interactive import test_interactive_timers
```



---
## _test_sigint_impl
```python
from test_backends_interactive import _test_sigint_impl
```



---
## test_sigint
```python
from test_backends_interactive import test_sigint
```



---
## _test_other_signal_before_sigint_impl
```python
from test_backends_interactive import _test_other_signal_before_sigint_impl
```



---
## test_other_signal_before_sigint
```python
from test_backends_interactive import test_other_signal_before_sigint
```



---
## __init__
```python
from test_backends_interactive import __init__
```



---
## wait_for
```python
from test_backends_interactive import wait_for
```

Read until the terminator is reached.

---
## interrupter
```python
from test_backends_interactive import interrupter
```



---
## custom_signal_handler
```python
from test_backends_interactive import custom_signal_handler
```



---
## CustomTool
```python
from test_backends_interactive import CustomTool
```



---
## check_alt_backend
```python
from test_backends_interactive import check_alt_backend
```



---
## __name__
```python
from test_textpath import __name__
```



---
## test_copy
```python
from test_textpath import test_copy
```



---
## __name__
```python
from test_subplots import __name__
```



---
## check_shared
```python
from test_subplots import check_shared
```

x_shared and y_shared are n x n boolean matrices; entry (i, j) indicates
whether the x (or y) axes of subplots i and j should be shared.

---
## check_ticklabel_visible
```python
from test_subplots import check_ticklabel_visible
```

Check that the x and y ticklabel visibility is as specified.

---
## check_tick1_visible
```python
from test_subplots import check_tick1_visible
```

Check that the x and y tick visibility is as specified.

Note: This only checks the tick1line, i.e. bottom / left ticks.

---
## test_shared
```python
from test_subplots import test_shared
```



---
## test_label_outer
```python
from test_subplots import test_label_outer
```



---
## test_label_outer_span
```python
from test_subplots import test_label_outer_span
```



---
## test_label_outer_non_gridspec
```python
from test_subplots import test_label_outer_non_gridspec
```



---
## test_shared_and_moved
```python
from test_subplots import test_shared_and_moved
```



---
## test_exceptions
```python
from test_subplots import test_exceptions
```



---
## test_subplots_offsettext
```python
from test_subplots import test_subplots_offsettext
```



---
## test_subplots_hide_ticklabels
```python
from test_subplots import test_subplots_hide_ticklabels
```



---
## test_subplots_hide_axislabels
```python
from test_subplots import test_subplots_hide_axislabels
```



---
## test_get_gridspec
```python
from test_subplots import test_get_gridspec
```



---
## test_dont_mutate_kwargs
```python
from test_subplots import test_dont_mutate_kwargs
```



---
## test_width_and_height_ratios
```python
from test_subplots import test_width_and_height_ratios
```



---
## test_width_and_height_ratios_mosaic
```python
from test_subplots import test_width_and_height_ratios_mosaic
```



---
## test_ratio_overlapping_kws
```python
from test_subplots import test_ratio_overlapping_kws
```



---
## test_old_subplot_compat
```python
from test_subplots import test_old_subplot_compat
```



---
## __name__
```python
from test_getattr import __name__
```



---
## test_getattr
```python
from test_getattr import test_getattr
```

Test that __getattr__ methods raise AttributeError for unknown keys.
See #20822, #20855.

---
## __name__
```python
from test_ticker import __name__
```



---
## TestMaxNLocator
```python
from test_ticker import TestMaxNLocator
```



---
## TestLinearLocator
```python
from test_ticker import TestLinearLocator
```



---
## TestMultipleLocator
```python
from test_ticker import TestMultipleLocator
```



---
## TestAutoMinorLocator
```python
from test_ticker import TestAutoMinorLocator
```



---
## TestLogLocator
```python
from test_ticker import TestLogLocator
```



---
## TestNullLocator
```python
from test_ticker import TestNullLocator
```



---
## _LogitHelper
```python
from test_ticker import _LogitHelper
```



---
## TestLogitLocator
```python
from test_ticker import TestLogitLocator
```



---
## TestFixedLocator
```python
from test_ticker import TestFixedLocator
```



---
## TestIndexLocator
```python
from test_ticker import TestIndexLocator
```



---
## TestSymmetricalLogLocator
```python
from test_ticker import TestSymmetricalLogLocator
```



---
## TestAsinhLocator
```python
from test_ticker import TestAsinhLocator
```



---
## TestScalarFormatter
```python
from test_ticker import TestScalarFormatter
```



---
## TestLogFormatterExponent
```python
from test_ticker import TestLogFormatterExponent
```



---
## TestLogFormatterMathtext
```python
from test_ticker import TestLogFormatterMathtext
```



---
## TestLogFormatterSciNotation
```python
from test_ticker import TestLogFormatterSciNotation
```



---
## TestLogFormatter
```python
from test_ticker import TestLogFormatter
```



---
## TestLogitFormatter
```python
from test_ticker import TestLogitFormatter
```



---
## TestFormatStrFormatter
```python
from test_ticker import TestFormatStrFormatter
```



---
## TestStrMethodFormatter
```python
from test_ticker import TestStrMethodFormatter
```



---
## TestEngFormatter
```python
from test_ticker import TestEngFormatter
```



---
## test_engformatter_usetex_useMathText
```python
from test_ticker import test_engformatter_usetex_useMathText
```



---
## TestPercentFormatter
```python
from test_ticker import TestPercentFormatter
```



---
## _impl_locale_comma
```python
from test_ticker import _impl_locale_comma
```



---
## test_locale_comma
```python
from test_ticker import test_locale_comma
```



---
## test_majformatter_type
```python
from test_ticker import test_majformatter_type
```



---
## test_minformatter_type
```python
from test_ticker import test_minformatter_type
```



---
## test_majlocator_type
```python
from test_ticker import test_majlocator_type
```



---
## test_minlocator_type
```python
from test_ticker import test_minlocator_type
```



---
## test_minorticks_rc
```python
from test_ticker import test_minorticks_rc
```



---
## test_minorticks_toggle
```python
from test_ticker import test_minorticks_toggle
```

Test toggling minor ticks

Test `.Axis.minorticks_on()` and `.Axis.minorticks_off()`. Testing is
limited to a subset of built-in scales - `'linear'`, `'log'`, `'asinh'`
and `'logit'`. `symlog` scale does not seem to have a working minor
locator and is omitted. In future, this test should cover all scales in
`matplotlib.scale.get_scale_names()`.

---
## test_remove_overlap
```python
from test_ticker import test_remove_overlap
```



---
## test_bad_locator_subs
```python
from test_ticker import test_bad_locator_subs
```



---
## test_small_range_loglocator
```python
from test_ticker import test_small_range_loglocator
```



---
## test_NullFormatter
```python
from test_ticker import test_NullFormatter
```



---
## test_set_offset_string
```python
from test_ticker import test_set_offset_string
```



---
## test_minorticks_on_multi_fig
```python
from test_ticker import test_minorticks_on_multi_fig
```

Turning on minor gridlines in a multi-Axes Figure
that contains more than one boxplot and shares the x-axis
should not raise an exception.

---
## test_basic
```python
from test_ticker import test_basic
```



---
## test_integer
```python
from test_ticker import test_integer
```



---
## test_errors
```python
from test_ticker import test_errors
```



---
## test_padding
```python
from test_ticker import test_padding
```



---
## test_zero_numticks
```python
from test_ticker import test_zero_numticks
```



---
## test_set_params
```python
from test_ticker import test_set_params
```



---
## test_presets
```python
from test_ticker import test_presets
```



---
## test_basic_with_offset
```python
from test_ticker import test_basic_with_offset
```



---
## test_view_limits
```python
from test_ticker import test_view_limits
```

Test basic behavior of view limits.

---
## test_view_limits_round_numbers
```python
from test_ticker import test_view_limits_round_numbers
```

Test that everything works properly with 'round_numbers' for auto
limit.

---
## test_view_limits_round_numbers_with_offset
```python
from test_ticker import test_view_limits_round_numbers_with_offset
```

Test that everything works properly with 'round_numbers' for auto
limit.

---
## test_view_limits_single_bin
```python
from test_ticker import test_view_limits_single_bin
```

Test that 'round_numbers' works properly with a single bin.

---
## test_first_and_last_minorticks
```python
from test_ticker import test_first_and_last_minorticks
```

Test that first and last minor tick appear as expected.

---
## test_low_number_of_majorticks
```python
from test_ticker import test_low_number_of_majorticks
```



---
## test_using_all_default_major_steps
```python
from test_ticker import test_using_all_default_major_steps
```



---
## test_number_of_minor_ticks
```python
from test_ticker import test_number_of_minor_ticks
```



---
## test_additional
```python
from test_ticker import test_additional
```



---
## test_number_of_minor_ticks_auto
```python
from test_ticker import test_number_of_minor_ticks_auto
```



---
## test_number_of_minor_ticks_int
```python
from test_ticker import test_number_of_minor_ticks_int
```



---
## test_polar_axes
```python
from test_ticker import test_polar_axes
```

Polar Axes have a different ticking logic.

---
## test_switch_to_autolocator
```python
from test_ticker import test_switch_to_autolocator
```



---
## test_tick_values_correct
```python
from test_ticker import test_tick_values_correct
```



---
## test_tick_values_not_empty
```python
from test_ticker import test_tick_values_not_empty
```



---
## test_multiple_shared_axes
```python
from test_ticker import test_multiple_shared_axes
```



---
## isclose
```python
from test_ticker import isclose
```



---
## assert_almost_equal
```python
from test_ticker import assert_almost_equal
```



---
## test_basic_major
```python
from test_ticker import test_basic_major
```

Create logit locator with huge number of major, and tests ticks.

---
## test_maxn_major
```python
from test_ticker import test_maxn_major
```

When the axis is zoomed, the locator must have the same behavior as
MaxNLocator.

---
## test_nbins_major
```python
from test_ticker import test_nbins_major
```

Assert logit locator for respecting nbins param.

---
## test_minor
```python
from test_ticker import test_minor
```

In large scale, test the presence of minor,
and assert no minor when major are subsampled.

---
## test_minor_attr
```python
from test_ticker import test_minor_attr
```



---
## test_nonsingular_ok
```python
from test_ticker import test_nonsingular_ok
```

Create logit locator, and test the nonsingular method for acceptable
value

---
## test_nonsingular_nok
```python
from test_ticker import test_nonsingular_nok
```

Create logit locator, and test the nonsingular method for non
acceptable value

---
## test_values
```python
from test_ticker import test_values
```



---
## test_subs
```python
from test_ticker import test_subs
```



---
## test_extending
```python
from test_ticker import test_extending
```



---
## test_init
```python
from test_ticker import test_init
```



---
## test_linear_values
```python
from test_ticker import test_linear_values
```



---
## test_wide_values
```python
from test_ticker import test_wide_values
```



---
## test_near_zero
```python
from test_ticker import test_near_zero
```

Check that manually injected zero will supersede nearby tick

---
## test_fallback
```python
from test_ticker import test_fallback
```



---
## test_symmetrizing
```python
from test_ticker import test_symmetrizing
```



---
## test_base_rounding
```python
from test_ticker import test_base_rounding
```



---
## test_unicode_minus
```python
from test_ticker import test_unicode_minus
```



---
## test_offset_value
```python
from test_ticker import test_offset_value
```



---
## test_use_offset
```python
from test_ticker import test_use_offset
```



---
## test_useMathText
```python
from test_ticker import test_useMathText
```



---
## test_set_use_offset_float
```python
from test_ticker import test_set_use_offset_float
```



---
## test_use_locale
```python
from test_ticker import test_use_locale
```



---
## test_scilimits
```python
from test_ticker import test_scilimits
```



---
## test_format_data
```python
from test_ticker import test_format_data
```



---
## test_cursor_precision
```python
from test_ticker import test_cursor_precision
```



---
## test_cursor_dummy_axis
```python
from test_ticker import test_cursor_dummy_axis
```



---
## test_mathtext_ticks
```python
from test_ticker import test_mathtext_ticks
```



---
## test_cmr10_substitutions
```python
from test_ticker import test_cmr10_substitutions
```



---
## test_empty_locs
```python
from test_ticker import test_empty_locs
```



---
## test_blank
```python
from test_ticker import test_blank
```



---
## test_min_exponent
```python
from test_ticker import test_min_exponent
```



---
## test_pprint
```python
from test_ticker import test_pprint
```



---
## _sub_labels
```python
from test_ticker import _sub_labels
```

Test whether locator marks subs to be labeled.

---
## test_sublabel
```python
from test_ticker import test_sublabel
```



---
## test_LogFormatter_call
```python
from test_ticker import test_LogFormatter_call
```



---
## test_LogFormatter_call_tiny
```python
from test_ticker import test_LogFormatter_call_tiny
```



---
## logit_deformatter
```python
from test_ticker import logit_deformatter
```

Parser to convert string as r'$\mathdefault{1.41\cdot10^{-4}}$' in
float 1.41e-4, as '0.5' or as r'$\mathdefault{\frac{1}{2}}$' in float
0.5,

---
## test_logit_deformater
```python
from test_ticker import test_logit_deformater
```



---
## test_invalid
```python
from test_ticker import test_invalid
```

Test that invalid value are formatted with empty string without
raising exception.

---
## test_variablelength
```python
from test_ticker import test_variablelength
```

The format length should change depending on the neighbor labels.

---
## test_minor_vs_major
```python
from test_ticker import test_minor_vs_major
```

Test minor/major displays.

---
## test_minor_number
```python
from test_ticker import test_minor_number
```

Test the parameter minor_number

---
## test_use_overline
```python
from test_ticker import test_use_overline
```

Test the parameter use_overline

---
## test_one_half
```python
from test_ticker import test_one_half
```

Test the parameter one_half

---
## test_format_data_short
```python
from test_ticker import test_format_data_short
```



---
## test_params
```python
from test_ticker import test_params
```

Test the formatting of EngFormatter for various values of the 'places'
argument, in several cases:

0. without a unit symbol but with a (default) space separator;
1. with both a unit symbol and a (default) space separator;
2. with both a unit symbol and some non default separators;
3. without a unit symbol but with some non default separators.

Note that cases 2. and 3. are looped over several separator strings.

---
## test_latex
```python
from test_ticker import test_latex
```



---
## minorticksubplot
```python
from test_ticker import minorticksubplot
```



---
## minortickstoggle
```python
from test_ticker import minortickstoggle
```



---
## __name__
```python
from test_image import __name__
```



---
## test_image_interps
```python
from test_image import test_image_interps
```

Make the basic nearest, bilinear and bicubic interps.

---
## test_alpha_interp
```python
from test_image import test_alpha_interp
```

Test the interpolation of the alpha channel on RGBA images

---
## test_interp_nearest_vs_none
```python
from test_image import test_interp_nearest_vs_none
```

Test the effect of "nearest" and "none" interpolation

---
## test_figimage
```python
from test_image import test_figimage
```



---
## test_image_python_io
```python
from test_image import test_image_python_io
```



---
## test_imshow_antialiased
```python
from test_image import test_imshow_antialiased
```



---
## test_imshow_zoom
```python
from test_image import test_imshow_zoom
```



---
## test_imshow_pil
```python
from test_image import test_imshow_pil
```



---
## test_imread_pil_uint16
```python
from test_image import test_imread_pil_uint16
```



---
## test_imread_fspath
```python
from test_image import test_imread_fspath
```



---
## test_imsave
```python
from test_image import test_imsave
```



---
## test_imsave_rgba_origin
```python
from test_image import test_imsave_rgba_origin
```



---
## test_imsave_fspath
```python
from test_image import test_imsave_fspath
```



---
## test_imsave_color_alpha
```python
from test_image import test_imsave_color_alpha
```



---
## test_imsave_pil_kwargs_png
```python
from test_image import test_imsave_pil_kwargs_png
```



---
## test_imsave_pil_kwargs_tiff
```python
from test_image import test_imsave_pil_kwargs_tiff
```



---
## test_image_alpha
```python
from test_image import test_image_alpha
```



---
## test_imshow_alpha
```python
from test_image import test_imshow_alpha
```



---
## test_cursor_data
```python
from test_image import test_cursor_data
```



---
## test_cursor_data_nonuniform
```python
from test_image import test_cursor_data_nonuniform
```



---
## test_format_cursor_data
```python
from test_image import test_format_cursor_data
```



---
## test_image_clip
```python
from test_image import test_image_clip
```



---
## test_image_cliprect
```python
from test_image import test_image_cliprect
```



---
## test_imshow
```python
from test_image import test_imshow
```



---
## test_imshow_10_10_1
```python
from test_image import test_imshow_10_10_1
```



---
## test_imshow_10_10_2
```python
from test_image import test_imshow_10_10_2
```



---
## test_imshow_10_10_5
```python
from test_image import test_imshow_10_10_5
```



---
## test_no_interpolation_origin
```python
from test_image import test_no_interpolation_origin
```



---
## test_image_shift
```python
from test_image import test_image_shift
```



---
## test_image_edges
```python
from test_image import test_image_edges
```



---
## test_image_composite_background
```python
from test_image import test_image_composite_background
```



---
## test_image_composite_alpha
```python
from test_image import test_image_composite_alpha
```

Tests that the alpha value is recognized and correctly applied in the
process of compositing images together.

---
## test_clip_path_disables_compositing
```python
from test_image import test_clip_path_disables_compositing
```



---
## test_rasterize_dpi
```python
from test_image import test_rasterize_dpi
```



---
## test_bbox_image_inverted
```python
from test_image import test_bbox_image_inverted
```



---
## test_get_window_extent_for_AxisImage
```python
from test_image import test_get_window_extent_for_AxisImage
```



---
## test_zoom_and_clip_upper_origin
```python
from test_image import test_zoom_and_clip_upper_origin
```



---
## test_nonuniformimage_setcmap
```python
from test_image import test_nonuniformimage_setcmap
```



---
## test_nonuniformimage_setnorm
```python
from test_image import test_nonuniformimage_setnorm
```



---
## test_jpeg_2d
```python
from test_image import test_jpeg_2d
```



---
## test_jpeg_alpha
```python
from test_image import test_jpeg_alpha
```



---
## test_axesimage_setdata
```python
from test_image import test_axesimage_setdata
```



---
## test_figureimage_setdata
```python
from test_image import test_figureimage_setdata
```



---
## test_setdata_xya
```python
from test_image import test_setdata_xya
```



---
## test_minimized_rasterized
```python
from test_image import test_minimized_rasterized
```



---
## test_load_from_url
```python
from test_image import test_load_from_url
```



---
## test_log_scale_image
```python
from test_image import test_log_scale_image
```



---
## test_rotate_image
```python
from test_image import test_rotate_image
```



---
## test_image_preserve_size
```python
from test_image import test_image_preserve_size
```



---
## test_image_preserve_size2
```python
from test_image import test_image_preserve_size2
```



---
## test_mask_image_over_under
```python
from test_image import test_mask_image_over_under
```



---
## test_mask_image
```python
from test_image import test_mask_image
```



---
## test_mask_image_all
```python
from test_image import test_mask_image_all
```



---
## test_imshow_endianess
```python
from test_image import test_imshow_endianess
```



---
## test_imshow_masked_interpolation
```python
from test_image import test_imshow_masked_interpolation
```



---
## test_imshow_no_warn_invalid
```python
from test_image import test_imshow_no_warn_invalid
```



---
## test_imshow_clips_rgb_to_valid_range
```python
from test_image import test_imshow_clips_rgb_to_valid_range
```



---
## test_imshow_flatfield
```python
from test_image import test_imshow_flatfield
```



---
## test_imshow_bignumbers
```python
from test_image import test_imshow_bignumbers
```



---
## test_imshow_bignumbers_real
```python
from test_image import test_imshow_bignumbers_real
```



---
## test_empty_imshow
```python
from test_image import test_empty_imshow
```



---
## test_imshow_float16
```python
from test_image import test_imshow_float16
```



---
## test_imshow_float128
```python
from test_image import test_imshow_float128
```



---
## test_imshow_bool
```python
from test_image import test_imshow_bool
```



---
## test_full_invalid
```python
from test_image import test_full_invalid
```



---
## test_composite
```python
from test_image import test_composite
```



---
## test_relim
```python
from test_image import test_relim
```



---
## test_unclipped
```python
from test_image import test_unclipped
```



---
## test_respects_bbox
```python
from test_image import test_respects_bbox
```



---
## test_image_cursor_formatting
```python
from test_image import test_image_cursor_formatting
```



---
## test_image_array_alpha
```python
from test_image import test_image_array_alpha
```

Per-pixel alpha channel test.

---
## test_image_array_alpha_validation
```python
from test_image import test_image_array_alpha_validation
```



---
## test_exact_vmin
```python
from test_image import test_exact_vmin
```



---
## test_image_placement
```python
from test_image import test_image_placement
```

The red box should line up exactly with the outside of the image.

---
## QuantityND
```python
from test_image import QuantityND
```



---
## test_quantitynd
```python
from test_image import test_quantitynd
```



---
## test_imshow_quantitynd
```python
from test_image import test_imshow_quantitynd
```



---
## test_norm_change
```python
from test_image import test_norm_change
```



---
## test_huge_range_log
```python
from test_image import test_huge_range_log
```



---
## test_spy_box
```python
from test_image import test_spy_box
```



---
## test_nonuniform_and_pcolor
```python
from test_image import test_nonuniform_and_pcolor
```



---
## test_rgba_antialias
```python
from test_image import test_rgba_antialias
```



---
## test_rc_interpolation_stage
```python
from test_image import test_rc_interpolation_stage
```



---
## test_large_image
```python
from test_image import test_large_image
```



---
## test_str_norms
```python
from test_image import test_str_norms
```



---
## test__resample_valid_output
```python
from test_image import test__resample_valid_output
```



---
## test_axesimage_get_shape
```python
from test_image import test_axesimage_get_shape
```



---
## test_non_transdata_image_does_not_touch_aspect
```python
from test_image import test_non_transdata_image_does_not_touch_aspect
```



---
## test_resample_dtypes
```python
from test_image import test_resample_dtypes
```



---
## __new__
```python
from test_image import __new__
```



---
## __array_finalize__
```python
from test_image import __array_finalize__
```



---
## __getitem__
```python
from test_image import __getitem__
```



---
## __array_ufunc__
```python
from test_image import __array_ufunc__
```



---
## v
```python
from test_image import v
```



---
## __name__
```python
from test_fontconfig_pattern import __name__
```



---
## test_fontconfig_pattern
```python
from test_fontconfig_pattern import test_fontconfig_pattern
```

Test converting a FontProperties to string then back.

---
## test_fontconfig_str
```python
from test_fontconfig_pattern import test_fontconfig_str
```

Test FontProperties string conversions for correctness.

---
## test_fontconfig_unknown_constant
```python
from test_fontconfig_pattern import test_fontconfig_unknown_constant
```



---
## __name__
```python
from test_scale import __name__
```



---
## test_log_scales
```python
from test_scale import test_log_scales
```



---
## test_symlog_mask_nan
```python
from test_scale import test_symlog_mask_nan
```



---
## test_logit_scales
```python
from test_scale import test_logit_scales
```



---
## test_log_scatter
```python
from test_scale import test_log_scatter
```

Issue #1799

---
## test_logscale_subs
```python
from test_scale import test_logscale_subs
```



---
## test_logscale_mask
```python
from test_scale import test_logscale_mask
```



---
## test_extra_kwargs_raise
```python
from test_scale import test_extra_kwargs_raise
```



---
## test_logscale_invert_transform
```python
from test_scale import test_logscale_invert_transform
```



---
## test_logscale_transform_repr
```python
from test_scale import test_logscale_transform_repr
```



---
## test_logscale_nonpos_values
```python
from test_scale import test_logscale_nonpos_values
```



---
## test_invalid_log_lims
```python
from test_scale import test_invalid_log_lims
```



---
## test_function_scale
```python
from test_scale import test_function_scale
```



---
## test_pass_scale
```python
from test_scale import test_pass_scale
```



---
## test_scale_deepcopy
```python
from test_scale import test_scale_deepcopy
```



---
## TestAsinhScale
```python
from test_scale import TestAsinhScale
```



---
## inverse
```python
from test_scale import inverse
```



---
## forward
```python
from test_scale import forward
```



---
## test_transforms
```python
from test_scale import test_transforms
```



---
## test_init
```python
from test_scale import test_init
```



---
## test_base_init
```python
from test_scale import test_base_init
```



---
## test_fmtloc
```python
from test_scale import test_fmtloc
```



---
## test_bad_scale
```python
from test_scale import test_bad_scale
```



---
## DummyAxis
```python
from test_scale import DummyAxis
```



---
## __init__
```python
from test_scale import __init__
```



---
## set
```python
from test_scale import set
```



---
## set_major_formatter
```python
from test_scale import set_major_formatter
```



---
## __name__
```python
from test_sankey import __name__
```



---
## test_sankey
```python
from test_sankey import test_sankey
```



---
## test_label
```python
from test_sankey import test_label
```



---
## test_format_using_callable
```python
from test_sankey import test_format_using_callable
```



---
## test_sankey_errors
```python
from test_sankey import test_sankey_errors
```



---
## test_sankey_add_errors
```python
from test_sankey import test_sankey_add_errors
```



---
## test_sankey2
```python
from test_sankey import test_sankey2
```



---
## test_sankey3
```python
from test_sankey import test_sankey3
```



---
## show_three_decimal_places
```python
from test_sankey import show_three_decimal_places
```



---
## __name__
```python
from test_colorbar import __name__
```



---
## _get_cmap_norms
```python
from test_colorbar import _get_cmap_norms
```

Define a colormap and appropriate norms for each of the four
possible settings of the extend keyword.

Helper function for _colorbar_extension_shape and
colorbar_extension_length.

---
## _colorbar_extension_shape
```python
from test_colorbar import _colorbar_extension_shape
```

Produce 4 colorbars with rectangular extensions for either uniform
or proportional spacing.

Helper function for test_colorbar_extension_shape.

---
## _colorbar_extension_length
```python
from test_colorbar import _colorbar_extension_length
```

Produce 12 colorbars with variable length extensions for either
uniform or proportional spacing.

Helper function for test_colorbar_extension_length.

---
## test_colorbar_extension_shape
```python
from test_colorbar import test_colorbar_extension_shape
```

Test rectangular colorbar extensions.

---
## test_colorbar_extension_length
```python
from test_colorbar import test_colorbar_extension_length
```

Test variable length colorbar extensions.

---
## test_colorbar_extension_inverted_axis
```python
from test_colorbar import test_colorbar_extension_inverted_axis
```

Test extension color with an inverted axis

---
## test_colorbar_positioning
```python
from test_colorbar import test_colorbar_positioning
```



---
## test_colorbar_single_ax_panchor_false
```python
from test_colorbar import test_colorbar_single_ax_panchor_false
```



---
## test_colorbar_single_ax_panchor_east
```python
from test_colorbar import test_colorbar_single_ax_panchor_east
```



---
## test_contour_colorbar
```python
from test_colorbar import test_contour_colorbar
```



---
## test_gridspec_make_colorbar
```python
from test_colorbar import test_gridspec_make_colorbar
```



---
## test_colorbar_single_scatter
```python
from test_colorbar import test_colorbar_single_scatter
```



---
## test_remove_from_figure
```python
from test_colorbar import test_remove_from_figure
```

Test `remove` with the specified ``use_gridspec`` setting.

---
## test_remove_from_figure_cl
```python
from test_colorbar import test_remove_from_figure_cl
```

Test `remove` with constrained_layout.

---
## test_colorbarbase
```python
from test_colorbar import test_colorbarbase
```



---
## test_parentless_mappable
```python
from test_colorbar import test_parentless_mappable
```



---
## test_colorbar_closed_patch
```python
from test_colorbar import test_colorbar_closed_patch
```



---
## test_colorbar_ticks
```python
from test_colorbar import test_colorbar_ticks
```



---
## test_colorbar_minorticks_on_off
```python
from test_colorbar import test_colorbar_minorticks_on_off
```



---
## test_cbar_minorticks_for_rc_xyminortickvisible
```python
from test_colorbar import test_cbar_minorticks_for_rc_xyminortickvisible
```

issue gh-16468.

Making sure that minor ticks on the colorbar are turned on
(internally) using the cbar.minorticks_on() method when
rcParams['xtick.minor.visible'] = True (for horizontal cbar)
rcParams['ytick.minor.visible'] = True (for vertical cbar).
Using cbar.minorticks_on() ensures that the minor ticks
don't overflow into the extend regions of the colorbar.

---
## test_colorbar_autoticks
```python
from test_colorbar import test_colorbar_autoticks
```



---
## test_colorbar_autotickslog
```python
from test_colorbar import test_colorbar_autotickslog
```



---
## test_colorbar_get_ticks
```python
from test_colorbar import test_colorbar_get_ticks
```



---
## test_colorbar_lognorm_extension
```python
from test_colorbar import test_colorbar_lognorm_extension
```



---
## test_colorbar_powernorm_extension
```python
from test_colorbar import test_colorbar_powernorm_extension
```



---
## test_colorbar_axes_kw
```python
from test_colorbar import test_colorbar_axes_kw
```



---
## test_colorbar_log_minortick_labels
```python
from test_colorbar import test_colorbar_log_minortick_labels
```



---
## test_colorbar_renorm
```python
from test_colorbar import test_colorbar_renorm
```



---
## test_colorbar_format
```python
from test_colorbar import test_colorbar_format
```



---
## test_colorbar_scale_reset
```python
from test_colorbar import test_colorbar_scale_reset
```



---
## test_colorbar_get_ticks_2
```python
from test_colorbar import test_colorbar_get_ticks_2
```



---
## test_colorbar_inverted_ticks
```python
from test_colorbar import test_colorbar_inverted_ticks
```



---
## test_mappable_no_alpha
```python
from test_colorbar import test_mappable_no_alpha
```



---
## test_mappable_2d_alpha
```python
from test_colorbar import test_mappable_2d_alpha
```



---
## test_colorbar_label
```python
from test_colorbar import test_colorbar_label
```

Test the label parameter. It should just be mapped to the xlabel/ylabel of
the axes, depending on the orientation.

---
## test_keeping_xlabel
```python
from test_colorbar import test_keeping_xlabel
```



---
## test_colorbar_int
```python
from test_colorbar import test_colorbar_int
```



---
## test_anchored_cbar_position_using_specgrid
```python
from test_colorbar import test_anchored_cbar_position_using_specgrid
```



---
## test_colorbar_change_lim_scale
```python
from test_colorbar import test_colorbar_change_lim_scale
```



---
## test_axes_handles_same_functions
```python
from test_colorbar import test_axes_handles_same_functions
```



---
## test_inset_colorbar_layout
```python
from test_colorbar import test_inset_colorbar_layout
```



---
## test_twoslope_colorbar
```python
from test_colorbar import test_twoslope_colorbar
```



---
## test_remove_cb_whose_mappable_has_no_figure
```python
from test_colorbar import test_remove_cb_whose_mappable_has_no_figure
```



---
## test_aspects
```python
from test_colorbar import test_aspects
```



---
## test_proportional_colorbars
```python
from test_colorbar import test_proportional_colorbars
```



---
## test_colorbar_extend_drawedges
```python
from test_colorbar import test_colorbar_extend_drawedges
```



---
## test_colorbar_contourf_extend_patches
```python
from test_colorbar import test_colorbar_contourf_extend_patches
```



---
## test_negative_boundarynorm
```python
from test_colorbar import test_negative_boundarynorm
```



---
## test_centerednorm
```python
from test_colorbar import test_centerednorm
```



---
## test_nonorm
```python
from test_colorbar import test_nonorm
```



---
## test_boundaries
```python
from test_colorbar import test_boundaries
```



---
## test_colorbar_no_warning_rcparams_grid_true
```python
from test_colorbar import test_colorbar_no_warning_rcparams_grid_true
```



---
## test_colorbar_set_formatter_locator
```python
from test_colorbar import test_colorbar_set_formatter_locator
```



---
## test_colorbar_extend_alpha
```python
from test_colorbar import test_colorbar_extend_alpha
```



---
## test_offset_text_loc
```python
from test_colorbar import test_offset_text_loc
```



---
## test_title_text_loc
```python
from test_colorbar import test_title_text_loc
```



---
## test_passing_location
```python
from test_colorbar import test_passing_location
```



---
## test_colorbar_errors
```python
from test_colorbar import test_colorbar_errors
```



---
## test_colorbar_axes_parmeters
```python
from test_colorbar import test_colorbar_axes_parmeters
```



---
## test_colorbar_wrong_figure
```python
from test_colorbar import test_colorbar_wrong_figure
```



---
## test_colorbar_format_string_and_old
```python
from test_colorbar import test_colorbar_format_string_and_old
```



---
## __name__
```python
from test_colors import __name__
```



---
## test_create_lookup_table
```python
from test_colors import test_create_lookup_table
```



---
## test_index_dtype
```python
from test_colors import test_index_dtype
```



---
## test_resampled
```python
from test_colors import test_resampled
```

GitHub issue #6025 pointed to incorrect ListedColormap.resampled;
here we test the method for LinearSegmentedColormap as well.

---
## test_colormaps_get_cmap
```python
from test_colors import test_colormaps_get_cmap
```



---
## test_double_register_builtin_cmap
```python
from test_colors import test_double_register_builtin_cmap
```



---
## test_colormap_copy
```python
from test_colors import test_colormap_copy
```



---
## test_colormap_equals
```python
from test_colors import test_colormap_equals
```



---
## test_colormap_endian
```python
from test_colors import test_colormap_endian
```

GitHub issue #1005: a bug in putmask caused erroneous
mapping of 1.0 when input from a non-native-byteorder
array.

---
## test_colormap_invalid
```python
from test_colors import test_colormap_invalid
```

GitHub issue #9892: Handling of nan's were getting mapped to under
rather than bad. This tests to make sure all invalid values
(-inf, nan, inf) are mapped respectively to (under, bad, over).

---
## test_colormap_return_types
```python
from test_colors import test_colormap_return_types
```

Make sure that tuples are returned for scalar input and
that the proper shapes are returned for ndarrays.

---
## test_BoundaryNorm
```python
from test_colors import test_BoundaryNorm
```

GitHub issue #1258: interpolation was failing with numpy
1.7 pre-release.

---
## test_CenteredNorm
```python
from test_colors import test_CenteredNorm
```



---
## test_lognorm_invalid
```python
from test_colors import test_lognorm_invalid
```



---
## test_LogNorm
```python
from test_colors import test_LogNorm
```

LogNorm ignored clip, now it has the same
behavior as Normalize, e.g., values > vmax are bigger than 1
without clip, with clip they are 1.

---
## test_LogNorm_inverse
```python
from test_colors import test_LogNorm_inverse
```

Test that lists work, and that the inverse works

---
## test_PowerNorm
```python
from test_colors import test_PowerNorm
```



---
## test_PowerNorm_translation_invariance
```python
from test_colors import test_PowerNorm_translation_invariance
```



---
## test_powernorm_cbar_limits
```python
from test_colors import test_powernorm_cbar_limits
```



---
## test_Normalize
```python
from test_colors import test_Normalize
```



---
## test_FuncNorm
```python
from test_colors import test_FuncNorm
```



---
## test_TwoSlopeNorm_autoscale
```python
from test_colors import test_TwoSlopeNorm_autoscale
```



---
## test_TwoSlopeNorm_autoscale_None_vmin
```python
from test_colors import test_TwoSlopeNorm_autoscale_None_vmin
```



---
## test_TwoSlopeNorm_autoscale_None_vmax
```python
from test_colors import test_TwoSlopeNorm_autoscale_None_vmax
```



---
## test_TwoSlopeNorm_scale
```python
from test_colors import test_TwoSlopeNorm_scale
```



---
## test_TwoSlopeNorm_scaleout_center
```python
from test_colors import test_TwoSlopeNorm_scaleout_center
```



---
## test_TwoSlopeNorm_scaleout_center_max
```python
from test_colors import test_TwoSlopeNorm_scaleout_center_max
```



---
## test_TwoSlopeNorm_Even
```python
from test_colors import test_TwoSlopeNorm_Even
```



---
## test_TwoSlopeNorm_Odd
```python
from test_colors import test_TwoSlopeNorm_Odd
```



---
## test_TwoSlopeNorm_VminEqualsVcenter
```python
from test_colors import test_TwoSlopeNorm_VminEqualsVcenter
```



---
## test_TwoSlopeNorm_VmaxEqualsVcenter
```python
from test_colors import test_TwoSlopeNorm_VmaxEqualsVcenter
```



---
## test_TwoSlopeNorm_VminGTVcenter
```python
from test_colors import test_TwoSlopeNorm_VminGTVcenter
```



---
## test_TwoSlopeNorm_TwoSlopeNorm_VminGTVmax
```python
from test_colors import test_TwoSlopeNorm_TwoSlopeNorm_VminGTVmax
```



---
## test_TwoSlopeNorm_VcenterGTVmax
```python
from test_colors import test_TwoSlopeNorm_VcenterGTVmax
```



---
## test_TwoSlopeNorm_premature_scaling
```python
from test_colors import test_TwoSlopeNorm_premature_scaling
```



---
## test_SymLogNorm
```python
from test_colors import test_SymLogNorm
```

Test SymLogNorm behavior

---
## test_SymLogNorm_colorbar
```python
from test_colors import test_SymLogNorm_colorbar
```

Test un-called SymLogNorm in a colorbar.

---
## test_SymLogNorm_single_zero
```python
from test_colors import test_SymLogNorm_single_zero
```

Test SymLogNorm to ensure it is not adding sub-ticks to zero label

---
## TestAsinhNorm
```python
from test_colors import TestAsinhNorm
```

Tests for `~.colors.AsinhNorm`

---
## _inverse_tester
```python
from test_colors import _inverse_tester
```

Checks if the inverse of the given normalization is working.

---
## _scalar_tester
```python
from test_colors import _scalar_tester
```

Checks if scalars and arrays are handled the same way.
Tests only for float.

---
## _mask_tester
```python
from test_colors import _mask_tester
```

Checks mask handling

---
## test_cmap_and_norm_from_levels_and_colors
```python
from test_colors import test_cmap_and_norm_from_levels_and_colors
```



---
## test_boundarynorm_and_colorbarbase
```python
from test_colors import test_boundarynorm_and_colorbarbase
```



---
## test_cmap_and_norm_from_levels_and_colors2
```python
from test_colors import test_cmap_and_norm_from_levels_and_colors2
```



---
## test_rgb_hsv_round_trip
```python
from test_colors import test_rgb_hsv_round_trip
```



---
## test_autoscale_masked
```python
from test_colors import test_autoscale_masked
```



---
## test_light_source_topo_surface
```python
from test_colors import test_light_source_topo_surface
```

Shades a DEM using different v.e.'s and blend modes.

---
## test_light_source_shading_default
```python
from test_colors import test_light_source_shading_default
```

Array comparison test for the default "hsv" blend mode. Ensure the
default result doesn't change without warning.

---
## test_light_source_shading_empty_mask
```python
from test_colors import test_light_source_shading_empty_mask
```



---
## test_light_source_masked_shading
```python
from test_colors import test_light_source_masked_shading
```

Array comparison test for a surface with a masked portion. Ensures that
we don't wind up with "fringes" of odd colors around masked regions.

---
## test_light_source_hillshading
```python
from test_colors import test_light_source_hillshading
```

Compare the current hillshading method against one that should be
mathematically equivalent. Illuminates a cone from a range of angles.

---
## test_light_source_planar_hillshading
```python
from test_colors import test_light_source_planar_hillshading
```

Ensure that the illumination intensity is correct for planar surfaces.

---
## test_color_names
```python
from test_colors import test_color_names
```



---
## _sph2cart
```python
from test_colors import _sph2cart
```



---
## _azimuth2math
```python
from test_colors import _azimuth2math
```

Convert from clockwise-from-north and up-from-horizontal to mathematical
conventions.

---
## test_pandas_iterable
```python
from test_colors import test_pandas_iterable
```



---
## test_colormap_reversing
```python
from test_colors import test_colormap_reversing
```

Check the generated _lut data of a colormap and corresponding reversed
colormap if they are almost the same.

---
## test_has_alpha_channel
```python
from test_colors import test_has_alpha_channel
```



---
## test_cn
```python
from test_colors import test_cn
```



---
## test_conversions
```python
from test_colors import test_conversions
```



---
## test_conversions_masked
```python
from test_colors import test_conversions_masked
```



---
## test_to_rgba_array_single_str
```python
from test_colors import test_to_rgba_array_single_str
```



---
## test_to_rgba_array_2tuple_str
```python
from test_colors import test_to_rgba_array_2tuple_str
```



---
## test_to_rgba_array_alpha_array
```python
from test_colors import test_to_rgba_array_alpha_array
```



---
## test_to_rgba_array_accepts_color_alpha_tuple
```python
from test_colors import test_to_rgba_array_accepts_color_alpha_tuple
```



---
## test_to_rgba_array_explicit_alpha_overrides_tuple_alpha
```python
from test_colors import test_to_rgba_array_explicit_alpha_overrides_tuple_alpha
```



---
## test_to_rgba_array_accepts_color_alpha_tuple_with_multiple_colors
```python
from test_colors import test_to_rgba_array_accepts_color_alpha_tuple_with_multiple_colors
```



---
## test_to_rgba_array_error_with_color_invalid_alpha_tuple
```python
from test_colors import test_to_rgba_array_error_with_color_invalid_alpha_tuple
```



---
## test_to_rgba_accepts_color_alpha_tuple
```python
from test_colors import test_to_rgba_accepts_color_alpha_tuple
```



---
## test_to_rgba_explicit_alpha_overrides_tuple_alpha
```python
from test_colors import test_to_rgba_explicit_alpha_overrides_tuple_alpha
```



---
## test_to_rgba_error_with_color_invalid_alpha_tuple
```python
from test_colors import test_to_rgba_error_with_color_invalid_alpha_tuple
```



---
## test_scalarmappable_to_rgba
```python
from test_colors import test_scalarmappable_to_rgba
```



---
## test_scalarmappable_nan_to_rgba
```python
from test_colors import test_scalarmappable_nan_to_rgba
```



---
## test_failed_conversions
```python
from test_colors import test_failed_conversions
```



---
## test_grey_gray
```python
from test_colors import test_grey_gray
```



---
## test_tableau_order
```python
from test_colors import test_tableau_order
```



---
## test_ndarray_subclass_norm
```python
from test_colors import test_ndarray_subclass_norm
```



---
## test_same_color
```python
from test_colors import test_same_color
```



---
## test_hex_shorthand_notation
```python
from test_colors import test_hex_shorthand_notation
```



---
## test_repr_png
```python
from test_colors import test_repr_png
```



---
## test_repr_html
```python
from test_colors import test_repr_html
```



---
## test_get_under_over_bad
```python
from test_colors import test_get_under_over_bad
```



---
## test_non_mutable_get_values
```python
from test_colors import test_non_mutable_get_values
```



---
## test_colormap_alpha_array
```python
from test_colors import test_colormap_alpha_array
```



---
## test_colormap_bad_data_with_alpha
```python
from test_colors import test_colormap_bad_data_with_alpha
```



---
## test_2d_to_rgba
```python
from test_colors import test_2d_to_rgba
```



---
## test_set_dict_to_rgba
```python
from test_colors import test_set_dict_to_rgba
```



---
## test_norm_deepcopy
```python
from test_colors import test_norm_deepcopy
```



---
## test_norm_callback
```python
from test_colors import test_norm_callback
```



---
## test_scalarmappable_norm_update
```python
from test_colors import test_scalarmappable_norm_update
```



---
## test_norm_update_figs
```python
from test_colors import test_norm_update_figs
```



---
## test_make_norm_from_scale_name
```python
from test_colors import test_make_norm_from_scale_name
```



---
## test_color_sequences
```python
from test_colors import test_color_sequences
```



---
## test_cm_set_cmap_error
```python
from test_colors import test_cm_set_cmap_error
```



---
## test_set_cmap_mismatched_name
```python
from test_colors import test_set_cmap_mismatched_name
```



---
## test_to_rgba_array_none_color_with_alpha_param
```python
from test_colors import test_to_rgba_array_none_color_with_alpha_param
```



---
## test_is_color_like
```python
from test_colors import test_is_color_like
```



---
## forward
```python
from test_colors import forward
```



---
## inverse
```python
from test_colors import inverse
```



---
## test_init
```python
from test_colors import test_init
```



---
## test_norm
```python
from test_colors import test_norm
```



---
## alternative_hillshade
```python
from test_colors import alternative_hillshade
```



---
## plane
```python
from test_colors import plane
```

Create a plane whose normal vector is at the given azimuth and
elevation.

---
## angled_plane
```python
from test_colors import angled_plane
```

Create a plane whose normal vector is at an angle from the given
azimuth and elevation.

---
## MyArray
```python
from test_colors import MyArray
```



---
## __isub__
```python
from test_colors import __isub__
```



---
## __add__
```python
from test_colors import __add__
```



---
## __name__
```python
from test_usetex import __name__
```



---
## test_usetex
```python
from test_usetex import test_usetex
```



---
## test_empty
```python
from test_usetex import test_empty
```



---
## test_unicode_minus
```python
from test_usetex import test_unicode_minus
```



---
## test_mathdefault
```python
from test_usetex import test_mathdefault
```



---
## test_multiline_eqnarray
```python
from test_usetex import test_multiline_eqnarray
```



---
## test_minus_no_descent
```python
from test_usetex import test_minus_no_descent
```



---
## test_usetex_packages
```python
from test_usetex import test_usetex_packages
```



---
## test_latex_pkg_already_loaded
```python
from test_usetex import test_latex_pkg_already_loaded
```



---
## test_usetex_with_underscore
```python
from test_usetex import test_usetex_with_underscore
```



---
## test_missing_psfont
```python
from test_usetex import test_missing_psfont
```

An error is raised if a TeX font lacks a Type-1 equivalent

---
## test_rotation
```python
from test_usetex import test_rotation
```



---
## __name__
```python
from test_backend_cairo import __name__
```



---
## test_patch_alpha_coloring
```python
from test_backend_cairo import test_patch_alpha_coloring
```

Test checks that the patch and collection are rendered with the specified
alpha values in their facecolor and edgecolor.

---
## __name__
```python
from test_mlab import __name__
```



---
## test_window
```python
from test_mlab import test_window
```



---
## TestDetrend
```python
from test_mlab import TestDetrend
```



---
## TestSpectral
```python
from test_mlab import TestSpectral
```



---
## test_cohere
```python
from test_mlab import test_cohere
```



---
## TestGaussianKDE
```python
from test_mlab import TestGaussianKDE
```



---
## TestGaussianKDECustom
```python
from test_mlab import TestGaussianKDECustom
```



---
## TestGaussianKDEEvaluate
```python
from test_mlab import TestGaussianKDEEvaluate
```



---
## test_psd_onesided_norm
```python
from test_mlab import test_psd_onesided_norm
```



---
## test_psd_oversampling
```python
from test_mlab import test_psd_oversampling
```

Test the case len(x) < NFFT for psd().

---
## setup_method
```python
from test_mlab import setup_method
```



---
## allclose
```python
from test_mlab import allclose
```



---
## test_detrend_none
```python
from test_mlab import test_detrend_none
```



---
## test_detrend_mean
```python
from test_mlab import test_detrend_mean
```



---
## test_detrend_mean_1d_base_slope_off_list_andor_axis0
```python
from test_mlab import test_detrend_mean_1d_base_slope_off_list_andor_axis0
```



---
## test_detrend_mean_2d
```python
from test_mlab import test_detrend_mean_2d
```



---
## test_detrend_ValueError
```python
from test_mlab import test_detrend_ValueError
```



---
## test_detrend_mean_ValueError
```python
from test_mlab import test_detrend_mean_ValueError
```



---
## test_detrend_linear
```python
from test_mlab import test_detrend_linear
```



---
## test_detrend_str_linear_1d
```python
from test_mlab import test_detrend_str_linear_1d
```



---
## test_detrend_linear_2d
```python
from test_mlab import test_detrend_linear_2d
```



---
## stim
```python
from test_mlab import stim
```



---
## check_freqs
```python
from test_mlab import check_freqs
```



---
## check_maxfreq
```python
from test_mlab import check_maxfreq
```



---
## test_spectral_helper_raises
```python
from test_mlab import test_spectral_helper_raises
```



---
## test_single_spectrum_helper_unsupported_modes
```python
from test_mlab import test_single_spectrum_helper_unsupported_modes
```



---
## test_spectral_helper_psd
```python
from test_mlab import test_spectral_helper_psd
```



---
## test_csd
```python
from test_mlab import test_csd
```



---
## test_csd_padding
```python
from test_mlab import test_csd_padding
```

Test zero padding of csd().

---
## test_psd
```python
from test_mlab import test_psd
```



---
## test_psd_detrend
```python
from test_mlab import test_psd_detrend
```



---
## test_psd_window_hanning
```python
from test_mlab import test_psd_window_hanning
```



---
## test_psd_window_hanning_detrend_linear
```python
from test_mlab import test_psd_window_hanning_detrend_linear
```



---
## test_psd_window_flattop
```python
from test_mlab import test_psd_window_flattop
```



---
## test_psd_windowarray
```python
from test_mlab import test_psd_windowarray
```



---
## test_psd_windowarray_scale_by_freq
```python
from test_mlab import test_psd_windowarray_scale_by_freq
```



---
## test_spectrum
```python
from test_mlab import test_spectrum
```



---
## test_specgram
```python
from test_mlab import test_specgram
```



---
## test_specgram_warn_only1seg
```python
from test_mlab import test_specgram_warn_only1seg
```

Warning should be raised if len(x) <= NFFT.

---
## test_psd_csd_equal
```python
from test_mlab import test_psd_csd_equal
```



---
## test_specgram_auto_default_psd_equal
```python
from test_mlab import test_specgram_auto_default_psd_equal
```

Test that mlab.specgram without mode and with mode 'default' and 'psd'
are all the same.

---
## test_specgram_complex_equivalent
```python
from test_mlab import test_specgram_complex_equivalent
```



---
## test_psd_windowarray_equal
```python
from test_mlab import test_psd_windowarray_equal
```



---
## test_kde_integer_input
```python
from test_mlab import test_kde_integer_input
```

Regression test for #1181.

---
## test_gaussian_kde_covariance_caching
```python
from test_mlab import test_gaussian_kde_covariance_caching
```



---
## test_kde_bandwidth_method
```python
from test_mlab import test_kde_bandwidth_method
```



---
## test_no_data
```python
from test_mlab import test_no_data
```

Pass no data into the GaussianKDE class.

---
## test_single_dataset_element
```python
from test_mlab import test_single_dataset_element
```

Pass a single dataset element into the GaussianKDE class.

---
## test_silverman_multidim_dataset
```python
from test_mlab import test_silverman_multidim_dataset
```

Test silverman's for a multi-dimensional array.

---
## test_silverman_singledim_dataset
```python
from test_mlab import test_silverman_singledim_dataset
```

Test silverman's output for a single dimension list.

---
## test_scott_multidim_dataset
```python
from test_mlab import test_scott_multidim_dataset
```

Test scott's output for a multi-dimensional array.

---
## test_scott_singledim_dataset
```python
from test_mlab import test_scott_singledim_dataset
```

Test scott's output a single-dimensional array.

---
## test_scalar_empty_dataset
```python
from test_mlab import test_scalar_empty_dataset
```

Test the scalar's cov factor for an empty array.

---
## test_scalar_covariance_dataset
```python
from test_mlab import test_scalar_covariance_dataset
```

Test a scalar's cov factor.

---
## test_callable_covariance_dataset
```python
from test_mlab import test_callable_covariance_dataset
```

Test the callable's cov factor for a multi-dimensional array.

---
## test_callable_singledim_dataset
```python
from test_mlab import test_callable_singledim_dataset
```

Test the callable's cov factor for a single-dimensional array.

---
## test_wrong_bw_method
```python
from test_mlab import test_wrong_bw_method
```

Test the error message that should be called when bw is invalid.

---
## test_evaluate_diff_dim
```python
from test_mlab import test_evaluate_diff_dim
```

Test the evaluate method when the dim's of dataset and points have
different dimensions.

---
## test_evaluate_inv_dim
```python
from test_mlab import test_evaluate_inv_dim
```

Invert the dimensions; i.e., for a dataset of dimension 1 [3, 2, 4],
the points should have a dimension of 3 [[3], [2], [4]].

---
## test_evaluate_dim_and_num
```python
from test_mlab import test_evaluate_dim_and_num
```

Tests if evaluated against a one by one array

---
## test_evaluate_point_dim_not_one
```python
from test_mlab import test_evaluate_point_dim_not_one
```



---
## test_evaluate_equal_dim_and_num_lt
```python
from test_mlab import test_evaluate_equal_dim_and_num_lt
```



---
## callable_fun
```python
from test_mlab import callable_fun
```



---
## __name__
```python
from test_font_manager import __name__
```



---
## test_font_priority
```python
from test_font_manager import test_font_priority
```



---
## test_score_weight
```python
from test_font_manager import test_score_weight
```



---
## test_json_serialization
```python
from test_font_manager import test_json_serialization
```



---
## test_otf
```python
from test_font_manager import test_otf
```



---
## test_get_fontconfig_fonts
```python
from test_font_manager import test_get_fontconfig_fonts
```



---
## test_hinting_factor
```python
from test_font_manager import test_hinting_factor
```



---
## test_utf16m_sfnt
```python
from test_font_manager import test_utf16m_sfnt
```



---
## test_find_ttc
```python
from test_font_manager import test_find_ttc
```



---
## test_find_noto
```python
from test_font_manager import test_find_noto
```



---
## test_find_invalid
```python
from test_font_manager import test_find_invalid
```



---
## test_user_fonts_linux
```python
from test_font_manager import test_user_fonts_linux
```



---
## test_addfont_as_path
```python
from test_font_manager import test_addfont_as_path
```

Smoke test that addfont() accepts pathlib.Path.

---
## test_user_fonts_win32
```python
from test_font_manager import test_user_fonts_win32
```



---
## _model_handler
```python
from test_font_manager import _model_handler
```



---
## test_fork
```python
from test_font_manager import test_fork
```



---
## test_missing_family
```python
from test_font_manager import test_missing_family
```



---
## _test_threading
```python
from test_font_manager import _test_threading
```



---
## test_fontcache_thread_safe
```python
from test_font_manager import test_fontcache_thread_safe
```



---
## test_lockfilefailure
```python
from test_font_manager import test_lockfilefailure
```



---
## test_fontentry_dataclass
```python
from test_font_manager import test_fontentry_dataclass
```



---
## test_fontentry_dataclass_invalid_path
```python
from test_font_manager import test_fontentry_dataclass_invalid_path
```



---
## test_get_font_names
```python
from test_font_manager import test_get_font_names
```



---
## test_donot_cache_tracebacks
```python
from test_font_manager import test_donot_cache_tracebacks
```



---
## bad_idea
```python
from test_font_manager import bad_idea
```



---
## SomeObject
```python
from test_font_manager import SomeObject
```



---
## inner
```python
from test_font_manager import inner
```



---
## __name__
```python
from test_polar import __name__
```



---
## test_polar_annotations
```python
from test_polar import test_polar_annotations
```



---
## test_polar_coord_annotations
```python
from test_polar import test_polar_coord_annotations
```



---
## test_polar_alignment
```python
from test_polar import test_polar_alignment
```



---
## test_polar_twice
```python
from test_polar import test_polar_twice
```



---
## test_polar_wrap
```python
from test_polar import test_polar_wrap
```



---
## test_polar_units_1
```python
from test_polar import test_polar_units_1
```



---
## test_polar_units_2
```python
from test_polar import test_polar_units_2
```



---
## test_polar_rmin
```python
from test_polar import test_polar_rmin
```



---
## test_polar_negative_rmin
```python
from test_polar import test_polar_negative_rmin
```



---
## test_polar_rorigin
```python
from test_polar import test_polar_rorigin
```



---
## test_polar_invertedylim
```python
from test_polar import test_polar_invertedylim
```



---
## test_polar_invertedylim_rorigin
```python
from test_polar import test_polar_invertedylim_rorigin
```



---
## test_polar_theta_position
```python
from test_polar import test_polar_theta_position
```



---
## test_polar_rlabel_position
```python
from test_polar import test_polar_rlabel_position
```



---
## test_polar_theta_limits
```python
from test_polar import test_polar_theta_limits
```



---
## test_polar_rlim
```python
from test_polar import test_polar_rlim
```



---
## test_polar_rlim_bottom
```python
from test_polar import test_polar_rlim_bottom
```



---
## test_polar_rlim_zero
```python
from test_polar import test_polar_rlim_zero
```



---
## test_polar_no_data
```python
from test_polar import test_polar_no_data
```



---
## test_polar_default_log_lims
```python
from test_polar import test_polar_default_log_lims
```



---
## test_polar_not_datalim_adjustable
```python
from test_polar import test_polar_not_datalim_adjustable
```



---
## test_polar_gridlines
```python
from test_polar import test_polar_gridlines
```



---
## test_get_tightbbox_polar
```python
from test_polar import test_get_tightbbox_polar
```



---
## test_polar_interpolation_steps_constant_r
```python
from test_polar import test_polar_interpolation_steps_constant_r
```



---
## test_polar_interpolation_steps_variable_r
```python
from test_polar import test_polar_interpolation_steps_variable_r
```



---
## test_thetalim_valid_invalid
```python
from test_polar import test_thetalim_valid_invalid
```



---
## test_thetalim_args
```python
from test_polar import test_thetalim_args
```



---
## test_default_thetalocator
```python
from test_polar import test_default_thetalocator
```



---
## test_axvspan
```python
from test_polar import test_axvspan
```



---
## test_remove_shared_polar
```python
from test_polar import test_remove_shared_polar
```



---
## test_shared_polar_keeps_ticklabels
```python
from test_polar import test_shared_polar_keeps_ticklabels
```



---
## test_axvline_axvspan_do_not_modify_rlims
```python
from test_polar import test_axvline_axvspan_do_not_modify_rlims
```



---
## test_cursor_precision
```python
from test_polar import test_cursor_precision
```



---
## test_polar_log
```python
from test_polar import test_polar_log
```



---
## test_polar_neg_theta_lims
```python
from test_polar import test_polar_neg_theta_lims
```



---
## TestDatetimePlotting
```python
from test_datetime import TestDatetimePlotting
```



---
## test_annotate
```python
from test_datetime import test_annotate
```



---
## test_arrow
```python
from test_datetime import test_arrow
```



---
## test_axhline
```python
from test_datetime import test_axhline
```



---
## test_axhspan
```python
from test_datetime import test_axhspan
```



---
## test_axline
```python
from test_datetime import test_axline
```



---
## test_axvline
```python
from test_datetime import test_axvline
```



---
## test_axvspan
```python
from test_datetime import test_axvspan
```



---
## test_bar
```python
from test_datetime import test_bar
```



---
## test_bar_label
```python
from test_datetime import test_bar_label
```



---
## test_barbs
```python
from test_datetime import test_barbs
```



---
## test_barh
```python
from test_datetime import test_barh
```



---
## test_boxplot
```python
from test_datetime import test_boxplot
```



---
## test_broken_barh
```python
from test_datetime import test_broken_barh
```



---
## test_bxp
```python
from test_datetime import test_bxp
```



---
## test_clabel
```python
from test_datetime import test_clabel
```



---
## test_contour
```python
from test_datetime import test_contour
```



---
## test_contourf
```python
from test_datetime import test_contourf
```



---
## test_errorbar
```python
from test_datetime import test_errorbar
```



---
## test_eventplot
```python
from test_datetime import test_eventplot
```



---
## test_fill
```python
from test_datetime import test_fill
```



---
## test_fill_between
```python
from test_datetime import test_fill_between
```



---
## test_fill_betweenx
```python
from test_datetime import test_fill_betweenx
```



---
## test_hexbin
```python
from test_datetime import test_hexbin
```



---
## test_hist
```python
from test_datetime import test_hist
```



---
## test_hist2d
```python
from test_datetime import test_hist2d
```



---
## test_hlines
```python
from test_datetime import test_hlines
```



---
## test_imshow
```python
from test_datetime import test_imshow
```



---
## test_loglog
```python
from test_datetime import test_loglog
```



---
## test_matshow
```python
from test_datetime import test_matshow
```



---
## test_pcolor
```python
from test_datetime import test_pcolor
```



---
## test_pcolorfast
```python
from test_datetime import test_pcolorfast
```



---
## test_pcolormesh
```python
from test_datetime import test_pcolormesh
```



---
## test_plot
```python
from test_datetime import test_plot
```



---
## test_plot_date
```python
from test_datetime import test_plot_date
```



---
## test_quiver
```python
from test_datetime import test_quiver
```



---
## test_scatter
```python
from test_datetime import test_scatter
```



---
## test_semilogx
```python
from test_datetime import test_semilogx
```



---
## test_semilogy
```python
from test_datetime import test_semilogy
```



---
## test_stackplot
```python
from test_datetime import test_stackplot
```



---
## test_stairs
```python
from test_datetime import test_stairs
```



---
## test_stem
```python
from test_datetime import test_stem
```



---
## test_step
```python
from test_datetime import test_step
```



---
## test_streamplot
```python
from test_datetime import test_streamplot
```



---
## test_text
```python
from test_datetime import test_text
```



---
## test_tricontour
```python
from test_datetime import test_tricontour
```



---
## test_tricontourf
```python
from test_datetime import test_tricontourf
```



---
## test_tripcolor
```python
from test_datetime import test_tripcolor
```



---
## test_triplot
```python
from test_datetime import test_triplot
```



---
## test_violin
```python
from test_datetime import test_violin
```



---
## test_violinplot
```python
from test_datetime import test_violinplot
```



---
## test_vlines
```python
from test_datetime import test_vlines
```



---
## __name__
```python
from test_agg import __name__
```



---
## test_repeated_save_with_alpha
```python
from test_agg import test_repeated_save_with_alpha
```



---
## test_large_single_path_collection
```python
from test_agg import test_large_single_path_collection
```



---
## test_marker_with_nan
```python
from test_agg import test_marker_with_nan
```



---
## test_long_path
```python
from test_agg import test_long_path
```



---
## test_agg_filter
```python
from test_agg import test_agg_filter
```



---
## test_too_large_image
```python
from test_agg import test_too_large_image
```



---
## test_chunksize
```python
from test_agg import test_chunksize
```



---
## test_jpeg_dpi
```python
from test_agg import test_jpeg_dpi
```



---
## test_pil_kwargs_png
```python
from test_agg import test_pil_kwargs_png
```



---
## test_pil_kwargs_tiff
```python
from test_agg import test_pil_kwargs_tiff
```



---
## test_pil_kwargs_webp
```python
from test_agg import test_pil_kwargs_webp
```



---
## test_webp_alpha
```python
from test_agg import test_webp_alpha
```



---
## test_draw_path_collection_error_handling
```python
from test_agg import test_draw_path_collection_error_handling
```



---
## test_chunksize_fails
```python
from test_agg import test_chunksize_fails
```



---
## test_non_tuple_rgbaface
```python
from test_agg import test_non_tuple_rgbaface
```



---
## smooth1d
```python
from test_agg import smooth1d
```



---
## smooth2d
```python
from test_agg import smooth2d
```



---
## BaseFilter
```python
from test_agg import BaseFilter
```



---
## OffsetFilter
```python
from test_agg import OffsetFilter
```



---
## GaussianFilter
```python
from test_agg import GaussianFilter
```

Simple Gaussian filter.

---
## DropShadowFilter
```python
from test_agg import DropShadowFilter
```



---
## get_pad
```python
from test_agg import get_pad
```



---
## process_image
```python
from test_agg import process_image
```



---
## __call__
```python
from test_agg import __call__
```



---
## __init__
```python
from test_agg import __init__
```



---
## __name__
```python
from test_quiver import __name__
```



---
## draw_quiver
```python
from test_quiver import draw_quiver
```



---
## test_quiver_memory_leak
```python
from test_quiver import test_quiver_memory_leak
```



---
## test_quiver_key_memory_leak
```python
from test_quiver import test_quiver_key_memory_leak
```



---
## test_quiver_number_of_args
```python
from test_quiver import test_quiver_number_of_args
```



---
## test_quiver_arg_sizes
```python
from test_quiver import test_quiver_arg_sizes
```



---
## test_no_warnings
```python
from test_quiver import test_no_warnings
```



---
## test_zero_headlength
```python
from test_quiver import test_zero_headlength
```



---
## test_quiver_animate
```python
from test_quiver import test_quiver_animate
```



---
## test_quiver_with_key
```python
from test_quiver import test_quiver_with_key
```



---
## test_quiver_single
```python
from test_quiver import test_quiver_single
```



---
## test_quiver_copy
```python
from test_quiver import test_quiver_copy
```



---
## test_quiver_key_pivot
```python
from test_quiver import test_quiver_key_pivot
```



---
## test_quiver_key_xy
```python
from test_quiver import test_quiver_key_xy
```



---
## test_barbs
```python
from test_quiver import test_barbs
```



---
## test_barbs_pivot
```python
from test_quiver import test_barbs_pivot
```



---
## test_barbs_flip
```python
from test_quiver import test_barbs_flip
```

Test barbs with an array for flip_barb.

---
## test_barb_copy
```python
from test_quiver import test_barb_copy
```



---
## test_bad_masked_sizes
```python
from test_quiver import test_bad_masked_sizes
```

Test error handling when given differing sized masked arrays.

---
## test_angles_and_scale
```python
from test_quiver import test_angles_and_scale
```



---
## test_quiver_xy
```python
from test_quiver import test_quiver_xy
```



---
## test_quiverkey_angles
```python
from test_quiver import test_quiverkey_angles
```



---
## test_quiverkey_angles_xy_aitoff
```python
from test_quiver import test_quiverkey_angles_xy_aitoff
```



---
## test_quiverkey_angles_scale_units_cartesian
```python
from test_quiver import test_quiverkey_angles_scale_units_cartesian
```



---
## test_quiver_setuvc_numbers
```python
from test_quiver import test_quiver_setuvc_numbers
```

Check that it is possible to set all arrow UVC to the same numbers

---
## __name__
```python
from test_text import __name__
```



---
## test_font_styles
```python
from test_text import test_font_styles
```



---
## test_multiline
```python
from test_text import test_multiline
```



---
## test_multiline2
```python
from test_text import test_multiline2
```



---
## test_antialiasing
```python
from test_text import test_antialiasing
```



---
## test_afm_kerning
```python
from test_text import test_afm_kerning
```



---
## test_contains
```python
from test_text import test_contains
```



---
## test_annotation_contains
```python
from test_text import test_annotation_contains
```



---
## test_annotate_errors
```python
from test_text import test_annotate_errors
```



---
## test_titles
```python
from test_text import test_titles
```



---
## test_alignment
```python
from test_text import test_alignment
```



---
## test_axes_titles
```python
from test_text import test_axes_titles
```



---
## test_set_position
```python
from test_text import test_set_position
```



---
## test_char_index_at
```python
from test_text import test_char_index_at
```



---
## test_non_default_dpi
```python
from test_text import test_non_default_dpi
```



---
## test_get_rotation_string
```python
from test_text import test_get_rotation_string
```



---
## test_get_rotation_float
```python
from test_text import test_get_rotation_float
```



---
## test_get_rotation_int
```python
from test_text import test_get_rotation_int
```



---
## test_get_rotation_raises
```python
from test_text import test_get_rotation_raises
```



---
## test_get_rotation_none
```python
from test_text import test_get_rotation_none
```



---
## test_get_rotation_mod360
```python
from test_text import test_get_rotation_mod360
```



---
## test_null_rotation_with_rotation_mode
```python
from test_text import test_null_rotation_with_rotation_mode
```



---
## test_bbox_clipping
```python
from test_text import test_bbox_clipping
```



---
## test_annotation_negative_ax_coords
```python
from test_text import test_annotation_negative_ax_coords
```



---
## test_annotation_negative_fig_coords
```python
from test_text import test_annotation_negative_fig_coords
```



---
## test_text_stale
```python
from test_text import test_text_stale
```



---
## test_agg_text_clip
```python
from test_text import test_agg_text_clip
```



---
## test_text_size_binding
```python
from test_text import test_text_size_binding
```



---
## test_font_scaling
```python
from test_text import test_font_scaling
```



---
## test_two_2line_texts
```python
from test_text import test_two_2line_texts
```



---
## test_validate_linespacing
```python
from test_text import test_validate_linespacing
```



---
## test_nonfinite_pos
```python
from test_text import test_nonfinite_pos
```



---
## test_hinting_factor_backends
```python
from test_text import test_hinting_factor_backends
```



---
## test_usetex_is_copied
```python
from test_text import test_usetex_is_copied
```



---
## test_single_artist_usetex
```python
from test_text import test_single_artist_usetex
```



---
## test_single_artist_usenotex
```python
from test_text import test_single_artist_usenotex
```



---
## test_text_as_path_opacity
```python
from test_text import test_text_as_path_opacity
```



---
## test_text_as_text_opacity
```python
from test_text import test_text_as_text_opacity
```



---
## test_text_repr
```python
from test_text import test_text_repr
```



---
## test_annotation_update
```python
from test_text import test_annotation_update
```



---
## test_annotation_units
```python
from test_text import test_annotation_units
```



---
## test_large_subscript_title
```python
from test_text import test_large_subscript_title
```



---
## test_wrap
```python
from test_text import test_wrap
```



---
## test_mathwrap
```python
from test_text import test_mathwrap
```



---
## test_get_window_extent_wrapped
```python
from test_text import test_get_window_extent_wrapped
```



---
## test_long_word_wrap
```python
from test_text import test_long_word_wrap
```



---
## test_wrap_no_wrap
```python
from test_text import test_wrap_no_wrap
```



---
## test_buffer_size
```python
from test_text import test_buffer_size
```



---
## test_fontproperties_kwarg_precedence
```python
from test_text import test_fontproperties_kwarg_precedence
```

Test that kwargs take precedence over fontproperties defaults.

---
## test_transform_rotates_text
```python
from test_text import test_transform_rotates_text
```



---
## test_update_mutate_input
```python
from test_text import test_update_mutate_input
```



---
## test_invalid_rotation_values
```python
from test_text import test_invalid_rotation_values
```



---
## test_invalid_color
```python
from test_text import test_invalid_color
```



---
## test_pdf_kerning
```python
from test_text import test_pdf_kerning
```



---
## test_unsupported_script
```python
from test_text import test_unsupported_script
```



---
## test_parse_math
```python
from test_text import test_parse_math
```



---
## test_parse_math_rcparams
```python
from test_text import test_parse_math_rcparams
```



---
## test_pdf_font42_kerning
```python
from test_text import test_pdf_font42_kerning
```



---
## test_pdf_chars_beyond_bmp
```python
from test_text import test_pdf_chars_beyond_bmp
```



---
## test_metrics_cache
```python
from test_text import test_metrics_cache
```



---
## test_annotate_offset_fontsize
```python
from test_text import test_annotate_offset_fontsize
```



---
## test_get_set_antialiased
```python
from test_text import test_get_set_antialiased
```



---
## test_annotation_antialiased
```python
from test_text import test_annotation_antialiased
```



---
## test_annotate_and_offsetfrom_copy_input
```python
from test_text import test_annotate_and_offsetfrom_copy_input
```



---
## test_text_antialiased_off_default_vs_manual
```python
from test_text import test_text_antialiased_off_default_vs_manual
```



---
## test_text_antialiased_on_default_vs_manual
```python
from test_text import test_text_antialiased_on_default_vs_manual
```



---
## test_text_annotation_get_window_extent
```python
from test_text import test_text_annotation_get_window_extent
```



---
## test_text_with_arrow_annotation_get_window_extent
```python
from test_text import test_text_with_arrow_annotation_get_window_extent
```



---
## test_arrow_annotation_get_window_extent
```python
from test_text import test_arrow_annotation_get_window_extent
```



---
## test_empty_annotation_get_window_extent
```python
from test_text import test_empty_annotation_get_window_extent
```



---
## test_basic_wrap
```python
from test_text import test_basic_wrap
```



---
## test_font_wrap
```python
from test_text import test_font_wrap
```



---
## find_matplotlib_font
```python
from test_text import find_matplotlib_font
```



---
## draw_box
```python
from test_text import draw_box
```



---
## call
```python
from test_text import call
```



---
## __name__
```python
from test_units import __name__
```



---
## Quantity
```python
from test_units import Quantity
```



---
## quantity_converter
```python
from test_units import quantity_converter
```



---
## test_numpy_facade
```python
from test_units import test_numpy_facade
```



---
## test_plot_masked_units
```python
from test_units import test_plot_masked_units
```



---
## test_empty_set_limits_with_units
```python
from test_units import test_empty_set_limits_with_units
```



---
## test_jpl_bar_units
```python
from test_units import test_jpl_bar_units
```



---
## test_jpl_barh_units
```python
from test_units import test_jpl_barh_units
```



---
## test_jpl_datetime_units_consistent
```python
from test_units import test_jpl_datetime_units_consistent
```



---
## test_empty_arrays
```python
from test_units import test_empty_arrays
```



---
## test_scatter_element0_masked
```python
from test_units import test_scatter_element0_masked
```



---
## test_errorbar_mixed_units
```python
from test_units import test_errorbar_mixed_units
```



---
## test_subclass
```python
from test_units import test_subclass
```



---
## test_shared_axis_quantity
```python
from test_units import test_shared_axis_quantity
```



---
## test_shared_axis_datetime
```python
from test_units import test_shared_axis_datetime
```



---
## test_shared_axis_categorical
```python
from test_units import test_shared_axis_categorical
```



---
## test_empty_default_limits
```python
from test_units import test_empty_default_limits
```



---
## Kernel
```python
from test_units import Kernel
```



---
## test_plot_kernel
```python
from test_units import test_plot_kernel
```



---
## __init__
```python
from test_units import __init__
```



---
## to
```python
from test_units import to
```



---
## __copy__
```python
from test_units import __copy__
```



---
## __getattr__
```python
from test_units import __getattr__
```



---
## __getitem__
```python
from test_units import __getitem__
```



---
## __array__
```python
from test_units import __array__
```



---
## convert
```python
from test_units import convert
```



---
## default_units
```python
from test_units import default_units
```



---
## subdate
```python
from test_units import subdate
```



---
## shape
```python
from test_units import shape
```



---
## __name__
```python
from test_dviread import __name__
```



---
## test_PsfontsMap
```python
from test_dviread import test_PsfontsMap
```



---
## test_dviread
```python
from test_dviread import test_dviread
```



---
## __name__
```python
from test_widgets import __name__
```



---
## ax
```python
from test_widgets import ax
```



---
## test_save_blitted_widget_as_pdf
```python
from test_widgets import test_save_blitted_widget_as_pdf
```



---
## test_rectangle_selector
```python
from test_widgets import test_rectangle_selector
```



---
## test_rectangle_minspan
```python
from test_widgets import test_rectangle_minspan
```



---
## test_deprecation_selector_visible_attribute
```python
from test_widgets import test_deprecation_selector_visible_attribute
```



---
## test_rectangle_drag
```python
from test_widgets import test_rectangle_drag
```



---
## test_rectangle_selector_set_props_handle_props
```python
from test_widgets import test_rectangle_selector_set_props_handle_props
```



---
## test_rectangle_resize
```python
from test_widgets import test_rectangle_resize
```



---
## test_rectangle_add_state
```python
from test_widgets import test_rectangle_add_state
```



---
## test_rectangle_resize_center
```python
from test_widgets import test_rectangle_resize_center
```



---
## test_rectangle_resize_square
```python
from test_widgets import test_rectangle_resize_square
```



---
## test_rectangle_resize_square_center
```python
from test_widgets import test_rectangle_resize_square_center
```



---
## test_rectangle_rotate
```python
from test_widgets import test_rectangle_rotate
```



---
## test_rectangle_add_remove_set
```python
from test_widgets import test_rectangle_add_remove_set
```



---
## test_rectangle_resize_square_center_aspect
```python
from test_widgets import test_rectangle_resize_square_center_aspect
```



---
## test_ellipse
```python
from test_widgets import test_ellipse
```

For ellipse, test out the key modifiers

---
## test_rectangle_handles
```python
from test_widgets import test_rectangle_handles
```



---
## test_rectangle_selector_onselect
```python
from test_widgets import test_rectangle_selector_onselect
```



---
## test_rectangle_selector_ignore_outside
```python
from test_widgets import test_rectangle_selector_ignore_outside
```



---
## test_span_selector
```python
from test_widgets import test_span_selector
```



---
## test_span_selector_onselect
```python
from test_widgets import test_span_selector_onselect
```



---
## test_span_selector_ignore_outside
```python
from test_widgets import test_span_selector_ignore_outside
```



---
## test_span_selector_drag
```python
from test_widgets import test_span_selector_drag
```



---
## test_span_selector_direction
```python
from test_widgets import test_span_selector_direction
```



---
## test_span_selector_set_props_handle_props
```python
from test_widgets import test_span_selector_set_props_handle_props
```



---
## test_selector_clear
```python
from test_widgets import test_selector_clear
```



---
## test_selector_clear_method
```python
from test_widgets import test_selector_clear_method
```



---
## test_span_selector_add_state
```python
from test_widgets import test_span_selector_add_state
```



---
## test_tool_line_handle
```python
from test_widgets import test_tool_line_handle
```



---
## test_span_selector_bound
```python
from test_widgets import test_span_selector_bound
```



---
## test_span_selector_animated_artists_callback
```python
from test_widgets import test_span_selector_animated_artists_callback
```

Check that the animated artists changed in callbacks are updated.

---
## test_snapping_values_span_selector
```python
from test_widgets import test_snapping_values_span_selector
```



---
## test_span_selector_snap
```python
from test_widgets import test_span_selector_snap
```



---
## test_span_selector_extents
```python
from test_widgets import test_span_selector_extents
```



---
## test_lasso_selector
```python
from test_widgets import test_lasso_selector
```



---
## test_lasso_selector_set_props
```python
from test_widgets import test_lasso_selector_set_props
```



---
## test_lasso_set_props
```python
from test_widgets import test_lasso_set_props
```



---
## test_CheckButtons
```python
from test_widgets import test_CheckButtons
```



---
## test_TextBox
```python
from test_widgets import test_TextBox
```



---
## test_RadioButtons
```python
from test_widgets import test_RadioButtons
```



---
## test_check_radio_buttons_image
```python
from test_widgets import test_check_radio_buttons_image
```



---
## test_radio_buttons
```python
from test_widgets import test_radio_buttons
```



---
## test_radio_buttons_props
```python
from test_widgets import test_radio_buttons_props
```



---
## test_radio_button_active_conflict
```python
from test_widgets import test_radio_button_active_conflict
```



---
## test_radio_buttons_activecolor_change
```python
from test_widgets import test_radio_buttons_activecolor_change
```



---
## test_check_buttons
```python
from test_widgets import test_check_buttons
```



---
## test_check_button_props
```python
from test_widgets import test_check_button_props
```



---
## test_slider_slidermin_slidermax_invalid
```python
from test_widgets import test_slider_slidermin_slidermax_invalid
```



---
## test_slider_slidermin_slidermax
```python
from test_widgets import test_slider_slidermin_slidermax
```



---
## test_slider_valmin_valmax
```python
from test_widgets import test_slider_valmin_valmax
```



---
## test_slider_valstep_snapping
```python
from test_widgets import test_slider_valstep_snapping
```



---
## test_slider_horizontal_vertical
```python
from test_widgets import test_slider_horizontal_vertical
```



---
## test_slider_reset
```python
from test_widgets import test_slider_reset
```



---
## test_range_slider
```python
from test_widgets import test_range_slider
```



---
## test_range_slider_same_init_values
```python
from test_widgets import test_range_slider_same_init_values
```



---
## check_polygon_selector
```python
from test_widgets import check_polygon_selector
```

Helper function to test Polygon Selector.

Parameters
----------
event_sequence : list of tuples (etype, dict())
    A sequence of events to perform. The sequence is a list of tuples
    where the first element of the tuple is an etype (e.g., 'onmove',
    'press', etc.), and the second element of the tuple is a dictionary of
     the arguments for the event (e.g., xdata=5, key='shift', etc.).
expected_result : list of vertices (xdata, ydata)
    The list of vertices that are expected to result from the event
    sequence.
selections_count : int
    Wait for the tool to call its `onselect` function `selections_count`
    times, before comparing the result to the `expected_result`
**kwargs
    Keyword arguments are passed to PolygonSelector.

---
## polygon_place_vertex
```python
from test_widgets import polygon_place_vertex
```



---
## polygon_remove_vertex
```python
from test_widgets import polygon_remove_vertex
```



---
## test_polygon_selector
```python
from test_widgets import test_polygon_selector
```



---
## test_polygon_selector_set_props_handle_props
```python
from test_widgets import test_polygon_selector_set_props_handle_props
```



---
## test_rect_visibility
```python
from test_widgets import test_rect_visibility
```



---
## test_polygon_selector_remove
```python
from test_widgets import test_polygon_selector_remove
```



---
## test_polygon_selector_remove_first_point
```python
from test_widgets import test_polygon_selector_remove_first_point
```



---
## test_polygon_selector_redraw
```python
from test_widgets import test_polygon_selector_redraw
```



---
## test_polygon_selector_verts_setter
```python
from test_widgets import test_polygon_selector_verts_setter
```



---
## test_polygon_selector_box
```python
from test_widgets import test_polygon_selector_box
```



---
## test_polygon_selector_clear_method
```python
from test_widgets import test_polygon_selector_clear_method
```



---
## test_MultiCursor
```python
from test_widgets import test_MultiCursor
```



---
## mean
```python
from test_widgets import mean
```



---
## onselect
```python
from test_widgets import onselect
```



---
## handle_positions
```python
from test_widgets import handle_positions
```



---
## __name__
```python
from test_preprocess_data import __name__
```



---
## plot_func
```python
from test_preprocess_data import plot_func
```



---
## test_compiletime_checks
```python
from test_preprocess_data import test_compiletime_checks
```

Test decorator invocations -> no replacements.

---
## test_function_call_without_data
```python
from test_preprocess_data import test_function_call_without_data
```

Test without data -> no replacements.

---
## test_function_call_with_dict_input
```python
from test_preprocess_data import test_function_call_with_dict_input
```

Tests with dict input, unpacking via preprocess_pipeline

---
## test_function_call_with_dict_data
```python
from test_preprocess_data import test_function_call_with_dict_data
```

Test with dict data -> label comes from the value of 'x' parameter.

---
## test_function_call_with_dict_data_not_in_data
```python
from test_preprocess_data import test_function_call_with_dict_data_not_in_data
```

Test the case that one var is not in data -> half replaces, half kept

---
## test_function_call_with_pandas_data
```python
from test_preprocess_data import test_function_call_with_pandas_data
```

Test with pandas dataframe -> label comes from ``data["col"].name``.

---
## test_function_call_replace_all
```python
from test_preprocess_data import test_function_call_replace_all
```

Test without a "replace_names" argument, all vars should be replaced.

---
## test_no_label_replacements
```python
from test_preprocess_data import test_no_label_replacements
```

Test with "label_namer=None" -> no label replacement at all.

---
## test_more_args_than_pos_parameter
```python
from test_preprocess_data import test_more_args_than_pos_parameter
```



---
## test_docstring_addition
```python
from test_preprocess_data import test_docstring_addition
```



---
## test_data_parameter_replacement
```python
from test_preprocess_data import test_data_parameter_replacement
```

Test that the docstring contains the correct *data* parameter stub
for all methods that we run _preprocess_data() on.

---
## TestPlotTypes
```python
from test_preprocess_data import TestPlotTypes
```



---
## func
```python
from test_preprocess_data import func
```



---
## func_args
```python
from test_preprocess_data import func_args
```



---
## func_kwargs
```python
from test_preprocess_data import func_kwargs
```



---
## func_no_ax_args
```python
from test_preprocess_data import func_no_ax_args
```



---
## func_replace_all
```python
from test_preprocess_data import func_replace_all
```



---
## func_no_label
```python
from test_preprocess_data import func_no_label
```



---
## funcy
```python
from test_preprocess_data import funcy
```

Parameters
----------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER

---
## test_dict_unpack
```python
from test_preprocess_data import test_dict_unpack
```



---
## test_data_kwarg
```python
from test_preprocess_data import test_data_kwarg
```



---
## __name__
```python
from test_constrainedlayout import __name__
```



---
## example_plot
```python
from test_constrainedlayout import example_plot
```



---
## example_pcolor
```python
from test_constrainedlayout import example_pcolor
```



---
## test_constrained_layout1
```python
from test_constrainedlayout import test_constrained_layout1
```

Test constrained_layout for a single subplot

---
## test_constrained_layout2
```python
from test_constrainedlayout import test_constrained_layout2
```

Test constrained_layout for 2x2 subplots

---
## test_constrained_layout3
```python
from test_constrainedlayout import test_constrained_layout3
```

Test constrained_layout for colorbars with subplots

---
## test_constrained_layout4
```python
from test_constrainedlayout import test_constrained_layout4
```

Test constrained_layout for a single colorbar with subplots

---
## test_constrained_layout5
```python
from test_constrainedlayout import test_constrained_layout5
```

Test constrained_layout for a single colorbar with subplots,
colorbar bottom

---
## test_constrained_layout6
```python
from test_constrainedlayout import test_constrained_layout6
```

Test constrained_layout for nested gridspecs

---
## test_identical_subgridspec
```python
from test_constrainedlayout import test_identical_subgridspec
```



---
## test_constrained_layout7
```python
from test_constrainedlayout import test_constrained_layout7
```

Test for proper warning if fig not set in GridSpec

---
## test_constrained_layout8
```python
from test_constrainedlayout import test_constrained_layout8
```

Test for gridspecs that are not completely full

---
## test_constrained_layout9
```python
from test_constrainedlayout import test_constrained_layout9
```

Test for handling suptitle and for sharex and sharey

---
## test_constrained_layout10
```python
from test_constrainedlayout import test_constrained_layout10
```

Test for handling legend outside axis

---
## test_constrained_layout11
```python
from test_constrainedlayout import test_constrained_layout11
```

Test for multiple nested gridspecs

---
## test_constrained_layout11rat
```python
from test_constrainedlayout import test_constrained_layout11rat
```

Test for multiple nested gridspecs with width_ratios

---
## test_constrained_layout12
```python
from test_constrainedlayout import test_constrained_layout12
```

Test that very unbalanced labeling still works.

---
## test_constrained_layout13
```python
from test_constrainedlayout import test_constrained_layout13
```

Test that padding works.

---
## test_constrained_layout14
```python
from test_constrainedlayout import test_constrained_layout14
```

Test that padding works.

---
## test_constrained_layout15
```python
from test_constrainedlayout import test_constrained_layout15
```

Test that rcparams work.

---
## test_constrained_layout16
```python
from test_constrainedlayout import test_constrained_layout16
```

Test ax.set_position.

---
## test_constrained_layout17
```python
from test_constrainedlayout import test_constrained_layout17
```

Test uneven gridspecs

---
## test_constrained_layout18
```python
from test_constrainedlayout import test_constrained_layout18
```

Test twinx

---
## test_constrained_layout19
```python
from test_constrainedlayout import test_constrained_layout19
```

Test twiny

---
## test_constrained_layout20
```python
from test_constrainedlayout import test_constrained_layout20
```

Smoke test cl does not mess up added Axes

---
## test_constrained_layout21
```python
from test_constrainedlayout import test_constrained_layout21
```

#11035: repeated calls to suptitle should not alter the layout

---
## test_constrained_layout22
```python
from test_constrainedlayout import test_constrained_layout22
```

#11035: suptitle should not be include in CL if manually positioned

---
## test_constrained_layout23
```python
from test_constrainedlayout import test_constrained_layout23
```

Comment in #11035: suptitle used to cause an exception when
reusing a figure w/ CL with ``clear=True``.

---
## test_colorbar_location
```python
from test_constrainedlayout import test_colorbar_location
```

Test that colorbar handling is as expected for various complicated
cases...

---
## test_hidden_axes
```python
from test_constrainedlayout import test_hidden_axes
```



---
## test_colorbar_align
```python
from test_constrainedlayout import test_colorbar_align
```



---
## test_colorbars_no_overlapV
```python
from test_constrainedlayout import test_colorbars_no_overlapV
```



---
## test_colorbars_no_overlapH
```python
from test_constrainedlayout import test_colorbars_no_overlapH
```



---
## test_manually_set_position
```python
from test_constrainedlayout import test_manually_set_position
```



---
## test_bboxtight
```python
from test_constrainedlayout import test_bboxtight
```



---
## test_bbox
```python
from test_constrainedlayout import test_bbox
```



---
## test_align_labels
```python
from test_constrainedlayout import test_align_labels
```

Tests for a bug in which constrained layout and align_ylabels on
three unevenly sized subplots, one of whose y tick labels include
negative numbers, drives the non-negative subplots' y labels off
the edge of the plot

---
## test_suplabels
```python
from test_constrainedlayout import test_suplabels
```



---
## test_gridspec_addressing
```python
from test_constrainedlayout import test_gridspec_addressing
```



---
## test_discouraged_api
```python
from test_constrainedlayout import test_discouraged_api
```



---
## test_kwargs
```python
from test_constrainedlayout import test_kwargs
```



---
## test_rect
```python
from test_constrainedlayout import test_rect
```



---
## test_compressed1
```python
from test_constrainedlayout import test_compressed1
```



---
## test_set_constrained_layout
```python
from test_constrainedlayout import test_set_constrained_layout
```



---
## test_constrained_toggle
```python
from test_constrainedlayout import test_constrained_toggle
```



---
## test_layout_leak
```python
from test_constrainedlayout import test_layout_leak
```



---
## __name__
```python
from test_backend_nbagg import __name__
```



---
## test_ipynb
```python
from test_backend_nbagg import test_ipynb
```



---
## __name__
```python
from test_backend_macosx import __name__
```



---
## test_cached_renderer
```python
from test_backend_macosx import test_cached_renderer
```



---
## test_savefig_rcparam
```python
from test_backend_macosx import test_savefig_rcparam
```



---
## test_ipython
```python
from test_backend_macosx import test_ipython
```



---
## new_choose_save_file
```python
from test_backend_macosx import new_choose_save_file
```



---
## __name__
```python
from test_patheffects import __name__
```



---
## test_patheffect1
```python
from test_patheffects import test_patheffect1
```



---
## test_patheffect2
```python
from test_patheffects import test_patheffect2
```



---
## test_patheffect3
```python
from test_patheffects import test_patheffect3
```



---
## test_patheffects_stroked_text
```python
from test_patheffects import test_patheffects_stroked_text
```



---
## test_PathEffect_points_to_pixels
```python
from test_patheffects import test_PathEffect_points_to_pixels
```



---
## test_SimplePatchShadow_offset
```python
from test_patheffects import test_SimplePatchShadow_offset
```



---
## test_collection
```python
from test_patheffects import test_collection
```



---
## test_tickedstroke
```python
from test_patheffects import test_tickedstroke
```



---
## test_patheffects_spaces_and_newlines
```python
from test_patheffects import test_patheffects_spaces_and_newlines
```



---
## test_patheffects_overridden_methods_open_close_group
```python
from test_patheffects import test_patheffects_overridden_methods_open_close_group
```



---
## CustomRenderer
```python
from test_patheffects import CustomRenderer
```



---
## __init__
```python
from test_patheffects import __init__
```



---
## open_group
```python
from test_patheffects import open_group
```



---
## close_group
```python
from test_patheffects import close_group
```



---
## __name__
```python
from test_patches import __name__
```

Tests specific to the patches module.

---
## test_Polygon_close
```python
from test_patches import test_Polygon_close
```



---
## test_corner_center
```python
from test_patches import test_corner_center
```



---
## test_ellipse_vertices
```python
from test_patches import test_ellipse_vertices
```



---
## test_rotate_rect
```python
from test_patches import test_rotate_rect
```



---
## test_rotate_rect_draw
```python
from test_patches import test_rotate_rect_draw
```



---
## test_dash_offset_patch_draw
```python
from test_patches import test_dash_offset_patch_draw
```



---
## test_negative_rect
```python
from test_patches import test_negative_rect
```



---
## test_clip_to_bbox
```python
from test_patches import test_clip_to_bbox
```



---
## test_patch_alpha_coloring
```python
from test_patches import test_patch_alpha_coloring
```

Test checks that the patch and collection are rendered with the specified
alpha values in their facecolor and edgecolor.

---
## test_patch_alpha_override
```python
from test_patches import test_patch_alpha_override
```



---
## test_patch_color_none
```python
from test_patches import test_patch_color_none
```



---
## test_patch_custom_linestyle
```python
from test_patches import test_patch_custom_linestyle
```



---
## test_patch_linestyle_accents
```python
from test_patches import test_patch_linestyle_accents
```



---
## test_patch_linestyle_none
```python
from test_patches import test_patch_linestyle_none
```



---
## test_wedge_movement
```python
from test_patches import test_wedge_movement
```



---
## test_wedge_range
```python
from test_patches import test_wedge_range
```



---
## test_patch_str
```python
from test_patches import test_patch_str
```

Check that patches have nice and working `str` representation.

Note that the logic is that `__str__` is defined such that:
str(eval(str(p))) == str(p)

---
## test_multi_color_hatch
```python
from test_patches import test_multi_color_hatch
```



---
## test_units_rectangle
```python
from test_patches import test_units_rectangle
```



---
## test_connection_patch
```python
from test_patches import test_connection_patch
```



---
## test_connection_patch_fig
```python
from test_patches import test_connection_patch_fig
```



---
## test_datetime_rectangle
```python
from test_patches import test_datetime_rectangle
```



---
## test_datetime_datetime_fails
```python
from test_patches import test_datetime_datetime_fails
```



---
## test_contains_point
```python
from test_patches import test_contains_point
```



---
## test_contains_points
```python
from test_patches import test_contains_points
```



---
## test_shadow
```python
from test_patches import test_shadow
```



---
## test_fancyarrow_units
```python
from test_patches import test_fancyarrow_units
```



---
## test_fancyarrow_setdata
```python
from test_patches import test_fancyarrow_setdata
```



---
## test_large_arc
```python
from test_patches import test_large_arc
```



---
## test_rotated_arcs
```python
from test_patches import test_rotated_arcs
```



---
## test_fancyarrow_shape_error
```python
from test_patches import test_fancyarrow_shape_error
```



---
## test_boxstyle_errors
```python
from test_patches import test_boxstyle_errors
```



---
## test_annulus
```python
from test_patches import test_annulus
```



---
## test_annulus_setters
```python
from test_patches import test_annulus_setters
```



---
## test_annulus_setters2
```python
from test_patches import test_annulus_setters2
```



---
## test_degenerate_polygon
```python
from test_patches import test_degenerate_polygon
```



---
## test_color_override_warning
```python
from test_patches import test_color_override_warning
```



---
## test_empty_verts
```python
from test_patches import test_empty_verts
```



---
## test_default_antialiased
```python
from test_patches import test_default_antialiased
```



---
## test_default_linestyle
```python
from test_patches import test_default_linestyle
```



---
## test_default_capstyle
```python
from test_patches import test_default_capstyle
```



---
## test_default_joinstyle
```python
from test_patches import test_default_joinstyle
```



---
## test_autoscale_arc
```python
from test_patches import test_autoscale_arc
```



---
## test_arc_in_collection
```python
from test_patches import test_arc_in_collection
```



---
## test_modifying_arc
```python
from test_patches import test_modifying_arc
```



---
## test_arrow_set_data
```python
from test_patches import test_arrow_set_data
```



---
## __name__
```python
from test_rcparams import __name__
```



---
## test_rcparams
```python
from test_rcparams import test_rcparams
```



---
## test_RcParams_class
```python
from test_rcparams import test_RcParams_class
```



---
## test_rcparams_update
```python
from test_rcparams import test_rcparams_update
```



---
## test_rcparams_init
```python
from test_rcparams import test_rcparams_init
```



---
## test_nargs_cycler
```python
from test_rcparams import test_nargs_cycler
```



---
## test_Bug_2543
```python
from test_rcparams import test_Bug_2543
```



---
## test_legend_colors
```python
from test_rcparams import test_legend_colors
```



---
## test_mfc_rcparams
```python
from test_rcparams import test_mfc_rcparams
```



---
## test_mec_rcparams
```python
from test_rcparams import test_mec_rcparams
```



---
## test_axes_titlecolor_rcparams
```python
from test_rcparams import test_axes_titlecolor_rcparams
```



---
## test_Issue_1713
```python
from test_rcparams import test_Issue_1713
```



---
## test_animation_frame_formats
```python
from test_rcparams import test_animation_frame_formats
```



---
## generate_validator_testcases
```python
from test_rcparams import generate_validator_testcases
```



---
## test_validator_valid
```python
from test_rcparams import test_validator_valid
```



---
## test_validator_invalid
```python
from test_rcparams import test_validator_invalid
```



---
## test_validate_fontweight
```python
from test_rcparams import test_validate_fontweight
```



---
## test_validate_fontstretch
```python
from test_rcparams import test_validate_fontstretch
```



---
## test_keymaps
```python
from test_rcparams import test_keymaps
```



---
## test_no_backend_reset_rccontext
```python
from test_rcparams import test_no_backend_reset_rccontext
```



---
## test_rcparams_reset_after_fail
```python
from test_rcparams import test_rcparams_reset_after_fail
```



---
## test_backend_fallback_headless
```python
from test_rcparams import test_backend_fallback_headless
```



---
## test_backend_fallback_headful
```python
from test_rcparams import test_backend_fallback_headful
```



---
## test_deprecation
```python
from test_rcparams import test_deprecation
```



---
## test_rcparams_legend_loc
```python
from test_rcparams import test_rcparams_legend_loc
```



---
## test_rcparams_legend_loc_from_file
```python
from test_rcparams import test_rcparams_legend_loc_from_file
```



---
## test_validate_sketch
```python
from test_rcparams import test_validate_sketch
```



---
## test_validate_sketch_error
```python
from test_rcparams import test_validate_sketch_error
```



---
## test_rcparams_path_sketch_from_file
```python
from test_rcparams import test_rcparams_path_sketch_from_file
```



---
## func
```python
from test_rcparams import func
```



---
## __name__
```python
from test_backend_tools import __name__
```



---
## test_format_shortcut
```python
from test_backend_tools import test_format_shortcut
```



---
## __name__
```python
from test_agg_filter import __name__
```



---
## test_agg_filter_alpha
```python
from test_agg_filter import test_agg_filter_alpha
```



---
## manual_alpha
```python
from test_agg_filter import manual_alpha
```



---
## __name__
```python
from test_style import __name__
```



---
## temp_style
```python
from test_style import temp_style
```

Context manager to create a style sheet in a temporary directory.

---
## test_invalid_rc_warning_includes_filename
```python
from test_style import test_invalid_rc_warning_includes_filename
```



---
## test_available
```python
from test_style import test_available
```



---
## test_use
```python
from test_style import test_use
```



---
## test_use_url
```python
from test_style import test_use_url
```



---
## test_single_path
```python
from test_style import test_single_path
```



---
## test_context
```python
from test_style import test_context
```



---
## test_context_with_dict
```python
from test_style import test_context_with_dict
```



---
## test_context_with_dict_after_namedstyle
```python
from test_style import test_context_with_dict_after_namedstyle
```



---
## test_context_with_dict_before_namedstyle
```python
from test_style import test_context_with_dict_before_namedstyle
```



---
## test_context_with_union_of_dict_and_namedstyle
```python
from test_style import test_context_with_union_of_dict_and_namedstyle
```



---
## test_context_with_badparam
```python
from test_style import test_context_with_badparam
```



---
## test_alias
```python
from test_style import test_alias
```



---
## test_xkcd_no_cm
```python
from test_style import test_xkcd_no_cm
```



---
## test_xkcd_cm
```python
from test_style import test_xkcd_cm
```



---
## test_up_to_date_blacklist
```python
from test_style import test_up_to_date_blacklist
```



---
## test_style_from_module
```python
from test_style import test_style_from_module
```



---
## __name__
```python
from test_category import __name__
```



---
## TestUnitData
```python
from test_category import TestUnitData
```



---
## FakeAxis
```python
from test_category import FakeAxis
```



---
## TestStrCategoryConverter
```python
from test_category import TestStrCategoryConverter
```

Based on the pandas conversion and factorization tests:

ref: /pandas/tseries/tests/test_converter.py
     /pandas/tests/test_algos.py:TestFactorize

---
## TestStrCategoryLocator
```python
from test_category import TestStrCategoryLocator
```



---
## TestStrCategoryFormatter
```python
from test_category import TestStrCategoryFormatter
```



---
## axis_test
```python
from test_category import axis_test
```



---
## TestPlotBytes
```python
from test_category import TestPlotBytes
```



---
## TestPlotNumlike
```python
from test_category import TestPlotNumlike
```



---
## TestPlotTypes
```python
from test_category import TestPlotTypes
```



---
## test_overriding_units_in_plot
```python
from test_category import test_overriding_units_in_plot
```



---
## test_no_deprecation_on_empty_data
```python
from test_category import test_no_deprecation_on_empty_data
```

Smoke test to check that no deprecation warning is emitted. See #22640.

---
## test_hist
```python
from test_category import test_hist
```



---
## test_set_lim
```python
from test_category import test_set_lim
```



---
## test_unit
```python
from test_category import test_unit
```



---
## test_update
```python
from test_category import test_update
```



---
## test_non_string_fails
```python
from test_category import test_non_string_fails
```



---
## test_non_string_update_fails
```python
from test_category import test_non_string_update_fails
```



---
## __init__
```python
from test_category import __init__
```



---
## mock_axis
```python
from test_category import mock_axis
```



---
## test_convert
```python
from test_category import test_convert
```



---
## test_convert_one_string
```python
from test_category import test_convert_one_string
```



---
## test_convert_fail
```python
from test_category import test_convert_fail
```



---
## test_axisinfo
```python
from test_category import test_axisinfo
```



---
## test_default_units
```python
from test_category import test_default_units
```



---
## test_StrCategoryLocator
```python
from test_category import test_StrCategoryLocator
```



---
## test_StrCategoryLocatorPlot
```python
from test_category import test_StrCategoryLocatorPlot
```



---
## test_StrCategoryFormatter
```python
from test_category import test_StrCategoryFormatter
```



---
## test_StrCategoryFormatterPlot
```python
from test_category import test_StrCategoryFormatterPlot
```



---
## test_plot_bytes
```python
from test_category import test_plot_bytes
```



---
## test_plot_numlike
```python
from test_category import test_plot_numlike
```



---
## test_plot_unicode
```python
from test_category import test_plot_unicode
```



---
## test_data
```python
from test_category import test_data
```



---
## test_plot_xaxis
```python
from test_category import test_plot_xaxis
```



---
## test_plot_yaxis
```python
from test_category import test_plot_yaxis
```



---
## test_plot_xyaxis
```python
from test_category import test_plot_xyaxis
```



---
## test_update_plot
```python
from test_category import test_update_plot
```



---
## test_mixed_type_exception
```python
from test_category import test_mixed_type_exception
```



---
## test_mixed_type_update_exception
```python
from test_category import test_mixed_type_update_exception
```



---
## __name__
```python
from test_offsetbox import __name__
```



---
## test_offsetbox_clipping
```python
from test_offsetbox import test_offsetbox_clipping
```



---
## test_offsetbox_clip_children
```python
from test_offsetbox import test_offsetbox_clip_children
```



---
## test_offsetbox_loc_codes
```python
from test_offsetbox import test_offsetbox_loc_codes
```



---
## test_expand_with_tight_layout
```python
from test_offsetbox import test_expand_with_tight_layout
```



---
## test_get_packed_offsets
```python
from test_offsetbox import test_get_packed_offsets
```



---
## test_get_packed_offsets_fixed
```python
from test_offsetbox import test_get_packed_offsets_fixed
```



---
## test_get_packed_offsets_expand
```python
from test_offsetbox import test_get_packed_offsets_expand
```



---
## test_get_packed_offsets_equal
```python
from test_offsetbox import test_get_packed_offsets_equal
```



---
## test_get_packed_offsets_equal_total_none_sep_none
```python
from test_offsetbox import test_get_packed_offsets_equal_total_none_sep_none
```



---
## test_picking
```python
from test_offsetbox import test_picking
```



---
## test_anchoredtext_horizontal_alignment
```python
from test_offsetbox import test_anchoredtext_horizontal_alignment
```



---
## test_annotationbbox_extents
```python
from test_offsetbox import test_annotationbbox_extents
```



---
## test_zorder
```python
from test_offsetbox import test_zorder
```



---
## test_arrowprops_copied
```python
from test_offsetbox import test_arrowprops_copied
```



---
## test_packers
```python
from test_offsetbox import test_packers
```



---
## test_paddedbox_default_values
```python
from test_offsetbox import test_paddedbox_default_values
```



---
## test_annotationbbox_properties
```python
from test_offsetbox import test_annotationbbox_properties
```



---
## test_textarea_properties
```python
from test_offsetbox import test_textarea_properties
```



---
## test_textarea_set_text
```python
from test_offsetbox import test_textarea_set_text
```



---
## test_paddedbox
```python
from test_offsetbox import test_paddedbox
```



---
## test_remove_draggable
```python
from test_offsetbox import test_remove_draggable
```



---
## test_draggable_in_subfigure
```python
from test_offsetbox import test_draggable_in_subfigure
```



---
## __name__
```python
from test_contour import __name__
```



---
## _maybe_split_collections
```python
from test_contour import _maybe_split_collections
```



---
## test_contour_shape_1d_valid
```python
from test_contour import test_contour_shape_1d_valid
```



---
## test_contour_shape_2d_valid
```python
from test_contour import test_contour_shape_2d_valid
```



---
## test_contour_shape_error
```python
from test_contour import test_contour_shape_error
```



---
## test_contour_no_valid_levels
```python
from test_contour import test_contour_no_valid_levels
```



---
## test_contour_Nlevels
```python
from test_contour import test_contour_Nlevels
```



---
## test_contour_set_paths
```python
from test_contour import test_contour_set_paths
```



---
## test_contour_manual_labels
```python
from test_contour import test_contour_manual_labels
```



---
## test_contour_manual_moveto
```python
from test_contour import test_contour_manual_moveto
```



---
## test_contour_label_with_disconnected_segments
```python
from test_contour import test_contour_label_with_disconnected_segments
```



---
## test_given_colors_levels_and_extends
```python
from test_contour import test_given_colors_levels_and_extends
```



---
## test_log_locator_levels
```python
from test_contour import test_log_locator_levels
```



---
## test_contour_datetime_axis
```python
from test_contour import test_contour_datetime_axis
```



---
## test_labels
```python
from test_contour import test_labels
```



---
## test_label_contour_start
```python
from test_contour import test_label_contour_start
```



---
## test_corner_mask
```python
from test_contour import test_corner_mask
```



---
## test_contourf_decreasing_levels
```python
from test_contour import test_contourf_decreasing_levels
```



---
## test_contourf_symmetric_locator
```python
from test_contour import test_contourf_symmetric_locator
```



---
## test_circular_contour_warning
```python
from test_contour import test_circular_contour_warning
```



---
## test_clabel_zorder
```python
from test_contour import test_clabel_zorder
```



---
## test_clabel_with_large_spacing
```python
from test_contour import test_clabel_with_large_spacing
```



---
## test_contourf_log_extension
```python
from test_contour import test_contourf_log_extension
```



---
## test_contour_addlines
```python
from test_contour import test_contour_addlines
```



---
## test_contour_uneven
```python
from test_contour import test_contour_uneven
```



---
## test_contour_linewidth
```python
from test_contour import test_contour_linewidth
```



---
## test_label_nonagg
```python
from test_contour import test_label_nonagg
```



---
## test_contour_closed_line_loop
```python
from test_contour import test_contour_closed_line_loop
```



---
## test_quadcontourset_reuse
```python
from test_contour import test_quadcontourset_reuse
```



---
## test_contour_manual
```python
from test_contour import test_contour_manual
```



---
## test_contour_line_start_on_corner_edge
```python
from test_contour import test_contour_line_start_on_corner_edge
```



---
## test_find_nearest_contour
```python
from test_contour import test_find_nearest_contour
```



---
## test_find_nearest_contour_no_filled
```python
from test_contour import test_find_nearest_contour_no_filled
```



---
## test_contour_autolabel_beyond_powerlimits
```python
from test_contour import test_contour_autolabel_beyond_powerlimits
```



---
## test_contourf_legend_elements
```python
from test_contour import test_contourf_legend_elements
```



---
## test_contour_legend_elements
```python
from test_contour import test_contour_legend_elements
```



---
## test_algorithm_name
```python
from test_contour import test_algorithm_name
```



---
## test_algorithm_supports_corner_mask
```python
from test_contour import test_algorithm_supports_corner_mask
```



---
## test_all_algorithms
```python
from test_contour import test_all_algorithms
```



---
## test_subfigure_clabel
```python
from test_contour import test_subfigure_clabel
```



---
## test_linestyles
```python
from test_contour import test_linestyles
```



---
## test_negative_linestyles
```python
from test_contour import test_negative_linestyles
```



---
## test_contour_remove
```python
from test_contour import test_contour_remove
```



---
## test_contour_no_args
```python
from test_contour import test_contour_no_args
```



---
## test_contour_clip_path
```python
from test_contour import test_contour_clip_path
```



---
## test_bool_autolevel
```python
from test_contour import test_bool_autolevel
```



---
## test_all_nan
```python
from test_contour import test_all_nan
```



---
## test_allsegs_allkinds
```python
from test_contour import test_allsegs_allkinds
```



---
## test_deprecated_apis
```python
from test_contour import test_deprecated_apis
```



---
## __name__
```python
from test_triangulation import __name__
```



---
## TestTriangulationParams
```python
from test_triangulation import TestTriangulationParams
```



---
## test_extract_triangulation_positional_mask
```python
from test_triangulation import test_extract_triangulation_positional_mask
```



---
## test_triangulation_init
```python
from test_triangulation import test_triangulation_init
```



---
## test_triangulation_set_mask
```python
from test_triangulation import test_triangulation_set_mask
```



---
## test_delaunay
```python
from test_triangulation import test_delaunay
```



---
## test_delaunay_duplicate_points
```python
from test_triangulation import test_delaunay_duplicate_points
```



---
## test_delaunay_points_in_line
```python
from test_triangulation import test_delaunay_points_in_line
```



---
## test_delaunay_insufficient_points
```python
from test_triangulation import test_delaunay_insufficient_points
```



---
## test_delaunay_robust
```python
from test_triangulation import test_delaunay_robust
```



---
## test_tripcolor
```python
from test_triangulation import test_tripcolor
```



---
## test_tripcolor_color
```python
from test_triangulation import test_tripcolor_color
```



---
## test_tripcolor_clim
```python
from test_triangulation import test_tripcolor_clim
```



---
## test_tripcolor_warnings
```python
from test_triangulation import test_tripcolor_warnings
```



---
## test_no_modify
```python
from test_triangulation import test_no_modify
```



---
## test_trifinder
```python
from test_triangulation import test_trifinder
```



---
## test_triinterp
```python
from test_triangulation import test_triinterp
```



---
## test_triinterpcubic_C1_continuity
```python
from test_triangulation import test_triinterpcubic_C1_continuity
```



---
## test_triinterpcubic_cg_solver
```python
from test_triangulation import test_triinterpcubic_cg_solver
```



---
## test_triinterpcubic_geom_weights
```python
from test_triangulation import test_triinterpcubic_geom_weights
```



---
## test_triinterp_colinear
```python
from test_triangulation import test_triinterp_colinear
```



---
## test_triinterp_transformations
```python
from test_triangulation import test_triinterp_transformations
```



---
## test_tri_smooth_contouring
```python
from test_triangulation import test_tri_smooth_contouring
```



---
## test_tri_smooth_gradient
```python
from test_triangulation import test_tri_smooth_gradient
```



---
## test_tritools
```python
from test_triangulation import test_tritools
```



---
## test_trirefine
```python
from test_triangulation import test_trirefine
```



---
## test_trirefine_masked
```python
from test_triangulation import test_trirefine_masked
```



---
## meshgrid_triangles
```python
from test_triangulation import meshgrid_triangles
```

Return (2*(N-1)**2, 3) array of triangles to mesh (N, N)-point np.meshgrid.

---
## test_triplot_return
```python
from test_triangulation import test_triplot_return
```



---
## test_trirefiner_fortran_contiguous_triangles
```python
from test_triangulation import test_trirefiner_fortran_contiguous_triangles
```



---
## test_qhull_triangle_orientation
```python
from test_triangulation import test_qhull_triangle_orientation
```



---
## test_trianalyzer_mismatched_indices
```python
from test_triangulation import test_trianalyzer_mismatched_indices
```



---
## test_tricontourf_decreasing_levels
```python
from test_triangulation import test_tricontourf_decreasing_levels
```



---
## test_internal_cpp_api
```python
from test_triangulation import test_internal_cpp_api
```



---
## test_qhull_large_offset
```python
from test_triangulation import test_qhull_large_offset
```



---
## test_tricontour_non_finite_z
```python
from test_triangulation import test_tricontour_non_finite_z
```



---
## test_tricontourset_reuse
```python
from test_triangulation import test_tricontourset_reuse
```



---
## test_triplot_with_ls
```python
from test_triangulation import test_triplot_with_ls
```



---
## test_triplot_label
```python
from test_triangulation import test_triplot_label
```



---
## test_tricontour_path
```python
from test_triangulation import test_tricontour_path
```



---
## test_tricontourf_path
```python
from test_triangulation import test_tricontourf_path
```



---
## test_extract_triangulation_params
```python
from test_triangulation import test_extract_triangulation_params
```



---
## tri_contains_point
```python
from test_triangulation import tri_contains_point
```



---
## tris_contain_point
```python
from test_triangulation import tris_contain_point
```



---
## quad
```python
from test_triangulation import quad
```



---
## gradient_quad
```python
from test_triangulation import gradient_quad
```



---
## check_continuity
```python
from test_triangulation import check_continuity
```

Checks the continuity of interpolator (and its derivatives) near
location loc. Can check the value at loc itself if *values* is
provided.

*interpolator* TriInterpolator
*loc* location to test (x0, y0)
*values* (optional) array [z0, dzx0, dzy0] to check the value at *loc*

---
## poisson_sparse_matrix
```python
from test_triangulation import poisson_sparse_matrix
```

Return the sparse, (n*m, n*m) matrix in coo format resulting from the
discretisation of the 2-dimensional Poisson equation according to a
finite difference numerical scheme on a uniform (n, m) grid.

---
## z
```python
from test_triangulation import z
```



---
## dipole_potential
```python
from test_triangulation import dipole_potential
```

An electric dipole potential V.

---
## power
```python
from test_triangulation import power
```



---
## __name__
```python
from test_backend_template import __name__
```

Backend-loading machinery tests, using variations on the template backend.

---
## test_load_template
```python
from test_backend_template import test_load_template
```



---
## test_load_old_api
```python
from test_backend_template import test_load_old_api
```



---
## test_show
```python
from test_backend_template import test_show
```



---
## test_show_old_global_api
```python
from test_backend_template import test_show_old_global_api
```



---
## test_load_case_sensitive
```python
from test_backend_template import test_load_case_sensitive
```



---
## __name__
```python
from test_bbox_tight import __name__
```



---
## test_bbox_inches_tight
```python
from test_bbox_tight import test_bbox_inches_tight
```



---
## test_bbox_inches_tight_suptile_legend
```python
from test_bbox_tight import test_bbox_inches_tight_suptile_legend
```



---
## test_bbox_inches_tight_suptitle_non_default
```python
from test_bbox_tight import test_bbox_inches_tight_suptitle_non_default
```



---
## test_bbox_inches_tight_layout_constrained
```python
from test_bbox_tight import test_bbox_inches_tight_layout_constrained
```



---
## test_bbox_inches_tight_layout_notconstrained
```python
from test_bbox_tight import test_bbox_inches_tight_layout_notconstrained
```



---
## test_bbox_inches_tight_clipping
```python
from test_bbox_tight import test_bbox_inches_tight_clipping
```



---
## test_bbox_inches_tight_raster
```python
from test_bbox_tight import test_bbox_inches_tight_raster
```

Test rasterization with tight_layout

---
## test_only_on_non_finite_bbox
```python
from test_bbox_tight import test_only_on_non_finite_bbox
```



---
## test_tight_pcolorfast
```python
from test_bbox_tight import test_tight_pcolorfast
```



---
## test_noop_tight_bbox
```python
from test_bbox_tight import test_noop_tight_bbox
```



---
## test_bbox_inches_fixed_aspect
```python
from test_bbox_tight import test_bbox_inches_fixed_aspect
```



---
## y_formatter
```python
from test_bbox_tight import y_formatter
```



---
## __name__
```python
from test_png import __name__
```



---
## test_pngsuite
```python
from test_png import test_pngsuite
```



---
## test_truncated_file
```python
from test_png import test_truncated_file
```



---
## test_truncated_buffer
```python
from test_png import test_truncated_buffer
```



---
## __name__
```python
from test_transforms import __name__
```



---
## TestAffine2D
```python
from test_transforms import TestAffine2D
```



---
## test_non_affine_caching
```python
from test_transforms import test_non_affine_caching
```



---
## test_external_transform_api
```python
from test_transforms import test_external_transform_api
```



---
## test_pre_transform_plotting
```python
from test_transforms import test_pre_transform_plotting
```



---
## test_contour_pre_transform_limits
```python
from test_transforms import test_contour_pre_transform_limits
```



---
## test_pcolor_pre_transform_limits
```python
from test_transforms import test_pcolor_pre_transform_limits
```



---
## test_pcolormesh_pre_transform_limits
```python
from test_transforms import test_pcolormesh_pre_transform_limits
```



---
## test_pcolormesh_gouraud_nans
```python
from test_transforms import test_pcolormesh_gouraud_nans
```



---
## test_Affine2D_from_values
```python
from test_transforms import test_Affine2D_from_values
```



---
## test_affine_inverted_invalidated
```python
from test_transforms import test_affine_inverted_invalidated
```



---
## test_clipping_of_log
```python
from test_transforms import test_clipping_of_log
```



---
## NonAffineForTest
```python
from test_transforms import NonAffineForTest
```

A class which looks like a non affine transform, but does whatever
the given transform does (even if it is affine). This is very useful
for testing NonAffine behaviour with a simple Affine transform.

---
## TestBasicTransform
```python
from test_transforms import TestBasicTransform
```



---
## TestTransformPlotInterface
```python
from test_transforms import TestTransformPlotInterface
```



---
## assert_bbox_eq
```python
from test_transforms import assert_bbox_eq
```



---
## test_bbox_frozen_copies_minpos
```python
from test_transforms import test_bbox_frozen_copies_minpos
```



---
## test_bbox_intersection
```python
from test_transforms import test_bbox_intersection
```



---
## test_bbox_as_strings
```python
from test_transforms import test_bbox_as_strings
```



---
## test_str_transform
```python
from test_transforms import test_str_transform
```



---
## test_transform_single_point
```python
from test_transforms import test_transform_single_point
```



---
## test_log_transform
```python
from test_transforms import test_log_transform
```



---
## test_nan_overlap
```python
from test_transforms import test_nan_overlap
```



---
## test_transform_angles
```python
from test_transforms import test_transform_angles
```



---
## test_nonsingular
```python
from test_transforms import test_nonsingular
```



---
## test_transformed_path
```python
from test_transforms import test_transformed_path
```



---
## test_transformed_patch_path
```python
from test_transforms import test_transformed_patch_path
```



---
## test_lockable_bbox
```python
from test_transforms import test_lockable_bbox
```



---
## test_transformwrapper
```python
from test_transforms import test_transformwrapper
```



---
## test_scale_swapping
```python
from test_transforms import test_scale_swapping
```



---
## test_offset_copy_errors
```python
from test_transforms import test_offset_copy_errors
```



---
## test_transformedbbox_contains
```python
from test_transforms import test_transformedbbox_contains
```



---
## test_interval_contains
```python
from test_transforms import test_interval_contains
```



---
## test_interval_contains_open
```python
from test_transforms import test_interval_contains_open
```



---
## test_init
```python
from test_transforms import test_init
```



---
## test_values
```python
from test_transforms import test_values
```



---
## test_modify_inplace
```python
from test_transforms import test_modify_inplace
```



---
## test_clear
```python
from test_transforms import test_clear
```



---
## test_rotate
```python
from test_transforms import test_rotate
```



---
## test_rotate_around
```python
from test_transforms import test_rotate_around
```



---
## test_scale
```python
from test_transforms import test_scale
```



---
## test_skew
```python
from test_transforms import test_skew
```



---
## test_translate
```python
from test_transforms import test_translate
```



---
## test_rotate_plus_other
```python
from test_transforms import test_rotate_plus_other
```



---
## test_rotate_around_plus_other
```python
from test_transforms import test_rotate_around_plus_other
```



---
## test_scale_plus_other
```python
from test_transforms import test_scale_plus_other
```



---
## test_skew_plus_other
```python
from test_transforms import test_skew_plus_other
```



---
## test_translate_plus_other
```python
from test_transforms import test_translate_plus_other
```



---
## test_invalid_transform
```python
from test_transforms import test_invalid_transform
```



---
## test_copy
```python
from test_transforms import test_copy
```



---
## test_deepcopy
```python
from test_transforms import test_deepcopy
```



---
## AssertingNonAffineTransform
```python
from test_transforms import AssertingNonAffineTransform
```

This transform raises an assertion error when called when it
shouldn't be and ``self.raise_on_transform`` is True.

---
## ScaledBy
```python
from test_transforms import ScaledBy
```



---
## __init__
```python
from test_transforms import __init__
```



---
## transform_non_affine
```python
from test_transforms import transform_non_affine
```



---
## transform_path_non_affine
```python
from test_transforms import transform_path_non_affine
```



---
## setup_method
```python
from test_transforms import setup_method
```



---
## test_transform_depth
```python
from test_transforms import test_transform_depth
```



---
## test_left_to_right_iteration
```python
from test_transforms import test_left_to_right_iteration
```



---
## test_transform_shortcuts
```python
from test_transforms import test_transform_shortcuts
```



---
## test_contains_branch
```python
from test_transforms import test_contains_branch
```



---
## test_affine_simplification
```python
from test_transforms import test_affine_simplification
```



---
## test_line_extent_axes_coords
```python
from test_transforms import test_line_extent_axes_coords
```



---
## test_line_extent_data_coords
```python
from test_transforms import test_line_extent_data_coords
```



---
## test_line_extent_compound_coords1
```python
from test_transforms import test_line_extent_compound_coords1
```



---
## test_line_extent_predata_transform_coords
```python
from test_transforms import test_line_extent_predata_transform_coords
```



---
## test_line_extent_compound_coords2
```python
from test_transforms import test_line_extent_compound_coords2
```



---
## test_line_extents_affine
```python
from test_transforms import test_line_extents_affine
```



---
## test_line_extents_non_affine
```python
from test_transforms import test_line_extents_non_affine
```



---
## test_pathc_extents_non_affine
```python
from test_transforms import test_pathc_extents_non_affine
```



---
## test_pathc_extents_affine
```python
from test_transforms import test_pathc_extents_affine
```



---
## test_line_extents_for_non_affine_transData
```python
from test_transforms import test_line_extents_for_non_affine_transData
```



---
## _as_mpl_transform
```python
from test_transforms import _as_mpl_transform
```



---
## __name__
```python
from test_cbook import __name__
```



---
## Test_delete_masked_points
```python
from test_cbook import Test_delete_masked_points
```



---
## Test_boxplot_stats
```python
from test_cbook import Test_boxplot_stats
```



---
## Test_callback_registry
```python
from test_cbook import Test_callback_registry
```



---
## test_callbackregistry_default_exception_handler
```python
from test_cbook import test_callbackregistry_default_exception_handler
```



---
## raising_cb_reg
```python
from test_cbook import raising_cb_reg
```



---
## test_callbackregistry_custom_exception_handler
```python
from test_cbook import test_callbackregistry_custom_exception_handler
```



---
## test_callbackregistry_signals
```python
from test_cbook import test_callbackregistry_signals
```



---
## test_callbackregistry_blocking
```python
from test_cbook import test_callbackregistry_blocking
```



---
## test_strip_comment
```python
from test_cbook import test_strip_comment
```

Strip everything from the first unquoted #.

---
## test_strip_comment_invalid
```python
from test_cbook import test_strip_comment_invalid
```



---
## test_sanitize_sequence
```python
from test_cbook import test_sanitize_sequence
```



---
## test_normalize_kwargs_fail
```python
from test_cbook import test_normalize_kwargs_fail
```



---
## test_normalize_kwargs_pass
```python
from test_cbook import test_normalize_kwargs_pass
```



---
## test_warn_external_frame_embedded_python
```python
from test_cbook import test_warn_external_frame_embedded_python
```



---
## test_to_prestep
```python
from test_cbook import test_to_prestep
```



---
## test_to_prestep_empty
```python
from test_cbook import test_to_prestep_empty
```



---
## test_to_poststep
```python
from test_cbook import test_to_poststep
```



---
## test_to_poststep_empty
```python
from test_cbook import test_to_poststep_empty
```



---
## test_to_midstep
```python
from test_cbook import test_to_midstep
```



---
## test_to_midstep_empty
```python
from test_cbook import test_to_midstep_empty
```



---
## test_step_fails
```python
from test_cbook import test_step_fails
```



---
## test_grouper
```python
from test_cbook import test_grouper
```



---
## test_grouper_private
```python
from test_cbook import test_grouper_private
```



---
## test_flatiter
```python
from test_cbook import test_flatiter
```



---
## test__safe_first_finite_all_nan
```python
from test_cbook import test__safe_first_finite_all_nan
```



---
## test__safe_first_finite_all_inf
```python
from test_cbook import test__safe_first_finite_all_inf
```



---
## test_reshape2d
```python
from test_cbook import test_reshape2d
```



---
## test_reshape2d_pandas
```python
from test_cbook import test_reshape2d_pandas
```



---
## test_reshape2d_xarray
```python
from test_cbook import test_reshape2d_xarray
```



---
## test_index_of_pandas
```python
from test_cbook import test_index_of_pandas
```



---
## test_index_of_xarray
```python
from test_cbook import test_index_of_xarray
```



---
## test_contiguous_regions
```python
from test_cbook import test_contiguous_regions
```



---
## test_safe_first_element_pandas_series
```python
from test_cbook import test_safe_first_element_pandas_series
```



---
## test_warn_external
```python
from test_cbook import test_warn_external
```



---
## test_array_patch_perimeters
```python
from test_cbook import test_array_patch_perimeters
```



---
## test_setattr_cm
```python
from test_cbook import test_setattr_cm
```



---
## test_format_approx
```python
from test_cbook import test_format_approx
```



---
## test_safe_first_element_with_none
```python
from test_cbook import test_safe_first_element_with_none
```



---
## test_strip_math
```python
from test_cbook import test_strip_math
```



---
## test_auto_format_str
```python
from test_cbook import test_auto_format_str
```

Apply *value* to the format string *fmt*.

---
## test_unpack_to_numpy_from_torch
```python
from test_cbook import test_unpack_to_numpy_from_torch
```

Test that torch tensors are converted to NumPy arrays.

We don't want to create a dependency on torch in the test suite, so we mock it.

---
## test_unpack_to_numpy_from_jax
```python
from test_cbook import test_unpack_to_numpy_from_jax
```

Test that jax arrays are converted to NumPy arrays.

We don't want to create a dependency on jax in the test suite, so we mock it.

---
## test_bad_first_arg
```python
from test_cbook import test_bad_first_arg
```



---
## test_string_seq
```python
from test_cbook import test_string_seq
```



---
## test_datetime
```python
from test_cbook import test_datetime
```



---
## test_rgba
```python
from test_cbook import test_rgba
```



---
## setup_method
```python
from test_cbook import setup_method
```



---
## test_form_main_list
```python
from test_cbook import test_form_main_list
```



---
## test_form_each_dict
```python
from test_cbook import test_form_each_dict
```



---
## test_form_dict_keys
```python
from test_cbook import test_form_dict_keys
```



---
## test_results_baseline
```python
from test_cbook import test_results_baseline
```



---
## test_results_bootstrapped
```python
from test_cbook import test_results_bootstrapped
```



---
## test_results_whiskers_float
```python
from test_cbook import test_results_whiskers_float
```



---
## test_results_whiskers_range
```python
from test_cbook import test_results_whiskers_range
```



---
## test_results_whiskers_percentiles
```python
from test_cbook import test_results_whiskers_percentiles
```



---
## test_results_withlabels
```python
from test_cbook import test_results_withlabels
```



---
## test_label_error
```python
from test_cbook import test_label_error
```



---
## test_bad_dims
```python
from test_cbook import test_bad_dims
```



---
## test_boxplot_stats_autorange_false
```python
from test_cbook import test_boxplot_stats_autorange_false
```



---
## connect
```python
from test_cbook import connect
```



---
## disconnect
```python
from test_cbook import disconnect
```



---
## count
```python
from test_cbook import count
```



---
## is_empty
```python
from test_cbook import is_empty
```



---
## is_not_empty
```python
from test_cbook import is_not_empty
```



---
## test_cid_restore
```python
from test_cbook import test_cid_restore
```



---
## test_callback_complete
```python
from test_cbook import test_callback_complete
```



---
## test_callback_disconnect
```python
from test_cbook import test_callback_disconnect
```



---
## test_callback_wrong_disconnect
```python
from test_cbook import test_callback_wrong_disconnect
```



---
## test_registration_on_non_empty_registry
```python
from test_cbook import test_registration_on_non_empty_registry
```



---
## dummy
```python
from test_cbook import dummy
```



---
## test_pickling
```python
from test_cbook import test_pickling
```



---
## TestException
```python
from test_cbook import TestException
```



---
## raise_runtime_error
```python
from test_cbook import raise_runtime_error
```



---
## raise_value_error
```python
from test_cbook import raise_value_error
```



---
## transformer
```python
from test_cbook import transformer
```



---
## cb
```python
from test_cbook import cb
```



---
## raise_handler
```python
from test_cbook import raise_handler
```



---
## test_func1
```python
from test_cbook import test_func1
```



---
## test_func2
```python
from test_cbook import test_func2
```



---
## Dummy
```python
from test_cbook import Dummy
```



---
## ArraySubclass
```python
from test_cbook import ArraySubclass
```



---
## check
```python
from test_cbook import check
```



---
## divisors
```python
from test_cbook import divisors
```



---
## A
```python
from test_cbook import A
```



---
## B
```python
from test_cbook import B
```



---
## verify_pre_post_state
```python
from test_cbook import verify_pre_post_state
```



---
## Tensor
```python
from test_cbook import Tensor
```



---
## Array
```python
from test_cbook import Array
```



---
## __iter__
```python
from test_cbook import __iter__
```



---
## __getitem__
```python
from test_cbook import __getitem__
```



---
## __init__
```python
from test_cbook import __init__
```



---
## meth
```python
from test_cbook import meth
```



---
## classy
```python
from test_cbook import classy
```



---
## static
```python
from test_cbook import static
```



---
## prop
```python
from test_cbook import prop
```



---
## __array__
```python
from test_cbook import __array__
```



---
## test_check_shape
```python
from test_api import test_check_shape
```



---
## test_classproperty_deprecation
```python
from test_api import test_classproperty_deprecation
```



---
## test_deprecate_privatize_attribute
```python
from test_api import test_deprecate_privatize_attribute
```



---
## test_delete_parameter
```python
from test_api import test_delete_parameter
```



---
## test_make_keyword_only
```python
from test_api import test_make_keyword_only
```



---
## test_deprecation_alternative
```python
from test_api import test_deprecation_alternative
```



---
## test_empty_check_in_list
```python
from test_api import test_empty_check_in_list
```



---
## A
```python
from test_api import A
```



---
## C
```python
from test_api import C
```



---
## func1
```python
from test_api import func1
```



---
## func2
```python
from test_api import func2
```



---
## pyplot_wrapper
```python
from test_api import pyplot_wrapper
```



---
## func
```python
from test_api import func
```



---
## f
```python
from test_api import f
```



---
## __init__
```python
from test_api import __init__
```



---
## _meth
```python
from test_api import _meth
```



---
## __name__
```python
from test_backend_qt import __name__
```



---
## qt_core
```python
from test_backend_qt import qt_core
```



---
## test_fig_close
```python
from test_backend_qt import test_fig_close
```



---
## test_correct_key
```python
from test_backend_qt import test_correct_key
```

Make a figure.
Send a key_press_event event (using non-public, qtX backend specific api).
Catch the event.
Assert sent and caught keys are the same.

---
## test_device_pixel_ratio_change
```python
from test_backend_qt import test_device_pixel_ratio_change
```

Make sure that if the pixel ratio changes, the figure dpi changes but the
widget remains the same logical size.

---
## test_subplottool
```python
from test_backend_qt import test_subplottool
```



---
## test_figureoptions
```python
from test_backend_qt import test_figureoptions
```



---
## test_figureoptions_with_datetime_axes
```python
from test_backend_qt import test_figureoptions_with_datetime_axes
```



---
## test_double_resize
```python
from test_backend_qt import test_double_resize
```



---
## test_canvas_reinit
```python
from test_backend_qt import test_canvas_reinit
```



---
## test_form_widget_get_with_datetime_and_date_fields
```python
from test_backend_qt import test_form_widget_get_with_datetime_and_date_fields
```



---
## _get_testable_qt_backends
```python
from test_backend_qt import _get_testable_qt_backends
```



---
## test_fig_sigint_override
```python
from test_backend_qt import test_fig_sigint_override
```



---
## test_ipython
```python
from test_backend_qt import test_ipython
```



---
## _Event
```python
from test_backend_qt import _Event
```



---
## on_key_press
```python
from test_backend_qt import on_key_press
```



---
## crashing_callback
```python
from test_backend_qt import crashing_callback
```



---
## fire_signal_and_quit
```python
from test_backend_qt import fire_signal_and_quit
```



---
## custom_handler
```python
from test_backend_qt import custom_handler
```



---
## isAutoRepeat
```python
from test_backend_qt import isAutoRepeat
```



---
## key
```python
from test_backend_qt import key
```



---
## set_device_pixel_ratio
```python
from test_backend_qt import set_device_pixel_ratio
```



---
## __name__
```python
from test_gridspec import __name__
```



---
## test_equal
```python
from test_gridspec import test_equal
```



---
## test_width_ratios
```python
from test_gridspec import test_width_ratios
```

Addresses issue #5835.
See at https://github.com/matplotlib/matplotlib/issues/5835.

---
## test_height_ratios
```python
from test_gridspec import test_height_ratios
```

Addresses issue #5835.
See at https://github.com/matplotlib/matplotlib/issues/5835.

---
## test_repr
```python
from test_gridspec import test_repr
```



---
## test_subplotspec_args
```python
from test_gridspec import test_subplotspec_args
```



---
## __name__
```python
from test_afm import __name__
```



---
## test_nonascii_str
```python
from test_afm import test_nonascii_str
```



---
## test_parse_header
```python
from test_afm import test_parse_header
```



---
## test_parse_char_metrics
```python
from test_afm import test_parse_char_metrics
```



---
## test_get_familyname_guessed
```python
from test_afm import test_get_familyname_guessed
```



---
## test_font_manager_weight_normalization
```python
from test_afm import test_font_manager_weight_normalization
```



---
## test_bad_afm
```python
from test_afm import test_bad_afm
```



---
## test_malformed_header
```python
from test_afm import test_malformed_header
```



---
## test_empty_closed_path
```python
from test_path import test_empty_closed_path
```



---
## test_readonly_path
```python
from test_path import test_readonly_path
```



---
## test_path_exceptions
```python
from test_path import test_path_exceptions
```



---
## test_point_in_path
```python
from test_path import test_point_in_path
```



---
## test_contains_path
```python
from test_path import test_contains_path
```



---
## test_contains_points_negative_radius
```python
from test_path import test_contains_points_negative_radius
```



---
## test_exact_extents
```python
from test_path import test_exact_extents
```



---
## test_extents_with_ignored_codes
```python
from test_path import test_extents_with_ignored_codes
```



---
## test_point_in_path_nan
```python
from test_path import test_point_in_path_nan
```



---
## test_nonlinear_containment
```python
from test_path import test_nonlinear_containment
```



---
## test_arrow_contains_point
```python
from test_path import test_arrow_contains_point
```



---
## test_path_clipping
```python
from test_path import test_path_clipping
```



---
## test_log_transform_with_zero
```python
from test_path import test_log_transform_with_zero
```



---
## test_make_compound_path_empty
```python
from test_path import test_make_compound_path_empty
```



---
## test_make_compound_path_stops
```python
from test_path import test_make_compound_path_stops
```



---
## test_xkcd
```python
from test_path import test_xkcd
```



---
## test_xkcd_marker
```python
from test_path import test_xkcd_marker
```



---
## test_marker_paths_pdf
```python
from test_path import test_marker_paths_pdf
```



---
## test_nan_isolated_points
```python
from test_path import test_nan_isolated_points
```



---
## test_path_no_doubled_point_in_to_polygon
```python
from test_path import test_path_no_doubled_point_in_to_polygon
```



---
## test_path_to_polygons
```python
from test_path import test_path_to_polygons
```



---
## test_path_deepcopy
```python
from test_path import test_path_deepcopy
```



---
## test_path_shallowcopy
```python
from test_path import test_path_shallowcopy
```



---
## test_path_intersect_path
```python
from test_path import test_path_intersect_path
```



---
## test_full_arc
```python
from test_path import test_full_arc
```



---
## test_disjoint_zero_length_segment
```python
from test_path import test_disjoint_zero_length_segment
```



---
## test_intersect_zero_length_segment
```python
from test_path import test_intersect_zero_length_segment
```



---
## test_cleanup_closepoly
```python
from test_path import test_cleanup_closepoly
```



---
## modify_vertices
```python
from test_path import modify_vertices
```



---
## __name__
```python
from test_collections import __name__
```



---
## pcfunc
```python
from test_collections import pcfunc
```



---
## generate_EventCollection_plot
```python
from test_collections import generate_EventCollection_plot
```

Generate the initial collection and plot it.

---
## test__EventCollection__get_props
```python
from test_collections import test__EventCollection__get_props
```



---
## test__EventCollection__set_positions
```python
from test_collections import test__EventCollection__set_positions
```



---
## test__EventCollection__add_positions
```python
from test_collections import test__EventCollection__add_positions
```



---
## test__EventCollection__append_positions
```python
from test_collections import test__EventCollection__append_positions
```



---
## test__EventCollection__extend_positions
```python
from test_collections import test__EventCollection__extend_positions
```



---
## test__EventCollection__switch_orientation
```python
from test_collections import test__EventCollection__switch_orientation
```



---
## test__EventCollection__switch_orientation_2x
```python
from test_collections import test__EventCollection__switch_orientation_2x
```

Check that calling switch_orientation twice sets the orientation back to
the default.

---
## test__EventCollection__set_orientation
```python
from test_collections import test__EventCollection__set_orientation
```



---
## test__EventCollection__set_linelength
```python
from test_collections import test__EventCollection__set_linelength
```



---
## test__EventCollection__set_lineoffset
```python
from test_collections import test__EventCollection__set_lineoffset
```



---
## test__EventCollection__set_prop
```python
from test_collections import test__EventCollection__set_prop
```



---
## test__EventCollection__set_color
```python
from test_collections import test__EventCollection__set_color
```



---
## check_segments
```python
from test_collections import check_segments
```

Test helper checking that all values in the segment are correct, given a
particular set of inputs.

---
## test_collection_norm_autoscale
```python
from test_collections import test_collection_norm_autoscale
```



---
## test_null_collection_datalim
```python
from test_collections import test_null_collection_datalim
```



---
## test_no_offsets_datalim
```python
from test_collections import test_no_offsets_datalim
```



---
## test_add_collection
```python
from test_collections import test_add_collection
```



---
## test_collection_log_datalim
```python
from test_collections import test_collection_log_datalim
```



---
## test_quiver_limits
```python
from test_collections import test_quiver_limits
```



---
## test_barb_limits
```python
from test_collections import test_barb_limits
```



---
## test_EllipseCollection
```python
from test_collections import test_EllipseCollection
```



---
## test_EllipseCollection_setter_getter
```python
from test_collections import test_EllipseCollection_setter_getter
```



---
## test_polycollection_close
```python
from test_collections import test_polycollection_close
```



---
## test_regularpolycollection_rotate
```python
from test_collections import test_regularpolycollection_rotate
```



---
## test_regularpolycollection_scale
```python
from test_collections import test_regularpolycollection_scale
```



---
## test_picking
```python
from test_collections import test_picking
```



---
## test_quadmesh_contains
```python
from test_collections import test_quadmesh_contains
```



---
## test_quadmesh_contains_concave
```python
from test_collections import test_quadmesh_contains_concave
```



---
## test_quadmesh_cursor_data
```python
from test_collections import test_quadmesh_cursor_data
```



---
## test_quadmesh_cursor_data_multiple_points
```python
from test_collections import test_quadmesh_cursor_data_multiple_points
```



---
## test_linestyle_single_dashes
```python
from test_collections import test_linestyle_single_dashes
```



---
## test_size_in_xy
```python
from test_collections import test_size_in_xy
```



---
## test_pandas_indexing
```python
from test_collections import test_pandas_indexing
```



---
## test_lslw_bcast
```python
from test_collections import test_lslw_bcast
```



---
## test_set_wrong_linestyle
```python
from test_collections import test_set_wrong_linestyle
```



---
## test_capstyle
```python
from test_collections import test_capstyle
```



---
## test_joinstyle
```python
from test_collections import test_joinstyle
```



---
## test_cap_and_joinstyle_image
```python
from test_collections import test_cap_and_joinstyle_image
```



---
## test_scatter_post_alpha
```python
from test_collections import test_scatter_post_alpha
```



---
## test_scatter_alpha_array
```python
from test_collections import test_scatter_alpha_array
```



---
## test_pathcollection_legend_elements
```python
from test_collections import test_pathcollection_legend_elements
```



---
## test_EventCollection_nosort
```python
from test_collections import test_EventCollection_nosort
```



---
## test_collection_set_verts_array
```python
from test_collections import test_collection_set_verts_array
```



---
## test_collection_set_array
```python
from test_collections import test_collection_set_array
```



---
## test_blended_collection_autolim
```python
from test_collections import test_blended_collection_autolim
```



---
## test_singleton_autolim
```python
from test_collections import test_singleton_autolim
```



---
## test_autolim_with_zeros
```python
from test_collections import test_autolim_with_zeros
```



---
## test_quadmesh_set_array_validation
```python
from test_collections import test_quadmesh_set_array_validation
```



---
## test_polyquadmesh_masked_vertices_array
```python
from test_collections import test_polyquadmesh_masked_vertices_array
```



---
## test_quadmesh_get_coordinates
```python
from test_collections import test_quadmesh_get_coordinates
```



---
## test_quadmesh_set_array
```python
from test_collections import test_quadmesh_set_array
```



---
## test_quadmesh_vmin_vmax
```python
from test_collections import test_quadmesh_vmin_vmax
```



---
## test_quadmesh_alpha_array
```python
from test_collections import test_quadmesh_alpha_array
```



---
## test_alpha_validation
```python
from test_collections import test_alpha_validation
```



---
## test_legend_inverse_size_label_relationship
```python
from test_collections import test_legend_inverse_size_label_relationship
```

Ensure legend markers scale appropriately when label and size are
inversely related.
Here label = 5 / size

---
## test_color_logic
```python
from test_collections import test_color_logic
```



---
## test_LineCollection_args
```python
from test_collections import test_LineCollection_args
```



---
## test_array_dimensions
```python
from test_collections import test_array_dimensions
```



---
## test_get_segments
```python
from test_collections import test_get_segments
```



---
## test_set_offsets_late
```python
from test_collections import test_set_offsets_late
```



---
## test_set_offset_transform
```python
from test_collections import test_set_offset_transform
```



---
## test_set_offset_units
```python
from test_collections import test_set_offset_units
```



---
## test_check_masked_offsets
```python
from test_collections import test_check_masked_offsets
```



---
## test_masked_set_offsets
```python
from test_collections import test_masked_set_offsets
```



---
## test_check_offsets_dtype
```python
from test_collections import test_check_offsets_dtype
```



---
## test_striped_lines
```python
from test_collections import test_striped_lines
```



---
## SquareCollection
```python
from test_collections import SquareCollection
```



---
## __init__
```python
from test_collections import __init__
```



---
## get_transform
```python
from test_collections import get_transform
```

Return transform scaling circle areas to data space.

---
## __name__
```python
from test_axes import __name__
```



---
## test_invisible_axes
```python
from test_axes import test_invisible_axes
```



---
## test_get_labels
```python
from test_axes import test_get_labels
```



---
## test_repr
```python
from test_axes import test_repr
```



---
## test_label_loc_vertical
```python
from test_axes import test_label_loc_vertical
```



---
## test_label_loc_horizontal
```python
from test_axes import test_label_loc_horizontal
```



---
## test_label_loc_rc
```python
from test_axes import test_label_loc_rc
```



---
## test_label_shift
```python
from test_axes import test_label_shift
```



---
## test_acorr
```python
from test_axes import test_acorr
```



---
## test_acorr_integers
```python
from test_axes import test_acorr_integers
```



---
## test_spy
```python
from test_axes import test_spy
```



---
## test_spy_invalid_kwargs
```python
from test_axes import test_spy_invalid_kwargs
```



---
## test_matshow
```python
from test_axes import test_matshow
```



---
## test_formatter_ticker
```python
from test_axes import test_formatter_ticker
```



---
## test_funcformatter_auto_formatter
```python
from test_axes import test_funcformatter_auto_formatter
```



---
## test_strmethodformatter_auto_formatter
```python
from test_axes import test_strmethodformatter_auto_formatter
```



---
## test_twin_axis_locators_formatters
```python
from test_axes import test_twin_axis_locators_formatters
```



---
## test_twinx_cla
```python
from test_axes import test_twinx_cla
```



---
## test_twin_units
```python
from test_axes import test_twin_units
```



---
## test_twin_logscale
```python
from test_axes import test_twin_logscale
```



---
## test_twinx_axis_scales
```python
from test_axes import test_twinx_axis_scales
```



---
## test_twin_inherit_autoscale_setting
```python
from test_axes import test_twin_inherit_autoscale_setting
```



---
## test_inverted_cla
```python
from test_axes import test_inverted_cla
```



---
## test_subclass_clear_cla
```python
from test_axes import test_subclass_clear_cla
```



---
## test_cla_not_redefined_internally
```python
from test_axes import test_cla_not_redefined_internally
```



---
## test_minorticks_on_rcParams_both
```python
from test_axes import test_minorticks_on_rcParams_both
```



---
## test_autoscale_tiny_range
```python
from test_axes import test_autoscale_tiny_range
```



---
## test_autoscale_tight
```python
from test_axes import test_autoscale_tight
```



---
## test_autoscale_log_shared
```python
from test_axes import test_autoscale_log_shared
```



---
## test_use_sticky_edges
```python
from test_axes import test_use_sticky_edges
```



---
## test_sticky_shared_axes
```python
from test_axes import test_sticky_shared_axes
```



---
## test_sticky_tolerance
```python
from test_axes import test_sticky_tolerance
```



---
## test_sticky_tolerance_contourf
```python
from test_axes import test_sticky_tolerance_contourf
```



---
## test_nargs_stem
```python
from test_axes import test_nargs_stem
```



---
## test_nargs_legend
```python
from test_axes import test_nargs_legend
```



---
## test_nargs_pcolorfast
```python
from test_axes import test_nargs_pcolorfast
```



---
## test_basic_annotate
```python
from test_axes import test_basic_annotate
```



---
## test_arrow_simple
```python
from test_axes import test_arrow_simple
```



---
## test_arrow_empty
```python
from test_axes import test_arrow_empty
```



---
## test_arrow_in_view
```python
from test_axes import test_arrow_in_view
```



---
## test_annotate_default_arrow
```python
from test_axes import test_annotate_default_arrow
```



---
## test_annotate_signature
```python
from test_axes import test_annotate_signature
```

Check that the signature of Axes.annotate() matches Annotation.

---
## test_fill_units
```python
from test_axes import test_fill_units
```



---
## test_plot_format_kwarg_redundant
```python
from test_axes import test_plot_format_kwarg_redundant
```



---
## test_errorbar_dashes
```python
from test_axes import test_errorbar_dashes
```



---
## test_errorbar_mapview_kwarg
```python
from test_axes import test_errorbar_mapview_kwarg
```



---
## test_single_point
```python
from test_axes import test_single_point
```



---
## test_single_date
```python
from test_axes import test_single_date
```



---
## test_shaped_data
```python
from test_axes import test_shaped_data
```



---
## test_structured_data
```python
from test_axes import test_structured_data
```



---
## test_aitoff_proj
```python
from test_axes import test_aitoff_proj
```

Test aitoff projection ref.:
https://github.com/matplotlib/matplotlib/pull/14451

---
## test_axvspan_epoch
```python
from test_axes import test_axvspan_epoch
```



---
## test_axhspan_epoch
```python
from test_axes import test_axhspan_epoch
```



---
## test_hexbin_extent
```python
from test_axes import test_hexbin_extent
```



---
## test_hexbin_bad_extents
```python
from test_axes import test_hexbin_bad_extents
```



---
## test_hexbin_empty
```python
from test_axes import test_hexbin_empty
```



---
## test_hexbin_pickable
```python
from test_axes import test_hexbin_pickable
```



---
## test_hexbin_log
```python
from test_axes import test_hexbin_log
```



---
## test_hexbin_linear
```python
from test_axes import test_hexbin_linear
```



---
## test_hexbin_log_clim
```python
from test_axes import test_hexbin_log_clim
```



---
## test_hexbin_mincnt_behavior_upon_C_parameter
```python
from test_axes import test_hexbin_mincnt_behavior_upon_C_parameter
```



---
## test_inverted_limits
```python
from test_axes import test_inverted_limits
```



---
## test_nonfinite_limits
```python
from test_axes import test_nonfinite_limits
```



---
## test_limits_empty_data
```python
from test_axes import test_limits_empty_data
```



---
## test_imshow
```python
from test_axes import test_imshow
```



---
## test_imshow_clip
```python
from test_axes import test_imshow_clip
```



---
## test_imshow_norm_vminvmax
```python
from test_axes import test_imshow_norm_vminvmax
```

Parameters vmin, vmax should error if norm is given.

---
## test_polycollection_joinstyle
```python
from test_axes import test_polycollection_joinstyle
```



---
## test_fill_between_input
```python
from test_axes import test_fill_between_input
```



---
## test_fill_betweenx_input
```python
from test_axes import test_fill_betweenx_input
```



---
## test_fill_between_interpolate
```python
from test_axes import test_fill_between_interpolate
```



---
## test_fill_between_interpolate_decreasing
```python
from test_axes import test_fill_between_interpolate_decreasing
```



---
## test_fill_between_interpolate_nan
```python
from test_axes import test_fill_between_interpolate_nan
```



---
## test_symlog
```python
from test_axes import test_symlog
```



---
## test_symlog2
```python
from test_axes import test_symlog2
```



---
## test_pcolorargs_5205
```python
from test_axes import test_pcolorargs_5205
```



---
## test_pcolormesh
```python
from test_axes import test_pcolormesh
```



---
## test_pcolormesh_small
```python
from test_axes import test_pcolormesh_small
```



---
## test_pcolormesh_alpha
```python
from test_axes import test_pcolormesh_alpha
```



---
## test_pcolormesh_rgba
```python
from test_axes import test_pcolormesh_rgba
```



---
## test_pcolormesh_datetime_axis
```python
from test_axes import test_pcolormesh_datetime_axis
```



---
## test_pcolor_datetime_axis
```python
from test_axes import test_pcolor_datetime_axis
```



---
## test_pcolorargs
```python
from test_axes import test_pcolorargs
```



---
## test_pcolormesh_underflow_error
```python
from test_axes import test_pcolormesh_underflow_error
```

Test that underflow errors don't crop up in pcolormesh.  Probably
a numpy bug (https://github.com/numpy/numpy/issues/25810).

---
## test_pcolorargs_with_read_only
```python
from test_axes import test_pcolorargs_with_read_only
```



---
## test_pcolornearest
```python
from test_axes import test_pcolornearest
```



---
## test_pcolornearestunits
```python
from test_axes import test_pcolornearestunits
```



---
## test_pcolorflaterror
```python
from test_axes import test_pcolorflaterror
```



---
## test_samesizepcolorflaterror
```python
from test_axes import test_samesizepcolorflaterror
```



---
## test_pcolorauto
```python
from test_axes import test_pcolorauto
```



---
## test_canonical
```python
from test_axes import test_canonical
```



---
## test_arc_angles
```python
from test_axes import test_arc_angles
```



---
## test_arc_ellipse
```python
from test_axes import test_arc_ellipse
```



---
## test_marker_as_markerstyle
```python
from test_axes import test_marker_as_markerstyle
```



---
## test_markevery
```python
from test_axes import test_markevery
```



---
## test_markevery_line
```python
from test_axes import test_markevery_line
```



---
## test_markevery_linear_scales
```python
from test_axes import test_markevery_linear_scales
```



---
## test_markevery_linear_scales_zoomed
```python
from test_axes import test_markevery_linear_scales_zoomed
```



---
## test_markevery_log_scales
```python
from test_axes import test_markevery_log_scales
```



---
## test_markevery_polar
```python
from test_axes import test_markevery_polar
```



---
## test_markevery_linear_scales_nans
```python
from test_axes import test_markevery_linear_scales_nans
```



---
## test_marker_edges
```python
from test_axes import test_marker_edges
```



---
## test_bar_tick_label_single
```python
from test_axes import test_bar_tick_label_single
```



---
## test_nan_bar_values
```python
from test_axes import test_nan_bar_values
```



---
## test_bar_ticklabel_fail
```python
from test_axes import test_bar_ticklabel_fail
```



---
## test_bar_tick_label_multiple
```python
from test_axes import test_bar_tick_label_multiple
```



---
## test_bar_tick_label_multiple_old_alignment
```python
from test_axes import test_bar_tick_label_multiple_old_alignment
```



---
## test_bar_decimal_center
```python
from test_axes import test_bar_decimal_center
```



---
## test_barh_decimal_center
```python
from test_axes import test_barh_decimal_center
```



---
## test_bar_decimal_width
```python
from test_axes import test_bar_decimal_width
```



---
## test_barh_decimal_height
```python
from test_axes import test_barh_decimal_height
```



---
## test_bar_color_none_alpha
```python
from test_axes import test_bar_color_none_alpha
```



---
## test_bar_edgecolor_none_alpha
```python
from test_axes import test_bar_edgecolor_none_alpha
```



---
## test_barh_tick_label
```python
from test_axes import test_barh_tick_label
```



---
## test_bar_timedelta
```python
from test_axes import test_bar_timedelta
```

Smoketest that bar can handle width and height in delta units.

---
## test_bar_datetime_start
```python
from test_axes import test_bar_datetime_start
```

test that tickers are correct for datetimes

---
## test_boxplot_dates_pandas
```python
from test_axes import test_boxplot_dates_pandas
```



---
## test_boxplot_capwidths
```python
from test_axes import test_boxplot_capwidths
```



---
## test_pcolor_regression
```python
from test_axes import test_pcolor_regression
```



---
## test_bar_pandas
```python
from test_axes import test_bar_pandas
```



---
## test_bar_pandas_indexed
```python
from test_axes import test_bar_pandas_indexed
```



---
## test_bar_hatches
```python
from test_axes import test_bar_hatches
```



---
## test_bar_labels
```python
from test_axes import test_bar_labels
```



---
## test_bar_labels_length
```python
from test_axes import test_bar_labels_length
```



---
## test_pandas_minimal_plot
```python
from test_axes import test_pandas_minimal_plot
```



---
## test_hist_log
```python
from test_axes import test_hist_log
```



---
## test_hist_log_2
```python
from test_axes import test_hist_log_2
```



---
## test_hist_log_barstacked
```python
from test_axes import test_hist_log_barstacked
```



---
## test_hist_bar_empty
```python
from test_axes import test_hist_bar_empty
```



---
## test_hist_float16
```python
from test_axes import test_hist_float16
```



---
## test_hist_step_empty
```python
from test_axes import test_hist_step_empty
```



---
## test_hist_step_filled
```python
from test_axes import test_hist_step_filled
```



---
## test_hist_density
```python
from test_axes import test_hist_density
```



---
## test_hist_unequal_bins_density
```python
from test_axes import test_hist_unequal_bins_density
```



---
## test_hist_datetime_datasets
```python
from test_axes import test_hist_datetime_datasets
```



---
## test_hist_datetime_datasets_bins
```python
from test_axes import test_hist_datetime_datasets_bins
```



---
## test_hist_with_empty_input
```python
from test_axes import test_hist_with_empty_input
```



---
## test_hist_zorder
```python
from test_axes import test_hist_zorder
```



---
## test_stairs
```python
from test_axes import test_stairs
```



---
## test_stairs_fill
```python
from test_axes import test_stairs_fill
```



---
## test_stairs_update
```python
from test_axes import test_stairs_update
```



---
## test_stairs_baseline_0
```python
from test_axes import test_stairs_baseline_0
```



---
## test_stairs_empty
```python
from test_axes import test_stairs_empty
```



---
## test_stairs_invalid_nan
```python
from test_axes import test_stairs_invalid_nan
```



---
## test_stairs_invalid_mismatch
```python
from test_axes import test_stairs_invalid_mismatch
```



---
## test_stairs_invalid_update
```python
from test_axes import test_stairs_invalid_update
```



---
## test_stairs_invalid_update2
```python
from test_axes import test_stairs_invalid_update2
```



---
## test_stairs_options
```python
from test_axes import test_stairs_options
```



---
## test_stairs_datetime
```python
from test_axes import test_stairs_datetime
```



---
## test_stairs_edge_handling
```python
from test_axes import test_stairs_edge_handling
```



---
## contour_dat
```python
from test_axes import contour_dat
```



---
## test_contour_hatching
```python
from test_axes import test_contour_hatching
```



---
## test_contour_colorbar
```python
from test_axes import test_contour_colorbar
```



---
## test_hist2d
```python
from test_axes import test_hist2d
```



---
## test_hist2d_transpose
```python
from test_axes import test_hist2d_transpose
```



---
## test_hist2d_density
```python
from test_axes import test_hist2d_density
```



---
## TestScatter
```python
from test_axes import TestScatter
```



---
## _params
```python
from test_axes import _params
```



---
## test_parse_scatter_color_args
```python
from test_axes import test_parse_scatter_color_args
```



---
## test_parse_scatter_color_args_edgecolors
```python
from test_axes import test_parse_scatter_color_args_edgecolors
```



---
## test_parse_scatter_color_args_error
```python
from test_axes import test_parse_scatter_color_args_error
```



---
## test_as_mpl_axes_api
```python
from test_axes import test_as_mpl_axes_api
```



---
## test_pyplot_axes
```python
from test_axes import test_pyplot_axes
```



---
## test_log_scales
```python
from test_axes import test_log_scales
```



---
## test_log_scales_no_data
```python
from test_axes import test_log_scales_no_data
```



---
## test_log_scales_invalid
```python
from test_axes import test_log_scales_invalid
```



---
## test_stackplot
```python
from test_axes import test_stackplot
```



---
## test_stackplot_baseline
```python
from test_axes import test_stackplot_baseline
```



---
## test_stackplot_hatching
```python
from test_axes import test_stackplot_hatching
```



---
## _bxp_test_helper
```python
from test_axes import _bxp_test_helper
```



---
## test_bxp_baseline
```python
from test_axes import test_bxp_baseline
```



---
## test_bxp_rangewhis
```python
from test_axes import test_bxp_rangewhis
```



---
## test_bxp_percentilewhis
```python
from test_axes import test_bxp_percentilewhis
```



---
## test_bxp_with_xlabels
```python
from test_axes import test_bxp_with_xlabels
```



---
## test_bxp_horizontal
```python
from test_axes import test_bxp_horizontal
```



---
## test_bxp_with_ylabels
```python
from test_axes import test_bxp_with_ylabels
```



---
## test_bxp_patchartist
```python
from test_axes import test_bxp_patchartist
```



---
## test_bxp_custompatchartist
```python
from test_axes import test_bxp_custompatchartist
```



---
## test_bxp_customoutlier
```python
from test_axes import test_bxp_customoutlier
```



---
## test_bxp_showcustommean
```python
from test_axes import test_bxp_showcustommean
```



---
## test_bxp_custombox
```python
from test_axes import test_bxp_custombox
```



---
## test_bxp_custommedian
```python
from test_axes import test_bxp_custommedian
```



---
## test_bxp_customcap
```python
from test_axes import test_bxp_customcap
```



---
## test_bxp_customwhisker
```python
from test_axes import test_bxp_customwhisker
```



---
## test_boxplot_median_bound_by_box
```python
from test_axes import test_boxplot_median_bound_by_box
```



---
## test_bxp_shownotches
```python
from test_axes import test_bxp_shownotches
```



---
## test_bxp_nocaps
```python
from test_axes import test_bxp_nocaps
```



---
## test_bxp_nobox
```python
from test_axes import test_bxp_nobox
```



---
## test_bxp_no_flier_stats
```python
from test_axes import test_bxp_no_flier_stats
```



---
## test_bxp_showmean
```python
from test_axes import test_bxp_showmean
```



---
## test_bxp_showmeanasline
```python
from test_axes import test_bxp_showmeanasline
```



---
## test_bxp_scalarwidth
```python
from test_axes import test_bxp_scalarwidth
```



---
## test_bxp_customwidths
```python
from test_axes import test_bxp_customwidths
```



---
## test_bxp_custompositions
```python
from test_axes import test_bxp_custompositions
```



---
## test_bxp_bad_widths
```python
from test_axes import test_bxp_bad_widths
```



---
## test_bxp_bad_positions
```python
from test_axes import test_bxp_bad_positions
```



---
## test_bxp_custom_capwidths
```python
from test_axes import test_bxp_custom_capwidths
```



---
## test_bxp_custom_capwidth
```python
from test_axes import test_bxp_custom_capwidth
```



---
## test_bxp_bad_capwidths
```python
from test_axes import test_bxp_bad_capwidths
```



---
## test_boxplot
```python
from test_axes import test_boxplot
```



---
## test_boxplot_masked
```python
from test_axes import test_boxplot_masked
```



---
## test_boxplot_custom_capwidths
```python
from test_axes import test_boxplot_custom_capwidths
```



---
## test_boxplot_sym2
```python
from test_axes import test_boxplot_sym2
```



---
## test_boxplot_sym
```python
from test_axes import test_boxplot_sym
```



---
## test_boxplot_autorange_whiskers
```python
from test_axes import test_boxplot_autorange_whiskers
```



---
## _rc_test_bxp_helper
```python
from test_axes import _rc_test_bxp_helper
```



---
## test_boxplot_rc_parameters
```python
from test_axes import test_boxplot_rc_parameters
```



---
## test_boxplot_with_CIarray
```python
from test_axes import test_boxplot_with_CIarray
```



---
## test_boxplot_no_weird_whisker
```python
from test_axes import test_boxplot_no_weird_whisker
```



---
## test_boxplot_bad_medians
```python
from test_axes import test_boxplot_bad_medians
```



---
## test_boxplot_bad_ci
```python
from test_axes import test_boxplot_bad_ci
```



---
## test_boxplot_zorder
```python
from test_axes import test_boxplot_zorder
```



---
## test_boxplot_marker_behavior
```python
from test_axes import test_boxplot_marker_behavior
```



---
## test_boxplot_mod_artist_after_plotting
```python
from test_axes import test_boxplot_mod_artist_after_plotting
```



---
## test_vert_violinplot_baseline
```python
from test_axes import test_vert_violinplot_baseline
```



---
## test_vert_violinplot_showmeans
```python
from test_axes import test_vert_violinplot_showmeans
```



---
## test_vert_violinplot_showextrema
```python
from test_axes import test_vert_violinplot_showextrema
```



---
## test_vert_violinplot_showmedians
```python
from test_axes import test_vert_violinplot_showmedians
```



---
## test_vert_violinplot_showall
```python
from test_axes import test_vert_violinplot_showall
```



---
## test_vert_violinplot_custompoints_10
```python
from test_axes import test_vert_violinplot_custompoints_10
```



---
## test_vert_violinplot_custompoints_200
```python
from test_axes import test_vert_violinplot_custompoints_200
```



---
## test_horiz_violinplot_baseline
```python
from test_axes import test_horiz_violinplot_baseline
```



---
## test_horiz_violinplot_showmedians
```python
from test_axes import test_horiz_violinplot_showmedians
```



---
## test_horiz_violinplot_showmeans
```python
from test_axes import test_horiz_violinplot_showmeans
```



---
## test_horiz_violinplot_showextrema
```python
from test_axes import test_horiz_violinplot_showextrema
```



---
## test_horiz_violinplot_showall
```python
from test_axes import test_horiz_violinplot_showall
```



---
## test_horiz_violinplot_custompoints_10
```python
from test_axes import test_horiz_violinplot_custompoints_10
```



---
## test_horiz_violinplot_custompoints_200
```python
from test_axes import test_horiz_violinplot_custompoints_200
```



---
## test_violinplot_sides
```python
from test_axes import test_violinplot_sides
```



---
## test_violinplot_bad_positions
```python
from test_axes import test_violinplot_bad_positions
```



---
## test_violinplot_bad_widths
```python
from test_axes import test_violinplot_bad_widths
```



---
## test_violinplot_bad_quantiles
```python
from test_axes import test_violinplot_bad_quantiles
```



---
## test_violinplot_outofrange_quantiles
```python
from test_axes import test_violinplot_outofrange_quantiles
```



---
## test_violinplot_single_list_quantiles
```python
from test_axes import test_violinplot_single_list_quantiles
```



---
## test_violinplot_pandas_series
```python
from test_axes import test_violinplot_pandas_series
```



---
## test_manage_xticks
```python
from test_axes import test_manage_xticks
```



---
## test_boxplot_not_single
```python
from test_axes import test_boxplot_not_single
```



---
## test_tick_space_size_0
```python
from test_axes import test_tick_space_size_0
```



---
## test_errorbar
```python
from test_axes import test_errorbar
```



---
## test_mixed_errorbar_polar_caps
```python
from test_axes import test_mixed_errorbar_polar_caps
```

Mix several polar errorbar use cases in a single test figure.

It is advisable to position individual points off the grid. If there are
problems with reproducibility of this test, consider removing grid.

---
## test_errorbar_colorcycle
```python
from test_axes import test_errorbar_colorcycle
```



---
## test_errorbar_cycle_ecolor
```python
from test_axes import test_errorbar_cycle_ecolor
```



---
## test_errorbar_shape
```python
from test_axes import test_errorbar_shape
```



---
## test_errorbar_limits
```python
from test_axes import test_errorbar_limits
```



---
## test_errorbar_nonefmt
```python
from test_axes import test_errorbar_nonefmt
```



---
## test_errorbar_line_specific_kwargs
```python
from test_axes import test_errorbar_line_specific_kwargs
```



---
## test_errorbar_with_prop_cycle
```python
from test_axes import test_errorbar_with_prop_cycle
```



---
## test_errorbar_every_invalid
```python
from test_axes import test_errorbar_every_invalid
```



---
## test_xerr_yerr_not_negative
```python
from test_axes import test_xerr_yerr_not_negative
```



---
## test_xerr_yerr_not_none
```python
from test_axes import test_xerr_yerr_not_none
```



---
## test_errorbar_every
```python
from test_axes import test_errorbar_every
```



---
## test_errorbar_linewidth_type
```python
from test_axes import test_errorbar_linewidth_type
```



---
## test_errorbar_nan
```python
from test_axes import test_errorbar_nan
```



---
## test_hist_stacked_stepfilled
```python
from test_axes import test_hist_stacked_stepfilled
```



---
## test_hist_offset
```python
from test_axes import test_hist_offset
```



---
## test_hist_step
```python
from test_axes import test_hist_step
```



---
## test_hist_step_horiz
```python
from test_axes import test_hist_step_horiz
```



---
## test_hist_stacked_weighted
```python
from test_axes import test_hist_stacked_weighted
```



---
## test_stem
```python
from test_axes import test_stem
```



---
## test_stem_args
```python
from test_axes import test_stem_args
```

Test that stem() correctly identifies x and y values.

---
## test_stem_markerfmt
```python
from test_axes import test_stem_markerfmt
```

Test that stem(..., markerfmt=...) produces the intended markers.

---
## test_stem_dates
```python
from test_axes import test_stem_dates
```



---
## test_stem_orientation
```python
from test_axes import test_stem_orientation
```



---
## test_hist_stacked_stepfilled_alpha
```python
from test_axes import test_hist_stacked_stepfilled_alpha
```



---
## test_hist_stacked_step
```python
from test_axes import test_hist_stacked_step
```



---
## test_hist_stacked_density
```python
from test_axes import test_hist_stacked_density
```



---
## test_hist_step_bottom
```python
from test_axes import test_hist_step_bottom
```



---
## test_hist_step_geometry
```python
from test_axes import test_hist_step_geometry
```



---
## test_hist_step_bottom_geometry
```python
from test_axes import test_hist_step_bottom_geometry
```



---
## test_hist_stacked_step_geometry
```python
from test_axes import test_hist_stacked_step_geometry
```



---
## test_hist_stacked_step_bottom_geometry
```python
from test_axes import test_hist_stacked_step_bottom_geometry
```



---
## test_hist_stacked_bar
```python
from test_axes import test_hist_stacked_bar
```



---
## test_hist_barstacked_bottom_unchanged
```python
from test_axes import test_hist_barstacked_bottom_unchanged
```



---
## test_hist_emptydata
```python
from test_axes import test_hist_emptydata
```



---
## test_hist_labels
```python
from test_axes import test_hist_labels
```



---
## test_transparent_markers
```python
from test_axes import test_transparent_markers
```



---
## test_rgba_markers
```python
from test_axes import test_rgba_markers
```



---
## test_mollweide_grid
```python
from test_axes import test_mollweide_grid
```



---
## test_mollweide_forward_inverse_closure
```python
from test_axes import test_mollweide_forward_inverse_closure
```



---
## test_mollweide_inverse_forward_closure
```python
from test_axes import test_mollweide_inverse_forward_closure
```



---
## test_alpha
```python
from test_axes import test_alpha
```



---
## test_eventplot
```python
from test_axes import test_eventplot
```



---
## test_eventplot_defaults
```python
from test_axes import test_eventplot_defaults
```

test that eventplot produces the correct output given the default params
(see bug #3728)

---
## test_eventplot_colors
```python
from test_axes import test_eventplot_colors
```

Test the *colors* parameter of eventplot. Inspired by issue #8193.

---
## test_eventplot_alpha
```python
from test_axes import test_eventplot_alpha
```



---
## test_eventplot_problem_kwargs
```python
from test_axes import test_eventplot_problem_kwargs
```

test that 'singular' versions of LineCollection props raise an
MatplotlibDeprecationWarning rather than overriding the 'plural' versions
(e.g., to prevent 'color' from overriding 'colors', see issue #4297)

---
## test_empty_eventplot
```python
from test_axes import test_empty_eventplot
```



---
## test_eventplot_orientation
```python
from test_axes import test_eventplot_orientation
```

Introduced when fixing issue #6412.

---
## test_eventplot_units_list
```python
from test_axes import test_eventplot_units_list
```



---
## test_marker_styles
```python
from test_axes import test_marker_styles
```



---
## test_markers_fillstyle_rcparams
```python
from test_axes import test_markers_fillstyle_rcparams
```



---
## test_vertex_markers
```python
from test_axes import test_vertex_markers
```



---
## test_eb_line_zorder
```python
from test_axes import test_eb_line_zorder
```



---
## test_axline_loglog
```python
from test_axes import test_axline_loglog
```



---
## test_axline
```python
from test_axes import test_axline
```



---
## test_axline_transaxes
```python
from test_axes import test_axline_transaxes
```



---
## test_axline_transaxes_panzoom
```python
from test_axes import test_axline_transaxes_panzoom
```



---
## test_axline_args
```python
from test_axes import test_axline_args
```

Exactly one of *xy2* and *slope* must be specified.

---
## test_vlines
```python
from test_axes import test_vlines
```



---
## test_vlines_default
```python
from test_axes import test_vlines_default
```



---
## test_hlines
```python
from test_axes import test_hlines
```



---
## test_hlines_default
```python
from test_axes import test_hlines_default
```



---
## test_lines_with_colors
```python
from test_axes import test_lines_with_colors
```



---
## test_vlines_hlines_blended_transform
```python
from test_axes import test_vlines_hlines_blended_transform
```



---
## test_step_linestyle
```python
from test_axes import test_step_linestyle
```



---
## test_mixed_collection
```python
from test_axes import test_mixed_collection
```



---
## test_subplot_key_hash
```python
from test_axes import test_subplot_key_hash
```



---
## test_specgram
```python
from test_axes import test_specgram
```

Test axes.specgram in default (psd) mode.

---
## test_specgram_magnitude
```python
from test_axes import test_specgram_magnitude
```

Test axes.specgram in magnitude mode.

---
## test_specgram_angle
```python
from test_axes import test_specgram_angle
```

Test axes.specgram in angle and phase modes.

---
## test_specgram_fs_none
```python
from test_axes import test_specgram_fs_none
```

Test axes.specgram when Fs is None, should not throw error.

---
## test_specgram_origin_rcparam
```python
from test_axes import test_specgram_origin_rcparam
```

Test specgram ignores image.origin rcParam and uses origin 'upper'.

---
## test_specgram_origin_kwarg
```python
from test_axes import test_specgram_origin_kwarg
```

Ensure passing origin as a kwarg raises a TypeError.

---
## test_psd_csd
```python
from test_axes import test_psd_csd
```



---
## test_spectrum
```python
from test_axes import test_spectrum
```



---
## test_psd_csd_edge_cases
```python
from test_axes import test_psd_csd_edge_cases
```



---
## test_twin_remove
```python
from test_axes import test_twin_remove
```



---
## test_twin_spines
```python
from test_axes import test_twin_spines
```



---
## test_twin_spines_on_top
```python
from test_axes import test_twin_spines_on_top
```



---
## test_rcparam_grid_minor
```python
from test_axes import test_rcparam_grid_minor
```



---
## test_grid
```python
from test_axes import test_grid
```



---
## test_reset_grid
```python
from test_axes import test_reset_grid
```



---
## test_reset_ticks
```python
from test_axes import test_reset_ticks
```



---
## test_context_ticks
```python
from test_axes import test_context_ticks
```



---
## test_vline_limit
```python
from test_axes import test_vline_limit
```



---
## test_axline_minmax
```python
from test_axes import test_axline_minmax
```



---
## test_empty_shared_subplots
```python
from test_axes import test_empty_shared_subplots
```



---
## test_shared_with_aspect_1
```python
from test_axes import test_shared_with_aspect_1
```



---
## test_shared_with_aspect_2
```python
from test_axes import test_shared_with_aspect_2
```



---
## test_shared_with_aspect_3
```python
from test_axes import test_shared_with_aspect_3
```



---
## test_shared_aspect_error
```python
from test_axes import test_shared_aspect_error
```



---
## test_axis_errors
```python
from test_axes import test_axis_errors
```



---
## test_axis_method_errors
```python
from test_axes import test_axis_method_errors
```



---
## test_twin_with_aspect
```python
from test_axes import test_twin_with_aspect
```



---
## test_relim_visible_only
```python
from test_axes import test_relim_visible_only
```



---
## test_text_labelsize
```python
from test_axes import test_text_labelsize
```

tests for issue #1172

---
## test_pie_default
```python
from test_axes import test_pie_default
```



---
## test_pie_linewidth_0
```python
from test_axes import test_pie_linewidth_0
```



---
## test_pie_center_radius
```python
from test_axes import test_pie_center_radius
```



---
## test_pie_linewidth_2
```python
from test_axes import test_pie_linewidth_2
```



---
## test_pie_ccw_true
```python
from test_axes import test_pie_ccw_true
```



---
## test_pie_frame_grid
```python
from test_axes import test_pie_frame_grid
```



---
## test_pie_rotatelabels_true
```python
from test_axes import test_pie_rotatelabels_true
```



---
## test_pie_nolabel_but_legend
```python
from test_axes import test_pie_nolabel_but_legend
```



---
## test_pie_shadow
```python
from test_axes import test_pie_shadow
```



---
## test_pie_textprops
```python
from test_axes import test_pie_textprops
```



---
## test_pie_get_negative_values
```python
from test_axes import test_pie_get_negative_values
```



---
## test_normalize_kwarg_pie
```python
from test_axes import test_normalize_kwarg_pie
```



---
## test_pie_hatch_single
```python
from test_axes import test_pie_hatch_single
```



---
## test_pie_hatch_multi
```python
from test_axes import test_pie_hatch_multi
```



---
## test_set_get_ticklabels
```python
from test_axes import test_set_get_ticklabels
```



---
## test_set_ticks_kwargs_raise_error_without_labels
```python
from test_axes import test_set_ticks_kwargs_raise_error_without_labels
```

When labels=None and any kwarg is passed, axis.set_ticks() raises a
ValueError.

---
## test_set_ticks_with_labels
```python
from test_axes import test_set_ticks_with_labels
```

Test that these two are identical::

set_xticks(ticks); set_xticklabels(labels, **kwargs)
set_xticks(ticks, labels, **kwargs)

---
## test_xticks_bad_args
```python
from test_axes import test_xticks_bad_args
```



---
## test_subsampled_ticklabels
```python
from test_axes import test_subsampled_ticklabels
```



---
## test_mismatched_ticklabels
```python
from test_axes import test_mismatched_ticklabels
```



---
## test_empty_ticks_fixed_loc
```python
from test_axes import test_empty_ticks_fixed_loc
```



---
## test_retain_tick_visibility
```python
from test_axes import test_retain_tick_visibility
```



---
## test_warn_too_few_labels
```python
from test_axes import test_warn_too_few_labels
```



---
## test_tick_label_update
```python
from test_axes import test_tick_label_update
```



---
## test_o_marker_path_snap
```python
from test_axes import test_o_marker_path_snap
```



---
## test_margins
```python
from test_axes import test_margins
```



---
## test_margin_getters
```python
from test_axes import test_margin_getters
```



---
## test_set_margin_updates_limits
```python
from test_axes import test_set_margin_updates_limits
```



---
## test_margins_errors
```python
from test_axes import test_margins_errors
```



---
## test_length_one_hist
```python
from test_axes import test_length_one_hist
```



---
## test_set_xy_bound
```python
from test_axes import test_set_xy_bound
```



---
## test_pathological_hexbin
```python
from test_axes import test_pathological_hexbin
```



---
## test_color_None
```python
from test_axes import test_color_None
```



---
## test_color_alias
```python
from test_axes import test_color_alias
```



---
## test_numerical_hist_label
```python
from test_axes import test_numerical_hist_label
```



---
## test_unicode_hist_label
```python
from test_axes import test_unicode_hist_label
```



---
## test_move_offsetlabel
```python
from test_axes import test_move_offsetlabel
```



---
## test_rc_spines
```python
from test_axes import test_rc_spines
```



---
## test_rc_grid
```python
from test_axes import test_rc_grid
```



---
## test_rc_tick
```python
from test_axes import test_rc_tick
```



---
## test_rc_major_minor_tick
```python
from test_axes import test_rc_major_minor_tick
```



---
## test_square_plot
```python
from test_axes import test_square_plot
```



---
## test_bad_plot_args
```python
from test_axes import test_bad_plot_args
```



---
## test_pcolorfast
```python
from test_axes import test_pcolorfast
```



---
## test_pcolorfast_bad_dims
```python
from test_axes import test_pcolorfast_bad_dims
```



---
## test_shared_scale
```python
from test_axes import test_shared_scale
```



---
## test_shared_bool
```python
from test_axes import test_shared_bool
```



---
## test_violin_point_mass
```python
from test_axes import test_violin_point_mass
```

Violin plot should handle point mass pdf gracefully.

---
## generate_errorbar_inputs
```python
from test_axes import generate_errorbar_inputs
```



---
## test_errorbar_inputs_shotgun
```python
from test_axes import test_errorbar_inputs_shotgun
```



---
## test_dash_offset
```python
from test_axes import test_dash_offset
```



---
## test_title_pad
```python
from test_axes import test_title_pad
```



---
## test_title_location_roundtrip
```python
from test_axes import test_title_location_roundtrip
```



---
## test_title_location_shared
```python
from test_axes import test_title_location_shared
```



---
## test_loglog
```python
from test_axes import test_loglog
```



---
## test_loglog_nonpos
```python
from test_axes import test_loglog_nonpos
```



---
## test_axes_margins
```python
from test_axes import test_axes_margins
```



---
## shared_axis_remover
```python
from test_axes import shared_axis_remover
```



---
## shared_axes_generator
```python
from test_axes import shared_axes_generator
```



---
## test_remove_shared_axes
```python
from test_axes import test_remove_shared_axes
```



---
## test_remove_shared_axes_relim
```python
from test_axes import test_remove_shared_axes_relim
```



---
## test_shared_axes_autoscale
```python
from test_axes import test_shared_axes_autoscale
```



---
## test_adjust_numtick_aspect
```python
from test_axes import test_adjust_numtick_aspect
```



---
## test_auto_numticks
```python
from test_axes import test_auto_numticks
```



---
## test_auto_numticks_log
```python
from test_axes import test_auto_numticks_log
```



---
## test_broken_barh_empty
```python
from test_axes import test_broken_barh_empty
```



---
## test_broken_barh_timedelta
```python
from test_axes import test_broken_barh_timedelta
```

Check that timedelta works as x, dx pair for this method.

---
## test_pandas_pcolormesh
```python
from test_axes import test_pandas_pcolormesh
```



---
## test_pandas_indexing_dates
```python
from test_axes import test_pandas_indexing_dates
```



---
## test_pandas_errorbar_indexing
```python
from test_axes import test_pandas_errorbar_indexing
```



---
## test_pandas_index_shape
```python
from test_axes import test_pandas_index_shape
```



---
## test_pandas_indexing_hist
```python
from test_axes import test_pandas_indexing_hist
```



---
## test_pandas_bar_align_center
```python
from test_axes import test_pandas_bar_align_center
```



---
## test_axis_get_tick_params
```python
from test_axes import test_axis_get_tick_params
```



---
## test_axis_set_tick_params_labelsize_labelcolor
```python
from test_axes import test_axis_set_tick_params_labelsize_labelcolor
```



---
## test_axes_tick_params_gridlines
```python
from test_axes import test_axes_tick_params_gridlines
```



---
## test_axes_tick_params_ylabelside
```python
from test_axes import test_axes_tick_params_ylabelside
```



---
## test_axes_tick_params_xlabelside
```python
from test_axes import test_axes_tick_params_xlabelside
```



---
## test_none_kwargs
```python
from test_axes import test_none_kwargs
```



---
## test_bar_uint8
```python
from test_axes import test_bar_uint8
```



---
## test_date_timezone_x
```python
from test_axes import test_date_timezone_x
```



---
## test_date_timezone_y
```python
from test_axes import test_date_timezone_y
```



---
## test_date_timezone_x_and_y
```python
from test_axes import test_date_timezone_x_and_y
```



---
## test_axisbelow
```python
from test_axes import test_axisbelow
```



---
## test_titletwiny
```python
from test_axes import test_titletwiny
```



---
## test_titlesetpos
```python
from test_axes import test_titlesetpos
```



---
## test_title_xticks_top
```python
from test_axes import test_title_xticks_top
```



---
## test_title_xticks_top_both
```python
from test_axes import test_title_xticks_top_both
```



---
## test_title_above_offset
```python
from test_axes import test_title_above_offset
```



---
## test_title_no_move_off_page
```python
from test_axes import test_title_no_move_off_page
```



---
## test_offset_label_color
```python
from test_axes import test_offset_label_color
```



---
## test_offset_text_visible
```python
from test_axes import test_offset_text_visible
```



---
## test_large_offset
```python
from test_axes import test_large_offset
```



---
## test_barb_units
```python
from test_axes import test_barb_units
```



---
## test_quiver_units
```python
from test_axes import test_quiver_units
```



---
## test_bar_color_cycle
```python
from test_axes import test_bar_color_cycle
```



---
## test_tick_param_label_rotation
```python
from test_axes import test_tick_param_label_rotation
```



---
## test_fillbetween_cycle
```python
from test_axes import test_fillbetween_cycle
```



---
## test_log_margins
```python
from test_axes import test_log_margins
```



---
## test_color_length_mismatch
```python
from test_axes import test_color_length_mismatch
```



---
## test_eventplot_legend
```python
from test_axes import test_eventplot_legend
```



---
## test_eventplot_errors
```python
from test_axes import test_eventplot_errors
```



---
## test_bar_broadcast_args
```python
from test_axes import test_bar_broadcast_args
```



---
## test_invalid_axis_limits
```python
from test_axes import test_invalid_axis_limits
```



---
## test_minorticks_on
```python
from test_axes import test_minorticks_on
```



---
## test_twinx_knows_limits
```python
from test_axes import test_twinx_knows_limits
```



---
## test_zero_linewidth
```python
from test_axes import test_zero_linewidth
```



---
## test_empty_errorbar_legend
```python
from test_axes import test_empty_errorbar_legend
```



---
## test_plot_decimal
```python
from test_axes import test_plot_decimal
```



---
## test_markerfacecolor_none_alpha
```python
from test_axes import test_markerfacecolor_none_alpha
```



---
## test_tick_padding_tightbbox
```python
from test_axes import test_tick_padding_tightbbox
```

Test that tick padding gets turned off if axis is off

---
## test_inset
```python
from test_axes import test_inset
```

Ensure that inset_ax argument is indeed optional

---
## test_zoom_inset
```python
from test_axes import test_zoom_inset
```



---
## test_inset_polar
```python
from test_axes import test_inset_polar
```



---
## test_inset_projection
```python
from test_axes import test_inset_projection
```



---
## test_inset_subclass
```python
from test_axes import test_inset_subclass
```



---
## test_indicate_inset_inverted
```python
from test_axes import test_indicate_inset_inverted
```

Test that the inset lines are correctly located with inverted data axes.

---
## test_set_position
```python
from test_axes import test_set_position
```



---
## test_spines_properbbox_after_zoom
```python
from test_axes import test_spines_properbbox_after_zoom
```



---
## test_limits_after_scroll_zoom
```python
from test_axes import test_limits_after_scroll_zoom
```



---
## test_gettightbbox_ignore_nan
```python
from test_axes import test_gettightbbox_ignore_nan
```



---
## test_scatter_series_non_zero_index
```python
from test_axes import test_scatter_series_non_zero_index
```



---
## test_scatter_empty_data
```python
from test_axes import test_scatter_empty_data
```



---
## test_annotate_across_transforms
```python
from test_axes import test_annotate_across_transforms
```



---
## _Translation
```python
from test_axes import _Translation
```



---
## test_secondary_xy
```python
from test_axes import test_secondary_xy
```



---
## test_secondary_fail
```python
from test_axes import test_secondary_fail
```



---
## test_secondary_resize
```python
from test_axes import test_secondary_resize
```



---
## test_secondary_minorloc
```python
from test_axes import test_secondary_minorloc
```



---
## test_secondary_formatter
```python
from test_axes import test_secondary_formatter
```



---
## test_secondary_repr
```python
from test_axes import test_secondary_repr
```



---
## test_axis_options
```python
from test_axes import test_axis_options
```



---
## color_boxes
```python
from test_axes import color_boxes
```

Helper for the tests below that test the extents of various Axes elements

---
## test_normal_axes
```python
from test_axes import test_normal_axes
```



---
## test_nodecorator
```python
from test_axes import test_nodecorator
```



---
## test_displaced_spine
```python
from test_axes import test_displaced_spine
```



---
## test_tickdirs
```python
from test_axes import test_tickdirs
```

Switch the tickdirs and make sure the bboxes switch with them

---
## test_minor_accountedfor
```python
from test_axes import test_minor_accountedfor
```



---
## test_axis_bool_arguments
```python
from test_axes import test_axis_bool_arguments
```



---
## test_axis_extent_arg
```python
from test_axes import test_axis_extent_arg
```



---
## test_axis_extent_arg2
```python
from test_axes import test_axis_extent_arg2
```



---
## test_hist_auto_bins
```python
from test_axes import test_hist_auto_bins
```



---
## test_hist_nan_data
```python
from test_axes import test_hist_nan_data
```



---
## test_hist_range_and_density
```python
from test_axes import test_hist_range_and_density
```



---
## test_bar_errbar_zorder
```python
from test_axes import test_bar_errbar_zorder
```



---
## test_set_ticks_inverted
```python
from test_axes import test_set_ticks_inverted
```



---
## test_aspect_nonlinear_adjustable_box
```python
from test_axes import test_aspect_nonlinear_adjustable_box
```



---
## test_aspect_nonlinear_adjustable_datalim
```python
from test_axes import test_aspect_nonlinear_adjustable_datalim
```



---
## test_box_aspect
```python
from test_axes import test_box_aspect
```



---
## test_box_aspect_custom_position
```python
from test_axes import test_box_aspect_custom_position
```



---
## test_bbox_aspect_axes_init
```python
from test_axes import test_bbox_aspect_axes_init
```



---
## test_set_aspect_negative
```python
from test_axes import test_set_aspect_negative
```



---
## test_redraw_in_frame
```python
from test_axes import test_redraw_in_frame
```



---
## test_invisible_axes_events
```python
from test_axes import test_invisible_axes_events
```



---
## test_xtickcolor_is_not_markercolor
```python
from test_axes import test_xtickcolor_is_not_markercolor
```



---
## test_ytickcolor_is_not_markercolor
```python
from test_axes import test_ytickcolor_is_not_markercolor
```



---
## test_unautoscale
```python
from test_axes import test_unautoscale
```



---
## test_polar_interpolation_steps_variable_r
```python
from test_axes import test_polar_interpolation_steps_variable_r
```



---
## test_autoscale_tiny_sticky
```python
from test_axes import test_autoscale_tiny_sticky
```



---
## test_xtickcolor_is_not_xticklabelcolor
```python
from test_axes import test_xtickcolor_is_not_xticklabelcolor
```



---
## test_ytickcolor_is_not_yticklabelcolor
```python
from test_axes import test_ytickcolor_is_not_yticklabelcolor
```



---
## test_xaxis_offsetText_color
```python
from test_axes import test_xaxis_offsetText_color
```



---
## test_yaxis_offsetText_color
```python
from test_axes import test_yaxis_offsetText_color
```



---
## test_relative_ticklabel_sizes
```python
from test_axes import test_relative_ticklabel_sizes
```



---
## test_multiplot_autoscale
```python
from test_axes import test_multiplot_autoscale
```



---
## test_sharing_does_not_link_positions
```python
from test_axes import test_sharing_does_not_link_positions
```



---
## test_2dcolor_plot
```python
from test_axes import test_2dcolor_plot
```



---
## test_shared_axes_clear
```python
from test_axes import test_shared_axes_clear
```



---
## test_shared_axes_retick
```python
from test_axes import test_shared_axes_retick
```



---
## test_ylabel_ha_with_position
```python
from test_axes import test_ylabel_ha_with_position
```



---
## test_bar_label_location_vertical
```python
from test_axes import test_bar_label_location_vertical
```



---
## test_bar_label_location_vertical_yinverted
```python
from test_axes import test_bar_label_location_vertical_yinverted
```



---
## test_bar_label_location_horizontal
```python
from test_axes import test_bar_label_location_horizontal
```



---
## test_bar_label_location_horizontal_yinverted
```python
from test_axes import test_bar_label_location_horizontal_yinverted
```



---
## test_bar_label_location_horizontal_xinverted
```python
from test_axes import test_bar_label_location_horizontal_xinverted
```



---
## test_bar_label_location_horizontal_xyinverted
```python
from test_axes import test_bar_label_location_horizontal_xyinverted
```



---
## test_bar_label_location_center
```python
from test_axes import test_bar_label_location_center
```



---
## test_centered_bar_label_nonlinear
```python
from test_axes import test_centered_bar_label_nonlinear
```



---
## test_centered_bar_label_label_beyond_limits
```python
from test_axes import test_centered_bar_label_label_beyond_limits
```



---
## test_bar_label_location_errorbars
```python
from test_axes import test_bar_label_location_errorbars
```



---
## test_bar_label_fmt
```python
from test_axes import test_bar_label_fmt
```



---
## test_bar_label_fmt_error
```python
from test_axes import test_bar_label_fmt_error
```



---
## test_bar_label_labels
```python
from test_axes import test_bar_label_labels
```



---
## test_bar_label_nan_ydata
```python
from test_axes import test_bar_label_nan_ydata
```



---
## test_bar_label_nan_ydata_inverted
```python
from test_axes import test_bar_label_nan_ydata_inverted
```



---
## test_nan_barlabels
```python
from test_axes import test_nan_barlabels
```



---
## test_patch_bounds
```python
from test_axes import test_patch_bounds
```



---
## test_warn_ignored_scatter_kwargs
```python
from test_axes import test_warn_ignored_scatter_kwargs
```



---
## test_artist_sublists
```python
from test_axes import test_artist_sublists
```



---
## test_empty_line_plots
```python
from test_axes import test_empty_line_plots
```



---
## test_plot_format_errors
```python
from test_axes import test_plot_format_errors
```



---
## test_plot_format
```python
from test_axes import test_plot_format
```



---
## test_automatic_legend
```python
from test_axes import test_automatic_legend
```



---
## test_plot_errors
```python
from test_axes import test_plot_errors
```



---
## test_clim
```python
from test_axes import test_clim
```



---
## test_bezier_autoscale
```python
from test_axes import test_bezier_autoscale
```



---
## test_small_autoscale
```python
from test_axes import test_small_autoscale
```



---
## test_get_xticklabel
```python
from test_axes import test_get_xticklabel
```



---
## test_bar_leading_nan
```python
from test_axes import test_bar_leading_nan
```



---
## test_bar_all_nan
```python
from test_axes import test_bar_all_nan
```



---
## test_extent_units
```python
from test_axes import test_extent_units
```



---
## test_cla_clears_children_axes_and_fig
```python
from test_axes import test_cla_clears_children_axes_and_fig
```



---
## test_child_axes_removal
```python
from test_axes import test_child_axes_removal
```



---
## test_scatter_color_repr_error
```python
from test_axes import test_scatter_color_repr_error
```



---
## test_zorder_and_explicit_rasterization
```python
from test_axes import test_zorder_and_explicit_rasterization
```



---
## test_preset_clip_paths
```python
from test_axes import test_preset_clip_paths
```



---
## test_rc_axes_label_formatting
```python
from test_axes import test_rc_axes_label_formatting
```



---
## test_ecdf
```python
from test_axes import test_ecdf
```



---
## test_ecdf_invalid
```python
from test_axes import test_ecdf_invalid
```



---
## test_fill_between_axes_limits
```python
from test_axes import test_fill_between_axes_limits
```



---
## test_tick_param_labelfont
```python
from test_axes import test_tick_param_labelfont
```



---
## test_set_secondary_axis_color
```python
from test_axes import test_set_secondary_axis_color
```



---
## test_xylim_changed_shared
```python
from test_axes import test_xylim_changed_shared
```



---
## test_axhvlinespan_interpolation
```python
from test_axes import test_axhvlinespan_interpolation
```



---
## test_axes_clear_behavior
```python
from test_axes import test_axes_clear_behavior
```

Test that the given tick params are not reset by ax.clear().

---
## test_boxplot_tick_labels
```python
from test_axes import test_boxplot_tick_labels
```



---
## test_latex_pie_percent
```python
from test_axes import test_latex_pie_percent
```



---
## _formfunc
```python
from test_axes import _formfunc
```



---
## SubClaAxes
```python
from test_axes import SubClaAxes
```



---
## ClearAxes
```python
from test_axes import ClearAxes
```



---
## ClearSuperAxes
```python
from test_axes import ClearSuperAxes
```



---
## SubClearAxes
```python
from test_axes import SubClearAxes
```



---
## test_scatter_plot
```python
from test_axes import test_scatter_plot
```



---
## test_scatter_marker
```python
from test_axes import test_scatter_marker
```



---
## test_scatter_2D
```python
from test_axes import test_scatter_2D
```



---
## test_scatter_decimal
```python
from test_axes import test_scatter_decimal
```



---
## test_scatter_color
```python
from test_axes import test_scatter_color
```



---
## test_scatter_color_warning
```python
from test_axes import test_scatter_color_warning
```



---
## test_scatter_unfilled
```python
from test_axes import test_scatter_unfilled
```



---
## test_scatter_unfillable
```python
from test_axes import test_scatter_unfillable
```



---
## test_scatter_size_arg_size
```python
from test_axes import test_scatter_size_arg_size
```



---
## test_scatter_edgecolor_RGB
```python
from test_axes import test_scatter_edgecolor_RGB
```



---
## test_scatter_invalid_color
```python
from test_axes import test_scatter_invalid_color
```



---
## test_scatter_no_invalid_color
```python
from test_axes import test_scatter_no_invalid_color
```



---
## test_scatter_norm_vminvmax
```python
from test_axes import test_scatter_norm_vminvmax
```

Parameters vmin, vmax should error if norm is given.

---
## test_scatter_single_point
```python
from test_axes import test_scatter_single_point
```



---
## test_scatter_different_shapes
```python
from test_axes import test_scatter_different_shapes
```



---
## test_scatter_c
```python
from test_axes import test_scatter_c
```



---
## test_scatter_single_color_c
```python
from test_axes import test_scatter_single_color_c
```



---
## test_scatter_linewidths
```python
from test_axes import test_scatter_linewidths
```



---
## test_scatter_singular_plural_arguments
```python
from test_axes import test_scatter_singular_plural_arguments
```



---
## get_next_color
```python
from test_axes import get_next_color
```



---
## Polar
```python
from test_axes import Polar
```



---
## layers
```python
from test_axes import layers
```



---
## transform
```python
from test_axes import transform
```



---
## _assert_equal
```python
from test_axes import _assert_equal
```

Check that the given StemContainer has the properties listed as
keyword-arguments.

---
## make_patch_spines_invisible
```python
from test_axes import make_patch_spines_invisible
```



---
## formatter_func
```python
from test_axes import formatter_func
```



---
## _helper_x
```python
from test_axes import _helper_x
```



---
## _helper_y
```python
from test_axes import _helper_y
```



---
## __init__
```python
from test_axes import __init__
```



---
## inverted
```python
from test_axes import inverted
```



---
## invert
```python
from test_axes import invert
```



---
## ClaAxes
```python
from test_axes import ClaAxes
```



---
## ClaSuperAxes
```python
from test_axes import ClaSuperAxes
```



---
## clear
```python
from test_axes import clear
```



---
## _as_mpl_axes
```python
from test_axes import _as_mpl_axes
```



---
## cla
```python
from test_axes import cla
```



---
## __name__
```python
from test_figure import __name__
```



---
## test_align_labels
```python
from test_figure import test_align_labels
```



---
## test_align_titles
```python
from test_figure import test_align_titles
```



---
## test_align_labels_stray_axes
```python
from test_figure import test_align_labels_stray_axes
```



---
## test_figure_label
```python
from test_figure import test_figure_label
```



---
## test_fignum_exists
```python
from test_figure import test_fignum_exists
```



---
## test_clf_keyword
```python
from test_figure import test_clf_keyword
```



---
## test_figure
```python
from test_figure import test_figure
```



---
## test_figure_legend
```python
from test_figure import test_figure_legend
```



---
## test_gca
```python
from test_figure import test_gca
```



---
## test_add_subplot_subclass
```python
from test_figure import test_add_subplot_subclass
```



---
## test_add_subplot_invalid
```python
from test_figure import test_add_subplot_invalid
```



---
## test_suptitle
```python
from test_figure import test_suptitle
```



---
## test_suptitle_fontproperties
```python
from test_figure import test_suptitle_fontproperties
```



---
## test_suptitle_subfigures
```python
from test_figure import test_suptitle_subfigures
```



---
## test_get_suptitle_supxlabel_supylabel
```python
from test_figure import test_get_suptitle_supxlabel_supylabel
```



---
## test_alpha
```python
from test_figure import test_alpha
```



---
## test_too_many_figures
```python
from test_figure import test_too_many_figures
```



---
## test_iterability_axes_argument
```python
from test_figure import test_iterability_axes_argument
```



---
## test_set_fig_size
```python
from test_figure import test_set_fig_size
```



---
## test_axes_remove
```python
from test_figure import test_axes_remove
```



---
## test_figaspect
```python
from test_figure import test_figaspect
```



---
## test_autofmt_xdate
```python
from test_figure import test_autofmt_xdate
```



---
## test_change_dpi
```python
from test_figure import test_change_dpi
```



---
## test_invalid_figure_size
```python
from test_figure import test_invalid_figure_size
```



---
## test_invalid_figure_add_axes
```python
from test_figure import test_invalid_figure_add_axes
```



---
## test_subplots_shareax_loglabels
```python
from test_figure import test_subplots_shareax_loglabels
```



---
## test_savefig
```python
from test_figure import test_savefig
```



---
## test_savefig_warns
```python
from test_figure import test_savefig_warns
```



---
## test_savefig_backend
```python
from test_figure import test_savefig_backend
```



---
## test_savefig_pixel_ratio
```python
from test_figure import test_savefig_pixel_ratio
```



---
## test_savefig_preserve_layout_engine
```python
from test_figure import test_savefig_preserve_layout_engine
```



---
## test_savefig_locate_colorbar
```python
from test_figure import test_savefig_locate_colorbar
```



---
## test_savefig_transparent
```python
from test_figure import test_savefig_transparent
```



---
## test_figure_repr
```python
from test_figure import test_figure_repr
```



---
## test_valid_layouts
```python
from test_figure import test_valid_layouts
```



---
## test_invalid_layouts
```python
from test_figure import test_invalid_layouts
```



---
## test_tightlayout_autolayout_deconflict
```python
from test_figure import test_tightlayout_autolayout_deconflict
```



---
## test_layout_change_warning
```python
from test_figure import test_layout_change_warning
```

Raise a warning when a previously assigned layout changes to tight using
plt.tight_layout().

---
## test_repeated_tightlayout
```python
from test_figure import test_repeated_tightlayout
```



---
## test_add_artist
```python
from test_figure import test_add_artist
```



---
## test_fspath
```python
from test_figure import test_fspath
```



---
## test_tightbbox
```python
from test_figure import test_tightbbox
```



---
## test_axes_removal
```python
from test_figure import test_axes_removal
```



---
## test_removed_axis
```python
from test_figure import test_removed_axis
```



---
## test_figure_clear
```python
from test_figure import test_figure_clear
```



---
## test_clf_not_redefined
```python
from test_figure import test_clf_not_redefined
```



---
## test_picking_does_not_stale
```python
from test_figure import test_picking_does_not_stale
```



---
## test_add_subplot_twotuple
```python
from test_figure import test_add_subplot_twotuple
```



---
## test_tightbbox_box_aspect
```python
from test_figure import test_tightbbox_box_aspect
```



---
## test_animated_with_canvas_change
```python
from test_figure import test_animated_with_canvas_change
```



---
## TestSubplotMosaic
```python
from test_figure import TestSubplotMosaic
```



---
## test_reused_gridspec
```python
from test_figure import test_reused_gridspec
```

Test that these all use the same gridspec

---
## test_subfigure
```python
from test_figure import test_subfigure
```



---
## test_subfigure_tightbbox
```python
from test_figure import test_subfigure_tightbbox
```



---
## test_subfigure_dpi
```python
from test_figure import test_subfigure_dpi
```



---
## test_subfigure_ss
```python
from test_figure import test_subfigure_ss
```



---
## test_subfigure_double
```python
from test_figure import test_subfigure_double
```



---
## test_subfigure_spanning
```python
from test_figure import test_subfigure_spanning
```



---
## test_subfigure_ticks
```python
from test_figure import test_subfigure_ticks
```



---
## test_subfigure_scatter_size
```python
from test_figure import test_subfigure_scatter_size
```



---
## test_subfigure_pdf
```python
from test_figure import test_subfigure_pdf
```



---
## test_subfigures_wspace_hspace
```python
from test_figure import test_subfigures_wspace_hspace
```



---
## test_subfigure_remove
```python
from test_figure import test_subfigure_remove
```



---
## test_add_subplot_kwargs
```python
from test_figure import test_add_subplot_kwargs
```



---
## test_add_axes_kwargs
```python
from test_figure import test_add_axes_kwargs
```



---
## test_ginput
```python
from test_figure import test_ginput
```



---
## test_waitforbuttonpress
```python
from test_figure import test_waitforbuttonpress
```



---
## test_kwargs_pass
```python
from test_figure import test_kwargs_pass
```



---
## test_rcparams
```python
from test_figure import test_rcparams
```



---
## test_deepcopy
```python
from test_figure import test_deepcopy
```



---
## test_unpickle_with_device_pixel_ratio
```python
from test_figure import test_unpickle_with_device_pixel_ratio
```



---
## test_gridspec_no_mutate_input
```python
from test_figure import test_gridspec_no_mutate_input
```



---
## test_savefig_metadata
```python
from test_figure import test_savefig_metadata
```



---
## test_savefig_metadata_error
```python
from test_figure import test_savefig_metadata_error
```



---
## test_get_constrained_layout_pads
```python
from test_figure import test_get_constrained_layout_pads
```



---
## test_not_visible_figure
```python
from test_figure import test_not_visible_figure
```



---
## test_warn_colorbar_mismatch
```python
from test_figure import test_warn_colorbar_mismatch
```



---
## test_subfigure_stale_propagation
```python
from test_figure import test_subfigure_stale_propagation
```



---
## MyAxes
```python
from test_figure import MyAxes
```



---
## MyClass
```python
from test_figure import MyClass
```



---
## test_basic
```python
from test_figure import test_basic
```



---
## test_all_nested
```python
from test_figure import test_all_nested
```



---
## test_nested
```python
from test_figure import test_nested
```



---
## test_nested_tuple
```python
from test_figure import test_nested_tuple
```



---
## test_nested_width_ratios
```python
from test_figure import test_nested_width_ratios
```



---
## test_nested_height_ratios
```python
from test_figure import test_nested_height_ratios
```



---
## test_empty
```python
from test_figure import test_empty
```



---
## test_fail_list_of_str
```python
from test_figure import test_fail_list_of_str
```



---
## test_subplot_kw
```python
from test_figure import test_subplot_kw
```



---
## test_per_subplot_kw
```python
from test_figure import test_per_subplot_kw
```



---
## test_string_parser
```python
from test_figure import test_string_parser
```



---
## test_per_subplot_kw_expander
```python
from test_figure import test_per_subplot_kw_expander
```



---
## test_extra_per_subplot_kw
```python
from test_figure import test_extra_per_subplot_kw
```



---
## test_single_str_input
```python
from test_figure import test_single_str_input
```



---
## test_fail
```python
from test_figure import test_fail
```



---
## test_hashable_keys
```python
from test_figure import test_hashable_keys
```



---
## test_user_order
```python
from test_figure import test_user_order
```



---
## test_nested_user_order
```python
from test_figure import test_nested_user_order
```



---
## test_share_all
```python
from test_figure import test_share_all
```



---
## single_press
```python
from test_figure import single_press
```



---
## multi_presses
```python
from test_figure import multi_presses
```



---
## __init__
```python
from test_figure import __init__
```



---
## __getitem__
```python
from test_figure import __getitem__
```



---
## _as_mpl_axes
```python
from test_figure import _as_mpl_axes
```



---
## __name__
```python
from test_legend import __name__
```



---
## test_legend_ordereddict
```python
from test_legend import test_legend_ordereddict
```



---
## test_legend_auto1
```python
from test_legend import test_legend_auto1
```

Test automatic legend placement

---
## test_legend_auto2
```python
from test_legend import test_legend_auto2
```

Test automatic legend placement

---
## test_legend_auto3
```python
from test_legend import test_legend_auto3
```

Test automatic legend placement

---
## test_legend_auto4
```python
from test_legend import test_legend_auto4
```

Check that the legend location with automatic placement is the same,
whatever the histogram type is. Related to issue #9580.

---
## test_legend_auto5
```python
from test_legend import test_legend_auto5
```

Check that the automatic placement handle a rather complex
case with non rectangular patch. Related to issue #9580.

---
## test_various_labels
```python
from test_legend import test_various_labels
```



---
## test_legend_label_with_leading_underscore
```python
from test_legend import test_legend_label_with_leading_underscore
```

Test that artists with labels starting with an underscore are not added to
the legend, and that a warning is issued if one tries to add them
explicitly.

---
## test_labels_first
```python
from test_legend import test_labels_first
```



---
## test_multiple_keys
```python
from test_legend import test_multiple_keys
```



---
## test_alpha_rgba
```python
from test_legend import test_alpha_rgba
```



---
## test_alpha_rcparam
```python
from test_legend import test_alpha_rcparam
```



---
## test_fancy
```python
from test_legend import test_fancy
```



---
## test_framealpha
```python
from test_legend import test_framealpha
```



---
## test_rc
```python
from test_legend import test_rc
```



---
## test_legend_expand
```python
from test_legend import test_legend_expand
```

Test expand mode

---
## test_hatching
```python
from test_legend import test_hatching
```



---
## test_legend_remove
```python
from test_legend import test_legend_remove
```



---
## test_reverse_legend_handles_and_labels
```python
from test_legend import test_reverse_legend_handles_and_labels
```

Check that the legend handles and labels are reversed.

---
## test_reverse_legend_display
```python
from test_legend import test_reverse_legend_display
```

Check that the rendered legend entries are reversed

---
## TestLegendFunction
```python
from test_legend import TestLegendFunction
```



---
## TestLegendFigureFunction
```python
from test_legend import TestLegendFigureFunction
```



---
## test_figure_legend_outside
```python
from test_legend import test_figure_legend_outside
```



---
## test_legend_stackplot
```python
from test_legend import test_legend_stackplot
```

Test legend for PolyCollection using stackplot.

---
## test_cross_figure_patch_legend
```python
from test_legend import test_cross_figure_patch_legend
```



---
## test_nanscatter
```python
from test_legend import test_nanscatter
```



---
## test_legend_repeatcheckok
```python
from test_legend import test_legend_repeatcheckok
```



---
## test_not_covering_scatter
```python
from test_legend import test_not_covering_scatter
```



---
## test_not_covering_scatter_transform
```python
from test_legend import test_not_covering_scatter_transform
```



---
## test_linecollection_scaled_dashes
```python
from test_legend import test_linecollection_scaled_dashes
```



---
## test_handler_numpoints
```python
from test_legend import test_handler_numpoints
```

Test legend handler with numpoints <= 1.

---
## test_text_nohandler_warning
```python
from test_legend import test_text_nohandler_warning
```

Test that Text artists with labels raise a warning

---
## test_empty_bar_chart_with_legend
```python
from test_legend import test_empty_bar_chart_with_legend
```

Test legend when bar chart is empty with a label.

---
## test_shadow_argument_types
```python
from test_legend import test_shadow_argument_types
```



---
## test_shadow_invalid_argument
```python
from test_legend import test_shadow_invalid_argument
```



---
## test_shadow_framealpha
```python
from test_legend import test_shadow_framealpha
```



---
## test_legend_title_empty
```python
from test_legend import test_legend_title_empty
```



---
## test_legend_proper_window_extent
```python
from test_legend import test_legend_proper_window_extent
```



---
## test_window_extent_cached_renderer
```python
from test_legend import test_window_extent_cached_renderer
```



---
## test_legend_title_fontprop_fontsize
```python
from test_legend import test_legend_title_fontprop_fontsize
```



---
## test_legend_alignment
```python
from test_legend import test_legend_alignment
```



---
## test_ax_legend_set_loc
```python
from test_legend import test_ax_legend_set_loc
```



---
## test_fig_legend_set_loc
```python
from test_legend import test_fig_legend_set_loc
```



---
## test_legend_set_alignment
```python
from test_legend import test_legend_set_alignment
```



---
## test_legend_labelcolor_single
```python
from test_legend import test_legend_labelcolor_single
```



---
## test_legend_labelcolor_list
```python
from test_legend import test_legend_labelcolor_list
```



---
## test_legend_labelcolor_linecolor
```python
from test_legend import test_legend_labelcolor_linecolor
```



---
## test_legend_pathcollection_labelcolor_linecolor
```python
from test_legend import test_legend_pathcollection_labelcolor_linecolor
```



---
## test_legend_pathcollection_labelcolor_linecolor_iterable
```python
from test_legend import test_legend_pathcollection_labelcolor_linecolor_iterable
```



---
## test_legend_pathcollection_labelcolor_linecolor_cmap
```python
from test_legend import test_legend_pathcollection_labelcolor_linecolor_cmap
```



---
## test_legend_labelcolor_markeredgecolor
```python
from test_legend import test_legend_labelcolor_markeredgecolor
```



---
## test_legend_pathcollection_labelcolor_markeredgecolor
```python
from test_legend import test_legend_pathcollection_labelcolor_markeredgecolor
```



---
## test_legend_pathcollection_labelcolor_markeredgecolor_iterable
```python
from test_legend import test_legend_pathcollection_labelcolor_markeredgecolor_iterable
```



---
## test_legend_pathcollection_labelcolor_markeredgecolor_cmap
```python
from test_legend import test_legend_pathcollection_labelcolor_markeredgecolor_cmap
```



---
## test_legend_labelcolor_markerfacecolor
```python
from test_legend import test_legend_labelcolor_markerfacecolor
```



---
## test_legend_pathcollection_labelcolor_markerfacecolor
```python
from test_legend import test_legend_pathcollection_labelcolor_markerfacecolor
```



---
## test_legend_pathcollection_labelcolor_markerfacecolor_iterable
```python
from test_legend import test_legend_pathcollection_labelcolor_markerfacecolor_iterable
```



---
## test_legend_pathcollection_labelcolor_markfacecolor_cmap
```python
from test_legend import test_legend_pathcollection_labelcolor_markfacecolor_cmap
```



---
## test_legend_labelcolor_rcparam_single
```python
from test_legend import test_legend_labelcolor_rcparam_single
```



---
## test_legend_labelcolor_rcparam_linecolor
```python
from test_legend import test_legend_labelcolor_rcparam_linecolor
```



---
## test_legend_labelcolor_rcparam_markeredgecolor
```python
from test_legend import test_legend_labelcolor_rcparam_markeredgecolor
```



---
## test_legend_labelcolor_rcparam_markeredgecolor_short
```python
from test_legend import test_legend_labelcolor_rcparam_markeredgecolor_short
```



---
## test_legend_labelcolor_rcparam_markerfacecolor
```python
from test_legend import test_legend_labelcolor_rcparam_markerfacecolor
```



---
## test_legend_labelcolor_rcparam_markerfacecolor_short
```python
from test_legend import test_legend_labelcolor_rcparam_markerfacecolor_short
```



---
## test_get_set_draggable
```python
from test_legend import test_get_set_draggable
```



---
## test_legend_draggable
```python
from test_legend import test_legend_draggable
```



---
## test_alpha_handles
```python
from test_legend import test_alpha_handles
```



---
## test_usetex_no_warn
```python
from test_legend import test_usetex_no_warn
```



---
## test_warn_big_data_best_loc
```python
from test_legend import test_warn_big_data_best_loc
```



---
## test_no_warn_big_data_when_loc_specified
```python
from test_legend import test_no_warn_big_data_when_loc_specified
```



---
## test_plot_multiple_input_multiple_label
```python
from test_legend import test_plot_multiple_input_multiple_label
```



---
## test_plot_multiple_input_single_label
```python
from test_legend import test_plot_multiple_input_single_label
```



---
## test_plot_single_input_multiple_label
```python
from test_legend import test_plot_single_input_multiple_label
```



---
## test_plot_single_input_list_label
```python
from test_legend import test_plot_single_input_list_label
```



---
## test_plot_multiple_label_incorrect_length_exception
```python
from test_legend import test_plot_multiple_label_incorrect_length_exception
```



---
## test_legend_face_edgecolor
```python
from test_legend import test_legend_face_edgecolor
```



---
## test_legend_text_axes
```python
from test_legend import test_legend_text_axes
```



---
## test_handlerline2d
```python
from test_legend import test_handlerline2d
```



---
## test_subfigure_legend
```python
from test_legend import test_subfigure_legend
```



---
## test_setting_alpha_keeps_polycollection_color
```python
from test_legend import test_setting_alpha_keeps_polycollection_color
```



---
## test_legend_markers_from_line2d
```python
from test_legend import test_legend_markers_from_line2d
```



---
## test_ncol_ncols
```python
from test_legend import test_ncol_ncols
```



---
## test_loc_invalid_tuple_exception
```python
from test_legend import test_loc_invalid_tuple_exception
```



---
## test_loc_valid_tuple
```python
from test_legend import test_loc_valid_tuple
```



---
## test_loc_valid_list
```python
from test_legend import test_loc_valid_list
```



---
## test_loc_invalid_list_exception
```python
from test_legend import test_loc_invalid_list_exception
```



---
## test_loc_invalid_type
```python
from test_legend import test_loc_invalid_type
```



---
## test_loc_validation_numeric_value
```python
from test_legend import test_loc_validation_numeric_value
```



---
## test_loc_validation_string_value
```python
from test_legend import test_loc_validation_string_value
```



---
## test_legend_handle_label_mismatch
```python
from test_legend import test_legend_handle_label_mismatch
```



---
## test_legend_handle_label_mismatch_no_len
```python
from test_legend import test_legend_handle_label_mismatch_no_len
```



---
## test_legend_nolabels_warning
```python
from test_legend import test_legend_nolabels_warning
```



---
## test_legend_nolabels_draw
```python
from test_legend import test_legend_nolabels_draw
```



---
## test_legend_loc_polycollection
```python
from test_legend import test_legend_loc_polycollection
```



---
## test_legend_text
```python
from test_legend import test_legend_text
```



---
## test_boxplot_legend_labels
```python
from test_legend import test_boxplot_legend_labels
```



---
## test_legend_no_args
```python
from test_legend import test_legend_no_args
```



---
## test_legend_positional_handles_labels
```python
from test_legend import test_legend_positional_handles_labels
```



---
## test_legend_positional_handles_only
```python
from test_legend import test_legend_positional_handles_only
```



---
## test_legend_positional_labels_only
```python
from test_legend import test_legend_positional_labels_only
```



---
## test_legend_three_args
```python
from test_legend import test_legend_three_args
```



---
## test_legend_handler_map
```python
from test_legend import test_legend_handler_map
```



---
## test_legend_kwargs_handles_only
```python
from test_legend import test_legend_kwargs_handles_only
```



---
## test_legend_kwargs_labels_only
```python
from test_legend import test_legend_kwargs_labels_only
```



---
## test_legend_kwargs_handles_labels
```python
from test_legend import test_legend_kwargs_handles_labels
```



---
## test_warn_mixed_args_and_kwargs
```python
from test_legend import test_warn_mixed_args_and_kwargs
```



---
## test_parasite
```python
from test_legend import test_parasite
```



---
## test_legend_handle_label
```python
from test_legend import test_legend_handle_label
```



---
## test_legend_label_arg
```python
from test_legend import test_legend_label_arg
```



---
## test_legend_label_three_args
```python
from test_legend import test_legend_label_three_args
```



---
## test_legend_kw_args
```python
from test_legend import test_legend_kw_args
```



---
## test_warn_args_kwargs
```python
from test_legend import test_warn_args_kwargs
```



---
## __name__
```python
from test_doc import __name__
```



---
## test_sphinx_gallery_example_header
```python
from test_doc import test_sphinx_gallery_example_header
```

We have copied EXAMPLE_HEADER and modified it to include meta keywords.
This test monitors that the version we have copied is still the same as
the EXAMPLE_HEADER in sphinx-gallery. If sphinx-gallery changes its
EXAMPLE_HEADER, this test will start to fail. In that case, please update
the monkey-patching of EXAMPLE_HEADER in conf.py.

---
## __name__
```python
from test_sphinxext import __name__
```

Tests for tinypages build using sphinx extensions.

---
## build_sphinx_html
```python
from test_sphinxext import build_sphinx_html
```



---
## test_tinypages
```python
from test_sphinxext import test_tinypages
```



---
## test_plot_html_show_source_link
```python
from test_sphinxext import test_plot_html_show_source_link
```



---
## test_show_source_link_true
```python
from test_sphinxext import test_show_source_link_true
```



---
## test_show_source_link_false
```python
from test_sphinxext import test_show_source_link_false
```



---
## test_srcset_version
```python
from test_sphinxext import test_srcset_version
```



---
## plot_file
```python
from test_sphinxext import plot_file
```



---
## plot_directive_file
```python
from test_sphinxext import plot_directive_file
```



---
## __name__
```python
from test_matplotlib import __name__
```



---
## test_parse_to_version_info
```python
from test_matplotlib import test_parse_to_version_info
```



---
## test_tmpconfigdir_warning
```python
from test_matplotlib import test_tmpconfigdir_warning
```

Test that a warning is emitted if a temporary configdir must be used.

---
## test_importable_with_no_home
```python
from test_matplotlib import test_importable_with_no_home
```



---
## test_use_doc_standard_backends
```python
from test_matplotlib import test_use_doc_standard_backends
```

Test that the standard backends mentioned in the docstring of
matplotlib.use() are the same as in matplotlib.rcsetup.

---
## test_importable_with__OO
```python
from test_matplotlib import test_importable_with__OO
```

When using -OO or export PYTHONOPTIMIZE=2, docstrings are discarded,
this simple test may prevent something like issue #17970.

---
## parse
```python
from test_matplotlib import parse
```



---
## __name__
```python
from test_compare_images import __name__
```



---
## test_image_comparison_expect_rms
```python
from test_compare_images import test_image_comparison_expect_rms
```

Compare two images, expecting a particular RMS error.

im1 and im2 are filenames relative to the baseline_dir directory.

tol is the tolerance to pass to compare_images.

expect_rms is the expected RMS value, or None. If None, the test will
succeed if compare_images succeeds. Otherwise, the test will succeed if
compare_images fails and returns an RMS error almost equal to this value.

---
## __name__
```python
from test_ttconv import __name__
```



---
## test_truetype_conversion
```python
from test_ttconv import test_truetype_conversion
```



---
## __name__
```python
from test_backend_svg import __name__
```



---
## test_visibility
```python
from test_backend_svg import test_visibility
```



---
## test_fill_black_with_alpha
```python
from test_backend_svg import test_fill_black_with_alpha
```



---
## test_noscale
```python
from test_backend_svg import test_noscale
```



---
## test_text_urls
```python
from test_backend_svg import test_text_urls
```



---
## test_bold_font_output
```python
from test_backend_svg import test_bold_font_output
```



---
## test_bold_font_output_with_none_fonttype
```python
from test_backend_svg import test_bold_font_output_with_none_fonttype
```



---
## test_rasterized
```python
from test_backend_svg import test_rasterized
```



---
## test_rasterized_ordering
```python
from test_backend_svg import test_rasterized_ordering
```



---
## test_prevent_rasterization
```python
from test_backend_svg import test_prevent_rasterization
```



---
## test_count_bitmaps
```python
from test_backend_svg import test_count_bitmaps
```



---
## test_unicode_won
```python
from test_backend_svg import test_unicode_won
```



---
## test_svgnone_with_data_coordinates
```python
from test_backend_svg import test_svgnone_with_data_coordinates
```



---
## test_gid
```python
from test_backend_svg import test_gid
```

Test that object gid appears in output svg.

---
## test_savefig_tight
```python
from test_backend_svg import test_savefig_tight
```



---
## test_url
```python
from test_backend_svg import test_url
```



---
## test_url_tick
```python
from test_backend_svg import test_url_tick
```



---
## test_svg_default_metadata
```python
from test_backend_svg import test_svg_default_metadata
```



---
## test_svg_clear_default_metadata
```python
from test_backend_svg import test_svg_clear_default_metadata
```



---
## test_svg_clear_all_metadata
```python
from test_backend_svg import test_svg_clear_all_metadata
```



---
## test_svg_metadata
```python
from test_backend_svg import test_svg_metadata
```



---
## test_multi_font_type3
```python
from test_backend_svg import test_multi_font_type3
```



---
## test_multi_font_type42
```python
from test_backend_svg import test_multi_font_type42
```



---
## test_svg_incorrect_metadata
```python
from test_backend_svg import test_svg_incorrect_metadata
```



---
## test_svg_escape
```python
from test_backend_svg import test_svg_escape
```



---
## test_svg_font_string
```python
from test_backend_svg import test_svg_font_string
```



---
## test_annotationbbox_gid
```python
from test_backend_svg import test_annotationbbox_gid
```



---
## count_tag
```python
from test_backend_svg import count_tag
```



---
## include
```python
from test_backend_svg import include
```



---
## __name__
```python
from test_testing import __name__
```



---
## test_warn_to_fail
```python
from test_testing import test_warn_to_fail
```



---
## test_parametrize_with_check_figure_equal
```python
from test_testing import test_parametrize_with_check_figure_equal
```



---
## test_wrap_failure
```python
from test_testing import test_wrap_failure
```



---
## test_check_figures_equal_extra_fig
```python
from test_testing import test_check_figures_equal_extra_fig
```



---
## test_check_figures_equal_closed_fig
```python
from test_testing import test_check_figures_equal_closed_fig
```



---
## should_fail
```python
from test_testing import should_fail
```



---
## MatplotlibDeprecationWarning
```python
from deprecation import MatplotlibDeprecationWarning
```

A class for issuing deprecation warnings for Matplotlib users.

---
## _generate_deprecation_warning
```python
from deprecation import _generate_deprecation_warning
```



---
## warn_deprecated
```python
from deprecation import warn_deprecated
```

Display a standardized deprecation.

Parameters
----------
since : str
    The release at which this API became deprecated.
message : str, optional
    Override the default deprecation message.  The ``%(since)s``,
    ``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
    and ``%(removal)s`` format specifiers will be replaced by the values
    of the respective arguments passed to this function.
name : str, optional
    The name of the deprecated object.
alternative : str, optional
    An alternative API that the user may use in place of the deprecated
    API.  The deprecation warning will tell the user about this alternative
    if provided.
pending : bool, optional
    If True, uses a PendingDeprecationWarning instead of a
    DeprecationWarning.  Cannot be used together with *removal*.
obj_type : str, optional
    The object type being deprecated.
addendum : str, optional
    Additional text appended directly to the final message.
removal : str, optional
    The expected removal version.  With the default (an empty string), a
    removal version is automatically computed from *since*.  Set to other
    Falsy values to not schedule a removal date.  Cannot be used together
    with *pending*.

Examples
--------
::

    # To warn of the deprecation of "matplotlib.name_of_module"
    warn_deprecated('1.4.0', name='matplotlib.name_of_module',
                    obj_type='module')

---
## deprecate_privatize_attribute
```python
from deprecation import deprecate_privatize_attribute
```

Helper to deprecate public access to an attribute (or method).

This helper should only be used at class scope, as follows::

    class Foo:
        attr = _deprecate_privatize_attribute(*args, **kwargs)

where *all* parameters are forwarded to `deprecated`.  This form makes
``attr`` a property which forwards read and write access to ``self._attr``
(same name but with a leading underscore), with a deprecation warning.
Note that the attribute name is derived from *the name this helper is
assigned to*.  This helper also works for deprecating methods.

---
## rename_parameter
```python
from deprecation import rename_parameter
```

Decorator indicating that parameter *old* of *func* is renamed to *new*.

The actual implementation of *func* should use *new*, not *old*.  If *old*
is passed to *func*, a DeprecationWarning is emitted, and its value is
used, even if *new* is also passed by keyword (this is to simplify pyplot
wrapper functions, which always pass *new* explicitly to the Axes method).
If *new* is also passed but positionally, a TypeError will be raised by the
underlying function during argument binding.

Examples
--------
::

    @_api.rename_parameter("3.1", "bad_name", "good_name")
    def func(good_name): ...

---
## _deprecated_parameter_class
```python
from deprecation import _deprecated_parameter_class
```



---
## delete_parameter
```python
from deprecation import delete_parameter
```

Decorator indicating that parameter *name* of *func* is being deprecated.

The actual implementation of *func* should keep the *name* parameter in its
signature, or accept a ``**kwargs`` argument (through which *name* would be
passed).

Parameters that come after the deprecated parameter effectively become
keyword-only (as they cannot be passed positionally without triggering the
DeprecationWarning on the deprecated parameter), and should be marked as
such after the deprecation period has passed and the deprecated parameter
is removed.

Parameters other than *since*, *name*, and *func* are keyword-only and
forwarded to `.warn_deprecated`.

Examples
--------
::

    @_api.delete_parameter("3.1", "unused")
    def func(used_arg, other_arg, unused, more_args): ...

---
## make_keyword_only
```python
from deprecation import make_keyword_only
```

Decorator indicating that passing parameter *name* (or any of the following
ones) positionally to *func* is being deprecated.

When used on a method that has a pyplot wrapper, this should be the
outermost decorator, so that :file:`boilerplate.py` can access the original
signature.

---
## deprecate_method_override
```python
from deprecation import deprecate_method_override
```

Return ``obj.method`` with a deprecation if it was overridden, else None.

Parameters
----------
method
    An unbound method, i.e. an expression of the form
    ``Class.method_name``.  Remember that within the body of a method, one
    can always use ``__class__`` to refer to the class that is currently
    being defined.
obj
    Either an object of the class where *method* is defined, or a subclass
    of that class.
allow_empty : bool, default: False
    Whether to allow overrides by "empty" methods without emitting a
    warning.
**kwargs
    Additional parameters passed to `warn_deprecated` to generate the
    deprecation warning; must at least include the "since" key.

---
## suppress_matplotlib_deprecation_warning
```python
from deprecation import suppress_matplotlib_deprecation_warning
```



---
## deprecate
```python
from deprecation import deprecate
```



---
## __init__
```python
from deprecation import __init__
```



---
## __set_name__
```python
from deprecation import __set_name__
```



---
## wrapper
```python
from deprecation import wrapper
```



---
## __repr__
```python
from deprecation import __repr__
```



---
## empty
```python
from deprecation import empty
```



---
## empty_with_docstring
```python
from deprecation import empty_with_docstring
```

doc

---
## emit_warning
```python
from deprecation import emit_warning
```



---
## finalize
```python
from deprecation import finalize
```



---
## _deprecated_property
```python
from deprecation import _deprecated_property
```



---
## __get__
```python
from deprecation import __get__
```



---
## __set__
```python
from deprecation import __set__
```



---
## __delete__
```python
from deprecation import __delete__
```



---
## classproperty
```python
from __init__ import classproperty
```

Like `property`, but also triggers on access via the class, and it is the
*class* that's passed as argument.

Examples
--------
::

    class C:
        @classproperty
        def foo(cls):
            return cls.__name__

    assert C.foo == "C"

---
## check_isinstance
```python
from __init__ import check_isinstance
```

For each *key, value* pair in *kwargs*, check that *value* is an instance
of one of *types*; if not, raise an appropriate TypeError.

As a special case, a ``None`` entry in *types* is treated as NoneType.

Examples
--------
>>> _api.check_isinstance((SomeClass, None), arg=arg)

---
## check_in_list
```python
from __init__ import check_in_list
```

For each *key, value* pair in *kwargs*, check that *value* is in *values*;
if not, raise an appropriate ValueError.

Parameters
----------
values : iterable
    Sequence of values to check on.
_print_supported_values : bool, default: True
    Whether to print *values* when raising ValueError.
**kwargs : dict
    *key, value* pairs as keyword arguments to find in *values*.

Raises
------
ValueError
    If any *value* in *kwargs* is not found in *values*.

Examples
--------
>>> _api.check_in_list(["foo", "bar"], arg=arg, other_arg=other_arg)

---
## check_shape
```python
from __init__ import check_shape
```

For each *key, value* pair in *kwargs*, check that *value* has the shape *shape*;
if not, raise an appropriate ValueError.

*None* in the shape is treated as a "free" size that can have any length.
e.g. (None, 2) -> (N, 2)

The values checked must be numpy arrays.

Examples
--------
To check for (N, 2) shaped arrays

>>> _api.check_shape((None, 2), arg=arg, other_arg=other_arg)

---
## check_getitem
```python
from __init__ import check_getitem
```

*kwargs* must consist of a single *key, value* pair.  If *key* is in
*mapping*, return ``mapping[value]``; else, raise an appropriate
ValueError.

Examples
--------
>>> _api.check_getitem({"foo": "bar"}, arg=arg)

---
## caching_module_getattr
```python
from __init__ import caching_module_getattr
```

Helper decorator for implementing module-level ``__getattr__`` as a class.

This decorator must be used at the module toplevel as follows::

    @caching_module_getattr
    class __getattr__:  # The class *must* be named ``__getattr__``.
        @property  # Only properties are taken into account.
        def name(self): ...

The ``__getattr__`` class will be replaced by a ``__getattr__``
function such that trying to access ``name`` on the module will
resolve the corresponding property (which may be decorated e.g. with
``_api.deprecated`` for deprecating module globals).  The properties are
all implicitly cached.  Moreover, a suitable AttributeError is generated
and raised if no property with the given name exists.

---
## define_aliases
```python
from __init__ import define_aliases
```

Class decorator for defining property aliases.

Use as ::

    @_api.define_aliases({"property": ["alias", ...], ...})
    class C: ...

For each property, if the corresponding ``get_property`` is defined in the
class so far, an alias named ``get_alias`` will be defined; the same will
be done for setters.  If neither the getter nor the setter exists, an
exception will be raised.

The alias map is stored as the ``_alias_map`` attribute on the class and
can be used by `.normalize_kwargs` (which assumes that higher priority
aliases come last).

---
## select_matching_signature
```python
from __init__ import select_matching_signature
```

Select and call the function that accepts ``*args, **kwargs``.

*funcs* is a list of functions which should not raise any exception (other
than `TypeError` if the arguments passed do not match their signature).

`select_matching_signature` tries to call each of the functions in *funcs*
with ``*args, **kwargs`` (in the order in which they are given).  Calls
that fail with a `TypeError` are silently skipped.  As soon as a call
succeeds, `select_matching_signature` returns its return value.  If no
function accepts ``*args, **kwargs``, then the `TypeError` raised by the
last failing call is re-raised.

Callers should normally make sure that any ``*args, **kwargs`` can only
bind a single *func* (to avoid any ambiguity), although this is not checked
by `select_matching_signature`.

Notes
-----
`select_matching_signature` is intended to help implementing
signature-overloaded functions.  In general, such functions should be
avoided, except for back-compatibility concerns.  A typical use pattern is
::

    def my_func(*args, **kwargs):
        params = select_matching_signature(
            [lambda old1, old2: locals(), lambda new: locals()],
            *args, **kwargs)
        if "old1" in params:
            warn_deprecated(...)
            old1, old2 = params.values()  # note that locals() is ordered.
        else:
            new, = params.values()
        # do things with params

which allows *my_func* to be called either with two parameters (*old1* and
*old2*) or a single one (*new*).  Note that the new signature is given
last, so that callers get a `TypeError` corresponding to the new signature
if the arguments they passed in do not match any signature.

---
## nargs_error
```python
from __init__ import nargs_error
```

Generate a TypeError to be raised by function calls with wrong arity.

---
## kwarg_error
```python
from __init__ import kwarg_error
```

Generate a TypeError to be raised by function calls with wrong kwarg.

Parameters
----------
name : str
    The name of the calling function.
kw : str or Iterable[str]
    Either the invalid keyword argument name, or an iterable yielding
    invalid keyword arguments (e.g., a ``kwargs`` dict).

---
## recursive_subclasses
```python
from __init__ import recursive_subclasses
```

Yield *cls* and direct and indirect subclasses of *cls*.

---
## warn_external
```python
from __init__ import warn_external
```

`warnings.warn` wrapper that sets *stacklevel* to "outside Matplotlib".

The original emitter of the warning can be obtained by patching this
function back to `warnings.warn`, i.e. ``_api.warn_external =
warnings.warn`` (or ``functools.partial(warnings.warn, stacklevel=2)``,
etc.).

---
## fget
```python
from __init__ import fget
```



---
## type_name
```python
from __init__ import type_name
```



---
## make_alias
```python
from __init__ import make_alias
```



---
## get_aliased_and_aliases
```python
from __init__ import get_aliased_and_aliases
```



---
## method
```python
from __init__ import method
```



---
## use
```python
from core import use
```

Use Matplotlib style settings from a style specification.

The style name of 'default' is reserved for reverting back to
the default style settings.

.. note::

   This updates the `.rcParams` with the settings from the style.
   `.rcParams` not defined in the style are kept.

Parameters
----------
style : str, dict, Path or list

    A style specification. Valid options are:

    str
        - One of the style names in `.style.available` (a builtin style or
          a style installed in the user library path).

        - A dotted name of the form "package.style_name"; in that case,
          "package" should be an importable Python package name, e.g. at
          ``/path/to/package/__init__.py``; the loaded style file is
          ``/path/to/package/style_name.mplstyle``.  (Style files in
          subpackages are likewise supported.)

        - The path or URL to a style file, which gets loaded by
          `.rc_params_from_file`.

    dict
        A mapping of key/value pairs for `matplotlib.rcParams`.

    Path
        The path to a style file, which gets loaded by
        `.rc_params_from_file`.

    list
        A list of style specifiers (str, Path or dict), which are applied
        from first to last in the list.

Notes
-----
The following `.rcParams` are not related to style and will be ignored if
found in a style specification:

%s

---
## context
```python
from core import context
```

Context manager for using style settings temporarily.

Parameters
----------
style : str, dict, Path or list
    A style specification. Valid options are:

    str
        - One of the style names in `.style.available` (a builtin style or
          a style installed in the user library path).

        - A dotted name of the form "package.style_name"; in that case,
          "package" should be an importable Python package name, e.g. at
          ``/path/to/package/__init__.py``; the loaded style file is
          ``/path/to/package/style_name.mplstyle``.  (Style files in
          subpackages are likewise supported.)

        - The path or URL to a style file, which gets loaded by
          `.rc_params_from_file`.
    dict
        A mapping of key/value pairs for `matplotlib.rcParams`.

    Path
        The path to a style file, which gets loaded by
        `.rc_params_from_file`.

    list
        A list of style specifiers (str, Path or dict), which are applied
        from first to last in the list.

after_reset : bool
    If True, apply style after resetting settings to their defaults;
    otherwise, apply style on top of the current settings.

---
## update_user_library
```python
from core import update_user_library
```

Update style library with user-defined rc files.

---
## read_style_directory
```python
from core import read_style_directory
```

Return dictionary of styles defined in *style_dir*.

---
## update_nested_dict
```python
from core import update_nested_dict
```

Update nested dict (only level of nesting) with new values.

Unlike `dict.update`, this assumes that the values of the parent dict are
dicts (or dict-like), so you shouldn't replace the nested dict if it
already exists. Instead you should update the sub-dict.

---
## reload_library
```python
from core import reload_library
```

Reload the style library.

---
## __name__
```python
from geo import __name__
```



---
## GeoAxes
```python
from geo import GeoAxes
```

An abstract base class for geographic projections.

---
## _GeoTransform
```python
from geo import _GeoTransform
```



---
## AitoffAxes
```python
from geo import AitoffAxes
```



---
## HammerAxes
```python
from geo import HammerAxes
```



---
## MollweideAxes
```python
from geo import MollweideAxes
```



---
## LambertAxes
```python
from geo import LambertAxes
```



---
## ThetaFormatter
```python
from geo import ThetaFormatter
```

Used to format the theta tick labels.  Converts the native
unit of radians into degrees and adds a degree symbol.

---
## _init_axis
```python
from geo import _init_axis
```



---
## clear
```python
from geo import clear
```



---
## _set_lim_and_transforms
```python
from geo import _set_lim_and_transforms
```



---
## _get_affine_transform
```python
from geo import _get_affine_transform
```



---
## get_xaxis_transform
```python
from geo import get_xaxis_transform
```



---
## get_xaxis_text1_transform
```python
from geo import get_xaxis_text1_transform
```



---
## get_xaxis_text2_transform
```python
from geo import get_xaxis_text2_transform
```



---
## get_yaxis_transform
```python
from geo import get_yaxis_transform
```



---
## get_yaxis_text1_transform
```python
from geo import get_yaxis_text1_transform
```



---
## get_yaxis_text2_transform
```python
from geo import get_yaxis_text2_transform
```



---
## _gen_axes_patch
```python
from geo import _gen_axes_patch
```



---
## _gen_axes_spines
```python
from geo import _gen_axes_spines
```



---
## set_yscale
```python
from geo import set_yscale
```



---
## set_xlim
```python
from geo import set_xlim
```

Not supported. Please consider using Cartopy.

---
## format_coord
```python
from geo import format_coord
```

Return a format string formatting the coordinate.

---
## set_longitude_grid
```python
from geo import set_longitude_grid
```

Set the number of degrees between each longitude grid.

---
## set_latitude_grid
```python
from geo import set_latitude_grid
```

Set the number of degrees between each latitude grid.

---
## set_longitude_grid_ends
```python
from geo import set_longitude_grid_ends
```

Set the latitude(s) at which to stop drawing the longitude grids.

---
## get_data_ratio
```python
from geo import get_data_ratio
```

Return the aspect ratio of the data itself.

---
## can_zoom
```python
from geo import can_zoom
```

Return whether this Axes supports the zoom box button functionality.

This Axes object does not support interactive zoom box.

---
## can_pan
```python
from geo import can_pan
```

Return whether this Axes supports the pan/zoom button functionality.

This Axes object does not support interactive pan/zoom.

---
## start_pan
```python
from geo import start_pan
```



---
## end_pan
```python
from geo import end_pan
```



---
## drag_pan
```python
from geo import drag_pan
```



---
## __init__
```python
from geo import __init__
```



---
## __str__
```python
from geo import __str__
```



---
## transform_path_non_affine
```python
from geo import transform_path_non_affine
```



---
## AitoffTransform
```python
from geo import AitoffTransform
```

The base Aitoff transform.

---
## InvertedAitoffTransform
```python
from geo import InvertedAitoffTransform
```



---
## _get_core_transform
```python
from geo import _get_core_transform
```



---
## HammerTransform
```python
from geo import HammerTransform
```

The base Hammer transform.

---
## InvertedHammerTransform
```python
from geo import InvertedHammerTransform
```



---
## MollweideTransform
```python
from geo import MollweideTransform
```

The base Mollweide transform.

---
## InvertedMollweideTransform
```python
from geo import InvertedMollweideTransform
```



---
## LambertTransform
```python
from geo import LambertTransform
```

The base Lambert transform.

---
## InvertedLambertTransform
```python
from geo import InvertedLambertTransform
```



---
## __call__
```python
from geo import __call__
```



---
## transform_non_affine
```python
from geo import transform_non_affine
```



---
## inverted
```python
from geo import inverted
```



---
## d
```python
from geo import d
```



---
## __name__
```python
from polar import __name__
```



---
## _apply_theta_transforms_warn
```python
from polar import _apply_theta_transforms_warn
```



---
## PolarTransform
```python
from polar import PolarTransform
```

The base polar transform.

This transform maps polar coordinates :math:`\theta, r` into Cartesian
coordinates :math:`x, y = r \cos(\theta), r \sin(\theta)`
(but does not fully transform into Axes coordinates or
handle positioning in screen space).

This transformation is designed to be applied to data after any scaling
along the radial axis (e.g. log-scaling) has been applied to the input
data.

Path segments at a fixed radius are automatically transformed to circular
arcs as long as ``path._interpolation_steps > 1``.

---
## PolarAffine
```python
from polar import PolarAffine
```

The affine part of the polar projection.

Scales the output so that maximum radius rests on the edge of the Axes
circle and the origin is mapped to (0.5, 0.5). The transform applied is
the same to x and y components and given by:

.. math::

    x_{1} = 0.5 \left [ \frac{x_{0}}{(r_{\max} - r_{\min})} + 1 \right ]

:math:`r_{\min}, r_{\max}` are the minimum and maximum radial limits after
any scaling (e.g. log scaling) has been removed.

---
## InvertedPolarTransform
```python
from polar import InvertedPolarTransform
```

The inverse of the polar transform, mapping Cartesian
coordinate space *x* and *y* back to *theta* and *r*.

---
## ThetaFormatter
```python
from polar import ThetaFormatter
```

Used to format the *theta* tick labels.  Converts the native
unit of radians into degrees and adds a degree symbol.

---
## _AxisWrapper
```python
from polar import _AxisWrapper
```



---
## ThetaLocator
```python
from polar import ThetaLocator
```

Used to locate theta ticks.

This will work the same as the base locator except in the case that the
view spans the entire circle. In such cases, the previously used default
locations of every 45 degrees are returned.

---
## ThetaTick
```python
from polar import ThetaTick
```

A theta-axis tick.

This subclass of `.XTick` provides angular ticks with some small
modification to their re-positioning such that ticks are rotated based on
tick location. This results in ticks that are correctly perpendicular to
the arc spine.

When 'auto' rotation is enabled, labels are also rotated to be parallel to
the spine. The label padding is also applied here since it's not possible
to use a generic axes transform to produce tick-specific padding.

---
## ThetaAxis
```python
from polar import ThetaAxis
```

A theta Axis.

This overrides certain properties of an `.XAxis` to provide special-casing
for an angular axis.

---
## RadialLocator
```python
from polar import RadialLocator
```

Used to locate radius ticks.

Ensures that all ticks are strictly positive.  For all other tasks, it
delegates to the base `.Locator` (which may be different depending on the
scale of the *r*-axis).

---
## _ThetaShift
```python
from polar import _ThetaShift
```

Apply a padding shift based on axes theta limits.

This is used to create padding for radial ticks.

Parameters
----------
axes : `~matplotlib.axes.Axes`
    The owning Axes; used to determine limits.
pad : float
    The padding to apply, in points.
mode : {'min', 'max', 'rlabel'}
    Whether to shift away from the start (``'min'``) or the end (``'max'``)
    of the axes, or using the rlabel position (``'rlabel'``).

---
## RadialTick
```python
from polar import RadialTick
```

A radial-axis tick.

This subclass of `.YTick` provides radial ticks with some small
modification to their re-positioning such that ticks are rotated based on
axes limits.  This results in ticks that are correctly perpendicular to
the spine. Labels are also rotated to be perpendicular to the spine, when
'auto' rotation is enabled.

---
## RadialAxis
```python
from polar import RadialAxis
```

A radial Axis.

This overrides certain properties of a `.YAxis` to provide special-casing
for a radial axis.

---
## _is_full_circle_deg
```python
from polar import _is_full_circle_deg
```

Determine if a wedge (in degrees) spans the full circle.

The condition is derived from :class:`~matplotlib.patches.Wedge`.

---
## _is_full_circle_rad
```python
from polar import _is_full_circle_rad
```

Determine if a wedge (in radians) spans the full circle.

The condition is derived from :class:`~matplotlib.patches.Wedge`.

---
## _WedgeBbox
```python
from polar import _WedgeBbox
```

Transform (theta, r) wedge Bbox into Axes bounding box.

Parameters
----------
center : (float, float)
    Center of the wedge
viewLim : `~matplotlib.transforms.Bbox`
    Bbox determining the boundaries of the wedge
originLim : `~matplotlib.transforms.Bbox`
    Bbox determining the origin for the wedge, if different from *viewLim*

---
## PolarAxes
```python
from polar import PolarAxes
```

A polar graph projection, where the input dimensions are *theta*, *r*.

Theta starts pointing east and goes anti-clockwise.

---
## __init__
```python
from polar import __init__
```



---
## _get_rorigin
```python
from polar import _get_rorigin
```



---
## transform_non_affine
```python
from polar import transform_non_affine
```



---
## transform_path_non_affine
```python
from polar import transform_path_non_affine
```



---
## inverted
```python
from polar import inverted
```



---
## get_matrix
```python
from polar import get_matrix
```



---
## __call__
```python
from polar import __call__
```



---
## get_view_interval
```python
from polar import get_view_interval
```



---
## set_view_interval
```python
from polar import set_view_interval
```



---
## get_minpos
```python
from polar import get_minpos
```



---
## get_data_interval
```python
from polar import get_data_interval
```



---
## set_data_interval
```python
from polar import set_data_interval
```



---
## get_tick_space
```python
from polar import get_tick_space
```



---
## set_axis
```python
from polar import set_axis
```



---
## view_limits
```python
from polar import view_limits
```



---
## _apply_params
```python
from polar import _apply_params
```



---
## _update_padding
```python
from polar import _update_padding
```



---
## update_position
```python
from polar import update_position
```



---
## _wrap_locator_formatter
```python
from polar import _wrap_locator_formatter
```



---
## clear
```python
from polar import clear
```



---
## _set_scale
```python
from polar import _set_scale
```



---
## _copy_tick_props
```python
from polar import _copy_tick_props
```

Copy the props from src tick to dest tick.

---
## _zero_in_bounds
```python
from polar import _zero_in_bounds
```

Return True if zero is within the valid values for the
scale of the radial axis.

---
## nonsingular
```python
from polar import nonsingular
```



---
## _determine_anchor
```python
from polar import _determine_anchor
```



---
## get_points
```python
from polar import get_points
```



---
## _init_axis
```python
from polar import _init_axis
```



---
## _set_lim_and_transforms
```python
from polar import _set_lim_and_transforms
```



---
## get_xaxis_transform
```python
from polar import get_xaxis_transform
```



---
## get_xaxis_text1_transform
```python
from polar import get_xaxis_text1_transform
```



---
## get_xaxis_text2_transform
```python
from polar import get_xaxis_text2_transform
```



---
## get_yaxis_transform
```python
from polar import get_yaxis_transform
```



---
## get_yaxis_text1_transform
```python
from polar import get_yaxis_text1_transform
```



---
## get_yaxis_text2_transform
```python
from polar import get_yaxis_text2_transform
```



---
## draw
```python
from polar import draw
```



---
## _gen_axes_patch
```python
from polar import _gen_axes_patch
```



---
## _gen_axes_spines
```python
from polar import _gen_axes_spines
```



---
## set_thetamax
```python
from polar import set_thetamax
```

Set the maximum theta limit in degrees.

---
## get_thetamax
```python
from polar import get_thetamax
```

Return the maximum theta limit in degrees.

---
## set_thetamin
```python
from polar import set_thetamin
```

Set the minimum theta limit in degrees.

---
## get_thetamin
```python
from polar import get_thetamin
```

Get the minimum theta limit in degrees.

---
## set_thetalim
```python
from polar import set_thetalim
```

Set the minimum and maximum theta values.

Can take the following signatures:

- ``set_thetalim(minval, maxval)``: Set the limits in radians.
- ``set_thetalim(thetamin=minval, thetamax=maxval)``: Set the limits
  in degrees.

where minval and maxval are the minimum and maximum limits. Values are
wrapped in to the range :math:`[0, 2\pi]` (in radians), so for example
it is possible to do ``set_thetalim(-np.pi / 2, np.pi / 2)`` to have
an axis symmetric around 0. A ValueError is raised if the absolute
angle difference is larger than a full circle.

---
## set_theta_offset
```python
from polar import set_theta_offset
```

Set the offset for the location of 0 in radians.

---
## get_theta_offset
```python
from polar import get_theta_offset
```

Get the offset for the location of 0 in radians.

---
## set_theta_zero_location
```python
from polar import set_theta_zero_location
```

Set the location of theta's zero.

This simply calls `set_theta_offset` with the correct value in radians.

Parameters
----------
loc : str
    May be one of "N", "NW", "W", "SW", "S", "SE", "E", or "NE".
offset : float, default: 0
    An offset in degrees to apply from the specified *loc*. **Note:**
    this offset is *always* applied counter-clockwise regardless of
    the direction setting.

---
## set_theta_direction
```python
from polar import set_theta_direction
```

Set the direction in which theta increases.

clockwise, -1:
   Theta increases in the clockwise direction

counterclockwise, anticlockwise, 1:
   Theta increases in the counterclockwise direction

---
## get_theta_direction
```python
from polar import get_theta_direction
```

Get the direction in which theta increases.

-1:
   Theta increases in the clockwise direction

1:
   Theta increases in the counterclockwise direction

---
## set_rmax
```python
from polar import set_rmax
```

Set the outer radial limit.

Parameters
----------
rmax : float

---
## get_rmax
```python
from polar import get_rmax
```

Returns
-------
float
    Outer radial limit.

---
## set_rmin
```python
from polar import set_rmin
```

Set the inner radial limit.

Parameters
----------
rmin : float

---
## get_rmin
```python
from polar import get_rmin
```

Returns
-------
float
    The inner radial limit.

---
## set_rorigin
```python
from polar import set_rorigin
```

Update the radial origin.

Parameters
----------
rorigin : float

---
## get_rorigin
```python
from polar import get_rorigin
```

Returns
-------
float

---
## get_rsign
```python
from polar import get_rsign
```



---
## set_rlim
```python
from polar import set_rlim
```

Set the radial axis view limits.

This function behaves like `.Axes.set_ylim`, but additionally supports
*rmin* and *rmax* as aliases for *bottom* and *top*.

See Also
--------
.Axes.set_ylim

---
## get_rlabel_position
```python
from polar import get_rlabel_position
```

Returns
-------
float
    The theta position of the radius labels in degrees.

---
## set_rlabel_position
```python
from polar import set_rlabel_position
```

Update the theta position of the radius labels.

Parameters
----------
value : number
    The angular position of the radius labels in degrees.

---
## set_yscale
```python
from polar import set_yscale
```



---
## set_rscale
```python
from polar import set_rscale
```



---
## set_rticks
```python
from polar import set_rticks
```



---
## set_thetagrids
```python
from polar import set_thetagrids
```

Set the theta gridlines in a polar plot.

Parameters
----------
angles : tuple with floats, degrees
    The angles of the theta gridlines.

labels : tuple with strings or None
    The labels to use at each theta gridline. The
    `.projections.polar.ThetaFormatter` will be used if None.

fmt : str or None
    Format string used in `matplotlib.ticker.FormatStrFormatter`.
    For example '%f'. Note that the angle that is used is in
    radians.

Returns
-------
lines : list of `.lines.Line2D`
    The theta gridlines.

labels : list of `.text.Text`
    The tick labels.

Other Parameters
----------------
**kwargs
    *kwargs* are optional `.Text` properties for the labels.

    .. warning::

        This only sets the properties of the current ticks.
        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that these settings can get lost if you work on
        the figure further (including also panning/zooming on a
        displayed figure).

        Use `.set_tick_params` instead if possible.

See Also
--------
.PolarAxes.set_rgrids
.Axis.get_gridlines
.Axis.get_ticklabels

---
## set_rgrids
```python
from polar import set_rgrids
```

Set the radial gridlines on a polar plot.

Parameters
----------
radii : tuple with floats
    The radii for the radial gridlines

labels : tuple with strings or None
    The labels to use at each radial gridline. The
    `matplotlib.ticker.ScalarFormatter` will be used if None.

angle : float
    The angular position of the radius labels in degrees.

fmt : str or None
    Format string used in `matplotlib.ticker.FormatStrFormatter`.
    For example '%f'.

Returns
-------
lines : list of `.lines.Line2D`
    The radial gridlines.

labels : list of `.text.Text`
    The tick labels.

Other Parameters
----------------
**kwargs
    *kwargs* are optional `.Text` properties for the labels.

    .. warning::

        This only sets the properties of the current ticks.
        Ticks are not guaranteed to be persistent. Various operations
        can create, delete and modify the Tick instances. There is an
        imminent risk that these settings can get lost if you work on
        the figure further (including also panning/zooming on a
        displayed figure).

        Use `.set_tick_params` instead if possible.

See Also
--------
.PolarAxes.set_thetagrids
.Axis.get_gridlines
.Axis.get_ticklabels

---
## format_coord
```python
from polar import format_coord
```



---
## get_data_ratio
```python
from polar import get_data_ratio
```

Return the aspect ratio of the data itself.  For a polar plot,
this should always be 1.0

---
## can_zoom
```python
from polar import can_zoom
```

Return whether this Axes supports the zoom box button functionality.

A polar Axes does not support zoom boxes.

---
## can_pan
```python
from polar import can_pan
```

Return whether this Axes supports the pan/zoom button functionality.

For a polar Axes, this is slightly misleading. Both panning and
zooming are performed by the same button. Panning is performed
in azimuth while zooming is done along the radial.

---
## start_pan
```python
from polar import start_pan
```



---
## end_pan
```python
from polar import end_pan
```



---
## drag_pan
```python
from polar import drag_pan
```



---
## format_sig
```python
from polar import format_sig
```



---
## ProjectionRegistry
```python
from __init__ import ProjectionRegistry
```

A mapping of registered projection names to projection classes.

---
## register_projection
```python
from __init__ import register_projection
```



---
## get_projection_class
```python
from __init__ import get_projection_class
```

Get a projection class from its *name*.

---
## get_projection_names
```python
from __init__ import get_projection_names
```

Return the names of all projections currently registered.

---
## pytest_unconfigure
```python
from conftest import pytest_unconfigure
```



---
## mpl_test_settings
```python
from conftest import mpl_test_settings
```



---
## pd
```python
from conftest import pd
```

Fixture to import and configure pandas.

---
## xr
```python
from conftest import xr
```

Fixture to import xarray.

---
## set_font_settings_for_testing
```python
from __init__ import set_font_settings_for_testing
```



---
## set_reproducibility_for_testing
```python
from __init__ import set_reproducibility_for_testing
```



---
## subprocess_run_for_testing
```python
from __init__ import subprocess_run_for_testing
```

Create and run a subprocess.

Thin wrapper around `subprocess.run`, intended for testing.  Will
mark fork() failures on Cygwin as expected failures: not a
success, but not indicating a problem with the code either.

Parameters
----------
args : list of str
env : dict[str, str]
timeout : float
stdout, stderr
check : bool
text : bool
    Also called ``universal_newlines`` in subprocess.  I chose this
    name since the main effect is returning bytes (`False`) vs. str
    (`True`), though it also tries to normalize newlines across
    platforms.
capture_output : bool
    Set stdout and stderr to subprocess.PIPE

Returns
-------
proc : subprocess.Popen

See Also
--------
subprocess.run

Raises
------
pytest.xfail
    If platform is Cygwin and subprocess reports a fork() failure.

---
## subprocess_run_helper
```python
from __init__ import subprocess_run_helper
```

Run a function in a sub-process.

Parameters
----------
func : function
    The function to be run.  It must be in a module that is importable.
*args : str
    Any additional command line arguments to be passed in
    the first argument to ``subprocess.run``.
extra_env : dict[str, str]
    Any additional environment variables to be set for the subprocess.

---
## _check_for_pgf
```python
from __init__ import _check_for_pgf
```

Check if a given TeX system + pgf is available

Parameters
----------
texsystem : str
    The executable name to check

---
## _has_tex_package
```python
from __init__ import _has_tex_package
```



---
## ipython_in_subprocess
```python
from __init__ import ipython_in_subprocess
```



---
## is_ci_environment
```python
from __init__ import is_ci_environment
```

Checking if running in a continuous integration environment by checking
the PANDAS_CI environment variable.

Returns
-------
bool
    True if the running in a continuous integration environment.

---
## get_ax
```python
from widgets import get_ax
```

Create a plot and return its Axes.

---
## noop
```python
from widgets import noop
```



---
## mock_event
```python
from widgets import mock_event
```

Create a mock event that can stand in for `.Event` and its subclasses.

This event is intended to be used in tests where it can be passed into
event handling functions.

Parameters
----------
ax : `~matplotlib.axes.Axes`
    The Axes the event will be in.
xdata : float
    x coord of mouse in data coords.
ydata : float
    y coord of mouse in data coords.
button : None or `MouseButton` or {'up', 'down'}
    The mouse button pressed in this event (see also `.MouseEvent`).
key : None or str
    The key pressed when the mouse event triggered (see also `.KeyEvent`).
step : int
    Number of scroll steps (positive for 'up', negative for 'down').

Returns
-------
event
    A `.Event`\-like Mock instance.

---
## do_event
```python
from widgets import do_event
```

Trigger an event on the given tool.

Parameters
----------
tool : matplotlib.widgets.AxesWidget
etype : str
    The event to trigger.
xdata : float
    x coord of mouse in data coords.
ydata : float
    y coord of mouse in data coords.
button : None or `MouseButton` or {'up', 'down'}
    The mouse button pressed in this event (see also `.MouseEvent`).
key : None or str
    The key pressed when the mouse event triggered (see also `.KeyEvent`).
step : int
    Number of scroll steps (positive for 'up', negative for 'down').

---
## click_and_drag
```python
from widgets import click_and_drag
```

Helper to simulate a mouse drag operation.

Parameters
----------
tool : `~matplotlib.widgets.Widget`
start : [float, float]
    Starting point in data coordinates.
end : [float, float]
    End point in data coordinates.
key : None or str
     An optional key that is pressed during the whole operation
     (see also `.KeyEvent`).

---
## ImageComparisonFailure
```python
from exceptions import ImageComparisonFailure
```

Raise this exception to mark a test as a comparison between two images.

---
## __name__
```python
from _markers import __name__
```

pytest markers for the internal Matplotlib test suite.

---
## _checkdep_usetex
```python
from _markers import _checkdep_usetex
```



---
## __name__
```python
from compare import __name__
```

Utilities for comparing image results.

---
## make_test_filename
```python
from compare import make_test_filename
```

Make a new filename by inserting *purpose* before the file's extension.

---
## _get_cache_path
```python
from compare import _get_cache_path
```



---
## get_cache_dir
```python
from compare import get_cache_dir
```



---
## get_file_hash
```python
from compare import get_file_hash
```



---
## _ConverterError
```python
from compare import _ConverterError
```



---
## _Converter
```python
from compare import _Converter
```



---
## _GSConverter
```python
from compare import _GSConverter
```



---
## _SVGConverter
```python
from compare import _SVGConverter
```



---
## _SVGWithMatplotlibFontsConverter
```python
from compare import _SVGWithMatplotlibFontsConverter
```

A SVG converter which explicitly adds the fonts shipped by Matplotlib to
Inkspace's font search path, to better support `svg.fonttype = "none"`
(which is in particular used by certain mathtext tests).

---
## _update_converter
```python
from compare import _update_converter
```



---
## comparable_formats
```python
from compare import comparable_formats
```

Return the list of file formats that `.compare_images` can compare
on this system.

Returns
-------
list of str
    E.g. ``['png', 'pdf', 'svg', 'eps']``.

---
## convert
```python
from compare import convert
```

Convert the named file to png; return the name of the created file.

If *cache* is True, the result of the conversion is cached in
`matplotlib.get_cachedir() + '/test_cache/'`.  The caching is based on a
hash of the exact contents of the input file.  Old cache entries are
automatically deleted as needed to keep the size of the cache capped to
twice the size of all baseline images.

---
## _clean_conversion_cache
```python
from compare import _clean_conversion_cache
```



---
## _register_conversion_cache_cleaner_once
```python
from compare import _register_conversion_cache_cleaner_once
```



---
## crop_to_same
```python
from compare import crop_to_same
```



---
## calculate_rms
```python
from compare import calculate_rms
```

Calculate the per-pixel errors, then compute the root mean square error.

---
## _load_image
```python
from compare import _load_image
```



---
## compare_images
```python
from compare import compare_images
```

Compare two "image" files checking differences within a tolerance.

The two given filenames may point to files which are convertible to
PNG via the `.converter` dictionary. The underlying RMS is calculated
with the `.calculate_rms` function.

Parameters
----------
expected : str
    The filename of the expected image.
actual : str
    The filename of the actual image.
tol : float
    The tolerance (a color value difference, where 255 is the
    maximal difference).  The test fails if the average pixel
    difference is greater than this value.
in_decorator : bool
    Determines the output format. If called from image_comparison
    decorator, this should be True. (default=False)

Returns
-------
None or dict or str
    Return *None* if the images are equal within the given tolerance.

    If the images differ, the return value depends on  *in_decorator*.
    If *in_decorator* is true, a dict with the following entries is
    returned:

    - *rms*: The RMS of the image difference.
    - *expected*: The filename of the expected image.
    - *actual*: The filename of the actual image.
    - *diff_image*: The filename of the difference image.
    - *tol*: The comparison tolerance.

    Otherwise, a human-readable multi-line string representation of this
    information is returned.

Examples
--------
::

    img1 = "./baseline/plot.png"
    img2 = "./output/plot.png"
    compare_images(img1, img2, 0.001)

---
## save_diff_image
```python
from compare import save_diff_image
```

Parameters
----------
expected : str
    File path of expected image.
actual : str
    File path of actual image.
output : str
    File path to save difference image to.

---
## __init__
```python
from compare import __init__
```



---
## __del__
```python
from compare import __del__
```



---
## _read_until
```python
from compare import _read_until
```

Read until the prompt is reached.

---
## __call__
```python
from compare import __call__
```



---
## encode_and_escape
```python
from compare import encode_and_escape
```



---
## _cleanup_cm
```python
from decorators import _cleanup_cm
```



---
## _check_freetype_version
```python
from decorators import _check_freetype_version
```



---
## _checked_on_freetype_version
```python
from decorators import _checked_on_freetype_version
```



---
## remove_ticks_and_titles
```python
from decorators import remove_ticks_and_titles
```



---
## _collect_new_figures
```python
from decorators import _collect_new_figures
```

After::

    with _collect_new_figures() as figs:
        some_code()

the list *figs* contains the figures that have been created during the
execution of ``some_code``, sorted by figure number.

---
## _raise_on_image_difference
```python
from decorators import _raise_on_image_difference
```



---
## _ImageComparisonBase
```python
from decorators import _ImageComparisonBase
```

Image comparison base class

This class provides *just* the comparison-related functionality and avoids
any code that would be specific to any testing framework.

---
## _pytest_image_comparison
```python
from decorators import _pytest_image_comparison
```

Decorate function with image comparison for pytest.

This function creates a decorator that wraps a figure-generating function
with image comparison code.

---
## image_comparison
```python
from decorators import image_comparison
```

Compare images generated by the test with those specified in
*baseline_images*, which must correspond, else an `ImageComparisonFailure`
exception will be raised.

Parameters
----------
baseline_images : list or None
    A list of strings specifying the names of the images generated by
    calls to `.Figure.savefig`.

    If *None*, the test function must use the ``baseline_images`` fixture,
    either as a parameter or with `pytest.mark.usefixtures`. This value is
    only allowed when using pytest.

extensions : None or list of str
    The list of extensions to test, e.g. ``['png', 'pdf']``.

    If *None*, defaults to all supported extensions: png, pdf, and svg.

    When testing a single extension, it can be directly included in the
    names passed to *baseline_images*.  In that case, *extensions* must not
    be set.

    In order to keep the size of the test suite from ballooning, we only
    include the ``svg`` or ``pdf`` outputs if the test is explicitly
    exercising a feature dependent on that backend (see also the
    `check_figures_equal` decorator for that purpose).

tol : float, default: 0
    The RMS threshold above which the test is considered failed.

    Due to expected small differences in floating-point calculations, on
    32-bit systems an additional 0.06 is added to this threshold.

freetype_version : str or tuple
    The expected freetype version or range of versions for this test to
    pass.

remove_text : bool
    Remove the title and tick text from the figure before comparison.  This
    is useful to make the baseline images independent of variations in text
    rendering between different versions of FreeType.

    This does not remove other, more deliberate, text, such as legends and
    annotations.

savefig_kwarg : dict
    Optional arguments that are passed to the savefig method.

style : str, dict, or list
    The optional style(s) to apply to the image test. The test itself
    can also apply additional styles if desired. Defaults to ``["classic",
    "_classic_test_patch"]``.

---
## check_figures_equal
```python
from decorators import check_figures_equal
```

Decorator for test cases that generate and compare two figures.

The decorated function must take two keyword arguments, *fig_test*
and *fig_ref*, and draw the test and reference images on them.
After the function returns, the figures are saved and compared.

This decorator should be preferred over `image_comparison` when possible in
order to keep the size of the test suite from ballooning.

Parameters
----------
extensions : list, default: ["png", "pdf", "svg"]
    The extensions to test.
tol : float
    The RMS threshold above which the test is considered failed.

Raises
------
RuntimeError
    If any new figures are created (and not subsequently closed) inside
    the test function.

Examples
--------
Check that calling `.Axes.plot` with a single argument plots it against
``[0, 1, 2, ...]``::

    @check_figures_equal()
    def test_plot(fig_test, fig_ref):
        fig_test.subplots().plot([1, 3, 5])
        fig_ref.subplots().plot([0, 1, 2], [1, 3, 5])

---
## _image_directories
```python
from decorators import _image_directories
```

Compute the baseline and result image directories for testing *func*.

For test module ``foo.bar.test_baz``, the baseline directory is at
``foo/bar/baseline_images/test_baz`` and the result directory at
``$(pwd)/result_images/test_baz``.  The result directory is created if it
doesn't exist.

---
## remove_ticks
```python
from decorators import remove_ticks
```

Remove ticks in *ax* and all its child Axes.

---
## __init__
```python
from decorators import __init__
```



---
## copy_baseline
```python
from decorators import copy_baseline
```



---
## compare
```python
from decorators import compare
```



---
## wrapper
```python
from decorators import wrapper
```



---
## __name__
```python
from _formlayout import __name__
```

formlayout
==========

Module creating Qt form dialogs/layouts to edit various type of parameters


formlayout License Agreement (MIT License)
------------------------------------------

Copyright (c) 2009 Pierre Raybaut

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

---
## ColorButton
```python
from _formlayout import ColorButton
```

Color choosing push button

---
## to_qcolor
```python
from _formlayout import to_qcolor
```

Create a QColor from a matplotlib color

---
## ColorLayout
```python
from _formlayout import ColorLayout
```

Color-specialized QLineEdit layout

---
## font_is_installed
```python
from _formlayout import font_is_installed
```

Check if font is installed

---
## tuple_to_qfont
```python
from _formlayout import tuple_to_qfont
```

Create a QFont from tuple:
(family [string], size [int], italic [bool], bold [bool])

---
## qfont_to_tuple
```python
from _formlayout import qfont_to_tuple
```



---
## FontLayout
```python
from _formlayout import FontLayout
```

Font selection

---
## is_edit_valid
```python
from _formlayout import is_edit_valid
```



---
## FormWidget
```python
from _formlayout import FormWidget
```



---
## FormComboWidget
```python
from _formlayout import FormComboWidget
```



---
## FormTabWidget
```python
from _formlayout import FormTabWidget
```



---
## FormDialog
```python
from _formlayout import FormDialog
```

Form Dialog

---
## fedit
```python
from _formlayout import fedit
```

Create form dialog

data: datalist, datagroup
title: str
comment: str
icon: QIcon instance
parent: parent QWidget
apply: apply callback (function)

datalist: list/tuple of (field_name, field_value)
datagroup: list/tuple of (datalist *or* datagroup, title, comment)

-> one field for each member of a datalist
-> one tab for each member of a top-level datagroup
-> one page (of a multipage widget, each page can be selected with a combo
   box) for each member of a datagroup inside a datagroup

Supported types for field_value:
  - int, float, str, bool
  - colors: in Qt-compatible text form, i.e. in hex format or name
            (red, ...) (automatically detected from a string)
  - list/tuple:
      * the first element will be the selected index (or value)
      * the other elements can be couples (key, value) or only values

---
## __init__
```python
from _formlayout import __init__
```



---
## choose_color
```python
from _formlayout import choose_color
```



---
## get_color
```python
from _formlayout import get_color
```



---
## set_color
```python
from _formlayout import set_color
```



---
## update_color
```python
from _formlayout import update_color
```



---
## update_text
```python
from _formlayout import update_text
```



---
## text
```python
from _formlayout import text
```



---
## get_font
```python
from _formlayout import get_font
```



---
## get_dialog
```python
from _formlayout import get_dialog
```

Return FormDialog instance

---
## setup
```python
from _formlayout import setup
```



---
## get
```python
from _formlayout import get
```

Return form result

---
## register_float_field
```python
from _formlayout import register_float_field
```



---
## update_buttons
```python
from _formlayout import update_buttons
```



---
## accept
```python
from _formlayout import accept
```



---
## reject
```python
from _formlayout import reject
```



---
## apply
```python
from _formlayout import apply
```



---
## create_datalist_example
```python
from _formlayout import create_datalist_example
```



---
## create_datagroup_example
```python
from _formlayout import create_datagroup_example
```



---
## apply_test
```python
from _formlayout import apply_test
```



---
## __name__
```python
from figureoptions import __name__
```

Module that provides a GUI-based editor for Matplotlib's figure options.

---
## figure_edit
```python
from figureoptions import figure_edit
```

Edit matplotlib figure options

---
## convert_limits
```python
from figureoptions import convert_limits
```

Convert axis limits for correct input editors.

---
## prepare_data
```python
from figureoptions import prepare_data
```

Prepare entry for FormLayout.

*d* is a mapping of shorthands to style names (a single style may
have multiple shorthands, in particular the shorthands `None`,
`"None"`, `"none"` and `""` are synonyms); *init* is one shorthand
of the initial style.

This function returns an list suitable for initializing a
FormLayout combobox, namely `[initial_name, (shorthand,
style_name), (shorthand, style_name), ...]`.

---
## apply_callback
```python
from figureoptions import apply_callback
```

A callback to apply changes.

---
## __name__
```python
from UnitDblFormatter import __name__
```

UnitDblFormatter module containing class UnitDblFormatter.

---
## UnitDblFormatter
```python
from UnitDblFormatter import UnitDblFormatter
```

The formatter for UnitDbl data types.

This allows for formatting with the unit string.

---
## __call__
```python
from UnitDblFormatter import __call__
```



---
## format_data_short
```python
from UnitDblFormatter import format_data_short
```



---
## format_data
```python
from UnitDblFormatter import format_data
```



---
## __name__
```python
from UnitDbl import __name__
```

UnitDbl module.

---
## UnitDbl
```python
from UnitDbl import UnitDbl
```

Class UnitDbl in development.

---
## __init__
```python
from UnitDbl import __init__
```

Create a new UnitDbl object.

Units are internally converted to km, rad, and sec.  The only
valid inputs for units are [m, km, mile, rad, deg, sec, min, hour].

The field UnitDbl.value will contain the converted value.  Use
the convert() method to get a specific type of units back.

= ERROR CONDITIONS
- If the input units are not in the allowed list, an error is thrown.

= INPUT VARIABLES
- value     The numeric value of the UnitDbl.
- units     The string name of the units the value is in.

---
## convert
```python
from UnitDbl import convert
```

Convert the UnitDbl to a specific set of units.

= ERROR CONDITIONS
- If the input units are not in the allowed list, an error is thrown.

= INPUT VARIABLES
- units     The string name of the units to convert to.

= RETURN VALUE
- Returns the value of the UnitDbl in the requested units as a floating
  point number.

---
## __abs__
```python
from UnitDbl import __abs__
```

Return the absolute value of this UnitDbl.

---
## __neg__
```python
from UnitDbl import __neg__
```

Return the negative value of this UnitDbl.

---
## __bool__
```python
from UnitDbl import __bool__
```

Return the truth value of a UnitDbl.

---
## _cmp
```python
from UnitDbl import _cmp
```

Check that *self* and *rhs* share units; compare them using *op*.

---
## _binop_unit_unit
```python
from UnitDbl import _binop_unit_unit
```

Check that *self* and *rhs* share units; combine them using *op*.

---
## _binop_unit_scalar
```python
from UnitDbl import _binop_unit_scalar
```

Combine *self* and *scalar* using *op*.

---
## __str__
```python
from UnitDbl import __str__
```

Print the UnitDbl.

---
## __repr__
```python
from UnitDbl import __repr__
```

Print the UnitDbl.

---
## type
```python
from UnitDbl import type
```

Return the type of UnitDbl data.

---
## range
```python
from UnitDbl import range
```

Generate a range of UnitDbl objects.

Similar to the Python range() method.  Returns the range [
start, stop) at the requested step.  Each element will be a
UnitDbl object.

= INPUT VARIABLES
- start     The starting value of the range.
- stop      The stop value of the range.
- step      Optional step to use.  If set to None, then a UnitDbl of
              value 1 w/ the units of the start is used.

= RETURN VALUE
- Returns a list containing the requested UnitDbl values.

---
## checkSameUnits
```python
from UnitDbl import checkSameUnits
```

Check to see if units are the same.

= ERROR CONDITIONS
- If the units of the rhs UnitDbl are not the same as our units,
  an error is thrown.

= INPUT VARIABLES
- rhs     The UnitDbl to check for the same units
- func    The name of the function doing the check.

---
## __name__
```python
from EpochConverter import __name__
```

EpochConverter module containing class EpochConverter.

---
## EpochConverter
```python
from EpochConverter import EpochConverter
```

Provides Matplotlib conversion functionality for Monte Epoch and Duration
classes.

---
## axisinfo
```python
from EpochConverter import axisinfo
```



---
## float2epoch
```python
from EpochConverter import float2epoch
```

Convert a Matplotlib floating-point date into an Epoch of the specified
units.

= INPUT VARIABLES
- value     The Matplotlib floating-point date.
- unit      The unit system to use for the Epoch.

= RETURN VALUE
- Returns the value converted to an Epoch in the specified time system.

---
## epoch2float
```python
from EpochConverter import epoch2float
```

Convert an Epoch value to a float suitable for plotting as a python
datetime object.

= INPUT VARIABLES
- value    An Epoch or list of Epochs that need to be converted.
- unit     The units to use for an axis with Epoch data.

= RETURN VALUE
- Returns the value parameter converted to floats.

---
## duration2float
```python
from EpochConverter import duration2float
```

Convert a Duration value to a float suitable for plotting as a python
datetime object.

= INPUT VARIABLES
- value    A Duration or list of Durations that need to be converted.

= RETURN VALUE
- Returns the value parameter converted to floats.

---
## convert
```python
from EpochConverter import convert
```



---
## default_units
```python
from EpochConverter import default_units
```



---
## __name__
```python
from Duration import __name__
```

Duration module.

---
## Duration
```python
from Duration import Duration
```

Class Duration in development.

---
## __init__
```python
from Duration import __init__
```

Create a new Duration object.

= ERROR CONDITIONS
- If the input frame is not in the allowed list, an error is thrown.

= INPUT VARIABLES
- frame     The frame of the duration.  Must be 'ET' or 'UTC'
- seconds  The number of seconds in the Duration.

---
## frame
```python
from Duration import frame
```

Return the frame the duration is in.

---
## __abs__
```python
from Duration import __abs__
```

Return the absolute value of the duration.

---
## __neg__
```python
from Duration import __neg__
```

Return the negative value of this Duration.

---
## seconds
```python
from Duration import seconds
```

Return the number of seconds in the Duration.

---
## __bool__
```python
from Duration import __bool__
```



---
## _cmp
```python
from Duration import _cmp
```

Check that *self* and *rhs* share frames; compare them using *op*.

---
## __add__
```python
from Duration import __add__
```

Add two Durations.

= ERROR CONDITIONS
- If the input rhs is not in the same frame, an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to add.

= RETURN VALUE
- Returns the sum of ourselves and the input Duration.

---
## __sub__
```python
from Duration import __sub__
```

Subtract two Durations.

= ERROR CONDITIONS
- If the input rhs is not in the same frame, an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to subtract.

= RETURN VALUE
- Returns the difference of ourselves and the input Duration.

---
## __mul__
```python
from Duration import __mul__
```

Scale a UnitDbl by a value.

= INPUT VARIABLES
- rhs     The scalar to multiply by.

= RETURN VALUE
- Returns the scaled Duration.

---
## __str__
```python
from Duration import __str__
```

Print the Duration.

---
## __repr__
```python
from Duration import __repr__
```

Print the Duration.

---
## checkSameFrame
```python
from Duration import checkSameFrame
```

Check to see if frames are the same.

= ERROR CONDITIONS
- If the frame of the rhs Duration is not the same as our frame,
  an error is thrown.

= INPUT VARIABLES
- rhs     The Duration to check for the same frame
- func    The name of the function doing the check.

---
## __name__
```python
from UnitDblConverter import __name__
```

UnitDblConverter module containing class UnitDblConverter.

---
## rad_fn
```python
from UnitDblConverter import rad_fn
```

Radian function formatter.

---
## UnitDblConverter
```python
from UnitDblConverter import UnitDblConverter
```

Provides Matplotlib conversion functionality for the Monte UnitDbl class.

---
## axisinfo
```python
from UnitDblConverter import axisinfo
```



---
## convert
```python
from UnitDblConverter import convert
```



---
## default_units
```python
from UnitDblConverter import default_units
```



---
## __name__
```python
from Epoch import __name__
```

Epoch module.

---
## Epoch
```python
from Epoch import Epoch
```



---
## __init__
```python
from Epoch import __init__
```

Create a new Epoch object.

Build an epoch 1 of 2 ways:

Using seconds past a Julian date:
#   Epoch('ET', sec=1e8, jd=2451545)

or using a matplotlib day number
#   Epoch('ET', daynum=730119.5)

= ERROR CONDITIONS
- If the input units are not in the allowed list, an error is thrown.

= INPUT VARIABLES
- frame     The frame of the epoch.  Must be 'ET' or 'UTC'
- sec        The number of seconds past the input JD.
- jd         The Julian date of the epoch.
- daynum    The matplotlib day number of the epoch.
- dt         A python datetime instance.

---
## convert
```python
from Epoch import convert
```



---
## frame
```python
from Epoch import frame
```



---
## julianDate
```python
from Epoch import julianDate
```



---
## secondsPast
```python
from Epoch import secondsPast
```



---
## _cmp
```python
from Epoch import _cmp
```

Compare Epochs *self* and *rhs* using operator *op*.

---
## __add__
```python
from Epoch import __add__
```

Add a duration to an Epoch.

= INPUT VARIABLES
- rhs     The Epoch to subtract.

= RETURN VALUE
- Returns the difference of ourselves and the input Epoch.

---
## __sub__
```python
from Epoch import __sub__
```

Subtract two Epoch's or a Duration from an Epoch.

Valid:
Duration = Epoch - Epoch
Epoch = Epoch - Duration

= INPUT VARIABLES
- rhs     The Epoch to subtract.

= RETURN VALUE
- Returns either the duration between to Epoch's or the a new
  Epoch that is the result of subtracting a duration from an epoch.

---
## __str__
```python
from Epoch import __str__
```

Print the Epoch.

---
## __repr__
```python
from Epoch import __repr__
```

Print the Epoch.

---
## range
```python
from Epoch import range
```

Generate a range of Epoch objects.

Similar to the Python range() method.  Returns the range [
start, stop) at the requested step.  Each element will be a
Epoch object.

= INPUT VARIABLES
- start     The starting value of the range.
- stop      The stop value of the range.
- step      Step to use.

= RETURN VALUE
- Returns a list containing the requested Epoch values.

---
## __name__
```python
from StrConverter import __name__
```

StrConverter module containing class StrConverter.

---
## StrConverter
```python
from StrConverter import StrConverter
```

A Matplotlib converter class for string data values.

Valid units for string are:
- 'indexed' : Values are indexed as they are specified for plotting.
- 'sorted'  : Values are sorted alphanumerically.
- 'inverted' : Values are inverted so that the first value is on top.
- 'sorted-inverted' :  A combination of 'sorted' and 'inverted'

---
## axisinfo
```python
from StrConverter import axisinfo
```



---
## convert
```python
from StrConverter import convert
```



---
## default_units
```python
from StrConverter import default_units
```



---
## compress_and_pickle
```python
from base import compress_and_pickle
```

Take an object, serialize it and write it to a compresser's stream.

This is the main serialization function. It works as a singledispatch function, and its
implementation is dependent on the type of the supplied ``compresser``. The default
implementation only supports :class:`~compress_pickle.compressers.base.BaseCompresser`
instances.

The ``compresser`` is used to get the stream onto which to write the serialized ``obj``.
The ``pickler`` instance is the object that is responsible for `dumping` the ``obj`` to the
compresser's stream.

Parameters
----------
compresser : BaseCompresser
    The compresser instance that provides the file-like object onto which the ``obj`` must be
    written.
pickler : BasePicklerIO
    The object that is responsible for serializing the ``obj`` and writting its binary
    representation into the file-like stream provided by the ``compresser``.
obj : Any
    The object that you wish to serialize, compress and write.
**kwargs
    Any extra keyword arguments are passed to the pickler's ``dump`` method.

Raises
------
NotImplementedError
    If the ``compresser`` is not an instance of
    :class:`~compress_pickle.compressers.base.BaseCompresser`

---
## default_compress_and_pickle
```python
from base import default_compress_and_pickle
```



---
## uncompress_and_unpickle
```python
from base import uncompress_and_unpickle
```

Load and uncompress an object from a compresser's stream.

This is the main loading function. It works as a singledispatch function, and its
implementation is dependent on the type of the supplied ``compresser``. The default
implementation only supports :class:`~compress_pickle.compressers.base.BaseCompresser`
instances.

The ``compresser`` is used to get the stream from which to load the serialized ``obj``.
The ``pickler`` instance is the object that is responsible for `loading` the ``obj`` from the
compresser's stream.

Parameters
----------
compresser : BaseCompresser
    The compresser instance that provides the file-like object from which to load the ``obj``.
pickler : BasePicklerIO
    The object that is responsible for reading the contents of the file-like stream taken from
    the ``compresser`` and loading the serialized object
**kwargs
    Any extra keyword arguments are passed to the pickler's ``load`` method.

Returns
-------
Any
    The resulting uncompressed and unserialized object.

Raises
------
NotImplementedError
    If the ``compresser`` is not an instance of
    :class:`~compress_pickle.compressers.base.BaseCompresser`

---
## default_uncompress_and_unpickle
```python
from base import default_uncompress_and_unpickle
```



---
## __name__
```python
from zipfile import __name__
```



---
## ZipfileCompresser
```python
from zipfile import ZipfileCompresser
```

Compresser class that wraps the zipfile compression package.

This class relies on the :mod:`zipfile` module to open the input/output binary stream where the
pickled python objects will be written to (or read from).
During an instance's initialization, a :class:`zipfile.ZipFile` instance is created around
the supplied ``path``. The opened ``ZipFile`` is called the archive and works as a kind
directory, that can hold other directories or files. These are called members of the archive.
The ``ZipfileCompresser`` creates the input/output stream by opening a member file in the
opened ``ZipFile`` archive. The name of the archive member can be chosen with the ``arcname``
argument.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    ``zipfile.Zipfile`` object. The input/output binary stream is then opened from the
    aforementioned object as ``zipfile.Zipfile(*).open(arcname, mode)``.
mode : str
    Mode with which to open the ``Zipfile`` (and also the archive member that is used as the
    input/output binary stream).
arcname : Optional[str]
    The name of the archive member of the opened ``zipfile.Zipfile`` that will be used as
    the binary input/output stream.
    If ``None``, the ``arcname`` is assumed to be the basename of ``path`` (when ``path``
    is path-like), ``path.name`` (when ``path`` is file-like and it has a name attribute) or
    "default" otherwise.
pwd : Optional[str]
    The password used to decrypt encrypted ZIP files.
zipfile_compression : Optional[str]
    If not ``None``, it is passed as the ``compression`` keyword argument to
    ``zipfile.Zipfile(...)``.
kwargs
    Any other key word arguments that are passed to ``zipfile.ZipFile``.

---
## __init__
```python
from zipfile import __init__
```



---
## close
```python
from zipfile import close
```

Close the input/output binary stream and the ``ZipFile``.

This closes the ``zipfile.ZipFile`` instance and archive member file-objects that
are created during the ``__init__``.

---
## get_stream
```python
from zipfile import get_stream
```



---
## __name__
```python
from lzma import __name__
```



---
## LzmaCompresser
```python
from lzma import LzmaCompresser
```

Compresser class that wraps the lzma compression package.

This class relies on the :mod:`lzma` module to open the input/output binary stream where the
pickled python objects will be written to (or read from). During an instance's initialization,
the binary stream is opened using ``lzma.open(path, mode=mode, **kwargs)``.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that are passed to :func:`lzma.open`.

---
## __init__
```python
from lzma import __init__
```



---
## close
```python
from lzma import close
```



---
## get_stream
```python
from lzma import get_stream
```



---
## GzipCompresser
```python
from gzip import GzipCompresser
```

Compresser class that wraps the gzip compression package.

This class relies on the :mod:`gzip` module to open the input/output binary stream where the
pickled python objects will be written to (or read from). During an instance's initialization,
the binary stream is opened using ``gzip.open(path, mode=mode, **kwargs)``.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that are passed to :func:`gzip.open`.

---
## close
```python
from gzip import close
```



---
## get_stream
```python
from gzip import get_stream
```



---
## __name__
```python
from no_compression import __name__
```



---
## NoCompresser
```python
from no_compression import NoCompresser
```

Compresser class that represents a simple uncompressed file object.

This class either simply calls ``open`` on the supplied ``path`` or uses the ``path`` as
the binary input/output stream.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that are passed to :func:`open`.

---
## __init__
```python
from no_compression import __init__
```



---
## close
```python
from no_compression import close
```

Close the input/output stream if necessary.

This will only close the stream if the ``path`` argument passed during construction was a
``PathType`` (``str``, ``bytes``, ``os.PathType``). Otherwise, this method doesn't do
anything.

---
## get_stream
```python
from no_compression import get_stream
```



---
## __name__
```python
from bz2 import __name__
```



---
## Bz2Compresser
```python
from bz2 import Bz2Compresser
```

Compresser class that wraps the bz2 compression package.

This class relies on the :mod:`bz2` module to open the input/output binary stream where the
pickled python objects will be written to (or read from). During an instance's initialization,
the binary stream is opened using ``bz2.open(path, mode=mode, **kwargs)``.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that are passed to :func:`bz2.open`.

---
## __init__
```python
from bz2 import __init__
```



---
## close
```python
from bz2 import close
```



---
## get_stream
```python
from bz2 import get_stream
```



---
## __name__
```python
from lz4 import __name__
```



---
## Lz4Compresser
```python
from lz4 import Lz4Compresser
```

Compresser class that wraps the lz4 compression package.

This class relies on the :mod:`lz4` module to open the input/output binary stream where the
pickled python objects will be written to (or read from). During an instance's initialization,
the binary stream is opened using ``lz4.frame.open(path, mode=mode, **kwargs)``.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that are passed to :func:`lz4.frame.open`.

---
## __init__
```python
from lz4 import __init__
```



---
## close
```python
from lz4 import close
```



---
## get_stream
```python
from lz4 import get_stream
```



---
## _compresser_registry
```python
from registry import _compresser_registry
```



---
## get_registered_extensions
```python
from registry import get_registered_extensions
```

Get a copy of the mapping between file extensions and registered compressers.

Returns
-------
Dict[str, Optional[str]]
    The mapping between file extensions and registered compressers.

---
## get_known_compressions
```python
from registry import get_known_compressions
```

Get a list of known compression protocols

Returns
-------
compressions : List[Optional[str]]
    List of known compression protocol names.

---
## validate_compression
```python
from registry import validate_compression
```

Check if the supplied ``compression`` protocol is supported.

If it is not supported, a ``ValueError`` is raised.

Parameters
----------
compression : Optional[str]
    A compression protocol. To see the known compression protocolos, use
    :func:`~.get_known_compressions`
infer_is_valid : bool
    If ``True``, ``compression="infer"`` is considered a valid compression
    protocol. If ``False``, it is not accepted as a valid compression
    protocol.

Raises
------
ValueError
    If the supplied ``compression`` is not supported.

---
## get_default_compression_mapping
```python
from registry import get_default_compression_mapping
```

Get a mapping from known compression protocols to the default filename extensions.

Returns
-------
compression_map : Dict[Optional[str], str]
    Dictionary that maps known compression protocol names to their default
    file extension.

---
## list_registered_compressers
```python
from registry import list_registered_compressers
```

Get the list of registered compresser classes.

Returns
-------
List[Type[BaseCompresser]]
    The list of registered compresser classes.

---
## get_compresser
```python
from registry import get_compresser
```

Get the compresser class registered with a given compression name.

Parameters
----------
compression : Optional[str]
    The compression name.

Raises
------
ValueError
    If the supplied ``compression`` has not been registered.

Returns
-------
Type[BaseCompresser]
    The compresser class associated to the ``compression`` name.

---
## get_compresser_from_extension
```python
from registry import get_compresser_from_extension
```

Get the compresser class registered with a given file extension.

Parameters
----------
extension : str
    The file extension, for example ".zip".
    Note that the dot characters will be striped from the left of any supplied extension
    before the lookup it. This means that ".zip" and "zip" will be considered equivalent
    extensions.

Raises
------
ValueError
    If the supplied ``extension`` has not been registered.

Returns
-------
Type[BaseCompresser]
    The compresser class associated to the extension.

---
## get_compression_from_extension
```python
from registry import get_compression_from_extension
```

Get the compression name registered with a given file extension.

Parameters
----------
extension : str
    The file extension, for example ".zip".
    Note that the dot characters will be striped from the left of any supplied extension
    before the lookup it. This means that ".zip" and "zip" will be considered equivalent
    extensions.

Raises
------
ValueError
    If the supplied ``extension`` has not been registered.

Returns
-------
Optional[str]
    The compression name associated to the extension.

---
## register_compresser
```python
from registry import register_compresser
```

Register a compression method, along with its compresser class, extensions and modes.

Parameters
----------
compression : Optional[str]
    The compression name that will be registered.
compresser : Type[BaseCompresser]
    The compresser class. This should be a :class:`~compress_pickle.compressers.base.BaseCompresser`
    subclass.
extensions : Sequence[str]
    A sequence of file name extensions (e.g. [".zip"]) that will be registered to the
    supplied compression. These extensions will be used to infer the compression method to
    use from a file name. The first entry in the ``extensions`` sequence will be used as
    the compression's default extension name. For example, if ``extensions = ["bz2", "bz"]``
    both the extensions ``"bz2"`` and ``"bz"`` will be registered to the ``compression``,
    but ``"bz2"`` will be taken as the compression's default extension.
    Note that the dot characters will be striped from the left of any supplied extension
    before registering it. This means that ".zip" and "zip" will be considered equivalent
    extensions.
default_write_mode : str
    The write mode with which to open the file object stream by default.
default_read_mode : str
    The read mode with which to open the file object stream by default.

Raises
------
ValueError
    If the supplied ``compression`` is already contained in the registry or if any of the
    supplied extensions is already registered.
TypeError
    If the supplied compresser is not a :class:`~compress_pickle.compressers.base.BaseCompresser`
    subclass.

---
## get_compression_write_mode
```python
from registry import get_compression_write_mode
```

Get the compression's default mode for openning the file buffer for writing.

Parameters
----------
compression : Optional[str]
    The compression name.

Returns
-------
compression_write_mode : str
    The default write mode of the given ``compression``.

Raises
------
ValueError
    If the default write mode of the supplied ``compression`` is not known.

---
## get_compression_read_mode
```python
from registry import get_compression_read_mode
```

Get the compression's default mode for openning the file buffer for reading.

Parameters
----------
compression : Optional[str]
    The compression name.

Returns
-------
compression_read_mode : str
    The default read mode of the given ``compression``.

Raises
------
ValueError
    If the default write mode of the supplied ``compression`` is not known.

---
## add_compression_alias
```python
from registry import add_compression_alias
```

Add an alias for an already registered compression.

Parameters
----------
alias : str
    The alias to register
compression : Optional[str]
    The compression name that must already be registered.

Raises
------
ValueError
    If the supplied ``compression`` is not known or if the supplied ``alias``
    is already contained in the registry.

---
## BaseCompresser
```python
from base import BaseCompresser
```

Compresser abstract base class.

This class is in charge of handing the binary stream where the pickled python objects must
be written to (or read from). During an instance's initialization, the binary stream must
be opened based on a supplied ``path`` parameter and ``mode``. This stream is nothing more than
a python "file-like" object that is in charge of actually writting and reading the binary
contents.

Parameters
----------
path : Union[PathType, IO[bytes]]
    A PathType object (``str``, ``bytes``, ``os.PathType``) or a file-like
    object (e.g. ``io.BaseIO`` instances). The path that will be used to open the
    input/output binary stream.
mode : str
    Mode with which to open the file buffer.
kwargs
    Any other key word arguments that can be handled by the specific binary stream opener.

---
## get_stream
```python
from base import get_stream
```

Get the input/output binary stream (i.e. a file-like object).

Returns
-------
IO[bytes]
    The input/output binary stream where the pickled objects are written to or read from.

---
## CloudPicklerIO
```python
from cloudpickle import CloudPicklerIO
```

A PicklerIO class that wraps ``cloudpickle.dump`` and ``cloudpickle.load``.

---
## load
```python
from cloudpickle import load
```

Load a serialized binary representation of an object from a stream.

Parameters
----------
stream : IO[bytes]
    The binary stream (file-like object) from where the serialized object must be loaded.
kwargs
    Any extra keyword arguments to pass to ``cloudpickle.load``.

Returns
-------
obj : Any
    The python object that was loaded.

---
## __name__
```python
from marshal import __name__
```



---
## MarshalPicklerIO
```python
from marshal import MarshalPicklerIO
```

A PicklerIO class that wraps standard :func:`marshal.dump` and :func:`marshal.load`.

---
## dump
```python
from marshal import dump
```

Write a serialized binary representation of an object to a stream.

Parameters
----------
obj : Any
    The python object that must be serialized and written.
stream : IO[bytes]
    The binary stream (file-like object) where the serialized object must be written to.
kwargs
    Any extra keyword arguments to pass to :func:`marshal.dump`.

---
## load
```python
from marshal import load
```

Load a serialized binary representation of an object from a stream.

Parameters
----------
stream : IO[bytes]
    The binary stream (file-like object) from where the serialized object must be loaded.
kwargs
    Any extra keyword arguments to pass to :func:`marshal.load`.

Returns
-------
obj : Any
    The python object that was loaded.

---
## __name__
```python
from dill import __name__
```



---
## DillPicklerIO
```python
from dill import DillPicklerIO
```

A PicklerIO class that wraps ``dill.dump`` and ``dill.load``.

---
## __init__
```python
from dill import __init__
```



---
## dump
```python
from dill import dump
```

Write a serialized binary representation of an object to a stream.

Parameters
----------
obj : Any
    The python object that must be serialized and written.
stream : IO[bytes]
    The binary stream (file-like object) where the serialized object must be written to.
kwargs
    Any extra keyword arguments to pass to `dill.dump <https://dill.readthedocs.io/en/latest/dill.html#dill._dill.dump>`_.

---
## load
```python
from dill import load
```

Load a serialized binary representation of an object from a stream.

Parameters
----------
stream : IO[bytes]
    The binary stream (file-like object) from where the serialized object must be loaded.
kwargs
    Any extra keyword arguments to pass to `dill.load <https://dill.readthedocs.io/en/latest/dill.html#dill._dill.load>`_.

Returns
-------
obj : Any
    The python object that was loaded.

---
## __name__
```python
from optimized_pickle import __name__
```



---
## OptimizedPicklerIO
```python
from optimized_pickle import OptimizedPicklerIO
```

A PicklerIO class that combines :func:`pickletools.optimize` and standard :func:`pickle.dump`.

---
## dump
```python
from optimized_pickle import dump
```



---
## _pickler_registry
```python
from registry import _pickler_registry
```



---
## get_known_picklers
```python
from registry import get_known_picklers
```

Get a list of known pickle serialization methods.

Returns
-------
List[str]
    List of known pickler serialization methods.

---
## list_registered_picklers
```python
from registry import list_registered_picklers
```

Get the list of registered PicklerIO classes.

Returns
-------
List[BasePicklerIO]
    The list of registered pickler classes.

---
## get_pickler
```python
from registry import get_pickler
```

Get the PicklerIO class registered with a given pickler name.

Parameters
----------
name: str
    The pickler name.

Raises
------
ValueError
    If the supplied ``name`` has not been registered.

Returns
-------
BasePicklerIO
    The PicklerIO class associated to the pickler ``name``.

---
## register_pickler
```python
from registry import register_pickler
```

Register a pickler handler.

Parameters
----------
name: str
    The pickler name that will be registered.
pickler : Type[BasePicklerIO]
    The PicklerIO class. This should be a :class:`~compress_pickle.picklers.base.BasePicklerIO`
    subclass.

Raises
------
ValueError
    If the supplied ``name`` is already contained in the registry.
TypeError
    If the supplied pickler is not a :class:`~compress_pickle.picklers.base.BasePicklerIO`
    subclass.

---
## add_pickler_alias
```python
from registry import add_pickler_alias
```

Add an alias for an already registered pickler.

Parameters
----------
alias : str
    The alias to register
compression : str
    The pickler name that must already be registered.

Raises
------
ValueError
    If the supplied ``pickler`` name is not known or if the supplied ``alias``
    is already contained in the registry.

---
## __name__
```python
from pickle import __name__
```

pickle compat 

---
## BuiltinPicklerIO
```python
from pickle import BuiltinPicklerIO
```

A PicklerIO class that wraps standard :func:`pickle.dump` and :func:`pickle.load`.

---
## dump
```python
from pickle import dump
```

Write a serialized binary representation of an object to a stream.

Parameters
----------
obj : Any
    The python object that must be serialized and written.
stream : IO[bytes]
    The binary stream (file-like object) where the serialized object must be written to.
kwargs
    Any extra keyword arguments to pass to :func:`pickle.dump`.

---
## load
```python
from pickle import load
```

Load a serialized binary representation of an object from a stream.

Parameters
----------
stream : IO[bytes]
    The binary stream (file-like object) from where the serialized object must be loaded.
kwargs
    Any extra keyword arguments to pass to :func:`pickle.load`.

Returns
-------
obj : Any
    The python object that was loaded.

---
## BasePicklerIO
```python
from base import BasePicklerIO
```

PicklerIO abstract base class.

This class is in charge of writing and reading serialized python objects from a file-like
binary stream.

---
## __name__
```python
from _proxy import __name__
```



---
## LazyProxy
```python
from _proxy import LazyProxy
```

Implements data methods to pretend that an instance is another instance.

This includes forwarding attribute access and other methods.

---
## __getattr__
```python
from _proxy import __getattr__
```



---
## __repr__
```python
from _proxy import __repr__
```



---
## __str__
```python
from _proxy import __str__
```



---
## __dir__
```python
from _proxy import __dir__
```



---
## __class__
```python
from _proxy import __class__
```



---
## __get_proxied__
```python
from _proxy import __get_proxied__
```



---
## __as_proxied__
```python
from _proxy import __as_proxied__
```

Helper method that returns the current proxy, typed as the loaded object

---
## __load__
```python
from _proxy import __load__
```



---
## __name__
```python
from _reflection import __name__
```



---
## function_has_argument
```python
from _reflection import function_has_argument
```

Returns whether or not the given function has a specific parameter

---
## assert_signatures_in_sync
```python
from _reflection import assert_signatures_in_sync
```

Ensure that the signature of the second function matches the first.

---
## is_annotated_type
```python
from _typing import is_annotated_type
```



---
## is_list_type
```python
from _typing import is_list_type
```



---
## is_iterable_type
```python
from _typing import is_iterable_type
```

If the given type is `typing.Iterable[T]`

---
## is_union_type
```python
from _typing import is_union_type
```



---
## is_required_type
```python
from _typing import is_required_type
```



---
## is_typevar
```python
from _typing import is_typevar
```



---
## strip_annotated_type
```python
from _typing import strip_annotated_type
```



---
## extract_type_arg
```python
from _typing import extract_type_arg
```



---
## extract_type_var_from_base
```python
from _typing import extract_type_var_from_base
```

Given a type like `Foo[T]`, returns the generic type variable `T`.

This also handles the case where a concrete subclass is given, e.g.
```py
class MyResponse(Foo[bytes]):
    ...

extract_type_var(MyResponse, bases=(Foo,), index=0) -> bytes
```

And where a generic subclass is given:
```py
_T = TypeVar('_T')
class MyResponse(Foo[_T]):
    ...

extract_type_var(MyResponse[bytes], bases=(Foo,), index=0) -> bytes
```

---
## consume_sync_iterator
```python
from _streams import consume_sync_iterator
```



---
## __name__
```python
from _logs import __name__
```



---
## _basic_config
```python
from _logs import _basic_config
```



---
## setup_logging
```python
from _logs import setup_logging
```



---
## asyncify
```python
from _sync import asyncify
```

Take a blocking function and create an async one that receives the same
positional and keyword arguments, and that when called, calls the original function
in a worker thread using `anyio.to_thread.run_sync()`. Internally,
`asyncer.asyncify()` uses the same `anyio.to_thread.run_sync()`, but it supports
keyword arguments additional to positional arguments and it adds better support for
autocompletion and inline errors for the arguments of the function called and the
return value.

If the `cancellable` option is enabled and the task waiting for its completion is
cancelled, the thread will still run its course but its return value (or any raised
exception) will be ignored.

Use it like this:

```Python
def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str:
    # Do work
    return "Some result"


result = await to_thread.asyncify(do_work)("spam", "ham", kwarg1="a", kwarg2="b")
print(result)
```

## Arguments

`function`: a blocking regular callable (e.g. a function)
`cancellable`: `True` to allow cancellation of the operation
`limiter`: capacity limiter to use to limit the total amount of threads running
    (if omitted, the default limiter is used)

## Return

An async function that takes the same positional and keyword arguments as the
original one, that when called runs the same original function in a thread worker
and returns the result.

---
## flatten
```python
from _utils import flatten
```



---
## extract_files
```python
from _utils import extract_files
```

Recursively extract files from the given dictionary based on specified paths.

A path may look like this ['foo', 'files', '<array>', 'data'].

Note: this mutates the given dictionary.

---
## _extract_items
```python
from _utils import _extract_items
```



---
## is_given
```python
from _utils import is_given
```



---
## is_tuple
```python
from _utils import is_tuple
```



---
## is_tuple_t
```python
from _utils import is_tuple_t
```



---
## is_sequence
```python
from _utils import is_sequence
```



---
## is_sequence_t
```python
from _utils import is_sequence_t
```



---
## is_mapping
```python
from _utils import is_mapping
```



---
## is_mapping_t
```python
from _utils import is_mapping_t
```



---
## is_dict
```python
from _utils import is_dict
```



---
## is_list
```python
from _utils import is_list
```



---
## is_iterable
```python
from _utils import is_iterable
```



---
## deepcopy_minimal
```python
from _utils import deepcopy_minimal
```

Minimal reimplementation of copy.deepcopy() that will only copy certain object types:

- mappings, e.g. `dict`
- list

This is done for performance reasons.

---
## human_join
```python
from _utils import human_join
```



---
## quote
```python
from _utils import quote
```

Add single quotation marks around the given string. Does *not* do any escaping.

---
## required_args
```python
from _utils import required_args
```

Decorator to enforce a given set of arguments or variants of arguments are passed to the decorated function.

Useful for enforcing runtime validation of overloaded functions.

Example usage:
```py
@overload
def foo(*, a: str) -> str: ...


@overload
def foo(*, b: bool) -> str: ...


# This enforces the same constraints that a static type checker would
# i.e. that either a or b must be passed to the function
@required_args(["a"], ["b"])
def foo(*, a: str | None = None, b: bool | None = None) -> str: ...
```

---
## strip_not_given
```python
from _utils import strip_not_given
```

Remove all top-level keys where their values are instances of `NotGiven`

---
## coerce_integer
```python
from _utils import coerce_integer
```



---
## coerce_float
```python
from _utils import coerce_float
```



---
## coerce_boolean
```python
from _utils import coerce_boolean
```



---
## maybe_coerce_integer
```python
from _utils import maybe_coerce_integer
```



---
## maybe_coerce_float
```python
from _utils import maybe_coerce_float
```



---
## maybe_coerce_boolean
```python
from _utils import maybe_coerce_boolean
```



---
## removeprefix
```python
from _utils import removeprefix
```

Remove a prefix from a string.

Backport of `str.removeprefix` for Python < 3.9

---
## removesuffix
```python
from _utils import removesuffix
```

Remove a suffix from a string.

Backport of `str.removesuffix` for Python < 3.9

---
## file_from_path
```python
from _utils import file_from_path
```



---
## get_required_header
```python
from _utils import get_required_header
```



---
## get_async_library
```python
from _utils import get_async_library
```



---
## lru_cache
```python
from _utils import lru_cache
```

A version of functools.lru_cache that retains the type signature
for the wrapped function arguments.

---
## inner
```python
from _utils import inner
```



---
## wrapper
```python
from _utils import wrapper
```



---
## __name__
```python
from _transform import __name__
```



---
## PropertyInfo
```python
from _transform import PropertyInfo
```

Metadata class to be used in Annotated types to provide information about a given type.

For example:

class MyParams(TypedDict):
    account_holder_name: Annotated[str, PropertyInfo(alias='accountHolderName')]

This means that {'account_holder_name': 'Robert'} will be transformed to {'accountHolderName': 'Robert'} before being sent to the API.

---
## maybe_transform
```python
from _transform import maybe_transform
```

Wrapper over `transform()` that allows `None` to be passed.

See `transform()` for more details.

---
## transform
```python
from _transform import transform
```

Transform dictionaries based off of type information from the given type, for example:

```py
class Params(TypedDict, total=False):
    card_id: Required[Annotated[str, PropertyInfo(alias="cardID")]]


transformed = transform({"card_id": "<my card ID>"}, Params)
# {'cardID': '<my card ID>'}
```

Any keys / data that does not have type information given will be included as is.

It should be noted that the transformations that this function does are not represented in the type system.

---
## _get_annotated_type
```python
from _transform import _get_annotated_type
```

If the given type is an `Annotated` type then it is returned, if not `None` is returned.

This also unwraps the type when applicable, e.g. `Required[Annotated[T, ...]]`

---
## _maybe_transform_key
```python
from _transform import _maybe_transform_key
```

Transform the given `data` based on the annotations provided in `type_`.

Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata.

---
## _transform_recursive
```python
from _transform import _transform_recursive
```

Transform the given data against the expected type.

Args:
    annotation: The direct type annotation given to the particular piece of data.
        This may or may not be wrapped in metadata types, e.g. `Required[T]`, `Annotated[T, ...]` etc

    inner_type: If applicable, this is the "inside" type. This is useful in certain cases where the outside type
        is a container type such as `List[T]`. In that case `inner_type` should be set to `T` so that each entry in
        the list can be transformed using the metadata from the container type.

        Defaults to the same value as the `annotation` argument.

---
## _format_data
```python
from _transform import _format_data
```



---
## _transform_typeddict
```python
from _transform import _transform_typeddict
```



---
## __init__
```python
from _transform import __init__
```



---
## __repr__
```python
from _transform import __repr__
```



---
## __name__
```python
from text_delta import __name__
```



---
## TextDelta
```python
from text_delta import TextDelta
```



---
## __name__
```python
from raw_message_delta_event import __name__
```



---
## Delta
```python
from raw_message_delta_event import Delta
```



---
## RawMessageDeltaEvent
```python
from raw_message_delta_event import RawMessageDeltaEvent
```



---
## __name__
```python
from raw_message_stream_event import __name__
```



---
## __name__
```python
from message_start_event import __name__
```



---
## Completion
```python
from completion import Completion
```



---
## __name__
```python
from tool_use_block_param import __name__
```



---
## ToolUseBlockParam
```python
from tool_use_block_param import ToolUseBlockParam
```



---
## __name__
```python
from tool_result_block_param import __name__
```



---
## ToolResultBlockParam
```python
from tool_result_block_param import ToolResultBlockParam
```



---
## __name__
```python
from input_json_delta import __name__
```



---
## InputJSONDelta
```python
from input_json_delta import InputJSONDelta
```



---
## __name__
```python
from raw_message_start_event import __name__
```



---
## RawMessageStartEvent
```python
from raw_message_start_event import RawMessageStartEvent
```



---
## __name__
```python
from message_stop_event import __name__
```



---
## __name__
```python
from text_block_param import __name__
```



---
## TextBlockParam
```python
from text_block_param import TextBlockParam
```



---
## __name__
```python
from message_delta_event import __name__
```



---
## __name__
```python
from completion_create_params import __name__
```



---
## CompletionCreateParamsBase
```python
from completion_create_params import CompletionCreateParamsBase
```



---
## Metadata
```python
from completion_create_params import Metadata
```



---
## CompletionCreateParamsNonStreaming
```python
from completion_create_params import CompletionCreateParamsNonStreaming
```



---
## CompletionCreateParamsStreaming
```python
from completion_create_params import CompletionCreateParamsStreaming
```



---
## __name__
```python
from image_block_param import __name__
```



---
## Source
```python
from image_block_param import Source
```



---
## ImageBlockParam
```python
from image_block_param import ImageBlockParam
```



---
## __name__
```python
from tool_param import __name__
```



---
## InputSchemaTyped
```python
from tool_param import InputSchemaTyped
```



---
## ToolParam
```python
from tool_param import ToolParam
```



---
## __name__
```python
from message import __name__
```



---
## Message
```python
from message import Message
```



---
## __name__
```python
from message_create_params import __name__
```



---
## MessageCreateParamsBase
```python
from message_create_params import MessageCreateParamsBase
```



---
## Metadata
```python
from message_create_params import Metadata
```



---
## ToolChoiceToolChoiceAuto
```python
from message_create_params import ToolChoiceToolChoiceAuto
```



---
## ToolChoiceToolChoiceAny
```python
from message_create_params import ToolChoiceToolChoiceAny
```



---
## ToolChoiceToolChoiceTool
```python
from message_create_params import ToolChoiceToolChoiceTool
```



---
## MessageCreateParamsNonStreaming
```python
from message_create_params import MessageCreateParamsNonStreaming
```



---
## MessageCreateParamsStreaming
```python
from message_create_params import MessageCreateParamsStreaming
```



---
## __name__
```python
from text_block import __name__
```



---
## TextBlock
```python
from text_block import TextBlock
```



---
## __name__
```python
from content_block_delta_event import __name__
```



---
## __name__
```python
from content_block_stop_event import __name__
```



---
## __name__
```python
from message_delta_usage import __name__
```



---
## MessageDeltaUsage
```python
from message_delta_usage import MessageDeltaUsage
```



---
## __name__
```python
from raw_content_block_delta_event import __name__
```



---
## RawContentBlockDeltaEvent
```python
from raw_content_block_delta_event import RawContentBlockDeltaEvent
```



---
## __name__
```python
from raw_content_block_stop_event import __name__
```



---
## RawContentBlockStopEvent
```python
from raw_content_block_stop_event import RawContentBlockStopEvent
```



---
## __name__
```python
from raw_message_stop_event import __name__
```



---
## RawMessageStopEvent
```python
from raw_message_stop_event import RawMessageStopEvent
```



---
## __name__
```python
from content_block import __name__
```



---
## __name__
```python
from raw_content_block_start_event import __name__
```



---
## RawContentBlockStartEvent
```python
from raw_content_block_start_event import RawContentBlockStartEvent
```



---
## __name__
```python
from message_stream_event import __name__
```



---
## __name__
```python
from tool_use_block import __name__
```



---
## ToolUseBlock
```python
from tool_use_block import ToolUseBlock
```



---
## __name__
```python
from usage import __name__
```



---
## Usage
```python
from usage import Usage
```



---
## __name__
```python
from model_param import __name__
```



---
## __name__
```python
from content_block_start_event import __name__
```



---
## __name__
```python
from message_param import __name__
```



---
## MessageParam
```python
from message_param import MessageParam
```



---
## __name__
```python
from completions import __name__
```



---
## Completions
```python
from completions import Completions
```



---
## AsyncCompletions
```python
from completions import AsyncCompletions
```



---
## CompletionsWithRawResponse
```python
from completions import CompletionsWithRawResponse
```



---
## AsyncCompletionsWithRawResponse
```python
from completions import AsyncCompletionsWithRawResponse
```



---
## CompletionsWithStreamingResponse
```python
from completions import CompletionsWithStreamingResponse
```



---
## AsyncCompletionsWithStreamingResponse
```python
from completions import AsyncCompletionsWithStreamingResponse
```



---
## with_raw_response
```python
from completions import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from completions import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from completions import create
```



---
## __init__
```python
from completions import __init__
```



---
## Messages
```python
from messages import Messages
```



---
## AsyncMessages
```python
from messages import AsyncMessages
```



---
## MessagesWithRawResponse
```python
from messages import MessagesWithRawResponse
```



---
## AsyncMessagesWithRawResponse
```python
from messages import AsyncMessagesWithRawResponse
```



---
## MessagesWithStreamingResponse
```python
from messages import MessagesWithStreamingResponse
```



---
## AsyncMessagesWithStreamingResponse
```python
from messages import AsyncMessagesWithStreamingResponse
```



---
## with_raw_response
```python
from messages import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from messages import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from messages import create
```

Create a message.

Args:
  content: The text contents of the message.

  role:
      The role of the entity that is creating the message. Allowed values include:

      - `user`: Indicates the message is sent by an actual user and should be used in
        most cases to represent user-generated messages.
      - `assistant`: Indicates the message is generated by the assistant. Use this
        value to insert messages from the assistant into the conversation.

  attachments: A list of files attached to the message, and the tools they should be added to.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## stream
```python
from messages import stream
```

Create a Message stream

---
## __name__
```python
from prompt_caching_beta_text_block_param import __name__
```



---
## PromptCachingBetaTextBlockParam
```python
from prompt_caching_beta_text_block_param import PromptCachingBetaTextBlockParam
```



---
## __name__
```python
from prompt_caching_beta_tool_use_block_param import __name__
```



---
## PromptCachingBetaToolUseBlockParam
```python
from prompt_caching_beta_tool_use_block_param import PromptCachingBetaToolUseBlockParam
```



---
## __name__
```python
from prompt_caching_beta_image_block_param import __name__
```



---
## Source
```python
from prompt_caching_beta_image_block_param import Source
```



---
## PromptCachingBetaImageBlockParam
```python
from prompt_caching_beta_image_block_param import PromptCachingBetaImageBlockParam
```



---
## __name__
```python
from raw_prompt_caching_beta_message_stream_event import __name__
```



---
## __name__
```python
from prompt_caching_beta_cache_control_ephemeral_param import __name__
```



---
## PromptCachingBetaCacheControlEphemeralParam
```python
from prompt_caching_beta_cache_control_ephemeral_param import PromptCachingBetaCacheControlEphemeralParam
```



---
## __name__
```python
from prompt_caching_beta_message import __name__
```



---
## PromptCachingBetaMessage
```python
from prompt_caching_beta_message import PromptCachingBetaMessage
```



---
## __name__
```python
from prompt_caching_beta_usage import __name__
```



---
## PromptCachingBetaUsage
```python
from prompt_caching_beta_usage import PromptCachingBetaUsage
```



---
## __name__
```python
from prompt_caching_beta_tool_result_block_param import __name__
```



---
## PromptCachingBetaToolResultBlockParam
```python
from prompt_caching_beta_tool_result_block_param import PromptCachingBetaToolResultBlockParam
```



---
## __name__
```python
from prompt_caching_beta_message_param import __name__
```



---
## PromptCachingBetaMessageParam
```python
from prompt_caching_beta_message_param import PromptCachingBetaMessageParam
```



---
## __name__
```python
from prompt_caching_beta_tool_param import __name__
```



---
## InputSchemaTyped
```python
from prompt_caching_beta_tool_param import InputSchemaTyped
```



---
## PromptCachingBetaToolParam
```python
from prompt_caching_beta_tool_param import PromptCachingBetaToolParam
```



---
## __name__
```python
from raw_prompt_caching_beta_message_start_event import __name__
```



---
## RawPromptCachingBetaMessageStartEvent
```python
from raw_prompt_caching_beta_message_start_event import RawPromptCachingBetaMessageStartEvent
```



---
## __name__
```python
from beta import __name__
```



---
## Beta
```python
from beta import Beta
```



---
## AsyncBeta
```python
from beta import AsyncBeta
```



---
## BetaWithRawResponse
```python
from beta import BetaWithRawResponse
```



---
## AsyncBetaWithRawResponse
```python
from beta import AsyncBetaWithRawResponse
```



---
## BetaWithStreamingResponse
```python
from beta import BetaWithStreamingResponse
```



---
## AsyncBetaWithStreamingResponse
```python
from beta import AsyncBetaWithStreamingResponse
```



---
## prompt_caching
```python
from beta import prompt_caching
```



---
## with_raw_response
```python
from beta import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from beta import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## __init__
```python
from beta import __init__
```



---
## __name__
```python
from prompt_caching import __name__
```



---
## PromptCaching
```python
from prompt_caching import PromptCaching
```



---
## AsyncPromptCaching
```python
from prompt_caching import AsyncPromptCaching
```



---
## PromptCachingWithRawResponse
```python
from prompt_caching import PromptCachingWithRawResponse
```



---
## AsyncPromptCachingWithRawResponse
```python
from prompt_caching import AsyncPromptCachingWithRawResponse
```



---
## PromptCachingWithStreamingResponse
```python
from prompt_caching import PromptCachingWithStreamingResponse
```



---
## AsyncPromptCachingWithStreamingResponse
```python
from prompt_caching import AsyncPromptCachingWithStreamingResponse
```



---
## messages
```python
from prompt_caching import messages
```



---
## with_raw_response
```python
from prompt_caching import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from prompt_caching import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response

---
## __init__
```python
from prompt_caching import __init__
```



---
## __name__
```python
from _google_auth import __name__
```



---
## GoogleAuthProxy
```python
from _google_auth import GoogleAuthProxy
```



---
## __load__
```python
from _google_auth import __load__
```



---
## MissingDependencyError
```python
from _common import MissingDependencyError
```



---
## __name__
```python
from _stream import __name__
```



---
## BedrockStream
```python
from _stream import BedrockStream
```



---
## AsyncBedrockStream
```python
from _stream import AsyncBedrockStream
```



---
## __init__
```python
from _stream import __init__
```



---
## _prepare_options
```python
from _client import _prepare_options
```



---
## BaseBedrockClient
```python
from _client import BaseBedrockClient
```



---
## AnthropicBedrock
```python
from _client import AnthropicBedrock
```



---
## AsyncAnthropicBedrock
```python
from _client import AsyncAnthropicBedrock
```



---
## _make_sse_decoder
```python
from _client import _make_sse_decoder
```



---
## _prepare_request
```python
from _client import _prepare_request
```



---
## __name__
```python
from _stream_decoder import __name__
```



---
## get_response_stream_shape
```python
from _stream_decoder import get_response_stream_shape
```



---
## AWSEventStreamDecoder
```python
from _stream_decoder import AWSEventStreamDecoder
```



---
## __init__
```python
from _stream_decoder import __init__
```



---
## iter_bytes
```python
from _stream_decoder import iter_bytes
```

Given an iterator that yields lines, iterate over it & yield every event encountered

---
## _parse_message_from_event
```python
from _stream_decoder import _parse_message_from_event
```



---
## _get_session
```python
from _auth import _get_session
```



---
## get_auth_headers
```python
from _auth import get_auth_headers
```



---
## TextEvent
```python
from _types import TextEvent
```



---
## InputJsonEvent
```python
from _types import InputJsonEvent
```



---
## MessageStopEvent
```python
from _types import MessageStopEvent
```



---
## ContentBlockStopEvent
```python
from _types import ContentBlockStopEvent
```



---
## __name__
```python
from _prompt_caching_beta_types import __name__
```



---
## MessageStopEvent
```python
from _prompt_caching_beta_types import MessageStopEvent
```



---
## __name__
```python
from _messages import __name__
```



---
## MessageStream
```python
from _messages import MessageStream
```



---
## MessageStreamManager
```python
from _messages import MessageStreamManager
```

Wrapper over MessageStream that is returned by `.stream()`.

```py
with client.messages.stream(...) as stream:
    for chunk in stream:
        ...
```

---
## AsyncMessageStream
```python
from _messages import AsyncMessageStream
```



---
## AsyncMessageStreamManager
```python
from _messages import AsyncMessageStreamManager
```

Wrapper over AsyncMessageStream that is returned by `.stream()`
so that an async context manager can be used without `await`ing the
original client call.

```py
async with client.messages.stream(...) as stream:
    async for chunk in stream:
        ...
```

---
## build_events
```python
from _messages import build_events
```



---
## accumulate_event
```python
from _messages import accumulate_event
```



---
## __init__
```python
from _messages import __init__
```



---
## __next__
```python
from _messages import __next__
```



---
## __iter__
```python
from _messages import __iter__
```



---
## __enter__
```python
from _messages import __enter__
```



---
## __exit__
```python
from _messages import __exit__
```



---
## close
```python
from _messages import close
```

Close the response and release the connection.

Automatically called if the response body is read to completion.

---
## get_final_message
```python
from _messages import get_final_message
```

Waits until the stream has been read to completion and returns
the accumulated `Message` object.

---
## get_final_text
```python
from _messages import get_final_text
```

Returns all `text` content blocks concatenated together.

> [!NOTE]
> Currently the API will only respond with a single content block.

Will raise an error if no `text` content blocks were returned.

---
## until_done
```python
from _messages import until_done
```

Blocks until the stream has been consumed

---
## current_message_snapshot
```python
from _messages import current_message_snapshot
```



---
## __stream__
```python
from _messages import __stream__
```



---
## __stream_text__
```python
from _messages import __stream_text__
```



---
## __name__
```python
from _prompt_caching_beta_messages import __name__
```



---
## PromptCachingBetaMessageStream
```python
from _prompt_caching_beta_messages import PromptCachingBetaMessageStream
```



---
## PromptCachingBetaMessageStreamManager
```python
from _prompt_caching_beta_messages import PromptCachingBetaMessageStreamManager
```

Wrapper over PromptCachingBetaMessageStream that is returned by `.stream()`.

```py
with client.beta.prompt_caching.messages.stream(...) as stream:
    for chunk in stream:
        ...
```

---
## AsyncPromptCachingBetaMessageStream
```python
from _prompt_caching_beta_messages import AsyncPromptCachingBetaMessageStream
```



---
## AsyncPromptCachingBetaMessageStreamManager
```python
from _prompt_caching_beta_messages import AsyncPromptCachingBetaMessageStreamManager
```

Wrapper over AsyncMessageStream that is returned by `.stream()`
so that an async context manager can be used without `await`ing the
original client call.

```py
async with client.messages.stream(...) as stream:
    async for chunk in stream:
        ...
```

---
## build_events
```python
from _prompt_caching_beta_messages import build_events
```



---
## accumulate_event
```python
from _prompt_caching_beta_messages import accumulate_event
```



---
## __init__
```python
from _prompt_caching_beta_messages import __init__
```



---
## __next__
```python
from _prompt_caching_beta_messages import __next__
```



---
## __iter__
```python
from _prompt_caching_beta_messages import __iter__
```



---
## __enter__
```python
from _prompt_caching_beta_messages import __enter__
```



---
## __exit__
```python
from _prompt_caching_beta_messages import __exit__
```



---
## close
```python
from _prompt_caching_beta_messages import close
```

Close the response and release the connection.

Automatically called if the response body is read to completion.

---
## get_final_message
```python
from _prompt_caching_beta_messages import get_final_message
```

Waits until the stream has been read to completion and returns
the accumulated `PromptCachingBetaMessage` object.

---
## get_final_text
```python
from _prompt_caching_beta_messages import get_final_text
```

Returns all `text` content blocks concatenated together.

> [!NOTE]
> Currently the API will only respond with a single content block.

Will raise an error if no `text` content blocks were returned.

---
## until_done
```python
from _prompt_caching_beta_messages import until_done
```

Blocks until the stream has been consumed

---
## current_message_snapshot
```python
from _prompt_caching_beta_messages import current_message_snapshot
```



---
## __stream__
```python
from _prompt_caching_beta_messages import __stream__
```



---
## __stream_text__
```python
from _prompt_caching_beta_messages import __stream_text__
```



---
## BaseVertexClient
```python
from _client import BaseVertexClient
```



---
## AnthropicVertex
```python
from _client import AnthropicVertex
```



---
## AsyncAnthropicVertex
```python
from _client import AsyncAnthropicVertex
```



---
## region
```python
from _client import region
```



---
## project_id
```python
from _client import project_id
```



---
## _ensure_access_token
```python
from _client import _ensure_access_token
```



---
## load_auth
```python
from _auth import load_auth
```



---
## refresh_auth
```python
from _auth import refresh_auth
```



---
## __name__
```python
from asgi2 import __name__
```



---
## ASGI2Middleware
```python
from asgi2 import ASGI2Middleware
```



---
## __init__
```python
from asgi2 import __init__
```



---
## __name__
```python
from proxy_headers import __name__
```



---
## ProxyHeadersMiddleware
```python
from proxy_headers import ProxyHeadersMiddleware
```

Middleware for handling known proxy headers

This middleware can be used when a known proxy is fronting the application,
and is trusted to be properly setting the `X-Forwarded-Proto` and
`X-Forwarded-For` headers with the connecting client information.

Modifies the `client` and `scheme` information so that they reference
the connecting client, rather that the connecting proxy.

References:
- <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#Proxies>
- <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For>

---
## _parse_raw_hosts
```python
from proxy_headers import _parse_raw_hosts
```



---
## _TrustedHosts
```python
from proxy_headers import _TrustedHosts
```

Container for trusted hosts and networks

---
## __init__
```python
from proxy_headers import __init__
```



---
## __contains__
```python
from proxy_headers import __contains__
```



---
## get_trusted_client_host
```python
from proxy_headers import get_trusted_client_host
```

Extract the client host from x_forwarded_for header

In general this is the first "untrusted" host in the forwarded for list.

---
## __name__
```python
from message_logger import __name__
```



---
## message_with_placeholders
```python
from message_logger import message_with_placeholders
```

Return an ASGI message, with any body-type content omitted and replaced
with a placeholder.

---
## MessageLoggerMiddleware
```python
from message_logger import MessageLoggerMiddleware
```



---
## __init__
```python
from message_logger import __init__
```



---
## trace
```python
from message_logger import trace
```



---
## _WSGIMiddleware
```python
from wsgi import _WSGIMiddleware
```



---
## __name__
```python
from watchgodreload import __name__
```



---
## CustomWatcher
```python
from watchgodreload import CustomWatcher
```



---
## WatchGodReload
```python
from watchgodreload import WatchGodReload
```



---
## __init__
```python
from watchgodreload import __init__
```



---
## should_watch_file
```python
from watchgodreload import should_watch_file
```



---
## should_watch_dir
```python
from watchgodreload import should_watch_dir
```



---
## should_restart
```python
from watchgodreload import should_restart
```



---
## __name__
```python
from statreload import __name__
```



---
## StatReload
```python
from statreload import StatReload
```



---
## __init__
```python
from statreload import __init__
```



---
## should_restart
```python
from statreload import should_restart
```



---
## restart
```python
from statreload import restart
```



---
## iter_py_files
```python
from statreload import iter_py_files
```



---
## __name__
```python
from watchfilesreload import __name__
```



---
## FileFilter
```python
from watchfilesreload import FileFilter
```



---
## WatchFilesReload
```python
from watchfilesreload import WatchFilesReload
```



---
## __init__
```python
from watchfilesreload import __init__
```



---
## __call__
```python
from watchfilesreload import __call__
```



---
## should_restart
```python
from watchfilesreload import should_restart
```



---
## __name__
```python
from basereload import __name__
```



---
## BaseReload
```python
from basereload import BaseReload
```



---
## _display_path
```python
from basereload import _display_path
```



---
## __init__
```python
from basereload import __init__
```



---
## signal_handler
```python
from basereload import signal_handler
```

A signal handler that is registered with the parent process.

---
## run
```python
from basereload import run
```



---
## pause
```python
from basereload import pause
```



---
## __iter__
```python
from basereload import __iter__
```



---
## __next__
```python
from basereload import __next__
```



---
## startup
```python
from basereload import startup
```



---
## restart
```python
from basereload import restart
```



---
## shutdown
```python
from basereload import shutdown
```



---
## should_restart
```python
from basereload import should_restart
```



---
## __name__
```python
from multiprocess import __name__
```



---
## Process
```python
from multiprocess import Process
```



---
## Multiprocess
```python
from multiprocess import Multiprocess
```



---
## __init__
```python
from multiprocess import __init__
```



---
## ping
```python
from multiprocess import ping
```



---
## pong
```python
from multiprocess import pong
```



---
## always_pong
```python
from multiprocess import always_pong
```



---
## target
```python
from multiprocess import target
```



---
## is_alive
```python
from multiprocess import is_alive
```



---
## start
```python
from multiprocess import start
```



---
## terminate
```python
from multiprocess import terminate
```



---
## kill
```python
from multiprocess import kill
```



---
## join
```python
from multiprocess import join
```



---
## pid
```python
from multiprocess import pid
```



---
## init_processes
```python
from multiprocess import init_processes
```



---
## terminate_all
```python
from multiprocess import terminate_all
```



---
## join_all
```python
from multiprocess import join_all
```



---
## restart_all
```python
from multiprocess import restart_all
```



---
## run
```python
from multiprocess import run
```



---
## keep_subprocess_alive
```python
from multiprocess import keep_subprocess_alive
```



---
## handle_signals
```python
from multiprocess import handle_signals
```



---
## handle_int
```python
from multiprocess import handle_int
```



---
## handle_term
```python
from multiprocess import handle_term
```



---
## handle_break
```python
from multiprocess import handle_break
```



---
## handle_hup
```python
from multiprocess import handle_hup
```



---
## handle_ttin
```python
from multiprocess import handle_ttin
```



---
## handle_ttou
```python
from multiprocess import handle_ttou
```



---
## __name__
```python
from off import __name__
```



---
## LifespanOff
```python
from off import LifespanOff
```



---
## __init__
```python
from off import __init__
```



---
## __name__
```python
from on import __name__
```



---
## LifespanOn
```python
from on import LifespanOn
```



---
## __init__
```python
from on import __init__
```



---
## __name__
```python
from uvloop import __name__
```



---
## uvloop_setup
```python
from uvloop import uvloop_setup
```



---
## asyncio_setup
```python
from asyncio import asyncio_setup
```



---
## auto_loop_setup
```python
from auto import auto_loop_setup
```



---
## ClientDisconnected
```python
from utils import ClientDisconnected
```



---
## get_remote_addr
```python
from utils import get_remote_addr
```



---
## get_local_addr
```python
from utils import get_local_addr
```



---
## is_ssl
```python
from utils import is_ssl
```



---
## get_client_addr
```python
from utils import get_client_addr
```



---
## get_path_with_query_string
```python
from utils import get_path_with_query_string
```



---
## __name__
```python
from websockets_impl import __name__
```



---
## Server
```python
from websockets_impl import Server
```



---
## WebSocketProtocol
```python
from websockets_impl import WebSocketProtocol
```



---
## register
```python
from websockets_impl import register
```



---
## unregister
```python
from websockets_impl import unregister
```



---
## is_serving
```python
from websockets_impl import is_serving
```



---
## __init__
```python
from websockets_impl import __init__
```



---
## connection_made
```python
from websockets_impl import connection_made
```



---
## connection_lost
```python
from websockets_impl import connection_lost
```



---
## shutdown
```python
from websockets_impl import shutdown
```



---
## on_task_complete
```python
from websockets_impl import on_task_complete
```



---
## process_subprotocol
```python
from websockets_impl import process_subprotocol
```

We override the standard 'process_subprotocol' behavior here so that
we return whatever subprotocol is sent in the 'accept' message.

---
## send_500_response
```python
from websockets_impl import send_500_response
```



---
## __name__
```python
from wsproto_impl import __name__
```



---
## WSProtocol
```python
from wsproto_impl import WSProtocol
```



---
## __init__
```python
from wsproto_impl import __init__
```



---
## connection_made
```python
from wsproto_impl import connection_made
```



---
## connection_lost
```python
from wsproto_impl import connection_lost
```



---
## eof_received
```python
from wsproto_impl import eof_received
```



---
## data_received
```python
from wsproto_impl import data_received
```



---
## handle_events
```python
from wsproto_impl import handle_events
```



---
## pause_writing
```python
from wsproto_impl import pause_writing
```

Called by the transport when the write buffer exceeds the high water mark.

---
## resume_writing
```python
from wsproto_impl import resume_writing
```

Called by the transport when the write buffer drops below the low water mark.

---
## shutdown
```python
from wsproto_impl import shutdown
```



---
## on_task_complete
```python
from wsproto_impl import on_task_complete
```



---
## handle_connect
```python
from wsproto_impl import handle_connect
```



---
## handle_text
```python
from wsproto_impl import handle_text
```



---
## handle_bytes
```python
from wsproto_impl import handle_bytes
```



---
## handle_close
```python
from wsproto_impl import handle_close
```



---
## handle_ping
```python
from wsproto_impl import handle_ping
```



---
## send_500_response
```python
from wsproto_impl import send_500_response
```



---
## __name__
```python
from flow_control import __name__
```



---
## FlowControl
```python
from flow_control import FlowControl
```



---
## __init__
```python
from flow_control import __init__
```



---
## pause_reading
```python
from flow_control import pause_reading
```



---
## resume_reading
```python
from flow_control import resume_reading
```



---
## pause_writing
```python
from flow_control import pause_writing
```



---
## resume_writing
```python
from flow_control import resume_writing
```



---
## __name__
```python
from h11_impl import __name__
```



---
## _get_status_phrase
```python
from h11_impl import _get_status_phrase
```



---
## H11Protocol
```python
from h11_impl import H11Protocol
```



---
## RequestResponseCycle
```python
from h11_impl import RequestResponseCycle
```



---
## __init__
```python
from h11_impl import __init__
```



---
## connection_made
```python
from h11_impl import connection_made
```



---
## connection_lost
```python
from h11_impl import connection_lost
```



---
## eof_received
```python
from h11_impl import eof_received
```



---
## _unset_keepalive_if_required
```python
from h11_impl import _unset_keepalive_if_required
```



---
## _get_upgrade
```python
from h11_impl import _get_upgrade
```



---
## _should_upgrade_to_ws
```python
from h11_impl import _should_upgrade_to_ws
```



---
## _unsupported_upgrade_warning
```python
from h11_impl import _unsupported_upgrade_warning
```



---
## _should_upgrade
```python
from h11_impl import _should_upgrade
```



---
## data_received
```python
from h11_impl import data_received
```



---
## handle_events
```python
from h11_impl import handle_events
```



---
## handle_websocket_upgrade
```python
from h11_impl import handle_websocket_upgrade
```



---
## send_400_response
```python
from h11_impl import send_400_response
```



---
## on_response_complete
```python
from h11_impl import on_response_complete
```



---
## shutdown
```python
from h11_impl import shutdown
```

Called by the server to commence a graceful shutdown.

---
## pause_writing
```python
from h11_impl import pause_writing
```

Called by the transport when the write buffer exceeds the high water mark.

---
## resume_writing
```python
from h11_impl import resume_writing
```

Called by the transport when the write buffer drops below the low water mark.

---
## timeout_keep_alive_handler
```python
from h11_impl import timeout_keep_alive_handler
```

Called on a keep-alive connection if no new data is received after a short
delay.

---
## __name__
```python
from httptools_impl import __name__
```



---
## _get_status_line
```python
from httptools_impl import _get_status_line
```



---
## HttpToolsProtocol
```python
from httptools_impl import HttpToolsProtocol
```



---
## RequestResponseCycle
```python
from httptools_impl import RequestResponseCycle
```



---
## __init__
```python
from httptools_impl import __init__
```



---
## connection_made
```python
from httptools_impl import connection_made
```



---
## connection_lost
```python
from httptools_impl import connection_lost
```



---
## eof_received
```python
from httptools_impl import eof_received
```



---
## _unset_keepalive_if_required
```python
from httptools_impl import _unset_keepalive_if_required
```



---
## _get_upgrade
```python
from httptools_impl import _get_upgrade
```



---
## _should_upgrade_to_ws
```python
from httptools_impl import _should_upgrade_to_ws
```



---
## _unsupported_upgrade_warning
```python
from httptools_impl import _unsupported_upgrade_warning
```



---
## _should_upgrade
```python
from httptools_impl import _should_upgrade
```



---
## data_received
```python
from httptools_impl import data_received
```



---
## handle_websocket_upgrade
```python
from httptools_impl import handle_websocket_upgrade
```



---
## send_400_response
```python
from httptools_impl import send_400_response
```



---
## on_message_begin
```python
from httptools_impl import on_message_begin
```



---
## on_url
```python
from httptools_impl import on_url
```



---
## on_header
```python
from httptools_impl import on_header
```



---
## on_headers_complete
```python
from httptools_impl import on_headers_complete
```



---
## on_body
```python
from httptools_impl import on_body
```



---
## on_message_complete
```python
from httptools_impl import on_message_complete
```



---
## on_response_complete
```python
from httptools_impl import on_response_complete
```



---
## shutdown
```python
from httptools_impl import shutdown
```

Called by the server to commence a graceful shutdown.

---
## pause_writing
```python
from httptools_impl import pause_writing
```

Called by the transport when the write buffer exceeds the high water mark.

---
## resume_writing
```python
from httptools_impl import resume_writing
```

Called by the transport when the write buffer drops below the low water mark.

---
## timeout_keep_alive_handler
```python
from httptools_impl import timeout_keep_alive_handler
```

Called on a keep-alive connection if no new data is received after a short
delay.

---
## _LogLevel
```python
from defaults import _LogLevel
```



---
## _AbsoluteLinksValidation
```python
from defaults import _AbsoluteLinksValidation
```



---
## MkDocsConfig
```python
from defaults import MkDocsConfig
```

The configuration of MkDocs itself (the root object of mkdocs.yml).

---
## get_schema
```python
from defaults import get_schema
```

Soft-deprecated, do not use.

---
## run_validation
```python
from defaults import run_validation
```



---
## Validation
```python
from defaults import Validation
```



---
## load_dict
```python
from defaults import load_dict
```



---
## load_file
```python
from defaults import load_file
```

Load config options from the open file descriptor of a YAML file.

---
## NavValidation
```python
from defaults import NavValidation
```



---
## LinksValidation
```python
from defaults import LinksValidation
```



---
## __name__
```python
from config_options import __name__
```



---
## SubConfig
```python
from config_options import SubConfig
```

Subconfig Config Option.

New: If targeting MkDocs 1.4+, please pass a subclass of Config to the
constructor, instead of the old style of a sequence of ConfigOption instances.
Validation is then enabled by default.

A set of `config_options` grouped under a single config option.
By default, validation errors and warnings resulting from validating
`config_options` are ignored (`validate=False`). Users should typically
enable validation with `validate=True`.

---
## PropagatingSubConfig
```python
from config_options import PropagatingSubConfig
```

A SubConfig that must consist of SubConfigs with defined schemas.

Any value set on the top config gets moved to sub-configs with matching keys.

---
## OptionallyRequired
```python
from config_options import OptionallyRequired
```

Soft-deprecated, do not use.

A subclass of BaseConfigOption that adds support for default values and
required values. It is a base class for config options.

---
## ListOfItems
```python
from config_options import ListOfItems
```

Validates a homogeneous list of items.

E.g. for `config_options.ListOfItems(config_options.Type(int))` a valid item is `[1, 2, 3]`.

---
## DictOfItems
```python
from config_options import DictOfItems
```

Validates a dict of items. Keys are always strings.

E.g. for `config_options.DictOfItems(config_options.Type(int))` a valid item is `{"a": 1, "b": 2}`.

---
## ConfigItems
```python
from config_options import ConfigItems
```

Deprecated: Use `ListOfItems(SubConfig(...))` instead of `ConfigItems(...)`.

Validates a list of mappings that all must match the same set of
options.

---
## Type
```python
from config_options import Type
```

Type Config Option.

Validate the type of a config option against a given Python type.

---
## Choice
```python
from config_options import Choice
```

Choice Config Option.

Validate the config option against a strict set of values.

---
## Deprecated
```python
from config_options import Deprecated
```

Deprecated Config Option.

Raises a warning as the option is deprecated. Uses `message` for the
warning. If `move_to` is set to the name of a new config option, the value
is moved to the new option on pre_validation. If `option_type` is set to a
ConfigOption instance, then the value is validated against that type.

---
## _IpAddressValue
```python
from config_options import _IpAddressValue
```



---
## IpAddress
```python
from config_options import IpAddress
```

IpAddress Config Option.

Validate that an IP address is in an appropriate format

---
## URL
```python
from config_options import URL
```

URL Config Option.

Validate a URL by requiring a scheme is present.

---
## Optional
```python
from config_options import Optional
```

Wraps a field and makes a None value possible for it when no value is set.

E.g. `my_field = config_options.Optional(config_options.Type(str))`

---
## RepoURL
```python
from config_options import RepoURL
```



---
## EditURI
```python
from config_options import EditURI
```



---
## EditURITemplate
```python
from config_options import EditURITemplate
```



---
## RepoName
```python
from config_options import RepoName
```



---
## FilesystemObject
```python
from config_options import FilesystemObject
```

Base class for options that point to filesystem objects.

---
## Dir
```python
from config_options import Dir
```

Dir Config Option.

Validate a path to a directory, optionally verifying that it exists.

---
## DocsDir
```python
from config_options import DocsDir
```



---
## File
```python
from config_options import File
```

File Config Option.

Validate a path to a file, optionally verifying that it exists.

---
## ListOfPaths
```python
from config_options import ListOfPaths
```

List of Paths Config Option.

A list of file system paths. Raises an error if one of the paths does not exist.

For greater flexibility, prefer ListOfItems, e.g. to require files specifically:

    config_options.ListOfItems(config_options.File(exists=True))

---
## SiteDir
```python
from config_options import SiteDir
```

SiteDir Config Option.

Validates the site_dir and docs_dir directories do not contain each other.

---
## Theme
```python
from config_options import Theme
```

Theme Config Option.

Validate that the theme exists and build Theme instance.

---
## Nav
```python
from config_options import Nav
```

Nav Config Option.

Validate the Nav config.

---
## Private
```python
from config_options import Private
```

A config option that can only be populated programmatically. Raises an error if set by the user.

---
## ExtraScriptValue
```python
from config_options import ExtraScriptValue
```

An extra script to be added to the page. The `extra_javascript` config is a list of these.

---
## ExtraScript
```python
from config_options import ExtraScript
```



---
## MarkdownExtensions
```python
from config_options import MarkdownExtensions
```

Markdown Extensions Config Option.

A list or dict of extensions. Each list item may contain either a string or a one item dict.
A string must be a valid Markdown extension name with no config options defined. The key of
a dict item must be a valid Markdown extension name and the value must be a dict of config
options for that extension. Extension configs are set on the private setting passed to
`configkey`. The `builtins` keyword accepts a list of extensions which cannot be overridden by
the user. However, builtins can be duplicated to define config options for them if desired.

---
## Plugins
```python
from config_options import Plugins
```

Plugins config option.

A list or dict of plugins. If a plugin defines config options those are used when
initializing the plugin class.

---
## Hooks
```python
from config_options import Hooks
```

A list of Python scripts to be treated as instances of plugins.

---
## PathSpec
```python
from config_options import PathSpec
```

A path pattern based on gitignore-like syntax.

---
## __init__
```python
from config_options import __init__
```



---
## __class_getitem__
```python
from config_options import __class_getitem__
```

Eliminates the need to write `config_class = FooConfig` when subclassing SubConfig[FooConfig].

---
## pre_validation
```python
from config_options import pre_validation
```



---
## run_validation
```python
from config_options import run_validation
```



---
## validate
```python
from config_options import validate
```



---
## __repr__
```python
from config_options import __repr__
```



---
## post_validation
```python
from config_options import post_validation
```



---
## reset_warnings
```python
from config_options import reset_warnings
```



---
## __str__
```python
from config_options import __str__
```



---
## __getattr__
```python
from config_options import __getattr__
```



---
## Formatter
```python
from config_options import Formatter
```



---
## Template
```python
from config_options import Template
```



---
## _validate_nav_item
```python
from config_options import _validate_nav_item
```



---
## _repr_item
```python
from config_options import _repr_item
```



---
## __fspath__
```python
from config_options import __fspath__
```



---
## validate_ext_cfg
```python
from config_options import validate_ext_cfg
```



---
## _parse_configs
```python
from config_options import _parse_configs
```



---
## load_plugin_with_namespace
```python
from config_options import load_plugin_with_namespace
```



---
## load_plugin
```python
from config_options import load_plugin
```



---
## _load_hook
```python
from config_options import _load_hook
```



---
## convert_field
```python
from config_options import convert_field
```



---
## format
```python
from config_options import format
```



---
## BaseConfigOption
```python
from base import BaseConfigOption
```



---
## ValidationError
```python
from base import ValidationError
```

Raised during the validation process of the config on errors.

---
## Config
```python
from base import Config
```

Base class for MkDocs configuration, plugin configuration (and sub-configuration) objects.

It should be subclassed and have `ConfigOption`s defined as attributes.
For examples, see mkdocs/contrib/search/__init__.py and mkdocs/config/defaults.py.

Behavior as it was prior to MkDocs 1.4 is now handled by LegacyConfig.

---
## get_schema
```python
from base import get_schema
```

Extract ConfigOptions defined in a class (used just as a container) and put them into a schema tuple.

---
## LegacyConfig
```python
from base import LegacyConfig
```

A configuration object for plugins, as just a dict without type-safe attribute access.

---
## _open_config_file
```python
from base import _open_config_file
```

A context manager which yields an open file descriptor ready to be read.

Accepts a filename as a string, an open or closed file descriptor, or None.
When None, it defaults to `mkdocs.yml` in the CWD. If a closed file descriptor
is received, a new file descriptor is opened for the same file.

The file descriptor is automatically closed when the context manager block is existed.

---
## load_config
```python
from base import load_config
```

Load the configuration for a given file object or name.

The config_file can either be a file object, string or None. If it is None
the default `mkdocs.yml` filename will loaded.

Extra kwargs are passed to the configuration to replace any default values
unless they themselves are None.

---
## reset_warnings
```python
from base import reset_warnings
```



---
## pre_validation
```python
from base import pre_validation
```

Before all options are validated, perform a pre-validation process.

The pre-validation process method should be implemented by subclasses.

---
## run_validation
```python
from base import run_validation
```

Perform validation for a value.

The run_validation method should be implemented by subclasses.

---
## post_validation
```python
from base import post_validation
```

After all options have passed validation, perform a post-validation
process to do any additional changes dependent on other config values.

The post-validation process method should be implemented by subclasses.

---
## __set_name__
```python
from base import __set_name__
```



---
## __set__
```python
from base import __set__
```



---
## __init_subclass__
```python
from base import __init_subclass__
```



---
## __new__
```python
from base import __new__
```



---
## set_defaults
```python
from base import set_defaults
```

Set the base config by going through each validator and getting the
default if it has one.

---
## _validate
```python
from base import _validate
```



---
## _pre_validate
```python
from base import _pre_validate
```



---
## _post_validate
```python
from base import _post_validate
```



---
## load_dict
```python
from base import load_dict
```

Load config options from a dictionary.

---
## load_file
```python
from base import load_file
```

Load config options from the open file descriptor of a YAML file.

---
## user_configs
```python
from base import user_configs
```



---
## _LoggerAdapter
```python
from __init__ import _LoggerAdapter
```



---
## _normalize_mount_path
```python
from __init__ import _normalize_mount_path
```

Ensure the mount path starts and ends with a slash.

---
## _serve_url
```python
from __init__ import _serve_url
```



---
## LiveReloadServer
```python
from __init__ import LiveReloadServer
```



---
## _Handler
```python
from __init__ import _Handler
```



---
## _timestamp
```python
from __init__ import _timestamp
```



---
## _try_relativize_path
```python
from __init__ import _try_relativize_path
```

Make the path relative to current directory if it's under that directory.

---
## watch
```python
from __init__ import watch
```

Add the 'path' to watched paths, call the function and reload when any file changes under it.

---
## unwatch
```python
from __init__ import unwatch
```

Stop watching file changes for path. Raises if there was no corresponding `watch` call.

---
## serve
```python
from __init__ import serve
```



---
## _build_loop
```python
from __init__ import _build_loop
```



---
## serve_request
```python
from __init__ import serve_request
```



---
## _serve_request
```python
from __init__ import _serve_request
```



---
## _inject_js_into_html
```python
from __init__ import _inject_js_into_html
```



---
## _log_poll_request
```python
from __init__ import _log_poll_request
```



---
## _guess_type
```python
from __init__ import _guess_type
```



---
## log_request
```python
from __init__ import log_request
```



---
## log_message
```python
from __init__ import log_message
```



---
## condition
```python
from __init__ import condition
```



---
## __name__
```python
from babel_stub import __name__
```



---
## UnknownLocaleError
```python
from babel_stub import UnknownLocaleError
```



---
## Locale
```python
from babel_stub import Locale
```



---
## __str__
```python
from babel_stub import __str__
```



---
## parse
```python
from babel_stub import parse
```



---
## get_heading_text
```python
from rendering import get_heading_text
```



---
## _strip_tags
```python
from rendering import _strip_tags
```

Strip HTML tags and return plain text. Note: HTML entities are unaffected.

---
## _render_inner_html
```python
from rendering import _render_inner_html
```



---
## _remove_anchorlink
```python
from rendering import _remove_anchorlink
```

Drop anchorlink from the element, if present.

---
## _remove_fnrefs
```python
from rendering import _remove_fnrefs
```

Remove footnote references from the element, if any are present.

---
## _predicate_for_fnrefs
```python
from rendering import _predicate_for_fnrefs
```



---
## _extract_alt_texts
```python
from rendering import _extract_alt_texts
```

For images that have an `alt` attribute, replace them with this content.

---
## _predicate_for_alt_texts
```python
from rendering import _predicate_for_alt_texts
```



---
## _replace_elements_with_text
```python
from rendering import _replace_elements_with_text
```

For each child element, if matched, replace it with the text returned from the predicate.

---
## download_url
```python
from cache import download_url
```



---
## get_build_timestamp
```python
from __init__ import get_build_timestamp
```

Returns the number of seconds since the epoch for the latest updated page.

In reality this is just today's date because that's how pages' update time is populated.

---
## get_build_datetime
```python
from __init__ import get_build_datetime
```

Returns an aware datetime object.

Support SOURCE_DATE_EPOCH environment variable for reproducible builds.
See https://reproducible-builds.org/specs/source-date-epoch/

---
## get_build_date
```python
from __init__ import get_build_date
```

Returns the displayable date string.

Support SOURCE_DATE_EPOCH environment variable for reproducible builds.
See https://reproducible-builds.org/specs/source-date-epoch/

---
## reduce_list
```python
from __init__ import reduce_list
```

Reduce duplicate items in a list and preserve order.

---
## write_file
```python
from __init__ import write_file
```

Write content to output_path, making sure any parent directories exist.

---
## clean_directory
```python
from __init__ import clean_directory
```

Remove the content of a directory recursively but not the directory itself.

---
## is_markdown_file
```python
from __init__ import is_markdown_file
```

Return True if the given file path is a Markdown file.

https://superuser.com/questions/249436/file-extension-for-markdown-files

---
## is_error_template
```python
from __init__ import is_error_template
```

Return True if the given file path is an HTTP error template.

---
## _norm_parts
```python
from __init__ import _norm_parts
```



---
## get_relative_url
```python
from __init__ import get_relative_url
```

Return given url relative to other.

Both are operated as slash-separated paths, similarly to the 'path' part of a URL.
The last component of `other` is skipped if it contains a dot (considered a file).
Actual URLs (with schemas etc.) aren't supported. The leading slash is ignored.
Paths are normalized ('..' works as parent directory), but going higher than the
root has no effect ('foo/../../bar' ends up just as 'bar').

---
## normalize_url
```python
from __init__ import normalize_url
```

Return a URL relative to the given page or using the base.

---
## _get_norm_url
```python
from __init__ import _get_norm_url
```



---
## create_media_urls
```python
from __init__ import create_media_urls
```

Soft-deprecated, do not use.

---
## path_to_url
```python
from __init__ import path_to_url
```



---
## get_theme_dir
```python
from __init__ import get_theme_dir
```

Return the directory of an installed theme by name.

---
## get_themes
```python
from __init__ import get_themes
```

Return a dict of all installed themes as {name: EntryPoint}.

---
## get_theme_names
```python
from __init__ import get_theme_names
```

Return a list of all installed themes by name.

---
## dirname_to_title
```python
from __init__ import dirname_to_title
```

Return a page tile obtained from a directory name.

---
## get_markdown_title
```python
from __init__ import get_markdown_title
```

Soft-deprecated, do not use.

---
## find_or_create_node
```python
from __init__ import find_or_create_node
```

Given a list, look for dictionary with a key matching key and return it's
value. If it doesn't exist, create it with the value of an empty list and
return that.

---
## nest_paths
```python
from __init__ import nest_paths
```

Given a list of paths, convert them into a nested structure that will match
the pages config.

---
## DuplicateFilter
```python
from __init__ import DuplicateFilter
```

Avoid logging duplicate messages.

---
## CountHandler
```python
from __init__ import CountHandler
```

Counts all logged messages >= level.

---
## weak_property
```python
from __init__ import weak_property
```

Same as a read-only property, but allows overwriting the field for good.

---
## _removesuffix
```python
from __init__ import _removesuffix
```



---
## insort
```python
from __init__ import insort
```



---
## get_counts
```python
from __init__ import get_counts
```



---
## TemplateContext
```python
from templates import TemplateContext
```



---
## url_filter
```python
from templates import url_filter
```

A Template filter to normalize URLs.

---
## script_tag_filter
```python
from templates import script_tag_filter
```

Converts an ExtraScript value to an HTML <script> tag line.

---
## __name__
```python
from yaml import __name__
```



---
## _construct_dir_placeholder
```python
from yaml import _construct_dir_placeholder
```



---
## _DirPlaceholder
```python
from yaml import _DirPlaceholder
```



---
## ConfigDirPlaceholder
```python
from yaml import ConfigDirPlaceholder
```

A placeholder object that gets resolved to the directory of the config file when used as a path.

The suffix can be an additional sub-path that is always appended to this path.

This is the implementation of the `!relative $config_dir/suffix` tag, but can also be passed programmatically.

---
## DocsDirPlaceholder
```python
from yaml import DocsDirPlaceholder
```

A placeholder object that gets resolved to the docs dir when used as a path.

The suffix can be an additional sub-path that is always appended to this path.

This is the implementation of the `!relative $docs_dir/suffix` tag, but can also be passed programmatically.

---
## RelativeDirPlaceholder
```python
from yaml import RelativeDirPlaceholder
```

A placeholder object that gets resolved to the directory of the Markdown file currently being rendered.

This is the implementation of the `!relative` tag, but can also be passed programmatically.

---
## get_yaml_loader
```python
from yaml import get_yaml_loader
```

Wrap PyYaml's loader so we can extend it to suit our needs.

---
## yaml_load
```python
from yaml import yaml_load
```

Return dict of source YAML file using loader, recursively deep merging inherited parent.

---
## __init__
```python
from yaml import __init__
```



---
## value
```python
from yaml import value
```



---
## __fspath__
```python
from yaml import __fspath__
```

Can be used as a path.

---
## __str__
```python
from yaml import __str__
```

Can be converted to a string to obtain the current class.

---
## Loader
```python
from yaml import Loader
```

Define a custom loader derived from the global loader to leave the
global loader unaltered.

---
## get_data
```python
from meta import get_data
```

Extract meta-data from a text document.

Returns a tuple of document and a data dict.

---
## get_context
```python
from build import get_context
```

Return the template context for a given page or template.

---
## _build_template
```python
from build import _build_template
```

Return rendered output for given template as a string.

---
## _build_theme_template
```python
from build import _build_theme_template
```

Build a template using the theme environment.

---
## _build_extra_template
```python
from build import _build_extra_template
```

Build user templates which are not part of the theme.

---
## _populate_page
```python
from build import _populate_page
```

Read page content from docs_dir and render Markdown.

---
## _build_page
```python
from build import _build_page
```

Pass a Page to theme template and write output to site_dir.

---
## site_directory_contains_stale_files
```python
from build import site_directory_contains_stale_files
```

Check if the site directory contains stale files from a previous build.

---
## __name__
```python
from gh_deploy import __name__
```



---
## _is_cwd_git_repo
```python
from gh_deploy import _is_cwd_git_repo
```



---
## _get_current_sha
```python
from gh_deploy import _get_current_sha
```



---
## _get_remote_url
```python
from gh_deploy import _get_remote_url
```



---
## _check_version
```python
from gh_deploy import _check_version
```



---
## gh_deploy
```python
from gh_deploy import gh_deploy
```



---
## __name__
```python
from serve import __name__
```



---
## serve
```python
from serve import serve
```

Start the MkDocs development server.

By default it will serve the documentation on http://localhost:8000/ and
it will rebuild the documentation and refresh the page automatically
whenever a file is edited.

---
## get_config
```python
from serve import get_config
```



---
## builder
```python
from serve import builder
```



---
## error_handler
```python
from serve import error_handler
```



---
## __name__
```python
from new import __name__
```



---
## new
```python
from new import new
```



---
## _TocToken
```python
from toc import _TocToken
```



---
## get_toc
```python
from toc import get_toc
```



---
## AnchorLink
```python
from toc import AnchorLink
```

A single entry in the table of contents.

---
## TableOfContents
```python
from toc import TableOfContents
```

Represents the table of contents for a given page.

---
## _parse_toc_token
```python
from toc import _parse_toc_token
```



---
## url
```python
from toc import url
```

The hash fragment of a URL pointing to the item.

---
## __str__
```python
from toc import __str__
```



---
## indent_print
```python
from toc import indent_print
```



---
## __iter__
```python
from toc import __iter__
```



---
## __len__
```python
from toc import __len__
```



---
## InclusionLevel
```python
from files import InclusionLevel
```



---
## Files
```python
from files import Files
```



---
## set_exclusions
```python
from files import set_exclusions
```

Re-calculate which files are excluded, based on the patterns in the config.

---
## get_files
```python
from files import get_files
```

Walk the `docs_dir` and return a Files collection.

---
## file_sort_key
```python
from files import file_sort_key
```

Replicates the sort order how `get_files` produces it - index first, directories last.

To sort a list of `File`, pass as the `key` argument to `sort`.

---
## _file_sort_key
```python
from files import _file_sort_key
```

Always sort `index` or `README` as first filename in list. This works only on basenames of files.

---
## _sort_files
```python
from files import _sort_files
```

Soft-deprecated, do not use.

---
## _filter_paths
```python
from files import _filter_paths
```



---
## all
```python
from files import all
```



---
## is_included
```python
from files import is_included
```



---
## is_excluded
```python
from files import is_excluded
```



---
## is_in_serve
```python
from files import is_in_serve
```



---
## is_in_nav
```python
from files import is_in_nav
```



---
## is_not_in_nav
```python
from files import is_not_in_nav
```



---
## __iter__
```python
from files import __iter__
```

Iterate over the files within.

---
## __len__
```python
from files import __len__
```

The number of files within.

---
## __contains__
```python
from files import __contains__
```

Soft-deprecated, prefer `get_file_from_path(path) is not None`.

---
## src_paths
```python
from files import src_paths
```

Soft-deprecated, prefer `src_uris`.

---
## src_uris
```python
from files import src_uris
```

A mapping containing every file, with the keys being their
[`src_uri`][mkdocs.structure.files.File.src_uri].

---
## get_file_from_path
```python
from files import get_file_from_path
```

Return a File instance with File.src_uri equal to path.

---
## append
```python
from files import append
```

Add file to the Files collection.

---
## remove
```python
from files import remove
```

Remove file from Files collection.

---
## copy_static_files
```python
from files import copy_static_files
```

Copy static files from source to destination.

---
## documentation_pages
```python
from files import documentation_pages
```

Return iterable of all Markdown page file objects.

---
## static_pages
```python
from files import static_pages
```

Return iterable of all static page file objects.

---
## media_files
```python
from files import media_files
```

Return iterable of all file objects which are not documentation or static pages.

---
## javascript_files
```python
from files import javascript_files
```

Return iterable of all javascript file objects.

---
## css_files
```python
from files import css_files
```

Return iterable of all CSS file objects.

---
## add_files_from_theme
```python
from files import add_files_from_theme
```

Retrieve static files from Jinja environment and add to collection.

---
## _files
```python
from files import _files
```



---
## src_path
```python
from files import src_path
```



---
## dest_path
```python
from files import dest_path
```



---
## generated
```python
from files import generated
```

Create a virtual file, backed either by in-memory `content` or by a file at `abs_src_path`.

It will pretend to be a file in the docs dir at `src_uri`.

---
## edit_uri
```python
from files import edit_uri
```

A path relative to the source repository to use for the "edit" button.

Defaults to `src_uri` and can be overwritten.
For generated files this should be set to `None`.

---
## _get_stem
```python
from files import _get_stem
```

Soft-deprecated, do not use.

---
## _get_dest_path
```python
from files import _get_dest_path
```

Soft-deprecated, do not use.

---
## _get_url
```python
from files import _get_url
```

Soft-deprecated, do not use.

---
## abs_src_path
```python
from files import abs_src_path
```

The absolute concrete path of the source file. Will use backslashes on Windows.

Note: do not use this path to read the file, prefer `content_bytes`/`content_string`.

---
## abs_dest_path
```python
from files import abs_dest_path
```

The absolute concrete path of the destination file. Will use backslashes on Windows.

---
## url_relative_to
```python
from files import url_relative_to
```

Return url for file relative to other file.

---
## content_bytes
```python
from files import content_bytes
```



---
## content_string
```python
from files import content_string
```



---
## copy_file
```python
from files import copy_file
```

Copy source file to destination, ensuring parent directories exist.

---
## is_modified
```python
from files import is_modified
```



---
## is_documentation_page
```python
from files import is_documentation_page
```

Return True if file is a Markdown page.

---
## is_static_page
```python
from files import is_static_page
```

Return True if file is a static page (HTML, XML, JSON).

---
## is_media_file
```python
from files import is_media_file
```

Return True if file is not a documentation or static page.

---
## is_javascript
```python
from files import is_javascript
```

Return True if file is a JavaScript file.

---
## is_css
```python
from files import is_css
```

Return True if file is a CSS file.

---
## filter
```python
from files import filter
```



---
## StructureItem
```python
from __init__ import StructureItem
```

An item in MkDocs structure - see concrete subclasses Section, Page or Link.

---
## is_top_level
```python
from __init__ import is_top_level
```



---
## ancestors
```python
from __init__ import ancestors
```



---
## _indent_print
```python
from __init__ import _indent_print
```



---
## __name__
```python
from pages import __name__
```



---
## Page
```python
from pages import Page
```



---
## _ExtractAnchorsTreeprocessor
```python
from pages import _ExtractAnchorsTreeprocessor
```



---
## _RelativePathTreeprocessor
```python
from pages import _RelativePathTreeprocessor
```



---
## _RawHTMLPreprocessor
```python
from pages import _RawHTMLPreprocessor
```



---
## _HTMLHandler
```python
from pages import _HTMLHandler
```



---
## _ExtractTitleTreeprocessor
```python
from pages import _ExtractTitleTreeprocessor
```



---
## _AbsoluteLinksValidationValue
```python
from pages import _AbsoluteLinksValidationValue
```



---
## __init__
```python
from pages import __init__
```



---
## __eq__
```python
from pages import __eq__
```



---
## __repr__
```python
from pages import __repr__
```



---
## url
```python
from pages import url
```

The URL of the page relative to the MkDocs `site_dir`.

---
## active
```python
from pages import active
```

Set active status of page and ancestors.

---
## is_index
```python
from pages import is_index
```



---
## is_homepage
```python
from pages import is_homepage
```

Evaluates to `True` for the homepage of the site and `False` for all other pages.

---
## _set_canonical_url
```python
from pages import _set_canonical_url
```



---
## _set_edit_url
```python
from pages import _set_edit_url
```



---
## read_source
```python
from pages import read_source
```



---
## _set_title
```python
from pages import _set_title
```



---
## title
```python
from pages import title
```

Returns the title for the current page.

Before calling `read_source()`, this value is empty. It can also be updated by `render()`.

Checks these in order and uses the first that returns a valid title:

- value provided on init (passed in from config)
- value of metadata 'title'
- content of the first H1 in Markdown content
- convert filename to title

---
## render
```python
from pages import render
```

Convert the Markdown source file to HTML as per the config.

---
## validate_anchor_links
```python
from pages import validate_anchor_links
```



---
## run
```python
from pages import run
```



---
## _register
```python
from pages import _register
```



---
## _target_uri
```python
from pages import _target_uri
```



---
## _possible_target_uris
```python
from pages import _possible_target_uris
```

First yields the resolved file uri for the link, then proceeds to yield guesses for possible mistakes.

---
## path_to_url
```python
from pages import path_to_url
```



---
## handle_starttag
```python
from pages import handle_starttag
```



---
## __name__
```python
from nav import __name__
```



---
## Navigation
```python
from nav import Navigation
```



---
## Section
```python
from nav import Section
```



---
## Link
```python
from nav import Link
```



---
## get_navigation
```python
from nav import get_navigation
```

Build site navigation from config and files.

---
## _data_to_navigation
```python
from nav import _data_to_navigation
```



---
## _get_by_type
```python
from nav import _get_by_type
```



---
## _add_parent_links
```python
from nav import _add_parent_links
```



---
## _add_previous_and_next_links
```python
from nav import _add_previous_and_next_links
```



---
## __init__
```python
from nav import __init__
```



---
## __str__
```python
from nav import __str__
```



---
## __iter__
```python
from nav import __iter__
```



---
## __len__
```python
from nav import __len__
```



---
## __repr__
```python
from nav import __repr__
```



---
## active
```python
from nav import active
```

Set active status of section and ancestors.

---
## _indent_print
```python
from nav import _indent_print
```



---
## __name__
```python
from search_index import __name__
```



---
## SearchIndex
```python
from search_index import SearchIndex
```

Search index is a collection of pages and sections (heading
tags and their following content are sections).

---
## ContentSection
```python
from search_index import ContentSection
```

Used by the ContentParser class to capture the information we
need when it is parsing the HTML.

---
## ContentParser
```python
from search_index import ContentParser
```

Given a block of HTML, group the content under the preceding
heading tags which can then be used for creating an index
for that section.

---
## __init__
```python
from search_index import __init__
```



---
## _find_toc_by_id
```python
from search_index import _find_toc_by_id
```

Given a table of contents and HTML ID, iterate through
and return the matched item in the TOC.

---
## _add_entry
```python
from search_index import _add_entry
```

A simple wrapper to add an entry, dropping bad characters.

---
## add_entry_from_context
```python
from search_index import add_entry_from_context
```

Create a set of entries in the index for a page. One for
the page itself and then one for each of its' heading
tags.

---
## create_entry_for_section
```python
from search_index import create_entry_for_section
```

Given a section on the page, the table of contents and
the absolute url for the page create an entry in the
index.

---
## generate_search_index
```python
from search_index import generate_search_index
```

Python to json conversion.

---
## __eq__
```python
from search_index import __eq__
```



---
## handle_starttag
```python
from search_index import handle_starttag
```

Called at the start of every HTML tag.

---
## handle_endtag
```python
from search_index import handle_endtag
```

Called at the end of every HTML tag.

---
## handle_data
```python
from search_index import handle_data
```

Called for the text contents of each tag.

---
## stripped_html
```python
from search_index import stripped_html
```



---
## LangOption
```python
from __init__ import LangOption
```

Validate Language(s) provided in config are known languages.

---
## _PluginConfig
```python
from __init__ import _PluginConfig
```



---
## SearchPlugin
```python
from __init__ import SearchPlugin
```

Add a search feature to MkDocs.

---
## get_lunr_supported_lang
```python
from __init__ import get_lunr_supported_lang
```



---
## run_validation
```python
from __init__ import run_validation
```



---
## on_config
```python
from __init__ import on_config
```

Add plugin templates and scripts to config.

---
## on_pre_build
```python
from __init__ import on_pre_build
```

Create search index instance for later use.

---
## on_page_context
```python
from __init__ import on_page_context
```

Add page to search index.

---
## on_post_build
```python
from __init__ import on_post_build
```

Build search index.

---
## __name__
```python
from deploy_discord import __name__
```



---
## main
```python
from deploy_discord import main
```



---
## __name__
```python
from discord_chat import __name__
```



---
## get_client
```python
from discord_chat import get_client
```



---
## truncate_response
```python
from discord_chat import truncate_response
```



---
## run_bot
```python
from discord_chat import run_bot
```



---
## to_bytes
```python
from util import to_bytes
```



---
## to_str
```python
from util import to_str
```



---
## reraise
```python
from util import reraise
```



---
## _TYPE_FAILEDTELL
```python
from request import _TYPE_FAILEDTELL
```



---
## ChunksAndContentLength
```python
from request import ChunksAndContentLength
```



---
## body_to_chunks
```python
from request import body_to_chunks
```

Takes the HTTP request method, body, and blocksize and
transforms them into an iterable of chunks to pass to
socket.sendall() and an optional 'Content-Length' header.

A 'Content-Length' of 'None' indicates the length of the body
can't be determined so should use 'Transfer-Encoding: chunked'
for framing instead.

---
## chunk_readable
```python
from request import chunk_readable
```



---
## _TYPE_DEFAULT
```python
from timeout import _TYPE_DEFAULT
```



---
## _is_bpo_43522_fixed
```python
from ssl_ import _is_bpo_43522_fixed
```

Return True for CPython 3.8.9+, 3.9.3+ or 3.10+ and PyPy 7.3.8+ where
setting SSLContext.hostname_checks_common_name to False works.

Outside of CPython and PyPy we don't know which implementations work
or not so we conservatively use our hostname matching as we know that works
on all implementations.

https://github.com/urllib3/urllib3/issues/2192#issuecomment-821832963
https://foss.heptapod.net/pypy/pypy/-/issues/3539

---
## _is_has_never_check_common_name_reliable
```python
from ssl_ import _is_has_never_check_common_name_reliable
```



---
## _TYPE_PEER_CERT_RET_DICT
```python
from ssl_ import _TYPE_PEER_CERT_RET_DICT
```



---
## RequestHistory
```python
from retry import RequestHistory
```



---
## authority
```python
from url import authority
```

Authority component as defined in RFC 3986 3.2.
This includes userinfo (auth), host and port.

i.e.
    userinfo@host:port

---
## _TYPE_SOCKS_OPTIONS
```python
from socks import _TYPE_SOCKS_OPTIONS
```



---
## _real_close
```python
from pyopenssl import _real_close
```



---
## selected_alpn_protocol
```python
from pyopenssl import selected_alpn_protocol
```



---
## _set_ctx_options
```python
from pyopenssl import _set_ctx_options
```



---
## minimum_version
```python
from pyopenssl import minimum_version
```



---
## maximum_version
```python
from pyopenssl import maximum_version
```



---
## inject_into_urllib3
```python
from __init__ import inject_into_urllib3
```



---
## extract_from_urllib3
```python
from __init__ import extract_from_urllib3
```



---
## _is_legal_header_name
```python
from connection import _is_legal_header_name
```

"An implementation that validates fields according to the definitions in Sections
5.1 and 5.5 of [HTTP] only needs an additional check that field names do not
include uppercase characters." (https://httpwg.org/specs/rfc9113.html#n-field-validity)

`http.client._is_legal_header_name` does not validate the field name according to the
HTTP 1.1 spec, so we do that here, in addition to checking for uppercase characters.

This does not allow for the `:` character in the header name, so should not
be used to validate pseudo-headers.

---
## _is_illegal_header_value
```python
from connection import _is_illegal_header_value
```

"A field value MUST NOT contain the zero value (ASCII NUL, 0x00), line feed
(ASCII LF, 0x0a), or carriage return (ASCII CR, 0x0d) at any position. A field
value MUST NOT start or end with an ASCII whitespace character (ASCII SP or HTAB,
0x20 or 0x09)." (https://httpwg.org/specs/rfc9113.html#n-field-validity)

---
## _LockedObject
```python
from connection import _LockedObject
```

A wrapper class that hides a specific object behind a lock.
The goal here is to provide a simple way to protect access to an object
that cannot safely be simultaneously accessed from multiple threads. The
intended use of this class is simple: take hold of it with a context
manager, which returns the protected object.

---
## HTTP2Connection
```python
from connection import HTTP2Connection
```



---
## HTTP2Response
```python
from connection import HTTP2Response
```



---
## _new_h2_conn
```python
from connection import _new_h2_conn
```



---
## endheaders
```python
from connection import endheaders
```



---
## data
```python
from connection import data
```



---
## get_redirect_location
```python
from connection import get_redirect_location
```



---
## __name__
```python
from probe import __name__
```



---
## _HTTP2ProbeCache
```python
from probe import _HTTP2ProbeCache
```



---
## __init__
```python
from probe import __init__
```



---
## acquire_and_get
```python
from probe import acquire_and_get
```



---
## set_and_release
```python
from probe import set_and_release
```



---
## _values
```python
from probe import _values
```

This function is for testing purposes only. Gets the current state of the probe cache

---
## _reset
```python
from probe import _reset
```

This function is for testing purposes only. Reset the cache values

---
## __name__
```python
from fetch import __name__
```

Support for streaming http requests in emscripten.

A few caveats -

Firstly, you can't do streaming http in the main UI thread, because atomics.wait isn't allowed.
Streaming only works if you're running pyodide in a web worker.

Secondly, this uses an extra web worker and SharedArrayBuffer to do the asynchronous fetch
operation, so it requires that you have crossOriginIsolation enabled, by serving over https
(or from localhost) with the two headers below set:

    Cross-Origin-Opener-Policy: same-origin
    Cross-Origin-Embedder-Policy: require-corp

You can tell if cross origin isolation is successfully enabled by looking at the global crossOriginIsolated variable in
javascript console. If it isn't, streaming requests will fallback to XMLHttpRequest, i.e. getting the whole
request into a buffer and then returning it. it shows a warning in the javascript console in this case.

Finally, the webworker which does the streaming fetch is created on initial import, but will only be started once
control is returned to javascript. Call `await wait_for_streaming_ready()` to wait for streaming fetch.

NB: in this code, there are a lot of javascript objects. They are named js_*
to make it clear what type of object they are.

---
## _RequestError
```python
from fetch import _RequestError
```



---
## _StreamingError
```python
from fetch import _StreamingError
```



---
## _TimeoutError
```python
from fetch import _TimeoutError
```



---
## _obj_from_dict
```python
from fetch import _obj_from_dict
```



---
## _ReadStream
```python
from fetch import _ReadStream
```



---
## _StreamingFetcher
```python
from fetch import _StreamingFetcher
```



---
## is_in_browser_main_thread
```python
from fetch import is_in_browser_main_thread
```



---
## is_cross_origin_isolated
```python
from fetch import is_cross_origin_isolated
```



---
## is_in_node
```python
from fetch import is_in_node
```



---
## is_worker_available
```python
from fetch import is_worker_available
```



---
## send_streaming_request
```python
from fetch import send_streaming_request
```



---
## _show_timeout_warning
```python
from fetch import _show_timeout_warning
```



---
## _show_streaming_warning
```python
from fetch import _show_streaming_warning
```



---
## send_request
```python
from fetch import send_request
```



---
## streaming_ready
```python
from fetch import streaming_ready
```



---
## __init__
```python
from fetch import __init__
```



---
## __del__
```python
from fetch import __del__
```



---
## is_closed
```python
from fetch import is_closed
```



---
## closed
```python
from fetch import closed
```



---
## close
```python
from fetch import close
```



---
## readable
```python
from fetch import readable
```



---
## writable
```python
from fetch import writable
```



---
## seekable
```python
from fetch import seekable
```



---
## readinto
```python
from fetch import readinto
```



---
## send
```python
from fetch import send
```



---
## promise_resolver
```python
from fetch import promise_resolver
```



---
## onMsg
```python
from fetch import onMsg
```



---
## onErr
```python
from fetch import onErr
```



---
## EmscriptenRequest
```python
from request import EmscriptenRequest
```



---
## set_header
```python
from request import set_header
```



---
## set_body
```python
from request import set_body
```



---
## EmscriptenResponse
```python
from response import EmscriptenResponse
```



---
## EmscriptenHttpResponseWrapper
```python
from response import EmscriptenHttpResponseWrapper
```



---
## EmscriptenHTTPConnection
```python
from connection import EmscriptenHTTPConnection
```



---
## EmscriptenHTTPSConnection
```python
from connection import EmscriptenHTTPSConnection
```



---
## __name__
```python
from realsense_camera import __name__
```



---
## RealsenseCamera
```python
from realsense_camera import RealsenseCamera
```

A class to handle capturing images from an Intel RealSense camera and encoding camera intrinsics.

Attributes:
    width (int): Width of the image frames.
    height (int): Height of the image frames.
    fps (int): Frames per second for the video stream.
    pipeline (rs.pipeline): RealSense pipeline for streaming.
    config (rs.config): Configuration for the RealSense pipeline.
    profile (rs.pipeline_profile): Pipeline profile containing stream settings.
    depth_sensor (rs.sensor): Depth sensor of the RealSense camera.
    depth_scale (float): Depth scale factor for the RealSense camera.
    align (rs.align): Object to align depth frames to color frames.

---
## __init__
```python
from realsense_camera import __init__
```

Initialize the RealSense camera with the given dimensions and frame rate.

Args:
    width (int): Width of the image frames.
    height (int): Height of the image frames.
    fps (int): Frames per second for the video stream.

---
## capture_realsense_images
```python
from realsense_camera import capture_realsense_images
```

Capture color and depth images from the RealSense camera along with intrinsics.

Returns:
    tuple: color_image (np.ndarray), depth_image (np.ndarray),
           intrinsics (rs.intrinsics), intrinsics_matrix (np.ndarray)

---
## serialize_intrinsics
```python
from realsense_camera import serialize_intrinsics
```

Serialize camera intrinsics to a dictionary.

Args:
    intrinsics (rs.intrinsics): The intrinsics object to serialize.

Returns:
    dict: Serialized intrinsics as a dictionary.

---
## intrinsics_to_base64
```python
from realsense_camera import intrinsics_to_base64
```

Convert camera intrinsics to a base64 string.

Args:
    intrinsics (rs.intrinsics): The intrinsics object to encode.

Returns:
    str: Base64 encoded string of the intrinsics.

---
## base64_to_intrinsics
```python
from realsense_camera import base64_to_intrinsics
```

Convert a base64 encoded string to an rs.intrinsics object.

Args:
    base64_str (str): Base64 encoded string representing camera intrinsics.

Returns:
    rs.intrinsics: An rs.intrinsics object with the decoded intrinsics data.

---
## matrix_and_distortion_to_intrinsics
```python
from realsense_camera import matrix_and_distortion_to_intrinsics
```

Convert a 3x3 intrinsic matrix and a 1x5 distortion coefficients array to an rs.intrinsics object.

Args:
    image_height (int): The height of the image.
    image_width (int): The width of the image.
    matrix (np.ndarray): A 3x3 intrinsic matrix.
    coeffs (np.ndarray): A 1x5 array of distortion coefficients.

Returns:
    rs.intrinsics: An rs.intrinsics object with the given intrinsics data.

Examples:
    >>> matrix = np.array([[525.0, 0.0, 319.5], [0.0, 525.0, 239.5], [0.0, 0.0, 1.0]])
    >>> coeffs = np.array([0.1, 0.01, 0.001, 0.0001, 0.00001])
    >>> intrinsics = RealsenseCamera.matrix_and_distortion_to_intrinsics(480, 640, matrix, coeffs)
    >>> expected = rs.intrinsics()
    >>> expected.width = 640
    >>> expected.height = 480
    >>> expected.ppx = 319.5
    >>> expected.ppy = 239.5
    >>> expected.fx = 525.0
    >>> expected.fy = 525.0
    >>> expected.model = rs.distortion.none
    >>> expected.coeffs = [0.1, 0.01, 0.001, 0.0001, 0.00001]
    >>> assert (
    ...     intrinsics.width == expected.width
    ...     and intrinsics.height == expected.height
    ...     and intrinsics.ppx == expected.ppx
    ...     and intrinsics.ppy == expected.ppy
    ...     and intrinsics.fx == expected.fx
    ...     and intrinsics.fy == expected.fy
    ...     and intrinsics.model == expected.model
    ...     and np.allclose(intrinsics.coeffs, expected.coeffs)
    ... )

---
## pixel_to_3dpoint_realsense
```python
from realsense_camera import pixel_to_3dpoint_realsense
```

Convert a 2D pixel coordinate to a 3D point using the depth and camera intrinsics.

Args:
    centroid (tuple): The (u, v) coordinates of the pixel.
    depth (float): The depth value at the pixel.
    realsense_intrinsics (object): Camera intrinsics.

Returns:
    np.ndarray: The 3D coordinates of the point.

Examples:
    >>> estimator = ArucoMarkerBasedObjectPoseEstimation(color_image, depth_image, intrinsic_matrix)
    >>> estimator.pixel_to_3dpoint_realsense((320, 240), 1.5, realsense_intrinsics)

---
## HardwareInterface
```python
from interface import HardwareInterface
```

Abstract base class for hardware interfaces.

This class provides a template for creating hardware interfaces that can
control robots or other hardware devices.

---
## do
```python
from interface import do
```

Executes motion.

Args:
    args: Arguments to pass to the hardware interface.
    kwargs: Additional arguments to pass to the hardware interface.

---
## fetch
```python
from interface import fetch
```

Fetches data from the hardware.

Args:
    args: Arguments to pass to the hardware interface.
    kwargs: Additional arguments to pass to the hardware interface.

---
## capture
```python
from interface import capture
```

Captures continuous data from the hardware.

Args:
    args: Arguments to pass to the hardware interface.
    kwargs: Additional arguments to pass to the hardware interface.

---
## __name__
```python
from sim_interface import __name__
```



---
## SimInterface
```python
from sim_interface import SimInterface
```

A simulated interface for testing and validating purposes.

This class simulates the interface between the robot arm and the control system.

Attributes:
    home_pos: The home position of the robot arm.
    current_pos: The current position of the robot arm.

---
## __init__
```python
from sim_interface import __init__
```

Initializes the SimInterface and sets up the robot arm.

position: [x, y, z, r, p, y, grasp]

---
## do
```python
from sim_interface import do
```

Executes a given HandControl motion and returns the new position of the robot arm.

Args:
    motion: The HandControl motion to be executed.

---
## get_pose
```python
from sim_interface import get_pose
```

Gets the current pose of the robot arm.

Returns:
    list[float]: A list of the current pose values [x, y, z, r, p, y, grasp].

---
## capture
```python
from sim_interface import capture
```

Captures an image.

---
## supports
```python
from message import supports
```

Checks if the argument type is supported by the Message class.

Args:
    arg: The argument to be checked.

Returns:
    True if the argument type is supported, False otherwise.

---
## __init__
```python
from message import __init__
```

Initializes a Message instance.

Args:
    content: The content of the message, which can be of various types.
    role: The role of the message sender (default is "user").

---
## __name__
```python
from ndarray import __name__
```



---
## Pose3D
```python
from geometry import Pose3D
```

Action for a 2D+1 space representing x, y, and theta.

---
## LocationAngle
```python
from geometry import LocationAngle
```

Alias for Pose3D. A 2D+1 space representing x, y, and theta.

---
## Pose6D
```python
from geometry import Pose6D
```

Movement for a 6D space representing x, y, z, roll, pitch, and yaw.

---
## Pose
```python
from geometry import Pose
```

Alias for Pose6D. A movement for a 6D space representing x, y, z, roll, pitch, and yaw.

---
## AbsolutePose
```python
from geometry import AbsolutePose
```

Absolute pose of the robot in 3D space.

---
## RelativePose
```python
from geometry import RelativePose
```

Relative pose of the robot in 3D space.

---
## __name__
```python
from sample import __name__
```

Module containing utilities for NDFrame.sample() and .GroupBy.sample()

---
## Sample
```python
from sample import Sample
```

A base model class for serializing, recording, and manipulating arbitray data.

It was designed to be extensible, flexible, yet strongly typed. In addition to
supporting any json API out of the box, it can be used to represent
arbitrary action and observation spaces in robotics and integrates seemlessly with H5, Gym, Arrow,
PyTorch, DSPY, numpy, and HuggingFace.

Methods:
    schema: Get a simplified json schema of your data.
    to: Convert the Sample instance to a different container type:
        -
    default_value: Get the default value for the Sample instance.
    unflatten: Unflatten a one-dimensional array or dictionary into a Sample instance.
    flatten: Flatten the Sample instance into a one-dimensional array or dictionary.
    space_for: Default Gym space generation for a given value.
    init_from: Initialize a Sample instance from a given value.
    from_space: Generate a Sample instance from a Gym space.
    pack_from: Pack a list of samples into a single sample with lists for attributes.
    unpack: Unpack the packed Sample object into a list of Sample objects or dictionaries.
    dict: Return the Sample object as a dictionary with None values excluded.
    model_field_info: Get the FieldInfo for a given attribute key.
    space: Return the corresponding Gym space for the Sample instance based on its instance attributes.
    random_sample: Generate a random Sample instance based on its instance attributes.

Examples:
    >>> sample = Sample(x=1, y=2, z={"a": 3, "b": 4}, extra_field=5)
    >>> flat_list = sample.flatten()
    >>> print(flat_list)
    [1, 2, 3, 4, 5]
    >>> schema = sample.schema()
    {'type': 'object', 'properties': {'x': {'type': 'number'}, 'y': {'type': 'number'}, 'z': {'type': 'object', 'properties': {'a': {'type': 'number'}, 'b': {'type': 'number'}}}, 'extra_field': {'type': 'number'}}}
    >>> unflattened_sample = Sample.unflatten(flat_list, schema)
    >>> print(unflattened_sample)
    Sample(x=1, y=2, z={'a': 3, 'b': 4}, extra_field=5)

---
## __init__
```python
from sample import __init__
```

Accepts an arbitrary datum as well as keyword arguments.

---
## __hash__
```python
from sample import __hash__
```

Return a hash of the Sample instance.

---
## __str__
```python
from sample import __str__
```

Return a string representation of the Sample instance.

---
## dict
```python
from sample import dict
```

Return the Sample object as a dictionary with None values excluded.

Args:
    exclude_none (bool, optional): Whether to exclude None values. Defaults to True.
    exclude (set[str], optional): Set of attribute names to exclude. Defaults to None.

Returns:
    Dict[str, Any]: Dictionary representation of the Sample object.

---
## unflatten
```python
from sample import unflatten
```

Unflatten a one-dimensional array or dictionary into a Sample instance.

If a dictionary is provided, its keys are ignored.

Args:
    one_d_array_or_dict: A one-dimensional array or dictionary to unflatten.
    schema: A dictionary representing the JSON schema. Defaults to using the class's schema.

Returns:
    Sample: The unflattened Sample instance.

Examples:
    >>> sample = Sample(x=1, y=2, z={"a": 3, "b": 4}, extra_field=5)
    >>> flat_list = sample.flatten()
    >>> print(flat_list)
    [1, 2, 3, 4, 5]
    >>> Sample.unflatten(flat_list, sample.schema())
    Sample(x=1, y=2, z={'a': 3, 'b': 4}, extra_field=5)

---
## flatten
```python
from sample import flatten
```



---
## obj_to_schema
```python
from sample import obj_to_schema
```

Generates a simplified JSON schema from a dictionary.

Args:
    value (Any): An object to generate a schema for.

Returns:
    dict: A simplified JSON schema representing the structure of the dictionary.

---
## schema
```python
from sample import schema
```

Returns a simplified json schema.

Removing additionalProperties,
selecting the first type in anyOf, and converting numpy schema to the desired type.
Optionally resolves references.

Args:
    resolve_refs (bool): Whether to resolve references in the schema. Defaults to True.
    include_descriptions (bool): Whether to include descriptions in the schema. Defaults to False.

Returns:
    dict: A simplified JSON schema.

---
## read
```python
from sample import read
```

Read a Sample instance from a JSON string or dictionary or path.

Args:
    data (Any): The JSON string or dictionary to read.

Returns:
    Sample: The read Sample instance.

---
## to
```python
from sample import to
```

Convert the Sample instance to a different container type.

Args:
    container (Any): The container type to convert to. Supported types are
        'dict', 'list', 'np', 'pt' (pytorch), 'space' (gym.space),
        'schema', 'json', 'hf' (datasets.Dataset) and any subtype of Sample.

Returns:
    Any: The converted container.

---
## default_value
```python
from sample import default_value
```

Get the default value for the Sample instance.

Returns:
    Sample: The default value for the Sample instance.

---
## space_for
```python
from sample import space_for
```

Default Gym space generation for a given value.

Only used for subclasses that do not override the space method.

---
## init_from
```python
from sample import init_from
```



---
## from_flat_dict
```python
from sample import from_flat_dict
```

Initialize a Sample instance from a flattened dictionary.

---
## from_space
```python
from sample import from_space
```

Generate a Sample instance from a Gym space.

---
## pack_from
```python
from sample import pack_from
```

Pack a list of samples into a single sample with lists for attributes.

Args:
    samples (List[Union[Sample, Dict]]): List of samples or dictionaries.

Returns:
    Sample: Packed sample with lists for attributes.

---
## unpack
```python
from sample import unpack
```

Unpack the packed Sample object into a list of Sample objects or dictionaries.

---
## default_space
```python
from sample import default_space
```

Return the Gym space for the Sample class based on its class attributes.

---
## default_sample
```python
from sample import default_sample
```

Generate a default Sample instance from its class attributes. Useful for padding.

This is the "no-op" instance and should be overriden as needed.

---
## model_field_info
```python
from sample import model_field_info
```

Get the FieldInfo for a given attribute key.

---
## space
```python
from sample import space
```

Return the corresponding Gym space for the Sample instance based on its instance attributes. Omits None values.

Override this method in subclasses to customize the space generation.

---
## random_sample
```python
from sample import random_sample
```

Generate a random Sample instance based on its instance attributes. Omits None values.

Override this method in subclasses to customize the sample generation.

---
## unflatten_recursive
```python
from sample import unflatten_recursive
```



---
## flatten_recursive
```python
from sample import flatten_recursive
```



---
## detect
```python
from cli import detect
```

Run the ObjectDetectionAgent to detect objects in an image.

---
## estimate_depth
```python
from cli import estimate_depth
```

Run the DepthEstimationAgent to estimate depth from an image.

---
## segment
```python
from cli import segment
```

Run the SegmentationAgent to segment objects in an image.

---
## __name__
```python
from agent import __name__
```



---
## Agent
```python
from agent import Agent
```

Abstract base class for agents.

This class provides a template for creating agents that can
optionally record their actions and observations.

Attributes:
    recorder (Recorder): The recorder to record observations and actions.
    actor (Backend): The backend actor to perform actions.
    kwargs (dict): Additional arguments to pass to the recorder.

---
## init_backend
```python
from agent import init_backend
```

Initialize the backend based on the model source.

Args:
    model_src: The model source to use.
    model_kwargs: The additional arguments to pass to the model.
    api_key: The API key to use for the remote actor.

Returns:
    type: The backend class to use.

---
## handle_default
```python
from agent import handle_default
```

Default to gradio then httpx backend if the model source is not recognized.

Args:
    model_src: The model source to use.
    model_kwargs: The additional arguments to pass to the model.

---
## __init__
```python
from agent import __init__
```

Initialize the agent, optionally setting up a recorder, remote actor, or loading a local model.

Args:
    recorder: The recorder config or name to use for recording observations and actions.
    recorder_kwargs: Additional arguments to pass to the recorder.
    api_key: The API key to use for the remote actor (if applicable).
    model_src: The model or inference client or weights path to setup and preload if applicable.
               You can pass in for example, "openai", "anthropic", "gradio", or a gradio endpoint,
               or a path to a weights file.
    model_kwargs: Additional arguments to pass to the remote actor.

---
## load_model
```python
from agent import load_model
```

Load a model from a file or path. Required if the model is a weights path.

Args:
    model: The path to the model file.

---
## act
```python
from agent import act
```

Act based on the observation.

Subclass should implement this method.

For remote actors, this method should call actor.act() correctly to perform the actions.

---
## act_and_record
```python
from agent import act_and_record
```

Peform action based on the observation and record the action, if applicable.

Args:
    *args: Additional arguments to customize the action.
    **kwargs: Additional arguments to customize the action.

Returns:
    Sample: The action sample created by the agent.

---
## create_observation_from_args
```python
from agent import create_observation_from_args
```

Helper method to create an observation from the arguments of a function.

---
## __name__
```python
from import_utils import __name__
```



---
## reload
```python
from import_utils import reload
```

Reload an existing module or import it if not already imported.

If the specified module is already present in the global namespace,
it will be reloaded. Otherwise, the module will be imported.

Args:
    module (str): The name of the module to reload or import.

Returns:
    None

---
## smart_import
```python
from import_utils import smart_import
```

Import a module with optional lazy loading.

This function imports a module by name. If the module is already
present in the global namespace, it will return the existing module.
If the `mode` is set to "lazy", the module will be loaded lazily,
meaning that the module will only be fully loaded when an attribute
or function within the module is accessed.

Args:
    name (str): The name of the module to import.
    mode (Literal["lazy"] | None, optional): If "lazy", the module will
        be imported using a lazy loader. Defaults to None.

Returns:
    ModuleType: The imported module.

Raises:
    NameError: If the module cannot be found or imported.

---
## __name__
```python
from sim_robot import __name__
```



---
## SimRobot
```python
from sim_robot import SimRobot
```

A simulated robot interface for testing and validating purposes.

This class simulates the interface between the robot arm and the control system.
do() simulates the execution of HandControl motions that got executed in execution_time.

Attributes:
    home_pos: The home position of the robot arm.
    current_pos: The current position of the robot arm.

---
## __init__
```python
from sim_robot import __init__
```

Initializes the SimRobot and sets up the robot arm.

Args:
    execution_time: The time it takes to execute a motion.

position: [x, y, z, r, p, y, grasp]

---
## do
```python
from sim_robot import do
```

Executes HandControl motions and returns the new position of the robot arm.

This simulates the execution of each motion for self.execution_time. It divides the motion into 10 steps.

Args:
    motion: The HandControl motion to be executed.

---
## capture
```python
from sim_robot import capture
```

Captures an image.

---
## get_observation
```python
from sim_robot import get_observation
```

Alias of capture for recording.

---
## get_state
```python
from sim_robot import get_state
```

Gets the current pose of the robot arm.

Returns:
    list[float]: A list of the current pose values [x, y, z, r, p, y, grasp].

---
## prepare_action
```python
from sim_robot import prepare_action
```

Calculates the action between two poses.

---
## __name__
```python
from robot import __name__
```



---
## Robot
```python
from robot import Robot
```

Abstract base class for robot hardware interfaces.

This class serves as a blueprint for creating interfaces to control robot hardware
or other devices. It provides essential methods and guidelines to implement
functionalities such as executing motions, capturing observations, and recording
robot data, which can be used for training models.

Key Features:
- organize your hardware interface in a modular fashion
- support asynchronous dataset creation

**Recording Capabilities:**
To enable data recording for model training, the following methods need implementation:
- `get_observation()`: Captures the current observation/image of the robot.
- `get_state()`: Retrieves the current state (pose) of the robot.
- `prepare_action()`: Computes the action performed between two robot states.

**Example Usage:**
```python
robot = MyRobot()
robot.init_recorder(frequency_hz=5, recorder_kwargs={...})
with robot.record("pick up the remote"):
    robot.do(motion1)
    robot.do(motion2)
    ...
```
When ``with robot.record`` is called, it starts recording the robot's observation and actions
at the desired frequency. It stops when the context manager exits.

Alternatively, you can manage recordings with `start_recording()` and `stop_recording()` methods.

---
## __init__
```python
from robot import __init__
```

Initializes the robot hardware interface.

Args:
    kwargs: Additional arguments to pass to the robot hardware interface.

---
## do
```python
from robot import do
```

Executes motion.

Args:
    args: Arguments to pass to the robot hardware interface.
    kwargs: Additional arguments to pass to the robot hardware interface.

---
## fetch
```python
from robot import fetch
```

Fetches data from the hardware.

Args:
    args: Arguments to pass to the robot hardware interface.
    kwargs: Additional arguments to pass to the robot hardware interface.

---
## capture
```python
from robot import capture
```

Captures continuous data from the hardware.

Args:
    args: Arguments to pass to the robot hardware interface.
    kwargs: Additional arguments to pass to the robot hardware interface.

---
## get_observation
```python
from robot import get_observation
```

(Optional for robot recorder): Captures the observation/image of the robot.

This will be used by the robot recorder to record the current observation/image of the robot.

---
## get_state
```python
from robot import get_state
```

(Optional for robot recorder): Gets the current state (pose) of the robot.

This will be used by the robot recorder to record the current state of the robot.

---
## prepare_action
```python
from robot import prepare_action
```

(Optional for robot recorder): Prepare the the action between two robot states.

This is what you are recording as the action. For example, substract old from new hand position
and use absolute value for grasp, etc.

Args:
    old_state: The old state (pose) of the robot.
    new_state: The new state (pose) of the robot.

---
## init_recorder
```python
from robot import init_recorder
```

Initializes the recorder for the robot.

---
## record
```python
from robot import record
```

Start recording with the given task with context manager.

Usage:
```python
with robot.record("pick up the remote"):
    robot.do(motion1)
    robot.do(motion2)
    ...
```

---
## start_recording
```python
from robot import start_recording
```

Start recording with the given task.

---
## stop_recording
```python
from robot import stop_recording
```

Stop recording.

---
## __name__
```python
from xarm_robot import __name__
```



---
## XarmRobot
```python
from xarm_robot import XarmRobot
```

Control the xArm robot arm with SDK.

Usage:
```python
xarm = XarmRobot()
xarm.do(HandControl(...))
```

Attributes:
    ip: The IP address of the xArm robot.
    arm: The XArmAPI instance for controlling the robot.
    home_pos: The home position of the robot arm.

---
## __init__
```python
from xarm_robot import __init__
```

Initializes the XarmRobot and sets up the robot arm.

Args:
    ip: The IP address of the xArm robot.
    use_realsense: Whether to use a RealSense camera for capturing images

---
## do
```python
from xarm_robot import do
```

Executes HandControl(s).

HandControl is in meters and radians.

Args:
    motion: The HandControl motion(s) to be executed.

---
## get_state
```python
from xarm_robot import get_state
```

Gets the current pose (absolute HandControl) of the robot arm.

Returns:
    The current pose of the robot arm.

---
## prepare_action
```python
from xarm_robot import prepare_action
```

Calculates the action between two poses.

Args:
    old_pose: The old pose(state) of the hardware.
    new_pose: The new pose(state) of the hardware.

Returns:
    The action to be taken between the old and new poses.

---
## capture
```python
from xarm_robot import capture
```

Captures an image from the robot camera.

---
## get_observation
```python
from xarm_robot import get_observation
```

Captures an image for recording.

---
## __name__
```python
from robot_recording import __name__
```



---
## RobotRecorder
```python
from robot_recording import RobotRecorder
```

A class for recording robot observation and actions.

Recording at a specified frequency on the observation and action of a robot. It leverages a queue and a worker
thread to handle the recording asynchronously, ensuring that the main operations of the
robot are not blocked.

Robot class must pass in the `get_state`, `get_observation`, `prepare_action` methods.`
get_state() gets the current state/pose of the robot.
get_observation() captures the observation/image of the robot.
prepare_action() calculates the action between the new and old states.

---
## __init__
```python
from robot_recording import __init__
```

Initializes the RobotRecorder.

This constructor sets up the recording mechanism on the given robot, including the recorder instance,
recording frequency, and the asynchronous processing queue and worker thread. It also
initializes attributes to track the last recorded pose and the current instruction.

Args:
    get_state: A function that returns the current state of the robot.
    get_observation: A function that captures the observation/image of the robot.
    prepare_action: A function that calculates the action between the new and old states.
    frequency_hz: Frequency at which to record pose and image data (in Hz).
    recorder_kwargs: Keyword arguments to pass to the Recorder constructor.
    on_static: Whether to record on static poses or not. If "record", it will record when the robot is not moving.

---
## __enter__
```python
from robot_recording import __enter__
```

Enter the context manager, starting the recording.

---
## __exit__
```python
from robot_recording import __exit__
```

Exit the context manager, stopping the recording.

---
## record
```python
from robot_recording import record
```

Set the task and return the context manager.

---
## reset_recorder
```python
from robot_recording import reset_recorder
```

Reset the recorder.

---
## record_from_robot
```python
from robot_recording import record_from_robot
```

Records the current pose and captures an image at the specified frequency.

---
## start_recording
```python
from robot_recording import start_recording
```

Starts the recording of pose and image.

---
## stop_recording
```python
from robot_recording import stop_recording
```

Stops the recording of pose and image.

---
## _process_queue
```python
from robot_recording import _process_queue
```

Processes the recording queue asynchronously.

---
## record_current_state
```python
from robot_recording import record_current_state
```

Records the current pose and image if the pose has changed.

---
## record_last_state
```python
from robot_recording import record_last_state
```

Records the final pose and image after the movement completes.

---
## __name__
```python
from recording import __name__
```

Module for recording data to an h5 file.

---
## add_space_metadata
```python
from recording import add_space_metadata
```



---
## create_dataset_for_space_dict
```python
from recording import create_dataset_for_space_dict
```



---
## copy_and_delete_old
```python
from recording import copy_and_delete_old
```



---
## Recorder
```python
from recording import Recorder
```

Records a dataset to an h5 file. Saves images defined to folder with _frames appended to the name stem.

Example:
  ```
  # Define the observation and action spaces
  observation_space = spaces.Dict(
      {"image": spaces.Box(low=0, high=255, shape=(224, 224, 3), dtype=np.uint8), "instruction": spaces.Discrete(10)}
  )
  action_space = spaces.Dict(
      {
          "gripper_position": spaces.Box(low=-1, high=1, shape=(3,), dtype=np.float32),
          "gripper_action": spaces.Discrete(2),
      }
  )

  state_space = spaces.Dict(
      {
          "position": spaces.Box(low=-1, high=1, shape=(3,), dtype=np.float32),
          "velocity": spaces.Box(low=-1, high=1, shape=(3,), dtype=np.float32),
      }
  )

  # Create a recorder instance
  recorder = Recorder(
      name="test_recorder", observation_space=observation_space, action_space=action_space, state_space=state_space
  )

  # Generate some sample data
  num_steps = 10
  for i in range(num_steps):
      observation = {"image": np.ones((224, 224, 3), dtype=np.uint8), "instruction": i}
      action = {"gripper_position": np.zeros((3,), dtype=np.float32), "gripper_action": 1}
      state = {"position": np.random.rand(3).astype(np.float32), "velocity": np.random.rand(3).astype(np.float32)}
      recorder.record(observation, action, state=state)

  # Save the statistics
  recorder.save_stats()

  # Close the recorder
  recorder.close()

  # Assert that the HDF5 file and directories are created
  assert os.path.exists("test_recorder.h5")
  assert os.path.exists("test_recorder_frames")
  ```

---
## __init__
```python
from recording import __init__
```

Initialize the Recorder.

Args:
  name (str): Name of the file.
  observation_space (spaces.Dict): Observation space.
  action_space (spaces.Dict): Action space.
  state_space (spaces.Dict): State space.
  supervision_space (spaces.Dict): Supervision space.
  out_dir (str, optional): Directory of the output file. Defaults to 'saved_datasets'.
  image_keys_to_save (list, optional): List of image keys to save. Defaults to ['image'].

---
## reset
```python
from recording import reset
```

Reset the recorder.

---
## configure_root_spaces
```python
from recording import configure_root_spaces
```

Configure the root spaces.

Args:
    **spaces: Spaces to configure.
        observation_space (spaces.Dict): Observation space.
        action_space (spaces.Dict): Action space.
        state_space (spaces.Dict): State space.
        supervision_space (spaces.Dict): Supervision space.

---
## record_timestep
```python
from recording import record_timestep
```

Record a timestep.

Args:
  group (h5py.Group): Group to record to.
  sample (Any): Sample to record.
  index (int): Index to record at.

---
## record
```python
from recording import record
```

Record a timestep.

Args:
  observation (Any): Observation to record.
  action (Any): Action to record.
  state (Any): State to record.
  supervision (Any): Supervision to record.

---
## close
```python
from recording import close
```

Closes the Recorder and send the data if train_config is set.

---
## recursive_setarray
```python
from recording import recursive_setarray
```



---
## to_features
```python
from utils import to_features
```

Convert a dictionary to a Datasets Features object.

Args:
    indict (dict): The dictionary to convert.
    image_keys (dict): A dictionary of keys that should be treated as images.
    exclude_keys (set): A set of full-path-keys to exclude.
    prefix (str): A prefix to add to the keys.

---
## infer_features
```python
from utils import infer_features
```

Infer Hugging Face Datasets Features from an example.

---
## __name__
```python
from replaying import __name__
```



---
## Replayer
```python
from replaying import Replayer
```

Replays datasets recorded by Recorder.

This class provides methods to read, process, and analyze HDF5 files recorded by the Recorder class.

Example:
    replayer = Replayer("data.h5")
    for sample in replayer:
        observation, action, state = sample
        ...

---
## clean_folder
```python
from replaying import clean_folder
```

Clean the folder by iterating through the files and asking for deletion.

Args:
    folder (str): Path to the folder.
    image_keys_to_save (List[str]): List of image keys to save.

---
## FolderReplayer
```python
from replaying import FolderReplayer
```



---
## to_dataset
```python
from replaying import to_dataset
```

Convert the folder of HDF5 files to a Hugging Face dataset.

Args:
    folder (str): Path to the folder containing HDF5 files.
    name (str): Name of the dataset.
    description (str, optional): Description of the dataset. Defaults to None.
    **kwargs: Additional arguments to pass to the Dataset.push_to_hub method.

---
## parse_slice
```python
from replaying import parse_slice
```

Parse a string to an integer or slice.

Args:
    s (str): String to parse.

Returns:
    Union[int, slice]: Integer or slice.

Examples:
    >>> lst = [0, 1, 2, 3, 4, 5]
    >>> lst[parse_slice("1")]
    1
    >>> lst[parse_slice("1:5:2")]
    [1, 3]

---
## replay
```python
from replaying import replay
```

Replay command for processing HDF5 files.

This command provides various options to manipulate and analyze HDF5 files including cleaning, uploading,
showing samples, and generating statistics or extracting unique items based on provided keys.

---
## __init__
```python
from replaying import __init__
```

Initialize the FolderReplayer class with the given path.

Args:
    path (str): Path to the folder containing HDF5 files.

---
## _reorder_keys
```python
from replaying import _reorder_keys
```

Reorder keys to have 'observation' first, 'action' last, and 'supervision' last but one.

---
## _get_size
```python
from replaying import _get_size
```

Get the size attribute from the HDF5 file or infer it from the first key.

---
## get_frames_path
```python
from replaying import get_frames_path
```

Get the path to the frames directory.

---
## recursive_do
```python
from replaying import recursive_do
```

Recursively perform a function on each key in the HDF5 file.

Args:
    do (Callable): Function to perform.
    key (str, optional): Key in the HDF5 file. Defaults to ''.
    prefix (str, optional): Prefix for the key. Defaults to ''.
    **kwargs: Additional arguments to pass to the function.

Returns:
    Any: Result of the function.

---
## get_unique_items
```python
from replaying import get_unique_items
```

Get unique items for a given key.

Args:
    key (str): Key in the HDF5 file.

Returns:
    List[str]: List of unique items.

---
## read_sample
```python
from replaying import read_sample
```

Read a sample from the HDF5 file at a given index.

Args:
    index (int): Index of the sample.

Returns:
    Tuple[dict, ...]: Tuple of dictionaries containing the sample data.

---
## get_structure
```python
from replaying import get_structure
```

Get the structure of the HDF5 file.

Args:
    key (str, optional): Key in the HDF5 file. Defaults to ''.
    prefix (str, optional): Prefix for the key. Defaults to ''.

Returns:
    dict: Structure of the HDF5 file.

---
## pack_one
```python
from replaying import pack_one
```

Pack a single sample into a Sample object.

Args:
    index (int): Index of the sample.

Returns:
    Sample: Sample object.

---
## pack
```python
from replaying import pack
```

Pack all samples into a Sample object with attributes being lists of samples.

Returns:
    Sample: Sample object containing all samples.

---
## sample
```python
from replaying import sample
```

Get a sample from the HDF5 file.

Args:
    index (Optional[Union[int, slice]], optional): Index or slice of the sample. Defaults to None.
    n (int, optional): Number of samples to get. Defaults to 1.

Returns:
    Sample: Sample object.

---
## get_stats
```python
from replaying import get_stats
```

Get statistics for a given key in the HDF5 file.

Args:
    key (str, optional): Key in the HDF5 file. Defaults to ''.
    prefix (str, optional): Prefix for the key. Defaults to ''.

Returns:
    dict: Statistics for the given key.

---
## __iter__
```python
from replaying import __iter__
```

Iterate through the HDF5 files in the folder.

---
## __next__
```python
from replaying import __next__
```

Get the next sample from the HDF5 file.

Returns:
    Tuple[dict, ...]: Tuple of dictionaries containing the sample data.

---
## close
```python
from replaying import close
```

Close the HDF5 file.

---
## read_do
```python
from replaying import read_do
```



---
## structure_do
```python
from replaying import structure_do
```



---
## stats_do
```python
from replaying import stats_do
```



---
## __name__
```python
from world import __name__
```



---
## BBox2D
```python
from world import BBox2D
```

Model for 2D Bounding Box.

---
## BBox3D
```python
from world import BBox3D
```

Model for 3D Bounding Box.

---
## PixelCoords
```python
from world import PixelCoords
```

Model for Pixel Coordinates.

---
## WorldObject
```python
from world import WorldObject
```

Model for World Object. It describes the objects in the world.

Attributes:
    name (str): The name of the object.
    bbox_2d (BBox2D | None): The 2D bounding box of the object.
    bbox_3d (BBox3D | None): The 3D bounding box of the object.
    pose (Pose | None): The pose of the object.
    pixel_coords (PixelCoords | None): The pixel coordinates of the object.

---
## World
```python
from world import World
```

Model for World Data.

Attributes:
    image (Image | None): The image of the world.
    depth (Image | None): The depth image of the world.
    annotated (Image | None): The annotated image of the world.
    objects (List[WorldObject]): The list of world objects.

---
## __name__
```python
from vision import __name__
```

Wrap any common image representation in an Image class to convert to any other common format.

The following image representations are supported:
- NumPy array
- PIL Image
- Base64 encoded string
- File path
- URL
- Bytes object

The image can be resized to and from any size, compressed, and converted to and from any supported format:

```python
image = Image("path/to/image.png", size=new_size_tuple).save("path/to/new/image.jpg")
image.save("path/to/new/image.jpg", quality=5)

TODO: Implement Lazy attribute loading for the image data.

---
## Image
```python
from vision import Image
```

An image sample that can be represented in various formats.

The image can be represented as a NumPy array, a base64 encoded string, a file path, a PIL Image object,
or a URL. The image can be resized to and from any size and converted to and from any supported format.

Attributes:
    array (Optional[np.ndarray]): The image represented as a NumPy array.
    base64 (Optional[Base64Str]): The base64 encoded string of the image.
    path (Optional[FilePath]): The file path of the image.
    pil (Optional[PILImage]): The image represented as a PIL Image object.
    url (Optional[AnyUrl]): The URL of the image.
    size (Optional[tuple[int, int]]): The size of the image as a (width, height) tuple.
    encoding (Optional[Literal["png", "jpeg", "jpg", "bmp", "gif"]]): The encoding of the image.

Examples:
    >>> image = Image("https://example.com/image.jpg")
    >>> image = Image("/path/to/image.jpg")
    >>> image = Image("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4Q3zaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA")

    >>> jpeg_from_png = Image("path/to/image.png", encoding="jpeg")
    >>> resized_image = Image(image, size=(224, 224))
    >>> pil_image = Image(image).pil
    >>> array = Image(image).array
    >>> base64 = Image(image).base64

---
## supports
```python
from vision import supports
```



---
## __init__
```python
from vision import __init__
```

Initializes an image. Either one source argument or size tuple must be provided.

Args:
  arg (SupportsImage, optional): The primary image source.
  url (Optional[str], optional): The URL of the image.
  path (Optional[str], optional): The file path of the image.
  base64 (Optional[str], optional): The base64 encoded string of the image.
  array (Optional[np.ndarray], optional): The numpy array of the image.
  pil (Optional[PILImage], optional): The PIL image object.
  encoding (Optional[str], optional): The encoding format of the image. Defaults to 'jpeg'.
  size (Optional[Tuple[int, int]], optional): The size of the image as a (width, height) tuple.
  **kwargs: Additional keyword arguments.

---
## __repr__
```python
from vision import __repr__
```

Return a string representation of the image.

---
## __str__
```python
from vision import __str__
```

Return a string representation of the image.

---
## from_base64
```python
from vision import from_base64
```

Decodes a base64 string to create an Image instance.

Args:
    base64_str (str): The base64 string to decode.
    encoding (str): The format used for encoding the image when converting to base64.
    size (Optional[Tuple[int, int]]): The size of the image as a (width, height) tuple.

Returns:
    Image: An instance of the Image class with populated fields.

---
## open
```python
from vision import open
```

Opens an image from a file path.

Args:
    path (str): The path to the image file.
    encoding (str): The format used for encoding the image when converting to base64.
    size (Optional[Tuple[int, int]]): The size of the image as a (width, height) tuple.

Returns:
    Image: An instance of the Image class with populated fields.

---
## pil_to_data
```python
from vision import pil_to_data
```

Creates an Image instance from a PIL image.

Args:
    image (PIL.Image.Image): The source PIL image from which to create the Image instance.
    encoding (str): The format used for encoding the image when converting to base64.
    size (Optional[Tuple[int, int]]): The size of the image as a (width, height) tuple.

Returns:
    Image: An instance of the Image class with populated fields.

---
## load_url
```python
from vision import load_url
```

Downloads an image from a URL or decodes it from a base64 data URI.

Args:
    url (str): The URL of the image to download, or a base64 data URI.

Returns:
    PIL.Image.Image: The downloaded and decoded image as a PIL Image object.

---
## from_bytes
```python
from vision import from_bytes
```

Creates an Image instance from a bytes object.

Args:
    bytes_data (bytes): The bytes object to convert to an image.
    encoding (str): The format used for encoding the image when converting to base64.
    size (Optional[Tuple[int, int]]): The size of the image as a (width, height) tuple.

Returns:
    Image: An instance of the Image class with populated fields.

---
## bytes_to_data
```python
from vision import bytes_to_data
```

Creates an Image instance from a bytes object.

Args:
    bytes_data (bytes): The bytes object to convert to an image.
    encoding (str): The format used for encoding the image when converting to base64.
    size (Optional[Tuple[int, int]]): The size of the image as a (width, height) tuple.

Returns:
    Image: An instance of the Image class with populated fields.

---
## validate_kwargs
```python
from vision import validate_kwargs
```



---
## save
```python
from vision import save
```

Save the image to the specified path.

If the image is a JPEG, the quality parameter can be used to set the quality of the saved image.
The path attribute of the image is updated to the new file path.

Args:
    path (str): The path to save the image to.
    encoding (Optional[str]): The encoding to use for saving the image.
    quality (int): The quality to use for saving the image.

---
## show
```python
from vision import show
```



---
## space
```python
from vision import space
```

Returns the space of the image.

---
## exclude_pil
```python
from vision import exclude_pil
```

Convert the image to a base64 encoded string.

---
## dump
```python
from vision import dump
```

Return a dict or a field of the image.

---
## infer_features_dict
```python
from vision import infer_features_dict
```

Infer features of the image.

---
## __name__
```python
from sensor_reading import __name__
```



---
## SensorReading
```python
from sensor_reading import SensorReading
```



---
## create_enum_from_list
```python
from control import create_enum_from_list
```

Dynamically create an Enum type from a list of strings.

Args:
    name (str): The name of the Enum class.
    string_list (list[str]): The list of strings to be converted into Enum members.

Returns:
    Enum: A dynamically created Enum type with members based on the string list.

---
## language_control_to_list
```python
from control import language_control_to_list
```

Convert an Enum type to a list of its values. So it's easier to pass i.e. as prompt.

---
## get_command_from_string
```python
from control import get_command_from_string
```

Get the Enum member corresponding to a given command string.

---
## JointControl
```python
from control import JointControl
```

Motion for joint control.

---
## FullJointControl
```python
from control import FullJointControl
```

Full joint control.

---
## HandControl
```python
from control import HandControl
```

Action for a 7D space representing x, y, z, roll, pitch, yaw, and oppenness of the hand.

---
## HeadControl
```python
from control import HeadControl
```



---
## MobileSingleHandControl
```python
from control import MobileSingleHandControl
```

Control for a robot that can move its base in 2D space with a 6D EEF control + grasp.

---
## MobileSingleArmControl
```python
from control import MobileSingleArmControl
```

Control for a robot that can move in 2D space with a single arm.

---
## MobileBimanualArmControl
```python
from control import MobileBimanualArmControl
```

Control for a robot that can move in 2D space with two arms.

---
## HumanoidControl
```python
from control import HumanoidControl
```

Control for a humanoid robot.

---
## LocobotActionOrAnswer
```python
from control import LocobotActionOrAnswer
```



---
## space
```python
from control import space
```



---
## __name__
```python
from motion import __name__
```

This module contains the base class for a motion.

There are four basic motion types that are supported:
- Absolute motion: The desired absolute coordinates of a limb or joint in the chosen reference frame.
- Relative motion: The displacement from the current position of a limb or joint (frame-independent).
- Velocity motion: The desired absolute velocity of a limb or joint (frame-independent).
- Torque motion: The desired torque of a limb or joint (frame-independent).

The bounds is a list of two floats representing the lower and upper bounds of the motion.
The shape is a tuple of integers representing the shape of the motion.
The reference_frame is a string representing the reference frame for the coordinates (only applies to absolute motions).

To create a new Pydantic model for a motion, inherit from the Motion class and define pydantic fields with the MotionField,
function as you would with any other Pydantic field.

Example:
```python
from mbodied_agents.motion import Motion, AbsoluteMotionField, MotionField, MotionType, VelocityMotionField
from mbodied_agents.data.sample import Sample


class Twist(Motion):
    x: float = VelocityMotionField(default=0.0, bounds=[-1.0, 1.0])
    y: float = VelocityMotionField(default=0.0, bounds=[-1.0, 1.0])
    z: float = VelocityMotionField(default=0.0, bounds=[-1.0, 1.0])
    roll: float = VelocityMotionField(default=0.0, bounds=["-pi", "pi"])
    pitch: float = VelocityMotionField(default=0.0, bounds=["-pi", "pi"])
    yaw: float = VelocityMotionField(default=0.0, bounds=["-pi", "pi"])
```


This automatically generates a Pydantic model with the specified fields and the additional properties of a motion.
It is vectorizable, serializable, and validated according to its type. Furthermore, convience methods from
the class allow for direct conversion to numpy, pytorch, and gym spaces.
See the Sample class documentation for more information: https://mbodi-ai-mbodied-agents.readthedocs-hosted.com/en/latest/
See the Pydantic documentation for more information on how to define Pydantic models: https://pydantic-docs.helpmanual.io/

---
## MotionField
```python
from motion import MotionField
```

Field for a motion.

Args:
    default: Default value for the field.
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.
    motion_type: Type of the motion. Can be "UNSPECIFIED", "OTHER", "ABSOLUTE", "RELATIVE", "VELOCITY", "TORQUE".

---
## AbsoluteMotionField
```python
from motion import AbsoluteMotionField
```

Field for an absolute motion.

This field is used to define the shape and bounds of an absolute motion.

Args:
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.

---
## RelativeMotionField
```python
from motion import RelativeMotionField
```

Field for a relative motion.

This field is used to define the shape and bounds of a relative motion.

Args:
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.

---
## VelocityMotionField
```python
from motion import VelocityMotionField
```

Field for a velocity motion.

This field is used to define the shape and bounds of a velocity motion.

Args:
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.

---
## TorqueMotionField
```python
from motion import TorqueMotionField
```

Field for a torque motion.

This field is used to define the shape and bounds of a torque motion.

Args:
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.

---
## OtherMotionField
```python
from motion import OtherMotionField
```

Field for an other motion.

This field is used to define the shape and bounds of an other motion.

Args:
    bounds: Bounds of the motion.
    shape: Shape of the motion.
    description: Description of the motion.

---
## Motion
```python
from motion import Motion
```

Base class for a motion.

---
## __name__
```python
from auto_agent import __name__
```



---
## AutoAgent
```python
from auto_agent import AutoAgent
```

AutoAgent that dynamically selects and initializes the correct agent based on the task and model.

Example Usage:
```python
# AutoAgent as LanguageAgent:
auto_agent = AutoAgent(task="language", model_src="openai")
response = auto_agent.act("What is the capital of France?")

# AutoAgent as MotorAgent:
auto_agent = AutoAgent(task="motion-openvla", model_src="https://api.mbodi.ai/community-models/")
action = auto_agent.act("move hand forward", Image(size=(224, 224)))

# AutoAgent as SenseAgent:
auto_agent = AutoAgent(task="sense-depth-estimation", model_src="https://api.mbodi.ai/sense/")
depth = auto_agent.act(image=Image("resources/bridge_example.jpeg", size=(224, 224)))
```

---
## get_agent
```python
from auto_agent import get_agent
```

Initialize the AutoAgent with the specified task and model.

This is an alternative to using the AutoAgent class directly. It returns the corresponding agent instance directly.

Usage:
```python
# Get LanguageAgent instance
language_agent = get_agent(task="language", model_src="openai")
response = language_agent.act("What is the capital of France?")

# Get OpenVlaAgent instance
openvla_agent = get_agent(task="motion-openvla", model_src="https://api.mbodi.ai/community-models/")
action = openvla_agent.act("move hand forward", Image(size=(224, 224)))

# Get DepthEstimationAgent instance
depth_agent = get_agent(task="sense-depth-estimation", model_src="https://api.mbodi.ai/sense/")
depth = depth_agent.act(image=Image("resources/bridge_example.jpeg", size=(224, 224)))
```

---
## __init__
```python
from auto_agent import __init__
```

Initialize the AutoAgent with the specified task and model.

---
## _initialize_agent
```python
from auto_agent import _initialize_agent
```

Initialize the appropriate agent based on the task.

---
## __getattr__
```python
from auto_agent import __getattr__
```

Delegate attribute access to the agent if not found in AutoAgent.

---
## act
```python
from auto_agent import act
```

Invoke the agent's act method without reinitializing the agent.

---
## available_tasks
```python
from auto_agent import available_tasks
```

Print available tasks that can be used with AutoAgent.

---
## wrapper
```python
from auto_agent import wrapper
```



---
## Backend
```python
from backend import Backend
```

Base class for agent backends.

---
## predict
```python
from backend import predict
```



---
## stream
```python
from backend import stream
```



---
## __name__
```python
from httpx_backend import __name__
```



---
## HttpxSerializer
```python
from httpx_backend import HttpxSerializer
```



---
## HttpxBackend
```python
from httpx_backend import HttpxBackend
```



---
## __call__
```python
from httpx_backend import __call__
```



---
## serialize_message
```python
from httpx_backend import serialize_message
```



---
## serialize_content
```python
from httpx_backend import serialize_content
```



---
## serialize_image
```python
from httpx_backend import serialize_image
```



---
## serialize_text
```python
from httpx_backend import serialize_text
```



---
## extract_response
```python
from httpx_backend import extract_response
```



---
## extract_stream
```python
from httpx_backend import extract_stream
```



---
## __init__
```python
from httpx_backend import __init__
```

Initializes the CompleteBackend. Defaults to using the API key from the environment and.

Args:
    api_key (Optional[str]): The API key for the Complete service.
    endpoint (str): The base URL for the Complete API.
    serializer (Optional[Serializer]): The serializer to use for serializing messages.

---
## predict
```python
from httpx_backend import predict
```



---
## stream
```python
from httpx_backend import stream
```



---
## _stream_completion
```python
from httpx_backend import _stream_completion
```



---
## __name__
```python
from ollama_backend import __name__
```



---
## OllamaSerializer
```python
from ollama_backend import OllamaSerializer
```

Serializer for Ollama-specific data formats.

---
## OllamaBackend
```python
from ollama_backend import OllamaBackend
```

Backend for interacting with Ollama's API.

---
## serialize_image
```python
from ollama_backend import serialize_image
```

Serializes an image to the Ollama format.

---
## serialize_text
```python
from ollama_backend import serialize_text
```

Serializes a text string to the Ollama format.

---
## serialize_msg
```python
from ollama_backend import serialize_msg
```

Serializes a message to the Ollama format.

---
## extract_response
```python
from ollama_backend import extract_response
```

Extracts the response from the Ollama format.

---
## extract_stream
```python
from ollama_backend import extract_stream
```



---
## __init__
```python
from ollama_backend import __init__
```

Initializes an OllamaBackend instance.

---
## __name__
```python
from vision2seq_backend import __name__
```



---
## Vision2SeqBackend
```python
from vision2seq_backend import Vision2SeqBackend
```

Vision2SeqBackend backend that runs locally to generate robot actions.

Beware of the memory requirements of 7B+ parameter models like OpenVLA.

Attributes:
    model_id (str): The model to use for the OpenVLA backend.
    device (torch.device): The device to run the model on.
    torch_dtype (torch.dtype): The torch data type to use.
    processor (AutoProcessor): The processor for the model.
    model (AutoModelForVision2Seq): The model for the OpenVLA backend.

---
## __init__
```python
from vision2seq_backend import __init__
```



---
## predict
```python
from vision2seq_backend import predict
```



---
## __name__
```python
from anthropic_backend import __name__
```



---
## AnthropicSerializer
```python
from anthropic_backend import AnthropicSerializer
```

Serializer for Anthropic-specific data formats.

---
## AnthropicBackend
```python
from anthropic_backend import AnthropicBackend
```

Backend for interacting with Anthropic's API.

Attributes:
    api_key: The API key for the Anthropic service.
    client: The client for the Anthropic service.
    serialized: The serializer for Anthropic-specific data formats.

---
## serialize_image
```python
from anthropic_backend import serialize_image
```

Serializes an image to the Anthropic format.

Args:
    image: The image to be serialized.

Returns:
    A dictionary representing the serialized image.

---
## serialize_text
```python
from anthropic_backend import serialize_text
```

Serializes a text string to the Anthropic format.

Args:
    text: The text to be serialized.

Returns:
    A dictionary representing the serialized text.

---
## __init__
```python
from anthropic_backend import __init__
```

Initializes the AnthropicBackend with the given API key and client.

Args:
    api_key: The API key for the Anthropic service.
    client: An optional client for the Anthropic service.
    kwargs: Additional keyword arguments.

---
## predict
```python
from anthropic_backend import predict
```

Creates a completion for the given messages using the Anthropic API.

Args:
    message: the message to be sent to the completion API.
    context: The context for the completion.
    model: The model to be used for the completion.
    **kwargs: Additional keyword arguments.

Returns:
    str: The content of the completion response.

---
## validate_model
```python
from serializer import validate_model
```

Validates the 'wrapped' field of the model.

Args:
    values: A dictionary of field values to validate.

Returns:
    The validated values dictionary.

Raises:
    ValueError: If the 'wrapped' field contains an invalid type.

---
## serialize_sample
```python
from serializer import serialize_sample
```

Serializes a given sample.

Args:
    sample: The sample to be serialized.

Returns:
    A dictionary representing the serialized sample.

---
## serialize_msg
```python
from serializer import serialize_msg
```

Serializes a Message instance.

Args:
    message: The Message to be serialized.

Returns:
    A dictionary representing the serialized Message.

---
## serialize_image
```python
from serializer import serialize_image
```

Serializes an Image instance.

Args:
    image: The Image to be serialized.

Returns:
    A dictionary representing the serialized Image.

---
## serialize_text
```python
from serializer import serialize_text
```

Serializes a text string.

Args:
    text: The text to be serialized.

Returns:
    A dictionary representing the serialized text.

---
## __call__
```python
from serializer import __call__
```

Calls the serialize method.

Returns:
    A dictionary representing the serialized wrapped content.

---
## __name__
```python
from openai_backend import __name__
```



---
## OpenAISerializer
```python
from openai_backend import OpenAISerializer
```

Serializer for OpenAI-specific data formats.

---
## OpenAIBackendMixin
```python
from openai_backend import OpenAIBackendMixin
```

Backend for interacting with OpenAI's API.

Attributes:
    api_key: The API key for the OpenAI service.
    client: The client for the OpenAI service.
    serialized: The serializer for the OpenAI backend.
    response_format: The format for the response.

---
## serialize_image
```python
from openai_backend import serialize_image
```

Serializes an image to the OpenAI format.

Args:
    image: The image to be serialized.

Returns:
    A dictionary representing the serialized image.

---
## serialize_text
```python
from openai_backend import serialize_text
```

Serializes a text string to the OpenAI format.

Args:
    text: The text to be serialized.

Returns:
    A dictionary representing the serialized text.

---
## __init__
```python
from openai_backend import __init__
```

Initializes the OpenAIBackend with the given API key and client.

Args:
    api_key: The API key for the OpenAI service.
    client: An optional client for the OpenAI service.
    response_format: The format for the response.
    aclient: Whether to use the asynchronous client.
    **kwargs: Additional keyword arguments.

---
## predict
```python
from openai_backend import predict
```

Create a completion based on the given message and context.

Args:
    message (Message): The message to process.
    context (Optional[List[Message]]): The context of messages.
    model (Optional[Any]): The model used for processing the messages.
    **kwargs: Additional keyword arguments.

Returns:
    str: The result of the completion.

---
## stream
```python
from openai_backend import stream
```

Streams a completion for the given messages using the OpenAI API standard.

Args:
    message: Message to be sent to the completion API.
    context: The context of the messages.
    model: The model to be used for the completion.
    **kwargs: Additional keyword arguments.

---
## __name__
```python
from gradio_backend import __name__
```



---
## GradioBackend
```python
from gradio_backend import GradioBackend
```

Gradio backend that handles connections to gradio servers.

---
## __init__
```python
from gradio_backend import __init__
```

Initializes the GradioBackend.

Args:
    endpoint: The url of the gradio server.
    **kwargs: The keywrod arguments to pass to the gradio client.

---
## predict
```python
from gradio_backend import predict
```

Forward queries to the gradio api endpoint `predict`.

Args:
    *args: The arguments to pass to the gradio server.
    **kwargs: The keywrod arguments to pass to the gradio server.

---
## submit
```python
from gradio_backend import submit
```

Submit queries asynchronously without need of asyncio.

Args:
    *args: The arguments to pass to the gradio server.
    api_name: The name of the api endpoint to submit the job.
    result_callbacks: The callbacks to apply to the result.
    **kwargs: The keywrod arguments to pass to the gradio server.

Returns:
    Job: Gradio job object.

---
## __name__
```python
from object_detection_agent import __name__
```



---
## ObjectDetectionAgent
```python
from object_detection_agent import ObjectDetectionAgent
```

A object detection agent that uses a remote object detection, i.e. YOLOWorld, Grounding Dino, to detect objects in an image.

---
## __init__
```python
from object_detection_agent import __init__
```



---
## act
```python
from object_detection_agent import act
```

Act based on the prompt and image using the remote object detection server.

Args:
    image (Image): The image to act on.
    objects (list[str] | str): The objects to detect in the image.
    model_type (str): The model type to use for the object detection. Options: "YOLOWorld", "Grounding DINO".
    *args: Variable length argument list.
    api_name (str): The name of the API endpoint to use.
    **kwargs: Arbitrary keyword arguments.

Returns:
    World: The world data with the detected objects.

---
## __name__
```python
from depth_estimation_agent import __name__
```



---
## DepthEstimationAgent
```python
from depth_estimation_agent import DepthEstimationAgent
```

A depth estimation agent that uses a remote depth estimation server to estimate depth from an image.

Examples:
>>> agent = DepthEstimationAgent(model_src="https://api.mbodi.ai/sense/")
>>> result = agent.act(image=Image("resources/xarm.jpeg", size=(224, 224)))

---
## __init__
```python
from depth_estimation_agent import __init__
```



---
## act
```python
from depth_estimation_agent import act
```

Act based on the prompt and image using the remote depth estimation server.

Args:
    image (Image): The image to act on.
    *args: Variable length argument list.
    **kwargs: Arbitrary keyword arguments.

Returns:
    Image: The depth image generated by the agent

---
## __name__
```python
from sensory_agent import __name__
```



---
## SensoryAgent
```python
from sensory_agent import SensoryAgent
```

Abstract base class for sensory agents.

This class provides a template for creating agents that can sense the environment.

Attributes:
    kwargs (dict): Additional arguments to pass to the recorder.

---
## __init__
```python
from sensory_agent import __init__
```

Initialize the agent.

Args:
    **kwargs: Additional arguments to pass to the recorder.

---
## act
```python
from sensory_agent import act
```

Abstract method to define the sensing mechanism of the agent.

Args:
    **kwargs: Additional arguments to pass to the `sense` method.

Returns:
    Sample: The sensory sample created by the agent.

---
## sense
```python
from sensory_agent import sense
```

Generate a SensorReading based on given parameters.

Args:
    **kwargs: Arbitrary keyword arguments for sensory agent to sense on.

Returns:
    SensorReading: A SensorReading object based on the provided arguments.

---
## __name__
```python
from segmentation_agent import __name__
```



---
## SegmentationAgent
```python
from segmentation_agent import SegmentationAgent
```

An image segmentation agent that uses a remote segmentation server to segment objects in an image.

---
## __init__
```python
from segmentation_agent import __init__
```



---
## act
```python
from segmentation_agent import act
```

Perform image segmentation using the remote segmentation server.

Args:
    image (Image): The image to act on.
    input_data (Union[BBox2D, List[BBox2D], PixelCoords]): The input data for segmentation, either a bounding box,
        a list of bounding boxes, or pixel coordinates.
    *args: Variable length argument list.
    api_name (str): The name of the API endpoint to use.
    **kwargs: Arbitrary keyword arguments.

Returns:
    Tuple[Image, np.ndarray]: The segmented image and the masks of the segmented objects.

---
## __name__
```python
from object_pose_estimator_3d import __name__
```



---
## ObjectPoseEstimator3D
```python
from object_pose_estimator_3d import ObjectPoseEstimator3D
```

3D object pose estimation class to interact with a Gradio server for image processing.

Attributes:
    server_url (str): URL of the Gradio server.
    client (Client): Gradio client to interact with the server.

---
## __init__
```python
from object_pose_estimator_3d import __init__
```

Initialize the ObjectPoseEstimator3D with the server URL.

Args:
    server_url (str): The URL of the Gradio server.

---
## save_data
```python
from object_pose_estimator_3d import save_data
```

Save color and depth images as PNG files.

Args:
    color_image_array (np.ndarray): The color image array.
    depth_image_array (np.ndarray): The depth image array.
    color_image_path (str): The path to save the color image.
    depth_image_path (str): The path to save the depth image.
    intrinsic_matrix (np.ndarray): The intrinsic matrix.

Examples:
    >>> color_image = np.zeros((480, 640, 3), dtype=np.uint8)
    >>> depth_image = np.zeros((480, 640), dtype=np.uint16)
    >>> intrinsic_matrix = np.eye(3)
    >>> ObjectPoseEstimator3D.save_data(color_image, depth_image, "color.png", "depth.png", intrinsic_matrix)

---
## act
```python
from object_pose_estimator_3d import act
```

Capture images using the RealSense camera, process them, and send a request to estimate object poses.

Args:
    rgb_image_path (str): Path to the RGB image.
    depth_image_path (str): Path to the depth image.
    camera_intrinsics (List[float] | np.ndarray): Path to the camera intrinsics or the intrinsic matrix.
    distortion_coeffs (Optional[List[float]]): List of distortion coefficients.
    aruco_pose_world_frame (Optional[Pose6D]): Pose of the ArUco marker in the world frame.
    object_classes (Optional[List[str]]): List of object classes.
    confidence_threshold (Optional[float]): Confidence threshold for object detection.
    using_realsense (bool): Whether to use the RealSense camera.

Returns:
    Dict: Result from the Gradio server.

Examples:
    >>> estimator = ObjectPoseEstimator3D()
    >>> result = estimator.act(
    ...     "resources/color_image.png",
    ...     "resources/depth_image.png",
    ...     [911, 911, 653, 371],
    ...     [0.0, 0.0, 0.0, 0.0, 0.0],
    ...     [0.0, 0.2032, 0.0, -90, 0, -90],
    ...     ["Remote Control", "Basket", "Fork", "Spoon", "Red Marker"],
    ...     0.5,
    ...     False,
    ... )

---
## __name__
```python
from language_agent import __name__
```

Run a LanguageAgent with memory, optional remote acting, and optional automatic dataset creation capabilities.

While it is always recommended to explicitly define your observation and action spaces,
which can be set with a gym.Space object or any python object using the Sample class
(see examples/using_sample.py for a tutorial), you can have the recorder infer the spaces
by setting recorder="default" for automatic dataset recording.

Examples:
    >>> agent = LanguageAgent(context=SYSTEM_PROMPT, model_src=backend, recorder="default")
    >>> agent.act_and_record("pick up the fork", image)

Alternatively, you can define the recorder separately to record the space you want.
For example, to record the dataset with the image and instruction observation and AnswerAndActionsList as action.

Examples:
    >>> observation_space = spaces.Dict({"image": Image(size=(224, 224)).space(), "instruction": spaces.Text(1000)})
    >>> action_space = AnswerAndActionsList(actions=[HandControl()] * 6).space()
    >>> recorder = Recorder(
    ...     'example_recorder',
    ...     out_dir='saved_datasets',
    ...     observation_space=observation_space,
    ...     action_space=action_space

To record the dataset, you can use the record method of the recorder object.

Examples:
    >>> recorder.record(
    ...     observation={
    ...         "image": image,
    ...         "instruction": instruction,
    ...     },
    ...     action=answer_actions,
    ... )

---
## Reminder
```python
from language_agent import Reminder
```

A reminder to show the agent a prompt every n messages.

---
## make_context_list
```python
from language_agent import make_context_list
```

Convert the context to a list of messages.

---
## LanguageAgent
```python
from language_agent import LanguageAgent
```

An agent that can interact with users using natural language.

This class extends the functionality of a base Agent to handle natural language interactions. It manages memory, dataset-recording, and asynchronous remote inference, supporting multiple platforms including OpenAI, Anthropic, and Gradio.

Attributes:
    reminders (List[Reminder]): A list of reminders that prompt the agent every n messages.
    context (List[Message]): The current context of the conversation.
    Inherits all attributes from the parent class `Agent`.

Examples:
    Basic usage with OpenAI:
        >>> cognitive_agent = LanguageAgent(api_key="...", model_src="openai", recorder="default")
        >>> cognitive_agent.act("your instruction", image)

    Automatically act and record to dataset:
        >>> cognitive_agent.act_and_record("your instruction", image)

    Stream the response:
        >>> for chunk in cognitive_agent.act_and_stream("your instruction", image):
        ...     print(chunk)

To use vLLM:
```python
agent = LanguageAgent(
    context=context,
    model_src="openai",
    model_kwargs={"api_key": "EMPTY", "base_url": "http://1.2.3.4:1234/v1"},
)
response = agent.act("Hello, how are you?", model="mistralai/Mistral-7B-Instruct-v0.3")
```

To use ollama:
```python
agent = LanguageAgent(
    context="You are a robot agent.",
    model_src="ollama",
    model_kwargs={"endpoint": "http://localhost:11434/api/chat"},
)
response = agent.act("Hello, how are you?", model="llama3.1")
```

---
## main
```python
from language_agent import main
```



---
## __iter__
```python
from language_agent import __iter__
```



---
## __getitem__
```python
from language_agent import __getitem__
```



---
## __init__
```python
from language_agent import __init__
```

Agent with memory,  asynchronous remote acting, and automatic dataset recording.

 Additionally supports asynchronous remote inference,
    supporting multiple platforms including OpenAI, Anthropic, vLLM, Gradio, and Ollama.

Args:
    model_src: The source of the model to use for inference. It can be one of the following:
        - "openai": Use the OpenAI backend (or vLLM).
        - "anthropic": Use the Anthropic backend.
        - "gradio": Use the Gradio backend.
        - "ollama": Use the Ollama backend.
        - "http": Use a custom HTTP API backend.
        - AnyUrl: A URL pointing to the model source.
        - FilePath: A local path to the model's weights.
        - DirectoryPath: A local directory containing the model's weights.
        - NewPath: A new path object representing the model source.
    context (Union[list, Image, str, Message], optional): The starting context to use for the conversation.
            It can be a list of messages, an image, a string, or a message.
            If a string is provided, it will be interpreted as a user message. Defaults to None.
    api_key (str, optional): The API key to use for the remote actor (if applicable).
         Defaults to the value of the OPENAI_API_KEY environment variable.
    model_kwargs (dict, optional): Additional keyword arguments to pass to the model source. Can be overidden at act time.
        See the documentation of the specific backend for more details. Defaults to None.
    recorder (Union[str, Literal["default", "omit"]], optional):
        The recorder configuration or name or action. Defaults to "omit".
    recorder_kwargs (dict, optional): Additional keyword arguments to pass to the recorder. Defaults to None.

---
## forget_last
```python
from language_agent import forget_last
```

Forget the last message in the context.

---
## forget_after
```python
from language_agent import forget_after
```

Forget after the first n messages in the context.

Args:
    first_n: The number of messages to keep.

---
## forget
```python
from language_agent import forget
```

Forget the last n messages in the context.

Args:
    everything: Whether to forget everything.
    last_n: The number of messages to forget.

---
## history
```python
from language_agent import history
```

Return the conversation history.

---
## remind_every
```python
from language_agent import remind_every
```

Remind the agent of the prompt every n messages.

Args:
    prompt: The prompt to remind the agent of.
    n: The frequency of the reminder.

---
## _check_for_reminders
```python
from language_agent import _check_for_reminders
```

Check if there are any reminders to show.

---
## act_and_parse
```python
from language_agent import act_and_parse
```

Responds to the given instruction, image, and context and parses the response into a Sample object.

Args:
    instruction: The instruction to be processed.
    image: The image to be processed.
    parse_target: The target type to parse the response into.
    context: Additonal context to include in the response. If context is a list of messages, it will be interpreted
        as new memory.
    model: The model to use for the response.
    max_retries: The maximum number of retries to parse the response.
    record: Whether to record the interaction for training.
    **kwargs: Additional keyword arguments.

---
## prepare_inputs
```python
from language_agent import prepare_inputs
```

Helper method to prepare the inputs for the agent.

Args:
    instruction: The instruction to be processed.
    image: The image to be processed.
    context: Additonal context to include in the response. If context is a list of messages, it will be interpreted
        as new memory.

---
## postprocess_response
```python
from language_agent import postprocess_response
```

Postprocess the response.

---
## act
```python
from language_agent import act
```

Responds to the given instruction, image, and context.

Uses the given instruction and image to perform an action.

Args:
    instruction: The instruction to be processed.
    image: The image to be processed.
    context: Additonal context to include in the response. If context is a list of messages, it will be interpreted
        as new memory.
    model: The model to use for the response.
    **kwargs: Additional keyword arguments.

Returns:
    str: The response to the instruction.

Examples:
    >>> agent.act("Hello, world!", Image("scene.jpeg"))
    "Hello! What can I do for you today?"
    >>> agent.act("Return a plan to pickup the object as a python list.", Image("scene.jpeg"))
    "['Move left arm to the object', 'Move right arm to the object']"

---
## act_and_stream
```python
from language_agent import act_and_stream
```

Responds to the given instruction, image, and context and streams the response.

---
## __name__
```python
from openvla_agent import __name__
```



---
## OpenVlaAgent
```python
from openvla_agent import OpenVlaAgent
```

OpenVLA agent to generate robot actions.

Specify gradio server endpoint in model_src to make inference via API.
See openvla_example_server.py for the an exmaple of the gradio server code.

`actor` is a gradio server taking: image, instruction, and unnorm_key as input.

Examples:
    >>> openvla_agent = OpenVlaAgent(model_src="https://api.mbodi.ai/community-models/")
    >>> openvla.act("move hand forward", Image(size=(224, 224)))
    HandControl(pose=Pose6D(x=1,y=2,z=3,roll=0,pitch=0,yaw=0), grasp=JointControl(value=0))

---
## __init__
```python
from openvla_agent import __init__
```



---
## act
```python
from openvla_agent import act
```

Act based on the instruction and image using the remote server.

Args:
    instruction (str): The instruction to act on.
    image (Image): The image to act on.
    unnorm_key (str): The key for the unnormalized image.

Returns:
    Motion: The HandControl generated by the agent.

---
## __name__
```python
from motor_agent import __name__
```



---
## MotorAgent
```python
from motor_agent import MotorAgent
```

Abstract base class for motor agents.

Subclassed from Agent, thus possessing the ability to make remote calls, etc.

---
## act
```python
from motor_agent import act
```

Generate a Motion based on given parameters.

Args:
    **kwargs: Arbitrary keyword arguments for motor agent to act on.

Returns:
    Motion: A Motion object based on the provided arguments.

---
## __name__
```python
from audio_agent import __name__
```



---
## AudioAgent
```python
from audio_agent import AudioAgent
```

Handles audio recording, playback, and speech-to-text transcription.

This module uses OpenAI's API to transcribe audio input and synthesize speech.
Set Environment Variable NO_AUDIO=1 to disable audio recording and playback.
It will then take input from the terminal.

Usage:
```python
audio_agent = AudioAgent(api_key="your-openai-api-key", use_pyaudio=False)
audio_agent.speak("How can I help you?")
message = audio_agent.listen()
```

---
## __init__
```python
from audio_agent import __init__
```

Initializes the AudioAgent with specified parameters.

Args:
    listen_filename: The filename for storing recorded audio.
    tmp_speak_filename: The filename for storing synthesized speech.
    use_pyaudio: Whether to use PyAudio for playback. Prefer setting to False for Mac.
    api_key: The API key for OpenAI.
    run_local: Whether to run the whisper model locally instead of using OpenAI.

---
## act
```python
from audio_agent import act
```



---
## listen
```python
from audio_agent import listen
```

Listens for audio input and transcribes it using OpenAI's API.

Args:
    keep_audio: Whether to keep the recorded audio file.
    mode: The mode of input (speak, type, speak_or_type).

Returns:
    The transcribed text from the audio input.

---
## record_audio
```python
from audio_agent import record_audio
```

Records audio from the microphone and saves it to a file.

---
## speak
```python
from audio_agent import speak
```

Synthesizes speech from text using OpenAI's API and plays it back.

Args:
    message: The text message to synthesize.
    voice: The voice model to use for synthesis.
    api_key: The API key for OpenAI.

---
## play_audio
```python
from audio_agent import play_audio
```

Plays an audio file.

Args:
    filename: The filename of the audio file to play.

---
## __name__
```python
from test_jsonschema_specifications import __name__
```



---
## test_it_contains_metaschemas
```python
from test_jsonschema_specifications import test_it_contains_metaschemas
```



---
## test_it_is_crawled
```python
from test_jsonschema_specifications import test_it_is_crawled
```



---
## test_it_copes_with_dotfiles
```python
from test_jsonschema_specifications import test_it_copes_with_dotfiles
```

Ignore files like .DS_Store if someone has actually caused one to exist.

We test here through the private interface as of course the global has
already loaded our schemas.

---
## __name__
```python
from _hypothesis_plugin import __name__
```

Register Hypothesis strategies for Pydantic custom types.

This enables fully-automatic generation of test data for most Pydantic classes.

Note that this module has *no* runtime impact on Pydantic itself; instead it
is registered as a setuptools entry point and Hypothesis will import it if
Pydantic is installed.  See also:

https://hypothesis.readthedocs.io/en/latest/strategies.html#registering-strategies-via-setuptools-entry-points
https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.register_type_strategy
https://hypothesis.readthedocs.io/en/latest/strategies.html#interaction-with-pytest-cov
https://docs.pydantic.dev/usage/types/#pydantic-types

Note that because our motivation is to *improve user experience*, the strategies
are always sound (never generate invalid data) but sacrifice completeness for
maintainability (ie may be unable to generate some tricky but valid data).

Finally, this module makes liberal use of `# type: ignore[<code>]` pragmas.
This is because Hypothesis annotates `register_type_strategy()` with
`(T, SearchStrategy[T])`, but in most cases we register e.g. `ConstrainedInt`
to generate instances of the builtin `int` type which match the constraints.

---
## add_luhn_digit
```python
from _hypothesis_plugin import add_luhn_digit
```



---
## _registered
```python
from _hypothesis_plugin import _registered
```



---
## resolves
```python
from _hypothesis_plugin import resolves
```



---
## resolve_json
```python
from _hypothesis_plugin import resolve_json
```



---
## resolve_conbytes
```python
from _hypothesis_plugin import resolve_conbytes
```



---
## resolve_condecimal
```python
from _hypothesis_plugin import resolve_condecimal
```



---
## resolve_confloat
```python
from _hypothesis_plugin import resolve_confloat
```



---
## resolve_conint
```python
from _hypothesis_plugin import resolve_conint
```



---
## resolve_condate
```python
from _hypothesis_plugin import resolve_condate
```



---
## resolve_constr
```python
from _hypothesis_plugin import resolve_constr
```



---
## is_valid_email
```python
from _hypothesis_plugin import is_valid_email
```



---
## inner
```python
from _hypothesis_plugin import inner
```



---
## __modify_schema__
```python
from color import __modify_schema__
```



---
## __get_validators__
```python
from color import __get_validators__
```



---
## Extra
```python
from config import Extra
```



---
## BaseConfig
```python
from config import BaseConfig
```

This class is only retained for backwards compatibility.

!!! Warning "Deprecated"
    BaseConfig is deprecated. Use the [`pydantic.ConfigDict`][pydantic.ConfigDict] instead.

---
## get_config
```python
from config import get_config
```



---
## inherit_config
```python
from config import inherit_config
```



---
## prepare_config
```python
from config import prepare_config
```



---
## SchemaExtraCallable
```python
from config import SchemaExtraCallable
```



---
## get_field_info
```python
from config import get_field_info
```

Get properties of FieldInfo from the `fields` property of the config class.

---
## prepare_field
```python
from config import prepare_field
```

Optional hook to check or modify fields during model creation.

---
## UndefinedType
```python
from fields import UndefinedType
```



---
## ModelField
```python
from fields import ModelField
```



---
## DeferredType
```python
from fields import DeferredType
```

Used to postpone field preparation, while creating recursive generic models.

---
## is_finalvar_with_default_val
```python
from fields import is_finalvar_with_default_val
```



---
## __repr__
```python
from fields import __repr__
```



---
## __copy__
```python
from fields import __copy__
```



---
## __reduce__
```python
from fields import __reduce__
```



---
## __deepcopy__
```python
from fields import __deepcopy__
```



---
## get_constraints
```python
from fields import get_constraints
```

Gets the constraints set on the field by comparing the constraint value with its default value

:return: the constraints set on field_info

---
## update_from_config
```python
from fields import update_from_config
```

Update this FieldInfo based on a dict from get_field_info, only fields which have not been set are dated.

---
## _validate
```python
from fields import _validate
```



---
## _get_field_info
```python
from fields import _get_field_info
```

Get a FieldInfo from a root typing.Annotated annotation, value, or config default.

The FieldInfo may be set in typing.Annotated or the value, but not both. If neither contain
a FieldInfo, a new one will be created using the config.

:param field_name: name of the field for use in error messages
:param annotation: a type hint such as `str` or `Annotated[str, Field(..., min_length=5)]`
:param value: the field's assigned value
:param config: the model's config object
:return: the FieldInfo contained in the `annotation`, the value, or a new one from the config.

---
## infer
```python
from fields import infer
```



---
## set_config
```python
from fields import set_config
```



---
## alt_alias
```python
from fields import alt_alias
```



---
## prepare
```python
from fields import prepare
```

Prepare the field but inspecting self.default, self.type_ etc.

Note: this method is **not** idempotent (because _type_analysis is not idempotent),
e.g. calling it it multiple times may modify the field and configure it incorrectly.

---
## _set_default_and_type
```python
from fields import _set_default_and_type
```

Set the default value, infer the type if needed and check if `None` value is valid.

---
## _type_analysis
```python
from fields import _type_analysis
```



---
## prepare_discriminated_union_sub_fields
```python
from fields import prepare_discriminated_union_sub_fields
```

Prepare the mapping <discriminator key> -> <ModelField> and update `sub_fields`
Note that this process can be aborted if a `ForwardRef` is encountered

---
## _create_sub_type
```python
from fields import _create_sub_type
```



---
## populate_validators
```python
from fields import populate_validators
```

Prepare self.pre_validators, self.validators, and self.post_validators based on self.type_'s  __get_validators__
and class validators. This method should be idempotent, e.g. it should be safe to call multiple times
without mis-configuring the field.

---
## validate
```python
from fields import validate
```



---
## _validate_sequence_like
```python
from fields import _validate_sequence_like
```

Validate sequence-like containers: lists, tuples, sets and generators
Note that large if-else blocks are necessary to enable Cython
optimization, which is why we disable the complexity check above.

---
## _validate_iterable
```python
from fields import _validate_iterable
```

Validate Iterables.

This intentionally doesn't validate values to allow infinite generators.

---
## _validate_tuple
```python
from fields import _validate_tuple
```



---
## _validate_mapping_like
```python
from fields import _validate_mapping_like
```



---
## _get_mapping_value
```python
from fields import _get_mapping_value
```

When type is `Mapping[KT, KV]` (or another unsupported mapping), we try to avoid
coercing to `dict` unwillingly.

---
## _validate_singleton
```python
from fields import _validate_singleton
```



---
## _validate_discriminated_union
```python
from fields import _validate_discriminated_union
```



---
## _apply_validators
```python
from fields import _apply_validators
```



---
## is_complex
```python
from fields import is_complex
```

Whether the field is "complex" eg. env variables should be parsed as JSON.

---
## _type_display
```python
from fields import _type_display
```



---
## ErrorWrapper
```python
from error_wrappers import ErrorWrapper
```



---
## ValidationError
```python
from error_wrappers import ValidationError
```



---
## display_errors
```python
from error_wrappers import display_errors
```



---
## _display_error_loc
```python
from error_wrappers import _display_error_loc
```



---
## _display_error_type_and_ctx
```python
from error_wrappers import _display_error_type_and_ctx
```



---
## flatten_errors
```python
from error_wrappers import flatten_errors
```



---
## error_dict
```python
from error_wrappers import error_dict
```



---
## get_exc_type
```python
from error_wrappers import get_exc_type
```



---
## _get_exc_type
```python
from error_wrappers import _get_exc_type
```



---
## _ErrorDictRequired
```python
from error_wrappers import _ErrorDictRequired
```



---
## ErrorDict
```python
from error_wrappers import ErrorDict
```



---
## __init__
```python
from error_wrappers import __init__
```



---
## loc_tuple
```python
from error_wrappers import loc_tuple
```



---
## __repr_args__
```python
from error_wrappers import __repr_args__
```



---
## errors
```python
from error_wrappers import errors
```



---
## json
```python
from error_wrappers import json
```



---
## __str__
```python
from error_wrappers import __str__
```



---
## validate_arguments
```python
from decorator import validate_arguments
```

Decorator to validate the arguments passed to a function.

---
## ValidatedFunction
```python
from decorator import ValidatedFunction
```



---
## validate
```python
from decorator import validate
```



---
## __init__
```python
from decorator import __init__
```



---
## init_model_instance
```python
from decorator import init_model_instance
```



---
## call
```python
from decorator import call
```



---
## build_values
```python
from decorator import build_values
```



---
## execute
```python
from decorator import execute
```



---
## create_model
```python
from decorator import create_model
```



---
## wrapper_function
```python
from decorator import wrapper_function
```



---
## CustomConfig
```python
from decorator import CustomConfig
```



---
## DecoratorBaseModel
```python
from decorator import DecoratorBaseModel
```



---
## check_args
```python
from decorator import check_args
```



---
## check_kwargs
```python
from decorator import check_kwargs
```



---
## check_positional_only
```python
from decorator import check_positional_only
```



---
## check_duplicate_kwargs
```python
from decorator import check_duplicate_kwargs
```



---
## Config
```python
from decorator import Config
```



---
## str_validator
```python
from validators import str_validator
```



---
## strict_str_validator
```python
from validators import strict_str_validator
```



---
## bytes_validator
```python
from validators import bytes_validator
```



---
## strict_bytes_validator
```python
from validators import strict_bytes_validator
```



---
## bool_validator
```python
from validators import bool_validator
```



---
## int_validator
```python
from validators import int_validator
```



---
## strict_int_validator
```python
from validators import strict_int_validator
```



---
## float_validator
```python
from validators import float_validator
```



---
## strict_float_validator
```python
from validators import strict_float_validator
```



---
## float_finite_validator
```python
from validators import float_finite_validator
```



---
## number_multiple_validator
```python
from validators import number_multiple_validator
```



---
## number_size_validator
```python
from validators import number_size_validator
```



---
## constant_validator
```python
from validators import constant_validator
```

Validate ``const`` fields.

The value provided for a ``const`` field must be equal to the default value
of the field. This is to support the keyword of the same name in JSON
Schema.

---
## anystr_length_validator
```python
from validators import anystr_length_validator
```



---
## anystr_strip_whitespace
```python
from validators import anystr_strip_whitespace
```



---
## anystr_upper
```python
from validators import anystr_upper
```



---
## anystr_lower
```python
from validators import anystr_lower
```



---
## ordered_dict_validator
```python
from validators import ordered_dict_validator
```



---
## dict_validator
```python
from validators import dict_validator
```



---
## list_validator
```python
from validators import list_validator
```



---
## tuple_validator
```python
from validators import tuple_validator
```



---
## set_validator
```python
from validators import set_validator
```



---
## frozenset_validator
```python
from validators import frozenset_validator
```



---
## deque_validator
```python
from validators import deque_validator
```



---
## enum_member_validator
```python
from validators import enum_member_validator
```



---
## uuid_validator
```python
from validators import uuid_validator
```



---
## decimal_validator
```python
from validators import decimal_validator
```



---
## hashable_validator
```python
from validators import hashable_validator
```



---
## ip_v4_address_validator
```python
from validators import ip_v4_address_validator
```



---
## ip_v6_address_validator
```python
from validators import ip_v6_address_validator
```



---
## ip_v4_network_validator
```python
from validators import ip_v4_network_validator
```

Assume IPv4Network initialised with a default ``strict`` argument

See more:
https://docs.python.org/library/ipaddress.html#ipaddress.IPv4Network

---
## ip_v6_network_validator
```python
from validators import ip_v6_network_validator
```

Assume IPv6Network initialised with a default ``strict`` argument

See more:
https://docs.python.org/library/ipaddress.html#ipaddress.IPv6Network

---
## ip_v4_interface_validator
```python
from validators import ip_v4_interface_validator
```



---
## ip_v6_interface_validator
```python
from validators import ip_v6_interface_validator
```



---
## path_validator
```python
from validators import path_validator
```



---
## path_exists_validator
```python
from validators import path_exists_validator
```



---
## callable_validator
```python
from validators import callable_validator
```

Perform a simple check if the value is callable.

Note: complete matching of argument type hints and return types is not performed

---
## enum_validator
```python
from validators import enum_validator
```



---
## int_enum_validator
```python
from validators import int_enum_validator
```



---
## make_literal_validator
```python
from validators import make_literal_validator
```



---
## constr_length_validator
```python
from validators import constr_length_validator
```



---
## constr_strip_whitespace
```python
from validators import constr_strip_whitespace
```



---
## constr_upper
```python
from validators import constr_upper
```



---
## constr_lower
```python
from validators import constr_lower
```



---
## validate_json
```python
from validators import validate_json
```



---
## make_arbitrary_type_validator
```python
from validators import make_arbitrary_type_validator
```



---
## make_class_validator
```python
from validators import make_class_validator
```



---
## any_class_validator
```python
from validators import any_class_validator
```



---
## none_validator
```python
from validators import none_validator
```



---
## pattern_validator
```python
from validators import pattern_validator
```



---
## make_namedtuple_validator
```python
from validators import make_namedtuple_validator
```



---
## make_typeddict_validator
```python
from validators import make_typeddict_validator
```



---
## IfConfig
```python
from validators import IfConfig
```



---
## find_validators
```python
from validators import find_validators
```



---
## literal_validator
```python
from validators import literal_validator
```



---
## arbitrary_type_validator
```python
from validators import arbitrary_type_validator
```



---
## class_validator
```python
from validators import class_validator
```



---
## namedtuple_validator
```python
from validators import namedtuple_validator
```



---
## typeddict_validator
```python
from validators import typeddict_validator
```



---
## check
```python
from validators import check
```



---
## _generate_parsing_type_name
```python
from tools import _generate_parsing_type_name
```



---
## _get_parsing_type
```python
from tools import _get_parsing_type
```



---
## parse_obj_as
```python
from tools import parse_obj_as
```



---
## parse_file_as
```python
from tools import parse_file_as
```



---
## parse_raw_as
```python
from tools import parse_raw_as
```



---
## schema_of
```python
from tools import schema_of
```

Generate a JSON schema (as dict) for the passed model or dynamically generated one.

---
## schema_json_of
```python
from tools import schema_json_of
```

Generate a JSON schema (as JSON) for the passed model or dynamically generated one.

---
## SettingsError
```python
from env_settings import SettingsError
```



---
## BaseSettings
```python
from env_settings import BaseSettings
```

Base class for settings, allowing values to be overridden by environment variables.

This is useful in production for secrets you do not wish to save in code, it plays nicely with docker(-compose),
Heroku and any 12 factor app design.

---
## InitSettingsSource
```python
from env_settings import InitSettingsSource
```



---
## EnvSettingsSource
```python
from env_settings import EnvSettingsSource
```



---
## SecretsSettingsSource
```python
from env_settings import SecretsSettingsSource
```



---
## read_env_file
```python
from env_settings import read_env_file
```



---
## find_case_path
```python
from env_settings import find_case_path
```

Find a file within path's directory matching filename, optionally ignoring case.

---
## __init__
```python
from env_settings import __init__
```



---
## _build_values
```python
from env_settings import _build_values
```



---
## Config
```python
from env_settings import Config
```



---
## __call__
```python
from env_settings import __call__
```

Build fields from "secrets" files.

---
## __repr__
```python
from env_settings import __repr__
```



---
## _read_env_files
```python
from env_settings import _read_env_files
```



---
## field_is_complex
```python
from env_settings import field_is_complex
```

Find out if a field is complex, and if so whether JSON errors should be ignored

---
## explode_env_vars
```python
from env_settings import explode_env_vars
```

Process env_vars and extract the values of keys containing env_nested_delimiter into nested dictionaries.

This is applied to a single field, hence filtering by env_var prefix.

---
## prepare_field
```python
from env_settings import prepare_field
```



---
## customise_sources
```python
from env_settings import customise_sources
```



---
## parse_env_var
```python
from env_settings import parse_env_var
```



---
## parse_mypy_version
```python
from mypy import parse_mypy_version
```



---
## from_orm_callback
```python
from mypy import from_orm_callback
```

Raise an error if orm_mode is not enabled

---
## error_from_orm
```python
from mypy import error_from_orm
```



---
## get_fullname
```python
from mypy import get_fullname
```

Used for compatibility with mypy 0.740; can be dropped once support for 0.740 is dropped.

---
## get_name
```python
from mypy import get_name
```

Used for compatibility with mypy 0.740; can be dropped once support for 0.740 is dropped.

---
## adjust_validator_signatures
```python
from mypy import adjust_validator_signatures
```

When we decorate a function `f` with `pydantic.validator(...), mypy sees
`f` as a regular method taking a `self` instance, even though pydantic
internally wraps `f` with `classmethod` if necessary.

Teach mypy this by marking any function whose outermost decorator is a
`validator()` call as a classmethod.

---
## collect_fields
```python
from mypy import collect_fields
```

Collects the fields for the model, accounting for parent classes

---
## add_construct_method
```python
from mypy import add_construct_method
```

Adds a fully typed `construct` classmethod to the class.

Similar to the fields-aware __init__ method, but always uses the field names (not aliases),
and does not treat settings fields as optional.

---
## get_is_required
```python
from mypy import get_is_required
```

Returns a boolean indicating whether the field defined in `stmt` is a required field.

---
## type_has_implicit_default
```python
from mypy import type_has_implicit_default
```

Returns True if the passed type will be given an implicit default value.

In pydantic v1, this is the case for Optional types and Any (with default value None).

---
## set_values_dict
```python
from mypy import set_values_dict
```



---
## _registered
```python
from types import _registered
```



---
## ConstrainedNumberMeta
```python
from types import ConstrainedNumberMeta
```



---
## ConstrainedInt
```python
from types import ConstrainedInt
```



---
## ConstrainedFloat
```python
from types import ConstrainedFloat
```



---
## ConstrainedBytes
```python
from types import ConstrainedBytes
```



---
## ConstrainedStr
```python
from types import ConstrainedStr
```



---
## ConstrainedSet
```python
from types import ConstrainedSet
```



---
## ConstrainedFrozenSet
```python
from types import ConstrainedFrozenSet
```



---
## ConstrainedList
```python
from types import ConstrainedList
```



---
## ConstrainedDecimal
```python
from types import ConstrainedDecimal
```



---
## JsonWrapper
```python
from types import JsonWrapper
```



---
## JsonMeta
```python
from types import JsonMeta
```



---
## SecretField
```python
from types import SecretField
```

Note: this should be implemented as a generic like `SecretField(ABC, Generic[T])`,
the `__init__()` should be part of the abstract class and the
`get_secret_value()` method should use the generic `T` type.

However Cython doesn't support very well generics at the moment and
the generated code fails to be imported (see
https://github.com/cython/cython/issues/2753).

---
## ConstrainedDate
```python
from types import ConstrainedDate
```



---
## __new__
```python
from types import __new__
```



---
## StrictBool
```python
from types import StrictBool
```

StrictBool to allow for bools which are not type-coerced.

---
## __modify_schema__
```python
from types import __modify_schema__
```



---
## __get_validators__
```python
from types import __get_validators__
```



---
## PositiveInt
```python
from types import PositiveInt
```



---
## NegativeInt
```python
from types import NegativeInt
```



---
## NonPositiveInt
```python
from types import NonPositiveInt
```



---
## NonNegativeInt
```python
from types import NonNegativeInt
```



---
## StrictInt
```python
from types import StrictInt
```



---
## PositiveFloat
```python
from types import PositiveFloat
```



---
## NegativeFloat
```python
from types import NegativeFloat
```



---
## NonPositiveFloat
```python
from types import NonPositiveFloat
```



---
## NonNegativeFloat
```python
from types import NonNegativeFloat
```



---
## StrictFloat
```python
from types import StrictFloat
```



---
## FiniteFloat
```python
from types import FiniteFloat
```



---
## StrictBytes
```python
from types import StrictBytes
```



---
## _get_pattern
```python
from types import _get_pattern
```



---
## StrictStr
```python
from types import StrictStr
```



---
## set_length_validator
```python
from types import set_length_validator
```



---
## frozenset_length_validator
```python
from types import frozenset_length_validator
```



---
## list_length_validator
```python
from types import list_length_validator
```



---
## unique_items_validator
```python
from types import unique_items_validator
```



---
## PyObject
```python
from types import PyObject
```



---
## UUID1
```python
from types import UUID1
```



---
## UUID3
```python
from types import UUID3
```



---
## UUID4
```python
from types import UUID4
```



---
## UUID5
```python
from types import UUID5
```



---
## FilePath
```python
from types import FilePath
```



---
## DirectoryPath
```python
from types import DirectoryPath
```



---
## __getitem__
```python
from types import __getitem__
```



---
## display
```python
from types import display
```



---
## validate_length_for_brand
```python
from types import validate_length_for_brand
```

Validate length based on BIN for major brands:
https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN)

---
## _get_brand
```python
from types import _get_brand
```



---
## Validator
```python
from class_validators import Validator
```



---
## validator
```python
from class_validators import validator
```

Decorate methods on the class indicating that they should be used to validate fields.

Args:
    __field (str): The first field the validator should be called on; this is separate
        from `fields` to ensure an error is raised if you don't pass at least one.
    *fields (str): Additional field(s) the validator should be called on.
    pre (bool, optional): Whether this validator should be called before the standard
        validators (else after). Defaults to False.
    each_item (bool, optional): For complex objects (sets, lists etc.) whether to validate
        individual elements rather than the whole object. Defaults to False.
    always (bool, optional): Whether this method and other validators should be called even if
        the value is missing. Defaults to False.
    check_fields (bool | None, optional): Whether to check that the fields actually exist on the model.
        Defaults to None.
    allow_reuse (bool, optional): Whether to track and raise an error if another validator refers to
        the decorated function. Defaults to False.

Returns:
    Callable: A decorator that can be used to decorate a
        function to be used as a validator.

---
## root_validator
```python
from class_validators import root_validator
```

Decorate methods on a model indicating that they should be used to validate (and perhaps
modify) data either before or after standard model parsing/validation is performed.

Args:
    pre (bool, optional): Whether this validator should be called before the standard
        validators (else after). Defaults to False.
    skip_on_failure (bool, optional): Whether to stop validation and return as soon as a
        failure is encountered. Defaults to False.
    allow_reuse (bool, optional): Whether to track and raise an error if another validator
        refers to the decorated function. Defaults to False.

Returns:
    Any: A decorator that can be used to decorate a function to be used as a root_validator.

---
## _prepare_validator
```python
from class_validators import _prepare_validator
```

Avoid validators with duplicated names since without this, validators can be overwritten silently
which generally isn't the intended behaviour, don't run in ipython (see #312) or if allow_reuse is False.

---
## ValidatorGroup
```python
from class_validators import ValidatorGroup
```



---
## extract_validators
```python
from class_validators import extract_validators
```



---
## extract_root_validators
```python
from class_validators import extract_root_validators
```



---
## inherit_validators
```python
from class_validators import inherit_validators
```



---
## make_generic_validator
```python
from class_validators import make_generic_validator
```

Make a generic function which calls a validator with the right arguments.

Unfortunately other approaches (eg. return a partial of a function that builds the arguments) is slow,
hence this laborious way of doing things.

It's done like this so validators don't all need **kwargs in their signature, eg. any combination of
the arguments "values", "fields" and/or "config" are permitted.

---
## prep_validators
```python
from class_validators import prep_validators
```



---
## _generic_validator_cls
```python
from class_validators import _generic_validator_cls
```



---
## _generic_validator_basic
```python
from class_validators import _generic_validator_basic
```



---
## gather_all_validators
```python
from class_validators import gather_all_validators
```



---
## __init__
```python
from class_validators import __init__
```



---
## dec
```python
from class_validators import dec
```



---
## get_validators
```python
from class_validators import get_validators
```



---
## check_for_unused
```python
from class_validators import check_for_unused
```



---
## url_regex
```python
from networks import url_regex
```



---
## multi_host_url_regex
```python
from networks import multi_host_url_regex
```

Compiled multi host url regex.

Additionally to `url_regex` it allows to match multiple hosts.
E.g. host1.db.net,host2.db.net

---
## ascii_domain_regex
```python
from networks import ascii_domain_regex
```



---
## int_domain_regex
```python
from networks import int_domain_regex
```



---
## host_regex
```python
from networks import host_regex
```



---
## AnyUrl
```python
from networks import AnyUrl
```



---
## AnyHttpUrl
```python
from networks import AnyHttpUrl
```



---
## HttpUrl
```python
from networks import HttpUrl
```



---
## FileUrl
```python
from networks import FileUrl
```



---
## MultiHostDsn
```python
from networks import MultiHostDsn
```



---
## PostgresDsn
```python
from networks import PostgresDsn
```



---
## CockroachDsn
```python
from networks import CockroachDsn
```



---
## AmqpDsn
```python
from networks import AmqpDsn
```



---
## RedisDsn
```python
from networks import RedisDsn
```



---
## MongoDsn
```python
from networks import MongoDsn
```



---
## KafkaDsn
```python
from networks import KafkaDsn
```



---
## stricturl
```python
from networks import stricturl
```



---
## Parts
```python
from networks import Parts
```



---
## HostParts
```python
from networks import HostParts
```



---
## build
```python
from networks import build
```



---
## __modify_schema__
```python
from networks import __modify_schema__
```



---
## __get_validators__
```python
from networks import __get_validators__
```



---
## validate
```python
from networks import validate
```



---
## _build_url
```python
from networks import _build_url
```



---
## _match_url
```python
from networks import _match_url
```



---
## _validate_port
```python
from networks import _validate_port
```



---
## validate_parts
```python
from networks import validate_parts
```



---
## validate_host
```python
from networks import validate_host
```



---
## get_default_parts
```python
from networks import get_default_parts
```



---
## apply_default_parts
```python
from networks import apply_default_parts
```



---
## __repr__
```python
from networks import __repr__
```



---
## truncate
```python
from utils import truncate
```

Truncate a value and add a unicode ellipsis (three dots) to the end if it was too long

---
## sequence_like
```python
from utils import sequence_like
```



---
## validate_field_name
```python
from utils import validate_field_name
```

Ensure that the field's name does not shadow an existing attribute of the model.

---
## lenient_isinstance
```python
from utils import lenient_isinstance
```



---
## lenient_issubclass
```python
from utils import lenient_issubclass
```



---
## in_ipython
```python
from utils import in_ipython
```

Check whether we're in an ipython environment, including jupyter notebooks.

---
## is_valid_identifier
```python
from utils import is_valid_identifier
```

Checks that a string is a valid identifier and not a Python keyword.
:param identifier: The identifier to test.
:return: True if the identifier is valid.

---
## deep_update
```python
from utils import deep_update
```



---
## update_not_none
```python
from utils import update_not_none
```



---
## almost_equal_floats
```python
from utils import almost_equal_floats
```

Return True if two floats are almost equal

---
## generate_model_signature
```python
from utils import generate_model_signature
```

Generate signature for model based on its fields

---
## get_model
```python
from utils import get_model
```



---
## to_camel
```python
from utils import to_camel
```



---
## to_lower_camel
```python
from utils import to_lower_camel
```



---
## unique_list
```python
from utils import unique_list
```

Make a list unique while maintaining order.
We update the list if another one with the same name is set
(e.g. root validator overridden in subclass)

---
## PyObjectStr
```python
from utils import PyObjectStr
```

String class where repr doesn't include quotes. Useful with Representation when you want to return a string
representation of something that valid (or pseudo-valid) python.

---
## Representation
```python
from utils import Representation
```

Mixin to provide __str__, __repr__, and __pretty__ methods. See #884 for more details.

__pretty__ is used by [devtools](https://python-devtools.helpmanual.io/) to provide human readable representations
of objects.

---
## GetterDict
```python
from utils import GetterDict
```

Hack to make object's smell just enough like dicts for validate_model.

We can't inherit from Mapping[str, Any] because it upsets cython so we have to implement all methods ourselves.

---
## ValueItems
```python
from utils import ValueItems
```

Class for more convenient calculation of excluded or included fields on values.

---
## ClassAttribute
```python
from utils import ClassAttribute
```

Hide class attribute from its instances

---
## path_type
```python
from utils import path_type
```

Find out what sort of thing a path is.

---
## smart_deepcopy
```python
from utils import smart_deepcopy
```

Return type as is for immutable built-in types
Use obj.copy() for built-in empty collections
Use copy.deepcopy() for non-empty collections and unknown objects

---
## is_valid_field
```python
from utils import is_valid_field
```



---
## is_valid_private_name
```python
from utils import is_valid_private_name
```



---
## all_identical
```python
from utils import all_identical
```

Check that the items of `left` are the same objects as those in `right`.

>>> a, b = object(), object()
>>> all_identical([a, b, a], [a, b, a])
True
>>> all_identical([a, b, [a]], [a, b, [a]])  # new list object, while "equal" is not "identical"
False

---
## assert_never
```python
from utils import assert_never
```

Helper to make sure that we have covered all possible types.

This is mostly useful for ``mypy``, docs:
https://mypy.readthedocs.io/en/latest/literal_types.html#exhaustive-checks

---
## get_unique_discriminator_alias
```python
from utils import get_unique_discriminator_alias
```

Validate that all aliases are the same and if that's the case return the alias

---
## get_discriminator_alias_and_values
```python
from utils import get_discriminator_alias_and_values
```

Get alias and all valid values in the `Literal` type of the discriminator field
`tp` can be a `BaseModel` class or directly an `Annotated` `Union` of many.

---
## _get_union_alias_and_all_values
```python
from utils import _get_union_alias_and_all_values
```



---
## __repr_args__
```python
from utils import __repr_args__
```



---
## __repr_name__
```python
from utils import __repr_name__
```



---
## __repr_str__
```python
from utils import __repr_str__
```



---
## __pretty__
```python
from utils import __pretty__
```

Used by devtools (https://python-devtools.helpmanual.io/) to provide a human readable representations of objects

---
## __rich_repr__
```python
from utils import __rich_repr__
```

Get fields for Rich library

---
## extra_keys
```python
from utils import extra_keys
```

We don't want to get any other attributes of obj if the model didn't explicitly ask for them

---
## is_excluded
```python
from utils import is_excluded
```

Check if item is fully excluded.

:param item: key or index of a value

---
## is_included
```python
from utils import is_included
```

Check if value is contained in self._items

:param item: key or index of value

---
## for_element
```python
from utils import for_element
```

:param e: key or index of element on value
:return: raw values for element if self._items is dict and contain needed element

---
## _normalize_indexes
```python
from utils import _normalize_indexes
```

:param items: dict or set of indexes which will be normalized
:param v_length: length of sequence indexes of which will be

>>> self._normalize_indexes({0: True, -2: True, -1: True}, 4)
{0: True, 2: True, 3: True}
>>> self._normalize_indexes({'__all__': True}, 4)
{0: True, 1: True, 2: True, 3: True}

---
## merge
```python
from utils import merge
```

Merge a ``base`` item with an ``override`` item.

Both ``base`` and ``override`` are converted to dictionaries if possible.
Sets are converted to dictionaries with the sets entries as keys and
Ellipsis as values.

Each key-value pair existing in ``base`` is merged with ``override``,
while the rest of the key-value pairs are updated recursively with this function.

Merging takes place based on the "union" of keys if ``intersect`` is
set to ``False`` (default) and on the intersection of keys if
``intersect`` is set to ``True``.

---
## _coerce_items
```python
from utils import _coerce_items
```



---
## _coerce_value
```python
from utils import _coerce_value
```



---
## is_true
```python
from utils import is_true
```



---
## __get__
```python
from utils import __get__
```



---
## __name__
```python
from annotated_types import __name__
```



---
## create_model_from_typeddict
```python
from annotated_types import create_model_from_typeddict
```

Create a `BaseModel` based on the fields of a `TypedDict`.
Since `typing.TypedDict` in Python 3.8 does not store runtime information about optional keys,
we raise an error if this happens (see https://bugs.python.org/issue38834).

---
## create_model_from_namedtuple
```python
from annotated_types import create_model_from_namedtuple
```

Create a `BaseModel` based on the fields of a named tuple.
A named tuple can be created with `typing.NamedTuple` and declared annotations
but also with `collections.namedtuple`, in this case we consider all fields
to have type `Any`.

---
## is_legacy_typeddict
```python
from annotated_types import is_legacy_typeddict
```



---
## cls_kwargs
```python
from errors import cls_kwargs
```

For built-in exceptions like ValueError or TypeError, we need to implement
__reduce__ to override the default behaviour (instead of __getstate__/__setstate__)
By default pickle protocol 2 calls `cls.__new__(cls, *args)`.
Since we only use kwargs, we need a little constructor to change that.
Note: the callable can't be a lambda as pickle looks in the namespace to find it

---
## PydanticTypeError
```python
from errors import PydanticTypeError
```



---
## PydanticValueError
```python
from errors import PydanticValueError
```



---
## MissingError
```python
from errors import MissingError
```



---
## ExtraError
```python
from errors import ExtraError
```



---
## NoneIsNotAllowedError
```python
from errors import NoneIsNotAllowedError
```



---
## NoneIsAllowedError
```python
from errors import NoneIsAllowedError
```



---
## WrongConstantError
```python
from errors import WrongConstantError
```



---
## NotNoneError
```python
from errors import NotNoneError
```



---
## BoolError
```python
from errors import BoolError
```



---
## BytesError
```python
from errors import BytesError
```



---
## DictError
```python
from errors import DictError
```



---
## EmailError
```python
from errors import EmailError
```



---
## UrlError
```python
from errors import UrlError
```



---
## UrlSchemeError
```python
from errors import UrlSchemeError
```



---
## UrlSchemePermittedError
```python
from errors import UrlSchemePermittedError
```



---
## UrlUserInfoError
```python
from errors import UrlUserInfoError
```



---
## UrlHostError
```python
from errors import UrlHostError
```



---
## UrlHostTldError
```python
from errors import UrlHostTldError
```



---
## UrlPortError
```python
from errors import UrlPortError
```



---
## UrlExtraError
```python
from errors import UrlExtraError
```



---
## EnumMemberError
```python
from errors import EnumMemberError
```



---
## IntegerError
```python
from errors import IntegerError
```



---
## FloatError
```python
from errors import FloatError
```



---
## PathError
```python
from errors import PathError
```



---
## _PathValueError
```python
from errors import _PathValueError
```



---
## PathNotExistsError
```python
from errors import PathNotExistsError
```



---
## PathNotAFileError
```python
from errors import PathNotAFileError
```



---
## PathNotADirectoryError
```python
from errors import PathNotADirectoryError
```



---
## PyObjectError
```python
from errors import PyObjectError
```



---
## SequenceError
```python
from errors import SequenceError
```



---
## IterableError
```python
from errors import IterableError
```



---
## ListError
```python
from errors import ListError
```



---
## SetError
```python
from errors import SetError
```



---
## FrozenSetError
```python
from errors import FrozenSetError
```



---
## DequeError
```python
from errors import DequeError
```



---
## TupleError
```python
from errors import TupleError
```



---
## TupleLengthError
```python
from errors import TupleLengthError
```



---
## ListMinLengthError
```python
from errors import ListMinLengthError
```



---
## ListMaxLengthError
```python
from errors import ListMaxLengthError
```



---
## ListUniqueItemsError
```python
from errors import ListUniqueItemsError
```



---
## SetMinLengthError
```python
from errors import SetMinLengthError
```



---
## SetMaxLengthError
```python
from errors import SetMaxLengthError
```



---
## FrozenSetMinLengthError
```python
from errors import FrozenSetMinLengthError
```



---
## FrozenSetMaxLengthError
```python
from errors import FrozenSetMaxLengthError
```



---
## AnyStrMinLengthError
```python
from errors import AnyStrMinLengthError
```



---
## AnyStrMaxLengthError
```python
from errors import AnyStrMaxLengthError
```



---
## StrError
```python
from errors import StrError
```



---
## StrRegexError
```python
from errors import StrRegexError
```



---
## _NumberBoundError
```python
from errors import _NumberBoundError
```



---
## NumberNotGtError
```python
from errors import NumberNotGtError
```



---
## NumberNotGeError
```python
from errors import NumberNotGeError
```



---
## NumberNotLtError
```python
from errors import NumberNotLtError
```



---
## NumberNotLeError
```python
from errors import NumberNotLeError
```



---
## NumberNotFiniteError
```python
from errors import NumberNotFiniteError
```



---
## NumberNotMultipleError
```python
from errors import NumberNotMultipleError
```



---
## DecimalError
```python
from errors import DecimalError
```



---
## DecimalIsNotFiniteError
```python
from errors import DecimalIsNotFiniteError
```



---
## DecimalMaxDigitsError
```python
from errors import DecimalMaxDigitsError
```



---
## DecimalMaxPlacesError
```python
from errors import DecimalMaxPlacesError
```



---
## DecimalWholeDigitsError
```python
from errors import DecimalWholeDigitsError
```



---
## DateTimeError
```python
from errors import DateTimeError
```



---
## DateError
```python
from errors import DateError
```



---
## DateNotInThePastError
```python
from errors import DateNotInThePastError
```



---
## DateNotInTheFutureError
```python
from errors import DateNotInTheFutureError
```



---
## TimeError
```python
from errors import TimeError
```



---
## DurationError
```python
from errors import DurationError
```



---
## HashableError
```python
from errors import HashableError
```



---
## UUIDError
```python
from errors import UUIDError
```



---
## UUIDVersionError
```python
from errors import UUIDVersionError
```



---
## ArbitraryTypeError
```python
from errors import ArbitraryTypeError
```



---
## ClassError
```python
from errors import ClassError
```



---
## SubclassError
```python
from errors import SubclassError
```



---
## JsonError
```python
from errors import JsonError
```



---
## JsonTypeError
```python
from errors import JsonTypeError
```



---
## PatternError
```python
from errors import PatternError
```



---
## DataclassTypeError
```python
from errors import DataclassTypeError
```



---
## CallableError
```python
from errors import CallableError
```



---
## EnumError
```python
from errors import EnumError
```



---
## IntEnumError
```python
from errors import IntEnumError
```



---
## IPvAnyAddressError
```python
from errors import IPvAnyAddressError
```



---
## IPvAnyInterfaceError
```python
from errors import IPvAnyInterfaceError
```



---
## IPvAnyNetworkError
```python
from errors import IPvAnyNetworkError
```



---
## IPv4AddressError
```python
from errors import IPv4AddressError
```



---
## IPv6AddressError
```python
from errors import IPv6AddressError
```



---
## IPv4NetworkError
```python
from errors import IPv4NetworkError
```



---
## IPv6NetworkError
```python
from errors import IPv6NetworkError
```



---
## IPv4InterfaceError
```python
from errors import IPv4InterfaceError
```



---
## IPv6InterfaceError
```python
from errors import IPv6InterfaceError
```



---
## ColorError
```python
from errors import ColorError
```



---
## StrictBoolError
```python
from errors import StrictBoolError
```



---
## NotDigitError
```python
from errors import NotDigitError
```



---
## LuhnValidationError
```python
from errors import LuhnValidationError
```



---
## InvalidLengthForBrand
```python
from errors import InvalidLengthForBrand
```



---
## InvalidByteSize
```python
from errors import InvalidByteSize
```



---
## InvalidByteSizeUnit
```python
from errors import InvalidByteSizeUnit
```



---
## MissingDiscriminator
```python
from errors import MissingDiscriminator
```



---
## InvalidDiscriminator
```python
from errors import InvalidDiscriminator
```



---
## __reduce__
```python
from errors import __reduce__
```



---
## set_validation
```python
from dataclasses import set_validation
```



---
## DataclassProxy
```python
from dataclasses import DataclassProxy
```



---
## _add_pydantic_validation_attributes
```python
from dataclasses import _add_pydantic_validation_attributes
```

We need to replace the right method. If no `__post_init__` has been set in the stdlib dataclass
it won't even exist (code is generated on the fly by `dataclasses`)
By default, we run validation after `__init__` or `__post_init__` if defined

---
## _get_validators
```python
from dataclasses import _get_validators
```



---
## _validate_dataclass
```python
from dataclasses import _validate_dataclass
```



---
## create_pydantic_model_from_dataclass
```python
from dataclasses import create_pydantic_model_from_dataclass
```



---
## _dataclass_validate_values
```python
from dataclasses import _dataclass_validate_values
```



---
## _dataclass_validate_assignment_setattr
```python
from dataclasses import _dataclass_validate_assignment_setattr
```



---
## is_builtin_dataclass
```python
from dataclasses import is_builtin_dataclass
```

Whether a class is a stdlib dataclass
(useful to discriminated a pydantic dataclass that is actually a wrapper around a stdlib dataclass)

we check that
- `_cls` is a dataclass
- `_cls` is not a processed pydantic dataclass (with a basemodel attached)
- `_cls` is not a pydantic dataclass inheriting directly from a stdlib dataclass
e.g.
```
@dataclasses.dataclass
class A:
    x: int

@pydantic.dataclasses.dataclass
class B(A):
    y: int
```
In this case, when we first check `B`, we make an extra check and look at the annotations ('y'),
which won't be a superset of all the dataclass fields (only the stdlib fields i.e. 'x')

---
## make_dataclass_validator
```python
from dataclasses import make_dataclass_validator
```

Create a pydantic.dataclass from a builtin dataclass to add type validation
and yield the validators
It retrieves the parameters of the dataclass and forwards them to the newly created dataclass

---
## Dataclass
```python
from dataclasses import Dataclass
```



---
## wrap
```python
from dataclasses import wrap
```



---
## __call__
```python
from dataclasses import __call__
```



---
## __getattr__
```python
from dataclasses import __getattr__
```



---
## __setattr__
```python
from dataclasses import __setattr__
```



---
## __instancecheck__
```python
from dataclasses import __instancecheck__
```



---
## __copy__
```python
from dataclasses import __copy__
```



---
## __deepcopy__
```python
from dataclasses import __deepcopy__
```



---
## handle_extra_init
```python
from dataclasses import handle_extra_init
```



---
## _is_field_cached_property
```python
from dataclasses import _is_field_cached_property
```



---
## __get_validators__
```python
from dataclasses import __get_validators__
```



---
## __validate__
```python
from dataclasses import __validate__
```



---
## new_post_init
```python
from dataclasses import new_post_init
```



---
## new_init
```python
from dataclasses import new_init
```



---
## Protocol
```python
from parse import Protocol
```



---
## load_str_bytes
```python
from parse import load_str_bytes
```



---
## load_file
```python
from parse import load_file
```



---
## display_as_type
```python
from typing import display_as_type
```



---
## resolve_annotations
```python
from typing import resolve_annotations
```

Partially taken from typing.get_type_hints.

Resolve string or ForwardRef annotations into type objects if possible.

---
## is_callable_type
```python
from typing import is_callable_type
```



---
## is_literal_type
```python
from typing import is_literal_type
```



---
## literal_values
```python
from typing import literal_values
```



---
## all_literal_values
```python
from typing import all_literal_values
```

This method is used to retrieve all Literal values as
Literal can be used recursively (see https://www.python.org/dev/peps/pep-0586)
e.g. `Literal[Literal[Literal[1, 2, 3], "foo"], 5, None]`

---
## is_namedtuple
```python
from typing import is_namedtuple
```

Check if a given class is a named tuple.
It can be either a `typing.NamedTuple` or `collections.namedtuple`

---
## is_typeddict
```python
from typing import is_typeddict
```

Check if a given class is a typed dict (from `typing` or `typing_extensions`)
In 3.10, there will be a public method (https://docs.python.org/3.10/library/typing.html#typing.is_typeddict)

---
## _check_typeddict_special
```python
from typing import _check_typeddict_special
```



---
## is_typeddict_special
```python
from typing import is_typeddict_special
```

Check if type is a TypedDict special form (Required or NotRequired).

---
## is_new_type
```python
from typing import is_new_type
```

Check whether type_ was created using typing.NewType

---
## new_type_supertype
```python
from typing import new_type_supertype
```



---
## _check_classvar
```python
from typing import _check_classvar
```



---
## _check_finalvar
```python
from typing import _check_finalvar
```

Check if a given type is a `typing.Final` type.

---
## is_classvar
```python
from typing import is_classvar
```



---
## is_finalvar
```python
from typing import is_finalvar
```



---
## update_field_forward_refs
```python
from typing import update_field_forward_refs
```

Try to update ForwardRefs on fields based on this ModelField, globalns and localns.

---
## update_model_forward_refs
```python
from typing import update_model_forward_refs
```

Try to update model fields ForwardRefs based on model and localns.

---
## get_class
```python
from typing import get_class
```

Tries to get the class of a Type[T] annotation. Returns True if Type is used
without brackets. Otherwise returns None.

---
## get_sub_types
```python
from typing import get_sub_types
```

Return all the types that are allowed by type `tp`
`tp` can be a `Union` of allowed types or an `Annotated` type

---
## evaluate_forwardref
```python
from typing import evaluate_forwardref
```



---
## get_all_type_hints
```python
from typing import get_all_type_hints
```



---
## get_origin
```python
from typing import get_origin
```

We can't directly use `typing.get_origin` since we need a fallback to support
custom generic classes like `ConstrainedList`
It should be useless once https://github.com/cython/cython/issues/3537 is
solved and https://github.com/pydantic/pydantic/pull/1753 is merged.

---
## get_args
```python
from typing import get_args
```

Get type arguments with all substitutions performed.

For unions, basic simplifications used by Union constructor are performed.
Examples::
    get_args(Dict[str, int]) == (str, int)
    get_args(int) == ()
    get_args(Union[int, Union[T, int], str][int]) == (int, str)
    get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])
    get_args(Callable[[], T][int]) == ([], int)

---
## _generic_get_args
```python
from typing import _generic_get_args
```

In python 3.9, `typing.Dict`, `typing.List`, ...
do have an empty `__args__` by default (instead of the generic ~T for example).
In order to still support `Dict` for example and consider it as `Dict[Any, Any]`,
we retrieve the `_nparams` value that tells us how many parameters it needs.

---
## convert_generics
```python
from typing import convert_generics
```

Recursively searches for `str` type hints and replaces them with ForwardRef.

Examples::
    convert_generics(list['Hero']) == list[ForwardRef('Hero')]
    convert_generics(dict['Hero', 'Team']) == dict[ForwardRef('Hero'), ForwardRef('Team')]
    convert_generics(typing.Dict['Hero', 'Team']) == typing.Dict[ForwardRef('Hero'), ForwardRef('Team')]
    convert_generics(list[str | 'Hero'] | int) == list[str | ForwardRef('Hero')] | int

---
## is_union
```python
from typing import is_union
```



---
## is_none_type
```python
from typing import is_none_type
```



---
## validate_custom_root_type
```python
from main import validate_custom_root_type
```



---
## generate_hash_function
```python
from main import generate_hash_function
```



---
## ModelMetaclass
```python
from main import ModelMetaclass
```



---
## validate_model
```python
from main import validate_model
```

validate data against a model.

---
## hash_function
```python
from main import hash_function
```



---
## __new__
```python
from main import __new__
```



---
## __instancecheck__
```python
from main import __instancecheck__
```

Avoid calling ABC _abc_subclasscheck unless we're pretty sure.

See #3829 and python/cpython#92810

---
## _init_private_attributes
```python
from main import _init_private_attributes
```



---
## _enforce_dict_if_root
```python
from main import _enforce_dict_if_root
```



---
## __get_validators__
```python
from main import __get_validators__
```



---
## _decompose_class
```python
from main import _decompose_class
```



---
## __try_update_forward_refs__
```python
from main import __try_update_forward_refs__
```

Same as update_forward_refs but will not raise exception
when forward references are not defined.

---
## is_untouched
```python
from main import is_untouched
```



---
## get_numeric
```python
from datetime_parse import get_numeric
```



---
## from_unix_seconds
```python
from datetime_parse import from_unix_seconds
```



---
## _parse_timezone
```python
from datetime_parse import _parse_timezone
```



---
## parse_date
```python
from datetime_parse import parse_date
```

Parse a date/int/float/string and return a datetime.date.

Raise ValueError if the input is well formatted but not a valid date.
Raise ValueError if the input isn't well formatted.

---
## parse_time
```python
from datetime_parse import parse_time
```

Parse a time/string and return a datetime.time.

Raise ValueError if the input is well formatted but not a valid time.
Raise ValueError if the input isn't well formatted, in particular if it contains an offset.

---
## parse_datetime
```python
from datetime_parse import parse_datetime
```

Parse a datetime/int/float/string and return a datetime.datetime.

This function supports time zone offsets. When the input contains one,
the output uses a timezone with a fixed offset from UTC.

Raise ValueError if the input is well formatted but not a valid datetime.
Raise ValueError if the input isn't well formatted.

---
## parse_duration
```python
from datetime_parse import parse_duration
```

Parse a duration int/float/string and return a datetime.timedelta.

The preferred format for durations in Django is '%d %H:%M:%S.%f'.

Also supports ISO 8601 representation.

---
## isoformat
```python
from json import isoformat
```



---
## decimal_encoder
```python
from json import decimal_encoder
```

Encodes a Decimal as int of there's no exponent, otherwise float.

This is useful when we use ConstrainedDecimal to represent Numeric(x,0)
where a integer (but not int typed) is used. Encoding this as a float
results in failed round-tripping between encode and parse.
Our Id type is a prime example of this.

>>> decimal_encoder(Decimal("1.0"))
1.0

>>> decimal_encoder(Decimal("1"))
1

---
## pydantic_encoder
```python
from json import pydantic_encoder
```



---
## custom_pydantic_encoder
```python
from json import custom_pydantic_encoder
```



---
## timedelta_isoformat
```python
from json import timedelta_isoformat
```

ISO 8601 encoding for Python timedelta object.

---
## GenericModel
```python
from generics import GenericModel
```



---
## replace_types
```python
from generics import replace_types
```

Return type with all occurrences of `type_map` keys recursively replaced with their values.

:param type_: Any type, class or generic alias
:param type_map: Mapping from `TypeVar` instance to concrete types.
:return: New type representing the basic structure of `type_` with all
    `typevar_map` keys recursively replaced.

>>> replace_types(Tuple[str, Union[List[str], float]], {str: int})
Tuple[int, Union[List[int], float]]

---
## check_parameters_count
```python
from generics import check_parameters_count
```



---
## iter_contained_typevars
```python
from generics import iter_contained_typevars
```

Recursively iterate through all subtypes and type args of `v` and yield any typevars that are found.

---
## get_caller_frame_info
```python
from generics import get_caller_frame_info
```

Used inside a function to check whether it was called globally

Will only work against non-compiled code, therefore used only in pydantic.generics

:returns Tuple[module_name, called_globally]

---
## _prepare_model_fields
```python
from generics import _prepare_model_fields
```

Replace DeferredType fields with concrete type hints and prepare them.

---
## __class_getitem__
```python
from generics import __class_getitem__
```

Instantiates a new class from a generic class `cls` and type variables `params`.

:param params: Tuple of types the class . Given a generic class
    `Model` with 2 type variables and a concrete model `Model[str, int]`,
    the value `(str, int)` would be passed to `params`.
:return: New model class inheriting from `cls` with instantiated
    types described by `params`. If no parameters are given, `cls` is
    returned as is.

---
## __concrete_name__
```python
from generics import __concrete_name__
```

Compute class name for child classes.

:param params: Tuple of types the class . Given a generic class
    `Model` with 2 type variables and a concrete model `Model[str, int]`,
    the value `(str, int)` would be passed to `params`.
:return: String representing a the new class where `params` are
    passed to `cls` as type variables.

This method can be overridden to achieve a custom naming scheme for GenericModels.

---
## __parameterized_bases__
```python
from generics import __parameterized_bases__
```

Returns unbound bases of cls parameterised to given type variables

:param typevars_map: Dictionary of type applications for binding subclasses.
    Given a generic class `Model` with 2 type variables [S, T]
    and a concrete model `Model[str, int]`,
    the value `{S: str, T: int}` would be passed to `typevars_map`.
:return: an iterator of generic sub classes, parameterised by `typevars_map`
    and other assigned parameters of `cls`

e.g.:
```
class A(GenericModel, Generic[T]):
    ...

class B(A[V], Generic[V]):
    ...

assert A[int] in B.__parameterized_bases__({V: int})
```

---
## _cache_key
```python
from generics import _cache_key
```



---
## build_base_model
```python
from generics import build_base_model
```



---
## _apply_modify_schema
```python
from schema import _apply_modify_schema
```



---
## schema
```python
from schema import schema
```

Process a list of models and generate a single JSON Schema with all of them defined in the ``definitions``
top-level JSON key, including their sub-models.

:param models: a list of models to include in the generated JSON Schema
:param by_alias: generate the schemas using the aliases defined, if any
:param title: title for the generated schema that includes the definitions
:param description: description for the generated schema
:param ref_prefix: the JSON Pointer prefix for schema references with ``$ref``, if None, will be set to the
  default of ``#/definitions/``. Update it if you want the schemas to reference the definitions somewhere
  else, e.g. for OpenAPI use ``#/components/schemas/``. The resulting generated schemas will still be at the
  top-level key ``definitions``, so you can extract them from there. But all the references will have the set
  prefix.
:param ref_template: Use a ``string.format()`` template for ``$ref`` instead of a prefix. This can be useful
  for references that cannot be represented by ``ref_prefix`` such as a definition stored in another file. For
  a sibling json file in a ``/schemas`` directory use ``"/schemas/${model}.json#"``.
:return: dict with the JSON Schema with a ``definitions`` top-level key including the schema definitions for
  the models and sub-models passed in ``models``.

---
## model_schema
```python
from schema import model_schema
```

Generate a JSON Schema for one model. With all the sub-models defined in the ``definitions`` top-level
JSON key.

:param model: a Pydantic model (a class that inherits from BaseModel)
:param by_alias: generate the schemas using the aliases defined, if any
:param ref_prefix: the JSON Pointer prefix for schema references with ``$ref``, if None, will be set to the
  default of ``#/definitions/``. Update it if you want the schemas to reference the definitions somewhere
  else, e.g. for OpenAPI use ``#/components/schemas/``. The resulting generated schemas will still be at the
  top-level key ``definitions``, so you can extract them from there. But all the references will have the set
  prefix.
:param ref_template: Use a ``string.format()`` template for ``$ref`` instead of a prefix. This can be useful for
  references that cannot be represented by ``ref_prefix`` such as a definition stored in another file. For a
  sibling json file in a ``/schemas`` directory use ``"/schemas/${model}.json#"``.
:return: dict with the JSON Schema for the passed ``model``

---
## get_field_info_schema
```python
from schema import get_field_info_schema
```



---
## field_schema
```python
from schema import field_schema
```

Process a Pydantic field and return a tuple with a JSON Schema for it as the first item.
Also return a dictionary of definitions with models as keys and their schemas as values. If the passed field
is a model and has sub-models, and those sub-models don't have overrides (as ``title``, ``default``, etc), they
will be included in the definitions and referenced in the schema instead of included recursively.

:param field: a Pydantic ``ModelField``
:param by_alias: use the defined alias (if any) in the returned schema
:param model_name_map: used to generate the JSON Schema references to other models included in the definitions
:param ref_prefix: the JSON Pointer prefix to use for references to other schemas, if None, the default of
  #/definitions/ will be used
:param ref_template: Use a ``string.format()`` template for ``$ref`` instead of a prefix. This can be useful for
  references that cannot be represented by ``ref_prefix`` such as a definition stored in another file. For a
  sibling json file in a ``/schemas`` directory use ``"/schemas/${model}.json#"``.
:param known_models: used to solve circular references
:return: tuple of the schema for this field and additional definitions

---
## get_field_schema_validations
```python
from schema import get_field_schema_validations
```

Get the JSON Schema validation keywords for a ``field`` with an annotation of
a Pydantic ``FieldInfo`` with validation arguments.

---
## get_model_name_map
```python
from schema import get_model_name_map
```

Process a set of models and generate unique names for them to be used as keys in the JSON Schema
definitions. By default the names are the same as the class name. But if two models in different Python
modules have the same name (e.g. "users.Model" and "items.Model"), the generated names will be
based on the Python module path for those conflicting models to prevent name collisions.

:param unique_models: a Python set of models
:return: dict mapping models to names

---
## get_flat_models_from_model
```python
from schema import get_flat_models_from_model
```

Take a single ``model`` and generate a set with itself and all the sub-models in the tree. I.e. if you pass
model ``Foo`` (subclass of Pydantic ``BaseModel``) as ``model``, and it has a field of type ``Bar`` (also
subclass of ``BaseModel``) and that model ``Bar`` has a field of type ``Baz`` (also subclass of ``BaseModel``),
the return value will be ``set([Foo, Bar, Baz])``.

:param model: a Pydantic ``BaseModel`` subclass
:param known_models: used to solve circular references
:return: a set with the initial model and all its sub-models

---
## get_flat_models_from_field
```python
from schema import get_flat_models_from_field
```

Take a single Pydantic ``ModelField`` (from a model) that could have been declared as a subclass of BaseModel
(so, it could be a submodel), and generate a set with its model and all the sub-models in the tree.
I.e. if you pass a field that was declared to be of type ``Foo`` (subclass of BaseModel) as ``field``, and that
model ``Foo`` has a field of type ``Bar`` (also subclass of ``BaseModel``) and that model ``Bar`` has a field of
type ``Baz`` (also subclass of ``BaseModel``), the return value will be ``set([Foo, Bar, Baz])``.

:param field: a Pydantic ``ModelField``
:param known_models: used to solve circular references
:return: a set with the model used in the declaration for this field, if any, and all its sub-models

---
## get_flat_models_from_fields
```python
from schema import get_flat_models_from_fields
```

Take a list of Pydantic  ``ModelField``s (from a model) that could have been declared as subclasses of ``BaseModel``
(so, any of them could be a submodel), and generate a set with their models and all the sub-models in the tree.
I.e. if you pass a the fields of a model ``Foo`` (subclass of ``BaseModel``) as ``fields``, and on of them has a
field of type ``Bar`` (also subclass of ``BaseModel``) and that model ``Bar`` has a field of type ``Baz`` (also
subclass of ``BaseModel``), the return value will be ``set([Foo, Bar, Baz])``.

:param fields: a list of Pydantic ``ModelField``s
:param known_models: used to solve circular references
:return: a set with any model declared in the fields, and all their sub-models

---
## get_flat_models_from_models
```python
from schema import get_flat_models_from_models
```

Take a list of ``models`` and generate a set with them and all their sub-models in their trees. I.e. if you pass
a list of two models, ``Foo`` and ``Bar``, both subclasses of Pydantic ``BaseModel`` as models, and ``Bar`` has
a field of type ``Baz`` (also subclass of ``BaseModel``), the return value will be ``set([Foo, Bar, Baz])``.

---
## get_long_model_name
```python
from schema import get_long_model_name
```



---
## field_type_schema
```python
from schema import field_type_schema
```

Used by ``field_schema()``, you probably should be using that function.

Take a single ``field`` and generate the schema for its type only, not including additional
information as title, etc. Also return additional schema definitions, from sub-models.

---
## model_process_schema
```python
from schema import model_process_schema
```

Used by ``model_schema()``, you probably should be using that function.

Take a single ``model`` and generate its schema. Also return additional schema definitions, from sub-models. The
sub-models of the returned schema will be referenced, but their definitions will not be included in the schema. All
the definitions are returned as the second value.

---
## model_type_schema
```python
from schema import model_type_schema
```

You probably should be using ``model_schema()``, this function is indirectly used by that function.

Take a single ``model`` and generate the schema for its type only, not including additional
information as title, etc. Also return additional schema definitions, from sub-models.

---
## enum_process_schema
```python
from schema import enum_process_schema
```

Take a single `enum` and generate its schema.

This is similar to the `model_process_schema` function, but applies to ``Enum`` objects.

---
## field_singleton_sub_fields_schema
```python
from schema import field_singleton_sub_fields_schema
```

This function is indirectly used by ``field_schema()``, you probably should be using that function.

Take a list of Pydantic ``ModelField`` from the declaration of a type with parameters, and generate their
schema. I.e., fields used as "type parameters", like ``str`` and ``int`` in ``Tuple[str, int]``.

---
## add_field_type_to_schema
```python
from schema import add_field_type_to_schema
```

Update the given `schema` with the type-specific metadata for the given `field_type`.

This function looks through `field_class_to_schema` for a class that matches the given `field_type`,
and then modifies the given `schema` with the information from that type.

---
## get_schema_ref
```python
from schema import get_schema_ref
```



---
## field_singleton_schema
```python
from schema import field_singleton_schema
```

This function is indirectly used by ``field_schema()``, you should probably be using that function.

Take a single Pydantic ``ModelField``, and return its schema and any additional definitions from sub-models.

---
## multitypes_literal_field_for_schema
```python
from schema import multitypes_literal_field_for_schema
```

To support `Literal` with values of different types, we split it into multiple `Literal` with same type
e.g. `Literal['qwe', 'asd', 1, 2]` becomes `Union[Literal['qwe', 'asd'], Literal[1, 2]]`

---
## encode_default
```python
from schema import encode_default
```



---
## get_annotation_from_field_info
```python
from schema import get_annotation_from_field_info
```

Get an annotation with validation implemented for numbers and strings based on the field_info.
:param annotation: an annotation from a field specification, as ``str``, ``ConstrainedStr``
:param field_info: an instance of FieldInfo, possibly with declarations for validations and JSON Schema
:param field_name: name of the field for use in error messages
:param validate_assignment: default False, flag for BaseModel Config value of validate_assignment
:return: the same ``annotation`` if unmodified or a new annotation with validation in place

---
## get_annotation_with_constraints
```python
from schema import get_annotation_with_constraints
```

Get an annotation with used constraints implemented for numbers and strings based on the field_info.

:param annotation: an annotation from a field specification, as ``str``, ``ConstrainedStr``
:param field_info: an instance of FieldInfo, possibly with declarations for validations and JSON Schema
:return: the same ``annotation`` if unmodified or a new annotation along with the used constraints.

---
## normalize_name
```python
from schema import normalize_name
```

Normalizes the given name. This can be applied to either a model *or* enum.

---
## SkipField
```python
from schema import SkipField
```

Utility exception used to exclude fields from schema.

---
## go
```python
from schema import go
```



---
## constraint_func
```python
from schema import constraint_func
```



---
## __name__
```python
from _schema_generation_shared import __name__
```

Types and utility functions used by various other internal tools.

---
## GenerateJsonSchemaHandler
```python
from _schema_generation_shared import GenerateJsonSchemaHandler
```

JsonSchemaHandler implementation that doesn't do ref unwrapping by default.

This is used for any Annotated metadata so that we don't end up with conflicting
modifications to the definition schema.

Used internally by Pydantic, please do not rely on this implementation.
See `GetJsonSchemaHandler` for the handler API.

---
## CallbackGetCoreSchemaHandler
```python
from _schema_generation_shared import CallbackGetCoreSchemaHandler
```

Wrapper to use an arbitrary function as a `GetCoreSchemaHandler`.

Used internally by Pydantic, please do not rely on this implementation.
See `GetCoreSchemaHandler` for the handler API.

---
## __init__
```python
from _schema_generation_shared import __init__
```



---
## __call__
```python
from _schema_generation_shared import __call__
```



---
## resolve_ref_schema
```python
from _schema_generation_shared import resolve_ref_schema
```

Resolves reference in the core schema.

Args:
    maybe_ref_schema: The input core schema that may contains reference.

Returns:
    Resolved core schema.

Raises:
    LookupError: If it can't find the definition for reference.

---
## _get_types_namespace
```python
from _schema_generation_shared import _get_types_namespace
```



---
## generate_schema
```python
from _schema_generation_shared import generate_schema
```



---
## field_name
```python
from _schema_generation_shared import field_name
```



---
## __name__
```python
from _docs_extraction import __name__
```

Utilities related to attribute docstring extraction.

---
## DocstringVisitor
```python
from _docs_extraction import DocstringVisitor
```



---
## _dedent_source_lines
```python
from _docs_extraction import _dedent_source_lines
```



---
## _extract_source_from_frame
```python
from _docs_extraction import _extract_source_from_frame
```



---
## extract_docstrings_from_cls
```python
from _docs_extraction import extract_docstrings_from_cls
```

Map model attributes and their corresponding docstring.

Args:
    cls: The class of the Pydantic model to inspect.
    use_inspect: Whether to skip usage of frames to find the object and use
        the `inspect` module instead.

Returns:
    A mapping containing attribute names and their corresponding docstring.

---
## __init__
```python
from _docs_extraction import __init__
```



---
## visit
```python
from _docs_extraction import visit
```



---
## visit_AnnAssign
```python
from _docs_extraction import visit_AnnAssign
```



---
## visit_Expr
```python
from _docs_extraction import visit_Expr
```



---
## __name__
```python
from _core_utils import __name__
```



---
## is_core_schema
```python
from _core_utils import is_core_schema
```



---
## is_core_schema_field
```python
from _core_utils import is_core_schema_field
```



---
## is_function_with_inner_schema
```python
from _core_utils import is_function_with_inner_schema
```



---
## is_list_like_schema_with_items_schema
```python
from _core_utils import is_list_like_schema_with_items_schema
```



---
## get_type_ref
```python
from _core_utils import get_type_ref
```

Produces the ref to be used for this type by pydantic_core's core schemas.

This `args_override` argument was added for the purpose of creating valid recursive references
when creating generic models without needing to create a concrete class.

---
## get_ref
```python
from _core_utils import get_ref
```

Get the ref from the schema if it has one.
This exists just for type checking to work correctly.

---
## collect_definitions
```python
from _core_utils import collect_definitions
```



---
## define_expected_missing_refs
```python
from _core_utils import define_expected_missing_refs
```



---
## collect_invalid_schemas
```python
from _core_utils import collect_invalid_schemas
```



---
## _WalkCoreSchema
```python
from _core_utils import _WalkCoreSchema
```



---
## walk_core_schema
```python
from _core_utils import walk_core_schema
```

Recursively traverse a CoreSchema.

Args:
    schema (core_schema.CoreSchema): The CoreSchema to process, it will not be modified.
    f (Walk): A function to apply. This function takes two arguments:
      1. The current CoreSchema that is being processed
         (not the same one you passed into this function, one level down).
      2. The "next" `f` to call. This lets you for example use `f=functools.partial(some_method, some_context)`
         to pass data down the recursive calls without using globals or other mutable state.

Returns:
    core_schema.CoreSchema: A processed CoreSchema.

---
## simplify_schema_references
```python
from _core_utils import simplify_schema_references
```



---
## _strip_metadata
```python
from _core_utils import _strip_metadata
```



---
## pretty_print_core_schema
```python
from _core_utils import pretty_print_core_schema
```

Pretty print a CoreSchema using rich.
This is intended for debugging purposes.

Args:
    schema: The CoreSchema to print.
    include_metadata: Whether to include metadata in the output. Defaults to `False`.

---
## validate_core_schema
```python
from _core_utils import validate_core_schema
```



---
## _record_valid_refs
```python
from _core_utils import _record_valid_refs
```



---
## _is_schema_valid
```python
from _core_utils import _is_schema_valid
```



---
## __init__
```python
from _core_utils import __init__
```



---
## _build_schema_type_to_method
```python
from _core_utils import _build_schema_type_to_method
```



---
## walk
```python
from _core_utils import walk
```



---
## _walk
```python
from _core_utils import _walk
```



---
## _handle_other_schemas
```python
from _core_utils import _handle_other_schemas
```



---
## _handle_ser_schemas
```python
from _core_utils import _handle_ser_schemas
```



---
## handle_definitions_schema
```python
from _core_utils import handle_definitions_schema
```



---
## handle_list_schema
```python
from _core_utils import handle_list_schema
```



---
## handle_set_schema
```python
from _core_utils import handle_set_schema
```



---
## handle_frozenset_schema
```python
from _core_utils import handle_frozenset_schema
```



---
## handle_generator_schema
```python
from _core_utils import handle_generator_schema
```



---
## handle_tuple_schema
```python
from _core_utils import handle_tuple_schema
```



---
## handle_dict_schema
```python
from _core_utils import handle_dict_schema
```



---
## handle_function_schema
```python
from _core_utils import handle_function_schema
```



---
## handle_union_schema
```python
from _core_utils import handle_union_schema
```



---
## handle_tagged_union_schema
```python
from _core_utils import handle_tagged_union_schema
```



---
## handle_chain_schema
```python
from _core_utils import handle_chain_schema
```



---
## handle_lax_or_strict_schema
```python
from _core_utils import handle_lax_or_strict_schema
```



---
## handle_json_or_python_schema
```python
from _core_utils import handle_json_or_python_schema
```



---
## handle_model_fields_schema
```python
from _core_utils import handle_model_fields_schema
```



---
## handle_typed_dict_schema
```python
from _core_utils import handle_typed_dict_schema
```



---
## handle_dataclass_args_schema
```python
from _core_utils import handle_dataclass_args_schema
```



---
## handle_arguments_schema
```python
from _core_utils import handle_arguments_schema
```



---
## handle_call_schema
```python
from _core_utils import handle_call_schema
```



---
## collect_refs
```python
from _core_utils import collect_refs
```



---
## count_refs
```python
from _core_utils import count_refs
```



---
## can_be_inlined
```python
from _core_utils import can_be_inlined
```



---
## inline_refs
```python
from _core_utils import inline_refs
```



---
## strip_metadata
```python
from _core_utils import strip_metadata
```



---
## __name__
```python
from _validate_call import __name__
```



---
## ValidateCallWrapper
```python
from _validate_call import ValidateCallWrapper
```

This is a wrapper around a function that validates the arguments passed to it, and optionally the return value.

---
## __init__
```python
from _validate_call import __init__
```



---
## __call__
```python
from _validate_call import __call__
```



---
## __name__
```python
from _decorators_v1 import __name__
```

Logic for V1 validators, e.g. `@validator` and `@root_validator`.

---
## V1OnlyValueValidator
```python
from _decorators_v1 import V1OnlyValueValidator
```

A simple validator, supported for V1 validators and V2 validators.

---
## V1ValidatorWithValues
```python
from _decorators_v1 import V1ValidatorWithValues
```

A validator with `values` argument, supported for V1 validators and V2 validators.

---
## V1ValidatorWithValuesKwOnly
```python
from _decorators_v1 import V1ValidatorWithValuesKwOnly
```

A validator with keyword only `values` argument, supported for V1 validators and V2 validators.

---
## V1ValidatorWithKwargs
```python
from _decorators_v1 import V1ValidatorWithKwargs
```

A validator with `kwargs` argument, supported for V1 validators and V2 validators.

---
## V1ValidatorWithValuesAndKwargs
```python
from _decorators_v1 import V1ValidatorWithValuesAndKwargs
```

A validator with `values` and `kwargs` arguments, supported for V1 validators and V2 validators.

---
## can_be_keyword
```python
from _decorators_v1 import can_be_keyword
```



---
## make_generic_v1_field_validator
```python
from _decorators_v1 import make_generic_v1_field_validator
```

Wrap a V1 style field validator for V2 compatibility.

Args:
    validator: The V1 style field validator.

Returns:
    A wrapped V2 style field validator.

Raises:
    PydanticUserError: If the signature is not supported or the parameters are
        not available in Pydantic V2.

---
## V1RootValidatorFunction
```python
from _decorators_v1 import V1RootValidatorFunction
```

A simple root validator, supported for V1 validators and V2 validators.

---
## V2CoreBeforeRootValidator
```python
from _decorators_v1 import V2CoreBeforeRootValidator
```

V2 validator with mode='before'.

---
## V2CoreAfterRootValidator
```python
from _decorators_v1 import V2CoreAfterRootValidator
```

V2 validator with mode='after'.

---
## make_v1_generic_root_validator
```python
from _decorators_v1 import make_v1_generic_root_validator
```

Wrap a V1 style root validator for V2 compatibility.

Args:
    validator: The V1 style field validator.
    pre: Whether the validator is a pre validator.

Returns:
    A wrapped V2 style validator.

---
## __call__
```python
from _decorators_v1 import __call__
```



---
## _wrapper2
```python
from _decorators_v1 import _wrapper2
```



---
## wrapper1
```python
from _decorators_v1 import wrapper1
```



---
## wrapper2
```python
from _decorators_v1 import wrapper2
```



---
## _wrapper1
```python
from _decorators_v1 import _wrapper1
```



---
## __name__
```python
from _typing_extra import __name__
```

Logic for interacting with type annotations, mostly extensions, shims and hacks to wrap python's typing module.

---
## is_none_type
```python
from _typing_extra import is_none_type
```



---
## is_callable_type
```python
from _typing_extra import is_callable_type
```



---
## is_literal_type
```python
from _typing_extra import is_literal_type
```



---
## is_deprecated_instance
```python
from _typing_extra import is_deprecated_instance
```



---
## literal_values
```python
from _typing_extra import literal_values
```



---
## all_literal_values
```python
from _typing_extra import all_literal_values
```

This method is used to retrieve all Literal values as
Literal can be used recursively (see https://www.python.org/dev/peps/pep-0586)
e.g. `Literal[Literal[Literal[1, 2, 3], "foo"], 5, None]`.

---
## is_annotated
```python
from _typing_extra import is_annotated
```



---
## annotated_type
```python
from _typing_extra import annotated_type
```



---
## is_namedtuple
```python
from _typing_extra import is_namedtuple
```

Check if a given class is a named tuple.
It can be either a `typing.NamedTuple` or `collections.namedtuple`.

---
## is_new_type
```python
from _typing_extra import is_new_type
```

Check whether type_ was created using typing.NewType.

Can't use isinstance because it fails <3.10.

---
## _check_classvar
```python
from _typing_extra import _check_classvar
```



---
## is_classvar
```python
from _typing_extra import is_classvar
```



---
## _check_finalvar
```python
from _typing_extra import _check_finalvar
```

Check if a given type is a `typing.Final` type.

---
## is_finalvar
```python
from _typing_extra import is_finalvar
```



---
## parent_frame_namespace
```python
from _typing_extra import parent_frame_namespace
```

We allow use of items in parent namespace to get around the issue with `get_type_hints` only looking in the
global module namespace. See https://github.com/pydantic/pydantic/issues/2678#issuecomment-1008139014 -> Scope
and suggestion at the end of the next comment by @gvanrossum.

WARNING 1: it matters exactly where this is called. By default, this function will build a namespace from the
parent of where it is called.

WARNING 2: this only looks in the parent namespace, not other parents since (AFAIK) there's no way to collect a
dict of exactly what's in scope. Using `f_back` would work sometimes but would be very wrong and confusing in many
other cases. See https://discuss.python.org/t/is-there-a-way-to-access-parent-nested-namespaces/20659.

There are some cases where we want to force fetching the parent namespace, ex: during a `model_rebuild` call.
In this case, we want both the namespace of the class' module, if applicable, and the parent namespace of the
module where the rebuild is called.

In other cases, like during initial schema build, if a class is defined at the top module level, we don't need to
fetch that module's namespace, because the class' __module__ attribute can be used to access the parent namespace.
This is done in `_typing_extra.get_module_ns_of`. Thus, there's no need to cache the parent frame namespace in this case.

---
## get_module_ns_of
```python
from _typing_extra import get_module_ns_of
```

Get the namespace of the module where the object is defined.

Caution: this function does not return a copy of the module namespace, so it should not be mutated.
The burden of enforcing this is on the caller.

---
## merge_cls_and_parent_ns
```python
from _typing_extra import merge_cls_and_parent_ns
```



---
## get_cls_type_hints_lenient
```python
from _typing_extra import get_cls_type_hints_lenient
```

Collect annotations from a class, including those from parent classes.

Unlike `typing.get_type_hints`, this function will not error if a forward reference is not resolvable.

---
## eval_type_lenient
```python
from _typing_extra import eval_type_lenient
```

Behaves like typing._eval_type, except it won't raise an error if a forward reference can't be resolved.

---
## eval_type_backport
```python
from _typing_extra import eval_type_backport
```

An enhanced version of `typing._eval_type` which will fall back to using the `eval_type_backport`
package if it's installed to let older Python versions use newer typing constructs.

Specifically, this transforms `X | Y` into `typing.Union[X, Y]` and `list[X]` into `typing.List[X]`
(as well as all the types made generic in PEP 585) if the original syntax is not supported in the
current Python version.

This function will also display a helpful error if the value passed fails to evaluate.

---
## _eval_type_backport
```python
from _typing_extra import _eval_type_backport
```



---
## _eval_type
```python
from _typing_extra import _eval_type
```



---
## is_backport_fixable_error
```python
from _typing_extra import is_backport_fixable_error
```



---
## get_function_type_hints
```python
from _typing_extra import get_function_type_hints
```

Like `typing.get_type_hints`, but doesn't convert `X` to `Optional[X]` if the default value is `None`, also
copes with `partial`.

---
## is_dataclass
```python
from _typing_extra import is_dataclass
```



---
## origin_is_type_alias_type
```python
from _typing_extra import origin_is_type_alias_type
```



---
## is_self_type
```python
from _typing_extra import is_self_type
```

Check if a given class is a Self type (from `typing` or `typing_extensions`)

---
## origin_is_union
```python
from _typing_extra import origin_is_union
```



---
## _make_forward_ref
```python
from _typing_extra import _make_forward_ref
```

Wrapper for ForwardRef that accounts for the `is_class` argument missing in older versions.
The `module` argument is omitted as it breaks <3.9.8, =3.10.0 and isn't used in the calls below.

See https://github.com/python/cpython/pull/28560 for some background.
The backport happened on 3.9.8, see:
https://github.com/pydantic/pydantic/discussions/6244#discussioncomment-6275458,
and on 3.10.1 for the 3.10 branch, see:
https://github.com/pydantic/pydantic/issues/6912

Implemented as EAFP with memory.

---
## get_type_hints
```python
from _typing_extra import get_type_hints
```

Taken verbatim from python 3.10.8 unchanged, except:
* type annotations of the function definition above.
* prefixing `typing.` where appropriate
* Use `_make_forward_ref` instead of `typing.ForwardRef` to handle the `is_class` argument.

https://github.com/python/cpython/blob/aaaf5174241496afca7ce4d4584570190ff972fe/Lib/typing.py#L1773-L1875

DO NOT CHANGE THIS METHOD UNLESS ABSOLUTELY NECESSARY.
======================================================

Return type hints for an object.

This is often the same as obj.__annotations__, but it handles
forward references encoded as string literals, adds Optional[t] if a
default value equal to None is set and recursively replaces all
'Annotated[T, ...]' with 'T' (unless 'include_extras=True').

The argument may be a module, class, method, or function. The annotations
are returned as a dictionary. For classes, annotations include also
inherited members.

TypeError is raised if the argument is not of a type that can contain
annotations, and an empty dictionary is returned if no annotations are
present.

BEWARE -- the behavior of globalns and localns is counterintuitive
(unless you are familiar with how eval() and exec() work).  The
search order is locals first, then globals.

- If no dict arguments are passed, an attempt is made to use the
  globals from obj (or the respective module's globals for classes),
  and these are also used as the locals.  If the object does not appear
  to have globals, an empty dictionary is used.  For classes, the search
  order is globals first then locals.

- If one dict argument is passed, it is used for both globals and
  locals.

- If two dict arguments are passed, they specify globals and
  locals, respectively.

---
## is_generic_alias
```python
from _typing_extra import is_generic_alias
```



---
## is_zoneinfo_type
```python
from _typing_extra import is_zoneinfo_type
```



---
## sequence_validator
```python
from _validators import sequence_validator
```

Validator for `Sequence` types, isinstance(v, Sequence) has already been called.

---
## import_string
```python
from _validators import import_string
```



---
## _import_string_logic
```python
from _validators import _import_string_logic
```

Inspired by uvicorn — dotted paths should include a colon before the final item if that item is not a module.
(This is necessary to distinguish between a submodule and an attribute when there is a conflict.).

If the dotted path does not include a colon and the final item is not a valid module, importing as an attribute
rather than a submodule will be attempted automatically.

So, for example, the following values of `dotted_path` result in the following returned values:
* 'collections': <module 'collections'>
* 'collections.abc': <module 'collections.abc'>
* 'collections.abc:Mapping': <class 'collections.abc.Mapping'>
* `collections.abc.Mapping`: <class 'collections.abc.Mapping'> (though this is a bit slower than the previous line)

An error will be raised under any of the following scenarios:
* `dotted_path` contains more than one colon (e.g., 'collections:abc:Mapping')
* the substring of `dotted_path` before the colon is not a valid module in the environment (e.g., '123:Mapping')
* the substring of `dotted_path` after the colon is not an attribute of the module (e.g., 'collections:abc123')

---
## pattern_either_validator
```python
from _validators import pattern_either_validator
```



---
## pattern_str_validator
```python
from _validators import pattern_str_validator
```



---
## pattern_bytes_validator
```python
from _validators import pattern_bytes_validator
```



---
## compile_pattern
```python
from _validators import compile_pattern
```



---
## ip_v4_address_validator
```python
from _validators import ip_v4_address_validator
```



---
## ip_v6_address_validator
```python
from _validators import ip_v6_address_validator
```



---
## ip_v4_network_validator
```python
from _validators import ip_v4_network_validator
```

Assume IPv4Network initialised with a default `strict` argument.

See more:
https://docs.python.org/library/ipaddress.html#ipaddress.IPv4Network

---
## ip_v6_network_validator
```python
from _validators import ip_v6_network_validator
```

Assume IPv6Network initialised with a default `strict` argument.

See more:
https://docs.python.org/library/ipaddress.html#ipaddress.IPv6Network

---
## ip_v4_interface_validator
```python
from _validators import ip_v4_interface_validator
```



---
## ip_v6_interface_validator
```python
from _validators import ip_v6_interface_validator
```



---
## forbid_inf_nan_check
```python
from _validators import forbid_inf_nan_check
```



---
## create_constraint_validator
```python
from _validators import create_constraint_validator
```

Create a validator function for a given constraint.

Args:
    constraint_id: The constraint identifier, used to identify the constraint in error messages, ex 'gt'.
    predicate: The predicate function to apply to the input value, ex `lambda x, gt: x > gt`.
    error_type: The error type to raise if the predicate fails.
    context_gen: A function to generate the error context from the constraint value and the input value.

---
## get_constraint_validator
```python
from _validators import get_constraint_validator
```

Fetch the validator function for the given constraint.

---
## validator
```python
from _validators import validator
```



---
## __name__
```python
from _serializers import __name__
```



---
## serialize_sequence_via_list
```python
from _serializers import serialize_sequence_via_list
```



---
## __name__
```python
from _repr import __name__
```

Tools to provide pretty/human-readable display of objects.

---
## PlainRepr
```python
from _repr import PlainRepr
```

String class where repr doesn't include quotes. Useful with Representation when you want to return a string
representation of something that is valid (or pseudo-valid) python.

---
## Representation
```python
from _repr import Representation
```



---
## display_as_type
```python
from _repr import display_as_type
```

Pretty representation of a type, should be as close as possible to the original type definition string.

Takes some logic from `typing._type_repr`.

---
## __repr__
```python
from _repr import __repr__
```



---
## __repr_args__
```python
from _repr import __repr_args__
```

Returns the attributes to show in __str__, __repr__, and __pretty__ this is generally overridden.

Can either return:
* name - value pairs, e.g.: `[('foo_name', 'foo'), ('bar_name', ['b', 'a', 'r'])]`
* or, just values, e.g.: `[(None, 'foo'), (None, ['b', 'a', 'r'])]`

---
## __repr_name__
```python
from _repr import __repr_name__
```

Name of the instance's class, used in __repr__.

---
## __repr_str__
```python
from _repr import __repr_str__
```



---
## __pretty__
```python
from _repr import __pretty__
```

Used by devtools (https://python-devtools.helpmanual.io/) to pretty print objects.

---
## __rich_repr__
```python
from _repr import __rich_repr__
```

Used by Rich (https://rich.readthedocs.io/en/stable/pretty.html) to pretty print objects.

---
## __str__
```python
from _repr import __str__
```



---
## __name__
```python
from _import_utils import __name__
```



---
## import_cached_base_model
```python
from _import_utils import import_cached_base_model
```



---
## import_cached_field_info
```python
from _import_utils import import_cached_field_info
```



---
## __name__
```python
from _known_annotated_metadata import __name__
```



---
## add_js_update_schema
```python
from _known_annotated_metadata import add_js_update_schema
```



---
## as_jsonable_value
```python
from _known_annotated_metadata import as_jsonable_value
```



---
## expand_grouped_metadata
```python
from _known_annotated_metadata import expand_grouped_metadata
```

Expand the annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    An iterable of expanded annotations.

Example:
    ```py
    from annotated_types import Ge, Len

    from pydantic._internal._known_annotated_metadata import expand_grouped_metadata

    print(list(expand_grouped_metadata([Ge(4), Len(5)])))
    #> [Ge(ge=4), MinLen(min_length=5)]
    ```

---
## _get_at_to_constraint_map
```python
from _known_annotated_metadata import _get_at_to_constraint_map
```

Return a mapping of annotated types to constraints.

Normally, we would define a mapping like this in the module scope, but we can't do that
because we don't permit module level imports of `annotated_types`, in an attempt to speed up
the import time of `pydantic`. We still only want to have this dictionary defined in one place,
so we use this function to cache the result.

---
## apply_known_metadata
```python
from _known_annotated_metadata import apply_known_metadata
```

Apply `annotation` to `schema` if it is an annotation we know about (Gt, Le, etc.).
Otherwise return `None`.

This does not handle all known annotations. If / when it does, it can always
return a CoreSchema and return the unmodified schema if the annotation should be ignored.

Assumes that GroupedMetadata has already been expanded via `expand_grouped_metadata`.

Args:
    annotation: The annotation.
    schema: The schema.

Returns:
    An updated schema with annotation if it is an annotation we know about, `None` otherwise.

Raises:
    PydanticCustomError: If `Predicate` fails.

---
## collect_known_metadata
```python
from _known_annotated_metadata import collect_known_metadata
```

Split `annotations` into known metadata and unknown annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    A tuple contains a dict of known metadata and a list of unknown annotations.

Example:
    ```py
    from annotated_types import Gt, Len

    from pydantic._internal._known_annotated_metadata import collect_known_metadata

    print(collect_known_metadata([Gt(1), Len(42), ...]))
    #> ({'gt': 1, 'min_length': 42}, [Ellipsis])
    ```

---
## check_metadata
```python
from _known_annotated_metadata import check_metadata
```

A small utility function to validate that the given metadata can be applied to the target.
More than saving lines of code, this gives us a consistent error message for all of our internal implementations.

Args:
    metadata: A dict of metadata.
    allowed: An iterable of allowed metadata.
    source_type: The source type.

Raises:
    TypeError: If there is metadatas that can't be applied on source type.

---
## update_js_schema
```python
from _known_annotated_metadata import update_js_schema
```



---
## _apply_constraint_with_incompatibility_info
```python
from _known_annotated_metadata import _apply_constraint_with_incompatibility_info
```



---
## val_func
```python
from _known_annotated_metadata import val_func
```



---
## __name__
```python
from _model_construction import __name__
```

Private logic for creating models.

---
## _ModelNamespaceDict
```python
from _model_construction import _ModelNamespaceDict
```

A dictionary subclass that intercepts attribute setting on model classes and
warns about overriding of decorators.

---
## NoInitField
```python
from _model_construction import NoInitField
```

Only for typing purposes. Used as default value of `__pydantic_fields_set__`,
`__pydantic_extra__`, `__pydantic_private__`, so they could be ignored when
synthesizing the `__init__` signature.

---
## ModelMetaclass
```python
from _model_construction import ModelMetaclass
```



---
## init_private_attributes
```python
from _model_construction import init_private_attributes
```

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that's what pydantic-core passes when calling it.

Args:
    self: The BaseModel instance.
    context: The context.

---
## get_model_post_init
```python
from _model_construction import get_model_post_init
```

Get the `model_post_init` method from the namespace or the class bases, or `None` if not defined.

---
## inspect_namespace
```python
from _model_construction import inspect_namespace
```

Iterate over the namespace and:
* gather private attributes
* check for items which look like fields but are not (e.g. have no annotation) and warn.

Args:
    namespace: The attribute dictionary of the class to be created.
    ignored_types: A tuple of ignore types.
    base_class_vars: A set of base class class variables.
    base_class_fields: A set of base class fields.

Returns:
    A dict contains private attributes info.

Raises:
    TypeError: If there is a `__root__` field in model.
    NameError: If private attribute name is invalid.
    PydanticUserError:
        - If a field does not have a type annotation.
        - If a field on base class was overridden by a non-annotated attribute.

---
## set_default_hash_func
```python
from _model_construction import set_default_hash_func
```



---
## make_hash_func
```python
from _model_construction import make_hash_func
```



---
## set_model_fields
```python
from _model_construction import set_model_fields
```

Collect and set `cls.model_fields` and `cls.__class_vars__`.

Args:
    cls: BaseModel or dataclass.
    bases: Parents of the class, generally `cls.__bases__`.
    config_wrapper: The config wrapper instance.
    types_namespace: Optional extra namespace to look for types in.

---
## complete_model_class
```python
from _model_construction import complete_model_class
```

Finish building a model class.

This logic must be called after class has been created since validation functions must be bound
and `get_type_hints` requires a class object.

Args:
    cls: BaseModel or dataclass.
    cls_name: The model or dataclass name.
    config_wrapper: The config wrapper instance.
    raise_errors: Whether to raise errors.
    types_namespace: Optional extra namespace to look for types in.
    create_model_module: The module of the class to be created, if created by `create_model`.

Returns:
    `True` if the model is successfully completed, else `False`.

Raises:
    PydanticUndefinedAnnotation: If `PydanticUndefinedAnnotation` occurs in`__get_pydantic_core_schema__`
        and `raise_errors=True`.

---
## set_deprecated_descriptors
```python
from _model_construction import set_deprecated_descriptors
```

Set data descriptors on the class for deprecated fields.

---
## _DeprecatedFieldDescriptor
```python
from _model_construction import _DeprecatedFieldDescriptor
```

Data descriptor used to emit a runtime deprecation warning before accessing a deprecated field.

Attributes:
    msg: The deprecation message to be emitted.
    wrapped_property: The property instance if the deprecated field is a computed field, or `None`.
    field_name: The name of the field being deprecated.

---
## _PydanticWeakRef
```python
from _model_construction import _PydanticWeakRef
```

Wrapper for `weakref.ref` that enables `pickle` serialization.

Cloudpickle fails to serialize `weakref.ref` objects due to an arcane error related
to abstract base classes (`abc.ABC`). This class works around the issue by wrapping
`weakref.ref` instead of subclassing it.

See https://github.com/pydantic/pydantic/issues/6763 for context.

Semantics:
    - If not pickled, behaves the same as a `weakref.ref`.
    - If pickled along with the referenced object, the same `weakref.ref` behavior
      will be maintained between them after unpickling.
    - If pickled without the referenced object, after unpickling the underlying
      reference will be cleared (`__call__` will always return `None`).

---
## build_lenient_weakvaluedict
```python
from _model_construction import build_lenient_weakvaluedict
```

Takes an input dictionary, and produces a new value that (invertibly) replaces the values with weakrefs.

We can't just use a WeakValueDictionary because many types (including int, str, etc.) can't be stored as values
in a WeakValueDictionary.

The `unpack_lenient_weakvaluedict` function can be used to reverse this operation.

---
## unpack_lenient_weakvaluedict
```python
from _model_construction import unpack_lenient_weakvaluedict
```

Inverts the transform performed by `build_lenient_weakvaluedict`.

---
## default_ignored_types
```python
from _model_construction import default_ignored_types
```



---
## __setitem__
```python
from _model_construction import __setitem__
```



---
## __new__
```python
from _model_construction import __new__
```

Metaclass for creating Pydantic models.

Args:
    cls_name: The name of the class to be created.
    bases: The base classes of the class to be created.
    namespace: The attribute dictionary of the class to be created.
    __pydantic_generic_metadata__: Metadata for generic models.
    __pydantic_reset_parent_namespace__: Reset parent namespace.
    _create_model_module: The module of the class to be created, if created by `create_model`.
    **kwargs: Catch-all for any other keyword arguments.

Returns:
    The new class created by the metaclass.

---
## __prepare__
```python
from _model_construction import __prepare__
```



---
## __instancecheck__
```python
from _model_construction import __instancecheck__
```

Avoid calling ABC _abc_subclasscheck unless we're pretty sure.

See #3829 and python/cpython#92810

---
## _collect_bases_data
```python
from _model_construction import _collect_bases_data
```



---
## __fields__
```python
from _model_construction import __fields__
```



---
## __dir__
```python
from _model_construction import __dir__
```



---
## hash_func
```python
from _model_construction import hash_func
```



---
## __init__
```python
from _model_construction import __init__
```



---
## __set_name__
```python
from _model_construction import __set_name__
```



---
## __get__
```python
from _model_construction import __get__
```



---
## __set__
```python
from _model_construction import __set__
```



---
## __call__
```python
from _model_construction import __call__
```



---
## __reduce__
```python
from _model_construction import __reduce__
```



---
## __getattr__
```python
from _model_construction import __getattr__
```

This is necessary to keep attribute access working for class attribute access.

---
## wrapped_model_post_init
```python
from _model_construction import wrapped_model_post_init
```

We need to both initialize private attributes and call the user-defined model_post_init
method.

---
## __name__
```python
from _signature import __name__
```



---
## _field_name_for_signature
```python
from _signature import _field_name_for_signature
```

Extract the correct name to use for the field when generating a signature.

Assuming the field has a valid alias, this will return the alias. Otherwise, it will return the field name.
First priority is given to the alias, then the validation_alias, then the field name.

Args:
    field_name: The name of the field
    field_info: The corresponding FieldInfo object.

Returns:
    The correct name to use when generating a signature.

---
## _process_param_defaults
```python
from _signature import _process_param_defaults
```

Modify the signature for a parameter in a dataclass where the default value is a FieldInfo instance.

Args:
    param (Parameter): The parameter

Returns:
    Parameter: The custom processed parameter

---
## _generate_signature_parameters
```python
from _signature import _generate_signature_parameters
```

Generate a mapping of parameter names to Parameter objects for a pydantic BaseModel or dataclass.

---
## generate_pydantic_signature
```python
from _signature import generate_pydantic_signature
```

Generate signature for a pydantic BaseModel or dataclass.

Args:
    init: The class init.
    fields: The model fields.
    config_wrapper: The config wrapper instance.
    is_dataclass: Whether the model is a dataclass.

Returns:
    The dataclass/BaseModel subclass signature.

---
## __name__
```python
from _generate_schema import __name__
```

Convert python types to pydantic-core schema.

---
## check_validator_fields_against_field_name
```python
from _generate_schema import check_validator_fields_against_field_name
```

Check if field name is in validator fields.

Args:
    info: The field info.
    field: The field name to check.

Returns:
    `True` if field name is in validator fields, `False` otherwise.

---
## check_decorator_fields_exist
```python
from _generate_schema import check_decorator_fields_exist
```

Check if the defined fields in decorators exist in `fields` param.

It ignores the check for a decorator if the decorator has `*` as field or `check_fields=False`.

Args:
    decorators: An iterable of decorators.
    fields: An iterable of fields name.

Raises:
    PydanticUserError: If one of the field names does not exist in `fields` param.

---
## filter_field_decorator_info_by_field
```python
from _generate_schema import filter_field_decorator_info_by_field
```



---
## apply_each_item_validators
```python
from _generate_schema import apply_each_item_validators
```



---
## modify_model_json_schema
```python
from _generate_schema import modify_model_json_schema
```

Add title and description for model-like classes' JSON schema.

Args:
    schema_or_field: The schema data to generate a JSON schema from.
    handler: The `GetCoreSchemaHandler` instance.
    cls: The model-like class.
    title: The title to set for the model's schema, defaults to the model's name

Returns:
    JsonSchemaValue: The updated JSON schema.

---
## _add_custom_serialization_from_json_encoders
```python
from _generate_schema import _add_custom_serialization_from_json_encoders
```

Iterate over the json_encoders and add the first matching encoder to the schema.

Args:
    json_encoders: A dictionary of types and their encoder functions.
    tp: The type to check for a matching encoder.
    schema: The schema to add the encoder to.

---
## TypesNamespaceStack
```python
from _generate_schema import TypesNamespaceStack
```

A stack of types namespaces.

---
## _get_first_non_null
```python
from _generate_schema import _get_first_non_null
```

Return the first argument if it is not None, otherwise return the second argument.

Use case: serialization_alias (argument a) and alias (argument b) are both defined, and serialization_alias is ''.
This function will return serialization_alias, which is the first argument, even though it is an empty string.

---
## GenerateSchema
```python
from _generate_schema import GenerateSchema
```

Generate core schema for a Pydantic model, dataclass and types like `str`, `datetime`, ... .

---
## apply_validators
```python
from _generate_schema import apply_validators
```

Apply validators to a schema.

Args:
    schema: The schema to apply validators on.
    validators: An iterable of validators.
    field_name: The name of the field if validators are being applied to a model field.

Returns:
    The updated schema.

---
## _validators_require_validate_default
```python
from _generate_schema import _validators_require_validate_default
```

In v1, if any of the validators for a field had `always=True`, the default value would be validated.

This serves as an auxiliary function for re-implementing that logic, by looping over a provided
collection of (v1-style) ValidatorDecoratorInfo's and checking if any of them have `always=True`.

We should be able to drop this function and the associated logic calling it once we drop support
for v1-style validator decorators. (Or we can extend it and keep it if we add something equivalent
to the v1-validator `always` kwarg to `field_validator`.)

---
## apply_model_validators
```python
from _generate_schema import apply_model_validators
```

Apply model validators to a schema.

If mode == 'inner', only "before" validators are applied
If mode == 'outer', validators other than "before" are applied
If mode == 'all', all validators are applied

Args:
    schema: The schema to apply validators on.
    validators: An iterable of validators.
    mode: The validator mode.

Returns:
    The updated schema.

---
## wrap_default
```python
from _generate_schema import wrap_default
```

Wrap schema with default schema if default value or `default_factory` are available.

Args:
    field_info: The field info object.
    schema: The schema to apply default on.

Returns:
    Updated schema by default value or `default_factory`.

---
## _extract_get_pydantic_json_schema
```python
from _generate_schema import _extract_get_pydantic_json_schema
```

Extract `__get_pydantic_json_schema__` from a type, handling the deprecated `__modify_schema__`.

---
## get_json_schema_update_func
```python
from _generate_schema import get_json_schema_update_func
```



---
## add_json_schema_extra
```python
from _generate_schema import add_json_schema_extra
```



---
## _CommonField
```python
from _generate_schema import _CommonField
```



---
## _common_field
```python
from _generate_schema import _common_field
```



---
## _Definitions
```python
from _generate_schema import _Definitions
```

Keeps track of references and definitions.

---
## resolve_original_schema
```python
from _generate_schema import resolve_original_schema
```



---
## _FieldNameStack
```python
from _generate_schema import _FieldNameStack
```



---
## _ModelTypeStack
```python
from _generate_schema import _ModelTypeStack
```



---
## __init__
```python
from _generate_schema import __init__
```



---
## tail
```python
from _generate_schema import tail
```



---
## push
```python
from _generate_schema import push
```



---
## __from_parent
```python
from _generate_schema import __from_parent
```



---
## _config_wrapper
```python
from _generate_schema import _config_wrapper
```



---
## _types_namespace
```python
from _generate_schema import _types_namespace
```



---
## _current_generate_schema
```python
from _generate_schema import _current_generate_schema
```



---
## _arbitrary_types
```python
from _generate_schema import _arbitrary_types
```



---
## str_schema
```python
from _generate_schema import str_schema
```

Generate a CoreSchema for `str`

---
## _list_schema
```python
from _generate_schema import _list_schema
```



---
## _dict_schema
```python
from _generate_schema import _dict_schema
```



---
## _set_schema
```python
from _generate_schema import _set_schema
```



---
## _frozenset_schema
```python
from _generate_schema import _frozenset_schema
```



---
## _enum_schema
```python
from _generate_schema import _enum_schema
```



---
## _ip_schema
```python
from _generate_schema import _ip_schema
```



---
## _arbitrary_type_schema
```python
from _generate_schema import _arbitrary_type_schema
```



---
## _unknown_type_schema
```python
from _generate_schema import _unknown_type_schema
```



---
## _apply_discriminator_to_union
```python
from _generate_schema import _apply_discriminator_to_union
```



---
## CollectedInvalid
```python
from _generate_schema import CollectedInvalid
```



---
## clean_schema
```python
from _generate_schema import clean_schema
```



---
## collect_definitions
```python
from _generate_schema import collect_definitions
```



---
## _add_js_function
```python
from _generate_schema import _add_js_function
```



---
## generate_schema
```python
from _generate_schema import generate_schema
```

Generate core schema.

Args:
    obj: The object to generate core schema for.
    from_dunder_get_core_schema: Whether to generate schema from either the
        `__get_pydantic_core_schema__` function or `__pydantic_core_schema__` property.

Returns:
    The generated core schema.

Raises:
    PydanticUndefinedAnnotation:
        If it is not possible to evaluate forward reference.
    PydanticSchemaGenerationError:
        If it is not possible to generate pydantic-core schema.
    TypeError:
        - If `alias_generator` returns a disallowed type (must be str, AliasPath or AliasChoices).
        - If V1 style validator with `each_item=True` applied on a wrong field.
    PydanticUserError:
        - If `typing.TypedDict` is used instead of `typing_extensions.TypedDict` on Python < 3.12.
        - If `__modify_schema__` method is used instead of `__get_pydantic_json_schema__`.

---
## _model_schema
```python
from _generate_schema import _model_schema
```

Generate schema for a Pydantic model.

---
## _get_model_title_from_config
```python
from _generate_schema import _get_model_title_from_config
```

Get the title of a model if `model_title_generator` or `title` are set in the config, else return None

---
## _unpack_refs_defs
```python
from _generate_schema import _unpack_refs_defs
```

Unpack all 'definitions' schemas into `GenerateSchema.defs.definitions`
and return the inner schema.

---
## _generate_schema_from_property
```python
from _generate_schema import _generate_schema_from_property
```

Try to generate schema from either the `__get_pydantic_core_schema__` function or
`__pydantic_core_schema__` property.

Note: `__get_pydantic_core_schema__` takes priority so it can
decide whether to use a `__pydantic_core_schema__` attribute, or generate a fresh schema.

---
## _resolve_forward_ref
```python
from _generate_schema import _resolve_forward_ref
```



---
## _get_args_resolving_forward_refs
```python
from _generate_schema import _get_args_resolving_forward_refs
```



---
## _get_first_arg_or_any
```python
from _generate_schema import _get_first_arg_or_any
```



---
## _get_first_two_args_or_any
```python
from _generate_schema import _get_first_two_args_or_any
```



---
## _generate_schema_inner
```python
from _generate_schema import _generate_schema_inner
```



---
## match_type
```python
from _generate_schema import match_type
```

Main mapping of types to schemas.

The general structure is a series of if statements starting with the simple cases
(non-generic primitive types) and then handling generics and other more complex cases.

Each case either generates a schema directly, calls into a public user-overridable method
(like `GenerateSchema.tuple_variable_schema`) or calls into a private method that handles some
boilerplate before calling into the user-facing method (e.g. `GenerateSchema._tuple_schema`).

The idea is that we'll evolve this into adding more and more user facing methods over time
as they get requested and we figure out what the right API for them is.

---
## _match_generic_type
```python
from _generate_schema import _match_generic_type
```



---
## _generate_td_field_schema
```python
from _generate_schema import _generate_td_field_schema
```

Prepare a TypedDictField to represent a model or typeddict field.

---
## _generate_md_field_schema
```python
from _generate_schema import _generate_md_field_schema
```

Prepare a ModelField to represent a model field.

---
## _generate_dc_field_schema
```python
from _generate_schema import _generate_dc_field_schema
```

Prepare a DataclassField to represent the parameter/field, of a dataclass.

---
## _apply_alias_generator_to_field_info
```python
from _generate_schema import _apply_alias_generator_to_field_info
```

Apply an alias_generator to aliases on a FieldInfo instance if appropriate.

Args:
    alias_generator: A callable that takes a string and returns a string, or an AliasGenerator instance.
    field_info: The FieldInfo instance to which the alias_generator is (maybe) applied.
    field_name: The name of the field from which to generate the alias.

---
## _apply_alias_generator_to_computed_field_info
```python
from _generate_schema import _apply_alias_generator_to_computed_field_info
```

Apply an alias_generator to alias on a ComputedFieldInfo instance if appropriate.

Args:
    alias_generator: A callable that takes a string and returns a string, or an AliasGenerator instance.
    computed_field_info: The ComputedFieldInfo instance to which the alias_generator is (maybe) applied.
    computed_field_name: The name of the computed field from which to generate the alias.

---
## _apply_field_title_generator_to_field_info
```python
from _generate_schema import _apply_field_title_generator_to_field_info
```

Apply a field_title_generator on a FieldInfo or ComputedFieldInfo instance if appropriate
Args:
    config_wrapper: The config of the model
    field_info: The FieldInfo or ComputedField instance to which the title_generator is (maybe) applied.
    field_name: The name of the field from which to generate the title.

---
## _common_field_schema
```python
from _generate_schema import _common_field_schema
```



---
## _union_schema
```python
from _generate_schema import _union_schema
```

Generate schema for a Union.

---
## _type_alias_type_schema
```python
from _generate_schema import _type_alias_type_schema
```



---
## _literal_schema
```python
from _generate_schema import _literal_schema
```

Generate schema for a Literal.

---
## _typed_dict_schema
```python
from _generate_schema import _typed_dict_schema
```

Generate schema for a TypedDict.

It is not possible to track required/optional keys in TypedDict without __required_keys__
since TypedDict.__new__ erases the base classes (it replaces them with just `dict`)
and thus we can track usage of total=True/False
__required_keys__ was added in Python 3.9
(https://github.com/miss-islington/cpython/blob/1e9939657dd1f8eb9f596f77c1084d2d351172fc/Doc/library/typing.rst?plain=1#L1546-L1548)
however it is buggy
(https://github.com/python/typing_extensions/blob/ac52ac5f2cb0e00e7988bae1e2a1b8257ac88d6d/src/typing_extensions.py#L657-L666).

On 3.11 but < 3.12 TypedDict does not preserve inheritance information.

Hence to avoid creating validators that do not do what users expect we only
support typing.TypedDict on Python >= 3.12 or typing_extension.TypedDict on all versions

---
## _namedtuple_schema
```python
from _generate_schema import _namedtuple_schema
```

Generate schema for a NamedTuple.

---
## _generate_parameter_schema
```python
from _generate_schema import _generate_parameter_schema
```

Prepare a ArgumentsParameter to represent a field in a namedtuple or function signature.

---
## _tuple_schema
```python
from _generate_schema import _tuple_schema
```

Generate schema for a Tuple, e.g. `tuple[int, str]` or `tuple[int, ...]`.

---
## _type_schema
```python
from _generate_schema import _type_schema
```



---
## _zoneinfo_schema
```python
from _generate_schema import _zoneinfo_schema
```

Generate schema for a zone_info.ZoneInfo object

---
## _union_is_subclass_schema
```python
from _generate_schema import _union_is_subclass_schema
```

Generate schema for `Type[Union[X, ...]]`.

---
## _subclass_schema
```python
from _generate_schema import _subclass_schema
```

Generate schema for a Type, e.g. `Type[int]`.

---
## _sequence_schema
```python
from _generate_schema import _sequence_schema
```

Generate schema for a Sequence, e.g. `Sequence[int]`.

---
## _iterable_schema
```python
from _generate_schema import _iterable_schema
```

Generate a schema for an `Iterable`.

---
## _pattern_schema
```python
from _generate_schema import _pattern_schema
```



---
## _hashable_schema
```python
from _generate_schema import _hashable_schema
```



---
## _dataclass_schema
```python
from _generate_schema import _dataclass_schema
```

Generate schema for a dataclass.

---
## _callable_schema
```python
from _generate_schema import _callable_schema
```

Generate schema for a Callable.

TODO support functional validators once we support them in Config

---
## _unsubstituted_typevar_schema
```python
from _generate_schema import _unsubstituted_typevar_schema
```



---
## _computed_field_schema
```python
from _generate_schema import _computed_field_schema
```



---
## _annotated_schema
```python
from _generate_schema import _annotated_schema
```

Generate schema for an Annotated type, e.g. `Annotated[int, Field(...)]` or `Annotated[int, Gt(0)]`.

---
## _get_prepare_pydantic_annotations_for_known_type
```python
from _generate_schema import _get_prepare_pydantic_annotations_for_known_type
```



---
## _apply_annotations
```python
from _generate_schema import _apply_annotations
```

Apply arguments from `Annotated` or from `FieldInfo` to a schema.

This gets called by `GenerateSchema._annotated_schema` but differs from it in that it does
not expect `source_type` to be an `Annotated` object, it expects it to be  the first argument of that
(in other words, `GenerateSchema._annotated_schema` just unpacks `Annotated`, this process it).

---
## _apply_single_annotation
```python
from _generate_schema import _apply_single_annotation
```



---
## _apply_single_annotation_json_schema
```python
from _generate_schema import _apply_single_annotation_json_schema
```



---
## _get_wrapped_inner_schema
```python
from _generate_schema import _get_wrapped_inner_schema
```



---
## _apply_field_serializers
```python
from _generate_schema import _apply_field_serializers
```

Apply field serializers to a schema.

---
## _apply_model_serializers
```python
from _generate_schema import _apply_model_serializers
```

Apply model serializers to a schema.

---
## json_schema_update_func
```python
from _generate_schema import json_schema_update_func
```



---
## get_schema_or_ref
```python
from _generate_schema import get_schema_or_ref
```

Get a definition for `tp` if one exists.

If a definition exists, a tuple of `(ref_string, CoreSchema)` is returned.
If no definition exists yet, a tuple of `(ref_string, None)` is returned.

Note that the returned `CoreSchema` will always be a `DefinitionReferenceSchema`,
not the actual definition itself.

This should be called for any type that can be identified by reference.
This includes any recursive types.

At present the following types can be named/recursive:

- BaseModel
- Dataclasses
- TypedDict
- TypeAliasType

---
## get
```python
from _generate_schema import get
```



---
## ser_ip
```python
from _generate_schema import ser_ip
```



---
## set_discriminator
```python
from _generate_schema import set_discriminator
```



---
## validate_str_is_valid_iana_tz
```python
from _generate_schema import validate_str_is_valid_iana_tz
```



---
## set_computed_field_metadata
```python
from _generate_schema import set_computed_field_metadata
```



---
## inner_handler
```python
from _generate_schema import inner_handler
```



---
## new_handler
```python
from _generate_schema import new_handler
```



---
## get_json_schema
```python
from _generate_schema import get_json_schema
```



---
## get_json_schema_no_cases
```python
from _generate_schema import get_json_schema_no_cases
```



---
## __name__
```python
from _discriminated_union import __name__
```



---
## MissingDefinitionForUnionRef
```python
from _discriminated_union import MissingDefinitionForUnionRef
```

Raised when applying a discriminated union discriminator to a schema
requires a definition that is not yet defined

---
## set_discriminator_in_metadata
```python
from _discriminated_union import set_discriminator_in_metadata
```



---
## apply_discriminators
```python
from _discriminated_union import apply_discriminators
```



---
## apply_discriminator
```python
from _discriminated_union import apply_discriminator
```

Applies the discriminator and returns a new core schema.

Args:
    schema: The input schema.
    discriminator: The name of the field which will serve as the discriminator.
    definitions: A mapping of schema ref to schema.

Returns:
    The new core schema.

Raises:
    TypeError:
        - If `discriminator` is used with invalid union variant.
        - If `discriminator` is used with `Union` type with one variant.
        - If `discriminator` value mapped to multiple choices.
    MissingDefinitionForUnionRef:
        If the definition for ref is missing.
    PydanticUserError:
        - If a model in union doesn't have a discriminator field.
        - If discriminator field has a non-string alias.
        - If discriminator fields have different aliases.
        - If discriminator field not of type `Literal`.

---
## _ApplyInferredDiscriminator
```python
from _discriminated_union import _ApplyInferredDiscriminator
```

This class is used to convert an input schema containing a union schema into one where that union is
replaced with a tagged-union, with all the associated debugging and performance benefits.

This is done by:
* Validating that the input schema is compatible with the provided discriminator
* Introspecting the schema to determine which discriminator values should map to which union choices
* Handling various edge cases such as 'definitions', 'default', 'nullable' schemas, and more

I have chosen to implement the conversion algorithm in this class, rather than a function,
to make it easier to maintain state while recursively walking the provided CoreSchema.

---
## __init__
```python
from _discriminated_union import __init__
```



---
## inner
```python
from _discriminated_union import inner
```



---
## apply
```python
from _discriminated_union import apply
```

Return a new CoreSchema based on `schema` that uses a tagged-union with the discriminator provided
to this class.

Args:
    schema: The input schema.

Returns:
    The new core schema.

Raises:
    TypeError:
        - If `discriminator` is used with invalid union variant.
        - If `discriminator` is used with `Union` type with one variant.
        - If `discriminator` value mapped to multiple choices.
    ValueError:
        If the definition for ref is missing.
    PydanticUserError:
        - If a model in union doesn't have a discriminator field.
        - If discriminator field has a non-string alias.
        - If discriminator fields have different aliases.
        - If discriminator field not of type `Literal`.

---
## _apply_to_root
```python
from _discriminated_union import _apply_to_root
```

This method handles the outer-most stage of recursion over the input schema:
unwrapping nullable or definitions schemas, and calling the `_handle_choice`
method iteratively on the choices extracted (recursively) from the possibly-wrapped union.

---
## _handle_choice
```python
from _discriminated_union import _handle_choice
```

This method handles the "middle" stage of recursion over the input schema.
Specifically, it is responsible for handling each choice of the outermost union
(and any "coalesced" choices obtained from inner unions).

Here, "handling" entails:
* Coalescing nested unions and compatible tagged-unions
* Tracking the presence of 'none' and 'nullable' schemas occurring as choices
* Validating that each allowed discriminator value maps to a unique choice
* Updating the _tagged_union_choices mapping that will ultimately be used to build the TaggedUnionSchema.

---
## _is_discriminator_shared
```python
from _discriminated_union import _is_discriminator_shared
```

This method returns a boolean indicating whether the discriminator for the `choice`
is the same as that being used for the outermost tagged union. This is used to
determine whether this TaggedUnionSchema choice should be "coalesced" into the top level,
or whether it should be treated as a separate (nested) choice.

---
## _infer_discriminator_values_for_choice
```python
from _discriminated_union import _infer_discriminator_values_for_choice
```

This function recurses over `choice`, extracting all discriminator values that should map to this choice.

`model_name` is accepted for the purpose of producing useful error messages.

---
## _infer_discriminator_values_for_typed_dict_choice
```python
from _discriminated_union import _infer_discriminator_values_for_typed_dict_choice
```

This method just extracts the _infer_discriminator_values_for_choice logic specific to TypedDictSchema
for the sake of readability.

---
## _infer_discriminator_values_for_model_choice
```python
from _discriminated_union import _infer_discriminator_values_for_model_choice
```



---
## _infer_discriminator_values_for_dataclass_choice
```python
from _discriminated_union import _infer_discriminator_values_for_dataclass_choice
```



---
## _infer_discriminator_values_for_field
```python
from _discriminated_union import _infer_discriminator_values_for_field
```



---
## _infer_discriminator_values_for_inner_schema
```python
from _discriminated_union import _infer_discriminator_values_for_inner_schema
```

When inferring discriminator values for a field, we typically extract the expected values from a literal
schema. This function does that, but also handles nested unions and defaults.

---
## _set_unique_choice_for_values
```python
from _discriminated_union import _set_unique_choice_for_values
```

This method updates `self.tagged_union_choices` so that all provided (discriminator) `values` map to the
provided `choice`, validating that none of these values already map to another (different) choice.

---
## __name__
```python
from _forward_ref import __name__
```



---
## PydanticRecursiveRef
```python
from _forward_ref import PydanticRecursiveRef
```



---
## __call__
```python
from _forward_ref import __call__
```

Defining __call__ is necessary for the `typing` module to let you use an instance of
this class as the result of resolving a standard ForwardRef.

---
## __or__
```python
from _forward_ref import __or__
```



---
## __ror__
```python
from _forward_ref import __ror__
```



---
## __name__
```python
from _decorators import __name__
```



---
## ValidatorDecoratorInfo
```python
from _decorators import ValidatorDecoratorInfo
```

A container for data from `@validator` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@validator'.
    fields: A tuple of field names the validator should be called on.
    mode: The proposed validator mode.
    each_item: For complex objects (sets, lists etc.) whether to validate individual
        elements rather than the whole object.
    always: Whether this method and other validators should be called even if the value is missing.
    check_fields: Whether to check that the fields actually exist on the model.

---
## FieldValidatorDecoratorInfo
```python
from _decorators import FieldValidatorDecoratorInfo
```

A container for data from `@field_validator` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@field_validator'.
    fields: A tuple of field names the validator should be called on.
    mode: The proposed validator mode.
    check_fields: Whether to check that the fields actually exist on the model.
    json_schema_input_type: The input type of the function. This is only used to generate
        the appropriate JSON Schema (in validation mode) and can only specified
        when `mode` is either `'before'`, `'plain'` or `'wrap'`.

---
## RootValidatorDecoratorInfo
```python
from _decorators import RootValidatorDecoratorInfo
```

A container for data from `@root_validator` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@root_validator'.
    mode: The proposed validator mode.

---
## FieldSerializerDecoratorInfo
```python
from _decorators import FieldSerializerDecoratorInfo
```

A container for data from `@field_serializer` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@field_serializer'.
    fields: A tuple of field names the serializer should be called on.
    mode: The proposed serializer mode.
    return_type: The type of the serializer's return value.
    when_used: The serialization condition. Accepts a string with values `'always'`, `'unless-none'`, `'json'`,
        and `'json-unless-none'`.
    check_fields: Whether to check that the fields actually exist on the model.

---
## ModelSerializerDecoratorInfo
```python
from _decorators import ModelSerializerDecoratorInfo
```

A container for data from `@model_serializer` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@model_serializer'.
    mode: The proposed serializer mode.
    return_type: The type of the serializer's return value.
    when_used: The serialization condition. Accepts a string with values `'always'`, `'unless-none'`, `'json'`,
        and `'json-unless-none'`.

---
## ModelValidatorDecoratorInfo
```python
from _decorators import ModelValidatorDecoratorInfo
```

A container for data from `@model_validator` so that we can access it
while building the pydantic-core schema.

Attributes:
    decorator_repr: A class variable representing the decorator string, '@model_validator'.
    mode: The proposed serializer mode.

---
## PydanticDescriptorProxy
```python
from _decorators import PydanticDescriptorProxy
```

Wrap a classmethod, staticmethod, property or unbound function
and act as a descriptor that allows us to detect decorated items
from the class' attributes.

This class' __get__ returns the wrapped item's __get__ result,
which makes it transparent for classmethods and staticmethods.

Attributes:
    wrapped: The decorator that has to be wrapped.
    decorator_info: The decorator info.
    shim: A wrapper function to wrap V1 style function.

---
## Decorator
```python
from _decorators import Decorator
```

A generic container class to join together the decorator metadata
(metadata from decorator itself, which we have when the
decorator is called but not when we are building the core-schema)
and the bound function (which we have after the class itself is created).

Attributes:
    cls_ref: The class ref.
    cls_var_name: The decorated function name.
    func: The decorated function.
    shim: A wrapper function to wrap V1 style function.
    info: The decorator info.

---
## get_bases
```python
from _decorators import get_bases
```

Get the base classes of a class or typeddict.

Args:
    tp: The type or class to get the bases.

Returns:
    The base classes.

---
## mro
```python
from _decorators import mro
```

Calculate the Method Resolution Order of bases using the C3 algorithm.

See https://www.python.org/download/releases/2.3/mro/

---
## mro_for_bases
```python
from _decorators import mro_for_bases
```



---
## get_attribute_from_bases
```python
from _decorators import get_attribute_from_bases
```

Get the attribute from the next class in the MRO that has it,
aiming to simulate calling the method on the actual class.

The reason for iterating over the mro instead of just getting
the attribute (which would do that for us) is to support TypedDict,
which lacks a real __mro__, but can have a virtual one constructed
from its bases (as done here).

Args:
    tp: The type or class to search for the attribute. If a tuple, this is treated as a set of base classes.
    name: The name of the attribute to retrieve.

Returns:
    Any: The attribute value, if found.

Raises:
    AttributeError: If the attribute is not found in any class in the MRO.

---
## get_attribute_from_base_dicts
```python
from _decorators import get_attribute_from_base_dicts
```

Get an attribute out of the `__dict__` following the MRO.
This prevents the call to `__get__` on the descriptor, and allows
us to get the original function for classmethod properties.

Args:
    tp: The type or class to search for the attribute.
    name: The name of the attribute to retrieve.

Returns:
    Any: The attribute value, if found.

Raises:
    KeyError: If the attribute is not found in any class's `__dict__` in the MRO.

---
## DecoratorInfos
```python
from _decorators import DecoratorInfos
```

Mapping of name in the class namespace to decorator info.

note that the name in the class namespace is the function or attribute name
not the field name!

---
## inspect_validator
```python
from _decorators import inspect_validator
```

Look at a field or model validator function and determine whether it takes an info argument.

An error is raised if the function has an invalid signature.

Args:
    validator: The validator function to inspect.
    mode: The proposed validator mode.

Returns:
    Whether the validator takes an info argument.

---
## inspect_field_serializer
```python
from _decorators import inspect_field_serializer
```

Look at a field serializer function and determine if it is a field serializer,
and whether it takes an info argument.

An error is raised if the function has an invalid signature.

Args:
    serializer: The serializer function to inspect.
    mode: The serializer mode, either 'plain' or 'wrap'.
    computed_field: When serializer is applied on computed_field. It doesn't require
        info signature.

Returns:
    Tuple of (is_field_serializer, info_arg).

---
## inspect_annotated_serializer
```python
from _decorators import inspect_annotated_serializer
```

Look at a serializer function used via `Annotated` and determine whether it takes an info argument.

An error is raised if the function has an invalid signature.

Args:
    serializer: The serializer function to check.
    mode: The serializer mode, either 'plain' or 'wrap'.

Returns:
    info_arg

---
## inspect_model_serializer
```python
from _decorators import inspect_model_serializer
```

Look at a model serializer function and determine whether it takes an info argument.

An error is raised if the function has an invalid signature.

Args:
    serializer: The serializer function to check.
    mode: The serializer mode, either 'plain' or 'wrap'.

Returns:
    `info_arg` - whether the function expects an info argument.

---
## _serializer_info_arg
```python
from _decorators import _serializer_info_arg
```



---
## is_instance_method_from_sig
```python
from _decorators import is_instance_method_from_sig
```

Whether the function is an instance method.

It will consider a function as instance method if the first parameter of
function is `self`.

Args:
    function: The function to check.

Returns:
    `True` if the function is an instance method, `False` otherwise.

---
## ensure_classmethod_based_on_signature
```python
from _decorators import ensure_classmethod_based_on_signature
```

Apply the `@classmethod` decorator on the function.

Args:
    function: The function to apply the decorator on.

Return:
    The `@classmethod` decorator applied function.

---
## _is_classmethod_from_sig
```python
from _decorators import _is_classmethod_from_sig
```



---
## unwrap_wrapped_function
```python
from _decorators import unwrap_wrapped_function
```

Recursively unwraps a wrapped function until the underlying function is reached.
This handles property, functools.partial, functools.partialmethod, staticmethod, and classmethod.

Args:
    func: The function to unwrap.
    unwrap_partial: If True (default), unwrap partial and partialmethod decorators.
    unwrap_class_static_method: If True (default), also unwrap classmethod and staticmethod
        decorators. If False, only unwrap partial and partialmethod decorators.

Returns:
    The underlying function of the wrapped function.

---
## get_function_return_type
```python
from _decorators import get_function_return_type
```

Get the function return type.

It gets the return type from the type annotation if `explicit_return_type` is `None`.
Otherwise, it returns `explicit_return_type`.

Args:
    func: The function to get its return type.
    explicit_return_type: The explicit return type.
    types_namespace: The types namespace, defaults to `None`.

Returns:
    The function return type.

---
## count_positional_required_params
```python
from _decorators import count_positional_required_params
```

Get the number of positional (required) arguments of a signature.

This function should only be used to inspect signatures of validation and serialization functions.
The first argument (the value being serialized or validated) is counted as a required argument
even if a default value exists.

Returns:
    The number of positional arguments of a signature.

---
## can_be_positional
```python
from _decorators import can_be_positional
```



---
## ensure_property
```python
from _decorators import ensure_property
```

Ensure that a function is a `property` or `cached_property`, or is a valid descriptor.

Args:
    f: The function to check.

Returns:
    The function, or a `property` or `cached_property` instance wrapping the function.

---
## __post_init__
```python
from _decorators import __post_init__
```



---
## _call_wrapped_attr
```python
from _decorators import _call_wrapped_attr
```



---
## __get__
```python
from _decorators import __get__
```



---
## __set_name__
```python
from _decorators import __set_name__
```



---
## __getattr__
```python
from _decorators import __getattr__
```

Forward checks for __isabstractmethod__ and such.

---
## build
```python
from _decorators import build
```

We want to collect all DecFunc instances that exist as
attributes in the namespace of the class (a BaseModel or dataclass)
that called us
But we want to collect these in the order of the bases
So instead of getting them all from the leaf class (the class that called us),
we traverse the bases from root (the oldest ancestor class) to leaf
and collect all of the instances as we go, taking care to replace
any duplicate ones with the last one we see to mimic how function overriding
works with inheritance.
If we do replace any functions we put the replacement into the position
the replaced function was in; that is, we maintain the order.

---
## bind_to_cls
```python
from _decorators import bind_to_cls
```

Bind the decorator to a class.

Args:
    cls: the class.

Returns:
    The new decorator instance.

---
## merge_seqs
```python
from _decorators import merge_seqs
```



---
## __name__
```python
from _core_metadata import __name__
```



---
## CoreMetadata
```python
from _core_metadata import CoreMetadata
```

A `TypedDict` for holding the metadata dict of the schema.

Attributes:
    pydantic_js_functions: List of JSON schema functions.
    pydantic_js_prefer_positional_arguments: Whether JSON schema generator will
        prefer positional over keyword arguments for an 'arguments' schema.

---
## CoreMetadataHandler
```python
from _core_metadata import CoreMetadataHandler
```

Because the metadata field in pydantic_core is of type `Dict[str, Any]`, we can't assume much about its contents.

This class is used to interact with the metadata field on a CoreSchema object in a consistent way throughout pydantic.

TODO: We'd like to refactor the storage of json related metadata to be more explicit, and less functionally oriented.
This should make its way into our v2.10 release. It's inevitable that we need to store some json schema related information
on core schemas, given that we generate JSON schemas directly from core schemas. That being said, debugging related
issues is quite difficult when JSON schema information is disguised via dynamically defined functions.

---
## build_metadata_dict
```python
from _core_metadata import build_metadata_dict
```

Builds a dict to use as the metadata field of a CoreSchema object in a manner that is consistent with the `CoreMetadataHandler` class.

---
## __init__
```python
from _core_metadata import __init__
```



---
## metadata
```python
from _core_metadata import metadata
```

Retrieves the metadata dict from the schema, initializing it to a dict if it is None
and raises an error if it is not a dict.

---
## __name__
```python
from _std_types_schema import __name__
```

Logic for generating pydantic-core schemas for standard library types.

Import of this module is deferred since it contains imports of many standard library modules.

---
## InnerSchemaValidator
```python
from _std_types_schema import InnerSchemaValidator
```

Use a fixed CoreSchema, avoiding interference from outward annotations.

---
## path_schema_prepare_pydantic_annotations
```python
from _std_types_schema import path_schema_prepare_pydantic_annotations
```



---
## deque_validator
```python
from _std_types_schema import deque_validator
```



---
## DequeValidator
```python
from _std_types_schema import DequeValidator
```



---
## deque_schema_prepare_pydantic_annotations
```python
from _std_types_schema import deque_schema_prepare_pydantic_annotations
```



---
## defaultdict_validator
```python
from _std_types_schema import defaultdict_validator
```



---
## get_defaultdict_default_default_factory
```python
from _std_types_schema import get_defaultdict_default_default_factory
```



---
## MappingValidator
```python
from _std_types_schema import MappingValidator
```



---
## mapping_like_prepare_pydantic_annotations
```python
from _std_types_schema import mapping_like_prepare_pydantic_annotations
```



---
## __get_pydantic_json_schema__
```python
from _std_types_schema import __get_pydantic_json_schema__
```



---
## __get_pydantic_core_schema__
```python
from _std_types_schema import __get_pydantic_core_schema__
```



---
## path_validator
```python
from _std_types_schema import path_validator
```



---
## infer_default
```python
from _std_types_schema import infer_default
```



---
## serialize_mapping_via_dict
```python
from _std_types_schema import serialize_mapping_via_dict
```



---
## type_var_default_factory
```python
from _std_types_schema import type_var_default_factory
```



---
## __name__
```python
from _fields import __name__
```

Private logic related to fields (the `Field()` function and `FieldInfo` class), and arguments to `Annotated`.

---
## PydanticMetadata
```python
from _fields import PydanticMetadata
```

Base class for annotation markers like `Strict`.

---
## pydantic_general_metadata
```python
from _fields import pydantic_general_metadata
```

Create a new `_PydanticGeneralMetadata` class with the given metadata.

Args:
    **metadata: The metadata to add.

Returns:
    The new `_PydanticGeneralMetadata` class.

---
## _general_metadata_cls
```python
from _fields import _general_metadata_cls
```

Do it this way to avoid importing `annotated_types` at import time.

---
## _update_fields_from_docstrings
```python
from _fields import _update_fields_from_docstrings
```



---
## collect_model_fields
```python
from _fields import collect_model_fields
```

Collect the fields of a nascent pydantic model.

Also collect the names of any ClassVars present in the type hints.

The returned value is a tuple of two items: the fields dict, and the set of ClassVar names.

Args:
    cls: BaseModel or dataclass.
    bases: Parents of the class, generally `cls.__bases__`.
    config_wrapper: The config wrapper instance.
    types_namespace: Optional extra namespace to look for types in.
    typevars_map: A dictionary mapping type variables to their concrete types.

Returns:
    A tuple contains fields and class variables.

Raises:
    NameError:
        - If there is a conflict between a field name and protected namespaces.
        - If there is a field other than `root` in `RootModel`.
        - If a field shadows an attribute in the parent model.

---
## _warn_on_nested_alias_in_annotation
```python
from _fields import _warn_on_nested_alias_in_annotation
```



---
## _is_finalvar_with_default_val
```python
from _fields import _is_finalvar_with_default_val
```



---
## collect_dataclass_fields
```python
from _fields import collect_dataclass_fields
```

Collect the fields of a dataclass.

Args:
    cls: dataclass.
    types_namespace: Optional extra namespace to look for types in.
    typevars_map: A dictionary mapping type variables to their concrete types.
    config_wrapper: The config wrapper instance.

Returns:
    The dataclass fields.

---
## is_valid_field_name
```python
from _fields import is_valid_field_name
```



---
## is_valid_privateattr_name
```python
from _fields import is_valid_privateattr_name
```



---
## _PydanticGeneralMetadata
```python
from _fields import _PydanticGeneralMetadata
```

Pydantic general metadata like `max_digits`.

---
## __init__
```python
from _fields import __init__
```



---
## ConfigWrapper
```python
from _config import ConfigWrapper
```

Internal wrapper for Config which exposes ConfigDict items as attributes.

---
## ConfigWrapperStack
```python
from _config import ConfigWrapperStack
```

A stack of `ConfigWrapper` instances.

---
## prepare_config
```python
from _config import prepare_config
```

Create a `ConfigDict` instance from an existing dict, a class (e.g. old class-based config) or None.

Args:
    config: The input config.

Returns:
    A ConfigDict object created from config.

---
## check_deprecated
```python
from _config import check_deprecated
```

Check for deprecated config keys and warn the user.

Args:
    config_dict: The input config.

---
## for_model
```python
from _config import for_model
```

Build a new `ConfigWrapper` instance for a `BaseModel`.

The config wrapper built based on (in descending order of priority):
- options from `kwargs`
- options from the `namespace`
- options from the base classes (`bases`)

Args:
    bases: A tuple of base classes.
    namespace: The namespace of the class being created.
    kwargs: The kwargs passed to the class being created.

Returns:
    A `ConfigWrapper` instance for `BaseModel`.

---
## core_config
```python
from _config import core_config
```

Create a pydantic-core config, `obj` is just used to populate `title` if not set in config.

Pass `obj=None` if you do not want to attempt to infer the `title`.

We don't use getattr here since we don't want to populate with defaults.

Args:
    obj: An object used to populate `title` if not set in config.

Returns:
    A `CoreConfig` object created from config.

---
## tail
```python
from _config import tail
```



---
## push
```python
from _config import push
```



---
## __getattr__
```python
from _config import __getattr__
```



---
## __name__
```python
from _mock_val_ser import __name__
```



---
## MockCoreSchema
```python
from _mock_val_ser import MockCoreSchema
```

Mocker for `pydantic_core.CoreSchema` which optionally attempts to
rebuild the thing it's mocking when one of its methods is accessed and raises an error if that fails.

---
## MockValSer
```python
from _mock_val_ser import MockValSer
```

Mocker for `pydantic_core.SchemaValidator` or `pydantic_core.SchemaSerializer` which optionally attempts to
rebuild the thing it's mocking when one of its methods is accessed and raises an error if that fails.

---
## set_model_mocks
```python
from _mock_val_ser import set_model_mocks
```

Set `__pydantic_validator__` and `__pydantic_serializer__` to `MockValSer`s on a model.

Args:
    cls: The model class to set the mocks on
    cls_name: Name of the model class, used in error messages
    undefined_name: Name of the undefined thing, used in error messages

---
## set_dataclass_mocks
```python
from _mock_val_ser import set_dataclass_mocks
```

Set `__pydantic_validator__` and `__pydantic_serializer__` to `MockValSer`s on a dataclass.

Args:
    cls: The model class to set the mocks on
    cls_name: Name of the model class, used in error messages
    undefined_name: Name of the undefined thing, used in error messages

---
## __init__
```python
from _mock_val_ser import __init__
```



---
## __getitem__
```python
from _mock_val_ser import __getitem__
```



---
## __len__
```python
from _mock_val_ser import __len__
```



---
## __iter__
```python
from _mock_val_ser import __iter__
```



---
## _get_built
```python
from _mock_val_ser import _get_built
```



---
## rebuild
```python
from _mock_val_ser import rebuild
```



---
## __getattr__
```python
from _mock_val_ser import __getattr__
```



---
## attempt_rebuild_fn
```python
from _mock_val_ser import attempt_rebuild_fn
```



---
## handler
```python
from _mock_val_ser import handler
```



---
## __name__
```python
from _git import __name__
```

Git utilities, adopted from mypy's git utilities (https://github.com/python/mypy/blob/master/mypy/git.py).

---
## is_git_repo
```python
from _git import is_git_repo
```

Is the given directory version-controlled with git?

---
## have_git
```python
from _git import have_git
```

Can we run the git executable?

---
## git_revision
```python
from _git import git_revision
```

Get the SHA-1 of the HEAD of a git repository.

---
## __name__
```python
from _generics import __name__
```



---
## PydanticGenericMetadata
```python
from _generics import PydanticGenericMetadata
```



---
## create_generic_submodel
```python
from _generics import create_generic_submodel
```

Dynamically create a submodel of a provided (generic) BaseModel.

This is used when producing concrete parametrizations of generic models. This function
only *creates* the new subclass; the schema/validators/serialization must be updated to
reflect a concrete parametrization elsewhere.

Args:
    model_name: The name of the newly created model.
    origin: The base class for the new model to inherit from.
    args: A tuple of generic metadata arguments.
    params: A tuple of generic metadata parameters.

Returns:
    The created submodel.

---
## _get_caller_frame_info
```python
from _generics import _get_caller_frame_info
```

Used inside a function to check whether it was called globally.

Args:
    depth: The depth to get the frame.

Returns:
    A tuple contains `module_name` and `called_globally`.

Raises:
    RuntimeError: If the function is not called inside a function.

---
## iter_contained_typevars
```python
from _generics import iter_contained_typevars
```

Recursively iterate through all subtypes and type args of `v` and yield any typevars that are found.

This is inspired as an alternative to directly accessing the `__parameters__` attribute of a GenericAlias,
since __parameters__ of (nested) generic BaseModel subclasses won't show up in that list.

---
## get_args
```python
from _generics import get_args
```



---
## get_origin
```python
from _generics import get_origin
```



---
## get_standard_typevars_map
```python
from _generics import get_standard_typevars_map
```

Package a generic type's typevars and parametrization (if present) into a dictionary compatible with the
`replace_types` function. Specifically, this works with standard typing generics and typing._GenericAlias.

---
## get_model_typevars_map
```python
from _generics import get_model_typevars_map
```

Package a generic BaseModel's typevars and concrete parametrization (if present) into a dictionary compatible
with the `replace_types` function.

Since BaseModel.__class_getitem__ does not produce a typing._GenericAlias, and the BaseModel generic info is
stored in the __pydantic_generic_metadata__ attribute, we need special handling here.

---
## replace_types
```python
from _generics import replace_types
```

Return type with all occurrences of `type_map` keys recursively replaced with their values.

Args:
    type_: The class or generic alias.
    type_map: Mapping from `TypeVar` instance to concrete types.

Returns:
    A new type representing the basic structure of `type_` with all
    `typevar_map` keys recursively replaced.

Example:
    ```py
    from typing import List, Tuple, Union

    from pydantic._internal._generics import replace_types

    replace_types(Tuple[str, Union[List[str], float]], {str: int})
    #> Tuple[int, Union[List[int], float]]
    ```

---
## has_instance_in_type
```python
from _generics import has_instance_in_type
```

Checks if the type, or any of its arbitrary nested args, satisfy
`isinstance(<type>, isinstance_target)`.

---
## check_parameters_count
```python
from _generics import check_parameters_count
```

Check the generic model parameters count is equal.

Args:
    cls: The generic model.
    parameters: A tuple of passed parameters to the generic model.

Raises:
    TypeError: If the passed parameters count is not equal to generic model parameters count.

---
## generic_recursion_self_type
```python
from _generics import generic_recursion_self_type
```

This contextmanager should be placed around the recursive calls used to build a generic type,
and accept as arguments the generic origin type and the type arguments being passed to it.

If the same origin and arguments are observed twice, it implies that a self-reference placeholder
can be used while building the core schema, and will produce a schema_ref that will be valid in the
final parent schema.

---
## recursively_defined_type_refs
```python
from _generics import recursively_defined_type_refs
```



---
## get_cached_generic_type_early
```python
from _generics import get_cached_generic_type_early
```

The use of a two-stage cache lookup approach was necessary to have the highest performance possible for
repeated calls to `__class_getitem__` on generic types (which may happen in tighter loops during runtime),
while still ensuring that certain alternative parametrizations ultimately resolve to the same type.

As a concrete example, this approach was necessary to make Model[List[T]][int] equal to Model[List[int]].
The approach could be modified to not use two different cache keys at different points, but the
_early_cache_key is optimized to be as quick to compute as possible (for repeated-access speed), and the
_late_cache_key is optimized to be as "correct" as possible, so that two types that will ultimately be the
same after resolving the type arguments will always produce cache hits.

If we wanted to move to only using a single cache key per type, we would either need to always use the
slower/more computationally intensive logic associated with _late_cache_key, or would need to accept
that Model[List[T]][int] is a different type than Model[List[T]][int]. Because we rely on subclass relationships
during validation, I think it is worthwhile to ensure that types that are functionally equivalent are actually
equal.

---
## get_cached_generic_type_late
```python
from _generics import get_cached_generic_type_late
```

See the docstring of `get_cached_generic_type_early` for more information about the two-stage cache lookup.

---
## set_cached_generic_type
```python
from _generics import set_cached_generic_type
```

See the docstring of `get_cached_generic_type_early` for more information about why items are cached with
two different keys.

---
## _union_orderings_key
```python
from _generics import _union_orderings_key
```

This is intended to help differentiate between Union types with the same arguments in different order.

Thanks to caching internal to the `typing` module, it is not possible to distinguish between
List[Union[int, float]] and List[Union[float, int]] (and similarly for other "parent" origins besides List)
because `typing` considers Union[int, float] to be equal to Union[float, int].

However, you _can_ distinguish between (top-level) Union[int, float] vs. Union[float, int].
Because we parse items as the first Union type that is successful, we get slightly more consistent behavior
if we make an effort to distinguish the ordering of items in a union. It would be best if we could _always_
get the exact-correct order of items in the union, but that would require a change to the `typing` module itself.
(See https://github.com/python/cpython/issues/86483 for reference.)

---
## _early_cache_key
```python
from _generics import _early_cache_key
```

This is intended for minimal computational overhead during lookups of cached types.

Note that this is overly simplistic, and it's possible that two different cls/typevar_values
inputs would ultimately result in the same type being created in BaseModel.__class_getitem__.
To handle this, we have a fallback _late_cache_key that is checked later if the _early_cache_key
lookup fails, and should result in a cache hit _precisely_ when the inputs to __class_getitem__
would result in the same type.

---
## _late_cache_key
```python
from _generics import _late_cache_key
```

This is intended for use later in the process of creating a new type, when we have more information
about the exact args that will be passed. If it turns out that a different set of inputs to
__class_getitem__ resulted in the same inputs to the generic type creation process, we can still
return the cached type, and update the cache with the _early_cache_key as well.

---
## LimitedDict
```python
from _generics import LimitedDict
```

Limit the size/length of a dict used for caching to avoid unlimited increase in memory usage.

Since the dict is ordered, and we always remove elements from the beginning, this is effectively a FIFO cache.

---
## DeepChainMap
```python
from _generics import DeepChainMap
```

Variant of ChainMap that allows direct updates to inner scopes.

Taken from https://docs.python.org/3/library/collections.html#collections.ChainMap,
with some light modifications for this use case.

---
## __init__
```python
from _generics import __init__
```



---
## __setitem__
```python
from _generics import __setitem__
```



---
## clear
```python
from _generics import clear
```



---
## __delitem__
```python
from _generics import __delitem__
```



---
## __name__
```python
from _dataclasses import __name__
```

Private logic for creating pydantic dataclasses.

---
## set_dataclass_fields
```python
from _dataclasses import set_dataclass_fields
```

Collect and set `cls.__pydantic_fields__`.

Args:
    cls: The class.
    types_namespace: The types namespace, defaults to `None`.
    config_wrapper: The config wrapper instance, defaults to `None`.

---
## complete_dataclass
```python
from _dataclasses import complete_dataclass
```

Finish building a pydantic dataclass.

This logic is called on a class which has already been wrapped in `dataclasses.dataclass()`.

This is somewhat analogous to `pydantic._internal._model_construction.complete_model_class`.

Args:
    cls: The class.
    config_wrapper: The config wrapper instance.
    raise_errors: Whether to raise errors, defaults to `True`.
    types_namespace: The types namespace.

Returns:
    `True` if building a pydantic dataclass is successfully completed, `False` otherwise.

Raises:
    PydanticUndefinedAnnotation: If `raise_error` is `True` and there is an undefined annotations.

---
## is_builtin_dataclass
```python
from _dataclasses import is_builtin_dataclass
```

Returns True if a class is a stdlib dataclass and *not* a pydantic dataclass.

We check that
- `_cls` is a dataclass
- `_cls` does not inherit from a processed pydantic dataclass (and thus have a `__pydantic_validator__`)
- `_cls` does not have any annotations that are not dataclass fields
e.g.
```py
import dataclasses

import pydantic.dataclasses

@dataclasses.dataclass
class A:
    x: int

@pydantic.dataclasses.dataclass
class B(A):
    y: int
```
In this case, when we first check `B`, we make an extra check and look at the annotations ('y'),
which won't be a superset of all the dataclass fields (only the stdlib fields i.e. 'x')

Args:
    cls: The class.

Returns:
    `True` if the class is a stdlib dataclass, `False` otherwise.

---
## StandardDataclass
```python
from _dataclasses import StandardDataclass
```



---
## PydanticDataclass
```python
from _dataclasses import PydanticDataclass
```

A protocol containing attributes only available once a class has been decorated as a Pydantic dataclass.

Attributes:
    __pydantic_config__: Pydantic-specific configuration settings for the dataclass.
    __pydantic_complete__: Whether dataclass building is completed, or if there are still undefined fields.
    __pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
    __pydantic_decorators__: Metadata containing the decorators defined on the dataclass.
    __pydantic_fields__: Metadata about the fields defined on the dataclass.
    __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the dataclass.
    __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the dataclass.

---
## __init__
```python
from _dataclasses import __init__
```



---
## validated_setattr
```python
from _dataclasses import validated_setattr
```



---
## __name__
```python
from _internal_dataclass import __name__
```



---
## sequence_like
```python
from _utils import sequence_like
```



---
## lenient_isinstance
```python
from _utils import lenient_isinstance
```



---
## lenient_issubclass
```python
from _utils import lenient_issubclass
```



---
## is_model_class
```python
from _utils import is_model_class
```

Returns true if cls is a _proper_ subclass of BaseModel, and provides proper type-checking,
unlike raw calls to lenient_issubclass.

---
## is_valid_identifier
```python
from _utils import is_valid_identifier
```

Checks that a string is a valid identifier and not a Python keyword.
:param identifier: The identifier to test.
:return: True if the identifier is valid.

---
## deep_update
```python
from _utils import deep_update
```



---
## update_not_none
```python
from _utils import update_not_none
```



---
## unique_list
```python
from _utils import unique_list
```

Make a list unique while maintaining order.
We update the list if another one with the same name is set
(e.g. model validator overridden in subclass).

---
## ValueItems
```python
from _utils import ValueItems
```

Class for more convenient calculation of excluded or included fields on values.

---
## smart_deepcopy
```python
from _utils import smart_deepcopy
```

Return type as is for immutable built-in types
Use obj.copy() for built-in empty collections
Use copy.deepcopy() for non-empty collections and unknown objects.

---
## all_identical
```python
from _utils import all_identical
```

Check that the items of `left` are the same objects as those in `right`.

>>> a, b = object(), object()
>>> all_identical([a, b, a], [a, b, a])
True
>>> all_identical([a, b, [a]], [a, b, [a]])  # new list object, while "equal" is not "identical"
False

---
## SafeGetItemProxy
```python
from _utils import SafeGetItemProxy
```

Wrapper redirecting `__getitem__` to `get` with a sentinel value as default

This makes is safe to use in `operator.itemgetter` when some keys may be missing

---
## is_excluded
```python
from _utils import is_excluded
```

Check if item is fully excluded.

:param item: key or index of a value

---
## is_included
```python
from _utils import is_included
```

Check if value is contained in self._items.

:param item: key or index of value

---
## for_element
```python
from _utils import for_element
```

:param e: key or index of element on value
:return: raw values for element if self._items is dict and contain needed element

---
## _normalize_indexes
```python
from _utils import _normalize_indexes
```

:param items: dict or set of indexes which will be normalized
:param v_length: length of sequence indexes of which will be

>>> self._normalize_indexes({0: True, -2: True, -1: True}, 4)
{0: True, 2: True, 3: True}
>>> self._normalize_indexes({'__all__': True}, 4)
{0: True, 1: True, 2: True, 3: True}

---
## merge
```python
from _utils import merge
```

Merge a `base` item with an `override` item.

Both `base` and `override` are converted to dictionaries if possible.
Sets are converted to dictionaries with the sets entries as keys and
Ellipsis as values.

Each key-value pair existing in `base` is merged with `override`,
while the rest of the key-value pairs are updated recursively with this function.

Merging takes place based on the "union" of keys if `intersect` is
set to `False` (default) and on the intersection of keys if
`intersect` is set to `True`.

---
## _coerce_items
```python
from _utils import _coerce_items
```



---
## _coerce_value
```python
from _utils import _coerce_value
```



---
## is_true
```python
from _utils import is_true
```



---
## __repr_args__
```python
from _utils import __repr_args__
```



---
## ClassAttribute
```python
from _utils import ClassAttribute
```

Hide class attribute from its instances.

---
## __get__
```python
from _utils import __get__
```



---
## __contains__
```python
from _utils import __contains__
```



---
## __name__
```python
from pipeline import __name__
```

Experimental pipeline API functionality. Be careful with this API, it's subject to change.

---
## _ValidateAs
```python
from pipeline import _ValidateAs
```



---
## _ValidateAsDefer
```python
from pipeline import _ValidateAsDefer
```



---
## _Transform
```python
from pipeline import _Transform
```



---
## _PipelineOr
```python
from pipeline import _PipelineOr
```



---
## _PipelineAnd
```python
from pipeline import _PipelineAnd
```



---
## _Eq
```python
from pipeline import _Eq
```



---
## _NotEq
```python
from pipeline import _NotEq
```



---
## _In
```python
from pipeline import _In
```



---
## _NotIn
```python
from pipeline import _NotIn
```



---
## _Constraint
```python
from pipeline import _Constraint
```



---
## _FieldTypeMarker
```python
from pipeline import _FieldTypeMarker
```



---
## _Pipeline
```python
from pipeline import _Pipeline
```

Abstract representation of a chain of validation, transformation, and parsing steps.

---
## _check_func
```python
from pipeline import _check_func
```



---
## _apply_step
```python
from pipeline import _apply_step
```



---
## _apply_parse
```python
from pipeline import _apply_parse
```



---
## _apply_transform
```python
from pipeline import _apply_transform
```



---
## _apply_constraint
```python
from pipeline import _apply_constraint
```

Apply a single constraint to a schema.

---
## _SupportsRange
```python
from pipeline import _SupportsRange
```



---
## _SupportsLen
```python
from pipeline import _SupportsLen
```



---
## tp
```python
from pipeline import tp
```



---
## transform
```python
from pipeline import transform
```

Transform the output of the previous step.

If used as the first step in a pipeline, the type of the field is used.
That is, the transformation is applied to after the value is parsed to the field's type.

---
## validate_as
```python
from pipeline import validate_as
```

Validate / parse the input into a new type.

If no type is provided, the type of the field is used.

Types are parsed in Pydantic's `lax` mode by default,
but you can enable `strict` mode by passing `strict=True`.

---
## validate_as_deferred
```python
from pipeline import validate_as_deferred
```

Parse the input into a new type, deferring resolution of the type until the current class
is fully defined.

This is useful when you need to reference the class in it's own type annotations.

---
## constrain
```python
from pipeline import constrain
```

Constrain a value to meet a certain condition.

We support most conditions from `annotated_types`, as well as regular expressions.

Most of the time you'll be calling a shortcut method like `gt`, `lt`, `len`, etc
so you don't need to call this directly.

---
## predicate
```python
from pipeline import predicate
```

Constrain a value to meet a certain predicate.

---
## gt
```python
from pipeline import gt
```

Constrain a value to be greater than a certain value.

---
## lt
```python
from pipeline import lt
```

Constrain a value to be less than a certain value.

---
## ge
```python
from pipeline import ge
```

Constrain a value to be greater than or equal to a certain value.

---
## le
```python
from pipeline import le
```

Constrain a value to be less than or equal to a certain value.

---
## len
```python
from pipeline import len
```

Constrain a value to have a certain length.

---
## multiple_of
```python
from pipeline import multiple_of
```

Constrain a value to be a multiple of a certain number.

---
## eq
```python
from pipeline import eq
```

Constrain a value to be equal to a certain value.

---
## not_eq
```python
from pipeline import not_eq
```

Constrain a value to not be equal to a certain value.

---
## in_
```python
from pipeline import in_
```

Constrain a value to be in a certain set.

---
## not_in
```python
from pipeline import not_in
```

Constrain a value to not be in a certain set.

---
## datetime_tz_naive
```python
from pipeline import datetime_tz_naive
```



---
## datetime_tz_aware
```python
from pipeline import datetime_tz_aware
```



---
## datetime_tz
```python
from pipeline import datetime_tz
```



---
## datetime_with_tz
```python
from pipeline import datetime_with_tz
```



---
## str_lower
```python
from pipeline import str_lower
```



---
## str_upper
```python
from pipeline import str_upper
```



---
## str_title
```python
from pipeline import str_title
```



---
## str_strip
```python
from pipeline import str_strip
```



---
## str_pattern
```python
from pipeline import str_pattern
```



---
## str_contains
```python
from pipeline import str_contains
```



---
## str_starts_with
```python
from pipeline import str_starts_with
```



---
## str_ends_with
```python
from pipeline import str_ends_with
```



---
## otherwise
```python
from pipeline import otherwise
```

Combine two validation chains, returning the result of the first chain if it succeeds, and the second chain if it fails.

---
## then
```python
from pipeline import then
```

Pipe the result of one validation chain into another.

---
## __get_pydantic_core_schema__
```python
from pipeline import __get_pydantic_core_schema__
```



---
## __supports_type__
```python
from pipeline import __supports_type__
```



---
## handler
```python
from pipeline import handler
```



---
## __len__
```python
from pipeline import __len__
```



---
## check_gt
```python
from pipeline import check_gt
```



---
## check_ge
```python
from pipeline import check_ge
```



---
## check_lt
```python
from pipeline import check_lt
```



---
## check_le
```python
from pipeline import check_le
```



---
## check_len
```python
from pipeline import check_len
```



---
## check_multiple_of
```python
from pipeline import check_multiple_of
```



---
## check_tz_aware
```python
from pipeline import check_tz_aware
```



---
## check_tz_naive
```python
from pipeline import check_tz_naive
```



---
## check_not_eq
```python
from pipeline import check_not_eq
```



---
## check_eq
```python
from pipeline import check_eq
```



---
## check_in
```python
from pipeline import check_in
```



---
## check_not_in
```python
from pipeline import check_not_in
```



---
## check_pattern
```python
from pipeline import check_pattern
```



---
## __name__
```python
from _loader import __name__
```



---
## get_plugins
```python
from _loader import get_plugins
```

Load plugins for Pydantic.

Inspired by: https://github.com/pytest-dev/pluggy/blob/1.3.0/src/pluggy/_manager.py#L376-L402

---
## SchemaTypePath
```python
from __init__ import SchemaTypePath
```

Path defining where `schema_type` was defined, or where `TypeAdapter` was called.

---
## PydanticPluginProtocol
```python
from __init__ import PydanticPluginProtocol
```

Protocol defining the interface for Pydantic plugins.

---
## BaseValidateHandlerProtocol
```python
from __init__ import BaseValidateHandlerProtocol
```

Base class for plugin callbacks protocols.

You shouldn't implement this protocol directly, instead use one of the subclasses with adds the correctly
typed `on_error` method.

---
## ValidatePythonHandlerProtocol
```python
from __init__ import ValidatePythonHandlerProtocol
```

Event handler for `SchemaValidator.validate_python`.

---
## ValidateJsonHandlerProtocol
```python
from __init__ import ValidateJsonHandlerProtocol
```

Event handler for `SchemaValidator.validate_json`.

---
## ValidateStringsHandlerProtocol
```python
from __init__ import ValidateStringsHandlerProtocol
```

Event handler for `SchemaValidator.validate_strings`.

---
## new_schema_validator
```python
from __init__ import new_schema_validator
```

This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator]
is created.

It should return an event handler for each of the three validation methods, or `None` if the plugin does not
implement that method.

Args:
    schema: The schema to validate against.
    schema_type: The original type which the schema was created from, e.g. the model class.
    schema_type_path: Path defining where `schema_type` was defined, or where `TypeAdapter` was called.
    schema_kind: The kind of schema to validate against.
    config: The config to use for validation.
    plugin_settings: Any plugin settings.

Returns:
    A tuple of optional event handlers for each of the three validation methods -
        `validate_python`, `validate_json`, `validate_strings`.

---
## on_success
```python
from __init__ import on_success
```

Callback to be notified of successful validation.

Args:
    result: The result of the validation.

---
## on_error
```python
from __init__ import on_error
```

Callback to be notified of validation errors.

Args:
    error: The validation error.

---
## on_exception
```python
from __init__ import on_exception
```

Callback to be notified of validation exceptions.

Args:
    exception: The exception raised during validation.

---
## on_enter
```python
from __init__ import on_enter
```

Callback to be notified of validation start, and create an instance of the event handler.

Args:
    input: The string data to be validated.
    strict: Whether to validate the object in strict mode.
    context: The context to use for validation, this is passed to functional validators.

---
## __name__
```python
from _schema_validator import __name__
```

Pluggable schema validator for pydantic.

---
## create_schema_validator
```python
from _schema_validator import create_schema_validator
```

Create a `SchemaValidator` or `PluggableSchemaValidator` if plugins are installed.

Returns:
    If plugins are installed then return `PluggableSchemaValidator`, otherwise return `SchemaValidator`.

---
## PluggableSchemaValidator
```python
from _schema_validator import PluggableSchemaValidator
```

Pluggable schema validator.

---
## build_wrapper
```python
from _schema_validator import build_wrapper
```



---
## filter_handlers
```python
from _schema_validator import filter_handlers
```

Filter out handler methods which are not implemented by the plugin directly - e.g. are missing
or are inherited from the protocol.

---
## __init__
```python
from _schema_validator import __init__
```



---
## __getattr__
```python
from _schema_validator import __getattr__
```



---
## wrapper
```python
from _schema_validator import wrapper
```



---
## _ConfigMetaclass
```python
from config import _ConfigMetaclass
```



---
## _ExtraMeta
```python
from config import _ExtraMeta
```



---
## __init_subclass__
```python
from config import __init_subclass__
```



---
## __getattribute__
```python
from config import __getattribute__
```



---
## __name__
```python
from copy_internals import __name__
```



---
## _iter
```python
from copy_internals import _iter
```



---
## _copy_and_set_values
```python
from copy_internals import _copy_and_set_values
```



---
## _get_value
```python
from copy_internals import _get_value
```



---
## _calculate_keys
```python
from copy_internals import _calculate_keys
```



---
## _OnlyValueValidatorClsMethod
```python
from class_validators import _OnlyValueValidatorClsMethod
```



---
## _V1ValidatorWithValuesClsMethod
```python
from class_validators import _V1ValidatorWithValuesClsMethod
```



---
## _V1ValidatorWithValuesKwOnlyClsMethod
```python
from class_validators import _V1ValidatorWithValuesKwOnlyClsMethod
```



---
## _V1ValidatorWithKwargsClsMethod
```python
from class_validators import _V1ValidatorWithKwargsClsMethod
```



---
## _V1ValidatorWithValuesAndKwargsClsMethod
```python
from class_validators import _V1ValidatorWithValuesAndKwargsClsMethod
```



---
## _V1RootValidatorClsMethod
```python
from class_validators import _V1RootValidatorClsMethod
```



---
## __call__
```python
from class_validators import __call__
```



---
## __name__
```python
from indexing import __name__
```



---
## CompositionDecomposition
```python
from indexing import CompositionDecomposition
```



---
## arange_at_position
```python
from indexing import arange_at_position
```



---
## IndexingFormula
```python
from indexing import IndexingFormula
```



---
## einindex
```python
from indexing import einindex
```

Demonstrates how einindex should work.
Supports data-api compliant arrays.

---
## test_composition_and_decomposition
```python
from indexing import test_composition_and_decomposition
```



---
## test_simple_indexing
```python
from indexing import test_simple_indexing
```



---
## test_multidimensional_indexing
```python
from indexing import test_multidimensional_indexing
```



---
## test_reverse_indexing
```python
from indexing import test_reverse_indexing
```



---
## __init__
```python
from indexing import __init__
```



---
## decompose
```python
from indexing import decompose
```



---
## compose
```python
from indexing import compose
```



---
## apply_to_array_api
```python
from indexing import apply_to_array_api
```



---
## __name__
```python
from paddle import __name__
```



---
## Rearrange
```python
from paddle import Rearrange
```



---
## Reduce
```python
from paddle import Reduce
```



---
## EinMix
```python
from paddle import EinMix
```



---
## forward
```python
from paddle import forward
```



---
## _create_parameters
```python
from paddle import _create_parameters
```



---
## _create_rearrange_layers
```python
from paddle import _create_rearrange_layers
```



---
## RearrangeMixin
```python
from __init__ import RearrangeMixin
```

Rearrange layer behaves identically to einops.rearrange operation.

:param pattern: str, rearrangement pattern
:param axes_lengths: any additional specification of dimensions

See einops.rearrange for source_examples.

---
## ReduceMixin
```python
from __init__ import ReduceMixin
```

Reduce layer behaves identically to einops.reduce operation.

:param pattern: str, rearrangement pattern
:param reduction: one of available reductions ('min', 'max', 'sum', 'mean', 'prod'), case-sensitive
:param axes_lengths: any additional specification of dimensions

See einops.reduce for source_examples.

---
## multirecipe
```python
from __init__ import multirecipe
```



---
## _apply_recipe
```python
from __init__ import _apply_recipe
```



---
## __name__
```python
from tensorflow import __name__
```

Comment about tensorflow layers:
unfortunately instructions on creation of TF layers change constantly,
and changed way too many times at this point to remember what-compatible-where.

Layers in einops==0.7.0 (and several prior versions)
 are compatible with TF 2.13

Layers in einops==0.8.0 were re-implemented
 according to official instructions for TF 2.16

---
## Rearrange
```python
from tensorflow import Rearrange
```



---
## Reduce
```python
from tensorflow import Reduce
```



---
## EinMix
```python
from tensorflow import EinMix
```



---
## build
```python
from tensorflow import build
```



---
## call
```python
from tensorflow import call
```



---
## get_config
```python
from tensorflow import get_config
```



---
## _create_parameters
```python
from tensorflow import _create_parameters
```



---
## _create_rearrange_layers
```python
from tensorflow import _create_rearrange_layers
```



---
## __name__
```python
from _einmix import __name__
```



---
## _report_axes
```python
from _einmix import _report_axes
```



---
## _EinmixMixin
```python
from _einmix import _EinmixMixin
```



---
## __init__
```python
from _einmix import __init__
```

EinMix - Einstein summation with automated tensor management and axis packing/unpacking.

EinMix is an advanced tool, helpful tutorial:
https://github.com/arogozhnikov/einops/blob/master/docs/3-einmix-layer.ipynb

Imagine taking einsum with two arguments, one of each input, and one - tensor with weights
>>> einsum('time batch channel_in, channel_in channel_out -> time batch channel_out', input, weight)

This layer manages weights for you, syntax highlights separate role of weight matrix
>>> EinMix('time batch channel_in -> time batch channel_out', weight_shape='channel_in channel_out')
But otherwise it is the same einsum under the hood.

Simple linear layer with bias term (you have one like that in your framework)
>>> EinMix('t b cin -> t b cout', weight_shape='cin cout', bias_shape='cout', cin=10, cout=20)
There is no restriction to mix the last axis. Let's mix along height
>>> EinMix('h w c-> hout w c', weight_shape='h hout', bias_shape='hout', h=32, hout=32)
Channel-wise multiplication (like one used in normalizations)
>>> EinMix('t b c -> t b c', weight_shape='c', c=128)
Multi-head linear layer (each head is own linear layer):
>>> EinMix('t b (head cin) -> t b (head cout)', weight_shape='head cin cout', ...)

... and yes, you need to specify all dimensions of weight shape/bias shape in parameters.

Use cases:
- when channel dimension is not last, use EinMix, not transposition
- patch/segment embeddings
- when need only within-group connections to reduce number of weights and computations
- perfect as a part of sequential models
- next-gen MLPs (follow tutorial to learn more!)

Uniform He initialization is applied to weight tensor. This accounts for number of elements mixed.

Parameters
:param pattern: transformation pattern, left side - dimensions of input, right side - dimensions of output
:param weight_shape: axes of weight. A tensor of this shape is created, stored, and optimized in a layer
:param bias_shape: axes of bias added to output. Weights of this shape are created and stored. If `None` (the default), no bias is added.
:param axes_lengths: dimensions of weight tensor

---
## initialize_einmix
```python
from _einmix import initialize_einmix
```



---
## _create_rearrange_layers
```python
from _einmix import _create_rearrange_layers
```



---
## _create_parameters
```python
from _einmix import _create_parameters
```

Shape and implementations

---
## __repr__
```python
from _einmix import __repr__
```



---
## write_flat
```python
from _einmix import write_flat
```



---
## __name__
```python
from torch import __name__
```



---
## Rearrange
```python
from torch import Rearrange
```



---
## Reduce
```python
from torch import Reduce
```



---
## EinMix
```python
from torch import EinMix
```



---
## forward
```python
from torch import forward
```



---
## _apply_recipe
```python
from torch import _apply_recipe
```



---
## _create_parameters
```python
from torch import _create_parameters
```



---
## _create_rearrange_layers
```python
from torch import _create_rearrange_layers
```



---
## __name__
```python
from oneflow import __name__
```



---
## Rearrange
```python
from oneflow import Rearrange
```



---
## Reduce
```python
from oneflow import Reduce
```



---
## EinMix
```python
from oneflow import EinMix
```



---
## forward
```python
from oneflow import forward
```



---
## _create_parameters
```python
from oneflow import _create_parameters
```



---
## _create_rearrange_layers
```python
from oneflow import _create_rearrange_layers
```



---
## __name__
```python
from flax import __name__
```



---
## Reduce
```python
from flax import Reduce
```



---
## Rearrange
```python
from flax import Rearrange
```



---
## EinMix
```python
from flax import EinMix
```



---
## setup
```python
from flax import setup
```



---
## __call__
```python
from flax import __call__
```



---
## _create_parameters
```python
from flax import _create_parameters
```



---
## _create_rearrange_layers
```python
from flax import _create_rearrange_layers
```



---
## Rearrange
```python
from chainer import Rearrange
```



---
## Reduce
```python
from chainer import Reduce
```



---
## EinMix
```python
from chainer import EinMix
```



---
## __call__
```python
from chainer import __call__
```



---
## _create_parameters
```python
from chainer import _create_parameters
```



---
## _create_rearrange_layers
```python
from chainer import _create_rearrange_layers
```



---
## _WarningStream
```python
from check import _WarningStream
```



---
## _parse_content_type
```python
from check import _parse_content_type
```

Implement logic of deprecated cgi.parse_header().

From https://docs.python.org/3.11/library/cgi.html#cgi.parse_header.

---
## _check_file
```python
from check import _check_file
```

Check given distribution.

---
## check
```python
from check import check
```

Check that a distribution will render correctly on PyPI and display the results.

This is currently only validates ``long_description``, but more checks could be
added; see https://github.com/pypa/twine/projects/2.

:param dists:
    The distribution files to check.
:param output_stream:
    The destination of the resulting output.
:param strict:
    If ``True``, treat warnings as errors.

:return:
    ``True`` if there are rendering errors, otherwise ``False``.

---
## main
```python
from check import main
```

Execute the ``check`` command.

:param args:
    The command-line arguments.

:return:
    The exit status of the ``check`` command.

---
## write
```python
from check import write
```



---
## __str__
```python
from check import __str__
```



---
## skip_upload
```python
from upload import skip_upload
```

Determine if a failed upload is an error or can be safely ignored.

:param response:
    The response from attempting to upload ``package`` to a repository.
:param skip_existing:
    If ``True``, use the status and content of ``response`` to determine if the
    package already exists on the repository. If so, then a failed upload is safe
    to ignore.
:param package:
    The package that was being uploaded.

:return:
    ``True`` if a failed upload can be safely ignored, otherwise ``False``.

---
## _make_package
```python
from upload import _make_package
```

Create and sign a package, based off of filename, signatures, and settings.

Additionally, any supplied attestations are attached to the package when
the settings indicate to do so.

---
## Inputs
```python
from upload import Inputs
```

Represents structured user inputs.

---
## _split_inputs
```python
from upload import _split_inputs
```

Split the unstructured list of input files provided by the user into groups.

Three groups are returned: upload files (i.e. dists), signatures, and attestations.

Upload files are returned as a linear list, signatures are returned as a
dict of ``basename -> path``, and attestations are returned as a dict of
``dist-path -> [attestation-path]``.

---
## upload
```python
from upload import upload
```

Upload one or more distributions to a repository, and display the progress.

If a package already exists on the repository, most repositories will return an
error response. However, if ``upload_settings.skip_existing`` is ``True``, a message
will be displayed and any remaining distributions will be uploaded.

For known repositories (like PyPI), the web URLs of successfully uploaded packages
will be displayed.

:param upload_settings:
    The configured options related to uploading to a repository.
:param dists:
    The distribution files to upload to the repository. This can also include
    ``.asc`` and ``.attestation`` files, which will be added to their respective
    file uploads.

:raises twine.exceptions.TwineException:
    The upload failed due to a configuration error.
:raises requests.HTTPError:
    The repository responded with an error.

---
## main
```python
from upload import main
```

Execute the ``upload`` command.

:param args:
    The command-line arguments.

---
## __name__
```python
from register import __name__
```

Module containing the logic for ``twine register``.

---
## register
```python
from register import register
```

Pre-register a package name with a repository before uploading a distribution.

Pre-registration is not supported on PyPI, so the ``register`` command is only
necessary if you are using a different repository that requires it.

:param register_settings:
    The configured options relating to repository registration.
:param package:
    The path of the distribution to use for package metadata.

:raises twine.exceptions.TwineException:
    The registration failed due to a configuration error.
:raises requests.HTTPError:
    The repository responded with an error.

---
## main
```python
from register import main
```

Execute the ``register`` command.

:param args:
    The command-line arguments.

---
## _group_wheel_files_first
```python
from __init__ import _group_wheel_files_first
```



---
## _find_dists
```python
from __init__ import _find_dists
```



---
## __name__
```python
from test_functors import __name__
```



---
## f
```python
from test_functors import f
```



---
## g
```python
from test_functors import g
```



---
## h
```python
from test_functors import h
```



---
## test_functools
```python
from test_functors import test_functools
```



---
## __name__
```python
from test_restricted import __name__
```



---
## RestrictedType
```python
from test_restricted import RestrictedType
```



---
## restricted_func
```python
from test_restricted import restricted_func
```



---
## test_function_with_restricted_object
```python
from test_restricted import test_function_with_restricted_object
```



---
## __bool__
```python
from test_restricted import __bool__
```



---
## __name__
```python
from test_weakref import __name__
```



---
## _class
```python
from test_weakref import _class
```



---
## _callable_class
```python
from test_weakref import _callable_class
```



---
## _function
```python
from test_weakref import _function
```



---
## test_weakref
```python
from test_weakref import test_weakref
```



---
## test_dictproxy
```python
from test_weakref import test_dictproxy
```



---
## _method
```python
from test_weakref import _method
```



---
## __call__
```python
from test_weakref import __call__
```



---
## __name__
```python
from test_extendpickle import __name__
```



---
## my_fn
```python
from test_extendpickle import my_fn
```



---
## test_extend
```python
from test_extendpickle import test_extend
```



---
## test_isdill
```python
from test_extendpickle import test_isdill
```



---
## __name__
```python
from test_module import __name__
```



---
## test_attributes
```python
from test_module import test_attributes
```



---
## get_lambda
```python
from test_module import get_lambda
```



---
## test_module_is_none
```python
from test_module import test_module_is_none
```



---
## test_diff_attributes
```python
from test_module import test_diff_attributes
```



---
## __name__
```python
from test_session import __name__
```



---
## _error_line
```python
from test_session import _error_line
```



---
## squared
```python
from test_session import squared
```



---
## Person
```python
from test_session import Person
```



---
## CalendarSubclass
```python
from test_session import CalendarSubclass
```



---
## TestNamespace
```python
from test_session import TestNamespace
```



---
## _clean_up_cache
```python
from test_session import _clean_up_cache
```



---
## _test_objects
```python
from test_session import _test_objects
```



---
## test_session_main
```python
from test_session import test_session_main
```

test dump/load_module() for __main__, both in this process and in a subprocess

---
## test_session_other
```python
from test_session import test_session_other
```

test dump/load_module() for a module other than __main__

---
## test_runtime_module
```python
from test_session import test_runtime_module
```



---
## test_refimported_imported_as
```python
from test_session import test_refimported_imported_as
```



---
## test_load_module_asdict
```python
from test_session import test_load_module_asdict
```



---
## test_modules
```python
from test_session import test_modules
```



---
## __init__
```python
from test_session import __init__
```



---
## weekdays
```python
from test_session import weekdays
```



---
## __enter__
```python
from test_session import __enter__
```



---
## __exit__
```python
from test_session import __exit__
```



---
## __name__
```python
from test_pycapsule import __name__
```

test pickling a PyCapsule object

---
## test_pycapsule
```python
from test_pycapsule import test_pycapsule
```



---
## __name__
```python
from test_source import __name__
```



---
## g
```python
from test_source import g
```



---
## h
```python
from test_source import h
```



---
## Foo
```python
from test_source import Foo
```



---
## add
```python
from test_source import add
```



---
## Bar
```python
from test_source import Bar
```



---
## test_getsource
```python
from test_source import test_getsource
```



---
## test_itself
```python
from test_source import test_itself
```



---
## test_builtin
```python
from test_source import test_builtin
```



---
## test_imported
```python
from test_source import test_imported
```



---
## test_dynamic
```python
from test_source import test_dynamic
```



---
## test_classes
```python
from test_source import test_classes
```



---
## test_importable
```python
from test_source import test_importable
```



---
## test_numpy
```python
from test_source import test_numpy
```



---
## test_foo
```python
from test_source import test_foo
```



---
## bar
```python
from test_source import bar
```



---
## __name__
```python
from test_detect import __name__
```



---
## test_bad_things
```python
from test_detect import test_bad_things
```



---
## test_parent
```python
from test_detect import test_parent
```



---
## squared
```python
from test_detect import squared
```



---
## foo
```python
from test_detect import foo
```



---
## _class
```python
from test_detect import _class
```



---
## test_globals
```python
from test_detect import test_globals
```



---
## Foo
```python
from test_detect import Foo
```



---
## test_getstate
```python
from test_detect import test_getstate
```



---
## test_deleted
```python
from test_detect import test_deleted
```



---
## test_lambdify
```python
from test_detect import test_lambdify
```



---
## bar
```python
from test_detect import bar
```



---
## _method
```python
from test_detect import _method
```



---
## ok
```python
from test_detect import ok
```



---
## f
```python
from test_detect import f
```



---
## __init__
```python
from test_detect import __init__
```



---
## __getstate__
```python
from test_detect import __getstate__
```



---
## __setstate__
```python
from test_detect import __setstate__
```



---
## sinc
```python
from test_detect import sinc
```



---
## g
```python
from test_detect import g
```



---
## h
```python
from test_detect import h
```



---
## __name__
```python
from test_registered import __name__
```

test pickling registered objects

---
## check
```python
from test_registered import check
```



---
## __name__
```python
from test_nested import __name__
```

test dill's ability to handle nested functions

---
## adder
```python
from test_nested import adder
```



---
## cadder
```python
from test_nested import cadder
```



---
## c2adder
```python
from test_nested import c2adder
```



---
## basic
```python
from test_nested import basic
```



---
## basic2
```python
from test_nested import basic2
```



---
## test_basic
```python
from test_nested import test_basic
```



---
## test_basic_class
```python
from test_nested import test_basic_class
```



---
## test_c2adder
```python
from test_nested import test_c2adder
```



---
## test_pickled_cadder
```python
from test_nested import test_pickled_cadder
```



---
## test_raw_adder_and_inner
```python
from test_nested import test_raw_adder_and_inner
```



---
## test_pickled_adder
```python
from test_nested import test_pickled_adder
```



---
## test_pickled_inner
```python
from test_nested import test_pickled_inner
```



---
## test_moduledict_where_not_main
```python
from test_nested import test_moduledict_where_not_main
```



---
## inner
```python
from test_nested import inner
```



---
## __init__
```python
from test_nested import __init__
```



---
## __call__
```python
from test_nested import __call__
```



---
## __name__
```python
from test_dataclasses import __name__
```

test pickling a dataclass

---
## test_dataclasses
```python
from test_dataclasses import test_dataclasses
```



---
## A
```python
from test_dataclasses import A
```



---
## B
```python
from test_dataclasses import B
```



---
## __name__
```python
from test_fglobals import __name__
```



---
## get_fun_with_strftime
```python
from test_fglobals import get_fun_with_strftime
```



---
## get_fun_with_strftime2
```python
from test_fglobals import get_fun_with_strftime2
```



---
## test_doc_dill_issue_219
```python
from test_fglobals import test_doc_dill_issue_219
```



---
## get_fun_with_internal_import
```python
from test_fglobals import get_fun_with_internal_import
```



---
## test_method_with_internal_import_should_work
```python
from test_fglobals import test_method_with_internal_import_should_work
```



---
## fun_with_strftime
```python
from test_fglobals import fun_with_strftime
```



---
## fun_with_import
```python
from test_fglobals import fun_with_import
```



---
## __name__
```python
from test_diff import __name__
```



---
## A
```python
from test_diff import A
```



---
## test_diff
```python
from test_diff import test_diff
```



---
## wtf
```python
from test_mixins import wtf
```



---
## quad
```python
from test_mixins import quad
```



---
## double_add
```python
from test_mixins import double_add
```



---
## quad_factory
```python
from test_mixins import quad_factory
```



---
## quadish
```python
from test_mixins import quadish
```



---
## doubler
```python
from test_mixins import doubler
```



---
## quadruple
```python
from test_mixins import quadruple
```



---
## test_mixins
```python
from test_mixins import test_mixins
```



---
## zzz
```python
from test_mixins import zzz
```



---
## yyy
```python
from test_mixins import yyy
```



---
## xxx
```python
from test_mixins import xxx
```



---
## invert
```python
from test_mixins import invert
```



---
## dec
```python
from test_mixins import dec
```



---
## inner
```python
from test_mixins import inner
```



---
## func
```python
from test_mixins import func
```



---
## __name__
```python
from test_temp import __name__
```



---
## test_code_to_tempfile
```python
from test_temp import test_code_to_tempfile
```



---
## test_code_to_stream
```python
from test_temp import test_code_to_stream
```



---
## test_pickle_to_tempfile
```python
from test_temp import test_pickle_to_tempfile
```



---
## test_pickle_to_stream
```python
from test_temp import test_pickle_to_stream
```



---
## g
```python
from test_temp import g
```



---
## h
```python
from test_temp import h
```



---
## Foo
```python
from test_temp import Foo
```



---
## add
```python
from test_temp import add
```



---
## Bar
```python
from test_temp import Bar
```



---
## test_two_arg_functions
```python
from test_temp import test_two_arg_functions
```



---
## test_one_arg_functions
```python
from test_temp import test_one_arg_functions
```



---
## test_the_rest
```python
from test_temp import test_the_rest
```



---
## bar
```python
from test_temp import bar
```



---
## __name__
```python
from test_selected import __name__
```

testing some selected object types

---
## test_dict_contents
```python
from test_selected import test_dict_contents
```



---
## _g
```python
from test_selected import _g
```



---
## _f
```python
from test_selected import _f
```



---
## _d
```python
from test_selected import _d
```



---
## test_class_descriptors
```python
from test_selected import test_class_descriptors
```



---
## test_class
```python
from test_selected import test_class
```



---
## test_frame_related
```python
from test_selected import test_frame_related
```



---
## test_typing
```python
from test_selected import test_typing
```



---
## _method
```python
from test_selected import _method
```



---
## write_randomness
```python
from test_file import write_randomness
```



---
## trunc_file
```python
from test_file import trunc_file
```



---
## throws
```python
from test_file import throws
```



---
## teardown_module
```python
from test_file import teardown_module
```



---
## bench
```python
from test_file import bench
```



---
## test_nostrictio_handlefmode
```python
from test_file import test_nostrictio_handlefmode
```



---
## test_nostrictio_filefmode
```python
from test_file import test_nostrictio_filefmode
```



---
## test_nostrictio_contentsfmode
```python
from test_file import test_nostrictio_contentsfmode
```



---
## __name__
```python
from test_check import __name__
```



---
## raise_check
```python
from test_check import raise_check
```



---
## test_simple
```python
from test_check import test_simple
```



---
## test_recurse
```python
from test_check import test_recurse
```



---
## test_byref
```python
from test_check import test_byref
```



---
## test_protocol
```python
from test_check import test_protocol
```



---
## test_python
```python
from test_check import test_python
```



---
## __name__
```python
from test_functions import __name__
```



---
## function_a
```python
from test_functions import function_a
```



---
## function_b
```python
from test_functions import function_b
```



---
## function_c
```python
from test_functions import function_c
```



---
## function_d
```python
from test_functions import function_d
```

doc string

---
## function_with_cache
```python
from test_functions import function_with_cache
```



---
## function_with_unassigned_variable
```python
from test_functions import function_with_unassigned_variable
```



---
## test_issue_510
```python
from test_functions import test_issue_510
```



---
## test_functions
```python
from test_functions import test_functions
```



---
## test_code_object
```python
from test_functions import test_code_object
```



---
## Foo
```python
from test_functions import Foo
```



---
## __init__
```python
from test_functions import __init__
```



---
## f2
```python
from test_functions import f2
```



---
## OneTwoThree
```python
from test_abc import OneTwoThree
```



---
## EasyAsAbc
```python
from test_abc import EasyAsAbc
```



---
## test_abc_non_local
```python
from test_abc import test_abc_non_local
```



---
## test_abc_local
```python
from test_abc import test_abc_local
```

Test using locally scoped ABC class

---
## test_meta_local_no_cache
```python
from test_abc import test_meta_local_no_cache
```

Test calling metaclass and cache registration

---
## foo
```python
from test_abc import foo
```



---
## bar
```python
from test_abc import bar
```



---
## cfoo
```python
from test_abc import cfoo
```



---
## sfoo
```python
from test_abc import sfoo
```



---
## __init__
```python
from test_abc import __init__
```



---
## LocalABC
```python
from test_abc import LocalABC
```



---
## Real
```python
from test_abc import Real
```



---
## ClassyClass
```python
from test_abc import ClassyClass
```



---
## KlassyClass
```python
from test_abc import KlassyClass
```



---
## baz
```python
from test_abc import baz
```



---
## __name__
```python
from test_classdef import __name__
```



---
## _class
```python
from test_classdef import _class
```



---
## _class2
```python
from test_classdef import _class2
```



---
## _newclass
```python
from test_classdef import _newclass
```



---
## _newclass2
```python
from test_classdef import _newclass2
```



---
## _meta
```python
from test_classdef import _meta
```



---
## __call__
```python
from test_classdef import __call__
```



---
## ok
```python
from test_classdef import ok
```



---
## test_class_instances
```python
from test_classdef import test_class_instances
```



---
## test_class_objects
```python
from test_classdef import test_class_objects
```



---
## test_specialtypes
```python
from test_classdef import test_specialtypes
```



---
## test_namedtuple
```python
from test_classdef import test_namedtuple
```



---
## test_dtype
```python
from test_classdef import test_dtype
```



---
## test_array_nested
```python
from test_classdef import test_array_nested
```



---
## test_array_subclass
```python
from test_classdef import test_array_subclass
```



---
## test_method_decorator
```python
from test_classdef import test_method_decorator
```



---
## Y
```python
from test_classdef import Y
```



---
## Y2
```python
from test_classdef import Y2
```



---
## test_slots
```python
from test_classdef import test_slots
```



---
## test_origbases
```python
from test_classdef import test_origbases
```



---
## test_attr
```python
from test_classdef import test_attr
```



---
## test_metaclass
```python
from test_classdef import test_metaclass
```



---
## test_enummeta
```python
from test_classdef import test_enummeta
```



---
## test_inherit
```python
from test_classdef import test_inherit
```



---
## _method
```python
from test_classdef import _method
```



---
## customIntList
```python
from test_classdef import customIntList
```



---
## A
```python
from test_classdef import A
```



---
## __init__
```python
from test_classdef import __init__
```



---
## metaclass_with_new
```python
from test_classdef import metaclass_with_new
```



---
## Foo
```python
from test_classdef import Foo
```



---
## Bar
```python
from test_classdef import Bar
```



---
## B
```python
from test_classdef import B
```



---
## TestArray
```python
from test_classdef import TestArray
```



---
## TestArray2
```python
from test_classdef import TestArray2
```



---
## test
```python
from test_classdef import test
```



---
## __new__
```python
from test_classdef import __new__
```



---
## method
```python
from test_classdef import method
```



---
## __array_finalize__
```python
from test_classdef import __array_finalize__
```



---
## __getnewargs__
```python
from test_classdef import __getnewargs__
```



---
## __name__
```python
from test_moduledict import __name__
```



---
## f
```python
from test_moduledict import f
```



---
## f2
```python
from test_moduledict import f2
```



---
## test_decorated
```python
from test_moduledict import test_decorated
```



---
## SomeUnreferencedUnpicklableClass
```python
from test_moduledict import SomeUnreferencedUnpicklableClass
```



---
## test_normal
```python
from test_moduledict import test_normal
```



---
## tests
```python
from test_moduledict import tests
```

>>> serialized = dill.dumps(lambda x: x)

---
## test_doctest
```python
from test_moduledict import test_doctest
```



---
## w
```python
from test_moduledict import w
```



---
## __reduce__
```python
from test_moduledict import __reduce__
```



---
## __name__
```python
from test_dictviews import __name__
```



---
## test_dictproxy
```python
from test_dictviews import test_dictproxy
```



---
## test_dictviews
```python
from test_dictviews import test_dictviews
```



---
## test_dictproxy_trick
```python
from test_dictviews import test_dictproxy_trick
```



---
## __name__
```python
from test_properties import __name__
```



---
## Foo
```python
from test_properties import Foo
```



---
## test_data_not_none
```python
from test_properties import test_data_not_none
```



---
## test_data_unchanged
```python
from test_properties import test_data_unchanged
```



---
## test_data_changed
```python
from test_properties import test_data_changed
```



---
## __init__
```python
from test_properties import __init__
```



---
## _get_data
```python
from test_properties import _get_data
```



---
## _set_data
```python
from test_properties import _set_data
```



---
## __name__
```python
from test_logger import __name__
```



---
## test_logging
```python
from test_logger import test_logging
```



---
## test_trace_to_file
```python
from test_logger import test_trace_to_file
```



---
## _class
```python
from test_objects import _class
```



---
## pickles
```python
from test_objects import pickles
```

quick check if object pickles with dill

---
## test_objects
```python
from test_objects import test_objects
```



---
## _method
```python
from test_objects import _method
```



---
## __name__
```python
from test_recursive import __name__
```



---
## copy
```python
from test_recursive import copy
```



---
## obj1
```python
from test_recursive import obj1
```



---
## obj2
```python
from test_recursive import obj2
```



---
## obj3
```python
from test_recursive import obj3
```



---
## test_super
```python
from test_recursive import test_super
```



---
## get_trigger
```python
from test_recursive import get_trigger
```



---
## Machine
```python
from test_recursive import Machine
```



---
## Model
```python
from test_recursive import Model
```



---
## test_partial
```python
from test_recursive import test_partial
```



---
## Machine2
```python
from test_recursive import Machine2
```



---
## SubMachine
```python
from test_recursive import SubMachine
```



---
## test_partials
```python
from test_recursive import test_partials
```



---
## obj4
```python
from test_recursive import obj4
```



---
## test_circular_reference
```python
from test_recursive import test_circular_reference
```



---
## f
```python
from test_recursive import f
```



---
## test_function_cells
```python
from test_recursive import test_function_cells
```



---
## fib
```python
from test_recursive import fib
```



---
## test_recursive_function
```python
from test_recursive import test_recursive_function
```



---
## collection_function_recursion
```python
from test_recursive import collection_function_recursion
```



---
## test_collection_function_recursion
```python
from test_recursive import test_collection_function_recursion
```



---
## __init__
```python
from test_recursive import __init__
```



---
## member
```python
from test_recursive import member
```



---
## g
```python
from test_recursive import g
```



---
## obj5
```python
from test_recursive import obj5
```



---
## chm_htmlescape
```python
from __init__ import chm_htmlescape
```

chm_htmlescape() is a wrapper of html.escape().
.hhc/.hhk files don't recognize hex escaping, we need convert
hex escaping to decimal escaping. for example: ``&#x27;`` -> ``&#39;``
html.escape() may generates a hex escaping ``&#x27;`` for single
quote ``'``, this wrapper fixes this.

---
## ToCTreeVisitor
```python
from __init__ import ToCTreeVisitor
```



---
## HTMLHelpBuilder
```python
from __init__ import HTMLHelpBuilder
```

Builder that also outputs Windows HTML help project, contents and
index files.  Adapted from the original Doc/tools/prechm.py.

---
## default_htmlhelp_basename
```python
from __init__ import default_htmlhelp_basename
```

Better default htmlhelp_basename setting.

---
## unknown_visit
```python
from __init__ import unknown_visit
```



---
## unknown_departure
```python
from __init__ import unknown_departure
```



---
## _escape
```python
from __init__ import _escape
```



---
## render
```python
from __init__ import render
```



---
## copy_stopword_list
```python
from __init__ import copy_stopword_list
```

Copy a stopword list (.stp) to outdir.

       The stopword list contains a list of words the full text search facility
       shouldn't index.  Note that this list must be pretty small.  Different
       versions of the MS docs claim the file has a maximum size of 256 or 512
       bytes (including 
at the end of each line).  Note that "and", "or",
       "not" and "near" are operators in the search language, so no point
       indexing them even if we wanted to.
       

---
## build_project_file
```python
from __init__ import build_project_file
```

Create a project file (.hhp) on outdir.

---
## build_toc_file
```python
from __init__ import build_toc_file
```

Create a ToC file (.hhp) on outdir.

---
## build_hhx
```python
from __init__ import build_hhx
```



---
## write_index
```python
from __init__ import write_index
```



---
## write_param
```python
from __init__ import write_param
```



---
## AppleHelpIndexerFailed
```python
from __init__ import AppleHelpIndexerFailed
```



---
## AppleHelpCodeSigningFailed
```python
from __init__ import AppleHelpCodeSigningFailed
```



---
## AppleHelpBuilder
```python
from __init__ import AppleHelpBuilder
```

Builder that outputs an Apple help book.  Requires Mac OS X as it relies
on the ``hiutil`` command line tool.

---
## copy_localized_files
```python
from __init__ import copy_localized_files
```



---
## build_helpbook
```python
from __init__ import build_helpbook
```



---
## build_info_plist
```python
from __init__ import build_info_plist
```

Construct the Info.plist file.

---
## copy_applehelp_icon
```python
from __init__ import copy_applehelp_icon
```

Copy the icon, if one is supplied.

---
## build_access_page
```python
from __init__ import build_access_page
```

Build the access page.

---
## build_helpindex
```python
from __init__ import build_helpindex
```

Generate the help index.

---
## do_codesign
```python
from __init__ import do_codesign
```

If we've been asked to, sign the bundle.

---
## render_file
```python
from __init__ import render_file
```



---
## QtHelpBuilder
```python
from __init__ import QtHelpBuilder
```

Builder that also outputs Qt help project, contents and index files.

---
## build_qhp
```python
from __init__ import build_qhp
```



---
## isdocnode
```python
from __init__ import isdocnode
```



---
## write_toc
```python
from __init__ import write_toc
```



---
## keyword_item
```python
from __init__ import keyword_item
```



---
## build_keywords
```python
from __init__ import build_keywords
```



---
## get_project_files
```python
from __init__ import get_project_files
```



---
## html_visit_math
```python
from __init__ import html_visit_math
```



---
## html_visit_displaymath
```python
from __init__ import html_visit_displaymath
```



---
## install_jsmath
```python
from __init__ import install_jsmath
```



---
## SerializingHTMLBuilder
```python
from __init__ import SerializingHTMLBuilder
```

An abstract builder that serializes the generated HTML.

---
## PickleHTMLBuilder
```python
from __init__ import PickleHTMLBuilder
```

A Builder that dumps the generated HTML into pickle files.

---
## JSONHTMLBuilder
```python
from __init__ import JSONHTMLBuilder
```

A builder that dumps the generated HTML into JSON files.

---
## SerialisingImplementation
```python
from __init__ import SerialisingImplementation
```



---
## dump_context
```python
from __init__ import dump_context
```



---
## __name__
```python
from jsonimpl import __name__
```

JSON serializer implementation wrapper.

---
## SphinxJSONEncoder
```python
from jsonimpl import SphinxJSONEncoder
```

JSONEncoder subclass that forces translation proxies.

---
## dump
```python
from jsonimpl import dump
```



---
## dumps
```python
from jsonimpl import dumps
```



---
## load
```python
from jsonimpl import load
```



---
## loads
```python
from jsonimpl import loads
```



---
## default
```python
from jsonimpl import default
```



---
## DevhelpBuilder
```python
from __init__ import DevhelpBuilder
```

Builder that also outputs GNOME Devhelp file.

---
## build_devhelp
```python
from __init__ import build_devhelp
```



---
## __name__
```python
from ii_dimensional import __name__
```



---
## __name__
```python
from i_dimensional import __name__
```



---
## __name__
```python
from n_dimensional import __name__
```



---
## __name__
```python
from iii_dimensional import __name__
```



---
## __name__
```python
from annotation import __name__
```



---
## pd_np_native_numpy_array_to_data_dict_serializer
```python
from annotation import pd_np_native_numpy_array_to_data_dict_serializer
```

Serialize a NumPy array into a data dictionary format suitable for frontend display or processing.

This function converts a given NumPy array into a dictionary format, which includes the data type
and the data itself. If the array contains datetime or timedelta objects, it converts them into integer
representations. Otherwise, the array is converted to a floating-point representation. This is particularly
useful for preparing NumPy array data for JSON serialization or similar use cases where NumPy's native
data types are not directly compatible.

Note
----
This function is intended for internal use within a package for handling specific serialization needs
of NumPy arrays for frontend applications or similar use cases. It should not be used as a general-purpose
serialization tool.

Parameters
----------
array_like: np.ndarray
              The NumPy array to be serialized. This can be a standard numerical array or an array
              of datetime/timedelta objects.

Returns
-------
NumpyArrayTypeData
               A dictionary with two keys: 'data_type', a string representing the data type of the array,
               and 'data', a list of values converted from the array. The conversion is to integer if the
               original data type is datetime or timedelta, and to float for other data types.

Example
-------
>>> my_array = np.array([1, 2, 3])
>>> pd_np_native_numpy_array_to_data_dict_serializer(my_array)
{'data_type': 'int64', 'data': [1.0, 2.0, 3.0]}

---
## pd_np_native_numpy_array_json_schema_from_type_data
```python
from annotation import pd_np_native_numpy_array_json_schema_from_type_data
```

Generates a JSON schema for a NumPy array field within a Pydantic model.

This function constructs a JSON schema definition compatible with Pydantic models
that are intended to validate NumPy array inputs. It supports specifying the data type
and dimensions of the NumPy array, which are used to construct a schema that ensures
input data matches the expected structure and type.

Parameters
----------
_field_core_schema : core_schema.CoreSchema
    The core schema component of the Pydantic model, used for building basic schema structures.
_handler : GetJsonSchemaHandler
    A handler function or object responsible for converting Python types to JSON schema components.
dimensions : Optional[PositiveInt], optional
    The dimensions (shape) of the NumPy array. If specified, the schema will enforce that the
    input array matches this dimensionality. If `None`, no dimensionality constraint is applied,
    by default None.
data_type : Optional[SupportedDTypes], optional
    The expected data type of the NumPy array elements. If specified, the schema will enforce
    that the input array's data type is compatible with this. If `None`, any data type is allowed,
    by default None.

Returns
-------
JsonSchemaValue
    A dictionary representing the JSON schema for a NumPy array field within a Pydantic model.
    This schema includes details about the expected array dimensions and data type.

---
## NpArrayPydanticAnnotation
```python
from annotation import NpArrayPydanticAnnotation
```



---
## np_array_pydantic_annotated_typing
```python
from annotation import np_array_pydantic_annotated_typing
```

Generates typing and pydantic annotation of a np.ndarray parametrized with given constraints

Parameters
----------
data_type: SupportedDTypes
dimensions: Optional[int]
    Number of dimensions determine the depth of the numpy array.
strict_data_typing: bool
    If True, the dtype of the numpy array must be identical to the data_type. No conversion attempts.
serialize_numpy_array_to_json: Callable[[npt.ArrayLike], Iterable]
    Json serialization function to use. Defaults to NumpyArrayTypeData serializer.

Returns
-------
type-hint for np.ndarray with Pydantic support

Note
----
The function generates the type hints dynamically, and will not work with static type checkers such as mypy
or pyright. For that you need to create your types manually.

---
## _data_type_resolver
```python
from annotation import _data_type_resolver
```



---
## _deserialize_numpy_array_from_data_dict
```python
from annotation import _deserialize_numpy_array_from_data_dict
```



---
## factory
```python
from annotation import factory
```

Create an instance NpArrayPydanticAnnotation that is configured for a specific dimension and dtype.

The signature of the function is data_type, dimension and not dimension, data_type to reduce amount of
code for all the types.

Parameters
----------
data_type: SupportedDTypes
dimensions: Optional[PositiveInt]
    If defined, the number of dimensions determine the depth of the numpy array. Defaults to None,
    e.g. any number of dimensions
strict_data_typing: bool
    If True, the dtype of the numpy array must be identical to the data_type. No conversion attempts.
serialize_numpy_array_to_json: Callable[[npt.ArrayLike], Iterable]
    Json serialization function to use. Defaults to NumpyArrayTypeData serializer.
json_schema_from_type_data: Callable
    Json schema generation function to use. Defaults to NumpyArrayTypeData schema generator.

Returns
-------
NpArrayPydanticAnnotation

---
## __get_pydantic_core_schema__
```python
from annotation import __get_pydantic_core_schema__
```



---
## __get_pydantic_json_schema__
```python
from annotation import __get_pydantic_json_schema__
```



---
## NumpyArrayTypeData
```python
from typing import NumpyArrayTypeData
```



---
## __name__
```python
from validation import __name__
```



---
## PydanticNumpyMultiArrayNumpyFileOnFilePath
```python
from validation import PydanticNumpyMultiArrayNumpyFileOnFilePath
```



---
## create_array_validator
```python
from validation import create_array_validator
```

Creates a validator that ensures the numpy array has the defined dimensions and dtype (data_type).

Parameters
----------
dimensions: int | None
    Default to None; if set to an integer, enforce the dimension of the numpy array to that integer
target_data_type: DTypeLike
    The data type the array must have after validation, arrays with different data types will be converted
    during validation. Float to integer is rounded (np.round) followed by an astype with target data type.
strict_data_typing: bool
    Default False; if True, the incoming array must its dtype match the target_data_type. Strict mode.

Returns
-------
Callable[[npt.NDArray], npt.NDArray]
Validator for numpy array

---
## validate_numpy_array_file
```python
from validation import validate_numpy_array_file
```

Validate file path to numpy file by loading and return the respective numpy array

Parameters
----------
v: FilePath
    Path to the numpy file

Returns
-------
NDArray

---
## validate_multi_array_numpy_file
```python
from validation import validate_multi_array_numpy_file
```

Validation function for loading numpy array from a name mapping numpy file

Parameters
----------
v: MultiArrayNumpyFile
    MultiArrayNumpyFile to load

Returns
-------
NDArray from MultiArrayNumpyFile

---
## array_validator
```python
from validation import array_validator
```



---
## __name__
```python
from _optional import __name__
```



---
## get_version
```python
from _optional import get_version
```



---
## import_optional_dependency
```python
from _optional import import_optional_dependency
```

Import an optional dependency.

By default, if a dependency is missing an ImportError with a nice
message will be raised. If a dependency is present, but too old,
we raise.

Parameters
----------
name : str
    The module name.
extra : str
    Additional text to include in the ImportError message.
errors : str {'raise', 'warn', 'ignore'}
    What to do when a dependency is not found or its version is too old.

    * raise : Raise an ImportError
    * warn : Only applicable when a module's version is to old.
      Warns that the version is too old and returns None
    * ignore: If the module is not installed, return None, otherwise,
      return the module, even if the version is too old.
      It's expected that users validate the version locally when
      using ``errors="ignore"`` (see. ``io/html.py``)
min_version : str, default None
    Specify a minimum version that is different from the global pandas
    minimum version required.
Returns
-------
maybe_module : Optional[ModuleType]
    The imported module, when found and the version is correct.
    None is returned when the package is not found and `errors`
    is False, or when the package's version is too old and `errors`
    is ``'warn'`` or ``'ignore'``.

---
## __name__
```python
from pyarrow import __name__
```

support pyarrow compatibility across versions 

---
## set_function_name
```python
from __init__ import set_function_name
```

Bind the name/qualname attributes of the function.

---
## is_platform_little_endian
```python
from __init__ import is_platform_little_endian
```

Checking if the running platform is little endian.

Returns
-------
bool
    True if the running platform is little endian.

---
## is_platform_windows
```python
from __init__ import is_platform_windows
```

Checking if the running platform is windows.

Returns
-------
bool
    True if the running platform is windows.

---
## is_platform_linux
```python
from __init__ import is_platform_linux
```

Checking if the running platform is linux.

Returns
-------
bool
    True if the running platform is linux.

---
## is_platform_mac
```python
from __init__ import is_platform_mac
```

Checking if the running platform is mac.

Returns
-------
bool
    True if the running platform is mac.

---
## is_platform_arm
```python
from __init__ import is_platform_arm
```

Checking if the running platform use ARM architecture.

Returns
-------
bool
    True if the running platform uses ARM architecture.

---
## is_platform_power
```python
from __init__ import is_platform_power
```

Checking if the running platform use Power architecture.

Returns
-------
bool
    True if the running platform uses ARM architecture.

---
## get_lzma_file
```python
from __init__ import get_lzma_file
```

Importing the `LZMAFile` class from the `lzma` module.

Returns
-------
class
    The `LZMAFile` class from the `lzma` module.

Raises
------
RuntimeError
    If the `lzma` module was not imported correctly, or didn't exist.

---
## get_bz2_file
```python
from __init__ import get_bz2_file
```

Importing the `BZ2File` class from the `bz2` module.

Returns
-------
class
    The `BZ2File` class from the `bz2` module.

Raises
------
RuntimeError
    If the `bz2` module was not imported correctly, or didn't exist.

---
## __name__
```python
from pickle_compat import __name__
```

Support pre-0.12 series pickle compatibility.

---
## load_reduce
```python
from pickle_compat import load_reduce
```



---
## Unpickler
```python
from pickle_compat import Unpickler
```



---
## load_newobj
```python
from pickle_compat import load_newobj
```



---
## load_newobj_ex
```python
from pickle_compat import load_newobj_ex
```



---
## load
```python
from pickle_compat import load
```

Load a pickle, with a provided encoding,

Parameters
----------
fh : a filelike object
encoding : an optional encoding
is_verbose : show exception output

---
## loads
```python
from pickle_compat import loads
```

Analogous to pickle._loads.

---
## patch_pickle
```python
from pickle_compat import patch_pickle
```

Temporarily patch pickle to use our unpickler.

---
## find_class
```python
from pickle_compat import find_class
```



---
## __name__
```python
from compressors import __name__
```

Patched ``BZ2File`` and ``LZMAFile`` to handle pickle protocol 5.

---
## flatten_buffer
```python
from compressors import flatten_buffer
```

Return some 1-D `uint8` typed buffer.

Coerces anything that does not match that description to one that does
without copying if possible (otherwise will copy).

---
## BZ2File
```python
from compressors import BZ2File
```



---
## LZMAFile
```python
from compressors import LZMAFile
```



---
## write
```python
from compressors import write
```



---
## __name__
```python
from accessor import __name__
```

Sparse accessor

---
## DirNamesMixin
```python
from accessor import DirNamesMixin
```



---
## PandasDelegate
```python
from accessor import PandasDelegate
```

Abstract base class for delegating methods/properties.

---
## delegate_names
```python
from accessor import delegate_names
```

Add delegated names to a class using a class decorator.  This provides
an alternative usage to directly calling `_add_delegate_accessors`
below a class definition.

Parameters
----------
delegate : object
    The class to get methods/properties & doc-strings.
accessors : Sequence[str]
    List of accessor to add.
typ : {'property', 'method'}
overwrite : bool, default False
   Overwrite the method/property in the target class if it exists.
accessor_mapping: Callable, default lambda x: x
    Callable to map the delegate's function to the cls' function.
raise_on_missing: bool, default True
    Raise if an accessor does not exist on delegate.
    False skips the missing accessor.

Returns
-------
callable
    A class decorator.

Examples
--------
@delegate_names(Categorical, ["categories", "ordered"], "property")
class CategoricalAccessor(PandasDelegate):
    [...]

---
## CachedAccessor
```python
from accessor import CachedAccessor
```

Custom property-like object.

A descriptor for caching accessors.

Parameters
----------
name : str
    Namespace that will be accessed under, e.g. ``df.foo``.
accessor : cls
    Class with the extension methods.

Notes
-----
For accessor, The class's __init__ method assumes that one of
``Series``, ``DataFrame`` or ``Index`` as the
single argument ``data``.

---
## _register_accessor
```python
from accessor import _register_accessor
```

Register a custom accessor on {klass} objects.

Parameters
----------
name : str
    Name under which the accessor should be registered. A warning is issued
    if this name conflicts with a preexisting attribute.

Returns
-------
callable
    A class decorator.

See Also
--------
register_dataframe_accessor : Register a custom accessor on DataFrame objects.
register_series_accessor : Register a custom accessor on Series objects.
register_index_accessor : Register a custom accessor on Index objects.

Notes
-----
When accessed, your accessor will be initialized with the pandas object
the user is interacting with. So the signature must be

.. code-block:: python

    def __init__(self, pandas_object):  # noqa: E999
        ...

For consistency with pandas methods, you should raise an ``AttributeError``
if the data passed to your accessor has an incorrect dtype.

>>> pd.Series(['a', 'b']).dt
Traceback (most recent call last):
...
AttributeError: Can only use .dt accessor with datetimelike values

Examples
--------
In your library code::

    import pandas as pd

    @pd.api.extensions.register_dataframe_accessor("geo")
    class GeoAccessor:
        def __init__(self, pandas_obj):
            self._obj = pandas_obj

        @property
        def center(self):
            # return the geographic center point of this DataFrame
            lat = self._obj.latitude
            lon = self._obj.longitude
            return (float(lon.mean()), float(lat.mean()))

        def plot(self):
            # plot this array's data on a map, e.g., using Cartopy
            pass

Back in an interactive IPython session:

    .. code-block:: ipython

        In [1]: ds = pd.DataFrame({{"longitude": np.linspace(0, 10),
           ...:                    "latitude": np.linspace(0, 20)}})
        In [2]: ds.geo.center
        Out[2]: (5.0, 10.0)
        In [3]: ds.geo.plot()  # plots data on a map

---
## register_dataframe_accessor
```python
from accessor import register_dataframe_accessor
```



---
## register_series_accessor
```python
from accessor import register_series_accessor
```



---
## register_index_accessor
```python
from accessor import register_index_accessor
```



---
## _dir_deletions
```python
from accessor import _dir_deletions
```

Delete unwanted __dir__ for this object.

---
## _dir_additions
```python
from accessor import _dir_additions
```

Add additional __dir__ for this object.

---
## __dir__
```python
from accessor import __dir__
```

Provide method name lookup and completion.

Notes
-----
Only provide 'public' methods.

---
## _delegate_property_get
```python
from accessor import _delegate_property_get
```



---
## _delegate_property_set
```python
from accessor import _delegate_property_set
```



---
## _delegate_method
```python
from accessor import _delegate_method
```



---
## _add_delegate_accessors
```python
from accessor import _add_delegate_accessors
```

Add accessors to cls from the delegate class.

Parameters
----------
cls
    Class to add the methods/properties to.
delegate
    Class to get methods/properties and doc-strings.
accessors : list of str
    List of accessors to add.
typ : {'property', 'method'}
overwrite : bool, default False
    Overwrite the method/property in the target class if it exists.
accessor_mapping: Callable, default lambda x: x
    Callable to map the delegate's function to the cls' function.
raise_on_missing: bool, default True
    Raise if an accessor does not exist on delegate.
    False skips the missing accessor.

---
## add_delegate_accessors
```python
from accessor import add_delegate_accessors
```



---
## __init__
```python
from accessor import __init__
```



---
## __get__
```python
from accessor import __get__
```



---
## decorator
```python
from accessor import decorator
```



---
## _create_delegator_property
```python
from accessor import _create_delegator_property
```



---
## _create_delegator_method
```python
from accessor import _create_delegator_method
```



---
## _getter
```python
from accessor import _getter
```



---
## _setter
```python
from accessor import _setter
```



---
## f
```python
from accessor import f
```



---
## __name__
```python
from nanops import __name__
```



---
## set_use_bottleneck
```python
from nanops import set_use_bottleneck
```



---
## disallow
```python
from nanops import disallow
```



---
## bottleneck_switch
```python
from nanops import bottleneck_switch
```



---
## _bn_ok_dtype
```python
from nanops import _bn_ok_dtype
```



---
## _has_infs
```python
from nanops import _has_infs
```



---
## _get_fill_value
```python
from nanops import _get_fill_value
```

return the correct fill value for the dtype of the values

---
## _maybe_get_mask
```python
from nanops import _maybe_get_mask
```

Compute a mask if and only if necessary.

This function will compute a mask iff it is necessary. Otherwise,
return the provided mask (potentially None) when a mask does not need to be
computed.

A mask is never necessary if the values array is of boolean or integer
dtypes, as these are incapable of storing NaNs. If passing a NaN-capable
dtype that is interpretable as either boolean or integer data (eg,
timedelta64), a mask must be provided.

If the skipna parameter is False, a new mask will not be computed.

The mask is computed using isna() by default. Setting invert=True selects
notna() as the masking function.

Parameters
----------
values : ndarray
    input array to potentially compute mask for
skipna : bool
    boolean for whether NaNs should be skipped
mask : Optional[ndarray]
    nan-mask if known

Returns
-------
Optional[np.ndarray[bool]]

---
## _get_values
```python
from nanops import _get_values
```

Utility to get the values view, mask, dtype, dtype_max, and fill_value.

If both mask and fill_value/fill_value_typ are not None and skipna is True,
the values array will be copied.

For input arrays of boolean or integer dtypes, copies will only occur if a
precomputed mask, a fill_value/fill_value_typ, and skipna=True are
provided.

Parameters
----------
values : ndarray
    input array to potentially compute mask for
skipna : bool
    boolean for whether NaNs should be skipped
fill_value : Any
    value to fill NaNs with
fill_value_typ : str
    Set to '+inf' or '-inf' to handle dtype-specific infinities
mask : Optional[np.ndarray[bool]]
    nan-mask if known

Returns
-------
values : ndarray
    Potential copy of input value array
mask : Optional[ndarray[bool]]
    Mask for values, if deemed necessary to compute

---
## _get_dtype_max
```python
from nanops import _get_dtype_max
```



---
## _na_ok_dtype
```python
from nanops import _na_ok_dtype
```



---
## _wrap_results
```python
from nanops import _wrap_results
```

wrap our results if needed

---
## _datetimelike_compat
```python
from nanops import _datetimelike_compat
```

If we have datetime64 or timedelta64 values, ensure we have a correct
mask before calling the wrapped function, then cast back afterwards.

---
## _na_for_min_count
```python
from nanops import _na_for_min_count
```

Return the missing value for `values`.

Parameters
----------
values : ndarray
axis : int or None
    axis for the reduction, required if values.ndim > 1.

Returns
-------
result : scalar or ndarray
    For 1-D values, returns a scalar of the correct missing type.
    For 2-D values, returns a 1-D array where each element is missing.

---
## maybe_operate_rowwise
```python
from nanops import maybe_operate_rowwise
```

NumPy operations on C-contiguous ndarrays with axis=1 can be
very slow if axis 1 >> axis 0.
Operate row-by-row and concatenate the results.

---
## nanany
```python
from nanops import nanany
```

Check if any elements along an axis evaluate to True.

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : bool

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, 2])
>>> nanops.nanany(s.values)
True

>>> from pandas.core import nanops
>>> s = pd.Series([np.nan])
>>> nanops.nanany(s.values)
False

---
## nanall
```python
from nanops import nanall
```

Check if all elements along an axis evaluate to True.

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : bool

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, 2, np.nan])
>>> nanops.nanall(s.values)
True

>>> from pandas.core import nanops
>>> s = pd.Series([1, 0])
>>> nanops.nanall(s.values)
False

---
## nansum
```python
from nanops import nansum
```

Sum the elements along an axis ignoring NaNs

Parameters
----------
values : ndarray[dtype]
axis : int, optional
skipna : bool, default True
min_count: int, default 0
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : dtype

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, 2, np.nan])
>>> nanops.nansum(s.values)
3.0

---
## _mask_datetimelike_result
```python
from nanops import _mask_datetimelike_result
```



---
## nanmean
```python
from nanops import nanmean
```

Compute the mean of the element along an axis ignoring NaNs

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
float
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, 2, np.nan])
>>> nanops.nanmean(s.values)
1.5

---
## nanmedian
```python
from nanops import nanmedian
```

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 2, 2])
>>> nanops.nanmedian(s.values)
2.0

---
## _get_empty_reduction_result
```python
from nanops import _get_empty_reduction_result
```

The result from a reduction on an empty ndarray.

Parameters
----------
shape : Tuple[int, ...]
axis : int

Returns
-------
np.ndarray

---
## _get_counts_nanvar
```python
from nanops import _get_counts_nanvar
```

Get the count of non-null values along an axis, accounting
for degrees of freedom.

Parameters
----------
values_shape : Tuple[int, ...]
    shape tuple from values ndarray, used if mask is None
mask : Optional[ndarray[bool]]
    locations in values that should be considered missing
axis : Optional[int]
    axis to count along
ddof : int
    degrees of freedom
dtype : type, optional
    type to use for count

Returns
-------
count : int, np.nan or np.ndarray
d : int, np.nan or np.ndarray

---
## nanstd
```python
from nanops import nanstd
```

Compute the standard deviation along given axis while ignoring NaNs

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
ddof : int, default 1
    Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
    where N represents the number of elements.
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 2, 3])
>>> nanops.nanstd(s.values)
1.0

---
## nanvar
```python
from nanops import nanvar
```

Compute the variance along given axis while ignoring NaNs

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
ddof : int, default 1
    Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
    where N represents the number of elements.
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 2, 3])
>>> nanops.nanvar(s.values)
1.0

---
## nansem
```python
from nanops import nansem
```

Compute the standard error in the mean along given axis while ignoring NaNs

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
ddof : int, default 1
    Delta Degrees of Freedom. The divisor used in calculations is N - ddof,
    where N represents the number of elements.
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float64
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 2, 3])
>>> nanops.nansem(s.values)
 0.5773502691896258

---
## _nanminmax
```python
from nanops import _nanminmax
```



---
## nanargmax
```python
from nanops import nanargmax
```

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : int or ndarray[int]
    The index/indices  of max value in specified axis or -1 in the NA case

Examples
--------
>>> from pandas.core import nanops
>>> arr = np.array([1, 2, 3, np.nan, 4])
>>> nanops.nanargmax(arr)
4

>>> arr = np.array(range(12), dtype=np.float64).reshape(4, 3)
>>> arr[2:, 2] = np.nan
>>> arr
array([[ 0.,  1.,  2.],
       [ 3.,  4.,  5.],
       [ 6.,  7., nan],
       [ 9., 10., nan]])
>>> nanops.nanargmax(arr, axis=1)
array([2, 2, 1, 1])

---
## nanargmin
```python
from nanops import nanargmin
```

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : int or ndarray[int]
    The index/indices of min value in specified axis or -1 in the NA case

Examples
--------
>>> from pandas.core import nanops
>>> arr = np.array([1, 2, 3, np.nan, 4])
>>> nanops.nanargmin(arr)
0

>>> arr = np.array(range(12), dtype=np.float64).reshape(4, 3)
>>> arr[2:, 0] = np.nan
>>> arr
array([[ 0.,  1.,  2.],
       [ 3.,  4.,  5.],
       [nan,  7.,  8.],
       [nan, 10., 11.]])
>>> nanops.nanargmin(arr, axis=1)
array([0, 0, 1, 1])

---
## nanskew
```python
from nanops import nanskew
```

Compute the sample skewness.

The statistic computed here is the adjusted Fisher-Pearson standardized
moment coefficient G1. The algorithm computes this coefficient directly
from the second and third central moment.

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float64
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 1, 2])
>>> nanops.nanskew(s.values)
1.7320508075688787

---
## nankurt
```python
from nanops import nankurt
```

Compute the sample excess kurtosis

The statistic computed here is the adjusted Fisher-Pearson standardized
moment coefficient G2, computed directly from the second and fourth
central moment.

Parameters
----------
values : ndarray
axis : int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float64
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, np.nan, 1, 3, 2])
>>> nanops.nankurt(s.values)
-1.2892561983471076

---
## nanprod
```python
from nanops import nanprod
```

Parameters
----------
values : ndarray[dtype]
axis : int, optional
skipna : bool, default True
min_count: int, default 0
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
Dtype
    The product of all elements on a given axis. ( NaNs are treated as 1)

Examples
--------
>>> from pandas.core import nanops
>>> s = pd.Series([1, 2, 3, np.nan])
>>> nanops.nanprod(s.values)
6.0

---
## _maybe_arg_null_out
```python
from nanops import _maybe_arg_null_out
```



---
## _get_counts
```python
from nanops import _get_counts
```

Get the count of non-null values along an axis

Parameters
----------
values_shape : tuple of int
    shape tuple from values ndarray, used if mask is None
mask : Optional[ndarray[bool]]
    locations in values that should be considered missing
axis : Optional[int]
    axis to count along
dtype : type, optional
    type to use for count

Returns
-------
count : scalar or array

---
## _maybe_null_out
```python
from nanops import _maybe_null_out
```

Returns
-------
Dtype
    The product of all elements on a given axis. ( NaNs are treated as 1)

---
## check_below_min_count
```python
from nanops import check_below_min_count
```

Check for the `min_count` keyword. Returns True if below `min_count` (when
missing value should be returned from the reduction).

Parameters
----------
shape : tuple
    The shape of the values (`values.shape`).
mask : ndarray[bool] or None
    Boolean numpy array (typically of same shape as `shape`) or None.
min_count : int
    Keyword passed through from sum/prod call.

Returns
-------
bool

---
## _zero_out_fperr
```python
from nanops import _zero_out_fperr
```



---
## nancorr
```python
from nanops import nancorr
```

a, b: ndarrays

---
## get_corr_func
```python
from nanops import get_corr_func
```



---
## nancov
```python
from nanops import nancov
```



---
## _ensure_numeric
```python
from nanops import _ensure_numeric
```



---
## na_accum_func
```python
from nanops import na_accum_func
```

Cumulative function with skipna support.

Parameters
----------
values : np.ndarray or ExtensionArray
accum_func : {np.cumprod, np.maximum.accumulate, np.cumsum, np.minimum.accumulate}
skipna : bool

Returns
-------
np.ndarray or ExtensionArray

---
## __init__
```python
from nanops import __init__
```



---
## check
```python
from nanops import check
```



---
## __call__
```python
from nanops import __call__
```



---
## new_func
```python
from nanops import new_func
```



---
## newfunc
```python
from nanops import newfunc
```



---
## get_median
```python
from nanops import get_median
```



---
## reduction
```python
from nanops import reduction
```



---
## _f
```python
from nanops import _f
```



---
## f
```python
from nanops import f
```



---
## func
```python
from nanops import func
```



---
## __name__
```python
from roperator import __name__
```

Reversed Operations not available in the stdlib operator module.
Defining these instead of using lambdas allows us to reference them by name.

---
## radd
```python
from roperator import radd
```



---
## rsub
```python
from roperator import rsub
```



---
## rmul
```python
from roperator import rmul
```



---
## rdiv
```python
from roperator import rdiv
```



---
## rtruediv
```python
from roperator import rtruediv
```



---
## rfloordiv
```python
from roperator import rfloordiv
```



---
## rmod
```python
from roperator import rmod
```



---
## rdivmod
```python
from roperator import rdivmod
```



---
## rpow
```python
from roperator import rpow
```



---
## rand_
```python
from roperator import rand_
```



---
## ror_
```python
from roperator import ror_
```



---
## rxor
```python
from roperator import rxor
```



---
## __name__
```python
from missing import __name__
```



---
## check_value_size
```python
from missing import check_value_size
```

Validate the size of the values passed to ExtensionArray.fillna.

---
## mask_missing
```python
from missing import mask_missing
```

Return a masking array of same size/shape as arr
with entries equaling any member of values_to_mask set to True

Parameters
----------
arr : ArrayLike
values_to_mask: list, tuple, or scalar

Returns
-------
np.ndarray[bool]

---
## clean_fill_method
```python
from missing import clean_fill_method
```



---
## clean_interp_method
```python
from missing import clean_interp_method
```



---
## find_valid_index
```python
from missing import find_valid_index
```

Retrieves the positional index of the first valid value.

Parameters
----------
how : {'first', 'last'}
    Use this parameter to change between the first or last valid index.
is_valid: np.ndarray
    Mask to find na_values.

Returns
-------
int or None

---
## validate_limit_direction
```python
from missing import validate_limit_direction
```



---
## validate_limit_area
```python
from missing import validate_limit_area
```



---
## infer_limit_direction
```python
from missing import infer_limit_direction
```



---
## get_interp_index
```python
from missing import get_interp_index
```



---
## interpolate_2d_inplace
```python
from missing import interpolate_2d_inplace
```

Column-wise application of _interpolate_1d.

Notes
-----
Alters 'data' in-place.

The signature does differ from _interpolate_1d because it only
includes what is needed for Block.interpolate.

---
## _index_to_interp_indices
```python
from missing import _index_to_interp_indices
```

Convert Index to ndarray of indices to pass to NumPy/SciPy.

---
## _interpolate_1d
```python
from missing import _interpolate_1d
```

Logic for the 1-d interpolation.  The input
indices and yvalues will each be 1-d arrays of the same length.

Bounds_error is currently hardcoded to False since non-scipy ones don't
take it as an argument.

Notes
-----
Fills 'yvalues' in-place.

---
## _interpolate_scipy_wrapper
```python
from missing import _interpolate_scipy_wrapper
```

Passed off to scipy.interpolate.interp1d. method is scipy's kind.
Returns an array interpolated at new_x.  Add any new methods to
the list in _clean_interp_method.

---
## _from_derivatives
```python
from missing import _from_derivatives
```

Convenience function for interpolate.BPoly.from_derivatives.

Construct a piecewise polynomial in the Bernstein basis, compatible
with the specified values and derivatives at breakpoints.

Parameters
----------
xi : array-like
    sorted 1D array of x-coordinates
yi : array-like or list of array-likes
    yi[i][j] is the j-th derivative known at xi[i]
order: None or int or array-like of ints. Default: None.
    Specifies the degree of local polynomials. If not None, some
    derivatives are ignored.
der : int or list
    How many derivatives to extract; None for all potentially nonzero
    derivatives (that is a number equal to the number of points), or a
    list of derivatives to extract. This number includes the function
    value as 0th derivative.
 extrapolate : bool, optional
    Whether to extrapolate to ouf-of-bounds points based on first and last
    intervals, or to return NaNs. Default: True.

See Also
--------
scipy.interpolate.BPoly.from_derivatives

Returns
-------
y : scalar or array-like
    The result, of length R or length M or M by R.

---
## _akima_interpolate
```python
from missing import _akima_interpolate
```

Convenience function for akima interpolation.
xi and yi are arrays of values used to approximate some function f,
with ``yi = f(xi)``.

See `Akima1DInterpolator` for details.

Parameters
----------
xi : np.ndarray
    A sorted list of x-coordinates, of length N.
yi : np.ndarray
    A 1-D array of real values.  `yi`'s length along the interpolation
    axis must be equal to the length of `xi`. If N-D array, use axis
    parameter to select correct axis.
x : np.ndarray
    Of length M.
der : int, optional
    How many derivatives to extract; None for all potentially
    nonzero derivatives (that is a number equal to the number
    of points), or a list of derivatives to extract. This number
    includes the function value as 0th derivative.
axis : int, optional
    Axis in the yi array corresponding to the x-coordinate values.

See Also
--------
scipy.interpolate.Akima1DInterpolator

Returns
-------
y : scalar or array-like
    The result, of length R or length M or M by R,

---
## _cubicspline_interpolate
```python
from missing import _cubicspline_interpolate
```

Convenience function for cubic spline data interpolator.

See `scipy.interpolate.CubicSpline` for details.

Parameters
----------
xi : np.ndarray, shape (n,)
    1-d array containing values of the independent variable.
    Values must be real, finite and in strictly increasing order.
yi : np.ndarray
    Array containing values of the dependent variable. It can have
    arbitrary number of dimensions, but the length along ``axis``
    (see below) must match the length of ``x``. Values must be finite.
x : np.ndarray, shape (m,)
axis : int, optional
    Axis along which `y` is assumed to be varying. Meaning that for
    ``x[i]`` the corresponding values are ``np.take(y, i, axis=axis)``.
    Default is 0.
bc_type : string or 2-tuple, optional
    Boundary condition type. Two additional equations, given by the
    boundary conditions, are required to determine all coefficients of
    polynomials on each segment [2]_.
    If `bc_type` is a string, then the specified condition will be applied
    at both ends of a spline. Available conditions are:
    * 'not-a-knot' (default): The first and second segment at a curve end
      are the same polynomial. It is a good default when there is no
      information on boundary conditions.
    * 'periodic': The interpolated functions is assumed to be periodic
      of period ``x[-1] - x[0]``. The first and last value of `y` must be
      identical: ``y[0] == y[-1]``. This boundary condition will result in
      ``y'[0] == y'[-1]`` and ``y''[0] == y''[-1]``.
    * 'clamped': The first derivative at curves ends are zero. Assuming
      a 1D `y`, ``bc_type=((1, 0.0), (1, 0.0))`` is the same condition.
    * 'natural': The second derivative at curve ends are zero. Assuming
      a 1D `y`, ``bc_type=((2, 0.0), (2, 0.0))`` is the same condition.
    If `bc_type` is a 2-tuple, the first and the second value will be
    applied at the curve start and end respectively. The tuple values can
    be one of the previously mentioned strings (except 'periodic') or a
    tuple `(order, deriv_values)` allowing to specify arbitrary
    derivatives at curve ends:
    * `order`: the derivative order, 1 or 2.
    * `deriv_value`: array-like containing derivative values, shape must
      be the same as `y`, excluding ``axis`` dimension. For example, if
      `y` is 1D, then `deriv_value` must be a scalar. If `y` is 3D with
      the shape (n0, n1, n2) and axis=2, then `deriv_value` must be 2D
      and have the shape (n0, n1).
extrapolate : {bool, 'periodic', None}, optional
    If bool, determines whether to extrapolate to out-of-bounds points
    based on first and last intervals, or to return NaNs. If 'periodic',
    periodic extrapolation is used. If None (default), ``extrapolate`` is
    set to 'periodic' for ``bc_type='periodic'`` and to True otherwise.

See Also
--------
scipy.interpolate.CubicHermiteSpline

Returns
-------
y : scalar or array-like
    The result, of shape (m,)

References
----------
.. [1] `Cubic Spline Interpolation
        <https://en.wikiversity.org/wiki/Cubic_Spline_Interpolation>`_
        on Wikiversity.
.. [2] Carl de Boor, "A Practical Guide to Splines", Springer-Verlag, 1978.

---
## _interpolate_with_limit_area
```python
from missing import _interpolate_with_limit_area
```

Apply interpolation and limit_area logic to values along a to-be-specified axis.

Parameters
----------
values: np.ndarray
    Input array.
method: str
    Interpolation method. Could be "bfill" or "pad"
limit: int, optional
    Index limit on interpolation.
limit_area: {'inside', 'outside'}
    Limit area for interpolation.

Notes
-----
Modifies values in-place.

---
## pad_or_backfill_inplace
```python
from missing import pad_or_backfill_inplace
```

Perform an actual interpolation of values, values will be make 2-d if
needed fills inplace, returns the result.

Parameters
----------
values: np.ndarray
    Input array.
method: str, default "pad"
    Interpolation method. Could be "bfill" or "pad"
axis: 0 or 1
    Interpolation axis
limit: int, optional
    Index limit on interpolation.
limit_area: str, optional
    Limit area for interpolation. Can be "inside" or "outside"

Notes
-----
Modifies values in-place.

---
## _fillna_prep
```python
from missing import _fillna_prep
```



---
## _datetimelike_compat
```python
from missing import _datetimelike_compat
```

Wrapper to handle datetime64 and timedelta64 dtypes.

---
## _pad_1d
```python
from missing import _pad_1d
```



---
## _backfill_1d
```python
from missing import _backfill_1d
```



---
## _pad_2d
```python
from missing import _pad_2d
```



---
## _backfill_2d
```python
from missing import _backfill_2d
```



---
## _fill_limit_area_1d
```python
from missing import _fill_limit_area_1d
```

Prepare 1d mask for ffill/bfill with limit_area.

Caller is responsible for checking at least one value of mask is False.
When called, mask will no longer faithfully represent when
the corresponding are NA or not.

Parameters
----------
mask : np.ndarray[bool, ndim=1]
    Mask representing NA values when filling.
limit_area : { "outside", "inside" }
    Whether to limit filling to outside or inside the outer most non-NA value.

---
## _fill_limit_area_2d
```python
from missing import _fill_limit_area_2d
```

Prepare 2d mask for ffill/bfill with limit_area.

When called, mask will no longer faithfully represent when
the corresponding are NA or not.

Parameters
----------
mask : np.ndarray[bool, ndim=1]
    Mask representing NA values when filling.
limit_area : { "outside", "inside" }
    Whether to limit filling to outside or inside the outer most non-NA value.

---
## get_fill_func
```python
from missing import get_fill_func
```



---
## clean_reindex_fill_method
```python
from missing import clean_reindex_fill_method
```



---
## _interp_limit
```python
from missing import _interp_limit
```

Get indexers of values that won't be filled
because they exceed the limits.

Parameters
----------
invalid : np.ndarray[bool]
fw_limit : int or None
    forward limit to index
bw_limit : int or None
    backward limit to index

Returns
-------
set of indexers

Notes
-----
This is equivalent to the more readable, but slower

.. code-block:: python

    def _interp_limit(invalid, fw_limit, bw_limit):
        for x in np.where(invalid)[0]:
            if invalid[max(0, x - fw_limit):x + bw_limit + 1].all():
                yield x

---
## _rolling_window
```python
from missing import _rolling_window
```

[True, True, False, True, False], 2 ->

[
    [True,  True],
    [True, False],
    [False, True],
    [True, False],
]

---
## func
```python
from missing import func
```



---
## new_func
```python
from missing import new_func
```



---
## inner
```python
from missing import inner
```



---
## __name__
```python
from algorithms import __name__
```

Generic data algorithms. This module is experimental at the moment and not
intended for public consumption

---
## _ensure_data
```python
from algorithms import _ensure_data
```

routine to ensure that our data is of the correct
input dtype for lower-level routines

This will coerce:
- ints -> int64
- uint -> uint64
- bool -> uint8
- datetimelike -> i8
- datetime64tz -> i8 (in local tz)
- categorical -> codes

Parameters
----------
values : np.ndarray or ExtensionArray

Returns
-------
np.ndarray

---
## _reconstruct_data
```python
from algorithms import _reconstruct_data
```

reverse of _ensure_data

Parameters
----------
values : np.ndarray or ExtensionArray
dtype : np.dtype or ExtensionDtype
original : AnyArrayLike

Returns
-------
ExtensionArray or np.ndarray

---
## _ensure_arraylike
```python
from algorithms import _ensure_arraylike
```

ensure that we are arraylike if not already

---
## _get_hashtable_algo
```python
from algorithms import _get_hashtable_algo
```

Parameters
----------
values : np.ndarray

Returns
-------
htable : HashTable subclass
values : ndarray

---
## _check_object_for_strings
```python
from algorithms import _check_object_for_strings
```

Check if we can use string hashtable instead of object hashtable.

Parameters
----------
values : ndarray

Returns
-------
str

---
## unique
```python
from algorithms import unique
```

Return unique values based on a hash table.

Uniques are returned in order of appearance. This does NOT sort.

Significantly faster than numpy.unique for long enough sequences.
Includes NA values.

Parameters
----------
values : 1d array-like

Returns
-------
numpy.ndarray or ExtensionArray

    The return can be:

    * Index : when the input is an Index
    * Categorical : when the input is a Categorical dtype
    * ndarray : when the input is a Series/ndarray

    Return numpy.ndarray or ExtensionArray.

See Also
--------
Index.unique : Return unique values from an Index.
Series.unique : Return unique values of Series object.

Examples
--------
>>> pd.unique(pd.Series([2, 1, 3, 3]))
array([2, 1, 3])

>>> pd.unique(pd.Series([2] + [1] * 5))
array([2, 1])

>>> pd.unique(pd.Series([pd.Timestamp("20160101"), pd.Timestamp("20160101")]))
array(['2016-01-01T00:00:00.000000000'], dtype='datetime64[ns]')

>>> pd.unique(
...     pd.Series(
...         [
...             pd.Timestamp("20160101", tz="US/Eastern"),
...             pd.Timestamp("20160101", tz="US/Eastern"),
...         ]
...     )
... )
<DatetimeArray>
['2016-01-01 00:00:00-05:00']
Length: 1, dtype: datetime64[ns, US/Eastern]

>>> pd.unique(
...     pd.Index(
...         [
...             pd.Timestamp("20160101", tz="US/Eastern"),
...             pd.Timestamp("20160101", tz="US/Eastern"),
...         ]
...     )
... )
DatetimeIndex(['2016-01-01 00:00:00-05:00'],
        dtype='datetime64[ns, US/Eastern]',
        freq=None)

>>> pd.unique(np.array(list("baabc"), dtype="O"))
array(['b', 'a', 'c'], dtype=object)

An unordered Categorical will return categories in the
order of appearance.

>>> pd.unique(pd.Series(pd.Categorical(list("baabc"))))
['b', 'a', 'c']
Categories (3, object): ['a', 'b', 'c']

>>> pd.unique(pd.Series(pd.Categorical(list("baabc"), categories=list("abc"))))
['b', 'a', 'c']
Categories (3, object): ['a', 'b', 'c']

An ordered Categorical preserves the category ordering.

>>> pd.unique(
...     pd.Series(
...         pd.Categorical(list("baabc"), categories=list("abc"), ordered=True)
...     )
... )
['b', 'a', 'c']
Categories (3, object): ['a' < 'b' < 'c']

An array of tuples

>>> pd.unique(pd.Series([("a", "b"), ("b", "a"), ("a", "c"), ("b", "a")]).values)
array([('a', 'b'), ('b', 'a'), ('a', 'c')], dtype=object)

---
## nunique_ints
```python
from algorithms import nunique_ints
```

Return the number of unique values for integer array-likes.

Significantly faster than pandas.unique for long enough sequences.
No checks are done to ensure input is integral.

Parameters
----------
values : 1d array-like

Returns
-------
int : The number of unique values in ``values``

---
## unique_with_mask
```python
from algorithms import unique_with_mask
```

See algorithms.unique for docs. Takes a mask for masked arrays.

---
## isin
```python
from algorithms import isin
```

Compute the isin boolean array.

Parameters
----------
comps : list-like
values : list-like

Returns
-------
ndarray[bool]
    Same length as `comps`.

---
## factorize_array
```python
from algorithms import factorize_array
```

Factorize a numpy array to codes and uniques.

This doesn't do any coercion of types or unboxing before factorization.

Parameters
----------
values : ndarray
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.
size_hint : int, optional
    Passed through to the hashtable's 'get_labels' method
na_value : object, optional
    A value in `values` to consider missing. Note: only use this
    parameter when you know that you don't have any values pandas would
    consider missing in the array (NaN for float data, iNaT for
    datetimes, etc.).
mask : ndarray[bool], optional
    If not None, the mask is used as indicator for missing values
    (True = missing, False = valid) instead of `na_value` or
    condition "val != val".

Returns
-------
codes : ndarray[np.intp]
uniques : ndarray

---
## factorize
```python
from algorithms import factorize
```

Encode the object as an enumerated type or categorical variable.

This method is useful for obtaining a numeric representation of an
array when all that matters is identifying distinct values. `factorize`
is available as both a top-level function :func:`pandas.factorize`,
and as a method :meth:`Series.factorize` and :meth:`Index.factorize`.

Parameters
----------
{values}{sort}
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.

    .. versionadded:: 1.5.0
{size_hint}
Returns
-------
codes : ndarray
    An integer ndarray that's an indexer into `uniques`.
    ``uniques.take(codes)`` will have the same values as `values`.
uniques : ndarray, Index, or Categorical
    The unique valid values. When `values` is Categorical, `uniques`
    is a Categorical. When `values` is some other pandas object, an
    `Index` is returned. Otherwise, a 1-D ndarray is returned.

    .. note::

       Even if there's a missing value in `values`, `uniques` will
       *not* contain an entry for it.

See Also
--------
cut : Discretize continuous-valued array.
unique : Find the unique value in an array.

Notes
-----
Reference :ref:`the user guide <reshaping.factorize>` for more examples.

Examples
--------
These examples all show factorize as a top-level method like
``pd.factorize(values)``. The results are identical for methods like
:meth:`Series.factorize`.

>>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"))
>>> codes
array([0, 0, 1, 2, 0])
>>> uniques
array(['b', 'a', 'c'], dtype=object)

With ``sort=True``, the `uniques` will be sorted, and `codes` will be
shuffled so that the relationship is the maintained.

>>> codes, uniques = pd.factorize(np.array(['b', 'b', 'a', 'c', 'b'], dtype="O"),
...                               sort=True)
>>> codes
array([1, 1, 0, 2, 1])
>>> uniques
array(['a', 'b', 'c'], dtype=object)

When ``use_na_sentinel=True`` (the default), missing values are indicated in
the `codes` with the sentinel value ``-1`` and missing values are not
included in `uniques`.

>>> codes, uniques = pd.factorize(np.array(['b', None, 'a', 'c', 'b'], dtype="O"))
>>> codes
array([ 0, -1,  1,  2,  0])
>>> uniques
array(['b', 'a', 'c'], dtype=object)

Thus far, we've only factorized lists (which are internally coerced to
NumPy arrays). When factorizing pandas objects, the type of `uniques`
will differ. For Categoricals, a `Categorical` is returned.

>>> cat = pd.Categorical(['a', 'a', 'c'], categories=['a', 'b', 'c'])
>>> codes, uniques = pd.factorize(cat)
>>> codes
array([0, 0, 1])
>>> uniques
['a', 'c']
Categories (3, object): ['a', 'b', 'c']

Notice that ``'b'`` is in ``uniques.categories``, despite not being
present in ``cat.values``.

For all other pandas objects, an Index of the appropriate type is
returned.

>>> cat = pd.Series(['a', 'a', 'c'])
>>> codes, uniques = pd.factorize(cat)
>>> codes
array([0, 0, 1])
>>> uniques
Index(['a', 'c'], dtype='object')

If NaN is in the values, and we want to include NaN in the uniques of the
values, it can be achieved by setting ``use_na_sentinel=False``.

>>> values = np.array([1, 2, 1, np.nan])
>>> codes, uniques = pd.factorize(values)  # default: use_na_sentinel=True
>>> codes
array([ 0,  1,  0, -1])
>>> uniques
array([1., 2.])

>>> codes, uniques = pd.factorize(values, use_na_sentinel=False)
>>> codes
array([0, 1, 0, 2])
>>> uniques
array([ 1.,  2., nan])

---
## value_counts
```python
from algorithms import value_counts
```

Compute a histogram of the counts of non-null values.

Parameters
----------
values : ndarray (1-d)
sort : bool, default True
    Sort by values
ascending : bool, default False
    Sort in ascending order
normalize: bool, default False
    If True then compute a relative histogram
bins : integer, optional
    Rather than count values, group them into half-open bins,
    convenience for pd.cut, only works with numeric data
dropna : bool, default True
    Don't include counts of NaN

Returns
-------
Series

---
## value_counts_internal
```python
from algorithms import value_counts_internal
```



---
## value_counts_arraylike
```python
from algorithms import value_counts_arraylike
```

Parameters
----------
values : np.ndarray
dropna : bool
mask : np.ndarray[bool] or None, default None

Returns
-------
uniques : np.ndarray
counts : np.ndarray[np.int64]

---
## duplicated
```python
from algorithms import duplicated
```

Return boolean ndarray denoting duplicate values.

Parameters
----------
values : np.ndarray or ExtensionArray
    Array over which to check for duplicate values.
keep : {'first', 'last', False}, default 'first'
    - ``first`` : Mark duplicates as ``True`` except for the first
      occurrence.
    - ``last`` : Mark duplicates as ``True`` except for the last
      occurrence.
    - False : Mark all duplicates as ``True``.
mask : ndarray[bool], optional
    array indicating which elements to exclude from checking

Returns
-------
duplicated : ndarray[bool]

---
## mode
```python
from algorithms import mode
```

Returns the mode(s) of an array.

Parameters
----------
values : array-like
    Array over which to check for duplicate values.
dropna : bool, default True
    Don't consider counts of NaN/NaT.

Returns
-------
np.ndarray or ExtensionArray

---
## rank
```python
from algorithms import rank
```

Rank the values along a given axis.

Parameters
----------
values : np.ndarray or ExtensionArray
    Array whose values will be ranked. The number of dimensions in this
    array must not exceed 2.
axis : int, default 0
    Axis over which to perform rankings.
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
    The method by which tiebreaks are broken during the ranking.
na_option : {'keep', 'top'}, default 'keep'
    The method by which NaNs are placed in the ranking.
    - ``keep``: rank each NaN value with a NaN ranking
    - ``top``: replace each NaN with either +/- inf so that they
               there are ranked at the top
ascending : bool, default True
    Whether or not the elements should be ranked in ascending order.
pct : bool, default False
    Whether or not to the display the returned rankings in integer form
    (e.g. 1, 2, 3) or in percentile form (e.g. 0.333..., 0.666..., 1).

---
## take
```python
from algorithms import take
```

Take elements from an array.

Parameters
----------
arr : array-like or scalar value
    Non array-likes (sequences/scalars without a dtype) are coerced
    to an ndarray.

    .. deprecated:: 2.1.0
        Passing an argument other than a numpy.ndarray, ExtensionArray,
        Index, or Series is deprecated.

indices : sequence of int or one-dimensional np.ndarray of int
    Indices to be taken.
axis : int, default 0
    The axis over which to select values.
allow_fill : bool, default False
    How to handle negative values in `indices`.

    * False: negative values in `indices` indicate positional indices
      from the right (the default). This is similar to :func:`numpy.take`.

    * True: negative values in `indices` indicate
      missing values. These values are set to `fill_value`. Any other
      negative values raise a ``ValueError``.

fill_value : any, optional
    Fill value to use for NA-indices when `allow_fill` is True.
    This may be ``None``, in which case the default NA value for
    the type (``self.dtype.na_value``) is used.

    For multi-dimensional `arr`, each *element* is filled with
    `fill_value`.

Returns
-------
ndarray or ExtensionArray
    Same type as the input.

Raises
------
IndexError
    When `indices` is out of bounds for the array.
ValueError
    When the indexer contains negative values other than ``-1``
    and `allow_fill` is True.

Notes
-----
When `allow_fill` is False, `indices` may be whatever dimensionality
is accepted by NumPy for `arr`.

When `allow_fill` is True, `indices` should be 1-D.

See Also
--------
numpy.take : Take elements from an array along an axis.

Examples
--------
>>> import pandas as pd

With the default ``allow_fill=False``, negative numbers indicate
positional indices from the right.

>>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1])
array([10, 10, 30])

Setting ``allow_fill=True`` will place `fill_value` in those positions.

>>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True)
array([10., 10., nan])

>>> pd.api.extensions.take(np.array([10, 20, 30]), [0, 0, -1], allow_fill=True,
...      fill_value=-10)
array([ 10,  10, -10])

---
## searchsorted
```python
from algorithms import searchsorted
```

Find indices where elements should be inserted to maintain order.

Find the indices into a sorted array `arr` (a) such that, if the
corresponding elements in `value` were inserted before the indices,
the order of `arr` would be preserved.

Assuming that `arr` is sorted:

======  ================================
`side`  returned index `i` satisfies
======  ================================
left    ``arr[i-1] < value <= self[i]``
right   ``arr[i-1] <= value < self[i]``
======  ================================

Parameters
----------
arr: np.ndarray, ExtensionArray, Series
    Input array. If `sorter` is None, then it must be sorted in
    ascending order, otherwise `sorter` must be an array of indices
    that sort it.
value : array-like or scalar
    Values to insert into `arr`.
side : {'left', 'right'}, optional
    If 'left', the index of the first suitable location found is given.
    If 'right', return the last such index.  If there is no suitable
    index, return either 0 or N (where N is the length of `self`).
sorter : 1-D array-like, optional
    Optional array of integer indices that sort array a into ascending
    order. They are typically the result of argsort.

Returns
-------
array of ints or int
    If value is array-like, array of insertion points.
    If value is scalar, a single integer.

See Also
--------
numpy.searchsorted : Similar method from NumPy.

---
## diff
```python
from algorithms import diff
```

difference of n between self,
analogous to s-s.shift(n)

Parameters
----------
arr : ndarray or ExtensionArray
n : int
    number of periods
axis : {0, 1}
    axis to shift on
stacklevel : int, default 3
    The stacklevel for the lost dtype warning.

Returns
-------
shifted

---
## safe_sort
```python
from algorithms import safe_sort
```

Sort ``values`` and reorder corresponding ``codes``.

``values`` should be unique if ``codes`` is not None.
Safe for use with mixed types (int, str), orders ints before strs.

Parameters
----------
values : list-like
    Sequence; must be unique if ``codes`` is not None.
codes : np.ndarray[intp] or None, default None
    Indices to ``values``. All out of bound indices are treated as
    "not found" and will be masked with ``-1``.
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.
assume_unique : bool, default False
    When True, ``values`` are assumed to be unique, which can speed up
    the calculation. Ignored when ``codes`` is None.
verify : bool, default True
    Check if codes are out of bound for the values and put out of bound
    codes equal to ``-1``. If ``verify=False``, it is assumed there
    are no out of bound codes. Ignored when ``codes`` is None.

Returns
-------
ordered : AnyArrayLike
    Sorted ``values``
new_codes : ndarray
    Reordered ``codes``; returned when ``codes`` is not None.

Raises
------
TypeError
    * If ``values`` is not list-like or if ``codes`` is neither None
    nor list-like
    * If ``values`` cannot be sorted
ValueError
    * If ``codes`` is not None and ``values`` contain duplicates.

---
## _sort_mixed
```python
from algorithms import _sort_mixed
```

order ints before strings before nulls in 1d arrays

---
## _sort_tuples
```python
from algorithms import _sort_tuples
```

Convert array of tuples (1d) to array of arrays (2d).
We need to keep the columns separately as they contain different types and
nans (can't use `np.sort` as it may fail when str and nan are mixed in a
column as types cannot be compared).

---
## union_with_duplicates
```python
from algorithms import union_with_duplicates
```

Extracts the union from lvals and rvals with respect to duplicates and nans in
both arrays.

Parameters
----------
lvals: np.ndarray or ExtensionArray
    left values which is ordered in front.
rvals: np.ndarray or ExtensionArray
    right values ordered after lvals.

Returns
-------
np.ndarray or ExtensionArray
    Containing the unsorted union of both arrays.

Notes
-----
Caller is responsible for ensuring lvals.dtype == rvals.dtype.

---
## map_array
```python
from algorithms import map_array
```

Map values using an input mapping or function.

Parameters
----------
mapper : function, dict, or Series
    Mapping correspondence.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NA values, without passing them to the
    mapping correspondence.
convert : bool, default True
    Try to find better dtype for elementwise function results. If
    False, leave as dtype=object.

Returns
-------
Union[ndarray, Index, ExtensionArray]
    The output of the mapping function applied to the array.
    If the function returns a tuple with more than one element
    a MultiIndex will be returned.

---
## f
```python
from algorithms import f
```



---
## __name__
```python
from resample import __name__
```



---
## Resampler
```python
from resample import Resampler
```

Class for resampling datetimelike data, a groupby-like operation.
See aggregate, transform, and apply functions on this object.

It's easiest to use obj.resample(...) to use Resampler.

Parameters
----------
obj : Series or DataFrame
groupby : TimeGrouper
axis : int, default 0
kind : str or None
    'period', 'timestamp' to override default index treatment

Returns
-------
a Resampler of the appropriate type

Notes
-----
After resampling, see aggregate, apply, and transform functions.

---
## _GroupByMixin
```python
from resample import _GroupByMixin
```

Provide the groupby facilities.

---
## DatetimeIndexResampler
```python
from resample import DatetimeIndexResampler
```



---
## DatetimeIndexResamplerGroupby
```python
from resample import DatetimeIndexResamplerGroupby
```

Provides a resample of a groupby implementation

---
## PeriodIndexResampler
```python
from resample import PeriodIndexResampler
```



---
## PeriodIndexResamplerGroupby
```python
from resample import PeriodIndexResamplerGroupby
```

Provides a resample of a groupby implementation.

---
## TimedeltaIndexResampler
```python
from resample import TimedeltaIndexResampler
```



---
## TimedeltaIndexResamplerGroupby
```python
from resample import TimedeltaIndexResamplerGroupby
```

Provides a resample of a groupby implementation.

---
## get_resampler
```python
from resample import get_resampler
```

Create a TimeGrouper and return our resampler.

---
## get_resampler_for_grouping
```python
from resample import get_resampler_for_grouping
```

Return our appropriate resampler when grouping as well.

---
## TimeGrouper
```python
from resample import TimeGrouper
```

Custom groupby class for time-interval grouping.

Parameters
----------
freq : pandas date offset or offset alias for identifying bin edges
closed : closed end of interval; 'left' or 'right'
label : interval boundary to use for labeling; 'left' or 'right'
convention : {'start', 'end', 'e', 's'}
    If axis is PeriodIndex

---
## _take_new_index
```python
from resample import _take_new_index
```



---
## _get_timestamp_range_edges
```python
from resample import _get_timestamp_range_edges
```

Adjust the `first` Timestamp to the preceding Timestamp that resides on
the provided offset. Adjust the `last` Timestamp to the following
Timestamp that resides on the provided offset. Input Timestamps that
already reside on the offset will be adjusted depending on the type of
offset and the `closed` parameter.

Parameters
----------
first : pd.Timestamp
    The beginning Timestamp of the range to be adjusted.
last : pd.Timestamp
    The ending Timestamp of the range to be adjusted.
freq : pd.DateOffset
    The dateoffset to which the Timestamps will be adjusted.
closed : {'right', 'left'}, default "left"
    Which side of bin interval is closed.
origin : {'epoch', 'start', 'start_day'} or Timestamp, default 'start_day'
    The timestamp on which to adjust the grouping. The timezone of origin must
    match the timezone of the index.
    If a timestamp is not used, these values are also supported:

    - 'epoch': `origin` is 1970-01-01
    - 'start': `origin` is the first value of the timeseries
    - 'start_day': `origin` is the first day at midnight of the timeseries
offset : pd.Timedelta, default is None
    An offset timedelta added to the origin.

Returns
-------
A tuple of length 2, containing the adjusted pd.Timestamp objects.

---
## _get_period_range_edges
```python
from resample import _get_period_range_edges
```

Adjust the provided `first` and `last` Periods to the respective Period of
the given offset that encompasses them.

Parameters
----------
first : pd.Period
    The beginning Period of the range to be adjusted.
last : pd.Period
    The ending Period of the range to be adjusted.
freq : pd.DateOffset
    The freq to which the Periods will be adjusted.
closed : {'right', 'left'}, default "left"
    Which side of bin interval is closed.
origin : {'epoch', 'start', 'start_day'}, Timestamp, default 'start_day'
    The timestamp on which to adjust the grouping. The timezone of origin must
    match the timezone of the index.

    If a timestamp is not used, these values are also supported:

    - 'epoch': `origin` is 1970-01-01
    - 'start': `origin` is the first value of the timeseries
    - 'start_day': `origin` is the first day at midnight of the timeseries
offset : pd.Timedelta, default is None
    An offset timedelta added to the origin.

Returns
-------
A tuple of length 2, containing the adjusted pd.Period objects.

---
## _insert_nat_bin
```python
from resample import _insert_nat_bin
```



---
## _adjust_dates_anchored
```python
from resample import _adjust_dates_anchored
```



---
## asfreq
```python
from resample import asfreq
```

Return the values at the new freq, essentially a reindex.

Parameters
----------
fill_value : scalar, optional
    Value to use for missing values, applied during upsampling (note
    this does not fill NaNs that already were present).

Returns
-------
DataFrame or Series
    Values at the specified freq.

See Also
--------
Series.asfreq: Convert TimeSeries to specified frequency.
DataFrame.asfreq: Convert TimeSeries to specified frequency.

Examples
--------

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-31', '2023-02-01', '2023-02-28']))
>>> ser
2023-01-01    1
2023-01-31    2
2023-02-01    3
2023-02-28    4
dtype: int64
>>> ser.resample('MS').asfreq()
2023-01-01    1
2023-02-01    3
Freq: MS, dtype: int64

---
## _asfreq_compat
```python
from resample import _asfreq_compat
```

Helper to mimic asfreq on (empty) DatetimeIndex and TimedeltaIndex.

Parameters
----------
index : PeriodIndex, DatetimeIndex, or TimedeltaIndex
freq : DateOffset

Returns
-------
same type as index

---
## maybe_warn_args_and_kwargs
```python
from resample import maybe_warn_args_and_kwargs
```

Warn for deprecation of args and kwargs in resample functions.

Parameters
----------
cls : type
    Class to warn about.
kernel : str
    Operation name.
args : tuple or None
    args passed by user. Will be None if and only if kernel does not have args.
kwargs : dict or None
    kwargs passed by user. Will be None if and only if kernel does not have kwargs.

---
## _apply
```python
from resample import _apply
```

Dispatch to _upsample; we are stripping all of the _upsample kwargs and
performing the original function call on the grouped object.

---
## __init__
```python
from resample import __init__
```



---
## __str__
```python
from resample import __str__
```

Provide a nice str repr of our rolling object.

---
## __getattr__
```python
from resample import __getattr__
```



---
## _from_selection
```python
from resample import _from_selection
```

Is the resampling from a DataFrame column or MultiIndex level.

---
## _convert_obj
```python
from resample import _convert_obj
```



---
## _get_binner_for_time
```python
from resample import _get_binner_for_time
```



---
## _get_binner
```python
from resample import _get_binner
```

Create the BinGrouper, assume that self.set_grouper(obj)
has already been called.

---
## pipe
```python
from resample import pipe
```



---
## aggregate
```python
from resample import aggregate
```



---
## transform
```python
from resample import transform
```

Call function producing a like-indexed Series on each group.

Return a Series with the transformed values.

Parameters
----------
arg : function
    To apply to each group. Should return a Series with the same index.

Returns
-------
Series

Examples
--------
>>> s = pd.Series([1, 2],
...               index=pd.date_range('20180101',
...                                   periods=2,
...                                   freq='1h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
Freq: h, dtype: int64

>>> resampled = s.resample('15min')
>>> resampled.transform(lambda x: (x - x.mean()) / x.std())
2018-01-01 00:00:00   NaN
2018-01-01 01:00:00   NaN
Freq: h, dtype: float64

---
## _downsample
```python
from resample import _downsample
```

Downsample the cython defined function.

Parameters
----------
how : string / cython mapped function
**kwargs : kw args passed to how function

---
## _upsample
```python
from resample import _upsample
```

Parameters
----------
method : {'backfill', 'bfill', 'pad', 'ffill'}
    Method for upsampling.
limit : int, default None
    Maximum size gap to fill when reindexing.
fill_value : scalar, default None
    Value to use for missing values.

See Also
--------
.fillna: Fill NA/NaN values using the specified method.

---
## _gotitem
```python
from resample import _gotitem
```

Sub-classes to define. Return a sliced object.

Parameters
----------
key : string / list of selections
ndim : {1, 2}
    requested ndim of result
subset : object, default None
    subset to act on

---
## _groupby_and_aggregate
```python
from resample import _groupby_and_aggregate
```

Re-evaluate the obj with a groupby aggregation.

---
## _get_resampler_for_grouping
```python
from resample import _get_resampler_for_grouping
```

Return the correct class for resampling with groupby.

---
## _wrap_result
```python
from resample import _wrap_result
```



---
## ffill
```python
from resample import ffill
```

Forward fill the values.

Parameters
----------
limit : int, optional
    Limit of how many values to fill.

Returns
-------
An upsampled Series.

See Also
--------
Series.fillna: Fill NA/NaN values using the specified method.
DataFrame.fillna: Fill NA/NaN values using the specified method.

Examples
--------
Here we only create a ``Series``.

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64

Example for ``ffill`` with downsampling (we have fewer dates after resampling):

>>> ser.resample('MS').ffill()
2023-01-01    1
2023-02-01    3
Freq: MS, dtype: int64

Example for ``ffill`` with upsampling (fill the new dates with
the previous value):

>>> ser.resample('W').ffill()
2023-01-01    1
2023-01-08    1
2023-01-15    2
2023-01-22    2
2023-01-29    2
2023-02-05    3
2023-02-12    3
2023-02-19    4
Freq: W-SUN, dtype: int64

With upsampling and limiting (only fill the first new date with the
previous value):

>>> ser.resample('W').ffill(limit=1)
2023-01-01    1.0
2023-01-08    1.0
2023-01-15    2.0
2023-01-22    2.0
2023-01-29    NaN
2023-02-05    3.0
2023-02-12    NaN
2023-02-19    4.0
Freq: W-SUN, dtype: float64

---
## nearest
```python
from resample import nearest
```

Resample by using the nearest value.

When resampling data, missing values may appear (e.g., when the
resampling frequency is higher than the original frequency).
The `nearest` method will replace ``NaN`` values that appeared in
the resampled data with the value from the nearest member of the
sequence, based on the index value.
Missing values that existed in the original data will not be modified.
If `limit` is given, fill only this many values in each direction for
each of the original values.

Parameters
----------
limit : int, optional
    Limit of how many values to fill.

Returns
-------
Series or DataFrame
    An upsampled Series or DataFrame with ``NaN`` values filled with
    their nearest value.

See Also
--------
backfill : Backward fill the new missing values in the resampled data.
pad : Forward fill ``NaN`` values.

Examples
--------
>>> s = pd.Series([1, 2],
...               index=pd.date_range('20180101',
...                                   periods=2,
...                                   freq='1h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
Freq: h, dtype: int64

>>> s.resample('15min').nearest()
2018-01-01 00:00:00    1
2018-01-01 00:15:00    1
2018-01-01 00:30:00    2
2018-01-01 00:45:00    2
2018-01-01 01:00:00    2
Freq: 15min, dtype: int64

Limit the number of upsampled values imputed by the nearest:

>>> s.resample('15min').nearest(limit=1)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    1.0
2018-01-01 00:30:00    NaN
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
Freq: 15min, dtype: float64

---
## bfill
```python
from resample import bfill
```

Backward fill the new missing values in the resampled data.

In statistics, imputation is the process of replacing missing data with
substituted values [1]_. When resampling data, missing values may
appear (e.g., when the resampling frequency is higher than the original
frequency). The backward fill will replace NaN values that appeared in
the resampled data with the next value in the original sequence.
Missing values that existed in the original data will not be modified.

Parameters
----------
limit : int, optional
    Limit of how many values to fill.

Returns
-------
Series, DataFrame
    An upsampled Series or DataFrame with backward filled NaN values.

See Also
--------
bfill : Alias of backfill.
fillna : Fill NaN values using the specified method, which can be
    'backfill'.
nearest : Fill NaN values with nearest neighbor starting from center.
ffill : Forward fill NaN values.
Series.fillna : Fill NaN values in the Series using the
    specified method, which can be 'backfill'.
DataFrame.fillna : Fill NaN values in the DataFrame using the
    specified method, which can be 'backfill'.

References
----------
.. [1] https://en.wikipedia.org/wiki/Imputation_(statistics)

Examples
--------
Resampling a Series:

>>> s = pd.Series([1, 2, 3],
...               index=pd.date_range('20180101', periods=3, freq='h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
2018-01-01 02:00:00    3
Freq: h, dtype: int64

>>> s.resample('30min').bfill()
2018-01-01 00:00:00    1
2018-01-01 00:30:00    2
2018-01-01 01:00:00    2
2018-01-01 01:30:00    3
2018-01-01 02:00:00    3
Freq: 30min, dtype: int64

>>> s.resample('15min').bfill(limit=2)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    NaN
2018-01-01 00:30:00    2.0
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
2018-01-01 01:15:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 01:45:00    3.0
2018-01-01 02:00:00    3.0
Freq: 15min, dtype: float64

Resampling a DataFrame that has missing values:

>>> df = pd.DataFrame({'a': [2, np.nan, 6], 'b': [1, 3, 5]},
...                   index=pd.date_range('20180101', periods=3,
...                                       freq='h'))
>>> df
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 01:00:00  NaN  3
2018-01-01 02:00:00  6.0  5

>>> df.resample('30min').bfill()
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 00:30:00  NaN  3
2018-01-01 01:00:00  NaN  3
2018-01-01 01:30:00  6.0  5
2018-01-01 02:00:00  6.0  5

>>> df.resample('15min').bfill(limit=2)
                       a    b
2018-01-01 00:00:00  2.0  1.0
2018-01-01 00:15:00  NaN  NaN
2018-01-01 00:30:00  NaN  3.0
2018-01-01 00:45:00  NaN  3.0
2018-01-01 01:00:00  NaN  3.0
2018-01-01 01:15:00  NaN  NaN
2018-01-01 01:30:00  6.0  5.0
2018-01-01 01:45:00  6.0  5.0
2018-01-01 02:00:00  6.0  5.0

---
## fillna
```python
from resample import fillna
```

Fill missing values introduced by upsampling.

In statistics, imputation is the process of replacing missing data with
substituted values [1]_. When resampling data, missing values may
appear (e.g., when the resampling frequency is higher than the original
frequency).

Missing values that existed in the original data will
not be modified.

Parameters
----------
method : {'pad', 'backfill', 'ffill', 'bfill', 'nearest'}
    Method to use for filling holes in resampled data

    * 'pad' or 'ffill': use previous valid observation to fill gap
      (forward fill).
    * 'backfill' or 'bfill': use next valid observation to fill gap.
    * 'nearest': use nearest valid observation to fill gap.

limit : int, optional
    Limit of how many consecutive missing values to fill.

Returns
-------
Series or DataFrame
    An upsampled Series or DataFrame with missing values filled.

See Also
--------
bfill : Backward fill NaN values in the resampled data.
ffill : Forward fill NaN values in the resampled data.
nearest : Fill NaN values in the resampled data
    with nearest neighbor starting from center.
interpolate : Fill NaN values using interpolation.
Series.fillna : Fill NaN values in the Series using the
    specified method, which can be 'bfill' and 'ffill'.
DataFrame.fillna : Fill NaN values in the DataFrame using the
    specified method, which can be 'bfill' and 'ffill'.

References
----------
.. [1] https://en.wikipedia.org/wiki/Imputation_(statistics)

Examples
--------
Resampling a Series:

>>> s = pd.Series([1, 2, 3],
...               index=pd.date_range('20180101', periods=3, freq='h'))
>>> s
2018-01-01 00:00:00    1
2018-01-01 01:00:00    2
2018-01-01 02:00:00    3
Freq: h, dtype: int64

Without filling the missing values you get:

>>> s.resample("30min").asfreq()
2018-01-01 00:00:00    1.0
2018-01-01 00:30:00    NaN
2018-01-01 01:00:00    2.0
2018-01-01 01:30:00    NaN
2018-01-01 02:00:00    3.0
Freq: 30min, dtype: float64

>>> s.resample('30min').fillna("backfill")
2018-01-01 00:00:00    1
2018-01-01 00:30:00    2
2018-01-01 01:00:00    2
2018-01-01 01:30:00    3
2018-01-01 02:00:00    3
Freq: 30min, dtype: int64

>>> s.resample('15min').fillna("backfill", limit=2)
2018-01-01 00:00:00    1.0
2018-01-01 00:15:00    NaN
2018-01-01 00:30:00    2.0
2018-01-01 00:45:00    2.0
2018-01-01 01:00:00    2.0
2018-01-01 01:15:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 01:45:00    3.0
2018-01-01 02:00:00    3.0
Freq: 15min, dtype: float64

>>> s.resample('30min').fillna("pad")
2018-01-01 00:00:00    1
2018-01-01 00:30:00    1
2018-01-01 01:00:00    2
2018-01-01 01:30:00    2
2018-01-01 02:00:00    3
Freq: 30min, dtype: int64

>>> s.resample('30min').fillna("nearest")
2018-01-01 00:00:00    1
2018-01-01 00:30:00    2
2018-01-01 01:00:00    2
2018-01-01 01:30:00    3
2018-01-01 02:00:00    3
Freq: 30min, dtype: int64

Missing values present before the upsampling are not affected.

>>> sm = pd.Series([1, None, 3],
...                index=pd.date_range('20180101', periods=3, freq='h'))
>>> sm
2018-01-01 00:00:00    1.0
2018-01-01 01:00:00    NaN
2018-01-01 02:00:00    3.0
Freq: h, dtype: float64

>>> sm.resample('30min').fillna('backfill')
2018-01-01 00:00:00    1.0
2018-01-01 00:30:00    NaN
2018-01-01 01:00:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 02:00:00    3.0
Freq: 30min, dtype: float64

>>> sm.resample('30min').fillna('pad')
2018-01-01 00:00:00    1.0
2018-01-01 00:30:00    1.0
2018-01-01 01:00:00    NaN
2018-01-01 01:30:00    NaN
2018-01-01 02:00:00    3.0
Freq: 30min, dtype: float64

>>> sm.resample('30min').fillna('nearest')
2018-01-01 00:00:00    1.0
2018-01-01 00:30:00    NaN
2018-01-01 01:00:00    NaN
2018-01-01 01:30:00    3.0
2018-01-01 02:00:00    3.0
Freq: 30min, dtype: float64

DataFrame resampling is done column-wise. All the same options are
available.

>>> df = pd.DataFrame({'a': [2, np.nan, 6], 'b': [1, 3, 5]},
...                   index=pd.date_range('20180101', periods=3,
...                                       freq='h'))
>>> df
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 01:00:00  NaN  3
2018-01-01 02:00:00  6.0  5

>>> df.resample('30min').fillna("bfill")
                       a  b
2018-01-01 00:00:00  2.0  1
2018-01-01 00:30:00  NaN  3
2018-01-01 01:00:00  NaN  3
2018-01-01 01:30:00  6.0  5
2018-01-01 02:00:00  6.0  5

---
## interpolate
```python
from resample import interpolate
```

Interpolate values between target timestamps according to different methods.

The original index is first reindexed to target timestamps
(see :meth:`core.resample.Resampler.asfreq`),
then the interpolation of ``NaN`` values via :meth:`DataFrame.interpolate`
happens.

Parameters
----------
method : str, default 'linear'
    Interpolation technique to use. One of:

    * 'linear': Ignore the index and treat the values as equally
      spaced. This is the only method supported on MultiIndexes.
    * 'time': Works on daily and higher resolution data to interpolate
      given length of interval.
    * 'index', 'values': use the actual numerical values of the index.
    * 'pad': Fill in NaNs using existing values.
    * 'nearest', 'zero', 'slinear', 'quadratic', 'cubic',
      'barycentric', 'polynomial': Passed to
      `scipy.interpolate.interp1d`, whereas 'spline' is passed to
      `scipy.interpolate.UnivariateSpline`. These methods use the numerical
      values of the index.  Both 'polynomial' and 'spline' require that
      you also specify an `order` (int), e.g.
      ``df.interpolate(method='polynomial', order=5)``. Note that,
      `slinear` method in Pandas refers to the Scipy first order `spline`
      instead of Pandas first order `spline`.
    * 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima',
      'cubicspline': Wrappers around the SciPy interpolation methods of
      similar names. See `Notes`.
    * 'from_derivatives': Refers to
      `scipy.interpolate.BPoly.from_derivatives`.

axis : {{0 or 'index', 1 or 'columns', None}}, default None
    Axis to interpolate along. For `Series` this parameter is unused
    and defaults to 0.
limit : int, optional
    Maximum number of consecutive NaNs to fill. Must be greater than
    0.
inplace : bool, default False
    Update the data in place if possible.
limit_direction : {{'forward', 'backward', 'both'}}, Optional
    Consecutive NaNs will be filled in this direction.

    If limit is specified:
        * If 'method' is 'pad' or 'ffill', 'limit_direction' must be 'forward'.
        * If 'method' is 'backfill' or 'bfill', 'limit_direction' must be
          'backwards'.

    If 'limit' is not specified:
        * If 'method' is 'backfill' or 'bfill', the default is 'backward'
        * else the default is 'forward'

        raises ValueError if `limit_direction` is 'forward' or 'both' and
            method is 'backfill' or 'bfill'.
        raises ValueError if `limit_direction` is 'backward' or 'both' and
            method is 'pad' or 'ffill'.

limit_area : {{`None`, 'inside', 'outside'}}, default None
    If limit is specified, consecutive NaNs will be filled with this
    restriction.

    * ``None``: No fill restriction.
    * 'inside': Only fill NaNs surrounded by valid values
      (interpolate).
    * 'outside': Only fill NaNs outside valid values (extrapolate).

downcast : optional, 'infer' or None, defaults to None
    Downcast dtypes if possible.

    .. deprecated:: 2.1.0

``**kwargs`` : optional
    Keyword arguments to pass on to the interpolating function.

Returns
-------
DataFrame or Series
    Interpolated values at the specified freq.

See Also
--------
core.resample.Resampler.asfreq: Return the values at the new freq,
    essentially a reindex.
DataFrame.interpolate: Fill NaN values using an interpolation method.

Notes
-----
For high-frequent or non-equidistant time-series with timestamps
the reindexing followed by interpolation may lead to information loss
as shown in the last example.

Examples
--------

>>> start = "2023-03-01T07:00:00"
>>> timesteps = pd.date_range(start, periods=5, freq="s")
>>> series = pd.Series(data=[1, -1, 2, 1, 3], index=timesteps)
>>> series
2023-03-01 07:00:00    1
2023-03-01 07:00:01   -1
2023-03-01 07:00:02    2
2023-03-01 07:00:03    1
2023-03-01 07:00:04    3
Freq: s, dtype: int64

Upsample the dataframe to 0.5Hz by providing the period time of 2s.

>>> series.resample("2s").interpolate("linear")
2023-03-01 07:00:00    1
2023-03-01 07:00:02    2
2023-03-01 07:00:04    3
Freq: 2s, dtype: int64

Downsample the dataframe to 2Hz by providing the period time of 500ms.

>>> series.resample("500ms").interpolate("linear")
2023-03-01 07:00:00.000    1.0
2023-03-01 07:00:00.500    0.0
2023-03-01 07:00:01.000   -1.0
2023-03-01 07:00:01.500    0.5
2023-03-01 07:00:02.000    2.0
2023-03-01 07:00:02.500    1.5
2023-03-01 07:00:03.000    1.0
2023-03-01 07:00:03.500    2.0
2023-03-01 07:00:04.000    3.0
Freq: 500ms, dtype: float64

Internal reindexing with ``asfreq()`` prior to interpolation leads to
an interpolated timeseries on the basis the reindexed timestamps (anchors).
Since not all datapoints from original series become anchors,
it can lead to misleading interpolation results as in the following example:

>>> series.resample("400ms").interpolate("linear")
2023-03-01 07:00:00.000    1.0
2023-03-01 07:00:00.400    1.2
2023-03-01 07:00:00.800    1.4
2023-03-01 07:00:01.200    1.6
2023-03-01 07:00:01.600    1.8
2023-03-01 07:00:02.000    2.0
2023-03-01 07:00:02.400    2.2
2023-03-01 07:00:02.800    2.4
2023-03-01 07:00:03.200    2.6
2023-03-01 07:00:03.600    2.8
2023-03-01 07:00:04.000    3.0
Freq: 400ms, dtype: float64

Note that the series erroneously increases between two anchors
``07:00:00`` and ``07:00:02``.

---
## sum
```python
from resample import sum
```

Compute sum of group values.

Parameters
----------
numeric_only : bool, default False
    Include only float, int, boolean columns.

    .. versionchanged:: 2.0.0

        numeric_only no longer accepts ``None``.

min_count : int, default 0
    The required number of valid values to perform the operation. If fewer
    than ``min_count`` non-NA values are present the result will be NA.

Returns
-------
Series or DataFrame
    Computed sum of values within each group.

Examples
--------
>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').sum()
2023-01-01    3
2023-02-01    7
Freq: MS, dtype: int64

---
## prod
```python
from resample import prod
```

Compute prod of group values.

Parameters
----------
numeric_only : bool, default False
    Include only float, int, boolean columns.

    .. versionchanged:: 2.0.0

        numeric_only no longer accepts ``None``.

min_count : int, default 0
    The required number of valid values to perform the operation. If fewer
    than ``min_count`` non-NA values are present the result will be NA.

Returns
-------
Series or DataFrame
    Computed prod of values within each group.

Examples
--------
>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').prod()
2023-01-01    2
2023-02-01   12
Freq: MS, dtype: int64

---
## min
```python
from resample import min
```

Compute min value of group.

Returns
-------
Series or DataFrame

Examples
--------
>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').min()
2023-01-01    1
2023-02-01    3
Freq: MS, dtype: int64

---
## max
```python
from resample import max
```

Compute max value of group.

Returns
-------
Series or DataFrame

Examples
--------
>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').max()
2023-01-01    2
2023-02-01    4
Freq: MS, dtype: int64

---
## first
```python
from resample import first
```



---
## last
```python
from resample import last
```



---
## median
```python
from resample import median
```



---
## mean
```python
from resample import mean
```

Compute mean of groups, excluding missing values.

Parameters
----------
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
DataFrame or Series
    Mean of values within each group.

Examples
--------

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').mean()
2023-01-01    1.5
2023-02-01    3.5
Freq: MS, dtype: float64

---
## std
```python
from resample import std
```

Compute standard deviation of groups, excluding missing values.

Parameters
----------
ddof : int, default 1
    Degrees of freedom.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
DataFrame or Series
    Standard deviation of values within each group.

Examples
--------

>>> ser = pd.Series([1, 3, 2, 4, 3, 8],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').std()
2023-01-01    1.000000
2023-02-01    2.645751
Freq: MS, dtype: float64

---
## var
```python
from resample import var
```

Compute variance of groups, excluding missing values.

Parameters
----------
ddof : int, default 1
    Degrees of freedom.

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
DataFrame or Series
    Variance of values within each group.

Examples
--------

>>> ser = pd.Series([1, 3, 2, 4, 3, 8],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').var()
2023-01-01    1.0
2023-02-01    7.0
Freq: MS, dtype: float64

>>> ser.resample('MS').var(ddof=0)
2023-01-01    0.666667
2023-02-01    4.666667
Freq: MS, dtype: float64

---
## sem
```python
from resample import sem
```



---
## ohlc
```python
from resample import ohlc
```



---
## nunique
```python
from resample import nunique
```



---
## size
```python
from resample import size
```



---
## count
```python
from resample import count
```



---
## quantile
```python
from resample import quantile
```

Return value at the given quantile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)

Returns
-------
DataFrame or Series
    Quantile of values within each group.

See Also
--------
Series.quantile
    Return a series, where the index is q and the values are the quantiles.
DataFrame.quantile
    Return a DataFrame, where the columns are the columns of self,
    and the values are the quantiles.
DataFrameGroupBy.quantile
    Return a DataFrame, where the columns are groupby columns,
    and the values are its quantiles.

Examples
--------

>>> ser = pd.Series([1, 3, 2, 4, 3, 8],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').quantile()
2023-01-01    2.0
2023-02-01    4.0
Freq: MS, dtype: float64

>>> ser.resample('MS').quantile(.25)
2023-01-01    1.5
2023-02-01    3.5
Freq: MS, dtype: float64

---
## _resampler_for_grouping
```python
from resample import _resampler_for_grouping
```



---
## _adjust_binner_for_upsample
```python
from resample import _adjust_binner_for_upsample
```

Adjust our binner when upsampling.

The range of a new index is allowed to be greater than original range
so we don't need to change the length of a binner, GH 13022

---
## _resampler_cls
```python
from resample import _resampler_cls
```



---
## _get_resampler
```python
from resample import _get_resampler
```

Return my resampler or raise if we have an invalid axis.

Parameters
----------
obj : Series or DataFrame
kind : string, optional
    'period','timestamp','timedelta' are valid

Returns
-------
Resampler

Raises
------
TypeError if incompatible axis

---
## _get_grouper
```python
from resample import _get_grouper
```



---
## _get_time_bins
```python
from resample import _get_time_bins
```



---
## _adjust_bin_edges
```python
from resample import _adjust_bin_edges
```



---
## _get_time_delta_bins
```python
from resample import _get_time_delta_bins
```



---
## _get_time_period_bins
```python
from resample import _get_time_period_bins
```



---
## _get_period_bins
```python
from resample import _get_period_bins
```



---
## _set_grouper
```python
from resample import _set_grouper
```



---
## func
```python
from resample import func
```



---
## __name__
```python
from arraylike import __name__
```

Methods that can be shared by many array-like classes or subclasses:
Series
Index
ExtensionArray

---
## OpsMixin
```python
from arraylike import OpsMixin
```



---
## array_ufunc
```python
from arraylike import array_ufunc
```

Compatibility with numpy ufuncs.

See also
--------
numpy.org/doc/stable/reference/arrays.classes.html#numpy.class.__array_ufunc__

---
## _standardize_out_kwarg
```python
from arraylike import _standardize_out_kwarg
```

If kwargs contain "out1" and "out2", replace that with a tuple "out"

np.divmod, np.modf, np.frexp can have either `out=(out1, out2)` or
`out1=out1, out2=out2)`

---
## dispatch_ufunc_with_out
```python
from arraylike import dispatch_ufunc_with_out
```

If we have an `out` keyword, then call the ufunc without `out` and then
set the result into the given `out`.

---
## _assign_where
```python
from arraylike import _assign_where
```

Set a ufunc result into 'out', masking with a 'where' argument if necessary.

---
## default_array_ufunc
```python
from arraylike import default_array_ufunc
```

Fallback to the behavior we would get if we did not define __array_ufunc__.

Notes
-----
We are assuming that `self` is among `inputs`.

---
## dispatch_reduction_ufunc
```python
from arraylike import dispatch_reduction_ufunc
```

Dispatch ufunc reductions to self's reduction methods.

---
## _cmp_method
```python
from arraylike import _cmp_method
```



---
## __eq__
```python
from arraylike import __eq__
```



---
## __ne__
```python
from arraylike import __ne__
```



---
## __lt__
```python
from arraylike import __lt__
```



---
## __le__
```python
from arraylike import __le__
```



---
## __gt__
```python
from arraylike import __gt__
```



---
## __ge__
```python
from arraylike import __ge__
```



---
## _logical_method
```python
from arraylike import _logical_method
```



---
## __and__
```python
from arraylike import __and__
```



---
## __rand__
```python
from arraylike import __rand__
```



---
## __or__
```python
from arraylike import __or__
```



---
## __ror__
```python
from arraylike import __ror__
```



---
## __xor__
```python
from arraylike import __xor__
```



---
## __rxor__
```python
from arraylike import __rxor__
```



---
## _arith_method
```python
from arraylike import _arith_method
```



---
## __add__
```python
from arraylike import __add__
```

Get Addition of DataFrame and other, column-wise.

Equivalent to ``DataFrame.add(other)``.

Parameters
----------
other : scalar, sequence, Series, dict or DataFrame
    Object to be added to the DataFrame.

Returns
-------
DataFrame
    The result of adding ``other`` to DataFrame.

See Also
--------
DataFrame.add : Add a DataFrame and another object, with option for index-
    or column-oriented addition.

Examples
--------
>>> df = pd.DataFrame({'height': [1.5, 2.6], 'weight': [500, 800]},
...                   index=['elk', 'moose'])
>>> df
       height  weight
elk       1.5     500
moose     2.6     800

Adding a scalar affects all rows and columns.

>>> df[['height', 'weight']] + 1.5
       height  weight
elk       3.0   501.5
moose     4.1   801.5

Each element of a list is added to a column of the DataFrame, in order.

>>> df[['height', 'weight']] + [0.5, 1.5]
       height  weight
elk       2.0   501.5
moose     3.1   801.5

Keys of a dictionary are aligned to the DataFrame, based on column names;
each value in the dictionary is added to the corresponding column.

>>> df[['height', 'weight']] + {'height': 0.5, 'weight': 1.5}
       height  weight
elk       2.0   501.5
moose     3.1   801.5

When `other` is a :class:`Series`, the index of `other` is aligned with the
columns of the DataFrame.

>>> s1 = pd.Series([0.5, 1.5], index=['weight', 'height'])
>>> df[['height', 'weight']] + s1
       height  weight
elk       3.0   500.5
moose     4.1   800.5

Even when the index of `other` is the same as the index of the DataFrame,
the :class:`Series` will not be reoriented. If index-wise alignment is desired,
:meth:`DataFrame.add` should be used with `axis='index'`.

>>> s2 = pd.Series([0.5, 1.5], index=['elk', 'moose'])
>>> df[['height', 'weight']] + s2
       elk  height  moose  weight
elk    NaN     NaN    NaN     NaN
moose  NaN     NaN    NaN     NaN

>>> df[['height', 'weight']].add(s2, axis='index')
       height  weight
elk       2.0   500.5
moose     4.1   801.5

When `other` is a :class:`DataFrame`, both columns names and the
index are aligned.

>>> other = pd.DataFrame({'height': [0.2, 0.4, 0.6]},
...                      index=['elk', 'moose', 'deer'])
>>> df[['height', 'weight']] + other
       height  weight
deer      NaN     NaN
elk       1.7     NaN
moose     3.0     NaN

---
## __radd__
```python
from arraylike import __radd__
```



---
## __sub__
```python
from arraylike import __sub__
```



---
## __rsub__
```python
from arraylike import __rsub__
```



---
## __mul__
```python
from arraylike import __mul__
```



---
## __rmul__
```python
from arraylike import __rmul__
```



---
## __truediv__
```python
from arraylike import __truediv__
```



---
## __rtruediv__
```python
from arraylike import __rtruediv__
```



---
## __floordiv__
```python
from arraylike import __floordiv__
```



---
## __rfloordiv__
```python
from arraylike import __rfloordiv__
```



---
## __mod__
```python
from arraylike import __mod__
```



---
## __rmod__
```python
from arraylike import __rmod__
```



---
## __divmod__
```python
from arraylike import __divmod__
```



---
## __rdivmod__
```python
from arraylike import __rdivmod__
```



---
## __pow__
```python
from arraylike import __pow__
```



---
## __rpow__
```python
from arraylike import __rpow__
```



---
## reconstruct
```python
from arraylike import reconstruct
```



---
## _reconstruct
```python
from arraylike import _reconstruct
```



---
## __name__
```python
from construction import __name__
```

Functions for preparing various inputs passed to the DataFrame or Series
constructors before passing them to a BlockManager.

---
## array
```python
from construction import array
```

Create an array.

Parameters
----------
data : Sequence of objects
    The scalars inside `data` should be instances of the
    scalar type for `dtype`. It's expected that `data`
    represents a 1-dimensional array of data.

    When `data` is an Index or Series, the underlying array
    will be extracted from `data`.

dtype : str, np.dtype, or ExtensionDtype, optional
    The dtype to use for the array. This may be a NumPy
    dtype or an extension type registered with pandas using
    :meth:`pandas.api.extensions.register_extension_dtype`.

    If not specified, there are two possibilities:

    1. When `data` is a :class:`Series`, :class:`Index`, or
       :class:`ExtensionArray`, the `dtype` will be taken
       from the data.
    2. Otherwise, pandas will attempt to infer the `dtype`
       from the data.

    Note that when `data` is a NumPy array, ``data.dtype`` is
    *not* used for inferring the array type. This is because
    NumPy cannot represent all the types of data that can be
    held in extension arrays.

    Currently, pandas will infer an extension dtype for sequences of

    ============================== =======================================
    Scalar Type                    Array Type
    ============================== =======================================
    :class:`pandas.Interval`       :class:`pandas.arrays.IntervalArray`
    :class:`pandas.Period`         :class:`pandas.arrays.PeriodArray`
    :class:`datetime.datetime`     :class:`pandas.arrays.DatetimeArray`
    :class:`datetime.timedelta`    :class:`pandas.arrays.TimedeltaArray`
    :class:`int`                   :class:`pandas.arrays.IntegerArray`
    :class:`float`                 :class:`pandas.arrays.FloatingArray`
    :class:`str`                   :class:`pandas.arrays.StringArray` or
                                   :class:`pandas.arrays.ArrowStringArray`
    :class:`bool`                  :class:`pandas.arrays.BooleanArray`
    ============================== =======================================

    The ExtensionArray created when the scalar type is :class:`str` is determined by
    ``pd.options.mode.string_storage`` if the dtype is not explicitly given.

    For all other cases, NumPy's usual inference rules will be used.
copy : bool, default True
    Whether to copy the data, even if not necessary. Depending
    on the type of `data`, creating the new array may require
    copying data, even if ``copy=False``.

Returns
-------
ExtensionArray
    The newly created array.

Raises
------
ValueError
    When `data` is not 1-dimensional.

See Also
--------
numpy.array : Construct a NumPy array.
Series : Construct a pandas Series.
Index : Construct a pandas Index.
arrays.NumpyExtensionArray : ExtensionArray wrapping a NumPy array.
Series.array : Extract the array stored within a Series.

Notes
-----
Omitting the `dtype` argument means pandas will attempt to infer the
best array type from the values in the data. As new array types are
added by pandas and 3rd party libraries, the "best" array type may
change. We recommend specifying `dtype` to ensure that

1. the correct array type for the data is returned
2. the returned array type doesn't change as new extension types
   are added by pandas and third-party libraries

Additionally, if the underlying memory representation of the returned
array matters, we recommend specifying the `dtype` as a concrete object
rather than a string alias or allowing it to be inferred. For example,
a future version of pandas or a 3rd-party library may include a
dedicated ExtensionArray for string data. In this event, the following
would no longer return a :class:`arrays.NumpyExtensionArray` backed by a
NumPy array.

>>> pd.array(['a', 'b'], dtype=str)
<NumpyExtensionArray>
['a', 'b']
Length: 2, dtype: str32

This would instead return the new ExtensionArray dedicated for string
data. If you really need the new array to be backed by a  NumPy array,
specify that in the dtype.

>>> pd.array(['a', 'b'], dtype=np.dtype("<U1"))
<NumpyExtensionArray>
['a', 'b']
Length: 2, dtype: str32

Finally, Pandas has arrays that mostly overlap with NumPy

  * :class:`arrays.DatetimeArray`
  * :class:`arrays.TimedeltaArray`

When data with a ``datetime64[ns]`` or ``timedelta64[ns]`` dtype is
passed, pandas will always return a ``DatetimeArray`` or ``TimedeltaArray``
rather than a ``NumpyExtensionArray``. This is for symmetry with the case of
timezone-aware data, which NumPy does not natively support.

>>> pd.array(['2015', '2016'], dtype='datetime64[ns]')
<DatetimeArray>
['2015-01-01 00:00:00', '2016-01-01 00:00:00']
Length: 2, dtype: datetime64[ns]

>>> pd.array(["1h", "2h"], dtype='timedelta64[ns]')
<TimedeltaArray>
['0 days 01:00:00', '0 days 02:00:00']
Length: 2, dtype: timedelta64[ns]

Examples
--------
If a dtype is not specified, pandas will infer the best dtype from the values.
See the description of `dtype` for the types pandas infers for.

>>> pd.array([1, 2])
<IntegerArray>
[1, 2]
Length: 2, dtype: Int64

>>> pd.array([1, 2, np.nan])
<IntegerArray>
[1, 2, <NA>]
Length: 3, dtype: Int64

>>> pd.array([1.1, 2.2])
<FloatingArray>
[1.1, 2.2]
Length: 2, dtype: Float64

>>> pd.array(["a", None, "c"])
<StringArray>
['a', <NA>, 'c']
Length: 3, dtype: string

>>> with pd.option_context("string_storage", "pyarrow"):
...     arr = pd.array(["a", None, "c"])
...
>>> arr
<ArrowStringArray>
['a', <NA>, 'c']
Length: 3, dtype: string

>>> pd.array([pd.Period('2000', freq="D"), pd.Period("2000", freq="D")])
<PeriodArray>
['2000-01-01', '2000-01-01']
Length: 2, dtype: period[D]

You can use the string alias for `dtype`

>>> pd.array(['a', 'b', 'a'], dtype='category')
['a', 'b', 'a']
Categories (2, object): ['a', 'b']

Or specify the actual dtype

>>> pd.array(['a', 'b', 'a'],
...          dtype=pd.CategoricalDtype(['a', 'b', 'c'], ordered=True))
['a', 'b', 'a']
Categories (3, object): ['a' < 'b' < 'c']

If pandas does not infer a dedicated extension type a
:class:`arrays.NumpyExtensionArray` is returned.

>>> pd.array([1 + 1j, 3 + 2j])
<NumpyExtensionArray>
[(1+1j), (3+2j)]
Length: 2, dtype: complex128

As mentioned in the "Notes" section, new extension types may be added
in the future (by pandas or 3rd party libraries), causing the return
value to no longer be a :class:`arrays.NumpyExtensionArray`. Specify the
`dtype` as a NumPy dtype if you need to ensure there's no future change in
behavior.

>>> pd.array([1, 2], dtype=np.dtype("int32"))
<NumpyExtensionArray>
[1, 2]
Length: 2, dtype: int32

`data` must be 1-dimensional. A ValueError is raised when the input
has the wrong dimensionality.

>>> pd.array(1)
Traceback (most recent call last):
  ...
ValueError: Cannot pass scalar '1' to 'pandas.array'.

---
## extract_array
```python
from construction import extract_array
```

Extract the ndarray or ExtensionArray from a Series or Index.

For all other types, `obj` is just returned as is.

Parameters
----------
obj : object
    For Series / Index, the underlying ExtensionArray is unboxed.

extract_numpy : bool, default False
    Whether to extract the ndarray from a NumpyExtensionArray.

extract_range : bool, default False
    If we have a RangeIndex, return range._values if True
    (which is a materialized integer ndarray), otherwise return unchanged.

Returns
-------
arr : object

Examples
--------
>>> extract_array(pd.Series(['a', 'b', 'c'], dtype='category'))
['a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']

Other objects like lists, arrays, and DataFrames are just passed through.

>>> extract_array([1, 2, 3])
[1, 2, 3]

For an ndarray-backed Series / Index the ndarray is returned.

>>> extract_array(pd.Series([1, 2, 3]))
array([1, 2, 3])

To extract all the way down to the ndarray, pass ``extract_numpy=True``.

>>> extract_array(pd.Series([1, 2, 3]), extract_numpy=True)
array([1, 2, 3])

---
## ensure_wrapped_if_datetimelike
```python
from construction import ensure_wrapped_if_datetimelike
```

Wrap datetime64 and timedelta64 ndarrays in DatetimeArray/TimedeltaArray.

---
## sanitize_masked_array
```python
from construction import sanitize_masked_array
```

Convert numpy MaskedArray to ensure mask is softened.

---
## sanitize_array
```python
from construction import sanitize_array
```

Sanitize input data to an ndarray or ExtensionArray, copy if specified,
coerce to the dtype if specified.

Parameters
----------
data : Any
index : Index or None, default None
dtype : np.dtype, ExtensionDtype, or None, default None
copy : bool, default False
allow_2d : bool, default False
    If False, raise if we have a 2D Arraylike.

Returns
-------
np.ndarray or ExtensionArray

---
## range_to_ndarray
```python
from construction import range_to_ndarray
```

Cast a range object to ndarray.

---
## _sanitize_non_ordered
```python
from construction import _sanitize_non_ordered
```

Raise only for unordered sets, e.g., not for dict_keys

---
## _sanitize_ndim
```python
from construction import _sanitize_ndim
```

Ensure we have a 1-dimensional result array.

---
## _sanitize_str_dtypes
```python
from construction import _sanitize_str_dtypes
```

Ensure we have a dtype that is supported by pandas.

---
## _maybe_repeat
```python
from construction import _maybe_repeat
```

If we have a length-1 array and an index describing how long we expect
the result to be, repeat the array.

---
## _try_cast
```python
from construction import _try_cast
```

Convert input to numpy ndarray and optionally cast to a given dtype.

Parameters
----------
arr : ndarray or list
    Excludes: ExtensionArray, Series, Index.
dtype : np.dtype
copy : bool
    If False, don't copy the data if not needed.

Returns
-------
np.ndarray or ExtensionArray

---
## __name__
```python
from config_init import __name__
```

This module is imported from the pandas package __init__.py file
in order to ensure that the core.config options registered here will
be available as soon as the user loads the package. if register_option
is invoked inside specific modules, they will not be registered until that
module is imported, which may or may not be a problem.

If you need to make sure options are available even before a certain
module is imported, register them here rather than in the module.

---
## use_bottleneck_cb
```python
from config_init import use_bottleneck_cb
```



---
## use_numexpr_cb
```python
from config_init import use_numexpr_cb
```



---
## use_numba_cb
```python
from config_init import use_numba_cb
```



---
## table_schema_cb
```python
from config_init import table_schema_cb
```



---
## is_terminal
```python
from config_init import is_terminal
```

Detect if Python is running in a terminal.

Returns True if Python is running in a terminal or False if not.

---
## use_inf_as_na_cb
```python
from config_init import use_inf_as_na_cb
```



---
## register_plotting_backend_cb
```python
from config_init import register_plotting_backend_cb
```



---
## register_converter_cb
```python
from config_init import register_converter_cb
```



---
## __name__
```python
from flags import __name__
```



---
## Flags
```python
from flags import Flags
```

Flags that apply to pandas objects.

Parameters
----------
obj : Series or DataFrame
    The object these flags are associated with.
allows_duplicate_labels : bool, default True
    Whether to allow duplicate labels in this object. By default,
    duplicate labels are permitted. Setting this to ``False`` will
    cause an :class:`errors.DuplicateLabelError` to be raised when
    `index` (or columns for DataFrame) is not unique, or any
    subsequent operation on introduces duplicates.
    See :ref:`duplicates.disallow` for more.

    .. warning::

       This is an experimental feature. Currently, many methods fail to
       propagate the ``allows_duplicate_labels`` value. In future versions
       it is expected that every method taking or returning one or more
       DataFrame or Series objects will propagate ``allows_duplicate_labels``.

Examples
--------
Attributes can be set in two ways:

>>> df = pd.DataFrame()
>>> df.flags
<Flags(allows_duplicate_labels=True)>
>>> df.flags.allows_duplicate_labels = False
>>> df.flags
<Flags(allows_duplicate_labels=False)>

>>> df.flags['allows_duplicate_labels'] = True
>>> df.flags
<Flags(allows_duplicate_labels=True)>

---
## __init__
```python
from flags import __init__
```



---
## allows_duplicate_labels
```python
from flags import allows_duplicate_labels
```



---
## __getitem__
```python
from flags import __getitem__
```



---
## __setitem__
```python
from flags import __setitem__
```



---
## __repr__
```python
from flags import __repr__
```



---
## __eq__
```python
from flags import __eq__
```



---
## NDFrame
```python
from generic import NDFrame
```

N-dimensional analogue of DataFrame. Store multi-dimensional in a
size-mutable, labeled data structure

Parameters
----------
data : BlockManager
axes : list
copy : bool, default False

---
## make_doc
```python
from generic import make_doc
```

Generate the docstring for a Series/DataFrame reduction.

---
## _init_mgr
```python
from generic import _init_mgr
```

passed a manager and a axes dict

---
## _as_manager
```python
from generic import _as_manager
```

Private helper function to create a DataFrame with specific manager.

Parameters
----------
typ : {"block", "array"}
copy : bool, default True
    Only controls whether the conversion from Block->ArrayManager
    copies the 1D arrays (to ensure proper/contiguous memory layout).

Returns
-------
DataFrame
    New DataFrame using specified manager type. Is not guaranteed
    to be a copy or not.

---
## _from_mgr
```python
from generic import _from_mgr
```

Construct a new object of this type from a Manager object and axes.

Parameters
----------
mgr : Manager
    Must have the same ndim as cls.
axes : list[Index]

Notes
-----
The axes must match mgr.axes, but are required for future-proofing
in the event that axes are refactored out of the Manager objects.

---
## attrs
```python
from generic import attrs
```



---
## flags
```python
from generic import flags
```

Get the properties associated with this pandas object.

The available flags are

* :attr:`Flags.allows_duplicate_labels`

See Also
--------
Flags : Flags that apply to pandas objects.
DataFrame.attrs : Global metadata applying to this dataset.

Notes
-----
"Flags" differ from "metadata". Flags reflect properties of the
pandas object (the Series or DataFrame). Metadata refer to properties
of the dataset, and should be stored in :attr:`DataFrame.attrs`.

Examples
--------
>>> df = pd.DataFrame({"A": [1, 2]})
>>> df.flags
<Flags(allows_duplicate_labels=True)>

Flags can be get or set using ``.``

>>> df.flags.allows_duplicate_labels
True
>>> df.flags.allows_duplicate_labels = False

Or by slicing with a key

>>> df.flags["allows_duplicate_labels"]
False
>>> df.flags["allows_duplicate_labels"] = True

---
## set_flags
```python
from generic import set_flags
```

Return a new object with updated flags.

Parameters
----------
copy : bool, default False
    Specify if a copy of the object should be made.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
allows_duplicate_labels : bool, optional
    Whether the returned object allows duplicate labels.

Returns
-------
Series or DataFrame
    The same type as the caller.

See Also
--------
DataFrame.attrs : Global metadata applying to this dataset.
DataFrame.flags : Global flags applying to this object.

Notes
-----
This method returns a new object that's a view on the same data
as the input. Mutating the input or the output values will be reflected
in the other.

This method is intended to be used in method chains.

"Flags" differ from "metadata". Flags reflect properties of the
pandas object (the Series or DataFrame). Metadata refer to properties
of the dataset, and should be stored in :attr:`DataFrame.attrs`.

Examples
--------
>>> df = pd.DataFrame({"A": [1, 2]})
>>> df.flags.allows_duplicate_labels
True
>>> df2 = df.set_flags(allows_duplicate_labels=False)
>>> df2.flags.allows_duplicate_labels
False

---
## _validate_dtype
```python
from generic import _validate_dtype
```

validate the passed dtype

---
## _constructor
```python
from generic import _constructor
```

Used when a manipulation result has the same dimensions as the
original.

---
## _data
```python
from generic import _data
```



---
## _construct_axes_dict
```python
from generic import _construct_axes_dict
```

Return an axes dictionary for myself.

---
## _get_axis_number
```python
from generic import _get_axis_number
```



---
## _get_axis_name
```python
from generic import _get_axis_name
```



---
## _get_axis
```python
from generic import _get_axis
```



---
## _get_block_manager_axis
```python
from generic import _get_block_manager_axis
```

Map the axis to the block_manager axis.

---
## _get_axis_resolvers
```python
from generic import _get_axis_resolvers
```



---
## _get_index_resolvers
```python
from generic import _get_index_resolvers
```



---
## _get_cleaned_column_resolvers
```python
from generic import _get_cleaned_column_resolvers
```

Return the special character free column resolvers of a dataframe.

Column names with special characters are 'cleaned up' so that they can
be referred to by backtick quoting.
Used in :meth:`DataFrame.eval`.

---
## _info_axis
```python
from generic import _info_axis
```



---
## _is_view_after_cow_rules
```python
from generic import _is_view_after_cow_rules
```



---
## shape
```python
from generic import shape
```

Return a tuple of axis dimensions

---
## axes
```python
from generic import axes
```

Return index label(s) of the internal NDFrame

---
## ndim
```python
from generic import ndim
```

Return an int representing the number of axes / array dimensions.

Return 1 if Series. Otherwise return 2 if DataFrame.

See Also
--------
ndarray.ndim : Number of array dimensions.

Examples
--------
>>> s = pd.Series({'a': 1, 'b': 2, 'c': 3})
>>> s.ndim
1

>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.ndim
2

---
## size
```python
from generic import size
```

Return an int representing the number of elements in this object.

Return the number of rows if Series. Otherwise return the number of
rows times number of columns if DataFrame.

See Also
--------
ndarray.size : Number of elements in the array.

Examples
--------
>>> s = pd.Series({'a': 1, 'b': 2, 'c': 3})
>>> s.size
3

>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.size
4

---
## set_axis
```python
from generic import set_axis
```

Assign desired index to given axis.

Indexes for%(extended_summary_sub)s row labels can be changed by assigning
a list-like or Index.

Parameters
----------
labels : list-like, Index
    The values for the new index.

axis : %(axes_single_arg)s, default 0
    The axis to update. The value 0 identifies the rows. For `Series`
    this parameter is unused and defaults to 0.

copy : bool, default True
    Whether to make a copy of the underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
%(klass)s
    An object of type %(klass)s.

See Also
--------
%(klass)s.rename_axis : Alter the name of the index%(see_also_sub)s.

---
## _set_axis_nocheck
```python
from generic import _set_axis_nocheck
```



---
## _set_axis
```python
from generic import _set_axis
```

This is called from the cython code when we set the `index` attribute
directly, e.g. `series.index = [1, 2, 3]`.

---
## swapaxes
```python
from generic import swapaxes
```

Interchange axes and swap values axes appropriately.

.. deprecated:: 2.1.0
    ``swapaxes`` is deprecated and will be removed.
    Please use ``transpose`` instead.

Returns
-------
same as input

Examples
--------
Please see examples for :meth:`DataFrame.transpose`.

---
## droplevel
```python
from generic import droplevel
```

Return {klass} with requested index / column level(s) removed.

Parameters
----------
level : int, str, or list-like
    If a string is given, must be the name of a level
    If list-like, elements must be names or positional indexes
    of levels.

axis : {{0 or 'index', 1 or 'columns'}}, default 0
    Axis along which the level(s) is removed:

    * 0 or 'index': remove level(s) in column.
    * 1 or 'columns': remove level(s) in row.

    For `Series` this parameter is unused and defaults to 0.

Returns
-------
{klass}
    {klass} with requested index / column level(s) removed.

Examples
--------
>>> df = pd.DataFrame([
...     [1, 2, 3, 4],
...     [5, 6, 7, 8],
...     [9, 10, 11, 12]
... ]).set_index([0, 1]).rename_axis(['a', 'b'])

>>> df.columns = pd.MultiIndex.from_tuples([
...     ('c', 'e'), ('d', 'f')
... ], names=['level_1', 'level_2'])

>>> df
level_1   c   d
level_2   e   f
a b
1 2      3   4
5 6      7   8
9 10    11  12

>>> df.droplevel('a')
level_1   c   d
level_2   e   f
b
2        3   4
6        7   8
10      11  12

>>> df.droplevel('level_2', axis=1)
level_1   c   d
a b
1 2      3   4
5 6      7   8
9 10    11  12

---
## pop
```python
from generic import pop
```



---
## squeeze
```python
from generic import squeeze
```

Squeeze 1 dimensional axis objects into scalars.

Series or DataFrames with a single element are squeezed to a scalar.
DataFrames with a single column or a single row are squeezed to a
Series. Otherwise the object is unchanged.

This method is most useful when you don't know if your
object is a Series or DataFrame, but you do know it has just a single
column. In that case you can safely call `squeeze` to ensure you have a
Series.

Parameters
----------
axis : {0 or 'index', 1 or 'columns', None}, default None
    A specific axis to squeeze. By default, all length-1 axes are
    squeezed. For `Series` this parameter is unused and defaults to `None`.

Returns
-------
DataFrame, Series, or scalar
    The projection after squeezing `axis` or all the axes.

See Also
--------
Series.iloc : Integer-location based indexing for selecting scalars.
DataFrame.iloc : Integer-location based indexing for selecting Series.
Series.to_frame : Inverse of DataFrame.squeeze for a
    single-column DataFrame.

Examples
--------
>>> primes = pd.Series([2, 3, 5, 7])

Slicing might produce a Series with a single value:

>>> even_primes = primes[primes % 2 == 0]
>>> even_primes
0    2
dtype: int64

>>> even_primes.squeeze()
2

Squeezing objects with more than one value in every axis does nothing:

>>> odd_primes = primes[primes % 2 == 1]
>>> odd_primes
1    3
2    5
3    7
dtype: int64

>>> odd_primes.squeeze()
1    3
2    5
3    7
dtype: int64

Squeezing is even more effective when used with DataFrames.

>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['a', 'b'])
>>> df
   a  b
0  1  2
1  3  4

Slicing a single column will produce a DataFrame with the columns
having only one value:

>>> df_a = df[['a']]
>>> df_a
   a
0  1
1  3

So the columns can be squeezed down, resulting in a Series:

>>> df_a.squeeze('columns')
0    1
1    3
Name: a, dtype: int64

Slicing a single row from a single column will produce a single
scalar DataFrame:

>>> df_0a = df.loc[df.index < 1, ['a']]
>>> df_0a
   a
0  1

Squeezing the rows produces a single scalar Series:

>>> df_0a.squeeze('rows')
a    1
Name: 0, dtype: int64

Squeezing all axes will project directly into a scalar:

>>> df_0a.squeeze()
1

---
## _rename
```python
from generic import _rename
```



---
## rename_axis
```python
from generic import rename_axis
```

Set the name of the axis for the index or columns.

Parameters
----------
mapper : scalar, list-like, optional
    Value to set the axis name attribute.
index, columns : scalar, list-like, dict-like or function, optional
    A scalar, list-like, dict-like or functions transformations to
    apply to that axis' values.
    Note that the ``columns`` parameter is not allowed if the
    object is a Series. This parameter only apply for DataFrame
    type objects.

    Use either ``mapper`` and ``axis`` to
    specify the axis to target with ``mapper``, or ``index``
    and/or ``columns``.
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to rename. For `Series` this parameter is unused and defaults to 0.
copy : bool, default None
    Also copy underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
inplace : bool, default False
    Modifies the object directly, instead of creating a new Series
    or DataFrame.

Returns
-------
Series, DataFrame, or None
    The same type as the caller or None if ``inplace=True``.

See Also
--------
Series.rename : Alter Series index labels or name.
DataFrame.rename : Alter DataFrame index labels or name.
Index.rename : Set new names on index.

Notes
-----
``DataFrame.rename_axis`` supports two calling conventions

* ``(index=index_mapper, columns=columns_mapper, ...)``
* ``(mapper, axis={'index', 'columns'}, ...)``

The first calling convention will only modify the names of
the index and/or the names of the Index object that is the columns.
In this case, the parameter ``copy`` is ignored.

The second calling convention will modify the names of the
corresponding index if mapper is a list or a scalar.
However, if mapper is dict-like or a function, it will use the
deprecated behavior of modifying the axis *labels*.

We *highly* recommend using keyword arguments to clarify your
intent.

Examples
--------
**Series**

>>> s = pd.Series(["dog", "cat", "monkey"])
>>> s
0       dog
1       cat
2    monkey
dtype: object
>>> s.rename_axis("animal")
animal
0    dog
1    cat
2    monkey
dtype: object

**DataFrame**

>>> df = pd.DataFrame({"num_legs": [4, 4, 2],
...                    "num_arms": [0, 0, 2]},
...                   ["dog", "cat", "monkey"])
>>> df
        num_legs  num_arms
dog            4         0
cat            4         0
monkey         2         2
>>> df = df.rename_axis("animal")
>>> df
        num_legs  num_arms
animal
dog            4         0
cat            4         0
monkey         2         2
>>> df = df.rename_axis("limbs", axis="columns")
>>> df
limbs   num_legs  num_arms
animal
dog            4         0
cat            4         0
monkey         2         2

**MultiIndex**

>>> df.index = pd.MultiIndex.from_product([['mammal'],
...                                        ['dog', 'cat', 'monkey']],
...                                       names=['type', 'name'])
>>> df
limbs          num_legs  num_arms
type   name
mammal dog            4         0
       cat            4         0
       monkey         2         2

>>> df.rename_axis(index={'type': 'class'})
limbs          num_legs  num_arms
class  name
mammal dog            4         0
       cat            4         0
       monkey         2         2

>>> df.rename_axis(columns=str.upper)
LIMBS          num_legs  num_arms
type   name
mammal dog            4         0
       cat            4         0
       monkey         2         2

---
## _set_axis_name
```python
from generic import _set_axis_name
```

Set the name(s) of the axis.

Parameters
----------
name : str or list of str
    Name(s) to set.
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to set the label. The value 0 or 'index' specifies index,
    and the value 1 or 'columns' specifies columns.
inplace : bool, default False
    If `True`, do operation inplace and return None.
copy:
    Whether to make a copy of the result.

Returns
-------
Series, DataFrame, or None
    The same type as the caller or `None` if `inplace` is `True`.

See Also
--------
DataFrame.rename : Alter the axis labels of :class:`DataFrame`.
Series.rename : Alter the index labels or set the index name
    of :class:`Series`.
Index.rename : Set the name of :class:`Index` or :class:`MultiIndex`.

Examples
--------
>>> df = pd.DataFrame({"num_legs": [4, 4, 2]},
...                   ["dog", "cat", "monkey"])
>>> df
        num_legs
dog            4
cat            4
monkey         2
>>> df._set_axis_name("animal")
        num_legs
animal
dog            4
cat            4
monkey         2
>>> df.index = pd.MultiIndex.from_product(
...                [["mammal"], ['dog', 'cat', 'monkey']])
>>> df._set_axis_name(["type", "name"])
               num_legs
type   name
mammal dog        4
       cat        4
       monkey     2

---
## _indexed_same
```python
from generic import _indexed_same
```



---
## equals
```python
from generic import equals
```

Test whether two objects contain the same elements.

This function allows two Series or DataFrames to be compared against
each other to see if they have the same shape and elements. NaNs in
the same location are considered equal.

The row/column index do not need to have the same type, as long
as the values are considered equal. Corresponding columns and
index must be of the same dtype.

Parameters
----------
other : Series or DataFrame
    The other Series or DataFrame to be compared with the first.

Returns
-------
bool
    True if all elements are the same in both objects, False
    otherwise.

See Also
--------
Series.eq : Compare two Series objects of the same length
    and return a Series where each element is True if the element
    in each Series is equal, False otherwise.
DataFrame.eq : Compare two DataFrame objects of the same shape and
    return a DataFrame where each element is True if the respective
    element in each DataFrame is equal, False otherwise.
testing.assert_series_equal : Raises an AssertionError if left and
    right are not equal. Provides an easy interface to ignore
    inequality in dtypes, indexes and precision among others.
testing.assert_frame_equal : Like assert_series_equal, but targets
    DataFrames.
numpy.array_equal : Return True if two arrays have the same shape
    and elements, False otherwise.

Examples
--------
>>> df = pd.DataFrame({1: [10], 2: [20]})
>>> df
    1   2
0  10  20

DataFrames df and exactly_equal have the same types and values for
their elements and column labels, which will return True.

>>> exactly_equal = pd.DataFrame({1: [10], 2: [20]})
>>> exactly_equal
    1   2
0  10  20
>>> df.equals(exactly_equal)
True

DataFrames df and different_column_type have the same element
types and values, but have different types for the column labels,
which will still return True.

>>> different_column_type = pd.DataFrame({1.0: [10], 2.0: [20]})
>>> different_column_type
   1.0  2.0
0   10   20
>>> df.equals(different_column_type)
True

DataFrames df and different_data_type have different types for the
same values for their elements, and will return False even though
their column labels are the same values and types.

>>> different_data_type = pd.DataFrame({1: [10.0], 2: [20.0]})
>>> different_data_type
      1     2
0  10.0  20.0
>>> df.equals(different_data_type)
False

---
## __neg__
```python
from generic import __neg__
```



---
## __pos__
```python
from generic import __pos__
```



---
## __invert__
```python
from generic import __invert__
```



---
## __nonzero__
```python
from generic import __nonzero__
```



---
## bool
```python
from generic import bool
```

Return the bool of a single element Series or DataFrame.

.. deprecated:: 2.1.0

   bool is deprecated and will be removed in future version of pandas.
   For ``Series`` use ``pandas.Series.item``.

This must be a boolean scalar value, either True or False. It will raise a
ValueError if the Series or DataFrame does not have exactly 1 element, or that
element is not boolean (integer values 0 and 1 will also raise an exception).

Returns
-------
bool
    The value in the Series or DataFrame.

See Also
--------
Series.astype : Change the data type of a Series, including to boolean.
DataFrame.astype : Change the data type of a DataFrame, including to boolean.
numpy.bool_ : NumPy boolean data type, used by pandas for boolean values.

Examples
--------
The method will only work for single element objects with a boolean value:

>>> pd.Series([True]).bool()  # doctest: +SKIP
True
>>> pd.Series([False]).bool()  # doctest: +SKIP
False

>>> pd.DataFrame({'col': [True]}).bool()  # doctest: +SKIP
True
>>> pd.DataFrame({'col': [False]}).bool()  # doctest: +SKIP
False

This is an alternative method and will only work
for single element objects with a boolean value:

>>> pd.Series([True]).item()  # doctest: +SKIP
True
>>> pd.Series([False]).item()  # doctest: +SKIP
False

---
## abs
```python
from generic import abs
```

Return a Series/DataFrame with absolute numeric value of each element.

This function only applies to elements that are all numeric.

Returns
-------
abs
    Series/DataFrame containing the absolute value of each element.

See Also
--------
numpy.absolute : Calculate the absolute value element-wise.

Notes
-----
For ``complex`` inputs, ``1.2 + 1j``, the absolute value is
:math:`\sqrt{ a^2 + b^2 }`.

Examples
--------
Absolute numeric values in a Series.

>>> s = pd.Series([-1.10, 2, -3.33, 4])
>>> s.abs()
0    1.10
1    2.00
2    3.33
3    4.00
dtype: float64

Absolute numeric values in a Series with complex numbers.

>>> s = pd.Series([1.2 + 1j])
>>> s.abs()
0    1.56205
dtype: float64

Absolute numeric values in a Series with a Timedelta element.

>>> s = pd.Series([pd.Timedelta('1 days')])
>>> s.abs()
0   1 days
dtype: timedelta64[ns]

Select rows with data closest to certain value using argsort (from
`StackOverflow <https://stackoverflow.com/a/17758115>`__).

>>> df = pd.DataFrame({
...     'a': [4, 5, 6, 7],
...     'b': [10, 20, 30, 40],
...     'c': [100, 50, -30, -50]
... })
>>> df
     a    b    c
0    4   10  100
1    5   20   50
2    6   30  -30
3    7   40  -50
>>> df.loc[(df.c - 43).abs().argsort()]
     a    b    c
1    5   20   50
0    4   10  100
2    6   30  -30
3    7   40  -50

---
## __abs__
```python
from generic import __abs__
```



---
## __round__
```python
from generic import __round__
```



---
## _is_level_reference
```python
from generic import _is_level_reference
```

Test whether a key is a level reference for a given axis.

To be considered a level reference, `key` must be a string that:
  - (axis=0): Matches the name of an index level and does NOT match
    a column label.
  - (axis=1): Matches the name of a column level and does NOT match
    an index label.

Parameters
----------
key : Hashable
    Potential level name for the given axis
axis : int, default 0
    Axis that levels are associated with (0 for index, 1 for columns)

Returns
-------
is_level : bool

---
## _is_label_reference
```python
from generic import _is_label_reference
```

Test whether a key is a label reference for a given axis.

To be considered a label reference, `key` must be a string that:
  - (axis=0): Matches a column label
  - (axis=1): Matches an index label

Parameters
----------
key : Hashable
    Potential label name, i.e. Index entry.
axis : int, default 0
    Axis perpendicular to the axis that labels are associated with
    (0 means search for column labels, 1 means search for index labels)

Returns
-------
is_label: bool

---
## _is_label_or_level_reference
```python
from generic import _is_label_or_level_reference
```

Test whether a key is a label or level reference for a given axis.

To be considered either a label or a level reference, `key` must be a
string that:
  - (axis=0): Matches a column label or an index level
  - (axis=1): Matches an index label or a column level

Parameters
----------
key : Hashable
    Potential label or level name
axis : int, default 0
    Axis that levels are associated with (0 for index, 1 for columns)

Returns
-------
bool

---
## _check_label_or_level_ambiguity
```python
from generic import _check_label_or_level_ambiguity
```

Check whether `key` is ambiguous.

By ambiguous, we mean that it matches both a level of the input
`axis` and a label of the other axis.

Parameters
----------
key : Hashable
    Label or level name.
axis : int, default 0
    Axis that levels are associated with (0 for index, 1 for columns).

Raises
------
ValueError: `key` is ambiguous

---
## _get_label_or_level_values
```python
from generic import _get_label_or_level_values
```

Return a 1-D array of values associated with `key`, a label or level
from the given `axis`.

Retrieval logic:
  - (axis=0): Return column values if `key` matches a column label.
    Otherwise return index level values if `key` matches an index
    level.
  - (axis=1): Return row values if `key` matches an index label.
    Otherwise return column level values if 'key' matches a column
    level

Parameters
----------
key : Hashable
    Label or level name.
axis : int, default 0
    Axis that levels are associated with (0 for index, 1 for columns)

Returns
-------
np.ndarray or ExtensionArray

Raises
------
KeyError
    if `key` matches neither a label nor a level
ValueError
    if `key` matches multiple labels

---
## _drop_labels_or_levels
```python
from generic import _drop_labels_or_levels
```

Drop labels and/or levels for the given `axis`.

For each key in `keys`:
  - (axis=0): If key matches a column label then drop the column.
    Otherwise if key matches an index level then drop the level.
  - (axis=1): If key matches an index label then drop the row.
    Otherwise if key matches a column level then drop the level.

Parameters
----------
keys : str or list of str
    labels or levels to drop
axis : int, default 0
    Axis that levels are associated with (0 for index, 1 for columns)

Returns
-------
dropped: DataFrame

Raises
------
ValueError
    if any `keys` match neither a label nor a level

---
## __iter__
```python
from generic import __iter__
```

Iterate over info axis.

Returns
-------
iterator
    Info axis as iterator.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
>>> for x in df:
...     print(x)
A
B

---
## keys
```python
from generic import keys
```

Get the 'info axis' (see Indexing for more).

This is index for Series, columns for DataFrame.

Returns
-------
Index
    Info axis.

Examples
--------
>>> d = pd.DataFrame(data={'A': [1, 2, 3], 'B': [0, 4, 8]},
...                  index=['a', 'b', 'c'])
>>> d
   A  B
a  1  0
b  2  4
c  3  8
>>> d.keys()
Index(['A', 'B'], dtype='object')

---
## items
```python
from generic import items
```

Iterate over (label, values) on info axis

This is index for Series and columns for DataFrame.

Returns
-------
Generator

---
## __len__
```python
from generic import __len__
```

Returns length of info axis

---
## __contains__
```python
from generic import __contains__
```

True if the key is in the info axis

---
## empty
```python
from generic import empty
```

Indicator whether Series/DataFrame is empty.

True if Series/DataFrame is entirely empty (no items), meaning any of the
axes are of length 0.

Returns
-------
bool
    If Series/DataFrame is empty, return True, if not return False.

See Also
--------
Series.dropna : Return series without null values.
DataFrame.dropna : Return DataFrame with labels on given axis omitted
    where (all or any) data are missing.

Notes
-----
If Series/DataFrame contains only NaNs, it is still not considered empty. See
the example below.

Examples
--------
An example of an actual empty DataFrame. Notice the index is empty:

>>> df_empty = pd.DataFrame({'A' : []})
>>> df_empty
Empty DataFrame
Columns: [A]
Index: []
>>> df_empty.empty
True

If we only have NaNs in our DataFrame, it is not considered empty! We
will need to drop the NaNs to make the DataFrame empty:

>>> df = pd.DataFrame({'A' : [np.nan]})
>>> df
    A
0 NaN
>>> df.empty
False
>>> df.dropna().empty
True

>>> ser_empty = pd.Series({'A' : []})
>>> ser_empty
A    []
dtype: object
>>> ser_empty.empty
False
>>> ser_empty = pd.Series()
>>> ser_empty.empty
True

---
## __array__
```python
from generic import __array__
```



---
## __array_ufunc__
```python
from generic import __array_ufunc__
```



---
## __getstate__
```python
from generic import __getstate__
```



---
## __setstate__
```python
from generic import __setstate__
```



---
## __repr__
```python
from generic import __repr__
```



---
## _repr_latex_
```python
from generic import _repr_latex_
```

Returns a LaTeX representation for a particular object.
Mainly for use with nbconvert (jupyter notebook conversion to pdf).

---
## _repr_data_resource_
```python
from generic import _repr_data_resource_
```

Not a real Jupyter special repr method, but we use the same
naming convention.

---
## to_excel
```python
from generic import to_excel
```

Write {klass} to an Excel sheet.

To write a single {klass} to an Excel .xlsx file it is only necessary to
specify a target file name. To write to multiple sheets it is necessary to
create an `ExcelWriter` object with a target file name, and specify a sheet
in the file to write to.

Multiple sheets may be written to by specifying unique `sheet_name`.
With all data written to the file it is necessary to save the changes.
Note that creating an `ExcelWriter` object with a file name that already
exists will result in the contents of the existing file being erased.

Parameters
----------
excel_writer : path-like, file-like, or ExcelWriter object
    File path or existing ExcelWriter.
sheet_name : str, default 'Sheet1'
    Name of sheet which will contain DataFrame.
na_rep : str, default ''
    Missing data representation.
float_format : str, optional
    Format string for floating point numbers. For example
    ``float_format="%.2f"`` will format 0.1234 to 0.12.
columns : sequence or list of str, optional
    Columns to write.
header : bool or list of str, default True
    Write out the column names. If a list of string is given it is
    assumed to be aliases for the column names.
index : bool, default True
    Write row names (index).
index_label : str or sequence, optional
    Column label for index column(s) if desired. If not specified, and
    `header` and `index` are True, then the index names are used. A
    sequence should be given if the DataFrame uses MultiIndex.
startrow : int, default 0
    Upper left cell row to dump data frame.
startcol : int, default 0
    Upper left cell column to dump data frame.
engine : str, optional
    Write engine to use, 'openpyxl' or 'xlsxwriter'. You can also set this
    via the options ``io.excel.xlsx.writer`` or
    ``io.excel.xlsm.writer``.

merge_cells : bool, default True
    Write MultiIndex and Hierarchical Rows as merged cells.
inf_rep : str, default 'inf'
    Representation for infinity (there is no native representation for
    infinity in Excel).
freeze_panes : tuple of int (length 2), optional
    Specifies the one-based bottommost row and rightmost column that
    is to be frozen.
{storage_options}

    .. versionadded:: {storage_options_versionadded}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

See Also
--------
to_csv : Write DataFrame to a comma-separated values (csv) file.
ExcelWriter : Class for writing DataFrame objects into excel sheets.
read_excel : Read an Excel file into a pandas DataFrame.
read_csv : Read a comma-separated values (csv) file into DataFrame.
io.formats.style.Styler.to_excel : Add styles to Excel sheet.

Notes
-----
For compatibility with :meth:`~DataFrame.to_csv`,
to_excel serializes lists and dicts to strings before writing.

Once a workbook has been saved it is not possible to write further
data without rewriting the whole workbook.

Examples
--------

Create, write to and save a workbook:

>>> df1 = pd.DataFrame([['a', 'b'], ['c', 'd']],
...                    index=['row 1', 'row 2'],
...                    columns=['col 1', 'col 2'])
>>> df1.to_excel("output.xlsx")  # doctest: +SKIP

To specify the sheet name:

>>> df1.to_excel("output.xlsx",
...              sheet_name='Sheet_name_1')  # doctest: +SKIP

If you wish to write to more than one sheet in the workbook, it is
necessary to specify an ExcelWriter object:

>>> df2 = df1.copy()
>>> with pd.ExcelWriter('output.xlsx') as writer:  # doctest: +SKIP
...     df1.to_excel(writer, sheet_name='Sheet_name_1')
...     df2.to_excel(writer, sheet_name='Sheet_name_2')

ExcelWriter can also be used to append to an existing Excel file:

>>> with pd.ExcelWriter('output.xlsx',
...                     mode='a') as writer:  # doctest: +SKIP
...     df1.to_excel(writer, sheet_name='Sheet_name_3')

To set the library that is used to write the Excel file,
you can pass the `engine` keyword (the default engine is
automatically chosen depending on the file extension):

>>> df1.to_excel('output1.xlsx', engine='xlsxwriter')  # doctest: +SKIP

---
## to_json
```python
from generic import to_json
```

Convert the object to a JSON string.

Note NaN's and None will be converted to null and datetime objects
will be converted to UNIX timestamps.

Parameters
----------
path_or_buf : str, path object, file-like object, or None, default None
    String, path object (implementing os.PathLike[str]), or file-like
    object implementing a write() function. If None, the result is
    returned as a string.
orient : str
    Indication of expected JSON string format.

    * Series:

        - default is 'index'
        - allowed values are: {{'split', 'records', 'index', 'table'}}.

    * DataFrame:

        - default is 'columns'
        - allowed values are: {{'split', 'records', 'index', 'columns',
          'values', 'table'}}.

    * The format of the JSON string:

        - 'split' : dict like {{'index' -> [index], 'columns' -> [columns],
          'data' -> [values]}}
        - 'records' : list like [{{column -> value}}, ... , {{column -> value}}]
        - 'index' : dict like {{index -> {{column -> value}}}}
        - 'columns' : dict like {{column -> {{index -> value}}}}
        - 'values' : just the values array
        - 'table' : dict like {{'schema': {{schema}}, 'data': {{data}}}}

        Describing the data, where data component is like ``orient='records'``.

date_format : {{None, 'epoch', 'iso'}}
    Type of date conversion. 'epoch' = epoch milliseconds,
    'iso' = ISO8601. The default depends on the `orient`. For
    ``orient='table'``, the default is 'iso'. For all other orients,
    the default is 'epoch'.
double_precision : int, default 10
    The number of decimal places to use when encoding
    floating point values. The possible maximal value is 15.
    Passing double_precision greater than 15 will raise a ValueError.
force_ascii : bool, default True
    Force encoded string to be ASCII.
date_unit : str, default 'ms' (milliseconds)
    The time unit to encode to, governs timestamp and ISO8601
    precision.  One of 's', 'ms', 'us', 'ns' for second, millisecond,
    microsecond, and nanosecond respectively.
default_handler : callable, default None
    Handler to call if object cannot otherwise be converted to a
    suitable format for JSON. Should receive a single argument which is
    the object to convert and return a serialisable object.
lines : bool, default False
    If 'orient' is 'records' write out line-delimited json format. Will
    throw ValueError if incorrect 'orient' since others are not
    list-like.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

index : bool or None, default None
    The index is only used when 'orient' is 'split', 'index', 'column',
    or 'table'. Of these, 'index' and 'column' do not support
    `index=False`.

indent : int, optional
   Length of whitespace used to indent each record.

{storage_options}

mode : str, default 'w' (writing)
    Specify the IO mode for output when supplying a path_or_buf.
    Accepted args are 'w' (writing) and 'a' (append) only.
    mode='a' is only supported when lines is True and orient is 'records'.

Returns
-------
None or str
    If path_or_buf is None, returns the resulting json format as a
    string. Otherwise returns None.

See Also
--------
read_json : Convert a JSON string to pandas object.

Notes
-----
The behavior of ``indent=0`` varies from the stdlib, which does not
indent the output but does insert newlines. Currently, ``indent=0``
and the default ``indent=None`` are equivalent in pandas, though this
may change in a future release.

``orient='table'`` contains a 'pandas_version' field under 'schema'.
This stores the version of `pandas` used in the latest revision of the
schema.

Examples
--------
>>> from json import loads, dumps
>>> df = pd.DataFrame(
...     [["a", "b"], ["c", "d"]],
...     index=["row 1", "row 2"],
...     columns=["col 1", "col 2"],
... )

>>> result = df.to_json(orient="split")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
{{
    "columns": [
        "col 1",
        "col 2"
    ],
    "index": [
        "row 1",
        "row 2"
    ],
    "data": [
        [
            "a",
            "b"
        ],
        [
            "c",
            "d"
        ]
    ]
}}

Encoding/decoding a Dataframe using ``'records'`` formatted JSON.
Note that index labels are not preserved with this encoding.

>>> result = df.to_json(orient="records")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
[
    {{
        "col 1": "a",
        "col 2": "b"
    }},
    {{
        "col 1": "c",
        "col 2": "d"
    }}
]

Encoding/decoding a Dataframe using ``'index'`` formatted JSON:

>>> result = df.to_json(orient="index")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
{{
    "row 1": {{
        "col 1": "a",
        "col 2": "b"
    }},
    "row 2": {{
        "col 1": "c",
        "col 2": "d"
    }}
}}

Encoding/decoding a Dataframe using ``'columns'`` formatted JSON:

>>> result = df.to_json(orient="columns")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
{{
    "col 1": {{
        "row 1": "a",
        "row 2": "c"
    }},
    "col 2": {{
        "row 1": "b",
        "row 2": "d"
    }}
}}

Encoding/decoding a Dataframe using ``'values'`` formatted JSON:

>>> result = df.to_json(orient="values")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
[
    [
        "a",
        "b"
    ],
    [
        "c",
        "d"
    ]
]

Encoding with Table Schema:

>>> result = df.to_json(orient="table")
>>> parsed = loads(result)
>>> dumps(parsed, indent=4)  # doctest: +SKIP
{{
    "schema": {{
        "fields": [
            {{
                "name": "index",
                "type": "string"
            }},
            {{
                "name": "col 1",
                "type": "string"
            }},
            {{
                "name": "col 2",
                "type": "string"
            }}
        ],
        "primaryKey": [
            "index"
        ],
        "pandas_version": "1.4.0"
    }},
    "data": [
        {{
            "index": "row 1",
            "col 1": "a",
            "col 2": "b"
        }},
        {{
            "index": "row 2",
            "col 1": "c",
            "col 2": "d"
        }}
    ]
}}

---
## to_hdf
```python
from generic import to_hdf
```

Write the contained data to an HDF5 file using HDFStore.

Hierarchical Data Format (HDF) is self-describing, allowing an
application to interpret the structure and contents of a file with
no outside information. One HDF file can hold a mix of related objects
which can be accessed as a group or as individual objects.

In order to add another DataFrame or Series to an existing HDF file
please use append mode and a different a key.

.. warning::

   One can store a subclass of ``DataFrame`` or ``Series`` to HDF5,
   but the type of the subclass is lost upon storing.

For more information see the :ref:`user guide <io.hdf5>`.

Parameters
----------
path_or_buf : str or pandas.HDFStore
    File path or HDFStore object.
key : str
    Identifier for the group in the store.
mode : {'a', 'w', 'r+'}, default 'a'
    Mode to open file:

    - 'w': write, a new file is created (an existing file with
      the same name would be deleted).
    - 'a': append, an existing file is opened for reading and
      writing, and if the file does not exist it is created.
    - 'r+': similar to 'a', but the file must already exist.
complevel : {0-9}, default None
    Specifies a compression level for data.
    A value of 0 or None disables compression.
complib : {'zlib', 'lzo', 'bzip2', 'blosc'}, default 'zlib'
    Specifies the compression library to be used.
    These additional compressors for Blosc are supported
    (default if no compressor specified: 'blosc:blosclz'):
    {'blosc:blosclz', 'blosc:lz4', 'blosc:lz4hc', 'blosc:snappy',
    'blosc:zlib', 'blosc:zstd'}.
    Specifying a compression library which is not available issues
    a ValueError.
append : bool, default False
    For Table formats, append the input data to the existing.
format : {'fixed', 'table', None}, default 'fixed'
    Possible values:

    - 'fixed': Fixed format. Fast writing/reading. Not-appendable,
      nor searchable.
    - 'table': Table format. Write as a PyTables Table structure
      which may perform worse but allow more flexible operations
      like searching / selecting subsets of the data.
    - If None, pd.get_option('io.hdf.default_format') is checked,
      followed by fallback to "fixed".
index : bool, default True
    Write DataFrame index as a column.
min_itemsize : dict or int, optional
    Map column names to minimum string sizes for columns.
nan_rep : Any, optional
    How to represent null values as str.
    Not allowed with append=True.
dropna : bool, default False, optional
    Remove missing values.
data_columns : list of columns or True, optional
    List of columns to create as indexed data columns for on-disk
    queries, or True to use all columns. By default only the axes
    of the object are indexed. See
    :ref:`Query via data columns<io.hdf5-query-data-columns>`. for
    more information.
    Applicable only to format='table'.
errors : str, default 'strict'
    Specifies how encoding and decoding errors are to be handled.
    See the errors argument for :func:`open` for a full list
    of options.
encoding : str, default "UTF-8"

See Also
--------
read_hdf : Read from HDF file.
DataFrame.to_orc : Write a DataFrame to the binary orc format.
DataFrame.to_parquet : Write a DataFrame to the binary parquet format.
DataFrame.to_sql : Write to a SQL table.
DataFrame.to_feather : Write out feather-format for DataFrames.
DataFrame.to_csv : Write out to a csv file.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]},
...                   index=['a', 'b', 'c'])  # doctest: +SKIP
>>> df.to_hdf('data.h5', key='df', mode='w')  # doctest: +SKIP

We can add another object to the same file:

>>> s = pd.Series([1, 2, 3, 4])  # doctest: +SKIP
>>> s.to_hdf('data.h5', key='s')  # doctest: +SKIP

Reading from HDF file:

>>> pd.read_hdf('data.h5', 'df')  # doctest: +SKIP
A  B
a  1  4
b  2  5
c  3  6
>>> pd.read_hdf('data.h5', 's')  # doctest: +SKIP
0    1
1    2
2    3
3    4
dtype: int64

---
## to_sql
```python
from generic import to_sql
```

Write records stored in a DataFrame to a SQL database.

Databases supported by SQLAlchemy [1]_ are supported. Tables can be
newly created, appended to, or overwritten.

Parameters
----------
name : str
    Name of SQL table.
con : sqlalchemy.engine.(Engine or Connection) or sqlite3.Connection
    Using SQLAlchemy makes it possible to use any DB supported by that
    library. Legacy support is provided for sqlite3.Connection objects. The user
    is responsible for engine disposal and connection closure for the SQLAlchemy
    connectable. See `here                 <https://docs.sqlalchemy.org/en/20/core/connections.html>`_.
    If passing a sqlalchemy.engine.Connection which is already in a transaction,
    the transaction will not be committed.  If passing a sqlite3.Connection,
    it will not be possible to roll back the record insertion.

schema : str, optional
    Specify the schema (if database flavor supports this). If None, use
    default schema.
if_exists : {'fail', 'replace', 'append'}, default 'fail'
    How to behave if the table already exists.

    * fail: Raise a ValueError.
    * replace: Drop the table before inserting new values.
    * append: Insert new values to the existing table.

index : bool, default True
    Write DataFrame index as a column. Uses `index_label` as the column
    name in the table. Creates a table index for this column.
index_label : str or sequence, default None
    Column label for index column(s). If None is given (default) and
    `index` is True, then the index names are used.
    A sequence should be given if the DataFrame uses MultiIndex.
chunksize : int, optional
    Specify the number of rows in each batch to be written at a time.
    By default, all rows will be written at once.
dtype : dict or scalar, optional
    Specifying the datatype for columns. If a dictionary is used, the
    keys should be the column names and the values should be the
    SQLAlchemy types or strings for the sqlite3 legacy mode. If a
    scalar is provided, it will be applied to all columns.
method : {None, 'multi', callable}, optional
    Controls the SQL insertion clause used:

    * None : Uses standard SQL ``INSERT`` clause (one per row).
    * 'multi': Pass multiple values in a single ``INSERT`` clause.
    * callable with signature ``(pd_table, conn, keys, data_iter)``.

    Details and a sample callable implementation can be found in the
    section :ref:`insert method <io.sql.method>`.

Returns
-------
None or int
    Number of rows affected by to_sql. None is returned if the callable
    passed into ``method`` does not return an integer number of rows.

    The number of returned rows affected is the sum of the ``rowcount``
    attribute of ``sqlite3.Cursor`` or SQLAlchemy connectable which may not
    reflect the exact number of written rows as stipulated in the
    `sqlite3 <https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.rowcount>`__ or
    `SQLAlchemy <https://docs.sqlalchemy.org/en/20/core/connections.html#sqlalchemy.engine.CursorResult.rowcount>`__.

    .. versionadded:: 1.4.0

Raises
------
ValueError
    When the table already exists and `if_exists` is 'fail' (the
    default).

See Also
--------
read_sql : Read a DataFrame from a table.

Notes
-----
Timezone aware datetime columns will be written as
``Timestamp with timezone`` type with SQLAlchemy if supported by the
database. Otherwise, the datetimes will be stored as timezone unaware
timestamps local to the original timezone.

Not all datastores support ``method="multi"``. Oracle, for example,
does not support multi-value insert.

References
----------
.. [1] https://docs.sqlalchemy.org
.. [2] https://www.python.org/dev/peps/pep-0249/

Examples
--------
Create an in-memory SQLite database.

>>> from sqlalchemy import create_engine
>>> engine = create_engine('sqlite://', echo=False)

Create a table from scratch with 3 rows.

>>> df = pd.DataFrame({'name' : ['User 1', 'User 2', 'User 3']})
>>> df
     name
0  User 1
1  User 2
2  User 3

>>> df.to_sql(name='users', con=engine)
3
>>> from sqlalchemy import text
>>> with engine.connect() as conn:
...    conn.execute(text("SELECT * FROM users")).fetchall()
[(0, 'User 1'), (1, 'User 2'), (2, 'User 3')]

An `sqlalchemy.engine.Connection` can also be passed to `con`:

>>> with engine.begin() as connection:
...     df1 = pd.DataFrame({'name' : ['User 4', 'User 5']})
...     df1.to_sql(name='users', con=connection, if_exists='append')
2

This is allowed to support operations that require that the same
DBAPI connection is used for the entire operation.

>>> df2 = pd.DataFrame({'name' : ['User 6', 'User 7']})
>>> df2.to_sql(name='users', con=engine, if_exists='append')
2
>>> with engine.connect() as conn:
...    conn.execute(text("SELECT * FROM users")).fetchall()
[(0, 'User 1'), (1, 'User 2'), (2, 'User 3'),
 (0, 'User 4'), (1, 'User 5'), (0, 'User 6'),
 (1, 'User 7')]

Overwrite the table with just ``df2``.

>>> df2.to_sql(name='users', con=engine, if_exists='replace',
...            index_label='id')
2
>>> with engine.connect() as conn:
...    conn.execute(text("SELECT * FROM users")).fetchall()
[(0, 'User 6'), (1, 'User 7')]

Use ``method`` to define a callable insertion method to do nothing
if there's a primary key conflict on a table in a PostgreSQL database.

>>> from sqlalchemy.dialects.postgresql import insert
>>> def insert_on_conflict_nothing(table, conn, keys, data_iter):
...     # "a" is the primary key in "conflict_table"
...     data = [dict(zip(keys, row)) for row in data_iter]
...     stmt = insert(table.table).values(data).on_conflict_do_nothing(index_elements=["a"])
...     result = conn.execute(stmt)
...     return result.rowcount
>>> df_conflict.to_sql(name="conflict_table", con=conn, if_exists="append", method=insert_on_conflict_nothing)  # doctest: +SKIP
0

For MySQL, a callable to update columns ``b`` and ``c`` if there's a conflict
on a primary key.

>>> from sqlalchemy.dialects.mysql import insert
>>> def insert_on_conflict_update(table, conn, keys, data_iter):
...     # update columns "b" and "c" on primary key conflict
...     data = [dict(zip(keys, row)) for row in data_iter]
...     stmt = (
...         insert(table.table)
...         .values(data)
...     )
...     stmt = stmt.on_duplicate_key_update(b=stmt.inserted.b, c=stmt.inserted.c)
...     result = conn.execute(stmt)
...     return result.rowcount
>>> df_conflict.to_sql(name="conflict_table", con=conn, if_exists="append", method=insert_on_conflict_update)  # doctest: +SKIP
2

Specify the dtype (especially useful for integers with missing values).
Notice that while pandas is forced to store the data as floating point,
the database supports nullable integers. When fetching the data with
Python, we get back integer scalars.

>>> df = pd.DataFrame({"A": [1, None, 2]})
>>> df
     A
0  1.0
1  NaN
2  2.0

>>> from sqlalchemy.types import Integer
>>> df.to_sql(name='integers', con=engine, index=False,
...           dtype={"A": Integer()})
3

>>> with engine.connect() as conn:
...   conn.execute(text("SELECT * FROM integers")).fetchall()
[(1,), (None,), (2,)]

---
## to_pickle
```python
from generic import to_pickle
```

Pickle (serialize) object to file.

Parameters
----------
path : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function. File path where
    the pickled object will be stored.
{compression_options}
protocol : int
    Int which indicates which protocol should be used by the pickler,
    default HIGHEST_PROTOCOL (see [1]_ paragraph 12.1.2). The possible
    values are 0, 1, 2, 3, 4, 5. A negative value for the protocol
    parameter is equivalent to setting its value to HIGHEST_PROTOCOL.

    .. [1] https://docs.python.org/3/library/pickle.html.

{storage_options}

See Also
--------
read_pickle : Load pickled pandas object (or any object) from file.
DataFrame.to_hdf : Write DataFrame to an HDF5 file.
DataFrame.to_sql : Write DataFrame to a SQL database.
DataFrame.to_parquet : Write a DataFrame to the binary parquet format.

Examples
--------
>>> original_df = pd.DataFrame({{"foo": range(5), "bar": range(5, 10)}})  # doctest: +SKIP
>>> original_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> original_df.to_pickle("./dummy.pkl")  # doctest: +SKIP

>>> unpickled_df = pd.read_pickle("./dummy.pkl")  # doctest: +SKIP
>>> unpickled_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9

---
## to_clipboard
```python
from generic import to_clipboard
```

Copy object to the system clipboard.

Write a text representation of object to the system clipboard.
This can be pasted into Excel, for example.

Parameters
----------
excel : bool, default True
    Produce output in a csv format for easy pasting into excel.

    - True, use the provided separator for csv pasting.
    - False, write a string representation of the object to the clipboard.

sep : str, default ``'\t'``
    Field delimiter.
**kwargs
    These parameters will be passed to DataFrame.to_csv.

See Also
--------
DataFrame.to_csv : Write a DataFrame to a comma-separated values
    (csv) file.
read_clipboard : Read text from clipboard and pass to read_csv.

Notes
-----
Requirements for your platform.

  - Linux : `xclip`, or `xsel` (with `PyQt4` modules)
  - Windows : none
  - macOS : none

This method uses the processes developed for the package `pyperclip`. A
solution to render any output string format is given in the examples.

Examples
--------
Copy the contents of a DataFrame to the clipboard.

>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C'])

>>> df.to_clipboard(sep=',')  # doctest: +SKIP
... # Wrote the following to the system clipboard:
... # ,A,B,C
... # 0,1,2,3
... # 1,4,5,6

We can omit the index by passing the keyword `index` and setting
it to false.

>>> df.to_clipboard(sep=',', index=False)  # doctest: +SKIP
... # Wrote the following to the system clipboard:
... # A,B,C
... # 1,2,3
... # 4,5,6

Using the original `pyperclip` package for any string output format.

.. code-block:: python

   import pyperclip
   html = df.style.to_html()
   pyperclip.copy(html)

---
## to_xarray
```python
from generic import to_xarray
```

Return an xarray object from the pandas object.

Returns
-------
xarray.DataArray or xarray.Dataset
    Data in the pandas structure converted to Dataset if the object is
    a DataFrame, or a DataArray if the object is a Series.

See Also
--------
DataFrame.to_hdf : Write DataFrame to an HDF5 file.
DataFrame.to_parquet : Write a DataFrame to the binary parquet format.

Notes
-----
See the `xarray docs <https://xarray.pydata.org/en/stable/>`__

Examples
--------
>>> df = pd.DataFrame([('falcon', 'bird', 389.0, 2),
...                    ('parrot', 'bird', 24.0, 2),
...                    ('lion', 'mammal', 80.5, 4),
...                    ('monkey', 'mammal', np.nan, 4)],
...                   columns=['name', 'class', 'max_speed',
...                            'num_legs'])
>>> df
     name   class  max_speed  num_legs
0  falcon    bird      389.0         2
1  parrot    bird       24.0         2
2    lion  mammal       80.5         4
3  monkey  mammal        NaN         4

>>> df.to_xarray()  # doctest: +SKIP
<xarray.Dataset>
Dimensions:    (index: 4)
Coordinates:
  * index      (index) int64 32B 0 1 2 3
Data variables:
    name       (index) object 32B 'falcon' 'parrot' 'lion' 'monkey'
    class      (index) object 32B 'bird' 'bird' 'mammal' 'mammal'
    max_speed  (index) float64 32B 389.0 24.0 80.5 nan
    num_legs   (index) int64 32B 2 2 4 4

>>> df['max_speed'].to_xarray()  # doctest: +SKIP
<xarray.DataArray 'max_speed' (index: 4)>
array([389. ,  24. ,  80.5,   nan])
Coordinates:
  * index    (index) int64 0 1 2 3

>>> dates = pd.to_datetime(['2018-01-01', '2018-01-01',
...                         '2018-01-02', '2018-01-02'])
>>> df_multiindex = pd.DataFrame({'date': dates,
...                               'animal': ['falcon', 'parrot',
...                                          'falcon', 'parrot'],
...                               'speed': [350, 18, 361, 15]})
>>> df_multiindex = df_multiindex.set_index(['date', 'animal'])

>>> df_multiindex
                   speed
date       animal
2018-01-01 falcon    350
           parrot     18
2018-01-02 falcon    361
           parrot     15

>>> df_multiindex.to_xarray()  # doctest: +SKIP
<xarray.Dataset>
Dimensions:  (date: 2, animal: 2)
Coordinates:
  * date     (date) datetime64[ns] 2018-01-01 2018-01-02
  * animal   (animal) object 'falcon' 'parrot'
Data variables:
    speed    (date, animal) int64 350 18 361 15

---
## to_latex
```python
from generic import to_latex
```

Render object to a LaTeX tabular, longtable, or nested table.

Requires ``\usepackage{{booktabs}}``.  The output can be copy/pasted
into a main LaTeX document or read from an external file
with ``\input{{table.tex}}``.

.. versionchanged:: 2.0.0
   Refactored to use the Styler implementation via jinja2 templating.

Parameters
----------
buf : str, Path or StringIO-like, optional, default None
    Buffer to write to. If None, the output is returned as a string.
columns : list of label, optional
    The subset of columns to write. Writes all columns by default.
header : bool or list of str, default True
    Write out the column names. If a list of strings is given,
    it is assumed to be aliases for the column names.
index : bool, default True
    Write row names (index).
na_rep : str, default 'NaN'
    Missing data representation.
formatters : list of functions or dict of {{str: function}}, optional
    Formatter functions to apply to columns' elements by position or
    name. The result of each function must be a unicode string.
    List must be of length equal to the number of columns.
float_format : one-parameter function or str, optional, default None
    Formatter for floating point numbers. For example
    ``float_format="%.2f"`` and ``float_format="{{:0.2f}}".format`` will
    both result in 0.1234 being formatted as 0.12.
sparsify : bool, optional
    Set to False for a DataFrame with a hierarchical index to print
    every multiindex key at each row. By default, the value will be
    read from the config module.
index_names : bool, default True
    Prints the names of the indexes.
bold_rows : bool, default False
    Make the row labels bold in the output.
column_format : str, optional
    The columns format as specified in `LaTeX table format
    <https://en.wikibooks.org/wiki/LaTeX/Tables>`__ e.g. 'rcl' for 3
    columns. By default, 'l' will be used for all columns except
    columns of numbers, which default to 'r'.
longtable : bool, optional
    Use a longtable environment instead of tabular. Requires
    adding a \usepackage{{longtable}} to your LaTeX preamble.
    By default, the value will be read from the pandas config
    module, and set to `True` if the option ``styler.latex.environment`` is
    `"longtable"`.

    .. versionchanged:: 2.0.0
       The pandas option affecting this argument has changed.
escape : bool, optional
    By default, the value will be read from the pandas config
    module and set to `True` if the option ``styler.format.escape`` is
    `"latex"`. When set to False prevents from escaping latex special
    characters in column names.

    .. versionchanged:: 2.0.0
       The pandas option affecting this argument has changed, as has the
       default value to `False`.
encoding : str, optional
    A string representing the encoding to use in the output file,
    defaults to 'utf-8'.
decimal : str, default '.'
    Character recognized as decimal separator, e.g. ',' in Europe.
multicolumn : bool, default True
    Use \multicolumn to enhance MultiIndex columns.
    The default will be read from the config module, and is set
    as the option ``styler.sparse.columns``.

    .. versionchanged:: 2.0.0
       The pandas option affecting this argument has changed.
multicolumn_format : str, default 'r'
    The alignment for multicolumns, similar to `column_format`
    The default will be read from the config module, and is set as the option
    ``styler.latex.multicol_align``.

    .. versionchanged:: 2.0.0
       The pandas option affecting this argument has changed, as has the
       default value to "r".
multirow : bool, default True
    Use \multirow to enhance MultiIndex rows. Requires adding a
    \usepackage{{multirow}} to your LaTeX preamble. Will print
    centered labels (instead of top-aligned) across the contained
    rows, separating groups via clines. The default will be read
    from the pandas config module, and is set as the option
    ``styler.sparse.index``.

    .. versionchanged:: 2.0.0
       The pandas option affecting this argument has changed, as has the
       default value to `True`.
caption : str or tuple, optional
    Tuple (full_caption, short_caption),
    which results in ``\caption[short_caption]{{full_caption}}``;
    if a single string is passed, no short caption will be set.
label : str, optional
    The LaTeX label to be placed inside ``\label{{}}`` in the output.
    This is used with ``\ref{{}}`` in the main ``.tex`` file.

position : str, optional
    The LaTeX positional argument for tables, to be placed after
    ``\begin{{}}`` in the output.

Returns
-------
str or None
    If buf is None, returns the result as a string. Otherwise returns None.

See Also
--------
io.formats.style.Styler.to_latex : Render a DataFrame to LaTeX
    with conditional formatting.
DataFrame.to_string : Render a DataFrame to a console-friendly
    tabular output.
DataFrame.to_html : Render a DataFrame as an HTML table.

Notes
-----
As of v2.0.0 this method has changed to use the Styler implementation as
part of :meth:`.Styler.to_latex` via ``jinja2`` templating. This means
that ``jinja2`` is a requirement, and needs to be installed, for this method
to function. It is advised that users switch to using Styler, since that
implementation is more frequently updated and contains much more
flexibility with the output.

Examples
--------
Convert a general DataFrame to LaTeX with formatting:

>>> df = pd.DataFrame(dict(name=['Raphael', 'Donatello'],
...                        age=[26, 45],
...                        height=[181.23, 177.65]))
>>> print(df.to_latex(index=False,
...                   formatters={"name": str.upper},
...                   float_format="{:.1f}".format,
... ))  # doctest: +SKIP
\begin{tabular}{lrr}
\toprule
name & age & height \\
\midrule
RAPHAEL & 26 & 181.2 \\
DONATELLO & 45 & 177.7 \\
\bottomrule
\end{tabular}

---
## _to_latex_via_styler
```python
from generic import _to_latex_via_styler
```

Render object to a LaTeX tabular, longtable, or nested table.

Uses the ``Styler`` implementation with the following, ordered, method chaining:

.. code-block:: python
   styler = Styler(DataFrame)
   styler.hide(**hide)
   styler.relabel_index(**relabel_index)
   styler.format(**format)
   styler.format_index(**format_index)
   styler.to_latex(buf=buf, **render_kwargs)

Parameters
----------
buf : str, Path or StringIO-like, optional, default None
    Buffer to write to. If None, the output is returned as a string.
hide : dict, list of dict
    Keyword args to pass to the method call of ``Styler.hide``. If a list will
    call the method numerous times.
relabel_index : dict, list of dict
    Keyword args to pass to the method of ``Styler.relabel_index``. If a list
    will call the method numerous times.
format : dict, list of dict
    Keyword args to pass to the method call of ``Styler.format``. If a list will
    call the method numerous times.
format_index : dict, list of dict
    Keyword args to pass to the method call of ``Styler.format_index``. If a
    list will call the method numerous times.
render_kwargs : dict
    Keyword args to pass to the method call of ``Styler.to_latex``.

Returns
-------
str or None
    If buf is None, returns the result as a string. Otherwise returns None.

---
## to_csv
```python
from generic import to_csv
```

Write object to a comma-separated values (csv) file.

Parameters
----------
path_or_buf : str, path object, file-like object, or None, default None
    String, path object (implementing os.PathLike[str]), or file-like
    object implementing a write() function. If None, the result is
    returned as a string. If a non-binary file object is passed, it should
    be opened with `newline=''`, disabling universal newlines. If a binary
    file object is passed, `mode` might need to contain a `'b'`.
sep : str, default ','
    String of length 1. Field delimiter for the output file.
na_rep : str, default ''
    Missing data representation.
float_format : str, Callable, default None
    Format string for floating point numbers. If a Callable is given, it takes
    precedence over other numeric formatting parameters, like decimal.
columns : sequence, optional
    Columns to write.
header : bool or list of str, default True
    Write out the column names. If a list of strings is given it is
    assumed to be aliases for the column names.
index : bool, default True
    Write row names (index).
index_label : str or sequence, or False, default None
    Column label for index column(s) if desired. If None is given, and
    `header` and `index` are True, then the index names are used. A
    sequence should be given if the object uses MultiIndex. If
    False do not print fields for index names. Use index_label=False
    for easier importing in R.
mode : {{'w', 'x', 'a'}}, default 'w'
    Forwarded to either `open(mode=)` or `fsspec.open(mode=)` to control
    the file opening. Typical values include:

    - 'w', truncate the file first.
    - 'x', exclusive creation, failing if the file already exists.
    - 'a', append to the end of file if it exists.

encoding : str, optional
    A string representing the encoding to use in the output file,
    defaults to 'utf-8'. `encoding` is not supported if `path_or_buf`
    is a non-binary file object.
{compression_options}

       May be a dict with key 'method' as compression mode
       and other entries as additional compression options if
       compression mode is 'zip'.

       Passing compression options as keys in dict is
       supported for compression modes 'gzip', 'bz2', 'zstd', and 'zip'.
quoting : optional constant from csv module
    Defaults to csv.QUOTE_MINIMAL. If you have set a `float_format`
    then floats are converted to strings and thus csv.QUOTE_NONNUMERIC
    will treat them as non-numeric.
quotechar : str, default '\"'
    String of length 1. Character used to quote fields.
lineterminator : str, optional
    The newline character or character sequence to use in the output
    file. Defaults to `os.linesep`, which depends on the OS in which
    this method is called ('\\n' for linux, '\\r\\n' for Windows, i.e.).

    .. versionchanged:: 1.5.0

        Previously was line_terminator, changed for consistency with
        read_csv and the standard library 'csv' module.

chunksize : int or None
    Rows to write at a time.
date_format : str, default None
    Format string for datetime objects.
doublequote : bool, default True
    Control quoting of `quotechar` inside a field.
escapechar : str, default None
    String of length 1. Character used to escape `sep` and `quotechar`
    when appropriate.
decimal : str, default '.'
    Character recognized as decimal separator. E.g. use ',' for
    European data.
errors : str, default 'strict'
    Specifies how encoding and decoding errors are to be handled.
    See the errors argument for :func:`open` for a full list
    of options.

{storage_options}

Returns
-------
None or str
    If path_or_buf is None, returns the resulting csv format as a
    string. Otherwise returns None.

See Also
--------
read_csv : Load a CSV file into a DataFrame.
to_excel : Write DataFrame to an Excel file.

Examples
--------
Create 'out.csv' containing 'df' without indices

>>> df = pd.DataFrame({{'name': ['Raphael', 'Donatello'],
...                    'mask': ['red', 'purple'],
...                    'weapon': ['sai', 'bo staff']}})
>>> df.to_csv('out.csv', index=False)  # doctest: +SKIP

Create 'out.zip' containing 'out.csv'

>>> df.to_csv(index=False)
'name,mask,weapon\nRaphael,red,sai\nDonatello,purple,bo staff\n'
>>> compression_opts = dict(method='zip',
...                         archive_name='out.csv')  # doctest: +SKIP
>>> df.to_csv('out.zip', index=False,
...           compression=compression_opts)  # doctest: +SKIP

To write a csv file to a new folder or nested folder you will first
need to create it using either Pathlib or os:

>>> from pathlib import Path  # doctest: +SKIP
>>> filepath = Path('folder/subfolder/out.csv')  # doctest: +SKIP
>>> filepath.parent.mkdir(parents=True, exist_ok=True)  # doctest: +SKIP
>>> df.to_csv(filepath)  # doctest: +SKIP

>>> import os  # doctest: +SKIP
>>> os.makedirs('folder/subfolder', exist_ok=True)  # doctest: +SKIP
>>> df.to_csv('folder/subfolder/out.csv')  # doctest: +SKIP

---
## _reset_cacher
```python
from generic import _reset_cacher
```

Reset the cacher.

---
## _maybe_update_cacher
```python
from generic import _maybe_update_cacher
```

See if we need to update our parent cacher if clear, then clear our
cache.

Parameters
----------
clear : bool, default False
    Clear the item cache.
verify_is_copy : bool, default True
    Provide is_copy checks.

---
## _clear_item_cache
```python
from generic import _clear_item_cache
```



---
## take
```python
from generic import take
```

Return the elements in the given *positional* indices in each group.

This means that we are not indexing according to actual values in
the index attribute of the object. We are indexing according to the
actual position of the element in the object.

If a requested index does not exist for some group, this method will raise.
To get similar behavior that ignores indices that don't exist, see
:meth:`.DataFrameGroupBy.nth`.

Parameters
----------
indices : array-like
    An array of ints indicating which positions to take.
axis : {0 or 'index', 1 or 'columns', None}, default 0
    The axis on which to select elements. ``0`` means that we are
    selecting rows, ``1`` means that we are selecting columns.

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

**kwargs
    For compatibility with :meth:`numpy.take`. Has no effect on the
    output.

Returns
-------
DataFrame
    An DataFrame containing the elements taken from each group.

See Also
--------
DataFrame.take : Take elements from a Series along an axis.
DataFrame.loc : Select a subset of a DataFrame by labels.
DataFrame.iloc : Select a subset of a DataFrame by positions.
numpy.take : Take elements from an array along an axis.

Examples
--------
>>> df = pd.DataFrame([('falcon', 'bird', 389.0),
...                    ('parrot', 'bird', 24.0),
...                    ('lion', 'mammal', 80.5),
...                    ('monkey', 'mammal', np.nan),
...                    ('rabbit', 'mammal', 15.0)],
...                   columns=['name', 'class', 'max_speed'],
...                   index=[4, 3, 2, 1, 0])
>>> df
     name   class  max_speed
4  falcon    bird      389.0
3  parrot    bird       24.0
2    lion  mammal       80.5
1  monkey  mammal        NaN
0  rabbit  mammal       15.0
>>> gb = df.groupby([1, 1, 2, 2, 2])

Take elements at positions 0 and 1 along the axis 0 (default).

Note how the indices selected in the result do not correspond to
our input indices 0 and 1. That's because we are selecting the 0th
and 1st rows, not rows whose indices equal 0 and 1.

>>> gb.take([0, 1])
       name   class  max_speed
1 4  falcon    bird      389.0
  3  parrot    bird       24.0
2 2    lion  mammal       80.5
  1  monkey  mammal        NaN

The order of the specified indices influences the order in the result.
Here, the order is swapped from the previous example.

>>> gb.take([1, 0])
       name   class  max_speed
1 3  parrot    bird       24.0
  4  falcon    bird      389.0
2 1  monkey  mammal        NaN
  2    lion  mammal       80.5

Take elements at indices 1 and 2 along the axis 1 (column selection).

We may take elements using negative integers for positive indices,
starting from the end of the object, just like with Python lists.

>>> gb.take([-1, -2])
       name   class  max_speed
1 3  parrot    bird       24.0
  4  falcon    bird      389.0
2 0  rabbit  mammal       15.0
  1  monkey  mammal        NaN

---
## _take_with_is_copy
```python
from generic import _take_with_is_copy
```

Internal version of the `take` method that sets the `_is_copy`
attribute to keep track of the parent dataframe (using in indexing
for the SettingWithCopyWarning).

For Series this does the same as the public take (it never sets `_is_copy`).

See the docstring of `take` for full explanation of the parameters.

---
## xs
```python
from generic import xs
```

Return cross-section from the Series/DataFrame.

This method takes a `key` argument to select data at a particular
level of a MultiIndex.

Parameters
----------
key : label or tuple of label
    Label contained in the index, or partially in a MultiIndex.
axis : {0 or 'index', 1 or 'columns'}, default 0
    Axis to retrieve cross-section on.
level : object, defaults to first n levels (n=1 or len(key))
    In case of a key partially contained in a MultiIndex, indicate
    which levels are used. Levels can be referred by label or position.
drop_level : bool, default True
    If False, returns object with same levels as self.

Returns
-------
Series or DataFrame
    Cross-section from the original Series or DataFrame
    corresponding to the selected index levels.

See Also
--------
DataFrame.loc : Access a group of rows and columns
    by label(s) or a boolean array.
DataFrame.iloc : Purely integer-location based indexing
    for selection by position.

Notes
-----
`xs` can not be used to set values.

MultiIndex Slicers is a generic way to get/set values on
any level or levels.
It is a superset of `xs` functionality, see
:ref:`MultiIndex Slicers <advanced.mi_slicers>`.

Examples
--------
>>> d = {'num_legs': [4, 4, 2, 2],
...      'num_wings': [0, 0, 2, 2],
...      'class': ['mammal', 'mammal', 'mammal', 'bird'],
...      'animal': ['cat', 'dog', 'bat', 'penguin'],
...      'locomotion': ['walks', 'walks', 'flies', 'walks']}
>>> df = pd.DataFrame(data=d)
>>> df = df.set_index(['class', 'animal', 'locomotion'])
>>> df
                           num_legs  num_wings
class  animal  locomotion
mammal cat     walks              4          0
       dog     walks              4          0
       bat     flies              2          2
bird   penguin walks              2          2

Get values at specified index

>>> df.xs('mammal')
                   num_legs  num_wings
animal locomotion
cat    walks              4          0
dog    walks              4          0
bat    flies              2          2

Get values at several indexes

>>> df.xs(('mammal', 'dog', 'walks'))
num_legs     4
num_wings    0
Name: (mammal, dog, walks), dtype: int64

Get values at specified index and level

>>> df.xs('cat', level=1)
                   num_legs  num_wings
class  locomotion
mammal walks              4          0

Get values at several indexes and levels

>>> df.xs(('bird', 'walks'),
...       level=[0, 'locomotion'])
         num_legs  num_wings
animal
penguin         2          2

Get values at specified column and axis

>>> df.xs('num_wings', axis=1)
class   animal   locomotion
mammal  cat      walks         0
        dog      walks         0
        bat      flies         2
bird    penguin  walks         2
Name: num_wings, dtype: int64

---
## __getitem__
```python
from generic import __getitem__
```



---
## _getitem_slice
```python
from generic import _getitem_slice
```

__getitem__ for the case where the key is a slice object.

---
## _slice
```python
from generic import _slice
```

Construct a slice of this container.

Slicing with this method is *always* positional.

---
## _set_is_copy
```python
from generic import _set_is_copy
```



---
## _check_is_chained_assignment_possible
```python
from generic import _check_is_chained_assignment_possible
```

Check if we are a view, have a cacher, and are of mixed type.
If so, then force a setitem_copy check.

Should be called just near setting a value

Will return a boolean if it we are a view and are cached, but a
single-dtype meaning that the cacher should be updated following
setting.

---
## _check_setitem_copy
```python
from generic import _check_setitem_copy
```

Parameters
----------
t : str, the type of setting error
force : bool, default False
   If True, then force showing an error.

validate if we are doing a setitem on a chained copy.

It is technically possible to figure out that we are setting on
a copy even WITH a multi-dtyped pandas object. In other words, some
blocks may be views while other are not. Currently _is_view will ALWAYS
return False for multi-blocks to avoid having to handle this case.

df = DataFrame(np.arange(0,9), columns=['count'])
df['group'] = 'b'

# This technically need not raise SettingWithCopy if both are view
# (which is not generally guaranteed but is usually True.  However,
# this is in general not a good practice and we recommend using .loc.
df.iloc[0:5]['group'] = 'a'

---
## __delitem__
```python
from generic import __delitem__
```

Delete item

---
## _check_inplace_and_allows_duplicate_labels
```python
from generic import _check_inplace_and_allows_duplicate_labels
```



---
## get
```python
from generic import get
```

Get item from object for given key (ex: DataFrame column).

Returns default value if not found.

Parameters
----------
key : object

Returns
-------
same type as items contained in object

Examples
--------
>>> df = pd.DataFrame(
...     [
...         [24.3, 75.7, "high"],
...         [31, 87.8, "high"],
...         [22, 71.6, "medium"],
...         [35, 95, "medium"],
...     ],
...     columns=["temp_celsius", "temp_fahrenheit", "windspeed"],
...     index=pd.date_range(start="2014-02-12", end="2014-02-15", freq="D"),
... )

>>> df
            temp_celsius  temp_fahrenheit windspeed
2014-02-12          24.3             75.7      high
2014-02-13          31.0             87.8      high
2014-02-14          22.0             71.6    medium
2014-02-15          35.0             95.0    medium

>>> df.get(["temp_celsius", "windspeed"])
            temp_celsius windspeed
2014-02-12          24.3      high
2014-02-13          31.0      high
2014-02-14          22.0    medium
2014-02-15          35.0    medium

>>> ser = df['windspeed']
>>> ser.get('2014-02-13')
'high'

If the key isn't found, the default value will be used.

>>> df.get(["temp_celsius", "temp_kelvin"], default="default_value")
'default_value'

>>> ser.get('2014-02-10', '[unknown]')
'[unknown]'

---
## _is_view
```python
from generic import _is_view
```

Return boolean indicating if self is view of another array

---
## reindex_like
```python
from generic import reindex_like
```

Return an object with matching indices as other object.

Conform the object to the same index on all axes. Optional
filling logic, placing NaN in locations having no value
in the previous index. A new object is produced unless the
new index is equivalent to the current one and copy=False.

Parameters
----------
other : Object of the same data type
    Its row and column indices are used to define the new indices
    of this object.
method : {None, 'backfill'/'bfill', 'pad'/'ffill', 'nearest'}
    Method to use for filling holes in reindexed DataFrame.
    Please note: this is only applicable to DataFrames/Series with a
    monotonically increasing/decreasing index.

    * None (default): don't fill gaps
    * pad / ffill: propagate last valid observation forward to next
      valid
    * backfill / bfill: use next valid observation to fill gap
    * nearest: use nearest valid observations to fill gap.

copy : bool, default True
    Return a new object, even if the passed indexes are the same.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
limit : int, default None
    Maximum number of consecutive labels to fill for inexact matches.
tolerance : optional
    Maximum distance between original and new labels for inexact
    matches. The values of the index at the matching locations must
    satisfy the equation ``abs(index[indexer] - target) <= tolerance``.

    Tolerance may be a scalar value, which applies the same tolerance
    to all values, or list-like, which applies variable tolerance per
    element. List-like includes list, tuple, array, Series, and must be
    the same size as the index and its dtype must exactly match the
    index's type.

Returns
-------
Series or DataFrame
    Same type as caller, but with changed indices on each axis.

See Also
--------
DataFrame.set_index : Set row labels.
DataFrame.reset_index : Remove row labels or move them to new columns.
DataFrame.reindex : Change to new indices or expand indices.

Notes
-----
Same as calling
``.reindex(index=other.index, columns=other.columns,...)``.

Examples
--------
>>> df1 = pd.DataFrame([[24.3, 75.7, 'high'],
...                     [31, 87.8, 'high'],
...                     [22, 71.6, 'medium'],
...                     [35, 95, 'medium']],
...                    columns=['temp_celsius', 'temp_fahrenheit',
...                             'windspeed'],
...                    index=pd.date_range(start='2014-02-12',
...                                        end='2014-02-15', freq='D'))

>>> df1
            temp_celsius  temp_fahrenheit windspeed
2014-02-12          24.3             75.7      high
2014-02-13          31.0             87.8      high
2014-02-14          22.0             71.6    medium
2014-02-15          35.0             95.0    medium

>>> df2 = pd.DataFrame([[28, 'low'],
...                     [30, 'low'],
...                     [35.1, 'medium']],
...                    columns=['temp_celsius', 'windspeed'],
...                    index=pd.DatetimeIndex(['2014-02-12', '2014-02-13',
...                                            '2014-02-15']))

>>> df2
            temp_celsius windspeed
2014-02-12          28.0       low
2014-02-13          30.0       low
2014-02-15          35.1    medium

>>> df2.reindex_like(df1)
            temp_celsius  temp_fahrenheit windspeed
2014-02-12          28.0              NaN       low
2014-02-13          30.0              NaN       low
2014-02-14           NaN              NaN       NaN
2014-02-15          35.1              NaN    medium

---
## drop
```python
from generic import drop
```



---
## _drop_axis
```python
from generic import _drop_axis
```

Drop labels from specified axis. Used in the ``drop`` method
internally.

Parameters
----------
labels : single label or list-like
axis : int or axis name
level : int or level name, default None
    For MultiIndex
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and existing labels are dropped.
only_slice : bool, default False
    Whether indexing along columns should be view-only.

---
## _update_inplace
```python
from generic import _update_inplace
```

Replace self internals with result.

Parameters
----------
result : same type as self
verify_is_copy : bool, default True
    Provide is_copy checks.

---
## add_prefix
```python
from generic import add_prefix
```

Prefix labels with string `prefix`.

For Series, the row labels are prefixed.
For DataFrame, the column labels are prefixed.

Parameters
----------
prefix : str
    The string to add before each label.
axis : {0 or 'index', 1 or 'columns', None}, default None
    Axis to add prefix on

    .. versionadded:: 2.0.0

Returns
-------
Series or DataFrame
    New Series or DataFrame with updated labels.

See Also
--------
Series.add_suffix: Suffix row labels with string `suffix`.
DataFrame.add_suffix: Suffix column labels with string `suffix`.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s
0    1
1    2
2    3
3    4
dtype: int64

>>> s.add_prefix('item_')
item_0    1
item_1    2
item_2    3
item_3    4
dtype: int64

>>> df = pd.DataFrame({'A': [1, 2, 3, 4], 'B': [3, 4, 5, 6]})
>>> df
   A  B
0  1  3
1  2  4
2  3  5
3  4  6

>>> df.add_prefix('col_')
     col_A  col_B
0       1       3
1       2       4
2       3       5
3       4       6

---
## add_suffix
```python
from generic import add_suffix
```

Suffix labels with string `suffix`.

For Series, the row labels are suffixed.
For DataFrame, the column labels are suffixed.

Parameters
----------
suffix : str
    The string to add after each label.
axis : {0 or 'index', 1 or 'columns', None}, default None
    Axis to add suffix on

    .. versionadded:: 2.0.0

Returns
-------
Series or DataFrame
    New Series or DataFrame with updated labels.

See Also
--------
Series.add_prefix: Prefix row labels with string `prefix`.
DataFrame.add_prefix: Prefix column labels with string `prefix`.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s
0    1
1    2
2    3
3    4
dtype: int64

>>> s.add_suffix('_item')
0_item    1
1_item    2
2_item    3
3_item    4
dtype: int64

>>> df = pd.DataFrame({'A': [1, 2, 3, 4], 'B': [3, 4, 5, 6]})
>>> df
   A  B
0  1  3
1  2  4
2  3  5
3  4  6

>>> df.add_suffix('_col')
     A_col  B_col
0       1       3
1       2       4
2       3       5
3       4       6

---
## sort_values
```python
from generic import sort_values
```

Sort by the values along either axis.

Parameters
----------%(optional_by)s
axis : %(axes_single_arg)s, default 0
     Axis to be sorted.
ascending : bool or list of bool, default True
     Sort ascending vs. descending. Specify list for multiple sort
     orders.  If this is a list of bools, must match the length of
     the by.
inplace : bool, default False
     If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
     Choice of sorting algorithm. See also :func:`numpy.sort` for more
     information. `mergesort` and `stable` are the only stable algorithms. For
     DataFrames, this option is only applied when sorting on a single
     column or label.
na_position : {'first', 'last'}, default 'last'
     Puts NaNs at the beginning if `first`; `last` puts NaNs at the
     end.
ignore_index : bool, default False
     If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    Apply the key function to the values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect a
    ``Series`` and return a Series with the same shape as the input.
    It will be applied to each column in `by` independently.

Returns
-------
DataFrame or None
    DataFrame with sorted values or None if ``inplace=True``.

See Also
--------
DataFrame.sort_index : Sort a DataFrame by the index.
Series.sort_values : Similar method for a Series.

Examples
--------
>>> df = pd.DataFrame({
...     'col1': ['A', 'A', 'B', np.nan, 'D', 'C'],
...     'col2': [2, 1, 9, 8, 7, 4],
...     'col3': [0, 1, 9, 4, 2, 3],
...     'col4': ['a', 'B', 'c', 'D', 'e', 'F']
... })
>>> df
  col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F

Sort by col1

>>> df.sort_values(by=['col1'])
  col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
5    C     4     3    F
4    D     7     2    e
3  NaN     8     4    D

Sort by multiple columns

>>> df.sort_values(by=['col1', 'col2'])
  col1  col2  col3 col4
1    A     1     1    B
0    A     2     0    a
2    B     9     9    c
5    C     4     3    F
4    D     7     2    e
3  NaN     8     4    D

Sort Descending

>>> df.sort_values(by='col1', ascending=False)
  col1  col2  col3 col4
4    D     7     2    e
5    C     4     3    F
2    B     9     9    c
0    A     2     0    a
1    A     1     1    B
3  NaN     8     4    D

Putting NAs first

>>> df.sort_values(by='col1', ascending=False, na_position='first')
  col1  col2  col3 col4
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F
2    B     9     9    c
0    A     2     0    a
1    A     1     1    B

Sorting with a key function

>>> df.sort_values(by='col4', key=lambda col: col.str.lower())
   col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F

Natural sort with the key argument,
using the `natsort <https://github.com/SethMMorton/natsort>` package.

>>> df = pd.DataFrame({
...    "time": ['0hr', '128hr', '72hr', '48hr', '96hr'],
...    "value": [10, 20, 30, 40, 50]
... })
>>> df
    time  value
0    0hr     10
1  128hr     20
2   72hr     30
3   48hr     40
4   96hr     50
>>> from natsort import index_natsorted
>>> df.sort_values(
...     by="time",
...     key=lambda x: np.argsort(index_natsorted(df["time"]))
... )
    time  value
0    0hr     10
3   48hr     40
2   72hr     30
4   96hr     50
1  128hr     20

---
## sort_index
```python
from generic import sort_index
```



---
## reindex
```python
from generic import reindex
```

Conform {klass} to new index with optional filling logic.

Places NA/NaN in locations having no value in the previous index. A new object
is produced unless the new index is equivalent to the current one and
``copy=False``.

Parameters
----------
{optional_reindex}
method : {{None, 'backfill'/'bfill', 'pad'/'ffill', 'nearest'}}
    Method to use for filling holes in reindexed DataFrame.
    Please note: this is only applicable to DataFrames/Series with a
    monotonically increasing/decreasing index.

    * None (default): don't fill gaps
    * pad / ffill: Propagate last valid observation forward to next
      valid.
    * backfill / bfill: Use next valid observation to fill gap.
    * nearest: Use nearest valid observations to fill gap.

copy : bool, default True
    Return a new object, even if the passed indexes are the same.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
level : int or name
    Broadcast across a level, matching Index values on the
    passed MultiIndex level.
fill_value : scalar, default np.nan
    Value to use for missing values. Defaults to NaN, but can be any
    "compatible" value.
limit : int, default None
    Maximum number of consecutive elements to forward or backward fill.
tolerance : optional
    Maximum distance between original and new labels for inexact
    matches. The values of the index at the matching locations most
    satisfy the equation ``abs(index[indexer] - target) <= tolerance``.

    Tolerance may be a scalar value, which applies the same tolerance
    to all values, or list-like, which applies variable tolerance per
    element. List-like includes list, tuple, array, Series, and must be
    the same size as the index and its dtype must exactly match the
    index's type.

Returns
-------
{klass} with changed index.

See Also
--------
DataFrame.set_index : Set row labels.
DataFrame.reset_index : Remove row labels or move them to new columns.
DataFrame.reindex_like : Change to same indices as other DataFrame.

Examples
--------
``DataFrame.reindex`` supports two calling conventions

* ``(index=index_labels, columns=column_labels, ...)``
* ``(labels, axis={{'index', 'columns'}}, ...)``

We *highly* recommend using keyword arguments to clarify your
intent.

Create a dataframe with some fictional data.

>>> index = ['Firefox', 'Chrome', 'Safari', 'IE10', 'Konqueror']
>>> df = pd.DataFrame({{'http_status': [200, 200, 404, 404, 301],
...                   'response_time': [0.04, 0.02, 0.07, 0.08, 1.0]}},
...                   index=index)
>>> df
           http_status  response_time
Firefox            200           0.04
Chrome             200           0.02
Safari             404           0.07
IE10               404           0.08
Konqueror          301           1.00

Create a new index and reindex the dataframe. By default
values in the new index that do not have corresponding
records in the dataframe are assigned ``NaN``.

>>> new_index = ['Safari', 'Iceweasel', 'Comodo Dragon', 'IE10',
...              'Chrome']
>>> df.reindex(new_index)
               http_status  response_time
Safari               404.0           0.07
Iceweasel              NaN            NaN
Comodo Dragon          NaN            NaN
IE10                 404.0           0.08
Chrome               200.0           0.02

We can fill in the missing values by passing a value to
the keyword ``fill_value``. Because the index is not monotonically
increasing or decreasing, we cannot use arguments to the keyword
``method`` to fill the ``NaN`` values.

>>> df.reindex(new_index, fill_value=0)
               http_status  response_time
Safari                 404           0.07
Iceweasel                0           0.00
Comodo Dragon            0           0.00
IE10                   404           0.08
Chrome                 200           0.02

>>> df.reindex(new_index, fill_value='missing')
              http_status response_time
Safari                404          0.07
Iceweasel         missing       missing
Comodo Dragon     missing       missing
IE10                  404          0.08
Chrome                200          0.02

We can also reindex the columns.

>>> df.reindex(columns=['http_status', 'user_agent'])
           http_status  user_agent
Firefox            200         NaN
Chrome             200         NaN
Safari             404         NaN
IE10               404         NaN
Konqueror          301         NaN

Or we can use "axis-style" keyword arguments

>>> df.reindex(['http_status', 'user_agent'], axis="columns")
           http_status  user_agent
Firefox            200         NaN
Chrome             200         NaN
Safari             404         NaN
IE10               404         NaN
Konqueror          301         NaN

To further illustrate the filling functionality in
``reindex``, we will create a dataframe with a
monotonically increasing index (for example, a sequence
of dates).

>>> date_index = pd.date_range('1/1/2010', periods=6, freq='D')
>>> df2 = pd.DataFrame({{"prices": [100, 101, np.nan, 100, 89, 88]}},
...                    index=date_index)
>>> df2
            prices
2010-01-01   100.0
2010-01-02   101.0
2010-01-03     NaN
2010-01-04   100.0
2010-01-05    89.0
2010-01-06    88.0

Suppose we decide to expand the dataframe to cover a wider
date range.

>>> date_index2 = pd.date_range('12/29/2009', periods=10, freq='D')
>>> df2.reindex(date_index2)
            prices
2009-12-29     NaN
2009-12-30     NaN
2009-12-31     NaN
2010-01-01   100.0
2010-01-02   101.0
2010-01-03     NaN
2010-01-04   100.0
2010-01-05    89.0
2010-01-06    88.0
2010-01-07     NaN

The index entries that did not have a value in the original data frame
(for example, '2009-12-29') are by default filled with ``NaN``.
If desired, we can fill in the missing values using one of several
options.

For example, to back-propagate the last valid value to fill the ``NaN``
values, pass ``bfill`` as an argument to the ``method`` keyword.

>>> df2.reindex(date_index2, method='bfill')
            prices
2009-12-29   100.0
2009-12-30   100.0
2009-12-31   100.0
2010-01-01   100.0
2010-01-02   101.0
2010-01-03     NaN
2010-01-04   100.0
2010-01-05    89.0
2010-01-06    88.0
2010-01-07     NaN

Please note that the ``NaN`` value present in the original dataframe
(at index value 2010-01-03) will not be filled by any of the
value propagation schemes. This is because filling while reindexing
does not look at dataframe values, but only compares the original and
desired indexes. If you do want to fill in the ``NaN`` values present
in the original dataframe, use the ``fillna()`` method.

See the :ref:`user guide <basics.reindexing>` for more.

---
## _reindex_axes
```python
from generic import _reindex_axes
```

Perform the reindex for all the axes.

---
## _needs_reindex_multi
```python
from generic import _needs_reindex_multi
```

Check if we do need a multi reindex.

---
## _reindex_multi
```python
from generic import _reindex_multi
```



---
## _reindex_with_indexers
```python
from generic import _reindex_with_indexers
```

allow_dups indicates an internal call here

---
## filter
```python
from generic import filter
```

Filter elements from groups that don't satisfy a criterion.

Elements from groups are filtered if they do not satisfy the
boolean criterion specified by func.

Parameters
----------
func : function
    Criterion to apply to each group. Should return True or False.
dropna : bool
    Drop groups that do not pass the filter. True by default; if False,
    groups that evaluate False are filled with NaNs.

Returns
-------
DataFrame

Notes
-----
Each subframe is endowed the attribute 'name' in case you need to know
which group you are working on.

Functions that mutate the passed object can produce unexpected
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
for more details.

Examples
--------
>>> df = pd.DataFrame({'A' : ['foo', 'bar', 'foo', 'bar',
...                           'foo', 'bar'],
...                    'B' : [1, 2, 3, 4, 5, 6],
...                    'C' : [2.0, 5., 8., 1., 2., 9.]})
>>> grouped = df.groupby('A')
>>> grouped.filter(lambda x: x['B'].mean() > 3.)
     A  B    C
1  bar  2  5.0
3  bar  4  1.0
5  bar  6  9.0

---
## head
```python
from generic import head
```

Return the first `n` rows.

This function returns the first `n` rows for the object based
on position. It is useful for quickly testing if your object
has the right type of data in it.

For negative values of `n`, this function returns all rows except
the last `|n|` rows, equivalent to ``df[:n]``.

If n is larger than the number of rows, this function returns all rows.

Parameters
----------
n : int, default 5
    Number of rows to select.

Returns
-------
same type as caller
    The first `n` rows of the caller object.

See Also
--------
DataFrame.tail: Returns the last `n` rows.

Examples
--------
>>> df = pd.DataFrame({'animal': ['alligator', 'bee', 'falcon', 'lion',
...                    'monkey', 'parrot', 'shark', 'whale', 'zebra']})
>>> df
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey
5     parrot
6      shark
7      whale
8      zebra

Viewing the first 5 lines

>>> df.head()
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey

Viewing the first `n` lines (three in this case)

>>> df.head(3)
      animal
0  alligator
1        bee
2     falcon

For negative values of `n`

>>> df.head(-3)
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey
5     parrot

---
## tail
```python
from generic import tail
```

Return the last `n` rows.

This function returns last `n` rows from the object based on
position. It is useful for quickly verifying data, for example,
after sorting or appending rows.

For negative values of `n`, this function returns all rows except
the first `|n|` rows, equivalent to ``df[|n|:]``.

If n is larger than the number of rows, this function returns all rows.

Parameters
----------
n : int, default 5
    Number of rows to select.

Returns
-------
type of caller
    The last `n` rows of the caller object.

See Also
--------
DataFrame.head : The first `n` rows of the caller object.

Examples
--------
>>> df = pd.DataFrame({'animal': ['alligator', 'bee', 'falcon', 'lion',
...                    'monkey', 'parrot', 'shark', 'whale', 'zebra']})
>>> df
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey
5     parrot
6      shark
7      whale
8      zebra

Viewing the last 5 lines

>>> df.tail()
   animal
4  monkey
5  parrot
6   shark
7   whale
8   zebra

Viewing the last `n` lines (three in this case)

>>> df.tail(3)
  animal
6  shark
7  whale
8  zebra

For negative values of `n`

>>> df.tail(-3)
   animal
3    lion
4  monkey
5  parrot
6   shark
7   whale
8   zebra

---
## sample
```python
from generic import sample
```

Return a random sample of items from an axis of object.

You can use `random_state` for reproducibility.

Parameters
----------
n : int, optional
    Number of items from axis to return. Cannot be used with `frac`.
    Default = 1 if `frac` = None.
frac : float, optional
    Fraction of axis items to return. Cannot be used with `n`.
replace : bool, default False
    Allow or disallow sampling of the same row more than once.
weights : str or ndarray-like, optional
    Default 'None' results in equal probability weighting.
    If passed a Series, will align with target object on index. Index
    values in weights not found in sampled object will be ignored and
    index values in sampled object not in weights will be assigned
    weights of zero.
    If called on a DataFrame, will accept the name of a column
    when axis = 0.
    Unless weights are a Series, weights must be same length as axis
    being sampled.
    If weights do not sum to 1, they will be normalized to sum to 1.
    Missing values in the weights column will be treated as zero.
    Infinite values not allowed.
random_state : int, array-like, BitGenerator, np.random.RandomState, np.random.Generator, optional
    If int, array-like, or BitGenerator, seed for random number generator.
    If np.random.RandomState or np.random.Generator, use as given.

    .. versionchanged:: 1.4.0

        np.random.Generator objects now accepted

axis : {0 or 'index', 1 or 'columns', None}, default None
    Axis to sample. Accepts axis number or name. Default is stat axis
    for given data type. For `Series` this parameter is unused and defaults to `None`.
ignore_index : bool, default False
    If True, the resulting index will be labeled 0, 1, …, n - 1.

    .. versionadded:: 1.3.0

Returns
-------
Series or DataFrame
    A new object of same type as caller containing `n` items randomly
    sampled from the caller object.

See Also
--------
DataFrameGroupBy.sample: Generates random samples from each group of a
    DataFrame object.
SeriesGroupBy.sample: Generates random samples from each group of a
    Series object.
numpy.random.choice: Generates a random sample from a given 1-D numpy
    array.

Notes
-----
If `frac` > 1, `replacement` should be set to `True`.

Examples
--------
>>> df = pd.DataFrame({'num_legs': [2, 4, 8, 0],
...                    'num_wings': [2, 0, 0, 0],
...                    'num_specimen_seen': [10, 2, 1, 8]},
...                   index=['falcon', 'dog', 'spider', 'fish'])
>>> df
        num_legs  num_wings  num_specimen_seen
falcon         2          2                 10
dog            4          0                  2
spider         8          0                  1
fish           0          0                  8

Extract 3 random elements from the ``Series`` ``df['num_legs']``:
Note that we use `random_state` to ensure the reproducibility of
the examples.

>>> df['num_legs'].sample(n=3, random_state=1)
fish      0
spider    8
falcon    2
Name: num_legs, dtype: int64

A random 50% sample of the ``DataFrame`` with replacement:

>>> df.sample(frac=0.5, replace=True, random_state=1)
      num_legs  num_wings  num_specimen_seen
dog          4          0                  2
fish         0          0                  8

An upsample sample of the ``DataFrame`` with replacement:
Note that `replace` parameter has to be `True` for `frac` parameter > 1.

>>> df.sample(frac=2, replace=True, random_state=1)
        num_legs  num_wings  num_specimen_seen
dog            4          0                  2
fish           0          0                  8
falcon         2          2                 10
falcon         2          2                 10
fish           0          0                  8
dog            4          0                  2
fish           0          0                  8
dog            4          0                  2

Using a DataFrame column as weights. Rows with larger value in the
`num_specimen_seen` column are more likely to be sampled.

>>> df.sample(n=2, weights='num_specimen_seen', random_state=1)
        num_legs  num_wings  num_specimen_seen
falcon         2          2                 10
fish           0          0                  8

---
## pipe
```python
from generic import pipe
```

Apply chainable functions that expect Series or DataFrames.

Parameters
----------
func : function
    Function to apply to the {klass}.
    ``args``, and ``kwargs`` are passed into ``func``.
    Alternatively a ``(callable, data_keyword)`` tuple where
    ``data_keyword`` is a string indicating the keyword of
    ``callable`` that expects the {klass}.
*args : iterable, optional
    Positional arguments passed into ``func``.
**kwargs : mapping, optional
    A dictionary of keyword arguments passed into ``func``.

Returns
-------
the return type of ``func``.

See Also
--------
DataFrame.apply : Apply a function along input axis of DataFrame.
DataFrame.map : Apply a function elementwise on a whole DataFrame.
Series.map : Apply a mapping correspondence on a
    :class:`~pandas.Series`.

Notes
-----
Use ``.pipe`` when chaining together functions that expect
Series, DataFrames or GroupBy objects.

Examples
--------
Constructing a income DataFrame from a dictionary.

>>> data = [[8000, 1000], [9500, np.nan], [5000, 2000]]
>>> df = pd.DataFrame(data, columns=['Salary', 'Others'])
>>> df
   Salary  Others
0    8000  1000.0
1    9500     NaN
2    5000  2000.0

Functions that perform tax reductions on an income DataFrame.

>>> def subtract_federal_tax(df):
...     return df * 0.9
>>> def subtract_state_tax(df, rate):
...     return df * (1 - rate)
>>> def subtract_national_insurance(df, rate, rate_increase):
...     new_rate = rate + rate_increase
...     return df * (1 - new_rate)

Instead of writing

>>> subtract_national_insurance(
...     subtract_state_tax(subtract_federal_tax(df), rate=0.12),
...     rate=0.05,
...     rate_increase=0.02)  # doctest: +SKIP

You can write

>>> (
...     df.pipe(subtract_federal_tax)
...     .pipe(subtract_state_tax, rate=0.12)
...     .pipe(subtract_national_insurance, rate=0.05, rate_increase=0.02)
... )
    Salary   Others
0  5892.48   736.56
1  6997.32      NaN
2  3682.80  1473.12

If you have a function that takes the data as (say) the second
argument, pass a tuple indicating which keyword expects the
data. For example, suppose ``national_insurance`` takes its data as ``df``
in the second argument:

>>> def subtract_national_insurance(rate, df, rate_increase):
...     new_rate = rate + rate_increase
...     return df * (1 - new_rate)
>>> (
...     df.pipe(subtract_federal_tax)
...     .pipe(subtract_state_tax, rate=0.12)
...     .pipe(
...         (subtract_national_insurance, 'df'),
...         rate=0.05,
...         rate_increase=0.02
...     )
... )
    Salary   Others
0  5892.48   736.56
1  6997.32      NaN
2  3682.80  1473.12

---
## __finalize__
```python
from generic import __finalize__
```

Propagate metadata from other to self.

Parameters
----------
other : the object from which to get the attributes that we are going
    to propagate
method : str, optional
    A passed method name providing context on where ``__finalize__``
    was called.

    .. warning::

       The value passed as `method` are not currently considered
       stable across pandas releases.

---
## __getattr__
```python
from generic import __getattr__
```

After regular attribute access, try looking up the name
This allows simpler access to columns for interactive use.

---
## __setattr__
```python
from generic import __setattr__
```

After regular attribute access, try setting the name
This allows simpler access to columns for interactive use.

---
## _dir_additions
```python
from generic import _dir_additions
```

add the string-like attributes from the info_axis.
If info_axis is a MultiIndex, its first level values are used.

---
## _protect_consolidate
```python
from generic import _protect_consolidate
```

Consolidate _mgr -- if the blocks have changed, then clear the
cache

---
## _consolidate_inplace
```python
from generic import _consolidate_inplace
```

Consolidate data in place and return None

---
## _consolidate
```python
from generic import _consolidate
```

Compute NDFrame with "consolidated" internals (data of each dtype
grouped together in a single ndarray).

Returns
-------
consolidated : same type as caller

---
## _is_mixed_type
```python
from generic import _is_mixed_type
```



---
## _get_numeric_data
```python
from generic import _get_numeric_data
```



---
## _get_bool_data
```python
from generic import _get_bool_data
```



---
## values
```python
from generic import values
```



---
## _values
```python
from generic import _values
```

internal implementation

---
## dtypes
```python
from generic import dtypes
```



---
## astype
```python
from generic import astype
```

Cast a pandas object to a specified dtype ``dtype``.

Parameters
----------
dtype : str, data type, Series or Mapping of column name -> data type
    Use a str, numpy.dtype, pandas.ExtensionDtype or Python type to
    cast entire pandas object to the same type. Alternatively, use a
    mapping, e.g. {col: dtype, ...}, where col is a column label and dtype is
    a numpy.dtype or Python type to cast one or more of the DataFrame's
    columns to column-specific types.
copy : bool, default True
    Return a copy when ``copy=True`` (be very careful setting
    ``copy=False`` as changes to values then may propagate to other
    pandas objects).

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
errors : {'raise', 'ignore'}, default 'raise'
    Control raising of exceptions on invalid data for provided dtype.

    - ``raise`` : allow exceptions to be raised
    - ``ignore`` : suppress exceptions. On error return original object.

Returns
-------
same type as caller

See Also
--------
to_datetime : Convert argument to datetime.
to_timedelta : Convert argument to timedelta.
to_numeric : Convert argument to a numeric type.
numpy.ndarray.astype : Cast a numpy array to a specified type.

Notes
-----
.. versionchanged:: 2.0.0

    Using ``astype`` to convert from timezone-naive dtype to
    timezone-aware dtype will raise an exception.
    Use :meth:`Series.dt.tz_localize` instead.

Examples
--------
Create a DataFrame:

>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df.dtypes
col1    int64
col2    int64
dtype: object

Cast all columns to int32:

>>> df.astype('int32').dtypes
col1    int32
col2    int32
dtype: object

Cast col1 to int32 using a dictionary:

>>> df.astype({'col1': 'int32'}).dtypes
col1    int32
col2    int64
dtype: object

Create a series:

>>> ser = pd.Series([1, 2], dtype='int32')
>>> ser
0    1
1    2
dtype: int32
>>> ser.astype('int64')
0    1
1    2
dtype: int64

Convert to categorical type:

>>> ser.astype('category')
0    1
1    2
dtype: category
Categories (2, int32): [1, 2]

Convert to ordered categorical type with custom ordering:

>>> from pandas.api.types import CategoricalDtype
>>> cat_dtype = CategoricalDtype(
...     categories=[2, 1], ordered=True)
>>> ser.astype(cat_dtype)
0    1
1    2
dtype: category
Categories (2, int64): [2 < 1]

Create a series of dates:

>>> ser_date = pd.Series(pd.date_range('20200101', periods=3))
>>> ser_date
0   2020-01-01
1   2020-01-02
2   2020-01-03
dtype: datetime64[ns]

---
## copy
```python
from generic import copy
```

Make a copy of this object's indices and data.

When ``deep=True`` (default), a new object will be created with a
copy of the calling object's data and indices. Modifications to
the data or indices of the copy will not be reflected in the
original object (see notes below).

When ``deep=False``, a new object will be created without copying
the calling object's data or index (only references to the data
and index are copied). Any changes to the data of the original
will be reflected in the shallow copy (and vice versa).

.. note::
    The ``deep=False`` behaviour as described above will change
    in pandas 3.0. `Copy-on-Write
    <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
    will be enabled by default, which means that the "shallow" copy
    is that is returned with ``deep=False`` will still avoid making
    an eager copy, but changes to the data of the original will *no*
    longer be reflected in the shallow copy (or vice versa). Instead,
    it makes use of a lazy (deferred) copy mechanism that will copy
    the data only when any changes to the original or shallow copy is
    made.

    You can already get the future behavior and improvements through
    enabling copy on write ``pd.options.mode.copy_on_write = True``

Parameters
----------
deep : bool, default True
    Make a deep copy, including a copy of the data and the indices.
    With ``deep=False`` neither the indices nor the data are copied.

Returns
-------
Series or DataFrame
    Object type matches caller.

Notes
-----
When ``deep=True``, data is copied but actual Python objects
will not be copied recursively, only the reference to the object.
This is in contrast to `copy.deepcopy` in the Standard Library,
which recursively copies object data (see examples below).

While ``Index`` objects are copied when ``deep=True``, the underlying
numpy array is not copied for performance reasons. Since ``Index`` is
immutable, the underlying data can be safely shared and a copy
is not needed.

Since pandas is not thread safe, see the
:ref:`gotchas <gotchas.thread-safety>` when copying in a threading
environment.

When ``copy_on_write`` in pandas config is set to ``True``, the
``copy_on_write`` config takes effect even when ``deep=False``.
This means that any changes to the copied data would make a new copy
of the data upon write (and vice versa). Changes made to either the
original or copied variable would not be reflected in the counterpart.
See :ref:`Copy_on_Write <copy_on_write>` for more information.

Examples
--------
>>> s = pd.Series([1, 2], index=["a", "b"])
>>> s
a    1
b    2
dtype: int64

>>> s_copy = s.copy()
>>> s_copy
a    1
b    2
dtype: int64

**Shallow copy versus default (deep) copy:**

>>> s = pd.Series([1, 2], index=["a", "b"])
>>> deep = s.copy()
>>> shallow = s.copy(deep=False)

Shallow copy shares data and index with original.

>>> s is shallow
False
>>> s.values is shallow.values and s.index is shallow.index
True

Deep copy has own copy of data and index.

>>> s is deep
False
>>> s.values is deep.values or s.index is deep.index
False

Updates to the data shared by shallow copy and original is reflected
in both (NOTE: this will no longer be true for pandas >= 3.0);
deep copy remains unchanged.

>>> s.iloc[0] = 3
>>> shallow.iloc[1] = 4
>>> s
a    3
b    4
dtype: int64
>>> shallow
a    3
b    4
dtype: int64
>>> deep
a    1
b    2
dtype: int64

Note that when copying an object containing Python objects, a deep copy
will copy the data, but will not do so recursively. Updating a nested
data object will be reflected in the deep copy.

>>> s = pd.Series([[1, 2], [3, 4]])
>>> deep = s.copy()
>>> s[0][0] = 10
>>> s
0    [10, 2]
1     [3, 4]
dtype: object
>>> deep
0    [10, 2]
1     [3, 4]
dtype: object

**Copy-on-Write is set to true**, the shallow copy is not modified
when the original data is changed:

>>> with pd.option_context("mode.copy_on_write", True):
...     s = pd.Series([1, 2], index=["a", "b"])
...     copy = s.copy(deep=False)
...     s.iloc[0] = 100
...     s
a    100
b      2
dtype: int64
>>> copy
a    1
b    2
dtype: int64

---
## __copy__
```python
from generic import __copy__
```



---
## __deepcopy__
```python
from generic import __deepcopy__
```

Parameters
----------
memo, default None
    Standard signature. Unused

---
## infer_objects
```python
from generic import infer_objects
```

Attempt to infer better dtypes for object columns.

Attempts soft conversion of object-dtyped
columns, leaving non-object and unconvertible
columns unchanged. The inference rules are the
same as during normal Series/DataFrame construction.

Parameters
----------
copy : bool, default True
    Whether to make a copy for non-object or non-inferable columns
    or Series.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
same type as input object

See Also
--------
to_datetime : Convert argument to datetime.
to_timedelta : Convert argument to timedelta.
to_numeric : Convert argument to numeric type.
convert_dtypes : Convert argument to best possible dtype.

Examples
--------
>>> df = pd.DataFrame({"A": ["a", 1, 2, 3]})
>>> df = df.iloc[1:]
>>> df
   A
1  1
2  2
3  3

>>> df.dtypes
A    object
dtype: object

>>> df.infer_objects().dtypes
A    int64
dtype: object

---
## convert_dtypes
```python
from generic import convert_dtypes
```

Convert columns to the best possible dtypes using dtypes supporting ``pd.NA``.

Parameters
----------
infer_objects : bool, default True
    Whether object dtypes should be converted to the best possible types.
convert_string : bool, default True
    Whether object dtypes should be converted to ``StringDtype()``.
convert_integer : bool, default True
    Whether, if possible, conversion can be done to integer extension types.
convert_boolean : bool, defaults True
    Whether object dtypes should be converted to ``BooleanDtypes()``.
convert_floating : bool, defaults True
    Whether, if possible, conversion can be done to floating extension types.
    If `convert_integer` is also True, preference will be give to integer
    dtypes if the floats can be faithfully casted to integers.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
Series or DataFrame
    Copy of input object with new dtype.

See Also
--------
infer_objects : Infer dtypes of objects.
to_datetime : Convert argument to datetime.
to_timedelta : Convert argument to timedelta.
to_numeric : Convert argument to a numeric type.

Notes
-----
By default, ``convert_dtypes`` will attempt to convert a Series (or each
Series in a DataFrame) to dtypes that support ``pd.NA``. By using the options
``convert_string``, ``convert_integer``, ``convert_boolean`` and
``convert_floating``, it is possible to turn off individual conversions
to ``StringDtype``, the integer extension types, ``BooleanDtype``
or floating extension types, respectively.

For object-dtyped columns, if ``infer_objects`` is ``True``, use the inference
rules as during normal Series/DataFrame construction.  Then, if possible,
convert to ``StringDtype``, ``BooleanDtype`` or an appropriate integer
or floating extension type, otherwise leave as ``object``.

If the dtype is integer, convert to an appropriate integer extension type.

If the dtype is numeric, and consists of all integers, convert to an
appropriate integer extension type. Otherwise, convert to an
appropriate floating extension type.

In the future, as new dtypes are added that support ``pd.NA``, the results
of this method will change to support those new dtypes.

Examples
--------
>>> df = pd.DataFrame(
...     {
...         "a": pd.Series([1, 2, 3], dtype=np.dtype("int32")),
...         "b": pd.Series(["x", "y", "z"], dtype=np.dtype("O")),
...         "c": pd.Series([True, False, np.nan], dtype=np.dtype("O")),
...         "d": pd.Series(["h", "i", np.nan], dtype=np.dtype("O")),
...         "e": pd.Series([10, np.nan, 20], dtype=np.dtype("float")),
...         "f": pd.Series([np.nan, 100.5, 200], dtype=np.dtype("float")),
...     }
... )

Start with a DataFrame with default dtypes.

>>> df
   a  b      c    d     e      f
0  1  x   True    h  10.0    NaN
1  2  y  False    i   NaN  100.5
2  3  z    NaN  NaN  20.0  200.0

>>> df.dtypes
a      int32
b     object
c     object
d     object
e    float64
f    float64
dtype: object

Convert the DataFrame to use best possible dtypes.

>>> dfn = df.convert_dtypes()
>>> dfn
   a  b      c     d     e      f
0  1  x   True     h    10   <NA>
1  2  y  False     i  <NA>  100.5
2  3  z   <NA>  <NA>    20  200.0

>>> dfn.dtypes
a             Int32
b    string[python]
c           boolean
d    string[python]
e             Int64
f           Float64
dtype: object

Start with a Series of strings and missing data represented by ``np.nan``.

>>> s = pd.Series(["a", "b", np.nan])
>>> s
0      a
1      b
2    NaN
dtype: object

Obtain a Series with dtype ``StringDtype``.

>>> s.convert_dtypes()
0       a
1       b
2    <NA>
dtype: string

---
## _deprecate_downcast
```python
from generic import _deprecate_downcast
```



---
## _pad_or_backfill
```python
from generic import _pad_or_backfill
```



---
## fillna
```python
from generic import fillna
```

Fill NA/NaN values using the specified method within groups.

.. deprecated:: 2.2.0
    This method is deprecated and will be removed in a future version.
    Use the :meth:`.DataFrameGroupBy.ffill` or :meth:`.DataFrameGroupBy.bfill`
    for forward or backward filling instead. If you want to fill with a
    single value, use :meth:`DataFrame.fillna` instead.

Parameters
----------
value : scalar, dict, Series, or DataFrame
    Value to use to fill holes (e.g. 0), alternately a
    dict/Series/DataFrame of values specifying which value to use for
    each index (for a Series) or column (for a DataFrame).  Values not
    in the dict/Series/DataFrame will not be filled. This value cannot
    be a list. Users wanting to use the ``value`` argument and not ``method``
    should prefer :meth:`.DataFrame.fillna` as this
    will produce the same result and be more performant.
method : {{'bfill', 'ffill', None}}, default None
    Method to use for filling holes. ``'ffill'`` will propagate
    the last valid observation forward within a group.
    ``'bfill'`` will use next valid observation to fill the gap.
axis : {0 or 'index', 1 or 'columns'}
    Axis along which to fill missing values. When the :class:`DataFrameGroupBy`
    ``axis`` argument is ``0``, using ``axis=1`` here will produce
    the same results as :meth:`.DataFrame.fillna`. When the
    :class:`DataFrameGroupBy` ``axis`` argument is ``1``, using ``axis=0``
    or ``axis=1`` here will produce the same results.
inplace : bool, default False
    Broken. Do not set to True.
limit : int, default None
    If method is specified, this is the maximum number of consecutive
    NaN values to forward/backward fill within a group. In other words,
    if there is a gap with more than this number of consecutive NaNs,
    it will only be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled. Must be greater than 0 if not None.
downcast : dict, default is None
    A dict of item->dtype of what to downcast if possible,
    or the string 'infer' which will try to downcast to an appropriate
    equal type (e.g. float64 to int64 if possible).

Returns
-------
DataFrame
    Object with missing values filled.

See Also
--------
ffill : Forward fill values within a group.
bfill : Backward fill values within a group.

Examples
--------
>>> df = pd.DataFrame(
...     {
...         "key": [0, 0, 1, 1, 1],
...         "A": [np.nan, 2, np.nan, 3, np.nan],
...         "B": [2, 3, np.nan, np.nan, np.nan],
...         "C": [np.nan, np.nan, 2, np.nan, np.nan],
...     }
... )
>>> df
   key    A    B   C
0    0  NaN  2.0 NaN
1    0  2.0  3.0 NaN
2    1  NaN  NaN 2.0
3    1  3.0  NaN NaN
4    1  NaN  NaN NaN

Propagate non-null values forward or backward within each group along columns.

>>> df.groupby("key").fillna(method="ffill")
     A    B   C
0  NaN  2.0 NaN
1  2.0  3.0 NaN
2  NaN  NaN 2.0
3  3.0  NaN 2.0
4  3.0  NaN 2.0

>>> df.groupby("key").fillna(method="bfill")
     A    B   C
0  2.0  2.0 NaN
1  2.0  3.0 NaN
2  3.0  NaN 2.0
3  3.0  NaN NaN
4  NaN  NaN NaN

Propagate non-null values forward or backward within each group along rows.

>>> df.T.groupby(np.array([0, 0, 1, 1])).fillna(method="ffill").T
   key    A    B    C
0  0.0  0.0  2.0  2.0
1  0.0  2.0  3.0  3.0
2  1.0  1.0  NaN  2.0
3  1.0  3.0  NaN  NaN
4  1.0  1.0  NaN  NaN

>>> df.T.groupby(np.array([0, 0, 1, 1])).fillna(method="bfill").T
   key    A    B    C
0  0.0  NaN  2.0  NaN
1  0.0  2.0  3.0  NaN
2  1.0  NaN  2.0  2.0
3  1.0  3.0  NaN  NaN
4  1.0  NaN  NaN  NaN

Only replace the first NaN element within a group along rows.

>>> df.groupby("key").fillna(method="ffill", limit=1)
     A    B    C
0  NaN  2.0  NaN
1  2.0  3.0  NaN
2  NaN  NaN  2.0
3  3.0  NaN  2.0
4  3.0  NaN  NaN

---
## ffill
```python
from generic import ffill
```

Fill NA/NaN values by propagating the last valid observation to next valid.

Parameters
----------
axis : {axes_single_arg}
    Axis along which to fill missing values. For `Series`
    this parameter is unused and defaults to 0.
inplace : bool, default False
    If True, fill in-place. Note: this will modify any
    other views on this object (e.g., a no-copy slice for a column in a
    DataFrame).
limit : int, default None
    If method is specified, this is the maximum number of consecutive
    NaN values to forward/backward fill. In other words, if there is
    a gap with more than this number of consecutive NaNs, it will only
    be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled. Must be greater than 0 if not None.
limit_area : {{`None`, 'inside', 'outside'}}, default None
    If limit is specified, consecutive NaNs will be filled with this
    restriction.

    * ``None``: No fill restriction.
    * 'inside': Only fill NaNs surrounded by valid values
      (interpolate).
    * 'outside': Only fill NaNs outside valid values (extrapolate).

    .. versionadded:: 2.2.0

downcast : dict, default is None
    A dict of item->dtype of what to downcast if possible,
    or the string 'infer' which will try to downcast to an appropriate
    equal type (e.g. float64 to int64 if possible).

    .. deprecated:: 2.2.0

Returns
-------
{klass} or None
    Object with missing values filled or None if ``inplace=True``.

Examples
--------
>>> df = pd.DataFrame([[np.nan, 2, np.nan, 0],
...                    [3, 4, np.nan, 1],
...                    [np.nan, np.nan, np.nan, np.nan],
...                    [np.nan, 3, np.nan, 4]],
...                   columns=list("ABCD"))
>>> df
     A    B   C    D
0  NaN  2.0 NaN  0.0
1  3.0  4.0 NaN  1.0
2  NaN  NaN NaN  NaN
3  NaN  3.0 NaN  4.0

>>> df.ffill()
     A    B   C    D
0  NaN  2.0 NaN  0.0
1  3.0  4.0 NaN  1.0
2  3.0  4.0 NaN  1.0
3  3.0  3.0 NaN  4.0

>>> ser = pd.Series([1, np.nan, 2, 3])
>>> ser.ffill()
0   1.0
1   1.0
2   2.0
3   3.0
dtype: float64

---
## pad
```python
from generic import pad
```

Fill NA/NaN values by propagating the last valid observation to next valid.

.. deprecated:: 2.0

    {klass}.pad is deprecated. Use {klass}.ffill instead.

Returns
-------
{klass} or None
    Object with missing values filled or None if ``inplace=True``.

Examples
--------
Please see examples for :meth:`DataFrame.ffill` or :meth:`Series.ffill`.

---
## bfill
```python
from generic import bfill
```

Fill NA/NaN values by using the next valid observation to fill the gap.

Parameters
----------
axis : {axes_single_arg}
    Axis along which to fill missing values. For `Series`
    this parameter is unused and defaults to 0.
inplace : bool, default False
    If True, fill in-place. Note: this will modify any
    other views on this object (e.g., a no-copy slice for a column in a
    DataFrame).
limit : int, default None
    If method is specified, this is the maximum number of consecutive
    NaN values to forward/backward fill. In other words, if there is
    a gap with more than this number of consecutive NaNs, it will only
    be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled. Must be greater than 0 if not None.
limit_area : {{`None`, 'inside', 'outside'}}, default None
    If limit is specified, consecutive NaNs will be filled with this
    restriction.

    * ``None``: No fill restriction.
    * 'inside': Only fill NaNs surrounded by valid values
      (interpolate).
    * 'outside': Only fill NaNs outside valid values (extrapolate).

    .. versionadded:: 2.2.0

downcast : dict, default is None
    A dict of item->dtype of what to downcast if possible,
    or the string 'infer' which will try to downcast to an appropriate
    equal type (e.g. float64 to int64 if possible).

    .. deprecated:: 2.2.0

Returns
-------
{klass} or None
    Object with missing values filled or None if ``inplace=True``.

Examples
--------
For Series:

>>> s = pd.Series([1, None, None, 2])
>>> s.bfill()
0    1.0
1    2.0
2    2.0
3    2.0
dtype: float64
>>> s.bfill(limit=1)
0    1.0
1    NaN
2    2.0
3    2.0
dtype: float64

With DataFrame:

>>> df = pd.DataFrame({{'A': [1, None, None, 4], 'B': [None, 5, None, 7]}})
>>> df
      A     B
0   1.0   NaN
1   NaN   5.0
2   NaN   NaN
3   4.0   7.0
>>> df.bfill()
      A     B
0   1.0   5.0
1   4.0   5.0
2   4.0   7.0
3   4.0   7.0
>>> df.bfill(limit=1)
      A     B
0   1.0   5.0
1   NaN   5.0
2   4.0   7.0
3   4.0   7.0

---
## backfill
```python
from generic import backfill
```

Fill NA/NaN values by using the next valid observation to fill the gap.

.. deprecated:: 2.0

    {klass}.backfill is deprecated. Use {klass}.bfill instead.

Returns
-------
{klass} or None
    Object with missing values filled or None if ``inplace=True``.

Examples
--------
Please see examples for :meth:`DataFrame.bfill` or :meth:`Series.bfill`.

---
## replace
```python
from generic import replace
```



---
## interpolate
```python
from generic import interpolate
```

Fill NaN values using an interpolation method.

Please note that only ``method='linear'`` is supported for
DataFrame/Series with a MultiIndex.

Parameters
----------
method : str, default 'linear'
    Interpolation technique to use. One of:

    * 'linear': Ignore the index and treat the values as equally
      spaced. This is the only method supported on MultiIndexes.
    * 'time': Works on daily and higher resolution data to interpolate
      given length of interval.
    * 'index', 'values': use the actual numerical values of the index.
    * 'pad': Fill in NaNs using existing values.
    * 'nearest', 'zero', 'slinear', 'quadratic', 'cubic',
      'barycentric', 'polynomial': Passed to
      `scipy.interpolate.interp1d`, whereas 'spline' is passed to
      `scipy.interpolate.UnivariateSpline`. These methods use the numerical
      values of the index.  Both 'polynomial' and 'spline' require that
      you also specify an `order` (int), e.g.
      ``df.interpolate(method='polynomial', order=5)``. Note that,
      `slinear` method in Pandas refers to the Scipy first order `spline`
      instead of Pandas first order `spline`.
    * 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima',
      'cubicspline': Wrappers around the SciPy interpolation methods of
      similar names. See `Notes`.
    * 'from_derivatives': Refers to
      `scipy.interpolate.BPoly.from_derivatives`.

axis : {{0 or 'index', 1 or 'columns', None}}, default None
    Axis to interpolate along. For `Series` this parameter is unused
    and defaults to 0.
limit : int, optional
    Maximum number of consecutive NaNs to fill. Must be greater than
    0.
inplace : bool, default False
    Update the data in place if possible.
limit_direction : {{'forward', 'backward', 'both'}}, Optional
    Consecutive NaNs will be filled in this direction.

    If limit is specified:
        * If 'method' is 'pad' or 'ffill', 'limit_direction' must be 'forward'.
        * If 'method' is 'backfill' or 'bfill', 'limit_direction' must be
          'backwards'.

    If 'limit' is not specified:
        * If 'method' is 'backfill' or 'bfill', the default is 'backward'
        * else the default is 'forward'

    raises ValueError if `limit_direction` is 'forward' or 'both' and
        method is 'backfill' or 'bfill'.
    raises ValueError if `limit_direction` is 'backward' or 'both' and
        method is 'pad' or 'ffill'.

limit_area : {{`None`, 'inside', 'outside'}}, default None
    If limit is specified, consecutive NaNs will be filled with this
    restriction.

    * ``None``: No fill restriction.
    * 'inside': Only fill NaNs surrounded by valid values
      (interpolate).
    * 'outside': Only fill NaNs outside valid values (extrapolate).

downcast : optional, 'infer' or None, defaults to None
    Downcast dtypes if possible.

    .. deprecated:: 2.1.0

``**kwargs`` : optional
    Keyword arguments to pass on to the interpolating function.

Returns
-------
Series or DataFrame or None
    Returns the same object type as the caller, interpolated at
    some or all ``NaN`` values or None if ``inplace=True``.

See Also
--------
fillna : Fill missing values using different methods.
scipy.interpolate.Akima1DInterpolator : Piecewise cubic polynomials
    (Akima interpolator).
scipy.interpolate.BPoly.from_derivatives : Piecewise polynomial in the
    Bernstein basis.
scipy.interpolate.interp1d : Interpolate a 1-D function.
scipy.interpolate.KroghInterpolator : Interpolate polynomial (Krogh
    interpolator).
scipy.interpolate.PchipInterpolator : PCHIP 1-d monotonic cubic
    interpolation.
scipy.interpolate.CubicSpline : Cubic spline data interpolator.

Notes
-----
The 'krogh', 'piecewise_polynomial', 'spline', 'pchip' and 'akima'
methods are wrappers around the respective SciPy implementations of
similar names. These use the actual numerical values of the index.
For more information on their behavior, see the
`SciPy documentation
<https://docs.scipy.org/doc/scipy/reference/interpolate.html#univariate-interpolation>`__.

Examples
--------
Filling in ``NaN`` in a :class:`~pandas.Series` via linear
interpolation.

>>> s = pd.Series([0, 1, np.nan, 3])
>>> s
0    0.0
1    1.0
2    NaN
3    3.0
dtype: float64
>>> s.interpolate()
0    0.0
1    1.0
2    2.0
3    3.0
dtype: float64

Filling in ``NaN`` in a Series via polynomial interpolation or splines:
Both 'polynomial' and 'spline' methods require that you also specify
an ``order`` (int).

>>> s = pd.Series([0, 2, np.nan, 8])
>>> s.interpolate(method='polynomial', order=2)
0    0.000000
1    2.000000
2    4.666667
3    8.000000
dtype: float64

Fill the DataFrame forward (that is, going down) along each column
using linear interpolation.

Note how the last entry in column 'a' is interpolated differently,
because there is no entry after it to use for interpolation.
Note how the first entry in column 'b' remains ``NaN``, because there
is no entry before it to use for interpolation.

>>> df = pd.DataFrame([(0.0, np.nan, -1.0, 1.0),
...                    (np.nan, 2.0, np.nan, np.nan),
...                    (2.0, 3.0, np.nan, 9.0),
...                    (np.nan, 4.0, -4.0, 16.0)],
...                   columns=list('abcd'))
>>> df
     a    b    c     d
0  0.0  NaN -1.0   1.0
1  NaN  2.0  NaN   NaN
2  2.0  3.0  NaN   9.0
3  NaN  4.0 -4.0  16.0
>>> df.interpolate(method='linear', limit_direction='forward', axis=0)
     a    b    c     d
0  0.0  NaN -1.0   1.0
1  1.0  2.0 -2.0   5.0
2  2.0  3.0 -3.0   9.0
3  2.0  4.0 -4.0  16.0

Using polynomial interpolation.

>>> df['d'].interpolate(method='polynomial', order=2)
0     1.0
1     4.0
2     9.0
3    16.0
Name: d, dtype: float64

---
## asof
```python
from generic import asof
```

Return the last row(s) without any NaNs before `where`.

The last row (for each element in `where`, if list) without any
NaN is taken.
In case of a :class:`~pandas.DataFrame`, the last row without NaN
considering only the subset of columns (if not `None`)

If there is no good value, NaN is returned for a Series or
a Series of NaN values for a DataFrame

Parameters
----------
where : date or array-like of dates
    Date(s) before which the last row(s) are returned.
subset : str or array-like of str, default `None`
    For DataFrame, if not `None`, only use these columns to
    check for NaNs.

Returns
-------
scalar, Series, or DataFrame

    The return can be:

    * scalar : when `self` is a Series and `where` is a scalar
    * Series: when `self` is a Series and `where` is an array-like,
      or when `self` is a DataFrame and `where` is a scalar
    * DataFrame : when `self` is a DataFrame and `where` is an
      array-like

See Also
--------
merge_asof : Perform an asof merge. Similar to left join.

Notes
-----
Dates are assumed to be sorted. Raises if this is not the case.

Examples
--------
A Series and a scalar `where`.

>>> s = pd.Series([1, 2, np.nan, 4], index=[10, 20, 30, 40])
>>> s
10    1.0
20    2.0
30    NaN
40    4.0
dtype: float64

>>> s.asof(20)
2.0

For a sequence `where`, a Series is returned. The first value is
NaN, because the first element of `where` is before the first
index value.

>>> s.asof([5, 20])
5     NaN
20    2.0
dtype: float64

Missing values are not considered. The following is ``2.0``, not
NaN, even though NaN is at the index location for ``30``.

>>> s.asof(30)
2.0

Take all columns into consideration

>>> df = pd.DataFrame({'a': [10., 20., 30., 40., 50.],
...                    'b': [None, None, None, None, 500]},
...                   index=pd.DatetimeIndex(['2018-02-27 09:01:00',
...                                           '2018-02-27 09:02:00',
...                                           '2018-02-27 09:03:00',
...                                           '2018-02-27 09:04:00',
...                                           '2018-02-27 09:05:00']))
>>> df.asof(pd.DatetimeIndex(['2018-02-27 09:03:30',
...                           '2018-02-27 09:04:30']))
                      a   b
2018-02-27 09:03:30 NaN NaN
2018-02-27 09:04:30 NaN NaN

Take a single column into consideration

>>> df.asof(pd.DatetimeIndex(['2018-02-27 09:03:30',
...                           '2018-02-27 09:04:30']),
...         subset=['a'])
                        a   b
2018-02-27 09:03:30  30.0 NaN
2018-02-27 09:04:30  40.0 NaN

---
## isna
```python
from generic import isna
```

Detect missing values.

Return a boolean same-sized object indicating if the values are NA.
NA values, such as None or :attr:`numpy.NaN`, gets mapped to True
values.
Everything else gets mapped to False values. Characters such as empty
strings ``''`` or :attr:`numpy.inf` are not considered NA values
(unless you set ``pandas.options.mode.use_inf_as_na = True``).

Returns
-------
{klass}
    Mask of bool values for each element in {klass} that
    indicates whether an element is an NA value.

See Also
--------
{klass}.isnull : Alias of isna.
{klass}.notna : Boolean inverse of isna.
{klass}.dropna : Omit axes labels with missing values.
isna : Top-level isna.

Examples
--------
Show which entries in a DataFrame are NA.

>>> df = pd.DataFrame(dict(age=[5, 6, np.nan],
...                        born=[pd.NaT, pd.Timestamp('1939-05-27'),
...                              pd.Timestamp('1940-04-25')],
...                        name=['Alfred', 'Batman', ''],
...                        toy=[None, 'Batmobile', 'Joker']))
>>> df
   age       born    name        toy
0  5.0        NaT  Alfred       None
1  6.0 1939-05-27  Batman  Batmobile
2  NaN 1940-04-25              Joker

>>> df.isna()
     age   born   name    toy
0  False   True  False   True
1  False  False  False  False
2   True  False  False  False

Show which entries in a Series are NA.

>>> ser = pd.Series([5, 6, np.nan])
>>> ser
0    5.0
1    6.0
2    NaN
dtype: float64

>>> ser.isna()
0    False
1    False
2     True
dtype: bool

---
## isnull
```python
from generic import isnull
```



---
## notna
```python
from generic import notna
```

Detect existing (non-missing) values.

Return a boolean same-sized object indicating if the values are not NA.
Non-missing values get mapped to True. Characters such as empty
strings ``''`` or :attr:`numpy.inf` are not considered NA values
(unless you set ``pandas.options.mode.use_inf_as_na = True``).
NA values, such as None or :attr:`numpy.NaN`, get mapped to False
values.

Returns
-------
{klass}
    Mask of bool values for each element in {klass} that
    indicates whether an element is not an NA value.

See Also
--------
{klass}.notnull : Alias of notna.
{klass}.isna : Boolean inverse of notna.
{klass}.dropna : Omit axes labels with missing values.
notna : Top-level notna.

Examples
--------
Show which entries in a DataFrame are not NA.

>>> df = pd.DataFrame(dict(age=[5, 6, np.nan],
...                        born=[pd.NaT, pd.Timestamp('1939-05-27'),
...                              pd.Timestamp('1940-04-25')],
...                        name=['Alfred', 'Batman', ''],
...                        toy=[None, 'Batmobile', 'Joker']))
>>> df
   age       born    name        toy
0  5.0        NaT  Alfred       None
1  6.0 1939-05-27  Batman  Batmobile
2  NaN 1940-04-25              Joker

>>> df.notna()
     age   born  name    toy
0   True  False  True  False
1   True   True  True   True
2  False   True  True   True

Show which entries in a Series are not NA.

>>> ser = pd.Series([5, 6, np.nan])
>>> ser
0    5.0
1    6.0
2    NaN
dtype: float64

>>> ser.notna()
0     True
1     True
2    False
dtype: bool

---
## notnull
```python
from generic import notnull
```



---
## _clip_with_scalar
```python
from generic import _clip_with_scalar
```



---
## _clip_with_one_bound
```python
from generic import _clip_with_one_bound
```



---
## clip
```python
from generic import clip
```

Trim values at input threshold(s).

Assigns values outside boundary to boundary values. Thresholds
can be singular values or array like, and in the latter case
the clipping is performed element-wise in the specified axis.

Parameters
----------
lower : float or array-like, default None
    Minimum threshold value. All values below this
    threshold will be set to it. A missing
    threshold (e.g `NA`) will not clip the value.
upper : float or array-like, default None
    Maximum threshold value. All values above this
    threshold will be set to it. A missing
    threshold (e.g `NA`) will not clip the value.
axis : {{0 or 'index', 1 or 'columns', None}}, default None
    Align object with lower and upper along the given axis.
    For `Series` this parameter is unused and defaults to `None`.
inplace : bool, default False
    Whether to perform the operation in place on the data.
*args, **kwargs
    Additional keywords have no effect but might be accepted
    for compatibility with numpy.

Returns
-------
Series or DataFrame or None
    Same type as calling object with the values outside the
    clip boundaries replaced or None if ``inplace=True``.

See Also
--------
Series.clip : Trim values at input threshold in series.
DataFrame.clip : Trim values at input threshold in dataframe.
numpy.clip : Clip (limit) the values in an array.

Examples
--------
>>> data = {'col_0': [9, -3, 0, -1, 5], 'col_1': [-2, -7, 6, 8, -5]}
>>> df = pd.DataFrame(data)
>>> df
   col_0  col_1
0      9     -2
1     -3     -7
2      0      6
3     -1      8
4      5     -5

Clips per column using lower and upper thresholds:

>>> df.clip(-4, 6)
   col_0  col_1
0      6     -2
1     -3     -4
2      0      6
3     -1      6
4      5     -4

Clips using specific lower and upper thresholds per column:

>>> df.clip([-2, -1], [4, 5])
    col_0  col_1
0      4     -1
1     -2     -1
2      0      5
3     -1      5
4      4     -1

Clips using specific lower and upper thresholds per column element:

>>> t = pd.Series([2, -4, -1, 6, 3])
>>> t
0    2
1   -4
2   -1
3    6
4    3
dtype: int64

>>> df.clip(t, t + 4, axis=0)
   col_0  col_1
0      6      2
1     -3     -4
2      0      3
3      6      8
4      5      3

Clips using specific lower threshold per column element, with missing values:

>>> t = pd.Series([2, -4, np.nan, 6, 3])
>>> t
0    2.0
1   -4.0
2    NaN
3    6.0
4    3.0
dtype: float64

>>> df.clip(t, axis=0)
col_0  col_1
0      9      2
1     -3     -4
2      0      6
3      6      8
4      5      3

---
## asfreq
```python
from generic import asfreq
```

Convert time series to specified frequency.

Returns the original data conformed to a new index with the specified
frequency.

If the index of this {klass} is a :class:`~pandas.PeriodIndex`, the new index
is the result of transforming the original index with
:meth:`PeriodIndex.asfreq <pandas.PeriodIndex.asfreq>` (so the original index
will map one-to-one to the new index).

Otherwise, the new index will be equivalent to ``pd.date_range(start, end,
freq=freq)`` where ``start`` and ``end`` are, respectively, the first and
last entries in the original index (see :func:`pandas.date_range`). The
values corresponding to any timesteps in the new index which were not present
in the original index will be null (``NaN``), unless a method for filling
such unknowns is provided (see the ``method`` parameter below).

The :meth:`resample` method is more appropriate if an operation on each group of
timesteps (such as an aggregate) is necessary to represent the data at the new
frequency.

Parameters
----------
freq : DateOffset or str
    Frequency DateOffset or string.
method : {{'backfill'/'bfill', 'pad'/'ffill'}}, default None
    Method to use for filling holes in reindexed Series (note this
    does not fill NaNs that already were present):

    * 'pad' / 'ffill': propagate last valid observation forward to next
      valid
    * 'backfill' / 'bfill': use NEXT valid observation to fill.
how : {{'start', 'end'}}, default end
    For PeriodIndex only (see PeriodIndex.asfreq).
normalize : bool, default False
    Whether to reset output index to midnight.
fill_value : scalar, optional
    Value to use for missing values, applied during upsampling (note
    this does not fill NaNs that already were present).

Returns
-------
{klass}
    {klass} object reindexed to the specified frequency.

See Also
--------
reindex : Conform DataFrame to new index with optional filling logic.

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
Start by creating a series with 4 one minute timestamps.

>>> index = pd.date_range('1/1/2000', periods=4, freq='min')
>>> series = pd.Series([0.0, None, 2.0, 3.0], index=index)
>>> df = pd.DataFrame({{'s': series}})
>>> df
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:01:00    NaN
2000-01-01 00:02:00    2.0
2000-01-01 00:03:00    3.0

Upsample the series into 30 second bins.

>>> df.asfreq(freq='30s')
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    NaN
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    NaN
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    NaN
2000-01-01 00:03:00    3.0

Upsample again, providing a ``fill value``.

>>> df.asfreq(freq='30s', fill_value=9.0)
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    9.0
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    9.0
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    9.0
2000-01-01 00:03:00    3.0

Upsample again, providing a ``method``.

>>> df.asfreq(freq='30s', method='bfill')
                       s
2000-01-01 00:00:00    0.0
2000-01-01 00:00:30    NaN
2000-01-01 00:01:00    NaN
2000-01-01 00:01:30    2.0
2000-01-01 00:02:00    2.0
2000-01-01 00:02:30    3.0
2000-01-01 00:03:00    3.0

---
## at_time
```python
from generic import at_time
```

Select values at particular time of day (e.g., 9:30AM).

Parameters
----------
time : datetime.time or str
    The values to select.
axis : {0 or 'index', 1 or 'columns'}, default 0
    For `Series` this parameter is unused and defaults to 0.

Returns
-------
Series or DataFrame

Raises
------
TypeError
    If the index is not  a :class:`DatetimeIndex`

See Also
--------
between_time : Select values between particular times of the day.
first : Select initial periods of time series based on a date offset.
last : Select final periods of time series based on a date offset.
DatetimeIndex.indexer_at_time : Get just the index locations for
    values at particular time of the day.

Examples
--------
>>> i = pd.date_range('2018-04-09', periods=4, freq='12h')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
                     A
2018-04-09 00:00:00  1
2018-04-09 12:00:00  2
2018-04-10 00:00:00  3
2018-04-10 12:00:00  4

>>> ts.at_time('12:00')
                     A
2018-04-09 12:00:00  2
2018-04-10 12:00:00  4

---
## between_time
```python
from generic import between_time
```

Select values between particular times of the day (e.g., 9:00-9:30 AM).

By setting ``start_time`` to be later than ``end_time``,
you can get the times that are *not* between the two times.

Parameters
----------
start_time : datetime.time or str
    Initial time as a time filter limit.
end_time : datetime.time or str
    End time as a time filter limit.
inclusive : {"both", "neither", "left", "right"}, default "both"
    Include boundaries; whether to set each bound as closed or open.
axis : {0 or 'index', 1 or 'columns'}, default 0
    Determine range time on index or columns value.
    For `Series` this parameter is unused and defaults to 0.

Returns
-------
Series or DataFrame
    Data from the original object filtered to the specified dates range.

Raises
------
TypeError
    If the index is not  a :class:`DatetimeIndex`

See Also
--------
at_time : Select values at a particular time of the day.
first : Select initial periods of time series based on a date offset.
last : Select final periods of time series based on a date offset.
DatetimeIndex.indexer_between_time : Get just the index locations for
    values between particular times of the day.

Examples
--------
>>> i = pd.date_range('2018-04-09', periods=4, freq='1D20min')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
                     A
2018-04-09 00:00:00  1
2018-04-10 00:20:00  2
2018-04-11 00:40:00  3
2018-04-12 01:00:00  4

>>> ts.between_time('0:15', '0:45')
                     A
2018-04-10 00:20:00  2
2018-04-11 00:40:00  3

You get the times that are *not* between two times by setting
``start_time`` later than ``end_time``:

>>> ts.between_time('0:45', '0:15')
                     A
2018-04-09 00:00:00  1
2018-04-12 01:00:00  4

---
## resample
```python
from generic import resample
```

Resample time-series data.

Convenience method for frequency conversion and resampling of time series.
The object must have a datetime-like index (`DatetimeIndex`, `PeriodIndex`,
or `TimedeltaIndex`), or the caller must pass the label of a datetime-like
series/index to the ``on``/``level`` keyword parameter.

Parameters
----------
rule : DateOffset, Timedelta or str
    The offset string or object representing target conversion.
axis : {{0 or 'index', 1 or 'columns'}}, default 0
    Which axis to use for up- or down-sampling. For `Series` this parameter
    is unused and defaults to 0. Must be
    `DatetimeIndex`, `TimedeltaIndex` or `PeriodIndex`.

    .. deprecated:: 2.0.0
        Use frame.T.resample(...) instead.
closed : {{'right', 'left'}}, default None
    Which side of bin interval is closed. The default is 'left'
    for all frequency offsets except for 'ME', 'YE', 'QE', 'BME',
    'BA', 'BQE', and 'W' which all have a default of 'right'.
label : {{'right', 'left'}}, default None
    Which bin edge label to label bucket with. The default is 'left'
    for all frequency offsets except for 'ME', 'YE', 'QE', 'BME',
    'BA', 'BQE', and 'W' which all have a default of 'right'.
convention : {{'start', 'end', 's', 'e'}}, default 'start'
    For `PeriodIndex` only, controls whether to use the start or
    end of `rule`.

    .. deprecated:: 2.2.0
        Convert PeriodIndex to DatetimeIndex before resampling instead.
kind : {{'timestamp', 'period'}}, optional, default None
    Pass 'timestamp' to convert the resulting index to a
    `DateTimeIndex` or 'period' to convert it to a `PeriodIndex`.
    By default the input representation is retained.

    .. deprecated:: 2.2.0
        Convert index to desired type explicitly instead.

on : str, optional
    For a DataFrame, column to use instead of index for resampling.
    Column must be datetime-like.
level : str or int, optional
    For a MultiIndex, level (name or number) to use for
    resampling. `level` must be datetime-like.
origin : Timestamp or str, default 'start_day'
    The timestamp on which to adjust the grouping. The timezone of origin
    must match the timezone of the index.
    If string, must be one of the following:

    - 'epoch': `origin` is 1970-01-01
    - 'start': `origin` is the first value of the timeseries
    - 'start_day': `origin` is the first day at midnight of the timeseries

    - 'end': `origin` is the last value of the timeseries
    - 'end_day': `origin` is the ceiling midnight of the last day

    .. versionadded:: 1.3.0

    .. note::

        Only takes effect for Tick-frequencies (i.e. fixed frequencies like
        days, hours, and minutes, rather than months or quarters).
offset : Timedelta or str, default is None
    An offset timedelta added to the origin.

group_keys : bool, default False
    Whether to include the group keys in the result index when using
    ``.apply()`` on the resampled object.

    .. versionadded:: 1.5.0

        Not specifying ``group_keys`` will retain values-dependent behavior
        from pandas 1.4 and earlier (see :ref:`pandas 1.5.0 Release notes
        <whatsnew_150.enhancements.resample_group_keys>` for examples).

    .. versionchanged:: 2.0.0

        ``group_keys`` now defaults to ``False``.

Returns
-------
pandas.api.typing.Resampler
    :class:`~pandas.core.Resampler` object.

See Also
--------
Series.resample : Resample a Series.
DataFrame.resample : Resample a DataFrame.
groupby : Group {klass} by mapping, function, label, or list of labels.
asfreq : Reindex a {klass} with the given frequency without grouping.

Notes
-----
See the `user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#resampling>`__
for more.

To learn more about the offset strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#dateoffset-objects>`__.

Examples
--------
Start by creating a series with 9 one minute timestamps.

>>> index = pd.date_range('1/1/2000', periods=9, freq='min')
>>> series = pd.Series(range(9), index=index)
>>> series
2000-01-01 00:00:00    0
2000-01-01 00:01:00    1
2000-01-01 00:02:00    2
2000-01-01 00:03:00    3
2000-01-01 00:04:00    4
2000-01-01 00:05:00    5
2000-01-01 00:06:00    6
2000-01-01 00:07:00    7
2000-01-01 00:08:00    8
Freq: min, dtype: int64

Downsample the series into 3 minute bins and sum the values
of the timestamps falling into a bin.

>>> series.resample('3min').sum()
2000-01-01 00:00:00     3
2000-01-01 00:03:00    12
2000-01-01 00:06:00    21
Freq: 3min, dtype: int64

Downsample the series into 3 minute bins as above, but label each
bin using the right edge instead of the left. Please note that the
value in the bucket used as the label is not included in the bucket,
which it labels. For example, in the original series the
bucket ``2000-01-01 00:03:00`` contains the value 3, but the summed
value in the resampled bucket with the label ``2000-01-01 00:03:00``
does not include 3 (if it did, the summed value would be 6, not 3).

>>> series.resample('3min', label='right').sum()
2000-01-01 00:03:00     3
2000-01-01 00:06:00    12
2000-01-01 00:09:00    21
Freq: 3min, dtype: int64

To include this value close the right side of the bin interval,
as shown below.

>>> series.resample('3min', label='right', closed='right').sum()
2000-01-01 00:00:00     0
2000-01-01 00:03:00     6
2000-01-01 00:06:00    15
2000-01-01 00:09:00    15
Freq: 3min, dtype: int64

Upsample the series into 30 second bins.

>>> series.resample('30s').asfreq()[0:5]   # Select first 5 rows
2000-01-01 00:00:00   0.0
2000-01-01 00:00:30   NaN
2000-01-01 00:01:00   1.0
2000-01-01 00:01:30   NaN
2000-01-01 00:02:00   2.0
Freq: 30s, dtype: float64

Upsample the series into 30 second bins and fill the ``NaN``
values using the ``ffill`` method.

>>> series.resample('30s').ffill()[0:5]
2000-01-01 00:00:00    0
2000-01-01 00:00:30    0
2000-01-01 00:01:00    1
2000-01-01 00:01:30    1
2000-01-01 00:02:00    2
Freq: 30s, dtype: int64

Upsample the series into 30 second bins and fill the
``NaN`` values using the ``bfill`` method.

>>> series.resample('30s').bfill()[0:5]
2000-01-01 00:00:00    0
2000-01-01 00:00:30    1
2000-01-01 00:01:00    1
2000-01-01 00:01:30    2
2000-01-01 00:02:00    2
Freq: 30s, dtype: int64

Pass a custom function via ``apply``

>>> def custom_resampler(arraylike):
...     return np.sum(arraylike) + 5
...
>>> series.resample('3min').apply(custom_resampler)
2000-01-01 00:00:00     8
2000-01-01 00:03:00    17
2000-01-01 00:06:00    26
Freq: 3min, dtype: int64

For DataFrame objects, the keyword `on` can be used to specify the
column instead of the index for resampling.

>>> d = {{'price': [10, 11, 9, 13, 14, 18, 17, 19],
...      'volume': [50, 60, 40, 100, 50, 100, 40, 50]}}
>>> df = pd.DataFrame(d)
>>> df['week_starting'] = pd.date_range('01/01/2018',
...                                     periods=8,
...                                     freq='W')
>>> df
   price  volume week_starting
0     10      50    2018-01-07
1     11      60    2018-01-14
2      9      40    2018-01-21
3     13     100    2018-01-28
4     14      50    2018-02-04
5     18     100    2018-02-11
6     17      40    2018-02-18
7     19      50    2018-02-25
>>> df.resample('ME', on='week_starting').mean()
               price  volume
week_starting
2018-01-31     10.75    62.5
2018-02-28     17.00    60.0

For a DataFrame with MultiIndex, the keyword `level` can be used to
specify on which level the resampling needs to take place.

>>> days = pd.date_range('1/1/2000', periods=4, freq='D')
>>> d2 = {{'price': [10, 11, 9, 13, 14, 18, 17, 19],
...       'volume': [50, 60, 40, 100, 50, 100, 40, 50]}}
>>> df2 = pd.DataFrame(
...     d2,
...     index=pd.MultiIndex.from_product(
...         [days, ['morning', 'afternoon']]
...     )
... )
>>> df2
                      price  volume
2000-01-01 morning       10      50
           afternoon     11      60
2000-01-02 morning        9      40
           afternoon     13     100
2000-01-03 morning       14      50
           afternoon     18     100
2000-01-04 morning       17      40
           afternoon     19      50
>>> df2.resample('D', level=0).sum()
            price  volume
2000-01-01     21     110
2000-01-02     22     140
2000-01-03     32     150
2000-01-04     36      90

If you want to adjust the start of the bins based on a fixed timestamp:

>>> start, end = '2000-10-01 23:30:00', '2000-10-02 00:30:00'
>>> rng = pd.date_range(start, end, freq='7min')
>>> ts = pd.Series(np.arange(len(rng)) * 3, index=rng)
>>> ts
2000-10-01 23:30:00     0
2000-10-01 23:37:00     3
2000-10-01 23:44:00     6
2000-10-01 23:51:00     9
2000-10-01 23:58:00    12
2000-10-02 00:05:00    15
2000-10-02 00:12:00    18
2000-10-02 00:19:00    21
2000-10-02 00:26:00    24
Freq: 7min, dtype: int64

>>> ts.resample('17min').sum()
2000-10-01 23:14:00     0
2000-10-01 23:31:00     9
2000-10-01 23:48:00    21
2000-10-02 00:05:00    54
2000-10-02 00:22:00    24
Freq: 17min, dtype: int64

>>> ts.resample('17min', origin='epoch').sum()
2000-10-01 23:18:00     0
2000-10-01 23:35:00    18
2000-10-01 23:52:00    27
2000-10-02 00:09:00    39
2000-10-02 00:26:00    24
Freq: 17min, dtype: int64

>>> ts.resample('17min', origin='2000-01-01').sum()
2000-10-01 23:24:00     3
2000-10-01 23:41:00    15
2000-10-01 23:58:00    45
2000-10-02 00:15:00    45
Freq: 17min, dtype: int64

If you want to adjust the start of the bins with an `offset` Timedelta, the two
following lines are equivalent:

>>> ts.resample('17min', origin='start').sum()
2000-10-01 23:30:00     9
2000-10-01 23:47:00    21
2000-10-02 00:04:00    54
2000-10-02 00:21:00    24
Freq: 17min, dtype: int64

>>> ts.resample('17min', offset='23h30min').sum()
2000-10-01 23:30:00     9
2000-10-01 23:47:00    21
2000-10-02 00:04:00    54
2000-10-02 00:21:00    24
Freq: 17min, dtype: int64

If you want to take the largest Timestamp as the end of the bins:

>>> ts.resample('17min', origin='end').sum()
2000-10-01 23:35:00     0
2000-10-01 23:52:00    18
2000-10-02 00:09:00    27
2000-10-02 00:26:00    63
Freq: 17min, dtype: int64

In contrast with the `start_day`, you can use `end_day` to take the ceiling
midnight of the largest Timestamp as the end of the bins and drop the bins
not containing data:

>>> ts.resample('17min', origin='end_day').sum()
2000-10-01 23:38:00     3
2000-10-01 23:55:00    15
2000-10-02 00:12:00    45
2000-10-02 00:29:00    45
Freq: 17min, dtype: int64

---
## first
```python
from generic import first
```

Select initial periods of time series data based on a date offset.

.. deprecated:: 2.1
    :meth:`.first` is deprecated and will be removed in a future version.
    Please create a mask and filter using `.loc` instead.

For a DataFrame with a sorted DatetimeIndex, this function can
select the first few rows based on a date offset.

Parameters
----------
offset : str, DateOffset or dateutil.relativedelta
    The offset length of the data that will be selected. For instance,
    '1ME' will display all the rows having their index within the first month.

Returns
-------
Series or DataFrame
    A subset of the caller.

Raises
------
TypeError
    If the index is not  a :class:`DatetimeIndex`

See Also
--------
last : Select final periods of time series based on a date offset.
at_time : Select values at a particular time of the day.
between_time : Select values between particular times of the day.

Examples
--------
>>> i = pd.date_range('2018-04-09', periods=4, freq='2D')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
            A
2018-04-09  1
2018-04-11  2
2018-04-13  3
2018-04-15  4

Get the rows for the first 3 days:

>>> ts.first('3D')
            A
2018-04-09  1
2018-04-11  2

Notice the data for 3 first calendar days were returned, not the first
3 days observed in the dataset, and therefore data for 2018-04-13 was
not returned.

---
## last
```python
from generic import last
```

Select final periods of time series data based on a date offset.

.. deprecated:: 2.1
    :meth:`.last` is deprecated and will be removed in a future version.
    Please create a mask and filter using `.loc` instead.

For a DataFrame with a sorted DatetimeIndex, this function
selects the last few rows based on a date offset.

Parameters
----------
offset : str, DateOffset, dateutil.relativedelta
    The offset length of the data that will be selected. For instance,
    '3D' will display all the rows having their index within the last 3 days.

Returns
-------
Series or DataFrame
    A subset of the caller.

Raises
------
TypeError
    If the index is not  a :class:`DatetimeIndex`

See Also
--------
first : Select initial periods of time series based on a date offset.
at_time : Select values at a particular time of the day.
between_time : Select values between particular times of the day.

Notes
-----
.. deprecated:: 2.1.0
    Please create a mask and filter using `.loc` instead

Examples
--------
>>> i = pd.date_range('2018-04-09', periods=4, freq='2D')
>>> ts = pd.DataFrame({'A': [1, 2, 3, 4]}, index=i)
>>> ts
            A
2018-04-09  1
2018-04-11  2
2018-04-13  3
2018-04-15  4

Get the rows for the last 3 days:

>>> ts.last('3D')  # doctest: +SKIP
            A
2018-04-13  3
2018-04-15  4

Notice the data for 3 last calendar days were returned, not the last
3 observed days in the dataset, and therefore data for 2018-04-11 was
not returned.

---
## rank
```python
from generic import rank
```

Compute numerical data ranks (1 through n) along axis.

By default, equal values are assigned a rank that is the average of the
ranks of those values.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    Index to direct ranking.
    For `Series` this parameter is unused and defaults to 0.
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
    How to rank the group of records that have the same value (i.e. ties):

    * average: average rank of the group
    * min: lowest rank in the group
    * max: highest rank in the group
    * first: ranks assigned in order they appear in the array
    * dense: like 'min', but rank always increases by 1 between groups.

numeric_only : bool, default False
    For DataFrame objects, rank only numeric columns if set to True.

    .. versionchanged:: 2.0.0
        The default value of ``numeric_only`` is now ``False``.

na_option : {'keep', 'top', 'bottom'}, default 'keep'
    How to rank NaN values:

    * keep: assign NaN rank to NaN values
    * top: assign lowest rank to NaN values
    * bottom: assign highest rank to NaN values

ascending : bool, default True
    Whether or not the elements should be ranked in ascending order.
pct : bool, default False
    Whether or not to display the returned rankings in percentile
    form.

Returns
-------
same type as caller
    Return a Series or DataFrame with data ranks as values.

See Also
--------
core.groupby.DataFrameGroupBy.rank : Rank of values within each group.
core.groupby.SeriesGroupBy.rank : Rank of values within each group.

Examples
--------
>>> df = pd.DataFrame(data={'Animal': ['cat', 'penguin', 'dog',
...                                    'spider', 'snake'],
...                         'Number_legs': [4, 2, 4, 8, np.nan]})
>>> df
    Animal  Number_legs
0      cat          4.0
1  penguin          2.0
2      dog          4.0
3   spider          8.0
4    snake          NaN

Ties are assigned the mean of the ranks (by default) for the group.

>>> s = pd.Series(range(5), index=list("abcde"))
>>> s["d"] = s["b"]
>>> s.rank()
a    1.0
b    2.5
c    4.0
d    2.5
e    5.0
dtype: float64

The following example shows how the method behaves with the above
parameters:

* default_rank: this is the default behaviour obtained without using
  any parameter.
* max_rank: setting ``method = 'max'`` the records that have the
  same values are ranked using the highest rank (e.g.: since 'cat'
  and 'dog' are both in the 2nd and 3rd position, rank 3 is assigned.)
* NA_bottom: choosing ``na_option = 'bottom'``, if there are records
  with NaN values they are placed at the bottom of the ranking.
* pct_rank: when setting ``pct = True``, the ranking is expressed as
  percentile rank.

>>> df['default_rank'] = df['Number_legs'].rank()
>>> df['max_rank'] = df['Number_legs'].rank(method='max')
>>> df['NA_bottom'] = df['Number_legs'].rank(na_option='bottom')
>>> df['pct_rank'] = df['Number_legs'].rank(pct=True)
>>> df
    Animal  Number_legs  default_rank  max_rank  NA_bottom  pct_rank
0      cat          4.0           2.5       3.0        2.5     0.625
1  penguin          2.0           1.0       1.0        1.0     0.250
2      dog          4.0           2.5       3.0        2.5     0.625
3   spider          8.0           4.0       4.0        4.0     1.000
4    snake          NaN           NaN       NaN        5.0       NaN

---
## compare
```python
from generic import compare
```



---
## align
```python
from generic import align
```

Align two objects on their axes with the specified join method.

Join method is specified for each axis Index.

Parameters
----------
other : DataFrame or Series
join : {{'outer', 'inner', 'left', 'right'}}, default 'outer'
    Type of alignment to be performed.

    * left: use only keys from left frame, preserve key order.
    * right: use only keys from right frame, preserve key order.
    * outer: use union of keys from both frames, sort keys lexicographically.
    * inner: use intersection of keys from both frames,
      preserve the order of the left keys.

axis : allowed axis of the other object, default None
    Align on index (0), columns (1), or both (None).
level : int or level name, default None
    Broadcast across a level, matching Index values on the
    passed MultiIndex level.
copy : bool, default True
    Always returns new objects. If copy=False and no reindexing is
    required then original objects are returned.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
fill_value : scalar, default np.nan
    Value to use for missing values. Defaults to NaN, but can be any
    "compatible" value.
method : {{'backfill', 'bfill', 'pad', 'ffill', None}}, default None
    Method to use for filling holes in reindexed Series:

    - pad / ffill: propagate last valid observation forward to next valid.
    - backfill / bfill: use NEXT valid observation to fill gap.

    .. deprecated:: 2.1

limit : int, default None
    If method is specified, this is the maximum number of consecutive
    NaN values to forward/backward fill. In other words, if there is
    a gap with more than this number of consecutive NaNs, it will only
    be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled. Must be greater than 0 if not None.

    .. deprecated:: 2.1

fill_axis : {axes_single_arg}, default 0
    Filling axis, method and limit.

    .. deprecated:: 2.1

broadcast_axis : {axes_single_arg}, default None
    Broadcast values along this axis, if aligning two objects of
    different dimensions.

    .. deprecated:: 2.1

Returns
-------
tuple of ({klass}, type of other)
    Aligned objects.

Examples
--------
>>> df = pd.DataFrame(
...     [[1, 2, 3, 4], [6, 7, 8, 9]], columns=["D", "B", "E", "A"], index=[1, 2]
... )
>>> other = pd.DataFrame(
...     [[10, 20, 30, 40], [60, 70, 80, 90], [600, 700, 800, 900]],
...     columns=["A", "B", "C", "D"],
...     index=[2, 3, 4],
... )
>>> df
   D  B  E  A
1  1  2  3  4
2  6  7  8  9
>>> other
    A    B    C    D
2   10   20   30   40
3   60   70   80   90
4  600  700  800  900

Align on columns:

>>> left, right = df.align(other, join="outer", axis=1)
>>> left
   A  B   C  D  E
1  4  2 NaN  1  3
2  9  7 NaN  6  8
>>> right
    A    B    C    D   E
2   10   20   30   40 NaN
3   60   70   80   90 NaN
4  600  700  800  900 NaN

We can also align on the index:

>>> left, right = df.align(other, join="outer", axis=0)
>>> left
    D    B    E    A
1  1.0  2.0  3.0  4.0
2  6.0  7.0  8.0  9.0
3  NaN  NaN  NaN  NaN
4  NaN  NaN  NaN  NaN
>>> right
    A      B      C      D
1    NaN    NaN    NaN    NaN
2   10.0   20.0   30.0   40.0
3   60.0   70.0   80.0   90.0
4  600.0  700.0  800.0  900.0

Finally, the default `axis=None` will align on both index and columns:

>>> left, right = df.align(other, join="outer", axis=None)
>>> left
     A    B   C    D    E
1  4.0  2.0 NaN  1.0  3.0
2  9.0  7.0 NaN  6.0  8.0
3  NaN  NaN NaN  NaN  NaN
4  NaN  NaN NaN  NaN  NaN
>>> right
       A      B      C      D   E
1    NaN    NaN    NaN    NaN NaN
2   10.0   20.0   30.0   40.0 NaN
3   60.0   70.0   80.0   90.0 NaN
4  600.0  700.0  800.0  900.0 NaN

---
## _align_frame
```python
from generic import _align_frame
```



---
## _align_series
```python
from generic import _align_series
```



---
## _where
```python
from generic import _where
```

Equivalent to public method `where`, except that `other` is not
applied as a function even if callable. Used in __setitem__.

---
## where
```python
from generic import where
```

Replace values where the condition is {cond_rev}.

Parameters
----------
cond : bool {klass}, array-like, or callable
    Where `cond` is {cond}, keep the original value. Where
    {cond_rev}, replace with corresponding value from `other`.
    If `cond` is callable, it is computed on the {klass} and
    should return boolean {klass} or array. The callable must
    not change input {klass} (though pandas doesn't check it).
other : scalar, {klass}, or callable
    Entries where `cond` is {cond_rev} are replaced with
    corresponding value from `other`.
    If other is callable, it is computed on the {klass} and
    should return scalar or {klass}. The callable must not
    change input {klass} (though pandas doesn't check it).
    If not specified, entries will be filled with the corresponding
    NULL value (``np.nan`` for numpy dtypes, ``pd.NA`` for extension
    dtypes).
inplace : bool, default False
    Whether to perform the operation in place on the data.
axis : int, default None
    Alignment axis if needed. For `Series` this parameter is
    unused and defaults to 0.
level : int, default None
    Alignment level if needed.

Returns
-------
Same type as caller or None if ``inplace=True``.

See Also
--------
:func:`DataFrame.{name_other}` : Return an object of same shape as
    self.

Notes
-----
The {name} method is an application of the if-then idiom. For each
element in the calling DataFrame, if ``cond`` is ``{cond}`` the
element is used; otherwise the corresponding element from the DataFrame
``other`` is used. If the axis of ``other`` does not align with axis of
``cond`` {klass}, the misaligned index positions will be filled with
{cond_rev}.

The signature for :func:`DataFrame.where` differs from
:func:`numpy.where`. Roughly ``df1.where(m, df2)`` is equivalent to
``np.where(m, df1, df2)``.

For further details and examples see the ``{name}`` documentation in
:ref:`indexing <indexing.where_mask>`.

The dtype of the object takes precedence. The fill value is casted to
the object's dtype, if this can be done losslessly.

Examples
--------
>>> s = pd.Series(range(5))
>>> s.where(s > 0)
0    NaN
1    1.0
2    2.0
3    3.0
4    4.0
dtype: float64
>>> s.mask(s > 0)
0    0.0
1    NaN
2    NaN
3    NaN
4    NaN
dtype: float64

>>> s = pd.Series(range(5))
>>> t = pd.Series([True, False])
>>> s.where(t, 99)
0     0
1    99
2    99
3    99
4    99
dtype: int64
>>> s.mask(t, 99)
0    99
1     1
2    99
3    99
4    99
dtype: int64

>>> s.where(s > 1, 10)
0    10
1    10
2    2
3    3
4    4
dtype: int64
>>> s.mask(s > 1, 10)
0     0
1     1
2    10
3    10
4    10
dtype: int64

>>> df = pd.DataFrame(np.arange(10).reshape(-1, 2), columns=['A', 'B'])
>>> df
   A  B
0  0  1
1  2  3
2  4  5
3  6  7
4  8  9
>>> m = df % 3 == 0
>>> df.where(m, -df)
   A  B
0  0 -1
1 -2  3
2 -4 -5
3  6 -7
4 -8  9
>>> df.where(m, -df) == np.where(m, df, -df)
      A     B
0  True  True
1  True  True
2  True  True
3  True  True
4  True  True
>>> df.where(m, -df) == df.mask(~m, -df)
      A     B
0  True  True
1  True  True
2  True  True
3  True  True
4  True  True

---
## mask
```python
from generic import mask
```



---
## shift
```python
from generic import shift
```

Shift index by desired number of periods with an optional time `freq`.

When `freq` is not passed, shift the index without realigning the data.
If `freq` is passed (in this case, the index must be date or datetime,
or it will raise a `NotImplementedError`), the index will be
increased using the periods and the `freq`. `freq` can be inferred
when specified as "infer" as long as either freq or inferred_freq
attribute is set in the index.

Parameters
----------
periods : int or Sequence
    Number of periods to shift. Can be positive or negative.
    If an iterable of ints, the data will be shifted once by each int.
    This is equivalent to shifting by one value at a time and
    concatenating all resulting frames. The resulting columns will have
    the shift suffixed to their column names. For multiple periods,
    axis must not be 1.
freq : DateOffset, tseries.offsets, timedelta, or str, optional
    Offset to use from the tseries module or time rule (e.g. 'EOM').
    If `freq` is specified then the index values are shifted but the
    data is not realigned. That is, use `freq` if you would like to
    extend the index when shifting and preserve the original data.
    If `freq` is specified as "infer" then it will be inferred from
    the freq or inferred_freq attributes of the index. If neither of
    those attributes exist, a ValueError is thrown.
axis : {{0 or 'index', 1 or 'columns', None}}, default None
    Shift direction. For `Series` this parameter is unused and defaults to 0.
fill_value : object, optional
    The scalar value to use for newly introduced missing values.
    the default depends on the dtype of `self`.
    For numeric data, ``np.nan`` is used.
    For datetime, timedelta, or period data, etc. :attr:`NaT` is used.
    For extension dtypes, ``self.dtype.na_value`` is used.
suffix : str, optional
    If str and periods is an iterable, this is added after the column
    name and before the shift value for each shifted column name.

Returns
-------
{klass}
    Copy of input object, shifted.

See Also
--------
Index.shift : Shift values of Index.
DatetimeIndex.shift : Shift values of DatetimeIndex.
PeriodIndex.shift : Shift values of PeriodIndex.

Examples
--------
>>> df = pd.DataFrame({{"Col1": [10, 20, 15, 30, 45],
...                    "Col2": [13, 23, 18, 33, 48],
...                    "Col3": [17, 27, 22, 37, 52]}},
...                   index=pd.date_range("2020-01-01", "2020-01-05"))
>>> df
            Col1  Col2  Col3
2020-01-01    10    13    17
2020-01-02    20    23    27
2020-01-03    15    18    22
2020-01-04    30    33    37
2020-01-05    45    48    52

>>> df.shift(periods=3)
            Col1  Col2  Col3
2020-01-01   NaN   NaN   NaN
2020-01-02   NaN   NaN   NaN
2020-01-03   NaN   NaN   NaN
2020-01-04  10.0  13.0  17.0
2020-01-05  20.0  23.0  27.0

>>> df.shift(periods=1, axis="columns")
            Col1  Col2  Col3
2020-01-01   NaN    10    13
2020-01-02   NaN    20    23
2020-01-03   NaN    15    18
2020-01-04   NaN    30    33
2020-01-05   NaN    45    48

>>> df.shift(periods=3, fill_value=0)
            Col1  Col2  Col3
2020-01-01     0     0     0
2020-01-02     0     0     0
2020-01-03     0     0     0
2020-01-04    10    13    17
2020-01-05    20    23    27

>>> df.shift(periods=3, freq="D")
            Col1  Col2  Col3
2020-01-04    10    13    17
2020-01-05    20    23    27
2020-01-06    15    18    22
2020-01-07    30    33    37
2020-01-08    45    48    52

>>> df.shift(periods=3, freq="infer")
            Col1  Col2  Col3
2020-01-04    10    13    17
2020-01-05    20    23    27
2020-01-06    15    18    22
2020-01-07    30    33    37
2020-01-08    45    48    52

>>> df['Col1'].shift(periods=[0, 1, 2])
            Col1_0  Col1_1  Col1_2
2020-01-01      10     NaN     NaN
2020-01-02      20    10.0     NaN
2020-01-03      15    20.0    10.0
2020-01-04      30    15.0    20.0
2020-01-05      45    30.0    15.0

---
## _shift_with_freq
```python
from generic import _shift_with_freq
```



---
## truncate
```python
from generic import truncate
```

Truncate a Series or DataFrame before and after some index value.

This is a useful shorthand for boolean indexing based on index
values above or below certain thresholds.

Parameters
----------
before : date, str, int
    Truncate all rows before this index value.
after : date, str, int
    Truncate all rows after this index value.
axis : {0 or 'index', 1 or 'columns'}, optional
    Axis to truncate. Truncates the index (rows) by default.
    For `Series` this parameter is unused and defaults to 0.
copy : bool, default is True,
    Return a copy of the truncated section.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
type of caller
    The truncated Series or DataFrame.

See Also
--------
DataFrame.loc : Select a subset of a DataFrame by label.
DataFrame.iloc : Select a subset of a DataFrame by position.

Notes
-----
If the index being truncated contains only datetime values,
`before` and `after` may be specified as strings instead of
Timestamps.

Examples
--------
>>> df = pd.DataFrame({'A': ['a', 'b', 'c', 'd', 'e'],
...                    'B': ['f', 'g', 'h', 'i', 'j'],
...                    'C': ['k', 'l', 'm', 'n', 'o']},
...                   index=[1, 2, 3, 4, 5])
>>> df
   A  B  C
1  a  f  k
2  b  g  l
3  c  h  m
4  d  i  n
5  e  j  o

>>> df.truncate(before=2, after=4)
   A  B  C
2  b  g  l
3  c  h  m
4  d  i  n

The columns of a DataFrame can be truncated.

>>> df.truncate(before="A", after="B", axis="columns")
   A  B
1  a  f
2  b  g
3  c  h
4  d  i
5  e  j

For Series, only rows can be truncated.

>>> df['A'].truncate(before=2, after=4)
2    b
3    c
4    d
Name: A, dtype: object

The index values in ``truncate`` can be datetimes or string
dates.

>>> dates = pd.date_range('2016-01-01', '2016-02-01', freq='s')
>>> df = pd.DataFrame(index=dates, data={'A': 1})
>>> df.tail()
                     A
2016-01-31 23:59:56  1
2016-01-31 23:59:57  1
2016-01-31 23:59:58  1
2016-01-31 23:59:59  1
2016-02-01 00:00:00  1

>>> df.truncate(before=pd.Timestamp('2016-01-05'),
...             after=pd.Timestamp('2016-01-10')).tail()
                     A
2016-01-09 23:59:56  1
2016-01-09 23:59:57  1
2016-01-09 23:59:58  1
2016-01-09 23:59:59  1
2016-01-10 00:00:00  1

Because the index is a DatetimeIndex containing only dates, we can
specify `before` and `after` as strings. They will be coerced to
Timestamps before truncation.

>>> df.truncate('2016-01-05', '2016-01-10').tail()
                     A
2016-01-09 23:59:56  1
2016-01-09 23:59:57  1
2016-01-09 23:59:58  1
2016-01-09 23:59:59  1
2016-01-10 00:00:00  1

Note that ``truncate`` assumes a 0 value for any unspecified time
component (midnight). This differs from partial string slicing, which
returns any partially matching dates.

>>> df.loc['2016-01-05':'2016-01-10', :].tail()
                     A
2016-01-10 23:59:55  1
2016-01-10 23:59:56  1
2016-01-10 23:59:57  1
2016-01-10 23:59:58  1
2016-01-10 23:59:59  1

---
## tz_convert
```python
from generic import tz_convert
```

Convert tz-aware axis to target time zone.

Parameters
----------
tz : str or tzinfo object or None
    Target time zone. Passing ``None`` will convert to
    UTC and remove the timezone information.
axis : {{0 or 'index', 1 or 'columns'}}, default 0
    The axis to convert
level : int, str, default None
    If axis is a MultiIndex, convert a specific level. Otherwise
    must be None.
copy : bool, default True
    Also make a copy of the underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
{klass}
    Object with time zone converted axis.

Raises
------
TypeError
    If the axis is tz-naive.

Examples
--------
Change to another time zone:

>>> s = pd.Series(
...     [1],
...     index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']),
... )
>>> s.tz_convert('Asia/Shanghai')
2018-09-15 07:30:00+08:00    1
dtype: int64

Pass None to convert to UTC and get a tz-naive index:

>>> s = pd.Series([1],
...               index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']))
>>> s.tz_convert(None)
2018-09-14 23:30:00    1
dtype: int64

---
## tz_localize
```python
from generic import tz_localize
```

Localize tz-naive index of a Series or DataFrame to target time zone.

This operation localizes the Index. To localize the values in a
timezone-naive Series, use :meth:`Series.dt.tz_localize`.

Parameters
----------
tz : str or tzinfo or None
    Time zone to localize. Passing ``None`` will remove the
    time zone information and preserve local time.
axis : {{0 or 'index', 1 or 'columns'}}, default 0
    The axis to localize
level : int, str, default None
    If axis ia a MultiIndex, localize a specific level. Otherwise
    must be None.
copy : bool, default True
    Also make a copy of the underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
    When clocks moved backward due to DST, ambiguous times may arise.
    For example in Central European Time (UTC+01), when going from
    03:00 DST to 02:00 non-DST, 02:30:00 local time occurs both at
    00:30:00 UTC and at 01:30:00 UTC. In such a situation, the
    `ambiguous` parameter dictates how ambiguous times should be
    handled.

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False designates
      a non-DST time (note that this flag is only applicable for
      ambiguous times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise an AmbiguousTimeError if there are ambiguous
      times.
nonexistent : str, default 'raise'
    A nonexistent time does not exist in a particular timezone
    where clocks moved forward due to DST. Valid values are:

    - 'shift_forward' will shift the nonexistent time forward to the
      closest existing time
    - 'shift_backward' will shift the nonexistent time backward to the
      closest existing time
    - 'NaT' will return NaT where there are nonexistent times
    - timedelta objects will shift nonexistent times by the timedelta
    - 'raise' will raise an NonExistentTimeError if there are
      nonexistent times.

Returns
-------
{klass}
    Same type as the input.

Raises
------
TypeError
    If the TimeSeries is tz-aware and tz is not None.

Examples
--------
Localize local times:

>>> s = pd.Series(
...     [1],
...     index=pd.DatetimeIndex(['2018-09-15 01:30:00']),
... )
>>> s.tz_localize('CET')
2018-09-15 01:30:00+02:00    1
dtype: int64

Pass None to convert to tz-naive index and preserve local time:

>>> s = pd.Series([1],
...               index=pd.DatetimeIndex(['2018-09-15 01:30:00+02:00']))
>>> s.tz_localize(None)
2018-09-15 01:30:00    1
dtype: int64

Be careful with DST changes. When there is sequential data, pandas
can infer the DST time:

>>> s = pd.Series(range(7),
...               index=pd.DatetimeIndex(['2018-10-28 01:30:00',
...                                       '2018-10-28 02:00:00',
...                                       '2018-10-28 02:30:00',
...                                       '2018-10-28 02:00:00',
...                                       '2018-10-28 02:30:00',
...                                       '2018-10-28 03:00:00',
...                                       '2018-10-28 03:30:00']))
>>> s.tz_localize('CET', ambiguous='infer')
2018-10-28 01:30:00+02:00    0
2018-10-28 02:00:00+02:00    1
2018-10-28 02:30:00+02:00    2
2018-10-28 02:00:00+01:00    3
2018-10-28 02:30:00+01:00    4
2018-10-28 03:00:00+01:00    5
2018-10-28 03:30:00+01:00    6
dtype: int64

In some cases, inferring the DST is impossible. In such cases, you can
pass an ndarray to the ambiguous parameter to set the DST explicitly

>>> s = pd.Series(range(3),
...               index=pd.DatetimeIndex(['2018-10-28 01:20:00',
...                                       '2018-10-28 02:36:00',
...                                       '2018-10-28 03:46:00']))
>>> s.tz_localize('CET', ambiguous=np.array([True, True, False]))
2018-10-28 01:20:00+02:00    0
2018-10-28 02:36:00+02:00    1
2018-10-28 03:46:00+01:00    2
dtype: int64

If the DST transition causes nonexistent times, you can shift these
dates forward or backward with a timedelta object or `'shift_forward'`
or `'shift_backward'`.

>>> s = pd.Series(range(2),
...               index=pd.DatetimeIndex(['2015-03-29 02:30:00',
...                                       '2015-03-29 03:30:00']))
>>> s.tz_localize('Europe/Warsaw', nonexistent='shift_forward')
2015-03-29 03:00:00+02:00    0
2015-03-29 03:30:00+02:00    1
dtype: int64
>>> s.tz_localize('Europe/Warsaw', nonexistent='shift_backward')
2015-03-29 01:59:59.999999999+01:00    0
2015-03-29 03:30:00+02:00              1
dtype: int64
>>> s.tz_localize('Europe/Warsaw', nonexistent=pd.Timedelta('1h'))
2015-03-29 03:30:00+02:00    0
2015-03-29 03:30:00+02:00    1
dtype: int64

---
## describe
```python
from generic import describe
```



---
## pct_change
```python
from generic import pct_change
```

Fractional change between the current and a prior element.

Computes the fractional change from the immediately previous row by
default. This is useful in comparing the fraction of change in a time
series of elements.

.. note::

    Despite the name of this method, it calculates fractional change
    (also known as per unit change or relative change) and not
    percentage change. If you need the percentage change, multiply
    these values by 100.

Parameters
----------
periods : int, default 1
    Periods to shift for forming percent change.
fill_method : {'backfill', 'bfill', 'pad', 'ffill', None}, default 'pad'
    How to handle NAs **before** computing percent changes.

    .. deprecated:: 2.1
        All options of `fill_method` are deprecated except `fill_method=None`.

limit : int, default None
    The number of consecutive NAs to fill before stopping.

    .. deprecated:: 2.1

freq : DateOffset, timedelta, or str, optional
    Increment to use from time series API (e.g. 'ME' or BDay()).
**kwargs
    Additional keyword arguments are passed into
    `DataFrame.shift` or `Series.shift`.

Returns
-------
Series or DataFrame
    The same type as the calling object.

See Also
--------
Series.diff : Compute the difference of two elements in a Series.
DataFrame.diff : Compute the difference of two elements in a DataFrame.
Series.shift : Shift the index by some number of periods.
DataFrame.shift : Shift the index by some number of periods.

Examples
--------
**Series**

>>> s = pd.Series([90, 91, 85])
>>> s
0    90
1    91
2    85
dtype: int64

>>> s.pct_change()
0         NaN
1    0.011111
2   -0.065934
dtype: float64

>>> s.pct_change(periods=2)
0         NaN
1         NaN
2   -0.055556
dtype: float64

See the percentage change in a Series where filling NAs with last
valid observation forward to next valid.

>>> s = pd.Series([90, 91, None, 85])
>>> s
0    90.0
1    91.0
2     NaN
3    85.0
dtype: float64

>>> s.ffill().pct_change()
0         NaN
1    0.011111
2    0.000000
3   -0.065934
dtype: float64

**DataFrame**

Percentage change in French franc, Deutsche Mark, and Italian lira from
1980-01-01 to 1980-03-01.

>>> df = pd.DataFrame({
...     'FR': [4.0405, 4.0963, 4.3149],
...     'GR': [1.7246, 1.7482, 1.8519],
...     'IT': [804.74, 810.01, 860.13]},
...     index=['1980-01-01', '1980-02-01', '1980-03-01'])
>>> df
                FR      GR      IT
1980-01-01  4.0405  1.7246  804.74
1980-02-01  4.0963  1.7482  810.01
1980-03-01  4.3149  1.8519  860.13

>>> df.pct_change()
                  FR        GR        IT
1980-01-01       NaN       NaN       NaN
1980-02-01  0.013810  0.013684  0.006549
1980-03-01  0.053365  0.059318  0.061876

Percentage of change in GOOG and APPL stock volume. Shows computing
the percentage change between columns.

>>> df = pd.DataFrame({
...     '2016': [1769950, 30586265],
...     '2015': [1500923, 40912316],
...     '2014': [1371819, 41403351]},
...     index=['GOOG', 'APPL'])
>>> df
          2016      2015      2014
GOOG   1769950   1500923   1371819
APPL  30586265  40912316  41403351

>>> df.pct_change(axis='columns', periods=-1)
          2016      2015  2014
GOOG  0.179241  0.094112   NaN
APPL -0.252395 -0.011860   NaN

---
## _logical_func
```python
from generic import _logical_func
```



---
## any
```python
from generic import any
```



---
## all
```python
from generic import all
```



---
## _accum_func
```python
from generic import _accum_func
```



---
## cummax
```python
from generic import cummax
```



---
## cummin
```python
from generic import cummin
```



---
## cumsum
```python
from generic import cumsum
```



---
## cumprod
```python
from generic import cumprod
```



---
## _stat_function_ddof
```python
from generic import _stat_function_ddof
```



---
## sem
```python
from generic import sem
```



---
## var
```python
from generic import var
```



---
## std
```python
from generic import std
```



---
## _stat_function
```python
from generic import _stat_function
```



---
## min
```python
from generic import min
```



---
## max
```python
from generic import max
```



---
## mean
```python
from generic import mean
```



---
## median
```python
from generic import median
```



---
## skew
```python
from generic import skew
```

Return unbiased skew within groups.

Normalized by N-1.

Parameters
----------
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Axis for the function to be applied on.

    Specifying ``axis=None`` will apply the aggregation across both axes.

    .. versionadded:: 2.0.0

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

skipna : bool, default True
    Exclude NA/null values when computing the result.

numeric_only : bool, default False
    Include only float, int, boolean columns.

**kwargs
    Additional keyword arguments to be passed to the function.

Returns
-------
DataFrame

See Also
--------
DataFrame.skew : Return unbiased skew over requested axis.

Examples
--------
>>> arrays = [['falcon', 'parrot', 'cockatoo', 'kiwi',
...            'lion', 'monkey', 'rabbit'],
...           ['bird', 'bird', 'bird', 'bird',
...            'mammal', 'mammal', 'mammal']]
>>> index = pd.MultiIndex.from_arrays(arrays, names=('name', 'class'))
>>> df = pd.DataFrame({'max_speed': [389.0, 24.0, 70.0, np.nan,
...                                  80.5, 21.5, 15.0]},
...                   index=index)
>>> df
                max_speed
name     class
falcon   bird        389.0
parrot   bird         24.0
cockatoo bird         70.0
kiwi     bird          NaN
lion     mammal       80.5
monkey   mammal       21.5
rabbit   mammal       15.0
>>> gb = df.groupby(["class"])
>>> gb.skew()
        max_speed
class
bird     1.628296
mammal   1.669046
>>> gb.skew(skipna=False)
        max_speed
class
bird          NaN
mammal   1.669046

---
## kurt
```python
from generic import kurt
```



---
## _min_count_stat_function
```python
from generic import _min_count_stat_function
```



---
## sum
```python
from generic import sum
```



---
## prod
```python
from generic import prod
```



---
## rolling
```python
from generic import rolling
```



---
## expanding
```python
from generic import expanding
```



---
## ewm
```python
from generic import ewm
```



---
## _inplace_method
```python
from generic import _inplace_method
```

Wrap arithmetic method to operate inplace.

---
## __iadd__
```python
from generic import __iadd__
```



---
## __isub__
```python
from generic import __isub__
```



---
## __imul__
```python
from generic import __imul__
```



---
## __itruediv__
```python
from generic import __itruediv__
```



---
## __ifloordiv__
```python
from generic import __ifloordiv__
```



---
## __imod__
```python
from generic import __imod__
```



---
## __ipow__
```python
from generic import __ipow__
```



---
## __iand__
```python
from generic import __iand__
```



---
## __ior__
```python
from generic import __ior__
```



---
## __ixor__
```python
from generic import __ixor__
```



---
## _find_valid_index
```python
from generic import _find_valid_index
```

Retrieves the index of the first valid value.

Parameters
----------
how : {'first', 'last'}
    Use this parameter to change between the first or last valid index.

Returns
-------
idx_first_valid : type of index

---
## first_valid_index
```python
from generic import first_valid_index
```

Return index for {position} non-NA value or None, if no non-NA value is found.

Returns
-------
type of index

Examples
--------
For Series:

>>> s = pd.Series([None, 3, 4])
>>> s.first_valid_index()
1
>>> s.last_valid_index()
2

>>> s = pd.Series([None, None])
>>> print(s.first_valid_index())
None
>>> print(s.last_valid_index())
None

If all elements in Series are NA/null, returns None.

>>> s = pd.Series()
>>> print(s.first_valid_index())
None
>>> print(s.last_valid_index())
None

If Series is empty, returns None.

For DataFrame:

>>> df = pd.DataFrame({{'A': [None, None, 2], 'B': [None, 3, 4]}})
>>> df
     A      B
0  NaN    NaN
1  NaN    3.0
2  2.0    4.0
>>> df.first_valid_index()
1
>>> df.last_valid_index()
2

>>> df = pd.DataFrame({{'A': [None, None, None], 'B': [None, None, None]}})
>>> df
     A      B
0  None   None
1  None   None
2  None   None
>>> print(df.first_valid_index())
None
>>> print(df.last_valid_index())
None

If all elements in DataFrame are NA/null, returns None.

>>> df = pd.DataFrame()
>>> df
Empty DataFrame
Columns: []
Index: []
>>> print(df.first_valid_index())
None
>>> print(df.last_valid_index())
None

If DataFrame is empty, returns None.

---
## last_valid_index
```python
from generic import last_valid_index
```



---
## blk_func
```python
from generic import blk_func
```



---
## _wrap
```python
from generic import _wrap
```



---
## f
```python
from generic import f
```



---
## ranker
```python
from generic import ranker
```



---
## _tz_convert
```python
from generic import _tz_convert
```



---
## _tz_localize
```python
from generic import _tz_localize
```



---
## block_accum_func
```python
from generic import block_accum_func
```



---
## _coerce_method
```python
from series import _coerce_method
```

Install the scalar coercion methods.

---
## wrapper
```python
from series import wrapper
```



---
## _init_dict
```python
from series import _init_dict
```

Derive the "_mgr" and "index" attributes of a new Series from a
dictionary input.

Parameters
----------
data : dict or dict-like
    Data used to populate the new Series.
index : Index or None, default None
    Index for the new Series: if None, use dict keys.
dtype : np.dtype, ExtensionDtype, or None, default None
    The dtype for the new Series: if None, infer from data.

Returns
-------
_data : BlockManager for the new Series
index : index for the new Series

---
## _constructor
```python
from series import _constructor
```



---
## _constructor_from_mgr
```python
from series import _constructor_from_mgr
```



---
## _constructor_expanddim
```python
from series import _constructor_expanddim
```

Used when a manipulation result has one higher dimension as the
original, such as Series.to_frame()

---
## _constructor_expanddim_from_mgr
```python
from series import _constructor_expanddim_from_mgr
```



---
## _can_hold_na
```python
from series import _can_hold_na
```



---
## dtypes
```python
from series import dtypes
```

Return the dtype object of the underlying data.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.dtypes
dtype('int64')

---
## values
```python
from series import values
```

Return Series as ndarray or ndarray-like depending on the dtype.

.. warning::

   We recommend using :attr:`Series.array` or
   :meth:`Series.to_numpy`, depending on whether you need
   a reference to the underlying data or a NumPy array.

Returns
-------
numpy.ndarray or ndarray-like

See Also
--------
Series.array : Reference to the underlying data.
Series.to_numpy : A NumPy array representing the underlying data.

Examples
--------
>>> pd.Series([1, 2, 3]).values
array([1, 2, 3])

>>> pd.Series(list('aabc')).values
array(['a', 'a', 'b', 'c'], dtype=object)

>>> pd.Series(list('aabc')).astype('category').values
['a', 'a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']

Timezone aware datetime data is converted to UTC:

>>> pd.Series(pd.date_range('20130101', periods=3,
...                         tz='US/Eastern')).values
array(['2013-01-01T05:00:00.000000000',
       '2013-01-02T05:00:00.000000000',
       '2013-01-03T05:00:00.000000000'], dtype='datetime64[ns]')

---
## _values
```python
from series import _values
```

Return the internal repr of this data (defined by Block.interval_values).
This are the values as stored in the Block (ndarray or ExtensionArray
depending on the Block class), with datetime64[ns] and timedelta64[ns]
wrapped in ExtensionArrays to match Index._values behavior.

Differs from the public ``.values`` for certain data types, because of
historical backwards compatibility of the public attribute (e.g. period
returns object ndarray and datetimetz a datetime64[ns] ndarray for
``.values`` while it returns an ExtensionArray for ``._values`` in those
cases).

Differs from ``.array`` in that this still returns the numpy array if
the Block is backed by a numpy array (except for datetime64 and
timedelta64 dtypes), while ``.array`` ensures to always return an
ExtensionArray.

Overview:

dtype       | values        | _values       | array                 |
----------- | ------------- | ------------- | --------------------- |
Numeric     | ndarray       | ndarray       | NumpyExtensionArray   |
Category    | Categorical   | Categorical   | Categorical           |
dt64[ns]    | ndarray[M8ns] | DatetimeArray | DatetimeArray         |
dt64[ns tz] | ndarray[M8ns] | DatetimeArray | DatetimeArray         |
td64[ns]    | ndarray[m8ns] | TimedeltaArray| TimedeltaArray        |
Period      | ndarray[obj]  | PeriodArray   | PeriodArray           |
Nullable    | EA            | EA            | EA                    |

---
## _references
```python
from series import _references
```



---
## array
```python
from series import array
```



---
## ravel
```python
from series import ravel
```

Return the flattened underlying data as an ndarray or ExtensionArray.

.. deprecated:: 2.2.0
    Series.ravel is deprecated. The underlying array is already 1D, so
    ravel is not necessary.  Use :meth:`to_numpy` for conversion to a numpy
    array instead.

Returns
-------
numpy.ndarray or ExtensionArray
    Flattened data of the Series.

See Also
--------
numpy.ndarray.ravel : Return a flattened array.

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.ravel()  # doctest: +SKIP
array([1, 2, 3])

---
## view
```python
from series import view
```

Create a new view of the Series.

.. deprecated:: 2.2.0
    ``Series.view`` is deprecated and will be removed in a future version.
    Use :meth:`Series.astype` as an alternative to change the dtype.

This function will return a new Series with a view of the same
underlying values in memory, optionally reinterpreted with a new data
type. The new data type must preserve the same size in bytes as to not
cause index misalignment.

Parameters
----------
dtype : data type
    Data type object or one of their string representations.

Returns
-------
Series
    A new Series object as a view of the same data in memory.

See Also
--------
numpy.ndarray.view : Equivalent numpy function to create a new view of
    the same data in memory.

Notes
-----
Series are instantiated with ``dtype=float64`` by default. While
``numpy.ndarray.view()`` will return a view with the same data type as
the original array, ``Series.view()`` (without specified dtype)
will try using ``float64`` and may fail if the original data type size
in bytes is not the same.

Examples
--------
Use ``astype`` to change the dtype instead.

---
## __column_consortium_standard__
```python
from series import __column_consortium_standard__
```

Provide entry point to the Consortium DataFrame Standard API.

This is developed and maintained outside of pandas.
Please report any issues to https://github.com/data-apis/dataframe-api-compat.

---
## axes
```python
from series import axes
```

Return a list of the row axis labels.

---
## _ixs
```python
from series import _ixs
```

Return the i-th value or values in the Series by location.

Parameters
----------
i : int

Returns
-------
scalar

---
## _slice
```python
from series import _slice
```



---
## _get_with
```python
from series import _get_with
```



---
## _get_values_tuple
```python
from series import _get_values_tuple
```



---
## _get_rows_with_mask
```python
from series import _get_rows_with_mask
```



---
## _get_value
```python
from series import _get_value
```

Quickly retrieve single value at passed index label.

Parameters
----------
label : object
takeable : interpret the index as indexers, default False

Returns
-------
scalar value

---
## __setitem__
```python
from series import __setitem__
```



---
## _set_with_engine
```python
from series import _set_with_engine
```



---
## _set_with
```python
from series import _set_with
```



---
## _set_labels
```python
from series import _set_labels
```



---
## _set_values
```python
from series import _set_values
```



---
## _set_value
```python
from series import _set_value
```

Quickly set single value at passed label.

If label is not contained, a new object is created with the label
placed at the end of the result index.

Parameters
----------
label : object
    Partial indexing with MultiIndex not allowed.
value : object
    Scalar value.
takeable : interpret the index as indexers, default False

---
## _is_cached
```python
from series import _is_cached
```

Return boolean indicating if self is cached or not.

---
## _get_cacher
```python
from series import _get_cacher
```

return my cacher or None

---
## _reset_cacher
```python
from series import _reset_cacher
```

Reset the cacher.

---
## _set_as_cached
```python
from series import _set_as_cached
```

Set the _cacher attribute on the calling object with a weakref to
cacher.

---
## _clear_item_cache
```python
from series import _clear_item_cache
```



---
## _check_is_chained_assignment_possible
```python
from series import _check_is_chained_assignment_possible
```

See NDFrame._check_is_chained_assignment_possible.__doc__

---
## _maybe_update_cacher
```python
from series import _maybe_update_cacher
```

See NDFrame._maybe_update_cacher.__doc__

---
## repeat
```python
from series import repeat
```

Repeat elements of a Series.

Returns a new Series where each element of the current Series
is repeated consecutively a given number of times.

Parameters
----------
repeats : int or array of ints
    The number of repetitions for each element. This should be a
    non-negative integer. Repeating 0 times will return an empty
    Series.
axis : None
    Unused. Parameter needed for compatibility with DataFrame.

Returns
-------
Series
    Newly created Series with repeated elements.

See Also
--------
Index.repeat : Equivalent function for Index.
numpy.repeat : Similar method for :class:`numpy.ndarray`.

Examples
--------
>>> s = pd.Series(['a', 'b', 'c'])
>>> s
0    a
1    b
2    c
dtype: object
>>> s.repeat(2)
0    a
0    a
1    b
1    b
2    c
2    c
dtype: object
>>> s.repeat([1, 2, 3])
0    a
1    b
1    b
2    c
2    c
2    c
dtype: object

---
## reset_index
```python
from series import reset_index
```

Generate a new DataFrame or Series with the index reset.

This is useful when the index needs to be treated as a column, or
when the index is meaningless and needs to be reset to the default
before another operation.

Parameters
----------
level : int, str, tuple, or list, default optional
    For a Series with a MultiIndex, only remove the specified levels
    from the index. Removes all levels by default.
drop : bool, default False
    Just reset the index, without inserting it as a column in
    the new DataFrame.
name : object, optional
    The name to use for the column containing the original Series
    values. Uses ``self.name`` by default. This argument is ignored
    when `drop` is True.
inplace : bool, default False
    Modify the Series in place (do not create a new object).
allow_duplicates : bool, default False
    Allow duplicate column labels to be created.

    .. versionadded:: 1.5.0

Returns
-------
Series or DataFrame or None
    When `drop` is False (the default), a DataFrame is returned.
    The newly created columns will come first in the DataFrame,
    followed by the original Series values.
    When `drop` is True, a `Series` is returned.
    In either case, if ``inplace=True``, no value is returned.

See Also
--------
DataFrame.reset_index: Analogous function for DataFrame.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4], name='foo',
...               index=pd.Index(['a', 'b', 'c', 'd'], name='idx'))

Generate a DataFrame with default index.

>>> s.reset_index()
  idx  foo
0   a    1
1   b    2
2   c    3
3   d    4

To specify the name of the new column use `name`.

>>> s.reset_index(name='values')
  idx  values
0   a       1
1   b       2
2   c       3
3   d       4

To generate a new Series with the default set `drop` to True.

>>> s.reset_index(drop=True)
0    1
1    2
2    3
3    4
Name: foo, dtype: int64

The `level` parameter is interesting for Series with a multi-level
index.

>>> arrays = [np.array(['bar', 'bar', 'baz', 'baz']),
...           np.array(['one', 'two', 'one', 'two'])]
>>> s2 = pd.Series(
...     range(4), name='foo',
...     index=pd.MultiIndex.from_arrays(arrays,
...                                     names=['a', 'b']))

To remove a specific level from the Index, use `level`.

>>> s2.reset_index(level='a')
       a  foo
b
one  bar    0
two  bar    1
one  baz    2
two  baz    3

If `level` is not set, all levels are removed from the Index.

>>> s2.reset_index()
     a    b  foo
0  bar  one    0
1  bar  two    1
2  baz  one    2
3  baz  two    3

---
## to_markdown
```python
from series import to_markdown
```

Print {klass} in Markdown-friendly format.

Parameters
----------
buf : str, Path or StringIO-like, optional, default None
    Buffer to write to. If None, the output is returned as a string.
mode : str, optional
    Mode in which file is opened, "wt" by default.
index : bool, optional, default True
    Add index (row) labels.

{storage_options}

**kwargs
    These parameters will be passed to `tabulate                 <https://pypi.org/project/tabulate>`_.

Returns
-------
str
    {klass} in Markdown-friendly format.

Notes
-----
Requires the `tabulate <https://pypi.org/project/tabulate>`_ package.

{examples}

---
## items
```python
from series import items
```

Lazily iterate over (index, value) tuples.

This method returns an iterable tuple (index, value). This is
convenient if you want to create a lazy iterator.

Returns
-------
iterable
    Iterable of tuples containing the (index, value) pairs from a
    Series.

See Also
--------
DataFrame.items : Iterate over (column name, Series) pairs.
DataFrame.iterrows : Iterate over DataFrame rows as (index, Series) pairs.

Examples
--------
>>> s = pd.Series(['A', 'B', 'C'])
>>> for index, value in s.items():
...     print(f"Index : {index}, Value : {value}")
Index : 0, Value : A
Index : 1, Value : B
Index : 2, Value : C

---
## keys
```python
from series import keys
```

Return alias for index.

Returns
-------
Index
    Index of the Series.

Examples
--------
>>> s = pd.Series([1, 2, 3], index=[0, 1, 2])
>>> s.keys()
Index([0, 1, 2], dtype='int64')

---
## to_dict
```python
from series import to_dict
```

Convert Series to {label -> value} dict or dict-like object.

Parameters
----------
into : class, default dict
    The collections.abc.MutableMapping subclass to use as the return
    object. Can be the actual class or an empty instance of the mapping
    type you want.  If you want a collections.defaultdict, you must
    pass it initialized.

Returns
-------
collections.abc.MutableMapping
    Key-value representation of Series.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4])
>>> s.to_dict()
{0: 1, 1: 2, 2: 3, 3: 4}
>>> from collections import OrderedDict, defaultdict
>>> s.to_dict(into=OrderedDict)
OrderedDict([(0, 1), (1, 2), (2, 3), (3, 4)])
>>> dd = defaultdict(list)
>>> s.to_dict(into=dd)
defaultdict(<class 'list'>, {0: 1, 1: 2, 2: 3, 3: 4})

---
## _set_name
```python
from series import _set_name
```

Set the Series name.

Parameters
----------
name : str
inplace : bool
    Whether to modify `self` directly or return a copy.
deep : bool|None, default None
    Whether to do a deep copy, a shallow copy, or Copy on Write(None)

---
## groupby
```python
from series import groupby
```



---
## drop_duplicates
```python
from series import drop_duplicates
```

Return Series with duplicate values removed.

Parameters
----------
keep : {'first', 'last', ``False``}, default 'first'
    Method to handle dropping duplicates:

    - 'first' : Drop duplicates except for the first occurrence.
    - 'last' : Drop duplicates except for the last occurrence.
    - ``False`` : Drop all duplicates.

inplace : bool, default ``False``
    If ``True``, performs operation inplace and returns None.

ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

    .. versionadded:: 2.0.0

Returns
-------
Series or None
    Series with duplicates dropped or None if ``inplace=True``.

See Also
--------
Index.drop_duplicates : Equivalent method on Index.
DataFrame.drop_duplicates : Equivalent method on DataFrame.
Series.duplicated : Related method on Series, indicating duplicate
    Series values.
Series.unique : Return unique values as an array.

Examples
--------
Generate a Series with duplicated entries.

>>> s = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama', 'hippo'],
...               name='animal')
>>> s
0     llama
1       cow
2     llama
3    beetle
4     llama
5     hippo
Name: animal, dtype: object

With the 'keep' parameter, the selection behaviour of duplicated values
can be changed. The value 'first' keeps the first occurrence for each
set of duplicated entries. The default value of keep is 'first'.

>>> s.drop_duplicates()
0     llama
1       cow
3    beetle
5     hippo
Name: animal, dtype: object

The value 'last' for parameter 'keep' keeps the last occurrence for
each set of duplicated entries.

>>> s.drop_duplicates(keep='last')
1       cow
3    beetle
4     llama
5     hippo
Name: animal, dtype: object

The value ``False`` for parameter 'keep' discards all sets of
duplicated entries.

>>> s.drop_duplicates(keep=False)
1       cow
3    beetle
5     hippo
Name: animal, dtype: object

---
## duplicated
```python
from series import duplicated
```

Indicate duplicate Series values.

Duplicated values are indicated as ``True`` values in the resulting
Series. Either all duplicates, all except the first or all except the
last occurrence of duplicates can be indicated.

Parameters
----------
keep : {'first', 'last', False}, default 'first'
    Method to handle dropping duplicates:

    - 'first' : Mark duplicates as ``True`` except for the first
      occurrence.
    - 'last' : Mark duplicates as ``True`` except for the last
      occurrence.
    - ``False`` : Mark all duplicates as ``True``.

Returns
-------
Series[bool]
    Series indicating whether each value has occurred in the
    preceding values.

See Also
--------
Index.duplicated : Equivalent method on pandas.Index.
DataFrame.duplicated : Equivalent method on pandas.DataFrame.
Series.drop_duplicates : Remove duplicate values from Series.

Examples
--------
By default, for each set of duplicated values, the first occurrence is
set on False and all others on True:

>>> animals = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama'])
>>> animals.duplicated()
0    False
1    False
2     True
3    False
4     True
dtype: bool

which is equivalent to

>>> animals.duplicated(keep='first')
0    False
1    False
2     True
3    False
4     True
dtype: bool

By using 'last', the last occurrence of each set of duplicated values
is set on False and all others on True:

>>> animals.duplicated(keep='last')
0     True
1    False
2     True
3    False
4    False
dtype: bool

By setting keep on ``False``, all duplicates are True:

>>> animals.duplicated(keep=False)
0     True
1    False
2     True
3    False
4     True
dtype: bool

---
## idxmin
```python
from series import idxmin
```

Return the row label of the minimum value.

If multiple values equal the minimum, the first row label with that
value is returned.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
skipna : bool, default True
    Exclude NA/null values. If the entire Series is NA, the result
    will be NA.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Index
    Label of the minimum value.

Raises
------
ValueError
    If the Series is empty.

See Also
--------
numpy.argmin : Return indices of the minimum values
    along the given axis.
DataFrame.idxmin : Return index of first occurrence of minimum
    over requested axis.
Series.idxmax : Return index *label* of the first occurrence
    of maximum of values.

Notes
-----
This method is the Series version of ``ndarray.argmin``. This method
returns the label of the minimum, while ``ndarray.argmin`` returns
the position. To get the position, use ``series.values.argmin()``.

Examples
--------
>>> s = pd.Series(data=[1, None, 4, 1],
...               index=['A', 'B', 'C', 'D'])
>>> s
A    1.0
B    NaN
C    4.0
D    1.0
dtype: float64

>>> s.idxmin()
'A'

If `skipna` is False and there is an NA value in the data,
the function returns ``nan``.

>>> s.idxmin(skipna=False)
nan

---
## idxmax
```python
from series import idxmax
```

Return the row label of the maximum value.

If multiple values equal the maximum, the first row label with that
value is returned.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
skipna : bool, default True
    Exclude NA/null values. If the entire Series is NA, the result
    will be NA.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
Index
    Label of the maximum value.

Raises
------
ValueError
    If the Series is empty.

See Also
--------
numpy.argmax : Return indices of the maximum values
    along the given axis.
DataFrame.idxmax : Return index of first occurrence of maximum
    over requested axis.
Series.idxmin : Return index *label* of the first occurrence
    of minimum of values.

Notes
-----
This method is the Series version of ``ndarray.argmax``. This method
returns the label of the maximum, while ``ndarray.argmax`` returns
the position. To get the position, use ``series.values.argmax()``.

Examples
--------
>>> s = pd.Series(data=[1, None, 4, 3, 4],
...               index=['A', 'B', 'C', 'D', 'E'])
>>> s
A    1.0
B    NaN
C    4.0
D    3.0
E    4.0
dtype: float64

>>> s.idxmax()
'C'

If `skipna` is False and there is an NA value in the data,
the function returns ``nan``.

>>> s.idxmax(skipna=False)
nan

---
## corr
```python
from series import corr
```

Compute correlation with `other` Series, excluding missing values.

The two `Series` objects are not required to be the same length and will be
aligned internally before the correlation function is applied.

Parameters
----------
other : Series
    Series with which to compute the correlation.
method : {'pearson', 'kendall', 'spearman'} or callable
    Method used to compute correlation:

    - pearson : Standard correlation coefficient
    - kendall : Kendall Tau correlation coefficient
    - spearman : Spearman rank correlation
    - callable: Callable with input two 1d ndarrays and returning a float.

    .. warning::
        Note that the returned matrix from corr will have 1 along the
        diagonals and will be symmetric regardless of the callable's
        behavior.
min_periods : int, optional
    Minimum number of observations needed to have a valid result.

Returns
-------
float
    Correlation with other.

See Also
--------
DataFrame.corr : Compute pairwise correlation between columns.
DataFrame.corrwith : Compute pairwise correlation with another
    DataFrame or Series.

Notes
-----
Pearson, Kendall and Spearman correlation are currently computed using pairwise complete observations.

* `Pearson correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_
* `Kendall rank correlation coefficient <https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient>`_
* `Spearman's rank correlation coefficient <https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>`_

Automatic data alignment: as with all pandas operations, automatic data alignment is performed for this method.
``corr()`` automatically considers values with matching indices.

Examples
--------
>>> def histogram_intersection(a, b):
...     v = np.minimum(a, b).sum().round(decimals=1)
...     return v
>>> s1 = pd.Series([.2, .0, .6, .2])
>>> s2 = pd.Series([.3, .6, .0, .1])
>>> s1.corr(s2, method=histogram_intersection)
0.3

Pandas auto-aligns the values with matching indices

>>> s1 = pd.Series([1, 2, 3], index=[0, 1, 2])
>>> s2 = pd.Series([1, 2, 3], index=[2, 1, 0])
>>> s1.corr(s2)
-1.0

---
## cov
```python
from series import cov
```

Compute covariance with Series, excluding missing values.

The two `Series` objects are not required to be the same length and
will be aligned internally before the covariance is calculated.

Parameters
----------
other : Series
    Series with which to compute the covariance.
min_periods : int, optional
    Minimum number of observations needed to have a valid result.
ddof : int, default 1
    Delta degrees of freedom.  The divisor used in calculations
    is ``N - ddof``, where ``N`` represents the number of elements.

Returns
-------
float
    Covariance between Series and other normalized by N-1
    (unbiased estimator).

See Also
--------
DataFrame.cov : Compute pairwise covariance of columns.

Examples
--------
>>> s1 = pd.Series([0.90010907, 0.13484424, 0.62036035])
>>> s2 = pd.Series([0.12528585, 0.26962463, 0.51111198])
>>> s1.cov(s2)
-0.01685762652715874

---
## autocorr
```python
from series import autocorr
```

Compute the lag-N autocorrelation.

This method computes the Pearson correlation between
the Series and its shifted self.

Parameters
----------
lag : int, default 1
    Number of lags to apply before performing autocorrelation.

Returns
-------
float
    The Pearson correlation between self and self.shift(lag).

See Also
--------
Series.corr : Compute the correlation between two Series.
Series.shift : Shift index by desired number of periods.
DataFrame.corr : Compute pairwise correlation of columns.
DataFrame.corrwith : Compute pairwise correlation between rows or
    columns of two DataFrame objects.

Notes
-----
If the Pearson correlation is not well defined return 'NaN'.

Examples
--------
>>> s = pd.Series([0.25, 0.5, 0.2, -0.05])
>>> s.autocorr()  # doctest: +ELLIPSIS
0.10355...
>>> s.autocorr(lag=2)  # doctest: +ELLIPSIS
-0.99999...

If the Pearson correlation is not well defined, then 'NaN' is returned.

>>> s = pd.Series([1, 0, 0, 0])
>>> s.autocorr()
nan

---
## dot
```python
from series import dot
```

Compute the dot product between the Series and the columns of other.

This method computes the dot product between the Series and another
one, or the Series and each columns of a DataFrame, or the Series and
each columns of an array.

It can also be called using `self @ other`.

Parameters
----------
other : Series, DataFrame or array-like
    The other object to compute the dot product with its columns.

Returns
-------
scalar, Series or numpy.ndarray
    Return the dot product of the Series and other if other is a
    Series, the Series of the dot product of Series and each rows of
    other if other is a DataFrame or a numpy.ndarray between the Series
    and each columns of the numpy array.

See Also
--------
DataFrame.dot: Compute the matrix product with the DataFrame.
Series.mul: Multiplication of series and other, element-wise.

Notes
-----
The Series and other has to share the same index if other is a Series
or a DataFrame.

Examples
--------
>>> s = pd.Series([0, 1, 2, 3])
>>> other = pd.Series([-1, 2, -3, 4])
>>> s.dot(other)
8
>>> s @ other
8
>>> df = pd.DataFrame([[0, 1], [-2, 3], [4, -5], [6, 7]])
>>> s.dot(df)
0    24
1    14
dtype: int64
>>> arr = np.array([[0, 1], [-2, 3], [4, -5], [6, 7]])
>>> s.dot(arr)
array([24, 14])

---
## __matmul__
```python
from series import __matmul__
```

Matrix multiplication using binary `@` operator.

---
## __rmatmul__
```python
from series import __rmatmul__
```

Matrix multiplication using binary `@` operator.

---
## searchsorted
```python
from series import searchsorted
```



---
## _append
```python
from series import _append
```



---
## compare
```python
from series import compare
```



---
## combine
```python
from series import combine
```

Combine the Series with a Series or scalar according to `func`.

Combine the Series and `other` using `func` to perform elementwise
selection for combined Series.
`fill_value` is assumed when value is missing at some index
from one of the two objects being combined.

Parameters
----------
other : Series or scalar
    The value(s) to be combined with the `Series`.
func : function
    Function that takes two scalars as inputs and returns an element.
fill_value : scalar, optional
    The value to assume when an index is missing from
    one Series or the other. The default specifies to use the
    appropriate NaN value for the underlying dtype of the Series.

Returns
-------
Series
    The result of combining the Series with the other object.

See Also
--------
Series.combine_first : Combine Series values, choosing the calling
    Series' values first.

Examples
--------
Consider 2 Datasets ``s1`` and ``s2`` containing
highest clocked speeds of different birds.

>>> s1 = pd.Series({'falcon': 330.0, 'eagle': 160.0})
>>> s1
falcon    330.0
eagle     160.0
dtype: float64
>>> s2 = pd.Series({'falcon': 345.0, 'eagle': 200.0, 'duck': 30.0})
>>> s2
falcon    345.0
eagle     200.0
duck       30.0
dtype: float64

Now, to combine the two datasets and view the highest speeds
of the birds across the two datasets

>>> s1.combine(s2, max)
duck        NaN
eagle     200.0
falcon    345.0
dtype: float64

In the previous example, the resulting value for duck is missing,
because the maximum of a NaN and a float is a NaN.
So, in the example, we set ``fill_value=0``,
so the maximum value returned will be the value from some dataset.

>>> s1.combine(s2, max, fill_value=0)
duck       30.0
eagle     200.0
falcon    345.0
dtype: float64

---
## combine_first
```python
from series import combine_first
```

Update null elements with value in the same location in 'other'.

Combine two Series objects by filling null values in one Series with
non-null values from the other Series. Result index will be the union
of the two indexes.

Parameters
----------
other : Series
    The value(s) to be used for filling null values.

Returns
-------
Series
    The result of combining the provided Series with the other object.

See Also
--------
Series.combine : Perform element-wise operation on two Series
    using a given function.

Examples
--------
>>> s1 = pd.Series([1, np.nan])
>>> s2 = pd.Series([3, 4, 5])
>>> s1.combine_first(s2)
0    1.0
1    4.0
2    5.0
dtype: float64

Null values still persist if the location of that null value
does not exist in `other`

>>> s1 = pd.Series({'falcon': np.nan, 'eagle': 160.0})
>>> s2 = pd.Series({'eagle': 200.0, 'duck': 30.0})
>>> s1.combine_first(s2)
duck       30.0
eagle     160.0
falcon      NaN
dtype: float64

---
## update
```python
from series import update
```

Modify Series in place using values from passed Series.

Uses non-NA values from passed Series to make updates. Aligns
on index.

Parameters
----------
other : Series, or object coercible into Series

Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, 5, 6]))
>>> s
0    4
1    5
2    6
dtype: int64

>>> s = pd.Series(['a', 'b', 'c'])
>>> s.update(pd.Series(['d', 'e'], index=[0, 2]))
>>> s
0    d
1    b
2    e
dtype: object

>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, 5, 6, 7, 8]))
>>> s
0    4
1    5
2    6
dtype: int64

If ``other`` contains NaNs the corresponding values are not updated
in the original Series.

>>> s = pd.Series([1, 2, 3])
>>> s.update(pd.Series([4, np.nan, 6]))
>>> s
0    4
1    2
2    6
dtype: int64

``other`` can also be a non-Series object type
that is coercible into a Series

>>> s = pd.Series([1, 2, 3])
>>> s.update([4, np.nan, 6])
>>> s
0    4
1    2
2    6
dtype: int64

>>> s = pd.Series([1, 2, 3])
>>> s.update({1: 9})
>>> s
0    1
1    9
2    3
dtype: int64

---
## sort_values
```python
from series import sort_values
```

Sort by the values.

Sort a Series in ascending or descending order by some
criterion.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
ascending : bool or list of bools, default True
    If True, sort values in ascending order, otherwise descending.
inplace : bool, default False
    If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See also :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable  algorithms.
na_position : {'first' or 'last'}, default 'last'
    Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
    the end.
ignore_index : bool, default False
    If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    If not None, apply the key function to the series values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect a
    ``Series`` and return an array-like.

Returns
-------
Series or None
    Series ordered by values or None if ``inplace=True``.

See Also
--------
Series.sort_index : Sort by the Series indices.
DataFrame.sort_values : Sort DataFrame by the values along either axis.
DataFrame.sort_index : Sort DataFrame by indices.

Examples
--------
>>> s = pd.Series([np.nan, 1, 3, 10, 5])
>>> s
0     NaN
1     1.0
2     3.0
3     10.0
4     5.0
dtype: float64

Sort values ascending order (default behaviour)

>>> s.sort_values(ascending=True)
1     1.0
2     3.0
4     5.0
3    10.0
0     NaN
dtype: float64

Sort values descending order

>>> s.sort_values(ascending=False)
3    10.0
4     5.0
2     3.0
1     1.0
0     NaN
dtype: float64

Sort values putting NAs first

>>> s.sort_values(na_position='first')
0     NaN
1     1.0
2     3.0
4     5.0
3    10.0
dtype: float64

Sort a series of strings

>>> s = pd.Series(['z', 'b', 'd', 'a', 'c'])
>>> s
0    z
1    b
2    d
3    a
4    c
dtype: object

>>> s.sort_values()
3    a
1    b
4    c
2    d
0    z
dtype: object

Sort using a key function. Your `key` function will be
given the ``Series`` of values and should return an array-like.

>>> s = pd.Series(['a', 'B', 'c', 'D', 'e'])
>>> s.sort_values()
1    B
3    D
0    a
2    c
4    e
dtype: object
>>> s.sort_values(key=lambda x: x.str.lower())
0    a
1    B
2    c
3    D
4    e
dtype: object

NumPy ufuncs work well here. For example, we can
sort by the ``sin`` of the value

>>> s = pd.Series([-4, -2, 0, 2, 4])
>>> s.sort_values(key=np.sin)
1   -2
4    4
2    0
0   -4
3    2
dtype: int64

More complicated user-defined functions can be used,
as long as they expect a Series and return an array-like

>>> s.sort_values(key=lambda x: (np.tan(x.cumsum())))
0   -4
3    2
4    4
1   -2
2    0
dtype: int64

---
## sort_index
```python
from series import sort_index
```

Sort Series by index labels.

Returns a new Series sorted by label if `inplace` argument is
``False``, otherwise updates the original series and returns None.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
level : int, optional
    If not None, sort on values in specified index level(s).
ascending : bool or list-like of bools, default True
    Sort ascending vs. descending. When the index is a MultiIndex the
    sort direction can be controlled for each level individually.
inplace : bool, default False
    If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See also :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable algorithms. For
    DataFrames, this option is only applied when sorting on a single
    column or label.
na_position : {'first', 'last'}, default 'last'
    If 'first' puts NaNs at the beginning, 'last' puts NaNs at the end.
    Not implemented for MultiIndex.
sort_remaining : bool, default True
    If True and sorting by level and index is multilevel, sort by other
    levels too (in order) after sorting by specified level.
ignore_index : bool, default False
    If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    If not None, apply the key function to the index values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect an
    ``Index`` and return an ``Index`` of the same shape.

Returns
-------
Series or None
    The original Series sorted by the labels or None if ``inplace=True``.

See Also
--------
DataFrame.sort_index: Sort DataFrame by the index.
DataFrame.sort_values: Sort DataFrame by the value.
Series.sort_values : Sort Series by the value.

Examples
--------
>>> s = pd.Series(['a', 'b', 'c', 'd'], index=[3, 2, 1, 4])
>>> s.sort_index()
1    c
2    b
3    a
4    d
dtype: object

Sort Descending

>>> s.sort_index(ascending=False)
4    d
3    a
2    b
1    c
dtype: object

By default NaNs are put at the end, but use `na_position` to place
them at the beginning

>>> s = pd.Series(['a', 'b', 'c', 'd'], index=[3, 2, 1, np.nan])
>>> s.sort_index(na_position='first')
NaN     d
 1.0    c
 2.0    b
 3.0    a
dtype: object

Specify index level to sort

>>> arrays = [np.array(['qux', 'qux', 'foo', 'foo',
...                     'baz', 'baz', 'bar', 'bar']),
...           np.array(['two', 'one', 'two', 'one',
...                     'two', 'one', 'two', 'one'])]
>>> s = pd.Series([1, 2, 3, 4, 5, 6, 7, 8], index=arrays)
>>> s.sort_index(level=1)
bar  one    8
baz  one    6
foo  one    4
qux  one    2
bar  two    7
baz  two    5
foo  two    3
qux  two    1
dtype: int64

Does not sort by remaining levels when sorting by levels

>>> s.sort_index(level=1, sort_remaining=False)
qux  one    2
foo  one    4
baz  one    6
bar  one    8
qux  two    1
foo  two    3
baz  two    5
bar  two    7
dtype: int64

Apply a key function before sorting

>>> s = pd.Series([1, 2, 3, 4], index=['A', 'b', 'C', 'd'])
>>> s.sort_index(key=lambda x : x.str.lower())
A    1
b    2
C    3
d    4
dtype: int64

---
## argsort
```python
from series import argsort
```

Return the integer indices that would sort the Series values.

Override ndarray.argsort. Argsorts the value, omitting NA/null values,
and places the result in the same locations as the non-NA values.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
kind : {'mergesort', 'quicksort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See :func:`numpy.sort` for more
    information. 'mergesort' and 'stable' are the only stable algorithms.
order : None
    Has no effect but is accepted for compatibility with numpy.
stable : None
    Has no effect but is accepted for compatibility with numpy.

Returns
-------
Series[np.intp]
    Positions of values within the sort order with -1 indicating
    nan values.

See Also
--------
numpy.ndarray.argsort : Returns the indices that would sort this array.

Examples
--------
>>> s = pd.Series([3, 2, 1])
>>> s.argsort()
0    2
1    1
2    0
dtype: int64

---
## nlargest
```python
from series import nlargest
```

Return the largest `n` elements.

Parameters
----------
n : int, default 5
    Return this many descending sorted values.
keep : {'first', 'last', 'all'}, default 'first'
    When there are duplicate values that cannot all fit in a
    Series of `n` elements:

    - ``first`` : return the first `n` occurrences in order
      of appearance.
    - ``last`` : return the last `n` occurrences in reverse
      order of appearance.
    - ``all`` : keep all occurrences. This can result in a Series of
      size larger than `n`.

Returns
-------
Series
    The `n` largest values in the Series, sorted in decreasing order.

See Also
--------
Series.nsmallest: Get the `n` smallest elements.
Series.sort_values: Sort Series by values.
Series.head: Return the first `n` rows.

Notes
-----
Faster than ``.sort_values(ascending=False).head(n)`` for small `n`
relative to the size of the ``Series`` object.

Examples
--------
>>> countries_population = {"Italy": 59000000, "France": 65000000,
...                         "Malta": 434000, "Maldives": 434000,
...                         "Brunei": 434000, "Iceland": 337000,
...                         "Nauru": 11300, "Tuvalu": 11300,
...                         "Anguilla": 11300, "Montserrat": 5200}
>>> s = pd.Series(countries_population)
>>> s
Italy       59000000
France      65000000
Malta         434000
Maldives      434000
Brunei        434000
Iceland       337000
Nauru          11300
Tuvalu         11300
Anguilla       11300
Montserrat      5200
dtype: int64

The `n` largest elements where ``n=5`` by default.

>>> s.nlargest()
France      65000000
Italy       59000000
Malta         434000
Maldives      434000
Brunei        434000
dtype: int64

The `n` largest elements where ``n=3``. Default `keep` value is 'first'
so Malta will be kept.

>>> s.nlargest(3)
France    65000000
Italy     59000000
Malta       434000
dtype: int64

The `n` largest elements where ``n=3`` and keeping the last duplicates.
Brunei will be kept since it is the last with value 434000 based on
the index order.

>>> s.nlargest(3, keep='last')
France      65000000
Italy       59000000
Brunei        434000
dtype: int64

The `n` largest elements where ``n=3`` with all duplicates kept. Note
that the returned Series has five elements due to the three duplicates.

>>> s.nlargest(3, keep='all')
France      65000000
Italy       59000000
Malta         434000
Maldives      434000
Brunei        434000
dtype: int64

---
## nsmallest
```python
from series import nsmallest
```

Return the smallest `n` elements.

Parameters
----------
n : int, default 5
    Return this many ascending sorted values.
keep : {'first', 'last', 'all'}, default 'first'
    When there are duplicate values that cannot all fit in a
    Series of `n` elements:

    - ``first`` : return the first `n` occurrences in order
      of appearance.
    - ``last`` : return the last `n` occurrences in reverse
      order of appearance.
    - ``all`` : keep all occurrences. This can result in a Series of
      size larger than `n`.

Returns
-------
Series
    The `n` smallest values in the Series, sorted in increasing order.

See Also
--------
Series.nlargest: Get the `n` largest elements.
Series.sort_values: Sort Series by values.
Series.head: Return the first `n` rows.

Notes
-----
Faster than ``.sort_values().head(n)`` for small `n` relative to
the size of the ``Series`` object.

Examples
--------
>>> countries_population = {"Italy": 59000000, "France": 65000000,
...                         "Brunei": 434000, "Malta": 434000,
...                         "Maldives": 434000, "Iceland": 337000,
...                         "Nauru": 11300, "Tuvalu": 11300,
...                         "Anguilla": 11300, "Montserrat": 5200}
>>> s = pd.Series(countries_population)
>>> s
Italy       59000000
France      65000000
Brunei        434000
Malta         434000
Maldives      434000
Iceland       337000
Nauru          11300
Tuvalu         11300
Anguilla       11300
Montserrat      5200
dtype: int64

The `n` smallest elements where ``n=5`` by default.

>>> s.nsmallest()
Montserrat    5200
Nauru        11300
Tuvalu       11300
Anguilla     11300
Iceland     337000
dtype: int64

The `n` smallest elements where ``n=3``. Default `keep` value is
'first' so Nauru and Tuvalu will be kept.

>>> s.nsmallest(3)
Montserrat   5200
Nauru       11300
Tuvalu      11300
dtype: int64

The `n` smallest elements where ``n=3`` and keeping the last
duplicates. Anguilla and Tuvalu will be kept since they are the last
with value 11300 based on the index order.

>>> s.nsmallest(3, keep='last')
Montserrat   5200
Anguilla    11300
Tuvalu      11300
dtype: int64

The `n` smallest elements where ``n=3`` with all duplicates kept. Note
that the returned Series has four elements due to the three duplicates.

>>> s.nsmallest(3, keep='all')
Montserrat   5200
Nauru       11300
Tuvalu      11300
Anguilla    11300
dtype: int64

---
## swaplevel
```python
from series import swaplevel
```

Swap levels i and j in a :class:`MultiIndex`.

Default is to swap the two innermost levels of the index.

Parameters
----------
i, j : int or str
    Levels of the indices to be swapped. Can pass level name as string.
{extra_params}

Returns
-------
{klass}
    {klass} with levels swapped in MultiIndex.

{examples}

---
## reorder_levels
```python
from series import reorder_levels
```

Rearrange index levels using input order.

May not drop or duplicate levels.

Parameters
----------
order : list of int representing new level order
    Reference level by number or key.

Returns
-------
type of caller (new object)

Examples
--------
>>> arrays = [np.array(["dog", "dog", "cat", "cat", "bird", "bird"]),
...           np.array(["white", "black", "white", "black", "white", "black"])]
>>> s = pd.Series([1, 2, 3, 3, 5, 2], index=arrays)
>>> s
dog   white    1
      black    2
cat   white    3
      black    3
bird  white    5
      black    2
dtype: int64
>>> s.reorder_levels([1, 0])
white  dog     1
black  dog     2
white  cat     3
black  cat     3
white  bird    5
black  bird    2
dtype: int64

---
## explode
```python
from series import explode
```

Transform each element of a list-like to a row.

Parameters
----------
ignore_index : bool, default False
    If True, the resulting index will be labeled 0, 1, …, n - 1.

Returns
-------
Series
    Exploded lists to rows; index will be duplicated for these rows.

See Also
--------
Series.str.split : Split string values on specified separator.
Series.unstack : Unstack, a.k.a. pivot, Series with MultiIndex
    to produce DataFrame.
DataFrame.melt : Unpivot a DataFrame from wide format to long format.
DataFrame.explode : Explode a DataFrame from list-like
    columns to long format.

Notes
-----
This routine will explode list-likes including lists, tuples, sets,
Series, and np.ndarray. The result dtype of the subset rows will
be object. Scalars will be returned unchanged, and empty list-likes will
result in a np.nan for that row. In addition, the ordering of elements in
the output will be non-deterministic when exploding sets.

Reference :ref:`the user guide <reshaping.explode>` for more examples.

Examples
--------
>>> s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
>>> s
0    [1, 2, 3]
1          foo
2           []
3       [3, 4]
dtype: object

>>> s.explode()
0      1
0      2
0      3
1    foo
2    NaN
3      3
3      4
dtype: object

---
## unstack
```python
from series import unstack
```

Unstack, also known as pivot, Series with MultiIndex to produce DataFrame.

Parameters
----------
level : int, str, or list of these, default last level
    Level(s) to unstack, can pass level name.
fill_value : scalar value, default None
    Value to use when replacing NaN values.
sort : bool, default True
    Sort the level(s) in the resulting MultiIndex columns.

Returns
-------
DataFrame
    Unstacked Series.

Notes
-----
Reference :ref:`the user guide <reshaping.stacking>` for more examples.

Examples
--------
>>> s = pd.Series([1, 2, 3, 4],
...               index=pd.MultiIndex.from_product([['one', 'two'],
...                                                 ['a', 'b']]))
>>> s
one  a    1
     b    2
two  a    3
     b    4
dtype: int64

>>> s.unstack(level=-1)
     a  b
one  1  2
two  3  4

>>> s.unstack(level=0)
   one  two
a    1    3
b    2    4

---
## map
```python
from series import map
```

Map values of Series according to an input mapping or function.

Used for substituting each value in a Series with another value,
that may be derived from a function, a ``dict`` or
a :class:`Series`.

Parameters
----------
arg : function, collections.abc.Mapping subclass or Series
    Mapping correspondence.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NaN values, without passing them to the
    mapping correspondence.

Returns
-------
Series
    Same index as caller.

See Also
--------
Series.apply : For applying more complex functions on a Series.
Series.replace: Replace values given in `to_replace` with `value`.
DataFrame.apply : Apply a function row-/column-wise.
DataFrame.map : Apply a function elementwise on a whole DataFrame.

Notes
-----
When ``arg`` is a dictionary, values in Series that are not in the
dictionary (as keys) are converted to ``NaN``. However, if the
dictionary is a ``dict`` subclass that defines ``__missing__`` (i.e.
provides a method for default values), then this default is used
rather than ``NaN``.

Examples
--------
>>> s = pd.Series(['cat', 'dog', np.nan, 'rabbit'])
>>> s
0      cat
1      dog
2      NaN
3   rabbit
dtype: object

``map`` accepts a ``dict`` or a ``Series``. Values that are not found
in the ``dict`` are converted to ``NaN``, unless the dict has a default
value (e.g. ``defaultdict``):

>>> s.map({'cat': 'kitten', 'dog': 'puppy'})
0   kitten
1    puppy
2      NaN
3      NaN
dtype: object

It also accepts a function:

>>> s.map('I am a {}'.format)
0       I am a cat
1       I am a dog
2       I am a nan
3    I am a rabbit
dtype: object

To avoid applying the function to missing values (and keep them as
``NaN``) ``na_action='ignore'`` can be used:

>>> s.map('I am a {}'.format, na_action='ignore')
0     I am a cat
1     I am a dog
2            NaN
3  I am a rabbit
dtype: object

---
## _gotitem
```python
from series import _gotitem
```

Sub-classes to define. Return a sliced object.

Parameters
----------
key : string / list of selections
ndim : {1, 2}
    Requested ndim of result.
subset : object, default None
    Subset to act on.

---
## aggregate
```python
from series import aggregate
```



---
## transform
```python
from series import transform
```



---
## apply
```python
from series import apply
```

Invoke function on values of Series.

Can be ufunc (a NumPy function that applies to the entire Series)
or a Python function that only works on single values.

Parameters
----------
func : function
    Python function or NumPy ufunc to apply.
convert_dtype : bool, default True
    Try to find better dtype for elementwise function results. If
    False, leave as dtype=object. Note that the dtype is always
    preserved for some extension array dtypes, such as Categorical.

    .. deprecated:: 2.1.0
        ``convert_dtype`` has been deprecated. Do ``ser.astype(object).apply()``
        instead if you want ``convert_dtype=False``.
args : tuple
    Positional arguments passed to func after the series value.
by_row : False or "compat", default "compat"
    If ``"compat"`` and func is a callable, func will be passed each element of
    the Series, like ``Series.map``. If func is a list or dict of
    callables, will first try to translate each func into pandas methods. If
    that doesn't work, will try call to apply again with ``by_row="compat"``
    and if that fails, will call apply again with ``by_row=False``
    (backward compatible).
    If False, the func will be passed the whole Series at once.

    ``by_row`` has no effect when ``func`` is a string.

    .. versionadded:: 2.1.0
**kwargs
    Additional keyword arguments passed to func.

Returns
-------
Series or DataFrame
    If func returns a Series object the result will be a DataFrame.

See Also
--------
Series.map: For element-wise operations.
Series.agg: Only perform aggregating type operations.
Series.transform: Only perform transforming type operations.

Notes
-----
Functions that mutate the passed object can produce unexpected
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
for more details.

Examples
--------
Create a series with typical summer temperatures for each city.

>>> s = pd.Series([20, 21, 12],
...               index=['London', 'New York', 'Helsinki'])
>>> s
London      20
New York    21
Helsinki    12
dtype: int64

Square the values by defining a function and passing it as an
argument to ``apply()``.

>>> def square(x):
...     return x ** 2
>>> s.apply(square)
London      400
New York    441
Helsinki    144
dtype: int64

Square the values by passing an anonymous function as an
argument to ``apply()``.

>>> s.apply(lambda x: x ** 2)
London      400
New York    441
Helsinki    144
dtype: int64

Define a custom function that needs additional positional
arguments and pass these additional arguments using the
``args`` keyword.

>>> def subtract_custom_value(x, custom_value):
...     return x - custom_value

>>> s.apply(subtract_custom_value, args=(5,))
London      15
New York    16
Helsinki     7
dtype: int64

Define a custom function that takes keyword arguments
and pass these arguments to ``apply``.

>>> def add_custom_values(x, **kwargs):
...     for month in kwargs:
...         x += kwargs[month]
...     return x

>>> s.apply(add_custom_values, june=30, july=20, august=25)
London      95
New York    96
Helsinki    87
dtype: int64

Use a function from the Numpy library.

>>> s.apply(np.log)
London      2.995732
New York    3.044522
Helsinki    2.484907
dtype: float64

---
## _reindex_indexer
```python
from series import _reindex_indexer
```



---
## _needs_reindex_multi
```python
from series import _needs_reindex_multi
```

Check if we do need a multi reindex; this is for compat with
higher dims.

---
## set_axis
```python
from series import set_axis
```



---
## reindex
```python
from series import reindex
```



---
## rename_axis
```python
from series import rename_axis
```



---
## drop
```python
from series import drop
```

Return Series with specified index labels removed.

Remove elements of a Series based on specifying the index labels.
When using a multi-index, labels on different levels can be removed
by specifying the level.

Parameters
----------
labels : single label or list-like
    Index labels to drop.
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
index : single label or list-like
    Redundant for application on Series, but 'index' can be used instead
    of 'labels'.
columns : single label or list-like
    No change is made to the Series; use 'index' or 'labels' instead.
level : int or level name, optional
    For MultiIndex, level for which the labels will be removed.
inplace : bool, default False
    If True, do operation inplace and return None.
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and only existing labels are dropped.

Returns
-------
Series or None
    Series with specified index labels removed or None if ``inplace=True``.

Raises
------
KeyError
    If none of the labels are found in the index.

See Also
--------
Series.reindex : Return only specified index labels of Series.
Series.dropna : Return series without null values.
Series.drop_duplicates : Return Series with duplicate values removed.
DataFrame.drop : Drop specified labels from rows or columns.

Examples
--------
>>> s = pd.Series(data=np.arange(3), index=['A', 'B', 'C'])
>>> s
A  0
B  1
C  2
dtype: int64

Drop labels B en C

>>> s.drop(labels=['B', 'C'])
A  0
dtype: int64

Drop 2nd level label in MultiIndex Series

>>> midx = pd.MultiIndex(levels=[['llama', 'cow', 'falcon'],
...                              ['speed', 'weight', 'length']],
...                      codes=[[0, 0, 0, 1, 1, 1, 2, 2, 2],
...                             [0, 1, 2, 0, 1, 2, 0, 1, 2]])
>>> s = pd.Series([45, 200, 1.2, 30, 250, 1.5, 320, 1, 0.3],
...               index=midx)
>>> s
llama   speed      45.0
        weight    200.0
        length      1.2
cow     speed      30.0
        weight    250.0
        length      1.5
falcon  speed     320.0
        weight      1.0
        length      0.3
dtype: float64

>>> s.drop(labels='weight', level=1)
llama   speed      45.0
        length      1.2
cow     speed      30.0
        length      1.5
falcon  speed     320.0
        length      0.3
dtype: float64

---
## pop
```python
from series import pop
```

Return item and drops from series. Raise KeyError if not found.

Parameters
----------
item : label
    Index of the element that needs to be removed.

Returns
-------
Value that is popped from series.

Examples
--------
>>> ser = pd.Series([1, 2, 3])

>>> ser.pop(0)
1

>>> ser
1    2
2    3
dtype: int64

---
## info
```python
from series import info
```



---
## _replace_single
```python
from series import _replace_single
```

Replaces values in a Series using the fill method specified when no
replacement value is given in the replace method

---
## memory_usage
```python
from series import memory_usage
```

Return the memory usage of the Series.

The memory usage can optionally include the contribution of
the index and of elements of `object` dtype.

Parameters
----------
index : bool, default True
    Specifies whether to include the memory usage of the Series index.
deep : bool, default False
    If True, introspect the data deeply by interrogating
    `object` dtypes for system-level memory consumption, and include
    it in the returned value.

Returns
-------
int
    Bytes of memory consumed.

See Also
--------
numpy.ndarray.nbytes : Total bytes consumed by the elements of the
    array.
DataFrame.memory_usage : Bytes consumed by a DataFrame.

Examples
--------
>>> s = pd.Series(range(3))
>>> s.memory_usage()
152

Not including the index gives the size of the rest of the data, which
is necessarily smaller:

>>> s.memory_usage(index=False)
24

The memory footprint of `object` values is ignored by default:

>>> s = pd.Series(["a", "b"])
>>> s.values
array(['a', 'b'], dtype=object)
>>> s.memory_usage()
144
>>> s.memory_usage(deep=True)
244

---
## isin
```python
from series import isin
```

Whether elements in Series are contained in `values`.

Return a boolean Series showing whether each element in the Series
matches an element in the passed sequence of `values` exactly.

Parameters
----------
values : set or list-like
    The sequence of values to test. Passing in a single string will
    raise a ``TypeError``. Instead, turn a single string into a
    list of one element.

Returns
-------
Series
    Series of booleans indicating if each element is in values.

Raises
------
TypeError
  * If `values` is a string

See Also
--------
DataFrame.isin : Equivalent method on DataFrame.

Examples
--------
>>> s = pd.Series(['llama', 'cow', 'llama', 'beetle', 'llama',
...                'hippo'], name='animal')
>>> s.isin(['cow', 'llama'])
0     True
1     True
2     True
3    False
4     True
5    False
Name: animal, dtype: bool

To invert the boolean values, use the ``~`` operator:

>>> ~s.isin(['cow', 'llama'])
0    False
1    False
2    False
3     True
4    False
5     True
Name: animal, dtype: bool

Passing a single string as ``s.isin('llama')`` will raise an error. Use
a list of one element instead:

>>> s.isin(['llama'])
0     True
1    False
2     True
3    False
4     True
5    False
Name: animal, dtype: bool

Strings and integers are distinct and are therefore not comparable:

>>> pd.Series([1]).isin(['1'])
0    False
dtype: bool
>>> pd.Series([1.1]).isin(['1.1'])
0    False
dtype: bool

---
## between
```python
from series import between
```

Return boolean Series equivalent to left <= series <= right.

This function returns a boolean vector containing `True` wherever the
corresponding Series element is between the boundary values `left` and
`right`. NA values are treated as `False`.

Parameters
----------
left : scalar or list-like
    Left boundary.
right : scalar or list-like
    Right boundary.
inclusive : {"both", "neither", "left", "right"}
    Include boundaries. Whether to set each bound as closed or open.

    .. versionchanged:: 1.3.0

Returns
-------
Series
    Series representing whether each element is between left and
    right (inclusive).

See Also
--------
Series.gt : Greater than of series and other.
Series.lt : Less than of series and other.

Notes
-----
This function is equivalent to ``(left <= ser) & (ser <= right)``

Examples
--------
>>> s = pd.Series([2, 0, 4, 8, np.nan])

Boundary values are included by default:

>>> s.between(1, 4)
0     True
1    False
2     True
3    False
4    False
dtype: bool

With `inclusive` set to ``"neither"`` boundary values are excluded:

>>> s.between(1, 4, inclusive="neither")
0     True
1    False
2    False
3    False
4    False
dtype: bool

`left` and `right` can be any scalar value:

>>> s = pd.Series(['Alice', 'Bob', 'Carol', 'Eve'])
>>> s.between('Anna', 'Daniel')
0    False
1     True
2     True
3    False
dtype: bool

---
## case_when
```python
from series import case_when
```

Replace values where the conditions are True.

Parameters
----------
caselist : A list of tuples of conditions and expected replacements
    Takes the form:  ``(condition0, replacement0)``,
    ``(condition1, replacement1)``, ... .
    ``condition`` should be a 1-D boolean array-like object
    or a callable. If ``condition`` is a callable,
    it is computed on the Series
    and should return a boolean Series or array.
    The callable must not change the input Series
    (though pandas doesn`t check it). ``replacement`` should be a
    1-D array-like object, a scalar or a callable.
    If ``replacement`` is a callable, it is computed on the Series
    and should return a scalar or Series. The callable
    must not change the input Series
    (though pandas doesn`t check it).

    .. versionadded:: 2.2.0

Returns
-------
Series

See Also
--------
Series.mask : Replace values where the condition is True.

Examples
--------
>>> c = pd.Series([6, 7, 8, 9], name='c')
>>> a = pd.Series([0, 0, 1, 2])
>>> b = pd.Series([0, 3, 4, 5])

>>> c.case_when(caselist=[(a.gt(0), a),  # condition, replacement
...                       (b.gt(0), b)])
0    6
1    3
2    1
3    2
Name: c, dtype: int64

---
## isna
```python
from series import isna
```



---
## isnull
```python
from series import isnull
```

Series.isnull is an alias for Series.isna.

---
## notna
```python
from series import notna
```



---
## notnull
```python
from series import notnull
```

Series.notnull is an alias for Series.notna.

---
## dropna
```python
from series import dropna
```

Return a new Series with missing values removed.

See the :ref:`User Guide <missing_data>` for more on which values are
considered missing, and how to work with missing data.

Parameters
----------
axis : {0 or 'index'}
    Unused. Parameter needed for compatibility with DataFrame.
inplace : bool, default False
    If True, do operation inplace and return None.
how : str, optional
    Not in use. Kept for compatibility.
ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

    .. versionadded:: 2.0.0

Returns
-------
Series or None
    Series with NA entries dropped from it or None if ``inplace=True``.

See Also
--------
Series.isna: Indicate missing values.
Series.notna : Indicate existing (non-missing) values.
Series.fillna : Replace missing values.
DataFrame.dropna : Drop rows or columns which contain NA values.
Index.dropna : Drop missing indices.

Examples
--------
>>> ser = pd.Series([1., 2., np.nan])
>>> ser
0    1.0
1    2.0
2    NaN
dtype: float64

Drop NA values from a Series.

>>> ser.dropna()
0    1.0
1    2.0
dtype: float64

Empty strings are not considered NA values. ``None`` is considered an
NA value.

>>> ser = pd.Series([np.nan, 2, pd.NaT, '', None, 'I stay'])
>>> ser
0       NaN
1         2
2       NaT
3
4      None
5    I stay
dtype: object
>>> ser.dropna()
1         2
3
5    I stay
dtype: object

---
## to_timestamp
```python
from series import to_timestamp
```

Cast to DatetimeIndex of Timestamps, at *beginning* of period.

Parameters
----------
freq : str, default frequency of PeriodIndex
    Desired frequency.
how : {'s', 'e', 'start', 'end'}
    Convention for converting period to timestamp; start of period
    vs. end.
copy : bool, default True
    Whether or not to return a copy.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
Series with DatetimeIndex

Examples
--------
>>> idx = pd.PeriodIndex(['2023', '2024', '2025'], freq='Y')
>>> s1 = pd.Series([1, 2, 3], index=idx)
>>> s1
2023    1
2024    2
2025    3
Freq: Y-DEC, dtype: int64

The resulting frequency of the Timestamps is `YearBegin`

>>> s1 = s1.to_timestamp()
>>> s1
2023-01-01    1
2024-01-01    2
2025-01-01    3
Freq: YS-JAN, dtype: int64

Using `freq` which is the offset that the Timestamps will have

>>> s2 = pd.Series([1, 2, 3], index=idx)
>>> s2 = s2.to_timestamp(freq='M')
>>> s2
2023-01-31    1
2024-01-31    2
2025-01-31    3
Freq: YE-JAN, dtype: int64

---
## to_period
```python
from series import to_period
```

Convert Series from DatetimeIndex to PeriodIndex.

Parameters
----------
freq : str, default None
    Frequency associated with the PeriodIndex.
copy : bool, default True
    Whether or not to return a copy.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
Series
    Series with index converted to PeriodIndex.

Examples
--------
>>> idx = pd.DatetimeIndex(['2023', '2024', '2025'])
>>> s = pd.Series([1, 2, 3], index=idx)
>>> s = s.to_period()
>>> s
2023    1
2024    2
2025    3
Freq: Y-DEC, dtype: int64

Viewing the index

>>> s.index
PeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]')

---
## _cmp_method
```python
from series import _cmp_method
```



---
## _logical_method
```python
from series import _logical_method
```



---
## _arith_method
```python
from series import _arith_method
```



---
## _align_for_op
```python
from series import _align_for_op
```

align lhs and rhs Series

---
## _binop
```python
from series import _binop
```

Perform generic binary operation with optional fill value.

Parameters
----------
other : Series
func : binary operator
fill_value : float or object
    Value to substitute for NA/null values. If both Series are NA in a
    location, the result will be NA regardless of the passed fill value.
level : int or level name, default None
    Broadcast across a level, matching Index values on the
    passed MultiIndex level.

Returns
-------
Series

---
## _construct_result
```python
from series import _construct_result
```

Construct an appropriately-labelled Series from the result of an op.

Parameters
----------
result : ndarray or ExtensionArray
name : Label

Returns
-------
Series
    In the case of __divmod__ or __rdivmod__, a 2-tuple of Series.

---
## _flex_method
```python
from series import _flex_method
```



---
## eq
```python
from series import eq
```



---
## ne
```python
from series import ne
```



---
## le
```python
from series import le
```



---
## lt
```python
from series import lt
```



---
## ge
```python
from series import ge
```



---
## gt
```python
from series import gt
```



---
## add
```python
from series import add
```



---
## radd
```python
from series import radd
```



---
## sub
```python
from series import sub
```



---
## rsub
```python
from series import rsub
```



---
## mul
```python
from series import mul
```



---
## rmul
```python
from series import rmul
```



---
## truediv
```python
from series import truediv
```



---
## rtruediv
```python
from series import rtruediv
```



---
## floordiv
```python
from series import floordiv
```



---
## rfloordiv
```python
from series import rfloordiv
```



---
## mod
```python
from series import mod
```



---
## rmod
```python
from series import rmod
```



---
## pow
```python
from series import pow
```



---
## rpow
```python
from series import rpow
```



---
## divmod
```python
from series import divmod
```



---
## rdivmod
```python
from series import rdivmod
```



---
## _reduce
```python
from series import _reduce
```

Perform a reduction operation.

If we have an ndarray as a value, then simply perform the operation,
otherwise delegate to the object.

---
## prod
```python
from series import prod
```



---
## median
```python
from series import median
```



---
## sem
```python
from series import sem
```



---
## var
```python
from series import var
```



---
## skew
```python
from series import skew
```



---
## kurt
```python
from series import kurt
```



---
## cummin
```python
from series import cummin
```



---
## cummax
```python
from series import cummax
```



---
## cumsum
```python
from series import cumsum
```



---
## cumprod
```python
from series import cumprod
```



---
## __name__
```python
from sorting import __name__
```

miscellaneous sorting / groupby utilities 

---
## get_indexer_indexer
```python
from sorting import get_indexer_indexer
```

Helper method that return the indexer according to input parameters for
the sort_index method of DataFrame and Series.

Parameters
----------
target : Index
level : int or level name or list of ints or list of level names
ascending : bool or list of bools, default True
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}
na_position : {'first', 'last'}
sort_remaining : bool
key : callable, optional

Returns
-------
Optional[ndarray[intp]]
    The indexer for the new index.

---
## get_group_index
```python
from sorting import get_group_index
```

For the particular label_list, gets the offsets into the hypothetical list
representing the totally ordered cartesian product of all possible label
combinations, *as long as* this space fits within int64 bounds;
otherwise, though group indices identify unique combinations of
labels, they cannot be deconstructed.
- If `sort`, rank of returned ids preserve lexical ranks of labels.
  i.e. returned id's can be used to do lexical sort on labels;
- If `xnull` nulls (-1 labels) are passed through.

Parameters
----------
labels : sequence of arrays
    Integers identifying levels at each location
shape : tuple[int, ...]
    Number of unique levels at each location
sort : bool
    If the ranks of returned ids should match lexical ranks of labels
xnull : bool
    If true nulls are excluded. i.e. -1 values in the labels are
    passed through.

Returns
-------
An array of type int64 where two elements are equal if their corresponding
labels are equal at all location.

Notes
-----
The length of `labels` and `shape` must be identical.

---
## get_compressed_ids
```python
from sorting import get_compressed_ids
```

Group_index is offsets into cartesian product of all possible labels. This
space can be huge, so this function compresses it, by computing offsets
(comp_ids) into the list of unique labels (obs_group_ids).

Parameters
----------
labels : list of label arrays
sizes : tuple[int] of size of the levels

Returns
-------
np.ndarray[np.intp]
    comp_ids
np.ndarray[np.int64]
    obs_group_ids

---
## is_int64_overflow_possible
```python
from sorting import is_int64_overflow_possible
```



---
## _decons_group_index
```python
from sorting import _decons_group_index
```



---
## decons_obs_group_ids
```python
from sorting import decons_obs_group_ids
```

Reconstruct labels from observed group ids.

Parameters
----------
comp_ids : np.ndarray[np.intp]
obs_ids: np.ndarray[np.intp]
shape : tuple[int]
labels : Sequence[np.ndarray[np.signedinteger]]
xnull : bool
    If nulls are excluded; i.e. -1 labels are passed through.

---
## lexsort_indexer
```python
from sorting import lexsort_indexer
```

Performs lexical sorting on a set of keys

Parameters
----------
keys : Sequence[ArrayLike | Index | Series]
    Sequence of arrays to be sorted by the indexer
    Sequence[Series] is only if key is not None.
orders : bool or list of booleans, optional
    Determines the sorting order for each element in keys. If a list,
    it must be the same length as keys. This determines whether the
    corresponding element in keys should be sorted in ascending
    (True) or descending (False) order. if bool, applied to all
    elements as above. if None, defaults to True.
na_position : {'first', 'last'}, default 'last'
    Determines placement of NA elements in the sorted list ("last" or "first")
key : Callable, optional
    Callable key function applied to every element in keys before sorting
codes_given: bool, False
    Avoid categorical materialization if codes are already provided.

Returns
-------
np.ndarray[np.intp]

---
## nargsort
```python
from sorting import nargsort
```

Intended to be a drop-in replacement for np.argsort which handles NaNs.

Adds ascending, na_position, and key parameters.

(GH #6399, #5231, #27237)

Parameters
----------
items : np.ndarray, ExtensionArray, Index, or Series
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
ascending : bool, default True
na_position : {'first', 'last'}, default 'last'
key : Optional[Callable], default None
mask : Optional[np.ndarray[bool]], default None
    Passed when called by ExtensionArray.argsort.

Returns
-------
np.ndarray[np.intp]

---
## nargminmax
```python
from sorting import nargminmax
```

Implementation of np.argmin/argmax but for ExtensionArray and which
handles missing values.

Parameters
----------
values : ExtensionArray
method : {"argmax", "argmin"}
axis : int, default 0

Returns
-------
int

---
## _nanargminmax
```python
from sorting import _nanargminmax
```

See nanargminmax.__doc__.

---
## _ensure_key_mapped_multiindex
```python
from sorting import _ensure_key_mapped_multiindex
```

Returns a new MultiIndex in which key has been applied
to all levels specified in level (or all levels if level
is None). Used for key sorting for MultiIndex.

Parameters
----------
index : MultiIndex
    Index to which to apply the key function on the
    specified levels.
key : Callable
    Function that takes an Index and returns an Index of
    the same shape. This key is applied to each level
    separately. The name of the level can be used to
    distinguish different levels for application.
level : list-like, int or str, default None
    Level or list of levels to apply the key function to.
    If None, key function is applied to all levels. Other
    levels are left unchanged.

Returns
-------
labels : MultiIndex
    Resulting MultiIndex with modified levels.

---
## ensure_key_mapped
```python
from sorting import ensure_key_mapped
```

Applies a callable key function to the values function and checks
that the resulting value has the same shape. Can be called on Index
subclasses, Series, DataFrames, or ndarrays.

Parameters
----------
values : Series, DataFrame, Index subclass, or ndarray
key : Optional[Callable], key to be called on the values array
levels : Optional[List], if values is a MultiIndex, list of levels to
apply the key to.

---
## get_flattened_list
```python
from sorting import get_flattened_list
```

Map compressed group id -> key tuple.

---
## get_indexer_dict
```python
from sorting import get_indexer_dict
```

Returns
-------
dict:
    Labels mapped to indexers.

---
## get_group_index_sorter
```python
from sorting import get_group_index_sorter
```

algos.groupsort_indexer implements `counting sort` and it is at least
O(ngroups), where
    ngroups = prod(shape)
    shape = map(len, keys)
that is, linear in the number of combinations (cartesian product) of unique
values of groupby keys. This can be huge when doing multi-key groupby.
np.argsort(kind='mergesort') is O(count x log(count)) where count is the
length of the data-frame;
Both algorithms are `stable` sort and that is necessary for correctness of
groupby operations. e.g. consider:
    df.groupby(key)[col].transform('first')

Parameters
----------
group_index : np.ndarray[np.intp]
    signed integer dtype
ngroups : int or None, default None

Returns
-------
np.ndarray[np.intp]

---
## compress_group_index
```python
from sorting import compress_group_index
```

Group_index is offsets into cartesian product of all possible labels. This
space can be huge, so this function compresses it, by computing offsets
(comp_ids) into the list of unique labels (obs_group_ids).

---
## _reorder_by_uniques
```python
from sorting import _reorder_by_uniques
```

Parameters
----------
uniques : np.ndarray[np.int64]
labels : np.ndarray[np.intp]

Returns
-------
np.ndarray[np.int64]
np.ndarray[np.intp]

---
## _int64_cut_off
```python
from sorting import _int64_cut_off
```



---
## maybe_lift
```python
from sorting import maybe_lift
```



---
## flatten
```python
from common import flatten
```

Flatten an arbitrarily nested sequence.

Parameters
----------
line : sequence
    The non string sequence to flatten

Notes
-----
This doesn't consider strings sequences.

Returns
-------
flattened : generator

---
## consensus_name_attr
```python
from common import consensus_name_attr
```



---
## is_bool_indexer
```python
from common import is_bool_indexer
```

Check whether `key` is a valid boolean indexer.

Parameters
----------
key : Any
    Only list-likes may be considered boolean indexers.
    All other types are not considered a boolean indexer.
    For array-like input, boolean ndarrays or ExtensionArrays
    with ``_is_boolean`` set are considered boolean indexers.

Returns
-------
bool
    Whether `key` is a valid boolean indexer.

Raises
------
ValueError
    When the array is an object-dtype ndarray or ExtensionArray
    and contains missing values.

See Also
--------
check_array_indexer : Check that `key` is a valid array to index,
    and convert to an ndarray.

---
## cast_scalar_indexer
```python
from common import cast_scalar_indexer
```

Disallow indexing with a float key, even if that key is a round number.

Parameters
----------
val : scalar

Returns
-------
outval : scalar

---
## not_none
```python
from common import not_none
```

Returns a generator consisting of the arguments that are not None.

---
## any_none
```python
from common import any_none
```

Returns a boolean indicating if any argument is None.

---
## all_none
```python
from common import all_none
```

Returns a boolean indicating if all arguments are None.

---
## any_not_none
```python
from common import any_not_none
```

Returns a boolean indicating if any argument is not None.

---
## all_not_none
```python
from common import all_not_none
```

Returns a boolean indicating if all arguments are not None.

---
## count_not_none
```python
from common import count_not_none
```

Returns the count of arguments that are not None.

---
## asarray_tuplesafe
```python
from common import asarray_tuplesafe
```



---
## index_labels_to_array
```python
from common import index_labels_to_array
```

Transform label or iterable of labels to array, for use in Index.

Parameters
----------
dtype : dtype
    If specified, use as dtype of the resulting array, otherwise infer.

Returns
-------
array

---
## maybe_make_list
```python
from common import maybe_make_list
```



---
## maybe_iterable_to_list
```python
from common import maybe_iterable_to_list
```

If obj is Iterable but not list-like, consume into list.

---
## is_null_slice
```python
from common import is_null_slice
```

We have a null slice.

---
## is_empty_slice
```python
from common import is_empty_slice
```

We have an empty slice, e.g. no values are selected.

---
## is_true_slices
```python
from common import is_true_slices
```

Find non-trivial slices in "line": return a list of booleans with same length.

---
## is_full_slice
```python
from common import is_full_slice
```

We have a full length slice.

---
## get_callable_name
```python
from common import get_callable_name
```



---
## apply_if_callable
```python
from common import apply_if_callable
```

Evaluate possibly callable input using obj and kwargs if it is callable,
otherwise return as it is.

Parameters
----------
maybe_callable : possibly a callable
obj : NDFrame
**kwargs

---
## standardize_mapping
```python
from common import standardize_mapping
```

Helper function to standardize a supplied mapping.

Parameters
----------
into : instance or subclass of collections.abc.Mapping
    Must be a class, an initialized collections.defaultdict,
    or an instance of a collections.abc.Mapping subclass.

Returns
-------
mapping : a collections.abc.Mapping subclass or other constructor
    a callable object that can accept an iterator to create
    the desired Mapping.

See Also
--------
DataFrame.to_dict
Series.to_dict

---
## random_state
```python
from common import random_state
```

Helper function for processing random_state arguments.

Parameters
----------
state : int, array-like, BitGenerator, Generator, np.random.RandomState, None.
    If receives an int, array-like, or BitGenerator, passes to
    np.random.RandomState() as seed.
    If receives an np.random RandomState or Generator, just returns that unchanged.
    If receives `None`, returns np.random.
    If receives anything else, raises an informative ValueError.

    Default None.

Returns
-------
np.random.RandomState or np.random.Generator. If state is None, returns np.random

---
## pipe
```python
from common import pipe
```

Apply a function ``func`` to object ``obj`` either by passing obj as the
first argument to the function or, in the case that the func is a tuple,
interpret the first element of the tuple as a function and pass the obj to
that function as a keyword argument whose key is the value of the second
element of the tuple.

Parameters
----------
func : callable or tuple of (callable, str)
    Function to apply to this object or, alternatively, a
    ``(callable, data_keyword)`` tuple where ``data_keyword`` is a
    string indicating the keyword of ``callable`` that expects the
    object.
*args : iterable, optional
    Positional arguments passed into ``func``.
**kwargs : dict, optional
    A dictionary of keyword arguments passed into ``func``.

Returns
-------
object : the return type of ``func``.

---
## get_rename_function
```python
from common import get_rename_function
```

Returns a function that will map names/labels, dependent if mapper
is a dict, Series or just a function.

---
## convert_to_list_like
```python
from common import convert_to_list_like
```

Convert list-like or scalar input to list-like. List, numpy and pandas array-like
inputs are returned unmodified whereas others are converted to list.

---
## temp_setattr
```python
from common import temp_setattr
```

Temporarily set attribute on an object.

Parameters
----------
obj : object
    Object whose attribute will be modified.
attr : str
    Attribute to modify.
value : Any
    Value to temporarily set attribute to.
condition : bool, default True
    Whether to set the attribute. Provided in order to not have to
    conditionally use this context manager.

Yields
------
object : obj with modified attribute.

---
## require_length_match
```python
from common import require_length_match
```

Check the length of data matches the length of the index.

---
## get_cython_func
```python
from common import get_cython_func
```

if we define an internal function for this argument, return it

---
## is_builtin_func
```python
from common import is_builtin_func
```

if we define a builtin function for this argument, return it,
otherwise return the arg

---
## fill_missing_names
```python
from common import fill_missing_names
```

If a name is missing then replace it by level_n, where n is the count

.. versionadded:: 1.4.0

Parameters
----------
names : list-like
    list of column names or None values.

Returns
-------
list
    list of column names with the None values replaced.

---
## f
```python
from common import f
```



---
## __name__
```python
from frame import __name__
```

DataFrame
---------
An efficient 2D container for potentially mixed-type time series or other
labeled data series.

Similar to its R counterpart, data.frame, except providing automatic data
alignment and a host of useful data manipulation methods having to do with the
labeling information

---
## DataFrame
```python
from frame import DataFrame
```

Two-dimensional, size-mutable, potentially heterogeneous tabular data.

Data structure also contains labeled axes (rows and columns).
Arithmetic operations align on both row and column labels. Can be
thought of as a dict-like container for Series objects. The primary
pandas data structure.

Parameters
----------
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
    Dict can contain Series, arrays, constants, dataclass or list-like objects. If
    data is a dict, column order follows insertion-order. If a dict contains Series
    which have an index defined, it is aligned by its index. This alignment also
    occurs if data is a Series or a DataFrame itself. Alignment is done on
    Series/DataFrame inputs.

    If data is a list of dicts, column order follows insertion-order.

index : Index or array-like
    Index to use for resulting frame. Will default to RangeIndex if
    no indexing information part of input data and no index provided.
columns : Index or array-like
    Column labels to use for resulting frame when data does not have them,
    defaulting to RangeIndex(0, 1, 2, ..., n). If data contains column labels,
    will perform column selection instead.
dtype : dtype, default None
    Data type to force. Only a single dtype is allowed. If None, infer.
copy : bool or None, default None
    Copy data from inputs.
    For dict data, the default of None behaves like ``copy=True``.  For DataFrame
    or 2d ndarray input, the default of None behaves like ``copy=False``.
    If data is a dict containing one or more Series (possibly of different dtypes),
    ``copy=False`` will ensure that these inputs are not copied.

    .. versionchanged:: 1.3.0

See Also
--------
DataFrame.from_records : Constructor from tuples, also record arrays.
DataFrame.from_dict : From dicts of Series, arrays, or dicts.
read_csv : Read a comma-separated values (csv) file into DataFrame.
read_table : Read general delimited file into DataFrame.
read_clipboard : Read text from clipboard into DataFrame.

Notes
-----
Please reference the :ref:`User Guide <basics.dataframe>` for more information.

Examples
--------
Constructing DataFrame from a dictionary.

>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df
   col1  col2
0     1     3
1     2     4

Notice that the inferred dtype is int64.

>>> df.dtypes
col1    int64
col2    int64
dtype: object

To enforce a single dtype:

>>> df = pd.DataFrame(data=d, dtype=np.int8)
>>> df.dtypes
col1    int8
col2    int8
dtype: object

Constructing DataFrame from a dictionary including Series:

>>> d = {'col1': [0, 1, 2, 3], 'col2': pd.Series([2, 3], index=[2, 3])}
>>> pd.DataFrame(data=d, index=[0, 1, 2, 3])
   col1  col2
0     0   NaN
1     1   NaN
2     2   2.0
3     3   3.0

Constructing DataFrame from numpy ndarray:

>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
...                    columns=['a', 'b', 'c'])
>>> df2
   a  b  c
0  1  2  3
1  4  5  6
2  7  8  9

Constructing DataFrame from a numpy ndarray that has labeled columns:

>>> data = np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)],
...                 dtype=[("a", "i4"), ("b", "i4"), ("c", "i4")])
>>> df3 = pd.DataFrame(data, columns=['c', 'a'])
...
>>> df3
   c  a
0  3  1
1  6  4
2  9  7

Constructing DataFrame from dataclass:

>>> from dataclasses import make_dataclass
>>> Point = make_dataclass("Point", [("x", int), ("y", int)])
>>> pd.DataFrame([Point(0, 0), Point(0, 3), Point(2, 3)])
   x  y
0  0  0
1  0  3
2  2  3

Constructing DataFrame from Series/DataFrame:

>>> ser = pd.Series([1, 2, 3], index=["a", "b", "c"])
>>> df = pd.DataFrame(data=ser, index=["a", "c"])
>>> df
   0
a  1
c  3

>>> df1 = pd.DataFrame([1, 2, 3], index=["a", "b", "c"], columns=["x"])
>>> df2 = pd.DataFrame(data=df1, index=["a", "c"])
>>> df2
   x
a  1
c  3

---
## _from_nested_dict
```python
from frame import _from_nested_dict
```



---
## _reindex_for_setitem
```python
from frame import _reindex_for_setitem
```



---
## _constructor
```python
from frame import _constructor
```



---
## _constructor_from_mgr
```python
from frame import _constructor_from_mgr
```



---
## _constructor_sliced_from_mgr
```python
from frame import _constructor_sliced_from_mgr
```



---
## __init__
```python
from frame import __init__
```



---
## __dataframe__
```python
from frame import __dataframe__
```

Return the dataframe interchange object implementing the interchange protocol.

Parameters
----------
nan_as_null : bool, default False
    `nan_as_null` is DEPRECATED and has no effect. Please avoid using
    it; it will be removed in a future release.
allow_copy : bool, default True
    Whether to allow memory copying when exporting. If set to False
    it would cause non-zero-copy exports to fail.

Returns
-------
DataFrame interchange object
    The object which consuming library can use to ingress the dataframe.

Notes
-----
Details on the interchange protocol:
https://data-apis.org/dataframe-protocol/latest/index.html

Examples
--------
>>> df_not_necessarily_pandas = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> interchange_object = df_not_necessarily_pandas.__dataframe__()
>>> interchange_object.column_names()
Index(['A', 'B'], dtype='object')
>>> df_pandas = (pd.api.interchange.from_dataframe
...              (interchange_object.select_columns_by_name(['A'])))
>>> df_pandas
     A
0    1
1    2

These methods (``column_names``, ``select_columns_by_name``) should work
for any dataframe library which implements the interchange protocol.

---
## __dataframe_consortium_standard__
```python
from frame import __dataframe_consortium_standard__
```

Provide entry point to the Consortium DataFrame Standard API.

This is developed and maintained outside of pandas.
Please report any issues to https://github.com/data-apis/dataframe-api-compat.

---
## __arrow_c_stream__
```python
from frame import __arrow_c_stream__
```

Export the pandas DataFrame as an Arrow C stream PyCapsule.

This relies on pyarrow to convert the pandas DataFrame to the Arrow
format (and follows the default behaviour of ``pyarrow.Table.from_pandas``
in its handling of the index, i.e. store the index as a column except
for RangeIndex).
This conversion is not necessarily zero-copy.

Parameters
----------
requested_schema : PyCapsule, default None
    The schema to which the dataframe should be casted, passed as a
    PyCapsule containing a C ArrowSchema representation of the
    requested schema.

Returns
-------
PyCapsule

---
## axes
```python
from frame import axes
```

Return a list representing the axes of the DataFrame.

It has the row axis labels and column axis labels as the only members.
They are returned in that order.

Examples
--------
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.axes
[RangeIndex(start=0, stop=2, step=1), Index(['col1', 'col2'],
dtype='object')]

---
## shape
```python
from frame import shape
```

Return a tuple representing the dimensionality of the DataFrame.

See Also
--------
ndarray.shape : Tuple of array dimensions.

Examples
--------
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df.shape
(2, 2)

>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4],
...                    'col3': [5, 6]})
>>> df.shape
(2, 3)

---
## _is_homogeneous_type
```python
from frame import _is_homogeneous_type
```

Whether all the columns in a DataFrame have the same type.

Returns
-------
bool

Examples
--------
>>> DataFrame({"A": [1, 2], "B": [3, 4]})._is_homogeneous_type
True
>>> DataFrame({"A": [1, 2], "B": [3.0, 4.0]})._is_homogeneous_type
False

Items with the same type but different sizes are considered
different types.

>>> DataFrame({
...    "A": np.array([1, 2], dtype=np.int32),
...    "B": np.array([1, 2], dtype=np.int64)})._is_homogeneous_type
False

---
## _can_fast_transpose
```python
from frame import _can_fast_transpose
```

Can we transpose this DataFrame without creating any new array objects.

---
## _values
```python
from frame import _values
```

Analogue to ._values that may return a 2D ExtensionArray.

---
## _repr_fits_vertical_
```python
from frame import _repr_fits_vertical_
```

Check length against max_rows.

---
## _repr_fits_horizontal_
```python
from frame import _repr_fits_horizontal_
```

Check if full repr fits in horizontal boundaries imposed by the display
options width and max_columns.

---
## _info_repr
```python
from frame import _info_repr
```

True if the repr should show the info view.

---
## __repr__
```python
from frame import __repr__
```

Return a string representation for a particular DataFrame.

---
## _repr_html_
```python
from frame import _repr_html_
```

Return a html representation for a particular DataFrame.

Mainly for IPython notebook.

---
## to_string
```python
from frame import to_string
```

Render a DataFrame to a console-friendly tabular output.
%(shared_params)s
line_width : int, optional
    Width to wrap a line in characters.
min_rows : int, optional
    The number of rows to display in the console in a truncated repr
    (when number of rows is above `max_rows`).
max_colwidth : int, optional
    Max width to truncate each column in characters. By default, no limit.
encoding : str, default "utf-8"
    Set character encoding.
%(returns)s
See Also
--------
to_html : Convert DataFrame to HTML.

Examples
--------
>>> d = {'col1': [1, 2, 3], 'col2': [4, 5, 6]}
>>> df = pd.DataFrame(d)
>>> print(df.to_string())
   col1  col2
0     1     4
1     2     5
2     3     6

---
## _get_values_for_csv
```python
from frame import _get_values_for_csv
```



---
## style
```python
from frame import style
```

Returns a Styler object.

Contains methods for building a styled HTML representation of the DataFrame.

See Also
--------
io.formats.style.Styler : Helps style a DataFrame or Series according to the
    data with HTML and CSS.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2, 3]})
>>> df.style  # doctest: +SKIP

Please see
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## items
```python
from frame import items
```



---
## iterrows
```python
from frame import iterrows
```

Iterate over DataFrame rows as (index, Series) pairs.

Yields
------
index : label or tuple of label
    The index of the row. A tuple for a `MultiIndex`.
data : Series
    The data of the row as a Series.

See Also
--------
DataFrame.itertuples : Iterate over DataFrame rows as namedtuples of the values.
DataFrame.items : Iterate over (column name, Series) pairs.

Notes
-----
1. Because ``iterrows`` returns a Series for each row,
   it does **not** preserve dtypes across the rows (dtypes are
   preserved across columns for DataFrames).

   To preserve dtypes while iterating over the rows, it is better
   to use :meth:`itertuples` which returns namedtuples of the values
   and which is generally faster than ``iterrows``.

2. You should **never modify** something you are iterating over.
   This is not guaranteed to work in all cases. Depending on the
   data types, the iterator returns a copy and not a view, and writing
   to it will have no effect.

Examples
--------

>>> df = pd.DataFrame([[1, 1.5]], columns=['int', 'float'])
>>> row = next(df.iterrows())[1]
>>> row
int      1.0
float    1.5
Name: 0, dtype: float64
>>> print(row['int'].dtype)
float64
>>> print(df['int'].dtype)
int64

---
## itertuples
```python
from frame import itertuples
```

Iterate over DataFrame rows as namedtuples.

Parameters
----------
index : bool, default True
    If True, return the index as the first element of the tuple.
name : str or None, default "Pandas"
    The name of the returned namedtuples or None to return regular
    tuples.

Returns
-------
iterator
    An object to iterate over namedtuples for each row in the
    DataFrame with the first field possibly being the index and
    following fields being the column values.

See Also
--------
DataFrame.iterrows : Iterate over DataFrame rows as (index, Series)
    pairs.
DataFrame.items : Iterate over (column name, Series) pairs.

Notes
-----
The column names will be renamed to positional names if they are
invalid Python identifiers, repeated, or start with an underscore.

Examples
--------
>>> df = pd.DataFrame({'num_legs': [4, 2], 'num_wings': [0, 2]},
...                   index=['dog', 'hawk'])
>>> df
      num_legs  num_wings
dog          4          0
hawk         2          2
>>> for row in df.itertuples():
...     print(row)
...
Pandas(Index='dog', num_legs=4, num_wings=0)
Pandas(Index='hawk', num_legs=2, num_wings=2)

By setting the `index` parameter to False we can remove the index
as the first element of the tuple:

>>> for row in df.itertuples(index=False):
...     print(row)
...
Pandas(num_legs=4, num_wings=0)
Pandas(num_legs=2, num_wings=2)

With the `name` parameter set we set a custom name for the yielded
namedtuples:

>>> for row in df.itertuples(name='Animal'):
...     print(row)
...
Animal(Index='dog', num_legs=4, num_wings=0)
Animal(Index='hawk', num_legs=2, num_wings=2)

---
## __len__
```python
from frame import __len__
```

Returns length of info axis, but here we use the index.

---
## dot
```python
from frame import dot
```

Compute the matrix multiplication between the DataFrame and other.

This method computes the matrix product between the DataFrame and the
values of an other Series, DataFrame or a numpy array.

It can also be called using ``self @ other``.

Parameters
----------
other : Series, DataFrame or array-like
    The other object to compute the matrix product with.

Returns
-------
Series or DataFrame
    If other is a Series, return the matrix product between self and
    other as a Series. If other is a DataFrame or a numpy.array, return
    the matrix product of self and other in a DataFrame of a np.array.

See Also
--------
Series.dot: Similar method for Series.

Notes
-----
The dimensions of DataFrame and other must be compatible in order to
compute the matrix multiplication. In addition, the column names of
DataFrame and the index of other must contain the same values, as they
will be aligned prior to the multiplication.

The dot method for Series computes the inner product, instead of the
matrix product here.

Examples
--------
Here we multiply a DataFrame with a Series.

>>> df = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]])
>>> s = pd.Series([1, 1, 2, 1])
>>> df.dot(s)
0    -4
1     5
dtype: int64

Here we multiply a DataFrame with another DataFrame.

>>> other = pd.DataFrame([[0, 1], [1, 2], [-1, -1], [2, 0]])
>>> df.dot(other)
    0   1
0   1   4
1   2   2

Note that the dot method give the same result as @

>>> df @ other
    0   1
0   1   4
1   2   2

The dot method works also if other is an np.array.

>>> arr = np.array([[0, 1], [1, 2], [-1, -1], [2, 0]])
>>> df.dot(arr)
    0   1
0   1   4
1   2   2

Note how shuffling of the objects does not change the result.

>>> s2 = s.reindex([1, 0, 2, 3])
>>> df.dot(s2)
0    -4
1     5
dtype: int64

---
## __matmul__
```python
from frame import __matmul__
```

Matrix multiplication using binary `@` operator.

---
## __rmatmul__
```python
from frame import __rmatmul__
```

Matrix multiplication using binary `@` operator.

---
## from_dict
```python
from frame import from_dict
```

Construct DataFrame from dict of array-like or dicts.

Creates DataFrame object from dictionary by columns or by index
allowing dtype specification.

Parameters
----------
data : dict
    Of the form {field : array-like} or {field : dict}.
orient : {'columns', 'index', 'tight'}, default 'columns'
    The "orientation" of the data. If the keys of the passed dict
    should be the columns of the resulting DataFrame, pass 'columns'
    (default). Otherwise if the keys should be rows, pass 'index'.
    If 'tight', assume a dict with keys ['index', 'columns', 'data',
    'index_names', 'column_names'].

    .. versionadded:: 1.4.0
       'tight' as an allowed value for the ``orient`` argument

dtype : dtype, default None
    Data type to force after DataFrame construction, otherwise infer.
columns : list, default None
    Column labels to use when ``orient='index'``. Raises a ValueError
    if used with ``orient='columns'`` or ``orient='tight'``.

Returns
-------
DataFrame

See Also
--------
DataFrame.from_records : DataFrame from structured ndarray, sequence
    of tuples or dicts, or DataFrame.
DataFrame : DataFrame object creation using constructor.
DataFrame.to_dict : Convert the DataFrame to a dictionary.

Examples
--------
By default the keys of the dict become the DataFrame columns:

>>> data = {'col_1': [3, 2, 1, 0], 'col_2': ['a', 'b', 'c', 'd']}
>>> pd.DataFrame.from_dict(data)
   col_1 col_2
0      3     a
1      2     b
2      1     c
3      0     d

Specify ``orient='index'`` to create the DataFrame using dictionary
keys as rows:

>>> data = {'row_1': [3, 2, 1, 0], 'row_2': ['a', 'b', 'c', 'd']}
>>> pd.DataFrame.from_dict(data, orient='index')
       0  1  2  3
row_1  3  2  1  0
row_2  a  b  c  d

When using the 'index' orientation, the column names can be
specified manually:

>>> pd.DataFrame.from_dict(data, orient='index',
...                        columns=['A', 'B', 'C', 'D'])
       A  B  C  D
row_1  3  2  1  0
row_2  a  b  c  d

Specify ``orient='tight'`` to create the DataFrame using a 'tight'
format:

>>> data = {'index': [('a', 'b'), ('a', 'c')],
...         'columns': [('x', 1), ('y', 2)],
...         'data': [[1, 3], [2, 4]],
...         'index_names': ['n1', 'n2'],
...         'column_names': ['z1', 'z2']}
>>> pd.DataFrame.from_dict(data, orient='tight')
z1     x  y
z2     1  2
n1 n2
a  b   1  3
   c   2  4

---
## to_numpy
```python
from frame import to_numpy
```

Convert the DataFrame to a NumPy array.

By default, the dtype of the returned array will be the common NumPy
dtype of all types in the DataFrame. For example, if the dtypes are
``float16`` and ``float32``, the results dtype will be ``float32``.
This may require copying data and coercing values, which may be
expensive.

Parameters
----------
dtype : str or numpy.dtype, optional
    The dtype to pass to :meth:`numpy.asarray`.
copy : bool, default False
    Whether to ensure that the returned value is not a view on
    another array. Note that ``copy=False`` does not *ensure* that
    ``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that
    a copy is made, even if not strictly necessary.
na_value : Any, optional
    The value to use for missing values. The default value depends
    on `dtype` and the dtypes of the DataFrame columns.

Returns
-------
numpy.ndarray

See Also
--------
Series.to_numpy : Similar method for Series.

Examples
--------
>>> pd.DataFrame({"A": [1, 2], "B": [3, 4]}).to_numpy()
array([[1, 3],
       [2, 4]])

With heterogeneous data, the lowest common type will have to
be used.

>>> df = pd.DataFrame({"A": [1, 2], "B": [3.0, 4.5]})
>>> df.to_numpy()
array([[1. , 3. ],
       [2. , 4.5]])

For a mix of numeric and non-numeric types, the output array will
have object dtype.

>>> df['C'] = pd.date_range('2000', periods=2)
>>> df.to_numpy()
array([[1, 3.0, Timestamp('2000-01-01 00:00:00')],
       [2, 4.5, Timestamp('2000-01-02 00:00:00')]], dtype=object)

---
## _create_data_for_split_and_tight_to_dict
```python
from frame import _create_data_for_split_and_tight_to_dict
```

Simple helper method to create data for to ``to_dict(orient="split")`` and
``to_dict(orient="tight")`` to create the main output data

---
## to_dict
```python
from frame import to_dict
```

Convert the DataFrame to a dictionary.

The type of the key-value pairs can be customized with the parameters
(see below).

Parameters
----------
orient : str {'dict', 'list', 'series', 'split', 'tight', 'records', 'index'}
    Determines the type of the values of the dictionary.

    - 'dict' (default) : dict like {column -> {index -> value}}
    - 'list' : dict like {column -> [values]}
    - 'series' : dict like {column -> Series(values)}
    - 'split' : dict like
      {'index' -> [index], 'columns' -> [columns], 'data' -> [values]}
    - 'tight' : dict like
      {'index' -> [index], 'columns' -> [columns], 'data' -> [values],
      'index_names' -> [index.names], 'column_names' -> [column.names]}
    - 'records' : list like
      [{column -> value}, ... , {column -> value}]
    - 'index' : dict like {index -> {column -> value}}

    .. versionadded:: 1.4.0
        'tight' as an allowed value for the ``orient`` argument

into : class, default dict
    The collections.abc.MutableMapping subclass used for all Mappings
    in the return value.  Can be the actual class or an empty
    instance of the mapping type you want.  If you want a
    collections.defaultdict, you must pass it initialized.

index : bool, default True
    Whether to include the index item (and index_names item if `orient`
    is 'tight') in the returned dictionary. Can only be ``False``
    when `orient` is 'split' or 'tight'.

    .. versionadded:: 2.0.0

Returns
-------
dict, list or collections.abc.MutableMapping
    Return a collections.abc.MutableMapping object representing the
    DataFrame. The resulting transformation depends on the `orient`
    parameter.

See Also
--------
DataFrame.from_dict: Create a DataFrame from a dictionary.
DataFrame.to_json: Convert a DataFrame to JSON format.

Examples
--------
>>> df = pd.DataFrame({'col1': [1, 2],
...                    'col2': [0.5, 0.75]},
...                   index=['row1', 'row2'])
>>> df
      col1  col2
row1     1  0.50
row2     2  0.75
>>> df.to_dict()
{'col1': {'row1': 1, 'row2': 2}, 'col2': {'row1': 0.5, 'row2': 0.75}}

You can specify the return orientation.

>>> df.to_dict('series')
{'col1': row1    1
         row2    2
Name: col1, dtype: int64,
'col2': row1    0.50
        row2    0.75
Name: col2, dtype: float64}

>>> df.to_dict('split')
{'index': ['row1', 'row2'], 'columns': ['col1', 'col2'],
 'data': [[1, 0.5], [2, 0.75]]}

>>> df.to_dict('records')
[{'col1': 1, 'col2': 0.5}, {'col1': 2, 'col2': 0.75}]

>>> df.to_dict('index')
{'row1': {'col1': 1, 'col2': 0.5}, 'row2': {'col1': 2, 'col2': 0.75}}

>>> df.to_dict('tight')
{'index': ['row1', 'row2'], 'columns': ['col1', 'col2'],
 'data': [[1, 0.5], [2, 0.75]], 'index_names': [None], 'column_names': [None]}

You can also specify the mapping type.

>>> from collections import OrderedDict, defaultdict
>>> df.to_dict(into=OrderedDict)
OrderedDict([('col1', OrderedDict([('row1', 1), ('row2', 2)])),
             ('col2', OrderedDict([('row1', 0.5), ('row2', 0.75)]))])

If you want a `defaultdict`, you need to initialize it:

>>> dd = defaultdict(list)
>>> df.to_dict('records', into=dd)
[defaultdict(<class 'list'>, {'col1': 1, 'col2': 0.5}),
 defaultdict(<class 'list'>, {'col1': 2, 'col2': 0.75})]

---
## to_gbq
```python
from frame import to_gbq
```

Write a DataFrame to a Google BigQuery table.

.. deprecated:: 2.2.0

   Please use ``pandas_gbq.to_gbq`` instead.

This function requires the `pandas-gbq package
<https://pandas-gbq.readthedocs.io>`__.

See the `How to authenticate with Google BigQuery
<https://pandas-gbq.readthedocs.io/en/latest/howto/authentication.html>`__
guide for authentication instructions.

Parameters
----------
destination_table : str
    Name of table to be written, in the form ``dataset.tablename``.
project_id : str, optional
    Google BigQuery Account project ID. Optional when available from
    the environment.
chunksize : int, optional
    Number of rows to be inserted in each chunk from the dataframe.
    Set to ``None`` to load the whole dataframe at once.
reauth : bool, default False
    Force Google BigQuery to re-authenticate the user. This is useful
    if multiple accounts are used.
if_exists : str, default 'fail'
    Behavior when the destination table exists. Value can be one of:

    ``'fail'``
        If table exists raise pandas_gbq.gbq.TableCreationError.
    ``'replace'``
        If table exists, drop it, recreate it, and insert data.
    ``'append'``
        If table exists, insert data. Create if does not exist.
auth_local_webserver : bool, default True
    Use the `local webserver flow`_ instead of the `console flow`_
    when getting user credentials.

    .. _local webserver flow:
        https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_local_server
    .. _console flow:
        https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_console

    *New in version 0.2.0 of pandas-gbq*.

    .. versionchanged:: 1.5.0
       Default value is changed to ``True``. Google has deprecated the
       ``auth_local_webserver = False`` `"out of band" (copy-paste)
       flow
       <https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob>`_.
table_schema : list of dicts, optional
    List of BigQuery table fields to which according DataFrame
    columns conform to, e.g. ``[{'name': 'col1', 'type':
    'STRING'},...]``. If schema is not provided, it will be
    generated according to dtypes of DataFrame columns. See
    BigQuery API documentation on available names of a field.

    *New in version 0.3.1 of pandas-gbq*.
location : str, optional
    Location where the load job should run. See the `BigQuery locations
    documentation
    <https://cloud.google.com/bigquery/docs/dataset-locations>`__ for a
    list of available locations. The location must match that of the
    target dataset.

    *New in version 0.5.0 of pandas-gbq*.
progress_bar : bool, default True
    Use the library `tqdm` to show the progress bar for the upload,
    chunk by chunk.

    *New in version 0.5.0 of pandas-gbq*.
credentials : google.auth.credentials.Credentials, optional
    Credentials for accessing Google APIs. Use this parameter to
    override default credentials, such as to use Compute Engine
    :class:`google.auth.compute_engine.Credentials` or Service
    Account :class:`google.oauth2.service_account.Credentials`
    directly.

    *New in version 0.8.0 of pandas-gbq*.

See Also
--------
pandas_gbq.to_gbq : This function in the pandas-gbq library.
read_gbq : Read a DataFrame from Google BigQuery.

Examples
--------
Example taken from `Google BigQuery documentation
<https://cloud.google.com/bigquery/docs/samples/bigquery-pandas-gbq-to-gbq-simple>`_

>>> project_id = "my-project"
>>> table_id = 'my_dataset.my_table'
>>> df = pd.DataFrame({
...                   "my_string": ["a", "b", "c"],
...                   "my_int64": [1, 2, 3],
...                   "my_float64": [4.0, 5.0, 6.0],
...                   "my_bool1": [True, False, True],
...                   "my_bool2": [False, True, False],
...                   "my_dates": pd.date_range("now", periods=3),
...                   }
...                   )

>>> df.to_gbq(table_id, project_id=project_id)  # doctest: +SKIP

---
## from_records
```python
from frame import from_records
```

Convert structured or record ndarray to DataFrame.

Creates a DataFrame object from a structured ndarray, sequence of
tuples or dicts, or DataFrame.

Parameters
----------
data : structured ndarray, sequence of tuples or dicts, or DataFrame
    Structured input data.

    .. deprecated:: 2.1.0
        Passing a DataFrame is deprecated.
index : str, list of fields, array-like
    Field of array to use as the index, alternately a specific set of
    input labels to use.
exclude : sequence, default None
    Columns or fields to exclude.
columns : sequence, default None
    Column names to use. If the passed data do not have names
    associated with them, this argument provides names for the
    columns. Otherwise this argument indicates the order of the columns
    in the result (any names not found in the data will become all-NA
    columns).
coerce_float : bool, default False
    Attempt to convert values of non-string, non-numeric objects (like
    decimal.Decimal) to floating point, useful for SQL result sets.
nrows : int, default None
    Number of rows to read if data is an iterator.

Returns
-------
DataFrame

See Also
--------
DataFrame.from_dict : DataFrame from dict of array-like or dicts.
DataFrame : DataFrame object creation using constructor.

Examples
--------
Data can be provided as a structured ndarray:

>>> data = np.array([(3, 'a'), (2, 'b'), (1, 'c'), (0, 'd')],
...                 dtype=[('col_1', 'i4'), ('col_2', 'U1')])
>>> pd.DataFrame.from_records(data)
   col_1 col_2
0      3     a
1      2     b
2      1     c
3      0     d

Data can be provided as a list of dicts:

>>> data = [{'col_1': 3, 'col_2': 'a'},
...         {'col_1': 2, 'col_2': 'b'},
...         {'col_1': 1, 'col_2': 'c'},
...         {'col_1': 0, 'col_2': 'd'}]
>>> pd.DataFrame.from_records(data)
   col_1 col_2
0      3     a
1      2     b
2      1     c
3      0     d

Data can be provided as a list of tuples with corresponding columns:

>>> data = [(3, 'a'), (2, 'b'), (1, 'c'), (0, 'd')]
>>> pd.DataFrame.from_records(data, columns=['col_1', 'col_2'])
   col_1 col_2
0      3     a
1      2     b
2      1     c
3      0     d

---
## to_records
```python
from frame import to_records
```

Convert DataFrame to a NumPy record array.

Index will be included as the first field of the record array if
requested.

Parameters
----------
index : bool, default True
    Include index in resulting record array, stored in 'index'
    field or using the index label, if set.
column_dtypes : str, type, dict, default None
    If a string or type, the data type to store all columns. If
    a dictionary, a mapping of column names and indices (zero-indexed)
    to specific data types.
index_dtypes : str, type, dict, default None
    If a string or type, the data type to store all index levels. If
    a dictionary, a mapping of index level names and indices
    (zero-indexed) to specific data types.

    This mapping is applied only if `index=True`.

Returns
-------
numpy.rec.recarray
    NumPy ndarray with the DataFrame labels as fields and each row
    of the DataFrame as entries.

See Also
--------
DataFrame.from_records: Convert structured or record ndarray
    to DataFrame.
numpy.rec.recarray: An ndarray that allows field access using
    attributes, analogous to typed columns in a
    spreadsheet.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [0.5, 0.75]},
...                   index=['a', 'b'])
>>> df
   A     B
a  1  0.50
b  2  0.75
>>> df.to_records()
rec.array([('a', 1, 0.5 ), ('b', 2, 0.75)],
          dtype=[('index', 'O'), ('A', '<i8'), ('B', '<f8')])

If the DataFrame index has no label then the recarray field name
is set to 'index'. If the index has a label then this is used as the
field name:

>>> df.index = df.index.rename("I")
>>> df.to_records()
rec.array([('a', 1, 0.5 ), ('b', 2, 0.75)],
          dtype=[('I', 'O'), ('A', '<i8'), ('B', '<f8')])

The index can be excluded from the record array:

>>> df.to_records(index=False)
rec.array([(1, 0.5 ), (2, 0.75)],
          dtype=[('A', '<i8'), ('B', '<f8')])

Data types can be specified for the columns:

>>> df.to_records(column_dtypes={"A": "int32"})
rec.array([('a', 1, 0.5 ), ('b', 2, 0.75)],
          dtype=[('I', 'O'), ('A', '<i4'), ('B', '<f8')])

As well as for the index:

>>> df.to_records(index_dtypes="<S2")
rec.array([(b'a', 1, 0.5 ), (b'b', 2, 0.75)],
          dtype=[('I', 'S2'), ('A', '<i8'), ('B', '<f8')])

>>> index_dtypes = f"<S{df.index.str.len().max()}"
>>> df.to_records(index_dtypes=index_dtypes)
rec.array([(b'a', 1, 0.5 ), (b'b', 2, 0.75)],
          dtype=[('I', 'S1'), ('A', '<i8'), ('B', '<f8')])

---
## _from_arrays
```python
from frame import _from_arrays
```

Create DataFrame from a list of arrays corresponding to the columns.

Parameters
----------
arrays : list-like of arrays
    Each array in the list corresponds to one column, in order.
columns : list-like, Index
    The column names for the resulting DataFrame.
index : list-like, Index
    The rows labels for the resulting DataFrame.
dtype : dtype, optional
    Optional dtype to enforce for all arrays.
verify_integrity : bool, default True
    Validate and homogenize all input. If set to False, it is assumed
    that all elements of `arrays` are actual arrays how they will be
    stored in a block (numpy ndarray or ExtensionArray), have the same
    length as and are aligned with the index, and that `columns` and
    `index` are ensured to be an Index object.

Returns
-------
DataFrame

---
## to_stata
```python
from frame import to_stata
```

Export DataFrame object to Stata dta format.

Writes the DataFrame to a Stata dataset file.
"dta" files contain a Stata dataset.

Parameters
----------
path : str, path object, or buffer
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function.

convert_dates : dict
    Dictionary mapping columns containing datetime types to stata
    internal format to use when writing the dates. Options are 'tc',
    'td', 'tm', 'tw', 'th', 'tq', 'ty'. Column can be either an integer
    or a name. Datetime columns that do not have a conversion type
    specified will be converted to 'tc'. Raises NotImplementedError if
    a datetime column has timezone information.
write_index : bool
    Write the index to Stata dataset.
byteorder : str
    Can be ">", "<", "little", or "big". default is `sys.byteorder`.
time_stamp : datetime
    A datetime to use as file creation date.  Default is the current
    time.
data_label : str, optional
    A label for the data set.  Must be 80 characters or smaller.
variable_labels : dict
    Dictionary containing columns as keys and variable labels as
    values. Each label must be 80 characters or smaller.
version : {{114, 117, 118, 119, None}}, default 114
    Version to use in the output dta file. Set to None to let pandas
    decide between 118 or 119 formats depending on the number of
    columns in the frame. Version 114 can be read by Stata 10 and
    later. Version 117 can be read by Stata 13 or later. Version 118
    is supported in Stata 14 and later. Version 119 is supported in
    Stata 15 and later. Version 114 limits string variables to 244
    characters or fewer while versions 117 and later allow strings
    with lengths up to 2,000,000 characters. Versions 118 and 119
    support Unicode characters, and version 119 supports more than
    32,767 variables.

    Version 119 should usually only be used when the number of
    variables exceeds the capacity of dta format 118. Exporting
    smaller datasets in format 119 may have unintended consequences,
    and, as of November 2020, Stata SE cannot read version 119 files.

convert_strl : list, optional
    List of column names to convert to string columns to Stata StrL
    format. Only available if version is 117.  Storing strings in the
    StrL format can produce smaller dta files if strings have more than
    8 characters and values are repeated.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

value_labels : dict of dicts
    Dictionary containing columns as keys and dictionaries of column value
    to labels as values. Labels for a single variable must be 32,000
    characters or smaller.

    .. versionadded:: 1.4.0

Raises
------
NotImplementedError
    * If datetimes contain timezone information
    * Column dtype is not representable in Stata
ValueError
    * Columns listed in convert_dates are neither datetime64[ns]
      or datetime.datetime
    * Column listed in convert_dates is not in DataFrame
    * Categorical label contains more than 32,000 characters

See Also
--------
read_stata : Import Stata data files.
io.stata.StataWriter : Low-level writer for Stata data files.
io.stata.StataWriter117 : Low-level writer for version 117 files.

Examples
--------
>>> df = pd.DataFrame({{'animal': ['falcon', 'parrot', 'falcon',
...                               'parrot'],
...                    'speed': [350, 18, 361, 15]}})
>>> df.to_stata('animals.dta')  # doctest: +SKIP

---
## to_feather
```python
from frame import to_feather
```

Write a DataFrame to the binary Feather format.

Parameters
----------
path : str, path object, file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function. If a string or a path,
    it will be used as Root Directory path when writing a partitioned dataset.
**kwargs :
    Additional keywords passed to :func:`pyarrow.feather.write_feather`.
    This includes the `compression`, `compression_level`, `chunksize`
    and `version` keywords.

Notes
-----
This function writes the dataframe as a `feather file
<https://arrow.apache.org/docs/python/feather.html>`_. Requires a default
index. For saving the DataFrame with your custom index use a method that
supports custom indices e.g. `to_parquet`.

Examples
--------
>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]])
>>> df.to_feather("file.feather")  # doctest: +SKIP

---
## to_markdown
```python
from frame import to_markdown
```



---
## to_parquet
```python
from frame import to_parquet
```

Write a DataFrame to the binary parquet format.

This function writes the dataframe as a `parquet file
<https://parquet.apache.org/>`_. You can choose different parquet
backends, and have the option of compression. See
:ref:`the user guide <io.parquet>` for more details.

Parameters
----------
path : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function. If None, the result is
    returned as bytes. If a string or path, it will be used as Root Directory
    path when writing a partitioned dataset.
engine : {{'auto', 'pyarrow', 'fastparquet'}}, default 'auto'
    Parquet library to use. If 'auto', then the option
    ``io.parquet.engine`` is used. The default ``io.parquet.engine``
    behavior is to try 'pyarrow', falling back to 'fastparquet' if
    'pyarrow' is unavailable.
compression : str or None, default 'snappy'
    Name of the compression to use. Use ``None`` for no compression.
    Supported options: 'snappy', 'gzip', 'brotli', 'lz4', 'zstd'.
index : bool, default None
    If ``True``, include the dataframe's index(es) in the file output.
    If ``False``, they will not be written to the file.
    If ``None``, similar to ``True`` the dataframe's index(es)
    will be saved. However, instead of being saved as values,
    the RangeIndex will be stored as a range in the metadata so it
    doesn't require much space and is faster. Other indexes will
    be included as columns in the file output.
partition_cols : list, optional, default None
    Column names by which to partition the dataset.
    Columns are partitioned in the order they are given.
    Must be None if path is not a string.
{storage_options}

**kwargs
    Additional arguments passed to the parquet library. See
    :ref:`pandas io <io.parquet>` for more details.

Returns
-------
bytes if no path argument is provided else None

See Also
--------
read_parquet : Read a parquet file.
DataFrame.to_orc : Write an orc file.
DataFrame.to_csv : Write a csv file.
DataFrame.to_sql : Write to a sql table.
DataFrame.to_hdf : Write to hdf.

Notes
-----
This function requires either the `fastparquet
<https://pypi.org/project/fastparquet>`_ or `pyarrow
<https://arrow.apache.org/docs/python/>`_ library.

Examples
--------
>>> df = pd.DataFrame(data={{'col1': [1, 2], 'col2': [3, 4]}})
>>> df.to_parquet('df.parquet.gzip',
...               compression='gzip')  # doctest: +SKIP
>>> pd.read_parquet('df.parquet.gzip')  # doctest: +SKIP
   col1  col2
0     1     3
1     2     4

If you want to get a buffer to the parquet content you can use a io.BytesIO
object, as long as you don't use partition_cols, which creates multiple files.

>>> import io
>>> f = io.BytesIO()
>>> df.to_parquet(f)
>>> f.seek(0)
0
>>> content = f.read()

---
## to_orc
```python
from frame import to_orc
```

Write a DataFrame to the ORC format.

.. versionadded:: 1.5.0

Parameters
----------
path : str, file-like object or None, default None
    If a string, it will be used as Root Directory path
    when writing a partitioned dataset. By file-like object,
    we refer to objects with a write() method, such as a file handle
    (e.g. via builtin open function). If path is None,
    a bytes object is returned.
engine : {'pyarrow'}, default 'pyarrow'
    ORC library to use.
index : bool, optional
    If ``True``, include the dataframe's index(es) in the file output.
    If ``False``, they will not be written to the file.
    If ``None``, similar to ``infer`` the dataframe's index(es)
    will be saved. However, instead of being saved as values,
    the RangeIndex will be stored as a range in the metadata so it
    doesn't require much space and is faster. Other indexes will
    be included as columns in the file output.
engine_kwargs : dict[str, Any] or None, default None
    Additional keyword arguments passed to :func:`pyarrow.orc.write_table`.

Returns
-------
bytes if no path argument is provided else None

Raises
------
NotImplementedError
    Dtype of one or more columns is category, unsigned integers, interval,
    period or sparse.
ValueError
    engine is not pyarrow.

See Also
--------
read_orc : Read a ORC file.
DataFrame.to_parquet : Write a parquet file.
DataFrame.to_csv : Write a csv file.
DataFrame.to_sql : Write to a sql table.
DataFrame.to_hdf : Write to hdf.

Notes
-----
* Before using this function you should read the :ref:`user guide about
  ORC <io.orc>` and :ref:`install optional dependencies <install.warn_orc>`.
* This function requires `pyarrow <https://arrow.apache.org/docs/python/>`_
  library.
* For supported dtypes please refer to `supported ORC features in Arrow
  <https://arrow.apache.org/docs/cpp/orc.html#data-types>`__.
* Currently timezones in datetime columns are not preserved when a
  dataframe is converted into ORC files.

Examples
--------
>>> df = pd.DataFrame(data={'col1': [1, 2], 'col2': [4, 3]})
>>> df.to_orc('df.orc')  # doctest: +SKIP
>>> pd.read_orc('df.orc')  # doctest: +SKIP
   col1  col2
0     1     4
1     2     3

If you want to get a buffer to the orc content you can write it to io.BytesIO

>>> import io
>>> b = io.BytesIO(df.to_orc())  # doctest: +SKIP
>>> b.seek(0)  # doctest: +SKIP
0
>>> content = b.read()  # doctest: +SKIP

---
## to_html
```python
from frame import to_html
```

Render a DataFrame as an HTML table.
%(shared_params)s
bold_rows : bool, default True
    Make the row labels bold in the output.
classes : str or list or tuple, default None
    CSS class(es) to apply to the resulting html table.
escape : bool, default True
    Convert the characters <, >, and & to HTML-safe sequences.
notebook : {True, False}, default False
    Whether the generated HTML is for IPython Notebook.
border : int
    A ``border=border`` attribute is included in the opening
    `<table>` tag. Default ``pd.options.display.html.border``.
table_id : str, optional
    A css id is included in the opening `<table>` tag if specified.
render_links : bool, default False
    Convert URLs to HTML links.
encoding : str, default "utf-8"
    Set character encoding.
%(returns)s
See Also
--------
to_string : Convert DataFrame to a string.

Examples
--------
>>> df = pd.DataFrame(data={'col1': [1, 2], 'col2': [4, 3]})
>>> html_string = '''<table border="1" class="dataframe">
...   <thead>
...     <tr style="text-align: right;">
...       <th></th>
...       <th>col1</th>
...       <th>col2</th>
...     </tr>
...   </thead>
...   <tbody>
...     <tr>
...       <th>0</th>
...       <td>1</td>
...       <td>4</td>
...     </tr>
...     <tr>
...       <th>1</th>
...       <td>2</td>
...       <td>3</td>
...     </tr>
...   </tbody>
... </table>'''
>>> assert html_string == df.to_html()

---
## to_xml
```python
from frame import to_xml
```

Render a DataFrame to an XML document.

.. versionadded:: 1.3.0

Parameters
----------
path_or_buffer : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a ``write()`` function. If None, the result is returned
    as a string.
index : bool, default True
    Whether to include index in XML document.
root_name : str, default 'data'
    The name of root element in XML document.
row_name : str, default 'row'
    The name of row element in XML document.
na_rep : str, optional
    Missing data representation.
attr_cols : list-like, optional
    List of columns to write as attributes in row element.
    Hierarchical columns will be flattened with underscore
    delimiting the different levels.
elem_cols : list-like, optional
    List of columns to write as children in row element. By default,
    all columns output as children of row element. Hierarchical
    columns will be flattened with underscore delimiting the
    different levels.
namespaces : dict, optional
    All namespaces to be defined in root element. Keys of dict
    should be prefix names and values of dict corresponding URIs.
    Default namespaces should be given empty string key. For
    example, ::

        namespaces = {{"": "https://example.com"}}

prefix : str, optional
    Namespace prefix to be used for every element and/or attribute
    in document. This should be one of the keys in ``namespaces``
    dict.
encoding : str, default 'utf-8'
    Encoding of the resulting document.
xml_declaration : bool, default True
    Whether to include the XML declaration at start of document.
pretty_print : bool, default True
    Whether output should be pretty printed with indentation and
    line breaks.
parser : {{'lxml','etree'}}, default 'lxml'
    Parser module to use for building of tree. Only 'lxml' and
    'etree' are supported. With 'lxml', the ability to use XSLT
    stylesheet is supported.
stylesheet : str, path object or file-like object, optional
    A URL, file-like object, or a raw string containing an XSLT
    script used to transform the raw XML output. Script should use
    layout of elements and attributes from original output. This
    argument requires ``lxml`` to be installed. Only XSLT 1.0
    scripts and not later versions is currently supported.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

Returns
-------
None or str
    If ``io`` is None, returns the resulting XML format as a
    string. Otherwise returns None.

See Also
--------
to_json : Convert the pandas object to a JSON string.
to_html : Convert DataFrame to a html.

Examples
--------
>>> df = pd.DataFrame({{'shape': ['square', 'circle', 'triangle'],
...                    'degrees': [360, 360, 180],
...                    'sides': [4, np.nan, 3]}})

>>> df.to_xml()  # doctest: +SKIP
<?xml version='1.0' encoding='utf-8'?>
<data>
  <row>
    <index>0</index>
    <shape>square</shape>
    <degrees>360</degrees>
    <sides>4.0</sides>
  </row>
  <row>
    <index>1</index>
    <shape>circle</shape>
    <degrees>360</degrees>
    <sides/>
  </row>
  <row>
    <index>2</index>
    <shape>triangle</shape>
    <degrees>180</degrees>
    <sides>3.0</sides>
  </row>
</data>

>>> df.to_xml(attr_cols=[
...           'index', 'shape', 'degrees', 'sides'
...           ])  # doctest: +SKIP
<?xml version='1.0' encoding='utf-8'?>
<data>
  <row index="0" shape="square" degrees="360" sides="4.0"/>
  <row index="1" shape="circle" degrees="360"/>
  <row index="2" shape="triangle" degrees="180" sides="3.0"/>
</data>

>>> df.to_xml(namespaces={{"doc": "https://example.com"}},
...           prefix="doc")  # doctest: +SKIP
<?xml version='1.0' encoding='utf-8'?>
<doc:data xmlns:doc="https://example.com">
  <doc:row>
    <doc:index>0</doc:index>
    <doc:shape>square</doc:shape>
    <doc:degrees>360</doc:degrees>
    <doc:sides>4.0</doc:sides>
  </doc:row>
  <doc:row>
    <doc:index>1</doc:index>
    <doc:shape>circle</doc:shape>
    <doc:degrees>360</doc:degrees>
    <doc:sides/>
  </doc:row>
  <doc:row>
    <doc:index>2</doc:index>
    <doc:shape>triangle</doc:shape>
    <doc:degrees>180</doc:degrees>
    <doc:sides>3.0</doc:sides>
  </doc:row>
</doc:data>

---
## info
```python
from frame import info
```



---
## memory_usage
```python
from frame import memory_usage
```

Return the memory usage of each column in bytes.

The memory usage can optionally include the contribution of
the index and elements of `object` dtype.

This value is displayed in `DataFrame.info` by default. This can be
suppressed by setting ``pandas.options.display.memory_usage`` to False.

Parameters
----------
index : bool, default True
    Specifies whether to include the memory usage of the DataFrame's
    index in returned Series. If ``index=True``, the memory usage of
    the index is the first item in the output.
deep : bool, default False
    If True, introspect the data deeply by interrogating
    `object` dtypes for system-level memory consumption, and include
    it in the returned values.

Returns
-------
Series
    A Series whose index is the original column names and whose values
    is the memory usage of each column in bytes.

See Also
--------
numpy.ndarray.nbytes : Total bytes consumed by the elements of an
    ndarray.
Series.memory_usage : Bytes consumed by a Series.
Categorical : Memory-efficient array for string values with
    many repeated values.
DataFrame.info : Concise summary of a DataFrame.

Notes
-----
See the :ref:`Frequently Asked Questions <df-memory-usage>` for more
details.

Examples
--------
>>> dtypes = ['int64', 'float64', 'complex128', 'object', 'bool']
>>> data = dict([(t, np.ones(shape=5000, dtype=int).astype(t))
...              for t in dtypes])
>>> df = pd.DataFrame(data)
>>> df.head()
   int64  float64            complex128  object  bool
0      1      1.0              1.0+0.0j       1  True
1      1      1.0              1.0+0.0j       1  True
2      1      1.0              1.0+0.0j       1  True
3      1      1.0              1.0+0.0j       1  True
4      1      1.0              1.0+0.0j       1  True

>>> df.memory_usage()
Index           128
int64         40000
float64       40000
complex128    80000
object        40000
bool           5000
dtype: int64

>>> df.memory_usage(index=False)
int64         40000
float64       40000
complex128    80000
object        40000
bool           5000
dtype: int64

The memory footprint of `object` dtype columns is ignored by default:

>>> df.memory_usage(deep=True)
Index            128
int64          40000
float64        40000
complex128     80000
object        180000
bool            5000
dtype: int64

Use a Categorical for efficient storage of an object-dtype column with
many repeated values.

>>> df['object'].astype('category').memory_usage(deep=True)
5244

---
## transpose
```python
from frame import transpose
```

Transpose index and columns.

Reflect the DataFrame over its main diagonal by writing rows as columns
and vice-versa. The property :attr:`.T` is an accessor to the method
:meth:`transpose`.

Parameters
----------
*args : tuple, optional
    Accepted for compatibility with NumPy.
copy : bool, default False
    Whether to copy the data after transposing, even for DataFrames
    with a single dtype.

    Note that a copy is always required for mixed dtype DataFrames,
    or for DataFrames with any extension types.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
DataFrame
    The transposed DataFrame.

See Also
--------
numpy.transpose : Permute the dimensions of a given array.

Notes
-----
Transposing a DataFrame with mixed dtypes will result in a homogeneous
DataFrame with the `object` dtype. In such a case, a copy of the data
is always made.

Examples
--------
**Square DataFrame with homogeneous dtype**

>>> d1 = {'col1': [1, 2], 'col2': [3, 4]}
>>> df1 = pd.DataFrame(data=d1)
>>> df1
   col1  col2
0     1     3
1     2     4

>>> df1_transposed = df1.T  # or df1.transpose()
>>> df1_transposed
      0  1
col1  1  2
col2  3  4

When the dtype is homogeneous in the original DataFrame, we get a
transposed DataFrame with the same dtype:

>>> df1.dtypes
col1    int64
col2    int64
dtype: object
>>> df1_transposed.dtypes
0    int64
1    int64
dtype: object

**Non-square DataFrame with mixed dtypes**

>>> d2 = {'name': ['Alice', 'Bob'],
...       'score': [9.5, 8],
...       'employed': [False, True],
...       'kids': [0, 0]}
>>> df2 = pd.DataFrame(data=d2)
>>> df2
    name  score  employed  kids
0  Alice    9.5     False     0
1    Bob    8.0      True     0

>>> df2_transposed = df2.T  # or df2.transpose()
>>> df2_transposed
              0     1
name      Alice   Bob
score       9.5   8.0
employed  False  True
kids          0     0

When the DataFrame has mixed dtypes, we get a transposed DataFrame with
the `object` dtype:

>>> df2.dtypes
name         object
score       float64
employed       bool
kids          int64
dtype: object
>>> df2_transposed.dtypes
0    object
1    object
dtype: object

---
## T
```python
from frame import T
```

The transpose of the DataFrame.

Returns
-------
DataFrame
    The transposed DataFrame.

See Also
--------
DataFrame.transpose : Transpose index and columns.

Examples
--------
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df
   col1  col2
0     1     3
1     2     4

>>> df.T
      0  1
col1  1  2
col2  3  4

---
## _ixs
```python
from frame import _ixs
```

Parameters
----------
i : int
axis : int

Returns
-------
Series

---
## _get_column_array
```python
from frame import _get_column_array
```

Get the values of the i'th column (ndarray or ExtensionArray, as stored
in the Block)

Warning! The returned array is a view but doesn't handle Copy-on-Write,
so this should be used with caution (for read-only purposes).

---
## _iter_column_arrays
```python
from frame import _iter_column_arrays
```

Iterate over the arrays of all columns in order.
This returns the values as stored in the Block (ndarray or ExtensionArray).

Warning! The returned array is a view but doesn't handle Copy-on-Write,
so this should be used with caution (for read-only purposes).

---
## _getitem_nocopy
```python
from frame import _getitem_nocopy
```

Behaves like __getitem__, but returns a view in cases where __getitem__
would make a copy.

---
## __getitem__
```python
from frame import __getitem__
```



---
## _getitem_bool_array
```python
from frame import _getitem_bool_array
```



---
## _getitem_multilevel
```python
from frame import _getitem_multilevel
```



---
## _get_value
```python
from frame import _get_value
```

Quickly retrieve single value at passed column and index.

Parameters
----------
index : row label
col : column label
takeable : interpret the index/col as indexers, default False

Returns
-------
scalar

Notes
-----
Assumes that both `self.index._index_as_unique` and
`self.columns._index_as_unique`; Caller is responsible for checking.

---
## isetitem
```python
from frame import isetitem
```

Set the given value in the column with position `loc`.

This is a positional analogue to ``__setitem__``.

Parameters
----------
loc : int or sequence of ints
    Index position for the column.
value : scalar or arraylike
    Value(s) for the column.

Notes
-----
``frame.isetitem(loc, value)`` is an in-place method as it will
modify the DataFrame in place (not returning a new object). In contrast to
``frame.iloc[:, i] = value`` which will try to update the existing values in
place, ``frame.isetitem(loc, value)`` will not update the values of the column
itself in place, it will instead insert a new array.

In cases where ``frame.columns`` is unique, this is equivalent to
``frame[frame.columns[i]] = value``.

---
## __setitem__
```python
from frame import __setitem__
```



---
## _setitem_slice
```python
from frame import _setitem_slice
```



---
## _setitem_array
```python
from frame import _setitem_array
```



---
## _iset_not_inplace
```python
from frame import _iset_not_inplace
```



---
## _setitem_frame
```python
from frame import _setitem_frame
```



---
## _set_item_frame_value
```python
from frame import _set_item_frame_value
```



---
## _iset_item_mgr
```python
from frame import _iset_item_mgr
```



---
## _set_item_mgr
```python
from frame import _set_item_mgr
```



---
## _iset_item
```python
from frame import _iset_item
```



---
## _set_item
```python
from frame import _set_item
```

Add series to DataFrame in specified column.

If series is a numpy-array (not a Series/TimeSeries), it must be the
same length as the DataFrames index or an error will be thrown.

Series/TimeSeries will be conformed to the DataFrames index to
ensure homogeneity.

---
## _set_value
```python
from frame import _set_value
```

Put single value at passed column and index.

Parameters
----------
index : Label
    row label
col : Label
    column label
value : scalar
takeable : bool, default False
    Sets whether or not index/col interpreted as indexers

---
## _ensure_valid_index
```python
from frame import _ensure_valid_index
```

Ensure that if we don't have an index, that we can create one from the
passed value.

---
## _box_col_values
```python
from frame import _box_col_values
```

Provide boxed values for a column.

---
## _clear_item_cache
```python
from frame import _clear_item_cache
```



---
## _get_item_cache
```python
from frame import _get_item_cache
```

Return the cached item, item represents a label indexer.

---
## _reset_cacher
```python
from frame import _reset_cacher
```



---
## _maybe_cache_changed
```python
from frame import _maybe_cache_changed
```

The object has called back to us saying maybe it has changed.

---
## query
```python
from frame import query
```

Query the columns of a DataFrame with a boolean expression.

Parameters
----------
expr : str
    The query string to evaluate.

    You can refer to variables
    in the environment by prefixing them with an '@' character like
    ``@a + b``.

    You can refer to column names that are not valid Python variable names
    by surrounding them in backticks. Thus, column names containing spaces
    or punctuations (besides underscores) or starting with digits must be
    surrounded by backticks. (For example, a column named "Area (cm^2)" would
    be referenced as ```Area (cm^2)```). Column names which are Python keywords
    (like "list", "for", "import", etc) cannot be used.

    For example, if one of your columns is called ``a a`` and you want
    to sum it with ``b``, your query should be ```a a` + b``.

inplace : bool
    Whether to modify the DataFrame rather than creating a new one.
**kwargs
    See the documentation for :func:`eval` for complete details
    on the keyword arguments accepted by :meth:`DataFrame.query`.

Returns
-------
DataFrame or None
    DataFrame resulting from the provided query expression or
    None if ``inplace=True``.

See Also
--------
eval : Evaluate a string describing operations on
    DataFrame columns.
DataFrame.eval : Evaluate a string describing operations on
    DataFrame columns.

Notes
-----
The result of the evaluation of this expression is first passed to
:attr:`DataFrame.loc` and if that fails because of a
multidimensional key (e.g., a DataFrame) then the result will be passed
to :meth:`DataFrame.__getitem__`.

This method uses the top-level :func:`eval` function to
evaluate the passed query.

The :meth:`~pandas.DataFrame.query` method uses a slightly
modified Python syntax by default. For example, the ``&`` and ``|``
(bitwise) operators have the precedence of their boolean cousins,
:keyword:`and` and :keyword:`or`. This *is* syntactically valid Python,
however the semantics are different.

You can change the semantics of the expression by passing the keyword
argument ``parser='python'``. This enforces the same semantics as
evaluation in Python space. Likewise, you can pass ``engine='python'``
to evaluate an expression using Python itself as a backend. This is not
recommended as it is inefficient compared to using ``numexpr`` as the
engine.

The :attr:`DataFrame.index` and
:attr:`DataFrame.columns` attributes of the
:class:`~pandas.DataFrame` instance are placed in the query namespace
by default, which allows you to treat both the index and columns of the
frame as a column in the frame.
The identifier ``index`` is used for the frame index; you can also
use the name of the index to identify it in a query. Please note that
Python keywords may not be used as identifiers.

For further details and examples see the ``query`` documentation in
:ref:`indexing <indexing.query>`.

*Backtick quoted variables*

Backtick quoted variables are parsed as literal Python code and
are converted internally to a Python valid identifier.
This can lead to the following problems.

During parsing a number of disallowed characters inside the backtick
quoted string are replaced by strings that are allowed as a Python identifier.
These characters include all operators in Python, the space character, the
question mark, the exclamation mark, the dollar sign, and the euro sign.
For other characters that fall outside the ASCII range (U+0001..U+007F)
and those that are not further specified in PEP 3131,
the query parser will raise an error.
This excludes whitespace different than the space character,
but also the hashtag (as it is used for comments) and the backtick
itself (backtick can also not be escaped).

In a special case, quotes that make a pair around a backtick can
confuse the parser.
For example, ```it's` > `that's``` will raise an error,
as it forms a quoted string (``'s > `that'``) with a backtick inside.

See also the Python documentation about lexical analysis
(https://docs.python.org/3/reference/lexical_analysis.html)
in combination with the source code in :mod:`pandas.core.computation.parsing`.

Examples
--------
>>> df = pd.DataFrame({'A': range(1, 6),
...                    'B': range(10, 0, -2),
...                    'C C': range(10, 5, -1)})
>>> df
   A   B  C C
0  1  10   10
1  2   8    9
2  3   6    8
3  4   4    7
4  5   2    6
>>> df.query('A > B')
   A  B  C C
4  5  2    6

The previous expression is equivalent to

>>> df[df.A > df.B]
   A  B  C C
4  5  2    6

For columns with spaces in their name, you can use backtick quoting.

>>> df.query('B == `C C`')
   A   B  C C
0  1  10   10

The previous expression is equivalent to

>>> df[df.B == df['C C']]
   A   B  C C
0  1  10   10

---
## eval
```python
from frame import eval
```

Evaluate a string describing operations on DataFrame columns.

Operates on columns only, not specific rows or elements.  This allows
`eval` to run arbitrary code, which can make you vulnerable to code
injection if you pass user input to this function.

Parameters
----------
expr : str
    The expression string to evaluate.
inplace : bool, default False
    If the expression contains an assignment, whether to perform the
    operation inplace and mutate the existing DataFrame. Otherwise,
    a new DataFrame is returned.
**kwargs
    See the documentation for :func:`eval` for complete details
    on the keyword arguments accepted by
    :meth:`~pandas.DataFrame.query`.

Returns
-------
ndarray, scalar, pandas object, or None
    The result of the evaluation or None if ``inplace=True``.

See Also
--------
DataFrame.query : Evaluates a boolean expression to query the columns
    of a frame.
DataFrame.assign : Can evaluate an expression or function to create new
    values for a column.
eval : Evaluate a Python expression as a string using various
    backends.

Notes
-----
For more details see the API documentation for :func:`~eval`.
For detailed examples see :ref:`enhancing performance with eval
<enhancingperf.eval>`.

Examples
--------
>>> df = pd.DataFrame({'A': range(1, 6), 'B': range(10, 0, -2)})
>>> df
   A   B
0  1  10
1  2   8
2  3   6
3  4   4
4  5   2
>>> df.eval('A + B')
0    11
1    10
2     9
3     8
4     7
dtype: int64

Assignment is allowed though by default the original DataFrame is not
modified.

>>> df.eval('C = A + B')
   A   B   C
0  1  10  11
1  2   8  10
2  3   6   9
3  4   4   8
4  5   2   7
>>> df
   A   B
0  1  10
1  2   8
2  3   6
3  4   4
4  5   2

Multiple columns can be assigned to using multi-line expressions:

>>> df.eval(
...     '''
... C = A + B
... D = A - B
... '''
... )
   A   B   C  D
0  1  10  11 -9
1  2   8  10 -6
2  3   6   9 -3
3  4   4   8  0
4  5   2   7  3

---
## select_dtypes
```python
from frame import select_dtypes
```

Return a subset of the DataFrame's columns based on the column dtypes.

Parameters
----------
include, exclude : scalar or list-like
    A selection of dtypes or strings to be included/excluded. At least
    one of these parameters must be supplied.

Returns
-------
DataFrame
    The subset of the frame including the dtypes in ``include`` and
    excluding the dtypes in ``exclude``.

Raises
------
ValueError
    * If both of ``include`` and ``exclude`` are empty
    * If ``include`` and ``exclude`` have overlapping elements
    * If any kind of string dtype is passed in.

See Also
--------
DataFrame.dtypes: Return Series with the data type of each column.

Notes
-----
* To select all *numeric* types, use ``np.number`` or ``'number'``
* To select strings you must use the ``object`` dtype, but note that
  this will return *all* object dtype columns
* See the `numpy dtype hierarchy
  <https://numpy.org/doc/stable/reference/arrays.scalars.html>`__
* To select datetimes, use ``np.datetime64``, ``'datetime'`` or
  ``'datetime64'``
* To select timedeltas, use ``np.timedelta64``, ``'timedelta'`` or
  ``'timedelta64'``
* To select Pandas categorical dtypes, use ``'category'``
* To select Pandas datetimetz dtypes, use ``'datetimetz'``
  or ``'datetime64[ns, tz]'``

Examples
--------
>>> df = pd.DataFrame({'a': [1, 2] * 3,
...                    'b': [True, False] * 3,
...                    'c': [1.0, 2.0] * 3})
>>> df
        a      b  c
0       1   True  1.0
1       2  False  2.0
2       1   True  1.0
3       2  False  2.0
4       1   True  1.0
5       2  False  2.0

>>> df.select_dtypes(include='bool')
   b
0  True
1  False
2  True
3  False
4  True
5  False

>>> df.select_dtypes(include=['float64'])
   c
0  1.0
1  2.0
2  1.0
3  2.0
4  1.0
5  2.0

>>> df.select_dtypes(exclude=['int64'])
       b    c
0   True  1.0
1  False  2.0
2   True  1.0
3  False  2.0
4   True  1.0
5  False  2.0

---
## insert
```python
from frame import insert
```

Insert column into DataFrame at specified location.

Raises a ValueError if `column` is already contained in the DataFrame,
unless `allow_duplicates` is set to True.

Parameters
----------
loc : int
    Insertion index. Must verify 0 <= loc <= len(columns).
column : str, number, or hashable object
    Label of the inserted column.
value : Scalar, Series, or array-like
    Content of the inserted column.
allow_duplicates : bool, optional, default lib.no_default
    Allow duplicate column labels to be created.

See Also
--------
Index.insert : Insert new item by index.

Examples
--------
>>> df = pd.DataFrame({'col1': [1, 2], 'col2': [3, 4]})
>>> df
   col1  col2
0     1     3
1     2     4
>>> df.insert(1, "newcol", [99, 99])
>>> df
   col1  newcol  col2
0     1      99     3
1     2      99     4
>>> df.insert(0, "col1", [100, 100], allow_duplicates=True)
>>> df
   col1  col1  newcol  col2
0   100     1      99     3
1   100     2      99     4

Notice that pandas uses index alignment in case of `value` from type `Series`:

>>> df.insert(0, "col0", pd.Series([5, 6], index=[1, 2]))
>>> df
   col0  col1  col1  newcol  col2
0   NaN   100     1      99     3
1   5.0   100     2      99     4

---
## assign
```python
from frame import assign
```

Assign new columns to a DataFrame.

Returns a new object with all original columns in addition to new ones.
Existing columns that are re-assigned will be overwritten.

Parameters
----------
**kwargs : dict of {str: callable or Series}
    The column names are keywords. If the values are
    callable, they are computed on the DataFrame and
    assigned to the new columns. The callable must not
    change input DataFrame (though pandas doesn't check it).
    If the values are not callable, (e.g. a Series, scalar, or array),
    they are simply assigned.

Returns
-------
DataFrame
    A new DataFrame with the new columns in addition to
    all the existing columns.

Notes
-----
Assigning multiple columns within the same ``assign`` is possible.
Later items in '\*\*kwargs' may refer to newly created or modified
columns in 'df'; items are computed and assigned into 'df' in order.

Examples
--------
>>> df = pd.DataFrame({'temp_c': [17.0, 25.0]},
...                   index=['Portland', 'Berkeley'])
>>> df
          temp_c
Portland    17.0
Berkeley    25.0

Where the value is a callable, evaluated on `df`:

>>> df.assign(temp_f=lambda x: x.temp_c * 9 / 5 + 32)
          temp_c  temp_f
Portland    17.0    62.6
Berkeley    25.0    77.0

Alternatively, the same behavior can be achieved by directly
referencing an existing Series or sequence:

>>> df.assign(temp_f=df['temp_c'] * 9 / 5 + 32)
          temp_c  temp_f
Portland    17.0    62.6
Berkeley    25.0    77.0

You can create multiple columns within the same assign where one
of the columns depends on another one defined within the same assign:

>>> df.assign(temp_f=lambda x: x['temp_c'] * 9 / 5 + 32,
...           temp_k=lambda x: (x['temp_f'] + 459.67) * 5 / 9)
          temp_c  temp_f  temp_k
Portland    17.0    62.6  290.15
Berkeley    25.0    77.0  298.15

---
## _sanitize_column
```python
from frame import _sanitize_column
```

Ensures new columns (which go into the BlockManager as new blocks) are
always copied (or a reference is being tracked to them under CoW)
and converted into an array.

Parameters
----------
value : scalar, Series, or array-like

Returns
-------
tuple of numpy.ndarray or ExtensionArray and optional BlockValuesRefs

---
## _series
```python
from frame import _series
```



---
## _reindex_multi
```python
from frame import _reindex_multi
```

We are guaranteed non-Nones in the axes.

---
## set_axis
```python
from frame import set_axis
```



---
## reindex
```python
from frame import reindex
```



---
## drop
```python
from frame import drop
```

Drop specified labels from rows or columns.

Remove rows or columns by specifying label names and corresponding
axis, or by directly specifying index or column names. When using a
multi-index, labels on different levels can be removed by specifying
the level. See the :ref:`user guide <advanced.shown_levels>`
for more information about the now unused levels.

Parameters
----------
labels : single label or list-like
    Index or column labels to drop. A tuple will be used as a single
    label and not treated as a list-like.
axis : {0 or 'index', 1 or 'columns'}, default 0
    Whether to drop labels from the index (0 or 'index') or
    columns (1 or 'columns').
index : single label or list-like
    Alternative to specifying axis (``labels, axis=0``
    is equivalent to ``index=labels``).
columns : single label or list-like
    Alternative to specifying axis (``labels, axis=1``
    is equivalent to ``columns=labels``).
level : int or level name, optional
    For MultiIndex, level from which the labels will be removed.
inplace : bool, default False
    If False, return a copy. Otherwise, do operation
    in place and return None.
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and only existing labels are
    dropped.

Returns
-------
DataFrame or None
    Returns DataFrame or None DataFrame with the specified
    index or column labels removed or None if inplace=True.

Raises
------
KeyError
    If any of the labels is not found in the selected axis.

See Also
--------
DataFrame.loc : Label-location based indexer for selection by label.
DataFrame.dropna : Return DataFrame with labels on given axis omitted
    where (all or any) data are missing.
DataFrame.drop_duplicates : Return DataFrame with duplicate rows
    removed, optionally only considering certain columns.
Series.drop : Return Series with specified index labels removed.

Examples
--------
>>> df = pd.DataFrame(np.arange(12).reshape(3, 4),
...                   columns=['A', 'B', 'C', 'D'])
>>> df
   A  B   C   D
0  0  1   2   3
1  4  5   6   7
2  8  9  10  11

Drop columns

>>> df.drop(['B', 'C'], axis=1)
   A   D
0  0   3
1  4   7
2  8  11

>>> df.drop(columns=['B', 'C'])
   A   D
0  0   3
1  4   7
2  8  11

Drop a row by index

>>> df.drop([0, 1])
   A  B   C   D
2  8  9  10  11

Drop columns and/or rows of MultiIndex DataFrame

>>> midx = pd.MultiIndex(levels=[['llama', 'cow', 'falcon'],
...                              ['speed', 'weight', 'length']],
...                      codes=[[0, 0, 0, 1, 1, 1, 2, 2, 2],
...                             [0, 1, 2, 0, 1, 2, 0, 1, 2]])
>>> df = pd.DataFrame(index=midx, columns=['big', 'small'],
...                   data=[[45, 30], [200, 100], [1.5, 1], [30, 20],
...                         [250, 150], [1.5, 0.8], [320, 250],
...                         [1, 0.8], [0.3, 0.2]])
>>> df
                big     small
llama   speed   45.0    30.0
        weight  200.0   100.0
        length  1.5     1.0
cow     speed   30.0    20.0
        weight  250.0   150.0
        length  1.5     0.8
falcon  speed   320.0   250.0
        weight  1.0     0.8
        length  0.3     0.2

Drop a specific index combination from the MultiIndex
DataFrame, i.e., drop the combination ``'falcon'`` and
``'weight'``, which deletes only the corresponding row

>>> df.drop(index=('falcon', 'weight'))
                big     small
llama   speed   45.0    30.0
        weight  200.0   100.0
        length  1.5     1.0
cow     speed   30.0    20.0
        weight  250.0   150.0
        length  1.5     0.8
falcon  speed   320.0   250.0
        length  0.3     0.2

>>> df.drop(index='cow', columns='small')
                big
llama   speed   45.0
        weight  200.0
        length  1.5
falcon  speed   320.0
        weight  1.0
        length  0.3

>>> df.drop(index='length', level=1)
                big     small
llama   speed   45.0    30.0
        weight  200.0   100.0
cow     speed   30.0    20.0
        weight  250.0   150.0
falcon  speed   320.0   250.0
        weight  1.0     0.8

---
## rename
```python
from frame import rename
```

Rename columns or index labels.

Function / dict values must be unique (1-to-1). Labels not contained in
a dict / Series will be left as-is. Extra labels listed don't throw an
error.

See the :ref:`user guide <basics.rename>` for more.

Parameters
----------
mapper : dict-like or function
    Dict-like or function transformations to apply to
    that axis' values. Use either ``mapper`` and ``axis`` to
    specify the axis to target with ``mapper``, or ``index`` and
    ``columns``.
index : dict-like or function
    Alternative to specifying axis (``mapper, axis=0``
    is equivalent to ``index=mapper``).
columns : dict-like or function
    Alternative to specifying axis (``mapper, axis=1``
    is equivalent to ``columns=mapper``).
axis : {0 or 'index', 1 or 'columns'}, default 0
    Axis to target with ``mapper``. Can be either the axis name
    ('index', 'columns') or number (0, 1). The default is 'index'.
copy : bool, default True
    Also copy underlying data.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``
inplace : bool, default False
    Whether to modify the DataFrame rather than creating a new one.
    If True then value of copy is ignored.
level : int or level name, default None
    In case of a MultiIndex, only rename labels in the specified
    level.
errors : {'ignore', 'raise'}, default 'ignore'
    If 'raise', raise a `KeyError` when a dict-like `mapper`, `index`,
    or `columns` contains labels that are not present in the Index
    being transformed.
    If 'ignore', existing keys will be renamed and extra keys will be
    ignored.

Returns
-------
DataFrame or None
    DataFrame with the renamed axis labels or None if ``inplace=True``.

Raises
------
KeyError
    If any of the labels is not found in the selected axis and
    "errors='raise'".

See Also
--------
DataFrame.rename_axis : Set the name of the axis.

Examples
--------
``DataFrame.rename`` supports two calling conventions

* ``(index=index_mapper, columns=columns_mapper, ...)``
* ``(mapper, axis={'index', 'columns'}, ...)``

We *highly* recommend using keyword arguments to clarify your
intent.

Rename columns using a mapping:

>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
>>> df.rename(columns={"A": "a", "B": "c"})
   a  c
0  1  4
1  2  5
2  3  6

Rename index using a mapping:

>>> df.rename(index={0: "x", 1: "y", 2: "z"})
   A  B
x  1  4
y  2  5
z  3  6

Cast index labels to a different type:

>>> df.index
RangeIndex(start=0, stop=3, step=1)
>>> df.rename(index=str).index
Index(['0', '1', '2'], dtype='object')

>>> df.rename(columns={"A": "a", "B": "b", "C": "c"}, errors="raise")
Traceback (most recent call last):
KeyError: ['C'] not found in axis

Using axis-style parameters:

>>> df.rename(str.lower, axis='columns')
   a  b
0  1  4
1  2  5
2  3  6

>>> df.rename({1: 2, 2: 4}, axis='index')
   A  B
0  1  4
2  2  5
4  3  6

---
## pop
```python
from frame import pop
```

Return item and drop from frame. Raise KeyError if not found.

Parameters
----------
item : label
    Label of column to be popped.

Returns
-------
Series

Examples
--------
>>> df = pd.DataFrame([('falcon', 'bird', 389.0),
...                    ('parrot', 'bird', 24.0),
...                    ('lion', 'mammal', 80.5),
...                    ('monkey', 'mammal', np.nan)],
...                   columns=('name', 'class', 'max_speed'))
>>> df
     name   class  max_speed
0  falcon    bird      389.0
1  parrot    bird       24.0
2    lion  mammal       80.5
3  monkey  mammal        NaN

>>> df.pop('class')
0      bird
1      bird
2    mammal
3    mammal
Name: class, dtype: object

>>> df
     name  max_speed
0  falcon      389.0
1  parrot       24.0
2    lion       80.5
3  monkey        NaN

---
## _replace_columnwise
```python
from frame import _replace_columnwise
```

Dispatch to Series.replace column-wise.

Parameters
----------
mapping : dict
    of the form {col: (target, value)}
inplace : bool
regex : bool or same types as `to_replace` in DataFrame.replace

Returns
-------
DataFrame or None

---
## shift
```python
from frame import shift
```



---
## set_index
```python
from frame import set_index
```

Set the DataFrame index using existing columns.

Set the DataFrame index (row labels) using one or more existing
columns or arrays (of the correct length). The index can replace the
existing index or expand on it.

Parameters
----------
keys : label or array-like or list of labels/arrays
    This parameter can be either a single column key, a single array of
    the same length as the calling DataFrame, or a list containing an
    arbitrary combination of column keys and arrays. Here, "array"
    encompasses :class:`Series`, :class:`Index`, ``np.ndarray``, and
    instances of :class:`~collections.abc.Iterator`.
drop : bool, default True
    Delete columns to be used as the new index.
append : bool, default False
    Whether to append columns to existing index.
inplace : bool, default False
    Whether to modify the DataFrame rather than creating a new one.
verify_integrity : bool, default False
    Check the new index for duplicates. Otherwise defer the check until
    necessary. Setting to False will improve the performance of this
    method.

Returns
-------
DataFrame or None
    Changed row labels or None if ``inplace=True``.

See Also
--------
DataFrame.reset_index : Opposite of set_index.
DataFrame.reindex : Change to new indices or expand indices.
DataFrame.reindex_like : Change to same indices as other DataFrame.

Examples
--------
>>> df = pd.DataFrame({'month': [1, 4, 7, 10],
...                    'year': [2012, 2014, 2013, 2014],
...                    'sale': [55, 40, 84, 31]})
>>> df
   month  year  sale
0      1  2012    55
1      4  2014    40
2      7  2013    84
3     10  2014    31

Set the index to become the 'month' column:

>>> df.set_index('month')
       year  sale
month
1      2012    55
4      2014    40
7      2013    84
10     2014    31

Create a MultiIndex using columns 'year' and 'month':

>>> df.set_index(['year', 'month'])
            sale
year  month
2012  1     55
2014  4     40
2013  7     84
2014  10    31

Create a MultiIndex using an Index and a column:

>>> df.set_index([pd.Index([1, 2, 3, 4]), 'year'])
         month  sale
   year
1  2012  1      55
2  2014  4      40
3  2013  7      84
4  2014  10     31

Create a MultiIndex using two Series:

>>> s = pd.Series([1, 2, 3, 4])
>>> df.set_index([s, s**2])
      month  year  sale
1 1       1  2012    55
2 4       4  2014    40
3 9       7  2013    84
4 16     10  2014    31

---
## reset_index
```python
from frame import reset_index
```

Reset the index, or a level of it.

Reset the index of the DataFrame, and use the default one instead.
If the DataFrame has a MultiIndex, this method can remove one or more
levels.

Parameters
----------
level : int, str, tuple, or list, default None
    Only remove the given levels from the index. Removes all levels by
    default.
drop : bool, default False
    Do not try to insert index into dataframe columns. This resets
    the index to the default integer index.
inplace : bool, default False
    Whether to modify the DataFrame rather than creating a new one.
col_level : int or str, default 0
    If the columns have multiple levels, determines which level the
    labels are inserted into. By default it is inserted into the first
    level.
col_fill : object, default ''
    If the columns have multiple levels, determines how the other
    levels are named. If None then the index name is repeated.
allow_duplicates : bool, optional, default lib.no_default
    Allow duplicate column labels to be created.

    .. versionadded:: 1.5.0

names : int, str or 1-dimensional list, default None
    Using the given string, rename the DataFrame column which contains the
    index data. If the DataFrame has a MultiIndex, this has to be a list or
    tuple with length equal to the number of levels.

    .. versionadded:: 1.5.0

Returns
-------
DataFrame or None
    DataFrame with the new index or None if ``inplace=True``.

See Also
--------
DataFrame.set_index : Opposite of reset_index.
DataFrame.reindex : Change to new indices or expand indices.
DataFrame.reindex_like : Change to same indices as other DataFrame.

Examples
--------
>>> df = pd.DataFrame([('bird', 389.0),
...                    ('bird', 24.0),
...                    ('mammal', 80.5),
...                    ('mammal', np.nan)],
...                   index=['falcon', 'parrot', 'lion', 'monkey'],
...                   columns=('class', 'max_speed'))
>>> df
         class  max_speed
falcon    bird      389.0
parrot    bird       24.0
lion    mammal       80.5
monkey  mammal        NaN

When we reset the index, the old index is added as a column, and a
new sequential index is used:

>>> df.reset_index()
    index   class  max_speed
0  falcon    bird      389.0
1  parrot    bird       24.0
2    lion  mammal       80.5
3  monkey  mammal        NaN

We can use the `drop` parameter to avoid the old index being added as
a column:

>>> df.reset_index(drop=True)
    class  max_speed
0    bird      389.0
1    bird       24.0
2  mammal       80.5
3  mammal        NaN

You can also use `reset_index` with `MultiIndex`.

>>> index = pd.MultiIndex.from_tuples([('bird', 'falcon'),
...                                    ('bird', 'parrot'),
...                                    ('mammal', 'lion'),
...                                    ('mammal', 'monkey')],
...                                   names=['class', 'name'])
>>> columns = pd.MultiIndex.from_tuples([('speed', 'max'),
...                                      ('species', 'type')])
>>> df = pd.DataFrame([(389.0, 'fly'),
...                    (24.0, 'fly'),
...                    (80.5, 'run'),
...                    (np.nan, 'jump')],
...                   index=index,
...                   columns=columns)
>>> df
               speed species
                 max    type
class  name
bird   falcon  389.0     fly
       parrot   24.0     fly
mammal lion     80.5     run
       monkey    NaN    jump

Using the `names` parameter, choose a name for the index column:

>>> df.reset_index(names=['classes', 'names'])
  classes   names  speed species
                     max    type
0    bird  falcon  389.0     fly
1    bird  parrot   24.0     fly
2  mammal    lion   80.5     run
3  mammal  monkey    NaN    jump

If the index has multiple levels, we can reset a subset of them:

>>> df.reset_index(level='class')
         class  speed species
                  max    type
name
falcon    bird  389.0     fly
parrot    bird   24.0     fly
lion    mammal   80.5     run
monkey  mammal    NaN    jump

If we are not dropping the index, by default, it is placed in the top
level. We can place it in another level:

>>> df.reset_index(level='class', col_level=1)
                speed species
         class    max    type
name
falcon    bird  389.0     fly
parrot    bird   24.0     fly
lion    mammal   80.5     run
monkey  mammal    NaN    jump

When the index is inserted under another level, we can specify under
which one with the parameter `col_fill`:

>>> df.reset_index(level='class', col_level=1, col_fill='species')
              species  speed species
                class    max    type
name
falcon           bird  389.0     fly
parrot           bird   24.0     fly
lion           mammal   80.5     run
monkey         mammal    NaN    jump

If we specify a nonexistent level for `col_fill`, it is created:

>>> df.reset_index(level='class', col_level=1, col_fill='genus')
                genus  speed species
                class    max    type
name
falcon           bird  389.0     fly
parrot           bird   24.0     fly
lion           mammal   80.5     run
monkey         mammal    NaN    jump

---
## isna
```python
from frame import isna
```



---
## isnull
```python
from frame import isnull
```

DataFrame.isnull is an alias for DataFrame.isna.

---
## notna
```python
from frame import notna
```



---
## notnull
```python
from frame import notnull
```

DataFrame.notnull is an alias for DataFrame.notna.

---
## dropna
```python
from frame import dropna
```

Remove missing values.

See the :ref:`User Guide <missing_data>` for more on which values are
considered missing, and how to work with missing data.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    Determine if rows or columns which contain missing values are
    removed.

    * 0, or 'index' : Drop rows which contain missing values.
    * 1, or 'columns' : Drop columns which contain missing value.

    Only a single axis is allowed.

how : {'any', 'all'}, default 'any'
    Determine if row or column is removed from DataFrame, when we have
    at least one NA or all NA.

    * 'any' : If any NA values are present, drop that row or column.
    * 'all' : If all values are NA, drop that row or column.

thresh : int, optional
    Require that many non-NA values. Cannot be combined with how.
subset : column label or sequence of labels, optional
    Labels along other axis to consider, e.g. if you are dropping rows
    these would be a list of columns to include.
inplace : bool, default False
    Whether to modify the DataFrame rather than creating a new one.
ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

    .. versionadded:: 2.0.0

Returns
-------
DataFrame or None
    DataFrame with NA entries dropped from it or None if ``inplace=True``.

See Also
--------
DataFrame.isna: Indicate missing values.
DataFrame.notna : Indicate existing (non-missing) values.
DataFrame.fillna : Replace missing values.
Series.dropna : Drop missing values.
Index.dropna : Drop missing indices.

Examples
--------
>>> df = pd.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
...                    "toy": [np.nan, 'Batmobile', 'Bullwhip'],
...                    "born": [pd.NaT, pd.Timestamp("1940-04-25"),
...                             pd.NaT]})
>>> df
       name        toy       born
0    Alfred        NaN        NaT
1    Batman  Batmobile 1940-04-25
2  Catwoman   Bullwhip        NaT

Drop the rows where at least one element is missing.

>>> df.dropna()
     name        toy       born
1  Batman  Batmobile 1940-04-25

Drop the columns where at least one element is missing.

>>> df.dropna(axis='columns')
       name
0    Alfred
1    Batman
2  Catwoman

Drop the rows where all elements are missing.

>>> df.dropna(how='all')
       name        toy       born
0    Alfred        NaN        NaT
1    Batman  Batmobile 1940-04-25
2  Catwoman   Bullwhip        NaT

Keep only the rows with at least 2 non-NA values.

>>> df.dropna(thresh=2)
       name        toy       born
1    Batman  Batmobile 1940-04-25
2  Catwoman   Bullwhip        NaT

Define in which columns to look for missing values.

>>> df.dropna(subset=['name', 'toy'])
       name        toy       born
1    Batman  Batmobile 1940-04-25
2  Catwoman   Bullwhip        NaT

---
## drop_duplicates
```python
from frame import drop_duplicates
```

Return DataFrame with duplicate rows removed.

Considering certain columns is optional. Indexes, including time indexes
are ignored.

Parameters
----------
subset : column label or sequence of labels, optional
    Only consider certain columns for identifying duplicates, by
    default use all of the columns.
keep : {'first', 'last', ``False``}, default 'first'
    Determines which duplicates (if any) to keep.

    - 'first' : Drop duplicates except for the first occurrence.
    - 'last' : Drop duplicates except for the last occurrence.
    - ``False`` : Drop all duplicates.

inplace : bool, default ``False``
    Whether to modify the DataFrame rather than creating a new one.
ignore_index : bool, default ``False``
    If ``True``, the resulting axis will be labeled 0, 1, …, n - 1.

Returns
-------
DataFrame or None
    DataFrame with duplicates removed or None if ``inplace=True``.

See Also
--------
DataFrame.value_counts: Count unique combinations of columns.

Examples
--------
Consider dataset containing ramen rating.

>>> df = pd.DataFrame({
...     'brand': ['Yum Yum', 'Yum Yum', 'Indomie', 'Indomie', 'Indomie'],
...     'style': ['cup', 'cup', 'cup', 'pack', 'pack'],
...     'rating': [4, 4, 3.5, 15, 5]
... })
>>> df
    brand style  rating
0  Yum Yum   cup     4.0
1  Yum Yum   cup     4.0
2  Indomie   cup     3.5
3  Indomie  pack    15.0
4  Indomie  pack     5.0

By default, it removes duplicate rows based on all columns.

>>> df.drop_duplicates()
    brand style  rating
0  Yum Yum   cup     4.0
2  Indomie   cup     3.5
3  Indomie  pack    15.0
4  Indomie  pack     5.0

To remove duplicates on specific column(s), use ``subset``.

>>> df.drop_duplicates(subset=['brand'])
    brand style  rating
0  Yum Yum   cup     4.0
2  Indomie   cup     3.5

To remove duplicates and keep last occurrences, use ``keep``.

>>> df.drop_duplicates(subset=['brand', 'style'], keep='last')
    brand style  rating
1  Yum Yum   cup     4.0
2  Indomie   cup     3.5
4  Indomie  pack     5.0

---
## duplicated
```python
from frame import duplicated
```

Return boolean Series denoting duplicate rows.

Considering certain columns is optional.

Parameters
----------
subset : column label or sequence of labels, optional
    Only consider certain columns for identifying duplicates, by
    default use all of the columns.
keep : {'first', 'last', False}, default 'first'
    Determines which duplicates (if any) to mark.

    - ``first`` : Mark duplicates as ``True`` except for the first occurrence.
    - ``last`` : Mark duplicates as ``True`` except for the last occurrence.
    - False : Mark all duplicates as ``True``.

Returns
-------
Series
    Boolean series for each duplicated rows.

See Also
--------
Index.duplicated : Equivalent method on index.
Series.duplicated : Equivalent method on Series.
Series.drop_duplicates : Remove duplicate values from Series.
DataFrame.drop_duplicates : Remove duplicate values from DataFrame.

Examples
--------
Consider dataset containing ramen rating.

>>> df = pd.DataFrame({
...     'brand': ['Yum Yum', 'Yum Yum', 'Indomie', 'Indomie', 'Indomie'],
...     'style': ['cup', 'cup', 'cup', 'pack', 'pack'],
...     'rating': [4, 4, 3.5, 15, 5]
... })
>>> df
    brand style  rating
0  Yum Yum   cup     4.0
1  Yum Yum   cup     4.0
2  Indomie   cup     3.5
3  Indomie  pack    15.0
4  Indomie  pack     5.0

By default, for each set of duplicated values, the first occurrence
is set on False and all others on True.

>>> df.duplicated()
0    False
1     True
2    False
3    False
4    False
dtype: bool

By using 'last', the last occurrence of each set of duplicated values
is set on False and all others on True.

>>> df.duplicated(keep='last')
0     True
1    False
2    False
3    False
4    False
dtype: bool

By setting ``keep`` on False, all duplicates are True.

>>> df.duplicated(keep=False)
0     True
1     True
2    False
3    False
4    False
dtype: bool

To find duplicates on specific column(s), use ``subset``.

>>> df.duplicated(subset=['brand'])
0    False
1     True
2    False
3     True
4     True
dtype: bool

---
## sort_values
```python
from frame import sort_values
```

Sort by the values along either axis.

Parameters
----------
by : str or list of str
    Name or list of names to sort by.

    - if `axis` is 0 or `'index'` then `by` may contain index
      levels and/or column labels.
    - if `axis` is 1 or `'columns'` then `by` may contain column
      levels and/or index labels.
axis : "{0 or 'index', 1 or 'columns'}", default 0
     Axis to be sorted.
ascending : bool or list of bool, default True
     Sort ascending vs. descending. Specify list for multiple sort
     orders.  If this is a list of bools, must match the length of
     the by.
inplace : bool, default False
     If True, perform operation in-place.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
     Choice of sorting algorithm. See also :func:`numpy.sort` for more
     information. `mergesort` and `stable` are the only stable algorithms. For
     DataFrames, this option is only applied when sorting on a single
     column or label.
na_position : {'first', 'last'}, default 'last'
     Puts NaNs at the beginning if `first`; `last` puts NaNs at the
     end.
ignore_index : bool, default False
     If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    Apply the key function to the values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect a
    ``Series`` and return a Series with the same shape as the input.
    It will be applied to each column in `by` independently.

Returns
-------
DataFrame or None
    DataFrame with sorted values or None if ``inplace=True``.

See Also
--------
DataFrame.sort_index : Sort a DataFrame by the index.
Series.sort_values : Similar method for a Series.

Examples
--------
>>> df = pd.DataFrame({
...     'col1': ['A', 'A', 'B', np.nan, 'D', 'C'],
...     'col2': [2, 1, 9, 8, 7, 4],
...     'col3': [0, 1, 9, 4, 2, 3],
...     'col4': ['a', 'B', 'c', 'D', 'e', 'F']
... })
>>> df
  col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F

Sort by col1

>>> df.sort_values(by=['col1'])
  col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
5    C     4     3    F
4    D     7     2    e
3  NaN     8     4    D

Sort by multiple columns

>>> df.sort_values(by=['col1', 'col2'])
  col1  col2  col3 col4
1    A     1     1    B
0    A     2     0    a
2    B     9     9    c
5    C     4     3    F
4    D     7     2    e
3  NaN     8     4    D

Sort Descending

>>> df.sort_values(by='col1', ascending=False)
  col1  col2  col3 col4
4    D     7     2    e
5    C     4     3    F
2    B     9     9    c
0    A     2     0    a
1    A     1     1    B
3  NaN     8     4    D

Putting NAs first

>>> df.sort_values(by='col1', ascending=False, na_position='first')
  col1  col2  col3 col4
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F
2    B     9     9    c
0    A     2     0    a
1    A     1     1    B

Sorting with a key function

>>> df.sort_values(by='col4', key=lambda col: col.str.lower())
   col1  col2  col3 col4
0    A     2     0    a
1    A     1     1    B
2    B     9     9    c
3  NaN     8     4    D
4    D     7     2    e
5    C     4     3    F

Natural sort with the key argument,
using the `natsort <https://github.com/SethMMorton/natsort>` package.

>>> df = pd.DataFrame({
...    "time": ['0hr', '128hr', '72hr', '48hr', '96hr'],
...    "value": [10, 20, 30, 40, 50]
... })
>>> df
    time  value
0    0hr     10
1  128hr     20
2   72hr     30
3   48hr     40
4   96hr     50
>>> from natsort import index_natsorted
>>> df.sort_values(
...     by="time",
...     key=lambda x: np.argsort(index_natsorted(df["time"]))
... )
    time  value
0    0hr     10
3   48hr     40
2   72hr     30
4   96hr     50
1  128hr     20

---
## sort_index
```python
from frame import sort_index
```

Sort object by labels (along an axis).

Returns a new DataFrame sorted by label if `inplace` argument is
``False``, otherwise updates the original DataFrame and returns None.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis along which to sort.  The value 0 identifies the rows,
    and 1 identifies the columns.
level : int or level name or list of ints or list of level names
    If not None, sort on values in specified index level(s).
ascending : bool or list-like of bools, default True
    Sort ascending vs. descending. When the index is a MultiIndex the
    sort direction can be controlled for each level individually.
inplace : bool, default False
    Whether to modify the DataFrame rather than creating a new one.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
    Choice of sorting algorithm. See also :func:`numpy.sort` for more
    information. `mergesort` and `stable` are the only stable algorithms. For
    DataFrames, this option is only applied when sorting on a single
    column or label.
na_position : {'first', 'last'}, default 'last'
    Puts NaNs at the beginning if `first`; `last` puts NaNs at the end.
    Not implemented for MultiIndex.
sort_remaining : bool, default True
    If True and sorting by level and index is multilevel, sort by other
    levels too (in order) after sorting by specified level.
ignore_index : bool, default False
    If True, the resulting axis will be labeled 0, 1, …, n - 1.
key : callable, optional
    If not None, apply the key function to the index values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect an
    ``Index`` and return an ``Index`` of the same shape. For MultiIndex
    inputs, the key is applied *per level*.

Returns
-------
DataFrame or None
    The original DataFrame sorted by the labels or None if ``inplace=True``.

See Also
--------
Series.sort_index : Sort Series by the index.
DataFrame.sort_values : Sort DataFrame by the value.
Series.sort_values : Sort Series by the value.

Examples
--------
>>> df = pd.DataFrame([1, 2, 3, 4, 5], index=[100, 29, 234, 1, 150],
...                   columns=['A'])
>>> df.sort_index()
     A
1    4
29   2
100  1
150  5
234  3

By default, it sorts in ascending order, to sort in descending order,
use ``ascending=False``

>>> df.sort_index(ascending=False)
     A
234  3
150  5
100  1
29   2
1    4

A key function can be specified which is applied to the index before
sorting. For a ``MultiIndex`` this is applied to each level separately.

>>> df = pd.DataFrame({"a": [1, 2, 3, 4]}, index=['A', 'b', 'C', 'd'])
>>> df.sort_index(key=lambda x: x.str.lower())
   a
A  1
b  2
C  3
d  4

---
## value_counts
```python
from frame import value_counts
```

Return a Series containing the frequency of each distinct row in the Dataframe.

Parameters
----------
subset : label or list of labels, optional
    Columns to use when counting unique combinations.
normalize : bool, default False
    Return proportions rather than frequencies.
sort : bool, default True
    Sort by frequencies when True. Sort by DataFrame column values when False.
ascending : bool, default False
    Sort in ascending order.
dropna : bool, default True
    Don't include counts of rows that contain NA values.

    .. versionadded:: 1.3.0

Returns
-------
Series

See Also
--------
Series.value_counts: Equivalent method on Series.

Notes
-----
The returned Series will have a MultiIndex with one level per input
column but an Index (non-multi) for a single label. By default, rows
that contain any NA values are omitted from the result. By default,
the resulting Series will be in descending order so that the first
element is the most frequently-occurring row.

Examples
--------
>>> df = pd.DataFrame({'num_legs': [2, 4, 4, 6],
...                    'num_wings': [2, 0, 0, 0]},
...                   index=['falcon', 'dog', 'cat', 'ant'])
>>> df
        num_legs  num_wings
falcon         2          2
dog            4          0
cat            4          0
ant            6          0

>>> df.value_counts()
num_legs  num_wings
4         0            2
2         2            1
6         0            1
Name: count, dtype: int64

>>> df.value_counts(sort=False)
num_legs  num_wings
2         2            1
4         0            2
6         0            1
Name: count, dtype: int64

>>> df.value_counts(ascending=True)
num_legs  num_wings
2         2            1
6         0            1
4         0            2
Name: count, dtype: int64

>>> df.value_counts(normalize=True)
num_legs  num_wings
4         0            0.50
2         2            0.25
6         0            0.25
Name: proportion, dtype: float64

With `dropna` set to `False` we can also count rows with NA values.

>>> df = pd.DataFrame({'first_name': ['John', 'Anne', 'John', 'Beth'],
...                    'middle_name': ['Smith', pd.NA, pd.NA, 'Louise']})
>>> df
  first_name middle_name
0       John       Smith
1       Anne        <NA>
2       John        <NA>
3       Beth      Louise

>>> df.value_counts()
first_name  middle_name
Beth        Louise         1
John        Smith          1
Name: count, dtype: int64

>>> df.value_counts(dropna=False)
first_name  middle_name
Anne        NaN            1
Beth        Louise         1
John        Smith          1
            NaN            1
Name: count, dtype: int64

>>> df.value_counts("first_name")
first_name
John    2
Anne    1
Beth    1
Name: count, dtype: int64

---
## nlargest
```python
from frame import nlargest
```

Return the first `n` rows ordered by `columns` in descending order.

Return the first `n` rows with the largest values in `columns`, in
descending order. The columns that are not specified are returned as
well, but not used for ordering.

This method is equivalent to
``df.sort_values(columns, ascending=False).head(n)``, but more
performant.

Parameters
----------
n : int
    Number of rows to return.
columns : label or list of labels
    Column label(s) to order by.
keep : {'first', 'last', 'all'}, default 'first'
    Where there are duplicate values:

    - ``first`` : prioritize the first occurrence(s)
    - ``last`` : prioritize the last occurrence(s)
    - ``all`` : keep all the ties of the smallest item even if it means
      selecting more than ``n`` items.

Returns
-------
DataFrame
    The first `n` rows ordered by the given columns in descending
    order.

See Also
--------
DataFrame.nsmallest : Return the first `n` rows ordered by `columns` in
    ascending order.
DataFrame.sort_values : Sort DataFrame by the values.
DataFrame.head : Return the first `n` rows without re-ordering.

Notes
-----
This function cannot be used with all column types. For example, when
specifying columns with `object` or `category` dtypes, ``TypeError`` is
raised.

Examples
--------
>>> df = pd.DataFrame({'population': [59000000, 65000000, 434000,
...                                   434000, 434000, 337000, 11300,
...                                   11300, 11300],
...                    'GDP': [1937894, 2583560 , 12011, 4520, 12128,
...                            17036, 182, 38, 311],
...                    'alpha-2': ["IT", "FR", "MT", "MV", "BN",
...                                "IS", "NR", "TV", "AI"]},
...                   index=["Italy", "France", "Malta",
...                          "Maldives", "Brunei", "Iceland",
...                          "Nauru", "Tuvalu", "Anguilla"])
>>> df
          population      GDP alpha-2
Italy       59000000  1937894      IT
France      65000000  2583560      FR
Malta         434000    12011      MT
Maldives      434000     4520      MV
Brunei        434000    12128      BN
Iceland       337000    17036      IS
Nauru          11300      182      NR
Tuvalu         11300       38      TV
Anguilla       11300      311      AI

In the following example, we will use ``nlargest`` to select the three
rows having the largest values in column "population".

>>> df.nlargest(3, 'population')
        population      GDP alpha-2
France    65000000  2583560      FR
Italy     59000000  1937894      IT
Malta       434000    12011      MT

When using ``keep='last'``, ties are resolved in reverse order:

>>> df.nlargest(3, 'population', keep='last')
        population      GDP alpha-2
France    65000000  2583560      FR
Italy     59000000  1937894      IT
Brunei      434000    12128      BN

When using ``keep='all'``, the number of element kept can go beyond ``n``
if there are duplicate values for the smallest element, all the
ties are kept:

>>> df.nlargest(3, 'population', keep='all')
          population      GDP alpha-2
France      65000000  2583560      FR
Italy       59000000  1937894      IT
Malta         434000    12011      MT
Maldives      434000     4520      MV
Brunei        434000    12128      BN

However, ``nlargest`` does not keep ``n`` distinct largest elements:

>>> df.nlargest(5, 'population', keep='all')
          population      GDP alpha-2
France      65000000  2583560      FR
Italy       59000000  1937894      IT
Malta         434000    12011      MT
Maldives      434000     4520      MV
Brunei        434000    12128      BN

To order by the largest values in column "population" and then "GDP",
we can specify multiple columns like in the next example.

>>> df.nlargest(3, ['population', 'GDP'])
        population      GDP alpha-2
France    65000000  2583560      FR
Italy     59000000  1937894      IT
Brunei      434000    12128      BN

---
## nsmallest
```python
from frame import nsmallest
```

Return the first `n` rows ordered by `columns` in ascending order.

Return the first `n` rows with the smallest values in `columns`, in
ascending order. The columns that are not specified are returned as
well, but not used for ordering.

This method is equivalent to
``df.sort_values(columns, ascending=True).head(n)``, but more
performant.

Parameters
----------
n : int
    Number of items to retrieve.
columns : list or str
    Column name or names to order by.
keep : {'first', 'last', 'all'}, default 'first'
    Where there are duplicate values:

    - ``first`` : take the first occurrence.
    - ``last`` : take the last occurrence.
    - ``all`` : keep all the ties of the largest item even if it means
      selecting more than ``n`` items.

Returns
-------
DataFrame

See Also
--------
DataFrame.nlargest : Return the first `n` rows ordered by `columns` in
    descending order.
DataFrame.sort_values : Sort DataFrame by the values.
DataFrame.head : Return the first `n` rows without re-ordering.

Examples
--------
>>> df = pd.DataFrame({'population': [59000000, 65000000, 434000,
...                                   434000, 434000, 337000, 337000,
...                                   11300, 11300],
...                    'GDP': [1937894, 2583560 , 12011, 4520, 12128,
...                            17036, 182, 38, 311],
...                    'alpha-2': ["IT", "FR", "MT", "MV", "BN",
...                                "IS", "NR", "TV", "AI"]},
...                   index=["Italy", "France", "Malta",
...                          "Maldives", "Brunei", "Iceland",
...                          "Nauru", "Tuvalu", "Anguilla"])
>>> df
          population      GDP alpha-2
Italy       59000000  1937894      IT
France      65000000  2583560      FR
Malta         434000    12011      MT
Maldives      434000     4520      MV
Brunei        434000    12128      BN
Iceland       337000    17036      IS
Nauru         337000      182      NR
Tuvalu         11300       38      TV
Anguilla       11300      311      AI

In the following example, we will use ``nsmallest`` to select the
three rows having the smallest values in column "population".

>>> df.nsmallest(3, 'population')
          population    GDP alpha-2
Tuvalu         11300     38      TV
Anguilla       11300    311      AI
Iceland       337000  17036      IS

When using ``keep='last'``, ties are resolved in reverse order:

>>> df.nsmallest(3, 'population', keep='last')
          population  GDP alpha-2
Anguilla       11300  311      AI
Tuvalu         11300   38      TV
Nauru         337000  182      NR

When using ``keep='all'``, the number of element kept can go beyond ``n``
if there are duplicate values for the largest element, all the
ties are kept.

>>> df.nsmallest(3, 'population', keep='all')
          population    GDP alpha-2
Tuvalu         11300     38      TV
Anguilla       11300    311      AI
Iceland       337000  17036      IS
Nauru         337000    182      NR

However, ``nsmallest`` does not keep ``n`` distinct
smallest elements:

>>> df.nsmallest(4, 'population', keep='all')
          population    GDP alpha-2
Tuvalu         11300     38      TV
Anguilla       11300    311      AI
Iceland       337000  17036      IS
Nauru         337000    182      NR

To order by the smallest values in column "population" and then "GDP", we can
specify multiple columns like in the next example.

>>> df.nsmallest(3, ['population', 'GDP'])
          population  GDP alpha-2
Tuvalu         11300   38      TV
Anguilla       11300  311      AI
Nauru         337000  182      NR

---
## swaplevel
```python
from frame import swaplevel
```



---
## reorder_levels
```python
from frame import reorder_levels
```

Rearrange index levels using input order. May not drop or duplicate levels.

Parameters
----------
order : list of int or list of str
    List representing new level order. Reference level by number
    (position) or by key (label).
axis : {0 or 'index', 1 or 'columns'}, default 0
    Where to reorder levels.

Returns
-------
DataFrame

Examples
--------
>>> data = {
...     "class": ["Mammals", "Mammals", "Reptiles"],
...     "diet": ["Omnivore", "Carnivore", "Carnivore"],
...     "species": ["Humans", "Dogs", "Snakes"],
... }
>>> df = pd.DataFrame(data, columns=["class", "diet", "species"])
>>> df = df.set_index(["class", "diet"])
>>> df
                                  species
class      diet
Mammals    Omnivore                Humans
           Carnivore                 Dogs
Reptiles   Carnivore               Snakes

Let's reorder the levels of the index:

>>> df.reorder_levels(["diet", "class"])
                                  species
diet      class
Omnivore  Mammals                  Humans
Carnivore Mammals                    Dogs
          Reptiles                 Snakes

---
## _cmp_method
```python
from frame import _cmp_method
```



---
## _arith_method
```python
from frame import _arith_method
```



---
## _dispatch_frame_op
```python
from frame import _dispatch_frame_op
```

Evaluate the frame operation func(left, right) by evaluating
column-by-column, dispatching to the Series implementation.

Parameters
----------
right : scalar, Series, or DataFrame
func : arithmetic or comparison operator
axis : {None, 0, 1}

Returns
-------
DataFrame

Notes
-----
Caller is responsible for setting np.errstate where relevant.

---
## _combine_frame
```python
from frame import _combine_frame
```



---
## _arith_method_with_reindex
```python
from frame import _arith_method_with_reindex
```

For DataFrame-with-DataFrame operations that require reindexing,
operate only on shared columns, then reindex.

Parameters
----------
right : DataFrame
op : binary operator

Returns
-------
DataFrame

---
## _should_reindex_frame_op
```python
from frame import _should_reindex_frame_op
```

Check if this is an operation between DataFrames that will need to reindex.

---
## _align_for_op
```python
from frame import _align_for_op
```

Convert rhs to meet lhs dims if input is list, tuple or np.ndarray.

Parameters
----------
left : DataFrame
right : Any
axis : int
flex : bool or None, default False
    Whether this is a flex op, in which case we reindex.
    None indicates not to check for alignment.
level : int or level name, default None

Returns
-------
left : DataFrame
right : Any

---
## _maybe_align_series_as_frame
```python
from frame import _maybe_align_series_as_frame
```

If the Series operand is not EA-dtype, we can broadcast to 2D and operate
blockwise.

---
## _flex_arith_method
```python
from frame import _flex_arith_method
```



---
## _construct_result
```python
from frame import _construct_result
```

Wrap the result of an arithmetic, comparison, or logical operation.

Parameters
----------
result : DataFrame

Returns
-------
DataFrame

---
## __divmod__
```python
from frame import __divmod__
```



---
## __rdivmod__
```python
from frame import __rdivmod__
```



---
## _flex_cmp_method
```python
from frame import _flex_cmp_method
```



---
## eq
```python
from frame import eq
```



---
## ne
```python
from frame import ne
```



---
## le
```python
from frame import le
```



---
## lt
```python
from frame import lt
```



---
## ge
```python
from frame import ge
```



---
## gt
```python
from frame import gt
```



---
## add
```python
from frame import add
```



---
## radd
```python
from frame import radd
```



---
## sub
```python
from frame import sub
```



---
## rsub
```python
from frame import rsub
```



---
## mul
```python
from frame import mul
```



---
## rmul
```python
from frame import rmul
```



---
## truediv
```python
from frame import truediv
```



---
## rtruediv
```python
from frame import rtruediv
```



---
## floordiv
```python
from frame import floordiv
```



---
## rfloordiv
```python
from frame import rfloordiv
```



---
## mod
```python
from frame import mod
```



---
## rmod
```python
from frame import rmod
```



---
## pow
```python
from frame import pow
```



---
## rpow
```python
from frame import rpow
```



---
## compare
```python
from frame import compare
```



---
## combine
```python
from frame import combine
```

Perform column-wise combine with another DataFrame.

Combines a DataFrame with `other` DataFrame using `func`
to element-wise combine columns. The row and column indexes of the
resulting DataFrame will be the union of the two.

Parameters
----------
other : DataFrame
    The DataFrame to merge column-wise.
func : function
    Function that takes two series as inputs and return a Series or a
    scalar. Used to merge the two dataframes column by columns.
fill_value : scalar value, default None
    The value to fill NaNs with prior to passing any column to the
    merge func.
overwrite : bool, default True
    If True, columns in `self` that do not exist in `other` will be
    overwritten with NaNs.

Returns
-------
DataFrame
    Combination of the provided DataFrames.

See Also
--------
DataFrame.combine_first : Combine two DataFrame objects and default to
    non-null values in frame calling the method.

Examples
--------
Combine using a simple function that chooses the smaller column.

>>> df1 = pd.DataFrame({'A': [0, 0], 'B': [4, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]})
>>> take_smaller = lambda s1, s2: s1 if s1.sum() < s2.sum() else s2
>>> df1.combine(df2, take_smaller)
   A  B
0  0  3
1  0  3

Example using a true element-wise combine function.

>>> df1 = pd.DataFrame({'A': [5, 0], 'B': [2, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]})
>>> df1.combine(df2, np.minimum)
   A  B
0  1  2
1  0  3

Using `fill_value` fills Nones prior to passing the column to the
merge function.

>>> df1 = pd.DataFrame({'A': [0, 0], 'B': [None, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]})
>>> df1.combine(df2, take_smaller, fill_value=-5)
   A    B
0  0 -5.0
1  0  4.0

However, if the same element in both dataframes is None, that None
is preserved

>>> df1 = pd.DataFrame({'A': [0, 0], 'B': [None, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [None, 3]})
>>> df1.combine(df2, take_smaller, fill_value=-5)
    A    B
0  0 -5.0
1  0  3.0

Example that demonstrates the use of `overwrite` and behavior when
the axis differ between the dataframes.

>>> df1 = pd.DataFrame({'A': [0, 0], 'B': [4, 4]})
>>> df2 = pd.DataFrame({'B': [3, 3], 'C': [-10, 1], }, index=[1, 2])
>>> df1.combine(df2, take_smaller)
     A    B     C
0  NaN  NaN   NaN
1  NaN  3.0 -10.0
2  NaN  3.0   1.0

>>> df1.combine(df2, take_smaller, overwrite=False)
     A    B     C
0  0.0  NaN   NaN
1  0.0  3.0 -10.0
2  NaN  3.0   1.0

Demonstrating the preference of the passed in dataframe.

>>> df2 = pd.DataFrame({'B': [3, 3], 'C': [1, 1], }, index=[1, 2])
>>> df2.combine(df1, take_smaller)
   A    B   C
0  0.0  NaN NaN
1  0.0  3.0 NaN
2  NaN  3.0 NaN

>>> df2.combine(df1, take_smaller, overwrite=False)
     A    B   C
0  0.0  NaN NaN
1  0.0  3.0 1.0
2  NaN  3.0 1.0

---
## combine_first
```python
from frame import combine_first
```

Update null elements with value in the same location in `other`.

Combine two DataFrame objects by filling null values in one DataFrame
with non-null values from other DataFrame. The row and column indexes
of the resulting DataFrame will be the union of the two. The resulting
dataframe contains the 'first' dataframe values and overrides the
second one values where both first.loc[index, col] and
second.loc[index, col] are not missing values, upon calling
first.combine_first(second).

Parameters
----------
other : DataFrame
    Provided DataFrame to use to fill null values.

Returns
-------
DataFrame
    The result of combining the provided DataFrame with the other object.

See Also
--------
DataFrame.combine : Perform series-wise operation on two DataFrames
    using a given function.

Examples
--------
>>> df1 = pd.DataFrame({'A': [None, 0], 'B': [None, 4]})
>>> df2 = pd.DataFrame({'A': [1, 1], 'B': [3, 3]})
>>> df1.combine_first(df2)
     A    B
0  1.0  3.0
1  0.0  4.0

Null values still persist if the location of that null value
does not exist in `other`

>>> df1 = pd.DataFrame({'A': [None, 0], 'B': [4, None]})
>>> df2 = pd.DataFrame({'B': [3, 3], 'C': [1, 1]}, index=[1, 2])
>>> df1.combine_first(df2)
     A    B    C
0  NaN  4.0  NaN
1  0.0  3.0  1.0
2  NaN  3.0  1.0

---
## update
```python
from frame import update
```

Modify in place using non-NA values from another DataFrame.

Aligns on indices. There is no return value.

Parameters
----------
other : DataFrame, or object coercible into a DataFrame
    Should have at least one matching index/column label
    with the original DataFrame. If a Series is passed,
    its name attribute must be set, and that will be
    used as the column name to align with the original DataFrame.
join : {'left'}, default 'left'
    Only left join is implemented, keeping the index and columns of the
    original object.
overwrite : bool, default True
    How to handle non-NA values for overlapping keys:

    * True: overwrite original DataFrame's values
      with values from `other`.
    * False: only update values that are NA in
      the original DataFrame.

filter_func : callable(1d-array) -> bool 1d-array, optional
    Can choose to replace values other than NA. Return True for values
    that should be updated.
errors : {'raise', 'ignore'}, default 'ignore'
    If 'raise', will raise a ValueError if the DataFrame and `other`
    both contain non-NA data in the same place.

Returns
-------
None
    This method directly changes calling object.

Raises
------
ValueError
    * When `errors='raise'` and there's overlapping non-NA data.
    * When `errors` is not either `'ignore'` or `'raise'`
NotImplementedError
    * If `join != 'left'`

See Also
--------
dict.update : Similar method for dictionaries.
DataFrame.merge : For column(s)-on-column(s) operations.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2, 3],
...                    'B': [400, 500, 600]})
>>> new_df = pd.DataFrame({'B': [4, 5, 6],
...                        'C': [7, 8, 9]})
>>> df.update(new_df)
>>> df
   A  B
0  1  4
1  2  5
2  3  6

The DataFrame's length does not increase as a result of the update,
only values at matching index/column labels are updated.

>>> df = pd.DataFrame({'A': ['a', 'b', 'c'],
...                    'B': ['x', 'y', 'z']})
>>> new_df = pd.DataFrame({'B': ['d', 'e', 'f', 'g', 'h', 'i']})
>>> df.update(new_df)
>>> df
   A  B
0  a  d
1  b  e
2  c  f

>>> df = pd.DataFrame({'A': ['a', 'b', 'c'],
...                    'B': ['x', 'y', 'z']})
>>> new_df = pd.DataFrame({'B': ['d', 'f']}, index=[0, 2])
>>> df.update(new_df)
>>> df
   A  B
0  a  d
1  b  y
2  c  f

For Series, its name attribute must be set.

>>> df = pd.DataFrame({'A': ['a', 'b', 'c'],
...                    'B': ['x', 'y', 'z']})
>>> new_column = pd.Series(['d', 'e', 'f'], name='B')
>>> df.update(new_column)
>>> df
   A  B
0  a  d
1  b  e
2  c  f

If `other` contains NaNs the corresponding values are not updated
in the original dataframe.

>>> df = pd.DataFrame({'A': [1, 2, 3],
...                    'B': [400., 500., 600.]})
>>> new_df = pd.DataFrame({'B': [4, np.nan, 6]})
>>> df.update(new_df)
>>> df
   A      B
0  1    4.0
1  2  500.0
2  3    6.0

---
## groupby
```python
from frame import groupby
```



---
## pivot
```python
from frame import pivot
```



---
## pivot_table
```python
from frame import pivot_table
```



---
## stack
```python
from frame import stack
```

Stack the prescribed level(s) from columns to index.

Return a reshaped DataFrame or Series having a multi-level
index with one or more new inner-most levels compared to the current
DataFrame. The new inner-most levels are created by pivoting the
columns of the current dataframe:

  - if the columns have a single level, the output is a Series;
  - if the columns have multiple levels, the new index
    level(s) is (are) taken from the prescribed level(s) and
    the output is a DataFrame.

Parameters
----------
level : int, str, list, default -1
    Level(s) to stack from the column axis onto the index
    axis, defined as one index or label, or a list of indices
    or labels.
dropna : bool, default True
    Whether to drop rows in the resulting Frame/Series with
    missing values. Stacking a column level onto the index
    axis can create combinations of index and column values
    that are missing from the original dataframe. See Examples
    section.
sort : bool, default True
    Whether to sort the levels of the resulting MultiIndex.
future_stack : bool, default False
    Whether to use the new implementation that will replace the current
    implementation in pandas 3.0. When True, dropna and sort have no impact
    on the result and must remain unspecified. See :ref:`pandas 2.1.0 Release
    notes <whatsnew_210.enhancements.new_stack>` for more details.

Returns
-------
DataFrame or Series
    Stacked dataframe or series.

See Also
--------
DataFrame.unstack : Unstack prescribed level(s) from index axis
     onto column axis.
DataFrame.pivot : Reshape dataframe from long format to wide
     format.
DataFrame.pivot_table : Create a spreadsheet-style pivot table
     as a DataFrame.

Notes
-----
The function is named by analogy with a collection of books
being reorganized from being side by side on a horizontal
position (the columns of the dataframe) to being stacked
vertically on top of each other (in the index of the
dataframe).

Reference :ref:`the user guide <reshaping.stacking>` for more examples.

Examples
--------
**Single level columns**

>>> df_single_level_cols = pd.DataFrame([[0, 1], [2, 3]],
...                                     index=['cat', 'dog'],
...                                     columns=['weight', 'height'])

Stacking a dataframe with a single level column axis returns a Series:

>>> df_single_level_cols
     weight height
cat       0      1
dog       2      3
>>> df_single_level_cols.stack(future_stack=True)
cat  weight    0
     height    1
dog  weight    2
     height    3
dtype: int64

**Multi level columns: simple case**

>>> multicol1 = pd.MultiIndex.from_tuples([('weight', 'kg'),
...                                        ('weight', 'pounds')])
>>> df_multi_level_cols1 = pd.DataFrame([[1, 2], [2, 4]],
...                                     index=['cat', 'dog'],
...                                     columns=multicol1)

Stacking a dataframe with a multi-level column axis:

>>> df_multi_level_cols1
     weight
         kg    pounds
cat       1        2
dog       2        4
>>> df_multi_level_cols1.stack(future_stack=True)
            weight
cat kg           1
    pounds       2
dog kg           2
    pounds       4

**Missing values**

>>> multicol2 = pd.MultiIndex.from_tuples([('weight', 'kg'),
...                                        ('height', 'm')])
>>> df_multi_level_cols2 = pd.DataFrame([[1.0, 2.0], [3.0, 4.0]],
...                                     index=['cat', 'dog'],
...                                     columns=multicol2)

It is common to have missing values when stacking a dataframe
with multi-level columns, as the stacked dataframe typically
has more values than the original dataframe. Missing values
are filled with NaNs:

>>> df_multi_level_cols2
    weight height
        kg      m
cat    1.0    2.0
dog    3.0    4.0
>>> df_multi_level_cols2.stack(future_stack=True)
        weight  height
cat kg     1.0     NaN
    m      NaN     2.0
dog kg     3.0     NaN
    m      NaN     4.0

**Prescribing the level(s) to be stacked**

The first parameter controls which level or levels are stacked:

>>> df_multi_level_cols2.stack(0, future_stack=True)
             kg    m
cat weight  1.0  NaN
    height  NaN  2.0
dog weight  3.0  NaN
    height  NaN  4.0
>>> df_multi_level_cols2.stack([0, 1], future_stack=True)
cat  weight  kg    1.0
     height  m     2.0
dog  weight  kg    3.0
     height  m     4.0
dtype: float64

---
## explode
```python
from frame import explode
```

Transform each element of a list-like to a row, replicating index values.

Parameters
----------
column : IndexLabel
    Column(s) to explode.
    For multiple columns, specify a non-empty list with each element
    be str or tuple, and all specified columns their list-like data
    on same row of the frame must have matching length.

    .. versionadded:: 1.3.0
        Multi-column explode

ignore_index : bool, default False
    If True, the resulting index will be labeled 0, 1, …, n - 1.

Returns
-------
DataFrame
    Exploded lists to rows of the subset columns;
    index will be duplicated for these rows.

Raises
------
ValueError :
    * If columns of the frame are not unique.
    * If specified columns to explode is empty list.
    * If specified columns to explode have not matching count of
      elements rowwise in the frame.

See Also
--------
DataFrame.unstack : Pivot a level of the (necessarily hierarchical)
    index labels.
DataFrame.melt : Unpivot a DataFrame from wide format to long format.
Series.explode : Explode a DataFrame from list-like columns to long format.

Notes
-----
This routine will explode list-likes including lists, tuples, sets,
Series, and np.ndarray. The result dtype of the subset rows will
be object. Scalars will be returned unchanged, and empty list-likes will
result in a np.nan for that row. In addition, the ordering of rows in the
output will be non-deterministic when exploding sets.

Reference :ref:`the user guide <reshaping.explode>` for more examples.

Examples
--------
>>> df = pd.DataFrame({'A': [[0, 1, 2], 'foo', [], [3, 4]],
...                    'B': 1,
...                    'C': [['a', 'b', 'c'], np.nan, [], ['d', 'e']]})
>>> df
           A  B          C
0  [0, 1, 2]  1  [a, b, c]
1        foo  1        NaN
2         []  1         []
3     [3, 4]  1     [d, e]

Single-column explode.

>>> df.explode('A')
     A  B          C
0    0  1  [a, b, c]
0    1  1  [a, b, c]
0    2  1  [a, b, c]
1  foo  1        NaN
2  NaN  1         []
3    3  1     [d, e]
3    4  1     [d, e]

Multi-column explode.

>>> df.explode(list('AC'))
     A  B    C
0    0  1    a
0    1  1    b
0    2  1    c
1  foo  1  NaN
2  NaN  1  NaN
3    3  1    d
3    4  1    e

---
## unstack
```python
from frame import unstack
```

Pivot a level of the (necessarily hierarchical) index labels.

Returns a DataFrame having a new level of column labels whose inner-most level
consists of the pivoted index labels.

If the index is not a MultiIndex, the output will be a Series
(the analogue of stack when the columns are not a MultiIndex).

Parameters
----------
level : int, str, or list of these, default -1 (last level)
    Level(s) of index to unstack, can pass level name.
fill_value : int, str or dict
    Replace NaN with this value if the unstack produces missing values.
sort : bool, default True
    Sort the level(s) in the resulting MultiIndex columns.

Returns
-------
Series or DataFrame

See Also
--------
DataFrame.pivot : Pivot a table based on column values.
DataFrame.stack : Pivot a level of the column labels (inverse operation
    from `unstack`).

Notes
-----
Reference :ref:`the user guide <reshaping.stacking>` for more examples.

Examples
--------
>>> index = pd.MultiIndex.from_tuples([('one', 'a'), ('one', 'b'),
...                                    ('two', 'a'), ('two', 'b')])
>>> s = pd.Series(np.arange(1.0, 5.0), index=index)
>>> s
one  a   1.0
     b   2.0
two  a   3.0
     b   4.0
dtype: float64

>>> s.unstack(level=-1)
     a   b
one  1.0  2.0
two  3.0  4.0

>>> s.unstack(level=0)
   one  two
a  1.0   3.0
b  2.0   4.0

>>> df = s.unstack(level=0)
>>> df.unstack()
one  a  1.0
     b  2.0
two  a  3.0
     b  4.0
dtype: float64

---
## melt
```python
from frame import melt
```



---
## diff
```python
from frame import diff
```



---
## _gotitem
```python
from frame import _gotitem
```

Sub-classes to define. Return a sliced object.

Parameters
----------
key : string / list of selections
ndim : {1, 2}
    requested ndim of result
subset : object, default None
    subset to act on

---
## aggregate
```python
from frame import aggregate
```



---
## transform
```python
from frame import transform
```



---
## apply
```python
from frame import apply
```

Apply a function along an axis of the DataFrame.

Objects passed to the function are Series objects whose index is
either the DataFrame's index (``axis=0``) or the DataFrame's columns
(``axis=1``). By default (``result_type=None``), the final return type
is inferred from the return type of the applied function. Otherwise,
it depends on the `result_type` argument.

Parameters
----------
func : function
    Function to apply to each column or row.
axis : {0 or 'index', 1 or 'columns'}, default 0
    Axis along which the function is applied:

    * 0 or 'index': apply function to each column.
    * 1 or 'columns': apply function to each row.

raw : bool, default False
    Determines if row or column is passed as a Series or ndarray object:

    * ``False`` : passes each row or column as a Series to the
      function.
    * ``True`` : the passed function will receive ndarray objects
      instead.
      If you are just applying a NumPy reduction function this will
      achieve much better performance.

result_type : {'expand', 'reduce', 'broadcast', None}, default None
    These only act when ``axis=1`` (columns):

    * 'expand' : list-like results will be turned into columns.
    * 'reduce' : returns a Series if possible rather than expanding
      list-like results. This is the opposite of 'expand'.
    * 'broadcast' : results will be broadcast to the original shape
      of the DataFrame, the original index and columns will be
      retained.

    The default behaviour (None) depends on the return value of the
    applied function: list-like results will be returned as a Series
    of those. However if the apply function returns a Series these
    are expanded to columns.
args : tuple
    Positional arguments to pass to `func` in addition to the
    array/series.
by_row : False or "compat", default "compat"
    Only has an effect when ``func`` is a listlike or dictlike of funcs
    and the func isn't a string.
    If "compat", will if possible first translate the func into pandas
    methods (e.g. ``Series().apply(np.sum)`` will be translated to
    ``Series().sum()``). If that doesn't work, will try call to apply again with
    ``by_row=True`` and if that fails, will call apply again with
    ``by_row=False`` (backward compatible).
    If False, the funcs will be passed the whole Series at once.

    .. versionadded:: 2.1.0

engine : {'python', 'numba'}, default 'python'
    Choose between the python (default) engine or the numba engine in apply.

    The numba engine will attempt to JIT compile the passed function,
    which may result in speedups for large DataFrames.
    It also supports the following engine_kwargs :

    - nopython (compile the function in nopython mode)
    - nogil (release the GIL inside the JIT compiled function)
    - parallel (try to apply the function in parallel over the DataFrame)

      Note: Due to limitations within numba/how pandas interfaces with numba,
      you should only use this if raw=True

    Note: The numba compiler only supports a subset of
    valid Python/numpy operations.

    Please read more about the `supported python features
    <https://numba.pydata.org/numba-doc/dev/reference/pysupported.html>`_
    and `supported numpy features
    <https://numba.pydata.org/numba-doc/dev/reference/numpysupported.html>`_
    in numba to learn what you can or cannot use in the passed function.

    .. versionadded:: 2.2.0

engine_kwargs : dict
    Pass keyword arguments to the engine.
    This is currently only used by the numba engine,
    see the documentation for the engine argument for more information.
**kwargs
    Additional keyword arguments to pass as keywords arguments to
    `func`.

Returns
-------
Series or DataFrame
    Result of applying ``func`` along the given axis of the
    DataFrame.

See Also
--------
DataFrame.map: For elementwise operations.
DataFrame.aggregate: Only perform aggregating type operations.
DataFrame.transform: Only perform transforming type operations.

Notes
-----
Functions that mutate the passed object can produce unexpected
behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
for more details.

Examples
--------
>>> df = pd.DataFrame([[4, 9]] * 3, columns=['A', 'B'])
>>> df
   A  B
0  4  9
1  4  9
2  4  9

Using a numpy universal function (in this case the same as
``np.sqrt(df)``):

>>> df.apply(np.sqrt)
     A    B
0  2.0  3.0
1  2.0  3.0
2  2.0  3.0

Using a reducing function on either axis

>>> df.apply(np.sum, axis=0)
A    12
B    27
dtype: int64

>>> df.apply(np.sum, axis=1)
0    13
1    13
2    13
dtype: int64

Returning a list-like will result in a Series

>>> df.apply(lambda x: [1, 2], axis=1)
0    [1, 2]
1    [1, 2]
2    [1, 2]
dtype: object

Passing ``result_type='expand'`` will expand list-like results
to columns of a Dataframe

>>> df.apply(lambda x: [1, 2], axis=1, result_type='expand')
   0  1
0  1  2
1  1  2
2  1  2

Returning a Series inside the function is similar to passing
``result_type='expand'``. The resulting column names
will be the Series index.

>>> df.apply(lambda x: pd.Series([1, 2], index=['foo', 'bar']), axis=1)
   foo  bar
0    1    2
1    1    2
2    1    2

Passing ``result_type='broadcast'`` will ensure the same shape
result, whether list-like or scalar is returned by the function,
and broadcast it along the axis. The resulting column names will
be the originals.

>>> df.apply(lambda x: [1, 2], axis=1, result_type='broadcast')
   A  B
0  1  2
1  1  2
2  1  2

---
## map
```python
from frame import map
```

Apply a function to a Dataframe elementwise.

.. versionadded:: 2.1.0

   DataFrame.applymap was deprecated and renamed to DataFrame.map.

This method applies a function that accepts and returns a scalar
to every element of a DataFrame.

Parameters
----------
func : callable
    Python function, returns a single value from a single value.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NaN values, without passing them to func.
**kwargs
    Additional keyword arguments to pass as keywords arguments to
    `func`.

Returns
-------
DataFrame
    Transformed DataFrame.

See Also
--------
DataFrame.apply : Apply a function along input axis of DataFrame.
DataFrame.replace: Replace values given in `to_replace` with `value`.
Series.map : Apply a function elementwise on a Series.

Examples
--------
>>> df = pd.DataFrame([[1, 2.12], [3.356, 4.567]])
>>> df
       0      1
0  1.000  2.120
1  3.356  4.567

>>> df.map(lambda x: len(str(x)))
   0  1
0  3  4
1  5  5

Like Series.map, NA values can be ignored:

>>> df_copy = df.copy()
>>> df_copy.iloc[0, 0] = pd.NA
>>> df_copy.map(lambda x: len(str(x)), na_action='ignore')
     0  1
0  NaN  4
1  5.0  5

It is also possible to use `map` with functions that are not
`lambda` functions:

>>> df.map(round, ndigits=1)
     0    1
0  1.0  2.1
1  3.4  4.6

Note that a vectorized version of `func` often exists, which will
be much faster. You could square each number elementwise.

>>> df.map(lambda x: x**2)
           0          1
0   1.000000   4.494400
1  11.262736  20.857489

But it's better to avoid map in that case.

>>> df ** 2
           0          1
0   1.000000   4.494400
1  11.262736  20.857489

---
## applymap
```python
from frame import applymap
```

Apply a function to a Dataframe elementwise.

.. deprecated:: 2.1.0

   DataFrame.applymap has been deprecated. Use DataFrame.map instead.

This method applies a function that accepts and returns a scalar
to every element of a DataFrame.

Parameters
----------
func : callable
    Python function, returns a single value from a single value.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NaN values, without passing them to func.
**kwargs
    Additional keyword arguments to pass as keywords arguments to
    `func`.

Returns
-------
DataFrame
    Transformed DataFrame.

See Also
--------
DataFrame.apply : Apply a function along input axis of DataFrame.
DataFrame.map : Apply a function along input axis of DataFrame.
DataFrame.replace: Replace values given in `to_replace` with `value`.

Examples
--------
>>> df = pd.DataFrame([[1, 2.12], [3.356, 4.567]])
>>> df
       0      1
0  1.000  2.120
1  3.356  4.567

>>> df.map(lambda x: len(str(x)))
   0  1
0  3  4
1  5  5

---
## _append
```python
from frame import _append
```



---
## join
```python
from frame import join
```

Join columns of another DataFrame.

Join columns with `other` DataFrame either on index or on a key
column. Efficiently join multiple DataFrame objects by index at once by
passing a list.

Parameters
----------
other : DataFrame, Series, or a list containing any combination of them
    Index should be similar to one of the columns in this one. If a
    Series is passed, its name attribute must be set, and that will be
    used as the column name in the resulting joined DataFrame.
on : str, list of str, or array-like, optional
    Column or index level name(s) in the caller to join on the index
    in `other`, otherwise joins index-on-index. If multiple
    values given, the `other` DataFrame must have a MultiIndex. Can
    pass an array as the join key if it is not already contained in
    the calling DataFrame. Like an Excel VLOOKUP operation.
how : {'left', 'right', 'outer', 'inner', 'cross'}, default 'left'
    How to handle the operation of the two objects.

    * left: use calling frame's index (or column if on is specified)
    * right: use `other`'s index.
    * outer: form union of calling frame's index (or column if on is
      specified) with `other`'s index, and sort it lexicographically.
    * inner: form intersection of calling frame's index (or column if
      on is specified) with `other`'s index, preserving the order
      of the calling's one.
    * cross: creates the cartesian product from both frames, preserves the order
      of the left keys.
lsuffix : str, default ''
    Suffix to use from left frame's overlapping columns.
rsuffix : str, default ''
    Suffix to use from right frame's overlapping columns.
sort : bool, default False
    Order result DataFrame lexicographically by the join key. If False,
    the order of the join key depends on the join type (how keyword).
validate : str, optional
    If specified, checks if join is of specified type.

    * "one_to_one" or "1:1": check if join keys are unique in both left
      and right datasets.
    * "one_to_many" or "1:m": check if join keys are unique in left dataset.
    * "many_to_one" or "m:1": check if join keys are unique in right dataset.
    * "many_to_many" or "m:m": allowed, but does not result in checks.

    .. versionadded:: 1.5.0

Returns
-------
DataFrame
    A dataframe containing columns from both the caller and `other`.

See Also
--------
DataFrame.merge : For column(s)-on-column(s) operations.

Notes
-----
Parameters `on`, `lsuffix`, and `rsuffix` are not supported when
passing a list of `DataFrame` objects.

Examples
--------
>>> df = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3', 'K4', 'K5'],
...                    'A': ['A0', 'A1', 'A2', 'A3', 'A4', 'A5']})

>>> df
  key   A
0  K0  A0
1  K1  A1
2  K2  A2
3  K3  A3
4  K4  A4
5  K5  A5

>>> other = pd.DataFrame({'key': ['K0', 'K1', 'K2'],
...                       'B': ['B0', 'B1', 'B2']})

>>> other
  key   B
0  K0  B0
1  K1  B1
2  K2  B2

Join DataFrames using their indexes.

>>> df.join(other, lsuffix='_caller', rsuffix='_other')
  key_caller   A key_other    B
0         K0  A0        K0   B0
1         K1  A1        K1   B1
2         K2  A2        K2   B2
3         K3  A3       NaN  NaN
4         K4  A4       NaN  NaN
5         K5  A5       NaN  NaN

If we want to join using the key columns, we need to set key to be
the index in both `df` and `other`. The joined DataFrame will have
key as its index.

>>> df.set_index('key').join(other.set_index('key'))
      A    B
key
K0   A0   B0
K1   A1   B1
K2   A2   B2
K3   A3  NaN
K4   A4  NaN
K5   A5  NaN

Another option to join using the key columns is to use the `on`
parameter. DataFrame.join always uses `other`'s index but we can use
any column in `df`. This method preserves the original DataFrame's
index in the result.

>>> df.join(other.set_index('key'), on='key')
  key   A    B
0  K0  A0   B0
1  K1  A1   B1
2  K2  A2   B2
3  K3  A3  NaN
4  K4  A4  NaN
5  K5  A5  NaN

Using non-unique key values shows how they are matched.

>>> df = pd.DataFrame({'key': ['K0', 'K1', 'K1', 'K3', 'K0', 'K1'],
...                    'A': ['A0', 'A1', 'A2', 'A3', 'A4', 'A5']})

>>> df
  key   A
0  K0  A0
1  K1  A1
2  K1  A2
3  K3  A3
4  K0  A4
5  K1  A5

>>> df.join(other.set_index('key'), on='key', validate='m:1')
  key   A    B
0  K0  A0   B0
1  K1  A1   B1
2  K1  A2   B1
3  K3  A3  NaN
4  K0  A4   B0
5  K1  A5   B1

---
## merge
```python
from frame import merge
```



---
## round
```python
from frame import round
```

Round a DataFrame to a variable number of decimal places.

Parameters
----------
decimals : int, dict, Series
    Number of decimal places to round each column to. If an int is
    given, round each column to the same number of places.
    Otherwise dict and Series round to variable numbers of places.
    Column names should be in the keys if `decimals` is a
    dict-like, or in the index if `decimals` is a Series. Any
    columns not included in `decimals` will be left as is. Elements
    of `decimals` which are not columns of the input will be
    ignored.
*args
    Additional keywords have no effect but might be accepted for
    compatibility with numpy.
**kwargs
    Additional keywords have no effect but might be accepted for
    compatibility with numpy.

Returns
-------
DataFrame
    A DataFrame with the affected columns rounded to the specified
    number of decimal places.

See Also
--------
numpy.around : Round a numpy array to the given number of decimals.
Series.round : Round a Series to the given number of decimals.

Examples
--------
>>> df = pd.DataFrame([(.21, .32), (.01, .67), (.66, .03), (.21, .18)],
...                   columns=['dogs', 'cats'])
>>> df
    dogs  cats
0  0.21  0.32
1  0.01  0.67
2  0.66  0.03
3  0.21  0.18

By providing an integer each column is rounded to the same number
of decimal places

>>> df.round(1)
    dogs  cats
0   0.2   0.3
1   0.0   0.7
2   0.7   0.0
3   0.2   0.2

With a dict, the number of places for specific columns can be
specified with the column names as key and the number of decimal
places as value

>>> df.round({'dogs': 1, 'cats': 0})
    dogs  cats
0   0.2   0.0
1   0.0   1.0
2   0.7   0.0
3   0.2   0.0

Using a Series, the number of places for specific columns can be
specified with the column names as index and the number of
decimal places as value

>>> decimals = pd.Series([0, 1], index=['cats', 'dogs'])
>>> df.round(decimals)
    dogs  cats
0   0.2   0.0
1   0.0   1.0
2   0.7   0.0
3   0.2   0.0

---
## corr
```python
from frame import corr
```

Compute pairwise correlation of columns, excluding NA/null values.

Parameters
----------
method : {'pearson', 'kendall', 'spearman'} or callable
    Method of correlation:

    * pearson : standard correlation coefficient
    * kendall : Kendall Tau correlation coefficient
    * spearman : Spearman rank correlation
    * callable: callable with input two 1d ndarrays
        and returning a float. Note that the returned matrix from corr
        will have 1 along the diagonals and will be symmetric
        regardless of the callable's behavior.
min_periods : int, optional
    Minimum number of observations required per pair of columns
    to have a valid result. Currently only available for Pearson
    and Spearman correlation.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0
        The default value of ``numeric_only`` is now ``False``.

Returns
-------
DataFrame
    Correlation matrix.

See Also
--------
DataFrame.corrwith : Compute pairwise correlation with another
    DataFrame or Series.
Series.corr : Compute the correlation between two Series.

Notes
-----
Pearson, Kendall and Spearman correlation are currently computed using pairwise complete observations.

* `Pearson correlation coefficient <https://en.wikipedia.org/wiki/Pearson_correlation_coefficient>`_
* `Kendall rank correlation coefficient <https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient>`_
* `Spearman's rank correlation coefficient <https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient>`_

Examples
--------
>>> def histogram_intersection(a, b):
...     v = np.minimum(a, b).sum().round(decimals=1)
...     return v
>>> df = pd.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)],
...                   columns=['dogs', 'cats'])
>>> df.corr(method=histogram_intersection)
      dogs  cats
dogs   1.0   0.3
cats   0.3   1.0

>>> df = pd.DataFrame([(1, 1), (2, np.nan), (np.nan, 3), (4, 4)],
...                   columns=['dogs', 'cats'])
>>> df.corr(min_periods=3)
      dogs  cats
dogs   1.0   NaN
cats   NaN   1.0

---
## cov
```python
from frame import cov
```

Compute pairwise covariance of columns, excluding NA/null values.

Compute the pairwise covariance among the series of a DataFrame.
The returned data frame is the `covariance matrix
<https://en.wikipedia.org/wiki/Covariance_matrix>`__ of the columns
of the DataFrame.

Both NA and null values are automatically excluded from the
calculation. (See the note below about bias from missing values.)
A threshold can be set for the minimum number of
observations for each value created. Comparisons with observations
below this threshold will be returned as ``NaN``.

This method is generally used for the analysis of time series data to
understand the relationship between different measures
across time.

Parameters
----------
min_periods : int, optional
    Minimum number of observations required per pair of columns
    to have a valid result.

ddof : int, default 1
    Delta degrees of freedom.  The divisor used in calculations
    is ``N - ddof``, where ``N`` represents the number of elements.
    This argument is applicable only when no ``nan`` is in the dataframe.

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0
        The default value of ``numeric_only`` is now ``False``.

Returns
-------
DataFrame
    The covariance matrix of the series of the DataFrame.

See Also
--------
Series.cov : Compute covariance with another Series.
core.window.ewm.ExponentialMovingWindow.cov : Exponential weighted sample
    covariance.
core.window.expanding.Expanding.cov : Expanding sample covariance.
core.window.rolling.Rolling.cov : Rolling sample covariance.

Notes
-----
Returns the covariance matrix of the DataFrame's time series.
The covariance is normalized by N-ddof.

For DataFrames that have Series that are missing data (assuming that
data is `missing at random
<https://en.wikipedia.org/wiki/Missing_data#Missing_at_random>`__)
the returned covariance matrix will be an unbiased estimate
of the variance and covariance between the member Series.

However, for many applications this estimate may not be acceptable
because the estimate covariance matrix is not guaranteed to be positive
semi-definite. This could lead to estimate correlations having
absolute values which are greater than one, and/or a non-invertible
covariance matrix. See `Estimation of covariance matrices
<https://en.wikipedia.org/w/index.php?title=Estimation_of_covariance_
matrices>`__ for more details.

Examples
--------
>>> df = pd.DataFrame([(1, 2), (0, 3), (2, 0), (1, 1)],
...                   columns=['dogs', 'cats'])
>>> df.cov()
          dogs      cats
dogs  0.666667 -1.000000
cats -1.000000  1.666667

>>> np.random.seed(42)
>>> df = pd.DataFrame(np.random.randn(1000, 5),
...                   columns=['a', 'b', 'c', 'd', 'e'])
>>> df.cov()
          a         b         c         d         e
a  0.998438 -0.020161  0.059277 -0.008943  0.014144
b -0.020161  1.059352 -0.008543 -0.024738  0.009826
c  0.059277 -0.008543  1.010670 -0.001486 -0.000271
d -0.008943 -0.024738 -0.001486  0.921297 -0.013692
e  0.014144  0.009826 -0.000271 -0.013692  0.977795

**Minimum number of periods**

This method also supports an optional ``min_periods`` keyword
that specifies the required minimum number of non-NA observations for
each column pair in order to have a valid result:

>>> np.random.seed(42)
>>> df = pd.DataFrame(np.random.randn(20, 3),
...                   columns=['a', 'b', 'c'])
>>> df.loc[df.index[:5], 'a'] = np.nan
>>> df.loc[df.index[5:10], 'b'] = np.nan
>>> df.cov(min_periods=12)
          a         b         c
a  0.316741       NaN -0.150812
b       NaN  1.248003  0.191417
c -0.150812  0.191417  0.895202

---
## corrwith
```python
from frame import corrwith
```

Compute pairwise correlation.

Pairwise correlation is computed between rows or columns of
DataFrame with rows or columns of Series or DataFrame. DataFrames
are first aligned along both axes before computing the
correlations.

Parameters
----------
other : DataFrame, Series
    Object with which to compute correlations.
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to use. 0 or 'index' to compute row-wise, 1 or 'columns' for
    column-wise.
drop : bool, default False
    Drop missing indices from result.
method : {'pearson', 'kendall', 'spearman'} or callable
    Method of correlation:

    * pearson : standard correlation coefficient
    * kendall : Kendall Tau correlation coefficient
    * spearman : Spearman rank correlation
    * callable: callable with input two 1d ndarrays
        and returning a float.

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0
        The default value of ``numeric_only`` is now ``False``.

Returns
-------
Series
    Pairwise correlations.

See Also
--------
DataFrame.corr : Compute pairwise correlation of columns.

Examples
--------
>>> index = ["a", "b", "c", "d", "e"]
>>> columns = ["one", "two", "three", "four"]
>>> df1 = pd.DataFrame(np.arange(20).reshape(5, 4), index=index, columns=columns)
>>> df2 = pd.DataFrame(np.arange(16).reshape(4, 4), index=index[:4], columns=columns)
>>> df1.corrwith(df2)
one      1.0
two      1.0
three    1.0
four     1.0
dtype: float64

>>> df2.corrwith(df1, axis=1)
a    1.0
b    1.0
c    1.0
d    1.0
e    NaN
dtype: float64

---
## count
```python
from frame import count
```

Count non-NA cells for each column or row.

The values `None`, `NaN`, `NaT`, ``pandas.NA`` are considered NA.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    If 0 or 'index' counts are generated for each column.
    If 1 or 'columns' counts are generated for each row.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

Returns
-------
Series
    For each column/row the number of non-NA/null entries.

See Also
--------
Series.count: Number of non-NA elements in a Series.
DataFrame.value_counts: Count unique combinations of columns.
DataFrame.shape: Number of DataFrame rows and columns (including NA
    elements).
DataFrame.isna: Boolean same-sized DataFrame showing places of NA
    elements.

Examples
--------
Constructing DataFrame from a dictionary:

>>> df = pd.DataFrame({"Person":
...                    ["John", "Myla", "Lewis", "John", "Myla"],
...                    "Age": [24., np.nan, 21., 33, 26],
...                    "Single": [False, True, True, True, False]})
>>> df
   Person   Age  Single
0    John  24.0   False
1    Myla   NaN    True
2   Lewis  21.0    True
3    John  33.0    True
4    Myla  26.0   False

Notice the uncounted NA values:

>>> df.count()
Person    5
Age       4
Single    5
dtype: int64

Counts for each **row**:

>>> df.count(axis='columns')
0    3
1    2
2    3
3    3
4    3
dtype: int64

---
## _reduce
```python
from frame import _reduce
```



---
## _reduce_axis1
```python
from frame import _reduce_axis1
```

Special case for _reduce to try to avoid a potentially-expensive transpose.

Apply the reduction block-wise along axis=1 and then reduce the resulting
1D arrays.

---
## any
```python
from frame import any
```



---
## all
```python
from frame import all
```



---
## min
```python
from frame import min
```



---
## max
```python
from frame import max
```



---
## sum
```python
from frame import sum
```



---
## prod
```python
from frame import prod
```



---
## mean
```python
from frame import mean
```



---
## median
```python
from frame import median
```



---
## sem
```python
from frame import sem
```



---
## var
```python
from frame import var
```



---
## std
```python
from frame import std
```



---
## skew
```python
from frame import skew
```



---
## kurt
```python
from frame import kurt
```



---
## cummin
```python
from frame import cummin
```



---
## cummax
```python
from frame import cummax
```



---
## cumsum
```python
from frame import cumsum
```



---
## cumprod
```python
from frame import cumprod
```



---
## nunique
```python
from frame import nunique
```

Count number of distinct elements in specified axis.

Return Series with number of distinct elements. Can ignore NaN
values.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for
    column-wise.
dropna : bool, default True
    Don't include NaN in the counts.

Returns
-------
Series

See Also
--------
Series.nunique: Method nunique for Series.
DataFrame.count: Count non-NA cells for each column or row.

Examples
--------
>>> df = pd.DataFrame({'A': [4, 5, 6], 'B': [4, 1, 1]})
>>> df.nunique()
A    3
B    2
dtype: int64

>>> df.nunique(axis=1)
0    1
1    2
2    2
dtype: int64

---
## idxmin
```python
from frame import idxmin
```



---
## idxmax
```python
from frame import idxmax
```



---
## _get_agg_axis
```python
from frame import _get_agg_axis
```

Let's be explicit about this.

---
## mode
```python
from frame import mode
```

Get the mode(s) of each element along the selected axis.

The mode of a set of values is the value that appears most often.
It can be multiple values.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to iterate over while searching for the mode:

    * 0 or 'index' : get mode of each column
    * 1 or 'columns' : get mode of each row.

numeric_only : bool, default False
    If True, only apply to numeric columns.
dropna : bool, default True
    Don't consider counts of NaN/NaT.

Returns
-------
DataFrame
    The modes of each column or row.

See Also
--------
Series.mode : Return the highest frequency value in a Series.
Series.value_counts : Return the counts of values in a Series.

Examples
--------
>>> df = pd.DataFrame([('bird', 2, 2),
...                    ('mammal', 4, np.nan),
...                    ('arthropod', 8, 0),
...                    ('bird', 2, np.nan)],
...                   index=('falcon', 'horse', 'spider', 'ostrich'),
...                   columns=('species', 'legs', 'wings'))
>>> df
           species  legs  wings
falcon        bird     2    2.0
horse       mammal     4    NaN
spider   arthropod     8    0.0
ostrich       bird     2    NaN

By default, missing values are not considered, and the mode of wings
are both 0 and 2. Because the resulting DataFrame has two rows,
the second row of ``species`` and ``legs`` contains ``NaN``.

>>> df.mode()
  species  legs  wings
0    bird   2.0    0.0
1     NaN   NaN    2.0

Setting ``dropna=False`` ``NaN`` values are considered and they can be
the mode (like for wings).

>>> df.mode(dropna=False)
  species  legs  wings
0    bird     2    NaN

Setting ``numeric_only=True``, only the mode of numeric columns is
computed, and columns of other types are ignored.

>>> df.mode(numeric_only=True)
   legs  wings
0   2.0    0.0
1   NaN    2.0

To compute the mode over columns and not rows, use the axis parameter:

>>> df.mode(axis='columns', numeric_only=True)
           0    1
falcon   2.0  NaN
horse    4.0  NaN
spider   0.0  8.0
ostrich  2.0  NaN

---
## quantile
```python
from frame import quantile
```

Return values at the given quantile over requested axis.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    Value between 0 <= q <= 1, the quantile(s) to compute.
axis : {0 or 'index', 1 or 'columns'}, default 0
    Equals 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionchanged:: 2.0.0
        The default value of ``numeric_only`` is now ``False``.

interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    This optional parameter specifies the interpolation method to use,
    when the desired quantile lies between two data points `i` and `j`:

    * linear: `i + (j - i) * fraction`, where `fraction` is the
      fractional part of the index surrounded by `i` and `j`.
    * lower: `i`.
    * higher: `j`.
    * nearest: `i` or `j` whichever is nearest.
    * midpoint: (`i` + `j`) / 2.
method : {'single', 'table'}, default 'single'
    Whether to compute quantiles per-column ('single') or over all columns
    ('table'). When 'table', the only allowed interpolation methods are
    'nearest', 'lower', and 'higher'.

Returns
-------
Series or DataFrame

    If ``q`` is an array, a DataFrame will be returned where the
      index is ``q``, the columns are the columns of self, and the
      values are the quantiles.
    If ``q`` is a float, a Series will be returned where the
      index is the columns of self and the values are the quantiles.

See Also
--------
core.window.rolling.Rolling.quantile: Rolling quantile.
numpy.percentile: Numpy function to compute the percentile.

Examples
--------
>>> df = pd.DataFrame(np.array([[1, 1], [2, 10], [3, 100], [4, 100]]),
...                   columns=['a', 'b'])
>>> df.quantile(.1)
a    1.3
b    3.7
Name: 0.1, dtype: float64
>>> df.quantile([.1, .5])
       a     b
0.1  1.3   3.7
0.5  2.5  55.0

Specifying `method='table'` will compute the quantile over all columns.

>>> df.quantile(.1, method="table", interpolation="nearest")
a    1
b    1
Name: 0.1, dtype: int64
>>> df.quantile([.1, .5], method="table", interpolation="nearest")
     a    b
0.1  1    1
0.5  3  100

Specifying `numeric_only=False` will also compute the quantile of
datetime and timedelta data.

>>> df = pd.DataFrame({'A': [1, 2],
...                    'B': [pd.Timestamp('2010'),
...                          pd.Timestamp('2011')],
...                    'C': [pd.Timedelta('1 days'),
...                          pd.Timedelta('2 days')]})
>>> df.quantile(0.5, numeric_only=False)
A                    1.5
B    2010-07-02 12:00:00
C        1 days 12:00:00
Name: 0.5, dtype: object

---
## to_timestamp
```python
from frame import to_timestamp
```

Cast to DatetimeIndex of timestamps, at *beginning* of period.

Parameters
----------
freq : str, default frequency of PeriodIndex
    Desired frequency.
how : {'s', 'e', 'start', 'end'}
    Convention for converting period to timestamp; start of period
    vs. end.
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to convert (the index by default).
copy : bool, default True
    If False then underlying input data is not copied.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
DataFrame
    The DataFrame has a DatetimeIndex.

Examples
--------
>>> idx = pd.PeriodIndex(['2023', '2024'], freq='Y')
>>> d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df1 = pd.DataFrame(data=d, index=idx)
>>> df1
      col1   col2
2023     1      3
2024     2      4

The resulting timestamps will be at the beginning of the year in this case

>>> df1 = df1.to_timestamp()
>>> df1
            col1   col2
2023-01-01     1      3
2024-01-01     2      4
>>> df1.index
DatetimeIndex(['2023-01-01', '2024-01-01'], dtype='datetime64[ns]', freq=None)

Using `freq` which is the offset that the Timestamps will have

>>> df2 = pd.DataFrame(data=d, index=idx)
>>> df2 = df2.to_timestamp(freq='M')
>>> df2
            col1   col2
2023-01-31     1      3
2024-01-31     2      4
>>> df2.index
DatetimeIndex(['2023-01-31', '2024-01-31'], dtype='datetime64[ns]', freq=None)

---
## to_period
```python
from frame import to_period
```

Convert DataFrame from DatetimeIndex to PeriodIndex.

Convert DataFrame from DatetimeIndex to PeriodIndex with desired
frequency (inferred from index if not passed).

Parameters
----------
freq : str, default
    Frequency of the PeriodIndex.
axis : {0 or 'index', 1 or 'columns'}, default 0
    The axis to convert (the index by default).
copy : bool, default True
    If False then underlying input data is not copied.

    .. note::
        The `copy` keyword will change behavior in pandas 3.0.
        `Copy-on-Write
        <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`__
        will be enabled by default, which means that all methods with a
        `copy` keyword will use a lazy copy mechanism to defer the copy and
        ignore the `copy` keyword. The `copy` keyword will be removed in a
        future version of pandas.

        You can already get the future behavior and improvements through
        enabling copy on write ``pd.options.mode.copy_on_write = True``

Returns
-------
DataFrame
    The DataFrame has a PeriodIndex.

Examples
--------
>>> idx = pd.to_datetime(
...     [
...         "2001-03-31 00:00:00",
...         "2002-05-31 00:00:00",
...         "2003-08-31 00:00:00",
...     ]
... )

>>> idx
DatetimeIndex(['2001-03-31', '2002-05-31', '2003-08-31'],
dtype='datetime64[ns]', freq=None)

>>> idx.to_period("M")
PeriodIndex(['2001-03', '2002-05', '2003-08'], dtype='period[M]')

For the yearly frequency

>>> idx.to_period("Y")
PeriodIndex(['2001', '2002', '2003'], dtype='period[Y-DEC]')

---
## isin
```python
from frame import isin
```

Whether each element in the DataFrame is contained in values.

Parameters
----------
values : iterable, Series, DataFrame or dict
    The result will only be true at a location if all the
    labels match. If `values` is a Series, that's the index. If
    `values` is a dict, the keys must be the column names,
    which must match. If `values` is a DataFrame,
    then both the index and column labels must match.

Returns
-------
DataFrame
    DataFrame of booleans showing whether each element in the DataFrame
    is contained in values.

See Also
--------
DataFrame.eq: Equality test for DataFrame.
Series.isin: Equivalent method on Series.
Series.str.contains: Test if pattern or regex is contained within a
    string of a Series or Index.

Examples
--------
>>> df = pd.DataFrame({'num_legs': [2, 4], 'num_wings': [2, 0]},
...                   index=['falcon', 'dog'])
>>> df
        num_legs  num_wings
falcon         2          2
dog            4          0

When ``values`` is a list check whether every value in the DataFrame
is present in the list (which animals have 0 or 2 legs or wings)

>>> df.isin([0, 2])
        num_legs  num_wings
falcon      True       True
dog        False       True

To check if ``values`` is *not* in the DataFrame, use the ``~`` operator:

>>> ~df.isin([0, 2])
        num_legs  num_wings
falcon     False      False
dog         True      False

When ``values`` is a dict, we can pass values to check for each
column separately:

>>> df.isin({'num_wings': [0, 3]})
        num_legs  num_wings
falcon     False      False
dog        False       True

When ``values`` is a Series or DataFrame the index and column must
match. Note that 'falcon' does not match based on the number of legs
in other.

>>> other = pd.DataFrame({'num_legs': [8, 3], 'num_wings': [0, 2]},
...                      index=['spider', 'falcon'])
>>> df.isin(other)
        num_legs  num_wings
falcon     False       True
dog        False      False

---
## _to_dict_of_blocks
```python
from frame import _to_dict_of_blocks
```

Return a dict of dtype -> Constructor Types that
each is a homogeneous dtype.

Internal ONLY - only works for BlockManager

---
## values
```python
from frame import values
```

Return a Numpy representation of the DataFrame.

.. warning::

   We recommend using :meth:`DataFrame.to_numpy` instead.

Only the values in the DataFrame will be returned, the axes labels
will be removed.

Returns
-------
numpy.ndarray
    The values of the DataFrame.

See Also
--------
DataFrame.to_numpy : Recommended alternative to this method.
DataFrame.index : Retrieve the index labels.
DataFrame.columns : Retrieving the column names.

Notes
-----
The dtype will be a lower-common-denominator dtype (implicit
upcasting); that is to say if the dtypes (even of numeric types)
are mixed, the one that accommodates all will be chosen. Use this
with care if you are not dealing with the blocks.

e.g. If the dtypes are float16 and float32, dtype will be upcast to
float32.  If dtypes are int32 and uint8, dtype will be upcast to
int32. By :func:`numpy.find_common_type` convention, mixing int64
and uint64 will result in a float64 dtype.

Examples
--------
A DataFrame where all columns are the same type (e.g., int64) results
in an array of the same type.

>>> df = pd.DataFrame({'age':    [ 3,  29],
...                    'height': [94, 170],
...                    'weight': [31, 115]})
>>> df
   age  height  weight
0    3      94      31
1   29     170     115
>>> df.dtypes
age       int64
height    int64
weight    int64
dtype: object
>>> df.values
array([[  3,  94,  31],
       [ 29, 170, 115]])

A DataFrame with mixed type columns(e.g., str/object, int64, float32)
results in an ndarray of the broadest type that accommodates these
mixed types (e.g., object).

>>> df2 = pd.DataFrame([('parrot',   24.0, 'second'),
...                     ('lion',     80.5, 1),
...                     ('monkey', np.nan, None)],
...                   columns=('name', 'max_speed', 'rank'))
>>> df2.dtypes
name          object
max_speed    float64
rank          object
dtype: object
>>> df2.values
array([['parrot', 24.0, 'second'],
       ['lion', 80.5, 1],
       ['monkey', nan, None]], dtype=object)

---
## maybe_reorder
```python
from frame import maybe_reorder
```

If our desired 'columns' do not match the data's pre-existing 'arr_columns',
we re-order our arrays.  This is like a pre-emptive (cheap) reindex.

---
## igetitem
```python
from frame import igetitem
```



---
## check_int_infer_dtype
```python
from frame import check_int_infer_dtype
```



---
## dtype_predicate
```python
from frame import dtype_predicate
```



---
## predicate
```python
from frame import predicate
```



---
## f
```python
from frame import f
```



---
## to_series
```python
from frame import to_series
```



---
## combiner
```python
from frame import combiner
```



---
## infer
```python
from frame import infer
```



---
## _dict_round
```python
from frame import _dict_round
```



---
## _series_round
```python
from frame import _series_round
```



---
## func
```python
from frame import func
```



---
## blk_func
```python
from frame import blk_func
```



---
## _get_data
```python
from frame import _get_data
```



---
## create_index
```python
from frame import create_index
```



---
## _arith_op
```python
from frame import _arith_op
```



---
## c
```python
from frame import c
```



---
## isin_
```python
from frame import isin_
```



---
## __name__
```python
from shared_docs import __name__
```



---
## preprocess_weights
```python
from sample import preprocess_weights
```

Process and validate the `weights` argument to `NDFrame.sample` and
`.GroupBy.sample`.

Returns `weights` as an ndarray[np.float64], validated except for normalizing
weights (because that must be done groupwise in groupby sampling).

---
## process_sampling_size
```python
from sample import process_sampling_size
```

Process and validate the `n` and `frac` arguments to `NDFrame.sample` and
`.GroupBy.sample`.

Returns None if `frac` should be used (variable sampling sizes), otherwise returns
the constant sampling size.

---
## sample
```python
from sample import sample
```

Randomly sample `size` indices in `np.arange(obj_len)`

Parameters
----------
obj_len : int
    The length of the indices being considered
size : int
    The number of values to choose
replace : bool
    Allow or disallow sampling of the same row more than once.
weights : np.ndarray[np.float64] or None
    If None, equal probability weighting, otherwise weights according
    to the vector normalized
random_state: np.random.RandomState or np.random.Generator
    State used for the random sampling

Returns
-------
np.ndarray[np.intp]

---
## _IndexSlice
```python
from indexing import _IndexSlice
```

Create an object to more easily perform multi-index slicing.

See Also
--------
MultiIndex.remove_unused_levels : New MultiIndex with no unused levels.

Notes
-----
See :ref:`Defined Levels <advanced.shown_levels>`
for further info on slicing a MultiIndex.

Examples
--------
>>> midx = pd.MultiIndex.from_product([['A0','A1'], ['B0','B1','B2','B3']])
>>> columns = ['foo', 'bar']
>>> dfmi = pd.DataFrame(np.arange(16).reshape((len(midx), len(columns))),
...                     index=midx, columns=columns)

Using the default slice command:

>>> dfmi.loc[(slice(None), slice('B0', 'B1')), :]
           foo  bar
    A0 B0    0    1
       B1    2    3
    A1 B0    8    9
       B1   10   11

Using the IndexSlice class for a more intuitive command:

>>> idx = pd.IndexSlice
>>> dfmi.loc[idx[:, 'B0':'B1'], :]
           foo  bar
    A0 B0    0    1
       B1    2    3
    A1 B0    8    9
       B1   10   11

---
## IndexingMixin
```python
from indexing import IndexingMixin
```

Mixin for adding .loc/.iloc/.at/.iat to Dataframes and Series.

---
## _LocationIndexer
```python
from indexing import _LocationIndexer
```



---
## _LocIndexer
```python
from indexing import _LocIndexer
```



---
## _iLocIndexer
```python
from indexing import _iLocIndexer
```



---
## _ScalarAccessIndexer
```python
from indexing import _ScalarAccessIndexer
```

Access scalars quickly.

---
## _AtIndexer
```python
from indexing import _AtIndexer
```



---
## _iAtIndexer
```python
from indexing import _iAtIndexer
```



---
## _tuplify
```python
from indexing import _tuplify
```

Given an indexer for the first dimension, create an equivalent tuple
for indexing over all dimensions.

Parameters
----------
ndim : int
loc : object

Returns
-------
tuple

---
## _tupleize_axis_indexer
```python
from indexing import _tupleize_axis_indexer
```

If we have an axis, adapt the given key to be axis-independent.

---
## check_bool_indexer
```python
from indexing import check_bool_indexer
```

Check if key is a valid boolean indexer for an object with such index and
perform reindexing or conversion if needed.

This function assumes that is_bool_indexer(key) == True.

Parameters
----------
index : Index
    Index of the object on which the indexing is done.
key : list-like
    Boolean indexer to check.

Returns
-------
np.array
    Resulting key.

Raises
------
IndexError
    If the key does not have the same length as index.
IndexingError
    If the index of the key is unalignable to index.

---
## convert_missing_indexer
```python
from indexing import convert_missing_indexer
```

Reverse convert a missing indexer, which is a dict
return the scalar indexer and a boolean indicating if we converted

---
## convert_from_missing_indexer_tuple
```python
from indexing import convert_from_missing_indexer_tuple
```

Create a filtered indexer that doesn't have any missing indexers.

---
## maybe_convert_ix
```python
from indexing import maybe_convert_ix
```

We likely want to take the cross-product.

---
## is_nested_tuple
```python
from indexing import is_nested_tuple
```

Returns
-------
bool

---
## is_label_like
```python
from indexing import is_label_like
```

Returns
-------
bool

---
## need_slice
```python
from indexing import need_slice
```

Returns
-------
bool

---
## check_dict_or_set_indexers
```python
from indexing import check_dict_or_set_indexers
```

Check if the indexer is or contains a dict or set, which is no longer allowed.

---
## __getitem__
```python
from indexing import __getitem__
```



---
## iloc
```python
from indexing import iloc
```

Purely integer-location based indexing for selection by position.

.. deprecated:: 2.2.0

   Returning a tuple from a callable is deprecated.

``.iloc[]`` is primarily integer position based (from ``0`` to
``length-1`` of the axis), but may also be used with a boolean
array.

Allowed inputs are:

- An integer, e.g. ``5``.
- A list or array of integers, e.g. ``[4, 3, 0]``.
- A slice object with ints, e.g. ``1:7``.
- A boolean array.
- A ``callable`` function with one argument (the calling Series or
  DataFrame) and that returns valid output for indexing (one of the above).
  This is useful in method chains, when you don't have a reference to the
  calling object, but would like to base your selection on
  some value.
- A tuple of row and column indexes. The tuple elements consist of one of the
  above inputs, e.g. ``(0, 1)``.

``.iloc`` will raise ``IndexError`` if a requested indexer is
out-of-bounds, except *slice* indexers which allow out-of-bounds
indexing (this conforms with python/numpy *slice* semantics).

See more at :ref:`Selection by Position <indexing.integer>`.

See Also
--------
DataFrame.iat : Fast integer location scalar accessor.
DataFrame.loc : Purely label-location based indexer for selection by label.
Series.iloc : Purely integer-location based indexing for
               selection by position.

Examples
--------
>>> mydict = [{'a': 1, 'b': 2, 'c': 3, 'd': 4},
...           {'a': 100, 'b': 200, 'c': 300, 'd': 400},
...           {'a': 1000, 'b': 2000, 'c': 3000, 'd': 4000}]
>>> df = pd.DataFrame(mydict)
>>> df
      a     b     c     d
0     1     2     3     4
1   100   200   300   400
2  1000  2000  3000  4000

**Indexing just the rows**

With a scalar integer.

>>> type(df.iloc[0])
<class 'pandas.core.series.Series'>
>>> df.iloc[0]
a    1
b    2
c    3
d    4
Name: 0, dtype: int64

With a list of integers.

>>> df.iloc[[0]]
   a  b  c  d
0  1  2  3  4
>>> type(df.iloc[[0]])
<class 'pandas.core.frame.DataFrame'>

>>> df.iloc[[0, 1]]
     a    b    c    d
0    1    2    3    4
1  100  200  300  400

With a `slice` object.

>>> df.iloc[:3]
      a     b     c     d
0     1     2     3     4
1   100   200   300   400
2  1000  2000  3000  4000

With a boolean mask the same length as the index.

>>> df.iloc[[True, False, True]]
      a     b     c     d
0     1     2     3     4
2  1000  2000  3000  4000

With a callable, useful in method chains. The `x` passed
to the ``lambda`` is the DataFrame being sliced. This selects
the rows whose index label even.

>>> df.iloc[lambda x: x.index % 2 == 0]
      a     b     c     d
0     1     2     3     4
2  1000  2000  3000  4000

**Indexing both axes**

You can mix the indexer types for the index and columns. Use ``:`` to
select the entire axis.

With scalar integers.

>>> df.iloc[0, 1]
2

With lists of integers.

>>> df.iloc[[0, 2], [1, 3]]
      b     d
0     2     4
2  2000  4000

With `slice` objects.

>>> df.iloc[1:3, 0:3]
      a     b     c
1   100   200   300
2  1000  2000  3000

With a boolean array whose length matches the columns.

>>> df.iloc[:, [True, False, True, False]]
      a     c
0     1     3
1   100   300
2  1000  3000

With a callable function that expects the Series or DataFrame.

>>> df.iloc[:, lambda df: [0, 2]]
      a     c
0     1     3
1   100   300
2  1000  3000

---
## loc
```python
from indexing import loc
```

Access a group of rows and columns by label(s) or a boolean array.

``.loc[]`` is primarily label based, but may also be used with a
boolean array.

Allowed inputs are:

- A single label, e.g. ``5`` or ``'a'``, (note that ``5`` is
  interpreted as a *label* of the index, and **never** as an
  integer position along the index).
- A list or array of labels, e.g. ``['a', 'b', 'c']``.
- A slice object with labels, e.g. ``'a':'f'``.

  .. warning:: Note that contrary to usual python slices, **both** the
      start and the stop are included

- A boolean array of the same length as the axis being sliced,
  e.g. ``[True, False, True]``.
- An alignable boolean Series. The index of the key will be aligned before
  masking.
- An alignable Index. The Index of the returned selection will be the input.
- A ``callable`` function with one argument (the calling Series or
  DataFrame) and that returns valid output for indexing (one of the above)

See more at :ref:`Selection by Label <indexing.label>`.

Raises
------
KeyError
    If any items are not found.
IndexingError
    If an indexed key is passed and its index is unalignable to the frame index.

See Also
--------
DataFrame.at : Access a single value for a row/column label pair.
DataFrame.iloc : Access group of rows and columns by integer position(s).
DataFrame.xs : Returns a cross-section (row(s) or column(s)) from the
               Series/DataFrame.
Series.loc : Access group of values using labels.

Examples
--------
**Getting values**

>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
...                   index=['cobra', 'viper', 'sidewinder'],
...                   columns=['max_speed', 'shield'])
>>> df
            max_speed  shield
cobra               1       2
viper               4       5
sidewinder          7       8

Single label. Note this returns the row as a Series.

>>> df.loc['viper']
max_speed    4
shield       5
Name: viper, dtype: int64

List of labels. Note using ``[[]]`` returns a DataFrame.

>>> df.loc[['viper', 'sidewinder']]
            max_speed  shield
viper               4       5
sidewinder          7       8

Single label for row and column

>>> df.loc['cobra', 'shield']
2

Slice with labels for row and single label for column. As mentioned
above, note that both the start and stop of the slice are included.

>>> df.loc['cobra':'viper', 'max_speed']
cobra    1
viper    4
Name: max_speed, dtype: int64

Boolean list with the same length as the row axis

>>> df.loc[[False, False, True]]
            max_speed  shield
sidewinder          7       8

Alignable boolean Series:

>>> df.loc[pd.Series([False, True, False],
...                  index=['viper', 'sidewinder', 'cobra'])]
                     max_speed  shield
sidewinder          7       8

Index (same behavior as ``df.reindex``)

>>> df.loc[pd.Index(["cobra", "viper"], name="foo")]
       max_speed  shield
foo
cobra          1       2
viper          4       5

Conditional that returns a boolean Series

>>> df.loc[df['shield'] > 6]
            max_speed  shield
sidewinder          7       8

Conditional that returns a boolean Series with column labels specified

>>> df.loc[df['shield'] > 6, ['max_speed']]
            max_speed
sidewinder          7

Multiple conditional using ``&`` that returns a boolean Series

>>> df.loc[(df['max_speed'] > 1) & (df['shield'] < 8)]
            max_speed  shield
viper          4       5

Multiple conditional using ``|`` that returns a boolean Series

>>> df.loc[(df['max_speed'] > 4) | (df['shield'] < 5)]
            max_speed  shield
cobra               1       2
sidewinder          7       8

Please ensure that each condition is wrapped in parentheses ``()``.
See the :ref:`user guide<indexing.boolean>`
for more details and explanations of Boolean indexing.

.. note::
    If you find yourself using 3 or more conditionals in ``.loc[]``,
    consider using :ref:`advanced indexing<advanced.advanced_hierarchical>`.

    See below for using ``.loc[]`` on MultiIndex DataFrames.

Callable that returns a boolean Series

>>> df.loc[lambda df: df['shield'] == 8]
            max_speed  shield
sidewinder          7       8

**Setting values**

Set value for all items matching the list of labels

>>> df.loc[['viper', 'sidewinder'], ['shield']] = 50
>>> df
            max_speed  shield
cobra               1       2
viper               4      50
sidewinder          7      50

Set value for an entire row

>>> df.loc['cobra'] = 10
>>> df
            max_speed  shield
cobra              10      10
viper               4      50
sidewinder          7      50

Set value for an entire column

>>> df.loc[:, 'max_speed'] = 30
>>> df
            max_speed  shield
cobra              30      10
viper              30      50
sidewinder         30      50

Set value for rows matching callable condition

>>> df.loc[df['shield'] > 35] = 0
>>> df
            max_speed  shield
cobra              30      10
viper               0       0
sidewinder          0       0

Add value matching location

>>> df.loc["viper", "shield"] += 5
>>> df
            max_speed  shield
cobra              30      10
viper               0       5
sidewinder          0       0

Setting using a ``Series`` or a ``DataFrame`` sets the values matching the
index labels, not the index positions.

>>> shuffled_df = df.loc[["viper", "cobra", "sidewinder"]]
>>> df.loc[:] += shuffled_df
>>> df
            max_speed  shield
cobra              60      20
viper               0      10
sidewinder          0       0

**Getting values on a DataFrame with an index that has integer labels**

Another example using integers for the index

>>> df = pd.DataFrame([[1, 2], [4, 5], [7, 8]],
...                   index=[7, 8, 9], columns=['max_speed', 'shield'])
>>> df
   max_speed  shield
7          1       2
8          4       5
9          7       8

Slice with integer labels for rows. As mentioned above, note that both
the start and stop of the slice are included.

>>> df.loc[7:9]
   max_speed  shield
7          1       2
8          4       5
9          7       8

**Getting values with a MultiIndex**

A number of examples using a DataFrame with a MultiIndex

>>> tuples = [
...     ('cobra', 'mark i'), ('cobra', 'mark ii'),
...     ('sidewinder', 'mark i'), ('sidewinder', 'mark ii'),
...     ('viper', 'mark ii'), ('viper', 'mark iii')
... ]
>>> index = pd.MultiIndex.from_tuples(tuples)
>>> values = [[12, 2], [0, 4], [10, 20],
...           [1, 4], [7, 1], [16, 36]]
>>> df = pd.DataFrame(values, columns=['max_speed', 'shield'], index=index)
>>> df
                     max_speed  shield
cobra      mark i           12       2
           mark ii           0       4
sidewinder mark i           10      20
           mark ii           1       4
viper      mark ii           7       1
           mark iii         16      36

Single label. Note this returns a DataFrame with a single index.

>>> df.loc['cobra']
         max_speed  shield
mark i          12       2
mark ii          0       4

Single index tuple. Note this returns a Series.

>>> df.loc[('cobra', 'mark ii')]
max_speed    0
shield       4
Name: (cobra, mark ii), dtype: int64

Single label for row and column. Similar to passing in a tuple, this
returns a Series.

>>> df.loc['cobra', 'mark i']
max_speed    12
shield        2
Name: (cobra, mark i), dtype: int64

Single tuple. Note using ``[[]]`` returns a DataFrame.

>>> df.loc[[('cobra', 'mark ii')]]
               max_speed  shield
cobra mark ii          0       4

Single tuple for the index with a single label for the column

>>> df.loc[('cobra', 'mark i'), 'shield']
2

Slice from index tuple to single label

>>> df.loc[('cobra', 'mark i'):'viper']
                     max_speed  shield
cobra      mark i           12       2
           mark ii           0       4
sidewinder mark i           10      20
           mark ii           1       4
viper      mark ii           7       1
           mark iii         16      36

Slice from index tuple to index tuple

>>> df.loc[('cobra', 'mark i'):('viper', 'mark ii')]
                    max_speed  shield
cobra      mark i          12       2
           mark ii          0       4
sidewinder mark i          10      20
           mark ii          1       4
viper      mark ii          7       1

Please see the :ref:`user guide<advanced.advanced_hierarchical>`
for more details and explanations of advanced indexing.

---
## at
```python
from indexing import at
```

Access a single value for a row/column label pair.

Similar to ``loc``, in that both provide label-based lookups. Use
``at`` if you only need to get or set a single value in a DataFrame
or Series.

Raises
------
KeyError
    If getting a value and 'label' does not exist in a DataFrame or Series.

ValueError
    If row/column label pair is not a tuple or if any label
    from the pair is not a scalar for DataFrame.
    If label is list-like (*excluding* NamedTuple) for Series.

See Also
--------
DataFrame.at : Access a single value for a row/column pair by label.
DataFrame.iat : Access a single value for a row/column pair by integer
    position.
DataFrame.loc : Access a group of rows and columns by label(s).
DataFrame.iloc : Access a group of rows and columns by integer
    position(s).
Series.at : Access a single value by label.
Series.iat : Access a single value by integer position.
Series.loc : Access a group of rows by label(s).
Series.iloc : Access a group of rows by integer position(s).

Notes
-----
See :ref:`Fast scalar value getting and setting <indexing.basics.get_value>`
for more details.

Examples
--------
>>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
...                   index=[4, 5, 6], columns=['A', 'B', 'C'])
>>> df
    A   B   C
4   0   2   3
5   0   4   1
6  10  20  30

Get value at specified row/column pair

>>> df.at[4, 'B']
2

Set value at specified row/column pair

>>> df.at[4, 'B'] = 10
>>> df.at[4, 'B']
10

Get value within a Series

>>> df.loc[5].at['B']
4

---
## iat
```python
from indexing import iat
```

Access a single value for a row/column pair by integer position.

Similar to ``iloc``, in that both provide integer-based lookups. Use
``iat`` if you only need to get or set a single value in a DataFrame
or Series.

Raises
------
IndexError
    When integer position is out of bounds.

See Also
--------
DataFrame.at : Access a single value for a row/column label pair.
DataFrame.loc : Access a group of rows and columns by label(s).
DataFrame.iloc : Access a group of rows and columns by integer position(s).

Examples
--------
>>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
...                   columns=['A', 'B', 'C'])
>>> df
    A   B   C
0   0   2   3
1   0   4   1
2  10  20  30

Get value at specified row/column pair

>>> df.iat[1, 2]
1

Set value at specified row/column pair

>>> df.iat[1, 2] = 10
>>> df.iat[1, 2]
10

Get value within a series

>>> df.loc[0].iat[1]
2

---
## __call__
```python
from indexing import __call__
```



---
## _get_setitem_indexer
```python
from indexing import _get_setitem_indexer
```



---
## _maybe_mask_setitem_value
```python
from indexing import _maybe_mask_setitem_value
```

If we have obj.iloc[mask] = series_or_frame and series_or_frame has the
same length as obj, we treat this as obj.iloc[mask] = series_or_frame[mask],
similar to Series.__setitem__.

Note this is only for loc, not iloc.

---
## _ensure_listlike_indexer
```python
from indexing import _ensure_listlike_indexer
```

Ensure that a list-like of column labels are all present by adding them if
they do not already exist.

Parameters
----------
key : list-like of column labels
    Target labels.
axis : key axis if known

---
## __setitem__
```python
from indexing import __setitem__
```



---
## _validate_key
```python
from indexing import _validate_key
```



---
## _expand_ellipsis
```python
from indexing import _expand_ellipsis
```

If a tuple key includes an Ellipsis, replace it with an appropriate
number of null slices.

---
## _validate_tuple_indexer
```python
from indexing import _validate_tuple_indexer
```

Check the key for valid keys across my indexer.

---
## _is_nested_tuple_indexer
```python
from indexing import _is_nested_tuple_indexer
```

Returns
-------
bool

---
## _convert_tuple
```python
from indexing import _convert_tuple
```



---
## _validate_key_length
```python
from indexing import _validate_key_length
```



---
## _getitem_tuple_same_dim
```python
from indexing import _getitem_tuple_same_dim
```

Index with indexers that should return an object of the same dimension
as self.obj.

This is only called after a failed call to _getitem_lowerdim.

---
## _getitem_lowerdim
```python
from indexing import _getitem_lowerdim
```



---
## _getitem_nested_tuple
```python
from indexing import _getitem_nested_tuple
```



---
## _convert_to_indexer
```python
from indexing import _convert_to_indexer
```

Much simpler as we only have to deal with our valid types.

---
## _check_deprecated_callable_usage
```python
from indexing import _check_deprecated_callable_usage
```



---
## _is_scalar_access
```python
from indexing import _is_scalar_access
```

Returns
-------
bool

---
## _getitem_tuple
```python
from indexing import _getitem_tuple
```



---
## _getitem_axis
```python
from indexing import _getitem_axis
```



---
## _has_valid_setitem_indexer
```python
from indexing import _has_valid_setitem_indexer
```

Validate that a positional indexer cannot enlarge its target
will raise if needed, does not modify the indexer externally.

Returns
-------
bool

---
## _getbool_axis
```python
from indexing import _getbool_axis
```



---
## _multi_take_opportunity
```python
from indexing import _multi_take_opportunity
```

Check whether there is the possibility to use ``_multi_take``.

Currently the limit is that all axes being indexed, must be indexed with
list-likes.

Parameters
----------
tup : tuple
    Tuple of indexers, one per axis.

Returns
-------
bool
    Whether the current indexing,
    can be passed through `_multi_take`.

---
## _multi_take
```python
from indexing import _multi_take
```

Create the indexers for the passed tuple of keys, and
executes the take operation. This allows the take operation to be
executed all at once, rather than once for each dimension.
Improving efficiency.

Parameters
----------
tup : tuple
    Tuple of indexers, one per axis.

Returns
-------
values: same type as the object being indexed

---
## _getitem_iterable
```python
from indexing import _getitem_iterable
```

Index current object with an iterable collection of keys.

Parameters
----------
key : iterable
    Targeted labels.
axis : int
    Dimension on which the indexing is being made.

Raises
------
KeyError
    If no key was found. Will change in the future to raise if not all
    keys were found.

Returns
-------
scalar, DataFrame, or Series: indexed value(s).

---
## _get_label
```python
from indexing import _get_label
```



---
## _handle_lowerdim_multi_index_axis0
```python
from indexing import _handle_lowerdim_multi_index_axis0
```



---
## _get_slice_axis
```python
from indexing import _get_slice_axis
```



---
## _get_listlike_indexer
```python
from indexing import _get_listlike_indexer
```

Transform a list-like of keys into a new index and an indexer.

Parameters
----------
key : list-like
    Targeted labels.
axis:  int
    Dimension on which the indexing is being made.

Raises
------
KeyError
    If at least one key was requested but none was found.

Returns
-------
keyarr: Index
    New index (coinciding with 'key' if the axis is unique).
values : array-like
    Indexer for the return object, -1 denotes keys not found.

---
## _validate_integer
```python
from indexing import _validate_integer
```

Check that 'key' is a valid position in the desired axis.

Parameters
----------
key : int
    Requested position.
axis : int
    Desired axis.

Raises
------
IndexError
    If 'key' is not a valid position in axis 'axis'.

---
## _get_list_axis
```python
from indexing import _get_list_axis
```

Return Series values by list or array of integers.

Parameters
----------
key : list-like positional indexer
axis : int

Returns
-------
Series object

Notes
-----
`axis` can only be zero.

---
## _setitem_with_indexer
```python
from indexing import _setitem_with_indexer
```

_setitem_with_indexer is for setting values on a Series/DataFrame
using positional indexers.

If the relevant keys are not present, the Series/DataFrame may be
expanded.

This method is currently broken when dealing with non-unique Indexes,
since it goes from positional indexers back to labels when calling
BlockManager methods, see GH#12991, GH#22046, GH#15686.

---
## _setitem_with_indexer_split_path
```python
from indexing import _setitem_with_indexer_split_path
```

Setitem column-wise.

---
## _setitem_with_indexer_2d_value
```python
from indexing import _setitem_with_indexer_2d_value
```



---
## _setitem_with_indexer_frame_value
```python
from indexing import _setitem_with_indexer_frame_value
```



---
## _setitem_single_column
```python
from indexing import _setitem_single_column
```

Parameters
----------
loc : int
    Indexer for column position
plane_indexer : int, slice, listlike[int]
    The indexer we use for setitem along axis=0.

---
## _setitem_single_block
```python
from indexing import _setitem_single_block
```

_setitem_with_indexer for the case when we have a single Block.

---
## _setitem_with_indexer_missing
```python
from indexing import _setitem_with_indexer_missing
```

Insert new row(s) or column(s) into the Series or DataFrame.

---
## _ensure_iterable_column_indexer
```python
from indexing import _ensure_iterable_column_indexer
```

Ensure that our column indexer is something that can be iterated over.

---
## _align_series
```python
from indexing import _align_series
```

Parameters
----------
indexer : tuple, slice, scalar
    Indexer used to get the locations that will be set to `ser`.
ser : pd.Series
    Values to assign to the locations specified by `indexer`.
multiindex_indexer : bool, optional
    Defaults to False. Should be set to True if `indexer` was from
    a `pd.MultiIndex`, to avoid unnecessary broadcasting.

Returns
-------
`np.array` of `ser` broadcast to the appropriate shape for assignment
to the locations selected by `indexer`

---
## _align_frame
```python
from indexing import _align_frame
```



---
## _convert_key
```python
from indexing import _convert_key
```

Require integer args. (and convert to label arguments)

---
## _axes_are_unique
```python
from indexing import _axes_are_unique
```



---
## get_indexer
```python
from indexing import get_indexer
```



---
## _contains_slice
```python
from indexing import _contains_slice
```



---
## ravel
```python
from indexing import ravel
```



---
## PandasObject
```python
from base import PandasObject
```

Baseclass for various pandas objects.

---
## NoNewAttributesMixin
```python
from base import NoNewAttributesMixin
```

Mixin which prevents adding new attributes.

Prevents additional attributes via xxx.attribute = "something" after a
call to `self.__freeze()`. Mainly used to prevent the user from using
wrong attributes on an accessor (`Series.cat/.str/.dt`).

If you really want to add a new attribute at a later time, you need to use
`object.__setattr__(self, key, value)`.

---
## SelectionMixin
```python
from base import SelectionMixin
```

mixin implementing the selection & aggregation interface on a group-like
object sub-classes need to define: obj, exclusions

---
## IndexOpsMixin
```python
from base import IndexOpsMixin
```

Common ops mixin to support a unified interface / docs for Series / Index

---
## _constructor
```python
from base import _constructor
```



---
## _reset_cache
```python
from base import _reset_cache
```

Reset cached properties. If ``key`` is passed, only clears that key.

---
## __sizeof__
```python
from base import __sizeof__
```

Generates the total memory usage for an object that returns
either a value or Series of values

---
## _freeze
```python
from base import _freeze
```

Prevents setting additional attributes.

---
## _selection_list
```python
from base import _selection_list
```



---
## _selected_obj
```python
from base import _selected_obj
```



---
## ndim
```python
from base import ndim
```

Extension Arrays are only allowed to be 1-dimensional.

Examples
--------
>>> arr = pd.array([1, 2, 3])
>>> arr.ndim
1

---
## _obj_with_exclusions
```python
from base import _obj_with_exclusions
```



---
## _gotitem
```python
from base import _gotitem
```

sub-classes to define
return a sliced object

Parameters
----------
key : str / list of selections
ndim : {1, 2}
    requested ndim of result
subset : object, default None
    subset to act on

---
## _infer_selection
```python
from base import _infer_selection
```

Infer the `selection` to pass to our constructor in _gotitem.

---
## aggregate
```python
from base import aggregate
```



---
## dtype
```python
from base import dtype
```

Return the dtype object of the underlying data.

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.dtype
dtype('int64')

---
## _values
```python
from base import _values
```

The best array representation.

This is an ndarray or ExtensionArray.

``_values`` are consistent between ``Series`` and ``Index``.

It may differ from the public '.values' method.

index             | values          | _values       |
----------------- | --------------- | ------------- |
Index             | ndarray         | ndarray       |
CategoricalIndex  | Categorical     | Categorical   |
DatetimeIndex     | ndarray[M8ns]   | DatetimeArray |
DatetimeIndex[tz] | ndarray[M8ns]   | DatetimeArray |
PeriodIndex       | ndarray[object] | PeriodArray   |
IntervalIndex     | IntervalArray   | IntervalArray |

See Also
--------
values : Values

---
## transpose
```python
from base import transpose
```

Return a transposed view on this array.

Because ExtensionArrays are always 1D, this is a no-op.  It is included
for compatibility with np.ndarray.

Returns
-------
ExtensionArray

Examples
--------
>>> pd.array([1, 2, 3]).transpose()
<IntegerArray>
[1, 2, 3]
Length: 3, dtype: Int64

---
## __len__
```python
from base import __len__
```

Return the length of the Index.

---
## item
```python
from base import item
```

Return the first element of the underlying data as a Python scalar.

Returns
-------
scalar
    The first element of Series or Index.

Raises
------
ValueError
    If the data is not length = 1.

Examples
--------
>>> s = pd.Series([1])
>>> s.item()
1

For an index:

>>> s = pd.Series([1], index=['a'])
>>> s.index.item()
'a'

---
## nbytes
```python
from base import nbytes
```

The number of bytes needed to store this object in memory.

Examples
--------
>>> pd.array([1, 2, 3]).nbytes
27

---
## size
```python
from base import size
```

The number of elements in the array.

---
## array
```python
from base import array
```



---
## to_numpy
```python
from base import to_numpy
```

Convert to a NumPy ndarray.

This is similar to :meth:`numpy.asarray`, but may provide additional control
over how the conversion is done.

Parameters
----------
dtype : str or numpy.dtype, optional
    The dtype to pass to :meth:`numpy.asarray`.
copy : bool, default False
    Whether to ensure that the returned value is a not a view on
    another array. Note that ``copy=False`` does not *ensure* that
    ``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that
    a copy is made, even if not strictly necessary.
na_value : Any, optional
    The value to use for missing values. The default value depends
    on `dtype` and the type of the array.

Returns
-------
numpy.ndarray

---
## argmax
```python
from base import argmax
```



---
## argmin
```python
from base import argmin
```



---
## tolist
```python
from base import tolist
```

Return a list of the values.

These are each a scalar type, which is a Python scalar
(for str, int, float) or a pandas scalar
(for Timestamp/Timedelta/Interval/Period)

Returns
-------
list

Examples
--------
>>> arr = pd.array([1, 2, 3])
>>> arr.tolist()
[1, 2, 3]

---
## hasnans
```python
from base import hasnans
```

Return True if there are any NaNs.

Enables various performance speedups.

Returns
-------
bool

Examples
--------
>>> s = pd.Series([1, 2, 3], index=['a', 'b', None])
>>> s
a    1
b    2
None 3
dtype: int64
>>> s.index.hasnans
True

---
## _map_values
```python
from base import _map_values
```

An internal function that maps values using the input
correspondence (which can be a dict, Series, or function).

Parameters
----------
mapper : function, dict, or Series
    The input correspondence object
na_action : {None, 'ignore'}
    If 'ignore', propagate NA values, without passing them to the
    mapping function
convert : bool, default True
    Try to find better dtype for elementwise function results. If
    False, leave as dtype=object. Note that the dtype is always
    preserved for some extension array dtypes, such as Categorical.

Returns
-------
Union[Index, MultiIndex], inferred
    The output of the mapping function applied to the index.
    If the function returns a tuple with more than one element
    a MultiIndex will be returned.

---
## value_counts
```python
from base import value_counts
```

Return a Series containing counts of unique values.

The resulting object will be in descending order so that the
first element is the most frequently-occurring element.
Excludes NA values by default.

Parameters
----------
normalize : bool, default False
    If True then the object returned will contain the relative
    frequencies of the unique values.
sort : bool, default True
    Sort by frequencies when True. Preserve the order of the data when False.
ascending : bool, default False
    Sort in ascending order.
bins : int, optional
    Rather than count values, group them into half-open bins,
    a convenience for ``pd.cut``, only works with numeric data.
dropna : bool, default True
    Don't include counts of NaN.

Returns
-------
Series

See Also
--------
Series.count: Number of non-NA elements in a Series.
DataFrame.count: Number of non-NA elements in a DataFrame.
DataFrame.value_counts: Equivalent method on DataFrames.

Examples
--------
>>> index = pd.Index([3, 1, 2, 3, 4, np.nan])
>>> index.value_counts()
3.0    2
1.0    1
2.0    1
4.0    1
Name: count, dtype: int64

With `normalize` set to `True`, returns the relative frequency by
dividing all values by the sum of values.

>>> s = pd.Series([3, 1, 2, 3, 4, np.nan])
>>> s.value_counts(normalize=True)
3.0    0.4
1.0    0.2
2.0    0.2
4.0    0.2
Name: proportion, dtype: float64

**bins**

Bins can be useful for going from a continuous variable to a
categorical variable; instead of counting unique
apparitions of values, divide the index in the specified
number of half-open bins.

>>> s.value_counts(bins=3)
(0.996, 2.0]    2
(2.0, 3.0]      2
(3.0, 4.0]      1
Name: count, dtype: int64

**dropna**

With `dropna` set to `False` we can also see NaN index values.

>>> s.value_counts(dropna=False)
3.0    2
1.0    1
2.0    1
4.0    1
NaN    1
Name: count, dtype: int64

---
## unique
```python
from base import unique
```

Return unique values in the index.

Unique values are returned in order of appearance, this does NOT sort.

Parameters
----------
level : int or hashable, optional
    Only return values from specified level (for MultiIndex).
    If int, gets the level by integer position, else by level name.

Returns
-------
Index

See Also
--------
unique : Numpy array of unique values in that column.
Series.unique : Return unique values of Series object.

Examples
--------
>>> idx = pd.Index([1, 1, 2, 3, 3])
>>> idx.unique()
Index([1, 2, 3], dtype='int64')

---
## nunique
```python
from base import nunique
```

Return number of unique elements in the object.

Excludes NA values by default.

Parameters
----------
dropna : bool, default True
    Don't include NaN in the count.

Returns
-------
int

See Also
--------
DataFrame.nunique: Method nunique for DataFrame.
Series.count: Count non-NA/null observations in the Series.

Examples
--------
>>> s = pd.Series([1, 3, 5, 7, 7])
>>> s
0    1
1    3
2    5
3    7
4    7
dtype: int64

>>> s.nunique()
4

---
## is_unique
```python
from base import is_unique
```

Return if the index has unique values.

Returns
-------
bool

See Also
--------
Index.has_duplicates : Inverse method that checks if it has duplicate values.

Examples
--------
>>> idx = pd.Index([1, 5, 7, 7])
>>> idx.is_unique
False

>>> idx = pd.Index([1, 5, 7])
>>> idx.is_unique
True

>>> idx = pd.Index(["Watermelon", "Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.is_unique
False

>>> idx = pd.Index(["Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.is_unique
True

---
## is_monotonic_increasing
```python
from base import is_monotonic_increasing
```

Return a boolean if the values are equal or increasing.

Returns
-------
bool

See Also
--------
Index.is_monotonic_decreasing : Check if the values are equal or decreasing.

Examples
--------
>>> pd.Index([1, 2, 3]).is_monotonic_increasing
True
>>> pd.Index([1, 2, 2]).is_monotonic_increasing
True
>>> pd.Index([1, 3, 2]).is_monotonic_increasing
False

---
## is_monotonic_decreasing
```python
from base import is_monotonic_decreasing
```

Return a boolean if the values are equal or decreasing.

Returns
-------
bool

See Also
--------
Index.is_monotonic_increasing : Check if the values are equal or increasing.

Examples
--------
>>> pd.Index([3, 2, 1]).is_monotonic_decreasing
True
>>> pd.Index([3, 2, 2]).is_monotonic_decreasing
True
>>> pd.Index([3, 1, 2]).is_monotonic_decreasing
False

---
## _memory_usage
```python
from base import _memory_usage
```

Memory usage of the values.

Parameters
----------
deep : bool, default False
    Introspect the data deeply, interrogate
    `object` dtypes for system-level memory consumption.

Returns
-------
bytes used

See Also
--------
numpy.ndarray.nbytes : Total bytes consumed by the elements of the
    array.

Notes
-----
Memory usage does not include memory consumed by elements that
are not components of the array if deep=False or if used on PyPy

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx.memory_usage()
24

---
## factorize
```python
from base import factorize
```

Encode the extension array as an enumerated type.

Parameters
----------
use_na_sentinel : bool, default True
    If True, the sentinel -1 will be used for NaN values. If False,
    NaN values will be encoded as non-negative integers and will not drop the
    NaN from the uniques of the values.

    .. versionadded:: 1.5.0

Returns
-------
codes : ndarray
    An integer NumPy array that's an indexer into the original
    ExtensionArray.
uniques : ExtensionArray
    An ExtensionArray containing the unique values of `self`.

    .. note::

       uniques will *not* contain an entry for the NA value of
       the ExtensionArray if there are any missing values present
       in `self`.

See Also
--------
factorize : Top-level factorize method that dispatches here.

Notes
-----
:meth:`pandas.factorize` offers a `sort` keyword as well.

Examples
--------
>>> idx1 = pd.PeriodIndex(["2014-01", "2014-01", "2014-02", "2014-02",
...                       "2014-03", "2014-03"], freq="M")
>>> arr, idx = idx1.factorize()
>>> arr
array([0, 0, 1, 1, 2, 2])
>>> idx
PeriodIndex(['2014-01', '2014-02', '2014-03'], dtype='period[M]')

---
## searchsorted
```python
from base import searchsorted
```

Find indices where elements should be inserted to maintain order.

Find the indices into a sorted array `self` (a) such that, if the
corresponding elements in `value` were inserted before the indices,
the order of `self` would be preserved.

Assuming that `self` is sorted:

======  ================================
`side`  returned index `i` satisfies
======  ================================
left    ``self[i-1] < value <= self[i]``
right   ``self[i-1] <= value < self[i]``
======  ================================

Parameters
----------
value : array-like, list or scalar
    Value(s) to insert into `self`.
side : {'left', 'right'}, optional
    If 'left', the index of the first suitable location found is given.
    If 'right', return the last such index.  If there is no suitable
    index, return either 0 or N (where N is the length of `self`).
sorter : 1-D array-like, optional
    Optional array of integer indices that sort array a into ascending
    order. They are typically the result of argsort.

Returns
-------
array of ints or int
    If value is array-like, array of insertion points.
    If value is scalar, a single integer.

See Also
--------
numpy.searchsorted : Similar method from NumPy.

Examples
--------
>>> arr = pd.array([1, 2, 3, 5])
>>> arr.searchsorted([4])
array([3])

---
## drop_duplicates
```python
from base import drop_duplicates
```

Return Index with duplicate values removed.

Parameters
----------
keep : {'first', 'last', ``False``}, default 'first'
    - 'first' : Drop duplicates except for the first occurrence.
    - 'last' : Drop duplicates except for the last occurrence.
    - ``False`` : Drop all duplicates.

Returns
-------
Index

See Also
--------
Series.drop_duplicates : Equivalent method on Series.
DataFrame.drop_duplicates : Equivalent method on DataFrame.
Index.duplicated : Related method on Index, indicating duplicate
    Index values.

Examples
--------
Generate an pandas.Index with duplicate values.

>>> idx = pd.Index(['lama', 'cow', 'lama', 'beetle', 'lama', 'hippo'])

The `keep` parameter controls  which duplicate values are removed.
The value 'first' keeps the first occurrence for each
set of duplicated entries. The default value of keep is 'first'.

>>> idx.drop_duplicates(keep='first')
Index(['lama', 'cow', 'beetle', 'hippo'], dtype='object')

The value 'last' keeps the last occurrence for each set of duplicated
entries.

>>> idx.drop_duplicates(keep='last')
Index(['cow', 'beetle', 'lama', 'hippo'], dtype='object')

The value ``False`` discards all sets of duplicated entries.

>>> idx.drop_duplicates(keep=False)
Index(['cow', 'beetle', 'hippo'], dtype='object')

---
## _duplicated
```python
from base import _duplicated
```



---
## _arith_method
```python
from base import _arith_method
```



---
## _construct_result
```python
from base import _construct_result
```



---
## __name__
```python
from apply import __name__
```



---
## frame_apply
```python
from apply import frame_apply
```

construct and return a row or column based frame apply object

---
## Apply
```python
from apply import Apply
```



---
## NDFrameApply
```python
from apply import NDFrameApply
```

Methods shared by FrameApply and SeriesApply but
not GroupByApply or ResamplerWindowApply

---
## FrameApply
```python
from apply import FrameApply
```



---
## FrameRowApply
```python
from apply import FrameRowApply
```



---
## FrameColumnApply
```python
from apply import FrameColumnApply
```



---
## SeriesApply
```python
from apply import SeriesApply
```



---
## GroupByApply
```python
from apply import GroupByApply
```



---
## ResamplerWindowApply
```python
from apply import ResamplerWindowApply
```



---
## reconstruct_func
```python
from apply import reconstruct_func
```

This is the internal function to reconstruct func given if there is relabeling
or not and also normalize the keyword to get new order of columns.

If named aggregation is applied, `func` will be None, and kwargs contains the
column and aggregation function information to be parsed;
If named aggregation is not applied, `func` is either string (e.g. 'min') or
Callable, or list of them (e.g. ['min', np.max]), or the dictionary of column name
and str/Callable/list of them (e.g. {'A': 'min'}, or {'A': [np.min, lambda x: x]})

If relabeling is True, will return relabeling, reconstructed func, column
names, and the reconstructed order of columns.
If relabeling is False, the columns and order will be None.

Parameters
----------
func: agg function (e.g. 'min' or Callable) or list of agg functions
    (e.g. ['min', np.max]) or dictionary (e.g. {'A': ['min', np.max]}).
**kwargs: dict, kwargs used in is_multi_agg_with_relabel and
    normalize_keyword_aggregation function for relabelling

Returns
-------
relabelling: bool, if there is relabelling or not
func: normalized and mangled func
columns: tuple of column names
order: array of columns indices

Examples
--------
>>> reconstruct_func(None, **{"foo": ("col", "min")})
(True, defaultdict(<class 'list'>, {'col': ['min']}), ('foo',), array([0]))

>>> reconstruct_func("min")
(False, 'min', None, None)

---
## is_multi_agg_with_relabel
```python
from apply import is_multi_agg_with_relabel
```

Check whether kwargs passed to .agg look like multi-agg with relabeling.

Parameters
----------
**kwargs : dict

Returns
-------
bool

Examples
--------
>>> is_multi_agg_with_relabel(a="max")
False
>>> is_multi_agg_with_relabel(a_max=("a", "max"), a_min=("a", "min"))
True
>>> is_multi_agg_with_relabel()
False

---
## normalize_keyword_aggregation
```python
from apply import normalize_keyword_aggregation
```

Normalize user-provided "named aggregation" kwargs.
Transforms from the new ``Mapping[str, NamedAgg]`` style kwargs
to the old Dict[str, List[scalar]]].

Parameters
----------
kwargs : dict

Returns
-------
aggspec : dict
    The transformed kwargs.
columns : tuple[str, ...]
    The user-provided keys.
col_idx_order : List[int]
    List of columns indices.

Examples
--------
>>> normalize_keyword_aggregation({"output": ("input", "sum")})
(defaultdict(<class 'list'>, {'input': ['sum']}), ('output',), array([0]))

---
## _make_unique_kwarg_list
```python
from apply import _make_unique_kwarg_list
```

Uniquify aggfunc name of the pairs in the order list

Examples:
--------
>>> kwarg_list = [('a', '<lambda>'), ('a', '<lambda>'), ('b', '<lambda>')]
>>> _make_unique_kwarg_list(kwarg_list)
[('a', '<lambda>_0'), ('a', '<lambda>_1'), ('b', '<lambda>')]

---
## relabel_result
```python
from apply import relabel_result
```

Internal function to reorder result if relabelling is True for
dataframe.agg, and return the reordered result in dict.

Parameters:
----------
result: Result from aggregation
func: Dict of (column name, funcs)
columns: New columns name for relabelling
order: New order for relabelling

Examples
--------
>>> from pandas.core.apply import relabel_result
>>> result = pd.DataFrame(
...     {"A": [np.nan, 2, np.nan], "C": [6, np.nan, np.nan], "B": [np.nan, 4, 2.5]},
...     index=["max", "mean", "min"]
... )
>>> funcs = {"A": ["max"], "C": ["max"], "B": ["mean", "min"]}
>>> columns = ("foo", "aab", "bar", "dat")
>>> order = [0, 1, 2, 3]
>>> result_in_dict = relabel_result(result, funcs, columns, order)
>>> pd.DataFrame(result_in_dict, index=columns)
       A    C    B
foo  2.0  NaN  NaN
aab  NaN  6.0  NaN
bar  NaN  NaN  4.0
dat  NaN  NaN  2.5

---
## reconstruct_and_relabel_result
```python
from apply import reconstruct_and_relabel_result
```



---
## _managle_lambda_list
```python
from apply import _managle_lambda_list
```

Possibly mangle a list of aggfuncs.

Parameters
----------
aggfuncs : Sequence

Returns
-------
mangled: list-like
    A new AggSpec sequence, where lambdas have been converted
    to have unique names.

Notes
-----
If just one aggfunc is passed, the name will not be mangled.

---
## maybe_mangle_lambdas
```python
from apply import maybe_mangle_lambdas
```

Make new lambdas with unique names.

Parameters
----------
agg_spec : Any
    An argument to GroupBy.agg.
    Non-dict-like `agg_spec` are pass through as is.
    For dict-like `agg_spec` a new spec is returned
    with name-mangled lambdas.

Returns
-------
mangled : Any
    Same type as the input.

Examples
--------
>>> maybe_mangle_lambdas('sum')
'sum'
>>> maybe_mangle_lambdas([lambda: 1, lambda: 2])  # doctest: +SKIP
[<function __main__.<lambda_0>,
 <function pandas...._make_lambda.<locals>.f(*args, **kwargs)>]

---
## validate_func_kwargs
```python
from apply import validate_func_kwargs
```

Validates types of user-provided "named aggregation" kwargs.
`TypeError` is raised if aggfunc is not `str` or callable.

Parameters
----------
kwargs : dict

Returns
-------
columns : List[str]
    List of user-provided keys.
func : List[Union[str, callable[...,Any]]]
    List of user-provided aggfuncs

Examples
--------
>>> validate_func_kwargs({'one': 'min', 'two': 'max'})
(['one', 'two'], ['min', 'max'])

---
## include_axis
```python
from apply import include_axis
```



---
## warn_alias_replacement
```python
from apply import warn_alias_replacement
```



---
## __init__
```python
from apply import __init__
```



---
## apply
```python
from apply import apply
```



---
## agg_or_apply_list_like
```python
from apply import agg_or_apply_list_like
```



---
## agg_or_apply_dict_like
```python
from apply import agg_or_apply_dict_like
```



---
## agg
```python
from apply import agg
```



---
## transform
```python
from apply import transform
```



---
## transform_dict_like
```python
from apply import transform_dict_like
```

Compute transform in the case of a dict-like func

---
## transform_str_or_callable
```python
from apply import transform_str_or_callable
```

Compute transform in the case of a string or callable func

---
## agg_list_like
```python
from apply import agg_list_like
```

Compute aggregation in the case of a list-like argument.

Returns
-------
Result of aggregation.

---
## compute_list_like
```python
from apply import compute_list_like
```

Compute agg/apply results for like-like input.

Parameters
----------
op_name : {"agg", "apply"}
    Operation being performed.
selected_obj : Series or DataFrame
    Data to perform operation on.
kwargs : dict
    Keyword arguments to pass to the functions.

Returns
-------
keys : list[Hashable] or Index
    Index labels for result.
results : list
    Data for result. When aggregating with a Series, this can contain any
    Python objects.

---
## wrap_results_list_like
```python
from apply import wrap_results_list_like
```



---
## agg_dict_like
```python
from apply import agg_dict_like
```

Compute aggregation in the case of a dict-like argument.

Returns
-------
Result of aggregation.

---
## compute_dict_like
```python
from apply import compute_dict_like
```

Compute agg/apply results for dict-like input.

Parameters
----------
op_name : {"agg", "apply"}
    Operation being performed.
selected_obj : Series or DataFrame
    Data to perform operation on.
selection : hashable or sequence of hashables
    Used by GroupBy, Window, and Resample if selection is applied to the object.
kwargs : dict
    Keyword arguments to pass to the functions.

Returns
-------
keys : list[hashable]
    Index labels for result.
results : list
    Data for result. When aggregating with a Series, this can contain any
    Python object.

---
## wrap_results_dict_like
```python
from apply import wrap_results_dict_like
```



---
## apply_str
```python
from apply import apply_str
```



---
## apply_list_or_dict_like
```python
from apply import apply_list_or_dict_like
```

Compute apply in case of a list-like or dict-like.

Returns
-------
result: Series, DataFrame, or None
    Result when self.func is a list-like or dict-like, None otherwise.

---
## normalize_dictlike_arg
```python
from apply import normalize_dictlike_arg
```

Handler for dict-like argument.

Ensures that necessary columns exist if obj is a DataFrame, and
that a nested renamer is not passed. Also normalizes to all lists
when values consists of a mix of list and non-lists.

---
## _apply_str
```python
from apply import _apply_str
```

if arg is a string, then try to operate on it:
- try to find a function (or attribute) on obj
- try to find a numpy function
- raise

---
## index
```python
from apply import index
```



---
## agg_axis
```python
from apply import agg_axis
```



---
## result_index
```python
from apply import result_index
```



---
## result_columns
```python
from apply import result_columns
```



---
## series_generator
```python
from apply import series_generator
```



---
## generate_numba_apply_func
```python
from apply import generate_numba_apply_func
```



---
## apply_with_numba
```python
from apply import apply_with_numba
```



---
## validate_values_for_numba
```python
from apply import validate_values_for_numba
```



---
## wrap_results_for_axis
```python
from apply import wrap_results_for_axis
```

return the results for the columns

---
## res_columns
```python
from apply import res_columns
```



---
## columns
```python
from apply import columns
```



---
## values
```python
from apply import values
```



---
## apply_empty_result
```python
from apply import apply_empty_result
```



---
## apply_raw
```python
from apply import apply_raw
```

apply to the values as a numpy array

---
## apply_broadcast
```python
from apply import apply_broadcast
```



---
## apply_standard
```python
from apply import apply_standard
```



---
## apply_series_generator
```python
from apply import apply_series_generator
```



---
## apply_series_numba
```python
from apply import apply_series_numba
```



---
## wrap_results
```python
from apply import wrap_results
```



---
## infer_to_same_shape
```python
from apply import infer_to_same_shape
```

infer the results to the same shape as the input object

---
## apply_compat
```python
from apply import apply_compat
```

compat apply method for funcs in listlikes and dictlikes.

 Used for each callable when giving listlikes and dictlikes of callables to
 apply. Needed for compatibility with Pandas < v2.1.

.. versionadded:: 2.1.0

---
## wrap_function
```python
from apply import wrap_function
```

Wrap user supplied function to work around numpy issue.

see https://github.com/numpy/numpy/issues/8352

---
## numba_func
```python
from apply import numba_func
```



---
## wrapper
```python
from apply import wrapper
```



---
## curried
```python
from apply import curried
```



---
## __name__
```python
from _test_decorators import __name__
```

This module provides decorator functions which can be applied to test objects
in order to skip those objects when certain conditions occur. A sample use case
is to detect if the platform is missing ``matplotlib``. If so, any test objects
which require ``matplotlib`` and decorated with ``@td.skip_if_no("matplotlib")``
will be skipped by ``pytest`` during the execution of the test suite.

To illustrate, after importing this module:

import pandas.util._test_decorators as td

The decorators can be applied to classes:

@td.skip_if_no("package")
class Foo:
    ...

Or individual functions:

@td.skip_if_no("package")
def test_foo():
    ...

For more information, refer to the ``pytest`` documentation on ``skipif``.

---
## skip_if_installed
```python
from _test_decorators import skip_if_installed
```

Skip a test if a package is installed.

Parameters
----------
package : str
    The name of the package.

Returns
-------
pytest.MarkDecorator
    a pytest.mark.skipif to use as either a test decorator or a
    parametrization mark.

---
## skip_if_no
```python
from _test_decorators import skip_if_no
```

Generic function to help skip tests when required packages are not
present on the testing system.

This function returns a pytest mark with a skip condition that will be
evaluated during test collection. An attempt will be made to import the
specified ``package`` and optionally ensure it meets the ``min_version``

The mark can be used as either a decorator for a test class or to be
applied to parameters in pytest.mark.parametrize calls or parametrized
fixtures. Use pytest.importorskip if an imported moduled is later needed
or for test functions.

If the import and version check are unsuccessful, then the test function
(or test case when used in conjunction with parametrization) will be
skipped.

Parameters
----------
package: str
    The name of the required package.
min_version: str or None, default None
    Optional minimum version of the package.

Returns
-------
pytest.MarkDecorator
    a pytest.mark.skipif to use as either a test decorator or a
    parametrization mark.

---
## parametrize_fixture_doc
```python
from _test_decorators import parametrize_fixture_doc
```

Intended for use as a decorator for parametrized fixture,
this function will wrap the decorated function with a pytest
``parametrize_fixture_doc`` mark. That mark will format
initial fixture docstring by replacing placeholders {0}, {1} etc
with parameters passed as arguments.

Parameters
----------
args: iterable
    Positional arguments for docstring.

Returns
-------
function
    The decorated function wrapped within a pytest
    ``parametrize_fixture_doc`` mark

---
## mark_array_manager_not_yet_implemented
```python
from _test_decorators import mark_array_manager_not_yet_implemented
```



---
## documented_fixture
```python
from _test_decorators import documented_fixture
```



---
## _check_arg_length
```python
from _validators import _check_arg_length
```

Checks whether 'args' has length of at most 'compat_args'. Raises
a TypeError if that is not the case, similar to in Python when a
function is called with too many arguments.

---
## _check_for_default_values
```python
from _validators import _check_for_default_values
```

Check that the keys in `arg_val_dict` are mapped to their
default values as specified in `compat_args`.

Note that this function is to be called only when it has been
checked that arg_val_dict.keys() is a subset of compat_args

---
## validate_args
```python
from _validators import validate_args
```

Checks whether the length of the `*args` argument passed into a function
has at most `len(compat_args)` arguments and whether or not all of these
elements in `args` are set to their default values.

Parameters
----------
fname : str
    The name of the function being passed the `*args` parameter
args : tuple
    The `*args` parameter passed into a function
max_fname_arg_count : int
    The maximum number of arguments that the function `fname`
    can accept, excluding those in `args`. Used for displaying
    appropriate error messages. Must be non-negative.
compat_args : dict
    A dictionary of keys and their associated default values.
    In order to accommodate buggy behaviour in some versions of `numpy`,
    where a signature displayed keyword arguments but then passed those
    arguments **positionally** internally when calling downstream
    implementations, a dict ensures that the original
    order of the keyword arguments is enforced.

Raises
------
TypeError
    If `args` contains more values than there are `compat_args`
ValueError
    If `args` contains values that do not correspond to those
    of the default values specified in `compat_args`

---
## _check_for_invalid_keys
```python
from _validators import _check_for_invalid_keys
```

Checks whether 'kwargs' contains any keys that are not
in 'compat_args' and raises a TypeError if there is one.

---
## validate_kwargs
```python
from _validators import validate_kwargs
```

Checks whether parameters passed to the **kwargs argument in a
function `fname` are valid parameters as specified in `*compat_args`
and whether or not they are set to their default values.

Parameters
----------
fname : str
    The name of the function being passed the `**kwargs` parameter
kwargs : dict
    The `**kwargs` parameter passed into `fname`
compat_args: dict
    A dictionary of keys that `kwargs` is allowed to have and their
    associated default values

Raises
------
TypeError if `kwargs` contains keys not in `compat_args`
ValueError if `kwargs` contains keys in `compat_args` that do not
map to the default values specified in `compat_args`

---
## validate_args_and_kwargs
```python
from _validators import validate_args_and_kwargs
```

Checks whether parameters passed to the *args and **kwargs argument in a
function `fname` are valid parameters as specified in `*compat_args`
and whether or not they are set to their default values.

Parameters
----------
fname: str
    The name of the function being passed the `**kwargs` parameter
args: tuple
    The `*args` parameter passed into a function
kwargs: dict
    The `**kwargs` parameter passed into `fname`
max_fname_arg_count: int
    The minimum number of arguments that the function `fname`
    requires, excluding those in `args`. Used for displaying
    appropriate error messages. Must be non-negative.
compat_args: dict
    A dictionary of keys that `kwargs` is allowed to
    have and their associated default values.

Raises
------
TypeError if `args` contains more values than there are
`compat_args` OR `kwargs` contains keys not in `compat_args`
ValueError if `args` contains values not at the default value (`None`)
`kwargs` contains keys in `compat_args` that do not map to the default
value as specified in `compat_args`

See Also
--------
validate_args : Purely args validation.
validate_kwargs : Purely kwargs validation.

---
## validate_bool_kwarg
```python
from _validators import validate_bool_kwarg
```

Ensure that argument passed in arg_name can be interpreted as boolean.

Parameters
----------
value : bool
    Value to be validated.
arg_name : str
    Name of the argument. To be reflected in the error message.
none_allowed : bool, default True
    Whether to consider None to be a valid boolean.
int_allowed : bool, default False
    Whether to consider integer value to be a valid boolean.

Returns
-------
value
    The same value as input.

Raises
------
ValueError
    If the value is not a valid boolean.

---
## validate_fillna_kwargs
```python
from _validators import validate_fillna_kwargs
```

Validate the keyword arguments to 'fillna'.

This checks that exactly one of 'value' and 'method' is specified.
If 'method' is specified, this validates that it's a valid method.

Parameters
----------
value, method : object
    The 'value' and 'method' keyword arguments for 'fillna'.
validate_scalar_dict_value : bool, default True
    Whether to validate that 'value' is a scalar or dict. Specifically,
    validate that it is not a list or tuple.

Returns
-------
value, method : object

---
## validate_percentile
```python
from _validators import validate_percentile
```

Validate percentiles (used by describe and quantile).

This function checks if the given float or iterable of floats is a valid percentile
otherwise raises a ValueError.

Parameters
----------
q: float or iterable of floats
    A single percentile or an iterable of percentiles.

Returns
-------
ndarray
    An ndarray of the percentiles if valid.

Raises
------
ValueError if percentiles are not in given interval([0, 1]).

---
## validate_ascending
```python
from _validators import validate_ascending
```

Validate ``ascending`` kwargs for ``sort_index`` method.

---
## validate_endpoints
```python
from _validators import validate_endpoints
```

Check that the `closed` argument is among [None, "left", "right"]

Parameters
----------
closed : {None, "left", "right"}

Returns
-------
left_closed : bool
right_closed : bool

Raises
------
ValueError : if argument is not among valid values

---
## validate_inclusive
```python
from _validators import validate_inclusive
```

Check that the `inclusive` argument is among {"both", "neither", "left", "right"}.

Parameters
----------
inclusive : {"both", "neither", "left", "right"}

Returns
-------
left_right_inclusive : tuple[bool, bool]

Raises
------
ValueError : if argument is not among valid values

---
## validate_insert_loc
```python
from _validators import validate_insert_loc
```

Check that we have an integer between -length and length, inclusive.

Standardize negative loc to within [0, length].

The exceptions we raise on failure match np.insert.

---
## check_dtype_backend
```python
from _validators import check_dtype_backend
```



---
## __name__
```python
from _print_versions import __name__
```



---
## _get_commit_hash
```python
from _print_versions import _get_commit_hash
```

Use vendored versioneer code to get git hash, which handles
git worktree correctly.

---
## _get_sys_info
```python
from _print_versions import _get_sys_info
```

Returns system information as a JSON serializable dictionary.

---
## _get_dependency_info
```python
from _print_versions import _get_dependency_info
```

Returns dependency information as a JSON serializable dictionary.

---
## show_versions
```python
from _print_versions import show_versions
```

Provide useful information, important for bug reports.

It comprises info about hosting operation system, pandas version,
and versions of other installed relative packages.

Parameters
----------
as_json : str or bool, default False
    * If False, outputs info in a human readable form to the console.
    * If str, it will be considered as a path to a file.
      Info will be written to that file in JSON format.
    * If True, outputs info in JSON format to the console.

Examples
--------
>>> pd.show_versions()  # doctest: +SKIP
Your output may look something like this:
INSTALLED VERSIONS
------------------
commit           : 37ea63d540fd27274cad6585082c91b1283f963d
python           : 3.10.6.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.10.102.1-microsoft-standard-WSL2
Version          : #1 SMP Wed Mar 2 00:30:59 UTC 2022
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_GB.UTF-8
LOCALE           : en_GB.UTF-8
pandas           : 2.0.1
numpy            : 1.24.3
...

---
## capitalize_first_letter
```python
from __init__ import capitalize_first_letter
```



---
## deprecate
```python
from _decorators import deprecate
```

Return a new function that emits a deprecation warning on use.

To use this method for a deprecated function, another function
`alternative` with the same signature must exist. The deprecated
function will emit a deprecation warning, and in the docstring
it will contain the deprecation directive with the provided version
so it can be detected for future removal.

Parameters
----------
name : str
    Name of function to deprecate.
alternative : func
    Function to use instead.
version : str
    Version of pandas in which the method has been deprecated.
alt_name : str, optional
    Name to use in preference of alternative.__name__.
klass : Warning, default FutureWarning
stacklevel : int, default 2
msg : str
    The message to display in the warning.
    Default is '{name} is deprecated. Use {alt_name} instead.'

---
## deprecate_kwarg
```python
from _decorators import deprecate_kwarg
```

Decorator to deprecate a keyword argument of a function.

Parameters
----------
old_arg_name : str
    Name of argument in function to deprecate
new_arg_name : str or None
    Name of preferred argument in function. Use None to raise warning that
    ``old_arg_name`` keyword is deprecated.
mapping : dict or callable
    If mapping is present, use it to translate old arguments to
    new arguments. A callable must do its own value checking;
    values not found in a dict will be forwarded unchanged.

Examples
--------
The following deprecates 'cols', using 'columns' instead

>>> @deprecate_kwarg(old_arg_name='cols', new_arg_name='columns')
... def f(columns=''):
...     print(columns)
...
>>> f(columns='should work ok')
should work ok

>>> f(cols='should raise warning')  # doctest: +SKIP
FutureWarning: cols is deprecated, use columns instead
  warnings.warn(msg, FutureWarning)
should raise warning

>>> f(cols='should error', columns="can't pass do both")  # doctest: +SKIP
TypeError: Can only specify 'cols' or 'columns', not both

>>> @deprecate_kwarg('old', 'new', {'yes': True, 'no': False})
... def f(new=False):
...     print('yes!' if new else 'no!')
...
>>> f(old='yes')  # doctest: +SKIP
FutureWarning: old='yes' is deprecated, use new=True instead
  warnings.warn(msg, FutureWarning)
yes!

To raise a warning that a keyword will be removed entirely in the future

>>> @deprecate_kwarg(old_arg_name='cols', new_arg_name=None)
... def f(cols='', another_param=''):
...     print(cols)
...
>>> f(cols='should raise warning')  # doctest: +SKIP
FutureWarning: the 'cols' keyword is deprecated and will be removed in a
future version please takes steps to stop use of 'cols'
should raise warning
>>> f(another_param='should not raise warning')  # doctest: +SKIP
should not raise warning

>>> f(cols='should raise warning', another_param='')  # doctest: +SKIP
FutureWarning: the 'cols' keyword is deprecated and will be removed in a
future version please takes steps to stop use of 'cols'
should raise warning

---
## _format_argument_list
```python
from _decorators import _format_argument_list
```

Convert the allow_args argument (either string or integer) of
`deprecate_nonkeyword_arguments` function to a string describing
it to be inserted into warning message.

Parameters
----------
allowed_args : list, tuple or int
    The `allowed_args` argument for `deprecate_nonkeyword_arguments`,
    but None value is not allowed.

Returns
-------
str
    The substring describing the argument list in best way to be
    inserted to the warning message.

Examples
--------
`format_argument_list([])` -> ''
`format_argument_list(['a'])` -> "except for the arguments 'a'"
`format_argument_list(['a', 'b'])` -> "except for the arguments 'a' and 'b'"
`format_argument_list(['a', 'b', 'c'])` ->
    "except for the arguments 'a', 'b' and 'c'"

---
## future_version_msg
```python
from _decorators import future_version_msg
```

Specify which version of pandas the deprecation will take place in.

---
## deprecate_nonkeyword_arguments
```python
from _decorators import deprecate_nonkeyword_arguments
```

Decorator to deprecate a use of non-keyword arguments of a function.

Parameters
----------
version : str, optional
    The version in which positional arguments will become
    keyword-only. If None, then the warning message won't
    specify any particular version.

allowed_args : list, optional
    In case of list, it must be the list of names of some
    first arguments of the decorated functions that are
    OK to be given as positional arguments. In case of None value,
    defaults to list of all arguments not having the
    default value.

name : str, optional
    The specific name of the function to show in the warning
    message. If None, then the Qualified name of the function
    is used.

---
## doc
```python
from _decorators import doc
```

A decorator to take docstring templates, concatenate them and perform string
substitution on them.

This decorator will add a variable "_docstring_components" to the wrapped
callable to keep track the original docstring template for potential usage.
If it should be consider as a template, it will be saved as a string.
Otherwise, it will be saved as callable, and later user __doc__ and dedent
to get docstring.

Parameters
----------
*docstrings : None, str, or callable
    The string / docstring / docstring template to be appended in order
    after default docstring under callable.
**params
    The string which would be used to format docstring template.

---
## Substitution
```python
from _decorators import Substitution
```

A decorator to take a function's docstring and perform string
substitution on it.

This decorator should be robust even if func.__doc__ is None
(for example, if -OO was passed to the interpreter)

Usage: construct a docstring.Substitution with a sequence or
dictionary suitable for performing substitution; then
decorate a suitable function with the constructed object. e.g.

sub_author_name = Substitution(author='Jason')

@sub_author_name
def some_function(x):
    "%(author)s wrote this function"

# note that some_function.__doc__ is now "Jason wrote this function"

One can also use positional arguments.

sub_first_last_names = Substitution('Edgar Allen', 'Poe')

@sub_first_last_names
def some_function(x):
    "%s %s wrote the Raven"

---
## Appender
```python
from _decorators import Appender
```

A function decorator that will append an addendum to the docstring
    of the target function.

    This decorator should be robust even if func.__doc__ is None
    (for example, if -OO was passed to the interpreter).

    Usage: construct a docstring.Appender with a string to be joined to
    the original docstring. An optional 'join' parameter may be supplied
    which will be used to join the docstring and addendum. e.g.

    add_copyright = Appender("Copyright (c) 2009", join='
')

    @add_copyright
    def my_dog(has='fleas'):
        "This docstring will have a copyright below"
        pass
    

---
## indent
```python
from _decorators import indent
```



---
## wrapper
```python
from _decorators import wrapper
```



---
## _deprecate_kwarg
```python
from _decorators import _deprecate_kwarg
```



---
## decorate
```python
from _decorators import decorate
```



---
## decorator
```python
from _decorators import decorator
```



---
## __init__
```python
from _decorators import __init__
```



---
## __call__
```python
from _decorators import __call__
```



---
## update
```python
from _decorators import update
```

Update self.params with supplied args.

---
## __name__
```python
from _doctools import __name__
```



---
## TablePlotter
```python
from _doctools import TablePlotter
```

Layout some DataFrames in vertical/horizontal layout for explanation.
Used in merging.rst

---
## main
```python
from _doctools import main
```



---
## __init__
```python
from _doctools import __init__
```



---
## _shape
```python
from _doctools import _shape
```

Calculate table shape considering index levels.

---
## _get_cells
```python
from _doctools import _get_cells
```

Calculate appropriate figure size based on left and right data.

---
## plot
```python
from _doctools import plot
```

Plot left / right DataFrames in specified layout.

Parameters
----------
left : list of DataFrames before operation is applied
right : DataFrame of operation result
labels : list of str to be drawn as titles of left DataFrames
vertical : bool, default True
    If True, use vertical layout. If False, use horizontal layout.

---
## _conv
```python
from _doctools import _conv
```

Convert each input to appropriate for table outplot.

---
## _insert_index
```python
from _doctools import _insert_index
```



---
## _make_table
```python
from _doctools import _make_table
```



---
## rewrite_exception
```python
from _exceptions import rewrite_exception
```

Rewrite the message of an exception.

---
## find_stack_level
```python
from _exceptions import find_stack_level
```

Find the first place in the stack that is not inside pandas
(tests notwithstanding).

---
## rewrite_warning
```python
from _exceptions import rewrite_warning
```

Rewrite the message of a warning.

Parameters
----------
target_message : str
    Warning message to match.
target_category : Warning
    Warning type to match.
new_message : str
    New warning message to emit.
new_category : Warning or None, default None
    New warning type to emit. When None, will be the same as target_category.

---
## __name__
```python
from _tester import __name__
```

Entrypoint for testing from the top-level namespace.

---
## test
```python
from _tester import test
```

Run the pandas test suite using pytest.

By default, runs with the marks -m "not slow and not network and not db"

Parameters
----------
extra_args : list[str], default None
    Extra marks to run the tests.
run_doctests : bool, default False
    Whether to only run the Python and Cython doctests. If you would like to run
    both doctests/regular tests, just append "--doctest-modules"/"--doctest-cython"
    to extra_args.

Examples
--------
>>> pd.test()  # doctest: +SKIP
running: pytest...

---
## read_orc
```python
from orc import read_orc
```

Load an ORC object from the file path, returning a DataFrame.

Parameters
----------
path : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``read()`` function. The string could be a URL.
    Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
    expected. A local file could be:
    ``file://localhost/path/to/table.orc``.
columns : list, default None
    If not None, only these columns will be read from the file.
    Output always follows the ordering of the file and not the columns list.
    This mirrors the original behaviour of
    :external+pyarrow:py:meth:`pyarrow.orc.ORCFile.read`.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

filesystem : fsspec or pyarrow filesystem, default None
    Filesystem object to use when reading the parquet file.

    .. versionadded:: 2.1.0

**kwargs
    Any additional kwargs are passed to pyarrow.

Returns
-------
DataFrame

Notes
-----
Before using this function you should read the :ref:`user guide about ORC <io.orc>`
and :ref:`install optional dependencies <install.warn_orc>`.

If ``path`` is a URI scheme pointing to a local or remote file (e.g. "s3://"),
a ``pyarrow.fs`` filesystem will be attempted to read the file. You can also pass a
pyarrow or fsspec filesystem object into the filesystem keyword to override this
behavior.

Examples
--------
>>> result = pd.read_orc("example_pa.orc")  # doctest: +SKIP

---
## to_orc
```python
from orc import to_orc
```

Write a DataFrame to the ORC format.

.. versionadded:: 1.5.0

Parameters
----------
df : DataFrame
    The dataframe to be written to ORC. Raises NotImplementedError
    if dtype of one or more columns is category, unsigned integers,
    intervals, periods or sparse.
path : str, file-like object or None, default None
    If a string, it will be used as Root Directory path
    when writing a partitioned dataset. By file-like object,
    we refer to objects with a write() method, such as a file handle
    (e.g. via builtin open function). If path is None,
    a bytes object is returned.
engine : str, default 'pyarrow'
    ORC library to use.
index : bool, optional
    If ``True``, include the dataframe's index(es) in the file output. If
    ``False``, they will not be written to the file.
    If ``None``, similar to ``infer`` the dataframe's index(es)
    will be saved. However, instead of being saved as values,
    the RangeIndex will be stored as a range in the metadata so it
    doesn't require much space and is faster. Other indexes will
    be included as columns in the file output.
engine_kwargs : dict[str, Any] or None, default None
    Additional keyword arguments passed to :func:`pyarrow.orc.write_table`.

Returns
-------
bytes if no path argument is provided else None

Raises
------
NotImplementedError
    Dtype of one or more columns is category, unsigned integers, interval,
    period or sparse.
ValueError
    engine is not pyarrow.

Notes
-----
* Before using this function you should read the
  :ref:`user guide about ORC <io.orc>` and
  :ref:`install optional dependencies <install.warn_orc>`.
* This function requires `pyarrow <https://arrow.apache.org/docs/python/>`_
  library.
* For supported dtypes please refer to `supported ORC features in Arrow
  <https://arrow.apache.org/docs/cpp/orc.html#data-types>`__.
* Currently timezones in datetime columns are not preserved when a
  dataframe is converted into ORC files.

---
## __name__
```python
from feather_format import __name__
```

feather-format compat 

---
## to_feather
```python
from feather_format import to_feather
```

Write a DataFrame to the binary Feather format.

Parameters
----------
df : DataFrame
path : str, path object, or file-like object
{storage_options}
**kwargs :
    Additional keywords passed to `pyarrow.feather.write_feather`.

---
## read_feather
```python
from feather_format import read_feather
```

Load a feather-format object from the file path.

Parameters
----------
path : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``read()`` function. The string could be a URL.
    Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
    expected. A local file could be: ``file://localhost/path/to/table.feather``.
columns : sequence, default None
    If not provided, all columns are read.
use_threads : bool, default True
    Whether to parallelize reading using multiple threads.
{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
type of object stored in file

Examples
--------
>>> df = pd.read_feather("path/to/file.feather")  # doctest: +SKIP

---
## get_engine
```python
from parquet import get_engine
```

return our implementation

---
## _get_path_or_handle
```python
from parquet import _get_path_or_handle
```

File handling for PyArrow.

---
## BaseImpl
```python
from parquet import BaseImpl
```



---
## PyArrowImpl
```python
from parquet import PyArrowImpl
```



---
## FastParquetImpl
```python
from parquet import FastParquetImpl
```



---
## to_parquet
```python
from parquet import to_parquet
```

Write a DataFrame to the parquet format.

Parameters
----------
df : DataFrame
path : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function. If None, the result is
    returned as bytes. If a string, it will be used as Root Directory path
    when writing a partitioned dataset. The engine fastparquet does not
    accept file-like objects.
engine : {{'auto', 'pyarrow', 'fastparquet'}}, default 'auto'
    Parquet library to use. If 'auto', then the option
    ``io.parquet.engine`` is used. The default ``io.parquet.engine``
    behavior is to try 'pyarrow', falling back to 'fastparquet' if
    'pyarrow' is unavailable.

    When using the ``'pyarrow'`` engine and no storage options are provided
    and a filesystem is implemented by both ``pyarrow.fs`` and ``fsspec``
    (e.g. "s3://"), then the ``pyarrow.fs`` filesystem is attempted first.
    Use the filesystem keyword with an instantiated fsspec filesystem
    if you wish to use its implementation.
compression : {{'snappy', 'gzip', 'brotli', 'lz4', 'zstd', None}},
    default 'snappy'. Name of the compression to use. Use ``None``
    for no compression.
index : bool, default None
    If ``True``, include the dataframe's index(es) in the file output. If
    ``False``, they will not be written to the file.
    If ``None``, similar to ``True`` the dataframe's index(es)
    will be saved. However, instead of being saved as values,
    the RangeIndex will be stored as a range in the metadata so it
    doesn't require much space and is faster. Other indexes will
    be included as columns in the file output.
partition_cols : str or list, optional, default None
    Column names by which to partition the dataset.
    Columns are partitioned in the order they are given.
    Must be None if path is not a string.
{storage_options}

filesystem : fsspec or pyarrow filesystem, default None
    Filesystem object to use when reading the parquet file. Only implemented
    for ``engine="pyarrow"``.

    .. versionadded:: 2.1.0

kwargs
    Additional keyword arguments passed to the engine

Returns
-------
bytes if no path argument is provided else None

---
## read_parquet
```python
from parquet import read_parquet
```

Load a parquet object from the file path, returning a DataFrame.

Parameters
----------
path : str, path object or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``read()`` function.
    The string could be a URL. Valid URL schemes include http, ftp, s3,
    gs, and file. For file URLs, a host is expected. A local file could be:
    ``file://localhost/path/to/table.parquet``.
    A file URL can also be a path to a directory that contains multiple
    partitioned parquet files. Both pyarrow and fastparquet support
    paths to directories as well as file URLs. A directory path could be:
    ``file://localhost/path/to/tables`` or ``s3://bucket/partition_dir``.
engine : {{'auto', 'pyarrow', 'fastparquet'}}, default 'auto'
    Parquet library to use. If 'auto', then the option
    ``io.parquet.engine`` is used. The default ``io.parquet.engine``
    behavior is to try 'pyarrow', falling back to 'fastparquet' if
    'pyarrow' is unavailable.

    When using the ``'pyarrow'`` engine and no storage options are provided
    and a filesystem is implemented by both ``pyarrow.fs`` and ``fsspec``
    (e.g. "s3://"), then the ``pyarrow.fs`` filesystem is attempted first.
    Use the filesystem keyword with an instantiated fsspec filesystem
    if you wish to use its implementation.
columns : list, default=None
    If not None, only these columns will be read from the file.
{storage_options}

    .. versionadded:: 1.3.0

use_nullable_dtypes : bool, default False
    If True, use dtypes that use ``pd.NA`` as missing value indicator
    for the resulting DataFrame. (only applicable for the ``pyarrow``
    engine)
    As new dtypes are added that support ``pd.NA`` in the future, the
    output with this option will change to use those dtypes.
    Note: this is an experimental option, and behaviour (e.g. additional
    support dtypes) may change without notice.

    .. deprecated:: 2.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

filesystem : fsspec or pyarrow filesystem, default None
    Filesystem object to use when reading the parquet file. Only implemented
    for ``engine="pyarrow"``.

    .. versionadded:: 2.1.0

filters : List[Tuple] or List[List[Tuple]], default None
    To filter out data.
    Filter syntax: [[(column, op, val), ...],...]
    where op is [==, =, >, >=, <, <=, !=, in, not in]
    The innermost tuples are transposed into a set of filters applied
    through an `AND` operation.
    The outer list combines these sets of filters through an `OR`
    operation.
    A single list of tuples can also be used, meaning that no `OR`
    operation between set of filters is to be conducted.

    Using this argument will NOT result in row-wise filtering of the final
    partitions unless ``engine="pyarrow"`` is also specified.  For
    other engines, filtering is only performed at the partition level, that is,
    to prevent the loading of some row-groups and/or files.

    .. versionadded:: 2.1.0

**kwargs
    Any additional kwargs are passed to the engine.

Returns
-------
DataFrame

See Also
--------
DataFrame.to_parquet : Create a parquet object that serializes a DataFrame.

Examples
--------
>>> original_df = pd.DataFrame(
...     {{"foo": range(5), "bar": range(5, 10)}}
...    )
>>> original_df
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> df_parquet_bytes = original_df.to_parquet()
>>> from io import BytesIO
>>> restored_df = pd.read_parquet(BytesIO(df_parquet_bytes))
>>> restored_df
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> restored_df.equals(original_df)
True
>>> restored_bar = pd.read_parquet(BytesIO(df_parquet_bytes), columns=["bar"])
>>> restored_bar
    bar
0    5
1    6
2    7
3    8
4    9
>>> restored_bar.equals(original_df[['bar']])
True

The function uses `kwargs` that are passed directly to the engine.
In the following example, we use the `filters` argument of the pyarrow
engine to filter the rows of the DataFrame.

Since `pyarrow` is the default engine, we can omit the `engine` argument.
Note that the `filters` argument is implemented by the `pyarrow` engine,
which can benefit from multithreading and also potentially be more
economical in terms of memory.

>>> sel = [("foo", ">", 2)]
>>> restored_part = pd.read_parquet(BytesIO(df_parquet_bytes), filters=sel)
>>> restored_part
    foo  bar
0    3    8
1    4    9

---
## validate_dataframe
```python
from parquet import validate_dataframe
```



---
## __name__
```python
from pytables import __name__
```

manage PyTables query interface via Expressions 

---
## _ensure_decoded
```python
from pytables import _ensure_decoded
```

if we have bytes, decode them to unicode

---
## _ensure_encoding
```python
from pytables import _ensure_encoding
```



---
## _ensure_str
```python
from pytables import _ensure_str
```

Ensure that an index / column name is a str (python 3); otherwise they
may be np.string dtype. Non-string dtypes are passed through unchanged.

https://github.com/pandas-dev/pandas/issues/13492

---
## _ensure_term
```python
from pytables import _ensure_term
```

Ensure that the where is a Term or a list of Term.

This makes sure that we are capturing the scope of variables that are
passed create the terms here with a frame_level=2 (we are 2 levels down)

---
## _tables
```python
from pytables import _tables
```



---
## to_hdf
```python
from pytables import to_hdf
```

store this object, close it if we opened it

---
## read_hdf
```python
from pytables import read_hdf
```

Read from the store, close it if we opened it.

Retrieve pandas object stored in file, optionally based on where
criteria.

.. warning::

   Pandas uses PyTables for reading and writing HDF5 files, which allows
   serializing object-dtype data with pickle when using the "fixed" format.
   Loading pickled data received from untrusted sources can be unsafe.

   See: https://docs.python.org/3/library/pickle.html for more.

Parameters
----------
path_or_buf : str, path object, pandas.HDFStore
    Any valid string path is acceptable. Only supports the local file system,
    remote URLs and file-like objects are not supported.

    If you want to pass in a path object, pandas accepts any
    ``os.PathLike``.

    Alternatively, pandas accepts an open :class:`pandas.HDFStore` object.

key : object, optional
    The group identifier in the store. Can be omitted if the HDF file
    contains a single pandas object.
mode : {'r', 'r+', 'a'}, default 'r'
    Mode to use when opening the file. Ignored if path_or_buf is a
    :class:`pandas.HDFStore`. Default is 'r'.
errors : str, default 'strict'
    Specifies how encoding and decoding errors are to be handled.
    See the errors argument for :func:`open` for a full list
    of options.
where : list, optional
    A list of Term (or convertible) objects.
start : int, optional
    Row number to start selection.
stop  : int, optional
    Row number to stop selection.
columns : list, optional
    A list of columns names to return.
iterator : bool, optional
    Return an iterator object.
chunksize : int, optional
    Number of rows to include in an iteration when using an iterator.
**kwargs
    Additional keyword arguments passed to HDFStore.

Returns
-------
object
    The selected object. Return type depends on the object stored.

See Also
--------
DataFrame.to_hdf : Write a HDF file from a DataFrame.
HDFStore : Low-level access to HDF files.

Examples
--------
>>> df = pd.DataFrame([[1, 1.0, 'a']], columns=['x', 'y', 'z'])  # doctest: +SKIP
>>> df.to_hdf('./store.h5', 'data')  # doctest: +SKIP
>>> reread = pd.read_hdf('./store.h5')  # doctest: +SKIP

---
## _is_metadata_of
```python
from pytables import _is_metadata_of
```

Check if a given group is a metadata group for a given parent_group.

---
## HDFStore
```python
from pytables import HDFStore
```

Dict-like IO interface for storing pandas objects in PyTables.

Either Fixed or Table format.

.. warning::

   Pandas uses PyTables for reading and writing HDF5 files, which allows
   serializing object-dtype data with pickle when using the "fixed" format.
   Loading pickled data received from untrusted sources can be unsafe.

   See: https://docs.python.org/3/library/pickle.html for more.

Parameters
----------
path : str
    File path to HDF5 file.
mode : {'a', 'w', 'r', 'r+'}, default 'a'

    ``'r'``
        Read-only; no data can be modified.
    ``'w'``
        Write; a new file is created (an existing file with the same
        name would be deleted).
    ``'a'``
        Append; an existing file is opened for reading and writing,
        and if the file does not exist it is created.
    ``'r+'``
        It is similar to ``'a'``, but the file must already exist.
complevel : int, 0-9, default None
    Specifies a compression level for data.
    A value of 0 or None disables compression.
complib : {'zlib', 'lzo', 'bzip2', 'blosc'}, default 'zlib'
    Specifies the compression library to be used.
    These additional compressors for Blosc are supported
    (default if no compressor specified: 'blosc:blosclz'):
    {'blosc:blosclz', 'blosc:lz4', 'blosc:lz4hc', 'blosc:snappy',
     'blosc:zlib', 'blosc:zstd'}.
    Specifying a compression library which is not available issues
    a ValueError.
fletcher32 : bool, default False
    If applying compression use the fletcher32 checksum.
**kwargs
    These parameters will be passed to the PyTables open_file method.

Examples
--------
>>> bar = pd.DataFrame(np.random.randn(10, 4))
>>> store = pd.HDFStore('test.h5')
>>> store['foo'] = bar   # write to HDF5
>>> bar = store['foo']   # retrieve
>>> store.close()

**Create or load HDF5 file in-memory**

When passing the `driver` option to the PyTables open_file method through
**kwargs, the HDF5 file is loaded or created in-memory and will only be
written when closed:

>>> bar = pd.DataFrame(np.random.randn(10, 4))
>>> store = pd.HDFStore('test.h5', driver='H5FD_CORE')
>>> store['foo'] = bar
>>> store.close()   # only now, data is written to disk

---
## TableIterator
```python
from pytables import TableIterator
```

Define the iteration interface on a table

Parameters
----------
store : HDFStore
s     : the referred storer
func  : the function to execute the query
where : the where of the query
nrows : the rows to iterate on
start : the passed start value (default is None)
stop  : the passed stop value (default is None)
iterator : bool, default False
    Whether to use the default iterator.
chunksize : the passed chunking value (default is 100000)
auto_close : bool, default False
    Whether to automatically close the store at the end of iteration.

---
## IndexCol
```python
from pytables import IndexCol
```

an index column description class

Parameters
----------
axis   : axis which I reference
values : the ndarray like converted values
kind   : a string description of this type
typ    : the pytables type
pos    : the position in the pytables

---
## GenericIndexCol
```python
from pytables import GenericIndexCol
```

an index which is not represented in the data of the table

---
## DataCol
```python
from pytables import DataCol
```

a data holding column, by definition this is not indexable

Parameters
----------
data   : the actual data
cname  : the column name in the table to hold the data (typically
            values)
meta   : a string description of the metadata
metadata : the actual metadata

---
## DataIndexableCol
```python
from pytables import DataIndexableCol
```

represent a data column that can be indexed

---
## GenericDataIndexableCol
```python
from pytables import GenericDataIndexableCol
```

represent a generic pytables data column

---
## Fixed
```python
from pytables import Fixed
```

represent an object in my store
facilitate read/write of various types of objects
this is an abstract base class

Parameters
----------
parent : HDFStore
group : Node
    The group node where the table resides.

---
## GenericFixed
```python
from pytables import GenericFixed
```

a generified fixed version

---
## SeriesFixed
```python
from pytables import SeriesFixed
```



---
## BlockManagerFixed
```python
from pytables import BlockManagerFixed
```



---
## FrameFixed
```python
from pytables import FrameFixed
```



---
## Table
```python
from pytables import Table
```

represent a table:
    facilitate read/write of various types of tables

Attrs in Table Node
-------------------
These are attributes that are store in the main table node, they are
necessary to recreate these tables when read back in.

index_axes    : a list of tuples of the (original indexing axis and
    index column)
non_index_axes: a list of tuples of the (original index axis and
    columns on a non-indexing axis)
values_axes   : a list of the columns which comprise the data of this
    table
data_columns  : a list of the columns that we are allowing indexing
    (these become single columns in values_axes)
nan_rep       : the string to use for nan representations for string
    objects
levels        : the names of levels
metadata      : the names of the metadata columns

---
## WORMTable
```python
from pytables import WORMTable
```

a write-once read-many table: this format DOES NOT ALLOW appending to a
table. writing is a one-time operation the data are stored in a format
that allows for searching the data on disk

---
## AppendableTable
```python
from pytables import AppendableTable
```

support the new appendable table formats

---
## AppendableFrameTable
```python
from pytables import AppendableFrameTable
```

support the new appendable table formats

---
## AppendableSeriesTable
```python
from pytables import AppendableSeriesTable
```

support the new appendable table formats

---
## AppendableMultiSeriesTable
```python
from pytables import AppendableMultiSeriesTable
```

support the new appendable table formats

---
## GenericTable
```python
from pytables import GenericTable
```

a table that read/writes the generic pytables table format

---
## AppendableMultiFrameTable
```python
from pytables import AppendableMultiFrameTable
```

a frame with a multi-index

---
## _reindex_axis
```python
from pytables import _reindex_axis
```



---
## _get_tz
```python
from pytables import _get_tz
```

for a tz-aware type, return an encoded zone

---
## _set_tz
```python
from pytables import _set_tz
```

coerce the values to a DatetimeIndex if tz is set
preserve the input shape if possible

Parameters
----------
values : ndarray or Index
tz : str or tzinfo
coerce : if we do not have a passed timezone, coerce to M8[ns] ndarray

---
## _convert_index
```python
from pytables import _convert_index
```



---
## _unconvert_index
```python
from pytables import _unconvert_index
```



---
## _maybe_convert_for_string_atom
```python
from pytables import _maybe_convert_for_string_atom
```



---
## _convert_string_array
```python
from pytables import _convert_string_array
```

Take a string-like that is object dtype and coerce to a fixed size string type.

Parameters
----------
data : np.ndarray[object]
encoding : str
errors : str
    Handler for encoding errors.

Returns
-------
np.ndarray[fixed-length-string]

---
## _unconvert_string_array
```python
from pytables import _unconvert_string_array
```

Inverse of _convert_string_array.

Parameters
----------
data : np.ndarray[fixed-length-string]
nan_rep : the storage repr of NaN
encoding : str
errors : str
    Handler for encoding errors.

Returns
-------
np.ndarray[object]
    Decoded data.

---
## _maybe_convert
```python
from pytables import _maybe_convert
```



---
## _get_converter
```python
from pytables import _get_converter
```



---
## _need_convert
```python
from pytables import _need_convert
```



---
## _maybe_adjust_name
```python
from pytables import _maybe_adjust_name
```

Prior to 0.10.1, we named values blocks like: values_block_0 an the
name values_0, adjust the given name if necessary.

Parameters
----------
name : str
version : Tuple[int, int, int]

Returns
-------
str

---
## _dtype_to_kind
```python
from pytables import _dtype_to_kind
```

Find the "kind" string describing the given dtype name.

---
## _get_data_and_dtype_name
```python
from pytables import _get_data_and_dtype_name
```

Convert the passed data into a storable form and a dtype string.

---
## Selection
```python
from pytables import Selection
```

Carries out a selection operation on a tables.Table object.

Parameters
----------
table : a Table object
where : list of Terms (or convertible to)
start, stop: indices to start and/or stop selection

---
## __init__
```python
from pytables import __init__
```



---
## __fspath__
```python
from pytables import __fspath__
```



---
## root
```python
from pytables import root
```

return the root node

---
## filename
```python
from pytables import filename
```



---
## __getitem__
```python
from pytables import __getitem__
```

return the axis for c

---
## __setitem__
```python
from pytables import __setitem__
```



---
## __delitem__
```python
from pytables import __delitem__
```



---
## __getattr__
```python
from pytables import __getattr__
```

allow attribute access to get stores

---
## __contains__
```python
from pytables import __contains__
```

check for existence of this key
can match the exact pathname or the pathnm w/o the leading '/'

---
## __len__
```python
from pytables import __len__
```



---
## __repr__
```python
from pytables import __repr__
```



---
## __enter__
```python
from pytables import __enter__
```



---
## __exit__
```python
from pytables import __exit__
```



---
## keys
```python
from pytables import keys
```

Return a list of keys corresponding to objects stored in HDFStore.

Parameters
----------

include : str, default 'pandas'
        When kind equals 'pandas' return pandas objects.
        When kind equals 'native' return native HDF5 Table objects.

Returns
-------
list
    List of ABSOLUTE path-names (e.g. have the leading '/').

Raises
------
raises ValueError if kind has an illegal value

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP
>>> store.get('data')  # doctest: +SKIP
>>> print(store.keys())  # doctest: +SKIP
['/data1', '/data2']
>>> store.close()  # doctest: +SKIP

---
## __iter__
```python
from pytables import __iter__
```



---
## items
```python
from pytables import items
```

iterate on key->group

---
## open
```python
from pytables import open
```

Open the file in the specified mode

Parameters
----------
mode : {'a', 'w', 'r', 'r+'}, default 'a'
    See HDFStore docstring or tables.open_file for info about modes
**kwargs
    These parameters will be passed to the PyTables open_file method.

---
## close
```python
from pytables import close
```



---
## is_open
```python
from pytables import is_open
```

return a boolean indicating whether the file is open

---
## flush
```python
from pytables import flush
```

Force all buffered modifications to be written to disk.

Parameters
----------
fsync : bool (default False)
  call ``os.fsync()`` on the file handle to force writing to disk.

Notes
-----
Without ``fsync=True``, flushing may not guarantee that the OS writes
to disk. With fsync, the operation will block until the OS claims the
file has been written; however, other caching layers may still
interfere.

---
## get
```python
from pytables import get
```

Retrieve pandas object stored in file.

Parameters
----------
key : str

Returns
-------
object
    Same type as object stored in file.

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP
>>> store.get('data')  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP

---
## select
```python
from pytables import select
```

generate the selection

---
## select_as_coordinates
```python
from pytables import select_as_coordinates
```

return the selection as an Index

.. warning::

   Pandas uses PyTables for reading and writing HDF5 files, which allows
   serializing object-dtype data with pickle when using the "fixed" format.
   Loading pickled data received from untrusted sources can be unsafe.

   See: https://docs.python.org/3/library/pickle.html for more.


Parameters
----------
key : str
where : list of Term (or convertible) objects, optional
start : integer (defaults to None), row number to start selection
stop  : integer (defaults to None), row number to stop selection

---
## select_column
```python
from pytables import select_column
```

return a single column from the table. This is generally only useful to
select an indexable

.. warning::

   Pandas uses PyTables for reading and writing HDF5 files, which allows
   serializing object-dtype data with pickle when using the "fixed" format.
   Loading pickled data received from untrusted sources can be unsafe.

   See: https://docs.python.org/3/library/pickle.html for more.

Parameters
----------
key : str
column : str
    The column of interest.
start : int or None, default None
stop : int or None, default None

Raises
------
raises KeyError if the column is not found (or key is not a valid
    store)
raises ValueError if the column can not be extracted individually (it
    is part of a data block)

---
## select_as_multiple
```python
from pytables import select_as_multiple
```

Retrieve pandas objects from multiple tables.

.. warning::

   Pandas uses PyTables for reading and writing HDF5 files, which allows
   serializing object-dtype data with pickle when using the "fixed" format.
   Loading pickled data received from untrusted sources can be unsafe.

   See: https://docs.python.org/3/library/pickle.html for more.

Parameters
----------
keys : a list of the tables
selector : the table to apply the where criteria (defaults to keys[0]
    if not supplied)
columns : the columns I want back
start : integer (defaults to None), row number to start selection
stop  : integer (defaults to None), row number to stop selection
iterator : bool, return an iterator, default False
chunksize : nrows to include in iteration, return an iterator
auto_close : bool, default False
    Should automatically close the store when finished.

Raises
------
raises KeyError if keys or selector is not found or keys is empty
raises TypeError if keys is not a list or tuple
raises ValueError if the tables are not ALL THE SAME DIMENSIONS

---
## put
```python
from pytables import put
```

Store object in HDFStore.

Parameters
----------
key : str
value : {Series, DataFrame}
format : 'fixed(f)|table(t)', default is 'fixed'
    Format to use when storing object in HDFStore. Value can be one of:

    ``'fixed'``
        Fixed format.  Fast writing/reading. Not-appendable, nor searchable.
    ``'table'``
        Table format.  Write as a PyTables Table structure which may perform
        worse but allow more flexible operations like searching / selecting
        subsets of the data.
index : bool, default True
    Write DataFrame index as a column.
append : bool, default False
    This will force Table format, append the input data to the existing.
data_columns : list of columns or True, default None
    List of columns to create as data columns, or True to use all columns.
    See `here
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.
encoding : str, default None
    Provide an encoding for strings.
track_times : bool, default True
    Parameter is propagated to 'create_table' method of 'PyTables'.
    If set to False it enables to have the same h5 files (same hashes)
    independent on creation time.
dropna : bool, default False, optional
    Remove missing values.

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP

---
## remove
```python
from pytables import remove
```

Remove pandas object partially by specifying the where condition

Parameters
----------
key : str
    Node to remove or delete rows from
where : list of Term (or convertible) objects, optional
start : integer (defaults to None), row number to start selection
stop  : integer (defaults to None), row number to stop selection

Returns
-------
number of rows removed (or None if not a Table)

Raises
------
raises KeyError if key is not a valid store

---
## append
```python
from pytables import append
```

Append to Table in file.

Node must already exist and be Table format.

Parameters
----------
key : str
value : {Series, DataFrame}
format : 'table' is the default
    Format to use when storing object in HDFStore.  Value can be one of:

    ``'table'``
        Table format. Write as a PyTables Table structure which may perform
        worse but allow more flexible operations like searching / selecting
        subsets of the data.
index : bool, default True
    Write DataFrame index as a column.
append       : bool, default True
    Append the input data to the existing.
data_columns : list of columns, or True, default None
    List of columns to create as indexed data columns for on-disk
    queries, or True to use all columns. By default only the axes
    of the object are indexed. See `here
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.
min_itemsize : dict of columns that specify minimum str sizes
nan_rep      : str to use as str nan representation
chunksize    : size to chunk the writing
expectedrows : expected TOTAL row size of this table
encoding     : default None, provide an encoding for str
dropna : bool, default False, optional
    Do not write an ALL nan row to the store settable
    by the option 'io.hdf.dropna_table'.

Notes
-----
Does *not* check if data being appended overlaps with existing
data in the table, so be careful

Examples
--------
>>> df1 = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df1, format='table')  # doctest: +SKIP
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=['A', 'B'])
>>> store.append('data', df2)  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP
   A  B
0  1  2
1  3  4
0  5  6
1  7  8

---
## append_to_multiple
```python
from pytables import append_to_multiple
```

Append to multiple tables

Parameters
----------
d : a dict of table_name to table_columns, None is acceptable as the
    values of one node (this will get all the remaining columns)
value : a pandas object
selector : a string that designates the indexable table; all of its
    columns will be designed as data_columns, unless data_columns is
    passed, in which case these are used
data_columns : list of columns to create as data columns, or True to
    use all columns
dropna : if evaluates to True, drop rows from all tables if any single
         row in each table has all NaN. Default False.

Notes
-----
axes parameter is currently not accepted

---
## create_table_index
```python
from pytables import create_table_index
```

Create a pytables index on the table.

Parameters
----------
key : str
columns : None, bool, or listlike[str]
    Indicate which columns to create an index on.

    * False : Do not create any indexes.
    * True : Create indexes on all columns.
    * None : Create indexes on all columns.
    * listlike : Create indexes on the given columns.

optlevel : int or None, default None
    Optimization level, if None, pytables defaults to 6.
kind : str or None, default None
    Kind of index, if None, pytables defaults to "medium".

Raises
------
TypeError: raises if the node is not a table

---
## groups
```python
from pytables import groups
```

Return a list of all the top-level nodes.

Each node returned is not a pandas storage object.

Returns
-------
list
    List of objects.

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP
>>> print(store.groups())  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP
[/data (Group) ''
  children := ['axis0' (Array), 'axis1' (Array), 'block0_values' (Array),
  'block0_items' (Array)]]

---
## walk
```python
from pytables import walk
```

Walk the pytables group hierarchy for pandas objects.

This generator will yield the group path, subgroups and pandas object
names for each group.

Any non-pandas PyTables objects that are not a group will be ignored.

The `where` group itself is listed first (preorder), then each of its
child groups (following an alphanumerical order) is also traversed,
following the same procedure.

Parameters
----------
where : str, default "/"
    Group where to start walking.

Yields
------
path : str
    Full path to a group (without trailing '/').
groups : list
    Names (strings) of the groups contained in `path`.
leaves : list
    Names (strings) of the pandas objects contained in `path`.

Examples
--------
>>> df1 = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df1, format='table')  # doctest: +SKIP
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=['A', 'B'])
>>> store.append('data', df2)  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP
>>> for group in store.walk():  # doctest: +SKIP
...     print(group)  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP

---
## get_node
```python
from pytables import get_node
```

return the node with the key or None if it does not exist

---
## get_storer
```python
from pytables import get_storer
```

return the storer object for a key, raise if not in the file

---
## copy
```python
from pytables import copy
```



---
## info
```python
from pytables import info
```

Print detailed information on the store.

Returns
-------
str

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B'])
>>> store = pd.HDFStore("store.h5", 'w')  # doctest: +SKIP
>>> store.put('data', df)  # doctest: +SKIP
>>> print(store.info())  # doctest: +SKIP
>>> store.close()  # doctest: +SKIP
<class 'pandas.io.pytables.HDFStore'>
File path: store.h5
/data    frame    (shape->[2,2])

---
## _check_if_open
```python
from pytables import _check_if_open
```



---
## _validate_format
```python
from pytables import _validate_format
```

validate / deprecate formats

---
## _create_storer
```python
from pytables import _create_storer
```

return a suitable class to operate

---
## _write_to_group
```python
from pytables import _write_to_group
```



---
## _read_group
```python
from pytables import _read_group
```



---
## _identify_group
```python
from pytables import _identify_group
```

Identify HDF5 group based on key, delete/create group if needed.

---
## _create_nodes_and_group
```python
from pytables import _create_nodes_and_group
```

Create nodes from key and return group name.

---
## get_result
```python
from pytables import get_result
```



---
## itemsize
```python
from pytables import itemsize
```



---
## kind_attr
```python
from pytables import kind_attr
```



---
## set_pos
```python
from pytables import set_pos
```

set the position of this column in the Table

---
## __eq__
```python
from pytables import __eq__
```

compare 2 col items

---
## __ne__
```python
from pytables import __ne__
```



---
## is_indexed
```python
from pytables import is_indexed
```



---
## convert
```python
from pytables import convert
```

Convert the data from this selection to the appropriate pandas type.

Parameters
----------
values : np.ndarray
nan_rep :
encoding : str
errors : str

Returns
-------
index : listlike to become an Index
data : ndarraylike to become a column

---
## take_data
```python
from pytables import take_data
```

return the data

---
## attrs
```python
from pytables import attrs
```



---
## description
```python
from pytables import description
```



---
## col
```python
from pytables import col
```

return my current col description

---
## cvalues
```python
from pytables import cvalues
```

return my cython values

---
## maybe_set_size
```python
from pytables import maybe_set_size
```

maybe set a string col itemsize:
min_itemsize can be an integer or a dict with this columns name
with an integer size

---
## validate_names
```python
from pytables import validate_names
```



---
## validate_and_set
```python
from pytables import validate_and_set
```



---
## validate_col
```python
from pytables import validate_col
```

validate this column: return the compared against itemsize

---
## validate_attr
```python
from pytables import validate_attr
```

validate that we have the same order as the existing & same dtype

---
## update_info
```python
from pytables import update_info
```

set/update the info for this indexable with the key/value
if there is a conflict raise/warn as needed

---
## set_info
```python
from pytables import set_info
```

set my state from the passed info

---
## set_attr
```python
from pytables import set_attr
```

set the data for this column

---
## validate_metadata
```python
from pytables import validate_metadata
```

validate that kind=category does not change the categories

---
## write_metadata
```python
from pytables import write_metadata
```

Write out a metadata array to the key as a fixed-format Series.

Parameters
----------
key : str
values : ndarray

---
## dtype_attr
```python
from pytables import dtype_attr
```



---
## meta_attr
```python
from pytables import meta_attr
```



---
## set_data
```python
from pytables import set_data
```



---
## _get_atom
```python
from pytables import _get_atom
```

Get an appropriately typed and shaped pytables.Col object for values.

---
## get_atom_string
```python
from pytables import get_atom_string
```



---
## get_atom_coltype
```python
from pytables import get_atom_coltype
```

return the PyTables column class for this column

---
## get_atom_data
```python
from pytables import get_atom_data
```



---
## get_atom_datetime64
```python
from pytables import get_atom_datetime64
```



---
## get_atom_timedelta64
```python
from pytables import get_atom_timedelta64
```



---
## shape
```python
from pytables import shape
```



---
## is_old_version
```python
from pytables import is_old_version
```



---
## version
```python
from pytables import version
```

compute and set our version

---
## pandas_type
```python
from pytables import pandas_type
```



---
## set_object_info
```python
from pytables import set_object_info
```

set my pandas type & version

---
## pathname
```python
from pytables import pathname
```



---
## _handle
```python
from pytables import _handle
```



---
## _filters
```python
from pytables import _filters
```



---
## _complevel
```python
from pytables import _complevel
```



---
## _fletcher32
```python
from pytables import _fletcher32
```



---
## set_attrs
```python
from pytables import set_attrs
```

set our table type & indexables

---
## get_attrs
```python
from pytables import get_attrs
```

retrieve our attributes

---
## storable
```python
from pytables import storable
```



---
## is_exists
```python
from pytables import is_exists
```

has this table been created

---
## nrows
```python
from pytables import nrows
```



---
## validate
```python
from pytables import validate
```

validate against an existing table

---
## validate_version
```python
from pytables import validate_version
```

are we trying to operate on an old version?

---
## infer_axes
```python
from pytables import infer_axes
```

infer the axes of my storer
return a boolean indicating if we have a valid storer or not

---
## read
```python
from pytables import read
```



---
## write
```python
from pytables import write
```



---
## delete
```python
from pytables import delete
```



---
## _class_to_alias
```python
from pytables import _class_to_alias
```



---
## _alias_to_class
```python
from pytables import _alias_to_class
```



---
## _get_index_factory
```python
from pytables import _get_index_factory
```



---
## validate_read
```python
from pytables import validate_read
```

raise if any keywords are passed which are not-None

---
## read_array
```python
from pytables import read_array
```

read an array for the specified node (off of group

---
## read_index
```python
from pytables import read_index
```



---
## write_index
```python
from pytables import write_index
```



---
## write_multi_index
```python
from pytables import write_multi_index
```



---
## read_multi_index
```python
from pytables import read_multi_index
```



---
## read_index_node
```python
from pytables import read_index_node
```



---
## write_array_empty
```python
from pytables import write_array_empty
```

write a 0-len array

---
## write_array
```python
from pytables import write_array
```



---
## table_type_short
```python
from pytables import table_type_short
```



---
## is_multi_index
```python
from pytables import is_multi_index
```

the levels attribute is 1 or a list in the case of a multi-index

---
## validate_multiindex
```python
from pytables import validate_multiindex
```

validate that we can store the multi-index; reset and return the
new object

---
## nrows_expected
```python
from pytables import nrows_expected
```

based on our axes, compute the expected nrows

---
## table
```python
from pytables import table
```

return the table group (this is my storable)

---
## dtype
```python
from pytables import dtype
```



---
## axes
```python
from pytables import axes
```



---
## ncols
```python
from pytables import ncols
```

the number of total columns in the values axes

---
## is_transposed
```python
from pytables import is_transposed
```



---
## data_orientation
```python
from pytables import data_orientation
```

return a tuple of my permutated axes, non_indexable at the front

---
## queryables
```python
from pytables import queryables
```

return a dict of the kinds allowable columns for this object

---
## index_cols
```python
from pytables import index_cols
```

return a list of my index cols

---
## values_cols
```python
from pytables import values_cols
```

return a list of my values cols

---
## _get_metadata_path
```python
from pytables import _get_metadata_path
```

return the metadata pathname for this key

---
## read_metadata
```python
from pytables import read_metadata
```

return the meta data array for this key

---
## validate_min_itemsize
```python
from pytables import validate_min_itemsize
```

validate the min_itemsize doesn't contain items that are not in the
axes this needs data_columns to be defined

---
## indexables
```python
from pytables import indexables
```

create the indexables from the table description

---
## create_index
```python
from pytables import create_index
```

Create a pytables index on the specified columns.

Parameters
----------
columns : None, bool, or listlike[str]
    Indicate which columns to create an index on.

    * False : Do not create any indexes.
    * True : Create indexes on all columns.
    * None : Create indexes on all columns.
    * listlike : Create indexes on the given columns.

optlevel : int or None, default None
    Optimization level, if None, pytables defaults to 6.
kind : str or None, default None
    Kind of index, if None, pytables defaults to "medium".

Raises
------
TypeError if trying to create an index on a complex-type column.

Notes
-----
Cannot index Time64Col or ComplexCol.
Pytables must be >= 3.0.

---
## _read_axes
```python
from pytables import _read_axes
```

Create the axes sniffed from the table.

Parameters
----------
where : ???
start : int or None, default None
stop : int or None, default None

Returns
-------
List[Tuple[index_values, column_values]]

---
## get_object
```python
from pytables import get_object
```



---
## validate_data_columns
```python
from pytables import validate_data_columns
```

take the input data_columns and min_itemize and create a data
columns spec

---
## _create_axes
```python
from pytables import _create_axes
```

Create and return the axes.

Parameters
----------
axes: list or None
    The names or numbers of the axes to create.
obj : DataFrame
    The object to create axes on.
validate: bool, default True
    Whether to validate the obj against an existing object already written.
nan_rep :
    A value to use for string column nan_rep.
data_columns : List[str], True, or None, default None
    Specify the columns that we want to create to allow indexing on.

    * True : Use all available columns.
    * None : Use no columns.
    * List[str] : Use the specified columns.

min_itemsize: Dict[str, int] or None, default None
    The min itemsize for a column in bytes.

---
## _get_blocks_and_items
```python
from pytables import _get_blocks_and_items
```



---
## process_axes
```python
from pytables import process_axes
```

process axes filters

---
## create_description
```python
from pytables import create_description
```

create the description of the table from the axes & values

---
## read_coordinates
```python
from pytables import read_coordinates
```

select coordinates (row numbers) from a table; return the
coordinates object

---
## read_column
```python
from pytables import read_column
```

return a single column from the table, generally only indexables
are interesting

---
## write_data
```python
from pytables import write_data
```

we form the data into a 2-d including indexes,values,mask write chunk-by-chunk

---
## write_data_chunk
```python
from pytables import write_data_chunk
```

Parameters
----------
rows : an empty memory space where we are putting the chunk
indexes : an array of the indexes
mask : an array of the masks
values : an array of the values

---
## generate
```python
from pytables import generate
```

create and return the op string for this TermValue

---
## select_coords
```python
from pytables import select_coords
```

generate the selection

---
## func
```python
from pytables import func
```



---
## f
```python
from pytables import f
```



---
## get_blk_items
```python
from pytables import get_blk_items
```



---
## process_filter
```python
from pytables import process_filter
```



---
## _remove_whitespace
```python
from html import _remove_whitespace
```

Replace extra whitespace inside of a string with a single space.

Parameters
----------
s : str or unicode
    The string from which to remove extra whitespace.
regex : re.Pattern
    The regular expression to use to remove extra whitespace.

Returns
-------
subd : str or unicode
    `s` with all extra whitespace replaced with a single space.

---
## _get_skiprows
```python
from html import _get_skiprows
```

Get an iterator given an integer, slice or container.

Parameters
----------
skiprows : int, slice, container
    The iterator to use to skip rows; can also be a slice.

Raises
------
TypeError
    * If `skiprows` is not a slice, integer, or Container

Returns
-------
it : iterable
    A proper iterator to use to skip rows of a DataFrame.

---
## _read
```python
from html import _read
```

Try to read from a url, file or string.

Parameters
----------
obj : str, unicode, path object, or file-like object

Returns
-------
raw_text : str

---
## _HtmlFrameParser
```python
from html import _HtmlFrameParser
```

Base class for parsers that parse HTML into DataFrames.

Parameters
----------
io : str or file-like
    This can be either a string of raw HTML, a valid URL using the HTTP,
    FTP, or FILE protocols or a file-like object.

match : str or regex
    The text to match in the document.

attrs : dict
    List of HTML <table> element attributes to match.

encoding : str
    Encoding to be used by parser

displayed_only : bool
    Whether or not items with "display:none" should be ignored

extract_links : {None, "all", "header", "body", "footer"}
    Table elements in the specified section(s) with <a> tags will have their
    href extracted.

    .. versionadded:: 1.5.0

Attributes
----------
io : str or file-like
    raw HTML, URL, or file-like object

match : regex
    The text to match in the raw HTML

attrs : dict-like
    A dictionary of valid table attributes to use to search for table
    elements.

encoding : str
    Encoding to be used by parser

displayed_only : bool
    Whether or not items with "display:none" should be ignored

extract_links : {None, "all", "header", "body", "footer"}
    Table elements in the specified section(s) with <a> tags will have their
    href extracted.

    .. versionadded:: 1.5.0

Notes
-----
To subclass this class effectively you must override the following methods:
    * :func:`_build_doc`
    * :func:`_attr_getter`
    * :func:`_href_getter`
    * :func:`_text_getter`
    * :func:`_parse_td`
    * :func:`_parse_thead_tr`
    * :func:`_parse_tbody_tr`
    * :func:`_parse_tfoot_tr`
    * :func:`_parse_tables`
    * :func:`_equals_tag`
See each method's respective documentation for details on their
functionality.

---
## _BeautifulSoupHtml5LibFrameParser
```python
from html import _BeautifulSoupHtml5LibFrameParser
```

HTML to DataFrame parser that uses BeautifulSoup under the hood.

See Also
--------
pandas.io.html._HtmlFrameParser
pandas.io.html._LxmlFrameParser

Notes
-----
Documentation strings for this class are in the base class
:class:`pandas.io.html._HtmlFrameParser`.

---
## _build_xpath_expr
```python
from html import _build_xpath_expr
```

Build an xpath expression to simulate bs4's ability to pass in kwargs to
search for attributes when using the lxml parser.

Parameters
----------
attrs : dict
    A dict of HTML attributes. These are NOT checked for validity.

Returns
-------
expr : unicode
    An XPath expression that checks for the given HTML attributes.

---
## _LxmlFrameParser
```python
from html import _LxmlFrameParser
```

HTML to DataFrame parser that uses lxml under the hood.

Warning
-------
This parser can only handle HTTP, FTP, and FILE urls.

See Also
--------
_HtmlFrameParser
_BeautifulSoupLxmlFrameParser

Notes
-----
Documentation strings for this class are in the base class
:class:`_HtmlFrameParser`.

---
## _expand_elements
```python
from html import _expand_elements
```



---
## _data_to_frame
```python
from html import _data_to_frame
```



---
## _parser_dispatch
```python
from html import _parser_dispatch
```

Choose the parser based on the input flavor.

Parameters
----------
flavor : {{"lxml", "html5lib", "bs4"}} or None
    The type of parser to use. This must be a valid backend.

Returns
-------
cls : _HtmlFrameParser subclass
    The parser class based on the requested input flavor.

Raises
------
ValueError
    * If `flavor` is not a valid backend.
ImportError
    * If you do not have the requested `flavor`

---
## _print_as_set
```python
from html import _print_as_set
```



---
## _validate_flavor
```python
from html import _validate_flavor
```



---
## _parse
```python
from html import _parse
```



---
## read_html
```python
from html import read_html
```

Read HTML tables into a ``list`` of ``DataFrame`` objects.

Parameters
----------
io : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a string ``read()`` function.
    The string can represent a URL or the HTML itself. Note that
    lxml only accepts the http, ftp and file url protocols. If you have a
    URL that starts with ``'https'`` you might try removing the ``'s'``.

    .. deprecated:: 2.1.0
        Passing html literal strings is deprecated.
        Wrap literal string/bytes input in ``io.StringIO``/``io.BytesIO`` instead.

match : str or compiled regular expression, optional
    The set of tables containing text matching this regex or string will be
    returned. Unless the HTML is extremely simple you will probably need to
    pass a non-empty string here. Defaults to '.+' (match any non-empty
    string). The default value will return all tables contained on a page.
    This value is converted to a regular expression so that there is
    consistent behavior between Beautiful Soup and lxml.

flavor : {{"lxml", "html5lib", "bs4"}} or list-like, optional
    The parsing engine (or list of parsing engines) to use. 'bs4' and
    'html5lib' are synonymous with each other, they are both there for
    backwards compatibility. The default of ``None`` tries to use ``lxml``
    to parse and if that fails it falls back on ``bs4`` + ``html5lib``.

header : int or list-like, optional
    The row (or list of rows for a :class:`~pandas.MultiIndex`) to use to
    make the columns headers.

index_col : int or list-like, optional
    The column (or list of columns) to use to create the index.

skiprows : int, list-like or slice, optional
    Number of rows to skip after parsing the column integer. 0-based. If a
    sequence of integers or a slice is given, will skip the rows indexed by
    that sequence.  Note that a single element sequence means 'skip the nth
    row' whereas an integer means 'skip n rows'.

attrs : dict, optional
    This is a dictionary of attributes that you can pass to use to identify
    the table in the HTML. These are not checked for validity before being
    passed to lxml or Beautiful Soup. However, these attributes must be
    valid HTML table attributes to work correctly. For example, ::

        attrs = {{'id': 'table'}}

    is a valid attribute dictionary because the 'id' HTML tag attribute is
    a valid HTML attribute for *any* HTML tag as per `this document
    <https://html.spec.whatwg.org/multipage/dom.html#global-attributes>`__. ::

        attrs = {{'asdf': 'table'}}

    is *not* a valid attribute dictionary because 'asdf' is not a valid
    HTML attribute even if it is a valid XML attribute.  Valid HTML 4.01
    table attributes can be found `here
    <http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2>`__. A
    working draft of the HTML 5 spec can be found `here
    <https://html.spec.whatwg.org/multipage/tables.html>`__. It contains the
    latest information on table attributes for the modern web.

parse_dates : bool, optional
    See :func:`~read_csv` for more details.

thousands : str, optional
    Separator to use to parse thousands. Defaults to ``','``.

encoding : str, optional
    The encoding used to decode the web page. Defaults to ``None``.``None``
    preserves the previous encoding behavior, which depends on the
    underlying parser library (e.g., the parser library will try to use
    the encoding provided by the document).

decimal : str, default '.'
    Character to recognize as decimal point (e.g. use ',' for European
    data).

converters : dict, default None
    Dict of functions for converting values in certain columns. Keys can
    either be integers or column labels, values are functions that take one
    input argument, the cell (not column) content, and return the
    transformed content.

na_values : iterable, default None
    Custom NA values.

keep_default_na : bool, default True
    If na_values are specified and keep_default_na is False the default NaN
    values are overridden, otherwise they're appended to.

displayed_only : bool, default True
    Whether elements with "display: none" should be parsed.

extract_links : {{None, "all", "header", "body", "footer"}}
    Table elements in the specified section(s) with <a> tags will have their
    href extracted.

    .. versionadded:: 1.5.0

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

{storage_options}

    .. versionadded:: 2.1.0

Returns
-------
dfs
    A list of DataFrames.

See Also
--------
read_csv : Read a comma-separated values (csv) file into DataFrame.

Notes
-----
Before using this function you should read the :ref:`gotchas about the
HTML parsing libraries <io.html.gotchas>`.

Expect to do some cleanup after you call this function. For example, you
might need to manually assign column names if the column names are
converted to NaN when you pass the `header=0` argument. We try to assume as
little as possible about the structure of the table and push the
idiosyncrasies of the HTML contained in the table to the user.

This function searches for ``<table>`` elements and only for ``<tr>``
and ``<th>`` rows and ``<td>`` elements within each ``<tr>`` or ``<th>``
element in the table. ``<td>`` stands for "table data". This function
attempts to properly handle ``colspan`` and ``rowspan`` attributes.
If the function has a ``<thead>`` argument, it is used to construct
the header, otherwise the function attempts to find the header within
the body (by putting rows with only ``<th>`` elements into the header).

Similar to :func:`~read_csv` the `header` argument is applied
**after** `skiprows` is applied.

This function will *always* return a list of :class:`DataFrame` *or*
it will fail, e.g., it will *not* return an empty list.

Examples
--------
See the :ref:`read_html documentation in the IO section of the docs
<io.read_html>` for some examples of reading in HTML tables.

---
## parse_tables
```python
from html import parse_tables
```

Parse and return all tables from the DOM.

Returns
-------
list of parsed (header, body, footer) tuples from tables.

---
## _attr_getter
```python
from html import _attr_getter
```

Return the attribute value of an individual DOM node.

Parameters
----------
obj : node-like
    A DOM node.

attr : str or unicode
    The attribute, such as "colspan"

Returns
-------
str or unicode
    The attribute value.

---
## _href_getter
```python
from html import _href_getter
```



---
## _text_getter
```python
from html import _text_getter
```



---
## _parse_td
```python
from html import _parse_td
```



---
## _parse_thead_tr
```python
from html import _parse_thead_tr
```



---
## _parse_tbody_tr
```python
from html import _parse_tbody_tr
```



---
## _parse_tfoot_tr
```python
from html import _parse_tfoot_tr
```



---
## _parse_tables
```python
from html import _parse_tables
```



---
## _equals_tag
```python
from html import _equals_tag
```



---
## _build_doc
```python
from html import _build_doc
```

Raises
------
ValueError
    * If a URL that lxml cannot parse is passed.

Exception
    * Any other ``Exception`` thrown. For example, trying to parse a
      URL that is syntactically correct on a machine with no internet
      connection will fail.

See Also
--------
pandas.io.html._HtmlFrameParser._build_doc

---
## _parse_thead_tbody_tfoot
```python
from html import _parse_thead_tbody_tfoot
```

Given a table, return parsed header, body, and foot.

Parameters
----------
table_html : node-like

Returns
-------
tuple of (header, body, footer), each a list of list-of-text rows.

Notes
-----
Header and body are lists-of-lists. Top level list is a list of
rows. Each row is a list of str text.

Logic: Use <thead>, <tbody>, <tfoot> elements to identify
       header, body, and footer, otherwise:
       - Put all rows into body
       - Move rows from top of body to header only if
         all elements inside row are <th>
       - Move rows from bottom of body to footer only if
         all elements inside row are <th>

---
## _expand_colspan_rowspan
```python
from html import _expand_colspan_rowspan
```

Given a list of <tr>s, return a list of text rows.

Parameters
----------
rows : list of node-like
    List of <tr>s
section : the section that the rows belong to (header, body or footer).

Returns
-------
list of list
    Each returned row is a list of str text, or tuple (text, link)
    if extract_links is not None.

Notes
-----
Any cell with ``rowspan`` or ``colspan`` will have its contents copied
to subsequent cells.

---
## _handle_hidden_tables
```python
from html import _handle_hidden_tables
```

Return list of tables, potentially removing hidden elements

Parameters
----------
tbl_list : list of node-like
    Type of list elements will vary depending upon parser used
attr_name : str
    Name of the accessor for retrieving HTML attributes

Returns
-------
list of node-like
    Return type matches `tbl_list`

---
## _setup_build_doc
```python
from html import _setup_build_doc
```



---
## row_is_all_th
```python
from html import row_is_all_th
```



---
## _XMLFrameParser
```python
from xml import _XMLFrameParser
```

Internal subclass to parse XML into DataFrames.

Parameters
----------
path_or_buffer : a valid JSON ``str``, path object or file-like object
    Any valid string path is acceptable. The string could be a URL. Valid
    URL schemes include http, ftp, s3, and file.

xpath : str or regex
    The ``XPath`` expression to parse required set of nodes for
    migration to :class:`~pandas.DataFrame`. ``etree`` supports limited ``XPath``.

namespaces : dict
    The namespaces defined in XML document (``xmlns:namespace='URI'``)
    as dicts with key being namespace and value the URI.

elems_only : bool
    Parse only the child elements at the specified ``xpath``.

attrs_only : bool
    Parse only the attributes at the specified ``xpath``.

names : list
    Column names for :class:`~pandas.DataFrame` of parsed XML data.

dtype : dict
    Data type for data or columns. E.g. {{'a': np.float64,
    'b': np.int32, 'c': 'Int64'}}

    .. versionadded:: 1.5.0

converters : dict, optional
    Dict of functions for converting values in certain columns. Keys can
    either be integers or column labels.

    .. versionadded:: 1.5.0

parse_dates : bool or list of int or names or list of lists or dict
    Converts either index or select columns to datetimes

    .. versionadded:: 1.5.0

encoding : str
    Encoding of xml object or document.

stylesheet : str or file-like
    URL, file, file-like object, or a raw string containing XSLT,
    ``etree`` does not support XSLT but retained for consistency.

iterparse : dict, optional
    Dict with row element as key and list of descendant elements
    and/or attributes as value to be retrieved in iterparsing of
    XML document.

    .. versionadded:: 1.5.0

{decompression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

See also
--------
pandas.io.xml._EtreeFrameParser
pandas.io.xml._LxmlFrameParser

Notes
-----
To subclass this class effectively you must override the following methods:`
    * :func:`parse_data`
    * :func:`_parse_nodes`
    * :func:`_iterparse_nodes`
    * :func:`_parse_doc`
    * :func:`_validate_names`
    * :func:`_validate_path`


See each method's respective documentation for details on their
functionality.

---
## _EtreeFrameParser
```python
from xml import _EtreeFrameParser
```

Internal class to parse XML into DataFrames with the Python
standard library XML module: `xml.etree.ElementTree`.

---
## _LxmlFrameParser
```python
from xml import _LxmlFrameParser
```

Internal class to parse XML into :class:`~pandas.DataFrame` with third-party
full-featured XML library, ``lxml``, that supports
``XPath`` 1.0 and XSLT 1.0.

---
## get_data_from_filepath
```python
from xml import get_data_from_filepath
```

Extract raw XML data.

The method accepts three input types:
    1. filepath (string-like)
    2. file-like object (e.g. open file object, StringIO)
    3. XML string or bytes

This method turns (1) into (2) to simplify the rest of the processing.
It returns input types (2) and (3) unchanged.

---
## preprocess_data
```python
from xml import preprocess_data
```

Convert extracted raw data.

This method will return underlying data of extracted XML content.
The data either has a `read` attribute (e.g. a file object or a
StringIO/BytesIO) or is a string or bytes that is an XML document.

---
## _data_to_frame
```python
from xml import _data_to_frame
```

Convert parsed data to Data Frame.

This method will bind xml dictionary data of keys and values
into named columns of Data Frame using the built-in TextParser
class that build Data Frame and infers specific dtypes.

---
## _parse
```python
from xml import _parse
```

Call internal parsers.

This method will conditionally call internal parsers:
LxmlFrameParser and/or EtreeParser.

Raises
------
ImportError
    * If lxml is not installed if selected as parser.

ValueError
    * If parser is not lxml or etree.

---
## read_xml
```python
from xml import read_xml
```

Read XML document into a :class:`~pandas.DataFrame` object.

.. versionadded:: 1.3.0

Parameters
----------
path_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a ``read()`` function. The string can be any valid XML
    string or a path. The string can further be a URL. Valid URL schemes
    include http, ftp, s3, and file.

    .. deprecated:: 2.1.0
        Passing xml literal strings is deprecated.
        Wrap literal xml input in ``io.StringIO`` or ``io.BytesIO`` instead.

xpath : str, optional, default './\*'
    The ``XPath`` to parse required set of nodes for migration to
    :class:`~pandas.DataFrame`.``XPath`` should return a collection of elements
    and not a single element. Note: The ``etree`` parser supports limited ``XPath``
    expressions. For more complex ``XPath``, use ``lxml`` which requires
    installation.

namespaces : dict, optional
    The namespaces defined in XML document as dicts with key being
    namespace prefix and value the URI. There is no need to include all
    namespaces in XML, only the ones used in ``xpath`` expression.
    Note: if XML document uses default namespace denoted as
    `xmlns='<URI>'` without a prefix, you must assign any temporary
    namespace prefix such as 'doc' to the URI in order to parse
    underlying nodes and/or attributes. For example, ::

        namespaces = {{"doc": "https://example.com"}}

elems_only : bool, optional, default False
    Parse only the child elements at the specified ``xpath``. By default,
    all child elements and non-empty text nodes are returned.

attrs_only :  bool, optional, default False
    Parse only the attributes at the specified ``xpath``.
    By default, all attributes are returned.

names :  list-like, optional
    Column names for DataFrame of parsed XML data. Use this parameter to
    rename original element names and distinguish same named elements and
    attributes.

dtype : Type name or dict of column -> type, optional
    Data type for data or columns. E.g. {{'a': np.float64, 'b': np.int32,
    'c': 'Int64'}}
    Use `str` or `object` together with suitable `na_values` settings
    to preserve and not interpret dtype.
    If converters are specified, they will be applied INSTEAD
    of dtype conversion.

    .. versionadded:: 1.5.0

converters : dict, optional
    Dict of functions for converting values in certain columns. Keys can either
    be integers or column labels.

    .. versionadded:: 1.5.0

parse_dates : bool or list of int or names or list of lists or dict, default False
    Identifiers to parse index or columns to datetime. The behavior is as follows:

    * boolean. If True -> try parsing the index.
    * list of int or names. e.g. If [1, 2, 3] -> try parsing columns 1, 2, 3
      each as a separate date column.
    * list of lists. e.g.  If [[1, 3]] -> combine columns 1 and 3 and parse as
      a single date column.
    * dict, e.g. {{'foo' : [1, 3]}} -> parse columns 1, 3 as date and call
      result 'foo'

    .. versionadded:: 1.5.0

encoding : str, optional, default 'utf-8'
    Encoding of XML document.

parser : {{'lxml','etree'}}, default 'lxml'
    Parser module to use for retrieval of data. Only 'lxml' and
    'etree' are supported. With 'lxml' more complex ``XPath`` searches
    and ability to use XSLT stylesheet are supported.

stylesheet : str, path object or file-like object
    A URL, file-like object, or a raw string containing an XSLT script.
    This stylesheet should flatten complex, deeply nested XML documents
    for easier parsing. To use this feature you must have ``lxml`` module
    installed and specify 'lxml' as ``parser``. The ``xpath`` must
    reference nodes of transformed XML document generated after XSLT
    transformation and not the original XML document. Only XSLT 1.0
    scripts and not later versions is currently supported.

iterparse : dict, optional
    The nodes or attributes to retrieve in iterparsing of XML document
    as a dict with key being the name of repeating element and value being
    list of elements or attribute names that are descendants of the repeated
    element. Note: If this option is used, it will replace ``xpath`` parsing
    and unlike ``xpath``, descendants do not need to relate to each other but can
    exist any where in document under the repeating element. This memory-
    efficient method should be used for very large XML files (500MB, 1GB, or 5GB+).
    For example, ::

        iterparse = {{"row_element": ["child_elem", "attr", "grandchild_elem"]}}

    .. versionadded:: 1.5.0

{decompression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
df
    A DataFrame.

See Also
--------
read_json : Convert a JSON string to pandas object.
read_html : Read HTML tables into a list of DataFrame objects.

Notes
-----
This method is best designed to import shallow XML documents in
following format which is the ideal fit for the two-dimensions of a
``DataFrame`` (row by column). ::

        <root>
            <row>
              <column1>data</column1>
              <column2>data</column2>
              <column3>data</column3>
              ...
           </row>
           <row>
              ...
           </row>
           ...
        </root>

As a file format, XML documents can be designed any way including
layout of elements and attributes as long as it conforms to W3C
specifications. Therefore, this method is a convenience handler for
a specific flatter design and not all possible XML structures.

However, for more complex XML documents, ``stylesheet`` allows you to
temporarily redesign original document with XSLT (a special purpose
language) for a flatter version for migration to a DataFrame.

This function will *always* return a single :class:`DataFrame` or raise
exceptions due to issues with XML document, ``xpath``, or other
parameters.

See the :ref:`read_xml documentation in the IO section of the docs
<io.read_xml>` for more information in using this method to parse XML
files to DataFrames.

Examples
--------
>>> from io import StringIO
>>> xml = '''<?xml version='1.0' encoding='utf-8'?>
... <data xmlns="http://example.com">
...  <row>
...    <shape>square</shape>
...    <degrees>360</degrees>
...    <sides>4.0</sides>
...  </row>
...  <row>
...    <shape>circle</shape>
...    <degrees>360</degrees>
...    <sides/>
...  </row>
...  <row>
...    <shape>triangle</shape>
...    <degrees>180</degrees>
...    <sides>3.0</sides>
...  </row>
... </data>'''

>>> df = pd.read_xml(StringIO(xml))
>>> df
      shape  degrees  sides
0    square      360    4.0
1    circle      360    NaN
2  triangle      180    3.0

>>> xml = '''<?xml version='1.0' encoding='utf-8'?>
... <data>
...   <row shape="square" degrees="360" sides="4.0"/>
...   <row shape="circle" degrees="360"/>
...   <row shape="triangle" degrees="180" sides="3.0"/>
... </data>'''

>>> df = pd.read_xml(StringIO(xml), xpath=".//row")
>>> df
      shape  degrees  sides
0    square      360    4.0
1    circle      360    NaN
2  triangle      180    3.0

>>> xml = '''<?xml version='1.0' encoding='utf-8'?>
... <doc:data xmlns:doc="https://example.com">
...   <doc:row>
...     <doc:shape>square</doc:shape>
...     <doc:degrees>360</doc:degrees>
...     <doc:sides>4.0</doc:sides>
...   </doc:row>
...   <doc:row>
...     <doc:shape>circle</doc:shape>
...     <doc:degrees>360</doc:degrees>
...     <doc:sides/>
...   </doc:row>
...   <doc:row>
...     <doc:shape>triangle</doc:shape>
...     <doc:degrees>180</doc:degrees>
...     <doc:sides>3.0</doc:sides>
...   </doc:row>
... </doc:data>'''

>>> df = pd.read_xml(StringIO(xml),
...                  xpath="//doc:row",
...                  namespaces={{"doc": "https://example.com"}})
>>> df
      shape  degrees  sides
0    square      360    4.0
1    circle      360    NaN
2  triangle      180    3.0

>>> xml_data = '''
...         <data>
...            <row>
...               <index>0</index>
...               <a>1</a>
...               <b>2.5</b>
...               <c>True</c>
...               <d>a</d>
...               <e>2019-12-31 00:00:00</e>
...            </row>
...            <row>
...               <index>1</index>
...               <b>4.5</b>
...               <c>False</c>
...               <d>b</d>
...               <e>2019-12-31 00:00:00</e>
...            </row>
...         </data>
...         '''

>>> df = pd.read_xml(StringIO(xml_data),
...                  dtype_backend="numpy_nullable",
...                  parse_dates=["e"])
>>> df
   index     a    b      c  d          e
0      0     1  2.5   True  a 2019-12-31
1      1  <NA>  4.5  False  b 2019-12-31

---
## parse_data
```python
from xml import parse_data
```

Parse xml data.

This method will call the other internal methods to
validate ``xpath``, names, optionally parse and run XSLT,
and parse original or transformed XML and return specific nodes.

---
## _parse_nodes
```python
from xml import _parse_nodes
```

Parse xml nodes.

This method will parse the children and attributes of elements
in ``xpath``, conditionally for only elements, only attributes
or both while optionally renaming node names.

Raises
------
ValueError
    * If only elements and only attributes are specified.

Notes
-----
Namespace URIs will be removed from return node values. Also,
elements with missing children or attributes compared to siblings
will have optional keys filled with None values.

---
## _iterparse_nodes
```python
from xml import _iterparse_nodes
```

Iterparse xml nodes.

This method will read in local disk, decompressed XML files for elements
and underlying descendants using iterparse, a method to iterate through
an XML tree without holding entire XML tree in memory.

Raises
------
TypeError
    * If ``iterparse`` is not a dict or its dict value is not list-like.
ParserError
    * If ``path_or_buffer`` is not a physical file on disk or file-like object.
    * If no data is returned from selected items in ``iterparse``.

Notes
-----
Namespace URIs will be removed from return node values. Also,
elements with missing children or attributes in submitted list
will have optional keys filled with None values.

---
## _validate_path
```python
from xml import _validate_path
```



---
## _validate_names
```python
from xml import _validate_names
```



---
## _parse_doc
```python
from xml import _parse_doc
```



---
## _transform_doc
```python
from xml import _transform_doc
```

Parse stylesheet from file or buffer and run it.

This method will parse stylesheet object into tree for parsing
conditionally by its specific object type, then transforms
original tree with XSLT script.

---
## __name__
```python
from clipboards import __name__
```

io on the clipboard 

---
## read_clipboard
```python
from clipboards import read_clipboard
```

Read text from clipboard and pass to :func:`~pandas.read_csv`.

Parses clipboard contents similar to how CSV files are parsed
using :func:`~pandas.read_csv`.

Parameters
----------
sep : str, default '\\s+'
    A string or regex delimiter. The default of ``'\\s+'`` denotes
    one or more whitespace characters.

dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

**kwargs
    See :func:`~pandas.read_csv` for the full argument list.

Returns
-------
DataFrame
    A parsed :class:`~pandas.DataFrame` object.

See Also
--------
DataFrame.to_clipboard : Copy object to the system clipboard.
read_csv : Read a comma-separated values (csv) file into DataFrame.
read_fwf : Read a table of fixed-width formatted lines into DataFrame.

Examples
--------
>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C'])
>>> df.to_clipboard()  # doctest: +SKIP
>>> pd.read_clipboard()  # doctest: +SKIP
     A  B  C
0    1  2  3
1    4  5  6

---
## to_clipboard
```python
from clipboards import to_clipboard
```

Attempt to write text representation of object to the system clipboard
The clipboard can be then pasted into Excel for example.

Parameters
----------
obj : the object to write to the clipboard
excel : bool, defaults to True
        if True, use the provided separator, writing in a csv
        format for allowing easy pasting into excel.
        if False, write a string representation of the object
        to the clipboard
sep : optional, defaults to tab
other keywords are passed to to_csv

Notes
-----
Requirements for your platform
  - Linux: xclip, or xsel (with PyQt4 modules)
  - Windows:
  - OS X:

---
## IOArgs
```python
from common import IOArgs
```

Return value of io/common.py:_get_filepath_or_buffer.

---
## IOHandles
```python
from common import IOHandles
```

Return value of io/common.py:get_handle

Can be used as a context manager.

This is used to easily close created buffers and to handle corner cases when
TextIOWrapper is inserted.

handle: The file handle to be used.
created_handles: All file handles that are created by get_handle
is_wrapped: Whether a TextIOWrapper needs to be detached.

---
## is_url
```python
from common import is_url
```

Check to see if a URL has a valid protocol.

Parameters
----------
url : str or unicode

Returns
-------
isurl : bool
    If `url` has a valid protocol return True otherwise False.

---
## _expand_user
```python
from common import _expand_user
```

Return the argument with an initial component of ~ or ~user
replaced by that user's home directory.

Parameters
----------
filepath_or_buffer : object to be converted if possible

Returns
-------
expanded_filepath_or_buffer : an expanded filepath or the
                              input if not expandable

---
## validate_header_arg
```python
from common import validate_header_arg
```



---
## stringify_path
```python
from common import stringify_path
```

Attempt to convert a path-like object to a string.

Parameters
----------
filepath_or_buffer : object to be converted

Returns
-------
str_filepath_or_buffer : maybe a string version of the object

Notes
-----
Objects supporting the fspath protocol are coerced
according to its __fspath__ method.

Any other object is passed through unchanged, which includes bytes,
strings, buffers, or anything else that's not even path-like.

---
## urlopen
```python
from common import urlopen
```

Lazy-import wrapper for stdlib urlopen, as that imports a big chunk of
the stdlib.

---
## is_fsspec_url
```python
from common import is_fsspec_url
```

Returns true if the given URL looks like
something fsspec can handle

---
## _get_filepath_or_buffer
```python
from common import _get_filepath_or_buffer
```

If the filepath_or_buffer is a url, translate and return the buffer.
Otherwise passthrough.

Parameters
----------
filepath_or_buffer : a url, filepath (str, py.path.local or pathlib.Path),
                     or buffer
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

encoding : the encoding to use to decode bytes, default is 'utf-8'
mode : str, optional

{storage_options}


Returns the dataclass IOArgs.

---
## file_path_to_url
```python
from common import file_path_to_url
```

converts an absolute native path to a FILE URL.

Parameters
----------
path : a path in native format

Returns
-------
a valid FILE URL

---
## get_compression_method
```python
from common import get_compression_method
```

Simplifies a compression argument to a compression method string and
a mapping containing additional arguments.

Parameters
----------
compression : str or mapping
    If string, specifies the compression method. If mapping, value at key
    'method' specifies compression method.

Returns
-------
tuple of ({compression method}, Optional[str]
          {compression arguments}, Dict[str, Any])

Raises
------
ValueError on mapping missing 'method' key

---
## infer_compression
```python
from common import infer_compression
```

Get the compression method for filepath_or_buffer. If compression='infer',
the inferred compression method is returned. Otherwise, the input
compression method is returned unchanged, unless it's invalid, in which
case an error is raised.

Parameters
----------
filepath_or_buffer : str or file handle
    File path or object.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

Returns
-------
string or None

Raises
------
ValueError on invalid compression specified.

---
## check_parent_directory
```python
from common import check_parent_directory
```

Check if parent directory of a file exists, raise OSError if it does not

Parameters
----------
path: Path or str
    Path to check parent directory of

---
## get_handle
```python
from common import get_handle
```

Get file handle for given path/buffer and mode.

Parameters
----------
path_or_buf : str or file handle
    File path or object.
mode : str
    Mode to open path_or_buf with.
encoding : str or None
    Encoding to use.
{compression_options}

       May be a dict with key 'method' as compression mode
       and other keys as compression options if compression
       mode is 'zip'.

       Passing compression options as keys in dict is
       supported for compression modes 'gzip', 'bz2', 'zstd' and 'zip'.

    .. versionchanged:: 1.4.0 Zstandard support.

memory_map : bool, default False
    See parsers._parser_params for more information. Only used by read_csv.
is_text : bool, default True
    Whether the type of the content passed to the file/buffer is string or
    bytes. This is not the same as `"b" not in mode`. If a string content is
    passed to a binary file/buffer, a wrapper is inserted.
errors : str, default 'strict'
    Specifies how encoding and decoding errors are to be handled.
    See the errors argument for :func:`open` for a full list
    of options.
storage_options: StorageOptions = None
    Passed to _get_filepath_or_buffer

Returns the dataclass IOHandles

---
## _BufferedWriter
```python
from common import _BufferedWriter
```

Some objects do not support multiple .write() calls (TarFile and ZipFile).
This wrapper writes to the underlying buffer on close.

---
## _BytesTarFile
```python
from common import _BytesTarFile
```



---
## _BytesZipFile
```python
from common import _BytesZipFile
```



---
## _IOWrapper
```python
from common import _IOWrapper
```



---
## _BytesIOWrapper
```python
from common import _BytesIOWrapper
```



---
## _maybe_memory_map
```python
from common import _maybe_memory_map
```

Try to memory map file/buffer.

---
## file_exists
```python
from common import file_exists
```

Test whether file exists.

---
## _is_binary_mode
```python
from common import _is_binary_mode
```

Whether the handle is opened in binary mode

---
## _get_binary_io_classes
```python
from common import _get_binary_io_classes
```

IO classes that that expect bytes

---
## is_potential_multi_index
```python
from common import is_potential_multi_index
```

Check whether or not the `columns` parameter
could be converted into a MultiIndex.

Parameters
----------
columns : array-like
    Object which may or may not be convertible into a MultiIndex
index_col : None, bool or list, optional
    Column or columns to use as the (possibly hierarchical) index

Returns
-------
bool : Whether or not columns could become a MultiIndex

---
## dedup_names
```python
from common import dedup_names
```

Rename column names if duplicates exist.

Currently the renaming is done by appending a period and an autonumeric,
but a custom pattern may be supported in the future.

Examples
--------
>>> dedup_names(["x", "y", "x", "x"], is_potential_multiindex=False)
['x', 'y', 'x.1', 'x.2']

---
## close
```python
from common import close
```



---
## __enter__
```python
from common import __enter__
```



---
## __exit__
```python
from common import __exit__
```



---
## write_to_buffer
```python
from common import write_to_buffer
```



---
## extend_mode
```python
from common import extend_mode
```



---
## infer_filename
```python
from common import infer_filename
```

If an explicit archive_name is not given, we still want the file inside the zip
file not to be named something.zip, because that causes confusion (GH39465).

---
## __getattr__
```python
from common import __getattr__
```



---
## readable
```python
from common import readable
```



---
## seekable
```python
from common import seekable
```



---
## writable
```python
from common import writable
```



---
## read
```python
from common import read
```



---
## _arrow_dtype_mapping
```python
from _util import _arrow_dtype_mapping
```



---
## arrow_string_types_mapper
```python
from _util import arrow_string_types_mapper
```



---
## to_pickle
```python
from pickle import to_pickle
```

Pickle (serialize) object to file.

Parameters
----------
obj : any object
    Any python object.
filepath_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``write()`` function.
    Also accepts URL. URL has to be of S3 or GCS.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

protocol : int
    Int which indicates which protocol should be used by the pickler,
    default HIGHEST_PROTOCOL (see [1], paragraph 12.1.2). The possible
    values for this parameter depend on the version of Python. For Python
    2.x, possible values are 0, 1, 2. For Python>=3.0, 3 is a valid value.
    For Python >= 3.4, 4 is a valid value. A negative value for the
    protocol parameter is equivalent to setting its value to
    HIGHEST_PROTOCOL.

{storage_options}

    .. [1] https://docs.python.org/3/library/pickle.html

See Also
--------
read_pickle : Load pickled pandas object (or any object) from file.
DataFrame.to_hdf : Write DataFrame to an HDF5 file.
DataFrame.to_sql : Write DataFrame to a SQL database.
DataFrame.to_parquet : Write a DataFrame to the binary parquet format.

Examples
--------
>>> original_df = pd.DataFrame({{"foo": range(5), "bar": range(5, 10)}})  # doctest: +SKIP
>>> original_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> pd.to_pickle(original_df, "./dummy.pkl")  # doctest: +SKIP

>>> unpickled_df = pd.read_pickle("./dummy.pkl")  # doctest: +SKIP
>>> unpickled_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9

---
## read_pickle
```python
from pickle import read_pickle
```

Load pickled pandas object (or any object) from file.

.. warning::

   Loading pickled data received from untrusted sources can be
   unsafe. See `here <https://docs.python.org/3/library/pickle.html>`__.

Parameters
----------
filepath_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``readlines()`` function.
    Also accepts URL. URL is not limited to S3 and GCS.

{decompression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

Returns
-------
same type as object stored in file

See Also
--------
DataFrame.to_pickle : Pickle (serialize) DataFrame object to file.
Series.to_pickle : Pickle (serialize) Series object to file.
read_hdf : Read HDF5 file into a DataFrame.
read_sql : Read SQL query or database table into a DataFrame.
read_parquet : Load a parquet object, returning a DataFrame.

Notes
-----
read_pickle is only guaranteed to be backwards compatible to pandas 0.20.3
provided the object was serialized with to_pickle.

Examples
--------
>>> original_df = pd.DataFrame(
...     {{"foo": range(5), "bar": range(5, 10)}}
...    )  # doctest: +SKIP
>>> original_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9
>>> pd.to_pickle(original_df, "./dummy.pkl")  # doctest: +SKIP

>>> unpickled_df = pd.read_pickle("./dummy.pkl")  # doctest: +SKIP
>>> unpickled_df  # doctest: +SKIP
   foo  bar
0    0    5
1    1    6
2    2    7
3    3    8
4    4    9

---
## _process_parse_dates_argument
```python
from sql import _process_parse_dates_argument
```

Process parse_dates argument for read_sql functions

---
## _handle_date_column
```python
from sql import _handle_date_column
```



---
## _parse_date_columns
```python
from sql import _parse_date_columns
```

Force non-datetime columns to be read as such.
Supports both string formatted and integer timestamp columns.

---
## _convert_arrays_to_dataframe
```python
from sql import _convert_arrays_to_dataframe
```



---
## _wrap_result
```python
from sql import _wrap_result
```

Wrap result set of a SQLAlchemy query in a DataFrame.

---
## _wrap_result_adbc
```python
from sql import _wrap_result_adbc
```

Wrap result set of a SQLAlchemy query in a DataFrame.

---
## execute
```python
from sql import execute
```



---
## read_sql_table
```python
from sql import read_sql_table
```

Read SQL database table into a DataFrame.

Given a table name and a SQLAlchemy connectable, returns a DataFrame.
This function does not support DBAPI connections.

Parameters
----------
table_name : str
    Name of SQL table in database.
con : SQLAlchemy connectable or str
    A database URI could be provided as str.
    SQLite DBAPI connection mode not supported.
schema : str, default None
    Name of SQL schema in database to query (if database flavor
    supports this). Uses default schema if None (default).
index_col : str or list of str, optional, default: None
    Column(s) to set as index(MultiIndex).
coerce_float : bool, default True
    Attempts to convert values of non-string, non-numeric objects (like
    decimal.Decimal) to floating point. Can result in loss of Precision.
parse_dates : list or dict, default None
    - List of column names to parse as dates.
    - Dict of ``{column_name: format string}`` where format string is
      strftime compatible in case of parsing string times or is one of
      (D, s, ns, ms, us) in case of parsing integer timestamps.
    - Dict of ``{column_name: arg dict}``, where the arg dict corresponds
      to the keyword arguments of :func:`pandas.to_datetime`
      Especially useful with databases without native Datetime support,
      such as SQLite.
columns : list, default None
    List of column names to select from SQL table.
chunksize : int, default None
    If specified, returns an iterator where `chunksize` is the number of
    rows to include in each chunk.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
DataFrame or Iterator[DataFrame]
    A SQL table is returned as two-dimensional data structure with labeled
    axes.

See Also
--------
read_sql_query : Read SQL query into a DataFrame.
read_sql : Read SQL query or database table into a DataFrame.

Notes
-----
Any datetime values with time zone information will be converted to UTC.

Examples
--------
>>> pd.read_sql_table('table_name', 'postgres:///db_name')  # doctest:+SKIP

---
## read_sql_query
```python
from sql import read_sql_query
```

Read SQL query into a DataFrame.

Returns a DataFrame corresponding to the result set of the query
string. Optionally provide an `index_col` parameter to use one of the
columns as the index, otherwise default integer index will be used.

Parameters
----------
sql : str SQL query or SQLAlchemy Selectable (select or text object)
    SQL query to be executed.
con : SQLAlchemy connectable, str, or sqlite3 connection
    Using SQLAlchemy makes it possible to use any DB supported by that
    library. If a DBAPI2 object, only sqlite3 is supported.
index_col : str or list of str, optional, default: None
    Column(s) to set as index(MultiIndex).
coerce_float : bool, default True
    Attempts to convert values of non-string, non-numeric objects (like
    decimal.Decimal) to floating point. Useful for SQL result sets.
params : list, tuple or mapping, optional, default: None
    List of parameters to pass to execute method.  The syntax used
    to pass parameters is database driver dependent. Check your
    database driver documentation for which of the five syntax styles,
    described in PEP 249's paramstyle, is supported.
    Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}.
parse_dates : list or dict, default: None
    - List of column names to parse as dates.
    - Dict of ``{column_name: format string}`` where format string is
      strftime compatible in case of parsing string times, or is one of
      (D, s, ns, ms, us) in case of parsing integer timestamps.
    - Dict of ``{column_name: arg dict}``, where the arg dict corresponds
      to the keyword arguments of :func:`pandas.to_datetime`
      Especially useful with databases without native Datetime support,
      such as SQLite.
chunksize : int, default None
    If specified, return an iterator where `chunksize` is the number of
    rows to include in each chunk.
dtype : Type name or dict of columns
    Data type for data or columns. E.g. np.float64 or
    {'a': np.float64, 'b': np.int32, 'c': 'Int64'}.

    .. versionadded:: 1.3.0
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
DataFrame or Iterator[DataFrame]

See Also
--------
read_sql_table : Read SQL database table into a DataFrame.
read_sql : Read SQL query or database table into a DataFrame.

Notes
-----
Any datetime values with time zone information parsed via the `parse_dates`
parameter will be converted to UTC.

Examples
--------
>>> from sqlalchemy import create_engine  # doctest: +SKIP
>>> engine = create_engine("sqlite:///database.db")  # doctest: +SKIP
>>> with engine.connect() as conn, conn.begin():  # doctest: +SKIP
...     data = pd.read_sql_table("data", conn)  # doctest: +SKIP

---
## read_sql
```python
from sql import read_sql
```

Read SQL query or database table into a DataFrame.

This function is a convenience wrapper around ``read_sql_table`` and
``read_sql_query`` (for backward compatibility). It will delegate
to the specific function depending on the provided input. A SQL query
will be routed to ``read_sql_query``, while a database table name will
be routed to ``read_sql_table``. Note that the delegated function might
have more specific notes about their functionality not listed here.

Parameters
----------
sql : str or SQLAlchemy Selectable (select or text object)
    SQL query to be executed or a table name.
con : ADBC Connection, SQLAlchemy connectable, str, or sqlite3 connection
    ADBC provides high performance I/O with native type support, where available.
    Using SQLAlchemy makes it possible to use any DB supported by that
    library. If a DBAPI2 object, only sqlite3 is supported. The user is responsible
    for engine disposal and connection closure for the ADBC connection and
    SQLAlchemy connectable; str connections are closed automatically. See
    `here <https://docs.sqlalchemy.org/en/20/core/connections.html>`_.
index_col : str or list of str, optional, default: None
    Column(s) to set as index(MultiIndex).
coerce_float : bool, default True
    Attempts to convert values of non-string, non-numeric objects (like
    decimal.Decimal) to floating point, useful for SQL result sets.
params : list, tuple or dict, optional, default: None
    List of parameters to pass to execute method.  The syntax used
    to pass parameters is database driver dependent. Check your
    database driver documentation for which of the five syntax styles,
    described in PEP 249's paramstyle, is supported.
    Eg. for psycopg2, uses %(name)s so use params={'name' : 'value'}.
parse_dates : list or dict, default: None
    - List of column names to parse as dates.
    - Dict of ``{column_name: format string}`` where format string is
      strftime compatible in case of parsing string times, or is one of
      (D, s, ns, ms, us) in case of parsing integer timestamps.
    - Dict of ``{column_name: arg dict}``, where the arg dict corresponds
      to the keyword arguments of :func:`pandas.to_datetime`
      Especially useful with databases without native Datetime support,
      such as SQLite.
columns : list, default: None
    List of column names to select from SQL table (only used when reading
    a table).
chunksize : int, default None
    If specified, return an iterator where `chunksize` is the
    number of rows to include in each chunk.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0
dtype : Type name or dict of columns
    Data type for data or columns. E.g. np.float64 or
    {'a': np.float64, 'b': np.int32, 'c': 'Int64'}.
    The argument is ignored if a table is passed instead of a query.

    .. versionadded:: 2.0.0

Returns
-------
DataFrame or Iterator[DataFrame]

See Also
--------
read_sql_table : Read SQL database table into a DataFrame.
read_sql_query : Read SQL query into a DataFrame.

Examples
--------
Read data from SQL via either a SQL query or a SQL tablename.
When using a SQLite database only SQL queries are accepted,
providing only the SQL tablename will result in an error.

>>> from sqlite3 import connect
>>> conn = connect(':memory:')
>>> df = pd.DataFrame(data=[[0, '10/11/12'], [1, '12/11/10']],
...                   columns=['int_column', 'date_column'])
>>> df.to_sql(name='test_data', con=conn)
2

>>> pd.read_sql('SELECT int_column, date_column FROM test_data', conn)
   int_column date_column
0           0    10/11/12
1           1    12/11/10

>>> pd.read_sql('test_data', 'postgres:///db_name')  # doctest:+SKIP

Apply date parsing to columns through the ``parse_dates`` argument
The ``parse_dates`` argument calls ``pd.to_datetime`` on the provided columns.
Custom argument values for applying ``pd.to_datetime`` on a column are specified
via a dictionary format:

>>> pd.read_sql('SELECT int_column, date_column FROM test_data',
...             conn,
...             parse_dates={"date_column": {"format": "%d/%m/%y"}})
   int_column date_column
0           0  2012-11-10
1           1  2010-11-12

.. versionadded:: 2.2.0

   pandas now supports reading via ADBC drivers

>>> from adbc_driver_postgresql import dbapi  # doctest:+SKIP
>>> with dbapi.connect('postgres:///db_name') as conn:  # doctest:+SKIP
...     pd.read_sql('SELECT int_column FROM test_data', conn)
   int_column
0           0
1           1

---
## to_sql
```python
from sql import to_sql
```

Write records stored in a DataFrame to a SQL database.

Parameters
----------
frame: DataFrame
name: string
    Name of SQL table.
if_exists: {'fail', 'replace', 'append'}, default 'fail'
    fail: If table exists, do nothing.
    replace: If table exists, drop it, recreate it, and insert data.
    append: If table exists, insert data. Create if it does not exist.
index : bool, default True
    Write DataFrame index as a column
index_label : string or sequence, default None
    Column label for index column(s). If None is given (default) and
    `index` is True, then the index names are used.
    A sequence should be given if the DataFrame uses MultiIndex.
schema : string, default None
    Ignored parameter included for compatibility with SQLAlchemy
    version of ``to_sql``.
chunksize : int, default None
    If not None, then rows will be written in batches of this
    size at a time. If None, all rows will be written at once.
dtype : single type or dict of column name to SQL type, default None
    Optional specifying the datatype for columns. The SQL type should
    be a string. If all columns are of the same type, one single value
    can be used.
method : {None, 'multi', callable}, default None
    Controls the SQL insertion clause used:

    * None : Uses standard SQL ``INSERT`` clause (one per row).
    * 'multi': Pass multiple values in a single ``INSERT`` clause.
    * callable with signature ``(pd_table, conn, keys, data_iter)``.

    Details and a sample callable implementation can be found in the
    section :ref:`insert method <io.sql.method>`.

---
## has_table
```python
from sql import has_table
```



---
## pandasSQL_builder
```python
from sql import pandasSQL_builder
```

Convenience function to return the correct PandasSQL subclass based on the
provided parameters.  Also creates a sqlalchemy connection and transaction
if necessary.

---
## SQLTable
```python
from sql import SQLTable
```

For mapping Pandas tables to SQL tables.
Uses fact that table is reflected by SQLAlchemy to
do better type conversions.
Also holds various flags needed to avoid having to
pass them between functions all the time.

---
## PandasSQL
```python
from sql import PandasSQL
```

Subclasses Should define read_query and to_sql.

---
## BaseEngine
```python
from sql import BaseEngine
```



---
## SQLAlchemyEngine
```python
from sql import SQLAlchemyEngine
```



---
## get_engine
```python
from sql import get_engine
```

return our implementation

---
## SQLDatabase
```python
from sql import SQLDatabase
```

This class enables conversion between DataFrame and SQL databases
using SQLAlchemy to handle DataBase abstraction.

Parameters
----------
con : SQLAlchemy Connectable or URI string.
    Connectable to connect with the database. Using SQLAlchemy makes it
    possible to use any DB supported by that library.
schema : string, default None
    Name of SQL schema in database to write to (if database flavor
    supports this). If None, use default schema (default).
need_transaction : bool, default False
    If True, SQLDatabase will create a transaction.

---
## ADBCDatabase
```python
from sql import ADBCDatabase
```

This class enables conversion between DataFrame and SQL databases
using ADBC to handle DataBase abstraction.

Parameters
----------
con : adbc_driver_manager.dbapi.Connection

---
## _get_unicode_name
```python
from sql import _get_unicode_name
```



---
## _get_valid_sqlite_name
```python
from sql import _get_valid_sqlite_name
```



---
## SQLiteTable
```python
from sql import SQLiteTable
```

Patch the SQLTable for fallback support.
Instead of a table variable just use the Create Table statement.

---
## SQLiteDatabase
```python
from sql import SQLiteDatabase
```

Version of SQLDatabase to support SQLite connections (fallback without
SQLAlchemy). This should only be used internally.

Parameters
----------
con : sqlite connection object

---
## get_schema
```python
from sql import get_schema
```

Get the SQL db table schema for the given frame.

Parameters
----------
frame : DataFrame
name : str
    name of SQL table
keys : string or sequence, default: None
    columns to use a primary key
con: ADBC Connection, SQLAlchemy connectable, sqlite3 connection, default: None
    ADBC provides high performance I/O with native type support, where available.
    Using SQLAlchemy makes it possible to use any DB supported by that
    library
    If a DBAPI2 object, only sqlite3 is supported.
dtype : dict of column name to SQL type, default None
    Optional specifying the datatype for columns. The SQL type should
    be a SQLAlchemy type, or a string for sqlite3 fallback connection.
schema: str, default: None
    Optional specifying the schema to be used in creating the table.

---
## exists
```python
from sql import exists
```



---
## sql_schema
```python
from sql import sql_schema
```



---
## _execute_create
```python
from sql import _execute_create
```



---
## create
```python
from sql import create
```



---
## _execute_insert
```python
from sql import _execute_insert
```



---
## _execute_insert_multi
```python
from sql import _execute_insert_multi
```



---
## insert_data
```python
from sql import insert_data
```



---
## insert
```python
from sql import insert
```



---
## _query_iterator
```python
from sql import _query_iterator
```

Return generator through chunked result set

---
## _index_name
```python
from sql import _index_name
```



---
## _get_column_names_and_types
```python
from sql import _get_column_names_and_types
```



---
## _create_table_setup
```python
from sql import _create_table_setup
```

Return a list of SQL statements that creates a table reflecting the
structure of a DataFrame.  The first entry will be a CREATE TABLE
statement while the rest will be CREATE INDEX statements.

---
## _harmonize_columns
```python
from sql import _harmonize_columns
```

Make the DataFrame's column types align with the SQL table
column types.
Need to work around limited NA value support. Floats are always
fine, ints must always be floats if there are Null values.
Booleans are hard because converting bool column with None replaces
all Nones with false. Therefore only convert bool if there are no
NA values.
Datetimes should already be converted to np.datetime64 if supported,
but here we also force conversion if required.

---
## _sqlalchemy_type
```python
from sql import _sqlalchemy_type
```



---
## _get_dtype
```python
from sql import _get_dtype
```



---
## __enter__
```python
from sql import __enter__
```



---
## __exit__
```python
from sql import __exit__
```



---
## read_table
```python
from sql import read_table
```

Read SQL database table into a DataFrame.

Parameters
----------
table_name : str
    Name of SQL table in database.
coerce_float : bool, default True
    Raises NotImplementedError
parse_dates : list or dict, default: None
    - List of column names to parse as dates.
    - Dict of ``{column_name: format string}`` where format string is
      strftime compatible in case of parsing string times, or is one of
      (D, s, ns, ms, us) in case of parsing integer timestamps.
    - Dict of ``{column_name: arg}``, where the arg corresponds
      to the keyword arguments of :func:`pandas.to_datetime`.
      Especially useful with databases without native Datetime support,
      such as SQLite.
columns : list, default: None
    List of column names to select from SQL table.
schema : string, default None
    Name of SQL schema in database to query (if database flavor
    supports this).  If specified, this overwrites the default
    schema of the SQL database object.
chunksize : int, default None
    Raises NotImplementedError
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
DataFrame

See Also
--------
pandas.read_sql_table
SQLDatabase.read_query

---
## read_query
```python
from sql import read_query
```



---
## _create_sql_schema
```python
from sql import _create_sql_schema
```



---
## insert_records
```python
from sql import insert_records
```



---
## run_transaction
```python
from sql import run_transaction
```



---
## prep_table
```python
from sql import prep_table
```

Prepares table in the database for data insertion. Creates it if needed, etc.

---
## check_case_sensitive
```python
from sql import check_case_sensitive
```

Checks table name for issues with case-sensitivity.
Method is called after data is inserted.

---
## tables
```python
from sql import tables
```



---
## get_table
```python
from sql import get_table
```



---
## drop_table
```python
from sql import drop_table
```



---
## _register_date_adapters
```python
from sql import _register_date_adapters
```



---
## insert_statement
```python
from sql import insert_statement
```



---
## _sql_type_name
```python
from sql import _sql_type_name
```



---
## _fetchall_as_list
```python
from sql import _fetchall_as_list
```



---
## _adapt_time
```python
from sql import _adapt_time
```



---
## _stata_elapsed_date_to_datetime_vec
```python
from stata import _stata_elapsed_date_to_datetime_vec
```

Convert from SIF to datetime. https://www.stata.com/help.cgi?datetime

Parameters
----------
dates : Series
    The Stata Internal Format date to convert to datetime according to fmt
fmt : str
    The format to convert to. Can be, tc, td, tw, tm, tq, th, ty
    Returns

Returns
-------
converted : Series
    The converted dates

Examples
--------
>>> dates = pd.Series([52])
>>> _stata_elapsed_date_to_datetime_vec(dates , "%tw")
0   1961-01-01
dtype: datetime64[ns]

Notes
-----
datetime/c - tc
    milliseconds since 01jan1960 00:00:00.000, assuming 86,400 s/day
datetime/C - tC - NOT IMPLEMENTED
    milliseconds since 01jan1960 00:00:00.000, adjusted for leap seconds
date - td
    days since 01jan1960 (01jan1960 = 0)
weekly date - tw
    weeks since 1960w1
    This assumes 52 weeks in a year, then adds 7 * remainder of the weeks.
    The datetime value is the start of the week in terms of days in the
    year, not ISO calendar weeks.
monthly date - tm
    months since 1960m1
quarterly date - tq
    quarters since 1960q1
half-yearly date - th
    half-years since 1960h1 yearly
date - ty
    years since 0000

---
## _datetime_to_stata_elapsed_vec
```python
from stata import _datetime_to_stata_elapsed_vec
```

Convert from datetime to SIF. https://www.stata.com/help.cgi?datetime

Parameters
----------
dates : Series
    Series or array containing datetime or datetime64[ns] to
    convert to the Stata Internal Format given by fmt
fmt : str
    The format to convert to. Can be, tc, td, tw, tm, tq, th, ty

---
## _cast_to_stata_types
```python
from stata import _cast_to_stata_types
```

Checks the dtypes of the columns of a pandas DataFrame for
compatibility with the data types and ranges supported by Stata, and
converts if necessary.

Parameters
----------
data : DataFrame
    The DataFrame to check and convert

Notes
-----
Numeric columns in Stata must be one of int8, int16, int32, float32 or
float64, with some additional value restrictions.  int8 and int16 columns
are checked for violations of the value restrictions and upcast if needed.
int64 data is not usable in Stata, and so it is downcast to int32 whenever
the value are in the int32 range, and sidecast to float64 when larger than
this range.  If the int64 values are outside of the range of those
perfectly representable as float64 values, a warning is raised.

bool columns are cast to int8.  uint columns are converted to int of the
same size if there is no loss in precision, otherwise are upcast to a
larger type.  uint64 is currently not supported since it is concerted to
object in a DataFrame.

---
## StataValueLabel
```python
from stata import StataValueLabel
```

Parse a categorical column and prepare formatted output

Parameters
----------
catarray : Series
    Categorical Series to encode
encoding : {"latin-1", "utf-8"}
    Encoding to use for value labels.

---
## StataNonCatValueLabel
```python
from stata import StataNonCatValueLabel
```

Prepare formatted version of value labels

Parameters
----------
labname : str
    Value label name
value_labels: Dictionary
    Mapping of values to labels
encoding : {"latin-1", "utf-8"}
    Encoding to use for value labels.

---
## StataMissingValue
```python
from stata import StataMissingValue
```

An observation's missing value.

Parameters
----------
value : {int, float}
    The Stata missing value code

Notes
-----
More information: <https://www.stata.com/help.cgi?missing>

Integer missing values make the code '.', '.a', ..., '.z' to the ranges
101 ... 127 (for int8), 32741 ... 32767  (for int16) and 2147483621 ...
2147483647 (for int32).  Missing values for floating point data types are
more complex but the pattern is simple to discern from the following table.

np.float32 missing values (float in Stata)
0000007f    .
0008007f    .a
0010007f    .b
...
00c0007f    .x
00c8007f    .y
00d0007f    .z

np.float64 missing values (double in Stata)
000000000000e07f    .
000000000001e07f    .a
000000000002e07f    .b
...
000000000018e07f    .x
000000000019e07f    .y
00000000001ae07f    .z

---
## StataParser
```python
from stata import StataParser
```



---
## StataReader
```python
from stata import StataReader
```



---
## read_stata
```python
from stata import read_stata
```



---
## _set_endianness
```python
from stata import _set_endianness
```



---
## _pad_bytes
```python
from stata import _pad_bytes
```

Take a char string and pads it with null bytes until it's length chars.

---
## _convert_datetime_to_stata_type
```python
from stata import _convert_datetime_to_stata_type
```

Convert from one of the stata date formats to a type in TYPE_MAP.

---
## _maybe_convert_to_int_keys
```python
from stata import _maybe_convert_to_int_keys
```



---
## _dtype_to_stata_type
```python
from stata import _dtype_to_stata_type
```

Convert dtype types to stata types. Returns the byte of the given ordinal.
See TYPE_MAP and comments for an explanation. This is also explained in
the dta spec.
1 - 244 are strings of this length
                     Pandas    Stata
251 - for int8      byte
252 - for int16     int
253 - for int32     long
254 - for float32   float
255 - for double    double

If there are dates to convert, then dtype will already have the correct
type inserted.

---
## _dtype_to_default_stata_fmt
```python
from stata import _dtype_to_default_stata_fmt
```

Map numpy dtype to stata's default format for this type. Not terribly
important since users can change this in Stata. Semantics are

object  -> "%DDs" where DD is the length of the string.  If not a string,
            raise ValueError
float64 -> "%10.0g"
float32 -> "%9.0g"
int64   -> "%9.0g"
int32   -> "%12.0g"
int16   -> "%8.0g"
int8    -> "%8.0g"
strl    -> "%9s"

---
## StataWriter
```python
from stata import StataWriter
```

A class for writing Stata binary dta files

Parameters
----------
fname : path (string), buffer or path object
    string, path object (pathlib.Path or py._path.local.LocalPath) or
    object implementing a binary write() functions. If using a buffer
    then the buffer will not be automatically closed after the file
    is written.
data : DataFrame
    Input to save
convert_dates : dict
    Dictionary mapping columns containing datetime types to stata internal
    format to use when writing the dates. Options are 'tc', 'td', 'tm',
    'tw', 'th', 'tq', 'ty'. Column can be either an integer or a name.
    Datetime columns that do not have a conversion type specified will be
    converted to 'tc'. Raises NotImplementedError if a datetime column has
    timezone information
write_index : bool
    Write the index to Stata dataset.
byteorder : str
    Can be ">", "<", "little", or "big". default is `sys.byteorder`
time_stamp : datetime
    A datetime to use as file creation date.  Default is the current time
data_label : str
    A label for the data set.  Must be 80 characters or smaller.
variable_labels : dict
    Dictionary containing columns as keys and variable labels as values.
    Each label must be 80 characters or smaller.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

value_labels : dict of dicts
    Dictionary containing columns as keys and dictionaries of column value
    to labels as values. The combined length of all labels for a single
    variable must be 32,000 characters or smaller.

    .. versionadded:: 1.4.0

Returns
-------
writer : StataWriter instance
    The StataWriter instance has a write_file method, which will
    write the file to the given `fname`.

Raises
------
NotImplementedError
    * If datetimes contain timezone information
ValueError
    * Columns listed in convert_dates are neither datetime64[ns]
      or datetime
    * Column dtype is not representable in Stata
    * Column listed in convert_dates is not in DataFrame
    * Categorical label contains more than 32,000 characters

Examples
--------
>>> data = pd.DataFrame([[1.0, 1]], columns=['a', 'b'])
>>> writer = StataWriter('./data_file.dta', data)
>>> writer.write_file()

Directly write a zip file
>>> compression = {{"method": "zip", "archive_name": "data_file.dta"}}
>>> writer = StataWriter('./data_file.zip', data, compression=compression)
>>> writer.write_file()

Save a DataFrame with dates
>>> from datetime import datetime
>>> data = pd.DataFrame([[datetime(2000,1,1)]], columns=['date'])
>>> writer = StataWriter('./date_data_file.dta', data, {{'date' : 'tw'}})
>>> writer.write_file()

---
## _dtype_to_stata_type_117
```python
from stata import _dtype_to_stata_type_117
```

Converts dtype types to stata types. Returns the byte of the given ordinal.
See TYPE_MAP and comments for an explanation. This is also explained in
the dta spec.
1 - 2045 are strings of this length
            Pandas    Stata
32768 - for object    strL
65526 - for int8      byte
65527 - for int16     int
65528 - for int32     long
65529 - for float32   float
65530 - for double    double

If there are dates to convert, then dtype will already have the correct
type inserted.

---
## _pad_bytes_new
```python
from stata import _pad_bytes_new
```

Takes a bytes instance and pads it with null bytes until it's length chars.

---
## StataStrLWriter
```python
from stata import StataStrLWriter
```

Converter for Stata StrLs

Stata StrLs map 8 byte values to strings which are stored using a
dictionary-like format where strings are keyed to two values.

Parameters
----------
df : DataFrame
    DataFrame to convert
columns : Sequence[str]
    List of columns names to convert to StrL
version : int, optional
    dta version.  Currently supports 117, 118 and 119
byteorder : str, optional
    Can be ">", "<", "little", or "big". default is `sys.byteorder`

Notes
-----
Supports creation of the StrL block of a dta file for dta versions
117, 118 and 119.  These differ in how the GSO is stored.  118 and
119 store the GSO lookup value as a uint32 and a uint64, while 117
uses two uint32s. 118 and 119 also encode all strings as unicode
which is required by the format.  117 uses 'latin-1' a fixed width
encoding that extends the 7-bit ascii table with an additional 128
characters.

---
## StataWriter117
```python
from stata import StataWriter117
```

A class for writing Stata binary dta files in Stata 13 format (117)

Parameters
----------
fname : path (string), buffer or path object
    string, path object (pathlib.Path or py._path.local.LocalPath) or
    object implementing a binary write() functions. If using a buffer
    then the buffer will not be automatically closed after the file
    is written.
data : DataFrame
    Input to save
convert_dates : dict
    Dictionary mapping columns containing datetime types to stata internal
    format to use when writing the dates. Options are 'tc', 'td', 'tm',
    'tw', 'th', 'tq', 'ty'. Column can be either an integer or a name.
    Datetime columns that do not have a conversion type specified will be
    converted to 'tc'. Raises NotImplementedError if a datetime column has
    timezone information
write_index : bool
    Write the index to Stata dataset.
byteorder : str
    Can be ">", "<", "little", or "big". default is `sys.byteorder`
time_stamp : datetime
    A datetime to use as file creation date.  Default is the current time
data_label : str
    A label for the data set.  Must be 80 characters or smaller.
variable_labels : dict
    Dictionary containing columns as keys and variable labels as values.
    Each label must be 80 characters or smaller.
convert_strl : list
    List of columns names to convert to Stata StrL format.  Columns with
    more than 2045 characters are automatically written as StrL.
    Smaller columns can be converted by including the column name.  Using
    StrLs can reduce output file size when strings are longer than 8
    characters, and either frequently repeated or sparse.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

value_labels : dict of dicts
    Dictionary containing columns as keys and dictionaries of column value
    to labels as values. The combined length of all labels for a single
    variable must be 32,000 characters or smaller.

    .. versionadded:: 1.4.0

Returns
-------
writer : StataWriter117 instance
    The StataWriter117 instance has a write_file method, which will
    write the file to the given `fname`.

Raises
------
NotImplementedError
    * If datetimes contain timezone information
ValueError
    * Columns listed in convert_dates are neither datetime64[ns]
      or datetime
    * Column dtype is not representable in Stata
    * Column listed in convert_dates is not in DataFrame
    * Categorical label contains more than 32,000 characters

Examples
--------
>>> data = pd.DataFrame([[1.0, 1, 'a']], columns=['a', 'b', 'c'])
>>> writer = pd.io.stata.StataWriter117('./data_file.dta', data)
>>> writer.write_file()

Directly write a zip file
>>> compression = {"method": "zip", "archive_name": "data_file.dta"}
>>> writer = pd.io.stata.StataWriter117(
...     './data_file.zip', data, compression=compression
...     )
>>> writer.write_file()

Or with long strings stored in strl format
>>> data = pd.DataFrame([['A relatively long string'], [''], ['']],
...                     columns=['strls'])
>>> writer = pd.io.stata.StataWriter117(
...     './data_file_with_long_strings.dta', data, convert_strl=['strls'])
>>> writer.write_file()

---
## StataWriterUTF8
```python
from stata import StataWriterUTF8
```

Stata binary dta file writing in Stata 15 (118) and 16 (119) formats

DTA 118 and 119 format files support unicode string data (both fixed
and strL) format. Unicode is also supported in value labels, variable
labels and the dataset label. Format 119 is automatically used if the
file contains more than 32,767 variables.

Parameters
----------
fname : path (string), buffer or path object
    string, path object (pathlib.Path or py._path.local.LocalPath) or
    object implementing a binary write() functions. If using a buffer
    then the buffer will not be automatically closed after the file
    is written.
data : DataFrame
    Input to save
convert_dates : dict, default None
    Dictionary mapping columns containing datetime types to stata internal
    format to use when writing the dates. Options are 'tc', 'td', 'tm',
    'tw', 'th', 'tq', 'ty'. Column can be either an integer or a name.
    Datetime columns that do not have a conversion type specified will be
    converted to 'tc'. Raises NotImplementedError if a datetime column has
    timezone information
write_index : bool, default True
    Write the index to Stata dataset.
byteorder : str, default None
    Can be ">", "<", "little", or "big". default is `sys.byteorder`
time_stamp : datetime, default None
    A datetime to use as file creation date.  Default is the current time
data_label : str, default None
    A label for the data set.  Must be 80 characters or smaller.
variable_labels : dict, default None
    Dictionary containing columns as keys and variable labels as values.
    Each label must be 80 characters or smaller.
convert_strl : list, default None
    List of columns names to convert to Stata StrL format.  Columns with
    more than 2045 characters are automatically written as StrL.
    Smaller columns can be converted by including the column name.  Using
    StrLs can reduce output file size when strings are longer than 8
    characters, and either frequently repeated or sparse.
version : int, default None
    The dta version to use. By default, uses the size of data to determine
    the version. 118 is used if data.shape[1] <= 32767, and 119 is used
    for storing larger DataFrames.
{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

value_labels : dict of dicts
    Dictionary containing columns as keys and dictionaries of column value
    to labels as values. The combined length of all labels for a single
    variable must be 32,000 characters or smaller.

    .. versionadded:: 1.4.0

Returns
-------
StataWriterUTF8
    The instance has a write_file method, which will write the file to the
    given `fname`.

Raises
------
NotImplementedError
    * If datetimes contain timezone information
ValueError
    * Columns listed in convert_dates are neither datetime64[ns]
      or datetime
    * Column dtype is not representable in Stata
    * Column listed in convert_dates is not in DataFrame
    * Categorical label contains more than 32,000 characters

Examples
--------
Using Unicode data and column names

>>> from pandas.io.stata import StataWriterUTF8
>>> data = pd.DataFrame([[1.0, 1, 'ᴬ']], columns=['a', 'β', 'ĉ'])
>>> writer = StataWriterUTF8('./data_file.dta', data)
>>> writer.write_file()

Directly write a zip file
>>> compression = {"method": "zip", "archive_name": "data_file.dta"}
>>> writer = StataWriterUTF8('./data_file.zip', data, compression=compression)
>>> writer.write_file()

Or with long strings stored in strl format

>>> data = pd.DataFrame([['ᴀ relatively long ŝtring'], [''], ['']],
...                     columns=['strls'])
>>> writer = StataWriterUTF8('./data_file_with_long_strings.dta', data,
...                          convert_strl=['strls'])
>>> writer.write_file()

---
## convert_year_month_safe
```python
from stata import convert_year_month_safe
```

Convert year and month to datetimes, using pandas vectorized versions
when the date range falls within the range supported by pandas.
Otherwise it falls back to a slower but more robust method
using datetime.

---
## convert_year_days_safe
```python
from stata import convert_year_days_safe
```

Converts year (e.g. 1999) and days since the start of the year to a
datetime or datetime64 Series

---
## convert_delta_safe
```python
from stata import convert_delta_safe
```

Convert base dates and deltas to datetimes, using pandas vectorized
versions if the deltas satisfy restrictions required to be expressed
as dates in pandas.

---
## parse_dates_safe
```python
from stata import parse_dates_safe
```



---
## __init__
```python
from stata import __init__
```



---
## _prepare_value_labels
```python
from stata import _prepare_value_labels
```

Encode value labels.

---
## generate_value_label
```python
from stata import generate_value_label
```

Generate the binary representation of the value labels.

Parameters
----------
byteorder : str
    Byte order of the output

Returns
-------
value_label : bytes
    Bytes containing the formatted value label

---
## string
```python
from stata import string
```

The Stata representation of the missing value: '.', '.a'..'.z'

Returns
-------
str
    The representation of the missing value.

---
## value
```python
from stata import value
```

The binary representation of the missing value.

Returns
-------
{int, float}
    The binary representation of the missing value.

---
## __str__
```python
from stata import __str__
```



---
## __repr__
```python
from stata import __repr__
```



---
## __eq__
```python
from stata import __eq__
```



---
## get_base_missing_value
```python
from stata import get_base_missing_value
```



---
## _ensure_open
```python
from stata import _ensure_open
```

Ensure the file has been opened and its header data read.

---
## _open_file
```python
from stata import _open_file
```

Open the file (with compression options, etc.), and read header information.

---
## __enter__
```python
from stata import __enter__
```

enter context manager

---
## __exit__
```python
from stata import __exit__
```



---
## close
```python
from stata import close
```

Close the handle if its open.

.. deprecated: 2.0.0

   The close method is not part of the public API.
   The only supported way to use StataReader is to use it as a context manager.

---
## _set_encoding
```python
from stata import _set_encoding
```

Set string encoding which depends on file version

---
## _read_int8
```python
from stata import _read_int8
```



---
## _read_uint8
```python
from stata import _read_uint8
```



---
## _read_uint16
```python
from stata import _read_uint16
```



---
## _read_uint32
```python
from stata import _read_uint32
```



---
## _read_uint64
```python
from stata import _read_uint64
```



---
## _read_int16
```python
from stata import _read_int16
```



---
## _read_int32
```python
from stata import _read_int32
```



---
## _read_int64
```python
from stata import _read_int64
```



---
## _read_char8
```python
from stata import _read_char8
```



---
## _read_int16_count
```python
from stata import _read_int16_count
```



---
## _read_header
```python
from stata import _read_header
```



---
## _read_new_header
```python
from stata import _read_new_header
```



---
## _get_dtypes
```python
from stata import _get_dtypes
```



---
## _get_varlist
```python
from stata import _get_varlist
```



---
## _get_fmtlist
```python
from stata import _get_fmtlist
```



---
## _get_lbllist
```python
from stata import _get_lbllist
```



---
## _get_variable_labels
```python
from stata import _get_variable_labels
```



---
## _get_nobs
```python
from stata import _get_nobs
```



---
## _get_data_label
```python
from stata import _get_data_label
```



---
## _get_time_stamp
```python
from stata import _get_time_stamp
```



---
## _get_seek_variable_labels
```python
from stata import _get_seek_variable_labels
```



---
## _read_old_header
```python
from stata import _read_old_header
```



---
## _setup_dtype
```python
from stata import _setup_dtype
```

Map between numpy and state dtypes

---
## _decode
```python
from stata import _decode
```



---
## _read_value_labels
```python
from stata import _read_value_labels
```



---
## _read_strls
```python
from stata import _read_strls
```



---
## __next__
```python
from stata import __next__
```



---
## get_chunk
```python
from stata import get_chunk
```

Reads lines from Stata file and returns as dataframe

Parameters
----------
size : int, defaults to None
    Number of lines to read.  If None, reads whole file.

Returns
-------
DataFrame

---
## read
```python
from stata import read
```



---
## _do_convert_missing
```python
from stata import _do_convert_missing
```



---
## _insert_strls
```python
from stata import _insert_strls
```



---
## _do_select_columns
```python
from stata import _do_select_columns
```



---
## _do_convert_categoricals
```python
from stata import _do_convert_categoricals
```

Converts categorical columns to Categorical type.

---
## data_label
```python
from stata import data_label
```

Return data label of Stata file.

Examples
--------
>>> df = pd.DataFrame([(1,)], columns=["variable"])
>>> time_stamp = pd.Timestamp(2000, 2, 29, 14, 21)
>>> data_label = "This is a data file."
>>> path = "/My_path/filename.dta"
>>> df.to_stata(path, time_stamp=time_stamp,    # doctest: +SKIP
...             data_label=data_label,  # doctest: +SKIP
...             version=None)  # doctest: +SKIP
>>> with pd.io.stata.StataReader(path) as reader:  # doctest: +SKIP
...     print(reader.data_label)  # doctest: +SKIP
This is a data file.

---
## time_stamp
```python
from stata import time_stamp
```

Return time stamp of Stata file.

---
## variable_labels
```python
from stata import variable_labels
```

Return a dict associating each variable name with corresponding label.

Returns
-------
dict

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["col_1", "col_2"])
>>> time_stamp = pd.Timestamp(2000, 2, 29, 14, 21)
>>> path = "/My_path/filename.dta"
>>> variable_labels = {"col_1": "This is an example"}
>>> df.to_stata(path, time_stamp=time_stamp,  # doctest: +SKIP
...             variable_labels=variable_labels, version=None)  # doctest: +SKIP
>>> with pd.io.stata.StataReader(path) as reader:  # doctest: +SKIP
...     print(reader.variable_labels())  # doctest: +SKIP
{'index': '', 'col_1': 'This is an example', 'col_2': ''}
>>> pd.read_stata(path)  # doctest: +SKIP
    index col_1 col_2
0       0    1    2
1       1    3    4

---
## value_labels
```python
from stata import value_labels
```

Return a nested dict associating each variable name to its value and label.

Returns
-------
dict

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["col_1", "col_2"])
>>> time_stamp = pd.Timestamp(2000, 2, 29, 14, 21)
>>> path = "/My_path/filename.dta"
>>> value_labels = {"col_1": {3: "x"}}
>>> df.to_stata(path, time_stamp=time_stamp,  # doctest: +SKIP
...             value_labels=value_labels, version=None)  # doctest: +SKIP
>>> with pd.io.stata.StataReader(path) as reader:  # doctest: +SKIP
...     print(reader.value_labels())  # doctest: +SKIP
{'col_1': {3: 'x'}}
>>> pd.read_stata(path)  # doctest: +SKIP
    index col_1 col_2
0       0    1    2
1       1    x    4

---
## _write
```python
from stata import _write
```

Helper to call encode before writing to file for Python 3 compat.

---
## _write_bytes
```python
from stata import _write_bytes
```

Helper to assert file is open before writing.

---
## _prepare_non_cat_value_labels
```python
from stata import _prepare_non_cat_value_labels
```

Check for value labels provided for non-categorical columns. Value
labels

---
## _prepare_categoricals
```python
from stata import _prepare_categoricals
```

Check for categorical columns, retain categorical information for
Stata file and convert categorical data to int

---
## _replace_nans
```python
from stata import _replace_nans
```

Checks floating point data columns for nans, and replaces these with
the generic Stata for missing value (.)

---
## _update_strl_names
```python
from stata import _update_strl_names
```

Update column names for conversion to strl if they might have been
changed to comply with Stata naming rules

---
## _validate_variable_name
```python
from stata import _validate_variable_name
```

Validate variable names for Stata export.

Parameters
----------
name : str
    Variable name

Returns
-------
str
    The validated name with invalid characters replaced with
    underscores.

Notes
-----
Stata 118+ support most unicode characters. The only limitation is in
the ascii range where the characters supported are a-z, A-Z, 0-9 and _.

---
## _check_column_names
```python
from stata import _check_column_names
```

Checks column names to ensure that they are valid Stata column names.
This includes checks for:
    * Non-string names
    * Stata keywords
    * Variables that start with numbers
    * Variables with names that are too long

When an illegal variable name is detected, it is converted, and if
dates are exported, the variable name is propagated to the date
conversion dictionary

---
## _set_formats_and_types
```python
from stata import _set_formats_and_types
```



---
## _prepare_pandas
```python
from stata import _prepare_pandas
```



---
## _encode_strings
```python
from stata import _encode_strings
```

Encode strings in dta-specific encoding

Do not encode columns marked for date conversion or for strL
conversion. The strL converter independently handles conversion and
also accepts empty string arrays.

---
## write_file
```python
from stata import write_file
```

Export DataFrame object to Stata dta format.

Examples
--------
>>> df = pd.DataFrame({"fully_labelled": [1, 2, 3, 3, 1],
...                    "partially_labelled": [1.0, 2.0, np.nan, 9.0, np.nan],
...                    "Y": [7, 7, 9, 8, 10],
...                    "Z": pd.Categorical(["j", "k", "l", "k", "j"]),
...                    })
>>> path = "/My_path/filename.dta"
>>> labels = {"fully_labelled": {1: "one", 2: "two", 3: "three"},
...           "partially_labelled": {1.0: "one", 2.0: "two"},
...           }
>>> writer = pd.io.stata.StataWriter(path,
...                                  df,
...                                  value_labels=labels)  # doctest: +SKIP
>>> writer.write_file()  # doctest: +SKIP
>>> df = pd.read_stata(path)  # doctest: +SKIP
>>> df  # doctest: +SKIP
    index fully_labelled  partially_labeled  Y  Z
0       0            one                one  7  j
1       1            two                two  7  k
2       2          three                NaN  9  l
3       3          three                9.0  8  k
4       4            one                NaN 10  j

---
## _close
```python
from stata import _close
```

Close the file if it was created by the writer.

If a buffer or file-like object was passed in, for example a GzipFile,
then leave this file open for the caller to close.

---
## _write_map
```python
from stata import _write_map
```

Called twice during file write. The first populates the values in
the map with 0s.  The second call writes the final map locations when
all blocks have been written.

---
## _write_file_close_tag
```python
from stata import _write_file_close_tag
```



---
## _write_characteristics
```python
from stata import _write_characteristics
```



---
## _write_strls
```python
from stata import _write_strls
```



---
## _write_expansion_fields
```python
from stata import _write_expansion_fields
```

No-op in dta 117+

---
## _write_value_labels
```python
from stata import _write_value_labels
```



---
## _write_header
```python
from stata import _write_header
```

Write the file header

---
## _write_variable_types
```python
from stata import _write_variable_types
```



---
## _write_varnames
```python
from stata import _write_varnames
```



---
## _write_sortlist
```python
from stata import _write_sortlist
```



---
## _write_formats
```python
from stata import _write_formats
```



---
## _write_value_label_names
```python
from stata import _write_value_label_names
```



---
## _write_variable_labels
```python
from stata import _write_variable_labels
```



---
## _convert_strls
```python
from stata import _convert_strls
```

Convert columns to StrLs if either very large or in the
convert_strl variable

---
## _prepare_data
```python
from stata import _prepare_data
```



---
## _write_data
```python
from stata import _write_data
```



---
## _null_terminate_str
```python
from stata import _null_terminate_str
```



---
## _null_terminate_bytes
```python
from stata import _null_terminate_bytes
```



---
## _convert_key
```python
from stata import _convert_key
```



---
## generate_table
```python
from stata import generate_table
```

Generates the GSO lookup table for the DataFrame

Returns
-------
gso_table : dict
    Ordered dictionary using the string found as keys
    and their lookup position (v,o) as values
gso_df : DataFrame
    DataFrame where strl columns have been converted to
    (v,o) values

Notes
-----
Modifies the DataFrame in-place.

The DataFrame returned encodes the (v,o) values as uint64s. The
encoding depends on the dta version, and can be expressed as

enc = v + o * 2 ** (o_size * 8)

so that v is stored in the lower bits and o is in the upper
bits. o_size is

  * 117: 4
  * 118: 6
  * 119: 5

---
## generate_blob
```python
from stata import generate_blob
```

Generates the binary blob of GSOs that is written to the dta file.

Parameters
----------
gso_table : dict
    Ordered dictionary (str, vo)

Returns
-------
gso : bytes
    Binary content of dta file to be placed between strl tags

Notes
-----
Output format depends on dta version.  117 uses two uint32s to
express v and o while 118+ uses a uint32 for v and a uint64 for o.

---
## _tag
```python
from stata import _tag
```

Surround val with <tag></tag>

---
## _update_map
```python
from stata import _update_map
```

Update map location for tag with file position

---
## f
```python
from stata import f
```



---
## g
```python
from stata import g
```



---
## __name__
```python
from gbq import __name__
```

Google BigQuery support 

---
## _try_import
```python
from gbq import _try_import
```



---
## read_gbq
```python
from gbq import read_gbq
```

Load data from Google BigQuery.

.. deprecated:: 2.2.0

   Please use ``pandas_gbq.read_gbq`` instead.

This function requires the `pandas-gbq package
<https://pandas-gbq.readthedocs.io>`__.

See the `How to authenticate with Google BigQuery
<https://pandas-gbq.readthedocs.io/en/latest/howto/authentication.html>`__
guide for authentication instructions.

Parameters
----------
query : str
    SQL-Like Query to return data values.
project_id : str, optional
    Google BigQuery Account project ID. Optional when available from
    the environment.
index_col : str, optional
    Name of result column to use for index in results DataFrame.
col_order : list(str), optional
    List of BigQuery column names in the desired order for results
    DataFrame.
reauth : bool, default False
    Force Google BigQuery to re-authenticate the user. This is useful
    if multiple accounts are used.
auth_local_webserver : bool, default True
    Use the `local webserver flow`_ instead of the `console flow`_
    when getting user credentials.

    .. _local webserver flow:
        https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_local_server
    .. _console flow:
        https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_console

    *New in version 0.2.0 of pandas-gbq*.

    .. versionchanged:: 1.5.0
       Default value is changed to ``True``. Google has deprecated the
       ``auth_local_webserver = False`` `"out of band" (copy-paste)
       flow
       <https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob>`_.
dialect : str, default 'legacy'
    Note: The default value is changing to 'standard' in a future version.

    SQL syntax dialect to use. Value can be one of:

    ``'legacy'``
        Use BigQuery's legacy SQL dialect. For more information see
        `BigQuery Legacy SQL Reference
        <https://cloud.google.com/bigquery/docs/reference/legacy-sql>`__.
    ``'standard'``
        Use BigQuery's standard SQL, which is
        compliant with the SQL 2011 standard. For more information
        see `BigQuery Standard SQL Reference
        <https://cloud.google.com/bigquery/docs/reference/standard-sql/>`__.
location : str, optional
    Location where the query job should run. See the `BigQuery locations
    documentation
    <https://cloud.google.com/bigquery/docs/dataset-locations>`__ for a
    list of available locations. The location must match that of any
    datasets used in the query.

    *New in version 0.5.0 of pandas-gbq*.
configuration : dict, optional
    Query config parameters for job processing.
    For example:

        configuration = {'query': {'useQueryCache': False}}

    For more information see `BigQuery REST API Reference
    <https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query>`__.
credentials : google.auth.credentials.Credentials, optional
    Credentials for accessing Google APIs. Use this parameter to override
    default credentials, such as to use Compute Engine
    :class:`google.auth.compute_engine.Credentials` or Service Account
    :class:`google.oauth2.service_account.Credentials` directly.

    *New in version 0.8.0 of pandas-gbq*.
use_bqstorage_api : bool, default False
    Use the `BigQuery Storage API
    <https://cloud.google.com/bigquery/docs/reference/storage/>`__ to
    download query results quickly, but at an increased cost. To use this
    API, first `enable it in the Cloud Console
    <https://console.cloud.google.com/apis/library/bigquerystorage.googleapis.com>`__.
    You must also have the `bigquery.readsessions.create
    <https://cloud.google.com/bigquery/docs/access-control#roles>`__
    permission on the project you are billing queries to.

    This feature requires version 0.10.0 or later of the ``pandas-gbq``
    package. It also requires the ``google-cloud-bigquery-storage`` and
    ``fastavro`` packages.

max_results : int, optional
    If set, limit the maximum number of rows to fetch from the query
    results.

progress_bar_type : Optional, str
    If set, use the `tqdm <https://tqdm.github.io/>`__ library to
    display a progress bar while the data downloads. Install the
    ``tqdm`` package to use this feature.

    Possible values of ``progress_bar_type`` include:

    ``None``
        No progress bar.
    ``'tqdm'``
        Use the :func:`tqdm.tqdm` function to print a progress bar
        to :data:`sys.stderr`.
    ``'tqdm_notebook'``
        Use the :func:`tqdm.tqdm_notebook` function to display a
        progress bar as a Jupyter notebook widget.
    ``'tqdm_gui'``
        Use the :func:`tqdm.tqdm_gui` function to display a
        progress bar as a graphical dialog box.

Returns
-------
df: DataFrame
    DataFrame representing results of query.

See Also
--------
pandas_gbq.read_gbq : This function in the pandas-gbq library.
DataFrame.to_gbq : Write a DataFrame to Google BigQuery.

Examples
--------
Example taken from `Google BigQuery documentation
<https://cloud.google.com/bigquery/docs/pandas-gbq-migration>`_

>>> sql = "SELECT name FROM table_name WHERE state = 'TX' LIMIT 100;"
>>> df = pd.read_gbq(sql, dialect="standard")  # doctest: +SKIP
>>> project_id = "your-project-id"  # doctest: +SKIP
>>> df = pd.read_gbq(sql,
...                  project_id=project_id,
...                  dialect="standard"
...                  )  # doctest: +SKIP

---
## to_gbq
```python
from gbq import to_gbq
```



---
## __name__
```python
from spss import __name__
```



---
## read_spss
```python
from spss import read_spss
```

Load an SPSS file from the file path, returning a DataFrame.

Parameters
----------
path : str or Path
    File path.
usecols : list-like, optional
    Return a subset of the columns. If None, return all columns.
convert_categoricals : bool, default is True
    Convert categorical columns into pd.Categorical.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
DataFrame

Examples
--------
>>> df = pd.read_spss("spss_data.sav")  # doctest: +SKIP

---
## __name__
```python
from offsets import __name__
```



---
## __name__
```python
from frequencies import __name__
```



---
## get_period_alias
```python
from frequencies import get_period_alias
```

Alias to closest period strings BQ->Q etc.

---
## infer_freq
```python
from frequencies import infer_freq
```

Infer the most likely frequency given the input index.

Parameters
----------
index : DatetimeIndex, TimedeltaIndex, Series or array-like
  If passed a Series will use the values of the series (NOT THE INDEX).

Returns
-------
str or None
    None if no discernible frequency.

Raises
------
TypeError
    If the index is not datetime-like.
ValueError
    If there are fewer than three values.

Examples
--------
>>> idx = pd.date_range(start='2020/12/01', end='2020/12/30', periods=30)
>>> pd.infer_freq(idx)
'D'

---
## _FrequencyInferer
```python
from frequencies import _FrequencyInferer
```

Not sure if I can avoid the state machine here

---
## _TimedeltaFrequencyInferer
```python
from frequencies import _TimedeltaFrequencyInferer
```



---
## _is_multiple
```python
from frequencies import _is_multiple
```



---
## _maybe_add_count
```python
from frequencies import _maybe_add_count
```



---
## is_subperiod
```python
from frequencies import is_subperiod
```

Returns True if downsampling is possible between source and target
frequencies

Parameters
----------
source : str or DateOffset
    Frequency converting from
target : str or DateOffset
    Frequency converting to

Returns
-------
bool

---
## is_superperiod
```python
from frequencies import is_superperiod
```

Returns True if upsampling is possible between source and target
frequencies

Parameters
----------
source : str or DateOffset
    Frequency converting from
target : str or DateOffset
    Frequency converting to

Returns
-------
bool

---
## _maybe_coerce_freq
```python
from frequencies import _maybe_coerce_freq
```

we might need to coerce a code to a rule_code
and uppercase it

Parameters
----------
source : str or DateOffset
    Frequency converting from

Returns
-------
str

---
## _quarter_months_conform
```python
from frequencies import _quarter_months_conform
```



---
## _is_annual
```python
from frequencies import _is_annual
```



---
## _is_quarterly
```python
from frequencies import _is_quarterly
```



---
## _is_monthly
```python
from frequencies import _is_monthly
```



---
## _is_weekly
```python
from frequencies import _is_weekly
```



---
## __init__
```python
from frequencies import __init__
```



---
## deltas
```python
from frequencies import deltas
```



---
## deltas_asi8
```python
from frequencies import deltas_asi8
```



---
## is_unique
```python
from frequencies import is_unique
```



---
## is_unique_asi8
```python
from frequencies import is_unique_asi8
```



---
## get_freq
```python
from frequencies import get_freq
```

Find the appropriate frequency string to describe the inferred
frequency of self.i8values

Returns
-------
str or None

---
## day_deltas
```python
from frequencies import day_deltas
```



---
## hour_deltas
```python
from frequencies import hour_deltas
```



---
## fields
```python
from frequencies import fields
```



---
## rep_stamp
```python
from frequencies import rep_stamp
```



---
## month_position_check
```python
from frequencies import month_position_check
```



---
## mdiffs
```python
from frequencies import mdiffs
```



---
## ydiffs
```python
from frequencies import ydiffs
```



---
## _infer_daily_rule
```python
from frequencies import _infer_daily_rule
```



---
## _get_daily_rule
```python
from frequencies import _get_daily_rule
```



---
## _get_annual_rule
```python
from frequencies import _get_annual_rule
```



---
## _get_quarterly_rule
```python
from frequencies import _get_quarterly_rule
```



---
## _get_monthly_rule
```python
from frequencies import _get_monthly_rule
```



---
## _is_business_daily
```python
from frequencies import _is_business_daily
```



---
## _get_wom_rule
```python
from frequencies import _get_wom_rule
```



---
## __name__
```python
from holiday import __name__
```



---
## next_monday
```python
from holiday import next_monday
```

If holiday falls on Saturday, use following Monday instead;
if holiday falls on Sunday, use Monday instead

---
## next_monday_or_tuesday
```python
from holiday import next_monday_or_tuesday
```

For second holiday of two adjacent ones!
If holiday falls on Saturday, use following Monday instead;
if holiday falls on Sunday or Monday, use following Tuesday instead
(because Monday is already taken by adjacent holiday on the day before)

---
## previous_friday
```python
from holiday import previous_friday
```

If holiday falls on Saturday or Sunday, use previous Friday instead.

---
## sunday_to_monday
```python
from holiday import sunday_to_monday
```

If holiday falls on Sunday, use day thereafter (Monday) instead.

---
## weekend_to_monday
```python
from holiday import weekend_to_monday
```

If holiday falls on Sunday or Saturday,
use day thereafter (Monday) instead.
Needed for holidays such as Christmas observation in Europe

---
## nearest_workday
```python
from holiday import nearest_workday
```

If holiday falls on Saturday, use day before (Friday) instead;
if holiday falls on Sunday, use day thereafter (Monday) instead.

---
## next_workday
```python
from holiday import next_workday
```

returns next weekday used for observances

---
## previous_workday
```python
from holiday import previous_workday
```

returns previous weekday used for observances

---
## before_nearest_workday
```python
from holiday import before_nearest_workday
```

returns previous workday after nearest workday

---
## after_nearest_workday
```python
from holiday import after_nearest_workday
```

returns next workday after nearest workday
needed for Boxing day or multiple holidays in a series

---
## Holiday
```python
from holiday import Holiday
```

Class that defines a holiday with start/end dates and rules
for observance.

---
## register
```python
from holiday import register
```



---
## get_calendar
```python
from holiday import get_calendar
```

Return an instance of a calendar based on its name.

Parameters
----------
name : str
    Calendar name to return an instance of

---
## HolidayCalendarMetaClass
```python
from holiday import HolidayCalendarMetaClass
```



---
## AbstractHolidayCalendar
```python
from holiday import AbstractHolidayCalendar
```

Abstract interface to create holidays following certain rules.

---
## USFederalHolidayCalendar
```python
from holiday import USFederalHolidayCalendar
```

US Federal Government Holiday Calendar based on rules specified by:
https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/

---
## HolidayCalendarFactory
```python
from holiday import HolidayCalendarFactory
```



---
## __init__
```python
from holiday import __init__
```

Initializes holiday object with a given set a rules.  Normally
classes just have the rules defined within them.

Parameters
----------
name : str
    Name of the holiday calendar, defaults to class name
rules : array of Holiday objects
    A set of rules used to create the holidays.

---
## __repr__
```python
from holiday import __repr__
```



---
## dates
```python
from holiday import dates
```

Calculate holidays observed between start date and end date

Parameters
----------
start_date : starting date, datetime-like, optional
end_date : ending date, datetime-like, optional
return_name : bool, optional, default=False
    If True, return a series that has dates and holiday names.
    False will only return dates.

Returns
-------
Series or DatetimeIndex
    Series if return_name is True

---
## _reference_dates
```python
from holiday import _reference_dates
```

Get reference dates for the holiday.

Return reference dates for the holiday also returning the year
prior to the start_date and year following the end_date.  This ensures
that any offsets to be applied will yield the holidays within
the passed in dates.

---
## _apply_rule
```python
from holiday import _apply_rule
```

Apply the given offset/observance to a DatetimeIndex of dates.

Parameters
----------
dates : DatetimeIndex
    Dates to apply the given offset/observance rule

Returns
-------
Dates with rules applied

---
## __new__
```python
from holiday import __new__
```



---
## rule_from_name
```python
from holiday import rule_from_name
```



---
## holidays
```python
from holiday import holidays
```

Returns a curve with holidays between start_date and end_date

Parameters
----------
start : starting date, datetime-like, optional
end : ending date, datetime-like, optional
return_name : bool, optional
    If True, return a series that has dates and holiday names.
    False will only return a DatetimeIndex of dates.

Returns
-------
    DatetimeIndex of holidays

---
## merge_class
```python
from holiday import merge_class
```

Merge holiday calendars together. The base calendar
will take precedence to other. The merge will be done
based on each holiday's name.

Parameters
----------
base : AbstractHolidayCalendar
  instance/subclass or array of Holiday objects
other : AbstractHolidayCalendar
  instance/subclass or array of Holiday objects

---
## merge
```python
from holiday import merge
```

Merge holiday calendars together.  The caller's class
rules take precedence.  The merge will be done
based on each holiday's name.

Parameters
----------
other : holiday calendar
inplace : bool (default=False)
    If True set rule_table to holidays, else return array of Holidays

---
## __name__
```python
from test_optional_dependency import __name__
```



---
## test_import_optional
```python
from test_optional_dependency import test_import_optional
```



---
## test_xlrd_version_fallback
```python
from test_optional_dependency import test_xlrd_version_fallback
```



---
## test_bad_version
```python
from test_optional_dependency import test_bad_version
```



---
## test_submodule
```python
from test_optional_dependency import test_submodule
```



---
## test_no_version_raises
```python
from test_optional_dependency import test_no_version_raises
```



---
## __name__
```python
from test_expressions import __name__
```



---
## _frame
```python
from test_expressions import _frame
```



---
## _frame2
```python
from test_expressions import _frame2
```



---
## _mixed
```python
from test_expressions import _mixed
```



---
## _mixed2
```python
from test_expressions import _mixed2
```



---
## _integer
```python
from test_expressions import _integer
```



---
## _integer_integers
```python
from test_expressions import _integer_integers
```



---
## _integer2
```python
from test_expressions import _integer2
```



---
## _array
```python
from test_expressions import _array
```



---
## _array2
```python
from test_expressions import _array2
```



---
## _array_mixed
```python
from test_expressions import _array_mixed
```



---
## _array_mixed2
```python
from test_expressions import _array_mixed2
```



---
## TestExpressions
```python
from test_expressions import TestExpressions
```



---
## call_op
```python
from test_expressions import call_op
```



---
## test_run_arithmetic
```python
from test_expressions import test_run_arithmetic
```



---
## test_run_binary
```python
from test_expressions import test_run_binary
```

tests solely that the result is the same whether or not numexpr is
enabled.  Need to test whether the function does the correct thing
elsewhere.

---
## test_invalid
```python
from test_expressions import test_invalid
```



---
## test_binary_ops
```python
from test_expressions import test_binary_ops
```



---
## test_comparison_ops
```python
from test_expressions import test_comparison_ops
```



---
## test_where
```python
from test_expressions import test_where
```



---
## test_bool_ops_raise_on_arithmetic
```python
from test_expressions import test_bool_ops_raise_on_arithmetic
```



---
## test_bool_ops_warn_on_arithmetic
```python
from test_expressions import test_bool_ops_warn_on_arithmetic
```



---
## test_bool_ops_column_name_dtype
```python
from test_expressions import test_bool_ops_column_name_dtype
```



---
## test_frame_series_axis
```python
from test_expressions import test_frame_series_axis
```



---
## test_python_semantics_with_numexpr_installed
```python
from test_expressions import test_python_semantics_with_numexpr_installed
```



---
## testit
```python
from test_expressions import testit
```



---
## __name__
```python
from test_register_accessor import __name__
```



---
## test_dirname_mixin
```python
from test_register_accessor import test_dirname_mixin
```



---
## ensure_removed
```python
from test_register_accessor import ensure_removed
```

Ensure that an attribute added to 'obj' during the test is
removed when we're done

---
## MyAccessor
```python
from test_register_accessor import MyAccessor
```



---
## test_register
```python
from test_register_accessor import test_register
```



---
## test_accessor_works
```python
from test_register_accessor import test_accessor_works
```



---
## test_overwrite_warns
```python
from test_register_accessor import test_overwrite_warns
```



---
## test_raises_attribute_error
```python
from test_register_accessor import test_raises_attribute_error
```



---
## X
```python
from test_register_accessor import X
```



---
## __init__
```python
from test_register_accessor import __init__
```



---
## prop
```python
from test_register_accessor import prop
```



---
## method
```python
from test_register_accessor import method
```



---
## Bad
```python
from test_register_accessor import Bad
```



---
## test_get_callable_name
```python
from test_common import test_get_callable_name
```



---
## test_any_none
```python
from test_common import test_any_none
```



---
## test_all_not_none
```python
from test_common import test_all_not_none
```



---
## test_random_state
```python
from test_common import test_random_state
```



---
## test_maybe_match_name
```python
from test_common import test_maybe_match_name
```



---
## test_standardize_mapping
```python
from test_common import test_standardize_mapping
```



---
## test_git_version
```python
from test_common import test_git_version
```



---
## test_version_tag
```python
from test_common import test_version_tag
```



---
## test_serializable
```python
from test_common import test_serializable
```



---
## TestIsBoolIndexer
```python
from test_common import TestIsBoolIndexer
```



---
## test_temp_setattr
```python
from test_common import test_temp_setattr
```



---
## test_str_size
```python
from test_common import test_str_size
```



---
## test_bz2_missing_import
```python
from test_common import test_bz2_missing_import
```



---
## fn
```python
from test_common import fn
```



---
## somecall
```python
from test_common import somecall
```



---
## test_non_bool_array_with_na
```python
from test_common import test_non_bool_array_with_na
```



---
## test_list_subclass
```python
from test_common import test_list_subclass
```



---
## test_frozenlist
```python
from test_common import test_frozenlist
```



---
## __call__
```python
from test_common import __call__
```



---
## MyList
```python
from test_common import MyList
```



---
## __name__
```python
from test_downstream import __name__
```

Testing that we work in the downstream packages

---
## df
```python
from test_downstream import df
```



---
## test_dask
```python
from test_downstream import test_dask
```



---
## test_dask_ufunc
```python
from test_downstream import test_dask_ufunc
```



---
## test_construct_dask_float_array_int_dtype_match_ndarray
```python
from test_downstream import test_construct_dask_float_array_int_dtype_match_ndarray
```



---
## test_xarray
```python
from test_downstream import test_xarray
```



---
## test_xarray_cftimeindex_nearest
```python
from test_downstream import test_xarray_cftimeindex_nearest
```



---
## test_oo_optimizable
```python
from test_downstream import test_oo_optimizable
```



---
## test_oo_optimized_datetime_index_unpickle
```python
from test_downstream import test_oo_optimized_datetime_index_unpickle
```



---
## test_statsmodels
```python
from test_downstream import test_statsmodels
```



---
## test_scikit_learn
```python
from test_downstream import test_scikit_learn
```



---
## test_seaborn
```python
from test_downstream import test_seaborn
```



---
## test_pandas_datareader
```python
from test_downstream import test_pandas_datareader
```



---
## test_pyarrow
```python
from test_downstream import test_pyarrow
```



---
## test_yaml_dump
```python
from test_downstream import test_yaml_dump
```



---
## test_missing_required_dependency
```python
from test_downstream import test_missing_required_dependency
```



---
## test_frame_setitem_dask_array_into_new_col
```python
from test_downstream import test_frame_setitem_dask_array_into_new_col
```



---
## test_pandas_priority
```python
from test_downstream import test_pandas_priority
```



---
## array_likes
```python
from test_downstream import array_likes
```

Fixture giving a numpy array and a parametrized 'data' object, which can
be a memoryview, array, dask or xarray object created from the numpy array.

---
## test_from_obscure_array
```python
from test_downstream import test_from_obscure_array
```



---
## test_dataframe_consortium
```python
from test_downstream import test_dataframe_consortium
```

Test some basic methods of the dataframe consortium standard.

Full testing is done at https://github.com/data-apis/dataframe-api-compat,
this is just to check that the entry point works as expected.

---
## test_xarray_coerce_unit
```python
from test_downstream import test_xarray_coerce_unit
```



---
## MyClass
```python
from test_downstream import MyClass
```



---
## __radd__
```python
from test_downstream import __radd__
```



---
## test_exception_importable
```python
from test_errors import test_exception_importable
```



---
## test_catch_oob
```python
from test_errors import test_catch_oob
```



---
## test_catch_undefined_variable_error
```python
from test_errors import test_catch_undefined_variable_error
```



---
## Foo
```python
from test_errors import Foo
```



---
## test_AbstractMethodError_classmethod
```python
from test_errors import test_AbstractMethodError_classmethod
```



---
## classmethod
```python
from test_errors import classmethod
```



---
## property
```python
from test_errors import property
```



---
## method
```python
from test_errors import method
```



---
## __name__
```python
from test_sorting import __name__
```



---
## left_right
```python
from test_sorting import left_right
```



---
## TestSorting
```python
from test_sorting import TestSorting
```



---
## TestMerge
```python
from test_sorting import TestMerge
```



---
## test_decons
```python
from test_sorting import test_decons
```



---
## TestSafeSort
```python
from test_sorting import TestSafeSort
```



---
## test_mixed_str_null
```python
from test_sorting import test_mixed_str_null
```



---
## test_safe_sort_multiindex
```python
from test_sorting import test_safe_sort_multiindex
```



---
## test_int64_overflow
```python
from test_sorting import test_int64_overflow
```



---
## test_int64_overflow_groupby_large_range
```python
from test_sorting import test_int64_overflow_groupby_large_range
```



---
## test_int64_overflow_groupby_large_df_shuffled
```python
from test_sorting import test_int64_overflow_groupby_large_df_shuffled
```



---
## test_lexsort_indexer
```python
from test_sorting import test_lexsort_indexer
```



---
## test_nargsort
```python
from test_sorting import test_nargsort
```



---
## test_int64_overflow_outer_merge
```python
from test_sorting import test_int64_overflow_outer_merge
```



---
## test_int64_overflow_check_sum_col
```python
from test_sorting import test_int64_overflow_check_sum_col
```



---
## test_int64_overflow_how_merge
```python
from test_sorting import test_int64_overflow_how_merge
```



---
## test_int64_overflow_sort_false_order
```python
from test_sorting import test_int64_overflow_sort_false_order
```



---
## test_int64_overflow_one_to_many_none_match
```python
from test_sorting import test_int64_overflow_one_to_many_none_match
```



---
## test_basic_sort
```python
from test_sorting import test_basic_sort
```



---
## test_codes
```python
from test_sorting import test_codes
```



---
## test_codes_out_of_bound
```python
from test_sorting import test_codes_out_of_bound
```



---
## test_mixed_integer
```python
from test_sorting import test_mixed_integer
```



---
## test_mixed_integer_with_codes
```python
from test_sorting import test_mixed_integer_with_codes
```



---
## test_unsortable
```python
from test_sorting import test_unsortable
```



---
## test_exceptions
```python
from test_sorting import test_exceptions
```



---
## test_extension_array
```python
from test_sorting import test_extension_array
```



---
## test_extension_array_codes
```python
from test_sorting import test_extension_array_codes
```



---
## align
```python
from test_sorting import align
```



---
## __name__
```python
from test_aggregation import __name__
```



---
## test_maybe_mangle_lambdas_passthrough
```python
from test_aggregation import test_maybe_mangle_lambdas_passthrough
```



---
## test_maybe_mangle_lambdas_listlike
```python
from test_aggregation import test_maybe_mangle_lambdas_listlike
```



---
## test_maybe_mangle_lambdas
```python
from test_aggregation import test_maybe_mangle_lambdas
```



---
## test_maybe_mangle_lambdas_args
```python
from test_aggregation import test_maybe_mangle_lambdas_args
```



---
## test_maybe_mangle_lambdas_named
```python
from test_aggregation import test_maybe_mangle_lambdas_named
```



---
## test_make_unique
```python
from test_aggregation import test_make_unique
```



---
## __name__
```python
from test_nanops import __name__
```



---
## disable_bottleneck
```python
from test_nanops import disable_bottleneck
```



---
## arr_shape
```python
from test_nanops import arr_shape
```



---
## arr_float
```python
from test_nanops import arr_float
```



---
## arr_complex
```python
from test_nanops import arr_complex
```



---
## arr_int
```python
from test_nanops import arr_int
```



---
## arr_bool
```python
from test_nanops import arr_bool
```



---
## arr_str
```python
from test_nanops import arr_str
```



---
## arr_utf
```python
from test_nanops import arr_utf
```



---
## arr_date
```python
from test_nanops import arr_date
```



---
## arr_tdelta
```python
from test_nanops import arr_tdelta
```



---
## arr_nan
```python
from test_nanops import arr_nan
```



---
## arr_float_nan
```python
from test_nanops import arr_float_nan
```



---
## arr_nan_float1
```python
from test_nanops import arr_nan_float1
```



---
## arr_nan_nan
```python
from test_nanops import arr_nan_nan
```



---
## arr_inf
```python
from test_nanops import arr_inf
```



---
## arr_float_inf
```python
from test_nanops import arr_float_inf
```



---
## arr_nan_inf
```python
from test_nanops import arr_nan_inf
```



---
## arr_float_nan_inf
```python
from test_nanops import arr_float_nan_inf
```



---
## arr_nan_nan_inf
```python
from test_nanops import arr_nan_nan_inf
```



---
## arr_obj
```python
from test_nanops import arr_obj
```



---
## arr_nan_nanj
```python
from test_nanops import arr_nan_nanj
```



---
## arr_complex_nan
```python
from test_nanops import arr_complex_nan
```



---
## arr_nan_infj
```python
from test_nanops import arr_nan_infj
```



---
## arr_complex_nan_infj
```python
from test_nanops import arr_complex_nan_infj
```



---
## arr_float_1d
```python
from test_nanops import arr_float_1d
```



---
## arr_nan_1d
```python
from test_nanops import arr_nan_1d
```



---
## arr_float_nan_1d
```python
from test_nanops import arr_float_nan_1d
```



---
## arr_float1_nan_1d
```python
from test_nanops import arr_float1_nan_1d
```



---
## arr_nan_float1_1d
```python
from test_nanops import arr_nan_float1_1d
```



---
## TestnanopsDataFrame
```python
from test_nanops import TestnanopsDataFrame
```



---
## test_has_infs_non_float
```python
from test_nanops import test_has_infs_non_float
```



---
## test_has_infs_floats
```python
from test_nanops import test_has_infs_floats
```



---
## test_bn_ok_dtype
```python
from test_nanops import test_bn_ok_dtype
```



---
## test_bn_not_ok_dtype
```python
from test_nanops import test_bn_not_ok_dtype
```



---
## TestEnsureNumeric
```python
from test_nanops import TestEnsureNumeric
```



---
## TestNanvarFixedValues
```python
from test_nanops import TestNanvarFixedValues
```



---
## TestNanskewFixedValues
```python
from test_nanops import TestNanskewFixedValues
```



---
## TestNankurtFixedValues
```python
from test_nanops import TestNankurtFixedValues
```



---
## TestDatetime64NaNOps
```python
from test_nanops import TestDatetime64NaNOps
```



---
## test_use_bottleneck
```python
from test_nanops import test_use_bottleneck
```



---
## test_numpy_ops
```python
from test_nanops import test_numpy_ops
```



---
## test_nanops_independent_of_mask_param
```python
from test_nanops import test_nanops_independent_of_mask_param
```



---
## test_check_below_min_count_negative_or_zero_min_count
```python
from test_nanops import test_check_below_min_count_negative_or_zero_min_count
```



---
## test_check_below_min_count_positive_min_count
```python
from test_nanops import test_check_below_min_count_positive_min_count
```



---
## test_check_below_min_count_large_shape
```python
from test_nanops import test_check_below_min_count_large_shape
```



---
## test_check_bottleneck_disallow
```python
from test_nanops import test_check_bottleneck_disallow
```



---
## test_nanmean_overflow
```python
from test_nanops import test_nanmean_overflow
```



---
## test_returned_dtype
```python
from test_nanops import test_returned_dtype
```



---
## setup_method
```python
from test_nanops import setup_method
```



---
## teardown_method
```python
from test_nanops import teardown_method
```



---
## check_results
```python
from test_nanops import check_results
```



---
## check_fun_data
```python
from test_nanops import check_fun_data
```



---
## check_fun
```python
from test_nanops import check_fun
```



---
## check_funs
```python
from test_nanops import check_funs
```



---
## _badobj_wrap
```python
from test_nanops import _badobj_wrap
```



---
## test_nan_funcs
```python
from test_nanops import test_nan_funcs
```



---
## test_nansum
```python
from test_nanops import test_nansum
```



---
## test_nanmean
```python
from test_nanops import test_nanmean
```



---
## test_nanmedian
```python
from test_nanops import test_nanmedian
```



---
## test_nanvar
```python
from test_nanops import test_nanvar
```



---
## test_nanstd
```python
from test_nanops import test_nanstd
```



---
## test_nansem
```python
from test_nanops import test_nansem
```



---
## test_nanops_with_warnings
```python
from test_nanops import test_nanops_with_warnings
```



---
## _argminmax_wrap
```python
from test_nanops import _argminmax_wrap
```



---
## test_nanargmax
```python
from test_nanops import test_nanargmax
```



---
## test_nanargmin
```python
from test_nanops import test_nanargmin
```



---
## _skew_kurt_wrap
```python
from test_nanops import _skew_kurt_wrap
```



---
## test_nanskew
```python
from test_nanops import test_nanskew
```



---
## test_nankurt
```python
from test_nanops import test_nankurt
```



---
## test_nanprod
```python
from test_nanops import test_nanprod
```



---
## check_nancorr_nancov_2d
```python
from test_nanops import check_nancorr_nancov_2d
```



---
## check_nancorr_nancov_1d
```python
from test_nanops import check_nancorr_nancov_1d
```



---
## test_nancorr
```python
from test_nanops import test_nancorr
```



---
## test_nancorr_pearson
```python
from test_nanops import test_nancorr_pearson
```



---
## test_nancorr_kendall
```python
from test_nanops import test_nancorr_kendall
```



---
## test_nancorr_spearman
```python
from test_nanops import test_nancorr_spearman
```



---
## test_invalid_method
```python
from test_nanops import test_invalid_method
```



---
## test_nancov
```python
from test_nanops import test_nancov
```



---
## test_numeric_values
```python
from test_nanops import test_numeric_values
```



---
## test_ndarray
```python
from test_nanops import test_ndarray
```



---
## test_convertable_values
```python
from test_nanops import test_convertable_values
```



---
## test_non_convertable_values
```python
from test_nanops import test_non_convertable_values
```



---
## variance
```python
from test_nanops import variance
```



---
## samples
```python
from test_nanops import samples
```



---
## test_nanvar_all_finite
```python
from test_nanops import test_nanvar_all_finite
```



---
## test_nanvar_nans
```python
from test_nanops import test_nanvar_nans
```



---
## test_nanstd_nans
```python
from test_nanops import test_nanstd_nans
```



---
## test_nanvar_axis
```python
from test_nanops import test_nanvar_axis
```



---
## test_nanvar_ddof
```python
from test_nanops import test_nanvar_ddof
```



---
## test_ground_truth
```python
from test_nanops import test_ground_truth
```



---
## test_nanstd_roundoff
```python
from test_nanops import test_nanstd_roundoff
```



---
## prng
```python
from test_nanops import prng
```



---
## actual_skew
```python
from test_nanops import actual_skew
```



---
## test_constant_series
```python
from test_nanops import test_constant_series
```



---
## test_all_finite
```python
from test_nanops import test_all_finite
```



---
## test_axis
```python
from test_nanops import test_axis
```



---
## test_nans
```python
from test_nanops import test_nans
```



---
## test_nans_skipna
```python
from test_nanops import test_nans_skipna
```



---
## actual_kurt
```python
from test_nanops import actual_kurt
```



---
## unit
```python
from test_nanops import unit
```



---
## test_nanmean_skipna_false
```python
from test_nanops import test_nanmean_skipna_false
```



---
## __name__
```python
from test_take import __name__
```



---
## dtype_fill_out_dtype
```python
from test_take import dtype_fill_out_dtype
```



---
## TestTake
```python
from test_take import TestTake
```



---
## TestExtensionTake
```python
from test_take import TestExtensionTake
```



---
## test_1d_fill_nonna
```python
from test_take import test_1d_fill_nonna
```



---
## test_2d_fill_nonna
```python
from test_take import test_2d_fill_nonna
```



---
## test_3d_fill_nonna
```python
from test_take import test_3d_fill_nonna
```



---
## test_1d_other_dtypes
```python
from test_take import test_1d_other_dtypes
```



---
## test_2d_other_dtypes
```python
from test_take import test_2d_other_dtypes
```



---
## test_1d_bool
```python
from test_take import test_1d_bool
```



---
## test_2d_bool
```python
from test_take import test_2d_bool
```



---
## test_2d_float32
```python
from test_take import test_2d_float32
```



---
## test_2d_datetime64
```python
from test_take import test_2d_datetime64
```



---
## test_take_axis_0
```python
from test_take import test_take_axis_0
```



---
## test_take_axis_1
```python
from test_take import test_take_axis_1
```



---
## test_take_non_hashable_fill_value
```python
from test_take import test_take_non_hashable_fill_value
```



---
## test_bounds_check_large
```python
from test_take import test_bounds_check_large
```



---
## test_bounds_check_small
```python
from test_take import test_bounds_check_small
```



---
## test_take_empty
```python
from test_take import test_take_empty
```



---
## test_take_na_empty
```python
from test_take import test_take_na_empty
```



---
## test_take_coerces_list
```python
from test_take import test_take_coerces_list
```



---
## __name__
```python
from test_algos import __name__
```



---
## TestFactorize
```python
from test_algos import TestFactorize
```



---
## TestUnique
```python
from test_algos import TestUnique
```



---
## test_nunique_ints
```python
from test_algos import test_nunique_ints
```



---
## TestIsin
```python
from test_algos import TestIsin
```



---
## TestValueCounts
```python
from test_algos import TestValueCounts
```



---
## TestDuplicated
```python
from test_algos import TestDuplicated
```



---
## TestHashTable
```python
from test_algos import TestHashTable
```



---
## TestRank
```python
from test_algos import TestRank
```



---
## TestMode
```python
from test_algos import TestMode
```



---
## TestDiff
```python
from test_algos import TestDiff
```



---
## test_union_with_duplicates
```python
from test_algos import test_union_with_duplicates
```



---
## test_factorize_complex
```python
from test_algos import test_factorize_complex
```



---
## test_factorize
```python
from test_algos import test_factorize
```



---
## test_series_factorize_use_na_sentinel_false
```python
from test_algos import test_series_factorize_use_na_sentinel_false
```



---
## test_basic
```python
from test_algos import test_basic
```



---
## test_mixed
```python
from test_algos import test_mixed
```



---
## test_factorize_datetime64
```python
from test_algos import test_factorize_datetime64
```



---
## test_factorize_period
```python
from test_algos import test_factorize_period
```



---
## test_factorize_timedelta
```python
from test_algos import test_factorize_timedelta
```



---
## test_factorize_nan
```python
from test_algos import test_factorize_nan
```



---
## test_factorizer_with_mask
```python
from test_algos import test_factorizer_with_mask
```



---
## test_factorizer_object_with_nan
```python
from test_algos import test_factorizer_object_with_nan
```



---
## test_factorize_tuple_list
```python
from test_algos import test_factorize_tuple_list
```



---
## test_complex_sorting
```python
from test_algos import test_complex_sorting
```



---
## test_numeric_dtype_factorize
```python
from test_algos import test_numeric_dtype_factorize
```



---
## test_float64_factorize
```python
from test_algos import test_float64_factorize
```



---
## test_uint64_factorize
```python
from test_algos import test_uint64_factorize
```



---
## test_int64_factorize
```python
from test_algos import test_int64_factorize
```



---
## test_string_factorize
```python
from test_algos import test_string_factorize
```



---
## test_object_factorize
```python
from test_algos import test_object_factorize
```



---
## test_datetime64_factorize
```python
from test_algos import test_datetime64_factorize
```



---
## test_factorize_rangeindex
```python
from test_algos import test_factorize_rangeindex
```



---
## test_factorize_rangeindex_decreasing
```python
from test_algos import test_factorize_rangeindex_decreasing
```



---
## test_deprecate_order
```python
from test_algos import test_deprecate_order
```



---
## test_parametrized_factorize_na_value_default
```python
from test_algos import test_parametrized_factorize_na_value_default
```



---
## test_parametrized_factorize_na_value
```python
from test_algos import test_parametrized_factorize_na_value
```



---
## test_factorize_use_na_sentinel
```python
from test_algos import test_factorize_use_na_sentinel
```



---
## test_object_factorize_use_na_sentinel_false
```python
from test_algos import test_object_factorize_use_na_sentinel_false
```



---
## test_int_factorize_use_na_sentinel_false
```python
from test_algos import test_int_factorize_use_na_sentinel_false
```



---
## test_factorize_mixed_values
```python
from test_algos import test_factorize_mixed_values
```



---
## test_factorize_interval_non_nano
```python
from test_algos import test_factorize_interval_non_nano
```



---
## test_ints
```python
from test_algos import test_ints
```



---
## test_objects
```python
from test_algos import test_objects
```



---
## test_object_refcount_bug
```python
from test_algos import test_object_refcount_bug
```



---
## test_on_index_object
```python
from test_algos import test_on_index_object
```



---
## test_dtype_preservation
```python
from test_algos import test_dtype_preservation
```



---
## test_datetime64_dtype_array_returned
```python
from test_algos import test_datetime64_dtype_array_returned
```



---
## test_datetime_non_ns
```python
from test_algos import test_datetime_non_ns
```



---
## test_timedelta_non_ns
```python
from test_algos import test_timedelta_non_ns
```



---
## test_timedelta64_dtype_array_returned
```python
from test_algos import test_timedelta64_dtype_array_returned
```



---
## test_uint64_overflow
```python
from test_algos import test_uint64_overflow
```



---
## test_nan_in_object_array
```python
from test_algos import test_nan_in_object_array
```



---
## test_categorical
```python
from test_algos import test_categorical
```



---
## test_datetime64tz_aware
```python
from test_algos import test_datetime64tz_aware
```



---
## test_order_of_appearance
```python
from test_algos import test_order_of_appearance
```



---
## test_order_of_appearance_dt64
```python
from test_algos import test_order_of_appearance_dt64
```



---
## test_order_of_appearance_dt64tz
```python
from test_algos import test_order_of_appearance_dt64tz
```



---
## test_tuple_with_strings
```python
from test_algos import test_tuple_with_strings
```



---
## test_obj_none_preservation
```python
from test_algos import test_obj_none_preservation
```



---
## test_signed_zero
```python
from test_algos import test_signed_zero
```



---
## test_different_nans
```python
from test_algos import test_different_nans
```



---
## test_first_nan_kept
```python
from test_algos import test_first_nan_kept
```



---
## test_do_not_mangle_na_values
```python
from test_algos import test_do_not_mangle_na_values
```



---
## test_unique_masked
```python
from test_algos import test_unique_masked
```



---
## test_invalid
```python
from test_algos import test_invalid
```



---
## test_i8
```python
from test_algos import test_i8
```



---
## test_isin_datetimelike_values_numeric_comps
```python
from test_algos import test_isin_datetimelike_values_numeric_comps
```



---
## test_large
```python
from test_algos import test_large
```



---
## test_isin_datetimelike_all_nat
```python
from test_algos import test_isin_datetimelike_all_nat
```



---
## test_isin_datetimelike_strings_deprecated
```python
from test_algos import test_isin_datetimelike_strings_deprecated
```



---
## test_isin_dt64tz_with_nat
```python
from test_algos import test_isin_dt64tz_with_nat
```



---
## test_categorical_from_codes
```python
from test_algos import test_categorical_from_codes
```



---
## test_categorical_isin
```python
from test_algos import test_categorical_isin
```



---
## test_same_nan_is_in
```python
from test_algos import test_same_nan_is_in
```



---
## test_same_nan_is_in_large
```python
from test_algos import test_same_nan_is_in_large
```



---
## test_same_nan_is_in_large_series
```python
from test_algos import test_same_nan_is_in_large_series
```



---
## test_same_object_is_in
```python
from test_algos import test_same_object_is_in
```



---
## test_no_cast
```python
from test_algos import test_no_cast
```



---
## test_empty
```python
from test_algos import test_empty
```



---
## test_different_nan_objects
```python
from test_algos import test_different_nan_objects
```



---
## test_different_nans_as_float64
```python
from test_algos import test_different_nans_as_float64
```



---
## test_isin_int_df_string_search
```python
from test_algos import test_isin_int_df_string_search
```

Comparing df with int`s (1,2) with a string at isin() ("1")
-> should not match values because int 1 is not equal str 1

---
## test_isin_nan_df_string_search
```python
from test_algos import test_isin_nan_df_string_search
```

Comparing df with nan value (np.nan,2) with a string at isin() ("NaN")
-> should not match values because np.nan is not equal str NaN

---
## test_isin_float_df_string_search
```python
from test_algos import test_isin_float_df_string_search
```

Comparing df with floats (1.4245,2.32441) with a string at isin() ("1.4245")
-> should not match values because float 1.4245 is not equal str 1.4245

---
## test_isin_unsigned_dtype
```python
from test_algos import test_isin_unsigned_dtype
```



---
## test_value_counts
```python
from test_algos import test_value_counts
```



---
## test_value_counts_bins
```python
from test_algos import test_value_counts_bins
```



---
## test_value_counts_dtypes
```python
from test_algos import test_value_counts_dtypes
```



---
## test_value_counts_nat
```python
from test_algos import test_value_counts_nat
```



---
## test_value_counts_datetime_outofbounds
```python
from test_algos import test_value_counts_datetime_outofbounds
```



---
## test_categorical_nans
```python
from test_algos import test_categorical_nans
```



---
## test_categorical_zeroes
```python
from test_algos import test_categorical_zeroes
```



---
## test_value_counts_dropna
```python
from test_algos import test_value_counts_dropna
```



---
## test_value_counts_normalized
```python
from test_algos import test_value_counts_normalized
```



---
## test_value_counts_uint64
```python
from test_algos import test_value_counts_uint64
```



---
## test_value_counts_series
```python
from test_algos import test_value_counts_series
```



---
## test_duplicated_with_nas
```python
from test_algos import test_duplicated_with_nas
```



---
## test_numeric_object_likes
```python
from test_algos import test_numeric_object_likes
```



---
## test_datetime_likes
```python
from test_algos import test_datetime_likes
```



---
## test_unique_index
```python
from test_algos import test_unique_index
```



---
## test_unique_tuples
```python
from test_algos import test_unique_tuples
```



---
## test_unique_complex_numbers
```python
from test_algos import test_unique_complex_numbers
```



---
## test_hashtable_unique
```python
from test_algos import test_hashtable_unique
```



---
## test_hashtable_factorize
```python
from test_algos import test_hashtable_factorize
```



---
## test_scipy_compat
```python
from test_algos import test_scipy_compat
```



---
## test_too_many_ndims
```python
from test_algos import test_too_many_ndims
```



---
## test_pct_max_many_rows
```python
from test_algos import test_pct_max_many_rows
```



---
## test_no_mode
```python
from test_algos import test_no_mode
```



---
## test_mode_single
```python
from test_algos import test_mode_single
```



---
## test_mode_obj_int
```python
from test_algos import test_mode_obj_int
```



---
## test_number_mode
```python
from test_algos import test_number_mode
```



---
## test_strobj_mode
```python
from test_algos import test_strobj_mode
```



---
## test_strobj_multi_char
```python
from test_algos import test_strobj_multi_char
```



---
## test_datelike_mode
```python
from test_algos import test_datelike_mode
```



---
## test_timedelta_mode
```python
from test_algos import test_timedelta_mode
```



---
## test_mixed_dtype
```python
from test_algos import test_mixed_dtype
```



---
## test_index
```python
from test_algos import test_index
```



---
## test_ser_mode_with_name
```python
from test_algos import test_ser_mode_with_name
```



---
## test_diff_datetimelike_nat
```python
from test_algos import test_diff_datetimelike_nat
```



---
## test_diff_ea_axis
```python
from test_algos import test_diff_ea_axis
```



---
## test_diff_low_precision_int
```python
from test_algos import test_diff_low_precision_int
```



---
## LikeNan
```python
from test_algos import LikeNan
```



---
## __eq__
```python
from test_algos import __eq__
```



---
## __hash__
```python
from test_algos import __hash__
```



---
## __name__
```python
from test_multilevel import __name__
```



---
## TestMultiLevel
```python
from test_multilevel import TestMultiLevel
```



---
## TestSorted
```python
from test_multilevel import TestSorted
```

everything you wanted to test about sorting

---
## test_reindex_level
```python
from test_multilevel import test_reindex_level
```



---
## test_reindex
```python
from test_multilevel import test_reindex
```



---
## test_reindex_preserve_levels
```python
from test_multilevel import test_reindex_preserve_levels
```



---
## test_groupby_transform
```python
from test_multilevel import test_groupby_transform
```



---
## test_groupby_corner
```python
from test_multilevel import test_groupby_corner
```



---
## test_groupby_level_no_obs
```python
from test_multilevel import test_groupby_level_no_obs
```



---
## test_setitem_with_expansion_multiindex_columns
```python
from test_multilevel import test_setitem_with_expansion_multiindex_columns
```



---
## test_alignment
```python
from test_multilevel import test_alignment
```



---
## test_groupby_multilevel
```python
from test_multilevel import test_groupby_multilevel
```



---
## test_multilevel_consolidate
```python
from test_multilevel import test_multilevel_consolidate
```



---
## test_level_with_tuples
```python
from test_multilevel import test_level_with_tuples
```



---
## test_reindex_level_partial_selection
```python
from test_multilevel import test_reindex_level_partial_selection
```



---
## test_empty_frame_groupby_dtypes_consistency
```python
from test_multilevel import test_empty_frame_groupby_dtypes_consistency
```



---
## test_duplicate_groupby_issues
```python
from test_multilevel import test_duplicate_groupby_issues
```



---
## test_subsets_multiindex_dtype
```python
from test_multilevel import test_subsets_multiindex_dtype
```



---
## test_datetime_object_multiindex
```python
from test_multilevel import test_datetime_object_multiindex
```



---
## test_multiindex_with_na
```python
from test_multilevel import test_multiindex_with_na
```



---
## test_sort_non_lexsorted
```python
from test_multilevel import test_sort_non_lexsorted
```



---
## __name__
```python
from test_flags import __name__
```



---
## TestFlags
```python
from test_flags import TestFlags
```



---
## test_equality
```python
from test_flags import test_equality
```



---
## test_set
```python
from test_flags import test_set
```



---
## test_repr
```python
from test_flags import test_repr
```



---
## test_obj_ref
```python
from test_flags import test_obj_ref
```



---
## test_getitem
```python
from test_flags import test_getitem
```



---
## __name__
```python
from _hypothesis import __name__
```

Hypothesis data generator helpers.

---
## get_dtype
```python
from compat import get_dtype
```



---
## get_obj
```python
from compat import get_obj
```

For sharing tests using frame_or_series, either return the DataFrame
unchanged or return it's first column as a Series.

---
## round_trip_pickle
```python
from _io import round_trip_pickle
```

Pickle an object and then read it again.

Parameters
----------
obj : any object
    The object to pickle and then re-read.
path : str, path object or file-like object, default None
    The path where the pickled object is written and then read.

Returns
-------
pandas object
    The original object that was pickled and then re-read.

---
## round_trip_pathlib
```python
from _io import round_trip_pathlib
```

Write an object to file specified by a pathlib.Path and read it back

Parameters
----------
writer : callable bound to pandas object
    IO writing function (e.g. DataFrame.to_csv )
reader : callable
    IO reading function (e.g. pd.read_csv )
path : str, default None
    The path where the object is written and then read.

Returns
-------
pandas object
    The original object that was serialized and then re-read.

---
## round_trip_localpath
```python
from _io import round_trip_localpath
```

Write an object to file specified by a py.path LocalPath and read it back.

Parameters
----------
writer : callable bound to pandas object
    IO writing function (e.g. DataFrame.to_csv )
reader : callable
    IO reading function (e.g. pd.read_csv )
path : str, default None
    The path where the object is written and then read.

Returns
-------
pandas object
    The original object that was serialized and then re-read.

---
## write_to_compressed
```python
from _io import write_to_compressed
```

Write data to a compressed file.

Parameters
----------
compression : {'gzip', 'bz2', 'zip', 'xz', 'zstd'}
    The compression type to use.
path : str
    The file path to write the data.
data : str
    The data to write.
dest : str, default "test"
    The destination file (for ZIP only)

Raises
------
ValueError : An invalid compression value was passed in.

---
## box_expected
```python
from __init__ import box_expected
```

Helper function to wrap the expected output of a test in a given box_class.

Parameters
----------
expected : np.ndarray, Index, Series
box_cls : {Index, Series, DataFrame}

Returns
-------
subclass of box_cls

---
## to_array
```python
from __init__ import to_array
```

Similar to pd.array, but does not cast numpy dtypes to nullable dtypes.

---
## SubclassedSeries
```python
from __init__ import SubclassedSeries
```



---
## SubclassedDataFrame
```python
from __init__ import SubclassedDataFrame
```



---
## convert_rows_list_to_csv_str
```python
from __init__ import convert_rows_list_to_csv_str
```

Convert list of CSV rows to single CSV-formatted string for current OS.

This method is used for creating expected value of to_csv() method.

Parameters
----------
rows_list : List[str]
    Each element represents the row of csv.

Returns
-------
str
    Expected output of to_csv() in current OS.

---
## external_error_raised
```python
from __init__ import external_error_raised
```

Helper function to mark pytest.raises that have an external error message.

Parameters
----------
expected_exception : Exception
    Expected error to raise.

Returns
-------
Callable
    Regular `pytest.raises` function with `match` equal to `None`.

---
## get_cython_table_params
```python
from __init__ import get_cython_table_params
```

Combine frame, functions from com._cython_table
keys and expected result.

Parameters
----------
ndframe : DataFrame or Series
func_names_and_expected : Sequence of two items
    The first item is a name of a NDFrame method ('sum', 'prod') etc.
    The second item is the expected return value.

Returns
-------
list
    List of three items (DataFrame, function, expected result)

---
## get_op_from_name
```python
from __init__ import get_op_from_name
```

The operator function for a given op name.

Parameters
----------
op_name : str
    The op name, in form of "add" or "__add__".

Returns
-------
function
    A function performing the operation.

---
## getitem
```python
from __init__ import getitem
```



---
## setitem
```python
from __init__ import setitem
```



---
## loc
```python
from __init__ import loc
```



---
## iloc
```python
from __init__ import iloc
```



---
## iat
```python
from __init__ import iat
```



---
## get_finest_unit
```python
from __init__ import get_finest_unit
```

Find the higher of two datetime64 units.

---
## shares_memory
```python
from __init__ import shares_memory
```

Pandas-compat for np.shares_memory.

---
## _constructor
```python
from __init__ import _constructor
```



---
## _constructor_expanddim
```python
from __init__ import _constructor_expanddim
```



---
## _constructor_sliced
```python
from __init__ import _constructor_sliced
```



---
## assert_produces_warning
```python
from _warnings import assert_produces_warning
```

Context manager for running code expected to either raise a specific warning,
multiple specific warnings, or not raise any warnings. Verifies that the code
raises the expected warning(s), and that it does not raise any other unexpected
warnings. It is basically a wrapper around ``warnings.catch_warnings``.

Parameters
----------
expected_warning : {Warning, False, tuple[Warning, ...], None}, default Warning
    The type of Exception raised. ``exception.Warning`` is the base
    class for all warnings. To raise multiple types of exceptions,
    pass them as a tuple. To check that no warning is returned,
    specify ``False`` or ``None``.
filter_level : str or None, default "always"
    Specifies whether warnings are ignored, displayed, or turned
    into errors.
    Valid values are:

    * "error" - turns matching warnings into exceptions
    * "ignore" - discard the warning
    * "always" - always emit a warning
    * "default" - print the warning the first time it is generated
      from each location
    * "module" - print the warning the first time it is generated
      from each module
    * "once" - print the warning the first time it is generated

check_stacklevel : bool, default True
    If True, displays the line that called the function containing
    the warning to show were the function is called. Otherwise, the
    line that implements the function is displayed.
raise_on_extra_warnings : bool, default True
    Whether extra warnings not of the type `expected_warning` should
    cause the test to fail.
match : str, optional
    Match warning message.

Examples
--------
>>> import warnings
>>> with assert_produces_warning():
...     warnings.warn(UserWarning())
...
>>> with assert_produces_warning(False):
...     warnings.warn(RuntimeWarning())
...
Traceback (most recent call last):
    ...
AssertionError: Caused unexpected warning(s): ['RuntimeWarning'].
>>> with assert_produces_warning(UserWarning):
...     warnings.warn(RuntimeWarning())
Traceback (most recent call last):
    ...
AssertionError: Did not see expected warning of class 'UserWarning'.

..warn:: This is *not* thread-safe.

---
## maybe_produces_warning
```python
from _warnings import maybe_produces_warning
```

Return a context manager that possibly checks a warning based on the condition

---
## _assert_caught_expected_warning
```python
from _warnings import _assert_caught_expected_warning
```

Assert that there was the expected warning among the caught warnings.

---
## _assert_caught_no_extra_warnings
```python
from _warnings import _assert_caught_no_extra_warnings
```

Assert that no extra warnings apart from the expected ones are caught.

---
## _is_unexpected_warning
```python
from _warnings import _is_unexpected_warning
```

Check if the actual warning issued is unexpected.

---
## _assert_raised_with_correct_stacklevel
```python
from _warnings import _assert_raised_with_correct_stacklevel
```



---
## __name__
```python
from asserters import __name__
```



---
## assert_almost_equal
```python
from asserters import assert_almost_equal
```

Check that the left and right objects are approximately equal.

By approximately equal, we refer to objects that are numbers or that
contain numbers which may be equivalent to specific levels of precision.

Parameters
----------
left : object
right : object
check_dtype : bool or {'equiv'}, default 'equiv'
    Check dtype if both a and b are the same type. If 'equiv' is passed in,
    then `RangeIndex` and `Index` with int64 dtype are also considered
    equivalent when doing type checking.
rtol : float, default 1e-5
    Relative tolerance.
atol : float, default 1e-8
    Absolute tolerance.

---
## _check_isinstance
```python
from asserters import _check_isinstance
```

Helper method for our assert_* methods that ensures that
the two objects being compared have the right type before
proceeding with the comparison.

Parameters
----------
left : The first object being compared.
right : The second object being compared.
cls : The class type to check against.

Raises
------
AssertionError : Either `left` or `right` is not an instance of `cls`.

---
## assert_dict_equal
```python
from asserters import assert_dict_equal
```



---
## assert_index_equal
```python
from asserters import assert_index_equal
```

Check that left and right Index are equal.

Parameters
----------
left : Index
right : Index
exact : bool or {'equiv'}, default 'equiv'
    Whether to check the Index class, dtype and inferred_type
    are identical. If 'equiv', then RangeIndex can be substituted for
    Index with an int64 dtype as well.
check_names : bool, default True
    Whether to check the names attribute.
check_exact : bool, default True
    Whether to compare number exactly.
check_categorical : bool, default True
    Whether to compare internal Categorical exactly.
check_order : bool, default True
    Whether to compare the order of index entries as well as their values.
    If True, both indexes must contain the same elements, in the same order.
    If False, both indexes must contain the same elements, but in any order.
rtol : float, default 1e-5
    Relative tolerance. Only used when check_exact is False.
atol : float, default 1e-8
    Absolute tolerance. Only used when check_exact is False.
obj : str, default 'Index'
    Specify object name being compared, internally used to show appropriate
    assertion message.

Examples
--------
>>> from pandas import testing as tm
>>> a = pd.Index([1, 2, 3])
>>> b = pd.Index([1, 2, 3])
>>> tm.assert_index_equal(a, b)

---
## assert_class_equal
```python
from asserters import assert_class_equal
```

Checks classes are equal.

---
## assert_attr_equal
```python
from asserters import assert_attr_equal
```

Check attributes are equal. Both objects must have attribute.

Parameters
----------
attr : str
    Attribute name being compared.
left : object
right : object
obj : str, default 'Attributes'
    Specify object name being compared, internally used to show appropriate
    assertion message

---
## assert_is_valid_plot_return_object
```python
from asserters import assert_is_valid_plot_return_object
```



---
## assert_is_sorted
```python
from asserters import assert_is_sorted
```

Assert that the sequence is sorted.

---
## assert_categorical_equal
```python
from asserters import assert_categorical_equal
```

Test that Categoricals are equivalent.

Parameters
----------
left : Categorical
right : Categorical
check_dtype : bool, default True
    Check that integer dtype of the codes are the same.
check_category_order : bool, default True
    Whether the order of the categories should be compared, which
    implies identical integer codes.  If False, only the resulting
    values are compared.  The ordered attribute is
    checked regardless.
obj : str, default 'Categorical'
    Specify object name being compared, internally used to show appropriate
    assertion message.

---
## assert_interval_array_equal
```python
from asserters import assert_interval_array_equal
```

Test that two IntervalArrays are equivalent.

Parameters
----------
left, right : IntervalArray
    The IntervalArrays to compare.
exact : bool or {'equiv'}, default 'equiv'
    Whether to check the Index class, dtype and inferred_type
    are identical. If 'equiv', then RangeIndex can be substituted for
    Index with an int64 dtype as well.
obj : str, default 'IntervalArray'
    Specify object name being compared, internally used to show appropriate
    assertion message

---
## assert_period_array_equal
```python
from asserters import assert_period_array_equal
```



---
## assert_datetime_array_equal
```python
from asserters import assert_datetime_array_equal
```



---
## assert_timedelta_array_equal
```python
from asserters import assert_timedelta_array_equal
```



---
## raise_assert_detail
```python
from asserters import raise_assert_detail
```



---
## assert_numpy_array_equal
```python
from asserters import assert_numpy_array_equal
```

Check that 'np.ndarray' is equivalent.

Parameters
----------
left, right : numpy.ndarray or iterable
    The two arrays to be compared.
strict_nan : bool, default False
    If True, consider NaN and None to be different.
check_dtype : bool, default True
    Check dtype if both a and b are np.ndarray.
err_msg : str, default None
    If provided, used as assertion message.
check_same : None|'copy'|'same', default None
    Ensure left and right refer/do not refer to the same memory area.
obj : str, default 'numpy array'
    Specify object name being compared, internally used to show appropriate
    assertion message.
index_values : Index | numpy.ndarray, default None
    optional index (shared by both left and right), used in output.

---
## assert_extension_array_equal
```python
from asserters import assert_extension_array_equal
```

Check that left and right ExtensionArrays are equal.

Parameters
----------
left, right : ExtensionArray
    The two arrays to compare.
check_dtype : bool, default True
    Whether to check if the ExtensionArray dtypes are identical.
index_values : Index | numpy.ndarray, default None
    Optional index (shared by both left and right), used in output.
check_exact : bool, default False
    Whether to compare number exactly.

    .. versionchanged:: 2.2.0

        Defaults to True for integer dtypes if none of
        ``check_exact``, ``rtol`` and ``atol`` are specified.
rtol : float, default 1e-5
    Relative tolerance. Only used when check_exact is False.
atol : float, default 1e-8
    Absolute tolerance. Only used when check_exact is False.
obj : str, default 'ExtensionArray'
    Specify object name being compared, internally used to show appropriate
    assertion message.

    .. versionadded:: 2.0.0

Notes
-----
Missing values are checked separately from valid values.
A mask of missing values is computed for each and checked to match.
The remaining all-valid values are cast to object dtype and checked.

Examples
--------
>>> from pandas import testing as tm
>>> a = pd.Series([1, 2, 3, 4])
>>> b, c = a.array, a.array
>>> tm.assert_extension_array_equal(b, c)

---
## assert_series_equal
```python
from asserters import assert_series_equal
```

Check that left and right Series are equal.

Parameters
----------
left : Series
right : Series
check_dtype : bool, default True
    Whether to check the Series dtype is identical.
check_index_type : bool or {'equiv'}, default 'equiv'
    Whether to check the Index class, dtype and inferred_type
    are identical.
check_series_type : bool, default True
     Whether to check the Series class is identical.
check_names : bool, default True
    Whether to check the Series and Index names attribute.
check_exact : bool, default False
    Whether to compare number exactly.

    .. versionchanged:: 2.2.0

        Defaults to True for integer dtypes if none of
        ``check_exact``, ``rtol`` and ``atol`` are specified.
check_datetimelike_compat : bool, default False
    Compare datetime-like which is comparable ignoring dtype.
check_categorical : bool, default True
    Whether to compare internal Categorical exactly.
check_category_order : bool, default True
    Whether to compare category order of internal Categoricals.
check_freq : bool, default True
    Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex.
check_flags : bool, default True
    Whether to check the `flags` attribute.
rtol : float, default 1e-5
    Relative tolerance. Only used when check_exact is False.
atol : float, default 1e-8
    Absolute tolerance. Only used when check_exact is False.
obj : str, default 'Series'
    Specify object name being compared, internally used to show appropriate
    assertion message.
check_index : bool, default True
    Whether to check index equivalence. If False, then compare only values.

    .. versionadded:: 1.3.0
check_like : bool, default False
    If True, ignore the order of the index. Must be False if check_index is False.
    Note: same labels must be with the same data.

    .. versionadded:: 1.5.0

Examples
--------
>>> from pandas import testing as tm
>>> a = pd.Series([1, 2, 3, 4])
>>> b = pd.Series([1, 2, 3, 4])
>>> tm.assert_series_equal(a, b)

---
## assert_frame_equal
```python
from asserters import assert_frame_equal
```

Check that left and right DataFrame are equal.

This function is intended to compare two DataFrames and output any
differences. It is mostly intended for use in unit tests.
Additional parameters allow varying the strictness of the
equality checks performed.

Parameters
----------
left : DataFrame
    First DataFrame to compare.
right : DataFrame
    Second DataFrame to compare.
check_dtype : bool, default True
    Whether to check the DataFrame dtype is identical.
check_index_type : bool or {'equiv'}, default 'equiv'
    Whether to check the Index class, dtype and inferred_type
    are identical.
check_column_type : bool or {'equiv'}, default 'equiv'
    Whether to check the columns class, dtype and inferred_type
    are identical. Is passed as the ``exact`` argument of
    :func:`assert_index_equal`.
check_frame_type : bool, default True
    Whether to check the DataFrame class is identical.
check_names : bool, default True
    Whether to check that the `names` attribute for both the `index`
    and `column` attributes of the DataFrame is identical.
by_blocks : bool, default False
    Specify how to compare internal data. If False, compare by columns.
    If True, compare by blocks.
check_exact : bool, default False
    Whether to compare number exactly.

    .. versionchanged:: 2.2.0

        Defaults to True for integer dtypes if none of
        ``check_exact``, ``rtol`` and ``atol`` are specified.
check_datetimelike_compat : bool, default False
    Compare datetime-like which is comparable ignoring dtype.
check_categorical : bool, default True
    Whether to compare internal Categorical exactly.
check_like : bool, default False
    If True, ignore the order of index & columns.
    Note: index labels must match their respective rows
    (same as in columns) - same labels must be with the same data.
check_freq : bool, default True
    Whether to check the `freq` attribute on a DatetimeIndex or TimedeltaIndex.
check_flags : bool, default True
    Whether to check the `flags` attribute.
rtol : float, default 1e-5
    Relative tolerance. Only used when check_exact is False.
atol : float, default 1e-8
    Absolute tolerance. Only used when check_exact is False.
obj : str, default 'DataFrame'
    Specify object name being compared, internally used to show appropriate
    assertion message.

See Also
--------
assert_series_equal : Equivalent method for asserting Series equality.
DataFrame.equals : Check DataFrame equality.

Examples
--------
This example shows comparing two DataFrames that are equal
but with columns of differing dtypes.

>>> from pandas.testing import assert_frame_equal
>>> df1 = pd.DataFrame({'a': [1, 2], 'b': [3, 4]})
>>> df2 = pd.DataFrame({'a': [1, 2], 'b': [3.0, 4.0]})

df1 equals itself.

>>> assert_frame_equal(df1, df1)

df1 differs from df2 as column 'b' is of a different type.

>>> assert_frame_equal(df1, df2)
Traceback (most recent call last):
...
AssertionError: Attributes of DataFrame.iloc[:, 1] (column name="b") are different

Attribute "dtype" are different
[left]:  int64
[right]: float64

Ignore differing dtypes in columns with check_dtype.

>>> assert_frame_equal(df1, df2, check_dtype=False)

---
## assert_equal
```python
from asserters import assert_equal
```

Wrapper for tm.assert_*_equal to dispatch to the appropriate test function.

Parameters
----------
left, right : Index, Series, DataFrame, ExtensionArray, or np.ndarray
    The two items to be compared.
**kwargs
    All keyword arguments are passed through to the underlying assert method.

---
## assert_sp_array_equal
```python
from asserters import assert_sp_array_equal
```

Check that the left and right SparseArray are equal.

Parameters
----------
left : SparseArray
right : SparseArray

---
## assert_contains_all
```python
from asserters import assert_contains_all
```



---
## assert_copy
```python
from asserters import assert_copy
```

iter1, iter2: iterables that produce elements
comparable with assert_almost_equal

Checks that the elements are equal, but not
the same object. (Does not check that items
in sequences are also not the same object)

---
## is_extension_array_dtype_and_needs_i8_conversion
```python
from asserters import is_extension_array_dtype_and_needs_i8_conversion
```

Checks that we have the combination of an ExtensionArraydtype and
a dtype that should be converted to int64

Returns
-------
bool

Related to issue #37609

---
## assert_indexing_slices_equivalent
```python
from asserters import assert_indexing_slices_equivalent
```

Check that ser.iloc[i_slc] matches ser.loc[l_slc] and, if applicable,
ser[l_slc].

---
## assert_metadata_equivalent
```python
from asserters import assert_metadata_equivalent
```

Check that ._metadata attributes are equivalent.

---
## _check_types
```python
from asserters import _check_types
```



---
## repr_class
```python
from asserters import repr_class
```



---
## is_class_equiv
```python
from asserters import is_class_equiv
```

Classes that are a RangeIndex (sub-)instance or exactly an `Index` .

This only checks class equivalence. There is a separate check that the
dtype is int64.

---
## _get_base
```python
from asserters import _get_base
```



---
## _raise
```python
from asserters import _raise
```



---
## __name__
```python
from contexts import __name__
```



---
## decompress_file
```python
from contexts import decompress_file
```

Open a compressed file and return a file object.

Parameters
----------
path : str
    The path where the file is read from.

compression : {'gzip', 'bz2', 'zip', 'xz', 'zstd', None}
    Name of the decompression to use

Returns
-------
file object

---
## set_timezone
```python
from contexts import set_timezone
```

Context manager for temporarily setting a timezone.

Parameters
----------
tz : str
    A string representing a valid timezone.

Examples
--------
>>> from datetime import datetime
>>> from dateutil.tz import tzlocal
>>> tzlocal().tzname(datetime(2021, 1, 1))  # doctest: +SKIP
'IST'

>>> with set_timezone('US/Eastern'):
...     tzlocal().tzname(datetime(2021, 1, 1))
...
'EST'

---
## ensure_clean
```python
from contexts import ensure_clean
```

Gets a temporary path and agrees to remove on close.

This implementation does not use tempfile.mkstemp to avoid having a file handle.
If the code using the returned path wants to delete the file itself, windows
requires that no program has a file handle to it.

Parameters
----------
filename : str (optional)
    suffix of the created file.
return_filelike : bool (default False)
    if True, returns a file-like which is *always* cleaned. Necessary for
    savefig and other functions which want to append extensions.
**kwargs
    Additional keywords are passed to open().

---
## with_csv_dialect
```python
from contexts import with_csv_dialect
```

Context manager to temporarily register a CSV dialect for parsing CSV.

Parameters
----------
name : str
    The name of the dialect.
kwargs : mapping
    The parameters for the dialect.

Raises
------
ValueError : the name of the dialect conflicts with a builtin one.

See Also
--------
csv : Python's CSV library.

---
## use_numexpr
```python
from contexts import use_numexpr
```



---
## raises_chained_assignment_error
```python
from contexts import raises_chained_assignment_error
```



---
## assert_cow_warning
```python
from contexts import assert_cow_warning
```

Assert that a warning is raised in the CoW warning mode.

Parameters
----------
warn : bool, default True
    By default, check that a warning is raised. Can be turned off by passing False.
match : str
    The warning message to match against, if different from the default.
kwargs
    Passed through to assert_produces_warning

---
## setTZ
```python
from contexts import setTZ
```



---
## hist_series
```python
from _core import hist_series
```

Draw histogram of the input series using matplotlib.

Parameters
----------
by : object, optional
    If passed, then used to form histograms for separate groups.
ax : matplotlib axis object
    If not passed, uses gca().
grid : bool, default True
    Whether to show axis grid lines.
xlabelsize : int, default None
    If specified changes the x-axis label size.
xrot : float, default None
    Rotation of x axis labels.
ylabelsize : int, default None
    If specified changes the y-axis label size.
yrot : float, default None
    Rotation of y axis labels.
figsize : tuple, default None
    Figure size in inches by default.
bins : int or sequence, default 10
    Number of histogram bins to be used. If an integer is given, bins + 1
    bin edges are calculated and returned. If bins is a sequence, gives
    bin edges, including left edge of first bin and right edge of last
    bin. In this case, bins is returned unmodified.
backend : str, default None
    Backend to use instead of the backend specified in the option
    ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to
    specify the ``plotting.backend`` for the whole session, set
    ``pd.options.plotting.backend``.
legend : bool, default False
    Whether to show the legend.

**kwargs
    To be passed to the actual plotting function.

Returns
-------
matplotlib.AxesSubplot
    A histogram plot.

See Also
--------
matplotlib.axes.Axes.hist : Plot a histogram using matplotlib.

Examples
--------
For Series:

.. plot::
    :context: close-figs

    >>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
    >>> ser = pd.Series([1, 2, 2, 4, 6, 6], index=lst)
    >>> hist = ser.hist()

For Groupby:

.. plot::
    :context: close-figs

    >>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
    >>> ser = pd.Series([1, 2, 2, 4, 6, 6], index=lst)
    >>> hist = ser.groupby(level=0).hist()

---
## hist_frame
```python
from _core import hist_frame
```

Make a histogram of the DataFrame's columns.

A `histogram`_ is a representation of the distribution of data.
This function calls :meth:`matplotlib.pyplot.hist`, on each series in
the DataFrame, resulting in one histogram per column.

.. _histogram: https://en.wikipedia.org/wiki/Histogram

Parameters
----------
data : DataFrame
    The pandas object holding the data.
column : str or sequence, optional
    If passed, will be used to limit data to a subset of columns.
by : object, optional
    If passed, then used to form histograms for separate groups.
grid : bool, default True
    Whether to show axis grid lines.
xlabelsize : int, default None
    If specified changes the x-axis label size.
xrot : float, default None
    Rotation of x axis labels. For example, a value of 90 displays the
    x labels rotated 90 degrees clockwise.
ylabelsize : int, default None
    If specified changes the y-axis label size.
yrot : float, default None
    Rotation of y axis labels. For example, a value of 90 displays the
    y labels rotated 90 degrees clockwise.
ax : Matplotlib axes object, default None
    The axes to plot the histogram on.
sharex : bool, default True if ax is None else False
    In case subplots=True, share x axis and set some x axis labels to
    invisible; defaults to True if ax is None otherwise False if an ax
    is passed in.
    Note that passing in both an ax and sharex=True will alter all x axis
    labels for all subplots in a figure.
sharey : bool, default False
    In case subplots=True, share y axis and set some y axis labels to
    invisible.
figsize : tuple, optional
    The size in inches of the figure to create. Uses the value in
    `matplotlib.rcParams` by default.
layout : tuple, optional
    Tuple of (rows, columns) for the layout of the histograms.
bins : int or sequence, default 10
    Number of histogram bins to be used. If an integer is given, bins + 1
    bin edges are calculated and returned. If bins is a sequence, gives
    bin edges, including left edge of first bin and right edge of last
    bin. In this case, bins is returned unmodified.

backend : str, default None
    Backend to use instead of the backend specified in the option
    ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to
    specify the ``plotting.backend`` for the whole session, set
    ``pd.options.plotting.backend``.

legend : bool, default False
    Whether to show the legend.

**kwargs
    All other plotting keyword arguments to be passed to
    :meth:`matplotlib.pyplot.hist`.

Returns
-------
matplotlib.AxesSubplot or numpy.ndarray of them

See Also
--------
matplotlib.pyplot.hist : Plot a histogram using matplotlib.

Examples
--------
This example draws a histogram based on the length and width of
some animals, displayed in three bins

.. plot::
    :context: close-figs

    >>> data = {'length': [1.5, 0.5, 1.2, 0.9, 3],
    ...         'width': [0.7, 0.2, 0.15, 0.2, 1.1]}
    >>> index = ['pig', 'rabbit', 'duck', 'chicken', 'horse']
    >>> df = pd.DataFrame(data, index=index)
    >>> hist = df.hist(bins=3)

---
## boxplot
```python
from _core import boxplot
```



---
## boxplot_frame
```python
from _core import boxplot_frame
```



---
## boxplot_frame_groupby
```python
from _core import boxplot_frame_groupby
```

Make box plots from DataFrameGroupBy data.

Parameters
----------
grouped : Grouped DataFrame
subplots : bool
    * ``False`` - no subplots will be used
    * ``True`` - create a subplot for each group.

column : column name or list of names, or vector
    Can be any valid input to groupby.
fontsize : float or str
rot : label rotation angle
grid : Setting this to True will show the grid
ax : Matplotlib axis object, default None
figsize : A tuple (width, height) in inches
layout : tuple (optional)
    The layout of the plot: (rows, columns).
sharex : bool, default False
    Whether x-axes will be shared among subplots.
sharey : bool, default True
    Whether y-axes will be shared among subplots.
backend : str, default None
    Backend to use instead of the backend specified in the option
    ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to
    specify the ``plotting.backend`` for the whole session, set
    ``pd.options.plotting.backend``.
**kwargs
    All other plotting keyword arguments to be passed to
    matplotlib's boxplot function.

Returns
-------
dict of key/value = group key/DataFrame.boxplot return value
or DataFrame.boxplot return value in case subplots=figures=False

Examples
--------
You can create boxplots for grouped data and show them as separate subplots:

.. plot::
    :context: close-figs

    >>> import itertools
    >>> tuples = [t for t in itertools.product(range(1000), range(4))]
    >>> index = pd.MultiIndex.from_tuples(tuples, names=['lvl0', 'lvl1'])
    >>> data = np.random.randn(len(index), 4)
    >>> df = pd.DataFrame(data, columns=list('ABCD'), index=index)
    >>> grouped = df.groupby(level='lvl1')
    >>> grouped.boxplot(rot=45, fontsize=12, figsize=(8, 10))  # doctest: +SKIP

The ``subplots=False`` option shows the boxplots in a single figure.

.. plot::
    :context: close-figs

    >>> grouped.boxplot(subplots=False, rot=45, fontsize=12)  # doctest: +SKIP

---
## PlotAccessor
```python
from _core import PlotAccessor
```

Make plots of Series or DataFrame.

Uses the backend specified by the
option ``plotting.backend``. By default, matplotlib is used.

Parameters
----------
data : Series or DataFrame
    The object for which the method is called.
x : label or position, default None
    Only used if data is a DataFrame.
y : label, position or list of label, positions, default None
    Allows plotting of one column versus another. Only used if data is a
    DataFrame.
kind : str
    The kind of plot to produce:

    - 'line' : line plot (default)
    - 'bar' : vertical bar plot
    - 'barh' : horizontal bar plot
    - 'hist' : histogram
    - 'box' : boxplot
    - 'kde' : Kernel Density Estimation plot
    - 'density' : same as 'kde'
    - 'area' : area plot
    - 'pie' : pie plot
    - 'scatter' : scatter plot (DataFrame only)
    - 'hexbin' : hexbin plot (DataFrame only)
ax : matplotlib axes object, default None
    An axes of the current figure.
subplots : bool or sequence of iterables, default False
    Whether to group columns into subplots:

    - ``False`` : No subplots will be used
    - ``True`` : Make separate subplots for each column.
    - sequence of iterables of column labels: Create a subplot for each
      group of columns. For example `[('a', 'c'), ('b', 'd')]` will
      create 2 subplots: one with columns 'a' and 'c', and one
      with columns 'b' and 'd'. Remaining columns that aren't specified
      will be plotted in additional subplots (one per column).

      .. versionadded:: 1.5.0

sharex : bool, default True if ax is None else False
    In case ``subplots=True``, share x axis and set some x axis labels
    to invisible; defaults to True if ax is None otherwise False if
    an ax is passed in; Be aware, that passing in both an ax and
    ``sharex=True`` will alter all x axis labels for all axis in a figure.
sharey : bool, default False
    In case ``subplots=True``, share y axis and set some y axis labels to invisible.
layout : tuple, optional
    (rows, columns) for the layout of subplots.
figsize : a tuple (width, height) in inches
    Size of a figure object.
use_index : bool, default True
    Use index as ticks for x axis.
title : str or list
    Title to use for the plot. If a string is passed, print the string
    at the top of the figure. If a list is passed and `subplots` is
    True, print each item in the list above the corresponding subplot.
grid : bool, default None (matlab style default)
    Axis grid lines.
legend : bool or {'reverse'}
    Place legend on axis subplots.
style : list or dict
    The matplotlib line style per column.
logx : bool or 'sym', default False
    Use log scaling or symlog scaling on x axis.

logy : bool or 'sym' default False
    Use log scaling or symlog scaling on y axis.

loglog : bool or 'sym', default False
    Use log scaling or symlog scaling on both x and y axes.

xticks : sequence
    Values to use for the xticks.
yticks : sequence
    Values to use for the yticks.
xlim : 2-tuple/list
    Set the x limits of the current axes.
ylim : 2-tuple/list
    Set the y limits of the current axes.
xlabel : label, optional
    Name to use for the xlabel on x-axis. Default uses index name as xlabel, or the
    x-column name for planar plots.

    .. versionchanged:: 2.0.0

        Now applicable to histograms.

ylabel : label, optional
    Name to use for the ylabel on y-axis. Default will show no ylabel, or the
    y-column name for planar plots.

    .. versionchanged:: 2.0.0

        Now applicable to histograms.

rot : float, default None
    Rotation for ticks (xticks for vertical, yticks for horizontal
    plots).
fontsize : float, default None
    Font size for xticks and yticks.
colormap : str or matplotlib colormap object, default None
    Colormap to select colors from. If string, load colormap with that
    name from matplotlib.
colorbar : bool, optional
    If True, plot colorbar (only relevant for 'scatter' and 'hexbin'
    plots).
position : float
    Specify relative alignments for bar plot layout.
    From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5
    (center).
table : bool, Series or DataFrame, default False
    If True, draw a table using the data in the DataFrame and the data
    will be transposed to meet matplotlib's default layout.
    If a Series or DataFrame is passed, use passed data to draw a
    table.
yerr : DataFrame, Series, array-like, dict and str
    See :ref:`Plotting with Error Bars <visualization.errorbars>` for
    detail.
xerr : DataFrame, Series, array-like, dict and str
    Equivalent to yerr.
stacked : bool, default False in line and bar plots, and True in area plot
    If True, create stacked plot.
secondary_y : bool or sequence, default False
    Whether to plot on the secondary y-axis if a list/tuple, which
    columns to plot on secondary y-axis.
mark_right : bool, default True
    When using a secondary_y axis, automatically mark the column
    labels with "(right)" in the legend.
include_bool : bool, default is False
    If True, boolean values can be plotted.
backend : str, default None
    Backend to use instead of the backend specified in the option
    ``plotting.backend``. For instance, 'matplotlib'. Alternatively, to
    specify the ``plotting.backend`` for the whole session, set
    ``pd.options.plotting.backend``.
**kwargs
    Options to pass to matplotlib plotting method.

Returns
-------
:class:`matplotlib.axes.Axes` or numpy.ndarray of them
    If the backend is not the default matplotlib one, the return value
    will be the object returned by the backend.

Notes
-----
- See matplotlib documentation online for more on this subject
- If `kind` = 'bar' or 'barh', you can specify relative alignments
  for bar plot layout by `position` keyword.
  From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5
  (center)

Examples
--------
For Series:

.. plot::
    :context: close-figs

    >>> ser = pd.Series([1, 2, 3, 3])
    >>> plot = ser.plot(kind='hist', title="My plot")

For DataFrame:

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({'length': [1.5, 0.5, 1.2, 0.9, 3],
    ...                   'width': [0.7, 0.2, 0.15, 0.2, 1.1]},
    ...                   index=['pig', 'rabbit', 'duck', 'chicken', 'horse'])
    >>> plot = df.plot(title="DataFrame Plot")

For SeriesGroupBy:

.. plot::
    :context: close-figs

    >>> lst = [-1, -2, -3, 1, 2, 3]
    >>> ser = pd.Series([1, 2, 2, 4, 6, 6], index=lst)
    >>> plot = ser.groupby(lambda x: x > 0).plot(title="SeriesGroupBy Plot")

For DataFrameGroupBy:

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({"col1" : [1, 2, 3, 4],
    ...                   "col2" : ["A", "B", "A", "B"]})
    >>> plot = df.groupby("col2").plot(kind="bar", title="DataFrameGroupBy Plot")

---
## _load_backend
```python
from _core import _load_backend
```

Load a pandas plotting backend.

Parameters
----------
backend : str
    The identifier for the backend. Either an entrypoint item registered
    with importlib.metadata, "matplotlib", or a module name.

Returns
-------
types.ModuleType
    The imported backend.

---
## _get_plot_backend
```python
from _core import _get_plot_backend
```

Return the plotting backend to use (e.g. `pandas.plotting._matplotlib`).

The plotting system of pandas uses matplotlib by default, but the idea here
is that it can also work with other third-party backends. This function
returns the module which provides a top-level `.plot` method that will
actually do the plotting. The backend is specified from a string, which
either comes from the keyword argument `backend`, or, if not specified, from
the option `pandas.options.plotting.backend`. All the rest of the code in
this file uses the backend specified there for the plotting.

The backend is imported lazily, as matplotlib is a soft dependency, and
pandas can be used without it being installed.

Notes
-----
Modifies `_backends` with imported backend as a side effect.

---
## __init__
```python
from _core import __init__
```



---
## _get_call_args
```python
from _core import _get_call_args
```

This function makes calls to this accessor `__call__` method compatible
with the previous `SeriesPlotMethods.__call__` and
`DataFramePlotMethods.__call__`. Those had slightly different
signatures, since `DataFramePlotMethods` accepted `x` and `y`
parameters.

---
## line
```python
from _core import line
```

Plot Series or DataFrame as lines.

This function is useful to plot lines using DataFrame's values
as coordinates.

---
## bar
```python
from _core import bar
```

Vertical bar plot.

A bar plot is a plot that presents categorical data with
rectangular bars with lengths proportional to the values that they
represent. A bar plot shows comparisons among discrete categories. One
axis of the plot shows the specific categories being compared, and the
other axis represents a measured value.

---
## barh
```python
from _core import barh
```

Make a horizontal bar plot.

A horizontal bar plot is a plot that presents quantitative data with
rectangular bars with lengths proportional to the values that they
represent. A bar plot shows comparisons among discrete categories. One
axis of the plot shows the specific categories being compared, and the
other axis represents a measured value.

---
## box
```python
from _core import box
```

Make a box plot of the DataFrame columns.

A box plot is a method for graphically depicting groups of numerical
data through their quartiles.
The box extends from the Q1 to Q3 quartile values of the data,
with a line at the median (Q2). The whiskers extend from the edges
of box to show the range of the data. The position of the whiskers
is set by default to 1.5*IQR (IQR = Q3 - Q1) from the edges of the
box. Outlier points are those past the end of the whiskers.

For further details see Wikipedia's
entry for `boxplot <https://en.wikipedia.org/wiki/Box_plot>`__.

A consideration when using this chart is that the box and the whiskers
can overlap, which is very common when plotting small sets of data.

Parameters
----------
by : str or sequence
    Column in the DataFrame to group by.

    .. versionchanged:: 1.4.0

       Previously, `by` is silently ignore and makes no groupings

**kwargs
    Additional keywords are documented in
    :meth:`DataFrame.plot`.

Returns
-------
:class:`matplotlib.axes.Axes` or numpy.ndarray of them

See Also
--------
DataFrame.boxplot: Another method to draw a box plot.
Series.plot.box: Draw a box plot from a Series object.
matplotlib.pyplot.boxplot: Draw a box plot in matplotlib.

Examples
--------
Draw a box plot from a DataFrame with four columns of randomly
generated data.

.. plot::
    :context: close-figs

    >>> data = np.random.randn(25, 4)
    >>> df = pd.DataFrame(data, columns=list('ABCD'))
    >>> ax = df.plot.box()

You can also generate groupings if you specify the `by` parameter (which
can take a column name, or a list or tuple of column names):

.. versionchanged:: 1.4.0

.. plot::
    :context: close-figs

    >>> age_list = [8, 10, 12, 14, 72, 74, 76, 78, 20, 25, 30, 35, 60, 85]
    >>> df = pd.DataFrame({"gender": list("MMMMMMMMFFFFFF"), "age": age_list})
    >>> ax = df.plot.box(column="age", by="gender", figsize=(10, 8))

---
## hist
```python
from _core import hist
```

Draw one histogram of the DataFrame's columns.

A histogram is a representation of the distribution of data.
This function groups the values of all given Series in the DataFrame
into bins and draws all bins in one :class:`matplotlib.axes.Axes`.
This is useful when the DataFrame's Series are in a similar scale.

Parameters
----------
by : str or sequence, optional
    Column in the DataFrame to group by.

    .. versionchanged:: 1.4.0

       Previously, `by` is silently ignore and makes no groupings

bins : int, default 10
    Number of histogram bins to be used.
**kwargs
    Additional keyword arguments are documented in
    :meth:`DataFrame.plot`.

Returns
-------
class:`matplotlib.AxesSubplot`
    Return a histogram plot.

See Also
--------
DataFrame.hist : Draw histograms per DataFrame's Series.
Series.hist : Draw a histogram with Series' data.

Examples
--------
When we roll a die 6000 times, we expect to get each value around 1000
times. But when we roll two dice and sum the result, the distribution
is going to be quite different. A histogram illustrates those
distributions.

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame(np.random.randint(1, 7, 6000), columns=['one'])
    >>> df['two'] = df['one'] + np.random.randint(1, 7, 6000)
    >>> ax = df.plot.hist(bins=12, alpha=0.5)

A grouped histogram can be generated by providing the parameter `by` (which
can be a column name, or a list of column names):

.. plot::
    :context: close-figs

    >>> age_list = [8, 10, 12, 14, 72, 74, 76, 78, 20, 25, 30, 35, 60, 85]
    >>> df = pd.DataFrame({"gender": list("MMMMMMMMFFFFFF"), "age": age_list})
    >>> ax = df.plot.hist(column=["age"], by="gender", figsize=(10, 8))

---
## kde
```python
from _core import kde
```

Generate Kernel Density Estimate plot using Gaussian kernels.

In statistics, `kernel density estimation`_ (KDE) is a non-parametric
way to estimate the probability density function (PDF) of a random
variable. This function uses Gaussian kernels and includes automatic
bandwidth determination.

.. _kernel density estimation:
    https://en.wikipedia.org/wiki/Kernel_density_estimation

Parameters
----------
bw_method : str, scalar or callable, optional
    The method used to calculate the estimator bandwidth. This can be
    'scott', 'silverman', a scalar constant or a callable.
    If None (default), 'scott' is used.
    See :class:`scipy.stats.gaussian_kde` for more information.
ind : NumPy array or int, optional
    Evaluation points for the estimated PDF. If None (default),
    1000 equally spaced points are used. If `ind` is a NumPy array, the
    KDE is evaluated at the points passed. If `ind` is an integer,
    `ind` number of equally spaced points are used.
**kwargs
    Additional keyword arguments are documented in
    :meth:`DataFrame.plot`.

Returns
-------
matplotlib.axes.Axes or numpy.ndarray of them

See Also
--------
scipy.stats.gaussian_kde : Representation of a kernel-density
    estimate using Gaussian kernels. This is the function used
    internally to estimate the PDF.

Examples
--------
Given a Series of points randomly sampled from an unknown
distribution, estimate its PDF using KDE with automatic
bandwidth determination and plot the results, evaluating them at
1000 equally spaced points (default):

.. plot::
    :context: close-figs

    >>> s = pd.Series([1, 2, 2.5, 3, 3.5, 4, 5])
    >>> ax = s.plot.kde()

A scalar bandwidth can be specified. Using a small bandwidth value can
lead to over-fitting, while using a large bandwidth value may result
in under-fitting:

.. plot::
    :context: close-figs

    >>> ax = s.plot.kde(bw_method=0.3)

.. plot::
    :context: close-figs

    >>> ax = s.plot.kde(bw_method=3)

Finally, the `ind` parameter determines the evaluation points for the
plot of the estimated PDF:

.. plot::
    :context: close-figs

    >>> ax = s.plot.kde(ind=[1, 2, 3, 4, 5])

For DataFrame, it works in the same way:

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({
    ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],
    ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],
    ... })
    >>> ax = df.plot.kde()

A scalar bandwidth can be specified. Using a small bandwidth value can
lead to over-fitting, while using a large bandwidth value may result
in under-fitting:

.. plot::
    :context: close-figs

    >>> ax = df.plot.kde(bw_method=0.3)

.. plot::
    :context: close-figs

    >>> ax = df.plot.kde(bw_method=3)

Finally, the `ind` parameter determines the evaluation points for the
plot of the estimated PDF:

.. plot::
    :context: close-figs

    >>> ax = df.plot.kde(ind=[1, 2, 3, 4, 5, 6])

---
## area
```python
from _core import area
```

Draw a stacked area plot.

An area plot displays quantitative data visually.
This function wraps the matplotlib area function.

Parameters
----------
x : label or position, optional
    Coordinates for the X axis. By default uses the index.
y : label or position, optional
    Column to plot. By default uses all columns.
stacked : bool, default True
    Area plots are stacked by default. Set to False to create a
    unstacked plot.
**kwargs
    Additional keyword arguments are documented in
    :meth:`DataFrame.plot`.

Returns
-------
matplotlib.axes.Axes or numpy.ndarray
    Area plot, or array of area plots if subplots is True.

See Also
--------
DataFrame.plot : Make plots of DataFrame using matplotlib / pylab.

Examples
--------
Draw an area plot based on basic business metrics:

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({
    ...     'sales': [3, 2, 3, 9, 10, 6],
    ...     'signups': [5, 5, 6, 12, 14, 13],
    ...     'visits': [20, 42, 28, 62, 81, 50],
    ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
    ...                        freq='ME'))
    >>> ax = df.plot.area()

Area plots are stacked by default. To produce an unstacked plot,
pass ``stacked=False``:

.. plot::
    :context: close-figs

    >>> ax = df.plot.area(stacked=False)

Draw an area plot for a single column:

.. plot::
    :context: close-figs

    >>> ax = df.plot.area(y='sales')

Draw with a different `x`:

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({
    ...     'sales': [3, 2, 3],
    ...     'visits': [20, 42, 28],
    ...     'day': [1, 2, 3],
    ... })
    >>> ax = df.plot.area(x='day')

---
## pie
```python
from _core import pie
```

Generate a pie plot.

A pie plot is a proportional representation of the numerical data in a
column. This function wraps :meth:`matplotlib.pyplot.pie` for the
specified column. If no column reference is passed and
``subplots=True`` a pie plot is drawn for each numerical column
independently.

Parameters
----------
y : int or label, optional
    Label or position of the column to plot.
    If not provided, ``subplots=True`` argument must be passed.
**kwargs
    Keyword arguments to pass on to :meth:`DataFrame.plot`.

Returns
-------
matplotlib.axes.Axes or np.ndarray of them
    A NumPy array is returned when `subplots` is True.

See Also
--------
Series.plot.pie : Generate a pie plot for a Series.
DataFrame.plot : Make plots of a DataFrame.

Examples
--------
In the example below we have a DataFrame with the information about
planet's mass and radius. We pass the 'mass' column to the
pie function to get a pie plot.

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame({'mass': [0.330, 4.87 , 5.97],
    ...                    'radius': [2439.7, 6051.8, 6378.1]},
    ...                   index=['Mercury', 'Venus', 'Earth'])
    >>> plot = df.plot.pie(y='mass', figsize=(5, 5))

.. plot::
    :context: close-figs

    >>> plot = df.plot.pie(subplots=True, figsize=(11, 6))

---
## scatter
```python
from _core import scatter
```

Create a scatter plot with varying marker point size and color.

The coordinates of each point are defined by two dataframe columns and
filled circles are used to represent each point. This kind of plot is
useful to see complex correlations between two variables. Points could
be for instance natural 2D coordinates like longitude and latitude in
a map or, in general, any pair of metrics that can be plotted against
each other.

Parameters
----------
x : int or str
    The column name or column position to be used as horizontal
    coordinates for each point.
y : int or str
    The column name or column position to be used as vertical
    coordinates for each point.
s : str, scalar or array-like, optional
    The size of each point. Possible values are:

    - A string with the name of the column to be used for marker's size.

    - A single scalar so all points have the same size.

    - A sequence of scalars, which will be used for each point's size
      recursively. For instance, when passing [2,14] all points size
      will be either 2 or 14, alternatively.

c : str, int or array-like, optional
    The color of each point. Possible values are:

    - A single color string referred to by name, RGB or RGBA code,
      for instance 'red' or '#a98d19'.

    - A sequence of color strings referred to by name, RGB or RGBA
      code, which will be used for each point's color recursively. For
      instance ['green','yellow'] all points will be filled in green or
      yellow, alternatively.

    - A column name or position whose values will be used to color the
      marker points according to a colormap.

**kwargs
    Keyword arguments to pass on to :meth:`DataFrame.plot`.

Returns
-------
:class:`matplotlib.axes.Axes` or numpy.ndarray of them

See Also
--------
matplotlib.pyplot.scatter : Scatter plot using multiple input data
    formats.

Examples
--------
Let's see how to draw a scatter plot using coordinates from the values
in a DataFrame's columns.

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame([[5.1, 3.5, 0], [4.9, 3.0, 0], [7.0, 3.2, 1],
    ...                    [6.4, 3.2, 1], [5.9, 3.0, 2]],
    ...                   columns=['length', 'width', 'species'])
    >>> ax1 = df.plot.scatter(x='length',
    ...                       y='width',
    ...                       c='DarkBlue')

And now with the color determined by a column as well.

.. plot::
    :context: close-figs

    >>> ax2 = df.plot.scatter(x='length',
    ...                       y='width',
    ...                       c='species',
    ...                       colormap='viridis')

---
## hexbin
```python
from _core import hexbin
```

Generate a hexagonal binning plot.

Generate a hexagonal binning plot of `x` versus `y`. If `C` is `None`
(the default), this is a histogram of the number of occurrences
of the observations at ``(x[i], y[i])``.

If `C` is specified, specifies values at given coordinates
``(x[i], y[i])``. These values are accumulated for each hexagonal
bin and then reduced according to `reduce_C_function`,
having as default the NumPy's mean function (:meth:`numpy.mean`).
(If `C` is specified, it must also be a 1-D sequence
of the same length as `x` and `y`, or a column label.)

Parameters
----------
x : int or str
    The column label or position for x points.
y : int or str
    The column label or position for y points.
C : int or str, optional
    The column label or position for the value of `(x, y)` point.
reduce_C_function : callable, default `np.mean`
    Function of one argument that reduces all the values in a bin to
    a single number (e.g. `np.mean`, `np.max`, `np.sum`, `np.std`).
gridsize : int or tuple of (int, int), default 100
    The number of hexagons in the x-direction.
    The corresponding number of hexagons in the y-direction is
    chosen in a way that the hexagons are approximately regular.
    Alternatively, gridsize can be a tuple with two elements
    specifying the number of hexagons in the x-direction and the
    y-direction.
**kwargs
    Additional keyword arguments are documented in
    :meth:`DataFrame.plot`.

Returns
-------
matplotlib.AxesSubplot
    The matplotlib ``Axes`` on which the hexbin is plotted.

See Also
--------
DataFrame.plot : Make plots of a DataFrame.
matplotlib.pyplot.hexbin : Hexagonal binning plot using matplotlib,
    the matplotlib function that is used under the hood.

Examples
--------
The following examples are generated with random data from
a normal distribution.

.. plot::
    :context: close-figs

    >>> n = 10000
    >>> df = pd.DataFrame({'x': np.random.randn(n),
    ...                    'y': np.random.randn(n)})
    >>> ax = df.plot.hexbin(x='x', y='y', gridsize=20)

The next example uses `C` and `np.sum` as `reduce_C_function`.
Note that `'observations'` values ranges from 1 to 5 but the result
plot shows values up to more than 25. This is because of the
`reduce_C_function`.

.. plot::
    :context: close-figs

    >>> n = 500
    >>> df = pd.DataFrame({
    ...     'coord_x': np.random.uniform(-3, 3, size=n),
    ...     'coord_y': np.random.uniform(30, 50, size=n),
    ...     'observations': np.random.randint(1,5, size=n)
    ...     })
    >>> ax = df.plot.hexbin(x='coord_x',
    ...                     y='coord_y',
    ...                     C='observations',
    ...                     reduce_C_function=np.sum,
    ...                     gridsize=10,
    ...                     cmap="viridis")

---
## __name__
```python
from _misc import __name__
```



---
## table
```python
from _misc import table
```

Helper function to convert DataFrame and Series to matplotlib.table.

Parameters
----------
ax : Matplotlib axes object
data : DataFrame or Series
    Data for table contents.
**kwargs
    Keyword arguments to be passed to matplotlib.table.table.
    If `rowLabels` or `colLabels` is not specified, data index or column
    name will be used.

Returns
-------
matplotlib table object

Examples
--------

.. plot::
        :context: close-figs

        >>> import matplotlib.pyplot as plt
        >>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
        >>> fix, ax = plt.subplots()
        >>> ax.axis('off')
        (0.0, 1.0, 0.0, 1.0)
        >>> table = pd.plotting.table(ax, df, loc='center',
        ...                           cellLoc='center', colWidths=list([.2, .2]))

---
## register
```python
from _misc import register
```

Register pandas formatters and converters with matplotlib.

This function modifies the global ``matplotlib.units.registry``
dictionary. pandas adds custom converters for

* pd.Timestamp
* pd.Period
* np.datetime64
* datetime.datetime
* datetime.date
* datetime.time

See Also
--------
deregister_matplotlib_converters : Remove pandas formatters and converters.

Examples
--------
.. plot::
   :context: close-figs

    The following line is done automatically by pandas so
    the plot can be rendered:

    >>> pd.plotting.register_matplotlib_converters()

    >>> df = pd.DataFrame({'ts': pd.period_range('2020', periods=2, freq='M'),
    ...                    'y': [1, 2]
    ...                    })
    >>> plot = df.plot.line(x='ts', y='y')

Unsetting the register manually an error will be raised:

>>> pd.set_option("plotting.matplotlib.register_converters",
...               False)  # doctest: +SKIP
>>> df.plot.line(x='ts', y='y')  # doctest: +SKIP
Traceback (most recent call last):
TypeError: float() argument must be a string or a real number, not 'Period'

---
## deregister
```python
from _misc import deregister
```

Remove pandas formatters and converters.

Removes the custom converters added by :func:`register`. This
attempts to set the state of the registry back to the state before
pandas registered its own units. Converters for pandas' own types like
Timestamp and Period are removed completely. Converters for types
pandas overwrites, like ``datetime.datetime``, are restored to their
original value.

See Also
--------
register_matplotlib_converters : Register pandas formatters and converters
    with matplotlib.

Examples
--------
.. plot::
   :context: close-figs

    The following line is done automatically by pandas so
    the plot can be rendered:

    >>> pd.plotting.register_matplotlib_converters()

    >>> df = pd.DataFrame({'ts': pd.period_range('2020', periods=2, freq='M'),
    ...                    'y': [1, 2]
    ...                    })
    >>> plot = df.plot.line(x='ts', y='y')

Unsetting the register manually an error will be raised:

>>> pd.set_option("plotting.matplotlib.register_converters",
...               False)  # doctest: +SKIP
>>> df.plot.line(x='ts', y='y')  # doctest: +SKIP
Traceback (most recent call last):
TypeError: float() argument must be a string or a real number, not 'Period'

---
## scatter_matrix
```python
from _misc import scatter_matrix
```

Draw a matrix of scatter plots.

Parameters
----------
frame : DataFrame
alpha : float, optional
    Amount of transparency applied.
figsize : (float,float), optional
    A tuple (width, height) in inches.
ax : Matplotlib axis object, optional
grid : bool, optional
    Setting this to True will show the grid.
diagonal : {'hist', 'kde'}
    Pick between 'kde' and 'hist' for either Kernel Density Estimation or
    Histogram plot in the diagonal.
marker : str, optional
    Matplotlib marker type, default '.'.
density_kwds : keywords
    Keyword arguments to be passed to kernel density estimate plot.
hist_kwds : keywords
    Keyword arguments to be passed to hist function.
range_padding : float, default 0.05
    Relative extension of axis range in x and y with respect to
    (x_max - x_min) or (y_max - y_min).
**kwargs
    Keyword arguments to be passed to scatter function.

Returns
-------
numpy.ndarray
    A matrix of scatter plots.

Examples
--------

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame(np.random.randn(1000, 4), columns=['A','B','C','D'])
    >>> pd.plotting.scatter_matrix(df, alpha=0.2)
    array([[<Axes: xlabel='A', ylabel='A'>, <Axes: xlabel='B', ylabel='A'>,
            <Axes: xlabel='C', ylabel='A'>, <Axes: xlabel='D', ylabel='A'>],
           [<Axes: xlabel='A', ylabel='B'>, <Axes: xlabel='B', ylabel='B'>,
            <Axes: xlabel='C', ylabel='B'>, <Axes: xlabel='D', ylabel='B'>],
           [<Axes: xlabel='A', ylabel='C'>, <Axes: xlabel='B', ylabel='C'>,
            <Axes: xlabel='C', ylabel='C'>, <Axes: xlabel='D', ylabel='C'>],
           [<Axes: xlabel='A', ylabel='D'>, <Axes: xlabel='B', ylabel='D'>,
            <Axes: xlabel='C', ylabel='D'>, <Axes: xlabel='D', ylabel='D'>]],
          dtype=object)

---
## radviz
```python
from _misc import radviz
```

Plot a multidimensional dataset in 2D.

Each Series in the DataFrame is represented as a evenly distributed
slice on a circle. Each data point is rendered in the circle according to
the value on each Series. Highly correlated `Series` in the `DataFrame`
are placed closer on the unit circle.

RadViz allow to project a N-dimensional data set into a 2D space where the
influence of each dimension can be interpreted as a balance between the
influence of all dimensions.

More info available at the `original article
<https://doi.org/10.1145/331770.331775>`_
describing RadViz.

Parameters
----------
frame : `DataFrame`
    Object holding the data.
class_column : str
    Column name containing the name of the data point category.
ax : :class:`matplotlib.axes.Axes`, optional
    A plot instance to which to add the information.
color : list[str] or tuple[str], optional
    Assign a color to each category. Example: ['blue', 'green'].
colormap : str or :class:`matplotlib.colors.Colormap`, default None
    Colormap to select colors from. If string, load colormap with that
    name from matplotlib.
**kwds
    Options to pass to matplotlib scatter plotting method.

Returns
-------
:class:`matplotlib.axes.Axes`

See Also
--------
pandas.plotting.andrews_curves : Plot clustering visualization.

Examples
--------

.. plot::
    :context: close-figs

    >>> df = pd.DataFrame(
    ...     {
    ...         'SepalLength': [6.5, 7.7, 5.1, 5.8, 7.6, 5.0, 5.4, 4.6, 6.7, 4.6],
    ...         'SepalWidth': [3.0, 3.8, 3.8, 2.7, 3.0, 2.3, 3.0, 3.2, 3.3, 3.6],
    ...         'PetalLength': [5.5, 6.7, 1.9, 5.1, 6.6, 3.3, 4.5, 1.4, 5.7, 1.0],
    ...         'PetalWidth': [1.8, 2.2, 0.4, 1.9, 2.1, 1.0, 1.5, 0.2, 2.1, 0.2],
    ...         'Category': [
    ...             'virginica',
    ...             'virginica',
    ...             'setosa',
    ...             'virginica',
    ...             'virginica',
    ...             'versicolor',
    ...             'versicolor',
    ...             'setosa',
    ...             'virginica',
    ...             'setosa'
    ...         ]
    ...     }
    ... )
    >>> pd.plotting.radviz(df, 'Category')  # doctest: +SKIP

---
## andrews_curves
```python
from _misc import andrews_curves
```

Generate a matplotlib plot for visualizing clusters of multivariate data.

Andrews curves have the functional form:

.. math::
    f(t) = \frac{x_1}{\sqrt{2}} + x_2 \sin(t) + x_3 \cos(t) +
    x_4 \sin(2t) + x_5 \cos(2t) + \cdots

Where :math:`x` coefficients correspond to the values of each dimension
and :math:`t` is linearly spaced between :math:`-\pi` and :math:`+\pi`.
Each row of frame then corresponds to a single curve.

Parameters
----------
frame : DataFrame
    Data to be plotted, preferably normalized to (0.0, 1.0).
class_column : label
    Name of the column containing class names.
ax : axes object, default None
    Axes to use.
samples : int
    Number of points to plot in each curve.
color : str, list[str] or tuple[str], optional
    Colors to use for the different classes. Colors can be strings
    or 3-element floating point RGB values.
colormap : str or matplotlib colormap object, default None
    Colormap to select colors from. If a string, load colormap with that
    name from matplotlib.
**kwargs
    Options to pass to matplotlib plotting method.

Returns
-------
:class:`matplotlib.axes.Axes`

Examples
--------

.. plot::
    :context: close-figs

    >>> df = pd.read_csv(
    ...     'https://raw.githubusercontent.com/pandas-dev/'
    ...     'pandas/main/pandas/tests/io/data/csv/iris.csv'
    ... )
    >>> pd.plotting.andrews_curves(df, 'Name')  # doctest: +SKIP

---
## bootstrap_plot
```python
from _misc import bootstrap_plot
```

Bootstrap plot on mean, median and mid-range statistics.

The bootstrap plot is used to estimate the uncertainty of a statistic
by relying on random sampling with replacement [1]_. This function will
generate bootstrapping plots for mean, median and mid-range statistics
for the given number of samples of the given size.

.. [1] "Bootstrapping (statistics)" in     https://en.wikipedia.org/wiki/Bootstrapping_%28statistics%29

Parameters
----------
series : pandas.Series
    Series from where to get the samplings for the bootstrapping.
fig : matplotlib.figure.Figure, default None
    If given, it will use the `fig` reference for plotting instead of
    creating a new one with default parameters.
size : int, default 50
    Number of data points to consider during each sampling. It must be
    less than or equal to the length of the `series`.
samples : int, default 500
    Number of times the bootstrap procedure is performed.
**kwds
    Options to pass to matplotlib plotting method.

Returns
-------
matplotlib.figure.Figure
    Matplotlib figure.

See Also
--------
pandas.DataFrame.plot : Basic plotting for DataFrame objects.
pandas.Series.plot : Basic plotting for Series objects.

Examples
--------
This example draws a basic bootstrap plot for a Series.

.. plot::
    :context: close-figs

    >>> s = pd.Series(np.random.uniform(size=100))
    >>> pd.plotting.bootstrap_plot(s)  # doctest: +SKIP
    <Figure size 640x480 with 6 Axes>

---
## parallel_coordinates
```python
from _misc import parallel_coordinates
```

Parallel coordinates plotting.

Parameters
----------
frame : DataFrame
class_column : str
    Column name containing class names.
cols : list, optional
    A list of column names to use.
ax : matplotlib.axis, optional
    Matplotlib axis object.
color : list or tuple, optional
    Colors to use for the different classes.
use_columns : bool, optional
    If true, columns will be used as xticks.
xticks : list or tuple, optional
    A list of values to use for xticks.
colormap : str or matplotlib colormap, default None
    Colormap to use for line colors.
axvlines : bool, optional
    If true, vertical lines will be added at each xtick.
axvlines_kwds : keywords, optional
    Options to be passed to axvline method for vertical lines.
sort_labels : bool, default False
    Sort class_column labels, useful when assigning colors.
**kwargs
    Options to pass to matplotlib plotting method.

Returns
-------
matplotlib.axes.Axes

Examples
--------

.. plot::
    :context: close-figs

    >>> df = pd.read_csv(
    ...     'https://raw.githubusercontent.com/pandas-dev/'
    ...     'pandas/main/pandas/tests/io/data/csv/iris.csv'
    ... )
    >>> pd.plotting.parallel_coordinates(
    ...     df, 'Name', color=('#556270', '#4ECDC4', '#C7F464')
    ... )  # doctest: +SKIP

---
## lag_plot
```python
from _misc import lag_plot
```

Lag plot for time series.

Parameters
----------
series : Series
    The time series to visualize.
lag : int, default 1
    Lag length of the scatter plot.
ax : Matplotlib axis object, optional
    The matplotlib axis object to use.
**kwds
    Matplotlib scatter method keyword arguments.

Returns
-------
matplotlib.axes.Axes

Examples
--------
Lag plots are most commonly used to look for patterns in time series data.

Given the following time series

.. plot::
    :context: close-figs

    >>> np.random.seed(5)
    >>> x = np.cumsum(np.random.normal(loc=1, scale=5, size=50))
    >>> s = pd.Series(x)
    >>> s.plot()  # doctest: +SKIP

A lag plot with ``lag=1`` returns

.. plot::
    :context: close-figs

    >>> pd.plotting.lag_plot(s, lag=1)
    <Axes: xlabel='y(t)', ylabel='y(t + 1)'>

---
## autocorrelation_plot
```python
from _misc import autocorrelation_plot
```

Autocorrelation plot for time series.

Parameters
----------
series : Series
    The time series to visualize.
ax : Matplotlib axis object, optional
    The matplotlib axis object to use.
**kwargs
    Options to pass to matplotlib plotting method.

Returns
-------
matplotlib.axes.Axes

Examples
--------
The horizontal lines in the plot correspond to 95% and 99% confidence bands.

The dashed line is 99% confidence band.

.. plot::
    :context: close-figs

    >>> spacing = np.linspace(-9 * np.pi, 9 * np.pi, num=1000)
    >>> s = pd.Series(0.7 * np.random.rand(1000) + 0.3 * np.sin(spacing))
    >>> pd.plotting.autocorrelation_plot(s)  # doctest: +SKIP

---
## _Options
```python
from _misc import _Options
```

Stores pandas plotting options.

Allows for parameter aliasing so you can just use parameter names that are
the same as the plot function parameters, but is stored in a canonical
format that makes it easy to breakdown into groups later.

Examples
--------

.. plot::
        :context: close-figs

         >>> np.random.seed(42)
         >>> df = pd.DataFrame({'A': np.random.randn(10),
         ...                   'B': np.random.randn(10)},
         ...                   index=pd.date_range("1/1/2000",
         ...                   freq='4MS', periods=10))
         >>> with pd.plotting.plot_params.use("x_compat", True):
         ...     _ = df["A"].plot(color="r")
         ...     _ = df["B"].plot(color="g")

---
## __init__
```python
from _misc import __init__
```



---
## __getitem__
```python
from _misc import __getitem__
```



---
## __setitem__
```python
from _misc import __setitem__
```



---
## __delitem__
```python
from _misc import __delitem__
```



---
## __contains__
```python
from _misc import __contains__
```



---
## reset
```python
from _misc import reset
```

Reset the option store to its initial state

Returns
-------
None

---
## _get_canonical_key
```python
from _misc import _get_canonical_key
```



---
## use
```python
from _misc import use
```

Temporarily set a parameter value using the with statement.
Aliasing allowed.

---
## IntCastingNaNError
```python
from __init__ import IntCastingNaNError
```

Exception raised when converting (``astype``) an array with NaN to an integer type.

Examples
--------
>>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")
Traceback (most recent call last):
IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer

---
## NullFrequencyError
```python
from __init__ import NullFrequencyError
```

Exception raised when a ``freq`` cannot be null.

Particularly ``DatetimeIndex.shift``, ``TimedeltaIndex.shift``,
``PeriodIndex.shift``.

Examples
--------
>>> df = pd.DatetimeIndex(["2011-01-01 10:00", "2011-01-01"], freq=None)
>>> df.shift(2)
Traceback (most recent call last):
NullFrequencyError: Cannot shift with no freq

---
## PerformanceWarning
```python
from __init__ import PerformanceWarning
```

Warning raised when there is a possible performance impact.

Examples
--------
>>> df = pd.DataFrame({"jim": [0, 0, 1, 1],
...                    "joe": ["x", "x", "z", "y"],
...                    "jolie": [1, 2, 3, 4]})
>>> df = df.set_index(["jim", "joe"])
>>> df
          jolie
jim  joe
0    x    1
     x    2
1    z    3
     y    4
>>> df.loc[(1, 'z')]  # doctest: +SKIP
# PerformanceWarning: indexing past lexsort depth may impact performance.
df.loc[(1, 'z')]
          jolie
jim  joe
1    z        3

---
## UnsupportedFunctionCall
```python
from __init__ import UnsupportedFunctionCall
```

Exception raised when attempting to call a unsupported numpy function.

For example, ``np.cumsum(groupby_object)``.

Examples
--------
>>> df = pd.DataFrame({"A": [0, 0, 1, 1],
...                    "B": ["x", "x", "z", "y"],
...                    "C": [1, 2, 3, 4]}
...                   )
>>> np.cumsum(df.groupby(["A"]))
Traceback (most recent call last):
UnsupportedFunctionCall: numpy operations are not valid with groupby.
Use .groupby(...).cumsum() instead

---
## UnsortedIndexError
```python
from __init__ import UnsortedIndexError
```

Error raised when slicing a MultiIndex which has not been lexsorted.

Subclass of `KeyError`.

Examples
--------
>>> df = pd.DataFrame({"cat": [0, 0, 1, 1],
...                    "color": ["white", "white", "brown", "black"],
...                    "lives": [4, 4, 3, 7]},
...                   )
>>> df = df.set_index(["cat", "color"])
>>> df
            lives
cat  color
0    white    4
     white    4
1    brown    3
     black    7
>>> df.loc[(0, "black"):(1, "white")]
Traceback (most recent call last):
UnsortedIndexError: 'Key length (2) was greater
than MultiIndex lexsort depth (1)'

---
## ParserError
```python
from __init__ import ParserError
```

Exception that is raised by an error encountered in parsing file contents.

This is a generic error raised for errors encountered when functions like
`read_csv` or `read_html` are parsing contents of a file.

See Also
--------
read_csv : Read CSV (comma-separated) file into a DataFrame.
read_html : Read HTML table into a DataFrame.

Examples
--------
>>> data = '''a,b,c
... cat,foo,bar
... dog,foo,"baz'''
>>> from io import StringIO
>>> pd.read_csv(StringIO(data), skipfooter=1, engine='python')
Traceback (most recent call last):
ParserError: ',' expected after '"'. Error could possibly be due
to parsing errors in the skipped footer rows

---
## DtypeWarning
```python
from __init__ import DtypeWarning
```

Warning raised when reading different dtypes in a column from a file.

Raised for a dtype incompatibility. This can happen whenever `read_csv`
or `read_table` encounter non-uniform dtypes in a column(s) of a given
CSV file.

See Also
--------
read_csv : Read CSV (comma-separated) file into a DataFrame.
read_table : Read general delimited file into a DataFrame.

Notes
-----
This warning is issued when dealing with larger files because the dtype
checking happens per chunk read.

Despite the warning, the CSV file is read with mixed types in a single
column which will be an object type. See the examples below to better
understand this issue.

Examples
--------
This example creates and reads a large CSV file with a column that contains
`int` and `str`.

>>> df = pd.DataFrame({'a': (['1'] * 100000 + ['X'] * 100000 +
...                          ['1'] * 100000),
...                    'b': ['b'] * 300000})  # doctest: +SKIP
>>> df.to_csv('test.csv', index=False)  # doctest: +SKIP
>>> df2 = pd.read_csv('test.csv')  # doctest: +SKIP
... # DtypeWarning: Columns (0) have mixed types

Important to notice that ``df2`` will contain both `str` and `int` for the
same input, '1'.

>>> df2.iloc[262140, 0]  # doctest: +SKIP
'1'
>>> type(df2.iloc[262140, 0])  # doctest: +SKIP
<class 'str'>
>>> df2.iloc[262150, 0]  # doctest: +SKIP
1
>>> type(df2.iloc[262150, 0])  # doctest: +SKIP
<class 'int'>

One way to solve this issue is using the `dtype` parameter in the
`read_csv` and `read_table` functions to explicit the conversion:

>>> df2 = pd.read_csv('test.csv', sep=',', dtype={'a': str})  # doctest: +SKIP

No warning was issued.

---
## EmptyDataError
```python
from __init__ import EmptyDataError
```

Exception raised in ``pd.read_csv`` when empty data or header is encountered.

Examples
--------
>>> from io import StringIO
>>> empty = StringIO()
>>> pd.read_csv(empty)
Traceback (most recent call last):
EmptyDataError: No columns to parse from file

---
## ParserWarning
```python
from __init__ import ParserWarning
```

Warning raised when reading a file that doesn't use the default 'c' parser.

Raised by `pd.read_csv` and `pd.read_table` when it is necessary to change
parsers, generally from the default 'c' parser to 'python'.

It happens due to a lack of support or functionality for parsing a
particular attribute of a CSV file with the requested engine.

Currently, 'c' unsupported options include the following parameters:

1. `sep` other than a single character (e.g. regex separators)
2. `skipfooter` higher than 0
3. `sep=None` with `delim_whitespace=False`

The warning can be avoided by adding `engine='python'` as a parameter in
`pd.read_csv` and `pd.read_table` methods.

See Also
--------
pd.read_csv : Read CSV (comma-separated) file into DataFrame.
pd.read_table : Read general delimited file into DataFrame.

Examples
--------
Using a `sep` in `pd.read_csv` other than a single character:

>>> import io
>>> csv = '''a;b;c
...           1;1,8
...           1;2,1'''
>>> df = pd.read_csv(io.StringIO(csv), sep='[;,]')  # doctest: +SKIP
... # ParserWarning: Falling back to the 'python' engine...

Adding `engine='python'` to `pd.read_csv` removes the Warning:

>>> df = pd.read_csv(io.StringIO(csv), sep='[;,]', engine='python')

---
## MergeError
```python
from __init__ import MergeError
```

Exception raised when merging data.

Subclass of ``ValueError``.

Examples
--------
>>> left = pd.DataFrame({"a": ["a", "b", "b", "d"],
...                     "b": ["cat", "dog", "weasel", "horse"]},
...                     index=range(4))
>>> right = pd.DataFrame({"a": ["a", "b", "c", "d"],
...                      "c": ["meow", "bark", "chirp", "nay"]},
...                      index=range(4)).set_index("a")
>>> left.join(right, on="a", validate="one_to_one",)
Traceback (most recent call last):
MergeError: Merge keys are not unique in left dataset; not a one-to-one merge

---
## AbstractMethodError
```python
from __init__ import AbstractMethodError
```

Raise this error instead of NotImplementedError for abstract methods.

Examples
--------
>>> class Foo:
...     @classmethod
...     def classmethod(cls):
...         raise pd.errors.AbstractMethodError(cls, methodtype="classmethod")
...     def method(self):
...         raise pd.errors.AbstractMethodError(self)
>>> test = Foo.classmethod()
Traceback (most recent call last):
AbstractMethodError: This classmethod must be defined in the concrete class Foo

>>> test2 = Foo().method()
Traceback (most recent call last):
AbstractMethodError: This classmethod must be defined in the concrete class Foo

---
## NumbaUtilError
```python
from __init__ import NumbaUtilError
```

Error raised for unsupported Numba engine routines.

Examples
--------
>>> df = pd.DataFrame({"key": ["a", "a", "b", "b"], "data": [1, 2, 3, 4]},
...                   columns=["key", "data"])
>>> def incorrect_function(x):
...     return sum(x) * 2.7
>>> df.groupby("key").agg(incorrect_function, engine="numba")
Traceback (most recent call last):
NumbaUtilError: The first 2 arguments to incorrect_function
must be ['values', 'index']

---
## DuplicateLabelError
```python
from __init__ import DuplicateLabelError
```

Error raised when an operation would introduce duplicate labels.

Examples
--------
>>> s = pd.Series([0, 1, 2], index=['a', 'b', 'c']).set_flags(
...     allows_duplicate_labels=False
... )
>>> s.reindex(['a', 'a', 'b'])
Traceback (most recent call last):
   ...
DuplicateLabelError: Index has duplicates.
      positions
label
a        [0, 1]

---
## InvalidIndexError
```python
from __init__ import InvalidIndexError
```

Exception raised when attempting to use an invalid index key.

Examples
--------
>>> idx = pd.MultiIndex.from_product([["x", "y"], [0, 1]])
>>> df = pd.DataFrame([[1, 1, 2, 2],
...                   [3, 3, 4, 4]], columns=idx)
>>> df
    x       y
    0   1   0   1
0   1   1   2   2
1   3   3   4   4
>>> df[:, 0]
Traceback (most recent call last):
InvalidIndexError: (slice(None, None, None), 0)

---
## SpecificationError
```python
from __init__ import SpecificationError
```

Exception raised by ``agg`` when the functions are ill-specified.

The exception raised in two scenarios.

The first way is calling ``agg`` on a
Dataframe or Series using a nested renamer (dict-of-dict).

The second way is calling ``agg`` on a Dataframe with duplicated functions
names without assigning column name.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2],
...                    'B': range(5),
...                    'C': range(5)})
>>> df.groupby('A').B.agg({'foo': 'count'}) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported

>>> df.groupby('A').agg({'B': {'foo': ['sum', 'max']}}) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported

>>> df.groupby('A').agg(['min', 'min']) # doctest: +SKIP
... # SpecificationError: nested renamer is not supported

---
## SettingWithCopyError
```python
from __init__ import SettingWithCopyError
```

Exception raised when trying to set on a copied slice from a ``DataFrame``.

The ``mode.chained_assignment`` needs to be set to set to 'raise.' This can
happen unintentionally when chained indexing.

For more information on evaluation order,
see :ref:`the user guide<indexing.evaluation_order>`.

For more information on view vs. copy,
see :ref:`the user guide<indexing.view_versus_copy>`.

Examples
--------
>>> pd.options.mode.chained_assignment = 'raise'
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
... # SettingWithCopyError: A value is trying to be set on a copy of a...

---
## SettingWithCopyWarning
```python
from __init__ import SettingWithCopyWarning
```

Warning raised when trying to set on a copied slice from a ``DataFrame``.

The ``mode.chained_assignment`` needs to be set to set to 'warn.'
'Warn' is the default option. This can happen unintentionally when
chained indexing.

For more information on evaluation order,
see :ref:`the user guide<indexing.evaluation_order>`.

For more information on view vs. copy,
see :ref:`the user guide<indexing.view_versus_copy>`.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
>>> df.loc[0:3]['A'] = 'a' # doctest: +SKIP
... # SettingWithCopyWarning: A value is trying to be set on a copy of a...

---
## ChainedAssignmentError
```python
from __init__ import ChainedAssignmentError
```

Warning raised when trying to set using chained assignment.

When the ``mode.copy_on_write`` option is enabled, chained assignment can
never work. In such a situation, we are always setting into a temporary
object that is the result of an indexing operation (getitem), which under
Copy-on-Write always behaves as a copy. Thus, assigning through a chain
can never update the original Series or DataFrame.

For more information on view vs. copy,
see :ref:`the user guide<indexing.view_versus_copy>`.

Examples
--------
>>> pd.options.mode.copy_on_write = True
>>> df = pd.DataFrame({'A': [1, 1, 1, 2, 2]}, columns=['A'])
>>> df["A"][0:3] = 10 # doctest: +SKIP
... # ChainedAssignmentError: ...
>>> pd.options.mode.copy_on_write = False

---
## _check_cacher
```python
from __init__ import _check_cacher
```



---
## NumExprClobberingError
```python
from __init__ import NumExprClobberingError
```

Exception raised when trying to use a built-in numexpr name as a variable name.

``eval`` or ``query`` will throw the error if the engine is set
to 'numexpr'. 'numexpr' is the default engine value for these methods if the
numexpr package is installed.

Examples
--------
>>> df = pd.DataFrame({'abs': [1, 1, 1]})
>>> df.query("abs > 2") # doctest: +SKIP
... # NumExprClobberingError: Variables in expression "(abs) > (2)" overlap...
>>> sin, a = 1, 2
>>> pd.eval("sin + a", engine='numexpr') # doctest: +SKIP
... # NumExprClobberingError: Variables in expression "(sin) + (a)" overlap...

---
## UndefinedVariableError
```python
from __init__ import UndefinedVariableError
```

Exception raised by ``query`` or ``eval`` when using an undefined variable name.

It will also specify whether the undefined variable is local or not.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1]})
>>> df.query("A > x") # doctest: +SKIP
... # UndefinedVariableError: name 'x' is not defined
>>> df.query("A > @y") # doctest: +SKIP
... # UndefinedVariableError: local variable 'y' is not defined
>>> pd.eval('x + 1') # doctest: +SKIP
... # UndefinedVariableError: name 'x' is not defined

---
## IndexingError
```python
from __init__ import IndexingError
```

Exception is raised when trying to index and there is a mismatch in dimensions.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1]})
>>> df.loc[..., ..., 'A'] # doctest: +SKIP
... # IndexingError: indexer may only contain one '...' entry
>>> df = pd.DataFrame({'A': [1, 1, 1]})
>>> df.loc[1, ..., ...] # doctest: +SKIP
... # IndexingError: Too many indexers
>>> df[pd.Series([True], dtype=bool)] # doctest: +SKIP
... # IndexingError: Unalignable boolean Series provided as indexer...
>>> s = pd.Series(range(2),
...               index = pd.MultiIndex.from_product([["a", "b"], ["c"]]))
>>> s.loc["a", "c", "d"] # doctest: +SKIP
... # IndexingError: Too many indexers

---
## PyperclipException
```python
from __init__ import PyperclipException
```

Exception raised when clipboard functionality is unsupported.

Raised by ``to_clipboard()`` and ``read_clipboard()``.

---
## PyperclipWindowsException
```python
from __init__ import PyperclipWindowsException
```

Exception raised when clipboard functionality is unsupported by Windows.

Access to the clipboard handle would be denied due to some other
window process is accessing it.

---
## CSSWarning
```python
from __init__ import CSSWarning
```

Warning is raised when converting css styling fails.

This can be due to the styling not having an equivalent value or because the
styling isn't properly formatted.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 1]})
>>> df.style.applymap(
...     lambda x: 'background-color: blueGreenRed;'
... ).to_excel('styled.xlsx')  # doctest: +SKIP
CSSWarning: Unhandled color format: 'blueGreenRed'
>>> df.style.applymap(
...     lambda x: 'border: 1px solid red red;'
... ).to_excel('styled.xlsx')  # doctest: +SKIP
CSSWarning: Unhandled color format: 'blueGreenRed'

---
## PossibleDataLossError
```python
from __init__ import PossibleDataLossError
```

Exception raised when trying to open a HDFStore file when already opened.

Examples
--------
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
>>> store.open("w") # doctest: +SKIP
... # PossibleDataLossError: Re-opening the file [my-store] with mode [a]...

---
## ClosedFileError
```python
from __init__ import ClosedFileError
```

Exception is raised when trying to perform an operation on a closed HDFStore file.

Examples
--------
>>> store = pd.HDFStore('my-store', 'a') # doctest: +SKIP
>>> store.close() # doctest: +SKIP
>>> store.keys() # doctest: +SKIP
... # ClosedFileError: my-store file is not open!

---
## IncompatibilityWarning
```python
from __init__ import IncompatibilityWarning
```

Warning raised when trying to use where criteria on an incompatible HDF5 file.

---
## AttributeConflictWarning
```python
from __init__ import AttributeConflictWarning
```

Warning raised when index attributes conflict when using HDFStore.

Occurs when attempting to append an index with a different
name than the existing index on an HDFStore or attempting to append an index with a
different frequency than the existing index on an HDFStore.

Examples
--------
>>> idx1 = pd.Index(['a', 'b'], name='name1')
>>> df1 = pd.DataFrame([[1, 2], [3, 4]], index=idx1)
>>> df1.to_hdf('file', 'data', 'w', append=True)  # doctest: +SKIP
>>> idx2 = pd.Index(['c', 'd'], name='name2')
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], index=idx2)
>>> df2.to_hdf('file', 'data', 'a', append=True)  # doctest: +SKIP
AttributeConflictWarning: the [index_name] attribute of the existing index is
[name1] which conflicts with the new [name2]...

---
## DatabaseError
```python
from __init__ import DatabaseError
```

Error is raised when executing sql with bad syntax or sql that throws an error.

Examples
--------
>>> from sqlite3 import connect
>>> conn = connect(':memory:')
>>> pd.read_sql('select * test', conn) # doctest: +SKIP
... # DatabaseError: Execution failed on sql 'test': near "test": syntax error

---
## PossiblePrecisionLoss
```python
from __init__ import PossiblePrecisionLoss
```

Warning raised by to_stata on a column with a value outside or equal to int64.

When the column value is outside or equal to the int64 value the column is
converted to a float64 dtype.

Examples
--------
>>> df = pd.DataFrame({"s": pd.Series([1, 2**53], dtype=np.int64)})
>>> df.to_stata('test') # doctest: +SKIP
... # PossiblePrecisionLoss: Column converted from int64 to float64...

---
## ValueLabelTypeMismatch
```python
from __init__ import ValueLabelTypeMismatch
```

Warning raised by to_stata on a category column that contains non-string values.

Examples
--------
>>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")})
>>> df.to_stata('test') # doctest: +SKIP
... # ValueLabelTypeMismatch: Stata value labels (pandas categories) must be str...

---
## InvalidColumnName
```python
from __init__ import InvalidColumnName
```

Warning raised by to_stata the column contains a non-valid stata name.

Because the column name is an invalid Stata variable, the name needs to be
converted.

Examples
--------
>>> df = pd.DataFrame({"0categories": pd.Series([2, 2])})
>>> df.to_stata('test') # doctest: +SKIP
... # InvalidColumnName: Not all pandas column names were valid Stata variable...

---
## CategoricalConversionWarning
```python
from __init__ import CategoricalConversionWarning
```

Warning is raised when reading a partial labeled Stata file using a iterator.

Examples
--------
>>> from pandas.io.stata import StataReader
>>> with StataReader('dta_file', chunksize=2) as reader: # doctest: +SKIP
...   for i, block in enumerate(reader):
...      print(i, block)
... # CategoricalConversionWarning: One or more series with value labels...

---
## LossySetitemError
```python
from __init__ import LossySetitemError
```

Raised when trying to do a __setitem__ on an np.ndarray that is not lossless.

Notes
-----
This is an internal error.

---
## NoBufferPresent
```python
from __init__ import NoBufferPresent
```

Exception is raised in _get_data_buffer to signal that there is no requested buffer.

---
## InvalidComparison
```python
from __init__ import InvalidComparison
```

Exception is raised by _validate_comparison_value to indicate an invalid comparison.

Notes
-----
This is an internal error.

---
## DeprecatedOption
```python
from config import DeprecatedOption
```



---
## RegisteredOption
```python
from config import RegisteredOption
```



---
## OptionError
```python
from config import OptionError
```

Exception raised for pandas.options.

Backwards compatible with KeyError checks.

Examples
--------
>>> pd.options.context
Traceback (most recent call last):
OptionError: No such option

---
## _get_single_key
```python
from config import _get_single_key
```



---
## _get_option
```python
from config import _get_option
```



---
## _set_option
```python
from config import _set_option
```



---
## _describe_option
```python
from config import _describe_option
```



---
## _reset_option
```python
from config import _reset_option
```



---
## get_default_val
```python
from config import get_default_val
```



---
## DictWrapper
```python
from config import DictWrapper
```

provide attribute-style access to a nested dict

---
## CallableDynamicDoc
```python
from config import CallableDynamicDoc
```



---
## option_context
```python
from config import option_context
```

Context manager to temporarily set options in the `with` statement context.

You need to invoke as ``option_context(pat, val, [(pat, val), ...])``.

Examples
--------
>>> from pandas import option_context
>>> with option_context('display.max_rows', 10, 'display.max_columns', 5):
...     pass

---
## register_option
```python
from config import register_option
```

Register an option in the package-wide pandas config object

Parameters
----------
key : str
    Fully-qualified key, e.g. "x.y.option - z".
defval : object
    Default value of the option.
doc : str
    Description of the option.
validator : Callable, optional
    Function of a single argument, should raise `ValueError` if
    called with a value which is not a legal value for the option.
cb
    a function of a single argument "key", which is called
    immediately after an option value is set/reset. key is
    the full name of the option.

Raises
------
ValueError if `validator` is specified and `defval` is not a valid value.

---
## deprecate_option
```python
from config import deprecate_option
```

Mark option `key` as deprecated, if code attempts to access this option,
a warning will be produced, using `msg` if given, or a default message
if not.
if `rkey` is given, any access to the key will be re-routed to `rkey`.

Neither the existence of `key` nor that if `rkey` is checked. If they
do not exist, any subsequence access will fail as usual, after the
deprecation warning is given.

Parameters
----------
key : str
    Name of the option to be deprecated.
    must be a fully-qualified option name (e.g "x.y.z.rkey").
msg : str, optional
    Warning message to output when the key is referenced.
    if no message is given a default message will be emitted.
rkey : str, optional
    Name of an option to reroute access to.
    If specified, any referenced `key` will be
    re-routed to `rkey` including set/get/reset.
    rkey must be a fully-qualified option name (e.g "x.y.z.rkey").
    used by the default message if no `msg` is specified.
removal_ver : str, optional
    Specifies the version in which this option will
    be removed. used by the default message if no `msg` is specified.

Raises
------
OptionError
    If the specified key has already been deprecated.

---
## _select_options
```python
from config import _select_options
```

returns a list of keys matching `pat`

if pat=="all", returns all registered options

---
## _get_root
```python
from config import _get_root
```



---
## _is_deprecated
```python
from config import _is_deprecated
```

Returns True if the given option has been deprecated

---
## _get_deprecated_option
```python
from config import _get_deprecated_option
```

Retrieves the metadata for a deprecated option, if `key` is deprecated.

Returns
-------
DeprecatedOption (namedtuple) if key is deprecated, None otherwise

---
## _get_registered_option
```python
from config import _get_registered_option
```

Retrieves the option metadata if `key` is a registered option.

Returns
-------
RegisteredOption (namedtuple) if key is deprecated, None otherwise

---
## _translate_key
```python
from config import _translate_key
```

if key id deprecated and a replacement key defined, will return the
replacement key, otherwise returns `key` as - is

---
## _warn_if_deprecated
```python
from config import _warn_if_deprecated
```

Checks if `key` is a deprecated option and if so, prints a warning.

Returns
-------
bool - True if `key` is deprecated, False otherwise.

---
## _build_option_description
```python
from config import _build_option_description
```

Builds a formatted description of a registered option and prints it

---
## pp_options_list
```python
from config import pp_options_list
```

Builds a concise listing of available options, grouped by prefix

---
## config_prefix
```python
from config import config_prefix
```

contextmanager for multiple invocations of API with a common prefix

supported API functions: (register / get / set )__option

Warning: This is not thread - safe, and won't work properly if you import
the API functions into your module using the "from x import y" construct.

Example
-------
import pandas._config.config as cf
with cf.config_prefix("display.font"):
    cf.register_option("color", "red")
    cf.register_option("size", " 5 pt")
    cf.set_option(size, " 6 pt")
    cf.get_option(size)
    ...

    etc'

will register options "display.font.color", "display.font.size", set the
value of "display.font.size"... and so on.

---
## is_type_factory
```python
from config import is_type_factory
```

Parameters
----------
`_type` - a type to be compared against (e.g. type(x) == `_type`)

Returns
-------
validator - a function of a single argument x , which raises
            ValueError if type(x) is not equal to `_type`

---
## is_instance_factory
```python
from config import is_instance_factory
```

Parameters
----------
`_type` - the type to be checked against

Returns
-------
validator - a function of a single argument x , which raises
            ValueError if x is not an instance of `_type`

---
## is_one_of_factory
```python
from config import is_one_of_factory
```



---
## is_nonnegative_int
```python
from config import is_nonnegative_int
```

Verify that value is None or a positive int.

Parameters
----------
value : None or int
        The `value` to be checked.

Raises
------
ValueError
    When the value is not None or is a negative integer

---
## is_callable
```python
from config import is_callable
```

Parameters
----------
`obj` - the object to be checked

Returns
-------
validator - returns True if object is callable
    raises ValueError otherwise.

---
## __dir__
```python
from config import __dir__
```



---
## __doc__
```python
from config import __doc__
```



---
## __enter__
```python
from config import __enter__
```



---
## __exit__
```python
from config import __exit__
```



---
## pp
```python
from config import pp
```



---
## wrap
```python
from config import wrap
```



---
## using_copy_on_write
```python
from __init__ import using_copy_on_write
```



---
## warn_copy_on_write
```python
from __init__ import warn_copy_on_write
```



---
## using_nullable_dtypes
```python
from __init__ import using_nullable_dtypes
```



---
## using_pyarrow_string_dtype
```python
from __init__ import using_pyarrow_string_dtype
```



---
## detect_console_encoding
```python
from display import detect_console_encoding
```

Try to find the most capable encoding supported by the console.
slightly modified from the way IPython handles the same issue.

---
## set_locale
```python
from localization import set_locale
```

Context manager for temporarily setting a locale.

Parameters
----------
new_locale : str or tuple
    A string of the form <language_country>.<encoding>. For example to set
    the current locale to US English with a UTF8 encoding, you would pass
    "en_US.UTF-8".
lc_var : int, default `locale.LC_ALL`
    The category of the locale being set.

Notes
-----
This is useful when you want to run a particular block of code under a
particular locale, without globally setting the locale. This probably isn't
thread-safe.

---
## can_set_locale
```python
from localization import can_set_locale
```

Check to see if we can set a locale, and subsequently get the locale,
without raising an Exception.

Parameters
----------
lc : str
    The locale to attempt to set.
lc_var : int, default `locale.LC_ALL`
    The category of the locale being set.

Returns
-------
bool
    Whether the passed locale can be set

---
## _valid_locales
```python
from localization import _valid_locales
```

Return a list of normalized locales that do not throw an ``Exception``
when set.

Parameters
----------
locales : str
    A string where each locale is separated by a newline.
normalize : bool
    Whether to call ``locale.normalize`` on each locale.

Returns
-------
valid_locales : list
    A list of valid locales.

---
## get_locales
```python
from localization import get_locales
```

Get all the locales that are available on the system.

Parameters
----------
prefix : str
    If not ``None`` then return only those locales with the prefix
    provided. For example to get all English language locales (those that
    start with ``"en"``), pass ``prefix="en"``.
normalize : bool
    Call ``locale.normalize`` on the resulting list of available locales.
    If ``True``, only locales that can be set without throwing an
    ``Exception`` are returned.

Returns
-------
locales : list of strings
    A list of locale strings that can be set with ``locale.setlocale()``.
    For example::

        locale.setlocale(locale.LC_ALL, locale_string)

On error will return an empty list (no locale available, e.g. Windows)

---
## CompatValidator
```python
from function import CompatValidator
```



---
## process_skipna
```python
from function import process_skipna
```



---
## validate_argmin_with_skipna
```python
from function import validate_argmin_with_skipna
```

If 'Series.argmin' is called via the 'numpy' library, the third parameter
in its signature is 'out', which takes either an ndarray or 'None', so
check if the 'skipna' parameter is either an instance of ndarray or is
None, since 'skipna' itself should be a boolean

---
## validate_argmax_with_skipna
```python
from function import validate_argmax_with_skipna
```

If 'Series.argmax' is called via the 'numpy' library, the third parameter
in its signature is 'out', which takes either an ndarray or 'None', so
check if the 'skipna' parameter is either an instance of ndarray or is
None, since 'skipna' itself should be a boolean

---
## validate_argsort_with_ascending
```python
from function import validate_argsort_with_ascending
```

If 'Categorical.argsort' is called via the 'numpy' library, the first
parameter in its signature is 'axis', which takes either an integer or
'None', so check if the 'ascending' parameter has either integer type or is
None, since 'ascending' itself should be a boolean

---
## validate_clip_with_axis
```python
from function import validate_clip_with_axis
```

If 'NDFrame.clip' is called via the numpy library, the third parameter in
its signature is 'out', which can takes an ndarray, so check if the 'axis'
parameter is an instance of ndarray, since 'axis' itself should either be
an integer or None

---
## validate_cum_func_with_skipna
```python
from function import validate_cum_func_with_skipna
```

If this function is called via the 'numpy' library, the third parameter in
its signature is 'dtype', which takes either a 'numpy' dtype or 'None', so
check if the 'skipna' parameter is a boolean or not

---
## validate_take_with_convert
```python
from function import validate_take_with_convert
```

If this function is called via the 'numpy' library, the third parameter in
its signature is 'axis', which takes either an ndarray or 'None', so check
if the 'convert' parameter is either an instance of ndarray or is None

---
## validate_groupby_func
```python
from function import validate_groupby_func
```

'args' and 'kwargs' should be empty, except for allowed kwargs because all
of their necessary parameters are explicitly listed in the function
signature

---
## validate_resampler_func
```python
from function import validate_resampler_func
```

'args' and 'kwargs' should be empty because all of their necessary
parameters are explicitly listed in the function signature

---
## validate_minmax_axis
```python
from function import validate_minmax_axis
```

Ensure that the axis argument passed to min, max, argmin, or argmax is zero
or None, as otherwise it will be incorrectly ignored.

Parameters
----------
axis : int or None
ndim : int, default 1

Raises
------
ValueError

---
## validate_func
```python
from function import validate_func
```



---
## __init__
```python
from function import __init__
```



---
## __call__
```python
from function import __call__
```



---
## is_valid_positional_slice
```python
from utils import is_valid_positional_slice
```

Check if a slice object can be interpreted as a positional indexer.

Parameters
----------
slc : slice

Returns
-------
bool

Notes
-----
A valid positional slice may also be interpreted as a label-based slice
depending on the index being sliced.

---
## is_list_like_indexer
```python
from utils import is_list_like_indexer
```

Check if we have a list-like indexer that is *not* a NamedTuple.

Parameters
----------
key : object

Returns
-------
bool

---
## is_scalar_indexer
```python
from utils import is_scalar_indexer
```

Return True if we are all scalar indexers.

Parameters
----------
indexer : object
ndim : int
    Number of dimensions in the object being indexed.

Returns
-------
bool

---
## is_empty_indexer
```python
from utils import is_empty_indexer
```

Check if we have an empty indexer.

Parameters
----------
indexer : object

Returns
-------
bool

---
## check_setitem_lengths
```python
from utils import check_setitem_lengths
```

Validate that value and indexer are the same length.

An special-case is allowed for when the indexer is a boolean array
and the number of true values equals the length of ``value``. In
this case, no exception is raised.

Parameters
----------
indexer : sequence
    Key for the setitem.
value : array-like
    Value for the setitem.
values : array-like
    Values being set into.

Returns
-------
bool
    Whether this is an empty listlike setting which is a no-op.

Raises
------
ValueError
    When the indexer is an ndarray or list and the lengths don't match.

---
## validate_indices
```python
from utils import validate_indices
```

Perform bounds-checking for an indexer.

-1 is allowed for indicating missing values.

Parameters
----------
indices : ndarray
n : int
    Length of the array being indexed.

Raises
------
ValueError

Examples
--------
>>> validate_indices(np.array([1, 2]), 3) # OK

>>> validate_indices(np.array([1, -2]), 3)
Traceback (most recent call last):
    ...
ValueError: negative dimensions are not allowed

>>> validate_indices(np.array([1, 2, 3]), 3)
Traceback (most recent call last):
    ...
IndexError: indices are out-of-bounds

>>> validate_indices(np.array([-1, -1]), 0) # OK

>>> validate_indices(np.array([0, 1]), 0)
Traceback (most recent call last):
    ...
IndexError: indices are out-of-bounds

---
## maybe_convert_indices
```python
from utils import maybe_convert_indices
```

Attempt to convert indices into valid, positive indices.

If we have negative indices, translate to positive here.
If we have indices that are out-of-bounds, raise an IndexError.

Parameters
----------
indices : array-like
    Array of indices that we are to convert.
n : int
    Number of elements in the array that we are indexing.
verify : bool, default True
    Check that all entries are between 0 and n - 1, inclusive.

Returns
-------
array-like
    An array-like of positive indices that correspond to the ones
    that were passed in initially to this function.

Raises
------
IndexError
    One of the converted indices either exceeded the number of,
    elements (specified by `n`), or was still negative.

---
## length_of_indexer
```python
from utils import length_of_indexer
```

Return the expected length of target[indexer]

Returns
-------
int

---
## disallow_ndim_indexing
```python
from utils import disallow_ndim_indexing
```

Helper function to disallow multi-dimensional indexing on 1D Series/Index.

GH#27125 indexer like idx[:, None] expands dim, but we cannot do that
and keep an index, so we used to return ndarray, which was deprecated
in GH#30588.

---
## unpack_1tuple
```python
from utils import unpack_1tuple
```

If we have a length-1 tuple/list that contains a slice, unpack to just
the slice.

Notes
-----
The list case is deprecated.

---
## check_key_length
```python
from utils import check_key_length
```

Checks if a key used as indexer has the same length as the columns it is
associated with.

Parameters
----------
columns : Index The columns of the DataFrame to index.
key : A list-like of keys to index with.
value : DataFrame The value to set for the keys.

Raises
------
ValueError: If the length of key is not equal to the number of columns in value
            or if the number of columns referenced by key is not equal to number
            of columns.

---
## unpack_tuple_and_ellipses
```python
from utils import unpack_tuple_and_ellipses
```

Possibly unpack arr[..., n] to arr[n]

---
## check_array_indexer
```python
from utils import check_array_indexer
```

Check if `indexer` is a valid array indexer for `array`.

For a boolean mask, `array` and `indexer` are checked to have the same
length. The dtype is validated, and if it is an integer or boolean
ExtensionArray, it is checked if there are missing values present, and
it is converted to the appropriate numpy array. Other dtypes will raise
an error.

Non-array indexers (integer, slice, Ellipsis, tuples, ..) are passed
through as is.

Parameters
----------
array : array-like
    The array that is being indexed (only used for the length).
indexer : array-like or list-like
    The array-like that's used to index. List-like input that is not yet
    a numpy array or an ExtensionArray is converted to one. Other input
    types are passed through as is.

Returns
-------
numpy.ndarray
    The validated indexer as a numpy array that can be used to index.

Raises
------
IndexError
    When the lengths don't match.
ValueError
    When `indexer` cannot be converted to a numpy ndarray to index
    (e.g. presence of missing values).

See Also
--------
api.types.is_bool_dtype : Check if `key` is of boolean dtype.

Examples
--------
When checking a boolean mask, a boolean ndarray is returned when the
arguments are all valid.

>>> mask = pd.array([True, False])
>>> arr = pd.array([1, 2])
>>> pd.api.indexers.check_array_indexer(arr, mask)
array([ True, False])

An IndexError is raised when the lengths don't match.

>>> mask = pd.array([True, False, True])
>>> pd.api.indexers.check_array_indexer(arr, mask)
Traceback (most recent call last):
...
IndexError: Boolean index has wrong length: 3 instead of 2.

NA values in a boolean array are treated as False.

>>> mask = pd.array([True, pd.NA])
>>> pd.api.indexers.check_array_indexer(arr, mask)
array([ True, False])

A numpy boolean mask will get passed through (if the length is correct):

>>> mask = np.array([True, False])
>>> pd.api.indexers.check_array_indexer(arr, mask)
array([ True, False])

Similarly for integer indexers, an integer ndarray is returned when it is
a valid indexer, otherwise an error is  (for integer indexers, a matching
length is not required):

>>> indexer = pd.array([0, 2], dtype="Int64")
>>> arr = pd.array([1, 2, 3])
>>> pd.api.indexers.check_array_indexer(arr, indexer)
array([0, 2])

>>> indexer = pd.array([0, pd.NA], dtype="Int64")
>>> pd.api.indexers.check_array_indexer(arr, indexer)
Traceback (most recent call last):
...
ValueError: Cannot index with an integer indexer containing NA values

For non-integer/boolean dtypes, an appropriate error is raised:

>>> indexer = np.array([0., 2.], dtype="float64")
>>> pd.api.indexers.check_array_indexer(arr, indexer)
Traceback (most recent call last):
...
IndexError: arrays used as indices must be of integer or boolean type

---
## __name__
```python
from objects import __name__
```

Indexer objects for computing start/end window bounds for rolling operations

---
## BaseIndexer
```python
from objects import BaseIndexer
```

Base class for window bounds calculations.

Examples
--------
>>> from pandas.api.indexers import BaseIndexer
>>> class CustomIndexer(BaseIndexer):
...     def get_window_bounds(self, num_values, min_periods, center, closed, step):
...         start = np.empty(num_values, dtype=np.int64)
...         end = np.empty(num_values, dtype=np.int64)
...         for i in range(num_values):
...             start[i] = i
...             end[i] = i + self.window_size
...         return start, end
>>> df = pd.DataFrame({"values": range(5)})
>>> indexer = CustomIndexer(window_size=2)
>>> df.rolling(indexer).sum()
    values
0   1.0
1   3.0
2   5.0
3   7.0
4   4.0

---
## FixedWindowIndexer
```python
from objects import FixedWindowIndexer
```

Creates window boundaries that are of fixed length.

---
## VariableWindowIndexer
```python
from objects import VariableWindowIndexer
```

Creates window boundaries that are of variable length, namely for time series.

---
## VariableOffsetWindowIndexer
```python
from objects import VariableOffsetWindowIndexer
```

Calculate window boundaries based on a non-fixed offset such as a BusinessDay.

Examples
--------
>>> from pandas.api.indexers import VariableOffsetWindowIndexer
>>> df = pd.DataFrame(range(10), index=pd.date_range("2020", periods=10))
>>> offset = pd.offsets.BDay(1)
>>> indexer = VariableOffsetWindowIndexer(index=df.index, offset=offset)
>>> df
            0
2020-01-01  0
2020-01-02  1
2020-01-03  2
2020-01-04  3
2020-01-05  4
2020-01-06  5
2020-01-07  6
2020-01-08  7
2020-01-09  8
2020-01-10  9
>>> df.rolling(indexer).sum()
               0
2020-01-01   0.0
2020-01-02   1.0
2020-01-03   2.0
2020-01-04   3.0
2020-01-05   7.0
2020-01-06  12.0
2020-01-07   6.0
2020-01-08   7.0
2020-01-09   8.0
2020-01-10   9.0

---
## ExpandingIndexer
```python
from objects import ExpandingIndexer
```

Calculate expanding window bounds, mimicking df.expanding()

---
## FixedForwardWindowIndexer
```python
from objects import FixedForwardWindowIndexer
```

Creates window boundaries for fixed-length windows that include the current row.

Examples
--------
>>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
>>> df
     B
0  0.0
1  1.0
2  2.0
3  NaN
4  4.0

>>> indexer = pd.api.indexers.FixedForwardWindowIndexer(window_size=2)
>>> df.rolling(window=indexer, min_periods=1).sum()
     B
0  1.0
1  3.0
2  2.0
3  4.0
4  4.0

---
## GroupbyIndexer
```python
from objects import GroupbyIndexer
```

Calculate bounds to compute groupby rolling, mimicking df.groupby().rolling()

---
## ExponentialMovingWindowIndexer
```python
from objects import ExponentialMovingWindowIndexer
```

Calculate ewm window bounds (the entire window)

---
## __init__
```python
from objects import __init__
```

Parameters
----------
index_array : np.ndarray or None
    np.ndarray of the index of the original object that we are performing
    a chained groupby operation over. This index has been pre-sorted relative to
    the groups
window_size : int or BaseIndexer
    window size during the windowing operation
groupby_indices : dict or None
    dict of {group label: [positional index of rows belonging to the group]}
window_indexer : BaseIndexer
    BaseIndexer class determining the start and end bounds of each group
indexer_kwargs : dict or None
    Custom kwargs to be passed to window_indexer
**kwargs :
    keyword arguments that will be available when get_window_bounds is called

---
## get_window_bounds
```python
from objects import get_window_bounds
```



---
## __name__
```python
from tile import __name__
```

Quantilization functions and related stuff

---
## cut
```python
from tile import cut
```

Bin values into discrete intervals.

Use `cut` when you need to segment and sort data values into bins. This
function is also useful for going from a continuous variable to a
categorical variable. For example, `cut` could convert ages to groups of
age ranges. Supports binning into an equal number of bins, or a
pre-specified array of bins.

Parameters
----------
x : array-like
    The input array to be binned. Must be 1-dimensional.
bins : int, sequence of scalars, or IntervalIndex
    The criteria to bin by.

    * int : Defines the number of equal-width bins in the range of `x`. The
      range of `x` is extended by .1% on each side to include the minimum
      and maximum values of `x`.
    * sequence of scalars : Defines the bin edges allowing for non-uniform
      width. No extension of the range of `x` is done.
    * IntervalIndex : Defines the exact bins to be used. Note that
      IntervalIndex for `bins` must be non-overlapping.

right : bool, default True
    Indicates whether `bins` includes the rightmost edge or not. If
    ``right == True`` (the default), then the `bins` ``[1, 2, 3, 4]``
    indicate (1,2], (2,3], (3,4]. This argument is ignored when
    `bins` is an IntervalIndex.
labels : array or False, default None
    Specifies the labels for the returned bins. Must be the same length as
    the resulting bins. If False, returns only integer indicators of the
    bins. This affects the type of the output container (see below).
    This argument is ignored when `bins` is an IntervalIndex. If True,
    raises an error. When `ordered=False`, labels must be provided.
retbins : bool, default False
    Whether to return the bins or not. Useful when bins is provided
    as a scalar.
precision : int, default 3
    The precision at which to store and display the bins labels.
include_lowest : bool, default False
    Whether the first interval should be left-inclusive or not.
duplicates : {default 'raise', 'drop'}, optional
    If bin edges are not unique, raise ValueError or drop non-uniques.
ordered : bool, default True
    Whether the labels are ordered or not. Applies to returned types
    Categorical and Series (with Categorical dtype). If True,
    the resulting categorical will be ordered. If False, the resulting
    categorical will be unordered (labels must be provided).

Returns
-------
out : Categorical, Series, or ndarray
    An array-like object representing the respective bin for each value
    of `x`. The type depends on the value of `labels`.

    * None (default) : returns a Series for Series `x` or a
      Categorical for all other inputs. The values stored within
      are Interval dtype.

    * sequence of scalars : returns a Series for Series `x` or a
      Categorical for all other inputs. The values stored within
      are whatever the type in the sequence is.

    * False : returns an ndarray of integers.

bins : numpy.ndarray or IntervalIndex.
    The computed or specified bins. Only returned when `retbins=True`.
    For scalar or sequence `bins`, this is an ndarray with the computed
    bins. If set `duplicates=drop`, `bins` will drop non-unique bin. For
    an IntervalIndex `bins`, this is equal to `bins`.

See Also
--------
qcut : Discretize variable into equal-sized buckets based on rank
    or based on sample quantiles.
Categorical : Array type for storing data that come from a
    fixed set of values.
Series : One-dimensional array with axis labels (including time series).
IntervalIndex : Immutable Index implementing an ordered, sliceable set.

Notes
-----
Any NA values will be NA in the result. Out of bounds values will be NA in
the resulting Series or Categorical object.

Reference :ref:`the user guide <reshaping.tile.cut>` for more examples.

Examples
--------
Discretize into three equal-sized bins.

>>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3)
... # doctest: +ELLIPSIS
[(0.994, 3.0], (5.0, 7.0], (3.0, 5.0], (3.0, 5.0], (5.0, 7.0], ...
Categories (3, interval[float64, right]): [(0.994, 3.0] < (3.0, 5.0] ...

>>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3, retbins=True)
... # doctest: +ELLIPSIS
([(0.994, 3.0], (5.0, 7.0], (3.0, 5.0], (3.0, 5.0], (5.0, 7.0], ...
Categories (3, interval[float64, right]): [(0.994, 3.0] < (3.0, 5.0] ...
array([0.994, 3.   , 5.   , 7.   ]))

Discovers the same bins, but assign them specific labels. Notice that
the returned Categorical's categories are `labels` and is ordered.

>>> pd.cut(np.array([1, 7, 5, 4, 6, 3]),
...        3, labels=["bad", "medium", "good"])
['bad', 'good', 'medium', 'medium', 'good', 'bad']
Categories (3, object): ['bad' < 'medium' < 'good']

``ordered=False`` will result in unordered categories when labels are passed.
This parameter can be used to allow non-unique labels:

>>> pd.cut(np.array([1, 7, 5, 4, 6, 3]), 3,
...        labels=["B", "A", "B"], ordered=False)
['B', 'B', 'A', 'A', 'B', 'B']
Categories (2, object): ['A', 'B']

``labels=False`` implies you just want the bins back.

>>> pd.cut([0, 1, 1, 2], bins=4, labels=False)
array([0, 1, 1, 3])

Passing a Series as an input returns a Series with categorical dtype:

>>> s = pd.Series(np.array([2, 4, 6, 8, 10]),
...               index=['a', 'b', 'c', 'd', 'e'])
>>> pd.cut(s, 3)
... # doctest: +ELLIPSIS
a    (1.992, 4.667]
b    (1.992, 4.667]
c    (4.667, 7.333]
d     (7.333, 10.0]
e     (7.333, 10.0]
dtype: category
Categories (3, interval[float64, right]): [(1.992, 4.667] < (4.667, ...

Passing a Series as an input returns a Series with mapping value.
It is used to map numerically to intervals based on bins.

>>> s = pd.Series(np.array([2, 4, 6, 8, 10]),
...               index=['a', 'b', 'c', 'd', 'e'])
>>> pd.cut(s, [0, 2, 4, 6, 8, 10], labels=False, retbins=True, right=False)
... # doctest: +ELLIPSIS
(a    1.0
 b    2.0
 c    3.0
 d    4.0
 e    NaN
 dtype: float64,
 array([ 0,  2,  4,  6,  8, 10]))

Use `drop` optional when bins is not unique

>>> pd.cut(s, [0, 2, 4, 6, 10, 10], labels=False, retbins=True,
...        right=False, duplicates='drop')
... # doctest: +ELLIPSIS
(a    1.0
 b    2.0
 c    3.0
 d    3.0
 e    NaN
 dtype: float64,
 array([ 0,  2,  4,  6, 10]))

Passing an IntervalIndex for `bins` results in those categories exactly.
Notice that values not covered by the IntervalIndex are set to NaN. 0
is to the left of the first bin (which is closed on the right), and 1.5
falls between two bins.

>>> bins = pd.IntervalIndex.from_tuples([(0, 1), (2, 3), (4, 5)])
>>> pd.cut([0, 0.5, 1.5, 2.5, 4.5], bins)
[NaN, (0.0, 1.0], NaN, (2.0, 3.0], (4.0, 5.0]]
Categories (3, interval[int64, right]): [(0, 1] < (2, 3] < (4, 5]]

---
## qcut
```python
from tile import qcut
```

Quantile-based discretization function.

Discretize variable into equal-sized buckets based on rank or based
on sample quantiles. For example 1000 values for 10 quantiles would
produce a Categorical object indicating quantile membership for each data point.

Parameters
----------
x : 1d ndarray or Series
q : int or list-like of float
    Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately
    array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles.
labels : array or False, default None
    Used as labels for the resulting bins. Must be of the same length as
    the resulting bins. If False, return only integer indicators of the
    bins. If True, raises an error.
retbins : bool, optional
    Whether to return the (bins, labels) or not. Can be useful if bins
    is given as a scalar.
precision : int, optional
    The precision at which to store and display the bins labels.
duplicates : {default 'raise', 'drop'}, optional
    If bin edges are not unique, raise ValueError or drop non-uniques.

Returns
-------
out : Categorical or Series or array of integers if labels is False
    The return type (Categorical or Series) depends on the input: a Series
    of type category if input is a Series else Categorical. Bins are
    represented as categories when categorical data is returned.
bins : ndarray of floats
    Returned only if `retbins` is True.

Notes
-----
Out of bounds values will be NA in the resulting Categorical object

Examples
--------
>>> pd.qcut(range(5), 4)
... # doctest: +ELLIPSIS
[(-0.001, 1.0], (-0.001, 1.0], (1.0, 2.0], (2.0, 3.0], (3.0, 4.0]]
Categories (4, interval[float64, right]): [(-0.001, 1.0] < (1.0, 2.0] ...

>>> pd.qcut(range(5), 3, labels=["good", "medium", "bad"])
... # doctest: +SKIP
[good, good, medium, bad, bad]
Categories (3, object): [good < medium < bad]

>>> pd.qcut(range(5), 4, labels=False)
array([0, 0, 1, 2, 3])

---
## _nbins_to_bins
```python
from tile import _nbins_to_bins
```

If a user passed an integer N for bins, convert this to a sequence of N
equal(ish)-sized bins.

---
## _bins_to_cuts
```python
from tile import _bins_to_cuts
```



---
## _coerce_to_type
```python
from tile import _coerce_to_type
```

if the passed data is of datetime/timedelta, bool or nullable int type,
this method converts it to numeric so that cut or qcut method can
handle it

---
## _is_dt_or_td
```python
from tile import _is_dt_or_td
```



---
## _format_labels
```python
from tile import _format_labels
```

based on the dtype, return our labels

---
## _preprocess_for_cut
```python
from tile import _preprocess_for_cut
```

handles preprocessing for cut where we convert passed
input to array, strip the index information and store it
separately

---
## _postprocess_for_cut
```python
from tile import _postprocess_for_cut
```

handles post processing for the cut method where
we combine the index information if the originally passed
datatype was a series

---
## _round_frac
```python
from tile import _round_frac
```

Round the fractional part of the given number

---
## _infer_precision
```python
from tile import _infer_precision
```

Infer an appropriate precision for _round_frac

---
## __name__
```python
from merge import __name__
```

SQL-style merge routines

---
## merge
```python
from merge import merge
```



---
## _cross_merge
```python
from merge import _cross_merge
```

See merge.__doc__ with how='cross'

---
## _groupby_and_merge
```python
from merge import _groupby_and_merge
```

groupby & merge; we are always performing a left-by type operation

Parameters
----------
by: field to group
left: DataFrame
right: DataFrame
merge_pieces: function for merging

---
## merge_ordered
```python
from merge import merge_ordered
```

Perform a merge for ordered data with optional filling/interpolation.

Designed for ordered data like time series data. Optionally
perform group-wise merge (see examples).

Parameters
----------
left : DataFrame or named Series
right : DataFrame or named Series
on : label or list
    Field names to join on. Must be found in both DataFrames.
left_on : label or list, or array-like
    Field names to join on in left DataFrame. Can be a vector or list of
    vectors of the length of the DataFrame to use a particular vector as
    the join key instead of columns.
right_on : label or list, or array-like
    Field names to join on in right DataFrame or vector/list of vectors per
    left_on docs.
left_by : column name or list of column names
    Group left DataFrame by group columns and merge piece by piece with
    right DataFrame. Must be None if either left or right are a Series.
right_by : column name or list of column names
    Group right DataFrame by group columns and merge piece by piece with
    left DataFrame. Must be None if either left or right are a Series.
fill_method : {'ffill', None}, default None
    Interpolation method for data.
suffixes : list-like, default is ("_x", "_y")
    A length-2 sequence where each element is optionally a string
    indicating the suffix to add to overlapping column names in
    `left` and `right` respectively. Pass a value of `None` instead
    of a string to indicate that the column name from `left` or
    `right` should be left as-is, with no suffix. At least one of the
    values must not be None.

how : {'left', 'right', 'outer', 'inner'}, default 'outer'
    * left: use only keys from left frame (SQL: left outer join)
    * right: use only keys from right frame (SQL: right outer join)
    * outer: use union of keys from both frames (SQL: full outer join)
    * inner: use intersection of keys from both frames (SQL: inner join).

Returns
-------
DataFrame
    The merged DataFrame output type will be the same as
    'left', if it is a subclass of DataFrame.

See Also
--------
merge : Merge with a database-style join.
merge_asof : Merge on nearest keys.

Examples
--------
>>> from pandas import merge_ordered
>>> df1 = pd.DataFrame(
...     {
...         "key": ["a", "c", "e", "a", "c", "e"],
...         "lvalue": [1, 2, 3, 1, 2, 3],
...         "group": ["a", "a", "a", "b", "b", "b"]
...     }
... )
>>> df1
  key  lvalue group
0   a       1     a
1   c       2     a
2   e       3     a
3   a       1     b
4   c       2     b
5   e       3     b

>>> df2 = pd.DataFrame({"key": ["b", "c", "d"], "rvalue": [1, 2, 3]})
>>> df2
  key  rvalue
0   b       1
1   c       2
2   d       3

>>> merge_ordered(df1, df2, fill_method="ffill", left_by="group")
  key  lvalue group  rvalue
0   a       1     a     NaN
1   b       1     a     1.0
2   c       2     a     2.0
3   d       2     a     3.0
4   e       3     a     3.0
5   a       1     b     NaN
6   b       1     b     1.0
7   c       2     b     2.0
8   d       2     b     3.0
9   e       3     b     3.0

---
## merge_asof
```python
from merge import merge_asof
```

Perform a merge by key distance.

This is similar to a left-join except that we match on nearest
key rather than equal keys. Both DataFrames must be sorted by the key.

For each row in the left DataFrame:

  - A "backward" search selects the last row in the right DataFrame whose
    'on' key is less than or equal to the left's key.

  - A "forward" search selects the first row in the right DataFrame whose
    'on' key is greater than or equal to the left's key.

  - A "nearest" search selects the row in the right DataFrame whose 'on'
    key is closest in absolute distance to the left's key.

Optionally match on equivalent keys with 'by' before searching with 'on'.

Parameters
----------
left : DataFrame or named Series
right : DataFrame or named Series
on : label
    Field name to join on. Must be found in both DataFrames.
    The data MUST be ordered. Furthermore this must be a numeric column,
    such as datetimelike, integer, or float. On or left_on/right_on
    must be given.
left_on : label
    Field name to join on in left DataFrame.
right_on : label
    Field name to join on in right DataFrame.
left_index : bool
    Use the index of the left DataFrame as the join key.
right_index : bool
    Use the index of the right DataFrame as the join key.
by : column name or list of column names
    Match on these columns before performing merge operation.
left_by : column name
    Field names to match on in the left DataFrame.
right_by : column name
    Field names to match on in the right DataFrame.
suffixes : 2-length sequence (tuple, list, ...)
    Suffix to apply to overlapping column names in the left and right
    side, respectively.
tolerance : int or Timedelta, optional, default None
    Select asof tolerance within this range; must be compatible
    with the merge index.
allow_exact_matches : bool, default True

    - If True, allow matching with the same 'on' value
      (i.e. less-than-or-equal-to / greater-than-or-equal-to)
    - If False, don't match the same 'on' value
      (i.e., strictly less-than / strictly greater-than).

direction : 'backward' (default), 'forward', or 'nearest'
    Whether to search for prior, subsequent, or closest matches.

Returns
-------
DataFrame

See Also
--------
merge : Merge with a database-style join.
merge_ordered : Merge with optional filling/interpolation.

Examples
--------
>>> left = pd.DataFrame({"a": [1, 5, 10], "left_val": ["a", "b", "c"]})
>>> left
    a left_val
0   1        a
1   5        b
2  10        c

>>> right = pd.DataFrame({"a": [1, 2, 3, 6, 7], "right_val": [1, 2, 3, 6, 7]})
>>> right
   a  right_val
0  1          1
1  2          2
2  3          3
3  6          6
4  7          7

>>> pd.merge_asof(left, right, on="a")
    a left_val  right_val
0   1        a          1
1   5        b          3
2  10        c          7

>>> pd.merge_asof(left, right, on="a", allow_exact_matches=False)
    a left_val  right_val
0   1        a        NaN
1   5        b        3.0
2  10        c        7.0

>>> pd.merge_asof(left, right, on="a", direction="forward")
    a left_val  right_val
0   1        a        1.0
1   5        b        6.0
2  10        c        NaN

>>> pd.merge_asof(left, right, on="a", direction="nearest")
    a left_val  right_val
0   1        a          1
1   5        b          6
2  10        c          7

We can use indexed DataFrames as well.

>>> left = pd.DataFrame({"left_val": ["a", "b", "c"]}, index=[1, 5, 10])
>>> left
   left_val
1         a
5         b
10        c

>>> right = pd.DataFrame({"right_val": [1, 2, 3, 6, 7]}, index=[1, 2, 3, 6, 7])
>>> right
   right_val
1          1
2          2
3          3
6          6
7          7

>>> pd.merge_asof(left, right, left_index=True, right_index=True)
   left_val  right_val
1         a          1
5         b          3
10        c          7

Here is a real-world times-series example

>>> quotes = pd.DataFrame(
...     {
...         "time": [
...             pd.Timestamp("2016-05-25 13:30:00.023"),
...             pd.Timestamp("2016-05-25 13:30:00.023"),
...             pd.Timestamp("2016-05-25 13:30:00.030"),
...             pd.Timestamp("2016-05-25 13:30:00.041"),
...             pd.Timestamp("2016-05-25 13:30:00.048"),
...             pd.Timestamp("2016-05-25 13:30:00.049"),
...             pd.Timestamp("2016-05-25 13:30:00.072"),
...             pd.Timestamp("2016-05-25 13:30:00.075")
...         ],
...         "ticker": [
...                "GOOG",
...                "MSFT",
...                "MSFT",
...                "MSFT",
...                "GOOG",
...                "AAPL",
...                "GOOG",
...                "MSFT"
...            ],
...            "bid": [720.50, 51.95, 51.97, 51.99, 720.50, 97.99, 720.50, 52.01],
...            "ask": [720.93, 51.96, 51.98, 52.00, 720.93, 98.01, 720.88, 52.03]
...     }
... )
>>> quotes
                     time ticker     bid     ask
0 2016-05-25 13:30:00.023   GOOG  720.50  720.93
1 2016-05-25 13:30:00.023   MSFT   51.95   51.96
2 2016-05-25 13:30:00.030   MSFT   51.97   51.98
3 2016-05-25 13:30:00.041   MSFT   51.99   52.00
4 2016-05-25 13:30:00.048   GOOG  720.50  720.93
5 2016-05-25 13:30:00.049   AAPL   97.99   98.01
6 2016-05-25 13:30:00.072   GOOG  720.50  720.88
7 2016-05-25 13:30:00.075   MSFT   52.01   52.03

>>> trades = pd.DataFrame(
...        {
...            "time": [
...                pd.Timestamp("2016-05-25 13:30:00.023"),
...                pd.Timestamp("2016-05-25 13:30:00.038"),
...                pd.Timestamp("2016-05-25 13:30:00.048"),
...                pd.Timestamp("2016-05-25 13:30:00.048"),
...                pd.Timestamp("2016-05-25 13:30:00.048")
...            ],
...            "ticker": ["MSFT", "MSFT", "GOOG", "GOOG", "AAPL"],
...            "price": [51.95, 51.95, 720.77, 720.92, 98.0],
...            "quantity": [75, 155, 100, 100, 100]
...        }
...    )
>>> trades
                     time ticker   price  quantity
0 2016-05-25 13:30:00.023   MSFT   51.95        75
1 2016-05-25 13:30:00.038   MSFT   51.95       155
2 2016-05-25 13:30:00.048   GOOG  720.77       100
3 2016-05-25 13:30:00.048   GOOG  720.92       100
4 2016-05-25 13:30:00.048   AAPL   98.00       100

By default we are taking the asof of the quotes

>>> pd.merge_asof(trades, quotes, on="time", by="ticker")
                     time ticker   price  quantity     bid     ask
0 2016-05-25 13:30:00.023   MSFT   51.95        75   51.95   51.96
1 2016-05-25 13:30:00.038   MSFT   51.95       155   51.97   51.98
2 2016-05-25 13:30:00.048   GOOG  720.77       100  720.50  720.93
3 2016-05-25 13:30:00.048   GOOG  720.92       100  720.50  720.93
4 2016-05-25 13:30:00.048   AAPL   98.00       100     NaN     NaN

We only asof within 2ms between the quote time and the trade time

>>> pd.merge_asof(
...     trades, quotes, on="time", by="ticker", tolerance=pd.Timedelta("2ms")
... )
                     time ticker   price  quantity     bid     ask
0 2016-05-25 13:30:00.023   MSFT   51.95        75   51.95   51.96
1 2016-05-25 13:30:00.038   MSFT   51.95       155     NaN     NaN
2 2016-05-25 13:30:00.048   GOOG  720.77       100  720.50  720.93
3 2016-05-25 13:30:00.048   GOOG  720.92       100  720.50  720.93
4 2016-05-25 13:30:00.048   AAPL   98.00       100     NaN     NaN

We only asof within 10ms between the quote time and the trade time
and we exclude exact matches on time. However *prior* data will
propagate forward

>>> pd.merge_asof(
...     trades,
...     quotes,
...     on="time",
...     by="ticker",
...     tolerance=pd.Timedelta("10ms"),
...     allow_exact_matches=False
... )
                     time ticker   price  quantity     bid     ask
0 2016-05-25 13:30:00.023   MSFT   51.95        75     NaN     NaN
1 2016-05-25 13:30:00.038   MSFT   51.95       155   51.97   51.98
2 2016-05-25 13:30:00.048   GOOG  720.77       100     NaN     NaN
3 2016-05-25 13:30:00.048   GOOG  720.92       100     NaN     NaN
4 2016-05-25 13:30:00.048   AAPL   98.00       100     NaN     NaN

---
## _MergeOperation
```python
from merge import _MergeOperation
```

Perform a database (SQL) merge operation between two DataFrame or Series
objects using either columns as keys or their row indexes

---
## get_join_indexers
```python
from merge import get_join_indexers
```

Parameters
----------
left_keys : list[ndarray, ExtensionArray, Index, Series]
right_keys : list[ndarray, ExtensionArray, Index, Series]
sort : bool, default False
how : {'inner', 'outer', 'left', 'right'}, default 'inner'

Returns
-------
np.ndarray[np.intp] or None
    Indexer into the left_keys.
np.ndarray[np.intp] or None
    Indexer into the right_keys.

---
## get_join_indexers_non_unique
```python
from merge import get_join_indexers_non_unique
```

Get join indexers for left and right.

Parameters
----------
left : ArrayLike
right : ArrayLike
sort : bool, default False
how : {'inner', 'outer', 'left', 'right'}, default 'inner'

Returns
-------
np.ndarray[np.intp]
    Indexer into left.
np.ndarray[np.intp]
    Indexer into right.

---
## restore_dropped_levels_multijoin
```python
from merge import restore_dropped_levels_multijoin
```

*this is an internal non-public method*

Returns the levels, labels and names of a multi-index to multi-index join.
Depending on the type of join, this method restores the appropriate
dropped levels of the joined multi-index.
The method relies on lindexer, rindexer which hold the index positions of
left and right, where a join was feasible

Parameters
----------
left : MultiIndex
    left index
right : MultiIndex
    right index
dropped_level_names : str array
    list of non-common level names
join_index : Index
    the index of the join between the
    common levels of left and right
lindexer : np.ndarray[np.intp]
    left indexer
rindexer : np.ndarray[np.intp]
    right indexer

Returns
-------
levels : list of Index
    levels of combined multiindexes
labels : np.ndarray[np.intp]
    labels of combined multiindexes
names : List[Hashable]
    names of combined multiindex levels

---
## _OrderedMerge
```python
from merge import _OrderedMerge
```



---
## _asof_by_function
```python
from merge import _asof_by_function
```



---
## _AsOfMerge
```python
from merge import _AsOfMerge
```



---
## _get_multiindex_indexer
```python
from merge import _get_multiindex_indexer
```



---
## _get_empty_indexer
```python
from merge import _get_empty_indexer
```

Return empty join indexers.

---
## _get_no_sort_one_missing_indexer
```python
from merge import _get_no_sort_one_missing_indexer
```

Return join indexers where all of one side is selected without sorting
and none of the other side is selected.

Parameters
----------
n : int
    Length of indexers to create.
left_missing : bool
    If True, the left indexer will contain only -1's.
    If False, the right indexer will contain only -1's.

Returns
-------
np.ndarray[np.intp]
    Left indexer
np.ndarray[np.intp]
    Right indexer

---
## _left_join_on_index
```python
from merge import _left_join_on_index
```



---
## _factorize_keys
```python
from merge import _factorize_keys
```

Encode left and right keys as enumerated types.

This is used to get the join indexers to be used when merging DataFrames.

Parameters
----------
lk : ndarray, ExtensionArray
    Left key.
rk : ndarray, ExtensionArray
    Right key.
sort : bool, defaults to True
    If True, the encoding is done such that the unique elements in the
    keys are sorted.

Returns
-------
np.ndarray[np.intp]
    Left (resp. right if called with `key='right'`) labels, as enumerated type.
np.ndarray[np.intp]
    Right (resp. left if called with `key='right'`) labels, as enumerated type.
int
    Number of unique elements in union of left and right labels.

See Also
--------
merge : Merge DataFrame or named Series objects
    with a database-style join.
algorithms.factorize : Encode the object as an enumerated type
    or categorical variable.

Examples
--------
>>> lk = np.array(["a", "c", "b"])
>>> rk = np.array(["a", "c"])

Here, the unique values are `'a', 'b', 'c'`. With the default
`sort=True`, the encoding will be `{0: 'a', 1: 'b', 2: 'c'}`:

>>> pd.core.reshape.merge._factorize_keys(lk, rk)
(array([0, 2, 1]), array([0, 2]), 3)

With the `sort=False`, the encoding will correspond to the order
in which the unique elements first appear: `{0: 'a', 1: 'c', 2: 'b'}`:

>>> pd.core.reshape.merge._factorize_keys(lk, rk, sort=False)
(array([0, 1, 2]), array([0, 1]), 3)

---
## _convert_arrays_and_get_rizer_klass
```python
from merge import _convert_arrays_and_get_rizer_klass
```



---
## _sort_labels
```python
from merge import _sort_labels
```



---
## _get_join_keys
```python
from merge import _get_join_keys
```



---
## _should_fill
```python
from merge import _should_fill
```



---
## _any
```python
from merge import _any
```



---
## _validate_operand
```python
from merge import _validate_operand
```



---
## _items_overlap_with_suffix
```python
from merge import _items_overlap_with_suffix
```

Suffixes type validation.

If two indices overlap, add suffixes to overlapping entries.

If corresponding suffix is empty, the entry is simply converted to string.

---
## _merger
```python
from merge import _merger
```



---
## __init__
```python
from merge import __init__
```



---
## _maybe_require_matching_dtypes
```python
from merge import _maybe_require_matching_dtypes
```



---
## _validate_tolerance
```python
from merge import _validate_tolerance
```



---
## _reindex_and_concat
```python
from merge import _reindex_and_concat
```

reindex along index and concat along columns.

---
## get_result
```python
from merge import get_result
```



---
## _indicator_name
```python
from merge import _indicator_name
```



---
## _indicator_pre_merge
```python
from merge import _indicator_pre_merge
```



---
## _indicator_post_merge
```python
from merge import _indicator_post_merge
```



---
## _maybe_restore_index_levels
```python
from merge import _maybe_restore_index_levels
```

Restore index levels specified as `on` parameters

Here we check for cases where `self.left_on` and `self.right_on` pairs
each reference an index level in their respective DataFrames. The
joined columns corresponding to these pairs are then restored to the
index of `result`.

**Note:** This method has side effects. It modifies `result` in-place

Parameters
----------
result: DataFrame
    merge result

Returns
-------
None

---
## _maybe_add_join_keys
```python
from merge import _maybe_add_join_keys
```



---
## _get_join_indexers
```python
from merge import _get_join_indexers
```

return the join indexers

---
## _get_join_info
```python
from merge import _get_join_info
```



---
## _create_join_index
```python
from merge import _create_join_index
```

Create a join index by rearranging one index to match another

Parameters
----------
index : Index
    index being rearranged
other_index : Index
    used to supply values not found in index
indexer : np.ndarray[np.intp] or None
    how to rearrange index
how : str
    Replacement is only necessary if indexer based on other_index.

Returns
-------
Index

---
## _get_merge_keys
```python
from merge import _get_merge_keys
```

Returns
-------
left_keys, right_keys, join_names, left_drop, right_drop

---
## _maybe_coerce_merge_keys
```python
from merge import _maybe_coerce_merge_keys
```



---
## _validate_left_right_on
```python
from merge import _validate_left_right_on
```



---
## _validate_validate_kwd
```python
from merge import _validate_validate_kwd
```



---
## _convert_to_multiindex
```python
from merge import _convert_to_multiindex
```



---
## _convert_values_for_libjoin
```python
from merge import _convert_values_for_libjoin
```



---
## renamer
```python
from merge import renamer
```

Rename the left and right indices.

If there is overlap, and suffix is not None, add
suffix, otherwise, leave it as-is.

Parameters
----------
x : original column name
suffix : str or None

Returns
-------
x : renamed column name

---
## _check_dtype_match
```python
from merge import _check_dtype_match
```



---
## get_dummies
```python
from encoding import get_dummies
```

Convert categorical variable into dummy/indicator variables.

Each variable is converted in as many 0/1 variables as there are different
values. Columns in the output are each named after a value; if the input is
a DataFrame, the name of the original variable is prepended to the value.

Parameters
----------
data : array-like, Series, or DataFrame
    Data of which to get dummy indicators.
prefix : str, list of str, or dict of str, default None
    String to append DataFrame column names.
    Pass a list with length equal to the number of columns
    when calling get_dummies on a DataFrame. Alternatively, `prefix`
    can be a dictionary mapping column names to prefixes.
prefix_sep : str, default '_'
    If appending prefix, separator/delimiter to use. Or pass a
    list or dictionary as with `prefix`.
dummy_na : bool, default False
    Add a column to indicate NaNs, if False NaNs are ignored.
columns : list-like, default None
    Column names in the DataFrame to be encoded.
    If `columns` is None then all the columns with
    `object`, `string`, or `category` dtype will be converted.
sparse : bool, default False
    Whether the dummy-encoded columns should be backed by
    a :class:`SparseArray` (True) or a regular NumPy array (False).
drop_first : bool, default False
    Whether to get k-1 dummies out of k categorical levels by removing the
    first level.
dtype : dtype, default bool
    Data type for new columns. Only a single dtype is allowed.

Returns
-------
DataFrame
    Dummy-coded data. If `data` contains other columns than the
    dummy-coded one(s), these will be prepended, unaltered, to the result.

See Also
--------
Series.str.get_dummies : Convert Series of strings to dummy codes.
:func:`~pandas.from_dummies` : Convert dummy codes to categorical ``DataFrame``.

Notes
-----
Reference :ref:`the user guide <reshaping.dummies>` for more examples.

Examples
--------
>>> s = pd.Series(list('abca'))

>>> pd.get_dummies(s)
       a      b      c
0   True  False  False
1  False   True  False
2  False  False   True
3   True  False  False

>>> s1 = ['a', 'b', np.nan]

>>> pd.get_dummies(s1)
       a      b
0   True  False
1  False   True
2  False  False

>>> pd.get_dummies(s1, dummy_na=True)
       a      b    NaN
0   True  False  False
1  False   True  False
2  False  False   True

>>> df = pd.DataFrame({'A': ['a', 'b', 'a'], 'B': ['b', 'a', 'c'],
...                    'C': [1, 2, 3]})

>>> pd.get_dummies(df, prefix=['col1', 'col2'])
   C  col1_a  col1_b  col2_a  col2_b  col2_c
0  1    True   False   False    True   False
1  2   False    True    True   False   False
2  3    True   False   False   False    True

>>> pd.get_dummies(pd.Series(list('abcaa')))
       a      b      c
0   True  False  False
1  False   True  False
2  False  False   True
3   True  False  False
4   True  False  False

>>> pd.get_dummies(pd.Series(list('abcaa')), drop_first=True)
       b      c
0  False  False
1   True  False
2  False   True
3  False  False
4  False  False

>>> pd.get_dummies(pd.Series(list('abc')), dtype=float)
     a    b    c
0  1.0  0.0  0.0
1  0.0  1.0  0.0
2  0.0  0.0  1.0

---
## _get_dummies_1d
```python
from encoding import _get_dummies_1d
```



---
## from_dummies
```python
from encoding import from_dummies
```

Create a categorical ``DataFrame`` from a ``DataFrame`` of dummy variables.

Inverts the operation performed by :func:`~pandas.get_dummies`.

.. versionadded:: 1.5.0

Parameters
----------
data : DataFrame
    Data which contains dummy-coded variables in form of integer columns of
    1's and 0's.
sep : str, default None
    Separator used in the column names of the dummy categories they are
    character indicating the separation of the categorical names from the prefixes.
    For example, if your column names are 'prefix_A' and 'prefix_B',
    you can strip the underscore by specifying sep='_'.
default_category : None, Hashable or dict of Hashables, default None
    The default category is the implied category when a value has none of the
    listed categories specified with a one, i.e. if all dummies in a row are
    zero. Can be a single value for all variables or a dict directly mapping
    the default categories to a prefix of a variable.

Returns
-------
DataFrame
    Categorical data decoded from the dummy input-data.

Raises
------
ValueError
    * When the input ``DataFrame`` ``data`` contains NA values.
    * When the input ``DataFrame`` ``data`` contains column names with separators
      that do not match the separator specified with ``sep``.
    * When a ``dict`` passed to ``default_category`` does not include an implied
      category for each prefix.
    * When a value in ``data`` has more than one category assigned to it.
    * When ``default_category=None`` and a value in ``data`` has no category
      assigned to it.
TypeError
    * When the input ``data`` is not of type ``DataFrame``.
    * When the input ``DataFrame`` ``data`` contains non-dummy data.
    * When the passed ``sep`` is of a wrong data type.
    * When the passed ``default_category`` is of a wrong data type.

See Also
--------
:func:`~pandas.get_dummies` : Convert ``Series`` or ``DataFrame`` to dummy codes.
:class:`~pandas.Categorical` : Represent a categorical variable in classic.

Notes
-----
The columns of the passed dummy data should only include 1's and 0's,
or boolean values.

Examples
--------
>>> df = pd.DataFrame({"a": [1, 0, 0, 1], "b": [0, 1, 0, 0],
...                    "c": [0, 0, 1, 0]})

>>> df
   a  b  c
0  1  0  0
1  0  1  0
2  0  0  1
3  1  0  0

>>> pd.from_dummies(df)
0     a
1     b
2     c
3     a

>>> df = pd.DataFrame({"col1_a": [1, 0, 1], "col1_b": [0, 1, 0],
...                    "col2_a": [0, 1, 0], "col2_b": [1, 0, 0],
...                    "col2_c": [0, 0, 1]})

>>> df
      col1_a  col1_b  col2_a  col2_b  col2_c
0       1       0       0       1       0
1       0       1       1       0       0
2       1       0       0       0       1

>>> pd.from_dummies(df, sep="_")
    col1    col2
0    a       b
1    b       a
2    a       c

>>> df = pd.DataFrame({"col1_a": [1, 0, 0], "col1_b": [0, 1, 0],
...                    "col2_a": [0, 1, 0], "col2_b": [1, 0, 0],
...                    "col2_c": [0, 0, 0]})

>>> df
      col1_a  col1_b  col2_a  col2_b  col2_c
0       1       0       0       1       0
1       0       1       1       0       0
2       0       0       0       0       0

>>> pd.from_dummies(df, sep="_", default_category={"col1": "d", "col2": "e"})
    col1    col2
0    a       b
1    b       a
2    d       e

---
## get_empty_frame
```python
from encoding import get_empty_frame
```



---
## check_len
```python
from encoding import check_len
```



---
## __name__
```python
from concat import __name__
```



---
## concat
```python
from concat import concat
```

Concatenate pandas objects along a particular axis.

Allows optional set logic along the other axes.

Can also add a layer of hierarchical indexing on the concatenation axis,
which may be useful if the labels are the same (or overlapping) on
the passed axis number.

Parameters
----------
objs : a sequence or mapping of Series or DataFrame objects
    If a mapping is passed, the sorted keys will be used as the `keys`
    argument, unless it is passed, in which case the values will be
    selected (see below). Any None objects will be dropped silently unless
    they are all None in which case a ValueError will be raised.
axis : {0/'index', 1/'columns'}, default 0
    The axis to concatenate along.
join : {'inner', 'outer'}, default 'outer'
    How to handle indexes on other axis (or axes).
ignore_index : bool, default False
    If True, do not use the index values along the concatenation axis. The
    resulting axis will be labeled 0, ..., n - 1. This is useful if you are
    concatenating objects where the concatenation axis does not have
    meaningful indexing information. Note the index values on the other
    axes are still respected in the join.
keys : sequence, default None
    If multiple levels passed, should contain tuples. Construct
    hierarchical index using the passed keys as the outermost level.
levels : list of sequences, default None
    Specific levels (unique values) to use for constructing a
    MultiIndex. Otherwise they will be inferred from the keys.
names : list, default None
    Names for the levels in the resulting hierarchical index.
verify_integrity : bool, default False
    Check whether the new concatenated axis contains duplicates. This can
    be very expensive relative to the actual data concatenation.
sort : bool, default False
    Sort non-concatenation axis if it is not already aligned. One exception to
    this is when the non-concatentation axis is a DatetimeIndex and join='outer'
    and the axis is not already aligned. In that case, the non-concatenation
    axis is always sorted lexicographically.
copy : bool, default True
    If False, do not copy data unnecessarily.

Returns
-------
object, type of objs
    When concatenating all ``Series`` along the index (axis=0), a
    ``Series`` is returned. When ``objs`` contains at least one
    ``DataFrame``, a ``DataFrame`` is returned. When concatenating along
    the columns (axis=1), a ``DataFrame`` is returned.

See Also
--------
DataFrame.join : Join DataFrames using indexes.
DataFrame.merge : Merge DataFrames by indexes or columns.

Notes
-----
The keys, levels, and names arguments are all optional.

A walkthrough of how this method fits in with other tools for combining
pandas objects can be found `here
<https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html>`__.

It is not recommended to build DataFrames by adding single rows in a
for loop. Build a list of rows and make a DataFrame in a single concat.

Examples
--------
Combine two ``Series``.

>>> s1 = pd.Series(['a', 'b'])
>>> s2 = pd.Series(['c', 'd'])
>>> pd.concat([s1, s2])
0    a
1    b
0    c
1    d
dtype: object

Clear the existing index and reset it in the result
by setting the ``ignore_index`` option to ``True``.

>>> pd.concat([s1, s2], ignore_index=True)
0    a
1    b
2    c
3    d
dtype: object

Add a hierarchical index at the outermost level of
the data with the ``keys`` option.

>>> pd.concat([s1, s2], keys=['s1', 's2'])
s1  0    a
    1    b
s2  0    c
    1    d
dtype: object

Label the index keys you create with the ``names`` option.

>>> pd.concat([s1, s2], keys=['s1', 's2'],
...           names=['Series name', 'Row ID'])
Series name  Row ID
s1           0         a
             1         b
s2           0         c
             1         d
dtype: object

Combine two ``DataFrame`` objects with identical columns.

>>> df1 = pd.DataFrame([['a', 1], ['b', 2]],
...                    columns=['letter', 'number'])
>>> df1
  letter  number
0      a       1
1      b       2
>>> df2 = pd.DataFrame([['c', 3], ['d', 4]],
...                    columns=['letter', 'number'])
>>> df2
  letter  number
0      c       3
1      d       4
>>> pd.concat([df1, df2])
  letter  number
0      a       1
1      b       2
0      c       3
1      d       4

Combine ``DataFrame`` objects with overlapping columns
and return everything. Columns outside the intersection will
be filled with ``NaN`` values.

>>> df3 = pd.DataFrame([['c', 3, 'cat'], ['d', 4, 'dog']],
...                    columns=['letter', 'number', 'animal'])
>>> df3
  letter  number animal
0      c       3    cat
1      d       4    dog
>>> pd.concat([df1, df3], sort=False)
  letter  number animal
0      a       1    NaN
1      b       2    NaN
0      c       3    cat
1      d       4    dog

Combine ``DataFrame`` objects with overlapping columns
and return only those that are shared by passing ``inner`` to
the ``join`` keyword argument.

>>> pd.concat([df1, df3], join="inner")
  letter  number
0      a       1
1      b       2
0      c       3
1      d       4

Combine ``DataFrame`` objects horizontally along the x axis by
passing in ``axis=1``.

>>> df4 = pd.DataFrame([['bird', 'polly'], ['monkey', 'george']],
...                    columns=['animal', 'name'])
>>> pd.concat([df1, df4], axis=1)
  letter  number  animal    name
0      a       1    bird   polly
1      b       2  monkey  george

Prevent the result from including duplicate index values with the
``verify_integrity`` option.

>>> df5 = pd.DataFrame([1], index=['a'])
>>> df5
   0
a  1
>>> df6 = pd.DataFrame([2], index=['a'])
>>> df6
   0
a  2
>>> pd.concat([df5, df6], verify_integrity=True)
Traceback (most recent call last):
    ...
ValueError: Indexes have overlapping values: ['a']

Append a single row to the end of a ``DataFrame`` object.

>>> df7 = pd.DataFrame({'a': 1, 'b': 2}, index=[0])
>>> df7
    a   b
0   1   2
>>> new_row = pd.Series({'a': 3, 'b': 4})
>>> new_row
a    3
b    4
dtype: int64
>>> pd.concat([df7, new_row.to_frame().T], ignore_index=True)
    a   b
0   1   2
1   3   4

---
## _Concatenator
```python
from concat import _Concatenator
```

Orchestrates a concatenation operation for BlockManagers

---
## _concat_indexes
```python
from concat import _concat_indexes
```



---
## _make_concat_multiindex
```python
from concat import _make_concat_multiindex
```



---
## __init__
```python
from concat import __init__
```



---
## _get_ndims
```python
from concat import _get_ndims
```



---
## _clean_keys_and_objs
```python
from concat import _clean_keys_and_objs
```



---
## _get_sample_object
```python
from concat import _get_sample_object
```



---
## _sanitize_mixed_ndim
```python
from concat import _sanitize_mixed_ndim
```



---
## get_result
```python
from concat import get_result
```



---
## _get_result_dim
```python
from concat import _get_result_dim
```



---
## new_axes
```python
from concat import new_axes
```



---
## _get_comb_axis
```python
from concat import _get_comb_axis
```



---
## _get_concat_axis
```python
from concat import _get_concat_axis
```

Return index to be used along concatenation axis.

---
## _maybe_check_integrity
```python
from concat import _maybe_check_integrity
```



---
## cartesian_product
```python
from util import cartesian_product
```

Numpy version of itertools.product.
Sometimes faster (for large inputs)...

Parameters
----------
X : list-like of list-likes

Returns
-------
product : list of ndarrays

Examples
--------
>>> cartesian_product([list('ABC'), [1, 2]])
[array(['A', 'A', 'B', 'B', 'C', 'C'], dtype='<U1'), array([1, 2, 1, 2, 1, 2])]

See Also
--------
itertools.product : Cartesian product of input iterables.  Equivalent to
    nested for-loops.

---
## tile_compat
```python
from util import tile_compat
```

Index compat for np.tile.

Notes
-----
Does not support multi-dimensional `num`.

---
## __name__
```python
from reshape import __name__
```



---
## _Unstacker
```python
from reshape import _Unstacker
```

Helper class to unstack data / pivot with multi-level index

Parameters
----------
index : MultiIndex
level : int or str, default last level
    Level to "unstack". Accepts a name for the level.
fill_value : scalar, optional
    Default value to fill in missing values if subgroups do not have the
    same set of labels. By default, missing values will be replaced with
    the default fill value for that data type, NaN for float, NaT for
    datetimelike, etc. For integer types, by default data will converted to
    float and missing values will be set to NaN.
constructor : object
    Pandas ``DataFrame`` or subclass used to create unstacked
    response.  If None, DataFrame will be used.

Examples
--------
>>> index = pd.MultiIndex.from_tuples([('one', 'a'), ('one', 'b'),
...                                    ('two', 'a'), ('two', 'b')])
>>> s = pd.Series(np.arange(1, 5, dtype=np.int64), index=index)
>>> s
one  a    1
     b    2
two  a    3
     b    4
dtype: int64

>>> s.unstack(level=-1)
     a  b
one  1  2
two  3  4

>>> s.unstack(level=0)
   one  two
a    1    3
b    2    4

Returns
-------
unstacked : DataFrame

---
## _unstack_multiple
```python
from reshape import _unstack_multiple
```



---
## unstack
```python
from reshape import unstack
```



---
## _unstack_frame
```python
from reshape import _unstack_frame
```



---
## _unstack_extension_series
```python
from reshape import _unstack_extension_series
```

Unstack an ExtensionArray-backed Series.

The ExtensionDtype is preserved.

Parameters
----------
series : Series
    A Series with an ExtensionArray for values
level : Any
    The level name or number.
fill_value : Any
    The user-level (not physical storage) fill value to use for
    missing values introduced by the reshape. Passed to
    ``series.values.take``.
sort : bool
    Whether to sort the resulting MuliIndex levels

Returns
-------
DataFrame
    Each column of the DataFrame will have the same dtype as
    the input Series.

---
## stack
```python
from reshape import stack
```

Convert DataFrame to Series with multi-level Index. Columns become the
second level of the resulting hierarchical index

Returns
-------
stacked : Series or DataFrame

---
## stack_multiple
```python
from reshape import stack_multiple
```



---
## _stack_multi_column_index
```python
from reshape import _stack_multi_column_index
```

Creates a MultiIndex from the first N-1 levels of this MultiIndex.

---
## _stack_multi_columns
```python
from reshape import _stack_multi_columns
```



---
## _reorder_for_extension_array_stack
```python
from reshape import _reorder_for_extension_array_stack
```

Re-orders the values when stacking multiple extension-arrays.

The indirect stacking method used for EAs requires a followup
take to get the order correct.

Parameters
----------
arr : ExtensionArray
n_rows, n_columns : int
    The number of rows and columns in the original DataFrame.

Returns
-------
taken : ExtensionArray
    The original `arr` with elements re-ordered appropriately

Examples
--------
>>> arr = np.array(['a', 'b', 'c', 'd', 'e', 'f'])
>>> _reorder_for_extension_array_stack(arr, 2, 3)
array(['a', 'c', 'e', 'b', 'd', 'f'], dtype='<U1')

>>> _reorder_for_extension_array_stack(arr, 3, 2)
array(['a', 'd', 'b', 'e', 'c', 'f'], dtype='<U1')

---
## stack_v3
```python
from reshape import stack_v3
```



---
## __init__
```python
from reshape import __init__
```



---
## _indexer_and_to_sort
```python
from reshape import _indexer_and_to_sort
```



---
## sorted_labels
```python
from reshape import sorted_labels
```



---
## _make_sorted_values
```python
from reshape import _make_sorted_values
```



---
## _make_selectors
```python
from reshape import _make_selectors
```



---
## mask_all
```python
from reshape import mask_all
```



---
## arange_result
```python
from reshape import arange_result
```



---
## get_result
```python
from reshape import get_result
```



---
## get_new_values
```python
from reshape import get_new_values
```



---
## get_new_columns
```python
from reshape import get_new_columns
```



---
## _repeater
```python
from reshape import _repeater
```



---
## new_index
```python
from reshape import new_index
```



---
## stack_factorize
```python
from reshape import stack_factorize
```



---
## _convert_level_number
```python
from reshape import _convert_level_number
```

Logic for converting the level number to something we can safely pass
to swaplevel.

If `level_num` matches a column name return the name from
position `level_num`, otherwise return `level_num`.

---
## __name__
```python
from melt import __name__
```



---
## ensure_list_vars
```python
from melt import ensure_list_vars
```



---
## melt
```python
from melt import melt
```



---
## lreshape
```python
from melt import lreshape
```

Reshape wide-format data to long. Generalized inverse of DataFrame.pivot.

Accepts a dictionary, ``groups``, in which each key is a new column name
and each value is a list of old column names that will be "melted" under
the new column name as part of the reshape.

Parameters
----------
data : DataFrame
    The wide-format DataFrame.
groups : dict
    {new_name : list_of_columns}.
dropna : bool, default True
    Do not include columns whose entries are all NaN.

Returns
-------
DataFrame
    Reshaped DataFrame.

See Also
--------
melt : Unpivot a DataFrame from wide to long format, optionally leaving
    identifiers set.
pivot : Create a spreadsheet-style pivot table as a DataFrame.
DataFrame.pivot : Pivot without aggregation that can handle
    non-numeric data.
DataFrame.pivot_table : Generalization of pivot that can handle
    duplicate values for one index/column pair.
DataFrame.unstack : Pivot based on the index values instead of a
    column.
wide_to_long : Wide panel to long format. Less flexible but more
    user-friendly than melt.

Examples
--------
>>> data = pd.DataFrame({'hr1': [514, 573], 'hr2': [545, 526],
...                      'team': ['Red Sox', 'Yankees'],
...                      'year1': [2007, 2007], 'year2': [2008, 2008]})
>>> data
   hr1  hr2     team  year1  year2
0  514  545  Red Sox   2007   2008
1  573  526  Yankees   2007   2008

>>> pd.lreshape(data, {'year': ['year1', 'year2'], 'hr': ['hr1', 'hr2']})
      team  year   hr
0  Red Sox  2007  514
1  Yankees  2007  573
2  Red Sox  2008  545
3  Yankees  2008  526

---
## wide_to_long
```python
from melt import wide_to_long
```

Unpivot a DataFrame from wide to long format.

Less flexible but more user-friendly than melt.

With stubnames ['A', 'B'], this function expects to find one or more
group of columns with format
A-suffix1, A-suffix2,..., B-suffix1, B-suffix2,...
You specify what you want to call this suffix in the resulting long format
with `j` (for example `j='year'`)

Each row of these wide variables are assumed to be uniquely identified by
`i` (can be a single column name or a list of column names)

All remaining variables in the data frame are left intact.

Parameters
----------
df : DataFrame
    The wide-format DataFrame.
stubnames : str or list-like
    The stub name(s). The wide format variables are assumed to
    start with the stub names.
i : str or list-like
    Column(s) to use as id variable(s).
j : str
    The name of the sub-observation variable. What you wish to name your
    suffix in the long format.
sep : str, default ""
    A character indicating the separation of the variable names
    in the wide format, to be stripped from the names in the long format.
    For example, if your column names are A-suffix1, A-suffix2, you
    can strip the hyphen by specifying `sep='-'`.
suffix : str, default '\\d+'
    A regular expression capturing the wanted suffixes. '\\d+' captures
    numeric suffixes. Suffixes with no numbers could be specified with the
    negated character class '\\D+'. You can also further disambiguate
    suffixes, for example, if your wide variables are of the form A-one,
    B-two,.., and you have an unrelated column A-rating, you can ignore the
    last one by specifying `suffix='(!?one|two)'`. When all suffixes are
    numeric, they are cast to int64/float64.

Returns
-------
DataFrame
    A DataFrame that contains each stub name as a variable, with new index
    (i, j).

See Also
--------
melt : Unpivot a DataFrame from wide to long format, optionally leaving
    identifiers set.
pivot : Create a spreadsheet-style pivot table as a DataFrame.
DataFrame.pivot : Pivot without aggregation that can handle
    non-numeric data.
DataFrame.pivot_table : Generalization of pivot that can handle
    duplicate values for one index/column pair.
DataFrame.unstack : Pivot based on the index values instead of a
    column.

Notes
-----
All extra variables are left untouched. This simply uses
`pandas.melt` under the hood, but is hard-coded to "do the right thing"
in a typical case.

Examples
--------
>>> np.random.seed(123)
>>> df = pd.DataFrame({"A1970" : {0 : "a", 1 : "b", 2 : "c"},
...                    "A1980" : {0 : "d", 1 : "e", 2 : "f"},
...                    "B1970" : {0 : 2.5, 1 : 1.2, 2 : .7},
...                    "B1980" : {0 : 3.2, 1 : 1.3, 2 : .1},
...                    "X"     : dict(zip(range(3), np.random.randn(3)))
...                   })
>>> df["id"] = df.index
>>> df
  A1970 A1980  B1970  B1980         X  id
0     a     d    2.5    3.2 -1.085631   0
1     b     e    1.2    1.3  0.997345   1
2     c     f    0.7    0.1  0.282978   2
>>> pd.wide_to_long(df, ["A", "B"], i="id", j="year")
... # doctest: +NORMALIZE_WHITESPACE
                X  A    B
id year
0  1970 -1.085631  a  2.5
1  1970  0.997345  b  1.2
2  1970  0.282978  c  0.7
0  1980 -1.085631  d  3.2
1  1980  0.997345  e  1.3
2  1980  0.282978  f  0.1

With multiple id columns

>>> df = pd.DataFrame({
...     'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3],
...     'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3],
...     'ht1': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1],
...     'ht2': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9]
... })
>>> df
   famid  birth  ht1  ht2
0      1      1  2.8  3.4
1      1      2  2.9  3.8
2      1      3  2.2  2.9
3      2      1  2.0  3.2
4      2      2  1.8  2.8
5      2      3  1.9  2.4
6      3      1  2.2  3.3
7      3      2  2.3  3.4
8      3      3  2.1  2.9
>>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age')
>>> l
... # doctest: +NORMALIZE_WHITESPACE
                  ht
famid birth age
1     1     1    2.8
            2    3.4
      2     1    2.9
            2    3.8
      3     1    2.2
            2    2.9
2     1     1    2.0
            2    3.2
      2     1    1.8
            2    2.8
      3     1    1.9
            2    2.4
3     1     1    2.2
            2    3.3
      2     1    2.3
            2    3.4
      3     1    2.1
            2    2.9

Going from long back to wide just takes some creative use of `unstack`

>>> w = l.unstack()
>>> w.columns = w.columns.map('{0[0]}{0[1]}'.format)
>>> w.reset_index()
   famid  birth  ht1  ht2
0      1      1  2.8  3.4
1      1      2  2.9  3.8
2      1      3  2.2  2.9
3      2      1  2.0  3.2
4      2      2  1.8  2.8
5      2      3  1.9  2.4
6      3      1  2.2  3.3
7      3      2  2.3  3.4
8      3      3  2.1  2.9

Less wieldy column names are also handled

>>> np.random.seed(0)
>>> df = pd.DataFrame({'A(weekly)-2010': np.random.rand(3),
...                    'A(weekly)-2011': np.random.rand(3),
...                    'B(weekly)-2010': np.random.rand(3),
...                    'B(weekly)-2011': np.random.rand(3),
...                    'X' : np.random.randint(3, size=3)})
>>> df['id'] = df.index
>>> df # doctest: +NORMALIZE_WHITESPACE, +ELLIPSIS
   A(weekly)-2010  A(weekly)-2011  B(weekly)-2010  B(weekly)-2011  X  id
0        0.548814        0.544883        0.437587        0.383442  0   0
1        0.715189        0.423655        0.891773        0.791725  1   1
2        0.602763        0.645894        0.963663        0.528895  1   2

>>> pd.wide_to_long(df, ['A(weekly)', 'B(weekly)'], i='id',
...                 j='year', sep='-')
... # doctest: +NORMALIZE_WHITESPACE
         X  A(weekly)  B(weekly)
id year
0  2010  0   0.548814   0.437587
1  2010  1   0.715189   0.891773
2  2010  1   0.602763   0.963663
0  2011  0   0.544883   0.383442
1  2011  1   0.423655   0.791725
2  2011  1   0.645894   0.528895

If we have many columns, we could also use a regex to find our
stubnames and pass that list on to wide_to_long

>>> stubnames = sorted(
...     set([match[0] for match in df.columns.str.findall(
...         r'[A-B]\(.*\)').values if match != []])
... )
>>> list(stubnames)
['A(weekly)', 'B(weekly)']

All of the above examples have integers as suffixes. It is possible to
have non-integers as suffixes.

>>> df = pd.DataFrame({
...     'famid': [1, 1, 1, 2, 2, 2, 3, 3, 3],
...     'birth': [1, 2, 3, 1, 2, 3, 1, 2, 3],
...     'ht_one': [2.8, 2.9, 2.2, 2, 1.8, 1.9, 2.2, 2.3, 2.1],
...     'ht_two': [3.4, 3.8, 2.9, 3.2, 2.8, 2.4, 3.3, 3.4, 2.9]
... })
>>> df
   famid  birth  ht_one  ht_two
0      1      1     2.8     3.4
1      1      2     2.9     3.8
2      1      3     2.2     2.9
3      2      1     2.0     3.2
4      2      2     1.8     2.8
5      2      3     1.9     2.4
6      3      1     2.2     3.3
7      3      2     2.3     3.4
8      3      3     2.1     2.9

>>> l = pd.wide_to_long(df, stubnames='ht', i=['famid', 'birth'], j='age',
...                     sep='_', suffix=r'\w+')
>>> l
... # doctest: +NORMALIZE_WHITESPACE
                  ht
famid birth age
1     1     one  2.8
            two  3.4
      2     one  2.9
            two  3.8
      3     one  2.2
            two  2.9
2     1     one  2.0
            two  3.2
      2     one  1.8
            two  2.8
      3     one  1.9
            two  2.4
3     1     one  2.2
            two  3.3
      2     one  2.3
            two  3.4
      3     one  2.1
            two  2.9

---
## get_var_names
```python
from melt import get_var_names
```



---
## melt_stub
```python
from melt import melt_stub
```



---
## __name__
```python
from pivot import __name__
```



---
## pivot_table
```python
from pivot import pivot_table
```



---
## __internal_pivot_table
```python
from pivot import __internal_pivot_table
```

Helper of :func:`pandas.pivot_table` for any non-list ``aggfunc``.

---
## _add_margins
```python
from pivot import _add_margins
```



---
## _compute_grand_margin
```python
from pivot import _compute_grand_margin
```



---
## _generate_marginal_results
```python
from pivot import _generate_marginal_results
```



---
## _generate_marginal_results_without_values
```python
from pivot import _generate_marginal_results_without_values
```



---
## _convert_by
```python
from pivot import _convert_by
```



---
## pivot
```python
from pivot import pivot
```



---
## crosstab
```python
from pivot import crosstab
```

Compute a simple cross tabulation of two (or more) factors.

By default, computes a frequency table of the factors unless an
array of values and an aggregation function are passed.

Parameters
----------
index : array-like, Series, or list of arrays/Series
    Values to group by in the rows.
columns : array-like, Series, or list of arrays/Series
    Values to group by in the columns.
values : array-like, optional
    Array of values to aggregate according to the factors.
    Requires `aggfunc` be specified.
rownames : sequence, default None
    If passed, must match number of row arrays passed.
colnames : sequence, default None
    If passed, must match number of column arrays passed.
aggfunc : function, optional
    If specified, requires `values` be specified as well.
margins : bool, default False
    Add row/column margins (subtotals).
margins_name : str, default 'All'
    Name of the row/column that will contain the totals
    when margins is True.
dropna : bool, default True
    Do not include columns whose entries are all NaN.
normalize : bool, {'all', 'index', 'columns'}, or {0,1}, default False
    Normalize by dividing all values by the sum of values.

    - If passed 'all' or `True`, will normalize over all values.
    - If passed 'index' will normalize over each row.
    - If passed 'columns' will normalize over each column.
    - If margins is `True`, will also normalize margin values.

Returns
-------
DataFrame
    Cross tabulation of the data.

See Also
--------
DataFrame.pivot : Reshape data based on column values.
pivot_table : Create a pivot table as a DataFrame.

Notes
-----
Any Series passed will have their name attributes used unless row or column
names for the cross-tabulation are specified.

Any input passed containing Categorical data will have **all** of its
categories included in the cross-tabulation, even if the actual data does
not contain any instances of a particular category.

In the event that there aren't overlapping indexes an empty DataFrame will
be returned.

Reference :ref:`the user guide <reshaping.crosstabulations>` for more examples.

Examples
--------
>>> a = np.array(["foo", "foo", "foo", "foo", "bar", "bar",
...               "bar", "bar", "foo", "foo", "foo"], dtype=object)
>>> b = np.array(["one", "one", "one", "two", "one", "one",
...               "one", "two", "two", "two", "one"], dtype=object)
>>> c = np.array(["dull", "dull", "shiny", "dull", "dull", "shiny",
...               "shiny", "dull", "shiny", "shiny", "shiny"],
...              dtype=object)
>>> pd.crosstab(a, [b, c], rownames=['a'], colnames=['b', 'c'])
b   one        two
c   dull shiny dull shiny
a
bar    1     2    1     0
foo    2     2    1     2

Here 'c' and 'f' are not represented in the data and will not be
shown in the output because dropna is True by default. Set
dropna=False to preserve categories with no data.

>>> foo = pd.Categorical(['a', 'b'], categories=['a', 'b', 'c'])
>>> bar = pd.Categorical(['d', 'e'], categories=['d', 'e', 'f'])
>>> pd.crosstab(foo, bar)
col_0  d  e
row_0
a      1  0
b      0  1
>>> pd.crosstab(foo, bar, dropna=False)
col_0  d  e  f
row_0
a      1  0  0
b      0  1  0
c      0  0  0

---
## _normalize
```python
from pivot import _normalize
```



---
## _get_names
```python
from pivot import _get_names
```



---
## _build_names_mapper
```python
from pivot import _build_names_mapper
```

Given the names of a DataFrame's rows and columns, returns a set of unique row
and column names and mappers that convert to original names.

A row or column name is replaced if it is duplicate among the rows of the inputs,
among the columns of the inputs or between the rows and the columns.

Parameters
----------
rownames: list[str]
colnames: list[str]

Returns
-------
Tuple(Dict[str, str], List[str], Dict[str, str], List[str])

rownames_mapper: dict[str, str]
    a dictionary with new row names as keys and original rownames as values
unique_rownames: list[str]
    a list of rownames with duplicate names replaced by dummy names
colnames_mapper: dict[str, str]
    a dictionary with new column names as keys and original column names as values
unique_colnames: list[str]
    a list of column names with duplicate names replaced by dummy names

---
## get_duplicates
```python
from pivot import get_duplicates
```



---
## _all_key
```python
from pivot import _all_key
```



---
## forbid_nonstring_types
```python
from accessor import forbid_nonstring_types
```

Decorator to forbid specific types for a method of StringMethods.

For calling `.str.{method}` on a Series or Index, it is necessary to first
initialize the :class:`StringMethods` object, and then call the method.
However, different methods allow different input types, and so this can not
be checked during :meth:`StringMethods.__init__`, but must be done on a
per-method basis. This decorator exists to facilitate this process, and
make it explicit which (inferred) types are disallowed by the method.

:meth:`StringMethods.__init__` allows the *union* of types its different
methods allow (after skipping NaNs; see :meth:`StringMethods._validate`),
namely: ['string', 'empty', 'bytes', 'mixed', 'mixed-integer'].

The default string types ['string', 'empty'] are allowed for all methods.
For the additional types ['bytes', 'mixed', 'mixed-integer'], each method
then needs to forbid the types it is not intended for.

Parameters
----------
forbidden : list-of-str or None
    List of forbidden non-string types, may be one or more of
    `['bytes', 'mixed', 'mixed-integer']`.
name : str, default None
    Name of the method to use in the error message. By default, this is
    None, in which case the name from the method being wrapped will be
    copied. However, for working with further wrappers (like _pat_wrapper
    and _noarg_wrapper), it is necessary to specify the name.

Returns
-------
func : wrapper
    The method to which the decorator is applied, with an added check that
    enforces the inferred type to not be in the list of forbidden types.

Raises
------
TypeError
    If the inferred type of the underlying data is in `forbidden`.

---
## _map_and_wrap
```python
from accessor import _map_and_wrap
```



---
## StringMethods
```python
from accessor import StringMethods
```

Vectorized string functions for Series and Index.

NAs stay NA unless handled otherwise by a particular method.
Patterned after Python's string methods, with some inspiration from
R's stringr package.

Examples
--------
>>> s = pd.Series(["A_Str_Series"])
>>> s
0    A_Str_Series
dtype: object

>>> s.str.split("_")
0    [A, Str, Series]
dtype: object

>>> s.str.replace("_", "")
0    AStrSeries
dtype: object

---
## cat_safe
```python
from accessor import cat_safe
```

Auxiliary function for :meth:`str.cat`.

Same signature as cat_core, but handles TypeErrors in concatenation, which
happen if the arrays in list_of columns have the wrong dtypes or content.

Parameters
----------
list_of_columns : list of numpy arrays
    List of arrays to be concatenated with sep;
    these arrays may not contain NaNs!
sep : string
    The separator string for concatenating the columns.

Returns
-------
nd.array
    The concatenation of list_of_columns with sep.

---
## cat_core
```python
from accessor import cat_core
```

Auxiliary function for :meth:`str.cat`

Parameters
----------
list_of_columns : list of numpy arrays
    List of arrays to be concatenated with sep;
    these arrays may not contain NaNs!
sep : string
    The separator string for concatenating the columns.

Returns
-------
nd.array
    The concatenation of list_of_columns with sep.

---
## _result_dtype
```python
from accessor import _result_dtype
```



---
## _get_single_group_name
```python
from accessor import _get_single_group_name
```



---
## _get_group_names
```python
from accessor import _get_group_names
```

Get named groups from compiled regex.

Unnamed groups are numbered.

Parameters
----------
regex : compiled regex

Returns
-------
list of column labels

---
## str_extractall
```python
from accessor import str_extractall
```



---
## _forbid_nonstring_types
```python
from accessor import _forbid_nonstring_types
```



---
## wrapper
```python
from accessor import wrapper
```



---
## _validate
```python
from accessor import _validate
```



---
## __getitem__
```python
from accessor import __getitem__
```



---
## __iter__
```python
from accessor import __iter__
```



---
## _wrap_result
```python
from accessor import _wrap_result
```



---
## _get_series_list
```python
from accessor import _get_series_list
```

Auxiliary function for :meth:`str.cat`. Turn potentially mixed input
into a list of Series (elements without an index must match the length
of the calling Series/Index).

Parameters
----------
others : Series, DataFrame, np.ndarray, list-like or list-like of
    Objects that are either Series, Index or np.ndarray (1-dim).

Returns
-------
list of Series
    Others transformed into list of Series.

---
## cat
```python
from accessor import cat
```

Concatenate strings in the Series/Index with given separator.

If `others` is specified, this function concatenates the Series/Index
and elements of `others` element-wise.
If `others` is not passed, then all values in the Series/Index are
concatenated into a single string with a given `sep`.

Parameters
----------
others : Series, Index, DataFrame, np.ndarray or list-like
    Series, Index, DataFrame, np.ndarray (one- or two-dimensional) and
    other list-likes of strings must have the same length as the
    calling Series/Index, with the exception of indexed objects (i.e.
    Series/Index/DataFrame) if `join` is not None.

    If others is a list-like that contains a combination of Series,
    Index or np.ndarray (1-dim), then all elements will be unpacked and
    must satisfy the above criteria individually.

    If others is None, the method returns the concatenation of all
    strings in the calling Series/Index.
sep : str, default ''
    The separator between the different elements/columns. By default
    the empty string `''` is used.
na_rep : str or None, default None
    Representation that is inserted for all missing values:

    - If `na_rep` is None, and `others` is None, missing values in the
      Series/Index are omitted from the result.
    - If `na_rep` is None, and `others` is not None, a row containing a
      missing value in any of the columns (before concatenation) will
      have a missing value in the result.
join : {'left', 'right', 'outer', 'inner'}, default 'left'
    Determines the join-style between the calling Series/Index and any
    Series/Index/DataFrame in `others` (objects without an index need
    to match the length of the calling Series/Index). To disable
    alignment, use `.values` on any Series/Index/DataFrame in `others`.

Returns
-------
str, Series or Index
    If `others` is None, `str` is returned, otherwise a `Series/Index`
    (same type as caller) of objects is returned.

See Also
--------
split : Split each string in the Series/Index.
join : Join lists contained as elements in the Series/Index.

Examples
--------
When not passing `others`, all values are concatenated into a single
string:

>>> s = pd.Series(['a', 'b', np.nan, 'd'])
>>> s.str.cat(sep=' ')
'a b d'

By default, NA values in the Series are ignored. Using `na_rep`, they
can be given a representation:

>>> s.str.cat(sep=' ', na_rep='?')
'a b ? d'

If `others` is specified, corresponding values are concatenated with
the separator. Result will be a Series of strings.

>>> s.str.cat(['A', 'B', 'C', 'D'], sep=',')
0    a,A
1    b,B
2    NaN
3    d,D
dtype: object

Missing values will remain missing in the result, but can again be
represented using `na_rep`

>>> s.str.cat(['A', 'B', 'C', 'D'], sep=',', na_rep='-')
0    a,A
1    b,B
2    -,C
3    d,D
dtype: object

If `sep` is not specified, the values are concatenated without
separation.

>>> s.str.cat(['A', 'B', 'C', 'D'], na_rep='-')
0    aA
1    bB
2    -C
3    dD
dtype: object

Series with different indexes can be aligned before concatenation. The
`join`-keyword works as in other methods.

>>> t = pd.Series(['d', 'a', 'e', 'c'], index=[3, 0, 4, 2])
>>> s.str.cat(t, join='left', na_rep='-')
0    aa
1    b-
2    -c
3    dd
dtype: object
>>>
>>> s.str.cat(t, join='outer', na_rep='-')
0    aa
1    b-
2    -c
3    dd
4    -e
dtype: object
>>>
>>> s.str.cat(t, join='inner', na_rep='-')
0    aa
2    -c
3    dd
dtype: object
>>>
>>> s.str.cat(t, join='right', na_rep='-')
3    dd
0    aa
4    -e
2    -c
dtype: object

For more examples, see :ref:`here <text.concatenate>`.

---
## split
```python
from accessor import split
```



---
## rsplit
```python
from accessor import rsplit
```



---
## partition
```python
from accessor import partition
```



---
## rpartition
```python
from accessor import rpartition
```



---
## get
```python
from accessor import get
```

Extract element from each component at specified position or with specified key.

Extract element from lists, tuples, dict, or strings in each element in the
Series/Index.

Parameters
----------
i : int or hashable dict label
    Position or key of element to extract.

Returns
-------
Series or Index

Examples
--------
>>> s = pd.Series(["String",
...               (1, 2, 3),
...               ["a", "b", "c"],
...               123,
...               -456,
...               {1: "Hello", "2": "World"}])
>>> s
0                        String
1                     (1, 2, 3)
2                     [a, b, c]
3                           123
4                          -456
5    {1: 'Hello', '2': 'World'}
dtype: object

>>> s.str.get(1)
0        t
1        2
2        b
3      NaN
4      NaN
5    Hello
dtype: object

>>> s.str.get(-1)
0      g
1      3
2      c
3    NaN
4    NaN
5    None
dtype: object

Return element with given key

>>> s = pd.Series([{"name": "Hello", "value": "World"},
...               {"name": "Goodbye", "value": "Planet"}])
>>> s.str.get('name')
0      Hello
1    Goodbye
dtype: object

---
## join
```python
from accessor import join
```

Join lists contained as elements in the Series/Index with passed delimiter.

If the elements of a Series are lists themselves, join the content of these
lists using the delimiter passed to the function.
This function is an equivalent to :meth:`str.join`.

Parameters
----------
sep : str
    Delimiter to use between list entries.

Returns
-------
Series/Index: object
    The list entries concatenated by intervening occurrences of the
    delimiter.

Raises
------
AttributeError
    If the supplied Series contains neither strings nor lists.

See Also
--------
str.join : Standard library version of this method.
Series.str.split : Split strings around given separator/delimiter.

Notes
-----
If any of the list items is not a string object, the result of the join
will be `NaN`.

Examples
--------
Example with a list that contains non-string elements.

>>> s = pd.Series([['lion', 'elephant', 'zebra'],
...                [1.1, 2.2, 3.3],
...                ['cat', np.nan, 'dog'],
...                ['cow', 4.5, 'goat'],
...                ['duck', ['swan', 'fish'], 'guppy']])
>>> s
0        [lion, elephant, zebra]
1                [1.1, 2.2, 3.3]
2                [cat, nan, dog]
3               [cow, 4.5, goat]
4    [duck, [swan, fish], guppy]
dtype: object

Join all lists using a '-'. The lists containing object(s) of types other
than str will produce a NaN.

>>> s.str.join('-')
0    lion-elephant-zebra
1                    NaN
2                    NaN
3                    NaN
4                    NaN
dtype: object

---
## contains
```python
from accessor import contains
```

Test if pattern or regex is contained within a string of a Series or Index.

Return boolean Series or Index based on whether a given pattern or regex is
contained within a string of a Series or Index.

Parameters
----------
pat : str
    Character sequence or regular expression.
case : bool, default True
    If True, case sensitive.
flags : int, default 0 (no flags)
    Flags to pass through to the re module, e.g. re.IGNORECASE.
na : scalar, optional
    Fill value for missing values. The default depends on dtype of the
    array. For object-dtype, ``numpy.nan`` is used. For ``StringDtype``,
    ``pandas.NA`` is used.
regex : bool, default True
    If True, assumes the pat is a regular expression.

    If False, treats the pat as a literal string.

Returns
-------
Series or Index of boolean values
    A Series or Index of boolean values indicating whether the
    given pattern is contained within the string of each element
    of the Series or Index.

See Also
--------
match : Analogous, but stricter, relying on re.match instead of re.search.
Series.str.startswith : Test if the start of each string element matches a
    pattern.
Series.str.endswith : Same as startswith, but tests the end of string.

Examples
--------
Returning a Series of booleans using only a literal pattern.

>>> s1 = pd.Series(['Mouse', 'dog', 'house and parrot', '23', np.nan])
>>> s1.str.contains('og', regex=False)
0    False
1     True
2    False
3    False
4      NaN
dtype: object

Returning an Index of booleans using only a literal pattern.

>>> ind = pd.Index(['Mouse', 'dog', 'house and parrot', '23.0', np.nan])
>>> ind.str.contains('23', regex=False)
Index([False, False, False, True, nan], dtype='object')

Specifying case sensitivity using `case`.

>>> s1.str.contains('oG', case=True, regex=True)
0    False
1    False
2    False
3    False
4      NaN
dtype: object

Specifying `na` to be `False` instead of `NaN` replaces NaN values
with `False`. If Series or Index does not contain NaN values
the resultant dtype will be `bool`, otherwise, an `object` dtype.

>>> s1.str.contains('og', na=False, regex=True)
0    False
1     True
2    False
3    False
4    False
dtype: bool

Returning 'house' or 'dog' when either expression occurs in a string.

>>> s1.str.contains('house|dog', regex=True)
0    False
1     True
2     True
3    False
4      NaN
dtype: object

Ignoring case sensitivity using `flags` with regex.

>>> import re
>>> s1.str.contains('PARROT', flags=re.IGNORECASE, regex=True)
0    False
1    False
2     True
3    False
4      NaN
dtype: object

Returning any digit using regular expression.

>>> s1.str.contains('\\d', regex=True)
0    False
1    False
2    False
3     True
4      NaN
dtype: object

Ensure `pat` is a not a literal pattern when `regex` is set to True.
Note in the following example one might expect only `s2[1]` and `s2[3]` to
return `True`. However, '.0' as a regex matches any character
followed by a 0.

>>> s2 = pd.Series(['40', '40.0', '41', '41.0', '35'])
>>> s2.str.contains('.0', regex=True)
0     True
1     True
2    False
3     True
4    False
dtype: bool

---
## match
```python
from accessor import match
```

Determine if each string starts with a match of a regular expression.

Parameters
----------
pat : str
    Character sequence.
case : bool, default True
    If True, case sensitive.
flags : int, default 0 (no flags)
    Regex module flags, e.g. re.IGNORECASE.
na : scalar, optional
    Fill value for missing values. The default depends on dtype of the
    array. For object-dtype, ``numpy.nan`` is used. For ``StringDtype``,
    ``pandas.NA`` is used.

Returns
-------
Series/Index/array of boolean values

See Also
--------
fullmatch : Stricter matching that requires the entire string to match.
contains : Analogous, but less strict, relying on re.search instead of
    re.match.
extract : Extract matched groups.

Examples
--------
>>> ser = pd.Series(["horse", "eagle", "donkey"])
>>> ser.str.match("e")
0   False
1   True
2   False
dtype: bool

---
## fullmatch
```python
from accessor import fullmatch
```

Determine if each string entirely matches a regular expression.

Parameters
----------
pat : str
    Character sequence or regular expression.
case : bool, default True
    If True, case sensitive.
flags : int, default 0 (no flags)
    Regex module flags, e.g. re.IGNORECASE.
na : scalar, optional
    Fill value for missing values. The default depends on dtype of the
    array. For object-dtype, ``numpy.nan`` is used. For ``StringDtype``,
    ``pandas.NA`` is used.

Returns
-------
Series/Index/array of boolean values

See Also
--------
match : Similar, but also returns `True` when only a *prefix* of the string
    matches the regular expression.
extract : Extract matched groups.

Examples
--------
>>> ser = pd.Series(["cat", "duck", "dove"])
>>> ser.str.fullmatch(r'd.+')
0   False
1    True
2    True
dtype: bool

---
## replace
```python
from accessor import replace
```

Replace each occurrence of pattern/regex in the Series/Index.

Equivalent to :meth:`str.replace` or :func:`re.sub`, depending on
the regex value.

Parameters
----------
pat : str or compiled regex
    String can be a character sequence or regular expression.
repl : str or callable
    Replacement string or a callable. The callable is passed the regex
    match object and must return a replacement string to be used.
    See :func:`re.sub`.
n : int, default -1 (all)
    Number of replacements to make from start.
case : bool, default None
    Determines if replace is case sensitive:

    - If True, case sensitive (the default if `pat` is a string)
    - Set to False for case insensitive
    - Cannot be set if `pat` is a compiled regex.

flags : int, default 0 (no flags)
    Regex module flags, e.g. re.IGNORECASE. Cannot be set if `pat` is a compiled
    regex.
regex : bool, default False
    Determines if the passed-in pattern is a regular expression:

    - If True, assumes the passed-in pattern is a regular expression.
    - If False, treats the pattern as a literal string
    - Cannot be set to False if `pat` is a compiled regex or `repl` is
      a callable.

Returns
-------
Series or Index of object
    A copy of the object with all matching occurrences of `pat` replaced by
    `repl`.

Raises
------
ValueError
    * if `regex` is False and `repl` is a callable or `pat` is a compiled
      regex
    * if `pat` is a compiled regex and `case` or `flags` is set

Notes
-----
When `pat` is a compiled regex, all flags should be included in the
compiled regex. Use of `case`, `flags`, or `regex=False` with a compiled
regex will raise an error.

Examples
--------
When `pat` is a string and `regex` is True, the given `pat`
is compiled as a regex. When `repl` is a string, it replaces matching
regex patterns as with :meth:`re.sub`. NaN value(s) in the Series are
left as is:

>>> pd.Series(['foo', 'fuz', np.nan]).str.replace('f.', 'ba', regex=True)
0    bao
1    baz
2    NaN
dtype: object

When `pat` is a string and `regex` is False, every `pat` is replaced with
`repl` as with :meth:`str.replace`:

>>> pd.Series(['f.o', 'fuz', np.nan]).str.replace('f.', 'ba', regex=False)
0    bao
1    fuz
2    NaN
dtype: object

When `repl` is a callable, it is called on every `pat` using
:func:`re.sub`. The callable should expect one positional argument
(a regex object) and return a string.

To get the idea:

>>> pd.Series(['foo', 'fuz', np.nan]).str.replace('f', repr, regex=True)
0    <re.Match object; span=(0, 1), match='f'>oo
1    <re.Match object; span=(0, 1), match='f'>uz
2                                            NaN
dtype: object

Reverse every lowercase alphabetic word:

>>> repl = lambda m: m.group(0)[::-1]
>>> ser = pd.Series(['foo 123', 'bar baz', np.nan])
>>> ser.str.replace(r'[a-z]+', repl, regex=True)
0    oof 123
1    rab zab
2        NaN
dtype: object

Using regex groups (extract second group and swap case):

>>> pat = r"(?P<one>\w+) (?P<two>\w+) (?P<three>\w+)"
>>> repl = lambda m: m.group('two').swapcase()
>>> ser = pd.Series(['One Two Three', 'Foo Bar Baz'])
>>> ser.str.replace(pat, repl, regex=True)
0    tWO
1    bAR
dtype: object

Using a compiled regex with flags

>>> import re
>>> regex_pat = re.compile(r'FUZ', flags=re.IGNORECASE)
>>> pd.Series(['foo', 'fuz', np.nan]).str.replace(regex_pat, 'bar', regex=True)
0    foo
1    bar
2    NaN
dtype: object

---
## repeat
```python
from accessor import repeat
```

Duplicate each string in the Series or Index.

Parameters
----------
repeats : int or sequence of int
    Same value for all (int) or different value per (sequence).

Returns
-------
Series or pandas.Index
    Series or Index of repeated string objects specified by
    input parameter repeats.

Examples
--------
>>> s = pd.Series(['a', 'b', 'c'])
>>> s
0    a
1    b
2    c
dtype: object

Single int repeats string in Series

>>> s.str.repeat(repeats=2)
0    aa
1    bb
2    cc
dtype: object

Sequence of int repeats corresponding string in Series

>>> s.str.repeat(repeats=[1, 2, 3])
0      a
1     bb
2    ccc
dtype: object

---
## pad
```python
from accessor import pad
```

Pad strings in the Series/Index up to width.

Parameters
----------
width : int
    Minimum width of resulting string; additional characters will be filled
    with character defined in `fillchar`.
side : {'left', 'right', 'both'}, default 'left'
    Side from which to fill resulting string.
fillchar : str, default ' '
    Additional character for filling, default is whitespace.

Returns
-------
Series or Index of object
    Returns Series or Index with minimum number of char in object.

See Also
--------
Series.str.rjust : Fills the left side of strings with an arbitrary
    character. Equivalent to ``Series.str.pad(side='left')``.
Series.str.ljust : Fills the right side of strings with an arbitrary
    character. Equivalent to ``Series.str.pad(side='right')``.
Series.str.center : Fills both sides of strings with an arbitrary
    character. Equivalent to ``Series.str.pad(side='both')``.
Series.str.zfill : Pad strings in the Series/Index by prepending '0'
    character. Equivalent to ``Series.str.pad(side='left', fillchar='0')``.

Examples
--------
>>> s = pd.Series(["caribou", "tiger"])
>>> s
0    caribou
1      tiger
dtype: object

>>> s.str.pad(width=10)
0       caribou
1         tiger
dtype: object

>>> s.str.pad(width=10, side='right', fillchar='-')
0    caribou---
1    tiger-----
dtype: object

>>> s.str.pad(width=10, side='both', fillchar='-')
0    -caribou--
1    --tiger---
dtype: object

---
## center
```python
from accessor import center
```



---
## ljust
```python
from accessor import ljust
```



---
## rjust
```python
from accessor import rjust
```



---
## zfill
```python
from accessor import zfill
```

Pad strings in the Series/Index by prepending '0' characters.

Strings in the Series/Index are padded with '0' characters on the
left of the string to reach a total string length  `width`. Strings
in the Series/Index with length greater or equal to `width` are
unchanged.

Parameters
----------
width : int
    Minimum length of resulting string; strings with length less
    than `width` be prepended with '0' characters.

Returns
-------
Series/Index of objects.

See Also
--------
Series.str.rjust : Fills the left side of strings with an arbitrary
    character.
Series.str.ljust : Fills the right side of strings with an arbitrary
    character.
Series.str.pad : Fills the specified sides of strings with an arbitrary
    character.
Series.str.center : Fills both sides of strings with an arbitrary
    character.

Notes
-----
Differs from :meth:`str.zfill` which has special handling
for '+'/'-' in the string.

Examples
--------
>>> s = pd.Series(['-1', '1', '1000', 10, np.nan])
>>> s
0      -1
1       1
2    1000
3      10
4     NaN
dtype: object

Note that ``10`` and ``NaN`` are not strings, therefore they are
converted to ``NaN``. The minus sign in ``'-1'`` is treated as a
special character and the zero is added to the right of it
(:meth:`str.zfill` would have moved it to the left). ``1000``
remains unchanged as it is longer than `width`.

>>> s.str.zfill(3)
0     -01
1     001
2    1000
3     NaN
4     NaN
dtype: object

---
## slice
```python
from accessor import slice
```

Slice substrings from each element in the Series or Index.

Parameters
----------
start : int, optional
    Start position for slice operation.
stop : int, optional
    Stop position for slice operation.
step : int, optional
    Step size for slice operation.

Returns
-------
Series or Index of object
    Series or Index from sliced substring from original string object.

See Also
--------
Series.str.slice_replace : Replace a slice with a string.
Series.str.get : Return element at position.
    Equivalent to `Series.str.slice(start=i, stop=i+1)` with `i`
    being the position.

Examples
--------
>>> s = pd.Series(["koala", "dog", "chameleon"])
>>> s
0        koala
1          dog
2    chameleon
dtype: object

>>> s.str.slice(start=1)
0        oala
1          og
2    hameleon
dtype: object

>>> s.str.slice(start=-1)
0           a
1           g
2           n
dtype: object

>>> s.str.slice(stop=2)
0    ko
1    do
2    ch
dtype: object

>>> s.str.slice(step=2)
0      kaa
1       dg
2    caeen
dtype: object

>>> s.str.slice(start=0, stop=5, step=3)
0    kl
1     d
2    cm
dtype: object

Equivalent behaviour to:

>>> s.str[0:5:3]
0    kl
1     d
2    cm
dtype: object

---
## slice_replace
```python
from accessor import slice_replace
```

Replace a positional slice of a string with another value.

Parameters
----------
start : int, optional
    Left index position to use for the slice. If not specified (None),
    the slice is unbounded on the left, i.e. slice from the start
    of the string.
stop : int, optional
    Right index position to use for the slice. If not specified (None),
    the slice is unbounded on the right, i.e. slice until the
    end of the string.
repl : str, optional
    String for replacement. If not specified (None), the sliced region
    is replaced with an empty string.

Returns
-------
Series or Index
    Same type as the original object.

See Also
--------
Series.str.slice : Just slicing without replacement.

Examples
--------
>>> s = pd.Series(['a', 'ab', 'abc', 'abdc', 'abcde'])
>>> s
0        a
1       ab
2      abc
3     abdc
4    abcde
dtype: object

Specify just `start`, meaning replace `start` until the end of the
string with `repl`.

>>> s.str.slice_replace(1, repl='X')
0    aX
1    aX
2    aX
3    aX
4    aX
dtype: object

Specify just `stop`, meaning the start of the string to `stop` is replaced
with `repl`, and the rest of the string is included.

>>> s.str.slice_replace(stop=2, repl='X')
0       X
1       X
2      Xc
3     Xdc
4    Xcde
dtype: object

Specify `start` and `stop`, meaning the slice from `start` to `stop` is
replaced with `repl`. Everything before or after `start` and `stop` is
included as is.

>>> s.str.slice_replace(start=1, stop=3, repl='X')
0      aX
1      aX
2      aX
3     aXc
4    aXde
dtype: object

---
## decode
```python
from accessor import decode
```

Decode character string in the Series/Index using indicated encoding.

Equivalent to :meth:`str.decode` in python2 and :meth:`bytes.decode` in
python3.

Parameters
----------
encoding : str
errors : str, optional

Returns
-------
Series or Index

Examples
--------
For Series:

>>> ser = pd.Series([b'cow', b'123', b'()'])
>>> ser.str.decode('ascii')
0   cow
1   123
2   ()
dtype: object

---
## encode
```python
from accessor import encode
```

Encode character string in the Series/Index using indicated encoding.

Equivalent to :meth:`str.encode`.

Parameters
----------
encoding : str
errors : str, optional

Returns
-------
Series/Index of objects

Examples
--------
>>> ser = pd.Series(['cow', '123', '()'])
>>> ser.str.encode(encoding='ascii')
0     b'cow'
1     b'123'
2      b'()'
dtype: object

---
## strip
```python
from accessor import strip
```



---
## lstrip
```python
from accessor import lstrip
```



---
## rstrip
```python
from accessor import rstrip
```



---
## removeprefix
```python
from accessor import removeprefix
```



---
## removesuffix
```python
from accessor import removesuffix
```



---
## wrap
```python
from accessor import wrap
```

Wrap strings in Series/Index at specified line width.

This method has the same keyword parameters and defaults as
:class:`textwrap.TextWrapper`.

Parameters
----------
width : int
    Maximum line width.
expand_tabs : bool, optional
    If True, tab characters will be expanded to spaces (default: True).
replace_whitespace : bool, optional
    If True, each whitespace character (as defined by string.whitespace)
    remaining after tab expansion will be replaced by a single space
    (default: True).
drop_whitespace : bool, optional
    If True, whitespace that, after wrapping, happens to end up at the
    beginning or end of a line is dropped (default: True).
break_long_words : bool, optional
    If True, then words longer than width will be broken in order to ensure
    that no lines are longer than width. If it is false, long words will
    not be broken, and some lines may be longer than width (default: True).
break_on_hyphens : bool, optional
    If True, wrapping will occur preferably on whitespace and right after
    hyphens in compound words, as it is customary in English. If false,
    only whitespaces will be considered as potentially good places for line
    breaks, but you need to set break_long_words to false if you want truly
    insecable words (default: True).

Returns
-------
Series or Index

Notes
-----
Internally, this method uses a :class:`textwrap.TextWrapper` instance with
default settings. To achieve behavior matching R's stringr library str_wrap
function, use the arguments:

- expand_tabs = False
- replace_whitespace = True
- drop_whitespace = True
- break_long_words = False
- break_on_hyphens = False

Examples
--------
>>> s = pd.Series(['line to be wrapped', 'another line to be wrapped'])
>>> s.str.wrap(12)
0             line to be\nwrapped
1    another line\nto be\nwrapped
dtype: object

---
## get_dummies
```python
from accessor import get_dummies
```

Return DataFrame of dummy/indicator variables for Series.

Each string in Series is split by sep and returned as a DataFrame
of dummy/indicator variables.

Parameters
----------
sep : str, default "|"
    String to split on.

Returns
-------
DataFrame
    Dummy variables corresponding to values of the Series.

See Also
--------
get_dummies : Convert categorical variable into dummy/indicator
    variables.

Examples
--------
>>> pd.Series(['a|b', 'a', 'a|c']).str.get_dummies()
   a  b  c
0  1  1  0
1  1  0  0
2  1  0  1

>>> pd.Series(['a|b', np.nan, 'a|c']).str.get_dummies()
   a  b  c
0  1  1  0
1  0  0  0
2  1  0  1

---
## translate
```python
from accessor import translate
```

Map all characters in the string through the given mapping table.

Equivalent to standard :meth:`str.translate`.

Parameters
----------
table : dict
    Table is a mapping of Unicode ordinals to Unicode ordinals, strings, or
    None. Unmapped characters are left untouched.
    Characters mapped to None are deleted. :meth:`str.maketrans` is a
    helper function for making translation tables.

Returns
-------
Series or Index

Examples
--------
>>> ser = pd.Series(["El niño", "Françoise"])
>>> mytable = str.maketrans({'ñ': 'n', 'ç': 'c'})
>>> ser.str.translate(mytable)
0   El nino
1   Francoise
dtype: object

---
## count
```python
from accessor import count
```

Count occurrences of pattern in each string of the Series/Index.

This function is used to count the number of times a particular regex
pattern is repeated in each of the string elements of the
:class:`~pandas.Series`.

Parameters
----------
pat : str
    Valid regular expression.
flags : int, default 0, meaning no flags
    Flags for the `re` module. For a complete list, `see here
    <https://docs.python.org/3/howto/regex.html#compilation-flags>`_.
**kwargs
    For compatibility with other string methods. Not used.

Returns
-------
Series or Index
    Same type as the calling object containing the integer counts.

See Also
--------
re : Standard library module for regular expressions.
str.count : Standard library version, without regular expression support.

Notes
-----
Some characters need to be escaped when passing in `pat`.
eg. ``'$'`` has a special meaning in regex and must be escaped when
finding this literal character.

Examples
--------
>>> s = pd.Series(['A', 'B', 'Aaba', 'Baca', np.nan, 'CABA', 'cat'])
>>> s.str.count('a')
0    0.0
1    0.0
2    2.0
3    2.0
4    NaN
5    0.0
6    1.0
dtype: float64

Escape ``'$'`` to find the literal dollar sign.

>>> s = pd.Series(['$', 'B', 'Aab$', '$$ca', 'C$B$', 'cat'])
>>> s.str.count('\\$')
0    1
1    0
2    1
3    2
4    2
5    0
dtype: int64

This is also available on Index

>>> pd.Index(['A', 'A', 'Aaba', 'cat']).str.count('a')
Index([0, 0, 2, 1], dtype='int64')

---
## startswith
```python
from accessor import startswith
```

Test if the start of each string element matches a pattern.

Equivalent to :meth:`str.startswith`.

Parameters
----------
pat : str or tuple[str, ...]
    Character sequence or tuple of strings. Regular expressions are not
    accepted.
na : object, default NaN
    Object shown if element tested is not a string. The default depends
    on dtype of the array. For object-dtype, ``numpy.nan`` is used.
    For ``StringDtype``, ``pandas.NA`` is used.

Returns
-------
Series or Index of bool
    A Series of booleans indicating whether the given pattern matches
    the start of each string element.

See Also
--------
str.startswith : Python standard library string method.
Series.str.endswith : Same as startswith, but tests the end of string.
Series.str.contains : Tests if string element contains a pattern.

Examples
--------
>>> s = pd.Series(['bat', 'Bear', 'cat', np.nan])
>>> s
0     bat
1    Bear
2     cat
3     NaN
dtype: object

>>> s.str.startswith('b')
0     True
1    False
2    False
3      NaN
dtype: object

>>> s.str.startswith(('b', 'B'))
0     True
1     True
2    False
3      NaN
dtype: object

Specifying `na` to be `False` instead of `NaN`.

>>> s.str.startswith('b', na=False)
0     True
1    False
2    False
3    False
dtype: bool

---
## endswith
```python
from accessor import endswith
```

Test if the end of each string element matches a pattern.

Equivalent to :meth:`str.endswith`.

Parameters
----------
pat : str or tuple[str, ...]
    Character sequence or tuple of strings. Regular expressions are not
    accepted.
na : object, default NaN
    Object shown if element tested is not a string. The default depends
    on dtype of the array. For object-dtype, ``numpy.nan`` is used.
    For ``StringDtype``, ``pandas.NA`` is used.

Returns
-------
Series or Index of bool
    A Series of booleans indicating whether the given pattern matches
    the end of each string element.

See Also
--------
str.endswith : Python standard library string method.
Series.str.startswith : Same as endswith, but tests the start of string.
Series.str.contains : Tests if string element contains a pattern.

Examples
--------
>>> s = pd.Series(['bat', 'bear', 'caT', np.nan])
>>> s
0     bat
1    bear
2     caT
3     NaN
dtype: object

>>> s.str.endswith('t')
0     True
1    False
2    False
3      NaN
dtype: object

>>> s.str.endswith(('t', 'T'))
0     True
1    False
2     True
3      NaN
dtype: object

Specifying `na` to be `False` instead of `NaN`.

>>> s.str.endswith('t', na=False)
0     True
1    False
2    False
3    False
dtype: bool

---
## findall
```python
from accessor import findall
```

Find all occurrences of pattern or regular expression in the Series/Index.

Equivalent to applying :func:`re.findall` to all the elements in the
Series/Index.

Parameters
----------
pat : str
    Pattern or regular expression.
flags : int, default 0
    Flags from ``re`` module, e.g. `re.IGNORECASE` (default is 0, which
    means no flags).

Returns
-------
Series/Index of lists of strings
    All non-overlapping matches of pattern or regular expression in each
    string of this Series/Index.

See Also
--------
count : Count occurrences of pattern or regular expression in each string
    of the Series/Index.
extractall : For each string in the Series, extract groups from all matches
    of regular expression and return a DataFrame with one row for each
    match and one column for each group.
re.findall : The equivalent ``re`` function to all non-overlapping matches
    of pattern or regular expression in string, as a list of strings.

Examples
--------
>>> s = pd.Series(['Lion', 'Monkey', 'Rabbit'])

The search for the pattern 'Monkey' returns one match:

>>> s.str.findall('Monkey')
0          []
1    [Monkey]
2          []
dtype: object

On the other hand, the search for the pattern 'MONKEY' doesn't return any
match:

>>> s.str.findall('MONKEY')
0    []
1    []
2    []
dtype: object

Flags can be added to the pattern or regular expression. For instance,
to find the pattern 'MONKEY' ignoring the case:

>>> import re
>>> s.str.findall('MONKEY', flags=re.IGNORECASE)
0          []
1    [Monkey]
2          []
dtype: object

When the pattern matches more than one string in the Series, all matches
are returned:

>>> s.str.findall('on')
0    [on]
1    [on]
2      []
dtype: object

Regular expressions are supported too. For instance, the search for all the
strings ending with the word 'on' is shown next:

>>> s.str.findall('on$')
0    [on]
1      []
2      []
dtype: object

If the pattern is found more than once in the same string, then a list of
multiple strings is returned:

>>> s.str.findall('b')
0        []
1        []
2    [b, b]
dtype: object

---
## extract
```python
from accessor import extract
```

Extract capture groups in the regex `pat` as columns in a DataFrame.

For each subject string in the Series, extract groups from the
first match of regular expression `pat`.

Parameters
----------
pat : str
    Regular expression pattern with capturing groups.
flags : int, default 0 (no flags)
    Flags from the ``re`` module, e.g. ``re.IGNORECASE``, that
    modify regular expression matching for things like case,
    spaces, etc. For more details, see :mod:`re`.
expand : bool, default True
    If True, return DataFrame with one column per capture group.
    If False, return a Series/Index if there is one capture group
    or DataFrame if there are multiple capture groups.

Returns
-------
DataFrame or Series or Index
    A DataFrame with one row for each subject string, and one
    column for each group. Any capture group names in regular
    expression pat will be used for column names; otherwise
    capture group numbers will be used. The dtype of each result
    column is always object, even when no match is found. If
    ``expand=False`` and pat has only one capture group, then
    return a Series (if subject is a Series) or Index (if subject
    is an Index).

See Also
--------
extractall : Returns all matches (not just the first match).

Examples
--------
A pattern with two groups will return a DataFrame with two columns.
Non-matches will be NaN.

>>> s = pd.Series(['a1', 'b2', 'c3'])
>>> s.str.extract(r'([ab])(\d)')
    0    1
0    a    1
1    b    2
2  NaN  NaN

A pattern may contain optional groups.

>>> s.str.extract(r'([ab])?(\d)')
    0  1
0    a  1
1    b  2
2  NaN  3

Named groups will become column names in the result.

>>> s.str.extract(r'(?P<letter>[ab])(?P<digit>\d)')
letter digit
0      a     1
1      b     2
2    NaN   NaN

A pattern with one group will return a DataFrame with one column
if expand=True.

>>> s.str.extract(r'[ab](\d)', expand=True)
    0
0    1
1    2
2  NaN

A pattern with one group will return a Series if expand=False.

>>> s.str.extract(r'[ab](\d)', expand=False)
0      1
1      2
2    NaN
dtype: object

---
## extractall
```python
from accessor import extractall
```

Extract capture groups in the regex `pat` as columns in DataFrame.

For each subject string in the Series, extract groups from all
matches of regular expression pat. When each subject string in the
Series has exactly one match, extractall(pat).xs(0, level='match')
is the same as extract(pat).

Parameters
----------
pat : str
    Regular expression pattern with capturing groups.
flags : int, default 0 (no flags)
    A ``re`` module flag, for example ``re.IGNORECASE``. These allow
    to modify regular expression matching for things like case, spaces,
    etc. Multiple flags can be combined with the bitwise OR operator,
    for example ``re.IGNORECASE | re.MULTILINE``.

Returns
-------
DataFrame
    A ``DataFrame`` with one row for each match, and one column for each
    group. Its rows have a ``MultiIndex`` with first levels that come from
    the subject ``Series``. The last level is named 'match' and indexes the
    matches in each item of the ``Series``. Any capture group names in
    regular expression pat will be used for column names; otherwise capture
    group numbers will be used.

See Also
--------
extract : Returns first match only (not all matches).

Examples
--------
A pattern with one group will return a DataFrame with one column.
Indices with no matches will not appear in the result.

>>> s = pd.Series(["a1a2", "b1", "c1"], index=["A", "B", "C"])
>>> s.str.extractall(r"[ab](\d)")
        0
match
A 0      1
  1      2
B 0      1

Capture group names are used for column names of the result.

>>> s.str.extractall(r"[ab](?P<digit>\d)")
        digit
match
A 0         1
  1         2
B 0         1

A pattern with two groups will return a DataFrame with two columns.

>>> s.str.extractall(r"(?P<letter>[ab])(?P<digit>\d)")
        letter digit
match
A 0          a     1
  1          a     2
B 0          b     1

Optional groups that do not match are NaN in the result.

>>> s.str.extractall(r"(?P<letter>[ab])?(?P<digit>\d)")
        letter digit
match
A 0          a     1
  1          a     2
B 0          b     1
C 0        NaN     1

---
## find
```python
from accessor import find
```



---
## rfind
```python
from accessor import rfind
```



---
## normalize
```python
from accessor import normalize
```

Return the Unicode normal form for the strings in the Series/Index.

For more information on the forms, see the
:func:`unicodedata.normalize`.

Parameters
----------
form : {'NFC', 'NFKC', 'NFD', 'NFKD'}
    Unicode form.

Returns
-------
Series/Index of objects

Examples
--------
>>> ser = pd.Series(['ñ'])
>>> ser.str.normalize('NFC') == ser.str.normalize('NFD')
0   False
dtype: bool

---
## index
```python
from accessor import index
```



---
## rindex
```python
from accessor import rindex
```



---
## len
```python
from accessor import len
```

Compute the length of each element in the Series/Index.

The element may be a sequence (such as a string, tuple or list) or a collection
(such as a dictionary).

Returns
-------
Series or Index of int
    A Series or Index of integer values indicating the length of each
    element in the Series or Index.

See Also
--------
str.len : Python built-in function returning the length of an object.
Series.size : Returns the length of the Series.

Examples
--------
Returns the length (number of characters) in a string. Returns the
number of entries for dictionaries, lists or tuples.

>>> s = pd.Series(['dog',
...                 '',
...                 5,
...                 {'foo' : 'bar'},
...                 [2, 3, 5, 7],
...                 ('one', 'two', 'three')])
>>> s
0                  dog
1
2                    5
3       {'foo': 'bar'}
4         [2, 3, 5, 7]
5    (one, two, three)
dtype: object
>>> s.str.len()
0    3.0
1    0.0
2    NaN
3    1.0
4    4.0
5    3.0
dtype: float64

---
## lower
```python
from accessor import lower
```



---
## upper
```python
from accessor import upper
```



---
## title
```python
from accessor import title
```



---
## capitalize
```python
from accessor import capitalize
```



---
## swapcase
```python
from accessor import swapcase
```



---
## casefold
```python
from accessor import casefold
```



---
## cons_row
```python
from accessor import cons_row
```



---
## __name__
```python
from object_array import __name__
```



---
## ObjectStringArrayMixin
```python
from object_array import ObjectStringArrayMixin
```

String Methods operating on object-dtype ndarrays.

---
## __len__
```python
from object_array import __len__
```



---
## _str_map
```python
from object_array import _str_map
```

Map a callable over valid elements of the array.

Parameters
----------
f : Callable
    A function to call on each non-NA element.
na_value : Scalar, optional
    The value to set for NA values. Might also be used for the
    fill value if the callable `f` raises an exception.
    This defaults to ``self._str_na_value`` which is ``np.nan``
    for object-dtype and Categorical and ``pd.NA`` for StringArray.
dtype : Dtype, optional
    The dtype of the result array.
convert : bool, default True
    Whether to call `maybe_convert_objects` on the resulting ndarray

---
## _str_count
```python
from object_array import _str_count
```



---
## _str_pad
```python
from object_array import _str_pad
```



---
## _str_contains
```python
from object_array import _str_contains
```



---
## _str_startswith
```python
from object_array import _str_startswith
```



---
## _str_endswith
```python
from object_array import _str_endswith
```



---
## _str_replace
```python
from object_array import _str_replace
```



---
## _str_repeat
```python
from object_array import _str_repeat
```



---
## _str_match
```python
from object_array import _str_match
```



---
## _str_fullmatch
```python
from object_array import _str_fullmatch
```



---
## _str_encode
```python
from object_array import _str_encode
```



---
## _str_find
```python
from object_array import _str_find
```



---
## _str_rfind
```python
from object_array import _str_rfind
```



---
## _str_find_
```python
from object_array import _str_find_
```



---
## _str_findall
```python
from object_array import _str_findall
```



---
## _str_get
```python
from object_array import _str_get
```



---
## _str_index
```python
from object_array import _str_index
```



---
## _str_rindex
```python
from object_array import _str_rindex
```



---
## _str_join
```python
from object_array import _str_join
```



---
## _str_partition
```python
from object_array import _str_partition
```



---
## _str_rpartition
```python
from object_array import _str_rpartition
```



---
## _str_len
```python
from object_array import _str_len
```



---
## _str_slice
```python
from object_array import _str_slice
```



---
## _str_slice_replace
```python
from object_array import _str_slice_replace
```



---
## _str_split
```python
from object_array import _str_split
```



---
## _str_rsplit
```python
from object_array import _str_rsplit
```



---
## _str_translate
```python
from object_array import _str_translate
```



---
## _str_wrap
```python
from object_array import _str_wrap
```



---
## _str_get_dummies
```python
from object_array import _str_get_dummies
```



---
## _str_upper
```python
from object_array import _str_upper
```



---
## _str_isalnum
```python
from object_array import _str_isalnum
```



---
## _str_isalpha
```python
from object_array import _str_isalpha
```



---
## _str_isdecimal
```python
from object_array import _str_isdecimal
```



---
## _str_isdigit
```python
from object_array import _str_isdigit
```



---
## _str_islower
```python
from object_array import _str_islower
```



---
## _str_isnumeric
```python
from object_array import _str_isnumeric
```



---
## _str_isspace
```python
from object_array import _str_isspace
```



---
## _str_istitle
```python
from object_array import _str_istitle
```



---
## _str_isupper
```python
from object_array import _str_isupper
```



---
## _str_capitalize
```python
from object_array import _str_capitalize
```



---
## _str_casefold
```python
from object_array import _str_casefold
```



---
## _str_title
```python
from object_array import _str_title
```



---
## _str_swapcase
```python
from object_array import _str_swapcase
```



---
## _str_lower
```python
from object_array import _str_lower
```



---
## _str_normalize
```python
from object_array import _str_normalize
```



---
## _str_strip
```python
from object_array import _str_strip
```



---
## _str_lstrip
```python
from object_array import _str_lstrip
```



---
## _str_rstrip
```python
from object_array import _str_rstrip
```



---
## _str_removeprefix
```python
from object_array import _str_removeprefix
```



---
## _str_removesuffix
```python
from object_array import _str_removesuffix
```



---
## _str_extract
```python
from object_array import _str_extract
```



---
## f
```python
from object_array import f
```



---
## _isin
```python
from object_array import _isin
```



---
## removeprefix
```python
from object_array import removeprefix
```



---
## scalar_rep
```python
from object_array import scalar_rep
```



---
## rep
```python
from object_array import rep
```



---
## g
```python
from object_array import g
```



---
## BaseStringArrayMethods
```python
from base import BaseStringArrayMethods
```

Base class for extension arrays implementing string methods.

This is where our ExtensionArrays can override the implementation of
Series.str.<method>. We don't expect this to work with
3rd-party extension arrays.

* User calls Series.str.<method>
* pandas extracts the extension array from the Series
* pandas calls ``extension_array._str_<method>(*args, **kwargs)``
* pandas wraps the result, to return to the user.

See :ref:`Series.str` for the docstring of each method.

---
## _str_getitem
```python
from base import _str_getitem
```



---
## _str_count
```python
from base import _str_count
```



---
## _str_pad
```python
from base import _str_pad
```



---
## _str_contains
```python
from base import _str_contains
```



---
## _str_startswith
```python
from base import _str_startswith
```



---
## _str_endswith
```python
from base import _str_endswith
```



---
## _str_replace
```python
from base import _str_replace
```



---
## _str_repeat
```python
from base import _str_repeat
```



---
## _str_match
```python
from base import _str_match
```



---
## _str_fullmatch
```python
from base import _str_fullmatch
```



---
## _str_encode
```python
from base import _str_encode
```



---
## _str_find
```python
from base import _str_find
```



---
## _str_rfind
```python
from base import _str_rfind
```



---
## _str_findall
```python
from base import _str_findall
```



---
## _str_get
```python
from base import _str_get
```



---
## _str_index
```python
from base import _str_index
```



---
## _str_rindex
```python
from base import _str_rindex
```



---
## _str_join
```python
from base import _str_join
```



---
## _str_partition
```python
from base import _str_partition
```



---
## _str_rpartition
```python
from base import _str_rpartition
```



---
## _str_len
```python
from base import _str_len
```



---
## _str_slice
```python
from base import _str_slice
```



---
## _str_slice_replace
```python
from base import _str_slice_replace
```



---
## _str_translate
```python
from base import _str_translate
```



---
## _str_wrap
```python
from base import _str_wrap
```



---
## _str_get_dummies
```python
from base import _str_get_dummies
```



---
## _str_isalnum
```python
from base import _str_isalnum
```



---
## _str_isalpha
```python
from base import _str_isalpha
```



---
## _str_isdecimal
```python
from base import _str_isdecimal
```



---
## _str_isdigit
```python
from base import _str_isdigit
```



---
## _str_islower
```python
from base import _str_islower
```



---
## _str_isnumeric
```python
from base import _str_isnumeric
```



---
## _str_isspace
```python
from base import _str_isspace
```



---
## _str_istitle
```python
from base import _str_istitle
```



---
## _str_isupper
```python
from base import _str_isupper
```



---
## _str_capitalize
```python
from base import _str_capitalize
```



---
## _str_casefold
```python
from base import _str_casefold
```



---
## _str_title
```python
from base import _str_title
```



---
## _str_swapcase
```python
from base import _str_swapcase
```



---
## _str_lower
```python
from base import _str_lower
```



---
## _str_upper
```python
from base import _str_upper
```



---
## _str_normalize
```python
from base import _str_normalize
```



---
## _str_strip
```python
from base import _str_strip
```



---
## _str_lstrip
```python
from base import _str_lstrip
```



---
## _str_rstrip
```python
from base import _str_rstrip
```



---
## _str_removeprefix
```python
from base import _str_removeprefix
```



---
## _str_removesuffix
```python
from base import _str_removesuffix
```



---
## _str_split
```python
from base import _str_split
```



---
## _str_rsplit
```python
from base import _str_rsplit
```



---
## _str_extract
```python
from base import _str_extract
```



---
## __name__
```python
from timedeltas import __name__
```

implement the TimedeltaIndex 

---
## to_timedelta
```python
from timedeltas import to_timedelta
```

Convert argument to timedelta.

Timedeltas are absolute differences in times, expressed in difference
units (e.g. days, hours, minutes, seconds). This method converts
an argument from a recognized timedelta format / value into
a Timedelta type.

Parameters
----------
arg : str, timedelta, list-like or Series
    The data to be converted to timedelta.

    .. versionchanged:: 2.0
        Strings with units 'M', 'Y' and 'y' do not represent
        unambiguous timedelta values and will raise an exception.

unit : str, optional
    Denotes the unit of the arg for numeric `arg`. Defaults to ``"ns"``.

    Possible values:

    * 'W'
    * 'D' / 'days' / 'day'
    * 'hours' / 'hour' / 'hr' / 'h' / 'H'
    * 'm' / 'minute' / 'min' / 'minutes' / 'T'
    * 's' / 'seconds' / 'sec' / 'second' / 'S'
    * 'ms' / 'milliseconds' / 'millisecond' / 'milli' / 'millis' / 'L'
    * 'us' / 'microseconds' / 'microsecond' / 'micro' / 'micros' / 'U'
    * 'ns' / 'nanoseconds' / 'nano' / 'nanos' / 'nanosecond' / 'N'

    Must not be specified when `arg` contains strings and ``errors="raise"``.

    .. deprecated:: 2.2.0
        Units 'H', 'T', 'S', 'L', 'U' and 'N' are deprecated and will be removed
        in a future version. Please use 'h', 'min', 's', 'ms', 'us', and 'ns'
        instead of 'H', 'T', 'S', 'L', 'U' and 'N'.

errors : {'ignore', 'raise', 'coerce'}, default 'raise'
    - If 'raise', then invalid parsing will raise an exception.
    - If 'coerce', then invalid parsing will be set as NaT.
    - If 'ignore', then invalid parsing will return the input.

Returns
-------
timedelta
    If parsing succeeded.
    Return type depends on input:

    - list-like: TimedeltaIndex of timedelta64 dtype
    - Series: Series of timedelta64 dtype
    - scalar: Timedelta

See Also
--------
DataFrame.astype : Cast argument to a specified dtype.
to_datetime : Convert argument to datetime.
convert_dtypes : Convert dtypes.

Notes
-----
If the precision is higher than nanoseconds, the precision of the duration is
truncated to nanoseconds for string inputs.

Examples
--------
Parsing a single string to a Timedelta:

>>> pd.to_timedelta('1 days 06:05:01.00003')
Timedelta('1 days 06:05:01.000030')
>>> pd.to_timedelta('15.5us')
Timedelta('0 days 00:00:00.000015500')

Parsing a list or array of strings:

>>> pd.to_timedelta(['1 days 06:05:01.00003', '15.5us', 'nan'])
TimedeltaIndex(['1 days 06:05:01.000030', '0 days 00:00:00.000015500', NaT],
               dtype='timedelta64[ns]', freq=None)

Converting numbers by specifying the `unit` keyword argument:

>>> pd.to_timedelta(np.arange(5), unit='s')
TimedeltaIndex(['0 days 00:00:00', '0 days 00:00:01', '0 days 00:00:02',
                '0 days 00:00:03', '0 days 00:00:04'],
               dtype='timedelta64[ns]', freq=None)
>>> pd.to_timedelta(np.arange(5), unit='d')
TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq=None)

---
## _coerce_scalar_to_timedelta_type
```python
from timedeltas import _coerce_scalar_to_timedelta_type
```

Convert string 'r' to a timedelta object.

---
## _convert_listlike
```python
from timedeltas import _convert_listlike
```

Convert a list of objects to a timedelta index object.

---
## __name__
```python
from datetimes import __name__
```



---
## YearMonthDayDict
```python
from datetimes import YearMonthDayDict
```



---
## FulldatetimeDict
```python
from datetimes import FulldatetimeDict
```



---
## _guess_datetime_format_for_array
```python
from datetimes import _guess_datetime_format_for_array
```



---
## should_cache
```python
from datetimes import should_cache
```

Decides whether to do caching.

If the percent of unique elements among `check_count` elements less
than `unique_share * 100` then we can do caching.

Parameters
----------
arg: listlike, tuple, 1-d array, Series
unique_share: float, default=0.7, optional
    0 < unique_share < 1
check_count: int, optional
    0 <= check_count <= len(arg)

Returns
-------
do_caching: bool

Notes
-----
By default for a sequence of less than 50 items in size, we don't do
caching; for the number of elements less than 5000, we take ten percent of
all elements to check for a uniqueness share; if the sequence size is more
than 5000, then we check only the first 500 elements.
All constants were chosen empirically by.

---
## _maybe_cache
```python
from datetimes import _maybe_cache
```

Create a cache of unique dates from an array of dates

Parameters
----------
arg : listlike, tuple, 1-d array, Series
format : string
    Strftime format to parse time
cache : bool
    True attempts to create a cache of converted values
convert_listlike : function
    Conversion function to apply on dates

Returns
-------
cache_array : Series
    Cache of converted, unique dates. Can be empty

---
## _box_as_indexlike
```python
from datetimes import _box_as_indexlike
```

Properly boxes the ndarray of datetimes to DatetimeIndex
if it is possible or to generic Index instead

Parameters
----------
dt_array: 1-d array
    Array of datetimes to be wrapped in an Index.
utc : bool
    Whether to convert/localize timestamps to UTC.
name : string, default None
    Name for a resulting index

Returns
-------
result : datetime of converted dates
    - DatetimeIndex if convertible to sole datetime64 type
    - general Index otherwise

---
## _convert_and_box_cache
```python
from datetimes import _convert_and_box_cache
```

Convert array of dates with a cache and wrap the result in an Index.

Parameters
----------
arg : integer, float, string, datetime, list, tuple, 1-d array, Series
cache_array : Series
    Cache of converted, unique dates
name : string, default None
    Name for a DatetimeIndex

Returns
-------
result : Index-like of converted dates

---
## _convert_listlike_datetimes
```python
from datetimes import _convert_listlike_datetimes
```

Helper function for to_datetime. Performs the conversions of 1D listlike
of dates

Parameters
----------
arg : list, tuple, ndarray, Series, Index
    date to be parsed
name : object
    None or string for the Index name
utc : bool
    Whether to convert/localize timestamps to UTC.
unit : str
    None or string of the frequency of the passed data
errors : str
    error handing behaviors from to_datetime, 'raise', 'coerce', 'ignore'
dayfirst : bool
    dayfirst parsing behavior from to_datetime
yearfirst : bool
    yearfirst parsing behavior from to_datetime
exact : bool, default True
    exact format matching behavior from to_datetime

Returns
-------
Index-like of parsed dates

---
## _array_strptime_with_fallback
```python
from datetimes import _array_strptime_with_fallback
```

Call array_strptime, with fallback behavior depending on 'errors'.

---
## _to_datetime_with_unit
```python
from datetimes import _to_datetime_with_unit
```

to_datetime specalized to the case where a 'unit' is passed.

---
## _adjust_to_origin
```python
from datetimes import _adjust_to_origin
```

Helper function for to_datetime.
Adjust input argument to the specified origin

Parameters
----------
arg : list, tuple, ndarray, Series, Index
    date to be adjusted
origin : 'julian' or Timestamp
    origin offset for the arg
unit : str
    passed unit from to_datetime, must be 'D'

Returns
-------
ndarray or scalar of adjusted date(s)

---
## to_datetime
```python
from datetimes import to_datetime
```

Convert argument to datetime.

This function converts a scalar, array-like, :class:`Series` or
:class:`DataFrame`/dict-like to a pandas datetime object.

Parameters
----------
arg : int, float, str, datetime, list, tuple, 1-d array, Series, DataFrame/dict-like
    The object to convert to a datetime. If a :class:`DataFrame` is provided, the
    method expects minimally the following columns: :const:`"year"`,
    :const:`"month"`, :const:`"day"`. The column "year"
    must be specified in 4-digit format.
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
    - If :const:`'raise'`, then invalid parsing will raise an exception.
    - If :const:`'coerce'`, then invalid parsing will be set as :const:`NaT`.
    - If :const:`'ignore'`, then invalid parsing will return the input.
dayfirst : bool, default False
    Specify a date parse order if `arg` is str or is list-like.
    If :const:`True`, parses dates with the day first, e.g. :const:`"10/11/12"`
    is parsed as :const:`2012-11-10`.

    .. warning::

        ``dayfirst=True`` is not strict, but will prefer to parse
        with day first.

yearfirst : bool, default False
    Specify a date parse order if `arg` is str or is list-like.

    - If :const:`True` parses dates with the year first, e.g.
      :const:`"10/11/12"` is parsed as :const:`2010-11-12`.
    - If both `dayfirst` and `yearfirst` are :const:`True`, `yearfirst` is
      preceded (same as :mod:`dateutil`).

    .. warning::

        ``yearfirst=True`` is not strict, but will prefer to parse
        with year first.

utc : bool, default False
    Control timezone-related parsing, localization and conversion.

    - If :const:`True`, the function *always* returns a timezone-aware
      UTC-localized :class:`Timestamp`, :class:`Series` or
      :class:`DatetimeIndex`. To do this, timezone-naive inputs are
      *localized* as UTC, while timezone-aware inputs are *converted* to UTC.

    - If :const:`False` (default), inputs will not be coerced to UTC.
      Timezone-naive inputs will remain naive, while timezone-aware ones
      will keep their time offsets. Limitations exist for mixed
      offsets (typically, daylight savings), see :ref:`Examples
      <to_datetime_tz_examples>` section for details.

    .. warning::

        In a future version of pandas, parsing datetimes with mixed time
        zones will raise an error unless `utc=True`.
        Please specify `utc=True` to opt in to the new behaviour
        and silence this warning. To create a `Series` with mixed offsets and
        `object` dtype, please use `apply` and `datetime.datetime.strptime`.

    See also: pandas general documentation about `timezone conversion and
    localization
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html
    #time-zone-handling>`_.

format : str, default None
    The strftime to parse time, e.g. :const:`"%d/%m/%Y"`. See
    `strftime documentation
    <https://docs.python.org/3/library/datetime.html
    #strftime-and-strptime-behavior>`_ for more information on choices, though
    note that :const:`"%f"` will parse all the way up to nanoseconds.
    You can also pass:

    - "ISO8601", to parse any `ISO8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
      time string (not necessarily in exactly the same format);
    - "mixed", to infer the format for each element individually. This is risky,
      and you should probably use it along with `dayfirst`.

    .. note::

        If a :class:`DataFrame` is passed, then `format` has no effect.

exact : bool, default True
    Control how `format` is used:

    - If :const:`True`, require an exact `format` match.
    - If :const:`False`, allow the `format` to match anywhere in the target
      string.

    Cannot be used alongside ``format='ISO8601'`` or ``format='mixed'``.
unit : str, default 'ns'
    The unit of the arg (D,s,ms,us,ns) denote the unit, which is an
    integer or float number. This will be based off the origin.
    Example, with ``unit='ms'`` and ``origin='unix'``, this would calculate
    the number of milliseconds to the unix epoch start.
infer_datetime_format : bool, default False
    If :const:`True` and no `format` is given, attempt to infer the format
    of the datetime strings based on the first non-NaN element,
    and if it can be inferred, switch to a faster method of parsing them.
    In some cases this can increase the parsing speed by ~5-10x.

    .. deprecated:: 2.0.0
        A strict version of this argument is now the default, passing it has
        no effect.

origin : scalar, default 'unix'
    Define the reference date. The numeric values would be parsed as number
    of units (defined by `unit`) since this reference date.

    - If :const:`'unix'` (or POSIX) time; origin is set to 1970-01-01.
    - If :const:`'julian'`, unit must be :const:`'D'`, and origin is set to
      beginning of Julian Calendar. Julian day number :const:`0` is assigned
      to the day starting at noon on January 1, 4713 BC.
    - If Timestamp convertible (Timestamp, dt.datetime, np.datetimt64 or date
      string), origin is set to Timestamp identified by origin.
    - If a float or integer, origin is the difference
      (in units determined by the ``unit`` argument) relative to 1970-01-01.
cache : bool, default True
    If :const:`True`, use a cache of unique, converted dates to apply the
    datetime conversion. May produce significant speed-up when parsing
    duplicate date strings, especially ones with timezone offsets. The cache
    is only used when there are at least 50 values. The presence of
    out-of-bounds values will render the cache unusable and may slow down
    parsing.

Returns
-------
datetime
    If parsing succeeded.
    Return type depends on input (types in parenthesis correspond to
    fallback in case of unsuccessful timezone or out-of-range timestamp
    parsing):

    - scalar: :class:`Timestamp` (or :class:`datetime.datetime`)
    - array-like: :class:`DatetimeIndex` (or :class:`Series` with
      :class:`object` dtype containing :class:`datetime.datetime`)
    - Series: :class:`Series` of :class:`datetime64` dtype (or
      :class:`Series` of :class:`object` dtype containing
      :class:`datetime.datetime`)
    - DataFrame: :class:`Series` of :class:`datetime64` dtype (or
      :class:`Series` of :class:`object` dtype containing
      :class:`datetime.datetime`)

Raises
------
ParserError
    When parsing a date from string fails.
ValueError
    When another datetime conversion error happens. For example when one
    of 'year', 'month', day' columns is missing in a :class:`DataFrame`, or
    when a Timezone-aware :class:`datetime.datetime` is found in an array-like
    of mixed time offsets, and ``utc=False``.

See Also
--------
DataFrame.astype : Cast argument to a specified dtype.
to_timedelta : Convert argument to timedelta.
convert_dtypes : Convert dtypes.

Notes
-----

Many input types are supported, and lead to different output types:

- **scalars** can be int, float, str, datetime object (from stdlib :mod:`datetime`
  module or :mod:`numpy`). They are converted to :class:`Timestamp` when
  possible, otherwise they are converted to :class:`datetime.datetime`.
  None/NaN/null scalars are converted to :const:`NaT`.

- **array-like** can contain int, float, str, datetime objects. They are
  converted to :class:`DatetimeIndex` when possible, otherwise they are
  converted to :class:`Index` with :class:`object` dtype, containing
  :class:`datetime.datetime`. None/NaN/null entries are converted to
  :const:`NaT` in both cases.

- **Series** are converted to :class:`Series` with :class:`datetime64`
  dtype when possible, otherwise they are converted to :class:`Series` with
  :class:`object` dtype, containing :class:`datetime.datetime`. None/NaN/null
  entries are converted to :const:`NaT` in both cases.

- **DataFrame/dict-like** are converted to :class:`Series` with
  :class:`datetime64` dtype. For each row a datetime is created from assembling
  the various dataframe columns. Column keys can be common abbreviations
  like ['year', 'month', 'day', 'minute', 'second', 'ms', 'us', 'ns']) or
  plurals of the same.

The following causes are responsible for :class:`datetime.datetime` objects
being returned (possibly inside an :class:`Index` or a :class:`Series` with
:class:`object` dtype) instead of a proper pandas designated type
(:class:`Timestamp`, :class:`DatetimeIndex` or :class:`Series`
with :class:`datetime64` dtype):

- when any input element is before :const:`Timestamp.min` or after
  :const:`Timestamp.max`, see `timestamp limitations
  <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html
  #timeseries-timestamp-limits>`_.

- when ``utc=False`` (default) and the input is an array-like or
  :class:`Series` containing mixed naive/aware datetime, or aware with mixed
  time offsets. Note that this happens in the (quite frequent) situation when
  the timezone has a daylight savings policy. In that case you may wish to
  use ``utc=True``.

Examples
--------

**Handling various input formats**

Assembling a datetime from multiple columns of a :class:`DataFrame`. The keys
can be common abbreviations like ['year', 'month', 'day', 'minute', 'second',
'ms', 'us', 'ns']) or plurals of the same

>>> df = pd.DataFrame({'year': [2015, 2016],
...                    'month': [2, 3],
...                    'day': [4, 5]})
>>> pd.to_datetime(df)
0   2015-02-04
1   2016-03-05
dtype: datetime64[ns]

Using a unix epoch time

>>> pd.to_datetime(1490195805, unit='s')
Timestamp('2017-03-22 15:16:45')
>>> pd.to_datetime(1490195805433502912, unit='ns')
Timestamp('2017-03-22 15:16:45.433502912')

.. warning:: For float arg, precision rounding might happen. To prevent
    unexpected behavior use a fixed-width exact type.

Using a non-unix epoch origin

>>> pd.to_datetime([1, 2, 3], unit='D',
...                origin=pd.Timestamp('1960-01-01'))
DatetimeIndex(['1960-01-02', '1960-01-03', '1960-01-04'],
              dtype='datetime64[ns]', freq=None)

**Differences with strptime behavior**

:const:`"%f"` will parse all the way up to nanoseconds.

>>> pd.to_datetime('2018-10-26 12:00:00.0000000011',
...                format='%Y-%m-%d %H:%M:%S.%f')
Timestamp('2018-10-26 12:00:00.000000001')

**Non-convertible date/times**

Passing ``errors='coerce'`` will force an out-of-bounds date to :const:`NaT`,
in addition to forcing non-dates (or non-parseable dates) to :const:`NaT`.

>>> pd.to_datetime('13000101', format='%Y%m%d', errors='coerce')
NaT

.. _to_datetime_tz_examples:

**Timezones and time offsets**

The default behaviour (``utc=False``) is as follows:

- Timezone-naive inputs are converted to timezone-naive :class:`DatetimeIndex`:

>>> pd.to_datetime(['2018-10-26 12:00:00', '2018-10-26 13:00:15'])
DatetimeIndex(['2018-10-26 12:00:00', '2018-10-26 13:00:15'],
              dtype='datetime64[ns]', freq=None)

- Timezone-aware inputs *with constant time offset* are converted to
  timezone-aware :class:`DatetimeIndex`:

>>> pd.to_datetime(['2018-10-26 12:00 -0500', '2018-10-26 13:00 -0500'])
DatetimeIndex(['2018-10-26 12:00:00-05:00', '2018-10-26 13:00:00-05:00'],
              dtype='datetime64[ns, UTC-05:00]', freq=None)

- However, timezone-aware inputs *with mixed time offsets* (for example
  issued from a timezone with daylight savings, such as Europe/Paris)
  are **not successfully converted** to a :class:`DatetimeIndex`.
  Parsing datetimes with mixed time zones will show a warning unless
  `utc=True`. If you specify `utc=False` the warning below will be shown
  and a simple :class:`Index` containing :class:`datetime.datetime`
  objects will be returned:

>>> pd.to_datetime(['2020-10-25 02:00 +0200',
...                 '2020-10-25 04:00 +0100'])  # doctest: +SKIP
FutureWarning: In a future version of pandas, parsing datetimes with mixed
time zones will raise an error unless `utc=True`. Please specify `utc=True`
to opt in to the new behaviour and silence this warning. To create a `Series`
with mixed offsets and `object` dtype, please use `apply` and
`datetime.datetime.strptime`.
Index([2020-10-25 02:00:00+02:00, 2020-10-25 04:00:00+01:00],
      dtype='object')

- A mix of timezone-aware and timezone-naive inputs is also converted to
  a simple :class:`Index` containing :class:`datetime.datetime` objects:

>>> from datetime import datetime
>>> pd.to_datetime(["2020-01-01 01:00:00-01:00",
...                 datetime(2020, 1, 1, 3, 0)])  # doctest: +SKIP
FutureWarning: In a future version of pandas, parsing datetimes with mixed
time zones will raise an error unless `utc=True`. Please specify `utc=True`
to opt in to the new behaviour and silence this warning. To create a `Series`
with mixed offsets and `object` dtype, please use `apply` and
`datetime.datetime.strptime`.
Index([2020-01-01 01:00:00-01:00, 2020-01-01 03:00:00], dtype='object')

|

Setting ``utc=True`` solves most of the above issues:

- Timezone-naive inputs are *localized* as UTC

>>> pd.to_datetime(['2018-10-26 12:00', '2018-10-26 13:00'], utc=True)
DatetimeIndex(['2018-10-26 12:00:00+00:00', '2018-10-26 13:00:00+00:00'],
              dtype='datetime64[ns, UTC]', freq=None)

- Timezone-aware inputs are *converted* to UTC (the output represents the
  exact same datetime, but viewed from the UTC time offset `+00:00`).

>>> pd.to_datetime(['2018-10-26 12:00 -0530', '2018-10-26 12:00 -0500'],
...                utc=True)
DatetimeIndex(['2018-10-26 17:30:00+00:00', '2018-10-26 17:00:00+00:00'],
              dtype='datetime64[ns, UTC]', freq=None)

- Inputs can contain both string or datetime, the above
  rules still apply

>>> pd.to_datetime(['2018-10-26 12:00', datetime(2020, 1, 1, 18)], utc=True)
DatetimeIndex(['2018-10-26 12:00:00+00:00', '2020-01-01 18:00:00+00:00'],
              dtype='datetime64[ns, UTC]', freq=None)

---
## _assemble_from_unit_mappings
```python
from datetimes import _assemble_from_unit_mappings
```

assemble the unit specified fields from the arg (DataFrame)
Return a Series for actual parsing

Parameters
----------
arg : DataFrame
errors : {'ignore', 'raise', 'coerce'}, default 'raise'

    - If :const:`'raise'`, then invalid parsing will raise an exception
    - If :const:`'coerce'`, then invalid parsing will be set as :const:`NaT`
    - If :const:`'ignore'`, then invalid parsing will return the input
utc : bool
    Whether to convert/localize timestamps to UTC.

Returns
-------
Series

---
## f
```python
from datetimes import f
```



---
## coerce
```python
from datetimes import coerce
```



---
## __name__
```python
from times import __name__
```



---
## to_time
```python
from times import to_time
```

Parse time strings to time objects using fixed strptime formats ("%H:%M",
"%H%M", "%I:%M%p", "%I%M%p", "%H:%M:%S", "%H%M%S", "%I:%M:%S%p",
"%I%M%S%p")

Use infer_time_format if all the strings are in the same format to speed
up conversion.

Parameters
----------
arg : string in time format, datetime.time, list, tuple, 1-d array,  Series
format : str, default None
    Format used to convert arg into a time object.  If None, fixed formats
    are used.
infer_time_format: bool, default False
    Infer the time format based on the first non-NaN element.  If all
    strings are in the same format, this will speed up conversion.
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
    - If 'raise', then invalid parsing will raise an exception
    - If 'coerce', then invalid parsing will be set as None
    - If 'ignore', then invalid parsing will return the input

Returns
-------
datetime.time

---
## _guess_time_format_for_array
```python
from times import _guess_time_format_for_array
```



---
## _convert_listlike
```python
from times import _convert_listlike
```



---
## to_numeric
```python
from numeric import to_numeric
```

Convert argument to a numeric type.

The default return dtype is `float64` or `int64`
depending on the data supplied. Use the `downcast` parameter
to obtain other dtypes.

Please note that precision loss may occur if really large numbers
are passed in. Due to the internal limitations of `ndarray`, if
numbers smaller than `-9223372036854775808` (np.iinfo(np.int64).min)
or larger than `18446744073709551615` (np.iinfo(np.uint64).max) are
passed in, it is very likely they will be converted to float so that
they can be stored in an `ndarray`. These warnings apply similarly to
`Series` since it internally leverages `ndarray`.

Parameters
----------
arg : scalar, list, tuple, 1-d array, or Series
    Argument to be converted.
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
    - If 'raise', then invalid parsing will raise an exception.
    - If 'coerce', then invalid parsing will be set as NaN.
    - If 'ignore', then invalid parsing will return the input.

    .. versionchanged:: 2.2

    "ignore" is deprecated. Catch exceptions explicitly instead.

downcast : str, default None
    Can be 'integer', 'signed', 'unsigned', or 'float'.
    If not None, and if the data has been successfully cast to a
    numerical dtype (or if the data was numeric to begin with),
    downcast that resulting data to the smallest numerical dtype
    possible according to the following rules:

    - 'integer' or 'signed': smallest signed int dtype (min.: np.int8)
    - 'unsigned': smallest unsigned int dtype (min.: np.uint8)
    - 'float': smallest float dtype (min.: np.float32)

    As this behaviour is separate from the core conversion to
    numeric values, any errors raised during the downcasting
    will be surfaced regardless of the value of the 'errors' input.

    In addition, downcasting will only occur if the size
    of the resulting data's dtype is strictly larger than
    the dtype it is to be cast to, so if none of the dtypes
    checked satisfy that specification, no downcasting will be
    performed on the data.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
ret
    Numeric if parsing succeeded.
    Return type depends on input.  Series if Series, otherwise ndarray.

See Also
--------
DataFrame.astype : Cast argument to a specified dtype.
to_datetime : Convert argument to datetime.
to_timedelta : Convert argument to timedelta.
numpy.ndarray.astype : Cast a numpy array to a specified type.
DataFrame.convert_dtypes : Convert dtypes.

Examples
--------
Take separate series and convert to numeric, coercing when told to

>>> s = pd.Series(['1.0', '2', -3])
>>> pd.to_numeric(s)
0    1.0
1    2.0
2   -3.0
dtype: float64
>>> pd.to_numeric(s, downcast='float')
0    1.0
1    2.0
2   -3.0
dtype: float32
>>> pd.to_numeric(s, downcast='signed')
0    1
1    2
2   -3
dtype: int8
>>> s = pd.Series(['apple', '1.0', '2', -3])
>>> pd.to_numeric(s, errors='coerce')
0    NaN
1    1.0
2    2.0
3   -3.0
dtype: float64

Downcasting of nullable integer and floating dtypes is supported:

>>> s = pd.Series([1, 2, 3], dtype="Int64")
>>> pd.to_numeric(s, downcast="integer")
0    1
1    2
2    3
dtype: Int8
>>> s = pd.Series([1.0, 2.1, 3.0], dtype="Float64")
>>> pd.to_numeric(s, downcast="float")
0    1.0
1    2.1
2    3.0
dtype: Float32

---
## __name__
```python
from describe import __name__
```

Module responsible for execution of NDFrame.describe() method.

Method NDFrame.describe() delegates actual execution to function describe_ndframe().

---
## describe_ndframe
```python
from describe import describe_ndframe
```

Describe series or dataframe.

Called from pandas.core.generic.NDFrame.describe()

Parameters
----------
obj: DataFrame or Series
    Either dataframe or series to be described.
include : 'all', list-like of dtypes or None (default), optional
    A white list of data types to include in the result. Ignored for ``Series``.
exclude : list-like of dtypes or None (default), optional,
    A black list of data types to omit from the result. Ignored for ``Series``.
percentiles : list-like of numbers, optional
    The percentiles to include in the output. All should fall between 0 and 1.
    The default is ``[.25, .5, .75]``, which returns the 25th, 50th, and
    75th percentiles.

Returns
-------
Dataframe or series description.

---
## NDFrameDescriberAbstract
```python
from describe import NDFrameDescriberAbstract
```

Abstract class for describing dataframe or series.

Parameters
----------
obj : Series or DataFrame
    Object to be described.

---
## SeriesDescriber
```python
from describe import SeriesDescriber
```

Class responsible for creating series description.

---
## DataFrameDescriber
```python
from describe import DataFrameDescriber
```

Class responsible for creating dataobj description.

Parameters
----------
obj : DataFrame
    DataFrame to be described.
include : 'all', list-like of dtypes or None
    A white list of data types to include in the result.
exclude : list-like of dtypes or None
    A black list of data types to omit from the result.

---
## reorder_columns
```python
from describe import reorder_columns
```

Set a convenient order for rows for display.

---
## describe_numeric_1d
```python
from describe import describe_numeric_1d
```

Describe series containing numerical data.

Parameters
----------
series : Series
    Series to be described.
percentiles : list-like of numbers
    The percentiles to include in the output.

---
## describe_categorical_1d
```python
from describe import describe_categorical_1d
```

Describe series containing categorical data.

Parameters
----------
data : Series
    Series to be described.
percentiles_ignored : list-like of numbers
    Ignored, but in place to unify interface.

---
## describe_timestamp_as_categorical_1d
```python
from describe import describe_timestamp_as_categorical_1d
```

Describe series containing timestamp data treated as categorical.

Parameters
----------
data : Series
    Series to be described.
percentiles_ignored : list-like of numbers
    Ignored, but in place to unify interface.

---
## describe_timestamp_1d
```python
from describe import describe_timestamp_1d
```

Describe series containing datetime64 dtype.

Parameters
----------
data : Series
    Series to be described.
percentiles : list-like of numbers
    The percentiles to include in the output.

---
## select_describe_func
```python
from describe import select_describe_func
```

Select proper function for describing series based on data type.

Parameters
----------
data : Series
    Series to be described.

---
## _refine_percentiles
```python
from describe import _refine_percentiles
```

Ensure that percentiles are unique and sorted.

Parameters
----------
percentiles : list-like of numbers, optional
    The percentiles to include in the output.

---
## __init__
```python
from describe import __init__
```



---
## describe
```python
from describe import describe
```



---
## _select_data
```python
from describe import _select_data
```

Select columns to be described.

---
## __name__
```python
from selectn import __name__
```

Implementation of nlargest and nsmallest.

---
## SelectN
```python
from selectn import SelectN
```



---
## SelectNSeries
```python
from selectn import SelectNSeries
```

Implement n largest/smallest for Series

Parameters
----------
obj : Series
n : int
keep : {'first', 'last'}, default 'first'

Returns
-------
nordered : Series

---
## SelectNFrame
```python
from selectn import SelectNFrame
```

Implement n largest/smallest for DataFrame

Parameters
----------
obj : DataFrame
n : int
keep : {'first', 'last'}, default 'first'
columns : list or str

Returns
-------
nordered : DataFrame

---
## __init__
```python
from selectn import __init__
```



---
## compute
```python
from selectn import compute
```



---
## nlargest
```python
from selectn import nlargest
```



---
## nsmallest
```python
from selectn import nsmallest
```



---
## is_valid_dtype_n_method
```python
from selectn import is_valid_dtype_n_method
```

Helper function to determine if dtype is valid for
nsmallest/nlargest methods

---
## get_indexer
```python
from selectn import get_indexer
```

Helper function to concat `current_indexer` and `other_indexer`
depending on `method`

---
## __name__
```python
from to_dict import __name__
```



---
## to_dict
```python
from to_dict import to_dict
```

Convert the DataFrame to a dictionary.

The type of the key-value pairs can be customized with the parameters
(see below).

Parameters
----------
orient : str {'dict', 'list', 'series', 'split', 'tight', 'records', 'index'}
    Determines the type of the values of the dictionary.

    - 'dict' (default) : dict like {column -> {index -> value}}
    - 'list' : dict like {column -> [values]}
    - 'series' : dict like {column -> Series(values)}
    - 'split' : dict like
      {'index' -> [index], 'columns' -> [columns], 'data' -> [values]}
    - 'tight' : dict like
      {'index' -> [index], 'columns' -> [columns], 'data' -> [values],
      'index_names' -> [index.names], 'column_names' -> [column.names]}
    - 'records' : list like
      [{column -> value}, ... , {column -> value}]
    - 'index' : dict like {index -> {column -> value}}

    .. versionadded:: 1.4.0
        'tight' as an allowed value for the ``orient`` argument

into : class, default dict
    The collections.abc.MutableMapping subclass used for all Mappings
    in the return value.  Can be the actual class or an empty
    instance of the mapping type you want.  If you want a
    collections.defaultdict, you must pass it initialized.

index : bool, default True
    Whether to include the index item (and index_names item if `orient`
    is 'tight') in the returned dictionary. Can only be ``False``
    when `orient` is 'split' or 'tight'.

    .. versionadded:: 2.0.0

Returns
-------
dict, list or collections.abc.Mapping
    Return a collections.abc.MutableMapping object representing the
    DataFrame. The resulting transformation depends on the `orient` parameter.

---
## __name__
```python
from hashing import __name__
```

data hash pandas / numpy objects

---
## combine_hash_arrays
```python
from hashing import combine_hash_arrays
```

Parameters
----------
arrays : Iterator[np.ndarray]
num_items : int

Returns
-------
np.ndarray[uint64]

Should be the same as CPython's tupleobject.c

---
## hash_pandas_object
```python
from hashing import hash_pandas_object
```

Return a data hash of the Index/Series/DataFrame.

Parameters
----------
obj : Index, Series, or DataFrame
index : bool, default True
    Include the index in the hash (if Series/DataFrame).
encoding : str, default 'utf8'
    Encoding for data & key when strings.
hash_key : str, default _default_hash_key
    Hash_key for string key to encode.
categorize : bool, default True
    Whether to first categorize object arrays before hashing. This is more
    efficient when the array contains duplicate values.

Returns
-------
Series of uint64, same length as the object

Examples
--------
>>> pd.util.hash_pandas_object(pd.Series([1, 2, 3]))
0    14639053686158035780
1     3869563279212530728
2      393322362522515241
dtype: uint64

---
## hash_tuples
```python
from hashing import hash_tuples
```

Hash an MultiIndex / listlike-of-tuples efficiently.

Parameters
----------
vals : MultiIndex or listlike-of-tuples
encoding : str, default 'utf8'
hash_key : str, default _default_hash_key

Returns
-------
ndarray[np.uint64] of hashed values

---
## hash_array
```python
from hashing import hash_array
```

Given a 1d array, return an array of deterministic integers.

Parameters
----------
vals : ndarray or ExtensionArray
encoding : str, default 'utf8'
    Encoding for data & key when strings.
hash_key : str, default _default_hash_key
    Hash_key for string key to encode.
categorize : bool, default True
    Whether to first categorize object arrays before hashing. This is more
    efficient when the array contains duplicate values.

Returns
-------
ndarray[np.uint64, ndim=1]
    Hashed values, same length as the vals.

Examples
--------
>>> pd.util.hash_array(np.array([1, 2, 3]))
array([ 6238072747940578789, 15839785061582574730,  2185194620014831856],
  dtype=uint64)

---
## _hash_ndarray
```python
from hashing import _hash_ndarray
```

See hash_array.__doc__.

---
## __name__
```python
from numba_ import __name__
```



---
## maybe_use_numba
```python
from numba_ import maybe_use_numba
```

Signal whether to use numba routines.

---
## set_use_numba
```python
from numba_ import set_use_numba
```



---
## get_jit_arguments
```python
from numba_ import get_jit_arguments
```

Return arguments to pass to numba.JIT, falling back on pandas default JIT settings.

Parameters
----------
engine_kwargs : dict, default None
    user passed keyword arguments for numba.JIT
kwargs : dict, default None
    user passed keyword arguments to pass into the JITed function

Returns
-------
dict[str, bool]
    nopython, nogil, parallel

Raises
------
NumbaUtilError

---
## jit_user_function
```python
from numba_ import jit_user_function
```

If user function is not jitted already, mark the user's function
as jitable.

Parameters
----------
func : function
    user defined function

Returns
-------
function
    Numba JITed function, or function marked as JITable by numba

---
## shift
```python
from transforms import shift
```



---
## __name__
```python
from masked_accumulations import __name__
```

masked_accumulations.py is for accumulation algorithms using a mask-based approach
for missing values.

---
## _cum_func
```python
from masked_accumulations import _cum_func
```

Accumulations for 1D masked array.

We will modify values in place to replace NAs with the appropriate fill value.

Parameters
----------
func : np.cumsum, np.cumprod, np.maximum.accumulate, np.minimum.accumulate
values : np.ndarray
    Numpy array with the values (can be of any dtype that support the
    operation).
mask : np.ndarray
    Boolean numpy array (True values indicate missing values).
skipna : bool, default True
    Whether to skip NA.

---
## cumsum
```python
from masked_accumulations import cumsum
```



---
## cumprod
```python
from masked_accumulations import cumprod
```



---
## cummin
```python
from masked_accumulations import cummin
```



---
## cummax
```python
from masked_accumulations import cummax
```



---
## __name__
```python
from quantile import __name__
```



---
## quantile_compat
```python
from quantile import quantile_compat
```

Compute the quantiles of the given values for each quantile in `qs`.

Parameters
----------
values : np.ndarray or ExtensionArray
qs : np.ndarray[float64]
interpolation : str

Returns
-------
np.ndarray or ExtensionArray

---
## quantile_with_mask
```python
from quantile import quantile_with_mask
```

Compute the quantiles of the given values for each quantile in `qs`.

Parameters
----------
values : np.ndarray
    For ExtensionArray, this is _values_for_factorize()[0]
mask : np.ndarray[bool]
    mask = isna(values)
    For ExtensionArray, this is computed before calling _value_for_factorize
fill_value : Scalar
    The value to interpret fill NA entries with
    For ExtensionArray, this is _values_for_factorize()[1]
qs : np.ndarray[float64]
interpolation : str
    Type of interpolation

Returns
-------
np.ndarray

Notes
-----
Assumes values is already 2D.  For ExtensionArray this means np.atleast_2d
has been called on _values_for_factorize()[0]

Quantile is computed along axis=1.

---
## _nanpercentile_1d
```python
from quantile import _nanpercentile_1d
```

Wrapper for np.percentile that skips missing values, specialized to
1-dimensional case.

Parameters
----------
values : array over which to find quantiles
mask : ndarray[bool]
    locations in values that should be considered missing
qs : np.ndarray[float64] of quantile indices to find
na_value : scalar
    value to return for empty or all-null values
interpolation : str

Returns
-------
quantiles : scalar or array

---
## _nanpercentile
```python
from quantile import _nanpercentile
```

Wrapper for np.percentile that skips missing values.

Parameters
----------
values : np.ndarray[ndim=2]  over which to find quantiles
qs : np.ndarray[float64] of quantile indices to find
na_value : scalar
    value to return for empty or all-null values
mask : np.ndarray[bool]
    locations in values that should be considered missing
interpolation : str

Returns
-------
quantiles : scalar or array

---
## __name__
```python
from masked_reductions import __name__
```

masked_reductions.py is for reduction algorithms using a mask-based approach
for missing values.

---
## _reductions
```python
from masked_reductions import _reductions
```

Sum, mean or product for 1D masked array.

Parameters
----------
func : np.sum or np.prod
values : np.ndarray
    Numpy array with the values (can be of any dtype that support the
    operation).
mask : np.ndarray[bool]
    Boolean numpy array (True values indicate missing values).
skipna : bool, default True
    Whether to skip NA.
min_count : int, default 0
    The required number of valid values to perform the operation. If fewer than
    ``min_count`` non-NA values are present the result will be NA.
axis : int, optional, default None

---
## sum
```python
from masked_reductions import sum
```



---
## prod
```python
from masked_reductions import prod
```



---
## _minmax
```python
from masked_reductions import _minmax
```

Reduction for 1D masked array.

Parameters
----------
func : np.min or np.max
values : np.ndarray
    Numpy array with the values (can be of any dtype that support the
    operation).
mask : np.ndarray[bool]
    Boolean numpy array (True values indicate missing values).
skipna : bool, default True
    Whether to skip NA.
axis : int, optional, default None

---
## min
```python
from masked_reductions import min
```



---
## max
```python
from masked_reductions import max
```



---
## mean
```python
from masked_reductions import mean
```



---
## var
```python
from masked_reductions import var
```



---
## std
```python
from masked_reductions import std
```



---
## __name__
```python
from take import __name__
```



---
## take_nd
```python
from take import take_nd
```

Specialized Cython take which sets NaN values in one pass

This dispatches to ``take`` defined on ExtensionArrays.

Note: this function assumes that the indexer is a valid(ated) indexer with
no out of bound indices.

Parameters
----------
arr : np.ndarray or ExtensionArray
    Input array.
indexer : ndarray
    1-D array of indices to take, subarrays corresponding to -1 value
    indices are filed with fill_value
axis : int, default 0
    Axis to take from
fill_value : any, default np.nan
    Fill value to replace -1 values with
allow_fill : bool, default True
    If False, indexer is assumed to contain no -1 values so no filling
    will be done.  This short-circuits computation of a mask.  Result is
    undefined if allow_fill == False and -1 is present in indexer.

Returns
-------
subarray : np.ndarray or ExtensionArray
    May be the same type as the input, or cast to an ndarray.

---
## _take_nd_ndarray
```python
from take import _take_nd_ndarray
```



---
## take_1d
```python
from take import take_1d
```

Specialized version for 1D arrays. Differences compared to `take_nd`:

- Assumes input array has already been converted to numpy array / EA
- Assumes indexer is already guaranteed to be intp dtype ndarray
- Only works for 1D arrays

To ensure the lowest possible overhead.

Note: similarly to `take_nd`, this function assumes that the indexer is
a valid(ated) indexer with no out of bound indices.

Parameters
----------
arr : np.ndarray or ExtensionArray
    Input array.
indexer : ndarray
    1-D array of indices to take (validated indices, intp dtype).
fill_value : any, default np.nan
    Fill value to replace -1 values with
allow_fill : bool, default True
    If False, indexer is assumed to contain no -1 values so no filling
    will be done.  This short-circuits computation of a mask. Result is
    undefined if allow_fill == False and -1 is present in indexer.
mask : np.ndarray, optional, default None
    If `allow_fill` is True, and the mask (where indexer == -1) is already
    known, it can be passed to avoid recomputation.

---
## take_2d_multi
```python
from take import take_2d_multi
```

Specialized Cython take which sets NaN values in one pass.

---
## _get_take_nd_function_cached
```python
from take import _get_take_nd_function_cached
```

Part of _get_take_nd_function below that doesn't need `mask_info` and thus
can be cached (mask_info potentially contains a numpy ndarray which is not
hashable and thus cannot be used as argument for cached function).

---
## _get_take_nd_function
```python
from take import _get_take_nd_function
```

Get the appropriate "take" implementation for the given dimension, axis
and dtypes.

---
## _view_wrapper
```python
from take import _view_wrapper
```



---
## _convert_wrapper
```python
from take import _convert_wrapper
```



---
## _take_nd_object
```python
from take import _take_nd_object
```



---
## _take_2d_multi_object
```python
from take import _take_2d_multi_object
```



---
## _take_preprocess_indexer_and_fill_value
```python
from take import _take_preprocess_indexer_and_fill_value
```



---
## wrapper
```python
from take import wrapper
```



---
## func
```python
from take import func
```



---
## __name__
```python
from datetimelike_accumulations import __name__
```

datetimelke_accumulations.py is for accumulations of datetimelike extension arrays

---
## _cum_func
```python
from datetimelike_accumulations import _cum_func
```

Accumulations for 1D datetimelike arrays.

Parameters
----------
func : np.cumsum, np.maximum.accumulate, np.minimum.accumulate
values : np.ndarray
    Numpy array with the values (can be of any dtype that support the
    operation). Values is changed is modified inplace.
skipna : bool, default True
    Whether to skip NA.

---
## cumsum
```python
from datetimelike_accumulations import cumsum
```



---
## cummin
```python
from datetimelike_accumulations import cummin
```



---
## cummax
```python
from datetimelike_accumulations import cummax
```



---
## __name__
```python
from putmask import __name__
```

EA-compatible analogue to np.putmask

---
## putmask_inplace
```python
from putmask import putmask_inplace
```

ExtensionArray-compatible implementation of np.putmask.  The main
difference is we do not handle repeating or truncating like numpy.

Parameters
----------
values: np.ndarray or ExtensionArray
mask : np.ndarray[bool]
    We assume extract_bool_array has already been called.
value : Any

---
## putmask_without_repeat
```python
from putmask import putmask_without_repeat
```

np.putmask will truncate or repeat if `new` is a listlike with
len(new) != len(values).  We require an exact match.

Parameters
----------
values : np.ndarray
mask : np.ndarray[bool]
new : Any

---
## validate_putmask
```python
from putmask import validate_putmask
```

Validate mask and check if this putmask operation is a no-op.

---
## extract_bool_array
```python
from putmask import extract_bool_array
```

If we have a SparseArray or BooleanArray, convert it to ndarray[bool].

---
## setitem_datetimelike_compat
```python
from putmask import setitem_datetimelike_compat
```

Parameters
----------
values : np.ndarray
num_set : int
    For putmask, this is mask.sum()
other : Any

---
## __name__
```python
from replace import __name__
```

Methods used by Block.replace and related methods.

---
## should_use_regex
```python
from replace import should_use_regex
```

Decide whether to treat `to_replace` as a regular expression.

---
## compare_or_regex_search
```python
from replace import compare_or_regex_search
```

Compare two array-like inputs of the same shape or two scalar values

Calls operator.eq or re.search, depending on regex argument. If regex is
True, perform an element-wise regex matching.

Parameters
----------
a : array-like
b : scalar or regex pattern
regex : bool
mask : np.ndarray[bool]

Returns
-------
mask : array-like of bool

---
## replace_regex
```python
from replace import replace_regex
```

Parameters
----------
values : ArrayLike
    Object dtype.
rx : re.Pattern
value : Any
mask : np.ndarray[bool], optional

Notes
-----
Alters values in-place.

---
## _check_comparison_types
```python
from replace import _check_comparison_types
```

Raises an error if the two arrays (a,b) cannot be compared.
Otherwise, returns the comparison result as expected.

---
## re_replacer
```python
from replace import re_replacer
```



---
## __name__
```python
from from_dataframe import __name__
```



---
## from_dataframe
```python
from from_dataframe import from_dataframe
```

Build a ``pa.Table`` from any DataFrame supporting the interchange protocol.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Table

Examples
--------
>>> import pyarrow
>>> from pyarrow.interchange import from_dataframe

Convert a pandas dataframe to a pyarrow table:

>>> import pandas as pd
>>> df = pd.DataFrame({
...         "n_attendees": [100, 10, 1],
...         "country": ["Italy", "Spain", "Slovenia"],
...     })
>>> df
   n_attendees   country
0          100     Italy
1           10     Spain
2            1  Slovenia
>>> from_dataframe(df)
pyarrow.Table
n_attendees: int64
country: large_string
----
n_attendees: [[100,10,1]]
country: [["Italy","Spain","Slovenia"]]

---
## _from_dataframe
```python
from from_dataframe import _from_dataframe
```

Build a ``pa.Table`` from the DataFrame interchange object.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Table

---
## protocol_df_chunk_to_pandas
```python
from from_dataframe import protocol_df_chunk_to_pandas
```

Convert interchange protocol chunk to ``pd.DataFrame``.

Parameters
----------
df : DataFrameXchg

Returns
-------
pd.DataFrame

---
## primitive_column_to_ndarray
```python
from from_dataframe import primitive_column_to_ndarray
```

Convert a column holding one of the primitive dtypes to a NumPy array.

A primitive type is one of: int, uint, float, bool.

Parameters
----------
col : Column

Returns
-------
tuple
    Tuple of np.ndarray holding the data and the memory owner object
    that keeps the memory alive.

---
## categorical_column_to_series
```python
from from_dataframe import categorical_column_to_series
```

Convert a column holding categorical data to a pandas Series.

Parameters
----------
col : Column

Returns
-------
tuple
    Tuple of pd.Series holding the data and the memory owner object
    that keeps the memory alive.

---
## string_column_to_ndarray
```python
from from_dataframe import string_column_to_ndarray
```

Convert a column holding string data to a NumPy array.

Parameters
----------
col : Column

Returns
-------
tuple
    Tuple of np.ndarray holding the data and the memory owner object
    that keeps the memory alive.

---
## parse_datetime_format_str
```python
from from_dataframe import parse_datetime_format_str
```

Parse datetime `format_str` to interpret the `data`.

---
## datetime_column_to_ndarray
```python
from from_dataframe import datetime_column_to_ndarray
```

Convert a column holding DateTime data to a NumPy array.

Parameters
----------
col : Column

Returns
-------
tuple
    Tuple of np.ndarray holding the data and the memory owner object
    that keeps the memory alive.

---
## buffer_to_ndarray
```python
from from_dataframe import buffer_to_ndarray
```

Build a NumPy array from the passed buffer.

Parameters
----------
buffer : Buffer
    Buffer to build a NumPy array from.
dtype : tuple
    Data type of the buffer conforming protocol dtypes format.
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
length : int, optional
    If the buffer is a bit-mask, specifies a number of bits to read
    from the buffer. Has no effect otherwise.

Returns
-------
np.ndarray

Notes
-----
The returned array doesn't own the memory. The caller of this function is
responsible for keeping the memory owner object alive as long as
the returned NumPy array is being used.

---
## set_nulls
```python
from from_dataframe import set_nulls
```

Set null values for the data according to the column null kind.

Parameters
----------
data : np.ndarray or pd.Series
    Data to set nulls in.
col : Column
    Column object that describes the `data`.
validity : tuple(Buffer, dtype) or None
    The return value of ``col.buffers()``. We do not access the ``col.buffers()``
    here to not take the ownership of the memory of buffer objects.
allow_modify_inplace : bool, default: True
    Whether to modify the `data` inplace when zero-copy is possible (True) or always
    modify a copy of the `data` (False).

Returns
-------
np.ndarray or pd.Series
    Data with the nulls being set.

---
## PandasDataFrameXchg
```python
from dataframe import PandasDataFrameXchg
```

A data frame class, with only the methods required by the interchange
protocol defined.
Instances of this (private) class are returned from
``pd.DataFrame.__dataframe__`` as objects with the methods and
attributes defined on this class.

---
## __dataframe__
```python
from dataframe import __dataframe__
```

Construct a new exchange object, potentially changing the parameters.
``nan_as_null`` is a keyword intended for the consumer to tell the
producer to overwrite null values in the data with ``NaN``.
It is intended for cases where the consumer does not support the bit
mask or byte mask that is the producer's native representation.
``allow_copy`` is a keyword that defines whether or not the library is
allowed to make a copy of the data. For example, copying data would be
necessary if a library supports strided buffers, given that this
protocol specifies contiguous buffers.

---
## metadata
```python
from dataframe import metadata
```

The metadata for the data frame, as a dictionary with string keys. The
contents of `metadata` may be anything, they are meant for a library
to store information that it needs to, e.g., roundtrip losslessly or
for two implementations to share data that is not (yet) part of the
interchange protocol specification. For avoiding collisions with other
entries, please add name the keys with the name of the library
followed by a period and the desired name, e.g, ``pandas.indexcol``.

---
## num_columns
```python
from dataframe import num_columns
```

Return the number of columns in the DataFrame.

---
## num_rows
```python
from dataframe import num_rows
```

Return the number of rows in the DataFrame, if available.

---
## num_chunks
```python
from dataframe import num_chunks
```

Return the number of chunks the DataFrame consists of.

---
## column_names
```python
from dataframe import column_names
```

Return an iterator yielding the column names.

---
## get_column_by_name
```python
from dataframe import get_column_by_name
```

Return the column whose name is the indicated name.

---
## get_columns
```python
from dataframe import get_columns
```

Return an iterator yielding the columns.

---
## select_columns
```python
from dataframe import select_columns
```

Create a new DataFrame by selecting a subset of columns by index.

---
## select_columns_by_name
```python
from dataframe import select_columns_by_name
```

Create a new DataFrame by selecting a subset of columns by name.

---
## get_chunks
```python
from dataframe import get_chunks
```

Return an iterator yielding the chunks.

By default (None), yields the chunks that the data is stored as by the
producer. If given, ``n_chunks`` must be a multiple of
``self.num_chunks()``, meaning the producer must subdivide each chunk
before yielding it.

Note that the producer must ensure that all columns are chunked the
same way.

---
## __name__
```python
from dataframe_protocol import __name__
```

A verbatim copy (vendored) of the spec from https://github.com/data-apis/dataframe-api

---
## DlpackDeviceType
```python
from dataframe_protocol import DlpackDeviceType
```

Integer enum for device type codes matching DLPack.

---
## DtypeKind
```python
from dataframe_protocol import DtypeKind
```

Integer enum for data types.

Attributes
----------
INT : int
    Matches to signed integer data type.
UINT : int
    Matches to unsigned integer data type.
FLOAT : int
    Matches to floating point data type.
BOOL : int
    Matches to boolean data type.
STRING : int
    Matches to string data type (UTF-8 encoded).
DATETIME : int
    Matches to datetime data type.
CATEGORICAL : int
    Matches to categorical data type.

---
## ColumnNullType
```python
from dataframe_protocol import ColumnNullType
```

Integer enum for null type representation.

Attributes
----------
NON_NULLABLE : int
    Non-nullable column.
USE_NAN : int
    Use explicit float NaN value.
USE_SENTINEL : int
    Sentinel value besides NaN/NaT.
USE_BITMASK : int
    The bit is set/unset representing a null on a certain position.
USE_BYTEMASK : int
    The byte is set/unset representing a null on a certain position.

---
## ColumnBuffers
```python
from dataframe_protocol import ColumnBuffers
```



---
## CategoricalDescription
```python
from dataframe_protocol import CategoricalDescription
```



---
## Buffer
```python
from dataframe_protocol import Buffer
```

Data in the buffer is guaranteed to be contiguous in memory.

Note that there is no dtype attribute present, a buffer can be thought of
as simply a block of memory. However, if the column that the buffer is
attached to has a dtype that's supported by DLPack and ``__dlpack__`` is
implemented, then that dtype information will be contained in the return
value from ``__dlpack__``.

This distinction is useful to support both data exchange via DLPack on a
buffer and (b) dtypes like variable-length strings which do not have a
fixed number of bytes per element.

---
## Column
```python
from dataframe_protocol import Column
```

A column object, with only the methods and properties required by the
interchange protocol defined.

A column can contain one or more chunks. Each chunk can contain up to three
buffers - a data buffer, a mask buffer (depending on null representation),
and an offsets buffer (if variable-size binary; e.g., variable-length
strings).

TBD: Arrow has a separate "null" dtype, and has no separate mask concept.
     Instead, it seems to use "children" for both columns with a bit mask,
     and for nested dtypes. Unclear whether this is elegant or confusing.
     This design requires checking the null representation explicitly.

     The Arrow design requires checking:
     1. the ARROW_FLAG_NULLABLE (for sentinel values)
     2. if a column has two children, combined with one of those children
        having a null dtype.

     Making the mask concept explicit seems useful. One null dtype would
     not be enough to cover both bit and byte masks, so that would mean
     even more checking if we did it the Arrow way.

TBD: there's also the "chunk" concept here, which is implicit in Arrow as
     multiple buffers per array (= column here). Semantically it may make
     sense to have both: chunks were meant for example for lazy evaluation
     of data which doesn't fit in memory, while multiple buffers per column
     could also come from doing a selection operation on a single
     contiguous buffer.

     Given these concepts, one would expect chunks to be all of the same
     size (say a 10,000 row dataframe could have 10 chunks of 1,000 rows),
     while multiple buffers could have data-dependent lengths. Not an issue
     in pandas if one column is backed by a single NumPy array, but in
     Arrow it seems possible.
     Are multiple chunks *and* multiple buffers per column necessary for
     the purposes of this interchange protocol, or must producers either
     reuse the chunk concept for this or copy the data?

Note: this Column object can only be produced by ``__dataframe__``, so
      doesn't need its own version or ``__column__`` protocol.

---
## DataFrame
```python
from dataframe_protocol import DataFrame
```

A data frame class, with only the methods required by the interchange
protocol defined.

A "data frame" represents an ordered collection of named columns.
A column's "name" must be a unique string.
Columns may be accessed by name or by position.

This could be a public data frame class, or an object with the methods and
attributes defined on this DataFrame class could be returned from the
``__dataframe__`` method of a public data frame class in a library adhering
to the dataframe interchange protocol specification.

---
## bufsize
```python
from dataframe_protocol import bufsize
```

Buffer size in bytes.

---
## ptr
```python
from dataframe_protocol import ptr
```

Pointer to start of the buffer as an integer.

---
## __dlpack__
```python
from dataframe_protocol import __dlpack__
```

Produce DLPack capsule (see array API standard).

Raises:

    - TypeError : if the buffer contains unsupported dtypes.
    - NotImplementedError : if DLPack support is not implemented

Useful to have to connect to array libraries. Support optional because
it's not completely trivial to implement for a Python-only library.

---
## __dlpack_device__
```python
from dataframe_protocol import __dlpack_device__
```

Device type and device ID for where the data in the buffer resides.
Uses device type codes matching DLPack.
Note: must be implemented even if ``__dlpack__`` is not.

---
## size
```python
from dataframe_protocol import size
```

Size of the column, in elements.

Corresponds to DataFrame.num_rows() if column is a single chunk;
equal to size of this current chunk otherwise.

---
## offset
```python
from dataframe_protocol import offset
```

Offset of first element.

May be > 0 if using chunks; for example for a column with N chunks of
equal size M (only the last chunk may be shorter),
``offset = n * M``, ``n = 0 .. N-1``.

---
## dtype
```python
from dataframe_protocol import dtype
```

Dtype description as a tuple ``(kind, bit-width, format string, endianness)``.

Bit-width : the number of bits as an integer
Format string : data type description format string in Apache Arrow C
                Data Interface format.
Endianness : current only native endianness (``=``) is supported

Notes:
    - Kind specifiers are aligned with DLPack where possible (hence the
      jump to 20, leave enough room for future extension)
    - Masks must be specified as boolean with either bit width 1 (for bit
      masks) or 8 (for byte masks).
    - Dtype width in bits was preferred over bytes
    - Endianness isn't too useful, but included now in case in the future
      we need to support non-native endianness
    - Went with Apache Arrow format strings over NumPy format strings
      because they're more complete from a dataframe perspective
    - Format strings are mostly useful for datetime specification, and
      for categoricals.
    - For categoricals, the format string describes the type of the
      categorical in the data buffer. In case of a separate encoding of
      the categorical (e.g. an integer to string mapping), this can
      be derived from ``self.describe_categorical``.
    - Data types not included: complex, Arrow-style null, binary, decimal,
      and nested (list, struct, map, union) dtypes.

---
## describe_categorical
```python
from dataframe_protocol import describe_categorical
```

If the dtype is categorical, there are two options:
- There are only values in the data buffer.
- There is a separate non-categorical Column encoding for categorical values.

Raises TypeError if the dtype is not categorical

Returns the dictionary with description on how to interpret the data buffer:
    - "is_ordered" : bool, whether the ordering of dictionary indices is
                     semantically meaningful.
    - "is_dictionary" : bool, whether a mapping of
                        categorical values to other objects exists
    - "categories" : Column representing the (implicit) mapping of indices to
                     category values (e.g. an array of cat1, cat2, ...).
                     None if not a dictionary-style categorical.

TBD: are there any other in-memory representations that are needed?

---
## describe_null
```python
from dataframe_protocol import describe_null
```

Return the missing value (or "null") representation the column dtype
uses, as a tuple ``(kind, value)``.

Value : if kind is "sentinel value", the actual value. If kind is a bit
mask or a byte mask, the value (0 or 1) indicating a missing value. None
otherwise.

---
## null_count
```python
from dataframe_protocol import null_count
```

Number of null elements, if known.

Note: Arrow uses -1 to indicate "unknown", but None seems cleaner.

---
## metadata
```python
from dataframe_protocol import metadata
```

The metadata for the data frame, as a dictionary with string keys. The
contents of `metadata` may be anything, they are meant for a library
to store information that it needs to, e.g., roundtrip losslessly or
for two implementations to share data that is not (yet) part of the
interchange protocol specification. For avoiding collisions with other
entries, please add name the keys with the name of the library
followed by a period and the desired name, e.g, ``pandas.indexcol``.

---
## num_chunks
```python
from dataframe_protocol import num_chunks
```

Return the number of chunks the DataFrame consists of.

---
## get_chunks
```python
from dataframe_protocol import get_chunks
```

Return an iterator yielding the chunks.

By default (None), yields the chunks that the data is stored as by the
producer. If given, ``n_chunks`` must be a multiple of
``self.num_chunks()``, meaning the producer must subdivide each chunk
before yielding it.

---
## get_buffers
```python
from dataframe_protocol import get_buffers
```

Return a dictionary containing the underlying buffers.

The returned dictionary has the following contents:

    - "data": a two-element tuple whose first element is a buffer
              containing the data and whose second element is the data
              buffer's associated dtype.
    - "validity": a two-element tuple whose first element is a buffer
                  containing mask values indicating missing data and
                  whose second element is the mask value buffer's
                  associated dtype. None if the null representation is
                  not a bit or byte mask.
    - "offsets": a two-element tuple whose first element is a buffer
                 containing the offset values for variable-size binary
                 data (e.g., variable-length strings) and whose second
                 element is the offsets buffer's associated dtype. None
                 if the data buffer does not have an associated offsets
                 buffer.

---
## __dataframe__
```python
from dataframe_protocol import __dataframe__
```

Construct a new interchange object, potentially changing the parameters.

---
## num_columns
```python
from dataframe_protocol import num_columns
```

Return the number of columns in the DataFrame.

---
## num_rows
```python
from dataframe_protocol import num_rows
```

Return the number of rows in the DataFrame, if available.

---
## column_names
```python
from dataframe_protocol import column_names
```

Return an iterator yielding the column names.

---
## get_column
```python
from dataframe_protocol import get_column
```

Return the column at the indicated position.

---
## get_column_by_name
```python
from dataframe_protocol import get_column_by_name
```

Return the column whose name is the indicated name.

---
## get_columns
```python
from dataframe_protocol import get_columns
```

Return an iterator yielding the columns.

---
## select_columns
```python
from dataframe_protocol import select_columns
```

Create a new DataFrame by selecting a subset of columns by index.

---
## select_columns_by_name
```python
from dataframe_protocol import select_columns_by_name
```

Create a new DataFrame by selecting a subset of columns by name.

---
## ArrowCTypes
```python
from utils import ArrowCTypes
```

Enum for Apache Arrow C type format strings.

The Arrow C data interface:
https://arrow.apache.org/docs/format/CDataInterface.html#data-type-description-format-strings

---
## Endianness
```python
from utils import Endianness
```

Enum indicating the byte-order of a data-type.

---
## dtype_to_arrow_c_fmt
```python
from utils import dtype_to_arrow_c_fmt
```

Represent pandas `dtype` as a format string in Apache Arrow C notation.

Parameters
----------
dtype : np.dtype
    Datatype of pandas DataFrame to represent.

Returns
-------
str
    Format string in Apache Arrow C notation of the given `dtype`.

---
## maybe_rechunk
```python
from utils import maybe_rechunk
```

Rechunk a multi-chunk pyarrow array into a single-chunk array, if necessary.

- Returns `None` if the input series is not backed by a multi-chunk pyarrow array
  (and so doesn't need rechunking)
- Returns a single-chunk-backed-Series if the input is backed by a multi-chunk
  pyarrow array and `allow_copy` is `True`.
- Raises a `RuntimeError` if `allow_copy` is `False` and input is a
  based by a multi-chunk pyarrow array.

---
## __name__
```python
from buffer import __name__
```



---
## PandasBuffer
```python
from buffer import PandasBuffer
```

Data in the buffer is guaranteed to be contiguous in memory.

---
## PandasBufferPyarrow
```python
from buffer import PandasBufferPyarrow
```

Data in the buffer is guaranteed to be contiguous in memory.

---
## __init__
```python
from buffer import __init__
```

Handle PyArrow Buffers.

---
## bufsize
```python
from buffer import bufsize
```

Buffer size in bytes.

---
## ptr
```python
from buffer import ptr
```

Pointer to start of the buffer as an integer.

---
## __dlpack__
```python
from buffer import __dlpack__
```

Produce DLPack capsule (see array API standard).

Raises:
    - TypeError : if the buffer contains unsupported dtypes.
    - NotImplementedError : if DLPack support is not implemented

Useful to have to connect to array libraries. Support optional because
it's not completely trivial to implement for a Python-only library.

---
## __dlpack_device__
```python
from buffer import __dlpack_device__
```

Device type and device ID for where the data in the buffer resides.
Uses device type codes matching DLPack.
Note: must be implemented even if ``__dlpack__`` is not.

---
## __repr__
```python
from buffer import __repr__
```



---
## __name__
```python
from column import __name__
```



---
## PandasColumn
```python
from column import PandasColumn
```

A column object, with only the methods and properties required by the
interchange protocol defined.
A column can contain one or more chunks. Each chunk can contain up to three
buffers - a data buffer, a mask buffer (depending on null representation),
and an offsets buffer (if variable-size binary; e.g., variable-length
strings).
Note: this Column object can only be produced by ``__dataframe__``, so
      doesn't need its own version or ``__column__`` protocol.

---
## __init__
```python
from column import __init__
```

Handles PyArrow Arrays and ChunkedArrays.

---
## size
```python
from column import size
```

Size of the column, in elements.

Corresponds to DataFrame.num_rows() if column is a single chunk;
equal to size of this current chunk otherwise.

Is a method rather than a property because it may cause a (potentially
expensive) computation for some dataframe implementations.

---
## offset
```python
from column import offset
```

Offset of first element.

May be > 0 if using chunks; for example for a column with N chunks of
equal size M (only the last chunk may be shorter),
``offset = n * M``, ``n = 0 .. N-1``.

---
## dtype
```python
from column import dtype
```

Dtype description as a tuple ``(kind, bit-width, format string,
endianness)``.

Bit-width : the number of bits as an integer
Format string : data type description format string in Apache Arrow C
                Data Interface format.
Endianness : current only native endianness (``=``) is supported

Notes:
    - Kind specifiers are aligned with DLPack where possible (hence the
      jump to 20, leave enough room for future extension)
    - Masks must be specified as boolean with either bit width 1 (for
      bit masks) or 8 (for byte masks).
    - Dtype width in bits was preferred over bytes
    - Endianness isn't too useful, but included now in case in the
      future we need to support non-native endianness
    - Went with Apache Arrow format strings over NumPy format strings
      because they're more complete from a dataframe perspective
    - Format strings are mostly useful for datetime specification, and
      for categoricals.
    - For categoricals, the format string describes the type of the
      categorical in the data buffer. In case of a separate encoding of
      the categorical (e.g. an integer to string mapping), this can
      be derived from ``self.describe_categorical``.
    - Data types not included: complex, Arrow-style null, binary,
      decimal, and nested (list, struct, map, union) dtypes.

---
## _dtype_from_pandasdtype
```python
from column import _dtype_from_pandasdtype
```

See `self.dtype` for details.

---
## describe_categorical
```python
from column import describe_categorical
```

If the dtype is categorical, there are two options:
- There are only values in the data buffer.
- There is a separate non-categorical Column encoding categorical
  values.

Raises TypeError if the dtype is not categorical

Returns the dictionary with description on how to interpret the
data buffer:
    - "is_ordered" : bool, whether the ordering of dictionary indices
                     is semantically meaningful.
    - "is_dictionary" : bool, whether a mapping of
                        categorical values to other objects exists
    - "categories" : Column representing the (implicit) mapping of
                     indices to category values (e.g. an array of
                     cat1, cat2, ...). None if not a dictionary-style
                     categorical.

TBD: are there any other in-memory representations that are needed?

---
## describe_null
```python
from column import describe_null
```

Return the missing value (or "null") representation the column dtype
uses, as a tuple ``(kind, value)``.

Value : if kind is "sentinel value", the actual value. If kind is a bit
mask or a byte mask, the value (0 or 1) indicating a missing value.
None otherwise.

---
## null_count
```python
from column import null_count
```

Number of null elements, if known.

Note: Arrow uses -1 to indicate "unknown", but None seems cleaner.

---
## metadata
```python
from column import metadata
```

The metadata for the column. See `DataFrame.metadata` for more details.

---
## num_chunks
```python
from column import num_chunks
```

Return the number of chunks the column consists of.

---
## get_chunks
```python
from column import get_chunks
```

Return an iterator yielding the chunks.

See `DataFrame.get_chunks` for details on ``n_chunks``.

---
## get_buffers
```python
from column import get_buffers
```

Return a dictionary containing the underlying buffers.

The returned dictionary has the following contents:

    - "data": a two-element tuple whose first element is a buffer
              containing the data and whose second element is the data
              buffer's associated dtype.
    - "validity": a two-element tuple whose first element is a buffer
                  containing mask values indicating missing data and
                  whose second element is the mask value buffer's
                  associated dtype. None if the null representation is
                  not a bit or byte mask.
    - "offsets": a two-element tuple whose first element is a buffer
                 containing the offset values for variable-size binary
                 data (e.g., variable-length strings) and whose second
                 element is the offsets buffer's associated dtype. None
                 if the data buffer does not have an associated offsets
                 buffer.

---
## _get_data_buffer
```python
from column import _get_data_buffer
```

Return the buffer containing the data and the buffer's
associated dtype.

---
## _get_validity_buffer
```python
from column import _get_validity_buffer
```

Return the buffer containing the mask values indicating missing data
and the buffer's associated dtype.
Raises NoBufferPresent if null representation is not a bit or byte
mask.

---
## _get_offsets_buffer
```python
from column import _get_offsets_buffer
```

Return the buffer containing the offset values for variable-size binary
data (e.g., variable-length strings) and the buffer's associated dtype.
Raises NoBufferPresent if the data buffer does not have an associated
offsets buffer.

---
## __name__
```python
from astype import __name__
```

Functions for implementing 'astype' methods according to pandas conventions,
particularly ones that differ from numpy.

---
## _astype_nansafe
```python
from astype import _astype_nansafe
```

Cast the elements of an array to a given dtype a nan-safe manner.

Parameters
----------
arr : ndarray
dtype : np.dtype or ExtensionDtype
copy : bool, default True
    If False, a view will be attempted but may fail, if
    e.g. the item sizes don't align.
skipna: bool, default False
    Whether or not we should skip NaN when casting as a string-type.

Raises
------
ValueError
    The dtype was a datetime64/timedelta64 dtype, but it had no unit.

---
## _astype_float_to_int_nansafe
```python
from astype import _astype_float_to_int_nansafe
```

astype with a check preventing converting NaN to an meaningless integer value.

---
## astype_array
```python
from astype import astype_array
```

Cast array (ndarray or ExtensionArray) to the new dtype.

Parameters
----------
values : ndarray or ExtensionArray
dtype : dtype object
copy : bool, default False
    copy if indicated

Returns
-------
ndarray or ExtensionArray

---
## astype_array_safe
```python
from astype import astype_array_safe
```

Cast array (ndarray or ExtensionArray) to the new dtype.

This basically is the implementation for DataFrame/Series.astype and
includes all custom logic for pandas (NaN-safety, converting str to object,
not allowing )

Parameters
----------
values : ndarray or ExtensionArray
dtype : str, dtype convertible
copy : bool, default False
    copy if indicated
errors : str, {'raise', 'ignore'}, default 'raise'
    - ``raise`` : allow exceptions to be raised
    - ``ignore`` : suppress exceptions. On error return original object

Returns
-------
ndarray or ExtensionArray

---
## astype_is_view
```python
from astype import astype_is_view
```

Checks if astype avoided copying the data.

Parameters
----------
dtype : Original dtype
new_dtype : target dtype

Returns
-------
True if new data is a view or not guaranteed to be a copy, False otherwise

---
## __name__
```python
from cast import __name__
```

Routines for casting.

---
## maybe_convert_platform
```python
from cast import maybe_convert_platform
```

try to do platform conversion, allow ndarray or list here

---
## is_nested_object
```python
from cast import is_nested_object
```

return a boolean if we have a nested object, e.g. a Series with 1 or
more Series elements

This may not be necessarily be performant.

---
## maybe_box_datetimelike
```python
from cast import maybe_box_datetimelike
```

Cast scalar to Timestamp or Timedelta if scalar is datetime-like
and dtype is not object.

Parameters
----------
value : scalar
dtype : Dtype, optional

Returns
-------
scalar

---
## maybe_box_native
```python
from cast import maybe_box_native
```

If passed a scalar cast the scalar to a python native type.

Parameters
----------
value : scalar or Series

Returns
-------
scalar or Series

---
## _maybe_unbox_datetimelike
```python
from cast import _maybe_unbox_datetimelike
```

Convert a Timedelta or Timestamp to timedelta64 or datetime64 for setting
into a numpy array.  Failing to unbox would risk dropping nanoseconds.

Notes
-----
Caller is responsible for checking dtype.kind in "mM"

---
## _disallow_mismatched_datetimelike
```python
from cast import _disallow_mismatched_datetimelike
```

numpy allows np.array(dt64values, dtype="timedelta64[ns]") and
vice-versa, but we do not want to allow this, so we need to
check explicitly

---
## maybe_downcast_to_dtype
```python
from cast import maybe_downcast_to_dtype
```

try to cast to the specified dtype (e.g. convert back to bool/int
or could be an astype of float64->float32

---
## maybe_downcast_numeric
```python
from cast import maybe_downcast_numeric
```

Subset of maybe_downcast_to_dtype restricted to numeric dtypes.

Parameters
----------
result : ndarray or ExtensionArray
dtype : np.dtype or ExtensionDtype
do_round : bool

Returns
-------
ndarray or ExtensionArray

---
## maybe_upcast_numeric_to_64bit
```python
from cast import maybe_upcast_numeric_to_64bit
```

If array is a int/uint/float bit size lower than 64 bit, upcast it to 64 bit.

Parameters
----------
arr : ndarray or ExtensionArray

Returns
-------
ndarray or ExtensionArray

---
## maybe_cast_pointwise_result
```python
from cast import maybe_cast_pointwise_result
```

Try casting result of a pointwise operation back to the original dtype if
appropriate.

Parameters
----------
result : array-like
    Result to cast.
dtype : np.dtype or ExtensionDtype
    Input Series from which result was calculated.
numeric_only : bool, default False
    Whether to cast only numerics or datetimes as well.
same_dtype : bool, default True
    Specify dtype when calling _from_sequence

Returns
-------
result : array-like
    result maybe casted to the dtype.

---
## _maybe_cast_to_extension_array
```python
from cast import _maybe_cast_to_extension_array
```

Call to `_from_sequence` that returns the object unchanged on Exception.

Parameters
----------
cls : class, subclass of ExtensionArray
obj : arraylike
    Values to pass to cls._from_sequence
dtype : ExtensionDtype, optional

Returns
-------
ExtensionArray or obj

---
## ensure_dtype_can_hold_na
```python
from cast import ensure_dtype_can_hold_na
```

If we have a dtype that cannot hold NA values, find the best match that can.

---
## maybe_promote
```python
from cast import maybe_promote
```

Find the minimal dtype that can hold both the given dtype and fill_value.

Parameters
----------
dtype : np.dtype
fill_value : scalar, default np.nan

Returns
-------
dtype
    Upcasted from dtype argument if necessary.
fill_value
    Upcasted from fill_value argument if necessary.

Raises
------
ValueError
    If fill_value is a non-scalar and dtype is not object.

---
## _maybe_promote_cached
```python
from cast import _maybe_promote_cached
```



---
## _maybe_promote
```python
from cast import _maybe_promote
```



---
## _ensure_dtype_type
```python
from cast import _ensure_dtype_type
```

Ensure that the given value is an instance of the given dtype.

e.g. if out dtype is np.complex64_, we should have an instance of that
as opposed to a python complex object.

Parameters
----------
value : object
dtype : np.dtype

Returns
-------
object

---
## infer_dtype_from
```python
from cast import infer_dtype_from
```

Interpret the dtype from a scalar or array.

Parameters
----------
val : object

---
## infer_dtype_from_scalar
```python
from cast import infer_dtype_from_scalar
```

Interpret the dtype from a scalar.

Parameters
----------
val : object

---
## dict_compat
```python
from cast import dict_compat
```

Convert datetimelike-keyed dicts to a Timestamp-keyed dict.

Parameters
----------
d: dict-like object

Returns
-------
dict

---
## infer_dtype_from_array
```python
from cast import infer_dtype_from_array
```

Infer the dtype from an array.

Parameters
----------
arr : array

Returns
-------
tuple (pandas-compat dtype, array)


Examples
--------
>>> np.asarray([1, '1'])
array(['1', '1'], dtype='<U21')

>>> infer_dtype_from_array([1, '1'])
(dtype('O'), [1, '1'])

---
## _maybe_infer_dtype_type
```python
from cast import _maybe_infer_dtype_type
```

Try to infer an object's dtype, for use in arithmetic ops.

Uses `element.dtype` if that's available.
Objects implementing the iterator protocol are cast to a NumPy array,
and from there the array's type is used.

Parameters
----------
element : object
    Possibly has a `.dtype` attribute, and possibly the iterator
    protocol.

Returns
-------
tipo : type

Examples
--------
>>> from collections import namedtuple
>>> Foo = namedtuple("Foo", "dtype")
>>> _maybe_infer_dtype_type(Foo(np.dtype("i8")))
dtype('int64')

---
## invalidate_string_dtypes
```python
from cast import invalidate_string_dtypes
```

Change string like dtypes to object for
``DataFrame.select_dtypes()``.

---
## coerce_indexer_dtype
```python
from cast import coerce_indexer_dtype
```

coerce the indexer input array to the smallest dtype possible

---
## convert_dtypes
```python
from cast import convert_dtypes
```

Convert objects to best possible type, and optionally,
to types supporting ``pd.NA``.

Parameters
----------
input_array : ExtensionArray or np.ndarray
convert_string : bool, default True
    Whether object dtypes should be converted to ``StringDtype()``.
convert_integer : bool, default True
    Whether, if possible, conversion can be done to integer extension types.
convert_boolean : bool, defaults True
    Whether object dtypes should be converted to ``BooleanDtypes()``.
convert_floating : bool, defaults True
    Whether, if possible, conversion can be done to floating extension types.
    If `convert_integer` is also True, preference will be give to integer
    dtypes if the floats can be faithfully casted to integers.
infer_objects : bool, defaults False
    Whether to also infer objects to float/int if possible. Is only hit if the
    object array contains pd.NA.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

Returns
-------
np.dtype, or ExtensionDtype

---
## maybe_infer_to_datetimelike
```python
from cast import maybe_infer_to_datetimelike
```

we might have a array (or single object) that is datetime like,
and no dtype is passed don't change the value unless we find a
datetime/timedelta set

this is pretty strict in that a datetime/timedelta is REQUIRED
in addition to possible nulls/string likes

Parameters
----------
value : np.ndarray[object]

Returns
-------
np.ndarray, DatetimeArray, TimedeltaArray, PeriodArray, or IntervalArray

---
## maybe_cast_to_datetime
```python
from cast import maybe_cast_to_datetime
```

try to cast the array/value to a datetimelike dtype, converting float
nan to iNaT

Caller is responsible for handling ExtensionDtype cases and non dt64/td64
cases.

---
## _ensure_nanosecond_dtype
```python
from cast import _ensure_nanosecond_dtype
```

Convert dtypes with granularity less than nanosecond to nanosecond

>>> _ensure_nanosecond_dtype(np.dtype("M8[us]"))

>>> _ensure_nanosecond_dtype(np.dtype("M8[D]"))
Traceback (most recent call last):
    ...
TypeError: dtype=datetime64[D] is not supported. Supported resolutions are 's', 'ms', 'us', and 'ns'

>>> _ensure_nanosecond_dtype(np.dtype("m8[ps]"))
Traceback (most recent call last):
    ...
TypeError: dtype=timedelta64[ps] is not supported. Supported resolutions are 's', 'ms', 'us', and 'ns'

---
## find_result_type
```python
from cast import find_result_type
```

Find the type/dtype for the result of an operation between objects.

This is similar to find_common_type, but looks at the right object instead
of just its dtype. This can be useful in particular when the right
object does not have a `dtype`.

Parameters
----------
left_dtype : np.dtype or ExtensionDtype
right : Any

Returns
-------
np.dtype or ExtensionDtype

See also
--------
find_common_type
numpy.result_type

---
## common_dtype_categorical_compat
```python
from cast import common_dtype_categorical_compat
```

Update the result of find_common_type to account for NAs in a Categorical.

Parameters
----------
objs : list[np.ndarray | ExtensionArray | Index]
dtype : np.dtype or ExtensionDtype

Returns
-------
np.dtype or ExtensionDtype

---
## np_find_common_type
```python
from cast import np_find_common_type
```

np.find_common_type implementation pre-1.25 deprecation using np.result_type
https://github.com/pandas-dev/pandas/pull/49569#issuecomment-1308300065

Parameters
----------
dtypes : np.dtypes

Returns
-------
np.dtype

---
## find_common_type
```python
from cast import find_common_type
```

Find a common data type among the given dtypes.

Parameters
----------
types : list of dtypes

Returns
-------
pandas extension or numpy dtype

See Also
--------
numpy.find_common_type

---
## construct_2d_arraylike_from_scalar
```python
from cast import construct_2d_arraylike_from_scalar
```



---
## construct_1d_arraylike_from_scalar
```python
from cast import construct_1d_arraylike_from_scalar
```

create a np.ndarray / pandas type of specified shape and dtype
filled with values

Parameters
----------
value : scalar value
length : int
dtype : pandas_dtype or np.dtype

Returns
-------
np.ndarray / pandas type of length, filled with value

---
## _maybe_box_and_unbox_datetimelike
```python
from cast import _maybe_box_and_unbox_datetimelike
```



---
## construct_1d_object_array_from_listlike
```python
from cast import construct_1d_object_array_from_listlike
```

Transform any list-like object in a 1-dimensional numpy array of object
dtype.

Parameters
----------
values : any iterable which has a len()

Raises
------
TypeError
    * If `values` does not have a len()

Returns
-------
1-dimensional numpy array of dtype object

---
## maybe_cast_to_integer_array
```python
from cast import maybe_cast_to_integer_array
```

Takes any dtype and returns the casted version, raising for when data is
incompatible with integer/unsigned integer dtypes.

Parameters
----------
arr : np.ndarray or list
    The array to cast.
dtype : np.dtype
    The integer dtype to cast the array to.

Returns
-------
ndarray
    Array of integer or unsigned integer dtype.

Raises
------
OverflowError : the dtype is incompatible with the data
ValueError : loss of precision has occurred during casting

Examples
--------
If you try to coerce negative values to unsigned integers, it raises:

>>> pd.Series([-1], dtype="uint64")
Traceback (most recent call last):
    ...
OverflowError: Trying to coerce negative values to unsigned integers

Also, if you try to coerce float values to integers, it raises:

>>> maybe_cast_to_integer_array([1, 2, 3.5], dtype=np.dtype("int64"))
Traceback (most recent call last):
    ...
ValueError: Trying to coerce float values to integers

---
## can_hold_element
```python
from cast import can_hold_element
```

Can we do an inplace setitem with this element in an array with this dtype?

Parameters
----------
arr : np.ndarray or ExtensionArray
element : Any

Returns
-------
bool

---
## np_can_hold_element
```python
from cast import np_can_hold_element
```

Raise if we cannot losslessly set this element into an ndarray with this dtype.

Specifically about places where we disagree with numpy.  i.e. there are
cases where numpy will raise in doing the setitem that we do not check
for here, e.g. setting str "X" into a numeric ndarray.

Returns
-------
Any
    The element, potentially cast to the dtype.

Raises
------
ValueError : If we cannot losslessly store this element with this dtype.

---
## _dtype_can_hold_range
```python
from cast import _dtype_can_hold_range
```

_maybe_infer_dtype_type infers to int64 (and float64 for very large endpoints),
but in many cases a range can be held by a smaller integer dtype.
Check if this is one of those cases.

---
## np_can_cast_scalar
```python
from cast import np_can_cast_scalar
```

np.can_cast pandas-equivalent for pre 2-0 behavior that allowed scalar
inference

Parameters
----------
element : Scalar
dtype : np.dtype

Returns
-------
bool

---
## trans
```python
from cast import trans
```



---
## isna
```python
from missing import isna
```

Detect missing values for an array-like object.

This function takes a scalar or array-like object and indicates
whether values are missing (``NaN`` in numeric arrays, ``None`` or ``NaN``
in object arrays, ``NaT`` in datetimelike).

Parameters
----------
obj : scalar or array-like
    Object to check for null or missing values.

Returns
-------
bool or array-like of bool
    For scalar input, returns a scalar boolean.
    For array input, returns an array of boolean indicating whether each
    corresponding element is missing.

See Also
--------
notna : Boolean inverse of pandas.isna.
Series.isna : Detect missing values in a Series.
DataFrame.isna : Detect missing values in a DataFrame.
Index.isna : Detect missing values in an Index.

Examples
--------
Scalar arguments (including strings) result in a scalar boolean.

>>> pd.isna('dog')
False

>>> pd.isna(pd.NA)
True

>>> pd.isna(np.nan)
True

ndarrays result in an ndarray of booleans.

>>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]])
>>> array
array([[ 1., nan,  3.],
       [ 4.,  5., nan]])
>>> pd.isna(array)
array([[False,  True, False],
       [False, False,  True]])

For indexes, an ndarray of booleans is returned.

>>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None,
...                           "2017-07-08"])
>>> index
DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'],
              dtype='datetime64[ns]', freq=None)
>>> pd.isna(index)
array([False, False,  True, False])

For Series and DataFrame, the same type is returned, containing booleans.

>>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df
     0     1    2
0  ant   bee  cat
1  dog  None  fly
>>> pd.isna(df)
       0      1      2
0  False  False  False
1  False   True  False

>>> pd.isna(df[1])
0    False
1     True
Name: 1, dtype: bool

---
## _isna
```python
from missing import _isna
```

Detect missing values, treating None, NaN or NA as null. Infinite
values will also be treated as null if inf_as_na is True.

Parameters
----------
obj: ndarray or object value
    Input array or scalar value.
inf_as_na: bool
    Whether to treat infinity as null.

Returns
-------
boolean ndarray or boolean

---
## _use_inf_as_na
```python
from missing import _use_inf_as_na
```

Option change callback for na/inf behaviour.

Choose which replacement for numpy.isnan / -numpy.isfinite is used.

Parameters
----------
flag: bool
    True means treat None, NaN, INF, -INF as null (old way),
    False means None and NaN are null, but INF, -INF are not null
    (new way).

Notes
-----
This approach to setting global module values is discussed and
approved here:

* https://stackoverflow.com/questions/4859217/
  programmatically-creating-variables-in-python/4859312#4859312

---
## _isna_array
```python
from missing import _isna_array
```

Return an array indicating which values of the input array are NaN / NA.

Parameters
----------
obj: ndarray or ExtensionArray
    The input array whose elements are to be checked.
inf_as_na: bool
    Whether or not to treat infinite values as NA.

Returns
-------
array-like
    Array of boolean values denoting the NA status of each element.

---
## _isna_string_dtype
```python
from missing import _isna_string_dtype
```



---
## _has_record_inf_value
```python
from missing import _has_record_inf_value
```



---
## _isna_recarray_dtype
```python
from missing import _isna_recarray_dtype
```



---
## notna
```python
from missing import notna
```

Detect non-missing values for an array-like object.

This function takes a scalar or array-like object and indicates
whether values are valid (not missing, which is ``NaN`` in numeric
arrays, ``None`` or ``NaN`` in object arrays, ``NaT`` in datetimelike).

Parameters
----------
obj : array-like or object value
    Object to check for *not* null or *non*-missing values.

Returns
-------
bool or array-like of bool
    For scalar input, returns a scalar boolean.
    For array input, returns an array of boolean indicating whether each
    corresponding element is valid.

See Also
--------
isna : Boolean inverse of pandas.notna.
Series.notna : Detect valid values in a Series.
DataFrame.notna : Detect valid values in a DataFrame.
Index.notna : Detect valid values in an Index.

Examples
--------
Scalar arguments (including strings) result in a scalar boolean.

>>> pd.notna('dog')
True

>>> pd.notna(pd.NA)
False

>>> pd.notna(np.nan)
False

ndarrays result in an ndarray of booleans.

>>> array = np.array([[1, np.nan, 3], [4, 5, np.nan]])
>>> array
array([[ 1., nan,  3.],
       [ 4.,  5., nan]])
>>> pd.notna(array)
array([[ True, False,  True],
       [ True,  True, False]])

For indexes, an ndarray of booleans is returned.

>>> index = pd.DatetimeIndex(["2017-07-05", "2017-07-06", None,
...                          "2017-07-08"])
>>> index
DatetimeIndex(['2017-07-05', '2017-07-06', 'NaT', '2017-07-08'],
              dtype='datetime64[ns]', freq=None)
>>> pd.notna(index)
array([ True,  True, False,  True])

For Series and DataFrame, the same type is returned, containing booleans.

>>> df = pd.DataFrame([['ant', 'bee', 'cat'], ['dog', None, 'fly']])
>>> df
     0     1    2
0  ant   bee  cat
1  dog  None  fly
>>> pd.notna(df)
      0      1     2
0  True   True  True
1  True  False  True

>>> pd.notna(df[1])
0     True
1    False
Name: 1, dtype: bool

---
## array_equivalent
```python
from missing import array_equivalent
```

True if two arrays, left and right, have equal non-NaN elements, and NaNs
in corresponding locations.  False otherwise. It is assumed that left and
right are NumPy arrays of the same dtype. The behavior of this function
(particularly with respect to NaNs) is not defined if the dtypes are
different.

Parameters
----------
left, right : ndarrays
strict_nan : bool, default False
    If True, consider NaN and None to be different.
dtype_equal : bool, default False
    Whether `left` and `right` are known to have the same dtype
    according to `is_dtype_equal`. Some methods like `BlockManager.equals`.
    require that the dtypes match. Setting this to ``True`` can improve
    performance, but will give different results for arrays that are
    equal but different dtypes.

Returns
-------
b : bool
    Returns True if the arrays are equivalent.

Examples
--------
>>> array_equivalent(
...     np.array([1, 2, np.nan]),
...     np.array([1, 2, np.nan]))
True
>>> array_equivalent(
...     np.array([1, np.nan, 2]),
...     np.array([1, 2, np.nan]))
False

---
## _array_equivalent_float
```python
from missing import _array_equivalent_float
```



---
## _array_equivalent_datetimelike
```python
from missing import _array_equivalent_datetimelike
```



---
## _array_equivalent_object
```python
from missing import _array_equivalent_object
```



---
## array_equals
```python
from missing import array_equals
```

ExtensionArray-compatible implementation of array_equivalent.

---
## infer_fill_value
```python
from missing import infer_fill_value
```

infer the fill value for the nan/NaT from the provided
scalar/ndarray/list-like if we are a NaT, return the correct dtyped
element to provide proper block construction

---
## construct_1d_array_from_inferred_fill_value
```python
from missing import construct_1d_array_from_inferred_fill_value
```



---
## maybe_fill
```python
from missing import maybe_fill
```

Fill numpy.ndarray with NaN, unless we have a integer or boolean dtype.

---
## na_value_for_dtype
```python
from missing import na_value_for_dtype
```

Return a dtype compat na value

Parameters
----------
dtype : string / dtype
compat : bool, default True

Returns
-------
np.dtype or a pandas dtype

Examples
--------
>>> na_value_for_dtype(np.dtype('int64'))
0
>>> na_value_for_dtype(np.dtype('int64'), compat=False)
nan
>>> na_value_for_dtype(np.dtype('float64'))
nan
>>> na_value_for_dtype(np.dtype('bool'))
False
>>> na_value_for_dtype(np.dtype('datetime64[ns]'))
numpy.datetime64('NaT')

---
## remove_na_arraylike
```python
from missing import remove_na_arraylike
```

Return array-like containing only true/non-NaN values, possibly empty.

---
## is_valid_na_for_dtype
```python
from missing import is_valid_na_for_dtype
```

isna check that excludes incompatible dtypes

Parameters
----------
obj : object
dtype : np.datetime64, np.timedelta64, DatetimeTZDtype, or PeriodDtype

Returns
-------
bool

---
## isna_all
```python
from missing import isna_all
```

Optimized equivalent to isna(arr).all()

---
## _is_nonempty
```python
from concat import _is_nonempty
```



---
## concat_compat
```python
from concat import concat_compat
```

provide concatenation of an array of arrays each of which is a single
'normalized' dtypes (in that for example, if it's object, then it is a
non-datetimelike and provide a combined dtype for the resulting array that
preserves the overall dtype if possible)

Parameters
----------
to_concat : sequence of arrays
axis : axis to provide concatenation
ea_compat_axis : bool, default False
    For ExtensionArray compat, behave as if axis == 1 when determining
    whether to drop empty arrays.

Returns
-------
a single array, preserving the combined dtypes

---
## _get_result_dtype
```python
from concat import _get_result_dtype
```



---
## union_categoricals
```python
from concat import union_categoricals
```

Combine list-like of Categorical-like, unioning categories.

All categories must have the same dtype.

Parameters
----------
to_union : list-like
    Categorical, CategoricalIndex, or Series with dtype='category'.
sort_categories : bool, default False
    If true, resulting categories will be lexsorted, otherwise
    they will be ordered as they appear in the data.
ignore_order : bool, default False
    If true, the ordered attribute of the Categoricals will be ignored.
    Results in an unordered categorical.

Returns
-------
Categorical

Raises
------
TypeError
    - all inputs do not have the same dtype
    - all inputs do not have the same ordered property
    - all inputs are ordered and their categories are not identical
    - sort_categories=True and Categoricals are ordered
ValueError
    Empty list of categoricals passed

Notes
-----
To learn more about categories, see `link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/categorical.html#unioning>`__

Examples
--------
If you want to combine categoricals that do not necessarily have
the same categories, `union_categoricals` will combine a list-like
of categoricals. The new categories will be the union of the
categories being combined.

>>> a = pd.Categorical(["b", "c"])
>>> b = pd.Categorical(["a", "b"])
>>> pd.api.types.union_categoricals([a, b])
['b', 'c', 'a', 'b']
Categories (3, object): ['b', 'c', 'a']

By default, the resulting categories will be ordered as they appear
in the `categories` of the data. If you want the categories to be
lexsorted, use `sort_categories=True` argument.

>>> pd.api.types.union_categoricals([a, b], sort_categories=True)
['b', 'c', 'a', 'b']
Categories (3, object): ['a', 'b', 'c']

`union_categoricals` also works with the case of combining two
categoricals of the same categories and order information (e.g. what
you could also `append` for).

>>> a = pd.Categorical(["a", "b"], ordered=True)
>>> b = pd.Categorical(["a", "b", "a"], ordered=True)
>>> pd.api.types.union_categoricals([a, b])
['a', 'b', 'a', 'b', 'a']
Categories (2, object): ['a' < 'b']

Raises `TypeError` because the categories are ordered and not identical.

>>> a = pd.Categorical(["a", "b"], ordered=True)
>>> b = pd.Categorical(["a", "b", "c"], ordered=True)
>>> pd.api.types.union_categoricals([a, b])
Traceback (most recent call last):
    ...
TypeError: to union ordered Categoricals, all categories must be the same

Ordered categoricals with different categories or orderings can be
combined by using the `ignore_ordered=True` argument.

>>> a = pd.Categorical(["a", "b", "c"], ordered=True)
>>> b = pd.Categorical(["c", "b", "a"], ordered=True)
>>> pd.api.types.union_categoricals([a, b], ignore_order=True)
['a', 'b', 'c', 'c', 'b', 'a']
Categories (3, object): ['a', 'b', 'c']

`union_categoricals` also works with a `CategoricalIndex`, or `Series`
containing categorical data, but note that the resulting array will
always be a plain `Categorical`

>>> a = pd.Series(["b", "c"], dtype='category')
>>> b = pd.Series(["a", "b"], dtype='category')
>>> pd.api.types.union_categoricals([a, b])
['b', 'c', 'a', 'b']
Categories (3, object): ['b', 'c', 'a']

---
## _maybe_unwrap
```python
from concat import _maybe_unwrap
```



---
## create_pandas_abc_type
```python
from generic import create_pandas_abc_type
```



---
## _check
```python
from generic import _check
```



---
## _instancecheck
```python
from generic import _instancecheck
```



---
## _subclasscheck
```python
from generic import _subclasscheck
```



---
## PandasExtensionDtype
```python
from dtypes import PandasExtensionDtype
```

A np.dtype duck-typed class, suitable for holding a custom dtype.

THIS IS NOT A REAL NUMPY DTYPE

---
## CategoricalDtypeType
```python
from dtypes import CategoricalDtypeType
```

the type of CategoricalDtype, this metaclass determines subclass ability

---
## CategoricalDtype
```python
from dtypes import CategoricalDtype
```

Type for categorical data with the categories and orderedness.

Parameters
----------
categories : sequence, optional
    Must be unique, and must not contain any nulls.
    The categories are stored in an Index,
    and if an index is provided the dtype of that index will be used.
ordered : bool or None, default False
    Whether or not this categorical is treated as a ordered categorical.
    None can be used to maintain the ordered value of existing categoricals when
    used in operations that combine categoricals, e.g. astype, and will resolve to
    False if there is no existing ordered to maintain.

Attributes
----------
categories
ordered

Methods
-------
None

See Also
--------
Categorical : Represent a categorical variable in classic R / S-plus fashion.

Notes
-----
This class is useful for specifying the type of a ``Categorical``
independent of the values. See :ref:`categorical.categoricaldtype`
for more.

Examples
--------
>>> t = pd.CategoricalDtype(categories=['b', 'a'], ordered=True)
>>> pd.Series(['a', 'b', 'a', 'c'], dtype=t)
0      a
1      b
2      a
3    NaN
dtype: category
Categories (2, object): ['b' < 'a']

An empty CategoricalDtype with a specific dtype can be created
by providing an empty index. As follows,

>>> pd.CategoricalDtype(pd.DatetimeIndex([])).categories.dtype
dtype('<M8[ns]')

---
## DatetimeTZDtype
```python
from dtypes import DatetimeTZDtype
```

An ExtensionDtype for timezone-aware datetime data.

**This is not an actual numpy dtype**, but a duck type.

Parameters
----------
unit : str, default "ns"
    The precision of the datetime data. Currently limited
    to ``"ns"``.
tz : str, int, or datetime.tzinfo
    The timezone.

Attributes
----------
unit
tz

Methods
-------
None

Raises
------
ZoneInfoNotFoundError
    When the requested timezone cannot be found.

Examples
--------
>>> from zoneinfo import ZoneInfo
>>> pd.DatetimeTZDtype(tz=ZoneInfo('UTC'))
datetime64[ns, UTC]

>>> pd.DatetimeTZDtype(tz=ZoneInfo('Europe/Paris'))
datetime64[ns, Europe/Paris]

---
## PeriodDtype
```python
from dtypes import PeriodDtype
```

An ExtensionDtype for Period data.

**This is not an actual numpy dtype**, but a duck type.

Parameters
----------
freq : str or DateOffset
    The frequency of this PeriodDtype.

Attributes
----------
freq

Methods
-------
None

Examples
--------
>>> pd.PeriodDtype(freq='D')
period[D]

>>> pd.PeriodDtype(freq=pd.offsets.MonthEnd())
period[M]

---
## IntervalDtype
```python
from dtypes import IntervalDtype
```

An ExtensionDtype for Interval data.

**This is not an actual numpy dtype**, but a duck type.

Parameters
----------
subtype : str, np.dtype
    The dtype of the Interval bounds.

Attributes
----------
subtype

Methods
-------
None

Examples
--------
>>> pd.IntervalDtype(subtype='int64', closed='both')
interval[int64, both]

---
## NumpyEADtype
```python
from dtypes import NumpyEADtype
```

A Pandas ExtensionDtype for NumPy dtypes.

This is mostly for internal compatibility, and is not especially
useful on its own.

Parameters
----------
dtype : object
    Object to be converted to a NumPy data type object.

See Also
--------
numpy.dtype

---
## BaseMaskedDtype
```python
from dtypes import BaseMaskedDtype
```

Base class for dtypes for BaseMaskedArray subclasses.

---
## SparseDtype
```python
from dtypes import SparseDtype
```

Dtype for data stored in :class:`SparseArray`.

This dtype implements the pandas ExtensionDtype interface.

Parameters
----------
dtype : str, ExtensionDtype, numpy.dtype, type, default numpy.float64
    The dtype of the underlying array storing the non-fill value values.
fill_value : scalar, optional
    The scalar value not stored in the SparseArray. By default, this
    depends on `dtype`.

    =========== ==========
    dtype       na_value
    =========== ==========
    float       ``np.nan``
    int         ``0``
    bool        ``False``
    datetime64  ``pd.NaT``
    timedelta64 ``pd.NaT``
    =========== ==========

    The default value may be overridden by specifying a `fill_value`.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> ser = pd.Series([1, 0, 0], dtype=pd.SparseDtype(dtype=int, fill_value=0))
>>> ser
0    1
1    0
2    0
dtype: Sparse[int64, 0]
>>> ser.sparse.density
0.3333333333333333

---
## ArrowDtype
```python
from dtypes import ArrowDtype
```

An ExtensionDtype for PyArrow data types.

.. warning::

   ArrowDtype is considered experimental. The implementation and
   parts of the API may change without warning.

While most ``dtype`` arguments can accept the "string"
constructor, e.g. ``"int64[pyarrow]"``, ArrowDtype is useful
if the data type contains parameters like ``pyarrow.timestamp``.

Parameters
----------
pyarrow_dtype : pa.DataType
    An instance of a `pyarrow.DataType <https://arrow.apache.org/docs/python/api/datatypes.html#factory-functions>`__.

Attributes
----------
pyarrow_dtype

Methods
-------
None

Returns
-------
ArrowDtype

Examples
--------
>>> import pyarrow as pa
>>> pd.ArrowDtype(pa.int64())
int64[pyarrow]

Types with parameters must be constructed with ArrowDtype.

>>> pd.ArrowDtype(pa.timestamp("s", tz="America/New_York"))
timestamp[s, tz=America/New_York][pyarrow]
>>> pd.ArrowDtype(pa.list_(pa.int64()))
list<item: int64>[pyarrow]

---
## __getstate__
```python
from dtypes import __getstate__
```



---
## reset_cache
```python
from dtypes import reset_cache
```

clear the cache

---
## _from_fastpath
```python
from dtypes import _from_fastpath
```



---
## _from_categorical_dtype
```python
from dtypes import _from_categorical_dtype
```



---
## _from_values_or_dtype
```python
from dtypes import _from_values_or_dtype
```

Construct dtype from the input parameters used in :class:`Categorical`.

This constructor method specifically does not do the factorization
step, if that is needed to find the categories. This constructor may
therefore return ``CategoricalDtype(categories=None, ordered=None)``,
which may not be useful. Additional steps may therefore have to be
taken to create the final dtype.

The return dtype is specified from the inputs in this prioritized
order:
1. if dtype is a CategoricalDtype, return dtype
2. if dtype is the string 'category', create a CategoricalDtype from
   the supplied categories and ordered parameters, and return that.
3. if values is a categorical, use value.dtype, but override it with
   categories and ordered if either/both of those are not None.
4. if dtype is None and values is not a categorical, construct the
   dtype from categories and ordered, even if either of those is None.

Parameters
----------
values : list-like, optional
    The list-like must be 1-dimensional.
categories : list-like, optional
    Categories for the CategoricalDtype.
ordered : bool, optional
    Designating if the categories are ordered.
dtype : CategoricalDtype or the string "category", optional
    If ``CategoricalDtype``, cannot be used together with
    `categories` or `ordered`.

Returns
-------
CategoricalDtype

Examples
--------
>>> pd.CategoricalDtype._from_values_or_dtype()
CategoricalDtype(categories=None, ordered=None, categories_dtype=None)
>>> pd.CategoricalDtype._from_values_or_dtype(
...     categories=['a', 'b'], ordered=True
... )
CategoricalDtype(categories=['a', 'b'], ordered=True, categories_dtype=object)
>>> dtype1 = pd.CategoricalDtype(['a', 'b'], ordered=True)
>>> dtype2 = pd.CategoricalDtype(['x', 'y'], ordered=False)
>>> c = pd.Categorical([0, 1], dtype=dtype1)
>>> pd.CategoricalDtype._from_values_or_dtype(
...     c, ['x', 'y'], ordered=True, dtype=dtype2
... )
Traceback (most recent call last):
    ...
ValueError: Cannot specify `categories` or `ordered` together with
`dtype`.

The supplied dtype takes precedence over values' dtype:

>>> pd.CategoricalDtype._from_values_or_dtype(c, dtype=dtype2)
CategoricalDtype(categories=['x', 'y'], ordered=False, categories_dtype=object)

---
## construct_from_string
```python
from dtypes import construct_from_string
```

Construct this type from a string.

Parameters
----------
string : str
    string should follow the format f"{pyarrow_type}[pyarrow]"
    e.g. int64[pyarrow]

---
## _finalize
```python
from dtypes import _finalize
```



---
## __setstate__
```python
from dtypes import __setstate__
```



---
## _hash_categories
```python
from dtypes import _hash_categories
```



---
## construct_array_type
```python
from dtypes import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## validate_ordered
```python
from dtypes import validate_ordered
```

Validates that we have a valid ordered parameter. If
it is not a boolean, a TypeError will be raised.

Parameters
----------
ordered : object
    The parameter to be verified.

Raises
------
TypeError
    If 'ordered' is not a boolean.

---
## validate_categories
```python
from dtypes import validate_categories
```

Validates that we have good categories

Parameters
----------
categories : array-like
fastpath : bool
    Whether to skip nan and uniqueness checks

Returns
-------
categories : Index

---
## update_dtype
```python
from dtypes import update_dtype
```

Convert the SparseDtype to a new dtype.

This takes care of converting the ``fill_value``.

Parameters
----------
dtype : Union[str, numpy.dtype, SparseDtype]
    The new dtype to use.

    * For a SparseDtype, it is simply returned
    * For a NumPy dtype (or str), the current fill value
      is converted to the new dtype, and a SparseDtype
      with `dtype` and the new fill value is returned.

Returns
-------
SparseDtype
    A new SparseDtype with the correct `dtype` and fill value
    for that `dtype`.

Raises
------
ValueError
    When the current fill value cannot be converted to the
    new `dtype` (e.g. trying to convert ``np.nan`` to an
    integer dtype).


Examples
--------
>>> SparseDtype(int, 0).update_dtype(float)
Sparse[float64, 0.0]

>>> SparseDtype(int, 1).update_dtype(SparseDtype(float, np.nan))
Sparse[float64, nan]

---
## categories
```python
from dtypes import categories
```

An ``Index`` containing the unique categories allowed.

Examples
--------
>>> cat_type = pd.CategoricalDtype(categories=['a', 'b'], ordered=True)
>>> cat_type.categories
Index(['a', 'b'], dtype='object')

---
## ordered
```python
from dtypes import ordered
```

Whether the categories have an ordered relationship.

Examples
--------
>>> cat_type = pd.CategoricalDtype(categories=['a', 'b'], ordered=True)
>>> cat_type.ordered
True

>>> cat_type = pd.CategoricalDtype(categories=['a', 'b'], ordered=False)
>>> cat_type.ordered
False

---
## _is_boolean
```python
from dtypes import _is_boolean
```

Whether this dtype should be considered boolean.

---
## _get_common_dtype
```python
from dtypes import _get_common_dtype
```



---
## index_class
```python
from dtypes import index_class
```



---
## na_value
```python
from dtypes import na_value
```



---
## base
```python
from dtypes import base
```



---
## str
```python
from dtypes import str
```



---
## _creso
```python
from dtypes import _creso
```

The NPY_DATETIMEUNIT corresponding to this dtype's resolution.

---
## unit
```python
from dtypes import unit
```

The precision of the datetime data.

Examples
--------
>>> from zoneinfo import ZoneInfo
>>> dtype = pd.DatetimeTZDtype(tz=ZoneInfo('America/Los_Angeles'))
>>> dtype.unit
'ns'

---
## tz
```python
from dtypes import tz
```

The timezone.

Examples
--------
>>> from zoneinfo import ZoneInfo
>>> dtype = pd.DatetimeTZDtype(tz=ZoneInfo('America/Los_Angeles'))
>>> dtype.tz
zoneinfo.ZoneInfo(key='America/Los_Angeles')

---
## __str__
```python
from dtypes import __str__
```



---
## name
```python
from dtypes import name
```

A string identifying the data type.

---
## __from_arrow__
```python
from dtypes import __from_arrow__
```

Construct IntegerArray/FloatingArray from pyarrow Array/ChunkedArray.

---
## __new__
```python
from dtypes import __new__
```

Parameters
----------
freq : PeriodDtype, BaseOffset, or string

---
## __reduce__
```python
from dtypes import __reduce__
```



---
## freq
```python
from dtypes import freq
```

The frequency object of this PeriodDtype.

Examples
--------
>>> dtype = pd.PeriodDtype(freq='D')
>>> dtype.freq
<Day>

---
## _parse_dtype_strict
```python
from dtypes import _parse_dtype_strict
```



---
## __ne__
```python
from dtypes import __ne__
```



---
## is_dtype
```python
from dtypes import is_dtype
```



---
## _can_hold_na
```python
from dtypes import _can_hold_na
```



---
## closed
```python
from dtypes import closed
```



---
## subtype
```python
from dtypes import subtype
```



---
## type
```python
from dtypes import type
```

Returns associated scalar type.

---
## numpy_dtype
```python
from dtypes import numpy_dtype
```

Return an instance of the related numpy dtype

---
## _is_numeric
```python
from dtypes import _is_numeric
```

Whether columns with this dtype should be considered numeric.

---
## kind
```python
from dtypes import kind
```



---
## itemsize
```python
from dtypes import itemsize
```

Return the number of bytes in this dtype

---
## from_numpy_dtype
```python
from dtypes import from_numpy_dtype
```

Construct the MaskedDtype corresponding to the given numpy dtype.

---
## fill_value
```python
from dtypes import fill_value
```

The fill value of the array.

Converting the SparseArray to a dense ndarray will fill the
array with this value.

.. warning::

   It's possible to end up with a SparseArray that has ``fill_value``
   values in ``sp_values``. This can occur, for example, when setting
   ``SparseArray.fill_value`` directly.

---
## _check_fill_value
```python
from dtypes import _check_fill_value
```



---
## _is_na_fill_value
```python
from dtypes import _is_na_fill_value
```



---
## _parse_subtype
```python
from dtypes import _parse_subtype
```

Parse a string to get the subtype

Parameters
----------
dtype : str
    A string like

    * Sparse[subtype]
    * Sparse[subtype, fill_value]

Returns
-------
subtype : str

Raises
------
ValueError
    When the subtype cannot be extracted.

---
## _subtype_with_str
```python
from dtypes import _subtype_with_str
```

Whether the SparseDtype's subtype should be considered ``str``.

Typically, pandas will store string data in an object-dtype array.
When converting values to a dtype, e.g. in ``.astype``, we need to
be more specific, we need the actual underlying type.

Returns
-------
>>> SparseDtype(int, 1)._subtype_with_str
dtype('int64')

>>> SparseDtype(object, 1)._subtype_with_str
dtype('O')

>>> dtype = SparseDtype(str, '')
>>> dtype.subtype
dtype('O')

>>> dtype._subtype_with_str
<class 'str'>

---
## _parse_temporal_dtype_string
```python
from dtypes import _parse_temporal_dtype_string
```

Construct a temporal ArrowDtype from string.

---
## ensure_str
```python
from common import ensure_str
```

Ensure that bytes and non-strings get converted into ``str`` objects.

---
## ensure_python_int
```python
from common import ensure_python_int
```

Ensure that a value is a python int.

Parameters
----------
value: int or numpy.integer

Returns
-------
int

Raises
------
TypeError: if the value isn't an int or can't be converted to one.

---
## classes
```python
from common import classes
```

Evaluate if the tipo is a subclass of the klasses.

---
## _classes_and_not_datetimelike
```python
from common import _classes_and_not_datetimelike
```

Evaluate if the tipo is a subclass of the klasses
and not a datetimelike.

---
## is_object_dtype
```python
from common import is_object_dtype
```

Check whether an array-like or dtype is of the object dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the object dtype.

Examples
--------
>>> from pandas.api.types import is_object_dtype
>>> is_object_dtype(object)
True
>>> is_object_dtype(int)
False
>>> is_object_dtype(np.array([], dtype=object))
True
>>> is_object_dtype(np.array([], dtype=int))
False
>>> is_object_dtype([1, 2, 3])
False

---
## is_sparse
```python
from common import is_sparse
```

Check whether an array-like is a 1-D pandas sparse array.

.. deprecated:: 2.1.0
    Use isinstance(dtype, pd.SparseDtype) instead.

Check that the one-dimensional array-like is a pandas sparse array.
Returns True if it is a pandas sparse array, not another type of
sparse array.

Parameters
----------
arr : array-like
    Array-like to check.

Returns
-------
bool
    Whether or not the array-like is a pandas sparse array.

Examples
--------
Returns `True` if the parameter is a 1-D pandas sparse array.

>>> from pandas.api.types import is_sparse
>>> is_sparse(pd.arrays.SparseArray([0, 0, 1, 0]))
True
>>> is_sparse(pd.Series(pd.arrays.SparseArray([0, 0, 1, 0])))
True

Returns `False` if the parameter is not sparse.

>>> is_sparse(np.array([0, 0, 1, 0]))
False
>>> is_sparse(pd.Series([0, 1, 0, 0]))
False

Returns `False` if the parameter is not a pandas sparse array.

>>> from scipy.sparse import bsr_matrix
>>> is_sparse(bsr_matrix([0, 1, 0, 0]))
False

Returns `False` if the parameter has more than one dimension.

---
## is_scipy_sparse
```python
from common import is_scipy_sparse
```

Check whether an array-like is a scipy.sparse.spmatrix instance.

Parameters
----------
arr : array-like
    The array-like to check.

Returns
-------
boolean
    Whether or not the array-like is a scipy.sparse.spmatrix instance.

Notes
-----
If scipy is not installed, this function will always return False.

Examples
--------
>>> from scipy.sparse import bsr_matrix
>>> is_scipy_sparse(bsr_matrix([1, 2, 3]))
True
>>> is_scipy_sparse(pd.arrays.SparseArray([1, 2, 3]))
False

---
## is_datetime64_dtype
```python
from common import is_datetime64_dtype
```

Check whether an array-like or dtype is of the datetime64 dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the datetime64 dtype.

Examples
--------
>>> from pandas.api.types import is_datetime64_dtype
>>> is_datetime64_dtype(object)
False
>>> is_datetime64_dtype(np.datetime64)
True
>>> is_datetime64_dtype(np.array([], dtype=int))
False
>>> is_datetime64_dtype(np.array([], dtype=np.datetime64))
True
>>> is_datetime64_dtype([1, 2, 3])
False

---
## is_datetime64tz_dtype
```python
from common import is_datetime64tz_dtype
```

Check whether an array-like or dtype is of a DatetimeTZDtype dtype.

.. deprecated:: 2.1.0
    Use isinstance(dtype, pd.DatetimeTZDtype) instead.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of a DatetimeTZDtype dtype.

Examples
--------
>>> from pandas.api.types import is_datetime64tz_dtype
>>> is_datetime64tz_dtype(object)
False
>>> is_datetime64tz_dtype([1, 2, 3])
False
>>> is_datetime64tz_dtype(pd.DatetimeIndex([1, 2, 3]))  # tz-naive
False
>>> is_datetime64tz_dtype(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
True

>>> from pandas.core.dtypes.dtypes import DatetimeTZDtype
>>> dtype = DatetimeTZDtype("ns", tz="US/Eastern")
>>> s = pd.Series([], dtype=dtype)
>>> is_datetime64tz_dtype(dtype)
True
>>> is_datetime64tz_dtype(s)
True

---
## is_timedelta64_dtype
```python
from common import is_timedelta64_dtype
```

Check whether an array-like or dtype is of the timedelta64 dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the timedelta64 dtype.

Examples
--------
>>> from pandas.core.dtypes.common import is_timedelta64_dtype
>>> is_timedelta64_dtype(object)
False
>>> is_timedelta64_dtype(np.timedelta64)
True
>>> is_timedelta64_dtype([1, 2, 3])
False
>>> is_timedelta64_dtype(pd.Series([], dtype="timedelta64[ns]"))
True
>>> is_timedelta64_dtype('0 days')
False

---
## is_period_dtype
```python
from common import is_period_dtype
```

Check whether an array-like or dtype is of the Period dtype.

.. deprecated:: 2.2.0
    Use isinstance(dtype, pd.Period) instead.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the Period dtype.

Examples
--------
>>> from pandas.core.dtypes.common import is_period_dtype
>>> is_period_dtype(object)
False
>>> is_period_dtype(pd.PeriodDtype(freq="D"))
True
>>> is_period_dtype([1, 2, 3])
False
>>> is_period_dtype(pd.Period("2017-01-01"))
False
>>> is_period_dtype(pd.PeriodIndex([], freq="Y"))
True

---
## is_interval_dtype
```python
from common import is_interval_dtype
```

Check whether an array-like or dtype is of the Interval dtype.

.. deprecated:: 2.2.0
    Use isinstance(dtype, pd.IntervalDtype) instead.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the Interval dtype.

Examples
--------
>>> from pandas.core.dtypes.common import is_interval_dtype
>>> is_interval_dtype(object)
False
>>> is_interval_dtype(pd.IntervalDtype())
True
>>> is_interval_dtype([1, 2, 3])
False
>>>
>>> interval = pd.Interval(1, 2, closed="right")
>>> is_interval_dtype(interval)
False
>>> is_interval_dtype(pd.IntervalIndex([interval]))
True

---
## is_categorical_dtype
```python
from common import is_categorical_dtype
```

Check whether an array-like or dtype is of the Categorical dtype.

.. deprecated:: 2.2.0
    Use isinstance(dtype, pd.CategoricalDtype) instead.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype to check.

Returns
-------
boolean
    Whether or not the array-like or dtype is of the Categorical dtype.

Examples
--------
>>> from pandas.api.types import is_categorical_dtype
>>> from pandas import CategoricalDtype
>>> is_categorical_dtype(object)
False
>>> is_categorical_dtype(CategoricalDtype())
True
>>> is_categorical_dtype([1, 2, 3])
False
>>> is_categorical_dtype(pd.Categorical([1, 2, 3]))
True
>>> is_categorical_dtype(pd.CategoricalIndex([1, 2, 3]))
True

---
## is_string_or_object_np_dtype
```python
from common import is_string_or_object_np_dtype
```

Faster alternative to is_string_dtype, assumes we have a np.dtype object.

---
## is_string_dtype
```python
from common import is_string_dtype
```

Check whether the provided array or dtype is of the string dtype.

If an array is passed with an object dtype, the elements must be
inferred as strings.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of the string dtype.

Examples
--------
>>> from pandas.api.types import is_string_dtype
>>> is_string_dtype(str)
True
>>> is_string_dtype(object)
True
>>> is_string_dtype(int)
False
>>> is_string_dtype(np.array(['a', 'b']))
True
>>> is_string_dtype(pd.Series([1, 2]))
False
>>> is_string_dtype(pd.Series([1, 2], dtype=object))
False

---
## is_dtype_equal
```python
from common import is_dtype_equal
```

Check if two dtypes are equal.

Parameters
----------
source : The first dtype to compare
target : The second dtype to compare

Returns
-------
boolean
    Whether or not the two dtypes are equal.

Examples
--------
>>> is_dtype_equal(int, float)
False
>>> is_dtype_equal("int", int)
True
>>> is_dtype_equal(object, "category")
False
>>> is_dtype_equal(CategoricalDtype(), "category")
True
>>> is_dtype_equal(DatetimeTZDtype(tz="UTC"), "datetime64")
False

---
## is_integer_dtype
```python
from common import is_integer_dtype
```

Check whether the provided array or dtype is of an integer dtype.

Unlike in `is_any_int_dtype`, timedelta64 instances will return False.

The nullable Integer dtypes (e.g. pandas.Int64Dtype) are also considered
as integer by this function.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of an integer dtype and
    not an instance of timedelta64.

Examples
--------
>>> from pandas.api.types import is_integer_dtype
>>> is_integer_dtype(str)
False
>>> is_integer_dtype(int)
True
>>> is_integer_dtype(float)
False
>>> is_integer_dtype(np.uint64)
True
>>> is_integer_dtype('int8')
True
>>> is_integer_dtype('Int8')
True
>>> is_integer_dtype(pd.Int8Dtype)
True
>>> is_integer_dtype(np.datetime64)
False
>>> is_integer_dtype(np.timedelta64)
False
>>> is_integer_dtype(np.array(['a', 'b']))
False
>>> is_integer_dtype(pd.Series([1, 2]))
True
>>> is_integer_dtype(np.array([], dtype=np.timedelta64))
False
>>> is_integer_dtype(pd.Index([1, 2.]))  # float
False

---
## is_signed_integer_dtype
```python
from common import is_signed_integer_dtype
```

Check whether the provided array or dtype is of a signed integer dtype.

Unlike in `is_any_int_dtype`, timedelta64 instances will return False.

The nullable Integer dtypes (e.g. pandas.Int64Dtype) are also considered
as integer by this function.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a signed integer dtype
    and not an instance of timedelta64.

Examples
--------
>>> from pandas.core.dtypes.common import is_signed_integer_dtype
>>> is_signed_integer_dtype(str)
False
>>> is_signed_integer_dtype(int)
True
>>> is_signed_integer_dtype(float)
False
>>> is_signed_integer_dtype(np.uint64)  # unsigned
False
>>> is_signed_integer_dtype('int8')
True
>>> is_signed_integer_dtype('Int8')
True
>>> is_signed_integer_dtype(pd.Int8Dtype)
True
>>> is_signed_integer_dtype(np.datetime64)
False
>>> is_signed_integer_dtype(np.timedelta64)
False
>>> is_signed_integer_dtype(np.array(['a', 'b']))
False
>>> is_signed_integer_dtype(pd.Series([1, 2]))
True
>>> is_signed_integer_dtype(np.array([], dtype=np.timedelta64))
False
>>> is_signed_integer_dtype(pd.Index([1, 2.]))  # float
False
>>> is_signed_integer_dtype(np.array([1, 2], dtype=np.uint32))  # unsigned
False

---
## is_unsigned_integer_dtype
```python
from common import is_unsigned_integer_dtype
```

Check whether the provided array or dtype is of an unsigned integer dtype.

The nullable Integer dtypes (e.g. pandas.UInt64Dtype) are also
considered as integer by this function.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of an unsigned integer dtype.

Examples
--------
>>> from pandas.api.types import is_unsigned_integer_dtype
>>> is_unsigned_integer_dtype(str)
False
>>> is_unsigned_integer_dtype(int)  # signed
False
>>> is_unsigned_integer_dtype(float)
False
>>> is_unsigned_integer_dtype(np.uint64)
True
>>> is_unsigned_integer_dtype('uint8')
True
>>> is_unsigned_integer_dtype('UInt8')
True
>>> is_unsigned_integer_dtype(pd.UInt8Dtype)
True
>>> is_unsigned_integer_dtype(np.array(['a', 'b']))
False
>>> is_unsigned_integer_dtype(pd.Series([1, 2]))  # signed
False
>>> is_unsigned_integer_dtype(pd.Index([1, 2.]))  # float
False
>>> is_unsigned_integer_dtype(np.array([1, 2], dtype=np.uint32))
True

---
## is_int64_dtype
```python
from common import is_int64_dtype
```

Check whether the provided array or dtype is of the int64 dtype.

.. deprecated:: 2.1.0

   is_int64_dtype is deprecated and will be removed in a future
   version. Use dtype == np.int64 instead.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of the int64 dtype.

Notes
-----
Depending on system architecture, the return value of `is_int64_dtype(
int)` will be True if the OS uses 64-bit integers and False if the OS
uses 32-bit integers.

Examples
--------
>>> from pandas.api.types import is_int64_dtype
>>> is_int64_dtype(str)  # doctest: +SKIP
False
>>> is_int64_dtype(np.int32)  # doctest: +SKIP
False
>>> is_int64_dtype(np.int64)  # doctest: +SKIP
True
>>> is_int64_dtype('int8')  # doctest: +SKIP
False
>>> is_int64_dtype('Int8')  # doctest: +SKIP
False
>>> is_int64_dtype(pd.Int64Dtype)  # doctest: +SKIP
True
>>> is_int64_dtype(float)  # doctest: +SKIP
False
>>> is_int64_dtype(np.uint64)  # unsigned  # doctest: +SKIP
False
>>> is_int64_dtype(np.array(['a', 'b']))  # doctest: +SKIP
False
>>> is_int64_dtype(np.array([1, 2], dtype=np.int64))  # doctest: +SKIP
True
>>> is_int64_dtype(pd.Index([1, 2.]))  # float  # doctest: +SKIP
False
>>> is_int64_dtype(np.array([1, 2], dtype=np.uint32))  # unsigned  # doctest: +SKIP
False

---
## is_datetime64_any_dtype
```python
from common import is_datetime64_any_dtype
```

Check whether the provided array or dtype is of the datetime64 dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
bool
    Whether or not the array or dtype is of the datetime64 dtype.

Examples
--------
>>> from pandas.api.types import is_datetime64_any_dtype
>>> from pandas.core.dtypes.dtypes import DatetimeTZDtype
>>> is_datetime64_any_dtype(str)
False
>>> is_datetime64_any_dtype(int)
False
>>> is_datetime64_any_dtype(np.datetime64)  # can be tz-naive
True
>>> is_datetime64_any_dtype(DatetimeTZDtype("ns", "US/Eastern"))
True
>>> is_datetime64_any_dtype(np.array(['a', 'b']))
False
>>> is_datetime64_any_dtype(np.array([1, 2]))
False
>>> is_datetime64_any_dtype(np.array([], dtype="datetime64[ns]"))
True
>>> is_datetime64_any_dtype(pd.DatetimeIndex([1, 2, 3], dtype="datetime64[ns]"))
True

---
## is_datetime64_ns_dtype
```python
from common import is_datetime64_ns_dtype
```

Check whether the provided array or dtype is of the datetime64[ns] dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
bool
    Whether or not the array or dtype is of the datetime64[ns] dtype.

Examples
--------
>>> from pandas.api.types import is_datetime64_ns_dtype
>>> from pandas.core.dtypes.dtypes import DatetimeTZDtype
>>> is_datetime64_ns_dtype(str)
False
>>> is_datetime64_ns_dtype(int)
False
>>> is_datetime64_ns_dtype(np.datetime64)  # no unit
False
>>> is_datetime64_ns_dtype(DatetimeTZDtype("ns", "US/Eastern"))
True
>>> is_datetime64_ns_dtype(np.array(['a', 'b']))
False
>>> is_datetime64_ns_dtype(np.array([1, 2]))
False
>>> is_datetime64_ns_dtype(np.array([], dtype="datetime64"))  # no unit
False
>>> is_datetime64_ns_dtype(np.array([], dtype="datetime64[ps]"))  # wrong unit
False
>>> is_datetime64_ns_dtype(pd.DatetimeIndex([1, 2, 3], dtype="datetime64[ns]"))
True

---
## is_timedelta64_ns_dtype
```python
from common import is_timedelta64_ns_dtype
```

Check whether the provided array or dtype is of the timedelta64[ns] dtype.

This is a very specific dtype, so generic ones like `np.timedelta64`
will return False if passed into this function.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of the timedelta64[ns] dtype.

Examples
--------
>>> from pandas.core.dtypes.common import is_timedelta64_ns_dtype
>>> is_timedelta64_ns_dtype(np.dtype('m8[ns]'))
True
>>> is_timedelta64_ns_dtype(np.dtype('m8[ps]'))  # Wrong frequency
False
>>> is_timedelta64_ns_dtype(np.array([1, 2], dtype='m8[ns]'))
True
>>> is_timedelta64_ns_dtype(np.array([1, 2], dtype=np.timedelta64))
False

---
## is_numeric_v_string_like
```python
from common import is_numeric_v_string_like
```

Check if we are comparing a string-like object to a numeric ndarray.
NumPy doesn't like to compare such objects, especially numeric arrays
and scalar string-likes.

Parameters
----------
a : array-like, scalar
    The first object to check.
b : array-like, scalar
    The second object to check.

Returns
-------
boolean
    Whether we return a comparing a string-like object to a numeric array.

Examples
--------
>>> is_numeric_v_string_like(np.array([1]), "foo")
True
>>> is_numeric_v_string_like(np.array([1, 2]), np.array(["foo"]))
True
>>> is_numeric_v_string_like(np.array(["foo"]), np.array([1, 2]))
True
>>> is_numeric_v_string_like(np.array([1]), np.array([2]))
False
>>> is_numeric_v_string_like(np.array(["foo"]), np.array(["foo"]))
False

---
## needs_i8_conversion
```python
from common import needs_i8_conversion
```

Check whether the dtype should be converted to int64.

Dtype "needs" such a conversion if the dtype is of a datetime-like dtype

Parameters
----------
dtype : np.dtype, ExtensionDtype, or None

Returns
-------
boolean
    Whether or not the dtype should be converted to int64.

Examples
--------
>>> needs_i8_conversion(str)
False
>>> needs_i8_conversion(np.int64)
False
>>> needs_i8_conversion(np.datetime64)
False
>>> needs_i8_conversion(np.dtype(np.datetime64))
True
>>> needs_i8_conversion(np.array(['a', 'b']))
False
>>> needs_i8_conversion(pd.Series([1, 2]))
False
>>> needs_i8_conversion(pd.Series([], dtype="timedelta64[ns]"))
False
>>> needs_i8_conversion(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern"))
False
>>> needs_i8_conversion(pd.DatetimeIndex([1, 2, 3], tz="US/Eastern").dtype)
True

---
## is_numeric_dtype
```python
from common import is_numeric_dtype
```

Check whether the provided array or dtype is of a numeric dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a numeric dtype.

Examples
--------
>>> from pandas.api.types import is_numeric_dtype
>>> is_numeric_dtype(str)
False
>>> is_numeric_dtype(int)
True
>>> is_numeric_dtype(float)
True
>>> is_numeric_dtype(np.uint64)
True
>>> is_numeric_dtype(np.datetime64)
False
>>> is_numeric_dtype(np.timedelta64)
False
>>> is_numeric_dtype(np.array(['a', 'b']))
False
>>> is_numeric_dtype(pd.Series([1, 2]))
True
>>> is_numeric_dtype(pd.Index([1, 2.]))
True
>>> is_numeric_dtype(np.array([], dtype=np.timedelta64))
False

---
## is_any_real_numeric_dtype
```python
from common import is_any_real_numeric_dtype
```

Check whether the provided array or dtype is of a real number dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a real number dtype.

Examples
--------
>>> from pandas.api.types import is_any_real_numeric_dtype
>>> is_any_real_numeric_dtype(int)
True
>>> is_any_real_numeric_dtype(float)
True
>>> is_any_real_numeric_dtype(object)
False
>>> is_any_real_numeric_dtype(str)
False
>>> is_any_real_numeric_dtype(complex(1, 2))
False
>>> is_any_real_numeric_dtype(bool)
False

---
## is_float_dtype
```python
from common import is_float_dtype
```

Check whether the provided array or dtype is of a float dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a float dtype.

Examples
--------
>>> from pandas.api.types import is_float_dtype
>>> is_float_dtype(str)
False
>>> is_float_dtype(int)
False
>>> is_float_dtype(float)
True
>>> is_float_dtype(np.array(['a', 'b']))
False
>>> is_float_dtype(pd.Series([1, 2]))
False
>>> is_float_dtype(pd.Index([1, 2.]))
True

---
## is_bool_dtype
```python
from common import is_bool_dtype
```

Check whether the provided array or dtype is of a boolean dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a boolean dtype.

Notes
-----
An ExtensionArray is considered boolean when the ``_is_boolean``
attribute is set to True.

Examples
--------
>>> from pandas.api.types import is_bool_dtype
>>> is_bool_dtype(str)
False
>>> is_bool_dtype(int)
False
>>> is_bool_dtype(bool)
True
>>> is_bool_dtype(np.bool_)
True
>>> is_bool_dtype(np.array(['a', 'b']))
False
>>> is_bool_dtype(pd.Series([1, 2]))
False
>>> is_bool_dtype(np.array([True, False]))
True
>>> is_bool_dtype(pd.Categorical([True, False]))
True
>>> is_bool_dtype(pd.arrays.SparseArray([True, False]))
True

---
## is_1d_only_ea_dtype
```python
from common import is_1d_only_ea_dtype
```

Analogue to is_extension_array_dtype but excluding DatetimeTZDtype.

---
## is_extension_array_dtype
```python
from common import is_extension_array_dtype
```

Check if an object is a pandas extension array type.

See the :ref:`Use Guide <extending.extension-types>` for more.

Parameters
----------
arr_or_dtype : object
    For array-like input, the ``.dtype`` attribute will
    be extracted.

Returns
-------
bool
    Whether the `arr_or_dtype` is an extension array type.

Notes
-----
This checks whether an object implements the pandas extension
array interface. In pandas, this includes:

* Categorical
* Sparse
* Interval
* Period
* DatetimeArray
* TimedeltaArray

Third-party libraries may implement arrays or types satisfying
this interface as well.

Examples
--------
>>> from pandas.api.types import is_extension_array_dtype
>>> arr = pd.Categorical(['a', 'b'])
>>> is_extension_array_dtype(arr)
True
>>> is_extension_array_dtype(arr.dtype)
True

>>> arr = np.array(['a', 'b'])
>>> is_extension_array_dtype(arr.dtype)
False

---
## is_ea_or_datetimelike_dtype
```python
from common import is_ea_or_datetimelike_dtype
```

Check for ExtensionDtype, datetime64 dtype, or timedelta64 dtype.

Notes
-----
Checks only for dtype objects, not dtype-castable strings or types.

---
## is_complex_dtype
```python
from common import is_complex_dtype
```

Check whether the provided array or dtype is of a complex dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array or dtype to check.

Returns
-------
boolean
    Whether or not the array or dtype is of a complex dtype.

Examples
--------
>>> from pandas.api.types import is_complex_dtype
>>> is_complex_dtype(str)
False
>>> is_complex_dtype(int)
False
>>> is_complex_dtype(np.complex128)
True
>>> is_complex_dtype(np.array(['a', 'b']))
False
>>> is_complex_dtype(pd.Series([1, 2]))
False
>>> is_complex_dtype(np.array([1 + 1j, 5]))
True

---
## _is_dtype
```python
from common import _is_dtype
```

Return true if the condition is satisfied for the arr_or_dtype.

Parameters
----------
arr_or_dtype : array-like, str, np.dtype, or ExtensionArrayType
    The array-like or dtype object whose dtype we want to extract.
condition : callable[Union[np.dtype, ExtensionDtype]]

Returns
-------
bool

---
## _get_dtype
```python
from common import _get_dtype
```

Get the dtype instance associated with an array
or dtype object.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype object whose dtype we want to extract.

Returns
-------
obj_dtype : The extract dtype instance from the
            passed in array or dtype object.

Raises
------
TypeError : The passed in object is None.

---
## _is_dtype_type
```python
from common import _is_dtype_type
```

Return true if the condition is satisfied for the arr_or_dtype.

Parameters
----------
arr_or_dtype : array-like or dtype
    The array-like or dtype object whose dtype we want to extract.
condition : callable[Union[np.dtype, ExtensionDtypeType]]

Returns
-------
bool : if the condition is satisfied for the arr_or_dtype

---
## infer_dtype_from_object
```python
from common import infer_dtype_from_object
```

Get a numpy dtype.type-style object for a dtype object.

This methods also includes handling of the datetime64[ns] and
datetime64[ns, TZ] objects.

If no dtype can be found, we return ``object``.

Parameters
----------
dtype : dtype, type
    The dtype object whose numpy dtype.type-style
    object we want to extract.

Returns
-------
type

---
## _validate_date_like_dtype
```python
from common import _validate_date_like_dtype
```

Check whether the dtype is a date-like dtype. Raises an error if invalid.

Parameters
----------
dtype : dtype, type
    The dtype to check.

Raises
------
TypeError : The dtype could not be casted to a date-like dtype.
ValueError : The dtype is an illegal date-like dtype (e.g. the
             frequency provided is too specific)

---
## validate_all_hashable
```python
from common import validate_all_hashable
```

Return None if all args are hashable, else raise a TypeError.

Parameters
----------
*args
    Arguments to validate.
error_name : str, optional
    The name to use if error

Raises
------
TypeError : If an argument is not hashable

Returns
-------
None

---
## pandas_dtype
```python
from common import pandas_dtype
```

Convert input into a pandas only dtype object or a numpy dtype object.

Parameters
----------
dtype : object to be converted

Returns
-------
np.dtype or a pandas dtype

Raises
------
TypeError if not a dtype

Examples
--------
>>> pd.api.types.pandas_dtype(int)
dtype('int64')

---
## is_all_strings
```python
from common import is_all_strings
```

Check if this is an array of strings that we should try parsing.

Includes object-dtype ndarray containing all-strings, StringArray,
and Categorical with all-string categories.
Does not include numpy string dtypes.

---
## condition
```python
from common import condition
```



---
## __name__
```python
from inference import __name__
```

basic inference routines 

---
## is_number
```python
from inference import is_number
```

Check if the object is a number.

Returns True when the object is a number, and False if is not.

Parameters
----------
obj : any type
    The object to check if is a number.

Returns
-------
bool
    Whether `obj` is a number or not.

See Also
--------
api.types.is_integer: Checks a subgroup of numbers.

Examples
--------
>>> from pandas.api.types import is_number
>>> is_number(1)
True
>>> is_number(7.15)
True

Booleans are valid because they are int subclass.

>>> is_number(False)
True

>>> is_number("foo")
False
>>> is_number("5")
False

---
## iterable_not_string
```python
from inference import iterable_not_string
```

Check if the object is an iterable but not a string.

Parameters
----------
obj : The object to check.

Returns
-------
is_iter_not_string : bool
    Whether `obj` is a non-string iterable.

Examples
--------
>>> iterable_not_string([1, 2, 3])
True
>>> iterable_not_string("foo")
False
>>> iterable_not_string(1)
False

---
## is_file_like
```python
from inference import is_file_like
```

Check if the object is a file-like object.

For objects to be considered file-like, they must
be an iterator AND have either a `read` and/or `write`
method as an attribute.

Note: file-like objects must be iterable, but
iterable objects need not be file-like.

Parameters
----------
obj : The object to check

Returns
-------
bool
    Whether `obj` has file-like properties.

Examples
--------
>>> import io
>>> from pandas.api.types import is_file_like
>>> buffer = io.StringIO("data")
>>> is_file_like(buffer)
True
>>> is_file_like([1, 2, 3])
False

---
## is_re
```python
from inference import is_re
```

Check if the object is a regex pattern instance.

Parameters
----------
obj : The object to check

Returns
-------
bool
    Whether `obj` is a regex pattern.

Examples
--------
>>> from pandas.api.types import is_re
>>> import re
>>> is_re(re.compile(".*"))
True
>>> is_re("foo")
False

---
## is_re_compilable
```python
from inference import is_re_compilable
```

Check if the object can be compiled into a regex pattern instance.

Parameters
----------
obj : The object to check

Returns
-------
bool
    Whether `obj` can be compiled as a regex pattern.

Examples
--------
>>> from pandas.api.types import is_re_compilable
>>> is_re_compilable(".*")
True
>>> is_re_compilable(1)
False

---
## is_array_like
```python
from inference import is_array_like
```

Check if the object is array-like.

For an object to be considered array-like, it must be list-like and
have a `dtype` attribute.

Parameters
----------
obj : The object to check

Returns
-------
is_array_like : bool
    Whether `obj` has array-like properties.

Examples
--------
>>> is_array_like(np.array([1, 2, 3]))
True
>>> is_array_like(pd.Series(["a", "b"]))
True
>>> is_array_like(pd.Index(["2016-01-01"]))
True
>>> is_array_like([1, 2, 3])
False
>>> is_array_like(("a", "b"))
False

---
## is_nested_list_like
```python
from inference import is_nested_list_like
```

Check if the object is list-like, and that all of its elements
are also list-like.

Parameters
----------
obj : The object to check

Returns
-------
is_list_like : bool
    Whether `obj` has list-like properties.

Examples
--------
>>> is_nested_list_like([[1, 2, 3]])
True
>>> is_nested_list_like([{1, 2, 3}, {1, 2, 3}])
True
>>> is_nested_list_like(["foo"])
False
>>> is_nested_list_like([])
False
>>> is_nested_list_like([[1, 2, 3], 1])
False

Notes
-----
This won't reliably detect whether a consumable iterator (e. g.
a generator) is a nested-list-like without consuming the iterator.
To avoid consuming it, we always return False if the outer container
doesn't define `__len__`.

See Also
--------
is_list_like

---
## is_dict_like
```python
from inference import is_dict_like
```

Check if the object is dict-like.

Parameters
----------
obj : The object to check

Returns
-------
bool
    Whether `obj` has dict-like properties.

Examples
--------
>>> from pandas.api.types import is_dict_like
>>> is_dict_like({1: 2})
True
>>> is_dict_like([1, 2, 3])
False
>>> is_dict_like(dict)
False
>>> is_dict_like(dict())
True

---
## is_named_tuple
```python
from inference import is_named_tuple
```

Check if the object is a named tuple.

Parameters
----------
obj : The object to check

Returns
-------
bool
    Whether `obj` is a named tuple.

Examples
--------
>>> from collections import namedtuple
>>> from pandas.api.types import is_named_tuple
>>> Point = namedtuple("Point", ["x", "y"])
>>> p = Point(1, 2)
>>>
>>> is_named_tuple(p)
True
>>> is_named_tuple((1, 2))
False

---
## is_hashable
```python
from inference import is_hashable
```

Return True if hash(obj) will succeed, False otherwise.

Some types will pass a test against collections.abc.Hashable but fail when
they are actually hashed with hash().

Distinguish between these and other types by trying the call to hash() and
seeing if they raise TypeError.

Returns
-------
bool

Examples
--------
>>> import collections
>>> from pandas.api.types import is_hashable
>>> a = ([],)
>>> isinstance(a, collections.abc.Hashable)
True
>>> is_hashable(a)
False

---
## is_sequence
```python
from inference import is_sequence
```

Check if the object is a sequence of objects.
String types are not included as sequences here.

Parameters
----------
obj : The object to check

Returns
-------
is_sequence : bool
    Whether `obj` is a sequence of objects.

Examples
--------
>>> l = [1, 2, 3]
>>>
>>> is_sequence(l)
True
>>> is_sequence(iter(l))
False

---
## is_dataclass
```python
from inference import is_dataclass
```

Checks if the object is a data-class instance

Parameters
----------
item : object

Returns
--------
is_dataclass : bool
    True if the item is an instance of a data-class,
    will return false if you pass the data class itself

Examples
--------
>>> from dataclasses import dataclass
>>> @dataclass
... class Point:
...     x: int
...     y: int

>>> is_dataclass(Point)
False
>>> is_dataclass(Point(0,2))
True

---
## ExtensionDtype
```python
from base import ExtensionDtype
```

A custom data type, to be paired with an ExtensionArray.

See Also
--------
extensions.register_extension_dtype: Register an ExtensionType
    with pandas as class decorator.
extensions.ExtensionArray: Abstract base class for custom 1-D array types.

Notes
-----
The interface includes the following abstract methods that must
be implemented by subclasses:

* type
* name
* construct_array_type

The following attributes and methods influence the behavior of the dtype in
pandas operations

* _is_numeric
* _is_boolean
* _get_common_dtype

The `na_value` class attribute can be used to set the default NA value
for this type. :attr:`numpy.nan` is used by default.

ExtensionDtypes are required to be hashable. The base class provides
a default implementation, which relies on the ``_metadata`` class
attribute. ``_metadata`` should be a tuple containing the strings
that define your data type. For example, with ``PeriodDtype`` that's
the ``freq`` attribute.

**If you have a parametrized dtype you should set the ``_metadata``
class property**.

Ideally, the attributes in ``_metadata`` will match the
parameters to your ``ExtensionDtype.__init__`` (if any). If any of
the attributes in ``_metadata`` don't implement the standard
``__eq__`` or ``__hash__``, the default implementations here will not
work.

Examples
--------

For interaction with Apache Arrow (pyarrow), a ``__from_arrow__`` method
can be implemented: this method receives a pyarrow Array or ChunkedArray
as only argument and is expected to return the appropriate pandas
ExtensionArray for this dtype and the passed values:

>>> import pyarrow
>>> from pandas.api.extensions import ExtensionArray
>>> class ExtensionDtype:
...     def __from_arrow__(
...         self,
...         array: pyarrow.Array | pyarrow.ChunkedArray
...     ) -> ExtensionArray:
...         ...

This class does not inherit from 'abc.ABCMeta' for performance reasons.
Methods and properties required by the interface raise
``pandas.errors.AbstractMethodError`` and no ``register`` method is
provided for registering virtual subclasses.

---
## StorageExtensionDtype
```python
from base import StorageExtensionDtype
```

ExtensionDtype that may be backed by more than one implementation.

---
## register_extension_dtype
```python
from base import register_extension_dtype
```

Register an ExtensionType with pandas as class decorator.

This enables operations like ``.astype(name)`` for the name
of the ExtensionDtype.

Returns
-------
callable
    A class decorator.

Examples
--------
>>> from pandas.api.extensions import register_extension_dtype, ExtensionDtype
>>> @register_extension_dtype
... class MyExtensionDtype(ExtensionDtype):
...     name = "myextension"

---
## Registry
```python
from base import Registry
```

Registry for dtype inference.

The registry allows one to map a string repr of a extension
dtype to an extension dtype. The string alias can be used in several
places, including

* Series and Index constructors
* :meth:`pandas.array`
* :meth:`pandas.Series.astype`

Multiple extension types can be registered.
These are tried in order.

---
## na_value
```python
from base import na_value
```



---
## type
```python
from base import type
```

The scalar type for the array, e.g. ``int``

It's expected ``ExtensionArray[item]`` returns an instance
of ``ExtensionDtype.type`` for scalar ``item``, assuming
that value is valid (not NA). NA values do not need to be
instances of `type`.

---
## kind
```python
from base import kind
```

A character code (one of 'biufcmMOSUV'), default 'O'

This should match the NumPy dtype used when the array is
converted to an ndarray, which is probably 'O' for object if
the extension type cannot be represented as a built-in NumPy
type.

See Also
--------
numpy.dtype.kind

---
## names
```python
from base import names
```

Ordered list of field names, or None if there are no fields.

This is for compatibility with NumPy arrays, and may be removed in the
future.

---
## construct_array_type
```python
from base import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## construct_from_string
```python
from base import construct_from_string
```

Construct this type from a string.

This is useful mainly for data types that accept parameters.
For example, a period dtype accepts a frequency parameter that
can be set as ``period[h]`` (where H means hourly frequency).

By default, in the abstract class, just the name of the type is
expected. But subclasses can overwrite this method to accept
parameters.

Parameters
----------
string : str
    The name of the type, for example ``category``.

Returns
-------
ExtensionDtype
    Instance of the dtype.

Raises
------
TypeError
    If a class cannot be constructed from this 'string'.

Examples
--------
For extension dtypes with arguments the following may be an
adequate implementation.

>>> import re
>>> @classmethod
... def construct_from_string(cls, string):
...     pattern = re.compile(r"^my_type\[(?P<arg_name>.+)\]$")
...     match = pattern.match(string)
...     if match:
...         return cls(**match.groupdict())
...     else:
...         raise TypeError(
...             f"Cannot construct a '{cls.__name__}' from '{string}'"
...         )

---
## is_dtype
```python
from base import is_dtype
```

Check if we match 'dtype'.

Parameters
----------
dtype : object
    The object to check.

Returns
-------
bool

Notes
-----
The default implementation is True if

1. ``cls.construct_from_string(dtype)`` is an instance
   of ``cls``.
2. ``dtype`` is an object and is an instance of ``cls``
3. ``dtype`` has a ``dtype`` attribute, and any of the above
   conditions is true for ``dtype.dtype``.

---
## _is_numeric
```python
from base import _is_numeric
```

Whether columns with this dtype should be considered numeric.

By default ExtensionDtypes are assumed to be non-numeric.
They'll be excluded from operations that exclude non-numeric
columns, like (groupby) reductions, plotting, etc.

---
## _is_boolean
```python
from base import _is_boolean
```

Whether this dtype should be considered boolean.

By default, ExtensionDtypes are assumed to be non-numeric.
Setting this to True will affect the behavior of several places,
e.g.

* is_bool
* boolean indexing

Returns
-------
bool

---
## _get_common_dtype
```python
from base import _get_common_dtype
```

Return the common dtype, if one exists.

Used in `find_common_type` implementation. This is for example used
to determine the resulting dtype in a concat operation.

If no common dtype exists, return None (which gives the other dtypes
the chance to determine a common dtype). If all dtypes in the list
return None, then the common dtype will be "object" dtype (this means
it is never needed to return "object" dtype from this method itself).

Parameters
----------
dtypes : list of dtypes
    The dtypes for which to determine a common dtype. This is a list
    of np.dtype or ExtensionDtype instances.

Returns
-------
Common dtype (np.dtype or ExtensionDtype) or None

---
## _can_hold_na
```python
from base import _can_hold_na
```



---
## _is_immutable
```python
from base import _is_immutable
```

Can arrays with this dtype be modified with __setitem__? If not, return
True.

Immutable arrays are expected to raise TypeError on __setitem__ calls.

---
## index_class
```python
from base import index_class
```

The Index subclass to return from Index.__new__ when this dtype is
encountered.

---
## _supports_2d
```python
from base import _supports_2d
```

Do ExtensionArrays with this dtype support 2D arrays?

Historically ExtensionArrays were limited to 1D. By returning True here,
authors can indicate that their arrays support 2D instances. This can
improve performance in some cases, particularly operations with `axis=1`.

Arrays that support 2D values should:

    - implement Array.reshape
    - subclass the Dim2CompatTests in tests.extension.base
    - _concat_same_type should support `axis` keyword
    - _reduce and reductions should support `axis` keyword

---
## _can_fast_transpose
```python
from base import _can_fast_transpose
```

Is transposing an array with this dtype zero-copy?

Only relevant for cases where _supports_2d is True.

---
## register
```python
from base import register
```

Parameters
----------
dtype : ExtensionDtype class

---
## find
```python
from base import find
```

Parameters
----------
dtype : ExtensionDtype class or instance or str or numpy dtype or python type

Returns
-------
return the first matching dtype, otherwise return None

---
## __name__
```python
from categorical import __name__
```



---
## recode_for_groupby
```python
from categorical import recode_for_groupby
```

Code the categories to ensure we can groupby for categoricals.

If observed=True, we return a new Categorical with the observed
categories only.

If sort=False, return a copy of self, coded with categories as
returned by .unique(), followed by any categories not appearing in
the data. If sort=True, return self.

This method is needed solely to ensure the categorical index of the
GroupBy result has categories in the order of appearance in the data
(GH-8868).

Parameters
----------
c : Categorical
sort : bool
    The value of the sort parameter groupby was called with.
observed : bool
    Account only for the observed values

Returns
-------
Categorical
    If sort=False, the new categories are set to the order of
    appearance in codes (unless ordered=True, in which case the
    original order is preserved), followed by any unrepresented
    categories in the original order.
Categorical or None
    If we are observed, return the original categorical, otherwise None

---
## NamedAgg
```python
from generic import NamedAgg
```

Helper for column specific aggregation with control over output column names.

Subclass of typing.NamedTuple.

Parameters
----------
column : Hashable
    Column label in the DataFrame to apply aggfunc.
aggfunc : function or str
    Function to apply to the provided column. If string, the name of a built-in
    pandas function.

Examples
--------
>>> df = pd.DataFrame({"key": [1, 1, 2], "a": [-1, 0, 1], 1: [10, 11, 12]})
>>> agg_a = pd.NamedAgg(column="a", aggfunc="min")
>>> agg_1 = pd.NamedAgg(column=1, aggfunc=lambda x: np.mean(x))
>>> df.groupby("key").agg(result_a=agg_a, result_1=agg_1)
     result_a  result_1
key
1          -1      10.5
2           1      12.0

---
## SeriesGroupBy
```python
from generic import SeriesGroupBy
```



---
## DataFrameGroupBy
```python
from generic import DataFrameGroupBy
```



---
## _wrap_transform_general_frame
```python
from generic import _wrap_transform_general_frame
```



---
## _wrap_agged_manager
```python
from generic import _wrap_agged_manager
```



---
## _get_data_to_aggregate
```python
from generic import _get_data_to_aggregate
```



---
## apply
```python
from generic import apply
```



---
## aggregate
```python
from generic import aggregate
```



---
## _python_agg_general
```python
from generic import _python_agg_general
```



---
## _aggregate_multiple_funcs
```python
from generic import _aggregate_multiple_funcs
```



---
## _wrap_applied_output
```python
from generic import _wrap_applied_output
```



---
## _aggregate_named
```python
from generic import _aggregate_named
```



---
## transform
```python
from generic import transform
```



---
## _cython_transform
```python
from generic import _cython_transform
```



---
## _transform_general
```python
from generic import _transform_general
```



---
## nunique
```python
from generic import nunique
```

Return DataFrame with counts of unique elements in each position.

Parameters
----------
dropna : bool, default True
    Don't include NaN in the counts.

Returns
-------
nunique: DataFrame

Examples
--------
>>> df = pd.DataFrame({'id': ['spam', 'egg', 'egg', 'spam',
...                           'ham', 'ham'],
...                    'value1': [1, 5, 5, 2, 5, 5],
...                    'value2': list('abbaxy')})
>>> df
     id  value1 value2
0  spam       1      a
1   egg       5      b
2   egg       5      b
3  spam       2      a
4   ham       5      x
5   ham       5      y

>>> df.groupby('id').nunique()
      value1  value2
id
egg        1       1
ham        1       2
spam       2       1

Check for rows with the same id but conflicting values:

>>> df.groupby('id').filter(lambda g: (g.nunique() > 1).any())
     id  value1 value2
0  spam       1      a
3  spam       2      a
4   ham       5      x
5   ham       5      y

---
## value_counts
```python
from generic import value_counts
```

Return a Series or DataFrame containing counts of unique rows.

.. versionadded:: 1.4.0

Parameters
----------
subset : list-like, optional
    Columns to use when counting unique combinations.
normalize : bool, default False
    Return proportions rather than frequencies.
sort : bool, default True
    Sort by frequencies.
ascending : bool, default False
    Sort in ascending order.
dropna : bool, default True
    Don't include counts of rows that contain NA values.

Returns
-------
Series or DataFrame
    Series if the groupby as_index is True, otherwise DataFrame.

See Also
--------
Series.value_counts: Equivalent method on Series.
DataFrame.value_counts: Equivalent method on DataFrame.
SeriesGroupBy.value_counts: Equivalent method on SeriesGroupBy.

Notes
-----
- If the groupby as_index is True then the returned Series will have a
  MultiIndex with one level per input column.
- If the groupby as_index is False then the returned DataFrame will have an
  additional column with the value_counts. The column is labelled 'count' or
  'proportion', depending on the ``normalize`` parameter.

By default, rows that contain any NA values are omitted from
the result.

By default, the result will be in descending order so that the
first element of each group is the most frequently-occurring row.

Examples
--------
>>> df = pd.DataFrame({
...     'gender': ['male', 'male', 'female', 'male', 'female', 'male'],
...     'education': ['low', 'medium', 'high', 'low', 'high', 'low'],
...     'country': ['US', 'FR', 'US', 'FR', 'FR', 'FR']
... })

>>> df
        gender  education   country
0       male    low         US
1       male    medium      FR
2       female  high        US
3       male    low         FR
4       female  high        FR
5       male    low         FR

>>> df.groupby('gender').value_counts()
gender  education  country
female  high       FR         1
                   US         1
male    low        FR         2
                   US         1
        medium     FR         1
Name: count, dtype: int64

>>> df.groupby('gender').value_counts(ascending=True)
gender  education  country
female  high       FR         1
                   US         1
male    low        US         1
        medium     FR         1
        low        FR         2
Name: count, dtype: int64

>>> df.groupby('gender').value_counts(normalize=True)
gender  education  country
female  high       FR         0.50
                   US         0.50
male    low        FR         0.50
                   US         0.25
        medium     FR         0.25
Name: proportion, dtype: float64

>>> df.groupby('gender', as_index=False).value_counts()
   gender education country  count
0  female      high      FR      1
1  female      high      US      1
2    male       low      FR      2
3    male       low      US      1
4    male    medium      FR      1

>>> df.groupby('gender', as_index=False).value_counts(normalize=True)
   gender education country  proportion
0  female      high      FR        0.50
1  female      high      US        0.50
2    male       low      FR        0.50
3    male       low      US        0.25
4    male    medium      FR        0.25

---
## plot
```python
from generic import plot
```



---
## nlargest
```python
from generic import nlargest
```



---
## nsmallest
```python
from generic import nsmallest
```



---
## idxmin
```python
from generic import idxmin
```

Return index of first occurrence of minimum over requested axis.

NA/null values are excluded.

Parameters
----------
axis : {{0 or 'index', 1 or 'columns'}}, default None
    The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
    If axis is not provided, grouper's axis is used.

    .. versionchanged:: 2.0.0

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

skipna : bool, default True
    Exclude NA/null values. If an entire row/column is NA, the result
    will be NA.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

Returns
-------
Series
    Indexes of minima along the specified axis.

Raises
------
ValueError
    * If the row/column is empty

See Also
--------
Series.idxmin : Return index of the minimum element.

Notes
-----
This method is the DataFrame version of ``ndarray.argmin``.

Examples
--------
Consider a dataset containing food consumption in Argentina.

>>> df = pd.DataFrame({'consumption': [10.51, 103.11, 55.48],
...                    'co2_emissions': [37.2, 19.66, 1712]},
...                   index=['Pork', 'Wheat Products', 'Beef'])

>>> df
                consumption  co2_emissions
Pork                  10.51         37.20
Wheat Products       103.11         19.66
Beef                  55.48       1712.00

By default, it returns the index for the minimum value in each column.

>>> df.idxmin()
consumption                Pork
co2_emissions    Wheat Products
dtype: object

To return the index for the minimum value in each row, use ``axis="columns"``.

>>> df.idxmin(axis="columns")
Pork                consumption
Wheat Products    co2_emissions
Beef                consumption
dtype: object

---
## idxmax
```python
from generic import idxmax
```

Return index of first occurrence of maximum over requested axis.

NA/null values are excluded.

Parameters
----------
axis : {{0 or 'index', 1 or 'columns'}}, default None
    The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
    If axis is not provided, grouper's axis is used.

    .. versionchanged:: 2.0.0

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

skipna : bool, default True
    Exclude NA/null values. If an entire row/column is NA, the result
    will be NA.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

Returns
-------
Series
    Indexes of maxima along the specified axis.

Raises
------
ValueError
    * If the row/column is empty

See Also
--------
Series.idxmax : Return index of the maximum element.

Notes
-----
This method is the DataFrame version of ``ndarray.argmax``.

Examples
--------
Consider a dataset containing food consumption in Argentina.

>>> df = pd.DataFrame({'consumption': [10.51, 103.11, 55.48],
...                    'co2_emissions': [37.2, 19.66, 1712]},
...                   index=['Pork', 'Wheat Products', 'Beef'])

>>> df
                consumption  co2_emissions
Pork                  10.51         37.20
Wheat Products       103.11         19.66
Beef                  55.48       1712.00

By default, it returns the index for the maximum value in each column.

>>> df.idxmax()
consumption     Wheat Products
co2_emissions             Beef
dtype: object

To return the index for the maximum value in each row, use ``axis="columns"``.

>>> df.idxmax(axis="columns")
Pork              co2_emissions
Wheat Products     consumption
Beef              co2_emissions
dtype: object

---
## corr
```python
from generic import corr
```



---
## cov
```python
from generic import cov
```



---
## is_monotonic_increasing
```python
from generic import is_monotonic_increasing
```

Return whether each group's values are monotonically increasing.

Returns
-------
Series

Examples
--------
>>> s = pd.Series([2, 1, 3, 4], index=['Falcon', 'Falcon', 'Parrot', 'Parrot'])
>>> s.groupby(level=0).is_monotonic_increasing
Falcon    False
Parrot     True
dtype: bool

---
## is_monotonic_decreasing
```python
from generic import is_monotonic_decreasing
```

Return whether each group's values are monotonically decreasing.

Returns
-------
Series

Examples
--------
>>> s = pd.Series([2, 1, 3, 4], index=['Falcon', 'Falcon', 'Parrot', 'Parrot'])
>>> s.groupby(level=0).is_monotonic_decreasing
Falcon     True
Parrot    False
dtype: bool

---
## hist
```python
from generic import hist
```



---
## dtype
```python
from generic import dtype
```



---
## unique
```python
from generic import unique
```

Return unique values for each group.

It returns unique values for each of the grouped values. Returned in
order of appearance. Hash table-based unique, therefore does NOT sort.

Returns
-------
Series
    Unique values for each of the grouped values.

See Also
--------
Series.unique : Return unique values of Series object.

Examples
--------
>>> df = pd.DataFrame([('Chihuahua', 'dog', 6.1),
...                    ('Beagle', 'dog', 15.2),
...                    ('Chihuahua', 'dog', 6.9),
...                    ('Persian', 'cat', 9.2),
...                    ('Chihuahua', 'dog', 7),
...                    ('Persian', 'cat', 8.8)],
...                   columns=['breed', 'animal', 'height_in'])
>>> df
       breed     animal   height_in
0  Chihuahua        dog         6.1
1     Beagle        dog        15.2
2  Chihuahua        dog         6.9
3    Persian        cat         9.2
4  Chihuahua        dog         7.0
5    Persian        cat         8.8
>>> ser = df.groupby('animal')['breed'].unique()
>>> ser
animal
cat              [Persian]
dog    [Chihuahua, Beagle]
Name: breed, dtype: object

---
## _aggregate_frame
```python
from generic import _aggregate_frame
```



---
## _wrap_applied_output_series
```python
from generic import _wrap_applied_output_series
```



---
## _define_paths
```python
from generic import _define_paths
```



---
## _choose_path
```python
from generic import _choose_path
```



---
## _gotitem
```python
from generic import _gotitem
```

sub-classes to define
return a sliced object

Parameters
----------
key : string / list of selections
ndim : {1, 2}
    requested ndim of result
subset : object, default None
    subset to act on

---
## _apply_to_column_groupbys
```python
from generic import _apply_to_column_groupbys
```



---
## corrwith
```python
from generic import corrwith
```



---
## true_and_notna
```python
from generic import true_and_notna
```



---
## alt
```python
from generic import alt
```



---
## arr_func
```python
from generic import arr_func
```



---
## build_codes
```python
from generic import build_codes
```



---
## check_result_array
```python
from ops import check_result_array
```



---
## extract_result
```python
from ops import extract_result
```

Extract the result object, it might be a 0-dim ndarray
or a len-1 0-dim, or a scalar

---
## WrappedCythonOp
```python
from ops import WrappedCythonOp
```

Dispatch logic for functions defined in _libs.groupby

Parameters
----------
kind: str
    Whether the operation is an aggregate or transform.
how: str
    Operation name, e.g. "mean".
has_dropped_na: bool
    True precisely when dropna=True and the grouper contains a null value.

---
## BaseGrouper
```python
from ops import BaseGrouper
```

This is an internal Grouper class, which actually holds
the generated groups

Parameters
----------
axis : Index
groupings : Sequence[Grouping]
    all the grouping instances to handle in this grouper
    for example for grouper list to groupby, need to pass the list
sort : bool, default True
    whether this grouper will give sorted result or not

---
## BinGrouper
```python
from ops import BinGrouper
```

This is an internal Grouper class

Parameters
----------
bins : the split index of binlabels to group the item of axis
binlabels : the label list
indexer : np.ndarray[np.intp], optional
    the indexer created by Grouper
    some groupers (TimeGrouper) will sort its axis and its
    group_info is also sorted, so need the indexer to reorder

Examples
--------
bins: [2, 4, 6, 8, 10]
binlabels: DatetimeIndex(['2005-01-01', '2005-01-03',
    '2005-01-05', '2005-01-07', '2005-01-09'],
    dtype='datetime64[ns]', freq='2D')

the group_info, which contains the label of each item in grouped
axis, the index of label in label list, group number, is

(array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4]), array([0, 1, 2, 3, 4]), 5)

means that, the grouped axis has 10 items, can be grouped into 5
labels, the first and second items belong to the first label, the
third and forth items belong to the second label, and so on

---
## _is_indexed_like
```python
from ops import _is_indexed_like
```



---
## DataSplitter
```python
from ops import DataSplitter
```



---
## SeriesSplitter
```python
from ops import SeriesSplitter
```



---
## FrameSplitter
```python
from ops import FrameSplitter
```



---
## _get_splitter
```python
from ops import _get_splitter
```

Returns
-------
Generator yielding subsetted objects

---
## get_kind_from_how
```python
from ops import get_kind_from_how
```



---
## _get_cython_function
```python
from ops import _get_cython_function
```



---
## _get_cython_vals
```python
from ops import _get_cython_vals
```

Cast numeric dtypes to float64 for functions that only support that.

Parameters
----------
values : np.ndarray

Returns
-------
values : np.ndarray

---
## _get_output_shape
```python
from ops import _get_output_shape
```



---
## _get_out_dtype
```python
from ops import _get_out_dtype
```



---
## _get_result_dtype
```python
from ops import _get_result_dtype
```

Get the desired dtype of a result based on the
input dtype and how it was computed.

Parameters
----------
dtype : np.dtype

Returns
-------
np.dtype
    The desired dtype of the result.

---
## _cython_op_ndim_compat
```python
from ops import _cython_op_ndim_compat
```



---
## _call_cython_op
```python
from ops import _call_cython_op
```



---
## _validate_axis
```python
from ops import _validate_axis
```



---
## cython_operation
```python
from ops import cython_operation
```

Call our cython function, with appropriate pre- and post- processing.

---
## groupings
```python
from ops import groupings
```



---
## shape
```python
from ops import shape
```



---
## __iter__
```python
from ops import __iter__
```



---
## nkeys
```python
from ops import nkeys
```



---
## get_iterator
```python
from ops import get_iterator
```

Groupby iterator

Returns
-------
Generator yielding sequence of (name, subsetted object)
for each group

---
## group_keys_seq
```python
from ops import group_keys_seq
```



---
## indices
```python
from ops import indices
```



---
## result_ilocs
```python
from ops import result_ilocs
```

Get the original integer locations of result_index in the input.

---
## codes
```python
from ops import codes
```



---
## levels
```python
from ops import levels
```



---
## names
```python
from ops import names
```



---
## size
```python
from ops import size
```

Compute group sizes.

---
## groups
```python
from ops import groups
```

dict {group name -> group labels}

---
## is_monotonic
```python
from ops import is_monotonic
```



---
## has_dropped_na
```python
from ops import has_dropped_na
```

Whether grouper has null value(s) that are dropped.

---
## group_info
```python
from ops import group_info
```



---
## codes_info
```python
from ops import codes_info
```



---
## _get_compressed_codes
```python
from ops import _get_compressed_codes
```



---
## ngroups
```python
from ops import ngroups
```



---
## reconstructed_codes
```python
from ops import reconstructed_codes
```



---
## result_index
```python
from ops import result_index
```



---
## get_group_levels
```python
from ops import get_group_levels
```



---
## _cython_operation
```python
from ops import _cython_operation
```

Returns the values of a cython operation.

---
## agg_series
```python
from ops import agg_series
```

Parameters
----------
obj : Series
func : function taking a Series and returning a scalar-like
preserve_dtype : bool
    Whether the aggregation is known to be dtype-preserving.

Returns
-------
np.ndarray or ExtensionArray

---
## _aggregate_series_pure_python
```python
from ops import _aggregate_series_pure_python
```



---
## apply_groupwise
```python
from ops import apply_groupwise
```



---
## _sort_idx
```python
from ops import _sort_idx
```



---
## _sorted_ids
```python
from ops import _sorted_ids
```



---
## _sorted_data
```python
from ops import _sorted_data
```



---
## _chop
```python
from ops import _chop
```



---
## __name__
```python
from grouper import __name__
```

Provide user facing operators for doing the split part of the
split-apply-combine paradigm.

---
## Grouper
```python
from grouper import Grouper
```

A Grouper allows the user to specify a groupby instruction for an object.

This specification will select a column via the key parameter, or if the
level and/or axis parameters are given, a level of the index of the target
object.

If `axis` and/or `level` are passed as keywords to both `Grouper` and
`groupby`, the values passed to `Grouper` take precedence.

Parameters
----------
key : str, defaults to None
    Groupby key, which selects the grouping column of the target.
level : name/number, defaults to None
    The level for the target index.
freq : str / frequency object, defaults to None
    This will groupby the specified frequency if the target selection
    (via key or level) is a datetime-like object. For full specification
    of available frequencies, please see `here
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_.
axis : str, int, defaults to 0
    Number/name of the axis.
sort : bool, default to False
    Whether to sort the resulting labels.
closed : {'left' or 'right'}
    Closed end of interval. Only when `freq` parameter is passed.
label : {'left' or 'right'}
    Interval boundary to use for labeling.
    Only when `freq` parameter is passed.
convention : {'start', 'end', 'e', 's'}
    If grouper is PeriodIndex and `freq` parameter is passed.

origin : Timestamp or str, default 'start_day'
    The timestamp on which to adjust the grouping. The timezone of origin must
    match the timezone of the index.
    If string, must be one of the following:

    - 'epoch': `origin` is 1970-01-01
    - 'start': `origin` is the first value of the timeseries
    - 'start_day': `origin` is the first day at midnight of the timeseries

    - 'end': `origin` is the last value of the timeseries
    - 'end_day': `origin` is the ceiling midnight of the last day

    .. versionadded:: 1.3.0

offset : Timedelta or str, default is None
    An offset timedelta added to the origin.

dropna : bool, default True
    If True, and if group keys contain NA values, NA values together with
    row/column will be dropped. If False, NA values will also be treated as
    the key in groups.

Returns
-------
Grouper or pandas.api.typing.TimeGrouper
    A TimeGrouper is returned if ``freq`` is not ``None``. Otherwise, a Grouper
    is returned.

Examples
--------
``df.groupby(pd.Grouper(key="Animal"))`` is equivalent to ``df.groupby('Animal')``

>>> df = pd.DataFrame(
...     {
...         "Animal": ["Falcon", "Parrot", "Falcon", "Falcon", "Parrot"],
...         "Speed": [100, 5, 200, 300, 15],
...     }
... )
>>> df
   Animal  Speed
0  Falcon    100
1  Parrot      5
2  Falcon    200
3  Falcon    300
4  Parrot     15
>>> df.groupby(pd.Grouper(key="Animal")).mean()
        Speed
Animal
Falcon  200.0
Parrot   10.0

Specify a resample operation on the column 'Publish date'

>>> df = pd.DataFrame(
...    {
...        "Publish date": [
...             pd.Timestamp("2000-01-02"),
...             pd.Timestamp("2000-01-02"),
...             pd.Timestamp("2000-01-09"),
...             pd.Timestamp("2000-01-16")
...         ],
...         "ID": [0, 1, 2, 3],
...         "Price": [10, 20, 30, 40]
...     }
... )
>>> df
  Publish date  ID  Price
0   2000-01-02   0     10
1   2000-01-02   1     20
2   2000-01-09   2     30
3   2000-01-16   3     40
>>> df.groupby(pd.Grouper(key="Publish date", freq="1W")).mean()
               ID  Price
Publish date
2000-01-02    0.5   15.0
2000-01-09    2.0   30.0
2000-01-16    3.0   40.0

If you want to adjust the start of the bins based on a fixed timestamp:

>>> start, end = '2000-10-01 23:30:00', '2000-10-02 00:30:00'
>>> rng = pd.date_range(start, end, freq='7min')
>>> ts = pd.Series(np.arange(len(rng)) * 3, index=rng)
>>> ts
2000-10-01 23:30:00     0
2000-10-01 23:37:00     3
2000-10-01 23:44:00     6
2000-10-01 23:51:00     9
2000-10-01 23:58:00    12
2000-10-02 00:05:00    15
2000-10-02 00:12:00    18
2000-10-02 00:19:00    21
2000-10-02 00:26:00    24
Freq: 7min, dtype: int64

>>> ts.groupby(pd.Grouper(freq='17min')).sum()
2000-10-01 23:14:00     0
2000-10-01 23:31:00     9
2000-10-01 23:48:00    21
2000-10-02 00:05:00    54
2000-10-02 00:22:00    24
Freq: 17min, dtype: int64

>>> ts.groupby(pd.Grouper(freq='17min', origin='epoch')).sum()
2000-10-01 23:18:00     0
2000-10-01 23:35:00    18
2000-10-01 23:52:00    27
2000-10-02 00:09:00    39
2000-10-02 00:26:00    24
Freq: 17min, dtype: int64

>>> ts.groupby(pd.Grouper(freq='17min', origin='2000-01-01')).sum()
2000-10-01 23:24:00     3
2000-10-01 23:41:00    15
2000-10-01 23:58:00    45
2000-10-02 00:15:00    45
Freq: 17min, dtype: int64

If you want to adjust the start of the bins with an `offset` Timedelta, the two
following lines are equivalent:

>>> ts.groupby(pd.Grouper(freq='17min', origin='start')).sum()
2000-10-01 23:30:00     9
2000-10-01 23:47:00    21
2000-10-02 00:04:00    54
2000-10-02 00:21:00    24
Freq: 17min, dtype: int64

>>> ts.groupby(pd.Grouper(freq='17min', offset='23h30min')).sum()
2000-10-01 23:30:00     9
2000-10-01 23:47:00    21
2000-10-02 00:04:00    54
2000-10-02 00:21:00    24
Freq: 17min, dtype: int64

To replace the use of the deprecated `base` argument, you can now use `offset`,
in this example it is equivalent to have `base=2`:

>>> ts.groupby(pd.Grouper(freq='17min', offset='2min')).sum()
2000-10-01 23:16:00     0
2000-10-01 23:33:00     9
2000-10-01 23:50:00    36
2000-10-02 00:07:00    39
2000-10-02 00:24:00    24
Freq: 17min, dtype: int64

---
## Grouping
```python
from grouper import Grouping
```

Holds the grouping information for a single key

Parameters
----------
index : Index
grouper :
obj : DataFrame or Series
name : Label
level :
observed : bool, default False
    If we are a Categorical, use the observed values
in_axis : if the Grouping is a column in self.obj and hence among
    Groupby.exclusions list
dropna : bool, default True
    Whether to drop NA groups.
uniques : Array-like, optional
    When specified, will be used for unique values. Enables including empty groups
    in the result for a BinGrouper. Must not contain duplicates.

Attributes
-------
indices : dict
    Mapping of {group -> index_list}
codes : ndarray
    Group codes
group_index : Index or None
    unique groups
groups : dict
    Mapping of {group -> label_list}

---
## get_grouper
```python
from grouper import get_grouper
```

Create and return a BaseGrouper, which is an internal
mapping of how to create the grouper indexers.
This may be composed of multiple Grouping objects, indicating
multiple groupers

Groupers are ultimately index mappings. They can originate as:
index mappings, keys to columns, functions, or Groupers

Groupers enable local references to axis,level,sort, while
the passed in axis, level, and sort are 'global'.

This routine tries to figure out what the passing in references
are and then creates a Grouping for each one, combined into
a BaseGrouper.

If observed & we have a categorical grouper, only show the observed
values.

If validate, then check for key/level overlaps.

---
## _is_label_like
```python
from grouper import _is_label_like
```



---
## _convert_grouper
```python
from grouper import _convert_grouper
```



---
## __new__
```python
from grouper import __new__
```



---
## __init__
```python
from grouper import __init__
```



---
## _get_grouper
```python
from grouper import _get_grouper
```

Parameters
----------
obj : Series or DataFrame
validate : bool, default True
    if True, validate the grouper

Returns
-------
a tuple of grouper, obj (possibly sorted)

---
## _set_grouper
```python
from grouper import _set_grouper
```

given an object and the specifications, setup the internal grouper
for this particular specification

Parameters
----------
obj : Series or DataFrame
sort : bool, default False
    whether the resulting grouper should be sorted
gpr_index : Index or None, default None

Returns
-------
NDFrame
Index
np.ndarray[np.intp] | None

---
## ax
```python
from grouper import ax
```



---
## indexer
```python
from grouper import indexer
```



---
## obj
```python
from grouper import obj
```



---
## grouper
```python
from grouper import grouper
```



---
## groups
```python
from grouper import groups
```



---
## __repr__
```python
from grouper import __repr__
```



---
## __iter__
```python
from grouper import __iter__
```



---
## _passed_categorical
```python
from grouper import _passed_categorical
```



---
## name
```python
from grouper import name
```



---
## _ilevel
```python
from grouper import _ilevel
```

If necessary, converted index level name to index level position.

---
## ngroups
```python
from grouper import ngroups
```



---
## indices
```python
from grouper import indices
```



---
## codes
```python
from grouper import codes
```



---
## _group_arraylike
```python
from grouper import _group_arraylike
```

Analogous to result_index, but holding an ArrayLike to ensure
we can retain ExtensionDtypes.

---
## group_arraylike
```python
from grouper import group_arraylike
```

Analogous to result_index, but holding an ArrayLike to ensure
we can retain ExtensionDtypes.

---
## _result_index
```python
from grouper import _result_index
```



---
## result_index
```python
from grouper import result_index
```



---
## _group_index
```python
from grouper import _group_index
```



---
## group_index
```python
from grouper import group_index
```



---
## _codes_and_uniques
```python
from grouper import _codes_and_uniques
```



---
## is_in_axis
```python
from grouper import is_in_axis
```



---
## is_in_obj
```python
from grouper import is_in_obj
```



---
## GroupByIndexingMixin
```python
from indexing import GroupByIndexingMixin
```

Mixin for adding ._positional_selector to GroupBy.

---
## GroupByPositionalSelector
```python
from indexing import GroupByPositionalSelector
```



---
## GroupByNthSelector
```python
from indexing import GroupByNthSelector
```

Dynamically substituted for GroupBy.nth to enable both call and index

---
## _positional_selector
```python
from indexing import _positional_selector
```

Return positional selection for each group.

``groupby._positional_selector[i:j]`` is similar to
``groupby.apply(lambda x: x.iloc[i:j])``
but much faster and preserves the original index and order.

``_positional_selector[]`` is compatible with and extends :meth:`~GroupBy.head`
and :meth:`~GroupBy.tail`. For example:

- ``head(5)``
- ``_positional_selector[5:-5]``
- ``tail(5)``

together return all the rows.

Allowed inputs for the index are:

- An integer valued iterable, e.g. ``range(2, 4)``.
- A comma separated list of integers and slices, e.g. ``5``, ``2, 4``, ``2:4``.

The output format is the same as :meth:`~GroupBy.head` and
:meth:`~GroupBy.tail`, namely
a subset of the ``DataFrame`` or ``Series`` with the index and order preserved.

Returns
-------
Series
    The filtered subset of the original Series.
DataFrame
    The filtered subset of the original DataFrame.

See Also
--------
DataFrame.iloc : Purely integer-location based indexing for selection by
    position.
GroupBy.head : Return first n rows of each group.
GroupBy.tail : Return last n rows of each group.
GroupBy.nth : Take the nth row from each group if n is an int, or a
    subset of rows, if n is a list of ints.

Notes
-----
- The slice step cannot be negative.
- If the index specification results in overlaps, the item is not duplicated.
- If the index specification changes the order of items, then
  they are returned in their original order.
  By contrast, ``DataFrame.iloc`` can change the row order.
- ``groupby()`` parameters such as as_index and dropna are ignored.

The differences between ``_positional_selector[]`` and :meth:`~GroupBy.nth`
with ``as_index=False`` are:

- Input to ``_positional_selector`` can include
  one or more slices whereas ``nth``
  just handles an integer or a list of integers.
- ``_positional_selector`` can  accept a slice relative to the
  last row of each group.
- ``_positional_selector`` does not have an equivalent to the
  ``nth()`` ``dropna`` parameter.

Examples
--------
>>> df = pd.DataFrame([["a", 1], ["a", 2], ["a", 3], ["b", 4], ["b", 5]],
...                   columns=["A", "B"])
>>> df.groupby("A")._positional_selector[1:2]
   A  B
1  a  2
4  b  5

>>> df.groupby("A")._positional_selector[1, -1]
   A  B
1  a  2
2  a  3
4  b  5

---
## _make_mask_from_positional_indexer
```python
from indexing import _make_mask_from_positional_indexer
```



---
## _make_mask_from_int
```python
from indexing import _make_mask_from_int
```



---
## _make_mask_from_list
```python
from indexing import _make_mask_from_list
```



---
## _make_mask_from_tuple
```python
from indexing import _make_mask_from_tuple
```



---
## _make_mask_from_slice
```python
from indexing import _make_mask_from_slice
```



---
## _ascending_count
```python
from indexing import _ascending_count
```



---
## _descending_count
```python
from indexing import _descending_count
```



---
## __name__
```python
from groupby import __name__
```



---
## GroupByPlot
```python
from groupby import GroupByPlot
```

Class implementing the .plot attribute for groupby objects.

---
## BaseGroupBy
```python
from groupby import BaseGroupBy
```



---
## GroupBy
```python
from groupby import GroupBy
```

Class for grouping and aggregating relational data.

See aggregate, transform, and apply functions on this object.

It's easiest to use obj.groupby(...) to use GroupBy, but you can also do:

::

    grouped = groupby(obj, ...)

Parameters
----------
obj : pandas object
axis : int, default 0
level : int, default None
    Level of MultiIndex
groupings : list of Grouping objects
    Most users should ignore this
exclusions : array-like, optional
    List of columns to exclude
name : str
    Most users should ignore this

Returns
-------
**Attributes**
groups : dict
    {group name -> group labels}
len(grouped) : int
    Number of groups

Notes
-----
After grouping, see aggregate, apply, and transform functions. Here are
some other brief notes about usage. When grouping by multiple groups, the
result index will be a MultiIndex (hierarchical) by default.

Iteration produces (key, group) tuples, i.e. chunking the data by group. So
you can write code like:

::

    grouped = obj.groupby(keys, axis=axis)
    for key, group in grouped:
        # do something with the data

Function calls on GroupBy, if not specially implemented, "dispatch" to the
grouped data. So if you group a DataFrame and wish to invoke the std()
method on each group, you can simply do:

::

    df.groupby(mapper).std()

rather than

::

    df.groupby(mapper).aggregate(np.std)

You can pass arguments to these "wrapped" functions, too.

See the online documentation for full exposition on these topics and much
more

---
## get_groupby
```python
from groupby import get_groupby
```



---
## _insert_quantile_level
```python
from groupby import _insert_quantile_level
```

Insert the sequence 'qs' of quantiles as the inner-most level of a MultiIndex.

The quantile level in the MultiIndex is a repeated copy of 'qs'.

Parameters
----------
idx : Index
qs : np.ndarray[float64]

Returns
-------
MultiIndex

---
## __init__
```python
from groupby import __init__
```



---
## __call__
```python
from groupby import __call__
```



---
## __getattr__
```python
from groupby import __getattr__
```



---
## __len__
```python
from groupby import __len__
```



---
## __repr__
```python
from groupby import __repr__
```



---
## grouper
```python
from groupby import grouper
```



---
## groups
```python
from groupby import groups
```

Dict {group name -> group labels}.

Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 3], index=lst)
>>> ser
a    1
a    2
b    3
dtype: int64
>>> ser.groupby(level=0).groups
{'a': ['a', 'a'], 'b': ['b']}

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"])
>>> df
   a  b  c
0  1  2  3
1  1  5  6
2  7  8  9
>>> df.groupby(by=["a"]).groups
{1: [0, 1], 7: [2]}

For Resampler:

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').groups
{Timestamp('2023-01-01 00:00:00'): 2, Timestamp('2023-02-01 00:00:00'): 4}

---
## ngroups
```python
from groupby import ngroups
```



---
## indices
```python
from groupby import indices
```

Dict {group name -> group indices}.

Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 3], index=lst)
>>> ser
a    1
a    2
b    3
dtype: int64
>>> ser.groupby(level=0).indices
{'a': array([0, 1]), 'b': array([2])}

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["owl", "toucan", "eagle"])
>>> df
        a  b  c
owl     1  2  3
toucan  1  5  6
eagle   7  8  9
>>> df.groupby(by=["a"]).indices
{1: array([0, 1]), 7: array([2])}

For Resampler:

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').indices
defaultdict(<class 'list'>, {Timestamp('2023-01-01 00:00:00'): [0, 1],
Timestamp('2023-02-01 00:00:00'): [2, 3]})

---
## _get_indices
```python
from groupby import _get_indices
```

Safe get multiple indices, translate keys for
datelike to underlying repr.

---
## _get_index
```python
from groupby import _get_index
```

Safe get index, translate keys for datelike to underlying repr.

---
## _selected_obj
```python
from groupby import _selected_obj
```



---
## _dir_additions
```python
from groupby import _dir_additions
```



---
## pipe
```python
from groupby import pipe
```



---
## get_group
```python
from groupby import get_group
```

Construct DataFrame from group with provided name.

Parameters
----------
name : object
    The name of the group to get as a DataFrame.
obj : DataFrame, default None
    The DataFrame to take the DataFrame out of.  If
    it is None, the object groupby was called on will
    be used.

    .. deprecated:: 2.1.0
        The obj is deprecated and will be removed in a future version.
        Do ``df.iloc[gb.indices.get(name)]``
        instead of ``gb.get_group(name, obj=df)``.

Returns
-------
same type as obj

Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 3], index=lst)
>>> ser
a    1
a    2
b    3
dtype: int64
>>> ser.groupby(level=0).get_group("a")
a    1
a    2
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["owl", "toucan", "eagle"])
>>> df
        a  b  c
owl     1  2  3
toucan  1  5  6
eagle   7  8  9
>>> df.groupby(by=["a"]).get_group((1,))
        a  b  c
owl     1  2  3
toucan  1  5  6

For Resampler:

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').get_group('2023-01-01')
2023-01-01    1
2023-01-15    2
dtype: int64

---
## __iter__
```python
from groupby import __iter__
```

Groupby iterator.

Returns
-------
Generator yielding sequence of (name, subsetted object)
for each group

Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 3], index=lst)
>>> ser
a    1
a    2
b    3
dtype: int64
>>> for x, y in ser.groupby(level=0):
...     print(f'{x}\n{y}\n')
a
a    1
a    2
dtype: int64
b
b    3
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"])
>>> df
   a  b  c
0  1  2  3
1  1  5  6
2  7  8  9
>>> for x, y in df.groupby(by=["a"]):
...     print(f'{x}\n{y}\n')
(1,)
   a  b  c
0  1  2  3
1  1  5  6
(7,)
   a  b  c
2  7  8  9

For Resampler:

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> for x, y in ser.resample('MS'):
...     print(f'{x}\n{y}\n')
2023-01-01 00:00:00
2023-01-01    1
2023-01-15    2
dtype: int64
2023-02-01 00:00:00
2023-02-01    3
2023-02-15    4
dtype: int64

---
## _deprecate_axis
```python
from groupby import _deprecate_axis
```



---
## _op_via_apply
```python
from groupby import _op_via_apply
```

Compute the result of an operation by using GroupBy's apply.

---
## _concat_objects
```python
from groupby import _concat_objects
```



---
## _set_result_index_ordered
```python
from groupby import _set_result_index_ordered
```



---
## _insert_inaxis_grouper
```python
from groupby import _insert_inaxis_grouper
```



---
## _maybe_transpose_result
```python
from groupby import _maybe_transpose_result
```



---
## _wrap_aggregated_output
```python
from groupby import _wrap_aggregated_output
```

Wraps the output of GroupBy aggregations into the expected result.

Parameters
----------
result : Series, DataFrame

Returns
-------
Series or DataFrame

---
## _wrap_applied_output
```python
from groupby import _wrap_applied_output
```



---
## _numba_prep
```python
from groupby import _numba_prep
```



---
## _numba_agg_general
```python
from groupby import _numba_agg_general
```

Perform groupby with a standard numerical aggregation function (e.g. mean)
with Numba.

---
## _transform_with_numba
```python
from groupby import _transform_with_numba
```

Perform groupby transform routine with the numba engine.

This routine mimics the data splitting routine of the DataSplitter class
to generate the indices of each group in the sorted data and then passes the
data and indices into a Numba jitted function.

---
## _aggregate_with_numba
```python
from groupby import _aggregate_with_numba
```

Perform groupby aggregation routine with the numba engine.

This routine mimics the data splitting routine of the DataSplitter class
to generate the indices of each group in the sorted data and then passes the
data and indices into a Numba jitted function.

---
## apply
```python
from groupby import apply
```



---
## _python_apply_general
```python
from groupby import _python_apply_general
```

Apply function f in python space

Parameters
----------
f : callable
    Function to apply
data : Series or DataFrame
    Data to apply f to
not_indexed_same: bool, optional
    When specified, overrides the value of not_indexed_same. Apply behaves
    differently when the result index is equal to the input index, but
    this can be coincidental leading to value-dependent behavior.
is_transform : bool, default False
    Indicator for whether the function is actually a transform
    and should not have group keys prepended.
is_agg : bool, default False
    Indicator for whether the function is an aggregation. When the
    result is empty, we don't want to warn for this case.
    See _GroupBy._python_agg_general.

Returns
-------
Series or DataFrame
    data after applying f

---
## _agg_general
```python
from groupby import _agg_general
```



---
## _agg_py_fallback
```python
from groupby import _agg_py_fallback
```

Fallback to pure-python aggregation if _cython_operation raises
NotImplementedError.

---
## _cython_agg_general
```python
from groupby import _cython_agg_general
```



---
## _cython_transform
```python
from groupby import _cython_transform
```



---
## _transform
```python
from groupby import _transform
```



---
## _wrap_transform_fast_result
```python
from groupby import _wrap_transform_fast_result
```

Fast transform path for aggregations.

---
## _apply_filter
```python
from groupby import _apply_filter
```



---
## _cumcount_array
```python
from groupby import _cumcount_array
```

Parameters
----------
ascending : bool, default True
    If False, number in reverse, from length of group - 1 to 0.

Notes
-----
this is currently implementing sort=False
(though the default is sort=True) for groupby in general

---
## _obj_1d_constructor
```python
from groupby import _obj_1d_constructor
```



---
## any
```python
from groupby import any
```

Return True if any value in the group is truthful, else False.

Parameters
----------
skipna : bool, default True
    Flag to ignore nan values during truth testing.

Returns
-------
Series or DataFrame
    DataFrame or Series of boolean values, where a value is True if any element
    is True within its respective group, False otherwise.
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 0], index=lst)
>>> ser
a    1
a    2
b    0
dtype: int64
>>> ser.groupby(level=0).any()
a     True
b    False
dtype: bool

For DataFrameGroupBy:

>>> data = [[1, 0, 3], [1, 0, 6], [7, 1, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["ostrich", "penguin", "parrot"])
>>> df
         a  b  c
ostrich  1  0  3
penguin  1  0  6
parrot   7  1  9
>>> df.groupby(by=["a"]).any()
       b      c
a
1  False   True
7   True   True

---
## all
```python
from groupby import all
```

Return True if all values in the group are truthful, else False.

Parameters
----------
skipna : bool, default True
    Flag to ignore nan values during truth testing.

Returns
-------
Series or DataFrame
    DataFrame or Series of boolean values, where a value is True if all elements
    are True within its respective group, False otherwise.
%(see_also)s
Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 0], index=lst)
>>> ser
a    1
a    2
b    0
dtype: int64
>>> ser.groupby(level=0).all()
a     True
b    False
dtype: bool

For DataFrameGroupBy:

>>> data = [[1, 0, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["ostrich", "penguin", "parrot"])
>>> df
         a  b  c
ostrich  1  0  3
penguin  1  5  6
parrot   7  8  9
>>> df.groupby(by=["a"]).all()
       b      c
a
1  False   True
7   True   True

---
## count
```python
from groupby import count
```

Compute count of group, excluding missing values.

Returns
-------
Series or DataFrame
    Count of values within each group.
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, np.nan], index=lst)
>>> ser
a    1.0
a    2.0
b    NaN
dtype: float64
>>> ser.groupby(level=0).count()
a    2
b    0
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, np.nan, 3], [1, np.nan, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["cow", "horse", "bull"])
>>> df
        a         b     c
cow     1       NaN     3
horse   1       NaN     6
bull    7       8.0     9
>>> df.groupby("a").count()
    b   c
a
1   0   2
7   1   1

For Resampler:

>>> ser = pd.Series([1, 2, 3, 4], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01', '2023-02-15']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
2023-02-15    4
dtype: int64
>>> ser.resample('MS').count()
2023-01-01    2
2023-02-01    2
Freq: MS, dtype: int64

---
## mean
```python
from groupby import mean
```

Compute mean of groups, excluding missing values.

Parameters
----------
numeric_only : bool, default False
    Include only float, int, boolean columns.

    .. versionchanged:: 2.0.0

        numeric_only no longer accepts ``None`` and defaults to ``False``.

engine : str, default None
    * ``'cython'`` : Runs the operation through C-extensions from cython.
    * ``'numba'`` : Runs the operation through JIT compiled code from numba.
    * ``None`` : Defaults to ``'cython'`` or globally setting
      ``compute.use_numba``

    .. versionadded:: 1.4.0

engine_kwargs : dict, default None
    * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
    * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
      and ``parallel`` dictionary keys. The values must either be ``True`` or
      ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
      ``{{'nopython': True, 'nogil': False, 'parallel': False}}``

    .. versionadded:: 1.4.0

Returns
-------
pandas.Series or pandas.DataFrame
%(see_also)s
Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 2, 1, 2],
...                    'B': [np.nan, 2, 3, 4, 5],
...                    'C': [1, 2, 1, 1, 2]}, columns=['A', 'B', 'C'])

Groupby one column and return the mean of the remaining columns in
each group.

>>> df.groupby('A').mean()
     B         C
A
1  3.0  1.333333
2  4.0  1.500000

Groupby two columns and return the mean of the remaining column.

>>> df.groupby(['A', 'B']).mean()
         C
A B
1 2.0  2.0
  4.0  1.0
2 3.0  1.0
  5.0  2.0

Groupby one column and return the mean of only particular column in
the group.

>>> df.groupby('A')['B'].mean()
A
1    3.0
2    4.0
Name: B, dtype: float64

---
## median
```python
from groupby import median
```

Compute median of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex

Parameters
----------
numeric_only : bool, default False
    Include only float, int, boolean columns.

    .. versionchanged:: 2.0.0

        numeric_only no longer accepts ``None`` and defaults to False.

Returns
-------
Series or DataFrame
    Median of values within each group.

Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([7, 2, 8, 4, 3, 3], index=lst)
>>> ser
a     7
a     2
a     8
b     4
b     3
b     3
dtype: int64
>>> ser.groupby(level=0).median()
a    7.0
b    3.0
dtype: float64

For DataFrameGroupBy:

>>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]}
>>> df = pd.DataFrame(data, index=['dog', 'dog', 'dog',
...                   'mouse', 'mouse', 'mouse', 'mouse'])
>>> df
         a  b
  dog    1  1
  dog    3  4
  dog    5  8
mouse    7  4
mouse    7  4
mouse    8  2
mouse    3  1
>>> df.groupby(level=0).median()
         a    b
dog    3.0  4.0
mouse  7.0  3.0

For Resampler:

>>> ser = pd.Series([1, 2, 3, 3, 4, 5],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').median()
2023-01-01    2.0
2023-02-01    4.0
Freq: MS, dtype: float64

---
## std
```python
from groupby import std
```

Compute standard deviation of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex.

Parameters
----------
ddof : int, default 1
    Degrees of freedom.

engine : str, default None
    * ``'cython'`` : Runs the operation through C-extensions from cython.
    * ``'numba'`` : Runs the operation through JIT compiled code from numba.
    * ``None`` : Defaults to ``'cython'`` or globally setting
      ``compute.use_numba``

    .. versionadded:: 1.4.0

engine_kwargs : dict, default None
    * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
    * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
      and ``parallel`` dictionary keys. The values must either be ``True`` or
      ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
      ``{{'nopython': True, 'nogil': False, 'parallel': False}}``

    .. versionadded:: 1.4.0

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
Series or DataFrame
    Standard deviation of values within each group.
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([7, 2, 8, 4, 3, 3], index=lst)
>>> ser
a     7
a     2
a     8
b     4
b     3
b     3
dtype: int64
>>> ser.groupby(level=0).std()
a    3.21455
b    0.57735
dtype: float64

For DataFrameGroupBy:

>>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]}
>>> df = pd.DataFrame(data, index=['dog', 'dog', 'dog',
...                   'mouse', 'mouse', 'mouse', 'mouse'])
>>> df
         a  b
  dog    1  1
  dog    3  4
  dog    5  8
mouse    7  4
mouse    7  4
mouse    8  2
mouse    3  1
>>> df.groupby(level=0).std()
              a         b
dog    2.000000  3.511885
mouse  2.217356  1.500000

---
## var
```python
from groupby import var
```

Compute variance of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex.

Parameters
----------
ddof : int, default 1
    Degrees of freedom.

engine : str, default None
    * ``'cython'`` : Runs the operation through C-extensions from cython.
    * ``'numba'`` : Runs the operation through JIT compiled code from numba.
    * ``None`` : Defaults to ``'cython'`` or globally setting
      ``compute.use_numba``

    .. versionadded:: 1.4.0

engine_kwargs : dict, default None
    * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
    * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
      and ``parallel`` dictionary keys. The values must either be ``True`` or
      ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
      ``{{'nopython': True, 'nogil': False, 'parallel': False}}``

    .. versionadded:: 1.4.0

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
Series or DataFrame
    Variance of values within each group.
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([7, 2, 8, 4, 3, 3], index=lst)
>>> ser
a     7
a     2
a     8
b     4
b     3
b     3
dtype: int64
>>> ser.groupby(level=0).var()
a    10.333333
b     0.333333
dtype: float64

For DataFrameGroupBy:

>>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]}
>>> df = pd.DataFrame(data, index=['dog', 'dog', 'dog',
...                   'mouse', 'mouse', 'mouse', 'mouse'])
>>> df
         a  b
  dog    1  1
  dog    3  4
  dog    5  8
mouse    7  4
mouse    7  4
mouse    8  2
mouse    3  1
>>> df.groupby(level=0).var()
              a          b
dog    4.000000  12.333333
mouse  4.916667   2.250000

---
## _value_counts
```python
from groupby import _value_counts
```

Shared implementation of value_counts for SeriesGroupBy and DataFrameGroupBy.

SeriesGroupBy additionally supports a bins argument. See the docstring of
DataFrameGroupBy.value_counts for a description of arguments.

---
## sem
```python
from groupby import sem
```

Compute standard error of the mean of groups, excluding missing values.

For multiple groupings, the result index will be a MultiIndex.

Parameters
----------
ddof : int, default 1
    Degrees of freedom.

numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
Series or DataFrame
    Standard error of the mean of values within each group.

Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'b', 'b']
>>> ser = pd.Series([5, 10, 8, 14], index=lst)
>>> ser
a     5
a    10
b     8
b    14
dtype: int64
>>> ser.groupby(level=0).sem()
a    2.5
b    3.0
dtype: float64

For DataFrameGroupBy:

>>> data = [[1, 12, 11], [1, 15, 2], [2, 5, 8], [2, 6, 12]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["tuna", "salmon", "catfish", "goldfish"])
>>> df
           a   b   c
    tuna   1  12  11
  salmon   1  15   2
 catfish   2   5   8
goldfish   2   6  12
>>> df.groupby("a").sem()
      b  c
a
1    1.5  4.5
2    0.5  2.0

For Resampler:

>>> ser = pd.Series([1, 3, 2, 4, 3, 8],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').sem()
2023-01-01    0.577350
2023-02-01    1.527525
Freq: MS, dtype: float64

---
## size
```python
from groupby import size
```

Compute group sizes.

Returns
-------
DataFrame or Series
    Number of rows in each group as a Series if as_index is True
    or a DataFrame if as_index is False.
%(see_also)s
Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([1, 2, 3], index=lst)
>>> ser
a     1
a     2
b     3
dtype: int64
>>> ser.groupby(level=0).size()
a    2
b    1
dtype: int64

>>> data = [[1, 2, 3], [1, 5, 6], [7, 8, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["owl", "toucan", "eagle"])
>>> df
        a  b  c
owl     1  2  3
toucan  1  5  6
eagle   7  8  9
>>> df.groupby("a").size()
a
1    2
7    1
dtype: int64

For Resampler:

>>> ser = pd.Series([1, 2, 3], index=pd.DatetimeIndex(
...                 ['2023-01-01', '2023-01-15', '2023-02-01']))
>>> ser
2023-01-01    1
2023-01-15    2
2023-02-01    3
dtype: int64
>>> ser.resample('MS').size()
2023-01-01    2
2023-02-01    1
Freq: MS, dtype: int64

---
## sum
```python
from groupby import sum
```



---
## prod
```python
from groupby import prod
```



---
## min
```python
from groupby import min
```



---
## max
```python
from groupby import max
```



---
## first
```python
from groupby import first
```

Helper function for first item that isn't NA.

---
## last
```python
from groupby import last
```

Helper function for last item that isn't NA.

---
## ohlc
```python
from groupby import ohlc
```

Compute open, high, low and close values of a group, excluding missing values.

For multiple groupings, the result index will be a MultiIndex

Returns
-------
DataFrame
    Open, high, low and close values within each group.

Examples
--------

For SeriesGroupBy:

>>> lst = ['SPX', 'CAC', 'SPX', 'CAC', 'SPX', 'CAC', 'SPX', 'CAC',]
>>> ser = pd.Series([3.4, 9.0, 7.2, 5.2, 8.8, 9.4, 0.1, 0.5], index=lst)
>>> ser
SPX     3.4
CAC     9.0
SPX     7.2
CAC     5.2
SPX     8.8
CAC     9.4
SPX     0.1
CAC     0.5
dtype: float64
>>> ser.groupby(level=0).ohlc()
     open  high  low  close
CAC   9.0   9.4  0.5    0.5
SPX   3.4   8.8  0.1    0.1

For DataFrameGroupBy:

>>> data = {2022: [1.2, 2.3, 8.9, 4.5, 4.4, 3, 2 , 1],
...         2023: [3.4, 9.0, 7.2, 5.2, 8.8, 9.4, 8.2, 1.0]}
>>> df = pd.DataFrame(data, index=['SPX', 'CAC', 'SPX', 'CAC',
...                   'SPX', 'CAC', 'SPX', 'CAC'])
>>> df
     2022  2023
SPX   1.2   3.4
CAC   2.3   9.0
SPX   8.9   7.2
CAC   4.5   5.2
SPX   4.4   8.8
CAC   3.0   9.4
SPX   2.0   8.2
CAC   1.0   1.0
>>> df.groupby(level=0).ohlc()
    2022                 2023
    open high  low close open high  low close
CAC  2.3  4.5  1.0   1.0  9.0  9.4  1.0   1.0
SPX  1.2  8.9  1.2   2.0  3.4  8.8  3.4   8.2

For Resampler:

>>> ser = pd.Series([1, 3, 2, 4, 3, 5],
...                 index=pd.DatetimeIndex(['2023-01-01',
...                                         '2023-01-10',
...                                         '2023-01-15',
...                                         '2023-02-01',
...                                         '2023-02-10',
...                                         '2023-02-15']))
>>> ser.resample('MS').ohlc()
            open  high  low  close
2023-01-01     1     3    1      2
2023-02-01     4     5    3      5

---
## describe
```python
from groupby import describe
```



---
## resample
```python
from groupby import resample
```

Provide resampling when using a TimeGrouper.

Given a grouper, the function resamples it according to a string
"string" -> "frequency".

See the :ref:`frequency aliases <timeseries.offset_aliases>`
documentation for more details.

Parameters
----------
rule : str or DateOffset
    The offset string or object representing target grouper conversion.
*args
    Possible arguments are `how`, `fill_method`, `limit`, `kind` and
    `on`, and other arguments of `TimeGrouper`.
include_groups : bool, default True
    When True, will attempt to include the groupings in the operation in
    the case that they are columns of the DataFrame. If this raises a
    TypeError, the result will be computed with the groupings excluded.
    When False, the groupings will be excluded when applying ``func``.

    .. versionadded:: 2.2.0

    .. deprecated:: 2.2.0

       Setting include_groups to True is deprecated. Only the value
       False will be allowed in a future version of pandas.

**kwargs
    Possible arguments are `how`, `fill_method`, `limit`, `kind` and
    `on`, and other arguments of `TimeGrouper`.

Returns
-------
pandas.api.typing.DatetimeIndexResamplerGroupby,
pandas.api.typing.PeriodIndexResamplerGroupby, or
pandas.api.typing.TimedeltaIndexResamplerGroupby
    Return a new groupby object, with type depending on the data
    being resampled.

See Also
--------
Grouper : Specify a frequency to resample with when
    grouping by a key.
DatetimeIndex.resample : Frequency conversion and resampling of
    time series.

Examples
--------
>>> idx = pd.date_range('1/1/2000', periods=4, freq='min')
>>> df = pd.DataFrame(data=4 * [range(2)],
...                   index=idx,
...                   columns=['a', 'b'])
>>> df.iloc[2, 0] = 5
>>> df
                    a  b
2000-01-01 00:00:00  0  1
2000-01-01 00:01:00  0  1
2000-01-01 00:02:00  5  1
2000-01-01 00:03:00  0  1

Downsample the DataFrame into 3 minute bins and sum the values of
the timestamps falling into a bin.

>>> df.groupby('a').resample('3min', include_groups=False).sum()
                         b
a
0   2000-01-01 00:00:00  2
    2000-01-01 00:03:00  1
5   2000-01-01 00:00:00  1

Upsample the series into 30 second bins.

>>> df.groupby('a').resample('30s', include_groups=False).sum()
                    b
a
0   2000-01-01 00:00:00  1
    2000-01-01 00:00:30  0
    2000-01-01 00:01:00  1
    2000-01-01 00:01:30  0
    2000-01-01 00:02:00  0
    2000-01-01 00:02:30  0
    2000-01-01 00:03:00  1
5   2000-01-01 00:02:00  1

Resample by month. Values are assigned to the month of the period.

>>> df.groupby('a').resample('ME', include_groups=False).sum()
            b
a
0   2000-01-31  3
5   2000-01-31  1

Downsample the series into 3 minute bins as above, but close the right
side of the bin interval.

>>> (
...     df.groupby('a')
...     .resample('3min', closed='right', include_groups=False)
...     .sum()
... )
                         b
a
0   1999-12-31 23:57:00  1
    2000-01-01 00:00:00  2
5   2000-01-01 00:00:00  1

Downsample the series into 3 minute bins and close the right side of
the bin interval, but label each bin using the right edge instead of
the left.

>>> (
...     df.groupby('a')
...     .resample('3min', closed='right', label='right', include_groups=False)
...     .sum()
... )
                         b
a
0   2000-01-01 00:00:00  1
    2000-01-01 00:03:00  2
5   2000-01-01 00:03:00  1

---
## rolling
```python
from groupby import rolling
```

Return a rolling grouper, providing rolling functionality per group.

Parameters
----------
window : int, timedelta, str, offset, or BaseIndexer subclass
    Size of the moving window.

    If an integer, the fixed number of observations used for
    each window.

    If a timedelta, str, or offset, the time period of each window. Each
    window will be a variable sized based on the observations included in
    the time-period. This is only valid for datetimelike indexes.
    To learn more about the offsets & frequency strings, please see `this link
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

    If a BaseIndexer subclass, the window boundaries
    based on the defined ``get_window_bounds`` method. Additional rolling
    keyword arguments, namely ``min_periods``, ``center``, ``closed`` and
    ``step`` will be passed to ``get_window_bounds``.

min_periods : int, default None
    Minimum number of observations in window required to have a value;
    otherwise, result is ``np.nan``.

    For a window that is specified by an offset,
    ``min_periods`` will default to 1.

    For a window that is specified by an integer, ``min_periods`` will default
    to the size of the window.

center : bool, default False
    If False, set the window labels as the right edge of the window index.

    If True, set the window labels as the center of the window index.

win_type : str, default None
    If ``None``, all points are evenly weighted.

    If a string, it must be a valid `scipy.signal window function
    <https://docs.scipy.org/doc/scipy/reference/signal.windows.html#module-scipy.signal.windows>`__.

    Certain Scipy window types require additional parameters to be passed
    in the aggregation function. The additional parameters must match
    the keywords specified in the Scipy window type method signature.

on : str, optional
    For a DataFrame, a column label or Index level on which
    to calculate the rolling window, rather than the DataFrame's index.

    Provided integer column is ignored and excluded from result since
    an integer index is not used to calculate the rolling window.

axis : int or str, default 0
    If ``0`` or ``'index'``, roll across the rows.

    If ``1`` or ``'columns'``, roll across the columns.

    For `Series` this parameter is unused and defaults to 0.

closed : str, default None
    If ``'right'``, the first point in the window is excluded from calculations.

    If ``'left'``, the last point in the window is excluded from calculations.

    If ``'both'``, no points in the window are excluded from calculations.

    If ``'neither'``, the first and last points in the window are excluded
    from calculations.

    Default ``None`` (``'right'``).

method : str {'single', 'table'}, default 'single'
    Execute the rolling operation per single column or row (``'single'``)
    or over the entire object (``'table'``).

    This argument is only implemented when specifying ``engine='numba'``
    in the method call.

Returns
-------
pandas.api.typing.RollingGroupby
    Return a new grouper with our rolling appended.

See Also
--------
Series.rolling : Calling object with Series data.
DataFrame.rolling : Calling object with DataFrames.
Series.groupby : Apply a function groupby to a Series.
DataFrame.groupby : Apply a function groupby.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 1, 2, 2],
...                    'B': [1, 2, 3, 4],
...                    'C': [0.362, 0.227, 1.267, -0.562]})
>>> df
      A  B      C
0     1  1  0.362
1     1  2  0.227
2     2  3  1.267
3     2  4 -0.562

>>> df.groupby('A').rolling(2).sum()
    B      C
A
1 0  NaN    NaN
  1  3.0  0.589
2 2  NaN    NaN
  3  7.0  0.705

>>> df.groupby('A').rolling(2, min_periods=1).sum()
    B      C
A
1 0  1.0  0.362
  1  3.0  0.589
2 2  3.0  1.267
  3  7.0  0.705

>>> df.groupby('A').rolling(2, on='B').sum()
    B      C
A
1 0  1    NaN
  1  2  0.589
2 2  3    NaN
  3  4  0.705

---
## expanding
```python
from groupby import expanding
```

Return an expanding grouper, providing expanding
functionality per group.

Returns
-------
pandas.api.typing.ExpandingGroupby

---
## ewm
```python
from groupby import ewm
```

Return an ewm grouper, providing ewm functionality per group.

Returns
-------
pandas.api.typing.ExponentialMovingWindowGroupby

---
## _fill
```python
from groupby import _fill
```

Shared function for `pad` and `backfill` to call Cython method.

Parameters
----------
direction : {'ffill', 'bfill'}
    Direction passed to underlying Cython function. `bfill` will cause
    values to be filled backwards. `ffill` and any other values will
    default to a forward fill
limit : int, default None
    Maximum number of consecutive values to fill. If `None`, this
    method will convert to -1 prior to passing to Cython

Returns
-------
`Series` or `DataFrame` with filled values

See Also
--------
pad : Returns Series with minimum number of char in object.
backfill : Backward fill the missing values in the dataset.

---
## ffill
```python
from groupby import ffill
```

Forward fill the values.

Parameters
----------
limit : int, optional
    Limit of how many values to fill.

Returns
-------
Series or DataFrame
    Object with missing values filled.

See Also
--------
Series.ffill: Returns Series with minimum number of char in object.
DataFrame.ffill: Object with missing values filled or None if inplace=True.
Series.fillna: Fill NaN values of a Series.
DataFrame.fillna: Fill NaN values of a DataFrame.

Examples
--------

For SeriesGroupBy:

>>> key = [0, 0, 1, 1]
>>> ser = pd.Series([np.nan, 2, 3, np.nan], index=key)
>>> ser
0    NaN
0    2.0
1    3.0
1    NaN
dtype: float64
>>> ser.groupby(level=0).ffill()
0    NaN
0    2.0
1    3.0
1    3.0
dtype: float64

For DataFrameGroupBy:

>>> df = pd.DataFrame(
...     {
...         "key": [0, 0, 1, 1, 1],
...         "A": [np.nan, 2, np.nan, 3, np.nan],
...         "B": [2, 3, np.nan, np.nan, np.nan],
...         "C": [np.nan, np.nan, 2, np.nan, np.nan],
...     }
... )
>>> df
   key    A    B   C
0    0  NaN  2.0 NaN
1    0  2.0  3.0 NaN
2    1  NaN  NaN 2.0
3    1  3.0  NaN NaN
4    1  NaN  NaN NaN

Propagate non-null values forward or backward within each group along columns.

>>> df.groupby("key").ffill()
     A    B   C
0  NaN  2.0 NaN
1  2.0  3.0 NaN
2  NaN  NaN 2.0
3  3.0  NaN 2.0
4  3.0  NaN 2.0

Propagate non-null values forward or backward within each group along rows.

>>> df.T.groupby(np.array([0, 0, 1, 1])).ffill().T
   key    A    B    C
0  0.0  0.0  2.0  2.0
1  0.0  2.0  3.0  3.0
2  1.0  1.0  NaN  2.0
3  1.0  3.0  NaN  NaN
4  1.0  1.0  NaN  NaN

Only replace the first NaN element within a group along rows.

>>> df.groupby("key").ffill(limit=1)
     A    B    C
0  NaN  2.0  NaN
1  2.0  3.0  NaN
2  NaN  NaN  2.0
3  3.0  NaN  2.0
4  3.0  NaN  NaN

---
## bfill
```python
from groupby import bfill
```

Backward fill the values.

Parameters
----------
limit : int, optional
    Limit of how many values to fill.

Returns
-------
Series or DataFrame
    Object with missing values filled.

See Also
--------
Series.bfill :  Backward fill the missing values in the dataset.
DataFrame.bfill:  Backward fill the missing values in the dataset.
Series.fillna: Fill NaN values of a Series.
DataFrame.fillna: Fill NaN values of a DataFrame.

Examples
--------

With Series:

>>> index = ['Falcon', 'Falcon', 'Parrot', 'Parrot', 'Parrot']
>>> s = pd.Series([None, 1, None, None, 3], index=index)
>>> s
Falcon    NaN
Falcon    1.0
Parrot    NaN
Parrot    NaN
Parrot    3.0
dtype: float64
>>> s.groupby(level=0).bfill()
Falcon    1.0
Falcon    1.0
Parrot    3.0
Parrot    3.0
Parrot    3.0
dtype: float64
>>> s.groupby(level=0).bfill(limit=1)
Falcon    1.0
Falcon    1.0
Parrot    NaN
Parrot    3.0
Parrot    3.0
dtype: float64

With DataFrame:

>>> df = pd.DataFrame({'A': [1, None, None, None, 4],
...                    'B': [None, None, 5, None, 7]}, index=index)
>>> df
          A         B
Falcon  1.0       NaN
Falcon  NaN       NaN
Parrot  NaN       5.0
Parrot  NaN       NaN
Parrot  4.0       7.0
>>> df.groupby(level=0).bfill()
          A         B
Falcon  1.0       NaN
Falcon  NaN       NaN
Parrot  4.0       5.0
Parrot  4.0       7.0
Parrot  4.0       7.0
>>> df.groupby(level=0).bfill(limit=1)
          A         B
Falcon  1.0       NaN
Falcon  NaN       NaN
Parrot  NaN       5.0
Parrot  4.0       7.0
Parrot  4.0       7.0

---
## nth
```python
from groupby import nth
```

Take the nth row from each group if n is an int, otherwise a subset of rows.

Can be either a call or an index. dropna is not available with index notation.
Index notation accepts a comma separated list of integers and slices.

If dropna, will take the nth non-null row, dropna is either
'all' or 'any'; this is equivalent to calling dropna(how=dropna)
before the groupby.

Parameters
----------
n : int, slice or list of ints and slices
    A single nth value for the row or a list of nth values or slices.

    .. versionchanged:: 1.4.0
        Added slice and lists containing slices.
        Added index notation.

dropna : {'any', 'all', None}, default None
    Apply the specified dropna operation before counting which row is
    the nth row. Only supported if n is an int.

Returns
-------
Series or DataFrame
    N-th value within each group.
%(see_also)s
Examples
--------

>>> df = pd.DataFrame({'A': [1, 1, 2, 1, 2],
...                    'B': [np.nan, 2, 3, 4, 5]}, columns=['A', 'B'])
>>> g = df.groupby('A')
>>> g.nth(0)
   A   B
0  1 NaN
2  2 3.0
>>> g.nth(1)
   A   B
1  1 2.0
4  2 5.0
>>> g.nth(-1)
   A   B
3  1 4.0
4  2 5.0
>>> g.nth([0, 1])
   A   B
0  1 NaN
1  1 2.0
2  2 3.0
4  2 5.0
>>> g.nth(slice(None, -1))
   A   B
0  1 NaN
1  1 2.0
2  2 3.0

Index notation may also be used

>>> g.nth[0, 1]
   A   B
0  1 NaN
1  1 2.0
2  2 3.0
4  2 5.0
>>> g.nth[:-1]
   A   B
0  1 NaN
1  1 2.0
2  2 3.0

Specifying `dropna` allows ignoring ``NaN`` values

>>> g.nth(0, dropna='any')
   A   B
1  1 2.0
2  2 3.0

When the specified ``n`` is larger than any of the groups, an
empty DataFrame is returned

>>> g.nth(3, dropna='any')
Empty DataFrame
Columns: [A, B]
Index: []

---
## _nth
```python
from groupby import _nth
```



---
## quantile
```python
from groupby import quantile
```

Return group values at the given quantile, a la numpy.percentile.

Parameters
----------
q : float or array-like, default 0.5 (50% quantile)
    Value(s) between 0 and 1 providing the quantile(s) to compute.
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    Method to use when the desired quantile falls between two points.
numeric_only : bool, default False
    Include only `float`, `int` or `boolean` data.

    .. versionadded:: 1.5.0

    .. versionchanged:: 2.0.0

        numeric_only now defaults to ``False``.

Returns
-------
Series or DataFrame
    Return type determined by caller of GroupBy object.

See Also
--------
Series.quantile : Similar method for Series.
DataFrame.quantile : Similar method for DataFrame.
numpy.percentile : NumPy method to compute qth percentile.

Examples
--------
>>> df = pd.DataFrame([
...     ['a', 1], ['a', 2], ['a', 3],
...     ['b', 1], ['b', 3], ['b', 5]
... ], columns=['key', 'val'])
>>> df.groupby('key').quantile()
    val
key
a    2.0
b    3.0

---
## ngroup
```python
from groupby import ngroup
```

Number each group from 0 to the number of groups - 1.

This is the enumerative complement of cumcount.  Note that the
numbers given to the groups match the order in which the groups
would be seen when iterating over the groupby object, not the
order they are first observed.

Groups with missing keys (where `pd.isna()` is True) will be labeled with `NaN`
and will be skipped from the count.

Parameters
----------
ascending : bool, default True
    If False, number in reverse, from number of group - 1 to 0.

Returns
-------
Series
    Unique numbers for each group.

See Also
--------
.cumcount : Number the rows in each group.

Examples
--------
>>> df = pd.DataFrame({"color": ["red", None, "red", "blue", "blue", "red"]})
>>> df
   color
0    red
1   None
2    red
3   blue
4   blue
5    red
>>> df.groupby("color").ngroup()
0    1.0
1    NaN
2    1.0
3    0.0
4    0.0
5    1.0
dtype: float64
>>> df.groupby("color", dropna=False).ngroup()
0    1
1    2
2    1
3    0
4    0
5    1
dtype: int64
>>> df.groupby("color", dropna=False).ngroup(ascending=False)
0    1
1    0
2    1
3    2
4    2
5    1
dtype: int64

---
## cumcount
```python
from groupby import cumcount
```

Number each item in each group from 0 to the length of that group - 1.

Essentially this is equivalent to

.. code-block:: python

    self.apply(lambda x: pd.Series(np.arange(len(x)), x.index))

Parameters
----------
ascending : bool, default True
    If False, number in reverse, from length of group - 1 to 0.

Returns
-------
Series
    Sequence number of each element within each group.

See Also
--------
.ngroup : Number the groups themselves.

Examples
--------
>>> df = pd.DataFrame([['a'], ['a'], ['a'], ['b'], ['b'], ['a']],
...                   columns=['A'])
>>> df
   A
0  a
1  a
2  a
3  b
4  b
5  a
>>> df.groupby('A').cumcount()
0    0
1    1
2    2
3    0
4    1
5    3
dtype: int64
>>> df.groupby('A').cumcount(ascending=False)
0    3
1    2
2    1
3    1
4    0
5    0
dtype: int64

---
## rank
```python
from groupby import rank
```

Provide the rank of values within each group.

Parameters
----------
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
    * average: average rank of group.
    * min: lowest rank in group.
    * max: highest rank in group.
    * first: ranks assigned in order they appear in the array.
    * dense: like 'min', but rank always increases by 1 between groups.
ascending : bool, default True
    False for ranks by high (1) to low (N).
na_option : {'keep', 'top', 'bottom'}, default 'keep'
    * keep: leave NA values where they are.
    * top: smallest rank if ascending.
    * bottom: smallest rank if descending.
pct : bool, default False
    Compute percentage rank of data within each group.
axis : int, default 0
    The axis of the object over which to compute the rank.

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

Returns
-------
DataFrame with ranking of values within each group
%(see_also)s
Examples
--------
>>> df = pd.DataFrame(
...     {
...         "group": ["a", "a", "a", "a", "a", "b", "b", "b", "b", "b"],
...         "value": [2, 4, 2, 3, 5, 1, 2, 4, 1, 5],
...     }
... )
>>> df
  group  value
0     a      2
1     a      4
2     a      2
3     a      3
4     a      5
5     b      1
6     b      2
7     b      4
8     b      1
9     b      5
>>> for method in ['average', 'min', 'max', 'dense', 'first']:
...     df[f'{method}_rank'] = df.groupby('group')['value'].rank(method)
>>> df
  group  value  average_rank  min_rank  max_rank  dense_rank  first_rank
0     a      2           1.5       1.0       2.0         1.0         1.0
1     a      4           4.0       4.0       4.0         3.0         4.0
2     a      2           1.5       1.0       2.0         1.0         2.0
3     a      3           3.0       3.0       3.0         2.0         3.0
4     a      5           5.0       5.0       5.0         4.0         5.0
5     b      1           1.5       1.0       2.0         1.0         1.0
6     b      2           3.0       3.0       3.0         2.0         3.0
7     b      4           4.0       4.0       4.0         3.0         4.0
8     b      1           1.5       1.0       2.0         1.0         2.0
9     b      5           5.0       5.0       5.0         4.0         5.0

---
## cumprod
```python
from groupby import cumprod
```

Cumulative product for each group.

Returns
-------
Series or DataFrame
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([6, 2, 0], index=lst)
>>> ser
a    6
a    2
b    0
dtype: int64
>>> ser.groupby(level=0).cumprod()
a    6
a   12
b    0
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 8, 2], [1, 2, 5], [2, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["cow", "horse", "bull"])
>>> df
        a   b   c
cow     1   8   2
horse   1   2   5
bull    2   6   9
>>> df.groupby("a").groups
{1: ['cow', 'horse'], 2: ['bull']}
>>> df.groupby("a").cumprod()
        b   c
cow     8   2
horse  16  10
bull    6   9

---
## cumsum
```python
from groupby import cumsum
```

Cumulative sum for each group.

Returns
-------
Series or DataFrame
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'b']
>>> ser = pd.Series([6, 2, 0], index=lst)
>>> ser
a    6
a    2
b    0
dtype: int64
>>> ser.groupby(level=0).cumsum()
a    6
a    8
b    0
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 8, 2], [1, 2, 5], [2, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["fox", "gorilla", "lion"])
>>> df
          a   b   c
fox       1   8   2
gorilla   1   2   5
lion      2   6   9
>>> df.groupby("a").groups
{1: ['fox', 'gorilla'], 2: ['lion']}
>>> df.groupby("a").cumsum()
          b   c
fox       8   2
gorilla  10   7
lion      6   9

---
## cummin
```python
from groupby import cummin
```

Cumulative min for each group.

Returns
-------
Series or DataFrame
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([1, 6, 2, 3, 0, 4], index=lst)
>>> ser
a    1
a    6
a    2
b    3
b    0
b    4
dtype: int64
>>> ser.groupby(level=0).cummin()
a    1
a    1
a    1
b    3
b    0
b    0
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 0, 2], [1, 1, 5], [6, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["snake", "rabbit", "turtle"])
>>> df
        a   b   c
snake   1   0   2
rabbit  1   1   5
turtle  6   6   9
>>> df.groupby("a").groups
{1: ['snake', 'rabbit'], 6: ['turtle']}
>>> df.groupby("a").cummin()
        b   c
snake   0   2
rabbit  0   2
turtle  6   9

---
## cummax
```python
from groupby import cummax
```

Cumulative max for each group.

Returns
-------
Series or DataFrame
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([1, 6, 2, 3, 1, 4], index=lst)
>>> ser
a    1
a    6
a    2
b    3
b    1
b    4
dtype: int64
>>> ser.groupby(level=0).cummax()
a    1
a    6
a    6
b    3
b    3
b    4
dtype: int64

For DataFrameGroupBy:

>>> data = [[1, 8, 2], [1, 1, 0], [2, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["cow", "horse", "bull"])
>>> df
        a   b   c
cow     1   8   2
horse   1   1   0
bull    2   6   9
>>> df.groupby("a").groups
{1: ['cow', 'horse'], 2: ['bull']}
>>> df.groupby("a").cummax()
        b   c
cow     8   2
horse   8   2
bull    6   9

---
## shift
```python
from groupby import shift
```

Shift each group by periods observations.

If freq is passed, the index will be increased using the periods and the freq.

Parameters
----------
periods : int | Sequence[int], default 1
    Number of periods to shift. If a list of values, shift each group by
    each period.
freq : str, optional
    Frequency string.
axis : axis to shift, default 0
    Shift direction.

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

fill_value : optional
    The scalar value to use for newly introduced missing values.

    .. versionchanged:: 2.1.0
        Will raise a ``ValueError`` if ``freq`` is provided too.

suffix : str, optional
    A string to add to each shifted column if there are multiple periods.
    Ignored otherwise.

Returns
-------
Series or DataFrame
    Object shifted within each group.

See Also
--------
Index.shift : Shift values of Index.

Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b', 'b']
>>> ser = pd.Series([1, 2, 3, 4], index=lst)
>>> ser
a    1
a    2
b    3
b    4
dtype: int64
>>> ser.groupby(level=0).shift(1)
a    NaN
a    1.0
b    NaN
b    3.0
dtype: float64

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [2, 5, 8], [2, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["tuna", "salmon", "catfish", "goldfish"])
>>> df
           a  b  c
    tuna   1  2  3
  salmon   1  5  6
 catfish   2  5  8
goldfish   2  6  9
>>> df.groupby("a").shift(1)
              b    c
    tuna    NaN  NaN
  salmon    2.0  3.0
 catfish    NaN  NaN
goldfish    5.0  8.0

---
## diff
```python
from groupby import diff
```

First discrete difference of element.

Calculates the difference of each element compared with another
element in the group (default is element in previous row).

Parameters
----------
periods : int, default 1
    Periods to shift for calculating difference, accepts negative values.
axis : axis to shift, default 0
    Take difference over rows (0) or columns (1).

    .. deprecated:: 2.1.0
        For axis=1, operate on the underlying object instead. Otherwise
        the axis keyword is not necessary.

Returns
-------
Series or DataFrame
    First differences.
%(see_also)s
Examples
--------
For SeriesGroupBy:

>>> lst = ['a', 'a', 'a', 'b', 'b', 'b']
>>> ser = pd.Series([7, 2, 8, 4, 3, 3], index=lst)
>>> ser
a     7
a     2
a     8
b     4
b     3
b     3
dtype: int64
>>> ser.groupby(level=0).diff()
a    NaN
a   -5.0
a    6.0
b    NaN
b   -1.0
b    0.0
dtype: float64

For DataFrameGroupBy:

>>> data = {'a': [1, 3, 5, 7, 7, 8, 3], 'b': [1, 4, 8, 4, 4, 2, 1]}
>>> df = pd.DataFrame(data, index=['dog', 'dog', 'dog',
...                   'mouse', 'mouse', 'mouse', 'mouse'])
>>> df
         a  b
  dog    1  1
  dog    3  4
  dog    5  8
mouse    7  4
mouse    7  4
mouse    8  2
mouse    3  1
>>> df.groupby(level=0).diff()
         a    b
  dog  NaN  NaN
  dog  2.0  3.0
  dog  2.0  4.0
mouse  NaN  NaN
mouse  0.0  0.0
mouse  1.0 -2.0
mouse -5.0 -1.0

---
## pct_change
```python
from groupby import pct_change
```

Calculate pct_change of each value to previous entry in group.

Returns
-------
Series or DataFrame
    Percentage changes within each group.
%(see_also)s
Examples
--------

For SeriesGroupBy:

>>> lst = ['a', 'a', 'b', 'b']
>>> ser = pd.Series([1, 2, 3, 4], index=lst)
>>> ser
a    1
a    2
b    3
b    4
dtype: int64
>>> ser.groupby(level=0).pct_change()
a         NaN
a    1.000000
b         NaN
b    0.333333
dtype: float64

For DataFrameGroupBy:

>>> data = [[1, 2, 3], [1, 5, 6], [2, 5, 8], [2, 6, 9]]
>>> df = pd.DataFrame(data, columns=["a", "b", "c"],
...                   index=["tuna", "salmon", "catfish", "goldfish"])
>>> df
           a  b  c
    tuna   1  2  3
  salmon   1  5  6
 catfish   2  5  8
goldfish   2  6  9
>>> df.groupby("a").pct_change()
            b  c
    tuna    NaN    NaN
  salmon    1.5  1.000
 catfish    NaN    NaN
goldfish    0.2  0.125

---
## head
```python
from groupby import head
```

Return first n rows of each group.

Similar to ``.apply(lambda x: x.head(n))``, but it returns a subset of rows
from the original DataFrame with original index and order preserved
(``as_index`` flag is ignored).

Parameters
----------
n : int
    If positive: number of entries to include from start of each group.
    If negative: number of entries to exclude from end of each group.

Returns
-------
Series or DataFrame
    Subset of original Series or DataFrame as determined by n.
%(see_also)s
Examples
--------

>>> df = pd.DataFrame([[1, 2], [1, 4], [5, 6]],
...                   columns=['A', 'B'])
>>> df.groupby('A').head(1)
   A  B
0  1  2
2  5  6
>>> df.groupby('A').head(-1)
   A  B
0  1  2

---
## tail
```python
from groupby import tail
```

Return last n rows of each group.

Similar to ``.apply(lambda x: x.tail(n))``, but it returns a subset of rows
from the original DataFrame with original index and order preserved
(``as_index`` flag is ignored).

Parameters
----------
n : int
    If positive: number of entries to include from end of each group.
    If negative: number of entries to exclude from start of each group.

Returns
-------
Series or DataFrame
    Subset of original Series or DataFrame as determined by n.
%(see_also)s
Examples
--------

>>> df = pd.DataFrame([['a', 1], ['a', 2], ['b', 1], ['b', 2]],
...                   columns=['A', 'B'])
>>> df.groupby('A').tail(1)
   A  B
1  a  2
3  b  2
>>> df.groupby('A').tail(-1)
   A  B
1  a  2
3  b  2

---
## _mask_selected_obj
```python
from groupby import _mask_selected_obj
```

Return _selected_obj with mask applied to the correct axis.

Parameters
----------
mask : np.ndarray[bool]
    Boolean mask to apply.

Returns
-------
Series or DataFrame
    Filtered _selected_obj.

---
## _reindex_output
```python
from groupby import _reindex_output
```

If we have categorical groupers, then we might want to make sure that
we have a fully re-indexed output to the levels. This means expanding
the output space to accommodate all values in the cartesian product of
our groups, regardless of whether they were observed in the data or
not. This will expand the output space if there are missing groups.

The method returns early without modifying the input if the number of
groupings is less than 2, self.observed == True or none of the groupers
are categorical.

Parameters
----------
output : Series or DataFrame
    Object resulting from grouping and applying an operation.
fill_value : scalar, default np.nan
    Value to use for unobserved categories if self.observed is False.
qs : np.ndarray[float64] or None, default None
    quantile values, only relevant for quantile.

Returns
-------
Series or DataFrame
    Object (potentially) re-indexed to include all possible groups.

---
## sample
```python
from groupby import sample
```

Return a random sample of items from each group.

You can use `random_state` for reproducibility.

Parameters
----------
n : int, optional
    Number of items to return for each group. Cannot be used with
    `frac` and must be no larger than the smallest group unless
    `replace` is True. Default is one if `frac` is None.
frac : float, optional
    Fraction of items to return. Cannot be used with `n`.
replace : bool, default False
    Allow or disallow sampling of the same row more than once.
weights : list-like, optional
    Default None results in equal probability weighting.
    If passed a list-like then values must have the same length as
    the underlying DataFrame or Series object and will be used as
    sampling probabilities after normalization within each group.
    Values must be non-negative with at least one positive element
    within each group.
random_state : int, array-like, BitGenerator, np.random.RandomState, np.random.Generator, optional
    If int, array-like, or BitGenerator, seed for random number generator.
    If np.random.RandomState or np.random.Generator, use as given.

    .. versionchanged:: 1.4.0

        np.random.Generator objects now accepted

Returns
-------
Series or DataFrame
    A new object of same type as caller containing items randomly
    sampled within each group from the caller object.

See Also
--------
DataFrame.sample: Generate random samples from a DataFrame object.
numpy.random.choice: Generate a random sample from a given 1-D numpy
    array.

Examples
--------
>>> df = pd.DataFrame(
...     {"a": ["red"] * 2 + ["blue"] * 2 + ["black"] * 2, "b": range(6)}
... )
>>> df
       a  b
0    red  0
1    red  1
2   blue  2
3   blue  3
4  black  4
5  black  5

Select one row at random for each distinct value in column a. The
`random_state` argument can be used to guarantee reproducibility:

>>> df.groupby("a").sample(n=1, random_state=1)
       a  b
4  black  4
2   blue  2
1    red  1

Set `frac` to sample fixed proportions rather than counts:

>>> df.groupby("a")["b"].sample(frac=0.5, random_state=2)
5    5
2    2
0    0
Name: b, dtype: int64

Control sample probabilities within groups by setting weights:

>>> df.groupby("a").sample(
...     n=1,
...     weights=[1, 1, 1, 0, 0, 1],
...     random_state=1,
... )
       a  b
5  black  5
2   blue  2
0    red  0

---
## _idxmax_idxmin
```python
from groupby import _idxmax_idxmin
```

Compute idxmax/idxmin.

Parameters
----------
how : {'idxmin', 'idxmax'}
    Whether to compute idxmin or idxmax.
axis : {{0 or 'index', 1 or 'columns'}}, default None
    The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
    If axis is not provided, grouper's axis is used.
numeric_only : bool, default False
    Include only float, int, boolean columns.
skipna : bool, default True
    Exclude NA/null values. If an entire row/column is NA, the result
    will be NA.
ignore_unobserved : bool, default False
    When True and an unobserved group is encountered, do not raise. This used
    for transform where unobserved groups do not play an impact on the result.

Returns
-------
Series or DataFrame
    idxmax or idxmin for the groupby operation.

---
## _wrap_idxmax_idxmin
```python
from groupby import _wrap_idxmax_idxmin
```



---
## f
```python
from groupby import f
```



---
## attr
```python
from groupby import attr
```



---
## get_converter
```python
from groupby import get_converter
```



---
## curried
```python
from groupby import curried
```



---
## array_func
```python
from groupby import array_func
```



---
## hfunc
```python
from groupby import hfunc
```



---
## first_compat
```python
from groupby import first_compat
```



---
## last_compat
```python
from groupby import last_compat
```



---
## blk_func
```python
from groupby import blk_func
```



---
## pre_processor
```python
from groupby import pre_processor
```



---
## post_processor
```python
from groupby import post_processor
```



---
## func
```python
from groupby import func
```



---
## validate_udf
```python
from numba_ import validate_udf
```

Validate user defined function for ops when using Numba with groupby ops.

The first signature arguments should include:

def f(values, index, ...):
    ...

Parameters
----------
func : function, default False
    user defined function

Returns
-------
None

Raises
------
NumbaUtilError

---
## generate_numba_agg_func
```python
from numba_ import generate_numba_agg_func
```

Generate a numba jitted agg function specified by values from engine_kwargs.

1. jit the user's function
2. Return a groupby agg function with the jitted function inline

Configurations specified in engine_kwargs apply to both the user's
function _AND_ the groupby evaluation loop.

Parameters
----------
func : function
    function to be applied to each group and will be JITed
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## generate_numba_transform_func
```python
from numba_ import generate_numba_transform_func
```

Generate a numba jitted transform function specified by values from engine_kwargs.

1. jit the user's function
2. Return a groupby transform function with the jitted function inline

Configurations specified in engine_kwargs apply to both the user's
function _AND_ the groupby evaluation loop.

Parameters
----------
func : function
    function to be applied to each window and will be JITed
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## group_agg
```python
from numba_ import group_agg
```



---
## group_transform
```python
from numba_ import group_transform
```



---
## OutputKey
```python
from base import OutputKey
```



---
## _concatenate_array_managers
```python
from concat import _concatenate_array_managers
```

Concatenate array managers into one.

Parameters
----------
mgrs_indexers : list of (ArrayManager, {axis: indexer,...}) tuples
axes : list of Index
concat_axis : int

Returns
-------
ArrayManager

---
## concatenate_managers
```python
from concat import concatenate_managers
```

Concatenate block managers into one.

Parameters
----------
mgrs_indexers : list of (BlockManager, {axis: indexer,...}) tuples
axes : list of Index
concat_axis : int
copy : bool

Returns
-------
BlockManager

---
## _maybe_reindex_columns_na_proxy
```python
from concat import _maybe_reindex_columns_na_proxy
```

Reindex along columns so that all of the BlockManagers being concatenated
have matching columns.

Columns added in this reindexing have dtype=np.void, indicating they
should be ignored when choosing a column's final dtype.

---
## _is_homogeneous_mgr
```python
from concat import _is_homogeneous_mgr
```

Check if this Manager can be treated as a single ndarray.

---
## _concat_homogeneous_fastpath
```python
from concat import _concat_homogeneous_fastpath
```

With single-Block managers with homogeneous dtypes (that can already hold nan),
we avoid [...]

---
## _get_combined_plan
```python
from concat import _get_combined_plan
```



---
## _get_block_for_concat_plan
```python
from concat import _get_block_for_concat_plan
```



---
## JoinUnit
```python
from concat import JoinUnit
```



---
## _concatenate_join_units
```python
from concat import _concatenate_join_units
```

Concatenate values from several join units along axis=1.

---
## _dtype_to_na_value
```python
from concat import _dtype_to_na_value
```

Find the NA value to go with this dtype.

---
## _get_empty_dtype
```python
from concat import _get_empty_dtype
```

Return dtype and N/A values to use when concatenating specified units.

Returned N/A value may be None which means there was no casting involved.

Returns
-------
dtype

---
## _is_uniform_join_units
```python
from concat import _is_uniform_join_units
```

Check if the join units consist of blocks of uniform type that can
be concatenated using Block.concat_same_type instead of the generic
_concatenate_join_units (which uses `concat_compat`).

---
## __repr__
```python
from concat import __repr__
```



---
## _is_valid_na_for
```python
from concat import _is_valid_na_for
```

Check that we are all-NA of a type/dtype that is compatible with this dtype.
Augments `self.is_na` with an additional check of the type of NA values.

---
## is_na
```python
from concat import is_na
```



---
## is_na_after_size_and_isna_all_deprecation
```python
from concat import is_na_after_size_and_isna_all_deprecation
```

Will self.is_na be True after values.size == 0 deprecation and isna_all
deprecation are enforced?

---
## get_reindexed_values
```python
from concat import get_reindexed_values
```



---
## arrays_to_mgr
```python
from construction import arrays_to_mgr
```

Segregate Series based on type and coerce into matrices.

Needs to handle a lot of exceptional cases.

---
## rec_array_to_mgr
```python
from construction import rec_array_to_mgr
```

Extract from a masked rec array and create the manager.

---
## mgr_to_mgr
```python
from construction import mgr_to_mgr
```

Convert to specific type of Manager. Does not copy if the type is already
correct. Does not guarantee a copy otherwise. `copy` keyword only controls
whether conversion from Block->ArrayManager copies the 1D arrays.

---
## ndarray_to_mgr
```python
from construction import ndarray_to_mgr
```



---
## _check_values_indices_shape_match
```python
from construction import _check_values_indices_shape_match
```

Check that the shape implied by our axes matches the actual shape of the
data.

---
## dict_to_mgr
```python
from construction import dict_to_mgr
```

Segregate Series based on type and coerce into matrices.
Needs to handle a lot of exceptional cases.

Used in DataFrame.__init__

---
## nested_data_to_arrays
```python
from construction import nested_data_to_arrays
```

Convert a single sequence of arrays to multiple arrays.

---
## treat_as_nested
```python
from construction import treat_as_nested
```

Check if we should use nested_data_to_arrays.

---
## _prep_ndarraylike
```python
from construction import _prep_ndarraylike
```



---
## _ensure_2d
```python
from construction import _ensure_2d
```

Reshape 1D values, raise on anything else other than 2D.

---
## _homogenize
```python
from construction import _homogenize
```



---
## _extract_index
```python
from construction import _extract_index
```

Try to infer an Index from the passed data, raise ValueError on failure.

---
## reorder_arrays
```python
from construction import reorder_arrays
```

Pre-emptively (cheaply) reindex arrays with new columns.

---
## _get_names_from_index
```python
from construction import _get_names_from_index
```



---
## _get_axes
```python
from construction import _get_axes
```



---
## dataclasses_to_dicts
```python
from construction import dataclasses_to_dicts
```

Converts a list of dataclass instances to a list of dictionaries.

Parameters
----------
data : List[Type[dataclass]]

Returns
--------
list_dict : List[dict]

Examples
--------
>>> from dataclasses import dataclass
>>> @dataclass
... class Point:
...     x: int
...     y: int

>>> dataclasses_to_dicts([Point(1, 2), Point(2, 3)])
[{'x': 1, 'y': 2}, {'x': 2, 'y': 3}]

---
## to_arrays
```python
from construction import to_arrays
```

Return list of arrays, columns.

Returns
-------
list[ArrayLike]
    These will become columns in a DataFrame.
Index
    This will become frame.columns.

Notes
-----
Ensures that len(result_arrays) == len(result_index).

---
## _list_to_arrays
```python
from construction import _list_to_arrays
```



---
## _list_of_series_to_arrays
```python
from construction import _list_of_series_to_arrays
```



---
## _list_of_dict_to_arrays
```python
from construction import _list_of_dict_to_arrays
```

Convert list of dicts to numpy arrays

if `columns` is not passed, column names are inferred from the records
- for OrderedDict and dicts, the column names match
  the key insertion-order from the first record to the last.
- For other kinds of dict-likes, the keys are lexically sorted.

Parameters
----------
data : iterable
    collection of records (OrderedDict, dict)
columns: iterables or None

Returns
-------
content : np.ndarray[object, ndim=2]
columns : Index

---
## _finalize_columns_and_data
```python
from construction import _finalize_columns_and_data
```

Ensure we have valid columns, cast object dtypes if possible.

---
## _validate_or_indexify_columns
```python
from construction import _validate_or_indexify_columns
```

If columns is None, make numbers as column names; Otherwise, validate that
columns have valid length.

Parameters
----------
content : list of np.ndarrays
columns : Index or None

Returns
-------
Index
    If columns is None, assign positional column index value as columns.

Raises
------
1. AssertionError when content is not composed of list of lists, and if
    length of columns is not equal to length of content.
2. ValueError when content is list of lists, but length of each sub-list
    is not equal
3. ValueError when content is list of lists, but length of sub-list is
    not equal to length of content

---
## convert_object_array
```python
from construction import convert_object_array
```

Internal function to convert object array.

Parameters
----------
content: List[np.ndarray]
dtype: np.dtype or ExtensionDtype
dtype_backend: Controls if nullable/pyarrow dtypes are returned.
coerce_float: Cast floats that are integers to int.

Returns
-------
List[ArrayLike]

---
## convert
```python
from construction import convert
```



---
## __name__
```python
from array_manager import __name__
```

Experimental manager based on storing a collection of 1D arrays

---
## BaseArrayManager
```python
from array_manager import BaseArrayManager
```

Core internal data structure to implement DataFrame and Series.

Alternative to the BlockManager, storing a list of 1D arrays instead of
Blocks.

This is *not* a public API class

Parameters
----------
arrays : Sequence of arrays
axes : Sequence of Index
verify_integrity : bool, default True

---
## ArrayManager
```python
from array_manager import ArrayManager
```



---
## SingleArrayManager
```python
from array_manager import SingleArrayManager
```



---
## NullArrayProxy
```python
from array_manager import NullArrayProxy
```

Proxy object for an all-NA array.

Only stores the length of the array, and not the dtype. The dtype
will only be known when actually concatenating (after determining the
common dtype, for which this proxy is ignored).
Using this object avoids that the internals/concat.py needs to determine
the proper dtype and array type.

---
## concat_arrays
```python
from array_manager import concat_arrays
```

Alternative for concat_compat but specialized for use in the ArrayManager.

Differences: only deals with 1D arrays (no axis keyword), assumes
ensure_wrapped_if_datetimelike and does not skip empty arrays to determine
the dtype.
In addition ensures that all NullArrayProxies get replaced with actual
arrays.

Parameters
----------
to_concat : list of arrays

Returns
-------
np.ndarray or ExtensionArray

---
## __init__
```python
from array_manager import __init__
```



---
## make_empty
```python
from array_manager import make_empty
```

Return an empty ArrayManager with index/array of length 0

---
## items
```python
from array_manager import items
```



---
## axes
```python
from array_manager import axes
```



---
## shape_proper
```python
from array_manager import shape_proper
```



---
## _normalize_axis
```python
from array_manager import _normalize_axis
```



---
## set_axis
```python
from array_manager import set_axis
```



---
## get_dtypes
```python
from array_manager import get_dtypes
```



---
## add_references
```python
from array_manager import add_references
```

Only implemented on the BlockManager level

---
## __getstate__
```python
from array_manager import __getstate__
```



---
## __setstate__
```python
from array_manager import __setstate__
```



---
## __repr__
```python
from array_manager import __repr__
```



---
## apply
```python
from array_manager import apply
```



---
## apply_with_block
```python
from array_manager import apply_with_block
```



---
## setitem
```python
from array_manager import setitem
```

Set values with indexer.

For SingleArrayManager, this backs s[indexer] = value

See `setitem_inplace` for a version that works inplace and doesn't
return a new Manager.

---
## diff
```python
from array_manager import diff
```



---
## astype
```python
from array_manager import astype
```



---
## convert
```python
from array_manager import convert
```



---
## get_values_for_csv
```python
from array_manager import get_values_for_csv
```



---
## any_extension_types
```python
from array_manager import any_extension_types
```

Whether any of the blocks in this manager are extension blocks

---
## is_view
```python
from array_manager import is_view
```

return a boolean if we are a single block and are a view

---
## is_single_block
```python
from array_manager import is_single_block
```



---
## _get_data_subset
```python
from array_manager import _get_data_subset
```



---
## get_bool_data
```python
from array_manager import get_bool_data
```

Select columns that are bool-dtype and object-dtype columns that are all-bool.

Parameters
----------
copy : bool, default False
    Whether to copy the blocks

---
## get_numeric_data
```python
from array_manager import get_numeric_data
```

Select columns that have a numeric dtype.

Parameters
----------
copy : bool, default False
    Whether to copy the blocks

---
## copy
```python
from array_manager import copy
```

Make deep or shallow copy of ArrayManager

Parameters
----------
deep : bool or string, default True
    If False, return shallow copy (do not copy data)
    If 'all', copy data and a deep copy of the index

Returns
-------
BlockManager

---
## reindex_indexer
```python
from array_manager import reindex_indexer
```



---
## _reindex_indexer
```python
from array_manager import _reindex_indexer
```

Parameters
----------
new_axis : Index
indexer : ndarray[intp] or None
axis : int
fill_value : object, default None
allow_dups : bool, default False
copy : bool, default True


pandas-indexer with -1's only.

---
## take
```python
from array_manager import take
```

Take items along any axis.

---
## _make_na_array
```python
from array_manager import _make_na_array
```



---
## _equal_values
```python
from array_manager import _equal_values
```

Used in .equals defined in base class. Only check the column values
assuming shape and indexes have already been checked.

---
## ndim
```python
from array_manager import ndim
```



---
## _verify_integrity
```python
from array_manager import _verify_integrity
```



---
## fast_xs
```python
from array_manager import fast_xs
```



---
## get_slice
```python
from array_manager import get_slice
```



---
## iget
```python
from array_manager import iget
```

Return the data as a SingleArrayManager.

---
## iget_values
```python
from array_manager import iget_values
```

Return the data for column i as the values (ndarray or ExtensionArray).

---
## column_arrays
```python
from array_manager import column_arrays
```

Used in the JSON C code to access column arrays.

---
## iset
```python
from array_manager import iset
```

Set new column(s).

This changes the ArrayManager in-place, but replaces (an) existing
column(s), not changing column values in-place).

Parameters
----------
loc : integer, slice or boolean mask
    Positional location (already bounds checked)
value : np.ndarray or ExtensionArray
inplace : bool, default False
    Whether overwrite existing array as opposed to replacing it.

---
## column_setitem
```python
from array_manager import column_setitem
```

Set values ("setitem") into a single column (not setting the full column).

This is a method on the ArrayManager level, to avoid creating an
intermediate Series at the DataFrame level (`s = df[loc]; s[idx] = value`)

---
## insert
```python
from array_manager import insert
```

Insert item at selected position.

Parameters
----------
loc : int
item : hashable
value : np.ndarray or ExtensionArray

---
## idelete
```python
from array_manager import idelete
```

Delete selected locations in-place (new array, same ArrayManager)

---
## grouped_reduce
```python
from array_manager import grouped_reduce
```

Apply grouped reduction function columnwise, returning a new ArrayManager.

Parameters
----------
func : grouped reduction function

Returns
-------
ArrayManager

---
## reduce
```python
from array_manager import reduce
```

Apply reduction function column-wise, returning a single-row ArrayManager.

Parameters
----------
func : reduction function

Returns
-------
ArrayManager

---
## operate_blockwise
```python
from array_manager import operate_blockwise
```

Apply array_op blockwise with another (aligned) BlockManager.

---
## quantile
```python
from array_manager import quantile
```



---
## unstack
```python
from array_manager import unstack
```

Return a BlockManager with all blocks unstacked.

Parameters
----------
unstacker : reshape._Unstacker
fill_value : Any
    fill_value for newly introduced missing values.

Returns
-------
unstacked : BlockManager

---
## as_array
```python
from array_manager import as_array
```

Convert the blockmanager data into an numpy array.

Parameters
----------
dtype : object, default None
    Data type of the return array.
copy : bool, default False
    If True then guarantee that a copy is returned. A value of
    False does not guarantee that the underlying data is not
    copied.
na_value : object, default lib.no_default
    Value to be used as the missing value sentinel.

Returns
-------
arr : ndarray

---
## concat_horizontal
```python
from array_manager import concat_horizontal
```

Concatenate uniformly-indexed ArrayManagers horizontally.

---
## concat_vertical
```python
from array_manager import concat_vertical
```

Concatenate uniformly-indexed ArrayManagers vertically.

---
## from_array
```python
from array_manager import from_array
```



---
## index
```python
from array_manager import index
```



---
## dtype
```python
from array_manager import dtype
```



---
## external_values
```python
from array_manager import external_values
```

The array that Series.values returns

---
## internal_values
```python
from array_manager import internal_values
```

The array that Series._values returns

---
## array_values
```python
from array_manager import array_values
```

The array that Series.array returns

---
## _can_hold_na
```python
from array_manager import _can_hold_na
```



---
## get_rows_with_mask
```python
from array_manager import get_rows_with_mask
```



---
## set_values
```python
from array_manager import set_values
```

Set (replace) the values of the SingleArrayManager in place.

Use at your own risk! This does not check if the passed values are
valid for the current SingleArrayManager (length, dtype, etc).

---
## to_2d_mgr
```python
from array_manager import to_2d_mgr
```

Manager analogue of Series.to_frame

---
## shape
```python
from array_manager import shape
```



---
## to_array
```python
from array_manager import to_array
```

Helper function to create the actual all-NA array from the NullArrayProxy
object.

Parameters
----------
arr : NullArrayProxy
dtype : the dtype for the resulting array

Returns
-------
np.ndarray or ExtensionArray

---
## _convert
```python
from array_manager import _convert
```



---
## copy_func
```python
from array_manager import copy_func
```



---
## make_block
```python
from api import make_block
```

This is a pseudo-public analogue to blocks.new_block.

We ask that downstream libraries use this rather than any fully-internal
APIs, including but not limited to:

- core.internals.blocks.make_block
- Block.make_block
- Block.make_block_same_class
- Block.__init__

---
## maybe_infer_ndim
```python
from api import maybe_infer_ndim
```

If `ndim` is not provided, infer it from placement and values.

---
## BlockPairInfo
```python
from ops import BlockPairInfo
```



---
## _iter_block_pairs
```python
from ops import _iter_block_pairs
```



---
## operate_blockwise
```python
from ops import operate_blockwise
```



---
## _reset_block_mgr_locs
```python
from ops import _reset_block_mgr_locs
```

Reset mgr_locs to correspond to our original DataFrame.

---
## _get_same_shape_values
```python
from ops import _get_same_shape_values
```

Slice lblk.values to align with rblk.  Squeeze if we have EAs.

---
## blockwise_all
```python
from ops import blockwise_all
```

Blockwise `all` reduction.

---
## maybe_split
```python
from blocks import maybe_split
```

If we have a multi-column block, split and operate block-wise.  Otherwise
use the original method.

---
## EABackedBlock
```python
from blocks import EABackedBlock
```

Mixin for Block subclasses backed by ExtensionArray.

---
## ExtensionBlock
```python
from blocks import ExtensionBlock
```

Block for holding extension types.

Notes
-----
This holds all 3rd-party extension array types. It's also the immediate
parent class for our internal extension types' blocks.

ExtensionArrays are limited to 1-D.

---
## NumpyBlock
```python
from blocks import NumpyBlock
```



---
## NumericBlock
```python
from blocks import NumericBlock
```



---
## ObjectBlock
```python
from blocks import ObjectBlock
```



---
## NDArrayBackedExtensionBlock
```python
from blocks import NDArrayBackedExtensionBlock
```

Block backed by an NDArrayBackedExtensionArray

---
## DatetimeLikeBlock
```python
from blocks import DatetimeLikeBlock
```

Block for datetime64[ns], timedelta64[ns].

---
## DatetimeTZBlock
```python
from blocks import DatetimeTZBlock
```

implement a datetime64 block with a tz attribute

---
## maybe_coerce_values
```python
from blocks import maybe_coerce_values
```

Input validation for values passed to __init__. Ensure that
any datetime64/timedelta64 dtypes are in nanoseconds.  Ensure
that we do not have string dtypes.

Parameters
----------
values : np.ndarray or ExtensionArray

Returns
-------
values : np.ndarray or ExtensionArray

---
## get_block_type
```python
from blocks import get_block_type
```

Find the appropriate Block subclass to use for the given values and dtype.

Parameters
----------
dtype : numpy or pandas dtype

Returns
-------
cls : class, subclass of Block

---
## new_block_2d
```python
from blocks import new_block_2d
```



---
## new_block
```python
from blocks import new_block
```



---
## check_ndim
```python
from blocks import check_ndim
```

ndim inference and validation.

Validates that values.ndim and ndim are consistent.
Validates that len(values) and len(placement) are consistent.

Parameters
----------
values : array-like
placement : BlockPlacement
ndim : int

Raises
------
ValueError : the number of dimensions do not match

---
## extract_pandas_array
```python
from blocks import extract_pandas_array
```

Ensure that we don't allow NumpyExtensionArray / NumpyEADtype in internals.

---
## extend_blocks
```python
from blocks import extend_blocks
```

return a new extended blocks, given the result

---
## ensure_block_shape
```python
from blocks import ensure_block_shape
```

Reshape if possible to have values.ndim == ndim.

---
## external_values
```python
from blocks import external_values
```



---
## newfunc
```python
from blocks import newfunc
```



---
## _validate_ndim
```python
from blocks import _validate_ndim
```

We validate dimension for blocks that can hold 2D values, which for now
means numpy dtypes or DatetimeTZDtype.

---
## is_object
```python
from blocks import is_object
```



---
## is_extension
```python
from blocks import is_extension
```



---
## _can_consolidate
```python
from blocks import _can_consolidate
```



---
## _consolidate_key
```python
from blocks import _consolidate_key
```



---
## _can_hold_na
```python
from blocks import _can_hold_na
```

Can we store NA values in this Block?

---
## is_bool
```python
from blocks import is_bool
```

We can be bool if a) we are bool dtype or b) object dtype with bool objects.

---
## fill_value
```python
from blocks import fill_value
```



---
## _standardize_fill_value
```python
from blocks import _standardize_fill_value
```



---
## mgr_locs
```python
from blocks import mgr_locs
```



---
## make_block
```python
from blocks import make_block
```

Create a new block, with type inference propagate any values that are
not specified

---
## make_block_same_class
```python
from blocks import make_block_same_class
```

Wrap given values in a block of same type as self.

---
## __len__
```python
from blocks import __len__
```



---
## slice_block_columns
```python
from blocks import slice_block_columns
```

Perform __getitem__-like, return result as block.

---
## take_block_columns
```python
from blocks import take_block_columns
```

Perform __getitem__-like, return result as block.

Only supports slices that preserve dimensionality.

---
## getitem_block_columns
```python
from blocks import getitem_block_columns
```

Perform __getitem__-like, return result as block.

Only supports slices that preserve dimensionality.

---
## _can_hold_element
```python
from blocks import _can_hold_element
```

require the same dtype as ourselves

---
## should_store
```python
from blocks import should_store
```

Should we set self.values[indexer] = value inplace or do we need to cast?

Parameters
----------
value : np.ndarray or ExtensionArray

Returns
-------
bool

---
## apply
```python
from blocks import apply
```

apply the function to my values; return a block if we are not
one

---
## reduce
```python
from blocks import reduce
```



---
## _split_op_result
```python
from blocks import _split_op_result
```



---
## _split
```python
from blocks import _split
```

Split a block into a list of single-column blocks.

---
## split_and_operate
```python
from blocks import split_and_operate
```

Split the block and apply func column-by-column.

Parameters
----------
func : Block method
*args
**kwargs

Returns
-------
List[Block]

---
## coerce_to_target_dtype
```python
from blocks import coerce_to_target_dtype
```

coerce the current block to a dtype compat for other
we will return a block, possibly object, and not raise

we can also safely try to coerce to the same dtype
and will receive the same block

---
## _maybe_downcast
```python
from blocks import _maybe_downcast
```



---
## _downcast_2d
```python
from blocks import _downcast_2d
```

downcast specialized to 2D case post-validation.

Refactored to allow use of maybe_split.

---
## convert
```python
from blocks import convert
```

Attempt to coerce any object types to better types. Return a copy
of the block (if copy = True).

---
## convert_dtypes
```python
from blocks import convert_dtypes
```



---
## dtype
```python
from blocks import dtype
```



---
## astype
```python
from blocks import astype
```

Coerce to the new dtype.

Parameters
----------
dtype : np.dtype or ExtensionDtype
copy : bool, default False
    copy if indicated
errors : str, {'raise', 'ignore'}, default 'raise'
    - ``raise`` : allow exceptions to be raised
    - ``ignore`` : suppress exceptions. On error return original object
using_cow: bool, default False
    Signaling if copy on write copy logic is used.
squeeze : bool, default False
    squeeze values to ndim=1 if only one column is given

Returns
-------
Block

---
## get_values_for_csv
```python
from blocks import get_values_for_csv
```

convert to our native types format

---
## copy
```python
from blocks import copy
```

copy constructor

---
## _maybe_copy
```python
from blocks import _maybe_copy
```



---
## _get_refs_and_copy
```python
from blocks import _get_refs_and_copy
```



---
## replace
```python
from blocks import replace
```

replace the to_replace value with value, possible to create new
blocks here this is just a call to putmask.

---
## _replace_regex
```python
from blocks import _replace_regex
```

Replace elements by the given value.

Parameters
----------
to_replace : object or pattern
    Scalar to replace or regular expression to match.
value : object
    Replacement object.
inplace : bool, default False
    Perform inplace modification.
mask : array-like of bool, optional
    True indicate corresponding element is ignored.
using_cow: bool, default False
    Specifying if copy on write is enabled.

Returns
-------
List[Block]

---
## replace_list
```python
from blocks import replace_list
```

See BlockManager.replace_list docstring.

---
## _replace_coerce
```python
from blocks import _replace_coerce
```

Replace value corresponding to the given boolean array with another
value.

Parameters
----------
to_replace : object or pattern
    Scalar to replace or regular expression to match.
value : object
    Replacement object.
mask : np.ndarray[bool]
    True indicate corresponding element is ignored.
inplace : bool, default True
    Perform inplace modification.
regex : bool, default False
    If true, perform regular expression substitution.

Returns
-------
List[Block]

---
## _maybe_squeeze_arg
```python
from blocks import _maybe_squeeze_arg
```

If necessary, squeeze a (N, 1) ndarray to (N,)

---
## _unwrap_setitem_indexer
```python
from blocks import _unwrap_setitem_indexer
```

Adapt a 2D-indexer to our 1D values.

This is intended for 'setitem', not 'iget' or '_slice'.

---
## shape
```python
from blocks import shape
```



---
## iget
```python
from blocks import iget
```



---
## _slice
```python
from blocks import _slice
```

Return a slice of my values.

Parameters
----------
slicer : slice, ndarray[int], or ndarray[bool]
    Valid (non-reducing) indexer for self.values.

Returns
-------
ExtensionArray

---
## set_inplace
```python
from blocks import set_inplace
```



---
## take_nd
```python
from blocks import take_nd
```

Take values according to indexer and return them as a block.

---
## _unstack
```python
from blocks import _unstack
```



---
## setitem
```python
from blocks import setitem
```

Attempt self.values[indexer] = value, possibly creating a new array.

This differs from Block.setitem by not allowing setitem to change
the dtype of the Block.

Parameters
----------
indexer : tuple, list-like, array-like, slice, int
    The subset of self.values to set
value : object
    The value being set
using_cow: bool, default False
    Signaling if CoW is used.

Returns
-------
Block

Notes
-----
`indexer` is a direct slice/positional indexer. `value` must
be a compatible shape.

---
## putmask
```python
from blocks import putmask
```

See Block.putmask.__doc__

---
## where
```python
from blocks import where
```



---
## fillna
```python
from blocks import fillna
```



---
## pad_or_backfill
```python
from blocks import pad_or_backfill
```



---
## interpolate
```python
from blocks import interpolate
```



---
## diff
```python
from blocks import diff
```

return block for the diff of the values

---
## shift
```python
from blocks import shift
```

Shift the block by `periods`.

Dispatches to underlying ExtensionArray and re-boxes in an
ExtensionBlock.

---
## quantile
```python
from blocks import quantile
```

compute the quantiles of the

Parameters
----------
qs : Index
    The quantiles to be computed in float64.
interpolation : str, default 'linear'
    Type of interpolation.

Returns
-------
Block

---
## round
```python
from blocks import round
```

Rounds the values.
If the block is not of an integer or float dtype, nothing happens.
This is consistent with DataFrame.round behavivor.
(Note: Series.round would raise)

Parameters
----------
decimals: int,
    Number of decimal places to round to.
    Caller is responsible for validating this
using_cow: bool,
    Whether Copy on Write is enabled right now

---
## delete
```python
from blocks import delete
```



---
## is_view
```python
from blocks import is_view
```

return a boolean if I am possibly a view

---
## array_values
```python
from blocks import array_values
```



---
## get_values
```python
from blocks import get_values
```



---
## is_numeric
```python
from blocks import is_numeric
```



---
## slice_block_rows
```python
from blocks import slice_block_rows
```

Perform __getitem__-like specialized to slicing along index.

---
## _AlreadyWarned
```python
from base import _AlreadyWarned
```



---
## DataManager
```python
from base import DataManager
```



---
## SingleDataManager
```python
from base import SingleDataManager
```



---
## interleaved_dtype
```python
from base import interleaved_dtype
```

Find the common dtype for `blocks`.

Parameters
----------
blocks : List[DtypeObj]

Returns
-------
dtype : np.dtype, ExtensionDtype, or None
    None is returned when `blocks` is empty.

---
## ensure_np_dtype
```python
from base import ensure_np_dtype
```



---
## _validate_set_axis
```python
from base import _validate_set_axis
```



---
## reindex_indexer
```python
from base import reindex_indexer
```



---
## reindex_axis
```python
from base import reindex_axis
```

Conform data manager to new index.

---
## _equal_values
```python
from base import _equal_values
```

To be implemented by the subclasses. Only check the column values
assuming shape and indexes have already been checked.

---
## equals
```python
from base import equals
```

Determine if two Index object are equal.

The things that are being compared are:

* The elements inside the Index object.
* The order of the elements inside the Index object.

Parameters
----------
other : Any
    The other object to compare against.

Returns
-------
bool
    True if "other" is an Index and it has the same elements and order
    as the calling index; False otherwise.

Examples
--------
>>> idx1 = pd.Index([1, 2, 3])
>>> idx1
Index([1, 2, 3], dtype='int64')
>>> idx1.equals(pd.Index([1, 2, 3]))
True

The elements inside are compared

>>> idx2 = pd.Index(["1", "2", "3"])
>>> idx2
Index(['1', '2', '3'], dtype='object')

>>> idx1.equals(idx2)
False

The order is compared

>>> ascending_idx = pd.Index([1, 2, 3])
>>> ascending_idx
Index([1, 2, 3], dtype='int64')
>>> descending_idx = pd.Index([3, 2, 1])
>>> descending_idx
Index([3, 2, 1], dtype='int64')
>>> ascending_idx.equals(descending_idx)
False

The dtype is *not* compared

>>> int64_idx = pd.Index([1, 2, 3], dtype='int64')
>>> int64_idx
Index([1, 2, 3], dtype='int64')
>>> uint64_idx = pd.Index([1, 2, 3], dtype='uint64')
>>> uint64_idx
Index([1, 2, 3], dtype='uint64')
>>> int64_idx.equals(uint64_idx)
True

---
## apply
```python
from base import apply
```



---
## apply_with_block
```python
from base import apply_with_block
```



---
## isna
```python
from base import isna
```

Detect missing values.

Return a boolean same-sized object indicating if the values are NA.
NA values, such as ``None``, :attr:`numpy.NaN` or :attr:`pd.NaT`, get
mapped to ``True`` values.
Everything else get mapped to ``False`` values. Characters such as
empty strings `''` or :attr:`numpy.inf` are not considered NA values.

Returns
-------
numpy.ndarray[bool]
    A boolean array of whether my values are NA.

See Also
--------
Index.notna : Boolean inverse of isna.
Index.dropna : Omit entries with missing values.
isna : Top-level isna.
Series.isna : Detect missing values in Series object.

Examples
--------
Show which entries in a pandas.Index are NA. The result is an
array.

>>> idx = pd.Index([5.2, 6.0, np.nan])
>>> idx
Index([5.2, 6.0, nan], dtype='float64')
>>> idx.isna()
array([False, False,  True])

Empty strings are not considered NA values. None is considered an NA
value.

>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.isna()
array([False, False, False,  True])

For datetimes, `NaT` (Not a Time) is considered as an NA value.

>>> idx = pd.DatetimeIndex([pd.Timestamp('1940-04-25'),
...                         pd.Timestamp(''), None, pd.NaT])
>>> idx
DatetimeIndex(['1940-04-25', 'NaT', 'NaT', 'NaT'],
              dtype='datetime64[ns]', freq=None)
>>> idx.isna()
array([False,  True,  True,  True])

---
## fillna
```python
from base import fillna
```

Fill NA/NaN values with the specified value.

Parameters
----------
value : scalar
    Scalar value to use to fill holes (e.g. 0).
    This value cannot be a list-likes.
downcast : dict, default is None
    A dict of item->dtype of what to downcast if possible,
    or the string 'infer' which will try to downcast to an appropriate
    equal type (e.g. float64 to int64 if possible).

    .. deprecated:: 2.1.0

Returns
-------
Index

See Also
--------
DataFrame.fillna : Fill NaN values of a DataFrame.
Series.fillna : Fill NaN Values of a Series.

Examples
--------
>>> idx = pd.Index([np.nan, np.nan, 3])
>>> idx.fillna(0)
Index([0.0, 0.0, 3.0], dtype='float64')

---
## where
```python
from base import where
```

Replace values where the condition is False.

The replacement is taken from other.

Parameters
----------
cond : bool array-like with the same length as self
    Condition to select the values on.
other : scalar, or array-like, default None
    Replacement if the condition is False.

Returns
-------
pandas.Index
    A copy of self with values replaced from other
    where the condition is False.

See Also
--------
Series.where : Same method for Series.
DataFrame.where : Same method for DataFrame.

Examples
--------
>>> idx = pd.Index(['car', 'bike', 'train', 'tractor'])
>>> idx
Index(['car', 'bike', 'train', 'tractor'], dtype='object')
>>> idx.where(idx.isin(['car', 'train']), 'other')
Index(['car', 'other', 'train', 'other'], dtype='object')

---
## putmask
```python
from base import putmask
```

Return a new Index of the values set with the mask.

Returns
-------
Index

See Also
--------
numpy.ndarray.putmask : Changes elements of an array
    based on conditional and input values.

Examples
--------
>>> idx1 = pd.Index([1, 2, 3])
>>> idx2 = pd.Index([5, 6, 7])
>>> idx1.putmask([True, False, False], idx2)
Index([5, 2, 3], dtype='int64')

---
## round
```python
from base import round
```

Round each value in the Index to the given number of decimals.

Parameters
----------
decimals : int, optional
    Number of decimal places to round to. If decimals is negative,
    it specifies the number of positions to the left of the decimal point.

Returns
-------
Index
    A new Index with the rounded values.

Examples
--------
>>> import pandas as pd
>>> idx = pd.Index([10.1234, 20.5678, 30.9123, 40.4567, 50.7890])
>>> idx.round(decimals=2)
Index([10.12, 20.57, 30.91, 40.46, 50.79], dtype='float64')

---
## replace
```python
from base import replace
```



---
## replace_regex
```python
from base import replace_regex
```



---
## replace_list
```python
from base import replace_list
```

do a list replace

---
## interpolate
```python
from base import interpolate
```

See DataFrame.interpolate.__doc__.

Examples
--------
>>> arr = pd.arrays.NumpyExtensionArray(np.array([0, 1, np.nan, 3]))
>>> arr.interpolate(method="linear",
...                 limit=3,
...                 limit_direction="forward",
...                 index=pd.Index([1, 2, 3, 4]),
...                 fill_value=1,
...                 copy=False,
...                 axis=0,
...                 limit_area="inside"
...                 )
<NumpyExtensionArray>
[0.0, 1.0, 2.0, 3.0]
Length: 4, dtype: float64

---
## pad_or_backfill
```python
from base import pad_or_backfill
```



---
## shift
```python
from base import shift
```

Shift index by desired number of time frequency increments.

This method is for shifting the values of datetime-like indexes
by a specified time increment a given number of times.

Parameters
----------
periods : int, default 1
    Number of periods (or increments) to shift by,
    can be positive or negative.
freq : pandas.DateOffset, pandas.Timedelta or str, optional
    Frequency increment to shift by.
    If None, the index is shifted by its own `freq` attribute.
    Offset aliases are valid strings, e.g., 'D', 'W', 'M' etc.

Returns
-------
pandas.Index
    Shifted index.

See Also
--------
Series.shift : Shift values of Series.

Notes
-----
This method is only implemented for datetime-like index classes,
i.e., DatetimeIndex, PeriodIndex and TimedeltaIndex.

Examples
--------
Put the first 5 month starts of 2011 into an index.

>>> month_starts = pd.date_range('1/1/2011', periods=5, freq='MS')
>>> month_starts
DatetimeIndex(['2011-01-01', '2011-02-01', '2011-03-01', '2011-04-01',
               '2011-05-01'],
              dtype='datetime64[ns]', freq='MS')

Shift the index by 10 days.

>>> month_starts.shift(10, freq='D')
DatetimeIndex(['2011-01-11', '2011-02-11', '2011-03-11', '2011-04-11',
               '2011-05-11'],
              dtype='datetime64[ns]', freq=None)

The default value of `freq` is the `freq` attribute of the index,
which is 'MS' (month start) in this example.

>>> month_starts.shift(10)
DatetimeIndex(['2011-11-01', '2011-12-01', '2012-01-01', '2012-02-01',
               '2012-03-01'],
              dtype='datetime64[ns]', freq='MS')

---
## is_consolidated
```python
from base import is_consolidated
```



---
## consolidate
```python
from base import consolidate
```



---
## _consolidate_inplace
```python
from base import _consolidate_inplace
```



---
## setitem_inplace
```python
from base import setitem_inplace
```

Set values with indexer.

For Single[Block/Array]Manager, this backs s[indexer] = value

This is an inplace version of `setitem()`, mutating the manager/values
in place, not returning a new Manager (and Block), and thus never changing
the dtype.

---
## grouped_reduce
```python
from base import grouped_reduce
```



---
## from_array
```python
from base import from_array
```



---
## BaseBlockManager
```python
from managers import BaseBlockManager
```

Core internal data structure to implement DataFrame, Series, etc.

Manage a bunch of labeled 2D mixed-type ndarrays. Essentially it's a
lightweight blocked set of labeled data to be manipulated by the DataFrame
public API class

Attributes
----------
shape
ndim
axes
values
items

Methods
-------
set_axis(axis, new_labels)
copy(deep=True)

get_dtypes

apply(func, axes, block_filter_fn)

get_bool_data
get_numeric_data

get_slice(slice_like, axis)
get(label)
iget(loc)

take(indexer, axis)
reindex_axis(new_labels, axis)
reindex_indexer(new_labels, indexer, axis)

delete(label)
insert(loc, label, value)
set(label, value)

Parameters
----------
blocks: Sequence of Block
axes: Sequence of Index
verify_integrity: bool, default True

Notes
-----
This is *not* a public API class

---
## BlockManager
```python
from managers import BlockManager
```

BaseBlockManager that holds 2D blocks.

---
## SingleBlockManager
```python
from managers import SingleBlockManager
```

manage a single block with

---
## create_block_manager_from_blocks
```python
from managers import create_block_manager_from_blocks
```



---
## create_block_manager_from_column_arrays
```python
from managers import create_block_manager_from_column_arrays
```



---
## raise_construction_error
```python
from managers import raise_construction_error
```

raise a helpful message about our construction

---
## _grouping_func
```python
from managers import _grouping_func
```



---
## _form_blocks
```python
from managers import _form_blocks
```



---
## _tuples_to_blocks_no_consolidate
```python
from managers import _tuples_to_blocks_no_consolidate
```



---
## _stack_arrays
```python
from managers import _stack_arrays
```



---
## _consolidate
```python
from managers import _consolidate
```

Merge blocks having same dtype, exclude non-consolidating blocks

---
## _merge_blocks
```python
from managers import _merge_blocks
```



---
## _fast_count_smallints
```python
from managers import _fast_count_smallints
```

Faster version of set(arr) for sequences of small numbers.

---
## _preprocess_slice_or_indexer
```python
from managers import _preprocess_slice_or_indexer
```



---
## make_na_array
```python
from managers import make_na_array
```



---
## ndim
```python
from managers import ndim
```



---
## from_blocks
```python
from managers import from_blocks
```

Constructor for BlockManager and SingleBlockManager with same signature.

---
## blknos
```python
from managers import blknos
```

Suppose we want to find the array corresponding to our i'th column.

blknos[i] identifies the block from self.blocks that contains this column.

blklocs[i] identifies the column of interest within
self.blocks[self.blknos[i]]

---
## blklocs
```python
from managers import blklocs
```

See blknos.__doc__

---
## make_empty
```python
from managers import make_empty
```

return an empty BlockManager with the items axis of len 0

---
## __nonzero__
```python
from managers import __nonzero__
```



---
## _normalize_axis
```python
from managers import _normalize_axis
```



---
## set_axis
```python
from managers import set_axis
```



---
## is_single_block
```python
from managers import is_single_block
```



---
## items
```python
from managers import items
```



---
## _has_no_reference
```python
from managers import _has_no_reference
```

Check for column `i` if it has references.
(whether it references another array or is itself being referenced)
Returns True if the column has no references.

---
## _has_no_reference_block
```python
from managers import _has_no_reference_block
```

Check for block `i` if it has references.
(whether it references another array or is itself being referenced)
Returns True if the block has no references.

---
## add_references
```python
from managers import add_references
```

Adds the references from one manager to another. We assume that both
managers have the same block structure.

---
## references_same_values
```python
from managers import references_same_values
```

Checks if two blocks from two different block managers reference the
same underlying values.

---
## get_dtypes
```python
from managers import get_dtypes
```



---
## arrays
```python
from managers import arrays
```

Quick access to the backing arrays of the Blocks.

Only for compatibility with ArrayManager for testing convenience.
Not to be used in actual code, and return value is not the same as the
ArrayManager method (list of 1D arrays vs iterator of 2D ndarrays / 1D EAs).

Warning! The returned arrays don't handle Copy-on-Write, so this should
be used with caution (only in read-mode).

---
## apply
```python
from managers import apply
```

Iterate over the blocks, collect and create a new BlockManager.

Parameters
----------
f : str or callable
    Name of the Block method to apply.
align_keys: List[str] or None, default None
**kwargs
    Keywords to pass to `f`

Returns
-------
BlockManager

---
## setitem
```python
from managers import setitem
```

Set values with indexer.

For SingleBlockManager, this backs s[indexer] = value

---
## diff
```python
from managers import diff
```



---
## astype
```python
from managers import astype
```



---
## convert
```python
from managers import convert
```



---
## convert_dtypes
```python
from managers import convert_dtypes
```



---
## get_values_for_csv
```python
from managers import get_values_for_csv
```

Convert values to native types (strings / python objects) that are used
in formatting (repr / csv).

---
## any_extension_types
```python
from managers import any_extension_types
```

Whether any of the blocks in this manager are extension blocks

---
## is_view
```python
from managers import is_view
```

return a boolean if we are a single block and are a view

---
## _get_data_subset
```python
from managers import _get_data_subset
```



---
## get_bool_data
```python
from managers import get_bool_data
```

Select blocks that are bool-dtype and columns from object-dtype blocks
that are all-bool.

---
## get_numeric_data
```python
from managers import get_numeric_data
```



---
## _combine
```python
from managers import _combine
```

return a new manager with the blocks

---
## nblocks
```python
from managers import nblocks
```



---
## copy
```python
from managers import copy
```

Make deep or shallow copy of BlockManager

Parameters
----------
deep : bool, string or None, default True
    If False or None, return a shallow copy (do not copy data)
    If 'all', copy data and a deep copy of the index

Returns
-------
BlockManager

---
## consolidate
```python
from managers import consolidate
```

Join together blocks having same dtype

Returns
-------
y : BlockManager

---
## reindex_indexer
```python
from managers import reindex_indexer
```

Parameters
----------
new_axis : Index
indexer : ndarray[intp] or None
axis : int
fill_value : object, default None
allow_dups : bool, default False
copy : bool or None, default True
    If None, regard as False to get shallow copy.
only_slice : bool, default False
    Whether to take views, not copies, along columns.
use_na_proxy : bool, default False
    Whether to use a np.void ndarray for newly introduced columns.

pandas-indexer with -1's only.

---
## _slice_take_blocks_ax0
```python
from managers import _slice_take_blocks_ax0
```

Slice/take blocks along axis=0.

Overloaded for SingleBlock

Parameters
----------
slice_or_indexer : slice or np.ndarray[int64]
fill_value : scalar, default lib.no_default
only_slice : bool, default False
    If True, we always return views on existing arrays, never copies.
    This is used when called from ops.blockwise.operate_blockwise.
use_na_proxy : bool, default False
    Whether to use a np.void ndarray for newly introduced columns.
ref_inplace_op: bool, default False
    Don't track refs if True because we operate inplace

Returns
-------
new_blocks : list of Block

---
## _make_na_block
```python
from managers import _make_na_block
```



---
## take
```python
from managers import take
```

Take items along any axis.

indexer : np.ndarray[np.intp]
axis : int, default 1
verify : bool, default True
    Check that all entries are between 0 and len(self) - 1, inclusive.
    Pass verify=False if this check has been done by the caller.

Returns
-------
BlockManager

---
## _verify_integrity
```python
from managers import _verify_integrity
```



---
## fast_xs
```python
from managers import fast_xs
```

fast path for getting a cross-section
return a view of the data

---
## iget
```python
from managers import iget
```

Return the data as a SingleBlockManager.

---
## iget_values
```python
from managers import iget_values
```

Return the data for column i as the values (ndarray or ExtensionArray).

Warning! The returned array is a view but doesn't handle Copy-on-Write,
so this should be used with caution.

---
## column_arrays
```python
from managers import column_arrays
```

Used in the JSON C code to access column arrays.
This optimizes compared to using `iget_values` by converting each

Warning! This doesn't handle Copy-on-Write, so should be used with
caution (current use case of consuming this in the JSON code is fine).

---
## iset
```python
from managers import iset
```

Set new item in-place. Does not consolidate. Adds new Block if not
contained in the current set of items

---
## _iset_split_block
```python
from managers import _iset_split_block
```

Removes columns from a block by splitting the block.

Avoids copying the whole block through slicing and updates the manager
after determinint the new block structure. Optionally adds a new block,
otherwise has to be done by the caller.

Parameters
----------
blkno_l: The block number to operate on, relevant for updating the manager
blk_locs: The locations of our block that should be deleted.
value: The value to set as a replacement.
refs: The reference tracking object of the value to set.

---
## _iset_single
```python
from managers import _iset_single
```

Fastpath for iset when we are only setting a single position and
the Block currently in that position is itself single-column.

In this case we can swap out the entire Block and blklocs and blknos
are unaffected.

---
## column_setitem
```python
from managers import column_setitem
```

Set values ("setitem") into a single column (not setting the full column).

This is a method on the BlockManager level, to avoid creating an
intermediate Series at the DataFrame level (`s = df[loc]; s[idx] = value`)

---
## insert
```python
from managers import insert
```

Insert item at selected position.

Parameters
----------
loc : int
item : hashable
value : np.ndarray or ExtensionArray
refs : The reference tracking object of the value to set.

---
## _insert_update_mgr_locs
```python
from managers import _insert_update_mgr_locs
```

When inserting a new Block at location 'loc', we increment
all of the mgr_locs of blocks above that by one.

---
## _insert_update_blklocs_and_blknos
```python
from managers import _insert_update_blklocs_and_blknos
```

When inserting a new Block at location 'loc', we update our
_blklocs and _blknos.

---
## idelete
```python
from managers import idelete
```

Delete single location from SingleBlockManager.

Ensures that self.blocks doesn't become empty.

---
## grouped_reduce
```python
from managers import grouped_reduce
```

Apply grouped reduction function blockwise, returning a new BlockManager.

Parameters
----------
func : grouped reduction function

Returns
-------
BlockManager

---
## reduce
```python
from managers import reduce
```

Apply reduction function blockwise, returning a single-row BlockManager.

Parameters
----------
func : reduction function

Returns
-------
BlockManager

---
## operate_blockwise
```python
from managers import operate_blockwise
```

Apply array_op blockwise with another (aligned) BlockManager.

---
## _equal_values
```python
from managers import _equal_values
```

Used in .equals defined in base class. Only check the column values
assuming shape and indexes have already been checked.

---
## quantile
```python
from managers import quantile
```

Iterate over blocks applying quantile reduction.
This routine is intended for reduction type operations and
will do inference on the generated blocks.

Parameters
----------
interpolation : type of interpolation, default 'linear'
qs : list of the quantiles to be computed

Returns
-------
BlockManager

---
## unstack
```python
from managers import unstack
```

Return a BlockManager with all blocks unstacked.

Parameters
----------
unstacker : reshape._Unstacker
fill_value : Any
    fill_value for newly introduced missing values.

Returns
-------
unstacked : BlockManager

---
## to_dict
```python
from managers import to_dict
```

Return a dict of str(dtype) -> BlockManager

Returns
-------
values : a dict of dtype -> BlockManager

---
## as_array
```python
from managers import as_array
```

Convert the blockmanager data into an numpy array.

Parameters
----------
dtype : np.dtype or None, default None
    Data type of the return array.
copy : bool, default False
    If True then guarantee that a copy is returned. A value of
    False does not guarantee that the underlying data is not
    copied.
na_value : object, default lib.no_default
    Value to be used as the missing value sentinel.

Returns
-------
arr : ndarray

---
## _interleave
```python
from managers import _interleave
```

Return ndarray from blocks with specified item order
Items must be contained in the blocks

---
## is_consolidated
```python
from managers import is_consolidated
```

Return True if more than one block with the same dtype

---
## _consolidate_check
```python
from managers import _consolidate_check
```



---
## _consolidate_inplace
```python
from managers import _consolidate_inplace
```



---
## concat_horizontal
```python
from managers import concat_horizontal
```

Concatenate uniformly-indexed BlockManagers horizontally.

---
## concat_vertical
```python
from managers import concat_vertical
```

Concatenate uniformly-indexed BlockManagers vertically.

---
## from_array
```python
from managers import from_array
```

Constructor for if we have an array that is not yet a Block.

---
## to_2d_mgr
```python
from managers import to_2d_mgr
```

Manager analogue of Series.to_frame

---
## _post_setstate
```python
from managers import _post_setstate
```



---
## _block
```python
from managers import _block
```



---
## _blknos
```python
from managers import _blknos
```

compat with BlockManager

---
## _blklocs
```python
from managers import _blklocs
```

compat with BlockManager

---
## get_rows_with_mask
```python
from managers import get_rows_with_mask
```



---
## get_slice
```python
from managers import get_slice
```



---
## index
```python
from managers import index
```



---
## dtype
```python
from managers import dtype
```



---
## external_values
```python
from managers import external_values
```

The array that Series.values returns

---
## internal_values
```python
from managers import internal_values
```

The array that Series._values returns

---
## array_values
```python
from managers import array_values
```

The array that Series.array returns

---
## _can_hold_na
```python
from managers import _can_hold_na
```



---
## setitem_inplace
```python
from managers import setitem_inplace
```

Set values with indexer.

For Single[Block/Array]Manager, this backs s[indexer] = value

This is an inplace version of `setitem()`, mutating the manager/values
in place, not returning a new Manager (and Block), and thus never changing
the dtype.

---
## set_values
```python
from managers import set_values
```

Set the values of the single block in place.

Use at your own risk! This does not check if the passed values are
valid for the current Block/SingleBlockManager (length, dtype, etc),
and this does not properly keep track of references.

---
## unpickle_block
```python
from managers import unpickle_block
```



---
## copy_func
```python
from managers import copy_func
```



---
## value_getitem
```python
from managers import value_getitem
```



---
## create_valid_python_identifier
```python
from parsing import create_valid_python_identifier
```

Create valid Python identifiers from any string.

Check if name contains any special characters. If it contains any
special characters, the special characters will be replaced by
a special string and a prefix is added.

Raises
------
SyntaxError
    If the returned name is not a Python valid identifier, raise an exception.
    This can happen if there is a hashtag in the name, as the tokenizer will
    than terminate and not find the backtick.
    But also for characters that fall out of the range of (U+0001..U+007F).

---
## clean_backtick_quoted_toks
```python
from parsing import clean_backtick_quoted_toks
```

Clean up a column name if surrounded by backticks.

Backtick quoted string are indicated by a certain tokval value. If a string
is a backtick quoted token it will processed by
:func:`_create_valid_python_identifier` so that the parser can find this
string when the query is executed.
In this case the tok will get the NAME tokval.

Parameters
----------
tok : tuple of int, str
    ints correspond to the all caps constants in the tokenize module

Returns
-------
tok : Tuple[int, str]
    Either the input or token or the replacement values

---
## clean_column_name
```python
from parsing import clean_column_name
```

Function to emulate the cleaning of a backtick quoted name.

The purpose for this function is to see what happens to the name of
identifier if it goes to the process of being parsed a Python code
inside a backtick quoted string and than being cleaned
(removed of any special characters).

Parameters
----------
name : hashable
    Name to be cleaned.

Returns
-------
name : hashable
    Returns the name after tokenizing and cleaning.

Notes
-----
    For some cases, a name cannot be converted to a valid Python identifier.
    In that case :func:`tokenize_string` raises a SyntaxError.
    In that case, we just return the name unmodified.

    If this name was used in the query string (this makes the query call impossible)
    an error will be raised by :func:`tokenize_backtick_quoted_string` instead,
    which is not caught and propagates to the user level.

---
## tokenize_backtick_quoted_string
```python
from parsing import tokenize_backtick_quoted_string
```

Creates a token from a backtick quoted string.

Moves the token_generator forwards till right after the next backtick.

Parameters
----------
token_generator : Iterator[tokenize.TokenInfo]
    The generator that yields the tokens of the source string (Tuple[int, str]).
    The generator is at the first token after the backtick (`)

source : str
    The Python source code string.

string_start : int
    This is the start of backtick quoted string inside the source string.

Returns
-------
tok: Tuple[int, str]
    The token that represents the backtick quoted string.
    The integer is equal to BACKTICK_QUOTED_STRING (100).

---
## tokenize_string
```python
from parsing import tokenize_string
```

Tokenize a Python source code string.

Parameters
----------
source : str
    The Python source code string.

Returns
-------
tok_generator : Iterator[Tuple[int, str]]
    An iterator yielding all tokens with only toknum and tokval (Tuple[ing, str]).

---
## _align_core_single_unary_op
```python
from align import _align_core_single_unary_op
```



---
## _zip_axes_from_type
```python
from align import _zip_axes_from_type
```



---
## _any_pandas_objects
```python
from align import _any_pandas_objects
```

Check a sequence of terms for instances of PandasObject.

---
## _filter_special_cases
```python
from align import _filter_special_cases
```



---
## _align_core
```python
from align import _align_core
```



---
## align_terms
```python
from align import align_terms
```

Align a set of terms.

---
## reconstruct_object
```python
from align import reconstruct_object
```

Reconstruct an object given its type, raw value, and possibly empty
(None) axes.

Parameters
----------
typ : object
    A type
obj : object
    The value to use in the type constructor
axes : dict
    The axes to use to construct the resulting pandas object

Returns
-------
ret : typ
    An object of type ``typ`` with the value `obj` and possible axes
    `axes`.

---
## wrapper
```python
from align import wrapper
```



---
## PyTablesScope
```python
from pytables import PyTablesScope
```



---
## Term
```python
from pytables import Term
```



---
## Constant
```python
from pytables import Constant
```



---
## BinOp
```python
from pytables import BinOp
```



---
## FilterBinOp
```python
from pytables import FilterBinOp
```



---
## JointFilterBinOp
```python
from pytables import JointFilterBinOp
```



---
## ConditionBinOp
```python
from pytables import ConditionBinOp
```



---
## JointConditionBinOp
```python
from pytables import JointConditionBinOp
```



---
## UnaryOp
```python
from pytables import UnaryOp
```



---
## PyTablesExprVisitor
```python
from pytables import PyTablesExprVisitor
```



---
## _validate_where
```python
from pytables import _validate_where
```

Validate that the where statement is of the right type.

The type may either be String, Expr, or list-like of Exprs.

Parameters
----------
w : String term expression, Expr, or list-like of Exprs.

Returns
-------
where : The original where clause if the check was successful.

Raises
------
TypeError : An invalid data type was passed in for w (e.g. dict).

---
## PyTablesExpr
```python
from pytables import PyTablesExpr
```

Hold a pytables-like expression, comprised of possibly multiple 'terms'.

Parameters
----------
where : string term expression, PyTablesExpr, or list-like of PyTablesExprs
queryables : a "kinds" map (dict of column name -> kind), or None if column
    is non-indexable
encoding : an encoding that will encode the query terms

Returns
-------
a PyTablesExpr object

Examples
--------
'index>=date'
"columns=['A', 'D']"
'columns=A'
'columns==A'
"~(columns=['A','B'])"
'index>df.index[3] & string="bar"'
'(index>df.index[3] & index<=df.index[6]) | string="bar"'
"ts>=Timestamp('2012-02-01')"
"major_axis>=20130101"

---
## TermValue
```python
from pytables import TermValue
```

hold a term value the we use to construct a condition/filter

---
## maybe_expression
```python
from pytables import maybe_expression
```

loose checking if s is a pytables-acceptable expression

---
## __new__
```python
from pytables import __new__
```



---
## _resolve_name
```python
from pytables import _resolve_name
```



---
## value
```python
from pytables import value
```



---
## _disallow_scalar_only_bool_ops
```python
from pytables import _disallow_scalar_only_bool_ops
```



---
## prune
```python
from pytables import prune
```



---
## conform
```python
from pytables import conform
```

inplace conform rhs

---
## is_valid
```python
from pytables import is_valid
```

return True if this is a valid field

---
## is_in_table
```python
from pytables import is_in_table
```

return True if this is a valid column name for generation (e.g. an
actual column in the table)

---
## kind
```python
from pytables import kind
```

the kind of my field

---
## meta
```python
from pytables import meta
```

the meta of my field

---
## metadata
```python
from pytables import metadata
```

the metadata of my field

---
## convert_value
```python
from pytables import convert_value
```

convert the expression that is in the term to something that is
accepted by pytables

---
## convert_values
```python
from pytables import convert_values
```



---
## invert
```python
from pytables import invert
```

invert the condition

---
## format
```python
from pytables import format
```

return the actual ne format

---
## evaluate
```python
from pytables import evaluate
```

create and return the numexpr condition and filter

---
## generate_filter_op
```python
from pytables import generate_filter_op
```



---
## visit_UnaryOp
```python
from pytables import visit_UnaryOp
```



---
## visit_Index
```python
from pytables import visit_Index
```



---
## visit_Assign
```python
from pytables import visit_Assign
```



---
## visit_Subscript
```python
from pytables import visit_Subscript
```



---
## visit_Attribute
```python
from pytables import visit_Attribute
```



---
## translate_In
```python
from pytables import translate_In
```



---
## _rewrite_membership_op
```python
from pytables import _rewrite_membership_op
```



---
## tostring
```python
from pytables import tostring
```

quote the string if not encoded else encode and return

---
## pr
```python
from pytables import pr
```

create and return a new specialized BinOp from myself

---
## stringify
```python
from pytables import stringify
```



---
## __name__
```python
from engines import __name__
```

Engine classes for :func:`~pandas.eval`

---
## _check_ne_builtin_clash
```python
from engines import _check_ne_builtin_clash
```

Attempt to prevent foot-shooting in a helpful way.

Parameters
----------
expr : Expr
    Terms can contain

---
## AbstractEngine
```python
from engines import AbstractEngine
```

Object serving as a base class for all engines.

---
## NumExprEngine
```python
from engines import NumExprEngine
```

NumExpr engine class

---
## PythonEngine
```python
from engines import PythonEngine
```

Evaluate an expression in Python space.

Mostly for testing purposes.

---
## __init__
```python
from engines import __init__
```



---
## convert
```python
from engines import convert
```

Convert an expression for evaluation.

Defaults to return the expression as a string.

---
## evaluate
```python
from engines import evaluate
```



---
## _is_aligned
```python
from engines import _is_aligned
```



---
## _evaluate
```python
from engines import _evaluate
```



---
## __name__
```python
from expressions import __name__
```

Expressions
-----------

Offer fast expression evaluation through numexpr

---
## set_use_numexpr
```python
from expressions import set_use_numexpr
```



---
## set_numexpr_threads
```python
from expressions import set_numexpr_threads
```



---
## _evaluate_standard
```python
from expressions import _evaluate_standard
```

Standard evaluation.

---
## _can_use_numexpr
```python
from expressions import _can_use_numexpr
```

return a boolean if we WILL be using numexpr

---
## _evaluate_numexpr
```python
from expressions import _evaluate_numexpr
```



---
## _where_standard
```python
from expressions import _where_standard
```



---
## _where_numexpr
```python
from expressions import _where_numexpr
```



---
## _has_bool_dtype
```python
from expressions import _has_bool_dtype
```



---
## _bool_arith_fallback
```python
from expressions import _bool_arith_fallback
```

Check if we should fallback to the python `_evaluate_standard` in case
of an unsupported operation by numexpr, which is the case for some
boolean ops.

---
## evaluate
```python
from expressions import evaluate
```

Evaluate and return the expression of the op on a and b.

Parameters
----------
op : the actual operand
a : left operand
b : right operand
use_numexpr : bool, default True
    Whether to try to use numexpr.

---
## where
```python
from expressions import where
```

Evaluate the where condition cond on a and b.

Parameters
----------
cond : np.ndarray[bool]
a : return if cond is True
b : return if cond is False
use_numexpr : bool, default True
    Whether to try to use numexpr.

---
## set_test_mode
```python
from expressions import set_test_mode
```

Keeps track of whether numexpr was used.

Stores an additional ``True`` for every successful use of evaluate with
numexpr since the last ``get_test_result``.

---
## _store_test_result
```python
from expressions import _store_test_result
```



---
## get_test_result
```python
from expressions import get_test_result
```

Get test result and reset test_results.

---
## Term
```python
from ops import Term
```



---
## Constant
```python
from ops import Constant
```



---
## _in
```python
from ops import _in
```

Compute the vectorized membership of ``x in y`` if possible, otherwise
use Python.

---
## _not_in
```python
from ops import _not_in
```

Compute the vectorized membership of ``x not in y`` if possible,
otherwise use Python.

---
## is_term
```python
from ops import is_term
```



---
## BinOp
```python
from ops import BinOp
```

Hold a binary operator and its operands.

Parameters
----------
op : str
lhs : Term or Op
rhs : Term or Op

---
## isnumeric
```python
from ops import isnumeric
```



---
## UnaryOp
```python
from ops import UnaryOp
```

Hold a unary operator and its operands.

Parameters
----------
op : str
    The token used to represent the operator.
operand : Term or Op
    The Term or Op operand to the operator.

Raises
------
ValueError
    * If no function associated with the passed operator token is found.

---
## MathCall
```python
from ops import MathCall
```



---
## FuncNode
```python
from ops import FuncNode
```



---
## __new__
```python
from ops import __new__
```



---
## local_name
```python
from ops import local_name
```



---
## __call__
```python
from ops import __call__
```



---
## evaluate
```python
from ops import evaluate
```

Evaluate a binary operation *before* being passed to the engine.

Parameters
----------
env : Scope
engine : str
parser : str
term_type : type
eval_in_python : list

Returns
-------
term_type
    The "pre-evaluated" expression as an instance of ``term_type``

---
## _resolve_name
```python
from ops import _resolve_name
```



---
## update
```python
from ops import update
```

search order for local (i.e., @variable) variables:

scope, key_variable
[('locals', 'local_name'),
 ('globals', 'local_name'),
 ('locals', 'key'),
 ('globals', 'key')]

---
## is_scalar
```python
from ops import is_scalar
```



---
## type
```python
from ops import type
```



---
## raw
```python
from ops import raw
```



---
## is_datetime
```python
from ops import is_datetime
```



---
## value
```python
from ops import value
```



---
## name
```python
from ops import name
```



---
## ndim
```python
from ops import ndim
```



---
## return_type
```python
from ops import return_type
```



---
## has_invalid_return_type
```python
from ops import has_invalid_return_type
```



---
## operand_types
```python
from ops import operand_types
```



---
## convert_values
```python
from ops import convert_values
```

Convert datetimes to a comparable value in an expression.

---
## _disallow_scalar_only_bool_ops
```python
from ops import _disallow_scalar_only_bool_ops
```



---
## stringify
```python
from ops import stringify
```



---
## ensure_decoded
```python
from common import ensure_decoded
```

If we have bytes, decode them to unicode.

---
## result_type_many
```python
from common import result_type_many
```

Wrapper around numpy.result_type which overcomes the NPY_MAXARGS (32)
argument limit.

---
## __name__
```python
from eval import __name__
```

Top level ``eval`` module.

---
## _check_engine
```python
from eval import _check_engine
```

Make sure a valid engine is passed.

Parameters
----------
engine : str
    String to validate.

Raises
------
KeyError
  * If an invalid engine is passed.
ImportError
  * If numexpr was requested but doesn't exist.

Returns
-------
str
    Engine name.

---
## _check_parser
```python
from eval import _check_parser
```

Make sure a valid parser is passed.

Parameters
----------
parser : str

Raises
------
KeyError
  * If an invalid parser is passed

---
## _check_resolvers
```python
from eval import _check_resolvers
```



---
## _check_expression
```python
from eval import _check_expression
```

Make sure an expression is not an empty string

Parameters
----------
expr : object
    An object that can be converted to a string

Raises
------
ValueError
  * If expr is an empty string

---
## _convert_expression
```python
from eval import _convert_expression
```

Convert an object to an expression.

This function converts an object to an expression (a unicode string) and
checks to make sure it isn't empty after conversion. This is used to
convert operators to their string representation for recursive calls to
:func:`~pandas.eval`.

Parameters
----------
expr : object
    The object to be converted to a string.

Returns
-------
str
    The string representation of an object.

Raises
------
ValueError
  * If the expression is empty.

---
## _check_for_locals
```python
from eval import _check_for_locals
```



---
## eval
```python
from eval import eval
```

Evaluate a Python expression as a string using various backends.

The following arithmetic operations are supported: ``+``, ``-``, ``*``,
``/``, ``**``, ``%``, ``//`` (python engine only) along with the following
boolean operations: ``|`` (or), ``&`` (and), and ``~`` (not).
Additionally, the ``'pandas'`` parser allows the use of :keyword:`and`,
:keyword:`or`, and :keyword:`not` with the same semantics as the
corresponding bitwise operators.  :class:`~pandas.Series` and
:class:`~pandas.DataFrame` objects are supported and behave as they would
with plain ol' Python evaluation.

Parameters
----------
expr : str
    The expression to evaluate. This string cannot contain any Python
    `statements
    <https://docs.python.org/3/reference/simple_stmts.html#simple-statements>`__,
    only Python `expressions
    <https://docs.python.org/3/reference/simple_stmts.html#expression-statements>`__.
parser : {'pandas', 'python'}, default 'pandas'
    The parser to use to construct the syntax tree from the expression. The
    default of ``'pandas'`` parses code slightly different than standard
    Python. Alternatively, you can parse an expression using the
    ``'python'`` parser to retain strict Python semantics.  See the
    :ref:`enhancing performance <enhancingperf.eval>` documentation for
    more details.
engine : {'python', 'numexpr'}, default 'numexpr'

    The engine used to evaluate the expression. Supported engines are

    - None : tries to use ``numexpr``, falls back to ``python``
    - ``'numexpr'`` : This default engine evaluates pandas objects using
      numexpr for large speed ups in complex expressions with large frames.
    - ``'python'`` : Performs operations as if you had ``eval``'d in top
      level python. This engine is generally not that useful.

    More backends may be available in the future.
local_dict : dict or None, optional
    A dictionary of local variables, taken from locals() by default.
global_dict : dict or None, optional
    A dictionary of global variables, taken from globals() by default.
resolvers : list of dict-like or None, optional
    A list of objects implementing the ``__getitem__`` special method that
    you can use to inject an additional collection of namespaces to use for
    variable lookup. For example, this is used in the
    :meth:`~DataFrame.query` method to inject the
    ``DataFrame.index`` and ``DataFrame.columns``
    variables that refer to their respective :class:`~pandas.DataFrame`
    instance attributes.
level : int, optional
    The number of prior stack frames to traverse and add to the current
    scope. Most users will **not** need to change this parameter.
target : object, optional, default None
    This is the target object for assignment. It is used when there is
    variable assignment in the expression. If so, then `target` must
    support item assignment with string keys, and if a copy is being
    returned, it must also support `.copy()`.
inplace : bool, default False
    If `target` is provided, and the expression mutates `target`, whether
    to modify `target` inplace. Otherwise, return a copy of `target` with
    the mutation.

Returns
-------
ndarray, numeric scalar, DataFrame, Series, or None
    The completion value of evaluating the given code or None if ``inplace=True``.

Raises
------
ValueError
    There are many instances where such an error can be raised:

    - `target=None`, but the expression is multiline.
    - The expression is multiline, but not all them have item assignment.
      An example of such an arrangement is this:

      a = b + 1
      a + 2

      Here, there are expressions on different lines, making it multiline,
      but the last line has no variable assigned to the output of `a + 2`.
    - `inplace=True`, but the expression is missing item assignment.
    - Item assignment is provided, but the `target` does not support
      string item assignment.
    - Item assignment is provided and `inplace=False`, but the `target`
      does not support the `.copy()` method

See Also
--------
DataFrame.query : Evaluates a boolean expression to query the columns
        of a frame.
DataFrame.eval : Evaluate a string describing operations on
        DataFrame columns.

Notes
-----
The ``dtype`` of any objects involved in an arithmetic ``%`` operation are
recursively cast to ``float64``.

See the :ref:`enhancing performance <enhancingperf.eval>` documentation for
more details.

Examples
--------
>>> df = pd.DataFrame({"animal": ["dog", "pig"], "age": [10, 20]})
>>> df
  animal  age
0    dog   10
1    pig   20

We can add a new column using ``pd.eval``:

>>> pd.eval("double_age = df.age * 2", target=df)
  animal  age  double_age
0    dog   10          20
1    pig   20          40

---
## DeepChainMap
```python
from scope import DeepChainMap
```

Variant of ChainMap that allows direct updates to inner scopes.

Only works when all passed mapping are mutable.

---
## ensure_scope
```python
from scope import ensure_scope
```

Ensure that we are grabbing the correct scope.

---
## _replacer
```python
from scope import _replacer
```

Replace a number with its hexadecimal representation. Used to tag
temporary variables with their calling scope's id.

---
## _raw_hex_id
```python
from scope import _raw_hex_id
```

Return the padded hexadecimal id of ``obj``.

---
## _get_pretty_string
```python
from scope import _get_pretty_string
```

Return a prettier version of obj.

Parameters
----------
obj : object
    Object to pretty print

Returns
-------
str
    Pretty print object repr

---
## __setitem__
```python
from scope import __setitem__
```



---
## __delitem__
```python
from scope import __delitem__
```

Raises
------
KeyError
    If `key` doesn't exist.

---
## __repr__
```python
from scope import __repr__
```



---
## has_resolvers
```python
from scope import has_resolvers
```

Return whether we have any extra scope.

For example, DataFrames pass Their columns as resolvers during calls to
``DataFrame.eval()`` and ``DataFrame.query()``.

Returns
-------
hr : bool

---
## resolve
```python
from scope import resolve
```

Resolve a variable name in a possibly local context.

Parameters
----------
key : str
    A variable name
is_local : bool
    Flag indicating whether the variable is local or not (prefixed with
    the '@' symbol)

Returns
-------
value : object
    The value of a particular variable

---
## swapkey
```python
from scope import swapkey
```

Replace a variable name, with a potentially new value.

Parameters
----------
old_key : str
    Current variable name to replace
new_key : str
    New variable name to replace `old_key` with
new_value : object
    Value to be replaced along with the possible renaming

---
## _get_vars
```python
from scope import _get_vars
```

Get specifically scoped variables from a list of stack frames.

Parameters
----------
stack : list
    A list of stack frames as returned by ``inspect.stack()``
scopes : sequence of strings
    A sequence containing valid stack frame attribute names that
    evaluate to a dictionary. For example, ('locals', 'globals')

---
## _update
```python
from scope import _update
```

Update the current scope by going back `level` levels.

Parameters
----------
level : int

---
## add_tmp
```python
from scope import add_tmp
```

Add a temporary variable to the scope.

Parameters
----------
value : object
    An arbitrary object to be assigned to a temporary variable.

Returns
-------
str
    The name of the temporary variable created.

---
## ntemps
```python
from scope import ntemps
```

The number of temporary variables in this scope

---
## full_scope
```python
from scope import full_scope
```

Return the full scope for use with passing to engines transparently
as a mapping.

Returns
-------
vars : DeepChainMap
    All variables in this scope.

---
## _rewrite_assign
```python
from expr import _rewrite_assign
```

Rewrite the assignment operator for PyTables expressions that use ``=``
as a substitute for ``==``.

Parameters
----------
tok : tuple of int, str
    ints correspond to the all caps constants in the tokenize module

Returns
-------
tuple of int, str
    Either the input or token or the replacement values

---
## _replace_booleans
```python
from expr import _replace_booleans
```

Replace ``&`` with ``and`` and ``|`` with ``or`` so that bitwise
precedence is changed to boolean precedence.

Parameters
----------
tok : tuple of int, str
    ints correspond to the all caps constants in the tokenize module

Returns
-------
tuple of int, str
    Either the input or token or the replacement values

---
## _replace_locals
```python
from expr import _replace_locals
```

Replace local variables with a syntactically valid name.

Parameters
----------
tok : tuple of int, str
    ints correspond to the all caps constants in the tokenize module

Returns
-------
tuple of int, str
    Either the input or token or the replacement values

Notes
-----
This is somewhat of a hack in that we rewrite a string such as ``'@a'`` as
``'__pd_eval_local_a'`` by telling the tokenizer that ``__pd_eval_local_``
is a ``tokenize.OP`` and to replace the ``'@'`` symbol with it.

---
## _compose2
```python
from expr import _compose2
```

Compose 2 callables.

---
## _compose
```python
from expr import _compose
```

Compose 2 or more callables.

---
## _preparse
```python
from expr import _preparse
```

Compose a collection of tokenization functions.

Parameters
----------
source : str
    A Python source code string
f : callable
    This takes a tuple of (toknum, tokval) as its argument and returns a
    tuple with the same structure but possibly different elements. Defaults
    to the composition of ``_rewrite_assign``, ``_replace_booleans``, and
    ``_replace_locals``.

Returns
-------
str
    Valid Python source code

Notes
-----
The `f` parameter can be any callable that takes *and* returns input of the
form ``(toknum, tokval)``, where ``toknum`` is one of the constants from
the ``tokenize`` module and ``tokval`` is a string.

---
## _is_type
```python
from expr import _is_type
```

Factory for a type checking function of type ``t`` or tuple of types.

---
## _filter_nodes
```python
from expr import _filter_nodes
```

Filter out AST nodes that are subclasses of ``superclass``.

---
## _node_not_implemented
```python
from expr import _node_not_implemented
```

Return a function that raises a NotImplementedError with a passed node name.

---
## disallow
```python
from expr import disallow
```

Decorator to disallow certain nodes from parsing. Raises a
NotImplementedError instead.

Returns
-------
callable

---
## _op_maker
```python
from expr import _op_maker
```

Return a function to create an op class with its symbol already passed.

Returns
-------
callable

---
## add_ops
```python
from expr import add_ops
```

Decorator to add default implementation of ops.

---
## BaseExprVisitor
```python
from expr import BaseExprVisitor
```

Custom ast walker. Parsers of other engines should subclass this class
if necessary.

Parameters
----------
env : Scope
engine : str
parser : str
preparser : callable

---
## PandasExprVisitor
```python
from expr import PandasExprVisitor
```



---
## PythonExprVisitor
```python
from expr import PythonExprVisitor
```



---
## f
```python
from expr import f
```



---
## disallowed
```python
from expr import disallowed
```



---
## visit
```python
from expr import visit
```



---
## visit_Module
```python
from expr import visit_Module
```



---
## visit_Expr
```python
from expr import visit_Expr
```



---
## _rewrite_membership_op
```python
from expr import _rewrite_membership_op
```



---
## _maybe_transform_eq_ne
```python
from expr import _maybe_transform_eq_ne
```



---
## _maybe_downcast_constants
```python
from expr import _maybe_downcast_constants
```



---
## _maybe_eval
```python
from expr import _maybe_eval
```



---
## _maybe_evaluate_binop
```python
from expr import _maybe_evaluate_binop
```



---
## visit_BinOp
```python
from expr import visit_BinOp
```



---
## visit_UnaryOp
```python
from expr import visit_UnaryOp
```



---
## visit_Name
```python
from expr import visit_Name
```



---
## visit_NameConstant
```python
from expr import visit_NameConstant
```



---
## visit_Num
```python
from expr import visit_Num
```



---
## visit_Constant
```python
from expr import visit_Constant
```



---
## visit_Str
```python
from expr import visit_Str
```



---
## visit_List
```python
from expr import visit_List
```



---
## visit_Index
```python
from expr import visit_Index
```

df.index[4]

---
## visit_Subscript
```python
from expr import visit_Subscript
```



---
## visit_Slice
```python
from expr import visit_Slice
```

df.index[slice(4,6)]

---
## visit_Assign
```python
from expr import visit_Assign
```

support a single assignment node, like

c = a + b

set the assigner at the top level, must be a Name node which
might or might not exist in the resolvers

---
## visit_Attribute
```python
from expr import visit_Attribute
```



---
## visit_Call
```python
from expr import visit_Call
```



---
## translate_In
```python
from expr import translate_In
```



---
## visit_Compare
```python
from expr import visit_Compare
```



---
## _try_visit_binop
```python
from expr import _try_visit_binop
```



---
## visit_BoolOp
```python
from expr import visit_BoolOp
```



---
## assigner
```python
from expr import assigner
```



---
## __call__
```python
from expr import __call__
```



---
## __len__
```python
from expr import __len__
```



---
## parse
```python
from expr import parse
```

Parse an expression.

---
## names
```python
from expr import names
```

Get the names in an expression.

---
## visitor
```python
from expr import visitor
```



---
## __name__
```python
from extensions import __name__
```

Utility classes/functions to let numba recognize
pandas Index/Series/DataFrame

Mostly vendored from https://github.com/numba/numba/blob/main/numba/tests/pdlike_usecase.py

---
## set_numba_data
```python
from extensions import set_numba_data
```



---
## IndexType
```python
from extensions import IndexType
```

The type class for Index objects.

---
## SeriesType
```python
from extensions import SeriesType
```

The type class for Series objects.

---
## typeof_index
```python
from extensions import typeof_index
```

This will assume that only strings are in object dtype
index.
(you should check this before this gets lowered down to numba)

---
## typeof_series
```python
from extensions import typeof_series
```



---
## type_series_constructor
```python
from extensions import type_series_constructor
```



---
## type_index_constructor
```python
from extensions import type_index_constructor
```



---
## IndexModel
```python
from extensions import IndexModel
```



---
## SeriesModel
```python
from extensions import SeriesModel
```



---
## pdseries_constructor
```python
from extensions import pdseries_constructor
```



---
## pdseries_constructor_with_name
```python
from extensions import pdseries_constructor_with_name
```



---
## index_constructor_2arg
```python
from extensions import index_constructor_2arg
```



---
## index_constructor_2arg_parent
```python
from extensions import index_constructor_2arg_parent
```



---
## index_constructor_1arg
```python
from extensions import index_constructor_1arg
```



---
## maybe_cast_str
```python
from extensions import maybe_cast_str
```



---
## maybe_cast_str_impl
```python
from extensions import maybe_cast_str_impl
```

Converts numba UnicodeCharSeq (numpy string scalar) -> unicode type (string).
Is a no-op for other types.

---
## unbox_index
```python
from extensions import unbox_index
```

Convert a Index object to a native structure.

Note: Object dtype is not allowed here

---
## unbox_series
```python
from extensions import unbox_series
```

Convert a Series object to a native structure.

---
## box_index
```python
from extensions import box_index
```

Convert a native index structure to a Index object.

If our native index is of a numpy string dtype, we'll cast it to
object.

---
## box_series
```python
from extensions import box_series
```

Convert a native series structure to a Series object.

---
## generate_series_reduction
```python
from extensions import generate_series_reduction
```



---
## generate_series_binop
```python
from extensions import generate_series_binop
```



---
## index_get_loc
```python
from extensions import index_get_loc
```



---
## series_indexing
```python
from extensions import series_indexing
```



---
## index_indexing
```python
from extensions import index_indexing
```



---
## IlocType
```python
from extensions import IlocType
```



---
## typeof_iloc
```python
from extensions import typeof_iloc
```



---
## type_iloc_constructor
```python
from extensions import type_iloc_constructor
```



---
## iloc_constructor
```python
from extensions import iloc_constructor
```



---
## ILocModel
```python
from extensions import ILocModel
```



---
## series_iloc
```python
from extensions import series_iloc
```



---
## iloc_getitem
```python
from extensions import iloc_getitem
```



---
## __init__
```python
from extensions import __init__
```



---
## key
```python
from extensions import key
```



---
## as_array
```python
from extensions import as_array
```



---
## copy
```python
from extensions import copy
```



---
## typer
```python
from extensions import typer
```



---
## index_impl
```python
from extensions import index_impl
```



---
## series_reduction
```python
from extensions import series_reduction
```



---
## series_binop
```python
from extensions import series_binop
```



---
## index_get_loc_impl
```python
from extensions import index_get_loc_impl
```



---
## get
```python
from extensions import get
```



---
## series_reduction_impl
```python
from extensions import series_reduction_impl
```



---
## series_getitem
```python
from extensions import series_getitem
```



---
## index_getitem
```python
from extensions import index_getitem
```



---
## getitem_impl
```python
from extensions import getitem_impl
```



---
## series_binop_impl
```python
from extensions import series_binop_impl
```



---
## __name__
```python
from executor import __name__
```



---
## generate_apply_looper
```python
from executor import generate_apply_looper
```



---
## make_looper
```python
from executor import make_looper
```



---
## generate_shared_aggregator
```python
from executor import generate_shared_aggregator
```

Generate a Numba function that loops over the columns 2D object and applies
a 1D numba kernel over each column.

Parameters
----------
func : function
    aggregation function to be applied to each column
dtype_mapping: dict or None
    If not None, maps a dtype to a result dtype.
    Otherwise, will fall back to default mapping.
is_grouped_kernel: bool, default False
    Whether func operates using the group labels (True)
    or using starts/ends arrays

    If true, you also need to pass the number of groups to this function
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## nb_looper
```python
from executor import nb_looper
```



---
## looper_wrapper
```python
from executor import looper_wrapper
```



---
## column_looper
```python
from executor import column_looper
```



---
## __name__
```python
from ewm import __name__
```



---
## get_center_of_mass
```python
from ewm import get_center_of_mass
```



---
## _calculate_deltas
```python
from ewm import _calculate_deltas
```

Return the diff of the times divided by the half-life. These values are used in
the calculation of the ewm mean.

Parameters
----------
times : np.ndarray, Series
    Times corresponding to the observations. Must be monotonically increasing
    and ``datetime64[ns]`` dtype.
halflife : float, str, timedelta, optional
    Half-life specifying the decay

Returns
-------
np.ndarray
    Diff of the times divided by the half-life

---
## ExponentialMovingWindow
```python
from ewm import ExponentialMovingWindow
```

Provide exponentially weighted (EW) calculations.

Exactly one of ``com``, ``span``, ``halflife``, or ``alpha`` must be
provided if ``times`` is not provided. If ``times`` is provided,
``halflife`` and one of ``com``, ``span`` or ``alpha`` may be provided.

Parameters
----------
com : float, optional
    Specify decay in terms of center of mass

    :math:`\alpha = 1 / (1 + com)`, for :math:`com \geq 0`.

span : float, optional
    Specify decay in terms of span

    :math:`\alpha = 2 / (span + 1)`, for :math:`span \geq 1`.

halflife : float, str, timedelta, optional
    Specify decay in terms of half-life

    :math:`\alpha = 1 - \exp\left(-\ln(2) / halflife\right)`, for
    :math:`halflife > 0`.

    If ``times`` is specified, a timedelta convertible unit over which an
    observation decays to half its value. Only applicable to ``mean()``,
    and halflife value will not apply to the other functions.

alpha : float, optional
    Specify smoothing factor :math:`\alpha` directly

    :math:`0 < \alpha \leq 1`.

min_periods : int, default 0
    Minimum number of observations in window required to have a value;
    otherwise, result is ``np.nan``.

adjust : bool, default True
    Divide by decaying adjustment factor in beginning periods to account
    for imbalance in relative weightings (viewing EWMA as a moving average).

    - When ``adjust=True`` (default), the EW function is calculated using weights
      :math:`w_i = (1 - \alpha)^i`. For example, the EW moving average of the series
      [:math:`x_0, x_1, ..., x_t`] would be:

    .. math::
        y_t = \frac{x_t + (1 - \alpha)x_{t-1} + (1 - \alpha)^2 x_{t-2} + ... + (1 -
        \alpha)^t x_0}{1 + (1 - \alpha) + (1 - \alpha)^2 + ... + (1 - \alpha)^t}

    - When ``adjust=False``, the exponentially weighted function is calculated
      recursively:

    .. math::
        \begin{split}
            y_0 &= x_0\\
            y_t &= (1 - \alpha) y_{t-1} + \alpha x_t,
        \end{split}
ignore_na : bool, default False
    Ignore missing values when calculating weights.

    - When ``ignore_na=False`` (default), weights are based on absolute positions.
      For example, the weights of :math:`x_0` and :math:`x_2` used in calculating
      the final weighted average of [:math:`x_0`, None, :math:`x_2`] are
      :math:`(1-\alpha)^2` and :math:`1` if ``adjust=True``, and
      :math:`(1-\alpha)^2` and :math:`\alpha` if ``adjust=False``.

    - When ``ignore_na=True``, weights are based
      on relative positions. For example, the weights of :math:`x_0` and :math:`x_2`
      used in calculating the final weighted average of
      [:math:`x_0`, None, :math:`x_2`] are :math:`1-\alpha` and :math:`1` if
      ``adjust=True``, and :math:`1-\alpha` and :math:`\alpha` if ``adjust=False``.

axis : {0, 1}, default 0
    If ``0`` or ``'index'``, calculate across the rows.

    If ``1`` or ``'columns'``, calculate across the columns.

    For `Series` this parameter is unused and defaults to 0.

times : np.ndarray, Series, default None

    Only applicable to ``mean()``.

    Times corresponding to the observations. Must be monotonically increasing and
    ``datetime64[ns]`` dtype.

    If 1-D array like, a sequence with the same shape as the observations.

method : str {'single', 'table'}, default 'single'
    .. versionadded:: 1.4.0

    Execute the rolling operation per single column or row (``'single'``)
    or over the entire object (``'table'``).

    This argument is only implemented when specifying ``engine='numba'``
    in the method call.

    Only applicable to ``mean()``

Returns
-------
pandas.api.typing.ExponentialMovingWindow

See Also
--------
rolling : Provides rolling window calculations.
expanding : Provides expanding transformations.

Notes
-----
See :ref:`Windowing Operations <window.exponentially_weighted>`
for further usage details and examples.

Examples
--------
>>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
>>> df
     B
0  0.0
1  1.0
2  2.0
3  NaN
4  4.0

>>> df.ewm(com=0.5).mean()
          B
0  0.000000
1  0.750000
2  1.615385
3  1.615385
4  3.670213
>>> df.ewm(alpha=2 / 3).mean()
          B
0  0.000000
1  0.750000
2  1.615385
3  1.615385
4  3.670213

**adjust**

>>> df.ewm(com=0.5, adjust=True).mean()
          B
0  0.000000
1  0.750000
2  1.615385
3  1.615385
4  3.670213
>>> df.ewm(com=0.5, adjust=False).mean()
          B
0  0.000000
1  0.666667
2  1.555556
3  1.555556
4  3.650794

**ignore_na**

>>> df.ewm(com=0.5, ignore_na=True).mean()
          B
0  0.000000
1  0.750000
2  1.615385
3  1.615385
4  3.225000
>>> df.ewm(com=0.5, ignore_na=False).mean()
          B
0  0.000000
1  0.750000
2  1.615385
3  1.615385
4  3.670213

**times**

Exponentially weighted mean with weights calculated with a timedelta ``halflife``
relative to ``times``.

>>> times = ['2020-01-01', '2020-01-03', '2020-01-10', '2020-01-15', '2020-01-17']
>>> df.ewm(halflife='4 days', times=pd.DatetimeIndex(times)).mean()
          B
0  0.000000
1  0.585786
2  1.523889
3  1.523889
4  3.233686

---
## ExponentialMovingWindowGroupby
```python
from ewm import ExponentialMovingWindowGroupby
```

Provide an exponential moving window groupby implementation.

---
## OnlineExponentialMovingWindow
```python
from ewm import OnlineExponentialMovingWindow
```



---
## __init__
```python
from ewm import __init__
```



---
## _check_window_bounds
```python
from ewm import _check_window_bounds
```



---
## _get_window_indexer
```python
from ewm import _get_window_indexer
```

Return an indexer class that will compute the window start and end bounds

Returns
-------
GroupbyIndexer

---
## online
```python
from ewm import online
```

Return an ``OnlineExponentialMovingWindow`` object to calculate
exponentially moving window aggregations in an online method.

.. versionadded:: 1.3.0

Parameters
----------
engine: str, default ``'numba'``
    Execution engine to calculate online aggregations.
    Applies to all supported aggregation methods.

engine_kwargs : dict, default None
    Applies to all supported aggregation methods.

    * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
      and ``parallel`` dictionary keys. The values must either be ``True`` or
      ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
      ``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be
      applied to the function

Returns
-------
OnlineExponentialMovingWindow

---
## aggregate
```python
from ewm import aggregate
```



---
## mean
```python
from ewm import mean
```

Calculate an online exponentially weighted mean.

Parameters
----------
update: DataFrame or Series, default None
    New values to continue calculating the
    exponentially weighted mean from the last values and weights.
    Values should be float64 dtype.

    ``update`` needs to be ``None`` the first time the
    exponentially weighted mean is calculated.

update_times: Series or 1-D np.ndarray, default None
    New times to continue calculating the
    exponentially weighted mean from the last values and weights.
    If ``None``, values are assumed to be evenly spaced
    in time.
    This feature is currently unsupported.

Returns
-------
DataFrame or Series

Examples
--------
>>> df = pd.DataFrame({"a": range(5), "b": range(5, 10)})
>>> online_ewm = df.head(2).ewm(0.5).online()
>>> online_ewm.mean()
      a     b
0  0.00  5.00
1  0.75  5.75
>>> online_ewm.mean(update=df.tail(3))
          a         b
2  1.615385  6.615385
3  2.550000  7.550000
4  3.520661  8.520661
>>> online_ewm.reset()
>>> online_ewm.mean()
      a     b
0  0.00  5.00
1  0.75  5.75

---
## sum
```python
from ewm import sum
```



---
## std
```python
from ewm import std
```



---
## var
```python
from ewm import var
```



---
## cov
```python
from ewm import cov
```



---
## corr
```python
from ewm import corr
```



---
## reset
```python
from ewm import reset
```

Reset the state captured by `update` calls.

---
## var_func
```python
from ewm import var_func
```



---
## cov_func
```python
from ewm import cov_func
```



---
## _cov
```python
from ewm import _cov
```



---
## __name__
```python
from online import __name__
```



---
## generate_online_numba_ewma_func
```python
from online import generate_online_numba_ewma_func
```

Generate a numba jitted groupby ewma function specified by values
from engine_kwargs.

Parameters
----------
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## EWMMeanState
```python
from online import EWMMeanState
```



---
## online_ewma
```python
from online import online_ewma
```

Compute online exponentially weighted mean per column over 2D values.

Takes the first observation as is, then computes the subsequent
exponentially weighted mean accounting minimum periods.

---
## __init__
```python
from online import __init__
```



---
## run_ewm
```python
from online import run_ewm
```



---
## reset
```python
from online import reset
```



---
## __name__
```python
from rolling import __name__
```

Provide a generic structure to support window functions,
similar to how we have a Groupby object.

---
## BaseWindow
```python
from rolling import BaseWindow
```

Provides utilities for performing windowing operations.

---
## BaseWindowGroupby
```python
from rolling import BaseWindowGroupby
```

Provide the groupby windowing facilities.

---
## Window
```python
from rolling import Window
```

Provide rolling window calculations.

Parameters
----------
window : int, timedelta, str, offset, or BaseIndexer subclass
    Size of the moving window.

    If an integer, the fixed number of observations used for
    each window.

    If a timedelta, str, or offset, the time period of each window. Each
    window will be a variable sized based on the observations included in
    the time-period. This is only valid for datetimelike indexes.
    To learn more about the offsets & frequency strings, please see `this link
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

    If a BaseIndexer subclass, the window boundaries
    based on the defined ``get_window_bounds`` method. Additional rolling
    keyword arguments, namely ``min_periods``, ``center``, ``closed`` and
    ``step`` will be passed to ``get_window_bounds``.

min_periods : int, default None
    Minimum number of observations in window required to have a value;
    otherwise, result is ``np.nan``.

    For a window that is specified by an offset, ``min_periods`` will default to 1.

    For a window that is specified by an integer, ``min_periods`` will default
    to the size of the window.

center : bool, default False
    If False, set the window labels as the right edge of the window index.

    If True, set the window labels as the center of the window index.

win_type : str, default None
    If ``None``, all points are evenly weighted.

    If a string, it must be a valid `scipy.signal window function
    <https://docs.scipy.org/doc/scipy/reference/signal.windows.html#module-scipy.signal.windows>`__.

    Certain Scipy window types require additional parameters to be passed
    in the aggregation function. The additional parameters must match
    the keywords specified in the Scipy window type method signature.

on : str, optional
    For a DataFrame, a column label or Index level on which
    to calculate the rolling window, rather than the DataFrame's index.

    Provided integer column is ignored and excluded from result since
    an integer index is not used to calculate the rolling window.

axis : int or str, default 0
    If ``0`` or ``'index'``, roll across the rows.

    If ``1`` or ``'columns'``, roll across the columns.

    For `Series` this parameter is unused and defaults to 0.

    .. deprecated:: 2.1.0

        The axis keyword is deprecated. For ``axis=1``,
        transpose the DataFrame first instead.

closed : str, default None
    If ``'right'``, the first point in the window is excluded from calculations.

    If ``'left'``, the last point in the window is excluded from calculations.

    If ``'both'``, the no points in the window are excluded from calculations.

    If ``'neither'``, the first and last points in the window are excluded
    from calculations.

    Default ``None`` (``'right'``).

step : int, default None

    .. versionadded:: 1.5.0

    Evaluate the window at every ``step`` result, equivalent to slicing as
    ``[::step]``. ``window`` must be an integer. Using a step argument other
    than None or 1 will produce a result with a different shape than the input.

method : str {'single', 'table'}, default 'single'

    .. versionadded:: 1.3.0

    Execute the rolling operation per single column or row (``'single'``)
    or over the entire object (``'table'``).

    This argument is only implemented when specifying ``engine='numba'``
    in the method call.

Returns
-------
pandas.api.typing.Window or pandas.api.typing.Rolling
    An instance of Window is returned if ``win_type`` is passed. Otherwise,
    an instance of Rolling is returned.

See Also
--------
expanding : Provides expanding transformations.
ewm : Provides exponential weighted functions.

Notes
-----
See :ref:`Windowing Operations <window.generic>` for further usage details
and examples.

Examples
--------
>>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
>>> df
     B
0  0.0
1  1.0
2  2.0
3  NaN
4  4.0

**window**

Rolling sum with a window length of 2 observations.

>>> df.rolling(2).sum()
     B
0  NaN
1  1.0
2  3.0
3  NaN
4  NaN

Rolling sum with a window span of 2 seconds.

>>> df_time = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]},
...                        index=[pd.Timestamp('20130101 09:00:00'),
...                               pd.Timestamp('20130101 09:00:02'),
...                               pd.Timestamp('20130101 09:00:03'),
...                               pd.Timestamp('20130101 09:00:05'),
...                               pd.Timestamp('20130101 09:00:06')])

>>> df_time
                       B
2013-01-01 09:00:00  0.0
2013-01-01 09:00:02  1.0
2013-01-01 09:00:03  2.0
2013-01-01 09:00:05  NaN
2013-01-01 09:00:06  4.0

>>> df_time.rolling('2s').sum()
                       B
2013-01-01 09:00:00  0.0
2013-01-01 09:00:02  1.0
2013-01-01 09:00:03  3.0
2013-01-01 09:00:05  NaN
2013-01-01 09:00:06  4.0

Rolling sum with forward looking windows with 2 observations.

>>> indexer = pd.api.indexers.FixedForwardWindowIndexer(window_size=2)
>>> df.rolling(window=indexer, min_periods=1).sum()
     B
0  1.0
1  3.0
2  2.0
3  4.0
4  4.0

**min_periods**

Rolling sum with a window length of 2 observations, but only needs a minimum of 1
observation to calculate a value.

>>> df.rolling(2, min_periods=1).sum()
     B
0  0.0
1  1.0
2  3.0
3  2.0
4  4.0

**center**

Rolling sum with the result assigned to the center of the window index.

>>> df.rolling(3, min_periods=1, center=True).sum()
     B
0  1.0
1  3.0
2  3.0
3  6.0
4  4.0

>>> df.rolling(3, min_periods=1, center=False).sum()
     B
0  0.0
1  1.0
2  3.0
3  3.0
4  6.0

**step**

Rolling sum with a window length of 2 observations, minimum of 1 observation to
calculate a value, and a step of 2.

>>> df.rolling(2, min_periods=1, step=2).sum()
     B
0  0.0
2  3.0
4  4.0

**win_type**

Rolling sum with a window length of 2, using the Scipy ``'gaussian'``
window type. ``std`` is required in the aggregation function.

>>> df.rolling(2, win_type='gaussian').sum(std=3)
          B
0       NaN
1  0.986207
2  2.958621
3       NaN
4       NaN

**on**

Rolling sum with a window length of 2 days.

>>> df = pd.DataFrame({
...     'A': [pd.to_datetime('2020-01-01'),
...           pd.to_datetime('2020-01-01'),
...           pd.to_datetime('2020-01-02'),],
...     'B': [1, 2, 3], },
...     index=pd.date_range('2020', periods=3))

>>> df
                    A  B
2020-01-01 2020-01-01  1
2020-01-02 2020-01-01  2
2020-01-03 2020-01-02  3

>>> df.rolling('2D', on='A').sum()
                    A    B
2020-01-01 2020-01-01  1.0
2020-01-02 2020-01-01  3.0
2020-01-03 2020-01-02  6.0

---
## RollingAndExpandingMixin
```python
from rolling import RollingAndExpandingMixin
```



---
## Rolling
```python
from rolling import Rolling
```



---
## RollingGroupby
```python
from rolling import RollingGroupby
```

Provide a rolling groupby implementation.

---
## __init__
```python
from rolling import __init__
```



---
## _validate
```python
from rolling import _validate
```



---
## _check_window_bounds
```python
from rolling import _check_window_bounds
```



---
## _slice_axis_for_step
```python
from rolling import _slice_axis_for_step
```

Slices the index for a given result and the preset step.

---
## _validate_numeric_only
```python
from rolling import _validate_numeric_only
```

Validate numeric_only argument, raising if invalid for the input.

Parameters
----------
name : str
    Name of the operator (kernel).
numeric_only : bool
    Value passed by user.

---
## _make_numeric_only
```python
from rolling import _make_numeric_only
```

Subset DataFrame to numeric columns.

Parameters
----------
obj : DataFrame

Returns
-------
obj subset to numeric-only columns.

---
## _create_data
```python
from rolling import _create_data
```

Split data into blocks & return conformed data.

---
## _gotitem
```python
from rolling import _gotitem
```



---
## __getattr__
```python
from rolling import __getattr__
```



---
## _dir_additions
```python
from rolling import _dir_additions
```



---
## __repr__
```python
from rolling import __repr__
```

Provide a nice str repr of our rolling object.

---
## __iter__
```python
from rolling import __iter__
```



---
## _prep_values
```python
from rolling import _prep_values
```

Convert input to numpy arrays for Cython routines

---
## _insert_on_column
```python
from rolling import _insert_on_column
```



---
## _index_array
```python
from rolling import _index_array
```



---
## _resolve_output
```python
from rolling import _resolve_output
```

Validate and finalize result.

---
## _get_window_indexer
```python
from rolling import _get_window_indexer
```

Return an indexer class that will compute the window start and end bounds

Returns
-------
GroupbyIndexer

---
## _apply_series
```python
from rolling import _apply_series
```

Series version of _apply_columnwise

---
## _apply_columnwise
```python
from rolling import _apply_columnwise
```

Apply the given function to the DataFrame broken down into homogeneous
sub-frames.

---
## _apply_tablewise
```python
from rolling import _apply_tablewise
```

Apply the given function to the DataFrame across the entire object

---
## _apply_pairwise
```python
from rolling import _apply_pairwise
```

Apply the given pairwise function given 2 pandas objects (DataFrame/Series)

---
## _apply
```python
from rolling import _apply
```

Rolling with weights statistical measure using supplied function.

Designed to be used with passed-in Cython array-based functions.

Parameters
----------
func : callable function to apply
name : str,
numeric_only : bool, default False
    Whether to only operate on bool, int, and float columns
numba_args : tuple
    unused
**kwargs
    additional arguments for scipy windows if necessary

Returns
-------
y : type of input

---
## _numba_apply
```python
from rolling import _numba_apply
```



---
## aggregate
```python
from rolling import aggregate
```



---
## _center_window
```python
from rolling import _center_window
```

Center the result in the window for weighted rolling aggregations.

---
## sum
```python
from rolling import sum
```



---
## mean
```python
from rolling import mean
```



---
## var
```python
from rolling import var
```



---
## std
```python
from rolling import std
```



---
## count
```python
from rolling import count
```



---
## apply
```python
from rolling import apply
```



---
## _generate_cython_apply_func
```python
from rolling import _generate_cython_apply_func
```



---
## max
```python
from rolling import max
```



---
## min
```python
from rolling import min
```



---
## median
```python
from rolling import median
```



---
## skew
```python
from rolling import skew
```



---
## sem
```python
from rolling import sem
```



---
## kurt
```python
from rolling import kurt
```



---
## quantile
```python
from rolling import quantile
```



---
## rank
```python
from rolling import rank
```



---
## cov
```python
from rolling import cov
```



---
## corr
```python
from rolling import corr
```



---
## _validate_datetimelike_monotonic
```python
from rolling import _validate_datetimelike_monotonic
```

Validate that each group in self._on is monotonic

---
## _raise_monotonic_error
```python
from rolling import _raise_monotonic_error
```



---
## homogeneous_func
```python
from rolling import homogeneous_func
```



---
## apply_func
```python
from rolling import apply_func
```



---
## zsqrt_func
```python
from rolling import zsqrt_func
```



---
## cov_func
```python
from rolling import cov_func
```



---
## corr_func
```python
from rolling import corr_func
```



---
## calc
```python
from rolling import calc
```



---
## flex_binary_moment
```python
from common import flex_binary_moment
```



---
## zsqrt
```python
from common import zsqrt
```



---
## prep_binary
```python
from common import prep_binary
```



---
## dataframe_from_int_dict
```python
from common import dataframe_from_int_dict
```



---
## __name__
```python
from doc import __name__
```

Any shareable docstring components for rolling/expanding/ewm

---
## create_section_header
```python
from doc import create_section_header
```

Create numpydoc section header

---
## window_agg_numba_parameters
```python
from doc import window_agg_numba_parameters
```



---
## generate_numba_apply_func
```python
from numba_ import generate_numba_apply_func
```

Generate a numba jitted apply function specified by values from engine_kwargs.

1. jit the user's function
2. Return a rolling apply function with the jitted function inline

Configurations specified in engine_kwargs apply to both the user's
function _AND_ the rolling apply function.

Parameters
----------
func : function
    function to be applied to each window and will be JITed
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## generate_numba_ewm_func
```python
from numba_ import generate_numba_ewm_func
```

Generate a numba jitted ewm mean or sum function specified by values
from engine_kwargs.

Parameters
----------
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit
com : float
adjust : bool
ignore_na : bool
deltas : tuple
normalize : bool

Returns
-------
Numba function

---
## generate_numba_table_func
```python
from numba_ import generate_numba_table_func
```

Generate a numba jitted function to apply window calculations table-wise.

Func will be passed a M window size x N number of columns array, and
must return a 1 x N number of columns array. Func is intended to operate
row-wise, but the result will be transposed for axis=1.

1. jit the user's function
2. Return a rolling apply function with the jitted function inline

Parameters
----------
func : function
    function to be applied to each window and will be JITed
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit

Returns
-------
Numba function

---
## generate_manual_numpy_nan_agg_with_axis
```python
from numba_ import generate_manual_numpy_nan_agg_with_axis
```



---
## generate_numba_ewm_table_func
```python
from numba_ import generate_numba_ewm_table_func
```

Generate a numba jitted ewm mean or sum function applied table wise specified
by values from engine_kwargs.

Parameters
----------
nopython : bool
    nopython to be passed into numba.jit
nogil : bool
    nogil to be passed into numba.jit
parallel : bool
    parallel to be passed into numba.jit
com : float
adjust : bool
ignore_na : bool
deltas : tuple
normalize: bool

Returns
-------
Numba function

---
## roll_apply
```python
from numba_ import roll_apply
```



---
## ewm
```python
from numba_ import ewm
```



---
## roll_table
```python
from numba_ import roll_table
```



---
## nan_agg_with_axis
```python
from numba_ import nan_agg_with_axis
```



---
## ewm_table
```python
from numba_ import ewm_table
```



---
## __name__
```python
from expanding import __name__
```



---
## Expanding
```python
from expanding import Expanding
```

Provide expanding window calculations.

Parameters
----------
min_periods : int, default 1
    Minimum number of observations in window required to have a value;
    otherwise, result is ``np.nan``.

axis : int or str, default 0
    If ``0`` or ``'index'``, roll across the rows.

    If ``1`` or ``'columns'``, roll across the columns.

    For `Series` this parameter is unused and defaults to 0.

method : str {'single', 'table'}, default 'single'
    Execute the rolling operation per single column or row (``'single'``)
    or over the entire object (``'table'``).

    This argument is only implemented when specifying ``engine='numba'``
    in the method call.

    .. versionadded:: 1.3.0

Returns
-------
pandas.api.typing.Expanding

See Also
--------
rolling : Provides rolling window calculations.
ewm : Provides exponential weighted functions.

Notes
-----
See :ref:`Windowing Operations <window.expanding>` for further usage details
and examples.

Examples
--------
>>> df = pd.DataFrame({"B": [0, 1, 2, np.nan, 4]})
>>> df
     B
0  0.0
1  1.0
2  2.0
3  NaN
4  4.0

**min_periods**

Expanding sum with 1 vs 3 observations needed to calculate a value.

>>> df.expanding(1).sum()
     B
0  0.0
1  1.0
2  3.0
3  3.0
4  7.0
>>> df.expanding(3).sum()
     B
0  NaN
1  NaN
2  3.0
3  3.0
4  7.0

---
## ExpandingGroupby
```python
from expanding import ExpandingGroupby
```

Provide a expanding groupby implementation.

---
## __init__
```python
from expanding import __init__
```



---
## _get_window_indexer
```python
from expanding import _get_window_indexer
```

Return an indexer class that will compute the window start and end bounds

Returns
-------
GroupbyIndexer

---
## aggregate
```python
from expanding import aggregate
```



---
## count
```python
from expanding import count
```



---
## apply
```python
from expanding import apply
```



---
## sum
```python
from expanding import sum
```



---
## max
```python
from expanding import max
```



---
## min
```python
from expanding import min
```



---
## mean
```python
from expanding import mean
```



---
## median
```python
from expanding import median
```



---
## std
```python
from expanding import std
```



---
## var
```python
from expanding import var
```



---
## sem
```python
from expanding import sem
```



---
## skew
```python
from expanding import skew
```



---
## kurt
```python
from expanding import kurt
```



---
## quantile
```python
from expanding import quantile
```



---
## rank
```python
from expanding import rank
```



---
## cov
```python
from expanding import cov
```



---
## corr
```python
from expanding import corr
```



---
## __name__
```python
from floating import __name__
```



---
## FloatingDtype
```python
from floating import FloatingDtype
```

An ExtensionDtype to hold a single size of floating dtype.

These specific implementations are subclasses of the non-public
FloatingDtype. For example we have Float32Dtype to represent float32.

The attributes name & type are set when these subclasses are created.

---
## FloatingArray
```python
from floating import FloatingArray
```

Array of floating (optional missing) values.

.. warning::

   FloatingArray is currently experimental, and its API or internal
   implementation may change without warning. Especially the behaviour
   regarding NaN (distinct from NA missing values) is subject to change.

We represent a FloatingArray with 2 numpy arrays:

- data: contains a numpy float array of the appropriate dtype
- mask: a boolean array holding a mask on the data, True is missing

To construct an FloatingArray from generic array-like input, use
:func:`pandas.array` with one of the float dtypes (see examples).

See :ref:`integer_na` for more.

Parameters
----------
values : numpy.ndarray
    A 1-d float-dtype array.
mask : numpy.ndarray
    A 1-d boolean-dtype array indicating missing values.
copy : bool, default False
    Whether to copy the `values` and `mask`.

Attributes
----------
None

Methods
-------
None

Returns
-------
FloatingArray

Examples
--------
Create an FloatingArray with :func:`pandas.array`:

>>> pd.array([0.1, None, 0.3], dtype=pd.Float32Dtype())
<FloatingArray>
[0.1, <NA>, 0.3]
Length: 3, dtype: Float32

String aliases for the dtypes are also available. They are capitalized.

>>> pd.array([0.1, None, 0.3], dtype="Float32")
<FloatingArray>
[0.1, <NA>, 0.3]
Length: 3, dtype: Float32

---
## Float32Dtype
```python
from floating import Float32Dtype
```



---
## Float64Dtype
```python
from floating import Float64Dtype
```



---
## construct_array_type
```python
from floating import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## _get_dtype_mapping
```python
from floating import _get_dtype_mapping
```



---
## _safe_cast
```python
from floating import _safe_cast
```

Safely cast the values to the given dtype.

"safe" in this context means the casting is lossless.

---
## _cat_compare_op
```python
from categorical import _cat_compare_op
```



---
## contains
```python
from categorical import contains
```

Helper for membership check for ``key`` in ``cat``.

This is a helper method for :method:`__contains__`
and :class:`CategoricalIndex.__contains__`.

Returns True if ``key`` is in ``cat.categories`` and the
location of ``key`` in ``categories`` is in ``container``.

Parameters
----------
cat : :class:`Categorical`or :class:`categoricalIndex`
key : a hashable object
    The key to check membership for.
container : Container (e.g. list-like or mapping)
    The container to check for membership in.

Returns
-------
is_in : bool
    True if ``key`` is in ``self.categories`` and location of
    ``key`` in ``categories`` is in ``container``, else False.

Notes
-----
This method does not check for NaN values. Do that separately
before calling this method.

---
## Categorical
```python
from categorical import Categorical
```

Represent a categorical variable in classic R / S-plus fashion.

`Categoricals` can only take on a limited, and usually fixed, number
of possible values (`categories`). In contrast to statistical categorical
variables, a `Categorical` might have an order, but numerical operations
(additions, divisions, ...) are not possible.

All values of the `Categorical` are either in `categories` or `np.nan`.
Assigning values outside of `categories` will raise a `ValueError`. Order
is defined by the order of the `categories`, not lexical order of the
values.

Parameters
----------
values : list-like
    The values of the categorical. If categories are given, values not in
    categories will be replaced with NaN.
categories : Index-like (unique), optional
    The unique categories for this categorical. If not given, the
    categories are assumed to be the unique values of `values` (sorted, if
    possible, otherwise in the order in which they appear).
ordered : bool, default False
    Whether or not this categorical is treated as a ordered categorical.
    If True, the resulting categorical will be ordered.
    An ordered categorical respects, when sorted, the order of its
    `categories` attribute (which in turn is the `categories` argument, if
    provided).
dtype : CategoricalDtype
    An instance of ``CategoricalDtype`` to use for this categorical.

Attributes
----------
categories : Index
    The categories of this categorical.
codes : ndarray
    The codes (integer positions, which point to the categories) of this
    categorical, read only.
ordered : bool
    Whether or not this Categorical is ordered.
dtype : CategoricalDtype
    The instance of ``CategoricalDtype`` storing the ``categories``
    and ``ordered``.

Methods
-------
from_codes
__array__

Raises
------
ValueError
    If the categories do not validate.
TypeError
    If an explicit ``ordered=True`` is given but no `categories` and the
    `values` are not sortable.

See Also
--------
CategoricalDtype : Type for categorical data.
CategoricalIndex : An Index with an underlying ``Categorical``.

Notes
-----
See the `user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/categorical.html>`__
for more.

Examples
--------
>>> pd.Categorical([1, 2, 3, 1, 2, 3])
[1, 2, 3, 1, 2, 3]
Categories (3, int64): [1, 2, 3]

>>> pd.Categorical(['a', 'b', 'c', 'a', 'b', 'c'])
['a', 'b', 'c', 'a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']

Missing values are not included as a category.

>>> c = pd.Categorical([1, 2, 3, 1, 2, 3, np.nan])
>>> c
[1, 2, 3, 1, 2, 3, NaN]
Categories (3, int64): [1, 2, 3]

However, their presence is indicated in the `codes` attribute
by code `-1`.

>>> c.codes
array([ 0,  1,  2,  0,  1,  2, -1], dtype=int8)

Ordered `Categoricals` can be sorted according to the custom order
of the categories and can have a min and max value.

>>> c = pd.Categorical(['a', 'b', 'c', 'a', 'b', 'c'], ordered=True,
...                    categories=['c', 'b', 'a'])
>>> c
['a', 'b', 'c', 'a', 'b', 'c']
Categories (3, object): ['c' < 'b' < 'a']
>>> c.min()
'c'

---
## CategoricalAccessor
```python
from categorical import CategoricalAccessor
```

Accessor object for categorical properties of the Series values.

Parameters
----------
data : Series or CategoricalIndex

Examples
--------
>>> s = pd.Series(list("abbccc")).astype("category")
>>> s
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']

>>> s.cat.categories
Index(['a', 'b', 'c'], dtype='object')

>>> s.cat.rename_categories(list("cba"))
0    c
1    b
2    b
3    a
4    a
5    a
dtype: category
Categories (3, object): ['c', 'b', 'a']

>>> s.cat.reorder_categories(list("cba"))
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['c', 'b', 'a']

>>> s.cat.add_categories(["d", "e"])
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (5, object): ['a', 'b', 'c', 'd', 'e']

>>> s.cat.remove_categories(["a", "c"])
0    NaN
1      b
2      b
3    NaN
4    NaN
5    NaN
dtype: category
Categories (1, object): ['b']

>>> s1 = s.cat.add_categories(["d", "e"])
>>> s1.cat.remove_unused_categories()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']

>>> s.cat.set_categories(list("abcde"))
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (5, object): ['a', 'b', 'c', 'd', 'e']

>>> s.cat.as_ordered()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a' < 'b' < 'c']

>>> s.cat.as_unordered()
0    a
1    b
2    b
3    c
4    c
5    c
dtype: category
Categories (3, object): ['a', 'b', 'c']

---
## _get_codes_for_values
```python
from categorical import _get_codes_for_values
```

utility routine to turn values into codes given the specified categories

If `values` is known to be a Categorical, use recode_for_categories instead.

---
## recode_for_categories
```python
from categorical import recode_for_categories
```

Convert a set of codes for to a new set of categories

Parameters
----------
codes : np.ndarray
old_categories, new_categories : Index
copy: bool, default True
    Whether to copy if the codes are unchanged.

Returns
-------
new_codes : np.ndarray[np.int64]

Examples
--------
>>> old_cat = pd.Index(['b', 'a', 'c'])
>>> new_cat = pd.Index(['a', 'b'])
>>> codes = np.array([0, 1, 1, 2])
>>> recode_for_categories(codes, old_cat, new_cat)
array([ 1,  0,  0, -1], dtype=int8)

---
## factorize_from_iterable
```python
from categorical import factorize_from_iterable
```

Factorize an input `values` into `categories` and `codes`. Preserves
categorical dtype in `categories`.

Parameters
----------
values : list-like

Returns
-------
codes : ndarray
categories : Index
    If `values` has a categorical dtype, then `categories` is
    a CategoricalIndex keeping the categories and order of `values`.

---
## factorize_from_iterables
```python
from categorical import factorize_from_iterables
```

A higher-level wrapper over `factorize_from_iterable`.

Parameters
----------
iterables : list-like of list-likes

Returns
-------
codes : list of ndarrays
categories : list of Indexes

Notes
-----
See `factorize_from_iterable` for more info.

---
## func
```python
from categorical import func
```



---
## _simple_new
```python
from categorical import _simple_new
```



---
## __init__
```python
from categorical import __init__
```



---
## dtype
```python
from categorical import dtype
```

The :class:`~pandas.api.types.CategoricalDtype` for this instance.

Examples
--------
>>> cat = pd.Categorical(['a', 'b'], ordered=True)
>>> cat
['a', 'b']
Categories (2, object): ['a' < 'b']
>>> cat.dtype
CategoricalDtype(categories=['a', 'b'], ordered=True, categories_dtype=object)

---
## _internal_fill_value
```python
from categorical import _internal_fill_value
```



---
## _from_sequence
```python
from categorical import _from_sequence
```



---
## _from_scalars
```python
from categorical import _from_scalars
```



---
## astype
```python
from categorical import astype
```

Coerce this type to another dtype

Parameters
----------
dtype : numpy dtype or pandas type
copy : bool, default True
    By default, astype always returns a newly allocated object.
    If copy is set to False and dtype is categorical, the original
    object is returned.

---
## to_list
```python
from categorical import to_list
```

Alias for tolist.

---
## _from_inferred_categories
```python
from categorical import _from_inferred_categories
```

Construct a Categorical from inferred values.

For inferred categories (`dtype` is None) the categories are sorted.
For explicit `dtype`, the `inferred_categories` are cast to the
appropriate type.

Parameters
----------
inferred_categories : Index
inferred_codes : Index
dtype : CategoricalDtype or 'category'
true_values : list, optional
    If none are provided, the default ones are
    "True", "TRUE", and "true."

Returns
-------
Categorical

---
## from_codes
```python
from categorical import from_codes
```

Make a Categorical type from codes and categories or dtype.

This constructor is useful if you already have codes and
categories/dtype and so do not need the (computation intensive)
factorization step, which is usually done on the constructor.

If your data does not follow this convention, please use the normal
constructor.

Parameters
----------
codes : array-like of int
    An integer array, where each integer points to a category in
    categories or dtype.categories, or else is -1 for NaN.
categories : index-like, optional
    The categories for the categorical. Items need to be unique.
    If the categories are not given here, then they must be provided
    in `dtype`.
ordered : bool, optional
    Whether or not this categorical is treated as an ordered
    categorical. If not given here or in `dtype`, the resulting
    categorical will be unordered.
dtype : CategoricalDtype or "category", optional
    If :class:`CategoricalDtype`, cannot be used together with
    `categories` or `ordered`.
validate : bool, default True
    If True, validate that the codes are valid for the dtype.
    If False, don't validate that the codes are valid. Be careful about skipping
    validation, as invalid codes can lead to severe problems, such as segfaults.

    .. versionadded:: 2.1.0

Returns
-------
Categorical

Examples
--------
>>> dtype = pd.CategoricalDtype(['a', 'b'], ordered=True)
>>> pd.Categorical.from_codes(codes=[0, 1, 0, 1], dtype=dtype)
['a', 'b', 'a', 'b']
Categories (2, object): ['a' < 'b']

---
## categories
```python
from categorical import categories
```

The categories of this categorical.

Setting assigns new values to each category (effectively a rename of
each individual category).

The assigned value has to be a list-like object. All items must be
unique and the number of items in the new categories must be the same
as the number of items in the old categories.

Raises
------
ValueError
    If the new categories do not validate as categories or if the
    number of new categories is unequal the number of old categories

See Also
--------
rename_categories : Rename categories.
reorder_categories : Reorder categories.
add_categories : Add new categories.
remove_categories : Remove the specified categories.
remove_unused_categories : Remove categories which are not used.
set_categories : Set the categories to the specified ones.

Examples
--------
For :class:`pandas.Series`:

>>> ser = pd.Series(['a', 'b', 'c', 'a'], dtype='category')
>>> ser.cat.categories
Index(['a', 'b', 'c'], dtype='object')

>>> raw_cat = pd.Categorical(['a', 'b', 'c', 'a'], categories=['b', 'c', 'd'])
>>> ser = pd.Series(raw_cat)
>>> ser.cat.categories
Index(['b', 'c', 'd'], dtype='object')

For :class:`pandas.Categorical`:

>>> cat = pd.Categorical(['a', 'b'], ordered=True)
>>> cat.categories
Index(['a', 'b'], dtype='object')

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'c', 'b', 'a', 'c', 'b'])
>>> ci.categories
Index(['a', 'b', 'c'], dtype='object')

>>> ci = pd.CategoricalIndex(['a', 'c'], categories=['c', 'b', 'a'])
>>> ci.categories
Index(['c', 'b', 'a'], dtype='object')

---
## ordered
```python
from categorical import ordered
```

Whether the categories have an ordered relationship.

Examples
--------
For :class:`pandas.Series`:

>>> ser = pd.Series(['a', 'b', 'c', 'a'], dtype='category')
>>> ser.cat.ordered
False

>>> raw_cat = pd.Categorical(['a', 'b', 'c', 'a'], ordered=True)
>>> ser = pd.Series(raw_cat)
>>> ser.cat.ordered
True

For :class:`pandas.Categorical`:

>>> cat = pd.Categorical(['a', 'b'], ordered=True)
>>> cat.ordered
True

>>> cat = pd.Categorical(['a', 'b'], ordered=False)
>>> cat.ordered
False

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'b'], ordered=True)
>>> ci.ordered
True

>>> ci = pd.CategoricalIndex(['a', 'b'], ordered=False)
>>> ci.ordered
False

---
## codes
```python
from categorical import codes
```

Return Series of codes as well as the index.

Examples
--------
>>> raw_cate = pd.Categorical(["a", "b", "c", "a"], categories=["a", "b"])
>>> ser = pd.Series(raw_cate)
>>> ser.cat.codes
0   0
1   1
2  -1
3   0
dtype: int8

---
## _set_categories
```python
from categorical import _set_categories
```

Sets new categories inplace

Parameters
----------
fastpath : bool, default False
   Don't perform validation of the categories for uniqueness or nulls

Examples
--------
>>> c = pd.Categorical(['a', 'b'])
>>> c
['a', 'b']
Categories (2, object): ['a', 'b']

>>> c._set_categories(pd.Index(['a', 'c']))
>>> c
['a', 'c']
Categories (2, object): ['a', 'c']

---
## _set_dtype
```python
from categorical import _set_dtype
```

Internal method for directly updating the CategoricalDtype

Parameters
----------
dtype : CategoricalDtype

Notes
-----
We don't do any validation here. It's assumed that the dtype is
a (valid) instance of `CategoricalDtype`.

---
## set_ordered
```python
from categorical import set_ordered
```

Set the ordered attribute to the boolean value.

Parameters
----------
value : bool
   Set whether this categorical is ordered (True) or not (False).

---
## as_ordered
```python
from categorical import as_ordered
```

Set the Categorical to be ordered.

Returns
-------
Categorical
    Ordered Categorical.

Examples
--------
For :class:`pandas.Series`:

>>> ser = pd.Series(['a', 'b', 'c', 'a'], dtype='category')
>>> ser.cat.ordered
False
>>> ser = ser.cat.as_ordered()
>>> ser.cat.ordered
True

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'b', 'c', 'a'])
>>> ci.ordered
False
>>> ci = ci.as_ordered()
>>> ci.ordered
True

---
## as_unordered
```python
from categorical import as_unordered
```

Set the Categorical to be unordered.

Returns
-------
Categorical
    Unordered Categorical.

Examples
--------
For :class:`pandas.Series`:

>>> raw_cat = pd.Categorical(['a', 'b', 'c', 'a'], ordered=True)
>>> ser = pd.Series(raw_cat)
>>> ser.cat.ordered
True
>>> ser = ser.cat.as_unordered()
>>> ser.cat.ordered
False

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'b', 'c', 'a'], ordered=True)
>>> ci.ordered
True
>>> ci = ci.as_unordered()
>>> ci.ordered
False

---
## set_categories
```python
from categorical import set_categories
```

Set the categories to the specified new categories.

``new_categories`` can include new categories (which will result in
unused categories) or remove old categories (which results in values
set to ``NaN``). If ``rename=True``, the categories will simply be renamed
(less or more items than in old categories will result in values set to
``NaN`` or in unused categories respectively).

This method can be used to perform more than one action of adding,
removing, and reordering simultaneously and is therefore faster than
performing the individual steps via the more specialised methods.

On the other hand this methods does not do checks (e.g., whether the
old categories are included in the new categories on a reorder), which
can result in surprising changes, for example when using special string
dtypes, which does not considers a S1 string equal to a single char
python string.

Parameters
----------
new_categories : Index-like
   The categories in new order.
ordered : bool, default False
   Whether or not the categorical is treated as a ordered categorical.
   If not given, do not change the ordered information.
rename : bool, default False
   Whether or not the new_categories should be considered as a rename
   of the old categories or as reordered categories.

Returns
-------
Categorical with reordered categories.

Raises
------
ValueError
    If new_categories does not validate as categories

See Also
--------
rename_categories : Rename categories.
reorder_categories : Reorder categories.
add_categories : Add new categories.
remove_categories : Remove the specified categories.
remove_unused_categories : Remove categories which are not used.

Examples
--------
For :class:`pandas.Series`:

>>> raw_cat = pd.Categorical(['a', 'b', 'c', 'A'],
...                           categories=['a', 'b', 'c'], ordered=True)
>>> ser = pd.Series(raw_cat)
>>> ser
0   a
1   b
2   c
3   NaN
dtype: category
Categories (3, object): ['a' < 'b' < 'c']

>>> ser.cat.set_categories(['A', 'B', 'C'], rename=True)
0   A
1   B
2   C
3   NaN
dtype: category
Categories (3, object): ['A' < 'B' < 'C']

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'b', 'c', 'A'],
...                          categories=['a', 'b', 'c'], ordered=True)
>>> ci
CategoricalIndex(['a', 'b', 'c', nan], categories=['a', 'b', 'c'],
                 ordered=True, dtype='category')

>>> ci.set_categories(['A', 'b', 'c'])
CategoricalIndex([nan, 'b', 'c', nan], categories=['A', 'b', 'c'],
                 ordered=True, dtype='category')
>>> ci.set_categories(['A', 'b', 'c'], rename=True)
CategoricalIndex(['A', 'b', 'c', nan], categories=['A', 'b', 'c'],
                 ordered=True, dtype='category')

---
## rename_categories
```python
from categorical import rename_categories
```

Rename categories.

Parameters
----------
new_categories : list-like, dict-like or callable

    New categories which will replace old categories.

    * list-like: all items must be unique and the number of items in
      the new categories must match the existing number of categories.

    * dict-like: specifies a mapping from
      old categories to new. Categories not contained in the mapping
      are passed through and extra categories in the mapping are
      ignored.

    * callable : a callable that is called on all items in the old
      categories and whose return values comprise the new categories.

Returns
-------
Categorical
    Categorical with renamed categories.

Raises
------
ValueError
    If new categories are list-like and do not have the same number of
    items than the current categories or do not validate as categories

See Also
--------
reorder_categories : Reorder categories.
add_categories : Add new categories.
remove_categories : Remove the specified categories.
remove_unused_categories : Remove categories which are not used.
set_categories : Set the categories to the specified ones.

Examples
--------
>>> c = pd.Categorical(['a', 'a', 'b'])
>>> c.rename_categories([0, 1])
[0, 0, 1]
Categories (2, int64): [0, 1]

For dict-like ``new_categories``, extra keys are ignored and
categories not in the dictionary are passed through

>>> c.rename_categories({'a': 'A', 'c': 'C'})
['A', 'A', 'b']
Categories (2, object): ['A', 'b']

You may also provide a callable to create the new categories

>>> c.rename_categories(lambda x: x.upper())
['A', 'A', 'B']
Categories (2, object): ['A', 'B']

---
## reorder_categories
```python
from categorical import reorder_categories
```

Reorder categories as specified in new_categories.

``new_categories`` need to include all old categories and no new category
items.

Parameters
----------
new_categories : Index-like
   The categories in new order.
ordered : bool, optional
   Whether or not the categorical is treated as a ordered categorical.
   If not given, do not change the ordered information.

Returns
-------
Categorical
    Categorical with reordered categories.

Raises
------
ValueError
    If the new categories do not contain all old category items or any
    new ones

See Also
--------
rename_categories : Rename categories.
add_categories : Add new categories.
remove_categories : Remove the specified categories.
remove_unused_categories : Remove categories which are not used.
set_categories : Set the categories to the specified ones.

Examples
--------
For :class:`pandas.Series`:

>>> ser = pd.Series(['a', 'b', 'c', 'a'], dtype='category')
>>> ser = ser.cat.reorder_categories(['c', 'b', 'a'], ordered=True)
>>> ser
0   a
1   b
2   c
3   a
dtype: category
Categories (3, object): ['c' < 'b' < 'a']

>>> ser.sort_values()
2   c
1   b
0   a
3   a
dtype: category
Categories (3, object): ['c' < 'b' < 'a']

For :class:`pandas.CategoricalIndex`:

>>> ci = pd.CategoricalIndex(['a', 'b', 'c', 'a'])
>>> ci
CategoricalIndex(['a', 'b', 'c', 'a'], categories=['a', 'b', 'c'],
                 ordered=False, dtype='category')
>>> ci.reorder_categories(['c', 'b', 'a'], ordered=True)
CategoricalIndex(['a', 'b', 'c', 'a'], categories=['c', 'b', 'a'],
                 ordered=True, dtype='category')

---
## add_categories
```python
from categorical import add_categories
```

Add new categories.

`new_categories` will be included at the last/highest place in the
categories and will be unused directly after this call.

Parameters
----------
new_categories : category or list-like of category
   The new categories to be included.

Returns
-------
Categorical
    Categorical with new categories added.

Raises
------
ValueError
    If the new categories include old categories or do not validate as
    categories

See Also
--------
rename_categories : Rename categories.
reorder_categories : Reorder categories.
remove_categories : Remove the specified categories.
remove_unused_categories : Remove categories which are not used.
set_categories : Set the categories to the specified ones.

Examples
--------
>>> c = pd.Categorical(['c', 'b', 'c'])
>>> c
['c', 'b', 'c']
Categories (2, object): ['b', 'c']

>>> c.add_categories(['d', 'a'])
['c', 'b', 'c']
Categories (4, object): ['b', 'c', 'd', 'a']

---
## remove_categories
```python
from categorical import remove_categories
```

Remove the specified categories.

`removals` must be included in the old categories. Values which were in
the removed categories will be set to NaN

Parameters
----------
removals : category or list of categories
   The categories which should be removed.

Returns
-------
Categorical
    Categorical with removed categories.

Raises
------
ValueError
    If the removals are not contained in the categories

See Also
--------
rename_categories : Rename categories.
reorder_categories : Reorder categories.
add_categories : Add new categories.
remove_unused_categories : Remove categories which are not used.
set_categories : Set the categories to the specified ones.

Examples
--------
>>> c = pd.Categorical(['a', 'c', 'b', 'c', 'd'])
>>> c
['a', 'c', 'b', 'c', 'd']
Categories (4, object): ['a', 'b', 'c', 'd']

>>> c.remove_categories(['d', 'a'])
[NaN, 'c', 'b', 'c', NaN]
Categories (2, object): ['b', 'c']

---
## remove_unused_categories
```python
from categorical import remove_unused_categories
```

Remove categories which are not used.

Returns
-------
Categorical
    Categorical with unused categories dropped.

See Also
--------
rename_categories : Rename categories.
reorder_categories : Reorder categories.
add_categories : Add new categories.
remove_categories : Remove the specified categories.
set_categories : Set the categories to the specified ones.

Examples
--------
>>> c = pd.Categorical(['a', 'c', 'b', 'c', 'd'])
>>> c
['a', 'c', 'b', 'c', 'd']
Categories (4, object): ['a', 'b', 'c', 'd']

>>> c[2] = 'a'
>>> c[4] = 'c'
>>> c
['a', 'c', 'a', 'c', 'c']
Categories (4, object): ['a', 'b', 'c', 'd']

>>> c.remove_unused_categories()
['a', 'c', 'a', 'c', 'c']
Categories (2, object): ['a', 'c']

---
## map
```python
from categorical import map
```

Map categories using an input mapping or function.

Maps the categories to new categories. If the mapping correspondence is
one-to-one the result is a :class:`~pandas.Categorical` which has the
same order property as the original, otherwise a :class:`~pandas.Index`
is returned. NaN values are unaffected.

If a `dict` or :class:`~pandas.Series` is used any unmapped category is
mapped to `NaN`. Note that if this happens an :class:`~pandas.Index`
will be returned.

Parameters
----------
mapper : function, dict, or Series
    Mapping correspondence.
na_action : {None, 'ignore'}, default 'ignore'
    If 'ignore', propagate NaN values, without passing them to the
    mapping correspondence.

    .. deprecated:: 2.1.0

       The default value of 'ignore' has been deprecated and will be changed to
       None in the future.

Returns
-------
pandas.Categorical or pandas.Index
    Mapped categorical.

See Also
--------
CategoricalIndex.map : Apply a mapping correspondence on a
    :class:`~pandas.CategoricalIndex`.
Index.map : Apply a mapping correspondence on an
    :class:`~pandas.Index`.
Series.map : Apply a mapping correspondence on a
    :class:`~pandas.Series`.
Series.apply : Apply more complex functions on a
    :class:`~pandas.Series`.

Examples
--------
>>> cat = pd.Categorical(['a', 'b', 'c'])
>>> cat
['a', 'b', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> cat.map(lambda x: x.upper(), na_action=None)
['A', 'B', 'C']
Categories (3, object): ['A', 'B', 'C']
>>> cat.map({'a': 'first', 'b': 'second', 'c': 'third'}, na_action=None)
['first', 'second', 'third']
Categories (3, object): ['first', 'second', 'third']

If the mapping is one-to-one the ordering of the categories is
preserved:

>>> cat = pd.Categorical(['a', 'b', 'c'], ordered=True)
>>> cat
['a', 'b', 'c']
Categories (3, object): ['a' < 'b' < 'c']
>>> cat.map({'a': 3, 'b': 2, 'c': 1}, na_action=None)
[3, 2, 1]
Categories (3, int64): [3 < 2 < 1]

If the mapping is not one-to-one an :class:`~pandas.Index` is returned:

>>> cat.map({'a': 'first', 'b': 'second', 'c': 'first'}, na_action=None)
Index(['first', 'second', 'first'], dtype='object')

If a `dict` is used, all unmapped categories are mapped to `NaN` and
the result is an :class:`~pandas.Index`:

>>> cat.map({'a': 'first', 'b': 'second'}, na_action=None)
Index(['first', 'second', nan], dtype='object')

---
## _validate_setitem_value
```python
from categorical import _validate_setitem_value
```



---
## _validate_scalar
```python
from categorical import _validate_scalar
```

Convert a user-facing fill_value to a representation to use with our
underlying ndarray, raising TypeError if this is not possible.

Parameters
----------
fill_value : object

Returns
-------
fill_value : int

Raises
------
TypeError

---
## _validate_codes_for_dtype
```python
from categorical import _validate_codes_for_dtype
```



---
## __array__
```python
from categorical import __array__
```

The numpy array interface.

Returns
-------
numpy.array
    A numpy array of either the specified dtype or,
    if dtype==None (default), the same dtype as
    categorical.categories.dtype.

Examples
--------

>>> cat = pd.Categorical(['a', 'b'], ordered=True)

The following calls ``cat.__array__``

>>> np.asarray(cat)
array(['a', 'b'], dtype=object)

---
## __array_ufunc__
```python
from categorical import __array_ufunc__
```



---
## __setstate__
```python
from categorical import __setstate__
```

Necessary for making this object picklable

---
## nbytes
```python
from categorical import nbytes
```



---
## memory_usage
```python
from categorical import memory_usage
```

Memory usage of my values

Parameters
----------
deep : bool
    Introspect the data deeply, interrogate
    `object` dtypes for system-level memory consumption

Returns
-------
bytes used

Notes
-----
Memory usage does not include memory consumed by elements that
are not components of the array if deep=False

See Also
--------
numpy.ndarray.nbytes

---
## isna
```python
from categorical import isna
```

Detect missing values

Missing values (-1 in .codes) are detected.

Returns
-------
np.ndarray[bool] of whether my values are null

See Also
--------
isna : Top-level isna.
isnull : Alias of isna.
Categorical.notna : Boolean inverse of Categorical.isna.

---
## notna
```python
from categorical import notna
```

Inverse of isna

Both missing values (-1 in .codes) and NA as a category are detected as
null.

Returns
-------
np.ndarray[bool] of whether my values are not null

See Also
--------
notna : Top-level notna.
notnull : Alias of notna.
Categorical.isna : Boolean inverse of Categorical.notna.

---
## value_counts
```python
from categorical import value_counts
```

Return a Series containing counts of each category.

Every category will have an entry, even those with a count of 0.

Parameters
----------
dropna : bool, default True
    Don't include counts of NaN.

Returns
-------
counts : Series

See Also
--------
Series.value_counts

---
## _empty
```python
from categorical import _empty
```

Analogous to np.empty(shape, dtype=dtype)

Parameters
----------
shape : tuple[int]
dtype : CategoricalDtype

---
## _internal_get_values
```python
from categorical import _internal_get_values
```

Return the values.

For internal compatibility with pandas formatting.

Returns
-------
np.ndarray or ExtensionArray
    A numpy array or ExtensionArray of the same dtype as
    categorical.categories.dtype.

---
## check_for_ordered
```python
from categorical import check_for_ordered
```

assert that we are ordered

---
## argsort
```python
from categorical import argsort
```

Return the indices that would sort the Categorical.

Missing values are sorted at the end.

Parameters
----------
ascending : bool, default True
    Whether the indices should result in an ascending
    or descending sort.
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, optional
    Sorting algorithm.
**kwargs:
    passed through to :func:`numpy.argsort`.

Returns
-------
np.ndarray[np.intp]

See Also
--------
numpy.ndarray.argsort

Notes
-----
While an ordering is applied to the category values, arg-sorting
in this context refers more to organizing and grouping together
based on matching category values. Thus, this function can be
called on an unordered Categorical instance unlike the functions
'Categorical.min' and 'Categorical.max'.

Examples
--------
>>> pd.Categorical(['b', 'b', 'a', 'c']).argsort()
array([2, 0, 1, 3])

>>> cat = pd.Categorical(['b', 'b', 'a', 'c'],
...                      categories=['c', 'b', 'a'],
...                      ordered=True)
>>> cat.argsort()
array([3, 0, 1, 2])

Missing values are placed at the end

>>> cat = pd.Categorical([2, None, 1])
>>> cat.argsort()
array([2, 0, 1])

---
## sort_values
```python
from categorical import sort_values
```

Sort the Categorical by category value returning a new
Categorical by default.

While an ordering is applied to the category values, sorting in this
context refers more to organizing and grouping together based on
matching category values. Thus, this function can be called on an
unordered Categorical instance unlike the functions 'Categorical.min'
and 'Categorical.max'.

Parameters
----------
inplace : bool, default False
    Do operation in place.
ascending : bool, default True
    Order ascending. Passing False orders descending. The
    ordering parameter provides the method by which the
    category values are organized.
na_position : {'first', 'last'} (optional, default='last')
    'first' puts NaNs at the beginning
    'last' puts NaNs at the end

Returns
-------
Categorical or None

See Also
--------
Categorical.sort
Series.sort_values

Examples
--------
>>> c = pd.Categorical([1, 2, 2, 1, 5])
>>> c
[1, 2, 2, 1, 5]
Categories (3, int64): [1, 2, 5]
>>> c.sort_values()
[1, 1, 2, 2, 5]
Categories (3, int64): [1, 2, 5]
>>> c.sort_values(ascending=False)
[5, 2, 2, 1, 1]
Categories (3, int64): [1, 2, 5]

>>> c = pd.Categorical([1, 2, 2, 1, 5])

'sort_values' behaviour with NaNs. Note that 'na_position'
is independent of the 'ascending' parameter:

>>> c = pd.Categorical([np.nan, 2, 2, np.nan, 5])
>>> c
[NaN, 2, 2, NaN, 5]
Categories (2, int64): [2, 5]
>>> c.sort_values()
[2, 2, 5, NaN, NaN]
Categories (2, int64): [2, 5]
>>> c.sort_values(ascending=False)
[5, 2, 2, NaN, NaN]
Categories (2, int64): [2, 5]
>>> c.sort_values(na_position='first')
[NaN, NaN, 2, 2, 5]
Categories (2, int64): [2, 5]
>>> c.sort_values(ascending=False, na_position='first')
[NaN, NaN, 5, 2, 2]
Categories (2, int64): [2, 5]

---
## _rank
```python
from categorical import _rank
```

See Series.rank.__doc__.

---
## _values_for_rank
```python
from categorical import _values_for_rank
```

For correctly ranking ordered categorical data. See GH#15420

Ordered categorical data should be ranked on the basis of
codes with -1 translated to NaN.

Returns
-------
numpy.array

---
## _hash_pandas_object
```python
from categorical import _hash_pandas_object
```

Hash a Categorical by hashing its categories, and then mapping the codes
to the hashes.

Parameters
----------
encoding : str
hash_key : str
categorize : bool
    Ignored for Categorical.

Returns
-------
np.ndarray[uint64]

---
## _codes
```python
from categorical import _codes
```



---
## _box_func
```python
from categorical import _box_func
```



---
## _unbox_scalar
```python
from categorical import _unbox_scalar
```



---
## __iter__
```python
from categorical import __iter__
```

Returns an Iterator over the values of this Categorical.

---
## __contains__
```python
from categorical import __contains__
```

Returns True if `key` is in this Categorical.

---
## _formatter
```python
from categorical import _formatter
```



---
## _repr_categories
```python
from categorical import _repr_categories
```

return the base repr for the categories

---
## _get_repr_footer
```python
from categorical import _get_repr_footer
```

Returns a string representation of the footer.

---
## _get_values_repr
```python
from categorical import _get_values_repr
```



---
## __repr__
```python
from categorical import __repr__
```

String representation.

---
## _validate_listlike
```python
from categorical import _validate_listlike
```



---
## _reverse_indexer
```python
from categorical import _reverse_indexer
```

Compute the inverse of a categorical, returning
a dict of categories -> indexers.

*This is an internal function*

Returns
-------
Dict[Hashable, np.ndarray[np.intp]]
    dict of categories -> indexers

Examples
--------
>>> c = pd.Categorical(list('aabca'))
>>> c
['a', 'a', 'b', 'c', 'a']
Categories (3, object): ['a', 'b', 'c']
>>> c.categories
Index(['a', 'b', 'c'], dtype='object')
>>> c.codes
array([0, 0, 1, 2, 0], dtype=int8)
>>> c._reverse_indexer()
{'a': array([0, 1, 4]), 'b': array([2]), 'c': array([3])}

---
## _reduce
```python
from categorical import _reduce
```



---
## min
```python
from categorical import min
```

The minimum value of the object.

Only ordered `Categoricals` have a minimum!

Raises
------
TypeError
    If the `Categorical` is not `ordered`.

Returns
-------
min : the minimum of this `Categorical`, NA value if empty

---
## max
```python
from categorical import max
```

The maximum value of the object.

Only ordered `Categoricals` have a maximum!

Raises
------
TypeError
    If the `Categorical` is not `ordered`.

Returns
-------
max : the maximum of this `Categorical`, NA if array is empty

---
## _mode
```python
from categorical import _mode
```



---
## unique
```python
from categorical import unique
```

Return the ``Categorical`` which ``categories`` and ``codes`` are
unique.

.. versionchanged:: 1.3.0

    Previously, unused categories were dropped from the new categories.

Returns
-------
Categorical

See Also
--------
pandas.unique
CategoricalIndex.unique
Series.unique : Return unique values of Series object.

Examples
--------
>>> pd.Categorical(list("baabc")).unique()
['b', 'a', 'c']
Categories (3, object): ['a', 'b', 'c']
>>> pd.Categorical(list("baab"), categories=list("abc"), ordered=True).unique()
['b', 'a']
Categories (3, object): ['a' < 'b' < 'c']

---
## _cast_quantile_result
```python
from categorical import _cast_quantile_result
```



---
## equals
```python
from categorical import equals
```

Returns True if categorical arrays are equal.

Parameters
----------
other : `Categorical`

Returns
-------
bool

---
## _concat_same_type
```python
from categorical import _concat_same_type
```



---
## _encode_with_my_categories
```python
from categorical import _encode_with_my_categories
```

Re-encode another categorical using this Categorical's categories.

Notes
-----
This assumes we have already checked
self._categories_match_up_to_permutation(other).

---
## _categories_match_up_to_permutation
```python
from categorical import _categories_match_up_to_permutation
```

Returns True if categoricals are the same dtype
  same categories, and same ordered

Parameters
----------
other : Categorical

Returns
-------
bool

---
## describe
```python
from categorical import describe
```

Describes this Categorical

Returns
-------
description: `DataFrame`
    A dataframe with frequency and counts by category.

---
## isin
```python
from categorical import isin
```

Check whether `values` are contained in Categorical.

Return a boolean NumPy Array showing whether each element in
the Categorical matches an element in the passed sequence of
`values` exactly.

Parameters
----------
values : np.ndarray or ExtensionArray
    The sequence of values to test. Passing in a single string will
    raise a ``TypeError``. Instead, turn a single string into a
    list of one element.

Returns
-------
np.ndarray[bool]

Raises
------
TypeError
  * If `values` is not a set or list-like

See Also
--------
pandas.Series.isin : Equivalent method on Series.

Examples
--------
>>> s = pd.Categorical(['lama', 'cow', 'lama', 'beetle', 'lama',
...                'hippo'])
>>> s.isin(['cow', 'lama'])
array([ True,  True,  True, False,  True, False])

Passing a single string as ``s.isin('lama')`` will raise an error. Use
a list of one element instead:

>>> s.isin(['lama'])
array([ True, False,  True, False,  True, False])

---
## _replace
```python
from categorical import _replace
```



---
## _str_map
```python
from categorical import _str_map
```



---
## _str_get_dummies
```python
from categorical import _str_get_dummies
```



---
## _groupby_op
```python
from categorical import _groupby_op
```



---
## _validate
```python
from categorical import _validate
```



---
## _delegate_property_get
```python
from categorical import _delegate_property_get
```



---
## _delegate_property_set
```python
from categorical import _delegate_property_set
```



---
## _delegate_method
```python
from categorical import _delegate_method
```



---
## __name__
```python
from interval import __name__
```

define the IntervalIndex 

---
## IntervalArray
```python
from interval import IntervalArray
```



---
## _maybe_convert_platform_interval
```python
from interval import _maybe_convert_platform_interval
```

Try to do platform conversion, with special casing for IntervalArray.
Wrapper around maybe_convert_platform that alters the default return
dtype in certain cases to be compatible with IntervalArray.  For example,
empty lists return with integer dtype instead of object dtype, which is
prohibited for IntervalArray.

Parameters
----------
values : array-like

Returns
-------
array

---
## ndim
```python
from interval import ndim
```



---
## __new__
```python
from interval import __new__
```



---
## _simple_new
```python
from interval import _simple_new
```



---
## _ensure_simple_new_inputs
```python
from interval import _ensure_simple_new_inputs
```

Ensure correctness of input parameters for cls._simple_new.

---
## _from_sequence
```python
from interval import _from_sequence
```



---
## _from_factorized
```python
from interval import _from_factorized
```



---
## from_breaks
```python
from interval import from_breaks
```



---
## from_arrays
```python
from interval import from_arrays
```



---
## from_tuples
```python
from interval import from_tuples
```



---
## _validate
```python
from interval import _validate
```

Verify that the IntervalArray is valid.

Checks that

* dtype is correct
* left and right match lengths
* left and right have the same missing values
* left is always below right

---
## _shallow_copy
```python
from interval import _shallow_copy
```

Return a new IntervalArray with the replacement attributes

Parameters
----------
left : Index
    Values to be used for the left-side of the intervals.
right : Index
    Values to be used for the right-side of the intervals.

---
## dtype
```python
from interval import dtype
```



---
## nbytes
```python
from interval import nbytes
```



---
## size
```python
from interval import size
```



---
## __iter__
```python
from interval import __iter__
```



---
## __len__
```python
from interval import __len__
```



---
## __getitem__
```python
from interval import __getitem__
```



---
## __setitem__
```python
from interval import __setitem__
```



---
## _cmp_method
```python
from interval import _cmp_method
```



---
## __eq__
```python
from interval import __eq__
```



---
## __ne__
```python
from interval import __ne__
```



---
## __gt__
```python
from interval import __gt__
```



---
## __ge__
```python
from interval import __ge__
```



---
## __lt__
```python
from interval import __lt__
```



---
## __le__
```python
from interval import __le__
```



---
## argsort
```python
from interval import argsort
```



---
## min
```python
from interval import min
```



---
## max
```python
from interval import max
```



---
## _pad_or_backfill
```python
from interval import _pad_or_backfill
```



---
## fillna
```python
from interval import fillna
```

Fill NA/NaN values using the specified method.

Parameters
----------
value : scalar, dict, Series
    If a scalar value is passed it is used to fill all missing values.
    Alternatively, a Series or dict can be used to fill in different
    values for each index. The value should not be a list. The
    value(s) passed should be either Interval objects or NA/NaN.
method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None
    (Not implemented yet for IntervalArray)
    Method to use for filling holes in reindexed Series
limit : int, default None
    (Not implemented yet for IntervalArray)
    If method is specified, this is the maximum number of consecutive
    NaN values to forward/backward fill. In other words, if there is
    a gap with more than this number of consecutive NaNs, it will only
    be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled.
copy : bool, default True
    Whether to make a copy of the data before filling. If False, then
    the original should be modified and no new memory should be allocated.
    For ExtensionArray subclasses that cannot do this, it is at the
    author's discretion whether to ignore "copy=False" or to raise.

Returns
-------
filled : IntervalArray with NA/NaN filled

---
## astype
```python
from interval import astype
```

Cast to an ExtensionArray or NumPy array with dtype 'dtype'.

Parameters
----------
dtype : str or dtype
    Typecode or data-type to which the array is cast.

copy : bool, default True
    Whether to copy the data, even if not necessary. If False,
    a copy is made only if the old dtype does not match the
    new dtype.

Returns
-------
array : ExtensionArray or ndarray
    ExtensionArray or NumPy ndarray with 'dtype' for its dtype.

---
## equals
```python
from interval import equals
```



---
## _concat_same_type
```python
from interval import _concat_same_type
```

Concatenate multiple IntervalArray

Parameters
----------
to_concat : sequence of IntervalArray

Returns
-------
IntervalArray

---
## copy
```python
from interval import copy
```

Return a copy of the array.

Returns
-------
IntervalArray

---
## isna
```python
from interval import isna
```



---
## shift
```python
from interval import shift
```



---
## take
```python
from interval import take
```

Take elements from the IntervalArray.

Parameters
----------
indices : sequence of integers
    Indices to be taken.

allow_fill : bool, default False
    How to handle negative values in `indices`.

    * False: negative values in `indices` indicate positional indices
      from the right (the default). This is similar to
      :func:`numpy.take`.

    * True: negative values in `indices` indicate
      missing values. These values are set to `fill_value`. Any other
      other negative values raise a ``ValueError``.

fill_value : Interval or NA, optional
    Fill value to use for NA-indices when `allow_fill` is True.
    This may be ``None``, in which case the default NA value for
    the type, ``self.dtype.na_value``, is used.

    For many ExtensionArrays, there will be two representations of
    `fill_value`: a user-facing "boxed" scalar, and a low-level
    physical NA value. `fill_value` should be the user-facing version,
    and the implementation should handle translating that to the
    physical version for processing the take if necessary.

axis : any, default None
    Present for compat with IntervalIndex; does nothing.

Returns
-------
IntervalArray

Raises
------
IndexError
    When the indices are out of bounds for the array.
ValueError
    When `indices` contains negative values other than ``-1``
    and `allow_fill` is True.

---
## _validate_listlike
```python
from interval import _validate_listlike
```



---
## _validate_scalar
```python
from interval import _validate_scalar
```



---
## _validate_setitem_value
```python
from interval import _validate_setitem_value
```



---
## value_counts
```python
from interval import value_counts
```

Returns a Series containing counts of each interval.

Parameters
----------
dropna : bool, default True
    Don't include counts of NaN.

Returns
-------
counts : Series

See Also
--------
Series.value_counts

---
## _formatter
```python
from interval import _formatter
```



---
## left
```python
from interval import left
```



---
## right
```python
from interval import right
```



---
## length
```python
from interval import length
```



---
## mid
```python
from interval import mid
```



---
## overlaps
```python
from interval import overlaps
```



---
## closed
```python
from interval import closed
```

String describing the inclusive side the intervals.

Either ``left``, ``right``, ``both`` or ``neither``.

Examples
--------

For arrays:

>>> interv_arr = pd.arrays.IntervalArray([pd.Interval(0, 1), pd.Interval(1, 5)])
>>> interv_arr
<IntervalArray>
[(0, 1], (1, 5]]
Length: 2, dtype: interval[int64, right]
>>> interv_arr.closed
'right'

For Interval Index:

>>> interv_idx = pd.interval_range(start=0, end=2)
>>> interv_idx
IntervalIndex([(0, 1], (1, 2]], dtype='interval[int64, right]')
>>> interv_idx.closed
'right'

---
## set_closed
```python
from interval import set_closed
```



---
## is_non_overlapping_monotonic
```python
from interval import is_non_overlapping_monotonic
```



---
## __array__
```python
from interval import __array__
```

Return the IntervalArray's data as a numpy array of Interval
objects (with dtype='object')

---
## __arrow_array__
```python
from interval import __arrow_array__
```

Convert myself into a pyarrow Array.

---
## to_tuples
```python
from interval import to_tuples
```



---
## _putmask
```python
from interval import _putmask
```



---
## insert
```python
from interval import insert
```

Return a new IntervalArray inserting new item at location. Follows
Python numpy.insert semantics for negative values.  Only Interval
objects and NA can be inserted into an IntervalIndex

Parameters
----------
loc : int
item : Interval

Returns
-------
IntervalArray

---
## delete
```python
from interval import delete
```



---
## repeat
```python
from interval import repeat
```



---
## contains
```python
from interval import contains
```



---
## isin
```python
from interval import isin
```



---
## _combined
```python
from interval import _combined
```



---
## _from_combined
```python
from interval import _from_combined
```

Create a new IntervalArray with our dtype from a 1D complex128 ndarray.

---
## unique
```python
from interval import unique
```



---
## __name__
```python
from _arrow_string_mixins import __name__
```



---
## ArrowStringArrayMixin
```python
from _arrow_string_mixins import ArrowStringArrayMixin
```



---
## __init__
```python
from _arrow_string_mixins import __init__
```



---
## _str_pad
```python
from _arrow_string_mixins import _str_pad
```



---
## _str_get
```python
from _arrow_string_mixins import _str_get
```



---
## _str_slice_replace
```python
from _arrow_string_mixins import _str_slice_replace
```



---
## _str_capitalize
```python
from _arrow_string_mixins import _str_capitalize
```



---
## _str_title
```python
from _arrow_string_mixins import _str_title
```



---
## _str_swapcase
```python
from _arrow_string_mixins import _str_swapcase
```



---
## _str_removesuffix
```python
from _arrow_string_mixins import _str_removesuffix
```



---
## _field_accessor
```python
from timedeltas import _field_accessor
```



---
## TimedeltaArray
```python
from timedeltas import TimedeltaArray
```

Pandas ExtensionArray for timedelta data.

.. warning::

   TimedeltaArray is currently experimental, and its API may change
   without warning. In particular, :attr:`TimedeltaArray.dtype` is
   expected to change to be an instance of an ``ExtensionDtype``
   subclass.

Parameters
----------
values : array-like
    The timedelta data.

dtype : numpy.dtype
    Currently, only ``numpy.dtype("timedelta64[ns]")`` is accepted.
freq : Offset, optional
copy : bool, default False
    Whether to copy the underlying array of data.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.arrays.TimedeltaArray._from_sequence(pd.TimedeltaIndex(['1h', '2h']))
<TimedeltaArray>
['0 days 01:00:00', '0 days 02:00:00']
Length: 2, dtype: timedelta64[ns]

---
## sequence_to_td64ns
```python
from timedeltas import sequence_to_td64ns
```

Parameters
----------
data : list-like
copy : bool, default False
unit : str, optional
    The timedelta unit to treat integers as multiples of. For numeric
    data this defaults to ``'ns'``.
    Must be un-specified if the data contains a str and ``errors=="raise"``.
errors : {"raise", "coerce", "ignore"}, default "raise"
    How to handle elements that cannot be converted to timedelta64[ns].
    See ``pandas.to_timedelta`` for details.

Returns
-------
converted : numpy.ndarray
    The sequence converted to a numpy array with dtype ``timedelta64[ns]``.
inferred_freq : Tick or None
    The inferred frequency of the sequence.

Raises
------
ValueError : Data cannot be converted to timedelta64[ns].

Notes
-----
Unlike `pandas.to_timedelta`, if setting ``errors=ignore`` will not cause
errors to be ignored; they are caught and subsequently ignored at a
higher level.

---
## _ints_to_td64ns
```python
from timedeltas import _ints_to_td64ns
```

Convert an ndarray with integer-dtype to timedelta64[ns] dtype, treating
the integers as multiples of the given timedelta unit.

Parameters
----------
data : numpy.ndarray with integer-dtype
unit : str, default "ns"
    The timedelta unit to treat integers as multiples of.

Returns
-------
numpy.ndarray : timedelta64[ns] array converted from data
bool : whether a copy was made

---
## _objects_to_td64ns
```python
from timedeltas import _objects_to_td64ns
```

Convert a object-dtyped or string-dtyped array into an
timedelta64[ns]-dtyped array.

Parameters
----------
data : ndarray or Index
unit : str, default "ns"
    The timedelta unit to treat integers as multiples of.
    Must not be specified if the data contains a str.
errors : {"raise", "coerce", "ignore"}, default "raise"
    How to handle elements that cannot be converted to timedelta64[ns].
    See ``pandas.to_timedelta`` for details.

Returns
-------
numpy.ndarray : timedelta64[ns] array converted from data

Raises
------
ValueError : Data cannot be converted to timedelta64[ns].

Notes
-----
Unlike `pandas.to_timedelta`, if setting `errors=ignore` will not cause
errors to be ignored; they are caught and subsequently ignored at a
higher level.

---
## _validate_td64_dtype
```python
from timedeltas import _validate_td64_dtype
```



---
## f
```python
from timedeltas import f
```



---
## _scalar_type
```python
from timedeltas import _scalar_type
```



---
## _box_func
```python
from timedeltas import _box_func
```



---
## dtype
```python
from timedeltas import dtype
```

The dtype for the TimedeltaArray.

.. warning::

   A future version of pandas will change dtype to be an instance
   of a :class:`pandas.api.extensions.ExtensionDtype` subclass,
   not a ``numpy.dtype``.

Returns
-------
numpy.dtype

---
## _validate_dtype
```python
from timedeltas import _validate_dtype
```



---
## _simple_new
```python
from timedeltas import _simple_new
```



---
## _from_sequence
```python
from timedeltas import _from_sequence
```



---
## _from_sequence_not_strict
```python
from timedeltas import _from_sequence_not_strict
```

_from_sequence_not_strict but without responsibility for finding the
result's `freq`.

---
## _generate_range
```python
from timedeltas import _generate_range
```



---
## _unbox_scalar
```python
from timedeltas import _unbox_scalar
```



---
## _scalar_from_string
```python
from timedeltas import _scalar_from_string
```



---
## _check_compatible_with
```python
from timedeltas import _check_compatible_with
```



---
## astype
```python
from timedeltas import astype
```



---
## __iter__
```python
from timedeltas import __iter__
```



---
## sum
```python
from timedeltas import sum
```



---
## std
```python
from timedeltas import std
```



---
## _accumulate
```python
from timedeltas import _accumulate
```



---
## _formatter
```python
from timedeltas import _formatter
```



---
## _format_native_types
```python
from timedeltas import _format_native_types
```



---
## _add_offset
```python
from timedeltas import _add_offset
```



---
## __mul__
```python
from timedeltas import __mul__
```



---
## _scalar_divlike_op
```python
from timedeltas import _scalar_divlike_op
```

Shared logic for __truediv__, __rtruediv__, __floordiv__, __rfloordiv__
with scalar 'other'.

---
## _cast_divlike_op
```python
from timedeltas import _cast_divlike_op
```



---
## _vector_divlike_op
```python
from timedeltas import _vector_divlike_op
```

Shared logic for __truediv__, __floordiv__, and their reversed versions
with timedelta64-dtype ndarray other.

---
## __truediv__
```python
from timedeltas import __truediv__
```



---
## __rtruediv__
```python
from timedeltas import __rtruediv__
```



---
## __floordiv__
```python
from timedeltas import __floordiv__
```



---
## __rfloordiv__
```python
from timedeltas import __rfloordiv__
```



---
## __mod__
```python
from timedeltas import __mod__
```



---
## __rmod__
```python
from timedeltas import __rmod__
```



---
## __divmod__
```python
from timedeltas import __divmod__
```



---
## __rdivmod__
```python
from timedeltas import __rdivmod__
```



---
## __neg__
```python
from timedeltas import __neg__
```



---
## __pos__
```python
from timedeltas import __pos__
```



---
## __abs__
```python
from timedeltas import __abs__
```



---
## total_seconds
```python
from timedeltas import total_seconds
```

Return total duration of each element expressed in seconds.

This method is available directly on TimedeltaArray, TimedeltaIndex
and on Series containing timedelta values under the ``.dt`` namespace.

Returns
-------
ndarray, Index or Series
    When the calling object is a TimedeltaArray, the return type
    is ndarray.  When the calling object is a TimedeltaIndex,
    the return type is an Index with a float64 dtype. When the calling object
    is a Series, the return type is Series of type `float64` whose
    index is the same as the original.

See Also
--------
datetime.timedelta.total_seconds : Standard library version
    of this method.
TimedeltaIndex.components : Return a DataFrame with components of
    each Timedelta.

Examples
--------
**Series**

>>> s = pd.Series(pd.to_timedelta(np.arange(5), unit='d'))
>>> s
0   0 days
1   1 days
2   2 days
3   3 days
4   4 days
dtype: timedelta64[ns]

>>> s.dt.total_seconds()
0         0.0
1     86400.0
2    172800.0
3    259200.0
4    345600.0
dtype: float64

**TimedeltaIndex**

>>> idx = pd.to_timedelta(np.arange(5), unit='d')
>>> idx
TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq=None)

>>> idx.total_seconds()
Index([0.0, 86400.0, 172800.0, 259200.0, 345600.0], dtype='float64')

---
## to_pytimedelta
```python
from timedeltas import to_pytimedelta
```

Return an ndarray of datetime.timedelta objects.

Returns
-------
numpy.ndarray

Examples
--------
>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit='D')
>>> tdelta_idx
TimedeltaIndex(['1 days', '2 days', '3 days'],
                dtype='timedelta64[ns]', freq=None)
>>> tdelta_idx.to_pytimedelta()
array([datetime.timedelta(days=1), datetime.timedelta(days=2),
       datetime.timedelta(days=3)], dtype=object)

---
## components
```python
from timedeltas import components
```

Return a DataFrame of the individual resolution components of the Timedeltas.

The components (days, hours, minutes seconds, milliseconds, microseconds,
nanoseconds) are returned as columns in a DataFrame.

Returns
-------
DataFrame

Examples
--------
>>> tdelta_idx = pd.to_timedelta(['1 day 3 min 2 us 42 ns'])
>>> tdelta_idx
TimedeltaIndex(['1 days 00:03:00.000002042'],
               dtype='timedelta64[ns]', freq=None)
>>> tdelta_idx.components
   days  hours  minutes  seconds  milliseconds  microseconds  nanoseconds
0     1      0        3        0             0             2           42

---
## tz_to_dtype
```python
from datetimes import tz_to_dtype
```

Return a datetime64[ns] dtype appropriate for the given timezone.

Parameters
----------
tz : tzinfo or None
unit : str, default "ns"

Returns
-------
np.dtype or Datetime64TZDType

---
## _field_accessor
```python
from datetimes import _field_accessor
```



---
## DatetimeArray
```python
from datetimes import DatetimeArray
```

Pandas ExtensionArray for tz-naive or tz-aware datetime data.

.. warning::

   DatetimeArray is currently experimental, and its API may change
   without warning. In particular, :attr:`DatetimeArray.dtype` is
   expected to change to always be an instance of an ``ExtensionDtype``
   subclass.

Parameters
----------
values : Series, Index, DatetimeArray, ndarray
    The datetime data.

    For DatetimeArray `values` (or a Series or Index boxing one),
    `dtype` and `freq` will be extracted from `values`.

dtype : numpy.dtype or DatetimeTZDtype
    Note that the only NumPy dtype allowed is 'datetime64[ns]'.
freq : str or Offset, optional
    The frequency.
copy : bool, default False
    Whether to copy the underlying array of values.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.arrays.DatetimeArray._from_sequence(
...    pd.DatetimeIndex(['2023-01-01', '2023-01-02'], freq='D'))
<DatetimeArray>
['2023-01-01 00:00:00', '2023-01-02 00:00:00']
Length: 2, dtype: datetime64[ns]

---
## _sequence_to_dt64
```python
from datetimes import _sequence_to_dt64
```

Parameters
----------
data : np.ndarray or ExtensionArray
    dtl.ensure_arraylike_for_datetimelike has already been called.
copy : bool, default False
tz : tzinfo or None, default None
dayfirst : bool, default False
yearfirst : bool, default False
ambiguous : str, bool, or arraylike, default 'raise'
    See pandas._libs.tslibs.tzconversion.tz_localize_to_utc.
out_unit : str or None, default None
    Desired output resolution.

Returns
-------
result : numpy.ndarray
    The sequence converted to a numpy array with dtype ``datetime64[unit]``.
    Where `unit` is "ns" unless specified otherwise by `out_unit`.
tz : tzinfo or None
    Either the user-provided tzinfo or one inferred from the data.

Raises
------
TypeError : PeriodDType data is passed

---
## _construct_from_dt64_naive
```python
from datetimes import _construct_from_dt64_naive
```

Convert datetime64 data to a supported dtype, localizing if necessary.

---
## objects_to_datetime64
```python
from datetimes import objects_to_datetime64
```

Convert data to array of timestamps.

Parameters
----------
data : np.ndarray[object]
dayfirst : bool
yearfirst : bool
utc : bool, default False
    Whether to convert/localize timestamps to UTC.
errors : {'raise', 'ignore', 'coerce'}
allow_object : bool
    Whether to return an object-dtype ndarray instead of raising if the
    data contains more than one timezone.
out_unit : str, default "ns"

Returns
-------
result : ndarray
    np.datetime64[out_unit] if returned values represent wall times or UTC
    timestamps.
    object if mixed timezones
inferred_tz : tzinfo or None
    If not None, then the datetime64 values in `result` denote UTC timestamps.

Raises
------
ValueError : if data cannot be converted to datetimes
TypeError  : When a type cannot be converted to datetime

---
## maybe_convert_dtype
```python
from datetimes import maybe_convert_dtype
```

Convert data based on dtype conventions, issuing
errors where appropriate.

Parameters
----------
data : np.ndarray or pd.Index
copy : bool
tz : tzinfo or None, default None

Returns
-------
data : np.ndarray or pd.Index
copy : bool

Raises
------
TypeError : PeriodDType data is passed

---
## _maybe_infer_tz
```python
from datetimes import _maybe_infer_tz
```

If a timezone is inferred from data, check that it is compatible with
the user-provided timezone, if any.

Parameters
----------
tz : tzinfo or None
inferred_tz : tzinfo or None

Returns
-------
tz : tzinfo or None

Raises
------
TypeError : if both timezones are present but do not match

---
## _validate_dt64_dtype
```python
from datetimes import _validate_dt64_dtype
```

Check that a dtype, if passed, represents either a numpy datetime64[ns]
dtype or a pandas DatetimeTZDtype.

Parameters
----------
dtype : object

Returns
-------
dtype : None, numpy.dtype, or DatetimeTZDtype

Raises
------
ValueError : invalid dtype

Notes
-----
Unlike _validate_tz_from_dtype, this does _not_ allow non-existent
tz errors to go through

---
## _validate_tz_from_dtype
```python
from datetimes import _validate_tz_from_dtype
```

If the given dtype is a DatetimeTZDtype, extract the implied
tzinfo object from it and check that it does not conflict with the given
tz.

Parameters
----------
dtype : dtype, str
tz : None, tzinfo
explicit_tz_none : bool, default False
    Whether tz=None was passed explicitly, as opposed to lib.no_default.

Returns
-------
tz : consensus tzinfo

Raises
------
ValueError : on tzinfo mismatch

---
## _infer_tz_from_endpoints
```python
from datetimes import _infer_tz_from_endpoints
```

If a timezone is not explicitly given via `tz`, see if one can
be inferred from the `start` and `end` endpoints.  If more than one
of these inputs provides a timezone, require that they all agree.

Parameters
----------
start : Timestamp
end : Timestamp
tz : tzinfo or None

Returns
-------
tz : tzinfo or None

Raises
------
TypeError : if start and end timezones do not agree

---
## _maybe_normalize_endpoints
```python
from datetimes import _maybe_normalize_endpoints
```



---
## _maybe_localize_point
```python
from datetimes import _maybe_localize_point
```

Localize a start or end Timestamp to the timezone of the corresponding
start or end Timestamp

Parameters
----------
ts : start or end Timestamp to potentially localize
freq : Tick, DateOffset, or None
tz : str, timezone object or None
ambiguous: str, localization behavior for ambiguous times
nonexistent: str, localization behavior for nonexistent times

Returns
-------
ts : Timestamp

---
## _generate_range
```python
from datetimes import _generate_range
```



---
## _scalar_type
```python
from datetimes import _scalar_type
```



---
## _from_scalars
```python
from datetimes import _from_scalars
```



---
## _validate_dtype
```python
from datetimes import _validate_dtype
```



---
## _simple_new
```python
from datetimes import _simple_new
```



---
## _from_sequence
```python
from datetimes import _from_sequence
```



---
## _from_sequence_not_strict
```python
from datetimes import _from_sequence_not_strict
```

A non-strict version of _from_sequence, called from DatetimeIndex.__new__.

---
## _unbox_scalar
```python
from datetimes import _unbox_scalar
```



---
## _scalar_from_string
```python
from datetimes import _scalar_from_string
```



---
## _check_compatible_with
```python
from datetimes import _check_compatible_with
```



---
## _box_func
```python
from datetimes import _box_func
```



---
## dtype
```python
from datetimes import dtype
```

The dtype for the DatetimeArray.

.. warning::

   A future version of pandas will change dtype to never be a
   ``numpy.dtype``. Instead, :attr:`DatetimeArray.dtype` will
   always be an instance of an ``ExtensionDtype`` subclass.

Returns
-------
numpy.dtype or DatetimeTZDtype
    If the values are tz-naive, then ``np.dtype('datetime64[ns]')``
    is returned.

    If the values are tz-aware, then the ``DatetimeTZDtype``
    is returned.

---
## tz
```python
from datetimes import tz
```



---
## tzinfo
```python
from datetimes import tzinfo
```

Alias for tz attribute

---
## is_normalized
```python
from datetimes import is_normalized
```

Returns True if all of the dates are at midnight ("no time")

---
## _resolution_obj
```python
from datetimes import _resolution_obj
```



---
## __array__
```python
from datetimes import __array__
```



---
## __iter__
```python
from datetimes import __iter__
```

Return an iterator over the boxed values

Yields
------
tstamp : Timestamp

---
## astype
```python
from datetimes import astype
```



---
## _format_native_types
```python
from datetimes import _format_native_types
```



---
## _has_same_tz
```python
from datetimes import _has_same_tz
```



---
## _assert_tzawareness_compat
```python
from datetimes import _assert_tzawareness_compat
```



---
## _add_offset
```python
from datetimes import _add_offset
```



---
## _local_timestamps
```python
from datetimes import _local_timestamps
```

Convert to an i8 (unix-like nanosecond timestamp) representation
while keeping the local timezone and not using UTC.
This is used to calculate time-of-day information as if the timestamps
were timezone-naive.

---
## tz_convert
```python
from datetimes import tz_convert
```



---
## tz_localize
```python
from datetimes import tz_localize
```



---
## to_pydatetime
```python
from datetimes import to_pydatetime
```

Return an ndarray of ``datetime.datetime`` objects.

Returns
-------
numpy.ndarray

Examples
--------
>>> idx = pd.date_range('2018-02-27', periods=3)
>>> idx.to_pydatetime()
array([datetime.datetime(2018, 2, 27, 0, 0),
       datetime.datetime(2018, 2, 28, 0, 0),
       datetime.datetime(2018, 3, 1, 0, 0)], dtype=object)

---
## normalize
```python
from datetimes import normalize
```

Convert times to midnight.

The time component of the date-time is converted to midnight i.e.
00:00:00. This is useful in cases, when the time does not matter.
Length is unaltered. The timezones are unaffected.

This method is available on Series with datetime values under
the ``.dt`` accessor, and directly on Datetime Array/Index.

Returns
-------
DatetimeArray, DatetimeIndex or Series
    The same type as the original data. Series will have the same
    name and index. DatetimeIndex will have the same name.

See Also
--------
floor : Floor the datetimes to the specified freq.
ceil : Ceil the datetimes to the specified freq.
round : Round the datetimes to the specified freq.

Examples
--------
>>> idx = pd.date_range(start='2014-08-01 10:00', freq='h',
...                     periods=3, tz='Asia/Calcutta')
>>> idx
DatetimeIndex(['2014-08-01 10:00:00+05:30',
               '2014-08-01 11:00:00+05:30',
               '2014-08-01 12:00:00+05:30'],
                dtype='datetime64[ns, Asia/Calcutta]', freq='h')
>>> idx.normalize()
DatetimeIndex(['2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30',
               '2014-08-01 00:00:00+05:30'],
               dtype='datetime64[ns, Asia/Calcutta]', freq=None)

---
## to_period
```python
from datetimes import to_period
```



---
## month_name
```python
from datetimes import month_name
```

Return the month names with specified locale.

Parameters
----------
locale : str, optional
    Locale determining the language in which to return the month name.
    Default is English locale (``'en_US.utf8'``). Use the command
    ``locale -a`` on your terminal on Unix systems to find your locale
    language code.

Returns
-------
Series or Index
    Series or Index of month names.

Examples
--------
>>> s = pd.Series(pd.date_range(start='2018-01', freq='ME', periods=3))
>>> s
0   2018-01-31
1   2018-02-28
2   2018-03-31
dtype: datetime64[ns]
>>> s.dt.month_name()
0     January
1    February
2       March
dtype: object

>>> idx = pd.date_range(start='2018-01', freq='ME', periods=3)
>>> idx
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
              dtype='datetime64[ns]', freq='ME')
>>> idx.month_name()
Index(['January', 'February', 'March'], dtype='object')

Using the ``locale`` parameter you can set a different locale language,
for example: ``idx.month_name(locale='pt_BR.utf8')`` will return month
names in Brazilian Portuguese language.

>>> idx = pd.date_range(start='2018-01', freq='ME', periods=3)
>>> idx
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31'],
              dtype='datetime64[ns]', freq='ME')
>>> idx.month_name(locale='pt_BR.utf8')  # doctest: +SKIP
Index(['Janeiro', 'Fevereiro', 'Março'], dtype='object')

---
## day_name
```python
from datetimes import day_name
```

Return the day names with specified locale.

Parameters
----------
locale : str, optional
    Locale determining the language in which to return the day name.
    Default is English locale (``'en_US.utf8'``). Use the command
    ``locale -a`` on your terminal on Unix systems to find your locale
    language code.

Returns
-------
Series or Index
    Series or Index of day names.

Examples
--------
>>> s = pd.Series(pd.date_range(start='2018-01-01', freq='D', periods=3))
>>> s
0   2018-01-01
1   2018-01-02
2   2018-01-03
dtype: datetime64[ns]
>>> s.dt.day_name()
0       Monday
1      Tuesday
2    Wednesday
dtype: object

>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name()
Index(['Monday', 'Tuesday', 'Wednesday'], dtype='object')

Using the ``locale`` parameter you can set a different locale language,
for example: ``idx.day_name(locale='pt_BR.utf8')`` will return day
names in Brazilian Portuguese language.

>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name(locale='pt_BR.utf8') # doctest: +SKIP
Index(['Segunda', 'Terça', 'Quarta'], dtype='object')

---
## time
```python
from datetimes import time
```

Returns numpy array of :class:`datetime.time` objects.

The time part of the Timestamps.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.time
0    10:00:00
1    11:00:00
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.time
array([datetime.time(10, 0), datetime.time(11, 0)], dtype=object)

---
## timetz
```python
from datetimes import timetz
```

Returns numpy array of :class:`datetime.time` objects with timezones.

The time part of the Timestamps.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.timetz
0    10:00:00+00:00
1    11:00:00+00:00
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.timetz
array([datetime.time(10, 0, tzinfo=datetime.timezone.utc),
datetime.time(11, 0, tzinfo=datetime.timezone.utc)], dtype=object)

---
## date
```python
from datetimes import date
```

Returns numpy array of python :class:`datetime.date` objects.

Namely, the date part of Timestamps without time and
timezone information.

Examples
--------
For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[ns, UTC]
>>> s.dt.date
0    2020-01-01
1    2020-02-01
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00",
...                         "2/1/2020 11:00:00+00:00"])
>>> idx.date
array([datetime.date(2020, 1, 1), datetime.date(2020, 2, 1)], dtype=object)

---
## isocalendar
```python
from datetimes import isocalendar
```



---
## to_julian_date
```python
from datetimes import to_julian_date
```



---
## std
```python
from datetimes import std
```

Return sample standard deviation over requested axis.

Normalized by `N-1` by default. This can be changed using ``ddof``.

Parameters
----------
axis : int, optional
    Axis for the function to be applied on. For :class:`pandas.Series`
    this parameter is unused and defaults to ``None``.
ddof : int, default 1
    Degrees of Freedom. The divisor used in calculations is `N - ddof`,
    where `N` represents the number of elements.
skipna : bool, default True
    Exclude NA/null values. If an entire row/column is ``NA``, the result
    will be ``NA``.

Returns
-------
Timedelta

See Also
--------
numpy.ndarray.std : Returns the standard deviation of the array elements
    along given axis.
Series.std : Return sample standard deviation over requested axis.

Examples
--------
For :class:`pandas.DatetimeIndex`:

>>> idx = pd.date_range('2001-01-01 00:00', periods=3)
>>> idx
DatetimeIndex(['2001-01-01', '2001-01-02', '2001-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.std()
Timedelta('1 days 00:00:00')

---
## __name__
```python
from string_ import __name__
```



---
## StringDtype
```python
from string_ import StringDtype
```

Extension dtype for string data.

.. warning::

   StringDtype is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
storage : {"python", "pyarrow", "pyarrow_numpy"}, optional
    If not given, the value of ``pd.options.mode.string_storage``.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.StringDtype()
string[python]

>>> pd.StringDtype(storage="pyarrow")
string[pyarrow]

---
## BaseStringArray
```python
from string_ import BaseStringArray
```

Mixin class for StringArray, ArrowStringArray.

---
## StringArray
```python
from string_ import StringArray
```

Extension array for string data.

.. warning::

   StringArray is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
values : array-like
    The array of data.

    .. warning::

       Currently, this expects an object-dtype ndarray
       where the elements are Python strings
       or nan-likes (``None``, ``np.nan``, ``NA``).
       This may change without warning in the future. Use
       :meth:`pandas.array` with ``dtype="string"`` for a stable way of
       creating a `StringArray` from any sequence.

    .. versionchanged:: 1.5.0

       StringArray now accepts array-likes containing
       nan-likes(``None``, ``np.nan``) for the ``values`` parameter
       in addition to strings and :attr:`pandas.NA`

copy : bool, default False
    Whether to copy the array of data.

Attributes
----------
None

Methods
-------
None

See Also
--------
:func:`pandas.array`
    The recommended function for creating a StringArray.
Series.str
    The string methods are available on Series backed by
    a StringArray.

Notes
-----
StringArray returns a BooleanArray for comparison methods.

Examples
--------
>>> pd.array(['This is', 'some text', None, 'data.'], dtype="string")
<StringArray>
['This is', 'some text', <NA>, 'data.']
Length: 4, dtype: string

Unlike arrays instantiated with ``dtype="object"``, ``StringArray``
will convert the values to strings.

>>> pd.array(['1', 1], dtype="object")
<NumpyExtensionArray>
['1', 1]
Length: 2, dtype: object
>>> pd.array(['1', 1], dtype="string")
<StringArray>
['1', '1']
Length: 2, dtype: string

However, instantiating StringArrays directly with non-strings will raise an error.

For comparison methods, `StringArray` returns a :class:`pandas.BooleanArray`:

>>> pd.array(["a", None, "c"], dtype="string") == "a"
<BooleanArray>
[True, <NA>, False]
Length: 3, dtype: boolean

---
## na_value
```python
from string_ import na_value
```



---
## __init__
```python
from string_ import __init__
```



---
## type
```python
from string_ import type
```



---
## construct_from_string
```python
from string_ import construct_from_string
```

Construct a StringDtype from a string.

Parameters
----------
string : str
    The type of the name. The storage type will be taking from `string`.
    Valid options and their storage types are

    ========================== ==============================================
    string                     result storage
    ========================== ==============================================
    ``'string'``               pd.options.mode.string_storage, default python
    ``'string[python]'``       python
    ``'string[pyarrow]'``      pyarrow
    ========================== ==============================================

Returns
-------
StringDtype

Raise
-----
TypeError
    If the string is not a valid option.

---
## construct_array_type
```python
from string_ import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## __from_arrow__
```python
from string_ import __from_arrow__
```

Construct StringArray from pyarrow Array/ChunkedArray.

---
## tolist
```python
from string_ import tolist
```



---
## _from_scalars
```python
from string_ import _from_scalars
```



---
## _validate
```python
from string_ import _validate
```

Validate that we only store NA or strings.

---
## _from_sequence
```python
from string_ import _from_sequence
```



---
## _from_sequence_of_strings
```python
from string_ import _from_sequence_of_strings
```



---
## _empty
```python
from string_ import _empty
```



---
## __arrow_array__
```python
from string_ import __arrow_array__
```

Convert myself into a pyarrow Array.

---
## _values_for_factorize
```python
from string_ import _values_for_factorize
```



---
## __setitem__
```python
from string_ import __setitem__
```



---
## _putmask
```python
from string_ import _putmask
```



---
## astype
```python
from string_ import astype
```



---
## _reduce
```python
from string_ import _reduce
```



---
## min
```python
from string_ import min
```



---
## max
```python
from string_ import max
```



---
## value_counts
```python
from string_ import value_counts
```



---
## memory_usage
```python
from string_ import memory_usage
```



---
## searchsorted
```python
from string_ import searchsorted
```



---
## _cmp_method
```python
from string_ import _cmp_method
```



---
## _str_map
```python
from string_ import _str_map
```



---
## __name__
```python
from numpy_ import __name__
```



---
## NumpyExtensionArray
```python
from numpy_ import NumpyExtensionArray
```

A pandas ExtensionArray for NumPy data.

This is mostly for internal compatibility, and is not especially
useful on its own.

Parameters
----------
values : ndarray
    The NumPy ndarray to wrap. Must be 1-dimensional.
copy : bool, default False
    Whether to copy `values`.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.arrays.NumpyExtensionArray(np.array([0, 1, 2, 3]))
<NumpyExtensionArray>
[0, 1, 2, 3]
Length: 4, dtype: int64

---
## __init__
```python
from numpy_ import __init__
```



---
## _from_sequence
```python
from numpy_ import _from_sequence
```



---
## _from_backing_data
```python
from numpy_ import _from_backing_data
```



---
## dtype
```python
from numpy_ import dtype
```



---
## __array__
```python
from numpy_ import __array__
```



---
## __array_ufunc__
```python
from numpy_ import __array_ufunc__
```



---
## astype
```python
from numpy_ import astype
```



---
## isna
```python
from numpy_ import isna
```



---
## _validate_scalar
```python
from numpy_ import _validate_scalar
```



---
## _values_for_factorize
```python
from numpy_ import _values_for_factorize
```



---
## _pad_or_backfill
```python
from numpy_ import _pad_or_backfill
```

ffill or bfill along axis=0.

---
## interpolate
```python
from numpy_ import interpolate
```

See NDFrame.interpolate.__doc__.

---
## any
```python
from numpy_ import any
```



---
## all
```python
from numpy_ import all
```



---
## min
```python
from numpy_ import min
```



---
## max
```python
from numpy_ import max
```



---
## sum
```python
from numpy_ import sum
```



---
## prod
```python
from numpy_ import prod
```



---
## mean
```python
from numpy_ import mean
```



---
## median
```python
from numpy_ import median
```



---
## std
```python
from numpy_ import std
```



---
## var
```python
from numpy_ import var
```



---
## sem
```python
from numpy_ import sem
```



---
## kurt
```python
from numpy_ import kurt
```



---
## skew
```python
from numpy_ import skew
```



---
## to_numpy
```python
from numpy_ import to_numpy
```



---
## __invert__
```python
from numpy_ import __invert__
```



---
## __neg__
```python
from numpy_ import __neg__
```



---
## __pos__
```python
from numpy_ import __pos__
```



---
## __abs__
```python
from numpy_ import __abs__
```



---
## _cmp_method
```python
from numpy_ import _cmp_method
```



---
## _wrap_ndarray_result
```python
from numpy_ import _wrap_ndarray_result
```



---
## __name__
```python
from _ranges import __name__
```

Helper functions to generate range-like data for DatetimeArray
(and possibly TimedeltaArray/PeriodArray)

---
## generate_regular_range
```python
from _ranges import generate_regular_range
```

Generate a range of dates or timestamps with the spans between dates
described by the given `freq` DateOffset.

Parameters
----------
start : Timedelta, Timestamp or None
    First point of produced date range.
end : Timedelta, Timestamp or None
    Last point of produced date range.
periods : int or None
    Number of periods in produced date range.
freq : Tick
    Describes space between dates in produced date range.
unit : str, default "ns"
    The resolution the output is meant to represent.

Returns
-------
ndarray[np.int64]
    Representing the given resolution.

---
## _generate_range_overflow_safe
```python
from _ranges import _generate_range_overflow_safe
```

Calculate the second endpoint for passing to np.arange, checking
to avoid an integer overflow.  Catch OverflowError and re-raise
as OutOfBoundsDatetime.

Parameters
----------
endpoint : int
    nanosecond timestamp of the known endpoint of the desired range
periods : int
    number of periods in the desired range
stride : int
    nanoseconds between periods in the desired range
side : {'start', 'end'}
    which end of the range `endpoint` refers to

Returns
-------
other_end : int

Raises
------
OutOfBoundsDatetime

---
## _generate_range_overflow_safe_signed
```python
from _ranges import _generate_range_overflow_safe_signed
```

A special case for _generate_range_overflow_safe where `periods * stride`
can be calculated without overflowing int64 bounds.

---
## __name__
```python
from string_arrow import __name__
```



---
## _chk_pyarrow_available
```python
from string_arrow import _chk_pyarrow_available
```



---
## ArrowStringArray
```python
from string_arrow import ArrowStringArray
```

Extension array for string data in a ``pyarrow.ChunkedArray``.

.. warning::

   ArrowStringArray is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
values : pyarrow.Array or pyarrow.ChunkedArray
    The array of data.

Attributes
----------
None

Methods
-------
None

See Also
--------
:func:`pandas.array`
    The recommended function for creating a ArrowStringArray.
Series.str
    The string methods are available on Series backed by
    a ArrowStringArray.

Notes
-----
ArrowStringArray returns a BooleanArray for comparison methods.

Examples
--------
>>> pd.array(['This is', 'some text', None, 'data.'], dtype="string[pyarrow]")
<ArrowStringArray>
['This is', 'some text', <NA>, 'data.']
Length: 4, dtype: string

---
## ArrowStringArrayNumpySemantics
```python
from string_arrow import ArrowStringArrayNumpySemantics
```



---
## __init__
```python
from string_arrow import __init__
```



---
## _box_pa_scalar
```python
from string_arrow import _box_pa_scalar
```



---
## _box_pa_array
```python
from string_arrow import _box_pa_array
```



---
## __len__
```python
from string_arrow import __len__
```

Length of this array.

Returns
-------
length : int

---
## _from_sequence
```python
from string_arrow import _from_sequence
```



---
## _from_sequence_of_strings
```python
from string_arrow import _from_sequence_of_strings
```



---
## dtype
```python
from string_arrow import dtype
```

An instance of 'string[pyarrow]'.

---
## insert
```python
from string_arrow import insert
```



---
## _result_converter
```python
from string_arrow import _result_converter
```



---
## _maybe_convert_setitem_value
```python
from string_arrow import _maybe_convert_setitem_value
```

Maybe convert value to be pyarrow compatible.

---
## isin
```python
from string_arrow import isin
```



---
## astype
```python
from string_arrow import astype
```



---
## _data
```python
from string_arrow import _data
```



---
## _str_map
```python
from string_arrow import _str_map
```



---
## _str_contains
```python
from string_arrow import _str_contains
```



---
## _str_startswith
```python
from string_arrow import _str_startswith
```



---
## _str_endswith
```python
from string_arrow import _str_endswith
```



---
## _str_replace
```python
from string_arrow import _str_replace
```



---
## _str_repeat
```python
from string_arrow import _str_repeat
```



---
## _str_match
```python
from string_arrow import _str_match
```



---
## _str_fullmatch
```python
from string_arrow import _str_fullmatch
```



---
## _str_slice
```python
from string_arrow import _str_slice
```



---
## _str_isalnum
```python
from string_arrow import _str_isalnum
```



---
## _str_isalpha
```python
from string_arrow import _str_isalpha
```



---
## _str_isdecimal
```python
from string_arrow import _str_isdecimal
```



---
## _str_isdigit
```python
from string_arrow import _str_isdigit
```



---
## _str_islower
```python
from string_arrow import _str_islower
```



---
## _str_isnumeric
```python
from string_arrow import _str_isnumeric
```



---
## _str_isspace
```python
from string_arrow import _str_isspace
```



---
## _str_istitle
```python
from string_arrow import _str_istitle
```



---
## _str_isupper
```python
from string_arrow import _str_isupper
```



---
## _str_len
```python
from string_arrow import _str_len
```



---
## _str_lower
```python
from string_arrow import _str_lower
```



---
## _str_upper
```python
from string_arrow import _str_upper
```



---
## _str_strip
```python
from string_arrow import _str_strip
```



---
## _str_lstrip
```python
from string_arrow import _str_lstrip
```



---
## _str_rstrip
```python
from string_arrow import _str_rstrip
```



---
## _str_removeprefix
```python
from string_arrow import _str_removeprefix
```



---
## _str_removesuffix
```python
from string_arrow import _str_removesuffix
```



---
## _str_count
```python
from string_arrow import _str_count
```



---
## _str_find
```python
from string_arrow import _str_find
```



---
## _str_get_dummies
```python
from string_arrow import _str_get_dummies
```



---
## _convert_int_dtype
```python
from string_arrow import _convert_int_dtype
```



---
## _reduce
```python
from string_arrow import _reduce
```



---
## _rank
```python
from string_arrow import _rank
```

See Series.rank.__doc__.

---
## __getattribute__
```python
from string_arrow import __getattribute__
```



---
## _cmp_method
```python
from string_arrow import _cmp_method
```



---
## value_counts
```python
from string_arrow import value_counts
```



---
## __name__
```python
from boolean import __name__
```



---
## BooleanDtype
```python
from boolean import BooleanDtype
```

Extension dtype for boolean data.

.. warning::

   BooleanDtype is considered experimental. The implementation and
   parts of the API may change without warning.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> pd.BooleanDtype()
BooleanDtype

---
## coerce_to_array
```python
from boolean import coerce_to_array
```

Coerce the input values array to numpy arrays with a mask.

Parameters
----------
values : 1D list-like
mask : bool 1D array, optional
copy : bool, default False
    if True, copy the input

Returns
-------
tuple of (values, mask)

---
## BooleanArray
```python
from boolean import BooleanArray
```

Array of boolean (True/False) data with missing values.

This is a pandas Extension array for boolean data, under the hood
represented by 2 numpy arrays: a boolean array with the data and
a boolean array with the mask (True indicating missing).

BooleanArray implements Kleene logic (sometimes called three-value
logic) for logical operations. See :ref:`boolean.kleene` for more.

To construct an BooleanArray from generic array-like input, use
:func:`pandas.array` specifying ``dtype="boolean"`` (see examples
below).

.. warning::

   BooleanArray is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
values : numpy.ndarray
    A 1-d boolean-dtype array with the data.
mask : numpy.ndarray
    A 1-d boolean-dtype array indicating missing values (True
    indicates missing).
copy : bool, default False
    Whether to copy the `values` and `mask` arrays.

Attributes
----------
None

Methods
-------
None

Returns
-------
BooleanArray

Examples
--------
Create an BooleanArray with :func:`pandas.array`:

>>> pd.array([True, False, None], dtype="boolean")
<BooleanArray>
[True, False, <NA>]
Length: 3, dtype: boolean

---
## type
```python
from boolean import type
```



---
## kind
```python
from boolean import kind
```



---
## numpy_dtype
```python
from boolean import numpy_dtype
```



---
## construct_array_type
```python
from boolean import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## __repr__
```python
from boolean import __repr__
```



---
## _is_boolean
```python
from boolean import _is_boolean
```



---
## _is_numeric
```python
from boolean import _is_numeric
```



---
## __from_arrow__
```python
from boolean import __from_arrow__
```

Construct BooleanArray from pyarrow Array/ChunkedArray.

---
## _simple_new
```python
from boolean import _simple_new
```



---
## __init__
```python
from boolean import __init__
```



---
## dtype
```python
from boolean import dtype
```



---
## _from_sequence_of_strings
```python
from boolean import _from_sequence_of_strings
```



---
## _coerce_to_array
```python
from boolean import _coerce_to_array
```



---
## _logical_method
```python
from boolean import _logical_method
```



---
## _accumulate
```python
from boolean import _accumulate
```



---
## map_string
```python
from boolean import map_string
```



---
## __name__
```python
from integer import __name__
```



---
## IntegerDtype
```python
from integer import IntegerDtype
```

An ExtensionDtype to hold a single size & kind of integer dtype.

These specific implementations are subclasses of the non-public
IntegerDtype. For example, we have Int8Dtype to represent signed int 8s.

The attributes name & type are set when these subclasses are created.

---
## IntegerArray
```python
from integer import IntegerArray
```

Array of integer (optional missing) values.

Uses :attr:`pandas.NA` as the missing value.

.. warning::

   IntegerArray is currently experimental, and its API or internal
   implementation may change without warning.

We represent an IntegerArray with 2 numpy arrays:

- data: contains a numpy integer array of the appropriate dtype
- mask: a boolean array holding a mask on the data, True is missing

To construct an IntegerArray from generic array-like input, use
:func:`pandas.array` with one of the integer dtypes (see examples).

See :ref:`integer_na` for more.

Parameters
----------
values : numpy.ndarray
    A 1-d integer-dtype array.
mask : numpy.ndarray
    A 1-d boolean-dtype array indicating missing values.
copy : bool, default False
    Whether to copy the `values` and `mask`.

Attributes
----------
None

Methods
-------
None

Returns
-------
IntegerArray

Examples
--------
Create an IntegerArray with :func:`pandas.array`.

>>> int_array = pd.array([1, None, 3], dtype=pd.Int32Dtype())
>>> int_array
<IntegerArray>
[1, <NA>, 3]
Length: 3, dtype: Int32

String aliases for the dtypes are also available. They are capitalized.

>>> pd.array([1, None, 3], dtype='Int32')
<IntegerArray>
[1, <NA>, 3]
Length: 3, dtype: Int32

>>> pd.array([1, None, 3], dtype='UInt16')
<IntegerArray>
[1, <NA>, 3]
Length: 3, dtype: UInt16

---
## Int8Dtype
```python
from integer import Int8Dtype
```



---
## Int16Dtype
```python
from integer import Int16Dtype
```



---
## Int32Dtype
```python
from integer import Int32Dtype
```



---
## Int64Dtype
```python
from integer import Int64Dtype
```



---
## UInt8Dtype
```python
from integer import UInt8Dtype
```



---
## UInt16Dtype
```python
from integer import UInt16Dtype
```



---
## UInt32Dtype
```python
from integer import UInt32Dtype
```



---
## UInt64Dtype
```python
from integer import UInt64Dtype
```



---
## construct_array_type
```python
from integer import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## _get_dtype_mapping
```python
from integer import _get_dtype_mapping
```



---
## _safe_cast
```python
from integer import _safe_cast
```

Safely cast the values to the given dtype.

"safe" in this context means the casting is lossless. e.g. if 'values'
has a floating dtype, each value must be an integer.

---
## __name__
```python
from masked import __name__
```



---
## BaseMaskedArray
```python
from masked import BaseMaskedArray
```

Base class for masked arrays (which use _data and _mask to store the data).

numpy based

---
## transpose_homogeneous_masked_arrays
```python
from masked import transpose_homogeneous_masked_arrays
```

Transpose masked arrays in a list, but faster.

Input should be a list of 1-dim masked arrays of equal length and all have the
same dtype. The caller is responsible for ensuring validity of input data.

---
## _simple_new
```python
from masked import _simple_new
```



---
## __init__
```python
from masked import __init__
```



---
## _from_sequence
```python
from masked import _from_sequence
```



---
## _empty
```python
from masked import _empty
```



---
## _formatter
```python
from masked import _formatter
```



---
## dtype
```python
from masked import dtype
```



---
## __getitem__
```python
from masked import __getitem__
```



---
## _pad_or_backfill
```python
from masked import _pad_or_backfill
```



---
## fillna
```python
from masked import fillna
```



---
## _coerce_to_array
```python
from masked import _coerce_to_array
```



---
## _validate_setitem_value
```python
from masked import _validate_setitem_value
```

Check if we have a scalar that we can cast losslessly.

Raises
------
TypeError

---
## __setitem__
```python
from masked import __setitem__
```



---
## __contains__
```python
from masked import __contains__
```



---
## __iter__
```python
from masked import __iter__
```



---
## __len__
```python
from masked import __len__
```



---
## shape
```python
from masked import shape
```



---
## ndim
```python
from masked import ndim
```



---
## swapaxes
```python
from masked import swapaxes
```



---
## delete
```python
from masked import delete
```



---
## reshape
```python
from masked import reshape
```



---
## ravel
```python
from masked import ravel
```



---
## T
```python
from masked import T
```



---
## round
```python
from masked import round
```

Round each value in the array a to the given number of decimals.

Parameters
----------
decimals : int, default 0
    Number of decimal places to round to. If decimals is negative,
    it specifies the number of positions to the left of the decimal point.
*args, **kwargs
    Additional arguments and keywords have no effect but might be
    accepted for compatibility with NumPy.

Returns
-------
NumericArray
    Rounded values of the NumericArray.

See Also
--------
numpy.around : Round values of an np.array.
DataFrame.round : Round values of a DataFrame.
Series.round : Round values of a Series.

---
## __invert__
```python
from masked import __invert__
```



---
## __neg__
```python
from masked import __neg__
```



---
## __pos__
```python
from masked import __pos__
```



---
## __abs__
```python
from masked import __abs__
```



---
## _values_for_json
```python
from masked import _values_for_json
```



---
## to_numpy
```python
from masked import to_numpy
```

Convert to a NumPy Array.

By default converts to an object-dtype NumPy array. Specify the `dtype` and
`na_value` keywords to customize the conversion.

Parameters
----------
dtype : dtype, default object
    The numpy dtype to convert to.
copy : bool, default False
    Whether to ensure that the returned value is a not a view on
    the array. Note that ``copy=False`` does not *ensure* that
    ``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that
    a copy is made, even if not strictly necessary. This is typically
    only possible when no missing values are present and `dtype`
    is the equivalent numpy dtype.
na_value : scalar, optional
     Scalar missing value indicator to use in numpy array. Defaults
     to the native missing value indicator of this array (pd.NA).

Returns
-------
numpy.ndarray

Examples
--------
An object-dtype is the default result

>>> a = pd.array([True, False, pd.NA], dtype="boolean")
>>> a.to_numpy()
array([True, False, <NA>], dtype=object)

When no missing values are present, an equivalent dtype can be used.

>>> pd.array([True, False], dtype="boolean").to_numpy(dtype="bool")
array([ True, False])
>>> pd.array([1, 2], dtype="Int64").to_numpy("int64")
array([1, 2])

However, requesting such dtype will raise a ValueError if
missing values are present and the default missing value :attr:`NA`
is used.

>>> a = pd.array([True, False, pd.NA], dtype="boolean")
>>> a
<BooleanArray>
[True, False, <NA>]
Length: 3, dtype: boolean

>>> a.to_numpy(dtype="bool")
Traceback (most recent call last):
...
ValueError: cannot convert to bool numpy array in presence of missing values

Specify a valid `na_value` instead

>>> a.to_numpy(dtype="bool", na_value=False)
array([ True, False, False])

---
## tolist
```python
from masked import tolist
```



---
## astype
```python
from masked import astype
```



---
## __array__
```python
from masked import __array__
```

the array interface, return my values
We return an object array here to preserve our scalar values

---
## __array_ufunc__
```python
from masked import __array_ufunc__
```



---
## __arrow_array__
```python
from masked import __arrow_array__
```

Convert myself into a pyarrow Array.

---
## _hasna
```python
from masked import _hasna
```



---
## _propagate_mask
```python
from masked import _propagate_mask
```



---
## _arith_method
```python
from masked import _arith_method
```



---
## _cmp_method
```python
from masked import _cmp_method
```



---
## _maybe_mask_result
```python
from masked import _maybe_mask_result
```

Parameters
----------
result : array-like or tuple[array-like]
mask : array-like bool

---
## isna
```python
from masked import isna
```



---
## _na_value
```python
from masked import _na_value
```



---
## nbytes
```python
from masked import nbytes
```



---
## _concat_same_type
```python
from masked import _concat_same_type
```



---
## _hash_pandas_object
```python
from masked import _hash_pandas_object
```



---
## take
```python
from masked import take
```



---
## isin
```python
from masked import isin
```



---
## copy
```python
from masked import copy
```



---
## duplicated
```python
from masked import duplicated
```



---
## unique
```python
from masked import unique
```

Compute the BaseMaskedArray of unique values.

Returns
-------
uniques : BaseMaskedArray

---
## searchsorted
```python
from masked import searchsorted
```



---
## factorize
```python
from masked import factorize
```



---
## _values_for_argsort
```python
from masked import _values_for_argsort
```



---
## value_counts
```python
from masked import value_counts
```

Returns a Series containing counts of each unique value.

Parameters
----------
dropna : bool, default True
    Don't include counts of missing values.

Returns
-------
counts : Series

See Also
--------
Series.value_counts

---
## _mode
```python
from masked import _mode
```



---
## equals
```python
from masked import equals
```



---
## _quantile
```python
from masked import _quantile
```

Dispatch to quantile_with_mask, needed because we do not have
_from_factorized.

Notes
-----
We assume that all impacted cases are 1D-only.

---
## _reduce
```python
from masked import _reduce
```



---
## _wrap_reduction_result
```python
from masked import _wrap_reduction_result
```



---
## _wrap_na_result
```python
from masked import _wrap_na_result
```



---
## _wrap_min_count_reduction_result
```python
from masked import _wrap_min_count_reduction_result
```



---
## sum
```python
from masked import sum
```



---
## prod
```python
from masked import prod
```



---
## mean
```python
from masked import mean
```



---
## var
```python
from masked import var
```



---
## std
```python
from masked import std
```



---
## min
```python
from masked import min
```



---
## max
```python
from masked import max
```



---
## map
```python
from masked import map
```



---
## any
```python
from masked import any
```

Return whether any element is truthy.

Returns False unless there is at least one element that is truthy.
By default, NAs are skipped. If ``skipna=False`` is specified and
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
is used as for logical operations.

.. versionchanged:: 1.4.0

Parameters
----------
skipna : bool, default True
    Exclude NA values. If the entire array is NA and `skipna` is
    True, then the result will be False, as for an empty array.
    If `skipna` is False, the result will still be True if there is
    at least one element that is truthy, otherwise NA will be returned
    if there are NA's present.
axis : int, optional, default 0
**kwargs : any, default None
    Additional keywords have no effect but might be accepted for
    compatibility with NumPy.

Returns
-------
bool or :attr:`pandas.NA`

See Also
--------
numpy.any : Numpy version of this method.
BaseMaskedArray.all : Return whether all elements are truthy.

Examples
--------
The result indicates whether any element is truthy (and by default
skips NAs):

>>> pd.array([True, False, True]).any()
True
>>> pd.array([True, False, pd.NA]).any()
True
>>> pd.array([False, False, pd.NA]).any()
False
>>> pd.array([], dtype="boolean").any()
False
>>> pd.array([pd.NA], dtype="boolean").any()
False
>>> pd.array([pd.NA], dtype="Float64").any()
False

With ``skipna=False``, the result can be NA if this is logically
required (whether ``pd.NA`` is True or False influences the result):

>>> pd.array([True, False, pd.NA]).any(skipna=False)
True
>>> pd.array([1, 0, pd.NA]).any(skipna=False)
True
>>> pd.array([False, False, pd.NA]).any(skipna=False)
<NA>
>>> pd.array([0, 0, pd.NA]).any(skipna=False)
<NA>

---
## all
```python
from masked import all
```

Return whether all elements are truthy.

Returns True unless there is at least one element that is falsey.
By default, NAs are skipped. If ``skipna=False`` is specified and
missing values are present, similar :ref:`Kleene logic <boolean.kleene>`
is used as for logical operations.

.. versionchanged:: 1.4.0

Parameters
----------
skipna : bool, default True
    Exclude NA values. If the entire array is NA and `skipna` is
    True, then the result will be True, as for an empty array.
    If `skipna` is False, the result will still be False if there is
    at least one element that is falsey, otherwise NA will be returned
    if there are NA's present.
axis : int, optional, default 0
**kwargs : any, default None
    Additional keywords have no effect but might be accepted for
    compatibility with NumPy.

Returns
-------
bool or :attr:`pandas.NA`

See Also
--------
numpy.all : Numpy version of this method.
BooleanArray.any : Return whether any element is truthy.

Examples
--------
The result indicates whether all elements are truthy (and by default
skips NAs):

>>> pd.array([True, True, pd.NA]).all()
True
>>> pd.array([1, 1, pd.NA]).all()
True
>>> pd.array([True, False, pd.NA]).all()
False
>>> pd.array([], dtype="boolean").all()
True
>>> pd.array([pd.NA], dtype="boolean").all()
True
>>> pd.array([pd.NA], dtype="Float64").all()
True

With ``skipna=False``, the result can be NA if this is logically
required (whether ``pd.NA`` is True or False influences the result):

>>> pd.array([True, True, pd.NA]).all(skipna=False)
<NA>
>>> pd.array([1, 1, pd.NA]).all(skipna=False)
<NA>
>>> pd.array([True, False, pd.NA]).all(skipna=False)
False
>>> pd.array([1, 0, pd.NA]).all(skipna=False)
False

---
## interpolate
```python
from masked import interpolate
```

See NDFrame.interpolate.__doc__.

---
## _accumulate
```python
from masked import _accumulate
```



---
## _groupby_op
```python
from masked import _groupby_op
```



---
## reconstruct
```python
from masked import reconstruct
```



---
## __name__
```python
from period import __name__
```



---
## _field_accessor
```python
from period import _field_accessor
```



---
## PeriodArray
```python
from period import PeriodArray
```

Pandas ExtensionArray for storing Period data.

Users should use :func:`~pandas.array` to create new instances.

Parameters
----------
values : Union[PeriodArray, Series[period], ndarray[int], PeriodIndex]
    The data to store. These should be arrays that can be directly
    converted to ordinals without inference or copy (PeriodArray,
    ndarray[int64]), or a box around such an array (Series[period],
    PeriodIndex).
dtype : PeriodDtype, optional
    A PeriodDtype instance from which to extract a `freq`. If both
    `freq` and `dtype` are specified, then the frequencies must match.
freq : str or DateOffset
    The `freq` to use for the array. Mostly applicable when `values`
    is an ndarray of integers, when `freq` is required. When `values`
    is a PeriodArray (or box around), it's checked that ``values.freq``
    matches `freq`.
copy : bool, default False
    Whether to copy the ordinals before storing.

Attributes
----------
None

Methods
-------
None

See Also
--------
Period: Represents a period of time.
PeriodIndex : Immutable Index for period data.
period_range: Create a fixed-frequency PeriodArray.
array: Construct a pandas array.

Notes
-----
There are two components to a PeriodArray

- ordinals : integer ndarray
- freq : pd.tseries.offsets.Offset

The values are physically stored as a 1-D ndarray of integers. These are
called "ordinals" and represent some kind of offset from a base.

The `freq` indicates the span covered by each element of the array.
All elements in the PeriodArray have the same `freq`.

Examples
--------
>>> pd.arrays.PeriodArray(pd.PeriodIndex(['2023-01-01',
...                                       '2023-01-02'], freq='D'))
<PeriodArray>
['2023-01-01', '2023-01-02']
Length: 2, dtype: period[D]

---
## raise_on_incompatible
```python
from period import raise_on_incompatible
```

Helper function to render a consistent error message when raising
IncompatibleFrequency.

Parameters
----------
left : PeriodArray
right : None, DateOffset, Period, ndarray, or timedelta-like

Returns
-------
IncompatibleFrequency
    Exception to be raised by the caller.

---
## period_array
```python
from period import period_array
```

Construct a new PeriodArray from a sequence of Period scalars.

Parameters
----------
data : Sequence of Period objects
    A sequence of Period objects. These are required to all have
    the same ``freq.`` Missing values can be indicated by ``None``
    or ``pandas.NaT``.
freq : str, Tick, or Offset
    The frequency of every element of the array. This can be specified
    to avoid inferring the `freq` from `data`.
copy : bool, default False
    Whether to ensure a copy of the data is made.

Returns
-------
PeriodArray

See Also
--------
PeriodArray
pandas.PeriodIndex

Examples
--------
>>> period_array([pd.Period('2017', freq='Y'),
...               pd.Period('2018', freq='Y')])
<PeriodArray>
['2017', '2018']
Length: 2, dtype: period[Y-DEC]

>>> period_array([pd.Period('2017', freq='Y'),
...               pd.Period('2018', freq='Y'),
...               pd.NaT])
<PeriodArray>
['2017', '2018', 'NaT']
Length: 3, dtype: period[Y-DEC]

Integers that look like years are handled

>>> period_array([2000, 2001, 2002], freq='D')
<PeriodArray>
['2000-01-01', '2001-01-01', '2002-01-01']
Length: 3, dtype: period[D]

Datetime-like strings may also be passed

>>> period_array(['2000-Q1', '2000-Q2', '2000-Q3', '2000-Q4'], freq='Q')
<PeriodArray>
['2000Q1', '2000Q2', '2000Q3', '2000Q4']
Length: 4, dtype: period[Q-DEC]

---
## validate_dtype_freq
```python
from period import validate_dtype_freq
```

If both a dtype and a freq are available, ensure they match.  If only
dtype is available, extract the implied freq.

Parameters
----------
dtype : dtype
freq : DateOffset or None

Returns
-------
freq : DateOffset

Raises
------
ValueError : non-period dtype
IncompatibleFrequency : mismatch between dtype and freq

---
## dt64arr_to_periodarr
```python
from period import dt64arr_to_periodarr
```

Convert an datetime-like array to values Period ordinals.

Parameters
----------
data : Union[Series[datetime64[ns]], DatetimeIndex, ndarray[datetime64ns]]
freq : Optional[Union[str, Tick]]
    Must match the `freq` on the `data` if `data` is a DatetimeIndex
    or Series.
tz : Optional[tzinfo]

Returns
-------
ordinals : ndarray[int64]
freq : Tick
    The frequency extracted from the Series or DatetimeIndex if that's
    used.

---
## _get_ordinal_range
```python
from period import _get_ordinal_range
```



---
## _range_from_fields
```python
from period import _range_from_fields
```



---
## _make_field_arrays
```python
from period import _make_field_arrays
```



---
## f
```python
from period import f
```



---
## _scalar_type
```python
from period import _scalar_type
```



---
## __init__
```python
from period import __init__
```



---
## _simple_new
```python
from period import _simple_new
```



---
## _from_sequence
```python
from period import _from_sequence
```



---
## _from_sequence_of_strings
```python
from period import _from_sequence_of_strings
```



---
## _from_datetime64
```python
from period import _from_datetime64
```

Construct a PeriodArray from a datetime64 array

Parameters
----------
data : ndarray[datetime64[ns], datetime64[ns, tz]]
freq : str or Tick
tz : tzinfo, optional

Returns
-------
PeriodArray[freq]

---
## _generate_range
```python
from period import _generate_range
```



---
## _from_fields
```python
from period import _from_fields
```



---
## _unbox_scalar
```python
from period import _unbox_scalar
```



---
## _scalar_from_string
```python
from period import _scalar_from_string
```



---
## _check_compatible_with
```python
from period import _check_compatible_with
```



---
## dtype
```python
from period import dtype
```



---
## freq
```python
from period import freq
```

Return the frequency object for this PeriodArray.

---
## freqstr
```python
from period import freqstr
```



---
## __array__
```python
from period import __array__
```



---
## __arrow_array__
```python
from period import __arrow_array__
```

Convert myself into a pyarrow Array.

---
## is_leap_year
```python
from period import is_leap_year
```

Logical indicating if the date belongs to a leap year.

Examples
--------
>>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
>>> idx.is_leap_year
array([False,  True, False])

---
## to_timestamp
```python
from period import to_timestamp
```



---
## _box_func
```python
from period import _box_func
```



---
## asfreq
```python
from period import asfreq
```



---
## _formatter
```python
from period import _formatter
```



---
## _format_native_types
```python
from period import _format_native_types
```

actually format my specific types

---
## astype
```python
from period import astype
```



---
## searchsorted
```python
from period import searchsorted
```



---
## _pad_or_backfill
```python
from period import _pad_or_backfill
```



---
## fillna
```python
from period import fillna
```



---
## _addsub_int_array_or_scalar
```python
from period import _addsub_int_array_or_scalar
```

Add or subtract array of integers.

Parameters
----------
other : np.ndarray[int64] or int
op : {operator.add, operator.sub}

Returns
-------
result : PeriodArray

---
## _add_offset
```python
from period import _add_offset
```



---
## _add_timedeltalike_scalar
```python
from period import _add_timedeltalike_scalar
```

Parameters
----------
other : timedelta, Tick, np.timedelta64

Returns
-------
PeriodArray

---
## _add_timedelta_arraylike
```python
from period import _add_timedelta_arraylike
```

Parameters
----------
other : TimedeltaArray or ndarray[timedelta64]

Returns
-------
PeriodArray

---
## _check_timedeltalike_freq_compat
```python
from period import _check_timedeltalike_freq_compat
```

Arithmetic operations with timedelta-like scalars or array `other`
are only valid if `other` is an integer multiple of `self.freq`.
If the operation is valid, find that integer multiple.  Otherwise,
raise because the operation is invalid.

Parameters
----------
other : timedelta, np.timedelta64, Tick,
        ndarray[timedelta64], TimedeltaArray, TimedeltaIndex

Returns
-------
multiple : int or ndarray[int64]

Raises
------
IncompatibleFrequency

---
## NumericDtype
```python
from numeric import NumericDtype
```



---
## _coerce_to_data_and_mask
```python
from numeric import _coerce_to_data_and_mask
```



---
## NumericArray
```python
from numeric import NumericArray
```

Base class for IntegerArray and FloatingArray.

---
## __repr__
```python
from numeric import __repr__
```



---
## is_signed_integer
```python
from numeric import is_signed_integer
```



---
## is_unsigned_integer
```python
from numeric import is_unsigned_integer
```



---
## _is_numeric
```python
from numeric import _is_numeric
```



---
## __from_arrow__
```python
from numeric import __from_arrow__
```

Construct IntegerArray/FloatingArray from pyarrow Array/ChunkedArray.

---
## _get_dtype_mapping
```python
from numeric import _get_dtype_mapping
```



---
## _standardize_dtype
```python
from numeric import _standardize_dtype
```

Convert a string representation or a numpy dtype to NumericDtype.

---
## _safe_cast
```python
from numeric import _safe_cast
```

Safely cast the values to the given dtype.

"safe" in this context means the casting is lossless.

---
## __init__
```python
from numeric import __init__
```



---
## dtype
```python
from numeric import dtype
```



---
## _coerce_to_array
```python
from numeric import _coerce_to_array
```



---
## _from_sequence_of_strings
```python
from numeric import _from_sequence_of_strings
```



---
## __name__
```python
from datetimelike import __name__
```

Base and utility classes for tseries type pandas objects.

---
## _make_unpacked_invalid_op
```python
from datetimelike import _make_unpacked_invalid_op
```



---
## _period_dispatch
```python
from datetimelike import _period_dispatch
```

For PeriodArray methods, dispatch to DatetimeArray and re-wrap the results
in PeriodArray.  We cannot use ._ndarray directly for the affected
methods because the i8 data has different semantics on NaT values.

---
## DatetimeLikeArrayMixin
```python
from datetimelike import DatetimeLikeArrayMixin
```

Shared Base/Mixin class for DatetimeArray, TimedeltaArray, PeriodArray

Assumes that __new__/__init__ defines:
    _ndarray

and that inheriting subclass implements:
    freq

---
## DatelikeOps
```python
from datetimelike import DatelikeOps
```

Common ops for DatetimeIndex/PeriodIndex, but not TimedeltaIndex.

---
## TimelikeOps
```python
from datetimelike import TimelikeOps
```

Common ops for TimedeltaIndex/DatetimeIndex, but not PeriodIndex.

---
## ensure_arraylike_for_datetimelike
```python
from datetimelike import ensure_arraylike_for_datetimelike
```



---
## validate_periods
```python
from datetimelike import validate_periods
```

If a `periods` argument is passed to the Datetime/Timedelta Array/Index
constructor, cast it to an integer.

Parameters
----------
periods : None, float, int

Returns
-------
periods : None or int

Raises
------
TypeError
    if periods is None, float, or int

---
## _validate_inferred_freq
```python
from datetimelike import _validate_inferred_freq
```

If the user passes a freq and another freq is inferred from passed data,
require that they match.

Parameters
----------
freq : DateOffset or None
inferred_freq : DateOffset or None

Returns
-------
freq : DateOffset or None

---
## dtype_to_unit
```python
from datetimelike import dtype_to_unit
```

Return the unit str corresponding to the dtype's resolution.

Parameters
----------
dtype : DatetimeTZDtype or np.dtype
    If np.dtype, we assume it is a datetime64 dtype.

Returns
-------
str

---
## new_meth
```python
from datetimelike import new_meth
```



---
## _can_hold_na
```python
from datetimelike import _can_hold_na
```



---
## __init__
```python
from datetimelike import __init__
```



---
## _scalar_type
```python
from datetimelike import _scalar_type
```

The scalar associated with this datelike

* PeriodArray : Period
* DatetimeArray : Timestamp
* TimedeltaArray : Timedelta

---
## _scalar_from_string
```python
from datetimelike import _scalar_from_string
```

Construct a scalar type from a string.

Parameters
----------
value : str

Returns
-------
Period, Timestamp, or Timedelta, or NaT
    Whatever the type of ``self._scalar_type`` is.

Notes
-----
This should call ``self._check_compatible_with`` before
unboxing the result.

---
## _unbox_scalar
```python
from datetimelike import _unbox_scalar
```

Unbox the integer value of a scalar `value`.

Parameters
----------
value : Period, Timestamp, Timedelta, or NaT
    Depending on subclass.

Returns
-------
int

Examples
--------
>>> arr = pd.array(np.array(['1970-01-01'], 'datetime64[ns]'))
>>> arr._unbox_scalar(arr[0])
numpy.datetime64('1970-01-01T00:00:00.000000000')

---
## _check_compatible_with
```python
from datetimelike import _check_compatible_with
```

Verify that `self` and `other` are compatible.

* DatetimeArray verifies that the timezones (if any) match
* PeriodArray verifies that the freq matches
* Timedelta has no verification

In each case, NaT is considered compatible.

Parameters
----------
other

Raises
------
Exception

---
## _box_func
```python
from datetimelike import _box_func
```

box function to get object from internal representation

---
## _box_values
```python
from datetimelike import _box_values
```

apply box func to passed values

---
## __iter__
```python
from datetimelike import __iter__
```



---
## asi8
```python
from datetimelike import asi8
```



---
## _format_native_types
```python
from datetimelike import _format_native_types
```

Helper method for astype when converting to strings.

Returns
-------
ndarray[str]

---
## _formatter
```python
from datetimelike import _formatter
```



---
## __array__
```python
from datetimelike import __array__
```



---
## __getitem__
```python
from datetimelike import __getitem__
```

This getitem defers to the underlying array, which by-definition can
only handle list-likes, slices, and integer scalars

---
## _get_getitem_freq
```python
from datetimelike import _get_getitem_freq
```

Find the `freq` attribute to assign to the result of a __getitem__ lookup.

---
## __setitem__
```python
from datetimelike import __setitem__
```



---
## _maybe_clear_freq
```python
from datetimelike import _maybe_clear_freq
```



---
## astype
```python
from datetimelike import astype
```



---
## view
```python
from datetimelike import view
```



---
## _validate_comparison_value
```python
from datetimelike import _validate_comparison_value
```



---
## _validate_scalar
```python
from datetimelike import _validate_scalar
```

Validate that the input value can be cast to our scalar_type.

Parameters
----------
value : object
allow_listlike: bool, default False
    When raising an exception, whether the message should say
    listlike inputs are allowed.
unbox : bool, default True
    Whether to unbox the result before returning.  Note: unbox=False
    skips the setitem compatibility check.

Returns
-------
self._scalar_type or NaT

---
## _validation_error_message
```python
from datetimelike import _validation_error_message
```

Construct an exception message on validation error.

Some methods allow only scalar inputs, while others allow either scalar
or listlike.

Parameters
----------
allow_listlike: bool, default False

Returns
-------
str

---
## _validate_listlike
```python
from datetimelike import _validate_listlike
```



---
## _validate_setitem_value
```python
from datetimelike import _validate_setitem_value
```



---
## _unbox
```python
from datetimelike import _unbox
```

Unbox either a scalar with _unbox_scalar or an instance of our own type.

---
## map
```python
from datetimelike import map
```



---
## isin
```python
from datetimelike import isin
```

Compute boolean array of whether each value is found in the
passed set of values.

Parameters
----------
values : np.ndarray or ExtensionArray

Returns
-------
ndarray[bool]

---
## isna
```python
from datetimelike import isna
```



---
## _isnan
```python
from datetimelike import _isnan
```

return if each value is nan

---
## _hasna
```python
from datetimelike import _hasna
```

return if I have any nans; enables various perf speedups

---
## _maybe_mask_results
```python
from datetimelike import _maybe_mask_results
```

Parameters
----------
result : np.ndarray
fill_value : object, default iNaT
convert : str, dtype or None

Returns
-------
result : ndarray with values replace by the fill_value

mask the result if needed, convert to the provided dtype if its not
None

This is an internal routine.

---
## freqstr
```python
from datetimelike import freqstr
```



---
## inferred_freq
```python
from datetimelike import inferred_freq
```



---
## _resolution_obj
```python
from datetimelike import _resolution_obj
```



---
## resolution
```python
from datetimelike import resolution
```



---
## _is_monotonic_increasing
```python
from datetimelike import _is_monotonic_increasing
```



---
## _is_monotonic_decreasing
```python
from datetimelike import _is_monotonic_decreasing
```



---
## _is_unique
```python
from datetimelike import _is_unique
```



---
## _cmp_method
```python
from datetimelike import _cmp_method
```



---
## _get_i8_values_and_mask
```python
from datetimelike import _get_i8_values_and_mask
```

Get the int64 values and b_mask to pass to add_overflowsafe.

---
## _get_arithmetic_result_freq
```python
from datetimelike import _get_arithmetic_result_freq
```

Check if we can preserve self.freq in addition or subtraction.

---
## _add_datetimelike_scalar
```python
from datetimelike import _add_datetimelike_scalar
```



---
## _add_datetime_arraylike
```python
from datetimelike import _add_datetime_arraylike
```



---
## _sub_datetimelike_scalar
```python
from datetimelike import _sub_datetimelike_scalar
```



---
## _sub_datetime_arraylike
```python
from datetimelike import _sub_datetime_arraylike
```



---
## _sub_datetimelike
```python
from datetimelike import _sub_datetimelike
```



---
## _add_period
```python
from datetimelike import _add_period
```



---
## _add_offset
```python
from datetimelike import _add_offset
```



---
## _add_timedeltalike_scalar
```python
from datetimelike import _add_timedeltalike_scalar
```

Add a delta of a timedeltalike

Returns
-------
Same type as self

---
## _add_timedelta_arraylike
```python
from datetimelike import _add_timedelta_arraylike
```

Add a delta of a TimedeltaIndex

Returns
-------
Same type as self

---
## _add_timedeltalike
```python
from datetimelike import _add_timedeltalike
```



---
## _add_nat
```python
from datetimelike import _add_nat
```

Add pd.NaT to self

---
## _sub_nat
```python
from datetimelike import _sub_nat
```

Subtract pd.NaT from self

---
## _sub_periodlike
```python
from datetimelike import _sub_periodlike
```



---
## _addsub_object_array
```python
from datetimelike import _addsub_object_array
```

Add or subtract array-like of DateOffset objects

Parameters
----------
other : np.ndarray[object]
op : {operator.add, operator.sub}

Returns
-------
np.ndarray[object]
    Except in fastpath case with length 1 where we operate on the
    contained scalar.

---
## _accumulate
```python
from datetimelike import _accumulate
```



---
## __add__
```python
from datetimelike import __add__
```



---
## __radd__
```python
from datetimelike import __radd__
```



---
## __sub__
```python
from datetimelike import __sub__
```



---
## __rsub__
```python
from datetimelike import __rsub__
```



---
## __iadd__
```python
from datetimelike import __iadd__
```



---
## __isub__
```python
from datetimelike import __isub__
```



---
## _quantile
```python
from datetimelike import _quantile
```



---
## min
```python
from datetimelike import min
```

Return the minimum value of the Array or minimum along
an axis.

See Also
--------
numpy.ndarray.min
Index.min : Return the minimum value in an Index.
Series.min : Return the minimum value in a Series.

---
## max
```python
from datetimelike import max
```

Return the maximum value of the Array or maximum along
an axis.

See Also
--------
numpy.ndarray.max
Index.max : Return the maximum value in an Index.
Series.max : Return the maximum value in a Series.

---
## mean
```python
from datetimelike import mean
```



---
## median
```python
from datetimelike import median
```



---
## _mode
```python
from datetimelike import _mode
```



---
## _groupby_op
```python
from datetimelike import _groupby_op
```



---
## strftime
```python
from datetimelike import strftime
```

Convert to Index using specified date_format.

Return an Index of formatted strings specified by date_format, which
supports the same string format as the python standard library. Details
of the string format can be found in `python string format
doc <%(URL)s>`__.

Formats supported by the C `strftime` API but not by the python string format
doc (such as `"%%R"`, `"%%r"`) are not officially supported and should be
preferably replaced with their supported equivalents (such as `"%%H:%%M"`,
`"%%I:%%M:%%S %%p"`).

Note that `PeriodIndex` support additional directives, detailed in
`Period.strftime`.

Parameters
----------
date_format : str
    Date format string (e.g. "%%Y-%%m-%%d").

Returns
-------
ndarray[object]
    NumPy ndarray of formatted strings.

See Also
--------
to_datetime : Convert the given argument to datetime.
DatetimeIndex.normalize : Return DatetimeIndex with times to midnight.
DatetimeIndex.round : Round the DatetimeIndex to the specified freq.
DatetimeIndex.floor : Floor the DatetimeIndex to the specified freq.
Timestamp.strftime : Format a single Timestamp.
Period.strftime : Format a single Period.

Examples
--------
>>> rng = pd.date_range(pd.Timestamp("2018-03-10 09:00"),
...                     periods=3, freq='s')
>>> rng.strftime('%%B %%d, %%Y, %%r')
Index(['March 10, 2018, 09:00:00 AM', 'March 10, 2018, 09:00:01 AM',
       'March 10, 2018, 09:00:02 AM'],
      dtype='object')

---
## _validate_dtype
```python
from datetimelike import _validate_dtype
```



---
## freq
```python
from datetimelike import freq
```



---
## _maybe_pin_freq
```python
from datetimelike import _maybe_pin_freq
```

Constructor helper to pin the appropriate `freq` attribute.  Assumes
that self._freq is currently set to any freq inferred in
_from_sequence_not_strict.

---
## _validate_frequency
```python
from datetimelike import _validate_frequency
```

Validate that a frequency is compatible with the values of a given
Datetime Array/Index or Timedelta Array/Index

Parameters
----------
index : DatetimeIndex or TimedeltaIndex
    The index on which to determine if the given frequency is valid
freq : DateOffset
    The frequency to validate

---
## _generate_range
```python
from datetimelike import _generate_range
```



---
## _creso
```python
from datetimelike import _creso
```



---
## unit
```python
from datetimelike import unit
```



---
## as_unit
```python
from datetimelike import as_unit
```

Convert to a dtype with the given unit resolution.

Parameters
----------
unit : {'s', 'ms', 'us', 'ns'}

Returns
-------
same type as self

Examples
--------
For :class:`pandas.DatetimeIndex`:

>>> idx = pd.DatetimeIndex(['2020-01-02 01:02:03.004005006'])
>>> idx
DatetimeIndex(['2020-01-02 01:02:03.004005006'],
              dtype='datetime64[ns]', freq=None)
>>> idx.as_unit('s')
DatetimeIndex(['2020-01-02 01:02:03'], dtype='datetime64[s]', freq=None)

For :class:`pandas.TimedeltaIndex`:

>>> tdelta_idx = pd.to_timedelta(['1 day 3 min 2 us 42 ns'])
>>> tdelta_idx
TimedeltaIndex(['1 days 00:03:00.000002042'],
                dtype='timedelta64[ns]', freq=None)
>>> tdelta_idx.as_unit('s')
TimedeltaIndex(['1 days 00:03:00'], dtype='timedelta64[s]', freq=None)

---
## _ensure_matching_resos
```python
from datetimelike import _ensure_matching_resos
```



---
## __array_ufunc__
```python
from datetimelike import __array_ufunc__
```



---
## _round
```python
from datetimelike import _round
```



---
## round
```python
from datetimelike import round
```



---
## floor
```python
from datetimelike import floor
```



---
## ceil
```python
from datetimelike import ceil
```



---
## any
```python
from datetimelike import any
```



---
## all
```python
from datetimelike import all
```



---
## _with_freq
```python
from datetimelike import _with_freq
```



---
## _values_for_json
```python
from datetimelike import _values_for_json
```



---
## factorize
```python
from datetimelike import factorize
```



---
## _concat_same_type
```python
from datetimelike import _concat_same_type
```



---
## copy
```python
from datetimelike import copy
```



---
## interpolate
```python
from datetimelike import interpolate
```

See NDFrame.interpolate.__doc__.

---
## _is_dates_only
```python
from datetimelike import _is_dates_only
```

Check if we are round times at midnight (and no timezone), which will
be given a more compact __repr__ than other cases. For TimedeltaArray
we are checking for multiples of 24H.

---
## ExtensionArray
```python
from base import ExtensionArray
```

Abstract base class for custom 1-D array types.

pandas will recognize instances of this class as proper arrays
with a custom type and will not attempt to coerce them to objects. They
may be stored directly inside a :class:`DataFrame` or :class:`Series`.

Attributes
----------
dtype
nbytes
ndim
shape

Methods
-------
argsort
astype
copy
dropna
duplicated
factorize
fillna
equals
insert
interpolate
isin
isna
ravel
repeat
searchsorted
shift
take
tolist
unique
view
_accumulate
_concat_same_type
_explode
_formatter
_from_factorized
_from_sequence
_from_sequence_of_strings
_hash_pandas_object
_pad_or_backfill
_reduce
_values_for_argsort
_values_for_factorize

Notes
-----
The interface includes the following abstract methods that must be
implemented by subclasses:

* _from_sequence
* _from_factorized
* __getitem__
* __len__
* __eq__
* dtype
* nbytes
* isna
* take
* copy
* _concat_same_type
* interpolate

A default repr displaying the type, (truncated) data, length,
and dtype is provided. It can be customized or replaced by
by overriding:

* __repr__ : A default repr for the ExtensionArray.
* _formatter : Print scalars inside a Series or DataFrame.

Some methods require casting the ExtensionArray to an ndarray of Python
objects with ``self.astype(object)``, which may be expensive. When
performance is a concern, we highly recommend overriding the following
methods:

* fillna
* _pad_or_backfill
* dropna
* unique
* factorize / _values_for_factorize
* argsort, argmax, argmin / _values_for_argsort
* searchsorted
* map

The remaining methods implemented on this class should be performant,
as they only compose abstract methods. Still, a more efficient
implementation may be available, and these methods can be overridden.

One can implement methods to handle array accumulations or reductions.

* _accumulate
* _reduce

One can implement methods to handle parsing from strings that will be used
in methods such as ``pandas.io.parsers.read_csv``.

* _from_sequence_of_strings

This class does not inherit from 'abc.ABCMeta' for performance reasons.
Methods and properties required by the interface raise
``pandas.errors.AbstractMethodError`` and no ``register`` method is
provided for registering virtual subclasses.

ExtensionArrays are limited to 1 dimension.

They may be backed by none, one, or many NumPy arrays. For example,
``pandas.Categorical`` is an extension array backed by two arrays,
one for codes and one for categories. An array of IPv6 address may
be backed by a NumPy structured array with two fields, one for the
lower 64 bits and one for the upper 64 bits. Or they may be backed
by some other storage type, like Python lists. Pandas makes no
assumptions on how the data are stored, just that it can be converted
to a NumPy array.
The ExtensionArray interface does not impose any rules on how this data
is stored. However, currently, the backing data cannot be stored in
attributes called ``.values`` or ``._values`` to ensure full compatibility
with pandas internals. But other names as ``.data``, ``._data``,
``._items``, ... can be freely used.

If implementing NumPy's ``__array_ufunc__`` interface, pandas expects
that

1. You defer by returning ``NotImplemented`` when any Series are present
   in `inputs`. Pandas will extract the arrays and call the ufunc again.
2. You define a ``_HANDLED_TYPES`` tuple as an attribute on the class.
   Pandas inspect this to determine whether the ufunc is valid for the
   types present.

See :ref:`extending.extension.ufunc` for more.

By default, ExtensionArrays are not hashable.  Immutable subclasses may
override this behavior.

Examples
--------
Please see the following:

https://github.com/pandas-dev/pandas/blob/main/pandas/tests/extension/list/array.py

---
## ExtensionArraySupportsAnyAll
```python
from base import ExtensionArraySupportsAnyAll
```



---
## ExtensionOpsMixin
```python
from base import ExtensionOpsMixin
```

A base class for linking the operators to their dunder names.

.. note::

   You may want to set ``__array_priority__`` if you want your
   implementation to be called when involved in binary operations
   with NumPy arrays.

---
## ExtensionScalarOpsMixin
```python
from base import ExtensionScalarOpsMixin
```

A mixin for defining ops on an ExtensionArray.

It is assumed that the underlying scalar objects have the operators
already defined.

Notes
-----
If you have defined a subclass MyExtensionArray(ExtensionArray), then
use MyExtensionArray(ExtensionArray, ExtensionScalarOpsMixin) to
get the arithmetic operators.  After the definition of MyExtensionArray,
insert the lines

MyExtensionArray._add_arithmetic_ops()
MyExtensionArray._add_comparison_ops()

to link the operators to your class.

.. note::

   You may want to set ``__array_priority__`` if you want your
   implementation to be called when involved in binary operations
   with NumPy arrays.

---
## _from_sequence
```python
from base import _from_sequence
```

Construct a new ExtensionArray from a sequence of scalars.

Parameters
----------
scalars : Sequence
    Each element will be an instance of the scalar type for this
    array, ``cls.dtype.type`` or be converted into this type in this method.
dtype : dtype, optional
    Construct for this particular dtype. This should be a Dtype
    compatible with the ExtensionArray.
copy : bool, default False
    If True, copy the underlying data.

Returns
-------
ExtensionArray

Examples
--------
>>> pd.arrays.IntegerArray._from_sequence([4, 5])
<IntegerArray>
[4, 5]
Length: 2, dtype: Int64

---
## _from_scalars
```python
from base import _from_scalars
```

Strict analogue to _from_sequence, allowing only sequences of scalars
that should be specifically inferred to the given dtype.

Parameters
----------
scalars : sequence
dtype : ExtensionDtype

Raises
------
TypeError or ValueError

Notes
-----
This is called in a try/except block when casting the result of a
pointwise operation.

---
## _from_sequence_of_strings
```python
from base import _from_sequence_of_strings
```

Construct a new ExtensionArray from a sequence of strings.

Parameters
----------
strings : Sequence
    Each element will be an instance of the scalar type for this
    array, ``cls.dtype.type``.
dtype : dtype, optional
    Construct for this particular dtype. This should be a Dtype
    compatible with the ExtensionArray.
copy : bool, default False
    If True, copy the underlying data.

Returns
-------
ExtensionArray

Examples
--------
>>> pd.arrays.IntegerArray._from_sequence_of_strings(["1", "2", "3"])
<IntegerArray>
[1, 2, 3]
Length: 3, dtype: Int64

---
## _from_factorized
```python
from base import _from_factorized
```

Reconstruct an ExtensionArray after factorization.

Parameters
----------
values : ndarray
    An integer ndarray with the factorized values.
original : ExtensionArray
    The original ExtensionArray that factorize was called on.

See Also
--------
factorize : Top-level factorize method that dispatches here.
ExtensionArray.factorize : Encode the extension array as an enumerated type.

Examples
--------
>>> interv_arr = pd.arrays.IntervalArray([pd.Interval(0, 1),
...                                      pd.Interval(1, 5), pd.Interval(1, 5)])
>>> codes, uniques = pd.factorize(interv_arr)
>>> pd.arrays.IntervalArray._from_factorized(uniques, interv_arr)
<IntervalArray>
[(0, 1], (1, 5]]
Length: 2, dtype: interval[int64, right]

---
## astype
```python
from base import astype
```

Create an Index with values cast to dtypes.

The class of a new Index is determined by dtype. When conversion is
impossible, a TypeError exception is raised.

Parameters
----------
dtype : numpy dtype or pandas type
    Note that any signed integer `dtype` is treated as ``'int64'``,
    and any unsigned integer `dtype` is treated as ``'uint64'``,
    regardless of the size.
copy : bool, default True
    By default, astype always returns a newly allocated object.
    If copy is set to False and internal requirements on dtype are
    satisfied, the original data is used to create a new Index
    or the original Index is returned.

Returns
-------
Index
    Index with values cast to specified dtype.

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.astype('float')
Index([1.0, 2.0, 3.0], dtype='float64')

---
## _hasna
```python
from base import _hasna
```

Equivalent to `self.isna().any()`.

Some ExtensionArray subclasses may be able to optimize this check.

---
## _values_for_argsort
```python
from base import _values_for_argsort
```

Return values for sorting.

Returns
-------
ndarray
    The transformed values should maintain the ordering between values
    within the array.

See Also
--------
ExtensionArray.argsort : Return the indices that would sort this array.

Notes
-----
The caller is responsible for *not* modifying these values in-place, so
it is safe for implementers to give views on ``self``.

Functions that use this (e.g. ``ExtensionArray.argsort``) should ignore
entries with missing values in the original array (according to
``self.isna()``). This means that the corresponding entries in the returned
array don't need to be modified to sort correctly.

Examples
--------
In most cases, this is the underlying Numpy array of the ``ExtensionArray``:

>>> arr = pd.array([1, 2, 3])
>>> arr._values_for_argsort()
array([1, 2, 3])

---
## argsort
```python
from base import argsort
```

Return the integer indices that would sort the index.

Parameters
----------
*args
    Passed to `numpy.ndarray.argsort`.
**kwargs
    Passed to `numpy.ndarray.argsort`.

Returns
-------
np.ndarray[np.intp]
    Integer indices that would sort the index if used as
    an indexer.

See Also
--------
numpy.argsort : Similar method for NumPy arrays.
Index.sort_values : Return sorted copy of Index.

Examples
--------
>>> idx = pd.Index(['b', 'a', 'd', 'c'])
>>> idx
Index(['b', 'a', 'd', 'c'], dtype='object')

>>> order = idx.argsort()
>>> order
array([1, 0, 3, 2])

>>> idx[order]
Index(['a', 'b', 'c', 'd'], dtype='object')

---
## _pad_or_backfill
```python
from base import _pad_or_backfill
```

Pad or backfill values, used by Series/DataFrame ffill and bfill.

Parameters
----------
method : {'backfill', 'bfill', 'pad', 'ffill'}
    Method to use for filling holes in reindexed Series:

    * pad / ffill: propagate last valid observation forward to next valid.
    * backfill / bfill: use NEXT valid observation to fill gap.

limit : int, default None
    This is the maximum number of consecutive
    NaN values to forward/backward fill. In other words, if there is
    a gap with more than this number of consecutive NaNs, it will only
    be partially filled. If method is not specified, this is the
    maximum number of entries along the entire axis where NaNs will be
    filled.

copy : bool, default True
    Whether to make a copy of the data before filling. If False, then
    the original should be modified and no new memory should be allocated.
    For ExtensionArray subclasses that cannot do this, it is at the
    author's discretion whether to ignore "copy=False" or to raise.
    The base class implementation ignores the keyword if any NAs are
    present.

Returns
-------
Same type as self

Examples
--------
>>> arr = pd.array([np.nan, np.nan, 2, 3, np.nan, np.nan])
>>> arr._pad_or_backfill(method="backfill", limit=1)
<IntegerArray>
[<NA>, 2, 2, 3, <NA>, <NA>]
Length: 6, dtype: Int64

---
## dropna
```python
from base import dropna
```

Return Index without NA/NaN values.

Parameters
----------
how : {'any', 'all'}, default 'any'
    If the Index is a MultiIndex, drop the value when any or all levels
    are NaN.

Returns
-------
Index

Examples
--------
>>> idx = pd.Index([1, np.nan, 3])
>>> idx.dropna()
Index([1.0, 3.0], dtype='float64')

---
## duplicated
```python
from base import duplicated
```

Indicate duplicate index values.

Duplicated values are indicated as ``True`` values in the resulting
array. Either all duplicates, all except the first, or all except the
last occurrence of duplicates can be indicated.

Parameters
----------
keep : {'first', 'last', False}, default 'first'
    The value or values in a set of duplicates to mark as missing.

    - 'first' : Mark duplicates as ``True`` except for the first
      occurrence.
    - 'last' : Mark duplicates as ``True`` except for the last
      occurrence.
    - ``False`` : Mark all duplicates as ``True``.

Returns
-------
np.ndarray[bool]

See Also
--------
Series.duplicated : Equivalent method on pandas.Series.
DataFrame.duplicated : Equivalent method on pandas.DataFrame.
Index.drop_duplicates : Remove duplicate values from Index.

Examples
--------
By default, for each set of duplicated values, the first occurrence is
set to False and all others to True:

>>> idx = pd.Index(['lama', 'cow', 'lama', 'beetle', 'lama'])
>>> idx.duplicated()
array([False, False,  True, False,  True])

which is equivalent to

>>> idx.duplicated(keep='first')
array([False, False,  True, False,  True])

By using 'last', the last occurrence of each set of duplicated values
is set on False and all others on True:

>>> idx.duplicated(keep='last')
array([ True, False,  True, False, False])

By setting keep on ``False``, all duplicates are True:

>>> idx.duplicated(keep=False)
array([ True, False,  True, False,  True])

---
## isin
```python
from base import isin
```

Return a boolean array where the index values are in `values`.

Compute boolean array of whether each index value is found in the
passed set of values. The length of the returned boolean array matches
the length of the index.

Parameters
----------
values : set or list-like
    Sought values.
level : str or int, optional
    Name or position of the index level to use (if the index is a
    `MultiIndex`).

Returns
-------
np.ndarray[bool]
    NumPy array of boolean values.

See Also
--------
Series.isin : Same for Series.
DataFrame.isin : Same method for DataFrames.

Notes
-----
In the case of `MultiIndex` you must either specify `values` as a
list-like object containing tuples that are the same length as the
number of levels, or specify `level`. Otherwise it will raise a
``ValueError``.

If `level` is specified:

- if it is the name of one *and only one* index level, use that level;
- otherwise it should be a number indicating level position.

Examples
--------
>>> idx = pd.Index([1,2,3])
>>> idx
Index([1, 2, 3], dtype='int64')

Check whether each index value in a list of values.

>>> idx.isin([1, 4])
array([ True, False, False])

>>> midx = pd.MultiIndex.from_arrays([[1,2,3],
...                                  ['red', 'blue', 'green']],
...                                  names=('number', 'color'))
>>> midx
MultiIndex([(1,   'red'),
            (2,  'blue'),
            (3, 'green')],
           names=['number', 'color'])

Check whether the strings in the 'color' level of the MultiIndex
are in a list of colors.

>>> midx.isin(['red', 'orange', 'yellow'], level='color')
array([ True, False, False])

To check across the levels of a MultiIndex, pass a list of tuples:

>>> midx.isin([(1, 'red'), (3, 'red')])
array([ True, False, False])

---
## _values_for_factorize
```python
from base import _values_for_factorize
```

Return an array and missing value suitable for factorization.

Returns
-------
values : ndarray
    An array suitable for factorization. This should maintain order
    and be a supported dtype (Float64, Int64, UInt64, String, Object).
    By default, the extension array is cast to object dtype.
na_value : object
    The value in `values` to consider missing. This will be treated
    as NA in the factorization routines, so it will be coded as
    `-1` and not included in `uniques`. By default,
    ``np.nan`` is used.

Notes
-----
The values returned by this method are also used in
:func:`pandas.util.hash_pandas_object`. If needed, this can be
overridden in the ``self._hash_pandas_object()`` method.

Examples
--------
>>> pd.array([1, 2, 3])._values_for_factorize()
(array([1, 2, 3], dtype=object), nan)

---
## repeat
```python
from base import repeat
```



---
## take
```python
from base import take
```



---
## copy
```python
from base import copy
```

Make a copy of this object.

Name is set on the new object.

Parameters
----------
name : Label, optional
    Set name for new object.
deep : bool, default False

Returns
-------
Index
    Index refer to new object which is a copy of this object.

Notes
-----
In most cases, there should be no functional difference from using
``deep``, but if ``deep`` is passed it will attempt to deepcopy.

Examples
--------
>>> idx = pd.Index(['a', 'b', 'c'])
>>> new_idx = idx.copy()
>>> idx is new_idx
False

---
## view
```python
from base import view
```



---
## _get_repr_footer
```python
from base import _get_repr_footer
```



---
## _repr_2d
```python
from base import _repr_2d
```



---
## _formatter
```python
from base import _formatter
```

Formatting function for scalar values.

This is used in the default '__repr__'. The returned formatting
function receives instances of your scalar type.

Parameters
----------
boxed : bool, default False
    An indicated for whether or not your array is being printed
    within a Series, DataFrame, or Index (True), or just by
    itself (False). This may be useful if you want scalar values
    to appear differently within a Series versus on its own (e.g.
    quoted or not).

Returns
-------
Callable[[Any], str]
    A callable that gets instances of the scalar type and
    returns a string. By default, :func:`repr` is used
    when ``boxed=False`` and :func:`str` is used when
    ``boxed=True``.

Examples
--------
>>> class MyExtensionArray(pd.arrays.NumpyExtensionArray):
...     def _formatter(self, boxed=False):
...         return lambda x: '*' + str(x) + '*' if boxed else repr(x) + '*'
>>> MyExtensionArray(np.array([1, 2, 3, 4]))
<MyExtensionArray>
[1*, 2*, 3*, 4*]
Length: 4, dtype: int64

---
## T
```python
from base import T
```



---
## ravel
```python
from base import ravel
```

Return a view on self.

Returns
-------
Index

See Also
--------
numpy.ndarray.ravel : Return a flattened array.

Examples
--------
>>> s = pd.Series([1, 2, 3], index=['a', 'b', 'c'])
>>> s.index.ravel()
Index(['a', 'b', 'c'], dtype='object')

---
## _concat_same_type
```python
from base import _concat_same_type
```

Concatenate multiple array of this dtype.

Parameters
----------
to_concat : sequence of this type

Returns
-------
ExtensionArray

Examples
--------
>>> arr1 = pd.array([1, 2, 3])
>>> arr2 = pd.array([4, 5, 6])
>>> pd.arrays.IntegerArray._concat_same_type([arr1, arr2])
<IntegerArray>
[1, 2, 3, 4, 5, 6]
Length: 6, dtype: Int64

---
## _accumulate
```python
from base import _accumulate
```

Return an ExtensionArray performing an accumulation operation.

The underlying data type might change.

Parameters
----------
name : str
    Name of the function, supported values are:
    - cummin
    - cummax
    - cumsum
    - cumprod
skipna : bool, default True
    If True, skip NA values.
**kwargs
    Additional keyword arguments passed to the accumulation function.
    Currently, there is no supported kwarg.

Returns
-------
array

Raises
------
NotImplementedError : subclass does not define accumulations

Examples
--------
>>> arr = pd.array([1, 2, 3])
>>> arr._accumulate(name='cumsum')
<IntegerArray>
[1, 3, 6]
Length: 3, dtype: Int64

---
## _reduce
```python
from base import _reduce
```

Return a scalar result of performing the reduction operation.

Parameters
----------
name : str
    Name of the function, supported values are:
    { any, all, min, max, sum, mean, median, prod,
    std, var, sem, kurt, skew }.
skipna : bool, default True
    If True, skip NaN values.
keepdims : bool, default False
    If False, a scalar is returned.
    If True, the result has dimension with size one along the reduced axis.

    .. versionadded:: 2.1

       This parameter is not required in the _reduce signature to keep backward
       compatibility, but will become required in the future. If the parameter
       is not found in the method signature, a FutureWarning will be emitted.
**kwargs
    Additional keyword arguments passed to the reduction function.
    Currently, `ddof` is the only supported kwarg.

Returns
-------
scalar

Raises
------
TypeError : subclass does not define reductions

Examples
--------
>>> pd.array([1, 2, 3])._reduce("min")
1

---
## _values_for_json
```python
from base import _values_for_json
```

Specify how to render our entries in to_json.

Notes
-----
The dtype on the returned ndarray is not restricted, but for non-native
types that are not specifically handled in objToJSON.c, to_json is
liable to raise. In these cases, it may be safer to return an ndarray
of strings.

---
## _hash_pandas_object
```python
from base import _hash_pandas_object
```

Hook for hash_pandas_object.

Default is to use the values returned by _values_for_factorize.

Parameters
----------
encoding : str
    Encoding for data & key when strings.
hash_key : str
    Hash_key for string key to encode.
categorize : bool
    Whether to first categorize object arrays before hashing. This is more
    efficient when the array contains duplicate values.

Returns
-------
np.ndarray[uint64]

Examples
--------
>>> pd.array([1, 2])._hash_pandas_object(encoding='utf-8',
...                                      hash_key="1000000000000000",
...                                      categorize=False
...                                      )
array([ 6238072747940578789, 15839785061582574730], dtype=uint64)

---
## _explode
```python
from base import _explode
```

Transform each element of list-like to a row.

For arrays that do not contain list-like elements the default
implementation of this method just returns a copy and an array
of ones (unchanged index).

Returns
-------
ExtensionArray
    Array with the exploded values.
np.ndarray[uint64]
    The original lengths of each list-like for determining the
    resulting index.

See Also
--------
Series.explode : The method on the ``Series`` object that this
    extension array method is meant to support.

Examples
--------
>>> import pyarrow as pa
>>> a = pd.array([[1, 2, 3], [4], [5, 6]],
...              dtype=pd.ArrowDtype(pa.list_(pa.int64())))
>>> a._explode()
(<ArrowExtensionArray>
[1, 2, 3, 4, 5, 6]
Length: 6, dtype: int64[pyarrow], array([3, 1, 2], dtype=int32))

---
## delete
```python
from base import delete
```

Make new Index with passed location(-s) deleted.

Parameters
----------
loc : int or list of int
    Location of item(-s) which will be deleted.
    Use a list of locations to delete more than one value at the same time.

Returns
-------
Index
    Will be same type as self, except for RangeIndex.

See Also
--------
numpy.delete : Delete any rows and column from NumPy array (ndarray).

Examples
--------
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.delete(1)
Index(['a', 'c'], dtype='object')

>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.delete([0, 2])
Index(['b'], dtype='object')

---
## insert
```python
from base import insert
```

Make new Index inserting new item at location.

Follows Python numpy.insert semantics for negative values.

Parameters
----------
loc : int
item : object

Returns
-------
Index

Examples
--------
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.insert(1, 'x')
Index(['a', 'x', 'b', 'c'], dtype='object')

---
## _putmask
```python
from base import _putmask
```

Analogue to np.putmask(self, mask, value)

Parameters
----------
mask : np.ndarray[bool]
value : scalar or listlike
    If listlike, must be arraylike with same length as self.

Returns
-------
None

Notes
-----
Unlike np.putmask, we do not repeat listlike values with mismatched length.
'value' should either be a scalar or an arraylike with the same length
as self.

---
## _where
```python
from base import _where
```

Analogue to np.where(mask, self, value)

Parameters
----------
mask : np.ndarray[bool]
value : scalar or listlike

Returns
-------
same type as self

---
## _fill_mask_inplace
```python
from base import _fill_mask_inplace
```

Replace values in locations specified by 'mask' using pad or backfill.

See also
--------
ExtensionArray.fillna

---
## _rank
```python
from base import _rank
```

See Series.rank.__doc__.

---
## _empty
```python
from base import _empty
```

Create an ExtensionArray with the given shape and dtype.

See also
--------
ExtensionDtype.empty
    ExtensionDtype.empty is the 'official' public version of this API.

---
## _quantile
```python
from base import _quantile
```

Compute the quantiles of self for each quantile in `qs`.

Parameters
----------
qs : np.ndarray[float64]
interpolation: str

Returns
-------
same type as self

---
## _mode
```python
from base import _mode
```

Returns the mode(s) of the ExtensionArray.

Always returns `ExtensionArray` even if only one value.

Parameters
----------
dropna : bool, default True
    Don't consider counts of NA values.

Returns
-------
same type as self
    Sorted, if possible.

---
## __array_ufunc__
```python
from base import __array_ufunc__
```



---
## map
```python
from base import map
```

Map values using an input mapping or function.

Parameters
----------
mapper : function, dict, or Series
    Mapping correspondence.
na_action : {None, 'ignore'}
    If 'ignore', propagate NA values, without passing them to the
    mapping correspondence.

Returns
-------
Union[Index, MultiIndex]
    The output of the mapping function applied to the index.
    If the function returns a tuple with more than one element
    a MultiIndex will be returned.

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx.map({1: 'a', 2: 'b', 3: 'c'})
Index(['a', 'b', 'c'], dtype='object')

Using `map` with a function:

>>> idx = pd.Index([1, 2, 3])
>>> idx.map('I am a {}'.format)
Index(['I am a 1', 'I am a 2', 'I am a 3'], dtype='object')

>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.map(lambda x: x.upper())
Index(['A', 'B', 'C'], dtype='object')

---
## _groupby_op
```python
from base import _groupby_op
```

Dispatch GroupBy reduction or transformation operation.

This is an *experimental* API to allow ExtensionArray authors to implement
reductions and transformations. The API is subject to change.

Parameters
----------
how : {'any', 'all', 'sum', 'prod', 'min', 'max', 'mean', 'median',
       'median', 'var', 'std', 'sem', 'nth', 'last', 'ohlc',
       'cumprod', 'cumsum', 'cummin', 'cummax', 'rank'}
has_dropped_na : bool
min_count : int
ngroups : int
ids : np.ndarray[np.intp]
    ids[i] gives the integer label for the group that self[i] belongs to.
**kwargs : operation-specific
    'any', 'all' -> ['skipna']
    'var', 'std', 'sem' -> ['ddof']
    'cumprod', 'cumsum', 'cummin', 'cummax' -> ['skipna']
    'rank' -> ['ties_method', 'ascending', 'na_option', 'pct']

Returns
-------
np.ndarray or ExtensionArray

---
## any
```python
from base import any
```

Return whether any element is Truthy.

Parameters
----------
*args
    Required for compatibility with numpy.
**kwargs
    Required for compatibility with numpy.

Returns
-------
bool or array-like (if axis is specified)
    A single element array-like may be converted to bool.

See Also
--------
Index.all : Return whether all elements are True.
Series.all : Return whether all elements are True.

Notes
-----
Not a Number (NaN), positive infinity and negative infinity
evaluate to True because these are not equal to zero.

Examples
--------
>>> index = pd.Index([0, 1, 2])
>>> index.any()
True

>>> index = pd.Index([0, 0, 0])
>>> index.any()
False

---
## all
```python
from base import all
```

Return whether all elements are Truthy.

Parameters
----------
*args
    Required for compatibility with numpy.
**kwargs
    Required for compatibility with numpy.

Returns
-------
bool or array-like (if axis is specified)
    A single element array-like may be converted to bool.

See Also
--------
Index.any : Return whether any element in an Index is True.
Series.any : Return whether any element in a Series is True.
Series.all : Return whether all elements in a Series are True.

Notes
-----
Not a Number (NaN), positive infinity and negative infinity
evaluate to True because these are not equal to zero.

Examples
--------
True, because nonzero integers are considered True.

>>> pd.Index([1, 2, 3]).all()
True

False, because ``0`` is considered False.

>>> pd.Index([0, 1, 2]).all()
False

---
## _create_arithmetic_method
```python
from base import _create_arithmetic_method
```



---
## _add_arithmetic_ops
```python
from base import _add_arithmetic_ops
```



---
## _create_comparison_method
```python
from base import _create_comparison_method
```



---
## _add_comparison_ops
```python
from base import _add_comparison_ops
```



---
## _create_logical_method
```python
from base import _create_logical_method
```



---
## _add_logical_ops
```python
from base import _add_logical_ops
```



---
## _create_method
```python
from base import _create_method
```

A class method that returns a method that will correspond to an
operator for an ExtensionArray subclass, by dispatching to the
relevant operator defined on the individual elements of the
ExtensionArray.

Parameters
----------
op : function
    An operator that takes arguments op(a, b)
coerce_to_dtype : bool, default True
    boolean indicating whether to attempt to convert
    the result to the underlying ExtensionArray dtype.
    If it's not possible to create a new ExtensionArray with the
    values, an ndarray is returned instead.

Returns
-------
Callable[[Any, Any], Union[ndarray, ExtensionArray]]
    A method that can be bound to a class. When used, the method
    receives the two arguments, one of which is the instance of
    this class, and should return an ExtensionArray or an ndarray.

    Returning an ndarray may be necessary when the result of the
    `op` cannot be stored in the ExtensionArray. The dtype of the
    ndarray uses NumPy's normal inference rules.

Examples
--------
Given an ExtensionArray subclass called MyExtensionArray, use

    __add__ = cls._create_method(operator.add)

in the class definition of MyExtensionArray to create the operator
for addition, that will be based on the operator implementation
of the underlying elements of the ExtensionArray

---
## _binop
```python
from base import _binop
```



---
## convert_values
```python
from base import convert_values
```



---
## _maybe_convert
```python
from base import _maybe_convert
```



---
## __name__
```python
from _mixins import __name__
```



---
## ravel_compat
```python
from _mixins import ravel_compat
```

Decorator to ravel a 2D array before passing it to a cython operation,
then reshape the result to our own shape.

---
## NDArrayBackedExtensionArray
```python
from _mixins import NDArrayBackedExtensionArray
```

ExtensionArray that is backed by a single NumPy ndarray.

---
## method
```python
from _mixins import method
```



---
## _box_func
```python
from _mixins import _box_func
```

Wrap numpy type in our dtype.type if necessary.

---
## _validate_scalar
```python
from _mixins import _validate_scalar
```



---
## view
```python
from _mixins import view
```



---
## take
```python
from _mixins import take
```



---
## equals
```python
from _mixins import equals
```



---
## _from_factorized
```python
from _mixins import _from_factorized
```



---
## _values_for_argsort
```python
from _mixins import _values_for_argsort
```



---
## _values_for_factorize
```python
from _mixins import _values_for_factorize
```



---
## _hash_pandas_object
```python
from _mixins import _hash_pandas_object
```



---
## argmin
```python
from _mixins import argmin
```



---
## argmax
```python
from _mixins import argmax
```



---
## unique
```python
from _mixins import unique
```



---
## _concat_same_type
```python
from _mixins import _concat_same_type
```



---
## searchsorted
```python
from _mixins import searchsorted
```



---
## shift
```python
from _mixins import shift
```



---
## __setitem__
```python
from _mixins import __setitem__
```



---
## _validate_setitem_value
```python
from _mixins import _validate_setitem_value
```



---
## __getitem__
```python
from _mixins import __getitem__
```



---
## _fill_mask_inplace
```python
from _mixins import _fill_mask_inplace
```



---
## _pad_or_backfill
```python
from _mixins import _pad_or_backfill
```



---
## fillna
```python
from _mixins import fillna
```



---
## _wrap_reduction_result
```python
from _mixins import _wrap_reduction_result
```



---
## _putmask
```python
from _mixins import _putmask
```

Analogue to np.putmask(self, mask, value)

Parameters
----------
mask : np.ndarray[bool]
value : scalar or listlike

Raises
------
TypeError
    If value cannot be cast to self.dtype.

---
## _where
```python
from _mixins import _where
```

Analogue to np.where(mask, self, value)

Parameters
----------
mask : np.ndarray[bool]
value : scalar or listlike

Raises
------
TypeError
    If value cannot be cast to self.dtype.

---
## insert
```python
from _mixins import insert
```

Make new ExtensionArray inserting new item at location. Follows
Python list.append semantics for negative values.

Parameters
----------
loc : int
item : object

Returns
-------
type(self)

---
## value_counts
```python
from _mixins import value_counts
```

Return a Series containing counts of unique values.

Parameters
----------
dropna : bool, default True
    Don't include counts of NA values.

Returns
-------
Series

---
## _quantile
```python
from _mixins import _quantile
```



---
## _cast_quantile_result
```python
from _mixins import _cast_quantile_result
```

Cast the result of quantile_with_mask to an appropriate dtype
to pass to _from_backing_data in _quantile.

---
## _empty
```python
from _mixins import _empty
```

Analogous to np.empty(shape, dtype=dtype)

Parameters
----------
shape : tuple[int]
dtype : ExtensionDtype

---
## to_numpy_dtype_inference
```python
from _utils import to_numpy_dtype_inference
```



---
## fill_binop
```python
from array_ops import fill_binop
```

If a non-None fill_value is given, replace null entries in left and right
with this value, but only in positions where _one_ of left/right is null,
not both.

Parameters
----------
left : array-like
right : array-like
fill_value : object

Returns
-------
left : array-like
right : array-like

Notes
-----
Makes copies if fill_value is not None and NAs are present.

---
## comp_method_OBJECT_ARRAY
```python
from array_ops import comp_method_OBJECT_ARRAY
```



---
## _masked_arith_op
```python
from array_ops import _masked_arith_op
```

If the given arithmetic operation fails, attempt it again on
only the non-null elements of the input array(s).

Parameters
----------
x : np.ndarray
y : np.ndarray, Series, Index
op : binary operator

---
## _na_arithmetic_op
```python
from array_ops import _na_arithmetic_op
```

Return the result of evaluating op on the passed in values.

If native types are not compatible, try coercion to object dtype.

Parameters
----------
left : np.ndarray
right : np.ndarray or scalar
    Excludes DataFrame, Series, Index, ExtensionArray.
is_cmp : bool, default False
    If this a comparison operation.

Returns
-------
array-like

Raises
------
TypeError : invalid operation

---
## arithmetic_op
```python
from array_ops import arithmetic_op
```

Evaluate an arithmetic operation `+`, `-`, `*`, `/`, `//`, `%`, `**`, ...

Note: the caller is responsible for ensuring that numpy warnings are
suppressed (with np.errstate(all="ignore")) if needed.

Parameters
----------
left : np.ndarray or ExtensionArray
right : object
    Cannot be a DataFrame or Index.  Series is *not* excluded.
op : {operator.add, operator.sub, ...}
    Or one of the reversed variants from roperator.

Returns
-------
ndarray or ExtensionArray
    Or a 2-tuple of these in the case of divmod or rdivmod.

---
## comparison_op
```python
from array_ops import comparison_op
```

Evaluate a comparison operation `=`, `!=`, `>=`, `>`, `<=`, or `<`.

Note: the caller is responsible for ensuring that numpy warnings are
suppressed (with np.errstate(all="ignore")) if needed.

Parameters
----------
left : np.ndarray or ExtensionArray
right : object
    Cannot be a DataFrame, Series, or Index.
op : {operator.eq, operator.ne, operator.gt, operator.ge, operator.lt, operator.le}

Returns
-------
ndarray or ExtensionArray

---
## na_logical_op
```python
from array_ops import na_logical_op
```



---
## logical_op
```python
from array_ops import logical_op
```

Evaluate a logical operation `|`, `&`, or `^`.

Parameters
----------
left : np.ndarray or ExtensionArray
right : object
    Cannot be a DataFrame, Series, or Index.
op : {operator.and_, operator.or_, operator.xor}
    Or one of the reversed variants from roperator.

Returns
-------
ndarray or ExtensionArray

---
## get_array_op
```python
from array_ops import get_array_op
```

Return a binary array operation corresponding to the given operator op.

Parameters
----------
op : function
    Binary operator from operator or roperator module.

Returns
-------
functools.partial

---
## maybe_prepare_scalar_for_op
```python
from array_ops import maybe_prepare_scalar_for_op
```

Cast non-pandas objects to pandas types to unify behavior of arithmetic
and comparison operations.

Parameters
----------
obj: object
shape : tuple[int]

Returns
-------
out : object

Notes
-----
Be careful to call this *after* determining the `name` attribute to be
attached to the result of the arithmetic operation.

---
## _bool_arith_check
```python
from array_ops import _bool_arith_check
```

In contrast to numpy, pandas raises an error for certain operations
with booleans.

---
## fill_bool
```python
from array_ops import fill_bool
```



---
## _fill_zeros
```python
from missing import _fill_zeros
```

If this is a reversed op, then flip x,y

If we have an integer value (or array in y)
and we have 0's, fill them with np.nan,
return the result.

Mask the nan's from x.

---
## mask_zero_div_zero
```python
from missing import mask_zero_div_zero
```

Set results of  0 // 0 to np.nan, regardless of the dtypes
of the numerator or the denominator.

Parameters
----------
x : ndarray
y : ndarray
result : ndarray

Returns
-------
ndarray
    The filled result.

Examples
--------
>>> x = np.array([1, 0, -1], dtype=np.int64)
>>> x
array([ 1,  0, -1])
>>> y = 0       # int 0; numpy behavior is different with float
>>> result = x // y
>>> result      # raw numpy result does not fill division by zero
array([0, 0, 0])
>>> mask_zero_div_zero(x, y, result)
array([ inf,  nan, -inf])

---
## dispatch_fill_zeros
```python
from missing import dispatch_fill_zeros
```

Call _fill_zeros with the appropriate fill value depending on the operation,
with special logic for divmod and rdivmod.

Parameters
----------
op : function (operator.add, operator.div, ...)
left : object (np.ndarray for non-reversed ops)
    We have excluded ExtensionArrays here
right : object (np.ndarray for reversed ops)
    We have excluded ExtensionArrays here
result : ndarray

Returns
-------
result : np.ndarray

Notes
-----
For divmod and rdivmod, the `result` parameter and returned `result`
is a 2-tuple of ndarray objects.

---
## __name__
```python
from dispatch import __name__
```

Functions for defining unary operations.

---
## should_extension_dispatch
```python
from dispatch import should_extension_dispatch
```

Identify cases where Series operation should dispatch to ExtensionArray method.

Parameters
----------
left : np.ndarray or ExtensionArray
right : object

Returns
-------
bool

---
## __name__
```python
from invalid import __name__
```

Templates for invalid operations.

---
## invalid_comparison
```python
from invalid import invalid_comparison
```

If a comparison has mismatched types and is not necessarily meaningful,
follow python3 conventions by:

    - returning all-False for equality
    - returning all-True for inequality
    - raising TypeError otherwise

Parameters
----------
left : array-like
right : scalar, array-like
op : operator.{eq, ne, lt, le, gt}

Raises
------
TypeError : on inequality comparisons

---
## make_invalid_op
```python
from invalid import make_invalid_op
```

Return a binary method that always raises a TypeError.

Parameters
----------
name : str

Returns
-------
invalid_op : function

---
## invalid_op
```python
from invalid import invalid_op
```



---
## make_flex_doc
```python
from docstrings import make_flex_doc
```

Make the appropriate substitutions for the given operation and class-typ
into either _flex_doc_SERIES or _flex_doc_FRAME to return the docstring
to attach to a generated method.

Parameters
----------
op_name : str {'__add__', '__sub__', ... '__eq__', '__ne__', ...}
typ : str {series, 'dataframe']}

Returns
-------
doc : str

---
## __name__
```python
from mask_ops import __name__
```

Ops for masked arrays.

---
## kleene_or
```python
from mask_ops import kleene_or
```

Boolean ``or`` using Kleene logic.

Values are NA where we have ``NA | NA`` or ``NA | False``.
``NA | True`` is considered True.

Parameters
----------
left, right : ndarray, NA, or bool
    The values of the array.
left_mask, right_mask : ndarray, optional
    The masks. Only one of these may be None, which implies that
    the associated `left` or `right` value is a scalar.

Returns
-------
result, mask: ndarray[bool]
    The result of the logical or, and the new mask.

---
## kleene_xor
```python
from mask_ops import kleene_xor
```

Boolean ``xor`` using Kleene logic.

This is the same as ``or``, with the following adjustments

* True, True -> False
* True, NA   -> NA

Parameters
----------
left, right : ndarray, NA, or bool
    The values of the array.
left_mask, right_mask : ndarray, optional
    The masks. Only one of these may be None, which implies that
    the associated `left` or `right` value is a scalar.

Returns
-------
result, mask: ndarray[bool]
    The result of the logical xor, and the new mask.

---
## kleene_and
```python
from mask_ops import kleene_and
```

Boolean ``and`` using Kleene logic.

Values are ``NA`` for ``NA & NA`` or ``True & NA``.

Parameters
----------
left, right : ndarray, NA, or bool
    The values of the array.
left_mask, right_mask : ndarray, optional
    The masks. Only one of these may be None, which implies that
    the associated `left` or `right` value is a scalar.

Returns
-------
result, mask: ndarray[bool]
    The result of the logical xor, and the new mask.

---
## raise_for_nan
```python
from mask_ops import raise_for_nan
```



---
## unpack_zerodim_and_defer
```python
from common import unpack_zerodim_and_defer
```

Boilerplate for pandas conventions in arithmetic and comparison methods.

Parameters
----------
name : str

Returns
-------
decorator

---
## _unpack_zerodim_and_defer
```python
from common import _unpack_zerodim_and_defer
```

Boilerplate for pandas conventions in arithmetic and comparison methods.

Ensure method returns NotImplemented when operating against "senior"
classes.  Ensure zero-dimensional ndarrays are always unpacked.

Parameters
----------
method : binary method
name : str

Returns
-------
method

---
## get_op_result_name
```python
from common import get_op_result_name
```

Find the appropriate name to pin to an operation result.  This result
should always be either an Index or a Series.

Parameters
----------
left : {Series, Index}
right : object

Returns
-------
name : object
    Usually a string

---
## _maybe_match_name
```python
from common import _maybe_match_name
```

Try to find a name to attach to the result of an operation between
a and b.  If only one of these has a `name` attribute, return that
name.  Otherwise return a consensus name if they match or None if
they have different names.

Parameters
----------
a : object
b : object

Returns
-------
name : str or None

See Also
--------
pandas.core.common.consensus_name_attr

---
## new_method
```python
from common import new_method
```



---
## __name__
```python
from accessors import __name__
```

Accessors for arrow-backed data.

---
## Properties
```python
from accessors import Properties
```



---
## ArrowTemporalProperties
```python
from accessors import ArrowTemporalProperties
```



---
## DatetimeProperties
```python
from accessors import DatetimeProperties
```

Accessor object for datetimelike properties of the Series values.

Examples
--------
>>> seconds_series = pd.Series(pd.date_range("2000-01-01", periods=3, freq="s"))
>>> seconds_series
0   2000-01-01 00:00:00
1   2000-01-01 00:00:01
2   2000-01-01 00:00:02
dtype: datetime64[ns]
>>> seconds_series.dt.second
0    0
1    1
2    2
dtype: int32

>>> hours_series = pd.Series(pd.date_range("2000-01-01", periods=3, freq="h"))
>>> hours_series
0   2000-01-01 00:00:00
1   2000-01-01 01:00:00
2   2000-01-01 02:00:00
dtype: datetime64[ns]
>>> hours_series.dt.hour
0    0
1    1
2    2
dtype: int32

>>> quarters_series = pd.Series(pd.date_range("2000-01-01", periods=3, freq="QE"))
>>> quarters_series
0   2000-03-31
1   2000-06-30
2   2000-09-30
dtype: datetime64[ns]
>>> quarters_series.dt.quarter
0    1
1    2
2    3
dtype: int32

Returns a Series indexed like the original Series.
Raises TypeError if the Series does not contain datetimelike values.

---
## TimedeltaProperties
```python
from accessors import TimedeltaProperties
```

Accessor object for datetimelike properties of the Series values.

Returns a Series indexed like the original Series.
Raises TypeError if the Series does not contain datetimelike values.

Examples
--------
>>> seconds_series = pd.Series(
...     pd.timedelta_range(start="1 second", periods=3, freq="s")
... )
>>> seconds_series
0   0 days 00:00:01
1   0 days 00:00:02
2   0 days 00:00:03
dtype: timedelta64[ns]
>>> seconds_series.dt.seconds
0    1
1    2
2    3
dtype: int32

---
## PeriodProperties
```python
from accessors import PeriodProperties
```

Accessor object for datetimelike properties of the Series values.

Returns a Series indexed like the original Series.
Raises TypeError if the Series does not contain datetimelike values.

Examples
--------
>>> seconds_series = pd.Series(
...     pd.period_range(
...         start="2000-01-01 00:00:00", end="2000-01-01 00:00:03", freq="s"
...     )
... )
>>> seconds_series
0    2000-01-01 00:00:00
1    2000-01-01 00:00:01
2    2000-01-01 00:00:02
3    2000-01-01 00:00:03
dtype: period[s]
>>> seconds_series.dt.second
0    0
1    1
2    2
3    3
dtype: int64

>>> hours_series = pd.Series(
...     pd.period_range(start="2000-01-01 00:00", end="2000-01-01 03:00", freq="h")
... )
>>> hours_series
0    2000-01-01 00:00
1    2000-01-01 01:00
2    2000-01-01 02:00
3    2000-01-01 03:00
dtype: period[h]
>>> hours_series.dt.hour
0    0
1    1
2    2
3    3
dtype: int64

>>> quarters_series = pd.Series(
...     pd.period_range(start="2000-01-01", end="2000-12-31", freq="Q-DEC")
... )
>>> quarters_series
0    2000Q1
1    2000Q2
2    2000Q3
3    2000Q4
dtype: period[Q-DEC]
>>> quarters_series.dt.quarter
0    1
1    2
2    3
3    4
dtype: int64

---
## CombinedDatetimelikeProperties
```python
from accessors import CombinedDatetimelikeProperties
```



---
## __init__
```python
from accessors import __init__
```



---
## _get_values
```python
from accessors import _get_values
```



---
## _delegate_property_get
```python
from accessors import _delegate_property_get
```



---
## _delegate_property_set
```python
from accessors import _delegate_property_set
```



---
## _delegate_method
```python
from accessors import _delegate_method
```



---
## to_pytimedelta
```python
from accessors import to_pytimedelta
```

Return an array of native :class:`datetime.timedelta` objects.

Python's standard `datetime` library uses a different representation
timedelta's. This method converts a Series of pandas Timedeltas
to `datetime.timedelta` format with the same length as the original
Series.

Returns
-------
numpy.ndarray
    Array of 1D containing data with `datetime.timedelta` type.

See Also
--------
datetime.timedelta : A duration expressing the difference
    between two date, time, or datetime.

Examples
--------
>>> s = pd.Series(pd.to_timedelta(np.arange(5), unit="d"))
>>> s
0   0 days
1   1 days
2   2 days
3   3 days
4   4 days
dtype: timedelta64[ns]

>>> s.dt.to_pytimedelta()
array([datetime.timedelta(0), datetime.timedelta(days=1),
datetime.timedelta(days=2), datetime.timedelta(days=3),
datetime.timedelta(days=4)], dtype=object)

---
## to_pydatetime
```python
from accessors import to_pydatetime
```

Return the data as an array of :class:`datetime.datetime` objects.

.. deprecated:: 2.1.0

    The current behavior of dt.to_pydatetime is deprecated.
    In a future version this will return a Series containing python
    datetime objects instead of a ndarray.

Timezone information is retained if present.

.. warning::

   Python's datetime uses microsecond resolution, which is lower than
   pandas (nanosecond). The values are truncated.

Returns
-------
numpy.ndarray
    Object dtype array containing native Python datetime objects.

See Also
--------
datetime.datetime : Standard library value for a datetime.

Examples
--------
>>> s = pd.Series(pd.date_range('20180310', periods=2))
>>> s
0   2018-03-10
1   2018-03-11
dtype: datetime64[ns]

>>> s.dt.to_pydatetime()
array([datetime.datetime(2018, 3, 10, 0, 0),
       datetime.datetime(2018, 3, 11, 0, 0)], dtype=object)

pandas' nanosecond precision is truncated to microseconds.

>>> s = pd.Series(pd.date_range('20180310', periods=2, freq='ns'))
>>> s
0   2018-03-10 00:00:00.000000000
1   2018-03-10 00:00:00.000000001
dtype: datetime64[ns]

>>> s.dt.to_pydatetime()
array([datetime.datetime(2018, 3, 10, 0, 0),
       datetime.datetime(2018, 3, 10, 0, 0)], dtype=object)

---
## isocalendar
```python
from accessors import isocalendar
```

Calculate year, week, and day according to the ISO 8601 standard.

Returns
-------
DataFrame
    With columns year, week and day.

See Also
--------
Timestamp.isocalendar : Function return a 3-tuple containing ISO year,
    week number, and weekday for the given Timestamp object.
datetime.date.isocalendar : Return a named tuple object with
    three components: year, week and weekday.

Examples
--------
>>> ser = pd.to_datetime(pd.Series(["2010-01-01", pd.NaT]))
>>> ser.dt.isocalendar()
   year  week  day
0  2009    53     5
1  <NA>  <NA>  <NA>
>>> ser.dt.isocalendar().week
0      53
1    <NA>
Name: week, dtype: UInt32

---
## components
```python
from accessors import components
```

Return a Dataframe of the components of the Timedeltas.

Returns
-------
DataFrame

Examples
--------
>>> s = pd.Series(pd.to_timedelta(np.arange(5), unit='s'))
>>> s
0   0 days 00:00:00
1   0 days 00:00:01
2   0 days 00:00:02
3   0 days 00:00:03
4   0 days 00:00:04
dtype: timedelta64[ns]
>>> s.dt.components
   days  hours  minutes  seconds  milliseconds  microseconds  nanoseconds
0     0      0        0        0             0             0            0
1     0      0        0        1             0             0            0
2     0      0        0        2             0             0            0
3     0      0        0        3             0             0            0
4     0      0        0        4             0             0            0

---
## freq
```python
from accessors import freq
```



---
## __new__
```python
from accessors import __new__
```



---
## _get_next_label
```python
from interval import _get_next_label
```



---
## _get_prev_label
```python
from interval import _get_prev_label
```



---
## _new_IntervalIndex
```python
from interval import _new_IntervalIndex
```

This is called upon unpickling, rather than the default which doesn't have
arguments and breaks __new__.

---
## IntervalIndex
```python
from interval import IntervalIndex
```



---
## _is_valid_endpoint
```python
from interval import _is_valid_endpoint
```

Helper for interval_range to check if start/end are valid types.

---
## _is_type_compatible
```python
from interval import _is_type_compatible
```

Helper for interval_range to check type compat of start/end/freq.

---
## interval_range
```python
from interval import interval_range
```

Return a fixed frequency IntervalIndex.

Parameters
----------
start : numeric or datetime-like, default None
    Left bound for generating intervals.
end : numeric or datetime-like, default None
    Right bound for generating intervals.
periods : int, default None
    Number of periods to generate.
freq : numeric, str, Timedelta, datetime.timedelta, or DateOffset, default None
    The length of each interval. Must be consistent with the type of start
    and end, e.g. 2 for numeric, or '5H' for datetime-like.  Default is 1
    for numeric and 'D' for datetime-like.
name : str, default None
    Name of the resulting IntervalIndex.
closed : {'left', 'right', 'both', 'neither'}, default 'right'
    Whether the intervals are closed on the left-side, right-side, both
    or neither.

Returns
-------
IntervalIndex

See Also
--------
IntervalIndex : An Index of intervals that are all closed on the same side.

Notes
-----
Of the four parameters ``start``, ``end``, ``periods``, and ``freq``,
exactly three must be specified. If ``freq`` is omitted, the resulting
``IntervalIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end``, inclusively.

To learn more about datetime-like frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
Numeric ``start`` and  ``end`` is supported.

>>> pd.interval_range(start=0, end=5)
IntervalIndex([(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]],
              dtype='interval[int64, right]')

Additionally, datetime-like input is also supported.

>>> pd.interval_range(start=pd.Timestamp('2017-01-01'),
...                   end=pd.Timestamp('2017-01-04'))
IntervalIndex([(2017-01-01 00:00:00, 2017-01-02 00:00:00],
               (2017-01-02 00:00:00, 2017-01-03 00:00:00],
               (2017-01-03 00:00:00, 2017-01-04 00:00:00]],
              dtype='interval[datetime64[ns], right]')

The ``freq`` parameter specifies the frequency between the left and right.
endpoints of the individual intervals within the ``IntervalIndex``.  For
numeric ``start`` and ``end``, the frequency must also be numeric.

>>> pd.interval_range(start=0, periods=4, freq=1.5)
IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]],
              dtype='interval[float64, right]')

Similarly, for datetime-like ``start`` and ``end``, the frequency must be
convertible to a DateOffset.

>>> pd.interval_range(start=pd.Timestamp('2017-01-01'),
...                   periods=3, freq='MS')
IntervalIndex([(2017-01-01 00:00:00, 2017-02-01 00:00:00],
               (2017-02-01 00:00:00, 2017-03-01 00:00:00],
               (2017-03-01 00:00:00, 2017-04-01 00:00:00]],
              dtype='interval[datetime64[ns], right]')

Specify ``start``, ``end``, and ``periods``; the frequency is generated
automatically (linearly spaced).

>>> pd.interval_range(start=0, end=6, periods=4)
IntervalIndex([(0.0, 1.5], (1.5, 3.0], (3.0, 4.5], (4.5, 6.0]],
          dtype='interval[float64, right]')

The ``closed`` parameter specifies which endpoints of the individual
intervals within the ``IntervalIndex`` are closed.

>>> pd.interval_range(end=5, periods=4, closed='both')
IntervalIndex([[1, 2], [2, 3], [3, 4], [4, 5]],
              dtype='interval[int64, both]')

---
## _engine
```python
from interval import _engine
```



---
## __contains__
```python
from interval import __contains__
```

return a boolean if this key is IN the index
We *only* accept an Interval

Parameters
----------
key : Interval

Returns
-------
bool

---
## _getitem_slice
```python
from interval import _getitem_slice
```

Fastpath for __getitem__ when we know we have a slice.

---
## _multiindex
```python
from interval import _multiindex
```



---
## __reduce__
```python
from interval import __reduce__
```



---
## inferred_type
```python
from interval import inferred_type
```

Return a string of the type inferred from the values

---
## memory_usage
```python
from interval import memory_usage
```



---
## is_monotonic_decreasing
```python
from interval import is_monotonic_decreasing
```

Return True if the IntervalIndex is monotonic decreasing (only equal or
decreasing values), else False

---
## is_unique
```python
from interval import is_unique
```

Return True if the IntervalIndex contains unique elements, else False.

---
## is_overlapping
```python
from interval import is_overlapping
```

Return True if the IntervalIndex has overlapping intervals, else False.

Two intervals overlap if they share a common point, including closed
endpoints. Intervals that only have an open endpoint in common do not
overlap.

Returns
-------
bool
    Boolean indicating if the IntervalIndex has overlapping intervals.

See Also
--------
Interval.overlaps : Check whether two Interval objects overlap.
IntervalIndex.overlaps : Check an IntervalIndex elementwise for
    overlaps.

Examples
--------
>>> index = pd.IntervalIndex.from_tuples([(0, 2), (1, 3), (4, 5)])
>>> index
IntervalIndex([(0, 2], (1, 3], (4, 5]],
      dtype='interval[int64, right]')
>>> index.is_overlapping
True

Intervals that share closed endpoints overlap:

>>> index = pd.interval_range(0, 3, closed='both')
>>> index
IntervalIndex([[0, 1], [1, 2], [2, 3]],
      dtype='interval[int64, both]')
>>> index.is_overlapping
True

Intervals that only have an open endpoint in common do not overlap:

>>> index = pd.interval_range(0, 3, closed='left')
>>> index
IntervalIndex([[0, 1), [1, 2), [2, 3)],
      dtype='interval[int64, left]')
>>> index.is_overlapping
False

---
## _needs_i8_conversion
```python
from interval import _needs_i8_conversion
```

Check if a given key needs i8 conversion. Conversion is necessary for
Timestamp, Timedelta, DatetimeIndex, and TimedeltaIndex keys. An
Interval-like requires conversion if its endpoints are one of the
aforementioned types.

Assumes that any list-like data has already been cast to an Index.

Parameters
----------
key : scalar or Index-like
    The key that should be checked for i8 conversion

Returns
-------
bool

---
## _maybe_convert_i8
```python
from interval import _maybe_convert_i8
```

Maybe convert a given key to its equivalent i8 value(s). Used as a
preprocessing step prior to IntervalTree queries (self._engine), which
expects numeric data.

Parameters
----------
key : scalar or list-like
    The key that should maybe be converted to i8.

Returns
-------
scalar or list-like
    The original key if no conversion occurred, int if converted scalar,
    Index with an int64 dtype if converted list-like.

---
## _searchsorted_monotonic
```python
from interval import _searchsorted_monotonic
```



---
## get_loc
```python
from interval import get_loc
```

Get integer location, slice or boolean mask for requested label.

Parameters
----------
key : label

Returns
-------
int if unique index, slice if monotonic index, else mask

Examples
--------
>>> i1, i2 = pd.Interval(0, 1), pd.Interval(1, 2)
>>> index = pd.IntervalIndex([i1, i2])
>>> index.get_loc(1)
0

You can also supply a point inside an interval.

>>> index.get_loc(1.5)
1

If a label is in several intervals, you get the locations of all the
relevant intervals.

>>> i3 = pd.Interval(0, 2)
>>> overlapping_index = pd.IntervalIndex([i1, i2, i3])
>>> overlapping_index.get_loc(0.5)
array([ True, False,  True])

Only exact matches will be returned if an interval is provided.

>>> index.get_loc(pd.Interval(0, 1))
0

---
## _get_indexer
```python
from interval import _get_indexer
```



---
## get_indexer_non_unique
```python
from interval import get_indexer_non_unique
```



---
## _get_indexer_unique_sides
```python
from interval import _get_indexer_unique_sides
```

_get_indexer specialized to the case where both of our sides are unique.

---
## _get_indexer_pointwise
```python
from interval import _get_indexer_pointwise
```

pointwise implementation for get_indexer and get_indexer_non_unique.

---
## _index_as_unique
```python
from interval import _index_as_unique
```



---
## _convert_slice_indexer
```python
from interval import _convert_slice_indexer
```



---
## _should_fallback_to_positional
```python
from interval import _should_fallback_to_positional
```



---
## _maybe_cast_slice_bound
```python
from interval import _maybe_cast_slice_bound
```



---
## _is_comparable_dtype
```python
from interval import _is_comparable_dtype
```



---
## _intersection
```python
from interval import _intersection
```

intersection specialized to the case with matching dtypes.

---
## _intersection_unique
```python
from interval import _intersection_unique
```

Used when the IntervalIndex does not have any common endpoint,
no matter left or right.
Return the intersection with another IntervalIndex.
Parameters
----------
other : IntervalIndex
Returns
-------
IntervalIndex

---
## _intersection_non_unique
```python
from interval import _intersection_non_unique
```

Used when the IntervalIndex does have some common endpoints,
on either sides.
Return the intersection with another IntervalIndex.

Parameters
----------
other : IntervalIndex

Returns
-------
IntervalIndex

---
## _get_engine_target
```python
from interval import _get_engine_target
```



---
## _from_join_target
```python
from interval import _from_join_target
```



---
## TimedeltaIndex
```python
from timedeltas import TimedeltaIndex
```

Immutable Index of timedelta64 data.

Represented internally as int64, and scalars returned Timedelta objects.

Parameters
----------
data : array-like (1-dimensional), optional
    Optional timedelta-like data to construct index with.
unit : {'D', 'h', 'm', 's', 'ms', 'us', 'ns'}, optional
    The unit of ``data``.

    .. deprecated:: 2.2.0
     Use ``pd.to_timedelta`` instead.

freq : str or pandas offset object, optional
    One of pandas date offset strings or corresponding objects. The string
    ``'infer'`` can be passed in order to set the frequency of the index as
    the inferred frequency upon creation.
dtype : numpy.dtype or str, default None
    Valid ``numpy`` dtypes are ``timedelta64[ns]``, ``timedelta64[us]``,
    ``timedelta64[ms]``, and ``timedelta64[s]``.
copy : bool
    Make a copy of input array.
name : object
    Name to be stored in the index.

Attributes
----------
days
seconds
microseconds
nanoseconds
components
inferred_freq

Methods
-------
to_pytimedelta
to_series
round
floor
ceil
to_frame
mean

See Also
--------
Index : The base pandas Index type.
Timedelta : Represents a duration between two dates or times.
DatetimeIndex : Index of datetime64 data.
PeriodIndex : Index of Period data.
timedelta_range : Create a fixed-frequency TimedeltaIndex.

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
>>> pd.TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'])
TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq=None)

We can also let pandas infer the frequency when possible.

>>> pd.TimedeltaIndex(np.arange(5) * 24 * 3600 * 1e9, freq='infer')
TimedeltaIndex(['0 days', '1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq='D')

---
## timedelta_range
```python
from timedeltas import timedelta_range
```

Return a fixed frequency TimedeltaIndex with day as the default.

Parameters
----------
start : str or timedelta-like, default None
    Left bound for generating timedeltas.
end : str or timedelta-like, default None
    Right bound for generating timedeltas.
periods : int, default None
    Number of periods to generate.
freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'D'
    Frequency strings can have multiples, e.g. '5h'.
name : str, default None
    Name of the resulting TimedeltaIndex.
closed : str, default None
    Make the interval closed with respect to the given frequency to
    the 'left', 'right', or both sides (None).
unit : str, default None
    Specify the desired resolution of the result.

    .. versionadded:: 2.0.0

Returns
-------
TimedeltaIndex

Notes
-----
Of the four parameters ``start``, ``end``, ``periods``, and ``freq``,
exactly three must be specified. If ``freq`` is omitted, the resulting
``TimedeltaIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end`` (closed on both sides).

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
>>> pd.timedelta_range(start='1 day', periods=4)
TimedeltaIndex(['1 days', '2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq='D')

The ``closed`` parameter specifies which endpoint is included.  The default
behavior is to include both endpoints.

>>> pd.timedelta_range(start='1 day', periods=4, closed='right')
TimedeltaIndex(['2 days', '3 days', '4 days'],
               dtype='timedelta64[ns]', freq='D')

The ``freq`` parameter specifies the frequency of the TimedeltaIndex.
Only fixed frequencies can be passed, non-fixed frequencies such as
'M' (month end) will raise.

>>> pd.timedelta_range(start='1 day', end='2 days', freq='6h')
TimedeltaIndex(['1 days 00:00:00', '1 days 06:00:00', '1 days 12:00:00',
                '1 days 18:00:00', '2 days 00:00:00'],
               dtype='timedelta64[ns]', freq='6h')

Specify ``start``, ``end``, and ``periods``; the frequency is generated
automatically (linearly spaced).

>>> pd.timedelta_range(start='1 day', end='5 days', periods=4)
TimedeltaIndex(['1 days 00:00:00', '2 days 08:00:00', '3 days 16:00:00',
                '5 days 00:00:00'],
               dtype='timedelta64[ns]', freq=None)

**Specify a unit**

>>> pd.timedelta_range("1 Day", periods=3, freq="100000D", unit="s")
TimedeltaIndex(['1 days', '100001 days', '200001 days'],
               dtype='timedelta64[s]', freq='100000D')

---
## _engine_type
```python
from timedeltas import _engine_type
```



---
## _resolution_obj
```python
from timedeltas import _resolution_obj
```



---
## __new__
```python
from timedeltas import __new__
```



---
## _is_comparable_dtype
```python
from timedeltas import _is_comparable_dtype
```

Can we compare values of the given dtype to our own?

---
## get_loc
```python
from timedeltas import get_loc
```

Get integer location for requested label

Returns
-------
loc : int, slice, or ndarray[int]

---
## _parse_with_reso
```python
from timedeltas import _parse_with_reso
```



---
## _parsed_string_to_bounds
```python
from timedeltas import _parsed_string_to_bounds
```



---
## inferred_type
```python
from timedeltas import inferred_type
```



---
## __name__
```python
from range import __name__
```



---
## RangeIndex
```python
from range import RangeIndex
```

Immutable Index implementing a monotonic integer range.

RangeIndex is a memory-saving special case of an Index limited to representing
monotonic ranges with a 64-bit dtype. Using RangeIndex may in some instances
improve computing speed.

This is the default index type used
by DataFrame and Series when no explicit index is provided by the user.

Parameters
----------
start : int (default: 0), range, or other RangeIndex instance
    If int and "stop" is not given, interpreted as "stop" instead.
stop : int (default: 0)
step : int (default: 1)
dtype : np.int64
    Unused, accepted for homogeneity with other index types.
copy : bool, default False
    Unused, accepted for homogeneity with other index types.
name : object, optional
    Name to be stored in the index.

Attributes
----------
start
stop
step

Methods
-------
from_range

See Also
--------
Index : The base pandas Index type.

Examples
--------
>>> list(pd.RangeIndex(5))
[0, 1, 2, 3, 4]

>>> list(pd.RangeIndex(-2, 4))
[-2, -1, 0, 1, 2, 3]

>>> list(pd.RangeIndex(0, 10, 2))
[0, 2, 4, 6, 8]

>>> list(pd.RangeIndex(2, -10, -3))
[2, -1, -4, -7]

>>> list(pd.RangeIndex(0))
[]

>>> list(pd.RangeIndex(1, 0))
[]

---
## _engine_type
```python
from range import _engine_type
```



---
## __new__
```python
from range import __new__
```



---
## from_range
```python
from range import from_range
```

Create :class:`pandas.RangeIndex` from a ``range`` object.

Returns
-------
RangeIndex

Examples
--------
>>> pd.RangeIndex.from_range(range(5))
RangeIndex(start=0, stop=5, step=1)

>>> pd.RangeIndex.from_range(range(2, -10, -3))
RangeIndex(start=2, stop=-10, step=-3)

---
## _simple_new
```python
from range import _simple_new
```



---
## _validate_dtype
```python
from range import _validate_dtype
```



---
## _constructor
```python
from range import _constructor
```

return the class to use for construction

---
## _data
```python
from range import _data
```

An int array that for performance reasons is created only when needed.

The constructed array is saved in ``_cache``.

---
## _get_data_as_items
```python
from range import _get_data_as_items
```

return a list of tuples of start, stop, step

---
## __reduce__
```python
from range import __reduce__
```



---
## _format_attrs
```python
from range import _format_attrs
```

Return a list of tuples of the (attr, formatted_value)

---
## _format_with_header
```python
from range import _format_with_header
```



---
## start
```python
from range import start
```

The value of the `start` parameter (``0`` if this was not supplied).

Examples
--------
>>> idx = pd.RangeIndex(5)
>>> idx.start
0

>>> idx = pd.RangeIndex(2, -10, -3)
>>> idx.start
2

---
## stop
```python
from range import stop
```

The value of the `stop` parameter.

Examples
--------
>>> idx = pd.RangeIndex(5)
>>> idx.stop
5

>>> idx = pd.RangeIndex(2, -10, -3)
>>> idx.stop
-10

---
## step
```python
from range import step
```

The value of the `step` parameter (``1`` if this was not supplied).

Examples
--------
>>> idx = pd.RangeIndex(5)
>>> idx.step
1

>>> idx = pd.RangeIndex(2, -10, -3)
>>> idx.step
-3

Even if :class:`pandas.RangeIndex` is empty, ``step`` is still ``1`` if
not supplied.

>>> idx = pd.RangeIndex(1, 0)
>>> idx.step
1

---
## nbytes
```python
from range import nbytes
```

Return the number of bytes in the underlying data.

---
## memory_usage
```python
from range import memory_usage
```

Memory usage of my values

Parameters
----------
deep : bool
    Introspect the data deeply, interrogate
    `object` dtypes for system-level memory consumption

Returns
-------
bytes used

Notes
-----
Memory usage does not include memory consumed by elements that
are not components of the array if deep=False

See Also
--------
numpy.ndarray.nbytes

---
## dtype
```python
from range import dtype
```



---
## is_unique
```python
from range import is_unique
```

return if the index has unique values

---
## is_monotonic_increasing
```python
from range import is_monotonic_increasing
```



---
## is_monotonic_decreasing
```python
from range import is_monotonic_decreasing
```



---
## __contains__
```python
from range import __contains__
```



---
## inferred_type
```python
from range import inferred_type
```



---
## get_loc
```python
from range import get_loc
```



---
## _get_indexer
```python
from range import _get_indexer
```



---
## _should_fallback_to_positional
```python
from range import _should_fallback_to_positional
```

Should an integer key be treated as positional?

---
## tolist
```python
from range import tolist
```



---
## __iter__
```python
from range import __iter__
```



---
## _shallow_copy
```python
from range import _shallow_copy
```



---
## _view
```python
from range import _view
```



---
## copy
```python
from range import copy
```



---
## _minmax
```python
from range import _minmax
```



---
## min
```python
from range import min
```

The minimum value of the RangeIndex

---
## max
```python
from range import max
```

The maximum value of the RangeIndex

---
## argsort
```python
from range import argsort
```

Returns the indices that would sort the index and its
underlying data.

Returns
-------
np.ndarray[np.intp]

See Also
--------
numpy.ndarray.argsort

---
## factorize
```python
from range import factorize
```



---
## equals
```python
from range import equals
```

Determines if two Index objects contain the same elements.

---
## sort_values
```python
from range import sort_values
```



---
## _intersection
```python
from range import _intersection
```



---
## _min_fitting_element
```python
from range import _min_fitting_element
```

Returns the smallest element greater than or equal to the limit

---
## _extended_gcd
```python
from range import _extended_gcd
```

Extended Euclidean algorithms to solve Bezout's identity:
   a*x + b*y = gcd(x, y)
Finds one particular solution for x, y: s, t
Returns: gcd, s, t

---
## _range_in_self
```python
from range import _range_in_self
```

Check if other range is contained in self

---
## _union
```python
from range import _union
```

Form the union of two Index objects and sorts if possible

Parameters
----------
other : Index or array-like

sort : bool or None, default None
    Whether to sort (monotonically increasing) the resulting index.
    ``sort=None|True`` returns a ``RangeIndex`` if possible or a sorted
    ``Index`` with a int64 dtype if not.
    ``sort=False`` can return a ``RangeIndex`` if self is monotonically
    increasing and other is fully contained in self. Otherwise, returns
    an unsorted ``Index`` with an int64 dtype.

Returns
-------
union : Index

---
## _difference
```python
from range import _difference
```



---
## symmetric_difference
```python
from range import symmetric_difference
```



---
## delete
```python
from range import delete
```



---
## insert
```python
from range import insert
```



---
## _concat
```python
from range import _concat
```

Overriding parent method for the case of all RangeIndex instances.

When all members of "indexes" are of type RangeIndex: result will be
RangeIndex if possible, Index with a int64 dtype otherwise. E.g.:
indexes = [RangeIndex(3), RangeIndex(3, 6)] -> RangeIndex(6)
indexes = [RangeIndex(3), RangeIndex(4, 6)] -> Index([0,1,2,4,5], dtype='int64')

---
## __len__
```python
from range import __len__
```

return the length of the RangeIndex

---
## size
```python
from range import size
```



---
## __getitem__
```python
from range import __getitem__
```

Conserve RangeIndex type for scalar and slice keys.

---
## _getitem_slice
```python
from range import _getitem_slice
```

Fastpath for __getitem__ when we know we have a slice.

---
## __floordiv__
```python
from range import __floordiv__
```



---
## all
```python
from range import all
```



---
## any
```python
from range import any
```



---
## _cmp_method
```python
from range import _cmp_method
```



---
## _arith_method
```python
from range import _arith_method
```

Parameters
----------
other : Any
op : callable that accepts 2 params
    perform the binary op

---
## take
```python
from range import take
```



---
## _new_DatetimeIndex
```python
from datetimes import _new_DatetimeIndex
```

This is called upon unpickling, rather than the default which doesn't
have arguments and breaks __new__

---
## DatetimeIndex
```python
from datetimes import DatetimeIndex
```

Immutable ndarray-like of datetime64 data.

Represented internally as int64, and which can be boxed to Timestamp objects
that are subclasses of datetime and carry metadata.

.. versionchanged:: 2.0.0
    The various numeric date/time attributes (:attr:`~DatetimeIndex.day`,
    :attr:`~DatetimeIndex.month`, :attr:`~DatetimeIndex.year` etc.) now have dtype
    ``int32``. Previously they had dtype ``int64``.

Parameters
----------
data : array-like (1-dimensional)
    Datetime-like data to construct index with.
freq : str or pandas offset object, optional
    One of pandas date offset strings or corresponding objects. The string
    'infer' can be passed in order to set the frequency of the index as the
    inferred frequency upon creation.
tz : pytz.timezone or dateutil.tz.tzfile or datetime.tzinfo or str
    Set the Timezone of the data.
normalize : bool, default False
    Normalize start/end dates to midnight before generating date range.

    .. deprecated:: 2.1.0

closed : {'left', 'right'}, optional
    Set whether to include `start` and `end` that are on the
    boundary. The default includes boundary points on either end.

    .. deprecated:: 2.1.0

ambiguous : 'infer', bool-ndarray, 'NaT', default 'raise'
    When clocks moved backward due to DST, ambiguous times may arise.
    For example in Central European Time (UTC+01), when going from 03:00
    DST to 02:00 non-DST, 02:30:00 local time occurs both at 00:30:00 UTC
    and at 01:30:00 UTC. In such a situation, the `ambiguous` parameter
    dictates how ambiguous times should be handled.

    - 'infer' will attempt to infer fall dst-transition hours based on
      order
    - bool-ndarray where True signifies a DST time, False signifies a
      non-DST time (note that this flag is only applicable for ambiguous
      times)
    - 'NaT' will return NaT where there are ambiguous times
    - 'raise' will raise an AmbiguousTimeError if there are ambiguous times.
dayfirst : bool, default False
    If True, parse dates in `data` with the day first order.
yearfirst : bool, default False
    If True parse dates in `data` with the year first order.
dtype : numpy.dtype or DatetimeTZDtype or str, default None
    Note that the only NumPy dtype allowed is `datetime64[ns]`.
copy : bool, default False
    Make a copy of input ndarray.
name : label, default None
    Name to be stored in the index.

Attributes
----------
year
month
day
hour
minute
second
microsecond
nanosecond
date
time
timetz
dayofyear
day_of_year
dayofweek
day_of_week
weekday
quarter
tz
freq
freqstr
is_month_start
is_month_end
is_quarter_start
is_quarter_end
is_year_start
is_year_end
is_leap_year
inferred_freq

Methods
-------
normalize
strftime
snap
tz_convert
tz_localize
round
floor
ceil
to_period
to_pydatetime
to_series
to_frame
month_name
day_name
mean
std

See Also
--------
Index : The base pandas Index type.
TimedeltaIndex : Index of timedelta64 data.
PeriodIndex : Index of Period data.
to_datetime : Convert argument to datetime.
date_range : Create a fixed-frequency DatetimeIndex.

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
>>> idx = pd.DatetimeIndex(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> idx
DatetimeIndex(['2020-01-01 10:00:00+00:00', '2020-02-01 11:00:00+00:00'],
dtype='datetime64[ns, UTC]', freq=None)

---
## date_range
```python
from datetimes import date_range
```

Return a fixed frequency DatetimeIndex.

Returns the range of equally spaced time points (where the difference between any
two adjacent points is specified by the given frequency) such that they all
satisfy `start <[=] x <[=] end`, where the first one and the last one are, resp.,
the first and last time points in that range that fall on the boundary of ``freq``
(if given as a frequency string) or that are valid for ``freq`` (if given as a
:class:`pandas.tseries.offsets.DateOffset`). (If exactly one of ``start``,
``end``, or ``freq`` is *not* specified, this missing parameter can be computed
given ``periods``, the number of timesteps in the range. See the note below.)

Parameters
----------
start : str or datetime-like, optional
    Left bound for generating dates.
end : str or datetime-like, optional
    Right bound for generating dates.
periods : int, optional
    Number of periods to generate.
freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'D'
    Frequency strings can have multiples, e.g. '5h'. See
    :ref:`here <timeseries.offset_aliases>` for a list of
    frequency aliases.
tz : str or tzinfo, optional
    Time zone name for returning localized DatetimeIndex, for example
    'Asia/Hong_Kong'. By default, the resulting DatetimeIndex is
    timezone-naive unless timezone-aware datetime-likes are passed.
normalize : bool, default False
    Normalize start/end dates to midnight before generating date range.
name : str, default None
    Name of the resulting DatetimeIndex.
inclusive : {"both", "neither", "left", "right"}, default "both"
    Include boundaries; Whether to set each bound as closed or open.

    .. versionadded:: 1.4.0
unit : str, default None
    Specify the desired resolution of the result.

    .. versionadded:: 2.0.0
**kwargs
    For compatibility. Has no effect on the result.

Returns
-------
DatetimeIndex

See Also
--------
DatetimeIndex : An immutable container for datetimes.
timedelta_range : Return a fixed frequency TimedeltaIndex.
period_range : Return a fixed frequency PeriodIndex.
interval_range : Return a fixed frequency IntervalIndex.

Notes
-----
Of the four parameters ``start``, ``end``, ``periods``, and ``freq``,
exactly three must be specified. If ``freq`` is omitted, the resulting
``DatetimeIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end`` (closed on both sides).

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
**Specifying the values**

The next four examples generate the same `DatetimeIndex`, but vary
the combination of `start`, `end` and `periods`.

Specify `start` and `end`, with the default daily frequency.

>>> pd.date_range(start='1/1/2018', end='1/08/2018')
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04',
               '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'],
              dtype='datetime64[ns]', freq='D')

Specify timezone-aware `start` and `end`, with the default daily frequency.

>>> pd.date_range(
...     start=pd.to_datetime("1/1/2018").tz_localize("Europe/Berlin"),
...     end=pd.to_datetime("1/08/2018").tz_localize("Europe/Berlin"),
... )
DatetimeIndex(['2018-01-01 00:00:00+01:00', '2018-01-02 00:00:00+01:00',
               '2018-01-03 00:00:00+01:00', '2018-01-04 00:00:00+01:00',
               '2018-01-05 00:00:00+01:00', '2018-01-06 00:00:00+01:00',
               '2018-01-07 00:00:00+01:00', '2018-01-08 00:00:00+01:00'],
              dtype='datetime64[ns, Europe/Berlin]', freq='D')

Specify `start` and `periods`, the number of periods (days).

>>> pd.date_range(start='1/1/2018', periods=8)
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04',
               '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'],
              dtype='datetime64[ns]', freq='D')

Specify `end` and `periods`, the number of periods (days).

>>> pd.date_range(end='1/1/2018', periods=8)
DatetimeIndex(['2017-12-25', '2017-12-26', '2017-12-27', '2017-12-28',
               '2017-12-29', '2017-12-30', '2017-12-31', '2018-01-01'],
              dtype='datetime64[ns]', freq='D')

Specify `start`, `end`, and `periods`; the frequency is generated
automatically (linearly spaced).

>>> pd.date_range(start='2018-04-24', end='2018-04-27', periods=3)
DatetimeIndex(['2018-04-24 00:00:00', '2018-04-25 12:00:00',
               '2018-04-27 00:00:00'],
              dtype='datetime64[ns]', freq=None)

**Other Parameters**

Changed the `freq` (frequency) to ``'ME'`` (month end frequency).

>>> pd.date_range(start='1/1/2018', periods=5, freq='ME')
DatetimeIndex(['2018-01-31', '2018-02-28', '2018-03-31', '2018-04-30',
               '2018-05-31'],
              dtype='datetime64[ns]', freq='ME')

Multiples are allowed

>>> pd.date_range(start='1/1/2018', periods=5, freq='3ME')
DatetimeIndex(['2018-01-31', '2018-04-30', '2018-07-31', '2018-10-31',
               '2019-01-31'],
              dtype='datetime64[ns]', freq='3ME')

`freq` can also be specified as an Offset object.

>>> pd.date_range(start='1/1/2018', periods=5, freq=pd.offsets.MonthEnd(3))
DatetimeIndex(['2018-01-31', '2018-04-30', '2018-07-31', '2018-10-31',
               '2019-01-31'],
              dtype='datetime64[ns]', freq='3ME')

Specify `tz` to set the timezone.

>>> pd.date_range(start='1/1/2018', periods=5, tz='Asia/Tokyo')
DatetimeIndex(['2018-01-01 00:00:00+09:00', '2018-01-02 00:00:00+09:00',
               '2018-01-03 00:00:00+09:00', '2018-01-04 00:00:00+09:00',
               '2018-01-05 00:00:00+09:00'],
              dtype='datetime64[ns, Asia/Tokyo]', freq='D')

`inclusive` controls whether to include `start` and `end` that are on the
boundary. The default, "both", includes boundary points on either end.

>>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive="both")
DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03', '2017-01-04'],
              dtype='datetime64[ns]', freq='D')

Use ``inclusive='left'`` to exclude `end` if it falls on the boundary.

>>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive='left')
DatetimeIndex(['2017-01-01', '2017-01-02', '2017-01-03'],
              dtype='datetime64[ns]', freq='D')

Use ``inclusive='right'`` to exclude `start` if it falls on the boundary, and
similarly ``inclusive='neither'`` will exclude both `start` and `end`.

>>> pd.date_range(start='2017-01-01', end='2017-01-04', inclusive='right')
DatetimeIndex(['2017-01-02', '2017-01-03', '2017-01-04'],
              dtype='datetime64[ns]', freq='D')

**Specify a unit**

>>> pd.date_range(start="2017-01-01", periods=10, freq="100YS", unit="s")
DatetimeIndex(['2017-01-01', '2117-01-01', '2217-01-01', '2317-01-01',
               '2417-01-01', '2517-01-01', '2617-01-01', '2717-01-01',
               '2817-01-01', '2917-01-01'],
              dtype='datetime64[s]', freq='100YS-JAN')

---
## bdate_range
```python
from datetimes import bdate_range
```

Return a fixed frequency DatetimeIndex with business day as the default.

Parameters
----------
start : str or datetime-like, default None
    Left bound for generating dates.
end : str or datetime-like, default None
    Right bound for generating dates.
periods : int, default None
    Number of periods to generate.
freq : str, Timedelta, datetime.timedelta, or DateOffset, default 'B'
    Frequency strings can have multiples, e.g. '5h'. The default is
    business daily ('B').
tz : str or None
    Time zone name for returning localized DatetimeIndex, for example
    Asia/Beijing.
normalize : bool, default False
    Normalize start/end dates to midnight before generating date range.
name : str, default None
    Name of the resulting DatetimeIndex.
weekmask : str or None, default None
    Weekmask of valid business days, passed to ``numpy.busdaycalendar``,
    only used when custom frequency strings are passed.  The default
    value None is equivalent to 'Mon Tue Wed Thu Fri'.
holidays : list-like or None, default None
    Dates to exclude from the set of valid business days, passed to
    ``numpy.busdaycalendar``, only used when custom frequency strings
    are passed.
inclusive : {"both", "neither", "left", "right"}, default "both"
    Include boundaries; Whether to set each bound as closed or open.

    .. versionadded:: 1.4.0
**kwargs
    For compatibility. Has no effect on the result.

Returns
-------
DatetimeIndex

Notes
-----
Of the four parameters: ``start``, ``end``, ``periods``, and ``freq``,
exactly three must be specified.  Specifying ``freq`` is a requirement
for ``bdate_range``.  Use ``date_range`` if specifying ``freq`` is not
desired.

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
Note how the two weekend days are skipped in the result.

>>> pd.bdate_range(start='1/1/2018', end='1/08/2018')
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04',
           '2018-01-05', '2018-01-08'],
          dtype='datetime64[ns]', freq='B')

---
## _time_to_micros
```python
from datetimes import _time_to_micros
```



---
## _engine_type
```python
from datetimes import _engine_type
```



---
## strftime
```python
from datetimes import strftime
```



---
## __new__
```python
from datetimes import __new__
```



---
## _is_dates_only
```python
from datetimes import _is_dates_only
```

Return a boolean if we are only dates (and don't have a timezone)

Returns
-------
bool

---
## __reduce__
```python
from datetimes import __reduce__
```



---
## _is_comparable_dtype
```python
from datetimes import _is_comparable_dtype
```

Can we compare values of the given dtype to our own?

---
## _formatter_func
```python
from datetimes import _formatter_func
```



---
## _can_range_setop
```python
from datetimes import _can_range_setop
```



---
## _get_time_micros
```python
from datetimes import _get_time_micros
```

Return the number of microseconds since midnight.

Returns
-------
ndarray[int64_t]

---
## snap
```python
from datetimes import snap
```

Snap time stamps to nearest occurring frequency.

Returns
-------
DatetimeIndex

Examples
--------
>>> idx = pd.DatetimeIndex(['2023-01-01', '2023-01-02',
...                        '2023-02-01', '2023-02-02'])
>>> idx
DatetimeIndex(['2023-01-01', '2023-01-02', '2023-02-01', '2023-02-02'],
dtype='datetime64[ns]', freq=None)
>>> idx.snap('MS')
DatetimeIndex(['2023-01-01', '2023-01-01', '2023-02-01', '2023-02-01'],
dtype='datetime64[ns]', freq=None)

---
## _parsed_string_to_bounds
```python
from datetimes import _parsed_string_to_bounds
```

Calculate datetime bounds for parsed time string and its resolution.

Parameters
----------
reso : Resolution
    Resolution provided by parsed string.
parsed : datetime
    Datetime from parsed string.

Returns
-------
lower, upper: pd.Timestamp

---
## _parse_with_reso
```python
from datetimes import _parse_with_reso
```



---
## _disallow_mismatched_indexing
```python
from datetimes import _disallow_mismatched_indexing
```

Check for mismatched-tzawareness indexing and re-raise as KeyError.

---
## get_loc
```python
from datetimes import get_loc
```

Get integer location for requested label

Returns
-------
loc : int

---
## _maybe_cast_slice_bound
```python
from datetimes import _maybe_cast_slice_bound
```



---
## slice_indexer
```python
from datetimes import slice_indexer
```

Return indexer for specified label slice.
Index.slice_indexer, customized to handle time slicing.

In addition to functionality provided by Index.slice_indexer, does the
following:

- if both `start` and `end` are instances of `datetime.time`, it
  invokes `indexer_between_time`
- if `start` and `end` are both either string or None perform
  value-based selection in non-monotonic cases.

---
## inferred_type
```python
from datetimes import inferred_type
```



---
## indexer_at_time
```python
from datetimes import indexer_at_time
```

Return index locations of values at particular time of day.

Parameters
----------
time : datetime.time or str
    Time passed in either as object (datetime.time) or as string in
    appropriate format ("%H:%M", "%H%M", "%I:%M%p", "%I%M%p",
    "%H:%M:%S", "%H%M%S", "%I:%M:%S%p", "%I%M%S%p").

Returns
-------
np.ndarray[np.intp]

See Also
--------
indexer_between_time : Get index locations of values between particular
    times of day.
DataFrame.at_time : Select values at particular time of day.

Examples
--------
>>> idx = pd.DatetimeIndex(["1/1/2020 10:00", "2/1/2020 11:00",
...                         "3/1/2020 10:00"])
>>> idx.indexer_at_time("10:00")
array([0, 2])

---
## indexer_between_time
```python
from datetimes import indexer_between_time
```

Return index locations of values between particular times of day.

Parameters
----------
start_time, end_time : datetime.time, str
    Time passed either as object (datetime.time) or as string in
    appropriate format ("%H:%M", "%H%M", "%I:%M%p", "%I%M%p",
    "%H:%M:%S", "%H%M%S", "%I:%M:%S%p","%I%M%S%p").
include_start : bool, default True
include_end : bool, default True

Returns
-------
np.ndarray[np.intp]

See Also
--------
indexer_at_time : Get index locations of values at particular time of day.
DataFrame.between_time : Select values between particular times of day.

Examples
--------
>>> idx = pd.date_range("2023-01-01", periods=4, freq="h")
>>> idx
DatetimeIndex(['2023-01-01 00:00:00', '2023-01-01 01:00:00',
                   '2023-01-01 02:00:00', '2023-01-01 03:00:00'],
                  dtype='datetime64[ns]', freq='h')
>>> idx.indexer_between_time("00:00", "2:00", include_end=False)
array([0, 1])

---
## check_str_or_none
```python
from datetimes import check_str_or_none
```



---
## __name__
```python
from multi import __name__
```



---
## MultiIndexUIntEngine
```python
from multi import MultiIndexUIntEngine
```

This class manages a MultiIndex by mapping label combinations to positive
integers.

---
## MultiIndexPyIntEngine
```python
from multi import MultiIndexPyIntEngine
```

This class manages those (extreme) cases in which the number of possible
label combinations overflows the 64 bits integers, and uses an ObjectEngine
containing Python integers.

---
## names_compat
```python
from multi import names_compat
```

A decorator to allow either `name` or `names` keyword but not both.

This makes it easier to share code with base class.

---
## MultiIndex
```python
from multi import MultiIndex
```

A multi-level, or hierarchical, index object for pandas objects.

Parameters
----------
levels : sequence of arrays
    The unique labels for each level.
codes : sequence of arrays
    Integers for each level designating which label at each location.
sortorder : optional int
    Level of sortedness (must be lexicographically sorted by that
    level).
names : optional sequence of objects
    Names for each of the index levels. (name is accepted for compat).
copy : bool, default False
    Copy the meta-data.
verify_integrity : bool, default True
    Check that the levels/codes are consistent and valid.

Attributes
----------
names
levels
codes
nlevels
levshape
dtypes

Methods
-------
from_arrays
from_tuples
from_product
from_frame
set_levels
set_codes
to_frame
to_flat_index
sortlevel
droplevel
swaplevel
reorder_levels
remove_unused_levels
get_level_values
get_indexer
get_loc
get_locs
get_loc_level
drop

See Also
--------
MultiIndex.from_arrays  : Convert list of arrays to MultiIndex.
MultiIndex.from_product : Create a MultiIndex from the cartesian product
                          of iterables.
MultiIndex.from_tuples  : Convert list of tuples to a MultiIndex.
MultiIndex.from_frame   : Make a MultiIndex from a DataFrame.
Index : The base pandas Index type.

Notes
-----
See the `user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html>`__
for more.

Examples
--------
A new ``MultiIndex`` is typically constructed using one of the helper
methods :meth:`MultiIndex.from_arrays`, :meth:`MultiIndex.from_product`
and :meth:`MultiIndex.from_tuples`. For example (using ``.from_arrays``):

>>> arrays = [[1, 1, 2, 2], ['red', 'blue', 'red', 'blue']]
>>> pd.MultiIndex.from_arrays(arrays, names=('number', 'color'))
MultiIndex([(1,  'red'),
            (1, 'blue'),
            (2,  'red'),
            (2, 'blue')],
           names=['number', 'color'])

See further examples for how to construct a MultiIndex in the doc strings
of the mentioned helper methods.

---
## _lexsort_depth
```python
from multi import _lexsort_depth
```

Compute and return the lexsort_depth, the number of levels of the
MultiIndex that are sorted lexically

Returns
-------
int

---
## sparsify_labels
```python
from multi import sparsify_labels
```



---
## _get_na_rep
```python
from multi import _get_na_rep
```



---
## maybe_droplevels
```python
from multi import maybe_droplevels
```

Attempt to drop level or levels from the given index.

Parameters
----------
index: Index
key : scalar or tuple

Returns
-------
Index

---
## _coerce_indexer_frozen
```python
from multi import _coerce_indexer_frozen
```

Coerce the array-like indexer to the smallest integer dtype that can encode all
of the given categories.

Parameters
----------
array_like : array-like
categories : array-like
copy : bool

Returns
-------
np.ndarray
    Non-writeable.

---
## _require_listlike
```python
from multi import _require_listlike
```

Ensure that level is either None or listlike, and arr is list-of-listlike.

---
## _codes_to_ints
```python
from multi import _codes_to_ints
```

Transform combination(s) of uint64 in one Python integer (each), in a
strictly monotonic way (i.e. respecting the lexicographic order of
integer combinations): see BaseMultiIndexCodesEngine documentation.

Parameters
----------
codes : 1- or 2-dimensional array of dtype uint64
    Combinations of integers (one per row)

Returns
-------
int, or 1-dimensional array of dtype object
    Integer(s) representing one combination (each).

---
## new_meth
```python
from multi import new_meth
```



---
## __new__
```python
from multi import __new__
```



---
## _validate_codes
```python
from multi import _validate_codes
```

Reassign code values as -1 if their corresponding levels are NaN.

Parameters
----------
code : list
    Code to reassign.
level : list
    Level to check for missing values (NaN, NaT, None).

Returns
-------
new code where code value = -1 if it corresponds
to a level with missing values (NaN, NaT, None).

---
## _verify_integrity
```python
from multi import _verify_integrity
```

Parameters
----------
codes : optional list
    Codes to check for validity. Defaults to current codes.
levels : optional list
    Levels to check for validity. Defaults to current levels.
levels_to_validate: optional list
    Specifies the levels to verify.

Raises
------
ValueError
    If length of levels and codes don't match, if the codes for any
    level would exceed level bounds, or there are any duplicate levels.

Returns
-------
new codes where code value = -1 if it corresponds to a
NaN level.

---
## from_arrays
```python
from multi import from_arrays
```

Convert arrays to MultiIndex.

Parameters
----------
arrays : list / sequence of array-likes
    Each array-like gives one level's value for each data point.
    len(arrays) is the number of levels.
sortorder : int or None
    Level of sortedness (must be lexicographically sorted by that
    level).
names : list / sequence of str, optional
    Names for the levels in the index.

Returns
-------
MultiIndex

See Also
--------
MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
MultiIndex.from_product : Make a MultiIndex from cartesian product
                          of iterables.
MultiIndex.from_frame : Make a MultiIndex from a DataFrame.

Examples
--------
>>> arrays = [[1, 1, 2, 2], ['red', 'blue', 'red', 'blue']]
>>> pd.MultiIndex.from_arrays(arrays, names=('number', 'color'))
MultiIndex([(1,  'red'),
            (1, 'blue'),
            (2,  'red'),
            (2, 'blue')],
           names=['number', 'color'])

---
## from_tuples
```python
from multi import from_tuples
```

Convert list of tuples to MultiIndex.

Parameters
----------
tuples : list / sequence of tuple-likes
    Each tuple is the index of one row/column.
sortorder : int or None
    Level of sortedness (must be lexicographically sorted by that
    level).
names : list / sequence of str, optional
    Names for the levels in the index.

Returns
-------
MultiIndex

See Also
--------
MultiIndex.from_arrays : Convert list of arrays to MultiIndex.
MultiIndex.from_product : Make a MultiIndex from cartesian product
                          of iterables.
MultiIndex.from_frame : Make a MultiIndex from a DataFrame.

Examples
--------
>>> tuples = [(1, 'red'), (1, 'blue'),
...           (2, 'red'), (2, 'blue')]
>>> pd.MultiIndex.from_tuples(tuples, names=('number', 'color'))
MultiIndex([(1,  'red'),
            (1, 'blue'),
            (2,  'red'),
            (2, 'blue')],
           names=['number', 'color'])

---
## from_product
```python
from multi import from_product
```

Make a MultiIndex from the cartesian product of multiple iterables.

Parameters
----------
iterables : list / sequence of iterables
    Each iterable has unique labels for each level of the index.
sortorder : int or None
    Level of sortedness (must be lexicographically sorted by that
    level).
names : list / sequence of str, optional
    Names for the levels in the index.
    If not explicitly provided, names will be inferred from the
    elements of iterables if an element has a name attribute.

Returns
-------
MultiIndex

See Also
--------
MultiIndex.from_arrays : Convert list of arrays to MultiIndex.
MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
MultiIndex.from_frame : Make a MultiIndex from a DataFrame.

Examples
--------
>>> numbers = [0, 1, 2]
>>> colors = ['green', 'purple']
>>> pd.MultiIndex.from_product([numbers, colors],
...                            names=['number', 'color'])
MultiIndex([(0,  'green'),
            (0, 'purple'),
            (1,  'green'),
            (1, 'purple'),
            (2,  'green'),
            (2, 'purple')],
           names=['number', 'color'])

---
## from_frame
```python
from multi import from_frame
```

Make a MultiIndex from a DataFrame.

Parameters
----------
df : DataFrame
    DataFrame to be converted to MultiIndex.
sortorder : int, optional
    Level of sortedness (must be lexicographically sorted by that
    level).
names : list-like, optional
    If no names are provided, use the column names, or tuple of column
    names if the columns is a MultiIndex. If a sequence, overwrite
    names with the given sequence.

Returns
-------
MultiIndex
    The MultiIndex representation of the given DataFrame.

See Also
--------
MultiIndex.from_arrays : Convert list of arrays to MultiIndex.
MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
MultiIndex.from_product : Make a MultiIndex from cartesian product
                          of iterables.

Examples
--------
>>> df = pd.DataFrame([['HI', 'Temp'], ['HI', 'Precip'],
...                    ['NJ', 'Temp'], ['NJ', 'Precip']],
...                   columns=['a', 'b'])
>>> df
      a       b
0    HI    Temp
1    HI  Precip
2    NJ    Temp
3    NJ  Precip

>>> pd.MultiIndex.from_frame(df)
MultiIndex([('HI',   'Temp'),
            ('HI', 'Precip'),
            ('NJ',   'Temp'),
            ('NJ', 'Precip')],
           names=['a', 'b'])

Using explicit names, instead of the column names

>>> pd.MultiIndex.from_frame(df, names=['state', 'observation'])
MultiIndex([('HI',   'Temp'),
            ('HI', 'Precip'),
            ('NJ',   'Temp'),
            ('NJ', 'Precip')],
           names=['state', 'observation'])

---
## _values
```python
from multi import _values
```



---
## values
```python
from multi import values
```



---
## array
```python
from multi import array
```

Raises a ValueError for `MultiIndex` because there's no single
array backing a MultiIndex.

Raises
------
ValueError

---
## dtypes
```python
from multi import dtypes
```

Return the dtypes as a Series for the underlying MultiIndex.

Examples
--------
>>> idx = pd.MultiIndex.from_product([(0, 1, 2), ('green', 'purple')],
...                                  names=['number', 'color'])
>>> idx
MultiIndex([(0,  'green'),
            (0, 'purple'),
            (1,  'green'),
            (1, 'purple'),
            (2,  'green'),
            (2, 'purple')],
           names=['number', 'color'])
>>> idx.dtypes
number     int64
color     object
dtype: object

---
## __len__
```python
from multi import __len__
```



---
## size
```python
from multi import size
```

Return the number of elements in the underlying data.

---
## levels
```python
from multi import levels
```

Levels of the MultiIndex.

Levels refer to the different hierarchical levels or layers in a MultiIndex.
In a MultiIndex, each level represents a distinct dimension or category of
the index.

To access the levels, you can use the levels attribute of the MultiIndex,
which returns a tuple of Index objects. Each Index object represents a
level in the MultiIndex and contains the unique values found in that
specific level.

If a MultiIndex is created with levels A, B, C, and the DataFrame using
it filters out all rows of the level C, MultiIndex.levels will still
return A, B, C.

Examples
--------
>>> index = pd.MultiIndex.from_product([['mammal'],
...                                     ('goat', 'human', 'cat', 'dog')],
...                                    names=['Category', 'Animals'])
>>> leg_num = pd.DataFrame(data=(4, 2, 4, 4), index=index, columns=['Legs'])
>>> leg_num
                  Legs
Category Animals
mammal   goat        4
         human       2
         cat         4
         dog         4

>>> leg_num.index.levels
FrozenList([['mammal'], ['cat', 'dog', 'goat', 'human']])

MultiIndex levels will not change even if the DataFrame using the MultiIndex
does not contain all them anymore.
See how "human" is not in the DataFrame, but it is still in levels:

>>> large_leg_num = leg_num[leg_num.Legs > 2]
>>> large_leg_num
                  Legs
Category Animals
mammal   goat        4
         cat         4
         dog         4

>>> large_leg_num.index.levels
FrozenList([['mammal'], ['cat', 'dog', 'goat', 'human']])

---
## _set_levels
```python
from multi import _set_levels
```



---
## set_levels
```python
from multi import set_levels
```

Set new levels on MultiIndex. Defaults to returning new index.

Parameters
----------
levels : sequence or list of sequence
    New level(s) to apply.
level : int, level name, or sequence of int/level names (default None)
    Level(s) to set (None for all levels).
verify_integrity : bool, default True
    If True, checks that levels and codes are compatible.

Returns
-------
MultiIndex

Examples
--------
>>> idx = pd.MultiIndex.from_tuples(
...     [
...         (1, "one"),
...         (1, "two"),
...         (2, "one"),
...         (2, "two"),
...         (3, "one"),
...         (3, "two")
...     ],
...     names=["foo", "bar"]
... )
>>> idx
MultiIndex([(1, 'one'),
    (1, 'two'),
    (2, 'one'),
    (2, 'two'),
    (3, 'one'),
    (3, 'two')],
   names=['foo', 'bar'])

>>> idx.set_levels([['a', 'b', 'c'], [1, 2]])
MultiIndex([('a', 1),
            ('a', 2),
            ('b', 1),
            ('b', 2),
            ('c', 1),
            ('c', 2)],
           names=['foo', 'bar'])
>>> idx.set_levels(['a', 'b', 'c'], level=0)
MultiIndex([('a', 'one'),
            ('a', 'two'),
            ('b', 'one'),
            ('b', 'two'),
            ('c', 'one'),
            ('c', 'two')],
           names=['foo', 'bar'])
>>> idx.set_levels(['a', 'b'], level='bar')
MultiIndex([(1, 'a'),
            (1, 'b'),
            (2, 'a'),
            (2, 'b'),
            (3, 'a'),
            (3, 'b')],
           names=['foo', 'bar'])

If any of the levels passed to ``set_levels()`` exceeds the
existing length, all of the values from that argument will
be stored in the MultiIndex levels, though the values will
be truncated in the MultiIndex output.

>>> idx.set_levels([['a', 'b', 'c'], [1, 2, 3, 4]], level=[0, 1])
MultiIndex([('a', 1),
    ('a', 2),
    ('b', 1),
    ('b', 2),
    ('c', 1),
    ('c', 2)],
   names=['foo', 'bar'])
>>> idx.set_levels([['a', 'b', 'c'], [1, 2, 3, 4]], level=[0, 1]).levels
FrozenList([['a', 'b', 'c'], [1, 2, 3, 4]])

---
## nlevels
```python
from multi import nlevels
```

Integer number of levels in this MultiIndex.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b'], ['c']])
>>> mi
MultiIndex([('a', 'b', 'c')],
           )
>>> mi.nlevels
3

---
## levshape
```python
from multi import levshape
```

A tuple with the length of each level.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b'], ['c']])
>>> mi
MultiIndex([('a', 'b', 'c')],
           )
>>> mi.levshape
(1, 1, 1)

---
## codes
```python
from multi import codes
```



---
## _set_codes
```python
from multi import _set_codes
```



---
## set_codes
```python
from multi import set_codes
```

Set new codes on MultiIndex. Defaults to returning new index.

Parameters
----------
codes : sequence or list of sequence
    New codes to apply.
level : int, level name, or sequence of int/level names (default None)
    Level(s) to set (None for all levels).
verify_integrity : bool, default True
    If True, checks that levels and codes are compatible.

Returns
-------
new index (of same type and class...etc) or None
    The same type as the caller or None if ``inplace=True``.

Examples
--------
>>> idx = pd.MultiIndex.from_tuples(
...     [(1, "one"), (1, "two"), (2, "one"), (2, "two")], names=["foo", "bar"]
... )
>>> idx
MultiIndex([(1, 'one'),
    (1, 'two'),
    (2, 'one'),
    (2, 'two')],
   names=['foo', 'bar'])

>>> idx.set_codes([[1, 0, 1, 0], [0, 0, 1, 1]])
MultiIndex([(2, 'one'),
            (1, 'one'),
            (2, 'two'),
            (1, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([1, 0, 1, 0], level=0)
MultiIndex([(2, 'one'),
            (1, 'two'),
            (2, 'one'),
            (1, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([0, 0, 1, 1], level='bar')
MultiIndex([(1, 'one'),
            (1, 'one'),
            (2, 'two'),
            (2, 'two')],
           names=['foo', 'bar'])
>>> idx.set_codes([[1, 0, 1, 0], [0, 0, 1, 1]], level=[0, 1])
MultiIndex([(2, 'one'),
            (1, 'one'),
            (2, 'two'),
            (1, 'two')],
           names=['foo', 'bar'])

---
## _engine
```python
from multi import _engine
```



---
## _constructor
```python
from multi import _constructor
```



---
## _shallow_copy
```python
from multi import _shallow_copy
```



---
## _view
```python
from multi import _view
```



---
## copy
```python
from multi import copy
```

Make a copy of this object.

Names, dtype, levels and codes can be passed and will be set on new copy.

Parameters
----------
names : sequence, optional
deep : bool, default False
name : Label
    Kept for compatibility with 1-dimensional Index. Should not be used.

Returns
-------
MultiIndex

Notes
-----
In most cases, there should be no functional difference from using
``deep``, but if ``deep`` is passed it will attempt to deepcopy.
This could be potentially expensive on large MultiIndex objects.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b'], ['c']])
>>> mi
MultiIndex([('a', 'b', 'c')],
           )
>>> mi.copy()
MultiIndex([('a', 'b', 'c')],
           )

---
## __array__
```python
from multi import __array__
```

the array interface, return my values

---
## view
```python
from multi import view
```

this is defined as a copy with the same identity

---
## __contains__
```python
from multi import __contains__
```



---
## dtype
```python
from multi import dtype
```



---
## _is_memory_usage_qualified
```python
from multi import _is_memory_usage_qualified
```

return a boolean if we need a qualified .info display

---
## memory_usage
```python
from multi import memory_usage
```



---
## nbytes
```python
from multi import nbytes
```

return the number of bytes in the underlying data

---
## _nbytes
```python
from multi import _nbytes
```

return the number of bytes in the underlying data
deeply introspect the level data if deep=True

include the engine hashtable

*this is in internal routine*

---
## _formatter_func
```python
from multi import _formatter_func
```

Formats each item in tup according to its level's formatter function.

---
## _get_values_for_csv
```python
from multi import _get_values_for_csv
```



---
## format
```python
from multi import format
```



---
## _format_multi
```python
from multi import _format_multi
```



---
## _get_names
```python
from multi import _get_names
```



---
## _set_names
```python
from multi import _set_names
```

Set new names on index. Each name has to be a hashable type.

Parameters
----------
values : str or sequence
    name(s) to set
level : int, level name, or sequence of int/level names (default None)
    If the index is a MultiIndex (hierarchical), level(s) to set (None
    for all levels).  Otherwise level must be None
validate : bool, default True
    validate that the names match level lengths

Raises
------
TypeError if each name is not hashable.

Notes
-----
sets names on levels. WARNING: mutates!

Note that you generally want to set this *after* changing levels, so
that it only acts on copies

---
## inferred_type
```python
from multi import inferred_type
```



---
## _get_level_number
```python
from multi import _get_level_number
```



---
## is_monotonic_increasing
```python
from multi import is_monotonic_increasing
```

Return a boolean if the values are equal or increasing.

---
## is_monotonic_decreasing
```python
from multi import is_monotonic_decreasing
```

Return a boolean if the values are equal or decreasing.

---
## _inferred_type_levels
```python
from multi import _inferred_type_levels
```

return a list of the inferred types, one for each level

---
## duplicated
```python
from multi import duplicated
```



---
## fillna
```python
from multi import fillna
```

fillna is not implemented for MultiIndex

---
## dropna
```python
from multi import dropna
```



---
## _get_level_values
```python
from multi import _get_level_values
```

Return vector of label values for requested level,
equal to the length of the index

**this is an internal method**

Parameters
----------
level : int
unique : bool, default False
    if True, drop duplicated values

Returns
-------
Index

---
## get_level_values
```python
from multi import get_level_values
```

Return vector of label values for requested level.

Length of returned vector is equal to the length of the index.

Parameters
----------
level : int or str
    ``level`` is either the integer position of the level in the
    MultiIndex, or the name of the level.

Returns
-------
Index
    Values is a level of this MultiIndex converted to
    a single :class:`Index` (or subclass thereof).

Notes
-----
If the level contains missing values, the result may be casted to
``float`` with missing values specified as ``NaN``. This is because
the level is converted to a regular ``Index``.

Examples
--------
Create a MultiIndex:

>>> mi = pd.MultiIndex.from_arrays((list('abc'), list('def')))
>>> mi.names = ['level_1', 'level_2']

Get level values by supplying level as either integer or name:

>>> mi.get_level_values(0)
Index(['a', 'b', 'c'], dtype='object', name='level_1')
>>> mi.get_level_values('level_2')
Index(['d', 'e', 'f'], dtype='object', name='level_2')

If a level contains missing values, the return type of the level
may be cast to ``float``.

>>> pd.MultiIndex.from_arrays([[1, None, 2], [3, 4, 5]]).dtypes
level_0    int64
level_1    int64
dtype: object
>>> pd.MultiIndex.from_arrays([[1, None, 2], [3, 4, 5]]).get_level_values(0)
Index([1.0, nan, 2.0], dtype='float64')

---
## unique
```python
from multi import unique
```



---
## to_frame
```python
from multi import to_frame
```

Create a DataFrame with the levels of the MultiIndex as columns.

Column ordering is determined by the DataFrame constructor with data as
a dict.

Parameters
----------
index : bool, default True
    Set the index of the returned DataFrame as the original MultiIndex.

name : list / sequence of str, optional
    The passed names should substitute index level names.

allow_duplicates : bool, optional default False
    Allow duplicate column labels to be created.

    .. versionadded:: 1.5.0

Returns
-------
DataFrame

See Also
--------
DataFrame : Two-dimensional, size-mutable, potentially heterogeneous
    tabular data.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a', 'b'], ['c', 'd']])
>>> mi
MultiIndex([('a', 'c'),
            ('b', 'd')],
           )

>>> df = mi.to_frame()
>>> df
     0  1
a c  a  c
b d  b  d

>>> df = mi.to_frame(index=False)
>>> df
   0  1
0  a  c
1  b  d

>>> df = mi.to_frame(name=['x', 'y'])
>>> df
     x  y
a c  a  c
b d  b  d

---
## to_flat_index
```python
from multi import to_flat_index
```

Convert a MultiIndex to an Index of Tuples containing the level values.

Returns
-------
pd.Index
    Index with the MultiIndex data represented in Tuples.

See Also
--------
MultiIndex.from_tuples : Convert flat index back to MultiIndex.

Notes
-----
This method will simply return the caller if called by anything other
than a MultiIndex.

Examples
--------
>>> index = pd.MultiIndex.from_product(
...     [['foo', 'bar'], ['baz', 'qux']],
...     names=['a', 'b'])
>>> index.to_flat_index()
Index([('foo', 'baz'), ('foo', 'qux'),
       ('bar', 'baz'), ('bar', 'qux')],
      dtype='object')

---
## _is_lexsorted
```python
from multi import _is_lexsorted
```

Return True if the codes are lexicographically sorted.

Returns
-------
bool

Examples
--------
In the below examples, the first level of the MultiIndex is sorted because
a<b<c, so there is no need to look at the next level.

>>> pd.MultiIndex.from_arrays([['a', 'b', 'c'],
...                            ['d', 'e', 'f']])._is_lexsorted()
True
>>> pd.MultiIndex.from_arrays([['a', 'b', 'c'],
...                            ['d', 'f', 'e']])._is_lexsorted()
True

In case there is a tie, the lexicographical sorting looks
at the next level of the MultiIndex.

>>> pd.MultiIndex.from_arrays([[0, 1, 1], ['a', 'b', 'c']])._is_lexsorted()
True
>>> pd.MultiIndex.from_arrays([[0, 1, 1], ['a', 'c', 'b']])._is_lexsorted()
False
>>> pd.MultiIndex.from_arrays([['a', 'a', 'b', 'b'],
...                            ['aa', 'bb', 'aa', 'bb']])._is_lexsorted()
True
>>> pd.MultiIndex.from_arrays([['a', 'a', 'b', 'b'],
...                            ['bb', 'aa', 'aa', 'bb']])._is_lexsorted()
False

---
## _sort_levels_monotonic
```python
from multi import _sort_levels_monotonic
```

This is an *internal* function.

Create a new MultiIndex from the current to monotonically sorted
items IN the levels. This does not actually make the entire MultiIndex
monotonic, JUST the levels.

The resulting MultiIndex will have the same outward
appearance, meaning the same .values and ordering. It will also
be .equals() to the original.

Returns
-------
MultiIndex

Examples
--------
>>> mi = pd.MultiIndex(levels=[['a', 'b'], ['bb', 'aa']],
...                    codes=[[0, 0, 1, 1], [0, 1, 0, 1]])
>>> mi
MultiIndex([('a', 'bb'),
            ('a', 'aa'),
            ('b', 'bb'),
            ('b', 'aa')],
           )

>>> mi.sort_values()
MultiIndex([('a', 'aa'),
            ('a', 'bb'),
            ('b', 'aa'),
            ('b', 'bb')],
           )

---
## remove_unused_levels
```python
from multi import remove_unused_levels
```

Create new MultiIndex from current that removes unused levels.

Unused level(s) means levels that are not expressed in the
labels. The resulting MultiIndex will have the same outward
appearance, meaning the same .values and ordering. It will
also be .equals() to the original.

Returns
-------
MultiIndex

Examples
--------
>>> mi = pd.MultiIndex.from_product([range(2), list('ab')])
>>> mi
MultiIndex([(0, 'a'),
            (0, 'b'),
            (1, 'a'),
            (1, 'b')],
           )

>>> mi[2:]
MultiIndex([(1, 'a'),
            (1, 'b')],
           )

The 0 from the first level is not represented
and can be removed

>>> mi2 = mi[2:].remove_unused_levels()
>>> mi2.levels
FrozenList([[1], ['a', 'b']])

---
## __reduce__
```python
from multi import __reduce__
```

Necessary for making this object picklable

---
## __getitem__
```python
from multi import __getitem__
```



---
## _getitem_slice
```python
from multi import _getitem_slice
```

Fastpath for __getitem__ when we know we have a slice.

---
## take
```python
from multi import take
```



---
## append
```python
from multi import append
```

Append a collection of Index options together.

Parameters
----------
other : Index or list/tuple of indices

Returns
-------
Index
    The combined index.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a'], ['b']])
>>> mi
MultiIndex([('a', 'b')],
           )
>>> mi.append(mi)
MultiIndex([('a', 'b'), ('a', 'b')],
           )

---
## argsort
```python
from multi import argsort
```



---
## repeat
```python
from multi import repeat
```



---
## drop
```python
from multi import drop
```

Make a new :class:`pandas.MultiIndex` with the passed list of codes deleted.

Parameters
----------
codes : array-like
    Must be a list of tuples when ``level`` is not specified.
level : int or level name, default None
errors : str, default 'raise'

Returns
-------
MultiIndex

Examples
--------
>>> idx = pd.MultiIndex.from_product([(0, 1, 2), ('green', 'purple')],
...                                  names=["number", "color"])
>>> idx
MultiIndex([(0,  'green'),
            (0, 'purple'),
            (1,  'green'),
            (1, 'purple'),
            (2,  'green'),
            (2, 'purple')],
           names=['number', 'color'])
>>> idx.drop([(1, 'green'), (2, 'purple')])
MultiIndex([(0,  'green'),
            (0, 'purple'),
            (1, 'purple'),
            (2,  'green')],
           names=['number', 'color'])

We can also drop from a specific level.

>>> idx.drop('green', level='color')
MultiIndex([(0, 'purple'),
            (1, 'purple'),
            (2, 'purple')],
           names=['number', 'color'])

>>> idx.drop([1, 2], level=0)
MultiIndex([(0,  'green'),
            (0, 'purple')],
           names=['number', 'color'])

---
## _drop_from_level
```python
from multi import _drop_from_level
```



---
## swaplevel
```python
from multi import swaplevel
```

Swap level i with level j.

Calling this method does not change the ordering of the values.

Parameters
----------
i : int, str, default -2
    First level of index to be swapped. Can pass level name as string.
    Type of parameters can be mixed.
j : int, str, default -1
    Second level of index to be swapped. Can pass level name as string.
    Type of parameters can be mixed.

Returns
-------
MultiIndex
    A new MultiIndex.

See Also
--------
Series.swaplevel : Swap levels i and j in a MultiIndex.
DataFrame.swaplevel : Swap levels i and j in a MultiIndex on a
    particular axis.

Examples
--------
>>> mi = pd.MultiIndex(levels=[['a', 'b'], ['bb', 'aa']],
...                    codes=[[0, 0, 1, 1], [0, 1, 0, 1]])
>>> mi
MultiIndex([('a', 'bb'),
            ('a', 'aa'),
            ('b', 'bb'),
            ('b', 'aa')],
           )
>>> mi.swaplevel(0, 1)
MultiIndex([('bb', 'a'),
            ('aa', 'a'),
            ('bb', 'b'),
            ('aa', 'b')],
           )

---
## reorder_levels
```python
from multi import reorder_levels
```

Rearrange levels using input order. May not drop or duplicate levels.

Parameters
----------
order : list of int or list of str
    List representing new level order. Reference level by number
    (position) or by key (label).

Returns
-------
MultiIndex

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([[1, 2], [3, 4]], names=['x', 'y'])
>>> mi
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])

>>> mi.reorder_levels(order=[1, 0])
MultiIndex([(3, 1),
            (4, 2)],
           names=['y', 'x'])

>>> mi.reorder_levels(order=['y', 'x'])
MultiIndex([(3, 1),
            (4, 2)],
           names=['y', 'x'])

---
## _reorder_ilevels
```python
from multi import _reorder_ilevels
```



---
## _recode_for_new_levels
```python
from multi import _recode_for_new_levels
```



---
## _get_codes_for_sorting
```python
from multi import _get_codes_for_sorting
```

we are categorizing our codes by using the
available categories (all, not just observed)
excluding any missing ones (-1); this is in preparation
for sorting, where we need to disambiguate that -1 is not
a valid valid

---
## sortlevel
```python
from multi import sortlevel
```

Sort MultiIndex at the requested level.

The result will respect the original ordering of the associated
factor at that level.

Parameters
----------
level : list-like, int or str, default 0
    If a string is given, must be a name of the level.
    If list-like must be names or ints of levels.
ascending : bool, default True
    False to sort in descending order.
    Can also be a list to specify a directed ordering.
sort_remaining : sort by the remaining levels after level
na_position : {'first' or 'last'}, default 'first'
    Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
    the end.

    .. versionadded:: 2.1.0

Returns
-------
sorted_index : pd.MultiIndex
    Resulting index.
indexer : np.ndarray[np.intp]
    Indices of output values in original index.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([[0, 0], [2, 1]])
>>> mi
MultiIndex([(0, 2),
            (0, 1)],
           )

>>> mi.sortlevel()
(MultiIndex([(0, 1),
            (0, 2)],
           ), array([1, 0]))

>>> mi.sortlevel(sort_remaining=False)
(MultiIndex([(0, 2),
            (0, 1)],
           ), array([0, 1]))

>>> mi.sortlevel(1)
(MultiIndex([(0, 1),
            (0, 2)],
           ), array([1, 0]))

>>> mi.sortlevel(1, ascending=False)
(MultiIndex([(0, 2),
            (0, 1)],
           ), array([0, 1]))

---
## _wrap_reindex_result
```python
from multi import _wrap_reindex_result
```



---
## _maybe_preserve_names
```python
from multi import _maybe_preserve_names
```



---
## _check_indexing_error
```python
from multi import _check_indexing_error
```



---
## _should_fallback_to_positional
```python
from multi import _should_fallback_to_positional
```

Should integer key(s) be treated as positional?

---
## _get_indexer_strict
```python
from multi import _get_indexer_strict
```



---
## _raise_if_missing
```python
from multi import _raise_if_missing
```



---
## _get_indexer_level_0
```python
from multi import _get_indexer_level_0
```

Optimized equivalent to `self.get_level_values(0).get_indexer_for(target)`.

---
## get_slice_bound
```python
from multi import get_slice_bound
```

For an ordered MultiIndex, compute slice bound
that corresponds to given label.

Returns leftmost (one-past-the-rightmost if `side=='right') position
of given label.

Parameters
----------
label : object or tuple of objects
side : {'left', 'right'}

Returns
-------
int
    Index of label.

Notes
-----
This method only works if level 0 index of the MultiIndex is lexsorted.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([list('abbc'), list('gefd')])

Get the locations from the leftmost 'b' in the first level
until the end of the multiindex:

>>> mi.get_slice_bound('b', side="left")
1

Like above, but if you get the locations from the rightmost
'b' in the first level and 'f' in the second level:

>>> mi.get_slice_bound(('b','f'), side="right")
3

See Also
--------
MultiIndex.get_loc : Get location for a label or a tuple of labels.
MultiIndex.get_locs : Get location for a label/slice/list/mask or a
                      sequence of such.

---
## slice_locs
```python
from multi import slice_locs
```

For an ordered MultiIndex, compute the slice locations for input
labels.

The input labels can be tuples representing partial levels, e.g. for a
MultiIndex with 3 levels, you can pass a single value (corresponding to
the first level), or a 1-, 2-, or 3-tuple.

Parameters
----------
start : label or tuple, default None
    If None, defaults to the beginning
end : label or tuple
    If None, defaults to the end
step : int or None
    Slice step

Returns
-------
(start, end) : (int, int)

Notes
-----
This method only works if the MultiIndex is properly lexsorted. So,
if only the first 2 levels of a 3-level MultiIndex are lexsorted,
you can only pass two levels to ``.slice_locs``.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([list('abbd'), list('deff')],
...                                names=['A', 'B'])

Get the slice locations from the beginning of 'b' in the first level
until the end of the multiindex:

>>> mi.slice_locs(start='b')
(1, 4)

Like above, but stop at the end of 'b' in the first level and 'f' in
the second level:

>>> mi.slice_locs(start='b', end=('b', 'f'))
(1, 3)

See Also
--------
MultiIndex.get_loc : Get location for a label or a tuple of labels.
MultiIndex.get_locs : Get location for a label/slice/list/mask or a
                      sequence of such.

---
## _partial_tup_index
```python
from multi import _partial_tup_index
```



---
## _get_loc_single_level_index
```python
from multi import _get_loc_single_level_index
```

If key is NA value, location of index unify as -1.

Parameters
----------
level_index: Index
key : label

Returns
-------
loc : int
    If key is NA value, loc is -1
    Else, location of key in index.

See Also
--------
Index.get_loc : The get_loc method for (single-level) index.

---
## get_loc
```python
from multi import get_loc
```

Get location for a label or a tuple of labels.

The location is returned as an integer/slice or boolean
mask.

Parameters
----------
key : label or tuple of labels (one for each level)

Returns
-------
int, slice object or boolean mask
    If the key is past the lexsort depth, the return may be a
    boolean mask array, otherwise it is always a slice or int.

See Also
--------
Index.get_loc : The get_loc method for (single-level) index.
MultiIndex.slice_locs : Get slice location given start label(s) and
                        end label(s).
MultiIndex.get_locs : Get location for a label/slice/list/mask or a
                      sequence of such.

Notes
-----
The key cannot be a slice, list of same-level labels, a boolean mask,
or a sequence of such. If you want to use those, use
:meth:`MultiIndex.get_locs` instead.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')])

>>> mi.get_loc('b')
slice(1, 3, None)

>>> mi.get_loc(('b', 'e'))
1

---
## get_loc_level
```python
from multi import get_loc_level
```

Get location and sliced index for requested label(s)/level(s).

Parameters
----------
key : label or sequence of labels
level : int/level name or list thereof, optional
drop_level : bool, default True
    If ``False``, the resulting index will not drop any level.

Returns
-------
tuple
    A 2-tuple where the elements :

    Element 0: int, slice object or boolean array.

    Element 1: The resulting sliced multiindex/index. If the key
    contains all levels, this will be ``None``.

See Also
--------
MultiIndex.get_loc  : Get location for a label or a tuple of labels.
MultiIndex.get_locs : Get location for a label/slice/list/mask or a
                      sequence of such.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')],
...                                names=['A', 'B'])

>>> mi.get_loc_level('b')
(slice(1, 3, None), Index(['e', 'f'], dtype='object', name='B'))

>>> mi.get_loc_level('e', level='B')
(array([False,  True, False]), Index(['b'], dtype='object', name='A'))

>>> mi.get_loc_level(['b', 'e'])
(1, None)

---
## _get_loc_level
```python
from multi import _get_loc_level
```

get_loc_level but with `level` known to be positional, not name-based.

---
## _get_level_indexer
```python
from multi import _get_level_indexer
```



---
## get_locs
```python
from multi import get_locs
```

Get location for a sequence of labels.

Parameters
----------
seq : label, slice, list, mask or a sequence of such
   You should use one of the above for each level.
   If a level should not be used, set it to ``slice(None)``.

Returns
-------
numpy.ndarray
    NumPy array of integers suitable for passing to iloc.

See Also
--------
MultiIndex.get_loc : Get location for a label or a tuple of labels.
MultiIndex.slice_locs : Get slice location given start label(s) and
                        end label(s).

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([list('abb'), list('def')])

>>> mi.get_locs('b')  # doctest: +SKIP
array([1, 2], dtype=int64)

>>> mi.get_locs([slice(None), ['e', 'f']])  # doctest: +SKIP
array([1, 2], dtype=int64)

>>> mi.get_locs([[True, False, True], slice('e', 'f')])  # doctest: +SKIP
array([2], dtype=int64)

---
## _reorder_indexer
```python
from multi import _reorder_indexer
```

Reorder an indexer of a MultiIndex (self) so that the labels are in the
same order as given in seq

Parameters
----------
seq : label/slice/list/mask or a sequence of such
indexer: a position indexer of self

Returns
-------
indexer : a sorted position indexer of self ordered as seq

---
## truncate
```python
from multi import truncate
```

Slice index between two labels / tuples, return new MultiIndex.

Parameters
----------
before : label or tuple, can be partial. Default None
    None defaults to start.
after : label or tuple, can be partial. Default None
    None defaults to end.

Returns
-------
MultiIndex
    The truncated MultiIndex.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([['a', 'b', 'c'], ['x', 'y', 'z']])
>>> mi
MultiIndex([('a', 'x'), ('b', 'y'), ('c', 'z')],
           )
>>> mi.truncate(before='a', after='b')
MultiIndex([('a', 'x'), ('b', 'y')],
           )

---
## equals
```python
from multi import equals
```

Determines if two MultiIndex objects have the same labeling information
(the levels themselves do not necessarily have to be the same)

See Also
--------
equal_levels

---
## equal_levels
```python
from multi import equal_levels
```

Return True if the levels of both MultiIndex objects are the same

---
## _union
```python
from multi import _union
```



---
## _is_comparable_dtype
```python
from multi import _is_comparable_dtype
```



---
## _get_reconciled_name_object
```python
from multi import _get_reconciled_name_object
```

If the result of a set operation will be self,
return self, unless the names change, in which
case make a shallow copy of self.

---
## _maybe_match_names
```python
from multi import _maybe_match_names
```

Try to find common names to attach to the result of an operation between
a and b. Return a consensus list of names if they match at least partly
or list of None if they have completely different names.

---
## _wrap_intersection_result
```python
from multi import _wrap_intersection_result
```



---
## _wrap_difference_result
```python
from multi import _wrap_difference_result
```



---
## _convert_can_do_setop
```python
from multi import _convert_can_do_setop
```



---
## astype
```python
from multi import astype
```



---
## _validate_fill_value
```python
from multi import _validate_fill_value
```



---
## putmask
```python
from multi import putmask
```

Return a new MultiIndex of the values set with the mask.

Parameters
----------
mask : array like
value : MultiIndex
    Must either be the same length as self or length one

Returns
-------
MultiIndex

---
## insert
```python
from multi import insert
```

Make new MultiIndex inserting new item at location

Parameters
----------
loc : int
item : tuple
    Must be same length as number of levels in the MultiIndex

Returns
-------
new_index : Index

---
## delete
```python
from multi import delete
```

Make new index with passed location deleted

Returns
-------
new_index : MultiIndex

---
## isin
```python
from multi import isin
```



---
## f
```python
from multi import f
```



---
## cats
```python
from multi import cats
```



---
## _maybe_to_slice
```python
from multi import _maybe_to_slice
```

convert integer indexer to boolean mask or slice if possible

---
## maybe_mi_droplevels
```python
from multi import maybe_mi_droplevels
```

If level does not exist or all levels were dropped, the exception
has to be handled outside.

---
## convert_indexer
```python
from multi import convert_indexer
```



---
## _to_bool_indexer
```python
from multi import _to_bool_indexer
```



---
## get_objs_combined_axis
```python
from api import get_objs_combined_axis
```

Extract combined index: return intersection or union (depending on the
value of "intersect") of indexes on given axis, or None if all objects
lack indexes (e.g. they are numpy arrays).

Parameters
----------
objs : list
    Series or DataFrame objects, may be mix of the two.
intersect : bool, default False
    If True, calculate the intersection between indexes. Otherwise,
    calculate the union.
axis : {0 or 'index', 1 or 'outer'}, default 0
    The axis to extract indexes from.
sort : bool, default True
    Whether the result index should come out sorted or not.
copy : bool, default False
    If True, return a copy of the combined index.

Returns
-------
Index

---
## _get_distinct_objs
```python
from api import _get_distinct_objs
```

Return a list with distinct elements of "objs" (different ids).
Preserves order.

---
## _get_combined_index
```python
from api import _get_combined_index
```

Return the union or intersection of indexes.

Parameters
----------
indexes : list of Index or list objects
    When intersect=True, do not accept list of lists.
intersect : bool, default False
    If True, calculate the intersection between indexes. Otherwise,
    calculate the union.
sort : bool, default False
    Whether the result index should come out sorted or not.
copy : bool, default False
    If True, return a copy of the combined index.

Returns
-------
Index

---
## safe_sort_index
```python
from api import safe_sort_index
```

Returns the sorted index

We keep the dtypes and the name attributes.

Parameters
----------
index : an Index

Returns
-------
Index

---
## union_indexes
```python
from api import union_indexes
```

Return the union of indexes.

The behavior of sort and names is not consistent.

Parameters
----------
indexes : list of Index or list objects
sort : bool, default True
    Whether the result index should come out sorted or not.

Returns
-------
Index

---
## _sanitize_and_check
```python
from api import _sanitize_and_check
```

Verify the type of indexes and convert lists to Index.

Cases:

- [list, list, ...]: Return ([list, list, ...], 'list')
- [list, Index, ...]: Return _sanitize_and_check([Index, Index, ...])
    Lists are sorted and converted to Index.
- [Index, Index, ...]: Return ([Index, Index, ...], TYPE)
    TYPE = 'special' if at least one special type, 'array' otherwise.

Parameters
----------
indexes : list of Index or list objects

Returns
-------
sanitized_indexes : list of Index or list objects
type : {'list', 'array', 'special'}

---
## all_indexes_same
```python
from api import all_indexes_same
```

Determine if all indexes contain the same elements.

Parameters
----------
indexes : iterable of Index objects

Returns
-------
bool
    True if all indexes contain the same elements, False otherwise.

---
## default_index
```python
from api import default_index
```



---
## _unique_indices
```python
from api import _unique_indices
```

Concatenate indices and remove duplicates.

Parameters
----------
inds : list of Index or list objects
dtype : dtype to set for the resulting Index

Returns
-------
Index

---
## _find_common_index_dtype
```python
from api import _find_common_index_dtype
```

Finds a common type for the indexes to pass through to resulting index.

Parameters
----------
inds: list of Index or list objects

Returns
-------
The common type or None if no indexes were given

---
## conv
```python
from api import conv
```



---
## _new_PeriodIndex
```python
from period import _new_PeriodIndex
```



---
## PeriodIndex
```python
from period import PeriodIndex
```

Immutable ndarray holding ordinal values indicating regular periods in time.

Index keys are boxed to Period objects which carries the metadata (eg,
frequency information).

Parameters
----------
data : array-like (1d int np.ndarray or PeriodArray), optional
    Optional period-like data to construct index with.
copy : bool
    Make a copy of input ndarray.
freq : str or period object, optional
    One of pandas period strings or corresponding objects.
year : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
month : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
quarter : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
day : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
hour : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
minute : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
second : int, array, or Series, default None

    .. deprecated:: 2.2.0
       Use PeriodIndex.from_fields instead.
dtype : str or PeriodDtype, default None

Attributes
----------
day
dayofweek
day_of_week
dayofyear
day_of_year
days_in_month
daysinmonth
end_time
freq
freqstr
hour
is_leap_year
minute
month
quarter
qyear
second
start_time
week
weekday
weekofyear
year

Methods
-------
asfreq
strftime
to_timestamp
from_fields
from_ordinals

See Also
--------
Index : The base pandas Index type.
Period : Represents a period of time.
DatetimeIndex : Index with datetime64 data.
TimedeltaIndex : Index of timedelta64 data.
period_range : Create a fixed-frequency PeriodIndex.

Examples
--------
>>> idx = pd.PeriodIndex.from_fields(year=[2000, 2002], quarter=[1, 3])
>>> idx
PeriodIndex(['2000Q1', '2002Q3'], dtype='period[Q-DEC]')

---
## period_range
```python
from period import period_range
```

Return a fixed frequency PeriodIndex.

The day (calendar) is the default frequency.

Parameters
----------
start : str, datetime, date, pandas.Timestamp, or period-like, default None
    Left bound for generating periods.
end : str, datetime, date, pandas.Timestamp, or period-like, default None
    Right bound for generating periods.
periods : int, default None
    Number of periods to generate.
freq : str or DateOffset, optional
    Frequency alias. By default the freq is taken from `start` or `end`
    if those are Period objects. Otherwise, the default is ``"D"`` for
    daily frequency.
name : str, default None
    Name of the resulting PeriodIndex.

Returns
-------
PeriodIndex

Notes
-----
Of the three parameters: ``start``, ``end``, and ``periods``, exactly two
must be specified.

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.

Examples
--------
>>> pd.period_range(start='2017-01-01', end='2018-01-01', freq='M')
PeriodIndex(['2017-01', '2017-02', '2017-03', '2017-04', '2017-05', '2017-06',
         '2017-07', '2017-08', '2017-09', '2017-10', '2017-11', '2017-12',
         '2018-01'],
        dtype='period[M]')

If ``start`` or ``end`` are ``Period`` objects, they will be used as anchor
endpoints for a ``PeriodIndex`` with frequency matching that of the
``period_range`` constructor.

>>> pd.period_range(start=pd.Period('2017Q1', freq='Q'),
...                 end=pd.Period('2017Q2', freq='Q'), freq='M')
PeriodIndex(['2017-03', '2017-04', '2017-05', '2017-06'],
            dtype='period[M]')

---
## _engine_type
```python
from period import _engine_type
```



---
## _resolution_obj
```python
from period import _resolution_obj
```



---
## hour
```python
from period import hour
```



---
## minute
```python
from period import minute
```



---
## second
```python
from period import second
```



---
## __new__
```python
from period import __new__
```



---
## from_fields
```python
from period import from_fields
```



---
## from_ordinals
```python
from period import from_ordinals
```



---
## values
```python
from period import values
```



---
## _maybe_convert_timedelta
```python
from period import _maybe_convert_timedelta
```

Convert timedelta-like input to an integer multiple of self.freq

Parameters
----------
other : timedelta, np.timedelta64, DateOffset, int, np.ndarray

Returns
-------
converted : int, np.ndarray[int64]

Raises
------
IncompatibleFrequency : if the input cannot be written as a multiple
    of self.freq.  Note IncompatibleFrequency subclasses ValueError.

---
## _is_comparable_dtype
```python
from period import _is_comparable_dtype
```

Can we compare values of the given dtype to our own?

---
## asof_locs
```python
from period import asof_locs
```

where : array of timestamps
mask : np.ndarray[bool]
    Array of booleans where data is not NA.

---
## is_full
```python
from period import is_full
```

Returns True if this PeriodIndex is range-like in that all Periods
between start and end are present, in order.

---
## inferred_type
```python
from period import inferred_type
```



---
## _convert_tolerance
```python
from period import _convert_tolerance
```



---
## get_loc
```python
from period import get_loc
```

Get integer location for requested label.

Parameters
----------
key : Period, NaT, str, or datetime
    String or datetime key must be parsable as Period.

Returns
-------
loc : int or ndarray[int64]

Raises
------
KeyError
    Key is not present in the index.
TypeError
    If key is listlike or otherwise not hashable.

---
## _disallow_mismatched_indexing
```python
from period import _disallow_mismatched_indexing
```



---
## _cast_partial_indexing_scalar
```python
from period import _cast_partial_indexing_scalar
```



---
## _maybe_cast_slice_bound
```python
from period import _maybe_cast_slice_bound
```



---
## _parsed_string_to_bounds
```python
from period import _parsed_string_to_bounds
```



---
## shift
```python
from period import shift
```



---
## __name__
```python
from frozen import __name__
```

frozen (immutable) data structures to support MultiIndexing

These are used for:

- .names (FrozenList)

---
## FrozenList
```python
from frozen import FrozenList
```

Container that doesn't allow setting item *but*
because it's technically hashable, will be used
for lookups, appropriately, etc.

---
## union
```python
from frozen import union
```

Returns a FrozenList with other concatenated to the end of self.

Parameters
----------
other : array-like
    The array-like whose elements we are concatenating.

Returns
-------
FrozenList
    The collection difference between self and other.

---
## difference
```python
from frozen import difference
```

Returns a FrozenList with elements from other removed from self.

Parameters
----------
other : array-like
    The array-like whose elements we are removing self.

Returns
-------
FrozenList
    The collection difference between self and other.

---
## __getitem__
```python
from frozen import __getitem__
```



---
## __radd__
```python
from frozen import __radd__
```



---
## __eq__
```python
from frozen import __eq__
```



---
## __mul__
```python
from frozen import __mul__
```



---
## __reduce__
```python
from frozen import __reduce__
```



---
## __hash__
```python
from frozen import __hash__
```



---
## _disabled
```python
from frozen import _disabled
```

This method will not function because object is immutable.

---
## __str__
```python
from frozen import __str__
```



---
## __repr__
```python
from frozen import __repr__
```



---
## _inherit_from_data
```python
from extension import _inherit_from_data
```

Make an alias for a method of the underlying ExtensionArray.

Parameters
----------
name : str
    Name of an attribute the class should inherit from its EA parent.
delegate : class
cache : bool, default False
    Whether to convert wrapped properties into cache_readonly
wrap : bool, default False
    Whether to wrap the inherited result in an Index.

Returns
-------
attribute, method, property, or cache_readonly

---
## inherit_names
```python
from extension import inherit_names
```

Class decorator to pin attributes from an ExtensionArray to a Index subclass.

Parameters
----------
names : List[str]
delegate : class
cache : bool, default False
wrap : bool, default False
    Whether to wrap the inherited result in an Index.

---
## ExtensionIndex
```python
from extension import ExtensionIndex
```

Index subclass for indexes backed by ExtensionArray.

---
## NDArrayBackedExtensionIndex
```python
from extension import NDArrayBackedExtensionIndex
```

Index subclass for indexes backed by NDArrayBackedExtensionArray.

---
## wrapper
```python
from extension import wrapper
```



---
## _validate_fill_value
```python
from extension import _validate_fill_value
```

Convert value to be insertable to underlying array.

---
## _isnan
```python
from extension import _isnan
```



---
## _get_engine_target
```python
from extension import _get_engine_target
```



---
## _from_join_target
```python
from extension import _from_join_target
```



---
## cached
```python
from extension import cached
```



---
## fget
```python
from extension import fget
```



---
## fset
```python
from extension import fset
```



---
## method
```python
from extension import method
```



---
## DatetimeIndexOpsMixin
```python
from datetimelike import DatetimeIndexOpsMixin
```

Common ops mixin to support a unified interface datetimelike Index.

---
## DatetimeTimedeltaMixin
```python
from datetimelike import DatetimeTimedeltaMixin
```

Mixin class for methods shared by DatetimeIndex and TimedeltaIndex,
but not PeriodIndex

---
## hasnans
```python
from datetimelike import hasnans
```



---
## equals
```python
from datetimelike import equals
```

Determines if two Index objects contain the same elements.

---
## __contains__
```python
from datetimelike import __contains__
```



---
## _convert_tolerance
```python
from datetimelike import _convert_tolerance
```



---
## format
```python
from datetimelike import format
```

Render a string representation of the Index.

---
## _format_with_header
```python
from datetimelike import _format_with_header
```



---
## _formatter_func
```python
from datetimelike import _formatter_func
```



---
## _format_attrs
```python
from datetimelike import _format_attrs
```

Return a list of tuples of the (attr,formatted_value).

---
## _summary
```python
from datetimelike import _summary
```



---
## _can_partial_date_slice
```python
from datetimelike import _can_partial_date_slice
```



---
## _parsed_string_to_bounds
```python
from datetimelike import _parsed_string_to_bounds
```



---
## _parse_with_reso
```python
from datetimelike import _parse_with_reso
```



---
## _get_string_slice
```python
from datetimelike import _get_string_slice
```



---
## _partial_date_slice
```python
from datetimelike import _partial_date_slice
```

Parameters
----------
reso : Resolution
parsed : datetime

Returns
-------
slice or ndarray[intp]

---
## _maybe_cast_slice_bound
```python
from datetimelike import _maybe_cast_slice_bound
```

If label is a string, cast it to scalar type according to resolution.

Parameters
----------
label : object
side : {'left', 'right'}

Returns
-------
label : object

Notes
-----
Value of `side` parameter should be validated in caller.

---
## shift
```python
from datetimelike import shift
```



---
## _maybe_cast_listlike_indexer
```python
from datetimelike import _maybe_cast_listlike_indexer
```



---
## values
```python
from datetimelike import values
```



---
## _as_range_index
```python
from datetimelike import _as_range_index
```



---
## _can_range_setop
```python
from datetimelike import _can_range_setop
```



---
## _wrap_range_setop
```python
from datetimelike import _wrap_range_setop
```



---
## _range_intersect
```python
from datetimelike import _range_intersect
```



---
## _range_union
```python
from datetimelike import _range_union
```



---
## _intersection
```python
from datetimelike import _intersection
```

intersection specialized to the case with matching dtypes and both non-empty.

---
## _fast_intersect
```python
from datetimelike import _fast_intersect
```



---
## _can_fast_intersect
```python
from datetimelike import _can_fast_intersect
```



---
## _can_fast_union
```python
from datetimelike import _can_fast_union
```



---
## _fast_union
```python
from datetimelike import _fast_union
```



---
## _union
```python
from datetimelike import _union
```



---
## _get_join_freq
```python
from datetimelike import _get_join_freq
```

Get the freq to attach to the result of a join operation.

---
## _wrap_joined_index
```python
from datetimelike import _wrap_joined_index
```



---
## _get_engine_target
```python
from datetimelike import _get_engine_target
```



---
## _from_join_target
```python
from datetimelike import _from_join_target
```



---
## _get_delete_freq
```python
from datetimelike import _get_delete_freq
```

Find the `freq` for self.delete(loc).

---
## _get_insert_freq
```python
from datetimelike import _get_insert_freq
```

Find the `freq` for self.insert(loc, item).

---
## delete
```python
from datetimelike import delete
```



---
## insert
```python
from datetimelike import insert
```



---
## take
```python
from datetimelike import take
```



---
## _maybe_return_indexers
```python
from base import _maybe_return_indexers
```

Decorator to simplify 'return_indexers' checks in Index.join.

---
## _new_Index
```python
from base import _new_Index
```

This is called upon unpickling, rather than the default which doesn't
have arguments and breaks __new__.

---
## Index
```python
from base import Index
```

Immutable sequence used for indexing and alignment.

The basic object storing axis labels for all pandas objects.

.. versionchanged:: 2.0.0

   Index can hold all numpy numeric dtypes (except float16). Previously only
   int64/uint64/float64 dtypes were accepted.

Parameters
----------
data : array-like (1-dimensional)
dtype : str, numpy.dtype, or ExtensionDtype, optional
    Data type for the output Index. If not specified, this will be
    inferred from `data`.
    See the :ref:`user guide <basics.dtypes>` for more usages.
copy : bool, default False
    Copy input data.
name : object
    Name to be stored in the index.
tupleize_cols : bool (default: True)
    When True, attempt to create a MultiIndex if possible.

See Also
--------
RangeIndex : Index implementing a monotonic integer range.
CategoricalIndex : Index of :class:`Categorical` s.
MultiIndex : A multi-level, or hierarchical Index.
IntervalIndex : An Index of :class:`Interval` s.
DatetimeIndex : Index of datetime64 data.
TimedeltaIndex : Index of timedelta64 data.
PeriodIndex : Index of Period data.

Notes
-----
An Index instance can **only** contain hashable objects.
An Index instance *can not* hold numpy float16 dtype.

Examples
--------
>>> pd.Index([1, 2, 3])
Index([1, 2, 3], dtype='int64')

>>> pd.Index(list('abc'))
Index(['a', 'b', 'c'], dtype='object')

>>> pd.Index([1, 2, 3], dtype="uint8")
Index([1, 2, 3], dtype='uint8')

---
## ensure_index_from_sequences
```python
from base import ensure_index_from_sequences
```

Construct an index from sequences of data.

A single sequence returns an Index. Many sequences returns a
MultiIndex.

Parameters
----------
sequences : sequence of sequences
names : sequence of str

Returns
-------
index : Index or MultiIndex

Examples
--------
>>> ensure_index_from_sequences([[1, 2, 3]], names=["name"])
Index([1, 2, 3], dtype='int64', name='name')

>>> ensure_index_from_sequences([["a", "a"], ["a", "b"]], names=["L1", "L2"])
MultiIndex([('a', 'a'),
            ('a', 'b')],
           names=['L1', 'L2'])

See Also
--------
ensure_index

---
## ensure_index
```python
from base import ensure_index
```

Ensure that we have an index from some index-like object.

Parameters
----------
index_like : sequence
    An Index or other sequence
copy : bool, default False

Returns
-------
index : Index or MultiIndex

See Also
--------
ensure_index_from_sequences

Examples
--------
>>> ensure_index(['a', 'b'])
Index(['a', 'b'], dtype='object')

>>> ensure_index([('a', 'a'),  ('b', 'c')])
Index([('a', 'a'), ('b', 'c')], dtype='object')

>>> ensure_index([['a', 'a'], ['b', 'c']])
MultiIndex([('a', 'b'),
        ('a', 'c')],
       )

---
## ensure_has_len
```python
from base import ensure_has_len
```

If seq is an iterator, put its values into a list.

---
## trim_front
```python
from base import trim_front
```

Trims zeros and decimal points.

Examples
--------
>>> trim_front([" a", " b"])
['a', 'b']

>>> trim_front([" a", " "])
['a', '']

---
## _validate_join_method
```python
from base import _validate_join_method
```



---
## maybe_extract_name
```python
from base import maybe_extract_name
```

If no name is passed, then extract it from data, validating hashability.

---
## get_unanimous_names
```python
from base import get_unanimous_names
```

Return common name if all indices agree, otherwise None (level-by-level).

Parameters
----------
indexes : list of Index objects

Returns
-------
list
    A list representing the unanimous 'names' found.

---
## _unpack_nested_dtype
```python
from base import _unpack_nested_dtype
```

When checking if our dtype is comparable with another, we need
to unpack CategoricalDtype to look at its categories.dtype.

Parameters
----------
other : Index

Returns
-------
np.dtype or ExtensionDtype

---
## _maybe_try_sort
```python
from base import _maybe_try_sort
```



---
## get_values_for_csv
```python
from base import get_values_for_csv
```

Convert to types which can be consumed by the standard library's
csv.writer.writerows.

---
## join
```python
from base import join
```

Compute join_index and indexers to conform data structures to the new index.

Parameters
----------
other : Index
how : {'left', 'right', 'inner', 'outer'}
level : int or level name, default None
return_indexers : bool, default False
sort : bool, default False
    Sort the join keys lexicographically in the result Index. If False,
    the order of the join keys depends on the join type (how keyword).

Returns
-------
join_index, (left_indexer, right_indexer)

Examples
--------
>>> idx1 = pd.Index([1, 2, 3])
>>> idx2 = pd.Index([4, 5, 6])
>>> idx1.join(idx2, how='outer')
Index([1, 2, 3, 4, 5, 6], dtype='int64')

---
## _left_indexer_unique
```python
from base import _left_indexer_unique
```



---
## _left_indexer
```python
from base import _left_indexer
```



---
## _inner_indexer
```python
from base import _inner_indexer
```



---
## _outer_indexer
```python
from base import _outer_indexer
```



---
## _can_hold_strings
```python
from base import _can_hold_strings
```



---
## _engine_type
```python
from base import _engine_type
```



---
## _ensure_array
```python
from base import _ensure_array
```

Ensure we have a valid array to pass to _simple_new.

---
## _dtype_to_subclass
```python
from base import _dtype_to_subclass
```



---
## _simple_new
```python
from base import _simple_new
```

We require that we have a dtype compat for the values. If we are passed
a non-dtype compat, then coerce using the constructor.

Must be careful not to recurse.

---
## _with_infer
```python
from base import _with_infer
```

Constructor that uses the 1.0.x behavior inferring numeric dtypes
for ndarray[object] inputs.

---
## _maybe_check_unique
```python
from base import _maybe_check_unique
```

Check that an Index has no duplicates.

This is typically only called via
`NDFrame.flags.allows_duplicate_labels.setter` when it's set to
True (duplicates aren't allowed).

Raises
------
DuplicateLabelError
    When the index is not unique.

---
## _format_duplicate_message
```python
from base import _format_duplicate_message
```

Construct the DataFrame for a DuplicateLabelError.

This returns a DataFrame indicating the labels and positions
of duplicates in an index. This should only be called when it's
already known that duplicates are present.

Examples
--------
>>> idx = pd.Index(['a', 'b', 'a'])
>>> idx._format_duplicate_message()
    positions
label
a        [0, 2]

---
## _shallow_copy
```python
from base import _shallow_copy
```

Create a new Index with the same class as the caller, don't copy the
data, use the same object attributes with passed in attributes taking
precedence.

*this is an internal non-public method*

Parameters
----------
values : the values to create the new Index, optional
name : Label, defaults to self.name

---
## _view
```python
from base import _view
```

fastpath to make a shallow copy, i.e. new object with same data.

---
## _rename
```python
from base import _rename
```

fastpath for rename if new name is already validated.

---
## is_
```python
from base import is_
```

More flexible, faster check like ``is`` but that works through views.

Note: this is *not* the same as ``Index.identical()``, which checks
that metadata is also the same.

Parameters
----------
other : object
    Other object to compare against.

Returns
-------
bool
    True if both have same underlying data, False otherwise.

See Also
--------
Index.identical : Works like ``Index.is_`` but also checks metadata.

Examples
--------
>>> idx1 = pd.Index(['1', '2', '3'])
>>> idx1.is_(idx1.view())
True

>>> idx1.is_(idx1.copy())
False

---
## _reset_identity
```python
from base import _reset_identity
```

Initializes or resets ``_id`` attribute with new object.

---
## _cleanup
```python
from base import _cleanup
```



---
## _engine
```python
from base import _engine
```



---
## _dir_additions_for_owner
```python
from base import _dir_additions_for_owner
```

Add the string-like labels to the owner dataframe/series dir output.

If this is a MultiIndex, it's first level values are used.

---
## __array__
```python
from base import __array__
```

The array interface, return my values.

---
## __array_wrap__
```python
from base import __array_wrap__
```

Gets called after a ufunc and other functions e.g. np.split.

---
## _maybe_disallow_fill
```python
from base import _maybe_disallow_fill
```

We only use pandas-style take when allow_fill is True _and_
fill_value is not None.

---
## __copy__
```python
from base import __copy__
```



---
## __deepcopy__
```python
from base import __deepcopy__
```

Parameters
----------
memo, default None
    Standard signature. Unused

---
## _formatter_func
```python
from base import _formatter_func
```

Return the formatter function.

---
## _format_data
```python
from base import _format_data
```

Return the formatted data as a unicode string.

---
## _format_attrs
```python
from base import _format_attrs
```

Return a list of tuples of the (attr,formatted_value).

---
## _get_level_names
```python
from base import _get_level_names
```

Return a name or list of names with None replaced by the level number.

---
## _mpl_repr
```python
from base import _mpl_repr
```



---
## format
```python
from base import format
```

Render a string representation of the Index.

---
## _format_flat
```python
from base import _format_flat
```

Render a string representation of the Index.

---
## _format_with_header
```python
from base import _format_with_header
```



---
## _get_values_for_csv
```python
from base import _get_values_for_csv
```



---
## _summary
```python
from base import _summary
```

Return a summarized representation.

Parameters
----------
name : str
    name to use in the summary representation

Returns
-------
String with a summarized representation of the index

---
## to_flat_index
```python
from base import to_flat_index
```

Identity method.

This is implemented for compatibility with subclass implementations
when chaining.

Returns
-------
pd.Index
    Caller.

See Also
--------
MultiIndex.to_flat_index : Subclass implementation.

---
## to_series
```python
from base import to_series
```

Create a Series with both index and values equal to the index keys.

Useful with map for returning an indexer based on an index.

Parameters
----------
index : Index, optional
    Index of resulting Series. If None, defaults to original index.
name : str, optional
    Name of resulting Series. If None, defaults to name of original
    index.

Returns
-------
Series
    The dtype will be based on the type of the Index values.

See Also
--------
Index.to_frame : Convert an Index to a DataFrame.
Series.to_frame : Convert Series to DataFrame.

Examples
--------
>>> idx = pd.Index(['Ant', 'Bear', 'Cow'], name='animal')

By default, the original index and original name is reused.

>>> idx.to_series()
animal
Ant      Ant
Bear    Bear
Cow      Cow
Name: animal, dtype: object

To enforce a new index, specify new labels to ``index``:

>>> idx.to_series(index=[0, 1, 2])
0     Ant
1    Bear
2     Cow
Name: animal, dtype: object

To override the name of the resulting column, specify ``name``:

>>> idx.to_series(name='zoo')
animal
Ant      Ant
Bear    Bear
Cow      Cow
Name: zoo, dtype: object

---
## to_frame
```python
from base import to_frame
```

Create a DataFrame with a column containing the Index.

Parameters
----------
index : bool, default True
    Set the index of the returned DataFrame as the original Index.

name : object, defaults to index.name
    The passed name should substitute for the index name (if it has
    one).

Returns
-------
DataFrame
    DataFrame containing the original Index data.

See Also
--------
Index.to_series : Convert an Index to a Series.
Series.to_frame : Convert Series to DataFrame.

Examples
--------
>>> idx = pd.Index(['Ant', 'Bear', 'Cow'], name='animal')
>>> idx.to_frame()
       animal
animal
Ant       Ant
Bear     Bear
Cow       Cow

By default, the original Index is reused. To enforce a new Index:

>>> idx.to_frame(index=False)
    animal
0   Ant
1  Bear
2   Cow

To override the name of the resulting column, specify `name`:

>>> idx.to_frame(index=False, name='zoo')
    zoo
0   Ant
1  Bear
2   Cow

---
## _validate_names
```python
from base import _validate_names
```

Handles the quirks of having a singular 'name' parameter for general
Index and plural 'names' parameter for MultiIndex.

---
## _get_default_index_names
```python
from base import _get_default_index_names
```

Get names of index.

Parameters
----------
names : int, str or 1-dimensional list, default None
    Index names to set.
default : str
    Default name of index.

Raises
------
TypeError
    if names not str or list-like

---
## _get_names
```python
from base import _get_names
```



---
## _set_names
```python
from base import _set_names
```

Set new names on index. Each name has to be a hashable type.

Parameters
----------
values : str or sequence
    name(s) to set
level : int, level name, or sequence of int/level names (default None)
    If the index is a MultiIndex (hierarchical), level(s) to set (None
    for all levels).  Otherwise level must be None

Raises
------
TypeError if each name is not hashable.

---
## set_names
```python
from base import set_names
```

Set Index or MultiIndex name.

Able to set new names partially and by level.

Parameters
----------

names : label or list of label or dict-like for MultiIndex
    Name(s) to set.

    .. versionchanged:: 1.3.0

level : int, label or list of int or label, optional
    If the index is a MultiIndex and names is not dict-like, level(s) to set
    (None for all levels). Otherwise level must be None.

    .. versionchanged:: 1.3.0

inplace : bool, default False
    Modifies the object directly, instead of creating a new Index or
    MultiIndex.

Returns
-------
Index or None
    The same type as the caller or None if ``inplace=True``.

See Also
--------
Index.rename : Able to set new names without level.

Examples
--------
>>> idx = pd.Index([1, 2, 3, 4])
>>> idx
Index([1, 2, 3, 4], dtype='int64')
>>> idx.set_names('quarter')
Index([1, 2, 3, 4], dtype='int64', name='quarter')

>>> idx = pd.MultiIndex.from_product([['python', 'cobra'],
...                                   [2018, 2019]])
>>> idx
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           )
>>> idx = idx.set_names(['kind', 'year'])
>>> idx.set_names('species', level=0)
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['species', 'year'])

When renaming levels with a dict, levels can not be passed.

>>> idx.set_names({'kind': 'snake'})
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['snake', 'year'])

---
## rename
```python
from base import rename
```

Alter Index or MultiIndex name.

Able to set new names without level. Defaults to returning new index.
Length of names must match number of levels in MultiIndex.

Parameters
----------
name : label or list of labels
    Name(s) to set.
inplace : bool, default False
    Modifies the object directly, instead of creating a new Index or
    MultiIndex.

Returns
-------
Index or None
    The same type as the caller or None if ``inplace=True``.

See Also
--------
Index.set_names : Able to set new names partially and by level.

Examples
--------
>>> idx = pd.Index(['A', 'C', 'A', 'B'], name='score')
>>> idx.rename('grade')
Index(['A', 'C', 'A', 'B'], dtype='object', name='grade')

>>> idx = pd.MultiIndex.from_product([['python', 'cobra'],
...                                   [2018, 2019]],
...                                   names=['kind', 'year'])
>>> idx
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['kind', 'year'])
>>> idx.rename(['species', 'year'])
MultiIndex([('python', 2018),
            ('python', 2019),
            ( 'cobra', 2018),
            ( 'cobra', 2019)],
           names=['species', 'year'])
>>> idx.rename('species')
Traceback (most recent call last):
TypeError: Must pass list-like as `names`.

---
## nlevels
```python
from base import nlevels
```

Number of levels.

---
## _sort_levels_monotonic
```python
from base import _sort_levels_monotonic
```

Compat with MultiIndex.

---
## _validate_index_level
```python
from base import _validate_index_level
```

Validate index level.

For single-level Index getting level number is a no-op, but some
verification must be done like in MultiIndex.

---
## _get_level_number
```python
from base import _get_level_number
```



---
## sortlevel
```python
from base import sortlevel
```

For internal compatibility with the Index API.

Sort the Index. This is for compat with MultiIndex

Parameters
----------
ascending : bool, default True
    False to sort in descending order
na_position : {'first' or 'last'}, default 'first'
    Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
    the end.

    .. versionadded:: 2.1.0

level, sort_remaining are compat parameters

Returns
-------
Index

---
## _get_level_values
```python
from base import _get_level_values
```

Return an Index of values for requested level.

This is primarily useful to get an individual level of values from a
MultiIndex, but is provided on Index as well for compatibility.

Parameters
----------
level : int or str
    It is either the integer position or the name of the level.

Returns
-------
Index
    Calling object, as there is only one level in the Index.

See Also
--------
MultiIndex.get_level_values : Get values for a level of a MultiIndex.

Notes
-----
For Index, level should be 0, since there are no multiple levels.

Examples
--------
>>> idx = pd.Index(list('abc'))
>>> idx
Index(['a', 'b', 'c'], dtype='object')

Get level values by supplying `level` as integer:

>>> idx.get_level_values(0)
Index(['a', 'b', 'c'], dtype='object')

---
## droplevel
```python
from base import droplevel
```

Return index with requested level(s) removed.

If resulting index has only 1 level left, the result will be
of Index type, not MultiIndex. The original index is not modified inplace.

Parameters
----------
level : int, str, or list-like, default 0
    If a string is given, must be the name of a level
    If list-like, elements must be names or indexes of levels.

Returns
-------
Index or MultiIndex

Examples
--------
>>> mi = pd.MultiIndex.from_arrays(
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z'])
>>> mi
MultiIndex([(1, 3, 5),
            (2, 4, 6)],
           names=['x', 'y', 'z'])

>>> mi.droplevel()
MultiIndex([(3, 5),
            (4, 6)],
           names=['y', 'z'])

>>> mi.droplevel(2)
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])

>>> mi.droplevel('z')
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])

>>> mi.droplevel(['x', 'y'])
Index([5, 6], dtype='int64', name='z')

---
## _drop_level_numbers
```python
from base import _drop_level_numbers
```

Drop MultiIndex levels by level _number_, not name.

---
## _is_strictly_monotonic_increasing
```python
from base import _is_strictly_monotonic_increasing
```

Return if the index is strictly monotonic increasing
(only increasing) values.

Examples
--------
>>> Index([1, 2, 3])._is_strictly_monotonic_increasing
True
>>> Index([1, 2, 2])._is_strictly_monotonic_increasing
False
>>> Index([1, 3, 2])._is_strictly_monotonic_increasing
False

---
## _is_strictly_monotonic_decreasing
```python
from base import _is_strictly_monotonic_decreasing
```

Return if the index is strictly monotonic decreasing
(only decreasing) values.

Examples
--------
>>> Index([3, 2, 1])._is_strictly_monotonic_decreasing
True
>>> Index([3, 2, 2])._is_strictly_monotonic_decreasing
False
>>> Index([3, 1, 2])._is_strictly_monotonic_decreasing
False

---
## has_duplicates
```python
from base import has_duplicates
```

Check if the Index has duplicate values.

Returns
-------
bool
    Whether or not the Index has duplicate values.

See Also
--------
Index.is_unique : Inverse method that checks if it has unique values.

Examples
--------
>>> idx = pd.Index([1, 5, 7, 7])
>>> idx.has_duplicates
True

>>> idx = pd.Index([1, 5, 7])
>>> idx.has_duplicates
False

>>> idx = pd.Index(["Watermelon", "Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.has_duplicates
True

>>> idx = pd.Index(["Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.has_duplicates
False

---
## is_boolean
```python
from base import is_boolean
```

Check if the Index only consists of booleans.

.. deprecated:: 2.0.0
    Use `pandas.api.types.is_bool_dtype` instead.

Returns
-------
bool
    Whether or not the Index only consists of booleans.

See Also
--------
is_integer : Check if the Index only consists of integers (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_object : Check if the Index is of the object dtype (deprecated).
is_categorical : Check if the Index holds categorical data.
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index([True, False, True])
>>> idx.is_boolean()  # doctest: +SKIP
True

>>> idx = pd.Index(["True", "False", "True"])
>>> idx.is_boolean()  # doctest: +SKIP
False

>>> idx = pd.Index([True, False, "True"])
>>> idx.is_boolean()  # doctest: +SKIP
False

---
## is_integer
```python
from base import is_integer
```

Check if the Index only consists of integers.

.. deprecated:: 2.0.0
    Use `pandas.api.types.is_integer_dtype` instead.

Returns
-------
bool
    Whether or not the Index only consists of integers.

See Also
--------
is_boolean : Check if the Index only consists of booleans (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_object : Check if the Index is of the object dtype. (deprecated).
is_categorical : Check if the Index holds categorical data (deprecated).
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index([1, 2, 3, 4])
>>> idx.is_integer()  # doctest: +SKIP
True

>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_integer()  # doctest: +SKIP
False

>>> idx = pd.Index(["Apple", "Mango", "Watermelon"])
>>> idx.is_integer()  # doctest: +SKIP
False

---
## is_floating
```python
from base import is_floating
```

Check if the Index is a floating type.

.. deprecated:: 2.0.0
    Use `pandas.api.types.is_float_dtype` instead

The Index may consist of only floats, NaNs, or a mix of floats,
integers, or NaNs.

Returns
-------
bool
    Whether or not the Index only consists of only consists of floats, NaNs, or
    a mix of floats, integers, or NaNs.

See Also
--------
is_boolean : Check if the Index only consists of booleans (deprecated).
is_integer : Check if the Index only consists of integers (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_object : Check if the Index is of the object dtype. (deprecated).
is_categorical : Check if the Index holds categorical data (deprecated).
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_floating()  # doctest: +SKIP
True

>>> idx = pd.Index([1.0, 2.0, np.nan, 4.0])
>>> idx.is_floating()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4, np.nan])
>>> idx.is_floating()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4])
>>> idx.is_floating()  # doctest: +SKIP
False

---
## is_numeric
```python
from base import is_numeric
```

Check if the Index only consists of numeric data.

.. deprecated:: 2.0.0
    Use `pandas.api.types.is_numeric_dtype` instead.

Returns
-------
bool
    Whether or not the Index only consists of numeric data.

See Also
--------
is_boolean : Check if the Index only consists of booleans (deprecated).
is_integer : Check if the Index only consists of integers (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_object : Check if the Index is of the object dtype. (deprecated).
is_categorical : Check if the Index holds categorical data (deprecated).
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_numeric()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4.0])
>>> idx.is_numeric()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4])
>>> idx.is_numeric()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4.0, np.nan])
>>> idx.is_numeric()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 2, 3, 4.0, np.nan, "Apple"])
>>> idx.is_numeric()  # doctest: +SKIP
False

---
## is_object
```python
from base import is_object
```

Check if the Index is of the object dtype.

.. deprecated:: 2.0.0
   Use `pandas.api.types.is_object_dtype` instead.

Returns
-------
bool
    Whether or not the Index is of the object dtype.

See Also
--------
is_boolean : Check if the Index only consists of booleans (deprecated).
is_integer : Check if the Index only consists of integers (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_categorical : Check if the Index holds categorical data (deprecated).
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index(["Apple", "Mango", "Watermelon"])
>>> idx.is_object()  # doctest: +SKIP
True

>>> idx = pd.Index(["Apple", "Mango", 2.0])
>>> idx.is_object()  # doctest: +SKIP
True

>>> idx = pd.Index(["Watermelon", "Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.is_object()  # doctest: +SKIP
False

>>> idx = pd.Index([1.0, 2.0, 3.0, 4.0])
>>> idx.is_object()  # doctest: +SKIP
False

---
## is_categorical
```python
from base import is_categorical
```

Check if the Index holds categorical data.

.. deprecated:: 2.0.0
      Use `isinstance(index.dtype, pd.CategoricalDtype)` instead.

Returns
-------
bool
    True if the Index is categorical.

See Also
--------
CategoricalIndex : Index for categorical data.
is_boolean : Check if the Index only consists of booleans (deprecated).
is_integer : Check if the Index only consists of integers (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_object : Check if the Index is of the object dtype. (deprecated).
is_interval : Check if the Index holds Interval objects (deprecated).

Examples
--------
>>> idx = pd.Index(["Watermelon", "Orange", "Apple",
...                 "Watermelon"]).astype("category")
>>> idx.is_categorical()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 3, 5, 7])
>>> idx.is_categorical()  # doctest: +SKIP
False

>>> s = pd.Series(["Peter", "Victor", "Elisabeth", "Mar"])
>>> s
0        Peter
1       Victor
2    Elisabeth
3          Mar
dtype: object
>>> s.index.is_categorical()  # doctest: +SKIP
False

---
## is_interval
```python
from base import is_interval
```

Check if the Index holds Interval objects.

.. deprecated:: 2.0.0
    Use `isinstance(index.dtype, pd.IntervalDtype)` instead.

Returns
-------
bool
    Whether or not the Index holds Interval objects.

See Also
--------
IntervalIndex : Index for Interval objects.
is_boolean : Check if the Index only consists of booleans (deprecated).
is_integer : Check if the Index only consists of integers (deprecated).
is_floating : Check if the Index is a floating type (deprecated).
is_numeric : Check if the Index only consists of numeric data (deprecated).
is_object : Check if the Index is of the object dtype. (deprecated).
is_categorical : Check if the Index holds categorical data (deprecated).

Examples
--------
>>> idx = pd.Index([pd.Interval(left=0, right=5),
...                 pd.Interval(left=5, right=10)])
>>> idx.is_interval()  # doctest: +SKIP
True

>>> idx = pd.Index([1, 3, 5, 7])
>>> idx.is_interval()  # doctest: +SKIP
False

---
## _holds_integer
```python
from base import _holds_integer
```

Whether the type is an integer type.

---
## holds_integer
```python
from base import holds_integer
```

Whether the type is an integer type.

.. deprecated:: 2.0.0
    Use `pandas.api.types.infer_dtype` instead

---
## inferred_type
```python
from base import inferred_type
```

Return a string of the type inferred from the values.

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.inferred_type
'integer'

---
## _is_all_dates
```python
from base import _is_all_dates
```

Whether or not the index values only consist of dates.

---
## _is_multi
```python
from base import _is_multi
```

Cached check equivalent to isinstance(self, MultiIndex)

---
## __reduce__
```python
from base import __reduce__
```



---
## _na_value
```python
from base import _na_value
```

The expected NA value to use with this index.

---
## _isnan
```python
from base import _isnan
```

Return if each value is NaN.

---
## notna
```python
from base import notna
```

Detect existing (non-missing) values.

Return a boolean same-sized object indicating if the values are not NA.
Non-missing values get mapped to ``True``. Characters such as empty
strings ``''`` or :attr:`numpy.inf` are not considered NA values.
NA values, such as None or :attr:`numpy.NaN`, get mapped to ``False``
values.

Returns
-------
numpy.ndarray[bool]
    Boolean array to indicate which entries are not NA.

See Also
--------
Index.notnull : Alias of notna.
Index.isna: Inverse of notna.
notna : Top-level notna.

Examples
--------
Show which entries in an Index are not NA. The result is an
array.

>>> idx = pd.Index([5.2, 6.0, np.nan])
>>> idx
Index([5.2, 6.0, nan], dtype='float64')
>>> idx.notna()
array([ True,  True, False])

Empty strings are not considered NA values. None is considered a NA
value.

>>> idx = pd.Index(['black', '', 'red', None])
>>> idx
Index(['black', '', 'red', None], dtype='object')
>>> idx.notna()
array([ True,  True,  True, False])

---
## __iadd__
```python
from base import __iadd__
```



---
## __nonzero__
```python
from base import __nonzero__
```



---
## _get_reconciled_name_object
```python
from base import _get_reconciled_name_object
```

If the result of a set operation will be self,
return self, unless the name changes, in which
case make a shallow copy of self.

---
## _validate_sort_keyword
```python
from base import _validate_sort_keyword
```



---
## _dti_setop_align_tzs
```python
from base import _dti_setop_align_tzs
```

With mismatched timezones, cast both to UTC.

---
## union
```python
from base import union
```

Form the union of two Index objects.

If the Index objects are incompatible, both Index objects will be
cast to dtype('object') first.

Parameters
----------
other : Index or array-like
sort : bool or None, default None
    Whether to sort the resulting Index.

    * None : Sort the result, except when

      1. `self` and `other` are equal.
      2. `self` or `other` has length 0.
      3. Some values in `self` or `other` cannot be compared.
         A RuntimeWarning is issued in this case.

    * False : do not sort the result.
    * True : Sort the result (which may raise TypeError).

Returns
-------
Index

Examples
--------
Union matching dtypes

>>> idx1 = pd.Index([1, 2, 3, 4])
>>> idx2 = pd.Index([3, 4, 5, 6])
>>> idx1.union(idx2)
Index([1, 2, 3, 4, 5, 6], dtype='int64')

Union mismatched dtypes

>>> idx1 = pd.Index(['a', 'b', 'c', 'd'])
>>> idx2 = pd.Index([1, 2, 3, 4])
>>> idx1.union(idx2)
Index(['a', 'b', 'c', 'd', 1, 2, 3, 4], dtype='object')

MultiIndex case

>>> idx1 = pd.MultiIndex.from_arrays(
...     [[1, 1, 2, 2], ["Red", "Blue", "Red", "Blue"]]
... )
>>> idx1
MultiIndex([(1,  'Red'),
    (1, 'Blue'),
    (2,  'Red'),
    (2, 'Blue')],
   )
>>> idx2 = pd.MultiIndex.from_arrays(
...     [[3, 3, 2, 2], ["Red", "Green", "Red", "Green"]]
... )
>>> idx2
MultiIndex([(3,   'Red'),
    (3, 'Green'),
    (2,   'Red'),
    (2, 'Green')],
   )
>>> idx1.union(idx2)
MultiIndex([(1,  'Blue'),
    (1,   'Red'),
    (2,  'Blue'),
    (2, 'Green'),
    (2,   'Red'),
    (3, 'Green'),
    (3,   'Red')],
   )
>>> idx1.union(idx2, sort=False)
MultiIndex([(1,   'Red'),
    (1,  'Blue'),
    (2,   'Red'),
    (2,  'Blue'),
    (3,   'Red'),
    (3, 'Green'),
    (2, 'Green')],
   )

---
## _union
```python
from base import _union
```

Specific union logic should go here. In subclasses, union behavior
should be overwritten here rather than in `self.union`.

Parameters
----------
other : Index or array-like
sort : False or None, default False
    Whether to sort the resulting index.

    * True : sort the result
    * False : do not sort the result.
    * None : sort the result, except when `self` and `other` are equal
      or when the values cannot be compared.

Returns
-------
Index

---
## _wrap_setop_result
```python
from base import _wrap_setop_result
```



---
## intersection
```python
from base import intersection
```

Form the intersection of two Index objects.

This returns a new Index with elements common to the index and `other`.

Parameters
----------
other : Index or array-like
sort : True, False or None, default False
    Whether to sort the resulting index.

    * None : sort the result, except when `self` and `other` are equal
      or when the values cannot be compared.
    * False : do not sort the result.
    * True : Sort the result (which may raise TypeError).

Returns
-------
Index

Examples
--------
>>> idx1 = pd.Index([1, 2, 3, 4])
>>> idx2 = pd.Index([3, 4, 5, 6])
>>> idx1.intersection(idx2)
Index([3, 4], dtype='int64')

---
## _intersection
```python
from base import _intersection
```

intersection specialized to the case with matching dtypes.

---
## _wrap_intersection_result
```python
from base import _wrap_intersection_result
```



---
## _intersection_via_get_indexer
```python
from base import _intersection_via_get_indexer
```

Find the intersection of two Indexes using get_indexer.

Returns
-------
np.ndarray or ExtensionArray or MultiIndex
    The returned array will be unique.

---
## difference
```python
from base import difference
```

Return a new Index with elements of index not in `other`.

This is the set difference of two Index objects.

Parameters
----------
other : Index or array-like
sort : bool or None, default None
    Whether to sort the resulting index. By default, the
    values are attempted to be sorted, but any TypeError from
    incomparable elements is caught by pandas.

    * None : Attempt to sort the result, but catch any TypeErrors
      from comparing incomparable elements.
    * False : Do not sort the result.
    * True : Sort the result (which may raise TypeError).

Returns
-------
Index

Examples
--------
>>> idx1 = pd.Index([2, 1, 3, 4])
>>> idx2 = pd.Index([3, 4, 5, 6])
>>> idx1.difference(idx2)
Index([1, 2], dtype='int64')
>>> idx1.difference(idx2, sort=False)
Index([2, 1], dtype='int64')

---
## _difference
```python
from base import _difference
```



---
## _wrap_difference_result
```python
from base import _wrap_difference_result
```



---
## symmetric_difference
```python
from base import symmetric_difference
```

Compute the symmetric difference of two Index objects.

Parameters
----------
other : Index or array-like
result_name : str
sort : bool or None, default None
    Whether to sort the resulting index. By default, the
    values are attempted to be sorted, but any TypeError from
    incomparable elements is caught by pandas.

    * None : Attempt to sort the result, but catch any TypeErrors
      from comparing incomparable elements.
    * False : Do not sort the result.
    * True : Sort the result (which may raise TypeError).

Returns
-------
Index

Notes
-----
``symmetric_difference`` contains elements that appear in either
``idx1`` or ``idx2`` but not both. Equivalent to the Index created by
``idx1.difference(idx2) | idx2.difference(idx1)`` with duplicates
dropped.

Examples
--------
>>> idx1 = pd.Index([1, 2, 3, 4])
>>> idx2 = pd.Index([2, 3, 4, 5])
>>> idx1.symmetric_difference(idx2)
Index([1, 5], dtype='int64')

---
## _assert_can_do_setop
```python
from base import _assert_can_do_setop
```



---
## _convert_can_do_setop
```python
from base import _convert_can_do_setop
```



---
## get_loc
```python
from base import get_loc
```

Get integer location, slice or boolean mask for requested label.

Parameters
----------
key : label

Returns
-------
int if unique index, slice if monotonic index, else mask

Examples
--------
>>> unique_index = pd.Index(list('abc'))
>>> unique_index.get_loc('b')
1

>>> monotonic_index = pd.Index(list('abbc'))
>>> monotonic_index.get_loc('b')
slice(1, 3, None)

>>> non_monotonic_index = pd.Index(list('abcb'))
>>> non_monotonic_index.get_loc('b')
array([False,  True, False,  True])

---
## get_indexer
```python
from base import get_indexer
```

Compute indexer and mask for new index given the current index.

The indexer should be then used as an input to ndarray.take to align the
current data to the new index.

Parameters
----------
target : Index
method : {None, 'pad'/'ffill', 'backfill'/'bfill', 'nearest'}, optional
    * default: exact matches only.
    * pad / ffill: find the PREVIOUS index value if no exact match.
    * backfill / bfill: use NEXT index value if no exact match
    * nearest: use the NEAREST index value if no exact match. Tied
      distances are broken by preferring the larger index value.
limit : int, optional
    Maximum number of consecutive labels in ``target`` to match for
    inexact matches.
tolerance : optional
    Maximum distance between original and new labels for inexact
    matches. The values of the index at the matching locations must
    satisfy the equation ``abs(index[indexer] - target) <= tolerance``.

    Tolerance may be a scalar value, which applies the same tolerance
    to all values, or list-like, which applies variable tolerance per
    element. List-like includes list, tuple, array, Series, and must be
    the same size as the index and its dtype must exactly match the
    index's type.

Returns
-------
np.ndarray[np.intp]
    Integers from 0 to n - 1 indicating that the index at these
    positions matches the corresponding target values. Missing values
    in the target are marked by -1.

Notes
-----
Returns -1 for unmatched values, for further explanation see the
example below.

Examples
--------
>>> index = pd.Index(['c', 'a', 'b'])
>>> index.get_indexer(['a', 'b', 'x'])
array([ 1,  2, -1])

Notice that the return value is an array of locations in ``index``
and ``x`` is marked by -1, as it is not in ``index``.

---
## _get_indexer
```python
from base import _get_indexer
```



---
## _should_partial_index
```python
from base import _should_partial_index
```

Should we attempt partial-matching indexing?

---
## _check_indexing_method
```python
from base import _check_indexing_method
```

Raise if we have a get_indexer `method` that is not supported or valid.

---
## _convert_tolerance
```python
from base import _convert_tolerance
```



---
## _get_fill_indexer
```python
from base import _get_fill_indexer
```



---
## _get_fill_indexer_searchsorted
```python
from base import _get_fill_indexer_searchsorted
```

Fallback pad/backfill get_indexer that works for monotonic decreasing
indexes and non-monotonic targets.

---
## _get_nearest_indexer
```python
from base import _get_nearest_indexer
```

Get the indexer for the nearest index labels; requires an index with
values that can be subtracted from each other (e.g., not strings or
tuples).

---
## _filter_indexer_tolerance
```python
from base import _filter_indexer_tolerance
```



---
## _difference_compat
```python
from base import _difference_compat
```



---
## _validate_positional_slice
```python
from base import _validate_positional_slice
```

For positional indexing, a slice must have either int or None
for each of start, stop, and step.

---
## _convert_slice_indexer
```python
from base import _convert_slice_indexer
```

Convert a slice indexer.

By definition, these are labels unless 'iloc' is passed in.
Floats are not allowed as the start, step, or stop of the slice.

Parameters
----------
key : label of the slice bound
kind : {'loc', 'getitem'}

---
## _raise_invalid_indexer
```python
from base import _raise_invalid_indexer
```

Raise consistent invalid indexer message.

---
## _validate_can_reindex
```python
from base import _validate_can_reindex
```

Check if we are allowing reindexing with this particular indexer.

Parameters
----------
indexer : an integer ndarray

Raises
------
ValueError if its a duplicate axis

---
## reindex
```python
from base import reindex
```

Create index with target's values.

Parameters
----------
target : an iterable
method : {None, 'pad'/'ffill', 'backfill'/'bfill', 'nearest'}, optional
    * default: exact matches only.
    * pad / ffill: find the PREVIOUS index value if no exact match.
    * backfill / bfill: use NEXT index value if no exact match
    * nearest: use the NEAREST index value if no exact match. Tied
      distances are broken by preferring the larger index value.
level : int, optional
    Level of multiindex.
limit : int, optional
    Maximum number of consecutive labels in ``target`` to match for
    inexact matches.
tolerance : int or float, optional
    Maximum distance between original and new labels for inexact
    matches. The values of the index at the matching locations must
    satisfy the equation ``abs(index[indexer] - target) <= tolerance``.

    Tolerance may be a scalar value, which applies the same tolerance
    to all values, or list-like, which applies variable tolerance per
    element. List-like includes list, tuple, array, Series, and must be
    the same size as the index and its dtype must exactly match the
    index's type.

Returns
-------
new_index : pd.Index
    Resulting index.
indexer : np.ndarray[np.intp] or None
    Indices of output values in original index.

Raises
------
TypeError
    If ``method`` passed along with ``level``.
ValueError
    If non-unique multi-index
ValueError
    If non-unique index and ``method`` or ``limit`` passed.

See Also
--------
Series.reindex : Conform Series to new index with optional filling logic.
DataFrame.reindex : Conform DataFrame to new index with optional filling logic.

Examples
--------
>>> idx = pd.Index(['car', 'bike', 'train', 'tractor'])
>>> idx
Index(['car', 'bike', 'train', 'tractor'], dtype='object')
>>> idx.reindex(['car', 'bike'])
(Index(['car', 'bike'], dtype='object'), array([0, 1]))

---
## _wrap_reindex_result
```python
from base import _wrap_reindex_result
```



---
## _maybe_preserve_names
```python
from base import _maybe_preserve_names
```



---
## _reindex_non_unique
```python
from base import _reindex_non_unique
```

Create a new index with target's values (move/add/delete values as
necessary) use with non-unique Index and a possibly non-unique target.

Parameters
----------
target : an iterable

Returns
-------
new_index : pd.Index
    Resulting index.
indexer : np.ndarray[np.intp]
    Indices of output values in original index.
new_indexer : np.ndarray[np.intp] or None

---
## _join_empty
```python
from base import _join_empty
```



---
## _join_via_get_indexer
```python
from base import _join_via_get_indexer
```



---
## _join_multi
```python
from base import _join_multi
```



---
## _join_non_unique
```python
from base import _join_non_unique
```



---
## _join_level
```python
from base import _join_level
```

The join method *only* affects the level of the resulting
MultiIndex. Otherwise it just exactly aligns the Index data to the
labels of the level in the MultiIndex.

If ```keep_order == True```, the order of the data indexed by the
MultiIndex will not be changed; otherwise, it will tie out
with `other`.

---
## _join_monotonic
```python
from base import _join_monotonic
```



---
## _wrap_joined_index
```python
from base import _wrap_joined_index
```



---
## _can_use_libjoin
```python
from base import _can_use_libjoin
```

Whether we can use the fastpaths implemented in _libs.join.

This is driven by whether (in monotonic increasing cases that are
guaranteed not to have NAs) we can convert to a np.ndarray without
making a copy. If we cannot, this negates the performance benefit
of using libjoin.

---
## _get_engine_target
```python
from base import _get_engine_target
```

Get the ndarray or ExtensionArray that we can pass to the IndexEngine
constructor.

---
## _get_join_target
```python
from base import _get_join_target
```

Get the ndarray or ExtensionArray that we can pass to the join
functions.

---
## _from_join_target
```python
from base import _from_join_target
```

Cast the ndarray returned from one of the libjoin.foo_indexer functions
back to type(self._data).

---
## memory_usage
```python
from base import memory_usage
```



---
## _raise_scalar_data_error
```python
from base import _raise_scalar_data_error
```



---
## _validate_fill_value
```python
from base import _validate_fill_value
```

Check if the value can be inserted into our array without casting,
and convert it to an appropriate native type if necessary.

Raises
------
TypeError
    If the value cannot be inserted into an array of this dtype.

---
## _is_memory_usage_qualified
```python
from base import _is_memory_usage_qualified
```

Return a boolean if we need a qualified .info display.

---
## _getitem_slice
```python
from base import _getitem_slice
```

Fastpath for __getitem__ when we know we have a slice.

---
## _can_hold_identifiers_and_holds_name
```python
from base import _can_hold_identifiers_and_holds_name
```

Faster check for ``name in self`` when we know `name` is a Python
identifier (e.g. in NDFrame.__getattr__, which hits this to support
. key lookup). For indexes that can't hold identifiers (everything
but object & categorical) we just return False.

https://github.com/pandas-dev/pandas/issues/19764

---
## append
```python
from base import append
```

Append a collection of Index options together.

Parameters
----------
other : Index or list/tuple of indices

Returns
-------
Index

Examples
--------
>>> idx = pd.Index([1, 2, 3])
>>> idx.append(pd.Index([4]))
Index([1, 2, 3, 4], dtype='int64')

---
## _concat
```python
from base import _concat
```

Concatenate multiple Index objects.

---
## identical
```python
from base import identical
```

Similar to equals, but checks that object attributes and types are also equal.

Returns
-------
bool
    If two Index objects have equal elements and same type True,
    otherwise False.

Examples
--------
>>> idx1 = pd.Index(['1', '2', '3'])
>>> idx2 = pd.Index(['1', '2', '3'])
>>> idx2.identical(idx1)
True

>>> idx1 = pd.Index(['1', '2', '3'], name="A")
>>> idx2 = pd.Index(['1', '2', '3'], name="B")
>>> idx2.identical(idx1)
False

---
## asof
```python
from base import asof
```

Return the label from the index, or, if not present, the previous one.

Assuming that the index is sorted, return the passed index label if it
is in the index, or return the previous index label if the passed one
is not in the index.

Parameters
----------
label : object
    The label up to which the method returns the latest index label.

Returns
-------
object
    The passed label if it is in the index. The previous label if the
    passed label is not in the sorted index or `NaN` if there is no
    such label.

See Also
--------
Series.asof : Return the latest value in a Series up to the
    passed index.
merge_asof : Perform an asof merge (similar to left join but it
    matches on nearest key rather than equal key).
Index.get_loc : An `asof` is a thin wrapper around `get_loc`
    with method='pad'.

Examples
--------
`Index.asof` returns the latest index label up to the passed label.

>>> idx = pd.Index(['2013-12-31', '2014-01-02', '2014-01-03'])
>>> idx.asof('2014-01-01')
'2013-12-31'

If the label is in the index, the method returns the passed label.

>>> idx.asof('2014-01-02')
'2014-01-02'

If all of the labels in the index are later than the passed label,
NaN is returned.

>>> idx.asof('1999-01-02')
nan

If the index is not sorted, an error is raised.

>>> idx_not_sorted = pd.Index(['2013-12-31', '2015-01-02',
...                            '2014-01-03'])
>>> idx_not_sorted.asof('2013-12-31')
Traceback (most recent call last):
ValueError: index must be monotonic increasing or decreasing

---
## asof_locs
```python
from base import asof_locs
```

Return the locations (indices) of labels in the index.

As in the :meth:`pandas.Index.asof`, if the label (a particular entry in
``where``) is not in the index, the latest index label up to the
passed label is chosen and its index returned.

If all of the labels in the index are later than a label in ``where``,
-1 is returned.

``mask`` is used to ignore ``NA`` values in the index during calculation.

Parameters
----------
where : Index
    An Index consisting of an array of timestamps.
mask : np.ndarray[bool]
    Array of booleans denoting where values in the original
    data are not ``NA``.

Returns
-------
np.ndarray[np.intp]
    An array of locations (indices) of the labels from the index
    which correspond to the return values of :meth:`pandas.Index.asof`
    for every element in ``where``.

See Also
--------
Index.asof : Return the label from the index, or, if not present, the
    previous one.

Examples
--------
>>> idx = pd.date_range('2023-06-01', periods=3, freq='D')
>>> where = pd.DatetimeIndex(['2023-05-30 00:12:00', '2023-06-01 00:00:00',
...                           '2023-06-02 23:59:59'])
>>> mask = np.ones(3, dtype=bool)
>>> idx.asof_locs(where, mask)
array([-1,  0,  1])

We can use ``mask`` to ignore certain values in the index during calculation.

>>> mask[1] = False
>>> idx.asof_locs(where, mask)
array([-1,  0,  0])

---
## sort_values
```python
from base import sort_values
```

Return a sorted copy of the index.

Return a sorted copy of the index, and optionally return the indices
that sorted the index itself.

Parameters
----------
return_indexer : bool, default False
    Should the indices that would sort the index be returned.
ascending : bool, default True
    Should the index values be sorted in an ascending order.
na_position : {'first' or 'last'}, default 'last'
    Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
    the end.
key : callable, optional
    If not None, apply the key function to the index values
    before sorting. This is similar to the `key` argument in the
    builtin :meth:`sorted` function, with the notable difference that
    this `key` function should be *vectorized*. It should expect an
    ``Index`` and return an ``Index`` of the same shape.

Returns
-------
sorted_index : pandas.Index
    Sorted copy of the index.
indexer : numpy.ndarray, optional
    The indices that the index itself was sorted by.

See Also
--------
Series.sort_values : Sort values of a Series.
DataFrame.sort_values : Sort values in a DataFrame.

Examples
--------
>>> idx = pd.Index([10, 100, 1, 1000])
>>> idx
Index([10, 100, 1, 1000], dtype='int64')

Sort values in ascending order (default behavior).

>>> idx.sort_values()
Index([1, 10, 100, 1000], dtype='int64')

Sort values in descending order, and also get the indices `idx` was
sorted by.

>>> idx.sort_values(ascending=False, return_indexer=True)
(Index([1000, 100, 10, 1], dtype='int64'), array([3, 1, 0, 2]))

---
## sort
```python
from base import sort
```

Use sort_values instead.

---
## _check_indexing_error
```python
from base import _check_indexing_error
```



---
## _should_fallback_to_positional
```python
from base import _should_fallback_to_positional
```

Should an integer key be treated as positional?

---
## get_indexer_non_unique
```python
from base import get_indexer_non_unique
```



---
## get_indexer_for
```python
from base import get_indexer_for
```

Guaranteed return of an indexer even when non-unique.

This dispatches to get_indexer or get_indexer_non_unique
as appropriate.

Returns
-------
np.ndarray[np.intp]
    List of indices.

Examples
--------
>>> idx = pd.Index([np.nan, 'var1', np.nan])
>>> idx.get_indexer_for([np.nan])
array([0, 2])

---
## _get_indexer_strict
```python
from base import _get_indexer_strict
```

Analogue to get_indexer that raises if any elements are missing.

---
## _raise_if_missing
```python
from base import _raise_if_missing
```

Check that indexer can be used to return a result.

e.g. at least one element was found,
unless the list of keys was actually empty.

Parameters
----------
key : list-like
    Targeted labels (only used to show correct error message).
indexer: array-like of booleans
    Indices corresponding to the key,
    (with -1 indicating not found).
axis_name : str

Raises
------
KeyError
    If at least one key was requested but none was found.

---
## _get_indexer_non_comparable
```python
from base import _get_indexer_non_comparable
```

Called from get_indexer or get_indexer_non_unique when the target
is of a non-comparable dtype.

For get_indexer lookups with method=None, get_indexer is an _equality_
check, so non-comparable dtypes mean we will always have no matches.

For get_indexer lookups with a method, get_indexer is an _inequality_
check, so non-comparable dtypes mean we will always raise TypeError.

Parameters
----------
target : Index
method : str or None
unique : bool, default True
    * True if called from get_indexer.
    * False if called from get_indexer_non_unique.

Raises
------
TypeError
    If doing an inequality check, i.e. method is not None.

---
## _index_as_unique
```python
from base import _index_as_unique
```

Whether we should treat this as unique for the sake of
get_indexer vs get_indexer_non_unique.

For IntervalIndex compat.

---
## _maybe_downcast_for_indexing
```python
from base import _maybe_downcast_for_indexing
```

When dealing with an object-dtype Index and a non-object Index, see
if we can upcast the object-dtype one to improve performance.

---
## _find_common_type_compat
```python
from base import _find_common_type_compat
```

Implementation of find_common_type that adjusts for Index-specific
special cases.

---
## _should_compare
```python
from base import _should_compare
```

Check if `self == other` can ever have non-False entries.

---
## _is_comparable_dtype
```python
from base import _is_comparable_dtype
```

Can we compare values of the given dtype to our own?

---
## groupby
```python
from base import groupby
```

Group the index labels by a given array of values.

Parameters
----------
values : array
    Values used to determine the groups.

Returns
-------
dict
    {group name -> group labels}

---
## _transform_index
```python
from base import _transform_index
```

Apply function to all values found in index.

This includes transforming multiindex entries separately.
Only apply function to one level of the MultiIndex if level is specified.

---
## _get_string_slice
```python
from base import _get_string_slice
```



---
## slice_indexer
```python
from base import slice_indexer
```

Compute the slice indexer for input labels and step.

Index needs to be ordered and unique.

Parameters
----------
start : label, default None
    If None, defaults to the beginning.
end : label, default None
    If None, defaults to the end.
step : int, default None

Returns
-------
slice

Raises
------
KeyError : If key does not exist, or key is not unique and index is
    not ordered.

Notes
-----
This function assumes that the data is sorted, so use at your own peril

Examples
--------
This is a method on all index types. For example you can do:

>>> idx = pd.Index(list('abcd'))
>>> idx.slice_indexer(start='b', end='c')
slice(1, 3, None)

>>> idx = pd.MultiIndex.from_arrays([list('abcd'), list('efgh')])
>>> idx.slice_indexer(start='b', end=('c', 'g'))
slice(1, 3, None)

---
## _maybe_cast_indexer
```python
from base import _maybe_cast_indexer
```

If we have a float key and are not a floating index, then try to cast
to an int if equivalent.

---
## _maybe_cast_listlike_indexer
```python
from base import _maybe_cast_listlike_indexer
```

Analogue to maybe_cast_indexer for get_indexer instead of get_loc.

---
## _validate_indexer
```python
from base import _validate_indexer
```

If we are positional indexer, validate that we have appropriate
typed bounds must be an integer.

---
## _maybe_cast_slice_bound
```python
from base import _maybe_cast_slice_bound
```

This function should be overloaded in subclasses that allow non-trivial
casting on label-slice bounds, e.g. datetime-like indices allowing
strings containing formatted datetimes.

Parameters
----------
label : object
side : {'left', 'right'}

Returns
-------
label : object

Notes
-----
Value of `side` parameter should be validated in caller.

---
## _searchsorted_monotonic
```python
from base import _searchsorted_monotonic
```



---
## get_slice_bound
```python
from base import get_slice_bound
```

Calculate slice bound that corresponds to given label.

Returns leftmost (one-past-the-rightmost if ``side=='right'``) position
of given label.

Parameters
----------
label : object
side : {'left', 'right'}

Returns
-------
int
    Index of label.

See Also
--------
Index.get_loc : Get integer location, slice or boolean mask for requested
    label.

Examples
--------
>>> idx = pd.RangeIndex(5)
>>> idx.get_slice_bound(3, 'left')
3

>>> idx.get_slice_bound(3, 'right')
4

If ``label`` is non-unique in the index, an error will be raised.

>>> idx_duplicate = pd.Index(['a', 'b', 'a', 'c', 'd'])
>>> idx_duplicate.get_slice_bound('a', 'left')
Traceback (most recent call last):
KeyError: Cannot get left slice bound for non-unique label: 'a'

---
## slice_locs
```python
from base import slice_locs
```

Compute slice locations for input labels.

Parameters
----------
start : label, default None
    If None, defaults to the beginning.
end : label, default None
    If None, defaults to the end.
step : int, defaults None
    If None, defaults to 1.

Returns
-------
tuple[int, int]

See Also
--------
Index.get_loc : Get location for a single label.

Notes
-----
This method only works if the index is monotonic or unique.

Examples
--------
>>> idx = pd.Index(list('abcd'))
>>> idx.slice_locs(start='b', end='c')
(1, 3)

---
## drop
```python
from base import drop
```

Make new Index with passed list of labels deleted.

Parameters
----------
labels : array-like or scalar
errors : {'ignore', 'raise'}, default 'raise'
    If 'ignore', suppress error and existing labels are dropped.

Returns
-------
Index
    Will be same type as self, except for RangeIndex.

Raises
------
KeyError
    If not all of the labels are found in the selected axis

Examples
--------
>>> idx = pd.Index(['a', 'b', 'c'])
>>> idx.drop(['a'])
Index(['b', 'c'], dtype='object')

---
## infer_objects
```python
from base import infer_objects
```

If we have an object dtype, try to infer a non-object dtype.

Parameters
----------
copy : bool, default True
    Whether to make a copy in cases where no inference occurs.

---
## diff
```python
from base import diff
```

Computes the difference between consecutive values in the Index object.

If periods is greater than 1, computes the difference between values that
are `periods` number of positions apart.

Parameters
----------
periods : int, optional
    The number of positions between the current and previous
    value to compute the difference with. Default is 1.

Returns
-------
Index
    A new Index object with the computed differences.

Examples
--------
>>> import pandas as pd
>>> idx = pd.Index([10, 20, 30, 40, 50])
>>> idx.diff()
Index([nan, 10.0, 10.0, 10.0, 10.0], dtype='float64')

---
## _cmp_method
```python
from base import _cmp_method
```

Wrapper used to dispatch comparison operations.

---
## _logical_method
```python
from base import _logical_method
```



---
## _unary_method
```python
from base import _unary_method
```



---
## __abs__
```python
from base import __abs__
```



---
## __neg__
```python
from base import __neg__
```



---
## __pos__
```python
from base import __pos__
```



---
## __invert__
```python
from base import __invert__
```



---
## _maybe_disable_logical_methods
```python
from base import _maybe_disable_logical_methods
```

raise if this Index subclass does not support any or all.

---
## min
```python
from base import min
```

Return the minimum value of the Index.

Parameters
----------
axis : {None}
    Dummy argument for consistency with Series.
skipna : bool, default True
    Exclude NA/null values when showing the result.
*args, **kwargs
    Additional arguments and keywords for compatibility with NumPy.

Returns
-------
scalar
    Minimum value.

See Also
--------
Index.max : Return the maximum value of the object.
Series.min : Return the minimum value in a Series.
DataFrame.min : Return the minimum values in a DataFrame.

Examples
--------
>>> idx = pd.Index([3, 2, 1])
>>> idx.min()
1

>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.min()
'a'

For a MultiIndex, the minimum is determined lexicographically.

>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.min()
('a', 1)

---
## max
```python
from base import max
```

Return the maximum value of the Index.

Parameters
----------
axis : int, optional
    For compatibility with NumPy. Only 0 or None are allowed.
skipna : bool, default True
    Exclude NA/null values when showing the result.
*args, **kwargs
    Additional arguments and keywords for compatibility with NumPy.

Returns
-------
scalar
    Maximum value.

See Also
--------
Index.min : Return the minimum value in an Index.
Series.max : Return the maximum value in a Series.
DataFrame.max : Return the maximum values in a DataFrame.

Examples
--------
>>> idx = pd.Index([3, 2, 1])
>>> idx.max()
3

>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.max()
'c'

For a MultiIndex, the maximum is determined lexicographically.

>>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
>>> idx.max()
('b', 2)

---
## _get_leaf_sorter
```python
from base import _get_leaf_sorter
```

Returns sorter for the inner most level while preserving the
order of higher levels.

Parameters
----------
labels : list[np.ndarray]
    Each ndarray has signed integer dtype, not necessarily identical.

Returns
-------
np.ndarray[np.intp]

---
## CategoricalIndex
```python
from category import CategoricalIndex
```

Index based on an underlying :class:`Categorical`.

CategoricalIndex, like Categorical, can only take on a limited,
and usually fixed, number of possible values (`categories`). Also,
like Categorical, it might have an order, but numerical operations
(additions, divisions, ...) are not possible.

Parameters
----------
data : array-like (1-dimensional)
    The values of the categorical. If `categories` are given, values not in
    `categories` will be replaced with NaN.
categories : index-like, optional
    The categories for the categorical. Items need to be unique.
    If the categories are not given here (and also not in `dtype`), they
    will be inferred from the `data`.
ordered : bool, optional
    Whether or not this categorical is treated as an ordered
    categorical. If not given here or in `dtype`, the resulting
    categorical will be unordered.
dtype : CategoricalDtype or "category", optional
    If :class:`CategoricalDtype`, cannot be used together with
    `categories` or `ordered`.
copy : bool, default False
    Make a copy of input ndarray.
name : object, optional
    Name to be stored in the index.

Attributes
----------
codes
categories
ordered

Methods
-------
rename_categories
reorder_categories
add_categories
remove_categories
remove_unused_categories
set_categories
as_ordered
as_unordered
map

Raises
------
ValueError
    If the categories do not validate.
TypeError
    If an explicit ``ordered=True`` is given but no `categories` and the
    `values` are not sortable.

See Also
--------
Index : The base pandas Index type.
Categorical : A categorical array.
CategoricalDtype : Type for categorical data.

Notes
-----
See the `user guide
<https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#categoricalindex>`__
for more.

Examples
--------
>>> pd.CategoricalIndex(["a", "b", "c", "a", "b", "c"])
CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                 categories=['a', 'b', 'c'], ordered=False, dtype='category')

``CategoricalIndex`` can also be instantiated from a ``Categorical``:

>>> c = pd.Categorical(["a", "b", "c", "a", "b", "c"])
>>> pd.CategoricalIndex(c)
CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                 categories=['a', 'b', 'c'], ordered=False, dtype='category')

Ordered ``CategoricalIndex`` can have a min and max value.

>>> ci = pd.CategoricalIndex(
...     ["a", "b", "c", "a", "b", "c"], ordered=True, categories=["c", "b", "a"]
... )
>>> ci
CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                 categories=['c', 'b', 'a'], ordered=True, dtype='category')
>>> ci.min()
'c'

---
## _can_hold_strings
```python
from category import _can_hold_strings
```



---
## _should_fallback_to_positional
```python
from category import _should_fallback_to_positional
```



---
## _engine_type
```python
from category import _engine_type
```



---
## __new__
```python
from category import __new__
```



---
## _is_dtype_compat
```python
from category import _is_dtype_compat
```

*this is an internal non-public method*

provide a comparison between the dtype of self and other (coercing if
needed)

Parameters
----------
other : Index

Returns
-------
Categorical

Raises
------
TypeError if the dtypes are not compatible

---
## equals
```python
from category import equals
```

Determine if two CategoricalIndex objects contain the same elements.

Returns
-------
bool
    ``True`` if two :class:`pandas.CategoricalIndex` objects have equal
    elements, ``False`` otherwise.

Examples
--------
>>> ci = pd.CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'])
>>> ci2 = pd.CategoricalIndex(pd.Categorical(['a', 'b', 'c', 'a', 'b', 'c']))
>>> ci.equals(ci2)
True

The order of elements matters.

>>> ci3 = pd.CategoricalIndex(['c', 'b', 'a', 'a', 'b', 'c'])
>>> ci.equals(ci3)
False

The orderedness also matters.

>>> ci4 = ci.as_ordered()
>>> ci.equals(ci4)
False

The categories matter, but the order of the categories matters only when
``ordered=True``.

>>> ci5 = ci.set_categories(['a', 'b', 'c', 'd'])
>>> ci.equals(ci5)
False

>>> ci6 = ci.set_categories(['b', 'c', 'a'])
>>> ci.equals(ci6)
True
>>> ci_ordered = pd.CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
...                                  ordered=True)
>>> ci2_ordered = ci_ordered.set_categories(['b', 'c', 'a'])
>>> ci_ordered.equals(ci2_ordered)
False

---
## _formatter_func
```python
from category import _formatter_func
```



---
## _format_attrs
```python
from category import _format_attrs
```

Return a list of tuples of the (attr,formatted_value)

---
## inferred_type
```python
from category import inferred_type
```



---
## __contains__
```python
from category import __contains__
```



---
## reindex
```python
from category import reindex
```

Create index with target's values (move/add/delete values as necessary)

Returns
-------
new_index : pd.Index
    Resulting index
indexer : np.ndarray[np.intp] or None
    Indices of output values in original index

---
## _maybe_cast_indexer
```python
from category import _maybe_cast_indexer
```



---
## _maybe_cast_listlike_indexer
```python
from category import _maybe_cast_listlike_indexer
```



---
## _is_comparable_dtype
```python
from category import _is_comparable_dtype
```



---
## map
```python
from category import map
```

Map values using input an input mapping or function.

Maps the values (their categories, not the codes) of the index to new
categories. If the mapping correspondence is one-to-one the result is a
:class:`~pandas.CategoricalIndex` which has the same order property as
the original, otherwise an :class:`~pandas.Index` is returned.

If a `dict` or :class:`~pandas.Series` is used any unmapped category is
mapped to `NaN`. Note that if this happens an :class:`~pandas.Index`
will be returned.

Parameters
----------
mapper : function, dict, or Series
    Mapping correspondence.

Returns
-------
pandas.CategoricalIndex or pandas.Index
    Mapped index.

See Also
--------
Index.map : Apply a mapping correspondence on an
    :class:`~pandas.Index`.
Series.map : Apply a mapping correspondence on a
    :class:`~pandas.Series`.
Series.apply : Apply more complex functions on a
    :class:`~pandas.Series`.

Examples
--------
>>> idx = pd.CategoricalIndex(['a', 'b', 'c'])
>>> idx
CategoricalIndex(['a', 'b', 'c'], categories=['a', 'b', 'c'],
                  ordered=False, dtype='category')
>>> idx.map(lambda x: x.upper())
CategoricalIndex(['A', 'B', 'C'], categories=['A', 'B', 'C'],
                 ordered=False, dtype='category')
>>> idx.map({'a': 'first', 'b': 'second', 'c': 'third'})
CategoricalIndex(['first', 'second', 'third'], categories=['first',
                 'second', 'third'], ordered=False, dtype='category')

If the mapping is one-to-one the ordering of the categories is
preserved:

>>> idx = pd.CategoricalIndex(['a', 'b', 'c'], ordered=True)
>>> idx
CategoricalIndex(['a', 'b', 'c'], categories=['a', 'b', 'c'],
                 ordered=True, dtype='category')
>>> idx.map({'a': 3, 'b': 2, 'c': 1})
CategoricalIndex([3, 2, 1], categories=[3, 2, 1], ordered=True,
                 dtype='category')

If the mapping is not one-to-one an :class:`~pandas.Index` is returned:

>>> idx.map({'a': 'first', 'b': 'second', 'c': 'first'})
Index(['first', 'second', 'first'], dtype='object')

If a `dict` is used, all unmapped categories are mapped to `NaN` and
the result is an :class:`~pandas.Index`:

>>> idx.map({'a': 'first', 'b': 'second'})
Index(['first', 'second', nan], dtype='object')

---
## _concat
```python
from category import _concat
```



---
## __name__
```python
from sum_ import __name__
```

Numba 1D sum kernels that can be shared by
* Dataframe / Series
* groupby
* rolling / expanding

Mirrors pandas/_libs/window/aggregation.pyx

---
## add_sum
```python
from sum_ import add_sum
```



---
## remove_sum
```python
from sum_ import remove_sum
```



---
## sliding_sum
```python
from sum_ import sliding_sum
```



---
## grouped_kahan_sum
```python
from sum_ import grouped_kahan_sum
```



---
## grouped_sum
```python
from sum_ import grouped_sum
```



---
## __name__
```python
from min_max_ import __name__
```

Numba 1D min/max kernels that can be shared by
* Dataframe / Series
* groupby
* rolling / expanding

Mirrors pandas/_libs/window/aggregation.pyx

---
## sliding_min_max
```python
from min_max_ import sliding_min_max
```



---
## grouped_min_max
```python
from min_max_ import grouped_min_max
```



---
## __name__
```python
from mean_ import __name__
```

Numba 1D mean kernels that can be shared by
* Dataframe / Series
* groupby
* rolling / expanding

Mirrors pandas/_libs/window/aggregation.pyx

---
## add_mean
```python
from mean_ import add_mean
```



---
## remove_mean
```python
from mean_ import remove_mean
```



---
## sliding_mean
```python
from mean_ import sliding_mean
```



---
## grouped_mean
```python
from mean_ import grouped_mean
```



---
## __name__
```python
from shared import __name__
```



---
## is_monotonic_increasing
```python
from shared import is_monotonic_increasing
```

Check if int64 values are monotonically increasing.

---
## __name__
```python
from var_ import __name__
```

Numba 1D var kernels that can be shared by
* Dataframe / Series
* groupby
* rolling / expanding

Mirrors pandas/_libs/window/aggregation.pyx

---
## add_var
```python
from var_ import add_var
```



---
## remove_var
```python
from var_ import remove_var
```



---
## sliding_var
```python
from var_ import sliding_var
```



---
## grouped_var
```python
from var_ import grouped_var
```



---
## ArrowAccessor
```python
from accessors import ArrowAccessor
```



---
## ListAccessor
```python
from accessors import ListAccessor
```

Accessor object for list data properties of the Series values.

Parameters
----------
data : Series
    Series containing Arrow list data.

---
## StructAccessor
```python
from accessors import StructAccessor
```

Accessor object for structured data properties of the Series values.

Parameters
----------
data : Series
    Series containing Arrow struct data.

---
## _is_valid_pyarrow_dtype
```python
from accessors import _is_valid_pyarrow_dtype
```



---
## _validate
```python
from accessors import _validate
```



---
## _pa_array
```python
from accessors import _pa_array
```



---
## len
```python
from accessors import len
```

Return the length of each list in the Series.

Returns
-------
pandas.Series
    The length of each list.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         [1, 2, 3],
...         [3],
...     ],
...     dtype=pd.ArrowDtype(pa.list_(
...         pa.int64()
...     ))
... )
>>> s.list.len()
0    3
1    1
dtype: int32[pyarrow]

---
## __getitem__
```python
from accessors import __getitem__
```

Index or slice lists in the Series.

Parameters
----------
key : int | slice
    Index or slice of indices to access from each list.

Returns
-------
pandas.Series
    The list at requested index.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         [1, 2, 3],
...         [3],
...     ],
...     dtype=pd.ArrowDtype(pa.list_(
...         pa.int64()
...     ))
... )
>>> s.list[0]
0    1
1    3
dtype: int64[pyarrow]

---
## __iter__
```python
from accessors import __iter__
```



---
## flatten
```python
from accessors import flatten
```

Flatten list values.

Returns
-------
pandas.Series
    The data from all lists in the series flattened.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         [1, 2, 3],
...         [3],
...     ],
...     dtype=pd.ArrowDtype(pa.list_(
...         pa.int64()
...     ))
... )
>>> s.list.flatten()
0    1
1    2
2    3
3    3
dtype: int64[pyarrow]

---
## dtypes
```python
from accessors import dtypes
```

Return the dtype object of each child field of the struct.

Returns
-------
pandas.Series
    The data type of each child field.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         {"version": 1, "project": "pandas"},
...         {"version": 2, "project": "pandas"},
...         {"version": 1, "project": "numpy"},
...     ],
...     dtype=pd.ArrowDtype(pa.struct(
...         [("version", pa.int64()), ("project", pa.string())]
...     ))
... )
>>> s.struct.dtypes
version     int64[pyarrow]
project    string[pyarrow]
dtype: object

---
## field
```python
from accessors import field
```

Extract a child field of a struct as a Series.

Parameters
----------
name_or_index : str | bytes | int | expression | list
    Name or index of the child field to extract.

    For list-like inputs, this will index into a nested
    struct.

Returns
-------
pandas.Series
    The data corresponding to the selected child field.

See Also
--------
Series.struct.explode : Return all child fields as a DataFrame.

Notes
-----
The name of the resulting Series will be set using the following
rules:

- For string, bytes, or integer `name_or_index` (or a list of these, for
  a nested selection), the Series name is set to the selected
  field's name.
- For a :class:`pyarrow.compute.Expression`, this is set to
  the string form of the expression.
- For list-like `name_or_index`, the name will be set to the
  name of the final field selected.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         {"version": 1, "project": "pandas"},
...         {"version": 2, "project": "pandas"},
...         {"version": 1, "project": "numpy"},
...     ],
...     dtype=pd.ArrowDtype(pa.struct(
...         [("version", pa.int64()), ("project", pa.string())]
...     ))
... )

Extract by field name.

>>> s.struct.field("project")
0    pandas
1    pandas
2     numpy
Name: project, dtype: string[pyarrow]

Extract by field index.

>>> s.struct.field(0)
0    1
1    2
2    1
Name: version, dtype: int64[pyarrow]

Or an expression

>>> import pyarrow.compute as pc
>>> s.struct.field(pc.field("project"))
0    pandas
1    pandas
2     numpy
Name: project, dtype: string[pyarrow]

For nested struct types, you can pass a list of values to index
multiple levels:

>>> version_type = pa.struct([
...     ("major", pa.int64()),
...     ("minor", pa.int64()),
... ])
>>> s = pd.Series(
...     [
...         {"version": {"major": 1, "minor": 5}, "project": "pandas"},
...         {"version": {"major": 2, "minor": 1}, "project": "pandas"},
...         {"version": {"major": 1, "minor": 26}, "project": "numpy"},
...     ],
...     dtype=pd.ArrowDtype(pa.struct(
...         [("version", version_type), ("project", pa.string())]
...     ))
... )
>>> s.struct.field(["version", "minor"])
0     5
1     1
2    26
Name: minor, dtype: int64[pyarrow]
>>> s.struct.field([0, 0])
0    1
1    2
2    1
Name: major, dtype: int64[pyarrow]

---
## explode
```python
from accessors import explode
```

Extract all child fields of a struct as a DataFrame.

Returns
-------
pandas.DataFrame
    The data corresponding to all child fields.

See Also
--------
Series.struct.field : Return a single child field as a Series.

Examples
--------
>>> import pyarrow as pa
>>> s = pd.Series(
...     [
...         {"version": 1, "project": "pandas"},
...         {"version": 2, "project": "pandas"},
...         {"version": 1, "project": "numpy"},
...     ],
...     dtype=pd.ArrowDtype(pa.struct(
...         [("version", pa.int64()), ("project", pa.string())]
...     ))
... )

>>> s.struct.explode()
   version project
0        1  pandas
1        2  pandas
2        1   numpy

---
## get_name
```python
from accessors import get_name
```



---
## __name__
```python
from _arrow_utils import __name__
```



---
## fallback_performancewarning
```python
from _arrow_utils import fallback_performancewarning
```

Raise a PerformanceWarning for falling back to ExtensionArray's
non-pyarrow method

---
## pyarrow_array_to_numpy_and_mask
```python
from _arrow_utils import pyarrow_array_to_numpy_and_mask
```

Convert a primitive pyarrow.Array to a numpy array and boolean mask based
on the buffers of the Array.

At the moment pyarrow.BooleanArray is not supported.

Parameters
----------
arr : pyarrow.Array
dtype : numpy.dtype

Returns
-------
(data, mask)
    Tuple of two numpy arrays with the raw data (with specified dtype) and
    a boolean mask (validity mask, so False means missing)

---
## __name__
```python
from extension_types import __name__
```



---
## ArrowPeriodType
```python
from extension_types import ArrowPeriodType
```



---
## ArrowIntervalType
```python
from extension_types import ArrowIntervalType
```



---
## patch_pyarrow
```python
from extension_types import patch_pyarrow
```



---
## __init__
```python
from extension_types import __init__
```



---
## freq
```python
from extension_types import freq
```



---
## __arrow_ext_serialize__
```python
from extension_types import __arrow_ext_serialize__
```



---
## __arrow_ext_deserialize__
```python
from extension_types import __arrow_ext_deserialize__
```



---
## __eq__
```python
from extension_types import __eq__
```



---
## __ne__
```python
from extension_types import __ne__
```



---
## __hash__
```python
from extension_types import __hash__
```



---
## to_pandas_dtype
```python
from extension_types import to_pandas_dtype
```



---
## subtype
```python
from extension_types import subtype
```



---
## closed
```python
from extension_types import closed
```



---
## ForbiddenExtensionType
```python
from extension_types import ForbiddenExtensionType
```



---
## get_unit_from_pa_dtype
```python
from array import get_unit_from_pa_dtype
```



---
## to_pyarrow_type
```python
from array import to_pyarrow_type
```

Convert dtype to a pyarrow type instance.

---
## ArrowExtensionArray
```python
from array import ArrowExtensionArray
```

Pandas ExtensionArray backed by a PyArrow ChunkedArray.

.. warning::

   ArrowExtensionArray is considered experimental. The implementation and
   parts of the API may change without warning.

Parameters
----------
values : pyarrow.Array or pyarrow.ChunkedArray

Attributes
----------
None

Methods
-------
None

Returns
-------
ArrowExtensionArray

Notes
-----
Most methods are implemented using `pyarrow compute functions. <https://arrow.apache.org/docs/python/api/compute.html>`__
Some methods may either raise an exception or raise a ``PerformanceWarning`` if an
associated compute function is not available based on the installed version of PyArrow.

Please install the latest version of PyArrow to enable the best functionality and avoid
potential bugs in prior versions of PyArrow.

Examples
--------
Create an ArrowExtensionArray with :func:`pandas.array`:

>>> pd.array([1, 1, None], dtype="int64[pyarrow]")
<ArrowExtensionArray>
[1, 1, <NA>]
Length: 3, dtype: int64[pyarrow]

---
## transpose_homogeneous_pyarrow
```python
from array import transpose_homogeneous_pyarrow
```

Transpose arrow extension arrays in a list, but faster.

Input should be a list of arrays of equal length and all have the same
dtype. The caller is responsible for ensuring validity of input data.

---
## cast_for_truediv
```python
from array import cast_for_truediv
```



---
## floordiv_compat
```python
from array import floordiv_compat
```



---
## __init__
```python
from array import __init__
```



---
## _from_sequence
```python
from array import _from_sequence
```



---
## _from_sequence_of_strings
```python
from array import _from_sequence_of_strings
```



---
## _box_pa
```python
from array import _box_pa
```

Box value into a pyarrow Array, ChunkedArray or Scalar.

Parameters
----------
value : any
pa_type : pa.DataType | None

Returns
-------
pa.Array or pa.ChunkedArray or pa.Scalar

---
## _box_pa_scalar
```python
from array import _box_pa_scalar
```

Box value into a pyarrow Scalar.

Parameters
----------
value : any
pa_type : pa.DataType | None

Returns
-------
pa.Scalar

---
## _box_pa_array
```python
from array import _box_pa_array
```

Box value into a pyarrow Array or ChunkedArray.

Parameters
----------
value : Sequence
pa_type : pa.DataType | None

Returns
-------
pa.Array or pa.ChunkedArray

---
## __getitem__
```python
from array import __getitem__
```



---
## __iter__
```python
from array import __iter__
```

Iterate over elements of the array.

---
## __arrow_array__
```python
from array import __arrow_array__
```

Convert myself to a pyarrow ChunkedArray.

---
## __array__
```python
from array import __array__
```



---
## __invert__
```python
from array import __invert__
```



---
## __neg__
```python
from array import __neg__
```



---
## __pos__
```python
from array import __pos__
```



---
## __abs__
```python
from array import __abs__
```



---
## __getstate__
```python
from array import __getstate__
```



---
## __setstate__
```python
from array import __setstate__
```

Necessary for making this object picklable

---
## _cmp_method
```python
from array import _cmp_method
```



---
## _evaluate_op_method
```python
from array import _evaluate_op_method
```



---
## _logical_method
```python
from array import _logical_method
```



---
## _arith_method
```python
from array import _arith_method
```



---
## equals
```python
from array import equals
```



---
## dtype
```python
from array import dtype
```



---
## nbytes
```python
from array import nbytes
```



---
## __len__
```python
from array import __len__
```



---
## __contains__
```python
from array import __contains__
```



---
## _hasna
```python
from array import _hasna
```



---
## isna
```python
from array import isna
```



---
## any
```python
from array import any
```

Tests whether at least one of elements evaluate True

Returns
-------
any : bool

See Also
--------
numpy.any

---
## all
```python
from array import all
```

Tests whether all elements evaluate True

Returns
-------
all : bool

See Also
--------
numpy.all

---
## argsort
```python
from array import argsort
```



---
## _argmin_max
```python
from array import _argmin_max
```



---
## argmin
```python
from array import argmin
```



---
## argmax
```python
from array import argmax
```



---
## copy
```python
from array import copy
```



---
## dropna
```python
from array import dropna
```

Return ArrowExtensionArray without NA values.

Returns
-------
ArrowExtensionArray

---
## _pad_or_backfill
```python
from array import _pad_or_backfill
```



---
## fillna
```python
from array import fillna
```



---
## isin
```python
from array import isin
```



---
## _values_for_factorize
```python
from array import _values_for_factorize
```



---
## factorize
```python
from array import factorize
```



---
## reshape
```python
from array import reshape
```



---
## round
```python
from array import round
```

Round each value in the array a to the given number of decimals.

Parameters
----------
decimals : int, default 0
    Number of decimal places to round to. If decimals is negative,
    it specifies the number of positions to the left of the decimal point.
*args, **kwargs
    Additional arguments and keywords have no effect.

Returns
-------
ArrowExtensionArray
    Rounded values of the ArrowExtensionArray.

See Also
--------
DataFrame.round : Round values of a DataFrame.
Series.round : Round values of a Series.

---
## searchsorted
```python
from array import searchsorted
```



---
## take
```python
from array import take
```



---
## _maybe_convert_datelike_array
```python
from array import _maybe_convert_datelike_array
```

Maybe convert to a datelike array.

---
## _to_datetimearray
```python
from array import _to_datetimearray
```

Convert a pyarrow timestamp typed array to a DatetimeArray.

---
## _to_timedeltaarray
```python
from array import _to_timedeltaarray
```

Convert a pyarrow duration typed array to a TimedeltaArray.

---
## _values_for_json
```python
from array import _values_for_json
```



---
## to_numpy
```python
from array import to_numpy
```



---
## map
```python
from array import map
```

Map categories using an input mapping or function.

Parameters
----------
mapper : dict, Series, callable
    The correspondence from old values to new.
na_action : {None, 'ignore'}, default None
    If 'ignore', propagate NA values, without passing them to the
    mapping correspondence.

Returns
-------
SparseArray
    The output array will have the same density as the input.
    The output fill value will be the result of applying the
    mapping to ``self.fill_value``

Examples
--------
>>> arr = pd.arrays.SparseArray([0, 1, 2])
>>> arr.map(lambda x: x + 10)
[10, 11, 12]
Fill: 10
IntIndex
Indices: array([1, 2], dtype=int32)

>>> arr.map({0: 10, 1: 11, 2: 12})
[10, 11, 12]
Fill: 10
IntIndex
Indices: array([1, 2], dtype=int32)

>>> arr.map(pd.Series([10, 11, 12], index=[0, 1, 2]))
[10, 11, 12]
Fill: 10
IntIndex
Indices: array([1, 2], dtype=int32)

---
## duplicated
```python
from array import duplicated
```



---
## unique
```python
from array import unique
```



---
## value_counts
```python
from array import value_counts
```



---
## _concat_same_type
```python
from array import _concat_same_type
```



---
## _accumulate
```python
from array import _accumulate
```

Return an ExtensionArray performing an accumulation operation.

The underlying data type might change.

Parameters
----------
name : str
    Name of the function, supported values are:
    - cummin
    - cummax
    - cumsum
    - cumprod
skipna : bool, default True
    If True, skip NA values.
**kwargs
    Additional keyword arguments passed to the accumulation function.
    Currently, there is no supported kwarg.

Returns
-------
array

Raises
------
NotImplementedError : subclass does not define accumulations

---
## _reduce_pyarrow
```python
from array import _reduce_pyarrow
```

Return a pyarrow scalar result of performing the reduction operation.

Parameters
----------
name : str
    Name of the function, supported values are:
    { any, all, min, max, sum, mean, median, prod,
    std, var, sem, kurt, skew }.
skipna : bool, default True
    If True, skip NaN values.
**kwargs
    Additional keyword arguments passed to the reduction function.
    Currently, `ddof` is the only supported kwarg.

Returns
-------
pyarrow scalar

Raises
------
TypeError : subclass does not define reductions

---
## _reduce
```python
from array import _reduce
```



---
## _reduce_calc
```python
from array import _reduce_calc
```



---
## _explode
```python
from array import _explode
```

See Series.explode.__doc__.

---
## __setitem__
```python
from array import __setitem__
```



---
## _rank_calc
```python
from array import _rank_calc
```



---
## _rank
```python
from array import _rank
```

See Series.rank.__doc__.

---
## _quantile
```python
from array import _quantile
```

Compute the quantiles of self for each quantile in `qs`.

Parameters
----------
qs : np.ndarray[float64]
interpolation: str

Returns
-------
same type as self

---
## _mode
```python
from array import _mode
```

Returns the mode(s) of the ExtensionArray.

Always returns `ExtensionArray` even if only one value.

Parameters
----------
dropna : bool, default True
    Don't consider counts of NA values.

Returns
-------
same type as self
    Sorted, if possible.

---
## _maybe_convert_setitem_value
```python
from array import _maybe_convert_setitem_value
```

Maybe convert value to be pyarrow compatible.

---
## interpolate
```python
from array import interpolate
```

See NDFrame.interpolate.__doc__.

---
## _if_else
```python
from array import _if_else
```

Choose values based on a condition.

Analogous to pyarrow.compute.if_else, with logic
to fallback to numpy for unsupported types.

Parameters
----------
cond : npt.NDArray[np.bool_] or bool
left : ArrayLike | Scalar
right : ArrayLike | Scalar

Returns
-------
pa.Array

---
## _replace_with_mask
```python
from array import _replace_with_mask
```

Replace items selected with a mask.

Analogous to pyarrow.compute.replace_with_mask, with logic
to fallback to numpy for unsupported types.

Parameters
----------
values : pa.Array or pa.ChunkedArray
mask : npt.NDArray[np.bool_] or bool
replacements : ArrayLike or Scalar
    Replacement value(s)

Returns
-------
pa.Array or pa.ChunkedArray

---
## _to_masked
```python
from array import _to_masked
```



---
## _groupby_op
```python
from array import _groupby_op
```



---
## _apply_elementwise
```python
from array import _apply_elementwise
```

Apply a callable to each element while maintaining the chunking structure.

---
## _str_count
```python
from array import _str_count
```



---
## _str_contains
```python
from array import _str_contains
```



---
## _str_startswith
```python
from array import _str_startswith
```



---
## _str_endswith
```python
from array import _str_endswith
```



---
## _str_replace
```python
from array import _str_replace
```



---
## _str_repeat
```python
from array import _str_repeat
```



---
## _str_match
```python
from array import _str_match
```



---
## _str_fullmatch
```python
from array import _str_fullmatch
```



---
## _str_find
```python
from array import _str_find
```



---
## _str_join
```python
from array import _str_join
```



---
## _str_partition
```python
from array import _str_partition
```



---
## _str_rpartition
```python
from array import _str_rpartition
```



---
## _str_slice
```python
from array import _str_slice
```



---
## _str_isalnum
```python
from array import _str_isalnum
```



---
## _str_isalpha
```python
from array import _str_isalpha
```



---
## _str_isdecimal
```python
from array import _str_isdecimal
```



---
## _str_isdigit
```python
from array import _str_isdigit
```



---
## _str_islower
```python
from array import _str_islower
```



---
## _str_isnumeric
```python
from array import _str_isnumeric
```



---
## _str_isspace
```python
from array import _str_isspace
```



---
## _str_istitle
```python
from array import _str_istitle
```



---
## _str_isupper
```python
from array import _str_isupper
```



---
## _str_len
```python
from array import _str_len
```



---
## _str_lower
```python
from array import _str_lower
```



---
## _str_upper
```python
from array import _str_upper
```



---
## _str_strip
```python
from array import _str_strip
```



---
## _str_lstrip
```python
from array import _str_lstrip
```



---
## _str_rstrip
```python
from array import _str_rstrip
```



---
## _str_removeprefix
```python
from array import _str_removeprefix
```



---
## _str_casefold
```python
from array import _str_casefold
```



---
## _str_encode
```python
from array import _str_encode
```



---
## _str_extract
```python
from array import _str_extract
```



---
## _str_findall
```python
from array import _str_findall
```



---
## _str_get_dummies
```python
from array import _str_get_dummies
```



---
## _str_index
```python
from array import _str_index
```



---
## _str_rindex
```python
from array import _str_rindex
```



---
## _str_normalize
```python
from array import _str_normalize
```



---
## _str_rfind
```python
from array import _str_rfind
```



---
## _str_split
```python
from array import _str_split
```



---
## _str_rsplit
```python
from array import _str_rsplit
```



---
## _str_translate
```python
from array import _str_translate
```



---
## _str_wrap
```python
from array import _str_wrap
```



---
## _dt_days
```python
from array import _dt_days
```



---
## _dt_hours
```python
from array import _dt_hours
```



---
## _dt_minutes
```python
from array import _dt_minutes
```



---
## _dt_seconds
```python
from array import _dt_seconds
```



---
## _dt_milliseconds
```python
from array import _dt_milliseconds
```



---
## _dt_microseconds
```python
from array import _dt_microseconds
```



---
## _dt_nanoseconds
```python
from array import _dt_nanoseconds
```



---
## _dt_to_pytimedelta
```python
from array import _dt_to_pytimedelta
```



---
## _dt_total_seconds
```python
from array import _dt_total_seconds
```



---
## _dt_as_unit
```python
from array import _dt_as_unit
```



---
## _dt_year
```python
from array import _dt_year
```



---
## _dt_day
```python
from array import _dt_day
```



---
## _dt_day_of_week
```python
from array import _dt_day_of_week
```



---
## _dt_day_of_year
```python
from array import _dt_day_of_year
```



---
## _dt_hour
```python
from array import _dt_hour
```



---
## _dt_isocalendar
```python
from array import _dt_isocalendar
```



---
## _dt_is_leap_year
```python
from array import _dt_is_leap_year
```



---
## _dt_is_month_start
```python
from array import _dt_is_month_start
```



---
## _dt_is_month_end
```python
from array import _dt_is_month_end
```



---
## _dt_is_year_start
```python
from array import _dt_is_year_start
```



---
## _dt_is_year_end
```python
from array import _dt_is_year_end
```



---
## _dt_is_quarter_start
```python
from array import _dt_is_quarter_start
```



---
## _dt_is_quarter_end
```python
from array import _dt_is_quarter_end
```



---
## _dt_days_in_month
```python
from array import _dt_days_in_month
```



---
## _dt_microsecond
```python
from array import _dt_microsecond
```



---
## _dt_minute
```python
from array import _dt_minute
```



---
## _dt_month
```python
from array import _dt_month
```



---
## _dt_nanosecond
```python
from array import _dt_nanosecond
```



---
## _dt_quarter
```python
from array import _dt_quarter
```



---
## _dt_second
```python
from array import _dt_second
```



---
## _dt_date
```python
from array import _dt_date
```



---
## _dt_time
```python
from array import _dt_time
```



---
## _dt_tz
```python
from array import _dt_tz
```



---
## _dt_unit
```python
from array import _dt_unit
```



---
## _dt_normalize
```python
from array import _dt_normalize
```



---
## _dt_strftime
```python
from array import _dt_strftime
```



---
## _round_temporally
```python
from array import _round_temporally
```



---
## _dt_ceil
```python
from array import _dt_ceil
```



---
## _dt_floor
```python
from array import _dt_floor
```



---
## _dt_round
```python
from array import _dt_round
```



---
## _dt_day_name
```python
from array import _dt_day_name
```



---
## _dt_month_name
```python
from array import _dt_month_name
```



---
## _dt_to_pydatetime
```python
from array import _dt_to_pydatetime
```



---
## _dt_tz_localize
```python
from array import _dt_tz_localize
```



---
## _dt_tz_convert
```python
from array import _dt_tz_convert
```



---
## _to_numpy_and_type
```python
from array import _to_numpy_and_type
```



---
## pyarrow_meth
```python
from array import pyarrow_meth
```



---
## BaseAccessor
```python
from accessor import BaseAccessor
```



---
## SparseAccessor
```python
from accessor import SparseAccessor
```

Accessor for SparseSparse from other sparse matrix data types.

Examples
--------
>>> ser = pd.Series([0, 0, 2, 2, 2], dtype="Sparse[int]")
>>> ser.sparse.density
0.6
>>> ser.sparse.sp_values
array([2, 2, 2])

---
## SparseFrameAccessor
```python
from accessor import SparseFrameAccessor
```

DataFrame accessor for sparse data.

Examples
--------
>>> df = pd.DataFrame({"a": [1, 2, 0, 0],
...                   "b": [3, 0, 0, 4]}, dtype="Sparse[int]")
>>> df.sparse.density
0.5

---
## from_coo
```python
from accessor import from_coo
```

Create a Series with sparse values from a scipy.sparse.coo_matrix.

Parameters
----------
A : scipy.sparse.coo_matrix
dense_index : bool, default False
    If False (default), the index consists of only the
    coords of the non-null entries of the original coo_matrix.
    If True, the index consists of the full sorted
    (row, col) coordinates of the coo_matrix.

Returns
-------
s : Series
    A Series with sparse values.

Examples
--------
>>> from scipy import sparse

>>> A = sparse.coo_matrix(
...     ([3.0, 1.0, 2.0], ([1, 0, 0], [0, 2, 3])), shape=(3, 4)
... )
>>> A
<COOrdinate sparse matrix of dtype 'float64'
    with 3 stored elements and shape (3, 4)>

>>> A.todense()
matrix([[0., 0., 1., 2.],
[3., 0., 0., 0.],
[0., 0., 0., 0.]])

>>> ss = pd.Series.sparse.from_coo(A)
>>> ss
0  2    1.0
   3    2.0
1  0    3.0
dtype: Sparse[float64, nan]

---
## to_coo
```python
from accessor import to_coo
```

Return the contents of the frame as a sparse SciPy COO matrix.

Returns
-------
scipy.sparse.spmatrix
    If the caller is heterogeneous and contains booleans or objects,
    the result will be of dtype=object. See Notes.

Notes
-----
The dtype will be the lowest-common-denominator type (implicit
upcasting); that is to say if the dtypes (even of numeric types)
are mixed, the one that accommodates all will be chosen.

e.g. If the dtypes are float16 and float32, dtype will be upcast to
float32. By numpy.find_common_type convention, mixing int64 and
and uint64 will result in a float64 dtype.

Examples
--------
>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0, 1])})
>>> df.sparse.to_coo()
<COOrdinate sparse matrix of dtype 'int64'
    with 2 stored elements and shape (4, 1)>

---
## to_dense
```python
from accessor import to_dense
```

Convert a DataFrame with sparse values to dense.

Returns
-------
DataFrame
    A DataFrame with the same values stored as dense arrays.

Examples
--------
>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0])})
>>> df.sparse.to_dense()
   A
0  0
1  1
2  0

---
## from_spmatrix
```python
from accessor import from_spmatrix
```

Create a new DataFrame from a scipy sparse matrix.

Parameters
----------
data : scipy.sparse.spmatrix
    Must be convertible to csc format.
index, columns : Index, optional
    Row and column labels to use for the resulting DataFrame.
    Defaults to a RangeIndex.

Returns
-------
DataFrame
    Each column of the DataFrame is stored as a
    :class:`arrays.SparseArray`.

Examples
--------
>>> import scipy.sparse
>>> mat = scipy.sparse.eye(3, dtype=float)
>>> pd.DataFrame.sparse.from_spmatrix(mat)
     0    1    2
0  1.0    0    0
1    0  1.0    0
2    0    0  1.0

---
## density
```python
from accessor import density
```

Ratio of non-sparse points to total (dense) data points.

Examples
--------
>>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0, 1])})
>>> df.sparse.density
0.5

---
## _prep_index
```python
from accessor import _prep_index
```



---
## __name__
```python
from scipy_sparse import __name__
```

Interaction with scipy.sparse matrices.

Currently only includes to_coo helpers.

---
## _check_is_partition
```python
from scipy_sparse import _check_is_partition
```



---
## _levels_to_axis
```python
from scipy_sparse import _levels_to_axis
```

For a MultiIndexed sparse Series `ss`, return `ax_coords` and `ax_labels`,
where `ax_coords` are the coordinates along one of the two axes of the
destination sparse matrix, and `ax_labels` are the labels from `ss`' Index
which correspond to these coordinates.

Parameters
----------
ss : Series
levels : tuple/list
valid_ilocs : numpy.ndarray
    Array of integer positions of valid values for the sparse matrix in ss.
sort_labels : bool, default False
    Sort the axis labels before forming the sparse matrix. When `levels`
    refers to a single level, set to True for a faster execution.

Returns
-------
ax_coords : numpy.ndarray (axis coordinates)
ax_labels : list (axis labels)

---
## _to_ijv
```python
from scipy_sparse import _to_ijv
```

For an arbitrary MultiIndexed sparse Series return (v, i, j, ilabels,
jlabels) where (v, (i, j)) is suitable for passing to scipy.sparse.coo
constructor, and ilabels and jlabels are the row and column labels
respectively.

Parameters
----------
ss : Series
row_levels : tuple/list
column_levels : tuple/list
sort_labels : bool, default False
    Sort the row and column labels before forming the sparse matrix.
    When `row_levels` and/or `column_levels` refer to a single level,
    set to `True` for a faster execution.

Returns
-------
values : numpy.ndarray
    Valid values to populate a sparse matrix, extracted from
    ss.
i_coords : numpy.ndarray (row coordinates of the values)
j_coords : numpy.ndarray (column coordinates of the values)
i_labels : list (row labels)
j_labels : list (column labels)

---
## sparse_series_to_coo
```python
from scipy_sparse import sparse_series_to_coo
```

Convert a sparse Series to a scipy.sparse.coo_matrix using index
levels row_levels, column_levels as the row and column
labels respectively. Returns the sparse_matrix, row and column labels.

---
## coo_to_sparse_series
```python
from scipy_sparse import coo_to_sparse_series
```

Convert a scipy.sparse.coo_matrix to a Series with type sparse.

Parameters
----------
A : scipy.sparse.coo_matrix
dense_index : bool, default False

Returns
-------
Series

Raises
------
TypeError if A is not a coo_matrix

---
## _get_fill
```python
from array import _get_fill
```

Create a 0-dim ndarray containing the fill value

Parameters
----------
arr : SparseArray

Returns
-------
fill_value : ndarray
    0-dim ndarray with just the fill value.

Notes
-----
coerce fill_value to arr dtype if possible
int64 SparseArray can have NaN as fill_value if there is no missing

---
## _sparse_array_op
```python
from array import _sparse_array_op
```

Perform a binary operation between two arrays.

Parameters
----------
left : Union[SparseArray, ndarray]
right : Union[SparseArray, ndarray]
op : Callable
    The binary operation to perform
name str
    Name of the callable.

Returns
-------
SparseArray

---
## _wrap_result
```python
from array import _wrap_result
```

wrap op result to have correct dtype

---
## SparseArray
```python
from array import SparseArray
```

An ExtensionArray for storing sparse data.

Parameters
----------
data : array-like or scalar
    A dense array of values to store in the SparseArray. This may contain
    `fill_value`.
sparse_index : SparseIndex, optional
fill_value : scalar, optional
    Elements in data that are ``fill_value`` are not stored in the
    SparseArray. For memory savings, this should be the most common value
    in `data`. By default, `fill_value` depends on the dtype of `data`:

    =========== ==========
    data.dtype  na_value
    =========== ==========
    float       ``np.nan``
    int         ``0``
    bool        False
    datetime64  ``pd.NaT``
    timedelta64 ``pd.NaT``
    =========== ==========

    The fill value is potentially specified in three ways. In order of
    precedence, these are

    1. The `fill_value` argument
    2. ``dtype.fill_value`` if `fill_value` is None and `dtype` is
       a ``SparseDtype``
    3. ``data.dtype.fill_value`` if `fill_value` is None and `dtype`
       is not a ``SparseDtype`` and `data` is a ``SparseArray``.

kind : str
    Can be 'integer' or 'block', default is 'integer'.
    The type of storage for sparse locations.

    * 'block': Stores a `block` and `block_length` for each
      contiguous *span* of sparse values. This is best when
      sparse data tends to be clumped together, with large
      regions of ``fill-value`` values between sparse values.
    * 'integer': uses an integer to store the location of
      each sparse value.

dtype : np.dtype or SparseDtype, optional
    The dtype to use for the SparseArray. For numpy dtypes, this
    determines the dtype of ``self.sp_values``. For SparseDtype,
    this determines ``self.sp_values`` and ``self.fill_value``.
copy : bool, default False
    Whether to explicitly copy the incoming `data` array.

Attributes
----------
None

Methods
-------
None

Examples
--------
>>> from pandas.arrays import SparseArray
>>> arr = SparseArray([0, 0, 1, 2])
>>> arr
[0, 0, 1, 2]
Fill: 0
IntIndex
Indices: array([2, 3], dtype=int32)

---
## _make_sparse
```python
from array import _make_sparse
```

Convert ndarray to sparse format

Parameters
----------
arr : ndarray
kind : {'block', 'integer'}
fill_value : NaN or another value
dtype : np.dtype, optional
copy : bool, default False

Returns
-------
(sparse_values, index, fill_value) : (ndarray, SparseIndex, Scalar)

---
## make_sparse_index
```python
from array import make_sparse_index
```



---
## ellipsis
```python
from array import ellipsis
```



---
## _simple_new
```python
from array import _simple_new
```



---
## from_spmatrix
```python
from array import from_spmatrix
```

Create a SparseArray from a scipy.sparse matrix.

Parameters
----------
data : scipy.sparse.sp_matrix
    This should be a SciPy sparse matrix where the size
    of the second dimension is 1. In other words, a
    sparse matrix with a single column.

Returns
-------
SparseArray

Examples
--------
>>> import scipy.sparse
>>> mat = scipy.sparse.coo_matrix((4, 1))
>>> pd.arrays.SparseArray.from_spmatrix(mat)
[0.0, 0.0, 0.0, 0.0]
Fill: 0.0
IntIndex
Indices: array([], dtype=int32)

---
## _from_factorized
```python
from array import _from_factorized
```



---
## sp_index
```python
from array import sp_index
```

The SparseIndex containing the location of non- ``fill_value`` points.

---
## sp_values
```python
from array import sp_values
```

An ndarray containing the non- ``fill_value`` values.

Examples
--------
>>> from pandas.arrays import SparseArray
>>> s = SparseArray([0, 0, 1, 0, 2], fill_value=0)
>>> s.sp_values
array([1, 2])

---
## fill_value
```python
from array import fill_value
```



---
## kind
```python
from array import kind
```

The kind of sparse index for this array. One of {'integer', 'block'}.

---
## _valid_sp_values
```python
from array import _valid_sp_values
```



---
## _null_fill_value
```python
from array import _null_fill_value
```



---
## _fill_value_matches
```python
from array import _fill_value_matches
```



---
## density
```python
from array import density
```

The percent of non- ``fill_value`` points, as decimal.

Examples
--------
>>> from pandas.arrays import SparseArray
>>> s = SparseArray([0, 0, 1, 1, 1], fill_value=0)
>>> s.density
0.6

---
## npoints
```python
from array import npoints
```

The number of non- ``fill_value`` points.

Examples
--------
>>> from pandas.arrays import SparseArray
>>> s = SparseArray([0, 0, 1, 1, 1], fill_value=0)
>>> s.npoints
3

---
## shift
```python
from array import shift
```



---
## _first_fill_value_loc
```python
from array import _first_fill_value_loc
```

Get the location of the first fill value.

Returns
-------
int

---
## _get_val_at
```python
from array import _get_val_at
```



---
## _take_with_fill
```python
from array import _take_with_fill
```



---
## _take_without_fill
```python
from array import _take_without_fill
```



---
## astype
```python
from array import astype
```



---
## to_dense
```python
from array import to_dense
```

Convert SparseArray to a NumPy array.

Returns
-------
arr : NumPy array

---
## _where
```python
from array import _where
```



---
## nonzero
```python
from array import nonzero
```



---
## sum
```python
from array import sum
```

Sum of non-NA/null values

Parameters
----------
axis : int, default 0
    Not Used. NumPy compatibility.
min_count : int, default 0
    The required number of valid values to perform the summation. If fewer
    than ``min_count`` valid values are present, the result will be the missing
    value indicator for subarray type.
*args, **kwargs
    Not Used. NumPy compatibility.

Returns
-------
scalar

---
## cumsum
```python
from array import cumsum
```

Cumulative sum of non-NA/null values.

When performing the cumulative summation, any non-NA/null values will
be skipped. The resulting SparseArray will preserve the locations of
NaN values, but the fill value will be `np.nan` regardless.

Parameters
----------
axis : int or None
    Axis over which to perform the cumulative summation. If None,
    perform cumulative summation over flattened array.

Returns
-------
cumsum : SparseArray

---
## mean
```python
from array import mean
```

Mean of non-NA/null values

Returns
-------
mean : float

---
## max
```python
from array import max
```

Max of array values, ignoring NA values if specified.

Parameters
----------
axis : int, default 0
    Not Used. NumPy compatibility.
skipna : bool, default True
    Whether to ignore NA values.

Returns
-------
scalar

---
## min
```python
from array import min
```

Min of array values, ignoring NA values if specified.

Parameters
----------
axis : int, default 0
    Not Used. NumPy compatibility.
skipna : bool, default True
    Whether to ignore NA values.

Returns
-------
scalar

---
## _min_max
```python
from array import _min_max
```

Min/max of non-NA/null values

Parameters
----------
kind : {"min", "max"}
skipna : bool

Returns
-------
scalar

---
## _argmin_argmax
```python
from array import _argmin_argmax
```



---
## __array_ufunc__
```python
from array import __array_ufunc__
```



---
## _unary_method
```python
from array import _unary_method
```



---
## __repr__
```python
from array import __repr__
```



---
## _formatter
```python
from array import _formatter
```



---
## func
```python
from array import func
```



---
## InfinityType
```python
from __init__ import InfinityType
```



---
## NegativeInfinityType
```python
from __init__ import NegativeInfinityType
```



---
## InvalidVersion
```python
from __init__ import InvalidVersion
```

An invalid version was found, users should refer to PEP 440.

Examples
--------
>>> pd.util.version.Version('1.')
Traceback (most recent call last):
InvalidVersion: Invalid version: '1.'

---
## _BaseVersion
```python
from __init__ import _BaseVersion
```



---
## LegacyVersion
```python
from __init__ import LegacyVersion
```



---
## _parse_version_parts
```python
from __init__ import _parse_version_parts
```



---
## _legacy_cmpkey
```python
from __init__ import _legacy_cmpkey
```



---
## Version
```python
from __init__ import Version
```



---
## _parse_letter_version
```python
from __init__ import _parse_letter_version
```



---
## _parse_local_version
```python
from __init__ import _parse_local_version
```

Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").

---
## _cmpkey
```python
from __init__ import _cmpkey
```



---
## __neg__
```python
from __init__ import __neg__
```



---
## public
```python
from __init__ import public
```



---
## base_version
```python
from __init__ import base_version
```



---
## epoch
```python
from __init__ import epoch
```



---
## release
```python
from __init__ import release
```



---
## pre
```python
from __init__ import pre
```



---
## post
```python
from __init__ import post
```



---
## dev
```python
from __init__ import dev
```



---
## local
```python
from __init__ import local
```



---
## is_prerelease
```python
from __init__ import is_prerelease
```



---
## is_postrelease
```python
from __init__ import is_postrelease
```



---
## is_devrelease
```python
from __init__ import is_devrelease
```



---
## major
```python
from __init__ import major
```



---
## minor
```python
from __init__ import minor
```



---
## micro
```python
from __init__ import micro
```



---
## _C_Parser_Defaults
```python
from readers import _C_Parser_Defaults
```



---
## _Fwf_Defaults
```python
from readers import _Fwf_Defaults
```



---
## _DeprecationConfig
```python
from readers import _DeprecationConfig
```



---
## validate_integer
```python
from readers import validate_integer
```

Checks whether the 'name' parameter for parsing is either
an integer OR float that can SAFELY be cast to an integer
without losing accuracy. Raises a ValueError if that is
not the case.

Parameters
----------
name : str
    Parameter name (used for error reporting)
val : int or float
    The value to check
min_val : int
    Minimum allowed value (val < min_val will result in a ValueError)

---
## _validate_names
```python
from readers import _validate_names
```

Raise ValueError if the `names` parameter contains duplicates or has an
invalid data type.

Parameters
----------
names : array-like or None
    An array containing a list of the names used for the output DataFrame.

Raises
------
ValueError
    If names are not unique or are not ordered (e.g. set).

---
## _read
```python
from readers import _read
```

Generic reader of line files.

---
## read_csv
```python
from readers import read_csv
```



---
## read_table
```python
from readers import read_table
```



---
## read_fwf
```python
from readers import read_fwf
```

Read a table of fixed-width formatted lines into DataFrame.

Also supports optionally iterating or breaking of the file
into chunks.

Additional help can be found in the `online docs for IO Tools
<https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html>`_.

Parameters
----------
filepath_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a text ``read()`` function.The string could be a URL.
    Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
    expected. A local file could be:
    ``file://localhost/path/to/table.csv``.
colspecs : list of tuple (int, int) or 'infer'. optional
    A list of tuples giving the extents of the fixed-width
    fields of each line as half-open intervals (i.e.,  [from, to[ ).
    String value 'infer' can be used to instruct the parser to try
    detecting the column specifications from the first 100 rows of
    the data which are not being skipped via skiprows (default='infer').
widths : list of int, optional
    A list of field widths which can be used instead of 'colspecs' if
    the intervals are contiguous.
infer_nrows : int, default 100
    The number of rows to consider when letting the parser determine the
    `colspecs`.
dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

**kwds : optional
    Optional keyword arguments can be passed to ``TextFileReader``.

Returns
-------
DataFrame or TextFileReader
    A comma-separated values (csv) file is returned as two-dimensional
    data structure with labeled axes.

See Also
--------
DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file.
read_csv : Read a comma-separated values (csv) file into DataFrame.

Examples
--------
>>> pd.read_fwf('data.csv')  # doctest: +SKIP

---
## TextFileReader
```python
from readers import TextFileReader
```

Passed dialect overrides any of the related parser options

---
## TextParser
```python
from readers import TextParser
```

Converts lists of lists/tuples into DataFrames with proper type inference
and optional (e.g. string to datetime) conversion. Also enables iterating
lazily over chunks of large files

Parameters
----------
data : file-like object or list
delimiter : separator character to use
dialect : str or csv.Dialect instance, optional
    Ignored if delimiter is longer than 1 character
names : sequence, default
header : int, default 0
    Row to use to parse column labels. Defaults to the first row. Prior
    rows will be discarded
index_col : int or list, optional
    Column or columns to use as the (possibly hierarchical) index
has_index_names: bool, default False
    True if the cols defined in index_col have an index name and are
    not in the header.
na_values : scalar, str, list-like, or dict, optional
    Additional strings to recognize as NA/NaN.
keep_default_na : bool, default True
thousands : str, optional
    Thousands separator
comment : str, optional
    Comment out remainder of line
parse_dates : bool, default False
keep_date_col : bool, default False
date_parser : function, optional

    .. deprecated:: 2.0.0
date_format : str or dict of column -> format, default ``None``

    .. versionadded:: 2.0.0
skiprows : list of integers
    Row numbers to skip
skipfooter : int
    Number of line at bottom of file to skip
converters : dict, optional
    Dict of functions for converting values in certain columns. Keys can
    either be integers or column labels, values are functions that take one
    input argument, the cell (not column) content, and return the
    transformed content.
encoding : str, optional
    Encoding to use for UTF when reading/writing (ex. 'utf-8')
float_precision : str, optional
    Specifies which converter the C engine should use for floating-point
    values. The options are `None` or `high` for the ordinary converter,
    `legacy` for the original lower precision pandas converter, and
    `round_trip` for the round-trip converter.

---
## _clean_na_values
```python
from readers import _clean_na_values
```



---
## _floatify_na_values
```python
from readers import _floatify_na_values
```



---
## _stringify_na_values
```python
from readers import _stringify_na_values
```

return a stringified and numeric for these values

---
## _refine_defaults_read
```python
from readers import _refine_defaults_read
```

Validate/refine default values of input parameters of read_csv, read_table.

Parameters
----------
dialect : str or csv.Dialect
    If provided, this parameter will override values (default or not) for the
    following parameters: `delimiter`, `doublequote`, `escapechar`,
    `skipinitialspace`, `quotechar`, and `quoting`. If it is necessary to
    override values, a ParserWarning will be issued. See csv.Dialect
    documentation for more details.
delimiter : str or object
    Alias for sep.
delim_whitespace : bool
    Specifies whether or not whitespace (e.g. ``' '`` or ``'        '``) will be
    used as the sep. Equivalent to setting ``sep='\s+'``. If this option
    is set to True, nothing should be passed in for the ``delimiter``
    parameter.

    .. deprecated:: 2.2.0
        Use ``sep="\s+"`` instead.
engine : {{'c', 'python'}}
    Parser engine to use. The C engine is faster while the python engine is
    currently more feature-complete.
sep : str or object
    A delimiter provided by the user (str) or a sentinel value, i.e.
    pandas._libs.lib.no_default.
on_bad_lines : str, callable
    An option for handling bad lines or a sentinel value(None).
names : array-like, optional
    List of column names to use. If the file contains a header row,
    then you should explicitly pass ``header=0`` to override the column names.
    Duplicates in this list are not allowed.
defaults: dict
    Default values of input parameters.

Returns
-------
kwds : dict
    Input parameters with correct values.

Raises
------
ValueError :
    If a delimiter was specified with ``sep`` (or ``delimiter``) and
    ``delim_whitespace=True``.

---
## _extract_dialect
```python
from readers import _extract_dialect
```

Extract concrete csv dialect instance.

Returns
-------
csv.Dialect or None

---
## _validate_dialect
```python
from readers import _validate_dialect
```

Validate csv dialect instance.

Raises
------
ValueError
    If incorrect dialect is provided.

---
## _merge_with_dialect_properties
```python
from readers import _merge_with_dialect_properties
```

Merge default kwargs in TextFileReader with dialect parameters.

Parameters
----------
dialect : csv.Dialect
    Concrete csv dialect. See csv.Dialect documentation for more details.
defaults : dict
    Keyword arguments passed to TextFileReader.

Returns
-------
kwds : dict
    Updated keyword arguments, merged with dialect parameters.

---
## _validate_skipfooter
```python
from readers import _validate_skipfooter
```

Check whether skipfooter is compatible with other kwargs in TextFileReader.

Parameters
----------
kwds : dict
    Keyword arguments passed to TextFileReader.

Raises
------
ValueError
    If skipfooter is not compatible with other parameters.

---
## close
```python
from readers import close
```



---
## _get_options_with_defaults
```python
from readers import _get_options_with_defaults
```



---
## _check_file_or_buffer
```python
from readers import _check_file_or_buffer
```



---
## _clean_options
```python
from readers import _clean_options
```



---
## __next__
```python
from readers import __next__
```



---
## _make_engine
```python
from readers import _make_engine
```



---
## _failover_to_python
```python
from readers import _failover_to_python
```



---
## read
```python
from readers import read
```



---
## get_chunk
```python
from readers import get_chunk
```



---
## __enter__
```python
from readers import __enter__
```



---
## __exit__
```python
from readers import __exit__
```



---
## __name__
```python
from python_parser import __name__
```



---
## PythonParser
```python
from python_parser import PythonParser
```



---
## FixedWidthReader
```python
from python_parser import FixedWidthReader
```

A reader of fixed-width lines.

---
## FixedWidthFieldParser
```python
from python_parser import FixedWidthFieldParser
```

Specialization that Converts fixed-width fields into DataFrames.
See PythonParser for details.

---
## count_empty_vals
```python
from python_parser import count_empty_vals
```



---
## _validate_skipfooter_arg
```python
from python_parser import _validate_skipfooter_arg
```

Validate the 'skipfooter' parameter.

Checks whether 'skipfooter' is a non-negative integer.
Raises a ValueError if that is not the case.

Parameters
----------
skipfooter : non-negative integer
    The number of rows to skip at the end of the file.

Returns
-------
validated_skipfooter : non-negative integer
    The original input if the validation succeeds.

Raises
------
ValueError : 'skipfooter' was not a non-negative integer.

---
## __init__
```python
from python_parser import __init__
```



---
## num
```python
from python_parser import num
```



---
## _make_reader
```python
from python_parser import _make_reader
```



---
## read
```python
from python_parser import read
```



---
## _exclude_implicit_index
```python
from python_parser import _exclude_implicit_index
```



---
## get_chunk
```python
from python_parser import get_chunk
```



---
## _convert_data
```python
from python_parser import _convert_data
```



---
## _have_mi_columns
```python
from python_parser import _have_mi_columns
```



---
## _infer_columns
```python
from python_parser import _infer_columns
```



---
## _header_line
```python
from python_parser import _header_line
```



---
## _handle_usecols
```python
from python_parser import _handle_usecols
```

Sets self._col_indices

usecols_key is used if there are string usecols.

---
## _buffered_line
```python
from python_parser import _buffered_line
```

Return a line from buffer, filling buffer if required.

---
## _check_for_bom
```python
from python_parser import _check_for_bom
```

Checks whether the file begins with the BOM character.
If it does, remove it. In addition, if there is quoting
in the field subsequent to the BOM, remove it as well
because it technically takes place at the beginning of
the name, not the middle of it.

---
## _is_line_empty
```python
from python_parser import _is_line_empty
```

Check if a line is empty or not.

Parameters
----------
line : str, array-like
    The line of data to check.

Returns
-------
boolean : Whether or not the line is empty.

---
## _next_line
```python
from python_parser import _next_line
```



---
## _alert_malformed
```python
from python_parser import _alert_malformed
```

Alert a user about a malformed row, depending on value of
`self.on_bad_lines` enum.

If `self.on_bad_lines` is ERROR, the alert will be `ParserError`.
If `self.on_bad_lines` is WARN, the alert will be printed out.

Parameters
----------
msg: str
    The error message to display.
row_num: int
    The row number where the parsing error occurred.
    Because this row number is displayed, we 1-index,
    even though we 0-index internally.

---
## _next_iter_line
```python
from python_parser import _next_iter_line
```

Wrapper around iterating through `self.data` (CSV source).

When a CSV error is raised, we check for specific
error messages that allow us to customize the
error message displayed to the user.

Parameters
----------
row_num: int
    The row number of the line being parsed.

---
## _check_comments
```python
from python_parser import _check_comments
```



---
## _remove_empty_lines
```python
from python_parser import _remove_empty_lines
```

Returns the list of lines without the empty ones. With fixed-width
fields, empty lines become arrays of empty strings.

See PythonParser._remove_empty_lines.

---
## _check_thousands
```python
from python_parser import _check_thousands
```



---
## _search_replace_num_columns
```python
from python_parser import _search_replace_num_columns
```



---
## _check_decimal
```python
from python_parser import _check_decimal
```



---
## _clear_buffer
```python
from python_parser import _clear_buffer
```



---
## _get_index_name
```python
from python_parser import _get_index_name
```

Try several cases to get lines:

0) There are headers on row 0 and row 1 and their
total summed lengths equals the length of the next line.
Treat row 0 as columns and row 1 as indices
1) Look for implicit index: there are more columns
on row 1 than row 0. If this is true, assume that row
1 lists index columns and row 0 lists normal columns.
2) Get index from the columns if it was listed.

---
## _rows_to_cols
```python
from python_parser import _rows_to_cols
```



---
## _get_lines
```python
from python_parser import _get_lines
```



---
## _remove_skipped_rows
```python
from python_parser import _remove_skipped_rows
```



---
## _set_no_thousand_columns
```python
from python_parser import _set_no_thousand_columns
```



---
## get_rows
```python
from python_parser import get_rows
```

Read rows from self.f, skipping as specified.

We distinguish buffer_rows (the first <= infer_nrows
lines) from the rows returned to detect_colspecs
because it's simpler to leave the other locations
with skiprows logic alone than to modify them to
deal with the fact we skipped some rows here as
well.

Parameters
----------
infer_nrows : int
    Number of rows to read from self.f, not counting
    rows that are skipped.
skiprows: set, optional
    Indices of rows to skip.

Returns
-------
detect_rows : list of str
    A list containing the rows to read.

---
## detect_colspecs
```python
from python_parser import detect_colspecs
```



---
## __next__
```python
from python_parser import __next__
```



---
## MyDialect
```python
from python_parser import MyDialect
```



---
## _read
```python
from python_parser import _read
```



---
## __name__
```python
from base_parser import __name__
```



---
## ParserBase
```python
from base_parser import ParserBase
```



---
## _make_date_converter
```python
from base_parser import _make_date_converter
```



---
## _process_date_conversion
```python
from base_parser import _process_date_conversion
```



---
## _try_convert_dates
```python
from base_parser import _try_convert_dates
```



---
## _get_na_values
```python
from base_parser import _get_na_values
```

Get the NaN values for a given column.

Parameters
----------
col : str
    The name of the column.
na_values : array-like, dict
    The object listing the NaN values as strings.
na_fvalues : array-like, dict
    The object listing the NaN values as floats.
keep_default_na : bool
    If `na_values` is a dict, and the column is not mapped in the
    dictionary, whether to return the default NaN values or the empty set.

Returns
-------
nan_tuple : A length-two tuple composed of

    1) na_values : the string NaN values for that column.
    2) na_fvalues : the float NaN values for that column.

---
## _validate_parse_dates_arg
```python
from base_parser import _validate_parse_dates_arg
```

Check whether or not the 'parse_dates' parameter
is a non-boolean scalar. Raises a ValueError if
that is the case.

---
## is_index_col
```python
from base_parser import is_index_col
```



---
## BadLineHandleMethod
```python
from base_parser import BadLineHandleMethod
```



---
## __init__
```python
from base_parser import __init__
```



---
## _validate_parse_dates_presence
```python
from base_parser import _validate_parse_dates_presence
```

Check if parse_dates are in columns.

If user has provided names for parse_dates, check if those columns
are available.

Parameters
----------
columns : list
    List of names of the dataframe.

Returns
-------
The names of the columns which will get parsed later if a dict or list
is given as specification.

Raises
------
ValueError
    If column to parse_date is not in dataframe.

---
## close
```python
from base_parser import close
```



---
## _has_complex_date_col
```python
from base_parser import _has_complex_date_col
```



---
## _should_parse_dates
```python
from base_parser import _should_parse_dates
```



---
## _extract_multi_indexer_columns
```python
from base_parser import _extract_multi_indexer_columns
```

Extract and return the names, index_names, col_names if the column
names are a MultiIndex.

Parameters
----------
header: list of lists
    The header rows
index_names: list, optional
    The names of the future index
passed_names: bool, default False
    A flag specifying if names where passed

---
## _maybe_make_multi_index_columns
```python
from base_parser import _maybe_make_multi_index_columns
```



---
## _make_index
```python
from base_parser import _make_index
```



---
## _get_simple_index
```python
from base_parser import _get_simple_index
```



---
## _get_complex_date_index
```python
from base_parser import _get_complex_date_index
```



---
## _clean_mapping
```python
from base_parser import _clean_mapping
```

converts col numbers to names

---
## _agg_index
```python
from base_parser import _agg_index
```



---
## _convert_to_ndarrays
```python
from base_parser import _convert_to_ndarrays
```



---
## _set_noconvert_dtype_columns
```python
from base_parser import _set_noconvert_dtype_columns
```

Set the columns that should not undergo dtype conversions.

Currently, any column that is involved with date parsing will not
undergo such conversions. If usecols is specified, the positions of the columns
not to cast is relative to the usecols not to all columns.

Parameters
----------
col_indices: The indices specifying order and positions of the columns
names: The column names which order is corresponding with the order
       of col_indices

Returns
-------
A set of integers containing the positions of the columns not to convert.

---
## _infer_types
```python
from base_parser import _infer_types
```

Infer types of values, possibly casting

Parameters
----------
values : ndarray
na_values : set
no_dtype_specified: Specifies if we want to cast explicitly
try_num_bool : bool, default try
   try to cast values to numeric (first preference) or boolean

Returns
-------
converted : ndarray or ExtensionArray
na_count : int

---
## _cast_types
```python
from base_parser import _cast_types
```

Cast values to specified type

Parameters
----------
values : ndarray or ExtensionArray
cast_type : np.dtype or ExtensionDtype
   dtype to cast values to
column : string
    column name - used only for error reporting

Returns
-------
converted : ndarray or ExtensionArray

---
## _do_date_conversions
```python
from base_parser import _do_date_conversions
```



---
## _check_data_length
```python
from base_parser import _check_data_length
```

Checks if length of data is equal to length of column names.

One set of trailing commas is allowed. self.index_col not False
results in a ParserError previously when lengths do not match.

Parameters
----------
columns: list of column names
data: list of array-likes containing the data column-wise.

---
## _evaluate_usecols
```python
from base_parser import _evaluate_usecols
```

Check whether or not the 'usecols' parameter
is a callable.  If so, enumerates the 'names'
parameter and returns a set of indices for
each entry in 'names' that evaluates to True.
If not a callable, returns 'usecols'.

---
## _validate_usecols_names
```python
from base_parser import _validate_usecols_names
```

Validates that all usecols are present in a given
list of names. If not, raise a ValueError that
shows what usecols are missing.

Parameters
----------
usecols : iterable of usecols
    The columns to validate are present in names.
names : iterable of names
    The column names to check against.

Returns
-------
usecols : iterable of usecols
    The `usecols` parameter if the validation succeeds.

Raises
------
ValueError : Columns were missing. Error message will list them.

---
## _validate_usecols_arg
```python
from base_parser import _validate_usecols_arg
```

Validate the 'usecols' parameter.

Checks whether or not the 'usecols' parameter contains all integers
(column selection by index), strings (column by name) or is a callable.
Raises a ValueError if that is not the case.

Parameters
----------
usecols : list-like, callable, or None
    List of columns to use when parsing or a callable that can be used
    to filter a list of table columns.

Returns
-------
usecols_tuple : tuple
    A tuple of (verified_usecols, usecols_dtype).

    'verified_usecols' is either a set if an array-like is passed in or
    'usecols' if a callable or None is passed in.

    'usecols_dtype` is the inferred dtype of 'usecols' if an array-like
    is passed in or None if a callable or None is passed in.

---
## _clean_index_names
```python
from base_parser import _clean_index_names
```



---
## _get_empty_meta
```python
from base_parser import _get_empty_meta
```



---
## unpack_if_single_element
```python
from base_parser import unpack_if_single_element
```



---
## converter
```python
from base_parser import converter
```



---
## _isindex
```python
from base_parser import _isindex
```



---
## extract
```python
from base_parser import extract
```



---
## ix
```python
from base_parser import ix
```



---
## _get_name
```python
from base_parser import _get_name
```



---
## _set
```python
from base_parser import _set
```



---
## __name__
```python
from arrow_parser_wrapper import __name__
```



---
## ArrowParserWrapper
```python
from arrow_parser_wrapper import ArrowParserWrapper
```

Wrapper for the pyarrow engine for read_csv()

---
## __init__
```python
from arrow_parser_wrapper import __init__
```



---
## _parse_kwds
```python
from arrow_parser_wrapper import _parse_kwds
```

Validates keywords before passing to pyarrow.

---
## _get_pyarrow_options
```python
from arrow_parser_wrapper import _get_pyarrow_options
```

Rename some arguments to pass to pyarrow

---
## _finalize_pandas_output
```python
from arrow_parser_wrapper import _finalize_pandas_output
```

Processes data read in based on kwargs.

Parameters
----------
frame: DataFrame
    The DataFrame to process.

Returns
-------
DataFrame
    The processed DataFrame.

---
## _validate_usecols
```python
from arrow_parser_wrapper import _validate_usecols
```



---
## read
```python
from arrow_parser_wrapper import read
```

Reads the contents of a CSV file into a DataFrame and
processes it according to the kwargs passed in the
constructor.

Returns
-------
DataFrame
    The DataFrame created from the CSV file.

---
## handle_warning
```python
from arrow_parser_wrapper import handle_warning
```



---
## __name__
```python
from c_parser_wrapper import __name__
```



---
## CParserWrapper
```python
from c_parser_wrapper import CParserWrapper
```



---
## _concatenate_chunks
```python
from c_parser_wrapper import _concatenate_chunks
```

Concatenate chunks of data read with low_memory=True.

The tricky part is handling Categoricals, where different chunks
may have different inferred categories.

---
## ensure_dtype_objs
```python
from c_parser_wrapper import ensure_dtype_objs
```

Ensure we have either None, a dtype object, or a dictionary mapping to
dtype objects.

---
## __init__
```python
from c_parser_wrapper import __init__
```



---
## close
```python
from c_parser_wrapper import close
```



---
## _set_noconvert_columns
```python
from c_parser_wrapper import _set_noconvert_columns
```

Set the columns that should not undergo dtype conversions.

Currently, any column that is involved with date parsing will not
undergo such conversions.

---
## read
```python
from c_parser_wrapper import read
```



---
## _filter_usecols
```python
from c_parser_wrapper import _filter_usecols
```



---
## _maybe_parse_dates
```python
from c_parser_wrapper import _maybe_parse_dates
```



---
## get_console_size
```python
from console import get_console_size
```

Return console size as tuple = (width, height).

Returns (None,None) in non-interactive session.

---
## in_interactive_session
```python
from console import in_interactive_session
```

Check if we're running in an interactive shell.

Returns
-------
bool
    True if running under python/ipython interactive shell.

---
## in_ipython_frontend
```python
from console import in_ipython_frontend
```

Check if we're inside an IPython zmq frontend.

Returns
-------
bool

---
## check_main
```python
from console import check_main
```



---
## _mpl
```python
from style import _mpl
```



---
## Styler
```python
from style import Styler
```

Helps style a DataFrame or Series according to the data with HTML and CSS.

Parameters
----------
data : Series or DataFrame
    Data to be styled - either a Series or DataFrame.
precision : int, optional
    Precision to round floats to. If not given defaults to
    ``pandas.options.styler.format.precision``.

    .. versionchanged:: 1.4.0
table_styles : list-like, default None
    List of {selector: (attr, value)} dicts; see Notes.
uuid : str, default None
    A unique identifier to avoid CSS collisions; generated automatically.
caption : str, tuple, default None
    String caption to attach to the table. Tuple only used for LaTeX dual captions.
table_attributes : str, default None
    Items that show up in the opening ``<table>`` tag
    in addition to automatic (by default) id.
cell_ids : bool, default True
    If True, each cell will have an ``id`` attribute in their HTML tag.
    The ``id`` takes the form ``T_<uuid>_row<num_row>_col<num_col>``
    where ``<uuid>`` is the unique identifier, ``<num_row>`` is the row
    number and ``<num_col>`` is the column number.
na_rep : str, optional
    Representation for missing values.
    If ``na_rep`` is None, no special formatting is applied, and falls back to
    ``pandas.options.styler.format.na_rep``.

uuid_len : int, default 5
    If ``uuid`` is not specified, the length of the ``uuid`` to randomly generate
    expressed in hex characters, in range [0, 32].
decimal : str, optional
    Character used as decimal separator for floats, complex and integers. If not
    given uses ``pandas.options.styler.format.decimal``.

    .. versionadded:: 1.3.0

thousands : str, optional, default None
    Character used as thousands separator for floats, complex and integers. If not
    given uses ``pandas.options.styler.format.thousands``.

    .. versionadded:: 1.3.0

escape : str, optional
    Use 'html' to replace the characters ``&``, ``<``, ``>``, ``'``, and ``"``
    in cell display string with HTML-safe sequences.
    Use 'latex' to replace the characters ``&``, ``%``, ``$``, ``#``, ``_``,
    ``{``, ``}``, ``~``, ``^``, and ``\`` in the cell display string with
    LaTeX-safe sequences. Use 'latex-math' to replace the characters
    the same way as in 'latex' mode, except for math substrings,
    which either are surrounded by two characters ``$`` or start with
    the character ``\(`` and end with ``\)``.
    If not given uses ``pandas.options.styler.format.escape``.

    .. versionadded:: 1.3.0
formatter : str, callable, dict, optional
    Object to define how values are displayed. See ``Styler.format``. If not given
    uses ``pandas.options.styler.format.formatter``.

    .. versionadded:: 1.4.0

Attributes
----------
env : Jinja2 jinja2.Environment
template_html : Jinja2 Template
template_html_table : Jinja2 Template
template_html_style : Jinja2 Template
template_latex : Jinja2 Template
loader : Jinja2 Loader

See Also
--------
DataFrame.style : Return a Styler object containing methods for building
    a styled HTML representation for the DataFrame.

Notes
-----
Most styling will be done by passing style functions into
``Styler.apply`` or ``Styler.map``. Style functions should
return values with strings containing CSS ``'attr: value'`` that will
be applied to the indicated cells.

If using in the Jupyter notebook, Styler has defined a ``_repr_html_``
to automatically render itself. Otherwise call Styler.to_html to get
the generated HTML.

CSS classes are attached to the generated HTML

* Index and Column names include ``index_name`` and ``level<k>``
  where `k` is its level in a MultiIndex
* Index label cells include

  * ``row_heading``
  * ``row<n>`` where `n` is the numeric position of the row
  * ``level<k>`` where `k` is the level in a MultiIndex

* Column label cells include
  * ``col_heading``
  * ``col<n>`` where `n` is the numeric position of the column
  * ``level<k>`` where `k` is the level in a MultiIndex

* Blank cells include ``blank``
* Data cells include ``data``
* Trimmed cells include ``col_trim`` or ``row_trim``.

Any, or all, or these classes can be renamed by using the ``css_class_names``
argument in ``Styler.set_table_classes``, giving a value such as
*{"row": "MY_ROW_CLASS", "col_trim": "", "row_trim": ""}*.

Examples
--------
>>> df = pd.DataFrame([[1.0, 2.0, 3.0], [4, 5, 6]], index=['a', 'b'],
...                   columns=['A', 'B', 'C'])
>>> pd.io.formats.style.Styler(df, precision=2,
...                            caption="My table")  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## _validate_apply_axis_arg
```python
from style import _validate_apply_axis_arg
```

For the apply-type methods, ``axis=None`` creates ``data`` as DataFrame, and for
``axis=[1,0]`` it creates a Series. Where ``arg`` is expected as an element
of some operator with ``data`` we must make sure that the two are compatible shapes,
or raise.

Parameters
----------
arg : sequence, Series or DataFrame
    the user input arg
arg_name : string
    name of the arg for use in error messages
dtype : numpy dtype, optional
    forced numpy dtype if given
data : Series or DataFrame
    underling subset of Styler data on which operations are performed

Returns
-------
ndarray

---
## _background_gradient
```python
from style import _background_gradient
```

Color background in a range according to the data or a gradient map

---
## _highlight_between
```python
from style import _highlight_between
```

Return an array of css props based on condition of data values within given range.

---
## _highlight_value
```python
from style import _highlight_value
```

Return an array of css strings based on the condition of values matching an op.

---
## _bar
```python
from style import _bar
```

Draw bar chart in data cells using HTML CSS linear gradient.

Parameters
----------
data : Series or DataFrame
    Underling subset of Styler data on which operations are performed.
align : str in {"left", "right", "mid", "zero", "mean"}, int, float, callable
    Method for how bars are structured or scalar value of centre point.
colors : list-like of str
    Two listed colors as string in valid CSS.
width : float in [0,1]
    The percentage of the cell, measured from left, where drawn bars will reside.
height : float in [0,1]
    The percentage of the cell's height where drawn bars will reside, centrally
    aligned.
vmin : float, optional
    Overwrite the minimum value of the window.
vmax : float, optional
    Overwrite the maximum value of the window.
base_css : str
    Additional CSS that is included in the cell before bars are drawn.

---
## concat
```python
from style import concat
```

Append another Styler to combine the output into a single table.

.. versionadded:: 1.5.0

Parameters
----------
other : Styler
    The other Styler object which has already been styled and formatted. The
    data for this Styler must have the same columns as the original, and the
    number of index levels must also be the same to render correctly.

Returns
-------
Styler

Notes
-----
The purpose of this method is to extend existing styled dataframes with other
metrics that may be useful but may not conform to the original's structure.
For example adding a sub total row, or displaying metrics such as means,
variance or counts.

Styles that are applied using the ``apply``, ``map``, ``apply_index``
and ``map_index``, and formatting applied with ``format`` and
``format_index`` will be preserved.

.. warning::
    Only the output methods ``to_html``, ``to_string`` and ``to_latex``
    currently work with concatenated Stylers.

    Other output methods, including ``to_excel``, **do not** work with
    concatenated Stylers.

The following should be noted:

  - ``table_styles``, ``table_attributes``, ``caption`` and ``uuid`` are all
    inherited from the original Styler and not ``other``.
  - hidden columns and hidden index levels will be inherited from the
    original Styler
  - ``css`` will be inherited from the original Styler, and the value of
    keys ``data``, ``row_heading`` and ``row`` will be prepended with
    ``foot0_``. If more concats are chained, their styles will be prepended
    with ``foot1_``, ''foot_2'', etc., and if a concatenated style have
    another concatanated style, the second style will be prepended with
    ``foot{parent}_foot{child}_``.

A common use case is to concatenate user defined functions with
``DataFrame.agg`` or with described statistics via ``DataFrame.describe``.
See examples.

Examples
--------
A common use case is adding totals rows, or otherwise, via methods calculated
in ``DataFrame.agg``.

>>> df = pd.DataFrame([[4, 6], [1, 9], [3, 4], [5, 5], [9, 6]],
...                   columns=["Mike", "Jim"],
...                   index=["Mon", "Tue", "Wed", "Thurs", "Fri"])
>>> styler = df.style.concat(df.agg(["sum"]).style)  # doctest: +SKIP

.. figure:: ../../_static/style/footer_simple.png

Since the concatenated object is a Styler the existing functionality can be
used to conditionally format it as well as the original.

>>> descriptors = df.agg(["sum", "mean", lambda s: s.dtype])
>>> descriptors.index = ["Total", "Average", "dtype"]
>>> other = (descriptors.style
...          .highlight_max(axis=1, subset=(["Total", "Average"], slice(None)))
...          .format(subset=("Average", slice(None)), precision=2, decimal=",")
...          .map(lambda v: "font-weight: bold;"))
>>> styler = (df.style
...             .highlight_max(color="salmon")
...             .set_table_styles([{"selector": ".foot_row0",
...                                 "props": "border-top: 1px solid black;"}]))
>>> styler.concat(other)  # doctest: +SKIP

.. figure:: ../../_static/style/footer_extended.png

When ``other`` has fewer index levels than the original Styler it is possible
to extend the index in ``other``, with placeholder levels.

>>> df = pd.DataFrame([[1], [2]],
...                   index=pd.MultiIndex.from_product([[0], [1, 2]]))
>>> descriptors = df.agg(["sum"])
>>> descriptors.index = pd.MultiIndex.from_product([[""], descriptors.index])
>>> df.style.concat(descriptors.style)  # doctest: +SKIP

---
## _repr_html_
```python
from style import _repr_html_
```

Hooks into Jupyter notebook rich display system, which calls _repr_html_ by
default if an object is returned at the end of a cell.

---
## _repr_latex_
```python
from style import _repr_latex_
```



---
## set_tooltips
```python
from style import set_tooltips
```

Set the DataFrame of strings on ``Styler`` generating ``:hover`` tooltips.

These string based tooltips are only applicable to ``<td>`` HTML elements,
and cannot be used for column or index headers.

.. versionadded:: 1.3.0

Parameters
----------
ttips : DataFrame
    DataFrame containing strings that will be translated to tooltips, mapped
    by identical column and index values that must exist on the underlying
    Styler data. None, NaN values, and empty strings will be ignored and
    not affect the rendered HTML.
props : list-like or str, optional
    List of (attr, value) tuples or a valid CSS string. If ``None`` adopts
    the internal default values described in notes.
css_class : str, optional
    Name of the tooltip class used in CSS, should conform to HTML standards.
    Only useful if integrating tooltips with external CSS. If ``None`` uses the
    internal default value 'pd-t'.

Returns
-------
Styler

Notes
-----
Tooltips are created by adding `<span class="pd-t"></span>` to each data cell
and then manipulating the table level CSS to attach pseudo hover and pseudo
after selectors to produce the required the results.

The default properties for the tooltip CSS class are:

- visibility: hidden
- position: absolute
- z-index: 1
- background-color: black
- color: white
- transform: translate(-20px, -20px)

The property 'visibility: hidden;' is a key prerequisite to the hover
functionality, and should always be included in any manual properties
specification, using the ``props`` argument.

Tooltips are not designed to be efficient, and can add large amounts of
additional HTML for larger tables, since they also require that ``cell_ids``
is forced to `True`.

Examples
--------
Basic application

>>> df = pd.DataFrame(data=[[0, 1], [2, 3]])
>>> ttips = pd.DataFrame(
...    data=[["Min", ""], [np.nan, "Max"]], columns=df.columns, index=df.index
... )
>>> s = df.style.set_tooltips(ttips).to_html()

Optionally controlling the tooltip visual display

>>> df.style.set_tooltips(ttips, css_class='tt-add', props=[
...     ('visibility', 'hidden'),
...     ('position', 'absolute'),
...     ('z-index', 1)])  # doctest: +SKIP
>>> df.style.set_tooltips(ttips, css_class='tt-add',
...     props='visibility:hidden; position:absolute; z-index:1;')
... # doctest: +SKIP

---
## to_excel
```python
from style import to_excel
```



---
## to_latex
```python
from style import to_latex
```

Write Styler to a file, buffer or string in LaTeX format.

.. versionadded:: 1.3.0

Parameters
----------
buf : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a string ``write()`` function. If None, the result is
    returned as a string.
column_format : str, optional
    The LaTeX column specification placed in location:

    \\begin{tabular}{<column_format>}

    Defaults to 'l' for index and
    non-numeric data columns, and, for numeric data columns,
    to 'r' by default, or 'S' if ``siunitx`` is ``True``.
position : str, optional
    The LaTeX positional argument (e.g. 'h!') for tables, placed in location:

    ``\\begin{table}[<position>]``.
position_float : {"centering", "raggedleft", "raggedright"}, optional
    The LaTeX float command placed in location:

    \\begin{table}[<position>]

    \\<position_float>

    Cannot be used if ``environment`` is "longtable".
hrules : bool
    Set to `True` to add \\toprule, \\midrule and \\bottomrule from the
    {booktabs} LaTeX package.
    Defaults to ``pandas.options.styler.latex.hrules``, which is `False`.

    .. versionchanged:: 1.4.0
clines : str, optional
    Use to control adding \\cline commands for the index labels separation.
    Possible values are:

      - `None`: no cline commands are added (default).
      - `"all;data"`: a cline is added for every index value extending the
        width of the table, including data entries.
      - `"all;index"`: as above with lines extending only the width of the
        index entries.
      - `"skip-last;data"`: a cline is added for each index value except the
        last level (which is never sparsified), extending the widtn of the
        table.
      - `"skip-last;index"`: as above with lines extending only the width of the
        index entries.

    .. versionadded:: 1.4.0
label : str, optional
    The LaTeX label included as: \\label{<label>}.
    This is used with \\ref{<label>} in the main .tex file.
caption : str, tuple, optional
    If string, the LaTeX table caption included as: \\caption{<caption>}.
    If tuple, i.e ("full caption", "short caption"), the caption included
    as: \\caption[<caption[1]>]{<caption[0]>}.
sparse_index : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each row.
    Defaults to ``pandas.options.styler.sparse.index``, which is `True`.
sparse_columns : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each
    column. Defaults to ``pandas.options.styler.sparse.columns``, which
    is `True`.
multirow_align : {"c", "t", "b", "naive"}, optional
    If sparsifying hierarchical MultiIndexes whether to align text centrally,
    at the top or bottom using the multirow package. If not given defaults to
    ``pandas.options.styler.latex.multirow_align``, which is `"c"`.
    If "naive" is given renders without multirow.

    .. versionchanged:: 1.4.0
multicol_align : {"r", "c", "l", "naive-l", "naive-r"}, optional
    If sparsifying hierarchical MultiIndex columns whether to align text at
    the left, centrally, or at the right. If not given defaults to
    ``pandas.options.styler.latex.multicol_align``, which is "r".
    If a naive option is given renders without multicol.
    Pipe decorators can also be added to non-naive values to draw vertical
    rules, e.g. "\|r" will draw a rule on the left side of right aligned merged
    cells.

    .. versionchanged:: 1.4.0
siunitx : bool, default False
    Set to ``True`` to structure LaTeX compatible with the {siunitx} package.
environment : str, optional
    If given, the environment that will replace 'table' in ``\\begin{table}``.
    If 'longtable' is specified then a more suitable template is
    rendered. If not given defaults to
    ``pandas.options.styler.latex.environment``, which is `None`.

    .. versionadded:: 1.4.0
encoding : str, optional
    Character encoding setting. Defaults
    to ``pandas.options.styler.render.encoding``, which is "utf-8".
convert_css : bool, default False
    Convert simple cell-styles from CSS to LaTeX format. Any CSS not found in
    conversion table is dropped. A style can be forced by adding option
    `--latex`. See notes.

Returns
-------
str or None
    If `buf` is None, returns the result as a string. Otherwise returns `None`.

See Also
--------
Styler.format: Format the text display value of cells.

Notes
-----
**Latex Packages**

For the following features we recommend the following LaTeX inclusions:

===================== ==========================================================
Feature               Inclusion
===================== ==========================================================
sparse columns        none: included within default {tabular} environment
sparse rows           \\usepackage{multirow}
hrules                \\usepackage{booktabs}
colors                \\usepackage[table]{xcolor}
siunitx               \\usepackage{siunitx}
bold (with siunitx)   | \\usepackage{etoolbox}
                      | \\robustify\\bfseries
                      | \\sisetup{detect-all = true}  *(within {document})*
italic (with siunitx) | \\usepackage{etoolbox}
                      | \\robustify\\itshape
                      | \\sisetup{detect-all = true}  *(within {document})*
environment           \\usepackage{longtable} if arg is "longtable"
                      | or any other relevant environment package
hyperlinks            \\usepackage{hyperref}
===================== ==========================================================

**Cell Styles**

LaTeX styling can only be rendered if the accompanying styling functions have
been constructed with appropriate LaTeX commands. All styling
functionality is built around the concept of a CSS ``(<attribute>, <value>)``
pair (see `Table Visualization <../../user_guide/style.ipynb>`_), and this
should be replaced by a LaTeX
``(<command>, <options>)`` approach. Each cell will be styled individually
using nested LaTeX commands with their accompanied options.

For example the following code will highlight and bold a cell in HTML-CSS:

>>> df = pd.DataFrame([[1,2], [3,4]])
>>> s = df.style.highlight_max(axis=None,
...                            props='background-color:red; font-weight:bold;')
>>> s.to_html()  # doctest: +SKIP

The equivalent using LaTeX only commands is the following:

>>> s = df.style.highlight_max(axis=None,
...                            props='cellcolor:{red}; bfseries: ;')
>>> s.to_latex()  # doctest: +SKIP

Internally these structured LaTeX ``(<command>, <options>)`` pairs
are translated to the
``display_value`` with the default structure:
``\<command><options> <display_value>``.
Where there are multiple commands the latter is nested recursively, so that
the above example highlighted cell is rendered as
``\cellcolor{red} \bfseries 4``.

Occasionally this format does not suit the applied command, or
combination of LaTeX packages that is in use, so additional flags can be
added to the ``<options>``, within the tuple, to result in different
positions of required braces (the **default** being the same as ``--nowrap``):

=================================== ============================================
Tuple Format                           Output Structure
=================================== ============================================
(<command>,<options>)               \\<command><options> <display_value>
(<command>,<options> ``--nowrap``)  \\<command><options> <display_value>
(<command>,<options> ``--rwrap``)   \\<command><options>{<display_value>}
(<command>,<options> ``--wrap``)    {\\<command><options> <display_value>}
(<command>,<options> ``--lwrap``)   {\\<command><options>} <display_value>
(<command>,<options> ``--dwrap``)   {\\<command><options>}{<display_value>}
=================================== ============================================

For example the `textbf` command for font-weight
should always be used with `--rwrap` so ``('textbf', '--rwrap')`` will render a
working cell, wrapped with braces, as ``\textbf{<display_value>}``.

A more comprehensive example is as follows:

>>> df = pd.DataFrame([[1, 2.2, "dogs"], [3, 4.4, "cats"], [2, 6.6, "cows"]],
...                   index=["ix1", "ix2", "ix3"],
...                   columns=["Integers", "Floats", "Strings"])
>>> s = df.style.highlight_max(
...     props='cellcolor:[HTML]{FFFF00}; color:{red};'
...           'textit:--rwrap; textbf:--rwrap;'
... )
>>> s.to_latex()  # doctest: +SKIP

.. figure:: ../../_static/style/latex_1.png

**Table Styles**

Internally Styler uses its ``table_styles`` object to parse the
``column_format``, ``position``, ``position_float``, and ``label``
input arguments. These arguments are added to table styles in the format:

.. code-block:: python

    set_table_styles([
        {"selector": "column_format", "props": f":{column_format};"},
        {"selector": "position", "props": f":{position};"},
        {"selector": "position_float", "props": f":{position_float};"},
        {"selector": "label", "props": f":{{{label.replace(':','§')}}};"}
    ], overwrite=False)

Exception is made for the ``hrules`` argument which, in fact, controls all three
commands: ``toprule``, ``bottomrule`` and ``midrule`` simultaneously. Instead of
setting ``hrules`` to ``True``, it is also possible to set each
individual rule definition, by manually setting the ``table_styles``,
for example below we set a regular ``toprule``, set an ``hline`` for
``bottomrule`` and exclude the ``midrule``:

.. code-block:: python

    set_table_styles([
        {'selector': 'toprule', 'props': ':toprule;'},
        {'selector': 'bottomrule', 'props': ':hline;'},
    ], overwrite=False)

If other ``commands`` are added to table styles they will be detected, and
positioned immediately above the '\\begin{tabular}' command. For example to
add odd and even row coloring, from the {colortbl} package, in format
``\rowcolors{1}{pink}{red}``, use:

.. code-block:: python

    set_table_styles([
        {'selector': 'rowcolors', 'props': ':{1}{pink}{red};'}
    ], overwrite=False)

A more comprehensive example using these arguments is as follows:

>>> df.columns = pd.MultiIndex.from_tuples([
...     ("Numeric", "Integers"),
...     ("Numeric", "Floats"),
...     ("Non-Numeric", "Strings")
... ])
>>> df.index = pd.MultiIndex.from_tuples([
...     ("L0", "ix1"), ("L0", "ix2"), ("L1", "ix3")
... ])
>>> s = df.style.highlight_max(
...     props='cellcolor:[HTML]{FFFF00}; color:{red}; itshape:; bfseries:;'
... )
>>> s.to_latex(
...     column_format="rrrrr", position="h", position_float="centering",
...     hrules=True, label="table:5", caption="Styled LaTeX Table",
...     multirow_align="t", multicol_align="r"
... )  # doctest: +SKIP

.. figure:: ../../_static/style/latex_2.png

**Formatting**

To format values :meth:`Styler.format` should be used prior to calling
`Styler.to_latex`, as well as other methods such as :meth:`Styler.hide`
for example:

>>> s.clear()
>>> s.table_styles = []
>>> s.caption = None
>>> s.format({
...    ("Numeric", "Integers"): '\${}',
...    ("Numeric", "Floats"): '{:.3f}',
...    ("Non-Numeric", "Strings"): str.upper
... })  # doctest: +SKIP
                Numeric      Non-Numeric
          Integers   Floats    Strings
L0    ix1       $1   2.200      DOGS
      ix2       $3   4.400      CATS
L1    ix3       $2   6.600      COWS

>>> s.to_latex()  # doctest: +SKIP
\begin{tabular}{llrrl}
{} & {} & \multicolumn{2}{r}{Numeric} & {Non-Numeric} \\
{} & {} & {Integers} & {Floats} & {Strings} \\
\multirow[c]{2}{*}{L0} & ix1 & \\$1 & 2.200 & DOGS \\
 & ix2 & \$3 & 4.400 & CATS \\
L1 & ix3 & \$2 & 6.600 & COWS \\
\end{tabular}

**CSS Conversion**

This method can convert a Styler constructured with HTML-CSS to LaTeX using
the following limited conversions.

================== ==================== ============= ==========================
CSS Attribute      CSS value            LaTeX Command LaTeX Options
================== ==================== ============= ==========================
font-weight        | bold               | bfseries
                   | bolder             | bfseries
font-style         | italic             | itshape
                   | oblique            | slshape
background-color   | red                cellcolor     | {red}--lwrap
                   | #fe01ea                          | [HTML]{FE01EA}--lwrap
                   | #f0e                             | [HTML]{FF00EE}--lwrap
                   | rgb(128,255,0)                   | [rgb]{0.5,1,0}--lwrap
                   | rgba(128,0,0,0.5)                | [rgb]{0.5,0,0}--lwrap
                   | rgb(25%,255,50%)                 | [rgb]{0.25,1,0.5}--lwrap
color              | red                color         | {red}
                   | #fe01ea                          | [HTML]{FE01EA}
                   | #f0e                             | [HTML]{FF00EE}
                   | rgb(128,255,0)                   | [rgb]{0.5,1,0}
                   | rgba(128,0,0,0.5)                | [rgb]{0.5,0,0}
                   | rgb(25%,255,50%)                 | [rgb]{0.25,1,0.5}
================== ==================== ============= ==========================

It is also possible to add user-defined LaTeX only styles to a HTML-CSS Styler
using the ``--latex`` flag, and to add LaTeX parsing options that the
converter will detect within a CSS-comment.

>>> df = pd.DataFrame([[1]])
>>> df.style.set_properties(
...     **{"font-weight": "bold /* --dwrap */", "Huge": "--latex--rwrap"}
... ).to_latex(convert_css=True)  # doctest: +SKIP
\begin{tabular}{lr}
{} & {0} \\
0 & {\bfseries}{\Huge{1}} \\
\end{tabular}

Examples
--------
Below we give a complete step by step example adding some advanced features
and noting some common gotchas.

First we create the DataFrame and Styler as usual, including MultiIndex rows
and columns, which allow for more advanced formatting options:

>>> cidx = pd.MultiIndex.from_arrays([
...     ["Equity", "Equity", "Equity", "Equity",
...      "Stats", "Stats", "Stats", "Stats", "Rating"],
...     ["Energy", "Energy", "Consumer", "Consumer", "", "", "", "", ""],
...     ["BP", "Shell", "H&M", "Unilever",
...      "Std Dev", "Variance", "52w High", "52w Low", ""]
... ])
>>> iidx = pd.MultiIndex.from_arrays([
...     ["Equity", "Equity", "Equity", "Equity"],
...     ["Energy", "Energy", "Consumer", "Consumer"],
...     ["BP", "Shell", "H&M", "Unilever"]
... ])
>>> styler = pd.DataFrame([
...     [1, 0.8, 0.66, 0.72, 32.1678, 32.1678**2, 335.12, 240.89, "Buy"],
...     [0.8, 1.0, 0.69, 0.79, 1.876, 1.876**2, 14.12, 19.78, "Hold"],
...     [0.66, 0.69, 1.0, 0.86, 7, 7**2, 210.9, 140.6, "Buy"],
...     [0.72, 0.79, 0.86, 1.0, 213.76, 213.76**2, 2807, 3678, "Sell"],
... ], columns=cidx, index=iidx).style

Second we will format the display and, since our table is quite wide, will
hide the repeated level-0 of the index:

>>> (styler.format(subset="Equity", precision=2)
...       .format(subset="Stats", precision=1, thousands=",")
...       .format(subset="Rating", formatter=str.upper)
...       .format_index(escape="latex", axis=1)
...       .format_index(escape="latex", axis=0)
...       .hide(level=0, axis=0))  # doctest: +SKIP

Note that one of the string entries of the index and column headers is "H&M".
Without applying the `escape="latex"` option to the `format_index` method the
resultant LaTeX will fail to render, and the error returned is quite
difficult to debug. Using the appropriate escape the "&" is converted to "\\&".

Thirdly we will apply some (CSS-HTML) styles to our object. We will use a
builtin method and also define our own method to highlight the stock
recommendation:

>>> def rating_color(v):
...     if v == "Buy": color = "#33ff85"
...     elif v == "Sell": color = "#ff5933"
...     else: color = "#ffdd33"
...     return f"color: {color}; font-weight: bold;"
>>> (styler.background_gradient(cmap="inferno", subset="Equity", vmin=0, vmax=1)
...       .map(rating_color, subset="Rating"))  # doctest: +SKIP

All the above styles will work with HTML (see below) and LaTeX upon conversion:

.. figure:: ../../_static/style/latex_stocks_html.png

However, we finally want to add one LaTeX only style
(from the {graphicx} package), that is not easy to convert from CSS and
pandas does not support it. Notice the `--latex` flag used here,
as well as `--rwrap` to ensure this is formatted correctly and
not ignored upon conversion.

>>> styler.map_index(
...     lambda v: "rotatebox:{45}--rwrap--latex;", level=2, axis=1
... )  # doctest: +SKIP

Finally we render our LaTeX adding in other options as required:

>>> styler.to_latex(
...     caption="Selected stock correlation and simple statistics.",
...     clines="skip-last;data",
...     convert_css=True,
...     position_float="centering",
...     multicol_align="|c|",
...     hrules=True,
... )  # doctest: +SKIP
\begin{table}
\centering
\caption{Selected stock correlation and simple statistics.}
\begin{tabular}{llrrrrrrrrl}
\toprule
 &  & \multicolumn{4}{|c|}{Equity} & \multicolumn{4}{|c|}{Stats} & Rating \\
 &  & \multicolumn{2}{|c|}{Energy} & \multicolumn{2}{|c|}{Consumer} &
\multicolumn{4}{|c|}{} &  \\
 &  & \rotatebox{45}{BP} & \rotatebox{45}{Shell} & \rotatebox{45}{H\&M} &
\rotatebox{45}{Unilever} & \rotatebox{45}{Std Dev} & \rotatebox{45}{Variance} &
\rotatebox{45}{52w High} & \rotatebox{45}{52w Low} & \rotatebox{45}{} \\
\midrule
\multirow[c]{2}{*}{Energy} & BP & {\cellcolor[HTML]{FCFFA4}}
\color[HTML]{000000} 1.00 & {\cellcolor[HTML]{FCA50A}} \color[HTML]{000000}
0.80 & {\cellcolor[HTML]{EB6628}} \color[HTML]{F1F1F1} 0.66 &
{\cellcolor[HTML]{F68013}} \color[HTML]{F1F1F1} 0.72 & 32.2 & 1,034.8 & 335.1
& 240.9 & \color[HTML]{33FF85} \bfseries BUY \\
 & Shell & {\cellcolor[HTML]{FCA50A}} \color[HTML]{000000} 0.80 &
{\cellcolor[HTML]{FCFFA4}} \color[HTML]{000000} 1.00 &
{\cellcolor[HTML]{F1731D}} \color[HTML]{F1F1F1} 0.69 &
{\cellcolor[HTML]{FCA108}} \color[HTML]{000000} 0.79 & 1.9 & 3.5 & 14.1 &
19.8 & \color[HTML]{FFDD33} \bfseries HOLD \\
\cline{1-11}
\multirow[c]{2}{*}{Consumer} & H\&M & {\cellcolor[HTML]{EB6628}}
\color[HTML]{F1F1F1} 0.66 & {\cellcolor[HTML]{F1731D}} \color[HTML]{F1F1F1}
0.69 & {\cellcolor[HTML]{FCFFA4}} \color[HTML]{000000} 1.00 &
{\cellcolor[HTML]{FAC42A}} \color[HTML]{000000} 0.86 & 7.0 & 49.0 & 210.9 &
140.6 & \color[HTML]{33FF85} \bfseries BUY \\
 & Unilever & {\cellcolor[HTML]{F68013}} \color[HTML]{F1F1F1} 0.72 &
{\cellcolor[HTML]{FCA108}} \color[HTML]{000000} 0.79 &
{\cellcolor[HTML]{FAC42A}} \color[HTML]{000000} 0.86 &
{\cellcolor[HTML]{FCFFA4}} \color[HTML]{000000} 1.00 & 213.8 & 45,693.3 &
2,807.0 & 3,678.0 & \color[HTML]{FF5933} \bfseries SELL \\
\cline{1-11}
\bottomrule
\end{tabular}
\end{table}

.. figure:: ../../_static/style/latex_stocks.png

---
## to_html
```python
from style import to_html
```

Write Styler to a file, buffer or string in HTML-CSS format.

.. versionadded:: 1.3.0

Parameters
----------
%(buf)s
table_uuid : str, optional
    Id attribute assigned to the <table> HTML element in the format:

    ``<table id="T_<table_uuid>" ..>``

    If not given uses Styler's initially assigned value.
table_attributes : str, optional
    Attributes to assign within the `<table>` HTML element in the format:

    ``<table .. <table_attributes> >``

    If not given defaults to Styler's preexisting value.
sparse_index : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each row.
    Defaults to ``pandas.options.styler.sparse.index`` value.

    .. versionadded:: 1.4.0
sparse_columns : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each
    column. Defaults to ``pandas.options.styler.sparse.columns`` value.

    .. versionadded:: 1.4.0
bold_headers : bool, optional
    Adds "font-weight: bold;" as a CSS property to table style header cells.

    .. versionadded:: 1.4.0
caption : str, optional
    Set, or overwrite, the caption on Styler before rendering.

    .. versionadded:: 1.4.0
max_rows : int, optional
    The maximum number of rows that will be rendered. Defaults to
    ``pandas.options.styler.render.max_rows/max_columns``.

    .. versionadded:: 1.4.0
max_columns : int, optional
    The maximum number of columns that will be rendered. Defaults to
    ``pandas.options.styler.render.max_columns``, which is None.

    Rows and columns may be reduced if the number of total elements is
    large. This value is set to ``pandas.options.styler.render.max_elements``,
    which is 262144 (18 bit browser rendering).

    .. versionadded:: 1.4.0
%(encoding)s
doctype_html : bool, default False
    Whether to output a fully structured HTML file including all
    HTML elements, or just the core ``<style>`` and ``<table>`` elements.
exclude_styles : bool, default False
    Whether to include the ``<style>`` element and all associated element
    ``class`` and ``id`` identifiers, or solely the ``<table>`` element without
    styling identifiers.
**kwargs
    Any additional keyword arguments are passed through to the jinja2
    ``self.template.render`` process. This is useful when you need to provide
    additional variables for a custom template.

Returns
-------
str or None
    If `buf` is None, returns the result as a string. Otherwise returns `None`.

See Also
--------
DataFrame.to_html: Write a DataFrame to a file, buffer or string in HTML format.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> print(df.style.to_html())  # doctest: +SKIP
<style type="text/css">
</style>
<table id="T_1e78e">
  <thead>
    <tr>
      <th class="blank level0" >&nbsp;</th>
      <th id="T_1e78e_level0_col0" class="col_heading level0 col0" >A</th>
      <th id="T_1e78e_level0_col1" class="col_heading level0 col1" >B</th>
    </tr>
...

---
## to_string
```python
from style import to_string
```

Write Styler to a file, buffer or string in text format.

.. versionadded:: 1.5.0

Parameters
----------
%(buf)s
%(encoding)s
sparse_index : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each row.
    Defaults to ``pandas.options.styler.sparse.index`` value.
sparse_columns : bool, optional
    Whether to sparsify the display of a hierarchical index. Setting to False
    will display each explicit level element in a hierarchical key for each
    column. Defaults to ``pandas.options.styler.sparse.columns`` value.
max_rows : int, optional
    The maximum number of rows that will be rendered. Defaults to
    ``pandas.options.styler.render.max_rows``, which is None.
max_columns : int, optional
    The maximum number of columns that will be rendered. Defaults to
    ``pandas.options.styler.render.max_columns``, which is None.

    Rows and columns may be reduced if the number of total elements is
    large. This value is set to ``pandas.options.styler.render.max_elements``,
    which is 262144 (18 bit browser rendering).
delimiter : str, default single space
    The separator between data elements.

Returns
-------
str or None
    If `buf` is None, returns the result as a string. Otherwise returns `None`.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> df.style.to_string()
' A B\n0 1 3\n1 2 4\n'

---
## set_td_classes
```python
from style import set_td_classes
```

Set the ``class`` attribute of ``<td>`` HTML elements.

Parameters
----------
classes : DataFrame
    DataFrame containing strings that will be translated to CSS classes,
    mapped by identical column and index key values that must exist on the
    underlying Styler data. None, NaN values, and empty strings will
    be ignored and not affect the rendered HTML.

Returns
-------
Styler

See Also
--------
Styler.set_table_styles: Set the table styles included within the ``<style>``
    HTML element.
Styler.set_table_attributes: Set the table attributes added to the ``<table>``
    HTML element.

Notes
-----
Can be used in combination with ``Styler.set_table_styles`` to define an
internal CSS solution without reference to external CSS files.

Examples
--------
>>> df = pd.DataFrame(data=[[1, 2, 3], [4, 5, 6]], columns=["A", "B", "C"])
>>> classes = pd.DataFrame([
...     ["min-val red", "", "blue"],
...     ["red", None, "blue max-val"]
... ], index=df.index, columns=df.columns)
>>> df.style.set_td_classes(classes)  # doctest: +SKIP

Using `MultiIndex` columns and a `classes` `DataFrame` as a subset of the
underlying,

>>> df = pd.DataFrame([[1,2],[3,4]], index=["a", "b"],
...     columns=[["level0", "level0"], ["level1a", "level1b"]])
>>> classes = pd.DataFrame(["min-val"], index=["a"],
...     columns=[["level0"],["level1a"]])
>>> df.style.set_td_classes(classes)  # doctest: +SKIP

Form of the output with new additional css classes,

>>> from pandas.io.formats.style import Styler
>>> df = pd.DataFrame([[1]])
>>> css = pd.DataFrame([["other-class"]])
>>> s = Styler(df, uuid="_", cell_ids=False).set_td_classes(css)
>>> s.hide(axis=0).to_html()  # doctest: +SKIP
'<style type="text/css"></style>'
'<table id="T__">'
'  <thead>'
'    <tr><th class="col_heading level0 col0" >0</th></tr>'
'  </thead>'
'  <tbody>'
'    <tr><td class="data row0 col0 other-class" >1</td></tr>'
'  </tbody>'
'</table>'

---
## _update_ctx
```python
from style import _update_ctx
```

Update the state of the ``Styler`` for data cells.

Collects a mapping of {index_label: [('<property>', '<value>'), ..]}.

Parameters
----------
attrs : DataFrame
    should contain strings of '<property>: <value>;<prop2>: <val2>'
    Whitespace shouldn't matter and the final trailing ';' shouldn't
    matter.

---
## _update_ctx_header
```python
from style import _update_ctx_header
```

Update the state of the ``Styler`` for header cells.

Collects a mapping of {index_label: [('<property>', '<value>'), ..]}.

Parameters
----------
attrs : Series
    Should contain strings of '<property>: <value>;<prop2>: <val2>', and an
    integer index.
    Whitespace shouldn't matter and the final trailing ';' shouldn't
    matter.
axis : int
    Identifies whether the ctx object being updated is the index or columns

---
## _copy
```python
from style import _copy
```

Copies a Styler, allowing for deepcopy or shallow copy

Copying a Styler aims to recreate a new Styler object which contains the same
data and styles as the original.

Data dependent attributes [copied and NOT exported]:
  - formatting (._display_funcs)
  - hidden index values or column values (.hidden_rows, .hidden_columns)
  - tooltips
  - cell_context (cell css classes)
  - ctx (cell css styles)
  - caption
  - concatenated stylers

Non-data dependent attributes [copied and exported]:
  - css
  - hidden index state and hidden columns state (.hide_index_, .hide_columns_)
  - table_attributes
  - table_styles
  - applied styles (_todo)

---
## __copy__
```python
from style import __copy__
```



---
## __deepcopy__
```python
from style import __deepcopy__
```



---
## clear
```python
from style import clear
```

Reset the ``Styler``, removing any previously applied styles.

Returns None.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, np.nan]})

After any added style:

>>> df.style.highlight_null(color='yellow')  # doctest: +SKIP

Remove it with:

>>> df.style.clear()  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## _apply
```python
from style import _apply
```



---
## apply
```python
from style import apply
```

Apply a CSS-styling function column-wise, row-wise, or table-wise.

Updates the HTML representation with the result.

Parameters
----------
func : function
    ``func`` should take a Series if ``axis`` in [0,1] and return a list-like
    object of same length, or a Series, not necessarily of same length, with
    valid index labels considering ``subset``.
    ``func`` should take a DataFrame if ``axis`` is ``None`` and return either
    an ndarray with the same shape or a DataFrame, not necessarily of the same
    shape, with valid index and columns labels considering ``subset``.

    .. versionchanged:: 1.3.0

    .. versionchanged:: 1.4.0

axis : {0 or 'index', 1 or 'columns', None}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``), or to the entire DataFrame at once
    with ``axis=None``.
%(subset)s
**kwargs : dict
    Pass along to ``func``.

Returns
-------
Styler

See Also
--------
Styler.map_index: Apply a CSS-styling function to headers elementwise.
Styler.apply_index: Apply a CSS-styling function to headers level-wise.
Styler.map: Apply a CSS-styling function elementwise.

Notes
-----
The elements of the output of ``func`` should be CSS styles as strings, in the
format 'attribute: value; attribute2: value2; ...' or,
if nothing is to be applied to that element, an empty string or ``None``.

This is similar to ``DataFrame.apply``, except that ``axis=None``
applies the function to the entire DataFrame at once,
rather than column-wise or row-wise.

Examples
--------
>>> def highlight_max(x, color):
...     return np.where(x == np.nanmax(x.to_numpy()), f"color: {color};", None)
>>> df = pd.DataFrame(np.random.randn(5, 2), columns=["A", "B"])
>>> df.style.apply(highlight_max, color='red')  # doctest: +SKIP
>>> df.style.apply(highlight_max, color='blue', axis=1)  # doctest: +SKIP
>>> df.style.apply(highlight_max, color='green', axis=None)  # doctest: +SKIP

Using ``subset`` to restrict application to a single column or multiple columns

>>> df.style.apply(highlight_max, color='red', subset="A")
... # doctest: +SKIP
>>> df.style.apply(highlight_max, color='red', subset=["A", "B"])
... # doctest: +SKIP

Using a 2d input to ``subset`` to select rows in addition to columns

>>> df.style.apply(highlight_max, color='red', subset=([0, 1, 2], slice(None)))
... # doctest: +SKIP
>>> df.style.apply(highlight_max, color='red', subset=(slice(0, 5, 2), "A"))
... # doctest: +SKIP

Using a function which returns a Series / DataFrame of unequal length but
containing valid index labels

>>> df = pd.DataFrame([[1, 2], [3, 4], [4, 6]], index=["A1", "A2", "Total"])
>>> total_style = pd.Series("font-weight: bold;", index=["Total"])
>>> df.style.apply(lambda s: total_style)  # doctest: +SKIP

See `Table Visualization <../../user_guide/style.ipynb>`_ user guide for
more details.

---
## _apply_index
```python
from style import _apply_index
```



---
## apply_index
```python
from style import apply_index
```

Apply a CSS-styling function to the index or column headers, {wise}.

Updates the HTML representation with the result.

.. versionadded:: 1.4.0

.. versionadded:: 2.1.0
   Styler.applymap_index was deprecated and renamed to Styler.map_index.

Parameters
----------
func : function
    ``func`` should {func}.
axis : {{0, 1, "index", "columns"}}
    The headers over which to apply the function.
level : int, str, list, optional
    If index is MultiIndex the level(s) over which to apply the function.
**kwargs : dict
    Pass along to ``func``.

Returns
-------
Styler

See Also
--------
Styler.{alt}_index: Apply a CSS-styling function to headers {altwise}.
Styler.apply: Apply a CSS-styling function column-wise, row-wise, or table-wise.
Styler.map: Apply a CSS-styling function elementwise.

Notes
-----
Each input to ``func`` will be {input_note}. The output of ``func`` should be
{output_note}, in the format 'attribute: value; attribute2: value2; ...'
or, if nothing is to be applied to that element, an empty string or ``None``.

Examples
--------
Basic usage to conditionally highlight values in the index.

>>> df = pd.DataFrame([[1,2], [3,4]], index=["A", "B"])
>>> def color_b(s):
...     return {ret}
>>> df.style.{this}_index(color_b)  # doctest: +SKIP

.. figure:: ../../_static/style/appmaphead1.png

Selectively applying to specific levels of MultiIndex columns.

>>> midx = pd.MultiIndex.from_product([['ix', 'jy'], [0, 1], ['x3', 'z4']])
>>> df = pd.DataFrame([np.arange(8)], columns=midx)
>>> def highlight_x({var}):
...     return {ret2}
>>> df.style.{this}_index(highlight_x, axis="columns", level=[0, 2])
...  # doctest: +SKIP

.. figure:: ../../_static/style/appmaphead2.png

---
## map_index
```python
from style import map_index
```



---
## applymap_index
```python
from style import applymap_index
```

Apply a CSS-styling function to the index or column headers, elementwise.

.. deprecated:: 2.1.0

   Styler.applymap_index has been deprecated. Use Styler.map_index instead.

Parameters
----------
func : function
    ``func`` should take a scalar and return a string.
axis : {{0, 1, "index", "columns"}}
    The headers over which to apply the function.
level : int, str, list, optional
    If index is MultiIndex the level(s) over which to apply the function.
**kwargs : dict
    Pass along to ``func``.

Returns
-------
Styler

---
## _map
```python
from style import _map
```



---
## map
```python
from style import map
```

Apply a CSS-styling function elementwise.

Updates the HTML representation with the result.

Parameters
----------
func : function
    ``func`` should take a scalar and return a string.
%(subset)s
**kwargs : dict
    Pass along to ``func``.

Returns
-------
Styler

See Also
--------
Styler.map_index: Apply a CSS-styling function to headers elementwise.
Styler.apply_index: Apply a CSS-styling function to headers level-wise.
Styler.apply: Apply a CSS-styling function column-wise, row-wise, or table-wise.

Notes
-----
The elements of the output of ``func`` should be CSS styles as strings, in the
format 'attribute: value; attribute2: value2; ...' or,
if nothing is to be applied to that element, an empty string or ``None``.

Examples
--------
>>> def color_negative(v, color):
...     return f"color: {color};" if v < 0 else None
>>> df = pd.DataFrame(np.random.randn(5, 2), columns=["A", "B"])
>>> df.style.map(color_negative, color='red')  # doctest: +SKIP

Using ``subset`` to restrict application to a single column or multiple columns

>>> df.style.map(color_negative, color='red', subset="A")
...  # doctest: +SKIP
>>> df.style.map(color_negative, color='red', subset=["A", "B"])
...  # doctest: +SKIP

Using a 2d input to ``subset`` to select rows in addition to columns

>>> df.style.map(color_negative, color='red',
...  subset=([0,1,2], slice(None)))  # doctest: +SKIP
>>> df.style.map(color_negative, color='red', subset=(slice(0,5,2), "A"))
...  # doctest: +SKIP

See `Table Visualization <../../user_guide/style.ipynb>`_ user guide for
more details.

---
## applymap
```python
from style import applymap
```

Apply a CSS-styling function elementwise.

.. deprecated:: 2.1.0

   Styler.applymap has been deprecated. Use Styler.map instead.

Parameters
----------
func : function
    ``func`` should take a scalar and return a string.
%(subset)s
**kwargs : dict
    Pass along to ``func``.

Returns
-------
Styler

---
## set_table_attributes
```python
from style import set_table_attributes
```

Set the table attributes added to the ``<table>`` HTML element.

These are items in addition to automatic (by default) ``id`` attribute.

Parameters
----------
attributes : str

Returns
-------
Styler

See Also
--------
Styler.set_table_styles: Set the table styles included within the ``<style>``
    HTML element.
Styler.set_td_classes: Set the DataFrame of strings added to the ``class``
    attribute of ``<td>`` HTML elements.

Examples
--------
>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_table_attributes('class="pure-table"')  # doctest: +SKIP
# ... <table class="pure-table"> ...

---
## export
```python
from style import export
```

Export the styles applied to the current Styler.

Can be applied to a second Styler with ``Styler.use``.

Returns
-------
dict

See Also
--------
Styler.use: Set the styles on the current Styler.
Styler.copy: Create a copy of the current Styler.

Notes
-----
This method is designed to copy non-data dependent attributes of
one Styler to another. It differs from ``Styler.copy`` where data and
data dependent attributes are also copied.

The following items are exported since they are not generally data dependent:

  - Styling functions added by the ``apply`` and ``map``
  - Whether axes and names are hidden from the display, if unambiguous.
  - Table attributes
  - Table styles

The following attributes are considered data dependent and therefore not
exported:

  - Caption
  - UUID
  - Tooltips
  - Any hidden rows or columns identified by Index labels
  - Any formatting applied using ``Styler.format``
  - Any CSS classes added using ``Styler.set_td_classes``

Examples
--------

>>> styler = pd.DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = pd.DataFrame([[9, 9, 9]]).style
>>> styler.hide(axis=0).highlight_max(axis=1)  # doctest: +SKIP
>>> export = styler.export()
>>> styler2.use(export)  # doctest: +SKIP

---
## use
```python
from style import use
```

Set the styles on the current Styler.

Possibly uses styles from ``Styler.export``.

Parameters
----------
styles : dict(str, Any)
    List of attributes to add to Styler. Dict keys should contain only:
      - "apply": list of styler functions, typically added with ``apply`` or
        ``map``.
      - "table_attributes": HTML attributes, typically added with
        ``set_table_attributes``.
      - "table_styles": CSS selectors and properties, typically added with
        ``set_table_styles``.
      - "hide_index":  whether the index is hidden, typically added with
        ``hide_index``, or a boolean list for hidden levels.
      - "hide_columns": whether column headers are hidden, typically added with
        ``hide_columns``, or a boolean list for hidden levels.
      - "hide_index_names": whether index names are hidden.
      - "hide_column_names": whether column header names are hidden.
      - "css": the css class names used.

Returns
-------
Styler

See Also
--------
Styler.export : Export the non data dependent attributes to the current Styler.

Examples
--------

>>> styler = pd.DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = pd.DataFrame([[9, 9, 9]]).style
>>> styler.hide(axis=0).highlight_max(axis=1)  # doctest: +SKIP
>>> export = styler.export()
>>> styler2.use(export)  # doctest: +SKIP

---
## set_uuid
```python
from style import set_uuid
```

Set the uuid applied to ``id`` attributes of HTML elements.

Parameters
----------
uuid : str

Returns
-------
Styler

Notes
-----
Almost all HTML elements within the table, and including the ``<table>`` element
are assigned ``id`` attributes. The format is ``T_uuid_<extra>`` where
``<extra>`` is typically a more specific identifier, such as ``row1_col2``.

Examples
--------
>>> df = pd.DataFrame([[1, 2], [3, 4]], index=['A', 'B'], columns=['c1', 'c2'])

You can get the `id` attributes with the following:

>>> print((df).style.to_html())  # doctest: +SKIP

To add a title to column `c1`, its `id` is T_20a7d_level0_col0:

>>> df.style.set_uuid("T_20a7d_level0_col0")
... .set_caption("Test")  # doctest: +SKIP

Please see:
`Table visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## set_caption
```python
from style import set_caption
```

Set the text added to a ``<caption>`` HTML element.

Parameters
----------
caption : str, tuple, list
    For HTML output either the string input is used or the first element of the
    tuple. For LaTeX the string input provides a caption and the additional
    tuple input allows for full captions and short captions, in that order.

Returns
-------
Styler

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> df.style.set_caption("test")  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## set_sticky
```python
from style import set_sticky
```

Add CSS to permanently display the index or column headers in a scrolling frame.

Parameters
----------
axis : {0 or 'index', 1 or 'columns'}, default 0
    Whether to make the index or column headers sticky.
pixel_size : int, optional
    Required to configure the width of index cells or the height of column
    header cells when sticking a MultiIndex (or with a named Index).
    Defaults to 75 and 25 respectively.
levels : int, str, list, optional
    If ``axis`` is a MultiIndex the specific levels to stick. If ``None`` will
    stick all levels.

Returns
-------
Styler

Notes
-----
This method uses the CSS 'position: sticky;' property to display. It is
designed to work with visible axes, therefore both:

  - `styler.set_sticky(axis="index").hide(axis="index")`
  - `styler.set_sticky(axis="columns").hide(axis="columns")`

may produce strange behaviour due to CSS controls with missing elements.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
>>> df.style.set_sticky(axis="index")  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## set_table_styles
```python
from style import set_table_styles
```

Set the table styles included within the ``<style>`` HTML element.

This function can be used to style the entire table, columns, rows or
specific HTML selectors.

Parameters
----------
table_styles : list or dict
    If supplying a list, each individual table_style should be a
    dictionary with ``selector`` and ``props`` keys. ``selector``
    should be a CSS selector that the style will be applied to
    (automatically prefixed by the table's UUID) and ``props``
    should be a list of tuples with ``(attribute, value)``.
    If supplying a dict, the dict keys should correspond to
    column names or index values, depending upon the specified
    `axis` argument. These will be mapped to row or col CSS
    selectors. MultiIndex values as dict keys should be
    in their respective tuple form. The dict values should be
    a list as specified in the form with CSS selectors and
    props that will be applied to the specified row or column.
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``). Only used if `table_styles` is
    dict.
overwrite : bool, default True
    Styles are replaced if `True`, or extended if `False`. CSS
    rules are preserved so most recent styles set will dominate
    if selectors intersect.
css_class_names : dict, optional
    A dict of strings used to replace the default CSS classes described below.

    .. versionadded:: 1.4.0

Returns
-------
Styler

See Also
--------
Styler.set_td_classes: Set the DataFrame of strings added to the ``class``
    attribute of ``<td>`` HTML elements.
Styler.set_table_attributes: Set the table attributes added to the ``<table>``
    HTML element.

Notes
-----
The default CSS classes dict, whose values can be replaced is as follows:

.. code-block:: python

    css_class_names = {"row_heading": "row_heading",
                       "col_heading": "col_heading",
                       "index_name": "index_name",
                       "col": "col",
                       "row": "row",
                       "col_trim": "col_trim",
                       "row_trim": "row_trim",
                       "level": "level",
                       "data": "data",
                       "blank": "blank",
                       "foot": "foot"}

Examples
--------
>>> df = pd.DataFrame(np.random.randn(10, 4),
...                   columns=['A', 'B', 'C', 'D'])
>>> df.style.set_table_styles(
...     [{'selector': 'tr:hover',
...       'props': [('background-color', 'yellow')]}]
... )  # doctest: +SKIP

Or with CSS strings

>>> df.style.set_table_styles(
...     [{'selector': 'tr:hover',
...       'props': 'background-color: yellow; font-size: 1em;'}]
... )  # doctest: +SKIP

Adding column styling by name

>>> df.style.set_table_styles({
...     'A': [{'selector': '',
...            'props': [('color', 'red')]}],
...     'B': [{'selector': 'td',
...            'props': 'color: blue;'}]
... }, overwrite=False)  # doctest: +SKIP

Adding row styling

>>> df.style.set_table_styles({
...     0: [{'selector': 'td:hover',
...          'props': [('font-size', '25px')]}]
... }, axis=1, overwrite=False)  # doctest: +SKIP

See `Table Visualization <../../user_guide/style.ipynb>`_ user guide for
more details.

---
## hide
```python
from style import hide
```

Hide the entire index / column headers, or specific rows / columns from display.

.. versionadded:: 1.4.0

Parameters
----------
subset : label, array-like, IndexSlice, optional
    A valid 1d input or single key along the axis within
    `DataFrame.loc[<subset>, :]` or `DataFrame.loc[:, <subset>]` depending
    upon ``axis``, to limit ``data`` to select hidden rows / columns.
axis : {"index", 0, "columns", 1}
    Apply to the index or columns.
level : int, str, list
    The level(s) to hide in a MultiIndex if hiding the entire index / column
    headers. Cannot be used simultaneously with ``subset``.
names : bool
    Whether to hide the level name(s) of the index / columns headers in the case
    it (or at least one the levels) remains visible.

Returns
-------
Styler

Notes
-----
.. warning::
   This method only works with the output methods ``to_html``, ``to_string``
   and ``to_latex``.

   Other output methods, including ``to_excel``, ignore this hiding method
   and will display all data.

This method has multiple functionality depending upon the combination
of the ``subset``, ``level`` and ``names`` arguments (see examples). The
``axis`` argument is used only to control whether the method is applied to row
or column headers:

.. list-table:: Argument combinations
   :widths: 10 20 10 60
   :header-rows: 1

   * - ``subset``
     - ``level``
     - ``names``
     - Effect
   * - None
     - None
     - False
     - The axis-Index is hidden entirely.
   * - None
     - None
     - True
     - Only the axis-Index names are hidden.
   * - None
     - Int, Str, List
     - False
     - Specified axis-MultiIndex levels are hidden entirely.
   * - None
     - Int, Str, List
     - True
     - Specified axis-MultiIndex levels are hidden entirely and the names of
       remaining axis-MultiIndex levels.
   * - Subset
     - None
     - False
     - The specified data rows/columns are hidden, but the axis-Index itself,
       and names, remain unchanged.
   * - Subset
     - None
     - True
     - The specified data rows/columns and axis-Index names are hidden, but
       the axis-Index itself remains unchanged.
   * - Subset
     - Int, Str, List
     - Boolean
     - ValueError: cannot supply ``subset`` and ``level`` simultaneously.

Note this method only hides the identified elements so can be chained to hide
multiple elements in sequence.

Examples
--------
Simple application hiding specific rows:

>>> df = pd.DataFrame([[1,2], [3,4], [5,6]], index=["a", "b", "c"])
>>> df.style.hide(["a", "b"])  # doctest: +SKIP
     0    1
c    5    6

Hide the index and retain the data values:

>>> midx = pd.MultiIndex.from_product([["x", "y"], ["a", "b", "c"]])
>>> df = pd.DataFrame(np.random.randn(6,6), index=midx, columns=midx)
>>> df.style.format("{:.1f}").hide()  # doctest: +SKIP
                 x                    y
   a      b      c      a      b      c
 0.1    0.0    0.4    1.3    0.6   -1.4
 0.7    1.0    1.3    1.5   -0.0   -0.2
 1.4   -0.8    1.6   -0.2   -0.4   -0.3
 0.4    1.0   -0.2   -0.8   -1.2    1.1
-0.6    1.2    1.8    1.9    0.3    0.3
 0.8    0.5   -0.3    1.2    2.2   -0.8

Hide specific rows in a MultiIndex but retain the index:

>>> df.style.format("{:.1f}").hide(subset=(slice(None), ["a", "c"]))
...   # doctest: +SKIP
                         x                    y
           a      b      c      a      b      c
x   b    0.7    1.0    1.3    1.5   -0.0   -0.2
y   b   -0.6    1.2    1.8    1.9    0.3    0.3

Hide specific rows and the index through chaining:

>>> df.style.format("{:.1f}").hide(subset=(slice(None), ["a", "c"])).hide()
...   # doctest: +SKIP
                 x                    y
   a      b      c      a      b      c
 0.7    1.0    1.3    1.5   -0.0   -0.2
-0.6    1.2    1.8    1.9    0.3    0.3

Hide a specific level:

>>> df.style.format("{:,.1f}").hide(level=1)  # doctest: +SKIP
                     x                    y
       a      b      c      a      b      c
x    0.1    0.0    0.4    1.3    0.6   -1.4
     0.7    1.0    1.3    1.5   -0.0   -0.2
     1.4   -0.8    1.6   -0.2   -0.4   -0.3
y    0.4    1.0   -0.2   -0.8   -1.2    1.1
    -0.6    1.2    1.8    1.9    0.3    0.3
     0.8    0.5   -0.3    1.2    2.2   -0.8

Hiding just the index level names:

>>> df.index.names = ["lev0", "lev1"]
>>> df.style.format("{:,.1f}").hide(names=True)  # doctest: +SKIP
                         x                    y
           a      b      c      a      b      c
x   a    0.1    0.0    0.4    1.3    0.6   -1.4
    b    0.7    1.0    1.3    1.5   -0.0   -0.2
    c    1.4   -0.8    1.6   -0.2   -0.4   -0.3
y   a    0.4    1.0   -0.2   -0.8   -1.2    1.1
    b   -0.6    1.2    1.8    1.9    0.3    0.3
    c    0.8    0.5   -0.3    1.2    2.2   -0.8

Examples all produce equivalently transposed effects with ``axis="columns"``.

---
## _get_numeric_subset_default
```python
from style import _get_numeric_subset_default
```



---
## background_gradient
```python
from style import background_gradient
```

Color the {name} in a gradient style.

The {name} color is determined according
to the data in each column, row or frame, or by a given
gradient map. Requires matplotlib.

Parameters
----------
cmap : str or colormap
    Matplotlib colormap.
low : float
    Compress the color range at the low end. This is a multiple of the data
    range to extend below the minimum; good values usually in [0, 1],
    defaults to 0.
high : float
    Compress the color range at the high end. This is a multiple of the data
    range to extend above the maximum; good values usually in [0, 1],
    defaults to 0.
axis : {{0, 1, "index", "columns", None}}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``), or to the entire DataFrame at once
    with ``axis=None``.
%(subset)s
{text_threshold}
vmin : float, optional
    Minimum data value that corresponds to colormap minimum value.
    If not specified the minimum value of the data (or gmap) will be used.
vmax : float, optional
    Maximum data value that corresponds to colormap maximum value.
    If not specified the maximum value of the data (or gmap) will be used.
gmap : array-like, optional
    Gradient map for determining the {name} colors. If not supplied
    will use the underlying data from rows, columns or frame. If given as an
    ndarray or list-like must be an identical shape to the underlying data
    considering ``axis`` and ``subset``. If given as DataFrame or Series must
    have same index and column labels considering ``axis`` and ``subset``.
    If supplied, ``vmin`` and ``vmax`` should be given relative to this
    gradient map.

    .. versionadded:: 1.3.0

Returns
-------
Styler

See Also
--------
Styler.{alt}_gradient: Color the {alt} in a gradient style.

Notes
-----
When using ``low`` and ``high`` the range
of the gradient, given by the data if ``gmap`` is not given or by ``gmap``,
is extended at the low end effectively by
`map.min - low * map.range` and at the high end by
`map.max + high * map.range` before the colors are normalized and determined.

If combining with ``vmin`` and ``vmax`` the `map.min`, `map.max` and
`map.range` are replaced by values according to the values derived from
``vmin`` and ``vmax``.

This method will preselect numeric columns and ignore non-numeric columns
unless a ``gmap`` is supplied in which case no preselection occurs.

Examples
--------
>>> df = pd.DataFrame(columns=["City", "Temp (c)", "Rain (mm)", "Wind (m/s)"],
...                   data=[["Stockholm", 21.6, 5.0, 3.2],
...                         ["Oslo", 22.4, 13.3, 3.1],
...                         ["Copenhagen", 24.5, 0.0, 6.7]])

Shading the values column-wise, with ``axis=0``, preselecting numeric columns

>>> df.style.{name}_gradient(axis=0)  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_ax0.png

Shading all values collectively using ``axis=None``

>>> df.style.{name}_gradient(axis=None)  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_axNone.png

Compress the color map from the both ``low`` and ``high`` ends

>>> df.style.{name}_gradient(axis=None, low=0.75, high=1.0)  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_axNone_lowhigh.png

Manually setting ``vmin`` and ``vmax`` gradient thresholds

>>> df.style.{name}_gradient(axis=None, vmin=6.7, vmax=21.6)  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_axNone_vminvmax.png

Setting a ``gmap`` and applying to all columns with another ``cmap``

>>> df.style.{name}_gradient(axis=0, gmap=df['Temp (c)'], cmap='YlOrRd')
...  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_gmap.png

Setting the gradient map for a dataframe (i.e. ``axis=None``), we need to
explicitly state ``subset`` to match the ``gmap`` shape

>>> gmap = np.array([[1,2,3], [2,3,4], [3,4,5]])
>>> df.style.{name}_gradient(axis=None, gmap=gmap,
...     cmap='YlOrRd', subset=['Temp (c)', 'Rain (mm)', 'Wind (m/s)']
... )  # doctest: +SKIP

.. figure:: ../../_static/style/{image_prefix}_axNone_gmap.png

---
## text_gradient
```python
from style import text_gradient
```



---
## set_properties
```python
from style import set_properties
```

Set defined CSS-properties to each ``<td>`` HTML element for the given subset.

Parameters
----------
%(subset)s
**kwargs : dict
    A dictionary of property, value pairs to be set for each cell.

Returns
-------
Styler

Notes
-----
This is a convenience methods which wraps the :meth:`Styler.map` calling a
function returning the CSS-properties independently of the data.

Examples
--------
>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_properties(color="white", align="right")  # doctest: +SKIP
>>> df.style.set_properties(**{'background-color': 'yellow'})  # doctest: +SKIP

See `Table Visualization <../../user_guide/style.ipynb>`_ user guide for
more details.

---
## bar
```python
from style import bar
```

Draw bar chart in the cell backgrounds.

.. versionchanged:: 1.4.0

Parameters
----------
%(subset)s
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``), or to the entire DataFrame at once
    with ``axis=None``.
color : str or 2-tuple/list
    If a str is passed, the color is the same for both
    negative and positive numbers. If 2-tuple/list is used, the
    first element is the color_negative and the second is the
    color_positive (eg: ['#d65f5f', '#5fba7d']).
cmap : str, matplotlib.cm.ColorMap
    A string name of a matplotlib Colormap, or a Colormap object. Cannot be
    used together with ``color``.

    .. versionadded:: 1.4.0
width : float, default 100
    The percentage of the cell, measured from the left, in which to draw the
    bars, in [0, 100].
height : float, default 100
    The percentage height of the bar in the cell, centrally aligned, in [0,100].

    .. versionadded:: 1.4.0
align : str, int, float, callable, default 'mid'
    How to align the bars within the cells relative to a width adjusted center.
    If string must be one of:

    - 'left' : bars are drawn rightwards from the minimum data value.
    - 'right' : bars are drawn leftwards from the maximum data value.
    - 'zero' : a value of zero is located at the center of the cell.
    - 'mid' : a value of (max-min)/2 is located at the center of the cell,
      or if all values are negative (positive) the zero is
      aligned at the right (left) of the cell.
    - 'mean' : the mean value of the data is located at the center of the cell.

    If a float or integer is given this will indicate the center of the cell.

    If a callable should take a 1d or 2d array and return a scalar.

    .. versionchanged:: 1.4.0

vmin : float, optional
    Minimum bar value, defining the left hand limit
    of the bar drawing range, lower values are clipped to `vmin`.
    When None (default): the minimum value of the data will be used.
vmax : float, optional
    Maximum bar value, defining the right hand limit
    of the bar drawing range, higher values are clipped to `vmax`.
    When None (default): the maximum value of the data will be used.
props : str, optional
    The base CSS of the cell that is extended to add the bar chart. Defaults to
    `"width: 10em;"`.

    .. versionadded:: 1.4.0

Returns
-------
Styler

Notes
-----
This section of the user guide:
`Table Visualization <../../user_guide/style.ipynb>`_ gives
a number of examples for different settings and color coordination.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2, 3, 4], 'B': [3, 4, 5, 6]})
>>> df.style.bar(subset=['A'], color='gray')  # doctest: +SKIP

---
## highlight_null
```python
from style import highlight_null
```

Highlight missing values with a style.

Parameters
----------
%(color)s

    .. versionadded:: 1.5.0

%(subset)s

%(props)s

    .. versionadded:: 1.3.0

Returns
-------
Styler

See Also
--------
Styler.highlight_max: Highlight the maximum with a style.
Styler.highlight_min: Highlight the minimum with a style.
Styler.highlight_between: Highlight a defined range with a style.
Styler.highlight_quantile: Highlight values defined by a quantile with a style.

Examples
--------
>>> df = pd.DataFrame({'A': [1, 2], 'B': [3, np.nan]})
>>> df.style.highlight_null(color='yellow')  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## highlight_max
```python
from style import highlight_max
```

Highlight the maximum with a style.

Parameters
----------
%(subset)s
%(color)s
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``), or to the entire DataFrame at once
    with ``axis=None``.
%(props)s

    .. versionadded:: 1.3.0

Returns
-------
Styler

See Also
--------
Styler.highlight_null: Highlight missing values with a style.
Styler.highlight_min: Highlight the minimum with a style.
Styler.highlight_between: Highlight a defined range with a style.
Styler.highlight_quantile: Highlight values defined by a quantile with a style.

Examples
--------
>>> df = pd.DataFrame({'A': [2, 1], 'B': [3, 4]})
>>> df.style.highlight_max(color='yellow')  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## highlight_min
```python
from style import highlight_min
```

Highlight the minimum with a style.

Parameters
----------
%(subset)s
%(color)s
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Apply to each column (``axis=0`` or ``'index'``), to each row
    (``axis=1`` or ``'columns'``), or to the entire DataFrame at once
    with ``axis=None``.
%(props)s

    .. versionadded:: 1.3.0

Returns
-------
Styler

See Also
--------
Styler.highlight_null: Highlight missing values with a style.
Styler.highlight_max: Highlight the maximum with a style.
Styler.highlight_between: Highlight a defined range with a style.
Styler.highlight_quantile: Highlight values defined by a quantile with a style.

Examples
--------
>>> df = pd.DataFrame({'A': [2, 1], 'B': [3, 4]})
>>> df.style.highlight_min(color='yellow')  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## highlight_between
```python
from style import highlight_between
```

Highlight a defined range with a style.

.. versionadded:: 1.3.0

Parameters
----------
%(subset)s
%(color)s
axis : {0 or 'index', 1 or 'columns', None}, default 0
    If ``left`` or ``right`` given as sequence, axis along which to apply those
    boundaries. See examples.
left : scalar or datetime-like, or sequence or array-like, default None
    Left bound for defining the range.
right : scalar or datetime-like, or sequence or array-like, default None
    Right bound for defining the range.
inclusive : {'both', 'neither', 'left', 'right'}
    Identify whether bounds are closed or open.
%(props)s

Returns
-------
Styler

See Also
--------
Styler.highlight_null: Highlight missing values with a style.
Styler.highlight_max: Highlight the maximum with a style.
Styler.highlight_min: Highlight the minimum with a style.
Styler.highlight_quantile: Highlight values defined by a quantile with a style.

Notes
-----
If ``left`` is ``None`` only the right bound is applied.
If ``right`` is ``None`` only the left bound is applied. If both are ``None``
all values are highlighted.

``axis`` is only needed if ``left`` or ``right`` are provided as a sequence or
an array-like object for aligning the shapes. If ``left`` and ``right`` are
both scalars then all ``axis`` inputs will give the same result.

This function only works with compatible ``dtypes``. For example a datetime-like
region can only use equivalent datetime-like ``left`` and ``right`` arguments.
Use ``subset`` to control regions which have multiple ``dtypes``.

Examples
--------
Basic usage

>>> df = pd.DataFrame({
...     'One': [1.2, 1.6, 1.5],
...     'Two': [2.9, 2.1, 2.5],
...     'Three': [3.1, 3.2, 3.8],
... })
>>> df.style.highlight_between(left=2.1, right=2.9)  # doctest: +SKIP

.. figure:: ../../_static/style/hbetw_basic.png

Using a range input sequence along an ``axis``, in this case setting a ``left``
and ``right`` for each column individually

>>> df.style.highlight_between(left=[1.4, 2.4, 3.4], right=[1.6, 2.6, 3.6],
...     axis=1, color="#fffd75")  # doctest: +SKIP

.. figure:: ../../_static/style/hbetw_seq.png

Using ``axis=None`` and providing the ``left`` argument as an array that
matches the input DataFrame, with a constant ``right``

>>> df.style.highlight_between(left=[[2,2,3],[2,2,3],[3,3,3]], right=3.5,
...     axis=None, color="#fffd75")  # doctest: +SKIP

.. figure:: ../../_static/style/hbetw_axNone.png

Using ``props`` instead of default background coloring

>>> df.style.highlight_between(left=1.5, right=3.5,
...     props='font-weight:bold;color:#e83e8c')  # doctest: +SKIP

.. figure:: ../../_static/style/hbetw_props.png

---
## highlight_quantile
```python
from style import highlight_quantile
```

Highlight values defined by a quantile with a style.

.. versionadded:: 1.3.0

Parameters
----------
%(subset)s
%(color)s
axis : {0 or 'index', 1 or 'columns', None}, default 0
    Axis along which to determine and highlight quantiles. If ``None`` quantiles
    are measured over the entire DataFrame. See examples.
q_left : float, default 0
    Left bound, in [0, q_right), for the target quantile range.
q_right : float, default 1
    Right bound, in (q_left, 1], for the target quantile range.
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
    Argument passed to ``Series.quantile`` or ``DataFrame.quantile`` for
    quantile estimation.
inclusive : {'both', 'neither', 'left', 'right'}
    Identify whether quantile bounds are closed or open.
%(props)s

Returns
-------
Styler

See Also
--------
Styler.highlight_null: Highlight missing values with a style.
Styler.highlight_max: Highlight the maximum with a style.
Styler.highlight_min: Highlight the minimum with a style.
Styler.highlight_between: Highlight a defined range with a style.

Notes
-----
This function does not work with ``str`` dtypes.

Examples
--------
Using ``axis=None`` and apply a quantile to all collective data

>>> df = pd.DataFrame(np.arange(10).reshape(2,5) + 1)
>>> df.style.highlight_quantile(axis=None, q_left=0.8, color="#fffd75")
...  # doctest: +SKIP

.. figure:: ../../_static/style/hq_axNone.png

Or highlight quantiles row-wise or column-wise, in this case by row-wise

>>> df.style.highlight_quantile(axis=1, q_left=0.8, color="#fffd75")
...  # doctest: +SKIP

.. figure:: ../../_static/style/hq_ax1.png

Use ``props`` instead of default background coloring

>>> df.style.highlight_quantile(axis=None, q_left=0.2, q_right=0.8,
...     props='font-weight:bold;color:#e83e8c')  # doctest: +SKIP

.. figure:: ../../_static/style/hq_props.png

---
## from_custom_template
```python
from style import from_custom_template
```

Factory function for creating a subclass of ``Styler``.

Uses custom templates and Jinja environment.

.. versionchanged:: 1.3.0

Parameters
----------
searchpath : str or list
    Path or paths of directories containing the templates.
html_table : str
    Name of your custom template to replace the html_table template.

    .. versionadded:: 1.3.0

html_style : str
    Name of your custom template to replace the html_style template.

    .. versionadded:: 1.3.0

Returns
-------
MyStyler : subclass of Styler
    Has the correct ``env``,``template_html``, ``template_html_table`` and
    ``template_html_style`` class attributes set.

Examples
--------
>>> from pandas.io.formats.style import Styler
>>> EasyStyler = Styler.from_custom_template("path/to/template",
...                                          "template.tpl",
...                                          )  # doctest: +SKIP
>>> df = pd.DataFrame({"A": [1, 2]})
>>> EasyStyler(df)  # doctest: +SKIP

Please see:
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

---
## pipe
```python
from style import pipe
```

Apply ``func(self, *args, **kwargs)``, and return the result.

Parameters
----------
func : function
    Function to apply to the Styler.  Alternatively, a
    ``(callable, keyword)`` tuple where ``keyword`` is a string
    indicating the keyword of ``callable`` that expects the Styler.
*args : optional
    Arguments passed to `func`.
**kwargs : optional
    A dictionary of keyword arguments passed into ``func``.

Returns
-------
object :
    The value returned by ``func``.

See Also
--------
DataFrame.pipe : Analogous method for DataFrame.
Styler.apply : Apply a CSS-styling function column-wise, row-wise, or
    table-wise.

Notes
-----
Like :meth:`DataFrame.pipe`, this method can simplify the
application of several user-defined functions to a styler.  Instead
of writing:

.. code-block:: python

    f(g(df.style.format(precision=3), arg1=a), arg2=b, arg3=c)

users can write:

.. code-block:: python

    (df.style.format(precision=3)
       .pipe(g, arg1=a)
       .pipe(f, arg2=b, arg3=c))

In particular, this allows users to define functions that take a
styler object, along with other parameters, and return the styler after
making styling changes (such as calling :meth:`Styler.apply` or
:meth:`Styler.set_properties`).

Examples
--------

**Common Use**

A common usage pattern is to pre-define styling operations which
can be easily applied to a generic styler in a single ``pipe`` call.

>>> def some_highlights(styler, min_color="red", max_color="blue"):
...      styler.highlight_min(color=min_color, axis=None)
...      styler.highlight_max(color=max_color, axis=None)
...      styler.highlight_null()
...      return styler
>>> df = pd.DataFrame([[1, 2, 3, pd.NA], [pd.NA, 4, 5, 6]], dtype="Int64")
>>> df.style.pipe(some_highlights, min_color="green")  # doctest: +SKIP

.. figure:: ../../_static/style/df_pipe_hl.png

Since the method returns a ``Styler`` object it can be chained with other
methods as if applying the underlying highlighters directly.

>>> (df.style.format("{:.1f}")
...         .pipe(some_highlights, min_color="green")
...         .highlight_between(left=2, right=5))  # doctest: +SKIP

.. figure:: ../../_static/style/df_pipe_hl2.png

**Advanced Use**

Sometimes it may be necessary to pre-define styling functions, but in the case
where those functions rely on the styler, data or context. Since
``Styler.use`` and ``Styler.export`` are designed to be non-data dependent,
they cannot be used for this purpose. Additionally the ``Styler.apply``
and ``Styler.format`` type methods are not context aware, so a solution
is to use ``pipe`` to dynamically wrap this functionality.

Suppose we want to code a generic styling function that highlights the final
level of a MultiIndex. The number of levels in the Index is dynamic so we
need the ``Styler`` context to define the level.

>>> def highlight_last_level(styler):
...     return styler.apply_index(
...         lambda v: "background-color: pink; color: yellow", axis="columns",
...         level=styler.columns.nlevels-1
...     )  # doctest: +SKIP
>>> df.columns = pd.MultiIndex.from_product([["A", "B"], ["X", "Y"]])
>>> df.style.pipe(highlight_last_level)  # doctest: +SKIP

.. figure:: ../../_static/style/df_pipe_applymap.png

Additionally suppose we want to highlight a column header if there is any
missing data in that column.
In this case we need the data object itself to determine the effect on the
column headers.

>>> def highlight_header_missing(styler, level):
...     def dynamic_highlight(s):
...         return np.where(
...             styler.data.isna().any(), "background-color: red;", ""
...         )
...     return styler.apply_index(dynamic_highlight, axis=1, level=level)
>>> df.style.pipe(highlight_header_missing, level=1)  # doctest: +SKIP

.. figure:: ../../_static/style/df_pipe_applydata.png

---
## css_bar
```python
from style import css_bar
```

Generate CSS code to draw a bar from start to end in a table cell.

Uses linear-gradient.

Parameters
----------
start : float
    Relative positional start of bar coloring in [0,1]
end : float
    Relative positional end of the bar coloring in [0,1]
color : str
    CSS valid color to apply.

Returns
-------
str : The CSS applicable to the cell.

Notes
-----
Uses ``base_css`` from outer scope.

---
## css_calc
```python
from style import css_calc
```

Return the correct CSS for bar placement based on calculated values.

Parameters
----------
x : float
    Value which determines the bar placement.
left : float
    Value marking the left side of calculation, usually minimum of data.
right : float
    Value marking the right side of the calculation, usually maximum of data
    (left < right).
align : {"left", "right", "zero", "mid"}
    How the bars will be positioned.
    "left", "right", "zero" can be used with any values for ``left``, ``right``.
    "mid" can only be used where ``left <= 0`` and ``right >= 0``.
    "zero" is used to specify a center when all values ``x``, ``left``,
    ``right`` are translated, e.g. by say a mean or median.

Returns
-------
str : Resultant CSS with linear gradient.

Notes
-----
Uses ``colors``, ``width`` and ``height`` from outer scope.

---
## f
```python
from style import f
```



---
## MyStyler
```python
from style import MyStyler
```



---
## relative_luminance
```python
from style import relative_luminance
```

Calculate relative luminance of a color.

The calculation adheres to the W3C standards
(https://www.w3.org/WAI/GL/wiki/Relative_luminance)

Parameters
----------
color : rgb or rgba tuple

Returns
-------
float
    The relative luminance as a value from 0 to 1

---
## css
```python
from style import css
```



---
## HTMLFormatter
```python
from html import HTMLFormatter
```

Internal class for formatting output data in html.
This class is intended for shared functionality between
DataFrame.to_html() and DataFrame._repr_html_().
Any logic in common with other output formatting methods
should ideally be inherited from classes in format.py
and this class responsible for only producing html markup.

---
## NotebookFormatter
```python
from html import NotebookFormatter
```

Internal class for formatting output data in html for display in Jupyter
Notebooks. This class is intended for functionality specific to
DataFrame._repr_html_() and DataFrame.to_html(notebook=True)

---
## to_string
```python
from html import to_string
```



---
## render
```python
from html import render
```



---
## should_show_dimensions
```python
from html import should_show_dimensions
```



---
## show_row_idx_names
```python
from html import show_row_idx_names
```



---
## show_col_idx_names
```python
from html import show_col_idx_names
```



---
## row_levels
```python
from html import row_levels
```



---
## _get_columns_formatted_values
```python
from html import _get_columns_formatted_values
```



---
## is_truncated
```python
from html import is_truncated
```



---
## ncols
```python
from html import ncols
```



---
## write
```python
from html import write
```



---
## write_th
```python
from html import write_th
```

Method for writing a formatted <th> cell.

If col_space is set on the formatter then that is used for
the value of min-width.

Parameters
----------
s : object
    The data to be written inside the cell.
header : bool, default False
    Set to True if the <th> is for use inside <thead>.  This will
    cause min-width to be set if there is one.
indent : int, default 0
    The indentation level of the cell.
tags : str, default None
    Tags to include in the cell.

Returns
-------
A written <th> cell.

---
## write_td
```python
from html import write_td
```



---
## _write_cell
```python
from html import _write_cell
```



---
## write_tr
```python
from html import write_tr
```



---
## _write_table
```python
from html import _write_table
```



---
## _write_col_header
```python
from html import _write_col_header
```



---
## _write_row_header
```python
from html import _write_row_header
```



---
## _write_header
```python
from html import _write_header
```



---
## _get_formatted_values
```python
from html import _get_formatted_values
```



---
## _write_body
```python
from html import _write_body
```



---
## _write_regular_rows
```python
from html import _write_regular_rows
```



---
## _write_hierarchical_rows
```python
from html import _write_hierarchical_rows
```



---
## write_style
```python
from html import write_style
```



---
## _BaseXMLFormatter
```python
from xml import _BaseXMLFormatter
```

Subclass for formatting data in XML.

Parameters
----------
path_or_buffer : str or file-like
    This can be either a string of raw XML, a valid URL,
    file or file-like object.

index : bool
    Whether to include index in xml document.

row_name : str
    Name for root of xml document. Default is 'data'.

root_name : str
    Name for row elements of xml document. Default is 'row'.

na_rep : str
    Missing data representation.

attrs_cols : list
    List of columns to write as attributes in row element.

elem_cols : list
    List of columns to write as children in row element.

namespaces : dict
    The namespaces to define in XML document as dicts with key
    being namespace and value the URI.

prefix : str
    The prefix for each element in XML document including root.

encoding : str
    Encoding of xml object or document.

xml_declaration : bool
    Whether to include xml declaration at top line item in xml.

pretty_print : bool
    Whether to write xml document with line breaks and indentation.

stylesheet : str or file-like
    A URL, file, file-like object, or a raw string containing XSLT.

{compression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

{storage_options}

See also
--------
pandas.io.formats.xml.EtreeXMLFormatter
pandas.io.formats.xml.LxmlXMLFormatter

---
## EtreeXMLFormatter
```python
from xml import EtreeXMLFormatter
```

Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.

---
## LxmlXMLFormatter
```python
from xml import LxmlXMLFormatter
```

Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.

---
## _build_tree
```python
from xml import _build_tree
```

Build tree from  data.

This method initializes the root and builds attributes and elements
with optional namespaces.

---
## _validate_columns
```python
from xml import _validate_columns
```

Validate elems_cols and attrs_cols.

This method will check if columns is list-like.

Raises
------
ValueError
    * If value is not a list and less then length of nodes.

---
## _validate_encoding
```python
from xml import _validate_encoding
```

Validate encoding.

This method will check if encoding is among listed under codecs.

Raises
------
LookupError
    * If encoding is not available in codecs.

---
## _process_dataframe
```python
from xml import _process_dataframe
```

Adjust Data Frame to fit xml output.

This method will adjust underlying data frame for xml output,
including optionally replacing missing values and including indexes.

---
## _handle_indexes
```python
from xml import _handle_indexes
```

Handle indexes.

This method will add indexes into attr_cols or elem_cols.

---
## _get_prefix_uri
```python
from xml import _get_prefix_uri
```



---
## _other_namespaces
```python
from xml import _other_namespaces
```

Define other namespaces.

This method will build dictionary of namespaces attributes
for root element, conditionally with optional namespaces and
prefix.

---
## _build_attribs
```python
from xml import _build_attribs
```

Create attributes of row.

This method adds attributes using attr_cols to row element and
works with tuples for multindex or hierarchical columns.

---
## _get_flat_col_name
```python
from xml import _get_flat_col_name
```



---
## _sub_element_cls
```python
from xml import _sub_element_cls
```



---
## _build_elems
```python
from xml import _build_elems
```

Create child elements of row.

This method adds child elements using elem_cols to row element and
works with tuples for multindex or hierarchical columns.

---
## write_output
```python
from xml import write_output
```



---
## _prettify_tree
```python
from xml import _prettify_tree
```

Output tree for pretty print format.

This method will pretty print xml with line breaks and indentation.

---
## _convert_empty_str_key
```python
from xml import _convert_empty_str_key
```

Replace zero-length string in `namespaces`.

This method will replace '' with None to align to `lxml`
requirement that empty string prefixes are not allowed.

---
## SeriesFormatter
```python
from format import SeriesFormatter
```

Implement the main logic of Series.to_string, which underlies
Series.__repr__.

---
## get_dataframe_repr_params
```python
from format import get_dataframe_repr_params
```

Get the parameters used to repr(dataFrame) calls using DataFrame.to_string.

Supplying these parameters to DataFrame.to_string is equivalent to calling
``repr(DataFrame)``. This is useful if you want to adjust the repr output.

.. versionadded:: 1.4.0

Example
-------
>>> import pandas as pd
>>>
>>> df = pd.DataFrame([[1, 2], [3, 4]])
>>> repr_params = pd.io.formats.format.get_dataframe_repr_params()
>>> repr(df) == df.to_string(**repr_params)
True

---
## get_series_repr_params
```python
from format import get_series_repr_params
```

Get the parameters used to repr(Series) calls using Series.to_string.

Supplying these parameters to Series.to_string is equivalent to calling
``repr(series)``. This is useful if you want to adjust the series repr output.

.. versionadded:: 1.4.0

Example
-------
>>> import pandas as pd
>>>
>>> ser = pd.Series([1, 2, 3, 4])
>>> repr_params = pd.io.formats.format.get_series_repr_params()
>>> repr(ser) == ser.to_string(**repr_params)
True

---
## DataFrameFormatter
```python
from format import DataFrameFormatter
```

Class for processing dataframe formatting options and data.

Used by DataFrame.to_string, which backs DataFrame.__repr__.

---
## DataFrameRenderer
```python
from format import DataFrameRenderer
```

Class for creating dataframe output in multiple formats.

Called in pandas.core.generic.NDFrame:
    - to_csv
    - to_latex

Called in pandas.core.frame.DataFrame:
    - to_html
    - to_string

Parameters
----------
fmt : DataFrameFormatter
    Formatter with the formatting options.

---
## save_to_buffer
```python
from format import save_to_buffer
```

Perform serialization. Write to buf or return as string if buf is None.

---
## _get_buffer
```python
from format import _get_buffer
```

Context manager to open, yield and close buffer for filenames or Path-like
objects, otherwise yield buf unchanged.

---
## format_array
```python
from format import format_array
```

Format an array for printing.

Parameters
----------
values : np.ndarray or ExtensionArray
formatter
float_format
na_rep
digits
space
justify
decimal
leading_space : bool, optional, default True
    Whether the array should be formatted with a leading space.
    When an array as a column of a Series or DataFrame, we do want
    the leading space to pad between columns.

    When formatting an Index subclass
    (e.g. IntervalIndex._get_values_for_csv), we don't want the
    leading space since it should be left-aligned.
fallback_formatter

Returns
-------
List[str]

---
## _GenericArrayFormatter
```python
from format import _GenericArrayFormatter
```



---
## FloatArrayFormatter
```python
from format import FloatArrayFormatter
```



---
## _IntArrayFormatter
```python
from format import _IntArrayFormatter
```



---
## _Datetime64Formatter
```python
from format import _Datetime64Formatter
```



---
## _ExtensionArrayFormatter
```python
from format import _ExtensionArrayFormatter
```



---
## format_percentiles
```python
from format import format_percentiles
```

Outputs rounded and formatted percentiles.

Parameters
----------
percentiles : list-like, containing floats from interval [0,1]

Returns
-------
formatted : list of strings

Notes
-----
Rounding precision is chosen so that: (1) if any two elements of
``percentiles`` differ, they remain different after rounding
(2) no entry is *rounded* to 0% or 100%.
Any non-integer is always rounded to at least 1 decimal place.

Examples
--------
Keeps all entries different after rounding:

>>> format_percentiles([0.01999, 0.02001, 0.5, 0.666666, 0.9999])
['1.999%', '2.001%', '50%', '66.667%', '99.99%']

No element is rounded to 0% or 100% (unless already equal to it).
Duplicates are allowed:

>>> format_percentiles([0, 0.5, 0.02001, 0.5, 0.666666, 0.9999])
['0%', '50%', '2.0%', '50%', '66.67%', '99.99%']

---
## get_precision
```python
from format import get_precision
```



---
## _format_datetime64
```python
from format import _format_datetime64
```



---
## _format_datetime64_dateonly
```python
from format import _format_datetime64_dateonly
```



---
## get_format_datetime64
```python
from format import get_format_datetime64
```

Return a formatter callable taking a datetime64 as input and providing
a string as output

---
## _Datetime64TZFormatter
```python
from format import _Datetime64TZFormatter
```



---
## _Timedelta64Formatter
```python
from format import _Timedelta64Formatter
```



---
## get_format_timedelta64
```python
from format import get_format_timedelta64
```

Return a formatter function for a range of timedeltas.
These will all have the same format argument

If box, then show the return in quotes

---
## _make_fixed_width
```python
from format import _make_fixed_width
```



---
## _trim_zeros_complex
```python
from format import _trim_zeros_complex
```

Separates the real and imaginary parts from the complex number, and
executes the _trim_zeros_float method on each of those.

---
## _trim_zeros_single_float
```python
from format import _trim_zeros_single_float
```

Trims trailing zeros after a decimal point,
leaving just one if necessary.

---
## _trim_zeros_float
```python
from format import _trim_zeros_float
```

Trims the maximum number of trailing zeros equally from
all numbers containing decimals, leaving just one if
necessary.

---
## _has_names
```python
from format import _has_names
```



---
## EngFormatter
```python
from format import EngFormatter
```

Formats float values according to engineering format.

Based on matplotlib.ticker.EngFormatter

---
## set_eng_float_format
```python
from format import set_eng_float_format
```

Format float representation in DataFrame with SI notation.

Parameters
----------
accuracy : int, default 3
    Number of decimal digits after the floating point.
use_eng_prefix : bool, default False
    Whether to represent a value with SI prefixes.

Returns
-------
None

Examples
--------
>>> df = pd.DataFrame([1e-9, 1e-3, 1, 1e3, 1e6])
>>> df
              0
0  1.000000e-09
1  1.000000e-03
2  1.000000e+00
3  1.000000e+03
4  1.000000e+06

>>> pd.set_eng_float_format(accuracy=1)
>>> df
         0
0  1.0E-09
1  1.0E-03
2  1.0E+00
3  1.0E+03
4  1.0E+06

>>> pd.set_eng_float_format(use_eng_prefix=True)
>>> df
        0
0  1.000n
1  1.000m
2   1.000
3  1.000k
4  1.000M

>>> pd.set_eng_float_format(accuracy=1, use_eng_prefix=True)
>>> df
      0
0  1.0n
1  1.0m
2   1.0
3  1.0k
4  1.0M

>>> pd.set_option("display.float_format", None)  # unset option

---
## get_level_lengths
```python
from format import get_level_lengths
```

For each index in each level the function returns lengths of indexes.

Parameters
----------
levels : list of lists
    List of values on for level.
sentinel : string, optional
    Value which states that no new index starts on there.

Returns
-------
Returns list of maps. For each level returns map of indexes (key is index
in row and value is length of index).

---
## buffer_put_lines
```python
from format import buffer_put_lines
```

Appends lines to a buffer.

Parameters
----------
buf
    The buffer to write to
lines
    The lines to append.

---
## __init__
```python
from format import __init__
```



---
## _chk_truncate
```python
from format import _chk_truncate
```



---
## _get_footer
```python
from format import _get_footer
```



---
## _get_formatted_values
```python
from format import _get_formatted_values
```



---
## to_string
```python
from format import to_string
```

Render a DataFrame to a console-friendly tabular output.

Parameters
----------
buf : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a string ``write()`` function. If None, the result is
    returned as a string.
encoding: str, default “utf-8”
    Set character encoding.
line_width : int, optional
    Width to wrap a line in characters.

---
## get_strcols
```python
from format import get_strcols
```

Render a DataFrame to a list of columns (as lists of strings).

---
## should_show_dimensions
```python
from format import should_show_dimensions
```



---
## is_truncated
```python
from format import is_truncated
```



---
## is_truncated_horizontally
```python
from format import is_truncated_horizontally
```



---
## is_truncated_vertically
```python
from format import is_truncated_vertically
```



---
## dimensions_info
```python
from format import dimensions_info
```



---
## has_index_names
```python
from format import has_index_names
```



---
## has_column_names
```python
from format import has_column_names
```



---
## show_row_idx_names
```python
from format import show_row_idx_names
```



---
## show_col_idx_names
```python
from format import show_col_idx_names
```



---
## max_rows_displayed
```python
from format import max_rows_displayed
```



---
## _initialize_sparsify
```python
from format import _initialize_sparsify
```



---
## _initialize_formatters
```python
from format import _initialize_formatters
```



---
## _initialize_justify
```python
from format import _initialize_justify
```



---
## _initialize_columns
```python
from format import _initialize_columns
```



---
## _initialize_colspace
```python
from format import _initialize_colspace
```



---
## _calc_max_cols_fitted
```python
from format import _calc_max_cols_fitted
```

Number of columns fitting the screen.

---
## _calc_max_rows_fitted
```python
from format import _calc_max_rows_fitted
```

Number of rows with data fitting the screen.

---
## _adjust_max_rows
```python
from format import _adjust_max_rows
```

Adjust max_rows using display logic.

See description here:
https://pandas.pydata.org/docs/dev/user_guide/options.html#frequently-used-options

GH #37359

---
## _is_in_terminal
```python
from format import _is_in_terminal
```

Check if the output is to be shown in terminal.

---
## _is_screen_narrow
```python
from format import _is_screen_narrow
```



---
## _is_screen_short
```python
from format import _is_screen_short
```



---
## _get_number_of_auxiliary_rows
```python
from format import _get_number_of_auxiliary_rows
```

Get number of rows occupied by prompt, dots and dimension info.

---
## truncate
```python
from format import truncate
```

Check whether the frame should be truncated. If so, slice the frame up.

---
## _truncate_horizontally
```python
from format import _truncate_horizontally
```

Remove columns, which are not to be displayed and adjust formatters.

Attributes affected:
    - tr_frame
    - formatters
    - tr_col_num

---
## _truncate_vertically
```python
from format import _truncate_vertically
```

Remove rows, which are not to be displayed.

Attributes affected:
    - tr_frame
    - tr_row_num

---
## _get_strcols_without_index
```python
from format import _get_strcols_without_index
```



---
## format_col
```python
from format import format_col
```



---
## _get_formatter
```python
from format import _get_formatter
```



---
## _get_formatted_column_labels
```python
from format import _get_formatted_column_labels
```



---
## _get_formatted_index
```python
from format import _get_formatted_index
```



---
## _get_column_name_list
```python
from format import _get_column_name_list
```



---
## to_html
```python
from format import to_html
```

Render a DataFrame to a html table.

Parameters
----------
buf : str, path object, file-like object, or None, default None
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a string ``write()`` function. If None, the result is
    returned as a string.
encoding : str, default “utf-8”
    Set character encoding.
classes : str or list-like
    classes to include in the `class` attribute of the opening
    ``<table>`` tag, in addition to the default "dataframe".
notebook : {True, False}, optional, default False
    Whether the generated HTML is for IPython Notebook.
border : int
    A ``border=border`` attribute is included in the opening
    ``<table>`` tag. Default ``pd.options.display.html.border``.
table_id : str, optional
    A css id is included in the opening `<table>` tag if specified.
render_links : bool, default False
    Convert URLs to HTML links.

---
## to_csv
```python
from format import to_csv
```

Render dataframe as comma-separated file.

---
## get_result
```python
from format import get_result
```



---
## _format_strings
```python
from format import _format_strings
```



---
## _value_formatter
```python
from format import _value_formatter
```

Returns a function to be applied on each value to format it

---
## get_result_as_array
```python
from format import get_result_as_array
```

Returns the float values converted into strings using
the parameters given at initialisation, as a numpy array

---
## _formatter
```python
from format import _formatter
```



---
## just
```python
from format import just
```



---
## is_number_with_decimal
```python
from format import is_number_with_decimal
```



---
## should_trim
```python
from format import should_trim
```

Determine if an array of strings should be trimmed.

Returns True if all numbers containing decimals (defined by the
above regular expression) within the array end in a zero, otherwise
returns False.

---
## __call__
```python
from format import __call__
```

Formats a number in engineering notation, appending a letter
representing the power of 1000 of the original number. Some examples:
>>> format_eng = EngFormatter(accuracy=0, use_eng_prefix=True)
>>> format_eng(0)
' 0'
>>> format_eng = EngFormatter(accuracy=1, use_eng_prefix=True)
>>> format_eng(1_000_000)
' 1.0M'
>>> format_eng = EngFormatter(accuracy=2, use_eng_prefix=False)
>>> format_eng("-1e-6")
'-1.00E-06'

@param num: the value to represent
@type num: either a numeric value or a string that can be converted to
           a numeric value (as per decimal.Decimal constructor)

@return: engineering formatted string

---
## _format
```python
from format import _format
```



---
## formatter
```python
from format import formatter
```



---
## format_with_na_rep
```python
from format import format_with_na_rep
```



---
## format_complex_with_na_rep
```python
from format import format_complex_with_na_rep
```



---
## format_values_with
```python
from format import format_values_with
```



---
## space_format
```python
from format import space_format
```



---
## base_formatter
```python
from format import base_formatter
```



---
## decimal_formatter
```python
from format import decimal_formatter
```



---
## __name__
```python
from excel import __name__
```

Utilities for conversion to writer-agnostic Excel representation.

---
## ExcelCell
```python
from excel import ExcelCell
```



---
## CssExcelCell
```python
from excel import CssExcelCell
```



---
## CSSToExcelConverter
```python
from excel import CSSToExcelConverter
```

A callable for converting CSS declarations to ExcelWriter styles

Supports parts of CSS 2.2, with minimal CSS 3.0 support (e.g. text-shadow),
focusing on font styling, backgrounds, borders and alignment.

Operates by first computing CSS styles in a fairly generic
way (see :meth:`compute_css`) then determining Excel style
properties from CSS properties (see :meth:`build_xlstyle`).

Parameters
----------
inherited : str, optional
    CSS declarations understood to be the containing scope for the
    CSS processed by :meth:`__call__`.

---
## ExcelFormatter
```python
from excel import ExcelFormatter
```

Class for formatting a DataFrame to a list of ExcelCells,

Parameters
----------
df : DataFrame or Styler
na_rep: na representation
float_format : str, default None
    Format string for floating point numbers
cols : sequence, optional
    Columns to write
header : bool or sequence of str, default True
    Write out column names. If a list of string is given it is
    assumed to be aliases for the column names
index : bool, default True
    output row names (index)
index_label : str or sequence, default None
    Column label for index column(s) if desired. If None is given, and
    `header` and `index` are True, then the index names are used. A
    sequence should be given if the DataFrame uses MultiIndex.
merge_cells : bool, default False
    Format MultiIndex and Hierarchical Rows as merged cells.
inf_rep : str, default `'inf'`
    representation for np.inf values (which aren't representable in Excel)
    A `'-'` sign will be added in front of -inf.
style_converter : callable, optional
    This translates Styler styles (CSS) into ExcelWriter styles.
    Defaults to ``CSSToExcelConverter()``.
    It should have signature css_declarations string -> excel style.
    This is only called for body cells.

---
## __init__
```python
from excel import __init__
```



---
## __call__
```python
from excel import __call__
```

Convert CSS declarations to ExcelWriter style.

Parameters
----------
declarations : str | frozenset[tuple[str, str]]
    CSS string or set of CSS declaration tuples.
    e.g. "font-weight: bold; background: blue" or
    {("font-weight", "bold"), ("background", "blue")}

Returns
-------
xlstyle : dict
    A style as interpreted by ExcelWriter when found in
    ExcelCell.style.

---
## _call_uncached
```python
from excel import _call_uncached
```



---
## build_xlstyle
```python
from excel import build_xlstyle
```



---
## build_alignment
```python
from excel import build_alignment
```



---
## _get_vertical_alignment
```python
from excel import _get_vertical_alignment
```



---
## _get_is_wrap_text
```python
from excel import _get_is_wrap_text
```



---
## build_border
```python
from excel import build_border
```



---
## _border_style
```python
from excel import _border_style
```



---
## _get_width_name
```python
from excel import _get_width_name
```



---
## _width_to_float
```python
from excel import _width_to_float
```



---
## _pt_to_float
```python
from excel import _pt_to_float
```



---
## build_fill
```python
from excel import build_fill
```



---
## build_number_format
```python
from excel import build_number_format
```



---
## build_font
```python
from excel import build_font
```



---
## _get_is_bold
```python
from excel import _get_is_bold
```



---
## _get_is_italic
```python
from excel import _get_is_italic
```



---
## _get_decoration
```python
from excel import _get_decoration
```



---
## _get_underline
```python
from excel import _get_underline
```



---
## _get_shadow
```python
from excel import _get_shadow
```



---
## _get_font_names
```python
from excel import _get_font_names
```



---
## _get_font_size
```python
from excel import _get_font_size
```



---
## _select_font_family
```python
from excel import _select_font_family
```



---
## color_to_excel
```python
from excel import color_to_excel
```



---
## _is_hex_color
```python
from excel import _is_hex_color
```



---
## _convert_hex_to_excel
```python
from excel import _convert_hex_to_excel
```



---
## _is_shorthand_color
```python
from excel import _is_shorthand_color
```

Check if color code is shorthand.

#FFF is a shorthand as opposed to full #FFFFFF.

---
## header_style
```python
from excel import header_style
```



---
## _format_value
```python
from excel import _format_value
```



---
## _format_header_mi
```python
from excel import _format_header_mi
```



---
## _format_header_regular
```python
from excel import _format_header_regular
```



---
## _format_header
```python
from excel import _format_header
```



---
## _format_body
```python
from excel import _format_body
```



---
## _format_regular_rows
```python
from excel import _format_regular_rows
```



---
## _format_hierarchical_rows
```python
from excel import _format_hierarchical_rows
```



---
## _has_aliases
```python
from excel import _has_aliases
```

Whether the aliases for column names are present.

---
## _generate_body
```python
from excel import _generate_body
```



---
## get_formatted_cells
```python
from excel import get_formatted_cells
```



---
## write
```python
from excel import write
```

writer : path-like, file-like, or ExcelWriter object
    File path or existing ExcelWriter
sheet_name : str, default 'Sheet1'
    Name of sheet which will contain DataFrame
startrow :
    upper left cell row to dump data frame
startcol :
    upper left cell column to dump data frame
freeze_panes : tuple of integer (length 2), default None
    Specifies the one-based bottommost row and rightmost column that
    is to be frozen
engine : string, default None
    write engine to use if writer is a path - you can also set this
    via the options ``io.excel.xlsx.writer``,
    or ``io.excel.xlsm.writer``.

{storage_options}

engine_kwargs: dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## remove_none
```python
from excel import remove_none
```

Remove key where value is None, through nested dicts

---
## __name__
```python
from style_render import __name__
```



---
## CSSDict
```python
from style_render import CSSDict
```



---
## StylerRenderer
```python
from style_render import StylerRenderer
```

Base class to process rendering a Styler with a specified jinja2 template.

---
## _element
```python
from style_render import _element
```

Template to return container with information for a <td></td> or <th></th> element.

---
## _get_trimming_maximums
```python
from style_render import _get_trimming_maximums
```

Recursively reduce the number of rows and columns to satisfy max elements.

Parameters
----------
rn, cn : int
    The number of input rows / columns
max_elements : int
    The number of allowable elements
max_rows, max_cols : int, optional
    Directly specify an initial maximum rows or columns before compression.
scaling_factor : float
    Factor at which to reduce the number of rows / columns to fit.

Returns
-------
rn, cn : tuple
    New rn and cn values that satisfy the max_elements constraint

---
## _get_level_lengths
```python
from style_render import _get_level_lengths
```

Given an index, find the level length for each element.

Parameters
----------
index : Index
    Index or columns to determine lengths of each element
sparsify : bool
    Whether to hide or show each distinct element in a MultiIndex
max_index : int
    The maximum number of elements to analyse along the index due to trimming
hidden_elements : sequence of int
    Index positions of elements hidden from display in the index affecting
    length

Returns
-------
Dict :
    Result is a dictionary of (level, initial_position): span

---
## _is_visible
```python
from style_render import _is_visible
```

Index -> {(idx_row, idx_col): bool}).

---
## format_table_styles
```python
from style_render import format_table_styles
```

looks for multiple CSS selectors and separates them:
[{'selector': 'td, th', 'props': 'a:v;'}]
    ---> [{'selector': 'td', 'props': 'a:v;'},
          {'selector': 'th', 'props': 'a:v;'}]

---
## _default_formatter
```python
from style_render import _default_formatter
```

Format the display of a value

Parameters
----------
x : Any
    Input variable to be formatted
precision : Int
    Floating point precision used if ``x`` is float or complex.
thousands : bool, default False
    Whether to group digits with thousands separated with ",".

Returns
-------
value : Any
    Matches input type, or string if input is float or complex or int with sep.

---
## _wrap_decimal_thousands
```python
from style_render import _wrap_decimal_thousands
```

Takes a string formatting function and wraps logic to deal with thousands and
decimal parameters, in the case that they are non-standard and that the input
is a (float, complex, int).

---
## _str_escape
```python
from style_render import _str_escape
```

if escaping: only use on str, else return input

---
## _render_href
```python
from style_render import _render_href
```

uses regex to detect a common URL pattern and converts to href tag in format.

---
## _maybe_wrap_formatter
```python
from style_render import _maybe_wrap_formatter
```

Allows formatters to be expressed as str, callable or None, where None returns
a default formatting function. wraps with na_rep, and precision where they are
available.

---
## non_reducing_slice
```python
from style_render import non_reducing_slice
```

Ensure that a slice doesn't reduce to a Series or Scalar.

Any user-passed `subset` should have this called on it
to make sure we're always working with DataFrames.

---
## maybe_convert_css_to_tuples
```python
from style_render import maybe_convert_css_to_tuples
```

Convert css-string to sequence of tuples format if needed.
'color:red; border:1px solid black;' -> [('color', 'red'),
                                         ('border','1px solid red')]

---
## refactor_levels
```python
from style_render import refactor_levels
```

Returns a consistent levels arg for use in ``hide_index`` or ``hide_columns``.

Parameters
----------
level : int, str, list
    Original ``level`` arg supplied to above methods.
obj:
    Either ``self.index`` or ``self.columns``

Returns
-------
list : refactored arg with a list of levels to hide

---
## Tooltips
```python
from style_render import Tooltips
```

An extension to ``Styler`` that allows for and manipulates tooltips on hover
of ``<td>`` cells in the HTML result.

Parameters
----------
css_name: str, default "pd-t"
    Name of the CSS class that controls visualisation of tooltips.
css_props: list-like, default; see Notes
    List of (attr, value) tuples defining properties of the CSS class.
tooltips: DataFrame, default empty
    DataFrame of strings aligned with underlying Styler data for tooltip
    display.

Notes
-----
The default properties for the tooltip CSS class are:

    - visibility: hidden
    - position: absolute
    - z-index: 1
    - background-color: black
    - color: white
    - transform: translate(-20px, -20px)

Hidden visibility is a key prerequisite to the hover functionality, and should
always be included in any manual properties specification.

---
## _parse_latex_table_wrapping
```python
from style_render import _parse_latex_table_wrapping
```

Indicate whether LaTeX {tabular} should be wrapped with a {table} environment.

Parses the `table_styles` and detects any selectors which must be included outside
of {tabular}, i.e. indicating that wrapping must occur, and therefore return True,
or if a caption exists and requires similar.

---
## _parse_latex_table_styles
```python
from style_render import _parse_latex_table_styles
```

Return the first 'props' 'value' from ``tables_styles`` identified by ``selector``.

Examples
--------
>>> table_styles = [{'selector': 'foo', 'props': [('attr','value')]},
...                 {'selector': 'bar', 'props': [('attr', 'overwritten')]},
...                 {'selector': 'bar', 'props': [('a1', 'baz'), ('a2', 'ignore')]}]
>>> _parse_latex_table_styles(table_styles, selector='bar')
'baz'

Notes
-----
The replacement of "§" with ":" is to avoid the CSS problem where ":" has structural
significance and cannot be used in LaTeX labels, but is often required by them.

---
## _parse_latex_cell_styles
```python
from style_render import _parse_latex_cell_styles
```

Mutate the ``display_value`` string including LaTeX commands from ``latex_styles``.

This method builds a recursive latex chain of commands based on the
CSSList input, nested around ``display_value``.

If a CSS style is given as ('<command>', '<options>') this is translated to
'\<command><options>{display_value}', and this value is treated as the
display value for the next iteration.

The most recent style forms the inner component, for example for styles:
`[('c1', 'o1'), ('c2', 'o2')]` this returns: `\c1o1{\c2o2{display_value}}`

Sometimes latex commands have to be wrapped with curly braces in different ways:
We create some parsing flags to identify the different behaviours:

 - `--rwrap`        : `\<command><options>{<display_value>}`
 - `--wrap`         : `{\<command><options> <display_value>}`
 - `--nowrap`       : `\<command><options> <display_value>`
 - `--lwrap`        : `{\<command><options>} <display_value>`
 - `--dwrap`        : `{\<command><options>}{<display_value>}`

For example for styles:
`[('c1', 'o1--wrap'), ('c2', 'o2')]` this returns: `{\c1o1 \c2o2{display_value}}

---
## _parse_latex_header_span
```python
from style_render import _parse_latex_header_span
```

Refactor the cell `display_value` if a 'colspan' or 'rowspan' attribute is present.

'rowspan' and 'colspan' do not occur simultaneouly. If they are detected then
the `display_value` is altered to a LaTeX `multirow` or `multicol` command
respectively, with the appropriate cell-span.

``wrap`` is used to enclose the `display_value` in braces which is needed for
column headers using an siunitx package.

Requires the package {multirow}, whereas multicol support is usually built in
to the {tabular} environment.

Examples
--------
>>> cell = {'cellstyle': '', 'display_value':'text', 'attributes': 'colspan="3"'}
>>> _parse_latex_header_span(cell, 't', 'c')
'\\multicolumn{3}{c}{text}'

---
## _parse_latex_options_strip
```python
from style_render import _parse_latex_options_strip
```

Strip a css_value which may have latex wrapping arguments, css comment identifiers,
and whitespaces, to a valid string for latex options parsing.

For example: 'red /* --wrap */  ' --> 'red'

---
## _parse_latex_css_conversion
```python
from style_render import _parse_latex_css_conversion
```

Convert CSS (attribute,value) pairs to equivalent LaTeX (command,options) pairs.

Ignore conversion if tagged with `--latex` option, skipped if no conversion found.

---
## _escape_latex
```python
from style_render import _escape_latex
```

Replace the characters ``&``, ``%``, ``$``, ``#``, ``_``, ``{``, ``}``,
``~``, ``^``, and ``\`` in the string with LaTeX-safe sequences.

Use this if you need to display text that might contain such characters in LaTeX.

Parameters
----------
s : str
    Input to be escaped

Return
------
str :
    Escaped string

---
## _math_mode_with_dollar
```python
from style_render import _math_mode_with_dollar
```

All characters in LaTeX math mode are preserved.

The substrings in LaTeX math mode, which start with
the character ``$`` and end with ``$``, are preserved
without escaping. Otherwise regular LaTeX escaping applies.

Parameters
----------
s : str
    Input to be escaped

Return
------
str :
    Escaped string

---
## _math_mode_with_parentheses
```python
from style_render import _math_mode_with_parentheses
```

All characters in LaTeX math mode are preserved.

The substrings in LaTeX math mode, which start with
the character ``\(`` and end with ``\)``, are preserved
without escaping. Otherwise regular LaTeX escaping applies.

Parameters
----------
s : str
    Input to be escaped

Return
------
str :
    Escaped string

---
## _escape_latex_math
```python
from style_render import _escape_latex_math
```

All characters in LaTeX math mode are preserved.

The substrings in LaTeX math mode, which either are surrounded
by two characters ``$`` or start with the character ``\(`` and end with ``\)``,
are preserved without escaping. Otherwise regular LaTeX escaping applies.

Parameters
----------
s : str
    Input to be escaped

Return
------
str :
    Escaped string

---
## __init__
```python
from style_render import __init__
```



---
## _render
```python
from style_render import _render
```

Computes and applies styles and then generates the general render dicts.

Also extends the `ctx` and `ctx_index` attributes with those of concatenated
stylers for use within `_translate_latex`

---
## _render_html
```python
from style_render import _render_html
```

Renders the ``Styler`` including all applied styles to HTML.
Generates a dict with necessary kwargs passed to jinja2 template.

---
## _render_latex
```python
from style_render import _render_latex
```

Render a Styler in latex format

---
## _render_string
```python
from style_render import _render_string
```

Render a Styler in string format

---
## _compute
```python
from style_render import _compute
```

Execute the style functions built up in `self._todo`.

Relies on the conventions that all style functions go through
.apply or .map. The append styles to apply as tuples of

(application method, *args, **kwargs)

---
## _translate
```python
from style_render import _translate
```

Mutate the render dictionary to allow for tooltips:

- Add ``<span>`` HTML element to each data cells ``display_value``. Ignores
  headers.
- Add table level CSS styles to control pseudo classes.

Parameters
----------
styler_data : DataFrame
    Underlying ``Styler`` DataFrame used for reindexing.
uuid : str
    The underlying ``Styler`` uuid for CSS id.
d : dict
    The dictionary prior to final render

Returns
-------
render_dict : Dict

---
## _translate_header
```python
from style_render import _translate_header
```

Build each <tr> within table <head> as a list

Using the structure:
     +----------------------------+---------------+---------------------------+
     |  index_blanks ...          | column_name_0 |  column_headers (level_0) |
  1) |       ..                   |       ..      |             ..            |
     |  index_blanks ...          | column_name_n |  column_headers (level_n) |
     +----------------------------+---------------+---------------------------+
  2) |  index_names (level_0 to level_n) ...      | column_blanks ...         |
     +----------------------------+---------------+---------------------------+

Parameters
----------
sparsify_cols : bool
    Whether column_headers section will add colspan attributes (>1) to elements.
max_cols : int
    Maximum number of columns to render. If exceeded will contain `...` filler.

Returns
-------
head : list
    The associated HTML elements needed for template rendering.

---
## _generate_col_header_row
```python
from style_render import _generate_col_header_row
```

Generate the row containing column headers:

 +----------------------------+---------------+---------------------------+
 |  index_blanks ...          | column_name_i |  column_headers (level_i) |
 +----------------------------+---------------+---------------------------+

Parameters
----------
iter : tuple
    Looping variables from outer scope
max_cols : int
    Permissible number of columns
col_lengths :
    c

Returns
-------
list of elements

---
## _generate_index_names_row
```python
from style_render import _generate_index_names_row
```

Generate the row containing index names

 +----------------------------+---------------+---------------------------+
 |  index_names (level_0 to level_n) ...      | column_blanks ...         |
 +----------------------------+---------------+---------------------------+

Parameters
----------
iter : tuple
    Looping variables from outer scope
max_cols : int
    Permissible number of columns

Returns
-------
list of elements

---
## _translate_body
```python
from style_render import _translate_body
```

Build each <tr> within table <body> as a list

Use the following structure:
  +--------------------------------------------+---------------------------+
  |  index_header_0    ...    index_header_n   |  data_by_column   ...     |
  +--------------------------------------------+---------------------------+

Also add elements to the cellstyle_map for more efficient grouped elements in
<style></style> block

Parameters
----------
sparsify_index : bool
    Whether index_headers section will add rowspan attributes (>1) to elements.

Returns
-------
body : list
    The associated HTML elements needed for template rendering.

---
## _check_trim
```python
from style_render import _check_trim
```

Indicates whether to break render loops and append a trimming indicator

Parameters
----------
count : int
    The loop count of previous visible items.
max : int
    The allowable rendered items in the loop.
obj : list
    The current render collection of the rendered items.
element : str
    The type of element to append in the case a trimming indicator is needed.
css : str, optional
    The css to add to the trimming indicator element.
value : str, optional
    The value of the elements display if necessary.

Returns
-------
result : bool
    Whether a trimming element was required and appended.

---
## _generate_trimmed_row
```python
from style_render import _generate_trimmed_row
```

When a render has too many rows we generate a trimming row containing "..."

Parameters
----------
max_cols : int
    Number of permissible columns

Returns
-------
list of elements

---
## _generate_body_row
```python
from style_render import _generate_body_row
```

Generate a regular row for the body section of appropriate format.

  +--------------------------------------------+---------------------------+
  |  index_header_0    ...    index_header_n   |  data_by_column   ...     |
  +--------------------------------------------+---------------------------+

Parameters
----------
iter : tuple
    Iterable from outer scope: row number, row data tuple, row index labels.
max_cols : int
    Number of permissible columns.
idx_lengths : dict
    A map of the sparsification structure of the index

Returns
-------
    list of elements

---
## _translate_latex
```python
from style_render import _translate_latex
```

Post-process the default render dict for the LaTeX template format.

Processing items included are:
  - Remove hidden columns from the non-headers part of the body.
  - Place cellstyles directly in td cells rather than use cellstyle_map.
  - Remove hidden indexes or reinsert missing th elements if part of multiindex
    or multirow sparsification (so that \multirow and \multicol work correctly).

---
## format
```python
from style_render import format
```

Format the text display value of cells.

Parameters
----------
formatter : str, callable, dict or None
    Object to define how values are displayed. See notes.
subset : label, array-like, IndexSlice, optional
    A valid 2d input to `DataFrame.loc[<subset>]`, or, in the case of a 1d input
    or single key, to `DataFrame.loc[:, <subset>]` where the columns are
    prioritised, to limit ``data`` to *before* applying the function.
na_rep : str, optional
    Representation for missing values.
    If ``na_rep`` is None, no special formatting is applied.
precision : int, optional
    Floating point precision to use for display purposes, if not determined by
    the specified ``formatter``.

    .. versionadded:: 1.3.0

decimal : str, default "."
    Character used as decimal separator for floats, complex and integers.

    .. versionadded:: 1.3.0

thousands : str, optional, default None
    Character used as thousands separator for floats, complex and integers.

    .. versionadded:: 1.3.0

escape : str, optional
    Use 'html' to replace the characters ``&``, ``<``, ``>``, ``'``, and ``"``
    in cell display string with HTML-safe sequences.
    Use 'latex' to replace the characters ``&``, ``%``, ``$``, ``#``, ``_``,
    ``{``, ``}``, ``~``, ``^``, and ``\`` in the cell display string with
    LaTeX-safe sequences.
    Use 'latex-math' to replace the characters the same way as in 'latex' mode,
    except for math substrings, which either are surrounded
    by two characters ``$`` or start with the character ``\(`` and
    end with ``\)``. Escaping is done before ``formatter``.

    .. versionadded:: 1.3.0

hyperlinks : {"html", "latex"}, optional
    Convert string patterns containing https://, http://, ftp:// or www. to
    HTML <a> tags as clickable URL hyperlinks if "html", or LaTeX \href
    commands if "latex".

    .. versionadded:: 1.4.0

Returns
-------
Styler

See Also
--------
Styler.format_index: Format the text display value of index labels.

Notes
-----
This method assigns a formatting function, ``formatter``, to each cell in the
DataFrame. If ``formatter`` is ``None``, then the default formatter is used.
If a callable then that function should take a data value as input and return
a displayable representation, such as a string. If ``formatter`` is
given as a string this is assumed to be a valid Python format specification
and is wrapped to a callable as ``string.format(x)``. If a ``dict`` is given,
keys should correspond to column names, and values should be string or
callable, as above.

The default formatter currently expresses floats and complex numbers with the
pandas display precision unless using the ``precision`` argument here. The
default formatter does not adjust the representation of missing values unless
the ``na_rep`` argument is used.

The ``subset`` argument defines which region to apply the formatting function
to. If the ``formatter`` argument is given in dict form but does not include
all columns within the subset then these columns will have the default formatter
applied. Any columns in the formatter dict excluded from the subset will
be ignored.

When using a ``formatter`` string the dtypes must be compatible, otherwise a
`ValueError` will be raised.

When instantiating a Styler, default formatting can be applied be setting the
``pandas.options``:

  - ``styler.format.formatter``: default None.
  - ``styler.format.na_rep``: default None.
  - ``styler.format.precision``: default 6.
  - ``styler.format.decimal``: default ".".
  - ``styler.format.thousands``: default None.
  - ``styler.format.escape``: default None.

.. warning::
   `Styler.format` is ignored when using the output format `Styler.to_excel`,
   since Excel and Python have inherrently different formatting structures.
   However, it is possible to use the `number-format` pseudo CSS attribute
   to force Excel permissible formatting. See examples.

Examples
--------
Using ``na_rep`` and ``precision`` with the default ``formatter``

>>> df = pd.DataFrame([[np.nan, 1.0, 'A'], [2.0, np.nan, 3.0]])
>>> df.style.format(na_rep='MISS', precision=3)  # doctest: +SKIP
        0       1       2
0    MISS   1.000       A
1   2.000    MISS   3.000

Using a ``formatter`` specification on consistent column dtypes

>>> df.style.format('{:.2f}', na_rep='MISS', subset=[0,1])  # doctest: +SKIP
        0      1          2
0    MISS   1.00          A
1    2.00   MISS   3.000000

Using the default ``formatter`` for unspecified columns

>>> df.style.format({0: '{:.2f}', 1: '£ {:.1f}'}, na_rep='MISS', precision=1)
...  # doctest: +SKIP
         0      1     2
0    MISS   £ 1.0     A
1    2.00    MISS   3.0

Multiple ``na_rep`` or ``precision`` specifications under the default
``formatter``.

>>> (df.style.format(na_rep='MISS', precision=1, subset=[0])
...     .format(na_rep='PASS', precision=2, subset=[1, 2]))  # doctest: +SKIP
        0      1      2
0    MISS   1.00      A
1     2.0   PASS   3.00

Using a callable ``formatter`` function.

>>> func = lambda s: 'STRING' if isinstance(s, str) else 'FLOAT'
>>> df.style.format({0: '{:.1f}', 2: func}, precision=4, na_rep='MISS')
...  # doctest: +SKIP
        0        1        2
0    MISS   1.0000   STRING
1     2.0     MISS    FLOAT

Using a ``formatter`` with HTML ``escape`` and ``na_rep``.

>>> df = pd.DataFrame([['<div></div>', '"A&B"', None]])
>>> s = df.style.format(
...     '<a href="a.com/{0}">{0}</a>', escape="html", na_rep="NA"
...     )
>>> s.to_html()  # doctest: +SKIP
...
<td .. ><a href="a.com/&lt;div&gt;&lt;/div&gt;">&lt;div&gt;&lt;/div&gt;</a></td>
<td .. ><a href="a.com/&#34;A&amp;B&#34;">&#34;A&amp;B&#34;</a></td>
<td .. >NA</td>
...

Using a ``formatter`` with ``escape`` in 'latex' mode.

>>> df = pd.DataFrame([["123"], ["~ ^"], ["$%#"]])
>>> df.style.format("\\textbf{{{}}}", escape="latex").to_latex()
...  # doctest: +SKIP
\begin{tabular}{ll}
 & 0 \\
0 & \textbf{123} \\
1 & \textbf{\textasciitilde \space \textasciicircum } \\
2 & \textbf{\$\%\#} \\
\end{tabular}

Applying ``escape`` in 'latex-math' mode. In the example below
we enter math mode using the character ``$``.

>>> df = pd.DataFrame([[r"$\sum_{i=1}^{10} a_i$ a~b $\alpha \
...     = \frac{\beta}{\zeta^2}$"], ["%#^ $ \$x^2 $"]])
>>> df.style.format(escape="latex-math").to_latex()
...  # doctest: +SKIP
\begin{tabular}{ll}
 & 0 \\
0 & $\sum_{i=1}^{10} a_i$ a\textasciitilde b $\alpha = \frac{\beta}{\zeta^2}$ \\
1 & \%\#\textasciicircum \space $ \$x^2 $ \\
\end{tabular}

We can use the character ``\(`` to enter math mode and the character ``\)``
to close math mode.

>>> df = pd.DataFrame([[r"\(\sum_{i=1}^{10} a_i\) a~b \(\alpha \
...     = \frac{\beta}{\zeta^2}\)"], ["%#^ \( \$x^2 \)"]])
>>> df.style.format(escape="latex-math").to_latex()
...  # doctest: +SKIP
\begin{tabular}{ll}
 & 0 \\
0 & \(\sum_{i=1}^{10} a_i\) a\textasciitilde b \(\alpha
= \frac{\beta}{\zeta^2}\) \\
1 & \%\#\textasciicircum \space \( \$x^2 \) \\
\end{tabular}

If we have in one DataFrame cell a combination of both shorthands
for math formulas, the shorthand with the sign ``$`` will be applied.

>>> df = pd.DataFrame([[r"\( x^2 \)  $x^2$"], \
...     [r"$\frac{\beta}{\zeta}$ \(\frac{\beta}{\zeta}\)"]])
>>> df.style.format(escape="latex-math").to_latex()
...  # doctest: +SKIP
\begin{tabular}{ll}
 & 0 \\
0 & \textbackslash ( x\textasciicircum 2 \textbackslash )  $x^2$ \\
1 & $\frac{\beta}{\zeta}$ \textbackslash (\textbackslash
frac\{\textbackslash beta\}\{\textbackslash zeta\}\textbackslash ) \\
\end{tabular}

Pandas defines a `number-format` pseudo CSS attribute instead of the `.format`
method to create `to_excel` permissible formatting. Note that semi-colons are
CSS protected characters but used as separators in Excel's format string.
Replace semi-colons with the section separator character (ASCII-245) when
defining the formatting here.

>>> df = pd.DataFrame({"A": [1, 0, -1]})
>>> pseudo_css = "number-format: 0§[Red](0)§-§@;"
>>> filename = "formatted_file.xlsx"
>>> df.style.map(lambda v: pseudo_css).to_excel(filename) # doctest: +SKIP

.. figure:: ../../_static/style/format_excel_css.png

---
## format_index
```python
from style_render import format_index
```

Format the text display value of index labels or column headers.

.. versionadded:: 1.4.0

Parameters
----------
formatter : str, callable, dict or None
    Object to define how values are displayed. See notes.
axis : {0, "index", 1, "columns"}
    Whether to apply the formatter to the index or column headers.
level : int, str, list
    The level(s) over which to apply the generic formatter.
na_rep : str, optional
    Representation for missing values.
    If ``na_rep`` is None, no special formatting is applied.
precision : int, optional
    Floating point precision to use for display purposes, if not determined by
    the specified ``formatter``.
decimal : str, default "."
    Character used as decimal separator for floats, complex and integers.
thousands : str, optional, default None
    Character used as thousands separator for floats, complex and integers.
escape : str, optional
    Use 'html' to replace the characters ``&``, ``<``, ``>``, ``'``, and ``"``
    in cell display string with HTML-safe sequences.
    Use 'latex' to replace the characters ``&``, ``%``, ``$``, ``#``, ``_``,
    ``{``, ``}``, ``~``, ``^``, and ``\`` in the cell display string with
    LaTeX-safe sequences.
    Escaping is done before ``formatter``.
hyperlinks : {"html", "latex"}, optional
    Convert string patterns containing https://, http://, ftp:// or www. to
    HTML <a> tags as clickable URL hyperlinks if "html", or LaTeX \href
    commands if "latex".

Returns
-------
Styler

See Also
--------
Styler.format: Format the text display value of data cells.

Notes
-----
This method assigns a formatting function, ``formatter``, to each level label
in the DataFrame's index or column headers. If ``formatter`` is ``None``,
then the default formatter is used.
If a callable then that function should take a label value as input and return
a displayable representation, such as a string. If ``formatter`` is
given as a string this is assumed to be a valid Python format specification
and is wrapped to a callable as ``string.format(x)``. If a ``dict`` is given,
keys should correspond to MultiIndex level numbers or names, and values should
be string or callable, as above.

The default formatter currently expresses floats and complex numbers with the
pandas display precision unless using the ``precision`` argument here. The
default formatter does not adjust the representation of missing values unless
the ``na_rep`` argument is used.

The ``level`` argument defines which levels of a MultiIndex to apply the
method to. If the ``formatter`` argument is given in dict form but does
not include all levels within the level argument then these unspecified levels
will have the default formatter applied. Any levels in the formatter dict
specifically excluded from the level argument will be ignored.

When using a ``formatter`` string the dtypes must be compatible, otherwise a
`ValueError` will be raised.

.. warning::
   `Styler.format_index` is ignored when using the output format
   `Styler.to_excel`, since Excel and Python have inherrently different
   formatting structures.
   However, it is possible to use the `number-format` pseudo CSS attribute
   to force Excel permissible formatting. See documentation for `Styler.format`.

Examples
--------
Using ``na_rep`` and ``precision`` with the default ``formatter``

>>> df = pd.DataFrame([[1, 2, 3]], columns=[2.0, np.nan, 4.0])
>>> df.style.format_index(axis=1, na_rep='MISS', precision=3)  # doctest: +SKIP
    2.000    MISS   4.000
0       1       2       3

Using a ``formatter`` specification on consistent dtypes in a level

>>> df.style.format_index('{:.2f}', axis=1, na_rep='MISS')  # doctest: +SKIP
     2.00   MISS    4.00
0       1      2       3

Using the default ``formatter`` for unspecified levels

>>> df = pd.DataFrame([[1, 2, 3]],
...     columns=pd.MultiIndex.from_arrays([["a", "a", "b"],[2, np.nan, 4]]))
>>> df.style.format_index({0: lambda v: v.upper()}, axis=1, precision=1)
...  # doctest: +SKIP
               A       B
      2.0    nan     4.0
0       1      2       3

Using a callable ``formatter`` function.

>>> func = lambda s: 'STRING' if isinstance(s, str) else 'FLOAT'
>>> df.style.format_index(func, axis=1, na_rep='MISS')
...  # doctest: +SKIP
          STRING  STRING
    FLOAT   MISS   FLOAT
0       1      2       3

Using a ``formatter`` with HTML ``escape`` and ``na_rep``.

>>> df = pd.DataFrame([[1, 2, 3]], columns=['"A"', 'A&B', None])
>>> s = df.style.format_index('$ {0}', axis=1, escape="html", na_rep="NA")
...  # doctest: +SKIP
<th .. >$ &#34;A&#34;</th>
<th .. >$ A&amp;B</th>
<th .. >NA</td>
...

Using a ``formatter`` with LaTeX ``escape``.

>>> df = pd.DataFrame([[1, 2, 3]], columns=["123", "~", "$%#"])
>>> df.style.format_index("\\textbf{{{}}}", escape="latex", axis=1).to_latex()
...  # doctest: +SKIP
\begin{tabular}{lrrr}
{} & {\textbf{123}} & {\textbf{\textasciitilde }} & {\textbf{\$\%\#}} \\
0 & 1 & 2 & 3 \\
\end{tabular}

---
## relabel_index
```python
from style_render import relabel_index
```

Relabel the index, or column header, keys to display a set of specified values.

.. versionadded:: 1.5.0

Parameters
----------
labels : list-like or Index
    New labels to display. Must have same length as the underlying values not
    hidden.
axis : {"index", 0, "columns", 1}
    Apply to the index or columns.
level : int, str, list, optional
    The level(s) over which to apply the new labels. If `None` will apply
    to all levels of an Index or MultiIndex which are not hidden.

Returns
-------
Styler

See Also
--------
Styler.format_index: Format the text display value of index or column headers.
Styler.hide: Hide the index, column headers, or specified data from display.

Notes
-----
As part of Styler, this method allows the display of an index to be
completely user-specified without affecting the underlying DataFrame data,
index, or column headers. This means that the flexibility of indexing is
maintained whilst the final display is customisable.

Since Styler is designed to be progressively constructed with method chaining,
this method is adapted to react to the **currently specified hidden elements**.
This is useful because it means one does not have to specify all the new
labels if the majority of an index, or column headers, have already been hidden.
The following produce equivalent display (note the length of ``labels`` in
each case).

.. code-block:: python

    # relabel first, then hide
    df = pd.DataFrame({"col": ["a", "b", "c"]})
    df.style.relabel_index(["A", "B", "C"]).hide([0,1])
    # hide first, then relabel
    df = pd.DataFrame({"col": ["a", "b", "c"]})
    df.style.hide([0,1]).relabel_index(["C"])

This method should be used, rather than :meth:`Styler.format_index`, in one of
the following cases (see examples):

  - A specified set of labels are required which are not a function of the
    underlying index keys.
  - The function of the underlying index keys requires a counter variable,
    such as those available upon enumeration.

Examples
--------
Basic use

>>> df = pd.DataFrame({"col": ["a", "b", "c"]})
>>> df.style.relabel_index(["A", "B", "C"])  # doctest: +SKIP
     col
A      a
B      b
C      c

Chaining with pre-hidden elements

>>> df.style.hide([0,1]).relabel_index(["C"])  # doctest: +SKIP
     col
C      c

Using a MultiIndex

>>> midx = pd.MultiIndex.from_product([[0, 1], [0, 1], [0, 1]])
>>> df = pd.DataFrame({"col": list(range(8))}, index=midx)
>>> styler = df.style  # doctest: +SKIP
          col
0  0  0     0
      1     1
   1  0     2
      1     3
1  0  0     4
      1     5
   1  0     6
      1     7
>>> styler.hide((midx.get_level_values(0)==0)|(midx.get_level_values(1)==0))
...  # doctest: +SKIP
>>> styler.hide(level=[0,1])  # doctest: +SKIP
>>> styler.relabel_index(["binary6", "binary7"])  # doctest: +SKIP
          col
binary6     6
binary7     7

We can also achieve the above by indexing first and then re-labeling

>>> styler = df.loc[[(1,1,0), (1,1,1)]].style
>>> styler.hide(level=[0,1]).relabel_index(["binary6", "binary7"])
...  # doctest: +SKIP
          col
binary6     6
binary7     7

Defining a formatting function which uses an enumeration counter. Also note
that the value of the index key is passed in the case of string labels so it
can also be inserted into the label, using curly brackets (or double curly
brackets if the string if pre-formatted),

>>> df = pd.DataFrame({"samples": np.random.rand(10)})
>>> styler = df.loc[np.random.randint(0,10,3)].style
>>> styler.relabel_index([f"sample{i+1} ({{}})" for i in range(3)])
...  # doctest: +SKIP
                 samples
sample1 (5)     0.315811
sample2 (0)     0.495941
sample3 (2)     0.067946

---
## scale_down
```python
from style_render import scale_down
```



---
## wrapper
```python
from style_render import wrapper
```



---
## pred
```python
from style_render import pred
```

Returns
-------
bool
    True if slice does *not* reduce,
    False if `part` is a tuple.

---
## _class_styles
```python
from style_render import _class_styles
```

Combine the ``_Tooltips`` CSS class name and CSS properties to the format
required to extend the underlying ``Styler`` `table_styles` to allow
tooltips to render in HTML.

Returns
-------
styles : List

---
## _pseudo_css
```python
from style_render import _pseudo_css
```

For every table data-cell that has a valid tooltip (not None, NaN or
empty string) must create two pseudo CSS entries for the specific
<td> element id which are added to overall table styles:
an on hover visibility change and a content change
dependent upon the user's chosen display string.

For example:
    [{"selector": "T__row1_col1:hover .pd-t",
     "props": [("visibility", "visible")]},
    {"selector": "T__row1_col1 .pd-t::after",
     "props": [("content", "Some Valid Text String")]}]

Parameters
----------
uuid: str
    The uuid of the Styler instance
name: str
    The css-name of the class used for styling tooltips
row : int
    The row index of the specified tooltip string data
col : int
    The col index of the specified tooltip string data
text : str
    The textual content of the tooltip to be displayed in HTML.

Returns
-------
pseudo_css : List

---
## font_weight
```python
from style_render import font_weight
```



---
## font_style
```python
from style_render import font_style
```



---
## color
```python
from style_render import color
```

CSS colors have 5 formats to process:

 - 6 digit hex code: "#ff23ee"     --> [HTML]{FF23EE}
 - 3 digit hex code: "#f0e"        --> [HTML]{FF00EE}
 - rgba: rgba(128, 255, 0, 0.5)    --> [rgb]{0.502, 1.000, 0.000}
 - rgb: rgb(128, 255, 0,)          --> [rbg]{0.502, 1.000, 0.000}
 - string: red                     --> {red}

Additionally rgb or rgba can be expressed in % which is also parsed.

---
## _concatenated_visible_rows
```python
from style_render import _concatenated_visible_rows
```

Extract all visible row indices recursively from concatenated stylers.

---
## concatenated_visible_rows
```python
from style_render import concatenated_visible_rows
```



---
## alias_
```python
from style_render import alias_
```



---
## _side_expander
```python
from css import _side_expander
```

Wrapper to expand shorthand property into top, right, bottom, left properties

Parameters
----------
side : str
    The border side to expand into properties

Returns
-------
    function: Return to call when a 'border(-{side}): {value}' string is encountered

---
## _border_expander
```python
from css import _border_expander
```

Wrapper to expand 'border' property into border color, style, and width properties

Parameters
----------
side : str
    The border side to expand into properties

Returns
-------
    function: Return to call when a 'border(-{side}): {value}' string is encountered

---
## CSSResolver
```python
from css import CSSResolver
```

A callable for parsing and resolving CSS to atomic properties.

---
## expand
```python
from css import expand
```

Expand border into color, style, and width tuples

Parameters
----------
    prop : str
        CSS property name passed to styler
    value : str
        Value passed to styler for property

Yields
------
    Tuple (str, str): Expanded property, value

---
## __call__
```python
from css import __call__
```

The given declarations to atomic properties.

Parameters
----------
declarations_str : str | Iterable[tuple[str, str]]
    A CSS string or set of CSS declaration tuples
    e.g. "font-weight: bold; background: blue" or
    {("font-weight", "bold"), ("background", "blue")}
inherited : dict, optional
    Atomic properties indicating the inherited style context in which
    declarations_str is to be resolved. ``inherited`` should already
    be resolved, i.e. valid output of this method.

Returns
-------
dict
    Atomic CSS 2.2 properties.

Examples
--------
>>> resolve = CSSResolver()
>>> inherited = {'font-family': 'serif', 'font-weight': 'bold'}
>>> out = resolve('''
...               border-color: BLUE RED;
...               font-size: 1em;
...               font-size: 2em;
...               font-weight: normal;
...               font-weight: inherit;
...               ''', inherited)
>>> sorted(out.items())  # doctest: +NORMALIZE_WHITESPACE
[('border-bottom-color', 'blue'),
 ('border-left-color', 'red'),
 ('border-right-color', 'red'),
 ('border-top-color', 'blue'),
 ('font-family', 'serif'),
 ('font-size', '24pt'),
 ('font-weight', 'bold')]

---
## _update_initial
```python
from css import _update_initial
```



---
## _update_font_size
```python
from css import _update_font_size
```



---
## _get_font_size
```python
from css import _get_font_size
```



---
## _get_float_font_size_from_pt
```python
from css import _get_float_font_size_from_pt
```



---
## _update_other_units
```python
from css import _update_other_units
```



---
## size_to_pt
```python
from css import size_to_pt
```



---
## atomize
```python
from css import atomize
```



---
## parse
```python
from css import parse
```

Generates (prop, value) pairs from declarations.

In a future version may generate parsed tokens from tinycss/tinycss2

Parameters
----------
declarations_str : str

---
## _error
```python
from css import _error
```



---
## __name__
```python
from csvs import __name__
```

Module for formatting output data into CSV files.

---
## CSVFormatter
```python
from csvs import CSVFormatter
```



---
## __init__
```python
from csvs import __init__
```



---
## na_rep
```python
from csvs import na_rep
```



---
## float_format
```python
from csvs import float_format
```



---
## decimal
```python
from csvs import decimal
```



---
## header
```python
from csvs import header
```



---
## index
```python
from csvs import index
```



---
## _initialize_index_label
```python
from csvs import _initialize_index_label
```



---
## _get_index_label_from_obj
```python
from csvs import _get_index_label_from_obj
```



---
## _get_index_label_multiindex
```python
from csvs import _get_index_label_multiindex
```



---
## _get_index_label_flat
```python
from csvs import _get_index_label_flat
```



---
## _initialize_quotechar
```python
from csvs import _initialize_quotechar
```



---
## has_mi_columns
```python
from csvs import has_mi_columns
```



---
## _initialize_columns
```python
from csvs import _initialize_columns
```



---
## _initialize_chunksize
```python
from csvs import _initialize_chunksize
```



---
## _number_format
```python
from csvs import _number_format
```

Dictionary used for storing number formatting settings.

---
## data_index
```python
from csvs import data_index
```



---
## nlevels
```python
from csvs import nlevels
```



---
## _has_aliases
```python
from csvs import _has_aliases
```



---
## _need_to_save_header
```python
from csvs import _need_to_save_header
```



---
## write_cols
```python
from csvs import write_cols
```



---
## encoded_labels
```python
from csvs import encoded_labels
```



---
## save
```python
from csvs import save
```

Create the writer & save.

---
## _save
```python
from csvs import _save
```



---
## _save_header
```python
from csvs import _save_header
```



---
## _generate_multiindex_header_rows
```python
from csvs import _generate_multiindex_header_rows
```



---
## _save_body
```python
from csvs import _save_body
```



---
## _save_chunk
```python
from csvs import _save_chunk
```



---
## __name__
```python
from string import __name__
```

Module for formatting output data in console (to string).

---
## StringFormatter
```python
from string import StringFormatter
```

Formatter for string representation of a dataframe.

---
## _binify
```python
from string import _binify
```



---
## __init__
```python
from string import __init__
```



---
## to_string
```python
from string import to_string
```



---
## _get_strcols
```python
from string import _get_strcols
```



---
## _get_string_representation
```python
from string import _get_string_representation
```



---
## _empty_info_line
```python
from string import _empty_info_line
```



---
## _need_to_wrap_around
```python
from string import _need_to_wrap_around
```



---
## _insert_dot_separators
```python
from string import _insert_dot_separators
```



---
## _adjusted_tr_col_num
```python
from string import _adjusted_tr_col_num
```



---
## _insert_dot_separator_horizontal
```python
from string import _insert_dot_separator_horizontal
```



---
## _insert_dot_separator_vertical
```python
from string import _insert_dot_separator_vertical
```



---
## _join_multiline
```python
from string import _join_multiline
```



---
## _fit_strcols_to_terminal_width
```python
from string import _fit_strcols_to_terminal_width
```



---
## _put_str
```python
from info import _put_str
```

Make string of specified length, padding to the right if necessary.

Parameters
----------
s : Union[str, Dtype]
    String to be formatted.
space : int
    Length to force string to be of.

Returns
-------
str
    String coerced to given length.

Examples
--------
>>> pd.io.formats.info._put_str("panda", 6)
'panda '
>>> pd.io.formats.info._put_str("panda", 4)
'pand'

---
## _sizeof_fmt
```python
from info import _sizeof_fmt
```

Return size in human readable format.

Parameters
----------
num : int
    Size in bytes.
size_qualifier : str
    Either empty, or '+' (if lower bound).

Returns
-------
str
    Size in human readable format.

Examples
--------
>>> _sizeof_fmt(23028, '')
'22.5 KB'

>>> _sizeof_fmt(23028, '+')
'22.5+ KB'

---
## _initialize_memory_usage
```python
from info import _initialize_memory_usage
```

Get memory usage based on inputs and display options.

---
## _BaseInfo
```python
from info import _BaseInfo
```

Base class for DataFrameInfo and SeriesInfo.

Parameters
----------
data : DataFrame or Series
    Either dataframe or series.
memory_usage : bool or str, optional
    If "deep", introspect the data deeply by interrogating object dtypes
    for system-level memory consumption, and include it in the returned
    values.

---
## DataFrameInfo
```python
from info import DataFrameInfo
```

Class storing dataframe-specific info.

---
## SeriesInfo
```python
from info import SeriesInfo
```

Class storing series-specific info.

---
## _InfoPrinterAbstract
```python
from info import _InfoPrinterAbstract
```

Class for printing dataframe or series info.

---
## _DataFrameInfoPrinter
```python
from info import _DataFrameInfoPrinter
```

Class for printing dataframe info.

Parameters
----------
info : DataFrameInfo
    Instance of DataFrameInfo.
max_cols : int, optional
    When to switch from the verbose to the truncated output.
verbose : bool, optional
    Whether to print the full summary.
show_counts : bool, optional
    Whether to show the non-null counts.

---
## _SeriesInfoPrinter
```python
from info import _SeriesInfoPrinter
```

Class for printing series info.

Parameters
----------
info : SeriesInfo
    Instance of SeriesInfo.
verbose : bool, optional
    Whether to print the full summary.
show_counts : bool, optional
    Whether to show the non-null counts.

---
## _TableBuilderAbstract
```python
from info import _TableBuilderAbstract
```

Abstract builder for info table.

---
## _DataFrameTableBuilder
```python
from info import _DataFrameTableBuilder
```

Abstract builder for dataframe info table.

Parameters
----------
info : DataFrameInfo.
    Instance of DataFrameInfo.

---
## _DataFrameTableBuilderNonVerbose
```python
from info import _DataFrameTableBuilderNonVerbose
```

Dataframe info table builder for non-verbose output.

---
## _TableBuilderVerboseMixin
```python
from info import _TableBuilderVerboseMixin
```

Mixin for verbose info output.

---
## _DataFrameTableBuilderVerbose
```python
from info import _DataFrameTableBuilderVerbose
```

Dataframe info table builder for verbose output.

---
## _SeriesTableBuilder
```python
from info import _SeriesTableBuilder
```

Abstract builder for series info table.

Parameters
----------
info : SeriesInfo.
    Instance of SeriesInfo.

---
## _SeriesTableBuilderNonVerbose
```python
from info import _SeriesTableBuilderNonVerbose
```

Series info table builder for non-verbose output.

---
## _SeriesTableBuilderVerbose
```python
from info import _SeriesTableBuilderVerbose
```

Series info table builder for verbose output.

---
## _get_dataframe_dtype_counts
```python
from info import _get_dataframe_dtype_counts
```

Create mapping between datatypes and their number of occurrences.

---
## dtypes
```python
from info import dtypes
```

Dtypes of each of the DataFrame's columns.

---
## dtype_counts
```python
from info import dtype_counts
```

Mapping dtype - number of counts.

---
## non_null_counts
```python
from info import non_null_counts
```



---
## memory_usage_bytes
```python
from info import memory_usage_bytes
```

Memory usage in bytes.

Returns
-------
memory_usage_bytes : int
    Object's total memory usage in bytes.

---
## memory_usage_string
```python
from info import memory_usage_string
```

Memory usage string with proper size qualifier.

---
## size_qualifier
```python
from info import size_qualifier
```



---
## render
```python
from info import render
```



---
## __init__
```python
from info import __init__
```



---
## ids
```python
from info import ids
```

Dataframe columns.

---
## col_count
```python
from info import col_count
```

Number of dataframe columns to be summarized.

---
## to_buffer
```python
from info import to_buffer
```

Save dataframe info into buffer.

---
## _create_table_builder
```python
from info import _create_table_builder
```

Create instance of table builder based on verbosity.

---
## max_rows
```python
from info import max_rows
```

Maximum info rows to be displayed.

---
## exceeds_info_cols
```python
from info import exceeds_info_cols
```

Check if number of columns to be summarized does not exceed maximum.

---
## exceeds_info_rows
```python
from info import exceeds_info_rows
```

Check if number of rows to be summarized does not exceed maximum.

---
## _initialize_max_cols
```python
from info import _initialize_max_cols
```



---
## _initialize_show_counts
```python
from info import _initialize_show_counts
```



---
## get_lines
```python
from info import get_lines
```



---
## data
```python
from info import data
```

Series.

---
## display_memory_usage
```python
from info import display_memory_usage
```

Whether to display memory usage.

---
## add_object_type_line
```python
from info import add_object_type_line
```

Add line with string representation of dataframe to the table.

---
## add_index_range_line
```python
from info import add_index_range_line
```

Add line with range of indices to the table.

---
## add_dtypes_line
```python
from info import add_dtypes_line
```

Add summary line with dtypes present in dataframe.

---
## _fill_empty_info
```python
from info import _fill_empty_info
```

Add lines to the info table, pertaining to empty dataframe.

---
## _fill_non_empty_info
```python
from info import _fill_non_empty_info
```

Add lines to the info table, pertaining to non-empty series.

---
## add_memory_usage_line
```python
from info import add_memory_usage_line
```

Add line containing memory usage.

---
## add_columns_summary_line
```python
from info import add_columns_summary_line
```



---
## headers
```python
from info import headers
```

Headers names of the columns in verbose table.

---
## header_column_widths
```python
from info import header_column_widths
```

Widths of header columns (only titles).

---
## _get_gross_column_widths
```python
from info import _get_gross_column_widths
```

Get widths of columns containing both headers and actual content.

---
## _get_body_column_widths
```python
from info import _get_body_column_widths
```

Get widths of table content columns.

---
## _gen_rows
```python
from info import _gen_rows
```

Generator function yielding rows content.

Each element represents a row comprising a sequence of strings.

---
## _gen_rows_with_counts
```python
from info import _gen_rows_with_counts
```

Iterator with string representation of body data with counts.

---
## _gen_rows_without_counts
```python
from info import _gen_rows_without_counts
```

Iterator with string representation of body data without counts.

---
## add_header_line
```python
from info import add_header_line
```



---
## add_separator_line
```python
from info import add_separator_line
```



---
## add_body_lines
```python
from info import add_body_lines
```



---
## _gen_non_null_counts
```python
from info import _gen_non_null_counts
```

Iterator with string representation of non-null counts.

---
## _gen_dtypes
```python
from info import _gen_dtypes
```

Iterator with string representation of column dtypes.

---
## _gen_line_numbers
```python
from info import _gen_line_numbers
```

Iterator with string representation of column numbers.

---
## _gen_columns
```python
from info import _gen_columns
```

Iterator with string representation of column names.

---
## add_series_name_line
```python
from info import add_series_name_line
```



---
## __name__
```python
from printing import __name__
```



---
## adjoin
```python
from printing import adjoin
```



---
## _adj_justify
```python
from printing import _adj_justify
```

Perform ljust, center, rjust against string or list-like

---
## _pprint_seq
```python
from printing import _pprint_seq
```

internal. pprinter for iterables. you should probably use pprint_thing()
rather than calling this directly.

bounds length of printed sequence, depending on options

---
## _pprint_dict
```python
from printing import _pprint_dict
```

internal. pprinter for iterables. you should probably use pprint_thing()
rather than calling this directly.

---
## pprint_thing
```python
from printing import pprint_thing
```

This function is the sanctioned way of converting objects
to a string representation and properly handles nested sequences.

Parameters
----------
thing : anything to be formatted
_nest_lvl : internal use only. pprint_thing() is mutually-recursive
    with pprint_sequence, this argument is used to keep track of the
    current nesting level, and limit it.
escape_chars : list or dict, optional
    Characters to escape. If a dict is passed the values are the
    replacements
default_escapes : bool, default False
    Whether the input escape characters replaces or adds to the defaults
max_seq_items : int or None, default None
    Pass through to other pretty printers to limit sequence printing

Returns
-------
str

---
## pprint_thing_encoded
```python
from printing import pprint_thing_encoded
```



---
## enable_data_resource_formatter
```python
from printing import enable_data_resource_formatter
```



---
## default_pprint
```python
from printing import default_pprint
```



---
## format_object_summary
```python
from printing import format_object_summary
```

Return the formatted obj as a unicode string

Parameters
----------
obj : object
    must be iterable and support __getitem__
formatter : callable
    string formatter for an element
is_justify : bool
    should justify the display
name : name, optional
    defaults to the class name of the obj
indent_for_name : bool, default True
    Whether subsequent lines should be indented to
    align with the name.
line_break_each_value : bool, default False
    If True, inserts a line break for each value of ``obj``.
    If False, only break lines when the a line of values gets wider
    than the display width.

Returns
-------
summary string

---
## _justify
```python
from printing import _justify
```

Justify items in head and tail, so they are right-aligned when stacked.

Parameters
----------
head : list-like of list-likes of strings
tail : list-like of list-likes of strings

Returns
-------
tuple of list of tuples of strings
    Same as head and tail, but items are right aligned when stacked
    vertically.

Examples
--------
>>> _justify([['a', 'b']], [['abc', 'abcd']])
([('  a', '   b')], [('abc', 'abcd')])

---
## PrettyDict
```python
from printing import PrettyDict
```

Dict extension to support abbreviated __repr__

---
## _TextAdjustment
```python
from printing import _TextAdjustment
```



---
## _EastAsianTextAdjustment
```python
from printing import _EastAsianTextAdjustment
```



---
## get_adjustment
```python
from printing import get_adjustment
```



---
## as_escaped_string
```python
from printing import as_escaped_string
```



---
## _extend_line
```python
from printing import _extend_line
```



---
## best_len
```python
from printing import best_len
```



---
## __repr__
```python
from printing import __repr__
```



---
## __init__
```python
from printing import __init__
```



---
## len
```python
from printing import len
```

Calculate display width considering unicode East Asian Width

---
## justify
```python
from printing import justify
```



---
## _get_pad
```python
from printing import _get_pad
```



---
## TableSchemaFormatter
```python
from printing import TableSchemaFormatter
```



---
## __name__
```python
from _openpyxl import __name__
```



---
## OpenpyxlWriter
```python
from _openpyxl import OpenpyxlWriter
```



---
## OpenpyxlReader
```python
from _openpyxl import OpenpyxlReader
```



---
## __init__
```python
from _openpyxl import __init__
```

Reader using openpyxl engine.

Parameters
----------
filepath_or_buffer : str, path object or Workbook
    Object to be parsed.
{storage_options}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## book
```python
from _openpyxl import book
```

Book instance of class openpyxl.workbook.Workbook.

This attribute can be used to access engine-specific features.

---
## sheets
```python
from _openpyxl import sheets
```

Mapping of sheet names to sheet objects.

---
## _save
```python
from _openpyxl import _save
```

Save workbook to disk.

---
## _convert_to_style_kwargs
```python
from _openpyxl import _convert_to_style_kwargs
```

Convert a style_dict to a set of kwargs suitable for initializing
or updating-on-copy an openpyxl v2 style object.

Parameters
----------
style_dict : dict
    A dict with zero or more of the following keys (or their synonyms).
        'font'
        'fill'
        'border' ('borders')
        'alignment'
        'number_format'
        'protection'

Returns
-------
style_kwargs : dict
    A dict with the same, normalized keys as ``style_dict`` but each
    value has been replaced with a native openpyxl style object of the
    appropriate class.

---
## _convert_to_color
```python
from _openpyxl import _convert_to_color
```

Convert ``color_spec`` to an openpyxl v2 Color object.

Parameters
----------
color_spec : str, dict
    A 32-bit ARGB hex string, or a dict with zero or more of the
    following keys.
        'rgb'
        'indexed'
        'auto'
        'theme'
        'tint'
        'index'
        'type'

Returns
-------
color : openpyxl.styles.Color

---
## _convert_to_font
```python
from _openpyxl import _convert_to_font
```

Convert ``font_dict`` to an openpyxl v2 Font object.

Parameters
----------
font_dict : dict
    A dict with zero or more of the following keys (or their synonyms).
        'name'
        'size' ('sz')
        'bold' ('b')
        'italic' ('i')
        'underline' ('u')
        'strikethrough' ('strike')
        'color'
        'vertAlign' ('vertalign')
        'charset'
        'scheme'
        'family'
        'outline'
        'shadow'
        'condense'

Returns
-------
font : openpyxl.styles.Font

---
## _convert_to_stop
```python
from _openpyxl import _convert_to_stop
```

Convert ``stop_seq`` to a list of openpyxl v2 Color objects,
suitable for initializing the ``GradientFill`` ``stop`` parameter.

Parameters
----------
stop_seq : iterable
    An iterable that yields objects suitable for consumption by
    ``_convert_to_color``.

Returns
-------
stop : list of openpyxl.styles.Color

---
## _convert_to_fill
```python
from _openpyxl import _convert_to_fill
```

Convert ``fill_dict`` to an openpyxl v2 Fill object.

Parameters
----------
fill_dict : dict
    A dict with one or more of the following keys (or their synonyms),
        'fill_type' ('patternType', 'patterntype')
        'start_color' ('fgColor', 'fgcolor')
        'end_color' ('bgColor', 'bgcolor')
    or one or more of the following keys (or their synonyms).
        'type' ('fill_type')
        'degree'
        'left'
        'right'
        'top'
        'bottom'
        'stop'

Returns
-------
fill : openpyxl.styles.Fill

---
## _convert_to_side
```python
from _openpyxl import _convert_to_side
```

Convert ``side_spec`` to an openpyxl v2 Side object.

Parameters
----------
side_spec : str, dict
    A string specifying the border style, or a dict with zero or more
    of the following keys (or their synonyms).
        'style' ('border_style')
        'color'

Returns
-------
side : openpyxl.styles.Side

---
## _convert_to_border
```python
from _openpyxl import _convert_to_border
```

Convert ``border_dict`` to an openpyxl v2 Border object.

Parameters
----------
border_dict : dict
    A dict with zero or more of the following keys (or their synonyms).
        'left'
        'right'
        'top'
        'bottom'
        'diagonal'
        'diagonal_direction'
        'vertical'
        'horizontal'
        'diagonalUp' ('diagonalup')
        'diagonalDown' ('diagonaldown')
        'outline'

Returns
-------
border : openpyxl.styles.Border

---
## _convert_to_alignment
```python
from _openpyxl import _convert_to_alignment
```

Convert ``alignment_dict`` to an openpyxl v2 Alignment object.

Parameters
----------
alignment_dict : dict
    A dict with zero or more of the following keys (or their synonyms).
        'horizontal'
        'vertical'
        'text_rotation'
        'wrap_text'
        'shrink_to_fit'
        'indent'
Returns
-------
alignment : openpyxl.styles.Alignment

---
## _convert_to_number_format
```python
from _openpyxl import _convert_to_number_format
```

Convert ``number_format_dict`` to an openpyxl v2.1.0 number format
initializer.

Parameters
----------
number_format_dict : dict
    A dict with zero or more of the following keys.
        'format_code' : str

Returns
-------
number_format : str

---
## _convert_to_protection
```python
from _openpyxl import _convert_to_protection
```

Convert ``protection_dict`` to an openpyxl v2 Protection object.

Parameters
----------
protection_dict : dict
    A dict with zero or more of the following keys.
        'locked'
        'hidden'

Returns
-------

---
## _write_cells
```python
from _openpyxl import _write_cells
```



---
## _workbook_class
```python
from _openpyxl import _workbook_class
```



---
## load_workbook
```python
from _openpyxl import load_workbook
```



---
## sheet_names
```python
from _openpyxl import sheet_names
```



---
## get_sheet_by_name
```python
from _openpyxl import get_sheet_by_name
```



---
## get_sheet_by_index
```python
from _openpyxl import get_sheet_by_index
```



---
## _convert_cell
```python
from _openpyxl import _convert_cell
```



---
## get_sheet_data
```python
from _openpyxl import get_sheet_data
```



---
## read_excel
```python
from _base import read_excel
```



---
## BaseExcelReader
```python
from _base import BaseExcelReader
```



---
## ExcelWriter
```python
from _base import ExcelWriter
```

Class for writing DataFrame objects into excel sheets.

Default is to use:

* `xlsxwriter <https://pypi.org/project/XlsxWriter/>`__ for xlsx files if xlsxwriter
  is installed otherwise `openpyxl <https://pypi.org/project/openpyxl/>`__
* `odswriter <https://pypi.org/project/odswriter/>`__ for ods files

See ``DataFrame.to_excel`` for typical usage.

The writer should be used as a context manager. Otherwise, call `close()` to save
and close any opened file handles.

Parameters
----------
path : str or typing.BinaryIO
    Path to xls or xlsx or ods file.
engine : str (optional)
    Engine to use for writing. If None, defaults to
    ``io.excel.<extension>.writer``.  NOTE: can only be passed as a keyword
    argument.
date_format : str, default None
    Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').
datetime_format : str, default None
    Format string for datetime objects written into Excel files.
    (e.g. 'YYYY-MM-DD HH:MM:SS').
mode : {{'w', 'a'}}, default 'w'
    File mode to use (write or append). Append does not work with fsspec URLs.
{storage_options}

if_sheet_exists : {{'error', 'new', 'replace', 'overlay'}}, default 'error'
    How to behave when trying to write to a sheet that already
    exists (append mode only).

    * error: raise a ValueError.
    * new: Create a new sheet, with a name determined by the engine.
    * replace: Delete the contents of the sheet before writing to it.
    * overlay: Write contents to the existing sheet without first removing,
      but possibly over top of, the existing contents.

    .. versionadded:: 1.3.0

    .. versionchanged:: 1.4.0

       Added ``overlay`` option

engine_kwargs : dict, optional
    Keyword arguments to be passed into the engine. These will be passed to
    the following functions of the respective engines:

    * xlsxwriter: ``xlsxwriter.Workbook(file, **engine_kwargs)``
    * openpyxl (write mode): ``openpyxl.Workbook(**engine_kwargs)``
    * openpyxl (append mode): ``openpyxl.load_workbook(file, **engine_kwargs)``
    * odswriter: ``odf.opendocument.OpenDocumentSpreadsheet(**engine_kwargs)``

    .. versionadded:: 1.3.0

Notes
-----
For compatibility with CSV writers, ExcelWriter serializes lists
and dicts to strings before writing.

Examples
--------
Default usage:

>>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
>>> with pd.ExcelWriter("path_to_file.xlsx") as writer:
...     df.to_excel(writer)  # doctest: +SKIP

To write to separate sheets in a single file:

>>> df1 = pd.DataFrame([["AAA", "BBB"]], columns=["Spam", "Egg"])  # doctest: +SKIP
>>> df2 = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
>>> with pd.ExcelWriter("path_to_file.xlsx") as writer:
...     df1.to_excel(writer, sheet_name="Sheet1")  # doctest: +SKIP
...     df2.to_excel(writer, sheet_name="Sheet2")  # doctest: +SKIP

You can set the date format or datetime format:

>>> from datetime import date, datetime  # doctest: +SKIP
>>> df = pd.DataFrame(
...     [
...         [date(2014, 1, 31), date(1999, 9, 24)],
...         [datetime(1998, 5, 26, 23, 33, 4), datetime(2014, 2, 28, 13, 5, 13)],
...     ],
...     index=["Date", "Datetime"],
...     columns=["X", "Y"],
... )  # doctest: +SKIP
>>> with pd.ExcelWriter(
...     "path_to_file.xlsx",
...     date_format="YYYY-MM-DD",
...     datetime_format="YYYY-MM-DD HH:MM:SS"
... ) as writer:
...     df.to_excel(writer)  # doctest: +SKIP

You can also append to an existing Excel file:

>>> with pd.ExcelWriter("path_to_file.xlsx", mode="a", engine="openpyxl") as writer:
...     df.to_excel(writer, sheet_name="Sheet3")  # doctest: +SKIP

Here, the `if_sheet_exists` parameter can be set to replace a sheet if it
already exists:

>>> with ExcelWriter(
...     "path_to_file.xlsx",
...     mode="a",
...     engine="openpyxl",
...     if_sheet_exists="replace",
... ) as writer:
...     df.to_excel(writer, sheet_name="Sheet1")  # doctest: +SKIP

You can also write multiple DataFrames to a single sheet. Note that the
``if_sheet_exists`` parameter needs to be set to ``overlay``:

>>> with ExcelWriter("path_to_file.xlsx",
...     mode="a",
...     engine="openpyxl",
...     if_sheet_exists="overlay",
... ) as writer:
...     df1.to_excel(writer, sheet_name="Sheet1")
...     df2.to_excel(writer, sheet_name="Sheet1", startcol=3)  # doctest: +SKIP

You can store Excel file in RAM:

>>> import io
>>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])
>>> buffer = io.BytesIO()
>>> with pd.ExcelWriter(buffer) as writer:
...     df.to_excel(writer)

You can pack Excel file into zip archive:

>>> import zipfile  # doctest: +SKIP
>>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
>>> with zipfile.ZipFile("path_to_file.zip", "w") as zf:
...     with zf.open("filename.xlsx", "w") as buffer:
...         with pd.ExcelWriter(buffer) as writer:
...             df.to_excel(writer)  # doctest: +SKIP

You can specify additional arguments to the underlying engine:

>>> with pd.ExcelWriter(
...     "path_to_file.xlsx",
...     engine="xlsxwriter",
...     engine_kwargs={{"options": {{"nan_inf_to_errors": True}}}}
... ) as writer:
...     df.to_excel(writer)  # doctest: +SKIP

In append mode, ``engine_kwargs`` are passed through to
openpyxl's ``load_workbook``:

>>> with pd.ExcelWriter(
...     "path_to_file.xlsx",
...     engine="openpyxl",
...     mode="a",
...     engine_kwargs={{"keep_vba": True}}
... ) as writer:
...     df.to_excel(writer, sheet_name="Sheet2")  # doctest: +SKIP

---
## inspect_excel_format
```python
from _base import inspect_excel_format
```

Inspect the path or content of an excel file and get its format.

Adopted from xlrd: https://github.com/python-excel/xlrd.

Parameters
----------
content_or_path : str or file-like object
    Path to file or content of file to inspect. May be a URL.
{storage_options}

Returns
-------
str or None
    Format of file if it can be determined.

Raises
------
ValueError
    If resulting stream is empty.
BadZipFile
    If resulting stream does not have an XLS signature and is not a valid zipfile.

---
## ExcelFile
```python
from _base import ExcelFile
```

Class for parsing tabular Excel sheets into DataFrame objects.

See read_excel for more documentation.

Parameters
----------
path_or_buffer : str, bytes, path object (pathlib.Path or py._path.local.LocalPath),
    A file-like object, xlrd workbook or openpyxl workbook.
    If a string or path object, expected to be a path to a
    .xls, .xlsx, .xlsb, .xlsm, .odf, .ods, or .odt file.
engine : str, default None
    If io is not a buffer or path, this must be set to identify io.
    Supported engines: ``xlrd``, ``openpyxl``, ``odf``, ``pyxlsb``, ``calamine``
    Engine compatibility :

    - ``xlrd`` supports old-style Excel files (.xls).
    - ``openpyxl`` supports newer Excel file formats.
    - ``odf`` supports OpenDocument file formats (.odf, .ods, .odt).
    - ``pyxlsb`` supports Binary Excel files.
    - ``calamine`` supports Excel (.xls, .xlsx, .xlsm, .xlsb)
      and OpenDocument (.ods) file formats.

    .. versionchanged:: 1.2.0

       The engine `xlrd <https://xlrd.readthedocs.io/en/latest/>`_
       now only supports old-style ``.xls`` files.
       When ``engine=None``, the following logic will be
       used to determine the engine:

       - If ``path_or_buffer`` is an OpenDocument format (.odf, .ods, .odt),
         then `odf <https://pypi.org/project/odfpy/>`_ will be used.
       - Otherwise if ``path_or_buffer`` is an xls format,
         ``xlrd`` will be used.
       - Otherwise if ``path_or_buffer`` is in xlsb format,
         `pyxlsb <https://pypi.org/project/pyxlsb/>`_ will be used.

       .. versionadded:: 1.3.0

       - Otherwise if `openpyxl <https://pypi.org/project/openpyxl/>`_ is installed,
         then ``openpyxl`` will be used.
       - Otherwise if ``xlrd >= 2.0`` is installed, a ``ValueError`` will be raised.

       .. warning::

        Please do not report issues when using ``xlrd`` to read ``.xlsx`` files.
        This is not supported, switch to using ``openpyxl`` instead.
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

Examples
--------
>>> file = pd.ExcelFile('myfile.xlsx')  # doctest: +SKIP
>>> with pd.ExcelFile("myfile.xls") as xls:  # doctest: +SKIP
...     df1 = pd.read_excel(xls, "Sheet1")  # doctest: +SKIP

---
## _workbook_class
```python
from _base import _workbook_class
```



---
## load_workbook
```python
from _base import load_workbook
```



---
## close
```python
from _base import close
```

close io if necessary

---
## sheet_names
```python
from _base import sheet_names
```



---
## get_sheet_by_name
```python
from _base import get_sheet_by_name
```



---
## get_sheet_by_index
```python
from _base import get_sheet_by_index
```



---
## get_sheet_data
```python
from _base import get_sheet_data
```



---
## raise_if_bad_sheet_by_index
```python
from _base import raise_if_bad_sheet_by_index
```



---
## raise_if_bad_sheet_by_name
```python
from _base import raise_if_bad_sheet_by_name
```



---
## _check_skiprows_func
```python
from _base import _check_skiprows_func
```

Determine how many file rows are required to obtain `nrows` data
rows when `skiprows` is a function.

Parameters
----------
skiprows : function
    The function passed to read_excel by the user.
rows_to_use : int
    The number of rows that will be needed for the header and
    the data.

Returns
-------
int

---
## _calc_rows
```python
from _base import _calc_rows
```

If nrows specified, find the number of rows needed from the
file, otherwise return None.


Parameters
----------
header : int, list of int, or None
    See read_excel docstring.
index_col : int, str, list of int, or None
    See read_excel docstring.
skiprows : list-like, int, callable, or None
    See read_excel docstring.
nrows : int or None
    See read_excel docstring.

Returns
-------
int or None

---
## parse
```python
from _base import parse
```

Parse specified sheet(s) into a DataFrame.

Equivalent to read_excel(ExcelFile, ...)  See the read_excel
docstring for more info on accepted parameters.

Returns
-------
DataFrame or dict of DataFrames
    DataFrame from the passed in Excel file.

Examples
--------
>>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C'])
>>> df.to_excel('myfile.xlsx')  # doctest: +SKIP
>>> file = pd.ExcelFile('myfile.xlsx')  # doctest: +SKIP
>>> file.parse()  # doctest: +SKIP

---
## __new__
```python
from _base import __new__
```



---
## supported_extensions
```python
from _base import supported_extensions
```

Extensions that writer engine supports.

---
## engine
```python
from _base import engine
```

Name of engine.

---
## sheets
```python
from _base import sheets
```

Mapping of sheet names to sheet objects.

---
## book
```python
from _base import book
```



---
## _write_cells
```python
from _base import _write_cells
```

Write given formatted cells into Excel an excel sheet

Parameters
----------
cells : generator
    cell of formatted data to save to Excel sheet
sheet_name : str, default None
    Name of Excel sheet, if None, then use self.cur_sheet
startrow : upper left cell row to dump data frame
startcol : upper left cell column to dump data frame
freeze_panes: int tuple of length 2
    contains the bottom-most row and right-most column to freeze

---
## _save
```python
from _base import _save
```

Save workbook to disk.

---
## date_format
```python
from _base import date_format
```

Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').

---
## datetime_format
```python
from _base import datetime_format
```

Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').

---
## if_sheet_exists
```python
from _base import if_sheet_exists
```

How to behave when writing to a sheet that already exists in append mode.

---
## __fspath__
```python
from _base import __fspath__
```



---
## _get_sheet_name
```python
from _base import _get_sheet_name
```



---
## _value_with_fmt
```python
from _base import _value_with_fmt
```

Convert numpy types to Python types for the Excel writers.

Parameters
----------
val : object
    Value to be written into cells

Returns
-------
Tuple with the first element being the converted value and the second
    being an optional format

---
## check_extension
```python
from _base import check_extension
```

checks that path's extension against the Writer's supported
extensions.  If it isn't supported, raises UnsupportedFiletypeError.

---
## __enter__
```python
from _base import __enter__
```



---
## __exit__
```python
from _base import __exit__
```



---
## f
```python
from _base import f
```



---
## __name__
```python
from _calamine import __name__
```



---
## CalamineReader
```python
from _calamine import CalamineReader
```



---
## __init__
```python
from _calamine import __init__
```

Reader using calamine engine (xlsx/xls/xlsb/ods).

Parameters
----------
filepath_or_buffer : str, path to be parsed or
    an open readable stream.
{storage_options}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## _workbook_class
```python
from _calamine import _workbook_class
```



---
## load_workbook
```python
from _calamine import load_workbook
```



---
## sheet_names
```python
from _calamine import sheet_names
```



---
## get_sheet_by_name
```python
from _calamine import get_sheet_by_name
```



---
## get_sheet_by_index
```python
from _calamine import get_sheet_by_index
```



---
## get_sheet_data
```python
from _calamine import get_sheet_data
```



---
## _convert_cell
```python
from _calamine import _convert_cell
```



---
## __name__
```python
from _xlrd import __name__
```



---
## XlrdReader
```python
from _xlrd import XlrdReader
```



---
## __init__
```python
from _xlrd import __init__
```

Reader using xlrd engine.

Parameters
----------
filepath_or_buffer : str, path object or Workbook
    Object to be parsed.
{storage_options}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## _workbook_class
```python
from _xlrd import _workbook_class
```



---
## load_workbook
```python
from _xlrd import load_workbook
```



---
## sheet_names
```python
from _xlrd import sheet_names
```



---
## get_sheet_by_name
```python
from _xlrd import get_sheet_by_name
```



---
## get_sheet_by_index
```python
from _xlrd import get_sheet_by_index
```



---
## get_sheet_data
```python
from _xlrd import get_sheet_data
```



---
## _parse_cell
```python
from _xlrd import _parse_cell
```

converts the contents of the cell into a pandas appropriate object

---
## __name__
```python
from _pyxlsb import __name__
```



---
## PyxlsbReader
```python
from _pyxlsb import PyxlsbReader
```



---
## __init__
```python
from _pyxlsb import __init__
```

Reader using pyxlsb engine.

Parameters
----------
filepath_or_buffer : str, path object, or Workbook
    Object to be parsed.
{storage_options}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## _workbook_class
```python
from _pyxlsb import _workbook_class
```



---
## load_workbook
```python
from _pyxlsb import load_workbook
```



---
## sheet_names
```python
from _pyxlsb import sheet_names
```



---
## get_sheet_by_name
```python
from _pyxlsb import get_sheet_by_name
```



---
## get_sheet_by_index
```python
from _pyxlsb import get_sheet_by_index
```



---
## _convert_cell
```python
from _pyxlsb import _convert_cell
```



---
## get_sheet_data
```python
from _pyxlsb import get_sheet_data
```



---
## __name__
```python
from _odswriter import __name__
```



---
## ODSWriter
```python
from _odswriter import ODSWriter
```



---
## __init__
```python
from _odswriter import __init__
```



---
## book
```python
from _odswriter import book
```

Book instance of class odf.opendocument.OpenDocumentSpreadsheet.

This attribute can be used to access engine-specific features.

---
## sheets
```python
from _odswriter import sheets
```

Mapping of sheet names to sheet objects.

---
## _save
```python
from _odswriter import _save
```

Save workbook to disk.

---
## _write_cells
```python
from _odswriter import _write_cells
```

Write the frame cells using odf

---
## _make_table_cell_attributes
```python
from _odswriter import _make_table_cell_attributes
```

Convert cell attributes to OpenDocument attributes

Parameters
----------
cell : ExcelCell
    Spreadsheet cell data

Returns
-------
attributes : Dict[str, Union[int, str]]
    Dictionary with attributes and attribute values

---
## _make_table_cell
```python
from _odswriter import _make_table_cell
```

Convert cell data to an OpenDocument spreadsheet cell

Parameters
----------
cell : ExcelCell
    Spreadsheet cell data

Returns
-------
pvalue, cell : Tuple[str, TableCell]
    Display value, Cell value

---
## _process_style
```python
from _odswriter import _process_style
```

Convert a style dictionary to a OpenDocument style sheet

Parameters
----------
style : Dict
    Style dictionary

Returns
-------
style_key : str
    Unique style key for later reference in sheet

---
## _create_freeze_panes
```python
from _odswriter import _create_freeze_panes
```

Create freeze panes in the sheet.

Parameters
----------
sheet_name : str
    Name of the spreadsheet
freeze_panes : tuple of (int, int)
    Freeze pane location x and y

---
## register_writer
```python
from _util import register_writer
```

Add engine to the excel writer registry.io.excel.

You must use this method to integrate with ``to_excel``.

Parameters
----------
klass : ExcelWriter

---
## get_default_engine
```python
from _util import get_default_engine
```

Return the default reader/writer for the given extension.

Parameters
----------
ext : str
    The excel file extension for which to get the default engine.
mode : str {'reader', 'writer'}
    Whether to get the default engine for reading or writing.
    Either 'reader' or 'writer'

Returns
-------
str
    The default engine for the extension.

---
## get_writer
```python
from _util import get_writer
```



---
## _excel2num
```python
from _util import _excel2num
```

Convert Excel column name like 'AB' to 0-based column index.

Parameters
----------
x : str
    The Excel column name to convert to a 0-based column index.

Returns
-------
num : int
    The column index corresponding to the name.

Raises
------
ValueError
    Part of the Excel column name was invalid.

---
## _range2cols
```python
from _util import _range2cols
```

Convert comma separated list of column names and ranges to indices.

Parameters
----------
areas : str
    A string containing a sequence of column ranges (or areas).

Returns
-------
cols : list
    A list of 0-based column indices.

Examples
--------
>>> _range2cols('A:E')
[0, 1, 2, 3, 4]
>>> _range2cols('A,C,Z:AB')
[0, 2, 25, 26, 27]

---
## maybe_convert_usecols
```python
from _util import maybe_convert_usecols
```

Convert `usecols` into a compatible format for parsing in `parsers.py`.

Parameters
----------
usecols : object
    The use-columns object to potentially convert.

Returns
-------
converted : object
    The compatible format of `usecols`.

---
## validate_freeze_panes
```python
from _util import validate_freeze_panes
```



---
## fill_mi_header
```python
from _util import fill_mi_header
```

Forward fill blank entries in row but only inside the same parent index.

Used for creating headers in Multiindex.

Parameters
----------
row : list
    List of items in a single row.
control_row : list of bool
    Helps to determine if particular column is in same parent index as the
    previous value. Used to stop propagation of empty cells between
    different indexes.

Returns
-------
Returns changed row and control_row

---
## pop_header_name
```python
from _util import pop_header_name
```

Pop the header name for MultiIndex parsing.

Parameters
----------
row : list
    The data row to parse for the header name.
index_col : int, list
    The index columns for our data. Assumed to be non-null.

Returns
-------
header_name : str
    The extracted header name.
trimmed_row : list
    The original data row with the header name removed.

---
## combine_kwargs
```python
from _util import combine_kwargs
```

Used to combine two sources of kwargs for the backend engine.

Use of kwargs is deprecated, this function is solely for use in 1.3 and should
be removed in 1.4/2.0. Also _base.ExcelWriter.__new__ ensures either engine_kwargs
or kwargs must be None or empty respectively.

Parameters
----------
engine_kwargs: dict
    kwargs to be passed through to the engine.
kwargs: dict
    kwargs to be psased through to the engine (deprecated)

Returns
-------
engine_kwargs combined with kwargs

---
## __name__
```python
from _odfreader import __name__
```



---
## ODFReader
```python
from _odfreader import ODFReader
```



---
## __init__
```python
from _odfreader import __init__
```

Read tables out of OpenDocument formatted files.

Parameters
----------
filepath_or_buffer : str, path to be parsed or
    an open readable stream.
{storage_options}
engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

---
## _workbook_class
```python
from _odfreader import _workbook_class
```



---
## load_workbook
```python
from _odfreader import load_workbook
```



---
## empty_value
```python
from _odfreader import empty_value
```

Property for compat with other readers.

---
## sheet_names
```python
from _odfreader import sheet_names
```

Return a list of sheet names present in the document

---
## get_sheet_by_index
```python
from _odfreader import get_sheet_by_index
```



---
## get_sheet_by_name
```python
from _odfreader import get_sheet_by_name
```



---
## get_sheet_data
```python
from _odfreader import get_sheet_data
```

Parse an ODF Table into a list of lists

---
## _get_row_repeat
```python
from _odfreader import _get_row_repeat
```

Return number of times this row was repeated
Repeating an empty row appeared to be a common way
of representing sparse rows in the table.

---
## _get_column_repeat
```python
from _odfreader import _get_column_repeat
```



---
## _get_cell_value
```python
from _odfreader import _get_cell_value
```



---
## _get_cell_string_value
```python
from _odfreader import _get_cell_string_value
```

Find and decode OpenDocument text:s tags that represent
a run length encoded sequence of space characters.

---
## __name__
```python
from _xlsxwriter import __name__
```



---
## _XlsxStyler
```python
from _xlsxwriter import _XlsxStyler
```



---
## XlsxWriter
```python
from _xlsxwriter import XlsxWriter
```



---
## convert
```python
from _xlsxwriter import convert
```

converts a style_dict to an xlsxwriter format dict

Parameters
----------
style_dict : style dictionary to convert
num_format_str : optional number format string

---
## __init__
```python
from _xlsxwriter import __init__
```



---
## book
```python
from _xlsxwriter import book
```

Book instance of class xlsxwriter.Workbook.

This attribute can be used to access engine-specific features.

---
## sheets
```python
from _xlsxwriter import sheets
```



---
## _save
```python
from _xlsxwriter import _save
```

Save workbook to disk.

---
## _write_cells
```python
from _xlsxwriter import _write_cells
```



---
## to_json
```python
from _json import to_json
```



---
## Writer
```python
from _json import Writer
```



---
## SeriesWriter
```python
from _json import SeriesWriter
```



---
## FrameWriter
```python
from _json import FrameWriter
```



---
## JSONTableWriter
```python
from _json import JSONTableWriter
```



---
## read_json
```python
from _json import read_json
```

Convert a JSON string to pandas object.

Parameters
----------
path_or_buf : a valid JSON str, path object or file-like object
    Any valid string path is acceptable. The string could be a URL. Valid
    URL schemes include http, ftp, s3, and file. For file URLs, a host is
    expected. A local file could be:
    ``file://localhost/path/to/table.json``.

    If you want to pass in a path object, pandas accepts any
    ``os.PathLike``.

    By file-like object, we refer to objects with a ``read()`` method,
    such as a file handle (e.g. via builtin ``open`` function)
    or ``StringIO``.

    .. deprecated:: 2.1.0
        Passing json literal strings is deprecated.

orient : str, optional
    Indication of expected JSON string format.
    Compatible JSON strings can be produced by ``to_json()`` with a
    corresponding orient value.
    The set of possible orients is:

    - ``'split'`` : dict like
      ``{{index -> [index], columns -> [columns], data -> [values]}}``
    - ``'records'`` : list like
      ``[{{column -> value}}, ... , {{column -> value}}]``
    - ``'index'`` : dict like ``{{index -> {{column -> value}}}}``
    - ``'columns'`` : dict like ``{{column -> {{index -> value}}}}``
    - ``'values'`` : just the values array
    - ``'table'`` : dict like ``{{'schema': {{schema}}, 'data': {{data}}}}``

    The allowed and default values depend on the value
    of the `typ` parameter.

    * when ``typ == 'series'``,

      - allowed orients are ``{{'split','records','index'}}``
      - default is ``'index'``
      - The Series index must be unique for orient ``'index'``.

    * when ``typ == 'frame'``,

      - allowed orients are ``{{'split','records','index',
        'columns','values', 'table'}}``
      - default is ``'columns'``
      - The DataFrame index must be unique for orients ``'index'`` and
        ``'columns'``.
      - The DataFrame columns must be unique for orients ``'index'``,
        ``'columns'``, and ``'records'``.

typ : {{'frame', 'series'}}, default 'frame'
    The type of object to recover.

dtype : bool or dict, default None
    If True, infer dtypes; if a dict of column to dtype, then use those;
    if False, then don't infer dtypes at all, applies only to the data.

    For all ``orient`` values except ``'table'``, default is True.

convert_axes : bool, default None
    Try to convert the axes to the proper dtypes.

    For all ``orient`` values except ``'table'``, default is True.

convert_dates : bool or list of str, default True
    If True then default datelike columns may be converted (depending on
    keep_default_dates).
    If False, no dates will be converted.
    If a list of column names, then those columns will be converted and
    default datelike columns may also be converted (depending on
    keep_default_dates).

keep_default_dates : bool, default True
    If parsing dates (convert_dates is not False), then try to parse the
    default datelike columns.
    A column label is datelike if

    * it ends with ``'_at'``,

    * it ends with ``'_time'``,

    * it begins with ``'timestamp'``,

    * it is ``'modified'``, or

    * it is ``'date'``.

precise_float : bool, default False
    Set to enable usage of higher precision (strtod) function when
    decoding string to double values. Default (False) is to use fast but
    less precise builtin functionality.

date_unit : str, default None
    The timestamp unit to detect if converting dates. The default behaviour
    is to try and detect the correct precision, but if this is not desired
    then pass one of 's', 'ms', 'us' or 'ns' to force parsing only seconds,
    milliseconds, microseconds or nanoseconds respectively.

encoding : str, default is 'utf-8'
    The encoding to use to decode py3 bytes.

encoding_errors : str, optional, default "strict"
    How encoding errors are treated. `List of possible values
    <https://docs.python.org/3/library/codecs.html#error-handlers>`_ .

    .. versionadded:: 1.3.0

lines : bool, default False
    Read the file as a json object per line.

chunksize : int, optional
    Return JsonReader object for iteration.
    See the `line-delimited json docs
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#line-delimited-json>`_
    for more information on ``chunksize``.
    This can only be passed if `lines=True`.
    If this is None, the file will be read into memory all at once.
{decompression_options}

    .. versionchanged:: 1.4.0 Zstandard support.

nrows : int, optional
    The number of lines from the line-delimited jsonfile that has to be read.
    This can only be passed if `lines=True`.
    If this is None, all the rows will be returned.

{storage_options}

dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). Behaviour is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
      (default).
    * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
      DataFrame.

    .. versionadded:: 2.0

engine : {{"ujson", "pyarrow"}}, default "ujson"
    Parser engine to use. The ``"pyarrow"`` engine is only available when
    ``lines=True``.

    .. versionadded:: 2.0

Returns
-------
Series, DataFrame, or pandas.api.typing.JsonReader
    A JsonReader is returned when ``chunksize`` is not ``0`` or ``None``.
    Otherwise, the type returned depends on the value of ``typ``.

See Also
--------
DataFrame.to_json : Convert a DataFrame to a JSON string.
Series.to_json : Convert a Series to a JSON string.
json_normalize : Normalize semi-structured JSON data into a flat table.

Notes
-----
Specific to ``orient='table'``, if a :class:`DataFrame` with a literal
:class:`Index` name of `index` gets written with :func:`to_json`, the
subsequent read operation will incorrectly set the :class:`Index` name to
``None``. This is because `index` is also used by :func:`DataFrame.to_json`
to denote a missing :class:`Index` name, and the subsequent
:func:`read_json` operation cannot distinguish between the two. The same
limitation is encountered with a :class:`MultiIndex` and any names
beginning with ``'level_'``.

Examples
--------
>>> from io import StringIO
>>> df = pd.DataFrame([['a', 'b'], ['c', 'd']],
...                   index=['row 1', 'row 2'],
...                   columns=['col 1', 'col 2'])

Encoding/decoding a Dataframe using ``'split'`` formatted JSON:

>>> df.to_json(orient='split')
    '{{"columns":["col 1","col 2"],"index":["row 1","row 2"],"data":[["a","b"],["c","d"]]}}'
>>> pd.read_json(StringIO(_), orient='split')
      col 1 col 2
row 1     a     b
row 2     c     d

Encoding/decoding a Dataframe using ``'index'`` formatted JSON:

>>> df.to_json(orient='index')
'{{"row 1":{{"col 1":"a","col 2":"b"}},"row 2":{{"col 1":"c","col 2":"d"}}}}'

>>> pd.read_json(StringIO(_), orient='index')
      col 1 col 2
row 1     a     b
row 2     c     d

Encoding/decoding a Dataframe using ``'records'`` formatted JSON.
Note that index labels are not preserved with this encoding.

>>> df.to_json(orient='records')
'[{{"col 1":"a","col 2":"b"}},{{"col 1":"c","col 2":"d"}}]'
>>> pd.read_json(StringIO(_), orient='records')
  col 1 col 2
0     a     b
1     c     d

Encoding with Table Schema

>>> df.to_json(orient='table')
    '{{"schema":{{"fields":[{{"name":"index","type":"string"}},{{"name":"col 1","type":"string"}},{{"name":"col 2","type":"string"}}],"primaryKey":["index"],"pandas_version":"1.4.0"}},"data":[{{"index":"row 1","col 1":"a","col 2":"b"}},{{"index":"row 2","col 1":"c","col 2":"d"}}]}}'

The following example uses ``dtype_backend="numpy_nullable"``

>>> data = '''{{"index": {{"0": 0, "1": 1}},
...        "a": {{"0": 1, "1": null}},
...        "b": {{"0": 2.5, "1": 4.5}},
...        "c": {{"0": true, "1": false}},
...        "d": {{"0": "a", "1": "b"}},
...        "e": {{"0": 1577.2, "1": 1577.1}}}}'''
>>> pd.read_json(StringIO(data), dtype_backend="numpy_nullable")
   index     a    b      c  d       e
0      0     1  2.5   True  a  1577.2
1      1  <NA>  4.5  False  b  1577.1

---
## JsonReader
```python
from _json import JsonReader
```

JsonReader provides an interface for reading in a JSON file.

If initialized with ``lines=True`` and ``chunksize``, can be iterated over
``chunksize`` lines at a time. Otherwise, calling ``read`` reads in the
whole document.

---
## Parser
```python
from _json import Parser
```



---
## SeriesParser
```python
from _json import SeriesParser
```



---
## FrameParser
```python
from _json import FrameParser
```



---
## __init__
```python
from _json import __init__
```



---
## _format_axes
```python
from _json import _format_axes
```

Try to format axes if they are datelike.

---
## write
```python
from _json import write
```



---
## obj_to_write
```python
from _json import obj_to_write
```



---
## _preprocess_data
```python
from _json import _preprocess_data
```

At this point, the data either has a `read` attribute (e.g. a file
object or a StringIO) or is a string that is a JSON document.

If self.chunksize, we prepare the data for the `__next__` method.
Otherwise, we read it into memory for the `read` method.

---
## _get_data_from_filepath
```python
from _json import _get_data_from_filepath
```

The function read_json accepts three input types:
    1. filepath (string-like)
    2. file-like object (e.g. open file object, StringIO)
    3. JSON string

This method turns (1) into (2) to simplify the rest of the processing.
It returns input types (2) and (3) unchanged.

It raises FileNotFoundError if the input is a string ending in
one of .json, .json.gz, .json.bz2, etc. but no such file exists.

---
## _combine_lines
```python
from _json import _combine_lines
```

Combines a list of JSON objects into one JSON object.

---
## read
```python
from _json import read
```

Read the whole JSON input into a pandas object.

---
## _get_object_parser
```python
from _json import _get_object_parser
```

Parses a json document into a pandas object.

---
## close
```python
from _json import close
```

If we opened a stream earlier, in _get_data_from_filepath, we should
close it.

If an open stream or file was passed, we leave it open.

---
## __iter__
```python
from _json import __iter__
```



---
## __next__
```python
from _json import __next__
```



---
## __enter__
```python
from _json import __enter__
```



---
## __exit__
```python
from _json import __exit__
```



---
## check_keys_split
```python
from _json import check_keys_split
```

Checks that dict has only the appropriate keys for orient='split'.

---
## parse
```python
from _json import parse
```



---
## _parse
```python
from _json import _parse
```



---
## _convert_axes
```python
from _json import _convert_axes
```

Try to convert axes.

---
## _try_convert_types
```python
from _json import _try_convert_types
```



---
## _try_convert_data
```python
from _json import _try_convert_data
```

Try to parse a Series into a column by inferring dtype.

---
## _try_convert_to_date
```python
from _json import _try_convert_to_date
```

Try to parse a ndarray like into a date column.

Try to coerce object in epoch/iso formats and integer/float in epoch
formats. Return a boolean if parsing was successful.

---
## _process_converter
```python
from _json import _process_converter
```

Take a conversion function and possibly recreate the frame.

---
## _try_convert_dates
```python
from _json import _try_convert_dates
```



---
## is_ok
```python
from _json import is_ok
```

Return if this col is ok to try for a date parse.

---
## __name__
```python
from _normalize import __name__
```



---
## convert_to_line_delimits
```python
from _normalize import convert_to_line_delimits
```

Helper function that converts JSON lists to line delimited JSON.

---
## nested_to_record
```python
from _normalize import nested_to_record
```

A simplified json_normalize

Converts a nested dict into a flat dict ("record"), unlike json_normalize,
it does not attempt to extract a subset of the data.

Parameters
----------
ds : dict or list of dicts
prefix: the prefix, optional, default: ""
sep : str, default '.'
    Nested records will generate names separated by sep,
    e.g., for sep='.', { 'foo' : { 'bar' : 0 } } -> foo.bar
level: int, optional, default: 0
    The number of levels in the json string.

max_level: int, optional, default: None
    The max depth to normalize.

Returns
-------
d - dict or list of dicts, matching `ds`

Examples
--------
>>> nested_to_record(
...     dict(flat1=1, dict1=dict(c=1, d=2), nested=dict(e=dict(c=1, d=2), d=2))
... )
{'flat1': 1, 'dict1.c': 1, 'dict1.d': 2, 'nested.e.c': 1, 'nested.e.d': 2, 'nested.d': 2}

---
## _normalise_json
```python
from _normalize import _normalise_json
```

Main recursive function
Designed for the most basic use case of pd.json_normalize(data)
intended as a performance improvement, see #15621

Parameters
----------
data : Any
    Type dependent on types contained within nested Json
key_string : str
    New key (with separator(s) in) for data
normalized_dict : dict
    The new normalized/flattened Json dict
separator : str, default '.'
    Nested records will generate names separated by sep,
    e.g., for sep='.', { 'foo' : { 'bar' : 0 } } -> foo.bar

---
## _normalise_json_ordered
```python
from _normalize import _normalise_json_ordered
```

Order the top level keys and then recursively go to depth

Parameters
----------
data : dict or list of dicts
separator : str, default '.'
    Nested records will generate names separated by sep,
    e.g., for sep='.', { 'foo' : { 'bar' : 0 } } -> foo.bar

Returns
-------
dict or list of dicts, matching `normalised_json_object`

---
## _simple_json_normalize
```python
from _normalize import _simple_json_normalize
```

A optimized basic json_normalize

Converts a nested dict into a flat dict ("record"), unlike
json_normalize and nested_to_record it doesn't do anything clever.
But for the most basic use cases it enhances performance.
E.g. pd.json_normalize(data)

Parameters
----------
ds : dict or list of dicts
sep : str, default '.'
    Nested records will generate names separated by sep,
    e.g., for sep='.', { 'foo' : { 'bar' : 0 } } -> foo.bar

Returns
-------
frame : DataFrame
d - dict or list of dicts, matching `normalised_json_object`

Examples
--------
>>> _simple_json_normalize(
...     {
...         "flat1": 1,
...         "dict1": {"c": 1, "d": 2},
...         "nested": {"e": {"c": 1, "d": 2}, "d": 2},
...     }
... )
{'flat1': 1, 'dict1.c': 1, 'dict1.d': 2, 'nested.e.c': 1, 'nested.e.d': 2, 'nested.d': 2}

---
## json_normalize
```python
from _normalize import json_normalize
```

Normalize semi-structured JSON data into a flat table.

Parameters
----------
data : dict or list of dicts
    Unserialized JSON objects.
record_path : str or list of str, default None
    Path in each object to list of records. If not passed, data will be
    assumed to be an array of records.
meta : list of paths (str or list of str), default None
    Fields to use as metadata for each record in resulting table.
meta_prefix : str, default None
    If True, prefix records with dotted (?) path, e.g. foo.bar.field if
    meta is ['foo', 'bar'].
record_prefix : str, default None
    If True, prefix records with dotted (?) path, e.g. foo.bar.field if
    path to records is ['foo', 'bar'].
errors : {'raise', 'ignore'}, default 'raise'
    Configures error handling.

    * 'ignore' : will ignore KeyError if keys listed in meta are not
      always present.
    * 'raise' : will raise KeyError if keys listed in meta are not
      always present.
sep : str, default '.'
    Nested records will generate names separated by sep.
    e.g., for sep='.', {'foo': {'bar': 0}} -> foo.bar.
max_level : int, default None
    Max number of levels(depth of dict) to normalize.
    if None, normalizes all levels.

Returns
-------
frame : DataFrame
Normalize semi-structured JSON data into a flat table.

Examples
--------
>>> data = [
...     {"id": 1, "name": {"first": "Coleen", "last": "Volk"}},
...     {"name": {"given": "Mark", "family": "Regner"}},
...     {"id": 2, "name": "Faye Raker"},
... ]
>>> pd.json_normalize(data)
    id name.first name.last name.given name.family        name
0  1.0     Coleen      Volk        NaN         NaN         NaN
1  NaN        NaN       NaN       Mark      Regner         NaN
2  2.0        NaN       NaN        NaN         NaN  Faye Raker

>>> data = [
...     {
...         "id": 1,
...         "name": "Cole Volk",
...         "fitness": {"height": 130, "weight": 60},
...     },
...     {"name": "Mark Reg", "fitness": {"height": 130, "weight": 60}},
...     {
...         "id": 2,
...         "name": "Faye Raker",
...         "fitness": {"height": 130, "weight": 60},
...     },
... ]
>>> pd.json_normalize(data, max_level=0)
    id        name                        fitness
0  1.0   Cole Volk  {'height': 130, 'weight': 60}
1  NaN    Mark Reg  {'height': 130, 'weight': 60}
2  2.0  Faye Raker  {'height': 130, 'weight': 60}

Normalizes nested data up to level 1.

>>> data = [
...     {
...         "id": 1,
...         "name": "Cole Volk",
...         "fitness": {"height": 130, "weight": 60},
...     },
...     {"name": "Mark Reg", "fitness": {"height": 130, "weight": 60}},
...     {
...         "id": 2,
...         "name": "Faye Raker",
...         "fitness": {"height": 130, "weight": 60},
...     },
... ]
>>> pd.json_normalize(data, max_level=1)
    id        name  fitness.height  fitness.weight
0  1.0   Cole Volk             130              60
1  NaN    Mark Reg             130              60
2  2.0  Faye Raker             130              60

>>> data = [
...     {
...         "state": "Florida",
...         "shortname": "FL",
...         "info": {"governor": "Rick Scott"},
...         "counties": [
...             {"name": "Dade", "population": 12345},
...             {"name": "Broward", "population": 40000},
...             {"name": "Palm Beach", "population": 60000},
...         ],
...     },
...     {
...         "state": "Ohio",
...         "shortname": "OH",
...         "info": {"governor": "John Kasich"},
...         "counties": [
...             {"name": "Summit", "population": 1234},
...             {"name": "Cuyahoga", "population": 1337},
...         ],
...     },
... ]
>>> result = pd.json_normalize(
...     data, "counties", ["state", "shortname", ["info", "governor"]]
... )
>>> result
         name  population    state shortname info.governor
0        Dade       12345   Florida    FL    Rick Scott
1     Broward       40000   Florida    FL    Rick Scott
2  Palm Beach       60000   Florida    FL    Rick Scott
3      Summit        1234   Ohio       OH    John Kasich
4    Cuyahoga        1337   Ohio       OH    John Kasich

>>> data = {"A": [1, 2]}
>>> pd.json_normalize(data, "A", record_prefix="Prefix.")
    Prefix.0
0          1
1          2

Returns normalized data with columns prefixed with the given string.

---
## _pull_field
```python
from _normalize import _pull_field
```

Internal function to pull field

---
## _pull_records
```python
from _normalize import _pull_records
```

Internal function to pull field for records, and similar to
_pull_field, but require to return list. And will raise error
if has non iterable value.

---
## _recursive_extract
```python
from _normalize import _recursive_extract
```



---
## __name__
```python
from _table_schema import __name__
```

Table Schema builders

https://specs.frictionlessdata.io/table-schema/

---
## as_json_table_type
```python
from _table_schema import as_json_table_type
```

Convert a NumPy / pandas type to its corresponding json_table.

Parameters
----------
x : np.dtype or ExtensionDtype

Returns
-------
str
    the Table Schema data types

Notes
-----
This table shows the relationship between NumPy / pandas dtypes,
and Table Schema dtypes.

==============  =================
Pandas type     Table Schema type
==============  =================
int64           integer
float64         number
bool            boolean
datetime64[ns]  datetime
timedelta64[ns] duration
object          str
categorical     any
=============== =================

---
## set_default_names
```python
from _table_schema import set_default_names
```

Sets index names to 'index' for regular, or 'level_x' for Multi

---
## convert_pandas_type_to_json_field
```python
from _table_schema import convert_pandas_type_to_json_field
```



---
## convert_json_field_to_pandas_type
```python
from _table_schema import convert_json_field_to_pandas_type
```

Converts a JSON field descriptor into its corresponding NumPy / pandas type

Parameters
----------
field
    A JSON field descriptor

Returns
-------
dtype

Raises
------
ValueError
    If the type of the provided field is unknown or currently unsupported

Examples
--------
>>> convert_json_field_to_pandas_type({"name": "an_int", "type": "integer"})
'int64'

>>> convert_json_field_to_pandas_type(
...     {
...         "name": "a_categorical",
...         "type": "any",
...         "constraints": {"enum": ["a", "b", "c"]},
...         "ordered": True,
...     }
... )
CategoricalDtype(categories=['a', 'b', 'c'], ordered=True, categories_dtype=object)

>>> convert_json_field_to_pandas_type({"name": "a_datetime", "type": "datetime"})
'datetime64[ns]'

>>> convert_json_field_to_pandas_type(
...     {"name": "a_datetime_with_tz", "type": "datetime", "tz": "US/Central"}
... )
'datetime64[ns, US/Central]'

---
## build_table_schema
```python
from _table_schema import build_table_schema
```

Create a Table schema from ``data``.

Parameters
----------
data : Series, DataFrame
index : bool, default True
    Whether to include ``data.index`` in the schema.
primary_key : bool or None, default True
    Column names to designate as the primary key.
    The default `None` will set `'primaryKey'` to the index
    level or levels if the index is unique.
version : bool, default True
    Whether to include a field `pandas_version` with the version
    of pandas that last revised the table schema. This version
    can be different from the installed pandas version.

Returns
-------
dict

Notes
-----
See `Table Schema
<https://pandas.pydata.org/docs/user_guide/io.html#table-schema>`__ for
conversion types.
Timedeltas as converted to ISO8601 duration format with
9 decimal places after the seconds field for nanosecond precision.

Categoricals are converted to the `any` dtype, and use the `enum` field
constraint to list the allowed values. The `ordered` attribute is included
in an `ordered` field.

Examples
--------
>>> from pandas.io.json._table_schema import build_table_schema
>>> df = pd.DataFrame(
...     {'A': [1, 2, 3],
...      'B': ['a', 'b', 'c'],
...      'C': pd.date_range('2016-01-01', freq='d', periods=3),
...     }, index=pd.Index(range(3), name='idx'))
>>> build_table_schema(df)
{'fields': [{'name': 'idx', 'type': 'integer'}, {'name': 'A', 'type': 'integer'}, {'name': 'B', 'type': 'string'}, {'name': 'C', 'type': 'datetime'}], 'primaryKey': ['idx'], 'pandas_version': '1.4.0'}

---
## parse_table_schema
```python
from _table_schema import parse_table_schema
```

Builds a DataFrame from a given schema

Parameters
----------
json :
    A JSON table schema
precise_float : bool
    Flag controlling precision when decoding string to double values, as
    dictated by ``read_json``

Returns
-------
df : DataFrame

Raises
------
NotImplementedError
    If the JSON table schema contains either timezone or timedelta data

Notes
-----
    Because :func:`DataFrame.to_json` uses the string 'index' to denote a
    name-less :class:`Index`, this function sets the name of the returned
    :class:`DataFrame` to ``None`` when said string is encountered with a
    normal :class:`Index`. For a :class:`MultiIndex`, the same limitation
    applies to any strings beginning with 'level_'. Therefore, an
    :class:`Index` name of 'index'  and :class:`MultiIndex` names starting
    with 'level_' are not supported.

See Also
--------
build_table_schema : Inverse function.
pandas.read_json

---
## __name__
```python
from sas7bdat import __name__
```

Read SAS7BDAT files

Based on code written by Jared Hobbs:
  https://bitbucket.org/jaredhobbs/sas7bdat

See also:
  https://github.com/BioStatMatt/sas7bdat

Partial documentation of the file format:
  https://cran.r-project.org/package=sas7bdat/vignettes/sas7bdat.pdf

Reference for binary data compression:
  http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/1992/9210/ross/ross.htm

---
## _parse_datetime
```python
from sas7bdat import _parse_datetime
```



---
## _convert_datetimes
```python
from sas7bdat import _convert_datetimes
```

Convert to Timestamp if possible, otherwise to datetime.datetime.
SAS float64 lacks precision for more than ms resolution so the fit
to datetime.datetime is ok.

Parameters
----------
sas_datetimes : {Series, Sequence[float]}
   Dates or datetimes in SAS
unit : {'d', 's'}
   "d" if the floats represent dates, "s" for datetimes

Returns
-------
Series
   Series of datetime64 dtype or datetime.datetime.

---
## _Column
```python
from sas7bdat import _Column
```



---
## SAS7BDATReader
```python
from sas7bdat import SAS7BDATReader
```

Read SAS files in SAS7BDAT format.

Parameters
----------
path_or_buf : path name or buffer
    Name of SAS file or file-like object pointing to SAS file
    contents.
index : column identifier, defaults to None
    Column to use as index.
convert_dates : bool, defaults to True
    Attempt to convert dates to Pandas datetime values.  Note that
    some rarely used SAS date formats may be unsupported.
blank_missing : bool, defaults to True
    Convert empty strings to missing values (SAS uses blanks to
    indicate missing character variables).
chunksize : int, defaults to None
    Return SAS7BDATReader object for iterations, returns chunks
    with given number of lines.
encoding : str, 'infer', defaults to None
    String encoding acc. to Python standard encodings,
    encoding='infer' tries to detect the encoding from the file header,
    encoding=None will leave the data in binary format.
convert_text : bool, defaults to True
    If False, text variables are left as raw bytes.
convert_header_text : bool, defaults to True
    If False, header text, including column names, are left as raw
    bytes.

---
## __init__
```python
from sas7bdat import __init__
```



---
## column_data_lengths
```python
from sas7bdat import column_data_lengths
```

Return a numpy int64 array of the column data lengths

---
## column_data_offsets
```python
from sas7bdat import column_data_offsets
```

Return a numpy int64 array of the column offsets

---
## column_types
```python
from sas7bdat import column_types
```

Returns a numpy character array of the column types:
s (string) or d (double)

---
## close
```python
from sas7bdat import close
```



---
## _get_properties
```python
from sas7bdat import _get_properties
```



---
## __next__
```python
from sas7bdat import __next__
```



---
## _read_float
```python
from sas7bdat import _read_float
```



---
## _read_uint
```python
from sas7bdat import _read_uint
```



---
## _read_bytes
```python
from sas7bdat import _read_bytes
```



---
## _read_and_convert_header_text
```python
from sas7bdat import _read_and_convert_header_text
```



---
## _parse_metadata
```python
from sas7bdat import _parse_metadata
```



---
## _process_page_meta
```python
from sas7bdat import _process_page_meta
```



---
## _read_page_header
```python
from sas7bdat import _read_page_header
```



---
## _process_page_metadata
```python
from sas7bdat import _process_page_metadata
```



---
## _process_rowsize_subheader
```python
from sas7bdat import _process_rowsize_subheader
```



---
## _process_columnsize_subheader
```python
from sas7bdat import _process_columnsize_subheader
```



---
## _process_subheader_counts
```python
from sas7bdat import _process_subheader_counts
```



---
## _process_columntext_subheader
```python
from sas7bdat import _process_columntext_subheader
```



---
## _process_columnname_subheader
```python
from sas7bdat import _process_columnname_subheader
```



---
## _process_columnattributes_subheader
```python
from sas7bdat import _process_columnattributes_subheader
```



---
## _process_columnlist_subheader
```python
from sas7bdat import _process_columnlist_subheader
```



---
## _process_format_subheader
```python
from sas7bdat import _process_format_subheader
```



---
## read
```python
from sas7bdat import read
```



---
## _read_next_page
```python
from sas7bdat import _read_next_page
```



---
## _chunk_to_dataframe
```python
from sas7bdat import _chunk_to_dataframe
```



---
## _decode_string
```python
from sas7bdat import _decode_string
```



---
## _convert_header_text
```python
from sas7bdat import _convert_header_text
```



---
## __name__
```python
from sas_constants import __name__
```



---
## SASIndex
```python
from sas_constants import SASIndex
```



---
## __name__
```python
from sasreader import __name__
```

Read SAS sas7bdat or xport files.

---
## ReaderBase
```python
from sasreader import ReaderBase
```

Protocol for XportReader and SAS7BDATReader classes.

---
## read_sas
```python
from sasreader import read_sas
```

Read SAS files stored as either XPORT or SAS7BDAT format files.

Parameters
----------
filepath_or_buffer : str, path object, or file-like object
    String, path object (implementing ``os.PathLike[str]``), or file-like
    object implementing a binary ``read()`` function. The string could be a URL.
    Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
    expected. A local file could be:
    ``file://localhost/path/to/table.sas7bdat``.
format : str {{'xport', 'sas7bdat'}} or None
    If None, file format is inferred from file extension. If 'xport' or
    'sas7bdat', uses the corresponding format.
index : identifier of index column, defaults to None
    Identifier of column that should be used as index of the DataFrame.
encoding : str, default is None
    Encoding for text data.  If None, text data are stored as raw bytes.
chunksize : int
    Read file `chunksize` lines at a time, returns iterator.
iterator : bool, defaults to False
    If True, returns an iterator for reading the file incrementally.
{decompression_options}

Returns
-------
DataFrame if iterator=False and chunksize=None, else SAS7BDATReader
or XportReader

Examples
--------
>>> df = pd.read_sas("sas_data.sas7bdat")  # doctest: +SKIP

---
## read
```python
from sasreader import read
```



---
## close
```python
from sasreader import close
```



---
## __enter__
```python
from sasreader import __enter__
```



---
## __exit__
```python
from sasreader import __exit__
```



---
## __name__
```python
from sas_xport import __name__
```

Read a SAS XPort format file into a Pandas DataFrame.

Based on code from Jack Cushman (github.com/jcushman/xport).

The file format is defined here:

https://support.sas.com/content/dam/SAS/support/en/technical-papers/record-layout-of-a-sas-version-5-or-6-data-set-in-sas-transport-xport-format.pdf

---
## _parse_date
```python
from sas_xport import _parse_date
```

Given a date in xport format, return Python date.

---
## _split_line
```python
from sas_xport import _split_line
```

Parameters
----------
s: str
    Fixed-length string to split
parts: list of (name, length) pairs
    Used to break up string, name '_' will be filtered from output.

Returns
-------
Dict of name:contents of string at given location.

---
## _handle_truncated_float_vec
```python
from sas_xport import _handle_truncated_float_vec
```



---
## _parse_float_vec
```python
from sas_xport import _parse_float_vec
```

Parse a vector of float values representing IBM 8 byte floats into
native 8 byte floats.

---
## XportReader
```python
from sas_xport import XportReader
```



---
## __init__
```python
from sas_xport import __init__
```



---
## close
```python
from sas_xport import close
```



---
## _get_row
```python
from sas_xport import _get_row
```



---
## _read_header
```python
from sas_xport import _read_header
```



---
## __next__
```python
from sas_xport import __next__
```



---
## _record_count
```python
from sas_xport import _record_count
```

Get number of records in file.

This is maybe suboptimal because we have to seek to the end of
the file.

Side effect: returns file position to record_start.

---
## get_chunk
```python
from sas_xport import get_chunk
```

Reads lines from Xport file and returns as dataframe

Parameters
----------
size : int, defaults to None
    Number of lines to read.  If None, reads whole file.

Returns
-------
DataFrame

---
## _missing_double
```python
from sas_xport import _missing_double
```



---
## read
```python
from sas_xport import read
```



---
## PyperclipTimeoutException
```python
from __init__ import PyperclipTimeoutException
```



---
## _stringifyText
```python
from __init__ import _stringifyText
```



---
## init_osx_pbcopy_clipboard
```python
from __init__ import init_osx_pbcopy_clipboard
```



---
## init_osx_pyobjc_clipboard
```python
from __init__ import init_osx_pyobjc_clipboard
```



---
## init_qt_clipboard
```python
from __init__ import init_qt_clipboard
```



---
## init_xclip_clipboard
```python
from __init__ import init_xclip_clipboard
```



---
## init_xsel_clipboard
```python
from __init__ import init_xsel_clipboard
```



---
## init_wl_clipboard
```python
from __init__ import init_wl_clipboard
```



---
## init_klipper_clipboard
```python
from __init__ import init_klipper_clipboard
```



---
## init_dev_clipboard_clipboard
```python
from __init__ import init_dev_clipboard_clipboard
```



---
## init_no_clipboard
```python
from __init__ import init_no_clipboard
```



---
## CheckedCall
```python
from __init__ import CheckedCall
```



---
## init_windows_clipboard
```python
from __init__ import init_windows_clipboard
```



---
## init_wsl_clipboard
```python
from __init__ import init_wsl_clipboard
```



---
## determine_clipboard
```python
from __init__ import determine_clipboard
```

Determine the OS/platform and set the copy() and paste() functions
accordingly.

---
## set_clipboard
```python
from __init__ import set_clipboard
```

Explicitly sets the clipboard mechanism. The "clipboard mechanism" is how
the copy() and paste() functions interact with the operating system to
implement the copy/paste feature. The clipboard parameter must be one of:
    - pbcopy
    - pyobjc (default on macOS)
    - qt
    - xclip
    - xsel
    - klipper
    - windows (default on Windows)
    - no (this is what is set when no clipboard mechanism can be found)

---
## lazy_load_stub_copy
```python
from __init__ import lazy_load_stub_copy
```

A stub function for copy(), which will load the real copy() function when
called so that the real copy() function is used for later calls.

This allows users to import pyperclip without having determine_clipboard()
automatically run, which will automatically select a clipboard mechanism.
This could be a problem if it selects, say, the memory-heavy PyQt4 module
but the user was just going to immediately call set_clipboard() to use a
different clipboard mechanism.

The lazy loading this stub function implements gives the user a chance to
call set_clipboard() to pick another clipboard mechanism. Or, if the user
simply calls copy() or paste() without calling set_clipboard() first,
will fall back on whatever clipboard mechanism that determine_clipboard()
automatically chooses.

---
## lazy_load_stub_paste
```python
from __init__ import lazy_load_stub_paste
```

A stub function for paste(), which will load the real paste() function when
called so that the real paste() function is used for later calls.

This allows users to import pyperclip without having determine_clipboard()
automatically run, which will automatically select a clipboard mechanism.
This could be a problem if it selects, say, the memory-heavy PyQt4 module
but the user was just going to immediately call set_clipboard() to use a
different clipboard mechanism.

The lazy loading this stub function implements gives the user a chance to
call set_clipboard() to pick another clipboard mechanism. Or, if the user
simply calls copy() or paste() without calling set_clipboard() first,
will fall back on whatever clipboard mechanism that determine_clipboard()
automatically chooses.

---
## waitForPaste
```python
from __init__ import waitForPaste
```

This function call blocks until a non-empty text string exists on the
clipboard. It returns this text.

This function raises PyperclipTimeoutException if timeout was set to
a number of seconds that has elapsed without non-empty text being put on
the clipboard.

---
## waitForNewPaste
```python
from __init__ import waitForNewPaste
```

This function call blocks until a new text string exists on the
clipboard that is different from the text that was there when the function
was first called. It returns this text.

This function raises PyperclipTimeoutException if timeout was set to
a number of seconds that has elapsed without non-empty text being put on
the clipboard.

---
## copy_osx_pbcopy
```python
from __init__ import copy_osx_pbcopy
```



---
## paste_osx_pbcopy
```python
from __init__ import paste_osx_pbcopy
```



---
## copy_osx_pyobjc
```python
from __init__ import copy_osx_pyobjc
```

Copy string argument to clipboard

---
## paste_osx_pyobjc
```python
from __init__ import paste_osx_pyobjc
```

Returns contents of clipboard

---
## copy_qt
```python
from __init__ import copy_qt
```



---
## paste_qt
```python
from __init__ import paste_qt
```



---
## copy_xclip
```python
from __init__ import copy_xclip
```



---
## paste_xclip
```python
from __init__ import paste_xclip
```



---
## copy_xsel
```python
from __init__ import copy_xsel
```



---
## paste_xsel
```python
from __init__ import paste_xsel
```



---
## copy_wl
```python
from __init__ import copy_wl
```



---
## paste_wl
```python
from __init__ import paste_wl
```



---
## copy_klipper
```python
from __init__ import copy_klipper
```



---
## paste_klipper
```python
from __init__ import paste_klipper
```



---
## copy_dev_clipboard
```python
from __init__ import copy_dev_clipboard
```



---
## paste_dev_clipboard
```python
from __init__ import paste_dev_clipboard
```



---
## ClipboardUnavailable
```python
from __init__ import ClipboardUnavailable
```



---
## window
```python
from __init__ import window
```

Context that provides a valid Windows hwnd.

---
## clipboard
```python
from __init__ import clipboard
```

Context manager that opens the clipboard and prevents
other applications from modifying the clipboard content.

---
## copy_windows
```python
from __init__ import copy_windows
```



---
## paste_windows
```python
from __init__ import paste_windows
```



---
## copy_wsl
```python
from __init__ import copy_wsl
```



---
## paste_wsl
```python
from __init__ import paste_wsl
```



---
## __name__
```python
from test_logical_ops import __name__
```



---
## TestSeriesLogicalOps
```python
from test_logical_ops import TestSeriesLogicalOps
```



---
## test_bool_operators_with_nas
```python
from test_logical_ops import test_bool_operators_with_nas
```



---
## test_logical_operators_bool_dtype_with_empty
```python
from test_logical_ops import test_logical_operators_bool_dtype_with_empty
```



---
## test_logical_operators_int_dtype_with_int_dtype
```python
from test_logical_ops import test_logical_operators_int_dtype_with_int_dtype
```



---
## test_logical_operators_int_dtype_with_int_scalar
```python
from test_logical_ops import test_logical_operators_int_dtype_with_int_scalar
```



---
## test_logical_operators_int_dtype_with_float
```python
from test_logical_ops import test_logical_operators_int_dtype_with_float
```



---
## test_logical_operators_int_dtype_with_str
```python
from test_logical_ops import test_logical_operators_int_dtype_with_str
```



---
## test_logical_operators_int_dtype_with_bool
```python
from test_logical_ops import test_logical_operators_int_dtype_with_bool
```



---
## test_logical_operators_int_dtype_with_object
```python
from test_logical_ops import test_logical_operators_int_dtype_with_object
```



---
## test_logical_operators_bool_dtype_with_int
```python
from test_logical_ops import test_logical_operators_bool_dtype_with_int
```



---
## test_logical_ops_bool_dtype_with_ndarray
```python
from test_logical_ops import test_logical_ops_bool_dtype_with_ndarray
```



---
## test_logical_operators_int_dtype_with_bool_dtype_and_reindex
```python
from test_logical_ops import test_logical_operators_int_dtype_with_bool_dtype_and_reindex
```



---
## test_scalar_na_logical_ops_corners
```python
from test_logical_ops import test_scalar_na_logical_ops_corners
```



---
## test_scalar_na_logical_ops_corners_aligns
```python
from test_logical_ops import test_scalar_na_logical_ops_corners_aligns
```



---
## test_logical_ops_with_index
```python
from test_logical_ops import test_logical_ops_with_index
```



---
## test_reversed_xor_with_index_returns_series
```python
from test_logical_ops import test_reversed_xor_with_index_returns_series
```



---
## test_reversed_logical_op_with_index_returns_series
```python
from test_logical_ops import test_reversed_logical_op_with_index_returns_series
```



---
## test_reverse_ops_with_index
```python
from test_logical_ops import test_reverse_ops_with_index
```



---
## test_logical_ops_label_based
```python
from test_logical_ops import test_logical_ops_label_based
```



---
## test_logical_ops_df_compat
```python
from test_logical_ops import test_logical_ops_df_compat
```



---
## test_int_dtype_different_index_not_bool
```python
from test_logical_ops import test_int_dtype_different_index_not_bool
```



---
## test_pyarrow_numpy_string_invalid
```python
from test_logical_ops import test_pyarrow_numpy_string_invalid
```



---
## __name__
```python
from test_reductions import __name__
```



---
## test_reductions_series_strings
```python
from test_reductions import test_reductions_series_strings
```



---
## test_mode_extension_dtype
```python
from test_reductions import test_mode_extension_dtype
```



---
## test_mode_nullable_dtype
```python
from test_reductions import test_mode_nullable_dtype
```



---
## test_mode_infer_string
```python
from test_reductions import test_mode_infer_string
```



---
## test_reductions_td64_with_nat
```python
from test_reductions import test_reductions_td64_with_nat
```



---
## test_td64_sum_empty
```python
from test_reductions import test_td64_sum_empty
```



---
## test_td64_summation_overflow
```python
from test_reductions import test_td64_summation_overflow
```



---
## test_prod_numpy16_bug
```python
from test_reductions import test_prod_numpy16_bug
```



---
## test_validate_any_all_out_keepdims_raises
```python
from test_reductions import test_validate_any_all_out_keepdims_raises
```



---
## test_validate_sum_initial
```python
from test_reductions import test_validate_sum_initial
```



---
## test_validate_median_initial
```python
from test_reductions import test_validate_median_initial
```



---
## test_validate_stat_keepdims
```python
from test_reductions import test_validate_stat_keepdims
```



---
## test_mean_with_convertible_string_raises
```python
from test_reductions import test_mean_with_convertible_string_raises
```



---
## test_mean_dont_convert_j_to_complex
```python
from test_reductions import test_mean_dont_convert_j_to_complex
```



---
## test_median_with_convertible_string_raises
```python
from test_reductions import test_median_with_convertible_string_raises
```



---
## __name__
```python
from test_constructors import __name__
```



---
## TestSeriesConstructors
```python
from test_constructors import TestSeriesConstructors
```



---
## TestSeriesConstructorIndexCoercion
```python
from test_constructors import TestSeriesConstructorIndexCoercion
```



---
## TestSeriesConstructorInternals
```python
from test_constructors import TestSeriesConstructorInternals
```



---
## test_constructor
```python
from test_constructors import test_constructor
```



---
## test_numpy_array
```python
from test_constructors import test_numpy_array
```



---
## test_index_ordered_dict_keys
```python
from test_constructors import test_index_ordered_dict_keys
```



---
## test_series_with_complex_nan
```python
from test_constructors import test_series_with_complex_nan
```



---
## test_from_ints_with_non_nano_dt64_dtype
```python
from test_constructors import test_from_ints_with_non_nano_dt64_dtype
```



---
## test_from_na_value_and_interval_of_datetime_dtype
```python
from test_constructors import test_from_na_value_and_interval_of_datetime_dtype
```



---
## test_infer_with_date_and_datetime
```python
from test_constructors import test_infer_with_date_and_datetime
```



---
## test_unparsable_strings_with_dt64_dtype
```python
from test_constructors import test_unparsable_strings_with_dt64_dtype
```



---
## test_empty_constructor
```python
from test_constructors import test_empty_constructor
```



---
## test_invalid_dtype
```python
from test_constructors import test_invalid_dtype
```



---
## test_invalid_compound_dtype
```python
from test_constructors import test_invalid_compound_dtype
```



---
## test_scalar_conversion
```python
from test_constructors import test_scalar_conversion
```



---
## test_scalar_extension_dtype
```python
from test_constructors import test_scalar_extension_dtype
```



---
## test_constructor_index_ndim_gt_1_raises
```python
from test_constructors import test_constructor_index_ndim_gt_1_raises
```



---
## test_constructor_empty
```python
from test_constructors import test_constructor_empty
```



---
## test_constructor_nan
```python
from test_constructors import test_constructor_nan
```



---
## test_constructor_dtype_only
```python
from test_constructors import test_constructor_dtype_only
```



---
## test_constructor_no_data_index_order
```python
from test_constructors import test_constructor_no_data_index_order
```



---
## test_constructor_no_data_string_type
```python
from test_constructors import test_constructor_no_data_string_type
```



---
## test_constructor_string_element_string_type
```python
from test_constructors import test_constructor_string_element_string_type
```



---
## test_constructor_dtype_str_na_values
```python
from test_constructors import test_constructor_dtype_str_na_values
```



---
## test_constructor_series
```python
from test_constructors import test_constructor_series
```



---
## test_constructor_iterable
```python
from test_constructors import test_constructor_iterable
```



---
## test_constructor_sequence
```python
from test_constructors import test_constructor_sequence
```



---
## test_constructor_single_str
```python
from test_constructors import test_constructor_single_str
```



---
## test_constructor_list_like
```python
from test_constructors import test_constructor_list_like
```



---
## test_constructor_boolean_index
```python
from test_constructors import test_constructor_boolean_index
```



---
## test_constructor_index_dtype
```python
from test_constructors import test_constructor_index_dtype
```



---
## test_constructor_list_str
```python
from test_constructors import test_constructor_list_str
```



---
## test_constructor_list_str_na
```python
from test_constructors import test_constructor_list_str_na
```



---
## test_constructor_generator
```python
from test_constructors import test_constructor_generator
```



---
## test_constructor_map
```python
from test_constructors import test_constructor_map
```



---
## test_constructor_categorical
```python
from test_constructors import test_constructor_categorical
```



---
## test_construct_from_categorical_with_dtype
```python
from test_constructors import test_construct_from_categorical_with_dtype
```



---
## test_construct_intlist_values_category_dtype
```python
from test_constructors import test_construct_intlist_values_category_dtype
```



---
## test_constructor_categorical_with_coercion
```python
from test_constructors import test_constructor_categorical_with_coercion
```



---
## test_constructor_categorical_with_coercion2
```python
from test_constructors import test_constructor_categorical_with_coercion2
```



---
## test_constructor_series_to_categorical
```python
from test_constructors import test_constructor_series_to_categorical
```



---
## test_constructor_categorical_dtype
```python
from test_constructors import test_constructor_categorical_dtype
```



---
## test_constructor_categorical_string
```python
from test_constructors import test_constructor_categorical_string
```



---
## test_categorical_sideeffects_free
```python
from test_constructors import test_categorical_sideeffects_free
```



---
## test_unordered_compare_equal
```python
from test_constructors import test_unordered_compare_equal
```



---
## test_constructor_maskedarray
```python
from test_constructors import test_constructor_maskedarray
```



---
## test_constructor_maskedarray_hardened
```python
from test_constructors import test_constructor_maskedarray_hardened
```



---
## test_series_ctor_plus_datetimeindex
```python
from test_constructors import test_series_ctor_plus_datetimeindex
```



---
## test_constructor_default_index
```python
from test_constructors import test_constructor_default_index
```



---
## test_constructor_index_mismatch
```python
from test_constructors import test_constructor_index_mismatch
```



---
## test_constructor_numpy_scalar
```python
from test_constructors import test_constructor_numpy_scalar
```



---
## test_constructor_broadcast_list
```python
from test_constructors import test_constructor_broadcast_list
```



---
## test_constructor_corner
```python
from test_constructors import test_constructor_corner
```



---
## test_constructor_sanitize
```python
from test_constructors import test_constructor_sanitize
```



---
## test_constructor_copy
```python
from test_constructors import test_constructor_copy
```



---
## test_constructor_limit_copies
```python
from test_constructors import test_constructor_limit_copies
```



---
## test_constructor_shallow_copy
```python
from test_constructors import test_constructor_shallow_copy
```



---
## test_constructor_pass_none
```python
from test_constructors import test_constructor_pass_none
```



---
## test_constructor_pass_nan_nat
```python
from test_constructors import test_constructor_pass_nan_nat
```



---
## test_constructor_cast
```python
from test_constructors import test_constructor_cast
```



---
## test_constructor_signed_int_overflow_raises
```python
from test_constructors import test_constructor_signed_int_overflow_raises
```



---
## test_constructor_numpy_uints
```python
from test_constructors import test_constructor_numpy_uints
```



---
## test_constructor_unsigned_dtype_overflow
```python
from test_constructors import test_constructor_unsigned_dtype_overflow
```



---
## test_constructor_floating_data_int_dtype
```python
from test_constructors import test_constructor_floating_data_int_dtype
```



---
## test_constructor_coerce_float_fail
```python
from test_constructors import test_constructor_coerce_float_fail
```



---
## test_constructor_coerce_float_valid
```python
from test_constructors import test_constructor_coerce_float_valid
```



---
## test_constructor_invalid_coerce_ints_with_float_nan
```python
from test_constructors import test_constructor_invalid_coerce_ints_with_float_nan
```



---
## test_constructor_dtype_no_cast
```python
from test_constructors import test_constructor_dtype_no_cast
```



---
## test_constructor_datelike_coercion
```python
from test_constructors import test_constructor_datelike_coercion
```



---
## test_constructor_datelike_coercion2
```python
from test_constructors import test_constructor_datelike_coercion2
```



---
## test_constructor_mixed_int_and_timestamp
```python
from test_constructors import test_constructor_mixed_int_and_timestamp
```



---
## test_constructor_datetimes_with_nulls
```python
from test_constructors import test_constructor_datetimes_with_nulls
```



---
## test_constructor_dtype_datetime64
```python
from test_constructors import test_constructor_dtype_datetime64
```



---
## test_constructor_dtype_datetime64_10
```python
from test_constructors import test_constructor_dtype_datetime64_10
```



---
## test_constructor_dtype_datetime64_11
```python
from test_constructors import test_constructor_dtype_datetime64_11
```



---
## test_constructor_dtype_datetime64_9
```python
from test_constructors import test_constructor_dtype_datetime64_9
```



---
## test_constructor_dtype_datetime64_8
```python
from test_constructors import test_constructor_dtype_datetime64_8
```



---
## test_constructor_dtype_datetime64_7
```python
from test_constructors import test_constructor_dtype_datetime64_7
```



---
## test_constructor_dtype_datetime64_6
```python
from test_constructors import test_constructor_dtype_datetime64_6
```



---
## test_constructor_dtype_datetime64_5
```python
from test_constructors import test_constructor_dtype_datetime64_5
```



---
## test_constructor_dtype_datetime64_4
```python
from test_constructors import test_constructor_dtype_datetime64_4
```



---
## test_constructor_dtype_datetime64_3
```python
from test_constructors import test_constructor_dtype_datetime64_3
```



---
## test_constructor_dtype_datetime64_2
```python
from test_constructors import test_constructor_dtype_datetime64_2
```



---
## test_constructor_with_datetime_tz
```python
from test_constructors import test_constructor_with_datetime_tz
```



---
## test_constructor_with_datetime_tz5
```python
from test_constructors import test_constructor_with_datetime_tz5
```



---
## test_constructor_with_datetime_tz4
```python
from test_constructors import test_constructor_with_datetime_tz4
```



---
## test_constructor_with_datetime_tz3
```python
from test_constructors import test_constructor_with_datetime_tz3
```



---
## test_constructor_with_datetime_tz2
```python
from test_constructors import test_constructor_with_datetime_tz2
```



---
## test_constructor_no_partial_datetime_casting
```python
from test_constructors import test_constructor_no_partial_datetime_casting
```



---
## test_construction_to_datetimelike_unit
```python
from test_constructors import test_construction_to_datetimelike_unit
```



---
## test_constructor_with_naive_string_and_datetimetz_dtype
```python
from test_constructors import test_constructor_with_naive_string_and_datetimetz_dtype
```



---
## test_constructor_datetime64_bigendian
```python
from test_constructors import test_constructor_datetime64_bigendian
```



---
## test_construction_interval
```python
from test_constructors import test_construction_interval
```



---
## test_constructor_infer_interval
```python
from test_constructors import test_constructor_infer_interval
```



---
## test_constructor_interval_mixed_closed
```python
from test_constructors import test_constructor_interval_mixed_closed
```



---
## test_construction_consistency
```python
from test_constructors import test_construction_consistency
```



---
## test_constructor_infer_period
```python
from test_constructors import test_constructor_infer_period
```



---
## test_construct_from_ints_including_iNaT_scalar_period_dtype
```python
from test_constructors import test_construct_from_ints_including_iNaT_scalar_period_dtype
```



---
## test_constructor_period_incompatible_frequency
```python
from test_constructors import test_constructor_period_incompatible_frequency
```



---
## test_constructor_periodindex
```python
from test_constructors import test_constructor_periodindex
```



---
## test_constructor_dict
```python
from test_constructors import test_constructor_dict
```



---
## test_constructor_dict_list_value_explicit_dtype
```python
from test_constructors import test_constructor_dict_list_value_explicit_dtype
```



---
## test_constructor_dict_order
```python
from test_constructors import test_constructor_dict_order
```



---
## test_constructor_dict_extension
```python
from test_constructors import test_constructor_dict_extension
```



---
## test_constructor_dict_nan_key
```python
from test_constructors import test_constructor_dict_nan_key
```



---
## test_constructor_dict_datetime64_index
```python
from test_constructors import test_constructor_dict_datetime64_index
```



---
## test_constructor_dict_tuple_indexer
```python
from test_constructors import test_constructor_dict_tuple_indexer
```



---
## test_constructor_mapping
```python
from test_constructors import test_constructor_mapping
```



---
## test_constructor_list_of_tuples
```python
from test_constructors import test_constructor_list_of_tuples
```



---
## test_constructor_tuple_of_tuples
```python
from test_constructors import test_constructor_tuple_of_tuples
```



---
## test_constructor_dict_of_tuples
```python
from test_constructors import test_constructor_dict_of_tuples
```



---
## test_fromDict
```python
from test_constructors import test_fromDict
```



---
## test_fromValue
```python
from test_constructors import test_fromValue
```



---
## test_constructor_dtype_timedelta64
```python
from test_constructors import test_constructor_dtype_timedelta64
```



---
## test_constructor_mixed_tz
```python
from test_constructors import test_constructor_mixed_tz
```



---
## test_NaT_scalar
```python
from test_constructors import test_NaT_scalar
```



---
## test_NaT_cast
```python
from test_constructors import test_NaT_cast
```



---
## test_constructor_name_hashable
```python
from test_constructors import test_constructor_name_hashable
```



---
## test_constructor_name_unhashable
```python
from test_constructors import test_constructor_name_unhashable
```



---
## test_auto_conversion
```python
from test_constructors import test_auto_conversion
```



---
## test_convert_non_ns
```python
from test_constructors import test_convert_non_ns
```



---
## test_constructor_cant_cast_datetimelike
```python
from test_constructors import test_constructor_cant_cast_datetimelike
```



---
## test_constructor_cast_object
```python
from test_constructors import test_constructor_cast_object
```



---
## test_constructor_generic_timestamp_no_frequency
```python
from test_constructors import test_constructor_generic_timestamp_no_frequency
```



---
## test_constructor_generic_timestamp_bad_frequency
```python
from test_constructors import test_constructor_generic_timestamp_bad_frequency
```



---
## test_constructor_range_dtype
```python
from test_constructors import test_constructor_range_dtype
```



---
## test_constructor_range_overflows
```python
from test_constructors import test_constructor_range_overflows
```



---
## test_constructor_tz_mixed_data
```python
from test_constructors import test_constructor_tz_mixed_data
```



---
## test_constructor_data_aware_dtype_naive
```python
from test_constructors import test_constructor_data_aware_dtype_naive
```



---
## test_constructor_datetime64
```python
from test_constructors import test_constructor_datetime64
```



---
## test_constructor_datetimelike_scalar_to_string_dtype
```python
from test_constructors import test_constructor_datetimelike_scalar_to_string_dtype
```



---
## test_constructor_sparse_datetime64
```python
from test_constructors import test_constructor_sparse_datetime64
```



---
## test_construction_from_ordered_collection
```python
from test_constructors import test_construction_from_ordered_collection
```



---
## test_construction_from_large_int_scalar_no_overflow
```python
from test_constructors import test_construction_from_large_int_scalar_no_overflow
```



---
## test_constructor_list_of_periods_infers_period_dtype
```python
from test_constructors import test_constructor_list_of_periods_infers_period_dtype
```



---
## test_constructor_subclass_dict
```python
from test_constructors import test_constructor_subclass_dict
```



---
## test_constructor_ordereddict
```python
from test_constructors import test_constructor_ordereddict
```



---
## test_constructor_dict_multiindex
```python
from test_constructors import test_constructor_dict_multiindex
```



---
## test_constructor_dict_multiindex_reindex_flat
```python
from test_constructors import test_constructor_dict_multiindex_reindex_flat
```



---
## test_constructor_dict_timedelta_index
```python
from test_constructors import test_constructor_dict_timedelta_index
```



---
## test_constructor_infer_index_tz
```python
from test_constructors import test_constructor_infer_index_tz
```



---
## test_constructor_with_pandas_dtype
```python
from test_constructors import test_constructor_with_pandas_dtype
```



---
## test_constructor_int_dtype_missing_values
```python
from test_constructors import test_constructor_int_dtype_missing_values
```



---
## test_constructor_bool_dtype_missing_values
```python
from test_constructors import test_constructor_bool_dtype_missing_values
```



---
## test_constructor_int64_dtype
```python
from test_constructors import test_constructor_int64_dtype
```



---
## test_constructor_raise_on_lossy_conversion_of_strings
```python
from test_constructors import test_constructor_raise_on_lossy_conversion_of_strings
```



---
## test_constructor_dtype_timedelta_alternative_construct
```python
from test_constructors import test_constructor_dtype_timedelta_alternative_construct
```



---
## test_constructor_dtype_timedelta_ns_s
```python
from test_constructors import test_constructor_dtype_timedelta_ns_s
```



---
## test_constructor_dtype_timedelta_ns_s_astype_int64
```python
from test_constructors import test_constructor_dtype_timedelta_ns_s_astype_int64
```



---
## test_constructor_mismatched_null_nullable_dtype
```python
from test_constructors import test_constructor_mismatched_null_nullable_dtype
```



---
## test_series_constructor_ea_int_from_bool
```python
from test_constructors import test_series_constructor_ea_int_from_bool
```



---
## test_series_constructor_ea_int_from_string_bool
```python
from test_constructors import test_series_constructor_ea_int_from_string_bool
```



---
## test_series_constructor_overflow_uint_ea
```python
from test_constructors import test_series_constructor_overflow_uint_ea
```



---
## test_series_constructor_overflow_uint_ea_with_na
```python
from test_constructors import test_series_constructor_overflow_uint_ea_with_na
```



---
## test_series_constructor_overflow_uint_with_nan
```python
from test_constructors import test_series_constructor_overflow_uint_with_nan
```



---
## test_series_constructor_ea_all_na
```python
from test_constructors import test_series_constructor_ea_all_na
```



---
## test_series_from_index_dtype_equal_does_not_copy
```python
from test_constructors import test_series_from_index_dtype_equal_does_not_copy
```



---
## test_series_string_inference
```python
from test_constructors import test_series_string_inference
```



---
## test_series_string_with_na_inference
```python
from test_constructors import test_series_string_with_na_inference
```



---
## test_series_string_inference_scalar
```python
from test_constructors import test_series_string_inference_scalar
```



---
## test_series_string_inference_array_string_dtype
```python
from test_constructors import test_series_string_inference_array_string_dtype
```



---
## test_series_string_inference_storage_definition
```python
from test_constructors import test_series_string_inference_storage_definition
```



---
## test_series_constructor_infer_string_scalar
```python
from test_constructors import test_series_constructor_infer_string_scalar
```



---
## test_series_string_inference_na_first
```python
from test_constructors import test_series_string_inference_na_first
```



---
## test_inference_on_pandas_objects
```python
from test_constructors import test_inference_on_pandas_objects
```



---
## test_series_constructor_datetimelike_index_coercion
```python
from test_constructors import test_series_constructor_datetimelike_index_coercion
```



---
## test_series_constructor_infer_multiindex
```python
from test_constructors import test_series_constructor_infer_multiindex
```



---
## test_np_string_array_object_cast
```python
from test_constructors import test_np_string_array_object_cast
```



---
## test_constructor_no_pandas_array
```python
from test_constructors import test_constructor_no_pandas_array
```



---
## test_from_array
```python
from test_constructors import test_from_array
```



---
## test_from_list_dtype
```python
from test_constructors import test_from_list_dtype
```



---
## Iter
```python
from test_constructors import Iter
```



---
## create_data
```python
from test_constructors import create_data
```



---
## A
```python
from test_constructors import A
```



---
## __iter__
```python
from test_constructors import __iter__
```



---
## __name__
```python
from test_missing import __name__
```



---
## TestSeriesMissingData
```python
from test_missing import TestSeriesMissingData
```



---
## test_hasnans_uncached_for_series
```python
from test_missing import test_hasnans_uncached_for_series
```



---
## test_categorical_nan_handling
```python
from test_missing import test_categorical_nan_handling
```



---
## test_isna_for_inf
```python
from test_missing import test_isna_for_inf
```



---
## test_timedelta64_nan
```python
from test_missing import test_timedelta64_nan
```



---
## test_logical_range_select
```python
from test_missing import test_logical_range_select
```



---
## test_valid
```python
from test_missing import test_valid
```



---
## __name__
```python
from test_unary import __name__
```



---
## TestSeriesUnaryOps
```python
from test_unary import TestSeriesUnaryOps
```



---
## test_neg
```python
from test_unary import test_neg
```



---
## test_invert
```python
from test_unary import test_invert
```



---
## test_all_numeric_unary_operators
```python
from test_unary import test_all_numeric_unary_operators
```



---
## test_unary_float_op_mask
```python
from test_unary import test_unary_float_op_mask
```



---
## __name__
```python
from test_cumulative import __name__
```



---
## TestSeriesCumulativeOps
```python
from test_cumulative import TestSeriesCumulativeOps
```



---
## test_datetime_series
```python
from test_cumulative import test_datetime_series
```



---
## test_cummin_cummax
```python
from test_cumulative import test_cummin_cummax
```



---
## test_cummin_cummax_datetimelike
```python
from test_cumulative import test_cummin_cummax_datetimelike
```



---
## test_cummin_cummax_period
```python
from test_cumulative import test_cummin_cummax_period
```



---
## test_cummethods_bool
```python
from test_cumulative import test_cummethods_bool
```



---
## test_cummethods_bool_in_object_dtype
```python
from test_cumulative import test_cummethods_bool_in_object_dtype
```



---
## test_cumprod_timedelta
```python
from test_cumulative import test_cumprod_timedelta
```



---
## __name__
```python
from test_subclass import __name__
```



---
## TestSeriesSubclassing
```python
from test_subclass import TestSeriesSubclassing
```



---
## SubclassedSeries
```python
from test_subclass import SubclassedSeries
```



---
## test_constructor_from_dict
```python
from test_subclass import test_constructor_from_dict
```



---
## test_indexing_sliced
```python
from test_subclass import test_indexing_sliced
```



---
## test_to_frame
```python
from test_subclass import test_to_frame
```



---
## test_subclass_unstack
```python
from test_subclass import test_subclass_unstack
```



---
## test_subclass_empty_repr
```python
from test_subclass import test_subclass_empty_repr
```



---
## test_asof
```python
from test_subclass import test_asof
```



---
## test_explode
```python
from test_subclass import test_explode
```



---
## test_equals
```python
from test_subclass import test_equals
```



---
## _constructor
```python
from test_subclass import _constructor
```



---
## _new
```python
from test_subclass import _new
```



---
## __name__
```python
from test_formats import __name__
```



---
## TestSeriesRepr
```python
from test_formats import TestSeriesRepr
```



---
## TestCategoricalRepr
```python
from test_formats import TestCategoricalRepr
```



---
## test_multilevel_name_print_0
```python
from test_formats import test_multilevel_name_print_0
```



---
## test_multilevel_name_print
```python
from test_formats import test_multilevel_name_print
```



---
## test_small_name_printing
```python
from test_formats import test_small_name_printing
```



---
## test_big_name_printing
```python
from test_formats import test_big_name_printing
```



---
## test_empty_name_printing
```python
from test_formats import test_empty_name_printing
```



---
## test_float_range
```python
from test_formats import test_float_range
```



---
## test_empty_object
```python
from test_formats import test_empty_object
```



---
## test_string
```python
from test_formats import test_string
```



---
## test_object
```python
from test_formats import test_object
```



---
## test_datetime
```python
from test_formats import test_datetime
```



---
## test_various_names
```python
from test_formats import test_various_names
```



---
## test_tuple_name
```python
from test_formats import test_tuple_name
```



---
## test_tidy_repr_name_0
```python
from test_formats import test_tidy_repr_name_0
```



---
## test_newline
```python
from test_formats import test_newline
```



---
## test_empty_int64
```python
from test_formats import test_empty_int64
```



---
## test_repr_bool_fails
```python
from test_formats import test_repr_bool_fails
```



---
## test_repr_name_iterable_indexable
```python
from test_formats import test_repr_name_iterable_indexable
```



---
## test_repr_max_rows
```python
from test_formats import test_repr_max_rows
```



---
## test_unicode_string_with_unicode
```python
from test_formats import test_unicode_string_with_unicode
```



---
## test_str_to_bytes_raises
```python
from test_formats import test_str_to_bytes_raises
```



---
## test_timeseries_repr_object_dtype
```python
from test_formats import test_timeseries_repr_object_dtype
```



---
## test_latex_repr
```python
from test_formats import test_latex_repr
```



---
## test_index_repr_in_frame_with_nan
```python
from test_formats import test_index_repr_in_frame_with_nan
```



---
## test_format_pre_1900_dates
```python
from test_formats import test_format_pre_1900_dates
```



---
## test_series_repr_nat
```python
from test_formats import test_series_repr_nat
```



---
## test_float_repr
```python
from test_formats import test_float_repr
```



---
## test_different_null_objects
```python
from test_formats import test_different_null_objects
```



---
## test_categorical_repr_unicode
```python
from test_formats import test_categorical_repr_unicode
```



---
## test_categorical_repr
```python
from test_formats import test_categorical_repr
```



---
## test_categorical_series_repr
```python
from test_formats import test_categorical_series_repr
```



---
## test_categorical_series_repr_ordered
```python
from test_formats import test_categorical_series_repr_ordered
```



---
## test_categorical_series_repr_datetime
```python
from test_formats import test_categorical_series_repr_datetime
```



---
## test_categorical_series_repr_datetime_ordered
```python
from test_formats import test_categorical_series_repr_datetime_ordered
```



---
## test_categorical_series_repr_period
```python
from test_formats import test_categorical_series_repr_period
```



---
## test_categorical_series_repr_period_ordered
```python
from test_formats import test_categorical_series_repr_period_ordered
```



---
## test_categorical_series_repr_timedelta
```python
from test_formats import test_categorical_series_repr_timedelta
```



---
## test_categorical_series_repr_timedelta_ordered
```python
from test_formats import test_categorical_series_repr_timedelta_ordered
```



---
## County
```python
from test_formats import County
```



---
## __repr__
```python
from test_formats import __repr__
```



---
## __name__
```python
from test_iteration import __name__
```



---
## TestIteration
```python
from test_iteration import TestIteration
```



---
## test_keys
```python
from test_iteration import test_keys
```



---
## test_iter_datetimes
```python
from test_iteration import test_iter_datetimes
```



---
## test_iter_strings
```python
from test_iteration import test_iter_strings
```



---
## test_iteritems_datetimes
```python
from test_iteration import test_iteritems_datetimes
```



---
## test_iteritems_strings
```python
from test_iteration import test_iteritems_strings
```



---
## test_items_datetimes
```python
from test_iteration import test_items_datetimes
```



---
## test_items_strings
```python
from test_iteration import test_items_strings
```



---
## ufunc
```python
from test_ufunc import ufunc
```



---
## sparse
```python
from test_ufunc import sparse
```



---
## arrays_for_binary_ufunc
```python
from test_ufunc import arrays_for_binary_ufunc
```

A pair of random, length-100 integer-dtype arrays, that are mostly 0.

---
## test_unary_ufunc
```python
from test_ufunc import test_unary_ufunc
```



---
## test_binary_ufunc_with_array
```python
from test_ufunc import test_binary_ufunc_with_array
```



---
## test_binary_ufunc_with_index
```python
from test_ufunc import test_binary_ufunc_with_index
```



---
## test_binary_ufunc_with_series
```python
from test_ufunc import test_binary_ufunc_with_series
```



---
## test_binary_ufunc_scalar
```python
from test_ufunc import test_binary_ufunc_scalar
```



---
## test_multiple_output_binary_ufuncs
```python
from test_ufunc import test_multiple_output_binary_ufuncs
```



---
## test_multiple_output_ufunc
```python
from test_ufunc import test_multiple_output_ufunc
```



---
## test_binary_ufunc_drops_series_name
```python
from test_ufunc import test_binary_ufunc_drops_series_name
```



---
## test_object_series_ok
```python
from test_ufunc import test_object_series_ok
```



---
## values_for_np_reduce
```python
from test_ufunc import values_for_np_reduce
```



---
## TestNumpyReductions
```python
from test_ufunc import TestNumpyReductions
```



---
## test_binary_ufunc_other_types
```python
from test_ufunc import test_binary_ufunc_other_types
```



---
## test_object_dtype_ok
```python
from test_ufunc import test_object_dtype_ok
```



---
## test_outer
```python
from test_ufunc import test_outer
```



---
## test_np_matmul
```python
from test_ufunc import test_np_matmul
```



---
## test_array_ufuncs_for_many_arguments
```python
from test_ufunc import test_array_ufuncs_for_many_arguments
```



---
## test_np_fix
```python
from test_ufunc import test_np_fix
```



---
## Dummy
```python
from test_ufunc import Dummy
```



---
## test_multiply
```python
from test_ufunc import test_multiply
```



---
## test_add
```python
from test_ufunc import test_add
```



---
## test_max
```python
from test_ufunc import test_max
```



---
## test_min
```python
from test_ufunc import test_min
```



---
## Thing
```python
from test_ufunc import Thing
```



---
## add3
```python
from test_ufunc import add3
```



---
## __add__
```python
from test_ufunc import __add__
```



---
## __repr__
```python
from test_ufunc import __repr__
```



---
## __name__
```python
from test_validate import __name__
```



---
## test_validate_bool_args
```python
from test_validate import test_validate_bool_args
```



---
## __name__
```python
from test_npfuncs import __name__
```



---
## TestPtp
```python
from test_npfuncs import TestPtp
```



---
## test_numpy_unique
```python
from test_npfuncs import test_numpy_unique
```



---
## test_numpy_argwhere
```python
from test_npfuncs import test_numpy_argwhere
```



---
## test_log_arrow_backed_missing_value
```python
from test_npfuncs import test_log_arrow_backed_missing_value
```



---
## test_ptp
```python
from test_npfuncs import test_ptp
```



---
## TestSeriesMisc
```python
from test_api import TestSeriesMisc
```



---
## test_float_int_deprecated
```python
from test_api import test_float_int_deprecated
```



---
## test_tab_completion
```python
from test_api import test_tab_completion
```



---
## test_tab_completion_dt
```python
from test_api import test_tab_completion_dt
```



---
## test_tab_completion_cat
```python
from test_api import test_tab_completion_cat
```



---
## test_tab_completion_cat_str
```python
from test_api import test_tab_completion_cat_str
```



---
## test_tab_completion_with_categorical
```python
from test_api import test_tab_completion_with_categorical
```



---
## test_index_tab_completion
```python
from test_api import test_index_tab_completion
```



---
## test_not_hashable
```python
from test_api import test_not_hashable
```



---
## test_contains
```python
from test_api import test_contains
```



---
## test_axis_alias
```python
from test_api import test_axis_alias
```



---
## test_class_axis
```python
from test_api import test_class_axis
```



---
## test_ndarray_compat
```python
from test_api import test_ndarray_compat
```



---
## test_ndarray_compat_like_func
```python
from test_api import test_ndarray_compat_like_func
```



---
## test_ndarray_compat_ravel
```python
from test_api import test_ndarray_compat_ravel
```



---
## test_empty_method
```python
from test_api import test_empty_method
```



---
## test_empty_method_full_series
```python
from test_api import test_empty_method_full_series
```



---
## test_integer_series_size
```python
from test_api import test_integer_series_size
```



---
## test_attrs
```python
from test_api import test_attrs
```



---
## test_inspect_getmembers
```python
from test_api import test_inspect_getmembers
```



---
## test_unknown_attribute
```python
from test_api import test_unknown_attribute
```



---
## test_datetime_series_no_datelike_attrs
```python
from test_api import test_datetime_series_no_datelike_attrs
```



---
## test_series_datetimelike_attribute_access
```python
from test_api import test_series_datetimelike_attribute_access
```



---
## test_series_datetimelike_attribute_access_invalid
```python
from test_api import test_series_datetimelike_attribute_access_invalid
```



---
## test_numeric_only
```python
from test_api import test_numeric_only
```



---
## __name__
```python
from test_arithmetic import __name__
```



---
## switch_numexpr_min_elements
```python
from test_arithmetic import switch_numexpr_min_elements
```



---
## _permute
```python
from test_arithmetic import _permute
```



---
## TestSeriesFlexArithmetic
```python
from test_arithmetic import TestSeriesFlexArithmetic
```



---
## TestSeriesArithmetic
```python
from test_arithmetic import TestSeriesArithmetic
```



---
## TestSeriesFlexComparison
```python
from test_arithmetic import TestSeriesFlexComparison
```



---
## TestSeriesComparison
```python
from test_arithmetic import TestSeriesComparison
```



---
## TestTimeSeriesArithmetic
```python
from test_arithmetic import TestTimeSeriesArithmetic
```



---
## TestNamePreservation
```python
from test_arithmetic import TestNamePreservation
```



---
## TestInplaceOperations
```python
from test_arithmetic import TestInplaceOperations
```



---
## test_none_comparison
```python
from test_arithmetic import test_none_comparison
```



---
## test_series_varied_multiindex_alignment
```python
from test_arithmetic import test_series_varied_multiindex_alignment
```



---
## test_rmod_consistent_large_series
```python
from test_arithmetic import test_rmod_consistent_large_series
```



---
## test_flex_method_equivalence
```python
from test_arithmetic import test_flex_method_equivalence
```



---
## test_flex_method_subclass_metadata_preservation
```python
from test_arithmetic import test_flex_method_subclass_metadata_preservation
```



---
## test_flex_add_scalar_fill_value
```python
from test_arithmetic import test_flex_add_scalar_fill_value
```



---
## test_operators_combine
```python
from test_arithmetic import test_operators_combine
```



---
## test_add_series_with_period_index
```python
from test_arithmetic import test_add_series_with_period_index
```



---
## test_string_addition
```python
from test_arithmetic import test_string_addition
```



---
## test_divmod
```python
from test_arithmetic import test_divmod
```



---
## test_series_integer_mod
```python
from test_arithmetic import test_series_integer_mod
```



---
## test_add_with_duplicate_index
```python
from test_arithmetic import test_add_with_duplicate_index
```



---
## test_add_na_handling
```python
from test_arithmetic import test_add_na_handling
```



---
## test_add_corner_cases
```python
from test_arithmetic import test_add_corner_cases
```



---
## test_add_float_plus_int
```python
from test_arithmetic import test_add_float_plus_int
```



---
## test_mul_empty_int_corner_case
```python
from test_arithmetic import test_mul_empty_int_corner_case
```



---
## test_sub_datetimelike_align
```python
from test_arithmetic import test_sub_datetimelike_align
```



---
## test_alignment_doesnt_change_tz
```python
from test_arithmetic import test_alignment_doesnt_change_tz
```



---
## test_alignment_categorical
```python
from test_arithmetic import test_alignment_categorical
```



---
## test_arithmetic_with_duplicate_index
```python
from test_arithmetic import test_arithmetic_with_duplicate_index
```



---
## test_masked_and_non_masked_propagate_na
```python
from test_arithmetic import test_masked_and_non_masked_propagate_na
```



---
## test_mask_div_propagate_na_for_non_na_dtype
```python
from test_arithmetic import test_mask_div_propagate_na_for_non_na_dtype
```



---
## test_add_list_to_masked_array
```python
from test_arithmetic import test_add_list_to_masked_array
```



---
## test_add_list_to_masked_array_boolean
```python
from test_arithmetic import test_add_list_to_masked_array_boolean
```



---
## test_comparison_flex_basic
```python
from test_arithmetic import test_comparison_flex_basic
```



---
## test_comparison_bad_axis
```python
from test_arithmetic import test_comparison_bad_axis
```



---
## test_comparison_flex_alignment
```python
from test_arithmetic import test_comparison_flex_alignment
```



---
## test_comparison_flex_alignment_fill
```python
from test_arithmetic import test_comparison_flex_alignment_fill
```



---
## test_comparison_different_length
```python
from test_arithmetic import test_comparison_different_length
```



---
## test_ser_flex_cmp_return_dtypes
```python
from test_arithmetic import test_ser_flex_cmp_return_dtypes
```



---
## test_ser_flex_cmp_return_dtypes_empty
```python
from test_arithmetic import test_ser_flex_cmp_return_dtypes_empty
```



---
## test_ser_cmp_result_names
```python
from test_arithmetic import test_ser_cmp_result_names
```



---
## test_comparisons
```python
from test_arithmetic import test_comparisons
```



---
## test_categorical_comparisons
```python
from test_arithmetic import test_categorical_comparisons
```



---
## test_unequal_categorical_comparison_raises_type_error
```python
from test_arithmetic import test_unequal_categorical_comparison_raises_type_error
```



---
## test_comparison_tuples
```python
from test_arithmetic import test_comparison_tuples
```



---
## test_comparison_frozenset
```python
from test_arithmetic import test_comparison_frozenset
```



---
## test_comparison_operators_with_nas
```python
from test_arithmetic import test_comparison_operators_with_nas
```



---
## test_ne
```python
from test_arithmetic import test_ne
```



---
## test_comp_ops_df_compat
```python
from test_arithmetic import test_comp_ops_df_compat
```



---
## test_compare_series_interval_keyword
```python
from test_arithmetic import test_compare_series_interval_keyword
```



---
## test_series_add_tz_mismatch_converts_to_utc
```python
from test_arithmetic import test_series_add_tz_mismatch_converts_to_utc
```



---
## test_series_add_aware_naive_raises
```python
from test_arithmetic import test_series_add_aware_naive_raises
```



---
## test_datetime_understood
```python
from test_arithmetic import test_datetime_understood
```



---
## test_align_date_objects_with_datetimeindex
```python
from test_arithmetic import test_align_date_objects_with_datetimeindex
```



---
## test_series_ops_name_retention
```python
from test_arithmetic import test_series_ops_name_retention
```



---
## test_binop_maybe_preserve_name
```python
from test_arithmetic import test_binop_maybe_preserve_name
```



---
## test_scalarop_preserve_name
```python
from test_arithmetic import test_scalarop_preserve_name
```



---
## test_series_inplace_ops
```python
from test_arithmetic import test_series_inplace_ops
```



---
## MySeries
```python
from test_arithmetic import MySeries
```



---
## _check_fill
```python
from test_arithmetic import _check_fill
```



---
## _constructor
```python
from test_arithmetic import _constructor
```



---
## __name__
```python
from test_pivot_multilevel import __name__
```



---
## test_pivot_list_like_index
```python
from test_pivot_multilevel import test_pivot_list_like_index
```



---
## test_pivot_list_like_columns
```python
from test_pivot_multilevel import test_pivot_list_like_columns
```



---
## test_pivot_multiindexed_rows_and_cols
```python
from test_pivot_multilevel import test_pivot_multiindexed_rows_and_cols
```



---
## test_pivot_df_multiindex_index_none
```python
from test_pivot_multilevel import test_pivot_df_multiindex_index_none
```



---
## __name__
```python
from test_cut import __name__
```



---
## test_simple
```python
from test_cut import test_simple
```



---
## test_bins
```python
from test_cut import test_bins
```



---
## test_right
```python
from test_cut import test_right
```



---
## test_no_right
```python
from test_cut import test_no_right
```



---
## test_bins_from_interval_index
```python
from test_cut import test_bins_from_interval_index
```



---
## test_bins_from_interval_index_doc_example
```python
from test_cut import test_bins_from_interval_index_doc_example
```



---
## test_bins_not_overlapping_from_interval_index
```python
from test_cut import test_bins_not_overlapping_from_interval_index
```



---
## test_bins_not_monotonic
```python
from test_cut import test_bins_not_monotonic
```



---
## test_bins_monotonic_not_overflowing
```python
from test_cut import test_bins_monotonic_not_overflowing
```



---
## test_wrong_num_labels
```python
from test_cut import test_wrong_num_labels
```



---
## test_cut_corner
```python
from test_cut import test_cut_corner
```



---
## test_cut_not_1d_arg
```python
from test_cut import test_cut_not_1d_arg
```



---
## test_int_bins_with_inf
```python
from test_cut import test_int_bins_with_inf
```



---
## test_cut_out_of_range_more
```python
from test_cut import test_cut_out_of_range_more
```



---
## test_labels
```python
from test_cut import test_labels
```



---
## test_cut_pass_series_name_to_factor
```python
from test_cut import test_cut_pass_series_name_to_factor
```



---
## test_label_precision
```python
from test_cut import test_label_precision
```



---
## test_na_handling
```python
from test_cut import test_na_handling
```



---
## test_inf_handling
```python
from test_cut import test_inf_handling
```



---
## test_cut_out_of_bounds
```python
from test_cut import test_cut_out_of_bounds
```



---
## test_cut_pass_labels
```python
from test_cut import test_cut_pass_labels
```



---
## test_cut_pass_labels_compat
```python
from test_cut import test_cut_pass_labels_compat
```



---
## test_round_frac_just_works
```python
from test_cut import test_round_frac_just_works
```



---
## test_round_frac
```python
from test_cut import test_round_frac
```



---
## test_cut_return_intervals
```python
from test_cut import test_cut_return_intervals
```



---
## test_series_ret_bins
```python
from test_cut import test_series_ret_bins
```



---
## test_cut_duplicates_bin
```python
from test_cut import test_cut_duplicates_bin
```



---
## test_single_bin
```python
from test_cut import test_single_bin
```



---
## test_cut_read_only
```python
from test_cut import test_cut_read_only
```



---
## test_datetime_bin
```python
from test_cut import test_datetime_bin
```



---
## test_datetime_cut
```python
from test_cut import test_datetime_cut
```



---
## test_datetime_tz_cut_mismatched_tzawareness
```python
from test_cut import test_datetime_tz_cut_mismatched_tzawareness
```



---
## test_datetime_tz_cut
```python
from test_cut import test_datetime_tz_cut
```



---
## test_datetime_nan_error
```python
from test_cut import test_datetime_nan_error
```



---
## test_datetime_nan_mask
```python
from test_cut import test_datetime_nan_mask
```



---
## test_datetime_cut_roundtrip
```python
from test_cut import test_datetime_cut_roundtrip
```



---
## test_timedelta_cut_roundtrip
```python
from test_cut import test_timedelta_cut_roundtrip
```



---
## test_cut_bool_coercion_to_int
```python
from test_cut import test_cut_bool_coercion_to_int
```



---
## test_cut_incorrect_labels
```python
from test_cut import test_cut_incorrect_labels
```



---
## test_cut_nullable_integer
```python
from test_cut import test_cut_nullable_integer
```



---
## test_cut_non_unique_labels
```python
from test_cut import test_cut_non_unique_labels
```



---
## test_cut_unordered_labels
```python
from test_cut import test_cut_unordered_labels
```



---
## test_cut_unordered_with_missing_labels_raises_error
```python
from test_cut import test_cut_unordered_with_missing_labels_raises_error
```



---
## test_cut_unordered_with_series_labels
```python
from test_cut import test_cut_unordered_with_series_labels
```



---
## test_cut_no_warnings
```python
from test_cut import test_cut_no_warnings
```



---
## test_cut_with_duplicated_index_lowest_included
```python
from test_cut import test_cut_with_duplicated_index_lowest_included
```



---
## test_cut_with_nonexact_categorical_indices
```python
from test_cut import test_cut_with_nonexact_categorical_indices
```



---
## test_cut_with_timestamp_tuple_labels
```python
from test_cut import test_cut_with_timestamp_tuple_labels
```



---
## test_cut_bins_datetime_intervalindex
```python
from test_cut import test_cut_bins_datetime_intervalindex
```



---
## test_cut_with_nullable_int64
```python
from test_cut import test_cut_with_nullable_int64
```



---
## __name__
```python
from test_get_dummies import __name__
```



---
## TestGetDummies
```python
from test_get_dummies import TestGetDummies
```



---
## df
```python
from test_get_dummies import df
```



---
## dtype
```python
from test_get_dummies import dtype
```



---
## sparse
```python
from test_get_dummies import sparse
```



---
## effective_dtype
```python
from test_get_dummies import effective_dtype
```



---
## test_get_dummies_raises_on_dtype_object
```python
from test_get_dummies import test_get_dummies_raises_on_dtype_object
```



---
## test_get_dummies_basic
```python
from test_get_dummies import test_get_dummies_basic
```



---
## test_get_dummies_basic_types
```python
from test_get_dummies import test_get_dummies_basic_types
```



---
## test_get_dummies_just_na
```python
from test_get_dummies import test_get_dummies_just_na
```



---
## test_get_dummies_include_na
```python
from test_get_dummies import test_get_dummies_include_na
```



---
## test_get_dummies_unicode
```python
from test_get_dummies import test_get_dummies_unicode
```



---
## test_dataframe_dummies_all_obj
```python
from test_get_dummies import test_dataframe_dummies_all_obj
```



---
## test_dataframe_dummies_string_dtype
```python
from test_get_dummies import test_dataframe_dummies_string_dtype
```



---
## test_dataframe_dummies_mix_default
```python
from test_get_dummies import test_dataframe_dummies_mix_default
```



---
## test_dataframe_dummies_prefix_list
```python
from test_get_dummies import test_dataframe_dummies_prefix_list
```



---
## test_dataframe_dummies_prefix_str
```python
from test_get_dummies import test_dataframe_dummies_prefix_str
```



---
## test_dataframe_dummies_subset
```python
from test_get_dummies import test_dataframe_dummies_subset
```



---
## test_dataframe_dummies_prefix_sep
```python
from test_get_dummies import test_dataframe_dummies_prefix_sep
```



---
## test_dataframe_dummies_prefix_bad_length
```python
from test_get_dummies import test_dataframe_dummies_prefix_bad_length
```



---
## test_dataframe_dummies_prefix_sep_bad_length
```python
from test_get_dummies import test_dataframe_dummies_prefix_sep_bad_length
```



---
## test_dataframe_dummies_prefix_dict
```python
from test_get_dummies import test_dataframe_dummies_prefix_dict
```



---
## test_dataframe_dummies_with_na
```python
from test_get_dummies import test_dataframe_dummies_with_na
```



---
## test_dataframe_dummies_with_categorical
```python
from test_get_dummies import test_dataframe_dummies_with_categorical
```



---
## test_dataframe_dummies_unicode
```python
from test_get_dummies import test_dataframe_dummies_unicode
```



---
## test_get_dummies_basic_drop_first
```python
from test_get_dummies import test_get_dummies_basic_drop_first
```



---
## test_get_dummies_basic_drop_first_one_level
```python
from test_get_dummies import test_get_dummies_basic_drop_first_one_level
```



---
## test_get_dummies_basic_drop_first_NA
```python
from test_get_dummies import test_get_dummies_basic_drop_first_NA
```



---
## test_dataframe_dummies_drop_first
```python
from test_get_dummies import test_dataframe_dummies_drop_first
```



---
## test_dataframe_dummies_drop_first_with_categorical
```python
from test_get_dummies import test_dataframe_dummies_drop_first_with_categorical
```



---
## test_dataframe_dummies_drop_first_with_na
```python
from test_get_dummies import test_dataframe_dummies_drop_first_with_na
```



---
## test_get_dummies_int_int
```python
from test_get_dummies import test_get_dummies_int_int
```



---
## test_get_dummies_int_df
```python
from test_get_dummies import test_get_dummies_int_df
```



---
## test_dataframe_dummies_preserve_categorical_dtype
```python
from test_get_dummies import test_dataframe_dummies_preserve_categorical_dtype
```



---
## test_get_dummies_dont_sparsify_all_columns
```python
from test_get_dummies import test_get_dummies_dont_sparsify_all_columns
```



---
## test_get_dummies_duplicate_columns
```python
from test_get_dummies import test_get_dummies_duplicate_columns
```



---
## test_get_dummies_all_sparse
```python
from test_get_dummies import test_get_dummies_all_sparse
```



---
## test_get_dummies_with_string_values
```python
from test_get_dummies import test_get_dummies_with_string_values
```



---
## test_get_dummies_ea_dtype_series
```python
from test_get_dummies import test_get_dummies_ea_dtype_series
```



---
## test_get_dummies_ea_dtype_dataframe
```python
from test_get_dummies import test_get_dummies_ea_dtype_dataframe
```



---
## test_get_dummies_ea_dtype
```python
from test_get_dummies import test_get_dummies_ea_dtype
```



---
## test_get_dummies_arrow_dtype
```python
from test_get_dummies import test_get_dummies_arrow_dtype
```



---
## __name__
```python
from test_union_categoricals import __name__
```



---
## TestUnionCategoricals
```python
from test_union_categoricals import TestUnionCategoricals
```



---
## test_union_categorical
```python
from test_union_categoricals import test_union_categorical
```



---
## test_union_categorical_ordered_appearance
```python
from test_union_categoricals import test_union_categorical_ordered_appearance
```



---
## test_union_categorical_ordered_true
```python
from test_union_categoricals import test_union_categorical_ordered_true
```



---
## test_union_categorical_match_types
```python
from test_union_categoricals import test_union_categorical_match_types
```



---
## test_union_categorical_empty
```python
from test_union_categoricals import test_union_categorical_empty
```



---
## test_union_categoricals_nan
```python
from test_union_categoricals import test_union_categoricals_nan
```



---
## test_union_categoricals_empty
```python
from test_union_categoricals import test_union_categoricals_empty
```



---
## test_union_categorical_same_category
```python
from test_union_categoricals import test_union_categorical_same_category
```



---
## test_union_categorical_same_category_str
```python
from test_union_categoricals import test_union_categorical_same_category_str
```



---
## test_union_categorical_same_categories_different_order
```python
from test_union_categoricals import test_union_categorical_same_categories_different_order
```



---
## test_union_categoricals_ordered
```python
from test_union_categoricals import test_union_categoricals_ordered
```



---
## test_union_categoricals_ignore_order
```python
from test_union_categoricals import test_union_categoricals_ignore_order
```



---
## test_union_categoricals_sort
```python
from test_union_categoricals import test_union_categoricals_sort
```



---
## test_union_categoricals_sort_false
```python
from test_union_categoricals import test_union_categoricals_sort_false
```



---
## test_union_categoricals_sort_false_fastpath
```python
from test_union_categoricals import test_union_categoricals_sort_false_fastpath
```



---
## test_union_categoricals_sort_false_skipresort
```python
from test_union_categoricals import test_union_categoricals_sort_false_skipresort
```



---
## test_union_categoricals_sort_false_one_nan
```python
from test_union_categoricals import test_union_categoricals_sort_false_one_nan
```



---
## test_union_categoricals_sort_false_only_nan
```python
from test_union_categoricals import test_union_categoricals_sort_false_only_nan
```



---
## test_union_categoricals_sort_false_empty
```python
from test_union_categoricals import test_union_categoricals_sort_false_empty
```



---
## test_union_categoricals_sort_false_ordered_true
```python
from test_union_categoricals import test_union_categoricals_sort_false_ordered_true
```



---
## test_union_categorical_unwrap
```python
from test_union_categoricals import test_union_categorical_unwrap
```



---
## __name__
```python
from test_qcut import __name__
```



---
## test_qcut
```python
from test_qcut import test_qcut
```



---
## test_qcut_bounds
```python
from test_qcut import test_qcut_bounds
```



---
## test_qcut_specify_quantiles
```python
from test_qcut import test_qcut_specify_quantiles
```



---
## test_qcut_all_bins_same
```python
from test_qcut import test_qcut_all_bins_same
```



---
## test_qcut_include_lowest
```python
from test_qcut import test_qcut_include_lowest
```



---
## test_qcut_nas
```python
from test_qcut import test_qcut_nas
```



---
## test_qcut_index
```python
from test_qcut import test_qcut_index
```



---
## test_qcut_binning_issues
```python
from test_qcut import test_qcut_binning_issues
```



---
## test_qcut_return_intervals
```python
from test_qcut import test_qcut_return_intervals
```



---
## test_qcut_incorrect_labels
```python
from test_qcut import test_qcut_incorrect_labels
```



---
## test_qcut_wrong_length_labels
```python
from test_qcut import test_qcut_wrong_length_labels
```



---
## test_qcut_list_like_labels
```python
from test_qcut import test_qcut_list_like_labels
```



---
## test_qcut_duplicates_bin
```python
from test_qcut import test_qcut_duplicates_bin
```



---
## test_single_quantile
```python
from test_qcut import test_single_quantile
```



---
## test_qcut_nat
```python
from test_qcut import test_qcut_nat
```



---
## test_datetime_tz_qcut
```python
from test_qcut import test_datetime_tz_qcut
```



---
## test_date_like_qcut_bins
```python
from test_qcut import test_date_like_qcut_bins
```



---
## test_qcut_bool_coercion_to_int
```python
from test_qcut import test_qcut_bool_coercion_to_int
```



---
## test_qcut_nullable_integer
```python
from test_qcut import test_qcut_nullable_integer
```



---
## __name__
```python
from test_pivot import __name__
```



---
## dropna
```python
from test_pivot import dropna
```



---
## interval_values
```python
from test_pivot import interval_values
```



---
## TestPivotTable
```python
from test_pivot import TestPivotTable
```



---
## TestPivot
```python
from test_pivot import TestPivot
```



---
## data
```python
from test_pivot import data
```



---
## test_pivot_table
```python
from test_pivot import test_pivot_table
```



---
## test_pivot_table_categorical_observed_equal
```python
from test_pivot import test_pivot_table_categorical_observed_equal
```



---
## test_pivot_table_nocols
```python
from test_pivot import test_pivot_table_nocols
```



---
## test_pivot_table_dropna
```python
from test_pivot import test_pivot_table_dropna
```



---
## test_pivot_table_categorical
```python
from test_pivot import test_pivot_table_categorical
```



---
## test_pivot_table_dropna_categoricals
```python
from test_pivot import test_pivot_table_dropna_categoricals
```



---
## test_pivot_with_non_observable_dropna
```python
from test_pivot import test_pivot_with_non_observable_dropna
```



---
## test_pivot_with_non_observable_dropna_multi_cat
```python
from test_pivot import test_pivot_with_non_observable_dropna_multi_cat
```



---
## test_pivot_with_interval_index
```python
from test_pivot import test_pivot_with_interval_index
```



---
## test_pivot_with_interval_index_margins
```python
from test_pivot import test_pivot_with_interval_index_margins
```



---
## test_pass_array
```python
from test_pivot import test_pass_array
```



---
## test_pass_function
```python
from test_pivot import test_pass_function
```



---
## test_pivot_table_multiple
```python
from test_pivot import test_pivot_table_multiple
```



---
## test_pivot_dtypes
```python
from test_pivot import test_pivot_dtypes
```



---
## test_pivot_preserve_dtypes
```python
from test_pivot import test_pivot_preserve_dtypes
```



---
## test_pivot_no_values
```python
from test_pivot import test_pivot_no_values
```



---
## test_pivot_multi_values
```python
from test_pivot import test_pivot_multi_values
```



---
## test_pivot_multi_functions
```python
from test_pivot import test_pivot_multi_functions
```



---
## test_pivot_index_with_nan
```python
from test_pivot import test_pivot_index_with_nan
```



---
## test_pivot_index_with_nan_dates
```python
from test_pivot import test_pivot_index_with_nan_dates
```



---
## test_pivot_with_tz
```python
from test_pivot import test_pivot_with_tz
```



---
## test_pivot_tz_in_values
```python
from test_pivot import test_pivot_tz_in_values
```



---
## test_pivot_periods
```python
from test_pivot import test_pivot_periods
```



---
## test_pivot_periods_with_margins
```python
from test_pivot import test_pivot_periods_with_margins
```



---
## test_pivot_with_list_like_values
```python
from test_pivot import test_pivot_with_list_like_values
```



---
## test_pivot_with_list_like_values_nans
```python
from test_pivot import test_pivot_with_list_like_values_nans
```



---
## test_pivot_columns_none_raise_error
```python
from test_pivot import test_pivot_columns_none_raise_error
```



---
## test_pivot_with_multiindex
```python
from test_pivot import test_pivot_with_multiindex
```



---
## test_pivot_with_tuple_of_values
```python
from test_pivot import test_pivot_with_tuple_of_values
```



---
## _check_output
```python
from test_pivot import _check_output
```



---
## test_margins
```python
from test_pivot import test_margins
```



---
## test_no_col
```python
from test_pivot import test_no_col
```



---
## test_margin_with_only_columns_defined
```python
from test_pivot import test_margin_with_only_columns_defined
```



---
## test_margins_dtype
```python
from test_pivot import test_margins_dtype
```



---
## test_margins_dtype_len
```python
from test_pivot import test_margins_dtype_len
```



---
## test_pivot_table_multiindex_only
```python
from test_pivot import test_pivot_table_multiindex_only
```



---
## test_pivot_table_retains_tz
```python
from test_pivot import test_pivot_table_retains_tz
```



---
## test_pivot_integer_columns
```python
from test_pivot import test_pivot_integer_columns
```



---
## test_pivot_no_level_overlap
```python
from test_pivot import test_pivot_no_level_overlap
```



---
## test_pivot_columns_lexsorted
```python
from test_pivot import test_pivot_columns_lexsorted
```



---
## test_pivot_complex_aggfunc
```python
from test_pivot import test_pivot_complex_aggfunc
```



---
## test_margins_no_values_no_cols
```python
from test_pivot import test_margins_no_values_no_cols
```



---
## test_margins_no_values_two_rows
```python
from test_pivot import test_margins_no_values_two_rows
```



---
## test_margins_no_values_one_row_one_col
```python
from test_pivot import test_margins_no_values_one_row_one_col
```



---
## test_margins_no_values_two_row_two_cols
```python
from test_pivot import test_margins_no_values_two_row_two_cols
```



---
## test_pivot_table_with_margins_set_margin_name
```python
from test_pivot import test_pivot_table_with_margins_set_margin_name
```



---
## test_pivot_timegrouper
```python
from test_pivot import test_pivot_timegrouper
```



---
## test_pivot_timegrouper_double
```python
from test_pivot import test_pivot_timegrouper_double
```



---
## test_pivot_datetime_tz
```python
from test_pivot import test_pivot_datetime_tz
```



---
## test_pivot_dtaccessor
```python
from test_pivot import test_pivot_dtaccessor
```



---
## test_daily
```python
from test_pivot import test_daily
```



---
## test_monthly
```python
from test_pivot import test_monthly
```



---
## test_pivot_table_with_iterator_values
```python
from test_pivot import test_pivot_table_with_iterator_values
```



---
## test_pivot_table_margins_name_with_aggfunc_list
```python
from test_pivot import test_pivot_table_margins_name_with_aggfunc_list
```



---
## test_categorical_margins
```python
from test_pivot import test_categorical_margins
```



---
## test_categorical_margins_category
```python
from test_pivot import test_categorical_margins_category
```



---
## test_margins_casted_to_float
```python
from test_pivot import test_margins_casted_to_float
```



---
## test_pivot_with_categorical
```python
from test_pivot import test_pivot_with_categorical
```



---
## test_categorical_aggfunc
```python
from test_pivot import test_categorical_aggfunc
```



---
## test_categorical_pivot_index_ordering
```python
from test_pivot import test_categorical_pivot_index_ordering
```



---
## test_pivot_table_not_series
```python
from test_pivot import test_pivot_table_not_series
```



---
## test_pivot_margins_name_unicode
```python
from test_pivot import test_pivot_margins_name_unicode
```



---
## test_pivot_string_as_func
```python
from test_pivot import test_pivot_string_as_func
```



---
## test_pivot_string_func_vs_func
```python
from test_pivot import test_pivot_string_func_vs_func
```



---
## test_pivot_number_of_levels_larger_than_int32
```python
from test_pivot import test_pivot_number_of_levels_larger_than_int32
```



---
## test_pivot_table_aggfunc_dropna
```python
from test_pivot import test_pivot_table_aggfunc_dropna
```



---
## test_pivot_table_aggfunc_scalar_dropna
```python
from test_pivot import test_pivot_table_aggfunc_scalar_dropna
```



---
## test_pivot_table_empty_aggfunc
```python
from test_pivot import test_pivot_table_empty_aggfunc
```



---
## test_pivot_table_no_column_raises
```python
from test_pivot import test_pivot_table_no_column_raises
```



---
## test_pivot_table_multiindex_columns_doctest_case
```python
from test_pivot import test_pivot_table_multiindex_columns_doctest_case
```



---
## test_pivot_table_sort_false
```python
from test_pivot import test_pivot_table_sort_false
```



---
## test_pivot_table_nullable_margins
```python
from test_pivot import test_pivot_table_nullable_margins
```



---
## test_pivot_table_sort_false_with_multiple_values
```python
from test_pivot import test_pivot_table_sort_false_with_multiple_values
```



---
## test_pivot_table_with_margins_and_numeric_columns
```python
from test_pivot import test_pivot_table_with_margins_and_numeric_columns
```



---
## test_pivot_ea_dtype_dropna
```python
from test_pivot import test_pivot_ea_dtype_dropna
```



---
## test_pivot_table_datetime_warning
```python
from test_pivot import test_pivot_table_datetime_warning
```



---
## test_pivot_table_with_mixed_nested_tuples
```python
from test_pivot import test_pivot_table_with_mixed_nested_tuples
```



---
## test_pivot_table_aggfunc_nunique_with_different_values
```python
from test_pivot import test_pivot_table_aggfunc_nunique_with_different_values
```



---
## test_pivot
```python
from test_pivot import test_pivot
```



---
## test_pivot_duplicates
```python
from test_pivot import test_pivot_duplicates
```



---
## test_pivot_empty
```python
from test_pivot import test_pivot_empty
```



---
## test_pivot_integer_bug
```python
from test_pivot import test_pivot_integer_bug
```



---
## test_pivot_index_none
```python
from test_pivot import test_pivot_index_none
```



---
## test_pivot_index_list_values_none_immutable_args
```python
from test_pivot import test_pivot_index_list_values_none_immutable_args
```



---
## test_pivot_columns_not_given
```python
from test_pivot import test_pivot_columns_not_given
```



---
## test_pivot_columns_is_none
```python
from test_pivot import test_pivot_columns_is_none
```



---
## test_pivot_index_is_none
```python
from test_pivot import test_pivot_index_is_none
```



---
## test_pivot_values_is_none
```python
from test_pivot import test_pivot_values_is_none
```



---
## test_pivot_not_changing_index_name
```python
from test_pivot import test_pivot_not_changing_index_name
```



---
## test_pivot_table_empty_dataframe_correct_index
```python
from test_pivot import test_pivot_table_empty_dataframe_correct_index
```



---
## test_pivot_table_handles_explicit_datetime_types
```python
from test_pivot import test_pivot_table_handles_explicit_datetime_types
```



---
## test_pivot_table_with_margins_and_numeric_column_names
```python
from test_pivot import test_pivot_table_with_margins_and_numeric_column_names
```



---
## MockUnstacker
```python
from test_pivot import MockUnstacker
```



---
## ret_one
```python
from test_pivot import ret_one
```



---
## ret_sum
```python
from test_pivot import ret_sum
```



---
## ret_none
```python
from test_pivot import ret_none
```



---
## agg
```python
from test_pivot import agg
```



---
## __init__
```python
from test_pivot import __init__
```



---
## TestCartesianProduct
```python
from test_util import TestCartesianProduct
```



---
## test_simple
```python
from test_util import test_simple
```



---
## test_datetimeindex
```python
from test_util import test_datetimeindex
```



---
## test_tzaware_retained
```python
from test_util import test_tzaware_retained
```



---
## test_tzaware_retained_categorical
```python
from test_util import test_tzaware_retained_categorical
```



---
## test_empty
```python
from test_util import test_empty
```



---
## test_empty_input
```python
from test_util import test_empty_input
```



---
## test_invalid_input
```python
from test_util import test_invalid_input
```



---
## test_exceed_product_space
```python
from test_util import test_exceed_product_space
```



---
## __name__
```python
from test_melt import __name__
```



---
## df
```python
from test_melt import df
```



---
## df1
```python
from test_melt import df1
```



---
## var_name
```python
from test_melt import var_name
```



---
## value_name
```python
from test_melt import value_name
```



---
## TestMelt
```python
from test_melt import TestMelt
```



---
## TestLreshape
```python
from test_melt import TestLreshape
```



---
## TestWideToLong
```python
from test_melt import TestWideToLong
```



---
## test_wide_to_long_pyarrow_string_columns
```python
from test_melt import test_wide_to_long_pyarrow_string_columns
```



---
## test_top_level_method
```python
from test_melt import test_top_level_method
```



---
## test_method_signatures
```python
from test_melt import test_method_signatures
```



---
## test_default_col_names
```python
from test_melt import test_default_col_names
```



---
## test_value_vars
```python
from test_melt import test_value_vars
```



---
## test_value_vars_types
```python
from test_melt import test_value_vars_types
```



---
## test_vars_work_with_multiindex
```python
from test_melt import test_vars_work_with_multiindex
```



---
## test_single_vars_work_with_multiindex
```python
from test_melt import test_single_vars_work_with_multiindex
```



---
## test_tuple_vars_fail_with_multiindex
```python
from test_melt import test_tuple_vars_fail_with_multiindex
```



---
## test_custom_var_name
```python
from test_melt import test_custom_var_name
```



---
## test_custom_value_name
```python
from test_melt import test_custom_value_name
```



---
## test_custom_var_and_value_name
```python
from test_melt import test_custom_var_and_value_name
```



---
## test_col_level
```python
from test_melt import test_col_level
```



---
## test_multiindex
```python
from test_melt import test_multiindex
```



---
## test_pandas_dtypes
```python
from test_melt import test_pandas_dtypes
```



---
## test_preserve_category
```python
from test_melt import test_preserve_category
```



---
## test_melt_missing_columns_raises
```python
from test_melt import test_melt_missing_columns_raises
```



---
## test_melt_mixed_int_str_id_vars
```python
from test_melt import test_melt_mixed_int_str_id_vars
```



---
## test_melt_mixed_int_str_value_vars
```python
from test_melt import test_melt_mixed_int_str_value_vars
```



---
## test_ignore_index
```python
from test_melt import test_ignore_index
```



---
## test_ignore_multiindex
```python
from test_melt import test_ignore_multiindex
```



---
## test_ignore_index_name_and_type
```python
from test_melt import test_ignore_index_name_and_type
```



---
## test_melt_with_duplicate_columns
```python
from test_melt import test_melt_with_duplicate_columns
```



---
## test_melt_ea_dtype
```python
from test_melt import test_melt_ea_dtype
```



---
## test_melt_ea_columns
```python
from test_melt import test_melt_ea_columns
```



---
## test_melt_preserves_datetime
```python
from test_melt import test_melt_preserves_datetime
```



---
## test_melt_allows_non_scalar_id_vars
```python
from test_melt import test_melt_allows_non_scalar_id_vars
```



---
## test_melt_allows_non_string_var_name
```python
from test_melt import test_melt_allows_non_string_var_name
```



---
## test_melt_non_scalar_var_name_raises
```python
from test_melt import test_melt_non_scalar_var_name_raises
```



---
## test_pairs
```python
from test_melt import test_pairs
```



---
## test_simple
```python
from test_melt import test_simple
```



---
## test_stubs
```python
from test_melt import test_stubs
```



---
## test_separating_character
```python
from test_melt import test_separating_character
```



---
## test_escapable_characters
```python
from test_melt import test_escapable_characters
```



---
## test_unbalanced
```python
from test_melt import test_unbalanced
```



---
## test_character_overlap
```python
from test_melt import test_character_overlap
```



---
## test_invalid_separator
```python
from test_melt import test_invalid_separator
```



---
## test_num_string_disambiguation
```python
from test_melt import test_num_string_disambiguation
```



---
## test_invalid_suffixtype
```python
from test_melt import test_invalid_suffixtype
```



---
## test_multiple_id_columns
```python
from test_melt import test_multiple_id_columns
```



---
## test_non_unique_idvars
```python
from test_melt import test_non_unique_idvars
```



---
## test_cast_j_int
```python
from test_melt import test_cast_j_int
```



---
## test_identical_stubnames
```python
from test_melt import test_identical_stubnames
```



---
## test_nonnumeric_suffix
```python
from test_melt import test_nonnumeric_suffix
```



---
## test_mixed_type_suffix
```python
from test_melt import test_mixed_type_suffix
```



---
## test_float_suffix
```python
from test_melt import test_float_suffix
```



---
## test_col_substring_of_stubname
```python
from test_melt import test_col_substring_of_stubname
```



---
## test_raise_of_column_name_value
```python
from test_melt import test_raise_of_column_name_value
```



---
## test_missing_stubname
```python
from test_melt import test_missing_stubname
```



---
## __name__
```python
from test_from_dummies import __name__
```



---
## dummies_basic
```python
from test_from_dummies import dummies_basic
```



---
## dummies_with_unassigned
```python
from test_from_dummies import dummies_with_unassigned
```



---
## test_error_wrong_data_type
```python
from test_from_dummies import test_error_wrong_data_type
```



---
## test_error_no_prefix_contains_unassigned
```python
from test_from_dummies import test_error_no_prefix_contains_unassigned
```



---
## test_error_no_prefix_wrong_default_category_type
```python
from test_from_dummies import test_error_no_prefix_wrong_default_category_type
```



---
## test_error_no_prefix_multi_assignment
```python
from test_from_dummies import test_error_no_prefix_multi_assignment
```



---
## test_error_no_prefix_contains_nan
```python
from test_from_dummies import test_error_no_prefix_contains_nan
```



---
## test_error_contains_non_dummies
```python
from test_from_dummies import test_error_contains_non_dummies
```



---
## test_error_with_prefix_multiple_seperators
```python
from test_from_dummies import test_error_with_prefix_multiple_seperators
```



---
## test_error_with_prefix_sep_wrong_type
```python
from test_from_dummies import test_error_with_prefix_sep_wrong_type
```



---
## test_error_with_prefix_contains_unassigned
```python
from test_from_dummies import test_error_with_prefix_contains_unassigned
```



---
## test_error_with_prefix_default_category_wrong_type
```python
from test_from_dummies import test_error_with_prefix_default_category_wrong_type
```



---
## test_error_with_prefix_default_category_dict_not_complete
```python
from test_from_dummies import test_error_with_prefix_default_category_dict_not_complete
```



---
## test_error_with_prefix_contains_nan
```python
from test_from_dummies import test_error_with_prefix_contains_nan
```



---
## test_error_with_prefix_contains_non_dummies
```python
from test_from_dummies import test_error_with_prefix_contains_non_dummies
```



---
## test_error_with_prefix_double_assignment
```python
from test_from_dummies import test_error_with_prefix_double_assignment
```



---
## test_roundtrip_series_to_dataframe
```python
from test_from_dummies import test_roundtrip_series_to_dataframe
```



---
## test_roundtrip_single_column_dataframe
```python
from test_from_dummies import test_roundtrip_single_column_dataframe
```



---
## test_roundtrip_with_prefixes
```python
from test_from_dummies import test_roundtrip_with_prefixes
```



---
## test_no_prefix_string_cats_basic
```python
from test_from_dummies import test_no_prefix_string_cats_basic
```



---
## test_no_prefix_string_cats_basic_bool_values
```python
from test_from_dummies import test_no_prefix_string_cats_basic_bool_values
```



---
## test_no_prefix_string_cats_basic_mixed_bool_values
```python
from test_from_dummies import test_no_prefix_string_cats_basic_mixed_bool_values
```



---
## test_no_prefix_int_cats_basic
```python
from test_from_dummies import test_no_prefix_int_cats_basic
```



---
## test_no_prefix_float_cats_basic
```python
from test_from_dummies import test_no_prefix_float_cats_basic
```



---
## test_no_prefix_mixed_cats_basic
```python
from test_from_dummies import test_no_prefix_mixed_cats_basic
```



---
## test_no_prefix_string_cats_contains_get_dummies_NaN_column
```python
from test_from_dummies import test_no_prefix_string_cats_contains_get_dummies_NaN_column
```



---
## test_no_prefix_string_cats_default_category
```python
from test_from_dummies import test_no_prefix_string_cats_default_category
```



---
## test_with_prefix_basic
```python
from test_from_dummies import test_with_prefix_basic
```



---
## test_with_prefix_contains_get_dummies_NaN_column
```python
from test_from_dummies import test_with_prefix_contains_get_dummies_NaN_column
```



---
## test_with_prefix_default_category
```python
from test_from_dummies import test_with_prefix_default_category
```



---
## test_ea_categories
```python
from test_from_dummies import test_ea_categories
```



---
## test_ea_categories_with_sep
```python
from test_from_dummies import test_ea_categories_with_sep
```



---
## test_maintain_original_index
```python
from test_from_dummies import test_maintain_original_index
```



---
## __name__
```python
from test_crosstab import __name__
```



---
## df
```python
from test_crosstab import df
```



---
## TestCrosstab
```python
from test_crosstab import TestCrosstab
```



---
## test_categoricals
```python
from test_crosstab import test_categoricals
```



---
## test_crosstab_single
```python
from test_crosstab import test_crosstab_single
```



---
## test_crosstab_multiple
```python
from test_crosstab import test_crosstab_multiple
```



---
## test_crosstab_ndarray
```python
from test_crosstab import test_crosstab_ndarray
```



---
## test_crosstab_non_aligned
```python
from test_crosstab import test_crosstab_non_aligned
```



---
## test_crosstab_margins
```python
from test_crosstab import test_crosstab_margins
```



---
## test_crosstab_margins_set_margin_name
```python
from test_crosstab import test_crosstab_margins_set_margin_name
```



---
## test_crosstab_pass_values
```python
from test_crosstab import test_crosstab_pass_values
```



---
## test_crosstab_dropna
```python
from test_crosstab import test_crosstab_dropna
```



---
## test_crosstab_no_overlap
```python
from test_crosstab import test_crosstab_no_overlap
```



---
## test_margin_dropna
```python
from test_crosstab import test_margin_dropna
```



---
## test_margin_dropna2
```python
from test_crosstab import test_margin_dropna2
```



---
## test_margin_dropna3
```python
from test_crosstab import test_margin_dropna3
```



---
## test_margin_dropna4
```python
from test_crosstab import test_margin_dropna4
```



---
## test_margin_dropna5
```python
from test_crosstab import test_margin_dropna5
```



---
## test_margin_dropna6
```python
from test_crosstab import test_margin_dropna6
```



---
## test_crosstab_normalize
```python
from test_crosstab import test_crosstab_normalize
```



---
## test_crosstab_normalize_arrays
```python
from test_crosstab import test_crosstab_normalize_arrays
```



---
## test_crosstab_with_empties
```python
from test_crosstab import test_crosstab_with_empties
```



---
## test_crosstab_errors
```python
from test_crosstab import test_crosstab_errors
```



---
## test_crosstab_with_categorial_columns
```python
from test_crosstab import test_crosstab_with_categorial_columns
```



---
## test_crosstab_with_numpy_size
```python
from test_crosstab import test_crosstab_with_numpy_size
```



---
## test_crosstab_duplicate_names
```python
from test_crosstab import test_crosstab_duplicate_names
```



---
## test_crosstab_tuple_name
```python
from test_crosstab import test_crosstab_tuple_name
```



---
## test_crosstab_both_tuple_names
```python
from test_crosstab import test_crosstab_both_tuple_names
```



---
## test_crosstab_unsorted_order
```python
from test_crosstab import test_crosstab_unsorted_order
```



---
## test_crosstab_normalize_multiple_columns
```python
from test_crosstab import test_crosstab_normalize_multiple_columns
```



---
## test_margin_normalize
```python
from test_crosstab import test_margin_normalize
```



---
## test_margin_normalize_multiple_columns
```python
from test_crosstab import test_margin_normalize_multiple_columns
```



---
## test_margin_support_Float
```python
from test_crosstab import test_margin_support_Float
```



---
## test_margin_with_ordered_categorical_column
```python
from test_crosstab import test_margin_with_ordered_categorical_column
```



---
## __name__
```python
from test_invalid_arg import __name__
```



---
## test_result_type_error
```python
from test_invalid_arg import test_result_type_error
```



---
## test_apply_invalid_axis_value
```python
from test_invalid_arg import test_apply_invalid_axis_value
```



---
## test_agg_raises
```python
from test_invalid_arg import test_agg_raises
```



---
## test_map_with_invalid_na_action_raises
```python
from test_invalid_arg import test_map_with_invalid_na_action_raises
```



---
## test_map_arg_is_dict_with_invalid_na_action_raises
```python
from test_invalid_arg import test_map_arg_is_dict_with_invalid_na_action_raises
```



---
## test_nested_renamer
```python
from test_invalid_arg import test_nested_renamer
```



---
## test_series_nested_renamer
```python
from test_invalid_arg import test_series_nested_renamer
```



---
## test_apply_dict_depr
```python
from test_invalid_arg import test_apply_dict_depr
```



---
## test_dict_nested_renaming_depr
```python
from test_invalid_arg import test_dict_nested_renaming_depr
```



---
## test_missing_column
```python
from test_invalid_arg import test_missing_column
```



---
## test_transform_mixed_column_name_dtypes
```python
from test_invalid_arg import test_transform_mixed_column_name_dtypes
```



---
## test_apply_str_axis_1_raises
```python
from test_invalid_arg import test_apply_str_axis_1_raises
```



---
## test_transform_axis_1_raises
```python
from test_invalid_arg import test_transform_axis_1_raises
```



---
## test_apply_modify_traceback
```python
from test_invalid_arg import test_apply_modify_traceback
```



---
## test_agg_cython_table_raises_frame
```python
from test_invalid_arg import test_agg_cython_table_raises_frame
```



---
## test_agg_cython_table_raises_series
```python
from test_invalid_arg import test_agg_cython_table_raises_series
```



---
## test_agg_none_to_type
```python
from test_invalid_arg import test_agg_none_to_type
```



---
## test_transform_none_to_type
```python
from test_invalid_arg import test_transform_none_to_type
```



---
## test_apply_broadcast_error
```python
from test_invalid_arg import test_apply_broadcast_error
```



---
## test_transform_and_agg_err_agg
```python
from test_invalid_arg import test_transform_and_agg_err_agg
```



---
## test_transform_and_agg_err_series
```python
from test_invalid_arg import test_transform_and_agg_err_series
```



---
## test_transform_wont_agg_frame
```python
from test_invalid_arg import test_transform_wont_agg_frame
```



---
## test_transform_wont_agg_series
```python
from test_invalid_arg import test_transform_wont_agg_series
```



---
## test_transform_reducer_raises
```python
from test_invalid_arg import test_transform_reducer_raises
```



---
## transform
```python
from test_invalid_arg import transform
```



---
## __name__
```python
from test_series_transform import __name__
```



---
## test_agg_args
```python
from test_series_transform import test_agg_args
```



---
## test_transform_listlike
```python
from test_series_transform import test_transform_listlike
```



---
## test_transform_listlike_func_with_args
```python
from test_series_transform import test_transform_listlike_func_with_args
```



---
## test_transform_dictlike
```python
from test_series_transform import test_transform_dictlike
```



---
## test_transform_dictlike_mixed
```python
from test_series_transform import test_transform_dictlike_mixed
```



---
## f
```python
from test_series_transform import f
```



---
## foo1
```python
from test_series_transform import foo1
```



---
## foo2
```python
from test_series_transform import foo2
```



---
## __name__
```python
from test_str import __name__
```



---
## test_apply_with_string_funcs
```python
from test_str import test_apply_with_string_funcs
```



---
## test_with_string_args
```python
from test_str import test_with_string_args
```



---
## test_apply_np_reducer
```python
from test_str import test_apply_np_reducer
```



---
## test_apply_np_transformer
```python
from test_str import test_apply_np_transformer
```



---
## test_agg_cython_table_series
```python
from test_str import test_agg_cython_table_series
```



---
## test_agg_cython_table_transform_series
```python
from test_str import test_agg_cython_table_transform_series
```



---
## test_agg_cython_table_frame
```python
from test_str import test_agg_cython_table_frame
```



---
## test_agg_cython_table_transform_frame
```python
from test_str import test_agg_cython_table_transform_frame
```



---
## test_transform_groupby_kernel_series
```python
from test_str import test_transform_groupby_kernel_series
```



---
## test_transform_groupby_kernel_frame
```python
from test_str import test_transform_groupby_kernel_frame
```



---
## test_transform_method_name
```python
from test_str import test_transform_method_name
```



---
## __name__
```python
from test_series_apply import __name__
```



---
## by_row
```python
from test_series_apply import by_row
```



---
## test_series_map_box_timedelta
```python
from test_series_apply import test_series_map_box_timedelta
```



---
## test_apply
```python
from test_series_apply import test_apply
```



---
## test_apply_map_same_length_inference_bug
```python
from test_series_apply import test_apply_map_same_length_inference_bug
```



---
## test_apply_convert_dtype_deprecated
```python
from test_series_apply import test_apply_convert_dtype_deprecated
```



---
## test_apply_args
```python
from test_series_apply import test_apply_args
```



---
## test_agg_args
```python
from test_series_apply import test_agg_args
```



---
## test_agg_mapping_func_deprecated
```python
from test_series_apply import test_agg_mapping_func_deprecated
```



---
## test_series_apply_map_box_timestamps
```python
from test_series_apply import test_series_apply_map_box_timestamps
```



---
## test_apply_box_dt64
```python
from test_series_apply import test_apply_box_dt64
```



---
## test_apply_box_dt64tz
```python
from test_series_apply import test_apply_box_dt64tz
```



---
## test_apply_box_td64
```python
from test_series_apply import test_apply_box_td64
```



---
## test_apply_box_period
```python
from test_series_apply import test_apply_box_period
```



---
## test_apply_datetimetz
```python
from test_series_apply import test_apply_datetimetz
```



---
## test_apply_categorical
```python
from test_series_apply import test_apply_categorical
```



---
## test_apply_categorical_with_nan_values
```python
from test_series_apply import test_apply_categorical_with_nan_values
```



---
## test_apply_empty_integer_series_with_datetime_index
```python
from test_series_apply import test_apply_empty_integer_series_with_datetime_index
```



---
## test_apply_dataframe_iloc
```python
from test_series_apply import test_apply_dataframe_iloc
```



---
## test_transform
```python
from test_series_apply import test_transform
```



---
## test_transform_partial_failure
```python
from test_series_apply import test_transform_partial_failure
```



---
## test_transform_partial_failure_valueerror
```python
from test_series_apply import test_transform_partial_failure_valueerror
```



---
## test_demo
```python
from test_series_apply import test_demo
```



---
## test_apply_map_evaluate_lambdas_the_same
```python
from test_series_apply import test_apply_map_evaluate_lambdas_the_same
```



---
## test_agg_evaluate_lambdas
```python
from test_series_apply import test_agg_evaluate_lambdas
```



---
## test_with_nested_series
```python
from test_series_apply import test_with_nested_series
```



---
## test_replicate_describe
```python
from test_series_apply import test_replicate_describe
```



---
## test_reduce
```python
from test_series_apply import test_reduce
```



---
## test_non_callable_aggregates
```python
from test_series_apply import test_non_callable_aggregates
```



---
## test_series_apply_no_suffix_index
```python
from test_series_apply import test_series_apply_no_suffix_index
```



---
## test_apply_series_on_date_time_index_aware_series
```python
from test_series_apply import test_apply_series_on_date_time_index_aware_series
```



---
## test_apply_scalar_on_date_time_index_aware_series
```python
from test_series_apply import test_apply_scalar_on_date_time_index_aware_series
```



---
## test_apply_to_timedelta
```python
from test_series_apply import test_apply_to_timedelta
```



---
## test_apply_listlike_reducer
```python
from test_series_apply import test_apply_listlike_reducer
```



---
## test_apply_dictlike_reducer
```python
from test_series_apply import test_apply_dictlike_reducer
```



---
## test_apply_listlike_transformer
```python
from test_series_apply import test_apply_listlike_transformer
```



---
## test_apply_listlike_lambda
```python
from test_series_apply import test_apply_listlike_lambda
```



---
## test_apply_dictlike_transformer
```python
from test_series_apply import test_apply_dictlike_transformer
```



---
## test_apply_dictlike_lambda
```python
from test_series_apply import test_apply_dictlike_lambda
```



---
## test_apply_retains_column_name
```python
from test_series_apply import test_apply_retains_column_name
```



---
## test_apply_type
```python
from test_series_apply import test_apply_type
```



---
## test_series_apply_unpack_nested_data
```python
from test_series_apply import test_series_apply_unpack_nested_data
```



---
## f
```python
from test_series_apply import f
```



---
## func
```python
from test_series_apply import func
```



---
## foo1
```python
from test_series_apply import foo1
```



---
## foo2
```python
from test_series_apply import foo2
```



---
## retrieve
```python
from test_series_apply import retrieve
```



---
## noop
```python
from test_series_apply import noop
```



---
## raising_op
```python
from test_series_apply import raising_op
```



---
## __name__
```python
from test_series_apply_relabeling import __name__
```



---
## test_relabel_no_duplicated_method
```python
from test_series_apply_relabeling import test_relabel_no_duplicated_method
```



---
## test_relabel_duplicated_method
```python
from test_series_apply_relabeling import test_relabel_duplicated_method
```



---
## __name__
```python
from test_frame_apply import __name__
```



---
## int_frame_const_col
```python
from test_frame_apply import int_frame_const_col
```

Fixture for DataFrame of ints which are constant per column

Columns are ['A', 'B', 'C'], with values (per column): [1, 2, 3]

---
## engine
```python
from test_frame_apply import engine
```



---
## test_apply
```python
from test_frame_apply import test_apply
```



---
## test_apply_args
```python
from test_frame_apply import test_apply_args
```



---
## test_apply_categorical_func
```python
from test_frame_apply import test_apply_categorical_func
```



---
## test_apply_axis1_with_ea
```python
from test_frame_apply import test_apply_axis1_with_ea
```



---
## test_agg_axis1_duplicate_index
```python
from test_frame_apply import test_agg_axis1_duplicate_index
```



---
## test_apply_mixed_datetimelike
```python
from test_frame_apply import test_apply_mixed_datetimelike
```



---
## test_apply_empty
```python
from test_frame_apply import test_apply_empty
```



---
## test_apply_float_frame
```python
from test_frame_apply import test_apply_float_frame
```



---
## test_apply_empty_except_index
```python
from test_frame_apply import test_apply_empty_except_index
```



---
## test_apply_with_reduce_empty
```python
from test_frame_apply import test_apply_with_reduce_empty
```



---
## test_apply_funcs_over_empty
```python
from test_frame_apply import test_apply_funcs_over_empty
```



---
## test_nunique_empty
```python
from test_frame_apply import test_nunique_empty
```



---
## test_apply_standard_nonunique
```python
from test_frame_apply import test_apply_standard_nonunique
```



---
## test_apply_broadcast_scalars
```python
from test_frame_apply import test_apply_broadcast_scalars
```



---
## test_apply_broadcast_scalars_axis1
```python
from test_frame_apply import test_apply_broadcast_scalars_axis1
```



---
## test_apply_broadcast_lists_columns
```python
from test_frame_apply import test_apply_broadcast_lists_columns
```



---
## test_apply_broadcast_lists_index
```python
from test_frame_apply import test_apply_broadcast_lists_index
```



---
## test_apply_broadcast_list_lambda_func
```python
from test_frame_apply import test_apply_broadcast_list_lambda_func
```



---
## test_apply_broadcast_series_lambda_func
```python
from test_frame_apply import test_apply_broadcast_series_lambda_func
```



---
## test_apply_raw_float_frame
```python
from test_frame_apply import test_apply_raw_float_frame
```



---
## test_apply_raw_float_frame_lambda
```python
from test_frame_apply import test_apply_raw_float_frame_lambda
```



---
## test_apply_raw_float_frame_no_reduction
```python
from test_frame_apply import test_apply_raw_float_frame_no_reduction
```



---
## test_apply_raw_mixed_type_frame
```python
from test_frame_apply import test_apply_raw_mixed_type_frame
```



---
## test_apply_axis1
```python
from test_frame_apply import test_apply_axis1
```



---
## test_apply_mixed_dtype_corner
```python
from test_frame_apply import test_apply_mixed_dtype_corner
```



---
## test_apply_mixed_dtype_corner_indexing
```python
from test_frame_apply import test_apply_mixed_dtype_corner_indexing
```



---
## test_apply_empty_infer_type
```python
from test_frame_apply import test_apply_empty_infer_type
```



---
## test_apply_empty_infer_type_broadcast
```python
from test_frame_apply import test_apply_empty_infer_type_broadcast
```



---
## test_apply_with_args_kwds_add_some
```python
from test_frame_apply import test_apply_with_args_kwds_add_some
```



---
## test_apply_with_args_kwds_agg_and_add
```python
from test_frame_apply import test_apply_with_args_kwds_agg_and_add
```



---
## test_apply_with_args_kwds_subtract_and_divide
```python
from test_frame_apply import test_apply_with_args_kwds_subtract_and_divide
```



---
## test_apply_yield_list
```python
from test_frame_apply import test_apply_yield_list
```



---
## test_apply_reduce_Series
```python
from test_frame_apply import test_apply_reduce_Series
```



---
## test_apply_reduce_to_dict
```python
from test_frame_apply import test_apply_reduce_to_dict
```



---
## test_apply_differently_indexed
```python
from test_frame_apply import test_apply_differently_indexed
```



---
## test_apply_bug
```python
from test_frame_apply import test_apply_bug
```



---
## test_apply_convert_objects
```python
from test_frame_apply import test_apply_convert_objects
```



---
## test_apply_attach_name
```python
from test_frame_apply import test_apply_attach_name
```



---
## test_apply_attach_name_axis1
```python
from test_frame_apply import test_apply_attach_name_axis1
```



---
## test_apply_attach_name_non_reduction
```python
from test_frame_apply import test_apply_attach_name_non_reduction
```



---
## test_apply_attach_name_non_reduction_axis1
```python
from test_frame_apply import test_apply_attach_name_non_reduction_axis1
```



---
## test_apply_multi_index
```python
from test_frame_apply import test_apply_multi_index
```



---
## test_apply_dict
```python
from test_frame_apply import test_apply_dict
```



---
## test_apply_non_numpy_dtype
```python
from test_frame_apply import test_apply_non_numpy_dtype
```



---
## test_apply_non_numpy_dtype_category
```python
from test_frame_apply import test_apply_non_numpy_dtype_category
```



---
## test_apply_dup_names_multi_agg
```python
from test_frame_apply import test_apply_dup_names_multi_agg
```



---
## test_apply_nested_result_axis_1
```python
from test_frame_apply import test_apply_nested_result_axis_1
```



---
## test_apply_noreduction_tzaware_object
```python
from test_frame_apply import test_apply_noreduction_tzaware_object
```



---
## test_apply_function_runs_once
```python
from test_frame_apply import test_apply_function_runs_once
```



---
## test_apply_raw_function_runs_once
```python
from test_frame_apply import test_apply_raw_function_runs_once
```



---
## test_apply_with_byte_string
```python
from test_frame_apply import test_apply_with_byte_string
```



---
## test_apply_category_equalness
```python
from test_frame_apply import test_apply_category_equalness
```



---
## test_infer_row_shape
```python
from test_frame_apply import test_infer_row_shape
```



---
## test_dictlike_lambda
```python
from test_frame_apply import test_dictlike_lambda
```



---
## test_dictlike_lambda_raises
```python
from test_frame_apply import test_dictlike_lambda_raises
```



---
## test_with_dictlike_columns
```python
from test_frame_apply import test_with_dictlike_columns
```



---
## test_with_dictlike_columns_with_datetime
```python
from test_frame_apply import test_with_dictlike_columns_with_datetime
```



---
## test_with_dictlike_columns_with_infer
```python
from test_frame_apply import test_with_dictlike_columns_with_infer
```



---
## test_listlike_lambda
```python
from test_frame_apply import test_listlike_lambda
```



---
## test_listlike_lambda_raises
```python
from test_frame_apply import test_listlike_lambda_raises
```



---
## test_with_listlike_columns
```python
from test_frame_apply import test_with_listlike_columns
```



---
## test_with_listlike_columns_returning_list
```python
from test_frame_apply import test_with_listlike_columns_returning_list
```



---
## test_infer_output_shape_columns
```python
from test_frame_apply import test_infer_output_shape_columns
```



---
## test_infer_output_shape_listlike_columns
```python
from test_frame_apply import test_infer_output_shape_listlike_columns
```



---
## test_infer_output_shape_listlike_columns_np_func
```python
from test_frame_apply import test_infer_output_shape_listlike_columns_np_func
```



---
## test_infer_output_shape_listlike_columns_with_timestamp
```python
from test_frame_apply import test_infer_output_shape_listlike_columns_with_timestamp
```



---
## test_consistent_coerce_for_shapes
```python
from test_frame_apply import test_consistent_coerce_for_shapes
```



---
## test_consistent_names
```python
from test_frame_apply import test_consistent_names
```



---
## test_result_type
```python
from test_frame_apply import test_result_type
```



---
## test_result_type_shorter_list
```python
from test_frame_apply import test_result_type_shorter_list
```



---
## test_result_type_broadcast
```python
from test_frame_apply import test_result_type_broadcast
```



---
## test_result_type_broadcast_series_func
```python
from test_frame_apply import test_result_type_broadcast_series_func
```



---
## test_result_type_series_result
```python
from test_frame_apply import test_result_type_series_result
```



---
## test_result_type_series_result_other_index
```python
from test_frame_apply import test_result_type_series_result_other_index
```



---
## test_consistency_for_boxed
```python
from test_frame_apply import test_consistency_for_boxed
```



---
## test_agg_transform
```python
from test_frame_apply import test_agg_transform
```



---
## test_demo
```python
from test_frame_apply import test_demo
```



---
## test_demo_dict_agg
```python
from test_frame_apply import test_demo_dict_agg
```



---
## test_agg_with_name_as_column_name
```python
from test_frame_apply import test_agg_with_name_as_column_name
```



---
## test_agg_multiple_mixed
```python
from test_frame_apply import test_agg_multiple_mixed
```



---
## test_agg_multiple_mixed_raises
```python
from test_frame_apply import test_agg_multiple_mixed_raises
```



---
## test_agg_reduce
```python
from test_frame_apply import test_agg_reduce
```



---
## test_nuiscance_columns
```python
from test_frame_apply import test_nuiscance_columns
```



---
## test_non_callable_aggregates
```python
from test_frame_apply import test_non_callable_aggregates
```



---
## test_size_as_str
```python
from test_frame_apply import test_size_as_str
```



---
## test_agg_listlike_result
```python
from test_frame_apply import test_agg_listlike_result
```



---
## test_agg_args_kwargs
```python
from test_frame_apply import test_agg_args_kwargs
```



---
## test_frequency_is_original
```python
from test_frame_apply import test_frequency_is_original
```



---
## test_apply_datetime_tz_issue
```python
from test_frame_apply import test_apply_datetime_tz_issue
```



---
## test_mixed_column_raises
```python
from test_frame_apply import test_mixed_column_raises
```



---
## test_apply_dtype
```python
from test_frame_apply import test_apply_dtype
```



---
## test_apply_mutating
```python
from test_frame_apply import test_apply_mutating
```



---
## test_apply_empty_list_reduce
```python
from test_frame_apply import test_apply_empty_list_reduce
```



---
## test_apply_no_suffix_index
```python
from test_frame_apply import test_apply_no_suffix_index
```



---
## test_apply_raw_returns_string
```python
from test_frame_apply import test_apply_raw_returns_string
```



---
## test_aggregation_func_column_order
```python
from test_frame_apply import test_aggregation_func_column_order
```



---
## test_apply_getitem_axis_1
```python
from test_frame_apply import test_apply_getitem_axis_1
```



---
## test_nuisance_depr_passes_through_warnings
```python
from test_frame_apply import test_nuisance_depr_passes_through_warnings
```



---
## test_apply_type
```python
from test_frame_apply import test_apply_type
```



---
## test_apply_on_empty_dataframe
```python
from test_frame_apply import test_apply_on_empty_dataframe
```



---
## test_apply_return_list
```python
from test_frame_apply import test_apply_return_list
```



---
## test_unique_agg_type_is_series
```python
from test_frame_apply import test_unique_agg_type_is_series
```



---
## test_any_apply_keyword_non_zero_axis_regression
```python
from test_frame_apply import test_any_apply_keyword_non_zero_axis_regression
```



---
## test_agg_mapping_func_deprecated
```python
from test_frame_apply import test_agg_mapping_func_deprecated
```



---
## test_agg_std
```python
from test_frame_apply import test_agg_std
```



---
## test_agg_dist_like_and_nonunique_columns
```python
from test_frame_apply import test_agg_dist_like_and_nonunique_columns
```



---
## _assert_raw
```python
from test_frame_apply import _assert_raw
```



---
## add_some
```python
from test_frame_apply import add_some
```



---
## agg_and_add
```python
from test_frame_apply import agg_and_add
```



---
## subtract_and_divide
```python
from test_frame_apply import subtract_and_divide
```



---
## f
```python
from test_frame_apply import f
```



---
## apply_list
```python
from test_frame_apply import apply_list
```



---
## reducing_function
```python
from test_frame_apply import reducing_function
```



---
## non_reducing_function
```python
from test_frame_apply import non_reducing_function
```



---
## fun
```python
from test_frame_apply import fun
```



---
## func
```python
from test_frame_apply import func
```



---
## sum_div2
```python
from test_frame_apply import sum_div2
```



---
## expected_warning
```python
from test_frame_apply import expected_warning
```



---
## foo1
```python
from test_frame_apply import foo1
```



---
## foo2
```python
from test_frame_apply import foo2
```



---
## __name__
```python
from test_frame_apply_relabeling import __name__
```



---
## test_agg_relabel
```python
from test_frame_apply_relabeling import test_agg_relabel
```



---
## test_agg_relabel_multi_columns_multi_methods
```python
from test_frame_apply_relabeling import test_agg_relabel_multi_columns_multi_methods
```



---
## test_agg_relabel_partial_functions
```python
from test_frame_apply_relabeling import test_agg_relabel_partial_functions
```



---
## test_agg_namedtuple
```python
from test_frame_apply_relabeling import test_agg_namedtuple
```



---
## test_reconstruct_func
```python
from test_frame_apply_relabeling import test_reconstruct_func
```



---
## __name__
```python
from test_numba import __name__
```



---
## apply_axis
```python
from test_numba import apply_axis
```



---
## test_numba_vs_python_noop
```python
from test_numba import test_numba_vs_python_noop
```



---
## test_numba_vs_python_string_index
```python
from test_numba import test_numba_vs_python_string_index
```



---
## test_numba_vs_python_indexing
```python
from test_numba import test_numba_vs_python_indexing
```



---
## test_numba_vs_python_reductions
```python
from test_numba import test_numba_vs_python_reductions
```



---
## test_numba_numeric_colnames
```python
from test_numba import test_numba_numeric_colnames
```



---
## test_numba_parallel_unsupported
```python
from test_numba import test_numba_parallel_unsupported
```



---
## test_numba_nonunique_unsupported
```python
from test_numba import test_numba_nonunique_unsupported
```



---
## test_numba_unsupported_dtypes
```python
from test_numba import test_numba_unsupported_dtypes
```



---
## __name__
```python
from test_frame_transform import __name__
```



---
## unpack_obj
```python
from test_frame_transform import unpack_obj
```

Helper to ensure we have the right type of object for a test parametrized
over frame_or_series.

---
## test_transform_ufunc
```python
from test_frame_transform import test_transform_ufunc
```



---
## test_transform_listlike
```python
from test_frame_transform import test_transform_listlike
```



---
## test_transform_empty_listlike
```python
from test_frame_transform import test_transform_empty_listlike
```



---
## test_transform_listlike_func_with_args
```python
from test_frame_transform import test_transform_listlike_func_with_args
```



---
## test_transform_dictlike
```python
from test_frame_transform import test_transform_dictlike
```



---
## test_transform_dictlike_mixed
```python
from test_frame_transform import test_transform_dictlike_mixed
```



---
## test_transform_empty_dictlike
```python
from test_frame_transform import test_transform_empty_dictlike
```



---
## test_transform_udf
```python
from test_frame_transform import test_transform_udf
```



---
## test_transform_bad_dtype
```python
from test_frame_transform import test_transform_bad_dtype
```



---
## test_transform_failure_typeerror
```python
from test_frame_transform import test_transform_failure_typeerror
```



---
## test_transform_failure_valueerror
```python
from test_frame_transform import test_transform_failure_valueerror
```



---
## test_transform_passes_args
```python
from test_frame_transform import test_transform_passes_args
```



---
## test_transform_empty_dataframe
```python
from test_frame_transform import test_transform_empty_dataframe
```



---
## foo1
```python
from test_frame_transform import foo1
```



---
## foo2
```python
from test_frame_transform import foo2
```



---
## func
```python
from test_frame_transform import func
```



---
## op
```python
from test_frame_transform import op
```



---
## f
```python
from test_frame_transform import f
```



---
## __name__
```python
from test_cat import __name__
```



---
## test_str_cat_name
```python
from test_cat import test_str_cat_name
```



---
## test_str_cat
```python
from test_cat import test_str_cat
```



---
## test_str_cat_raises_intuitive_error
```python
from test_cat import test_str_cat_raises_intuitive_error
```



---
## test_str_cat_categorical
```python
from test_cat import test_str_cat_categorical
```



---
## test_str_cat_wrong_dtype_raises
```python
from test_cat import test_str_cat_wrong_dtype_raises
```



---
## test_str_cat_mixed_inputs
```python
from test_cat import test_str_cat_mixed_inputs
```



---
## test_str_cat_align_indexed
```python
from test_cat import test_str_cat_align_indexed
```



---
## test_str_cat_align_mixed_inputs
```python
from test_cat import test_str_cat_align_mixed_inputs
```



---
## test_str_cat_all_na
```python
from test_cat import test_str_cat_all_na
```



---
## test_str_cat_special_cases
```python
from test_cat import test_str_cat_special_cases
```



---
## test_cat_on_filtered_index
```python
from test_cat import test_cat_on_filtered_index
```



---
## test_cat_different_classes
```python
from test_cat import test_cat_different_classes
```



---
## test_cat_on_series_dot_str
```python
from test_cat import test_cat_on_series_dot_str
```



---
## __name__
```python
from test_string_array import __name__
```



---
## test_string_array
```python
from test_string_array import test_string_array
```



---
## test_string_array_numeric_integer_array
```python
from test_string_array import test_string_array_numeric_integer_array
```



---
## test_string_array_boolean_array
```python
from test_string_array import test_string_array_boolean_array
```



---
## test_string_array_extract
```python
from test_string_array import test_string_array_extract
```



---
## __name__
```python
from test_split_partition import __name__
```



---
## test_split
```python
from test_split_partition import test_split
```



---
## test_split_more_than_one_char
```python
from test_split_partition import test_split_more_than_one_char
```



---
## test_split_more_regex_split
```python
from test_split_partition import test_split_more_regex_split
```



---
## test_split_regex
```python
from test_split_partition import test_split_regex
```



---
## test_split_regex_explicit
```python
from test_split_partition import test_split_regex_explicit
```



---
## test_split_object_mixed
```python
from test_split_partition import test_split_object_mixed
```



---
## test_split_n
```python
from test_split_partition import test_split_n
```



---
## test_rsplit
```python
from test_split_partition import test_rsplit
```



---
## test_rsplit_max_number
```python
from test_split_partition import test_rsplit_max_number
```



---
## test_split_blank_string
```python
from test_split_partition import test_split_blank_string
```



---
## test_split_blank_string_with_non_empty
```python
from test_split_partition import test_split_blank_string_with_non_empty
```



---
## test_split_noargs
```python
from test_split_partition import test_split_noargs
```



---
## test_split_maxsplit
```python
from test_split_partition import test_split_maxsplit
```



---
## test_split_no_pat_with_nonzero_n
```python
from test_split_partition import test_split_no_pat_with_nonzero_n
```



---
## test_split_to_dataframe_no_splits
```python
from test_split_partition import test_split_to_dataframe_no_splits
```



---
## test_split_to_dataframe
```python
from test_split_partition import test_split_to_dataframe
```



---
## test_split_to_dataframe_unequal_splits
```python
from test_split_partition import test_split_to_dataframe_unequal_splits
```



---
## test_split_to_dataframe_with_index
```python
from test_split_partition import test_split_to_dataframe_with_index
```



---
## test_split_to_multiindex_expand_no_splits
```python
from test_split_partition import test_split_to_multiindex_expand_no_splits
```



---
## test_split_to_multiindex_expand
```python
from test_split_partition import test_split_to_multiindex_expand
```



---
## test_split_to_multiindex_expand_unequal_splits
```python
from test_split_partition import test_split_to_multiindex_expand_unequal_splits
```



---
## test_rsplit_to_dataframe_expand_no_splits
```python
from test_split_partition import test_rsplit_to_dataframe_expand_no_splits
```



---
## test_rsplit_to_dataframe_expand
```python
from test_split_partition import test_rsplit_to_dataframe_expand
```



---
## test_rsplit_to_dataframe_expand_with_index
```python
from test_split_partition import test_rsplit_to_dataframe_expand_with_index
```



---
## test_rsplit_to_multiindex_expand_no_split
```python
from test_split_partition import test_rsplit_to_multiindex_expand_no_split
```



---
## test_rsplit_to_multiindex_expand
```python
from test_split_partition import test_rsplit_to_multiindex_expand
```



---
## test_rsplit_to_multiindex_expand_n
```python
from test_split_partition import test_rsplit_to_multiindex_expand_n
```



---
## test_split_nan_expand
```python
from test_split_partition import test_split_nan_expand
```



---
## test_split_with_name_series
```python
from test_split_partition import test_split_with_name_series
```



---
## test_split_with_name_index
```python
from test_split_partition import test_split_with_name_index
```



---
## test_partition_series_more_than_one_char
```python
from test_split_partition import test_partition_series_more_than_one_char
```



---
## test_partition_series_none
```python
from test_split_partition import test_partition_series_none
```



---
## test_partition_series_not_split
```python
from test_split_partition import test_partition_series_not_split
```



---
## test_partition_series_unicode
```python
from test_split_partition import test_partition_series_unicode
```



---
## test_partition_series_stdlib
```python
from test_split_partition import test_partition_series_stdlib
```



---
## test_partition_index
```python
from test_split_partition import test_partition_index
```



---
## test_partition_to_dataframe
```python
from test_split_partition import test_partition_to_dataframe
```



---
## test_partition_to_dataframe_from_series
```python
from test_split_partition import test_partition_to_dataframe_from_series
```



---
## test_partition_with_name
```python
from test_split_partition import test_partition_with_name
```



---
## test_partition_with_name_expand
```python
from test_split_partition import test_partition_with_name_expand
```



---
## test_partition_index_with_name
```python
from test_split_partition import test_partition_index_with_name
```



---
## test_partition_index_with_name_expand_false
```python
from test_split_partition import test_partition_index_with_name_expand_false
```



---
## test_partition_sep_kwarg
```python
from test_split_partition import test_partition_sep_kwarg
```



---
## test_get
```python
from test_split_partition import test_get
```



---
## test_get_mixed_object
```python
from test_split_partition import test_get_mixed_object
```



---
## test_get_bounds
```python
from test_split_partition import test_get_bounds
```



---
## test_get_complex
```python
from test_split_partition import test_get_complex
```



---
## test_get_complex_nested
```python
from test_split_partition import test_get_complex_nested
```



---
## test_get_strings
```python
from test_split_partition import test_get_strings
```



---
## any_string_method
```python
from conftest import any_string_method
```

Fixture for all public methods of `StringMethods`

This fixture returns a tuple of the method name and sample arguments
necessary to call the method.

Returns
-------
method_name : str
    The name of the method in `StringMethods`
args : tuple
    Sample values for the positional arguments
kwargs : dict
    Sample values for the keyword arguments

Examples
--------
>>> def test_something(any_string_method):
...     s = Series(['a', 'b', np.nan, 'd'])
...
...     method_name, args, kwargs = any_string_method
...     method = getattr(s.str, method_name)
...     # will not raise
...     method(*args, **kwargs)

---
## test_get_dummies
```python
from test_get_dummies import test_get_dummies
```



---
## test_get_dummies_index
```python
from test_get_dummies import test_get_dummies_index
```



---
## test_get_dummies_with_name_dummy
```python
from test_get_dummies import test_get_dummies_with_name_dummy
```



---
## test_get_dummies_with_name_dummy_index
```python
from test_get_dummies import test_get_dummies_with_name_dummy_index
```



---
## __name__
```python
from test_find_replace import __name__
```



---
## using_pyarrow
```python
from test_find_replace import using_pyarrow
```



---
## test_contains
```python
from test_find_replace import test_contains
```



---
## test_contains_object_mixed
```python
from test_find_replace import test_contains_object_mixed
```



---
## test_contains_na_kwarg_for_object_category
```python
from test_find_replace import test_contains_na_kwarg_for_object_category
```



---
## test_contains_na_kwarg_for_nullable_string_dtype
```python
from test_find_replace import test_contains_na_kwarg_for_nullable_string_dtype
```



---
## test_contains_moar
```python
from test_find_replace import test_contains_moar
```



---
## test_contains_nan
```python
from test_find_replace import test_contains_nan
```



---
## test_startswith
```python
from test_find_replace import test_startswith
```



---
## test_startswith_nullable_string_dtype
```python
from test_find_replace import test_startswith_nullable_string_dtype
```



---
## test_endswith
```python
from test_find_replace import test_endswith
```



---
## test_endswith_nullable_string_dtype
```python
from test_find_replace import test_endswith_nullable_string_dtype
```



---
## test_replace
```python
from test_find_replace import test_replace
```



---
## test_replace_max_replacements
```python
from test_find_replace import test_replace_max_replacements
```



---
## test_replace_mixed_object
```python
from test_find_replace import test_replace_mixed_object
```



---
## test_replace_unicode
```python
from test_find_replace import test_replace_unicode
```



---
## test_replace_wrong_repl_type_raises
```python
from test_find_replace import test_replace_wrong_repl_type_raises
```



---
## test_replace_callable
```python
from test_find_replace import test_replace_callable
```



---
## test_replace_callable_raises
```python
from test_find_replace import test_replace_callable_raises
```



---
## test_replace_callable_named_groups
```python
from test_find_replace import test_replace_callable_named_groups
```



---
## test_replace_compiled_regex
```python
from test_find_replace import test_replace_compiled_regex
```



---
## test_replace_compiled_regex_mixed_object
```python
from test_find_replace import test_replace_compiled_regex_mixed_object
```



---
## test_replace_compiled_regex_unicode
```python
from test_find_replace import test_replace_compiled_regex_unicode
```



---
## test_replace_compiled_regex_raises
```python
from test_find_replace import test_replace_compiled_regex_raises
```



---
## test_replace_compiled_regex_callable
```python
from test_find_replace import test_replace_compiled_regex_callable
```



---
## test_replace_literal
```python
from test_find_replace import test_replace_literal
```



---
## test_replace_literal_callable_raises
```python
from test_find_replace import test_replace_literal_callable_raises
```



---
## test_replace_literal_compiled_raises
```python
from test_find_replace import test_replace_literal_compiled_raises
```



---
## test_replace_moar
```python
from test_find_replace import test_replace_moar
```



---
## test_replace_not_case_sensitive_not_regex
```python
from test_find_replace import test_replace_not_case_sensitive_not_regex
```



---
## test_replace_regex
```python
from test_find_replace import test_replace_regex
```



---
## test_replace_regex_single_character
```python
from test_find_replace import test_replace_regex_single_character
```



---
## test_match
```python
from test_find_replace import test_match
```



---
## test_match_mixed_object
```python
from test_find_replace import test_match_mixed_object
```



---
## test_match_na_kwarg
```python
from test_find_replace import test_match_na_kwarg
```



---
## test_match_case_kwarg
```python
from test_find_replace import test_match_case_kwarg
```



---
## test_fullmatch
```python
from test_find_replace import test_fullmatch
```



---
## test_fullmatch_dollar_literal
```python
from test_find_replace import test_fullmatch_dollar_literal
```



---
## test_fullmatch_na_kwarg
```python
from test_find_replace import test_fullmatch_na_kwarg
```



---
## test_fullmatch_case_kwarg
```python
from test_find_replace import test_fullmatch_case_kwarg
```



---
## test_findall
```python
from test_find_replace import test_findall
```



---
## test_findall_mixed_object
```python
from test_find_replace import test_findall_mixed_object
```



---
## test_find
```python
from test_find_replace import test_find
```



---
## test_find_bad_arg_raises
```python
from test_find_replace import test_find_bad_arg_raises
```



---
## test_find_nan
```python
from test_find_replace import test_find_nan
```



---
## test_translate
```python
from test_find_replace import test_translate
```



---
## test_translate_mixed_object
```python
from test_find_replace import test_translate_mixed_object
```



---
## test_flags_kwarg
```python
from test_find_replace import test_flags_kwarg
```



---
## _convert_na_value
```python
from __init__ import _convert_na_value
```



---
## __name__
```python
from test_case_justify import __name__
```



---
## test_title
```python
from test_case_justify import test_title
```



---
## test_title_mixed_object
```python
from test_case_justify import test_title_mixed_object
```



---
## test_lower_upper
```python
from test_case_justify import test_lower_upper
```



---
## test_lower_upper_mixed_object
```python
from test_case_justify import test_lower_upper_mixed_object
```



---
## test_capitalize
```python
from test_case_justify import test_capitalize
```



---
## test_capitalize_mixed_object
```python
from test_case_justify import test_capitalize_mixed_object
```



---
## test_swapcase
```python
from test_case_justify import test_swapcase
```



---
## test_swapcase_mixed_object
```python
from test_case_justify import test_swapcase_mixed_object
```



---
## test_casefold
```python
from test_case_justify import test_casefold
```



---
## test_casemethods
```python
from test_case_justify import test_casemethods
```



---
## test_pad
```python
from test_case_justify import test_pad
```



---
## test_pad_mixed_object
```python
from test_case_justify import test_pad_mixed_object
```



---
## test_pad_fillchar
```python
from test_case_justify import test_pad_fillchar
```



---
## test_pad_fillchar_bad_arg_raises
```python
from test_case_justify import test_pad_fillchar_bad_arg_raises
```



---
## test_pad_width_bad_arg_raises
```python
from test_case_justify import test_pad_width_bad_arg_raises
```



---
## test_center_ljust_rjust
```python
from test_case_justify import test_center_ljust_rjust
```



---
## test_center_ljust_rjust_mixed_object
```python
from test_case_justify import test_center_ljust_rjust_mixed_object
```



---
## test_center_ljust_rjust_fillchar
```python
from test_case_justify import test_center_ljust_rjust_fillchar
```



---
## test_center_ljust_rjust_fillchar_bad_arg_raises
```python
from test_case_justify import test_center_ljust_rjust_fillchar_bad_arg_raises
```



---
## test_zfill
```python
from test_case_justify import test_zfill
```



---
## test_wrap
```python
from test_case_justify import test_wrap
```



---
## test_wrap_unicode
```python
from test_case_justify import test_wrap_unicode
```



---
## test_startswith_endswith_non_str_patterns
```python
from test_strings import test_startswith_endswith_non_str_patterns
```



---
## test_iter_raises
```python
from test_strings import test_iter_raises
```



---
## test_count
```python
from test_strings import test_count
```



---
## test_count_mixed_object
```python
from test_strings import test_count_mixed_object
```



---
## test_repeat
```python
from test_strings import test_repeat
```



---
## test_repeat_mixed_object
```python
from test_strings import test_repeat_mixed_object
```



---
## test_repeat_with_null
```python
from test_strings import test_repeat_with_null
```



---
## test_empty_str_methods
```python
from test_strings import test_empty_str_methods
```



---
## test_ismethods
```python
from test_strings import test_ismethods
```



---
## test_isnumeric_unicode
```python
from test_strings import test_isnumeric_unicode
```



---
## test_isnumeric_unicode_missing
```python
from test_strings import test_isnumeric_unicode_missing
```



---
## test_spilt_join_roundtrip
```python
from test_strings import test_spilt_join_roundtrip
```



---
## test_spilt_join_roundtrip_mixed_object
```python
from test_strings import test_spilt_join_roundtrip_mixed_object
```



---
## test_len
```python
from test_strings import test_len
```



---
## test_len_mixed
```python
from test_strings import test_len_mixed
```



---
## test_index
```python
from test_strings import test_index
```



---
## test_index_not_found_raises
```python
from test_strings import test_index_not_found_raises
```



---
## test_index_wrong_type_raises
```python
from test_strings import test_index_wrong_type_raises
```



---
## test_index_missing
```python
from test_strings import test_index_missing
```



---
## test_pipe_failures
```python
from test_strings import test_pipe_failures
```



---
## test_slice
```python
from test_strings import test_slice
```



---
## test_slice_mixed_object
```python
from test_strings import test_slice_mixed_object
```



---
## test_slice_replace
```python
from test_strings import test_slice_replace
```



---
## test_strip_lstrip_rstrip
```python
from test_strings import test_strip_lstrip_rstrip
```



---
## test_strip_lstrip_rstrip_mixed_object
```python
from test_strings import test_strip_lstrip_rstrip_mixed_object
```



---
## test_strip_lstrip_rstrip_args
```python
from test_strings import test_strip_lstrip_rstrip_args
```



---
## test_removeprefix
```python
from test_strings import test_removeprefix
```



---
## test_removesuffix
```python
from test_strings import test_removesuffix
```



---
## test_string_slice_get_syntax
```python
from test_strings import test_string_slice_get_syntax
```



---
## test_string_slice_out_of_bounds_nested
```python
from test_strings import test_string_slice_out_of_bounds_nested
```



---
## test_string_slice_out_of_bounds
```python
from test_strings import test_string_slice_out_of_bounds
```



---
## test_encode_decode
```python
from test_strings import test_encode_decode
```



---
## test_encode_errors_kwarg
```python
from test_strings import test_encode_errors_kwarg
```



---
## test_decode_errors_kwarg
```python
from test_strings import test_decode_errors_kwarg
```



---
## test_normalize
```python
from test_strings import test_normalize
```



---
## test_normalize_bad_arg_raises
```python
from test_strings import test_normalize_bad_arg_raises
```



---
## test_normalize_index
```python
from test_strings import test_normalize_index
```



---
## test_index_str_accessor_visibility
```python
from test_strings import test_index_str_accessor_visibility
```



---
## test_index_str_accessor_non_string_values_raises
```python
from test_strings import test_index_str_accessor_non_string_values_raises
```



---
## test_index_str_accessor_multiindex_raises
```python
from test_strings import test_index_str_accessor_multiindex_raises
```



---
## test_str_accessor_no_new_attributes
```python
from test_strings import test_str_accessor_no_new_attributes
```



---
## test_cat_on_bytes_raises
```python
from test_strings import test_cat_on_bytes_raises
```



---
## test_str_accessor_in_apply_func
```python
from test_strings import test_str_accessor_in_apply_func
```



---
## test_zfill
```python
from test_strings import test_zfill
```



---
## test_zfill_with_non_integer_argument
```python
from test_strings import test_zfill_with_non_integer_argument
```



---
## test_zfill_with_leading_sign
```python
from test_strings import test_zfill_with_leading_sign
```



---
## test_get_with_dict_label
```python
from test_strings import test_get_with_dict_label
```



---
## test_series_str_decode
```python
from test_strings import test_series_str_decode
```



---
## any_allowed_skipna_inferred_dtype
```python
from test_api import any_allowed_skipna_inferred_dtype
```

Fixture for all (inferred) dtypes allowed in StringMethods.__init__

The covered (inferred) types are:
* 'string'
* 'empty'
* 'bytes'
* 'mixed'
* 'mixed-integer'

Returns
-------
inferred_dtype : str
    The string for the inferred dtype from _libs.lib.infer_dtype
values : np.ndarray
    An array of object dtype that will be inferred to have
    `inferred_dtype`

Examples
--------
>>> from pandas._libs import lib
>>>
>>> def test_something(any_allowed_skipna_inferred_dtype):
...     inferred_dtype, values = any_allowed_skipna_inferred_dtype
...     # will pass
...     assert lib.infer_dtype(values, skipna=True) == inferred_dtype
...
...     # constructor for .str-accessor will also pass
...     Series(values).str

---
## test_api
```python
from test_api import test_api
```



---
## test_api_mi_raises
```python
from test_api import test_api_mi_raises
```



---
## test_api_per_dtype
```python
from test_api import test_api_per_dtype
```



---
## test_api_per_method
```python
from test_api import test_api_per_method
```



---
## test_api_for_categorical
```python
from test_api import test_api_for_categorical
```



---
## __name__
```python
from test_extract import __name__
```



---
## test_extract_expand_kwarg_wrong_type_raises
```python
from test_extract import test_extract_expand_kwarg_wrong_type_raises
```



---
## test_extract_expand_kwarg
```python
from test_extract import test_extract_expand_kwarg
```



---
## test_extract_expand_False_mixed_object
```python
from test_extract import test_extract_expand_False_mixed_object
```



---
## test_extract_expand_index_raises
```python
from test_extract import test_extract_expand_index_raises
```



---
## test_extract_expand_no_capture_groups_raises
```python
from test_extract import test_extract_expand_no_capture_groups_raises
```



---
## test_extract_expand_single_capture_group
```python
from test_extract import test_extract_expand_single_capture_group
```



---
## test_extract_expand_capture_groups
```python
from test_extract import test_extract_expand_capture_groups
```



---
## test_extract_expand_capture_groups_index
```python
from test_extract import test_extract_expand_capture_groups_index
```



---
## test_extract_single_series_name_is_preserved
```python
from test_extract import test_extract_single_series_name_is_preserved
```



---
## test_extract_expand_True
```python
from test_extract import test_extract_expand_True
```



---
## test_extract_expand_True_mixed_object
```python
from test_extract import test_extract_expand_True_mixed_object
```



---
## test_extract_expand_True_single_capture_group_raises
```python
from test_extract import test_extract_expand_True_single_capture_group_raises
```



---
## test_extract_expand_True_single_capture_group
```python
from test_extract import test_extract_expand_True_single_capture_group
```



---
## test_extract_series
```python
from test_extract import test_extract_series
```



---
## test_extract_optional_groups
```python
from test_extract import test_extract_optional_groups
```



---
## test_extract_dataframe_capture_groups_index
```python
from test_extract import test_extract_dataframe_capture_groups_index
```



---
## test_extract_single_group_returns_frame
```python
from test_extract import test_extract_single_group_returns_frame
```



---
## test_extractall
```python
from test_extract import test_extractall
```



---
## test_extractall_column_names
```python
from test_extract import test_extractall_column_names
```



---
## test_extractall_single_group
```python
from test_extract import test_extractall_single_group
```



---
## test_extractall_single_group_with_quantifier
```python
from test_extract import test_extractall_single_group_with_quantifier
```



---
## test_extractall_no_matches
```python
from test_extract import test_extractall_no_matches
```



---
## test_extractall_stringindex
```python
from test_extract import test_extractall_stringindex
```



---
## test_extractall_no_capture_groups_raises
```python
from test_extract import test_extractall_no_capture_groups_raises
```



---
## test_extract_index_one_two_groups
```python
from test_extract import test_extract_index_one_two_groups
```



---
## test_extractall_same_as_extract
```python
from test_extract import test_extractall_same_as_extract
```



---
## test_extractall_same_as_extract_subject_index
```python
from test_extract import test_extractall_same_as_extract_subject_index
```



---
## test_extractall_preserves_dtype
```python
from test_extract import test_extractall_preserves_dtype
```



---
## __name__
```python
from test_to_time import __name__
```



---
## TestToTime
```python
from test_to_time import TestToTime
```



---
## test_parsers_time
```python
from test_to_time import test_parsers_time
```



---
## test_odd_format
```python
from test_to_time import test_odd_format
```



---
## test_arraylike
```python
from test_to_time import test_arraylike
```



---
## __name__
```python
from test_to_timedelta import __name__
```



---
## TestTimedeltas
```python
from test_to_timedelta import TestTimedeltas
```



---
## test_from_numeric_arrow_dtype
```python
from test_to_timedelta import test_from_numeric_arrow_dtype
```



---
## test_from_timedelta_arrow_dtype
```python
from test_to_timedelta import test_from_timedelta_arrow_dtype
```



---
## test_to_timedelta_dt64_raises
```python
from test_to_timedelta import test_to_timedelta_dt64_raises
```



---
## test_to_timedelta_readonly
```python
from test_to_timedelta import test_to_timedelta_readonly
```



---
## test_to_timedelta_null
```python
from test_to_timedelta import test_to_timedelta_null
```



---
## test_to_timedelta_same_np_timedelta64
```python
from test_to_timedelta import test_to_timedelta_same_np_timedelta64
```



---
## test_to_timedelta_series
```python
from test_to_timedelta import test_to_timedelta_series
```



---
## test_to_timedelta_units
```python
from test_to_timedelta import test_to_timedelta_units
```



---
## test_to_timedelta_units_dtypes
```python
from test_to_timedelta import test_to_timedelta_units_dtypes
```



---
## test_to_timedelta_oob_non_nano
```python
from test_to_timedelta import test_to_timedelta_oob_non_nano
```



---
## test_to_timedelta_dataframe
```python
from test_to_timedelta import test_to_timedelta_dataframe
```



---
## test_to_timedelta_invalid_errors
```python
from test_to_timedelta import test_to_timedelta_invalid_errors
```



---
## test_to_timedelta_invalid_unit
```python
from test_to_timedelta import test_to_timedelta_invalid_unit
```



---
## test_to_timedelta_time
```python
from test_to_timedelta import test_to_timedelta_time
```



---
## test_to_timedelta_bad_value
```python
from test_to_timedelta import test_to_timedelta_bad_value
```



---
## test_to_timedelta_bad_value_coerce
```python
from test_to_timedelta import test_to_timedelta_bad_value_coerce
```



---
## test_to_timedelta_invalid_errors_ignore
```python
from test_to_timedelta import test_to_timedelta_invalid_errors_ignore
```



---
## test_unambiguous_timedelta_values
```python
from test_to_timedelta import test_unambiguous_timedelta_values
```



---
## test_to_timedelta_via_apply
```python
from test_to_timedelta import test_to_timedelta_via_apply
```



---
## test_to_timedelta_inference_without_warning
```python
from test_to_timedelta import test_to_timedelta_inference_without_warning
```



---
## test_to_timedelta_on_missing_values
```python
from test_to_timedelta import test_to_timedelta_on_missing_values
```



---
## test_to_timedelta_on_missing_values_scalar
```python
from test_to_timedelta import test_to_timedelta_on_missing_values_scalar
```



---
## test_to_timedelta_on_missing_values_list
```python
from test_to_timedelta import test_to_timedelta_on_missing_values_list
```



---
## test_to_timedelta_float
```python
from test_to_timedelta import test_to_timedelta_float
```



---
## test_to_timedelta_coerce_strings_unit
```python
from test_to_timedelta import test_to_timedelta_coerce_strings_unit
```



---
## test_to_timedelta_ignore_strings_unit
```python
from test_to_timedelta import test_to_timedelta_ignore_strings_unit
```



---
## test_to_timedelta_nullable_int64_dtype
```python
from test_to_timedelta import test_to_timedelta_nullable_int64_dtype
```



---
## test_to_timedelta_precision_over_nanos
```python
from test_to_timedelta import test_to_timedelta_precision_over_nanos
```



---
## test_to_timedelta_zerodim
```python
from test_to_timedelta import test_to_timedelta_zerodim
```



---
## test_to_timedelta_numeric_ea
```python
from test_to_timedelta import test_to_timedelta_numeric_ea
```



---
## test_to_timedelta_fraction
```python
from test_to_timedelta import test_to_timedelta_fraction
```



---
## __name__
```python
from test_to_datetime import __name__
```

test to_datetime 

---
## cache
```python
from test_to_datetime import cache
```

cache keyword to pass to to_datetime.

---
## TestTimeConversionFormats
```python
from test_to_datetime import TestTimeConversionFormats
```



---
## TestToDatetime
```python
from test_to_datetime import TestToDatetime
```



---
## TestToDatetimeUnit
```python
from test_to_datetime import TestToDatetimeUnit
```



---
## TestToDatetimeDataFrame
```python
from test_to_datetime import TestToDatetimeDataFrame
```



---
## TestToDatetimeMisc
```python
from test_to_datetime import TestToDatetimeMisc
```



---
## TestGuessDatetimeFormat
```python
from test_to_datetime import TestGuessDatetimeFormat
```



---
## TestToDatetimeInferFormat
```python
from test_to_datetime import TestToDatetimeInferFormat
```



---
## TestDaysInMonth
```python
from test_to_datetime import TestDaysInMonth
```



---
## TestDatetimeParsingWrappers
```python
from test_to_datetime import TestDatetimeParsingWrappers
```



---
## units
```python
from test_to_datetime import units
```

Day and some time units.

* D
* s
* ms
* us
* ns

---
## epoch_1960
```python
from test_to_datetime import epoch_1960
```

Timestamp at 1960-01-01.

---
## units_from_epochs
```python
from test_to_datetime import units_from_epochs
```



---
## epochs
```python
from test_to_datetime import epochs
```

Timestamp at 1960-01-01 in various forms.

* Timestamp
* datetime.datetime
* numpy.datetime64
* str

---
## julian_dates
```python
from test_to_datetime import julian_dates
```



---
## TestOrigin
```python
from test_to_datetime import TestOrigin
```



---
## TestShouldCache
```python
from test_to_datetime import TestShouldCache
```



---
## test_nullable_integer_to_datetime
```python
from test_to_datetime import test_nullable_integer_to_datetime
```



---
## test_na_to_datetime
```python
from test_to_datetime import test_na_to_datetime
```



---
## test_empty_string_datetime
```python
from test_to_datetime import test_empty_string_datetime
```



---
## test_empty_string_datetime_coerce__unit
```python
from test_to_datetime import test_empty_string_datetime_coerce__unit
```



---
## test_to_datetime_monotonic_increasing_index
```python
from test_to_datetime import test_to_datetime_monotonic_increasing_index
```



---
## test_to_datetime_cache_coerce_50_lines_outofbounds
```python
from test_to_datetime import test_to_datetime_cache_coerce_50_lines_outofbounds
```



---
## test_to_datetime_format_f_parse_nanos
```python
from test_to_datetime import test_to_datetime_format_f_parse_nanos
```



---
## test_to_datetime_mixed_iso8601
```python
from test_to_datetime import test_to_datetime_mixed_iso8601
```



---
## test_to_datetime_mixed_other
```python
from test_to_datetime import test_to_datetime_mixed_other
```



---
## test_to_datetime_mixed_or_iso_exact
```python
from test_to_datetime import test_to_datetime_mixed_or_iso_exact
```



---
## test_to_datetime_mixed_not_necessarily_iso8601_raise
```python
from test_to_datetime import test_to_datetime_mixed_not_necessarily_iso8601_raise
```



---
## test_to_datetime_mixed_not_necessarily_iso8601_coerce
```python
from test_to_datetime import test_to_datetime_mixed_not_necessarily_iso8601_coerce
```



---
## test_ignoring_unknown_tz_deprecated
```python
from test_to_datetime import test_ignoring_unknown_tz_deprecated
```



---
## test_from_numeric_arrow_dtype
```python
from test_to_datetime import test_from_numeric_arrow_dtype
```



---
## test_to_datetime_with_empty_str_utc_false_format_mixed
```python
from test_to_datetime import test_to_datetime_with_empty_str_utc_false_format_mixed
```



---
## test_to_datetime_with_empty_str_utc_false_offsets_and_format_mixed
```python
from test_to_datetime import test_to_datetime_with_empty_str_utc_false_offsets_and_format_mixed
```



---
## test_to_datetime_mixed_tzs_mixed_types
```python
from test_to_datetime import test_to_datetime_mixed_tzs_mixed_types
```



---
## test_to_datetime_mixed_types_matching_tzs
```python
from test_to_datetime import test_to_datetime_mixed_types_matching_tzs
```



---
## test_to_datetime_mixed_awareness_mixed_types
```python
from test_to_datetime import test_to_datetime_mixed_awareness_mixed_types
```



---
## test_to_datetime_readonly
```python
from test_to_datetime import test_to_datetime_readonly
```



---
## test_to_datetime_format
```python
from test_to_datetime import test_to_datetime_format
```



---
## test_to_datetime_format_scalar
```python
from test_to_datetime import test_to_datetime_format_scalar
```



---
## test_to_datetime_format_YYYYMMDD
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD
```



---
## test_to_datetime_format_YYYYMMDD_with_nat
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_with_nat
```



---
## test_to_datetime_format_YYYYMM_with_nat
```python
from test_to_datetime import test_to_datetime_format_YYYYMM_with_nat
```



---
## test_to_datetime_format_YYYYMMDD_ignore
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_ignore
```



---
## test_to_datetime_format_YYYYMMDD_ignore_with_outofbounds
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_ignore_with_outofbounds
```



---
## test_to_datetime_format_YYYYMMDD_coercion
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_coercion
```



---
## test_to_datetime_format_YYYYMMDD_with_none
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_with_none
```



---
## test_to_datetime_format_YYYYMMDD_overflow
```python
from test_to_datetime import test_to_datetime_format_YYYYMMDD_overflow
```



---
## test_to_datetime_with_NA
```python
from test_to_datetime import test_to_datetime_with_NA
```



---
## test_to_datetime_with_NA_with_warning
```python
from test_to_datetime import test_to_datetime_with_NA_with_warning
```



---
## test_to_datetime_format_integer
```python
from test_to_datetime import test_to_datetime_format_integer
```



---
## test_int_to_datetime_format_YYYYMMDD_typeerror
```python
from test_to_datetime import test_int_to_datetime_format_YYYYMMDD_typeerror
```



---
## test_to_datetime_format_microsecond
```python
from test_to_datetime import test_to_datetime_format_microsecond
```



---
## test_to_datetime_format_time
```python
from test_to_datetime import test_to_datetime_format_time
```



---
## test_to_datetime_with_non_exact
```python
from test_to_datetime import test_to_datetime_with_non_exact
```



---
## test_non_exact_doesnt_parse_whole_string
```python
from test_to_datetime import test_non_exact_doesnt_parse_whole_string
```



---
## test_parse_nanoseconds_with_formula
```python
from test_to_datetime import test_parse_nanoseconds_with_formula
```



---
## test_to_datetime_format_weeks
```python
from test_to_datetime import test_to_datetime_format_weeks
```



---
## test_to_datetime_parse_tzname_or_tzoffset
```python
from test_to_datetime import test_to_datetime_parse_tzname_or_tzoffset
```



---
## test_to_datetime_parse_tzname_or_tzoffset_utc_false_deprecated
```python
from test_to_datetime import test_to_datetime_parse_tzname_or_tzoffset_utc_false_deprecated
```



---
## test_to_datetime_parse_tzname_or_tzoffset_different_tz_to_utc
```python
from test_to_datetime import test_to_datetime_parse_tzname_or_tzoffset_different_tz_to_utc
```



---
## test_to_datetime_parse_timezone_malformed
```python
from test_to_datetime import test_to_datetime_parse_timezone_malformed
```



---
## test_to_datetime_parse_timezone_keeps_name
```python
from test_to_datetime import test_to_datetime_parse_timezone_keeps_name
```



---
## test_to_datetime_overflow
```python
from test_to_datetime import test_to_datetime_overflow
```



---
## test_to_datetime_mixed_datetime_and_string
```python
from test_to_datetime import test_to_datetime_mixed_datetime_and_string
```



---
## test_to_datetime_mixed_string_and_numeric
```python
from test_to_datetime import test_to_datetime_mixed_string_and_numeric
```



---
## test_to_datetime_mixed_date_and_string
```python
from test_to_datetime import test_to_datetime_mixed_date_and_string
```



---
## test_to_datetime_mixed_datetime_and_string_with_format
```python
from test_to_datetime import test_to_datetime_mixed_datetime_and_string_with_format
```



---
## test_to_datetime_mixed_datetime_and_string_with_format_mixed_offsets_utc_false
```python
from test_to_datetime import test_to_datetime_mixed_datetime_and_string_with_format_mixed_offsets_utc_false
```



---
## test_to_datetime_mixed_offsets_with_none_tz
```python
from test_to_datetime import test_to_datetime_mixed_offsets_with_none_tz
```



---
## test_to_datetime_mixed_offsets_with_none
```python
from test_to_datetime import test_to_datetime_mixed_offsets_with_none
```



---
## test_to_datetime_mixed_datetime_and_string_with_format_raises
```python
from test_to_datetime import test_to_datetime_mixed_datetime_and_string_with_format_raises
```



---
## test_to_datetime_np_str
```python
from test_to_datetime import test_to_datetime_np_str
```



---
## test_to_datetime_iso_week_year_format
```python
from test_to_datetime import test_to_datetime_iso_week_year_format
```



---
## test_error_iso_week_year
```python
from test_to_datetime import test_error_iso_week_year
```



---
## test_to_datetime_dtarr
```python
from test_to_datetime import test_to_datetime_dtarr
```



---
## test_to_datetime_arrow
```python
from test_to_datetime import test_to_datetime_arrow
```



---
## test_to_datetime_pydatetime
```python
from test_to_datetime import test_to_datetime_pydatetime
```



---
## test_to_datetime_YYYYMMDD
```python
from test_to_datetime import test_to_datetime_YYYYMMDD
```



---
## test_to_datetime_unparsable_ignore
```python
from test_to_datetime import test_to_datetime_unparsable_ignore
```



---
## test_to_datetime_now
```python
from test_to_datetime import test_to_datetime_now
```



---
## test_to_datetime_today
```python
from test_to_datetime import test_to_datetime_today
```



---
## test_to_datetime_today_now_unicode_bytes
```python
from test_to_datetime import test_to_datetime_today_now_unicode_bytes
```



---
## test_to_datetime_now_with_format
```python
from test_to_datetime import test_to_datetime_now_with_format
```



---
## test_to_datetime_dt64s
```python
from test_to_datetime import test_to_datetime_dt64s
```



---
## test_to_datetime_dt64s_and_str
```python
from test_to_datetime import test_to_datetime_dt64s_and_str
```



---
## test_to_datetime_dt64s_out_of_ns_bounds
```python
from test_to_datetime import test_to_datetime_dt64s_out_of_ns_bounds
```



---
## test_to_datetime_dt64d_out_of_bounds
```python
from test_to_datetime import test_to_datetime_dt64d_out_of_bounds
```



---
## test_to_datetime_array_of_dt64s
```python
from test_to_datetime import test_to_datetime_array_of_dt64s
```



---
## test_out_of_bounds_errors_ignore
```python
from test_to_datetime import test_out_of_bounds_errors_ignore
```



---
## test_out_of_bounds_errors_ignore2
```python
from test_to_datetime import test_out_of_bounds_errors_ignore2
```



---
## test_to_datetime_tz
```python
from test_to_datetime import test_to_datetime_tz
```



---
## test_to_datetime_tz_mixed
```python
from test_to_datetime import test_to_datetime_tz_mixed
```



---
## test_to_datetime_different_offsets
```python
from test_to_datetime import test_to_datetime_different_offsets
```



---
## test_to_datetime_tz_pytz
```python
from test_to_datetime import test_to_datetime_tz_pytz
```



---
## test_to_datetime_utc_true
```python
from test_to_datetime import test_to_datetime_utc_true
```



---
## test_to_datetime_utc_true_scalar
```python
from test_to_datetime import test_to_datetime_utc_true_scalar
```



---
## test_to_datetime_utc_true_with_series_single_value
```python
from test_to_datetime import test_to_datetime_utc_true_with_series_single_value
```



---
## test_to_datetime_utc_true_with_series_tzaware_string
```python
from test_to_datetime import test_to_datetime_utc_true_with_series_tzaware_string
```



---
## test_to_datetime_utc_true_with_series_datetime_ns
```python
from test_to_datetime import test_to_datetime_utc_true_with_series_datetime_ns
```



---
## test_to_datetime_tz_psycopg2
```python
from test_to_datetime import test_to_datetime_tz_psycopg2
```



---
## test_datetime_bool
```python
from test_to_datetime import test_datetime_bool
```



---
## test_datetime_bool_arrays_mixed
```python
from test_to_datetime import test_datetime_bool_arrays_mixed
```



---
## test_datetime_invalid_datatype
```python
from test_to_datetime import test_datetime_invalid_datatype
```



---
## test_invalid_format_raises
```python
from test_to_datetime import test_invalid_format_raises
```



---
## test_datetime_invalid_scalar
```python
from test_to_datetime import test_datetime_invalid_scalar
```



---
## test_datetime_outofbounds_scalar
```python
from test_to_datetime import test_datetime_outofbounds_scalar
```



---
## test_datetime_invalid_index
```python
from test_to_datetime import test_datetime_invalid_index
```



---
## test_to_datetime_cache
```python
from test_to_datetime import test_to_datetime_cache
```



---
## test_to_datetime_from_deque
```python
from test_to_datetime import test_to_datetime_from_deque
```



---
## test_to_datetime_cache_series
```python
from test_to_datetime import test_to_datetime_cache_series
```



---
## test_to_datetime_cache_scalar
```python
from test_to_datetime import test_to_datetime_cache_scalar
```



---
## test_convert_object_to_datetime_with_cache
```python
from test_to_datetime import test_convert_object_to_datetime_with_cache
```



---
## test_to_datetime_converts_null_like_to_nat
```python
from test_to_datetime import test_to_datetime_converts_null_like_to_nat
```



---
## test_week_without_day_and_calendar_year
```python
from test_to_datetime import test_week_without_day_and_calendar_year
```



---
## test_to_datetime_coerce
```python
from test_to_datetime import test_to_datetime_coerce
```



---
## test_to_datetime_coerce_oob
```python
from test_to_datetime import test_to_datetime_coerce_oob
```



---
## test_to_datetime_malformed_no_raise
```python
from test_to_datetime import test_to_datetime_malformed_no_raise
```



---
## test_to_datetime_malformed_raise
```python
from test_to_datetime import test_to_datetime_malformed_raise
```



---
## test_iso_8601_strings_with_same_offset
```python
from test_to_datetime import test_iso_8601_strings_with_same_offset
```



---
## test_iso_8601_strings_with_different_offsets
```python
from test_to_datetime import test_iso_8601_strings_with_different_offsets
```



---
## test_iso_8601_strings_with_different_offsets_utc
```python
from test_to_datetime import test_iso_8601_strings_with_different_offsets_utc
```



---
## test_mixed_offsets_with_native_datetime_raises
```python
from test_to_datetime import test_mixed_offsets_with_native_datetime_raises
```



---
## test_non_iso_strings_with_tz_offset
```python
from test_to_datetime import test_non_iso_strings_with_tz_offset
```



---
## test_timestamp_utc_true
```python
from test_to_datetime import test_timestamp_utc_true
```



---
## test_to_datetime_with_format_out_of_bounds
```python
from test_to_datetime import test_to_datetime_with_format_out_of_bounds
```



---
## test_to_datetime_utc
```python
from test_to_datetime import test_to_datetime_utc
```



---
## test_to_datetime_fixed_offset
```python
from test_to_datetime import test_to_datetime_fixed_offset
```



---
## test_to_datetime_mixed_offsets_with_utc_false_deprecated
```python
from test_to_datetime import test_to_datetime_mixed_offsets_with_utc_false_deprecated
```



---
## test_to_datetime_month_or_year_unit_int
```python
from test_to_datetime import test_to_datetime_month_or_year_unit_int
```



---
## test_to_datetime_month_or_year_unit_non_round_float
```python
from test_to_datetime import test_to_datetime_month_or_year_unit_non_round_float
```



---
## test_unit
```python
from test_to_datetime import test_unit
```



---
## test_unit_str
```python
from test_to_datetime import test_unit_str
```



---
## test_unit_array_mixed_nans
```python
from test_to_datetime import test_unit_array_mixed_nans
```



---
## test_unit_array_mixed_nans_large_int
```python
from test_to_datetime import test_unit_array_mixed_nans_large_int
```



---
## test_to_datetime_invalid_str_not_out_of_bounds_valuerror
```python
from test_to_datetime import test_to_datetime_invalid_str_not_out_of_bounds_valuerror
```



---
## test_unit_consistency
```python
from test_to_datetime import test_unit_consistency
```



---
## test_unit_with_numeric
```python
from test_to_datetime import test_unit_with_numeric
```



---
## test_unit_with_numeric_coerce
```python
from test_to_datetime import test_unit_with_numeric_coerce
```



---
## test_unit_mixed
```python
from test_to_datetime import test_unit_mixed
```



---
## test_unit_rounding
```python
from test_to_datetime import test_unit_rounding
```



---
## test_unit_ignore_keeps_name
```python
from test_to_datetime import test_unit_ignore_keeps_name
```



---
## test_to_datetime_errors_ignore_utc_true
```python
from test_to_datetime import test_to_datetime_errors_ignore_utc_true
```



---
## test_to_datetime_unit
```python
from test_to_datetime import test_to_datetime_unit
```



---
## test_to_datetime_unit_with_nulls
```python
from test_to_datetime import test_to_datetime_unit_with_nulls
```



---
## test_to_datetime_unit_fractional_seconds
```python
from test_to_datetime import test_to_datetime_unit_fractional_seconds
```



---
## test_to_datetime_unit_na_values
```python
from test_to_datetime import test_to_datetime_unit_na_values
```



---
## test_to_datetime_unit_invalid
```python
from test_to_datetime import test_to_datetime_unit_invalid
```



---
## test_to_timestamp_unit_coerce
```python
from test_to_datetime import test_to_timestamp_unit_coerce
```



---
## test_float_to_datetime_raise_near_bounds
```python
from test_to_datetime import test_float_to_datetime_raise_near_bounds
```



---
## df
```python
from test_to_datetime import df
```



---
## test_dataframe
```python
from test_to_datetime import test_dataframe
```



---
## test_dataframe_dict_with_constructable
```python
from test_to_datetime import test_dataframe_dict_with_constructable
```



---
## test_dataframe_field_aliases_column_subset
```python
from test_to_datetime import test_dataframe_field_aliases_column_subset
```



---
## test_dataframe_field_aliases
```python
from test_to_datetime import test_dataframe_field_aliases
```



---
## test_dataframe_str_dtype
```python
from test_to_datetime import test_dataframe_str_dtype
```



---
## test_dataframe_coerce
```python
from test_to_datetime import test_dataframe_coerce
```



---
## test_dataframe_extra_keys_raisesm
```python
from test_to_datetime import test_dataframe_extra_keys_raisesm
```



---
## test_dataframe_missing_keys_raises
```python
from test_to_datetime import test_dataframe_missing_keys_raises
```



---
## test_dataframe_duplicate_columns_raises
```python
from test_to_datetime import test_dataframe_duplicate_columns_raises
```



---
## test_dataframe_int16
```python
from test_to_datetime import test_dataframe_int16
```



---
## test_dataframe_mixed
```python
from test_to_datetime import test_dataframe_mixed
```



---
## test_dataframe_float
```python
from test_to_datetime import test_dataframe_float
```



---
## test_dataframe_utc_true
```python
from test_to_datetime import test_dataframe_utc_true
```



---
## test_to_datetime_barely_out_of_bounds
```python
from test_to_datetime import test_to_datetime_barely_out_of_bounds
```



---
## test_to_datetime_iso8601
```python
from test_to_datetime import test_to_datetime_iso8601
```



---
## test_to_datetime_iso8601_fails
```python
from test_to_datetime import test_to_datetime_iso8601_fails
```



---
## test_to_datetime_iso8601_exact_fails
```python
from test_to_datetime import test_to_datetime_iso8601_exact_fails
```



---
## test_to_datetime_iso8601_non_exact
```python
from test_to_datetime import test_to_datetime_iso8601_non_exact
```



---
## test_to_datetime_iso8601_separator
```python
from test_to_datetime import test_to_datetime_iso8601_separator
```



---
## test_to_datetime_iso8601_valid
```python
from test_to_datetime import test_to_datetime_iso8601_valid
```



---
## test_to_datetime_iso8601_non_padded
```python
from test_to_datetime import test_to_datetime_iso8601_non_padded
```



---
## test_to_datetime_iso8601_with_timezone_valid
```python
from test_to_datetime import test_to_datetime_iso8601_with_timezone_valid
```



---
## test_to_datetime_default
```python
from test_to_datetime import test_to_datetime_default
```



---
## test_to_datetime_respects_dayfirst
```python
from test_to_datetime import test_to_datetime_respects_dayfirst
```



---
## test_to_datetime_on_datetime64_series
```python
from test_to_datetime import test_to_datetime_on_datetime64_series
```



---
## test_to_datetime_with_space_in_series
```python
from test_to_datetime import test_to_datetime_with_space_in_series
```



---
## test_to_datetime_with_apply
```python
from test_to_datetime import test_to_datetime_with_apply
```



---
## test_to_datetime_timezone_name
```python
from test_to_datetime import test_to_datetime_timezone_name
```



---
## test_to_datetime_with_apply_with_empty_str
```python
from test_to_datetime import test_to_datetime_with_apply_with_empty_str
```



---
## test_to_datetime_empty_stt
```python
from test_to_datetime import test_to_datetime_empty_stt
```



---
## test_to_datetime_empty_str_list
```python
from test_to_datetime import test_to_datetime_empty_str_list
```



---
## test_to_datetime_zero
```python
from test_to_datetime import test_to_datetime_zero
```



---
## test_to_datetime_strings
```python
from test_to_datetime import test_to_datetime_strings
```



---
## test_to_datetime_strings_variation
```python
from test_to_datetime import test_to_datetime_strings_variation
```



---
## test_to_datetime_strings_vs_constructor
```python
from test_to_datetime import test_to_datetime_strings_vs_constructor
```



---
## test_to_datetime_unprocessable_input
```python
from test_to_datetime import test_to_datetime_unprocessable_input
```



---
## test_to_datetime_unhashable_input
```python
from test_to_datetime import test_to_datetime_unhashable_input
```



---
## test_to_datetime_other_datetime64_units
```python
from test_to_datetime import test_to_datetime_other_datetime64_units
```



---
## test_to_datetime_list_of_integers
```python
from test_to_datetime import test_to_datetime_list_of_integers
```



---
## test_string_invalid_operation
```python
from test_to_datetime import test_string_invalid_operation
```



---
## test_string_na_nat_conversion
```python
from test_to_datetime import test_string_na_nat_conversion
```



---
## test_string_na_nat_conversion_malformed
```python
from test_to_datetime import test_string_na_nat_conversion_malformed
```



---
## test_string_na_nat_conversion_with_name
```python
from test_to_datetime import test_string_na_nat_conversion_with_name
```



---
## test_dti_constructor_numpy_timeunits
```python
from test_to_datetime import test_dti_constructor_numpy_timeunits
```



---
## test_dayfirst
```python
from test_to_datetime import test_dayfirst
```



---
## test_dayfirst_warnings_valid_input
```python
from test_to_datetime import test_dayfirst_warnings_valid_input
```



---
## test_dayfirst_warnings_invalid_input
```python
from test_to_datetime import test_dayfirst_warnings_invalid_input
```



---
## test_to_datetime_dta_tz
```python
from test_to_datetime import test_to_datetime_dta_tz
```



---
## test_guess_datetime_format_for_array
```python
from test_to_datetime import test_guess_datetime_format_for_array
```



---
## test_guess_datetime_format_for_array_all_nans
```python
from test_to_datetime import test_guess_datetime_format_for_array_all_nans
```



---
## test_to_datetime_infer_datetime_format_consistent_format
```python
from test_to_datetime import test_to_datetime_infer_datetime_format_consistent_format
```



---
## test_to_datetime_inconsistent_format
```python
from test_to_datetime import test_to_datetime_inconsistent_format
```



---
## test_to_datetime_consistent_format
```python
from test_to_datetime import test_to_datetime_consistent_format
```



---
## test_to_datetime_series_with_nans
```python
from test_to_datetime import test_to_datetime_series_with_nans
```



---
## test_to_datetime_series_start_with_nans
```python
from test_to_datetime import test_to_datetime_series_start_with_nans
```



---
## test_infer_datetime_format_tz_name
```python
from test_to_datetime import test_infer_datetime_format_tz_name
```



---
## test_infer_datetime_format_zero_tz
```python
from test_to_datetime import test_infer_datetime_format_zero_tz
```



---
## test_to_datetime_iso8601_noleading_0s
```python
from test_to_datetime import test_to_datetime_iso8601_noleading_0s
```



---
## test_parse_dates_infer_datetime_format_warning
```python
from test_to_datetime import test_parse_dates_infer_datetime_format_warning
```



---
## test_day_not_in_month_coerce
```python
from test_to_datetime import test_day_not_in_month_coerce
```



---
## test_day_not_in_month_raise
```python
from test_to_datetime import test_day_not_in_month_raise
```



---
## test_day_not_in_month_raise_value
```python
from test_to_datetime import test_day_not_in_month_raise_value
```



---
## test_day_not_in_month_ignore
```python
from test_to_datetime import test_day_not_in_month_ignore
```



---
## test_parsers
```python
from test_to_datetime import test_parsers
```



---
## test_na_values_with_cache
```python
from test_to_datetime import test_na_values_with_cache
```



---
## test_parsers_nat
```python
from test_to_datetime import test_parsers_nat
```



---
## test_parsers_dayfirst_yearfirst
```python
from test_to_datetime import test_parsers_dayfirst_yearfirst
```



---
## test_parsers_timestring
```python
from test_to_datetime import test_parsers_timestring
```



---
## test_parsers_timezone_minute_offsets_roundtrip
```python
from test_to_datetime import test_parsers_timezone_minute_offsets_roundtrip
```



---
## test_origin_and_unit
```python
from test_to_datetime import test_origin_and_unit
```



---
## test_julian
```python
from test_to_datetime import test_julian
```



---
## test_unix
```python
from test_to_datetime import test_unix
```



---
## test_julian_round_trip
```python
from test_to_datetime import test_julian_round_trip
```



---
## test_invalid_unit
```python
from test_to_datetime import test_invalid_unit
```



---
## test_invalid_origin
```python
from test_to_datetime import test_invalid_origin
```



---
## test_epoch
```python
from test_to_datetime import test_epoch
```



---
## test_invalid_origins
```python
from test_to_datetime import test_invalid_origins
```



---
## test_invalid_origins_tzinfo
```python
from test_to_datetime import test_invalid_origins_tzinfo
```



---
## test_incorrect_value_exception
```python
from test_to_datetime import test_incorrect_value_exception
```



---
## test_to_datetime_out_of_bounds_with_format_arg
```python
from test_to_datetime import test_to_datetime_out_of_bounds_with_format_arg
```



---
## test_processing_order
```python
from test_to_datetime import test_processing_order
```



---
## test_arg_tz_ns_unit
```python
from test_to_datetime import test_arg_tz_ns_unit
```



---
## test_should_cache
```python
from test_to_datetime import test_should_cache
```



---
## test_should_cache_errors
```python
from test_to_datetime import test_should_cache_errors
```



---
## test_no_slicing_errors_in_should_cache
```python
from test_to_datetime import test_no_slicing_errors_in_should_cache
```



---
## __name__
```python
from test_to_numeric import __name__
```



---
## errors
```python
from test_to_numeric import errors
```



---
## signed
```python
from test_to_numeric import signed
```



---
## transform
```python
from test_to_numeric import transform
```



---
## large_val
```python
from test_to_numeric import large_val
```



---
## multiple_elts
```python
from test_to_numeric import multiple_elts
```



---
## transform_assert_equal
```python
from test_to_numeric import transform_assert_equal
```



---
## test_empty
```python
from test_to_numeric import test_empty
```



---
## test_series
```python
from test_to_numeric import test_series
```



---
## test_series_numeric
```python
from test_to_numeric import test_series_numeric
```



---
## test_error
```python
from test_to_numeric import test_error
```



---
## test_ignore_error
```python
from test_to_numeric import test_ignore_error
```



---
## test_bool_handling
```python
from test_to_numeric import test_bool_handling
```



---
## test_list
```python
from test_to_numeric import test_list
```



---
## test_list_numeric
```python
from test_to_numeric import test_list_numeric
```



---
## test_numeric
```python
from test_to_numeric import test_numeric
```



---
## test_numeric_df_columns
```python
from test_to_numeric import test_numeric_df_columns
```



---
## test_numeric_embedded_arr_likes
```python
from test_to_numeric import test_numeric_embedded_arr_likes
```



---
## test_all_nan
```python
from test_to_numeric import test_all_nan
```



---
## test_type_check
```python
from test_to_numeric import test_type_check
```



---
## test_scalar
```python
from test_to_numeric import test_scalar
```



---
## test_really_large_scalar
```python
from test_to_numeric import test_really_large_scalar
```



---
## test_really_large_in_arr
```python
from test_to_numeric import test_really_large_in_arr
```



---
## test_really_large_in_arr_consistent
```python
from test_to_numeric import test_really_large_in_arr_consistent
```



---
## test_scalar_fail
```python
from test_to_numeric import test_scalar_fail
```



---
## test_numeric_dtypes
```python
from test_to_numeric import test_numeric_dtypes
```



---
## test_str
```python
from test_to_numeric import test_str
```



---
## test_datetime_like
```python
from test_to_numeric import test_datetime_like
```



---
## test_timedelta
```python
from test_to_numeric import test_timedelta
```



---
## test_period
```python
from test_to_numeric import test_period
```



---
## test_non_hashable
```python
from test_to_numeric import test_non_hashable
```



---
## test_downcast_invalid_cast
```python
from test_to_numeric import test_downcast_invalid_cast
```



---
## test_errors_invalid_value
```python
from test_to_numeric import test_errors_invalid_value
```



---
## test_downcast_basic
```python
from test_to_numeric import test_downcast_basic
```



---
## test_signed_downcast
```python
from test_to_numeric import test_signed_downcast
```



---
## test_ignore_downcast_invalid_data
```python
from test_to_numeric import test_ignore_downcast_invalid_data
```



---
## test_ignore_downcast_neg_to_unsigned
```python
from test_to_numeric import test_ignore_downcast_neg_to_unsigned
```



---
## test_ignore_downcast_cannot_convert_float
```python
from test_to_numeric import test_ignore_downcast_cannot_convert_float
```



---
## test_downcast_not8bit
```python
from test_to_numeric import test_downcast_not8bit
```



---
## test_downcast_limits
```python
from test_to_numeric import test_downcast_limits
```



---
## test_downcast_float64_to_float32
```python
from test_to_numeric import test_downcast_float64_to_float32
```



---
## test_downcast_uint64
```python
from test_to_numeric import test_downcast_uint64
```



---
## test_coerce_uint64_conflict
```python
from test_to_numeric import test_coerce_uint64_conflict
```



---
## test_non_coerce_uint64_conflict
```python
from test_to_numeric import test_non_coerce_uint64_conflict
```



---
## test_downcast_empty
```python
from test_to_numeric import test_downcast_empty
```



---
## test_failure_to_convert_uint64_string_to_NaN
```python
from test_to_numeric import test_failure_to_convert_uint64_string_to_NaN
```



---
## test_precision_float_conversion
```python
from test_to_numeric import test_precision_float_conversion
```



---
## test_to_numeric_from_nullable_string
```python
from test_to_numeric import test_to_numeric_from_nullable_string
```



---
## test_to_numeric_from_nullable_string_coerce
```python
from test_to_numeric import test_to_numeric_from_nullable_string_coerce
```



---
## test_to_numeric_from_nullable_string_ignore
```python
from test_to_numeric import test_to_numeric_from_nullable_string_ignore
```



---
## test_downcast_nullable_numeric
```python
from test_to_numeric import test_downcast_nullable_numeric
```



---
## test_downcast_nullable_mask_is_copied
```python
from test_to_numeric import test_downcast_nullable_mask_is_copied
```



---
## test_to_numeric_scientific_notation
```python
from test_to_numeric import test_to_numeric_scientific_notation
```



---
## test_to_numeric_large_float_not_downcast_to_float_32
```python
from test_to_numeric import test_to_numeric_large_float_not_downcast_to_float_32
```



---
## test_to_numeric_dtype_backend
```python
from test_to_numeric import test_to_numeric_dtype_backend
```



---
## test_to_numeric_dtype_backend_na
```python
from test_to_numeric import test_to_numeric_dtype_backend_na
```



---
## test_to_numeric_dtype_backend_downcasting
```python
from test_to_numeric import test_to_numeric_dtype_backend_downcasting
```



---
## test_to_numeric_dtype_backend_downcasting_uint
```python
from test_to_numeric import test_to_numeric_dtype_backend_downcasting_uint
```



---
## test_to_numeric_dtype_backend_already_nullable
```python
from test_to_numeric import test_to_numeric_dtype_backend_already_nullable
```



---
## test_to_numeric_dtype_backend_error
```python
from test_to_numeric import test_to_numeric_dtype_backend_error
```



---
## test_invalid_dtype_backend
```python
from test_to_numeric import test_invalid_dtype_backend
```



---
## test_coerce_pyarrow_backend
```python
from test_to_numeric import test_coerce_pyarrow_backend
```



---
## __name__
```python
from test_period import __name__
```



---
## dtype
```python
from test_period import dtype
```



---
## data
```python
from test_period import data
```



---
## data_for_sorting
```python
from test_period import data_for_sorting
```



---
## data_missing
```python
from test_period import data_missing
```



---
## data_missing_for_sorting
```python
from test_period import data_missing_for_sorting
```



---
## data_for_grouping
```python
from test_period import data_for_grouping
```



---
## TestPeriodArray
```python
from test_period import TestPeriodArray
```



---
## Test2DCompat
```python
from test_period import Test2DCompat
```



---
## _get_expected_exception
```python
from test_period import _get_expected_exception
```



---
## _supports_accumulation
```python
from test_period import _supports_accumulation
```



---
## _supports_reduction
```python
from test_period import _supports_reduction
```



---
## check_reduce
```python
from test_period import check_reduce
```



---
## test_diff
```python
from test_period import test_diff
```



---
## test_map
```python
from test_period import test_map
```



---
## __name__
```python
from test_masked import __name__
```

This file contains a minimal set of tests for compliance with the extension
array interface test suite, and should contain no other tests.
The test suite for the full functionality of the array is located in
`pandas/tests/arrays/`.

The tests in this file are inherited from the BaseExtensionTests, and only
minimal tweaks should be applied to get the tests passing (by overwriting a
parent method).

Additional tests should either be added to one of the BaseExtensionTests
classes (if they are relevant for the extension interface for all dtypes), or
be added to the array-specific tests in `pandas/tests/arrays/`.

---
## make_data
```python
from test_masked import make_data
```



---
## make_float_data
```python
from test_masked import make_float_data
```



---
## make_bool_data
```python
from test_masked import make_bool_data
```



---
## dtype
```python
from test_masked import dtype
```



---
## data
```python
from test_masked import data
```



---
## data_for_twos
```python
from test_masked import data_for_twos
```



---
## data_missing
```python
from test_masked import data_missing
```



---
## data_for_sorting
```python
from test_masked import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_masked import data_missing_for_sorting
```



---
## na_cmp
```python
from test_masked import na_cmp
```



---
## data_for_grouping
```python
from test_masked import data_for_grouping
```



---
## TestMaskedArrays
```python
from test_masked import TestMaskedArrays
```



---
## Test2DCompat
```python
from test_masked import Test2DCompat
```



---
## test_map
```python
from test_masked import test_map
```



---
## test_map_na_action_ignore
```python
from test_masked import test_map_na_action_ignore
```



---
## _get_expected_exception
```python
from test_masked import _get_expected_exception
```



---
## _cast_pointwise_result
```python
from test_masked import _cast_pointwise_result
```



---
## test_divmod_series_array
```python
from test_masked import test_divmod_series_array
```



---
## test_combine_le
```python
from test_masked import test_combine_le
```



---
## _supports_reduction
```python
from test_masked import _supports_reduction
```



---
## check_reduce
```python
from test_masked import check_reduce
```



---
## _get_expected_reduction_dtype
```python
from test_masked import _get_expected_reduction_dtype
```



---
## _supports_accumulation
```python
from test_masked import _supports_accumulation
```



---
## check_accumulate
```python
from test_masked import check_accumulate
```



---
## __name__
```python
from test_extension import __name__
```

Tests for behavior if an author does *not* implement EA methods.

---
## MyEA
```python
from test_extension import MyEA
```



---
## data
```python
from test_extension import data
```



---
## TestExtensionArray
```python
from test_extension import TestExtensionArray
```



---
## __init__
```python
from test_extension import __init__
```



---
## test_errors
```python
from test_extension import test_errors
```



---
## dtype
```python
from conftest import dtype
```

Parametrized fixture returning a float 'dtype'

---
## data
```python
from conftest import data
```

Fixture returning 'data' array according to parametrized float 'dtype'

---
## data_for_twos
```python
from conftest import data_for_twos
```

Length-100 array in which all the elements are two.

Call pytest.skip in your fixture if the dtype does not support divmod.

---
## data_missing
```python
from conftest import data_missing
```

Fixture returning array with missing data according to parametrized float
'dtype'.

---
## all_data
```python
from conftest import all_data
```

Parametrized fixture returning 'data' or 'data_missing' float arrays.

Used to test dtype conversion with and without missing values.

---
## data_repeated
```python
from conftest import data_repeated
```

Generate many datasets.

Parameters
----------
data : fixture implementing `data`

Returns
-------
Callable[[int], Generator]:
    A callable that takes a `count` argument and
    returns a generator yielding `count` datasets.

---
## data_for_sorting
```python
from conftest import data_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, C, A] with
A < B < C

For boolean dtypes (for which there are only 2 values available),
set B=C=True

---
## data_missing_for_sorting
```python
from conftest import data_missing_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, NA, A] with
A < B and NA missing.

---
## na_cmp
```python
from conftest import na_cmp
```

Binary operator for comparing NA values.

Should return a function of two arguments that returns
True if both arguments are (scalar) NA for your type.

By default, uses ``operator.is_``

---
## na_value
```python
from conftest import na_value
```

The scalar missing value for this type. Default dtype.na_value.

TODO: can be removed in 3.x (see https://github.com/pandas-dev/pandas/pull/54930)

---
## data_for_grouping
```python
from conftest import data_for_grouping
```

Data for factorization, grouping, and unique tests.

Expected to be like [B, B, NA, NA, A, A, B, C]

Where A < B < C and NA is missing.

If a dtype has _is_boolean = True, i.e. only 2 unique non-NA entries,
then set C=B.

---
## box_in_series
```python
from conftest import box_in_series
```

Whether to box the data in a Series

---
## groupby_apply_op
```python
from conftest import groupby_apply_op
```

Functions to test groupby.apply().

---
## as_frame
```python
from conftest import as_frame
```

Boolean fixture to support Series and Series.to_frame() comparison testing.

---
## as_series
```python
from conftest import as_series
```

Boolean fixture to support arr and Series(arr) comparison testing.

---
## use_numpy
```python
from conftest import use_numpy
```

Boolean fixture to support comparison testing of ExtensionDtype array
and numpy array.

---
## fillna_method
```python
from conftest import fillna_method
```

Parametrized fixture giving method parameters 'ffill' and 'bfill' for
Series.fillna(method=<method>) testing.

---
## as_array
```python
from conftest import as_array
```

Boolean fixture to support ExtensionDtype _from_sequence method testing.

---
## invalid_scalar
```python
from conftest import invalid_scalar
```

A scalar that *cannot* be held by this ExtensionArray.

The default should work for most subclasses, but is not guaranteed.

If the array can hold any item (i.e. object dtype), then use pytest.skip.

---
## gen
```python
from conftest import gen
```



---
## DummyDtype
```python
from test_common import DummyDtype
```



---
## DummyArray
```python
from test_common import DummyArray
```



---
## TestExtensionArrayDtype
```python
from test_common import TestExtensionArrayDtype
```



---
## test_astype
```python
from test_common import test_astype
```



---
## test_astype_no_copy
```python
from test_common import test_astype_no_copy
```



---
## test_is_extension_array_dtype
```python
from test_common import test_is_extension_array_dtype
```



---
## CapturingStringArray
```python
from test_common import CapturingStringArray
```

Extend StringArray to capture arguments to __getitem__

---
## test_ellipsis_index
```python
from test_common import test_ellipsis_index
```



---
## __init__
```python
from test_common import __init__
```



---
## __array__
```python
from test_common import __array__
```



---
## dtype
```python
from test_common import dtype
```



---
## astype
```python
from test_common import astype
```



---
## test_is_not_extension_array_dtype
```python
from test_common import test_is_not_extension_array_dtype
```



---
## __getitem__
```python
from test_common import __getitem__
```



---
## __name__
```python
from test_sparse import __name__
```

This file contains a minimal set of tests for compliance with the extension
array interface test suite, and should contain no other tests.
The test suite for the full functionality of the array is located in
`pandas/tests/arrays/`.

The tests in this file are inherited from the BaseExtensionTests, and only
minimal tweaks should be applied to get the tests passing (by overwriting a
parent method).

Additional tests should either be added to one of the BaseExtensionTests
classes (if they are relevant for the extension interface for all dtypes), or
be added to the array-specific tests in `pandas/tests/arrays/`.

---
## make_data
```python
from test_sparse import make_data
```



---
## dtype
```python
from test_sparse import dtype
```



---
## data
```python
from test_sparse import data
```

Length-100 PeriodArray for semantics test.

---
## data_for_twos
```python
from test_sparse import data_for_twos
```



---
## data_missing
```python
from test_sparse import data_missing
```

Length 2 array with [NA, Valid]

---
## data_repeated
```python
from test_sparse import data_repeated
```

Return different versions of data for count times

---
## data_for_sorting
```python
from test_sparse import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_sparse import data_missing_for_sorting
```



---
## na_cmp
```python
from test_sparse import na_cmp
```



---
## data_for_grouping
```python
from test_sparse import data_for_grouping
```



---
## data_for_compare
```python
from test_sparse import data_for_compare
```



---
## TestSparseArray
```python
from test_sparse import TestSparseArray
```



---
## test_array_type_with_arg
```python
from test_sparse import test_array_type_with_arg
```



---
## gen
```python
from test_sparse import gen
```



---
## _supports_reduction
```python
from test_sparse import _supports_reduction
```



---
## test_reduce_series_numeric
```python
from test_sparse import test_reduce_series_numeric
```



---
## test_reduce_frame
```python
from test_sparse import test_reduce_frame
```



---
## _check_unsupported
```python
from test_sparse import _check_unsupported
```



---
## test_concat_mixed_dtypes
```python
from test_sparse import test_concat_mixed_dtypes
```



---
## test_stack
```python
from test_sparse import test_stack
```



---
## test_concat_columns
```python
from test_sparse import test_concat_columns
```



---
## test_concat_extension_arrays_copy_false
```python
from test_sparse import test_concat_extension_arrays_copy_false
```



---
## test_align
```python
from test_sparse import test_align
```



---
## test_align_frame
```python
from test_sparse import test_align_frame
```



---
## test_align_series_frame
```python
from test_sparse import test_align_series_frame
```



---
## test_merge
```python
from test_sparse import test_merge
```



---
## test_get
```python
from test_sparse import test_get
```



---
## test_reindex
```python
from test_sparse import test_reindex
```



---
## test_isna
```python
from test_sparse import test_isna
```



---
## test_fillna_limit_backfill
```python
from test_sparse import test_fillna_limit_backfill
```



---
## test_fillna_no_op_returns_copy
```python
from test_sparse import test_fillna_no_op_returns_copy
```



---
## test_fillna_series
```python
from test_sparse import test_fillna_series
```



---
## test_fillna_frame
```python
from test_sparse import test_fillna_frame
```



---
## test_fillna_copy_frame
```python
from test_sparse import test_fillna_copy_frame
```



---
## test_fillna_copy_series
```python
from test_sparse import test_fillna_copy_series
```



---
## test_fillna_length_mismatch
```python
from test_sparse import test_fillna_length_mismatch
```



---
## test_where_series
```python
from test_sparse import test_where_series
```



---
## test_searchsorted
```python
from test_sparse import test_searchsorted
```



---
## test_shift_0_periods
```python
from test_sparse import test_shift_0_periods
```



---
## test_argmin_argmax_all_na
```python
from test_sparse import test_argmin_argmax_all_na
```



---
## test_equals
```python
from test_sparse import test_equals
```



---
## test_equals_same_data_different_object
```python
from test_sparse import test_equals_same_data_different_object
```



---
## test_map
```python
from test_sparse import test_map
```



---
## test_map_raises
```python
from test_sparse import test_map_raises
```



---
## test_astype_string
```python
from test_sparse import test_astype_string
```



---
## _skip_if_different_combine
```python
from test_sparse import _skip_if_different_combine
```



---
## test_arith_series_with_scalar
```python
from test_sparse import test_arith_series_with_scalar
```



---
## test_arith_series_with_array
```python
from test_sparse import test_arith_series_with_array
```



---
## test_arith_frame_with_scalar
```python
from test_sparse import test_arith_frame_with_scalar
```



---
## _compare_other
```python
from test_sparse import _compare_other
```



---
## test_scalar
```python
from test_sparse import test_scalar
```



---
## test_array
```python
from test_sparse import test_array
```



---
## test_sparse_array
```python
from test_sparse import test_sparse_array
```



---
## test_array_repr
```python
from test_sparse import test_array_repr
```



---
## test_groupby_extension_agg
```python
from test_sparse import test_groupby_extension_agg
```



---
## maybe_split_array
```python
from test_string import maybe_split_array
```



---
## chunked
```python
from test_string import chunked
```



---
## dtype
```python
from test_string import dtype
```

Fixture giving StringDtype from parametrized 'string_storage'

---
## data
```python
from test_string import data
```



---
## data_missing
```python
from test_string import data_missing
```

Length 2 array with [NA, Valid]

---
## data_for_sorting
```python
from test_string import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_string import data_missing_for_sorting
```



---
## data_for_grouping
```python
from test_string import data_for_grouping
```



---
## TestStringArray
```python
from test_string import TestStringArray
```



---
## Test2DCompat
```python
from test_string import Test2DCompat
```



---
## test_searchsorted_with_na_raises
```python
from test_string import test_searchsorted_with_na_raises
```



---
## test_eq_with_str
```python
from test_string import test_eq_with_str
```



---
## test_is_not_string_type
```python
from test_string import test_is_not_string_type
```



---
## test_view
```python
from test_string import test_view
```



---
## test_from_dtype
```python
from test_string import test_from_dtype
```



---
## test_transpose
```python
from test_string import test_transpose
```



---
## test_setitem_preserves_views
```python
from test_string import test_setitem_preserves_views
```



---
## test_dropna_array
```python
from test_string import test_dropna_array
```



---
## test_fillna_no_op_returns_copy
```python
from test_string import test_fillna_no_op_returns_copy
```



---
## _get_expected_exception
```python
from test_string import _get_expected_exception
```



---
## _supports_reduction
```python
from test_string import _supports_reduction
```



---
## _cast_pointwise_result
```python
from test_string import _cast_pointwise_result
```



---
## test_compare_scalar
```python
from test_string import test_compare_scalar
```



---
## test_groupby_extension_apply
```python
from test_string import test_groupby_extension_apply
```



---
## arrow_not_supported
```python
from test_string import arrow_not_supported
```



---
## __name__
```python
from test_categorical import __name__
```

Tests dtype specification during parsing
for all of the parsers defined in parsers.py

---
## make_data
```python
from test_categorical import make_data
```



---
## dtype
```python
from test_categorical import dtype
```



---
## data
```python
from test_categorical import data
```

Length-100 array for this type.

* data[0] and data[1] should both be non missing
* data[0] and data[1] should not be equal

---
## data_missing
```python
from test_categorical import data_missing
```

Length 2 array with [NA, Valid]

---
## data_for_sorting
```python
from test_categorical import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_categorical import data_missing_for_sorting
```



---
## data_for_grouping
```python
from test_categorical import data_for_grouping
```



---
## TestCategorical
```python
from test_categorical import TestCategorical
```



---
## Test2DCompat
```python
from test_categorical import Test2DCompat
```



---
## test_memory_usage
```python
from test_categorical import test_memory_usage
```



---
## test_contains
```python
from test_categorical import test_contains
```



---
## test_empty
```python
from test_categorical import test_empty
```



---
## test_getitem_scalar
```python
from test_categorical import test_getitem_scalar
```



---
## test_value_counts
```python
from test_categorical import test_value_counts
```



---
## test_combine_add
```python
from test_categorical import test_combine_add
```



---
## test_map
```python
from test_categorical import test_map
```



---
## test_arith_frame_with_scalar
```python
from test_categorical import test_arith_frame_with_scalar
```



---
## test_arith_series_with_scalar
```python
from test_categorical import test_arith_series_with_scalar
```



---
## _compare_other
```python
from test_categorical import _compare_other
```



---
## test_array_repr
```python
from test_categorical import test_array_repr
```



---
## test_groupby_extension_agg
```python
from test_categorical import test_groupby_extension_agg
```



---
## test_repr_2d
```python
from test_categorical import test_repr_2d
```



---
## __name__
```python
from test_interval import __name__
```



---
## make_data
```python
from test_interval import make_data
```



---
## dtype
```python
from test_interval import dtype
```



---
## data
```python
from test_interval import data
```

Length-100 PeriodArray for semantics test.

---
## data_missing
```python
from test_interval import data_missing
```

Length 2 array with [NA, Valid]

---
## data_for_twos
```python
from test_interval import data_for_twos
```



---
## data_for_sorting
```python
from test_interval import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_interval import data_missing_for_sorting
```



---
## data_for_grouping
```python
from test_interval import data_for_grouping
```



---
## TestIntervalArray
```python
from test_interval import TestIntervalArray
```



---
## test_fillna_non_scalar_raises
```python
from test_interval import test_fillna_non_scalar_raises
```



---
## _supports_reduction
```python
from test_interval import _supports_reduction
```



---
## test_fillna_length_mismatch
```python
from test_interval import test_fillna_length_mismatch
```



---
## dtype
```python
from test_datetime import dtype
```



---
## data
```python
from test_datetime import data
```



---
## data_missing
```python
from test_datetime import data_missing
```



---
## data_for_sorting
```python
from test_datetime import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_datetime import data_missing_for_sorting
```



---
## data_for_grouping
```python
from test_datetime import data_for_grouping
```

Expected to be like [B, B, NA, NA, A, A, B, C]

Where A < B < C and NA is missing

---
## na_cmp
```python
from test_datetime import na_cmp
```



---
## TestDatetimeArray
```python
from test_datetime import TestDatetimeArray
```



---
## Test2DCompat
```python
from test_datetime import Test2DCompat
```



---
## cmp
```python
from test_datetime import cmp
```



---
## _get_expected_exception
```python
from test_datetime import _get_expected_exception
```



---
## _supports_accumulation
```python
from test_datetime import _supports_accumulation
```



---
## _supports_reduction
```python
from test_datetime import _supports_reduction
```



---
## test_reduce_series_boolean
```python
from test_datetime import test_reduce_series_boolean
```



---
## test_series_constructor
```python
from test_datetime import test_series_constructor
```



---
## test_map
```python
from test_datetime import test_map
```



---
## check_reduce
```python
from test_datetime import check_reduce
```



---
## __name__
```python
from test_numpy import __name__
```

Additional tests for NumpyExtensionArray that aren't covered by
the interface tests.

---
## _assert_attr_equal
```python
from test_numpy import _assert_attr_equal
```

patch tm.assert_attr_equal so NumpyEADtype("object") is closed enough to
np.dtype("object")

---
## dtype
```python
from test_numpy import dtype
```



---
## allow_in_pandas
```python
from test_numpy import allow_in_pandas
```

A monkeypatch to tells pandas to let us in.

By default, passing a NumpyExtensionArray to an index / series / frame
constructor will unbox that NumpyExtensionArray to an ndarray, and treat
it as a non-EA column. We don't want people using EAs without
reason.

The mechanism for this is a check against ABCNumpyExtensionArray
in each constructor.

But, for testing, we need to allow them in pandas. So we patch
the _typ of NumpyExtensionArray, so that we evade the ABCNumpyExtensionArray
check.

---
## data
```python
from test_numpy import data
```



---
## data_missing
```python
from test_numpy import data_missing
```



---
## na_cmp
```python
from test_numpy import na_cmp
```



---
## data_for_sorting
```python
from test_numpy import data_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, C, A] with
A < B < C

---
## data_missing_for_sorting
```python
from test_numpy import data_missing_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, NA, A] with
A < B and NA missing.

---
## data_for_grouping
```python
from test_numpy import data_for_grouping
```

Data for factorization, grouping, and unique tests.

Expected to be like [B, B, NA, NA, A, A, B, C]

Where A < B < C and NA is missing

---
## data_for_twos
```python
from test_numpy import data_for_twos
```



---
## skip_numpy_object
```python
from test_numpy import skip_numpy_object
```

Tests for NumpyExtensionArray with nested data. Users typically won't create
these objects via `pd.array`, but they can show up through `.array`
on a Series with nested data. Many of the base tests fail, as they aren't
appropriate for nested data.

This fixture allows these tests to be skipped when used as a usefixtures
marker to either an individual test or a test class.

---
## TestNumpyExtensionArray
```python
from test_numpy import TestNumpyExtensionArray
```



---
## Test2DCompat
```python
from test_numpy import Test2DCompat
```



---
## cmp
```python
from test_numpy import cmp
```



---
## test_from_dtype
```python
from test_numpy import test_from_dtype
```



---
## test_series_constructor_scalar_with_index
```python
from test_numpy import test_series_constructor_scalar_with_index
```



---
## test_check_dtype
```python
from test_numpy import test_check_dtype
```



---
## test_is_not_object_type
```python
from test_numpy import test_is_not_object_type
```



---
## test_getitem_scalar
```python
from test_numpy import test_getitem_scalar
```



---
## test_shift_fill_value
```python
from test_numpy import test_shift_fill_value
```



---
## test_fillna_copy_frame
```python
from test_numpy import test_fillna_copy_frame
```



---
## test_fillna_copy_series
```python
from test_numpy import test_fillna_copy_series
```



---
## test_searchsorted
```python
from test_numpy import test_searchsorted
```



---
## test_diff
```python
from test_numpy import test_diff
```



---
## test_insert
```python
from test_numpy import test_insert
```



---
## test_insert_invalid
```python
from test_numpy import test_insert_invalid
```



---
## test_divmod
```python
from test_numpy import test_divmod
```



---
## test_divmod_series_array
```python
from test_numpy import test_divmod_series_array
```



---
## test_arith_series_with_scalar
```python
from test_numpy import test_arith_series_with_scalar
```



---
## test_arith_series_with_array
```python
from test_numpy import test_arith_series_with_array
```



---
## test_arith_frame_with_scalar
```python
from test_numpy import test_arith_frame_with_scalar
```



---
## _supports_reduction
```python
from test_numpy import _supports_reduction
```



---
## check_reduce
```python
from test_numpy import check_reduce
```



---
## test_reduce_frame
```python
from test_numpy import test_reduce_frame
```



---
## test_fillna_series
```python
from test_numpy import test_fillna_series
```



---
## test_fillna_frame
```python
from test_numpy import test_fillna_frame
```



---
## test_setitem_invalid
```python
from test_numpy import test_setitem_invalid
```



---
## test_setitem_sequence_broadcasts
```python
from test_numpy import test_setitem_sequence_broadcasts
```



---
## test_setitem_mask_broadcast
```python
from test_numpy import test_setitem_mask_broadcast
```



---
## test_setitem_scalar_key_sequence_raise
```python
from test_numpy import test_setitem_scalar_key_sequence_raise
```



---
## test_setitem_mask
```python
from test_numpy import test_setitem_mask
```



---
## test_setitem_integer_array
```python
from test_numpy import test_setitem_integer_array
```



---
## test_setitem_integer_with_missing_raises
```python
from test_numpy import test_setitem_integer_with_missing_raises
```



---
## test_setitem_slice
```python
from test_numpy import test_setitem_slice
```



---
## test_setitem_loc_iloc_slice
```python
from test_numpy import test_setitem_loc_iloc_slice
```



---
## test_setitem_with_expansion_dataframe_column
```python
from test_numpy import test_setitem_with_expansion_dataframe_column
```



---
## test_index_from_listlike_with_dtype
```python
from test_numpy import test_index_from_listlike_with_dtype
```



---
## test_EA_types
```python
from test_numpy import test_EA_types
```



---
## __name__
```python
from test_arrow import __name__
```

This file contains a minimal set of tests for compliance with the extension
array interface test suite, and should contain no other tests.
The test suite for the full functionality of the array is located in
`pandas/tests/arrays/`.
The tests in this file are inherited from the BaseExtensionTests, and only
minimal tweaks should be applied to get the tests passing (by overwriting a
parent method).
Additional tests should either be added to one of the BaseExtensionTests
classes (if they are relevant for the extension interface for all dtypes), or
be added to the array-specific tests in `pandas/tests/arrays/`.

---
## _require_timezone_database
```python
from test_arrow import _require_timezone_database
```



---
## dtype
```python
from test_arrow import dtype
```



---
## data
```python
from test_arrow import data
```



---
## data_missing
```python
from test_arrow import data_missing
```

Length-2 array with [NA, Valid]

---
## all_data
```python
from test_arrow import all_data
```

Parametrized fixture returning 'data' or 'data_missing' integer arrays.

Used to test dtype conversion with and without missing values.

---
## data_for_grouping
```python
from test_arrow import data_for_grouping
```

Data for factorization, grouping, and unique tests.

Expected to be like [B, B, NA, NA, A, A, B, C]

Where A < B < C and NA is missing

---
## data_for_sorting
```python
from test_arrow import data_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, C, A] with
A < B < C

---
## data_missing_for_sorting
```python
from test_arrow import data_missing_for_sorting
```

Length-3 array with a known sort order.

This should be three items [B, NA, A] with
A < B and NA missing.

---
## data_for_twos
```python
from test_arrow import data_for_twos
```

Length-100 array in which all the elements are two.

---
## TestArrowArray
```python
from test_arrow import TestArrowArray
```



---
## TestLogicalOps
```python
from test_arrow import TestLogicalOps
```

Various Series and DataFrame logical ops methods.

---
## test_bitwise
```python
from test_arrow import test_bitwise
```



---
## test_arrowdtype_construct_from_string_type_with_unsupported_parameters
```python
from test_arrow import test_arrowdtype_construct_from_string_type_with_unsupported_parameters
```



---
## test_arrowdtype_construct_from_string_supports_dt64tz
```python
from test_arrow import test_arrowdtype_construct_from_string_supports_dt64tz
```



---
## test_arrowdtype_construct_from_string_type_only_one_pyarrow
```python
from test_arrow import test_arrowdtype_construct_from_string_type_only_one_pyarrow
```



---
## test_arrow_string_multiplication
```python
from test_arrow import test_arrow_string_multiplication
```



---
## test_arrow_string_multiplication_scalar_repeat
```python
from test_arrow import test_arrow_string_multiplication_scalar_repeat
```



---
## test_quantile
```python
from test_arrow import test_quantile
```



---
## test_mode_dropna_true
```python
from test_arrow import test_mode_dropna_true
```



---
## test_mode_dropna_false_mode_na
```python
from test_arrow import test_mode_dropna_false_mode_na
```



---
## test_arrow_dtype_type
```python
from test_arrow import test_arrow_dtype_type
```



---
## test_is_bool_dtype
```python
from test_arrow import test_is_bool_dtype
```



---
## test_is_numeric_dtype
```python
from test_arrow import test_is_numeric_dtype
```



---
## test_is_integer_dtype
```python
from test_arrow import test_is_integer_dtype
```



---
## test_is_signed_integer_dtype
```python
from test_arrow import test_is_signed_integer_dtype
```



---
## test_is_unsigned_integer_dtype
```python
from test_arrow import test_is_unsigned_integer_dtype
```



---
## test_is_float_dtype
```python
from test_arrow import test_is_float_dtype
```



---
## test_pickle_roundtrip
```python
from test_arrow import test_pickle_roundtrip
```



---
## test_astype_from_non_pyarrow
```python
from test_arrow import test_astype_from_non_pyarrow
```



---
## test_astype_float_from_non_pyarrow_str
```python
from test_arrow import test_astype_float_from_non_pyarrow_str
```



---
## test_astype_errors_ignore
```python
from test_arrow import test_astype_errors_ignore
```



---
## test_to_numpy_with_defaults
```python
from test_arrow import test_to_numpy_with_defaults
```



---
## test_to_numpy_int_with_na
```python
from test_arrow import test_to_numpy_int_with_na
```



---
## test_to_numpy_null_array
```python
from test_arrow import test_to_numpy_null_array
```



---
## test_to_numpy_null_array_no_dtype
```python
from test_arrow import test_to_numpy_null_array_no_dtype
```



---
## test_to_numpy_without_dtype
```python
from test_arrow import test_to_numpy_without_dtype
```



---
## test_setitem_null_slice
```python
from test_arrow import test_setitem_null_slice
```



---
## test_setitem_invalid_dtype
```python
from test_arrow import test_setitem_invalid_dtype
```



---
## test_from_arrow_respecting_given_dtype
```python
from test_arrow import test_from_arrow_respecting_given_dtype
```



---
## test_from_arrow_respecting_given_dtype_unsafe
```python
from test_arrow import test_from_arrow_respecting_given_dtype_unsafe
```



---
## test_round
```python
from test_arrow import test_round
```



---
## test_searchsorted_with_na_raises
```python
from test_arrow import test_searchsorted_with_na_raises
```



---
## test_sort_values_dictionary
```python
from test_arrow import test_sort_values_dictionary
```



---
## test_str_count
```python
from test_arrow import test_str_count
```



---
## test_str_count_flags_unsupported
```python
from test_arrow import test_str_count_flags_unsupported
```



---
## test_str_pad
```python
from test_arrow import test_str_pad
```



---
## test_str_pad_invalid_side
```python
from test_arrow import test_str_pad_invalid_side
```



---
## test_str_contains
```python
from test_arrow import test_str_contains
```



---
## test_str_contains_flags_unsupported
```python
from test_arrow import test_str_contains_flags_unsupported
```



---
## test_str_start_ends_with
```python
from test_arrow import test_str_start_ends_with
```



---
## test_str_starts_ends_with_all_nulls_empty_tuple
```python
from test_arrow import test_str_starts_ends_with_all_nulls_empty_tuple
```



---
## test_str_replace_unsupported
```python
from test_arrow import test_str_replace_unsupported
```



---
## test_str_replace
```python
from test_arrow import test_str_replace
```



---
## test_str_replace_negative_n
```python
from test_arrow import test_str_replace_negative_n
```



---
## test_str_repeat_unsupported
```python
from test_arrow import test_str_repeat_unsupported
```



---
## test_str_repeat
```python
from test_arrow import test_str_repeat
```



---
## test_str_match
```python
from test_arrow import test_str_match
```



---
## test_str_fullmatch
```python
from test_arrow import test_str_fullmatch
```



---
## test_str_find
```python
from test_arrow import test_str_find
```



---
## test_str_find_negative_start
```python
from test_arrow import test_str_find_negative_start
```



---
## test_str_find_notimplemented
```python
from test_arrow import test_str_find_notimplemented
```



---
## test_str_get
```python
from test_arrow import test_str_get
```



---
## test_str_join
```python
from test_arrow import test_str_join
```



---
## test_str_join_string_type
```python
from test_arrow import test_str_join_string_type
```



---
## test_str_slice
```python
from test_arrow import test_str_slice
```



---
## test_str_slice_replace
```python
from test_arrow import test_str_slice_replace
```



---
## test_str_is_functions
```python
from test_arrow import test_str_is_functions
```



---
## test_str_transform_functions
```python
from test_arrow import test_str_transform_functions
```



---
## test_str_len
```python
from test_arrow import test_str_len
```



---
## test_str_strip
```python
from test_arrow import test_str_strip
```



---
## test_str_removesuffix
```python
from test_arrow import test_str_removesuffix
```



---
## test_str_removeprefix
```python
from test_arrow import test_str_removeprefix
```



---
## test_str_encode
```python
from test_arrow import test_str_encode
```



---
## test_str_findall
```python
from test_arrow import test_str_findall
```



---
## test_str_r_index
```python
from test_arrow import test_str_r_index
```



---
## test_str_normalize
```python
from test_arrow import test_str_normalize
```



---
## test_str_rfind
```python
from test_arrow import test_str_rfind
```



---
## test_str_translate
```python
from test_arrow import test_str_translate
```



---
## test_str_wrap
```python
from test_arrow import test_str_wrap
```



---
## test_get_dummies
```python
from test_arrow import test_get_dummies
```



---
## test_str_partition
```python
from test_arrow import test_str_partition
```



---
## test_str_split_pat_none
```python
from test_arrow import test_str_split_pat_none
```



---
## test_str_split
```python
from test_arrow import test_str_split
```



---
## test_str_rsplit
```python
from test_arrow import test_str_rsplit
```



---
## test_str_extract_non_symbolic
```python
from test_arrow import test_str_extract_non_symbolic
```



---
## test_str_extract
```python
from test_arrow import test_str_extract
```



---
## test_str_extract_expand
```python
from test_arrow import test_str_extract_expand
```



---
## test_duration_from_strings_with_nat
```python
from test_arrow import test_duration_from_strings_with_nat
```



---
## test_unsupported_dt
```python
from test_arrow import test_unsupported_dt
```



---
## test_dt_properties
```python
from test_arrow import test_dt_properties
```



---
## test_dt_is_month_start_end
```python
from test_arrow import test_dt_is_month_start_end
```



---
## test_dt_is_year_start_end
```python
from test_arrow import test_dt_is_year_start_end
```



---
## test_dt_is_quarter_start_end
```python
from test_arrow import test_dt_is_quarter_start_end
```



---
## test_dt_days_in_month
```python
from test_arrow import test_dt_days_in_month
```



---
## test_dt_normalize
```python
from test_arrow import test_dt_normalize
```



---
## test_dt_time_preserve_unit
```python
from test_arrow import test_dt_time_preserve_unit
```



---
## test_dt_tz
```python
from test_arrow import test_dt_tz
```



---
## test_dt_isocalendar
```python
from test_arrow import test_dt_isocalendar
```



---
## test_dt_day_month_name
```python
from test_arrow import test_dt_day_month_name
```



---
## test_dt_strftime
```python
from test_arrow import test_dt_strftime
```



---
## test_dt_roundlike_tz_options_not_supported
```python
from test_arrow import test_dt_roundlike_tz_options_not_supported
```



---
## test_dt_roundlike_unsupported_freq
```python
from test_arrow import test_dt_roundlike_unsupported_freq
```



---
## test_dt_ceil_year_floor
```python
from test_arrow import test_dt_ceil_year_floor
```



---
## test_dt_to_pydatetime
```python
from test_arrow import test_dt_to_pydatetime
```



---
## test_dt_to_pydatetime_date_error
```python
from test_arrow import test_dt_to_pydatetime_date_error
```



---
## test_dt_tz_localize_unsupported_tz_options
```python
from test_arrow import test_dt_tz_localize_unsupported_tz_options
```



---
## test_dt_tz_localize_none
```python
from test_arrow import test_dt_tz_localize_none
```



---
## test_dt_tz_localize
```python
from test_arrow import test_dt_tz_localize
```



---
## test_dt_tz_localize_nonexistent
```python
from test_arrow import test_dt_tz_localize_nonexistent
```



---
## test_dt_tz_convert_not_tz_raises
```python
from test_arrow import test_dt_tz_convert_not_tz_raises
```



---
## test_dt_tz_convert_none
```python
from test_arrow import test_dt_tz_convert_none
```



---
## test_dt_tz_convert
```python
from test_arrow import test_dt_tz_convert
```



---
## test_as_unit
```python
from test_arrow import test_as_unit
```



---
## test_dt_timedelta_properties
```python
from test_arrow import test_dt_timedelta_properties
```



---
## test_dt_timedelta_total_seconds
```python
from test_arrow import test_dt_timedelta_total_seconds
```



---
## test_dt_to_pytimedelta
```python
from test_arrow import test_dt_to_pytimedelta
```



---
## test_dt_components
```python
from test_arrow import test_dt_components
```



---
## test_boolean_reduce_series_all_null
```python
from test_arrow import test_boolean_reduce_series_all_null
```



---
## test_from_sequence_of_strings_boolean
```python
from test_arrow import test_from_sequence_of_strings_boolean
```



---
## test_concat_empty_arrow_backed_series
```python
from test_arrow import test_concat_empty_arrow_backed_series
```



---
## test_series_from_string_array
```python
from test_arrow import test_series_from_string_array
```



---
## OldArrowExtensionArray
```python
from test_arrow import OldArrowExtensionArray
```



---
## test_pickle_old_arrowextensionarray
```python
from test_arrow import test_pickle_old_arrowextensionarray
```



---
## test_setitem_boolean_replace_with_mask_segfault
```python
from test_arrow import test_setitem_boolean_replace_with_mask_segfault
```



---
## test_conversion_large_dtypes_from_numpy_array
```python
from test_arrow import test_conversion_large_dtypes_from_numpy_array
```



---
## test_concat_null_array
```python
from test_arrow import test_concat_null_array
```



---
## test_describe_numeric_data
```python
from test_arrow import test_describe_numeric_data
```



---
## test_describe_timedelta_data
```python
from test_arrow import test_describe_timedelta_data
```



---
## test_describe_datetime_data
```python
from test_arrow import test_describe_datetime_data
```



---
## test_quantile_temporal
```python
from test_arrow import test_quantile_temporal
```



---
## test_date32_repr
```python
from test_arrow import test_date32_repr
```



---
## test_duration_overflow_from_ndarray_containing_nat
```python
from test_arrow import test_duration_overflow_from_ndarray_containing_nat
```



---
## test_infer_dtype_pyarrow_dtype
```python
from test_arrow import test_infer_dtype_pyarrow_dtype
```



---
## test_from_sequence_temporal
```python
from test_arrow import test_from_sequence_temporal
```



---
## test_setitem_temporal
```python
from test_arrow import test_setitem_temporal
```



---
## test_arithmetic_temporal
```python
from test_arrow import test_arithmetic_temporal
```



---
## test_comparison_temporal
```python
from test_arrow import test_comparison_temporal
```



---
## test_getitem_temporal
```python
from test_arrow import test_getitem_temporal
```



---
## test_iter_temporal
```python
from test_arrow import test_iter_temporal
```



---
## test_groupby_series_size_returns_pa_int
```python
from test_arrow import test_groupby_series_size_returns_pa_int
```



---
## test_to_numpy_temporal
```python
from test_arrow import test_to_numpy_temporal
```



---
## test_groupby_count_return_arrow_dtype
```python
from test_arrow import test_groupby_count_return_arrow_dtype
```



---
## test_fixed_size_list
```python
from test_arrow import test_fixed_size_list
```



---
## test_arrowextensiondtype_dataframe_repr
```python
from test_arrow import test_arrowextensiondtype_dataframe_repr
```



---
## test_pow_missing_operand
```python
from test_arrow import test_pow_missing_operand
```



---
## test_duration_fillna_numpy
```python
from test_arrow import test_duration_fillna_numpy
```



---
## test_comparison_not_propagating_arrow_error
```python
from test_arrow import test_comparison_not_propagating_arrow_error
```



---
## test_factorize_chunked_dictionary
```python
from test_arrow import test_factorize_chunked_dictionary
```



---
## test_dictionary_astype_categorical
```python
from test_arrow import test_dictionary_astype_categorical
```



---
## test_arrow_floordiv
```python
from test_arrow import test_arrow_floordiv
```



---
## test_arrow_floordiv_large_values
```python
from test_arrow import test_arrow_floordiv_large_values
```



---
## test_arrow_floordiv_large_integral_result
```python
from test_arrow import test_arrow_floordiv_large_integral_result
```



---
## test_arrow_floordiv_larger_divisor
```python
from test_arrow import test_arrow_floordiv_larger_divisor
```



---
## test_arrow_floordiv_integral_invalid
```python
from test_arrow import test_arrow_floordiv_integral_invalid
```



---
## test_arrow_floordiv_floating_0_divisor
```python
from test_arrow import test_arrow_floordiv_floating_0_divisor
```



---
## test_astype_int_with_null_to_numpy_dtype
```python
from test_arrow import test_astype_int_with_null_to_numpy_dtype
```



---
## test_arrow_integral_floordiv_large_values
```python
from test_arrow import test_arrow_integral_floordiv_large_values
```



---
## test_arrow_true_division_large_divisor
```python
from test_arrow import test_arrow_true_division_large_divisor
```



---
## test_arrow_floor_division_large_divisor
```python
from test_arrow import test_arrow_floor_division_large_divisor
```



---
## test_string_to_datetime_parsing_cast
```python
from test_arrow import test_string_to_datetime_parsing_cast
```



---
## test_string_to_time_parsing_cast
```python
from test_arrow import test_string_to_time_parsing_cast
```



---
## test_to_numpy_float
```python
from test_arrow import test_to_numpy_float
```



---
## test_to_numpy_timestamp_to_int
```python
from test_arrow import test_to_numpy_timestamp_to_int
```



---
## test_map_numeric_na_action
```python
from test_arrow import test_map_numeric_na_action
```



---
## test_compare_scalar
```python
from test_arrow import test_compare_scalar
```



---
## test_map
```python
from test_arrow import test_map
```



---
## test_astype_str
```python
from test_arrow import test_astype_str
```



---
## test_astype_string
```python
from test_arrow import test_astype_string
```



---
## test_from_dtype
```python
from test_arrow import test_from_dtype
```



---
## test_from_sequence_pa_array
```python
from test_arrow import test_from_sequence_pa_array
```



---
## test_from_sequence_pa_array_notimplemented
```python
from test_arrow import test_from_sequence_pa_array_notimplemented
```



---
## test_from_sequence_of_strings_pa_array
```python
from test_arrow import test_from_sequence_of_strings_pa_array
```



---
## check_accumulate
```python
from test_arrow import check_accumulate
```



---
## _supports_accumulation
```python
from test_arrow import _supports_accumulation
```



---
## test_accumulate_series
```python
from test_arrow import test_accumulate_series
```



---
## _supports_reduction
```python
from test_arrow import _supports_reduction
```



---
## check_reduce
```python
from test_arrow import check_reduce
```



---
## test_reduce_series_numeric
```python
from test_arrow import test_reduce_series_numeric
```



---
## test_reduce_series_boolean
```python
from test_arrow import test_reduce_series_boolean
```



---
## _get_expected_reduction_dtype
```python
from test_arrow import _get_expected_reduction_dtype
```



---
## test_reduce_frame
```python
from test_arrow import test_reduce_frame
```



---
## test_median_not_approximate
```python
from test_arrow import test_median_not_approximate
```



---
## test_in_numeric_groupby
```python
from test_arrow import test_in_numeric_groupby
```



---
## test_construct_from_string_own_name
```python
from test_arrow import test_construct_from_string_own_name
```



---
## test_is_dtype_from_name
```python
from test_arrow import test_is_dtype_from_name
```



---
## test_construct_from_string_another_type_raises
```python
from test_arrow import test_construct_from_string_another_type_raises
```



---
## test_get_common_dtype
```python
from test_arrow import test_get_common_dtype
```



---
## test_is_not_string_type
```python
from test_arrow import test_is_not_string_type
```



---
## test_view
```python
from test_arrow import test_view
```



---
## test_fillna_no_op_returns_copy
```python
from test_arrow import test_fillna_no_op_returns_copy
```



---
## test_transpose
```python
from test_arrow import test_transpose
```



---
## test_setitem_preserves_views
```python
from test_arrow import test_setitem_preserves_views
```



---
## test_EA_types
```python
from test_arrow import test_EA_types
```



---
## test_invert
```python
from test_arrow import test_invert
```



---
## test_diff
```python
from test_arrow import test_diff
```



---
## test_value_counts_returns_pyarrow_int64
```python
from test_arrow import test_value_counts_returns_pyarrow_int64
```



---
## get_op_from_name
```python
from test_arrow import get_op_from_name
```



---
## _cast_pointwise_result
```python
from test_arrow import _cast_pointwise_result
```



---
## _is_temporal_supported
```python
from test_arrow import _is_temporal_supported
```



---
## _get_expected_exception
```python
from test_arrow import _get_expected_exception
```



---
## _get_arith_xfail_marker
```python
from test_arrow import _get_arith_xfail_marker
```



---
## test_arith_series_with_scalar
```python
from test_arrow import test_arith_series_with_scalar
```



---
## test_arith_frame_with_scalar
```python
from test_arrow import test_arith_frame_with_scalar
```



---
## test_arith_series_with_array
```python
from test_arrow import test_arith_series_with_array
```



---
## test_add_series_with_extension_array
```python
from test_arrow import test_add_series_with_extension_array
```



---
## test_invalid_other_comp
```python
from test_arrow import test_invalid_other_comp
```



---
## test_comp_masked_numpy
```python
from test_arrow import test_comp_masked_numpy
```



---
## test_kleene_or
```python
from test_arrow import test_kleene_or
```



---
## test_kleene_or_scalar
```python
from test_arrow import test_kleene_or_scalar
```



---
## test_kleene_and
```python
from test_arrow import test_kleene_and
```



---
## test_kleene_and_scalar
```python
from test_arrow import test_kleene_and_scalar
```



---
## test_kleene_xor
```python
from test_arrow import test_kleene_xor
```



---
## test_kleene_xor_scalar
```python
from test_arrow import test_kleene_xor_scalar
```



---
## test_logical_masked_numpy
```python
from test_arrow import test_logical_masked_numpy
```



---
## __getstate__
```python
from test_arrow import __getstate__
```



---
## rtruediv
```python
from test_arrow import rtruediv
```



---
## downsample_method
```python
from conftest import downsample_method
```

Fixture for parametrization of Grouper downsample methods.

---
## resample_method
```python
from conftest import resample_method
```

Fixture for parametrization of Grouper resample methods.

---
## _index_start
```python
from conftest import _index_start
```

Fixture for parametrization of index, series and frame.

---
## _index_end
```python
from conftest import _index_end
```

Fixture for parametrization of index, series and frame.

---
## _index_freq
```python
from conftest import _index_freq
```

Fixture for parametrization of index, series and frame.

---
## _index_name
```python
from conftest import _index_name
```

Fixture for parametrization of index, series and frame.

---
## _static_values
```python
from conftest import _static_values
```

Fixture for parametrization of values used in parametrization of
Series and DataFrames with date_range, period_range and
timedelta_range indexes

---
## _series_name
```python
from conftest import _series_name
```

Fixture for parametrization of Series name for Series used with
date_range, period_range and timedelta_range indexes

---
## series
```python
from conftest import series
```

Make mocked series as fixture.

---
## empty_series_dti
```python
from conftest import empty_series_dti
```

Fixture for parametrization of empty Series with date_range,
period_range and timedelta_range indexes

---
## frame
```python
from conftest import frame
```

Make mocked frame as fixture.

---
## empty_frame_dti
```python
from conftest import empty_frame_dti
```

Fixture for parametrization of empty DataFrame with date_range,
period_range and timedelta_range indexes

---
## series_and_frame
```python
from conftest import series_and_frame
```

Fixture for parametrization of Series and DataFrame with date_range,
period_range and timedelta_range indexes

---
## __name__
```python
from test_resampler_grouper import __name__
```



---
## test_frame
```python
from test_resampler_grouper import test_frame
```



---
## test_tab_complete_ipython6_warning
```python
from test_resampler_grouper import test_tab_complete_ipython6_warning
```



---
## test_deferred_with_groupby
```python
from test_resampler_grouper import test_deferred_with_groupby
```



---
## test_getitem
```python
from test_resampler_grouper import test_getitem
```



---
## test_getitem_multiple
```python
from test_resampler_grouper import test_getitem_multiple
```



---
## test_groupby_resample_on_api_with_getitem
```python
from test_resampler_grouper import test_groupby_resample_on_api_with_getitem
```



---
## test_groupby_with_origin
```python
from test_resampler_grouper import test_groupby_with_origin
```



---
## test_nearest
```python
from test_resampler_grouper import test_nearest
```



---
## test_methods
```python
from test_resampler_grouper import test_methods
```



---
## test_methods_nunique
```python
from test_resampler_grouper import test_methods_nunique
```



---
## test_methods_std_var
```python
from test_resampler_grouper import test_methods_std_var
```



---
## test_apply
```python
from test_resampler_grouper import test_apply
```



---
## test_apply_with_mutated_index
```python
from test_resampler_grouper import test_apply_with_mutated_index
```



---
## test_apply_columns_multilevel
```python
from test_resampler_grouper import test_apply_columns_multilevel
```



---
## test_apply_non_naive_index
```python
from test_resampler_grouper import test_apply_non_naive_index
```



---
## test_resample_groupby_with_label
```python
from test_resampler_grouper import test_resample_groupby_with_label
```



---
## test_consistency_with_window
```python
from test_resampler_grouper import test_consistency_with_window
```



---
## test_median_duplicate_columns
```python
from test_resampler_grouper import test_median_duplicate_columns
```



---
## test_apply_to_one_column_of_df
```python
from test_resampler_grouper import test_apply_to_one_column_of_df
```



---
## test_resample_groupby_agg
```python
from test_resampler_grouper import test_resample_groupby_agg
```



---
## test_resample_groupby_agg_listlike
```python
from test_resampler_grouper import test_resample_groupby_agg_listlike
```



---
## test_empty
```python
from test_resampler_grouper import test_empty
```



---
## test_resample_groupby_agg_object_dtype_all_nan
```python
from test_resampler_grouper import test_resample_groupby_agg_object_dtype_all_nan
```



---
## test_groupby_resample_with_list_of_keys
```python
from test_resampler_grouper import test_groupby_resample_with_list_of_keys
```



---
## test_resample_no_index
```python
from test_resampler_grouper import test_resample_no_index
```



---
## test_resample_no_columns
```python
from test_resampler_grouper import test_resample_no_columns
```



---
## test_groupby_resample_size_all_index_same
```python
from test_resampler_grouper import test_groupby_resample_size_all_index_same
```



---
## test_groupby_resample_on_index_with_list_of_keys
```python
from test_resampler_grouper import test_groupby_resample_on_index_with_list_of_keys
```



---
## test_groupby_resample_on_index_with_list_of_keys_multi_columns
```python
from test_resampler_grouper import test_groupby_resample_on_index_with_list_of_keys_multi_columns
```



---
## test_groupby_resample_on_index_with_list_of_keys_missing_column
```python
from test_resampler_grouper import test_groupby_resample_on_index_with_list_of_keys_missing_column
```



---
## test_groupby_resample_kind
```python
from test_resampler_grouper import test_groupby_resample_kind
```



---
## f_0
```python
from test_resampler_grouper import f_0
```



---
## f_1
```python
from test_resampler_grouper import f_1
```



---
## f
```python
from test_resampler_grouper import f
```



---
## weighted_quantile
```python
from test_resampler_grouper import weighted_quantile
```



---
## __name__
```python
from test_timedelta import __name__
```



---
## test_asfreq_bug
```python
from test_timedelta import test_asfreq_bug
```



---
## test_resample_with_nat
```python
from test_timedelta import test_resample_with_nat
```



---
## test_resample_as_freq_with_subperiod
```python
from test_timedelta import test_resample_as_freq_with_subperiod
```



---
## test_resample_with_timedeltas
```python
from test_timedelta import test_resample_with_timedeltas
```



---
## test_resample_single_period_timedelta
```python
from test_timedelta import test_resample_single_period_timedelta
```



---
## test_resample_timedelta_idempotency
```python
from test_timedelta import test_resample_timedelta_idempotency
```



---
## test_resample_offset_with_timedeltaindex
```python
from test_timedelta import test_resample_offset_with_timedeltaindex
```



---
## test_resample_categorical_data_with_timedeltaindex
```python
from test_timedelta import test_resample_categorical_data_with_timedeltaindex
```



---
## test_resample_timedelta_values
```python
from test_timedelta import test_resample_timedelta_values
```



---
## test_resample_timedelta_edge_case
```python
from test_timedelta import test_resample_timedelta_edge_case
```



---
## test_resample_with_timedelta_yields_no_empty_groups
```python
from test_timedelta import test_resample_with_timedelta_yields_no_empty_groups
```



---
## test_resample_quantile_timedelta
```python
from test_timedelta import test_resample_quantile_timedelta
```



---
## test_resample_closed_right
```python
from test_timedelta import test_resample_closed_right
```



---
## test_arrow_duration_resample
```python
from test_timedelta import test_arrow_duration_resample
```



---
## __name__
```python
from test_period_index import __name__
```



---
## _index_factory
```python
from test_period_index import _index_factory
```



---
## _series_name
```python
from test_period_index import _series_name
```



---
## simple_period_range_series
```python
from test_period_index import simple_period_range_series
```

Series with period range index and random data for test purposes.

---
## TestPeriodIndex
```python
from test_period_index import TestPeriodIndex
```



---
## test_resample_frequency_ME_QE_YE_error_message
```python
from test_period_index import test_resample_frequency_ME_QE_YE_error_message
```



---
## test_corner_cases_period
```python
from test_period_index import test_corner_cases_period
```



---
## test_resample_frequency_invalid_freq
```python
from test_period_index import test_resample_frequency_invalid_freq
```



---
## _simple_period_range_series
```python
from test_period_index import _simple_period_range_series
```



---
## test_asfreq
```python
from test_period_index import test_asfreq
```



---
## test_asfreq_fill_value
```python
from test_period_index import test_asfreq_fill_value
```



---
## test_selection
```python
from test_period_index import test_selection
```



---
## test_annual_upsample_cases
```python
from test_period_index import test_annual_upsample_cases
```



---
## test_basic_downsample
```python
from test_period_index import test_basic_downsample
```



---
## test_not_subperiod
```python
from test_period_index import test_not_subperiod
```



---
## test_basic_upsample
```python
from test_period_index import test_basic_upsample
```



---
## test_upsample_with_limit
```python
from test_period_index import test_upsample_with_limit
```



---
## test_annual_upsample
```python
from test_period_index import test_annual_upsample
```



---
## test_annual_upsample2
```python
from test_period_index import test_annual_upsample2
```



---
## test_quarterly_upsample
```python
from test_period_index import test_quarterly_upsample
```



---
## test_monthly_upsample
```python
from test_period_index import test_monthly_upsample
```



---
## test_resample_basic
```python
from test_period_index import test_resample_basic
```



---
## test_resample_count
```python
from test_period_index import test_resample_count
```



---
## test_resample_same_freq
```python
from test_period_index import test_resample_same_freq
```



---
## test_resample_incompat_freq
```python
from test_period_index import test_resample_incompat_freq
```



---
## test_with_local_timezone
```python
from test_period_index import test_with_local_timezone
```



---
## test_resample_with_tz
```python
from test_period_index import test_resample_with_tz
```



---
## test_resample_nonexistent_time_bin_edge
```python
from test_period_index import test_resample_nonexistent_time_bin_edge
```



---
## test_resample_nonexistent_time_bin_edge2
```python
from test_period_index import test_resample_nonexistent_time_bin_edge2
```



---
## test_resample_ambiguous_time_bin_edge
```python
from test_period_index import test_resample_ambiguous_time_bin_edge
```



---
## test_fill_method_and_how_upsample
```python
from test_period_index import test_fill_method_and_how_upsample
```



---
## test_weekly_upsample
```python
from test_period_index import test_weekly_upsample
```



---
## test_resample_to_timestamps
```python
from test_period_index import test_resample_to_timestamps
```



---
## test_resample_to_quarterly
```python
from test_period_index import test_resample_to_quarterly
```



---
## test_resample_to_quarterly_start_end
```python
from test_period_index import test_resample_to_quarterly_start_end
```



---
## test_resample_fill_missing
```python
from test_period_index import test_resample_fill_missing
```



---
## test_cant_fill_missing_dups
```python
from test_period_index import test_cant_fill_missing_dups
```



---
## test_resample_5minute
```python
from test_period_index import test_resample_5minute
```



---
## test_upsample_daily_business_daily
```python
from test_period_index import test_upsample_daily_business_daily
```



---
## test_resample_irregular_sparse
```python
from test_period_index import test_resample_irregular_sparse
```



---
## test_resample_weekly_all_na
```python
from test_period_index import test_resample_weekly_all_na
```



---
## test_resample_tz_localized
```python
from test_period_index import test_resample_tz_localized
```



---
## test_resample_tz_localized2
```python
from test_period_index import test_resample_tz_localized2
```



---
## test_resample_tz_localized3
```python
from test_period_index import test_resample_tz_localized3
```



---
## test_closed_left_corner
```python
from test_period_index import test_closed_left_corner
```



---
## test_quarterly_resampling
```python
from test_period_index import test_quarterly_resampling
```



---
## test_resample_weekly_bug_1726
```python
from test_period_index import test_resample_weekly_bug_1726
```



---
## test_resample_with_dst_time_change
```python
from test_period_index import test_resample_with_dst_time_change
```



---
## test_resample_bms_2752
```python
from test_period_index import test_resample_bms_2752
```



---
## test_monthly_convention_span
```python
from test_period_index import test_monthly_convention_span
```



---
## test_default_right_closed_label
```python
from test_period_index import test_default_right_closed_label
```



---
## test_default_left_closed_label
```python
from test_period_index import test_default_left_closed_label
```



---
## test_all_values_single_bin
```python
from test_period_index import test_all_values_single_bin
```



---
## test_evenly_divisible_with_no_extra_bins
```python
from test_period_index import test_evenly_divisible_with_no_extra_bins
```



---
## test_evenly_divisible_with_no_extra_bins2
```python
from test_period_index import test_evenly_divisible_with_no_extra_bins2
```



---
## test_upsampling_ohlc
```python
from test_period_index import test_upsampling_ohlc
```



---
## test_resample_with_nat
```python
from test_period_index import test_resample_with_nat
```



---
## test_resample_with_only_nat
```python
from test_period_index import test_resample_with_only_nat
```



---
## test_resample_with_offset
```python
from test_period_index import test_resample_with_offset
```



---
## test_resample_with_offset_month
```python
from test_period_index import test_resample_with_offset_month
```



---
## test_get_period_range_edges
```python
from test_period_index import test_get_period_range_edges
```



---
## test_sum_min_count
```python
from test_period_index import test_sum_min_count
```



---
## test_resample_t_l_deprecated
```python
from test_period_index import test_resample_t_l_deprecated
```



---
## test_resample_lowercase_frequency_deprecated
```python
from test_period_index import test_resample_lowercase_frequency_deprecated
```



---
## test_asfreq_invalid_period_offset
```python
from test_period_index import test_asfreq_invalid_period_offset
```



---
## __name__
```python
from test_datetime_index import __name__
```



---
## _index_factory
```python
from test_datetime_index import _index_factory
```



---
## _index_freq
```python
from test_datetime_index import _index_freq
```



---
## _static_values
```python
from test_datetime_index import _static_values
```



---
## unit
```python
from test_datetime_index import unit
```



---
## simple_date_range_series
```python
from test_datetime_index import simple_date_range_series
```

Series with date range index and random data for test purposes.

---
## test_custom_grouper
```python
from test_datetime_index import test_custom_grouper
```



---
## test_custom_grouper_df
```python
from test_datetime_index import test_custom_grouper_df
```



---
## test_resample_basic
```python
from test_datetime_index import test_resample_basic
```



---
## test_resample_integerarray
```python
from test_datetime_index import test_resample_integerarray
```



---
## test_resample_basic_grouper
```python
from test_datetime_index import test_resample_basic_grouper
```



---
## test_resample_string_kwargs
```python
from test_datetime_index import test_resample_string_kwargs
```



---
## test_resample_how
```python
from test_datetime_index import test_resample_how
```



---
## test_resample_how_ohlc
```python
from test_datetime_index import test_resample_how_ohlc
```



---
## test_resample_how_callables
```python
from test_datetime_index import test_resample_how_callables
```



---
## test_resample_rounding
```python
from test_datetime_index import test_resample_rounding
```



---
## test_resample_basic_from_daily
```python
from test_datetime_index import test_resample_basic_from_daily
```



---
## test_resample_upsampling_picked_but_not_correct
```python
from test_datetime_index import test_resample_upsampling_picked_but_not_correct
```



---
## test_resample_frame_basic_cy_funcs
```python
from test_datetime_index import test_resample_frame_basic_cy_funcs
```



---
## test_resample_frame_basic_M_A
```python
from test_datetime_index import test_resample_frame_basic_M_A
```



---
## test_resample_frame_basic_kind
```python
from test_datetime_index import test_resample_frame_basic_kind
```



---
## test_resample_upsample
```python
from test_datetime_index import test_resample_upsample
```



---
## test_resample_how_method
```python
from test_datetime_index import test_resample_how_method
```



---
## test_resample_extra_index_point
```python
from test_datetime_index import test_resample_extra_index_point
```



---
## test_upsample_with_limit
```python
from test_datetime_index import test_upsample_with_limit
```



---
## test_nearest_upsample_with_limit
```python
from test_datetime_index import test_nearest_upsample_with_limit
```



---
## test_resample_ohlc
```python
from test_datetime_index import test_resample_ohlc
```



---
## test_resample_ohlc_result
```python
from test_datetime_index import test_resample_ohlc_result
```



---
## test_resample_ohlc_result_odd_period
```python
from test_datetime_index import test_resample_ohlc_result_odd_period
```



---
## test_resample_ohlc_dataframe
```python
from test_datetime_index import test_resample_ohlc_dataframe
```



---
## test_resample_dup_index
```python
from test_datetime_index import test_resample_dup_index
```



---
## test_resample_reresample
```python
from test_datetime_index import test_resample_reresample
```



---
## test_resample_timestamp_to_period
```python
from test_datetime_index import test_resample_timestamp_to_period
```



---
## test_ohlc_5min
```python
from test_datetime_index import test_ohlc_5min
```



---
## test_downsample_non_unique
```python
from test_datetime_index import test_downsample_non_unique
```



---
## test_asfreq_non_unique
```python
from test_datetime_index import test_asfreq_non_unique
```



---
## test_resample_axis1
```python
from test_datetime_index import test_resample_axis1
```



---
## test_resample_anchored_ticks
```python
from test_datetime_index import test_resample_anchored_ticks
```



---
## test_resample_single_group
```python
from test_datetime_index import test_resample_single_group
```



---
## test_resample_single_group_std
```python
from test_datetime_index import test_resample_single_group_std
```



---
## test_resample_offset
```python
from test_datetime_index import test_resample_offset
```



---
## test_resample_origin
```python
from test_datetime_index import test_resample_origin
```



---
## test_resample_bad_origin
```python
from test_datetime_index import test_resample_bad_origin
```



---
## test_resample_bad_offset
```python
from test_datetime_index import test_resample_bad_offset
```



---
## test_resample_origin_prime_freq
```python
from test_datetime_index import test_resample_origin_prime_freq
```



---
## test_resample_origin_with_tz
```python
from test_datetime_index import test_resample_origin_with_tz
```



---
## test_resample_origin_epoch_with_tz_day_vs_24h
```python
from test_datetime_index import test_resample_origin_epoch_with_tz_day_vs_24h
```



---
## test_resample_origin_with_day_freq_on_dst
```python
from test_datetime_index import test_resample_origin_with_day_freq_on_dst
```



---
## test_resample_daily_anchored
```python
from test_datetime_index import test_resample_daily_anchored
```



---
## test_resample_to_period_monthly_buglet
```python
from test_datetime_index import test_resample_to_period_monthly_buglet
```



---
## test_period_with_agg
```python
from test_datetime_index import test_period_with_agg
```



---
## test_resample_segfault
```python
from test_datetime_index import test_resample_segfault
```



---
## test_resample_dtype_preservation
```python
from test_datetime_index import test_resample_dtype_preservation
```



---
## test_resample_dtype_coercion
```python
from test_datetime_index import test_resample_dtype_coercion
```



---
## test_weekly_resample_buglet
```python
from test_datetime_index import test_weekly_resample_buglet
```



---
## test_monthly_resample_error
```python
from test_datetime_index import test_monthly_resample_error
```



---
## test_nanosecond_resample_error
```python
from test_datetime_index import test_nanosecond_resample_error
```



---
## test_resample_anchored_intraday
```python
from test_datetime_index import test_resample_anchored_intraday
```



---
## test_resample_anchored_intraday2
```python
from test_datetime_index import test_resample_anchored_intraday2
```



---
## test_resample_anchored_intraday3
```python
from test_datetime_index import test_resample_anchored_intraday3
```



---
## test_resample_anchored_monthstart
```python
from test_datetime_index import test_resample_anchored_monthstart
```



---
## test_resample_anchored_multiday
```python
from test_datetime_index import test_resample_anchored_multiday
```



---
## test_corner_cases
```python
from test_datetime_index import test_corner_cases
```



---
## test_corner_cases_date
```python
from test_datetime_index import test_corner_cases_date
```



---
## test_anchored_lowercase_buglet
```python
from test_datetime_index import test_anchored_lowercase_buglet
```



---
## test_upsample_apply_functions
```python
from test_datetime_index import test_upsample_apply_functions
```



---
## test_resample_not_monotonic
```python
from test_datetime_index import test_resample_not_monotonic
```



---
## test_resample_median_bug_1688
```python
from test_datetime_index import test_resample_median_bug_1688
```



---
## test_how_lambda_functions
```python
from test_datetime_index import test_how_lambda_functions
```



---
## test_resample_unequal_times
```python
from test_datetime_index import test_resample_unequal_times
```



---
## test_resample_consistency
```python
from test_datetime_index import test_resample_consistency
```



---
## test_resample_timegrouper
```python
from test_datetime_index import test_resample_timegrouper
```



---
## test_resample_timegrouper2
```python
from test_datetime_index import test_resample_timegrouper2
```



---
## test_resample_nunique
```python
from test_datetime_index import test_resample_nunique
```



---
## test_resample_nunique_preserves_column_level_names
```python
from test_datetime_index import test_resample_nunique_preserves_column_level_names
```



---
## test_resample_nunique_with_date_gap
```python
from test_datetime_index import test_resample_nunique_with_date_gap
```



---
## test_resample_group_info
```python
from test_datetime_index import test_resample_group_info
```



---
## test_resample_size
```python
from test_datetime_index import test_resample_size
```



---
## test_resample_across_dst
```python
from test_datetime_index import test_resample_across_dst
```



---
## test_groupby_with_dst_time_change
```python
from test_datetime_index import test_groupby_with_dst_time_change
```



---
## test_resample_dst_anchor
```python
from test_datetime_index import test_resample_dst_anchor
```



---
## test_resample_dst_anchor2
```python
from test_datetime_index import test_resample_dst_anchor2
```



---
## test_downsample_across_dst
```python
from test_datetime_index import test_downsample_across_dst
```



---
## test_downsample_across_dst_weekly
```python
from test_datetime_index import test_downsample_across_dst_weekly
```



---
## test_downsample_across_dst_weekly_2
```python
from test_datetime_index import test_downsample_across_dst_weekly_2
```



---
## test_downsample_dst_at_midnight
```python
from test_datetime_index import test_downsample_dst_at_midnight
```



---
## test_resample_with_nat
```python
from test_datetime_index import test_resample_with_nat
```



---
## test_resample_datetime_values
```python
from test_datetime_index import test_resample_datetime_values
```



---
## test_resample_apply_with_additional_args
```python
from test_datetime_index import test_resample_apply_with_additional_args
```



---
## test_resample_apply_with_additional_args2
```python
from test_datetime_index import test_resample_apply_with_additional_args2
```



---
## test_resample_equivalent_offsets
```python
from test_datetime_index import test_resample_equivalent_offsets
```



---
## test_get_timestamp_range_edges
```python
from test_datetime_index import test_get_timestamp_range_edges
```



---
## test_resample_apply_product
```python
from test_datetime_index import test_resample_apply_product
```



---
## test_resample_calendar_day_with_dst
```python
from test_datetime_index import test_resample_calendar_day_with_dst
```



---
## test_resample_aggregate_functions_min_count
```python
from test_datetime_index import test_resample_aggregate_functions_min_count
```



---
## test_resample_unsigned_int
```python
from test_datetime_index import test_resample_unsigned_int
```



---
## test_long_rule_non_nano
```python
from test_datetime_index import test_long_rule_non_nano
```



---
## test_resample_empty_series_with_tz
```python
from test_datetime_index import test_resample_empty_series_with_tz
```



---
## test_resample_M_Q_Y_A_deprecated
```python
from test_datetime_index import test_resample_M_Q_Y_A_deprecated
```



---
## test_resample_BM_BQ_deprecated
```python
from test_datetime_index import test_resample_BM_BQ_deprecated
```



---
## test_resample_ms_closed_right
```python
from test_datetime_index import test_resample_ms_closed_right
```



---
## test_resample_c_b_closed_right
```python
from test_datetime_index import test_resample_c_b_closed_right
```



---
## test_resample_b_55282
```python
from test_datetime_index import test_resample_b_55282
```



---
## test_arrow_timestamp_resample
```python
from test_datetime_index import test_arrow_timestamp_resample
```



---
## _simple_date_range_series
```python
from test_datetime_index import _simple_date_range_series
```



---
## _ohlc
```python
from test_datetime_index import _ohlc
```



---
## fn
```python
from test_datetime_index import fn
```



---
## FnClass
```python
from test_datetime_index import FnClass
```



---
## _create_series
```python
from test_datetime_index import _create_series
```



---
## f
```python
from test_datetime_index import f
```



---
## __call__
```python
from test_datetime_index import __call__
```



---
## create_index
```python
from test_base import create_index
```



---
## test_asfreq
```python
from test_base import test_asfreq
```



---
## test_asfreq_fill_value
```python
from test_base import test_asfreq_fill_value
```



---
## test_resample_interpolate
```python
from test_base import test_resample_interpolate
```



---
## test_raises_on_non_datetimelike_index
```python
from test_base import test_raises_on_non_datetimelike_index
```



---
## test_resample_empty_series
```python
from test_base import test_resample_empty_series
```



---
## test_resample_nat_index_series
```python
from test_base import test_resample_nat_index_series
```



---
## test_resample_count_empty_series
```python
from test_base import test_resample_count_empty_series
```



---
## test_resample_empty_dataframe
```python
from test_base import test_resample_empty_dataframe
```



---
## test_resample_count_empty_dataframe
```python
from test_base import test_resample_count_empty_dataframe
```



---
## test_resample_size_empty_dataframe
```python
from test_base import test_resample_size_empty_dataframe
```



---
## test_resample_empty_dtypes
```python
from test_base import test_resample_empty_dtypes
```



---
## test_apply_to_empty_series
```python
from test_base import test_apply_to_empty_series
```



---
## test_resampler_is_iterable
```python
from test_base import test_resampler_is_iterable
```



---
## test_resample_quantile
```python
from test_base import test_resample_quantile
```



---
## test_first_last_skipna
```python
from test_base import test_first_last_skipna
```



---
## _create_index
```python
from test_base import _create_index
```

return the _index_factory created using the args, kwargs

---
## __name__
```python
from test_time_grouper import __name__
```



---
## test_series
```python
from test_time_grouper import test_series
```



---
## test_apply
```python
from test_time_grouper import test_apply
```



---
## test_count
```python
from test_time_grouper import test_count
```



---
## test_numpy_reduction
```python
from test_time_grouper import test_numpy_reduction
```



---
## test_apply_iteration
```python
from test_time_grouper import test_apply_iteration
```



---
## test_fails_on_no_datetime_index
```python
from test_time_grouper import test_fails_on_no_datetime_index
```



---
## test_aaa_group_order
```python
from test_time_grouper import test_aaa_group_order
```



---
## test_aggregate_normal
```python
from test_time_grouper import test_aggregate_normal
```

Check TimeGrouper's aggregation is identical as normal groupby.

---
## test_aggregate_nth
```python
from test_time_grouper import test_aggregate_nth
```

Check TimeGrouper's aggregation is identical as normal groupby.

---
## test_resample_entirely_nat_window
```python
from test_time_grouper import test_resample_entirely_nat_window
```



---
## test_aggregate_with_nat
```python
from test_time_grouper import test_aggregate_with_nat
```



---
## test_aggregate_with_nat_size
```python
from test_time_grouper import test_aggregate_with_nat_size
```



---
## test_repr
```python
from test_time_grouper import test_repr
```



---
## test_upsample_sum
```python
from test_time_grouper import test_upsample_sum
```



---
## test_groupby_resample_interpolate
```python
from test_time_grouper import test_groupby_resample_interpolate
```



---
## f
```python
from test_time_grouper import f
```



---
## __name__
```python
from test_resample_api import __name__
```



---
## dti
```python
from test_resample_api import dti
```



---
## _test_series
```python
from test_resample_api import _test_series
```



---
## test_frame
```python
from test_resample_api import test_frame
```



---
## test_str
```python
from test_resample_api import test_str
```



---
## test_api
```python
from test_resample_api import test_api
```



---
## test_groupby_resample_api
```python
from test_resample_api import test_groupby_resample_api
```



---
## test_groupby_resample_on_api
```python
from test_resample_api import test_groupby_resample_on_api
```



---
## test_resample_group_keys
```python
from test_resample_api import test_resample_group_keys
```



---
## test_pipe
```python
from test_resample_api import test_pipe
```



---
## test_getitem
```python
from test_resample_api import test_getitem
```



---
## test_select_bad_cols
```python
from test_resample_api import test_select_bad_cols
```



---
## test_attribute_access
```python
from test_resample_api import test_attribute_access
```



---
## test_api_compat_before_use
```python
from test_resample_api import test_api_compat_before_use
```



---
## tests_raises_on_nuisance
```python
from test_resample_api import tests_raises_on_nuisance
```



---
## test_downsample_but_actually_upsampling
```python
from test_resample_api import test_downsample_but_actually_upsampling
```



---
## test_combined_up_downsampling_of_irregular
```python
from test_resample_api import test_combined_up_downsampling_of_irregular
```



---
## test_transform_series
```python
from test_resample_api import test_transform_series
```



---
## test_transform_frame
```python
from test_resample_api import test_transform_frame
```



---
## test_fillna
```python
from test_resample_api import test_fillna
```



---
## test_apply_without_aggregation
```python
from test_resample_api import test_apply_without_aggregation
```



---
## test_apply_without_aggregation2
```python
from test_resample_api import test_apply_without_aggregation2
```



---
## test_agg_consistency
```python
from test_resample_api import test_agg_consistency
```



---
## test_agg_consistency_int_str_column_mix
```python
from test_resample_api import test_agg_consistency_int_str_column_mix
```



---
## index
```python
from test_resample_api import index
```



---
## df
```python
from test_resample_api import df
```



---
## df_col
```python
from test_resample_api import df_col
```



---
## df_mult
```python
from test_resample_api import df_mult
```



---
## a_mean
```python
from test_resample_api import a_mean
```



---
## a_std
```python
from test_resample_api import a_std
```



---
## a_sum
```python
from test_resample_api import a_sum
```



---
## b_mean
```python
from test_resample_api import b_mean
```



---
## b_std
```python
from test_resample_api import b_std
```



---
## b_sum
```python
from test_resample_api import b_sum
```



---
## df_resample
```python
from test_resample_api import df_resample
```



---
## df_col_resample
```python
from test_resample_api import df_col_resample
```



---
## df_mult_resample
```python
from test_resample_api import df_mult_resample
```



---
## df_grouper_resample
```python
from test_resample_api import df_grouper_resample
```



---
## cases
```python
from test_resample_api import cases
```



---
## test_agg_mixed_column_aggregation
```python
from test_resample_api import test_agg_mixed_column_aggregation
```



---
## test_agg_both_mean_std_named_result
```python
from test_resample_api import test_agg_both_mean_std_named_result
```



---
## test_agg_both_mean_std_dict_of_list
```python
from test_resample_api import test_agg_both_mean_std_dict_of_list
```



---
## test_agg_both_mean_sum
```python
from test_resample_api import test_agg_both_mean_sum
```



---
## test_agg_dict_of_dict_specificationerror
```python
from test_resample_api import test_agg_dict_of_dict_specificationerror
```



---
## test_agg_dict_of_lists
```python
from test_resample_api import test_agg_dict_of_lists
```



---
## test_agg_with_lambda
```python
from test_resample_api import test_agg_with_lambda
```



---
## test_agg_no_column
```python
from test_resample_api import test_agg_no_column
```



---
## test_agg_specificationerror_nested
```python
from test_resample_api import test_agg_specificationerror_nested
```



---
## test_agg_specificationerror_series
```python
from test_resample_api import test_agg_specificationerror_series
```



---
## test_agg_specificationerror_invalid_names
```python
from test_resample_api import test_agg_specificationerror_invalid_names
```



---
## test_multi_agg_axis_1_raises
```python
from test_resample_api import test_multi_agg_axis_1_raises
```



---
## test_agg_nested_dicts
```python
from test_resample_api import test_agg_nested_dicts
```



---
## test_try_aggregate_non_existing_column
```python
from test_resample_api import test_try_aggregate_non_existing_column
```



---
## test_agg_list_like_func_with_args
```python
from test_resample_api import test_agg_list_like_func_with_args
```



---
## test_selection_api_validation
```python
from test_resample_api import test_selection_api_validation
```



---
## test_agg_with_datetime_index_list_agg_func
```python
from test_resample_api import test_agg_with_datetime_index_list_agg_func
```



---
## test_resample_agg_readonly
```python
from test_resample_api import test_resample_agg_readonly
```



---
## test_end_and_end_day_origin
```python
from test_resample_api import test_end_and_end_day_origin
```



---
## test_frame_downsample_method
```python
from test_resample_api import test_frame_downsample_method
```



---
## test_series_downsample_method
```python
from test_resample_api import test_series_downsample_method
```



---
## test_args_kwargs_depr
```python
from test_resample_api import test_args_kwargs_depr
```



---
## test_df_axis_param_depr
```python
from test_resample_api import test_df_axis_param_depr
```



---
## test_series_axis_param_depr
```python
from test_resample_api import test_series_axis_param_depr
```



---
## test_resample_empty
```python
from test_resample_api import test_resample_empty
```



---
## foo1
```python
from test_resample_api import foo1
```



---
## foo2
```python
from test_resample_api import foo2
```



---
## __name__
```python
from test_deprecate_nonkeyword_arguments import __name__
```

Tests for the `deprecate_nonkeyword_arguments` decorator

---
## f
```python
from test_deprecate_nonkeyword_arguments import f
```



---
## test_f_signature
```python
from test_deprecate_nonkeyword_arguments import test_f_signature
```



---
## test_one_argument
```python
from test_deprecate_nonkeyword_arguments import test_one_argument
```



---
## test_one_and_one_arguments
```python
from test_deprecate_nonkeyword_arguments import test_one_and_one_arguments
```



---
## test_two_arguments
```python
from test_deprecate_nonkeyword_arguments import test_two_arguments
```



---
## test_two_and_two_arguments
```python
from test_deprecate_nonkeyword_arguments import test_two_and_two_arguments
```



---
## test_three_arguments
```python
from test_deprecate_nonkeyword_arguments import test_three_arguments
```



---
## test_four_arguments
```python
from test_deprecate_nonkeyword_arguments import test_four_arguments
```



---
## test_three_arguments_with_name_in_warning
```python
from test_deprecate_nonkeyword_arguments import test_three_arguments_with_name_in_warning
```



---
## g
```python
from test_deprecate_nonkeyword_arguments import g
```



---
## test_g_signature
```python
from test_deprecate_nonkeyword_arguments import test_g_signature
```



---
## test_one_and_three_arguments_default_allowed_args
```python
from test_deprecate_nonkeyword_arguments import test_one_and_three_arguments_default_allowed_args
```



---
## test_three_arguments_default_allowed_args
```python
from test_deprecate_nonkeyword_arguments import test_three_arguments_default_allowed_args
```



---
## test_three_positional_argument_with_warning_message_analysis
```python
from test_deprecate_nonkeyword_arguments import test_three_positional_argument_with_warning_message_analysis
```



---
## h
```python
from test_deprecate_nonkeyword_arguments import h
```



---
## test_h_signature
```python
from test_deprecate_nonkeyword_arguments import test_h_signature
```



---
## test_all_keyword_arguments
```python
from test_deprecate_nonkeyword_arguments import test_all_keyword_arguments
```



---
## test_one_positional_argument
```python
from test_deprecate_nonkeyword_arguments import test_one_positional_argument
```



---
## test_one_positional_argument_with_warning_message_analysis
```python
from test_deprecate_nonkeyword_arguments import test_one_positional_argument_with_warning_message_analysis
```



---
## i
```python
from test_deprecate_nonkeyword_arguments import i
```



---
## test_i_signature
```python
from test_deprecate_nonkeyword_arguments import test_i_signature
```



---
## Foo
```python
from test_deprecate_nonkeyword_arguments import Foo
```



---
## test_foo_signature
```python
from test_deprecate_nonkeyword_arguments import test_foo_signature
```



---
## test_class
```python
from test_deprecate_nonkeyword_arguments import test_class
```



---
## baz
```python
from test_deprecate_nonkeyword_arguments import baz
```



---
## __name__
```python
from test_validate_args_and_kwargs import __name__
```



---
## _fname
```python
from test_validate_args_and_kwargs import _fname
```



---
## test_invalid_total_length_max_length_one
```python
from test_validate_args_and_kwargs import test_invalid_total_length_max_length_one
```



---
## test_invalid_total_length_max_length_multiple
```python
from test_validate_args_and_kwargs import test_invalid_total_length_max_length_multiple
```



---
## test_missing_args_or_kwargs
```python
from test_validate_args_and_kwargs import test_missing_args_or_kwargs
```



---
## test_duplicate_argument
```python
from test_validate_args_and_kwargs import test_duplicate_argument
```



---
## test_validation
```python
from test_validate_args_and_kwargs import test_validation
```



---
## __name__
```python
from test_assert_series_equal import __name__
```



---
## _assert_series_equal_both
```python
from test_assert_series_equal import _assert_series_equal_both
```

Check that two Series equal.

This check is performed commutatively.

Parameters
----------
a : Series
    The first Series to compare.
b : Series
    The second Series to compare.
kwargs : dict
    The arguments passed to `tm.assert_series_equal`.

---
## _assert_not_series_equal
```python
from test_assert_series_equal import _assert_not_series_equal
```

Check that two Series are not equal.

Parameters
----------
a : Series
    The first Series to compare.
b : Series
    The second Series to compare.
kwargs : dict
    The arguments passed to `tm.assert_series_equal`.

---
## _assert_not_series_equal_both
```python
from test_assert_series_equal import _assert_not_series_equal_both
```

Check that two Series are not equal.

This check is performed commutatively.

Parameters
----------
a : Series
    The first Series to compare.
b : Series
    The second Series to compare.
kwargs : dict
    The arguments passed to `tm.assert_series_equal`.

---
## test_series_equal
```python
from test_assert_series_equal import test_series_equal
```



---
## test_series_not_equal_value_mismatch
```python
from test_assert_series_equal import test_series_not_equal_value_mismatch
```



---
## test_series_not_equal_metadata_mismatch
```python
from test_assert_series_equal import test_series_not_equal_metadata_mismatch
```



---
## test_less_precise
```python
from test_assert_series_equal import test_less_precise
```



---
## test_series_equal_index_dtype
```python
from test_assert_series_equal import test_series_equal_index_dtype
```



---
## test_series_equal_order_mismatch
```python
from test_assert_series_equal import test_series_equal_order_mismatch
```



---
## test_series_equal_index_mismatch
```python
from test_assert_series_equal import test_series_equal_index_mismatch
```



---
## test_series_invalid_param_combination
```python
from test_assert_series_equal import test_series_invalid_param_combination
```



---
## test_series_equal_length_mismatch
```python
from test_assert_series_equal import test_series_equal_length_mismatch
```



---
## test_series_equal_numeric_values_mismatch
```python
from test_assert_series_equal import test_series_equal_numeric_values_mismatch
```



---
## test_series_equal_categorical_values_mismatch
```python
from test_assert_series_equal import test_series_equal_categorical_values_mismatch
```



---
## test_series_equal_datetime_values_mismatch
```python
from test_assert_series_equal import test_series_equal_datetime_values_mismatch
```



---
## test_series_equal_categorical_mismatch
```python
from test_assert_series_equal import test_series_equal_categorical_mismatch
```



---
## test_assert_series_equal_extension_dtype_mismatch
```python
from test_assert_series_equal import test_assert_series_equal_extension_dtype_mismatch
```



---
## test_assert_series_equal_interval_dtype_mismatch
```python
from test_assert_series_equal import test_assert_series_equal_interval_dtype_mismatch
```



---
## test_series_equal_series_type
```python
from test_assert_series_equal import test_series_equal_series_type
```



---
## test_series_equal_exact_for_nonnumeric
```python
from test_assert_series_equal import test_series_equal_exact_for_nonnumeric
```



---
## test_assert_series_equal_ignore_extension_dtype_mismatch
```python
from test_assert_series_equal import test_assert_series_equal_ignore_extension_dtype_mismatch
```



---
## test_assert_series_equal_ignore_extension_dtype_mismatch_cross_class
```python
from test_assert_series_equal import test_assert_series_equal_ignore_extension_dtype_mismatch_cross_class
```



---
## test_allows_duplicate_labels
```python
from test_assert_series_equal import test_allows_duplicate_labels
```



---
## test_assert_series_equal_identical_na
```python
from test_assert_series_equal import test_assert_series_equal_identical_na
```



---
## test_identical_nested_series_is_equal
```python
from test_assert_series_equal import test_identical_nested_series_is_equal
```



---
## test_check_dtype_false_different_reso
```python
from test_assert_series_equal import test_check_dtype_false_different_reso
```



---
## test_large_unequal_ints
```python
from test_assert_series_equal import test_large_unequal_ints
```



---
## test_ea_and_numpy_no_dtype_check
```python
from test_assert_series_equal import test_ea_and_numpy_no_dtype_check
```



---
## test_assert_series_equal_int_tol
```python
from test_assert_series_equal import test_assert_series_equal_int_tol
```



---
## test_assert_series_equal_index_exact_default
```python
from test_assert_series_equal import test_assert_series_equal_index_exact_default
```



---
## MySeries
```python
from test_assert_series_equal import MySeries
```



---
## check_dtype
```python
from conftest import check_dtype
```



---
## check_exact
```python
from conftest import check_exact
```



---
## check_index_type
```python
from conftest import check_index_type
```



---
## rtol
```python
from conftest import rtol
```



---
## check_categorical
```python
from conftest import check_categorical
```



---
## __name__
```python
from test_assert_frame_equal import __name__
```



---
## by_blocks_fixture
```python
from test_assert_frame_equal import by_blocks_fixture
```



---
## obj_fixture
```python
from test_assert_frame_equal import obj_fixture
```



---
## _assert_frame_equal_both
```python
from test_assert_frame_equal import _assert_frame_equal_both
```

Check that two DataFrame equal.

This check is performed commutatively.

Parameters
----------
a : DataFrame
    The first DataFrame to compare.
b : DataFrame
    The second DataFrame to compare.
kwargs : dict
    The arguments passed to `tm.assert_frame_equal`.

---
## test_frame_equal_row_order_mismatch
```python
from test_assert_frame_equal import test_frame_equal_row_order_mismatch
```



---
## test_frame_equal_shape_mismatch
```python
from test_assert_frame_equal import test_frame_equal_shape_mismatch
```



---
## test_frame_equal_index_dtype_mismatch
```python
from test_assert_frame_equal import test_frame_equal_index_dtype_mismatch
```



---
## test_empty_dtypes
```python
from test_assert_frame_equal import test_empty_dtypes
```



---
## test_frame_equal_index_mismatch
```python
from test_assert_frame_equal import test_frame_equal_index_mismatch
```



---
## test_frame_equal_columns_mismatch
```python
from test_assert_frame_equal import test_frame_equal_columns_mismatch
```



---
## test_frame_equal_block_mismatch
```python
from test_assert_frame_equal import test_frame_equal_block_mismatch
```



---
## test_frame_equal_unicode
```python
from test_assert_frame_equal import test_frame_equal_unicode
```



---
## test_assert_frame_equal_extension_dtype_mismatch
```python
from test_assert_frame_equal import test_assert_frame_equal_extension_dtype_mismatch
```



---
## test_assert_frame_equal_interval_dtype_mismatch
```python
from test_assert_frame_equal import test_assert_frame_equal_interval_dtype_mismatch
```



---
## test_assert_frame_equal_ignore_extension_dtype_mismatch
```python
from test_assert_frame_equal import test_assert_frame_equal_ignore_extension_dtype_mismatch
```



---
## test_assert_frame_equal_ignore_extension_dtype_mismatch_cross_class
```python
from test_assert_frame_equal import test_assert_frame_equal_ignore_extension_dtype_mismatch_cross_class
```



---
## test_assert_frame_equal_datetime_like_dtype_mismatch
```python
from test_assert_frame_equal import test_assert_frame_equal_datetime_like_dtype_mismatch
```



---
## test_allows_duplicate_labels
```python
from test_assert_frame_equal import test_allows_duplicate_labels
```



---
## test_assert_frame_equal_columns_mixed_dtype
```python
from test_assert_frame_equal import test_assert_frame_equal_columns_mixed_dtype
```



---
## test_frame_equal_extension_dtype
```python
from test_assert_frame_equal import test_frame_equal_extension_dtype
```



---
## test_frame_equal_mixed_dtypes
```python
from test_assert_frame_equal import test_frame_equal_mixed_dtypes
```



---
## test_assert_frame_equal_check_like_different_indexes
```python
from test_assert_frame_equal import test_assert_frame_equal_check_like_different_indexes
```



---
## test_assert_frame_equal_checking_allow_dups_flag
```python
from test_assert_frame_equal import test_assert_frame_equal_checking_allow_dups_flag
```



---
## test_assert_frame_equal_check_like_categorical_midx
```python
from test_assert_frame_equal import test_assert_frame_equal_check_like_categorical_midx
```



---
## test_assert_frame_equal_ea_column_definition_in_exception_mask
```python
from test_assert_frame_equal import test_assert_frame_equal_ea_column_definition_in_exception_mask
```



---
## test_assert_frame_equal_ea_column_definition_in_exception
```python
from test_assert_frame_equal import test_assert_frame_equal_ea_column_definition_in_exception
```



---
## test_assert_frame_equal_ts_column
```python
from test_assert_frame_equal import test_assert_frame_equal_ts_column
```



---
## test_assert_frame_equal_set
```python
from test_assert_frame_equal import test_assert_frame_equal_set
```



---
## test_assert_frame_equal_set_mismatch
```python
from test_assert_frame_equal import test_assert_frame_equal_set_mismatch
```



---
## __name__
```python
from test_show_versions import __name__
```



---
## test_show_versions
```python
from test_show_versions import test_show_versions
```



---
## test_show_versions_console_json
```python
from test_show_versions import test_show_versions_console_json
```



---
## test_show_versions_console
```python
from test_show_versions import test_show_versions_console
```



---
## test_json_output_match
```python
from test_show_versions import test_json_output_match
```



---
## __name__
```python
from test_assert_interval_array_equal import __name__
```



---
## test_interval_array_equal
```python
from test_assert_interval_array_equal import test_interval_array_equal
```



---
## test_interval_array_equal_closed_mismatch
```python
from test_assert_interval_array_equal import test_interval_array_equal_closed_mismatch
```



---
## test_interval_array_equal_periods_mismatch
```python
from test_assert_interval_array_equal import test_interval_array_equal_periods_mismatch
```



---
## test_interval_array_equal_end_mismatch
```python
from test_assert_interval_array_equal import test_interval_array_equal_end_mismatch
```



---
## test_interval_array_equal_start_mismatch
```python
from test_assert_interval_array_equal import test_interval_array_equal_start_mismatch
```



---
## __name__
```python
from test_assert_attr_equal import __name__
```



---
## test_assert_attr_equal
```python
from test_assert_attr_equal import test_assert_attr_equal
```



---
## test_assert_attr_equal_different_nulls
```python
from test_assert_attr_equal import test_assert_attr_equal_different_nulls
```



---
## test_numpy_err_state_is_default
```python
from test_util import test_numpy_err_state_is_default
```



---
## test_convert_rows_list_to_csv_str
```python
from test_util import test_convert_rows_list_to_csv_str
```



---
## test_datapath_missing
```python
from test_util import test_datapath_missing
```



---
## test_datapath
```python
from test_util import test_datapath
```



---
## test_external_error_raised
```python
from test_util import test_external_error_raised
```



---
## test_is_sorted
```python
from test_util import test_is_sorted
```



---
## __name__
```python
from test_assert_index_equal import __name__
```



---
## test_index_equal_levels_mismatch
```python
from test_assert_index_equal import test_index_equal_levels_mismatch
```



---
## test_index_equal_values_mismatch
```python
from test_assert_index_equal import test_index_equal_values_mismatch
```



---
## test_index_equal_length_mismatch
```python
from test_assert_index_equal import test_index_equal_length_mismatch
```



---
## test_index_equal_class
```python
from test_assert_index_equal import test_index_equal_class
```



---
## test_int_float_index_equal_class_mismatch
```python
from test_assert_index_equal import test_int_float_index_equal_class_mismatch
```



---
## test_range_index_equal_class_mismatch
```python
from test_assert_index_equal import test_range_index_equal_class_mismatch
```



---
## test_index_equal_values_close
```python
from test_assert_index_equal import test_index_equal_values_close
```



---
## test_index_equal_values_less_close
```python
from test_assert_index_equal import test_index_equal_values_less_close
```



---
## test_index_equal_values_too_far
```python
from test_assert_index_equal import test_index_equal_values_too_far
```



---
## test_index_equal_value_order_mismatch
```python
from test_assert_index_equal import test_index_equal_value_order_mismatch
```



---
## test_index_equal_level_values_mismatch
```python
from test_assert_index_equal import test_index_equal_level_values_mismatch
```



---
## test_index_equal_names
```python
from test_assert_index_equal import test_index_equal_names
```



---
## test_index_equal_category_mismatch
```python
from test_assert_index_equal import test_index_equal_category_mismatch
```



---
## test_index_equal_range_categories
```python
from test_assert_index_equal import test_index_equal_range_categories
```



---
## test_assert_index_equal_different_inferred_types
```python
from test_assert_index_equal import test_assert_index_equal_different_inferred_types
```



---
## test_assert_index_equal_different_names_check_order_false
```python
from test_assert_index_equal import test_assert_index_equal_different_names_check_order_false
```



---
## test_assert_index_equal_mixed_dtype
```python
from test_assert_index_equal import test_assert_index_equal_mixed_dtype
```



---
## test_assert_index_equal_ea_dtype_order_false
```python
from test_assert_index_equal import test_assert_index_equal_ea_dtype_order_false
```



---
## test_assert_index_equal_object_ints_order_false
```python
from test_assert_index_equal import test_assert_index_equal_object_ints_order_false
```



---
## test_assert_ea_index_equal_non_matching_na
```python
from test_assert_index_equal import test_assert_ea_index_equal_non_matching_na
```



---
## test_assert_multi_index_dtype_check_categorical
```python
from test_assert_index_equal import test_assert_multi_index_dtype_check_categorical
```



---
## __name__
```python
from test_shares_memory import __name__
```



---
## test_shares_memory_interval
```python
from test_shares_memory import test_shares_memory_interval
```



---
## test_shares_memory_string
```python
from test_shares_memory import test_shares_memory_string
```



---
## __name__
```python
from test_validate_args import __name__
```



---
## _fname
```python
from test_validate_args import _fname
```



---
## test_bad_min_fname_arg_count
```python
from test_validate_args import test_bad_min_fname_arg_count
```



---
## test_bad_arg_length_max_value_single
```python
from test_validate_args import test_bad_arg_length_max_value_single
```



---
## test_bad_arg_length_max_value_multiple
```python
from test_validate_args import test_bad_arg_length_max_value_multiple
```



---
## test_not_all_defaults
```python
from test_validate_args import test_not_all_defaults
```



---
## test_validation
```python
from test_validate_args import test_validation
```



---
## __name__
```python
from test_validate_kwargs import __name__
```



---
## _fname
```python
from test_validate_kwargs import _fname
```



---
## test_bad_kwarg
```python
from test_validate_kwargs import test_bad_kwarg
```



---
## test_not_all_none
```python
from test_validate_kwargs import test_not_all_none
```



---
## test_validation
```python
from test_validate_kwargs import test_validation
```



---
## test_validate_bool_kwarg_fail
```python
from test_validate_kwargs import test_validate_bool_kwarg_fail
```



---
## test_validate_bool_kwarg
```python
from test_validate_kwargs import test_validate_bool_kwarg
```



---
## __name__
```python
from test_assert_categorical_equal import __name__
```



---
## test_categorical_equal
```python
from test_assert_categorical_equal import test_categorical_equal
```



---
## test_categorical_equal_order_mismatch
```python
from test_assert_categorical_equal import test_categorical_equal_order_mismatch
```



---
## test_categorical_equal_categories_mismatch
```python
from test_assert_categorical_equal import test_categorical_equal_categories_mismatch
```



---
## test_categorical_equal_codes_mismatch
```python
from test_assert_categorical_equal import test_categorical_equal_codes_mismatch
```



---
## test_categorical_equal_ordered_mismatch
```python
from test_assert_categorical_equal import test_categorical_equal_ordered_mismatch
```



---
## test_categorical_equal_object_override
```python
from test_assert_categorical_equal import test_categorical_equal_object_override
```



---
## __name__
```python
from test_assert_numpy_array_equal import __name__
```



---
## test_assert_numpy_array_equal_shape_mismatch
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_shape_mismatch
```



---
## test_assert_numpy_array_equal_bad_type
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_bad_type
```



---
## test_assert_numpy_array_equal_class_mismatch
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_class_mismatch
```



---
## test_assert_numpy_array_equal_value_mismatch1
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch1
```



---
## test_assert_numpy_array_equal_value_mismatch2
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch2
```



---
## test_assert_numpy_array_equal_value_mismatch3
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch3
```



---
## test_assert_numpy_array_equal_value_mismatch4
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch4
```



---
## test_assert_numpy_array_equal_value_mismatch5
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch5
```



---
## test_assert_numpy_array_equal_value_mismatch6
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_value_mismatch6
```



---
## test_assert_numpy_array_equal_shape_mismatch_override
```python
from test_assert_numpy_array_equal import test_assert_numpy_array_equal_shape_mismatch_override
```



---
## test_numpy_array_equal_unicode
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_unicode
```



---
## test_numpy_array_equal_object
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_object
```



---
## test_numpy_array_equal_copy_flag
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_copy_flag
```



---
## test_numpy_array_equal_contains_na
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_contains_na
```



---
## test_numpy_array_equal_identical_na
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_identical_na
```



---
## test_numpy_array_equal_different_na
```python
from test_assert_numpy_array_equal import test_numpy_array_equal_different_na
```



---
## __name__
```python
from test_assert_extension_array_equal import __name__
```



---
## test_assert_extension_array_equal_not_exact
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_not_exact
```



---
## test_assert_extension_array_equal_less_precise
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_less_precise
```



---
## test_assert_extension_array_equal_dtype_mismatch
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_dtype_mismatch
```



---
## test_assert_extension_array_equal_missing_values
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_missing_values
```



---
## test_assert_extension_array_equal_non_extension_array
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_non_extension_array
```



---
## test_assert_extension_array_equal_ignore_dtype_mismatch
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_ignore_dtype_mismatch
```



---
## test_assert_extension_array_equal_time_units
```python
from test_assert_extension_array_equal import test_assert_extension_array_equal_time_units
```



---
## __name__
```python
from test_deprecate import __name__
```



---
## new_func
```python
from test_deprecate import new_func
```

This is the summary. The deprecate directive goes next.

This is the extended summary. The deprecate directive goes before this.

---
## new_func_no_docstring
```python
from test_deprecate import new_func_no_docstring
```



---
## new_func_wrong_docstring
```python
from test_deprecate import new_func_wrong_docstring
```

Summary should be in the next line.

---
## new_func_with_deprecation
```python
from test_deprecate import new_func_with_deprecation
```

This is the summary. The deprecate directive goes next.

.. deprecated:: 1.0
    Use new_func instead.

This is the extended summary. The deprecate directive goes before this.

---
## test_deprecate_ok
```python
from test_deprecate import test_deprecate_ok
```



---
## test_deprecate_no_docstring
```python
from test_deprecate import test_deprecate_no_docstring
```



---
## test_deprecate_wrong_docstring
```python
from test_deprecate import test_deprecate_wrong_docstring
```



---
## __name__
```python
from test_hashing import __name__
```



---
## series
```python
from test_hashing import series
```



---
## index
```python
from test_hashing import index
```



---
## test_consistency
```python
from test_hashing import test_consistency
```



---
## test_hash_array
```python
from test_hashing import test_hash_array
```



---
## test_hash_array_mixed
```python
from test_hashing import test_hash_array_mixed
```



---
## test_hash_array_errors
```python
from test_hashing import test_hash_array_errors
```



---
## test_hash_array_index_exception
```python
from test_hashing import test_hash_array_index_exception
```



---
## test_hash_tuples
```python
from test_hashing import test_hash_tuples
```



---
## test_hash_tuples_err
```python
from test_hashing import test_hash_tuples_err
```



---
## test_multiindex_unique
```python
from test_hashing import test_multiindex_unique
```



---
## test_multiindex_objects
```python
from test_hashing import test_multiindex_objects
```



---
## test_hash_pandas_object
```python
from test_hashing import test_hash_pandas_object
```



---
## test_hash_pandas_object_diff_index_non_empty
```python
from test_hashing import test_hash_pandas_object_diff_index_non_empty
```



---
## test_hash_pandas_index
```python
from test_hashing import test_hash_pandas_index
```



---
## test_hash_pandas_series
```python
from test_hashing import test_hash_pandas_series
```



---
## test_hash_pandas_series_diff_index
```python
from test_hashing import test_hash_pandas_series_diff_index
```



---
## test_hash_pandas_empty_object
```python
from test_hashing import test_hash_pandas_empty_object
```



---
## test_categorical_consistency
```python
from test_hashing import test_categorical_consistency
```



---
## test_categorical_with_nan_consistency
```python
from test_hashing import test_categorical_with_nan_consistency
```



---
## test_pandas_errors
```python
from test_hashing import test_pandas_errors
```



---
## test_hash_keys
```python
from test_hashing import test_hash_keys
```



---
## test_df_hash_keys
```python
from test_hashing import test_df_hash_keys
```



---
## test_df_encoding
```python
from test_hashing import test_df_encoding
```



---
## test_invalid_key
```python
from test_hashing import test_invalid_key
```



---
## test_already_encoded
```python
from test_hashing import test_already_encoded
```



---
## test_alternate_encoding
```python
from test_hashing import test_alternate_encoding
```



---
## test_same_len_hash_collisions
```python
from test_hashing import test_same_len_hash_collisions
```



---
## test_hash_collisions
```python
from test_hashing import test_hash_collisions
```



---
## test_hash_with_tuple
```python
from test_hashing import test_hash_with_tuple
```



---
## test_hashable_tuple_args
```python
from test_hashing import test_hashable_tuple_args
```



---
## test_hash_object_none_key
```python
from test_hashing import test_hash_object_none_key
```



---
## __name__
```python
from test_validate_inclusive import __name__
```



---
## test_invalid_inclusive
```python
from test_validate_inclusive import test_invalid_inclusive
```



---
## test_valid_inclusive
```python
from test_validate_inclusive import test_valid_inclusive
```



---
## __name__
```python
from test_assert_produces_warning import __name__
```

"
Test module for testing ``pandas._testing.assert_produces_warning``.

---
## category
```python
from test_assert_produces_warning import category
```

Return unique warning.

Useful for testing behavior of tm.assert_produces_warning with various categories.

---
## pair_different_warnings
```python
from test_assert_produces_warning import pair_different_warnings
```

Return pair or different warnings.

Useful for testing how several different warnings are handled
in tm.assert_produces_warning.

---
## f
```python
from test_assert_produces_warning import f
```



---
## test_assert_produces_warning_honors_filter
```python
from test_assert_produces_warning import test_assert_produces_warning_honors_filter
```



---
## test_catch_warning_category_and_match
```python
from test_assert_produces_warning import test_catch_warning_category_and_match
```



---
## test_fail_to_match_runtime_warning
```python
from test_assert_produces_warning import test_fail_to_match_runtime_warning
```



---
## test_fail_to_match_future_warning
```python
from test_assert_produces_warning import test_fail_to_match_future_warning
```



---
## test_fail_to_match_resource_warning
```python
from test_assert_produces_warning import test_fail_to_match_resource_warning
```



---
## test_fail_to_catch_actual_warning
```python
from test_assert_produces_warning import test_fail_to_catch_actual_warning
```



---
## test_ignore_extra_warning
```python
from test_assert_produces_warning import test_ignore_extra_warning
```



---
## test_raise_on_extra_warning
```python
from test_assert_produces_warning import test_raise_on_extra_warning
```



---
## test_same_category_different_messages_first_match
```python
from test_assert_produces_warning import test_same_category_different_messages_first_match
```



---
## test_same_category_different_messages_last_match
```python
from test_assert_produces_warning import test_same_category_different_messages_last_match
```



---
## test_match_multiple_warnings
```python
from test_assert_produces_warning import test_match_multiple_warnings
```



---
## test_right_category_wrong_match_raises
```python
from test_assert_produces_warning import test_right_category_wrong_match_raises
```



---
## TestFalseOrNoneExpectedWarning
```python
from test_assert_produces_warning import TestFalseOrNoneExpectedWarning
```



---
## test_raises_during_exception
```python
from test_assert_produces_warning import test_raises_during_exception
```



---
## test_passes_during_exception
```python
from test_assert_produces_warning import test_passes_during_exception
```



---
## test_raise_on_warning
```python
from test_assert_produces_warning import test_raise_on_warning
```



---
## test_no_raise_without_warning
```python
from test_assert_produces_warning import test_no_raise_without_warning
```



---
## test_no_raise_with_false_raise_on_extra
```python
from test_assert_produces_warning import test_no_raise_with_false_raise_on_extra
```



---
## test_numba_not_installed_option_context
```python
from test_numba import test_numba_not_installed_option_context
```



---
## cumsum
```python
from test_doc import cumsum
```

This is the {method} method.

It computes the cumulative {operation}.

---
## cumavg
```python
from test_doc import cumavg
```



---
## cummax
```python
from test_doc import cummax
```



---
## cummin
```python
from test_doc import cummin
```



---
## test_docstring_formatting
```python
from test_doc import test_docstring_formatting
```



---
## test_docstring_appending
```python
from test_doc import test_docstring_appending
```



---
## test_doc_template_from_func
```python
from test_doc import test_doc_template_from_func
```



---
## test_inherit_doc_template
```python
from test_doc import test_inherit_doc_template
```



---
## __name__
```python
from test_deprecate_kwarg import __name__
```



---
## _f1
```python
from test_deprecate_kwarg import _f1
```



---
## _f2
```python
from test_deprecate_kwarg import _f2
```



---
## _f3_mapping
```python
from test_deprecate_kwarg import _f3_mapping
```



---
## _f3
```python
from test_deprecate_kwarg import _f3
```



---
## test_deprecate_kwarg
```python
from test_deprecate_kwarg import test_deprecate_kwarg
```



---
## test_dict_deprecate_kwarg
```python
from test_deprecate_kwarg import test_dict_deprecate_kwarg
```



---
## test_missing_deprecate_kwarg
```python
from test_deprecate_kwarg import test_missing_deprecate_kwarg
```



---
## test_callable_deprecate_kwarg
```python
from test_deprecate_kwarg import test_callable_deprecate_kwarg
```



---
## test_callable_deprecate_kwarg_fail
```python
from test_deprecate_kwarg import test_callable_deprecate_kwarg_fail
```



---
## test_bad_deprecate_kwarg
```python
from test_deprecate_kwarg import test_bad_deprecate_kwarg
```



---
## _f4
```python
from test_deprecate_kwarg import _f4
```



---
## test_deprecate_keyword
```python
from test_deprecate_kwarg import test_deprecate_keyword
```



---
## f4
```python
from test_deprecate_kwarg import f4
```



---
## __name__
```python
from test_assert_almost_equal import __name__
```



---
## _assert_almost_equal_both
```python
from test_assert_almost_equal import _assert_almost_equal_both
```

Check that two objects are approximately equal.

This check is performed commutatively.

Parameters
----------
a : object
    The first object to compare.
b : object
    The second object to compare.
**kwargs
    The arguments passed to `tm.assert_almost_equal`.

---
## _assert_not_almost_equal
```python
from test_assert_almost_equal import _assert_not_almost_equal
```

Check that two objects are not approximately equal.

Parameters
----------
a : object
    The first object to compare.
b : object
    The second object to compare.
**kwargs
    The arguments passed to `tm.assert_almost_equal`.

---
## _assert_not_almost_equal_both
```python
from test_assert_almost_equal import _assert_not_almost_equal_both
```

Check that two objects are not approximately equal.

This check is performed commutatively.

Parameters
----------
a : object
    The first object to compare.
b : object
    The second object to compare.
**kwargs
    The arguments passed to `tm.assert_almost_equal`.

---
## test_assert_almost_equal_numbers
```python
from test_assert_almost_equal import test_assert_almost_equal_numbers
```



---
## test_assert_not_almost_equal_numbers
```python
from test_assert_almost_equal import test_assert_not_almost_equal_numbers
```



---
## test_assert_almost_equal_numbers_atol
```python
from test_assert_almost_equal import test_assert_almost_equal_numbers_atol
```



---
## test_assert_not_almost_equal_numbers_atol
```python
from test_assert_almost_equal import test_assert_not_almost_equal_numbers_atol
```



---
## test_assert_almost_equal_numbers_rtol
```python
from test_assert_almost_equal import test_assert_almost_equal_numbers_rtol
```



---
## test_assert_not_almost_equal_numbers_rtol
```python
from test_assert_almost_equal import test_assert_not_almost_equal_numbers_rtol
```



---
## test_assert_almost_equal_complex_numbers
```python
from test_assert_almost_equal import test_assert_almost_equal_complex_numbers
```



---
## test_assert_not_almost_equal_complex_numbers
```python
from test_assert_almost_equal import test_assert_not_almost_equal_complex_numbers
```



---
## test_assert_almost_equal_numbers_with_zeros
```python
from test_assert_almost_equal import test_assert_almost_equal_numbers_with_zeros
```



---
## test_assert_not_almost_equal_numbers_with_zeros
```python
from test_assert_almost_equal import test_assert_not_almost_equal_numbers_with_zeros
```



---
## test_assert_not_almost_equal_numbers_with_mixed
```python
from test_assert_almost_equal import test_assert_not_almost_equal_numbers_with_mixed
```



---
## test_assert_almost_equal_edge_case_ndarrays
```python
from test_assert_almost_equal import test_assert_almost_equal_edge_case_ndarrays
```



---
## test_assert_almost_equal_sets
```python
from test_assert_almost_equal import test_assert_almost_equal_sets
```



---
## test_assert_almost_not_equal_sets
```python
from test_assert_almost_equal import test_assert_almost_not_equal_sets
```



---
## test_assert_almost_equal_dicts
```python
from test_assert_almost_equal import test_assert_almost_equal_dicts
```



---
## test_assert_not_almost_equal_dicts
```python
from test_assert_almost_equal import test_assert_not_almost_equal_dicts
```



---
## test_assert_almost_equal_dict_like_object
```python
from test_assert_almost_equal import test_assert_almost_equal_dict_like_object
```



---
## test_assert_almost_equal_strings
```python
from test_assert_almost_equal import test_assert_almost_equal_strings
```



---
## test_assert_not_almost_equal_strings
```python
from test_assert_almost_equal import test_assert_not_almost_equal_strings
```



---
## test_assert_almost_equal_iterables
```python
from test_assert_almost_equal import test_assert_almost_equal_iterables
```



---
## test_assert_not_almost_equal_iterables
```python
from test_assert_almost_equal import test_assert_not_almost_equal_iterables
```



---
## test_assert_almost_equal_null
```python
from test_assert_almost_equal import test_assert_almost_equal_null
```



---
## test_assert_not_almost_equal_null
```python
from test_assert_almost_equal import test_assert_not_almost_equal_null
```



---
## test_assert_almost_equal_inf
```python
from test_assert_almost_equal import test_assert_almost_equal_inf
```



---
## test_mismatched_na_assert_almost_equal_deprecation
```python
from test_assert_almost_equal import test_mismatched_na_assert_almost_equal_deprecation
```



---
## test_assert_not_almost_equal_inf
```python
from test_assert_almost_equal import test_assert_not_almost_equal_inf
```



---
## test_assert_almost_equal_pandas
```python
from test_assert_almost_equal import test_assert_almost_equal_pandas
```



---
## test_assert_almost_equal_object
```python
from test_assert_almost_equal import test_assert_almost_equal_object
```



---
## test_assert_almost_equal_value_mismatch
```python
from test_assert_almost_equal import test_assert_almost_equal_value_mismatch
```



---
## test_assert_almost_equal_class_mismatch
```python
from test_assert_almost_equal import test_assert_almost_equal_class_mismatch
```



---
## test_assert_almost_equal_value_mismatch1
```python
from test_assert_almost_equal import test_assert_almost_equal_value_mismatch1
```



---
## test_assert_almost_equal_value_mismatch2
```python
from test_assert_almost_equal import test_assert_almost_equal_value_mismatch2
```



---
## test_assert_almost_equal_value_mismatch3
```python
from test_assert_almost_equal import test_assert_almost_equal_value_mismatch3
```



---
## test_assert_almost_equal_value_mismatch4
```python
from test_assert_almost_equal import test_assert_almost_equal_value_mismatch4
```



---
## test_assert_almost_equal_shape_mismatch_override
```python
from test_assert_almost_equal import test_assert_almost_equal_shape_mismatch_override
```



---
## test_assert_almost_equal_unicode
```python
from test_assert_almost_equal import test_assert_almost_equal_unicode
```



---
## test_assert_almost_equal_timestamp
```python
from test_assert_almost_equal import test_assert_almost_equal_timestamp
```



---
## test_assert_almost_equal_iterable_length_mismatch
```python
from test_assert_almost_equal import test_assert_almost_equal_iterable_length_mismatch
```



---
## test_assert_almost_equal_iterable_values_mismatch
```python
from test_assert_almost_equal import test_assert_almost_equal_iterable_values_mismatch
```



---
## test_assert_almost_equal_array_nested
```python
from test_assert_almost_equal import test_assert_almost_equal_array_nested
```



---
## DictLikeObj
```python
from test_assert_almost_equal import DictLikeObj
```



---
## keys
```python
from test_assert_almost_equal import keys
```



---
## __getitem__
```python
from test_assert_almost_equal import __getitem__
```



---
## __name__
```python
from test_rewrite_warning import __name__
```



---
## test_rewrite_warning
```python
from test_rewrite_warning import test_rewrite_warning
```



---
## __name__
```python
from test_localization import __name__
```



---
## _get_current_locale
```python
from test_localization import _get_current_locale
```



---
## test_can_set_current_locale
```python
from test_localization import test_can_set_current_locale
```



---
## test_can_set_locale_valid_set
```python
from test_localization import test_can_set_locale_valid_set
```



---
## test_can_set_locale_invalid_set
```python
from test_localization import test_can_set_locale_invalid_set
```



---
## test_can_set_locale_no_leak
```python
from test_localization import test_can_set_locale_no_leak
```



---
## test_can_set_locale_invalid_get
```python
from test_localization import test_can_set_locale_invalid_get
```



---
## test_get_locales_at_least_one
```python
from test_localization import test_get_locales_at_least_one
```



---
## test_get_locales_prefix
```python
from test_localization import test_get_locales_prefix
```



---
## test_set_locale
```python
from test_localization import test_set_locale
```



---
## test_encoding_detected
```python
from test_localization import test_encoding_detected
```



---
## mock_get_locale
```python
from test_localization import mock_get_locale
```



---
## __name__
```python
from test_config import __name__
```



---
## TestConfig
```python
from test_config import TestConfig
```



---
## clean_config
```python
from test_config import clean_config
```



---
## test_api
```python
from test_config import test_api
```



---
## test_is_one_of_factory
```python
from test_config import test_is_one_of_factory
```



---
## test_register_option
```python
from test_config import test_register_option
```



---
## test_describe_option
```python
from test_config import test_describe_option
```



---
## test_case_insensitive
```python
from test_config import test_case_insensitive
```



---
## test_get_option
```python
from test_config import test_get_option
```



---
## test_set_option
```python
from test_config import test_set_option
```



---
## test_set_option_empty_args
```python
from test_config import test_set_option_empty_args
```



---
## test_set_option_uneven_args
```python
from test_config import test_set_option_uneven_args
```



---
## test_set_option_invalid_single_argument_type
```python
from test_config import test_set_option_invalid_single_argument_type
```



---
## test_set_option_multiple
```python
from test_config import test_set_option_multiple
```



---
## test_validation
```python
from test_config import test_validation
```



---
## test_reset_option
```python
from test_config import test_reset_option
```



---
## test_reset_option_all
```python
from test_config import test_reset_option_all
```



---
## test_deprecate_option
```python
from test_config import test_deprecate_option
```



---
## test_config_prefix
```python
from test_config import test_config_prefix
```



---
## test_callback
```python
from test_config import test_callback
```



---
## test_set_ContextManager
```python
from test_config import test_set_ContextManager
```



---
## test_attribute_access
```python
from test_config import test_attribute_access
```



---
## test_option_context_scope
```python
from test_config import test_option_context_scope
```



---
## test_dictwrapper_getattr
```python
from test_config import test_dictwrapper_getattr
```



---
## callback
```python
from test_config import callback
```



---
## eq
```python
from test_config import eq
```



---
## f
```python
from test_config import f
```



---
## f3
```python
from test_config import f3
```



---
## __name__
```python
from test_parquet import __name__
```

test parquet compat 

---
## engine
```python
from test_parquet import engine
```



---
## pa
```python
from test_parquet import pa
```



---
## fp
```python
from test_parquet import fp
```



---
## df_compat
```python
from test_parquet import df_compat
```



---
## df_cross_compat
```python
from test_parquet import df_cross_compat
```



---
## df_full
```python
from test_parquet import df_full
```



---
## timezone_aware_date_list
```python
from test_parquet import timezone_aware_date_list
```



---
## check_round_trip
```python
from test_parquet import check_round_trip
```

Verify parquet serializer and deserializer produce the same results.

Performs a pandas to disk and disk to pandas round trip,
then compares the 2 resulting DataFrames to verify equality.

Parameters
----------
df: Dataframe
engine: str, optional
    'pyarrow' or 'fastparquet'
path: str, optional
write_kwargs: dict of str:str, optional
read_kwargs: dict of str:str, optional
expected: DataFrame, optional
    Expected deserialization result, otherwise will be equal to `df`
check_names: list of str, optional
    Closed set of column names to be compared
check_like: bool, optional
    If True, ignore the order of index & columns.
repeat: int, optional
    How many times to repeat the test

---
## check_partition_names
```python
from test_parquet import check_partition_names
```

Check partitions of a parquet file are as expected.

Parameters
----------
path: str
    Path of the dataset.
expected: iterable of str
    Expected partition names.

---
## test_invalid_engine
```python
from test_parquet import test_invalid_engine
```



---
## test_options_py
```python
from test_parquet import test_options_py
```



---
## test_options_fp
```python
from test_parquet import test_options_fp
```



---
## test_options_auto
```python
from test_parquet import test_options_auto
```



---
## test_options_get_engine
```python
from test_parquet import test_options_get_engine
```



---
## test_get_engine_auto_error_message
```python
from test_parquet import test_get_engine_auto_error_message
```



---
## test_cross_engine_pa_fp
```python
from test_parquet import test_cross_engine_pa_fp
```



---
## test_cross_engine_fp_pa
```python
from test_parquet import test_cross_engine_fp_pa
```



---
## test_parquet_pos_args_deprecation
```python
from test_parquet import test_parquet_pos_args_deprecation
```



---
## Base
```python
from test_parquet import Base
```



---
## TestBasic
```python
from test_parquet import TestBasic
```



---
## TestParquetPyArrow
```python
from test_parquet import TestParquetPyArrow
```



---
## TestParquetFastParquet
```python
from test_parquet import TestParquetFastParquet
```



---
## compare
```python
from test_parquet import compare
```



---
## check_error_on_write
```python
from test_parquet import check_error_on_write
```



---
## check_external_error_on_write
```python
from test_parquet import check_external_error_on_write
```



---
## test_parquet_read_from_url
```python
from test_parquet import test_parquet_read_from_url
```



---
## test_error
```python
from test_parquet import test_error
```



---
## test_columns_dtypes
```python
from test_parquet import test_columns_dtypes
```



---
## test_compression
```python
from test_parquet import test_compression
```



---
## test_read_columns
```python
from test_parquet import test_read_columns
```



---
## test_read_filters
```python
from test_parquet import test_read_filters
```



---
## test_write_index
```python
from test_parquet import test_write_index
```



---
## test_write_multiindex
```python
from test_parquet import test_write_multiindex
```



---
## test_multiindex_with_columns
```python
from test_parquet import test_multiindex_with_columns
```



---
## test_write_ignoring_index
```python
from test_parquet import test_write_ignoring_index
```



---
## test_write_column_multiindex
```python
from test_parquet import test_write_column_multiindex
```



---
## test_write_column_multiindex_nonstring
```python
from test_parquet import test_write_column_multiindex_nonstring
```



---
## test_write_column_multiindex_string
```python
from test_parquet import test_write_column_multiindex_string
```



---
## test_write_column_index_string
```python
from test_parquet import test_write_column_index_string
```



---
## test_write_column_index_nonstring
```python
from test_parquet import test_write_column_index_nonstring
```



---
## test_dtype_backend
```python
from test_parquet import test_dtype_backend
```



---
## test_read_empty_array
```python
from test_parquet import test_read_empty_array
```



---
## test_basic
```python
from test_parquet import test_basic
```



---
## test_basic_subset_columns
```python
from test_parquet import test_basic_subset_columns
```



---
## test_to_bytes_without_path_or_buf_provided
```python
from test_parquet import test_to_bytes_without_path_or_buf_provided
```



---
## test_duplicate_columns
```python
from test_parquet import test_duplicate_columns
```



---
## test_timedelta
```python
from test_parquet import test_timedelta
```



---
## test_unsupported
```python
from test_parquet import test_unsupported
```



---
## test_unsupported_float16
```python
from test_parquet import test_unsupported_float16
```



---
## test_unsupported_float16_cleanup
```python
from test_parquet import test_unsupported_float16_cleanup
```



---
## test_categorical
```python
from test_parquet import test_categorical
```



---
## test_s3_roundtrip_explicit_fs
```python
from test_parquet import test_s3_roundtrip_explicit_fs
```



---
## test_s3_roundtrip
```python
from test_parquet import test_s3_roundtrip
```



---
## test_s3_roundtrip_for_dir
```python
from test_parquet import test_s3_roundtrip_for_dir
```



---
## test_read_file_like_obj_support
```python
from test_parquet import test_read_file_like_obj_support
```



---
## test_expand_user
```python
from test_parquet import test_expand_user
```



---
## test_partition_cols_supported
```python
from test_parquet import test_partition_cols_supported
```



---
## test_partition_cols_string
```python
from test_parquet import test_partition_cols_string
```



---
## test_partition_cols_pathlib
```python
from test_parquet import test_partition_cols_pathlib
```



---
## test_empty_dataframe
```python
from test_parquet import test_empty_dataframe
```



---
## test_write_with_schema
```python
from test_parquet import test_write_with_schema
```



---
## test_additional_extension_arrays
```python
from test_parquet import test_additional_extension_arrays
```



---
## test_pyarrow_backed_string_array
```python
from test_parquet import test_pyarrow_backed_string_array
```



---
## test_additional_extension_types
```python
from test_parquet import test_additional_extension_types
```



---
## test_timestamp_nanoseconds
```python
from test_parquet import test_timestamp_nanoseconds
```



---
## test_timezone_aware_index
```python
from test_parquet import test_timezone_aware_index
```



---
## test_filter_row_groups
```python
from test_parquet import test_filter_row_groups
```



---
## test_read_parquet_manager
```python
from test_parquet import test_read_parquet_manager
```



---
## test_read_dtype_backend_pyarrow_config
```python
from test_parquet import test_read_dtype_backend_pyarrow_config
```



---
## test_read_dtype_backend_pyarrow_config_index
```python
from test_parquet import test_read_dtype_backend_pyarrow_config_index
```



---
## test_columns_dtypes_not_invalid
```python
from test_parquet import test_columns_dtypes_not_invalid
```



---
## test_empty_columns
```python
from test_parquet import test_empty_columns
```



---
## test_df_attrs_persistence
```python
from test_parquet import test_df_attrs_persistence
```



---
## test_string_inference
```python
from test_parquet import test_string_inference
```



---
## test_roundtrip_decimal
```python
from test_parquet import test_roundtrip_decimal
```



---
## test_infer_string_large_string_type
```python
from test_parquet import test_infer_string_large_string_type
```



---
## test_columns_dtypes_invalid
```python
from test_parquet import test_columns_dtypes_invalid
```



---
## test_bool_with_none
```python
from test_parquet import test_bool_with_none
```



---
## test_partition_on_supported
```python
from test_parquet import test_partition_on_supported
```



---
## test_error_on_using_partition_cols_and_partition_on
```python
from test_parquet import test_error_on_using_partition_cols_and_partition_on
```



---
## test_use_nullable_dtypes_not_supported
```python
from test_parquet import test_use_nullable_dtypes_not_supported
```



---
## test_close_file_handle_on_read_error
```python
from test_parquet import test_close_file_handle_on_read_error
```



---
## test_bytes_file_name
```python
from test_parquet import test_bytes_file_name
```



---
## test_filesystem_notimplemented
```python
from test_parquet import test_filesystem_notimplemented
```



---
## test_invalid_filesystem
```python
from test_parquet import test_invalid_filesystem
```



---
## test_unsupported_pa_filesystem_storage_options
```python
from test_parquet import test_unsupported_pa_filesystem_storage_options
```



---
## test_invalid_dtype_backend
```python
from test_parquet import test_invalid_dtype_backend
```



---
## __name__
```python
from test_fsspec import __name__
```



---
## fsspectest
```python
from test_fsspec import fsspectest
```



---
## df1
```python
from test_fsspec import df1
```



---
## cleared_fs
```python
from test_fsspec import cleared_fs
```



---
## test_read_csv
```python
from test_fsspec import test_read_csv
```



---
## test_reasonable_error
```python
from test_fsspec import test_reasonable_error
```



---
## test_to_csv
```python
from test_fsspec import test_to_csv
```



---
## test_to_excel
```python
from test_fsspec import test_to_excel
```



---
## test_to_csv_fsspec_object
```python
from test_fsspec import test_to_csv_fsspec_object
```



---
## test_csv_options
```python
from test_fsspec import test_csv_options
```



---
## test_read_table_options
```python
from test_fsspec import test_read_table_options
```



---
## test_excel_options
```python
from test_fsspec import test_excel_options
```



---
## test_to_parquet_new_file
```python
from test_fsspec import test_to_parquet_new_file
```

Regression test for writing to a not-yet-existent GCS Parquet file.

---
## test_arrowparquet_options
```python
from test_fsspec import test_arrowparquet_options
```

Regression test for writing to a not-yet-existent GCS Parquet file.

---
## test_fastparquet_options
```python
from test_fsspec import test_fastparquet_options
```

Regression test for writing to a not-yet-existent GCS Parquet file.

---
## test_from_s3_csv
```python
from test_fsspec import test_from_s3_csv
```



---
## test_s3_protocols
```python
from test_fsspec import test_s3_protocols
```



---
## test_s3_parquet
```python
from test_fsspec import test_s3_parquet
```



---
## test_not_present_exception
```python
from test_fsspec import test_not_present_exception
```



---
## test_feather_options
```python
from test_fsspec import test_feather_options
```



---
## test_pickle_options
```python
from test_fsspec import test_pickle_options
```



---
## test_json_options
```python
from test_fsspec import test_json_options
```



---
## test_stata_options
```python
from test_fsspec import test_stata_options
```



---
## test_markdown_options
```python
from test_fsspec import test_markdown_options
```



---
## test_non_fsspec_options
```python
from test_fsspec import test_non_fsspec_options
```



---
## TestMemoryFS
```python
from test_fsspec import TestMemoryFS
```



---
## __init__
```python
from test_fsspec import __init__
```



---
## __name__
```python
from test_compression import __name__
```



---
## test_compression_size
```python
from test_compression import test_compression_size
```



---
## test_compression_size_fh
```python
from test_compression import test_compression_size_fh
```



---
## test_dataframe_compression_defaults_to_infer
```python
from test_compression import test_dataframe_compression_defaults_to_infer
```



---
## test_series_compression_defaults_to_infer
```python
from test_compression import test_series_compression_defaults_to_infer
```



---
## test_compression_warning
```python
from test_compression import test_compression_warning
```



---
## test_compression_binary
```python
from test_compression import test_compression_binary
```

Binary file handles support compression.

GH22555

---
## test_gzip_reproducibility_file_name
```python
from test_compression import test_gzip_reproducibility_file_name
```

Gzip should create reproducible archives with mtime.

Note: Archives created with different filenames will still be different!

GH 28103

---
## test_gzip_reproducibility_file_object
```python
from test_compression import test_gzip_reproducibility_file_object
```

Gzip should create reproducible archives with mtime.

GH 28103

---
## test_with_missing_lzma
```python
from test_compression import test_with_missing_lzma
```

Tests if import pandas works when lzma is not present.

---
## test_with_missing_lzma_runtime
```python
from test_compression import test_with_missing_lzma_runtime
```

Tests if RuntimeError is hit when calling lzma without
having the module available.

---
## test_gzip_compression_level
```python
from test_compression import test_gzip_compression_level
```



---
## test_xz_compression_level_read
```python
from test_compression import test_xz_compression_level_read
```



---
## test_bzip_compression_level
```python
from test_compression import test_bzip_compression_level
```

GH33196 bzip needs file size > 100k to show a size difference between
compression levels, so here we just check if the call works when
compression is passed as a dict.

---
## test_empty_archive_zip
```python
from test_compression import test_empty_archive_zip
```



---
## test_ambiguous_archive_zip
```python
from test_compression import test_ambiguous_archive_zip
```



---
## test_ambiguous_archive_tar
```python
from test_compression import test_ambiguous_archive_tar
```



---
## test_tar_gz_to_different_filename
```python
from test_compression import test_tar_gz_to_different_filename
```



---
## test_tar_no_error_on_close
```python
from test_compression import test_tar_no_error_on_close
```



---
## compression_to_extension
```python
from conftest import compression_to_extension
```



---
## tips_file
```python
from conftest import tips_file
```

Path to the tips dataset

---
## jsonl_file
```python
from conftest import jsonl_file
```

Path to a JSONL dataset

---
## salaries_table
```python
from conftest import salaries_table
```

DataFrame with the salaries dataset

---
## feather_file
```python
from conftest import feather_file
```



---
## xml_file
```python
from conftest import xml_file
```



---
## s3_base
```python
from conftest import s3_base
```

Fixture for mocking S3 interaction.

Sets up moto server in separate process locally
Return url for motoserver/moto CI service

---
## s3so
```python
from conftest import s3so
```



---
## s3_resource
```python
from conftest import s3_resource
```



---
## s3_public_bucket
```python
from conftest import s3_public_bucket
```



---
## s3_public_bucket_with_data
```python
from conftest import s3_public_bucket_with_data
```

The following datasets
are loaded.

- tips.csv
- tips.csv.gz
- tips.csv.bz2
- items.jsonl

---
## s3_private_bucket
```python
from conftest import s3_private_bucket
```



---
## s3_private_bucket_with_data
```python
from conftest import s3_private_bucket_with_data
```

The following datasets
are loaded.

- tips.csv
- tips.csv.gz
- tips.csv.bz2
- items.jsonl

---
## compression_format
```python
from conftest import compression_format
```



---
## compression_ext
```python
from conftest import compression_ext
```



---
## CustomFSPath
```python
from test_common import CustomFSPath
```

For testing fspath on unknown objects

---
## TestCommonIOCapabilities
```python
from test_common import TestCommonIOCapabilities
```



---
## mmap_file
```python
from test_common import mmap_file
```



---
## TestMMapWrapper
```python
from test_common import TestMMapWrapper
```



---
## test_is_fsspec_url
```python
from test_common import test_is_fsspec_url
```



---
## test_codecs_encoding
```python
from test_common import test_codecs_encoding
```



---
## test_codecs_get_writer_reader
```python
from test_common import test_codecs_get_writer_reader
```



---
## test_explicit_encoding
```python
from test_common import test_explicit_encoding
```



---
## test_encoding_errors
```python
from test_common import test_encoding_errors
```



---
## test_bad_encdoing_errors
```python
from test_common import test_bad_encdoing_errors
```



---
## test_errno_attribute
```python
from test_common import test_errno_attribute
```



---
## test_fail_mmap
```python
from test_common import test_fail_mmap
```



---
## test_close_on_error
```python
from test_common import test_close_on_error
```



---
## test_pickle_reader
```python
from test_common import test_pickle_reader
```



---
## __fspath__
```python
from test_common import __fspath__
```



---
## test_expand_user
```python
from test_common import test_expand_user
```



---
## test_expand_user_normal_path
```python
from test_common import test_expand_user_normal_path
```



---
## test_stringify_path_pathlib
```python
from test_common import test_stringify_path_pathlib
```



---
## test_stringify_path_localpath
```python
from test_common import test_stringify_path_localpath
```



---
## test_stringify_path_fspath
```python
from test_common import test_stringify_path_fspath
```



---
## test_stringify_file_and_path_like
```python
from test_common import test_stringify_file_and_path_like
```



---
## test_infer_compression_from_path
```python
from test_common import test_infer_compression_from_path
```



---
## test_get_handle_with_path
```python
from test_common import test_get_handle_with_path
```



---
## test_get_handle_with_buffer
```python
from test_common import test_get_handle_with_buffer
```



---
## test_bytesiowrapper_returns_correct_bytes
```python
from test_common import test_bytesiowrapper_returns_correct_bytes
```



---
## test_get_handle_pyarrow_compat
```python
from test_common import test_get_handle_pyarrow_compat
```



---
## test_iterator
```python
from test_common import test_iterator
```



---
## test_read_non_existent
```python
from test_common import test_read_non_existent
```



---
## test_write_missing_parent_directory
```python
from test_common import test_write_missing_parent_directory
```



---
## test_read_expands_user_home_dir
```python
from test_common import test_read_expands_user_home_dir
```



---
## test_read_fspath_all
```python
from test_common import test_read_fspath_all
```



---
## test_write_fspath_all
```python
from test_common import test_write_fspath_all
```



---
## test_write_fspath_hdf5
```python
from test_common import test_write_fspath_hdf5
```



---
## test_constructor_bad_file
```python
from test_common import test_constructor_bad_file
```



---
## test_next
```python
from test_common import test_next
```



---
## test_unknown_engine
```python
from test_common import test_unknown_engine
```



---
## test_binary_mode
```python
from test_common import test_binary_mode
```

'encoding' shouldn't be passed to 'open' in binary mode.

GH 35058

---
## test_warning_missing_utf_bom
```python
from test_common import test_warning_missing_utf_bom
```

bz2 and xz do not write the byte order mark (BOM) for utf-16/32.

https://stackoverflow.com/questions/55171439

GH 35681

---
## TestError
```python
from test_common import TestError
```



---
## close
```python
from test_common import close
```



---
## compare_element
```python
from test_pickle import compare_element
```



---
## test_flatten_buffer
```python
from test_pickle import test_flatten_buffer
```



---
## test_pickles
```python
from test_pickle import test_pickles
```



---
## python_pickler
```python
from test_pickle import python_pickler
```



---
## python_unpickler
```python
from test_pickle import python_unpickler
```



---
## flatten
```python
from test_pickle import flatten
```

Flatten create_pickle_data

---
## test_round_trip_current
```python
from test_pickle import test_round_trip_current
```



---
## test_pickle_path_pathlib
```python
from test_pickle import test_pickle_path_pathlib
```



---
## test_pickle_path_localpath
```python
from test_pickle import test_pickle_path_localpath
```



---
## get_random_path
```python
from test_pickle import get_random_path
```



---
## TestCompression
```python
from test_pickle import TestCompression
```



---
## TestProtocol
```python
from test_pickle import TestProtocol
```



---
## test_unicode_decode_error
```python
from test_pickle import test_unicode_decode_error
```



---
## test_pickle_buffer_roundtrip
```python
from test_pickle import test_pickle_buffer_roundtrip
```



---
## test_pickle_generalurl_read
```python
from test_pickle import test_pickle_generalurl_read
```



---
## test_pickle_fsspec_roundtrip
```python
from test_pickle import test_pickle_fsspec_roundtrip
```



---
## MyTz
```python
from test_pickle import MyTz
```



---
## test_read_pickle_with_subclass
```python
from test_pickle import test_read_pickle_with_subclass
```



---
## test_pickle_binary_object_compression
```python
from test_pickle import test_pickle_binary_object_compression
```

Read/write from binary file-objects w/wo compression.

GH 26237, GH 29054, and GH 29570

---
## test_pickle_dataframe_with_multilevel_index
```python
from test_pickle import test_pickle_dataframe_with_multilevel_index
```



---
## test_pickle_timeseries_periodindex
```python
from test_pickle import test_pickle_timeseries_periodindex
```



---
## test_pickle_preserve_name
```python
from test_pickle import test_pickle_preserve_name
```



---
## test_pickle_datetimes
```python
from test_pickle import test_pickle_datetimes
```



---
## test_pickle_strings
```python
from test_pickle import test_pickle_strings
```



---
## test_pickle_preserves_block_ndim
```python
from test_pickle import test_pickle_preserves_block_ndim
```



---
## test_pickle_big_dataframe_compression
```python
from test_pickle import test_pickle_big_dataframe_compression
```



---
## test_pickle_frame_v124_unpickle_130
```python
from test_pickle import test_pickle_frame_v124_unpickle_130
```



---
## test_pickle_pos_args_deprecation
```python
from test_pickle import test_pickle_pos_args_deprecation
```



---
## compress_file
```python
from test_pickle import compress_file
```



---
## test_write_explicit
```python
from test_pickle import test_write_explicit
```



---
## test_write_explicit_bad
```python
from test_pickle import test_write_explicit_bad
```



---
## test_write_infer
```python
from test_pickle import test_write_infer
```



---
## test_read_explicit
```python
from test_pickle import test_read_explicit
```



---
## test_read_infer
```python
from test_pickle import test_read_infer
```



---
## test_read
```python
from test_pickle import test_read
```



---
## MockReadResponse
```python
from test_pickle import MockReadResponse
```



---
## _test_roundtrip
```python
from test_pickle import _test_roundtrip
```



---
## __enter__
```python
from test_pickle import __enter__
```



---
## __exit__
```python
from test_pickle import __exit__
```



---
## read
```python
from test_pickle import read
```



---
## close
```python
from test_pickle import close
```



---
## mock_urlopen_read
```python
from test_pickle import mock_urlopen_read
```



---
## __name__
```python
from test_orc import __name__
```



---
## dirpath
```python
from test_orc import dirpath
```



---
## orc_writer_dtypes_not_supported
```python
from test_orc import orc_writer_dtypes_not_supported
```



---
## test_orc_reader_empty
```python
from test_orc import test_orc_reader_empty
```



---
## test_orc_reader_basic
```python
from test_orc import test_orc_reader_basic
```



---
## test_orc_reader_decimal
```python
from test_orc import test_orc_reader_decimal
```



---
## test_orc_reader_date_low
```python
from test_orc import test_orc_reader_date_low
```



---
## test_orc_reader_date_high
```python
from test_orc import test_orc_reader_date_high
```



---
## test_orc_reader_snappy_compressed
```python
from test_orc import test_orc_reader_snappy_compressed
```



---
## test_orc_roundtrip_file
```python
from test_orc import test_orc_roundtrip_file
```



---
## test_orc_roundtrip_bytesio
```python
from test_orc import test_orc_roundtrip_bytesio
```



---
## test_orc_writer_dtypes_not_supported
```python
from test_orc import test_orc_writer_dtypes_not_supported
```



---
## test_orc_dtype_backend_pyarrow
```python
from test_orc import test_orc_dtype_backend_pyarrow
```



---
## test_orc_dtype_backend_numpy_nullable
```python
from test_orc import test_orc_dtype_backend_numpy_nullable
```



---
## test_orc_uri_path
```python
from test_orc import test_orc_uri_path
```



---
## test_to_orc_non_default_index
```python
from test_orc import test_to_orc_non_default_index
```



---
## test_invalid_dtype_backend
```python
from test_orc import test_invalid_dtype_backend
```



---
## test_string_inference
```python
from test_orc import test_string_inference
```



---
## __name__
```python
from test_clipboard import __name__
```



---
## build_kwargs
```python
from test_clipboard import build_kwargs
```



---
## df
```python
from test_clipboard import df
```



---
## mock_ctypes
```python
from test_clipboard import mock_ctypes
```

Mocks WinError to help with testing the clipboard.

---
## test_checked_call_with_bad_call
```python
from test_clipboard import test_checked_call_with_bad_call
```

Give CheckCall a function that returns a falsey value and
mock get_errno so it returns false so an exception is raised.

---
## test_checked_call_with_valid_call
```python
from test_clipboard import test_checked_call_with_valid_call
```

Give CheckCall a function that returns a truthy value and
mock get_errno so it returns true so an exception is not raised.
The function should return the results from _return_true.

---
## test_stringify_text
```python
from test_clipboard import test_stringify_text
```



---
## set_pyqt_clipboard
```python
from test_clipboard import set_pyqt_clipboard
```



---
## clipboard
```python
from test_clipboard import clipboard
```



---
## TestClipboard
```python
from test_clipboard import TestClipboard
```



---
## _mock_win_error
```python
from test_clipboard import _mock_win_error
```



---
## _return_false
```python
from test_clipboard import _return_false
```



---
## _return_true
```python
from test_clipboard import _return_true
```



---
## test_round_trip_frame_sep
```python
from test_clipboard import test_round_trip_frame_sep
```



---
## test_round_trip_frame_string
```python
from test_clipboard import test_round_trip_frame_string
```



---
## test_excel_sep_warning
```python
from test_clipboard import test_excel_sep_warning
```



---
## test_copy_delim_warning
```python
from test_clipboard import test_copy_delim_warning
```



---
## test_clipboard_copy_tabs_default
```python
from test_clipboard import test_clipboard_copy_tabs_default
```



---
## test_clipboard_copy_strings
```python
from test_clipboard import test_clipboard_copy_strings
```



---
## test_read_clipboard_infer_excel
```python
from test_clipboard import test_read_clipboard_infer_excel
```



---
## test_infer_excel_with_nulls
```python
from test_clipboard import test_infer_excel_with_nulls
```



---
## test_infer_excel_with_multiindex
```python
from test_clipboard import test_infer_excel_with_multiindex
```



---
## test_invalid_encoding
```python
from test_clipboard import test_invalid_encoding
```



---
## test_raw_roundtrip
```python
from test_clipboard import test_raw_roundtrip
```



---
## test_read_clipboard_dtype_backend
```python
from test_clipboard import test_read_clipboard_dtype_backend
```



---
## test_invalid_dtype_backend
```python
from test_clipboard import test_invalid_dtype_backend
```



---
## test_to_clipboard_pos_args_deprecation
```python
from test_clipboard import test_to_clipboard_pos_args_deprecation
```



---
## __name__
```python
from test_stata import __name__
```



---
## mixed_frame
```python
from test_stata import mixed_frame
```



---
## parsed_114
```python
from test_stata import parsed_114
```



---
## TestStata
```python
from test_stata import TestStata
```



---
## test_backward_compat
```python
from test_stata import test_backward_compat
```



---
## test_direct_read
```python
from test_stata import test_direct_read
```



---
## test_statareader_warns_when_used_without_context
```python
from test_stata import test_statareader_warns_when_used_without_context
```



---
## test_compression
```python
from test_stata import test_compression
```



---
## test_compression_dict
```python
from test_stata import test_compression_dict
```



---
## test_chunked_categorical
```python
from test_stata import test_chunked_categorical
```



---
## test_chunked_categorical_partial
```python
from test_stata import test_chunked_categorical_partial
```



---
## test_iterator_errors
```python
from test_stata import test_iterator_errors
```



---
## test_iterator_value_labels
```python
from test_stata import test_iterator_value_labels
```



---
## test_precision_loss
```python
from test_stata import test_precision_loss
```



---
## test_compression_roundtrip
```python
from test_stata import test_compression_roundtrip
```



---
## test_stata_compression
```python
from test_stata import test_stata_compression
```



---
## test_non_categorical_value_labels
```python
from test_stata import test_non_categorical_value_labels
```



---
## test_non_categorical_value_label_name_conversion
```python
from test_stata import test_non_categorical_value_label_name_conversion
```



---
## test_non_categorical_value_label_convert_categoricals_error
```python
from test_stata import test_non_categorical_value_label_convert_categoricals_error
```



---
## test_nullable_support
```python
from test_stata import test_nullable_support
```



---
## test_empty_frame
```python
from test_stata import test_empty_frame
```



---
## read_dta
```python
from test_stata import read_dta
```



---
## read_csv
```python
from test_stata import read_csv
```



---
## test_read_empty_dta
```python
from test_stata import test_read_empty_dta
```



---
## test_read_empty_dta_with_dtypes
```python
from test_stata import test_read_empty_dta_with_dtypes
```



---
## test_read_index_col_none
```python
from test_stata import test_read_index_col_none
```



---
## test_read_dta1
```python
from test_stata import test_read_dta1
```



---
## test_read_dta2
```python
from test_stata import test_read_dta2
```



---
## test_read_dta3
```python
from test_stata import test_read_dta3
```



---
## test_read_dta4
```python
from test_stata import test_read_dta4
```



---
## test_read_dta12
```python
from test_stata import test_read_dta12
```



---
## test_read_dta18
```python
from test_stata import test_read_dta18
```



---
## test_read_write_dta5
```python
from test_stata import test_read_write_dta5
```



---
## test_write_dta6
```python
from test_stata import test_write_dta6
```



---
## test_read_write_dta10
```python
from test_stata import test_read_write_dta10
```



---
## test_stata_doc_examples
```python
from test_stata import test_stata_doc_examples
```



---
## test_write_preserves_original
```python
from test_stata import test_write_preserves_original
```



---
## test_encoding
```python
from test_stata import test_encoding
```



---
## test_read_write_dta11
```python
from test_stata import test_read_write_dta11
```



---
## test_read_write_dta12
```python
from test_stata import test_read_write_dta12
```



---
## test_read_write_dta13
```python
from test_stata import test_read_write_dta13
```



---
## test_read_write_reread_dta14
```python
from test_stata import test_read_write_reread_dta14
```



---
## test_read_write_reread_dta15
```python
from test_stata import test_read_write_reread_dta15
```



---
## test_timestamp_and_label
```python
from test_stata import test_timestamp_and_label
```



---
## test_invalid_timestamp
```python
from test_stata import test_invalid_timestamp
```



---
## test_numeric_column_names
```python
from test_stata import test_numeric_column_names
```



---
## test_nan_to_missing_value
```python
from test_stata import test_nan_to_missing_value
```



---
## test_no_index
```python
from test_stata import test_no_index
```



---
## test_string_no_dates
```python
from test_stata import test_string_no_dates
```



---
## test_large_value_conversion
```python
from test_stata import test_large_value_conversion
```



---
## test_dates_invalid_column
```python
from test_stata import test_dates_invalid_column
```



---
## test_105
```python
from test_stata import test_105
```



---
## test_value_labels_old_format
```python
from test_stata import test_value_labels_old_format
```



---
## test_date_export_formats
```python
from test_stata import test_date_export_formats
```



---
## test_write_missing_strings
```python
from test_stata import test_write_missing_strings
```



---
## test_bool_uint
```python
from test_stata import test_bool_uint
```



---
## test_variable_labels
```python
from test_stata import test_variable_labels
```



---
## test_minimal_size_col
```python
from test_stata import test_minimal_size_col
```



---
## test_excessively_long_string
```python
from test_stata import test_excessively_long_string
```



---
## test_missing_value_generator
```python
from test_stata import test_missing_value_generator
```



---
## test_missing_value_conversion
```python
from test_stata import test_missing_value_conversion
```



---
## test_big_dates
```python
from test_stata import test_big_dates
```



---
## test_dtype_conversion
```python
from test_stata import test_dtype_conversion
```



---
## test_drop_column
```python
from test_stata import test_drop_column
```



---
## test_categorical_writing
```python
from test_stata import test_categorical_writing
```



---
## test_categorical_warnings_and_errors
```python
from test_stata import test_categorical_warnings_and_errors
```



---
## test_categorical_with_stata_missing_values
```python
from test_stata import test_categorical_with_stata_missing_values
```



---
## test_categorical_order
```python
from test_stata import test_categorical_order
```



---
## test_categorical_sorting
```python
from test_stata import test_categorical_sorting
```



---
## test_categorical_ordering
```python
from test_stata import test_categorical_ordering
```



---
## test_read_chunks_117
```python
from test_stata import test_read_chunks_117
```



---
## _convert_categorical
```python
from test_stata import _convert_categorical
```

Emulate the categorical casting behavior we expect from roundtripping.

---
## test_iterator
```python
from test_stata import test_iterator
```



---
## test_read_chunks_115
```python
from test_stata import test_read_chunks_115
```



---
## test_read_chunks_columns
```python
from test_stata import test_read_chunks_columns
```



---
## test_write_variable_labels
```python
from test_stata import test_write_variable_labels
```



---
## test_invalid_variable_labels
```python
from test_stata import test_invalid_variable_labels
```



---
## test_invalid_variable_label_encoding
```python
from test_stata import test_invalid_variable_label_encoding
```



---
## test_write_variable_label_errors
```python
from test_stata import test_write_variable_label_errors
```



---
## test_default_date_conversion
```python
from test_stata import test_default_date_conversion
```



---
## test_unsupported_type
```python
from test_stata import test_unsupported_type
```



---
## test_unsupported_datetype
```python
from test_stata import test_unsupported_datetype
```



---
## test_repeated_column_labels
```python
from test_stata import test_repeated_column_labels
```



---
## test_stata_111
```python
from test_stata import test_stata_111
```



---
## test_out_of_range_double
```python
from test_stata import test_out_of_range_double
```



---
## test_out_of_range_float
```python
from test_stata import test_out_of_range_float
```



---
## test_inf
```python
from test_stata import test_inf
```



---
## test_path_pathlib
```python
from test_stata import test_path_pathlib
```



---
## test_pickle_path_localpath
```python
from test_stata import test_pickle_path_localpath
```



---
## test_value_labels_iterator
```python
from test_stata import test_value_labels_iterator
```



---
## test_set_index
```python
from test_stata import test_set_index
```



---
## test_date_parsing_ignores_format_details
```python
from test_stata import test_date_parsing_ignores_format_details
```



---
## test_writer_117
```python
from test_stata import test_writer_117
```



---
## test_convert_strl_name_swap
```python
from test_stata import test_convert_strl_name_swap
```



---
## test_invalid_date_conversion
```python
from test_stata import test_invalid_date_conversion
```



---
## test_nonfile_writing
```python
from test_stata import test_nonfile_writing
```



---
## test_gzip_writing
```python
from test_stata import test_gzip_writing
```



---
## test_unicode_dta_118
```python
from test_stata import test_unicode_dta_118
```



---
## test_mixed_string_strl
```python
from test_stata import test_mixed_string_strl
```



---
## test_all_none_exception
```python
from test_stata import test_all_none_exception
```



---
## test_invalid_file_not_written
```python
from test_stata import test_invalid_file_not_written
```



---
## test_strl_latin1
```python
from test_stata import test_strl_latin1
```



---
## test_encoding_latin1_118
```python
from test_stata import test_encoding_latin1_118
```



---
## test_stata_119
```python
from test_stata import test_stata_119
```



---
## test_utf8_writer
```python
from test_stata import test_utf8_writer
```



---
## test_writer_118_exceptions
```python
from test_stata import test_writer_118_exceptions
```



---
## test_read_write_ea_dtypes
```python
from test_stata import test_read_write_ea_dtypes
```



---
## __name__
```python
from test_html import __name__
```



---
## html_encoding_file
```python
from test_html import html_encoding_file
```

Parametrized fixture for HTML encoding test filenames.

---
## assert_framelist_equal
```python
from test_html import assert_framelist_equal
```



---
## test_bs4_version_fails
```python
from test_html import test_bs4_version_fails
```



---
## test_invalid_flavor
```python
from test_html import test_invalid_flavor
```



---
## test_same_ordering
```python
from test_html import test_same_ordering
```



---
## flavor_read_html
```python
from test_html import flavor_read_html
```



---
## TestReadHtml
```python
from test_html import TestReadHtml
```



---
## test_literal_html_deprecation
```python
from test_html import test_literal_html_deprecation
```



---
## spam_data
```python
from test_html import spam_data
```



---
## banklist_data
```python
from test_html import banklist_data
```



---
## test_to_html_compat
```python
from test_html import test_to_html_compat
```



---
## test_dtype_backend
```python
from test_html import test_dtype_backend
```



---
## test_banklist_url
```python
from test_html import test_banklist_url
```



---
## test_spam_url
```python
from test_html import test_spam_url
```



---
## test_banklist
```python
from test_html import test_banklist
```



---
## test_spam
```python
from test_html import test_spam
```



---
## test_spam_no_match
```python
from test_html import test_spam_no_match
```



---
## test_banklist_no_match
```python
from test_html import test_banklist_no_match
```



---
## test_spam_header
```python
from test_html import test_spam_header
```



---
## test_skiprows_int
```python
from test_html import test_skiprows_int
```



---
## test_skiprows_range
```python
from test_html import test_skiprows_range
```



---
## test_skiprows_list
```python
from test_html import test_skiprows_list
```



---
## test_skiprows_set
```python
from test_html import test_skiprows_set
```



---
## test_skiprows_slice
```python
from test_html import test_skiprows_slice
```



---
## test_skiprows_slice_short
```python
from test_html import test_skiprows_slice_short
```



---
## test_skiprows_slice_long
```python
from test_html import test_skiprows_slice_long
```



---
## test_skiprows_ndarray
```python
from test_html import test_skiprows_ndarray
```



---
## test_skiprows_invalid
```python
from test_html import test_skiprows_invalid
```



---
## test_index
```python
from test_html import test_index
```



---
## test_header_and_index_no_types
```python
from test_html import test_header_and_index_no_types
```



---
## test_header_and_index_with_types
```python
from test_html import test_header_and_index_with_types
```



---
## test_infer_types
```python
from test_html import test_infer_types
```



---
## test_string_io
```python
from test_html import test_string_io
```



---
## test_string
```python
from test_html import test_string
```



---
## test_file_like
```python
from test_html import test_file_like
```



---
## test_bad_url_protocol
```python
from test_html import test_bad_url_protocol
```



---
## test_invalid_url
```python
from test_html import test_invalid_url
```



---
## test_file_url
```python
from test_html import test_file_url
```



---
## test_invalid_table_attrs
```python
from test_html import test_invalid_table_attrs
```



---
## test_multiindex_header
```python
from test_html import test_multiindex_header
```



---
## test_multiindex_index
```python
from test_html import test_multiindex_index
```



---
## test_multiindex_header_index
```python
from test_html import test_multiindex_header_index
```



---
## test_multiindex_header_skiprows_tuples
```python
from test_html import test_multiindex_header_skiprows_tuples
```



---
## test_multiindex_header_skiprows
```python
from test_html import test_multiindex_header_skiprows
```



---
## test_multiindex_header_index_skiprows
```python
from test_html import test_multiindex_header_index_skiprows
```



---
## test_regex_idempotency
```python
from test_html import test_regex_idempotency
```



---
## test_negative_skiprows
```python
from test_html import test_negative_skiprows
```



---
## python_docs
```python
from test_html import python_docs
```



---
## test_multiple_matches
```python
from test_html import test_multiple_matches
```



---
## test_python_docs_table
```python
from test_html import test_python_docs_table
```



---
## test_empty_tables
```python
from test_html import test_empty_tables
```

Make sure that read_html ignores empty tables.

---
## test_multiple_tbody
```python
from test_html import test_multiple_tbody
```



---
## test_header_and_one_column
```python
from test_html import test_header_and_one_column
```

Don't fail with bs4 when there is a header and only one column
as described in issue #9178

---
## test_thead_without_tr
```python
from test_html import test_thead_without_tr
```

Ensure parser adds <tr> within <thead> on malformed HTML.

---
## test_tfoot_read
```python
from test_html import test_tfoot_read
```

Make sure that read_html reads tfoot, containing td or th.
Ignores empty tfoot

---
## test_parse_header_of_non_string_column
```python
from test_html import test_parse_header_of_non_string_column
```



---
## test_banklist_header
```python
from test_html import test_banklist_header
```



---
## test_gold_canyon
```python
from test_html import test_gold_canyon
```



---
## test_different_number_of_cols
```python
from test_html import test_different_number_of_cols
```



---
## test_colspan_rowspan_1
```python
from test_html import test_colspan_rowspan_1
```



---
## test_colspan_rowspan_copy_values
```python
from test_html import test_colspan_rowspan_copy_values
```



---
## test_colspan_rowspan_both_not_1
```python
from test_html import test_colspan_rowspan_both_not_1
```



---
## test_rowspan_at_end_of_row
```python
from test_html import test_rowspan_at_end_of_row
```



---
## test_rowspan_only_rows
```python
from test_html import test_rowspan_only_rows
```



---
## test_header_inferred_from_rows_with_only_th
```python
from test_html import test_header_inferred_from_rows_with_only_th
```



---
## test_parse_dates_list
```python
from test_html import test_parse_dates_list
```



---
## test_parse_dates_combine
```python
from test_html import test_parse_dates_combine
```



---
## test_wikipedia_states_table
```python
from test_html import test_wikipedia_states_table
```



---
## test_wikipedia_states_multiindex
```python
from test_html import test_wikipedia_states_multiindex
```



---
## test_parser_error_on_empty_header_row
```python
from test_html import test_parser_error_on_empty_header_row
```



---
## test_decimal_rows
```python
from test_html import test_decimal_rows
```



---
## test_bool_header_arg
```python
from test_html import test_bool_header_arg
```



---
## test_converters
```python
from test_html import test_converters
```



---
## test_na_values
```python
from test_html import test_na_values
```



---
## test_keep_default_na
```python
from test_html import test_keep_default_na
```



---
## test_preserve_empty_rows
```python
from test_html import test_preserve_empty_rows
```



---
## test_ignore_empty_rows_when_inferring_header
```python
from test_html import test_ignore_empty_rows_when_inferring_header
```



---
## test_multiple_header_rows
```python
from test_html import test_multiple_header_rows
```



---
## test_works_on_valid_markup
```python
from test_html import test_works_on_valid_markup
```



---
## test_fallback_success
```python
from test_html import test_fallback_success
```



---
## test_to_html_timestamp
```python
from test_html import test_to_html_timestamp
```



---
## test_to_html_borderless
```python
from test_html import test_to_html_borderless
```



---
## test_displayed_only
```python
from test_html import test_displayed_only
```



---
## test_displayed_only_with_many_elements
```python
from test_html import test_displayed_only_with_many_elements
```



---
## test_encode
```python
from test_html import test_encode
```



---
## test_parse_failure_unseekable
```python
from test_html import test_parse_failure_unseekable
```



---
## test_parse_failure_rewinds
```python
from test_html import test_parse_failure_rewinds
```



---
## test_importcheck_thread_safety
```python
from test_html import test_importcheck_thread_safety
```



---
## test_parse_path_object
```python
from test_html import test_parse_path_object
```



---
## test_parse_br_as_space
```python
from test_html import test_parse_br_as_space
```



---
## test_extract_links
```python
from test_html import test_extract_links
```



---
## test_extract_links_bad
```python
from test_html import test_extract_links_bad
```



---
## test_extract_links_all_no_header
```python
from test_html import test_extract_links_all_no_header
```



---
## test_invalid_dtype_backend
```python
from test_html import test_invalid_dtype_backend
```



---
## test_style_tag
```python
from test_html import test_style_tag
```



---
## try_remove_ws
```python
from test_html import try_remove_ws
```



---
## UnseekableStringIO
```python
from test_html import UnseekableStringIO
```



---
## MockFile
```python
from test_html import MockFile
```



---
## ErrorThread
```python
from test_html import ErrorThread
```



---
## seekable
```python
from test_html import seekable
```



---
## __init__
```python
from test_html import __init__
```



---
## read
```python
from test_html import read
```



---
## seek
```python
from test_html import seek
```



---
## __next__
```python
from test_html import __next__
```



---
## __iter__
```python
from test_html import __iter__
```



---
## run
```python
from test_html import run
```



---
## __name__
```python
from test_gcs import __name__
```



---
## gcs_buffer
```python
from test_gcs import gcs_buffer
```

Emulate GCS using a binary buffer.

---
## test_to_read_gcs
```python
from test_gcs import test_to_read_gcs
```

Test that many to/read functions support GCS.

GH 33987

---
## assert_equal_zip_safe
```python
from test_gcs import assert_equal_zip_safe
```

For zip compression, only compare the CRC-32 checksum of the file contents
to avoid checking the time-dependent last-modified timestamp which
in some CI builds is off-by-one

See https://en.wikipedia.org/wiki/ZIP_(file_format)#File_headers

---
## test_to_csv_compression_encoding_gcs
```python
from test_gcs import test_to_csv_compression_encoding_gcs
```

Compression and encoding should with GCS.

GH 35677 (to_csv, compression), GH 26124 (to_csv, encoding), and
GH 32392 (read_csv, encoding)

---
## test_to_parquet_gcs_new_file
```python
from test_gcs import test_to_parquet_gcs_new_file
```

Regression test for writing to a not-yet-existent GCS Parquet file.

---
## test_gcs_not_present_exception
```python
from test_gcs import test_gcs_not_present_exception
```



---
## MockGCSFileSystem
```python
from test_gcs import MockGCSFileSystem
```



---
## open
```python
from test_gcs import open
```



---
## ls
```python
from test_gcs import ls
```



---
## MockFileSystem
```python
from test_gcs import MockFileSystem
```



---
## from_uri
```python
from test_gcs import from_uri
```



---
## __name__
```python
from test_sql import __name__
```



---
## sql_strings
```python
from test_sql import sql_strings
```



---
## iris_table_metadata
```python
from test_sql import iris_table_metadata
```



---
## create_and_load_iris_sqlite3
```python
from test_sql import create_and_load_iris_sqlite3
```



---
## create_and_load_iris_postgresql
```python
from test_sql import create_and_load_iris_postgresql
```



---
## create_and_load_iris
```python
from test_sql import create_and_load_iris
```



---
## create_and_load_iris_view
```python
from test_sql import create_and_load_iris_view
```



---
## types_table_metadata
```python
from test_sql import types_table_metadata
```



---
## create_and_load_types_sqlite3
```python
from test_sql import create_and_load_types_sqlite3
```



---
## create_and_load_types_postgresql
```python
from test_sql import create_and_load_types_postgresql
```



---
## create_and_load_types
```python
from test_sql import create_and_load_types
```



---
## create_and_load_postgres_datetz
```python
from test_sql import create_and_load_postgres_datetz
```



---
## check_iris_frame
```python
from test_sql import check_iris_frame
```



---
## count_rows
```python
from test_sql import count_rows
```



---
## iris_path
```python
from test_sql import iris_path
```



---
## types_data
```python
from test_sql import types_data
```



---
## types_data_frame
```python
from test_sql import types_data_frame
```



---
## test_frame1
```python
from test_sql import test_frame1
```



---
## test_frame3
```python
from test_sql import test_frame3
```



---
## get_all_views
```python
from test_sql import get_all_views
```



---
## get_all_tables
```python
from test_sql import get_all_tables
```



---
## drop_table
```python
from test_sql import drop_table
```



---
## drop_view
```python
from test_sql import drop_view
```



---
## mysql_pymysql_engine
```python
from test_sql import mysql_pymysql_engine
```



---
## mysql_pymysql_engine_iris
```python
from test_sql import mysql_pymysql_engine_iris
```



---
## mysql_pymysql_engine_types
```python
from test_sql import mysql_pymysql_engine_types
```



---
## mysql_pymysql_conn
```python
from test_sql import mysql_pymysql_conn
```



---
## mysql_pymysql_conn_iris
```python
from test_sql import mysql_pymysql_conn_iris
```



---
## mysql_pymysql_conn_types
```python
from test_sql import mysql_pymysql_conn_types
```



---
## postgresql_psycopg2_engine
```python
from test_sql import postgresql_psycopg2_engine
```



---
## postgresql_psycopg2_engine_iris
```python
from test_sql import postgresql_psycopg2_engine_iris
```



---
## postgresql_psycopg2_engine_types
```python
from test_sql import postgresql_psycopg2_engine_types
```



---
## postgresql_psycopg2_conn
```python
from test_sql import postgresql_psycopg2_conn
```



---
## postgresql_adbc_conn
```python
from test_sql import postgresql_adbc_conn
```



---
## postgresql_adbc_iris
```python
from test_sql import postgresql_adbc_iris
```



---
## postgresql_adbc_types
```python
from test_sql import postgresql_adbc_types
```



---
## postgresql_psycopg2_conn_iris
```python
from test_sql import postgresql_psycopg2_conn_iris
```



---
## postgresql_psycopg2_conn_types
```python
from test_sql import postgresql_psycopg2_conn_types
```



---
## sqlite_str
```python
from test_sql import sqlite_str
```



---
## sqlite_engine
```python
from test_sql import sqlite_engine
```



---
## sqlite_conn
```python
from test_sql import sqlite_conn
```



---
## sqlite_str_iris
```python
from test_sql import sqlite_str_iris
```



---
## sqlite_engine_iris
```python
from test_sql import sqlite_engine_iris
```



---
## sqlite_conn_iris
```python
from test_sql import sqlite_conn_iris
```



---
## sqlite_str_types
```python
from test_sql import sqlite_str_types
```



---
## sqlite_engine_types
```python
from test_sql import sqlite_engine_types
```



---
## sqlite_conn_types
```python
from test_sql import sqlite_conn_types
```



---
## sqlite_adbc_conn
```python
from test_sql import sqlite_adbc_conn
```



---
## sqlite_adbc_iris
```python
from test_sql import sqlite_adbc_iris
```



---
## sqlite_adbc_types
```python
from test_sql import sqlite_adbc_types
```



---
## sqlite_buildin
```python
from test_sql import sqlite_buildin
```



---
## sqlite_buildin_iris
```python
from test_sql import sqlite_buildin_iris
```



---
## sqlite_buildin_types
```python
from test_sql import sqlite_buildin_types
```



---
## test_dataframe_to_sql
```python
from test_sql import test_dataframe_to_sql
```



---
## test_dataframe_to_sql_empty
```python
from test_sql import test_dataframe_to_sql_empty
```



---
## test_dataframe_to_sql_arrow_dtypes
```python
from test_sql import test_dataframe_to_sql_arrow_dtypes
```



---
## test_dataframe_to_sql_arrow_dtypes_missing
```python
from test_sql import test_dataframe_to_sql_arrow_dtypes_missing
```



---
## test_to_sql
```python
from test_sql import test_to_sql
```



---
## test_to_sql_exist
```python
from test_sql import test_to_sql_exist
```



---
## test_to_sql_exist_fail
```python
from test_sql import test_to_sql_exist_fail
```



---
## test_read_iris_query
```python
from test_sql import test_read_iris_query
```



---
## test_read_iris_query_chunksize
```python
from test_sql import test_read_iris_query_chunksize
```



---
## test_read_iris_query_expression_with_parameter
```python
from test_sql import test_read_iris_query_expression_with_parameter
```



---
## test_read_iris_query_string_with_parameter
```python
from test_sql import test_read_iris_query_string_with_parameter
```



---
## test_read_iris_table
```python
from test_sql import test_read_iris_table
```



---
## test_read_iris_table_chunksize
```python
from test_sql import test_read_iris_table_chunksize
```



---
## test_to_sql_callable
```python
from test_sql import test_to_sql_callable
```



---
## test_default_type_conversion
```python
from test_sql import test_default_type_conversion
```



---
## test_read_procedure
```python
from test_sql import test_read_procedure
```



---
## test_copy_from_callable_insertion_method
```python
from test_sql import test_copy_from_callable_insertion_method
```



---
## test_insertion_method_on_conflict_do_nothing
```python
from test_sql import test_insertion_method_on_conflict_do_nothing
```



---
## test_to_sql_on_public_schema
```python
from test_sql import test_to_sql_on_public_schema
```



---
## test_insertion_method_on_conflict_update
```python
from test_sql import test_insertion_method_on_conflict_update
```



---
## test_read_view_postgres
```python
from test_sql import test_read_view_postgres
```



---
## test_read_view_sqlite
```python
from test_sql import test_read_view_sqlite
```



---
## test_execute_typeerror
```python
from test_sql import test_execute_typeerror
```



---
## test_execute_deprecated
```python
from test_sql import test_execute_deprecated
```



---
## flavor
```python
from test_sql import flavor
```



---
## test_read_sql_iris_parameter
```python
from test_sql import test_read_sql_iris_parameter
```



---
## test_read_sql_iris_named_parameter
```python
from test_sql import test_read_sql_iris_named_parameter
```



---
## test_read_sql_iris_no_parameter_with_percent
```python
from test_sql import test_read_sql_iris_no_parameter_with_percent
```



---
## test_api_read_sql_view
```python
from test_sql import test_api_read_sql_view
```



---
## test_api_read_sql_with_chunksize_no_result
```python
from test_sql import test_api_read_sql_with_chunksize_no_result
```



---
## test_api_to_sql
```python
from test_sql import test_api_to_sql
```



---
## test_api_to_sql_fail
```python
from test_sql import test_api_to_sql_fail
```



---
## test_api_to_sql_replace
```python
from test_sql import test_api_to_sql_replace
```



---
## test_api_to_sql_append
```python
from test_sql import test_api_to_sql_append
```



---
## test_api_to_sql_type_mapping
```python
from test_sql import test_api_to_sql_type_mapping
```



---
## test_api_to_sql_series
```python
from test_sql import test_api_to_sql_series
```



---
## test_api_roundtrip
```python
from test_sql import test_api_roundtrip
```



---
## test_api_roundtrip_chunksize
```python
from test_sql import test_api_roundtrip_chunksize
```



---
## test_api_execute_sql
```python
from test_sql import test_api_execute_sql
```



---
## test_api_date_parsing
```python
from test_sql import test_api_date_parsing
```



---
## test_api_custom_dateparsing_error
```python
from test_sql import test_api_custom_dateparsing_error
```



---
## test_api_date_and_index
```python
from test_sql import test_api_date_and_index
```



---
## test_api_timedelta
```python
from test_sql import test_api_timedelta
```



---
## test_api_complex_raises
```python
from test_sql import test_api_complex_raises
```



---
## test_api_to_sql_index_label
```python
from test_sql import test_api_to_sql_index_label
```



---
## test_api_to_sql_index_label_multiindex
```python
from test_sql import test_api_to_sql_index_label_multiindex
```



---
## test_api_multiindex_roundtrip
```python
from test_sql import test_api_multiindex_roundtrip
```



---
## test_api_dtype_argument
```python
from test_sql import test_api_dtype_argument
```



---
## test_api_integer_col_names
```python
from test_sql import test_api_integer_col_names
```



---
## test_api_get_schema
```python
from test_sql import test_api_get_schema
```



---
## test_api_get_schema_with_schema
```python
from test_sql import test_api_get_schema_with_schema
```



---
## test_api_get_schema_dtypes
```python
from test_sql import test_api_get_schema_dtypes
```



---
## test_api_get_schema_keys
```python
from test_sql import test_api_get_schema_keys
```



---
## test_api_chunksize_read
```python
from test_sql import test_api_chunksize_read
```



---
## test_api_categorical
```python
from test_sql import test_api_categorical
```



---
## test_api_unicode_column_name
```python
from test_sql import test_api_unicode_column_name
```



---
## test_api_escaped_table_name
```python
from test_sql import test_api_escaped_table_name
```



---
## test_api_read_sql_duplicate_columns
```python
from test_sql import test_api_read_sql_duplicate_columns
```



---
## test_read_table_columns
```python
from test_sql import test_read_table_columns
```



---
## test_read_table_index_col
```python
from test_sql import test_read_table_index_col
```



---
## test_read_sql_delegate
```python
from test_sql import test_read_sql_delegate
```



---
## test_not_reflect_all_tables
```python
from test_sql import test_not_reflect_all_tables
```



---
## test_warning_case_insensitive_table_name
```python
from test_sql import test_warning_case_insensitive_table_name
```



---
## test_sqlalchemy_type_mapping
```python
from test_sql import test_sqlalchemy_type_mapping
```



---
## test_sqlalchemy_integer_mapping
```python
from test_sql import test_sqlalchemy_integer_mapping
```



---
## test_sqlalchemy_integer_overload_mapping
```python
from test_sql import test_sqlalchemy_integer_overload_mapping
```



---
## test_database_uri_string
```python
from test_sql import test_database_uri_string
```



---
## test_pg8000_sqlalchemy_passthrough_error
```python
from test_sql import test_pg8000_sqlalchemy_passthrough_error
```



---
## test_query_by_text_obj
```python
from test_sql import test_query_by_text_obj
```



---
## test_query_by_select_obj
```python
from test_sql import test_query_by_select_obj
```



---
## test_column_with_percentage
```python
from test_sql import test_column_with_percentage
```



---
## test_sql_open_close
```python
from test_sql import test_sql_open_close
```



---
## test_con_string_import_error
```python
from test_sql import test_con_string_import_error
```



---
## test_con_unknown_dbapi2_class_does_not_error_without_sql_alchemy_installed
```python
from test_sql import test_con_unknown_dbapi2_class_does_not_error_without_sql_alchemy_installed
```



---
## test_sqlite_read_sql_delegate
```python
from test_sql import test_sqlite_read_sql_delegate
```



---
## test_get_schema2
```python
from test_sql import test_get_schema2
```



---
## test_sqlite_type_mapping
```python
from test_sql import test_sqlite_type_mapping
```



---
## test_create_table
```python
from test_sql import test_create_table
```



---
## test_drop_table
```python
from test_sql import test_drop_table
```



---
## test_roundtrip
```python
from test_sql import test_roundtrip
```



---
## test_execute_sql
```python
from test_sql import test_execute_sql
```



---
## test_sqlalchemy_read_table
```python
from test_sql import test_sqlalchemy_read_table
```



---
## test_sqlalchemy_read_table_columns
```python
from test_sql import test_sqlalchemy_read_table_columns
```



---
## test_read_table_absent_raises
```python
from test_sql import test_read_table_absent_raises
```



---
## test_sqlalchemy_default_type_conversion
```python
from test_sql import test_sqlalchemy_default_type_conversion
```



---
## test_bigint
```python
from test_sql import test_bigint
```



---
## test_default_date_load
```python
from test_sql import test_default_date_load
```



---
## test_datetime_with_timezone_query
```python
from test_sql import test_datetime_with_timezone_query
```



---
## test_datetime_with_timezone_query_chunksize
```python
from test_sql import test_datetime_with_timezone_query_chunksize
```



---
## test_datetime_with_timezone_table
```python
from test_sql import test_datetime_with_timezone_table
```



---
## test_datetime_with_timezone_roundtrip
```python
from test_sql import test_datetime_with_timezone_roundtrip
```



---
## test_out_of_bounds_datetime
```python
from test_sql import test_out_of_bounds_datetime
```



---
## test_naive_datetimeindex_roundtrip
```python
from test_sql import test_naive_datetimeindex_roundtrip
```



---
## test_date_parsing
```python
from test_sql import test_date_parsing
```



---
## test_datetime
```python
from test_sql import test_datetime
```



---
## test_datetime_NaT
```python
from test_sql import test_datetime_NaT
```



---
## test_datetime_date
```python
from test_sql import test_datetime_date
```



---
## test_datetime_time
```python
from test_sql import test_datetime_time
```



---
## test_mixed_dtype_insert
```python
from test_sql import test_mixed_dtype_insert
```



---
## test_nan_numeric
```python
from test_sql import test_nan_numeric
```



---
## test_nan_fullcolumn
```python
from test_sql import test_nan_fullcolumn
```



---
## test_nan_string
```python
from test_sql import test_nan_string
```



---
## test_to_sql_save_index
```python
from test_sql import test_to_sql_save_index
```



---
## test_transactions
```python
from test_sql import test_transactions
```



---
## test_transaction_rollback
```python
from test_sql import test_transaction_rollback
```



---
## test_get_schema_create_table
```python
from test_sql import test_get_schema_create_table
```



---
## test_dtype
```python
from test_sql import test_dtype
```



---
## test_notna_dtype
```python
from test_sql import test_notna_dtype
```



---
## test_double_precision
```python
from test_sql import test_double_precision
```



---
## test_connectable_issue_example
```python
from test_sql import test_connectable_issue_example
```



---
## test_to_sql_with_negative_npinf
```python
from test_sql import test_to_sql_with_negative_npinf
```



---
## test_temporary_table
```python
from test_sql import test_temporary_table
```



---
## test_invalid_engine
```python
from test_sql import test_invalid_engine
```



---
## test_to_sql_with_sql_engine
```python
from test_sql import test_to_sql_with_sql_engine
```

`to_sql` with the `engine` param

---
## test_options_sqlalchemy
```python
from test_sql import test_options_sqlalchemy
```



---
## test_options_auto
```python
from test_sql import test_options_auto
```



---
## test_options_get_engine
```python
from test_sql import test_options_get_engine
```



---
## test_get_engine_auto_error_message
```python
from test_sql import test_get_engine_auto_error_message
```



---
## test_read_sql_dtype_backend
```python
from test_sql import test_read_sql_dtype_backend
```



---
## test_read_sql_dtype_backend_table
```python
from test_sql import test_read_sql_dtype_backend_table
```



---
## test_read_sql_invalid_dtype_backend_table
```python
from test_sql import test_read_sql_invalid_dtype_backend_table
```



---
## dtype_backend_data
```python
from test_sql import dtype_backend_data
```



---
## dtype_backend_expected
```python
from test_sql import dtype_backend_expected
```



---
## test_chunksize_empty_dtypes
```python
from test_sql import test_chunksize_empty_dtypes
```



---
## test_read_sql_dtype
```python
from test_sql import test_read_sql_dtype
```



---
## test_keyword_deprecation
```python
from test_sql import test_keyword_deprecation
```



---
## test_bigint_warning
```python
from test_sql import test_bigint_warning
```



---
## test_valueerror_exception
```python
from test_sql import test_valueerror_exception
```



---
## test_row_object_is_named_tuple
```python
from test_sql import test_row_object_is_named_tuple
```



---
## test_read_sql_string_inference
```python
from test_sql import test_read_sql_string_inference
```



---
## test_roundtripping_datetimes
```python
from test_sql import test_roundtripping_datetimes
```



---
## sqlite_builtin_detect_types
```python
from test_sql import sqlite_builtin_detect_types
```



---
## test_roundtripping_datetimes_detect_types
```python
from test_sql import test_roundtripping_datetimes_detect_types
```



---
## test_psycopg2_schema_support
```python
from test_sql import test_psycopg2_schema_support
```



---
## test_self_join_date_columns
```python
from test_sql import test_self_join_date_columns
```



---
## test_create_and_drop_table
```python
from test_sql import test_create_and_drop_table
```



---
## test_sqlite_datetime_date
```python
from test_sql import test_sqlite_datetime_date
```



---
## test_sqlite_datetime_time
```python
from test_sql import test_sqlite_datetime_time
```



---
## get_sqlite_column_type
```python
from test_sql import get_sqlite_column_type
```



---
## test_sqlite_test_dtype
```python
from test_sql import test_sqlite_test_dtype
```



---
## test_sqlite_notna_dtype
```python
from test_sql import test_sqlite_notna_dtype
```



---
## test_sqlite_illegal_names
```python
from test_sql import test_sqlite_illegal_names
```



---
## format_query
```python
from test_sql import format_query
```



---
## tquery
```python
from test_sql import tquery
```

Replace removed sql.tquery function

---
## test_xsqlite_basic
```python
from test_sql import test_xsqlite_basic
```



---
## test_xsqlite_write_row_by_row
```python
from test_sql import test_xsqlite_write_row_by_row
```



---
## test_xsqlite_execute
```python
from test_sql import test_xsqlite_execute
```



---
## test_xsqlite_schema
```python
from test_sql import test_xsqlite_schema
```



---
## test_xsqlite_execute_fail
```python
from test_sql import test_xsqlite_execute_fail
```



---
## test_xsqlite_execute_closed_connection
```python
from test_sql import test_xsqlite_execute_closed_connection
```



---
## test_xsqlite_keyword_as_column_names
```python
from test_sql import test_xsqlite_keyword_as_column_names
```



---
## test_xsqlite_onecolumn_of_integer
```python
from test_sql import test_xsqlite_onecolumn_of_integer
```



---
## test_xsqlite_if_exists
```python
from test_sql import test_xsqlite_if_exists
```



---
## sample
```python
from test_sql import sample
```



---
## psql_insert_copy
```python
from test_sql import psql_insert_copy
```



---
## insert_on_conflict
```python
from test_sql import insert_on_conflict
```



---
## MockSqliteConnection
```python
from test_sql import MockSqliteConnection
```



---
## test_select
```python
from test_sql import test_select
```



---
## test_append
```python
from test_sql import test_append
```



---
## test_connectable
```python
from test_sql import test_connectable
```



---
## main
```python
from test_sql import main
```



---
## Temporary
```python
from test_sql import Temporary
```



---
## func
```python
from test_sql import func
```



---
## Test
```python
from test_sql import Test
```



---
## __init__
```python
from test_sql import __init__
```



---
## __getattr__
```python
from test_sql import __getattr__
```



---
## close
```python
from test_sql import close
```



---
## DummyException
```python
from test_sql import DummyException
```



---
## __name__
```python
from test_gbq import __name__
```



---
## test_read_gbq_deprecated
```python
from test_gbq import test_read_gbq_deprecated
```



---
## test_to_gbq_deprecated
```python
from test_gbq import test_to_gbq_deprecated
```



---
## __name__
```python
from test_http_headers import __name__
```

Tests for the pandas custom headers in http(s) requests

---
## gzip_bytes
```python
from test_http_headers import gzip_bytes
```



---
## csv_responder
```python
from test_http_headers import csv_responder
```



---
## gz_csv_responder
```python
from test_http_headers import gz_csv_responder
```



---
## json_responder
```python
from test_http_headers import json_responder
```



---
## gz_json_responder
```python
from test_http_headers import gz_json_responder
```



---
## html_responder
```python
from test_http_headers import html_responder
```



---
## parquetpyarrow_reponder
```python
from test_http_headers import parquetpyarrow_reponder
```



---
## parquetfastparquet_responder
```python
from test_http_headers import parquetfastparquet_responder
```



---
## pickle_respnder
```python
from test_http_headers import pickle_respnder
```



---
## stata_responder
```python
from test_http_headers import stata_responder
```



---
## test_request_headers
```python
from test_http_headers import test_request_headers
```



---
## test_to_parquet_to_disk_with_storage_options
```python
from test_http_headers import test_to_parquet_to_disk_with_storage_options
```



---
## __name__
```python
from test_feather import __name__
```



---
## TestFeather
```python
from test_feather import TestFeather
```



---
## check_error_on_write
```python
from test_feather import check_error_on_write
```



---
## check_external_error_on_write
```python
from test_feather import check_external_error_on_write
```



---
## check_round_trip
```python
from test_feather import check_round_trip
```



---
## test_error
```python
from test_feather import test_error
```



---
## test_basic
```python
from test_feather import test_basic
```



---
## test_duplicate_columns
```python
from test_feather import test_duplicate_columns
```



---
## test_read_columns
```python
from test_feather import test_read_columns
```



---
## test_read_columns_different_order
```python
from test_feather import test_read_columns_different_order
```



---
## test_unsupported_other
```python
from test_feather import test_unsupported_other
```



---
## test_rw_use_threads
```python
from test_feather import test_rw_use_threads
```



---
## test_path_pathlib
```python
from test_feather import test_path_pathlib
```



---
## test_path_localpath
```python
from test_feather import test_path_localpath
```



---
## test_passthrough_keywords
```python
from test_feather import test_passthrough_keywords
```



---
## test_http_path
```python
from test_feather import test_http_path
```



---
## test_read_feather_dtype_backend
```python
from test_feather import test_read_feather_dtype_backend
```



---
## test_int_columns_and_index
```python
from test_feather import test_int_columns_and_index
```



---
## test_invalid_dtype_backend
```python
from test_feather import test_invalid_dtype_backend
```



---
## test_string_inference
```python
from test_feather import test_string_inference
```



---
## __name__
```python
from test_spss import __name__
```



---
## test_spss_labelled_num
```python
from test_spss import test_spss_labelled_num
```



---
## test_spss_labelled_num_na
```python
from test_spss import test_spss_labelled_num_na
```



---
## test_spss_labelled_str
```python
from test_spss import test_spss_labelled_str
```



---
## test_spss_umlauts
```python
from test_spss import test_spss_umlauts
```



---
## test_spss_usecols
```python
from test_spss import test_spss_usecols
```



---
## test_spss_umlauts_dtype_backend
```python
from test_spss import test_spss_umlauts_dtype_backend
```



---
## test_invalid_dtype_backend
```python
from test_spss import test_invalid_dtype_backend
```



---
## test_spss_metadata
```python
from test_spss import test_spss_metadata
```



---
## __name__
```python
from generate_legacy_storage_files import __name__
```

self-contained to write legacy storage pickle files

To use this script. Create an environment where you want
generate pickles, say its for 0.20.3, with your pandas clone
in ~/pandas

. activate pandas_0.20.3
cd ~/pandas/pandas

$ python -m tests.io.generate_legacy_storage_files     tests/io/data/legacy_pickle/0.20.3/ pickle

This script generates a storage file for the current arch, system,
and python version
  pandas version: 0.20.3
  output dir    : pandas/pandas/tests/io/data/legacy_pickle/0.20.3/
  storage format: pickle
created pickle file: 0.20.3_x86_64_darwin_3.5.2.pickle

The idea here is you are using the *current* version of the
generate_legacy_storage_files with an *older* version of pandas to
generate a pickle file. We will then check this file into a current
branch, and test using test_pickle.py. This will load the *older*
pickles and test versus the current data that is generated
(with main). These are then compared.

If we have cases where we changed the signature (e.g. we renamed
offset -> freq in Timestamp). Then we have to conditionally execute
in the generate_legacy_storage_files.py to make it
run under the older AND the newer version.

---
## _create_sp_series
```python
from generate_legacy_storage_files import _create_sp_series
```



---
## _create_sp_tsseries
```python
from generate_legacy_storage_files import _create_sp_tsseries
```



---
## _create_sp_frame
```python
from generate_legacy_storage_files import _create_sp_frame
```



---
## create_pickle_data
```python
from generate_legacy_storage_files import create_pickle_data
```

create the pickle data

---
## platform_name
```python
from generate_legacy_storage_files import platform_name
```



---
## write_legacy_pickles
```python
from generate_legacy_storage_files import write_legacy_pickles
```



---
## write_legacy_file
```python
from generate_legacy_storage_files import write_legacy_file
```



---
## __name__
```python
from test_s3 import __name__
```



---
## test_streaming_s3_objects
```python
from test_s3 import test_streaming_s3_objects
```



---
## test_read_without_creds_from_pub_bucket
```python
from test_s3 import test_read_without_creds_from_pub_bucket
```



---
## test_read_with_creds_from_pub_bucket
```python
from test_s3 import test_read_with_creds_from_pub_bucket
```



---
## __name__
```python
from test_methods import __name__
```



---
## test_copy
```python
from test_methods import test_copy
```



---
## test_copy_shallow
```python
from test_methods import test_copy_shallow
```



---
## test_methods_copy_keyword
```python
from test_methods import test_methods_copy_keyword
```



---
## test_methods_series_copy_keyword
```python
from test_methods import test_methods_series_copy_keyword
```



---
## test_transpose_copy_keyword
```python
from test_methods import test_transpose_copy_keyword
```



---
## test_reset_index
```python
from test_methods import test_reset_index
```



---
## test_reset_index_series_drop
```python
from test_methods import test_reset_index_series_drop
```



---
## test_groupby_column_index_in_references
```python
from test_methods import test_groupby_column_index_in_references
```



---
## test_rename_columns
```python
from test_methods import test_rename_columns
```



---
## test_rename_columns_modify_parent
```python
from test_methods import test_rename_columns_modify_parent
```



---
## test_pipe
```python
from test_methods import test_pipe
```



---
## test_pipe_modify_df
```python
from test_methods import test_pipe_modify_df
```



---
## test_reindex_columns
```python
from test_methods import test_reindex_columns
```



---
## test_reindex_rows
```python
from test_methods import test_reindex_rows
```



---
## test_drop_on_column
```python
from test_methods import test_drop_on_column
```



---
## test_select_dtypes
```python
from test_methods import test_select_dtypes
```



---
## test_filter
```python
from test_methods import test_filter
```



---
## test_shift_no_op
```python
from test_methods import test_shift_no_op
```



---
## test_shift_index
```python
from test_methods import test_shift_index
```



---
## test_shift_rows_freq
```python
from test_methods import test_shift_rows_freq
```



---
## test_shift_columns
```python
from test_methods import test_shift_columns
```



---
## test_pop
```python
from test_methods import test_pop
```



---
## test_align_frame
```python
from test_methods import test_align_frame
```



---
## test_align_series
```python
from test_methods import test_align_series
```



---
## test_align_copy_false
```python
from test_methods import test_align_copy_false
```



---
## test_align_with_series_copy_false
```python
from test_methods import test_align_with_series_copy_false
```



---
## test_to_frame
```python
from test_methods import test_to_frame
```



---
## test_swapaxes_noop
```python
from test_methods import test_swapaxes_noop
```



---
## test_swapaxes_single_block
```python
from test_methods import test_swapaxes_single_block
```



---
## test_swapaxes_read_only_array
```python
from test_methods import test_swapaxes_read_only_array
```



---
## test_chained_methods
```python
from test_methods import test_chained_methods
```



---
## test_to_timestamp
```python
from test_methods import test_to_timestamp
```



---
## test_to_period
```python
from test_methods import test_to_period
```



---
## test_set_index
```python
from test_methods import test_set_index
```



---
## test_set_index_mutating_parent_does_not_mutate_index
```python
from test_methods import test_set_index_mutating_parent_does_not_mutate_index
```



---
## test_add_prefix
```python
from test_methods import test_add_prefix
```



---
## test_add_suffix
```python
from test_methods import test_add_suffix
```



---
## test_dropna
```python
from test_methods import test_dropna
```



---
## test_dropna_series
```python
from test_methods import test_dropna_series
```



---
## test_head_tail
```python
from test_methods import test_head_tail
```



---
## test_infer_objects
```python
from test_methods import test_infer_objects
```



---
## test_infer_objects_no_reference
```python
from test_methods import test_infer_objects_no_reference
```



---
## test_infer_objects_reference
```python
from test_methods import test_infer_objects_reference
```



---
## test_truncate
```python
from test_methods import test_truncate
```



---
## test_assign_drop_duplicates
```python
from test_methods import test_assign_drop_duplicates
```



---
## test_take
```python
from test_methods import test_take
```



---
## test_between_time
```python
from test_methods import test_between_time
```



---
## test_reindex_like
```python
from test_methods import test_reindex_like
```



---
## test_sort_index
```python
from test_methods import test_sort_index
```



---
## test_sort_values
```python
from test_methods import test_sort_values
```



---
## test_sort_values_inplace
```python
from test_methods import test_sort_values_inplace
```



---
## test_round
```python
from test_methods import test_round
```



---
## test_reorder_levels
```python
from test_methods import test_reorder_levels
```



---
## test_series_reorder_levels
```python
from test_methods import test_series_reorder_levels
```



---
## test_swaplevel
```python
from test_methods import test_swaplevel
```



---
## test_frame_set_axis
```python
from test_methods import test_frame_set_axis
```



---
## test_series_set_axis
```python
from test_methods import test_series_set_axis
```



---
## test_set_flags
```python
from test_methods import test_set_flags
```



---
## test_rename_axis
```python
from test_methods import test_rename_axis
```



---
## test_tz_convert_localize
```python
from test_methods import test_tz_convert_localize
```



---
## test_droplevel
```python
from test_methods import test_droplevel
```



---
## test_squeeze
```python
from test_methods import test_squeeze
```



---
## test_items
```python
from test_methods import test_items
```



---
## test_putmask
```python
from test_methods import test_putmask
```



---
## test_putmask_no_reference
```python
from test_methods import test_putmask_no_reference
```



---
## test_putmask_aligns_rhs_no_reference
```python
from test_methods import test_putmask_aligns_rhs_no_reference
```



---
## test_putmask_dont_copy_some_blocks
```python
from test_methods import test_putmask_dont_copy_some_blocks
```



---
## test_where_mask_noop
```python
from test_methods import test_where_mask_noop
```



---
## test_where_mask
```python
from test_methods import test_where_mask
```



---
## test_where_mask_noop_on_single_column
```python
from test_methods import test_where_mask_noop_on_single_column
```



---
## test_chained_where_mask
```python
from test_methods import test_chained_where_mask
```



---
## test_asfreq_noop
```python
from test_methods import test_asfreq_noop
```



---
## test_iterrows
```python
from test_methods import test_iterrows
```



---
## test_interpolate_creates_copy
```python
from test_methods import test_interpolate_creates_copy
```



---
## test_isetitem
```python
from test_methods import test_isetitem
```



---
## test_isetitem_series
```python
from test_methods import test_isetitem_series
```



---
## test_isetitem_frame
```python
from test_methods import test_isetitem_frame
```



---
## test_get
```python
from test_methods import test_get
```



---
## test_xs
```python
from test_methods import test_xs
```



---
## test_xs_multiindex
```python
from test_methods import test_xs_multiindex
```



---
## test_update_frame
```python
from test_methods import test_update_frame
```



---
## test_update_series
```python
from test_methods import test_update_series
```



---
## test_update_chained_assignment
```python
from test_methods import test_update_chained_assignment
```



---
## test_inplace_arithmetic_series
```python
from test_methods import test_inplace_arithmetic_series
```



---
## test_inplace_arithmetic_series_with_reference
```python
from test_methods import test_inplace_arithmetic_series_with_reference
```



---
## test_transpose
```python
from test_methods import test_transpose
```



---
## test_transpose_different_dtypes
```python
from test_methods import test_transpose_different_dtypes
```



---
## test_transpose_ea_single_column
```python
from test_methods import test_transpose_ea_single_column
```



---
## test_transform_frame
```python
from test_methods import test_transform_frame
```



---
## test_transform_series
```python
from test_methods import test_transform_series
```



---
## test_count_read_only_array
```python
from test_methods import test_count_read_only_array
```



---
## test_series_view
```python
from test_methods import test_series_view
```



---
## test_insert_series
```python
from test_methods import test_insert_series
```



---
## test_eval
```python
from test_methods import test_eval
```



---
## test_eval_inplace
```python
from test_methods import test_eval_inplace
```



---
## test_apply_modify_row
```python
from test_methods import test_apply_modify_row
```



---
## testfunc
```python
from test_methods import testfunc
```



---
## func
```python
from test_methods import func
```



---
## transform
```python
from test_methods import transform
```



---
## __name__
```python
from test_interp_fillna import __name__
```



---
## test_interpolate_no_op
```python
from test_interp_fillna import test_interpolate_no_op
```



---
## test_interp_fill_functions
```python
from test_interp_fillna import test_interp_fill_functions
```



---
## test_interpolate_triggers_copy
```python
from test_interp_fillna import test_interpolate_triggers_copy
```



---
## test_interpolate_inplace_no_reference_no_copy
```python
from test_interp_fillna import test_interpolate_inplace_no_reference_no_copy
```



---
## test_interpolate_inplace_with_refs
```python
from test_interp_fillna import test_interpolate_inplace_with_refs
```



---
## test_interp_fill_functions_inplace
```python
from test_interp_fillna import test_interp_fill_functions_inplace
```



---
## test_interpolate_cleaned_fill_method
```python
from test_interp_fillna import test_interpolate_cleaned_fill_method
```



---
## test_interpolate_object_convert_no_op
```python
from test_interp_fillna import test_interpolate_object_convert_no_op
```



---
## test_interpolate_object_convert_copies
```python
from test_interp_fillna import test_interpolate_object_convert_copies
```



---
## test_interpolate_downcast
```python
from test_interp_fillna import test_interpolate_downcast
```



---
## test_interpolate_downcast_reference_triggers_copy
```python
from test_interp_fillna import test_interpolate_downcast_reference_triggers_copy
```



---
## test_fillna
```python
from test_interp_fillna import test_fillna
```



---
## test_fillna_dict
```python
from test_interp_fillna import test_fillna_dict
```



---
## test_fillna_inplace
```python
from test_interp_fillna import test_fillna_inplace
```



---
## test_fillna_inplace_reference
```python
from test_interp_fillna import test_fillna_inplace_reference
```



---
## test_fillna_interval_inplace_reference
```python
from test_interp_fillna import test_fillna_interval_inplace_reference
```



---
## test_fillna_series_empty_arg
```python
from test_interp_fillna import test_fillna_series_empty_arg
```



---
## test_fillna_series_empty_arg_inplace
```python
from test_interp_fillna import test_fillna_series_empty_arg_inplace
```



---
## test_fillna_ea_noop_shares_memory
```python
from test_interp_fillna import test_fillna_ea_noop_shares_memory
```



---
## test_fillna_inplace_ea_noop_shares_memory
```python
from test_interp_fillna import test_fillna_inplace_ea_noop_shares_memory
```



---
## test_fillna_chained_assignment
```python
from test_interp_fillna import test_fillna_chained_assignment
```



---
## test_interpolate_chained_assignment
```python
from test_interp_fillna import test_interpolate_chained_assignment
```



---
## __name__
```python
from test_chained_assignment_deprecation import __name__
```



---
## test_methods_iloc_warn
```python
from test_chained_assignment_deprecation import test_methods_iloc_warn
```



---
## test_methods_iloc_getitem_item_cache
```python
from test_chained_assignment_deprecation import test_methods_iloc_getitem_item_cache
```



---
## test_methods_iloc_getitem_item_cache_fillna
```python
from test_chained_assignment_deprecation import test_methods_iloc_getitem_item_cache_fillna
```



---
## test_series_setitem
```python
from test_chained_assignment_deprecation import test_series_setitem
```



---
## test_frame_setitem
```python
from test_chained_assignment_deprecation import test_frame_setitem
```



---
## test_series_from_series
```python
from test_constructors import test_series_from_series
```



---
## test_series_from_series_with_reindex
```python
from test_constructors import test_series_from_series_with_reindex
```



---
## test_series_from_array
```python
from test_constructors import test_series_from_array
```



---
## test_series_from_array_different_dtype
```python
from test_constructors import test_series_from_array_different_dtype
```



---
## test_series_from_index
```python
from test_constructors import test_series_from_index
```



---
## test_series_from_index_different_dtypes
```python
from test_constructors import test_series_from_index_different_dtypes
```



---
## test_series_from_block_manager
```python
from test_constructors import test_series_from_block_manager
```



---
## test_series_from_block_manager_different_dtype
```python
from test_constructors import test_series_from_block_manager_different_dtype
```



---
## test_dataframe_constructor_mgr_or_df
```python
from test_constructors import test_dataframe_constructor_mgr_or_df
```



---
## test_dataframe_from_dict_of_series
```python
from test_constructors import test_dataframe_from_dict_of_series
```



---
## test_dataframe_from_dict_of_series_with_reindex
```python
from test_constructors import test_dataframe_from_dict_of_series_with_reindex
```



---
## test_dataframe_from_series_or_index
```python
from test_constructors import test_dataframe_from_series_or_index
```



---
## test_dataframe_from_series_or_index_different_dtype
```python
from test_constructors import test_dataframe_from_series_or_index_different_dtype
```



---
## test_dataframe_from_series_infer_datetime
```python
from test_constructors import test_dataframe_from_series_infer_datetime
```



---
## test_dataframe_from_dict_of_series_with_dtype
```python
from test_constructors import test_dataframe_from_dict_of_series_with_dtype
```



---
## test_frame_from_numpy_array
```python
from test_constructors import test_frame_from_numpy_array
```



---
## test_dataframe_from_records_with_dataframe
```python
from test_constructors import test_dataframe_from_records_with_dataframe
```



---
## test_frame_from_dict_of_index
```python
from test_constructors import test_frame_from_dict_of_index
```



---
## get_array
```python
from util import get_array
```

Helper method to get array for a DataFrame column or a Series.

Equivalent of df[col].values, but without going through normal getitem,
which triggers tracking references / CoW (and we might be testing that
this is done by some other operation).

---
## __name__
```python
from test_array import __name__
```



---
## test_series_values
```python
from test_array import test_series_values
```



---
## test_dataframe_values
```python
from test_array import test_dataframe_values
```



---
## test_series_to_numpy
```python
from test_array import test_series_to_numpy
```



---
## test_ravel_read_only
```python
from test_array import test_ravel_read_only
```



---
## test_series_array_ea_dtypes
```python
from test_array import test_series_array_ea_dtypes
```



---
## test_dataframe_array_ea_dtypes
```python
from test_array import test_dataframe_array_ea_dtypes
```



---
## test_dataframe_array_string_dtype
```python
from test_array import test_dataframe_array_string_dtype
```



---
## test_dataframe_multiple_numpy_dtypes
```python
from test_array import test_dataframe_multiple_numpy_dtypes
```



---
## test_values_is_ea
```python
from test_array import test_values_is_ea
```



---
## test_empty_dataframe
```python
from test_array import test_empty_dataframe
```



---
## __name__
```python
from test_setitem import __name__
```



---
## test_set_column_with_array
```python
from test_setitem import test_set_column_with_array
```



---
## test_set_column_with_series
```python
from test_setitem import test_set_column_with_series
```



---
## test_set_column_with_index
```python
from test_setitem import test_set_column_with_index
```



---
## test_set_columns_with_dataframe
```python
from test_setitem import test_set_columns_with_dataframe
```



---
## test_setitem_series_no_copy
```python
from test_setitem import test_setitem_series_no_copy
```



---
## test_setitem_series_no_copy_single_block
```python
from test_setitem import test_setitem_series_no_copy_single_block
```



---
## test_setitem_series_no_copy_split_block
```python
from test_setitem import test_setitem_series_no_copy_split_block
```



---
## test_setitem_series_column_midx_broadcasting
```python
from test_setitem import test_setitem_series_column_midx_broadcasting
```



---
## test_set_column_with_inplace_operator
```python
from test_setitem import test_set_column_with_inplace_operator
```



---
## test_get_array_numpy
```python
from test_util import test_get_array_numpy
```



---
## test_get_array_masked
```python
from test_util import test_get_array_masked
```



---
## backend
```python
from test_indexing import backend
```



---
## test_subset_column_selection
```python
from test_indexing import test_subset_column_selection
```



---
## test_subset_column_selection_modify_parent
```python
from test_indexing import test_subset_column_selection_modify_parent
```



---
## test_subset_row_slice
```python
from test_indexing import test_subset_row_slice
```



---
## test_subset_column_slice
```python
from test_indexing import test_subset_column_slice
```



---
## test_subset_loc_rows_columns
```python
from test_indexing import test_subset_loc_rows_columns
```



---
## test_subset_iloc_rows_columns
```python
from test_indexing import test_subset_iloc_rows_columns
```



---
## test_subset_set_with_row_indexer
```python
from test_indexing import test_subset_set_with_row_indexer
```



---
## test_subset_set_with_mask
```python
from test_indexing import test_subset_set_with_mask
```



---
## test_subset_set_column
```python
from test_indexing import test_subset_set_column
```



---
## test_subset_set_column_with_loc
```python
from test_indexing import test_subset_set_column_with_loc
```



---
## test_subset_set_column_with_loc2
```python
from test_indexing import test_subset_set_column_with_loc2
```



---
## test_subset_set_columns
```python
from test_indexing import test_subset_set_columns
```



---
## test_subset_set_with_column_indexer
```python
from test_indexing import test_subset_set_with_column_indexer
```



---
## test_subset_chained_getitem
```python
from test_indexing import test_subset_chained_getitem
```



---
## test_subset_chained_getitem_column
```python
from test_indexing import test_subset_chained_getitem_column
```



---
## test_subset_chained_getitem_series
```python
from test_indexing import test_subset_chained_getitem_series
```



---
## test_subset_chained_single_block_row
```python
from test_indexing import test_subset_chained_single_block_row
```



---
## test_null_slice
```python
from test_indexing import test_null_slice
```



---
## test_null_slice_series
```python
from test_indexing import test_null_slice_series
```



---
## test_series_getitem_slice
```python
from test_indexing import test_series_getitem_slice
```



---
## test_series_getitem_ellipsis
```python
from test_indexing import test_series_getitem_ellipsis
```



---
## test_series_subset_set_with_indexer
```python
from test_indexing import test_series_subset_set_with_indexer
```



---
## test_del_frame
```python
from test_indexing import test_del_frame
```



---
## test_del_series
```python
from test_indexing import test_del_series
```



---
## test_column_as_series
```python
from test_indexing import test_column_as_series
```



---
## test_column_as_series_set_with_upcast
```python
from test_indexing import test_column_as_series_set_with_upcast
```



---
## test_column_as_series_no_item_cache
```python
from test_indexing import test_column_as_series_no_item_cache
```



---
## test_dataframe_add_column_from_series
```python
from test_indexing import test_dataframe_add_column_from_series
```



---
## test_set_value_copy_only_necessary_column
```python
from test_indexing import test_set_value_copy_only_necessary_column
```



---
## test_series_midx_slice
```python
from test_indexing import test_series_midx_slice
```



---
## test_getitem_midx_slice
```python
from test_indexing import test_getitem_midx_slice
```



---
## test_series_midx_tuples_slice
```python
from test_indexing import test_series_midx_tuples_slice
```



---
## test_midx_read_only_bool_indexer
```python
from test_indexing import test_midx_read_only_bool_indexer
```



---
## test_loc_enlarging_with_dataframe
```python
from test_indexing import test_loc_enlarging_with_dataframe
```



---
## mklbl
```python
from test_indexing import mklbl
```



---
## make_dataframe
```python
from test_indexing import make_dataframe
```



---
## make_series
```python
from test_indexing import make_series
```



---
## __name__
```python
from test_astype import __name__
```



---
## test_astype_single_dtype
```python
from test_astype import test_astype_single_dtype
```



---
## test_astype_avoids_copy
```python
from test_astype import test_astype_avoids_copy
```



---
## test_astype_different_target_dtype
```python
from test_astype import test_astype_different_target_dtype
```



---
## test_astype_numpy_to_ea
```python
from test_astype import test_astype_numpy_to_ea
```



---
## test_astype_string_and_object
```python
from test_astype import test_astype_string_and_object
```



---
## test_astype_string_and_object_update_original
```python
from test_astype import test_astype_string_and_object_update_original
```



---
## test_astype_string_copy_on_pickle_roundrip
```python
from test_astype import test_astype_string_copy_on_pickle_roundrip
```



---
## test_astype_dict_dtypes
```python
from test_astype import test_astype_dict_dtypes
```



---
## test_astype_different_datetime_resos
```python
from test_astype import test_astype_different_datetime_resos
```



---
## test_astype_different_timezones
```python
from test_astype import test_astype_different_timezones
```



---
## test_astype_different_timezones_different_reso
```python
from test_astype import test_astype_different_timezones_different_reso
```



---
## test_astype_arrow_timestamp
```python
from test_astype import test_astype_arrow_timestamp
```



---
## test_convert_dtypes_infer_objects
```python
from test_astype import test_convert_dtypes_infer_objects
```



---
## test_convert_dtypes
```python
from test_astype import test_convert_dtypes
```



---
## __name__
```python
from test_internals import __name__
```



---
## test_consolidate
```python
from test_internals import test_consolidate
```



---
## test_switch_options
```python
from test_internals import test_switch_options
```



---
## test_iset_splits_blocks_inplace
```python
from test_internals import test_iset_splits_blocks_inplace
```



---
## test_exponential_backoff
```python
from test_internals import test_exponential_backoff
```



---
## test_concat_frames
```python
from test_functions import test_concat_frames
```



---
## test_concat_frames_updating_input
```python
from test_functions import test_concat_frames_updating_input
```



---
## test_concat_series
```python
from test_functions import test_concat_series
```



---
## test_concat_frames_chained
```python
from test_functions import test_concat_frames_chained
```



---
## test_concat_series_chained
```python
from test_functions import test_concat_series_chained
```



---
## test_concat_series_updating_input
```python
from test_functions import test_concat_series_updating_input
```



---
## test_concat_mixed_series_frame
```python
from test_functions import test_concat_mixed_series_frame
```



---
## test_concat_copy_keyword
```python
from test_functions import test_concat_copy_keyword
```



---
## test_merge_on_key
```python
from test_functions import test_merge_on_key
```



---
## test_merge_on_index
```python
from test_functions import test_merge_on_index
```



---
## test_merge_on_key_enlarging_one
```python
from test_functions import test_merge_on_key_enlarging_one
```



---
## test_merge_copy_keyword
```python
from test_functions import test_merge_copy_keyword
```



---
## test_join_on_key
```python
from test_functions import test_join_on_key
```



---
## test_join_multiple_dataframes_on_key
```python
from test_functions import test_join_multiple_dataframes_on_key
```



---
## __name__
```python
from test_replace import __name__
```



---
## test_replace
```python
from test_replace import test_replace
```



---
## test_replace_regex_inplace_refs
```python
from test_replace import test_replace_regex_inplace_refs
```



---
## test_replace_regex_inplace
```python
from test_replace import test_replace_regex_inplace
```



---
## test_replace_regex_inplace_no_op
```python
from test_replace import test_replace_regex_inplace_no_op
```



---
## test_replace_mask_all_false_second_block
```python
from test_replace import test_replace_mask_all_false_second_block
```



---
## test_replace_coerce_single_column
```python
from test_replace import test_replace_coerce_single_column
```



---
## test_replace_to_replace_wrong_dtype
```python
from test_replace import test_replace_to_replace_wrong_dtype
```



---
## test_replace_list_categorical
```python
from test_replace import test_replace_list_categorical
```



---
## test_replace_list_inplace_refs_categorical
```python
from test_replace import test_replace_list_inplace_refs_categorical
```



---
## test_replace_inplace
```python
from test_replace import test_replace_inplace
```



---
## test_replace_inplace_reference
```python
from test_replace import test_replace_inplace_reference
```



---
## test_replace_inplace_reference_no_op
```python
from test_replace import test_replace_inplace_reference_no_op
```



---
## test_replace_categorical_inplace_reference
```python
from test_replace import test_replace_categorical_inplace_reference
```



---
## test_replace_categorical_inplace
```python
from test_replace import test_replace_categorical_inplace
```



---
## test_replace_categorical
```python
from test_replace import test_replace_categorical
```



---
## test_masking_inplace
```python
from test_replace import test_masking_inplace
```



---
## test_replace_empty_list
```python
from test_replace import test_replace_empty_list
```



---
## test_replace_object_list_inplace
```python
from test_replace import test_replace_object_list_inplace
```



---
## test_replace_list_multiple_elements_inplace
```python
from test_replace import test_replace_list_multiple_elements_inplace
```



---
## test_replace_list_none
```python
from test_replace import test_replace_list_none
```



---
## test_replace_list_none_inplace_refs
```python
from test_replace import test_replace_list_none_inplace_refs
```



---
## test_replace_columnwise_no_op_inplace
```python
from test_replace import test_replace_columnwise_no_op_inplace
```



---
## test_replace_columnwise_no_op
```python
from test_replace import test_replace_columnwise_no_op
```



---
## test_replace_chained_assignment
```python
from test_replace import test_replace_chained_assignment
```



---
## test_replace_listlike
```python
from test_replace import test_replace_listlike
```



---
## test_replace_listlike_inplace
```python
from test_replace import test_replace_listlike_inplace
```



---
## __name__
```python
from test_clip import __name__
```



---
## test_clip_inplace_reference
```python
from test_clip import test_clip_inplace_reference
```



---
## test_clip_inplace_reference_no_op
```python
from test_clip import test_clip_inplace_reference_no_op
```



---
## test_clip_inplace
```python
from test_clip import test_clip_inplace
```



---
## test_clip
```python
from test_clip import test_clip
```



---
## test_clip_no_op
```python
from test_clip import test_clip_no_op
```



---
## test_clip_chained_inplace
```python
from test_clip import test_clip_chained_inplace
```



---
## __name__
```python
from test_core_functionalities import __name__
```



---
## test_assigning_to_same_variable_removes_references
```python
from test_core_functionalities import test_assigning_to_same_variable_removes_references
```



---
## test_setitem_dont_track_unnecessary_references
```python
from test_core_functionalities import test_setitem_dont_track_unnecessary_references
```



---
## test_setitem_with_view_copies
```python
from test_core_functionalities import test_setitem_with_view_copies
```



---
## test_setitem_with_view_invalidated_does_not_copy
```python
from test_core_functionalities import test_setitem_with_view_invalidated_does_not_copy
```



---
## test_out_of_scope
```python
from test_core_functionalities import test_out_of_scope
```



---
## test_delete
```python
from test_core_functionalities import test_delete
```



---
## test_delete_reference
```python
from test_core_functionalities import test_delete_reference
```



---
## func
```python
from test_core_functionalities import func
```



---
## test_dtype_to_arrow_c_fmt
```python
from test_utils import test_dtype_to_arrow_c_fmt
```

Test ``dtype_to_arrow_c_fmt`` utility function.

---
## test_dtype_to_arrow_c_fmt_arrowdtype
```python
from test_utils import test_dtype_to_arrow_c_fmt_arrowdtype
```



---
## __name__
```python
from test_spec_conformance import __name__
```

A verbatim copy (vendored) of the spec tests.
Taken from https://github.com/data-apis/dataframe-api

---
## df_from_dict
```python
from test_spec_conformance import df_from_dict
```



---
## test_only_one_dtype
```python
from test_spec_conformance import test_only_one_dtype
```



---
## test_mixed_dtypes
```python
from test_spec_conformance import test_mixed_dtypes
```



---
## test_na_float
```python
from test_spec_conformance import test_na_float
```



---
## test_noncategorical
```python
from test_spec_conformance import test_noncategorical
```



---
## test_categorical
```python
from test_spec_conformance import test_categorical
```



---
## test_dataframe
```python
from test_spec_conformance import test_dataframe
```



---
## test_df_get_chunks
```python
from test_spec_conformance import test_df_get_chunks
```



---
## test_column_get_chunks
```python
from test_spec_conformance import test_column_get_chunks
```



---
## test_get_columns
```python
from test_spec_conformance import test_get_columns
```



---
## test_buffer
```python
from test_spec_conformance import test_buffer
```



---
## maker
```python
from test_spec_conformance import maker
```



---
## __name__
```python
from test_impl import __name__
```



---
## data_categorical
```python
from test_impl import data_categorical
```



---
## string_data
```python
from test_impl import string_data
```



---
## test_categorical_dtype
```python
from test_impl import test_categorical_dtype
```



---
## test_categorical_pyarrow
```python
from test_impl import test_categorical_pyarrow
```



---
## test_empty_categorical_pyarrow
```python
from test_impl import test_empty_categorical_pyarrow
```



---
## test_large_string_pyarrow
```python
from test_impl import test_large_string_pyarrow
```



---
## test_bitmasks_pyarrow
```python
from test_impl import test_bitmasks_pyarrow
```



---
## test_dataframe
```python
from test_impl import test_dataframe
```



---
## test_missing_from_masked
```python
from test_impl import test_missing_from_masked
```



---
## test_mixed_data
```python
from test_impl import test_mixed_data
```



---
## test_mixed_missing
```python
from test_impl import test_mixed_missing
```



---
## test_string
```python
from test_impl import test_string
```



---
## test_nonstring_object
```python
from test_impl import test_nonstring_object
```



---
## test_datetime
```python
from test_impl import test_datetime
```



---
## test_categorical_to_numpy_dlpack
```python
from test_impl import test_categorical_to_numpy_dlpack
```



---
## test_empty_pyarrow
```python
from test_impl import test_empty_pyarrow
```



---
## test_multi_chunk_pyarrow
```python
from test_impl import test_multi_chunk_pyarrow
```



---
## test_multi_chunk_column
```python
from test_impl import test_multi_chunk_column
```



---
## test_timestamp_ns_pyarrow
```python
from test_impl import test_timestamp_ns_pyarrow
```



---
## test_datetimetzdtype
```python
from test_impl import test_datetimetzdtype
```



---
## test_interchange_from_non_pandas_tz_aware
```python
from test_impl import test_interchange_from_non_pandas_tz_aware
```



---
## test_interchange_from_corrected_buffer_dtypes
```python
from test_impl import test_interchange_from_corrected_buffer_dtypes
```



---
## test_empty_string_column
```python
from test_impl import test_empty_string_column
```



---
## test_large_string
```python
from test_impl import test_large_string
```



---
## test_non_str_names
```python
from test_impl import test_non_str_names
```



---
## test_non_str_names_w_duplicates
```python
from test_impl import test_non_str_names_w_duplicates
```



---
## test_pandas_nullable_with_missing_values
```python
from test_impl import test_pandas_nullable_with_missing_values
```



---
## test_pandas_nullable_without_missing_values
```python
from test_impl import test_pandas_nullable_without_missing_values
```



---
## test_string_validity_buffer
```python
from test_impl import test_string_validity_buffer
```



---
## test_string_validity_buffer_no_missing
```python
from test_impl import test_string_validity_buffer_no_missing
```



---
## test_empty_dataframe
```python
from test_impl import test_empty_dataframe
```



---
## __name__
```python
from test_block_internals import __name__
```



---
## TestDataFrameBlockInternals
```python
from test_block_internals import TestDataFrameBlockInternals
```



---
## test_update_inplace_sets_valid_block_values
```python
from test_block_internals import test_update_inplace_sets_valid_block_values
```



---
## test_nonconsolidated_item_cache_take
```python
from test_block_internals import test_nonconsolidated_item_cache_take
```



---
## test_setitem_invalidates_datetime_index_freq
```python
from test_block_internals import test_setitem_invalidates_datetime_index_freq
```



---
## test_cast_internals
```python
from test_block_internals import test_cast_internals
```



---
## test_consolidate
```python
from test_block_internals import test_consolidate
```



---
## test_consolidate_inplace
```python
from test_block_internals import test_consolidate_inplace
```



---
## test_modify_values
```python
from test_block_internals import test_modify_values
```



---
## test_boolean_set_uncons
```python
from test_block_internals import test_boolean_set_uncons
```



---
## test_constructor_with_convert
```python
from test_block_internals import test_constructor_with_convert
```



---
## test_construction_with_mixed
```python
from test_block_internals import test_construction_with_mixed
```



---
## test_construction_with_conversions
```python
from test_block_internals import test_construction_with_conversions
```



---
## test_constructor_compound_dtypes
```python
from test_block_internals import test_constructor_compound_dtypes
```



---
## test_pickle
```python
from test_block_internals import test_pickle
```



---
## test_consolidate_datetime64
```python
from test_block_internals import test_consolidate_datetime64
```



---
## test_is_mixed_type
```python
from test_block_internals import test_is_mixed_type
```



---
## test_stale_cached_series_bug_473
```python
from test_block_internals import test_stale_cached_series_bug_473
```



---
## test_strange_column_corruption_issue
```python
from test_block_internals import test_strange_column_corruption_issue
```



---
## test_constructor_no_pandas_array
```python
from test_block_internals import test_constructor_no_pandas_array
```



---
## test_add_column_with_pandas_array
```python
from test_block_internals import test_add_column_with_pandas_array
```



---
## f
```python
from test_block_internals import f
```



---
## __name__
```python
from test_alter_axes import __name__
```



---
## TestDataFrameAlterAxes
```python
from test_alter_axes import TestDataFrameAlterAxes
```



---
## test_set_axis_setattr_index
```python
from test_alter_axes import test_set_axis_setattr_index
```



---
## test_assign_columns
```python
from test_alter_axes import test_assign_columns
```



---
## TestDataFrameLogicalOperators
```python
from test_logical_ops import TestDataFrameLogicalOperators
```



---
## test_logical_operators_nans
```python
from test_logical_ops import test_logical_operators_nans
```



---
## test_logical_ops_empty_frame
```python
from test_logical_ops import test_logical_ops_empty_frame
```



---
## test_logical_ops_bool_frame
```python
from test_logical_ops import test_logical_ops_bool_frame
```



---
## test_logical_ops_int_frame
```python
from test_logical_ops import test_logical_ops_int_frame
```



---
## test_logical_ops_invalid
```python
from test_logical_ops import test_logical_ops_invalid
```



---
## test_logical_operators
```python
from test_logical_ops import test_logical_operators
```



---
## test_logical_with_nas
```python
from test_logical_ops import test_logical_with_nas
```



---
## test_logical_ops_categorical_columns
```python
from test_logical_ops import test_logical_ops_categorical_columns
```



---
## test_different_dtypes_different_index_raises
```python
from test_logical_ops import test_different_dtypes_different_index_raises
```



---
## _check_bin_op
```python
from test_logical_ops import _check_bin_op
```



---
## _check_unary_op
```python
from test_logical_ops import _check_unary_op
```



---
## datetime_frame
```python
from conftest import datetime_frame
```

Fixture for DataFrame of floats with DatetimeIndex

Columns are ['A', 'B', 'C', 'D']

---
## float_string_frame
```python
from conftest import float_string_frame
```

Fixture for DataFrame of floats and strings with index of unique strings

Columns are ['A', 'B', 'C', 'D', 'foo'].

---
## mixed_float_frame
```python
from conftest import mixed_float_frame
```

Fixture for DataFrame of different float types with index of unique strings

Columns are ['A', 'B', 'C', 'D'].

---
## mixed_int_frame
```python
from conftest import mixed_int_frame
```

Fixture for DataFrame of different int types with index of unique strings

Columns are ['A', 'B', 'C', 'D'].

---
## timezone_frame
```python
from conftest import timezone_frame
```

Fixture for DataFrame of date_range Series with different time zones

Columns are ['A', 'B', 'C']; some entries are missing

           A                         B                         C
0 2013-01-01 2013-01-01 00:00:00-05:00 2013-01-01 00:00:00+01:00
1 2013-01-02                       NaT                       NaT
2 2013-01-03 2013-01-03 00:00:00-05:00 2013-01-03 00:00:00+01:00

---
## make_skipna_wrapper
```python
from test_reductions import make_skipna_wrapper
```

Create a function for calling on an array.

Parameters
----------
alternative : function
    The function to be called on the array with no NaNs.
    Only used when 'skipna_alternative' is None.
skipna_alternative : function
    The function to be called on the original array

Returns
-------
function

---
## assert_stat_op_calc
```python
from test_reductions import assert_stat_op_calc
```

Check that operator opname works as advertised on frame

Parameters
----------
opname : str
    Name of the operator to test on frame
alternative : function
    Function that opname is tested against; i.e. "frame.opname()" should
    equal "alternative(frame)".
frame : DataFrame
    The object that the tests are executed on
has_skipna : bool, default True
    Whether the method "opname" has the kwarg "skip_na"
check_dtype : bool, default True
    Whether the dtypes of the result of "frame.opname()" and
    "alternative(frame)" should be checked.
check_dates : bool, default false
    Whether opname should be tested on a Datetime Series
rtol : float, default 1e-5
    Relative tolerance.
atol : float, default 1e-8
    Absolute tolerance.
skipna_alternative : function, default None
    NaN-safe version of alternative

---
## bool_frame_with_na
```python
from test_reductions import bool_frame_with_na
```

Fixture for DataFrame of booleans with index of unique strings

Columns are ['A', 'B', 'C', 'D']; some entries are missing

---
## float_frame_with_na
```python
from test_reductions import float_frame_with_na
```

Fixture for DataFrame of floats with index of unique strings

Columns are ['A', 'B', 'C', 'D']; some entries are missing

---
## TestDataFrameAnalytics
```python
from test_reductions import TestDataFrameAnalytics
```



---
## TestDataFrameReductions
```python
from test_reductions import TestDataFrameReductions
```



---
## TestNuisanceColumns
```python
from test_reductions import TestNuisanceColumns
```



---
## TestEmptyDataFrameReductions
```python
from test_reductions import TestEmptyDataFrameReductions
```



---
## test_sum_timedelta64_skipna_false
```python
from test_reductions import test_sum_timedelta64_skipna_false
```



---
## test_mixed_frame_with_integer_sum
```python
from test_reductions import test_mixed_frame_with_integer_sum
```



---
## test_minmax_extensionarray
```python
from test_reductions import test_minmax_extensionarray
```



---
## test_frame_mixed_numeric_object_with_timestamp
```python
from test_reductions import test_frame_mixed_numeric_object_with_timestamp
```



---
## test_prod_sum_min_count_mixed_object
```python
from test_reductions import test_prod_sum_min_count_mixed_object
```



---
## test_reduction_axis_none_returns_scalar
```python
from test_reductions import test_reduction_axis_none_returns_scalar
```



---
## test_fails_on_non_numeric
```python
from test_reductions import test_fails_on_non_numeric
```



---
## test_numeric_ea_axis_1
```python
from test_reductions import test_numeric_ea_axis_1
```



---
## test_stat_op_api_float_string_frame
```python
from test_reductions import test_stat_op_api_float_string_frame
```



---
## test_stat_op_api_float_frame
```python
from test_reductions import test_stat_op_api_float_frame
```



---
## test_stat_op_calc
```python
from test_reductions import test_stat_op_calc
```



---
## test_stat_op_calc_skew_kurtosis
```python
from test_reductions import test_stat_op_calc_skew_kurtosis
```



---
## test_median
```python
from test_reductions import test_median
```



---
## test_stat_operators_attempt_obj_array
```python
from test_reductions import test_stat_operators_attempt_obj_array
```



---
## test_mixed_ops
```python
from test_reductions import test_mixed_ops
```



---
## test_reduce_mixed_frame
```python
from test_reductions import test_reduce_mixed_frame
```



---
## test_nunique
```python
from test_reductions import test_nunique
```



---
## test_mean_mixed_datetime_numeric
```python
from test_reductions import test_mean_mixed_datetime_numeric
```



---
## test_mean_includes_datetimes
```python
from test_reductions import test_mean_includes_datetimes
```



---
## test_mean_mixed_string_decimal
```python
from test_reductions import test_mean_mixed_string_decimal
```



---
## test_var_std
```python
from test_reductions import test_var_std
```



---
## test_numeric_only_flag
```python
from test_reductions import test_numeric_only_flag
```



---
## test_sem
```python
from test_reductions import test_sem
```



---
## test_mode_dropna
```python
from test_reductions import test_mode_dropna
```



---
## test_mode_sortwarning
```python
from test_reductions import test_mode_sortwarning
```



---
## test_mode_empty_df
```python
from test_reductions import test_mode_empty_df
```



---
## test_operators_timedelta64
```python
from test_reductions import test_operators_timedelta64
```



---
## test_std_timedelta64_skipna_false
```python
from test_reductions import test_std_timedelta64_skipna_false
```



---
## test_std_datetime64_with_nat
```python
from test_reductions import test_std_datetime64_with_nat
```



---
## test_sum_corner
```python
from test_reductions import test_sum_corner
```



---
## test_axis_1_empty
```python
from test_reductions import test_axis_1_empty
```



---
## test_sum_prod_nanops
```python
from test_reductions import test_sum_prod_nanops
```



---
## test_sum_nanops_timedelta
```python
from test_reductions import test_sum_nanops_timedelta
```



---
## test_sum_nanops_min_count
```python
from test_reductions import test_sum_nanops_min_count
```



---
## test_sum_nanops_dtype_min_count
```python
from test_reductions import test_sum_nanops_dtype_min_count
```



---
## test_prod_nanops_dtype_min_count
```python
from test_reductions import test_prod_nanops_dtype_min_count
```



---
## test_sum_object
```python
from test_reductions import test_sum_object
```



---
## test_sum_bool
```python
from test_reductions import test_sum_bool
```



---
## test_sum_mixed_datetime
```python
from test_reductions import test_sum_mixed_datetime
```



---
## test_mean_corner
```python
from test_reductions import test_mean_corner
```



---
## test_mean_datetimelike
```python
from test_reductions import test_mean_datetimelike
```



---
## test_mean_datetimelike_numeric_only_false
```python
from test_reductions import test_mean_datetimelike_numeric_only_false
```



---
## test_mean_extensionarray_numeric_only_true
```python
from test_reductions import test_mean_extensionarray_numeric_only_true
```



---
## test_stats_mixed_type
```python
from test_reductions import test_stats_mixed_type
```



---
## test_sum_bools
```python
from test_reductions import test_sum_bools
```



---
## test_idxmin
```python
from test_reductions import test_idxmin
```



---
## test_idxmin_empty
```python
from test_reductions import test_idxmin_empty
```



---
## test_idxmin_numeric_only
```python
from test_reductions import test_idxmin_numeric_only
```



---
## test_idxmin_axis_2
```python
from test_reductions import test_idxmin_axis_2
```



---
## test_idxmax
```python
from test_reductions import test_idxmax
```



---
## test_idxmax_empty
```python
from test_reductions import test_idxmax_empty
```



---
## test_idxmax_numeric_only
```python
from test_reductions import test_idxmax_numeric_only
```



---
## test_idxmax_arrow_types
```python
from test_reductions import test_idxmax_arrow_types
```



---
## test_idxmax_axis_2
```python
from test_reductions import test_idxmax_axis_2
```



---
## test_idxmax_mixed_dtype
```python
from test_reductions import test_idxmax_mixed_dtype
```



---
## test_idxmax_idxmin_convert_dtypes
```python
from test_reductions import test_idxmax_idxmin_convert_dtypes
```



---
## test_idxmax_dt64_multicolumn_axis1
```python
from test_reductions import test_idxmax_dt64_multicolumn_axis1
```



---
## test_any_all_mixed_float
```python
from test_reductions import test_any_all_mixed_float
```



---
## test_any_all_bool_with_na
```python
from test_reductions import test_any_all_bool_with_na
```



---
## test_any_all_bool_frame
```python
from test_reductions import test_any_all_bool_frame
```



---
## test_any_all_extra
```python
from test_reductions import test_any_all_extra
```



---
## test_any_all_object_dtype
```python
from test_reductions import test_any_all_object_dtype
```



---
## test_any_datetime
```python
from test_reductions import test_any_datetime
```



---
## test_any_all_bool_only
```python
from test_reductions import test_any_all_bool_only
```



---
## test_any_all_np_func
```python
from test_reductions import test_any_all_np_func
```



---
## test_any_all_object
```python
from test_reductions import test_any_all_object
```



---
## test_any_all_object_bool_only
```python
from test_reductions import test_any_all_object_bool_only
```



---
## test_series_broadcasting
```python
from test_reductions import test_series_broadcasting
```



---
## test_min_max_dt64_with_NaT
```python
from test_reductions import test_min_max_dt64_with_NaT
```



---
## test_min_max_dt64_with_NaT_skipna_false
```python
from test_reductions import test_min_max_dt64_with_NaT_skipna_false
```



---
## test_min_max_dt64_api_consistency_with_NaT
```python
from test_reductions import test_min_max_dt64_api_consistency_with_NaT
```



---
## test_min_max_dt64_api_consistency_empty_df
```python
from test_reductions import test_min_max_dt64_api_consistency_empty_df
```



---
## test_preserve_timezone
```python
from test_reductions import test_preserve_timezone
```



---
## test_minmax_tzaware_skipna_axis_1
```python
from test_reductions import test_minmax_tzaware_skipna_axis_1
```



---
## test_frame_any_with_timedelta
```python
from test_reductions import test_frame_any_with_timedelta
```



---
## test_reductions_skipna_none_raises
```python
from test_reductions import test_reductions_skipna_none_raises
```



---
## test_reduction_timestamp_smallest_unit
```python
from test_reductions import test_reduction_timestamp_smallest_unit
```



---
## test_reduction_timedelta_smallest_unit
```python
from test_reductions import test_reduction_timedelta_smallest_unit
```



---
## test_any_all_categorical_dtype_nuisance_column
```python
from test_reductions import test_any_all_categorical_dtype_nuisance_column
```



---
## test_median_categorical_dtype_nuisance_column
```python
from test_reductions import test_median_categorical_dtype_nuisance_column
```



---
## test_min_max_categorical_dtype_non_ordered_nuisance_column
```python
from test_reductions import test_min_max_categorical_dtype_non_ordered_nuisance_column
```



---
## test_df_empty_min_count_0
```python
from test_reductions import test_df_empty_min_count_0
```



---
## test_df_empty_min_count_1
```python
from test_reductions import test_df_empty_min_count_1
```



---
## test_df_empty_nullable_min_count_0
```python
from test_reductions import test_df_empty_nullable_min_count_0
```



---
## test_df_empty_nullable_min_count_1
```python
from test_reductions import test_df_empty_nullable_min_count_1
```



---
## skipna_wrapper
```python
from test_reductions import skipna_wrapper
```



---
## wrapper
```python
from test_reductions import wrapper
```



---
## count
```python
from test_reductions import count
```



---
## nunique
```python
from test_reductions import nunique
```



---
## var
```python
from test_reductions import var
```



---
## std
```python
from test_reductions import std
```



---
## sem
```python
from test_reductions import sem
```



---
## skewness
```python
from test_reductions import skewness
```



---
## kurt
```python
from test_reductions import kurt
```



---
## TestDataFrameConstructors
```python
from test_constructors import TestDataFrameConstructors
```



---
## TestDataFrameConstructorIndexInference
```python
from test_constructors import TestDataFrameConstructorIndexInference
```



---
## TestDataFrameConstructorWithDtypeCoercion
```python
from test_constructors import TestDataFrameConstructorWithDtypeCoercion
```



---
## TestDataFrameConstructorWithDatetimeTZ
```python
from test_constructors import TestDataFrameConstructorWithDatetimeTZ
```



---
## get1
```python
from test_constructors import get1
```



---
## TestFromScalar
```python
from test_constructors import TestFromScalar
```



---
## TestAllowNonNano
```python
from test_constructors import TestAllowNonNano
```



---
## test_constructor_from_ndarray_with_str_dtype
```python
from test_constructors import test_constructor_from_ndarray_with_str_dtype
```



---
## test_constructor_from_2d_datetimearray
```python
from test_constructors import test_constructor_from_2d_datetimearray
```



---
## test_constructor_dict_with_tzaware_scalar
```python
from test_constructors import test_constructor_dict_with_tzaware_scalar
```



---
## test_construct_ndarray_with_nas_and_int_dtype
```python
from test_constructors import test_construct_ndarray_with_nas_and_int_dtype
```



---
## test_construct_from_list_of_datetimes
```python
from test_constructors import test_construct_from_list_of_datetimes
```



---
## test_constructor_from_tzaware_datetimeindex
```python
from test_constructors import test_constructor_from_tzaware_datetimeindex
```



---
## test_columns_with_leading_underscore_work_with_to_dict
```python
from test_constructors import test_columns_with_leading_underscore_work_with_to_dict
```



---
## test_columns_with_leading_number_and_underscore_work_with_to_dict
```python
from test_constructors import test_columns_with_leading_number_and_underscore_work_with_to_dict
```



---
## test_array_of_dt64_nat_with_td64dtype_raises
```python
from test_constructors import test_array_of_dt64_nat_with_td64dtype_raises
```



---
## test_datetimelike_values_with_object_dtype
```python
from test_constructors import test_datetimelike_values_with_object_dtype
```



---
## test_series_with_name_not_matching_column
```python
from test_constructors import test_series_with_name_not_matching_column
```



---
## test_empty_constructor_object_index
```python
from test_constructors import test_empty_constructor_object_index
```



---
## test_emptylike_constructor
```python
from test_constructors import test_emptylike_constructor
```



---
## test_constructor_mixed
```python
from test_constructors import test_constructor_mixed
```



---
## test_constructor_cast_failure
```python
from test_constructors import test_constructor_cast_failure
```



---
## test_constructor_dtype_copy
```python
from test_constructors import test_constructor_dtype_copy
```



---
## test_constructor_dtype_nocast_view_dataframe
```python
from test_constructors import test_constructor_dtype_nocast_view_dataframe
```



---
## test_constructor_dtype_nocast_view_2d_array
```python
from test_constructors import test_constructor_dtype_nocast_view_2d_array
```



---
## test_1d_object_array_does_not_copy
```python
from test_constructors import test_1d_object_array_does_not_copy
```



---
## test_2d_object_array_does_not_copy
```python
from test_constructors import test_2d_object_array_does_not_copy
```



---
## test_constructor_dtype_list_data
```python
from test_constructors import test_constructor_dtype_list_data
```



---
## test_constructor_list_of_2d_raises
```python
from test_constructors import test_constructor_list_of_2d_raises
```



---
## test_constructor_mixed_dtypes
```python
from test_constructors import test_constructor_mixed_dtypes
```



---
## test_constructor_complex_dtypes
```python
from test_constructors import test_constructor_complex_dtypes
```



---
## test_constructor_rec
```python
from test_constructors import test_constructor_rec
```



---
## test_constructor_bool
```python
from test_constructors import test_constructor_bool
```



---
## test_constructor_overflow_int64
```python
from test_constructors import test_constructor_overflow_int64
```



---
## test_constructor_int_overflow
```python
from test_constructors import test_constructor_int_overflow
```



---
## test_constructor_dict_length1
```python
from test_constructors import test_constructor_dict_length1
```



---
## test_constructor_dict_with_index
```python
from test_constructors import test_constructor_dict_with_index
```



---
## test_constructor_dict_with_index_and_columns
```python
from test_constructors import test_constructor_dict_with_index_and_columns
```



---
## test_constructor_dict_of_empty_lists
```python
from test_constructors import test_constructor_dict_of_empty_lists
```



---
## test_constructor_dict_with_none
```python
from test_constructors import test_constructor_dict_with_none
```



---
## test_constructor_dict_errors
```python
from test_constructors import test_constructor_dict_errors
```



---
## test_constructor_invalid_items_unused
```python
from test_constructors import test_constructor_invalid_items_unused
```



---
## test_constructor_dict_nan_tuple_key
```python
from test_constructors import test_constructor_dict_nan_tuple_key
```



---
## test_constructor_dict_order_insertion
```python
from test_constructors import test_constructor_dict_order_insertion
```



---
## test_constructor_dict_nan_key_and_columns
```python
from test_constructors import test_constructor_dict_nan_key_and_columns
```



---
## test_constructor_multi_index
```python
from test_constructors import test_constructor_multi_index
```



---
## test_constructor_2d_index
```python
from test_constructors import test_constructor_2d_index
```



---
## test_constructor_error_msgs
```python
from test_constructors import test_constructor_error_msgs
```



---
## test_constructor_defaultdict
```python
from test_constructors import test_constructor_defaultdict
```



---
## test_constructor_dict_block
```python
from test_constructors import test_constructor_dict_block
```



---
## test_constructor_dict_cast
```python
from test_constructors import test_constructor_dict_cast
```



---
## test_constructor_dict_cast2
```python
from test_constructors import test_constructor_dict_cast2
```



---
## test_constructor_dict_dont_upcast
```python
from test_constructors import test_constructor_dict_dont_upcast
```



---
## test_constructor_dict_dont_upcast2
```python
from test_constructors import test_constructor_dict_dont_upcast2
```



---
## test_constructor_dict_of_ranges
```python
from test_constructors import test_constructor_dict_of_ranges
```



---
## test_constructor_dict_of_iterators
```python
from test_constructors import test_constructor_dict_of_iterators
```



---
## test_constructor_dict_of_generators
```python
from test_constructors import test_constructor_dict_of_generators
```



---
## test_constructor_dict_timedelta64_index
```python
from test_constructors import test_constructor_dict_timedelta64_index
```



---
## test_constructor_period_dict
```python
from test_constructors import test_constructor_period_dict
```



---
## test_constructor_dict_extension_scalar
```python
from test_constructors import test_constructor_dict_extension_scalar
```



---
## test_constructor_extension_scalar_data
```python
from test_constructors import test_constructor_extension_scalar_data
```



---
## test_nested_dict_frame_constructor
```python
from test_constructors import test_nested_dict_frame_constructor
```



---
## _check_basic_constructor
```python
from test_constructors import _check_basic_constructor
```



---
## test_constructor_ndarray
```python
from test_constructors import test_constructor_ndarray
```



---
## test_constructor_maskedarray_nonfloat
```python
from test_constructors import test_constructor_maskedarray_nonfloat
```



---
## test_constructor_maskedrecarray_dtype
```python
from test_constructors import test_constructor_maskedrecarray_dtype
```



---
## test_constructor_corner_shape
```python
from test_constructors import test_constructor_corner_shape
```



---
## test_constructor_dtype
```python
from test_constructors import test_constructor_dtype
```



---
## test_constructor_dtype_nullable_extension_arrays
```python
from test_constructors import test_constructor_dtype_nullable_extension_arrays
```



---
## test_constructor_scalar_inference
```python
from test_constructors import test_constructor_scalar_inference
```



---
## test_constructor_arrays_and_scalars
```python
from test_constructors import test_constructor_arrays_and_scalars
```



---
## test_constructor_DataFrame
```python
from test_constructors import test_constructor_DataFrame
```



---
## test_constructor_empty_dataframe
```python
from test_constructors import test_constructor_empty_dataframe
```



---
## test_constructor_more
```python
from test_constructors import test_constructor_more
```



---
## test_constructor_empty_list
```python
from test_constructors import test_constructor_empty_list
```



---
## test_constructor_list_of_lists
```python
from test_constructors import test_constructor_list_of_lists
```



---
## test_nested_pandasarray_matches_nested_ndarray
```python
from test_constructors import test_nested_pandasarray_matches_nested_ndarray
```



---
## test_constructor_list_like_data_nested_list_column
```python
from test_constructors import test_constructor_list_like_data_nested_list_column
```



---
## test_constructor_wrong_length_nested_list_column
```python
from test_constructors import test_constructor_wrong_length_nested_list_column
```



---
## test_constructor_unequal_length_nested_list_column
```python
from test_constructors import test_constructor_unequal_length_nested_list_column
```



---
## test_constructor_one_element_data_list
```python
from test_constructors import test_constructor_one_element_data_list
```



---
## test_constructor_sequence_like
```python
from test_constructors import test_constructor_sequence_like
```



---
## test_constructor_stdlib_array
```python
from test_constructors import test_constructor_stdlib_array
```



---
## test_constructor_range
```python
from test_constructors import test_constructor_range
```



---
## test_constructor_list_of_ranges
```python
from test_constructors import test_constructor_list_of_ranges
```



---
## test_constructor_iterator
```python
from test_constructors import test_constructor_iterator
```



---
## test_constructor_list_of_iterators
```python
from test_constructors import test_constructor_list_of_iterators
```



---
## test_constructor_list_of_dicts
```python
from test_constructors import test_constructor_list_of_dicts
```



---
## test_constructor_ordered_dict_nested_preserve_order
```python
from test_constructors import test_constructor_ordered_dict_nested_preserve_order
```



---
## test_constructor_ordered_dict_preserve_order
```python
from test_constructors import test_constructor_ordered_dict_preserve_order
```



---
## test_constructor_ordered_dict_conflicting_orders
```python
from test_constructors import test_constructor_ordered_dict_conflicting_orders
```



---
## test_constructor_list_of_series_aligned_index
```python
from test_constructors import test_constructor_list_of_series_aligned_index
```



---
## test_constructor_list_of_derived_dicts
```python
from test_constructors import test_constructor_list_of_derived_dicts
```



---
## test_constructor_ragged
```python
from test_constructors import test_constructor_ragged
```



---
## test_constructor_scalar
```python
from test_constructors import test_constructor_scalar
```



---
## test_constructor_Series_copy_bug
```python
from test_constructors import test_constructor_Series_copy_bug
```



---
## test_constructor_mixed_dict_and_Series
```python
from test_constructors import test_constructor_mixed_dict_and_Series
```



---
## test_constructor_mixed_type_rows
```python
from test_constructors import test_constructor_mixed_type_rows
```



---
## test_constructor_tuple
```python
from test_constructors import test_constructor_tuple
```



---
## test_constructor_list_of_namedtuples
```python
from test_constructors import test_constructor_list_of_namedtuples
```



---
## test_constructor_list_of_dataclasses
```python
from test_constructors import test_constructor_list_of_dataclasses
```



---
## test_constructor_list_of_dataclasses_with_varying_types
```python
from test_constructors import test_constructor_list_of_dataclasses_with_varying_types
```



---
## test_constructor_list_of_dataclasses_error_thrown
```python
from test_constructors import test_constructor_list_of_dataclasses_error_thrown
```



---
## test_constructor_list_of_dict_order
```python
from test_constructors import test_constructor_list_of_dict_order
```



---
## test_constructor_Series_named
```python
from test_constructors import test_constructor_Series_named
```



---
## test_constructor_Series_named_and_columns
```python
from test_constructors import test_constructor_Series_named_and_columns
```



---
## test_constructor_Series_differently_indexed
```python
from test_constructors import test_constructor_Series_differently_indexed
```



---
## test_constructor_index_names
```python
from test_constructors import test_constructor_index_names
```



---
## test_constructor_manager_resize
```python
from test_constructors import test_constructor_manager_resize
```



---
## test_constructor_mix_series_nonseries
```python
from test_constructors import test_constructor_mix_series_nonseries
```



---
## test_constructor_miscast_na_int_dtype
```python
from test_constructors import test_constructor_miscast_na_int_dtype
```



---
## test_constructor_column_duplicates
```python
from test_constructors import test_constructor_column_duplicates
```



---
## test_constructor_empty_with_string_dtype
```python
from test_constructors import test_constructor_empty_with_string_dtype
```



---
## test_constructor_empty_with_string_extension
```python
from test_constructors import test_constructor_empty_with_string_extension
```



---
## test_constructor_single_value
```python
from test_constructors import test_constructor_single_value
```



---
## test_constructor_with_datetimes
```python
from test_constructors import test_constructor_with_datetimes
```



---
## test_constructor_with_datetimes1
```python
from test_constructors import test_constructor_with_datetimes1
```



---
## test_constructor_with_datetimes2
```python
from test_constructors import test_constructor_with_datetimes2
```



---
## test_constructor_with_datetimes3
```python
from test_constructors import test_constructor_with_datetimes3
```



---
## test_constructor_with_datetimes4
```python
from test_constructors import test_constructor_with_datetimes4
```



---
## test_constructor_with_datetimes5
```python
from test_constructors import test_constructor_with_datetimes5
```



---
## test_constructor_with_datetimes6
```python
from test_constructors import test_constructor_with_datetimes6
```



---
## test_constructor_datetimes_non_ns
```python
from test_constructors import test_constructor_datetimes_non_ns
```



---
## test_constructor_timedelta_non_ns
```python
from test_constructors import test_constructor_timedelta_non_ns
```



---
## test_constructor_for_list_with_dtypes
```python
from test_constructors import test_constructor_for_list_with_dtypes
```



---
## test_constructor_frame_copy
```python
from test_constructors import test_constructor_frame_copy
```



---
## test_constructor_frame_shallow_copy
```python
from test_constructors import test_constructor_frame_shallow_copy
```



---
## test_constructor_ndarray_copy
```python
from test_constructors import test_constructor_ndarray_copy
```



---
## test_constructor_series_copy
```python
from test_constructors import test_constructor_series_copy
```



---
## test_constructor_with_nas
```python
from test_constructors import test_constructor_with_nas
```



---
## test_constructor_lists_to_object_dtype
```python
from test_constructors import test_constructor_lists_to_object_dtype
```



---
## test_constructor_ndarray_categorical_dtype
```python
from test_constructors import test_constructor_ndarray_categorical_dtype
```



---
## test_construct_from_1item_list_of_categorical
```python
from test_constructors import test_construct_from_1item_list_of_categorical
```



---
## test_construct_from_list_of_categoricals
```python
from test_constructors import test_construct_from_list_of_categoricals
```



---
## test_from_nested_listlike_mixed_types
```python
from test_constructors import test_from_nested_listlike_mixed_types
```



---
## test_construct_from_listlikes_mismatched_lengths
```python
from test_constructors import test_construct_from_listlikes_mismatched_lengths
```



---
## test_constructor_categorical_series
```python
from test_constructors import test_constructor_categorical_series
```



---
## test_check_dtype_empty_numeric_column
```python
from test_constructors import test_check_dtype_empty_numeric_column
```



---
## test_check_dtype_empty_string_column
```python
from test_constructors import test_check_dtype_empty_string_column
```



---
## test_to_frame_with_falsey_names
```python
from test_constructors import test_to_frame_with_falsey_names
```



---
## test_frame_from_list_subclass
```python
from test_constructors import test_frame_from_list_subclass
```



---
## test_constructor_with_extension_array
```python
from test_constructors import test_constructor_with_extension_array
```



---
## test_datetime_date_tuple_columns_from_dict
```python
from test_constructors import test_datetime_date_tuple_columns_from_dict
```



---
## test_construct_with_two_categoricalindex_series
```python
from test_constructors import test_construct_with_two_categoricalindex_series
```



---
## test_constructor_series_nonexact_categoricalindex
```python
from test_constructors import test_constructor_series_nonexact_categoricalindex
```



---
## test_from_M8_structured
```python
from test_constructors import test_from_M8_structured
```



---
## test_from_datetime_subclass
```python
from test_constructors import test_from_datetime_subclass
```



---
## test_with_mismatched_index_length_raises
```python
from test_constructors import test_with_mismatched_index_length_raises
```



---
## test_frame_ctor_datetime64_column
```python
from test_constructors import test_frame_ctor_datetime64_column
```



---
## test_dataframe_constructor_infer_multiindex
```python
from test_constructors import test_dataframe_constructor_infer_multiindex
```



---
## test_dict_nocopy
```python
from test_constructors import test_dict_nocopy
```



---
## test_construct_from_dict_ea_series
```python
from test_constructors import test_construct_from_dict_ea_series
```



---
## test_from_series_with_name_with_columns
```python
from test_constructors import test_from_series_with_name_with_columns
```



---
## test_nested_list_columns
```python
from test_constructors import test_nested_list_columns
```



---
## test_from_2d_object_array_of_periods_or_intervals
```python
from test_constructors import test_from_2d_object_array_of_periods_or_intervals
```



---
## test_error_from_2darray
```python
from test_constructors import test_error_from_2darray
```



---
## test_from_dict_with_missing_copy_false
```python
from test_constructors import test_from_dict_with_missing_copy_false
```



---
## test_construction_empty_array_multi_column_raises
```python
from test_constructors import test_construction_empty_array_multi_column_raises
```



---
## test_construct_with_strings_and_none
```python
from test_constructors import test_construct_with_strings_and_none
```



---
## test_frame_string_inference
```python
from test_constructors import test_frame_string_inference
```



---
## test_frame_string_inference_array_string_dtype
```python
from test_constructors import test_frame_string_inference_array_string_dtype
```



---
## test_frame_string_inference_block_dim
```python
from test_constructors import test_frame_string_inference_block_dim
```



---
## test_frame_from_dict_of_series_overlapping_monthly_period_indexes
```python
from test_constructors import test_frame_from_dict_of_series_overlapping_monthly_period_indexes
```



---
## test_frame_from_dict_with_mixed_tzaware_indexes
```python
from test_constructors import test_frame_from_dict_with_mixed_tzaware_indexes
```



---
## test_dict_data_arrow_column_expansion
```python
from test_constructors import test_dict_data_arrow_column_expansion
```



---
## test_floating_values_integer_dtype
```python
from test_constructors import test_floating_values_integer_dtype
```



---
## test_construction_preserves_tzaware_dtypes
```python
from test_constructors import test_construction_preserves_tzaware_dtypes
```



---
## test_from_dict
```python
from test_constructors import test_from_dict
```



---
## test_from_index
```python
from test_constructors import test_from_index
```



---
## test_frame_dict_constructor_datetime64_1680
```python
from test_constructors import test_frame_dict_constructor_datetime64_1680
```



---
## test_frame_datetime64_mixed_index_ctor_1681
```python
from test_constructors import test_frame_datetime64_mixed_index_ctor_1681
```



---
## test_frame_timeseries_column
```python
from test_constructors import test_frame_timeseries_column
```



---
## test_nested_dict_construction
```python
from test_constructors import test_nested_dict_construction
```



---
## test_from_tzaware_object_array
```python
from test_constructors import test_from_tzaware_object_array
```



---
## test_from_tzaware_mixed_object_array
```python
from test_constructors import test_from_tzaware_mixed_object_array
```



---
## test_from_2d_ndarray_with_dtype
```python
from test_constructors import test_from_2d_ndarray_with_dtype
```



---
## test_construction_from_set_raises
```python
from test_constructors import test_construction_from_set_raises
```



---
## test_construction_from_ndarray_datetimelike
```python
from test_constructors import test_construction_from_ndarray_datetimelike
```



---
## test_construction_from_ndarray_with_eadtype_mismatched_columns
```python
from test_constructors import test_construction_from_ndarray_with_eadtype_mismatched_columns
```



---
## test_columns_indexes_raise_on_sets
```python
from test_constructors import test_columns_indexes_raise_on_sets
```



---
## box
```python
from test_constructors import box
```



---
## constructor
```python
from test_constructors import constructor
```



---
## test_from_nat_scalar
```python
from test_constructors import test_from_nat_scalar
```



---
## test_from_timedelta_scalar_preserves_nanos
```python
from test_constructors import test_from_timedelta_scalar_preserves_nanos
```



---
## test_from_timestamp_scalar_preserves_nanos
```python
from test_constructors import test_from_timestamp_scalar_preserves_nanos
```



---
## test_from_timedelta64_scalar_object
```python
from test_constructors import test_from_timedelta64_scalar_object
```



---
## test_from_scalar_datetimelike_mismatched
```python
from test_constructors import test_from_scalar_datetimelike_mismatched
```



---
## test_from_out_of_bounds_ns_datetime
```python
from test_constructors import test_from_out_of_bounds_ns_datetime
```



---
## test_out_of_s_bounds_datetime64
```python
from test_constructors import test_out_of_s_bounds_datetime64
```



---
## test_from_out_of_bounds_ns_timedelta
```python
from test_constructors import test_from_out_of_bounds_ns_timedelta
```



---
## test_out_of_s_bounds_timedelta64
```python
from test_constructors import test_out_of_s_bounds_timedelta64
```



---
## test_tzaware_data_tznaive_dtype
```python
from test_constructors import test_tzaware_data_tznaive_dtype
```



---
## as_td
```python
from test_constructors import as_td
```



---
## arr
```python
from test_constructors import arr
```



---
## test_index_allow_non_nano
```python
from test_constructors import test_index_allow_non_nano
```



---
## test_dti_tdi_allow_non_nano
```python
from test_constructors import test_dti_tdi_allow_non_nano
```



---
## test_series_allow_non_nano
```python
from test_constructors import test_series_allow_non_nano
```



---
## test_frame_allow_non_nano
```python
from test_constructors import test_frame_allow_non_nano
```



---
## test_frame_from_dict_allow_non_nano
```python
from test_constructors import test_frame_from_dict_allow_non_nano
```



---
## empty_gen
```python
from test_constructors import empty_gen
```



---
## DummyContainer
```python
from test_constructors import DummyContainer
```



---
## CustomDict
```python
from test_constructors import CustomDict
```



---
## List
```python
from test_constructors import List
```



---
## DatetimeSubclass
```python
from test_constructors import DatetimeSubclass
```



---
## get_base
```python
from test_constructors import get_base
```



---
## check_views
```python
from test_constructors import check_views
```



---
## __init__
```python
from test_constructors import __init__
```



---
## __getitem__
```python
from test_constructors import __getitem__
```



---
## __len__
```python
from test_constructors import __len__
```



---
## __name__
```python
from test_query_eval import __name__
```



---
## parser
```python
from test_query_eval import parser
```



---
## engine
```python
from test_query_eval import engine
```



---
## skip_if_no_pandas_parser
```python
from test_query_eval import skip_if_no_pandas_parser
```



---
## TestCompat
```python
from test_query_eval import TestCompat
```



---
## TestDataFrameEval
```python
from test_query_eval import TestDataFrameEval
```



---
## TestDataFrameQueryWithMultiIndex
```python
from test_query_eval import TestDataFrameQueryWithMultiIndex
```



---
## TestDataFrameQueryNumExprPandas
```python
from test_query_eval import TestDataFrameQueryNumExprPandas
```



---
## TestDataFrameQueryNumExprPython
```python
from test_query_eval import TestDataFrameQueryNumExprPython
```



---
## TestDataFrameQueryPythonPandas
```python
from test_query_eval import TestDataFrameQueryPythonPandas
```



---
## TestDataFrameQueryPythonPython
```python
from test_query_eval import TestDataFrameQueryPythonPython
```



---
## TestDataFrameQueryStrings
```python
from test_query_eval import TestDataFrameQueryStrings
```



---
## TestDataFrameEvalWithFrame
```python
from test_query_eval import TestDataFrameEvalWithFrame
```



---
## TestDataFrameQueryBacktickQuoting
```python
from test_query_eval import TestDataFrameQueryBacktickQuoting
```



---
## df
```python
from test_query_eval import df
```

Yields a dataframe with strings that may or may not need escaping
by backticks. The last two columns cannot be escaped by backticks
and should raise a ValueError.

---
## expected1
```python
from test_query_eval import expected1
```



---
## expected2
```python
from test_query_eval import expected2
```



---
## test_query_default
```python
from test_query_eval import test_query_default
```



---
## test_query_None
```python
from test_query_eval import test_query_None
```



---
## test_query_python
```python
from test_query_eval import test_query_python
```



---
## test_query_numexpr
```python
from test_query_eval import test_query_numexpr
```



---
## test_ops
```python
from test_query_eval import test_ops
```



---
## test_dataframe_sub_numexpr_path
```python
from test_query_eval import test_dataframe_sub_numexpr_path
```



---
## test_query_non_str
```python
from test_query_eval import test_query_non_str
```



---
## test_query_empty_string
```python
from test_query_eval import test_query_empty_string
```



---
## test_eval_resolvers_as_list
```python
from test_query_eval import test_eval_resolvers_as_list
```



---
## test_eval_resolvers_combined
```python
from test_query_eval import test_eval_resolvers_combined
```



---
## test_eval_object_dtype_binop
```python
from test_query_eval import test_eval_object_dtype_binop
```



---
## test_query_with_named_multiindex
```python
from test_query_eval import test_query_with_named_multiindex
```



---
## test_query_with_unnamed_multiindex
```python
from test_query_eval import test_query_with_unnamed_multiindex
```



---
## test_query_with_partially_named_multiindex
```python
from test_query_eval import test_query_with_partially_named_multiindex
```



---
## test_query_multiindex_get_index_resolvers
```python
from test_query_eval import test_query_multiindex_get_index_resolvers
```



---
## test_date_query_with_attribute_access
```python
from test_query_eval import test_date_query_with_attribute_access
```



---
## test_date_query_no_attribute_access
```python
from test_query_eval import test_date_query_no_attribute_access
```



---
## test_date_query_with_NaT
```python
from test_query_eval import test_date_query_with_NaT
```



---
## test_date_index_query
```python
from test_query_eval import test_date_index_query
```



---
## test_date_index_query_with_NaT
```python
from test_query_eval import test_date_index_query_with_NaT
```



---
## test_date_index_query_with_NaT_duplicates
```python
from test_query_eval import test_date_index_query_with_NaT_duplicates
```



---
## test_date_query_with_non_date
```python
from test_query_eval import test_date_query_with_non_date
```



---
## test_query_syntax_error
```python
from test_query_eval import test_query_syntax_error
```



---
## test_query_scope
```python
from test_query_eval import test_query_scope
```



---
## test_query_doesnt_pickup_local
```python
from test_query_eval import test_query_doesnt_pickup_local
```



---
## test_query_builtin
```python
from test_query_eval import test_query_builtin
```



---
## test_query
```python
from test_query_eval import test_query
```



---
## test_query_index_with_name
```python
from test_query_eval import test_query_index_with_name
```



---
## test_query_index_without_name
```python
from test_query_eval import test_query_index_without_name
```



---
## test_nested_scope
```python
from test_query_eval import test_nested_scope
```



---
## test_nested_raises_on_local_self_reference
```python
from test_query_eval import test_nested_raises_on_local_self_reference
```



---
## test_local_syntax
```python
from test_query_eval import test_local_syntax
```



---
## test_chained_cmp_and_in
```python
from test_query_eval import test_chained_cmp_and_in
```



---
## test_local_variable_with_in
```python
from test_query_eval import test_local_variable_with_in
```



---
## test_at_inside_string
```python
from test_query_eval import test_at_inside_string
```



---
## test_query_undefined_local
```python
from test_query_eval import test_query_undefined_local
```



---
## test_index_resolvers_come_after_columns_with_the_same_name
```python
from test_query_eval import test_index_resolvers_come_after_columns_with_the_same_name
```



---
## test_inf
```python
from test_query_eval import test_inf
```



---
## test_check_tz_aware_index_query
```python
from test_query_eval import test_check_tz_aware_index_query
```



---
## test_method_calls_in_query
```python
from test_query_eval import test_method_calls_in_query
```



---
## test_query_numexpr_with_min_and_max_columns
```python
from test_query_eval import test_query_numexpr_with_min_and_max_columns
```



---
## test_str_query_method
```python
from test_query_eval import test_str_query_method
```



---
## test_str_list_query_method
```python
from test_query_eval import test_str_list_query_method
```



---
## test_query_with_string_columns
```python
from test_query_eval import test_query_with_string_columns
```



---
## test_object_array_eq_ne
```python
from test_query_eval import test_object_array_eq_ne
```



---
## test_query_with_nested_strings
```python
from test_query_eval import test_query_with_nested_strings
```



---
## test_query_with_nested_special_character
```python
from test_query_eval import test_query_with_nested_special_character
```



---
## test_query_lex_compare_strings
```python
from test_query_eval import test_query_lex_compare_strings
```



---
## test_query_single_element_booleans
```python
from test_query_eval import test_query_single_element_booleans
```



---
## test_query_string_scalar_variable
```python
from test_query_eval import test_query_string_scalar_variable
```



---
## test_query_string_null_elements
```python
from test_query_eval import test_query_string_null_elements
```



---
## frame
```python
from test_query_eval import frame
```



---
## test_simple_expr
```python
from test_query_eval import test_simple_expr
```



---
## test_bool_arith_expr
```python
from test_query_eval import test_bool_arith_expr
```



---
## test_invalid_type_for_operator_raises
```python
from test_query_eval import test_invalid_type_for_operator_raises
```



---
## test_single_backtick_variable_query
```python
from test_query_eval import test_single_backtick_variable_query
```



---
## test_two_backtick_variables_query
```python
from test_query_eval import test_two_backtick_variables_query
```



---
## test_single_backtick_variable_expr
```python
from test_query_eval import test_single_backtick_variable_expr
```



---
## test_two_backtick_variables_expr
```python
from test_query_eval import test_two_backtick_variables_expr
```



---
## test_already_underscore_variable
```python
from test_query_eval import test_already_underscore_variable
```



---
## test_same_name_but_underscores
```python
from test_query_eval import test_same_name_but_underscores
```



---
## test_mixed_underscores_and_spaces
```python
from test_query_eval import test_mixed_underscores_and_spaces
```



---
## test_backtick_quote_name_with_no_spaces
```python
from test_query_eval import test_backtick_quote_name_with_no_spaces
```



---
## test_special_characters
```python
from test_query_eval import test_special_characters
```



---
## test_start_with_digit
```python
from test_query_eval import test_start_with_digit
```



---
## test_keyword
```python
from test_query_eval import test_keyword
```



---
## test_unneeded_quoting
```python
from test_query_eval import test_unneeded_quoting
```



---
## test_parenthesis
```python
from test_query_eval import test_parenthesis
```



---
## test_empty_string
```python
from test_query_eval import test_empty_string
```



---
## test_multiple_spaces
```python
from test_query_eval import test_multiple_spaces
```



---
## test_start_with_spaces
```python
from test_query_eval import test_start_with_spaces
```



---
## test_lots_of_operators_string
```python
from test_query_eval import test_lots_of_operators_string
```



---
## test_missing_attribute
```python
from test_query_eval import test_missing_attribute
```



---
## test_failing_quote
```python
from test_query_eval import test_failing_quote
```



---
## test_failing_character_outside_range
```python
from test_query_eval import test_failing_character_outside_range
```



---
## test_failing_hashtag
```python
from test_query_eval import test_failing_hashtag
```



---
## test_call_non_named_expression
```python
from test_query_eval import test_call_non_named_expression
```

Only attributes and variables ('named functions') can be called.
.__call__() is not an allowed attribute because that would allow
calling anything.
https://github.com/pandas-dev/pandas/pull/32460

---
## test_ea_dtypes
```python
from test_query_eval import test_ea_dtypes
```



---
## test_ea_dtypes_and_scalar
```python
from test_query_eval import test_ea_dtypes_and_scalar
```



---
## test_ea_dtypes_and_scalar_operation
```python
from test_query_eval import test_ea_dtypes_and_scalar_operation
```



---
## test_query_ea_dtypes
```python
from test_query_eval import test_query_ea_dtypes
```



---
## test_query_ea_equality_comparison
```python
from test_query_eval import test_query_ea_equality_comparison
```



---
## test_all_nat_in_object
```python
from test_query_eval import test_all_nat_in_object
```



---
## to_series
```python
from test_query_eval import to_series
```



---
## func
```python
from test_query_eval import func
```



---
## TestDataFrameUnaryOperators
```python
from test_unary import TestDataFrameUnaryOperators
```



---
## test_neg_numeric
```python
from test_unary import test_neg_numeric
```



---
## test_neg_object
```python
from test_unary import test_neg_object
```



---
## test_neg_raises
```python
from test_unary import test_neg_raises
```



---
## test_invert_mixed
```python
from test_unary import test_invert_mixed
```



---
## test_invert_empty_not_input
```python
from test_unary import test_invert_empty_not_input
```



---
## test_pos_numeric
```python
from test_unary import test_pos_numeric
```



---
## test_pos_object
```python
from test_unary import test_pos_object
```



---
## test_pos_object_raises
```python
from test_unary import test_pos_object_raises
```



---
## test_pos_raises
```python
from test_unary import test_pos_raises
```



---
## test_unary_nullable
```python
from test_unary import test_unary_nullable
```



---
## TestDataFrameCumulativeOps
```python
from test_cumulative import TestDataFrameCumulativeOps
```



---
## test_cumulative_ops_smoke
```python
from test_cumulative import test_cumulative_ops_smoke
```



---
## test_cumprod_smoke
```python
from test_cumulative import test_cumprod_smoke
```



---
## test_cumulative_ops_match_series_apply
```python
from test_cumulative import test_cumulative_ops_match_series_apply
```



---
## test_cumsum_preserve_dtypes
```python
from test_cumulative import test_cumsum_preserve_dtypes
```



---
## gpd_style_subclass_df
```python
from test_subclass import gpd_style_subclass_df
```



---
## TestDataFrameSubclassing
```python
from test_subclass import TestDataFrameSubclassing
```



---
## MySubclassWithMetadata
```python
from test_subclass import MySubclassWithMetadata
```



---
## test_constructor_with_metadata
```python
from test_subclass import test_constructor_with_metadata
```



---
## SimpleDataFrameSubClass
```python
from test_subclass import SimpleDataFrameSubClass
```

A subclass of DataFrame that does not define a constructor.

---
## SimpleSeriesSubClass
```python
from test_subclass import SimpleSeriesSubClass
```

A subclass of Series that does not define a constructor.

---
## TestSubclassWithoutConstructor
```python
from test_subclass import TestSubclassWithoutConstructor
```



---
## SubclassedDataFrame
```python
from test_subclass import SubclassedDataFrame
```



---
## test_no_warning_on_mgr
```python
from test_subclass import test_no_warning_on_mgr
```



---
## test_frame_subclassing_and_slicing
```python
from test_subclass import test_frame_subclassing_and_slicing
```



---
## test_dataframe_metadata
```python
from test_subclass import test_dataframe_metadata
```



---
## test_subclass_attr_err_propagation
```python
from test_subclass import test_subclass_attr_err_propagation
```



---
## test_subclass_align
```python
from test_subclass import test_subclass_align
```



---
## test_subclass_align_combinations
```python
from test_subclass import test_subclass_align_combinations
```



---
## test_subclass_iterrows
```python
from test_subclass import test_subclass_iterrows
```



---
## test_subclass_stack
```python
from test_subclass import test_subclass_stack
```



---
## test_subclass_stack_multi
```python
from test_subclass import test_subclass_stack_multi
```



---
## test_subclass_stack_multi_mixed
```python
from test_subclass import test_subclass_stack_multi_mixed
```



---
## test_subclass_unstack_multi
```python
from test_subclass import test_subclass_unstack_multi
```



---
## test_subclass_unstack_multi_mixed
```python
from test_subclass import test_subclass_unstack_multi_mixed
```



---
## test_subclass_pivot
```python
from test_subclass import test_subclass_pivot
```



---
## test_subclassed_melt
```python
from test_subclass import test_subclassed_melt
```



---
## test_subclassed_wide_to_long
```python
from test_subclass import test_subclassed_wide_to_long
```



---
## test_subclassed_apply
```python
from test_subclass import test_subclassed_apply
```



---
## test_subclassed_reductions
```python
from test_subclass import test_subclassed_reductions
```



---
## test_subclassed_count
```python
from test_subclass import test_subclassed_count
```



---
## test_isin
```python
from test_subclass import test_isin
```



---
## test_duplicated
```python
from test_subclass import test_duplicated
```



---
## test_idx
```python
from test_subclass import test_idx
```



---
## test_dot
```python
from test_subclass import test_dot
```



---
## test_memory_usage
```python
from test_subclass import test_memory_usage
```



---
## test_corrwith
```python
from test_subclass import test_corrwith
```



---
## test_idxmin_preserves_subclass
```python
from test_subclass import test_idxmin_preserves_subclass
```



---
## test_idxmax_preserves_subclass
```python
from test_subclass import test_idxmax_preserves_subclass
```



---
## test_convert_dtypes_preserves_subclass
```python
from test_subclass import test_convert_dtypes_preserves_subclass
```



---
## test_astype_preserves_subclass
```python
from test_subclass import test_astype_preserves_subclass
```



---
## test_equals_subclass
```python
from test_subclass import test_equals_subclass
```



---
## test_replace_list_method
```python
from test_subclass import test_replace_list_method
```



---
## __init__
```python
from test_subclass import __init__
```



---
## test_copy_df
```python
from test_subclass import test_copy_df
```



---
## test_copy_series
```python
from test_subclass import test_copy_series
```



---
## test_series_to_frame
```python
from test_subclass import test_series_to_frame
```



---
## test_groupby
```python
from test_subclass import test_groupby
```



---
## CustomSeries
```python
from test_subclass import CustomSeries
```



---
## CustomDataFrame
```python
from test_subclass import CustomDataFrame
```

Subclasses pandas DF, fills DF with simulation results, adds some
custom plotting functions.

---
## A
```python
from test_subclass import A
```



---
## check_row_subclass
```python
from test_subclass import check_row_subclass
```



---
## stretch
```python
from test_subclass import stretch
```



---
## custom_series_function
```python
from test_subclass import custom_series_function
```



---
## custom_frame_function
```python
from test_subclass import custom_frame_function
```



---
## nonexistence
```python
from test_subclass import nonexistence
```



---
## __name__
```python
from test_arrow_interface import __name__
```



---
## test_dataframe_arrow_interface
```python
from test_arrow_interface import test_dataframe_arrow_interface
```



---
## test_dataframe_to_arrow
```python
from test_arrow_interface import test_dataframe_to_arrow
```



---
## _check_mixed_float
```python
from common import _check_mixed_float
```



---
## _check_mixed_int
```python
from common import _check_mixed_int
```



---
## zip_frames
```python
from common import zip_frames
```

take a list of frames, zip them together under the
assumption that these all have the first frames' index/columns.

Returns
-------
new_frame : DataFrame

---
## __name__
```python
from test_repr import __name__
```



---
## TestDataFrameRepr
```python
from test_repr import TestDataFrameRepr
```



---
## test_repr_with_complex_nans
```python
from test_repr import test_repr_with_complex_nans
```



---
## test_repr_should_return_str
```python
from test_repr import test_repr_should_return_str
```



---
## test_repr_bytes_61_lines
```python
from test_repr import test_repr_bytes_61_lines
```



---
## test_repr_unicode_level_names
```python
from test_repr import test_repr_unicode_level_names
```



---
## test_assign_index_sequences
```python
from test_repr import test_assign_index_sequences
```



---
## test_repr_with_mi_nat
```python
from test_repr import test_repr_with_mi_nat
```



---
## test_repr_with_different_nulls
```python
from test_repr import test_repr_with_different_nulls
```



---
## test_repr_with_different_nulls_cols
```python
from test_repr import test_repr_with_different_nulls_cols
```



---
## test_multiindex_na_repr
```python
from test_repr import test_multiindex_na_repr
```



---
## test_repr_name_coincide
```python
from test_repr import test_repr_name_coincide
```



---
## test_repr_to_string
```python
from test_repr import test_repr_to_string
```



---
## test_repr_empty
```python
from test_repr import test_repr_empty
```



---
## test_repr_mixed
```python
from test_repr import test_repr_mixed
```



---
## test_repr_mixed_big
```python
from test_repr import test_repr_mixed_big
```



---
## test_repr
```python
from test_repr import test_repr
```



---
## test_repr_dimensions
```python
from test_repr import test_repr_dimensions
```



---
## test_repr_big
```python
from test_repr import test_repr_big
```



---
## test_repr_unsortable
```python
from test_repr import test_repr_unsortable
```



---
## test_repr_float_frame_options
```python
from test_repr import test_repr_float_frame_options
```



---
## test_repr_unicode
```python
from test_repr import test_repr_unicode
```



---
## test_unicode_string_with_unicode
```python
from test_repr import test_unicode_string_with_unicode
```



---
## test_repr_unicode_columns
```python
from test_repr import test_repr_unicode_columns
```



---
## test_str_to_bytes_raises
```python
from test_repr import test_str_to_bytes_raises
```



---
## test_very_wide_repr
```python
from test_repr import test_very_wide_repr
```



---
## test_repr_column_name_unicode_truncation_bug
```python
from test_repr import test_repr_column_name_unicode_truncation_bug
```



---
## test_latex_repr
```python
from test_repr import test_latex_repr
```



---
## test_repr_with_datetimeindex
```python
from test_repr import test_repr_with_datetimeindex
```



---
## test_repr_with_intervalindex
```python
from test_repr import test_repr_with_intervalindex
```



---
## test_repr_with_categorical_index
```python
from test_repr import test_repr_with_categorical_index
```



---
## test_repr_categorical_dates_periods
```python
from test_repr import test_repr_categorical_dates_periods
```



---
## test_repr_np_nat_with_object
```python
from test_repr import test_repr_np_nat_with_object
```



---
## test_frame_datetime64_pre1900_repr
```python
from test_repr import test_frame_datetime64_pre1900_repr
```



---
## test_frame_to_string_with_periodindex
```python
from test_repr import test_frame_to_string_with_periodindex
```



---
## test_to_string_ea_na_in_multiindex
```python
from test_repr import test_to_string_ea_na_in_multiindex
```



---
## test_datetime64tz_slice_non_truncate
```python
from test_repr import test_datetime64tz_slice_non_truncate
```



---
## test_to_records_no_typeerror_in_repr
```python
from test_repr import test_to_records_no_typeerror_in_repr
```



---
## test_to_records_with_na_record_value
```python
from test_repr import test_to_records_with_na_record_value
```



---
## test_to_records_with_na_record
```python
from test_repr import test_to_records_with_na_record
```



---
## test_to_records_with_inf_as_na_record
```python
from test_repr import test_to_records_with_inf_as_na_record
```



---
## test_to_records_with_inf_record
```python
from test_repr import test_to_records_with_inf_record
```



---
## test_masked_ea_with_formatter
```python
from test_repr import test_masked_ea_with_formatter
```



---
## test_repr_ea_columns
```python
from test_repr import test_repr_ea_columns
```



---
## test_iteritems
```python
from test_iteration import test_iteritems
```



---
## test_items
```python
from test_iteration import test_items
```



---
## test_items_names
```python
from test_iteration import test_items_names
```



---
## test_iter
```python
from test_iteration import test_iter
```



---
## test_iterrows
```python
from test_iteration import test_iterrows
```



---
## test_iterrows_iso8601
```python
from test_iteration import test_iterrows_iso8601
```



---
## test_iterrows_corner
```python
from test_iteration import test_iterrows_corner
```



---
## test_itertuples
```python
from test_iteration import test_itertuples
```



---
## test_itertuples_index_false
```python
from test_iteration import test_itertuples_index_false
```



---
## test_itertuples_duplicate_cols
```python
from test_iteration import test_itertuples_duplicate_cols
```



---
## test_itertuples_tuple_name
```python
from test_iteration import test_itertuples_tuple_name
```



---
## test_itertuples_disallowed_col_labels
```python
from test_iteration import test_itertuples_disallowed_col_labels
```



---
## test_itertuples_py2_3_field_limit_namedtuple
```python
from test_iteration import test_itertuples_py2_3_field_limit_namedtuple
```



---
## test_sequence_like_with_categorical
```python
from test_iteration import test_sequence_like_with_categorical
```



---
## test_unary_unary
```python
from test_ufunc import test_unary_unary
```



---
## test_unary_binary
```python
from test_ufunc import test_unary_binary
```



---
## test_binary_input_dispatch_binop
```python
from test_ufunc import test_binary_input_dispatch_binop
```



---
## test_ufunc_passes_args
```python
from test_ufunc import test_ufunc_passes_args
```



---
## test_binary_input_aligns_columns
```python
from test_ufunc import test_binary_input_aligns_columns
```



---
## test_binary_input_aligns_index
```python
from test_ufunc import test_binary_input_aligns_index
```



---
## test_binary_frame_series_raises
```python
from test_ufunc import test_binary_frame_series_raises
```



---
## test_unary_accumulate_axis
```python
from test_ufunc import test_unary_accumulate_axis
```



---
## test_frame_outer_disallowed
```python
from test_ufunc import test_frame_outer_disallowed
```



---
## test_alignment_deprecation_enforced
```python
from test_ufunc import test_alignment_deprecation_enforced
```



---
## test_alignment_deprecation_many_inputs_enforced
```python
from test_ufunc import test_alignment_deprecation_many_inputs_enforced
```



---
## my_ufunc
```python
from test_ufunc import my_ufunc
```



---
## __name__
```python
from test_nonunique_indexes import __name__
```



---
## TestDataFrameNonuniqueIndexes
```python
from test_nonunique_indexes import TestDataFrameNonuniqueIndexes
```



---
## test_setattr_columns_vs_construct_with_columns
```python
from test_nonunique_indexes import test_setattr_columns_vs_construct_with_columns
```



---
## test_setattr_columns_vs_construct_with_columns_datetimeindx
```python
from test_nonunique_indexes import test_setattr_columns_vs_construct_with_columns_datetimeindx
```



---
## test_insert_with_duplicate_columns
```python
from test_nonunique_indexes import test_insert_with_duplicate_columns
```



---
## test_dup_across_dtypes
```python
from test_nonunique_indexes import test_dup_across_dtypes
```



---
## test_column_dups_indexes
```python
from test_nonunique_indexes import test_column_dups_indexes
```



---
## test_changing_dtypes_with_duplicate_columns
```python
from test_nonunique_indexes import test_changing_dtypes_with_duplicate_columns
```



---
## test_dup_columns_comparisons
```python
from test_nonunique_indexes import test_dup_columns_comparisons
```



---
## test_mixed_column_selection
```python
from test_nonunique_indexes import test_mixed_column_selection
```



---
## test_multi_axis_dups
```python
from test_nonunique_indexes import test_multi_axis_dups
```



---
## test_columns_with_dups
```python
from test_nonunique_indexes import test_columns_with_dups
```



---
## test_columns_with_dup_index
```python
from test_nonunique_indexes import test_columns_with_dup_index
```



---
## test_multi_dtype
```python
from test_nonunique_indexes import test_multi_dtype
```



---
## test_multi_dtype2
```python
from test_nonunique_indexes import test_multi_dtype2
```



---
## test_dups_across_blocks
```python
from test_nonunique_indexes import test_dups_across_blocks
```



---
## test_dup_columns_across_dtype
```python
from test_nonunique_indexes import test_dup_columns_across_dtype
```



---
## test_set_value_by_index
```python
from test_nonunique_indexes import test_set_value_by_index
```



---
## dataframe
```python
from test_validate import dataframe
```



---
## TestDataFrameValidate
```python
from test_validate import TestDataFrameValidate
```

Tests for error handling related to data types of method arguments.

---
## __name__
```python
from test_stack_unstack import __name__
```



---
## future_stack
```python
from test_stack_unstack import future_stack
```



---
## TestDataFrameReshape
```python
from test_stack_unstack import TestDataFrameReshape
```



---
## test_unstack_sort_false
```python
from test_stack_unstack import test_unstack_sort_false
```



---
## test_unstack_fill_frame_object
```python
from test_stack_unstack import test_unstack_fill_frame_object
```



---
## test_unstack_timezone_aware_values
```python
from test_stack_unstack import test_unstack_timezone_aware_values
```



---
## test_stack_timezone_aware_values
```python
from test_stack_unstack import test_stack_timezone_aware_values
```



---
## test_stack_empty_frame
```python
from test_stack_unstack import test_stack_empty_frame
```



---
## test_stack_unstack_empty_frame
```python
from test_stack_unstack import test_stack_unstack_empty_frame
```



---
## test_unstack_single_index_series
```python
from test_stack_unstack import test_unstack_single_index_series
```



---
## test_unstacking_multi_index_df
```python
from test_stack_unstack import test_unstacking_multi_index_df
```



---
## test_stack_positional_level_duplicate_column_names
```python
from test_stack_unstack import test_stack_positional_level_duplicate_column_names
```



---
## test_unstack_non_slice_like_blocks
```python
from test_stack_unstack import test_unstack_non_slice_like_blocks
```



---
## test_stack_sort_false
```python
from test_stack_unstack import test_stack_sort_false
```



---
## test_stack_sort_false_multi_level
```python
from test_stack_unstack import test_stack_sort_false_multi_level
```



---
## TestStackUnstackMultiLevel
```python
from test_stack_unstack import TestStackUnstackMultiLevel
```



---
## test_stack_tuple_columns
```python
from test_stack_unstack import test_stack_tuple_columns
```



---
## test_stack_preserves_na
```python
from test_stack_unstack import test_stack_preserves_na
```



---
## test_stack_unstack
```python
from test_stack_unstack import test_stack_unstack
```



---
## test_stack_mixed_level
```python
from test_stack_unstack import test_stack_mixed_level
```



---
## test_unstack_not_consolidated
```python
from test_stack_unstack import test_unstack_not_consolidated
```



---
## test_unstack_fill
```python
from test_stack_unstack import test_unstack_fill
```



---
## test_unstack_fill_frame
```python
from test_stack_unstack import test_unstack_fill_frame
```



---
## test_unstack_fill_frame_datetime
```python
from test_stack_unstack import test_unstack_fill_frame_datetime
```



---
## test_unstack_fill_frame_timedelta
```python
from test_stack_unstack import test_unstack_fill_frame_timedelta
```



---
## test_unstack_fill_frame_period
```python
from test_stack_unstack import test_unstack_fill_frame_period
```



---
## test_unstack_fill_frame_categorical
```python
from test_stack_unstack import test_unstack_fill_frame_categorical
```



---
## test_unstack_tuplename_in_multiindex
```python
from test_stack_unstack import test_unstack_tuplename_in_multiindex
```



---
## test_unstack_mixed_type_name_in_multiindex
```python
from test_stack_unstack import test_unstack_mixed_type_name_in_multiindex
```



---
## test_unstack_preserve_dtypes
```python
from test_stack_unstack import test_unstack_preserve_dtypes
```



---
## test_stack_ints
```python
from test_stack_unstack import test_stack_ints
```



---
## test_stack_mixed_levels
```python
from test_stack_unstack import test_stack_mixed_levels
```



---
## test_stack_int_level_names
```python
from test_stack_unstack import test_stack_int_level_names
```



---
## test_unstack_bool
```python
from test_stack_unstack import test_unstack_bool
```



---
## test_unstack_level_binding
```python
from test_stack_unstack import test_unstack_level_binding
```



---
## test_unstack_to_series
```python
from test_stack_unstack import test_unstack_to_series
```



---
## test_unstack_dtypes
```python
from test_stack_unstack import test_unstack_dtypes
```



---
## test_unstack_dtypes_mixed_date
```python
from test_stack_unstack import test_unstack_dtypes_mixed_date
```



---
## test_unstack_non_unique_index_names
```python
from test_stack_unstack import test_unstack_non_unique_index_names
```



---
## test_unstack_unused_levels
```python
from test_stack_unstack import test_unstack_unused_levels
```



---
## test_unstack_unused_levels_mixed_with_nan
```python
from test_stack_unstack import test_unstack_unused_levels_mixed_with_nan
```



---
## test_unstack_unused_level
```python
from test_stack_unstack import test_unstack_unused_level
```



---
## test_unstack_long_index
```python
from test_stack_unstack import test_unstack_long_index
```



---
## test_unstack_multi_level_cols
```python
from test_stack_unstack import test_unstack_multi_level_cols
```



---
## test_unstack_multi_level_rows_and_cols
```python
from test_stack_unstack import test_unstack_multi_level_rows_and_cols
```



---
## test_unstack_nan_index1
```python
from test_stack_unstack import test_unstack_nan_index1
```



---
## test_unstack_nan_index_repeats
```python
from test_stack_unstack import test_unstack_nan_index_repeats
```



---
## test_unstack_nan_index2
```python
from test_stack_unstack import test_unstack_nan_index2
```



---
## test_unstack_nan_index3
```python
from test_stack_unstack import test_unstack_nan_index3
```



---
## test_unstack_nan_index4
```python
from test_stack_unstack import test_unstack_nan_index4
```



---
## test_unstack_nan_index5
```python
from test_stack_unstack import test_unstack_nan_index5
```



---
## test_stack_datetime_column_multiIndex
```python
from test_stack_unstack import test_stack_datetime_column_multiIndex
```



---
## test_stack_partial_multiIndex
```python
from test_stack_unstack import test_stack_partial_multiIndex
```



---
## test_stack_full_multiIndex
```python
from test_stack_unstack import test_stack_full_multiIndex
```



---
## test_stack_preserve_categorical_dtype
```python
from test_stack_unstack import test_stack_preserve_categorical_dtype
```



---
## test_stack_multi_preserve_categorical_dtype
```python
from test_stack_unstack import test_stack_multi_preserve_categorical_dtype
```



---
## test_stack_preserve_categorical_dtype_values
```python
from test_stack_unstack import test_stack_preserve_categorical_dtype_values
```



---
## test_stack_multi_columns_non_unique_index
```python
from test_stack_unstack import test_stack_multi_columns_non_unique_index
```



---
## test_stack_multi_columns_mixed_extension_types
```python
from test_stack_unstack import test_stack_multi_columns_mixed_extension_types
```



---
## test_unstack_mixed_extension_types
```python
from test_stack_unstack import test_unstack_mixed_extension_types
```



---
## test_unstack_swaplevel_sortlevel
```python
from test_stack_unstack import test_unstack_swaplevel_sortlevel
```



---
## test_unstack
```python
from test_stack_unstack import test_unstack
```



---
## test_unstack_partial
```python
from test_stack_unstack import test_unstack_partial
```



---
## test_unstack_multiple_no_empty_columns
```python
from test_stack_unstack import test_unstack_multiple_no_empty_columns
```



---
## test_stack
```python
from test_stack_unstack import test_stack
```



---
## test_stack_duplicate_index
```python
from test_stack_unstack import test_stack_duplicate_index
```



---
## test_unstack_odd_failure
```python
from test_stack_unstack import test_unstack_odd_failure
```



---
## test_stack_mixed_dtype
```python
from test_stack_unstack import test_stack_mixed_dtype
```



---
## test_unstack_bug
```python
from test_stack_unstack import test_unstack_bug
```



---
## test_stack_unstack_preserve_names
```python
from test_stack_unstack import test_stack_unstack_preserve_names
```



---
## test_stack_unstack_wrong_level_name
```python
from test_stack_unstack import test_stack_unstack_wrong_level_name
```



---
## test_unstack_level_name
```python
from test_stack_unstack import test_unstack_level_name
```



---
## test_stack_level_name
```python
from test_stack_unstack import test_stack_level_name
```



---
## test_stack_unstack_multiple
```python
from test_stack_unstack import test_stack_unstack_multiple
```



---
## test_stack_names_and_numbers
```python
from test_stack_unstack import test_stack_names_and_numbers
```



---
## test_stack_multiple_out_of_bounds
```python
from test_stack_unstack import test_stack_multiple_out_of_bounds
```



---
## test_unstack_period_series
```python
from test_stack_unstack import test_unstack_period_series
```



---
## test_unstack_period_frame
```python
from test_stack_unstack import test_unstack_period_frame
```



---
## test_stack_multiple_bug
```python
from test_stack_unstack import test_stack_multiple_bug
```



---
## test_stack_dropna
```python
from test_stack_unstack import test_stack_dropna
```



---
## test_unstack_multiple_hierarchical
```python
from test_stack_unstack import test_unstack_multiple_hierarchical
```



---
## test_unstack_sparse_keyspace
```python
from test_stack_unstack import test_unstack_sparse_keyspace
```



---
## test_unstack_unobserved_keys
```python
from test_stack_unstack import test_unstack_unobserved_keys
```



---
## test_unstack_number_of_levels_larger_than_int32
```python
from test_stack_unstack import test_unstack_number_of_levels_larger_than_int32
```



---
## test_stack_order_with_unsorted_levels
```python
from test_stack_unstack import test_stack_order_with_unsorted_levels
```



---
## test_stack_order_with_unsorted_levels_multi_row
```python
from test_stack_unstack import test_stack_order_with_unsorted_levels_multi_row
```



---
## test_stack_order_with_unsorted_levels_multi_row_2
```python
from test_stack_unstack import test_stack_order_with_unsorted_levels_multi_row_2
```



---
## test_stack_unstack_unordered_multiindex
```python
from test_stack_unstack import test_stack_unstack_unordered_multiindex
```



---
## test_unstack_preserve_types
```python
from test_stack_unstack import test_unstack_preserve_types
```



---
## test_unstack_group_index_overflow
```python
from test_stack_unstack import test_unstack_group_index_overflow
```



---
## test_unstack_with_missing_int_cast_to_float
```python
from test_stack_unstack import test_unstack_with_missing_int_cast_to_float
```



---
## test_unstack_with_level_has_nan
```python
from test_stack_unstack import test_unstack_with_level_has_nan
```



---
## test_stack_nan_in_multiindex_columns
```python
from test_stack_unstack import test_stack_nan_in_multiindex_columns
```



---
## test_multi_level_stack_categorical
```python
from test_stack_unstack import test_multi_level_stack_categorical
```



---
## test_stack_nan_level
```python
from test_stack_unstack import test_stack_nan_level
```



---
## test_unstack_categorical_columns
```python
from test_stack_unstack import test_unstack_categorical_columns
```



---
## test_stack_unsorted
```python
from test_stack_unstack import test_stack_unsorted
```



---
## test_stack_nullable_dtype
```python
from test_stack_unstack import test_stack_nullable_dtype
```



---
## test_unstack_mixed_level_names
```python
from test_stack_unstack import test_unstack_mixed_level_names
```



---
## unstack_and_compare
```python
from test_stack_unstack import unstack_and_compare
```



---
## cast
```python
from test_stack_unstack import cast
```



---
## MockUnstacker
```python
from test_stack_unstack import MockUnstacker
```



---
## __init__
```python
from test_stack_unstack import __init__
```



---
## TestAsArray
```python
from test_npfuncs import TestAsArray
```



---
## test_asarray_homogeneous
```python
from test_npfuncs import test_asarray_homogeneous
```



---
## test_np_sqrt
```python
from test_npfuncs import test_np_sqrt
```



---
## test_sum_deprecated_axis_behavior
```python
from test_npfuncs import test_sum_deprecated_axis_behavior
```



---
## test_np_ravel
```python
from test_npfuncs import test_np_ravel
```



---
## TestDataFrameMisc
```python
from test_api import TestDataFrameMisc
```



---
## test_getitem_pop_assign_name
```python
from test_api import test_getitem_pop_assign_name
```



---
## test_get_axis
```python
from test_api import test_get_axis
```



---
## test_column_contains_raises
```python
from test_api import test_column_contains_raises
```



---
## test_display_max_dir_items
```python
from test_api import test_display_max_dir_items
```



---
## test_column_name_contains_unicode_surrogate
```python
from test_api import test_column_name_contains_unicode_surrogate
```



---
## test_new_empty_index
```python
from test_api import test_new_empty_index
```



---
## test_get_agg_axis
```python
from test_api import test_get_agg_axis
```



---
## test_empty
```python
from test_api import test_empty
```



---
## test_len
```python
from test_api import test_len
```



---
## test_axis_aliases
```python
from test_api import test_axis_aliases
```



---
## test_series_put_names
```python
from test_api import test_series_put_names
```



---
## test_empty_nonzero
```python
from test_api import test_empty_nonzero
```



---
## test_empty_like
```python
from test_api import test_empty_like
```



---
## test_with_datetimelikes
```python
from test_api import test_with_datetimelikes
```



---
## test_deepcopy
```python
from test_api import test_deepcopy
```



---
## test_inplace_return_self
```python
from test_api import test_inplace_return_self
```



---
## test_tab_complete_warning
```python
from test_api import test_tab_complete_warning
```



---
## test_attrs_deepcopy
```python
from test_api import test_attrs_deepcopy
```



---
## test_set_flags
```python
from test_api import test_set_flags
```



---
## test_constructor_expanddim
```python
from test_api import test_constructor_expanddim
```



---
## _check_f
```python
from test_api import _check_f
```



---
## simple_frame
```python
from test_arithmetic import simple_frame
```

Fixture for simple 3x3 DataFrame

Columns are ['one', 'two', 'three'], index is ['a', 'b', 'c'].

   one  two  three
a  1.0  2.0    3.0
b  4.0  5.0    6.0
c  7.0  8.0    9.0

---
## DummyElement
```python
from test_arithmetic import DummyElement
```



---
## TestFrameComparisons
```python
from test_arithmetic import TestFrameComparisons
```



---
## TestFrameFlexComparisons
```python
from test_arithmetic import TestFrameFlexComparisons
```



---
## TestFrameFlexArithmetic
```python
from test_arithmetic import TestFrameFlexArithmetic
```



---
## TestFrameArithmetic
```python
from test_arithmetic import TestFrameArithmetic
```



---
## test_frame_with_zero_len_series_corner_cases
```python
from test_arithmetic import test_frame_with_zero_len_series_corner_cases
```



---
## test_zero_len_frame_with_series_corner_cases
```python
from test_arithmetic import test_zero_len_frame_with_series_corner_cases
```



---
## test_frame_single_columns_object_sum_axis_1
```python
from test_arithmetic import test_frame_single_columns_object_sum_axis_1
```



---
## TestFrameArithmeticUnsorted
```python
from test_arithmetic import TestFrameArithmeticUnsorted
```



---
## test_pow_with_realignment
```python
from test_arithmetic import test_pow_with_realignment
```



---
## test_dataframe_series_extension_dtypes
```python
from test_arithmetic import test_dataframe_series_extension_dtypes
```



---
## test_dataframe_blockwise_slicelike
```python
from test_arithmetic import test_dataframe_blockwise_slicelike
```



---
## test_dataframe_operation_with_non_numeric_types
```python
from test_arithmetic import test_dataframe_operation_with_non_numeric_types
```



---
## test_arith_reindex_with_duplicates
```python
from test_arithmetic import test_arith_reindex_with_duplicates
```



---
## test_arith_list_of_arraylike_raise
```python
from test_arithmetic import test_arith_list_of_arraylike_raise
```



---
## test_inplace_arithmetic_series_update
```python
from test_arithmetic import test_inplace_arithmetic_series_update
```



---
## test_arithmetic_multiindex_align
```python
from test_arithmetic import test_arithmetic_multiindex_align
```

Regression test for: https://github.com/pandas-dev/pandas/issues/33765

---
## test_bool_frame_mult_float
```python
from test_arithmetic import test_bool_frame_mult_float
```



---
## test_frame_sub_nullable_int
```python
from test_arithmetic import test_frame_sub_nullable_int
```



---
## test_frame_op_subclass_nonclass_constructor
```python
from test_arithmetic import test_frame_op_subclass_nonclass_constructor
```



---
## test_enum_column_equality
```python
from test_arithmetic import test_enum_column_equality
```



---
## test_mixed_col_index_dtype
```python
from test_arithmetic import test_mixed_col_index_dtype
```



---
## __init__
```python
from test_arithmetic import __init__
```



---
## __array__
```python
from test_arithmetic import __array__
```



---
## __str__
```python
from test_arithmetic import __str__
```



---
## __repr__
```python
from test_arithmetic import __repr__
```



---
## astype
```python
from test_arithmetic import astype
```



---
## view
```python
from test_arithmetic import view
```



---
## any
```python
from test_arithmetic import any
```



---
## test_comparison_with_categorical_dtype
```python
from test_arithmetic import test_comparison_with_categorical_dtype
```



---
## test_frame_in_list
```python
from test_arithmetic import test_frame_in_list
```



---
## test_comparison_invalid
```python
from test_arithmetic import test_comparison_invalid
```



---
## test_timestamp_compare
```python
from test_arithmetic import test_timestamp_compare
```



---
## test_mixed_comparison
```python
from test_arithmetic import test_mixed_comparison
```



---
## test_df_boolean_comparison_error
```python
from test_arithmetic import test_df_boolean_comparison_error
```



---
## test_df_float_none_comparison
```python
from test_arithmetic import test_df_float_none_comparison
```



---
## test_df_string_comparison
```python
from test_arithmetic import test_df_string_comparison
```



---
## test_bool_flex_frame
```python
from test_arithmetic import test_bool_flex_frame
```



---
## test_bool_flex_series
```python
from test_arithmetic import test_bool_flex_series
```



---
## test_bool_flex_frame_na
```python
from test_arithmetic import test_bool_flex_frame_na
```



---
## test_bool_flex_frame_complex_dtype
```python
from test_arithmetic import test_bool_flex_frame_complex_dtype
```



---
## test_bool_flex_frame_object_dtype
```python
from test_arithmetic import test_bool_flex_frame_object_dtype
```



---
## test_flex_comparison_nat
```python
from test_arithmetic import test_flex_comparison_nat
```



---
## test_df_flex_cmp_constant_return_types
```python
from test_arithmetic import test_df_flex_cmp_constant_return_types
```



---
## test_df_flex_cmp_constant_return_types_empty
```python
from test_arithmetic import test_df_flex_cmp_constant_return_types_empty
```



---
## test_df_flex_cmp_ea_dtype_with_ndarray_series
```python
from test_arithmetic import test_df_flex_cmp_ea_dtype_with_ndarray_series
```



---
## test_floordiv_axis0
```python
from test_arithmetic import test_floordiv_axis0
```



---
## test_df_add_td64_columnwise
```python
from test_arithmetic import test_df_add_td64_columnwise
```



---
## test_df_add_flex_filled_mixed_dtypes
```python
from test_arithmetic import test_df_add_flex_filled_mixed_dtypes
```



---
## test_arith_flex_frame
```python
from test_arithmetic import test_arith_flex_frame
```



---
## test_arith_flex_frame_mixed
```python
from test_arithmetic import test_arith_flex_frame_mixed
```



---
## test_arith_flex_frame_raise
```python
from test_arithmetic import test_arith_flex_frame_raise
```



---
## test_arith_flex_frame_corner
```python
from test_arithmetic import test_arith_flex_frame_corner
```



---
## test_arith_flex_series_ops
```python
from test_arithmetic import test_arith_flex_series_ops
```



---
## test_arith_flex_series
```python
from test_arithmetic import test_arith_flex_series
```



---
## test_arith_flex_series_broadcasting
```python
from test_arithmetic import test_arith_flex_series_broadcasting
```



---
## test_arith_flex_zero_len_raises
```python
from test_arithmetic import test_arith_flex_zero_len_raises
```



---
## test_sub_alignment_with_duplicate_index
```python
from test_arithmetic import test_sub_alignment_with_duplicate_index
```



---
## test_arithmetic_with_duplicate_columns
```python
from test_arithmetic import test_arithmetic_with_duplicate_columns
```



---
## test_broadcast_multiindex
```python
from test_arithmetic import test_broadcast_multiindex
```



---
## test_frame_multiindex_operations
```python
from test_arithmetic import test_frame_multiindex_operations
```



---
## test_frame_multiindex_operations_series_index_to_frame_index
```python
from test_arithmetic import test_frame_multiindex_operations_series_index_to_frame_index
```



---
## test_frame_multiindex_operations_no_align
```python
from test_arithmetic import test_frame_multiindex_operations_no_align
```



---
## test_frame_multiindex_operations_part_align
```python
from test_arithmetic import test_frame_multiindex_operations_part_align
```



---
## test_td64_op_nat_casting
```python
from test_arithmetic import test_td64_op_nat_casting
```



---
## test_df_add_2d_array_rowlike_broadcasts
```python
from test_arithmetic import test_df_add_2d_array_rowlike_broadcasts
```



---
## test_df_add_2d_array_collike_broadcasts
```python
from test_arithmetic import test_df_add_2d_array_collike_broadcasts
```



---
## test_df_arith_2d_array_rowlike_broadcasts
```python
from test_arithmetic import test_df_arith_2d_array_rowlike_broadcasts
```



---
## test_df_arith_2d_array_collike_broadcasts
```python
from test_arithmetic import test_df_arith_2d_array_collike_broadcasts
```



---
## test_df_bool_mul_int
```python
from test_arithmetic import test_df_bool_mul_int
```



---
## test_arith_mixed
```python
from test_arithmetic import test_arith_mixed
```



---
## test_arith_getitem_commute
```python
from test_arithmetic import test_arith_getitem_commute
```



---
## test_arith_alignment_non_pandas_object
```python
from test_arithmetic import test_arith_alignment_non_pandas_object
```



---
## test_arith_non_pandas_object
```python
from test_arithmetic import test_arith_non_pandas_object
```



---
## test_operations_with_interval_categories_index
```python
from test_arithmetic import test_operations_with_interval_categories_index
```



---
## test_frame_with_frame_reindex
```python
from test_arithmetic import test_frame_with_frame_reindex
```



---
## test_binop_other
```python
from test_arithmetic import test_binop_other
```



---
## test_arithmetic_midx_cols_different_dtypes
```python
from test_arithmetic import test_arithmetic_midx_cols_different_dtypes
```



---
## test_arithmetic_midx_cols_different_dtypes_different_order
```python
from test_arithmetic import test_arithmetic_midx_cols_different_dtypes_different_order
```



---
## test_frame_add_tz_mismatch_converts_to_utc
```python
from test_arithmetic import test_frame_add_tz_mismatch_converts_to_utc
```



---
## test_align_frame
```python
from test_arithmetic import test_align_frame
```



---
## test_operators_none_as_na
```python
from test_arithmetic import test_operators_none_as_na
```



---
## test_logical_typeerror_with_non_valid
```python
from test_arithmetic import test_logical_typeerror_with_non_valid
```



---
## test_binary_ops_align
```python
from test_arithmetic import test_binary_ops_align
```



---
## test_binary_ops_align_series_dataframe
```python
from test_arithmetic import test_binary_ops_align_series_dataframe
```



---
## test_add_with_dti_mismatched_tzs
```python
from test_arithmetic import test_add_with_dti_mismatched_tzs
```



---
## test_combineFrame
```python
from test_arithmetic import test_combineFrame
```



---
## test_combine_series
```python
from test_arithmetic import test_combine_series
```



---
## test_combine_timeseries
```python
from test_arithmetic import test_combine_timeseries
```



---
## test_combineFunc
```python
from test_arithmetic import test_combineFunc
```



---
## test_strings_to_numbers_comparisons_raises
```python
from test_arithmetic import test_strings_to_numbers_comparisons_raises
```



---
## test_comparison_protected_from_errstate
```python
from test_arithmetic import test_comparison_protected_from_errstate
```



---
## test_boolean_comparison
```python
from test_arithmetic import test_boolean_comparison
```



---
## test_inplace_ops_alignment
```python
from test_arithmetic import test_inplace_ops_alignment
```



---
## test_inplace_ops_identity
```python
from test_arithmetic import test_inplace_ops_identity
```



---
## test_inplace_ops_identity2
```python
from test_arithmetic import test_inplace_ops_identity2
```



---
## test_alignment_non_pandas
```python
from test_arithmetic import test_alignment_non_pandas
```



---
## test_alignment_non_pandas_length_mismatch
```python
from test_arithmetic import test_alignment_non_pandas_length_mismatch
```



---
## test_alignment_non_pandas_index_columns
```python
from test_arithmetic import test_alignment_non_pandas_index_columns
```



---
## test_no_warning
```python
from test_arithmetic import test_no_warning
```



---
## test_dunder_methods_binary
```python
from test_arithmetic import test_dunder_methods_binary
```



---
## test_align_int_fill_bug
```python
from test_arithmetic import test_align_int_fill_bug
```



---
## SubclassedSeries
```python
from test_arithmetic import SubclassedSeries
```



---
## SubclassedDataFrame
```python
from test_arithmetic import SubclassedDataFrame
```



---
## f
```python
from test_arithmetic import f
```



---
## _constructor_expanddim
```python
from test_arithmetic import _constructor_expanddim
```



---
## _constructor_sliced
```python
from test_arithmetic import _constructor_sliced
```



---
## __name__
```python
from test_inference import __name__
```



---
## coerce
```python
from test_inference import coerce
```



---
## MockNumpyLikeArray
```python
from test_inference import MockNumpyLikeArray
```

A class which is numpy-like (e.g. Pint's Quantity) but not actually numpy

The key is that it is not actually a numpy array so
``util.is_array(mock_numpy_like_array_instance)`` returns ``False``. Other
important properties are that the class defines a :meth:`__iter__` method
(so that ``isinstance(abc.Iterable)`` returns ``True``) and has a
:meth:`ndim` property, as pandas special-cases 0-dimensional arrays in some
cases.

We expect pandas to behave with respect to such duck arrays exactly as
with real numpy arrays. In particular, a 0-dimensional duck array is *NOT*
a scalar (`is_scalar(np.array(1)) == False`), but it is not list-like either.

---
## maybe_list_like
```python
from test_inference import maybe_list_like
```



---
## test_is_list_like
```python
from test_inference import test_is_list_like
```



---
## test_is_list_like_disallow_sets
```python
from test_inference import test_is_list_like_disallow_sets
```



---
## test_is_list_like_recursion
```python
from test_inference import test_is_list_like_recursion
```



---
## test_is_list_like_iter_is_none
```python
from test_inference import test_is_list_like_iter_is_none
```



---
## test_is_list_like_generic
```python
from test_inference import test_is_list_like_generic
```



---
## test_is_sequence
```python
from test_inference import test_is_sequence
```



---
## test_is_array_like
```python
from test_inference import test_is_array_like
```



---
## test_is_nested_list_like_passes
```python
from test_inference import test_is_nested_list_like_passes
```



---
## test_is_nested_list_like_fails
```python
from test_inference import test_is_nested_list_like_fails
```



---
## test_is_dict_like_passes
```python
from test_inference import test_is_dict_like_passes
```



---
## test_is_dict_like_fails
```python
from test_inference import test_is_dict_like_fails
```



---
## test_is_dict_like_duck_type
```python
from test_inference import test_is_dict_like_duck_type
```



---
## test_is_file_like
```python
from test_inference import test_is_file_like
```



---
## test_is_names_tuple_passes
```python
from test_inference import test_is_names_tuple_passes
```



---
## test_is_names_tuple_fails
```python
from test_inference import test_is_names_tuple_fails
```



---
## test_is_hashable
```python
from test_inference import test_is_hashable
```



---
## test_is_re_passes
```python
from test_inference import test_is_re_passes
```



---
## test_is_re_fails
```python
from test_inference import test_is_re_fails
```



---
## test_is_recompilable_passes
```python
from test_inference import test_is_recompilable_passes
```



---
## test_is_recompilable_fails
```python
from test_inference import test_is_recompilable_fails
```



---
## TestInference
```python
from test_inference import TestInference
```



---
## TestTypeInference
```python
from test_inference import TestTypeInference
```



---
## TestNumberScalar
```python
from test_inference import TestNumberScalar
```



---
## TestIsScalar
```python
from test_inference import TestIsScalar
```



---
## test_datetimeindex_from_empty_datetime64_array
```python
from test_inference import test_datetimeindex_from_empty_datetime64_array
```



---
## test_nan_to_nat_conversions
```python
from test_inference import test_nan_to_nat_conversions
```



---
## test_is_scipy_sparse
```python
from test_inference import test_is_scipy_sparse
```



---
## test_ensure_int32
```python
from test_inference import test_ensure_int32
```



---
## test_find_result_type_uint_int
```python
from test_inference import test_find_result_type_uint_int
```



---
## test_find_result_type_int_int
```python
from test_inference import test_find_result_type_int_int
```



---
## test_find_result_type_floats
```python
from test_inference import test_find_result_type_floats
```



---
## __init__
```python
from test_inference import __init__
```



---
## __iter__
```python
from test_inference import __iter__
```



---
## __len__
```python
from test_inference import __len__
```



---
## __array__
```python
from test_inference import __array__
```



---
## ndim
```python
from test_inference import ndim
```



---
## dtype
```python
from test_inference import dtype
```



---
## size
```python
from test_inference import size
```



---
## shape
```python
from test_inference import shape
```



---
## list_like
```python
from test_inference import list_like
```



---
## NotListLike
```python
from test_inference import NotListLike
```



---
## MyDataFrame
```python
from test_inference import MyDataFrame
```



---
## A
```python
from test_inference import A
```



---
## DtypeList
```python
from test_inference import DtypeList
```



---
## DictLike
```python
from test_inference import DictLike
```



---
## MockFile
```python
from test_inference import MockFile
```



---
## HashableClass
```python
from test_inference import HashableClass
```



---
## UnhashableClass1
```python
from test_inference import UnhashableClass1
```



---
## UnhashableClass2
```python
from test_inference import UnhashableClass2
```



---
## test_infer_dtype_bytes
```python
from test_inference import test_infer_dtype_bytes
```



---
## test_isposinf_scalar
```python
from test_inference import test_isposinf_scalar
```



---
## test_isneginf_scalar
```python
from test_inference import test_isneginf_scalar
```



---
## test_maybe_convert_nullable_boolean
```python
from test_inference import test_maybe_convert_nullable_boolean
```



---
## test_maybe_convert_numeric_infinities
```python
from test_inference import test_maybe_convert_numeric_infinities
```



---
## test_maybe_convert_numeric_infinities_raises
```python
from test_inference import test_maybe_convert_numeric_infinities_raises
```



---
## test_maybe_convert_numeric_post_floatify_nan
```python
from test_inference import test_maybe_convert_numeric_post_floatify_nan
```



---
## test_convert_infs
```python
from test_inference import test_convert_infs
```



---
## test_scientific_no_exponent
```python
from test_inference import test_scientific_no_exponent
```



---
## test_convert_non_hashable
```python
from test_inference import test_convert_non_hashable
```



---
## test_convert_numeric_uint64
```python
from test_inference import test_convert_numeric_uint64
```



---
## test_convert_numeric_uint64_nan
```python
from test_inference import test_convert_numeric_uint64_nan
```



---
## test_convert_numeric_uint64_nan_values
```python
from test_inference import test_convert_numeric_uint64_nan_values
```



---
## test_convert_numeric_int64_uint64
```python
from test_inference import test_convert_numeric_int64_uint64
```



---
## test_convert_numeric_string_uint64
```python
from test_inference import test_convert_numeric_string_uint64
```



---
## test_convert_int_overflow
```python
from test_inference import test_convert_int_overflow
```



---
## test_maybe_convert_objects_nat_inference
```python
from test_inference import test_maybe_convert_objects_nat_inference
```



---
## test_maybe_convert_objects_uint
```python
from test_inference import test_maybe_convert_objects_uint
```



---
## test_maybe_convert_objects_datetime
```python
from test_inference import test_maybe_convert_objects_datetime
```



---
## test_maybe_convert_objects_dtype_if_all_nat
```python
from test_inference import test_maybe_convert_objects_dtype_if_all_nat
```



---
## test_maybe_convert_objects_dtype_if_all_nat_invalid
```python
from test_inference import test_maybe_convert_objects_dtype_if_all_nat_invalid
```



---
## test_maybe_convert_objects_datetime_overflow_safe
```python
from test_inference import test_maybe_convert_objects_datetime_overflow_safe
```



---
## test_maybe_convert_objects_mixed_datetimes
```python
from test_inference import test_maybe_convert_objects_mixed_datetimes
```



---
## test_maybe_convert_objects_timedelta64_nat
```python
from test_inference import test_maybe_convert_objects_timedelta64_nat
```



---
## test_maybe_convert_objects_nullable_integer
```python
from test_inference import test_maybe_convert_objects_nullable_integer
```



---
## test_maybe_convert_objects_nullable_none
```python
from test_inference import test_maybe_convert_objects_nullable_none
```



---
## test_maybe_convert_numeric_nullable_integer
```python
from test_inference import test_maybe_convert_numeric_nullable_integer
```



---
## test_maybe_convert_numeric_floating_array
```python
from test_inference import test_maybe_convert_numeric_floating_array
```



---
## test_maybe_convert_objects_bool_nan
```python
from test_inference import test_maybe_convert_objects_bool_nan
```



---
## test_maybe_convert_objects_nullable_boolean
```python
from test_inference import test_maybe_convert_objects_nullable_boolean
```



---
## test_maybe_convert_objects_nullable_boolean_na
```python
from test_inference import test_maybe_convert_objects_nullable_boolean_na
```



---
## test_maybe_convert_objects_itemsize
```python
from test_inference import test_maybe_convert_objects_itemsize
```



---
## test_mixed_dtypes_remain_object_array
```python
from test_inference import test_mixed_dtypes_remain_object_array
```



---
## test_maybe_convert_objects_ea
```python
from test_inference import test_maybe_convert_objects_ea
```



---
## Dummy
```python
from test_inference import Dummy
```



---
## test_inferred_dtype_fixture
```python
from test_inference import test_inferred_dtype_fixture
```



---
## test_length_zero
```python
from test_inference import test_length_zero
```



---
## test_integers
```python
from test_inference import test_integers
```



---
## test_integer_na
```python
from test_inference import test_integer_na
```



---
## test_infer_dtype_skipna_default
```python
from test_inference import test_infer_dtype_skipna_default
```



---
## test_bools
```python
from test_inference import test_bools
```



---
## test_floats
```python
from test_inference import test_floats
```



---
## test_decimals
```python
from test_inference import test_decimals
```



---
## test_complex
```python
from test_inference import test_complex
```



---
## test_string
```python
from test_inference import test_string
```



---
## test_unicode
```python
from test_inference import test_unicode
```



---
## test_object_empty
```python
from test_inference import test_object_empty
```



---
## test_datetime
```python
from test_inference import test_datetime
```



---
## test_infer_dtype_datetime64
```python
from test_inference import test_infer_dtype_datetime64
```



---
## test_infer_dtype_datetime64_with_na
```python
from test_inference import test_infer_dtype_datetime64_with_na
```



---
## test_infer_datetimelike_dtype_mixed
```python
from test_inference import test_infer_datetimelike_dtype_mixed
```



---
## test_infer_dtype_mixed_integer
```python
from test_inference import test_infer_dtype_mixed_integer
```



---
## test_infer_dtype_datetime
```python
from test_inference import test_infer_dtype_datetime
```



---
## test_infer_dtype_datetime_with_na
```python
from test_inference import test_infer_dtype_datetime_with_na
```



---
## test_infer_dtype_timedelta
```python
from test_inference import test_infer_dtype_timedelta
```



---
## test_infer_dtype_timedelta_with_na
```python
from test_inference import test_infer_dtype_timedelta_with_na
```



---
## test_infer_dtype_period
```python
from test_inference import test_infer_dtype_period
```



---
## test_infer_dtype_period_array
```python
from test_inference import test_infer_dtype_period_array
```



---
## test_infer_dtype_period_mixed
```python
from test_inference import test_infer_dtype_period_mixed
```



---
## test_infer_dtype_period_with_na
```python
from test_inference import test_infer_dtype_period_with_na
```



---
## test_infer_dtype_all_nan_nat_like
```python
from test_inference import test_infer_dtype_all_nan_nat_like
```



---
## test_is_datetimelike_array_all_nan_nat_like
```python
from test_inference import test_is_datetimelike_array_all_nan_nat_like
```



---
## test_other_dtypes_for_array
```python
from test_inference import test_other_dtypes_for_array
```



---
## test_date
```python
from test_inference import test_date
```



---
## test_infer_dtype_date_order_invariant
```python
from test_inference import test_infer_dtype_date_order_invariant
```



---
## test_is_numeric_array
```python
from test_inference import test_is_numeric_array
```



---
## test_is_string_array
```python
from test_inference import test_is_string_array
```



---
## test_to_object_array_tuples
```python
from test_inference import test_to_object_array_tuples
```



---
## test_object
```python
from test_inference import test_object
```



---
## test_to_object_array_width
```python
from test_inference import test_to_object_array_width
```



---
## test_is_period
```python
from test_inference import test_is_period
```



---
## test_is_interval
```python
from test_inference import test_is_interval
```



---
## test_categorical
```python
from test_inference import test_categorical
```



---
## test_interval
```python
from test_inference import test_interval
```



---
## test_interval_mismatched_closed
```python
from test_inference import test_interval_mismatched_closed
```



---
## test_interval_mismatched_subtype
```python
from test_inference import test_interval_mismatched_subtype
```



---
## test_string_dtype
```python
from test_inference import test_string_dtype
```



---
## test_boolean_dtype
```python
from test_inference import test_boolean_dtype
```



---
## test_is_number
```python
from test_inference import test_is_number
```



---
## test_is_bool
```python
from test_inference import test_is_bool
```



---
## test_is_integer
```python
from test_inference import test_is_integer
```



---
## test_is_float
```python
from test_inference import test_is_float
```



---
## test_is_datetime_dtypes
```python
from test_inference import test_is_datetime_dtypes
```



---
## test_is_datetime_dtypes_with_tz
```python
from test_inference import test_is_datetime_dtypes_with_tz
```



---
## test_is_timedelta
```python
from test_inference import test_is_timedelta
```



---
## test_is_scalar_builtin_scalars
```python
from test_inference import test_is_scalar_builtin_scalars
```



---
## test_is_scalar_builtin_nonscalars
```python
from test_inference import test_is_scalar_builtin_nonscalars
```



---
## test_is_scalar_numpy_array_scalars
```python
from test_inference import test_is_scalar_numpy_array_scalars
```



---
## test_is_scalar_numpy_zerodim_arrays
```python
from test_inference import test_is_scalar_numpy_zerodim_arrays
```



---
## test_is_scalar_numpy_arrays
```python
from test_inference import test_is_scalar_numpy_arrays
```



---
## test_is_scalar_pandas_scalars
```python
from test_inference import test_is_scalar_pandas_scalars
```



---
## test_is_scalar_pandas_containers
```python
from test_inference import test_is_scalar_pandas_containers
```



---
## test_is_scalar_number
```python
from test_inference import test_is_scalar_number
```



---
## it_outer
```python
from test_inference import it_outer
```



---
## __getitem__
```python
from test_inference import __getitem__
```



---
## __hash__
```python
from test_inference import __hash__
```



---
## Numeric
```python
from test_inference import Numeric
```



---
## keys
```python
from test_inference import keys
```



---
## __contains__
```python
from test_inference import __contains__
```



---
## __int__
```python
from test_inference import __int__
```



---
## to_ea_dtypes
```python
from test_common import to_ea_dtypes
```

convert list of string dtypes to EA dtype

---
## to_numpy_dtypes
```python
from test_common import to_numpy_dtypes
```

convert list of string dtypes to numpy dtype

---
## TestNumpyEADtype
```python
from test_common import TestNumpyEADtype
```



---
## test_dtype_equal
```python
from test_common import test_dtype_equal
```



---
## test_pyarrow_string_import_error
```python
from test_common import test_pyarrow_string_import_error
```



---
## test_dtype_equal_strict
```python
from test_common import test_dtype_equal_strict
```



---
## get_is_dtype_funcs
```python
from test_common import get_is_dtype_funcs
```

Get all functions in pandas.core.dtypes.common that
begin with 'is_' and end with 'dtype'

---
## test_get_dtype_error_catch
```python
from test_common import test_get_dtype_error_catch
```



---
## test_is_object
```python
from test_common import test_is_object
```



---
## test_is_sparse
```python
from test_common import test_is_sparse
```



---
## test_is_scipy_sparse
```python
from test_common import test_is_scipy_sparse
```



---
## test_is_datetime64_dtype
```python
from test_common import test_is_datetime64_dtype
```



---
## test_is_datetime64tz_dtype
```python
from test_common import test_is_datetime64tz_dtype
```



---
## test_custom_ea_kind_M_not_datetime64tz
```python
from test_common import test_custom_ea_kind_M_not_datetime64tz
```



---
## test_is_timedelta64_dtype
```python
from test_common import test_is_timedelta64_dtype
```



---
## test_is_period_dtype
```python
from test_common import test_is_period_dtype
```



---
## test_is_interval_dtype
```python
from test_common import test_is_interval_dtype
```



---
## test_is_categorical_dtype
```python
from test_common import test_is_categorical_dtype
```



---
## test_is_string_dtype
```python
from test_common import test_is_string_dtype
```



---
## test_is_string_dtype_arraylike_with_object_elements_not_strings
```python
from test_common import test_is_string_dtype_arraylike_with_object_elements_not_strings
```



---
## test_is_string_dtype_nullable
```python
from test_common import test_is_string_dtype_nullable
```



---
## test_is_integer_dtype
```python
from test_common import test_is_integer_dtype
```



---
## test_is_not_integer_dtype
```python
from test_common import test_is_not_integer_dtype
```



---
## test_is_signed_integer_dtype
```python
from test_common import test_is_signed_integer_dtype
```



---
## test_is_not_signed_integer_dtype
```python
from test_common import test_is_not_signed_integer_dtype
```



---
## test_is_unsigned_integer_dtype
```python
from test_common import test_is_unsigned_integer_dtype
```



---
## test_is_not_unsigned_integer_dtype
```python
from test_common import test_is_not_unsigned_integer_dtype
```



---
## test_is_int64_dtype
```python
from test_common import test_is_int64_dtype
```



---
## test_type_comparison_with_numeric_ea_dtype
```python
from test_common import test_type_comparison_with_numeric_ea_dtype
```



---
## test_type_comparison_with_real_numpy_dtype
```python
from test_common import test_type_comparison_with_real_numpy_dtype
```



---
## test_type_comparison_with_signed_int_ea_dtype_and_signed_int_numpy_dtype
```python
from test_common import test_type_comparison_with_signed_int_ea_dtype_and_signed_int_numpy_dtype
```



---
## test_is_not_int64_dtype
```python
from test_common import test_is_not_int64_dtype
```



---
## test_is_datetime64_any_dtype
```python
from test_common import test_is_datetime64_any_dtype
```



---
## test_is_datetime64_ns_dtype
```python
from test_common import test_is_datetime64_ns_dtype
```



---
## test_is_timedelta64_ns_dtype
```python
from test_common import test_is_timedelta64_ns_dtype
```



---
## test_is_numeric_v_string_like
```python
from test_common import test_is_numeric_v_string_like
```



---
## test_needs_i8_conversion
```python
from test_common import test_needs_i8_conversion
```



---
## test_is_numeric_dtype
```python
from test_common import test_is_numeric_dtype
```



---
## test_is_any_real_numeric_dtype
```python
from test_common import test_is_any_real_numeric_dtype
```



---
## test_is_float_dtype
```python
from test_common import test_is_float_dtype
```



---
## test_is_bool_dtype
```python
from test_common import test_is_bool_dtype
```



---
## test_is_bool_dtype_numpy_error
```python
from test_common import test_is_bool_dtype_numpy_error
```



---
## test_is_complex_dtype
```python
from test_common import test_is_complex_dtype
```



---
## test_get_dtype
```python
from test_common import test_get_dtype
```



---
## test_get_dtype_fails
```python
from test_common import test_get_dtype_fails
```



---
## test__is_dtype_type
```python
from test_common import test__is_dtype_type
```



---
## test_astype_nansafe_copy_false
```python
from test_common import test_astype_nansafe_copy_false
```



---
## test_astype_object_preserves_datetime_na
```python
from test_common import test_astype_object_preserves_datetime_na
```



---
## test_validate_allhashable
```python
from test_common import test_validate_allhashable
```



---
## test_pandas_dtype_numpy_warning
```python
from test_common import test_pandas_dtype_numpy_warning
```



---
## test_pandas_dtype_ea_not_instance
```python
from test_common import test_pandas_dtype_ea_not_instance
```



---
## test_invalid_dtype_error
```python
from test_common import test_invalid_dtype_error
```



---
## test_pandas_dtype_valid
```python
from test_common import test_pandas_dtype_valid
```



---
## test_numpy_dtype
```python
from test_common import test_numpy_dtype
```



---
## test_numpy_string_dtype
```python
from test_common import test_numpy_string_dtype
```



---
## test_datetimetz_dtype
```python
from test_common import test_datetimetz_dtype
```



---
## test_categorical_dtype
```python
from test_common import test_categorical_dtype
```



---
## test_period_dtype
```python
from test_common import test_period_dtype
```



---
## NotTZDtype
```python
from test_common import NotTZDtype
```



---
## MyNumericDType
```python
from test_common import MyNumericDType
```



---
## kind
```python
from test_common import kind
```



---
## type
```python
from test_common import type
```



---
## name
```python
from test_common import name
```



---
## construct_array_type
```python
from test_common import construct_array_type
```



---
## _is_numeric
```python
from test_common import _is_numeric
```



---
## test_notna_notnull
```python
from test_missing import test_notna_notnull
```



---
## test_null_check_is_series
```python
from test_missing import test_null_check_is_series
```



---
## TestIsNA
```python
from test_missing import TestIsNA
```



---
## test_array_equivalent
```python
from test_missing import test_array_equivalent
```



---
## test_array_equivalent_tdi
```python
from test_missing import test_array_equivalent_tdi
```



---
## test_array_equivalent_dti
```python
from test_missing import test_array_equivalent_dti
```



---
## test_array_equivalent_series
```python
from test_missing import test_array_equivalent_series
```



---
## test_array_equivalent_array_mismatched_shape
```python
from test_missing import test_array_equivalent_array_mismatched_shape
```



---
## test_array_equivalent_array_mismatched_dtype
```python
from test_missing import test_array_equivalent_array_mismatched_dtype
```



---
## test_array_equivalent_different_dtype_but_equal
```python
from test_missing import test_array_equivalent_different_dtype_but_equal
```



---
## test_array_equivalent_tzawareness
```python
from test_missing import test_array_equivalent_tzawareness
```



---
## test_array_equivalent_compat
```python
from test_missing import test_array_equivalent_compat
```



---
## test_array_equivalent_str
```python
from test_missing import test_array_equivalent_str
```



---
## test_array_equivalent_nested
```python
from test_missing import test_array_equivalent_nested
```



---
## test_array_equivalent_nested2
```python
from test_missing import test_array_equivalent_nested2
```



---
## test_array_equivalent_nested_list
```python
from test_missing import test_array_equivalent_nested_list
```



---
## test_array_equivalent_nested_mixed_list
```python
from test_missing import test_array_equivalent_nested_mixed_list
```



---
## test_array_equivalent_nested_dicts
```python
from test_missing import test_array_equivalent_nested_dicts
```



---
## test_array_equivalent_index_with_tuples
```python
from test_missing import test_array_equivalent_index_with_tuples
```



---
## test_na_value_for_dtype
```python
from test_missing import test_na_value_for_dtype
```



---
## TestNAObj
```python
from test_missing import TestNAObj
```



---
## TestLibMissing
```python
from test_missing import TestLibMissing
```



---
## TestIsValidNAForDtype
```python
from test_missing import TestIsValidNAForDtype
```



---
## test_0d_array
```python
from test_missing import test_0d_array
```



---
## test_empty_object
```python
from test_missing import test_empty_object
```



---
## test_isna_isnull
```python
from test_missing import test_isna_isnull
```



---
## test_isna_isnull_frame
```python
from test_missing import test_isna_isnull_frame
```



---
## test_isna_lists
```python
from test_missing import test_isna_lists
```



---
## test_isna_nat
```python
from test_missing import test_isna_nat
```



---
## test_isna_numpy_nat
```python
from test_missing import test_isna_numpy_nat
```



---
## test_isna_datetime
```python
from test_missing import test_isna_datetime
```



---
## test_isna_old_datetimelike
```python
from test_missing import test_isna_old_datetimelike
```



---
## test_complex
```python
from test_missing import test_complex
```



---
## test_datetime_other_units
```python
from test_missing import test_datetime_other_units
```



---
## test_datetime_other_units_astype
```python
from test_missing import test_datetime_other_units_astype
```



---
## test_timedelta_other_units
```python
from test_missing import test_timedelta_other_units
```



---
## test_timedelta_other_units_dtype
```python
from test_missing import test_timedelta_other_units_dtype
```



---
## test_period
```python
from test_missing import test_period
```



---
## test_decimal
```python
from test_missing import test_decimal
```



---
## _check_behavior
```python
from test_missing import _check_behavior
```



---
## test_basic
```python
from test_missing import test_basic
```



---
## test_non_obj_dtype
```python
from test_missing import test_non_obj_dtype
```



---
## test_empty_arr
```python
from test_missing import test_empty_arr
```



---
## test_empty_str_inp
```python
from test_missing import test_empty_str_inp
```



---
## test_empty_like
```python
from test_missing import test_empty_like
```



---
## test_checknull_na_vals
```python
from test_missing import test_checknull_na_vals
```



---
## test_checknull_inf_vals
```python
from test_missing import test_checknull_inf_vals
```



---
## test_checknull_intna_vals
```python
from test_missing import test_checknull_intna_vals
```



---
## test_checknull_never_na_vals
```python
from test_missing import test_checknull_never_na_vals
```



---
## test_checknull_old_na_vals
```python
from test_missing import test_checknull_old_na_vals
```



---
## test_checknull_old_inf_vals
```python
from test_missing import test_checknull_old_inf_vals
```



---
## test_checknull_old_intna_vals
```python
from test_missing import test_checknull_old_intna_vals
```



---
## test_checknull_old_never_na_vals
```python
from test_missing import test_checknull_old_never_na_vals
```



---
## test_is_matching_na
```python
from test_missing import test_is_matching_na
```



---
## test_is_matching_na_nan_matches_none
```python
from test_missing import test_is_matching_na_nan_matches_none
```



---
## test_is_valid_na_for_dtype_interval
```python
from test_missing import test_is_valid_na_for_dtype_interval
```



---
## test_is_valid_na_for_dtype_categorical
```python
from test_missing import test_is_valid_na_for_dtype_categorical
```



---
## __name__
```python
from test_generic import __name__
```



---
## TestABCClasses
```python
from test_generic import TestABCClasses
```



---
## test_setattr_warnings
```python
from test_generic import test_setattr_warnings
```



---
## test_abc_pairs_instance_check
```python
from test_generic import test_abc_pairs_instance_check
```



---
## test_abc_pairs_subclass_check
```python
from test_generic import test_abc_pairs_subclass_check
```



---
## test_abc_hierarchy
```python
from test_generic import test_abc_hierarchy
```



---
## test_abc_coverage
```python
from test_generic import test_abc_coverage
```



---
## __name__
```python
from test_concat import __name__
```



---
## test_concat_mismatched_categoricals_with_empty
```python
from test_concat import test_concat_mismatched_categoricals_with_empty
```



---
## test_concat_single_dataframe_tz_aware
```python
from test_concat import test_concat_single_dataframe_tz_aware
```



---
## test_concat_periodarray_2d
```python
from test_concat import test_concat_periodarray_2d
```



---
## __name__
```python
from test_dtypes import __name__
```



---
## Base
```python
from test_dtypes import Base
```



---
## TestCategoricalDtype
```python
from test_dtypes import TestCategoricalDtype
```



---
## TestDatetimeTZDtype
```python
from test_dtypes import TestDatetimeTZDtype
```



---
## TestPeriodDtype
```python
from test_dtypes import TestPeriodDtype
```



---
## TestIntervalDtype
```python
from test_dtypes import TestIntervalDtype
```



---
## TestCategoricalDtypeParametrized
```python
from test_dtypes import TestCategoricalDtypeParametrized
```



---
## test_registry
```python
from test_dtypes import test_registry
```



---
## test_registry_find
```python
from test_dtypes import test_registry_find
```



---
## test_is_bool_dtype
```python
from test_dtypes import test_is_bool_dtype
```



---
## test_is_bool_dtype_sparse
```python
from test_dtypes import test_is_bool_dtype_sparse
```



---
## test_is_dtype_no_warning
```python
from test_dtypes import test_is_dtype_no_warning
```



---
## test_period_dtype_compare_to_string
```python
from test_dtypes import test_period_dtype_compare_to_string
```



---
## test_compare_complex_dtypes
```python
from test_dtypes import test_compare_complex_dtypes
```



---
## test_cast_string_to_complex
```python
from test_dtypes import test_cast_string_to_complex
```



---
## test_categorical_complex
```python
from test_dtypes import test_categorical_complex
```



---
## test_multi_column_dtype_assignment
```python
from test_dtypes import test_multi_column_dtype_assignment
```



---
## test_hash
```python
from test_dtypes import test_hash
```



---
## test_equality_invalid
```python
from test_dtypes import test_equality_invalid
```



---
## test_numpy_informed
```python
from test_dtypes import test_numpy_informed
```



---
## test_pickle
```python
from test_dtypes import test_pickle
```



---
## dtype
```python
from test_dtypes import dtype
```

Class level fixture of dtype for TestIntervalDtype

---
## test_hash_vs_equality
```python
from test_dtypes import test_hash_vs_equality
```



---
## test_equality
```python
from test_dtypes import test_equality
```



---
## test_construction_from_string
```python
from test_dtypes import test_construction_from_string
```



---
## test_constructor_invalid
```python
from test_dtypes import test_constructor_invalid
```



---
## test_from_values_or_dtype
```python
from test_dtypes import test_from_values_or_dtype
```



---
## test_from_values_or_dtype_raises
```python
from test_dtypes import test_from_values_or_dtype_raises
```



---
## test_from_values_or_dtype_invalid_dtype
```python
from test_dtypes import test_from_values_or_dtype_invalid_dtype
```



---
## test_is_dtype
```python
from test_dtypes import test_is_dtype
```



---
## test_basic
```python
from test_dtypes import test_basic
```



---
## test_tuple_categories
```python
from test_dtypes import test_tuple_categories
```



---
## test_is_boolean
```python
from test_dtypes import test_is_boolean
```



---
## test_dtype_specific_categorical_dtype
```python
from test_dtypes import test_dtype_specific_categorical_dtype
```



---
## test_not_string
```python
from test_dtypes import test_not_string
```



---
## test_repr_range_categories
```python
from test_dtypes import test_repr_range_categories
```



---
## test_update_dtype
```python
from test_dtypes import test_update_dtype
```



---
## test_repr
```python
from test_dtypes import test_repr
```



---
## test_alias_to_unit_raises
```python
from test_dtypes import test_alias_to_unit_raises
```



---
## test_alias_to_unit_bad_alias_raises
```python
from test_dtypes import test_alias_to_unit_bad_alias_raises
```



---
## test_construction_non_nanosecond
```python
from test_dtypes import test_construction_non_nanosecond
```



---
## test_day_not_supported
```python
from test_dtypes import test_day_not_supported
```



---
## test_subclass
```python
from test_dtypes import test_subclass
```



---
## test_compat
```python
from test_dtypes import test_compat
```



---
## test_construct_from_string_invalid_raises
```python
from test_dtypes import test_construct_from_string_invalid_raises
```



---
## test_construct_from_string_wrong_type_raises
```python
from test_dtypes import test_construct_from_string_wrong_type_raises
```



---
## test_dst
```python
from test_dtypes import test_dst
```



---
## test_parser
```python
from test_dtypes import test_parser
```



---
## test_empty
```python
from test_dtypes import test_empty
```



---
## test_tz_standardize
```python
from test_dtypes import test_tz_standardize
```



---
## test_construction
```python
from test_dtypes import test_construction
```



---
## test_cannot_use_custom_businessday
```python
from test_dtypes import test_cannot_use_custom_businessday
```



---
## test_identity
```python
from test_dtypes import test_identity
```



---
## test_construct_dtype_from_string_invalid_raises
```python
from test_dtypes import test_construct_dtype_from_string_invalid_raises
```



---
## test_freq_argument_required
```python
from test_dtypes import test_freq_argument_required
```



---
## test_perioddtype_caching_dateoffset_normalize
```python
from test_dtypes import test_perioddtype_caching_dateoffset_normalize
```



---
## test_dont_keep_ref_after_del
```python
from test_dtypes import test_dont_keep_ref_after_del
```



---
## test_construction_allows_closed_none
```python
from test_dtypes import test_construction_allows_closed_none
```



---
## test_closed_mismatch
```python
from test_dtypes import test_closed_mismatch
```



---
## test_construction_generic
```python
from test_dtypes import test_construction_generic
```



---
## test_construction_not_supported
```python
from test_dtypes import test_construction_not_supported
```



---
## test_construction_errors
```python
from test_dtypes import test_construction_errors
```



---
## test_closed_must_match
```python
from test_dtypes import test_closed_must_match
```



---
## test_closed_invalid
```python
from test_dtypes import test_closed_invalid
```



---
## test_construction_from_string_errors
```python
from test_dtypes import test_construction_from_string_errors
```



---
## test_construction_from_string_error_subtype
```python
from test_dtypes import test_construction_from_string_error_subtype
```



---
## test_equality_generic
```python
from test_dtypes import test_equality_generic
```



---
## test_name_repr
```python
from test_dtypes import test_name_repr
```



---
## test_name_repr_generic
```python
from test_dtypes import test_name_repr_generic
```



---
## test_basic_dtype
```python
from test_dtypes import test_basic_dtype
```



---
## test_caching
```python
from test_dtypes import test_caching
```



---
## test_unpickling_without_closed
```python
from test_dtypes import test_unpickling_without_closed
```



---
## test_order_matters
```python
from test_dtypes import test_order_matters
```



---
## test_unordered_same
```python
from test_dtypes import test_unordered_same
```



---
## test_categories
```python
from test_dtypes import test_categories
```



---
## test_equal_but_different
```python
from test_dtypes import test_equal_but_different
```



---
## test_equal_but_different_mixed_dtypes
```python
from test_dtypes import test_equal_but_different_mixed_dtypes
```



---
## test_equal_empty_ordered
```python
from test_dtypes import test_equal_empty_ordered
```



---
## test_equal_empty_unordered
```python
from test_dtypes import test_equal_empty_unordered
```



---
## test_order_hashes_different
```python
from test_dtypes import test_order_hashes_different
```



---
## test_nan_invalid
```python
from test_dtypes import test_nan_invalid
```



---
## test_non_unique_invalid
```python
from test_dtypes import test_non_unique_invalid
```



---
## test_same_categories_different_order
```python
from test_dtypes import test_same_categories_different_order
```



---
## test_categorical_equality
```python
from test_dtypes import test_categorical_equality
```



---
## test_categorical_dtype_equality_requires_categories
```python
from test_dtypes import test_categorical_dtype_equality_requires_categories
```



---
## test_categorical_equality_strings
```python
from test_dtypes import test_categorical_equality_strings
```



---
## test_invalid_raises
```python
from test_dtypes import test_invalid_raises
```



---
## test_mixed
```python
from test_dtypes import test_mixed
```



---
## test_from_categorical_dtype_identity
```python
from test_dtypes import test_from_categorical_dtype_identity
```



---
## test_from_categorical_dtype_categories
```python
from test_dtypes import test_from_categorical_dtype_categories
```



---
## test_from_categorical_dtype_ordered
```python
from test_dtypes import test_from_categorical_dtype_ordered
```



---
## test_from_categorical_dtype_both
```python
from test_dtypes import test_from_categorical_dtype_both
```



---
## test_str_vs_repr
```python
from test_dtypes import test_str_vs_repr
```



---
## test_categorical_categories
```python
from test_dtypes import test_categorical_categories
```



---
## test_update_dtype_string
```python
from test_dtypes import test_update_dtype_string
```



---
## test_update_dtype_errors
```python
from test_dtypes import test_update_dtype_errors
```



---
## __name__
```python
from test_libalgos import __name__
```



---
## test_ensure_platform_int
```python
from test_libalgos import test_ensure_platform_int
```



---
## test_is_lexsorted
```python
from test_libalgos import test_is_lexsorted
```



---
## test_groupsort_indexer
```python
from test_libalgos import test_groupsort_indexer
```



---
## TestPadBackfill
```python
from test_libalgos import TestPadBackfill
```



---
## TestInfinity
```python
from test_libalgos import TestInfinity
```



---
## test_backfill
```python
from test_libalgos import test_backfill
```



---
## test_pad
```python
from test_libalgos import test_pad
```



---
## test_pad_backfill_object_segfault
```python
from test_libalgos import test_pad_backfill_object_segfault
```



---
## test_infinity_sort
```python
from test_libalgos import test_infinity_sort
```



---
## test_infinity_against_nan
```python
from test_libalgos import test_infinity_against_nan
```



---
## __name__
```python
from test_join import __name__
```



---
## TestIndexer
```python
from test_join import TestIndexer
```



---
## test_left_join_indexer_unique
```python
from test_join import test_left_join_indexer_unique
```



---
## test_left_outer_join_bug
```python
from test_join import test_left_outer_join_bug
```



---
## test_inner_join_indexer
```python
from test_join import test_inner_join_indexer
```



---
## test_outer_join_indexer
```python
from test_join import test_outer_join_indexer
```



---
## test_left_join_indexer
```python
from test_join import test_left_join_indexer
```



---
## test_left_join_indexer2
```python
from test_join import test_left_join_indexer2
```



---
## test_outer_join_indexer2
```python
from test_join import test_outer_join_indexer2
```



---
## test_inner_join_indexer2
```python
from test_join import test_inner_join_indexer2
```



---
## test_cython_left_outer_join
```python
from test_join import test_cython_left_outer_join
```



---
## test_cython_right_outer_join
```python
from test_join import test_cython_right_outer_join
```



---
## test_cython_inner_join
```python
from test_join import test_cython_inner_join
```



---
## activated_tracemalloc
```python
from test_hashtable import activated_tracemalloc
```



---
## get_allocated_khash_memory
```python
from test_hashtable import get_allocated_khash_memory
```



---
## TestHashTable
```python
from test_hashtable import TestHashTable
```



---
## TestHashTableUnsorted
```python
from test_hashtable import TestHashTableUnsorted
```



---
## TestPyObjectHashTableWithNans
```python
from test_hashtable import TestPyObjectHashTableWithNans
```



---
## test_hash_equal_tuple_with_nans
```python
from test_hashtable import test_hash_equal_tuple_with_nans
```



---
## test_get_labels_groupby_for_Int64
```python
from test_hashtable import test_get_labels_groupby_for_Int64
```



---
## test_tracemalloc_works_for_StringHashTable
```python
from test_hashtable import test_tracemalloc_works_for_StringHashTable
```



---
## test_tracemalloc_for_empty_StringHashTable
```python
from test_hashtable import test_tracemalloc_for_empty_StringHashTable
```



---
## test_no_reallocation_StringHashTable
```python
from test_hashtable import test_no_reallocation_StringHashTable
```



---
## TestHashTableWithNans
```python
from test_hashtable import TestHashTableWithNans
```



---
## test_unique_for_nan_objects_floats
```python
from test_hashtable import test_unique_for_nan_objects_floats
```



---
## test_unique_for_nan_objects_complex
```python
from test_hashtable import test_unique_for_nan_objects_complex
```



---
## test_unique_for_nan_objects_tuple
```python
from test_hashtable import test_unique_for_nan_objects_tuple
```



---
## TestHelpFunctions
```python
from test_hashtable import TestHelpFunctions
```



---
## test_modes_with_nans
```python
from test_hashtable import test_modes_with_nans
```



---
## test_unique_label_indices_intp
```python
from test_hashtable import test_unique_label_indices_intp
```



---
## test_unique_label_indices
```python
from test_hashtable import test_unique_label_indices
```



---
## TestHelpFunctionsWithNans
```python
from test_hashtable import TestHelpFunctionsWithNans
```



---
## test_ismember_tuple_with_nans
```python
from test_hashtable import test_ismember_tuple_with_nans
```



---
## test_float_complex_int_are_equal_as_objects
```python
from test_hashtable import test_float_complex_int_are_equal_as_objects
```



---
## test_get_set_contains_len
```python
from test_hashtable import test_get_set_contains_len
```



---
## test_get_set_contains_len_mask
```python
from test_hashtable import test_get_set_contains_len_mask
```



---
## test_map_keys_to_values
```python
from test_hashtable import test_map_keys_to_values
```



---
## test_map_locations
```python
from test_hashtable import test_map_locations
```



---
## test_map_locations_mask
```python
from test_hashtable import test_map_locations_mask
```



---
## test_lookup
```python
from test_hashtable import test_lookup
```



---
## test_lookup_wrong
```python
from test_hashtable import test_lookup_wrong
```



---
## test_lookup_mask
```python
from test_hashtable import test_lookup_mask
```



---
## test_unique
```python
from test_hashtable import test_unique
```



---
## test_tracemalloc_works
```python
from test_hashtable import test_tracemalloc_works
```



---
## test_tracemalloc_for_empty
```python
from test_hashtable import test_tracemalloc_for_empty
```



---
## test_get_state
```python
from test_hashtable import test_get_state
```



---
## test_no_reallocation
```python
from test_hashtable import test_no_reallocation
```



---
## test_string_hashtable_set_item_signature
```python
from test_hashtable import test_string_hashtable_set_item_signature
```



---
## test_lookup_nan
```python
from test_hashtable import test_lookup_nan
```



---
## test_add_signed_zeros
```python
from test_hashtable import test_add_signed_zeros
```



---
## test_add_different_nans
```python
from test_hashtable import test_add_different_nans
```



---
## test_lookup_overflow
```python
from test_hashtable import test_lookup_overflow
```



---
## test_vector_resize
```python
from test_hashtable import test_vector_resize
```



---
## test_hashtable_large_sizehint
```python
from test_hashtable import test_hashtable_large_sizehint
```



---
## test_nan_float
```python
from test_hashtable import test_nan_float
```



---
## test_nan_complex_both
```python
from test_hashtable import test_nan_complex_both
```



---
## test_nan_complex_real
```python
from test_hashtable import test_nan_complex_real
```



---
## test_nan_complex_imag
```python
from test_hashtable import test_nan_complex_imag
```



---
## test_nan_in_tuple
```python
from test_hashtable import test_nan_in_tuple
```



---
## test_nan_in_nested_tuple
```python
from test_hashtable import test_nan_in_nested_tuple
```



---
## test_value_count
```python
from test_hashtable import test_value_count
```



---
## test_value_count_mask
```python
from test_hashtable import test_value_count_mask
```



---
## test_value_count_stable
```python
from test_hashtable import test_value_count_stable
```



---
## test_duplicated_first
```python
from test_hashtable import test_duplicated_first
```



---
## test_ismember_yes
```python
from test_hashtable import test_ismember_yes
```



---
## test_ismember_no
```python
from test_hashtable import test_ismember_no
```



---
## test_mode
```python
from test_hashtable import test_mode
```



---
## test_mode_stable
```python
from test_hashtable import test_mode_stable
```



---
## __name__
```python
from test_lib import __name__
```



---
## TestMisc
```python
from test_lib import TestMisc
```



---
## TestIndexing
```python
from test_lib import TestIndexing
```



---
## test_cache_readonly_preserve_docstrings
```python
from test_lib import test_cache_readonly_preserve_docstrings
```



---
## test_no_default_pickle
```python
from test_lib import test_no_default_pickle
```



---
## test_max_len_string_array
```python
from test_lib import test_max_len_string_array
```



---
## test_fast_unique_multiple_list_gen_sort
```python
from test_lib import test_fast_unique_multiple_list_gen_sort
```



---
## test_fast_multiget_timedelta_resos
```python
from test_lib import test_fast_multiget_timedelta_resos
```



---
## test_maybe_indices_to_slice_left_edge
```python
from test_lib import test_maybe_indices_to_slice_left_edge
```



---
## test_maybe_indices_to_slice_left_edge_not_slice_end_steps
```python
from test_lib import test_maybe_indices_to_slice_left_edge_not_slice_end_steps
```



---
## test_maybe_indices_to_slice_left_edge_not_slice
```python
from test_lib import test_maybe_indices_to_slice_left_edge_not_slice
```



---
## test_maybe_indices_to_slice_right_edge
```python
from test_lib import test_maybe_indices_to_slice_right_edge
```



---
## test_maybe_indices_to_slice_right_edge_not_slice
```python
from test_lib import test_maybe_indices_to_slice_right_edge_not_slice
```



---
## test_maybe_indices_to_slice_right_edge_cases
```python
from test_lib import test_maybe_indices_to_slice_right_edge_cases
```



---
## test_maybe_indices_to_slice_both_edges
```python
from test_lib import test_maybe_indices_to_slice_both_edges
```



---
## test_maybe_indices_to_slice_both_edges_not_slice
```python
from test_lib import test_maybe_indices_to_slice_both_edges_not_slice
```



---
## test_maybe_indices_to_slice_middle
```python
from test_lib import test_maybe_indices_to_slice_middle
```



---
## test_maybe_indices_to_slice_middle_not_slice
```python
from test_lib import test_maybe_indices_to_slice_middle_not_slice
```



---
## test_maybe_booleans_to_slice
```python
from test_lib import test_maybe_booleans_to_slice
```



---
## test_get_reverse_indexer
```python
from test_lib import test_get_reverse_indexer
```



---
## test_is_range_indexer
```python
from test_lib import test_is_range_indexer
```



---
## test_is_range_indexer_big_n
```python
from test_lib import test_is_range_indexer_big_n
```



---
## test_is_range_indexer_not_equal
```python
from test_lib import test_is_range_indexer_not_equal
```



---
## test_is_range_indexer_not_equal_shape
```python
from test_lib import test_is_range_indexer_not_equal_shape
```



---
## __name__
```python
from test_timegrouper import __name__
```

test with the TimeGrouper / grouping with datetimes

---
## frame_for_truncated_bingrouper
```python
from test_timegrouper import frame_for_truncated_bingrouper
```

DataFrame used by groupby_with_truncated_bingrouper, made into
a separate fixture for easier reuse in
test_groupby_apply_timegrouper_with_nat_apply_squeeze

---
## groupby_with_truncated_bingrouper
```python
from test_timegrouper import groupby_with_truncated_bingrouper
```

GroupBy object such that gb._grouper is a BinGrouper and
len(gb._grouper.result_index) < len(gb._grouper.group_keys_seq)

Aggregations on this groupby should have

    dti = date_range("2013-09-01", "2013-10-01", freq="5D", name="Date")

As either the index or an index level.

---
## TestGroupBy
```python
from test_timegrouper import TestGroupBy
```



---
## test_groupby_with_timegrouper
```python
from test_timegrouper import test_groupby_with_timegrouper
```



---
## test_groupby_with_timegrouper_methods
```python
from test_timegrouper import test_groupby_with_timegrouper_methods
```



---
## test_timegrouper_with_reg_groups
```python
from test_timegrouper import test_timegrouper_with_reg_groups
```



---
## test_timegrouper_with_reg_groups_freq
```python
from test_timegrouper import test_timegrouper_with_reg_groups_freq
```



---
## test_timegrouper_get_group
```python
from test_timegrouper import test_timegrouper_get_group
```



---
## test_timegrouper_apply_return_type_series
```python
from test_timegrouper import test_timegrouper_apply_return_type_series
```



---
## test_timegrouper_apply_return_type_value
```python
from test_timegrouper import test_timegrouper_apply_return_type_value
```



---
## test_groupby_groups_datetimeindex
```python
from test_timegrouper import test_groupby_groups_datetimeindex
```



---
## test_groupby_groups_datetimeindex2
```python
from test_timegrouper import test_groupby_groups_datetimeindex2
```



---
## test_groupby_groups_datetimeindex_tz
```python
from test_timegrouper import test_groupby_groups_datetimeindex_tz
```



---
## test_frame_datetime64_handling_groupby
```python
from test_timegrouper import test_frame_datetime64_handling_groupby
```



---
## test_groupby_multi_timezone
```python
from test_timegrouper import test_groupby_multi_timezone
```



---
## test_groupby_groups_periods
```python
from test_timegrouper import test_groupby_groups_periods
```



---
## test_groupby_first_datetime64
```python
from test_timegrouper import test_groupby_first_datetime64
```



---
## test_groupby_max_datetime64
```python
from test_timegrouper import test_groupby_max_datetime64
```



---
## test_groupby_datetime64_32_bit
```python
from test_timegrouper import test_groupby_datetime64_32_bit
```



---
## test_groupby_with_timezone_selection
```python
from test_timegrouper import test_groupby_with_timezone_selection
```



---
## test_timezone_info
```python
from test_timegrouper import test_timezone_info
```



---
## test_datetime_count
```python
from test_timegrouper import test_datetime_count
```



---
## test_first_last_max_min_on_time_data
```python
from test_timegrouper import test_first_last_max_min_on_time_data
```



---
## test_nunique_with_timegrouper_and_nat
```python
from test_timegrouper import test_nunique_with_timegrouper_and_nat
```



---
## test_scalar_call_versus_list_call
```python
from test_timegrouper import test_scalar_call_versus_list_call
```



---
## test_grouper_period_index
```python
from test_timegrouper import test_grouper_period_index
```



---
## test_groupby_apply_timegrouper_with_nat_dict_returns
```python
from test_timegrouper import test_groupby_apply_timegrouper_with_nat_dict_returns
```



---
## test_groupby_apply_timegrouper_with_nat_scalar_returns
```python
from test_timegrouper import test_groupby_apply_timegrouper_with_nat_scalar_returns
```



---
## test_groupby_apply_timegrouper_with_nat_apply_squeeze
```python
from test_timegrouper import test_groupby_apply_timegrouper_with_nat_apply_squeeze
```



---
## test_groupby_agg_numba_timegrouper_with_nat
```python
from test_timegrouper import test_groupby_agg_numba_timegrouper_with_nat
```



---
## sumfunc_series
```python
from test_timegrouper import sumfunc_series
```



---
## sumfunc_value
```python
from test_timegrouper import sumfunc_value
```



---
## __name__
```python
from test_grouping import __name__
```

test where we are determining what we are grouping, or getting groups

---
## TestSelection
```python
from test_grouping import TestSelection
```



---
## TestGrouping
```python
from test_grouping import TestGrouping
```



---
## TestGetGroup
```python
from test_grouping import TestGetGroup
```



---
## TestIteration
```python
from test_grouping import TestIteration
```



---
## test_grouping_by_key_is_in_axis
```python
from test_grouping import test_grouping_by_key_is_in_axis
```



---
## test_grouper_groups
```python
from test_grouping import test_grouper_groups
```



---
## test_depr_grouping_attrs
```python
from test_grouping import test_depr_grouping_attrs
```



---
## test_select_bad_cols
```python
from test_grouping import test_select_bad_cols
```



---
## test_groupby_duplicated_column_errormsg
```python
from test_grouping import test_groupby_duplicated_column_errormsg
```



---
## test_column_select_via_attr
```python
from test_grouping import test_column_select_via_attr
```



---
## test_getitem_list_of_columns
```python
from test_grouping import test_getitem_list_of_columns
```



---
## test_getitem_numeric_column_names
```python
from test_grouping import test_getitem_numeric_column_names
```



---
## test_getitem_single_tuple_of_columns_raises
```python
from test_grouping import test_getitem_single_tuple_of_columns_raises
```



---
## test_getitem_single_column
```python
from test_grouping import test_getitem_single_column
```



---
## test_getitem_from_grouper
```python
from test_grouping import test_getitem_from_grouper
```



---
## test_indices_grouped_by_tuple_with_lambda
```python
from test_grouping import test_indices_grouped_by_tuple_with_lambda
```



---
## test_grouper_index_types
```python
from test_grouping import test_grouper_index_types
```



---
## test_grouper_multilevel_freq
```python
from test_grouping import test_grouper_multilevel_freq
```



---
## test_grouper_creation_bug
```python
from test_grouping import test_grouper_creation_bug
```



---
## test_grouper_creation_bug2
```python
from test_grouping import test_grouper_creation_bug2
```



---
## test_grouper_creation_bug3
```python
from test_grouping import test_grouper_creation_bug3
```



---
## test_grouper_returning_tuples
```python
from test_grouping import test_grouper_returning_tuples
```



---
## test_grouper_column_and_index
```python
from test_grouping import test_grouper_column_and_index
```



---
## test_groupby_levels_and_columns
```python
from test_grouping import test_groupby_levels_and_columns
```



---
## test_groupby_categorical_index_and_columns
```python
from test_grouping import test_groupby_categorical_index_and_columns
```



---
## test_grouper_getting_correct_binner
```python
from test_grouping import test_grouper_getting_correct_binner
```



---
## test_grouper_iter
```python
from test_grouping import test_grouper_iter
```



---
## test_empty_groups
```python
from test_grouping import test_empty_groups
```



---
## test_groupby_grouper
```python
from test_grouping import test_groupby_grouper
```



---
## test_groupby_dict_mapping
```python
from test_grouping import test_groupby_dict_mapping
```



---
## test_groupby_series_named_with_tuple
```python
from test_grouping import test_groupby_series_named_with_tuple
```



---
## test_groupby_grouper_f_sanity_checked
```python
from test_grouping import test_groupby_grouper_f_sanity_checked
```



---
## test_groupby_with_datetime_key
```python
from test_grouping import test_groupby_with_datetime_key
```



---
## test_grouping_error_on_multidim_input
```python
from test_grouping import test_grouping_error_on_multidim_input
```



---
## test_multiindex_passthru
```python
from test_grouping import test_multiindex_passthru
```



---
## test_multiindex_negative_level
```python
from test_grouping import test_multiindex_negative_level
```



---
## test_multifunc_select_col_integer_cols
```python
from test_grouping import test_multifunc_select_col_integer_cols
```



---
## test_multiindex_columns_empty_level
```python
from test_grouping import test_multiindex_columns_empty_level
```



---
## test_groupby_multiindex_tuple
```python
from test_grouping import test_groupby_multiindex_tuple
```



---
## test_groupby_multiindex_partial_indexing_equivalence
```python
from test_grouping import test_groupby_multiindex_partial_indexing_equivalence
```



---
## test_groupby_level
```python
from test_grouping import test_groupby_level
```



---
## test_groupby_level_index_names
```python
from test_grouping import test_groupby_level_index_names
```



---
## test_groupby_level_with_nas
```python
from test_grouping import test_groupby_level_with_nas
```



---
## test_groupby_args
```python
from test_grouping import test_groupby_args
```



---
## test_level_preserve_order
```python
from test_grouping import test_level_preserve_order
```



---
## test_grouping_labels
```python
from test_grouping import test_grouping_labels
```



---
## test_list_grouper_with_nat
```python
from test_grouping import test_list_grouper_with_nat
```



---
## test_evaluate_with_empty_groups
```python
from test_grouping import test_evaluate_with_empty_groups
```



---
## test_groupby_empty
```python
from test_grouping import test_groupby_empty
```



---
## test_groupby_level_index_value_all_na
```python
from test_grouping import test_groupby_level_index_value_all_na
```



---
## test_groupby_multiindex_level_empty
```python
from test_grouping import test_groupby_multiindex_level_empty
```



---
## test_get_group
```python
from test_grouping import test_get_group
```



---
## test_get_group_empty_bins
```python
from test_grouping import test_get_group_empty_bins
```



---
## test_get_group_grouped_by_tuple
```python
from test_grouping import test_get_group_grouped_by_tuple
```



---
## test_get_group_grouped_by_tuple_with_lambda
```python
from test_grouping import test_get_group_grouped_by_tuple_with_lambda
```



---
## test_groupby_with_empty
```python
from test_grouping import test_groupby_with_empty
```



---
## test_groupby_with_single_column
```python
from test_grouping import test_groupby_with_single_column
```



---
## test_gb_key_len_equal_axis_len
```python
from test_grouping import test_gb_key_len_equal_axis_len
```



---
## test_groups
```python
from test_grouping import test_groups
```



---
## test_grouping_is_iterable
```python
from test_grouping import test_grouping_is_iterable
```



---
## test_multi_iter
```python
from test_grouping import test_multi_iter
```



---
## test_multi_iter_frame
```python
from test_grouping import test_multi_iter_frame
```



---
## test_dictify
```python
from test_grouping import test_dictify
```



---
## test_groupby_with_small_elem
```python
from test_grouping import test_groupby_with_small_elem
```



---
## test_grouping_string_repr
```python
from test_grouping import test_grouping_string_repr
```



---
## __name__
```python
from test_counting import __name__
```



---
## TestCounting
```python
from test_counting import TestCounting
```



---
## test_groupby_timedelta_cython_count
```python
from test_counting import test_groupby_timedelta_cython_count
```



---
## test_count
```python
from test_counting import test_count
```



---
## test_count_non_nulls
```python
from test_counting import test_count_non_nulls
```



---
## test_count_object
```python
from test_counting import test_count_object
```



---
## test_count_cross_type
```python
from test_counting import test_count_cross_type
```



---
## test_lower_int_prec_count
```python
from test_counting import test_lower_int_prec_count
```



---
## test_count_uses_size_on_exception
```python
from test_counting import test_count_uses_size_on_exception
```



---
## test_count_arrow_string_array
```python
from test_counting import test_count_arrow_string_array
```



---
## test_cumcount
```python
from test_counting import test_cumcount
```



---
## test_cumcount_empty
```python
from test_counting import test_cumcount_empty
```



---
## test_cumcount_dupe_index
```python
from test_counting import test_cumcount_dupe_index
```



---
## test_cumcount_mi
```python
from test_counting import test_cumcount_mi
```



---
## test_cumcount_groupby_not_col
```python
from test_counting import test_cumcount_groupby_not_col
```



---
## test_ngroup
```python
from test_counting import test_ngroup
```



---
## test_ngroup_distinct
```python
from test_counting import test_ngroup_distinct
```



---
## test_ngroup_one_group
```python
from test_counting import test_ngroup_one_group
```



---
## test_ngroup_empty
```python
from test_counting import test_ngroup_empty
```



---
## test_ngroup_series_matches_frame
```python
from test_counting import test_ngroup_series_matches_frame
```



---
## test_ngroup_dupe_index
```python
from test_counting import test_ngroup_dupe_index
```



---
## test_ngroup_mi
```python
from test_counting import test_ngroup_mi
```



---
## test_ngroup_groupby_not_col
```python
from test_counting import test_ngroup_groupby_not_col
```



---
## test_ngroup_descending
```python
from test_counting import test_ngroup_descending
```



---
## test_ngroup_matches_cumcount
```python
from test_counting import test_ngroup_matches_cumcount
```



---
## test_ngroup_cumcount_pair
```python
from test_counting import test_ngroup_cumcount_pair
```



---
## test_ngroup_respects_groupby_order
```python
from test_counting import test_ngroup_respects_groupby_order
```



---
## test_count_with_datetimelike
```python
from test_counting import test_count_with_datetimelike
```



---
## test_count_with_only_nans_in_first_group
```python
from test_counting import test_count_with_only_nans_in_first_group
```



---
## test_count_groupby_column_with_nan_in_groupby_column
```python
from test_counting import test_count_groupby_column_with_nan_in_groupby_column
```



---
## test_groupby_count_dateparseerror
```python
from test_counting import test_groupby_count_dateparseerror
```



---
## RaisingObjectException
```python
from test_counting import RaisingObjectException
```



---
## RaisingObject
```python
from test_counting import RaisingObject
```



---
## __init__
```python
from test_counting import __init__
```



---
## __eq__
```python
from test_counting import __eq__
```



---
## __name__
```python
from test_groupby_subclass import __name__
```



---
## test_groupby_preserves_subclass
```python
from test_groupby_subclass import test_groupby_preserves_subclass
```



---
## test_groupby_preserves_metadata
```python
from test_groupby_subclass import test_groupby_preserves_metadata
```



---
## test_groupby_resample_preserves_subclass
```python
from test_groupby_subclass import test_groupby_resample_preserves_subclass
```



---
## func
```python
from test_groupby_subclass import func
```



---
## func2
```python
from test_groupby_subclass import func2
```



---
## sort
```python
from conftest import sort
```

Boolean sort keyword for concat and DataFrame.append.

---
## as_index
```python
from conftest import as_index
```



---
## dropna
```python
from conftest import dropna
```



---
## df
```python
from conftest import df
```



---
## ts
```python
from conftest import ts
```



---
## tsframe
```python
from conftest import tsframe
```



---
## three_group
```python
from conftest import three_group
```



---
## slice_test_df
```python
from conftest import slice_test_df
```



---
## slice_test_grouped
```python
from conftest import slice_test_grouped
```



---
## reduction_func
```python
from conftest import reduction_func
```

yields the string names of all groupby reduction functions, one at a time.

---
## transformation_func
```python
from conftest import transformation_func
```

yields the string names of all groupby transformation functions.

---
## groupby_func
```python
from conftest import groupby_func
```

yields both aggregation and transformation functions.

---
## parallel
```python
from conftest import parallel
```

parallel keyword argument for numba.jit

---
## nogil
```python
from conftest import nogil
```

nogil keyword argument for numba.jit

---
## nopython
```python
from conftest import nopython
```

nopython keyword argument for numba.jit

---
## numba_supported_reductions
```python
from conftest import numba_supported_reductions
```

reductions supported with engine='numba'

---
## test_groupby_bool_aggs
```python
from test_reductions import test_groupby_bool_aggs
```



---
## test_any
```python
from test_reductions import test_any
```



---
## test_bool_aggs_dup_column_labels
```python
from test_reductions import test_bool_aggs_dup_column_labels
```



---
## test_masked_kleene_logic
```python
from test_reductions import test_masked_kleene_logic
```



---
## test_masked_mixed_types
```python
from test_reductions import test_masked_mixed_types
```



---
## test_masked_bool_aggs_skipna
```python
from test_reductions import test_masked_bool_aggs_skipna
```



---
## test_object_type_missing_vals
```python
from test_reductions import test_object_type_missing_vals
```



---
## test_object_NA_raises_with_skipna_false
```python
from test_reductions import test_object_NA_raises_with_skipna_false
```



---
## test_empty
```python
from test_reductions import test_empty
```



---
## test_idxmin_idxmax_extremes
```python
from test_reductions import test_idxmin_idxmax_extremes
```



---
## test_idxmin_idxmax_extremes_skipna
```python
from test_reductions import test_idxmin_idxmax_extremes_skipna
```



---
## test_idxmin_idxmax_returns_int_types
```python
from test_reductions import test_idxmin_idxmax_returns_int_types
```



---
## test_groupby_non_arithmetic_agg_int_like_precision
```python
from test_reductions import test_groupby_non_arithmetic_agg_int_like_precision
```



---
## test_first_last_skipna
```python
from test_reductions import test_first_last_skipna
```



---
## test_idxmin_idxmax_axis1
```python
from test_reductions import test_idxmin_idxmax_axis1
```



---
## test_groupby_mean_no_overflow
```python
from test_reductions import test_groupby_mean_no_overflow
```



---
## test_mean_on_timedelta
```python
from test_reductions import test_mean_on_timedelta
```



---
## test_cython_median
```python
from test_reductions import test_cython_median
```



---
## test_median_empty_bins
```python
from test_reductions import test_median_empty_bins
```



---
## test_max_min_non_numeric
```python
from test_reductions import test_max_min_non_numeric
```



---
## test_max_min_object_multiple_columns
```python
from test_reductions import test_max_min_object_multiple_columns
```



---
## test_min_date_with_nans
```python
from test_reductions import test_min_date_with_nans
```



---
## test_max_inat
```python
from test_reductions import test_max_inat
```



---
## test_max_inat_not_all_na
```python
from test_reductions import test_max_inat_not_all_na
```



---
## test_groupby_aggregate_period_column
```python
from test_reductions import test_groupby_aggregate_period_column
```



---
## test_groupby_aggregate_period_frame
```python
from test_reductions import test_groupby_aggregate_period_frame
```



---
## test_aggregate_numeric_object_dtype
```python
from test_reductions import test_aggregate_numeric_object_dtype
```



---
## test_aggregate_categorical_lost_index
```python
from test_reductions import test_aggregate_categorical_lost_index
```



---
## test_groupby_min_max_nullable
```python
from test_reductions import test_groupby_min_max_nullable
```



---
## test_min_max_nullable_uint64_empty_group
```python
from test_reductions import test_min_max_nullable_uint64_empty_group
```



---
## test_groupby_min_max_categorical
```python
from test_reductions import test_groupby_min_max_categorical
```



---
## test_min_empty_string_dtype
```python
from test_reductions import test_min_empty_string_dtype
```



---
## test_max_nan_bug
```python
from test_reductions import test_max_nan_bug
```



---
## test_series_groupby_nunique
```python
from test_reductions import test_series_groupby_nunique
```



---
## test_nunique_with_object
```python
from test_reductions import test_nunique_with_object
```



---
## test_nunique_with_empty_series
```python
from test_reductions import test_nunique_with_empty_series
```



---
## test_nunique_with_timegrouper
```python
from test_reductions import test_nunique_with_timegrouper
```



---
## test_nunique_with_NaT
```python
from test_reductions import test_nunique_with_NaT
```



---
## test_nunique_preserves_column_level_names
```python
from test_reductions import test_nunique_preserves_column_level_names
```



---
## test_nunique_transform_with_datetime
```python
from test_reductions import test_nunique_transform_with_datetime
```



---
## test_empty_categorical
```python
from test_reductions import test_empty_categorical
```



---
## test_intercept_builtin_sum
```python
from test_reductions import test_intercept_builtin_sum
```



---
## test_groupby_sum_mincount_boolean
```python
from test_reductions import test_groupby_sum_mincount_boolean
```



---
## test_groupby_sum_below_mincount_nullable_integer
```python
from test_reductions import test_groupby_sum_below_mincount_nullable_integer
```



---
## test_groupby_sum_timedelta_with_nat
```python
from test_reductions import test_groupby_sum_timedelta_with_nat
```



---
## test_groupby_non_arithmetic_agg_types
```python
from test_reductions import test_groupby_non_arithmetic_agg_types
```



---
## scipy_sem
```python
from test_reductions import scipy_sem
```



---
## test_ops_general
```python
from test_reductions import test_ops_general
```



---
## test_apply_to_nullable_integer_returns_float
```python
from test_reductions import test_apply_to_nullable_integer_returns_float
```



---
## test_regression_allowlist_methods
```python
from test_reductions import test_regression_allowlist_methods
```



---
## test_groupby_prod_with_int64_dtype
```python
from test_reductions import test_groupby_prod_with_int64_dtype
```



---
## __name__
```python
from test_all_methods import __name__
```

Tests that apply to all groupby operation methods.

The only tests that should appear here are those that use the `groupby_func` fixture.
Even if it does use that fixture, prefer a more specific test file if it available
such as:

 - test_categorical
 - test_groupby_dropna
 - test_groupby_subclass
 - test_raises

---
## test_multiindex_group_all_columns_when_empty
```python
from test_all_methods import test_multiindex_group_all_columns_when_empty
```



---
## test_duplicate_columns
```python
from test_all_methods import test_duplicate_columns
```



---
## test_dup_labels_output_shape
```python
from test_all_methods import test_dup_labels_output_shape
```



---
## test_groupby_column_index_name_lost_fill_funcs
```python
from test_missing import test_groupby_column_index_name_lost_fill_funcs
```



---
## test_groupby_fill_duplicate_column_names
```python
from test_missing import test_groupby_fill_duplicate_column_names
```



---
## test_ffill_missing_arguments
```python
from test_missing import test_ffill_missing_arguments
```



---
## test_fillna_with_string_dtype
```python
from test_missing import test_fillna_with_string_dtype
```



---
## test_fill_consistency
```python
from test_missing import test_fill_consistency
```



---
## test_ffill_handles_nan_groups
```python
from test_missing import test_ffill_handles_nan_groups
```



---
## test_min_count
```python
from test_missing import test_min_count
```



---
## test_indices_with_missing
```python
from test_missing import test_indices_with_missing
```



---
## dtypes_for_minmax
```python
from test_cumulative import dtypes_for_minmax
```

Fixture of dtypes with min and max values used for testing
cummin and cummax

---
## test_groupby_cumprod
```python
from test_cumulative import test_groupby_cumprod
```



---
## test_groupby_cumprod_overflow
```python
from test_cumulative import test_groupby_cumprod_overflow
```



---
## test_groupby_cumprod_nan_influences_other_columns
```python
from test_cumulative import test_groupby_cumprod_nan_influences_other_columns
```



---
## test_cummin
```python
from test_cumulative import test_cummin
```



---
## test_cummin_max_all_nan_column
```python
from test_cumulative import test_cummin_max_all_nan_column
```



---
## test_cummax
```python
from test_cumulative import test_cummax
```



---
## test_cummax_i8_at_implementation_bound
```python
from test_cumulative import test_cummax_i8_at_implementation_bound
```



---
## test_cummin_max_skipna
```python
from test_cumulative import test_cummin_max_skipna
```



---
## test_cummin_max_skipna_multiple_cols
```python
from test_cumulative import test_cummin_max_skipna_multiple_cols
```



---
## test_numpy_compat
```python
from test_cumulative import test_numpy_compat
```



---
## test_nullable_int_not_cast_as_float
```python
from test_cumulative import test_nullable_int_not_cast_as_float
```



---
## test_cython_api2
```python
from test_cumulative import test_cython_api2
```



---
## cartesian_product_for_groupers
```python
from test_categorical import cartesian_product_for_groupers
```

Reindex to a cartesian production for the groupers,
preserving the nature (Categorical) of each grouper

---
## test_apply_use_categorical_name
```python
from test_categorical import test_apply_use_categorical_name
```



---
## test_basic
```python
from test_categorical import test_basic
```



---
## test_level_get_group
```python
from test_categorical import test_level_get_group
```



---
## test_sorting_with_different_categoricals
```python
from test_categorical import test_sorting_with_different_categoricals
```



---
## test_apply
```python
from test_categorical import test_apply
```



---
## test_observed
```python
from test_categorical import test_observed
```



---
## test_observed_codes_remap
```python
from test_categorical import test_observed_codes_remap
```



---
## test_observed_perf
```python
from test_categorical import test_observed_perf
```



---
## test_observed_groups
```python
from test_categorical import test_observed_groups
```



---
## test_unobserved_in_index
```python
from test_categorical import test_unobserved_in_index
```



---
## test_observed_groups_with_nan
```python
from test_categorical import test_observed_groups_with_nan
```



---
## test_observed_nth
```python
from test_categorical import test_observed_nth
```



---
## test_dataframe_categorical_with_nan
```python
from test_categorical import test_dataframe_categorical_with_nan
```



---
## test_dataframe_categorical_ordered_observed_sort
```python
from test_categorical import test_dataframe_categorical_ordered_observed_sort
```



---
## test_datetime
```python
from test_categorical import test_datetime
```



---
## test_categorical_index
```python
from test_categorical import test_categorical_index
```



---
## test_describe_categorical_columns
```python
from test_categorical import test_describe_categorical_columns
```



---
## test_unstack_categorical
```python
from test_categorical import test_unstack_categorical
```



---
## test_bins_unequal_len
```python
from test_categorical import test_bins_unequal_len
```



---
## test_categorical_series
```python
from test_categorical import test_categorical_series
```



---
## test_as_index
```python
from test_categorical import test_as_index
```



---
## test_preserve_categories
```python
from test_categorical import test_preserve_categories
```



---
## test_preserve_categorical_dtype
```python
from test_categorical import test_preserve_categorical_dtype
```



---
## test_preserve_on_ordered_ops
```python
from test_categorical import test_preserve_on_ordered_ops
```



---
## test_categorical_no_compress
```python
from test_categorical import test_categorical_no_compress
```



---
## test_groupby_empty_with_category
```python
from test_categorical import test_groupby_empty_with_category
```



---
## test_sort
```python
from test_categorical import test_sort
```



---
## test_sort2
```python
from test_categorical import test_sort2
```



---
## test_sort_datetimelike
```python
from test_categorical import test_sort_datetimelike
```



---
## test_empty_sum
```python
from test_categorical import test_empty_sum
```



---
## test_empty_prod
```python
from test_categorical import test_empty_prod
```



---
## test_groupby_multiindex_categorical_datetime
```python
from test_categorical import test_groupby_multiindex_categorical_datetime
```



---
## test_groupby_agg_observed_true_single_column
```python
from test_categorical import test_groupby_agg_observed_true_single_column
```



---
## test_shift
```python
from test_categorical import test_shift
```



---
## df_cat
```python
from test_categorical import df_cat
```

DataFrame with multiple categorical columns and a column of integers.
Shortened so as not to contain all possible combinations of categories.
Useful for testing `observed` kwarg functionality on GroupBy objects.

Parameters
----------
df: DataFrame
    Non-categorical, longer DataFrame from another fixture, used to derive
    this one

Returns
-------
df_cat: DataFrame

---
## test_seriesgroupby_observed_true
```python
from test_categorical import test_seriesgroupby_observed_true
```



---
## test_seriesgroupby_observed_false_or_none
```python
from test_categorical import test_seriesgroupby_observed_false_or_none
```



---
## test_seriesgroupby_observed_apply_dict
```python
from test_categorical import test_seriesgroupby_observed_apply_dict
```



---
## test_groupby_categorical_series_dataframe_consistent
```python
from test_categorical import test_groupby_categorical_series_dataframe_consistent
```



---
## test_groupby_categorical_axis_1
```python
from test_categorical import test_groupby_categorical_axis_1
```



---
## test_groupby_cat_preserves_structure
```python
from test_categorical import test_groupby_cat_preserves_structure
```



---
## test_get_nonexistent_category
```python
from test_categorical import test_get_nonexistent_category
```



---
## test_series_groupby_on_2_categoricals_unobserved
```python
from test_categorical import test_series_groupby_on_2_categoricals_unobserved
```



---
## test_series_groupby_on_2_categoricals_unobserved_zeroes_or_nans
```python
from test_categorical import test_series_groupby_on_2_categoricals_unobserved_zeroes_or_nans
```



---
## test_dataframe_groupby_on_2_categoricals_when_observed_is_true
```python
from test_categorical import test_dataframe_groupby_on_2_categoricals_when_observed_is_true
```



---
## test_dataframe_groupby_on_2_categoricals_when_observed_is_false
```python
from test_categorical import test_dataframe_groupby_on_2_categoricals_when_observed_is_false
```



---
## test_series_groupby_categorical_aggregation_getitem
```python
from test_categorical import test_series_groupby_categorical_aggregation_getitem
```



---
## test_groupby_agg_categorical_columns
```python
from test_categorical import test_groupby_agg_categorical_columns
```



---
## test_groupby_agg_non_numeric
```python
from test_categorical import test_groupby_agg_non_numeric
```



---
## test_groupby_first_returned_categorical_instead_of_dataframe
```python
from test_categorical import test_groupby_first_returned_categorical_instead_of_dataframe
```



---
## test_read_only_category_no_sort
```python
from test_categorical import test_read_only_category_no_sort
```



---
## test_sorted_missing_category_values
```python
from test_categorical import test_sorted_missing_category_values
```



---
## test_agg_cython_category_not_implemented_fallback
```python
from test_categorical import test_agg_cython_category_not_implemented_fallback
```



---
## test_aggregate_categorical_with_isnan
```python
from test_categorical import test_aggregate_categorical_with_isnan
```



---
## test_categorical_transform
```python
from test_categorical import test_categorical_transform
```



---
## test_series_groupby_first_on_categorical_col_grouped_on_2_categoricals
```python
from test_categorical import test_series_groupby_first_on_categorical_col_grouped_on_2_categoricals
```



---
## test_df_groupby_first_on_categorical_col_grouped_on_2_categoricals
```python
from test_categorical import test_df_groupby_first_on_categorical_col_grouped_on_2_categoricals
```



---
## test_groupby_categorical_indices_unused_categories
```python
from test_categorical import test_groupby_categorical_indices_unused_categories
```



---
## test_groupby_last_first_preserve_categoricaldtype
```python
from test_categorical import test_groupby_last_first_preserve_categoricaldtype
```



---
## test_groupby_categorical_observed_nunique
```python
from test_categorical import test_groupby_categorical_observed_nunique
```



---
## test_groupby_categorical_aggregate_functions
```python
from test_categorical import test_groupby_categorical_aggregate_functions
```



---
## test_groupby_categorical_dropna
```python
from test_categorical import test_groupby_categorical_dropna
```



---
## test_category_order_reducer
```python
from test_categorical import test_category_order_reducer
```



---
## test_category_order_transformer
```python
from test_categorical import test_category_order_transformer
```



---
## test_category_order_head_tail
```python
from test_categorical import test_category_order_head_tail
```



---
## test_category_order_apply
```python
from test_categorical import test_category_order_apply
```



---
## test_many_categories
```python
from test_categorical import test_many_categories
```



---
## test_groupby_default_depr
```python
from test_categorical import test_groupby_default_depr
```



---
## test_agg_list
```python
from test_categorical import test_agg_list
```



---
## f
```python
from test_categorical import f
```



---
## get_stats
```python
from test_categorical import get_stats
```



---
## __name__
```python
from test_raises import __name__
```



---
## by
```python
from test_raises import by
```



---
## groupby_series
```python
from test_raises import groupby_series
```



---
## df_with_string_col
```python
from test_raises import df_with_string_col
```



---
## df_with_datetime_col
```python
from test_raises import df_with_datetime_col
```



---
## df_with_timedelta_col
```python
from test_raises import df_with_timedelta_col
```



---
## df_with_cat_col
```python
from test_raises import df_with_cat_col
```



---
## _call_and_check
```python
from test_raises import _call_and_check
```



---
## test_groupby_raises_string
```python
from test_raises import test_groupby_raises_string
```



---
## test_groupby_raises_string_udf
```python
from test_raises import test_groupby_raises_string_udf
```



---
## test_groupby_raises_string_np
```python
from test_raises import test_groupby_raises_string_np
```



---
## test_groupby_raises_datetime
```python
from test_raises import test_groupby_raises_datetime
```



---
## test_groupby_raises_datetime_udf
```python
from test_raises import test_groupby_raises_datetime_udf
```



---
## test_groupby_raises_datetime_np
```python
from test_raises import test_groupby_raises_datetime_np
```



---
## test_groupby_raises_timedelta
```python
from test_raises import test_groupby_raises_timedelta
```



---
## test_groupby_raises_category
```python
from test_raises import test_groupby_raises_category
```



---
## test_groupby_raises_category_udf
```python
from test_raises import test_groupby_raises_category_udf
```



---
## test_groupby_raises_category_np
```python
from test_raises import test_groupby_raises_category_np
```



---
## test_groupby_raises_category_on_category
```python
from test_raises import test_groupby_raises_category_on_category
```



---
## test_subsetting_columns_axis_1_raises
```python
from test_raises import test_subsetting_columns_axis_1_raises
```



---
## func
```python
from test_raises import func
```



---
## __name__
```python
from test_bin_groupby import __name__
```



---
## assert_block_lengths
```python
from test_bin_groupby import assert_block_lengths
```



---
## cumsum_max
```python
from test_bin_groupby import cumsum_max
```



---
## test_mgr_locs_updated
```python
from test_bin_groupby import test_mgr_locs_updated
```



---
## test_generate_bins
```python
from test_bin_groupby import test_generate_bins
```



---
## get_groupby_method_args
```python
from __init__ import get_groupby_method_args
```

Get required arguments for a groupby method.

When parametrizing a test over groupby methods (e.g. "sum", "mean", "fillna"),
it is often the case that arguments are required for certain methods.

Parameters
----------
name: str
    Name of the method.
obj: Series or DataFrame
    pandas object that is being grouped.

Returns
-------
A tuple of required arguments for the method.

---
## __name__
```python
from test_apply import __name__
```



---
## test_apply_func_that_appends_group_to_list_without_copy
```python
from test_apply import test_apply_func_that_appends_group_to_list_without_copy
```



---
## test_apply_index_date
```python
from test_apply import test_apply_index_date
```



---
## test_apply_index_date_object
```python
from test_apply import test_apply_index_date_object
```



---
## test_apply_trivial
```python
from test_apply import test_apply_trivial
```



---
## test_apply_trivial_fail
```python
from test_apply import test_apply_trivial_fail
```



---
## test_group_apply_once_per_group
```python
from test_apply import test_group_apply_once_per_group
```



---
## test_group_apply_once_per_group2
```python
from test_apply import test_group_apply_once_per_group2
```



---
## test_apply_fast_slow_identical
```python
from test_apply import test_apply_fast_slow_identical
```



---
## test_groupby_apply_identity_maybecopy_index_identical
```python
from test_apply import test_groupby_apply_identity_maybecopy_index_identical
```



---
## test_apply_with_mixed_dtype
```python
from test_apply import test_apply_with_mixed_dtype
```



---
## test_groupby_as_index_apply
```python
from test_apply import test_groupby_as_index_apply
```



---
## test_apply_concat_preserve_names
```python
from test_apply import test_apply_concat_preserve_names
```



---
## test_apply_series_to_frame
```python
from test_apply import test_apply_series_to_frame
```



---
## test_apply_series_yield_constant
```python
from test_apply import test_apply_series_yield_constant
```



---
## test_apply_frame_yield_constant
```python
from test_apply import test_apply_frame_yield_constant
```



---
## test_apply_frame_to_series
```python
from test_apply import test_apply_frame_to_series
```



---
## test_apply_frame_not_as_index_column_name
```python
from test_apply import test_apply_frame_not_as_index_column_name
```



---
## test_apply_frame_concat_series
```python
from test_apply import test_apply_frame_concat_series
```



---
## test_apply_transform
```python
from test_apply import test_apply_transform
```



---
## test_apply_multikey_corner
```python
from test_apply import test_apply_multikey_corner
```



---
## test_apply_chunk_view
```python
from test_apply import test_apply_chunk_view
```



---
## test_apply_no_name_column_conflict
```python
from test_apply import test_apply_no_name_column_conflict
```



---
## test_apply_typecast_fail
```python
from test_apply import test_apply_typecast_fail
```



---
## test_apply_multiindex_fail
```python
from test_apply import test_apply_multiindex_fail
```



---
## test_apply_corner
```python
from test_apply import test_apply_corner
```



---
## test_apply_without_copy
```python
from test_apply import test_apply_without_copy
```



---
## test_apply_with_duplicated_non_sorted_axis
```python
from test_apply import test_apply_with_duplicated_non_sorted_axis
```



---
## test_apply_reindex_values
```python
from test_apply import test_apply_reindex_values
```



---
## test_apply_corner_cases
```python
from test_apply import test_apply_corner_cases
```



---
## test_apply_numeric_coercion_when_datetime
```python
from test_apply import test_apply_numeric_coercion_when_datetime
```



---
## test_apply_aggregating_timedelta_and_datetime
```python
from test_apply import test_apply_aggregating_timedelta_and_datetime
```



---
## test_apply_groupby_datetimeindex
```python
from test_apply import test_apply_groupby_datetimeindex
```



---
## test_time_field_bug
```python
from test_apply import test_time_field_bug
```



---
## test_gb_apply_list_of_unequal_len_arrays
```python
from test_apply import test_gb_apply_list_of_unequal_len_arrays
```



---
## test_groupby_apply_all_none
```python
from test_apply import test_groupby_apply_all_none
```



---
## test_groupby_apply_none_first
```python
from test_apply import test_groupby_apply_none_first
```



---
## test_groupby_apply_return_empty_chunk
```python
from test_apply import test_groupby_apply_return_empty_chunk
```



---
## test_apply_with_mixed_types
```python
from test_apply import test_apply_with_mixed_types
```



---
## test_func_returns_object
```python
from test_apply import test_func_returns_object
```



---
## test_apply_datetime_issue
```python
from test_apply import test_apply_datetime_issue
```



---
## test_apply_series_return_dataframe_groups
```python
from test_apply import test_apply_series_return_dataframe_groups
```



---
## test_apply_multi_level_name
```python
from test_apply import test_apply_multi_level_name
```



---
## test_groupby_apply_datetime_result_dtypes
```python
from test_apply import test_groupby_apply_datetime_result_dtypes
```



---
## test_apply_index_has_complex_internals
```python
from test_apply import test_apply_index_has_complex_internals
```



---
## test_apply_function_returns_non_pandas_non_scalar
```python
from test_apply import test_apply_function_returns_non_pandas_non_scalar
```



---
## test_apply_function_returns_numpy_array
```python
from test_apply import test_apply_function_returns_numpy_array
```



---
## test_apply_function_index_return
```python
from test_apply import test_apply_function_index_return
```



---
## test_apply_function_with_indexing_return_column
```python
from test_apply import test_apply_function_with_indexing_return_column
```



---
## test_apply_result_type
```python
from test_apply import test_apply_result_type
```



---
## test_result_order_group_keys_false
```python
from test_apply import test_result_order_group_keys_false
```



---
## test_apply_with_timezones_aware
```python
from test_apply import test_apply_with_timezones_aware
```



---
## test_apply_is_unchanged_when_other_methods_are_called_first
```python
from test_apply import test_apply_is_unchanged_when_other_methods_are_called_first
```



---
## test_apply_with_date_in_multiindex_does_not_convert_to_timestamp
```python
from test_apply import test_apply_with_date_in_multiindex_does_not_convert_to_timestamp
```



---
## test_apply_by_cols_equals_apply_by_rows_transposed
```python
from test_apply import test_apply_by_cols_equals_apply_by_rows_transposed
```



---
## test_apply_dropna_with_indexed_same
```python
from test_apply import test_apply_dropna_with_indexed_same
```



---
## test_apply_as_index_constant_lambda
```python
from test_apply import test_apply_as_index_constant_lambda
```



---
## test_sort_index_groups
```python
from test_apply import test_sort_index_groups
```



---
## test_positional_slice_groups_datetimelike
```python
from test_apply import test_positional_slice_groups_datetimelike
```



---
## test_groupby_apply_shape_cache_safety
```python
from test_apply import test_groupby_apply_shape_cache_safety
```



---
## test_groupby_apply_to_series_name
```python
from test_apply import test_groupby_apply_to_series_name
```



---
## test_apply_na
```python
from test_apply import test_apply_na
```



---
## test_apply_empty_string_nan_coerce_bug
```python
from test_apply import test_apply_empty_string_nan_coerce_bug
```



---
## test_apply_index_key_error_bug
```python
from test_apply import test_apply_index_key_error_bug
```



---
## test_apply_nonmonotonic_float_index
```python
from test_apply import test_apply_nonmonotonic_float_index
```



---
## test_apply_str_with_args
```python
from test_apply import test_apply_str_with_args
```



---
## test_result_name_when_one_group
```python
from test_apply import test_result_name_when_one_group
```



---
## test_empty_df
```python
from test_apply import test_empty_df
```



---
## test_include_groups
```python
from test_apply import test_include_groups
```



---
## test_builtins_apply
```python
from test_apply import test_builtins_apply
```



---
## store
```python
from test_apply import store
```



---
## f_copy
```python
from test_apply import f_copy
```



---
## f_nocopy
```python
from test_apply import f_nocopy
```



---
## f_scalar
```python
from test_apply import f_scalar
```



---
## f_none
```python
from test_apply import f_none
```



---
## f_constant_df
```python
from test_apply import f_constant_df
```



---
## slow
```python
from test_apply import slow
```



---
## fast
```python
from test_apply import fast
```



---
## desc
```python
from test_apply import desc
```



---
## desc2
```python
from test_apply import desc2
```



---
## desc3
```python
from test_apply import desc3
```



---
## f
```python
from test_apply import f
```



---
## trans
```python
from test_apply import trans
```



---
## trans2
```python
from test_apply import trans2
```



---
## filt1
```python
from test_apply import filt1
```



---
## filt2
```python
from test_apply import filt2
```



---
## reindex_helper
```python
from test_apply import reindex_helper
```



---
## get_B
```python
from test_apply import get_B
```



---
## predictions
```python
from test_apply import predictions
```



---
## func_with_no_date
```python
from test_apply import func_with_no_date
```



---
## func_with_date
```python
from test_apply import func_with_date
```



---
## noddy
```python
from test_apply import noddy
```



---
## test_func
```python
from test_apply import test_func
```



---
## most_common_values
```python
from test_apply import most_common_values
```



---
## fct
```python
from test_apply import fct
```



---
## test_int
```python
from test_indexing import test_int
```



---
## test_slice
```python
from test_indexing import test_slice
```



---
## test_list
```python
from test_indexing import test_list
```



---
## test_ints
```python
from test_indexing import test_ints
```



---
## test_slices
```python
from test_indexing import test_slices
```



---
## test_mix
```python
from test_indexing import test_mix
```



---
## test_as_index
```python
from test_indexing import test_as_index
```



---
## test_doc_examples
```python
from test_indexing import test_doc_examples
```



---
## multiindex_data
```python
from test_indexing import multiindex_data
```



---
## _make_df_from_data
```python
from test_indexing import _make_df_from_data
```



---
## test_multiindex
```python
from test_indexing import test_multiindex
```



---
## test_against_head_and_tail
```python
from test_indexing import test_against_head_and_tail
```



---
## test_against_df_iloc
```python
from test_indexing import test_against_df_iloc
```



---
## test_series
```python
from test_indexing import test_series
```



---
## test_step
```python
from test_indexing import test_step
```



---
## column_group_df
```python
from test_indexing import column_group_df
```



---
## test_column_axis
```python
from test_indexing import test_column_axis
```



---
## test_columns_on_iter
```python
from test_indexing import test_columns_on_iter
```



---
## test_groupby_duplicated_columns
```python
from test_indexing import test_groupby_duplicated_columns
```



---
## test_groupby_get_nonexisting_groups
```python
from test_indexing import test_groupby_get_nonexisting_groups
```



---
## __name__
```python
from test_apply_mutate import __name__
```



---
## test_group_by_copy
```python
from test_apply_mutate import test_group_by_copy
```



---
## test_mutate_groups
```python
from test_apply_mutate import test_mutate_groups
```



---
## test_no_mutate_but_looks_like
```python
from test_apply_mutate import test_no_mutate_but_looks_like
```



---
## test_apply_function_with_indexing
```python
from test_apply_mutate import test_apply_function_with_indexing
```



---
## test_apply_mutate_columns_multiindex
```python
from test_apply_mutate import test_apply_mutate_columns_multiindex
```



---
## f_copy
```python
from test_apply_mutate import f_copy
```



---
## f_no_copy
```python
from test_apply_mutate import f_no_copy
```



---
## fn
```python
from test_apply_mutate import fn
```



---
## add_column
```python
from test_apply_mutate import add_column
```



---
## __name__
```python
from test_libgroupby import __name__
```



---
## GroupVarTestMixin
```python
from test_libgroupby import GroupVarTestMixin
```



---
## TestGroupVarFloat64
```python
from test_libgroupby import TestGroupVarFloat64
```



---
## TestGroupVarFloat32
```python
from test_libgroupby import TestGroupVarFloat32
```



---
## test_group_ohlc
```python
from test_libgroupby import test_group_ohlc
```



---
## _check_cython_group_transform_cumulative
```python
from test_libgroupby import _check_cython_group_transform_cumulative
```

Check a group transform that executes a cumulative function.

Parameters
----------
pd_op : callable
    The pandas cumulative function.
np_op : callable
    The analogous one in NumPy.
dtype : type
    The specified dtype of the data.

---
## test_cython_group_transform_cumsum
```python
from test_libgroupby import test_cython_group_transform_cumsum
```



---
## test_cython_group_transform_cumprod
```python
from test_libgroupby import test_cython_group_transform_cumprod
```



---
## test_cython_group_transform_algos
```python
from test_libgroupby import test_cython_group_transform_algos
```



---
## test_cython_group_mean_datetimelike
```python
from test_libgroupby import test_cython_group_mean_datetimelike
```



---
## test_cython_group_mean_wrong_min_count
```python
from test_libgroupby import test_cython_group_mean_wrong_min_count
```



---
## test_cython_group_mean_not_datetimelike_but_has_NaT_values
```python
from test_libgroupby import test_cython_group_mean_not_datetimelike_but_has_NaT_values
```



---
## test_cython_group_mean_Inf_at_begining_and_end
```python
from test_libgroupby import test_cython_group_mean_Inf_at_begining_and_end
```



---
## test_cython_group_sum_Inf_at_begining_and_end
```python
from test_libgroupby import test_cython_group_sum_Inf_at_begining_and_end
```



---
## test_group_var_generic_1d
```python
from test_libgroupby import test_group_var_generic_1d
```



---
## test_group_var_generic_1d_flat_labels
```python
from test_libgroupby import test_group_var_generic_1d_flat_labels
```



---
## test_group_var_generic_2d_all_finite
```python
from test_libgroupby import test_group_var_generic_2d_all_finite
```



---
## test_group_var_generic_2d_some_nan
```python
from test_libgroupby import test_group_var_generic_2d_some_nan
```



---
## test_group_var_constant
```python
from test_libgroupby import test_group_var_constant
```



---
## test_group_var_large_inputs
```python
from test_libgroupby import test_group_var_large_inputs
```



---
## _ohlc
```python
from test_libgroupby import _ohlc
```



---
## __name__
```python
from test_groupby_dropna import __name__
```



---
## test_groupby_dropna_multi_index_dataframe_nan_in_one_group
```python
from test_groupby_dropna import test_groupby_dropna_multi_index_dataframe_nan_in_one_group
```



---
## test_groupby_dropna_multi_index_dataframe_nan_in_two_groups
```python
from test_groupby_dropna import test_groupby_dropna_multi_index_dataframe_nan_in_two_groups
```



---
## test_groupby_dropna_normal_index_dataframe
```python
from test_groupby_dropna import test_groupby_dropna_normal_index_dataframe
```



---
## test_groupby_dropna_series_level
```python
from test_groupby_dropna import test_groupby_dropna_series_level
```



---
## test_groupby_dropna_series_by
```python
from test_groupby_dropna import test_groupby_dropna_series_by
```



---
## test_grouper_dropna_propagation
```python
from test_groupby_dropna import test_grouper_dropna_propagation
```



---
## test_groupby_dataframe_slice_then_transform
```python
from test_groupby_dropna import test_groupby_dataframe_slice_then_transform
```



---
## test_groupby_dropna_multi_index_dataframe_agg
```python
from test_groupby_dropna import test_groupby_dropna_multi_index_dataframe_agg
```



---
## test_groupby_dropna_datetime_like_data
```python
from test_groupby_dropna import test_groupby_dropna_datetime_like_data
```



---
## test_groupby_apply_with_dropna_for_multi_index
```python
from test_groupby_dropna import test_groupby_apply_with_dropna_for_multi_index
```



---
## test_groupby_dropna_with_multiindex_input
```python
from test_groupby_dropna import test_groupby_dropna_with_multiindex_input
```



---
## test_groupby_nan_included
```python
from test_groupby_dropna import test_groupby_nan_included
```



---
## test_groupby_drop_nan_with_multi_index
```python
from test_groupby_dropna import test_groupby_drop_nan_with_multi_index
```



---
## test_no_sort_keep_na
```python
from test_groupby_dropna import test_no_sort_keep_na
```



---
## test_null_is_null_for_dtype
```python
from test_groupby_dropna import test_null_is_null_for_dtype
```



---
## test_categorical_reducers
```python
from test_groupby_dropna import test_categorical_reducers
```



---
## test_categorical_transformers
```python
from test_groupby_dropna import test_categorical_transformers
```



---
## test_categorical_head_tail
```python
from test_groupby_dropna import test_categorical_head_tail
```



---
## test_categorical_agg
```python
from test_groupby_dropna import test_categorical_agg
```



---
## test_categorical_transform
```python
from test_groupby_dropna import test_categorical_transform
```



---
## __name__
```python
from test_groupby import __name__
```



---
## test_repr
```python
from test_groupby import test_repr
```



---
## test_groupby_std_datetimelike
```python
from test_groupby import test_groupby_std_datetimelike
```



---
## test_basic_aggregations
```python
from test_groupby import test_basic_aggregations
```



---
## test_groupby_nonobject_dtype
```python
from test_groupby import test_groupby_nonobject_dtype
```



---
## test_groupby_nonobject_dtype_mixed
```python
from test_groupby import test_groupby_nonobject_dtype_mixed
```



---
## test_inconsistent_return_type
```python
from test_groupby import test_inconsistent_return_type
```



---
## test_pass_args_kwargs
```python
from test_groupby import test_pass_args_kwargs
```



---
## test_pass_args_kwargs_duplicate_columns
```python
from test_groupby import test_pass_args_kwargs_duplicate_columns
```



---
## test_len
```python
from test_groupby import test_len
```



---
## test_len_nan_group
```python
from test_groupby import test_len_nan_group
```



---
## test_basic_regression
```python
from test_groupby import test_basic_regression
```



---
## test_with_na_groups
```python
from test_groupby import test_with_na_groups
```



---
## test_indices_concatenation_order
```python
from test_groupby import test_indices_concatenation_order
```



---
## test_attr_wrapper
```python
from test_groupby import test_attr_wrapper
```



---
## test_frame_groupby
```python
from test_groupby import test_frame_groupby
```



---
## test_frame_groupby_columns
```python
from test_groupby import test_frame_groupby_columns
```



---
## test_frame_set_name_single
```python
from test_groupby import test_frame_set_name_single
```



---
## test_multi_func
```python
from test_groupby import test_multi_func
```



---
## test_multi_key_multiple_functions
```python
from test_groupby import test_multi_key_multiple_functions
```



---
## test_frame_multi_key_function_list
```python
from test_groupby import test_frame_multi_key_function_list
```



---
## test_frame_multi_key_function_list_partial_failure
```python
from test_groupby import test_frame_multi_key_function_list_partial_failure
```



---
## test_groupby_multiple_columns
```python
from test_groupby import test_groupby_multiple_columns
```



---
## test_as_index_select_column
```python
from test_groupby import test_as_index_select_column
```



---
## test_obj_arg_get_group_deprecated
```python
from test_groupby import test_obj_arg_get_group_deprecated
```



---
## test_groupby_as_index_select_column_sum_empty_df
```python
from test_groupby import test_groupby_as_index_select_column_sum_empty_df
```



---
## test_groupby_as_index_agg
```python
from test_groupby import test_groupby_as_index_agg
```



---
## test_ops_not_as_index
```python
from test_groupby import test_ops_not_as_index
```



---
## test_as_index_series_return_frame
```python
from test_groupby import test_as_index_series_return_frame
```



---
## test_as_index_series_column_slice_raises
```python
from test_groupby import test_as_index_series_column_slice_raises
```



---
## test_groupby_as_index_cython
```python
from test_groupby import test_groupby_as_index_cython
```



---
## test_groupby_as_index_series_scalar
```python
from test_groupby import test_groupby_as_index_series_scalar
```



---
## test_groupby_as_index_corner
```python
from test_groupby import test_groupby_as_index_corner
```



---
## test_groupby_multiple_key
```python
from test_groupby import test_groupby_multiple_key
```



---
## test_groupby_multi_corner
```python
from test_groupby import test_groupby_multi_corner
```



---
## test_raises_on_nuisance
```python
from test_groupby import test_raises_on_nuisance
```



---
## test_keep_nuisance_agg
```python
from test_groupby import test_keep_nuisance_agg
```



---
## test_omit_nuisance_agg
```python
from test_groupby import test_omit_nuisance_agg
```



---
## test_raise_on_nuisance_python_single
```python
from test_groupby import test_raise_on_nuisance_python_single
```



---
## test_raise_on_nuisance_python_multiple
```python
from test_groupby import test_raise_on_nuisance_python_multiple
```



---
## test_empty_groups_corner
```python
from test_groupby import test_empty_groups_corner
```



---
## test_nonsense_func
```python
from test_groupby import test_nonsense_func
```



---
## test_wrap_aggregated_output_multindex
```python
from test_groupby import test_wrap_aggregated_output_multindex
```



---
## test_groupby_level_apply
```python
from test_groupby import test_groupby_level_apply
```



---
## test_groupby_level_mapper
```python
from test_groupby import test_groupby_level_mapper
```



---
## test_groupby_level_nonmulti
```python
from test_groupby import test_groupby_level_nonmulti
```



---
## test_groupby_complex
```python
from test_groupby import test_groupby_complex
```



---
## test_groupby_complex_mean
```python
from test_groupby import test_groupby_complex_mean
```



---
## test_groupby_complex_numbers
```python
from test_groupby import test_groupby_complex_numbers
```



---
## test_groupby_series_indexed_differently
```python
from test_groupby import test_groupby_series_indexed_differently
```



---
## test_groupby_with_hier_columns
```python
from test_groupby import test_groupby_with_hier_columns
```



---
## test_grouping_ndarray
```python
from test_groupby import test_grouping_ndarray
```



---
## test_groupby_wrong_multi_labels
```python
from test_groupby import test_groupby_wrong_multi_labels
```



---
## test_groupby_series_with_name
```python
from test_groupby import test_groupby_series_with_name
```



---
## test_seriesgroupby_name_attr
```python
from test_groupby import test_seriesgroupby_name_attr
```



---
## test_consistency_name
```python
from test_groupby import test_consistency_name
```



---
## test_groupby_name_propagation
```python
from test_groupby import test_groupby_name_propagation
```



---
## test_groupby_nonstring_columns
```python
from test_groupby import test_groupby_nonstring_columns
```



---
## test_groupby_mixed_type_columns
```python
from test_groupby import test_groupby_mixed_type_columns
```



---
## test_cython_grouper_series_bug_noncontig
```python
from test_groupby import test_cython_grouper_series_bug_noncontig
```



---
## test_series_grouper_noncontig_index
```python
from test_groupby import test_series_grouper_noncontig_index
```



---
## test_convert_objects_leave_decimal_alone
```python
from test_groupby import test_convert_objects_leave_decimal_alone
```



---
## test_groupby_dtype_inference_empty
```python
from test_groupby import test_groupby_dtype_inference_empty
```



---
## test_groupby_unit64_float_conversion
```python
from test_groupby import test_groupby_unit64_float_conversion
```



---
## test_groupby_list_infer_array_like
```python
from test_groupby import test_groupby_list_infer_array_like
```



---
## test_groupby_keys_same_size_as_index
```python
from test_groupby import test_groupby_keys_same_size_as_index
```



---
## test_groupby_one_row
```python
from test_groupby import test_groupby_one_row
```



---
## test_groupby_nat_exclude
```python
from test_groupby import test_groupby_nat_exclude
```



---
## test_groupby_two_group_keys_all_nan
```python
from test_groupby import test_groupby_two_group_keys_all_nan
```



---
## test_groupby_2d_malformed
```python
from test_groupby import test_groupby_2d_malformed
```



---
## test_int32_overflow
```python
from test_groupby import test_int32_overflow
```



---
## test_groupby_sort_multi
```python
from test_groupby import test_groupby_sort_multi
```



---
## test_dont_clobber_name_column
```python
from test_groupby import test_dont_clobber_name_column
```



---
## test_skip_group_keys
```python
from test_groupby import test_skip_group_keys
```



---
## test_no_nonsense_name
```python
from test_groupby import test_no_nonsense_name
```



---
## test_multifunc_sum_bug
```python
from test_groupby import test_multifunc_sum_bug
```



---
## test_handle_dict_return_value
```python
from test_groupby import test_handle_dict_return_value
```



---
## test_set_group_name
```python
from test_groupby import test_set_group_name
```



---
## test_group_name_available_in_inference_pass
```python
from test_groupby import test_group_name_available_in_inference_pass
```



---
## test_no_dummy_key_names
```python
from test_groupby import test_no_dummy_key_names
```



---
## test_groupby_sort_multiindex_series
```python
from test_groupby import test_groupby_sort_multiindex_series
```



---
## test_groupby_reindex_inside_function
```python
from test_groupby import test_groupby_reindex_inside_function
```



---
## test_groupby_multiindex_missing_pair
```python
from test_groupby import test_groupby_multiindex_missing_pair
```



---
## test_groupby_multiindex_not_lexsorted
```python
from test_groupby import test_groupby_multiindex_not_lexsorted
```



---
## test_index_label_overlaps_location
```python
from test_groupby import test_index_label_overlaps_location
```



---
## test_transform_doesnt_clobber_ints
```python
from test_groupby import test_transform_doesnt_clobber_ints
```



---
## test_groupby_preserves_sort
```python
from test_groupby import test_groupby_preserves_sort
```



---
## test_pivot_table_values_key_error
```python
from test_groupby import test_pivot_table_values_key_error
```



---
## test_empty_groupby
```python
from test_groupby import test_empty_groupby
```



---
## test_empty_groupby_apply_nonunique_columns
```python
from test_groupby import test_empty_groupby_apply_nonunique_columns
```



---
## test_tuple_as_grouping
```python
from test_groupby import test_tuple_as_grouping
```



---
## test_tuple_correct_keyerror
```python
from test_groupby import test_tuple_correct_keyerror
```



---
## test_groupby_agg_ohlc_non_first
```python
from test_groupby import test_groupby_agg_ohlc_non_first
```



---
## test_groupby_multiindex_nat
```python
from test_groupby import test_groupby_multiindex_nat
```



---
## test_groupby_empty_list_raises
```python
from test_groupby import test_groupby_empty_list_raises
```



---
## test_groupby_multiindex_series_keys_len_equal_group_axis
```python
from test_groupby import test_groupby_multiindex_series_keys_len_equal_group_axis
```



---
## test_groupby_groups_in_BaseGrouper
```python
from test_groupby import test_groupby_groups_in_BaseGrouper
```



---
## test_groupby_axis_1
```python
from test_groupby import test_groupby_axis_1
```



---
## test_shift_bfill_ffill_tz
```python
from test_groupby import test_shift_bfill_ffill_tz
```



---
## test_groupby_only_none_group
```python
from test_groupby import test_groupby_only_none_group
```



---
## test_groupby_duplicate_index
```python
from test_groupby import test_groupby_duplicate_index
```



---
## test_group_on_empty_multiindex
```python
from test_groupby import test_group_on_empty_multiindex
```



---
## test_groupby_crash_on_nunique
```python
from test_groupby import test_groupby_crash_on_nunique
```



---
## test_groupby_list_level
```python
from test_groupby import test_groupby_list_level
```



---
## test_groups_repr_truncates
```python
from test_groupby import test_groups_repr_truncates
```



---
## test_group_on_two_row_multiindex_returns_one_tuple_key
```python
from test_groupby import test_group_on_two_row_multiindex_returns_one_tuple_key
```



---
## test_subsetting_columns_keeps_attrs
```python
from test_groupby import test_subsetting_columns_keeps_attrs
```



---
## test_subsetting_columns_axis_1
```python
from test_groupby import test_subsetting_columns_axis_1
```



---
## test_groupby_column_index_name_lost
```python
from test_groupby import test_groupby_column_index_name_lost
```



---
## test_groupby_duplicate_columns
```python
from test_groupby import test_groupby_duplicate_columns
```



---
## test_groupby_series_with_tuple_name
```python
from test_groupby import test_groupby_series_with_tuple_name
```



---
## test_groupby_numerical_stability_sum_mean
```python
from test_groupby import test_groupby_numerical_stability_sum_mean
```



---
## test_groupby_numerical_stability_cumsum
```python
from test_groupby import test_groupby_numerical_stability_cumsum
```



---
## test_groupby_cumsum_skipna_false
```python
from test_groupby import test_groupby_cumsum_skipna_false
```



---
## test_groupby_cumsum_timedelta64
```python
from test_groupby import test_groupby_cumsum_timedelta64
```



---
## test_groupby_mean_duplicate_index
```python
from test_groupby import test_groupby_mean_duplicate_index
```



---
## test_groupby_all_nan_groups_drop
```python
from test_groupby import test_groupby_all_nan_groups_drop
```



---
## test_groupby_empty_multi_column
```python
from test_groupby import test_groupby_empty_multi_column
```



---
## test_groupby_aggregation_non_numeric_dtype
```python
from test_groupby import test_groupby_aggregation_non_numeric_dtype
```



---
## test_groupby_aggregation_multi_non_numeric_dtype
```python
from test_groupby import test_groupby_aggregation_multi_non_numeric_dtype
```



---
## test_groupby_aggregation_numeric_with_non_numeric_dtype
```python
from test_groupby import test_groupby_aggregation_numeric_with_non_numeric_dtype
```



---
## test_groupby_filtered_df_std
```python
from test_groupby import test_groupby_filtered_df_std
```



---
## test_datetime_categorical_multikey_groupby_indices
```python
from test_groupby import test_datetime_categorical_multikey_groupby_indices
```



---
## test_rolling_wrong_param_min_period
```python
from test_groupby import test_rolling_wrong_param_min_period
```



---
## test_by_column_values_with_same_starting_value
```python
from test_groupby import test_by_column_values_with_same_starting_value
```



---
## test_groupby_none_in_first_mi_level
```python
from test_groupby import test_groupby_none_in_first_mi_level
```



---
## test_groupby_none_column_name
```python
from test_groupby import test_groupby_none_column_name
```



---
## test_single_element_list_grouping
```python
from test_groupby import test_single_element_list_grouping
```



---
## test_groupby_string_dtype
```python
from test_groupby import test_groupby_string_dtype
```



---
## test_single_element_listlike_level_grouping_deprecation
```python
from test_groupby import test_single_element_listlike_level_grouping_deprecation
```



---
## test_groupby_avoid_casting_to_float
```python
from test_groupby import test_groupby_avoid_casting_to_float
```



---
## test_groupby_sum_support_mask
```python
from test_groupby import test_groupby_sum_support_mask
```



---
## test_groupby_overflow
```python
from test_groupby import test_groupby_overflow
```



---
## test_groupby_cumsum_mask
```python
from test_groupby import test_groupby_cumsum_mask
```



---
## test_groupby_index_name_in_index_content
```python
from test_groupby import test_groupby_index_name_in_index_content
```



---
## test_sum_of_booleans
```python
from test_groupby import test_sum_of_booleans
```



---
## test_groupby_method_drop_na
```python
from test_groupby import test_groupby_method_drop_na
```



---
## test_groupby_reduce_period
```python
from test_groupby import test_groupby_reduce_period
```



---
## test_obj_with_exclusions_duplicate_columns
```python
from test_groupby import test_obj_with_exclusions_duplicate_columns
```



---
## test_groupby_numeric_only_std_no_result
```python
from test_groupby import test_groupby_numeric_only_std_no_result
```



---
## test_grouping_with_categorical_interval_columns
```python
from test_groupby import test_grouping_with_categorical_interval_columns
```



---
## test_groupby_sum_on_nan_should_return_nan
```python
from test_groupby import test_groupby_sum_on_nan_should_return_nan
```



---
## test_groupby_selection_with_methods
```python
from test_groupby import test_groupby_selection_with_methods
```



---
## test_groupby_selection_other_methods
```python
from test_groupby import test_groupby_selection_other_methods
```



---
## test_groupby_with_Time_Grouper
```python
from test_groupby import test_groupby_with_Time_Grouper
```



---
## test_groupby_series_with_datetimeindex_month_name
```python
from test_groupby import test_groupby_series_with_datetimeindex_month_name
```



---
## test_depr_get_group_len_1_list_likes
```python
from test_groupby import test_depr_get_group_len_1_list_likes
```



---
## test_groupby_ngroup_with_nan
```python
from test_groupby import test_groupby_ngroup_with_nan
```



---
## test_get_group_axis_1
```python
from test_groupby import test_get_group_axis_1
```



---
## test_groupby_ffill_with_duplicated_index
```python
from test_groupby import test_groupby_ffill_with_duplicated_index
```



---
## test_decimal_na_sort
```python
from test_groupby import test_decimal_na_sort
```



---
## max_value
```python
from test_groupby import max_value
```



---
## f_0
```python
from test_groupby import f_0
```



---
## f_1
```python
from test_groupby import f_1
```



---
## f_2
```python
from test_groupby import f_2
```



---
## f_3
```python
from test_groupby import f_3
```



---
## f_4
```python
from test_groupby import f_4
```



---
## f
```python
from test_groupby import f
```



---
## f1
```python
from test_groupby import f1
```



---
## f2
```python
from test_groupby import f2
```



---
## f3
```python
from test_groupby import f3
```



---
## aggfun
```python
from test_groupby import aggfun
```



---
## summarize
```python
from test_groupby import summarize
```



---
## summarize_random_name
```python
from test_groupby import summarize_random_name
```



---
## convert_fast
```python
from test_groupby import convert_fast
```



---
## convert_force_pure
```python
from test_groupby import convert_force_pure
```



---
## _check_groupby
```python
from test_groupby import _check_groupby
```



---
## g
```python
from test_groupby import g
```



---
## freduce
```python
from test_groupby import freduce
```



---
## freducex
```python
from test_groupby import freducex
```



---
## agg_before
```python
from test_groupby import agg_before
```

Run an aggregate func on the subset of data.

---
## test_sort
```python
from test_groupby import test_sort
```



---
## get_result
```python
from test_groupby import get_result
```



---
## get_categorical_invalid_expected
```python
from test_groupby import get_categorical_invalid_expected
```



---
## _func
```python
from test_groupby import _func
```



---
## test_all_methods_categorized
```python
from test_api import test_all_methods_categorized
```



---
## test_frame_consistency
```python
from test_api import test_frame_consistency
```



---
## test_series_consistency
```python
from test_api import test_series_consistency
```



---
## __name__
```python
from test_pipe import __name__
```



---
## test_pipe
```python
from test_pipe import test_pipe
```



---
## test_pipe_args
```python
from test_pipe import test_pipe_args
```



---
## f
```python
from test_pipe import f
```



---
## square
```python
from test_pipe import square
```



---
## g
```python
from test_pipe import g
```



---
## h
```python
from test_pipe import h
```



---
## test_filter_series
```python
from test_filters import test_filter_series
```



---
## test_filter_single_column_df
```python
from test_filters import test_filter_single_column_df
```



---
## test_filter_multi_column_df
```python
from test_filters import test_filter_multi_column_df
```



---
## test_filter_mixed_df
```python
from test_filters import test_filter_mixed_df
```



---
## test_filter_out_all_groups
```python
from test_filters import test_filter_out_all_groups
```



---
## test_filter_out_no_groups
```python
from test_filters import test_filter_out_no_groups
```



---
## test_filter_out_all_groups_in_df
```python
from test_filters import test_filter_out_all_groups_in_df
```



---
## test_filter_condition_raises
```python
from test_filters import test_filter_condition_raises
```



---
## test_filter_with_axis_in_groupby
```python
from test_filters import test_filter_with_axis_in_groupby
```



---
## test_filter_bad_shapes
```python
from test_filters import test_filter_bad_shapes
```



---
## test_filter_nan_is_false
```python
from test_filters import test_filter_nan_is_false
```



---
## test_filter_pdna_is_false
```python
from test_filters import test_filter_pdna_is_false
```



---
## test_filter_against_workaround_ints
```python
from test_filters import test_filter_against_workaround_ints
```



---
## test_filter_against_workaround_floats
```python
from test_filters import test_filter_against_workaround_floats
```



---
## test_filter_against_workaround_dataframe
```python
from test_filters import test_filter_against_workaround_dataframe
```



---
## test_filter_using_len
```python
from test_filters import test_filter_using_len
```



---
## test_filter_maintains_ordering
```python
from test_filters import test_filter_maintains_ordering
```



---
## test_filter_multiple_timestamp
```python
from test_filters import test_filter_multiple_timestamp
```



---
## test_filter_and_transform_with_non_unique_int_index
```python
from test_filters import test_filter_and_transform_with_non_unique_int_index
```



---
## test_filter_and_transform_with_multiple_non_unique_int_index
```python
from test_filters import test_filter_and_transform_with_multiple_non_unique_int_index
```



---
## test_filter_and_transform_with_non_unique_float_index
```python
from test_filters import test_filter_and_transform_with_non_unique_float_index
```



---
## test_filter_and_transform_with_non_unique_timestamp_index
```python
from test_filters import test_filter_and_transform_with_non_unique_timestamp_index
```



---
## test_filter_and_transform_with_non_unique_string_index
```python
from test_filters import test_filter_and_transform_with_non_unique_string_index
```



---
## test_filter_has_access_to_grouped_cols
```python
from test_filters import test_filter_has_access_to_grouped_cols
```



---
## test_filter_enforces_scalarness
```python
from test_filters import test_filter_enforces_scalarness
```



---
## test_filter_non_bool_raises
```python
from test_filters import test_filter_non_bool_raises
```



---
## test_filter_dropna_with_empty_groups
```python
from test_filters import test_filter_dropna_with_empty_groups
```



---
## test_filter_consistent_result_before_after_agg_func
```python
from test_filters import test_filter_consistent_result_before_after_agg_func
```



---
## raise_if_sum_is_zero
```python
from test_filters import raise_if_sum_is_zero
```



---
## TestEngine
```python
from test_numba import TestEngine
```



---
## test_cython_vs_numba_frame
```python
from test_numba import test_cython_vs_numba_frame
```



---
## test_cython_vs_numba_getitem
```python
from test_numba import test_cython_vs_numba_getitem
```



---
## test_cython_vs_numba_series
```python
from test_numba import test_cython_vs_numba_series
```



---
## test_as_index_false_unsupported
```python
from test_numba import test_as_index_false_unsupported
```



---
## test_axis_1_unsupported
```python
from test_numba import test_axis_1_unsupported
```



---
## test_no_engine_doesnt_raise
```python
from test_numba import test_no_engine_doesnt_raise
```



---
## __name__
```python
from test_index_as_string import __name__
```



---
## frame
```python
from test_index_as_string import frame
```



---
## series
```python
from test_index_as_string import series
```



---
## test_grouper_index_level_as_string
```python
from test_index_as_string import test_grouper_index_level_as_string
```



---
## test_grouper_index_level_as_string_series
```python
from test_index_as_string import test_grouper_index_level_as_string_series
```



---
## __name__
```python
from test_numeric_only import __name__
```



---
## TestNumericOnly
```python
from test_numeric_only import TestNumericOnly
```



---
## test_axis1_numeric_only
```python
from test_numeric_only import test_axis1_numeric_only
```



---
## test_numeric_only
```python
from test_numeric_only import test_numeric_only
```



---
## test_deprecate_numeric_only_series
```python
from test_numeric_only import test_deprecate_numeric_only_series
```



---
## df
```python
from test_numeric_only import df
```



---
## test_averages
```python
from test_numeric_only import test_averages
```



---
## test_extrema
```python
from test_numeric_only import test_extrema
```



---
## test_first_last
```python
from test_numeric_only import test_first_last
```



---
## test_sum_cumsum
```python
from test_numeric_only import test_sum_cumsum
```



---
## test_prod_cumprod
```python
from test_numeric_only import test_prod_cumprod
```



---
## test_cummin_cummax
```python
from test_numeric_only import test_cummin_cummax
```



---
## _check
```python
from test_numeric_only import _check
```



---
## block_maker
```python
from test_internals import block_maker
```

Fixture to test both the internal new_block and pseudo-public make_block.

---
## mgr
```python
from test_internals import mgr
```



---
## assert_block_equal
```python
from test_internals import assert_block_equal
```



---
## get_numeric_mat
```python
from test_internals import get_numeric_mat
```



---
## create_block
```python
from test_internals import create_block
```

Supported typestr:

* float, f8, f4, f2
* int, i8, i4, i2, i1
* uint, u8, u4, u2, u1
* complex, c16, c8
* bool
* object, string, O
* datetime, dt, M8[ns], M8[ns, tz]
* timedelta, td, m8[ns]
* sparse (SparseArray with fill_value=0.0)
* sparse_na (SparseArray with fill_value=np.nan)
* category, category2

---
## create_single_mgr
```python
from test_internals import create_single_mgr
```



---
## create_mgr
```python
from test_internals import create_mgr
```

Construct BlockManager from string description.

String description syntax looks similar to np.matrix initializer.  It looks
like this::

    a,b,c: f8; d,e,f: i8

Rules are rather simple:

* see list of supported datatypes in `create_block` method
* components are semicolon-separated
* each component is `NAME,NAME,NAME: DTYPE_ID`
* whitespace around colons & semicolons are removed
* components with same DTYPE_ID are combined into single block
* to force multiple blocks with same dtype, use '-SUFFIX'::

    'a:f8-1; b:f8-2; c:f8-foobar'

---
## fblock
```python
from test_internals import fblock
```



---
## TestBlock
```python
from test_internals import TestBlock
```



---
## TestBlockManager
```python
from test_internals import TestBlockManager
```



---
## _as_array
```python
from test_internals import _as_array
```



---
## TestIndexing
```python
from test_internals import TestIndexing
```



---
## TestBlockPlacement
```python
from test_internals import TestBlockPlacement
```



---
## TestCanHoldElement
```python
from test_internals import TestCanHoldElement
```



---
## TestShouldStore
```python
from test_internals import TestShouldStore
```



---
## test_validate_ndim
```python
from test_internals import test_validate_ndim
```



---
## test_block_shape
```python
from test_internals import test_block_shape
```



---
## test_make_block_no_pandas_array
```python
from test_internals import test_make_block_no_pandas_array
```



---
## test_constructor
```python
from test_internals import test_constructor
```



---
## test_pickle
```python
from test_internals import test_pickle
```



---
## test_mgr_locs
```python
from test_internals import test_mgr_locs
```



---
## test_attrs
```python
from test_internals import test_attrs
```



---
## test_copy
```python
from test_internals import test_copy
```



---
## test_delete
```python
from test_internals import test_delete
```



---
## test_delete_datetimelike
```python
from test_internals import test_delete_datetimelike
```



---
## test_split
```python
from test_internals import test_split
```



---
## test_duplicate_ref_loc_failure
```python
from test_internals import test_duplicate_ref_loc_failure
```



---
## test_non_unique_pickle
```python
from test_internals import test_non_unique_pickle
```



---
## test_categorical_block_pickle
```python
from test_internals import test_categorical_block_pickle
```



---
## test_iget
```python
from test_internals import test_iget
```



---
## test_set
```python
from test_internals import test_set
```



---
## test_set_change_dtype
```python
from test_internals import test_set_change_dtype
```



---
## test_sparse
```python
from test_internals import test_sparse
```



---
## test_sparse_mixed
```python
from test_internals import test_sparse_mixed
```



---
## test_as_array_float
```python
from test_internals import test_as_array_float
```



---
## test_as_array_int_bool
```python
from test_internals import test_as_array_int_bool
```



---
## test_as_array_datetime
```python
from test_internals import test_as_array_datetime
```



---
## test_as_array_datetime_tz
```python
from test_internals import test_as_array_datetime_tz
```



---
## test_astype
```python
from test_internals import test_astype
```



---
## test_convert
```python
from test_internals import test_convert
```



---
## test_interleave
```python
from test_internals import test_interleave
```



---
## test_interleave_dtype
```python
from test_internals import test_interleave_dtype
```



---
## test_consolidate_ordering_issues
```python
from test_internals import test_consolidate_ordering_issues
```



---
## test_reindex_items
```python
from test_internals import test_reindex_items
```



---
## test_get_numeric_data
```python
from test_internals import test_get_numeric_data
```



---
## test_get_bool_data
```python
from test_internals import test_get_bool_data
```



---
## test_unicode_repr_doesnt_raise
```python
from test_internals import test_unicode_repr_doesnt_raise
```



---
## test_equals
```python
from test_internals import test_equals
```



---
## test_equals_block_order_different_dtypes
```python
from test_internals import test_equals_block_order_different_dtypes
```



---
## test_single_mgr_ctor
```python
from test_internals import test_single_mgr_ctor
```



---
## test_validate_bool_args
```python
from test_internals import test_validate_bool_args
```



---
## test_iset_split_block
```python
from test_internals import test_iset_split_block
```



---
## test_iset_split_block_values
```python
from test_internals import test_iset_split_block_values
```



---
## test_get_slice
```python
from test_internals import test_get_slice
```



---
## test_take
```python
from test_internals import test_take
```



---
## test_reindex_axis
```python
from test_internals import test_reindex_axis
```



---
## test_reindex_indexer
```python
from test_internals import test_reindex_indexer
```



---
## test_slice_len
```python
from test_internals import test_slice_len
```



---
## test_zero_step_raises
```python
from test_internals import test_zero_step_raises
```



---
## test_slice_canonize_negative_stop
```python
from test_internals import test_slice_canonize_negative_stop
```



---
## test_unbounded_slice_raises
```python
from test_internals import test_unbounded_slice_raises
```



---
## test_not_slice_like_slices
```python
from test_internals import test_not_slice_like_slices
```



---
## test_array_to_slice_conversion
```python
from test_internals import test_array_to_slice_conversion
```



---
## test_not_slice_like_arrays
```python
from test_internals import test_not_slice_like_arrays
```



---
## test_slice_iter
```python
from test_internals import test_slice_iter
```



---
## test_slice_to_array_conversion
```python
from test_internals import test_slice_to_array_conversion
```



---
## test_blockplacement_add
```python
from test_internals import test_blockplacement_add
```



---
## test_blockplacement_add_int
```python
from test_internals import test_blockplacement_add_int
```



---
## test_blockplacement_add_int_raises
```python
from test_internals import test_blockplacement_add_int_raises
```



---
## element
```python
from test_internals import element
```

Functions that take an Index and return an element that should have
blk._can_hold_element(element) for a Block with this index's dtype.

---
## test_datetime_block_can_hold_element
```python
from test_internals import test_datetime_block_can_hold_element
```



---
## test_interval_can_hold_element_emptylist
```python
from test_internals import test_interval_can_hold_element_emptylist
```



---
## test_interval_can_hold_element
```python
from test_internals import test_interval_can_hold_element
```



---
## test_period_can_hold_element_emptylist
```python
from test_internals import test_period_can_hold_element_emptylist
```



---
## test_period_can_hold_element
```python
from test_internals import test_period_can_hold_element
```



---
## check_can_hold_element
```python
from test_internals import check_can_hold_element
```



---
## check_series_setitem
```python
from test_internals import check_series_setitem
```



---
## test_should_store_categorical
```python
from test_internals import test_should_store_categorical
```



---
## _compare
```python
from test_internals import _compare
```

compare the blocks, numeric compare ==, object don't

---
## assert_slice_ok
```python
from test_internals import assert_slice_ok
```



---
## assert_take_ok
```python
from test_internals import assert_take_ok
```



---
## assert_reindex_axis_is_ok
```python
from test_internals import assert_reindex_axis_is_ok
```



---
## assert_reindex_indexer_is_ok
```python
from test_internals import assert_reindex_indexer_is_ok
```



---
## __name__
```python
from test_managers import __name__
```

Testing interaction between the different managers (BlockManager, ArrayManager)

---
## test_dataframe_creation
```python
from test_managers import test_dataframe_creation
```



---
## test_series_creation
```python
from test_managers import test_series_creation
```



---
## test_array_manager_depr_env_var
```python
from test_managers import test_array_manager_depr_env_var
```



---
## test_internals_api
```python
from test_api import test_internals_api
```



---
## test_namespace
```python
from test_api import test_namespace
```



---
## test_deprecations
```python
from test_api import test_deprecations
```



---
## test_make_block_2d_with_dti
```python
from test_api import test_make_block_2d_with_dti
```



---
## test_create_block_manager_from_blocks_deprecated
```python
from test_api import test_create_block_manager_from_blocks_deprecated
```



---
## test_compat
```python
from test_compat import test_compat
```



---
## test_invalid_numexpr_version
```python
from test_compat import test_invalid_numexpr_version
```



---
## __name__
```python
from test_eval import __name__
```



---
## engine
```python
from test_eval import engine
```



---
## parser
```python
from test_eval import parser
```



---
## _eval_single_bin
```python
from test_eval import _eval_single_bin
```



---
## lhs
```python
from test_eval import lhs
```



---
## idx_func_dict
```python
from test_eval import idx_func_dict
```



---
## TestEval
```python
from test_eval import TestEval
```



---
## TestTypeCasting
```python
from test_eval import TestTypeCasting
```



---
## should_warn
```python
from test_eval import should_warn
```



---
## TestAlignment
```python
from test_eval import TestAlignment
```



---
## TestOperations
```python
from test_eval import TestOperations
```



---
## TestMath
```python
from test_eval import TestMath
```



---
## TestScope
```python
from test_eval import TestScope
```



---
## test_invalid_engine
```python
from test_eval import test_invalid_engine
```



---
## test_numexpr_option_respected
```python
from test_eval import test_numexpr_option_respected
```



---
## test_numexpr_option_incompatible_op
```python
from test_eval import test_numexpr_option_incompatible_op
```



---
## test_invalid_parser
```python
from test_eval import test_invalid_parser
```



---
## test_disallowed_nodes
```python
from test_eval import test_disallowed_nodes
```



---
## test_syntax_error_exprs
```python
from test_eval import test_syntax_error_exprs
```



---
## test_name_error_exprs
```python
from test_eval import test_name_error_exprs
```



---
## test_invalid_local_variable_reference
```python
from test_eval import test_invalid_local_variable_reference
```



---
## test_numexpr_builtin_raises
```python
from test_eval import test_numexpr_builtin_raises
```



---
## test_bad_resolver_raises
```python
from test_eval import test_bad_resolver_raises
```



---
## test_empty_string_raises
```python
from test_eval import test_empty_string_raises
```



---
## test_more_than_one_expression_raises
```python
from test_eval import test_more_than_one_expression_raises
```



---
## test_bool_ops_fails_on_scalars
```python
from test_eval import test_bool_ops_fails_on_scalars
```



---
## test_equals_various
```python
from test_eval import test_equals_various
```



---
## test_inf
```python
from test_eval import test_inf
```



---
## test_query_token
```python
from test_eval import test_query_token
```



---
## test_negate_lt_eq_le
```python
from test_eval import test_negate_lt_eq_le
```



---
## test_eval_no_support_column_name
```python
from test_eval import test_eval_no_support_column_name
```



---
## test_set_inplace
```python
from test_eval import test_set_inplace
```



---
## TestValidate
```python
from test_eval import TestValidate
```



---
## test_complex_cmp_ops
```python
from test_eval import test_complex_cmp_ops
```



---
## test_simple_cmp_ops
```python
from test_eval import test_simple_cmp_ops
```



---
## test_compound_invert_op
```python
from test_eval import test_compound_invert_op
```



---
## test_chained_cmp_op
```python
from test_eval import test_chained_cmp_op
```



---
## test_binary_arith_ops
```python
from test_eval import test_binary_arith_ops
```



---
## test_modulus
```python
from test_eval import test_modulus
```



---
## test_floor_division
```python
from test_eval import test_floor_division
```



---
## test_pow
```python
from test_eval import test_pow
```



---
## test_check_single_invert_op
```python
from test_eval import test_check_single_invert_op
```



---
## test_frame_invert
```python
from test_eval import test_frame_invert
```



---
## test_series_invert
```python
from test_eval import test_series_invert
```



---
## test_frame_negate
```python
from test_eval import test_frame_negate
```



---
## test_series_negate
```python
from test_eval import test_series_negate
```



---
## test_frame_pos
```python
from test_eval import test_frame_pos
```



---
## test_series_pos
```python
from test_eval import test_series_pos
```



---
## test_scalar_unary
```python
from test_eval import test_scalar_unary
```



---
## test_unary_in_array
```python
from test_eval import test_unary_in_array
```



---
## test_float_comparison_bin_op
```python
from test_eval import test_float_comparison_bin_op
```



---
## test_unary_in_function
```python
from test_eval import test_unary_in_function
```



---
## test_disallow_scalar_bool_ops
```python
from test_eval import test_disallow_scalar_bool_ops
```



---
## test_identical
```python
from test_eval import test_identical
```



---
## test_line_continuation
```python
from test_eval import test_line_continuation
```



---
## test_float_truncation
```python
from test_eval import test_float_truncation
```



---
## test_disallow_python_keywords
```python
from test_eval import test_disallow_python_keywords
```



---
## test_true_false_logic
```python
from test_eval import test_true_false_logic
```



---
## test_and_logic_string_match
```python
from test_eval import test_and_logic_string_match
```



---
## test_binop_typecasting
```python
from test_eval import test_binop_typecasting
```



---
## test_align_nested_unary_op
```python
from test_eval import test_align_nested_unary_op
```



---
## test_basic_frame_alignment
```python
from test_eval import test_basic_frame_alignment
```



---
## test_frame_comparison
```python
from test_eval import test_frame_comparison
```



---
## test_medium_complex_frame_alignment
```python
from test_eval import test_medium_complex_frame_alignment
```



---
## test_basic_frame_series_alignment
```python
from test_eval import test_basic_frame_series_alignment
```



---
## test_basic_series_frame_alignment
```python
from test_eval import test_basic_series_frame_alignment
```



---
## test_series_frame_commutativity
```python
from test_eval import test_series_frame_commutativity
```



---
## test_complex_series_frame_alignment
```python
from test_eval import test_complex_series_frame_alignment
```



---
## test_performance_warning_for_poor_alignment
```python
from test_eval import test_performance_warning_for_poor_alignment
```



---
## eval
```python
from test_eval import eval
```



---
## test_simple_arith_ops
```python
from test_eval import test_simple_arith_ops
```



---
## test_simple_bool_ops
```python
from test_eval import test_simple_bool_ops
```



---
## test_bool_ops_with_constants
```python
from test_eval import test_bool_ops_with_constants
```



---
## test_4d_ndarray_fails
```python
from test_eval import test_4d_ndarray_fails
```



---
## test_constant
```python
from test_eval import test_constant
```



---
## test_single_variable
```python
from test_eval import test_single_variable
```



---
## test_failing_subscript_with_name_error
```python
from test_eval import test_failing_subscript_with_name_error
```



---
## test_lhs_expression_subscript
```python
from test_eval import test_lhs_expression_subscript
```



---
## test_attr_expression
```python
from test_eval import test_attr_expression
```



---
## test_assignment_fails
```python
from test_eval import test_assignment_fails
```



---
## test_assignment_column_multiple_raise
```python
from test_eval import test_assignment_column_multiple_raise
```



---
## test_assignment_column_invalid_assign
```python
from test_eval import test_assignment_column_invalid_assign
```



---
## test_assignment_column_invalid_assign_function_call
```python
from test_eval import test_assignment_column_invalid_assign_function_call
```



---
## test_assignment_single_assign_existing
```python
from test_eval import test_assignment_single_assign_existing
```



---
## test_assignment_single_assign_new
```python
from test_eval import test_assignment_single_assign_new
```



---
## test_assignment_single_assign_local_overlap
```python
from test_eval import test_assignment_single_assign_local_overlap
```



---
## test_assignment_single_assign_name
```python
from test_eval import test_assignment_single_assign_name
```



---
## test_assignment_multiple_raises
```python
from test_eval import test_assignment_multiple_raises
```



---
## test_assignment_explicit
```python
from test_eval import test_assignment_explicit
```



---
## test_column_in
```python
from test_eval import test_column_in
```



---
## test_assignment_not_inplace
```python
from test_eval import test_assignment_not_inplace
```



---
## test_multi_line_expression
```python
from test_eval import test_multi_line_expression
```



---
## test_multi_line_expression_not_inplace
```python
from test_eval import test_multi_line_expression_not_inplace
```



---
## test_multi_line_expression_local_variable
```python
from test_eval import test_multi_line_expression_local_variable
```



---
## test_multi_line_expression_callable_local_variable
```python
from test_eval import test_multi_line_expression_callable_local_variable
```



---
## test_multi_line_expression_callable_local_variable_with_kwargs
```python
from test_eval import test_multi_line_expression_callable_local_variable_with_kwargs
```



---
## test_assignment_in_query
```python
from test_eval import test_assignment_in_query
```



---
## test_query_inplace
```python
from test_eval import test_query_inplace
```



---
## test_cannot_item_assign
```python
from test_eval import test_cannot_item_assign
```



---
## test_cannot_copy_item
```python
from test_eval import test_cannot_copy_item
```



---
## test_inplace_no_assignment
```python
from test_eval import test_inplace_no_assignment
```



---
## test_basic_period_index_boolean_expression
```python
from test_eval import test_basic_period_index_boolean_expression
```



---
## test_basic_period_index_subscript_expression
```python
from test_eval import test_basic_period_index_subscript_expression
```



---
## test_nested_period_index_subscript_expression
```python
from test_eval import test_nested_period_index_subscript_expression
```



---
## test_date_boolean
```python
from test_eval import test_date_boolean
```



---
## test_simple_in_ops
```python
from test_eval import test_simple_in_ops
```



---
## test_check_many_exprs
```python
from test_eval import test_check_many_exprs
```



---
## test_fails_and_or_not
```python
from test_eval import test_fails_and_or_not
```



---
## test_fails_ampersand_pipe
```python
from test_eval import test_fails_ampersand_pipe
```



---
## test_unary_functions
```python
from test_eval import test_unary_functions
```



---
## test_binary_functions
```python
from test_eval import test_binary_functions
```



---
## test_df_use_case
```python
from test_eval import test_df_use_case
```



---
## test_df_arithmetic_subexpression
```python
from test_eval import test_df_arithmetic_subexpression
```



---
## test_result_types
```python
from test_eval import test_result_types
```



---
## test_undefined_func
```python
from test_eval import test_undefined_func
```



---
## test_keyword_arg
```python
from test_eval import test_keyword_arg
```



---
## test_global_scope
```python
from test_eval import test_global_scope
```



---
## test_no_new_locals
```python
from test_eval import test_no_new_locals
```



---
## test_no_new_globals
```python
from test_eval import test_no_new_globals
```



---
## test_empty_locals
```python
from test_eval import test_empty_locals
```



---
## test_empty_globals
```python
from test_eval import test_empty_globals
```



---
## test_validate_bool_args
```python
from test_eval import test_validate_bool_args
```



---
## local_func
```python
from test_eval import local_func
```



---
## __name__
```python
from test_backend import __name__
```



---
## dummy_backend
```python
from test_backend import dummy_backend
```



---
## restore_backend
```python
from test_backend import restore_backend
```

Restore the plotting backend to matplotlib

---
## test_backend_is_not_module
```python
from test_backend import test_backend_is_not_module
```



---
## test_backend_is_correct
```python
from test_backend import test_backend_is_correct
```



---
## test_backend_can_be_set_in_plot_call
```python
from test_backend import test_backend_can_be_set_in_plot_call
```



---
## test_register_entrypoint
```python
from test_backend import test_register_entrypoint
```



---
## test_setting_backend_without_plot_raises
```python
from test_backend import test_setting_backend_without_plot_raises
```



---
## test_no_matplotlib_ok
```python
from test_backend import test_no_matplotlib_ok
```



---
## test_extra_kinds_ok
```python
from test_backend import test_extra_kinds_ok
```



---
## mpl_cleanup
```python
from conftest import mpl_cleanup
```



---
## hist_df
```python
from conftest import hist_df
```



---
## TestCommon
```python
from test_common import TestCommon
```



---
## test__check_ticks_props
```python
from test_common import test__check_ticks_props
```



---
## test__gen_two_subplots_with_ax
```python
from test_common import test__gen_two_subplots_with_ax
```



---
## test_colorbar_layout
```python
from test_common import test_colorbar_layout
```



---
## iris
```python
from test_misc import iris
```

The iris dataset as a DataFrame.

---
## test_import_error_message
```python
from test_misc import test_import_error_message
```



---
## test_get_accessor_args
```python
from test_misc import test_get_accessor_args
```



---
## test_savefig
```python
from test_misc import test_savefig
```



---
## TestSeriesPlots
```python
from test_misc import TestSeriesPlots
```



---
## TestDataFramePlots
```python
from test_misc import TestDataFramePlots
```



---
## test_autocorrelation_plot
```python
from test_misc import test_autocorrelation_plot
```



---
## test_lag_plot
```python
from test_misc import test_lag_plot
```



---
## test_bootstrap_plot
```python
from test_misc import test_bootstrap_plot
```



---
## test_scatter_matrix_axis
```python
from test_misc import test_scatter_matrix_axis
```



---
## test_scatter_matrix_axis_smaller
```python
from test_misc import test_scatter_matrix_axis_smaller
```



---
## test_andrews_curves_no_warning
```python
from test_misc import test_andrews_curves_no_warning
```



---
## test_andrews_curves_linecolors
```python
from test_misc import test_andrews_curves_linecolors
```



---
## test_andrews_curves_cmap
```python
from test_misc import test_andrews_curves_cmap
```



---
## test_andrews_curves_handle
```python
from test_misc import test_andrews_curves_handle
```



---
## test_parallel_coordinates_colors
```python
from test_misc import test_parallel_coordinates_colors
```



---
## test_parallel_coordinates_cmap
```python
from test_misc import test_parallel_coordinates_cmap
```



---
## test_parallel_coordinates_line_diff
```python
from test_misc import test_parallel_coordinates_line_diff
```



---
## test_parallel_coordinates_handles
```python
from test_misc import test_parallel_coordinates_handles
```



---
## test_parallel_coordinates_with_sorted_labels
```python
from test_misc import test_parallel_coordinates_with_sorted_labels
```

For #15908

---
## test_radviz_no_warning
```python
from test_misc import test_radviz_no_warning
```



---
## test_radviz_color
```python
from test_misc import test_radviz_color
```



---
## test_radviz_color_cmap
```python
from test_misc import test_radviz_color_cmap
```



---
## test_radviz_colors_handles
```python
from test_misc import test_radviz_colors_handles
```



---
## test_subplot_titles
```python
from test_misc import test_subplot_titles
```



---
## test_subplot_titles_too_much
```python
from test_misc import test_subplot_titles_too_much
```



---
## test_subplot_titles_too_little
```python
from test_misc import test_subplot_titles_too_little
```



---
## test_subplot_titles_subplots_false
```python
from test_misc import test_subplot_titles_subplots_false
```



---
## test_subplot_titles_numeric_square_layout
```python
from test_misc import test_subplot_titles_numeric_square_layout
```



---
## test_get_standard_colors_random_seed
```python
from test_misc import test_get_standard_colors_random_seed
```



---
## test_get_standard_colors_consistency
```python
from test_misc import test_get_standard_colors_consistency
```



---
## test_get_standard_colors_default_num_colors
```python
from test_misc import test_get_standard_colors_default_num_colors
```



---
## test_plot_single_color
```python
from test_misc import test_plot_single_color
```



---
## test_get_standard_colors_no_appending
```python
from test_misc import test_get_standard_colors_no_appending
```



---
## test_dictionary_color
```python
from test_misc import test_dictionary_color
```



---
## test_bar_plot
```python
from test_misc import test_bar_plot
```



---
## test_barh_plot_labels_mixed_integer_string
```python
from test_misc import test_barh_plot_labels_mixed_integer_string
```



---
## test_has_externally_shared_axis_x_axis
```python
from test_misc import test_has_externally_shared_axis_x_axis
```



---
## test_has_externally_shared_axis_y_axis
```python
from test_misc import test_has_externally_shared_axis_y_axis
```



---
## test_has_externally_shared_axis_invalid_compare_axis
```python
from test_misc import test_has_externally_shared_axis_invalid_compare_axis
```



---
## test_externally_shared_axes
```python
from test_misc import test_externally_shared_axes
```



---
## test_plot_bar_axis_units_timestamp_conversion
```python
from test_misc import test_plot_bar_axis_units_timestamp_conversion
```



---
## test_bar_plt_xaxis_intervalrange
```python
from test_misc import test_bar_plt_xaxis_intervalrange
```



---
## __name__
```python
from test_boxplot_method import __name__
```

Test cases for .boxplot method 

---
## _check_ax_limits
```python
from test_boxplot_method import _check_ax_limits
```



---
## TestDataFramePlots
```python
from test_boxplot_method import TestDataFramePlots
```



---
## TestDataFrameGroupByPlots
```python
from test_boxplot_method import TestDataFrameGroupByPlots
```



---
## test_stacked_boxplot_set_axis
```python
from test_boxplot_method import test_stacked_boxplot_set_axis
```



---
## test_boxplot_legacy1
```python
from test_boxplot_method import test_boxplot_legacy1
```



---
## test_boxplot_legacy1_series
```python
from test_boxplot_method import test_boxplot_legacy1_series
```



---
## test_boxplot_legacy2
```python
from test_boxplot_method import test_boxplot_legacy2
```



---
## test_boxplot_legacy2_with_ax
```python
from test_boxplot_method import test_boxplot_legacy2_with_ax
```



---
## test_boxplot_legacy2_with_ax_return_type
```python
from test_boxplot_method import test_boxplot_legacy2_with_ax_return_type
```



---
## test_boxplot_legacy2_with_multi_col
```python
from test_boxplot_method import test_boxplot_legacy2_with_multi_col
```



---
## test_boxplot_legacy2_by_none
```python
from test_boxplot_method import test_boxplot_legacy2_by_none
```



---
## test_boxplot_return_type_none
```python
from test_boxplot_method import test_boxplot_return_type_none
```



---
## test_boxplot_return_type_legacy
```python
from test_boxplot_method import test_boxplot_return_type_legacy
```



---
## test_boxplot_return_type_legacy_return_type
```python
from test_boxplot_method import test_boxplot_return_type_legacy_return_type
```



---
## test_boxplot_axis_limits
```python
from test_boxplot_method import test_boxplot_axis_limits
```



---
## test_boxplot_axis_limits_two_rows
```python
from test_boxplot_method import test_boxplot_axis_limits_two_rows
```



---
## test_boxplot_empty_column
```python
from test_boxplot_method import test_boxplot_empty_column
```



---
## test_figsize
```python
from test_boxplot_method import test_figsize
```



---
## test_fontsize
```python
from test_boxplot_method import test_fontsize
```



---
## test_boxplot_numeric_data
```python
from test_boxplot_method import test_boxplot_numeric_data
```



---
## test_color_kwd
```python
from test_boxplot_method import test_color_kwd
```



---
## test_colors_in_theme
```python
from test_boxplot_method import test_colors_in_theme
```



---
## test_color_kwd_errors
```python
from test_boxplot_method import test_color_kwd_errors
```



---
## test_specified_props_kwd
```python
from test_boxplot_method import test_specified_props_kwd
```



---
## test_plot_xlabel_ylabel
```python
from test_boxplot_method import test_plot_xlabel_ylabel
```



---
## test_plot_box
```python
from test_boxplot_method import test_plot_box
```



---
## test_boxplot_xlabel_ylabel
```python
from test_boxplot_method import test_boxplot_xlabel_ylabel
```



---
## test_boxplot_group_xlabel_ylabel
```python
from test_boxplot_method import test_boxplot_group_xlabel_ylabel
```



---
## test_boxplot_group_no_xlabel_ylabel
```python
from test_boxplot_method import test_boxplot_group_no_xlabel_ylabel
```



---
## test_boxplot_legacy1_return_type
```python
from test_boxplot_method import test_boxplot_legacy1_return_type
```



---
## test_boxplot_legacy2_return_type
```python
from test_boxplot_method import test_boxplot_legacy2_return_type
```



---
## test_boxplot_legacy3
```python
from test_boxplot_method import test_boxplot_legacy3
```



---
## test_grouped_plot_fignums
```python
from test_boxplot_method import test_grouped_plot_fignums
```



---
## test_grouped_plot_fignums_excluded_col
```python
from test_boxplot_method import test_grouped_plot_fignums_excluded_col
```



---
## test_grouped_box_return_type
```python
from test_boxplot_method import test_grouped_box_return_type
```



---
## test_grouped_box_return_type_groupby
```python
from test_boxplot_method import test_grouped_box_return_type_groupby
```



---
## test_grouped_box_return_type_arg
```python
from test_boxplot_method import test_grouped_box_return_type_arg
```



---
## test_grouped_box_return_type_arg_duplcate_cats
```python
from test_boxplot_method import test_grouped_box_return_type_arg_duplcate_cats
```



---
## test_grouped_box_layout_too_small
```python
from test_boxplot_method import test_grouped_box_layout_too_small
```



---
## test_grouped_box_layout_needs_by
```python
from test_boxplot_method import test_grouped_box_layout_needs_by
```



---
## test_grouped_box_layout_positive_layout
```python
from test_boxplot_method import test_grouped_box_layout_positive_layout
```



---
## test_grouped_box_layout_positive_layout_axes
```python
from test_boxplot_method import test_grouped_box_layout_positive_layout_axes
```



---
## test_grouped_box_layout_visible
```python
from test_boxplot_method import test_grouped_box_layout_visible
```



---
## test_grouped_box_layout_shape
```python
from test_boxplot_method import test_grouped_box_layout_shape
```



---
## test_grouped_box_layout_works
```python
from test_boxplot_method import test_grouped_box_layout_works
```



---
## test_grouped_box_layout_axes_shape_rows
```python
from test_boxplot_method import test_grouped_box_layout_axes_shape_rows
```



---
## test_grouped_box_layout_axes_shape_cols_groupby
```python
from test_boxplot_method import test_grouped_box_layout_axes_shape_cols_groupby
```



---
## test_grouped_box_multiple_axes
```python
from test_boxplot_method import test_grouped_box_multiple_axes
```



---
## test_grouped_box_multiple_axes_on_fig
```python
from test_boxplot_method import test_grouped_box_multiple_axes_on_fig
```



---
## test_grouped_box_multiple_axes_ax_error
```python
from test_boxplot_method import test_grouped_box_multiple_axes_ax_error
```



---
## test_groupby_boxplot_subplots_false
```python
from test_boxplot_method import test_groupby_boxplot_subplots_false
```



---
## test_groupby_boxplot_object
```python
from test_boxplot_method import test_groupby_boxplot_object
```



---
## test_boxplot_multiindex_column
```python
from test_boxplot_method import test_boxplot_multiindex_column
```



---
## __name__
```python
from test_datetimelike import __name__
```

generic datetimelike tests 

---
## TestTSPlot
```python
from test_datetimelike import TestTSPlot
```



---
## _check_plot_works
```python
from test_datetimelike import _check_plot_works
```



---
## test_ts_plot_with_tz
```python
from test_datetimelike import test_ts_plot_with_tz
```



---
## test_fontsize_set_correctly
```python
from test_datetimelike import test_fontsize_set_correctly
```



---
## test_frame_inferred
```python
from test_datetimelike import test_frame_inferred
```



---
## test_frame_inferred_n_gt_1
```python
from test_datetimelike import test_frame_inferred_n_gt_1
```



---
## test_is_error_nozeroindex
```python
from test_datetimelike import test_is_error_nozeroindex
```



---
## test_nonnumeric_exclude
```python
from test_datetimelike import test_nonnumeric_exclude
```



---
## test_nonnumeric_exclude_error
```python
from test_datetimelike import test_nonnumeric_exclude_error
```



---
## test_tsplot_period
```python
from test_datetimelike import test_tsplot_period
```



---
## test_tsplot_datetime
```python
from test_datetimelike import test_tsplot_datetime
```



---
## test_tsplot
```python
from test_datetimelike import test_tsplot
```



---
## test_both_style_and_color
```python
from test_datetimelike import test_both_style_and_color
```



---
## test_high_freq
```python
from test_datetimelike import test_high_freq
```



---
## test_get_datevalue
```python
from test_datetimelike import test_get_datevalue
```



---
## test_ts_plot_format_coord
```python
from test_datetimelike import test_ts_plot_format_coord
```



---
## test_line_plot_period_series
```python
from test_datetimelike import test_line_plot_period_series
```



---
## test_line_plot_period_mlt_series
```python
from test_datetimelike import test_line_plot_period_mlt_series
```



---
## test_line_plot_datetime_series
```python
from test_datetimelike import test_line_plot_datetime_series
```



---
## test_line_plot_period_frame
```python
from test_datetimelike import test_line_plot_period_frame
```



---
## test_line_plot_period_mlt_frame
```python
from test_datetimelike import test_line_plot_period_mlt_frame
```



---
## test_line_plot_datetime_frame
```python
from test_datetimelike import test_line_plot_datetime_frame
```



---
## test_line_plot_inferred_freq
```python
from test_datetimelike import test_line_plot_inferred_freq
```



---
## test_fake_inferred_business
```python
from test_datetimelike import test_fake_inferred_business
```



---
## test_plot_offset_freq
```python
from test_datetimelike import test_plot_offset_freq
```



---
## test_plot_offset_freq_business
```python
from test_datetimelike import test_plot_offset_freq_business
```



---
## test_plot_multiple_inferred_freq
```python
from test_datetimelike import test_plot_multiple_inferred_freq
```



---
## test_uhf
```python
from test_datetimelike import test_uhf
```



---
## test_irreg_hf
```python
from test_datetimelike import test_irreg_hf
```



---
## test_irreg_hf_object
```python
from test_datetimelike import test_irreg_hf_object
```



---
## test_irregular_datetime64_repr_bug
```python
from test_datetimelike import test_irregular_datetime64_repr_bug
```



---
## test_business_freq
```python
from test_datetimelike import test_business_freq
```



---
## test_business_freq_convert
```python
from test_datetimelike import test_business_freq_convert
```



---
## test_freq_with_no_period_alias
```python
from test_datetimelike import test_freq_with_no_period_alias
```



---
## test_nonzero_base
```python
from test_datetimelike import test_nonzero_base
```



---
## test_dataframe
```python
from test_datetimelike import test_dataframe
```



---
## test_axis_limits
```python
from test_datetimelike import test_axis_limits
```



---
## test_get_finder
```python
from test_datetimelike import test_get_finder
```



---
## test_finder_daily
```python
from test_datetimelike import test_finder_daily
```



---
## test_finder_quarterly
```python
from test_datetimelike import test_finder_quarterly
```



---
## test_finder_monthly
```python
from test_datetimelike import test_finder_monthly
```



---
## test_finder_monthly_long
```python
from test_datetimelike import test_finder_monthly_long
```



---
## test_finder_annual
```python
from test_datetimelike import test_finder_annual
```



---
## test_finder_minutely
```python
from test_datetimelike import test_finder_minutely
```



---
## test_finder_hourly
```python
from test_datetimelike import test_finder_hourly
```



---
## test_gaps
```python
from test_datetimelike import test_gaps
```



---
## test_gaps_irregular
```python
from test_datetimelike import test_gaps_irregular
```



---
## test_gaps_non_ts
```python
from test_datetimelike import test_gaps_non_ts
```



---
## test_gap_upsample
```python
from test_datetimelike import test_gap_upsample
```



---
## test_secondary_y
```python
from test_datetimelike import test_secondary_y
```



---
## test_secondary_y_yaxis
```python
from test_datetimelike import test_secondary_y_yaxis
```



---
## test_secondary_both
```python
from test_datetimelike import test_secondary_both
```



---
## test_secondary_y_ts
```python
from test_datetimelike import test_secondary_y_ts
```



---
## test_secondary_y_ts_yaxis
```python
from test_datetimelike import test_secondary_y_ts_yaxis
```



---
## test_secondary_y_ts_visible
```python
from test_datetimelike import test_secondary_y_ts_visible
```



---
## test_secondary_kde
```python
from test_datetimelike import test_secondary_kde
```



---
## test_secondary_bar
```python
from test_datetimelike import test_secondary_bar
```



---
## test_secondary_frame
```python
from test_datetimelike import test_secondary_frame
```



---
## test_secondary_bar_frame
```python
from test_datetimelike import test_secondary_bar_frame
```



---
## test_mixed_freq_regular_first
```python
from test_datetimelike import test_mixed_freq_regular_first
```



---
## test_mixed_freq_irregular_first
```python
from test_datetimelike import test_mixed_freq_irregular_first
```



---
## test_mixed_freq_regular_first_df
```python
from test_datetimelike import test_mixed_freq_regular_first_df
```



---
## test_mixed_freq_irregular_first_df
```python
from test_datetimelike import test_mixed_freq_irregular_first_df
```



---
## test_mixed_freq_hf_first
```python
from test_datetimelike import test_mixed_freq_hf_first
```



---
## test_mixed_freq_alignment
```python
from test_datetimelike import test_mixed_freq_alignment
```



---
## test_mixed_freq_lf_first
```python
from test_datetimelike import test_mixed_freq_lf_first
```



---
## test_mixed_freq_lf_first_hourly
```python
from test_datetimelike import test_mixed_freq_lf_first_hourly
```



---
## test_mixed_freq_irreg_period
```python
from test_datetimelike import test_mixed_freq_irreg_period
```



---
## test_mixed_freq_shared_ax
```python
from test_datetimelike import test_mixed_freq_shared_ax
```



---
## test_mixed_freq_shared_ax_twin_x
```python
from test_datetimelike import test_mixed_freq_shared_ax_twin_x
```



---
## test_mixed_freq_shared_ax_twin_x_irregular_first
```python
from test_datetimelike import test_mixed_freq_shared_ax_twin_x_irregular_first
```



---
## test_nat_handling
```python
from test_datetimelike import test_nat_handling
```



---
## test_to_weekly_resampling_disallow_how_kwd
```python
from test_datetimelike import test_to_weekly_resampling_disallow_how_kwd
```



---
## test_to_weekly_resampling
```python
from test_datetimelike import test_to_weekly_resampling
```



---
## test_from_weekly_resampling
```python
from test_datetimelike import test_from_weekly_resampling
```



---
## test_from_resampling_area_line_mixed
```python
from test_datetimelike import test_from_resampling_area_line_mixed
```



---
## test_from_resampling_area_line_mixed_high_to_low
```python
from test_datetimelike import test_from_resampling_area_line_mixed_high_to_low
```



---
## test_mixed_freq_second_millisecond
```python
from test_datetimelike import test_mixed_freq_second_millisecond
```



---
## test_mixed_freq_second_millisecond_low_to_high
```python
from test_datetimelike import test_mixed_freq_second_millisecond_low_to_high
```



---
## test_irreg_dtypes
```python
from test_datetimelike import test_irreg_dtypes
```



---
## test_irreg_dtypes_dt64
```python
from test_datetimelike import test_irreg_dtypes_dt64
```



---
## test_time
```python
from test_datetimelike import test_time
```



---
## test_time_change_xlim
```python
from test_datetimelike import test_time_change_xlim
```



---
## test_time_musec
```python
from test_datetimelike import test_time_musec
```



---
## test_secondary_upsample
```python
from test_datetimelike import test_secondary_upsample
```



---
## test_secondary_legend
```python
from test_datetimelike import test_secondary_legend
```



---
## test_secondary_legend_right
```python
from test_datetimelike import test_secondary_legend_right
```



---
## test_secondary_legend_bar
```python
from test_datetimelike import test_secondary_legend_bar
```



---
## test_secondary_legend_bar_right
```python
from test_datetimelike import test_secondary_legend_bar_right
```



---
## test_secondary_legend_multi_col
```python
from test_datetimelike import test_secondary_legend_multi_col
```



---
## test_secondary_legend_nonts
```python
from test_datetimelike import test_secondary_legend_nonts
```



---
## test_secondary_legend_nonts_multi_col
```python
from test_datetimelike import test_secondary_legend_nonts_multi_col
```



---
## test_format_date_axis
```python
from test_datetimelike import test_format_date_axis
```



---
## test_ax_plot
```python
from test_datetimelike import test_ax_plot
```



---
## test_mpl_nopandas
```python
from test_datetimelike import test_mpl_nopandas
```



---
## test_irregular_ts_shared_ax_xlim
```python
from test_datetimelike import test_irregular_ts_shared_ax_xlim
```



---
## test_secondary_y_non_ts_xlim
```python
from test_datetimelike import test_secondary_y_non_ts_xlim
```



---
## test_secondary_y_regular_ts_xlim
```python
from test_datetimelike import test_secondary_y_regular_ts_xlim
```



---
## test_secondary_y_mixed_freq_ts_xlim
```python
from test_datetimelike import test_secondary_y_mixed_freq_ts_xlim
```



---
## test_secondary_y_irregular_ts_xlim
```python
from test_datetimelike import test_secondary_y_irregular_ts_xlim
```



---
## test_plot_outofbounds_datetime
```python
from test_datetimelike import test_plot_outofbounds_datetime
```



---
## test_format_timedelta_ticks_narrow
```python
from test_datetimelike import test_format_timedelta_ticks_narrow
```



---
## test_format_timedelta_ticks_wide
```python
from test_datetimelike import test_format_timedelta_ticks_wide
```



---
## test_timedelta_plot
```python
from test_datetimelike import test_timedelta_plot
```



---
## test_timedelta_long_period
```python
from test_datetimelike import test_timedelta_long_period
```



---
## test_timedelta_short_period
```python
from test_datetimelike import test_timedelta_short_period
```



---
## test_hist
```python
from test_datetimelike import test_hist
```



---
## test_overlapping_datetime
```python
from test_datetimelike import test_overlapping_datetime
```



---
## test_add_matplotlib_datetime64
```python
from test_datetimelike import test_add_matplotlib_datetime64
```



---
## test_matplotlib_scatter_datetime64
```python
from test_datetimelike import test_matplotlib_scatter_datetime64
```



---
## test_check_xticks_rot
```python
from test_datetimelike import test_check_xticks_rot
```



---
## test_check_xticks_rot_irregular
```python
from test_datetimelike import test_check_xticks_rot_irregular
```



---
## test_check_xticks_rot_use_idx
```python
from test_datetimelike import test_check_xticks_rot_use_idx
```



---
## test_check_xticks_rot_sharex
```python
from test_datetimelike import test_check_xticks_rot_sharex
```



---
## check_format_of_first_point
```python
from test_datetimelike import check_format_of_first_point
```



---
## __name__
```python
from test_hist_method import __name__
```

Test cases for .hist method 

---
## ts
```python
from test_hist_method import ts
```



---
## TestSeriesPlots
```python
from test_hist_method import TestSeriesPlots
```



---
## TestDataFramePlots
```python
from test_hist_method import TestDataFramePlots
```



---
## TestDataFrameGroupByPlots
```python
from test_hist_method import TestDataFrameGroupByPlots
```



---
## test_hist_legacy_kwargs
```python
from test_hist_method import test_hist_legacy_kwargs
```



---
## test_hist_legacy_kwargs_warning
```python
from test_hist_method import test_hist_legacy_kwargs_warning
```



---
## test_hist_legacy_ax
```python
from test_hist_method import test_hist_legacy_ax
```



---
## test_hist_legacy_ax_and_fig
```python
from test_hist_method import test_hist_legacy_ax_and_fig
```



---
## test_hist_legacy_fig
```python
from test_hist_method import test_hist_legacy_fig
```



---
## test_hist_legacy_multi_ax
```python
from test_hist_method import test_hist_legacy_multi_ax
```



---
## test_hist_legacy_by_fig_error
```python
from test_hist_method import test_hist_legacy_by_fig_error
```



---
## test_hist_bins_legacy
```python
from test_hist_method import test_hist_bins_legacy
```



---
## test_hist_layout
```python
from test_hist_method import test_hist_layout
```



---
## test_hist_layout_with_by
```python
from test_hist_method import test_hist_layout_with_by
```



---
## test_hist_layout_with_by_shape
```python
from test_hist_method import test_hist_layout_with_by_shape
```



---
## test_hist_no_overlap
```python
from test_hist_method import test_hist_no_overlap
```



---
## test_hist_by_no_extra_plots
```python
from test_hist_method import test_hist_by_no_extra_plots
```



---
## test_plot_fails_when_ax_differs_from_figure
```python
from test_hist_method import test_plot_fails_when_ax_differs_from_figure
```



---
## test_histtype_argument
```python
from test_hist_method import test_histtype_argument
```



---
## test_hist_with_legend
```python
from test_hist_method import test_hist_with_legend
```



---
## test_hist_with_legend_raises
```python
from test_hist_method import test_hist_with_legend_raises
```



---
## test_hist_kwargs
```python
from test_hist_method import test_hist_kwargs
```



---
## test_hist_kwargs_horizontal
```python
from test_hist_method import test_hist_kwargs_horizontal
```



---
## test_hist_kwargs_align
```python
from test_hist_method import test_hist_kwargs_align
```



---
## test_hist_kde
```python
from test_hist_method import test_hist_kde
```



---
## test_hist_kde_plot_works
```python
from test_hist_method import test_hist_kde_plot_works
```



---
## test_hist_kde_density_works
```python
from test_hist_method import test_hist_kde_density_works
```



---
## test_hist_kde_logy
```python
from test_hist_method import test_hist_kde_logy
```



---
## test_hist_kde_color_bins
```python
from test_hist_method import test_hist_kde_color_bins
```



---
## test_hist_kde_color
```python
from test_hist_method import test_hist_kde_color
```



---
## test_hist_df_legacy
```python
from test_hist_method import test_hist_df_legacy
```



---
## test_hist_df_legacy_layout
```python
from test_hist_method import test_hist_df_legacy_layout
```



---
## test_hist_df_legacy_layout2
```python
from test_hist_method import test_hist_df_legacy_layout2
```



---
## test_hist_df_legacy_layout3
```python
from test_hist_method import test_hist_df_legacy_layout3
```



---
## test_hist_df_legacy_layout_kwargs
```python
from test_hist_method import test_hist_df_legacy_layout_kwargs
```



---
## test_hist_df_legacy_layout_labelsize_rot
```python
from test_hist_method import test_hist_df_legacy_layout_labelsize_rot
```



---
## test_hist_df_legacy_rectangles
```python
from test_hist_method import test_hist_df_legacy_rectangles
```



---
## test_hist_df_legacy_scale
```python
from test_hist_method import test_hist_df_legacy_scale
```



---
## test_hist_df_legacy_external_error
```python
from test_hist_method import test_hist_df_legacy_external_error
```



---
## test_hist_non_numerical_or_datetime_raises
```python
from test_hist_method import test_hist_non_numerical_or_datetime_raises
```



---
## test_hist_layout_error
```python
from test_hist_method import test_hist_layout_error
```



---
## test_tight_layout
```python
from test_hist_method import test_tight_layout
```



---
## test_hist_subplot_xrot
```python
from test_hist_method import test_hist_subplot_xrot
```



---
## test_hist_column_order_unchanged
```python
from test_hist_method import test_hist_column_order_unchanged
```



---
## test_hist_df_kwargs
```python
from test_hist_method import test_hist_df_kwargs
```



---
## test_hist_df_with_nonnumerics
```python
from test_hist_method import test_hist_df_with_nonnumerics
```



---
## test_hist_df_with_nonnumerics_no_bins
```python
from test_hist_method import test_hist_df_with_nonnumerics_no_bins
```



---
## test_hist_secondary_legend
```python
from test_hist_method import test_hist_secondary_legend
```



---
## test_hist_secondary_secondary
```python
from test_hist_method import test_hist_secondary_secondary
```



---
## test_hist_secondary_primary
```python
from test_hist_method import test_hist_secondary_primary
```



---
## test_hist_with_nans_and_weights
```python
from test_hist_method import test_hist_with_nans_and_weights
```



---
## test_grouped_hist_legacy
```python
from test_hist_method import test_grouped_hist_legacy
```



---
## test_grouped_hist_legacy_axes_shape_no_col
```python
from test_hist_method import test_grouped_hist_legacy_axes_shape_no_col
```



---
## test_grouped_hist_legacy_single_key
```python
from test_hist_method import test_grouped_hist_legacy_single_key
```



---
## test_grouped_hist_legacy_grouped_hist_kwargs
```python
from test_hist_method import test_grouped_hist_legacy_grouped_hist_kwargs
```



---
## test_grouped_hist_legacy_grouped_hist
```python
from test_hist_method import test_grouped_hist_legacy_grouped_hist
```



---
## test_grouped_hist_legacy_external_err
```python
from test_hist_method import test_grouped_hist_legacy_external_err
```



---
## test_grouped_hist_legacy_figsize_err
```python
from test_hist_method import test_grouped_hist_legacy_figsize_err
```



---
## test_grouped_hist_legacy2
```python
from test_hist_method import test_grouped_hist_legacy2
```



---
## test_grouped_hist_layout_error
```python
from test_hist_method import test_grouped_hist_layout_error
```



---
## test_grouped_hist_layout_warning
```python
from test_hist_method import test_grouped_hist_layout_warning
```



---
## test_grouped_hist_layout_figsize
```python
from test_hist_method import test_grouped_hist_layout_figsize
```



---
## test_grouped_hist_layout_by_warning
```python
from test_hist_method import test_grouped_hist_layout_by_warning
```



---
## test_grouped_hist_layout_axes
```python
from test_hist_method import test_grouped_hist_layout_axes
```



---
## test_grouped_hist_multiple_axes
```python
from test_hist_method import test_grouped_hist_multiple_axes
```



---
## test_grouped_hist_multiple_axes_no_cols
```python
from test_hist_method import test_grouped_hist_multiple_axes_no_cols
```



---
## test_grouped_hist_multiple_axes_error
```python
from test_hist_method import test_grouped_hist_multiple_axes_error
```



---
## test_axis_share_x
```python
from test_hist_method import test_axis_share_x
```



---
## test_axis_share_y
```python
from test_hist_method import test_axis_share_y
```



---
## test_axis_share_xy
```python
from test_hist_method import test_axis_share_xy
```



---
## _check_legend_labels
```python
from common import _check_legend_labels
```

Check each axes has expected legend labels

Parameters
----------
axes : matplotlib Axes object, or its list-like
labels : list-like
    expected legend labels
visible : bool
    expected legend visibility. labels are checked only when visible is
    True

---
## _check_legend_marker
```python
from common import _check_legend_marker
```

Check ax has expected legend markers

Parameters
----------
ax : matplotlib Axes object
expected_markers : list-like
    expected legend markers
visible : bool
    expected legend visibility. labels are checked only when visible is
    True

---
## _check_data
```python
from common import _check_data
```

Check each axes has identical lines

Parameters
----------
xp : matplotlib Axes object
rs : matplotlib Axes object

---
## _check_visible
```python
from common import _check_visible
```

Check each artist is visible or not

Parameters
----------
collections : matplotlib Artist or its list-like
    target Artist or its list or collection
visible : bool
    expected visibility

---
## _check_patches_all_filled
```python
from common import _check_patches_all_filled
```

Check for each artist whether it is filled or not

Parameters
----------
axes : matplotlib Axes object, or its list-like
filled : bool
    expected filling

---
## _get_colors_mapped
```python
from common import _get_colors_mapped
```



---
## _check_colors
```python
from common import _check_colors
```

Check each artist has expected line colors and face colors

Parameters
----------
collections : list-like
    list or collection of target artist
linecolors : list-like which has the same length as collections
    list of expected line colors
facecolors : list-like which has the same length as collections
    list of expected face colors
mapping : Series
    Series used for color grouping key
    used for andrew_curves, parallel_coordinates, radviz test

---
## _check_text_labels
```python
from common import _check_text_labels
```

Check each text has expected labels

Parameters
----------
texts : matplotlib Text object, or its list-like
    target text, or its list
expected : str or list-like which has the same length as texts
    expected text label, or its list

---
## _check_ticks_props
```python
from common import _check_ticks_props
```

Check each axes has expected tick properties

Parameters
----------
axes : matplotlib Axes object, or its list-like
xlabelsize : number
    expected xticks font size
xrot : number
    expected xticks rotation
ylabelsize : number
    expected yticks font size
yrot : number
    expected yticks rotation

---
## _check_ax_scales
```python
from common import _check_ax_scales
```

Check each axes has expected scales

Parameters
----------
axes : matplotlib Axes object, or its list-like
xaxis : {'linear', 'log'}
    expected xaxis scale
yaxis : {'linear', 'log'}
    expected yaxis scale

---
## _check_axes_shape
```python
from common import _check_axes_shape
```

Check expected number of axes is drawn in expected layout

Parameters
----------
axes : matplotlib Axes object, or its list-like
axes_num : number
    expected number of axes. Unnecessary axes should be set to
    invisible.
layout : tuple
    expected layout, (expected number of rows , columns)
figsize : tuple
    expected figsize. default is matplotlib default

---
## _flatten_visible
```python
from common import _flatten_visible
```

Flatten axes, and filter only visible

Parameters
----------
axes : matplotlib Axes object, or its list-like

---
## _check_has_errorbars
```python
from common import _check_has_errorbars
```

Check axes has expected number of errorbars

Parameters
----------
axes : matplotlib Axes object, or its list-like
xerr : number
    expected number of x errorbar
yerr : number
    expected number of y errorbar

---
## _check_box_return_type
```python
from common import _check_box_return_type
```

Check box returned type is correct

Parameters
----------
returned : object to be tested, returned from boxplot
return_type : str
    return_type passed to boxplot
expected_keys : list-like, optional
    group labels in subplot case. If not passed,
    the function checks assuming boxplot uses single ax
check_ax_title : bool
    Whether to check the ax.title is the same as expected_key
    Intended to be checked by calling from ``boxplot``.
    Normal ``plot`` doesn't attach ``ax.title``, it must be disabled.

---
## _check_grid_settings
```python
from common import _check_grid_settings
```



---
## _unpack_cycler
```python
from common import _unpack_cycler
```

Auxiliary function for correctly unpacking cycler after MPL >= 1.5

---
## get_x_axis
```python
from common import get_x_axis
```



---
## get_y_axis
```python
from common import get_y_axis
```



---
## _check_plot_works
```python
from common import _check_plot_works
```

Create plot and ensure that plot return object is valid.

Parameters
----------
f : func
    Plotting function.
default_axes : bool, optional
    If False (default):
        - If `ax` not in `kwargs`, then create subplot(211) and plot there
        - Create new subplot(212) and plot there as well
        - Mind special corner case for bootstrap_plot (see `_gen_two_subplots`)
    If True:
        - Simply run plotting function with kwargs provided
        - All required axes instances will be created automatically
        - It is recommended to use it when the plotting function
        creates multiple axes itself. It helps avoid warnings like
        'UserWarning: To output multiple subplots,
        the figure containing the passed axes is being cleared'
**kwargs
    Keyword arguments passed to the plotting function.

Returns
-------
Plot object returned by the last plotting.

---
## _gen_default_plot
```python
from common import _gen_default_plot
```

Create plot in a default way.

---
## _gen_two_subplots
```python
from common import _gen_two_subplots
```

Create plot on two subplots forcefully created.

---
## is_grid_on
```python
from common import is_grid_on
```



---
## TestGetStandardColors
```python
from test_style import TestGetStandardColors
```



---
## test_default_colors_named_from_prop_cycle
```python
from test_style import test_default_colors_named_from_prop_cycle
```



---
## test_default_colors_named_from_prop_cycle_string
```python
from test_style import test_default_colors_named_from_prop_cycle_string
```



---
## test_default_colors_named_undefined_prop_cycle
```python
from test_style import test_default_colors_named_undefined_prop_cycle
```



---
## test_user_input_color_sequence
```python
from test_style import test_user_input_color_sequence
```



---
## test_user_input_color_string
```python
from test_style import test_user_input_color_string
```



---
## test_user_input_color_floats
```python
from test_style import test_user_input_color_floats
```



---
## test_user_input_named_color_string
```python
from test_style import test_user_input_named_color_string
```



---
## test_empty_color_raises
```python
from test_style import test_empty_color_raises
```



---
## test_bad_color_raises
```python
from test_style import test_bad_color_raises
```



---
## TestDataFrameGroupByPlots
```python
from test_groupby import TestDataFrameGroupByPlots
```



---
## test_series_groupby_plotting_nominally_works
```python
from test_groupby import test_series_groupby_plotting_nominally_works
```



---
## test_series_groupby_plotting_nominally_works_hist
```python
from test_groupby import test_series_groupby_plotting_nominally_works_hist
```



---
## test_series_groupby_plotting_nominally_works_alpha
```python
from test_groupby import test_series_groupby_plotting_nominally_works_alpha
```



---
## test_plotting_with_float_index_works
```python
from test_groupby import test_plotting_with_float_index_works
```



---
## test_plotting_with_float_index_works_apply
```python
from test_groupby import test_plotting_with_float_index_works_apply
```



---
## test_hist_single_row
```python
from test_groupby import test_hist_single_row
```



---
## test_hist_single_row_single_bycol
```python
from test_groupby import test_hist_single_row_single_bycol
```



---
## test_plot_submethod_works
```python
from test_groupby import test_plot_submethod_works
```



---
## test_plot_submethod_works_line
```python
from test_groupby import test_plot_submethod_works_line
```



---
## test_plot_kwargs
```python
from test_groupby import test_plot_kwargs
```



---
## test_plot_kwargs_scatter
```python
from test_groupby import test_plot_kwargs_scatter
```



---
## test_groupby_hist_frame_with_legend
```python
from test_groupby import test_groupby_hist_frame_with_legend
```



---
## test_groupby_hist_frame_with_legend_raises
```python
from test_groupby import test_groupby_hist_frame_with_legend_raises
```



---
## test_groupby_hist_series_with_legend
```python
from test_groupby import test_groupby_hist_series_with_legend
```



---
## test_groupby_hist_series_with_legend_raises
```python
from test_groupby import test_groupby_hist_series_with_legend_raises
```



---
## __name__
```python
from test_converter import __name__
```



---
## test_registry_mpl_resets
```python
from test_converter import test_registry_mpl_resets
```



---
## test_timtetonum_accepts_unicode
```python
from test_converter import test_timtetonum_accepts_unicode
```



---
## TestRegistration
```python
from test_converter import TestRegistration
```



---
## TestDateTimeConverter
```python
from test_converter import TestDateTimeConverter
```



---
## TestPeriodConverter
```python
from test_converter import TestPeriodConverter
```



---
## TestTimeDeltaConverter
```python
from test_converter import TestTimeDeltaConverter
```

Test timedelta converter

---
## test_quarterly_finder
```python
from test_converter import test_quarterly_finder
```



---
## test_dont_register_by_default
```python
from test_converter import test_dont_register_by_default
```



---
## test_registering_no_warning
```python
from test_converter import test_registering_no_warning
```



---
## test_pandas_plots_register
```python
from test_converter import test_pandas_plots_register
```



---
## test_matplotlib_formatters
```python
from test_converter import test_matplotlib_formatters
```



---
## test_option_no_warning
```python
from test_converter import test_option_no_warning
```



---
## test_registry_resets
```python
from test_converter import test_registry_resets
```



---
## dtc
```python
from test_converter import dtc
```



---
## test_convert_accepts_unicode
```python
from test_converter import test_convert_accepts_unicode
```



---
## test_conversion
```python
from test_converter import test_conversion
```



---
## test_conversion_float
```python
from test_converter import test_conversion_float
```



---
## test_conversion_outofbounds_datetime
```python
from test_converter import test_conversion_outofbounds_datetime
```



---
## test_time_formatter
```python
from test_converter import test_time_formatter
```



---
## test_dateindex_conversion
```python
from test_converter import test_dateindex_conversion
```



---
## test_resolution
```python
from test_converter import test_resolution
```



---
## test_convert_nested
```python
from test_converter import test_convert_nested
```



---
## pc
```python
from test_converter import pc
```



---
## axis
```python
from test_converter import axis
```



---
## test_integer_passthrough
```python
from test_converter import test_integer_passthrough
```



---
## test_format_timedelta_ticks
```python
from test_converter import test_format_timedelta_ticks
```



---
## test_call_w_different_view_intervals
```python
from test_converter import test_call_w_different_view_intervals
```



---
## Axis
```python
from test_converter import Axis
```



---
## mock_axis
```python
from test_converter import mock_axis
```



---
## get_view_interval
```python
from test_converter import get_view_interval
```



---
## __name__
```python
from test_series import __name__
```



---
## ts
```python
from test_series import ts
```



---
## series
```python
from test_series import series
```



---
## TestSeriesPlots
```python
from test_series import TestSeriesPlots
```



---
## test_plot
```python
from test_series import test_plot
```



---
## test_plot_tick_props
```python
from test_series import test_plot_tick_props
```



---
## test_plot_scales
```python
from test_series import test_plot_scales
```



---
## test_plot_ts_bar
```python
from test_series import test_plot_ts_bar
```



---
## test_plot_ts_area_stacked
```python
from test_series import test_plot_ts_area_stacked
```



---
## test_plot_iseries
```python
from test_series import test_plot_iseries
```



---
## test_plot_series_kinds
```python
from test_series import test_plot_series_kinds
```



---
## test_plot_series_barh
```python
from test_series import test_plot_series_barh
```



---
## test_plot_series_bar_ax
```python
from test_series import test_plot_series_bar_ax
```



---
## test_plot_6951
```python
from test_series import test_plot_6951
```



---
## test_plot_figsize_and_title
```python
from test_series import test_plot_figsize_and_title
```



---
## test_dont_modify_rcParams
```python
from test_series import test_dont_modify_rcParams
```



---
## test_ts_line_lim
```python
from test_series import test_ts_line_lim
```



---
## test_ts_area_lim
```python
from test_series import test_ts_area_lim
```



---
## test_ts_area_lim_xcompat
```python
from test_series import test_ts_area_lim_xcompat
```



---
## test_ts_tz_area_lim_xcompat
```python
from test_series import test_ts_tz_area_lim_xcompat
```



---
## test_ts_tz_area_lim_xcompat_secondary_y
```python
from test_series import test_ts_tz_area_lim_xcompat_secondary_y
```



---
## test_area_sharey_dont_overwrite
```python
from test_series import test_area_sharey_dont_overwrite
```



---
## test_label
```python
from test_series import test_label
```



---
## test_label_none
```python
from test_series import test_label_none
```



---
## test_label_ser_name
```python
from test_series import test_label_ser_name
```



---
## test_label_ser_name_override
```python
from test_series import test_label_ser_name_override
```



---
## test_label_ser_name_override_dont_draw
```python
from test_series import test_label_ser_name_override_dont_draw
```



---
## test_boolean
```python
from test_series import test_boolean
```



---
## test_line_area_nan_series
```python
from test_series import test_line_area_nan_series
```



---
## test_line_use_index_false
```python
from test_series import test_line_use_index_false
```



---
## test_line_use_index_false_diff_var
```python
from test_series import test_line_use_index_false_diff_var
```



---
## test_bar_log
```python
from test_series import test_bar_log
```



---
## test_bar_log_kind_bar
```python
from test_series import test_bar_log_kind_bar
```



---
## test_bar_ignore_index
```python
from test_series import test_bar_ignore_index
```



---
## test_bar_user_colors
```python
from test_series import test_bar_user_colors
```



---
## test_rotation_default
```python
from test_series import test_rotation_default
```



---
## test_rotation_30
```python
from test_series import test_rotation_30
```



---
## test_irregular_datetime
```python
from test_series import test_irregular_datetime
```



---
## test_unsorted_index_xlim
```python
from test_series import test_unsorted_index_xlim
```



---
## test_pie_series
```python
from test_series import test_pie_series
```



---
## test_pie_series_no_label
```python
from test_series import test_pie_series_no_label
```



---
## test_pie_series_less_colors_than_elements
```python
from test_series import test_pie_series_less_colors_than_elements
```



---
## test_pie_series_labels_and_colors
```python
from test_series import test_pie_series_labels_and_colors
```



---
## test_pie_series_autopct_and_fontsize
```python
from test_series import test_pie_series_autopct_and_fontsize
```



---
## test_pie_series_negative_raises
```python
from test_series import test_pie_series_negative_raises
```



---
## test_pie_series_nan
```python
from test_series import test_pie_series_nan
```



---
## test_pie_nan
```python
from test_series import test_pie_nan
```



---
## test_df_series_secondary_legend
```python
from test_series import test_df_series_secondary_legend
```



---
## test_df_series_secondary_legend_with_axes
```python
from test_series import test_df_series_secondary_legend_with_axes
```



---
## test_df_series_secondary_legend_both
```python
from test_series import test_df_series_secondary_legend_both
```



---
## test_df_series_secondary_legend_both_with_axis
```python
from test_series import test_df_series_secondary_legend_both_with_axis
```



---
## test_df_series_secondary_legend_both_with_axis_2
```python
from test_series import test_df_series_secondary_legend_both_with_axis_2
```



---
## test_secondary_logy
```python
from test_series import test_secondary_logy
```



---
## test_plot_fails_with_dupe_color_and_style
```python
from test_series import test_plot_fails_with_dupe_color_and_style
```



---
## test_kde_kwargs
```python
from test_series import test_kde_kwargs
```



---
## test_density_kwargs
```python
from test_series import test_density_kwargs
```



---
## test_kde_kwargs_check_axes
```python
from test_series import test_kde_kwargs_check_axes
```



---
## test_kde_missing_vals
```python
from test_series import test_kde_missing_vals
```



---
## test_boxplot_series
```python
from test_series import test_boxplot_series
```



---
## test_kind_kwarg
```python
from test_series import test_kind_kwarg
```



---
## test_kind_attr
```python
from test_series import test_kind_attr
```



---
## test_invalid_plot_data
```python
from test_series import test_invalid_plot_data
```



---
## test_valid_object_plot
```python
from test_series import test_valid_object_plot
```



---
## test_partially_invalid_plot_data
```python
from test_series import test_partially_invalid_plot_data
```



---
## test_invalid_kind
```python
from test_series import test_invalid_kind
```



---
## test_dup_datetime_index_plot
```python
from test_series import test_dup_datetime_index_plot
```



---
## test_errorbar_asymmetrical
```python
from test_series import test_errorbar_asymmetrical
```



---
## test_errorbar_plot
```python
from test_series import test_errorbar_plot
```



---
## test_errorbar_plot_yerr_0
```python
from test_series import test_errorbar_plot_yerr_0
```



---
## test_errorbar_plot_ts
```python
from test_series import test_errorbar_plot_ts
```



---
## test_errorbar_plot_invalid_yerr_shape
```python
from test_series import test_errorbar_plot_invalid_yerr_shape
```



---
## test_errorbar_plot_invalid_yerr
```python
from test_series import test_errorbar_plot_invalid_yerr
```



---
## test_table_true
```python
from test_series import test_table_true
```



---
## test_table_self
```python
from test_series import test_table_self
```



---
## test_series_grid_settings
```python
from test_series import test_series_grid_settings
```



---
## test_standard_colors
```python
from test_series import test_standard_colors
```



---
## test_standard_colors_all
```python
from test_series import test_standard_colors_all
```



---
## test_series_plot_color_kwargs
```python
from test_series import test_series_plot_color_kwargs
```



---
## test_time_series_plot_color_kwargs
```python
from test_series import test_time_series_plot_color_kwargs
```



---
## test_time_series_plot_color_with_empty_kwargs
```python
from test_series import test_time_series_plot_color_with_empty_kwargs
```



---
## test_xticklabels
```python
from test_series import test_xticklabels
```



---
## test_xtick_barPlot
```python
from test_series import test_xtick_barPlot
```



---
## test_custom_business_day_freq
```python
from test_series import test_custom_business_day_freq
```



---
## test_plot_accessor_updates_on_inplace
```python
from test_series import test_plot_accessor_updates_on_inplace
```



---
## test_plot_xlim_for_series
```python
from test_series import test_plot_xlim_for_series
```



---
## test_plot_no_rows
```python
from test_series import test_plot_no_rows
```



---
## test_plot_no_numeric_data
```python
from test_series import test_plot_no_numeric_data
```



---
## test_plot_order
```python
from test_series import test_plot_order
```



---
## test_style_single_ok
```python
from test_series import test_style_single_ok
```



---
## test_xlabel_ylabel_series
```python
from test_series import test_xlabel_ylabel_series
```



---
## test_timedelta_index
```python
from test_series import test_timedelta_index
```



---
## test_series_none_color
```python
from test_series import test_series_none_color
```



---
## test_plot_no_warning
```python
from test_series import test_plot_no_warning
```



---
## raw
```python
from conftest import raw
```

raw keyword argument for rolling.apply

---
## arithmetic_win_operators
```python
from conftest import arithmetic_win_operators
```



---
## center
```python
from conftest import center
```



---
## min_periods
```python
from conftest import min_periods
```



---
## adjust
```python
from conftest import adjust
```

adjust keyword argument for ewm

---
## ignore_na
```python
from conftest import ignore_na
```

ignore_na keyword argument for ewm

---
## numeric_only
```python
from conftest import numeric_only
```

numeric_only keyword argument

---
## engine
```python
from conftest import engine
```

engine keyword argument for rolling.apply

---
## engine_and_raw
```python
from conftest import engine_and_raw
```

engine and raw keyword arguments for rolling.apply

---
## halflife_with_times
```python
from conftest import halflife_with_times
```

Halflife argument for EWM when times is specified.

---
## step
```python
from conftest import step
```

step keyword argument for rolling window operations.

---
## __name__
```python
from test_rolling_quantile import __name__
```



---
## scoreatpercentile
```python
from test_rolling_quantile import scoreatpercentile
```



---
## test_series
```python
from test_rolling_quantile import test_series
```



---
## test_frame
```python
from test_rolling_quantile import test_frame
```



---
## test_time_rule_series
```python
from test_rolling_quantile import test_time_rule_series
```



---
## test_time_rule_frame
```python
from test_rolling_quantile import test_time_rule_frame
```



---
## test_nans
```python
from test_rolling_quantile import test_nans
```



---
## test_min_periods
```python
from test_rolling_quantile import test_min_periods
```



---
## test_center
```python
from test_rolling_quantile import test_center
```



---
## test_center_reindex_series
```python
from test_rolling_quantile import test_center_reindex_series
```



---
## test_center_reindex_frame
```python
from test_rolling_quantile import test_center_reindex_frame
```



---
## test_keyword_quantile_deprecated
```python
from test_rolling_quantile import test_keyword_quantile_deprecated
```



---
## __name__
```python
from test_cython_aggregations import __name__
```



---
## _get_rolling_aggregations
```python
from test_cython_aggregations import _get_rolling_aggregations
```



---
## rolling_aggregation
```python
from test_cython_aggregations import rolling_aggregation
```

Make a rolling aggregation function as fixture.

---
## test_rolling_aggregation_boundary_consistency
```python
from test_cython_aggregations import test_rolling_aggregation_boundary_consistency
```



---
## test_rolling_aggregation_with_unused_elements
```python
from test_cython_aggregations import test_rolling_aggregation_with_unused_elements
```



---
## __name__
```python
from test_expanding import __name__
```



---
## test_doc_string
```python
from test_expanding import test_doc_string
```



---
## test_constructor
```python
from test_expanding import test_constructor
```



---
## test_constructor_invalid
```python
from test_expanding import test_constructor_invalid
```



---
## test_empty_df_expanding
```python
from test_expanding import test_empty_df_expanding
```



---
## test_missing_minp_zero
```python
from test_expanding import test_missing_minp_zero
```



---
## test_expanding_axis
```python
from test_expanding import test_expanding_axis
```



---
## test_expanding_count_with_min_periods
```python
from test_expanding import test_expanding_count_with_min_periods
```



---
## test_expanding_count_default_min_periods_with_null_values
```python
from test_expanding import test_expanding_count_default_min_periods_with_null_values
```



---
## test_expanding_count_with_min_periods_exceeding_series_length
```python
from test_expanding import test_expanding_count_with_min_periods_exceeding_series_length
```



---
## test_iter_expanding_dataframe
```python
from test_expanding import test_iter_expanding_dataframe
```



---
## test_iter_expanding_series
```python
from test_expanding import test_iter_expanding_series
```



---
## test_center_invalid
```python
from test_expanding import test_center_invalid
```



---
## test_expanding_sem
```python
from test_expanding import test_expanding_sem
```



---
## test_expanding_skew_kurt_numerical_stability
```python
from test_expanding import test_expanding_skew_kurt_numerical_stability
```



---
## test_rank
```python
from test_expanding import test_rank
```



---
## test_expanding_corr
```python
from test_expanding import test_expanding_corr
```



---
## test_expanding_count
```python
from test_expanding import test_expanding_count
```



---
## test_expanding_quantile
```python
from test_expanding import test_expanding_quantile
```



---
## test_expanding_cov
```python
from test_expanding import test_expanding_cov
```



---
## test_expanding_cov_pairwise
```python
from test_expanding import test_expanding_cov_pairwise
```



---
## test_expanding_corr_pairwise
```python
from test_expanding import test_expanding_corr_pairwise
```



---
## test_expanding_func
```python
from test_expanding import test_expanding_func
```



---
## test_expanding_min_periods
```python
from test_expanding import test_expanding_min_periods
```



---
## test_expanding_apply
```python
from test_expanding import test_expanding_apply
```



---
## test_expanding_min_periods_apply
```python
from test_expanding import test_expanding_min_periods_apply
```



---
## test_moment_functions_zero_length_pairwise
```python
from test_expanding import test_moment_functions_zero_length_pairwise
```



---
## test_moment_functions_zero_length
```python
from test_expanding import test_moment_functions_zero_length
```



---
## test_expanding_apply_empty_series
```python
from test_expanding import test_expanding_apply_empty_series
```



---
## test_expanding_apply_min_periods_0
```python
from test_expanding import test_expanding_apply_min_periods_0
```



---
## test_expanding_cov_diff_index
```python
from test_expanding import test_expanding_cov_diff_index
```



---
## test_expanding_corr_diff_index
```python
from test_expanding import test_expanding_corr_diff_index
```



---
## test_expanding_cov_pairwise_diff_length
```python
from test_expanding import test_expanding_cov_pairwise_diff_length
```



---
## test_expanding_corr_pairwise_diff_length
```python
from test_expanding import test_expanding_corr_pairwise_diff_length
```



---
## test_expanding_apply_args_kwargs
```python
from test_expanding import test_expanding_apply_args_kwargs
```



---
## test_numeric_only_frame
```python
from test_expanding import test_numeric_only_frame
```



---
## test_numeric_only_corr_cov_frame
```python
from test_expanding import test_numeric_only_corr_cov_frame
```



---
## test_numeric_only_series
```python
from test_expanding import test_numeric_only_series
```



---
## test_numeric_only_corr_cov_series
```python
from test_expanding import test_numeric_only_corr_cov_series
```



---
## test_keyword_quantile_deprecated
```python
from test_expanding import test_keyword_quantile_deprecated
```



---
## mean_w_arg
```python
from test_expanding import mean_w_arg
```



---
## __name__
```python
from test_rolling import __name__
```



---
## test_doc_string
```python
from test_rolling import test_doc_string
```



---
## test_constructor
```python
from test_rolling import test_constructor
```



---
## test_invalid_constructor
```python
from test_rolling import test_invalid_constructor
```



---
## test_freq_window_not_implemented
```python
from test_rolling import test_freq_window_not_implemented
```



---
## test_step_not_implemented_for_cov_corr
```python
from test_rolling import test_step_not_implemented_for_cov_corr
```



---
## test_constructor_with_timedelta_window
```python
from test_rolling import test_constructor_with_timedelta_window
```



---
## test_constructor_timedelta_window_and_minperiods
```python
from test_rolling import test_constructor_timedelta_window_and_minperiods
```



---
## test_closed_fixed
```python
from test_rolling import test_closed_fixed
```



---
## test_datetimelike_centered_selections
```python
from test_rolling import test_datetimelike_centered_selections
```



---
## test_datetimelike_centered_offset_covers_all
```python
from test_rolling import test_datetimelike_centered_offset_covers_all
```



---
## test_datetimelike_nonunique_index_centering
```python
from test_rolling import test_datetimelike_nonunique_index_centering
```



---
## test_variable_window_nonunique
```python
from test_rolling import test_variable_window_nonunique
```



---
## test_variable_offset_window_nonunique
```python
from test_rolling import test_variable_offset_window_nonunique
```



---
## test_even_number_window_alignment
```python
from test_rolling import test_even_number_window_alignment
```



---
## test_closed_fixed_binary_col
```python
from test_rolling import test_closed_fixed_binary_col
```



---
## test_closed_empty
```python
from test_rolling import test_closed_empty
```



---
## test_closed_one_entry
```python
from test_rolling import test_closed_one_entry
```



---
## test_closed_one_entry_groupby
```python
from test_rolling import test_closed_one_entry_groupby
```



---
## test_closed_min_max_datetime
```python
from test_rolling import test_closed_min_max_datetime
```



---
## test_closed_uneven
```python
from test_rolling import test_closed_uneven
```



---
## test_closed_min_max_minp
```python
from test_rolling import test_closed_min_max_minp
```



---
## test_closed_median_quantile
```python
from test_rolling import test_closed_median_quantile
```



---
## tests_empty_df_rolling
```python
from test_rolling import tests_empty_df_rolling
```



---
## test_empty_window_median_quantile
```python
from test_rolling import test_empty_window_median_quantile
```



---
## test_missing_minp_zero
```python
from test_rolling import test_missing_minp_zero
```



---
## test_missing_minp_zero_variable
```python
from test_rolling import test_missing_minp_zero_variable
```



---
## test_multi_index_names
```python
from test_rolling import test_multi_index_names
```



---
## test_rolling_axis_sum
```python
from test_rolling import test_rolling_axis_sum
```



---
## test_rolling_axis_count
```python
from test_rolling import test_rolling_axis_count
```



---
## test_readonly_array
```python
from test_rolling import test_readonly_array
```



---
## test_rolling_datetime
```python
from test_rolling import test_rolling_datetime
```



---
## test_rolling_window_as_string
```python
from test_rolling import test_rolling_window_as_string
```



---
## test_min_periods1
```python
from test_rolling import test_min_periods1
```



---
## test_rolling_count_with_min_periods
```python
from test_rolling import test_rolling_count_with_min_periods
```



---
## test_rolling_count_default_min_periods_with_null_values
```python
from test_rolling import test_rolling_count_default_min_periods_with_null_values
```



---
## test_iter_rolling_dataframe
```python
from test_rolling import test_iter_rolling_dataframe
```



---
## test_iter_rolling_on_dataframe
```python
from test_rolling import test_iter_rolling_on_dataframe
```



---
## test_iter_rolling_on_dataframe_unordered
```python
from test_rolling import test_iter_rolling_on_dataframe_unordered
```



---
## test_iter_rolling_series
```python
from test_rolling import test_iter_rolling_series
```



---
## test_iter_rolling_datetime
```python
from test_rolling import test_iter_rolling_datetime
```



---
## test_rolling_positional_argument
```python
from test_rolling import test_rolling_positional_argument
```



---
## test_rolling_numerical_accuracy_kahan_mean
```python
from test_rolling import test_rolling_numerical_accuracy_kahan_mean
```



---
## test_rolling_numerical_accuracy_kahan_sum
```python
from test_rolling import test_rolling_numerical_accuracy_kahan_sum
```



---
## test_rolling_numerical_accuracy_jump
```python
from test_rolling import test_rolling_numerical_accuracy_jump
```



---
## test_rolling_numerical_accuracy_small_values
```python
from test_rolling import test_rolling_numerical_accuracy_small_values
```



---
## test_rolling_numerical_too_large_numbers
```python
from test_rolling import test_rolling_numerical_too_large_numbers
```



---
## test_rolling_mixed_dtypes_axis_1
```python
from test_rolling import test_rolling_mixed_dtypes_axis_1
```



---
## test_rolling_axis_one_with_nan
```python
from test_rolling import test_rolling_axis_one_with_nan
```



---
## test_rolling_axis_1_non_numeric_dtypes
```python
from test_rolling import test_rolling_axis_1_non_numeric_dtypes
```



---
## test_rolling_on_df_transposed
```python
from test_rolling import test_rolling_on_df_transposed
```



---
## test_rolling_period_index
```python
from test_rolling import test_rolling_period_index
```



---
## test_rolling_sem
```python
from test_rolling import test_rolling_sem
```



---
## test_rolling_var_numerical_issues
```python
from test_rolling import test_rolling_var_numerical_issues
```



---
## test_timeoffset_as_window_parameter_for_corr
```python
from test_rolling import test_timeoffset_as_window_parameter_for_corr
```



---
## test_rolling_decreasing_indices
```python
from test_rolling import test_rolling_decreasing_indices
```

Make sure that decreasing indices give the same results as increasing indices.

GH 36933

---
## test_rolling_decreasing_indices_centered
```python
from test_rolling import test_rolling_decreasing_indices_centered
```

Ensure that a symmetrical inverted index return same result as non-inverted.

---
## test_rolling_center_nanosecond_resolution
```python
from test_rolling import test_rolling_center_nanosecond_resolution
```



---
## test_rolling_non_monotonic
```python
from test_rolling import test_rolling_non_monotonic
```

Make sure the (rare) branch of non-monotonic indices is covered by a test.

output from 1.1.3 is assumed to be the expected output. Output of sum/mean has
manually been verified.

GH 36933.

---
## test_rolling_corr_timedelta_index
```python
from test_rolling import test_rolling_corr_timedelta_index
```



---
## test_groupby_rolling_nan_included
```python
from test_rolling import test_groupby_rolling_nan_included
```



---
## test_rolling_skew_kurt_numerical_stability
```python
from test_rolling import test_rolling_skew_kurt_numerical_stability
```



---
## test_rolling_skew_kurt_large_value_range
```python
from test_rolling import test_rolling_skew_kurt_large_value_range
```



---
## test_invalid_method
```python
from test_rolling import test_invalid_method
```



---
## test_rolling_descending_date_order_with_offset
```python
from test_rolling import test_rolling_descending_date_order_with_offset
```



---
## test_rolling_var_floating_artifact_precision
```python
from test_rolling import test_rolling_var_floating_artifact_precision
```



---
## test_rolling_std_small_values
```python
from test_rolling import test_rolling_std_small_values
```



---
## test_rolling_mean_all_nan_window_floating_artifacts
```python
from test_rolling import test_rolling_mean_all_nan_window_floating_artifacts
```



---
## test_rolling_sum_all_nan_window_floating_artifacts
```python
from test_rolling import test_rolling_sum_all_nan_window_floating_artifacts
```



---
## test_rolling_zero_window
```python
from test_rolling import test_rolling_zero_window
```



---
## test_rolling_float_dtype
```python
from test_rolling import test_rolling_float_dtype
```



---
## test_rolling_numeric_dtypes
```python
from test_rolling import test_rolling_numeric_dtypes
```



---
## test_rank
```python
from test_rolling import test_rank
```



---
## test_rolling_quantile_np_percentile
```python
from test_rolling import test_rolling_quantile_np_percentile
```



---
## test_rolling_quantile_interpolation_options
```python
from test_rolling import test_rolling_quantile_interpolation_options
```



---
## test_invalid_quantile_value
```python
from test_rolling import test_invalid_quantile_value
```



---
## test_rolling_quantile_param
```python
from test_rolling import test_rolling_quantile_param
```



---
## test_rolling_std_1obs
```python
from test_rolling import test_rolling_std_1obs
```



---
## test_rolling_std_neg_sqrt
```python
from test_rolling import test_rolling_std_neg_sqrt
```



---
## test_step_not_integer_raises
```python
from test_rolling import test_step_not_integer_raises
```



---
## test_step_not_positive_raises
```python
from test_rolling import test_step_not_positive_raises
```



---
## test_rolling_var_same_value_count_logic
```python
from test_rolling import test_rolling_var_same_value_count_logic
```



---
## test_rolling_mean_sum_floating_artifacts
```python
from test_rolling import test_rolling_mean_sum_floating_artifacts
```



---
## test_rolling_skew_kurt_floating_artifacts
```python
from test_rolling import test_rolling_skew_kurt_floating_artifacts
```



---
## test_numeric_only_frame
```python
from test_rolling import test_numeric_only_frame
```



---
## test_numeric_only_corr_cov_frame
```python
from test_rolling import test_numeric_only_corr_cov_frame
```



---
## test_numeric_only_series
```python
from test_rolling import test_numeric_only_series
```



---
## test_numeric_only_corr_cov_series
```python
from test_rolling import test_numeric_only_corr_cov_series
```



---
## test_rolling_timedelta_window_non_nanoseconds
```python
from test_rolling import test_rolling_timedelta_window_non_nanoseconds
```



---
## scaled_sum
```python
from test_rolling import scaled_sum
```



---
## CustomIndexer
```python
from test_rolling import CustomIndexer
```



---
## get_window_bounds
```python
from test_rolling import get_window_bounds
```



---
## __name__
```python
from test_rolling_skew_kurt import __name__
```



---
## test_series
```python
from test_rolling_skew_kurt import test_series
```



---
## test_frame
```python
from test_rolling_skew_kurt import test_frame
```



---
## test_time_rule_series
```python
from test_rolling_skew_kurt import test_time_rule_series
```



---
## test_time_rule_frame
```python
from test_rolling_skew_kurt import test_time_rule_frame
```



---
## test_nans
```python
from test_rolling_skew_kurt import test_nans
```



---
## test_min_periods
```python
from test_rolling_skew_kurt import test_min_periods
```



---
## test_center
```python
from test_rolling_skew_kurt import test_center
```



---
## test_center_reindex_series
```python
from test_rolling_skew_kurt import test_center_reindex_series
```



---
## test_center_reindex_frame
```python
from test_rolling_skew_kurt import test_center_reindex_frame
```



---
## test_rolling_skew_edge_cases
```python
from test_rolling_skew_kurt import test_rolling_skew_edge_cases
```



---
## test_rolling_kurt_edge_cases
```python
from test_rolling_skew_kurt import test_rolling_kurt_edge_cases
```



---
## test_rolling_skew_eq_value_fperr
```python
from test_rolling_skew_kurt import test_rolling_skew_eq_value_fperr
```



---
## test_rolling_kurt_eq_value_fperr
```python
from test_rolling_skew_kurt import test_rolling_kurt_eq_value_fperr
```



---
## __name__
```python
from test_ewm import __name__
```



---
## test_doc_string
```python
from test_ewm import test_doc_string
```



---
## test_constructor
```python
from test_ewm import test_constructor
```



---
## test_ewma_times_not_datetime_type
```python
from test_ewm import test_ewma_times_not_datetime_type
```



---
## test_ewma_times_not_same_length
```python
from test_ewm import test_ewma_times_not_same_length
```



---
## test_ewma_halflife_not_correct_type
```python
from test_ewm import test_ewma_halflife_not_correct_type
```



---
## test_ewma_halflife_without_times
```python
from test_ewm import test_ewma_halflife_without_times
```



---
## test_ewma_with_times_equal_spacing
```python
from test_ewm import test_ewma_with_times_equal_spacing
```



---
## test_ewma_with_times_variable_spacing
```python
from test_ewm import test_ewma_with_times_variable_spacing
```



---
## test_ewm_with_nat_raises
```python
from test_ewm import test_ewm_with_nat_raises
```



---
## test_ewm_with_times_getitem
```python
from test_ewm import test_ewm_with_times_getitem
```



---
## test_ewm_getitem_attributes_retained
```python
from test_ewm import test_ewm_getitem_attributes_retained
```



---
## test_ewma_times_adjust_false_raises
```python
from test_ewm import test_ewma_times_adjust_false_raises
```



---
## test_float_dtype_ewma
```python
from test_ewm import test_float_dtype_ewma
```



---
## test_times_string_col_raises
```python
from test_ewm import test_times_string_col_raises
```



---
## test_ewm_sum_adjust_false_notimplemented
```python
from test_ewm import test_ewm_sum_adjust_false_notimplemented
```



---
## test_ewm_sum
```python
from test_ewm import test_ewm_sum
```



---
## test_ewma_adjust
```python
from test_ewm import test_ewma_adjust
```



---
## test_ewma_cases
```python
from test_ewm import test_ewma_cases
```



---
## test_ewma_nan_handling
```python
from test_ewm import test_ewma_nan_handling
```



---
## test_ewma_nan_handling_cases
```python
from test_ewm import test_ewma_nan_handling_cases
```



---
## test_ewm_alpha
```python
from test_ewm import test_ewm_alpha
```



---
## test_ewm_domain_checks
```python
from test_ewm import test_ewm_domain_checks
```



---
## test_ew_empty_series
```python
from test_ewm import test_ew_empty_series
```



---
## test_ew_min_periods
```python
from test_ewm import test_ew_min_periods
```



---
## test_ewm_corr_cov
```python
from test_ewm import test_ewm_corr_cov
```



---
## test_ewm_corr_cov_min_periods
```python
from test_ewm import test_ewm_corr_cov_min_periods
```



---
## test_different_input_array_raise_exception
```python
from test_ewm import test_different_input_array_raise_exception
```



---
## test_ewma_series
```python
from test_ewm import test_ewma_series
```



---
## test_ewma_frame
```python
from test_ewm import test_ewma_frame
```



---
## test_ewma_span_com_args
```python
from test_ewm import test_ewma_span_com_args
```



---
## test_ewma_halflife_arg
```python
from test_ewm import test_ewma_halflife_arg
```



---
## test_ewm_alpha_arg
```python
from test_ewm import test_ewm_alpha_arg
```



---
## test_ewm_pairwise_cov_corr
```python
from test_ewm import test_ewm_pairwise_cov_corr
```



---
## test_numeric_only_frame
```python
from test_ewm import test_numeric_only_frame
```



---
## test_numeric_only_corr_cov_frame
```python
from test_ewm import test_numeric_only_corr_cov_frame
```



---
## test_numeric_only_series
```python
from test_ewm import test_numeric_only_series
```



---
## test_numeric_only_corr_cov_series
```python
from test_ewm import test_numeric_only_corr_cov_series
```



---
## test_rolling_apply_invalid_raw
```python
from test_apply import test_rolling_apply_invalid_raw
```



---
## test_rolling_apply_out_of_bounds
```python
from test_apply import test_rolling_apply_out_of_bounds
```



---
## test_rolling_apply_with_pandas_objects
```python
from test_apply import test_rolling_apply_with_pandas_objects
```



---
## test_rolling_apply
```python
from test_apply import test_rolling_apply
```



---
## test_all_apply
```python
from test_apply import test_all_apply
```



---
## test_ragged_apply
```python
from test_apply import test_ragged_apply
```



---
## test_invalid_engine
```python
from test_apply import test_invalid_engine
```



---
## test_invalid_engine_kwargs_cython
```python
from test_apply import test_invalid_engine_kwargs_cython
```



---
## test_invalid_raw_numba
```python
from test_apply import test_invalid_raw_numba
```



---
## test_rolling_apply_args_kwargs
```python
from test_apply import test_rolling_apply_args_kwargs
```



---
## test_nans
```python
from test_apply import test_nans
```



---
## test_center
```python
from test_apply import test_center
```



---
## test_series
```python
from test_apply import test_series
```



---
## test_frame
```python
from test_apply import test_frame
```



---
## test_time_rule_series
```python
from test_apply import test_time_rule_series
```



---
## test_time_rule_frame
```python
from test_apply import test_time_rule_frame
```



---
## test_min_periods
```python
from test_apply import test_min_periods
```



---
## test_center_reindex_series
```python
from test_apply import test_center_reindex_series
```



---
## test_center_reindex_frame
```python
from test_apply import test_center_reindex_frame
```



---
## test_axis1
```python
from test_apply import test_axis1
```



---
## numpysum
```python
from test_apply import numpysum
```



---
## __name__
```python
from test_win_type import __name__
```



---
## win_types
```python
from test_win_type import win_types
```



---
## win_types_special
```python
from test_win_type import win_types_special
```



---
## test_constructor
```python
from test_win_type import test_constructor
```



---
## test_invalid_constructor
```python
from test_win_type import test_invalid_constructor
```



---
## test_invalid_constructor_wintype
```python
from test_win_type import test_invalid_constructor_wintype
```



---
## test_constructor_with_win_type
```python
from test_win_type import test_constructor_with_win_type
```



---
## test_agg_function_support
```python
from test_win_type import test_agg_function_support
```



---
## test_invalid_scipy_arg
```python
from test_win_type import test_invalid_scipy_arg
```



---
## test_constructor_with_win_type_invalid
```python
from test_win_type import test_constructor_with_win_type_invalid
```



---
## test_window_with_args
```python
from test_win_type import test_window_with_args
```



---
## test_win_type_with_method_invalid
```python
from test_win_type import test_win_type_with_method_invalid
```



---
## test_consistent_win_type_freq
```python
from test_win_type import test_consistent_win_type_freq
```



---
## test_win_type_freq_return_none
```python
from test_win_type import test_win_type_freq_return_none
```



---
## test_win_type_not_implemented
```python
from test_win_type import test_win_type_not_implemented
```



---
## test_cmov_mean
```python
from test_win_type import test_cmov_mean
```



---
## test_cmov_window
```python
from test_win_type import test_cmov_window
```



---
## test_cmov_window_corner
```python
from test_win_type import test_cmov_window_corner
```



---
## test_cmov_window_frame
```python
from test_win_type import test_cmov_window_frame
```



---
## test_cmov_window_na_min_periods
```python
from test_win_type import test_cmov_window_na_min_periods
```



---
## test_cmov_window_regular
```python
from test_win_type import test_cmov_window_regular
```



---
## test_cmov_window_regular_linear_range
```python
from test_win_type import test_cmov_window_regular_linear_range
```



---
## test_cmov_window_regular_missing_data
```python
from test_win_type import test_cmov_window_regular_missing_data
```



---
## test_cmov_window_special
```python
from test_win_type import test_cmov_window_special
```



---
## test_cmov_window_special_linear_range
```python
from test_win_type import test_cmov_window_special_linear_range
```



---
## test_weighted_var_big_window_no_segfault
```python
from test_win_type import test_weighted_var_big_window_no_segfault
```



---
## test_rolling_center_axis_1
```python
from test_win_type import test_rolling_center_axis_1
```



---
## a
```python
from test_win_type import a
```



---
## b
```python
from test_win_type import b
```



---
## CustomIndexer
```python
from test_win_type import CustomIndexer
```



---
## get_window_bounds
```python
from test_win_type import get_window_bounds
```



---
## times_frame
```python
from test_groupby import times_frame
```

Frame for testing times argument in EWM groupby.

---
## roll_frame
```python
from test_groupby import roll_frame
```



---
## TestRolling
```python
from test_groupby import TestRolling
```



---
## TestExpanding
```python
from test_groupby import TestExpanding
```



---
## TestEWM
```python
from test_groupby import TestEWM
```



---
## test_rolling_corr_with_single_integer_in_index
```python
from test_groupby import test_rolling_corr_with_single_integer_in_index
```



---
## test_rolling_corr_with_tuples_in_index
```python
from test_groupby import test_rolling_corr_with_tuples_in_index
```



---
## test_groupby_unsupported_argument
```python
from test_groupby import test_groupby_unsupported_argument
```



---
## test_getitem
```python
from test_groupby import test_getitem
```



---
## test_getitem_multiple
```python
from test_groupby import test_getitem_multiple
```



---
## test_rolling
```python
from test_groupby import test_rolling
```



---
## test_rolling_ddof
```python
from test_groupby import test_rolling_ddof
```



---
## test_rolling_quantile
```python
from test_groupby import test_rolling_quantile
```



---
## test_rolling_corr_cov_other_same_size_as_groups
```python
from test_groupby import test_rolling_corr_cov_other_same_size_as_groups
```



---
## test_rolling_corr_cov_other_diff_size_as_groups
```python
from test_groupby import test_rolling_corr_cov_other_diff_size_as_groups
```



---
## test_rolling_corr_cov_pairwise
```python
from test_groupby import test_rolling_corr_cov_pairwise
```



---
## test_rolling_corr_cov_unordered
```python
from test_groupby import test_rolling_corr_cov_unordered
```



---
## test_rolling_apply
```python
from test_groupby import test_rolling_apply
```



---
## test_rolling_apply_mutability
```python
from test_groupby import test_rolling_apply_mutability
```



---
## test_groupby_rolling
```python
from test_groupby import test_groupby_rolling
```



---
## test_groupby_rolling_center_center
```python
from test_groupby import test_groupby_rolling_center_center
```



---
## test_groupby_rolling_center_on
```python
from test_groupby import test_groupby_rolling_center_on
```



---
## test_groupby_rolling_center_min_periods
```python
from test_groupby import test_groupby_rolling_center_min_periods
```



---
## test_groupby_subselect_rolling
```python
from test_groupby import test_groupby_subselect_rolling
```



---
## test_groupby_rolling_custom_indexer
```python
from test_groupby import test_groupby_rolling_custom_indexer
```



---
## test_groupby_rolling_subset_with_closed
```python
from test_groupby import test_groupby_rolling_subset_with_closed
```



---
## test_groupby_subset_rolling_subset_with_closed
```python
from test_groupby import test_groupby_subset_rolling_subset_with_closed
```



---
## test_groupby_rolling_index_changed
```python
from test_groupby import test_groupby_rolling_index_changed
```



---
## test_groupby_rolling_empty_frame
```python
from test_groupby import test_groupby_rolling_empty_frame
```



---
## test_groupby_rolling_string_index
```python
from test_groupby import test_groupby_rolling_string_index
```



---
## test_groupby_rolling_no_sort
```python
from test_groupby import test_groupby_rolling_no_sort
```



---
## test_groupby_rolling_count_closed_on
```python
from test_groupby import test_groupby_rolling_count_closed_on
```



---
## test_groupby_rolling_sem
```python
from test_groupby import test_groupby_rolling_sem
```



---
## test_groupby_rolling_nans_in_index
```python
from test_groupby import test_groupby_rolling_nans_in_index
```



---
## test_groupby_rolling_group_keys
```python
from test_groupby import test_groupby_rolling_group_keys
```



---
## test_groupby_rolling_index_level_and_column_label
```python
from test_groupby import test_groupby_rolling_index_level_and_column_label
```



---
## test_groupby_rolling_resulting_multiindex
```python
from test_groupby import test_groupby_rolling_resulting_multiindex
```



---
## test_groupby_rolling_resulting_multiindex2
```python
from test_groupby import test_groupby_rolling_resulting_multiindex2
```



---
## test_groupby_rolling_resulting_multiindex3
```python
from test_groupby import test_groupby_rolling_resulting_multiindex3
```



---
## test_groupby_rolling_object_doesnt_affect_groupby_apply
```python
from test_groupby import test_groupby_rolling_object_doesnt_affect_groupby_apply
```



---
## test_groupby_rolling_var
```python
from test_groupby import test_groupby_rolling_var
```



---
## test_by_column_not_in_values
```python
from test_groupby import test_by_column_not_in_values
```



---
## test_groupby_level
```python
from test_groupby import test_groupby_level
```



---
## test_as_index_false
```python
from test_groupby import test_as_index_false
```



---
## test_nan_and_zero_endpoints
```python
from test_groupby import test_nan_and_zero_endpoints
```



---
## test_groupby_rolling_non_monotonic
```python
from test_groupby import test_groupby_rolling_non_monotonic
```



---
## test_groupby_monotonic
```python
from test_groupby import test_groupby_monotonic
```



---
## test_datelike_on_monotonic_within_each_group
```python
from test_groupby import test_datelike_on_monotonic_within_each_group
```



---
## test_datelike_on_not_monotonic_within_each_group
```python
from test_groupby import test_datelike_on_not_monotonic_within_each_group
```



---
## frame
```python
from test_groupby import frame
```



---
## test_expanding
```python
from test_groupby import test_expanding
```



---
## test_expanding_ddof
```python
from test_groupby import test_expanding_ddof
```



---
## test_expanding_quantile
```python
from test_groupby import test_expanding_quantile
```



---
## test_expanding_corr_cov
```python
from test_groupby import test_expanding_corr_cov
```



---
## test_expanding_apply
```python
from test_groupby import test_expanding_apply
```



---
## test_methods
```python
from test_groupby import test_methods
```



---
## test_pairwise_methods
```python
from test_groupby import test_pairwise_methods
```



---
## test_times
```python
from test_groupby import test_times
```



---
## test_times_array
```python
from test_groupby import test_times_array
```



---
## test_dont_mutate_obj_after_slicing
```python
from test_groupby import test_dont_mutate_obj_after_slicing
```



---
## func
```python
from test_groupby import func
```



---
## isnumpyarray
```python
from test_groupby import isnumpyarray
```



---
## SimpleIndexer
```python
from test_groupby import SimpleIndexer
```



---
## func_0
```python
from test_groupby import func_0
```



---
## func_1
```python
from test_groupby import func_1
```



---
## get_window_bounds
```python
from test_groupby import get_window_bounds
```



---
## test_getitem
```python
from test_api import test_getitem
```



---
## test_select_bad_cols
```python
from test_api import test_select_bad_cols
```



---
## test_attribute_access
```python
from test_api import test_attribute_access
```



---
## tests_skip_nuisance
```python
from test_api import tests_skip_nuisance
```



---
## test_sum_object_str_raises
```python
from test_api import test_sum_object_str_raises
```



---
## test_agg
```python
from test_api import test_agg
```



---
## test_multi_axis_1_raises
```python
from test_api import test_multi_axis_1_raises
```



---
## test_agg_apply
```python
from test_api import test_agg_apply
```



---
## test_agg_consistency
```python
from test_api import test_agg_consistency
```



---
## test_agg_nested_dicts
```python
from test_api import test_agg_nested_dicts
```



---
## test_count_nonnumeric_types
```python
from test_api import test_count_nonnumeric_types
```



---
## test_preserve_metadata
```python
from test_api import test_preserve_metadata
```



---
## test_multiple_agg_funcs
```python
from test_api import test_multiple_agg_funcs
```



---
## test_dont_modify_attributes_after_methods
```python
from test_api import test_dont_modify_attributes_after_methods
```



---
## test_centered_axis_validation
```python
from test_api import test_centered_axis_validation
```



---
## test_rolling_min_min_periods
```python
from test_api import test_rolling_min_min_periods
```



---
## test_rolling_max_min_periods
```python
from test_api import test_rolling_max_min_periods
```



---
## __name__
```python
from test_pairwise import __name__
```



---
## pairwise_frames
```python
from test_pairwise import pairwise_frames
```

Pairwise frames test_pairwise

---
## pairwise_target_frame
```python
from test_pairwise import pairwise_target_frame
```

Pairwise target frame for test_pairwise

---
## pairwise_other_frame
```python
from test_pairwise import pairwise_other_frame
```

Pairwise other frame for test_pairwise

---
## test_rolling_cov
```python
from test_pairwise import test_rolling_cov
```



---
## test_rolling_corr
```python
from test_pairwise import test_rolling_corr
```



---
## test_rolling_corr_bias_correction
```python
from test_pairwise import test_rolling_corr_bias_correction
```



---
## test_rolling_pairwise_cov_corr
```python
from test_pairwise import test_rolling_pairwise_cov_corr
```



---
## test_flex_binary_frame
```python
from test_pairwise import test_flex_binary_frame
```



---
## test_rolling_corr_with_zero_variance
```python
from test_pairwise import test_rolling_corr_with_zero_variance
```



---
## test_corr_sanity
```python
from test_pairwise import test_corr_sanity
```



---
## test_rolling_cov_diff_length
```python
from test_pairwise import test_rolling_cov_diff_length
```



---
## test_rolling_corr_diff_length
```python
from test_pairwise import test_rolling_corr_diff_length
```



---
## test_rolling_functions_window_non_shrinkage_binary
```python
from test_pairwise import test_rolling_functions_window_non_shrinkage_binary
```



---
## test_moment_functions_zero_length_pairwise
```python
from test_pairwise import test_moment_functions_zero_length_pairwise
```



---
## TestPairwise
```python
from test_pairwise import TestPairwise
```



---
## test_no_flex
```python
from test_pairwise import test_no_flex
```



---
## test_pairwise_with_self
```python
from test_pairwise import test_pairwise_with_self
```



---
## test_no_pairwise_with_self
```python
from test_pairwise import test_no_pairwise_with_self
```



---
## test_pairwise_with_other
```python
from test_pairwise import test_pairwise_with_other
```



---
## test_no_pairwise_with_other
```python
from test_pairwise import test_no_pairwise_with_other
```



---
## test_pairwise_with_series
```python
from test_pairwise import test_pairwise_with_series
```



---
## test_corr_freq_memory_error
```python
from test_pairwise import test_corr_freq_memory_error
```



---
## test_cov_mulittindex
```python
from test_pairwise import test_cov_mulittindex
```



---
## test_multindex_columns_pairwise_func
```python
from test_pairwise import test_multindex_columns_pairwise_func
```



---
## method
```python
from test_numba import method
```

method keyword in rolling/expanding/ewm constructor

---
## arithmetic_numba_supported_operators
```python
from test_numba import arithmetic_numba_supported_operators
```



---
## TestEWM
```python
from test_numba import TestEWM
```



---
## test_use_global_config
```python
from test_numba import test_use_global_config
```



---
## test_invalid_kwargs_nopython
```python
from test_numba import test_invalid_kwargs_nopython
```



---
## TestTableMethod
```python
from test_numba import TestTableMethod
```



---
## test_npfunc_no_warnings
```python
from test_numba import test_npfunc_no_warnings
```



---
## test_numba_vs_cython_apply
```python
from test_numba import test_numba_vs_cython_apply
```



---
## test_numba_vs_cython_rolling_methods
```python
from test_numba import test_numba_vs_cython_rolling_methods
```



---
## test_numba_vs_cython_expanding_methods
```python
from test_numba import test_numba_vs_cython_expanding_methods
```



---
## test_cache_apply
```python
from test_numba import test_cache_apply
```



---
## test_dont_cache_args
```python
from test_numba import test_dont_cache_args
```



---
## test_dont_cache_engine_kwargs
```python
from test_numba import test_dont_cache_engine_kwargs
```



---
## test_invalid_engine
```python
from test_numba import test_invalid_engine
```



---
## test_invalid_engine_kwargs
```python
from test_numba import test_invalid_engine_kwargs
```



---
## test_cython_vs_numba
```python
from test_numba import test_cython_vs_numba
```



---
## test_cython_vs_numba_times
```python
from test_numba import test_cython_vs_numba_times
```



---
## f
```python
from test_numba import f
```



---
## test_table_series_valueerror
```python
from test_numba import test_table_series_valueerror
```



---
## test_table_method_rolling_methods
```python
from test_numba import test_table_method_rolling_methods
```



---
## test_table_method_rolling_apply
```python
from test_numba import test_table_method_rolling_apply
```



---
## test_table_method_rolling_weighted_mean
```python
from test_numba import test_table_method_rolling_weighted_mean
```



---
## test_table_method_expanding_apply
```python
from test_numba import test_table_method_expanding_apply
```



---
## test_table_method_expanding_methods
```python
from test_numba import test_table_method_expanding_methods
```



---
## test_table_method_ewm
```python
from test_numba import test_table_method_ewm
```



---
## func_1
```python
from test_numba import func_1
```



---
## func_2
```python
from test_numba import func_2
```



---
## add
```python
from test_numba import add
```



---
## func
```python
from test_numba import func
```



---
## weighted_mean
```python
from test_numba import weighted_mean
```



---
## __name__
```python
from test_online import __name__
```



---
## TestEWM
```python
from test_online import TestEWM
```



---
## test_invalid_update
```python
from test_online import test_invalid_update
```



---
## test_online_vs_non_online_mean
```python
from test_online import test_online_vs_non_online_mean
```



---
## test_update_times_mean
```python
from test_online import test_update_times_mean
```



---
## test_ewm_notimplementederror_raises
```python
from test_online import test_ewm_notimplementederror_raises
```



---
## __name__
```python
from test_rolling_functions import __name__
```



---
## test_series
```python
from test_rolling_functions import test_series
```



---
## test_frame
```python
from test_rolling_functions import test_frame
```



---
## test_time_rule_series
```python
from test_rolling_functions import test_time_rule_series
```



---
## test_time_rule_frame
```python
from test_rolling_functions import test_time_rule_frame
```



---
## test_nans
```python
from test_rolling_functions import test_nans
```



---
## test_nans_count
```python
from test_rolling_functions import test_nans_count
```



---
## test_min_periods
```python
from test_rolling_functions import test_min_periods
```



---
## test_min_periods_count
```python
from test_rolling_functions import test_min_periods_count
```



---
## test_center
```python
from test_rolling_functions import test_center
```



---
## test_center_reindex_series
```python
from test_rolling_functions import test_center_reindex_series
```



---
## test_center_reindex_frame
```python
from test_rolling_functions import test_center_reindex_frame
```



---
## test_rolling_functions_window_non_shrinkage
```python
from test_rolling_functions import test_rolling_functions_window_non_shrinkage
```



---
## test_rolling_max_gh6297
```python
from test_rolling_functions import test_rolling_max_gh6297
```

Replicate result expected in GH #6297

---
## test_rolling_max_resample
```python
from test_rolling_functions import test_rolling_max_resample
```



---
## test_rolling_min_resample
```python
from test_rolling_functions import test_rolling_min_resample
```



---
## test_rolling_median_resample
```python
from test_rolling_functions import test_rolling_median_resample
```



---
## test_rolling_median_memory_error
```python
from test_rolling_functions import test_rolling_median_memory_error
```



---
## test_rolling_min_max_numeric_types
```python
from test_rolling_functions import test_rolling_min_max_numeric_types
```



---
## test_moment_functions_zero_length
```python
from test_rolling_functions import test_moment_functions_zero_length
```



---
## __name__
```python
from test_base_indexer import __name__
```



---
## test_bad_get_window_bounds_signature
```python
from test_base_indexer import test_bad_get_window_bounds_signature
```



---
## test_expanding_indexer
```python
from test_base_indexer import test_expanding_indexer
```



---
## test_indexer_constructor_arg
```python
from test_base_indexer import test_indexer_constructor_arg
```



---
## test_indexer_accepts_rolling_args
```python
from test_base_indexer import test_indexer_accepts_rolling_args
```



---
## test_rolling_forward_window
```python
from test_base_indexer import test_rolling_forward_window
```



---
## test_rolling_forward_skewness
```python
from test_base_indexer import test_rolling_forward_skewness
```



---
## test_rolling_forward_cov_corr
```python
from test_base_indexer import test_rolling_forward_cov_corr
```



---
## test_non_fixed_variable_window_indexer
```python
from test_base_indexer import test_non_fixed_variable_window_indexer
```



---
## test_variableoffsetwindowindexer_not_dti
```python
from test_base_indexer import test_variableoffsetwindowindexer_not_dti
```



---
## test_variableoffsetwindowindexer_not_offset
```python
from test_base_indexer import test_variableoffsetwindowindexer_not_offset
```



---
## test_fixed_forward_indexer_count
```python
from test_base_indexer import test_fixed_forward_indexer_count
```



---
## test_indexer_quantile_sum
```python
from test_base_indexer import test_indexer_quantile_sum
```



---
## test_indexers_are_reusable_after_groupby_rolling
```python
from test_base_indexer import test_indexers_are_reusable_after_groupby_rolling
```



---
## test_fixed_forward_indexer_bounds
```python
from test_base_indexer import test_fixed_forward_indexer_bounds
```



---
## test_rolling_groupby_with_fixed_forward_specific
```python
from test_base_indexer import test_rolling_groupby_with_fixed_forward_specific
```



---
## test_rolling_groupby_with_fixed_forward_many
```python
from test_base_indexer import test_rolling_groupby_with_fixed_forward_many
```



---
## test_unequal_start_end_bounds
```python
from test_base_indexer import test_unequal_start_end_bounds
```



---
## test_unequal_bounds_to_object
```python
from test_base_indexer import test_unequal_bounds_to_object
```



---
## BadIndexer
```python
from test_base_indexer import BadIndexer
```



---
## CustomIndexer
```python
from test_base_indexer import CustomIndexer
```



---
## get_window_bounds
```python
from test_base_indexer import get_window_bounds
```



---
## get_dtype
```python
from test_dtypes import get_dtype
```



---
## dtypes
```python
from test_dtypes import dtypes
```

Dtypes for window tests

---
## test_series_dtypes
```python
from test_dtypes import test_series_dtypes
```



---
## test_series_nullable_int
```python
from test_dtypes import test_series_nullable_int
```



---
## test_dataframe_dtypes
```python
from test_dtypes import test_dataframe_dtypes
```



---
## __name__
```python
from test_timeseries_window import __name__
```



---
## regular
```python
from test_timeseries_window import regular
```



---
## ragged
```python
from test_timeseries_window import ragged
```



---
## TestRollingTS
```python
from test_timeseries_window import TestRollingTS
```



---
## test_nat_axis_error
```python
from test_timeseries_window import test_nat_axis_error
```



---
## test_arrow_datetime_axis
```python
from test_timeseries_window import test_arrow_datetime_axis
```



---
## test_doc_string
```python
from test_timeseries_window import test_doc_string
```



---
## test_invalid_window_non_int
```python
from test_timeseries_window import test_invalid_window_non_int
```



---
## test_invalid_window_nonfixed
```python
from test_timeseries_window import test_invalid_window_nonfixed
```



---
## test_valid_window
```python
from test_timeseries_window import test_valid_window
```



---
## test_invalid_minp
```python
from test_timeseries_window import test_invalid_minp
```



---
## test_on
```python
from test_timeseries_window import test_on
```



---
## test_monotonic_on
```python
from test_timeseries_window import test_monotonic_on
```



---
## test_non_monotonic_on
```python
from test_timeseries_window import test_non_monotonic_on
```



---
## test_frame_on
```python
from test_timeseries_window import test_frame_on
```



---
## test_frame_on2
```python
from test_timeseries_window import test_frame_on2
```



---
## test_basic_regular
```python
from test_timeseries_window import test_basic_regular
```



---
## test_min_periods
```python
from test_timeseries_window import test_min_periods
```



---
## test_closed
```python
from test_timeseries_window import test_closed
```



---
## test_ragged_sum
```python
from test_timeseries_window import test_ragged_sum
```



---
## test_ragged_mean
```python
from test_timeseries_window import test_ragged_mean
```



---
## test_ragged_median
```python
from test_timeseries_window import test_ragged_median
```



---
## test_ragged_quantile
```python
from test_timeseries_window import test_ragged_quantile
```



---
## test_ragged_std
```python
from test_timeseries_window import test_ragged_std
```



---
## test_ragged_var
```python
from test_timeseries_window import test_ragged_var
```



---
## test_ragged_skew
```python
from test_timeseries_window import test_ragged_skew
```



---
## test_ragged_kurt
```python
from test_timeseries_window import test_ragged_kurt
```



---
## test_ragged_count
```python
from test_timeseries_window import test_ragged_count
```



---
## test_regular_min
```python
from test_timeseries_window import test_regular_min
```



---
## test_ragged_min
```python
from test_timeseries_window import test_ragged_min
```



---
## test_perf_min
```python
from test_timeseries_window import test_perf_min
```



---
## test_ragged_max
```python
from test_timeseries_window import test_ragged_max
```



---
## test_freqs_ops
```python
from test_timeseries_window import test_freqs_ops
```



---
## test_all
```python
from test_timeseries_window import test_all
```



---
## test_all2
```python
from test_timeseries_window import test_all2
```



---
## test_rolling_cov_offset
```python
from test_timeseries_window import test_rolling_cov_offset
```



---
## test_rolling_on_decreasing_index
```python
from test_timeseries_window import test_rolling_on_decreasing_index
```



---
## test_rolling_on_empty
```python
from test_timeseries_window import test_rolling_on_empty
```



---
## test_rolling_on_multi_index_level
```python
from test_timeseries_window import test_rolling_on_multi_index_level
```



---
## agg_by_day
```python
from test_timeseries_window import agg_by_day
```



---
## test_registered
```python
from test_period import test_registered
```



---
## test_asi8
```python
from test_period import test_asi8
```



---
## test_take_raises
```python
from test_period import test_take_raises
```



---
## test_fillna_raises
```python
from test_period import test_fillna_raises
```



---
## test_fillna_copies
```python
from test_period import test_fillna_copies
```



---
## test_setitem
```python
from test_period import test_setitem
```



---
## test_setitem_raises_incompatible_freq
```python
from test_period import test_setitem_raises_incompatible_freq
```



---
## test_setitem_raises_length
```python
from test_period import test_setitem_raises_length
```



---
## test_setitem_raises_type
```python
from test_period import test_setitem_raises_type
```



---
## test_sub_period
```python
from test_period import test_sub_period
```



---
## test_sub_period_overflow
```python
from test_period import test_sub_period_overflow
```



---
## test_where_different_freq_raises
```python
from test_period import test_where_different_freq_raises
```



---
## test_repr_small
```python
from test_period import test_repr_small
```



---
## test_repr_large
```python
from test_period import test_repr_large
```



---
## test_dt64_array
```python
from test_array import test_dt64_array
```



---
## test_array
```python
from test_array import test_array
```



---
## test_array_copy
```python
from test_array import test_array_copy
```



---
## test_array_inference
```python
from test_array import test_array_inference
```



---
## test_array_inference_fails
```python
from test_array import test_array_inference_fails
```



---
## test_nd_raises
```python
from test_array import test_nd_raises
```



---
## test_scalar_raises
```python
from test_array import test_scalar_raises
```



---
## test_dataframe_raises
```python
from test_array import test_dataframe_raises
```



---
## test_bounds_check
```python
from test_array import test_bounds_check
```



---
## DecimalDtype2
```python
from test_array import DecimalDtype2
```



---
## DecimalArray2
```python
from test_array import DecimalArray2
```



---
## test_array_unboxes
```python
from test_array import test_array_unboxes
```



---
## test_array_to_numpy_na
```python
from test_array import test_array_to_numpy_na
```



---
## construct_array_type
```python
from test_array import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## _from_sequence
```python
from test_array import _from_sequence
```



---
## freqstr
```python
from test_datetimelike import freqstr
```

Fixture returning parametrized frequency in string format.

---
## period_index
```python
from test_datetimelike import period_index
```

A fixture to provide PeriodIndex objects with different frequencies.

Most PeriodArray behavior is already tested in PeriodIndex tests,
so here we just test that the PeriodArray behavior matches
the PeriodIndex behavior.

---
## datetime_index
```python
from test_datetimelike import datetime_index
```

A fixture to provide DatetimeIndex objects with different frequencies.

Most DatetimeArray behavior is already tested in DatetimeIndex tests,
so here we just test that the DatetimeArray behavior matches
the DatetimeIndex behavior.

---
## timedelta_index
```python
from test_datetimelike import timedelta_index
```

A fixture to provide TimedeltaIndex objects with different frequencies.
 Most TimedeltaArray behavior is already tested in TimedeltaIndex tests,
so here we just test that the TimedeltaArray behavior matches
the TimedeltaIndex behavior.

---
## SharedTests
```python
from test_datetimelike import SharedTests
```



---
## TestDatetimeArray
```python
from test_datetimelike import TestDatetimeArray
```



---
## TestTimedeltaArray
```python
from test_datetimelike import TestTimedeltaArray
```



---
## TestPeriodArray
```python
from test_datetimelike import TestPeriodArray
```



---
## test_casting_nat_setitem_array
```python
from test_datetimelike import test_casting_nat_setitem_array
```



---
## test_invalid_nat_setitem_array
```python
from test_datetimelike import test_invalid_nat_setitem_array
```



---
## test_to_numpy_extra
```python
from test_datetimelike import test_to_numpy_extra
```



---
## test_searchsorted_datetimelike_with_listlike
```python
from test_datetimelike import test_searchsorted_datetimelike_with_listlike
```



---
## test_searchsorted_datetimelike_with_listlike_invalid_dtype
```python
from test_datetimelike import test_searchsorted_datetimelike_with_listlike_invalid_dtype
```



---
## test_period_index_construction_from_strings
```python
from test_datetimelike import test_period_index_construction_from_strings
```



---
## test_from_pandas_array
```python
from test_datetimelike import test_from_pandas_array
```



---
## arr1d
```python
from test_datetimelike import arr1d
```

Fixture returning DatetimeArray from parametrized PeriodIndex objects

---
## test_compare_len1_raises
```python
from test_datetimelike import test_compare_len1_raises
```



---
## test_compare_with_Categorical
```python
from test_datetimelike import test_compare_with_Categorical
```



---
## test_compare_categorical_dtype
```python
from test_datetimelike import test_compare_categorical_dtype
```



---
## test_take
```python
from test_datetimelike import test_take
```



---
## test_take_fill_raises
```python
from test_datetimelike import test_take_fill_raises
```



---
## test_take_fill
```python
from test_datetimelike import test_take_fill
```



---
## test_take_fill_str
```python
from test_datetimelike import test_take_fill_str
```



---
## test_concat_same_type
```python
from test_datetimelike import test_concat_same_type
```



---
## test_unbox_scalar
```python
from test_datetimelike import test_unbox_scalar
```



---
## test_check_compatible_with
```python
from test_datetimelike import test_check_compatible_with
```



---
## test_scalar_from_string
```python
from test_datetimelike import test_scalar_from_string
```



---
## test_reduce_invalid
```python
from test_datetimelike import test_reduce_invalid
```



---
## test_fillna_method_doesnt_change_orig
```python
from test_datetimelike import test_fillna_method_doesnt_change_orig
```



---
## test_searchsorted
```python
from test_datetimelike import test_searchsorted
```



---
## test_searchsorted_castable_strings
```python
from test_datetimelike import test_searchsorted_castable_strings
```



---
## test_getitem_near_implementation_bounds
```python
from test_datetimelike import test_getitem_near_implementation_bounds
```



---
## test_getitem_2d
```python
from test_datetimelike import test_getitem_2d
```



---
## test_iter_2d
```python
from test_datetimelike import test_iter_2d
```



---
## test_repr_2d
```python
from test_datetimelike import test_repr_2d
```



---
## test_setitem
```python
from test_datetimelike import test_setitem
```



---
## test_setitem_object_dtype
```python
from test_datetimelike import test_setitem_object_dtype
```



---
## test_setitem_strs
```python
from test_datetimelike import test_setitem_strs
```



---
## test_setitem_categorical
```python
from test_datetimelike import test_setitem_categorical
```



---
## test_setitem_raises
```python
from test_datetimelike import test_setitem_raises
```



---
## test_setitem_numeric_raises
```python
from test_datetimelike import test_setitem_numeric_raises
```



---
## test_inplace_arithmetic
```python
from test_datetimelike import test_inplace_arithmetic
```



---
## test_shift_fill_int_deprecated
```python
from test_datetimelike import test_shift_fill_int_deprecated
```



---
## test_median
```python
from test_datetimelike import test_median
```



---
## test_from_integer_array
```python
from test_datetimelike import test_from_integer_array
```



---
## test_round
```python
from test_datetimelike import test_round
```



---
## test_array_interface
```python
from test_datetimelike import test_array_interface
```



---
## test_array_object_dtype
```python
from test_datetimelike import test_array_object_dtype
```



---
## test_array_tz
```python
from test_datetimelike import test_array_tz
```



---
## test_array_i8_dtype
```python
from test_datetimelike import test_array_i8_dtype
```



---
## test_from_array_keeps_base
```python
from test_datetimelike import test_from_array_keeps_base
```



---
## test_from_dti
```python
from test_datetimelike import test_from_dti
```



---
## test_astype_object
```python
from test_datetimelike import test_astype_object
```



---
## test_to_period
```python
from test_datetimelike import test_to_period
```



---
## test_to_period_2d
```python
from test_datetimelike import test_to_period_2d
```



---
## test_bool_properties
```python
from test_datetimelike import test_bool_properties
```



---
## test_int_properties
```python
from test_datetimelike import test_int_properties
```



---
## test_take_fill_valid
```python
from test_datetimelike import test_take_fill_valid
```



---
## test_concat_same_type_invalid
```python
from test_datetimelike import test_concat_same_type_invalid
```



---
## test_concat_same_type_different_freq
```python
from test_datetimelike import test_concat_same_type_different_freq
```



---
## test_strftime
```python
from test_datetimelike import test_strftime
```



---
## test_strftime_nat
```python
from test_datetimelike import test_strftime_nat
```



---
## test_from_tdi
```python
from test_datetimelike import test_from_tdi
```



---
## test_to_pytimedelta
```python
from test_datetimelike import test_to_pytimedelta
```



---
## test_total_seconds
```python
from test_datetimelike import test_total_seconds
```



---
## test_from_pi
```python
from test_datetimelike import test_from_pi
```



---
## test_to_timestamp
```python
from test_datetimelike import test_to_timestamp
```



---
## test_to_timestamp_roundtrip_bday
```python
from test_datetimelike import test_to_timestamp_roundtrip_bday
```



---
## test_to_timestamp_out_of_bounds
```python
from test_datetimelike import test_to_timestamp_out_of_bounds
```



---
## __name__
```python
from masked_shared import __name__
```

Tests shared by MaskedArray subclasses.

---
## ComparisonOps
```python
from masked_shared import ComparisonOps
```



---
## NumericOps
```python
from masked_shared import NumericOps
```



---
## _compare_other
```python
from masked_shared import _compare_other
```



---
## test_scalar
```python
from masked_shared import test_scalar
```



---
## test_searchsorted_nan
```python
from masked_shared import test_searchsorted_nan
```



---
## test_no_shared_mask
```python
from masked_shared import test_no_shared_mask
```



---
## test_array
```python
from masked_shared import test_array
```



---
## test_compare_with_booleanarray
```python
from masked_shared import test_compare_with_booleanarray
```



---
## test_compare_to_string
```python
from masked_shared import test_compare_to_string
```



---
## test_ufunc_with_out
```python
from masked_shared import test_ufunc_with_out
```



---
## test_mul_td64_array
```python
from masked_shared import test_mul_td64_array
```



---
## __name__
```python
from test_timedeltas import __name__
```



---
## TestNonNano
```python
from test_timedeltas import TestNonNano
```



---
## TestTimedeltaArray
```python
from test_timedeltas import TestTimedeltaArray
```



---
## TestUnaryOps
```python
from test_timedeltas import TestUnaryOps
```



---
## unit
```python
from test_timedeltas import unit
```



---
## tda
```python
from test_timedeltas import tda
```



---
## test_non_nano
```python
from test_timedeltas import test_non_nano
```



---
## test_as_unit_raises
```python
from test_timedeltas import test_as_unit_raises
```



---
## test_fields
```python
from test_timedeltas import test_fields
```



---
## test_to_pytimedelta
```python
from test_timedeltas import test_to_pytimedelta
```



---
## test_total_seconds
```python
from test_timedeltas import test_total_seconds
```



---
## test_timedelta_array_total_seconds
```python
from test_timedeltas import test_timedelta_array_total_seconds
```



---
## test_total_seconds_nanoseconds
```python
from test_timedeltas import test_total_seconds_nanoseconds
```



---
## test_add_nat_datetimelike_scalar
```python
from test_timedeltas import test_add_nat_datetimelike_scalar
```



---
## test_add_pdnat
```python
from test_timedeltas import test_add_pdnat
```



---
## test_add_datetimelike_scalar
```python
from test_timedeltas import test_add_datetimelike_scalar
```



---
## test_mul_scalar
```python
from test_timedeltas import test_mul_scalar
```



---
## test_mul_listlike
```python
from test_timedeltas import test_mul_listlike
```



---
## test_mul_listlike_object
```python
from test_timedeltas import test_mul_listlike_object
```



---
## test_div_numeric_scalar
```python
from test_timedeltas import test_div_numeric_scalar
```



---
## test_div_td_scalar
```python
from test_timedeltas import test_div_td_scalar
```



---
## test_div_numeric_array
```python
from test_timedeltas import test_div_numeric_array
```



---
## test_div_td_array
```python
from test_timedeltas import test_div_td_array
```



---
## test_add_timedeltaarraylike
```python
from test_timedeltas import test_add_timedeltaarraylike
```



---
## test_astype_int
```python
from test_timedeltas import test_astype_int
```



---
## test_setitem_clears_freq
```python
from test_timedeltas import test_setitem_clears_freq
```



---
## test_setitem_objects
```python
from test_timedeltas import test_setitem_objects
```



---
## test_searchsorted_invalid_types
```python
from test_timedeltas import test_searchsorted_invalid_types
```



---
## test_abs
```python
from test_timedeltas import test_abs
```



---
## test_pos
```python
from test_timedeltas import test_pos
```



---
## test_neg
```python
from test_timedeltas import test_neg
```



---
## test_neg_freq
```python
from test_timedeltas import test_neg_freq
```



---
## __name__
```python
from test_ndarray_backed import __name__
```

Tests for subclasses of NDArrayBackedExtensionArray

---
## TestEmpty
```python
from test_ndarray_backed import TestEmpty
```



---
## test_empty_categorical
```python
from test_ndarray_backed import test_empty_categorical
```



---
## test_empty_dt64tz
```python
from test_ndarray_backed import test_empty_dt64tz
```



---
## test_empty_dt64
```python
from test_ndarray_backed import test_empty_dt64
```



---
## test_empty_td64
```python
from test_ndarray_backed import test_empty_td64
```



---
## test_empty_pandas_array
```python
from test_ndarray_backed import test_empty_pandas_array
```



---
## __name__
```python
from test_datetimes import __name__
```



---
## TestNonNano
```python
from test_datetimes import TestNonNano
```



---
## TestDatetimeArrayComparisons
```python
from test_datetimes import TestDatetimeArrayComparisons
```



---
## TestDatetimeArray
```python
from test_datetimes import TestDatetimeArray
```



---
## test_factorize_sort_without_freq
```python
from test_datetimes import test_factorize_sort_without_freq
```



---
## unit
```python
from test_datetimes import unit
```

Fixture returning parametrized time units

---
## dtype
```python
from test_datetimes import dtype
```



---
## dta_dti
```python
from test_datetimes import dta_dti
```



---
## dta
```python
from test_datetimes import dta
```



---
## test_non_nano
```python
from test_datetimes import test_non_nano
```



---
## test_fields
```python
from test_datetimes import test_fields
```



---
## test_normalize
```python
from test_datetimes import test_normalize
```



---
## test_simple_new_requires_match
```python
from test_datetimes import test_simple_new_requires_match
```



---
## test_std_non_nano
```python
from test_datetimes import test_std_non_nano
```



---
## test_to_period
```python
from test_datetimes import test_to_period
```



---
## test_iter
```python
from test_datetimes import test_iter
```



---
## test_astype_object
```python
from test_datetimes import test_astype_object
```



---
## test_to_pydatetime
```python
from test_datetimes import test_to_pydatetime
```



---
## test_time_date
```python
from test_datetimes import test_time_date
```



---
## test_format_native_types
```python
from test_datetimes import test_format_native_types
```



---
## test_repr
```python
from test_datetimes import test_repr
```



---
## test_compare_mismatched_resolutions
```python
from test_datetimes import test_compare_mismatched_resolutions
```



---
## test_add_mismatched_reso_doesnt_downcast
```python
from test_datetimes import test_add_mismatched_reso_doesnt_downcast
```



---
## test_add_timedeltalike_scalar_mismatched_reso
```python
from test_datetimes import test_add_timedeltalike_scalar_mismatched_reso
```



---
## test_sub_datetimelike_scalar_mismatch
```python
from test_datetimes import test_sub_datetimelike_scalar_mismatch
```



---
## test_sub_datetime64_reso_mismatch
```python
from test_datetimes import test_sub_datetime64_reso_mismatch
```



---
## test_cmp_dt64_arraylike_tznaive
```python
from test_datetimes import test_cmp_dt64_arraylike_tznaive
```



---
## test_astype_ns_to_ms_near_bounds
```python
from test_datetimes import test_astype_ns_to_ms_near_bounds
```



---
## test_astype_non_nano_tznaive
```python
from test_datetimes import test_astype_non_nano_tznaive
```



---
## test_astype_non_nano_tzaware
```python
from test_datetimes import test_astype_non_nano_tzaware
```



---
## test_astype_to_same
```python
from test_datetimes import test_astype_to_same
```



---
## test_astype_copies
```python
from test_datetimes import test_astype_copies
```



---
## test_astype_int
```python
from test_datetimes import test_astype_int
```



---
## test_astype_to_sparse_dt64
```python
from test_datetimes import test_astype_to_sparse_dt64
```



---
## test_tz_setter_raises
```python
from test_datetimes import test_tz_setter_raises
```



---
## test_setitem_str_impute_tz
```python
from test_datetimes import test_setitem_str_impute_tz
```



---
## test_setitem_different_tz_raises
```python
from test_datetimes import test_setitem_different_tz_raises
```



---
## test_setitem_clears_freq
```python
from test_datetimes import test_setitem_clears_freq
```



---
## test_setitem_objects
```python
from test_datetimes import test_setitem_objects
```



---
## test_repeat_preserves_tz
```python
from test_datetimes import test_repeat_preserves_tz
```



---
## test_value_counts_preserves_tz
```python
from test_datetimes import test_value_counts_preserves_tz
```



---
## test_fillna_preserves_tz
```python
from test_datetimes import test_fillna_preserves_tz
```



---
## test_fillna_2d
```python
from test_datetimes import test_fillna_2d
```



---
## test_array_interface_tz
```python
from test_datetimes import test_array_interface_tz
```



---
## test_array_interface
```python
from test_datetimes import test_array_interface
```



---
## test_searchsorted_different_tz
```python
from test_datetimes import test_searchsorted_different_tz
```



---
## test_searchsorted_tzawareness_compat
```python
from test_datetimes import test_searchsorted_tzawareness_compat
```



---
## test_searchsorted_invalid_types
```python
from test_datetimes import test_searchsorted_invalid_types
```



---
## test_shift_fill_value
```python
from test_datetimes import test_shift_fill_value
```



---
## test_shift_value_tzawareness_mismatch
```python
from test_datetimes import test_shift_value_tzawareness_mismatch
```



---
## test_shift_requires_tzmatch
```python
from test_datetimes import test_shift_requires_tzmatch
```



---
## test_tz_localize_t2d
```python
from test_datetimes import test_tz_localize_t2d
```



---
## test_iter_zoneinfo_fold
```python
from test_datetimes import test_iter_zoneinfo_fold
```



---
## test_date_range_frequency_M_Q_Y_A_deprecated
```python
from test_datetimes import test_date_range_frequency_M_Q_Y_A_deprecated
```



---
## test_date_range_uppercase_frequency_deprecated
```python
from test_datetimes import test_date_range_uppercase_frequency_deprecated
```



---
## test_date_range_lowercase_frequency_deprecated
```python
from test_datetimes import test_date_range_lowercase_frequency_deprecated
```



---
## not_hourly
```python
from test_period import not_hourly
```

Several timedelta-like and DateOffset instances that are _not_
compatible with Hourly frequencies.

---
## mismatched_freq
```python
from test_period import mismatched_freq
```

Several timedelta-like and DateOffset instances that are _not_
compatible with Monthly or Annual frequencies.

---
## TestPeriodArrayLikeComparisons
```python
from test_period import TestPeriodArrayLikeComparisons
```



---
## TestPeriodIndexComparisons
```python
from test_period import TestPeriodIndexComparisons
```



---
## TestPeriodSeriesComparisons
```python
from test_period import TestPeriodSeriesComparisons
```



---
## TestPeriodIndexSeriesComparisonConsistency
```python
from test_period import TestPeriodIndexSeriesComparisonConsistency
```

Test PeriodIndex and Period Series Ops consistency

---
## TestPeriodFrameArithmetic
```python
from test_period import TestPeriodFrameArithmetic
```



---
## TestPeriodIndexArithmetic
```python
from test_period import TestPeriodIndexArithmetic
```



---
## TestPeriodSeriesArithmetic
```python
from test_period import TestPeriodSeriesArithmetic
```



---
## TestPeriodIndexSeriesMethods
```python
from test_period import TestPeriodIndexSeriesMethods
```

Test PeriodIndex and Period Series Ops consistency

---
## test_eq_scalar
```python
from test_period import test_eq_scalar
```



---
## test_compare_zerodim
```python
from test_period import test_compare_zerodim
```



---
## test_compare_invalid_scalar
```python
from test_period import test_compare_invalid_scalar
```



---
## test_compare_invalid_listlike
```python
from test_period import test_compare_invalid_listlike
```



---
## test_compare_object_dtype
```python
from test_period import test_compare_object_dtype
```



---
## test_pi_cmp_period
```python
from test_period import test_pi_cmp_period
```



---
## test_parr_cmp_period_scalar2
```python
from test_period import test_parr_cmp_period_scalar2
```



---
## test_parr_cmp_period_scalar
```python
from test_period import test_parr_cmp_period_scalar
```



---
## test_parr_cmp_pi
```python
from test_period import test_parr_cmp_pi
```



---
## test_parr_cmp_pi_mismatched_freq
```python
from test_period import test_parr_cmp_pi_mismatched_freq
```



---
## test_pi_cmp_nat
```python
from test_period import test_pi_cmp_nat
```



---
## test_pi_cmp_nat_mismatched_freq_raises
```python
from test_period import test_pi_cmp_nat_mismatched_freq_raises
```



---
## test_comp_nat
```python
from test_period import test_comp_nat
```



---
## test_cmp_series_period_series_mixed_freq
```python
from test_period import test_cmp_series_period_series_mixed_freq
```



---
## _check
```python
from test_period import _check
```



---
## test_pi_comp_period
```python
from test_period import test_pi_comp_period
```



---
## test_pi_comp_period_nat
```python
from test_period import test_pi_comp_period_nat
```



---
## test_ops_frame_period
```python
from test_period import test_ops_frame_period
```



---
## test_parr_add_iadd_parr_raises
```python
from test_period import test_parr_add_iadd_parr_raises
```



---
## test_pi_sub_isub_pi
```python
from test_period import test_pi_sub_isub_pi
```



---
## test_pi_sub_pi_with_nat
```python
from test_period import test_pi_sub_pi_with_nat
```



---
## test_parr_sub_pi_mismatched_freq
```python
from test_period import test_parr_sub_pi_mismatched_freq
```



---
## test_sub_n_gt_1_ticks
```python
from test_period import test_sub_n_gt_1_ticks
```



---
## test_sub_n_gt_1_offsets
```python
from test_period import test_sub_n_gt_1_offsets
```



---
## test_parr_add_sub_invalid
```python
from test_period import test_parr_add_sub_invalid
```



---
## test_pi_add_sub_td64_array_non_tick_raises
```python
from test_period import test_pi_add_sub_td64_array_non_tick_raises
```



---
## test_pi_add_sub_td64_array_tick
```python
from test_period import test_pi_add_sub_td64_array_tick
```



---
## test_parr_sub_td64array
```python
from test_period import test_parr_sub_td64array
```



---
## test_pi_add_offset_array
```python
from test_period import test_pi_add_offset_array
```



---
## test_pi_sub_offset_array
```python
from test_period import test_pi_sub_offset_array
```



---
## test_pi_add_iadd_int
```python
from test_period import test_pi_add_iadd_int
```



---
## test_pi_sub_isub_int
```python
from test_period import test_pi_sub_isub_int
```

PeriodIndex.__sub__ and __isub__ with several representations of
the integer 1, e.g. int, np.int64, np.uint8, ...

---
## test_pi_sub_intlike
```python
from test_period import test_pi_sub_intlike
```



---
## test_pi_add_sub_int_array_freqn_gt1
```python
from test_period import test_pi_add_sub_int_array_freqn_gt1
```



---
## test_pi_sub_isub_offset
```python
from test_period import test_pi_sub_isub_offset
```



---
## test_pi_add_offset_n_gt1
```python
from test_period import test_pi_add_offset_n_gt1
```



---
## test_pi_add_offset_n_gt1_not_divisible
```python
from test_period import test_pi_add_offset_n_gt1_not_divisible
```



---
## test_pi_add_intarray
```python
from test_period import test_pi_add_intarray
```



---
## test_pi_sub_intarray
```python
from test_period import test_pi_sub_intarray
```



---
## test_parr_add_timedeltalike_minute_gt1
```python
from test_period import test_parr_add_timedeltalike_minute_gt1
```



---
## test_parr_add_timedeltalike_tick_gt1
```python
from test_period import test_parr_add_timedeltalike_tick_gt1
```



---
## test_pi_add_iadd_timedeltalike_daily
```python
from test_period import test_pi_add_iadd_timedeltalike_daily
```



---
## test_pi_sub_isub_timedeltalike_daily
```python
from test_period import test_pi_sub_isub_timedeltalike_daily
```



---
## test_parr_add_sub_timedeltalike_freq_mismatch_daily
```python
from test_period import test_parr_add_sub_timedeltalike_freq_mismatch_daily
```



---
## test_pi_add_iadd_timedeltalike_hourly
```python
from test_period import test_pi_add_iadd_timedeltalike_hourly
```



---
## test_parr_add_timedeltalike_mismatched_freq_hourly
```python
from test_period import test_parr_add_timedeltalike_mismatched_freq_hourly
```



---
## test_pi_sub_isub_timedeltalike_hourly
```python
from test_period import test_pi_sub_isub_timedeltalike_hourly
```



---
## test_add_iadd_timedeltalike_annual
```python
from test_period import test_add_iadd_timedeltalike_annual
```



---
## test_pi_add_sub_timedeltalike_freq_mismatch_annual
```python
from test_period import test_pi_add_sub_timedeltalike_freq_mismatch_annual
```



---
## test_pi_add_iadd_timedeltalike_M
```python
from test_period import test_pi_add_iadd_timedeltalike_M
```



---
## test_pi_add_sub_timedeltalike_freq_mismatch_monthly
```python
from test_period import test_pi_add_sub_timedeltalike_freq_mismatch_monthly
```



---
## test_parr_add_sub_td64_nat
```python
from test_period import test_parr_add_sub_td64_nat
```



---
## test_parr_add_sub_tdt64_nat_array
```python
from test_period import test_parr_add_sub_tdt64_nat_array
```



---
## test_parr_add_sub_index
```python
from test_period import test_parr_add_sub_index
```



---
## test_parr_add_sub_object_array
```python
from test_period import test_parr_add_sub_object_array
```



---
## test_period_add_timestamp_raises
```python
from test_period import test_period_add_timestamp_raises
```



---
## test_parr_add_timedeltalike_scalar
```python
from test_period import test_parr_add_timedeltalike_scalar
```



---
## test_ops_series_period
```python
from test_period import test_ops_series_period
```



---
## test_pi_ops
```python
from test_period import test_pi_ops
```



---
## test_parr_ops_errors
```python
from test_period import test_parr_ops_errors
```



---
## test_pi_ops_nat
```python
from test_period import test_pi_ops_nat
```



---
## test_pi_ops_array_int
```python
from test_period import test_pi_ops_array_int
```



---
## test_pi_ops_offset
```python
from test_period import test_pi_ops_offset
```



---
## test_pi_offset_errors
```python
from test_period import test_pi_offset_errors
```



---
## test_pi_sub_period
```python
from test_period import test_pi_sub_period
```



---
## test_pi_sub_pdnat
```python
from test_period import test_pi_sub_pdnat
```



---
## test_pi_sub_period_nat
```python
from test_period import test_pi_sub_period_nat
```



---
## one
```python
from conftest import one
```

Several variants of integer value 1. The zero-dim integer array
behaves like an integer.

This fixture can be used to check that datetimelike indexes handle
addition and subtraction of integers and zero-dimensional arrays
of integers.

Examples
--------
dti = pd.date_range('2016-01-01', periods=2, freq='h')
dti
DatetimeIndex(['2016-01-01 00:00:00', '2016-01-01 01:00:00'],
dtype='datetime64[ns]', freq='h')
dti + one
DatetimeIndex(['2016-01-01 01:00:00', '2016-01-01 02:00:00'],
dtype='datetime64[ns]', freq='h')

---
## zero
```python
from conftest import zero
```

Several types of scalar zeros and length 5 vectors of zeros.

This fixture can be used to check that numeric-dtype indexes handle
division by any zero numeric-dtype.

Uses vector of length 5 for broadcasting with `numeric_idx` fixture,
which creates numeric-dtype vectors also of length 5.

Examples
--------
arr = RangeIndex(5)
arr / zeros
Index([nan, inf, inf, inf, inf], dtype='float64')

---
## scalar_td
```python
from conftest import scalar_td
```

Several variants of Timedelta scalars representing 10 minutes and 7 seconds.

---
## three_days
```python
from conftest import three_days
```

Several timedelta-like and DateOffset objects that each represent
a 3-day timedelta

---
## two_hours
```python
from conftest import two_hours
```

Several timedelta-like and DateOffset objects that each represent
a 2-hour timedelta

---
## not_daily
```python
from conftest import not_daily
```

Several timedelta-like and DateOffset instances that are _not_
compatible with Daily frequencies.

---
## __name__
```python
from test_datetime64 import __name__
```



---
## TestDatetime64ArrayLikeComparisons
```python
from test_datetime64 import TestDatetime64ArrayLikeComparisons
```



---
## TestDatetime64SeriesComparison
```python
from test_datetime64 import TestDatetime64SeriesComparison
```



---
## TestDatetimeIndexComparisons
```python
from test_datetime64 import TestDatetimeIndexComparisons
```



---
## TestDatetime64Arithmetic
```python
from test_datetime64 import TestDatetime64Arithmetic
```



---
## TestDatetime64DateOffsetArithmetic
```python
from test_datetime64 import TestDatetime64DateOffsetArithmetic
```



---
## TestDatetime64OverflowHandling
```python
from test_datetime64 import TestDatetime64OverflowHandling
```



---
## TestTimestampSeriesArithmetic
```python
from test_datetime64 import TestTimestampSeriesArithmetic
```



---
## TestDatetimeIndexArithmetic
```python
from test_datetime64 import TestDatetimeIndexArithmetic
```



---
## test_shift_months
```python
from test_datetime64 import test_shift_months
```



---
## test_dt64arr_addsub_object_dtype_2d
```python
from test_datetime64 import test_dt64arr_addsub_object_dtype_2d
```



---
## test_non_nano_dt64_addsub_np_nat_scalars
```python
from test_datetime64 import test_non_nano_dt64_addsub_np_nat_scalars
```



---
## test_non_nano_dt64_addsub_np_nat_scalars_unitless
```python
from test_datetime64 import test_non_nano_dt64_addsub_np_nat_scalars_unitless
```



---
## test_non_nano_dt64_addsub_np_nat_scalars_unsupported_unit
```python
from test_datetime64 import test_non_nano_dt64_addsub_np_nat_scalars_unsupported_unit
```



---
## test_compare_zerodim
```python
from test_datetime64 import test_compare_zerodim
```



---
## test_dt64arr_cmp_scalar_invalid
```python
from test_datetime64 import test_dt64arr_cmp_scalar_invalid
```



---
## test_dt64arr_cmp_arraylike_invalid
```python
from test_datetime64 import test_dt64arr_cmp_arraylike_invalid
```



---
## test_dt64arr_cmp_mixed_invalid
```python
from test_datetime64 import test_dt64arr_cmp_mixed_invalid
```



---
## test_dt64arr_nat_comparison
```python
from test_datetime64 import test_dt64arr_nat_comparison
```



---
## test_nat_comparisons
```python
from test_datetime64 import test_nat_comparisons
```



---
## test_nat_comparisons_scalar
```python
from test_datetime64 import test_nat_comparisons_scalar
```



---
## test_series_comparison_scalars
```python
from test_datetime64 import test_series_comparison_scalars
```



---
## test_timestamp_compare_series
```python
from test_datetime64 import test_timestamp_compare_series
```



---
## test_dt64arr_timestamp_equality
```python
from test_datetime64 import test_dt64arr_timestamp_equality
```



---
## test_dt64_compare_datetime_scalar
```python
from test_datetime64 import test_dt64_compare_datetime_scalar
```



---
## test_comparators
```python
from test_datetime64 import test_comparators
```



---
## test_dti_cmp_datetimelike
```python
from test_datetime64 import test_dti_cmp_datetimelike
```



---
## test_dti_cmp_nat
```python
from test_datetime64 import test_dti_cmp_nat
```



---
## test_dti_cmp_nat_behaves_like_float_cmp_nan
```python
from test_datetime64 import test_dti_cmp_nat_behaves_like_float_cmp_nan
```



---
## test_comparison_tzawareness_compat
```python
from test_datetime64 import test_comparison_tzawareness_compat
```



---
## test_comparison_tzawareness_compat_scalars
```python
from test_datetime64 import test_comparison_tzawareness_compat_scalars
```



---
## test_scalar_comparison_tzawareness
```python
from test_datetime64 import test_scalar_comparison_tzawareness
```



---
## test_nat_comparison_tzawareness
```python
from test_datetime64 import test_nat_comparison_tzawareness
```



---
## test_dti_cmp_str
```python
from test_datetime64 import test_dti_cmp_str
```



---
## test_dti_cmp_list
```python
from test_datetime64 import test_dti_cmp_list
```



---
## test_dti_cmp_tdi_tzawareness
```python
from test_datetime64 import test_dti_cmp_tdi_tzawareness
```



---
## test_dti_cmp_object_dtype
```python
from test_datetime64 import test_dti_cmp_object_dtype
```



---
## test_dt64arr_add_timedeltalike_scalar
```python
from test_datetime64 import test_dt64arr_add_timedeltalike_scalar
```



---
## test_dt64arr_sub_timedeltalike_scalar
```python
from test_datetime64 import test_dt64arr_sub_timedeltalike_scalar
```



---
## test_dt64_array_sub_dt_with_different_timezone
```python
from test_datetime64 import test_dt64_array_sub_dt_with_different_timezone
```



---
## test_dt64_array_sub_dt64_array_with_different_timezone
```python
from test_datetime64 import test_dt64_array_sub_dt64_array_with_different_timezone
```



---
## test_dt64arr_add_sub_td64_nat
```python
from test_datetime64 import test_dt64arr_add_sub_td64_nat
```



---
## test_dt64arr_add_sub_td64ndarray
```python
from test_datetime64 import test_dt64arr_add_sub_td64ndarray
```



---
## test_dt64arr_sub_dtscalar
```python
from test_datetime64 import test_dt64arr_sub_dtscalar
```



---
## test_dt64arr_sub_timestamp_tzaware
```python
from test_datetime64 import test_dt64arr_sub_timestamp_tzaware
```



---
## test_dt64arr_sub_NaT
```python
from test_datetime64 import test_dt64arr_sub_NaT
```



---
## test_dt64arr_sub_dt64object_array
```python
from test_datetime64 import test_dt64arr_sub_dt64object_array
```



---
## test_dt64arr_naive_sub_dt64ndarray
```python
from test_datetime64 import test_dt64arr_naive_sub_dt64ndarray
```



---
## test_dt64arr_aware_sub_dt64ndarray_raises
```python
from test_datetime64 import test_dt64arr_aware_sub_dt64ndarray_raises
```



---
## test_dt64arr_add_dtlike_raises
```python
from test_datetime64 import test_dt64arr_add_dtlike_raises
```



---
## test_dt64arr_addsub_intlike
```python
from test_datetime64 import test_dt64arr_addsub_intlike
```



---
## test_dt64arr_add_sub_invalid
```python
from test_datetime64 import test_dt64arr_add_sub_invalid
```



---
## test_dt64arr_add_sub_parr
```python
from test_datetime64 import test_dt64arr_add_sub_parr
```



---
## test_dt64arr_addsub_time_objects_raises
```python
from test_datetime64 import test_dt64arr_addsub_time_objects_raises
```



---
## test_dt64_mul_div_numeric_invalid
```python
from test_datetime64 import test_dt64_mul_div_numeric_invalid
```



---
## test_dt64arr_series_add_tick_DateOffset
```python
from test_datetime64 import test_dt64arr_series_add_tick_DateOffset
```



---
## test_dt64arr_series_sub_tick_DateOffset
```python
from test_datetime64 import test_dt64arr_series_sub_tick_DateOffset
```



---
## test_dt64arr_add_sub_tick_DateOffset_smoke
```python
from test_datetime64 import test_dt64arr_add_sub_tick_DateOffset_smoke
```



---
## test_dti_add_tick_tzaware
```python
from test_datetime64 import test_dti_add_tick_tzaware
```



---
## test_dt64arr_add_sub_relativedelta_offsets
```python
from test_datetime64 import test_dt64arr_add_sub_relativedelta_offsets
```



---
## test_dt64arr_add_sub_DateOffsets
```python
from test_datetime64 import test_dt64arr_add_sub_DateOffsets
```



---
## test_dt64arr_add_sub_offset_array
```python
from test_datetime64 import test_dt64arr_add_sub_offset_array
```



---
## test_dti_add_sub_nonzero_mth_offset
```python
from test_datetime64 import test_dti_add_sub_nonzero_mth_offset
```



---
## test_dt64arr_series_add_DateOffset_with_milli
```python
from test_datetime64 import test_dt64arr_series_add_DateOffset_with_milli
```



---
## test_dt64_overflow_masking
```python
from test_datetime64 import test_dt64_overflow_masking
```



---
## test_dt64_series_arith_overflow
```python
from test_datetime64 import test_dt64_series_arith_overflow
```



---
## test_datetimeindex_sub_timestamp_overflow
```python
from test_datetime64 import test_datetimeindex_sub_timestamp_overflow
```



---
## test_datetimeindex_sub_datetimeindex_overflow
```python
from test_datetime64 import test_datetimeindex_sub_datetimeindex_overflow
```



---
## test_empty_series_add_sub
```python
from test_datetime64 import test_empty_series_add_sub
```



---
## test_operators_datetimelike
```python
from test_datetime64 import test_operators_datetimelike
```



---
## test_dt64ser_sub_datetime_dtype
```python
from test_datetime64 import test_dt64ser_sub_datetime_dtype
```



---
## test_operators_datetimelike_invalid
```python
from test_datetime64 import test_operators_datetimelike_invalid
```



---
## test_sub_single_tz
```python
from test_datetime64 import test_sub_single_tz
```



---
## test_dt64tz_series_sub_dtitz
```python
from test_datetime64 import test_dt64tz_series_sub_dtitz
```



---
## test_sub_datetime_compat
```python
from test_datetime64 import test_sub_datetime_compat
```



---
## test_dt64_series_add_mixed_tick_DateOffset
```python
from test_datetime64 import test_dt64_series_add_mixed_tick_DateOffset
```



---
## test_datetime64_ops_nat
```python
from test_datetime64 import test_datetime64_ops_nat
```



---
## test_operators_datetimelike_with_timezones
```python
from test_datetime64 import test_operators_datetimelike_with_timezones
```



---
## test_dti_add_tdi
```python
from test_datetime64 import test_dti_add_tdi
```



---
## test_dti_iadd_tdi
```python
from test_datetime64 import test_dti_iadd_tdi
```



---
## test_dti_sub_tdi
```python
from test_datetime64 import test_dti_sub_tdi
```



---
## test_dti_isub_tdi
```python
from test_datetime64 import test_dti_isub_tdi
```



---
## test_dta_add_sub_index
```python
from test_datetime64 import test_dta_add_sub_index
```



---
## test_sub_dti_dti
```python
from test_datetime64 import test_sub_dti_dti
```



---
## test_timedelta64_equal_timedelta_supported_ops
```python
from test_datetime64 import test_timedelta64_equal_timedelta_supported_ops
```



---
## test_ops_nat_mixed_datetime64_timedelta64
```python
from test_datetime64 import test_ops_nat_mixed_datetime64_timedelta64
```



---
## test_ufunc_coercions
```python
from test_datetime64 import test_ufunc_coercions
```



---
## test_dti_add_series
```python
from test_datetime64 import test_dti_add_series
```



---
## test_dti_addsub_offset_arraylike
```python
from test_datetime64 import test_dti_addsub_offset_arraylike
```



---
## test_dti_addsub_object_arraylike
```python
from test_datetime64 import test_dti_addsub_object_arraylike
```



---
## timedelta64
```python
from test_datetime64 import timedelta64
```



---
## __name__
```python
from test_timedelta64 import __name__
```



---
## assert_dtype
```python
from test_timedelta64 import assert_dtype
```

Helper to check the dtype for a Series, Index, or single-column DataFrame.

---
## get_expected_name
```python
from test_timedelta64 import get_expected_name
```



---
## TestTimedelta64ArrayLikeComparisons
```python
from test_timedelta64 import TestTimedelta64ArrayLikeComparisons
```



---
## TestTimedelta64ArrayComparisons
```python
from test_timedelta64 import TestTimedelta64ArrayComparisons
```



---
## TestTimedelta64ArithmeticUnsorted
```python
from test_timedelta64 import TestTimedelta64ArithmeticUnsorted
```



---
## TestAddSubNaTMasking
```python
from test_timedelta64 import TestAddSubNaTMasking
```



---
## TestTimedeltaArraylikeAddSubOps
```python
from test_timedelta64 import TestTimedeltaArraylikeAddSubOps
```



---
## TestTimedeltaArraylikeMulDivOps
```python
from test_timedelta64 import TestTimedeltaArraylikeMulDivOps
```



---
## TestTimedelta64ArrayLikeArithmetic
```python
from test_timedelta64 import TestTimedelta64ArrayLikeArithmetic
```



---
## test_add_timestamp_to_timedelta
```python
from test_timedelta64 import test_add_timestamp_to_timedelta
```



---
## test_compare_timedelta64_zerodim
```python
from test_timedelta64 import test_compare_timedelta64_zerodim
```



---
## test_compare_timedeltalike_scalar
```python
from test_timedelta64 import test_compare_timedeltalike_scalar
```



---
## test_td64_comparisons_invalid
```python
from test_timedelta64 import test_td64_comparisons_invalid
```



---
## test_td64arr_cmp_arraylike_invalid
```python
from test_timedelta64 import test_td64arr_cmp_arraylike_invalid
```



---
## test_td64arr_cmp_mixed_invalid
```python
from test_timedelta64 import test_td64arr_cmp_mixed_invalid
```



---
## test_comp_nat
```python
from test_timedelta64 import test_comp_nat
```



---
## test_comparisons_nat
```python
from test_timedelta64 import test_comparisons_nat
```



---
## test_comparisons_coverage
```python
from test_timedelta64 import test_comparisons_coverage
```



---
## test_ufunc_coercions
```python
from test_timedelta64 import test_ufunc_coercions
```



---
## test_subtraction_ops
```python
from test_timedelta64 import test_subtraction_ops
```



---
## test_subtraction_ops_with_tz
```python
from test_timedelta64 import test_subtraction_ops_with_tz
```



---
## test_dti_tdi_numeric_ops
```python
from test_timedelta64 import test_dti_tdi_numeric_ops
```



---
## test_addition_ops
```python
from test_timedelta64 import test_addition_ops
```



---
## test_timedelta
```python
from test_timedelta64 import test_timedelta
```



---
## test_timedelta_tick_arithmetic
```python
from test_timedelta64 import test_timedelta_tick_arithmetic
```



---
## test_tda_add_sub_index
```python
from test_timedelta64 import test_tda_add_sub_index
```



---
## test_tda_add_dt64_object_array
```python
from test_timedelta64 import test_tda_add_dt64_object_array
```



---
## test_tdi_iadd_timedeltalike
```python
from test_timedelta64 import test_tdi_iadd_timedeltalike
```



---
## test_tdi_isub_timedeltalike
```python
from test_timedelta64 import test_tdi_isub_timedeltalike
```



---
## test_tdi_ops_attributes
```python
from test_timedelta64 import test_tdi_ops_attributes
```



---
## test_tdarr_add_timestamp_nat_masking
```python
from test_timedelta64 import test_tdarr_add_timestamp_nat_masking
```



---
## test_tdi_add_overflow
```python
from test_timedelta64 import test_tdi_add_overflow
```



---
## test_sub_nat_retain_unit
```python
from test_timedelta64 import test_sub_nat_retain_unit
```



---
## test_timedelta_ops_with_missing_values
```python
from test_timedelta64 import test_timedelta_ops_with_missing_values
```



---
## test_operators_timedelta64
```python
from test_timedelta64 import test_operators_timedelta64
```



---
## test_timedelta64_ops_nat
```python
from test_timedelta64 import test_timedelta64_ops_nat
```



---
## test_td64arr_add_sub_datetimelike_scalar
```python
from test_timedelta64 import test_td64arr_add_sub_datetimelike_scalar
```



---
## test_td64arr_add_datetime64_nat
```python
from test_timedelta64 import test_td64arr_add_datetime64_nat
```



---
## test_td64arr_sub_dt64_array
```python
from test_timedelta64 import test_td64arr_sub_dt64_array
```



---
## test_td64arr_add_dt64_array
```python
from test_timedelta64 import test_td64arr_add_dt64_array
```



---
## test_td64arr_sub_periodlike
```python
from test_timedelta64 import test_td64arr_sub_periodlike
```



---
## test_td64arr_addsub_numeric_scalar_invalid
```python
from test_timedelta64 import test_td64arr_addsub_numeric_scalar_invalid
```



---
## test_td64arr_addsub_numeric_arr_invalid
```python
from test_timedelta64 import test_td64arr_addsub_numeric_arr_invalid
```



---
## test_td64arr_add_sub_int
```python
from test_timedelta64 import test_td64arr_add_sub_int
```



---
## test_td64arr_add_sub_integer_array
```python
from test_timedelta64 import test_td64arr_add_sub_integer_array
```



---
## test_td64arr_addsub_integer_array_no_freq
```python
from test_timedelta64 import test_td64arr_addsub_integer_array_no_freq
```



---
## test_td64arr_add_sub_td64_array
```python
from test_timedelta64 import test_td64arr_add_sub_td64_array
```



---
## test_td64arr_add_sub_tdi
```python
from test_timedelta64 import test_td64arr_add_sub_tdi
```



---
## test_td64arr_add_sub_td64_nat
```python
from test_timedelta64 import test_td64arr_add_sub_td64_nat
```



---
## test_td64arr_add_timedeltalike
```python
from test_timedelta64 import test_td64arr_add_timedeltalike
```



---
## test_td64arr_sub_timedeltalike
```python
from test_timedelta64 import test_td64arr_sub_timedeltalike
```



---
## test_td64arr_add_sub_offset_index
```python
from test_timedelta64 import test_td64arr_add_sub_offset_index
```



---
## test_td64arr_add_sub_offset_array
```python
from test_timedelta64 import test_td64arr_add_sub_offset_array
```



---
## test_td64arr_with_offset_series
```python
from test_timedelta64 import test_td64arr_with_offset_series
```



---
## test_td64arr_addsub_anchored_offset_arraylike
```python
from test_timedelta64 import test_td64arr_addsub_anchored_offset_arraylike
```



---
## test_td64arr_add_sub_object_array
```python
from test_timedelta64 import test_td64arr_add_sub_object_array
```



---
## test_td64arr_mul_int
```python
from test_timedelta64 import test_td64arr_mul_int
```



---
## test_td64arr_mul_tdlike_scalar_raises
```python
from test_timedelta64 import test_td64arr_mul_tdlike_scalar_raises
```



---
## test_tdi_mul_int_array_zerodim
```python
from test_timedelta64 import test_tdi_mul_int_array_zerodim
```



---
## test_tdi_mul_int_array
```python
from test_timedelta64 import test_tdi_mul_int_array
```



---
## test_tdi_mul_int_series
```python
from test_timedelta64 import test_tdi_mul_int_series
```



---
## test_tdi_mul_float_series
```python
from test_timedelta64 import test_tdi_mul_float_series
```



---
## test_tdi_rmul_arraylike
```python
from test_timedelta64 import test_tdi_rmul_arraylike
```



---
## test_td64arr_div_nat_invalid
```python
from test_timedelta64 import test_td64arr_div_nat_invalid
```



---
## test_td64arr_div_td64nat
```python
from test_timedelta64 import test_td64arr_div_td64nat
```



---
## test_td64arr_div_int
```python
from test_timedelta64 import test_td64arr_div_int
```



---
## test_td64arr_div_tdlike_scalar
```python
from test_timedelta64 import test_td64arr_div_tdlike_scalar
```



---
## test_td64arr_div_td64_scalar
```python
from test_timedelta64 import test_td64arr_div_td64_scalar
```



---
## test_td64arr_div_tdlike_scalar_with_nat
```python
from test_timedelta64 import test_td64arr_div_tdlike_scalar_with_nat
```



---
## test_td64arr_div_td64_ndarray
```python
from test_timedelta64 import test_td64arr_div_td64_ndarray
```



---
## test_tdarr_div_length_mismatch
```python
from test_timedelta64 import test_tdarr_div_length_mismatch
```



---
## test_td64_div_object_mixed_result
```python
from test_timedelta64 import test_td64_div_object_mixed_result
```



---
## test_td64arr_floordiv_td64arr_with_nat
```python
from test_timedelta64 import test_td64arr_floordiv_td64arr_with_nat
```



---
## test_td64arr_floordiv_tdscalar
```python
from test_timedelta64 import test_td64arr_floordiv_tdscalar
```



---
## test_td64arr_floordiv_int
```python
from test_timedelta64 import test_td64arr_floordiv_int
```



---
## test_td64arr_mod_tdscalar
```python
from test_timedelta64 import test_td64arr_mod_tdscalar
```



---
## test_td64arr_mod_int
```python
from test_timedelta64 import test_td64arr_mod_int
```



---
## test_td64arr_rmod_tdscalar
```python
from test_timedelta64 import test_td64arr_rmod_tdscalar
```



---
## test_td64arr_mul_tdscalar_invalid
```python
from test_timedelta64 import test_td64arr_mul_tdscalar_invalid
```



---
## test_td64arr_mul_too_short_raises
```python
from test_timedelta64 import test_td64arr_mul_too_short_raises
```



---
## test_td64arr_mul_td64arr_raises
```python
from test_timedelta64 import test_td64arr_mul_td64arr_raises
```



---
## test_td64arr_mul_numeric_scalar
```python
from test_timedelta64 import test_td64arr_mul_numeric_scalar
```



---
## test_td64arr_div_numeric_scalar
```python
from test_timedelta64 import test_td64arr_div_numeric_scalar
```



---
## test_td64arr_floordiv_numeric_scalar
```python
from test_timedelta64 import test_td64arr_floordiv_numeric_scalar
```



---
## test_td64arr_rmul_numeric_array
```python
from test_timedelta64 import test_td64arr_rmul_numeric_array
```



---
## test_td64arr_div_numeric_array
```python
from test_timedelta64 import test_td64arr_div_numeric_array
```



---
## test_td64arr_mul_int_series
```python
from test_timedelta64 import test_td64arr_mul_int_series
```



---
## test_float_series_rdiv_td64arr
```python
from test_timedelta64 import test_float_series_rdiv_td64arr
```



---
## test_td64arr_all_nat_div_object_dtype_numeric
```python
from test_timedelta64 import test_td64arr_all_nat_div_object_dtype_numeric
```



---
## test_td64arr_pow_invalid
```python
from test_timedelta64 import test_td64arr_pow_invalid
```



---
## _check
```python
from test_timedelta64 import _check
```



---
## TestCategoricalComparisons
```python
from test_categorical import TestCategoricalComparisons
```



---
## test_categorical_nan_equality
```python
from test_categorical import test_categorical_nan_equality
```



---
## test_categorical_tuple_equality
```python
from test_categorical import test_categorical_tuple_equality
```



---
## left_right_dtypes
```python
from test_interval import left_right_dtypes
```

Fixture for building an IntervalArray from various dtypes

---
## interval_array
```python
from test_interval import interval_array
```

Fixture to generate an IntervalArray of various dtypes containing NA if possible

---
## create_categorical_intervals
```python
from test_interval import create_categorical_intervals
```



---
## create_series_intervals
```python
from test_interval import create_series_intervals
```



---
## create_series_categorical_intervals
```python
from test_interval import create_series_categorical_intervals
```



---
## TestComparison
```python
from test_interval import TestComparison
```



---
## op
```python
from test_interval import op
```



---
## interval_constructor
```python
from test_interval import interval_constructor
```

Fixture for all pandas native interval constructors.
To be used as the LHS of IntervalArray comparisons.

---
## elementwise_comparison
```python
from test_interval import elementwise_comparison
```

Helper that performs elementwise comparisons between `array` and `other`

---
## test_compare_scalar_interval
```python
from test_interval import test_compare_scalar_interval
```



---
## test_compare_scalar_interval_mixed_closed
```python
from test_interval import test_compare_scalar_interval_mixed_closed
```



---
## test_compare_scalar_na
```python
from test_interval import test_compare_scalar_na
```



---
## test_compare_scalar_other
```python
from test_interval import test_compare_scalar_other
```



---
## test_compare_list_like_interval
```python
from test_interval import test_compare_list_like_interval
```



---
## test_compare_list_like_interval_mixed_closed
```python
from test_interval import test_compare_list_like_interval_mixed_closed
```



---
## test_compare_list_like_object
```python
from test_interval import test_compare_list_like_object
```



---
## test_compare_list_like_nan
```python
from test_interval import test_compare_list_like_nan
```



---
## test_compare_list_like_other
```python
from test_interval import test_compare_list_like_other
```



---
## test_compare_length_mismatch_errors
```python
from test_interval import test_compare_length_mismatch_errors
```



---
## test_index_series_compat
```python
from test_interval import test_index_series_compat
```



---
## test_comparison_operations
```python
from test_interval import test_comparison_operations
```



---
## switch_numexpr_min_elements
```python
from test_numeric import switch_numexpr_min_elements
```



---
## box_pandas_1d_array
```python
from test_numeric import box_pandas_1d_array
```

Fixture to test behavior for Index, Series and tm.to_array classes

---
## numeric_idx
```python
from test_numeric import numeric_idx
```

Several types of numeric-dtypes Index objects

---
## box_1d_array
```python
from test_numeric import box_1d_array
```

Fixture to test behavior for Index, Series, tm.to_array, numpy Array and list
classes

---
## adjust_negative_zero
```python
from test_numeric import adjust_negative_zero
```

Helper to adjust the expected result if we are dividing by -0.0
as opposed to 0.0

---
## compare_op
```python
from test_numeric import compare_op
```



---
## TestNumericComparisons
```python
from test_numeric import TestNumericComparisons
```



---
## TestNumericArraylikeArithmeticWithDatetimeLike
```python
from test_numeric import TestNumericArraylikeArithmeticWithDatetimeLike
```



---
## TestDivisionByZero
```python
from test_numeric import TestDivisionByZero
```



---
## TestMultiplicationDivision
```python
from test_numeric import TestMultiplicationDivision
```



---
## TestAdditionSubtraction
```python
from test_numeric import TestAdditionSubtraction
```



---
## TestUFuncCompat
```python
from test_numeric import TestUFuncCompat
```



---
## TestObjectDtypeEquivalence
```python
from test_numeric import TestObjectDtypeEquivalence
```



---
## TestNumericArithmeticUnsorted
```python
from test_numeric import TestNumericArithmeticUnsorted
```



---
## test_fill_value_inf_masking
```python
from test_numeric import test_fill_value_inf_masking
```



---
## test_dataframe_div_silenced
```python
from test_numeric import test_dataframe_div_silenced
```



---
## test_integer_array_add_list_like
```python
from test_numeric import test_integer_array_add_list_like
```



---
## test_sub_multiindex_swapped_levels
```python
from test_numeric import test_sub_multiindex_swapped_levels
```



---
## test_empty_str_comparison
```python
from test_numeric import test_empty_str_comparison
```



---
## test_series_add_sub_with_UInt64
```python
from test_numeric import test_series_add_sub_with_UInt64
```



---
## test_operator_series_comparison_zerorank
```python
from test_numeric import test_operator_series_comparison_zerorank
```



---
## test_df_numeric_cmp_dt64_raises
```python
from test_numeric import test_df_numeric_cmp_dt64_raises
```



---
## test_compare_invalid
```python
from test_numeric import test_compare_invalid
```



---
## test_numeric_cmp_string_numexpr_path
```python
from test_numeric import test_numeric_cmp_string_numexpr_path
```



---
## test_mul_td64arr
```python
from test_numeric import test_mul_td64arr
```



---
## test_div_td64arr
```python
from test_numeric import test_div_td64arr
```



---
## test_numeric_arr_mul_tdscalar
```python
from test_numeric import test_numeric_arr_mul_tdscalar
```



---
## test_numeric_arr_mul_tdscalar_numexpr_path
```python
from test_numeric import test_numeric_arr_mul_tdscalar_numexpr_path
```



---
## test_numeric_arr_rdiv_tdscalar
```python
from test_numeric import test_numeric_arr_rdiv_tdscalar
```



---
## test_add_sub_datetimedeltalike_invalid
```python
from test_numeric import test_add_sub_datetimedeltalike_invalid
```



---
## test_div_zero
```python
from test_numeric import test_div_zero
```



---
## test_floordiv_zero
```python
from test_numeric import test_floordiv_zero
```



---
## test_mod_zero
```python
from test_numeric import test_mod_zero
```



---
## test_divmod_zero
```python
from test_numeric import test_divmod_zero
```



---
## test_div_negative_zero
```python
from test_numeric import test_div_negative_zero
```



---
## test_ser_div_ser
```python
from test_numeric import test_ser_div_ser
```



---
## test_ser_divmod_zero
```python
from test_numeric import test_ser_divmod_zero
```



---
## test_ser_divmod_inf
```python
from test_numeric import test_ser_divmod_inf
```



---
## test_rdiv_zero_compat
```python
from test_numeric import test_rdiv_zero_compat
```



---
## test_div_zero_inf_signs
```python
from test_numeric import test_div_zero_inf_signs
```



---
## test_rdiv_zero
```python
from test_numeric import test_rdiv_zero
```



---
## test_floordiv_div
```python
from test_numeric import test_floordiv_div
```



---
## test_df_div_zero_df
```python
from test_numeric import test_df_div_zero_df
```



---
## test_df_div_zero_array
```python
from test_numeric import test_df_div_zero_array
```



---
## test_df_div_zero_int
```python
from test_numeric import test_df_div_zero_int
```



---
## test_df_div_zero_series_does_not_commute
```python
from test_numeric import test_df_div_zero_series_does_not_commute
```



---
## test_df_mod_zero_df
```python
from test_numeric import test_df_mod_zero_df
```



---
## test_df_mod_zero_array
```python
from test_numeric import test_df_mod_zero_array
```



---
## test_df_mod_zero_int
```python
from test_numeric import test_df_mod_zero_int
```



---
## test_df_mod_zero_series_does_not_commute
```python
from test_numeric import test_df_mod_zero_series_does_not_commute
```



---
## test_divide_decimal
```python
from test_numeric import test_divide_decimal
```



---
## test_div_equiv_binop
```python
from test_numeric import test_div_equiv_binop
```



---
## test_div_int
```python
from test_numeric import test_div_int
```



---
## test_mul_int_identity
```python
from test_numeric import test_mul_int_identity
```



---
## test_mul_int_array
```python
from test_numeric import test_mul_int_array
```



---
## test_mul_int_series
```python
from test_numeric import test_mul_int_series
```



---
## test_mul_float_series
```python
from test_numeric import test_mul_float_series
```



---
## test_mul_index
```python
from test_numeric import test_mul_index
```



---
## test_mul_datelike_raises
```python
from test_numeric import test_mul_datelike_raises
```



---
## test_mul_size_mismatch_raises
```python
from test_numeric import test_mul_size_mismatch_raises
```



---
## test_pow_float
```python
from test_numeric import test_pow_float
```



---
## test_modulo
```python
from test_numeric import test_modulo
```



---
## test_divmod_scalar
```python
from test_numeric import test_divmod_scalar
```



---
## test_divmod_ndarray
```python
from test_numeric import test_divmod_ndarray
```



---
## test_divmod_series
```python
from test_numeric import test_divmod_series
```



---
## test_ops_np_scalar
```python
from test_numeric import test_ops_np_scalar
```



---
## test_operators_frame
```python
from test_numeric import test_operators_frame
```



---
## test_modulo2
```python
from test_numeric import test_modulo2
```



---
## test_modulo_zero_int
```python
from test_numeric import test_modulo_zero_int
```



---
## test_add_series
```python
from test_numeric import test_add_series
```



---
## test_add_frames
```python
from test_numeric import test_add_frames
```



---
## test_series_frame_radd_bug
```python
from test_numeric import test_series_frame_radd_bug
```



---
## test_datetime64_with_index
```python
from test_numeric import test_datetime64_with_index
```



---
## test_frame_operators
```python
from test_numeric import test_frame_operators
```



---
## test_frame_operators_col_align
```python
from test_numeric import test_frame_operators_col_align
```



---
## test_frame_operators_none_to_nan
```python
from test_numeric import test_frame_operators_none_to_nan
```



---
## test_frame_operators_empty_like
```python
from test_numeric import test_frame_operators_empty_like
```



---
## test_series_operators_arithmetic
```python
from test_numeric import test_series_operators_arithmetic
```



---
## test_series_operators_compare
```python
from test_numeric import test_series_operators_compare
```



---
## test_divmod
```python
from test_numeric import test_divmod
```



---
## test_series_divmod_zero
```python
from test_numeric import test_series_divmod_zero
```



---
## test_ufunc_compat
```python
from test_numeric import test_ufunc_compat
```



---
## test_ufunc_coercions
```python
from test_numeric import test_ufunc_coercions
```



---
## test_ufunc_multiple_return_values
```python
from test_numeric import test_ufunc_multiple_return_values
```



---
## test_ufunc_at
```python
from test_numeric import test_ufunc_at
```



---
## test_numarr_with_dtype_add_nan
```python
from test_numeric import test_numarr_with_dtype_add_nan
```



---
## test_numarr_with_dtype_add_int
```python
from test_numeric import test_numarr_with_dtype_add_int
```



---
## test_operators_reverse_object
```python
from test_numeric import test_operators_reverse_object
```



---
## test_binops_index
```python
from test_numeric import test_binops_index
```



---
## test_binops_index_scalar
```python
from test_numeric import test_binops_index_scalar
```



---
## test_binops_index_pow
```python
from test_numeric import test_binops_index_pow
```



---
## test_binops_index_scalar_pow
```python
from test_numeric import test_binops_index_scalar_pow
```



---
## test_arithmetic_with_frame_or_series
```python
from test_numeric import test_arithmetic_with_frame_or_series
```



---
## test_numeric_compat2
```python
from test_numeric import test_numeric_compat2
```



---
## test_numeric_compat2_floordiv
```python
from test_numeric import test_numeric_compat2_floordiv
```



---
## test_addsub_arithmetic
```python
from test_numeric import test_addsub_arithmetic
```



---
## test_pow_nan_with_zero
```python
from test_numeric import test_pow_nan_with_zero
```



---
## assert_cannot_add
```python
from common import assert_cannot_add
```

Helper to assert that left and right cannot be added.

Parameters
----------
left : object
right : object
msg : str, default "cannot add"

---
## assert_invalid_addsub_type
```python
from common import assert_invalid_addsub_type
```

Helper to assert that left and right can be neither added nor subtracted.

Parameters
----------
left : object
right : object
msg : str or None, default None

---
## get_upcast_box
```python
from common import get_upcast_box
```

Get the box to use for 'expected' in an arithmetic or comparison operation.

Parameters
left : Any
right : Any
is_cmp : bool, default False
    Whether the operation is a comparison method.

---
## assert_invalid_comparison
```python
from common import assert_invalid_comparison
```

Assert that comparison operations with mismatched types behave correctly.

Parameters
----------
left : np.ndarray, ExtensionArray, Index, or Series
right : object
box : {pd.DataFrame, pd.Series, pd.Index, pd.array, tm.to_array}

---
## xbox2
```python
from common import xbox2
```



---
## __name__
```python
from test_array_ops import __name__
```



---
## test_na_logical_op_2d
```python
from test_array_ops import test_na_logical_op_2d
```



---
## test_object_comparison_2d
```python
from test_array_ops import test_object_comparison_2d
```



---
## __name__
```python
from test_object import __name__
```



---
## TestObjectComparisons
```python
from test_object import TestObjectComparisons
```



---
## TestArithmetic
```python
from test_object import TestArithmetic
```



---
## MyIndex
```python
from test_object import MyIndex
```



---
## test_index_ops_defer_to_unknown_subclasses
```python
from test_object import test_index_ops_defer_to_unknown_subclasses
```



---
## test_comparison_object_numeric_nas
```python
from test_object import test_comparison_object_numeric_nas
```



---
## test_object_comparisons
```python
from test_object import test_object_comparisons
```



---
## test_more_na_comparisons
```python
from test_object import test_more_na_comparisons
```



---
## test_add_period_to_array_of_offset
```python
from test_object import test_add_period_to_array_of_offset
```



---
## test_pow_ops_object
```python
from test_object import test_pow_ops_object
```



---
## test_add_extension_scalar
```python
from test_object import test_add_extension_scalar
```



---
## test_objarr_add_str
```python
from test_object import test_objarr_add_str
```



---
## test_objarr_radd_str
```python
from test_object import test_objarr_radd_str
```



---
## test_objarr_radd_str_invalid
```python
from test_object import test_objarr_radd_str_invalid
```



---
## test_objarr_add_invalid
```python
from test_object import test_objarr_add_invalid
```



---
## test_operators_na_handling
```python
from test_object import test_operators_na_handling
```



---
## test_series_with_dtype_radd_timedelta
```python
from test_object import test_series_with_dtype_radd_timedelta
```



---
## test_mixed_timezone_series_ops_object
```python
from test_object import test_mixed_timezone_series_ops_object
```



---
## test_iadd_preserves_name
```python
from test_object import test_iadd_preserves_name
```



---
## test_add_string
```python
from test_object import test_add_string
```



---
## test_iadd_string
```python
from test_object import test_iadd_string
```



---
## test_add
```python
from test_object import test_add
```



---
## test_sub_fail
```python
from test_object import test_sub_fail
```



---
## test_sub_object
```python
from test_object import test_sub_object
```



---
## test_rsub_object
```python
from test_object import test_rsub_object
```



---
## _simple_new
```python
from test_object import _simple_new
```



---
## __add__
```python
from test_object import __add__
```



---
## __radd__
```python
from test_object import __radd__
```



---
## __name__
```python
from test_extract_array import __name__
```



---
## test_extract_array_rangeindex
```python
from test_extract_array import test_extract_array_rangeindex
```



---
## Base
```python
from test_api import Base
```



---
## TestPDApi
```python
from test_api import TestPDApi
```



---
## TestApi
```python
from test_api import TestApi
```



---
## TestTesting
```python
from test_api import TestTesting
```



---
## test_pandas_array_alias
```python
from test_api import test_pandas_array_alias
```



---
## check
```python
from test_api import check
```



---
## test_api_all
```python
from test_api import test_api_all
```



---
## test_depr
```python
from test_api import test_depr
```



---
## test_api_typing
```python
from test_api import test_api_typing
```



---
## test_api_types
```python
from test_api import test_api_types
```



---
## test_api_interchange
```python
from test_api import test_api_interchange
```



---
## test_api_indexers
```python
from test_api import test_api_indexers
```



---
## test_api_extensions
```python
from test_api import test_api_extensions
```



---
## test_testing
```python
from test_api import test_testing
```



---
## test_util_in_top_level
```python
from test_api import test_util_in_top_level
```



---
## TestTypes
```python
from test_types import TestTypes
```



---
## test_types
```python
from test_types import test_types
```



---
## test_deprecated_from_api_types
```python
from test_types import test_deprecated_from_api_types
```



---
## __name__
```python
from test_to_xarray import __name__
```



---
## TestDataFrameToXArray
```python
from test_to_xarray import TestDataFrameToXArray
```



---
## TestSeriesToXArray
```python
from test_to_xarray import TestSeriesToXArray
```



---
## df
```python
from test_to_xarray import df
```



---
## test_to_xarray_index_types
```python
from test_to_xarray import test_to_xarray_index_types
```



---
## test_to_xarray_empty
```python
from test_to_xarray import test_to_xarray_empty
```



---
## test_to_xarray_with_multiindex
```python
from test_to_xarray import test_to_xarray_with_multiindex
```



---
## __name__
```python
from test_frame import __name__
```

Test cases for DataFrame.plot 

---
## TestDataFrame
```python
from test_frame import TestDataFrame
```



---
## TestDataFrame2
```python
from test_frame import TestDataFrame2
```



---
## test_set_axis_name
```python
from test_frame import test_set_axis_name
```



---
## test_set_axis_name_mi
```python
from test_frame import test_set_axis_name_mi
```



---
## test_nonzero_single_element
```python
from test_frame import test_nonzero_single_element
```



---
## test_metadata_propagation_indiv_groupby
```python
from test_frame import test_metadata_propagation_indiv_groupby
```



---
## test_metadata_propagation_indiv_resample
```python
from test_frame import test_metadata_propagation_indiv_resample
```



---
## test_metadata_propagation_indiv
```python
from test_frame import test_metadata_propagation_indiv
```



---
## test_set_attribute
```python
from test_frame import test_set_attribute
```



---
## test_deepcopy_empty
```python
from test_frame import test_deepcopy_empty
```



---
## test_validate_bool_args
```python
from test_frame import test_validate_bool_args
```



---
## test_unexpected_keyword
```python
from test_frame import test_unexpected_keyword
```



---
## finalize
```python
from test_frame import finalize
```



---
## __name__
```python
from test_finalize import __name__
```

An exhaustive list of pandas methods exercising NDFrame.__finalize__.

---
## idfn
```python
from test_finalize import idfn
```



---
## ndframe_method
```python
from test_finalize import ndframe_method
```

An NDFrame method returning an NDFrame.

---
## test_finalize_called
```python
from test_finalize import test_finalize_called
```



---
## test_finalize_first
```python
from test_finalize import test_finalize_first
```



---
## test_finalize_last
```python
from test_finalize import test_finalize_last
```



---
## test_finalize_called_eval_numexpr
```python
from test_finalize import test_finalize_called_eval_numexpr
```



---
## test_binops
```python
from test_finalize import test_binops
```



---
## test_string_method
```python
from test_finalize import test_string_method
```



---
## test_datetime_method
```python
from test_finalize import test_datetime_method
```



---
## test_datetime_property
```python
from test_finalize import test_datetime_property
```



---
## test_timedelta_property
```python
from test_finalize import test_timedelta_property
```



---
## test_timedelta_methods
```python
from test_finalize import test_timedelta_methods
```



---
## test_categorical_accessor
```python
from test_finalize import test_categorical_accessor
```



---
## test_groupby_finalize
```python
from test_finalize import test_groupby_finalize
```



---
## test_groupby_finalize_not_implemented
```python
from test_finalize import test_groupby_finalize_not_implemented
```



---
## test_finalize_frame_series_name
```python
from test_finalize import test_finalize_frame_series_name
```



---
## construct
```python
from test_generic import construct
```

construct an object for the given shape
if value is specified use that if its a scalar
if value is an array, repeat it as needed

---
## TestGeneric
```python
from test_generic import TestGeneric
```



---
## TestNDFrame
```python
from test_generic import TestNDFrame
```



---
## test_rename
```python
from test_generic import test_rename
```



---
## test_get_numeric_data
```python
from test_generic import test_get_numeric_data
```



---
## test_nonzero
```python
from test_generic import test_nonzero
```



---
## test_frame_or_series_compound_dtypes
```python
from test_generic import test_frame_or_series_compound_dtypes
```



---
## test_metadata_propagation
```python
from test_generic import test_metadata_propagation
```



---
## test_size_compat
```python
from test_generic import test_size_compat
```



---
## test_split_compat
```python
from test_generic import test_split_compat
```



---
## test_stat_unexpected_keyword
```python
from test_generic import test_stat_unexpected_keyword
```



---
## test_api_compat
```python
from test_generic import test_api_compat
```



---
## test_stat_non_defaults_args
```python
from test_generic import test_stat_non_defaults_args
```



---
## test_truncate_out_of_bounds
```python
from test_generic import test_truncate_out_of_bounds
```



---
## test_copy_and_deepcopy
```python
from test_generic import test_copy_and_deepcopy
```



---
## test_data_deprecated
```python
from test_generic import test_data_deprecated
```



---
## test_squeeze_series_noop
```python
from test_generic import test_squeeze_series_noop
```



---
## test_squeeze_frame_noop
```python
from test_generic import test_squeeze_frame_noop
```



---
## test_squeeze_frame_reindex
```python
from test_generic import test_squeeze_frame_reindex
```



---
## test_squeeze_0_len_dim
```python
from test_generic import test_squeeze_0_len_dim
```



---
## test_squeeze_axis
```python
from test_generic import test_squeeze_axis
```



---
## test_squeeze_axis_len_3
```python
from test_generic import test_squeeze_axis_len_3
```



---
## test_numpy_squeeze
```python
from test_generic import test_numpy_squeeze
```



---
## test_transpose_series
```python
from test_generic import test_transpose_series
```



---
## test_transpose_frame
```python
from test_generic import test_transpose_frame
```



---
## test_numpy_transpose
```python
from test_generic import test_numpy_transpose
```



---
## test_take_series
```python
from test_generic import test_take_series
```



---
## test_take_frame
```python
from test_generic import test_take_frame
```



---
## test_take_invalid_kwargs
```python
from test_generic import test_take_invalid_kwargs
```



---
## test_axis_classmethods
```python
from test_generic import test_axis_classmethods
```



---
## test_flags_identity
```python
from test_generic import test_flags_identity
```



---
## test_bool_dep
```python
from test_generic import test_bool_dep
```



---
## f
```python
from test_generic import f
```



---
## __name__
```python
from test_duplicate_labels import __name__
```

Tests dealing with the NDFrame.allows_duplicates.

---
## TestPreserves
```python
from test_duplicate_labels import TestPreserves
```



---
## TestRaises
```python
from test_duplicate_labels import TestRaises
```



---
## test_raises_basic
```python
from test_duplicate_labels import test_raises_basic
```



---
## test_format_duplicate_labels_message
```python
from test_duplicate_labels import test_format_duplicate_labels_message
```



---
## test_format_duplicate_labels_message_multi
```python
from test_duplicate_labels import test_format_duplicate_labels_message_multi
```



---
## test_dataframe_insert_raises
```python
from test_duplicate_labels import test_dataframe_insert_raises
```



---
## test_inplace_raises
```python
from test_duplicate_labels import test_inplace_raises
```



---
## test_pickle
```python
from test_duplicate_labels import test_pickle
```



---
## test_construction_ok
```python
from test_duplicate_labels import test_construction_ok
```



---
## test_preserved_series
```python
from test_duplicate_labels import test_preserved_series
```



---
## test_align
```python
from test_duplicate_labels import test_align
```



---
## test_preserved_frame
```python
from test_duplicate_labels import test_preserved_frame
```



---
## test_to_frame
```python
from test_duplicate_labels import test_to_frame
```



---
## test_binops
```python
from test_duplicate_labels import test_binops
```



---
## test_preserve_getitem
```python
from test_duplicate_labels import test_preserve_getitem
```



---
## test_ndframe_getitem_caching_issue
```python
from test_duplicate_labels import test_ndframe_getitem_caching_issue
```



---
## test_concat
```python
from test_duplicate_labels import test_concat
```



---
## test_merge
```python
from test_duplicate_labels import test_merge
```



---
## test_groupby
```python
from test_duplicate_labels import test_groupby
```



---
## test_window
```python
from test_duplicate_labels import test_window
```



---
## test_set_flags_with_duplicates
```python
from test_duplicate_labels import test_set_flags_with_duplicates
```



---
## test_setting_allows_duplicate_labels_raises
```python
from test_duplicate_labels import test_setting_allows_duplicate_labels_raises
```



---
## test_series_raises
```python
from test_duplicate_labels import test_series_raises
```



---
## test_getitem_raises
```python
from test_duplicate_labels import test_getitem_raises
```



---
## test_concat_raises
```python
from test_duplicate_labels import test_concat_raises
```



---
## test_merge_raises
```python
from test_duplicate_labels import test_merge_raises
```



---
## __name__
```python
from test_label_or_level_utils import __name__
```



---
## df
```python
from test_label_or_level_utils import df
```

DataFrame with columns 'L1', 'L2', and 'L3'

---
## df_levels
```python
from test_label_or_level_utils import df_levels
```

DataFrame with columns or index levels 'L1', 'L2', and 'L3'

---
## df_ambig
```python
from test_label_or_level_utils import df_ambig
```

DataFrame with levels 'L1' and 'L2' and labels 'L1' and 'L3'

---
## df_duplabels
```python
from test_label_or_level_utils import df_duplabels
```

DataFrame with level 'L1' and labels 'L2', 'L3', and 'L2'

---
## get_labels_levels
```python
from test_label_or_level_utils import get_labels_levels
```



---
## assert_label_reference
```python
from test_label_or_level_utils import assert_label_reference
```



---
## assert_level_reference
```python
from test_label_or_level_utils import assert_level_reference
```



---
## test_is_level_or_label_reference_df_simple
```python
from test_label_or_level_utils import test_is_level_or_label_reference_df_simple
```



---
## test_is_level_reference_df_ambig
```python
from test_label_or_level_utils import test_is_level_reference_df_ambig
```



---
## test_is_level_reference_series_simple_axis0
```python
from test_label_or_level_utils import test_is_level_reference_series_simple_axis0
```



---
## test_is_level_reference_series_axis1_error
```python
from test_label_or_level_utils import test_is_level_reference_series_axis1_error
```



---
## test_check_label_or_level_ambiguity_df
```python
from test_label_or_level_utils import test_check_label_or_level_ambiguity_df
```



---
## test_check_label_or_level_ambiguity_series
```python
from test_label_or_level_utils import test_check_label_or_level_ambiguity_series
```



---
## test_check_label_or_level_ambiguity_series_axis1_error
```python
from test_label_or_level_utils import test_check_label_or_level_ambiguity_series_axis1_error
```



---
## assert_label_values
```python
from test_label_or_level_utils import assert_label_values
```



---
## assert_level_values
```python
from test_label_or_level_utils import assert_level_values
```



---
## test_get_label_or_level_values_df_simple
```python
from test_label_or_level_utils import test_get_label_or_level_values_df_simple
```



---
## test_get_label_or_level_values_df_ambig
```python
from test_label_or_level_utils import test_get_label_or_level_values_df_ambig
```



---
## test_get_label_or_level_values_df_duplabels
```python
from test_label_or_level_utils import test_get_label_or_level_values_df_duplabels
```



---
## test_get_label_or_level_values_series_axis0
```python
from test_label_or_level_utils import test_get_label_or_level_values_series_axis0
```



---
## test_get_label_or_level_values_series_axis1_error
```python
from test_label_or_level_utils import test_get_label_or_level_values_series_axis1_error
```



---
## assert_labels_dropped
```python
from test_label_or_level_utils import assert_labels_dropped
```



---
## assert_levels_dropped
```python
from test_label_or_level_utils import assert_levels_dropped
```



---
## test_drop_labels_or_levels_df
```python
from test_label_or_level_utils import test_drop_labels_or_levels_df
```



---
## test_drop_labels_or_levels_series
```python
from test_label_or_level_utils import test_drop_labels_or_levels_series
```



---
## TestSeries
```python
from test_series import TestSeries
```



---
## test_set_axis_name_mi
```python
from test_series import test_set_axis_name_mi
```



---
## test_set_axis_name_raises
```python
from test_series import test_set_axis_name_raises
```



---
## test_get_bool_data_preserve_dtype
```python
from test_series import test_get_bool_data_preserve_dtype
```



---
## test_nonzero_single_element
```python
from test_series import test_nonzero_single_element
```



---
## test_nonzero_single_element_raise_1
```python
from test_series import test_nonzero_single_element_raise_1
```



---
## test_nonzero_single_element_raise_2
```python
from test_series import test_nonzero_single_element_raise_2
```



---
## test_nonzero_multiple_element_raise
```python
from test_series import test_nonzero_multiple_element_raise
```



---
## test_nonbool_single_element_raise
```python
from test_series import test_nonbool_single_element_raise
```



---
## test_metadata_propagation_indiv_resample
```python
from test_series import test_metadata_propagation_indiv_resample
```



---
## test_metadata_propagation_indiv
```python
from test_series import test_metadata_propagation_indiv
```



---
## finalize
```python
from test_series import finalize
```



---
## __name__
```python
from test_resolution import __name__
```



---
## test_get_resolution_nano
```python
from test_resolution import test_get_resolution_nano
```



---
## test_get_resolution_non_nano_data
```python
from test_resolution import test_get_resolution_non_nano_data
```



---
## test_get_attrname_from_abbrev
```python
from test_resolution import test_get_attrname_from_abbrev
```



---
## test_units_A_H_T_S_L_U_N_deprecated_from_attrname_to_abbrevs
```python
from test_resolution import test_units_A_H_T_S_L_U_N_deprecated_from_attrname_to_abbrevs
```



---
## __name__
```python
from test_strptime import __name__
```



---
## TestArrayStrptimeResolutionInference
```python
from test_strptime import TestArrayStrptimeResolutionInference
```



---
## test_array_strptime_resolution_all_nat
```python
from test_strptime import test_array_strptime_resolution_all_nat
```



---
## test_array_strptime_resolution_inference_homogeneous_strings
```python
from test_strptime import test_array_strptime_resolution_inference_homogeneous_strings
```



---
## test_array_strptime_resolution_mixed
```python
from test_strptime import test_array_strptime_resolution_mixed
```



---
## test_array_strptime_resolution_todaynow
```python
from test_strptime import test_array_strptime_resolution_todaynow
```



---
## test_array_strptime_str_outside_nano_range
```python
from test_strptime import test_array_strptime_str_outside_nano_range
```



---
## get_freq_code
```python
from test_period import get_freq_code
```



---
## test_intra_day_conversion_factors
```python
from test_period import test_intra_day_conversion_factors
```



---
## test_period_ordinal_start_values
```python
from test_period import test_period_ordinal_start_values
```



---
## test_period_ordinal_week
```python
from test_period import test_period_ordinal_week
```



---
## test_period_ordinal_business_day
```python
from test_period import test_period_ordinal_business_day
```



---
## TestExtractOrdinals
```python
from test_period import TestExtractOrdinals
```



---
## test_get_period_field_array_raises_on_out_of_range
```python
from test_period import test_get_period_field_array_raises_on_out_of_range
```



---
## test_extract_ordinals_raises
```python
from test_period import test_extract_ordinals_raises
```



---
## test_extract_ordinals_2d
```python
from test_period import test_extract_ordinals_2d
```



---
## __name__
```python
from test_parsing import __name__
```

Tests for Timestamp parsing, aimed at pandas/_libs/tslibs/parsing.pyx

---
## test_parsing_tzlocal_deprecated
```python
from test_parsing import test_parsing_tzlocal_deprecated
```



---
## test_parse_datetime_string_with_reso
```python
from test_parsing import test_parse_datetime_string_with_reso
```



---
## test_parse_datetime_string_with_reso_nanosecond_reso
```python
from test_parsing import test_parse_datetime_string_with_reso_nanosecond_reso
```



---
## test_parse_datetime_string_with_reso_invalid_type
```python
from test_parsing import test_parse_datetime_string_with_reso_invalid_type
```



---
## test_parse_time_quarter_with_dash
```python
from test_parsing import test_parse_time_quarter_with_dash
```



---
## test_parse_time_quarter_with_dash_error
```python
from test_parsing import test_parse_time_quarter_with_dash_error
```



---
## test_does_not_convert_mixed_integer
```python
from test_parsing import test_does_not_convert_mixed_integer
```



---
## test_parsers_quarterly_with_freq_error
```python
from test_parsing import test_parsers_quarterly_with_freq_error
```



---
## test_parsers_quarterly_with_freq
```python
from test_parsing import test_parsers_quarterly_with_freq
```



---
## test_parsers_quarter_invalid
```python
from test_parsing import test_parsers_quarter_invalid
```



---
## test_parsers_month_freq
```python
from test_parsing import test_parsers_month_freq
```



---
## test_guess_datetime_format_with_parseable_formats
```python
from test_parsing import test_guess_datetime_format_with_parseable_formats
```



---
## test_guess_datetime_format_with_dayfirst
```python
from test_parsing import test_guess_datetime_format_with_dayfirst
```



---
## test_guess_datetime_format_with_locale_specific_formats
```python
from test_parsing import test_guess_datetime_format_with_locale_specific_formats
```



---
## test_guess_datetime_format_invalid_inputs
```python
from test_parsing import test_guess_datetime_format_invalid_inputs
```



---
## test_guess_datetime_format_wrong_type_inputs
```python
from test_parsing import test_guess_datetime_format_wrong_type_inputs
```



---
## test_guess_datetime_format_no_padding
```python
from test_parsing import test_guess_datetime_format_no_padding
```



---
## test_try_parse_dates
```python
from test_parsing import test_try_parse_dates
```



---
## test_parse_datetime_string_with_reso_check_instance_type_raise_exception
```python
from test_parsing import test_parse_datetime_string_with_reso_check_instance_type_raise_exception
```



---
## test_is_iso_format
```python
from test_parsing import test_is_iso_format
```



---
## test_guess_datetime_format_f
```python
from test_parsing import test_guess_datetime_format_f
```



---
## _helper_hypothesis_delimited_date
```python
from test_parsing import _helper_hypothesis_delimited_date
```



---
## test_hypothesis_delimited_date
```python
from test_parsing import test_hypothesis_delimited_date
```



---
## __name__
```python
from test_ccalendar import __name__
```



---
## test_get_day_of_year_numeric
```python
from test_ccalendar import test_get_day_of_year_numeric
```



---
## test_get_day_of_year_dt
```python
from test_ccalendar import test_get_day_of_year_dt
```



---
## test_dt_correct_iso_8601_year_week_and_day
```python
from test_ccalendar import test_dt_correct_iso_8601_year_week_and_day
```



---
## test_isocalendar
```python
from test_ccalendar import test_isocalendar
```



---
## __name__
```python
from test_npy_units import __name__
```



---
## TestIsDateArrayNormalized
```python
from test_npy_units import TestIsDateArrayNormalized
```



---
## test_is_date_array_normalized_day
```python
from test_npy_units import test_is_date_array_normalized_day
```



---
## test_is_date_array_normalized_seconds
```python
from test_npy_units import test_is_date_array_normalized_seconds
```



---
## __name__
```python
from test_timezones import __name__
```

Tests for DatetimeIndex timezone-related methods

---
## test_is_utc
```python
from test_timezones import test_is_utc
```



---
## test_cache_keys_are_distinct_for_pytz_vs_dateutil
```python
from test_timezones import test_cache_keys_are_distinct_for_pytz_vs_dateutil
```



---
## test_tzlocal_repr
```python
from test_timezones import test_tzlocal_repr
```



---
## test_tzlocal_maybe_get_tz
```python
from test_timezones import test_tzlocal_maybe_get_tz
```



---
## test_tzlocal_offset
```python
from test_timezones import test_tzlocal_offset
```



---
## test_tzlocal_is_not_utc
```python
from test_timezones import test_tzlocal_is_not_utc
```



---
## test_tz_compare_utc
```python
from test_timezones import test_tz_compare_utc
```



---
## infer_setup
```python
from test_timezones import infer_setup
```



---
## test_infer_tz_compat
```python
from test_timezones import test_infer_tz_compat
```



---
## test_infer_tz_utc_localize
```python
from test_timezones import test_infer_tz_utc_localize
```



---
## test_infer_tz_mismatch
```python
from test_timezones import test_infer_tz_mismatch
```



---
## test_maybe_get_tz_invalid_types
```python
from test_timezones import test_maybe_get_tz_invalid_types
```



---
## test_maybe_get_tz_offset_only
```python
from test_timezones import test_maybe_get_tz_offset_only
```



---
## __name__
```python
from test_np_datetime import __name__
```



---
## test_is_unitless
```python
from test_np_datetime import test_is_unitless
```



---
## test_get_unit_from_dtype
```python
from test_np_datetime import test_get_unit_from_dtype
```



---
## test_td64_to_tdstruct
```python
from test_np_datetime import test_td64_to_tdstruct
```



---
## TestAstypeOverflowSafe
```python
from test_np_datetime import TestAstypeOverflowSafe
```



---
## test_pass_non_dt64_array
```python
from test_np_datetime import test_pass_non_dt64_array
```



---
## test_pass_non_dt64_dtype
```python
from test_np_datetime import test_pass_non_dt64_dtype
```



---
## test_astype_overflowsafe_dt64
```python
from test_np_datetime import test_astype_overflowsafe_dt64
```



---
## test_astype_overflowsafe_td64
```python
from test_np_datetime import test_astype_overflowsafe_td64
```



---
## test_astype_overflowsafe_disallow_rounding
```python
from test_np_datetime import test_astype_overflowsafe_disallow_rounding
```



---
## __name__
```python
from test_conversion import __name__
```



---
## _compare_utc_to_local
```python
from test_conversion import _compare_utc_to_local
```



---
## _compare_local_to_utc
```python
from test_conversion import _compare_local_to_utc
```



---
## test_tz_localize_to_utc_copies
```python
from test_conversion import test_tz_localize_to_utc_copies
```



---
## test_tz_convert_single_matches_tz_convert_hourly
```python
from test_conversion import test_tz_convert_single_matches_tz_convert_hourly
```



---
## test_tz_convert_single_matches_tz_convert
```python
from test_conversion import test_tz_convert_single_matches_tz_convert
```



---
## test_tz_convert_corner
```python
from test_conversion import test_tz_convert_corner
```



---
## test_tz_convert_readonly
```python
from test_conversion import test_tz_convert_readonly
```



---
## test_length_zero_copy
```python
from test_conversion import test_length_zero_copy
```



---
## test_ensure_datetime64ns_bigendian
```python
from test_conversion import test_ensure_datetime64ns_bigendian
```



---
## test_ensure_timedelta64ns_overflows
```python
from test_conversion import test_ensure_timedelta64ns_overflows
```



---
## SubDatetime
```python
from test_conversion import SubDatetime
```



---
## test_localize_pydatetime_dt_types
```python
from test_conversion import test_localize_pydatetime_dt_types
```



---
## f
```python
from test_conversion import f
```



---
## __name__
```python
from test_array_to_datetime import __name__
```



---
## TestArrayToDatetimeResolutionInference
```python
from test_array_to_datetime import TestArrayToDatetimeResolutionInference
```



---
## TestArrayToDatetimeWithTZResolutionInference
```python
from test_array_to_datetime import TestArrayToDatetimeWithTZResolutionInference
```



---
## test_parsing_valid_dates
```python
from test_array_to_datetime import test_parsing_valid_dates
```



---
## test_parsing_timezone_offsets
```python
from test_array_to_datetime import test_parsing_timezone_offsets
```



---
## test_parsing_non_iso_timezone_offset
```python
from test_array_to_datetime import test_parsing_non_iso_timezone_offset
```



---
## test_parsing_different_timezone_offsets
```python
from test_array_to_datetime import test_parsing_different_timezone_offsets
```



---
## test_number_looking_strings_not_into_datetime
```python
from test_array_to_datetime import test_number_looking_strings_not_into_datetime
```



---
## test_coerce_outside_ns_bounds
```python
from test_array_to_datetime import test_coerce_outside_ns_bounds
```



---
## test_coerce_outside_ns_bounds_one_valid
```python
from test_array_to_datetime import test_coerce_outside_ns_bounds_one_valid
```



---
## test_coerce_of_invalid_datetimes
```python
from test_array_to_datetime import test_coerce_of_invalid_datetimes
```



---
## test_to_datetime_barely_out_of_bounds
```python
from test_array_to_datetime import test_to_datetime_barely_out_of_bounds
```



---
## test_to_datetime_barely_inside_bounds
```python
from test_array_to_datetime import test_to_datetime_barely_inside_bounds
```



---
## SubDatetime
```python
from test_array_to_datetime import SubDatetime
```



---
## test_datetime_subclass
```python
from test_array_to_datetime import test_datetime_subclass
```



---
## test_infer_all_nat
```python
from test_array_to_datetime import test_infer_all_nat
```



---
## test_infer_homogeoneous_datetimes
```python
from test_array_to_datetime import test_infer_homogeoneous_datetimes
```



---
## test_infer_homogeoneous_date_objects
```python
from test_array_to_datetime import test_infer_homogeoneous_date_objects
```



---
## test_infer_homogeoneous_dt64
```python
from test_array_to_datetime import test_infer_homogeoneous_dt64
```



---
## test_infer_homogeoneous_timestamps
```python
from test_array_to_datetime import test_infer_homogeoneous_timestamps
```



---
## test_infer_homogeoneous_datetimes_strings
```python
from test_array_to_datetime import test_infer_homogeoneous_datetimes_strings
```



---
## test_infer_heterogeneous
```python
from test_array_to_datetime import test_infer_heterogeneous
```



---
## test_infer_with_nat_int_float_str
```python
from test_array_to_datetime import test_infer_with_nat_int_float_str
```



---
## test_array_to_datetime_with_tz_resolution
```python
from test_array_to_datetime import test_array_to_datetime_with_tz_resolution
```



---
## test_array_to_datetime_with_tz_resolution_all_nat
```python
from test_array_to_datetime import test_array_to_datetime_with_tz_resolution_all_nat
```



---
## test_delta_to_nanoseconds
```python
from test_timedeltas import test_delta_to_nanoseconds
```



---
## test_delta_to_nanoseconds_error
```python
from test_timedeltas import test_delta_to_nanoseconds_error
```



---
## test_delta_to_nanoseconds_td64_MY_raises
```python
from test_timedeltas import test_delta_to_nanoseconds_td64_MY_raises
```



---
## test_unsupported_td64_unit_raises
```python
from test_timedeltas import test_unsupported_td64_unit_raises
```



---
## test_huge_nanoseconds_overflow
```python
from test_timedeltas import test_huge_nanoseconds_overflow
```



---
## test_kwarg_assertion
```python
from test_timedeltas import test_kwarg_assertion
```



---
## TestArrayToTimedelta64
```python
from test_timedeltas import TestArrayToTimedelta64
```



---
## test_ints_to_pytimedelta
```python
from test_timedeltas import test_ints_to_pytimedelta
```



---
## test_ints_to_pytimedelta_unsupported
```python
from test_timedeltas import test_ints_to_pytimedelta_unsupported
```



---
## test_array_to_timedelta64_string_with_unit_2d_raises
```python
from test_timedeltas import test_array_to_timedelta64_string_with_unit_2d_raises
```



---
## test_array_to_timedelta64_non_object_raises
```python
from test_timedeltas import test_array_to_timedelta64_non_object_raises
```



---
## __name__
```python
from test_liboffsets import __name__
```

Tests for helper functions in the cython tslibs.offsets

---
## day_opt
```python
from test_liboffsets import day_opt
```



---
## test_get_last_bday
```python
from test_liboffsets import test_get_last_bday
```



---
## test_get_first_bday
```python
from test_liboffsets import test_get_first_bday
```



---
## test_shift_month_dt
```python
from test_liboffsets import test_shift_month_dt
```



---
## test_shift_month_ts
```python
from test_liboffsets import test_shift_month_ts
```



---
## test_shift_month_error
```python
from test_liboffsets import test_shift_month_error
```



---
## test_roll_qtrday_year
```python
from test_liboffsets import test_roll_qtrday_year
```



---
## test_roll_qtrday_year2
```python
from test_liboffsets import test_roll_qtrday_year2
```



---
## test_get_day_of_month_error
```python
from test_liboffsets import test_get_day_of_month_error
```



---
## test_roll_qtr_day_not_mod_unequal
```python
from test_liboffsets import test_roll_qtr_day_not_mod_unequal
```



---
## test_roll_qtr_day_mod_equal
```python
from test_liboffsets import test_roll_qtr_day_mod_equal
```



---
## test_roll_convention
```python
from test_liboffsets import test_roll_convention
```



---
## __name__
```python
from test_to_offset import __name__
```



---
## test_to_offset
```python
from test_to_offset import test_to_offset
```



---
## test_to_offset_negative
```python
from test_to_offset import test_to_offset_negative
```



---
## test_to_offset_invalid
```python
from test_to_offset import test_to_offset_invalid
```



---
## test_to_offset_no_evaluate
```python
from test_to_offset import test_to_offset_no_evaluate
```



---
## test_to_offset_tuple_unsupported
```python
from test_to_offset import test_to_offset_tuple_unsupported
```



---
## test_to_offset_whitespace
```python
from test_to_offset import test_to_offset_whitespace
```



---
## test_to_offset_leading_zero
```python
from test_to_offset import test_to_offset_leading_zero
```



---
## test_to_offset_leading_plus
```python
from test_to_offset import test_to_offset_leading_plus
```



---
## test_to_offset_pd_timedelta
```python
from test_to_offset import test_to_offset_pd_timedelta
```



---
## test_anchored_shortcuts
```python
from test_to_offset import test_anchored_shortcuts
```



---
## test_to_offset_lowercase_frequency_deprecated
```python
from test_to_offset import test_to_offset_lowercase_frequency_deprecated
```



---
## test_to_offset_uppercase_frequency_deprecated
```python
from test_to_offset import test_to_offset_uppercase_frequency_deprecated
```



---
## __name__
```python
from test_fields import __name__
```



---
## dtindex
```python
from test_fields import dtindex
```



---
## test_get_date_name_field_readonly
```python
from test_fields import test_get_date_name_field_readonly
```



---
## test_get_date_field_readonly
```python
from test_fields import test_get_date_field_readonly
```



---
## test_get_start_end_field_readonly
```python
from test_fields import test_get_start_end_field_readonly
```



---
## test_get_timedelta_field_readonly
```python
from test_fields import test_get_timedelta_field_readonly
```



---
## __name__
```python
from test_libfrequencies import __name__
```



---
## test_get_rule_month
```python
from test_libfrequencies import test_get_rule_month
```



---
## __name__
```python
from test_tzconversion import __name__
```



---
## TestTZLocalizeToUTC
```python
from test_tzconversion import TestTZLocalizeToUTC
```



---
## test_tz_localize_to_utc_ambiguous_infer
```python
from test_tzconversion import test_tz_localize_to_utc_ambiguous_infer
```



---
## __name__
```python
from test_parse_iso8601 import __name__
```



---
## test_parsers_iso8601
```python
from test_parse_iso8601 import test_parsers_iso8601
```



---
## test_parsers_iso8601_invalid
```python
from test_parse_iso8601 import test_parsers_iso8601_invalid
```



---
## test_parsers_iso8601_invalid_offset_invalid
```python
from test_parse_iso8601 import test_parsers_iso8601_invalid_offset_invalid
```



---
## test_parsers_iso8601_leading_space
```python
from test_parse_iso8601 import test_parsers_iso8601_leading_space
```



---
## test_iso8601_formatter
```python
from test_parse_iso8601 import test_iso8601_formatter
```



---
## __name__
```python
from test_check_indexer import __name__
```



---
## test_valid_input
```python
from test_check_indexer import test_valid_input
```



---
## test_boolean_na_returns_indexer
```python
from test_check_indexer import test_boolean_na_returns_indexer
```



---
## test_bool_raise_length
```python
from test_check_indexer import test_bool_raise_length
```



---
## test_int_raise_missing_values
```python
from test_check_indexer import test_int_raise_missing_values
```



---
## test_raise_invalid_array_dtypes
```python
from test_check_indexer import test_raise_invalid_array_dtypes
```



---
## test_raise_nullable_string_dtype
```python
from test_check_indexer import test_raise_nullable_string_dtype
```



---
## test_pass_through_non_array_likes
```python
from test_check_indexer import test_pass_through_non_array_likes
```



---
## series_ints
```python
from conftest import series_ints
```



---
## frame_ints
```python
from conftest import frame_ints
```



---
## series_uints
```python
from conftest import series_uints
```



---
## frame_uints
```python
from conftest import frame_uints
```



---
## series_labels
```python
from conftest import series_labels
```



---
## frame_labels
```python
from conftest import frame_labels
```



---
## series_ts
```python
from conftest import series_ts
```



---
## frame_ts
```python
from conftest import frame_ts
```



---
## series_floats
```python
from conftest import series_floats
```



---
## frame_floats
```python
from conftest import frame_floats
```



---
## series_mixed
```python
from conftest import series_mixed
```



---
## frame_mixed
```python
from conftest import frame_mixed
```



---
## frame_empty
```python
from conftest import frame_empty
```



---
## series_empty
```python
from conftest import series_empty
```



---
## frame_multi
```python
from conftest import frame_multi
```



---
## series_multi
```python
from conftest import series_multi
```



---
## __name__
```python
from test_chaining_and_caching import __name__
```



---
## random_text
```python
from test_chaining_and_caching import random_text
```



---
## TestCaching
```python
from test_chaining_and_caching import TestCaching
```



---
## TestChaining
```python
from test_chaining_and_caching import TestChaining
```



---
## test_slice_consolidate_invalidate_item_cache
```python
from test_chaining_and_caching import test_slice_consolidate_invalidate_item_cache
```



---
## test_setitem_cache_updating
```python
from test_chaining_and_caching import test_setitem_cache_updating
```



---
## test_setitem_cache_updating_slices
```python
from test_chaining_and_caching import test_setitem_cache_updating_slices
```



---
## test_altering_series_clears_parent_cache
```python
from test_chaining_and_caching import test_altering_series_clears_parent_cache
```



---
## test_setitem_chained_setfault
```python
from test_chaining_and_caching import test_setitem_chained_setfault
```



---
## test_detect_chained_assignment
```python
from test_chaining_and_caching import test_detect_chained_assignment
```



---
## test_detect_chained_assignment_raises
```python
from test_chaining_and_caching import test_detect_chained_assignment_raises
```



---
## test_detect_chained_assignment_fails
```python
from test_chaining_and_caching import test_detect_chained_assignment_fails
```



---
## test_detect_chained_assignment_doc_example
```python
from test_chaining_and_caching import test_detect_chained_assignment_doc_example
```



---
## test_detect_chained_assignment_object_dtype
```python
from test_chaining_and_caching import test_detect_chained_assignment_object_dtype
```



---
## test_detect_chained_assignment_is_copy_pickle
```python
from test_chaining_and_caching import test_detect_chained_assignment_is_copy_pickle
```



---
## test_detect_chained_assignment_setting_entire_column
```python
from test_chaining_and_caching import test_detect_chained_assignment_setting_entire_column
```



---
## test_detect_chained_assignment_implicit_take
```python
from test_chaining_and_caching import test_detect_chained_assignment_implicit_take
```



---
## test_detect_chained_assignment_implicit_take2
```python
from test_chaining_and_caching import test_detect_chained_assignment_implicit_take2
```



---
## test_detect_chained_assignment_str
```python
from test_chaining_and_caching import test_detect_chained_assignment_str
```



---
## test_detect_chained_assignment_is_copy
```python
from test_chaining_and_caching import test_detect_chained_assignment_is_copy
```



---
## test_detect_chained_assignment_sorting
```python
from test_chaining_and_caching import test_detect_chained_assignment_sorting
```



---
## test_detect_chained_assignment_false_positives
```python
from test_chaining_and_caching import test_detect_chained_assignment_false_positives
```



---
## test_detect_chained_assignment_undefined_column
```python
from test_chaining_and_caching import test_detect_chained_assignment_undefined_column
```



---
## test_detect_chained_assignment_changing_dtype
```python
from test_chaining_and_caching import test_detect_chained_assignment_changing_dtype
```



---
## test_setting_with_copy_bug
```python
from test_chaining_and_caching import test_setting_with_copy_bug
```



---
## test_setting_with_copy_bug_no_warning
```python
from test_chaining_and_caching import test_setting_with_copy_bug_no_warning
```



---
## test_detect_chained_assignment_warnings_errors
```python
from test_chaining_and_caching import test_detect_chained_assignment_warnings_errors
```



---
## test_detect_chained_assignment_warning_stacklevel
```python
from test_chaining_and_caching import test_detect_chained_assignment_warning_stacklevel
```



---
## test_chained_getitem_with_lists
```python
from test_chaining_and_caching import test_chained_getitem_with_lists
```



---
## test_cache_updating
```python
from test_chaining_and_caching import test_cache_updating
```



---
## test_cache_updating2
```python
from test_chaining_and_caching import test_cache_updating2
```



---
## test_iloc_setitem_chained_assignment
```python
from test_chaining_and_caching import test_iloc_setitem_chained_assignment
```



---
## test_getitem_loc_assignment_slice_state
```python
from test_chaining_and_caching import test_getitem_loc_assignment_slice_state
```



---
## __name__
```python
from test_iat import __name__
```



---
## test_iat
```python
from test_iat import test_iat
```



---
## test_iat_duplicate_columns
```python
from test_iat import test_iat_duplicate_columns
```



---
## test_iat_getitem_series_with_period_index
```python
from test_iat import test_iat_getitem_series_with_period_index
```



---
## test_iat_setitem_item_cache_cleared
```python
from test_iat import test_iat_setitem_item_cache_cleared
```



---
## __name__
```python
from test_at import __name__
```



---
## test_at_timezone
```python
from test_at import test_at_timezone
```



---
## test_selection_methods_of_assigned_col
```python
from test_at import test_selection_methods_of_assigned_col
```



---
## TestAtSetItem
```python
from test_at import TestAtSetItem
```



---
## TestAtSetItemWithExpansion
```python
from test_at import TestAtSetItemWithExpansion
```



---
## TestAtWithDuplicates
```python
from test_at import TestAtWithDuplicates
```



---
## TestAtErrors
```python
from test_at import TestAtErrors
```



---
## test_at_setitem_item_cache_cleared
```python
from test_at import test_at_setitem_item_cache_cleared
```



---
## test_at_setitem_mixed_index_assignment
```python
from test_at import test_at_setitem_mixed_index_assignment
```



---
## test_at_setitem_categorical_missing
```python
from test_at import test_at_setitem_categorical_missing
```



---
## test_at_setitem_multiindex
```python
from test_at import test_at_setitem_multiindex
```



---
## test_at_datetime_index
```python
from test_at import test_at_datetime_index
```



---
## test_at_setitem_expansion_series_dt64tz_value
```python
from test_at import test_at_setitem_expansion_series_dt64tz_value
```



---
## test_at_with_duplicate_axes_requires_scalar_lookup
```python
from test_at import test_at_with_duplicate_axes_requires_scalar_lookup
```



---
## test_at_series_raises_key_error
```python
from test_at import test_at_series_raises_key_error
```



---
## test_at_frame_raises_key_error
```python
from test_at import test_at_frame_raises_key_error
```



---
## test_at_series_raises_key_error2
```python
from test_at import test_at_series_raises_key_error2
```



---
## test_at_frame_raises_key_error2
```python
from test_at import test_at_frame_raises_key_error2
```



---
## test_at_frame_multiple_columns
```python
from test_at import test_at_frame_multiple_columns
```



---
## test_at_getitem_mixed_index_no_fallback
```python
from test_at import test_at_getitem_mixed_index_no_fallback
```



---
## test_at_categorical_integers
```python
from test_at import test_at_categorical_integers
```



---
## test_at_applied_for_rows
```python
from test_at import test_at_applied_for_rows
```



---
## df
```python
from test_categorical import df
```



---
## df2
```python
from test_categorical import df2
```



---
## TestCategoricalIndex
```python
from test_categorical import TestCategoricalIndex
```



---
## test_loc_scalar
```python
from test_categorical import test_loc_scalar
```



---
## test_loc_setitem_with_expansion_non_category
```python
from test_categorical import test_loc_setitem_with_expansion_non_category
```



---
## test_loc_getitem_scalar_non_category
```python
from test_categorical import test_loc_getitem_scalar_non_category
```



---
## test_slicing
```python
from test_categorical import test_slicing
```



---
## test_slicing_and_getting_ops
```python
from test_categorical import test_slicing_and_getting_ops
```



---
## test_slicing_doc_examples
```python
from test_categorical import test_slicing_doc_examples
```



---
## test_loc_getitem_listlike_labels
```python
from test_categorical import test_loc_getitem_listlike_labels
```



---
## test_loc_getitem_listlike_unused_category
```python
from test_categorical import test_loc_getitem_listlike_unused_category
```



---
## test_loc_getitem_label_unused_category
```python
from test_categorical import test_loc_getitem_label_unused_category
```



---
## test_loc_getitem_non_category
```python
from test_categorical import test_loc_getitem_non_category
```



---
## test_loc_setitem_expansion_label_unused_category
```python
from test_categorical import test_loc_setitem_expansion_label_unused_category
```



---
## test_loc_listlike_dtypes
```python
from test_categorical import test_loc_listlike_dtypes
```



---
## test_loc_listlike_dtypes_duplicated_categories_and_codes
```python
from test_categorical import test_loc_listlike_dtypes_duplicated_categories_and_codes
```



---
## test_loc_listlike_dtypes_unused_category
```python
from test_categorical import test_loc_listlike_dtypes_unused_category
```



---
## test_loc_getitem_listlike_unused_category_raises_keyerror
```python
from test_categorical import test_loc_getitem_listlike_unused_category_raises_keyerror
```



---
## test_ix_categorical_index
```python
from test_categorical import test_ix_categorical_index
```



---
## test_ix_categorical_index_non_unique
```python
from test_categorical import test_ix_categorical_index_non_unique
```



---
## test_loc_slice
```python
from test_categorical import test_loc_slice
```



---
## test_loc_and_at_with_categorical_index
```python
from test_categorical import test_loc_and_at_with_categorical_index
```



---
## test_loc_getitem_with_non_string_categories
```python
from test_categorical import test_loc_getitem_with_non_string_categories
```



---
## test_getitem_categorical_with_nan
```python
from test_categorical import test_getitem_categorical_with_nan
```



---
## __name__
```python
from test_iloc import __name__
```



---
## TestiLoc
```python
from test_iloc import TestiLoc
```



---
## TestiLocBaseIndependent
```python
from test_iloc import TestiLocBaseIndependent
```

Tests Independent Of Base Class

---
## TestILocErrors
```python
from test_iloc import TestILocErrors
```



---
## TestILocSetItemDuplicateColumns
```python
from test_iloc import TestILocSetItemDuplicateColumns
```



---
## TestILocCallable
```python
from test_iloc import TestILocCallable
```



---
## TestILocSeries
```python
from test_iloc import TestILocSeries
```



---
## test_iloc_getitem_int_and_list_int
```python
from test_iloc import test_iloc_getitem_int_and_list_int
```



---
## test_iloc_setitem_fullcol_categorical
```python
from test_iloc import test_iloc_setitem_fullcol_categorical
```



---
## test_iloc_setitem_ea_inplace
```python
from test_iloc import test_iloc_setitem_ea_inplace
```



---
## test_is_scalar_access
```python
from test_iloc import test_is_scalar_access
```



---
## test_iloc_exceeds_bounds
```python
from test_iloc import test_iloc_exceeds_bounds
```



---
## test_iloc_non_integer_raises
```python
from test_iloc import test_iloc_non_integer_raises
```



---
## test_iloc_getitem_invalid_scalar
```python
from test_iloc import test_iloc_getitem_invalid_scalar
```



---
## test_iloc_array_not_mutating_negative_indices
```python
from test_iloc import test_iloc_array_not_mutating_negative_indices
```



---
## test_iloc_getitem_neg_int_can_reach_first_index
```python
from test_iloc import test_iloc_getitem_neg_int_can_reach_first_index
```



---
## test_iloc_getitem_dups
```python
from test_iloc import test_iloc_getitem_dups
```



---
## test_iloc_getitem_array
```python
from test_iloc import test_iloc_getitem_array
```



---
## test_iloc_getitem_bool
```python
from test_iloc import test_iloc_getitem_bool
```



---
## test_iloc_getitem_bool_diff_len
```python
from test_iloc import test_iloc_getitem_bool_diff_len
```



---
## test_iloc_getitem_slice
```python
from test_iloc import test_iloc_getitem_slice
```



---
## test_iloc_getitem_slice_dups
```python
from test_iloc import test_iloc_getitem_slice_dups
```



---
## test_iloc_setitem
```python
from test_iloc import test_iloc_setitem
```



---
## test_iloc_setitem_axis_argument
```python
from test_iloc import test_iloc_setitem_axis_argument
```



---
## test_iloc_setitem_list
```python
from test_iloc import test_iloc_setitem_list
```



---
## test_iloc_setitem_pandas_object
```python
from test_iloc import test_iloc_setitem_pandas_object
```



---
## test_iloc_setitem_dups
```python
from test_iloc import test_iloc_setitem_dups
```



---
## test_iloc_setitem_frame_duplicate_columns_multiple_blocks
```python
from test_iloc import test_iloc_setitem_frame_duplicate_columns_multiple_blocks
```



---
## test_iloc_getitem_frame
```python
from test_iloc import test_iloc_getitem_frame
```



---
## test_iloc_getitem_labelled_frame
```python
from test_iloc import test_iloc_getitem_labelled_frame
```



---
## test_iloc_getitem_doc_issue
```python
from test_iloc import test_iloc_getitem_doc_issue
```



---
## test_iloc_setitem_series
```python
from test_iloc import test_iloc_setitem_series
```



---
## test_iloc_setitem_list_of_lists
```python
from test_iloc import test_iloc_setitem_list_of_lists
```



---
## test_iloc_setitem_with_scalar_index
```python
from test_iloc import test_iloc_setitem_with_scalar_index
```



---
## test_iloc_mask
```python
from test_iloc import test_iloc_mask
```



---
## test_iloc_non_unique_indexing
```python
from test_iloc import test_iloc_non_unique_indexing
```



---
## test_iloc_empty_list_indexer_is_ok
```python
from test_iloc import test_iloc_empty_list_indexer_is_ok
```



---
## test_identity_slice_returns_new_object
```python
from test_iloc import test_identity_slice_returns_new_object
```



---
## test_indexing_zerodim_np_array
```python
from test_iloc import test_indexing_zerodim_np_array
```



---
## test_series_indexing_zerodim_np_array
```python
from test_iloc import test_series_indexing_zerodim_np_array
```



---
## test_iloc_setitem_categorical_updates_inplace
```python
from test_iloc import test_iloc_setitem_categorical_updates_inplace
```



---
## test_iloc_with_boolean_operation
```python
from test_iloc import test_iloc_with_boolean_operation
```



---
## test_iloc_getitem_singlerow_slice_categoricaldtype_gives_series
```python
from test_iloc import test_iloc_getitem_singlerow_slice_categoricaldtype_gives_series
```



---
## test_iloc_getitem_categorical_values
```python
from test_iloc import test_iloc_getitem_categorical_values
```



---
## test_iloc_setitem_td64_values_cast_na
```python
from test_iloc import test_iloc_setitem_td64_values_cast_na
```



---
## test_setitem_mix_of_nan_and_interval
```python
from test_iloc import test_setitem_mix_of_nan_and_interval
```



---
## test_iloc_setitem_empty_frame_raises_with_3d_ndarray
```python
from test_iloc import test_iloc_setitem_empty_frame_raises_with_3d_ndarray
```



---
## test_iloc_getitem_read_only_values
```python
from test_iloc import test_iloc_getitem_read_only_values
```



---
## test_iloc_getitem_readonly_key
```python
from test_iloc import test_iloc_getitem_readonly_key
```



---
## test_iloc_assign_series_to_df_cell
```python
from test_iloc import test_iloc_assign_series_to_df_cell
```



---
## test_iloc_setitem_bool_indexer
```python
from test_iloc import test_iloc_setitem_bool_indexer
```



---
## test_iloc_setitem_pure_position_based
```python
from test_iloc import test_iloc_setitem_pure_position_based
```



---
## test_iloc_setitem_dictionary_value
```python
from test_iloc import test_iloc_setitem_dictionary_value
```



---
## test_iloc_getitem_float_duplicates
```python
from test_iloc import test_iloc_getitem_float_duplicates
```



---
## test_iloc_setitem_custom_object
```python
from test_iloc import test_iloc_setitem_custom_object
```



---
## test_iloc_getitem_with_duplicates
```python
from test_iloc import test_iloc_getitem_with_duplicates
```



---
## test_iloc_getitem_with_duplicates2
```python
from test_iloc import test_iloc_getitem_with_duplicates2
```



---
## test_iloc_interval
```python
from test_iloc import test_iloc_interval
```



---
## test_loc_setitem_boolean_list
```python
from test_iloc import test_loc_setitem_boolean_list
```



---
## test_iloc_getitem_slice_negative_step_ea_block
```python
from test_iloc import test_iloc_getitem_slice_negative_step_ea_block
```



---
## test_iloc_setitem_2d_ndarray_into_ea_block
```python
from test_iloc import test_iloc_setitem_2d_ndarray_into_ea_block
```



---
## test_iloc_getitem_int_single_ea_block_view
```python
from test_iloc import test_iloc_getitem_int_single_ea_block_view
```



---
## test_iloc_setitem_multicolumn_to_datetime
```python
from test_iloc import test_iloc_setitem_multicolumn_to_datetime
```



---
## test_iloc_float_raises
```python
from test_iloc import test_iloc_float_raises
```



---
## test_iloc_getitem_setitem_fancy_exceptions
```python
from test_iloc import test_iloc_getitem_setitem_fancy_exceptions
```



---
## test_iloc_frame_indexer
```python
from test_iloc import test_iloc_frame_indexer
```



---
## test_iloc_setitem_scalar_duplicate_columns
```python
from test_iloc import test_iloc_setitem_scalar_duplicate_columns
```



---
## test_iloc_setitem_list_duplicate_columns
```python
from test_iloc import test_iloc_setitem_list_duplicate_columns
```



---
## test_iloc_setitem_series_duplicate_columns
```python
from test_iloc import test_iloc_setitem_series_duplicate_columns
```



---
## test_iloc_setitem_dtypes_duplicate_columns
```python
from test_iloc import test_iloc_setitem_dtypes_duplicate_columns
```



---
## test_frame_iloc_getitem_callable
```python
from test_iloc import test_frame_iloc_getitem_callable
```



---
## test_frame_iloc_setitem_callable
```python
from test_iloc import test_frame_iloc_setitem_callable
```



---
## test_iloc
```python
from test_iloc import test_iloc
```



---
## test_iloc_getitem_nonunique
```python
from test_iloc import test_iloc_getitem_nonunique
```



---
## test_iloc_nullable_int64_size_1_nan
```python
from test_iloc import test_iloc_nullable_int64_size_1_nan
```



---
## TO
```python
from test_iloc import TO
```



---
## __init__
```python
from test_iloc import __init__
```



---
## __str__
```python
from test_iloc import __str__
```



---
## __eq__
```python
from test_iloc import __eq__
```



---
## view
```python
from test_iloc import view
```



---
## __name__
```python
from test_loc import __name__
```



---
## test_not_change_nan_loc
```python
from test_loc import test_not_change_nan_loc
```



---
## TestLoc
```python
from test_loc import TestLoc
```



---
## TestLocBaseIndependent
```python
from test_loc import TestLocBaseIndependent
```



---
## TestLocWithEllipsis
```python
from test_loc import TestLocWithEllipsis
```



---
## TestLocWithMultiIndex
```python
from test_loc import TestLocWithMultiIndex
```



---
## TestLocSetitemWithExpansion
```python
from test_loc import TestLocSetitemWithExpansion
```



---
## TestLocCallable
```python
from test_loc import TestLocCallable
```



---
## TestPartialStringSlicing
```python
from test_loc import TestPartialStringSlicing
```



---
## TestLabelSlicing
```python
from test_loc import TestLabelSlicing
```



---
## TestLocBooleanLabelsAndSlices
```python
from test_loc import TestLocBooleanLabelsAndSlices
```



---
## TestLocBooleanMask
```python
from test_loc import TestLocBooleanMask
```



---
## TestLocListlike
```python
from test_loc import TestLocListlike
```



---
## test_loc_getitem_label_list_integer_labels
```python
from test_loc import test_loc_getitem_label_list_integer_labels
```



---
## test_loc_setitem_float_intindex
```python
from test_loc import test_loc_setitem_float_intindex
```



---
## test_loc_axis_1_slice
```python
from test_loc import test_loc_axis_1_slice
```



---
## test_loc_set_dataframe_multiindex
```python
from test_loc import test_loc_set_dataframe_multiindex
```



---
## test_loc_mixed_int_float
```python
from test_loc import test_loc_mixed_int_float
```



---
## test_loc_with_positional_slice_raises
```python
from test_loc import test_loc_with_positional_slice_raises
```



---
## test_loc_slice_disallows_positional
```python
from test_loc import test_loc_slice_disallows_positional
```



---
## test_loc_datetimelike_mismatched_dtypes
```python
from test_loc import test_loc_datetimelike_mismatched_dtypes
```



---
## test_loc_with_period_index_indexer
```python
from test_loc import test_loc_with_period_index_indexer
```



---
## test_loc_setitem_multiindex_timestamp
```python
from test_loc import test_loc_setitem_multiindex_timestamp
```



---
## test_loc_getitem_multiindex_tuple_level
```python
from test_loc import test_loc_getitem_multiindex_tuple_level
```



---
## test_loc_getitem_nullable_index_with_duplicates
```python
from test_loc import test_loc_getitem_nullable_index_with_duplicates
```



---
## test_loc_setitem_uint8_upcast
```python
from test_loc import test_loc_setitem_uint8_upcast
```



---
## test_loc_setitem_using_datetimelike_str_as_index
```python
from test_loc import test_loc_setitem_using_datetimelike_str_as_index
```



---
## test_loc_set_int_dtype
```python
from test_loc import test_loc_set_int_dtype
```



---
## test_loc_periodindex_3_levels
```python
from test_loc import test_loc_periodindex_3_levels
```



---
## test_loc_setitem_pyarrow_strings
```python
from test_loc import test_loc_setitem_pyarrow_strings
```



---
## TestLocSeries
```python
from test_loc import TestLocSeries
```



---
## test_none_values_on_string_columns
```python
from test_loc import test_none_values_on_string_columns
```



---
## test_loc_getitem_int
```python
from test_loc import test_loc_getitem_int
```



---
## test_loc_getitem_label
```python
from test_loc import test_loc_getitem_label
```



---
## test_loc_getitem_label_out_of_range
```python
from test_loc import test_loc_getitem_label_out_of_range
```



---
## test_loc_getitem_label_list
```python
from test_loc import test_loc_getitem_label_list
```



---
## test_loc_getitem_label_list_with_missing
```python
from test_loc import test_loc_getitem_label_list_with_missing
```



---
## test_loc_getitem_label_list_fails
```python
from test_loc import test_loc_getitem_label_list_fails
```



---
## test_loc_getitem_label_array_like
```python
from test_loc import test_loc_getitem_label_array_like
```



---
## test_loc_getitem_bool
```python
from test_loc import test_loc_getitem_bool
```



---
## test_loc_getitem_label_slice
```python
from test_loc import test_loc_getitem_label_slice
```



---
## test_setitem_from_duplicate_axis
```python
from test_loc import test_setitem_from_duplicate_axis
```



---
## test_column_types_consistent
```python
from test_loc import test_column_types_consistent
```



---
## test_loc_getitem_single_boolean_arg
```python
from test_loc import test_loc_getitem_single_boolean_arg
```



---
## test_loc_npstr
```python
from test_loc import test_loc_npstr
```



---
## test_contains_raise_error_if_period_index_is_in_multi_index
```python
from test_loc import test_contains_raise_error_if_period_index_is_in_multi_index
```

parse_datetime_string_with_reso return parameter if type not matched.
PeriodIndex.get_loc takes returned value from parse_datetime_string_with_reso
as a tuple.
If first argument is Period and a tuple has 3 items,
process go on not raise exception

---
## test_loc_getitem_missing_unicode_key
```python
from test_loc import test_loc_getitem_missing_unicode_key
```



---
## test_loc_getitem_dups
```python
from test_loc import test_loc_getitem_dups
```



---
## test_loc_getitem_dups2
```python
from test_loc import test_loc_getitem_dups2
```



---
## test_loc_setitem_dups
```python
from test_loc import test_loc_setitem_dups
```



---
## test_loc_setitem_slice
```python
from test_loc import test_loc_setitem_slice
```



---
## test_loc_setitem_dtype
```python
from test_loc import test_loc_setitem_dtype
```



---
## test_getitem_label_list_with_missing
```python
from test_loc import test_getitem_label_list_with_missing
```



---
## test_loc_getitem_bool_diff_len
```python
from test_loc import test_loc_getitem_bool_diff_len
```



---
## test_loc_getitem_int_slice
```python
from test_loc import test_loc_getitem_int_slice
```



---
## test_loc_to_fail
```python
from test_loc import test_loc_to_fail
```



---
## test_loc_to_fail2
```python
from test_loc import test_loc_to_fail2
```



---
## test_loc_to_fail3
```python
from test_loc import test_loc_to_fail3
```



---
## test_loc_getitem_list_with_fail
```python
from test_loc import test_loc_getitem_list_with_fail
```



---
## test_loc_index
```python
from test_loc import test_loc_index
```



---
## test_loc_general
```python
from test_loc import test_loc_general
```



---
## frame_for_consistency
```python
from test_loc import frame_for_consistency
```



---
## test_loc_setitem_consistency
```python
from test_loc import test_loc_setitem_consistency
```



---
## test_loc_setitem_consistency_dt64_to_str
```python
from test_loc import test_loc_setitem_consistency_dt64_to_str
```



---
## test_loc_setitem_consistency_dt64_to_float
```python
from test_loc import test_loc_setitem_consistency_dt64_to_float
```



---
## test_loc_setitem_consistency_single_row
```python
from test_loc import test_loc_setitem_consistency_single_row
```



---
## test_loc_setitem_consistency_empty
```python
from test_loc import test_loc_setitem_consistency_empty
```



---
## test_loc_setitem_consistency_slice_column_len
```python
from test_loc import test_loc_setitem_consistency_slice_column_len
```



---
## test_loc_assign_non_ns_datetime
```python
from test_loc import test_loc_assign_non_ns_datetime
```



---
## test_loc_modify_datetime
```python
from test_loc import test_loc_modify_datetime
```



---
## test_loc_setitem_frame_with_reindex
```python
from test_loc import test_loc_setitem_frame_with_reindex
```



---
## test_loc_setitem_frame_with_reindex_mixed
```python
from test_loc import test_loc_setitem_frame_with_reindex_mixed
```



---
## test_loc_setitem_frame_with_inverted_slice
```python
from test_loc import test_loc_setitem_frame_with_inverted_slice
```



---
## test_loc_setitem_empty_frame
```python
from test_loc import test_loc_setitem_empty_frame
```



---
## test_loc_setitem_frame
```python
from test_loc import test_loc_setitem_frame
```



---
## test_loc_setitem_frame_nan_int_coercion_invalid
```python
from test_loc import test_loc_setitem_frame_nan_int_coercion_invalid
```



---
## test_loc_setitem_frame_mixed_labels
```python
from test_loc import test_loc_setitem_frame_mixed_labels
```



---
## test_loc_setitem_frame_multiples
```python
from test_loc import test_loc_setitem_frame_multiples
```



---
## test_loc_setitem_with_scalar_index
```python
from test_loc import test_loc_setitem_with_scalar_index
```



---
## test_loc_setitem_missing_columns
```python
from test_loc import test_loc_setitem_missing_columns
```



---
## test_loc_coercion
```python
from test_loc import test_loc_coercion
```



---
## test_loc_coercion2
```python
from test_loc import test_loc_coercion2
```



---
## test_loc_coercion3
```python
from test_loc import test_loc_coercion3
```



---
## test_setitem_new_key_tz
```python
from test_loc import test_setitem_new_key_tz
```



---
## test_loc_non_unique
```python
from test_loc import test_loc_non_unique
```



---
## test_loc_non_unique_memory_error
```python
from test_loc import test_loc_non_unique_memory_error
```



---
## test_loc_name
```python
from test_loc import test_loc_name
```



---
## test_loc_empty_list_indexer_is_ok
```python
from test_loc import test_loc_empty_list_indexer_is_ok
```



---
## test_identity_slice_returns_new_object
```python
from test_loc import test_identity_slice_returns_new_object
```



---
## test_loc_copy_vs_view
```python
from test_loc import test_loc_copy_vs_view
```



---
## test_loc_uint64
```python
from test_loc import test_loc_uint64
```



---
## test_loc_uint64_disallow_negative
```python
from test_loc import test_loc_uint64_disallow_negative
```



---
## test_loc_setitem_empty_append_expands_rows
```python
from test_loc import test_loc_setitem_empty_append_expands_rows
```



---
## test_loc_setitem_empty_append_expands_rows_mixed_dtype
```python
from test_loc import test_loc_setitem_empty_append_expands_rows_mixed_dtype
```



---
## test_loc_setitem_empty_append_single_value
```python
from test_loc import test_loc_setitem_empty_append_single_value
```



---
## test_loc_setitem_empty_append_raises
```python
from test_loc import test_loc_setitem_empty_append_raises
```



---
## test_indexing_zerodim_np_array
```python
from test_loc import test_indexing_zerodim_np_array
```



---
## test_series_indexing_zerodim_np_array
```python
from test_loc import test_series_indexing_zerodim_np_array
```



---
## test_loc_reverse_assignment
```python
from test_loc import test_loc_reverse_assignment
```



---
## test_loc_setitem_str_to_small_float_conversion_type
```python
from test_loc import test_loc_setitem_str_to_small_float_conversion_type
```



---
## test_loc_getitem_time_object
```python
from test_loc import test_loc_getitem_time_object
```



---
## test_loc_getitem_range_from_spmatrix
```python
from test_loc import test_loc_getitem_range_from_spmatrix
```



---
## test_loc_getitem_listlike_all_retains_sparse
```python
from test_loc import test_loc_getitem_listlike_all_retains_sparse
```



---
## test_loc_getitem_sparse_frame
```python
from test_loc import test_loc_getitem_sparse_frame
```



---
## test_loc_getitem_sparse_series
```python
from test_loc import test_loc_getitem_sparse_series
```



---
## test_getitem_single_row_sparse_df
```python
from test_loc import test_getitem_single_row_sparse_df
```



---
## test_loc_getitem_iterable
```python
from test_loc import test_loc_getitem_iterable
```



---
## test_loc_getitem_timedelta_0seconds
```python
from test_loc import test_loc_getitem_timedelta_0seconds
```



---
## test_loc_getitem_uint64_scalar
```python
from test_loc import test_loc_getitem_uint64_scalar
```



---
## test_loc_setitem_int_label_with_float_index
```python
from test_loc import test_loc_setitem_int_label_with_float_index
```



---
## test_loc_setitem_listlike_with_timedelta64index
```python
from test_loc import test_loc_setitem_listlike_with_timedelta64index
```



---
## test_loc_setitem_categorical_values_partial_column_slice
```python
from test_loc import test_loc_setitem_categorical_values_partial_column_slice
```



---
## test_loc_setitem_single_row_categorical
```python
from test_loc import test_loc_setitem_single_row_categorical
```



---
## test_loc_setitem_datetime_coercion
```python
from test_loc import test_loc_setitem_datetime_coercion
```



---
## test_loc_setitem_datetimeindex_tz
```python
from test_loc import test_loc_setitem_datetimeindex_tz
```



---
## test_loc_setitem_time_key
```python
from test_loc import test_loc_setitem_time_key
```



---
## test_loc_setitem_unsorted_multiindex_columns
```python
from test_loc import test_loc_setitem_unsorted_multiindex_columns
```



---
## test_loc_setitem_uint_drop
```python
from test_loc import test_loc_setitem_uint_drop
```



---
## test_loc_setitem_td64_non_nano
```python
from test_loc import test_loc_setitem_td64_non_nano
```



---
## test_loc_setitem_2d_to_1d_raises
```python
from test_loc import test_loc_setitem_2d_to_1d_raises
```



---
## test_loc_getitem_interval_index
```python
from test_loc import test_loc_getitem_interval_index
```



---
## test_loc_getitem_interval_index2
```python
from test_loc import test_loc_getitem_interval_index2
```



---
## test_loc_getitem_index_single_double_tuples
```python
from test_loc import test_loc_getitem_index_single_double_tuples
```



---
## test_loc_getitem_index_namedtuple
```python
from test_loc import test_loc_getitem_index_namedtuple
```



---
## test_loc_setitem_single_column_mixed
```python
from test_loc import test_loc_setitem_single_column_mixed
```



---
## test_loc_setitem_cast2
```python
from test_loc import test_loc_setitem_cast2
```



---
## test_loc_setitem_cast3
```python
from test_loc import test_loc_setitem_cast3
```



---
## test_loc_setitem_range_key
```python
from test_loc import test_loc_setitem_range_key
```



---
## test_loc_setitem_numpy_frame_categorical_value
```python
from test_loc import test_loc_setitem_numpy_frame_categorical_value
```



---
## indexer
```python
from test_loc import indexer
```



---
## obj
```python
from test_loc import obj
```



---
## test_loc_iloc_getitem_ellipsis
```python
from test_loc import test_loc_iloc_getitem_ellipsis
```



---
## test_loc_iloc_getitem_leading_ellipses
```python
from test_loc import test_loc_iloc_getitem_leading_ellipses
```



---
## test_loc_iloc_getitem_ellipses_only_one_ellipsis
```python
from test_loc import test_loc_iloc_getitem_ellipses_only_one_ellipsis
```



---
## test_loc_getitem_multilevel_index_order
```python
from test_loc import test_loc_getitem_multilevel_index_order
```



---
## test_loc_preserve_names
```python
from test_loc import test_loc_preserve_names
```



---
## test_loc_getitem_multiindex_nonunique_len_zero
```python
from test_loc import test_loc_getitem_multiindex_nonunique_len_zero
```



---
## test_loc_getitem_access_none_value_in_multiindex
```python
from test_loc import test_loc_getitem_access_none_value_in_multiindex
```



---
## test_loc_setitem_multiindex_slice
```python
from test_loc import test_loc_setitem_multiindex_slice
```



---
## test_loc_getitem_slice_datetime_objs_with_datetimeindex
```python
from test_loc import test_loc_getitem_slice_datetime_objs_with_datetimeindex
```



---
## test_loc_getitem_datetime_string_with_datetimeindex
```python
from test_loc import test_loc_getitem_datetime_string_with_datetimeindex
```



---
## test_loc_getitem_sorted_index_level_with_duplicates
```python
from test_loc import test_loc_getitem_sorted_index_level_with_duplicates
```



---
## test_additional_element_to_categorical_series_loc
```python
from test_loc import test_additional_element_to_categorical_series_loc
```



---
## test_additional_categorical_element_loc
```python
from test_loc import test_additional_categorical_element_loc
```



---
## test_loc_set_nan_in_categorical_series
```python
from test_loc import test_loc_set_nan_in_categorical_series
```



---
## test_loc_consistency_series_enlarge_set_into
```python
from test_loc import test_loc_consistency_series_enlarge_set_into
```



---
## test_loc_getitem_preserves_index_level_category_dtype
```python
from test_loc import test_loc_getitem_preserves_index_level_category_dtype
```



---
## test_loc_multiindex_levels_contain_values_not_in_index_anymore
```python
from test_loc import test_loc_multiindex_levels_contain_values_not_in_index_anymore
```



---
## test_loc_multiindex_null_slice_na_level
```python
from test_loc import test_loc_multiindex_null_slice_na_level
```



---
## test_loc_drops_level
```python
from test_loc import test_loc_drops_level
```



---
## test_loc_setitem_with_expansion_large_dataframe
```python
from test_loc import test_loc_setitem_with_expansion_large_dataframe
```



---
## test_loc_setitem_empty_series
```python
from test_loc import test_loc_setitem_empty_series
```



---
## test_loc_setitem_empty_series_float
```python
from test_loc import test_loc_setitem_empty_series_float
```



---
## test_loc_setitem_empty_series_str_idx
```python
from test_loc import test_loc_setitem_empty_series_str_idx
```



---
## test_loc_setitem_incremental_with_dst
```python
from test_loc import test_loc_setitem_incremental_with_dst
```



---
## test_loc_setitem_datetime_keys_cast
```python
from test_loc import test_loc_setitem_datetime_keys_cast
```



---
## test_loc_setitem_categorical_column_retains_dtype
```python
from test_loc import test_loc_setitem_categorical_column_retains_dtype
```



---
## test_loc_setitem_with_expansion_and_existing_dst
```python
from test_loc import test_loc_setitem_with_expansion_and_existing_dst
```



---
## test_setitem_with_expansion
```python
from test_loc import test_setitem_with_expansion
```



---
## test_loc_setitem_with_expansion_inf_upcast_empty
```python
from test_loc import test_loc_setitem_with_expansion_inf_upcast_empty
```



---
## test_loc_setitem_with_expansion_nonunique_index
```python
from test_loc import test_loc_setitem_with_expansion_nonunique_index
```



---
## test_loc_setitem_with_expansion_preserves_nullable_int
```python
from test_loc import test_loc_setitem_with_expansion_preserves_nullable_int
```



---
## test_loc_setitem_ea_not_full_column
```python
from test_loc import test_loc_setitem_ea_not_full_column
```



---
## test_frame_loc_getitem_callable
```python
from test_loc import test_frame_loc_getitem_callable
```



---
## test_frame_loc_getitem_callable_mixture
```python
from test_loc import test_frame_loc_getitem_callable_mixture
```



---
## test_frame_loc_getitem_callable_labels
```python
from test_loc import test_frame_loc_getitem_callable_labels
```



---
## test_frame_loc_setitem_callable
```python
from test_loc import test_frame_loc_setitem_callable
```



---
## test_loc_getitem_partial_string_slicing_datetimeindex
```python
from test_loc import test_loc_getitem_partial_string_slicing_datetimeindex
```



---
## test_loc_getitem_partial_string_slicing_with_periodindex
```python
from test_loc import test_loc_getitem_partial_string_slicing_with_periodindex
```



---
## test_loc_getitem_partial_string_slicing_with_timedeltaindex
```python
from test_loc import test_loc_getitem_partial_string_slicing_with_timedeltaindex
```



---
## test_loc_getitem_str_timedeltaindex
```python
from test_loc import test_loc_getitem_str_timedeltaindex
```



---
## test_loc_getitem_partial_slice_non_monotonicity
```python
from test_loc import test_loc_getitem_partial_slice_non_monotonicity
```



---
## test_loc_getitem_slicing_datetimes_frame
```python
from test_loc import test_loc_getitem_slicing_datetimes_frame
```



---
## test_loc_getitem_label_slice_across_dst
```python
from test_loc import test_loc_getitem_label_slice_across_dst
```



---
## test_loc_getitem_label_slice_period_timedelta
```python
from test_loc import test_loc_getitem_label_slice_period_timedelta
```



---
## test_loc_getitem_slice_floats_inexact
```python
from test_loc import test_loc_getitem_slice_floats_inexact
```



---
## test_loc_getitem_float_slice_floatindex
```python
from test_loc import test_loc_getitem_float_slice_floatindex
```



---
## test_loc_getitem_slice_label_td64obj
```python
from test_loc import test_loc_getitem_slice_label_td64obj
```



---
## test_loc_getitem_slice_unordered_dt_index
```python
from test_loc import test_loc_getitem_slice_unordered_dt_index
```



---
## test_loc_getitem_slice_labels_int_in_object_index
```python
from test_loc import test_loc_getitem_slice_labels_int_in_object_index
```



---
## test_loc_getitem_slice_columns_mixed_dtype
```python
from test_loc import test_loc_getitem_slice_columns_mixed_dtype
```



---
## test_loc_bool_incompatible_index_raises
```python
from test_loc import test_loc_bool_incompatible_index_raises
```



---
## test_loc_bool_should_not_raise
```python
from test_loc import test_loc_bool_should_not_raise
```



---
## test_loc_bool_slice_raises
```python
from test_loc import test_loc_bool_slice_raises
```



---
## test_loc_setitem_bool_mask_timedeltaindex
```python
from test_loc import test_loc_setitem_bool_mask_timedeltaindex
```



---
## test_loc_setitem_mask_with_datetimeindex_tz
```python
from test_loc import test_loc_setitem_mask_with_datetimeindex_tz
```



---
## test_loc_setitem_mask_and_label_with_datetimeindex
```python
from test_loc import test_loc_setitem_mask_and_label_with_datetimeindex
```



---
## test_loc_setitem_mask_td64_series_value
```python
from test_loc import test_loc_setitem_mask_td64_series_value
```



---
## test_loc_setitem_boolean_and_column
```python
from test_loc import test_loc_setitem_boolean_and_column
```



---
## test_loc_setitem_ndframe_values_alignment
```python
from test_loc import test_loc_setitem_ndframe_values_alignment
```



---
## test_loc_indexer_empty_broadcast
```python
from test_loc import test_loc_indexer_empty_broadcast
```



---
## test_loc_indexer_all_false_broadcast
```python
from test_loc import test_loc_indexer_all_false_broadcast
```



---
## test_loc_indexer_length_one
```python
from test_loc import test_loc_indexer_length_one
```



---
## test_loc_getitem_list_of_labels_categoricalindex_with_na
```python
from test_loc import test_loc_getitem_list_of_labels_categoricalindex_with_na
```



---
## test_loc_getitem_series_label_list_missing_values
```python
from test_loc import test_loc_getitem_series_label_list_missing_values
```



---
## test_loc_getitem_series_label_list_missing_integer_values
```python
from test_loc import test_loc_getitem_series_label_list_missing_integer_values
```



---
## test_loc_getitem_listlike_of_datetimelike_keys
```python
from test_loc import test_loc_getitem_listlike_of_datetimelike_keys
```



---
## test_loc_named_index
```python
from test_loc import test_loc_named_index
```



---
## test_loc_getitem
```python
from test_loc import test_loc_getitem
```



---
## test_loc_getitem_not_monotonic
```python
from test_loc import test_loc_getitem_not_monotonic
```



---
## test_loc_getitem_setitem_integer_slice_keyerrors
```python
from test_loc import test_loc_getitem_setitem_integer_slice_keyerrors
```



---
## test_loc_getitem_iterator
```python
from test_loc import test_loc_getitem_iterator
```



---
## test_loc_setitem_boolean
```python
from test_loc import test_loc_setitem_boolean
```



---
## test_loc_setitem_corner
```python
from test_loc import test_loc_setitem_corner
```



---
## test_basic_setitem_with_labels
```python
from test_loc import test_basic_setitem_with_labels
```



---
## test_loc_setitem_listlike_of_ints
```python
from test_loc import test_loc_setitem_listlike_of_ints
```



---
## test_loc_setitem_dt64tz_values
```python
from test_loc import test_loc_setitem_dt64tz_values
```



---
## test_loc_iloc_setitem_with_listlike
```python
from test_loc import test_loc_iloc_setitem_with_listlike
```



---
## test_loc_series_getitem_too_many_dimensions
```python
from test_loc import test_loc_series_getitem_too_many_dimensions
```



---
## test_loc_setitem
```python
from test_loc import test_loc_setitem
```



---
## test_loc_assign_dict_to_row
```python
from test_loc import test_loc_assign_dict_to_row
```



---
## test_loc_setitem_dict_timedelta_multiple_set
```python
from test_loc import test_loc_setitem_dict_timedelta_multiple_set
```



---
## test_loc_set_multiple_items_in_multiple_new_columns
```python
from test_loc import test_loc_set_multiple_items_in_multiple_new_columns
```



---
## test_getitem_loc_str_periodindex
```python
from test_loc import test_getitem_loc_str_periodindex
```



---
## test_loc_nonunique_masked_index
```python
from test_loc import test_loc_nonunique_masked_index
```



---
## TestFancy
```python
from test_indexing import TestFancy
```

pure get/set item & fancy indexing

---
## TestMisc
```python
from test_indexing import TestMisc
```



---
## TestDataframeNoneCoercion
```python
from test_indexing import TestDataframeNoneCoercion
```



---
## TestDatetimelikeCoercion
```python
from test_indexing import TestDatetimelikeCoercion
```



---
## test_extension_array_cross_section
```python
from test_indexing import test_extension_array_cross_section
```



---
## test_extension_array_cross_section_converts
```python
from test_indexing import test_extension_array_cross_section_converts
```



---
## test_ser_tup_indexer_exceeds_dimensions
```python
from test_indexing import test_ser_tup_indexer_exceeds_dimensions
```



---
## test_ser_list_indexer_exceeds_dimensions
```python
from test_indexing import test_ser_list_indexer_exceeds_dimensions
```



---
## test_scalar_setitem_with_nested_value
```python
from test_indexing import test_scalar_setitem_with_nested_value
```



---
## test_scalar_setitem_series_with_nested_value
```python
from test_indexing import test_scalar_setitem_series_with_nested_value
```



---
## test_scalar_setitem_with_nested_value_length1
```python
from test_indexing import test_scalar_setitem_with_nested_value_length1
```



---
## test_scalar_setitem_series_with_nested_value_length1
```python
from test_indexing import test_scalar_setitem_series_with_nested_value_length1
```



---
## test_object_dtype_series_set_series_element
```python
from test_indexing import test_object_dtype_series_set_series_element
```



---
## test_setitem_ndarray_1d
```python
from test_indexing import test_setitem_ndarray_1d
```



---
## test_setitem_ndarray_1d_2
```python
from test_indexing import test_setitem_ndarray_1d_2
```



---
## test_getitem_ndarray_3d
```python
from test_indexing import test_getitem_ndarray_3d
```



---
## test_setitem_ndarray_3d
```python
from test_indexing import test_setitem_ndarray_3d
```



---
## test_getitem_ndarray_0d
```python
from test_indexing import test_getitem_ndarray_0d
```



---
## test_inf_upcast
```python
from test_indexing import test_inf_upcast
```



---
## test_setitem_dtype_upcast
```python
from test_indexing import test_setitem_dtype_upcast
```



---
## test_setitem_dtype_upcast2
```python
from test_indexing import test_setitem_dtype_upcast2
```



---
## test_setitem_dtype_upcast3
```python
from test_indexing import test_setitem_dtype_upcast3
```



---
## test_dups_fancy_indexing
```python
from test_indexing import test_dups_fancy_indexing
```



---
## test_dups_fancy_indexing_across_dtypes
```python
from test_indexing import test_dups_fancy_indexing_across_dtypes
```



---
## test_dups_fancy_indexing_not_in_order
```python
from test_indexing import test_dups_fancy_indexing_not_in_order
```



---
## test_dups_fancy_indexing_only_missing_label
```python
from test_indexing import test_dups_fancy_indexing_only_missing_label
```



---
## test_dups_fancy_indexing_missing_label
```python
from test_indexing import test_dups_fancy_indexing_missing_label
```



---
## test_dups_fancy_indexing_non_unique
```python
from test_indexing import test_dups_fancy_indexing_non_unique
```



---
## test_dups_fancy_indexing2
```python
from test_indexing import test_dups_fancy_indexing2
```



---
## test_dups_fancy_indexing3
```python
from test_indexing import test_dups_fancy_indexing3
```



---
## test_duplicate_int_indexing
```python
from test_indexing import test_duplicate_int_indexing
```



---
## test_indexing_mixed_frame_bug
```python
from test_indexing import test_indexing_mixed_frame_bug
```



---
## test_multitype_list_index_access
```python
from test_indexing import test_multitype_list_index_access
```



---
## test_set_index_nan
```python
from test_indexing import test_set_index_nan
```



---
## test_multi_assign
```python
from test_indexing import test_multi_assign
```



---
## test_multi_assign_broadcasting_rhs
```python
from test_indexing import test_multi_assign_broadcasting_rhs
```



---
## test_setitem_list
```python
from test_indexing import test_setitem_list
```



---
## test_string_slice
```python
from test_indexing import test_string_slice
```



---
## test_string_slice_empty
```python
from test_indexing import test_string_slice_empty
```



---
## test_astype_assignment
```python
from test_indexing import test_astype_assignment
```



---
## test_astype_assignment_full_replacements
```python
from test_indexing import test_astype_assignment_full_replacements
```



---
## test_index_type_coercion
```python
from test_indexing import test_index_type_coercion
```



---
## test_float_index_to_mixed
```python
from test_indexing import test_float_index_to_mixed
```



---
## test_float_index_non_scalar_assignment
```python
from test_indexing import test_float_index_non_scalar_assignment
```



---
## test_loc_setitem_fullindex_views
```python
from test_indexing import test_loc_setitem_fullindex_views
```



---
## test_rhs_alignment
```python
from test_indexing import test_rhs_alignment
```



---
## test_str_label_slicing_with_negative_step
```python
from test_indexing import test_str_label_slicing_with_negative_step
```



---
## test_slice_with_zero_step_raises
```python
from test_indexing import test_slice_with_zero_step_raises
```



---
## test_loc_setitem_indexing_assignment_dict_already_exists
```python
from test_indexing import test_loc_setitem_indexing_assignment_dict_already_exists
```



---
## test_iloc_getitem_indexing_dtypes_on_empty
```python
from test_indexing import test_iloc_getitem_indexing_dtypes_on_empty
```



---
## test_loc_range_in_series_indexing
```python
from test_indexing import test_loc_range_in_series_indexing
```



---
## test_partial_boolean_frame_indexing
```python
from test_indexing import test_partial_boolean_frame_indexing
```



---
## test_no_reference_cycle
```python
from test_indexing import test_no_reference_cycle
```



---
## test_label_indexing_on_nan
```python
from test_indexing import test_label_indexing_on_nan
```



---
## test_coercion_with_loc
```python
from test_indexing import test_coercion_with_loc
```



---
## test_coercion_with_setitem_and_dataframe
```python
from test_indexing import test_coercion_with_setitem_and_dataframe
```



---
## test_none_coercion_loc_and_dataframe
```python
from test_indexing import test_none_coercion_loc_and_dataframe
```



---
## test_none_coercion_mixed_dtypes
```python
from test_indexing import test_none_coercion_mixed_dtypes
```



---
## test_setitem_dt64_string_scalar
```python
from test_indexing import test_setitem_dt64_string_scalar
```



---
## test_setitem_dt64_string_values
```python
from test_indexing import test_setitem_dt64_string_values
```



---
## test_setitem_td64_scalar
```python
from test_indexing import test_setitem_td64_scalar
```



---
## test_setitem_td64_string_values
```python
from test_indexing import test_setitem_td64_string_values
```



---
## run_tests
```python
from test_indexing import run_tests
```



---
## __name__
```python
from test_na_indexing import __name__
```



---
## test_series_mask_boolean
```python
from test_na_indexing import test_series_mask_boolean
```



---
## test_na_treated_as_false
```python
from test_na_indexing import test_na_treated_as_false
```



---
## TestDatetimeIndex
```python
from test_datetime import TestDatetimeIndex
```



---
## test_get_loc_naive_dti_aware_str_deprecated
```python
from test_datetime import test_get_loc_naive_dti_aware_str_deprecated
```



---
## test_indexing_with_datetime_tz
```python
from test_datetime import test_indexing_with_datetime_tz
```



---
## test_indexing_fast_xs
```python
from test_datetime import test_indexing_fast_xs
```



---
## test_consistency_with_tz_aware_scalar
```python
from test_datetime import test_consistency_with_tz_aware_scalar
```



---
## test_indexing_with_datetimeindex_tz
```python
from test_datetime import test_indexing_with_datetimeindex_tz
```



---
## test_nanosecond_getitem_setitem_with_tz
```python
from test_datetime import test_nanosecond_getitem_setitem_with_tz
```



---
## test_getitem_str_slice_millisecond_resolution
```python
from test_datetime import test_getitem_str_slice_millisecond_resolution
```



---
## test_getitem_pyarrow_index
```python
from test_datetime import test_getitem_pyarrow_index
```



---
## __name__
```python
from test_floats import __name__
```



---
## gen_obj
```python
from test_floats import gen_obj
```



---
## TestFloatIndexers
```python
from test_floats import TestFloatIndexers
```



---
## check
```python
from test_floats import check
```

comparator for results
we need to take care if we are indexing on a
Series or a frame

---
## test_scalar_non_numeric
```python
from test_floats import test_scalar_non_numeric
```



---
## test_scalar_non_numeric_series_fallback
```python
from test_floats import test_scalar_non_numeric_series_fallback
```



---
## test_scalar_with_mixed
```python
from test_floats import test_scalar_with_mixed
```



---
## test_scalar_integer
```python
from test_floats import test_scalar_integer
```



---
## test_scalar_integer_contains_float
```python
from test_floats import test_scalar_integer_contains_float
```



---
## test_scalar_float
```python
from test_floats import test_scalar_float
```



---
## test_slice_non_numeric
```python
from test_floats import test_slice_non_numeric
```



---
## test_slice_integer
```python
from test_floats import test_slice_integer
```



---
## test_integer_positional_indexing
```python
from test_floats import test_integer_positional_indexing
```

make sure that we are raising on positional indexing
w.r.t. an integer index

---
## test_slice_integer_frame_getitem
```python
from test_floats import test_slice_integer_frame_getitem
```



---
## test_float_slice_getitem_with_integer_index_raises
```python
from test_floats import test_float_slice_getitem_with_integer_index_raises
```



---
## test_slice_float
```python
from test_floats import test_slice_float
```



---
## test_floating_index_doc_example
```python
from test_floats import test_floating_index_doc_example
```



---
## test_floating_misc
```python
from test_floats import test_floating_misc
```



---
## test_floatindex_slicing_bug
```python
from test_floats import test_floatindex_slicing_bug
```



---
## compare
```python
from test_floats import compare
```



---
## _mklbl
```python
from common import _mklbl
```



---
## check_indexing_smoketest_or_raises
```python
from common import check_indexing_smoketest_or_raises
```



---
## __name__
```python
from test_coercion import __name__
```

Tests for values coercion in setitem-like operations on DataFrame.

For the most part, these should be multi-column DataFrames, otherwise
we would share the tests with Series.

---
## check_comprehensiveness
```python
from test_coercion import check_comprehensiveness
```



---
## CoercionBase
```python
from test_coercion import CoercionBase
```



---
## TestSetitemCoercion
```python
from test_coercion import TestSetitemCoercion
```



---
## TestInsertIndexCoercion
```python
from test_coercion import TestInsertIndexCoercion
```



---
## TestWhereCoercion
```python
from test_coercion import TestWhereCoercion
```



---
## TestFillnaSeriesCoercion
```python
from test_coercion import TestFillnaSeriesCoercion
```



---
## TestReplaceSeriesCoercion
```python
from test_coercion import TestReplaceSeriesCoercion
```



---
## has_test
```python
from test_coercion import has_test
```



---
## method
```python
from test_coercion import method
```



---
## test_setitem_series_no_coercion_from_values_list
```python
from test_coercion import test_setitem_series_no_coercion_from_values_list
```



---
## _assert_setitem_index_conversion
```python
from test_coercion import _assert_setitem_index_conversion
```

test index's coercion triggered by assign key

---
## test_setitem_index_object
```python
from test_coercion import test_setitem_index_object
```



---
## test_setitem_index_int64
```python
from test_coercion import test_setitem_index_int64
```



---
## test_setitem_index_float64
```python
from test_coercion import test_setitem_index_float64
```



---
## test_setitem_series_period
```python
from test_coercion import test_setitem_series_period
```



---
## test_setitem_index_complex128
```python
from test_coercion import test_setitem_index_complex128
```



---
## test_setitem_index_bool
```python
from test_coercion import test_setitem_index_bool
```



---
## test_setitem_index_datetime64
```python
from test_coercion import test_setitem_index_datetime64
```



---
## test_setitem_index_datetime64tz
```python
from test_coercion import test_setitem_index_datetime64tz
```



---
## test_setitem_index_timedelta64
```python
from test_coercion import test_setitem_index_timedelta64
```



---
## test_setitem_index_period
```python
from test_coercion import test_setitem_index_period
```



---
## _assert_insert_conversion
```python
from test_coercion import _assert_insert_conversion
```

test coercion triggered by insert

---
## test_insert_index_object
```python
from test_coercion import test_insert_index_object
```



---
## test_insert_int_index
```python
from test_coercion import test_insert_int_index
```



---
## test_insert_float_index
```python
from test_coercion import test_insert_float_index
```



---
## test_insert_index_datetimes
```python
from test_coercion import test_insert_index_datetimes
```



---
## test_insert_index_timedelta64
```python
from test_coercion import test_insert_index_timedelta64
```



---
## test_insert_index_period
```python
from test_coercion import test_insert_index_period
```



---
## test_insert_index_complex128
```python
from test_coercion import test_insert_index_complex128
```



---
## test_insert_index_bool
```python
from test_coercion import test_insert_index_bool
```



---
## _assert_where_conversion
```python
from test_coercion import _assert_where_conversion
```

test coercion triggered by where

---
## _construct_exp
```python
from test_coercion import _construct_exp
```



---
## _run_test
```python
from test_coercion import _run_test
```



---
## test_where_object
```python
from test_coercion import test_where_object
```



---
## test_where_int64
```python
from test_coercion import test_where_int64
```



---
## test_where_float64
```python
from test_coercion import test_where_float64
```



---
## test_where_complex128
```python
from test_coercion import test_where_complex128
```



---
## test_where_series_bool
```python
from test_coercion import test_where_series_bool
```



---
## test_where_datetime64
```python
from test_coercion import test_where_datetime64
```



---
## test_where_index_complex128
```python
from test_coercion import test_where_index_complex128
```



---
## test_where_index_bool
```python
from test_coercion import test_where_index_bool
```



---
## test_where_series_timedelta64
```python
from test_coercion import test_where_series_timedelta64
```



---
## test_where_series_period
```python
from test_coercion import test_where_series_period
```



---
## test_where_index_timedelta64
```python
from test_coercion import test_where_index_timedelta64
```



---
## test_where_index_period
```python
from test_coercion import test_where_index_period
```



---
## test_has_comprehensive_tests
```python
from test_coercion import test_has_comprehensive_tests
```



---
## _assert_fillna_conversion
```python
from test_coercion import _assert_fillna_conversion
```

test coercion triggered by fillna

---
## test_fillna_object
```python
from test_coercion import test_fillna_object
```



---
## test_fillna_float64
```python
from test_coercion import test_fillna_float64
```



---
## test_fillna_complex128
```python
from test_coercion import test_fillna_complex128
```



---
## test_fillna_datetime
```python
from test_coercion import test_fillna_datetime
```



---
## test_fillna_datetime64tz
```python
from test_coercion import test_fillna_datetime64tz
```



---
## test_fillna_interval
```python
from test_coercion import test_fillna_interval
```



---
## test_fillna_series_int64
```python
from test_coercion import test_fillna_series_int64
```



---
## test_fillna_index_int64
```python
from test_coercion import test_fillna_index_int64
```



---
## test_fillna_series_bool
```python
from test_coercion import test_fillna_series_bool
```



---
## test_fillna_index_bool
```python
from test_coercion import test_fillna_index_bool
```



---
## test_fillna_series_timedelta64
```python
from test_coercion import test_fillna_series_timedelta64
```



---
## test_fillna_series_period
```python
from test_coercion import test_fillna_series_period
```



---
## test_fillna_index_timedelta64
```python
from test_coercion import test_fillna_index_timedelta64
```



---
## test_fillna_index_period
```python
from test_coercion import test_fillna_index_period
```



---
## how
```python
from test_coercion import how
```



---
## from_key
```python
from test_coercion import from_key
```



---
## to_key
```python
from test_coercion import to_key
```



---
## replacer
```python
from test_coercion import replacer
```

Object we will pass to `Series.replace`

---
## test_replace_series
```python
from test_coercion import test_replace_series
```



---
## test_replace_series_datetime_tz
```python
from test_coercion import test_replace_series_datetime_tz
```



---
## test_replace_series_datetime_datetime
```python
from test_coercion import test_replace_series_datetime_datetime
```



---
## test_replace_series_period
```python
from test_coercion import test_replace_series_period
```



---
## __name__
```python
from test_indexers import __name__
```



---
## test_length_of_indexer
```python
from test_indexers import test_length_of_indexer
```



---
## test_is_scalar_indexer
```python
from test_indexers import test_is_scalar_indexer
```



---
## TestValidateIndices
```python
from test_indexers import TestValidateIndices
```



---
## test_validate_indices_ok
```python
from test_indexers import test_validate_indices_ok
```



---
## test_validate_indices_low
```python
from test_indexers import test_validate_indices_low
```



---
## test_validate_indices_high
```python
from test_indexers import test_validate_indices_high
```



---
## test_validate_indices_empty
```python
from test_indexers import test_validate_indices_empty
```



---
## __name__
```python
from test_scalar import __name__
```

test scalar indexing, including at and iat 

---
## generate_indices
```python
from test_scalar import generate_indices
```

generate the indices
if values is True , use the axis values
is False, use the range

---
## TestScalar
```python
from test_scalar import TestScalar
```



---
## TestAtAndiAT
```python
from test_scalar import TestAtAndiAT
```



---
## test_iat_dont_wrap_object_datetimelike
```python
from test_scalar import test_iat_dont_wrap_object_datetimelike
```



---
## test_at_with_tuple_index_get
```python
from test_scalar import test_at_with_tuple_index_get
```



---
## test_at_with_tuple_index_set
```python
from test_scalar import test_at_with_tuple_index_set
```



---
## TestMultiIndexScalar
```python
from test_scalar import TestMultiIndexScalar
```



---
## test_iat_set_ints
```python
from test_scalar import test_iat_set_ints
```



---
## test_iat_set_other
```python
from test_scalar import test_iat_set_other
```



---
## test_at_set_ints_other
```python
from test_scalar import test_at_set_ints_other
```



---
## test_float_index_at_iat
```python
from test_scalar import test_float_index_at_iat
```



---
## test_at_iat_coercion
```python
from test_scalar import test_at_iat_coercion
```



---
## test_iloc_iat_coercion_datelike
```python
from test_scalar import test_iloc_iat_coercion_datelike
```



---
## test_imethods_with_dups
```python
from test_scalar import test_imethods_with_dups
```



---
## test_frame_at_with_duplicate_axes
```python
from test_scalar import test_frame_at_with_duplicate_axes
```



---
## test_at_getitem_dt64tz_values
```python
from test_scalar import test_at_getitem_dt64tz_values
```



---
## test_mixed_index_at_iat_loc_iloc_series
```python
from test_scalar import test_mixed_index_at_iat_loc_iloc_series
```



---
## test_mixed_index_at_iat_loc_iloc_dataframe
```python
from test_scalar import test_mixed_index_at_iat_loc_iloc_dataframe
```



---
## test_iat_setter_incompatible_assignment
```python
from test_scalar import test_iat_setter_incompatible_assignment
```



---
## test_multiindex_at_get
```python
from test_scalar import test_multiindex_at_get
```



---
## test_multiindex_at_set
```python
from test_scalar import test_multiindex_at_set
```



---
## test_multiindex_at_get_one_level
```python
from test_scalar import test_multiindex_at_get_one_level
```



---
## __name__
```python
from test_partial import __name__
```



---
## TestEmptyFrameSetitemExpansion
```python
from test_partial import TestEmptyFrameSetitemExpansion
```



---
## TestPartialSetting
```python
from test_partial import TestPartialSetting
```



---
## TestStringSlicing
```python
from test_partial import TestStringSlicing
```



---
## test_empty_frame_setitem_index_name_retained
```python
from test_partial import test_empty_frame_setitem_index_name_retained
```



---
## test_empty_frame_setitem_index_name_inherited
```python
from test_partial import test_empty_frame_setitem_index_name_inherited
```



---
## test_loc_setitem_zerolen_series_columns_align
```python
from test_partial import test_loc_setitem_zerolen_series_columns_align
```



---
## test_loc_setitem_zerolen_list_length_must_match_columns
```python
from test_partial import test_loc_setitem_zerolen_list_length_must_match_columns
```



---
## test_partial_set_empty_frame
```python
from test_partial import test_partial_set_empty_frame
```



---
## test_partial_set_empty_frame2
```python
from test_partial import test_partial_set_empty_frame2
```



---
## test_partial_set_empty_frame3
```python
from test_partial import test_partial_set_empty_frame3
```



---
## test_partial_set_empty_frame4
```python
from test_partial import test_partial_set_empty_frame4
```



---
## test_partial_set_empty_frame5
```python
from test_partial import test_partial_set_empty_frame5
```



---
## test_partial_set_empty_frame_no_index
```python
from test_partial import test_partial_set_empty_frame_no_index
```



---
## test_partial_set_empty_frame_row
```python
from test_partial import test_partial_set_empty_frame_row
```



---
## test_partial_set_empty_frame_set_series
```python
from test_partial import test_partial_set_empty_frame_set_series
```



---
## test_partial_set_empty_frame_empty_copy_assignment
```python
from test_partial import test_partial_set_empty_frame_empty_copy_assignment
```



---
## test_partial_set_empty_frame_empty_consistencies
```python
from test_partial import test_partial_set_empty_frame_empty_consistencies
```



---
## test_partial_setting
```python
from test_partial import test_partial_setting
```



---
## test_partial_setting_frame
```python
from test_partial import test_partial_setting_frame
```



---
## test_partial_setting2
```python
from test_partial import test_partial_setting2
```



---
## test_partial_setting_mixed_dtype
```python
from test_partial import test_partial_setting_mixed_dtype
```



---
## test_series_partial_set
```python
from test_partial import test_series_partial_set
```



---
## test_series_partial_set_with_name
```python
from test_partial import test_series_partial_set_with_name
```



---
## test_setitem_with_expansion_numeric_into_datetimeindex
```python
from test_partial import test_setitem_with_expansion_numeric_into_datetimeindex
```



---
## test_partial_set_invalid
```python
from test_partial import test_partial_set_invalid
```



---
## test_loc_with_list_of_strings_representing_datetimes
```python
from test_partial import test_loc_with_list_of_strings_representing_datetimes
```



---
## test_loc_with_list_of_strings_representing_datetimes_missing_value
```python
from test_partial import test_loc_with_list_of_strings_representing_datetimes_missing_value
```



---
## test_loc_with_list_of_strings_representing_datetimes_not_matched_type
```python
from test_partial import test_loc_with_list_of_strings_representing_datetimes_not_matched_type
```



---
## test_slice_irregular_datetime_index_with_nan
```python
from test_partial import test_slice_irregular_datetime_index_with_nan
```



---
## __name__
```python
from test_stat_reductions import __name__
```

Tests for statistical reductions of 2nd moment or higher: var, skew, kurt, ...

---
## TestDatetimeLikeStatReductions
```python
from test_stat_reductions import TestDatetimeLikeStatReductions
```



---
## TestSeriesStatReductions
```python
from test_stat_reductions import TestSeriesStatReductions
```



---
## test_dt64_mean
```python
from test_stat_reductions import test_dt64_mean
```



---
## test_period_mean
```python
from test_stat_reductions import test_period_mean
```



---
## test_td64_mean
```python
from test_stat_reductions import test_td64_mean
```



---
## _check_stat_op
```python
from test_stat_reductions import _check_stat_op
```



---
## test_sum
```python
from test_stat_reductions import test_sum
```



---
## test_mean
```python
from test_stat_reductions import test_mean
```



---
## test_median
```python
from test_stat_reductions import test_median
```



---
## test_prod
```python
from test_stat_reductions import test_prod
```



---
## test_min
```python
from test_stat_reductions import test_min
```



---
## test_max
```python
from test_stat_reductions import test_max
```



---
## test_var_std
```python
from test_stat_reductions import test_var_std
```



---
## test_sem
```python
from test_stat_reductions import test_sem
```



---
## test_skew
```python
from test_stat_reductions import test_skew
```



---
## test_kurt
```python
from test_stat_reductions import test_kurt
```



---
## test_kurt_corner
```python
from test_stat_reductions import test_kurt_corner
```



---
## get_objs
```python
from test_reductions import get_objs
```



---
## TestReductions
```python
from test_reductions import TestReductions
```



---
## TestIndexReductions
```python
from test_reductions import TestIndexReductions
```



---
## TestSeriesReductions
```python
from test_reductions import TestSeriesReductions
```



---
## TestDatetime64SeriesReductions
```python
from test_reductions import TestDatetime64SeriesReductions
```



---
## TestCategoricalSeriesReductions
```python
from test_reductions import TestCategoricalSeriesReductions
```



---
## TestSeriesMode
```python
from test_reductions import TestSeriesMode
```



---
## test_ops
```python
from test_reductions import test_ops
```



---
## test_nanminmax
```python
from test_reductions import test_nanminmax
```



---
## test_nanargminmax
```python
from test_reductions import test_nanargminmax
```



---
## test_nanops_empty_object
```python
from test_reductions import test_nanops_empty_object
```



---
## test_argminmax
```python
from test_reductions import test_argminmax
```



---
## test_same_tz_min_max_axis_1
```python
from test_reductions import test_same_tz_min_max_axis_1
```



---
## test_numpy_reduction_with_tz_aware_dtype
```python
from test_reductions import test_numpy_reduction_with_tz_aware_dtype
```



---
## test_nan_int_timedelta_sum
```python
from test_reductions import test_nan_int_timedelta_sum
```



---
## test_max_min_range
```python
from test_reductions import test_max_min_range
```



---
## test_minmax_timedelta64
```python
from test_reductions import test_minmax_timedelta64
```



---
## test_minmax_timedelta_empty_or_na
```python
from test_reductions import test_minmax_timedelta_empty_or_na
```



---
## test_numpy_minmax_timedelta64
```python
from test_reductions import test_numpy_minmax_timedelta64
```



---
## test_timedelta_ops
```python
from test_reductions import test_timedelta_ops
```



---
## test_invalid_td64_reductions
```python
from test_reductions import test_invalid_td64_reductions
```



---
## test_minmax_tz
```python
from test_reductions import test_minmax_tz
```



---
## test_minmax_nat_datetime64
```python
from test_reductions import test_minmax_nat_datetime64
```



---
## test_numpy_minmax_integer
```python
from test_reductions import test_numpy_minmax_integer
```



---
## test_numpy_minmax_range
```python
from test_reductions import test_numpy_minmax_range
```



---
## test_numpy_minmax_datetime64
```python
from test_reductions import test_numpy_minmax_datetime64
```



---
## test_minmax_period
```python
from test_reductions import test_minmax_period
```



---
## test_minmax_period_empty_nat
```python
from test_reductions import test_minmax_period_empty_nat
```



---
## test_numpy_minmax_period
```python
from test_reductions import test_numpy_minmax_period
```



---
## test_min_max_categorical
```python
from test_reductions import test_min_max_categorical
```



---
## test_sum_inf
```python
from test_reductions import test_sum_inf
```



---
## test_ops_consistency_on_empty_nullable
```python
from test_reductions import test_ops_consistency_on_empty_nullable
```



---
## test_ops_consistency_on_empty
```python
from test_reductions import test_ops_consistency_on_empty
```



---
## test_nansum_buglet
```python
from test_reductions import test_nansum_buglet
```



---
## test_sum_overflow_int
```python
from test_reductions import test_sum_overflow_int
```



---
## test_sum_overflow_float
```python
from test_reductions import test_sum_overflow_float
```



---
## test_mean_masked_overflow
```python
from test_reductions import test_mean_masked_overflow
```



---
## test_var_masked_array
```python
from test_reductions import test_var_masked_array
```



---
## test_empty_timeseries_reductions_return_nat
```python
from test_reductions import test_empty_timeseries_reductions_return_nat
```



---
## test_numpy_argmin
```python
from test_reductions import test_numpy_argmin
```



---
## test_numpy_argmax
```python
from test_reductions import test_numpy_argmax
```



---
## test_idxmin_dt64index
```python
from test_reductions import test_idxmin_dt64index
```



---
## test_all_any
```python
from test_reductions import test_all_any
```



---
## test_numpy_all_any
```python
from test_reductions import test_numpy_all_any
```



---
## test_all_any_skipna
```python
from test_reductions import test_all_any_skipna
```



---
## test_all_any_bool_only
```python
from test_reductions import test_all_any_bool_only
```



---
## test_any_all_object_dtype_missing
```python
from test_reductions import test_any_all_object_dtype_missing
```



---
## test_any_all_nullable_kleene_logic
```python
from test_reductions import test_any_all_nullable_kleene_logic
```



---
## test_any_axis1_bool_only
```python
from test_reductions import test_any_axis1_bool_only
```



---
## test_any_all_datetimelike
```python
from test_reductions import test_any_all_datetimelike
```



---
## test_any_all_pyarrow_string
```python
from test_reductions import test_any_all_pyarrow_string
```



---
## test_timedelta64_analytics
```python
from test_reductions import test_timedelta64_analytics
```



---
## test_assert_idxminmax_empty_raises
```python
from test_reductions import test_assert_idxminmax_empty_raises
```

Cases where ``Series.argmax`` and related should raise an exception

---
## test_idxminmax_object_dtype
```python
from test_reductions import test_idxminmax_object_dtype
```



---
## test_idxminmax_object_frame
```python
from test_reductions import test_idxminmax_object_frame
```



---
## test_idxminmax_object_tuples
```python
from test_reductions import test_idxminmax_object_tuples
```



---
## test_idxminmax_object_decimals
```python
from test_reductions import test_idxminmax_object_decimals
```



---
## test_argminmax_object_ints
```python
from test_reductions import test_argminmax_object_ints
```



---
## test_idxminmax_with_inf
```python
from test_reductions import test_idxminmax_with_inf
```



---
## test_sum_uint64
```python
from test_reductions import test_sum_uint64
```



---
## test_minmax_nat_series
```python
from test_reductions import test_minmax_nat_series
```



---
## test_minmax_nat_dataframe
```python
from test_reductions import test_minmax_nat_dataframe
```



---
## test_min_max
```python
from test_reductions import test_min_max
```



---
## test_min_max_series
```python
from test_reductions import test_min_max_series
```



---
## test_min_max_unordered_raises
```python
from test_reductions import test_min_max_unordered_raises
```



---
## test_min_max_ordered
```python
from test_reductions import test_min_max_ordered
```



---
## test_min_max_ordered_with_nan_only
```python
from test_reductions import test_min_max_ordered_with_nan_only
```



---
## test_min_max_skipna
```python
from test_reductions import test_min_max_skipna
```



---
## test_mode_empty
```python
from test_reductions import test_mode_empty
```



---
## test_mode_numerical
```python
from test_reductions import test_mode_numerical
```



---
## test_mode_numerical_nan
```python
from test_reductions import test_mode_numerical_nan
```



---
## test_mode_str_obj
```python
from test_reductions import test_mode_str_obj
```



---
## test_mode_mixeddtype
```python
from test_reductions import test_mode_mixeddtype
```



---
## test_mode_datetime
```python
from test_reductions import test_mode_datetime
```



---
## test_mode_timedelta
```python
from test_reductions import test_mode_timedelta
```



---
## test_mode_category
```python
from test_reductions import test_mode_category
```



---
## test_mode_intoverflow
```python
from test_reductions import test_mode_intoverflow
```



---
## test_mode_boolean_with_na
```python
from test_reductions import test_mode_boolean_with_na
```



---
## test_single_mode_value_complex
```python
from test_reductions import test_single_mode_value_complex
```



---
## test_multimode_complex
```python
from test_reductions import test_multimode_complex
```



---
## check_missing
```python
from test_reductions import check_missing
```



---
## __name__
```python
from test_nat import __name__
```



---
## TestNaTFormatting
```python
from test_nat import TestNaTFormatting
```



---
## test_nat_fields
```python
from test_nat import test_nat_fields
```



---
## test_nat_vector_field_access
```python
from test_nat import test_nat_vector_field_access
```



---
## test_identity
```python
from test_nat import test_identity
```



---
## test_round_nat
```python
from test_nat import test_round_nat
```



---
## test_nat_methods_raise
```python
from test_nat import test_nat_methods_raise
```



---
## test_nat_methods_nan
```python
from test_nat import test_nat_methods_nan
```



---
## test_nat_methods_nat
```python
from test_nat import test_nat_methods_nat
```



---
## test_nat_iso_format
```python
from test_nat import test_nat_iso_format
```



---
## test_missing_public_nat_methods
```python
from test_nat import test_missing_public_nat_methods
```



---
## _get_overlap_public_nat_methods
```python
from test_nat import _get_overlap_public_nat_methods
```

Get overlapping public methods between NaT and another class.

Parameters
----------
klass : type
    The class to compare with NaT
as_tuple : bool, default False
    Whether to return a list of tuples of the form (klass, method).

Returns
-------
overlap : list

---
## test_overlap_public_nat_methods
```python
from test_nat import test_overlap_public_nat_methods
```



---
## test_nat_doc_strings
```python
from test_nat import test_nat_doc_strings
```



---
## test_nat_arithmetic_scalar
```python
from test_nat import test_nat_arithmetic_scalar
```



---
## test_nat_rfloordiv_timedelta
```python
from test_nat import test_nat_rfloordiv_timedelta
```



---
## test_nat_arithmetic_index
```python
from test_nat import test_nat_arithmetic_index
```



---
## test_nat_arithmetic_td64_vector
```python
from test_nat import test_nat_arithmetic_td64_vector
```



---
## test_nat_arithmetic_ndarray
```python
from test_nat import test_nat_arithmetic_ndarray
```



---
## test_nat_pinned_docstrings
```python
from test_nat import test_nat_pinned_docstrings
```



---
## test_to_numpy_alias
```python
from test_nat import test_to_numpy_alias
```



---
## test_nat_comparisons
```python
from test_nat import test_nat_comparisons
```



---
## test_nat_comparisons_numpy
```python
from test_nat import test_nat_comparisons_numpy
```



---
## test_nat_comparisons_invalid
```python
from test_nat import test_nat_comparisons_invalid
```



---
## test_nat_comparisons_invalid_ndarray
```python
from test_nat import test_nat_comparisons_invalid_ndarray
```



---
## test_compare_date
```python
from test_nat import test_compare_date
```



---
## test_nat_addsub_tdlike_scalar
```python
from test_nat import test_nat_addsub_tdlike_scalar
```



---
## test_pickle
```python
from test_nat import test_pickle
```



---
## test_repr
```python
from test_nat import test_repr
```



---
## test_str
```python
from test_nat import test_str
```



---
## test_isoformat
```python
from test_nat import test_isoformat
```



---
## __name__
```python
from test_na_scalar import __name__
```



---
## test_singleton
```python
from test_na_scalar import test_singleton
```



---
## test_repr
```python
from test_na_scalar import test_repr
```



---
## test_format
```python
from test_na_scalar import test_format
```



---
## test_truthiness
```python
from test_na_scalar import test_truthiness
```



---
## test_hashable
```python
from test_na_scalar import test_hashable
```



---
## test_arithmetic_ops
```python
from test_na_scalar import test_arithmetic_ops
```



---
## test_comparison_ops
```python
from test_na_scalar import test_comparison_ops
```



---
## test_pow_special
```python
from test_na_scalar import test_pow_special
```



---
## test_rpow_special
```python
from test_na_scalar import test_rpow_special
```



---
## test_rpow_minus_one
```python
from test_na_scalar import test_rpow_minus_one
```



---
## test_unary_ops
```python
from test_na_scalar import test_unary_ops
```



---
## test_logical_and
```python
from test_na_scalar import test_logical_and
```



---
## test_logical_or
```python
from test_na_scalar import test_logical_or
```



---
## test_logical_xor
```python
from test_na_scalar import test_logical_xor
```



---
## test_logical_not
```python
from test_na_scalar import test_logical_not
```



---
## test_arithmetic_ndarray
```python
from test_na_scalar import test_arithmetic_ndarray
```



---
## test_is_scalar
```python
from test_na_scalar import test_is_scalar
```



---
## test_isna
```python
from test_na_scalar import test_isna
```



---
## test_series_isna
```python
from test_na_scalar import test_series_isna
```



---
## test_ufunc
```python
from test_na_scalar import test_ufunc
```



---
## test_ufunc_raises
```python
from test_na_scalar import test_ufunc_raises
```



---
## test_binary_input_not_dunder
```python
from test_na_scalar import test_binary_input_not_dunder
```



---
## test_divmod_ufunc
```python
from test_na_scalar import test_divmod_ufunc
```



---
## test_integer_hash_collision_dict
```python
from test_na_scalar import test_integer_hash_collision_dict
```



---
## test_integer_hash_collision_set
```python
from test_na_scalar import test_integer_hash_collision_set
```



---
## test_pickle_roundtrip
```python
from test_na_scalar import test_pickle_roundtrip
```



---
## test_pickle_roundtrip_pandas
```python
from test_na_scalar import test_pickle_roundtrip_pandas
```



---
## test_pickle_roundtrip_containers
```python
from test_na_scalar import test_pickle_roundtrip_containers
```



---
## __name__
```python
from test_value_counts import __name__
```



---
## test_value_counts
```python
from test_value_counts import test_value_counts
```



---
## test_value_counts_null
```python
from test_value_counts import test_value_counts_null
```



---
## test_value_counts_inferred
```python
from test_value_counts import test_value_counts_inferred
```



---
## test_value_counts_bins
```python
from test_value_counts import test_value_counts_bins
```



---
## test_value_counts_datetime64
```python
from test_value_counts import test_value_counts_datetime64
```



---
## test_value_counts_timedelta64
```python
from test_value_counts import test_value_counts_timedelta64
```



---
## test_value_counts_with_nan
```python
from test_value_counts import test_value_counts_with_nan
```



---
## test_value_counts_object_inference_deprecated
```python
from test_value_counts import test_value_counts_object_inference_deprecated
```



---
## test_isnull_notnull_docstrings
```python
from test_misc import test_isnull_notnull_docstrings
```



---
## test_binary_ops_docstring
```python
from test_misc import test_binary_ops_docstring
```



---
## test_ndarray_compat_properties
```python
from test_misc import test_ndarray_compat_properties
```



---
## test_memory_usage
```python
from test_misc import test_memory_usage
```



---
## test_memory_usage_components_series
```python
from test_misc import test_memory_usage_components_series
```



---
## test_memory_usage_components_narrow_series
```python
from test_misc import test_memory_usage_components_narrow_series
```



---
## test_searchsorted
```python
from test_misc import test_searchsorted
```



---
## test_access_by_position
```python
from test_misc import test_access_by_position
```



---
## __name__
```python
from test_transpose import __name__
```



---
## test_transpose
```python
from test_transpose import test_transpose
```



---
## test_transpose_non_default_axes
```python
from test_transpose import test_transpose_non_default_axes
```



---
## test_numpy_transpose
```python
from test_transpose import test_numpy_transpose
```



---
## test_duplicate_labels
```python
from test_transpose import test_duplicate_labels
```



---
## series_via_frame_from_dict
```python
from test_constructors import series_via_frame_from_dict
```



---
## series_via_frame_from_scalar
```python
from test_constructors import series_via_frame_from_scalar
```



---
## TestPandasDelegate
```python
from test_constructors import TestPandasDelegate
```



---
## TestNoNewAttributesMixin
```python
from test_constructors import TestNoNewAttributesMixin
```



---
## TestConstruction
```python
from test_constructors import TestConstruction
```



---
## Delegator
```python
from test_constructors import Delegator
```



---
## Delegate
```python
from test_constructors import Delegate
```



---
## test_invalid_delegation
```python
from test_constructors import test_invalid_delegation
```



---
## test_memory_usage
```python
from test_constructors import test_memory_usage
```



---
## test_mixin
```python
from test_constructors import test_mixin
```



---
## test_constructor_datetime_outofbound
```python
from test_constructors import test_constructor_datetime_outofbound
```



---
## test_constructor_datetime_nonns
```python
from test_constructors import test_constructor_datetime_nonns
```



---
## _set_prop
```python
from test_constructors import _set_prop
```



---
## _get_prop
```python
from test_constructors import _get_prop
```



---
## test_method
```python
from test_constructors import test_method
```

a test method

---
## T
```python
from test_constructors import T
```



---
## TestToIterable
```python
from test_conversion import TestToIterable
```



---
## test_values_consistent
```python
from test_conversion import test_values_consistent
```



---
## test_numpy_array
```python
from test_conversion import test_numpy_array
```



---
## test_numpy_array_all_dtypes
```python
from test_conversion import test_numpy_array_all_dtypes
```



---
## test_array
```python
from test_conversion import test_array
```



---
## test_array_multiindex_raises
```python
from test_conversion import test_array_multiindex_raises
```



---
## test_to_numpy
```python
from test_conversion import test_to_numpy
```



---
## test_to_numpy_copy
```python
from test_conversion import test_to_numpy_copy
```



---
## test_to_numpy_dtype
```python
from test_conversion import test_to_numpy_dtype
```



---
## test_to_numpy_na_value_numpy_dtype
```python
from test_conversion import test_to_numpy_na_value_numpy_dtype
```



---
## test_to_numpy_multiindex_series_na_value
```python
from test_conversion import test_to_numpy_multiindex_series_na_value
```



---
## test_to_numpy_kwargs_raises
```python
from test_conversion import test_to_numpy_kwargs_raises
```



---
## test_to_numpy_dataframe_na_value
```python
from test_conversion import test_to_numpy_dataframe_na_value
```



---
## test_to_numpy_dataframe_single_block
```python
from test_conversion import test_to_numpy_dataframe_single_block
```



---
## test_to_numpy_dataframe_single_block_no_mutate
```python
from test_conversion import test_to_numpy_dataframe_single_block_no_mutate
```



---
## TestAsArray
```python
from test_conversion import TestAsArray
```



---
## test_iterable
```python
from test_conversion import test_iterable
```



---
## test_iterable_object_and_category
```python
from test_conversion import test_iterable_object_and_category
```



---
## test_iterable_items
```python
from test_conversion import test_iterable_items
```



---
## test_iterable_map
```python
from test_conversion import test_iterable_map
```



---
## test_categorial_datetimelike
```python
from test_conversion import test_categorial_datetimelike
```



---
## test_iter_box_dt64
```python
from test_conversion import test_iter_box_dt64
```



---
## test_iter_box_dt64tz
```python
from test_conversion import test_iter_box_dt64tz
```



---
## test_iter_box_timedelta64
```python
from test_conversion import test_iter_box_timedelta64
```



---
## test_iter_box_period
```python
from test_conversion import test_iter_box_period
```



---
## test_asarray_object_dt64
```python
from test_conversion import test_asarray_object_dt64
```



---
## test_asarray_tz_naive
```python
from test_conversion import test_asarray_tz_naive
```



---
## test_asarray_tz_aware
```python
from test_conversion import test_asarray_tz_aware
```



---
## allow_na_ops
```python
from common import allow_na_ops
```

Whether to skip test cases including NaN

---
## __name__
```python
from test_fillna import __name__
```



---
## test_fillna
```python
from test_fillna import test_fillna
```



---
## test_fillna_null
```python
from test_fillna import test_fillna_null
```



---
## __name__
```python
from test_unique import __name__
```



---
## test_unique
```python
from test_unique import test_unique
```



---
## test_unique_null
```python
from test_unique import test_unique_null
```



---
## test_nunique
```python
from test_unique import test_nunique
```



---
## test_nunique_null
```python
from test_unique import test_nunique_null
```



---
## test_unique_bad_unicode
```python
from test_unique import test_unique_bad_unicode
```



---
## test_nunique_dropna
```python
from test_unique import test_nunique_dropna
```



---
## __name__
```python
from test_frozen import __name__
```



---
## lst
```python
from test_frozen import lst
```



---
## container
```python
from test_frozen import container
```



---
## unicode_container
```python
from test_frozen import unicode_container
```



---
## TestFrozenList
```python
from test_frozen import TestFrozenList
```



---
## check_mutable_error
```python
from test_frozen import check_mutable_error
```



---
## test_no_mutable_funcs
```python
from test_frozen import test_no_mutable_funcs
```



---
## test_slicing_maintains_type
```python
from test_frozen import test_slicing_maintains_type
```



---
## check_result
```python
from test_frozen import check_result
```



---
## test_string_methods_dont_fail
```python
from test_frozen import test_string_methods_dont_fail
```



---
## test_tricky_container
```python
from test_frozen import test_tricky_container
```



---
## test_add
```python
from test_frozen import test_add
```



---
## test_iadd
```python
from test_frozen import test_iadd
```



---
## test_union
```python
from test_frozen import test_union
```



---
## test_difference
```python
from test_frozen import test_difference
```



---
## test_difference_dupe
```python
from test_frozen import test_difference_dupe
```



---
## test_tricky_container_to_bytes_raises
```python
from test_frozen import test_tricky_container_to_bytes_raises
```



---
## setitem
```python
from test_frozen import setitem
```



---
## setslice
```python
from test_frozen import setslice
```



---
## delitem
```python
from test_frozen import delitem
```



---
## delslice
```python
from test_frozen import delslice
```



---
## freq_sample
```python
from conftest import freq_sample
```

Valid values for 'freq' parameter used to create date_range and
timedelta_range..

---
## listlike_box
```python
from conftest import listlike_box
```

Types that may be passed as the indexer to searchsorted.

---
## test_sort_values_invalid_na_position
```python
from test_common import test_sort_values_invalid_na_position
```



---
## test_sort_values_with_missing
```python
from test_common import test_sort_values_with_missing
```



---
## test_ndarray_compat_properties
```python
from test_common import test_ndarray_compat_properties
```



---
## test_compare_read_only_array
```python
from test_common import test_compare_read_only_array
```



---
## test_to_frame
```python
from test_common import test_to_frame
```



---
## test_droplevel
```python
from test_common import test_droplevel
```



---
## test_constructor_non_hashable_name
```python
from test_common import test_constructor_non_hashable_name
```



---
## test_constructor_unwraps_index
```python
from test_common import test_constructor_unwraps_index
```



---
## test_to_flat_index
```python
from test_common import test_to_flat_index
```



---
## test_set_name_methods
```python
from test_common import test_set_name_methods
```



---
## test_set_names_single_label_no_level
```python
from test_common import test_set_names_single_label_no_level
```



---
## test_copy_and_deepcopy
```python
from test_common import test_copy_and_deepcopy
```



---
## test_copy_name
```python
from test_common import test_copy_name
```



---
## test_copy_name2
```python
from test_common import test_copy_name2
```



---
## test_unique_level
```python
from test_common import test_unique_level
```



---
## test_unique
```python
from test_common import test_unique
```



---
## test_searchsorted_monotonic
```python
from test_common import test_searchsorted_monotonic
```



---
## test_drop_duplicates
```python
from test_common import test_drop_duplicates
```



---
## test_drop_duplicates_no_duplicates
```python
from test_common import test_drop_duplicates_no_duplicates
```



---
## test_drop_duplicates_inplace
```python
from test_common import test_drop_duplicates_inplace
```



---
## test_has_duplicates
```python
from test_common import test_has_duplicates
```



---
## test_astype_preserves_name
```python
from test_common import test_astype_preserves_name
```



---
## test_hasnans_isnans
```python
from test_common import test_hasnans_isnans
```



---
## __name__
```python
from test_any_index import __name__
```

Tests that can be parametrized over _any_ Index object.

---
## test_boolean_context_compat
```python
from test_any_index import test_boolean_context_compat
```



---
## test_sort
```python
from test_any_index import test_sort
```



---
## test_hash_error
```python
from test_any_index import test_hash_error
```



---
## test_mutability
```python
from test_any_index import test_mutability
```



---
## test_map_identity_mapping
```python
from test_any_index import test_map_identity_mapping
```



---
## test_wrong_number_names
```python
from test_any_index import test_wrong_number_names
```



---
## test_view_preserves_name
```python
from test_any_index import test_view_preserves_name
```



---
## test_ravel
```python
from test_any_index import test_ravel
```



---
## TestConversion
```python
from test_any_index import TestConversion
```



---
## TestRoundTrips
```python
from test_any_index import TestRoundTrips
```



---
## TestIndexing
```python
from test_any_index import TestIndexing
```



---
## TestRendering
```python
from test_any_index import TestRendering
```



---
## TestReductions
```python
from test_any_index import TestReductions
```



---
## test_to_series
```python
from test_any_index import test_to_series
```



---
## test_to_series_with_arguments
```python
from test_any_index import test_to_series_with_arguments
```



---
## test_tolist_matches_list
```python
from test_any_index import test_tolist_matches_list
```



---
## test_pickle_roundtrip
```python
from test_any_index import test_pickle_roundtrip
```



---
## test_pickle_preserves_name
```python
from test_any_index import test_pickle_preserves_name
```



---
## test_get_loc_listlike_raises_invalid_index_error
```python
from test_any_index import test_get_loc_listlike_raises_invalid_index_error
```



---
## test_getitem_ellipsis
```python
from test_any_index import test_getitem_ellipsis
```



---
## test_slice_keeps_name
```python
from test_any_index import test_slice_keeps_name
```



---
## test_getitem_error
```python
from test_any_index import test_getitem_error
```



---
## test_str
```python
from test_any_index import test_str
```



---
## test_argmax_axis_invalid
```python
from test_any_index import test_argmax_axis_invalid
```



---
## __name__
```python
from test_engines import __name__
```



---
## numeric_indexing_engine_type_and_dtype
```python
from test_engines import numeric_indexing_engine_type_and_dtype
```



---
## TestDatetimeEngine
```python
from test_engines import TestDatetimeEngine
```



---
## TestTimedeltaEngine
```python
from test_engines import TestTimedeltaEngine
```



---
## TestNumericEngine
```python
from test_engines import TestNumericEngine
```



---
## TestObjectEngine
```python
from test_engines import TestObjectEngine
```



---
## test_not_contains_requires_timestamp
```python
from test_engines import test_not_contains_requires_timestamp
```



---
## test_not_contains_requires_timedelta
```python
from test_engines import test_not_contains_requires_timedelta
```



---
## test_is_monotonic
```python
from test_engines import test_is_monotonic
```



---
## test_is_unique
```python
from test_engines import test_is_unique
```



---
## test_get_loc
```python
from test_engines import test_get_loc
```



---
## TestDatetimeLike
```python
from test_datetimelike import TestDatetimeLike
```



---
## simple_index
```python
from test_datetimelike import simple_index
```



---
## test_isin
```python
from test_datetimelike import test_isin
```



---
## test_argsort_matches_array
```python
from test_datetimelike import test_argsort_matches_array
```



---
## test_can_hold_identifiers
```python
from test_datetimelike import test_can_hold_identifiers
```



---
## test_shift_identity
```python
from test_datetimelike import test_shift_identity
```



---
## test_shift_empty
```python
from test_datetimelike import test_shift_empty
```



---
## test_str
```python
from test_datetimelike import test_str
```



---
## test_view
```python
from test_datetimelike import test_view
```



---
## test_map_callable
```python
from test_datetimelike import test_map_callable
```



---
## test_map_dictlike
```python
from test_datetimelike import test_map_dictlike
```



---
## test_getitem_preserves_freq
```python
from test_datetimelike import test_getitem_preserves_freq
```



---
## test_where_cast_str
```python
from test_datetimelike import test_where_cast_str
```



---
## test_diff
```python
from test_datetimelike import test_diff
```



---
## CustomIndex
```python
from test_subclass import CustomIndex
```



---
## test_insert_fallback_to_base_index
```python
from test_subclass import test_insert_fallback_to_base_index
```



---
## __new__
```python
from test_subclass import __new__
```



---
## TestTake
```python
from test_indexing import TestTake
```



---
## TestContains
```python
from test_indexing import TestContains
```



---
## TestGetLoc
```python
from test_indexing import TestGetLoc
```



---
## TestGetIndexer
```python
from test_indexing import TestGetIndexer
```



---
## TestConvertSliceIndexer
```python
from test_indexing import TestConvertSliceIndexer
```



---
## TestPutmask
```python
from test_indexing import TestPutmask
```



---
## test_getitem_deprecated_float
```python
from test_indexing import test_getitem_deprecated_float
```



---
## test_get_indexer_non_unique_multiple_nans
```python
from test_indexing import test_get_indexer_non_unique_multiple_nans
```



---
## test_get_indexer_non_unique_nans_in_object_dtype_target
```python
from test_indexing import test_get_indexer_non_unique_nans_in_object_dtype_target
```



---
## test_take_invalid_kwargs
```python
from test_indexing import test_take_invalid_kwargs
```



---
## test_take
```python
from test_indexing import test_take
```



---
## test_take_indexer_type
```python
from test_indexing import test_take_indexer_type
```



---
## test_take_minus1_without_fill
```python
from test_indexing import test_take_minus1_without_fill
```



---
## test_index_contains
```python
from test_indexing import test_index_contains
```



---
## test_index_not_contains
```python
from test_indexing import test_index_not_contains
```



---
## test_mixed_index_contains
```python
from test_indexing import test_mixed_index_contains
```



---
## test_mixed_index_not_contains
```python
from test_indexing import test_mixed_index_not_contains
```



---
## test_contains_with_float_index
```python
from test_indexing import test_contains_with_float_index
```



---
## test_contains_requires_hashable_raises
```python
from test_indexing import test_contains_requires_hashable_raises
```



---
## test_get_loc_non_hashable
```python
from test_indexing import test_get_loc_non_hashable
```



---
## test_get_loc_non_scalar_hashable
```python
from test_indexing import test_get_loc_non_scalar_hashable
```



---
## test_get_loc_generator
```python
from test_indexing import test_get_loc_generator
```



---
## test_get_loc_masked_duplicated_na
```python
from test_indexing import test_get_loc_masked_duplicated_na
```



---
## test_get_indexer_base
```python
from test_indexing import test_get_indexer_base
```



---
## test_get_indexer_consistency
```python
from test_indexing import test_get_indexer_consistency
```



---
## test_get_indexer_masked_duplicated_na
```python
from test_indexing import test_get_indexer_masked_duplicated_na
```



---
## test_convert_almost_null_slice
```python
from test_indexing import test_convert_almost_null_slice
```



---
## test_putmask_with_wrong_mask
```python
from test_indexing import test_putmask_with_wrong_mask
```



---
## E
```python
from test_indexing import E
```



---
## __name__
```python
from test_old_base import __name__
```



---
## TestBase
```python
from test_old_base import TestBase
```



---
## TestNumericBase
```python
from test_old_base import TestNumericBase
```



---
## simple_index
```python
from test_old_base import simple_index
```



---
## test_pickle_compat_construction
```python
from test_old_base import test_pickle_compat_construction
```



---
## test_shift
```python
from test_old_base import test_shift
```



---
## test_constructor_name_unhashable
```python
from test_old_base import test_constructor_name_unhashable
```



---
## test_create_index_existing_name
```python
from test_old_base import test_create_index_existing_name
```



---
## test_numeric_compat
```python
from test_old_base import test_numeric_compat
```



---
## test_logical_compat
```python
from test_old_base import test_logical_compat
```



---
## test_repr_roundtrip
```python
from test_old_base import test_repr_roundtrip
```



---
## test_repr_max_seq_item_setting
```python
from test_old_base import test_repr_max_seq_item_setting
```



---
## test_ensure_copied_data
```python
from test_old_base import test_ensure_copied_data
```



---
## test_memory_usage
```python
from test_old_base import test_memory_usage
```



---
## test_argsort
```python
from test_old_base import test_argsort
```



---
## test_numpy_argsort
```python
from test_old_base import test_numpy_argsort
```



---
## test_repeat
```python
from test_old_base import test_repeat
```



---
## test_numpy_repeat
```python
from test_old_base import test_numpy_repeat
```



---
## test_where
```python
from test_old_base import test_where
```



---
## test_insert_base
```python
from test_old_base import test_insert_base
```



---
## test_insert_out_of_bounds
```python
from test_old_base import test_insert_out_of_bounds
```



---
## test_delete_base
```python
from test_old_base import test_delete_base
```



---
## test_equals
```python
from test_old_base import test_equals
```



---
## test_equals_op
```python
from test_old_base import test_equals_op
```



---
## test_format
```python
from test_old_base import test_format
```



---
## test_format_empty
```python
from test_old_base import test_format_empty
```



---
## test_fillna
```python
from test_old_base import test_fillna
```



---
## test_nulls
```python
from test_old_base import test_nulls
```



---
## test_empty
```python
from test_old_base import test_empty
```



---
## test_join_self_unique
```python
from test_old_base import test_join_self_unique
```



---
## test_map
```python
from test_old_base import test_map
```



---
## test_map_dictlike
```python
from test_old_base import test_map_dictlike
```



---
## test_map_str
```python
from test_old_base import test_map_str
```



---
## test_astype_category
```python
from test_old_base import test_astype_category
```



---
## test_is_unique
```python
from test_old_base import test_is_unique
```



---
## test_engine_reference_cycle
```python
from test_old_base import test_engine_reference_cycle
```



---
## test_getitem_2d_deprecated
```python
from test_old_base import test_getitem_2d_deprecated
```



---
## test_copy_shares_cache
```python
from test_old_base import test_copy_shares_cache
```



---
## test_shallow_copy_shares_cache
```python
from test_old_base import test_shallow_copy_shares_cache
```



---
## test_index_groupby
```python
from test_old_base import test_index_groupby
```



---
## test_append_preserves_dtype
```python
from test_old_base import test_append_preserves_dtype
```



---
## test_inv
```python
from test_old_base import test_inv
```



---
## test_is_boolean_is_deprecated
```python
from test_old_base import test_is_boolean_is_deprecated
```



---
## test_is_floating_is_deprecated
```python
from test_old_base import test_is_floating_is_deprecated
```



---
## test_is_integer_is_deprecated
```python
from test_old_base import test_is_integer_is_deprecated
```



---
## test_holds_integer_deprecated
```python
from test_old_base import test_holds_integer_deprecated
```



---
## test_is_numeric_is_deprecated
```python
from test_old_base import test_is_numeric_is_deprecated
```



---
## test_is_categorical_is_deprecated
```python
from test_old_base import test_is_categorical_is_deprecated
```



---
## test_is_interval_is_deprecated
```python
from test_old_base import test_is_interval_is_deprecated
```



---
## test_is_object_is_deprecated
```python
from test_old_base import test_is_object_is_deprecated
```



---
## test_constructor_unwraps_index
```python
from test_old_base import test_constructor_unwraps_index
```



---
## test_can_hold_identifiers
```python
from test_old_base import test_can_hold_identifiers
```



---
## test_view
```python
from test_old_base import test_view
```



---
## test_insert_non_na
```python
from test_old_base import test_insert_non_na
```



---
## test_insert_na
```python
from test_old_base import test_insert_na
```



---
## test_arithmetic_explicit_conversions
```python
from test_old_base import test_arithmetic_explicit_conversions
```



---
## test_astype_to_complex
```python
from test_old_base import test_astype_to_complex
```



---
## test_cast_string
```python
from test_old_base import test_cast_string
```



---
## __name__
```python
from test_setops import __name__
```



---
## equal_contents
```python
from test_setops import equal_contents
```

Checks if the set of unique elements of arr1 and arr2 are equivalent.

---
## any_dtype_for_small_pos_integer_indexes
```python
from test_setops import any_dtype_for_small_pos_integer_indexes
```

Dtypes that can be given to an Index with small positive integers.

This means that for any dtype `x` in the params list, `Index([1, 2, 3], dtype=x)` is
valid and gives the correct Index (sub-)class.

---
## test_union_same_types
```python
from test_setops import test_union_same_types
```



---
## test_union_different_types
```python
from test_setops import test_union_different_types
```



---
## test_compatible_inconsistent_pairs
```python
from test_setops import test_compatible_inconsistent_pairs
```



---
## test_union_dtypes
```python
from test_setops import test_union_dtypes
```



---
## test_intersection_duplicates
```python
from test_setops import test_intersection_duplicates
```



---
## TestSetOps
```python
from test_setops import TestSetOps
```



---
## test_setop_with_categorical
```python
from test_setops import test_setop_with_categorical
```



---
## test_intersection_duplicates_all_indexes
```python
from test_setops import test_intersection_duplicates_all_indexes
```



---
## test_union_duplicate_index_subsets_of_each_other
```python
from test_setops import test_union_duplicate_index_subsets_of_each_other
```



---
## test_union_with_duplicate_index_and_non_monotonic
```python
from test_setops import test_union_with_duplicate_index_and_non_monotonic
```



---
## test_union_duplicate_index_different_dtypes
```python
from test_setops import test_union_duplicate_index_different_dtypes
```



---
## test_union_same_value_duplicated_in_both
```python
from test_setops import test_union_same_value_duplicated_in_both
```



---
## test_union_nan_in_both
```python
from test_setops import test_union_nan_in_both
```



---
## test_union_rangeindex_sort_true
```python
from test_setops import test_union_rangeindex_sort_true
```



---
## test_union_with_duplicate_index_not_subset_and_non_monotonic
```python
from test_setops import test_union_with_duplicate_index_not_subset_and_non_monotonic
```



---
## test_union_int_categorical_with_nan
```python
from test_setops import test_union_int_categorical_with_nan
```



---
## TestSetOpsUnsorted
```python
from test_setops import TestSetOpsUnsorted
```



---
## test_set_ops_error_cases
```python
from test_setops import test_set_ops_error_cases
```



---
## test_intersection_base
```python
from test_setops import test_intersection_base
```



---
## test_union_base
```python
from test_setops import test_union_base
```



---
## test_difference_base
```python
from test_setops import test_difference_base
```



---
## test_symmetric_difference
```python
from test_setops import test_symmetric_difference
```



---
## test_corner_union
```python
from test_setops import test_corner_union
```



---
## test_union_unequal
```python
from test_setops import test_union_unequal
```



---
## test_corner_intersect
```python
from test_setops import test_corner_intersect
```



---
## test_intersect_unequal
```python
from test_setops import test_intersect_unequal
```



---
## test_intersection_name_retention_with_nameless
```python
from test_setops import test_intersection_name_retention_with_nameless
```



---
## test_difference_preserves_type_empty
```python
from test_setops import test_difference_preserves_type_empty
```



---
## test_difference_name_retention_equals
```python
from test_setops import test_difference_name_retention_equals
```



---
## test_intersection_difference_match_empty
```python
from test_setops import test_intersection_difference_match_empty
```



---
## test_intersect_str_dates
```python
from test_setops import test_intersect_str_dates
```



---
## test_intersection
```python
from test_setops import test_intersection
```



---
## test_intersection_name_preservation
```python
from test_setops import test_intersection_name_preservation
```



---
## test_intersection_name_preservation2
```python
from test_setops import test_intersection_name_preservation2
```



---
## test_chained_union
```python
from test_setops import test_chained_union
```



---
## test_union
```python
from test_setops import test_union
```



---
## test_union_from_iterables
```python
from test_setops import test_union_from_iterables
```



---
## test_union_identity
```python
from test_setops import test_union_identity
```



---
## test_difference_name_preservation
```python
from test_setops import test_difference_name_preservation
```



---
## test_difference_empty_arg
```python
from test_setops import test_difference_empty_arg
```



---
## test_difference_should_not_compare
```python
from test_setops import test_difference_should_not_compare
```



---
## test_difference_identity
```python
from test_setops import test_difference_identity
```



---
## test_difference_sort
```python
from test_setops import test_difference_sort
```



---
## test_difference_incomparable
```python
from test_setops import test_difference_incomparable
```



---
## test_difference_incomparable_true
```python
from test_setops import test_difference_incomparable_true
```



---
## test_symmetric_difference_mi
```python
from test_setops import test_symmetric_difference_mi
```



---
## test_symmetric_difference_missing
```python
from test_setops import test_symmetric_difference_missing
```



---
## test_symmetric_difference_non_index
```python
from test_setops import test_symmetric_difference_non_index
```



---
## test_union_ea_dtypes
```python
from test_setops import test_union_ea_dtypes
```



---
## test_union_string_array
```python
from test_setops import test_union_string_array
```



---
## __name__
```python
from test_index_new import __name__
```

Tests for the Index constructor conducting inference.

---
## TestIndexConstructorInference
```python
from test_index_new import TestIndexConstructorInference
```



---
## TestDtypeEnforced
```python
from test_index_new import TestDtypeEnforced
```



---
## TestIndexConstructorUnwrapping
```python
from test_index_new import TestIndexConstructorUnwrapping
```



---
## TestIndexConstructionErrors
```python
from test_index_new import TestIndexConstructionErrors
```



---
## test_object_all_bools
```python
from test_index_new import test_object_all_bools
```



---
## test_object_all_complex
```python
from test_index_new import test_object_all_complex
```



---
## test_infer_nat
```python
from test_index_new import test_infer_nat
```



---
## test_construction_list_tuples_nan
```python
from test_index_new import test_construction_list_tuples_nan
```



---
## test_constructor_int_dtype_float
```python
from test_index_new import test_constructor_int_dtype_float
```



---
## test_constructor_dtypes_to_object
```python
from test_index_new import test_constructor_dtypes_to_object
```



---
## test_constructor_categorical_to_object
```python
from test_index_new import test_constructor_categorical_to_object
```



---
## test_constructor_infer_periodindex
```python
from test_index_new import test_constructor_infer_periodindex
```



---
## test_from_list_of_periods
```python
from test_index_new import test_from_list_of_periods
```



---
## test_constructor_infer_nat_dt_like
```python
from test_index_new import test_constructor_infer_nat_dt_like
```



---
## test_constructor_mixed_nat_objs_infers_object
```python
from test_index_new import test_constructor_mixed_nat_objs_infers_object
```



---
## test_constructor_datetime_and_datetime64
```python
from test_index_new import test_constructor_datetime_and_datetime64
```



---
## test_constructor_datetimes_mixed_tzs
```python
from test_index_new import test_constructor_datetimes_mixed_tzs
```



---
## test_constructor_object_dtype_with_ea_data
```python
from test_index_new import test_constructor_object_dtype_with_ea_data
```



---
## test_constructor_range_values_mismatched_dtype
```python
from test_index_new import test_constructor_range_values_mismatched_dtype
```



---
## test_constructor_categorical_values_mismatched_non_ea_dtype
```python
from test_index_new import test_constructor_categorical_values_mismatched_non_ea_dtype
```



---
## test_constructor_categorical_values_mismatched_dtype
```python
from test_index_new import test_constructor_categorical_values_mismatched_dtype
```



---
## test_constructor_ea_values_mismatched_categorical_dtype
```python
from test_index_new import test_constructor_ea_values_mismatched_categorical_dtype
```



---
## test_constructor_period_values_mismatched_dtype
```python
from test_index_new import test_constructor_period_values_mismatched_dtype
```



---
## test_constructor_timedelta64_values_mismatched_dtype
```python
from test_index_new import test_constructor_timedelta64_values_mismatched_dtype
```



---
## test_constructor_interval_values_mismatched_dtype
```python
from test_index_new import test_constructor_interval_values_mismatched_dtype
```



---
## test_constructor_datetime64_values_mismatched_period_dtype
```python
from test_index_new import test_constructor_datetime64_values_mismatched_period_dtype
```



---
## test_constructor_int_dtype_nan_raises
```python
from test_index_new import test_constructor_int_dtype_nan_raises
```



---
## test_constructor_dtypes_to_int
```python
from test_index_new import test_constructor_dtypes_to_int
```



---
## test_constructor_dtypes_to_float
```python
from test_index_new import test_constructor_dtypes_to_float
```



---
## test_constructor_dtypes_to_categorical
```python
from test_index_new import test_constructor_dtypes_to_categorical
```



---
## test_constructor_dtypes_to_datetime
```python
from test_index_new import test_constructor_dtypes_to_datetime
```



---
## test_constructor_dtypes_to_timedelta
```python
from test_index_new import test_constructor_dtypes_to_timedelta
```



---
## test_pass_timedeltaindex_to_index
```python
from test_index_new import test_pass_timedeltaindex_to_index
```



---
## test_pass_datetimeindex_to_index
```python
from test_index_new import test_pass_datetimeindex_to_index
```



---
## test_constructor_from_series_dt64
```python
from test_index_new import test_constructor_from_series_dt64
```



---
## test_constructor_no_pandas_array
```python
from test_index_new import test_constructor_no_pandas_array
```



---
## test_constructor_ndarray_like
```python
from test_index_new import test_constructor_ndarray_like
```



---
## test_constructor_overflow_int64
```python
from test_index_new import test_constructor_overflow_int64
```



---
## ArrayLike
```python
from test_index_new import ArrayLike
```



---
## __init__
```python
from test_index_new import __init__
```



---
## __array__
```python
from test_index_new import __array__
```



---
## TestIndex
```python
from test_base import TestIndex
```



---
## TestMixedIntIndex
```python
from test_base import TestMixedIntIndex
```



---
## TestIndexUtils
```python
from test_base import TestIndexUtils
```



---
## test_generated_op_names
```python
from test_base import test_generated_op_names
```



---
## test_index_subclass_constructor_wrong_kwargs
```python
from test_base import test_index_subclass_constructor_wrong_kwargs
```



---
## test_deprecated_fastpath
```python
from test_base import test_deprecated_fastpath
```



---
## test_shape_of_invalid_index
```python
from test_base import test_shape_of_invalid_index
```



---
## test_validate_1d_input
```python
from test_base import test_validate_1d_input
```



---
## test_construct_from_memoryview
```python
from test_base import test_construct_from_memoryview
```



---
## test_nan_comparison_same_object
```python
from test_base import test_nan_comparison_same_object
```



---
## test_is_monotonic_pyarrow_list_type
```python
from test_base import test_is_monotonic_pyarrow_list_type
```



---
## simple_index
```python
from test_base import simple_index
```



---
## test_can_hold_identifiers
```python
from test_base import test_can_hold_identifiers
```



---
## test_new_axis
```python
from test_base import test_new_axis
```



---
## test_constructor_regular
```python
from test_base import test_constructor_regular
```



---
## test_constructor_casting
```python
from test_base import test_constructor_casting
```



---
## test_constructor_copy
```python
from test_base import test_constructor_copy
```



---
## test_constructor_from_index_dtlike
```python
from test_base import test_constructor_from_index_dtlike
```



---
## test_constructor_from_series_dtlike
```python
from test_base import test_constructor_from_series_dtlike
```



---
## test_constructor_from_series_freq
```python
from test_base import test_constructor_from_series_freq
```



---
## test_constructor_from_frame_series_freq
```python
from test_base import test_constructor_from_frame_series_freq
```



---
## test_constructor_int_dtype_nan
```python
from test_base import test_constructor_int_dtype_nan
```



---
## test_index_ctor_infer_nan_nat
```python
from test_base import test_index_ctor_infer_nan_nat
```



---
## test_constructor_simple_new
```python
from test_base import test_constructor_simple_new
```



---
## test_constructor_dtypes_datetime
```python
from test_base import test_constructor_dtypes_datetime
```



---
## test_constructor_dtypes_timedelta
```python
from test_base import test_constructor_dtypes_timedelta
```



---
## test_constructor_empty
```python
from test_base import test_constructor_empty
```



---
## test_constructor_empty_special
```python
from test_base import test_constructor_empty_special
```



---
## test_view_with_args
```python
from test_base import test_view_with_args
```



---
## test_view_with_args_object_array_raises
```python
from test_base import test_view_with_args_object_array_raises
```



---
## test_astype
```python
from test_base import test_astype
```



---
## test_equals_object
```python
from test_base import test_equals_object
```



---
## test_not_equals_object
```python
from test_base import test_not_equals_object
```



---
## test_identical
```python
from test_base import test_identical
```



---
## test_is_
```python
from test_base import test_is_
```



---
## test_asof_numeric_vs_bool_raises
```python
from test_base import test_asof_numeric_vs_bool_raises
```



---
## test_booleanindex
```python
from test_base import test_booleanindex
```



---
## test_fancy
```python
from test_base import test_fancy
```



---
## test_empty_fancy
```python
from test_base import test_empty_fancy
```



---
## test_empty_fancy_raises
```python
from test_base import test_empty_fancy_raises
```



---
## test_union_dt_as_obj
```python
from test_base import test_union_dt_as_obj
```



---
## test_map_with_tuples
```python
from test_base import test_map_with_tuples
```



---
## test_map_with_tuples_mi
```python
from test_base import test_map_with_tuples_mi
```



---
## test_map_tseries_indices_return_index
```python
from test_base import test_map_tseries_indices_return_index
```



---
## test_map_tseries_indices_accsr_return_index
```python
from test_base import test_map_tseries_indices_accsr_return_index
```



---
## test_map_dictlike_simple
```python
from test_base import test_map_dictlike_simple
```



---
## test_map_dictlike
```python
from test_base import test_map_dictlike
```



---
## test_map_with_non_function_missing_values
```python
from test_base import test_map_with_non_function_missing_values
```



---
## test_map_na_exclusion
```python
from test_base import test_map_na_exclusion
```



---
## test_map_defaultdict
```python
from test_base import test_map_defaultdict
```



---
## test_append_empty_preserve_name
```python
from test_base import test_append_empty_preserve_name
```



---
## test_is_numeric
```python
from test_base import test_is_numeric
```



---
## test_is_object
```python
from test_base import test_is_object
```



---
## test_summary
```python
from test_base import test_summary
```



---
## test_format_bug
```python
from test_base import test_format_bug
```



---
## test_format_missing
```python
from test_base import test_format_missing
```



---
## test_logical_compat
```python
from test_base import test_logical_compat
```



---
## test_drop_by_str_label
```python
from test_base import test_drop_by_str_label
```



---
## test_drop_by_str_label_raises_missing_keys
```python
from test_base import test_drop_by_str_label_raises_missing_keys
```



---
## test_drop_by_str_label_errors_ignore
```python
from test_base import test_drop_by_str_label_errors_ignore
```



---
## test_drop_by_numeric_label_loc
```python
from test_base import test_drop_by_numeric_label_loc
```



---
## test_drop_by_numeric_label_raises_missing_keys
```python
from test_base import test_drop_by_numeric_label_raises_missing_keys
```



---
## test_drop_by_numeric_label_errors_ignore
```python
from test_base import test_drop_by_numeric_label_errors_ignore
```



---
## test_drop_tuple
```python
from test_base import test_drop_tuple
```



---
## test_drop_with_duplicates_in_index
```python
from test_base import test_drop_with_duplicates_in_index
```



---
## test_is_monotonic_incomparable
```python
from test_base import test_is_monotonic_incomparable
```



---
## test_isin
```python
from test_base import test_isin
```



---
## test_isin_nan_common_object
```python
from test_base import test_isin_nan_common_object
```



---
## test_isin_nan_common_float64
```python
from test_base import test_isin_nan_common_float64
```



---
## test_isin_level_kwarg
```python
from test_base import test_isin_level_kwarg
```



---
## test_isin_level_kwarg_bad_level_raises
```python
from test_base import test_isin_level_kwarg_bad_level_raises
```



---
## test_isin_level_kwarg_bad_label_raises
```python
from test_base import test_isin_level_kwarg_bad_label_raises
```



---
## test_isin_empty
```python
from test_base import test_isin_empty
```



---
## test_isin_arrow_string_null
```python
from test_base import test_isin_arrow_string_null
```



---
## test_boolean_cmp
```python
from test_base import test_boolean_cmp
```



---
## test_get_level_values
```python
from test_base import test_get_level_values
```



---
## test_slice_keep_name
```python
from test_base import test_slice_keep_name
```



---
## test_join_self
```python
from test_base import test_join_self
```



---
## test_str_attribute
```python
from test_base import test_str_attribute
```



---
## test_str_attribute_raises
```python
from test_base import test_str_attribute_raises
```



---
## test_str_split
```python
from test_base import test_str_split
```



---
## test_str_bool_return
```python
from test_base import test_str_bool_return
```



---
## test_str_bool_series_indexing
```python
from test_base import test_str_bool_series_indexing
```



---
## test_tab_completion
```python
from test_base import test_tab_completion
```



---
## test_indexing_doesnt_change_class
```python
from test_base import test_indexing_doesnt_change_class
```



---
## test_outer_join_sort
```python
from test_base import test_outer_join_sort
```



---
## test_take_fill_value
```python
from test_base import test_take_fill_value
```



---
## test_take_fill_value_none_raises
```python
from test_base import test_take_fill_value_none_raises
```



---
## test_take_bad_bounds_raises
```python
from test_base import test_take_bad_bounds_raises
```



---
## test_reindex_preserves_name_if_target_is_list_or_ndarray
```python
from test_base import test_reindex_preserves_name_if_target_is_list_or_ndarray
```



---
## test_reindex_preserves_type_if_target_is_empty_list_or_array
```python
from test_base import test_reindex_preserves_type_if_target_is_empty_list_or_array
```



---
## test_reindex_doesnt_preserve_type_if_target_is_empty_index
```python
from test_base import test_reindex_doesnt_preserve_type_if_target_is_empty_index
```



---
## test_reindex_doesnt_preserve_type_if_target_is_empty_index_numeric
```python
from test_base import test_reindex_doesnt_preserve_type_if_target_is_empty_index_numeric
```



---
## test_reindex_no_type_preserve_target_empty_mi
```python
from test_base import test_reindex_no_type_preserve_target_empty_mi
```



---
## test_reindex_ignoring_level
```python
from test_base import test_reindex_ignoring_level
```



---
## test_groupby
```python
from test_base import test_groupby
```



---
## test_equals_op_multiindex
```python
from test_base import test_equals_op_multiindex
```



---
## test_equals_op_multiindex_identify
```python
from test_base import test_equals_op_multiindex_identify
```



---
## test_equals_op_mismatched_multiindex_raises
```python
from test_base import test_equals_op_mismatched_multiindex_raises
```



---
## test_equals_op_index_vs_mi_same_length
```python
from test_base import test_equals_op_index_vs_mi_same_length
```



---
## test_dt_conversion_preserves_name
```python
from test_base import test_dt_conversion_preserves_name
```



---
## test_cached_properties_not_settable
```python
from test_base import test_cached_properties_not_settable
```



---
## test_tab_complete_warning
```python
from test_base import test_tab_complete_warning
```



---
## test_contains_method_removed
```python
from test_base import test_contains_method_removed
```



---
## test_sortlevel
```python
from test_base import test_sortlevel
```



---
## test_sortlevel_na_position
```python
from test_base import test_sortlevel_na_position
```



---
## test_index_diff
```python
from test_base import test_index_diff
```



---
## test_index_round
```python
from test_base import test_index_round
```



---
## test_argsort
```python
from test_base import test_argsort
```



---
## test_numpy_argsort
```python
from test_base import test_numpy_argsort
```



---
## test_copy_name
```python
from test_base import test_copy_name
```



---
## test_copy_name2
```python
from test_base import test_copy_name2
```



---
## test_unique_na
```python
from test_base import test_unique_na
```



---
## test_dropna
```python
from test_base import test_dropna
```



---
## test_dropna_dt_like
```python
from test_base import test_dropna_dt_like
```



---
## test_dropna_invalid_how_raises
```python
from test_base import test_dropna_invalid_how_raises
```



---
## test_is_monotonic_na
```python
from test_base import test_is_monotonic_na
```



---
## test_is_monotonic_unique_na
```python
from test_base import test_is_monotonic_unique_na
```



---
## test_int_name_format
```python
from test_base import test_int_name_format
```



---
## test_str_to_bytes_raises
```python
from test_base import test_str_to_bytes_raises
```



---
## test_index_with_tuple_bool
```python
from test_base import test_index_with_tuple_bool
```



---
## test_ensure_index_from_sequences
```python
from test_base import test_ensure_index_from_sequences
```



---
## test_ensure_index_mixed_closed_intervals
```python
from test_base import test_ensure_index_mixed_closed_intervals
```



---
## test_ensure_index_uint64
```python
from test_base import test_ensure_index_uint64
```



---
## test_get_combined_index
```python
from test_base import test_get_combined_index
```



---
## __name__
```python
from test_numpy_compat import __name__
```



---
## test_numpy_ufuncs_out
```python
from test_numpy_compat import test_numpy_ufuncs_out
```



---
## test_numpy_ufuncs_basic
```python
from test_numpy_compat import test_numpy_ufuncs_basic
```



---
## test_numpy_ufuncs_other
```python
from test_numpy_compat import test_numpy_ufuncs_other
```



---
## test_numpy_ufuncs_reductions
```python
from test_numpy_compat import test_numpy_ufuncs_reductions
```



---
## test_numpy_ufuncs_bitwise
```python
from test_numpy_compat import test_numpy_ufuncs_bitwise
```



---
## __name__
```python
from test_autocorr import __name__
```



---
## TestAutoCorr
```python
from test_autocorr import TestAutoCorr
```



---
## test_autocorr
```python
from test_autocorr import test_autocorr
```



---
## TestSeriesValueCounts
```python
from test_value_counts import TestSeriesValueCounts
```



---
## test_value_counts_datetime
```python
from test_value_counts import test_value_counts_datetime
```



---
## test_value_counts_datetime_tz
```python
from test_value_counts import test_value_counts_datetime_tz
```



---
## test_value_counts_period
```python
from test_value_counts import test_value_counts_period
```



---
## test_value_counts_categorical_ordered
```python
from test_value_counts import test_value_counts_categorical_ordered
```



---
## test_value_counts_categorical_not_ordered
```python
from test_value_counts import test_value_counts_categorical_not_ordered
```



---
## test_value_counts_categorical
```python
from test_value_counts import test_value_counts_categorical
```



---
## test_value_counts_categorical_with_nan
```python
from test_value_counts import test_value_counts_categorical_with_nan
```



---
## test_value_counts_bool_with_nan
```python
from test_value_counts import test_value_counts_bool_with_nan
```



---
## test_value_counts_complex_numbers
```python
from test_value_counts import test_value_counts_complex_numbers
```



---
## test_value_counts_masked
```python
from test_value_counts import test_value_counts_masked
```



---
## __name__
```python
from test_combine import __name__
```



---
## TestCombine
```python
from test_combine import TestCombine
```



---
## test_combine_scalar
```python
from test_combine import test_combine_scalar
```



---
## __name__
```python
from test_convert_dtypes import __name__
```



---
## test_cases
```python
from test_convert_dtypes import test_cases
```



---
## TestSeriesConvertDtypes
```python
from test_convert_dtypes import TestSeriesConvertDtypes
```



---
## test_convert_dtypes
```python
from test_convert_dtypes import test_convert_dtypes
```



---
## test_convert_string_dtype
```python
from test_convert_dtypes import test_convert_string_dtype
```



---
## test_convert_bool_dtype
```python
from test_convert_dtypes import test_convert_bool_dtype
```



---
## test_convert_byte_string_dtype
```python
from test_convert_dtypes import test_convert_byte_string_dtype
```



---
## test_convert_dtype_object_with_na
```python
from test_convert_dtypes import test_convert_dtype_object_with_na
```



---
## test_convert_dtype_object_with_na_float
```python
from test_convert_dtypes import test_convert_dtype_object_with_na_float
```



---
## test_convert_dtypes_pyarrow_to_np_nullable
```python
from test_convert_dtypes import test_convert_dtypes_pyarrow_to_np_nullable
```



---
## test_convert_dtypes_pyarrow_null
```python
from test_convert_dtypes import test_convert_dtypes_pyarrow_null
```



---
## __name__
```python
from test_cov_corr import __name__
```



---
## TestSeriesCov
```python
from test_cov_corr import TestSeriesCov
```



---
## TestSeriesCorr
```python
from test_cov_corr import TestSeriesCorr
```



---
## test_cov
```python
from test_cov_corr import test_cov
```



---
## test_cov_ddof
```python
from test_cov_corr import test_cov_ddof
```



---
## test_corr
```python
from test_cov_corr import test_corr
```



---
## test_corr_rank
```python
from test_cov_corr import test_corr_rank
```



---
## test_corr_invalid_method
```python
from test_cov_corr import test_corr_invalid_method
```



---
## test_corr_callable_method
```python
from test_cov_corr import test_corr_callable_method
```



---
## __name__
```python
from test_repeat import __name__
```



---
## TestRepeat
```python
from test_repeat import TestRepeat
```



---
## test_repeat
```python
from test_repeat import test_repeat
```



---
## test_numpy_repeat
```python
from test_repeat import test_numpy_repeat
```



---
## test_repeat_with_multiindex
```python
from test_repeat import test_repeat_with_multiindex
```



---
## __name__
```python
from test_searchsorted import __name__
```



---
## TestSeriesSearchSorted
```python
from test_searchsorted import TestSeriesSearchSorted
```



---
## test_searchsorted
```python
from test_searchsorted import test_searchsorted
```



---
## test_searchsorted_numeric_dtypes_scalar
```python
from test_searchsorted import test_searchsorted_numeric_dtypes_scalar
```



---
## test_searchsorted_numeric_dtypes_vector
```python
from test_searchsorted import test_searchsorted_numeric_dtypes_vector
```



---
## test_searchsorted_datetime64_scalar
```python
from test_searchsorted import test_searchsorted_datetime64_scalar
```



---
## test_searchsorted_datetime64_scalar_mixed_timezones
```python
from test_searchsorted import test_searchsorted_datetime64_scalar_mixed_timezones
```



---
## test_searchsorted_datetime64_list
```python
from test_searchsorted import test_searchsorted_datetime64_list
```



---
## test_searchsorted_sorter
```python
from test_searchsorted import test_searchsorted_sorter
```



---
## test_searchsorted_dataframe_fail
```python
from test_searchsorted import test_searchsorted_dataframe_fail
```



---
## __name__
```python
from test_add_prefix_suffix import __name__
```



---
## test_add_prefix_suffix
```python
from test_add_prefix_suffix import test_add_prefix_suffix
```



---
## test_add_prefix_suffix_axis
```python
from test_add_prefix_suffix import test_add_prefix_suffix_axis
```



---
## test_add_prefix_suffix_invalid_axis
```python
from test_add_prefix_suffix import test_add_prefix_suffix_invalid_axis
```



---
## __name__
```python
from test_round import __name__
```



---
## TestSeriesRound
```python
from test_round import TestSeriesRound
```



---
## test_round
```python
from test_round import test_round
```



---
## test_round_numpy
```python
from test_round import test_round_numpy
```



---
## test_round_numpy_with_nan
```python
from test_round import test_round_numpy_with_nan
```



---
## test_round_builtin
```python
from test_round import test_round_builtin
```



---
## test_round_nat
```python
from test_round import test_round_nat
```



---
## test_round_ea_boolean
```python
from test_round import test_round_ea_boolean
```



---
## __name__
```python
from test_combine_first import __name__
```



---
## TestCombineFirst
```python
from test_combine_first import TestCombineFirst
```



---
## test_combine_first_period_datetime
```python
from test_combine_first import test_combine_first_period_datetime
```



---
## test_combine_first_name
```python
from test_combine_first import test_combine_first_name
```



---
## test_combine_first
```python
from test_combine_first import test_combine_first
```



---
## test_combine_first_dt64
```python
from test_combine_first import test_combine_first_dt64
```



---
## test_combine_first_dt_tz_values
```python
from test_combine_first import test_combine_first_dt_tz_values
```



---
## test_combine_first_timezone_series_with_empty_series
```python
from test_combine_first import test_combine_first_timezone_series_with_empty_series
```



---
## test_combine_first_preserves_dtype
```python
from test_combine_first import test_combine_first_preserves_dtype
```



---
## test_combine_mixed_timezone
```python
from test_combine_first import test_combine_mixed_timezone
```



---
## __name__
```python
from test_infer_objects import __name__
```



---
## TestInferObjects
```python
from test_infer_objects import TestInferObjects
```



---
## test_copy
```python
from test_infer_objects import test_copy
```



---
## test_infer_objects_series
```python
from test_infer_objects import test_infer_objects_series
```



---
## test_infer_objects_interval
```python
from test_infer_objects import test_infer_objects_interval
```



---
## test_infer_objects_bytes
```python
from test_infer_objects import test_infer_objects_bytes
```



---
## __name__
```python
from test_sort_values import __name__
```



---
## TestSeriesSortValues
```python
from test_sort_values import TestSeriesSortValues
```



---
## TestSeriesSortingKey
```python
from test_sort_values import TestSeriesSortingKey
```



---
## test_sort_values
```python
from test_sort_values import test_sort_values
```



---
## test_sort_values_categorical
```python
from test_sort_values import test_sort_values_categorical
```



---
## test_sort_values_ignore_index
```python
from test_sort_values import test_sort_values_ignore_index
```



---
## test_mergesort_descending_stability
```python
from test_sort_values import test_mergesort_descending_stability
```



---
## test_sort_values_validate_ascending_for_value_error
```python
from test_sort_values import test_sort_values_validate_ascending_for_value_error
```



---
## test_sort_values_validate_ascending_functional
```python
from test_sort_values import test_sort_values_validate_ascending_functional
```



---
## test_sort_values_key
```python
from test_sort_values import test_sort_values_key
```



---
## test_sort_values_key_nan
```python
from test_sort_values import test_sort_values_key_nan
```



---
## __name__
```python
from test_to_frame import __name__
```



---
## TestToFrame
```python
from test_to_frame import TestToFrame
```



---
## test_to_frame_respects_name_none
```python
from test_to_frame import test_to_frame_respects_name_none
```



---
## test_to_frame
```python
from test_to_frame import test_to_frame
```



---
## test_to_frame_expanddim
```python
from test_to_frame import test_to_frame_expanddim
```



---
## SubclassedSeries
```python
from test_to_frame import SubclassedSeries
```



---
## SubclassedFrame
```python
from test_to_frame import SubclassedFrame
```



---
## _constructor_expanddim
```python
from test_to_frame import _constructor_expanddim
```



---
## __name__
```python
from test_nunique import __name__
```



---
## test_nunique
```python
from test_nunique import test_nunique
```



---
## test_nunique_categorical
```python
from test_nunique import test_nunique_categorical
```



---
## __name__
```python
from test_argsort import __name__
```



---
## TestSeriesArgsort
```python
from test_argsort import TestSeriesArgsort
```



---
## test_argsort_axis
```python
from test_argsort import test_argsort_axis
```



---
## test_argsort_numpy
```python
from test_argsort import test_argsort_numpy
```



---
## test_argsort
```python
from test_argsort import test_argsort
```



---
## test_argsort_dt64
```python
from test_argsort import test_argsort_dt64
```



---
## test_argsort_stable
```python
from test_argsort import test_argsort_stable
```



---
## test_argsort_preserve_name
```python
from test_argsort import test_argsort_preserve_name
```



---
## __name__
```python
from test_reset_index import __name__
```



---
## TestResetIndex
```python
from test_reset_index import TestResetIndex
```



---
## test_reset_index_dtypes_on_empty_series_with_multiindex
```python
from test_reset_index import test_reset_index_dtypes_on_empty_series_with_multiindex
```



---
## test_column_name_duplicates
```python
from test_reset_index import test_column_name_duplicates
```



---
## test_reset_index_dti_round_trip
```python
from test_reset_index import test_reset_index_dti_round_trip
```



---
## test_reset_index
```python
from test_reset_index import test_reset_index
```



---
## test_reset_index_name
```python
from test_reset_index import test_reset_index_name
```



---
## test_reset_index_level
```python
from test_reset_index import test_reset_index_level
```



---
## test_reset_index_range
```python
from test_reset_index import test_reset_index_range
```



---
## test_reset_index_drop_errors
```python
from test_reset_index import test_reset_index_drop_errors
```



---
## test_reset_index_with_drop
```python
from test_reset_index import test_reset_index_with_drop
```



---
## test_reset_index_inplace_and_drop_ignore_name
```python
from test_reset_index import test_reset_index_inplace_and_drop_ignore_name
```



---
## test_reset_index_drop_infer_string
```python
from test_reset_index import test_reset_index_drop_infer_string
```



---
## __name__
```python
from test_describe import __name__
```



---
## TestSeriesDescribe
```python
from test_describe import TestSeriesDescribe
```



---
## test_describe_ints
```python
from test_describe import test_describe_ints
```



---
## test_describe_bools
```python
from test_describe import test_describe_bools
```



---
## test_describe_strs
```python
from test_describe import test_describe_strs
```



---
## test_describe_timedelta64
```python
from test_describe import test_describe_timedelta64
```



---
## test_describe_period
```python
from test_describe import test_describe_period
```



---
## test_describe_empty_object
```python
from test_describe import test_describe_empty_object
```



---
## test_describe_with_tz
```python
from test_describe import test_describe_with_tz
```



---
## test_describe_with_tz_numeric
```python
from test_describe import test_describe_with_tz_numeric
```



---
## test_datetime_is_numeric_includes_datetime
```python
from test_describe import test_datetime_is_numeric_includes_datetime
```



---
## test_numeric_result_dtype
```python
from test_describe import test_numeric_result_dtype
```



---
## test_describe_one_element_ea
```python
from test_describe import test_describe_one_element_ea
```



---
## test_series
```python
from test_size import test_series
```



---
## __name__
```python
from test_reindex_like import __name__
```



---
## test_reindex_like
```python
from test_reindex_like import test_reindex_like
```



---
## test_reindex_like_nearest
```python
from test_reindex_like import test_reindex_like_nearest
```



---
## __name__
```python
from test_copy import __name__
```



---
## TestCopy
```python
from test_copy import TestCopy
```



---
## test_copy
```python
from test_copy import test_copy
```



---
## test_copy_tzaware
```python
from test_copy import test_copy_tzaware
```



---
## test_copy_name
```python
from test_copy import test_copy_name
```



---
## test_copy_index_name_checking
```python
from test_copy import test_copy_index_name_checking
```



---
## __name__
```python
from test_set_name import __name__
```



---
## TestSetName
```python
from test_set_name import TestSetName
```



---
## test_set_name
```python
from test_set_name import test_set_name
```



---
## test_set_name_attribute
```python
from test_set_name import test_set_name_attribute
```



---
## __name__
```python
from test_truncate import __name__
```



---
## TestTruncate
```python
from test_truncate import TestTruncate
```



---
## test_truncate_datetimeindex_tz
```python
from test_truncate import test_truncate_datetimeindex_tz
```



---
## test_truncate_periodindex
```python
from test_truncate import test_truncate_periodindex
```



---
## test_truncate_one_element_series
```python
from test_truncate import test_truncate_one_element_series
```



---
## test_truncate_index_only_one_unique_value
```python
from test_truncate import test_truncate_index_only_one_unique_value
```



---
## __name__
```python
from test_drop_duplicates import __name__
```



---
## test_drop_duplicates
```python
from test_drop_duplicates import test_drop_duplicates
```



---
## test_drop_duplicates_bool
```python
from test_drop_duplicates import test_drop_duplicates_bool
```



---
## test_drop_duplicates_no_duplicates
```python
from test_drop_duplicates import test_drop_duplicates_no_duplicates
```



---
## TestSeriesDropDuplicates
```python
from test_drop_duplicates import TestSeriesDropDuplicates
```



---
## dtype
```python
from test_drop_duplicates import dtype
```



---
## cat_series_unused_category
```python
from test_drop_duplicates import cat_series_unused_category
```



---
## test_drop_duplicates_categorical_non_bool
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool
```



---
## test_drop_duplicates_categorical_non_bool_keeplast
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool_keeplast
```



---
## test_drop_duplicates_categorical_non_bool_keepfalse
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool_keepfalse
```



---
## cat_series
```python
from test_drop_duplicates import cat_series
```



---
## test_drop_duplicates_categorical_non_bool2
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool2
```



---
## test_drop_duplicates_categorical_non_bool2_keeplast
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool2_keeplast
```



---
## test_drop_duplicates_categorical_non_bool2_keepfalse
```python
from test_drop_duplicates import test_drop_duplicates_categorical_non_bool2_keepfalse
```



---
## test_drop_duplicates_categorical_bool
```python
from test_drop_duplicates import test_drop_duplicates_categorical_bool
```



---
## test_drop_duplicates_categorical_bool_na
```python
from test_drop_duplicates import test_drop_duplicates_categorical_bool_na
```



---
## test_drop_duplicates_ignore_index
```python
from test_drop_duplicates import test_drop_duplicates_ignore_index
```



---
## test_duplicated_arrow_dtype
```python
from test_drop_duplicates import test_duplicated_arrow_dtype
```



---
## test_drop_duplicates_arrow_strings
```python
from test_drop_duplicates import test_drop_duplicates_arrow_strings
```



---
## __name__
```python
from test_head_tail import __name__
```



---
## test_head_tail
```python
from test_head_tail import test_head_tail
```



---
## __name__
```python
from test_unstack import __name__
```



---
## test_unstack_preserves_object
```python
from test_unstack import test_unstack_preserves_object
```



---
## test_unstack
```python
from test_unstack import test_unstack
```



---
## test_unstack_tuplename_in_multiindex
```python
from test_unstack import test_unstack_tuplename_in_multiindex
```



---
## test_unstack_mixed_type_name_in_multiindex
```python
from test_unstack import test_unstack_mixed_type_name_in_multiindex
```



---
## test_unstack_multi_index_categorical_values
```python
from test_unstack import test_unstack_multi_index_categorical_values
```



---
## test_unstack_mixed_level_names
```python
from test_unstack import test_unstack_mixed_level_names
```



---
## __name__
```python
from test_count import __name__
```



---
## TestSeriesCount
```python
from test_count import TestSeriesCount
```



---
## test_count
```python
from test_count import test_count
```



---
## test_count_inf_as_na
```python
from test_count import test_count_inf_as_na
```



---
## test_count_categorical
```python
from test_count import test_count_categorical
```



---
## __name__
```python
from test_quantile import __name__
```



---
## TestSeriesQuantile
```python
from test_quantile import TestSeriesQuantile
```



---
## test_quantile
```python
from test_quantile import test_quantile
```



---
## test_quantile_multi
```python
from test_quantile import test_quantile_multi
```



---
## test_quantile_interpolation
```python
from test_quantile import test_quantile_interpolation
```



---
## test_quantile_interpolation_dtype
```python
from test_quantile import test_quantile_interpolation_dtype
```



---
## test_quantile_nan
```python
from test_quantile import test_quantile_nan
```



---
## test_quantile_box
```python
from test_quantile import test_quantile_box
```



---
## test_datetime_timedelta_quantiles
```python
from test_quantile import test_datetime_timedelta_quantiles
```



---
## test_quantile_nat
```python
from test_quantile import test_quantile_nat
```



---
## test_quantile_sparse
```python
from test_quantile import test_quantile_sparse
```



---
## test_quantile_empty_float64
```python
from test_quantile import test_quantile_empty_float64
```



---
## test_quantile_empty_int64
```python
from test_quantile import test_quantile_empty_int64
```



---
## test_quantile_empty_dt64
```python
from test_quantile import test_quantile_empty_dt64
```



---
## test_quantile_dtypes
```python
from test_quantile import test_quantile_dtypes
```



---
## test_quantile_all_na
```python
from test_quantile import test_quantile_all_na
```



---
## test_quantile_dtype_size
```python
from test_quantile import test_quantile_dtype_size
```



---
## __name__
```python
from test_between import __name__
```



---
## TestBetween
```python
from test_between import TestBetween
```



---
## test_between
```python
from test_between import test_between
```



---
## test_between_datetime_object_dtype
```python
from test_between import test_between_datetime_object_dtype
```



---
## test_between_period_values
```python
from test_between import test_between_period_values
```



---
## test_between_inclusive_string
```python
from test_between import test_between_inclusive_string
```



---
## test_between_error_args
```python
from test_between import test_between_error_args
```



---
## __name__
```python
from test_equals import __name__
```

Tests shared for DatetimeIndex/TimedeltaIndex/PeriodIndex

---
## test_equals
```python
from test_equals import test_equals
```



---
## test_equals_list_array
```python
from test_equals import test_equals_list_array
```



---
## test_equals_false_negative
```python
from test_equals import test_equals_false_negative
```



---
## test_equals_matching_nas
```python
from test_equals import test_equals_matching_nas
```



---
## test_equals_mismatched_nas
```python
from test_equals import test_equals_mismatched_nas
```



---
## test_equals_none_vs_nan
```python
from test_equals import test_equals_none_vs_nan
```



---
## test_equals_None_vs_float
```python
from test_equals import test_equals_None_vs_float
```



---
## __name__
```python
from test_nlargest import __name__
```

Note: for naming purposes, most tests are title with as e.g. "test_nlargest_foo"
but are implicitly also testing nsmallest_foo.

---
## s_main_dtypes
```python
from test_nlargest import s_main_dtypes
```

A DataFrame with many dtypes

* datetime
* datetimetz
* timedelta
* [u]int{8,16,32,64}
* float{32,64}

The columns are the name of the dtype.

---
## s_main_dtypes_split
```python
from test_nlargest import s_main_dtypes_split
```

Each series in s_main_dtypes.

---
## assert_check_nselect_boundary
```python
from test_nlargest import assert_check_nselect_boundary
```



---
## TestSeriesNLargestNSmallest
```python
from test_nlargest import TestSeriesNLargestNSmallest
```



---
## test_nlargest_error
```python
from test_nlargest import test_nlargest_error
```



---
## test_nsmallest_nlargest
```python
from test_nlargest import test_nsmallest_nlargest
```



---
## test_nlargest_misc
```python
from test_nlargest import test_nlargest_misc
```



---
## test_nlargest_n
```python
from test_nlargest import test_nlargest_n
```



---
## test_nlargest_boundary_integer
```python
from test_nlargest import test_nlargest_boundary_integer
```



---
## test_nlargest_boundary_float
```python
from test_nlargest import test_nlargest_boundary_float
```



---
## test_nlargest_boundary_datetimelike
```python
from test_nlargest import test_nlargest_boundary_datetimelike
```



---
## test_nlargest_duplicate_keep_all_ties
```python
from test_nlargest import test_nlargest_duplicate_keep_all_ties
```



---
## test_nlargest_boolean
```python
from test_nlargest import test_nlargest_boolean
```



---
## test_nlargest_nullable
```python
from test_nlargest import test_nlargest_nullable
```



---
## test_nsmallest_nan_when_keep_is_all
```python
from test_nlargest import test_nsmallest_nan_when_keep_is_all
```



---
## __name__
```python
from test_tz_localize import __name__
```



---
## TestTZLocalize
```python
from test_tz_localize import TestTZLocalize
```



---
## test_series_tz_localize_ambiguous_bool
```python
from test_tz_localize import test_series_tz_localize_ambiguous_bool
```



---
## test_series_tz_localize_matching_index
```python
from test_tz_localize import test_series_tz_localize_matching_index
```



---
## test_tz_localize_nonexistent
```python
from test_tz_localize import test_tz_localize_nonexistent
```



---
## test_series_tz_localize_empty
```python
from test_tz_localize import test_series_tz_localize_empty
```



---
## __name__
```python
from test_update import __name__
```



---
## TestUpdate
```python
from test_update import TestUpdate
```



---
## test_update
```python
from test_update import test_update
```



---
## test_update_dtypes
```python
from test_update import test_update_dtypes
```



---
## test_update_from_non_series
```python
from test_update import test_update_from_non_series
```



---
## test_update_extension_array_series
```python
from test_update import test_update_extension_array_series
```



---
## test_update_with_categorical_type
```python
from test_update import test_update_with_categorical_type
```



---
## TestSeriesDiff
```python
from test_diff import TestSeriesDiff
```



---
## test_diff_np
```python
from test_diff import test_diff_np
```



---
## test_diff_int
```python
from test_diff import test_diff_int
```



---
## test_diff_tz
```python
from test_diff import test_diff_tz
```



---
## test_diff_dt64
```python
from test_diff import test_diff_dt64
```



---
## test_diff_dt64tz
```python
from test_diff import test_diff_dt64tz
```



---
## test_diff_bool
```python
from test_diff import test_diff_bool
```



---
## test_diff_object_dtype
```python
from test_diff import test_diff_object_dtype
```



---
## rand_str
```python
from test_astype import rand_str
```

Generate one random byte string.

---
## TestAstypeAPI
```python
from test_astype import TestAstypeAPI
```



---
## TestAstype
```python
from test_astype import TestAstype
```



---
## TestAstypeString
```python
from test_astype import TestAstypeString
```



---
## TestAstypeCategorical
```python
from test_astype import TestAstypeCategorical
```



---
## test_astype_unitless_dt64_raises
```python
from test_astype import test_astype_unitless_dt64_raises
```



---
## test_arg_for_errors_in_astype
```python
from test_astype import test_arg_for_errors_in_astype
```



---
## test_astype_dict_like
```python
from test_astype import test_astype_dict_like
```



---
## test_astype_object_to_dt64_non_nano
```python
from test_astype import test_astype_object_to_dt64_non_nano
```



---
## test_astype_mixed_object_to_dt64tz
```python
from test_astype import test_astype_mixed_object_to_dt64tz
```



---
## test_astype_empty_constructor_equality
```python
from test_astype import test_astype_empty_constructor_equality
```



---
## test_astype_str_map
```python
from test_astype import test_astype_str_map
```



---
## test_astype_float_to_period
```python
from test_astype import test_astype_float_to_period
```



---
## test_astype_no_pandas_dtype
```python
from test_astype import test_astype_no_pandas_dtype
```



---
## test_astype_generic_timestamp_no_frequency
```python
from test_astype import test_astype_generic_timestamp_no_frequency
```



---
## test_astype_dt64_to_str
```python
from test_astype import test_astype_dt64_to_str
```



---
## test_astype_dt64tz_to_str
```python
from test_astype import test_astype_dt64tz_to_str
```



---
## test_astype_datetime
```python
from test_astype import test_astype_datetime
```



---
## test_astype_datetime64tz
```python
from test_astype import test_astype_datetime64tz
```



---
## test_astype_str_cast_dt64
```python
from test_astype import test_astype_str_cast_dt64
```



---
## test_astype_str_cast_td64
```python
from test_astype import test_astype_str_cast_td64
```



---
## test_dt64_series_astype_object
```python
from test_astype import test_dt64_series_astype_object
```



---
## test_td64_series_astype_object
```python
from test_astype import test_td64_series_astype_object
```



---
## test_astype_ignores_errors_for_extension_dtypes
```python
from test_astype import test_astype_ignores_errors_for_extension_dtypes
```



---
## test_astype_from_float_to_str
```python
from test_astype import test_astype_from_float_to_str
```



---
## test_astype_to_str_preserves_na
```python
from test_astype import test_astype_to_str_preserves_na
```



---
## test_astype
```python
from test_astype import test_astype
```



---
## test_astype_cast_nan_inf_int
```python
from test_astype import test_astype_cast_nan_inf_int
```



---
## test_astype_cast_object_int_fail
```python
from test_astype import test_astype_cast_object_int_fail
```



---
## test_astype_float_to_uint_negatives_raise
```python
from test_astype import test_astype_float_to_uint_negatives_raise
```



---
## test_astype_cast_object_int
```python
from test_astype import test_astype_cast_object_int
```



---
## test_astype_unicode
```python
from test_astype import test_astype_unicode
```



---
## test_astype_bytes
```python
from test_astype import test_astype_bytes
```



---
## test_astype_nan_to_bool
```python
from test_astype import test_astype_nan_to_bool
```



---
## test_astype_ea_to_datetimetzdtype
```python
from test_astype import test_astype_ea_to_datetimetzdtype
```



---
## test_astype_retain_attrs
```python
from test_astype import test_astype_retain_attrs
```



---
## test_astype_string_to_extension_dtype_roundtrip
```python
from test_astype import test_astype_string_to_extension_dtype_roundtrip
```



---
## test_astype_categorical_to_other
```python
from test_astype import test_astype_categorical_to_other
```



---
## test_astype_categorical_invalid_conversions
```python
from test_astype import test_astype_categorical_invalid_conversions
```



---
## test_astype_categoricaldtype
```python
from test_astype import test_astype_categoricaldtype
```



---
## test_astype_categorical_to_categorical
```python
from test_astype import test_astype_categorical_to_categorical
```



---
## test_astype_bool_missing_to_categorical
```python
from test_astype import test_astype_bool_missing_to_categorical
```



---
## test_astype_categories_raises
```python
from test_astype import test_astype_categories_raises
```



---
## test_astype_from_categorical
```python
from test_astype import test_astype_from_categorical
```



---
## test_astype_from_categorical_with_keywords
```python
from test_astype import test_astype_from_categorical_with_keywords
```



---
## test_astype_timedelta64_with_np_nan
```python
from test_astype import test_astype_timedelta64_with_np_nan
```



---
## test_astype_int_na_string
```python
from test_astype import test_astype_int_na_string
```



---
## cmp
```python
from test_astype import cmp
```



---
## __name__
```python
from test_dropna import __name__
```



---
## TestDropna
```python
from test_dropna import TestDropna
```



---
## test_dropna_empty
```python
from test_dropna import test_dropna_empty
```



---
## test_dropna_preserve_name
```python
from test_dropna import test_dropna_preserve_name
```



---
## test_dropna_no_nan
```python
from test_dropna import test_dropna_no_nan
```



---
## test_dropna_intervals
```python
from test_dropna import test_dropna_intervals
```



---
## test_dropna_period_dtype
```python
from test_dropna import test_dropna_period_dtype
```



---
## test_datetime64_tz_dropna
```python
from test_dropna import test_datetime64_tz_dropna
```



---
## test_dropna_ignore_index
```python
from test_dropna import test_dropna_ignore_index
```



---
## __name__
```python
from test_explode import __name__
```



---
## test_basic
```python
from test_explode import test_basic
```



---
## test_mixed_type
```python
from test_explode import test_mixed_type
```



---
## test_empty
```python
from test_explode import test_empty
```



---
## test_nested_lists
```python
from test_explode import test_nested_lists
```



---
## test_multi_index
```python
from test_explode import test_multi_index
```



---
## test_large
```python
from test_explode import test_large
```



---
## test_invert_array
```python
from test_explode import test_invert_array
```



---
## test_non_object_dtype
```python
from test_explode import test_non_object_dtype
```



---
## test_typical_usecase
```python
from test_explode import test_typical_usecase
```



---
## test_nested_EA
```python
from test_explode import test_nested_EA
```



---
## test_duplicate_index
```python
from test_explode import test_duplicate_index
```



---
## test_ignore_index
```python
from test_explode import test_ignore_index
```



---
## test_explode_sets
```python
from test_explode import test_explode_sets
```



---
## test_explode_scalars_can_ignore_index
```python
from test_explode import test_explode_scalars_can_ignore_index
```



---
## test_explode_pyarrow_list_type
```python
from test_explode import test_explode_pyarrow_list_type
```



---
## test_explode_pyarrow_non_list_type
```python
from test_explode import test_explode_pyarrow_non_list_type
```



---
## __name__
```python
from test_matmul import __name__
```



---
## TestMatmul
```python
from test_matmul import TestMatmul
```



---
## test_matmul
```python
from test_matmul import test_matmul
```



---
## __name__
```python
from test_values import __name__
```



---
## TestValues
```python
from test_values import TestValues
```



---
## test_values_object_extension_dtypes
```python
from test_values import test_values_object_extension_dtypes
```



---
## test_values
```python
from test_values import test_values
```



---
## __name__
```python
from test_view import __name__
```



---
## TestView
```python
from test_view import TestView
```



---
## test_view_i8_to_datetimelike
```python
from test_view import test_view_i8_to_datetimelike
```



---
## test_view_tz
```python
from test_view import test_view_tz
```



---
## test_view_between_datetimelike
```python
from test_view import test_view_between_datetimelike
```



---
## __name__
```python
from test_duplicated import __name__
```



---
## test_duplicated_keep
```python
from test_duplicated import test_duplicated_keep
```



---
## test_duplicated_nan_none
```python
from test_duplicated import test_duplicated_nan_none
```



---
## test_duplicated_categorical_bool_na
```python
from test_duplicated import test_duplicated_categorical_bool_na
```



---
## test_duplicated_mask
```python
from test_duplicated import test_duplicated_mask
```



---
## test_duplicated_mask_no_duplicated_na
```python
from test_duplicated import test_duplicated_mask_no_duplicated_na
```



---
## __name__
```python
from test_case_when import __name__
```



---
## df
```python
from test_case_when import df
```

base dataframe for testing

---
## test_case_when_caselist_is_not_a_list
```python
from test_case_when import test_case_when_caselist_is_not_a_list
```

Raise ValueError if caselist is not a list.

---
## test_case_when_no_caselist
```python
from test_case_when import test_case_when_no_caselist
```

Raise ValueError if no caselist is provided.

---
## test_case_when_odd_caselist
```python
from test_case_when import test_case_when_odd_caselist
```

Raise ValueError if no of caselist is odd.

---
## test_case_when_raise_error_from_mask
```python
from test_case_when import test_case_when_raise_error_from_mask
```

Raise Error from within Series.mask

---
## test_case_when_single_condition
```python
from test_case_when import test_case_when_single_condition
```

Test output on a single condition.

---
## test_case_when_multiple_conditions
```python
from test_case_when import test_case_when_multiple_conditions
```

Test output when booleans are derived from a computation

---
## test_case_when_multiple_conditions_replacement_list
```python
from test_case_when import test_case_when_multiple_conditions_replacement_list
```

Test output when replacement is a list

---
## test_case_when_multiple_conditions_replacement_extension_dtype
```python
from test_case_when import test_case_when_multiple_conditions_replacement_extension_dtype
```

Test output when replacement has an extension dtype

---
## test_case_when_multiple_conditions_replacement_series
```python
from test_case_when import test_case_when_multiple_conditions_replacement_series
```

Test output when replacement is a Series

---
## test_case_when_non_range_index
```python
from test_case_when import test_case_when_non_range_index
```

Test output if index is not RangeIndex

---
## test_case_when_callable
```python
from test_case_when import test_case_when_callable
```

Test output on a callable

---
## __name__
```python
from test_align import __name__
```



---
## test_align
```python
from test_align import test_align
```



---
## test_align_fill_method
```python
from test_align import test_align_fill_method
```



---
## test_align_nocopy
```python
from test_align import test_align_nocopy
```



---
## test_align_same_index
```python
from test_align import test_align_same_index
```



---
## test_align_multiindex
```python
from test_align import test_align_multiindex
```



---
## test_align_with_dataframe_method
```python
from test_align import test_align_with_dataframe_method
```



---
## test_align_dt64tzindex_mismatched_tzs
```python
from test_align import test_align_dt64tzindex_mismatched_tzs
```



---
## test_align_periodindex
```python
from test_align import test_align_periodindex
```



---
## test_align_left_fewer_levels
```python
from test_align import test_align_left_fewer_levels
```



---
## test_align_left_different_named_levels
```python
from test_align import test_align_left_different_named_levels
```



---
## __name__
```python
from test_pop import __name__
```



---
## test_pop
```python
from test_pop import test_pop
```



---
## __name__
```python
from test_pct_change import __name__
```



---
## TestSeriesPctChange
```python
from test_pct_change import TestSeriesPctChange
```



---
## test_pct_change_with_duplicated_indices
```python
from test_pct_change import test_pct_change_with_duplicated_indices
```



---
## test_pct_change_no_warning_na_beginning
```python
from test_pct_change import test_pct_change_no_warning_na_beginning
```



---
## test_pct_change_empty
```python
from test_pct_change import test_pct_change_empty
```



---
## test_pct_change
```python
from test_pct_change import test_pct_change
```



---
## test_pct_change_with_duplicate_axis
```python
from test_pct_change import test_pct_change_with_duplicate_axis
```



---
## test_pct_change_shift_over_nas
```python
from test_pct_change import test_pct_change_shift_over_nas
```



---
## test_pct_change_periods_freq
```python
from test_pct_change import test_pct_change_periods_freq
```



---
## __name__
```python
from test_tolist import __name__
```



---
## test_tolist_scalar_dtype
```python
from test_tolist import test_tolist_scalar_dtype
```



---
## __name__
```python
from test_isin import __name__
```



---
## TestSeriesIsIn
```python
from test_isin import TestSeriesIsIn
```



---
## test_isin_large_series_mixed_dtypes_and_nan
```python
from test_isin import test_isin_large_series_mixed_dtypes_and_nan
```



---
## test_isin_complex_numbers
```python
from test_isin import test_isin_complex_numbers
```



---
## test_isin_filtering_with_mixed_object_types
```python
from test_isin import test_isin_filtering_with_mixed_object_types
```



---
## test_isin_filtering_on_iterable
```python
from test_isin import test_isin_filtering_on_iterable
```



---
## test_isin
```python
from test_isin import test_isin
```



---
## test_isin_with_string_scalar
```python
from test_isin import test_isin_with_string_scalar
```



---
## test_isin_datetimelike_mismatched_reso
```python
from test_isin import test_isin_datetimelike_mismatched_reso
```



---
## test_isin_datetimelike_mismatched_reso_list
```python
from test_isin import test_isin_datetimelike_mismatched_reso_list
```



---
## test_isin_with_i8
```python
from test_isin import test_isin_with_i8
```



---
## test_isin_empty
```python
from test_isin import test_isin_empty
```



---
## test_isin_read_only
```python
from test_isin import test_isin_read_only
```



---
## test_isin_dt64_values_vs_ints
```python
from test_isin import test_isin_dt64_values_vs_ints
```



---
## test_isin_tzawareness_mismatch
```python
from test_isin import test_isin_tzawareness_mismatch
```



---
## test_isin_period_freq_mismatch
```python
from test_isin import test_isin_period_freq_mismatch
```



---
## test_isin_float_in_int_series
```python
from test_isin import test_isin_float_in_int_series
```



---
## test_isin_masked_types
```python
from test_isin import test_isin_masked_types
```



---
## __name__
```python
from test_rename import __name__
```



---
## TestRename
```python
from test_rename import TestRename
```



---
## test_rename
```python
from test_rename import test_rename
```



---
## test_rename_partial_dict
```python
from test_rename import test_rename_partial_dict
```



---
## test_rename_retain_index_name
```python
from test_rename import test_rename_retain_index_name
```



---
## test_rename_by_series
```python
from test_rename import test_rename_by_series
```



---
## test_rename_set_name
```python
from test_rename import test_rename_set_name
```



---
## test_rename_set_name_inplace
```python
from test_rename import test_rename_set_name_inplace
```



---
## test_rename_axis_supported
```python
from test_rename import test_rename_axis_supported
```



---
## test_rename_inplace
```python
from test_rename import test_rename_inplace
```



---
## test_rename_with_custom_indexer
```python
from test_rename import test_rename_with_custom_indexer
```



---
## test_rename_with_custom_indexer_inplace
```python
from test_rename import test_rename_with_custom_indexer_inplace
```



---
## test_rename_callable
```python
from test_rename import test_rename_callable
```



---
## test_rename_none
```python
from test_rename import test_rename_none
```



---
## test_rename_series_with_multiindex
```python
from test_rename import test_rename_series_with_multiindex
```



---
## test_rename_series_with_multiindex_keeps_ea_dtypes
```python
from test_rename import test_rename_series_with_multiindex_keeps_ea_dtypes
```



---
## test_rename_error_arg
```python
from test_rename import test_rename_error_arg
```



---
## test_rename_copy_false
```python
from test_rename import test_rename_copy_false
```



---
## MyIndexer
```python
from test_rename import MyIndexer
```



---
## TestSeriesFillNA
```python
from test_fillna import TestSeriesFillNA
```



---
## TestFillnaPad
```python
from test_fillna import TestFillnaPad
```



---
## test_ffill_bfill_limit_area
```python
from test_fillna import test_ffill_bfill_limit_area
```



---
## test_fillna_nat
```python
from test_fillna import test_fillna_nat
```



---
## test_fillna_value_or_method
```python
from test_fillna import test_fillna_value_or_method
```



---
## test_fillna_nonscalar
```python
from test_fillna import test_fillna_nonscalar
```



---
## test_fillna_aligns
```python
from test_fillna import test_fillna_aligns
```



---
## test_fillna_limit
```python
from test_fillna import test_fillna_limit
```



---
## test_fillna_dont_cast_strings
```python
from test_fillna import test_fillna_dont_cast_strings
```



---
## test_fillna_consistency
```python
from test_fillna import test_fillna_consistency
```



---
## test_fillna_downcast
```python
from test_fillna import test_fillna_downcast
```



---
## test_fillna_downcast_infer_objects_to_numeric
```python
from test_fillna import test_fillna_downcast_infer_objects_to_numeric
```



---
## test_timedelta_fillna
```python
from test_fillna import test_timedelta_fillna
```



---
## test_datetime64_fillna
```python
from test_fillna import test_datetime64_fillna
```



---
## test_datetime64_fillna_mismatched_reso_no_rounding
```python
from test_fillna import test_datetime64_fillna_mismatched_reso_no_rounding
```



---
## test_timedelta64_fillna_mismatched_reso_no_rounding
```python
from test_fillna import test_timedelta64_fillna_mismatched_reso_no_rounding
```



---
## test_datetime64_fillna_backfill
```python
from test_fillna import test_datetime64_fillna_backfill
```



---
## test_datetime64_tz_fillna
```python
from test_fillna import test_datetime64_tz_fillna
```



---
## test_fillna_dt64tz_with_method
```python
from test_fillna import test_fillna_dt64tz_with_method
```



---
## test_fillna_pytimedelta
```python
from test_fillna import test_fillna_pytimedelta
```



---
## test_fillna_period
```python
from test_fillna import test_fillna_period
```



---
## test_fillna_dt64_timestamp
```python
from test_fillna import test_fillna_dt64_timestamp
```



---
## test_fillna_dt64_non_nao
```python
from test_fillna import test_fillna_dt64_non_nao
```



---
## test_fillna_numeric_inplace
```python
from test_fillna import test_fillna_numeric_inplace
```



---
## test_fillna_categorical
```python
from test_fillna import test_fillna_categorical
```



---
## test_fillna_categorical_with_new_categories
```python
from test_fillna import test_fillna_categorical_with_new_categories
```



---
## test_fillna_categorical_raises
```python
from test_fillna import test_fillna_categorical_raises
```



---
## test_fillna_float_casting
```python
from test_fillna import test_fillna_float_casting
```



---
## test_fillna_f32_upcast_with_dict
```python
from test_fillna import test_fillna_f32_upcast_with_dict
```



---
## test_fillna_invalid_method
```python
from test_fillna import test_fillna_invalid_method
```



---
## test_fillna_listlike_invalid
```python
from test_fillna import test_fillna_listlike_invalid
```



---
## test_fillna_method_and_limit_invalid
```python
from test_fillna import test_fillna_method_and_limit_invalid
```



---
## test_fillna_datetime64_with_timezone_tzinfo
```python
from test_fillna import test_fillna_datetime64_with_timezone_tzinfo
```



---
## test_fillna_categorical_accept_same_type
```python
from test_fillna import test_fillna_categorical_accept_same_type
```



---
## test_fillna_bug
```python
from test_fillna import test_fillna_bug
```



---
## test_ffill
```python
from test_fillna import test_ffill
```



---
## test_ffill_mixed_dtypes_without_missing_data
```python
from test_fillna import test_ffill_mixed_dtypes_without_missing_data
```



---
## test_bfill
```python
from test_fillna import test_bfill
```



---
## test_pad_nan
```python
from test_fillna import test_pad_nan
```



---
## test_series_fillna_limit
```python
from test_fillna import test_series_fillna_limit
```



---
## test_series_pad_backfill_limit
```python
from test_fillna import test_series_pad_backfill_limit
```



---
## test_fillna_int
```python
from test_fillna import test_fillna_int
```



---
## test_datetime64tz_fillna_round_issue
```python
from test_fillna import test_datetime64tz_fillna_round_issue
```



---
## test_fillna_parr
```python
from test_fillna import test_fillna_parr
```



---
## test_pad_backfill_deprecated
```python
from test_fillna import test_pad_backfill_deprecated
```



---
## __name__
```python
from test_sort_index import __name__
```



---
## sort_kind
```python
from test_sort_index import sort_kind
```



---
## TestSeriesSortIndex
```python
from test_sort_index import TestSeriesSortIndex
```



---
## TestSeriesSortIndexKey
```python
from test_sort_index import TestSeriesSortIndexKey
```



---
## test_sort_index_name
```python
from test_sort_index import test_sort_index_name
```



---
## test_sort_index
```python
from test_sort_index import test_sort_index
```



---
## test_sort_index_inplace
```python
from test_sort_index import test_sort_index_inplace
```



---
## test_sort_index_level
```python
from test_sort_index import test_sort_index_level
```



---
## test_sort_index_multiindex
```python
from test_sort_index import test_sort_index_multiindex
```



---
## test_sort_index_kind
```python
from test_sort_index import test_sort_index_kind
```



---
## test_sort_index_na_position
```python
from test_sort_index import test_sort_index_na_position
```



---
## test_sort_index_intervals
```python
from test_sort_index import test_sort_index_intervals
```



---
## test_sort_index_ignore_index
```python
from test_sort_index import test_sort_index_ignore_index
```



---
## test_sort_index_ascending_list
```python
from test_sort_index import test_sort_index_ascending_list
```



---
## test_sort_index_ascending_bad_value_raises
```python
from test_sort_index import test_sort_index_ascending_bad_value_raises
```



---
## test_sort_index_multiindex_key
```python
from test_sort_index import test_sort_index_multiindex_key
```



---
## test_sort_index_multiindex_key_multi_level
```python
from test_sort_index import test_sort_index_multiindex_key_multi_level
```



---
## test_sort_index_key
```python
from test_sort_index import test_sort_index_key
```



---
## test_sort_index_key_int
```python
from test_sort_index import test_sort_index_key_int
```



---
## test_sort_index_kind_key
```python
from test_sort_index import test_sort_index_kind_key
```



---
## test_sort_index_kind_neg_key
```python
from test_sort_index import test_sort_index_kind_neg_key
```



---
## test_sort_index_na_position_key
```python
from test_sort_index import test_sort_index_na_position_key
```



---
## test_changes_length_raises
```python
from test_sort_index import test_changes_length_raises
```



---
## test_sort_values_key_type
```python
from test_sort_index import test_sort_values_key_type
```



---
## test_sort_index_multi_already_monotonic
```python
from test_sort_index import test_sort_index_multi_already_monotonic
```



---
## __name__
```python
from test_map import __name__
```



---
## test_series_map_box_timedelta
```python
from test_map import test_series_map_box_timedelta
```



---
## test_map_callable
```python
from test_map import test_map_callable
```



---
## test_map_same_length_inference_bug
```python
from test_map import test_map_same_length_inference_bug
```



---
## test_series_map_box_timestamps
```python
from test_map import test_series_map_box_timestamps
```



---
## test_map_series_stringdtype
```python
from test_map import test_map_series_stringdtype
```



---
## test_map_categorical_with_nan_values
```python
from test_map import test_map_categorical_with_nan_values
```



---
## test_map_empty_integer_series
```python
from test_map import test_map_empty_integer_series
```



---
## test_map_empty_integer_series_with_datetime_index
```python
from test_map import test_map_empty_integer_series_with_datetime_index
```



---
## test_map_simple_str_callables_same_as_astype
```python
from test_map import test_map_simple_str_callables_same_as_astype
```



---
## test_list_raises
```python
from test_map import test_list_raises
```



---
## test_map
```python
from test_map import test_map
```



---
## test_map_datetime
```python
from test_map import test_map_datetime
```



---
## test_map_category
```python
from test_map import test_map_category
```



---
## test_map_category_numeric
```python
from test_map import test_map_category_numeric
```



---
## test_map_category_string
```python
from test_map import test_map_category_string
```



---
## test_map_empty
```python
from test_map import test_map_empty
```



---
## test_map_compat
```python
from test_map import test_map_compat
```



---
## test_map_int
```python
from test_map import test_map_int
```



---
## test_map_type_inference
```python
from test_map import test_map_type_inference
```



---
## test_map_decimal
```python
from test_map import test_map_decimal
```



---
## test_map_na_exclusion
```python
from test_map import test_map_na_exclusion
```



---
## test_map_dict_with_tuple_keys
```python
from test_map import test_map_dict_with_tuple_keys
```

Due to new MultiIndex-ing behaviour in v0.14.0,
dicts with tuple keys passed to map were being
converted to a multi-index, preventing tuple values
from being mapped properly.

---
## test_map_counter
```python
from test_map import test_map_counter
```



---
## test_map_defaultdict
```python
from test_map import test_map_defaultdict
```



---
## test_map_dict_na_key
```python
from test_map import test_map_dict_na_key
```



---
## test_map_defaultdict_na_key
```python
from test_map import test_map_defaultdict_na_key
```



---
## test_map_defaultdict_missing_key
```python
from test_map import test_map_defaultdict_missing_key
```



---
## test_map_defaultdict_unmutated
```python
from test_map import test_map_defaultdict_unmutated
```



---
## test_map_dict_ignore_na
```python
from test_map import test_map_dict_ignore_na
```



---
## test_map_defaultdict_ignore_na
```python
from test_map import test_map_defaultdict_ignore_na
```



---
## test_map_categorical_na_ignore
```python
from test_map import test_map_categorical_na_ignore
```



---
## test_map_dict_subclass_with_missing
```python
from test_map import test_map_dict_subclass_with_missing
```

Test Series.map with a dictionary subclass that defines __missing__,
i.e. sets a default value (GH #15999).

---
## test_map_dict_subclass_without_missing
```python
from test_map import test_map_dict_subclass_without_missing
```



---
## test_map_abc_mapping
```python
from test_map import test_map_abc_mapping
```



---
## test_map_abc_mapping_with_missing
```python
from test_map import test_map_abc_mapping_with_missing
```



---
## test_map_box_dt64
```python
from test_map import test_map_box_dt64
```



---
## test_map_box_dt64tz
```python
from test_map import test_map_box_dt64tz
```



---
## test_map_box_td64
```python
from test_map import test_map_box_td64
```



---
## test_map_box_period
```python
from test_map import test_map_box_period
```



---
## test_map_categorical
```python
from test_map import test_map_categorical
```



---
## test_map_categorical_na_action
```python
from test_map import test_map_categorical_na_action
```



---
## test_map_datetimetz
```python
from test_map import test_map_datetimetz
```



---
## test_map_missing_mixed
```python
from test_map import test_map_missing_mixed
```



---
## test_map_scalar_on_date_time_index_aware_series
```python
from test_map import test_map_scalar_on_date_time_index_aware_series
```



---
## test_map_float_to_string_precision
```python
from test_map import test_map_float_to_string_precision
```



---
## test_map_to_timedelta
```python
from test_map import test_map_to_timedelta
```



---
## test_map_type
```python
from test_map import test_map_type
```



---
## f
```python
from test_map import f
```



---
## func
```python
from test_map import func
```



---
## DictWithMissing
```python
from test_map import DictWithMissing
```



---
## DictWithoutMissing
```python
from test_map import DictWithoutMissing
```



---
## NonDictMappingWithMissing
```python
from test_map import NonDictMappingWithMissing
```



---
## __missing__
```python
from test_map import __missing__
```



---
## __name__
```python
from test_drop import __name__
```



---
## test_drop_unique_and_non_unique_index
```python
from test_drop import test_drop_unique_and_non_unique_index
```



---
## test_drop_exception_raised
```python
from test_drop import test_drop_exception_raised
```



---
## test_drop_with_ignore_errors
```python
from test_drop import test_drop_with_ignore_errors
```



---
## test_drop_empty_list
```python
from test_drop import test_drop_empty_list
```



---
## test_drop_non_empty_list
```python
from test_drop import test_drop_non_empty_list
```



---
## test_drop_index_ea_dtype
```python
from test_drop import test_drop_index_ea_dtype
```



---
## __name__
```python
from test_is_unique import __name__
```



---
## test_is_unique
```python
from test_is_unique import test_is_unique
```



---
## test_is_unique_class_ne
```python
from test_is_unique import test_is_unique_class_ne
```



---
## Foo
```python
from test_is_unique import Foo
```



---
## __init__
```python
from test_is_unique import __init__
```



---
## __ne__
```python
from test_is_unique import __ne__
```



---
## __name__
```python
from test_item import __name__
```

Series.item method, mainly testing that we get python scalars as opposed to
numpy scalars.

---
## TestItem
```python
from test_item import TestItem
```



---
## test_item
```python
from test_item import test_item
```



---
## __name__
```python
from test_is_monotonic import __name__
```



---
## TestIsMonotonic
```python
from test_is_monotonic import TestIsMonotonic
```



---
## test_is_monotonic_numeric
```python
from test_is_monotonic import test_is_monotonic_numeric
```



---
## test_is_monotonic_dt64
```python
from test_is_monotonic import test_is_monotonic_dt64
```



---
## __name__
```python
from test_asof import __name__
```



---
## TestSeriesAsof
```python
from test_asof import TestSeriesAsof
```



---
## test_asof_nanosecond_index_access
```python
from test_asof import test_asof_nanosecond_index_access
```



---
## test_basic
```python
from test_asof import test_basic
```



---
## test_scalar
```python
from test_asof import test_scalar
```



---
## test_with_nan
```python
from test_asof import test_with_nan
```



---
## test_periodindex
```python
from test_asof import test_periodindex
```



---
## test_errors
```python
from test_asof import test_errors
```



---
## test_all_nans
```python
from test_asof import test_all_nans
```



---
## __name__
```python
from test_get_numeric_data import __name__
```



---
## TestGetNumericData
```python
from test_get_numeric_data import TestGetNumericData
```



---
## test_get_numeric_data_preserve_dtype
```python
from test_get_numeric_data import test_get_numeric_data_preserve_dtype
```



---
## __name__
```python
from test_compare import __name__
```



---
## test_compare_axis
```python
from test_compare import test_compare_axis
```



---
## test_compare_various_formats
```python
from test_compare import test_compare_various_formats
```



---
## test_compare_with_equal_nulls
```python
from test_compare import test_compare_with_equal_nulls
```



---
## test_compare_with_non_equal_nulls
```python
from test_compare import test_compare_with_non_equal_nulls
```



---
## test_compare_multi_index
```python
from test_compare import test_compare_multi_index
```



---
## test_compare_unaligned_objects
```python
from test_compare import test_compare_unaligned_objects
```



---
## test_compare_datetime64_and_string
```python
from test_compare import test_compare_datetime64_and_string
```



---
## __name__
```python
from test_to_dict import __name__
```



---
## TestSeriesToDict
```python
from test_to_dict import TestSeriesToDict
```



---
## test_to_dict
```python
from test_to_dict import test_to_dict
```



---
## test_to_dict_return_types
```python
from test_to_dict import test_to_dict_return_types
```



---
## __name__
```python
from test_rename_axis import __name__
```



---
## TestSeriesRenameAxis
```python
from test_rename_axis import TestSeriesRenameAxis
```



---
## test_rename_axis_mapper
```python
from test_rename_axis import test_rename_axis_mapper
```



---
## test_rename_axis_inplace
```python
from test_rename_axis import test_rename_axis_inplace
```



---
## test_rename_axis_none
```python
from test_rename_axis import test_rename_axis_none
```



---
## __name__
```python
from test_rank import __name__
```



---
## ser
```python
from test_rank import ser
```



---
## results
```python
from test_rank import results
```



---
## dtype
```python
from test_rank import dtype
```



---
## TestSeriesRank
```python
from test_rank import TestSeriesRank
```



---
## test_rank_dense_pct
```python
from test_rank import test_rank_dense_pct
```



---
## test_rank_min_pct
```python
from test_rank import test_rank_min_pct
```



---
## test_rank_max_pct
```python
from test_rank import test_rank_max_pct
```



---
## test_rank_average_pct
```python
from test_rank import test_rank_average_pct
```



---
## test_rank_first_pct
```python
from test_rank import test_rank_first_pct
```



---
## test_pct_max_many_rows
```python
from test_rank import test_pct_max_many_rows
```



---
## test_rank
```python
from test_rank import test_rank
```



---
## test_rank_categorical
```python
from test_rank import test_rank_categorical
```



---
## test_rank_signature
```python
from test_rank import test_rank_signature
```



---
## test_rank_tie_methods
```python
from test_rank import test_rank_tie_methods
```



---
## test_rank_tie_methods_on_infs_nans
```python
from test_rank import test_rank_tie_methods_on_infs_nans
```



---
## test_rank_desc_mix_nans_infs
```python
from test_rank import test_rank_desc_mix_nans_infs
```



---
## test_rank_methods_series
```python
from test_rank import test_rank_methods_series
```



---
## test_rank_dense_method
```python
from test_rank import test_rank_dense_method
```



---
## test_rank_descending
```python
from test_rank import test_rank_descending
```



---
## test_rank_int
```python
from test_rank import test_rank_int
```



---
## test_rank_object_bug
```python
from test_rank import test_rank_object_bug
```



---
## test_rank_modify_inplace
```python
from test_rank import test_rank_modify_inplace
```



---
## test_rank_ea_small_values
```python
from test_rank import test_rank_ea_small_values
```



---
## TestSeriesReplace
```python
from test_replace import TestSeriesReplace
```



---
## test_replace_explicit_none
```python
from test_replace import test_replace_explicit_none
```



---
## test_replace_noop_doesnt_downcast
```python
from test_replace import test_replace_noop_doesnt_downcast
```



---
## test_replace_nan_with_inf
```python
from test_replace import test_replace_nan_with_inf
```



---
## test_replace_listlike_value_listlike_target
```python
from test_replace import test_replace_listlike_value_listlike_target
```



---
## test_replace_gh5319
```python
from test_replace import test_replace_gh5319
```



---
## test_replace_datetime64
```python
from test_replace import test_replace_datetime64
```



---
## test_replace_nat_with_tz
```python
from test_replace import test_replace_nat_with_tz
```



---
## test_replace_timedelta_td64
```python
from test_replace import test_replace_timedelta_td64
```



---
## test_replace_with_single_list
```python
from test_replace import test_replace_with_single_list
```



---
## test_replace_mixed_types
```python
from test_replace import test_replace_mixed_types
```



---
## test_replace_bool_with_string_no_op
```python
from test_replace import test_replace_bool_with_string_no_op
```



---
## test_replace_bool_with_string
```python
from test_replace import test_replace_bool_with_string
```



---
## test_replace_bool_with_bool
```python
from test_replace import test_replace_bool_with_bool
```



---
## test_replace_with_dict_with_bool_keys
```python
from test_replace import test_replace_with_dict_with_bool_keys
```



---
## test_replace_Int_with_na
```python
from test_replace import test_replace_Int_with_na
```



---
## test_replace2
```python
from test_replace import test_replace2
```



---
## test_replace_cascade
```python
from test_replace import test_replace_cascade
```



---
## test_replace_with_dictlike_and_string_dtype
```python
from test_replace import test_replace_with_dictlike_and_string_dtype
```



---
## test_replace_with_empty_dictlike
```python
from test_replace import test_replace_with_empty_dictlike
```



---
## test_replace_string_with_number
```python
from test_replace import test_replace_string_with_number
```



---
## test_replace_replacer_equals_replacement
```python
from test_replace import test_replace_replacer_equals_replacement
```



---
## test_replace_unicode_with_number
```python
from test_replace import test_replace_unicode_with_number
```



---
## test_replace_mixed_types_with_string
```python
from test_replace import test_replace_mixed_types_with_string
```



---
## test_replace_categorical_single
```python
from test_replace import test_replace_categorical_single
```



---
## test_replace_with_no_overflowerror
```python
from test_replace import test_replace_with_no_overflowerror
```



---
## test_replace_commutative
```python
from test_replace import test_replace_commutative
```



---
## test_replace_no_cast
```python
from test_replace import test_replace_no_cast
```



---
## test_replace_invalid_to_replace
```python
from test_replace import test_replace_invalid_to_replace
```



---
## test_replace_nonbool_regex
```python
from test_replace import test_replace_nonbool_regex
```



---
## test_replace_empty_copy
```python
from test_replace import test_replace_empty_copy
```



---
## test_replace_only_one_dictlike_arg
```python
from test_replace import test_replace_only_one_dictlike_arg
```



---
## test_replace_extension_other
```python
from test_replace import test_replace_extension_other
```



---
## _check_replace_with_method
```python
from test_replace import _check_replace_with_method
```



---
## test_replace_ea_dtype_with_method
```python
from test_replace import test_replace_ea_dtype_with_method
```



---
## test_replace_interval_with_method
```python
from test_replace import test_replace_interval_with_method
```



---
## test_replace_datetimelike_with_method
```python
from test_replace import test_replace_datetimelike_with_method
```



---
## test_replace_with_compiled_regex
```python
from test_replace import test_replace_with_compiled_regex
```



---
## test_pandas_replace_na
```python
from test_replace import test_pandas_replace_na
```



---
## test_replace_dtype
```python
from test_replace import test_replace_dtype
```



---
## test_replace_string_dtype
```python
from test_replace import test_replace_string_dtype
```



---
## test_replace_string_dtype_list_to_replace
```python
from test_replace import test_replace_string_dtype_list_to_replace
```



---
## test_replace_string_dtype_regex
```python
from test_replace import test_replace_string_dtype_regex
```



---
## test_replace_nullable_numeric
```python
from test_replace import test_replace_nullable_numeric
```



---
## test_replace_regex_dtype_series
```python
from test_replace import test_replace_regex_dtype_series
```



---
## test_replace_different_int_types
```python
from test_replace import test_replace_different_int_types
```



---
## test_replace_value_none_dtype_numeric
```python
from test_replace import test_replace_value_none_dtype_numeric
```



---
## test_replace_change_dtype_series
```python
from test_replace import test_replace_change_dtype_series
```



---
## test_replace_na_in_obj_column
```python
from test_replace import test_replace_na_in_obj_column
```



---
## test_replace_numeric_column_with_na
```python
from test_replace import test_replace_numeric_column_with_na
```



---
## test_replace_ea_float_with_bool
```python
from test_replace import test_replace_ea_float_with_bool
```



---
## check_replace
```python
from test_replace import check_replace
```



---
## TestUnique
```python
from test_unique import TestUnique
```



---
## test_unique_uint64
```python
from test_unique import test_unique_uint64
```



---
## test_unique_data_ownership
```python
from test_unique import test_unique_data_ownership
```



---
## test_unique_nan_object_dtype
```python
from test_unique import test_unique_nan_object_dtype
```



---
## test_unique_none
```python
from test_unique import test_unique_none
```



---
## test_unique_categorical
```python
from test_unique import test_unique_categorical
```



---
## test_tz_unique
```python
from test_unique import test_tz_unique
```



---
## TestSeriesClip
```python
from test_clip import TestSeriesClip
```



---
## test_clip_types_and_nulls
```python
from test_clip import test_clip_types_and_nulls
```



---
## test_series_clipping_with_na_values
```python
from test_clip import test_series_clipping_with_na_values
```



---
## test_clip_with_na_args
```python
from test_clip import test_clip_with_na_args
```

Should process np.nan argument as None

---
## test_clip_against_series
```python
from test_clip import test_clip_against_series
```



---
## test_clip_against_list_like
```python
from test_clip import test_clip_against_list_like
```



---
## test_clip_with_datetimes
```python
from test_clip import test_clip_with_datetimes
```



---
## test_clip_with_timestamps_and_oob_datetimes
```python
from test_clip import test_clip_with_timestamps_and_oob_datetimes
```



---
## __name__
```python
from test_info import __name__
```



---
## test_info_categorical_column_just_works
```python
from test_info import test_info_categorical_column_just_works
```



---
## test_info_categorical
```python
from test_info import test_info_categorical
```



---
## test_info_series
```python
from test_info import test_info_series
```



---
## test_info_memory
```python
from test_info import test_info_memory
```



---
## test_info_wide
```python
from test_info import test_info_wide
```



---
## test_info_shows_dtypes
```python
from test_info import test_info_shows_dtypes
```



---
## test_info_memory_usage_deep_not_pypy
```python
from test_info import test_info_memory_usage_deep_not_pypy
```



---
## test_info_memory_usage_deep_pypy
```python
from test_info import test_info_memory_usage_deep_pypy
```



---
## test_info_memory_usage_qualified
```python
from test_info import test_info_memory_usage_qualified
```



---
## test_info_memory_usage_bug_on_multiindex
```python
from test_info import test_info_memory_usage_bug_on_multiindex
```



---
## TestSeriesDtypes
```python
from test_dtypes import TestSeriesDtypes
```



---
## test_dtype
```python
from test_dtypes import test_dtype
```



---
## __name__
```python
from test_isna import __name__
```

We also test Series.notna in this file.

---
## TestIsna
```python
from test_isna import TestIsna
```



---
## test_isna_period_dtype
```python
from test_isna import test_isna_period_dtype
```



---
## test_isna
```python
from test_isna import test_isna
```



---
## __name__
```python
from test_to_numpy import __name__
```



---
## test_to_numpy_na_value
```python
from test_to_numpy import test_to_numpy_na_value
```



---
## test_to_numpy_cast_before_setting_na
```python
from test_to_numpy import test_to_numpy_cast_before_setting_na
```



---
## test_to_numpy_arrow_dtype_given
```python
from test_to_numpy import test_to_numpy_arrow_dtype_given
```



---
## test_astype_ea_int_to_td_ts
```python
from test_to_numpy import test_astype_ea_int_to_td_ts
```



---
## __name__
```python
from test_interpolate import __name__
```



---
## nontemporal_method
```python
from test_interpolate import nontemporal_method
```

Fixture that returns an (method name, required kwargs) pair.

This fixture does not include method 'time' as a parameterization; that
method requires a Series with a DatetimeIndex, and is generally tested
separately from these non-temporal methods.

---
## interp_methods_ind
```python
from test_interpolate import interp_methods_ind
```

Fixture that returns a (method name, required kwargs) pair to
be tested for various Index types.

This fixture does not include methods - 'time', 'index', 'nearest',
'values' as a parameterization

---
## TestSeriesInterpolateData
```python
from test_interpolate import TestSeriesInterpolateData
```



---
## test_interpolate_period_values
```python
from test_interpolate import test_interpolate_period_values
```



---
## test_interpolate
```python
from test_interpolate import test_interpolate
```



---
## test_interpolate_time_raises_for_non_timeseries
```python
from test_interpolate import test_interpolate_time_raises_for_non_timeseries
```



---
## test_interpolate_cubicspline
```python
from test_interpolate import test_interpolate_cubicspline
```



---
## test_interpolate_pchip
```python
from test_interpolate import test_interpolate_pchip
```



---
## test_interpolate_akima
```python
from test_interpolate import test_interpolate_akima
```



---
## test_interpolate_piecewise_polynomial
```python
from test_interpolate import test_interpolate_piecewise_polynomial
```



---
## test_interpolate_from_derivatives
```python
from test_interpolate import test_interpolate_from_derivatives
```



---
## test_interpolate_corners
```python
from test_interpolate import test_interpolate_corners
```



---
## test_interpolate_index_values
```python
from test_interpolate import test_interpolate_index_values
```



---
## test_interpolate_non_ts
```python
from test_interpolate import test_interpolate_non_ts
```



---
## test_nan_interpolate
```python
from test_interpolate import test_nan_interpolate
```



---
## test_nan_irregular_index
```python
from test_interpolate import test_nan_irregular_index
```



---
## test_nan_str_index
```python
from test_interpolate import test_nan_str_index
```



---
## test_interp_quad
```python
from test_interpolate import test_interp_quad
```



---
## test_interp_scipy_basic
```python
from test_interpolate import test_interp_scipy_basic
```



---
## test_interp_limit
```python
from test_interpolate import test_interp_limit
```



---
## test_interpolate_invalid_nonpositive_limit
```python
from test_interpolate import test_interpolate_invalid_nonpositive_limit
```



---
## test_interpolate_invalid_float_limit
```python
from test_interpolate import test_interpolate_invalid_float_limit
```



---
## test_interp_invalid_method
```python
from test_interpolate import test_interp_invalid_method
```



---
## test_interp_invalid_method_and_value
```python
from test_interpolate import test_interp_invalid_method_and_value
```



---
## test_interp_limit_forward
```python
from test_interpolate import test_interp_limit_forward
```



---
## test_interp_unlimited
```python
from test_interpolate import test_interp_unlimited
```



---
## test_interp_limit_bad_direction
```python
from test_interpolate import test_interp_limit_bad_direction
```



---
## test_interp_limit_area
```python
from test_interpolate import test_interp_limit_area
```



---
## test_interp_limit_direction_raises
```python
from test_interpolate import test_interp_limit_direction_raises
```



---
## test_interp_limit_area_with_pad
```python
from test_interpolate import test_interp_limit_area_with_pad
```



---
## test_interp_limit_area_with_backfill
```python
from test_interpolate import test_interp_limit_area_with_backfill
```



---
## test_interp_limit_direction
```python
from test_interpolate import test_interp_limit_direction
```



---
## test_interp_limit_to_ends
```python
from test_interpolate import test_interp_limit_to_ends
```



---
## test_interp_limit_before_ends
```python
from test_interpolate import test_interp_limit_before_ends
```



---
## test_interp_all_good
```python
from test_interpolate import test_interp_all_good
```



---
## test_interp_multiIndex
```python
from test_interpolate import test_interp_multiIndex
```



---
## test_interp_nonmono_raise
```python
from test_interpolate import test_interp_nonmono_raise
```



---
## test_interp_datetime64
```python
from test_interpolate import test_interp_datetime64
```



---
## test_interp_pad_datetime64tz_values
```python
from test_interpolate import test_interp_pad_datetime64tz_values
```



---
## test_interp_limit_no_nans
```python
from test_interpolate import test_interp_limit_no_nans
```



---
## test_no_order
```python
from test_interpolate import test_no_order
```



---
## test_interpolate_spline_invalid_order
```python
from test_interpolate import test_interpolate_spline_invalid_order
```



---
## test_spline
```python
from test_interpolate import test_spline
```



---
## test_spline_extrapolate
```python
from test_interpolate import test_spline_extrapolate
```



---
## test_spline_smooth
```python
from test_interpolate import test_spline_smooth
```



---
## test_spline_interpolation
```python
from test_interpolate import test_spline_interpolation
```



---
## test_interp_timedelta64
```python
from test_interpolate import test_interp_timedelta64
```



---
## test_series_interpolate_method_values
```python
from test_interpolate import test_series_interpolate_method_values
```



---
## test_series_interpolate_intraday
```python
from test_interpolate import test_series_interpolate_intraday
```



---
## test_interp_non_timedelta_index
```python
from test_interpolate import test_interp_non_timedelta_index
```



---
## test_interpolate_timedelta_index
```python
from test_interpolate import test_interpolate_timedelta_index
```

Tests for non numerical index types  - object, period, timedelta
Note that all methods except time, index, nearest and values
are tested here.

---
## test_interpolate_unsorted_index
```python
from test_interpolate import test_interpolate_unsorted_index
```



---
## test_interpolate_asfreq_raises
```python
from test_interpolate import test_interpolate_asfreq_raises
```



---
## test_interpolate_fill_value
```python
from test_interpolate import test_interpolate_fill_value
```



---
## __name__
```python
from test_reindex import __name__
```



---
## test_reindex
```python
from test_reindex import test_reindex
```



---
## test_reindex_nan
```python
from test_reindex import test_reindex_nan
```



---
## test_reindex_series_add_nat
```python
from test_reindex import test_reindex_series_add_nat
```



---
## test_reindex_with_datetimes
```python
from test_reindex import test_reindex_with_datetimes
```



---
## test_reindex_corner
```python
from test_reindex import test_reindex_corner
```



---
## test_reindex_pad
```python
from test_reindex import test_reindex_pad
```



---
## test_reindex_pad2
```python
from test_reindex import test_reindex_pad2
```



---
## test_reindex_inference
```python
from test_reindex import test_reindex_inference
```



---
## test_reindex_downcasting
```python
from test_reindex import test_reindex_downcasting
```



---
## test_reindex_nearest
```python
from test_reindex import test_reindex_nearest
```



---
## test_reindex_int
```python
from test_reindex import test_reindex_int
```



---
## test_reindex_bool
```python
from test_reindex import test_reindex_bool
```



---
## test_reindex_bool_pad
```python
from test_reindex import test_reindex_bool_pad
```



---
## test_reindex_categorical
```python
from test_reindex import test_reindex_categorical
```



---
## test_reindex_astype_order_consistency
```python
from test_reindex import test_reindex_astype_order_consistency
```



---
## test_reindex_fill_value
```python
from test_reindex import test_reindex_fill_value
```



---
## test_reindex_fill_value_datetimelike_upcast
```python
from test_reindex import test_reindex_fill_value_datetimelike_upcast
```



---
## test_reindex_datetimeindexes_tz_naive_and_aware
```python
from test_reindex import test_reindex_datetimeindexes_tz_naive_and_aware
```



---
## test_reindex_empty_series_tz_dtype
```python
from test_reindex import test_reindex_empty_series_tz_dtype
```



---
## test_reindex_periodindex_with_object
```python
from test_reindex import test_reindex_periodindex_with_object
```



---
## test_reindex_too_many_args
```python
from test_reindex import test_reindex_too_many_args
```



---
## test_reindex_double_index
```python
from test_reindex import test_reindex_double_index
```



---
## test_reindex_no_posargs
```python
from test_reindex import test_reindex_no_posargs
```



---
## test_reindex_empty_with_level
```python
from test_reindex import test_reindex_empty_with_level
```



---
## test_reindex_missing_category
```python
from test_reindex import test_reindex_missing_category
```



---
## test_reindexing_with_float64_NA_log
```python
from test_reindex import test_reindexing_with_float64_NA_log
```



---
## test_reindex_expand_nonnano_nat
```python
from test_reindex import test_reindex_expand_nonnano_nat
```



---
## __name__
```python
from test_to_csv import __name__
```



---
## TestSeriesToCSV
```python
from test_to_csv import TestSeriesToCSV
```



---
## read_csv
```python
from test_to_csv import read_csv
```



---
## test_from_csv
```python
from test_to_csv import test_from_csv
```



---
## test_to_csv
```python
from test_to_csv import test_to_csv
```



---
## test_to_csv_unicode_index
```python
from test_to_csv import test_to_csv_unicode_index
```



---
## test_to_csv_float_format
```python
from test_to_csv import test_to_csv_float_format
```



---
## test_to_csv_list_entries
```python
from test_to_csv import test_to_csv_list_entries
```



---
## test_to_csv_path_is_none
```python
from test_to_csv import test_to_csv_path_is_none
```



---
## test_to_csv_compression
```python
from test_to_csv import test_to_csv_compression
```



---
## test_to_csv_interval_index
```python
from test_to_csv import test_to_csv_interval_index
```



---
## __name__
```python
from test_dt_accessor import __name__
```



---
## get_dir
```python
from test_dt_accessor import get_dir
```



---
## TestSeriesDatetimeValues
```python
from test_dt_accessor import TestSeriesDatetimeValues
```



---
## TestSeriesPeriodValuesDtAccessor
```python
from test_dt_accessor import TestSeriesPeriodValuesDtAccessor
```



---
## test_normalize_pre_epoch_dates
```python
from test_dt_accessor import test_normalize_pre_epoch_dates
```



---
## test_day_attribute_non_nano_beyond_int32
```python
from test_dt_accessor import test_day_attribute_non_nano_beyond_int32
```



---
## _compare
```python
from test_dt_accessor import _compare
```



---
## test_dt_namespace_accessor_datetime64
```python
from test_dt_accessor import test_dt_namespace_accessor_datetime64
```



---
## test_dt_namespace_accessor_datetime64tz
```python
from test_dt_accessor import test_dt_namespace_accessor_datetime64tz
```



---
## test_dt_namespace_accessor_timedelta
```python
from test_dt_accessor import test_dt_namespace_accessor_timedelta
```



---
## test_dt_namespace_accessor_period
```python
from test_dt_accessor import test_dt_namespace_accessor_period
```



---
## test_dt_namespace_accessor_index_and_values
```python
from test_dt_accessor import test_dt_namespace_accessor_index_and_values
```



---
## test_dt_accessor_limited_display_api
```python
from test_dt_accessor import test_dt_accessor_limited_display_api
```



---
## test_dt_accessor_ambiguous_freq_conversions
```python
from test_dt_accessor import test_dt_accessor_ambiguous_freq_conversions
```



---
## test_dt_accessor_not_writeable
```python
from test_dt_accessor import test_dt_accessor_not_writeable
```



---
## test_dt_round
```python
from test_dt_accessor import test_dt_round
```



---
## test_dt_round_tz
```python
from test_dt_accessor import test_dt_round_tz
```



---
## test_dt_round_tz_ambiguous
```python
from test_dt_accessor import test_dt_round_tz_ambiguous
```



---
## test_dt_round_tz_nonexistent
```python
from test_dt_accessor import test_dt_round_tz_nonexistent
```



---
## test_dt_round_nonnano_higher_resolution_no_op
```python
from test_dt_accessor import test_dt_round_nonnano_higher_resolution_no_op
```



---
## test_dt_namespace_accessor_categorical
```python
from test_dt_accessor import test_dt_namespace_accessor_categorical
```



---
## test_dt_tz_localize_categorical
```python
from test_dt_accessor import test_dt_tz_localize_categorical
```



---
## test_dt_tz_convert_categorical
```python
from test_dt_accessor import test_dt_tz_convert_categorical
```



---
## test_dt_other_accessors_categorical
```python
from test_dt_accessor import test_dt_other_accessors_categorical
```



---
## test_dt_accessor_no_new_attributes
```python
from test_dt_accessor import test_dt_accessor_no_new_attributes
```



---
## test_dt_accessor_datetime_name_accessors
```python
from test_dt_accessor import test_dt_accessor_datetime_name_accessors
```



---
## test_strftime
```python
from test_dt_accessor import test_strftime
```



---
## test_strftime_dt64_days
```python
from test_dt_accessor import test_strftime_dt64_days
```



---
## test_strftime_period_days
```python
from test_dt_accessor import test_strftime_period_days
```



---
## test_strftime_dt64_microsecond_resolution
```python
from test_dt_accessor import test_strftime_dt64_microsecond_resolution
```



---
## test_strftime_period_hours
```python
from test_dt_accessor import test_strftime_period_hours
```



---
## test_strftime_period_minutes
```python
from test_dt_accessor import test_strftime_period_minutes
```



---
## test_strftime_nat
```python
from test_dt_accessor import test_strftime_nat
```



---
## test_strftime_all_nat
```python
from test_dt_accessor import test_strftime_all_nat
```



---
## test_valid_dt_with_missing_values
```python
from test_dt_accessor import test_valid_dt_with_missing_values
```



---
## test_dt_accessor_api
```python
from test_dt_accessor import test_dt_accessor_api
```



---
## test_dt_accessor_invalid
```python
from test_dt_accessor import test_dt_accessor_invalid
```



---
## test_dt_accessor_updates_on_inplace
```python
from test_dt_accessor import test_dt_accessor_updates_on_inplace
```



---
## test_date_tz
```python
from test_dt_accessor import test_date_tz
```



---
## test_dt_timetz_accessor
```python
from test_dt_accessor import test_dt_timetz_accessor
```



---
## test_isocalendar
```python
from test_dt_accessor import test_isocalendar
```



---
## test_hour_index
```python
from test_dt_accessor import test_hour_index
```



---
## test_end_time_timevalues
```python
from test_dt_accessor import test_end_time_timevalues
```



---
## test_to_period
```python
from test_dt_accessor import test_to_period
```



---
## get_expected
```python
from test_dt_accessor import get_expected
```



---
## __name__
```python
from test_str_accessor import __name__
```



---
## TestStrAccessor
```python
from test_str_accessor import TestStrAccessor
```



---
## test_str_attribute
```python
from test_str_accessor import test_str_attribute
```



---
## test_str_accessor_updates_on_inplace
```python
from test_str_accessor import test_str_accessor_updates_on_inplace
```



---
## __name__
```python
from test_list_accessor import __name__
```



---
## test_list_getitem
```python
from test_list_accessor import test_list_getitem
```



---
## test_list_getitem_slice
```python
from test_list_accessor import test_list_getitem_slice
```



---
## test_list_len
```python
from test_list_accessor import test_list_len
```



---
## test_list_flatten
```python
from test_list_accessor import test_list_flatten
```



---
## test_list_getitem_slice_invalid
```python
from test_list_accessor import test_list_getitem_slice_invalid
```



---
## test_list_accessor_non_list_dtype
```python
from test_list_accessor import test_list_accessor_non_list_dtype
```



---
## test_list_getitem_invalid_index
```python
from test_list_accessor import test_list_getitem_invalid_index
```



---
## test_list_accessor_not_iterable
```python
from test_list_accessor import test_list_accessor_not_iterable
```



---
## __name__
```python
from test_cat_accessor import __name__
```



---
## TestCatAccessor
```python
from test_cat_accessor import TestCatAccessor
```



---
## test_getname_categorical_accessor
```python
from test_cat_accessor import test_getname_categorical_accessor
```



---
## test_cat_accessor
```python
from test_cat_accessor import test_cat_accessor
```



---
## test_cat_accessor_api
```python
from test_cat_accessor import test_cat_accessor_api
```



---
## test_cat_accessor_no_new_attributes
```python
from test_cat_accessor import test_cat_accessor_no_new_attributes
```



---
## test_categorical_delegations
```python
from test_cat_accessor import test_categorical_delegations
```



---
## test_dt_accessor_api_for_categorical
```python
from test_cat_accessor import test_dt_accessor_api_for_categorical
```



---
## test_dt_accessor_api_for_categorical_invalid
```python
from test_cat_accessor import test_dt_accessor_api_for_categorical_invalid
```



---
## test_set_categories_setitem
```python
from test_cat_accessor import test_set_categories_setitem
```



---
## test_categorical_of_booleans_is_boolean
```python
from test_cat_accessor import test_categorical_of_booleans_is_boolean
```



---
## __name__
```python
from test_sparse_accessor import __name__
```



---
## TestSparseAccessor
```python
from test_sparse_accessor import TestSparseAccessor
```



---
## test_sparse_accessor_updates_on_inplace
```python
from test_sparse_accessor import test_sparse_accessor_updates_on_inplace
```



---
## __name__
```python
from test_struct_accessor import __name__
```



---
## test_struct_accessor_dtypes
```python
from test_struct_accessor import test_struct_accessor_dtypes
```



---
## test_struct_accessor_field
```python
from test_struct_accessor import test_struct_accessor_field
```



---
## test_struct_accessor_field_with_invalid_name_or_index
```python
from test_struct_accessor import test_struct_accessor_field_with_invalid_name_or_index
```



---
## test_struct_accessor_explode
```python
from test_struct_accessor import test_struct_accessor_explode
```



---
## test_struct_accessor_api_for_invalid
```python
from test_struct_accessor import test_struct_accessor_api_for_invalid
```



---
## test_struct_accessor_field_expanded
```python
from test_struct_accessor import test_struct_accessor_field_expanded
```



---
## __name__
```python
from test_set_value import __name__
```



---
## test_series_set_value
```python
from test_set_value import test_series_set_value
```



---
## test_set_value_dt64
```python
from test_set_value import test_set_value_dt64
```



---
## test_set_value_str_index
```python
from test_set_value import test_set_value_str_index
```



---
## __name__
```python
from test_mask import __name__
```

Tests for DataFrame.mask; tests DataFrame.where as a side-effect.

---
## test_mask
```python
from test_mask import test_mask
```



---
## test_mask_casts
```python
from test_mask import test_mask_casts
```



---
## test_mask_casts2
```python
from test_mask import test_mask_casts2
```



---
## test_mask_inplace
```python
from test_mask import test_mask_inplace
```



---
## __name__
```python
from test_xs import __name__
```



---
## test_xs_datetimelike_wrapping
```python
from test_xs import test_xs_datetimelike_wrapping
```



---
## TestXSWithMultiIndex
```python
from test_xs import TestXSWithMultiIndex
```



---
## test_xs_level_series
```python
from test_xs import test_xs_level_series
```



---
## test_series_getitem_multiindex_xs_by_label
```python
from test_xs import test_series_getitem_multiindex_xs_by_label
```



---
## test_series_getitem_multiindex_xs
```python
from test_xs import test_series_getitem_multiindex_xs
```



---
## test_series_xs_droplevel_false
```python
from test_xs import test_series_xs_droplevel_false
```



---
## test_xs_key_as_list
```python
from test_xs import test_xs_key_as_list
```



---
## __name__
```python
from test_getitem import __name__
```



---
## TestSeriesGetitemScalars
```python
from test_getitem import TestSeriesGetitemScalars
```



---
## TestSeriesGetitemSlices
```python
from test_getitem import TestSeriesGetitemSlices
```



---
## TestSeriesGetitemListLike
```python
from test_getitem import TestSeriesGetitemListLike
```



---
## TestGetitemBooleanMask
```python
from test_getitem import TestGetitemBooleanMask
```



---
## TestGetitemCallable
```python
from test_getitem import TestGetitemCallable
```



---
## test_getitem_generator
```python
from test_getitem import test_getitem_generator
```



---
## test_getitem_ndim_deprecated
```python
from test_getitem import test_getitem_ndim_deprecated
```



---
## test_getitem_multilevel_scalar_slice_not_implemented
```python
from test_getitem import test_getitem_multilevel_scalar_slice_not_implemented
```



---
## test_getitem_dataframe_raises
```python
from test_getitem import test_getitem_dataframe_raises
```



---
## test_getitem_assignment_series_alignment
```python
from test_getitem import test_getitem_assignment_series_alignment
```



---
## test_getitem_duplicate_index_mistyped_key_raises_keyerror
```python
from test_getitem import test_getitem_duplicate_index_mistyped_key_raises_keyerror
```



---
## test_getitem_1tuple_slice_without_multiindex
```python
from test_getitem import test_getitem_1tuple_slice_without_multiindex
```



---
## test_getitem_preserve_name
```python
from test_getitem import test_getitem_preserve_name
```



---
## test_getitem_with_integer_labels
```python
from test_getitem import test_getitem_with_integer_labels
```



---
## test_getitem_missing
```python
from test_getitem import test_getitem_missing
```



---
## test_getitem_fancy
```python
from test_getitem import test_getitem_fancy
```



---
## test_getitem_box_float64
```python
from test_getitem import test_getitem_box_float64
```



---
## test_getitem_unordered_dup
```python
from test_getitem import test_getitem_unordered_dup
```



---
## test_getitem_dups
```python
from test_getitem import test_getitem_dups
```



---
## test_getitem_categorical_str
```python
from test_getitem import test_getitem_categorical_str
```



---
## test_slice_can_reorder_not_uniquely_indexed
```python
from test_getitem import test_slice_can_reorder_not_uniquely_indexed
```



---
## test_duplicated_index_getitem_positional_indexer
```python
from test_getitem import test_duplicated_index_getitem_positional_indexer
```



---
## TestGetitemDeprecatedIndexers
```python
from test_getitem import TestGetitemDeprecatedIndexers
```



---
## test_getitem_object_index_float_string
```python
from test_getitem import test_getitem_object_index_float_string
```



---
## test_getitem_float_keys_tuple_values
```python
from test_getitem import test_getitem_float_keys_tuple_values
```



---
## test_getitem_unrecognized_scalar
```python
from test_getitem import test_getitem_unrecognized_scalar
```



---
## test_getitem_negative_out_of_bounds
```python
from test_getitem import test_getitem_negative_out_of_bounds
```



---
## test_getitem_out_of_bounds_indexerror
```python
from test_getitem import test_getitem_out_of_bounds_indexerror
```



---
## test_getitem_out_of_bounds_empty_rangeindex_keyerror
```python
from test_getitem import test_getitem_out_of_bounds_empty_rangeindex_keyerror
```



---
## test_getitem_keyerror_with_integer_index
```python
from test_getitem import test_getitem_keyerror_with_integer_index
```



---
## test_getitem_int64
```python
from test_getitem import test_getitem_int64
```



---
## test_getitem_full_range
```python
from test_getitem import test_getitem_full_range
```



---
## test_getitem_pydatetime_tz
```python
from test_getitem import test_getitem_pydatetime_tz
```



---
## test_string_index_alias_tz_aware
```python
from test_getitem import test_string_index_alias_tz_aware
```



---
## test_getitem_time_object
```python
from test_getitem import test_getitem_time_object
```



---
## test_getitem_scalar_categorical_index
```python
from test_getitem import test_getitem_scalar_categorical_index
```



---
## test_getitem_numeric_categorical_listlike_matches_scalar
```python
from test_getitem import test_getitem_numeric_categorical_listlike_matches_scalar
```



---
## test_getitem_integer_categorical_not_positional
```python
from test_getitem import test_getitem_integer_categorical_not_positional
```



---
## test_getitem_str_with_timedeltaindex
```python
from test_getitem import test_getitem_str_with_timedeltaindex
```



---
## test_getitem_bool_index_positional
```python
from test_getitem import test_getitem_bool_index_positional
```



---
## test_getitem_partial_str_slice_with_datetimeindex
```python
from test_getitem import test_getitem_partial_str_slice_with_datetimeindex
```



---
## test_getitem_slice_strings_with_datetimeindex
```python
from test_getitem import test_getitem_slice_strings_with_datetimeindex
```



---
## test_getitem_partial_str_slice_with_timedeltaindex
```python
from test_getitem import test_getitem_partial_str_slice_with_timedeltaindex
```



---
## test_getitem_partial_str_slice_high_reso_with_timedeltaindex
```python
from test_getitem import test_getitem_partial_str_slice_high_reso_with_timedeltaindex
```



---
## test_getitem_slice_2d
```python
from test_getitem import test_getitem_slice_2d
```



---
## test_getitem_median_slice_bug
```python
from test_getitem import test_getitem_median_slice_bug
```



---
## test_getitem_slice_date
```python
from test_getitem import test_getitem_slice_date
```



---
## test_getitem_slice_float_raises
```python
from test_getitem import test_getitem_slice_float_raises
```



---
## test_getitem_slice_bug
```python
from test_getitem import test_getitem_slice_bug
```



---
## test_getitem_slice_integers
```python
from test_getitem import test_getitem_slice_integers
```



---
## test_getitem_no_matches
```python
from test_getitem import test_getitem_no_matches
```



---
## test_getitem_intlist_intindex_periodvalues
```python
from test_getitem import test_getitem_intlist_intindex_periodvalues
```



---
## test_getitem_intlist_intervalindex_non_int
```python
from test_getitem import test_getitem_intlist_intervalindex_non_int
```



---
## test_getitem_intlist_multiindex_numeric_level
```python
from test_getitem import test_getitem_intlist_multiindex_numeric_level
```



---
## test_getitem_uint_array_key
```python
from test_getitem import test_getitem_uint_array_key
```



---
## test_getitem_boolean
```python
from test_getitem import test_getitem_boolean
```



---
## test_getitem_boolean_empty
```python
from test_getitem import test_getitem_boolean_empty
```



---
## test_getitem_boolean_object
```python
from test_getitem import test_getitem_boolean_object
```



---
## test_getitem_boolean_dt64_copies
```python
from test_getitem import test_getitem_boolean_dt64_copies
```



---
## test_getitem_boolean_corner
```python
from test_getitem import test_getitem_boolean_corner
```



---
## test_getitem_boolean_different_order
```python
from test_getitem import test_getitem_boolean_different_order
```



---
## test_getitem_boolean_contiguous_preserve_freq
```python
from test_getitem import test_getitem_boolean_contiguous_preserve_freq
```



---
## test_getitem_callable
```python
from test_getitem import test_getitem_callable
```



---
## test_getitem_dict_and_set_deprecated
```python
from test_getitem import test_getitem_dict_and_set_deprecated
```



---
## test_setitem_dict_and_set_disallowed
```python
from test_getitem import test_setitem_dict_and_set_disallowed
```



---
## TestSetitemDT64Values
```python
from test_setitem import TestSetitemDT64Values
```



---
## TestSetitemScalarIndexer
```python
from test_setitem import TestSetitemScalarIndexer
```



---
## TestSetitemSlices
```python
from test_setitem import TestSetitemSlices
```



---
## TestSetitemBooleanMask
```python
from test_setitem import TestSetitemBooleanMask
```



---
## TestSetitemViewCopySemantics
```python
from test_setitem import TestSetitemViewCopySemantics
```



---
## TestSetitemCallable
```python
from test_setitem import TestSetitemCallable
```



---
## TestSetitemWithExpansion
```python
from test_setitem import TestSetitemWithExpansion
```



---
## test_setitem_scalar_into_readonly_backing_data
```python
from test_setitem import test_setitem_scalar_into_readonly_backing_data
```



---
## test_setitem_slice_into_readonly_backing_data
```python
from test_setitem import test_setitem_slice_into_readonly_backing_data
```



---
## test_setitem_categorical_assigning_ops
```python
from test_setitem import test_setitem_categorical_assigning_ops
```



---
## test_setitem_nan_into_categorical
```python
from test_setitem import test_setitem_nan_into_categorical
```



---
## TestSetitemCasting
```python
from test_setitem import TestSetitemCasting
```



---
## SetitemCastingEquivalents
```python
from test_setitem import SetitemCastingEquivalents
```

Check each of several methods that _should_ be equivalent to `obj[key] = val`

We assume that
    - obj.index is the default Index(range(len(obj)))
    - the setitem does not expand the obj

---
## TestSetitemCastingEquivalents
```python
from test_setitem import TestSetitemCastingEquivalents
```



---
## TestSetitemTimedelta64IntoNumeric
```python
from test_setitem import TestSetitemTimedelta64IntoNumeric
```



---
## TestSetitemDT64IntoInt
```python
from test_setitem import TestSetitemDT64IntoInt
```



---
## TestSetitemNAPeriodDtype
```python
from test_setitem import TestSetitemNAPeriodDtype
```



---
## TestSetitemNADatetimeLikeDtype
```python
from test_setitem import TestSetitemNADatetimeLikeDtype
```



---
## TestSetitemMismatchedTZCastsToObject
```python
from test_setitem import TestSetitemMismatchedTZCastsToObject
```



---
## TestSeriesNoneCoercion
```python
from test_setitem import TestSeriesNoneCoercion
```



---
## TestSetitemFloatIntervalWithIntIntervalValues
```python
from test_setitem import TestSetitemFloatIntervalWithIntIntervalValues
```



---
## TestSetitemRangeIntoIntegerSeries
```python
from test_setitem import TestSetitemRangeIntoIntegerSeries
```



---
## TestSetitemFloatNDarrayIntoIntegerSeries
```python
from test_setitem import TestSetitemFloatNDarrayIntoIntegerSeries
```



---
## TestSetitemIntoIntegerSeriesNeedsUpcast
```python
from test_setitem import TestSetitemIntoIntegerSeriesNeedsUpcast
```



---
## TestSmallIntegerSetitemUpcast
```python
from test_setitem import TestSmallIntegerSetitemUpcast
```



---
## CoercionTest
```python
from test_setitem import CoercionTest
```



---
## TestCoercionInt8
```python
from test_setitem import TestCoercionInt8
```



---
## TestCoercionObject
```python
from test_setitem import TestCoercionObject
```



---
## TestCoercionComplex
```python
from test_setitem import TestCoercionComplex
```



---
## TestCoercionBool
```python
from test_setitem import TestCoercionBool
```



---
## TestCoercionInt64
```python
from test_setitem import TestCoercionInt64
```



---
## TestCoercionFloat64
```python
from test_setitem import TestCoercionFloat64
```



---
## TestCoercionFloat32
```python
from test_setitem import TestCoercionFloat32
```



---
## TestCoercionDatetime64
```python
from test_setitem import TestCoercionDatetime64
```



---
## TestCoercionDatetime64TZ
```python
from test_setitem import TestCoercionDatetime64TZ
```



---
## TestCoercionTimedelta64
```python
from test_setitem import TestCoercionTimedelta64
```



---
## TestPeriodIntervalCoercion
```python
from test_setitem import TestPeriodIntervalCoercion
```



---
## test_20643
```python
from test_setitem import test_20643
```



---
## test_20643_comment
```python
from test_setitem import test_20643_comment
```



---
## test_15413
```python
from test_setitem import test_15413
```



---
## test_32878_int_itemsize
```python
from test_setitem import test_32878_int_itemsize
```



---
## test_32878_complex_itemsize
```python
from test_setitem import test_32878_complex_itemsize
```



---
## test_37692
```python
from test_setitem import test_37692
```



---
## test_setitem_bool_int_float_consistency
```python
from test_setitem import test_setitem_bool_int_float_consistency
```



---
## test_setitem_positional_with_casting
```python
from test_setitem import test_setitem_positional_with_casting
```



---
## test_setitem_positional_float_into_int_coerces
```python
from test_setitem import test_setitem_positional_float_into_int_coerces
```



---
## test_setitem_int_not_positional
```python
from test_setitem import test_setitem_int_not_positional
```



---
## test_setitem_with_bool_indexer
```python
from test_setitem import test_setitem_with_bool_indexer
```



---
## test_setitem_bool_indexer_dont_broadcast_length1_values
```python
from test_setitem import test_setitem_bool_indexer_dont_broadcast_length1_values
```



---
## test_setitem_empty_mask_dont_upcast_dt64
```python
from test_setitem import test_setitem_empty_mask_dont_upcast_dt64
```



---
## test_setitem_none_nan
```python
from test_setitem import test_setitem_none_nan
```



---
## test_setitem_multiindex_empty_slice
```python
from test_setitem import test_setitem_multiindex_empty_slice
```



---
## test_setitem_with_string_index
```python
from test_setitem import test_setitem_with_string_index
```



---
## test_setitem_tuple_with_datetimetz_values
```python
from test_setitem import test_setitem_tuple_with_datetimetz_values
```



---
## test_setitem_with_tz
```python
from test_setitem import test_setitem_with_tz
```



---
## test_setitem_with_tz_dst
```python
from test_setitem import test_setitem_with_tz_dst
```



---
## test_object_series_setitem_dt64array_exact_match
```python
from test_setitem import test_object_series_setitem_dt64array_exact_match
```



---
## test_setitem_negative_out_of_bounds
```python
from test_setitem import test_setitem_negative_out_of_bounds
```



---
## test_setitem_series_object_dtype
```python
from test_setitem import test_setitem_series_object_dtype
```



---
## test_setitem_series
```python
from test_setitem import test_setitem_series
```



---
## test_setitem_slice_float_raises
```python
from test_setitem import test_setitem_slice_float_raises
```



---
## test_setitem_slice
```python
from test_setitem import test_setitem_slice
```



---
## test_setitem_slice_integers
```python
from test_setitem import test_setitem_slice_integers
```



---
## test_setitem_slicestep
```python
from test_setitem import test_setitem_slicestep
```



---
## test_setitem_multiindex_slice
```python
from test_setitem import test_setitem_multiindex_slice
```



---
## test_setitem_mask_cast
```python
from test_setitem import test_setitem_mask_cast
```



---
## test_setitem_mask_align_and_promote
```python
from test_setitem import test_setitem_mask_align_and_promote
```



---
## test_setitem_mask_promote_strs
```python
from test_setitem import test_setitem_mask_promote_strs
```



---
## test_setitem_mask_promote
```python
from test_setitem import test_setitem_mask_promote
```



---
## test_setitem_boolean
```python
from test_setitem import test_setitem_boolean
```



---
## test_setitem_boolean_corner
```python
from test_setitem import test_setitem_boolean_corner
```



---
## test_setitem_boolean_different_order
```python
from test_setitem import test_setitem_boolean_different_order
```



---
## test_setitem_boolean_python_list
```python
from test_setitem import test_setitem_boolean_python_list
```



---
## test_setitem_boolean_nullable_int_types
```python
from test_setitem import test_setitem_boolean_nullable_int_types
```



---
## test_setitem_with_bool_mask_and_values_matching_n_trues_in_length
```python
from test_setitem import test_setitem_with_bool_mask_and_values_matching_n_trues_in_length
```



---
## test_setitem_nan_with_bool
```python
from test_setitem import test_setitem_nan_with_bool
```



---
## test_setitem_mask_smallint_upcast
```python
from test_setitem import test_setitem_mask_smallint_upcast
```



---
## test_setitem_mask_smallint_no_upcast
```python
from test_setitem import test_setitem_mask_smallint_no_upcast
```



---
## test_setitem_invalidates_datetime_index_freq
```python
from test_setitem import test_setitem_invalidates_datetime_index_freq
```



---
## test_dt64tz_setitem_does_not_mutate_dti
```python
from test_setitem import test_dt64tz_setitem_does_not_mutate_dti
```



---
## test_setitem_callable_key
```python
from test_setitem import test_setitem_callable_key
```



---
## test_setitem_callable_other
```python
from test_setitem import test_setitem_callable_other
```



---
## test_setitem_empty_series
```python
from test_setitem import test_setitem_empty_series
```



---
## test_setitem_empty_series_datetimeindex_preserves_freq
```python
from test_setitem import test_setitem_empty_series_datetimeindex_preserves_freq
```



---
## test_setitem_empty_series_timestamp_preserves_dtype
```python
from test_setitem import test_setitem_empty_series_timestamp_preserves_dtype
```



---
## test_append_timedelta_does_not_cast
```python
from test_setitem import test_append_timedelta_does_not_cast
```



---
## test_setitem_with_expansion_type_promotion
```python
from test_setitem import test_setitem_with_expansion_type_promotion
```



---
## test_setitem_not_contained
```python
from test_setitem import test_setitem_not_contained
```



---
## test_setitem_keep_precision
```python
from test_setitem import test_setitem_keep_precision
```



---
## test_setitem_enlarge_with_na
```python
from test_setitem import test_setitem_enlarge_with_na
```



---
## test_setitem_enlargement_object_none
```python
from test_setitem import test_setitem_enlargement_object_none
```



---
## test_setitem_non_bool_into_bool
```python
from test_setitem import test_setitem_non_bool_into_bool
```



---
## test_setitem_boolean_array_into_npbool
```python
from test_setitem import test_setitem_boolean_array_into_npbool
```



---
## is_inplace
```python
from test_setitem import is_inplace
```



---
## check_indexer
```python
from test_setitem import check_indexer
```



---
## _check_inplace
```python
from test_setitem import _check_inplace
```



---
## test_int_key
```python
from test_setitem import test_int_key
```



---
## test_slice_key
```python
from test_setitem import test_slice_key
```



---
## test_mask_key
```python
from test_setitem import test_mask_key
```



---
## test_series_where
```python
from test_setitem import test_series_where
```



---
## test_index_where
```python
from test_setitem import test_index_where
```



---
## test_index_putmask
```python
from test_setitem import test_index_putmask
```



---
## val
```python
from test_setitem import val
```



---
## dtype
```python
from test_setitem import dtype
```



---
## obj
```python
from test_setitem import obj
```



---
## expected
```python
from test_setitem import expected
```



---
## key
```python
from test_setitem import key
```



---
## warn
```python
from test_setitem import warn
```



---
## scalar
```python
from test_setitem import scalar
```



---
## test_setitem_example
```python
from test_setitem import test_setitem_example
```



---
## test_basic_indexing
```python
from test_indexing import test_basic_indexing
```



---
## test_getitem_numeric_should_not_fallback_to_positional
```python
from test_indexing import test_getitem_numeric_should_not_fallback_to_positional
```



---
## test_setitem_numeric_should_not_fallback_to_positional
```python
from test_indexing import test_setitem_numeric_should_not_fallback_to_positional
```



---
## test_basic_getitem_with_labels
```python
from test_indexing import test_basic_getitem_with_labels
```



---
## test_basic_getitem_dt64tz_values
```python
from test_indexing import test_basic_getitem_dt64tz_values
```



---
## test_getitem_setitem_ellipsis
```python
from test_indexing import test_getitem_setitem_ellipsis
```



---
## test_getitem_with_duplicates_indices
```python
from test_indexing import test_getitem_with_duplicates_indices
```



---
## test_getitem_setitem_integers
```python
from test_indexing import test_getitem_setitem_integers
```



---
## test_series_box_timestamp
```python
from test_indexing import test_series_box_timestamp
```



---
## test_series_box_timedelta
```python
from test_indexing import test_series_box_timedelta
```



---
## test_getitem_ambiguous_keyerror
```python
from test_indexing import test_getitem_ambiguous_keyerror
```



---
## test_getitem_dups_with_missing
```python
from test_indexing import test_getitem_dups_with_missing
```



---
## test_setitem_ambiguous_keyerror
```python
from test_indexing import test_setitem_ambiguous_keyerror
```



---
## test_setslice
```python
from test_indexing import test_setslice
```



---
## test_basic_getitem_setitem_corner
```python
from test_indexing import test_basic_getitem_setitem_corner
```



---
## test_timedelta_assignment
```python
from test_indexing import test_timedelta_assignment
```



---
## test_underlying_data_conversion
```python
from test_indexing import test_underlying_data_conversion
```



---
## test_preserve_refs
```python
from test_indexing import test_preserve_refs
```



---
## test_multilevel_preserve_name
```python
from test_indexing import test_multilevel_preserve_name
```



---
## test_slice_with_negative_step
```python
from test_indexing import test_slice_with_negative_step
```



---
## test_tuple_index
```python
from test_indexing import test_tuple_index
```



---
## test_frozenset_index
```python
from test_indexing import test_frozenset_index
```



---
## test_loc_setitem_all_false_indexer
```python
from test_indexing import test_loc_setitem_all_false_indexer
```



---
## test_loc_boolean_indexer_non_matching_index
```python
from test_indexing import test_loc_boolean_indexer_non_matching_index
```



---
## test_loc_boolean_indexer_miss_matching_index
```python
from test_indexing import test_loc_boolean_indexer_miss_matching_index
```



---
## test_loc_setitem_nested_data_enlargement
```python
from test_indexing import test_loc_setitem_nested_data_enlargement
```



---
## test_loc_ea_numeric_index_oob_slice_end
```python
from test_indexing import test_loc_ea_numeric_index_oob_slice_end
```



---
## test_getitem_bool_int_key
```python
from test_indexing import test_getitem_bool_int_key
```



---
## test_setitem_empty_indexer
```python
from test_indexing import test_setitem_empty_indexer
```



---
## TestDeprecatedIndexers
```python
from test_indexing import TestDeprecatedIndexers
```



---
## TestSetitemValidation
```python
from test_indexing import TestSetitemValidation
```



---
## test_getitem_dict_and_set_deprecated
```python
from test_indexing import test_getitem_dict_and_set_deprecated
```



---
## test_getitem_dict_and_set_deprecated_multiindex
```python
from test_indexing import test_getitem_dict_and_set_deprecated_multiindex
```



---
## test_setitem_dict_and_set_disallowed
```python
from test_indexing import test_setitem_dict_and_set_disallowed
```



---
## test_setitem_dict_and_set_disallowed_multiindex
```python
from test_indexing import test_setitem_dict_and_set_disallowed_multiindex
```



---
## _check_setitem_invalid
```python
from test_indexing import _check_setitem_invalid
```



---
## test_setitem_validation_scalar_bool
```python
from test_indexing import test_setitem_validation_scalar_bool
```



---
## test_setitem_validation_scalar_int
```python
from test_indexing import test_setitem_validation_scalar_int
```



---
## test_setitem_validation_scalar_float
```python
from test_indexing import test_setitem_validation_scalar_float
```



---
## test_fancy_getitem
```python
from test_datetime import test_fancy_getitem
```



---
## test_fancy_setitem
```python
from test_datetime import test_fancy_setitem
```



---
## test_getitem_setitem_datetime_tz
```python
from test_datetime import test_getitem_setitem_datetime_tz
```



---
## test_getitem_setitem_datetimeindex
```python
from test_datetime import test_getitem_setitem_datetimeindex
```



---
## test_getitem_setitem_periodindex
```python
from test_datetime import test_getitem_setitem_periodindex
```



---
## test_datetime_indexing
```python
from test_datetime import test_datetime_indexing
```



---
## test_indexing_with_duplicate_datetimeindex
```python
from test_datetime import test_indexing_with_duplicate_datetimeindex
```



---
## test_loc_getitem_over_size_cutoff
```python
from test_datetime import test_loc_getitem_over_size_cutoff
```



---
## test_indexing_over_size_cutoff_period_index
```python
from test_datetime import test_indexing_over_size_cutoff_period_index
```



---
## test_indexing_unordered
```python
from test_datetime import test_indexing_unordered
```



---
## test_indexing_unordered2
```python
from test_datetime import test_indexing_unordered2
```



---
## test_indexing
```python
from test_datetime import test_indexing
```



---
## test_getitem_str_month_with_datetimeindex
```python
from test_datetime import test_getitem_str_month_with_datetimeindex
```



---
## test_getitem_str_year_with_datetimeindex
```python
from test_datetime import test_getitem_str_year_with_datetimeindex
```



---
## test_getitem_str_second_with_datetimeindex
```python
from test_datetime import test_getitem_str_second_with_datetimeindex
```



---
## test_compare_datetime_with_all_none
```python
from test_datetime import test_compare_datetime_with_all_none
```



---
## compare
```python
from test_datetime import compare
```



---
## test_take_validate_axis
```python
from test_take import test_take_validate_axis
```



---
## test_take
```python
from test_take import test_take
```



---
## test_take_categorical
```python
from test_take import test_take_categorical
```



---
## test_take_slice_raises
```python
from test_take import test_take_slice_raises
```



---
## __name__
```python
from test_get import __name__
```



---
## test_get
```python
from test_get import test_get
```



---
## test_get_nan
```python
from test_get import test_get_nan
```



---
## test_get_nan_multiple
```python
from test_get import test_get_nan_multiple
```



---
## test_get_with_default
```python
from test_get import test_get_with_default
```



---
## test_get_with_ea
```python
from test_get import test_get_with_ea
```



---
## test_getitem_get
```python
from test_get import test_getitem_get
```



---
## test_get_none
```python
from test_get import test_get_none
```



---
## __name__
```python
from test_where import __name__
```



---
## test_where_unsafe_int
```python
from test_where import test_where_unsafe_int
```



---
## test_where_unsafe_float
```python
from test_where import test_where_unsafe_float
```



---
## test_where_unsafe_upcast
```python
from test_where import test_where_unsafe_upcast
```



---
## test_where_unsafe
```python
from test_where import test_where_unsafe
```



---
## test_where
```python
from test_where import test_where
```



---
## test_where_error
```python
from test_where import test_where_error
```



---
## test_where_array_like
```python
from test_where import test_where_array_like
```



---
## test_where_invalid_input
```python
from test_where import test_where_invalid_input
```



---
## test_where_ndframe_align
```python
from test_where import test_where_ndframe_align
```



---
## test_where_setitem_invalid
```python
from test_where import test_where_setitem_invalid
```



---
## test_broadcast
```python
from test_where import test_broadcast
```



---
## test_where_inplace
```python
from test_where import test_where_inplace
```



---
## test_where_dups
```python
from test_where import test_where_dups
```



---
## test_where_numeric_with_string
```python
from test_where import test_where_numeric_with_string
```



---
## test_where_datetimelike_coerce
```python
from test_where import test_where_datetimelike_coerce
```



---
## test_where_datetimetz
```python
from test_where import test_where_datetimetz
```



---
## test_where_sparse
```python
from test_where import test_where_sparse
```



---
## test_where_empty_series_and_empty_cond_having_non_bool_dtypes
```python
from test_where import test_where_empty_series_and_empty_cond_having_non_bool_dtypes
```



---
## test_where_categorical
```python
from test_where import test_where_categorical
```



---
## test_where_datetimelike_categorical
```python
from test_where import test_where_datetimelike_categorical
```



---
## __name__
```python
from test_delitem import __name__
```



---
## TestSeriesDelItem
```python
from test_delitem import TestSeriesDelItem
```



---
## test_delitem
```python
from test_delitem import test_delitem
```



---
## test_delitem_object_index
```python
from test_delitem import test_delitem_object_index
```



---
## test_delitem_missing_key
```python
from test_delitem import test_delitem_missing_key
```



---
## test_delitem_extension_dtype
```python
from test_delitem import test_delitem_extension_dtype
```



---
## TestCategoricalConcat
```python
from test_categorical import TestCategoricalConcat
```



---
## test_categorical_concat
```python
from test_categorical import test_categorical_concat
```



---
## test_categorical_concat_dtypes
```python
from test_categorical import test_categorical_concat_dtypes
```



---
## test_concat_categoricalindex
```python
from test_categorical import test_concat_categoricalindex
```



---
## test_categorical_concat_preserve
```python
from test_categorical import test_categorical_concat_preserve
```



---
## test_categorical_index_preserver
```python
from test_categorical import test_categorical_index_preserver
```



---
## test_concat_categorical_tz
```python
from test_categorical import test_concat_categorical_tz
```



---
## test_concat_categorical_datetime
```python
from test_categorical import test_concat_categorical_datetime
```



---
## test_concat_categorical_unchanged
```python
from test_categorical import test_concat_categorical_unchanged
```



---
## test_categorical_concat_gh7864
```python
from test_categorical import test_categorical_concat_gh7864
```



---
## test_categorical_index_upcast
```python
from test_categorical import test_categorical_index_upcast
```



---
## test_categorical_missing_from_one_frame
```python
from test_categorical import test_categorical_missing_from_one_frame
```



---
## test_concat_categorical_same_categories_different_order
```python
from test_categorical import test_concat_categorical_same_categories_different_order
```



---
## __name__
```python
from test_append import __name__
```



---
## TestAppend
```python
from test_append import TestAppend
```



---
## test_append
```python
from test_append import test_append
```



---
## test_append_empty
```python
from test_append import test_append_empty
```



---
## test_append_overlap_raises
```python
from test_append import test_append_overlap_raises
```



---
## test_append_new_columns
```python
from test_append import test_append_new_columns
```



---
## test_append_length0_frame
```python
from test_append import test_append_length0_frame
```



---
## test_append_records
```python
from test_append import test_append_records
```



---
## test_append_sorts
```python
from test_append import test_append_sorts
```



---
## test_append_different_columns
```python
from test_append import test_append_different_columns
```



---
## test_append_many
```python
from test_append import test_append_many
```



---
## test_append_preserve_index_name
```python
from test_append import test_append_preserve_index_name
```



---
## test_append_same_columns_type
```python
from test_append import test_append_same_columns_type
```



---
## test_append_different_columns_types
```python
from test_append import test_append_different_columns_types
```



---
## test_append_dtype_coerce
```python
from test_append import test_append_dtype_coerce
```



---
## test_append_missing_column_proper_upcast
```python
from test_append import test_append_missing_column_proper_upcast
```



---
## test_append_empty_frame_to_series_with_dateutil_tz
```python
from test_append import test_append_empty_frame_to_series_with_dateutil_tz
```



---
## test_append_empty_tz_frame_with_datetime64ns
```python
from test_append import test_append_empty_tz_frame_with_datetime64ns
```



---
## test_append_empty_frame_with_timedelta64ns_nat
```python
from test_append import test_append_empty_frame_with_timedelta64ns_nat
```



---
## test_append_frame_with_timedelta64ns_nat
```python
from test_append import test_append_frame_with_timedelta64ns_nat
```



---
## __name__
```python
from test_invalid import __name__
```



---
## TestInvalidConcat
```python
from test_invalid import TestInvalidConcat
```



---
## test_concat_invalid
```python
from test_invalid import test_concat_invalid
```



---
## test_concat_invalid_first_argument
```python
from test_invalid import test_concat_invalid_first_argument
```



---
## test_concat_generator_obj
```python
from test_invalid import test_concat_generator_obj
```



---
## test_concat_textreader_obj
```python
from test_invalid import test_concat_textreader_obj
```



---
## __name__
```python
from test_sort import __name__
```



---
## TestConcatSort
```python
from test_sort import TestConcatSort
```



---
## test_concat_sorts_columns
```python
from test_sort import test_concat_sorts_columns
```



---
## test_concat_sorts_index
```python
from test_sort import test_concat_sorts_index
```



---
## test_concat_inner_sort
```python
from test_sort import test_concat_inner_sort
```



---
## test_concat_aligned_sort
```python
from test_sort import test_concat_aligned_sort
```



---
## test_concat_aligned_sort_does_not_raise
```python
from test_sort import test_concat_aligned_sort_does_not_raise
```



---
## test_concat_frame_with_sort_false
```python
from test_sort import test_concat_frame_with_sort_false
```



---
## test_concat_sort_none_raises
```python
from test_sort import test_concat_sort_none_raises
```



---
## TestConcatenate
```python
from test_concat import TestConcatenate
```



---
## test_concat_no_unnecessary_upcast
```python
from test_concat import test_concat_no_unnecessary_upcast
```



---
## test_concat_will_upcast
```python
from test_concat import test_concat_will_upcast
```



---
## test_concat_empty_and_non_empty_frame_regression
```python
from test_concat import test_concat_empty_and_non_empty_frame_regression
```



---
## test_concat_sparse
```python
from test_concat import test_concat_sparse
```



---
## test_concat_dense_sparse
```python
from test_concat import test_concat_dense_sparse
```



---
## test_duplicate_keys
```python
from test_concat import test_duplicate_keys
```



---
## test_duplicate_keys_same_frame
```python
from test_concat import test_duplicate_keys_same_frame
```



---
## test_concat_preserves_subclass
```python
from test_concat import test_concat_preserves_subclass
```



---
## test_concat_frame_axis0_extension_dtypes
```python
from test_concat import test_concat_frame_axis0_extension_dtypes
```



---
## test_concat_preserves_extension_int64_dtype
```python
from test_concat import test_concat_preserves_extension_int64_dtype
```



---
## test_concat_bool_types
```python
from test_concat import test_concat_bool_types
```



---
## test_concat_repeated_keys
```python
from test_concat import test_concat_repeated_keys
```



---
## test_concat_null_object_with_dti
```python
from test_concat import test_concat_null_object_with_dti
```



---
## test_concat_multiindex_with_empty_rangeindex
```python
from test_concat import test_concat_multiindex_with_empty_rangeindex
```



---
## test_concat_drop_attrs
```python
from test_concat import test_concat_drop_attrs
```



---
## test_concat_retain_attrs
```python
from test_concat import test_concat_retain_attrs
```



---
## test_concat_ignore_empty_object_float
```python
from test_concat import test_concat_ignore_empty_object_float
```



---
## test_concat_ignore_all_na_object_float
```python
from test_concat import test_concat_ignore_all_na_object_float
```



---
## test_concat_ignore_empty_from_reindex
```python
from test_concat import test_concat_ignore_empty_from_reindex
```



---
## test_concat_mismatched_keys_length
```python
from test_concat import test_concat_mismatched_keys_length
```



---
## test_concat_multiindex_with_category
```python
from test_concat import test_concat_multiindex_with_category
```



---
## test_concat_ea_upcast
```python
from test_concat import test_concat_ea_upcast
```



---
## test_concat_none_with_timezone_timestamp
```python
from test_concat import test_concat_none_with_timezone_timestamp
```



---
## test_append_concat
```python
from test_concat import test_append_concat
```



---
## test_concat_copy
```python
from test_concat import test_concat_copy
```



---
## test_concat_with_group_keys
```python
from test_concat import test_concat_with_group_keys
```



---
## test_concat_keys_specific_levels
```python
from test_concat import test_concat_keys_specific_levels
```



---
## test_concat_mapping
```python
from test_concat import test_concat_mapping
```



---
## test_concat_keys_and_levels
```python
from test_concat import test_concat_keys_and_levels
```



---
## test_concat_keys_levels_no_overlap
```python
from test_concat import test_concat_keys_levels_no_overlap
```



---
## test_crossed_dtypes_weird_corner
```python
from test_concat import test_crossed_dtypes_weird_corner
```



---
## test_with_mixed_tuples
```python
from test_concat import test_with_mixed_tuples
```



---
## test_concat_mixed_objs_columns
```python
from test_concat import test_concat_mixed_objs_columns
```



---
## test_concat_mixed_objs_index
```python
from test_concat import test_concat_mixed_objs_index
```



---
## test_concat_mixed_objs_index_names
```python
from test_concat import test_concat_mixed_objs_index_names
```



---
## test_dtype_coercion
```python
from test_concat import test_dtype_coercion
```



---
## test_concat_single_with_key
```python
from test_concat import test_concat_single_with_key
```



---
## test_concat_no_items_raises
```python
from test_concat import test_concat_no_items_raises
```



---
## test_concat_exclude_none
```python
from test_concat import test_concat_exclude_none
```



---
## test_concat_keys_with_none
```python
from test_concat import test_concat_keys_with_none
```



---
## test_concat_bug_1719
```python
from test_concat import test_concat_bug_1719
```



---
## test_concat_bug_2972
```python
from test_concat import test_concat_bug_2972
```



---
## test_concat_bug_3602
```python
from test_concat import test_concat_bug_3602
```



---
## test_concat_iterables
```python
from test_concat import test_concat_iterables
```



---
## test_concat_order
```python
from test_concat import test_concat_order
```



---
## test_concat_different_extension_dtypes_upcasts
```python
from test_concat import test_concat_different_extension_dtypes_upcasts
```



---
## test_concat_ordered_dict
```python
from test_concat import test_concat_ordered_dict
```



---
## test_concat_duplicate_indices_raise
```python
from test_concat import test_concat_duplicate_indices_raise
```



---
## CustomIterator1
```python
from test_concat import CustomIterator1
```



---
## CustomIterator2
```python
from test_concat import CustomIterator2
```



---
## __len__
```python
from test_concat import __len__
```



---
## __getitem__
```python
from test_concat import __getitem__
```



---
## __iter__
```python
from test_concat import __iter__
```



---
## __name__
```python
from test_index import __name__
```



---
## TestIndexConcat
```python
from test_index import TestIndexConcat
```



---
## TestMultiIndexConcat
```python
from test_index import TestMultiIndexConcat
```



---
## test_concat_ignore_index
```python
from test_index import test_concat_ignore_index
```



---
## test_concat_same_index_names
```python
from test_index import test_concat_same_index_names
```



---
## test_concat_rename_index
```python
from test_index import test_concat_rename_index
```



---
## test_concat_copy_index_series
```python
from test_index import test_concat_copy_index_series
```



---
## test_concat_copy_index_frame
```python
from test_index import test_concat_copy_index_frame
```



---
## test_default_index
```python
from test_index import test_default_index
```



---
## test_dups_index
```python
from test_index import test_dups_index
```



---
## test_concat_multiindex_with_keys
```python
from test_index import test_concat_multiindex_with_keys
```



---
## test_concat_multiindex_with_none_in_index_names
```python
from test_index import test_concat_multiindex_with_none_in_index_names
```



---
## test_concat_multiindex_rangeindex
```python
from test_index import test_concat_multiindex_rangeindex
```



---
## test_concat_multiindex_dfs_with_deepcopy
```python
from test_index import test_concat_multiindex_dfs_with_deepcopy
```



---
## test_concat_with_various_multiindex_dtypes
```python
from test_index import test_concat_with_various_multiindex_dtypes
```



---
## test_concat_multiindex_
```python
from test_index import test_concat_multiindex_
```



---
## test_concat_with_key_not_unique
```python
from test_index import test_concat_with_key_not_unique
```



---
## test_concat_with_duplicated_levels
```python
from test_index import test_concat_with_duplicated_levels
```



---
## test_concat_with_levels_with_none_keys
```python
from test_index import test_concat_with_levels_with_none_keys
```



---
## test_concat_range_index_result
```python
from test_index import test_concat_range_index_result
```



---
## test_concat_index_keep_dtype
```python
from test_index import test_concat_index_keep_dtype
```



---
## test_concat_index_keep_dtype_ea_numeric
```python
from test_index import test_concat_index_keep_dtype_ea_numeric
```



---
## test_concat_index_find_common
```python
from test_index import test_concat_index_find_common
```



---
## test_concat_axis_1_sort_false_rangeindex
```python
from test_index import test_concat_axis_1_sort_false_rangeindex
```



---
## __name__
```python
from test_empty import __name__
```

Tests dtype specification during parsing
for all of the parsers defined in parsers.py

---
## TestEmptyConcat
```python
from test_empty import TestEmptyConcat
```



---
## test_handle_empty_objects
```python
from test_empty import test_handle_empty_objects
```



---
## test_concat_empty_series
```python
from test_empty import test_concat_empty_series
```



---
## test_concat_empty_series_timelike
```python
from test_empty import test_concat_empty_series_timelike
```



---
## test_concat_empty_series_dtypes
```python
from test_empty import test_concat_empty_series_dtypes
```



---
## test_concat_empty_series_dtypes_match_roundtrips
```python
from test_empty import test_concat_empty_series_dtypes_match_roundtrips
```



---
## test_concat_empty_series_dtypes_roundtrips
```python
from test_empty import test_concat_empty_series_dtypes_roundtrips
```



---
## test_concat_empty_series_dtypes_triple
```python
from test_empty import test_concat_empty_series_dtypes_triple
```



---
## test_concat_empty_series_dtype_category_with_array
```python
from test_empty import test_concat_empty_series_dtype_category_with_array
```



---
## test_concat_empty_series_dtypes_sparse
```python
from test_empty import test_concat_empty_series_dtypes_sparse
```



---
## test_concat_empty_df_object_dtype
```python
from test_empty import test_concat_empty_df_object_dtype
```



---
## test_concat_empty_dataframe_dtypes
```python
from test_empty import test_concat_empty_dataframe_dtypes
```



---
## test_concat_inner_join_empty
```python
from test_empty import test_concat_inner_join_empty
```



---
## test_empty_dtype_coerce
```python
from test_empty import test_empty_dtype_coerce
```



---
## test_concat_empty_dataframe
```python
from test_empty import test_concat_empty_dataframe
```



---
## test_concat_empty_dataframe_different_dtypes
```python
from test_empty import test_concat_empty_dataframe_different_dtypes
```



---
## test_concat_to_empty_ea
```python
from test_empty import test_concat_to_empty_ea
```

48510 `concat` to an empty EA should maintain type EA dtype.

---
## int_result_type
```python
from test_empty import int_result_type
```



---
## float_result_type
```python
from test_empty import float_result_type
```



---
## get_result_type
```python
from test_empty import get_result_type
```



---
## TestDatetimeConcat
```python
from test_datetimes import TestDatetimeConcat
```



---
## TestTimezoneConcat
```python
from test_datetimes import TestTimezoneConcat
```



---
## TestPeriodConcat
```python
from test_datetimes import TestPeriodConcat
```



---
## test_concat_timedelta64_block
```python
from test_datetimes import test_concat_timedelta64_block
```



---
## test_concat_multiindex_datetime_nat
```python
from test_datetimes import test_concat_multiindex_datetime_nat
```



---
## test_concat_float_datetime64
```python
from test_datetimes import test_concat_float_datetime64
```



---
## test_concat_datetime64_block
```python
from test_datetimes import test_concat_datetime64_block
```



---
## test_concat_datetime_datetime64_frame
```python
from test_datetimes import test_concat_datetime_datetime64_frame
```



---
## test_concat_datetime_timezone
```python
from test_datetimes import test_concat_datetime_timezone
```



---
## test_concat_datetimeindex_freq
```python
from test_datetimes import test_concat_datetimeindex_freq
```



---
## test_concat_multiindex_datetime_object_index
```python
from test_datetimes import test_concat_multiindex_datetime_object_index
```



---
## test_concat_NaT_series
```python
from test_datetimes import test_concat_NaT_series
```



---
## test_concat_NaT_series2
```python
from test_datetimes import test_concat_NaT_series2
```



---
## test_concat_NaT_dataframes
```python
from test_datetimes import test_concat_NaT_dataframes
```



---
## test_concat_NaT_dataframes_all_NaT_axis_0
```python
from test_datetimes import test_concat_NaT_dataframes_all_NaT_axis_0
```



---
## test_concat_NaT_dataframes_all_NaT_axis_1
```python
from test_datetimes import test_concat_NaT_dataframes_all_NaT_axis_1
```



---
## test_concat_NaT_series_dataframe_all_NaT
```python
from test_datetimes import test_concat_NaT_series_dataframe_all_NaT
```



---
## test_concat_tz_series
```python
from test_datetimes import test_concat_tz_series
```



---
## test_concat_tz_series2
```python
from test_datetimes import test_concat_tz_series2
```



---
## test_concat_tz_series3
```python
from test_datetimes import test_concat_tz_series3
```



---
## test_concat_tz_series4
```python
from test_datetimes import test_concat_tz_series4
```



---
## test_concat_tz_series5
```python
from test_datetimes import test_concat_tz_series5
```



---
## test_concat_tz_series6
```python
from test_datetimes import test_concat_tz_series6
```



---
## test_concat_tz_series_tzlocal
```python
from test_datetimes import test_concat_tz_series_tzlocal
```



---
## test_concat_tz_series_with_datetimelike
```python
from test_datetimes import test_concat_tz_series_with_datetimelike
```



---
## test_concat_tz_frame
```python
from test_datetimes import test_concat_tz_frame
```



---
## test_concat_multiple_tzs
```python
from test_datetimes import test_concat_multiple_tzs
```



---
## test_concat_multiindex_with_tz
```python
from test_datetimes import test_concat_multiindex_with_tz
```



---
## test_concat_tz_not_aligned
```python
from test_datetimes import test_concat_tz_not_aligned
```



---
## test_concat_tz_NaT
```python
from test_datetimes import test_concat_tz_NaT
```



---
## test_concat_tz_with_empty
```python
from test_datetimes import test_concat_tz_with_empty
```



---
## test_concat_period_series
```python
from test_datetimes import test_concat_period_series
```



---
## test_concat_period_multiple_freq_series
```python
from test_datetimes import test_concat_period_multiple_freq_series
```



---
## test_concat_period_other_series
```python
from test_datetimes import test_concat_period_other_series
```



---
## test_concat_period_other_series2
```python
from test_datetimes import test_concat_period_other_series2
```



---
## test_concat_period_other_series3
```python
from test_datetimes import test_concat_period_other_series3
```



---
## TestSeriesConcat
```python
from test_series import TestSeriesConcat
```



---
## test_concat_series
```python
from test_series import test_concat_series
```



---
## test_concat_empty_and_non_empty_series_regression
```python
from test_series import test_concat_empty_and_non_empty_series_regression
```



---
## test_concat_series_axis1
```python
from test_series import test_concat_series_axis1
```



---
## test_concat_series_axis1_preserves_series_names
```python
from test_series import test_concat_series_axis1_preserves_series_names
```



---
## test_concat_series_axis1_with_reindex
```python
from test_series import test_concat_series_axis1_with_reindex
```



---
## test_concat_series_axis1_names_applied
```python
from test_series import test_concat_series_axis1_names_applied
```



---
## test_concat_series_axis1_same_names_ignore_index
```python
from test_series import test_concat_series_axis1_same_names_ignore_index
```



---
## test_concat_series_name_npscalar_tuple
```python
from test_series import test_concat_series_name_npscalar_tuple
```



---
## test_concat_series_partial_columns_names
```python
from test_series import test_concat_series_partial_columns_names
```



---
## test_concat_series_length_one_reversed
```python
from test_series import test_concat_series_length_one_reversed
```



---
## __name__
```python
from test_append_common import __name__
```



---
## item
```python
from test_append_common import item
```



---
## item2
```python
from test_append_common import item2
```



---
## TestConcatAppendCommon
```python
from test_append_common import TestConcatAppendCommon
```

Test common dtype coercion rules between concat and append.

---
## test_dtypes
```python
from test_append_common import test_dtypes
```



---
## test_concatlike_same_dtypes
```python
from test_append_common import test_concatlike_same_dtypes
```



---
## test_concatlike_dtypes_coercion
```python
from test_append_common import test_concatlike_dtypes_coercion
```



---
## test_concatlike_common_coerce_to_pandas_object
```python
from test_append_common import test_concatlike_common_coerce_to_pandas_object
```



---
## test_concatlike_datetimetz
```python
from test_append_common import test_concatlike_datetimetz
```



---
## test_concatlike_datetimetz_short
```python
from test_append_common import test_concatlike_datetimetz_short
```



---
## test_concatlike_datetimetz_to_object
```python
from test_append_common import test_concatlike_datetimetz_to_object
```



---
## test_concatlike_common_period
```python
from test_append_common import test_concatlike_common_period
```



---
## test_concatlike_common_period_diff_freq_to_object
```python
from test_append_common import test_concatlike_common_period_diff_freq_to_object
```



---
## test_concatlike_common_period_mixed_dt_to_object
```python
from test_append_common import test_concatlike_common_period_mixed_dt_to_object
```



---
## test_concat_categorical
```python
from test_append_common import test_concat_categorical
```



---
## test_union_categorical_same_categories_different_order
```python
from test_append_common import test_union_categorical_same_categories_different_order
```



---
## test_concat_categorical_coercion
```python
from test_append_common import test_concat_categorical_coercion
```



---
## test_concat_categorical_3elem_coercion
```python
from test_append_common import test_concat_categorical_3elem_coercion
```



---
## test_concat_categorical_multi_coercion
```python
from test_append_common import test_concat_categorical_multi_coercion
```



---
## test_concat_categorical_ordered
```python
from test_append_common import test_concat_categorical_ordered
```



---
## test_concat_categorical_coercion_nan
```python
from test_append_common import test_concat_categorical_coercion_nan
```



---
## test_concat_categorical_empty
```python
from test_append_common import test_concat_categorical_empty
```



---
## test_categorical_concat_append
```python
from test_append_common import test_categorical_concat_append
```



---
## __name__
```python
from test_dataframe import __name__
```



---
## TestDataFrameConcat
```python
from test_dataframe import TestDataFrameConcat
```



---
## test_concat_multiple_frames_dtypes
```python
from test_dataframe import test_concat_multiple_frames_dtypes
```



---
## test_concat_tuple_keys
```python
from test_dataframe import test_concat_tuple_keys
```



---
## test_concat_named_keys
```python
from test_dataframe import test_concat_named_keys
```



---
## test_concat_axis_parameter
```python
from test_dataframe import test_concat_axis_parameter
```



---
## test_concat_numerical_names
```python
from test_dataframe import test_concat_numerical_names
```



---
## test_concat_astype_dup_col
```python
from test_dataframe import test_concat_astype_dup_col
```



---
## test_concat_dataframe_keys_bug
```python
from test_dataframe import test_concat_dataframe_keys_bug
```



---
## test_concat_bool_with_int
```python
from test_dataframe import test_concat_bool_with_int
```



---
## test_concat_duplicates_in_index_with_keys
```python
from test_dataframe import test_concat_duplicates_in_index_with_keys
```



---
## test_concat_copies
```python
from test_dataframe import test_concat_copies
```



---
## test_outer_sort_columns
```python
from test_dataframe import test_outer_sort_columns
```



---
## test_inner_sort_columns
```python
from test_dataframe import test_inner_sort_columns
```



---
## test_sort_columns_one_df
```python
from test_dataframe import test_sort_columns_one_df
```



---
## __name__
```python
from test_merge_index_as_string import __name__
```



---
## df1
```python
from test_merge_index_as_string import df1
```



---
## df2
```python
from test_merge_index_as_string import df2
```



---
## left_df
```python
from test_merge_index_as_string import left_df
```

Construct left test DataFrame with specified levels
(any of 'outer', 'inner', and 'v1')

---
## right_df
```python
from test_merge_index_as_string import right_df
```

Construct right test DataFrame with specified levels
(any of 'outer', 'inner', and 'v2')

---
## compute_expected
```python
from test_merge_index_as_string import compute_expected
```

Compute the expected merge result for the test case.

This method computes the expected result of merging two DataFrames on
a combination of their columns and index levels. It does so by
explicitly dropping/resetting their named index levels, performing a
merge on their columns, and then finally restoring the appropriate
index in the result.

Parameters
----------
df_left : DataFrame
    The left DataFrame (may have zero or more named index levels)
df_right : DataFrame
    The right DataFrame (may have zero or more named index levels)
on : list of str
    The on parameter to the merge operation
left_on : list of str
    The left_on parameter to the merge operation
right_on : list of str
    The right_on parameter to the merge operation
how : str
    The how parameter to the merge operation

Returns
-------
DataFrame
    The expected merge result

---
## test_merge_indexes_and_columns_on
```python
from test_merge_index_as_string import test_merge_indexes_and_columns_on
```



---
## test_merge_indexes_and_columns_lefton_righton
```python
from test_merge_index_as_string import test_merge_indexes_and_columns_lefton_righton
```



---
## test_join_indexes_and_columns_on
```python
from test_merge_index_as_string import test_join_indexes_and_columns_on
```



---
## __name__
```python
from test_merge_asof import __name__
```



---
## unit
```python
from test_merge_asof import unit
```

Resolution for datetimelike dtypes.

---
## TestAsOfMerge
```python
from test_merge_asof import TestAsOfMerge
```



---
## test_merge_asof_non_numerical_dtype
```python
from test_merge_asof import test_merge_asof_non_numerical_dtype
```



---
## test_merge_asof_non_numerical_dtype_object
```python
from test_merge_asof import test_merge_asof_non_numerical_dtype_object
```



---
## test_merge_asof_index_behavior
```python
from test_merge_asof import test_merge_asof_index_behavior
```



---
## test_merge_asof_numeric_column_in_index
```python
from test_merge_asof import test_merge_asof_numeric_column_in_index
```



---
## test_merge_asof_numeric_column_in_multiindex
```python
from test_merge_asof import test_merge_asof_numeric_column_in_multiindex
```



---
## test_merge_asof_numeri_column_in_index_object_dtype
```python
from test_merge_asof import test_merge_asof_numeri_column_in_index_object_dtype
```



---
## test_merge_asof_array_as_on
```python
from test_merge_asof import test_merge_asof_array_as_on
```



---
## test_merge_asof_raise_for_duplicate_columns
```python
from test_merge_asof import test_merge_asof_raise_for_duplicate_columns
```



---
## test_merge_asof_extension_dtype
```python
from test_merge_asof import test_merge_asof_extension_dtype
```



---
## test_merge_asof_pyarrow_td_tolerance
```python
from test_merge_asof import test_merge_asof_pyarrow_td_tolerance
```



---
## test_merge_asof_read_only_ndarray
```python
from test_merge_asof import test_merge_asof_read_only_ndarray
```



---
## test_merge_asof_multiby_with_categorical
```python
from test_merge_asof import test_merge_asof_multiby_with_categorical
```



---
## prep_data
```python
from test_merge_asof import prep_data
```



---
## trades
```python
from test_merge_asof import trades
```



---
## quotes
```python
from test_merge_asof import quotes
```



---
## asof
```python
from test_merge_asof import asof
```



---
## tolerance
```python
from test_merge_asof import tolerance
```



---
## allow_exact_matches
```python
from test_merge_asof import allow_exact_matches
```



---
## allow_exact_matches_and_tolerance
```python
from test_merge_asof import allow_exact_matches_and_tolerance
```



---
## test_examples1
```python
from test_merge_asof import test_examples1
```

doc-string examples

---
## test_examples2
```python
from test_merge_asof import test_examples2
```

doc-string examples

---
## test_examples3
```python
from test_merge_asof import test_examples3
```

doc-string examples

---
## test_examples4
```python
from test_merge_asof import test_examples4
```

doc-string examples

---
## test_basic
```python
from test_merge_asof import test_basic
```



---
## test_basic_categorical
```python
from test_merge_asof import test_basic_categorical
```



---
## test_basic_left_index
```python
from test_merge_asof import test_basic_left_index
```



---
## test_basic_right_index
```python
from test_merge_asof import test_basic_right_index
```



---
## test_basic_left_index_right_index
```python
from test_merge_asof import test_basic_left_index_right_index
```



---
## test_multi_index_left
```python
from test_merge_asof import test_multi_index_left
```



---
## test_multi_index_right
```python
from test_merge_asof import test_multi_index_right
```



---
## test_on_and_index_left_on
```python
from test_merge_asof import test_on_and_index_left_on
```



---
## test_on_and_index_right_on
```python
from test_merge_asof import test_on_and_index_right_on
```



---
## test_basic_left_by_right_by
```python
from test_merge_asof import test_basic_left_by_right_by
```



---
## test_missing_right_by
```python
from test_merge_asof import test_missing_right_by
```



---
## test_multiby
```python
from test_merge_asof import test_multiby
```



---
## test_multiby_heterogeneous_types
```python
from test_merge_asof import test_multiby_heterogeneous_types
```



---
## test_mismatched_index_dtype
```python
from test_merge_asof import test_mismatched_index_dtype
```



---
## test_multiby_indexed
```python
from test_merge_asof import test_multiby_indexed
```



---
## test_basic2
```python
from test_merge_asof import test_basic2
```



---
## test_basic_no_by
```python
from test_merge_asof import test_basic_no_by
```



---
## test_valid_join_keys
```python
from test_merge_asof import test_valid_join_keys
```



---
## test_with_duplicates
```python
from test_merge_asof import test_with_duplicates
```



---
## test_with_duplicates_no_on
```python
from test_merge_asof import test_with_duplicates_no_on
```



---
## test_valid_allow_exact_matches
```python
from test_merge_asof import test_valid_allow_exact_matches
```



---
## test_valid_tolerance
```python
from test_merge_asof import test_valid_tolerance
```



---
## test_non_sorted
```python
from test_merge_asof import test_non_sorted
```



---
## test_tolerance
```python
from test_merge_asof import test_tolerance
```



---
## test_tolerance_forward
```python
from test_merge_asof import test_tolerance_forward
```



---
## test_tolerance_nearest
```python
from test_merge_asof import test_tolerance_nearest
```



---
## test_tolerance_tz
```python
from test_merge_asof import test_tolerance_tz
```



---
## test_tolerance_float
```python
from test_merge_asof import test_tolerance_float
```



---
## test_index_tolerance
```python
from test_merge_asof import test_index_tolerance
```



---
## test_allow_exact_matches
```python
from test_merge_asof import test_allow_exact_matches
```



---
## test_allow_exact_matches_forward
```python
from test_merge_asof import test_allow_exact_matches_forward
```



---
## test_allow_exact_matches_nearest
```python
from test_merge_asof import test_allow_exact_matches_nearest
```



---
## test_allow_exact_matches_and_tolerance
```python
from test_merge_asof import test_allow_exact_matches_and_tolerance
```



---
## test_allow_exact_matches_and_tolerance2
```python
from test_merge_asof import test_allow_exact_matches_and_tolerance2
```



---
## test_allow_exact_matches_and_tolerance3
```python
from test_merge_asof import test_allow_exact_matches_and_tolerance3
```



---
## test_allow_exact_matches_and_tolerance_forward
```python
from test_merge_asof import test_allow_exact_matches_and_tolerance_forward
```



---
## test_allow_exact_matches_and_tolerance_nearest
```python
from test_merge_asof import test_allow_exact_matches_and_tolerance_nearest
```



---
## test_forward_by
```python
from test_merge_asof import test_forward_by
```



---
## test_nearest_by
```python
from test_merge_asof import test_nearest_by
```



---
## test_by_int
```python
from test_merge_asof import test_by_int
```



---
## test_on_float
```python
from test_merge_asof import test_on_float
```



---
## test_on_specialized_type
```python
from test_merge_asof import test_on_specialized_type
```



---
## test_on_specialized_type_by_int
```python
from test_merge_asof import test_on_specialized_type_by_int
```



---
## test_on_float_by_int
```python
from test_merge_asof import test_on_float_by_int
```



---
## test_merge_datatype_error_raises
```python
from test_merge_asof import test_merge_datatype_error_raises
```



---
## test_merge_datatype_categorical_error_raises
```python
from test_merge_asof import test_merge_datatype_categorical_error_raises
```



---
## test_merge_groupby_multiple_column_with_categorical_column
```python
from test_merge_asof import test_merge_groupby_multiple_column_with_categorical_column
```



---
## test_merge_on_nans
```python
from test_merge_asof import test_merge_on_nans
```



---
## test_by_nullable
```python
from test_merge_asof import test_by_nullable
```



---
## test_merge_by_col_tz_aware
```python
from test_merge_asof import test_merge_by_col_tz_aware
```



---
## test_by_mixed_tz_aware
```python
from test_merge_asof import test_by_mixed_tz_aware
```



---
## test_by_dtype
```python
from test_merge_asof import test_by_dtype
```



---
## test_timedelta_tolerance_nearest
```python
from test_merge_asof import test_timedelta_tolerance_nearest
```



---
## test_int_type_tolerance
```python
from test_merge_asof import test_int_type_tolerance
```



---
## test_merge_index_column_tz
```python
from test_merge_asof import test_merge_index_column_tz
```



---
## test_left_index_right_index_tolerance
```python
from test_merge_asof import test_left_index_right_index_tolerance
```



---
## get_test_data
```python
from test_join import get_test_data
```



---
## TestJoin
```python
from test_join import TestJoin
```



---
## _check_join
```python
from test_join import _check_join
```



---
## _restrict_to_columns
```python
from test_join import _restrict_to_columns
```



---
## _assert_same_contents
```python
from test_join import _assert_same_contents
```



---
## _assert_all_na
```python
from test_join import _assert_all_na
```



---
## _join_by_hand
```python
from test_join import _join_by_hand
```



---
## test_join_inner_multiindex_deterministic_order
```python
from test_join import test_join_inner_multiindex_deterministic_order
```



---
## test_join_cross
```python
from test_join import test_join_cross
```



---
## test_join_multiindex_one_level
```python
from test_join import test_join_multiindex_one_level
```



---
## test_join_multiindex_not_alphabetical_categorical
```python
from test_join import test_join_multiindex_not_alphabetical_categorical
```



---
## test_join_empty
```python
from test_join import test_join_empty
```



---
## test_join_empty_uncomparable_columns
```python
from test_join import test_join_empty_uncomparable_columns
```



---
## test_join_multiindex_categorical_output_index_dtype
```python
from test_join import test_join_multiindex_categorical_output_index_dtype
```



---
## df
```python
from test_join import df
```



---
## df2
```python
from test_join import df2
```



---
## target_source
```python
from test_join import target_source
```



---
## test_left_outer_join
```python
from test_join import test_left_outer_join
```



---
## test_right_outer_join
```python
from test_join import test_right_outer_join
```



---
## test_full_outer_join
```python
from test_join import test_full_outer_join
```



---
## test_inner_join
```python
from test_join import test_inner_join
```



---
## test_handle_overlap
```python
from test_join import test_handle_overlap
```



---
## test_handle_overlap_arbitrary_key
```python
from test_join import test_handle_overlap_arbitrary_key
```



---
## test_join_on
```python
from test_join import test_join_on
```



---
## test_join_on_fails_with_different_right_index
```python
from test_join import test_join_on_fails_with_different_right_index
```



---
## test_join_on_fails_with_different_left_index
```python
from test_join import test_join_on_fails_with_different_left_index
```



---
## test_join_on_fails_with_different_column_counts
```python
from test_join import test_join_on_fails_with_different_column_counts
```



---
## test_join_on_fails_with_wrong_object_type
```python
from test_join import test_join_on_fails_with_wrong_object_type
```



---
## test_join_on_pass_vector
```python
from test_join import test_join_on_pass_vector
```



---
## test_join_with_len0
```python
from test_join import test_join_with_len0
```



---
## test_join_on_inner
```python
from test_join import test_join_on_inner
```



---
## test_join_on_singlekey_list
```python
from test_join import test_join_on_singlekey_list
```



---
## test_join_on_series
```python
from test_join import test_join_on_series
```



---
## test_join_on_series_buglet
```python
from test_join import test_join_on_series_buglet
```



---
## test_join_index_mixed
```python
from test_join import test_join_index_mixed
```



---
## test_join_index_mixed_overlap
```python
from test_join import test_join_index_mixed_overlap
```



---
## test_join_empty_bug
```python
from test_join import test_join_empty_bug
```



---
## test_join_unconsolidated
```python
from test_join import test_join_unconsolidated
```



---
## test_join_multiindex
```python
from test_join import test_join_multiindex
```



---
## test_join_inner_multiindex
```python
from test_join import test_join_inner_multiindex
```



---
## test_join_hierarchical_mixed_raises
```python
from test_join import test_join_hierarchical_mixed_raises
```



---
## test_join_float64_float32
```python
from test_join import test_join_float64_float32
```



---
## test_join_many_non_unique_index
```python
from test_join import test_join_many_non_unique_index
```



---
## test_join_sort
```python
from test_join import test_join_sort
```



---
## test_join_mixed_non_unique_index
```python
from test_join import test_join_mixed_non_unique_index
```



---
## test_join_non_unique_period_index
```python
from test_join import test_join_non_unique_period_index
```



---
## test_mixed_type_join_with_suffix
```python
from test_join import test_mixed_type_join_with_suffix
```



---
## test_join_many
```python
from test_join import test_join_many
```



---
## test_join_many_mixed
```python
from test_join import test_join_many_mixed
```



---
## test_join_dups
```python
from test_join import test_join_dups
```



---
## test_join_multi_to_multi
```python
from test_join import test_join_multi_to_multi
```



---
## test_join_on_tz_aware_datetimeindex
```python
from test_join import test_join_on_tz_aware_datetimeindex
```



---
## test_join_datetime_string
```python
from test_join import test_join_datetime_string
```



---
## test_join_with_categorical_index
```python
from test_join import test_join_with_categorical_index
```



---
## _check_diff_index
```python
from test_join import _check_diff_index
```



---
## __name__
```python
from test_merge import __name__
```



---
## get_test_data
```python
from test_merge import get_test_data
```



---
## get_series
```python
from test_merge import get_series
```



---
## get_series_na
```python
from test_merge import get_series_na
```



---
## series_of_dtype
```python
from test_merge import series_of_dtype
```

A parametrized fixture returning a variety of Series of different
dtypes

---
## series_of_dtype2
```python
from test_merge import series_of_dtype2
```

A duplicate of the series_of_dtype fixture, so that it can be used
twice by a single function

---
## series_of_dtype_all_na
```python
from test_merge import series_of_dtype_all_na
```

A parametrized fixture returning a variety of Series with all NA
values

---
## dfs_for_indicator
```python
from test_merge import dfs_for_indicator
```



---
## TestMerge
```python
from test_merge import TestMerge
```



---
## _check_merge
```python
from test_merge import _check_merge
```



---
## TestMergeDtypes
```python
from test_merge import TestMergeDtypes
```



---
## left
```python
from test_merge import left
```



---
## right
```python
from test_merge import right
```



---
## TestMergeCategorical
```python
from test_merge import TestMergeCategorical
```



---
## left_df
```python
from test_merge import left_df
```



---
## right_df
```python
from test_merge import right_df
```



---
## TestMergeOnIndexes
```python
from test_merge import TestMergeOnIndexes
```



---
## test_merge_index_types
```python
from test_merge import test_merge_index_types
```



---
## test_merge_series
```python
from test_merge import test_merge_series
```



---
## test_merge_series_multilevel
```python
from test_merge import test_merge_series_multilevel
```



---
## test_merge_suffix
```python
from test_merge import test_merge_suffix
```



---
## test_merge_duplicate_suffix
```python
from test_merge import test_merge_duplicate_suffix
```



---
## test_merge_suffix_error
```python
from test_merge import test_merge_suffix_error
```



---
## test_merge_suffix_raises
```python
from test_merge import test_merge_suffix_raises
```



---
## test_merge_suffix_length_error
```python
from test_merge import test_merge_suffix_length_error
```



---
## test_merge_equal_cat_dtypes
```python
from test_merge import test_merge_equal_cat_dtypes
```



---
## test_merge_equal_cat_dtypes2
```python
from test_merge import test_merge_equal_cat_dtypes2
```



---
## test_merge_on_cat_and_ext_array
```python
from test_merge import test_merge_on_cat_and_ext_array
```



---
## test_merge_multiindex_columns
```python
from test_merge import test_merge_multiindex_columns
```



---
## test_merge_datetime_upcast_dtype
```python
from test_merge import test_merge_datetime_upcast_dtype
```



---
## test_categorical_non_unique_monotonic
```python
from test_merge import test_categorical_non_unique_monotonic
```



---
## test_merge_join_categorical_multiindex
```python
from test_merge import test_merge_join_categorical_multiindex
```



---
## test_merge_join_cols_error_reporting_duplicates
```python
from test_merge import test_merge_join_cols_error_reporting_duplicates
```



---
## test_merge_join_cols_error_reporting_missing
```python
from test_merge import test_merge_join_cols_error_reporting_missing
```



---
## test_merge_join_cols_error_reporting_on_and_index
```python
from test_merge import test_merge_join_cols_error_reporting_on_and_index
```



---
## test_merge_right_left_index
```python
from test_merge import test_merge_right_left_index
```



---
## test_merge_result_empty_index_and_on
```python
from test_merge import test_merge_result_empty_index_and_on
```



---
## test_merge_suffixes_produce_dup_columns_raises
```python
from test_merge import test_merge_suffixes_produce_dup_columns_raises
```



---
## test_merge_duplicate_columns_with_suffix_no_warning
```python
from test_merge import test_merge_duplicate_columns_with_suffix_no_warning
```



---
## test_merge_duplicate_columns_with_suffix_causing_another_duplicate_raises
```python
from test_merge import test_merge_duplicate_columns_with_suffix_causing_another_duplicate_raises
```



---
## test_merge_string_float_column_result
```python
from test_merge import test_merge_string_float_column_result
```



---
## test_mergeerror_on_left_index_mismatched_dtypes
```python
from test_merge import test_mergeerror_on_left_index_mismatched_dtypes
```



---
## test_merge_on_left_categoricalindex
```python
from test_merge import test_merge_on_left_categoricalindex
```



---
## test_merge_outer_with_NaN
```python
from test_merge import test_merge_outer_with_NaN
```



---
## test_merge_different_index_names
```python
from test_merge import test_merge_different_index_names
```



---
## test_merge_ea
```python
from test_merge import test_merge_ea
```



---
## test_merge_ea_and_non_ea
```python
from test_merge import test_merge_ea_and_non_ea
```



---
## test_merge_arrow_and_numpy_dtypes
```python
from test_merge import test_merge_arrow_and_numpy_dtypes
```



---
## test_merge_datetime_different_resolution
```python
from test_merge import test_merge_datetime_different_resolution
```



---
## test_merge_multiindex_single_level
```python
from test_merge import test_merge_multiindex_single_level
```



---
## test_merge_combinations
```python
from test_merge import test_merge_combinations
```



---
## test_merge_ea_int_and_float_numpy
```python
from test_merge import test_merge_ea_int_and_float_numpy
```



---
## test_merge_arrow_string_index
```python
from test_merge import test_merge_arrow_string_index
```



---
## test_merge_empty_frames_column_order
```python
from test_merge import test_merge_empty_frames_column_order
```



---
## test_merge_datetime_and_timedelta
```python
from test_merge import test_merge_datetime_and_timedelta
```



---
## df
```python
from test_merge import df
```



---
## df2
```python
from test_merge import df2
```



---
## test_merge_inner_join_empty
```python
from test_merge import test_merge_inner_join_empty
```



---
## test_merge_common
```python
from test_merge import test_merge_common
```



---
## test_merge_non_string_columns
```python
from test_merge import test_merge_non_string_columns
```



---
## test_merge_index_as_on_arg
```python
from test_merge import test_merge_index_as_on_arg
```



---
## test_merge_index_singlekey_right_vs_left
```python
from test_merge import test_merge_index_singlekey_right_vs_left
```



---
## test_merge_index_singlekey_inner
```python
from test_merge import test_merge_index_singlekey_inner
```



---
## test_merge_misspecified
```python
from test_merge import test_merge_misspecified
```



---
## test_index_and_on_parameters_confusion
```python
from test_merge import test_index_and_on_parameters_confusion
```



---
## test_merge_overlap
```python
from test_merge import test_merge_overlap
```



---
## test_merge_different_column_key_names
```python
from test_merge import test_merge_different_column_key_names
```



---
## test_merge_copy
```python
from test_merge import test_merge_copy
```



---
## test_merge_nocopy
```python
from test_merge import test_merge_nocopy
```



---
## test_intelligently_handle_join_key
```python
from test_merge import test_intelligently_handle_join_key
```



---
## test_merge_join_key_dtype_cast
```python
from test_merge import test_merge_join_key_dtype_cast
```



---
## test_handle_join_key_pass_array
```python
from test_merge import test_handle_join_key_pass_array
```



---
## test_no_overlap_more_informative_error
```python
from test_merge import test_no_overlap_more_informative_error
```



---
## test_merge_non_unique_indexes
```python
from test_merge import test_merge_non_unique_indexes
```



---
## test_merge_non_unique_index_many_to_many
```python
from test_merge import test_merge_non_unique_index_many_to_many
```



---
## test_left_merge_empty_dataframe
```python
from test_merge import test_left_merge_empty_dataframe
```



---
## test_merge_empty_dataframe
```python
from test_merge import test_merge_empty_dataframe
```



---
## test_merge_left_empty_right_empty
```python
from test_merge import test_merge_left_empty_right_empty
```



---
## test_merge_left_empty_right_notempty
```python
from test_merge import test_merge_left_empty_right_notempty
```



---
## test_merge_left_notempty_right_empty
```python
from test_merge import test_merge_left_notempty_right_empty
```



---
## test_merge_empty_frame
```python
from test_merge import test_merge_empty_frame
```



---
## test_merge_all_na_column
```python
from test_merge import test_merge_all_na_column
```



---
## test_merge_nosort
```python
from test_merge import test_merge_nosort
```



---
## test_merge_same_order_left_right
```python
from test_merge import test_merge_same_order_left_right
```



---
## test_merge_nan_right
```python
from test_merge import test_merge_nan_right
```



---
## test_merge_nan_right2
```python
from test_merge import test_merge_nan_right2
```



---
## test_merge_type
```python
from test_merge import test_merge_type
```



---
## test_join_append_timedeltas
```python
from test_merge import test_join_append_timedeltas
```



---
## test_join_append_timedeltas2
```python
from test_merge import test_join_append_timedeltas2
```



---
## test_other_datetime_unit
```python
from test_merge import test_other_datetime_unit
```



---
## test_other_timedelta_unit
```python
from test_merge import test_other_timedelta_unit
```



---
## test_overlapping_columns_error_message
```python
from test_merge import test_overlapping_columns_error_message
```



---
## test_merge_on_datetime64tz
```python
from test_merge import test_merge_on_datetime64tz
```



---
## test_merge_datetime64tz_values
```python
from test_merge import test_merge_datetime64tz_values
```



---
## test_merge_on_datetime64tz_empty
```python
from test_merge import test_merge_on_datetime64tz_empty
```



---
## test_merge_datetime64tz_with_dst_transition
```python
from test_merge import test_merge_datetime64tz_with_dst_transition
```



---
## test_merge_non_unique_period_index
```python
from test_merge import test_merge_non_unique_period_index
```



---
## test_merge_on_periods
```python
from test_merge import test_merge_on_periods
```



---
## test_merge_period_values
```python
from test_merge import test_merge_period_values
```



---
## test_indicator
```python
from test_merge import test_indicator
```



---
## test_merge_indicator_arg_validation
```python
from test_merge import test_merge_indicator_arg_validation
```



---
## test_merge_indicator_result_integrity
```python
from test_merge import test_merge_indicator_result_integrity
```



---
## test_merge_indicator_invalid
```python
from test_merge import test_merge_indicator_invalid
```



---
## test_merge_indicator_multiple_columns
```python
from test_merge import test_merge_indicator_multiple_columns
```



---
## test_validation
```python
from test_merge import test_validation
```



---
## test_merge_two_empty_df_no_division_error
```python
from test_merge import test_merge_two_empty_df_no_division_error
```



---
## test_merge_on_index_with_more_values
```python
from test_merge import test_merge_on_index_with_more_values
```



---
## test_merge_right_index_right
```python
from test_merge import test_merge_right_index_right
```



---
## test_merge_preserves_row_order
```python
from test_merge import test_merge_preserves_row_order
```



---
## test_merge_take_missing_values_from_index_of_other_dtype
```python
from test_merge import test_merge_take_missing_values_from_index_of_other_dtype
```



---
## test_merge_readonly
```python
from test_merge import test_merge_readonly
```



---
## test_different
```python
from test_merge import test_different
```



---
## test_join_multi_dtypes
```python
from test_merge import test_join_multi_dtypes
```



---
## test_merge_on_ints_floats
```python
from test_merge import test_merge_on_ints_floats
```



---
## test_merge_key_dtype_cast
```python
from test_merge import test_merge_key_dtype_cast
```



---
## test_merge_on_ints_floats_warning
```python
from test_merge import test_merge_on_ints_floats_warning
```



---
## test_merge_incompat_infer_boolean_object
```python
from test_merge import test_merge_incompat_infer_boolean_object
```



---
## test_merge_incompat_infer_boolean_object_with_missing
```python
from test_merge import test_merge_incompat_infer_boolean_object_with_missing
```



---
## test_merge_incompat_dtypes_are_ok
```python
from test_merge import test_merge_incompat_dtypes_are_ok
```



---
## test_merge_incompat_dtypes_error
```python
from test_merge import test_merge_incompat_dtypes_error
```



---
## test_merge_EA_dtype
```python
from test_merge import test_merge_EA_dtype
```



---
## test_merge_string_dtype
```python
from test_merge import test_merge_string_dtype
```



---
## test_merge_bool_dtype
```python
from test_merge import test_merge_bool_dtype
```



---
## test_merge_ea_with_string
```python
from test_merge import test_merge_ea_with_string
```



---
## test_merge_empty
```python
from test_merge import test_merge_empty
```



---
## test_identical
```python
from test_merge import test_identical
```



---
## test_basic
```python
from test_merge import test_basic
```



---
## test_merge_categorical
```python
from test_merge import test_merge_categorical
```



---
## tests_merge_categorical_unordered_equal
```python
from test_merge import tests_merge_categorical_unordered_equal
```



---
## test_multiindex_merge_with_unordered_categoricalindex
```python
from test_merge import test_multiindex_merge_with_unordered_categoricalindex
```



---
## test_other_columns
```python
from test_merge import test_other_columns
```



---
## test_dtype_on_merged_different
```python
from test_merge import test_dtype_on_merged_different
```



---
## test_self_join_multiple_categories
```python
from test_merge import test_self_join_multiple_categories
```



---
## test_dtype_on_categorical_dates
```python
from test_merge import test_dtype_on_categorical_dates
```



---
## test_merging_with_bool_or_int_cateorical_column
```python
from test_merge import test_merging_with_bool_or_int_cateorical_column
```



---
## test_merge_on_int_array
```python
from test_merge import test_merge_on_int_array
```



---
## test_merge_on_indexes
```python
from test_merge import test_merge_on_indexes
```



---
## check1
```python
from test_merge import check1
```



---
## check2
```python
from test_merge import check2
```



---
## NotADataFrame
```python
from test_merge import NotADataFrame
```



---
## _constructor
```python
from test_merge import _constructor
```



---
## __name__
```python
from test_merge_cross import __name__
```



---
## test_merge_cross
```python
from test_merge_cross import test_merge_cross
```



---
## test_merge_cross_error_reporting
```python
from test_merge_cross import test_merge_cross_error_reporting
```



---
## test_merge_cross_mixed_dtypes
```python
from test_merge_cross import test_merge_cross_mixed_dtypes
```



---
## test_merge_cross_more_than_one_column
```python
from test_merge_cross import test_merge_cross_more_than_one_column
```



---
## test_merge_cross_null_values
```python
from test_merge_cross import test_merge_cross_null_values
```



---
## test_join_cross_error_reporting
```python
from test_merge_cross import test_join_cross_error_reporting
```



---
## test_merge_cross_series
```python
from test_merge_cross import test_merge_cross_series
```



---
## __name__
```python
from test_multi import __name__
```



---
## left
```python
from test_multi import left
```

left dataframe (not multi-indexed) for multi-index join tests

---
## right
```python
from test_multi import right
```

right dataframe (multi-indexed) for multi-index join tests

---
## left_multi
```python
from test_multi import left_multi
```



---
## right_multi
```python
from test_multi import right_multi
```



---
## on_cols_multi
```python
from test_multi import on_cols_multi
```



---
## TestMergeMulti
```python
from test_multi import TestMergeMulti
```



---
## TestJoinMultiMulti
```python
from test_multi import TestJoinMultiMulti
```



---
## test_merge_on_multikey
```python
from test_multi import test_merge_on_multikey
```



---
## test_left_join_multi_index
```python
from test_multi import test_left_join_multi_index
```



---
## test_merge_right_vs_left
```python
from test_multi import test_merge_right_vs_left
```



---
## test_merge_multiple_cols_with_mixed_cols_index
```python
from test_multi import test_merge_multiple_cols_with_mixed_cols_index
```



---
## test_compress_group_combinations
```python
from test_multi import test_compress_group_combinations
```



---
## test_left_join_index_preserve_order
```python
from test_multi import test_left_join_index_preserve_order
```



---
## test_left_join_index_multi_match_multiindex
```python
from test_multi import test_left_join_index_multi_match_multiindex
```



---
## test_left_join_index_multi_match
```python
from test_multi import test_left_join_index_multi_match
```



---
## test_left_merge_na_buglet
```python
from test_multi import test_left_merge_na_buglet
```



---
## test_merge_na_keys
```python
from test_multi import test_merge_na_keys
```



---
## test_merge_datetime_index
```python
from test_multi import test_merge_datetime_index
```



---
## test_merge_datetime_multi_index_empty_df
```python
from test_multi import test_merge_datetime_multi_index_empty_df
```



---
## household
```python
from test_multi import household
```



---
## portfolio
```python
from test_multi import portfolio
```



---
## expected
```python
from test_multi import expected
```



---
## test_join_multi_levels
```python
from test_multi import test_join_multi_levels
```



---
## test_join_multi_levels_merge_equivalence
```python
from test_multi import test_join_multi_levels_merge_equivalence
```



---
## test_join_multi_levels_outer
```python
from test_multi import test_join_multi_levels_outer
```



---
## test_join_multi_levels_invalid
```python
from test_multi import test_join_multi_levels_invalid
```



---
## test_join_multi_levels2
```python
from test_multi import test_join_multi_levels2
```



---
## test_join_multi_multi
```python
from test_multi import test_join_multi_multi
```



---
## test_join_multi_empty_frames
```python
from test_multi import test_join_multi_empty_frames
```



---
## test_single_common_level
```python
from test_multi import test_single_common_level
```



---
## test_join_multi_wrong_order
```python
from test_multi import test_join_multi_wrong_order
```



---
## bind_cols
```python
from test_multi import bind_cols
```



---
## run_asserts
```python
from test_multi import run_asserts
```



---
## __name__
```python
from test_merge_ordered import __name__
```



---
## left
```python
from test_merge_ordered import left
```



---
## right
```python
from test_merge_ordered import right
```



---
## TestMergeOrdered
```python
from test_merge_ordered import TestMergeOrdered
```



---
## test_basic
```python
from test_merge_ordered import test_basic
```



---
## test_ffill
```python
from test_merge_ordered import test_ffill
```



---
## test_multigroup
```python
from test_merge_ordered import test_multigroup
```



---
## test_merge_type
```python
from test_merge_ordered import test_merge_type
```



---
## test_empty_sequence_concat
```python
from test_merge_ordered import test_empty_sequence_concat
```



---
## test_empty_sequence_concat_ok
```python
from test_merge_ordered import test_empty_sequence_concat_ok
```



---
## test_doc_example
```python
from test_merge_ordered import test_doc_example
```



---
## test_list_type_by
```python
from test_merge_ordered import test_list_type_by
```



---
## test_left_by_length_equals_to_right_shape0
```python
from test_merge_ordered import test_left_by_length_equals_to_right_shape0
```



---
## test_elements_not_in_by_but_in_df
```python
from test_merge_ordered import test_elements_not_in_by_but_in_df
```



---
## test_ffill_validate_fill_method
```python
from test_merge_ordered import test_ffill_validate_fill_method
```



---
## test_ffill_left_merge
```python
from test_merge_ordered import test_ffill_left_merge
```



---
## NotADataFrame
```python
from test_merge_ordered import NotADataFrame
```



---
## _constructor
```python
from test_merge_ordered import _constructor
```



---
## __name__
```python
from test_decimal import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## dtype
```python
from test_decimal import dtype
```



---
## data
```python
from test_decimal import data
```



---
## data_for_twos
```python
from test_decimal import data_for_twos
```



---
## data_missing
```python
from test_decimal import data_missing
```



---
## data_for_sorting
```python
from test_decimal import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_decimal import data_missing_for_sorting
```



---
## na_cmp
```python
from test_decimal import na_cmp
```



---
## data_for_grouping
```python
from test_decimal import data_for_grouping
```



---
## TestDecimalArray
```python
from test_decimal import TestDecimalArray
```



---
## test_take_na_value_other_decimal
```python
from test_decimal import test_take_na_value_other_decimal
```



---
## test_series_constructor_coerce_data_to_extension_dtype
```python
from test_decimal import test_series_constructor_coerce_data_to_extension_dtype
```



---
## test_series_constructor_with_dtype
```python
from test_decimal import test_series_constructor_with_dtype
```



---
## test_dataframe_constructor_with_dtype
```python
from test_decimal import test_dataframe_constructor_with_dtype
```



---
## test_astype_dispatches
```python
from test_decimal import test_astype_dispatches
```



---
## DecimalArrayWithoutFromSequence
```python
from test_decimal import DecimalArrayWithoutFromSequence
```

Helper class for testing error handling in _from_sequence.

---
## DecimalArrayWithoutCoercion
```python
from test_decimal import DecimalArrayWithoutCoercion
```



---
## test_combine_from_sequence_raises
```python
from test_decimal import test_combine_from_sequence_raises
```



---
## test_scalar_ops_from_sequence_raises
```python
from test_decimal import test_scalar_ops_from_sequence_raises
```



---
## test_divmod_array
```python
from test_decimal import test_divmod_array
```



---
## test_ufunc_fallback
```python
from test_decimal import test_ufunc_fallback
```



---
## test_array_ufunc
```python
from test_decimal import test_array_ufunc
```



---
## test_array_ufunc_series
```python
from test_decimal import test_array_ufunc_series
```



---
## test_array_ufunc_series_scalar_other
```python
from test_decimal import test_array_ufunc_series_scalar_other
```



---
## test_array_ufunc_series_defer
```python
from test_decimal import test_array_ufunc_series_defer
```



---
## test_groupby_agg
```python
from test_decimal import test_groupby_agg
```



---
## test_groupby_agg_ea_method
```python
from test_decimal import test_groupby_agg_ea_method
```



---
## test_indexing_no_materialize
```python
from test_decimal import test_indexing_no_materialize
```



---
## test_to_numpy_keyword
```python
from test_decimal import test_to_numpy_keyword
```



---
## test_array_copy_on_write
```python
from test_decimal import test_array_copy_on_write
```



---
## _get_expected_exception
```python
from test_decimal import _get_expected_exception
```



---
## _supports_reduction
```python
from test_decimal import _supports_reduction
```



---
## check_reduce
```python
from test_decimal import check_reduce
```



---
## test_reduce_series_numeric
```python
from test_decimal import test_reduce_series_numeric
```



---
## test_reduce_frame
```python
from test_decimal import test_reduce_frame
```



---
## test_compare_scalar
```python
from test_decimal import test_compare_scalar
```



---
## test_compare_array
```python
from test_decimal import test_compare_array
```



---
## test_arith_series_with_array
```python
from test_decimal import test_arith_series_with_array
```



---
## test_fillna_frame
```python
from test_decimal import test_fillna_frame
```



---
## test_fillna_limit_pad
```python
from test_decimal import test_fillna_limit_pad
```



---
## test_ffill_limit_area
```python
from test_decimal import test_ffill_limit_area
```



---
## test_fillna_limit_backfill
```python
from test_decimal import test_fillna_limit_backfill
```



---
## test_fillna_no_op_returns_copy
```python
from test_decimal import test_fillna_no_op_returns_copy
```



---
## test_fillna_series
```python
from test_decimal import test_fillna_series
```



---
## test_fillna_series_method
```python
from test_decimal import test_fillna_series_method
```



---
## test_fillna_copy_frame
```python
from test_decimal import test_fillna_copy_frame
```



---
## test_fillna_copy_series
```python
from test_decimal import test_fillna_copy_series
```



---
## test_value_counts
```python
from test_decimal import test_value_counts
```



---
## test_series_repr
```python
from test_decimal import test_series_repr
```



---
## test_unary_ufunc_dunder_equivalence
```python
from test_decimal import test_unary_ufunc_dunder_equivalence
```



---
## _from_sequence
```python
from test_decimal import _from_sequence
```



---
## _create_arithmetic_method
```python
from test_decimal import _create_arithmetic_method
```



---
## construct_array_type
```python
from test_decimal import construct_array_type
```



---
## DecimalArray__my_sum
```python
from test_decimal import DecimalArray__my_sum
```



---
## DecimalArray__array__
```python
from test_decimal import DecimalArray__array__
```



---
## DecimalDtype
```python
from array import DecimalDtype
```



---
## DecimalArray
```python
from array import DecimalArray
```



---
## to_decimal
```python
from array import to_decimal
```



---
## make_data
```python
from array import make_data
```



---
## construct_array_type
```python
from array import construct_array_type
```

Return the array type associated with this dtype.

Returns
-------
type

---
## _is_numeric
```python
from array import _is_numeric
```



---
## _na_value
```python
from array import _na_value
```



---
## reconstruct
```python
from array import reconstruct
```



---
## convert_values
```python
from array import convert_values
```



---
## __name__
```python
from test_array_with_attr import __name__
```



---
## test_concat_with_all_na
```python
from test_array_with_attr import test_concat_with_all_na
```



---
## FloatAttrDtype
```python
from array import FloatAttrDtype
```



---
## FloatAttrArray
```python
from array import FloatAttrArray
```



---
## DateDtype
```python
from array import DateDtype
```



---
## DateArray
```python
from array import DateArray
```



---
## type
```python
from array import type
```



---
## name
```python
from array import name
```



---
## construct_from_string
```python
from array import construct_from_string
```



---
## na_value
```python
from array import na_value
```



---
## __name__
```python
from test_json import __name__
```



---
## dtype
```python
from test_json import dtype
```



---
## data
```python
from test_json import data
```

Length-100 PeriodArray for semantics test.

---
## data_missing
```python
from test_json import data_missing
```

Length 2 array with [NA, Valid]

---
## data_for_sorting
```python
from test_json import data_for_sorting
```



---
## data_missing_for_sorting
```python
from test_json import data_missing_for_sorting
```



---
## na_cmp
```python
from test_json import na_cmp
```



---
## data_for_grouping
```python
from test_json import data_for_grouping
```



---
## TestJSONArray
```python
from test_json import TestJSONArray
```



---
## custom_assert_series_equal
```python
from test_json import custom_assert_series_equal
```



---
## custom_assert_frame_equal
```python
from test_json import custom_assert_frame_equal
```



---
## test_custom_asserts
```python
from test_json import test_custom_asserts
```



---
## test_contains
```python
from test_json import test_contains
```



---
## test_from_dtype
```python
from test_json import test_from_dtype
```



---
## test_series_constructor_no_data_with_index
```python
from test_json import test_series_constructor_no_data_with_index
```



---
## test_series_constructor_scalar_na_with_index
```python
from test_json import test_series_constructor_scalar_na_with_index
```



---
## test_series_constructor_scalar_with_index
```python
from test_json import test_series_constructor_scalar_with_index
```



---
## test_stack
```python
from test_json import test_stack
```

The test does .astype(object).stack(future_stack=True). If we happen to have
any missing values in `data`, then we'll end up with different
rows since we consider `{}` NA, but `.astype(object)` doesn't.

---
## test_unstack
```python
from test_json import test_unstack
```



---
## test_fillna_series
```python
from test_json import test_fillna_series
```

We treat dictionaries as a mapping in fillna, not a scalar.

---
## test_fillna_frame
```python
from test_json import test_fillna_frame
```

We treat dictionaries as a mapping in fillna, not a scalar.

---
## test_ffill_limit_area
```python
from test_json import test_ffill_limit_area
```



---
## test_value_counts
```python
from test_json import test_value_counts
```



---
## test_value_counts_with_normalize
```python
from test_json import test_value_counts_with_normalize
```



---
## test_sort_values_frame
```python
from test_json import test_sort_values_frame
```



---
## test_sort_values
```python
from test_json import test_sort_values
```



---
## test_sort_values_missing
```python
from test_json import test_sort_values_missing
```



---
## test_combine_le
```python
from test_json import test_combine_le
```



---
## test_combine_first
```python
from test_json import test_combine_first
```



---
## test_where_series
```python
from test_json import test_where_series
```



---
## test_searchsorted
```python
from test_json import test_searchsorted
```



---
## test_equals
```python
from test_json import test_equals
```



---
## test_fillna_copy_frame
```python
from test_json import test_fillna_copy_frame
```



---
## test_equals_same_data_different_object
```python
from test_json import test_equals_same_data_different_object
```



---
## test_astype_str
```python
from test_json import test_astype_str
```

This currently fails in NumPy on np.array(self, dtype=str) with

*** ValueError: setting an array element with a sequence

---
## test_groupby_extension_transform
```python
from test_json import test_groupby_extension_transform
```

This currently fails in Series.name.setter, since the
name must be hashable, but the value is a dictionary.
I think this is what we want, i.e. `.name` should be the original
values, and not the values for factorization.

---
## test_groupby_extension_apply
```python
from test_json import test_groupby_extension_apply
```

This fails in Index._do_unique_check with

>   hash(val)
E   TypeError: unhashable type: 'UserDict' with

I suspect that once we support Index[ExtensionArray],
we'll be able to dispatch unique.

---
## test_groupby_extension_agg
```python
from test_json import test_groupby_extension_agg
```

This fails when we get to tm.assert_series_equal when left.index
contains dictionaries, which are not hashable.

---
## test_groupby_extension_no_sort
```python
from test_json import test_groupby_extension_no_sort
```

This fails when we get to tm.assert_series_equal when left.index
contains dictionaries, which are not hashable.

---
## test_arith_frame_with_scalar
```python
from test_json import test_arith_frame_with_scalar
```



---
## test_compare_array
```python
from test_json import test_compare_array
```



---
## test_setitem_loc_scalar_mixed
```python
from test_json import test_setitem_loc_scalar_mixed
```



---
## test_setitem_loc_scalar_multiple_homogoneous
```python
from test_json import test_setitem_loc_scalar_multiple_homogoneous
```



---
## test_setitem_iloc_scalar_mixed
```python
from test_json import test_setitem_iloc_scalar_mixed
```



---
## test_setitem_iloc_scalar_multiple_homogoneous
```python
from test_json import test_setitem_iloc_scalar_multiple_homogoneous
```



---
## test_setitem_mask
```python
from test_json import test_setitem_mask
```



---
## test_setitem_mask_raises
```python
from test_json import test_setitem_mask_raises
```



---
## test_setitem_mask_boolean_array_with_na
```python
from test_json import test_setitem_mask_boolean_array_with_na
```



---
## test_setitem_integer_array
```python
from test_json import test_setitem_integer_array
```



---
## test_setitem_integer_with_missing_raises
```python
from test_json import test_setitem_integer_with_missing_raises
```



---
## test_setitem_scalar_key_sequence_raise
```python
from test_json import test_setitem_scalar_key_sequence_raise
```



---
## test_setitem_with_expansion_dataframe_column
```python
from test_json import test_setitem_with_expansion_dataframe_column
```



---
## test_setitem_frame_2d_values
```python
from test_json import test_setitem_frame_2d_values
```



---
## test_setitem_mask_broadcast
```python
from test_json import test_setitem_mask_broadcast
```



---
## test_setitem_slice
```python
from test_json import test_setitem_slice
```



---
## test_setitem_loc_iloc_slice
```python
from test_json import test_setitem_loc_iloc_slice
```



---
## test_setitem_slice_mismatch_length_raises
```python
from test_json import test_setitem_slice_mismatch_length_raises
```



---
## test_setitem_slice_array
```python
from test_json import test_setitem_slice_array
```



---
## test_setitem_invalid
```python
from test_json import test_setitem_invalid
```



---
## test_setitem_2d_values
```python
from test_json import test_setitem_2d_values
```



---
## test_EA_types
```python
from test_json import test_EA_types
```



---
## JSONDtype
```python
from array import JSONDtype
```



---
## JSONArray
```python
from array import JSONArray
```



---
## __eq__
```python
from array import __eq__
```



---
## __ne__
```python
from array import __ne__
```



---
## _values_for_argsort
```python
from array import _values_for_argsort
```



---
## __name__
```python
from test_list import __name__
```



---
## dtype
```python
from test_list import dtype
```



---
## data
```python
from test_list import data
```

Length-100 ListArray for semantics test.

---
## test_to_csv
```python
from test_list import test_to_csv
```



---
## ListDtype
```python
from array import ListDtype
```



---
## ListArray
```python
from array import ListArray
```



---
## BaseMissingTests
```python
from missing import BaseMissingTests
```



---
## test_isna
```python
from missing import test_isna
```



---
## test_isna_returns_copy
```python
from missing import test_isna_returns_copy
```



---
## test_dropna_array
```python
from missing import test_dropna_array
```



---
## test_dropna_series
```python
from missing import test_dropna_series
```



---
## test_dropna_frame
```python
from missing import test_dropna_frame
```



---
## test_fillna_scalar
```python
from missing import test_fillna_scalar
```



---
## test_fillna_limit_pad
```python
from missing import test_fillna_limit_pad
```



---
## test_ffill_limit_area
```python
from missing import test_ffill_limit_area
```



---
## test_fillna_limit_backfill
```python
from missing import test_fillna_limit_backfill
```



---
## test_fillna_no_op_returns_copy
```python
from missing import test_fillna_no_op_returns_copy
```



---
## test_fillna_series
```python
from missing import test_fillna_series
```



---
## test_fillna_series_method
```python
from missing import test_fillna_series_method
```



---
## test_fillna_frame
```python
from missing import test_fillna_frame
```



---
## test_fillna_fill_other
```python
from missing import test_fillna_fill_other
```



---
## test_use_inf_as_na_no_effect
```python
from missing import test_use_inf_as_na_no_effect
```



---
## __name__
```python
from reshaping import __name__
```



---
## BaseReshapingTests
```python
from reshaping import BaseReshapingTests
```

Tests for reshaping and concatenation.

---
## test_concat
```python
from reshaping import test_concat
```



---
## test_concat_all_na_block
```python
from reshaping import test_concat_all_na_block
```



---
## test_concat_mixed_dtypes
```python
from reshaping import test_concat_mixed_dtypes
```



---
## test_concat_columns
```python
from reshaping import test_concat_columns
```



---
## test_concat_extension_arrays_copy_false
```python
from reshaping import test_concat_extension_arrays_copy_false
```



---
## test_concat_with_reindex
```python
from reshaping import test_concat_with_reindex
```



---
## test_align
```python
from reshaping import test_align
```



---
## test_align_frame
```python
from reshaping import test_align_frame
```



---
## test_align_series_frame
```python
from reshaping import test_align_series_frame
```



---
## test_set_frame_expand_regular_with_extension
```python
from reshaping import test_set_frame_expand_regular_with_extension
```



---
## test_set_frame_expand_extension_with_regular
```python
from reshaping import test_set_frame_expand_extension_with_regular
```



---
## test_set_frame_overwrite_object
```python
from reshaping import test_set_frame_overwrite_object
```



---
## test_merge
```python
from reshaping import test_merge
```



---
## test_merge_on_extension_array
```python
from reshaping import test_merge_on_extension_array
```



---
## test_merge_on_extension_array_duplicates
```python
from reshaping import test_merge_on_extension_array_duplicates
```



---
## test_stack
```python
from reshaping import test_stack
```



---
## test_unstack
```python
from reshaping import test_unstack
```



---
## test_ravel
```python
from reshaping import test_ravel
```



---
## test_transpose
```python
from reshaping import test_transpose
```



---
## test_transpose_frame
```python
from reshaping import test_transpose_frame
```



---
## BaseIndexTests
```python
from index import BaseIndexTests
```

Tests for Index object backed by an ExtensionArray

---
## test_index_from_array
```python
from index import test_index_from_array
```



---
## test_index_from_listlike_with_dtype
```python
from index import test_index_from_listlike_with_dtype
```



---
## __name__
```python
from methods import __name__
```



---
## BaseMethodsTests
```python
from methods import BaseMethodsTests
```

Various Series and DataFrame methods.

---
## test_hash_pandas_object
```python
from methods import test_hash_pandas_object
```



---
## test_value_counts_default_dropna
```python
from methods import test_value_counts_default_dropna
```



---
## test_value_counts
```python
from methods import test_value_counts
```



---
## test_value_counts_with_normalize
```python
from methods import test_value_counts_with_normalize
```



---
## test_count
```python
from methods import test_count
```



---
## test_series_count
```python
from methods import test_series_count
```



---
## test_apply_simple_series
```python
from methods import test_apply_simple_series
```



---
## test_map
```python
from methods import test_map
```



---
## test_argsort
```python
from methods import test_argsort
```



---
## test_argsort_missing_array
```python
from methods import test_argsort_missing_array
```



---
## test_argsort_missing
```python
from methods import test_argsort_missing
```



---
## test_argmin_argmax
```python
from methods import test_argmin_argmax
```



---
## test_argmin_argmax_empty_array
```python
from methods import test_argmin_argmax_empty_array
```



---
## test_argmin_argmax_all_na
```python
from methods import test_argmin_argmax_all_na
```



---
## test_argreduce_series
```python
from methods import test_argreduce_series
```



---
## test_argmax_argmin_no_skipna_notimplemented
```python
from methods import test_argmax_argmin_no_skipna_notimplemented
```



---
## test_nargsort
```python
from methods import test_nargsort
```



---
## test_sort_values
```python
from methods import test_sort_values
```



---
## test_sort_values_missing
```python
from methods import test_sort_values_missing
```



---
## test_sort_values_frame
```python
from methods import test_sort_values_frame
```



---
## test_duplicated
```python
from methods import test_duplicated
```



---
## test_unique
```python
from methods import test_unique
```



---
## test_factorize
```python
from methods import test_factorize
```



---
## test_factorize_equivalence
```python
from methods import test_factorize_equivalence
```



---
## test_factorize_empty
```python
from methods import test_factorize_empty
```



---
## test_fillna_copy_frame
```python
from methods import test_fillna_copy_frame
```



---
## test_fillna_copy_series
```python
from methods import test_fillna_copy_series
```



---
## test_fillna_length_mismatch
```python
from methods import test_fillna_length_mismatch
```



---
## test_combine_le
```python
from methods import test_combine_le
```



---
## test_combine_add
```python
from methods import test_combine_add
```



---
## test_combine_first
```python
from methods import test_combine_first
```



---
## test_container_shift
```python
from methods import test_container_shift
```



---
## test_shift_0_periods
```python
from methods import test_shift_0_periods
```



---
## test_diff
```python
from methods import test_diff
```



---
## test_shift_non_empty_array
```python
from methods import test_shift_non_empty_array
```



---
## test_shift_empty_array
```python
from methods import test_shift_empty_array
```



---
## test_shift_zero_copies
```python
from methods import test_shift_zero_copies
```



---
## test_shift_fill_value
```python
from methods import test_shift_fill_value
```



---
## test_not_hashable
```python
from methods import test_not_hashable
```



---
## test_hash_pandas_object_works
```python
from methods import test_hash_pandas_object_works
```



---
## test_searchsorted
```python
from methods import test_searchsorted
```



---
## _test_searchsorted_bool_dtypes
```python
from methods import _test_searchsorted_bool_dtypes
```



---
## test_where_series
```python
from methods import test_where_series
```



---
## test_repeat
```python
from methods import test_repeat
```



---
## test_repeat_raises
```python
from methods import test_repeat_raises
```



---
## test_delete
```python
from methods import test_delete
```



---
## test_insert
```python
from methods import test_insert
```



---
## test_insert_invalid
```python
from methods import test_insert_invalid
```



---
## test_insert_invalid_loc
```python
from methods import test_insert_invalid_loc
```



---
## test_equals
```python
from methods import test_equals
```



---
## test_equals_same_data_different_object
```python
from methods import test_equals_same_data_different_object
```



---
## __name__
```python
from reduce import __name__
```



---
## BaseReduceTests
```python
from reduce import BaseReduceTests
```

Reduction specific tests. Generally these only
make sense for numeric/boolean operations.

---
## BaseNoReduceTests
```python
from reduce import BaseNoReduceTests
```

we don't define any reductions

---
## BaseNumericReduceTests
```python
from reduce import BaseNumericReduceTests
```



---
## BaseBooleanReduceTests
```python
from reduce import BaseBooleanReduceTests
```



---
## _supports_reduction
```python
from reduce import _supports_reduction
```



---
## check_reduce
```python
from reduce import check_reduce
```



---
## _get_expected_reduction_dtype
```python
from reduce import _get_expected_reduction_dtype
```



---
## check_reduce_frame
```python
from reduce import check_reduce_frame
```



---
## test_reduce_series_boolean
```python
from reduce import test_reduce_series_boolean
```



---
## test_reduce_series_numeric
```python
from reduce import test_reduce_series_numeric
```



---
## test_reduce_frame
```python
from reduce import test_reduce_frame
```



---
## __name__
```python
from setitem import __name__
```



---
## BaseSetitemTests
```python
from setitem import BaseSetitemTests
```



---
## full_indexer
```python
from setitem import full_indexer
```

Fixture for an indexer to pass to obj.loc to get/set the full length of the
object.

In some cases, assumes that obj.index is the default RangeIndex.

---
## skip_if_immutable
```python
from setitem import skip_if_immutable
```



---
## test_is_immutable
```python
from setitem import test_is_immutable
```



---
## test_setitem_scalar_series
```python
from setitem import test_setitem_scalar_series
```



---
## test_setitem_sequence
```python
from setitem import test_setitem_sequence
```



---
## test_setitem_sequence_mismatched_length_raises
```python
from setitem import test_setitem_sequence_mismatched_length_raises
```



---
## test_setitem_empty_indexer
```python
from setitem import test_setitem_empty_indexer
```



---
## test_setitem_sequence_broadcasts
```python
from setitem import test_setitem_sequence_broadcasts
```



---
## test_setitem_scalar
```python
from setitem import test_setitem_scalar
```



---
## test_setitem_loc_scalar_mixed
```python
from setitem import test_setitem_loc_scalar_mixed
```



---
## test_setitem_loc_scalar_single
```python
from setitem import test_setitem_loc_scalar_single
```



---
## test_setitem_loc_scalar_multiple_homogoneous
```python
from setitem import test_setitem_loc_scalar_multiple_homogoneous
```



---
## test_setitem_iloc_scalar_mixed
```python
from setitem import test_setitem_iloc_scalar_mixed
```



---
## test_setitem_iloc_scalar_single
```python
from setitem import test_setitem_iloc_scalar_single
```



---
## test_setitem_iloc_scalar_multiple_homogoneous
```python
from setitem import test_setitem_iloc_scalar_multiple_homogoneous
```



---
## test_setitem_mask
```python
from setitem import test_setitem_mask
```



---
## test_setitem_mask_raises
```python
from setitem import test_setitem_mask_raises
```



---
## test_setitem_mask_boolean_array_with_na
```python
from setitem import test_setitem_mask_boolean_array_with_na
```



---
## test_setitem_integer_array
```python
from setitem import test_setitem_integer_array
```



---
## test_setitem_integer_with_missing_raises
```python
from setitem import test_setitem_integer_with_missing_raises
```



---
## test_setitem_mask_aligned
```python
from setitem import test_setitem_mask_aligned
```



---
## test_setitem_mask_broadcast
```python
from setitem import test_setitem_mask_broadcast
```



---
## test_setitem_expand_columns
```python
from setitem import test_setitem_expand_columns
```



---
## test_setitem_expand_with_extension
```python
from setitem import test_setitem_expand_with_extension
```



---
## test_setitem_frame_invalid_length
```python
from setitem import test_setitem_frame_invalid_length
```



---
## test_setitem_tuple_index
```python
from setitem import test_setitem_tuple_index
```



---
## test_setitem_slice
```python
from setitem import test_setitem_slice
```



---
## test_setitem_loc_iloc_slice
```python
from setitem import test_setitem_loc_iloc_slice
```



---
## test_setitem_slice_mismatch_length_raises
```python
from setitem import test_setitem_slice_mismatch_length_raises
```



---
## test_setitem_slice_array
```python
from setitem import test_setitem_slice_array
```



---
## test_setitem_scalar_key_sequence_raise
```python
from setitem import test_setitem_scalar_key_sequence_raise
```



---
## test_setitem_preserves_views
```python
from setitem import test_setitem_preserves_views
```



---
## test_setitem_with_expansion_dataframe_column
```python
from setitem import test_setitem_with_expansion_dataframe_column
```



---
## test_setitem_with_expansion_row
```python
from setitem import test_setitem_with_expansion_row
```



---
## test_setitem_series
```python
from setitem import test_setitem_series
```



---
## test_setitem_frame_2d_values
```python
from setitem import test_setitem_frame_2d_values
```



---
## test_delitem_series
```python
from setitem import test_delitem_series
```



---
## test_setitem_invalid
```python
from setitem import test_setitem_invalid
```



---
## test_setitem_2d_values
```python
from setitem import test_setitem_2d_values
```



---
## BaseDtypeTests
```python
from dtype import BaseDtypeTests
```

Base class for ExtensionDtype classes

---
## test_name
```python
from dtype import test_name
```



---
## test_kind
```python
from dtype import test_kind
```



---
## test_is_dtype_from_name
```python
from dtype import test_is_dtype_from_name
```



---
## test_is_dtype_unboxes_dtype
```python
from dtype import test_is_dtype_unboxes_dtype
```



---
## test_is_dtype_from_self
```python
from dtype import test_is_dtype_from_self
```



---
## test_is_dtype_other_input
```python
from dtype import test_is_dtype_other_input
```



---
## test_is_not_string_type
```python
from dtype import test_is_not_string_type
```



---
## test_is_not_object_type
```python
from dtype import test_is_not_object_type
```



---
## test_eq_with_str
```python
from dtype import test_eq_with_str
```



---
## test_eq_with_numpy_object
```python
from dtype import test_eq_with_numpy_object
```



---
## test_eq_with_self
```python
from dtype import test_eq_with_self
```



---
## test_array_type
```python
from dtype import test_array_type
```



---
## test_check_dtype
```python
from dtype import test_check_dtype
```



---
## test_hashable
```python
from dtype import test_hashable
```



---
## test_str
```python
from dtype import test_str
```



---
## test_eq
```python
from dtype import test_eq
```



---
## test_construct_from_string_own_name
```python
from dtype import test_construct_from_string_own_name
```



---
## test_construct_from_string_another_type_raises
```python
from dtype import test_construct_from_string_another_type_raises
```



---
## test_construct_from_string_wrong_type_raises
```python
from dtype import test_construct_from_string_wrong_type_raises
```



---
## test_get_common_dtype
```python
from dtype import test_get_common_dtype
```



---
## test_infer_dtype
```python
from dtype import test_infer_dtype
```



---
## BaseParsingTests
```python
from io import BaseParsingTests
```



---
## test_EA_types
```python
from io import test_EA_types
```



---
## __name__
```python
from accumulate import __name__
```



---
## BaseAccumulateTests
```python
from accumulate import BaseAccumulateTests
```

Accumulation specific tests. Generally these only
make sense for numeric/boolean operations.

---
## _supports_accumulation
```python
from accumulate import _supports_accumulation
```



---
## check_accumulate
```python
from accumulate import check_accumulate
```



---
## test_accumulate_series
```python
from accumulate import test_accumulate_series
```



---
## BaseInterfaceTests
```python
from interface import BaseInterfaceTests
```

Tests that the basic interface is satisfied.

---
## test_len
```python
from interface import test_len
```



---
## test_size
```python
from interface import test_size
```



---
## test_ndim
```python
from interface import test_ndim
```



---
## test_can_hold_na_valid
```python
from interface import test_can_hold_na_valid
```



---
## test_contains
```python
from interface import test_contains
```



---
## test_memory_usage
```python
from interface import test_memory_usage
```



---
## test_array_interface
```python
from interface import test_array_interface
```



---
## test_is_extension_array_dtype
```python
from interface import test_is_extension_array_dtype
```



---
## test_no_values_attribute
```python
from interface import test_no_values_attribute
```



---
## test_is_numeric_honored
```python
from interface import test_is_numeric_honored
```



---
## test_isna_extension_array
```python
from interface import test_isna_extension_array
```



---
## test_copy
```python
from interface import test_copy
```



---
## test_view
```python
from interface import test_view
```



---
## test_tolist
```python
from interface import test_tolist
```



---
## ExtensionTests
```python
from __init__ import ExtensionTests
```



---
## __name__
```python
from getitem import __name__
```



---
## BaseGetitemTests
```python
from getitem import BaseGetitemTests
```

Tests for ExtensionArray.__getitem__.

---
## test_iloc_series
```python
from getitem import test_iloc_series
```



---
## test_iloc_frame
```python
from getitem import test_iloc_frame
```



---
## test_iloc_frame_single_block
```python
from getitem import test_iloc_frame_single_block
```



---
## test_loc_series
```python
from getitem import test_loc_series
```



---
## test_loc_frame
```python
from getitem import test_loc_frame
```



---
## test_loc_iloc_frame_single_dtype
```python
from getitem import test_loc_iloc_frame_single_dtype
```



---
## test_getitem_scalar
```python
from getitem import test_getitem_scalar
```



---
## test_getitem_invalid
```python
from getitem import test_getitem_invalid
```



---
## test_getitem_scalar_na
```python
from getitem import test_getitem_scalar_na
```



---
## test_getitem_empty
```python
from getitem import test_getitem_empty
```



---
## test_getitem_mask
```python
from getitem import test_getitem_mask
```



---
## test_getitem_mask_raises
```python
from getitem import test_getitem_mask_raises
```



---
## test_getitem_boolean_array_mask
```python
from getitem import test_getitem_boolean_array_mask
```



---
## test_getitem_boolean_na_treated_as_false
```python
from getitem import test_getitem_boolean_na_treated_as_false
```



---
## test_getitem_integer_array
```python
from getitem import test_getitem_integer_array
```



---
## test_getitem_integer_with_missing_raises
```python
from getitem import test_getitem_integer_with_missing_raises
```



---
## test_getitem_series_integer_with_missing_raises
```python
from getitem import test_getitem_series_integer_with_missing_raises
```



---
## test_getitem_slice
```python
from getitem import test_getitem_slice
```



---
## test_getitem_ellipsis_and_slice
```python
from getitem import test_getitem_ellipsis_and_slice
```



---
## test_get
```python
from getitem import test_get
```



---
## test_take_sequence
```python
from getitem import test_take_sequence
```



---
## test_take
```python
from getitem import test_take
```



---
## test_take_empty
```python
from getitem import test_take_empty
```



---
## test_take_negative
```python
from getitem import test_take_negative
```



---
## test_take_non_na_fill_value
```python
from getitem import test_take_non_na_fill_value
```



---
## test_take_pandas_style_negative_raises
```python
from getitem import test_take_pandas_style_negative_raises
```



---
## test_take_out_of_bounds_raises
```python
from getitem import test_take_out_of_bounds_raises
```



---
## test_take_series
```python
from getitem import test_take_series
```



---
## test_reindex
```python
from getitem import test_reindex
```



---
## test_reindex_non_na_fill_value
```python
from getitem import test_reindex_non_na_fill_value
```



---
## test_loc_len1
```python
from getitem import test_loc_len1
```



---
## test_item
```python
from getitem import test_item
```



---
## BaseOpsUtil
```python
from ops import BaseOpsUtil
```



---
## BaseArithmeticOpsTests
```python
from ops import BaseArithmeticOpsTests
```

Various Series and DataFrame arithmetic ops methods.

Subclasses supporting various ops should set the class variables
to indicate that they support ops of that kind

* series_scalar_exc = TypeError
* frame_scalar_exc = TypeError
* series_array_exc = TypeError
* divmod_exc = TypeError

---
## BaseComparisonOpsTests
```python
from ops import BaseComparisonOpsTests
```

Various Series and DataFrame comparison ops methods.

---
## BaseUnaryOpsTests
```python
from ops import BaseUnaryOpsTests
```



---
## _get_expected_exception
```python
from ops import _get_expected_exception
```



---
## _cast_pointwise_result
```python
from ops import _cast_pointwise_result
```



---
## get_op_from_name
```python
from ops import get_op_from_name
```



---
## check_opname
```python
from ops import check_opname
```



---
## _combine
```python
from ops import _combine
```



---
## _check_op
```python
from ops import _check_op
```



---
## _check_divmod_op
```python
from ops import _check_divmod_op
```



---
## test_arith_series_with_scalar
```python
from ops import test_arith_series_with_scalar
```



---
## test_arith_frame_with_scalar
```python
from ops import test_arith_frame_with_scalar
```



---
## test_arith_series_with_array
```python
from ops import test_arith_series_with_array
```



---
## test_divmod
```python
from ops import test_divmod
```



---
## test_divmod_series_array
```python
from ops import test_divmod_series_array
```



---
## test_add_series_with_extension_array
```python
from ops import test_add_series_with_extension_array
```



---
## test_direct_arith_with_ndframe_returns_not_implemented
```python
from ops import test_direct_arith_with_ndframe_returns_not_implemented
```



---
## _compare_other
```python
from ops import _compare_other
```



---
## test_compare_scalar
```python
from ops import test_compare_scalar
```



---
## test_compare_array
```python
from ops import test_compare_array
```



---
## test_invert
```python
from ops import test_invert
```



---
## test_unary_ufunc_dunder_equivalence
```python
from ops import test_unary_ufunc_dunder_equivalence
```



---
## __name__
```python
from dim2 import __name__
```

Tests for 2D compatibility.

---
## Dim2CompatTests
```python
from dim2 import Dim2CompatTests
```



---
## NDArrayBacked2DTests
```python
from dim2 import NDArrayBacked2DTests
```



---
## skip_if_doesnt_support_2d
```python
from dim2 import skip_if_doesnt_support_2d
```



---
## test_transpose
```python
from dim2 import test_transpose
```



---
## test_frame_from_2d_array
```python
from dim2 import test_frame_from_2d_array
```



---
## test_swapaxes
```python
from dim2 import test_swapaxes
```



---
## test_delete_2d
```python
from dim2 import test_delete_2d
```



---
## test_take_2d
```python
from dim2 import test_take_2d
```



---
## test_repr_2d
```python
from dim2 import test_repr_2d
```



---
## test_reshape
```python
from dim2 import test_reshape
```



---
## test_getitem_2d
```python
from dim2 import test_getitem_2d
```



---
## test_iter_2d
```python
from dim2 import test_iter_2d
```



---
## test_tolist_2d
```python
from dim2 import test_tolist_2d
```



---
## test_concat_2d
```python
from dim2 import test_concat_2d
```



---
## test_fillna_2d_method
```python
from dim2 import test_fillna_2d_method
```



---
## test_reductions_2d_axis_none
```python
from dim2 import test_reductions_2d_axis_none
```



---
## test_reductions_2d_axis0
```python
from dim2 import test_reductions_2d_axis0
```



---
## test_reductions_2d_axis1
```python
from dim2 import test_reductions_2d_axis1
```



---
## test_copy_order
```python
from dim2 import test_copy_order
```



---
## get_reduction_result_dtype
```python
from dim2 import get_reduction_result_dtype
```



---
## __name__
```python
from casting import __name__
```



---
## BaseCastingTests
```python
from casting import BaseCastingTests
```

Casting to and from ExtensionDtypes

---
## test_astype_object_series
```python
from casting import test_astype_object_series
```



---
## test_astype_object_frame
```python
from casting import test_astype_object_frame
```



---
## test_tolist
```python
from casting import test_tolist
```



---
## test_astype_str
```python
from casting import test_astype_str
```



---
## test_astype_string
```python
from casting import test_astype_string
```



---
## test_to_numpy
```python
from casting import test_to_numpy
```



---
## test_astype_empty_dataframe
```python
from casting import test_astype_empty_dataframe
```



---
## test_astype_own_type
```python
from casting import test_astype_own_type
```



---
## BaseGroupbyTests
```python
from groupby import BaseGroupbyTests
```

Groupby-specific tests.

---
## test_grouping_grouper
```python
from groupby import test_grouping_grouper
```



---
## test_groupby_extension_agg
```python
from groupby import test_groupby_extension_agg
```



---
## test_groupby_agg_extension
```python
from groupby import test_groupby_agg_extension
```



---
## test_groupby_extension_no_sort
```python
from groupby import test_groupby_extension_no_sort
```



---
## test_groupby_extension_transform
```python
from groupby import test_groupby_extension_transform
```



---
## test_groupby_extension_apply
```python
from groupby import test_groupby_extension_apply
```



---
## test_groupby_apply_identity
```python
from groupby import test_groupby_apply_identity
```



---
## test_in_numeric_groupby
```python
from groupby import test_in_numeric_groupby
```



---
## BaseExtensionTests
```python
from base import BaseExtensionTests
```



---
## BaseConstructorsTests
```python
from constructors import BaseConstructorsTests
```



---
## test_from_sequence_from_cls
```python
from constructors import test_from_sequence_from_cls
```



---
## test_array_from_scalars
```python
from constructors import test_array_from_scalars
```



---
## test_series_constructor
```python
from constructors import test_series_constructor
```



---
## test_series_constructor_no_data_with_index
```python
from constructors import test_series_constructor_no_data_with_index
```



---
## test_series_constructor_scalar_na_with_index
```python
from constructors import test_series_constructor_scalar_na_with_index
```



---
## test_series_constructor_scalar_with_index
```python
from constructors import test_series_constructor_scalar_with_index
```



---
## test_dataframe_constructor_from_dict
```python
from constructors import test_dataframe_constructor_from_dict
```



---
## test_dataframe_from_series
```python
from constructors import test_dataframe_from_series
```



---
## test_series_given_mismatched_index_raises
```python
from constructors import test_series_given_mismatched_index_raises
```



---
## test_from_dtype
```python
from constructors import test_from_dtype
```



---
## test_pandas_array
```python
from constructors import test_pandas_array
```



---
## test_pandas_array_dtype
```python
from constructors import test_pandas_array_dtype
```



---
## test_construct_empty_dataframe
```python
from constructors import test_construct_empty_dataframe
```



---
## test_empty
```python
from constructors import test_empty
```



---
## BasePrintingTests
```python
from printing import BasePrintingTests
```

Tests checking the formatting of your EA when printed.

---
## test_array_repr
```python
from printing import test_array_repr
```



---
## test_array_repr_unicode
```python
from printing import test_array_repr_unicode
```



---
## test_series_repr
```python
from printing import test_series_repr
```



---
## test_dataframe_repr
```python
from printing import test_dataframe_repr
```



---
## test_dtype_name_in_info
```python
from printing import test_dtype_name_in_info
```



---
## __name__
```python
from test_to_string import __name__
```



---
## _three_digit_exp
```python
from test_to_string import _three_digit_exp
```



---
## TestDataFrameToStringFormatters
```python
from test_to_string import TestDataFrameToStringFormatters
```



---
## TestDataFrameToStringColSpace
```python
from test_to_string import TestDataFrameToStringColSpace
```



---
## TestDataFrameToStringHeader
```python
from test_to_string import TestDataFrameToStringHeader
```



---
## TestDataFrameToStringLineWidth
```python
from test_to_string import TestDataFrameToStringLineWidth
```



---
## TestToStringNumericFormatting
```python
from test_to_string import TestToStringNumericFormatting
```



---
## TestDataFrameToString
```python
from test_to_string import TestDataFrameToString
```



---
## TestSeriesToString
```python
from test_to_string import TestSeriesToString
```



---
## test_to_string_masked_ea_with_formatter
```python
from test_to_string import test_to_string_masked_ea_with_formatter
```



---
## test_to_string_with_formatters
```python
from test_to_string import test_to_string_with_formatters
```



---
## test_to_string_with_datetime64_monthformatter
```python
from test_to_string import test_to_string_with_datetime64_monthformatter
```



---
## test_to_string_with_datetime64_hourformatter
```python
from test_to_string import test_to_string_with_datetime64_hourformatter
```



---
## test_to_string_with_formatters_unicode
```python
from test_to_string import test_to_string_with_formatters_unicode
```



---
## test_no_extra_space
```python
from test_to_string import test_no_extra_space
```



---
## test_to_string_with_column_specific_col_space_raises
```python
from test_to_string import test_to_string_with_column_specific_col_space_raises
```



---
## test_to_string_with_column_specific_col_space
```python
from test_to_string import test_to_string_with_column_specific_col_space
```



---
## test_to_string_with_col_space
```python
from test_to_string import test_to_string_with_col_space
```



---
## test_to_string_repr_tuples
```python
from test_to_string import test_to_string_repr_tuples
```



---
## test_to_string_header_false
```python
from test_to_string import test_to_string_header_false
```



---
## test_to_string_multindex_header
```python
from test_to_string import test_to_string_multindex_header
```



---
## test_to_string_no_header
```python
from test_to_string import test_to_string_no_header
```



---
## test_to_string_specified_header
```python
from test_to_string import test_to_string_specified_header
```



---
## test_to_string_line_width
```python
from test_to_string import test_to_string_line_width
```



---
## test_to_string_line_width_no_index
```python
from test_to_string import test_to_string_line_width_no_index
```



---
## test_to_string_line_width_no_header
```python
from test_to_string import test_to_string_line_width_no_header
```



---
## test_to_string_line_width_with_both_index_and_header
```python
from test_to_string import test_to_string_line_width_with_both_index_and_header
```



---
## test_to_string_line_width_no_index_no_header
```python
from test_to_string import test_to_string_line_width_no_index_no_header
```



---
## test_to_string_float_format_no_fixed_width
```python
from test_to_string import test_to_string_float_format_no_fixed_width
```



---
## test_to_string_small_float_values
```python
from test_to_string import test_to_string_small_float_values
```



---
## test_to_string_complex_float_formatting
```python
from test_to_string import test_to_string_complex_float_formatting
```



---
## test_to_string_format_inf
```python
from test_to_string import test_to_string_format_inf
```



---
## test_to_string_int_formatting
```python
from test_to_string import test_to_string_int_formatting
```



---
## test_to_string_float_formatting
```python
from test_to_string import test_to_string_float_formatting
```



---
## test_to_string_decimal
```python
from test_to_string import test_to_string_decimal
```



---
## test_to_string_left_justify_cols
```python
from test_to_string import test_to_string_left_justify_cols
```



---
## test_to_string_format_na
```python
from test_to_string import test_to_string_format_na
```



---
## test_to_string_with_dict_entries
```python
from test_to_string import test_to_string_with_dict_entries
```



---
## test_to_string_with_categorical_columns
```python
from test_to_string import test_to_string_with_categorical_columns
```



---
## test_repr_embedded_ndarray
```python
from test_to_string import test_repr_embedded_ndarray
```



---
## test_to_string_truncate
```python
from test_to_string import test_to_string_truncate
```



---
## test_format_remove_leading_space_dataframe
```python
from test_to_string import test_format_remove_leading_space_dataframe
```



---
## test_to_string_max_rows_zero
```python
from test_to_string import test_to_string_max_rows_zero
```



---
## test_truncation_no_index
```python
from test_to_string import test_truncation_no_index
```



---
## test_to_string_no_index
```python
from test_to_string import test_to_string_no_index
```



---
## test_to_string_unicode_columns
```python
from test_to_string import test_to_string_unicode_columns
```



---
## test_to_string_na_rep_and_float_format
```python
from test_to_string import test_to_string_na_rep_and_float_format
```



---
## test_to_string_string_dtype
```python
from test_to_string import test_to_string_string_dtype
```



---
## test_to_string_pos_args_deprecation
```python
from test_to_string import test_to_string_pos_args_deprecation
```



---
## test_to_string_utf8_columns
```python
from test_to_string import test_to_string_utf8_columns
```



---
## test_to_string_unicode_two
```python
from test_to_string import test_to_string_unicode_two
```



---
## test_to_string_unicode_three
```python
from test_to_string import test_to_string_unicode_three
```



---
## test_to_string_with_float_index
```python
from test_to_string import test_to_string_with_float_index
```



---
## test_to_string
```python
from test_to_string import test_to_string
```



---
## test_to_string_index_with_nan
```python
from test_to_string import test_to_string_index_with_nan
```



---
## test_to_string_nonunicode_nonascii_alignment
```python
from test_to_string import test_to_string_nonunicode_nonascii_alignment
```



---
## test_unicode_problem_decoding_as_ascii
```python
from test_to_string import test_unicode_problem_decoding_as_ascii
```



---
## test_to_string_repr_unicode
```python
from test_to_string import test_to_string_repr_unicode
```



---
## test_to_string_without_index
```python
from test_to_string import test_to_string_without_index
```



---
## test_to_string_name
```python
from test_to_string import test_to_string_name
```



---
## test_to_string_dtype
```python
from test_to_string import test_to_string_dtype
```



---
## test_to_string_length
```python
from test_to_string import test_to_string_length
```



---
## test_to_string_na_rep
```python
from test_to_string import test_to_string_na_rep
```



---
## test_to_string_float_format
```python
from test_to_string import test_to_string_float_format
```



---
## test_to_string_header
```python
from test_to_string import test_to_string_header
```



---
## test_to_string_empty_col
```python
from test_to_string import test_to_string_empty_col
```



---
## test_to_string_timedelta64
```python
from test_to_string import test_to_string_timedelta64
```



---
## test_format_remove_leading_space_series
```python
from test_to_string import test_format_remove_leading_space_series
```



---
## test_to_string_complex_number_trims_zeros
```python
from test_to_string import test_to_string_complex_number_trims_zeros
```



---
## test_nullable_float_to_string
```python
from test_to_string import test_nullable_float_to_string
```



---
## test_nullable_int_to_string
```python
from test_to_string import test_nullable_int_to_string
```



---
## test_to_string_mixed
```python
from test_to_string import test_to_string_mixed
```



---
## test_to_string_float_na_spacing
```python
from test_to_string import test_to_string_float_na_spacing
```



---
## test_to_string_with_datetimeindex
```python
from test_to_string import test_to_string_with_datetimeindex
```



---
## format_func
```python
from test_to_string import format_func
```



---
## test_to_string_index_formatter
```python
from test_to_string import test_to_string_index_formatter
```



---
## __name__
```python
from test_console import __name__
```



---
## MockEncoding
```python
from test_console import MockEncoding
```

Used to add a side effect when accessing the 'encoding' property. If the
side effect is a str in nature, the value will be returned. Otherwise, the
side effect should be an exception that will be raised.

---
## test_detect_console_encoding_from_stdout_stdin
```python
from test_console import test_detect_console_encoding_from_stdout_stdin
```



---
## test_detect_console_encoding_fallback_to_locale
```python
from test_console import test_detect_console_encoding_fallback_to_locale
```



---
## test_detect_console_encoding_fallback_to_default
```python
from test_console import test_detect_console_encoding_fallback_to_default
```



---
## __init__
```python
from test_console import __init__
```



---
## encoding
```python
from test_console import encoding
```



---
## raise_or_return
```python
from test_console import raise_or_return
```



---
## __name__
```python
from test_to_latex import __name__
```



---
## _dedent
```python
from test_to_latex import _dedent
```

Dedent without new line in the beginning.

Built-in textwrap.dedent would keep new line character in the beginning
of multi-line string starting from the new line.
This version drops the leading new line character.

---
## df_short
```python
from test_to_latex import df_short
```

Short dataframe for testing table/tabular/longtable LaTeX env.

---
## TestToLatex
```python
from test_to_latex import TestToLatex
```



---
## TestToLatexLongtable
```python
from test_to_latex import TestToLatexLongtable
```



---
## TestToLatexHeader
```python
from test_to_latex import TestToLatexHeader
```



---
## TestToLatexBold
```python
from test_to_latex import TestToLatexBold
```



---
## TestToLatexCaptionLabel
```python
from test_to_latex import TestToLatexCaptionLabel
```



---
## TestToLatexEscape
```python
from test_to_latex import TestToLatexEscape
```



---
## TestToLatexPosition
```python
from test_to_latex import TestToLatexPosition
```



---
## TestToLatexFormatters
```python
from test_to_latex import TestToLatexFormatters
```



---
## TestToLatexMultiindex
```python
from test_to_latex import TestToLatexMultiindex
```



---
## test_to_latex_to_file
```python
from test_to_latex import test_to_latex_to_file
```



---
## test_to_latex_to_file_utf8_with_encoding
```python
from test_to_latex import test_to_latex_to_file_utf8_with_encoding
```



---
## test_to_latex_to_file_utf8_without_encoding
```python
from test_to_latex import test_to_latex_to_file_utf8_without_encoding
```



---
## test_to_latex_tabular_with_index
```python
from test_to_latex import test_to_latex_tabular_with_index
```



---
## test_to_latex_tabular_without_index
```python
from test_to_latex import test_to_latex_tabular_without_index
```



---
## test_to_latex_bad_column_format
```python
from test_to_latex import test_to_latex_bad_column_format
```



---
## test_to_latex_column_format_just_works
```python
from test_to_latex import test_to_latex_column_format_just_works
```



---
## test_to_latex_column_format
```python
from test_to_latex import test_to_latex_column_format
```



---
## test_to_latex_float_format_object_col
```python
from test_to_latex import test_to_latex_float_format_object_col
```



---
## test_to_latex_empty_tabular
```python
from test_to_latex import test_to_latex_empty_tabular
```



---
## test_to_latex_series
```python
from test_to_latex import test_to_latex_series
```



---
## test_to_latex_midrule_location
```python
from test_to_latex import test_to_latex_midrule_location
```



---
## test_to_latex_pos_args_deprecation
```python
from test_to_latex import test_to_latex_pos_args_deprecation
```



---
## test_to_latex_empty_longtable
```python
from test_to_latex import test_to_latex_empty_longtable
```



---
## test_to_latex_longtable_with_index
```python
from test_to_latex import test_to_latex_longtable_with_index
```



---
## test_to_latex_longtable_without_index
```python
from test_to_latex import test_to_latex_longtable_without_index
```



---
## test_to_latex_longtable_continued_on_next_page
```python
from test_to_latex import test_to_latex_longtable_continued_on_next_page
```



---
## test_to_latex_no_header_with_index
```python
from test_to_latex import test_to_latex_no_header_with_index
```



---
## test_to_latex_no_header_without_index
```python
from test_to_latex import test_to_latex_no_header_without_index
```



---
## test_to_latex_specified_header_with_index
```python
from test_to_latex import test_to_latex_specified_header_with_index
```



---
## test_to_latex_specified_header_without_index
```python
from test_to_latex import test_to_latex_specified_header_without_index
```



---
## test_to_latex_number_of_items_in_header_missmatch_raises
```python
from test_to_latex import test_to_latex_number_of_items_in_header_missmatch_raises
```



---
## test_to_latex_decimal
```python
from test_to_latex import test_to_latex_decimal
```



---
## test_to_latex_bold_rows
```python
from test_to_latex import test_to_latex_bold_rows
```



---
## test_to_latex_no_bold_rows
```python
from test_to_latex import test_to_latex_no_bold_rows
```



---
## caption_table
```python
from test_to_latex import caption_table
```

Caption for table/tabular LaTeX environment.

---
## short_caption
```python
from test_to_latex import short_caption
```

Short caption for testing \caption[short_caption]{full_caption}.

---
## label_table
```python
from test_to_latex import label_table
```

Label for table/tabular LaTeX environment.

---
## caption_longtable
```python
from test_to_latex import caption_longtable
```

Caption for longtable LaTeX environment.

---
## label_longtable
```python
from test_to_latex import label_longtable
```

Label for longtable LaTeX environment.

---
## test_to_latex_caption_only
```python
from test_to_latex import test_to_latex_caption_only
```



---
## test_to_latex_label_only
```python
from test_to_latex import test_to_latex_label_only
```



---
## test_to_latex_caption_and_label
```python
from test_to_latex import test_to_latex_caption_and_label
```



---
## test_to_latex_caption_and_shortcaption
```python
from test_to_latex import test_to_latex_caption_and_shortcaption
```



---
## test_to_latex_caption_and_shortcaption_list_is_ok
```python
from test_to_latex import test_to_latex_caption_and_shortcaption_list_is_ok
```



---
## test_to_latex_caption_shortcaption_and_label
```python
from test_to_latex import test_to_latex_caption_shortcaption_and_label
```



---
## test_to_latex_bad_caption_raises
```python
from test_to_latex import test_to_latex_bad_caption_raises
```



---
## test_to_latex_two_chars_caption
```python
from test_to_latex import test_to_latex_two_chars_caption
```



---
## test_to_latex_longtable_caption_only
```python
from test_to_latex import test_to_latex_longtable_caption_only
```



---
## test_to_latex_longtable_label_only
```python
from test_to_latex import test_to_latex_longtable_label_only
```



---
## test_to_latex_longtable_caption_and_label
```python
from test_to_latex import test_to_latex_longtable_caption_and_label
```



---
## test_to_latex_longtable_caption_shortcaption_and_label
```python
from test_to_latex import test_to_latex_longtable_caption_shortcaption_and_label
```



---
## df_with_symbols
```python
from test_to_latex import df_with_symbols
```

Dataframe with special characters for testing chars escaping.

---
## test_to_latex_escape_false
```python
from test_to_latex import test_to_latex_escape_false
```



---
## test_to_latex_escape_default
```python
from test_to_latex import test_to_latex_escape_default
```



---
## test_to_latex_special_escape
```python
from test_to_latex import test_to_latex_special_escape
```



---
## test_to_latex_escape_special_chars
```python
from test_to_latex import test_to_latex_escape_special_chars
```



---
## test_to_latex_specified_header_special_chars_without_escape
```python
from test_to_latex import test_to_latex_specified_header_special_chars_without_escape
```



---
## test_to_latex_position
```python
from test_to_latex import test_to_latex_position
```



---
## test_to_latex_longtable_position
```python
from test_to_latex import test_to_latex_longtable_position
```



---
## test_to_latex_with_formatters
```python
from test_to_latex import test_to_latex_with_formatters
```



---
## test_to_latex_float_format_no_fixed_width_3decimals
```python
from test_to_latex import test_to_latex_float_format_no_fixed_width_3decimals
```



---
## test_to_latex_float_format_no_fixed_width_integer
```python
from test_to_latex import test_to_latex_float_format_no_fixed_width_integer
```



---
## test_to_latex_na_rep_and_float_format
```python
from test_to_latex import test_to_latex_na_rep_and_float_format
```



---
## multiindex_frame
```python
from test_to_latex import multiindex_frame
```

Multiindex dataframe for testing multirow LaTeX macros.

---
## multicolumn_frame
```python
from test_to_latex import multicolumn_frame
```

Multicolumn dataframe for testing multicolumn LaTeX macros.

---
## test_to_latex_multindex_header
```python
from test_to_latex import test_to_latex_multindex_header
```



---
## test_to_latex_multiindex_empty_name
```python
from test_to_latex import test_to_latex_multiindex_empty_name
```



---
## test_to_latex_multiindex_column_tabular
```python
from test_to_latex import test_to_latex_multiindex_column_tabular
```



---
## test_to_latex_multiindex_small_tabular
```python
from test_to_latex import test_to_latex_multiindex_small_tabular
```



---
## test_to_latex_multiindex_tabular
```python
from test_to_latex import test_to_latex_multiindex_tabular
```



---
## test_to_latex_multicolumn_tabular
```python
from test_to_latex import test_to_latex_multicolumn_tabular
```



---
## test_to_latex_index_has_name_tabular
```python
from test_to_latex import test_to_latex_index_has_name_tabular
```



---
## test_to_latex_groupby_tabular
```python
from test_to_latex import test_to_latex_groupby_tabular
```



---
## test_to_latex_multiindex_dupe_level
```python
from test_to_latex import test_to_latex_multiindex_dupe_level
```



---
## test_to_latex_multicolumn_default
```python
from test_to_latex import test_to_latex_multicolumn_default
```



---
## test_to_latex_multicolumn_false
```python
from test_to_latex import test_to_latex_multicolumn_false
```



---
## test_to_latex_multirow_true
```python
from test_to_latex import test_to_latex_multirow_true
```



---
## test_to_latex_multicolumnrow_with_multicol_format
```python
from test_to_latex import test_to_latex_multicolumnrow_with_multicol_format
```



---
## test_to_latex_multiindex_names
```python
from test_to_latex import test_to_latex_multiindex_names
```



---
## test_to_latex_multiindex_nans
```python
from test_to_latex import test_to_latex_multiindex_nans
```



---
## test_to_latex_non_string_index
```python
from test_to_latex import test_to_latex_non_string_index
```



---
## test_to_latex_multiindex_multirow
```python
from test_to_latex import test_to_latex_multiindex_multirow
```



---
## __name__
```python
from test_to_html import __name__
```



---
## expected_html
```python
from test_to_html import expected_html
```

Read HTML file from formats data directory.

Parameters
----------
datapath : pytest fixture
    The datapath fixture injected into a test by pytest.
name : str
    The name of the HTML file without the suffix.

Returns
-------
str : contents of HTML file.

---
## biggie_df_fixture
```python
from test_to_html import biggie_df_fixture
```

Fixture for a big mixed Dataframe and an empty Dataframe

---
## justify
```python
from test_to_html import justify
```



---
## test_to_html_with_col_space
```python
from test_to_html import test_to_html_with_col_space
```



---
## test_to_html_with_column_specific_col_space_raises
```python
from test_to_html import test_to_html_with_column_specific_col_space_raises
```



---
## test_to_html_with_column_specific_col_space
```python
from test_to_html import test_to_html_with_column_specific_col_space
```



---
## test_to_html_with_empty_string_label
```python
from test_to_html import test_to_html_with_empty_string_label
```



---
## test_to_html_unicode
```python
from test_to_html import test_to_html_unicode
```



---
## test_to_html_encoding
```python
from test_to_html import test_to_html_encoding
```



---
## test_to_html_decimal
```python
from test_to_html import test_to_html_decimal
```



---
## test_to_html_escaped
```python
from test_to_html import test_to_html_escaped
```



---
## test_to_html_multiindex_index_false
```python
from test_to_html import test_to_html_multiindex_index_false
```



---
## test_to_html_multiindex_sparsify
```python
from test_to_html import test_to_html_multiindex_sparsify
```



---
## test_to_html_multiindex_odd_even_truncate
```python
from test_to_html import test_to_html_multiindex_odd_even_truncate
```



---
## test_to_html_formatters
```python
from test_to_html import test_to_html_formatters
```



---
## test_to_html_regression_GH6098
```python
from test_to_html import test_to_html_regression_GH6098
```



---
## test_to_html_truncate
```python
from test_to_html import test_to_html_truncate
```



---
## test_html_invalid_formatters_arg_raises
```python
from test_to_html import test_html_invalid_formatters_arg_raises
```



---
## test_to_html_truncate_formatter
```python
from test_to_html import test_to_html_truncate_formatter
```



---
## test_to_html_truncate_multi_index
```python
from test_to_html import test_to_html_truncate_multi_index
```



---
## test_to_html_border
```python
from test_to_html import test_to_html_border
```



---
## test_to_html
```python
from test_to_html import test_to_html
```



---
## test_to_html_empty_dataframe
```python
from test_to_html import test_to_html_empty_dataframe
```



---
## test_to_html_filename
```python
from test_to_html import test_to_html_filename
```



---
## test_to_html_with_no_bold
```python
from test_to_html import test_to_html_with_no_bold
```



---
## test_to_html_columns_arg
```python
from test_to_html import test_to_html_columns_arg
```



---
## test_to_html_multiindex
```python
from test_to_html import test_to_html_multiindex
```



---
## test_to_html_justify
```python
from test_to_html import test_to_html_justify
```



---
## test_to_html_invalid_justify
```python
from test_to_html import test_to_html_invalid_justify
```



---
## TestHTMLIndex
```python
from test_to_html import TestHTMLIndex
```



---
## test_to_html_with_classes
```python
from test_to_html import test_to_html_with_classes
```



---
## test_to_html_no_index_max_rows
```python
from test_to_html import test_to_html_no_index_max_rows
```



---
## test_to_html_multiindex_max_cols
```python
from test_to_html import test_to_html_multiindex_max_cols
```



---
## test_to_html_multi_indexes_index_false
```python
from test_to_html import test_to_html_multi_indexes_index_false
```



---
## test_to_html_basic_alignment
```python
from test_to_html import test_to_html_basic_alignment
```



---
## test_to_html_alignment_with_truncation
```python
from test_to_html import test_to_html_alignment_with_truncation
```



---
## test_to_html_truncation_index_false_max_rows
```python
from test_to_html import test_to_html_truncation_index_false_max_rows
```



---
## test_to_html_truncation_index_false_max_cols
```python
from test_to_html import test_to_html_truncation_index_false_max_cols
```



---
## test_to_html_notebook_has_style
```python
from test_to_html import test_to_html_notebook_has_style
```



---
## test_to_html_with_index_names_false
```python
from test_to_html import test_to_html_with_index_names_false
```



---
## test_to_html_with_id
```python
from test_to_html import test_to_html_with_id
```



---
## test_to_html_float_format_no_fixed_width
```python
from test_to_html import test_to_html_float_format_no_fixed_width
```



---
## test_to_html_render_links
```python
from test_to_html import test_to_html_render_links
```



---
## test_ignore_display_max_colwidth
```python
from test_to_html import test_ignore_display_max_colwidth
```



---
## test_to_html_invalid_classes_type
```python
from test_to_html import test_to_html_invalid_classes_type
```



---
## test_to_html_round_column_headers
```python
from test_to_html import test_to_html_round_column_headers
```



---
## test_to_html_with_col_space_units
```python
from test_to_html import test_to_html_with_col_space_units
```



---
## TestReprHTML
```python
from test_to_html import TestReprHTML
```



---
## test_to_html_multilevel
```python
from test_to_html import test_to_html_multilevel
```



---
## test_to_html_na_rep_and_float_format
```python
from test_to_html import test_to_html_na_rep_and_float_format
```



---
## test_to_html_na_rep_non_scalar_data
```python
from test_to_html import test_to_html_na_rep_non_scalar_data
```



---
## test_to_html_float_format_object_col
```python
from test_to_html import test_to_html_float_format_object_col
```



---
## test_to_html_multiindex_col_with_colspace
```python
from test_to_html import test_to_html_multiindex_col_with_colspace
```



---
## test_to_html_tuple_col_with_colspace
```python
from test_to_html import test_to_html_tuple_col_with_colspace
```



---
## test_to_html_empty_complex_array
```python
from test_to_html import test_to_html_empty_complex_array
```



---
## test_to_html_pos_args_deprecation
```python
from test_to_html import test_to_html_pos_args_deprecation
```



---
## df
```python
from test_to_html import df
```



---
## expected_without_index
```python
from test_to_html import expected_without_index
```



---
## test_to_html_flat_index_without_name
```python
from test_to_html import test_to_html_flat_index_without_name
```



---
## test_to_html_flat_index_with_name
```python
from test_to_html import test_to_html_flat_index_with_name
```



---
## test_to_html_multiindex_without_names
```python
from test_to_html import test_to_html_multiindex_without_names
```



---
## test_to_html_multiindex_with_names
```python
from test_to_html import test_to_html_multiindex_with_names
```



---
## test_html_repr_min_rows_default
```python
from test_to_html import test_html_repr_min_rows_default
```



---
## test_html_repr_min_rows
```python
from test_to_html import test_html_repr_min_rows
```



---
## test_repr_html_ipython_config
```python
from test_to_html import test_repr_html_ipython_config
```



---
## test_info_repr_html
```python
from test_to_html import test_info_repr_html
```



---
## test_fake_qtconsole_repr_html
```python
from test_to_html import test_fake_qtconsole_repr_html
```



---
## test_repr_html
```python
from test_to_html import test_repr_html
```



---
## test_repr_html_mathjax
```python
from test_to_html import test_repr_html_mathjax
```



---
## test_repr_html_wide
```python
from test_to_html import test_repr_html_wide
```



---
## test_repr_html_wide_multiindex_cols
```python
from test_to_html import test_repr_html_wide_multiindex_cols
```



---
## test_repr_html_long
```python
from test_to_html import test_repr_html_long
```



---
## test_repr_html_float
```python
from test_to_html import test_repr_html_float
```



---
## test_repr_html_long_multiindex
```python
from test_to_html import test_repr_html_long_multiindex
```



---
## test_repr_html_long_and_wide
```python
from test_to_html import test_repr_html_long_and_wide
```



---
## get_ipython
```python
from test_to_html import get_ipython
```



---
## __name__
```python
from test_eng_formatting import __name__
```



---
## reset_float_format
```python
from test_eng_formatting import reset_float_format
```



---
## TestEngFormatter
```python
from test_eng_formatting import TestEngFormatter
```



---
## test_eng_float_formatter2
```python
from test_eng_formatting import test_eng_float_formatter2
```



---
## test_eng_float_formatter
```python
from test_eng_formatting import test_eng_float_formatter
```



---
## compare
```python
from test_eng_formatting import compare
```



---
## compare_all
```python
from test_eng_formatting import compare_all
```

Parameters:
-----------
formatter: EngFormatter under test
in_out: list of tuples. Each tuple = (number, expected_formatting)

It is tested if 'formatter(number) == expected_formatting'.
*number* should be >= 0 because formatter(-number) == fmt is also
tested. *fmt* is derived from *expected_formatting*

---
## test_exponents_with_eng_prefix
```python
from test_eng_formatting import test_exponents_with_eng_prefix
```



---
## test_exponents_without_eng_prefix
```python
from test_eng_formatting import test_exponents_without_eng_prefix
```



---
## test_rounding
```python
from test_eng_formatting import test_rounding
```



---
## test_nan
```python
from test_eng_formatting import test_nan
```



---
## test_inf
```python
from test_eng_formatting import test_inf
```



---
## test_adjoin
```python
from test_printing import test_adjoin
```



---
## TestPPrintThing
```python
from test_printing import TestPPrintThing
```



---
## TestFormatBase
```python
from test_printing import TestFormatBase
```



---
## test_repr_binary_type
```python
from test_printing import test_repr_binary_type
```



---
## test_repr_obeys_max_seq_limit
```python
from test_printing import test_repr_obeys_max_seq_limit
```



---
## test_repr_set
```python
from test_printing import test_repr_set
```



---
## test_adjoin_unicode
```python
from test_printing import test_adjoin_unicode
```



---
## test_justify
```python
from test_printing import test_justify
```



---
## test_east_asian_len
```python
from test_printing import test_east_asian_len
```



---
## test_ambiguous_width
```python
from test_printing import test_ambiguous_width
```



---
## just
```python
from test_printing import just
```



---
## assert_resolves
```python
from test_css import assert_resolves
```



---
## assert_same_resolution
```python
from test_css import assert_same_resolution
```



---
## test_css_parse_normalisation
```python
from test_css import test_css_parse_normalisation
```



---
## test_css_parse_invalid
```python
from test_css import test_css_parse_invalid
```



---
## test_css_side_shorthands
```python
from test_css import test_css_side_shorthands
```



---
## test_css_border_shorthand_sides
```python
from test_css import test_css_border_shorthand_sides
```



---
## test_css_border_shorthands
```python
from test_css import test_css_border_shorthands
```



---
## test_css_precedence
```python
from test_css import test_css_precedence
```



---
## test_css_none_absent
```python
from test_css import test_css_none_absent
```



---
## test_css_absolute_font_size
```python
from test_css import test_css_absolute_font_size
```



---
## test_css_relative_font_size
```python
from test_css import test_css_relative_font_size
```



---
## create_border_dict
```python
from test_css import create_border_dict
```



---
## __name__
```python
from test_ipython_compat import __name__
```



---
## TestTableSchemaRepr
```python
from test_ipython_compat import TestTableSchemaRepr
```



---
## test_publishes
```python
from test_ipython_compat import test_publishes
```



---
## test_publishes_not_implemented
```python
from test_ipython_compat import test_publishes_not_implemented
```



---
## test_config_on
```python
from test_ipython_compat import test_config_on
```



---
## test_config_default_off
```python
from test_ipython_compat import test_config_default_off
```



---
## test_enable_data_resource_formatter
```python
from test_ipython_compat import test_enable_data_resource_formatter
```



---
## __name__
```python
from test_to_excel import __name__
```

Tests formatting as writer-agnostic ExcelCells

ExcelFormatter is tested implicitly in pandas/tests/io/excel

---
## test_css_to_excel
```python
from test_to_excel import test_css_to_excel
```



---
## test_css_to_excel_multiple
```python
from test_to_excel import test_css_to_excel_multiple
```



---
## test_css_to_excel_inherited
```python
from test_to_excel import test_css_to_excel_inherited
```



---
## test_css_to_excel_good_colors
```python
from test_to_excel import test_css_to_excel_good_colors
```



---
## test_css_to_excel_bad_colors
```python
from test_to_excel import test_css_to_excel_bad_colors
```



---
## tests_css_named_colors_valid
```python
from test_to_excel import tests_css_named_colors_valid
```



---
## test_css_named_colors_from_mpl_present
```python
from test_to_excel import test_css_named_colors_from_mpl_present
```



---
## test_css_excel_cell_precedence
```python
from test_to_excel import test_css_excel_cell_precedence
```

It applies favors latter declarations over former declarations

---
## test_css_excel_cell_cache
```python
from test_to_excel import test_css_excel_cell_cache
```

It caches unique cell styles

---
## __name__
```python
from test_to_markdown import __name__
```



---
## test_simple
```python
from test_to_markdown import test_simple
```



---
## test_empty_frame
```python
from test_to_markdown import test_empty_frame
```



---
## test_other_tablefmt
```python
from test_to_markdown import test_other_tablefmt
```



---
## test_other_headers
```python
from test_to_markdown import test_other_headers
```



---
## test_series
```python
from test_to_markdown import test_series
```



---
## test_no_buf
```python
from test_to_markdown import test_no_buf
```



---
## test_index
```python
from test_to_markdown import test_index
```



---
## test_showindex_disallowed_in_kwargs
```python
from test_to_markdown import test_showindex_disallowed_in_kwargs
```



---
## test_markdown_pos_args_deprecatation
```python
from test_to_markdown import test_markdown_pos_args_deprecatation
```



---
## filepath_or_buffer_id
```python
from test_format import filepath_or_buffer_id
```

A fixture yielding test ids for filepath_or_buffer testing.

---
## filepath_or_buffer
```python
from test_format import filepath_or_buffer
```

A fixture yielding a string representing a filepath, a path-like object
and a StringIO buffer. Also checks that buffer is not closed.

---
## assert_filepath_or_buffer_equals
```python
from test_format import assert_filepath_or_buffer_equals
```

Assertion helper for checking filepath_or_buffer.

---
## has_info_repr
```python
from test_format import has_info_repr
```



---
## has_non_verbose_info_repr
```python
from test_format import has_non_verbose_info_repr
```



---
## has_horizontally_truncated_repr
```python
from test_format import has_horizontally_truncated_repr
```



---
## has_vertically_truncated_repr
```python
from test_format import has_vertically_truncated_repr
```



---
## has_truncated_repr
```python
from test_format import has_truncated_repr
```



---
## has_doubly_truncated_repr
```python
from test_format import has_doubly_truncated_repr
```



---
## has_expanded_repr
```python
from test_format import has_expanded_repr
```



---
## TestDataFrameFormatting
```python
from test_format import TestDataFrameFormatting
```



---
## gen_series_formatting
```python
from test_format import gen_series_formatting
```



---
## TestSeriesFormatting
```python
from test_format import TestSeriesFormatting
```



---
## TestGenericArrayFormatter
```python
from test_format import TestGenericArrayFormatter
```



---
## _three_digit_exp
```python
from test_format import _three_digit_exp
```



---
## TestFloatArrayFormatter
```python
from test_format import TestFloatArrayFormatter
```



---
## TestTimedelta64Formatter
```python
from test_format import TestTimedelta64Formatter
```



---
## TestDatetime64Formatter
```python
from test_format import TestDatetime64Formatter
```



---
## TestFormatPercentiles
```python
from test_format import TestFormatPercentiles
```



---
## test_filepath_or_buffer_arg
```python
from test_format import test_filepath_or_buffer_arg
```



---
## test_filepath_or_buffer_bad_arg_raises
```python
from test_format import test_filepath_or_buffer_bad_arg_raises
```



---
## _assert_filepath_or_buffer_equals
```python
from test_format import _assert_filepath_or_buffer_equals
```



---
## test_repr_truncation
```python
from test_format import test_repr_truncation
```



---
## test_repr_truncation_preserves_na
```python
from test_format import test_repr_truncation_preserves_na
```



---
## test_max_colwidth_negative_int_raises
```python
from test_format import test_max_colwidth_negative_int_raises
```



---
## test_repr_chop_threshold
```python
from test_format import test_repr_chop_threshold
```



---
## test_repr_chop_threshold_column_below
```python
from test_format import test_repr_chop_threshold_column_below
```



---
## test_repr_no_backslash
```python
from test_format import test_repr_no_backslash
```



---
## test_expand_frame_repr
```python
from test_format import test_expand_frame_repr
```



---
## test_repr_non_interactive
```python
from test_format import test_repr_non_interactive
```



---
## test_repr_truncates_terminal_size
```python
from test_format import test_repr_truncates_terminal_size
```



---
## test_repr_truncates_terminal_size_full
```python
from test_format import test_repr_truncates_terminal_size_full
```



---
## test_repr_truncation_column_size
```python
from test_format import test_repr_truncation_column_size
```



---
## test_repr_max_columns_max_rows
```python
from test_format import test_repr_max_columns_max_rows
```



---
## test_repr_min_rows
```python
from test_format import test_repr_min_rows
```



---
## test_str_max_colwidth
```python
from test_format import test_str_max_colwidth
```



---
## test_auto_detect
```python
from test_format import test_auto_detect
```



---
## test_to_string_repr_unicode2
```python
from test_format import test_to_string_repr_unicode2
```



---
## test_east_asian_unicode_false
```python
from test_format import test_east_asian_unicode_false
```



---
## test_east_asian_unicode_true
```python
from test_format import test_east_asian_unicode_true
```



---
## test_to_string_buffer_all_unicode
```python
from test_format import test_to_string_buffer_all_unicode
```



---
## test_to_string_truncate_indices
```python
from test_format import test_to_string_truncate_indices
```



---
## test_to_string_truncate_multilevel
```python
from test_format import test_to_string_truncate_multilevel
```



---
## test_truncate_with_different_dtypes
```python
from test_format import test_truncate_with_different_dtypes
```



---
## test_truncate_with_different_dtypes2
```python
from test_format import test_truncate_with_different_dtypes2
```



---
## test_truncate_with_different_dtypes_multiindex
```python
from test_format import test_truncate_with_different_dtypes_multiindex
```



---
## test_datetimelike_frame
```python
from test_format import test_datetimelike_frame
```



---
## test_datetimeindex_highprecision
```python
from test_format import test_datetimeindex_highprecision
```



---
## test_string_repr_encoding
```python
from test_format import test_string_repr_encoding
```



---
## test_repr_corner
```python
from test_format import test_repr_corner
```



---
## test_frame_info_encoding
```python
from test_format import test_frame_info_encoding
```



---
## test_wide_repr
```python
from test_format import test_wide_repr
```



---
## test_wide_repr_wide_columns
```python
from test_format import test_wide_repr_wide_columns
```



---
## test_wide_repr_named
```python
from test_format import test_wide_repr_named
```



---
## test_wide_repr_multiindex
```python
from test_format import test_wide_repr_multiindex
```



---
## test_wide_repr_multiindex_cols
```python
from test_format import test_wide_repr_multiindex_cols
```



---
## test_wide_repr_unicode
```python
from test_format import test_wide_repr_unicode
```



---
## test_wide_repr_wide_long_columns
```python
from test_format import test_wide_repr_wide_long_columns
```



---
## test_long_series
```python
from test_format import test_long_series
```



---
## test_to_string_ascii_error
```python
from test_format import test_to_string_ascii_error
```



---
## test_show_dimensions
```python
from test_format import test_show_dimensions
```



---
## test_info_repr
```python
from test_format import test_info_repr
```



---
## test_info_repr_max_cols
```python
from test_format import test_info_repr_max_cols
```



---
## test_pprint_pathological_object
```python
from test_format import test_pprint_pathological_object
```

If the test fails, it at least won't hang.

---
## test_float_trim_zeros
```python
from test_format import test_float_trim_zeros
```



---
## test_repr_str_float_truncation
```python
from test_format import test_repr_str_float_truncation
```



---
## test_repr_float_format_in_object_col
```python
from test_format import test_repr_float_format_in_object_col
```



---
## test_period
```python
from test_format import test_period
```



---
## test_max_rows_fitted
```python
from test_format import test_max_rows_fitted
```

Check that display logic is correct.

GH #37359

See description here:
https://pandas.pydata.org/docs/dev/user_guide/options.html#frequently-used-options

---
## test_freq_name_separation
```python
from test_format import test_freq_name_separation
```



---
## test_unicode_name_in_footer
```python
from test_format import test_unicode_name_in_footer
```



---
## test_east_asian_unicode_series
```python
from test_format import test_east_asian_unicode_series
```



---
## test_mixed_datetime64
```python
from test_format import test_mixed_datetime64
```



---
## test_max_multi_index_display
```python
from test_format import test_max_multi_index_display
```



---
## test_consistent_format
```python
from test_format import test_consistent_format
```



---
## chck_ncols
```python
from test_format import chck_ncols
```



---
## test_format_explicit
```python
from test_format import test_format_explicit
```



---
## test_ncols
```python
from test_format import test_ncols
```



---
## test_max_rows_eq_one
```python
from test_format import test_max_rows_eq_one
```



---
## test_truncate_ndots
```python
from test_format import test_truncate_ndots
```



---
## test_1d_array
```python
from test_format import test_1d_array
```



---
## test_2d_array
```python
from test_format import test_2d_array
```



---
## test_3d_array
```python
from test_format import test_3d_array
```



---
## test_2d_extension_type
```python
from test_format import test_2d_extension_type
```



---
## test_misc
```python
from test_format import test_misc
```



---
## test_format
```python
from test_format import test_format
```



---
## test_output_display_precision_trailing_zeroes
```python
from test_format import test_output_display_precision_trailing_zeroes
```



---
## test_set_option_precision
```python
from test_format import test_set_option_precision
```



---
## test_output_significant_digits
```python
from test_format import test_output_significant_digits
```



---
## test_too_long
```python
from test_format import test_too_long
```



---
## test_days
```python
from test_format import test_days
```



---
## test_days_neg
```python
from test_format import test_days_neg
```



---
## test_subdays
```python
from test_format import test_subdays
```



---
## test_subdays_neg
```python
from test_format import test_subdays_neg
```



---
## test_zero
```python
from test_format import test_zero
```



---
## test_mixed
```python
from test_format import test_mixed
```



---
## test_dates
```python
from test_format import test_dates
```



---
## test_date_nanos
```python
from test_format import test_date_nanos
```



---
## test_dates_display
```python
from test_format import test_dates_display
```



---
## test_datetime64formatter_yearmonth
```python
from test_format import test_datetime64formatter_yearmonth
```



---
## test_datetime64formatter_hoursecond
```python
from test_format import test_datetime64formatter_hoursecond
```



---
## test_datetime64formatter_tz_ms
```python
from test_format import test_datetime64formatter_tz_ms
```



---
## test_format_percentiles
```python
from test_format import test_format_percentiles
```



---
## test_error_format_percentiles
```python
from test_format import test_error_format_percentiles
```



---
## test_format_percentiles_integer_idx
```python
from test_format import test_format_percentiles_integer_idx
```



---
## mkframe
```python
from test_format import mkframe
```



---
## A
```python
from test_format import A
```



---
## getndots
```python
from test_format import getndots
```



---
## DtypeStub
```python
from test_format import DtypeStub
```



---
## ExtTypeStub
```python
from test_format import ExtTypeStub
```



---
## format_func
```python
from test_format import format_func
```



---
## __getitem__
```python
from test_format import __getitem__
```



---
## type
```python
from test_format import type
```



---
## name
```python
from test_format import name
```



---
## __len__
```python
from test_format import __len__
```



---
## dtype
```python
from test_format import dtype
```



---
## TestToCSV
```python
from test_to_csv import TestToCSV
```



---
## test_to_csv_iterative_compression_name
```python
from test_to_csv import test_to_csv_iterative_compression_name
```



---
## test_to_csv_iterative_compression_buffer
```python
from test_to_csv import test_to_csv_iterative_compression_buffer
```



---
## test_to_csv_pos_args_deprecation
```python
from test_to_csv import test_to_csv_pos_args_deprecation
```



---
## test_to_csv_with_single_column
```python
from test_to_csv import test_to_csv_with_single_column
```



---
## test_to_csv_default_encoding
```python
from test_to_csv import test_to_csv_default_encoding
```



---
## test_to_csv_quotechar
```python
from test_to_csv import test_to_csv_quotechar
```



---
## test_to_csv_doublequote
```python
from test_to_csv import test_to_csv_doublequote
```



---
## test_to_csv_escapechar
```python
from test_to_csv import test_to_csv_escapechar
```



---
## test_csv_to_string
```python
from test_to_csv import test_csv_to_string
```



---
## test_to_csv_decimal
```python
from test_to_csv import test_to_csv_decimal
```



---
## test_to_csv_na_rep
```python
from test_to_csv import test_to_csv_na_rep
```



---
## test_to_csv_na_rep_nullable_string
```python
from test_to_csv import test_to_csv_na_rep_nullable_string
```



---
## test_to_csv_date_format
```python
from test_to_csv import test_to_csv_date_format
```



---
## test_to_csv_different_datetime_formats
```python
from test_to_csv import test_to_csv_different_datetime_formats
```



---
## test_to_csv_date_format_in_categorical
```python
from test_to_csv import test_to_csv_date_format_in_categorical
```



---
## test_to_csv_float_ea_float_format
```python
from test_to_csv import test_to_csv_float_ea_float_format
```



---
## test_to_csv_float_ea_no_float_format
```python
from test_to_csv import test_to_csv_float_ea_no_float_format
```



---
## test_to_csv_multi_index
```python
from test_to_csv import test_to_csv_multi_index
```



---
## test_to_csv_single_level_multi_index
```python
from test_to_csv import test_to_csv_single_level_multi_index
```



---
## test_to_csv_string_array_ascii
```python
from test_to_csv import test_to_csv_string_array_ascii
```



---
## test_to_csv_string_array_utf8
```python
from test_to_csv import test_to_csv_string_array_utf8
```



---
## test_to_csv_string_with_lf
```python
from test_to_csv import test_to_csv_string_with_lf
```



---
## test_to_csv_string_with_crlf
```python
from test_to_csv import test_to_csv_string_with_crlf
```



---
## test_to_csv_stdout_file
```python
from test_to_csv import test_to_csv_stdout_file
```



---
## test_to_csv_write_to_open_file
```python
from test_to_csv import test_to_csv_write_to_open_file
```



---
## test_to_csv_write_to_open_file_with_newline_py3
```python
from test_to_csv import test_to_csv_write_to_open_file_with_newline_py3
```



---
## test_to_csv_compression_dict
```python
from test_to_csv import test_to_csv_compression_dict
```



---
## test_to_csv_compression_dict_no_method_raises
```python
from test_to_csv import test_to_csv_compression_dict_no_method_raises
```



---
## test_to_csv_zip_arguments
```python
from test_to_csv import test_to_csv_zip_arguments
```



---
## test_to_csv_zip_infer_name
```python
from test_to_csv import test_to_csv_zip_infer_name
```



---
## test_to_csv_na_rep_long_string
```python
from test_to_csv import test_to_csv_na_rep_long_string
```



---
## test_to_csv_timedelta_precision
```python
from test_to_csv import test_to_csv_timedelta_precision
```



---
## test_na_rep_truncated
```python
from test_to_csv import test_na_rep_truncated
```



---
## test_to_csv_errors
```python
from test_to_csv import test_to_csv_errors
```



---
## test_to_csv_binary_handle
```python
from test_to_csv import test_to_csv_binary_handle
```

Binary file objects should work (if 'mode' contains a 'b') or even without
it in most cases.

GH 35058 and GH 19827

---
## test_to_csv_encoding_binary_handle
```python
from test_to_csv import test_to_csv_encoding_binary_handle
```

Binary file objects should honor a specified encoding.

GH 23854 and GH 13068 with binary handles

---
## __name__
```python
from test_readers import __name__
```



---
## _is_valid_engine_ext_pair
```python
from test_readers import _is_valid_engine_ext_pair
```

Filter out invalid (engine, ext) pairs instead of skipping, as that
produces 500+ pytest.skips.

---
## _transfer_marks
```python
from test_readers import _transfer_marks
```

engine gives us a pytest.param object with some marks, read_ext is just
a string.  We need to generate a new pytest.param inheriting the marks.

---
## engine_and_read_ext
```python
from test_readers import engine_and_read_ext
```

Fixture for Excel reader engine and read_ext, only including valid pairs.

---
## engine
```python
from test_readers import engine
```



---
## read_ext
```python
from test_readers import read_ext
```



---
## df_ref
```python
from test_readers import df_ref
```

Obtain the reference data from read_csv with the Python engine.

---
## get_exp_unit
```python
from test_readers import get_exp_unit
```



---
## adjust_expected
```python
from test_readers import adjust_expected
```



---
## xfail_datetimes_with_pyxlsb
```python
from test_readers import xfail_datetimes_with_pyxlsb
```



---
## TestReaders
```python
from test_readers import TestReaders
```



---
## TestExcelFileRead
```python
from test_readers import TestExcelFileRead
```



---
## cd_and_set_engine
```python
from test_readers import cd_and_set_engine
```

Change directory and set engine for ExcelFile objects.

---
## test_engine_used
```python
from test_readers import test_engine_used
```



---
## test_engine_kwargs
```python
from test_readers import test_engine_kwargs
```



---
## test_usecols_int
```python
from test_readers import test_usecols_int
```



---
## test_usecols_list
```python
from test_readers import test_usecols_list
```



---
## test_usecols_str
```python
from test_readers import test_usecols_str
```



---
## test_usecols_diff_positional_int_columns_order
```python
from test_readers import test_usecols_diff_positional_int_columns_order
```



---
## test_usecols_diff_positional_str_columns_order
```python
from test_readers import test_usecols_diff_positional_str_columns_order
```



---
## test_read_excel_without_slicing
```python
from test_readers import test_read_excel_without_slicing
```



---
## test_usecols_excel_range_str
```python
from test_readers import test_usecols_excel_range_str
```



---
## test_usecols_excel_range_str_invalid
```python
from test_readers import test_usecols_excel_range_str_invalid
```



---
## test_index_col_label_error
```python
from test_readers import test_index_col_label_error
```



---
## test_index_col_str
```python
from test_readers import test_index_col_str
```



---
## test_index_col_empty
```python
from test_readers import test_index_col_empty
```



---
## test_index_col_with_unnamed
```python
from test_readers import test_index_col_with_unnamed
```



---
## test_usecols_pass_non_existent_column
```python
from test_readers import test_usecols_pass_non_existent_column
```



---
## test_usecols_wrong_type
```python
from test_readers import test_usecols_wrong_type
```



---
## test_excel_stop_iterator
```python
from test_readers import test_excel_stop_iterator
```



---
## test_excel_cell_error_na
```python
from test_readers import test_excel_cell_error_na
```



---
## test_excel_table
```python
from test_readers import test_excel_table
```



---
## test_reader_special_dtypes
```python
from test_readers import test_reader_special_dtypes
```



---
## test_reader_converters
```python
from test_readers import test_reader_converters
```



---
## test_reader_dtype
```python
from test_readers import test_reader_dtype
```



---
## test_reader_dtype_str
```python
from test_readers import test_reader_dtype_str
```



---
## test_dtype_backend
```python
from test_readers import test_dtype_backend
```



---
## test_dtype_backend_and_dtype
```python
from test_readers import test_dtype_backend_and_dtype
```



---
## test_dtype_backend_string
```python
from test_readers import test_dtype_backend_string
```



---
## test_dtype_mangle_dup_cols
```python
from test_readers import test_dtype_mangle_dup_cols
```



---
## test_reader_spaces
```python
from test_readers import test_reader_spaces
```



---
## test_read_excel_ods_nested_xml
```python
from test_readers import test_read_excel_ods_nested_xml
```



---
## test_reading_all_sheets
```python
from test_readers import test_reading_all_sheets
```



---
## test_reading_multiple_specific_sheets
```python
from test_readers import test_reading_multiple_specific_sheets
```



---
## test_reading_all_sheets_with_blank
```python
from test_readers import test_reading_all_sheets_with_blank
```



---
## test_read_excel_blank
```python
from test_readers import test_read_excel_blank
```



---
## test_read_excel_blank_with_header
```python
from test_readers import test_read_excel_blank_with_header
```



---
## test_exception_message_includes_sheet_name
```python
from test_readers import test_exception_message_includes_sheet_name
```



---
## test_date_conversion_overflow
```python
from test_readers import test_date_conversion_overflow
```



---
## test_sheet_name
```python
from test_readers import test_sheet_name
```



---
## test_excel_read_buffer
```python
from test_readers import test_excel_read_buffer
```



---
## test_bad_engine_raises
```python
from test_readers import test_bad_engine_raises
```



---
## test_bad_sheetname_raises
```python
from test_readers import test_bad_sheetname_raises
```



---
## test_missing_file_raises
```python
from test_readers import test_missing_file_raises
```



---
## test_corrupt_bytes_raises
```python
from test_readers import test_corrupt_bytes_raises
```



---
## test_read_from_http_url
```python
from test_readers import test_read_from_http_url
```



---
## test_read_from_s3_url
```python
from test_readers import test_read_from_s3_url
```



---
## test_read_from_s3_object
```python
from test_readers import test_read_from_s3_object
```



---
## test_read_from_file_url
```python
from test_readers import test_read_from_file_url
```



---
## test_read_from_pathlib_path
```python
from test_readers import test_read_from_pathlib_path
```



---
## test_read_from_py_localpath
```python
from test_readers import test_read_from_py_localpath
```



---
## test_close_from_py_localpath
```python
from test_readers import test_close_from_py_localpath
```



---
## test_reader_seconds
```python
from test_readers import test_reader_seconds
```



---
## test_read_excel_multiindex
```python
from test_readers import test_read_excel_multiindex
```



---
## test_read_excel_multiindex_blank_after_name
```python
from test_readers import test_read_excel_multiindex_blank_after_name
```



---
## test_read_excel_multiindex_header_only
```python
from test_readers import test_read_excel_multiindex_header_only
```



---
## test_excel_old_index_format
```python
from test_readers import test_excel_old_index_format
```



---
## test_read_excel_bool_header_arg
```python
from test_readers import test_read_excel_bool_header_arg
```



---
## test_read_excel_skiprows
```python
from test_readers import test_read_excel_skiprows
```



---
## test_read_excel_skiprows_callable_not_in
```python
from test_readers import test_read_excel_skiprows_callable_not_in
```



---
## test_read_excel_nrows
```python
from test_readers import test_read_excel_nrows
```



---
## test_read_excel_nrows_greater_than_nrows_in_file
```python
from test_readers import test_read_excel_nrows_greater_than_nrows_in_file
```



---
## test_read_excel_nrows_non_integer_parameter
```python
from test_readers import test_read_excel_nrows_non_integer_parameter
```



---
## test_read_excel_nrows_params
```python
from test_readers import test_read_excel_nrows_params
```

For various parameters, we should get the same result whether we
limit the rows during load (nrows=3) or after (df.iloc[:3]).

---
## test_deprecated_kwargs
```python
from test_readers import test_deprecated_kwargs
```



---
## test_no_header_with_list_index_col
```python
from test_readers import test_no_header_with_list_index_col
```



---
## test_one_col_noskip_blank_line
```python
from test_readers import test_one_col_noskip_blank_line
```



---
## test_multiheader_two_blank_lines
```python
from test_readers import test_multiheader_two_blank_lines
```



---
## test_trailing_blanks
```python
from test_readers import test_trailing_blanks
```

Sheets can contain blank cells with no data. Some of our readers
were including those cells, creating many empty rows and columns

---
## test_ignore_chartsheets_by_str
```python
from test_readers import test_ignore_chartsheets_by_str
```



---
## test_ignore_chartsheets_by_int
```python
from test_readers import test_ignore_chartsheets_by_int
```



---
## test_euro_decimal_format
```python
from test_readers import test_euro_decimal_format
```



---
## test_deprecate_bytes_input
```python
from test_readers import test_deprecate_bytes_input
```



---
## test_excel_passes_na
```python
from test_readers import test_excel_passes_na
```



---
## test_excel_passes_na_filter
```python
from test_readers import test_excel_passes_na_filter
```



---
## test_excel_table_sheet_by_index
```python
from test_readers import test_excel_table_sheet_by_index
```



---
## test_reader_closes_file
```python
from test_readers import test_reader_closes_file
```



---
## test_conflicting_excel_engines
```python
from test_readers import test_conflicting_excel_engines
```



---
## test_excel_read_binary
```python
from test_readers import test_excel_read_binary
```



---
## test_excel_read_binary_via_read_excel
```python
from test_readers import test_excel_read_binary_via_read_excel
```



---
## test_read_excel_header_index_out_of_range
```python
from test_readers import test_read_excel_header_index_out_of_range
```



---
## test_header_with_index_col
```python
from test_readers import test_header_with_index_col
```



---
## test_read_datetime_multiindex
```python
from test_readers import test_read_datetime_multiindex
```



---
## test_engine_invalid_option
```python
from test_readers import test_engine_invalid_option
```



---
## test_ignore_chartsheets
```python
from test_readers import test_ignore_chartsheets
```



---
## test_corrupt_files_closed
```python
from test_readers import test_corrupt_files_closed
```



---
## parser
```python
from test_readers import parser
```



---
## __name__
```python
from test_odswriter import __name__
```



---
## ext
```python
from test_odswriter import ext
```



---
## test_write_append_mode_raises
```python
from test_odswriter import test_write_append_mode_raises
```



---
## test_engine_kwargs
```python
from test_odswriter import test_engine_kwargs
```



---
## test_book_and_sheets_consistent
```python
from test_odswriter import test_book_and_sheets_consistent
```



---
## test_cell_value_type
```python
from test_odswriter import test_cell_value_type
```



---
## __name__
```python
from test_xlsxwriter import __name__
```



---
## ext
```python
from test_xlsxwriter import ext
```



---
## test_column_format
```python
from test_xlsxwriter import test_column_format
```



---
## test_write_append_mode_raises
```python
from test_xlsxwriter import test_write_append_mode_raises
```



---
## test_engine_kwargs
```python
from test_xlsxwriter import test_engine_kwargs
```



---
## test_book_and_sheets_consistent
```python
from test_xlsxwriter import test_book_and_sheets_consistent
```



---
## __name__
```python
from test_writers import __name__
```



---
## get_exp_unit
```python
from test_writers import get_exp_unit
```



---
## frame
```python
from test_writers import frame
```

Returns the first ten items in fixture "float_frame".

---
## merge_cells
```python
from test_writers import merge_cells
```



---
## path
```python
from test_writers import path
```

Fixture to open file for use in each test case.

---
## set_engine
```python
from test_writers import set_engine
```

Fixture to set engine for use in each test case.

Rather than requiring `engine=...` to be provided explicitly as an
argument in each test, this fixture sets a global option to dictate
which engine should be used to write Excel files. After executing
the test it rolls back said change to the global option.

---
## TestRoundTrip
```python
from test_writers import TestRoundTrip
```



---
## TestExcelWriter
```python
from test_writers import TestExcelWriter
```



---
## TestExcelWriterEngineTests
```python
from test_writers import TestExcelWriterEngineTests
```



---
## TestFSPath
```python
from test_writers import TestFSPath
```



---
## test_subclass_attr
```python
from test_writers import test_subclass_attr
```



---
## test_read_one_empty_col_no_header
```python
from test_writers import test_read_one_empty_col_no_header
```



---
## test_read_one_empty_col_with_header
```python
from test_writers import test_read_one_empty_col_with_header
```



---
## test_set_column_names_in_parameter
```python
from test_writers import test_set_column_names_in_parameter
```



---
## test_creating_and_reading_multiple_sheets
```python
from test_writers import test_creating_and_reading_multiple_sheets
```



---
## test_read_excel_multiindex_empty_level
```python
from test_writers import test_read_excel_multiindex_empty_level
```



---
## test_excel_multindex_roundtrip
```python
from test_writers import test_excel_multindex_roundtrip
```



---
## test_read_excel_parse_dates
```python
from test_writers import test_read_excel_parse_dates
```



---
## test_multiindex_interval_datetimes
```python
from test_writers import test_multiindex_interval_datetimes
```



---
## test_excel_sheet_size
```python
from test_writers import test_excel_sheet_size
```



---
## test_excel_sheet_by_name_raise
```python
from test_writers import test_excel_sheet_by_name_raise
```



---
## test_excel_writer_context_manager
```python
from test_writers import test_excel_writer_context_manager
```



---
## test_roundtrip
```python
from test_writers import test_roundtrip
```



---
## test_mixed
```python
from test_writers import test_mixed
```



---
## test_ts_frame
```python
from test_writers import test_ts_frame
```



---
## test_basics_with_nan
```python
from test_writers import test_basics_with_nan
```



---
## test_int_types
```python
from test_writers import test_int_types
```



---
## test_float_types
```python
from test_writers import test_float_types
```



---
## test_bool_types
```python
from test_writers import test_bool_types
```



---
## test_inf_roundtrip
```python
from test_writers import test_inf_roundtrip
```



---
## test_sheets
```python
from test_writers import test_sheets
```



---
## test_colaliases
```python
from test_writers import test_colaliases
```



---
## test_roundtrip_indexlabels
```python
from test_writers import test_roundtrip_indexlabels
```



---
## test_excel_roundtrip_indexname
```python
from test_writers import test_excel_roundtrip_indexname
```



---
## test_excel_roundtrip_datetime
```python
from test_writers import test_excel_roundtrip_datetime
```



---
## test_excel_date_datetime_format
```python
from test_writers import test_excel_date_datetime_format
```



---
## test_to_excel_interval_no_labels
```python
from test_writers import test_to_excel_interval_no_labels
```



---
## test_to_excel_interval_labels
```python
from test_writers import test_to_excel_interval_labels
```



---
## test_to_excel_timedelta
```python
from test_writers import test_to_excel_timedelta
```



---
## test_to_excel_periodindex
```python
from test_writers import test_to_excel_periodindex
```



---
## test_to_excel_multiindex
```python
from test_writers import test_to_excel_multiindex
```



---
## test_to_excel_multiindex_nan_label
```python
from test_writers import test_to_excel_multiindex_nan_label
```



---
## test_to_excel_multiindex_cols
```python
from test_writers import test_to_excel_multiindex_cols
```



---
## test_to_excel_multiindex_dates
```python
from test_writers import test_to_excel_multiindex_dates
```



---
## test_to_excel_multiindex_no_write_index
```python
from test_writers import test_to_excel_multiindex_no_write_index
```



---
## test_to_excel_empty_multiindex
```python
from test_writers import test_to_excel_empty_multiindex
```



---
## test_to_excel_float_format
```python
from test_writers import test_to_excel_float_format
```



---
## test_to_excel_output_encoding
```python
from test_writers import test_to_excel_output_encoding
```



---
## test_to_excel_unicode_filename
```python
from test_writers import test_to_excel_unicode_filename
```



---
## test_excel_010_hemstring
```python
from test_writers import test_excel_010_hemstring
```



---
## test_duplicated_columns
```python
from test_writers import test_duplicated_columns
```



---
## test_swapped_columns
```python
from test_writers import test_swapped_columns
```



---
## test_invalid_columns
```python
from test_writers import test_invalid_columns
```



---
## test_write_subset_columns
```python
from test_writers import test_write_subset_columns
```



---
## test_comment_arg
```python
from test_writers import test_comment_arg
```



---
## test_comment_default
```python
from test_writers import test_comment_default
```



---
## test_comment_used
```python
from test_writers import test_comment_used
```



---
## test_comment_empty_line
```python
from test_writers import test_comment_empty_line
```



---
## test_datetimes
```python
from test_writers import test_datetimes
```



---
## test_bytes_io
```python
from test_writers import test_bytes_io
```



---
## test_engine_kwargs
```python
from test_writers import test_engine_kwargs
```



---
## test_write_lists_dict
```python
from test_writers import test_write_lists_dict
```



---
## test_render_as_column_name
```python
from test_writers import test_render_as_column_name
```



---
## test_true_and_false_value_options
```python
from test_writers import test_true_and_false_value_options
```



---
## test_freeze_panes
```python
from test_writers import test_freeze_panes
```



---
## test_path_path_lib
```python
from test_writers import test_path_path_lib
```



---
## test_path_local_path
```python
from test_writers import test_path_local_path
```



---
## test_merged_cell_custom_objects
```python
from test_writers import test_merged_cell_custom_objects
```



---
## test_raise_when_saving_timezones
```python
from test_writers import test_raise_when_saving_timezones
```



---
## test_excel_duplicate_columns_with_names
```python
from test_writers import test_excel_duplicate_columns_with_names
```



---
## test_if_sheet_exists_raises
```python
from test_writers import test_if_sheet_exists_raises
```



---
## test_excel_writer_empty_frame
```python
from test_writers import test_excel_writer_empty_frame
```



---
## test_to_excel_empty_frame
```python
from test_writers import test_to_excel_empty_frame
```



---
## test_ExcelWriter_dispatch
```python
from test_writers import test_ExcelWriter_dispatch
```



---
## test_ExcelWriter_dispatch_raises
```python
from test_writers import test_ExcelWriter_dispatch_raises
```



---
## test_register_writer
```python
from test_writers import test_register_writer
```



---
## test_excelfile_fspath
```python
from test_writers import test_excelfile_fspath
```



---
## test_excelwriter_fspath
```python
from test_writers import test_excelwriter_fspath
```



---
## test_to_excel_pos_args_deprecation
```python
from test_writers import test_to_excel_pos_args_deprecation
```



---
## tdf
```python
from test_writers import tdf
```



---
## roundtrip
```python
from test_writers import roundtrip
```



---
## DummyClass
```python
from test_writers import DummyClass
```



---
## book
```python
from test_writers import book
```



---
## _save
```python
from test_writers import _save
```



---
## _write_cells
```python
from test_writers import _write_cells
```



---
## sheets
```python
from test_writers import sheets
```



---
## assert_called_and_reset
```python
from test_writers import assert_called_and_reset
```



---
## __name__
```python
from test_odf import __name__
```



---
## cd_and_set_engine
```python
from test_odf import cd_and_set_engine
```



---
## test_read_invalid_types_raises
```python
from test_odf import test_read_invalid_types_raises
```



---
## test_read_writer_table
```python
from test_odf import test_read_writer_table
```



---
## test_read_newlines_between_xml_elements_table
```python
from test_odf import test_read_newlines_between_xml_elements_table
```



---
## test_read_unempty_cells
```python
from test_odf import test_read_unempty_cells
```



---
## test_read_cell_annotation
```python
from test_odf import test_read_cell_annotation
```



---
## __name__
```python
from test_openpyxl import __name__
```



---
## ext
```python
from test_openpyxl import ext
```



---
## test_to_excel_styleconverter
```python
from test_openpyxl import test_to_excel_styleconverter
```



---
## test_write_cells_merge_styled
```python
from test_openpyxl import test_write_cells_merge_styled
```



---
## test_engine_kwargs_write
```python
from test_openpyxl import test_engine_kwargs_write
```



---
## test_engine_kwargs_append_invalid
```python
from test_openpyxl import test_engine_kwargs_append_invalid
```



---
## test_engine_kwargs_append_data_only
```python
from test_openpyxl import test_engine_kwargs_append_data_only
```



---
## test_engine_kwargs_append_reader
```python
from test_openpyxl import test_engine_kwargs_append_reader
```



---
## test_write_append_mode
```python
from test_openpyxl import test_write_append_mode
```



---
## test_if_sheet_exists_append_modes
```python
from test_openpyxl import test_if_sheet_exists_append_modes
```



---
## test_append_overlay_startrow_startcol
```python
from test_openpyxl import test_append_overlay_startrow_startcol
```



---
## test_if_sheet_exists_raises
```python
from test_openpyxl import test_if_sheet_exists_raises
```



---
## test_to_excel_with_openpyxl_engine
```python
from test_openpyxl import test_to_excel_with_openpyxl_engine
```



---
## test_read_workbook
```python
from test_openpyxl import test_read_workbook
```



---
## test_read_with_bad_dimension
```python
from test_openpyxl import test_read_with_bad_dimension
```



---
## test_append_mode_file
```python
from test_openpyxl import test_append_mode_file
```



---
## test_read_with_empty_trailing_rows
```python
from test_openpyxl import test_read_with_empty_trailing_rows
```



---
## test_read_empty_with_blank_row
```python
from test_openpyxl import test_read_empty_with_blank_row
```



---
## test_book_and_sheets_consistent
```python
from test_openpyxl import test_book_and_sheets_consistent
```



---
## test_ints_spelled_with_decimals
```python
from test_openpyxl import test_ints_spelled_with_decimals
```



---
## test_read_multiindex_header_no_index_names
```python
from test_openpyxl import test_read_multiindex_header_no_index_names
```



---
## __name__
```python
from test_xlrd import __name__
```



---
## read_ext_xlrd
```python
from test_xlrd import read_ext_xlrd
```

Valid extensions for reading Excel files with xlrd.

Similar to read_ext, but excludes .ods, .xlsb, and for xlrd>2 .xlsx, .xlsm

---
## test_read_xlrd_book
```python
from test_xlrd import test_read_xlrd_book
```



---
## test_read_xlsx_fails
```python
from test_xlrd import test_read_xlsx_fails
```



---
## test_nan_in_xls
```python
from test_xlrd import test_nan_in_xls
```



---
## test_read_old_xls_files
```python
from test_xlrd import test_read_old_xls_files
```



---
## assert_equal_cell_styles
```python
from test_style import assert_equal_cell_styles
```



---
## test_styler_to_excel_unstyled
```python
from test_style import test_styler_to_excel_unstyled
```



---
## test_styler_to_excel_basic
```python
from test_style import test_styler_to_excel_basic
```



---
## test_styler_to_excel_basic_indexes
```python
from test_style import test_styler_to_excel_basic_indexes
```



---
## test_styler_to_excel_border_style
```python
from test_style import test_styler_to_excel_border_style
```



---
## test_styler_custom_converter
```python
from test_style import test_styler_custom_converter
```



---
## test_styler_to_s3
```python
from test_style import test_styler_to_s3
```



---
## custom_converter
```python
from test_style import custom_converter
```



---
## __name__
```python
from test_comment import __name__
```

Tests that comments are properly handled during parsing
for all of the parsers defined in parsers.py

---
## test_comment
```python
from test_comment import test_comment
```



---
## test_line_comment
```python
from test_comment import test_line_comment
```



---
## test_comment_skiprows
```python
from test_comment import test_comment_skiprows
```



---
## test_comment_header
```python
from test_comment import test_comment_header
```



---
## test_comment_skiprows_header
```python
from test_comment import test_comment_skiprows_header
```



---
## test_custom_comment_char
```python
from test_comment import test_custom_comment_char
```



---
## test_comment_first_line
```python
from test_comment import test_comment_first_line
```



---
## test_comment_char_in_default_value
```python
from test_comment import test_comment_char_in_default_value
```



---
## __name__
```python
from test_multi_thread import __name__
```

Tests multithreading behaviour for reading and
parsing files for each parser defined in parsers.py

---
## test_multi_thread_string_io_read_csv
```python
from test_multi_thread import test_multi_thread_string_io_read_csv
```



---
## _generate_multi_thread_dataframe
```python
from test_multi_thread import _generate_multi_thread_dataframe
```

Generate a DataFrame via multi-thread.

Parameters
----------
parser : BaseParser
    The parser object to use for reading the data.
path : str
    The location of the CSV file to read.
num_rows : int
    The number of rows to read per task.
num_tasks : int
    The number of tasks to use for reading this DataFrame.

Returns
-------
df : DataFrame

---
## test_multi_thread_path_multipart_read_csv
```python
from test_multi_thread import test_multi_thread_path_multipart_read_csv
```



---
## reader
```python
from test_multi_thread import reader
```

Create a reader for part of the CSV.

Parameters
----------
arg : tuple
    A tuple of the following:

    * start : int
        The starting row to start for parsing CSV
    * nrows : int
        The number of rows to read.

Returns
-------
df : DataFrame

---
## buffer
```python
from test_compression import buffer
```



---
## parser_and_data
```python
from test_compression import parser_and_data
```



---
## test_zip
```python
from test_compression import test_zip
```



---
## test_zip_error_multiple_files
```python
from test_compression import test_zip_error_multiple_files
```



---
## test_zip_error_no_files
```python
from test_compression import test_zip_error_no_files
```



---
## test_zip_error_invalid_zip
```python
from test_compression import test_zip_error_invalid_zip
```



---
## test_compression
```python
from test_compression import test_compression
```



---
## test_infer_compression
```python
from test_compression import test_infer_compression
```



---
## test_compression_utf_encoding
```python
from test_compression import test_compression_utf_encoding
```



---
## test_invalid_compression
```python
from test_compression import test_invalid_compression
```



---
## test_compression_tar_archive
```python
from test_compression import test_compression_tar_archive
```



---
## test_ignore_compression_extension
```python
from test_compression import test_ignore_compression_extension
```



---
## test_writes_tar_gz
```python
from test_compression import test_writes_tar_gz
```



---
## BaseParser
```python
from conftest import BaseParser
```



---
## CParser
```python
from conftest import CParser
```



---
## CParserHighMemory
```python
from conftest import CParserHighMemory
```



---
## CParserLowMemory
```python
from conftest import CParserLowMemory
```



---
## PythonParser
```python
from conftest import PythonParser
```



---
## PyArrowParser
```python
from conftest import PyArrowParser
```



---
## csv_dir_path
```python
from conftest import csv_dir_path
```

The directory path to the data files needed for parser tests.

---
## csv1
```python
from conftest import csv1
```

The path to the data file "test1.csv" needed for parser tests.

---
## all_parsers
```python
from conftest import all_parsers
```

Fixture all of the CSV parsers.

---
## c_parser_only
```python
from conftest import c_parser_only
```

Fixture all of the CSV parsers using the C engine.

---
## python_parser_only
```python
from conftest import python_parser_only
```

Fixture all of the CSV parsers using the Python engine.

---
## pyarrow_parser_only
```python
from conftest import pyarrow_parser_only
```

Fixture all of the CSV parsers using the Pyarrow engine.

---
## _get_all_parser_float_precision_combinations
```python
from conftest import _get_all_parser_float_precision_combinations
```

Return all allowable parser and float precision
combinations and corresponding ids.

---
## all_parsers_all_precisions
```python
from conftest import all_parsers_all_precisions
```

Fixture for all allowable combinations of parser
and float precision

---
## utf_value
```python
from conftest import utf_value
```

Fixture for all possible integer values for a UTF encoding.

---
## encoding_fmt
```python
from conftest import encoding_fmt
```

Fixture for all possible string formats of a UTF encoding.

---
## numeric_decimal
```python
from conftest import numeric_decimal
```

Fixture for all numeric formats which should get recognized. The first entry
represents the value to read while the second represents the expected result.

---
## pyarrow_xfail
```python
from conftest import pyarrow_xfail
```

Fixture that xfails a test if the engine is pyarrow.

Use if failure is do to unsupported keywords or inconsistent results.

---
## pyarrow_skip
```python
from conftest import pyarrow_skip
```

Fixture that skips a test if the engine is pyarrow.

Use if failure is do a parsing failure from pyarrow.csv.read_csv

---
## update_kwargs
```python
from conftest import update_kwargs
```



---
## read_csv
```python
from conftest import read_csv
```



---
## read_csv_check_warnings
```python
from conftest import read_csv_check_warnings
```



---
## read_table
```python
from conftest import read_table
```



---
## read_table_check_warnings
```python
from conftest import read_table_check_warnings
```



---
## __name__
```python
from test_converters import __name__
```

Tests column conversion functionality during parsing
for all of the parsers defined in parsers.py

---
## test_converters_type_must_be_dict
```python
from test_converters import test_converters_type_must_be_dict
```



---
## test_converters
```python
from test_converters import test_converters
```



---
## test_converters_no_implicit_conv
```python
from test_converters import test_converters_no_implicit_conv
```



---
## test_converters_euro_decimal_format
```python
from test_converters import test_converters_euro_decimal_format
```



---
## test_converters_corner_with_nans
```python
from test_converters import test_converters_corner_with_nans
```



---
## test_converter_index_col_bug
```python
from test_converters import test_converter_index_col_bug
```



---
## test_converter_identity_object
```python
from test_converters import test_converter_identity_object
```



---
## test_converter_multi_index
```python
from test_converters import test_converter_multi_index
```



---
## convert_days
```python
from test_converters import convert_days
```



---
## convert_days_sentinel
```python
from test_converters import convert_days_sentinel
```



---
## convert_score
```python
from test_converters import convert_score
```



---
## __name__
```python
from test_concatenate_chunks import __name__
```



---
## test_concatenate_chunks_pyarrow
```python
from test_concatenate_chunks import test_concatenate_chunks_pyarrow
```



---
## test_concatenate_chunks_pyarrow_strings
```python
from test_concatenate_chunks import test_concatenate_chunks_pyarrow_strings
```



---
## __name__
```python
from test_parse_dates import __name__
```

Tests the usecols functionality during parsing
for all of the parsers defined in parsers.py

---
## test_read_csv_with_custom_date_parser
```python
from test_parse_dates import test_read_csv_with_custom_date_parser
```



---
## test_read_csv_with_custom_date_parser_parse_dates_false
```python
from test_parse_dates import test_read_csv_with_custom_date_parser_parse_dates_false
```



---
## test_separator_date_conflict
```python
from test_parse_dates import test_separator_date_conflict
```



---
## test_multiple_date_col_custom
```python
from test_parse_dates import test_multiple_date_col_custom
```



---
## test_concat_date_col_fail
```python
from test_parse_dates import test_concat_date_col_fail
```



---
## test_multiple_date_col
```python
from test_parse_dates import test_multiple_date_col
```



---
## test_date_col_as_index_col
```python
from test_parse_dates import test_date_col_as_index_col
```



---
## test_multiple_date_cols_int_cast
```python
from test_parse_dates import test_multiple_date_cols_int_cast
```



---
## test_multiple_date_col_timestamp_parse
```python
from test_parse_dates import test_multiple_date_col_timestamp_parse
```



---
## test_multiple_date_cols_with_header
```python
from test_parse_dates import test_multiple_date_cols_with_header
```



---
## test_multiple_date_col_name_collision
```python
from test_parse_dates import test_multiple_date_col_name_collision
```



---
## test_date_parser_int_bug
```python
from test_parse_dates import test_date_parser_int_bug
```



---
## test_nat_parse
```python
from test_parse_dates import test_nat_parse
```



---
## test_csv_custom_parser
```python
from test_parse_dates import test_csv_custom_parser
```



---
## test_parse_dates_implicit_first_col
```python
from test_parse_dates import test_parse_dates_implicit_first_col
```



---
## test_parse_dates_string
```python
from test_parse_dates import test_parse_dates_string
```



---
## test_yy_format_with_year_first
```python
from test_parse_dates import test_yy_format_with_year_first
```



---
## test_parse_dates_column_list
```python
from test_parse_dates import test_parse_dates_column_list
```



---
## test_multi_index_parse_dates
```python
from test_parse_dates import test_multi_index_parse_dates
```



---
## test_parse_dates_custom_euro_format
```python
from test_parse_dates import test_parse_dates_custom_euro_format
```



---
## test_parse_tz_aware
```python
from test_parse_dates import test_parse_tz_aware
```



---
## test_multiple_date_cols_index
```python
from test_parse_dates import test_multiple_date_cols_index
```



---
## test_multiple_date_cols_chunked
```python
from test_parse_dates import test_multiple_date_cols_chunked
```



---
## test_multiple_date_col_named_index_compat
```python
from test_parse_dates import test_multiple_date_col_named_index_compat
```



---
## test_multiple_date_col_multiple_index_compat
```python
from test_parse_dates import test_multiple_date_col_multiple_index_compat
```



---
## test_read_with_parse_dates_scalar_non_bool
```python
from test_parse_dates import test_read_with_parse_dates_scalar_non_bool
```



---
## test_read_with_parse_dates_invalid_type
```python
from test_parse_dates import test_read_with_parse_dates_invalid_type
```



---
## test_bad_date_parse
```python
from test_parse_dates import test_bad_date_parse
```



---
## test_bad_date_parse_with_warning
```python
from test_parse_dates import test_bad_date_parse_with_warning
```



---
## test_parse_dates_empty_string
```python
from test_parse_dates import test_parse_dates_empty_string
```



---
## test_parse_dates_infer_datetime_format_warning
```python
from test_parse_dates import test_parse_dates_infer_datetime_format_warning
```



---
## test_parse_dates_date_parser_and_date_format
```python
from test_parse_dates import test_parse_dates_date_parser_and_date_format
```



---
## test_parse_dates_no_convert_thousands
```python
from test_parse_dates import test_parse_dates_no_convert_thousands
```



---
## test_parse_date_time_multi_level_column_name
```python
from test_parse_dates import test_parse_date_time_multi_level_column_name
```



---
## test_parse_date_time
```python
from test_parse_dates import test_parse_date_time
```



---
## test_parse_date_fields
```python
from test_parse_dates import test_parse_date_fields
```



---
## test_parse_date_all_fields
```python
from test_parse_dates import test_parse_date_all_fields
```



---
## test_datetime_fractional_seconds
```python
from test_parse_dates import test_datetime_fractional_seconds
```



---
## test_generic
```python
from test_parse_dates import test_generic
```



---
## test_date_parser_resolution_if_not_ns
```python
from test_parse_dates import test_date_parser_resolution_if_not_ns
```



---
## test_parse_date_column_with_empty_string
```python
from test_parse_dates import test_parse_date_column_with_empty_string
```



---
## test_parse_date_float
```python
from test_parse_dates import test_parse_date_float
```



---
## test_parse_timezone
```python
from test_parse_dates import test_parse_timezone
```



---
## test_invalid_parse_delimited_date
```python
from test_parse_dates import test_invalid_parse_delimited_date
```



---
## test_parse_delimited_date_swap_no_warning
```python
from test_parse_dates import test_parse_delimited_date_swap_no_warning
```



---
## test_parse_delimited_date_swap_with_warning
```python
from test_parse_dates import test_parse_delimited_date_swap_with_warning
```



---
## test_parse_multiple_delimited_dates_with_swap_warnings
```python
from test_parse_dates import test_parse_multiple_delimited_dates_with_swap_warnings
```



---
## test_missing_parse_dates_column_raises
```python
from test_parse_dates import test_missing_parse_dates_column_raises
```



---
## test_date_parser_and_names
```python
from test_parse_dates import test_date_parser_and_names
```



---
## test_date_parser_multiindex_columns
```python
from test_parse_dates import test_date_parser_multiindex_columns
```



---
## test_date_parser_multiindex_columns_combine_cols
```python
from test_parse_dates import test_date_parser_multiindex_columns_combine_cols
```



---
## test_date_parser_usecols_thousands
```python
from test_parse_dates import test_date_parser_usecols_thousands
```



---
## test_parse_dates_and_keep_original_column
```python
from test_parse_dates import test_parse_dates_and_keep_original_column
```



---
## test_dayfirst_warnings
```python
from test_parse_dates import test_dayfirst_warnings
```



---
## test_dayfirst_warnings_no_leading_zero
```python
from test_parse_dates import test_dayfirst_warnings_no_leading_zero
```



---
## test_infer_first_column_as_index
```python
from test_parse_dates import test_infer_first_column_as_index
```



---
## test_replace_nans_before_parsing_dates
```python
from test_parse_dates import test_replace_nans_before_parsing_dates
```



---
## test_parse_dates_and_string_dtype
```python
from test_parse_dates import test_parse_dates_and_string_dtype
```



---
## test_parse_dot_separated_dates
```python
from test_parse_dates import test_parse_dot_separated_dates
```



---
## test_parse_dates_dict_format
```python
from test_parse_dates import test_parse_dates_dict_format
```



---
## test_parse_dates_dict_format_two_columns
```python
from test_parse_dates import test_parse_dates_dict_format_two_columns
```



---
## test_parse_dates_dict_format_index
```python
from test_parse_dates import test_parse_dates_dict_format_index
```



---
## test_parse_dates_arrow_engine
```python
from test_parse_dates import test_parse_dates_arrow_engine
```



---
## test_from_csv_with_mixed_offsets
```python
from test_parse_dates import test_from_csv_with_mixed_offsets
```



---
## __custom_date_parser
```python
from test_parse_dates import __custom_date_parser
```



---
## date_parser
```python
from test_parse_dates import date_parser
```



---
## parse_function
```python
from test_parse_dates import parse_function
```



---
## __name__
```python
from test_c_parser_only import __name__
```

Tests that apply specifically to the CParser. Unless specifically stated
as a CParser-specific issue, the goal is to eventually move as many of
these tests out of this module as soon as the Python parser can accept
further arguments when parsing.

---
## test_buffer_overflow
```python
from test_c_parser_only import test_buffer_overflow
```



---
## test_delim_whitespace_custom_terminator
```python
from test_c_parser_only import test_delim_whitespace_custom_terminator
```



---
## test_dtype_and_names_error
```python
from test_c_parser_only import test_dtype_and_names_error
```



---
## test_unsupported_dtype
```python
from test_c_parser_only import test_unsupported_dtype
```



---
## test_precise_conversion
```python
from test_c_parser_only import test_precise_conversion
```



---
## test_usecols_dtypes
```python
from test_c_parser_only import test_usecols_dtypes
```



---
## test_disable_bool_parsing
```python
from test_c_parser_only import test_disable_bool_parsing
```



---
## test_custom_lineterminator
```python
from test_c_parser_only import test_custom_lineterminator
```



---
## test_parse_ragged_csv
```python
from test_c_parser_only import test_parse_ragged_csv
```



---
## test_tokenize_CR_with_quoting
```python
from test_c_parser_only import test_tokenize_CR_with_quoting
```



---
## test_grow_boundary_at_cap
```python
from test_c_parser_only import test_grow_boundary_at_cap
```



---
## test_parse_trim_buffers
```python
from test_c_parser_only import test_parse_trim_buffers
```



---
## test_internal_null_byte
```python
from test_c_parser_only import test_internal_null_byte
```



---
## test_read_nrows_large
```python
from test_c_parser_only import test_read_nrows_large
```



---
## test_float_precision_round_trip_with_text
```python
from test_c_parser_only import test_float_precision_round_trip_with_text
```



---
## test_large_difference_in_columns
```python
from test_c_parser_only import test_large_difference_in_columns
```



---
## test_data_after_quote
```python
from test_c_parser_only import test_data_after_quote
```



---
## test_comment_whitespace_delimited
```python
from test_c_parser_only import test_comment_whitespace_delimited
```



---
## test_file_like_no_next
```python
from test_c_parser_only import test_file_like_no_next
```



---
## test_buffer_rd_bytes_bad_unicode
```python
from test_c_parser_only import test_buffer_rd_bytes_bad_unicode
```



---
## test_read_tarfile
```python
from test_c_parser_only import test_read_tarfile
```



---
## test_chunk_whitespace_on_boundary
```python
from test_c_parser_only import test_chunk_whitespace_on_boundary
```



---
## test_file_handles_mmap
```python
from test_c_parser_only import test_file_handles_mmap
```



---
## test_file_binary_mode
```python
from test_c_parser_only import test_file_binary_mode
```



---
## test_unix_style_breaks
```python
from test_c_parser_only import test_unix_style_breaks
```



---
## test_1000_sep_with_decimal
```python
from test_c_parser_only import test_1000_sep_with_decimal
```



---
## test_float_precision_options
```python
from test_c_parser_only import test_float_precision_options
```



---
## error
```python
from test_c_parser_only import error
```



---
## NoNextBuffer
```python
from test_c_parser_only import NoNextBuffer
```



---
## __next__
```python
from test_c_parser_only import __next__
```



---
## __name__
```python
from test_dialect import __name__
```

Tests that dialects are properly handled during parsing
for all of the parsers defined in parsers.py

---
## custom_dialect
```python
from test_dialect import custom_dialect
```



---
## test_dialect
```python
from test_dialect import test_dialect
```



---
## test_dialect_str
```python
from test_dialect import test_dialect_str
```



---
## test_invalid_dialect
```python
from test_dialect import test_invalid_dialect
```



---
## test_dialect_conflict_except_delimiter
```python
from test_dialect import test_dialect_conflict_except_delimiter
```



---
## test_dialect_conflict_delimiter
```python
from test_dialect import test_dialect_conflict_delimiter
```



---
## InvalidDialect
```python
from test_dialect import InvalidDialect
```



---
## __name__
```python
from test_skiprows import __name__
```

Tests that skipped rows are properly handled during
parsing for all of the parsers defined in parsers.py

---
## test_skip_rows_bug
```python
from test_skiprows import test_skip_rows_bug
```



---
## test_deep_skip_rows
```python
from test_skiprows import test_deep_skip_rows
```



---
## test_skip_rows_blank
```python
from test_skiprows import test_skip_rows_blank
```



---
## test_skip_row_with_newline
```python
from test_skiprows import test_skip_row_with_newline
```



---
## test_skip_row_with_quote
```python
from test_skiprows import test_skip_row_with_quote
```



---
## test_skip_row_with_newline_and_quote
```python
from test_skiprows import test_skip_row_with_newline_and_quote
```



---
## test_skiprows_lineterminator
```python
from test_skiprows import test_skiprows_lineterminator
```



---
## test_skiprows_infield_quote
```python
from test_skiprows import test_skiprows_infield_quote
```



---
## test_skip_rows_callable
```python
from test_skiprows import test_skip_rows_callable
```



---
## test_skip_rows_callable_not_in
```python
from test_skiprows import test_skip_rows_callable_not_in
```



---
## test_skip_rows_skip_all
```python
from test_skiprows import test_skip_rows_skip_all
```



---
## test_skip_rows_bad_callable
```python
from test_skiprows import test_skip_rows_bad_callable
```



---
## test_skip_rows_and_n_rows
```python
from test_skiprows import test_skip_rows_and_n_rows
```



---
## test_skip_rows_with_chunks
```python
from test_skiprows import test_skip_rows_with_chunks
```



---
## __name__
```python
from test_encoding import __name__
```

Tests encoding functionality during parsing
for all of the parsers defined in parsers.py

---
## test_bytes_io_input
```python
from test_encoding import test_bytes_io_input
```



---
## test_read_csv_unicode
```python
from test_encoding import test_read_csv_unicode
```



---
## test_utf16_bom_skiprows
```python
from test_encoding import test_utf16_bom_skiprows
```



---
## test_utf16_example
```python
from test_encoding import test_utf16_example
```



---
## test_unicode_encoding
```python
from test_encoding import test_unicode_encoding
```



---
## test_utf8_bom
```python
from test_encoding import test_utf8_bom
```



---
## test_read_csv_utf_aliases
```python
from test_encoding import test_read_csv_utf_aliases
```



---
## test_binary_mode_file_buffers
```python
from test_encoding import test_binary_mode_file_buffers
```



---
## test_encoding_temp_file
```python
from test_encoding import test_encoding_temp_file
```



---
## test_encoding_named_temp_file
```python
from test_encoding import test_encoding_named_temp_file
```



---
## test_parse_encoded_special_characters
```python
from test_encoding import test_parse_encoded_special_characters
```



---
## test_encoding_memory_map
```python
from test_encoding import test_encoding_memory_map
```



---
## test_chunk_splits_multibyte_char
```python
from test_encoding import test_chunk_splits_multibyte_char
```

Chunk splits a multibyte character with memory_map=True

GH 43540

---
## test_readcsv_memmap_utf8
```python
from test_encoding import test_readcsv_memmap_utf8
```

GH 43787

Test correct handling of UTF-8 chars when memory_map=True and encoding is UTF-8

---
## test_not_readable
```python
from test_encoding import test_not_readable
```



---
## _encode_data_with_bom
```python
from test_encoding import _encode_data_with_bom
```



---
## __name__
```python
from test_read_fwf import __name__
```

Tests the 'read_fwf' function in parsers.py. This
test suite is independent of the others because the
engine is set to 'python-fwf' internally.

---
## test_basic
```python
from test_read_fwf import test_basic
```



---
## test_colspecs
```python
from test_read_fwf import test_colspecs
```



---
## test_widths
```python
from test_read_fwf import test_widths
```



---
## test_non_space_filler
```python
from test_read_fwf import test_non_space_filler
```



---
## test_over_specified
```python
from test_read_fwf import test_over_specified
```



---
## test_under_specified
```python
from test_read_fwf import test_under_specified
```



---
## test_read_csv_compat
```python
from test_read_fwf import test_read_csv_compat
```



---
## test_bytes_io_input
```python
from test_read_fwf import test_bytes_io_input
```



---
## test_fwf_colspecs_is_list_or_tuple
```python
from test_read_fwf import test_fwf_colspecs_is_list_or_tuple
```



---
## test_fwf_colspecs_is_list_or_tuple_of_two_element_tuples
```python
from test_read_fwf import test_fwf_colspecs_is_list_or_tuple_of_two_element_tuples
```



---
## test_fwf_colspecs_none
```python
from test_read_fwf import test_fwf_colspecs_none
```



---
## test_fwf_colspecs_infer_nrows
```python
from test_read_fwf import test_fwf_colspecs_infer_nrows
```



---
## test_fwf_regression
```python
from test_read_fwf import test_fwf_regression
```



---
## test_fwf_for_uint8
```python
from test_read_fwf import test_fwf_for_uint8
```



---
## test_fwf_comment
```python
from test_read_fwf import test_fwf_comment
```



---
## test_fwf_skip_blank_lines
```python
from test_read_fwf import test_fwf_skip_blank_lines
```



---
## test_fwf_thousands
```python
from test_read_fwf import test_fwf_thousands
```



---
## test_bool_header_arg
```python
from test_read_fwf import test_bool_header_arg
```



---
## test_full_file
```python
from test_read_fwf import test_full_file
```



---
## test_full_file_with_missing
```python
from test_read_fwf import test_full_file_with_missing
```



---
## test_full_file_with_spaces
```python
from test_read_fwf import test_full_file_with_spaces
```



---
## test_full_file_with_spaces_and_missing
```python
from test_read_fwf import test_full_file_with_spaces_and_missing
```



---
## test_messed_up_data
```python
from test_read_fwf import test_messed_up_data
```



---
## test_multiple_delimiters
```python
from test_read_fwf import test_multiple_delimiters
```



---
## test_variable_width_unicode
```python
from test_read_fwf import test_variable_width_unicode
```



---
## test_dtype
```python
from test_read_fwf import test_dtype
```



---
## test_skiprows_inference
```python
from test_read_fwf import test_skiprows_inference
```



---
## test_skiprows_by_index_inference
```python
from test_read_fwf import test_skiprows_by_index_inference
```



---
## test_skiprows_inference_empty
```python
from test_read_fwf import test_skiprows_inference_empty
```



---
## test_whitespace_preservation
```python
from test_read_fwf import test_whitespace_preservation
```



---
## test_default_delimiter
```python
from test_read_fwf import test_default_delimiter
```



---
## test_fwf_compression
```python
from test_read_fwf import test_fwf_compression
```



---
## test_binary_mode
```python
from test_read_fwf import test_binary_mode
```

read_fwf supports opening files in binary mode.

GH 18035.

---
## test_encoding_mmap
```python
from test_read_fwf import test_encoding_mmap
```

encoding should be working, even when using a memory-mapped file.

GH 23254.

---
## test_len_colspecs_len_names
```python
from test_read_fwf import test_len_colspecs_len_names
```



---
## test_len_colspecs_len_names_with_index_col
```python
from test_read_fwf import test_len_colspecs_len_names_with_index_col
```



---
## test_colspecs_with_comment
```python
from test_read_fwf import test_colspecs_with_comment
```



---
## test_skip_rows_and_n_rows
```python
from test_read_fwf import test_skip_rows_and_n_rows
```



---
## test_skiprows_with_iterator
```python
from test_read_fwf import test_skiprows_with_iterator
```



---
## test_names_and_infer_colspecs
```python
from test_read_fwf import test_names_and_infer_colspecs
```



---
## test_widths_and_usecols
```python
from test_read_fwf import test_widths_and_usecols
```



---
## test_dtype_backend
```python
from test_read_fwf import test_dtype_backend
```



---
## test_invalid_dtype_backend
```python
from test_read_fwf import test_invalid_dtype_backend
```



---
## test_url_urlopen
```python
from test_read_fwf import test_url_urlopen
```



---
## __name__
```python
from test_upcast import __name__
```



---
## test_maybe_upcast
```python
from test_upcast import test_maybe_upcast
```



---
## test_maybe_upcast_no_na
```python
from test_upcast import test_maybe_upcast_no_na
```



---
## test_maybe_upcaste_bool
```python
from test_upcast import test_maybe_upcaste_bool
```



---
## test_maybe_upcaste_bool_no_nan
```python
from test_upcast import test_maybe_upcaste_bool_no_nan
```



---
## test_maybe_upcaste_all_nan
```python
from test_upcast import test_maybe_upcaste_all_nan
```



---
## test_maybe_upcast_object
```python
from test_upcast import test_maybe_upcast_object
```



---
## __name__
```python
from test_unsupported import __name__
```

Tests that features that are currently unsupported in
either the Python or C parser are actually enforced
and are clearly communicated to the user.

Ultimately, the goal is to remove test cases from this
test suite as new feature support is added to the parsers.

---
## python_engine
```python
from test_unsupported import python_engine
```



---
## TestUnsupportedFeatures
```python
from test_unsupported import TestUnsupportedFeatures
```



---
## test_close_file_handle_on_invalid_usecols
```python
from test_unsupported import test_close_file_handle_on_invalid_usecols
```



---
## test_invalid_file_inputs
```python
from test_unsupported import test_invalid_file_inputs
```



---
## test_invalid_dtype_backend
```python
from test_unsupported import test_invalid_dtype_backend
```



---
## test_mangle_dupe_cols_false
```python
from test_unsupported import test_mangle_dupe_cols_false
```



---
## test_c_engine
```python
from test_unsupported import test_c_engine
```



---
## test_python_engine
```python
from test_unsupported import test_python_engine
```



---
## test_python_engine_file_no_iter
```python
from test_unsupported import test_python_engine_file_no_iter
```



---
## test_pyarrow_engine
```python
from test_unsupported import test_pyarrow_engine
```



---
## test_on_bad_lines_callable_python_or_pyarrow
```python
from test_unsupported import test_on_bad_lines_callable_python_or_pyarrow
```



---
## NoNextBuffer
```python
from test_unsupported import NoNextBuffer
```



---
## __init__
```python
from test_unsupported import __init__
```



---
## __next__
```python
from test_unsupported import __next__
```



---
## read
```python
from test_unsupported import read
```



---
## readline
```python
from test_unsupported import readline
```



---
## __name__
```python
from test_mangle_dupes import __name__
```

Tests that duplicate columns are handled appropriately when parsed by the
CSV engine. In general, the expected result is that they are either thoroughly
de-duplicated (if mangling requested) or ignored otherwise.

---
## test_basic
```python
from test_mangle_dupes import test_basic
```



---
## test_basic_names
```python
from test_mangle_dupes import test_basic_names
```



---
## test_basic_names_raise
```python
from test_mangle_dupes import test_basic_names_raise
```



---
## test_thorough_mangle_columns
```python
from test_mangle_dupes import test_thorough_mangle_columns
```



---
## test_thorough_mangle_names
```python
from test_mangle_dupes import test_thorough_mangle_names
```



---
## test_mangled_unnamed_placeholders
```python
from test_mangle_dupes import test_mangled_unnamed_placeholders
```



---
## test_mangle_dupe_cols_already_exists
```python
from test_mangle_dupes import test_mangle_dupe_cols_already_exists
```



---
## test_mangle_dupe_cols_already_exists_unnamed_col
```python
from test_mangle_dupes import test_mangle_dupe_cols_already_exists_unnamed_col
```



---
## test_mangle_cols_names
```python
from test_mangle_dupes import test_mangle_cols_names
```



---
## __name__
```python
from test_python_parser_only import __name__
```

Tests that apply specifically to the Python parser. Unless specifically
stated as a Python-specific issue, the goal is to eventually move as many of
these tests out of this module as soon as the C parser can accept further
arguments when parsing.

---
## test_default_separator
```python
from test_python_parser_only import test_default_separator
```



---
## test_invalid_skipfooter_non_int
```python
from test_python_parser_only import test_invalid_skipfooter_non_int
```



---
## test_invalid_skipfooter_negative
```python
from test_python_parser_only import test_invalid_skipfooter_negative
```



---
## test_sniff_delimiter
```python
from test_python_parser_only import test_sniff_delimiter
```



---
## test_sniff_delimiter_comment
```python
from test_python_parser_only import test_sniff_delimiter_comment
```



---
## test_sniff_delimiter_encoding
```python
from test_python_parser_only import test_sniff_delimiter_encoding
```



---
## test_single_line
```python
from test_python_parser_only import test_single_line
```



---
## test_skipfooter
```python
from test_python_parser_only import test_skipfooter
```



---
## test_decompression_regex_sep
```python
from test_python_parser_only import test_decompression_regex_sep
```



---
## test_read_csv_buglet_4x_multi_index
```python
from test_python_parser_only import test_read_csv_buglet_4x_multi_index
```



---
## test_read_csv_buglet_4x_multi_index2
```python
from test_python_parser_only import test_read_csv_buglet_4x_multi_index2
```



---
## test_skipfooter_with_decimal
```python
from test_python_parser_only import test_skipfooter_with_decimal
```



---
## test_encoding_non_utf8_multichar_sep
```python
from test_python_parser_only import test_encoding_non_utf8_multichar_sep
```



---
## test_multi_char_sep_quotes
```python
from test_python_parser_only import test_multi_char_sep_quotes
```



---
## test_none_delimiter
```python
from test_python_parser_only import test_none_delimiter
```



---
## test_skipfooter_bad_row
```python
from test_python_parser_only import test_skipfooter_bad_row
```



---
## test_malformed_skipfooter
```python
from test_python_parser_only import test_malformed_skipfooter
```



---
## test_python_engine_file_no_next
```python
from test_python_parser_only import test_python_engine_file_no_next
```



---
## test_on_bad_lines_callable
```python
from test_python_parser_only import test_on_bad_lines_callable
```



---
## test_on_bad_lines_callable_write_to_external_list
```python
from test_python_parser_only import test_on_bad_lines_callable_write_to_external_list
```



---
## test_on_bad_lines_callable_iterator_true
```python
from test_python_parser_only import test_on_bad_lines_callable_iterator_true
```



---
## test_on_bad_lines_callable_dont_swallow_errors
```python
from test_python_parser_only import test_on_bad_lines_callable_dont_swallow_errors
```



---
## test_on_bad_lines_callable_not_expected_length
```python
from test_python_parser_only import test_on_bad_lines_callable_not_expected_length
```



---
## test_on_bad_lines_callable_returns_none
```python
from test_python_parser_only import test_on_bad_lines_callable_returns_none
```



---
## test_on_bad_lines_index_col_inferred
```python
from test_python_parser_only import test_on_bad_lines_index_col_inferred
```



---
## test_index_col_false_and_header_none
```python
from test_python_parser_only import test_index_col_false_and_header_none
```



---
## test_header_int_do_not_infer_multiindex_names_on_different_line
```python
from test_python_parser_only import test_header_int_do_not_infer_multiindex_names_on_different_line
```



---
## test_no_thousand_convert_with_dot_for_non_numeric_cols
```python
from test_python_parser_only import test_no_thousand_convert_with_dot_for_non_numeric_cols
```



---
## test_no_thousand_convert_for_non_numeric_cols
```python
from test_python_parser_only import test_no_thousand_convert_for_non_numeric_cols
```



---
## NoNextBuffer
```python
from test_python_parser_only import NoNextBuffer
```



---
## bad_line_func
```python
from test_python_parser_only import bad_line_func
```



---
## __init__
```python
from test_python_parser_only import __init__
```



---
## __iter__
```python
from test_python_parser_only import __iter__
```



---
## read
```python
from test_python_parser_only import read
```



---
## readline
```python
from test_python_parser_only import readline
```



---
## __name__
```python
from test_textreader import __name__
```

Tests the TextReader class in parsers.pyx, which
is integral to the C engine in parsers.py

---
## TestTextReader
```python
from test_textreader import TestTextReader
```



---
## assert_array_dicts_equal
```python
from test_textreader import assert_array_dicts_equal
```



---
## csv_path
```python
from test_textreader import csv_path
```



---
## test_file_handle
```python
from test_textreader import test_file_handle
```



---
## test_file_handle_mmap
```python
from test_textreader import test_file_handle_mmap
```



---
## test_StringIO
```python
from test_textreader import test_StringIO
```



---
## test_string_factorize
```python
from test_textreader import test_string_factorize
```



---
## test_skipinitialspace
```python
from test_textreader import test_skipinitialspace
```



---
## test_parse_booleans
```python
from test_textreader import test_parse_booleans
```



---
## test_delimit_whitespace
```python
from test_textreader import test_delimit_whitespace
```



---
## test_embedded_newline
```python
from test_textreader import test_embedded_newline
```



---
## test_euro_decimal
```python
from test_textreader import test_euro_decimal
```



---
## test_integer_thousands
```python
from test_textreader import test_integer_thousands
```



---
## test_integer_thousands_alt
```python
from test_textreader import test_integer_thousands_alt
```



---
## test_skip_bad_lines
```python
from test_textreader import test_skip_bad_lines
```



---
## test_header_not_enough_lines
```python
from test_textreader import test_header_not_enough_lines
```



---
## test_escapechar
```python
from test_textreader import test_escapechar
```



---
## test_eof_has_eol
```python
from test_textreader import test_eof_has_eol
```



---
## test_na_substitution
```python
from test_textreader import test_na_substitution
```



---
## test_numpy_string_dtype
```python
from test_textreader import test_numpy_string_dtype
```



---
## test_pass_dtype
```python
from test_textreader import test_pass_dtype
```



---
## test_usecols
```python
from test_textreader import test_usecols
```



---
## test_cr_delimited
```python
from test_textreader import test_cr_delimited
```



---
## test_empty_field_eof
```python
from test_textreader import test_empty_field_eof
```



---
## test_empty_field_eof_mem_access_bug
```python
from test_textreader import test_empty_field_eof_mem_access_bug
```



---
## test_empty_csv_input
```python
from test_textreader import test_empty_csv_input
```



---
## _make_reader
```python
from test_textreader import _make_reader
```



---
## __name__
```python
from test_network import __name__
```

Tests parsers ability to read and parse non-local files
and hence require a network connection to be read.

---
## test_compressed_urls
```python
from test_network import test_compressed_urls
```



---
## test_url_encoding_csv
```python
from test_network import test_url_encoding_csv
```

read_csv should honor the requested encoding for URLs.

GH 10424

---
## tips_df
```python
from test_network import tips_df
```

DataFrame with the tips dataset.

---
## TestS3
```python
from test_network import TestS3
```



---
## test_parse_public_s3_bucket
```python
from test_network import test_parse_public_s3_bucket
```



---
## test_parse_private_s3_bucket
```python
from test_network import test_parse_private_s3_bucket
```



---
## test_parse_public_s3n_bucket
```python
from test_network import test_parse_public_s3n_bucket
```



---
## test_parse_public_s3a_bucket
```python
from test_network import test_parse_public_s3a_bucket
```



---
## test_parse_public_s3_bucket_nrows
```python
from test_network import test_parse_public_s3_bucket_nrows
```



---
## test_parse_public_s3_bucket_chunked
```python
from test_network import test_parse_public_s3_bucket_chunked
```



---
## test_parse_public_s3_bucket_chunked_python
```python
from test_network import test_parse_public_s3_bucket_chunked_python
```



---
## test_parse_public_s3_bucket_python
```python
from test_network import test_parse_public_s3_bucket_python
```



---
## test_infer_s3_compression
```python
from test_network import test_infer_s3_compression
```



---
## test_parse_public_s3_bucket_nrows_python
```python
from test_network import test_parse_public_s3_bucket_nrows_python
```



---
## test_read_s3_fails
```python
from test_network import test_read_s3_fails
```



---
## test_read_s3_fails_private
```python
from test_network import test_read_s3_fails_private
```



---
## test_write_s3_csv_fails
```python
from test_network import test_write_s3_csv_fails
```



---
## test_write_s3_parquet_fails
```python
from test_network import test_write_s3_parquet_fails
```



---
## test_read_csv_handles_boto_s3_object
```python
from test_network import test_read_csv_handles_boto_s3_object
```



---
## test_read_csv_chunked_download
```python
from test_network import test_read_csv_chunked_download
```



---
## test_read_s3_with_hash_in_key
```python
from test_network import test_read_s3_with_hash_in_key
```



---
## test_read_feather_s3_file_path
```python
from test_network import test_read_feather_s3_file_path
```



---
## __name__
```python
from test_na_values import __name__
```

Tests that NA values are properly handled during
parsing for all of the parsers defined in parsers.py

---
## test_string_nas
```python
from test_na_values import test_string_nas
```



---
## test_detect_string_na
```python
from test_na_values import test_detect_string_na
```



---
## test_non_string_na_values
```python
from test_na_values import test_non_string_na_values
```



---
## test_default_na_values
```python
from test_na_values import test_default_na_values
```



---
## test_custom_na_values
```python
from test_na_values import test_custom_na_values
```



---
## test_bool_na_values
```python
from test_na_values import test_bool_na_values
```



---
## test_na_value_dict
```python
from test_na_values import test_na_value_dict
```



---
## test_na_value_dict_multi_index
```python
from test_na_values import test_na_value_dict_multi_index
```



---
## test_na_values_keep_default
```python
from test_na_values import test_na_values_keep_default
```



---
## test_no_na_values_no_keep_default
```python
from test_na_values import test_no_na_values_no_keep_default
```



---
## test_no_keep_default_na_dict_na_values
```python
from test_na_values import test_no_keep_default_na_dict_na_values
```



---
## test_no_keep_default_na_dict_na_scalar_values
```python
from test_na_values import test_no_keep_default_na_dict_na_scalar_values
```



---
## test_no_keep_default_na_dict_na_values_diff_reprs
```python
from test_na_values import test_no_keep_default_na_dict_na_values_diff_reprs
```



---
## test_na_values_na_filter_override
```python
from test_na_values import test_na_values_na_filter_override
```



---
## test_na_trailing_columns
```python
from test_na_values import test_na_trailing_columns
```



---
## test_na_values_scalar
```python
from test_na_values import test_na_values_scalar
```



---
## test_na_values_dict_aliasing
```python
from test_na_values import test_na_values_dict_aliasing
```



---
## test_na_values_dict_col_index
```python
from test_na_values import test_na_values_dict_col_index
```



---
## test_na_values_uint64
```python
from test_na_values import test_na_values_uint64
```



---
## test_empty_na_values_no_default_with_index
```python
from test_na_values import test_empty_na_values_no_default_with_index
```



---
## test_no_na_filter_on_index
```python
from test_na_values import test_no_na_filter_on_index
```



---
## test_inf_na_values_with_int_index
```python
from test_na_values import test_inf_na_values_with_int_index
```



---
## test_na_values_with_dtype_str_and_na_filter
```python
from test_na_values import test_na_values_with_dtype_str_and_na_filter
```



---
## test_cast_NA_to_bool_raises_error
```python
from test_na_values import test_cast_NA_to_bool_raises_error
```



---
## test_str_nan_dropped
```python
from test_na_values import test_str_nan_dropped
```



---
## test_nan_multi_index
```python
from test_na_values import test_nan_multi_index
```



---
## test_bool_and_nan_to_bool
```python
from test_na_values import test_bool_and_nan_to_bool
```



---
## test_bool_and_nan_to_int
```python
from test_na_values import test_bool_and_nan_to_int
```



---
## test_bool_and_nan_to_float
```python
from test_na_values import test_bool_and_nan_to_float
```



---
## f
```python
from test_na_values import f
```



---
## __name__
```python
from test_quoting import __name__
```

Tests that quoting specifications are properly handled
during parsing for all of the parsers defined in parsers.py

---
## test_bad_quote_char
```python
from test_quoting import test_bad_quote_char
```



---
## test_bad_quoting
```python
from test_quoting import test_bad_quoting
```



---
## test_quote_char_basic
```python
from test_quoting import test_quote_char_basic
```



---
## test_quote_char_various
```python
from test_quoting import test_quote_char_various
```



---
## test_null_quote_char
```python
from test_quoting import test_null_quote_char
```



---
## test_quoting_various
```python
from test_quoting import test_quoting_various
```



---
## test_double_quote
```python
from test_quoting import test_double_quote
```



---
## test_quotechar_unicode
```python
from test_quoting import test_quotechar_unicode
```



---
## test_unbalanced_quoting
```python
from test_quoting import test_unbalanced_quoting
```



---
## __name__
```python
from test_header import __name__
```

Tests that the file header is properly handled or inferred
during parsing for all of the parsers defined in parsers.py

---
## test_read_with_bad_header
```python
from test_header import test_read_with_bad_header
```



---
## test_negative_header
```python
from test_header import test_negative_header
```



---
## test_negative_multi_index_header
```python
from test_header import test_negative_multi_index_header
```



---
## test_bool_header_arg
```python
from test_header import test_bool_header_arg
```



---
## test_header_with_index_col
```python
from test_header import test_header_with_index_col
```



---
## test_header_not_first_line
```python
from test_header import test_header_not_first_line
```



---
## test_header_multi_index
```python
from test_header import test_header_multi_index
```



---
## test_header_multi_index_invalid
```python
from test_header import test_header_multi_index_invalid
```



---
## test_header_multi_index_common_format1
```python
from test_header import test_header_multi_index_common_format1
```



---
## test_header_multi_index_common_format2
```python
from test_header import test_header_multi_index_common_format2
```



---
## test_header_multi_index_common_format3
```python
from test_header import test_header_multi_index_common_format3
```



---
## test_header_multi_index_common_format_malformed1
```python
from test_header import test_header_multi_index_common_format_malformed1
```



---
## test_header_multi_index_common_format_malformed2
```python
from test_header import test_header_multi_index_common_format_malformed2
```



---
## test_header_multi_index_common_format_malformed3
```python
from test_header import test_header_multi_index_common_format_malformed3
```



---
## test_header_multi_index_blank_line
```python
from test_header import test_header_multi_index_blank_line
```



---
## test_header_names_backward_compat
```python
from test_header import test_header_names_backward_compat
```



---
## test_read_only_header_no_rows
```python
from test_header import test_read_only_header_no_rows
```



---
## test_no_header
```python
from test_header import test_no_header
```



---
## test_non_int_header
```python
from test_header import test_non_int_header
```



---
## test_singleton_header
```python
from test_header import test_singleton_header
```



---
## test_mangles_multi_index
```python
from test_header import test_mangles_multi_index
```



---
## test_multi_index_unnamed
```python
from test_header import test_multi_index_unnamed
```



---
## test_names_longer_than_header_but_equal_with_data_rows
```python
from test_header import test_names_longer_than_header_but_equal_with_data_rows
```



---
## test_read_csv_multiindex_columns
```python
from test_header import test_read_csv_multiindex_columns
```



---
## test_read_csv_multi_header_length_check
```python
from test_header import test_read_csv_multi_header_length_check
```



---
## test_header_none_and_implicit_index
```python
from test_header import test_header_none_and_implicit_index
```



---
## test_header_none_and_implicit_index_in_second_row
```python
from test_header import test_header_none_and_implicit_index_in_second_row
```



---
## test_header_none_and_on_bad_lines_skip
```python
from test_header import test_header_none_and_on_bad_lines_skip
```



---
## test_header_missing_rows
```python
from test_header import test_header_missing_rows
```



---
## test_header_multiple_whitespaces
```python
from test_header import test_header_multiple_whitespaces
```



---
## test_header_delim_whitespace
```python
from test_header import test_header_delim_whitespace
```



---
## test_usecols_no_header_pyarrow
```python
from test_header import test_usecols_no_header_pyarrow
```



---
## __name__
```python
from test_index_col import __name__
```

Tests that the specified index column (a.k.a "index_col")
is properly handled or inferred during parsing for all of
the parsers defined in parsers.py

---
## test_index_col_named
```python
from test_index_col import test_index_col_named
```



---
## test_index_col_named2
```python
from test_index_col import test_index_col_named2
```



---
## test_index_col_is_true
```python
from test_index_col import test_index_col_is_true
```



---
## test_infer_index_col
```python
from test_index_col import test_infer_index_col
```



---
## test_index_col_empty_data
```python
from test_index_col import test_index_col_empty_data
```



---
## test_empty_with_index_col_false
```python
from test_index_col import test_empty_with_index_col_false
```



---
## test_multi_index_naming
```python
from test_index_col import test_multi_index_naming
```



---
## test_multi_index_naming_not_all_at_beginning
```python
from test_index_col import test_multi_index_naming_not_all_at_beginning
```



---
## test_no_multi_index_level_names_empty
```python
from test_index_col import test_no_multi_index_level_names_empty
```



---
## test_header_with_index_col
```python
from test_index_col import test_header_with_index_col
```



---
## test_index_col_large_csv
```python
from test_index_col import test_index_col_large_csv
```



---
## test_index_col_multiindex_columns_no_data
```python
from test_index_col import test_index_col_multiindex_columns_no_data
```



---
## test_index_col_header_no_data
```python
from test_index_col import test_index_col_header_no_data
```



---
## test_multiindex_columns_no_data
```python
from test_index_col import test_multiindex_columns_no_data
```



---
## test_multiindex_columns_index_col_with_data
```python
from test_index_col import test_multiindex_columns_index_col_with_data
```



---
## test_infer_types_boolean_sum
```python
from test_index_col import test_infer_types_boolean_sum
```



---
## test_specify_dtype_for_index_col
```python
from test_index_col import test_specify_dtype_for_index_col
```



---
## test_multiindex_columns_not_leading_index_col
```python
from test_index_col import test_multiindex_columns_not_leading_index_col
```



---
## xml_data_path
```python
from conftest import xml_data_path
```



---
## xml_books
```python
from conftest import xml_books
```



---
## xml_doc_ch_utf
```python
from conftest import xml_doc_ch_utf
```



---
## xml_baby_names
```python
from conftest import xml_baby_names
```



---
## kml_cta_rail_lines
```python
from conftest import kml_cta_rail_lines
```



---
## xsl_flatten_doc
```python
from conftest import xsl_flatten_doc
```



---
## xsl_row_field_output
```python
from conftest import xsl_row_field_output
```



---
## __name__
```python
from test_xml import __name__
```



---
## test_literal_xml_deprecation
```python
from test_xml import test_literal_xml_deprecation
```



---
## mode
```python
from test_xml import mode
```



---
## parser
```python
from test_xml import parser
```



---
## read_xml_iterparse
```python
from test_xml import read_xml_iterparse
```



---
## read_xml_iterparse_comp
```python
from test_xml import read_xml_iterparse_comp
```



---
## test_parser_consistency_file
```python
from test_xml import test_parser_consistency_file
```



---
## test_parser_consistency_url
```python
from test_xml import test_parser_consistency_url
```



---
## test_file_like
```python
from test_xml import test_file_like
```



---
## test_file_io
```python
from test_xml import test_file_io
```



---
## test_file_buffered_reader_string
```python
from test_xml import test_file_buffered_reader_string
```



---
## test_file_buffered_reader_no_xml_declaration
```python
from test_xml import test_file_buffered_reader_no_xml_declaration
```



---
## test_string_charset
```python
from test_xml import test_string_charset
```



---
## test_file_charset
```python
from test_xml import test_file_charset
```



---
## test_file_handle_close
```python
from test_xml import test_file_handle_close
```



---
## test_empty_string_lxml
```python
from test_xml import test_empty_string_lxml
```



---
## test_empty_string_etree
```python
from test_xml import test_empty_string_etree
```



---
## test_wrong_file_path
```python
from test_xml import test_wrong_file_path
```



---
## test_url
```python
from test_xml import test_url
```



---
## test_wrong_url
```python
from test_xml import test_wrong_url
```



---
## test_whitespace
```python
from test_xml import test_whitespace
```



---
## test_empty_xpath_lxml
```python
from test_xml import test_empty_xpath_lxml
```



---
## test_bad_xpath_etree
```python
from test_xml import test_bad_xpath_etree
```



---
## test_bad_xpath_lxml
```python
from test_xml import test_bad_xpath_lxml
```



---
## test_default_namespace
```python
from test_xml import test_default_namespace
```



---
## test_prefix_namespace
```python
from test_xml import test_prefix_namespace
```



---
## test_consistency_default_namespace
```python
from test_xml import test_consistency_default_namespace
```



---
## test_consistency_prefix_namespace
```python
from test_xml import test_consistency_prefix_namespace
```



---
## test_missing_prefix_with_default_namespace
```python
from test_xml import test_missing_prefix_with_default_namespace
```



---
## test_missing_prefix_definition_etree
```python
from test_xml import test_missing_prefix_definition_etree
```



---
## test_missing_prefix_definition_lxml
```python
from test_xml import test_missing_prefix_definition_lxml
```



---
## test_none_namespace_prefix
```python
from test_xml import test_none_namespace_prefix
```



---
## test_file_elems_and_attrs
```python
from test_xml import test_file_elems_and_attrs
```



---
## test_file_only_attrs
```python
from test_xml import test_file_only_attrs
```



---
## test_file_only_elems
```python
from test_xml import test_file_only_elems
```



---
## test_elem_and_attrs_only
```python
from test_xml import test_elem_and_attrs_only
```



---
## test_empty_attrs_only
```python
from test_xml import test_empty_attrs_only
```



---
## test_empty_elems_only
```python
from test_xml import test_empty_elems_only
```



---
## test_attribute_centric_xml
```python
from test_xml import test_attribute_centric_xml
```



---
## test_names_option_output
```python
from test_xml import test_names_option_output
```



---
## test_repeat_names
```python
from test_xml import test_repeat_names
```



---
## test_repeat_values_new_names
```python
from test_xml import test_repeat_values_new_names
```



---
## test_repeat_elements
```python
from test_xml import test_repeat_elements
```



---
## test_names_option_wrong_length
```python
from test_xml import test_names_option_wrong_length
```



---
## test_names_option_wrong_type
```python
from test_xml import test_names_option_wrong_type
```



---
## test_wrong_encoding
```python
from test_xml import test_wrong_encoding
```



---
## test_utf16_encoding
```python
from test_xml import test_utf16_encoding
```



---
## test_unknown_encoding
```python
from test_xml import test_unknown_encoding
```



---
## test_ascii_encoding
```python
from test_xml import test_ascii_encoding
```



---
## test_parser_consistency_with_encoding
```python
from test_xml import test_parser_consistency_with_encoding
```



---
## test_wrong_encoding_for_lxml
```python
from test_xml import test_wrong_encoding_for_lxml
```



---
## test_none_encoding_etree
```python
from test_xml import test_none_encoding_etree
```



---
## test_default_parser_no_lxml
```python
from test_xml import test_default_parser_no_lxml
```



---
## test_wrong_parser
```python
from test_xml import test_wrong_parser
```



---
## test_stylesheet_file
```python
from test_xml import test_stylesheet_file
```



---
## test_stylesheet_file_like
```python
from test_xml import test_stylesheet_file_like
```



---
## test_stylesheet_io
```python
from test_xml import test_stylesheet_io
```



---
## test_stylesheet_buffered_reader
```python
from test_xml import test_stylesheet_buffered_reader
```



---
## test_style_charset
```python
from test_xml import test_style_charset
```



---
## test_not_stylesheet
```python
from test_xml import test_not_stylesheet
```



---
## test_incorrect_xsl_syntax
```python
from test_xml import test_incorrect_xsl_syntax
```



---
## test_incorrect_xsl_eval
```python
from test_xml import test_incorrect_xsl_eval
```



---
## test_incorrect_xsl_apply
```python
from test_xml import test_incorrect_xsl_apply
```



---
## test_wrong_stylesheet
```python
from test_xml import test_wrong_stylesheet
```



---
## test_stylesheet_file_close
```python
from test_xml import test_stylesheet_file_close
```



---
## test_stylesheet_with_etree
```python
from test_xml import test_stylesheet_with_etree
```



---
## test_empty_stylesheet
```python
from test_xml import test_empty_stylesheet
```



---
## test_file_like_iterparse
```python
from test_xml import test_file_like_iterparse
```



---
## test_file_io_iterparse
```python
from test_xml import test_file_io_iterparse
```



---
## test_url_path_error
```python
from test_xml import test_url_path_error
```



---
## test_compression_error
```python
from test_xml import test_compression_error
```



---
## test_wrong_dict_type
```python
from test_xml import test_wrong_dict_type
```



---
## test_wrong_dict_value
```python
from test_xml import test_wrong_dict_value
```



---
## test_bad_xml
```python
from test_xml import test_bad_xml
```



---
## test_comment
```python
from test_xml import test_comment
```



---
## test_dtd
```python
from test_xml import test_dtd
```



---
## test_processing_instruction
```python
from test_xml import test_processing_instruction
```



---
## test_no_result
```python
from test_xml import test_no_result
```



---
## test_empty_data
```python
from test_xml import test_empty_data
```



---
## test_online_stylesheet
```python
from test_xml import test_online_stylesheet
```



---
## test_compression_read
```python
from test_xml import test_compression_read
```



---
## test_wrong_compression
```python
from test_xml import test_wrong_compression
```



---
## test_unsuported_compression
```python
from test_xml import test_unsuported_compression
```



---
## test_s3_parser_consistency
```python
from test_xml import test_s3_parser_consistency
```



---
## test_read_xml_nullable_dtypes
```python
from test_xml import test_read_xml_nullable_dtypes
```



---
## test_invalid_dtype_backend
```python
from test_xml import test_invalid_dtype_backend
```



---
## __name__
```python
from test_to_xml import __name__
```



---
## geom_df
```python
from test_to_xml import geom_df
```



---
## planet_df
```python
from test_to_xml import planet_df
```



---
## from_file_expected
```python
from test_to_xml import from_file_expected
```



---
## equalize_decl
```python
from test_to_xml import equalize_decl
```



---
## mode
```python
from test_to_xml import mode
```



---
## parser
```python
from test_to_xml import parser
```



---
## test_file_output_str_read
```python
from test_to_xml import test_file_output_str_read
```



---
## test_file_output_bytes_read
```python
from test_to_xml import test_file_output_bytes_read
```



---
## test_str_output
```python
from test_to_xml import test_str_output
```



---
## test_wrong_file_path
```python
from test_to_xml import test_wrong_file_path
```



---
## test_index_false
```python
from test_to_xml import test_index_false
```



---
## test_index_false_rename_row_root
```python
from test_to_xml import test_index_false_rename_row_root
```



---
## test_index_false_with_offset_input_index
```python
from test_to_xml import test_index_false_with_offset_input_index
```

Tests that the output does not contain the `<index>` field when the index of the
input Dataframe has an offset.

This is a regression test for issue #42458.

---
## test_na_elem_output
```python
from test_to_xml import test_na_elem_output
```



---
## test_na_empty_str_elem_option
```python
from test_to_xml import test_na_empty_str_elem_option
```



---
## test_na_empty_elem_option
```python
from test_to_xml import test_na_empty_elem_option
```



---
## test_attrs_cols_nan_output
```python
from test_to_xml import test_attrs_cols_nan_output
```



---
## test_attrs_cols_prefix
```python
from test_to_xml import test_attrs_cols_prefix
```



---
## test_attrs_unknown_column
```python
from test_to_xml import test_attrs_unknown_column
```



---
## test_attrs_wrong_type
```python
from test_to_xml import test_attrs_wrong_type
```



---
## test_elems_cols_nan_output
```python
from test_to_xml import test_elems_cols_nan_output
```



---
## test_elems_unknown_column
```python
from test_to_xml import test_elems_unknown_column
```



---
## test_elems_wrong_type
```python
from test_to_xml import test_elems_wrong_type
```



---
## test_elems_and_attrs_cols
```python
from test_to_xml import test_elems_and_attrs_cols
```



---
## test_hierarchical_columns
```python
from test_to_xml import test_hierarchical_columns
```



---
## test_hierarchical_attrs_columns
```python
from test_to_xml import test_hierarchical_attrs_columns
```



---
## test_multi_index
```python
from test_to_xml import test_multi_index
```



---
## test_multi_index_attrs_cols
```python
from test_to_xml import test_multi_index_attrs_cols
```



---
## test_default_namespace
```python
from test_to_xml import test_default_namespace
```



---
## test_unused_namespaces
```python
from test_to_xml import test_unused_namespaces
```



---
## test_namespace_prefix
```python
from test_to_xml import test_namespace_prefix
```



---
## test_missing_prefix_in_nmsp
```python
from test_to_xml import test_missing_prefix_in_nmsp
```



---
## test_namespace_prefix_and_default
```python
from test_to_xml import test_namespace_prefix_and_default
```



---
## test_encoding_option_str
```python
from test_to_xml import test_encoding_option_str
```



---
## test_correct_encoding_file
```python
from test_to_xml import test_correct_encoding_file
```



---
## test_wrong_encoding_option_lxml
```python
from test_to_xml import test_wrong_encoding_option_lxml
```



---
## test_misspelled_encoding
```python
from test_to_xml import test_misspelled_encoding
```



---
## test_xml_declaration_pretty_print
```python
from test_to_xml import test_xml_declaration_pretty_print
```



---
## test_no_pretty_print_with_decl
```python
from test_to_xml import test_no_pretty_print_with_decl
```



---
## test_no_pretty_print_no_decl
```python
from test_to_xml import test_no_pretty_print_no_decl
```



---
## test_default_parser_no_lxml
```python
from test_to_xml import test_default_parser_no_lxml
```



---
## test_unknown_parser
```python
from test_to_xml import test_unknown_parser
```



---
## test_stylesheet_file_like
```python
from test_to_xml import test_stylesheet_file_like
```



---
## test_stylesheet_io
```python
from test_to_xml import test_stylesheet_io
```



---
## test_stylesheet_buffered_reader
```python
from test_to_xml import test_stylesheet_buffered_reader
```



---
## test_stylesheet_wrong_path
```python
from test_to_xml import test_stylesheet_wrong_path
```



---
## test_empty_string_stylesheet
```python
from test_to_xml import test_empty_string_stylesheet
```



---
## test_incorrect_xsl_syntax
```python
from test_to_xml import test_incorrect_xsl_syntax
```



---
## test_incorrect_xsl_eval
```python
from test_to_xml import test_incorrect_xsl_eval
```



---
## test_incorrect_xsl_apply
```python
from test_to_xml import test_incorrect_xsl_apply
```



---
## test_stylesheet_with_etree
```python
from test_to_xml import test_stylesheet_with_etree
```



---
## test_style_to_csv
```python
from test_to_xml import test_style_to_csv
```



---
## test_style_to_string
```python
from test_to_xml import test_style_to_string
```



---
## test_style_to_json
```python
from test_to_xml import test_style_to_json
```



---
## test_compression_output
```python
from test_to_xml import test_compression_output
```



---
## test_filename_and_suffix_comp
```python
from test_to_xml import test_filename_and_suffix_comp
```



---
## test_ea_dtypes
```python
from test_to_xml import test_ea_dtypes
```



---
## test_unsuported_compression
```python
from test_to_xml import test_unsuported_compression
```



---
## test_s3_permission_output
```python
from test_to_xml import test_s3_permission_output
```



---
## __name__
```python
from test_xml_dtypes import __name__
```



---
## parser
```python
from test_xml_dtypes import parser
```



---
## iterparse
```python
from test_xml_dtypes import iterparse
```



---
## read_xml_iterparse
```python
from test_xml_dtypes import read_xml_iterparse
```



---
## test_dtype_single_str
```python
from test_xml_dtypes import test_dtype_single_str
```



---
## test_dtypes_all_str
```python
from test_xml_dtypes import test_dtypes_all_str
```



---
## test_dtypes_with_names
```python
from test_xml_dtypes import test_dtypes_with_names
```



---
## test_dtype_nullable_int
```python
from test_xml_dtypes import test_dtype_nullable_int
```



---
## test_dtype_float
```python
from test_xml_dtypes import test_dtype_float
```



---
## test_wrong_dtype
```python
from test_xml_dtypes import test_wrong_dtype
```



---
## test_both_dtype_converters
```python
from test_xml_dtypes import test_both_dtype_converters
```



---
## test_converters_str
```python
from test_xml_dtypes import test_converters_str
```



---
## test_converters_date
```python
from test_xml_dtypes import test_converters_date
```



---
## test_wrong_converters_type
```python
from test_xml_dtypes import test_wrong_converters_type
```



---
## test_callable_func_converters
```python
from test_xml_dtypes import test_callable_func_converters
```



---
## test_callable_str_converters
```python
from test_xml_dtypes import test_callable_str_converters
```



---
## test_parse_dates_column_name
```python
from test_xml_dtypes import test_parse_dates_column_name
```



---
## test_parse_dates_column_index
```python
from test_xml_dtypes import test_parse_dates_column_index
```



---
## test_parse_dates_true
```python
from test_xml_dtypes import test_parse_dates_true
```



---
## test_parse_dates_dictionary
```python
from test_xml_dtypes import test_parse_dates_dictionary
```



---
## test_day_first_parse_dates
```python
from test_xml_dtypes import test_day_first_parse_dates
```



---
## test_wrong_parse_dates_type
```python
from test_xml_dtypes import test_wrong_parse_dates_type
```



---
## test_compression_roundtrip
```python
from test_compression import test_compression_roundtrip
```



---
## test_read_zipped_json
```python
from test_compression import test_read_zipped_json
```



---
## test_with_s3_url
```python
from test_compression import test_with_s3_url
```



---
## test_lines_with_compression
```python
from test_compression import test_lines_with_compression
```



---
## test_chunksize_with_compression
```python
from test_compression import test_chunksize_with_compression
```



---
## test_write_unsupported_compression_type
```python
from test_compression import test_write_unsupported_compression_type
```



---
## test_read_unsupported_compression_type
```python
from test_compression import test_read_unsupported_compression_type
```



---
## test_to_json_compression
```python
from test_compression import test_to_json_compression
```



---
## test_to_json_compression_mode
```python
from test_compression import test_to_json_compression_mode
```



---
## orient
```python
from conftest import orient
```

Fixture for orients excluding the table format.

---
## __name__
```python
from test_deprecated_kwargs import __name__
```

Tests for the deprecated keyword arguments for `read_json`.

---
## test_good_kwargs
```python
from test_deprecated_kwargs import test_good_kwargs
```



---
## __name__
```python
from test_json_table_schema import __name__
```

Tests for Table Schema integration.

---
## df_schema
```python
from test_json_table_schema import df_schema
```



---
## df_table
```python
from test_json_table_schema import df_table
```



---
## TestBuildSchema
```python
from test_json_table_schema import TestBuildSchema
```



---
## TestTableSchemaType
```python
from test_json_table_schema import TestTableSchemaType
```



---
## TestTableOrient
```python
from test_json_table_schema import TestTableOrient
```



---
## TestTableOrientReader
```python
from test_json_table_schema import TestTableOrientReader
```



---
## test_build_table_schema
```python
from test_json_table_schema import test_build_table_schema
```



---
## test_series
```python
from test_json_table_schema import test_series
```



---
## test_series_unnamed
```python
from test_json_table_schema import test_series_unnamed
```



---
## test_multiindex
```python
from test_json_table_schema import test_multiindex
```



---
## test_as_json_table_type_int_data
```python
from test_json_table_schema import test_as_json_table_type_int_data
```



---
## test_as_json_table_type_float_data
```python
from test_json_table_schema import test_as_json_table_type_float_data
```



---
## test_as_json_table_type_bool_data
```python
from test_json_table_schema import test_as_json_table_type_bool_data
```



---
## test_as_json_table_type_date_data
```python
from test_json_table_schema import test_as_json_table_type_date_data
```



---
## test_as_json_table_type_string_data
```python
from test_json_table_schema import test_as_json_table_type_string_data
```



---
## test_as_json_table_type_categorical_data
```python
from test_json_table_schema import test_as_json_table_type_categorical_data
```



---
## test_as_json_table_type_int_dtypes
```python
from test_json_table_schema import test_as_json_table_type_int_dtypes
```



---
## test_as_json_table_type_float_dtypes
```python
from test_json_table_schema import test_as_json_table_type_float_dtypes
```



---
## test_as_json_table_type_bool_dtypes
```python
from test_json_table_schema import test_as_json_table_type_bool_dtypes
```



---
## test_as_json_table_type_date_dtypes
```python
from test_json_table_schema import test_as_json_table_type_date_dtypes
```



---
## test_as_json_table_type_timedelta_dtypes
```python
from test_json_table_schema import test_as_json_table_type_timedelta_dtypes
```



---
## test_as_json_table_type_string_dtypes
```python
from test_json_table_schema import test_as_json_table_type_string_dtypes
```



---
## test_as_json_table_type_categorical_dtypes
```python
from test_json_table_schema import test_as_json_table_type_categorical_dtypes
```



---
## test_build_series
```python
from test_json_table_schema import test_build_series
```



---
## test_read_json_from_to_json_results
```python
from test_json_table_schema import test_read_json_from_to_json_results
```



---
## test_to_json
```python
from test_json_table_schema import test_to_json
```



---
## test_to_json_float_index
```python
from test_json_table_schema import test_to_json_float_index
```



---
## test_to_json_period_index
```python
from test_json_table_schema import test_to_json_period_index
```



---
## test_to_json_categorical_index
```python
from test_json_table_schema import test_to_json_categorical_index
```



---
## test_date_format_raises
```python
from test_json_table_schema import test_date_format_raises
```



---
## test_convert_pandas_type_to_json_field_int
```python
from test_json_table_schema import test_convert_pandas_type_to_json_field_int
```



---
## test_convert_pandas_type_to_json_field_float
```python
from test_json_table_schema import test_convert_pandas_type_to_json_field_float
```



---
## test_convert_pandas_type_to_json_field_datetime
```python
from test_json_table_schema import test_convert_pandas_type_to_json_field_datetime
```



---
## test_convert_pandas_type_to_json_period_range
```python
from test_json_table_schema import test_convert_pandas_type_to_json_period_range
```



---
## test_convert_pandas_type_to_json_field_categorical
```python
from test_json_table_schema import test_convert_pandas_type_to_json_field_categorical
```



---
## test_convert_json_field_to_pandas_type
```python
from test_json_table_schema import test_convert_json_field_to_pandas_type
```



---
## test_convert_json_field_to_pandas_type_raises
```python
from test_json_table_schema import test_convert_json_field_to_pandas_type_raises
```



---
## test_categorical
```python
from test_json_table_schema import test_categorical
```



---
## test_set_names_unset
```python
from test_json_table_schema import test_set_names_unset
```



---
## test_warns_non_roundtrippable_names
```python
from test_json_table_schema import test_warns_non_roundtrippable_names
```



---
## test_timestamp_in_columns
```python
from test_json_table_schema import test_timestamp_in_columns
```



---
## test_overlapping_names
```python
from test_json_table_schema import test_overlapping_names
```



---
## test_mi_falsey_name
```python
from test_json_table_schema import test_mi_falsey_name
```



---
## test_read_json_table_orient
```python
from test_json_table_schema import test_read_json_table_orient
```



---
## test_read_json_table_orient_raises
```python
from test_json_table_schema import test_read_json_table_orient_raises
```



---
## test_read_json_table_period_orient
```python
from test_json_table_schema import test_read_json_table_period_orient
```



---
## test_read_json_table_timezones_orient
```python
from test_json_table_schema import test_read_json_table_timezones_orient
```



---
## test_comprehensive
```python
from test_json_table_schema import test_comprehensive
```



---
## test_empty_frame_roundtrip
```python
from test_json_table_schema import test_empty_frame_roundtrip
```



---
## test_read_json_orient_table_old_schema_version
```python
from test_json_table_schema import test_read_json_orient_table_old_schema_version
```



---
## test_read_json_table_orient_period_depr_freq
```python
from test_json_table_schema import test_read_json_table_orient_period_depr_freq
```



---
## __name__
```python
from test_json_table_schema_ext_dtype import __name__
```

Tests for ExtensionDtype Table Schema integration.

---
## TestBuildSchema
```python
from test_json_table_schema_ext_dtype import TestBuildSchema
```



---
## TestTableSchemaType
```python
from test_json_table_schema_ext_dtype import TestTableSchemaType
```



---
## TestTableOrient
```python
from test_json_table_schema_ext_dtype import TestTableOrient
```



---
## test_build_table_schema
```python
from test_json_table_schema_ext_dtype import test_build_table_schema
```



---
## test_as_json_table_type_ext_date_array_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_date_array_dtype
```



---
## test_as_json_table_type_ext_date_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_date_dtype
```



---
## test_as_json_table_type_ext_decimal_array_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_decimal_array_dtype
```



---
## test_as_json_table_type_ext_decimal_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_decimal_dtype
```



---
## test_as_json_table_type_ext_string_array_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_string_array_dtype
```



---
## test_as_json_table_type_ext_string_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_string_dtype
```



---
## test_as_json_table_type_ext_integer_array_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_integer_array_dtype
```



---
## test_as_json_table_type_ext_integer_dtype
```python
from test_json_table_schema_ext_dtype import test_as_json_table_type_ext_integer_dtype
```



---
## da
```python
from test_json_table_schema_ext_dtype import da
```



---
## dc
```python
from test_json_table_schema_ext_dtype import dc
```



---
## sa
```python
from test_json_table_schema_ext_dtype import sa
```



---
## ia
```python
from test_json_table_schema_ext_dtype import ia
```



---
## df
```python
from test_json_table_schema_ext_dtype import df
```



---
## test_build_date_series
```python
from test_json_table_schema_ext_dtype import test_build_date_series
```



---
## test_build_decimal_series
```python
from test_json_table_schema_ext_dtype import test_build_decimal_series
```



---
## test_build_string_series
```python
from test_json_table_schema_ext_dtype import test_build_string_series
```



---
## test_build_int64_series
```python
from test_json_table_schema_ext_dtype import test_build_int64_series
```



---
## test_to_json
```python
from test_json_table_schema_ext_dtype import test_to_json
```



---
## test_json_ext_dtype_reading_roundtrip
```python
from test_json_table_schema_ext_dtype import test_json_ext_dtype_reading_roundtrip
```



---
## test_json_ext_dtype_reading
```python
from test_json_table_schema_ext_dtype import test_json_ext_dtype_reading
```



---
## __name__
```python
from test_readlines import __name__
```



---
## lines_json_df
```python
from test_readlines import lines_json_df
```



---
## engine
```python
from test_readlines import engine
```



---
## test_read_jsonl
```python
from test_readlines import test_read_jsonl
```



---
## test_read_jsonl_engine_pyarrow
```python
from test_readlines import test_read_jsonl_engine_pyarrow
```



---
## test_read_datetime
```python
from test_readlines import test_read_datetime
```



---
## test_read_jsonl_unicode_chars
```python
from test_readlines import test_read_jsonl_unicode_chars
```



---
## test_to_jsonl
```python
from test_readlines import test_to_jsonl
```



---
## test_to_jsonl_count_new_lines
```python
from test_readlines import test_to_jsonl_count_new_lines
```



---
## test_readjson_chunks
```python
from test_readlines import test_readjson_chunks
```



---
## test_readjson_chunksize_requires_lines
```python
from test_readlines import test_readjson_chunksize_requires_lines
```



---
## test_readjson_chunks_series
```python
from test_readlines import test_readjson_chunks_series
```



---
## test_readjson_each_chunk
```python
from test_readlines import test_readjson_each_chunk
```



---
## test_readjson_chunks_from_file
```python
from test_readlines import test_readjson_chunks_from_file
```



---
## test_readjson_chunks_closes
```python
from test_readlines import test_readjson_chunks_closes
```



---
## test_readjson_invalid_chunksize
```python
from test_readlines import test_readjson_invalid_chunksize
```



---
## test_readjson_chunks_multiple_empty_lines
```python
from test_readlines import test_readjson_chunks_multiple_empty_lines
```



---
## test_readjson_unicode
```python
from test_readlines import test_readjson_unicode
```



---
## test_readjson_nrows
```python
from test_readlines import test_readjson_nrows
```



---
## test_readjson_nrows_chunks
```python
from test_readlines import test_readjson_nrows_chunks
```



---
## test_readjson_nrows_requires_lines
```python
from test_readlines import test_readjson_nrows_requires_lines
```



---
## test_readjson_lines_chunks_fileurl
```python
from test_readlines import test_readjson_lines_chunks_fileurl
```



---
## test_chunksize_is_incremental
```python
from test_readlines import test_chunksize_is_incremental
```



---
## test_to_json_append_orient
```python
from test_readlines import test_to_json_append_orient
```



---
## test_to_json_append_lines
```python
from test_readlines import test_to_json_append_lines
```



---
## test_to_json_append_mode
```python
from test_readlines import test_to_json_append_mode
```



---
## test_to_json_append_output_consistent_columns
```python
from test_readlines import test_to_json_append_output_consistent_columns
```



---
## test_to_json_append_output_inconsistent_columns
```python
from test_readlines import test_to_json_append_output_inconsistent_columns
```



---
## test_to_json_append_output_different_columns
```python
from test_readlines import test_to_json_append_output_different_columns
```



---
## test_to_json_append_output_different_columns_reordered
```python
from test_readlines import test_to_json_append_output_different_columns_reordered
```



---
## MyReader
```python
from test_readlines import MyReader
```



---
## __init__
```python
from test_readlines import __init__
```



---
## read
```python
from test_readlines import read
```



---
## __iter__
```python
from test_readlines import __iter__
```



---
## __name__
```python
from test_ujson import __name__
```



---
## _clean_dict
```python
from test_ujson import _clean_dict
```

Sanitize dictionary for JSON by converting all keys to strings.

Parameters
----------
d : dict
    The dictionary to convert.

Returns
-------
cleaned_dict : dict

---
## orient
```python
from test_ujson import orient
```



---
## TestUltraJSONTests
```python
from test_ujson import TestUltraJSONTests
```



---
## TestNumpyJSONTests
```python
from test_ujson import TestNumpyJSONTests
```



---
## TestPandasJSONTests
```python
from test_ujson import TestPandasJSONTests
```



---
## test_encode_decimal
```python
from test_ujson import test_encode_decimal
```



---
## test_encode_string_conversion
```python
from test_ujson import test_encode_string_conversion
```



---
## test_double_long_numbers
```python
from test_ujson import test_double_long_numbers
```



---
## test_encode_non_c_locale
```python
from test_ujson import test_encode_non_c_locale
```



---
## test_decimal_decode_test_precise
```python
from test_ujson import test_decimal_decode_test_precise
```



---
## test_encode_double_tiny_exponential
```python
from test_ujson import test_encode_double_tiny_exponential
```



---
## test_encode_dict_with_unicode_keys
```python
from test_ujson import test_encode_dict_with_unicode_keys
```



---
## test_encode_double_conversion
```python
from test_ujson import test_encode_double_conversion
```



---
## test_encode_with_decimal
```python
from test_ujson import test_encode_with_decimal
```



---
## test_encode_array_of_nested_arrays
```python
from test_ujson import test_encode_array_of_nested_arrays
```



---
## test_encode_array_of_doubles
```python
from test_ujson import test_encode_array_of_doubles
```



---
## test_double_precision
```python
from test_ujson import test_double_precision
```



---
## test_invalid_double_precision
```python
from test_ujson import test_invalid_double_precision
```



---
## test_encode_string_conversion2
```python
from test_ujson import test_encode_string_conversion2
```



---
## test_encode_unicode_conversion
```python
from test_ujson import test_encode_unicode_conversion
```



---
## test_encode_control_escaping
```python
from test_ujson import test_encode_control_escaping
```



---
## test_encode_unicode_surrogate_pair
```python
from test_ujson import test_encode_unicode_surrogate_pair
```



---
## test_encode_unicode_4bytes_utf8
```python
from test_ujson import test_encode_unicode_4bytes_utf8
```



---
## test_encode_unicode_4bytes_utf8highest
```python
from test_ujson import test_encode_unicode_4bytes_utf8highest
```



---
## test_encode_unicode_error
```python
from test_ujson import test_encode_unicode_error
```



---
## test_encode_array_in_array
```python
from test_ujson import test_encode_array_in_array
```



---
## test_encode_num_conversion
```python
from test_ujson import test_encode_num_conversion
```



---
## test_encode_list_conversion
```python
from test_ujson import test_encode_list_conversion
```



---
## test_encode_dict_conversion
```python
from test_ujson import test_encode_dict_conversion
```



---
## test_encode_builtin_values_conversion
```python
from test_ujson import test_encode_builtin_values_conversion
```



---
## test_encode_datetime_conversion
```python
from test_ujson import test_encode_datetime_conversion
```



---
## test_encode_date_conversion
```python
from test_ujson import test_encode_date_conversion
```



---
## test_encode_time_conversion_basic
```python
from test_ujson import test_encode_time_conversion_basic
```



---
## test_encode_time_conversion_pytz
```python
from test_ujson import test_encode_time_conversion_pytz
```



---
## test_encode_time_conversion_dateutil
```python
from test_ujson import test_encode_time_conversion_dateutil
```



---
## test_encode_as_null
```python
from test_ujson import test_encode_as_null
```



---
## test_datetime_units
```python
from test_ujson import test_datetime_units
```



---
## test_encode_to_utf8
```python
from test_ujson import test_encode_to_utf8
```



---
## test_decode_from_unicode
```python
from test_ujson import test_decode_from_unicode
```



---
## test_encode_recursion_max
```python
from test_ujson import test_encode_recursion_max
```



---
## test_decode_jibberish
```python
from test_ujson import test_decode_jibberish
```



---
## test_decode_broken_json
```python
from test_ujson import test_decode_broken_json
```



---
## test_decode_depth_too_big
```python
from test_ujson import test_decode_depth_too_big
```



---
## test_decode_bad_string
```python
from test_ujson import test_decode_bad_string
```



---
## test_decode_broken_json_leak
```python
from test_ujson import test_decode_broken_json_leak
```



---
## test_decode_invalid_dict
```python
from test_ujson import test_decode_invalid_dict
```



---
## test_decode_numeric_int
```python
from test_ujson import test_decode_numeric_int
```



---
## test_encode_null_character
```python
from test_ujson import test_encode_null_character
```



---
## test_decode_null_character
```python
from test_ujson import test_decode_null_character
```



---
## test_encode_list_long_conversion
```python
from test_ujson import test_encode_list_long_conversion
```



---
## test_encode_long_conversion
```python
from test_ujson import test_encode_long_conversion
```



---
## test_dumps_ints_larger_than_maxsize
```python
from test_ujson import test_dumps_ints_larger_than_maxsize
```



---
## test_decode_numeric_int_exp
```python
from test_ujson import test_decode_numeric_int_exp
```



---
## test_loads_non_str_bytes_raises
```python
from test_ujson import test_loads_non_str_bytes_raises
```



---
## test_decode_number_with_32bit_sign_bit
```python
from test_ujson import test_decode_number_with_32bit_sign_bit
```



---
## test_encode_big_escape
```python
from test_ujson import test_encode_big_escape
```



---
## test_decode_big_escape
```python
from test_ujson import test_decode_big_escape
```



---
## test_to_dict
```python
from test_ujson import test_to_dict
```



---
## test_default_handler
```python
from test_ujson import test_default_handler
```



---
## test_encode_object
```python
from test_ujson import test_encode_object
```



---
## test_ujson__name__
```python
from test_ujson import test_ujson__name__
```



---
## test_bool
```python
from test_ujson import test_bool
```



---
## test_bool_array
```python
from test_ujson import test_bool_array
```



---
## test_int
```python
from test_ujson import test_int
```



---
## test_int_array
```python
from test_ujson import test_int_array
```



---
## test_int_max
```python
from test_ujson import test_int_max
```



---
## test_float
```python
from test_ujson import test_float
```



---
## test_float_array
```python
from test_ujson import test_float_array
```



---
## test_float_max
```python
from test_ujson import test_float_max
```



---
## test_array_basic
```python
from test_ujson import test_array_basic
```



---
## test_array_reshaped
```python
from test_ujson import test_array_reshaped
```



---
## test_array_list
```python
from test_ujson import test_array_list
```



---
## test_array_float
```python
from test_ujson import test_array_float
```



---
## test_0d_array
```python
from test_ujson import test_0d_array
```



---
## test_array_long_double
```python
from test_ujson import test_array_long_double
```



---
## test_dataframe
```python
from test_ujson import test_dataframe
```



---
## test_dataframe_nested
```python
from test_ujson import test_dataframe_nested
```



---
## test_series
```python
from test_ujson import test_series
```



---
## test_series_nested
```python
from test_ujson import test_series_nested
```



---
## test_index
```python
from test_ujson import test_index
```



---
## test_datetime_index
```python
from test_ujson import test_datetime_index
```



---
## test_decode_invalid_array
```python
from test_ujson import test_decode_invalid_array
```



---
## test_decode_array
```python
from test_ujson import test_decode_array
```



---
## test_decode_extreme_numbers
```python
from test_ujson import test_decode_extreme_numbers
```



---
## test_decode_too_extreme_numbers
```python
from test_ujson import test_decode_too_extreme_numbers
```



---
## test_decode_with_trailing_whitespaces
```python
from test_ujson import test_decode_with_trailing_whitespaces
```



---
## test_decode_with_trailing_non_whitespaces
```python
from test_ujson import test_decode_with_trailing_non_whitespaces
```



---
## test_decode_array_with_big_int
```python
from test_ujson import test_decode_array_with_big_int
```



---
## test_decode_floating_point
```python
from test_ujson import test_decode_floating_point
```



---
## test_encode_big_set
```python
from test_ujson import test_encode_big_set
```



---
## test_encode_empty_set
```python
from test_ujson import test_encode_empty_set
```



---
## test_encode_set
```python
from test_ujson import test_encode_set
```



---
## test_encode_timedelta_iso
```python
from test_ujson import test_encode_timedelta_iso
```



---
## test_encode_periodindex
```python
from test_ujson import test_encode_periodindex
```



---
## helper
```python
from test_ujson import helper
```



---
## O2
```python
from test_ujson import O2
```



---
## O1
```python
from test_ujson import O1
```



---
## DictTest
```python
from test_ujson import DictTest
```



---
## _TestObject
```python
from test_ujson import _TestObject
```



---
## my_handler
```python
from test_ujson import my_handler
```



---
## my_handler_raises
```python
from test_ujson import my_handler_raises
```



---
## my_int_handler
```python
from test_ujson import my_int_handler
```



---
## my_obj_handler
```python
from test_ujson import my_obj_handler
```



---
## toDict
```python
from test_ujson import toDict
```



---
## __init__
```python
from test_ujson import __init__
```



---
## recursive_attr
```python
from test_ujson import recursive_attr
```



---
## __str__
```python
from test_ujson import __str__
```



---
## e
```python
from test_ujson import e
```



---
## __name__
```python
from test_pandas import __name__
```



---
## test_literal_json_deprecation
```python
from test_pandas import test_literal_json_deprecation
```



---
## assert_json_roundtrip_equal
```python
from test_pandas import assert_json_roundtrip_equal
```



---
## TestPandasContainer
```python
from test_pandas import TestPandasContainer
```



---
## test_invalid_engine
```python
from test_pandas import test_invalid_engine
```



---
## test_pyarrow_engine_lines_false
```python
from test_pandas import test_pyarrow_engine_lines_false
```



---
## test_json_roundtrip_string_inference
```python
from test_pandas import test_json_roundtrip_string_inference
```



---
## test_json_pos_args_deprecation
```python
from test_pandas import test_json_pos_args_deprecation
```



---
## test_to_json_ea_null
```python
from test_pandas import test_to_json_ea_null
```



---
## test_read_json_lines_rangeindex
```python
from test_pandas import test_read_json_lines_rangeindex
```



---
## categorical_frame
```python
from test_pandas import categorical_frame
```



---
## datetime_series
```python
from test_pandas import datetime_series
```



---
## datetime_frame
```python
from test_pandas import datetime_frame
```



---
## test_frame_double_encoded_labels
```python
from test_pandas import test_frame_double_encoded_labels
```



---
## test_frame_non_unique_index
```python
from test_pandas import test_frame_non_unique_index
```



---
## test_frame_non_unique_index_raises
```python
from test_pandas import test_frame_non_unique_index_raises
```



---
## test_frame_non_unique_columns
```python
from test_pandas import test_frame_non_unique_columns
```



---
## test_frame_non_unique_columns_raises
```python
from test_pandas import test_frame_non_unique_columns_raises
```



---
## test_frame_default_orient
```python
from test_pandas import test_frame_default_orient
```



---
## test_roundtrip_simple
```python
from test_pandas import test_roundtrip_simple
```



---
## test_roundtrip_intframe
```python
from test_pandas import test_roundtrip_intframe
```



---
## test_roundtrip_str_axes
```python
from test_pandas import test_roundtrip_str_axes
```



---
## test_roundtrip_categorical
```python
from test_pandas import test_roundtrip_categorical
```



---
## test_roundtrip_empty
```python
from test_pandas import test_roundtrip_empty
```



---
## test_roundtrip_timestamp
```python
from test_pandas import test_roundtrip_timestamp
```



---
## test_roundtrip_mixed
```python
from test_pandas import test_roundtrip_mixed
```



---
## test_roundtrip_multiindex
```python
from test_pandas import test_roundtrip_multiindex
```



---
## test_frame_from_json_bad_data_raises
```python
from test_pandas import test_frame_from_json_bad_data_raises
```



---
## test_frame_from_json_missing_data
```python
from test_pandas import test_frame_from_json_missing_data
```



---
## test_frame_read_json_dtype_missing_value
```python
from test_pandas import test_frame_read_json_dtype_missing_value
```



---
## test_frame_infinity
```python
from test_pandas import test_frame_infinity
```



---
## test_frame_to_json_float_precision
```python
from test_pandas import test_frame_to_json_float_precision
```



---
## test_frame_to_json_except
```python
from test_pandas import test_frame_to_json_except
```



---
## test_frame_empty
```python
from test_pandas import test_frame_empty
```



---
## test_frame_empty_to_json
```python
from test_pandas import test_frame_empty_to_json
```



---
## test_frame_empty_mixedtype
```python
from test_pandas import test_frame_empty_mixedtype
```



---
## test_frame_mixedtype_orient
```python
from test_pandas import test_frame_mixedtype_orient
```



---
## test_v12_compat
```python
from test_pandas import test_v12_compat
```



---
## test_blocks_compat_GH9037
```python
from test_pandas import test_blocks_compat_GH9037
```



---
## test_frame_nonprintable_bytes
```python
from test_pandas import test_frame_nonprintable_bytes
```



---
## test_label_overflow
```python
from test_pandas import test_label_overflow
```



---
## test_series_non_unique_index
```python
from test_pandas import test_series_non_unique_index
```



---
## test_series_default_orient
```python
from test_pandas import test_series_default_orient
```



---
## test_series_roundtrip_simple
```python
from test_pandas import test_series_roundtrip_simple
```



---
## test_series_roundtrip_object
```python
from test_pandas import test_series_roundtrip_object
```



---
## test_series_roundtrip_empty
```python
from test_pandas import test_series_roundtrip_empty
```



---
## test_series_roundtrip_timeseries
```python
from test_pandas import test_series_roundtrip_timeseries
```



---
## test_series_roundtrip_numeric
```python
from test_pandas import test_series_roundtrip_numeric
```



---
## test_series_to_json_except
```python
from test_pandas import test_series_to_json_except
```



---
## test_series_from_json_precise_float
```python
from test_pandas import test_series_from_json_precise_float
```



---
## test_series_with_dtype
```python
from test_pandas import test_series_with_dtype
```



---
## test_series_with_dtype_datetime
```python
from test_pandas import test_series_with_dtype_datetime
```



---
## test_frame_from_json_precise_float
```python
from test_pandas import test_frame_from_json_precise_float
```



---
## test_typ
```python
from test_pandas import test_typ
```



---
## test_reconstruction_index
```python
from test_pandas import test_reconstruction_index
```



---
## test_path
```python
from test_pandas import test_path
```



---
## test_axis_dates
```python
from test_pandas import test_axis_dates
```



---
## test_convert_dates
```python
from test_pandas import test_convert_dates
```



---
## test_date_index_and_values
```python
from test_pandas import test_date_index_and_values
```



---
## test_convert_dates_infer
```python
from test_pandas import test_convert_dates_infer
```



---
## test_date_format_frame
```python
from test_pandas import test_date_format_frame
```



---
## test_date_format_frame_raises
```python
from test_pandas import test_date_format_frame_raises
```



---
## test_date_format_series
```python
from test_pandas import test_date_format_series
```



---
## test_date_format_series_raises
```python
from test_pandas import test_date_format_series_raises
```



---
## test_date_unit
```python
from test_pandas import test_date_unit
```



---
## test_iso_non_nano_datetimes
```python
from test_pandas import test_iso_non_nano_datetimes
```



---
## test_weird_nested_json
```python
from test_pandas import test_weird_nested_json
```



---
## test_doc_example
```python
from test_pandas import test_doc_example
```



---
## test_round_trip_exception
```python
from test_pandas import test_round_trip_exception
```



---
## test_url
```python
from test_pandas import test_url
```



---
## test_timedelta
```python
from test_pandas import test_timedelta
```



---
## test_timedelta2
```python
from test_pandas import test_timedelta2
```



---
## test_mixed_timedelta_datetime
```python
from test_pandas import test_mixed_timedelta_datetime
```



---
## test_timedelta_to_json
```python
from test_pandas import test_timedelta_to_json
```



---
## test_timedelta_to_json_fractional_precision
```python
from test_pandas import test_timedelta_to_json_fractional_precision
```



---
## test_default_handler
```python
from test_pandas import test_default_handler
```



---
## test_default_handler_indirect
```python
from test_pandas import test_default_handler_indirect
```



---
## test_default_handler_numpy_unsupported_dtype
```python
from test_pandas import test_default_handler_numpy_unsupported_dtype
```



---
## test_default_handler_raises
```python
from test_pandas import test_default_handler_raises
```



---
## test_categorical
```python
from test_pandas import test_categorical
```



---
## test_datetime_tz
```python
from test_pandas import test_datetime_tz
```



---
## test_sparse
```python
from test_pandas import test_sparse
```



---
## test_tz_is_utc
```python
from test_pandas import test_tz_is_utc
```



---
## test_tz_is_naive
```python
from test_pandas import test_tz_is_naive
```



---
## test_tz_range_is_utc
```python
from test_pandas import test_tz_range_is_utc
```



---
## test_tz_range_is_naive
```python
from test_pandas import test_tz_range_is_naive
```



---
## test_read_inline_jsonl
```python
from test_pandas import test_read_inline_jsonl
```



---
## test_read_s3_jsonl
```python
from test_pandas import test_read_s3_jsonl
```



---
## test_read_local_jsonl
```python
from test_pandas import test_read_local_jsonl
```



---
## test_read_jsonl_unicode_chars
```python
from test_pandas import test_read_jsonl_unicode_chars
```



---
## test_to_json_large_numbers
```python
from test_pandas import test_to_json_large_numbers
```



---
## test_read_json_large_numbers
```python
from test_pandas import test_read_json_large_numbers
```



---
## test_read_json_large_numbers2
```python
from test_pandas import test_read_json_large_numbers2
```



---
## test_to_jsonl
```python
from test_pandas import test_to_jsonl
```



---
## test_latin_encoding
```python
from test_pandas import test_latin_encoding
```



---
## test_data_frame_size_after_to_json
```python
from test_pandas import test_data_frame_size_after_to_json
```



---
## test_from_json_to_json_table_index_and_columns
```python
from test_pandas import test_from_json_to_json_table_index_and_columns
```



---
## test_from_json_to_json_table_dtypes
```python
from test_pandas import test_from_json_to_json_table_dtypes
```



---
## test_to_json_from_json_columns_dtypes
```python
from test_pandas import test_to_json_from_json_columns_dtypes
```



---
## test_read_json_table_dtype_raises
```python
from test_pandas import test_read_json_table_dtype_raises
```



---
## test_read_json_table_empty_axes_dtype
```python
from test_pandas import test_read_json_table_empty_axes_dtype
```



---
## test_read_json_table_convert_axes_raises
```python
from test_pandas import test_read_json_table_convert_axes_raises
```



---
## test_index_false_to_json_split
```python
from test_pandas import test_index_false_to_json_split
```



---
## test_index_false_to_json_table
```python
from test_pandas import test_index_false_to_json_table
```



---
## test_index_false_error_to_json
```python
from test_pandas import test_index_false_error_to_json
```



---
## test_index_true_error_to_json
```python
from test_pandas import test_index_true_error_to_json
```



---
## test_index_false_from_json_to_json
```python
from test_pandas import test_index_false_from_json_to_json
```



---
## test_read_timezone_information
```python
from test_pandas import test_read_timezone_information
```



---
## test_read_json_with_url_value
```python
from test_pandas import test_read_json_with_url_value
```



---
## test_read_json_with_very_long_file_path
```python
from test_pandas import test_read_json_with_very_long_file_path
```



---
## test_timedelta_as_label
```python
from test_pandas import test_timedelta_as_label
```



---
## test_tuple_labels
```python
from test_pandas import test_tuple_labels
```



---
## test_to_json_indent
```python
from test_pandas import test_to_json_indent
```



---
## test_json_indent_all_orients
```python
from test_pandas import test_json_indent_all_orients
```



---
## test_json_negative_indent_raises
```python
from test_pandas import test_json_negative_indent_raises
```



---
## test_emca_262_nan_inf_support
```python
from test_pandas import test_emca_262_nan_inf_support
```



---
## test_frame_int_overflow
```python
from test_pandas import test_frame_int_overflow
```



---
## test_json_multiindex
```python
from test_pandas import test_json_multiindex
```



---
## test_to_s3
```python
from test_pandas import test_to_s3
```



---
## test_json_pandas_nulls
```python
from test_pandas import test_json_pandas_nulls
```



---
## test_readjson_bool_series
```python
from test_pandas import test_readjson_bool_series
```



---
## test_to_json_multiindex_escape
```python
from test_pandas import test_to_json_multiindex_escape
```



---
## test_to_json_series_of_objects
```python
from test_pandas import test_to_json_series_of_objects
```



---
## test_complex_data_tojson
```python
from test_pandas import test_complex_data_tojson
```



---
## test_json_uint64
```python
from test_pandas import test_json_uint64
```



---
## test_read_json_dtype_backend
```python
from test_pandas import test_read_json_dtype_backend
```



---
## test_read_json_nullable_series
```python
from test_pandas import test_read_json_nullable_series
```



---
## test_invalid_dtype_backend
```python
from test_pandas import test_invalid_dtype_backend
```



---
## BinaryThing
```python
from test_pandas import BinaryThing
```



---
## default
```python
from test_pandas import default
```



---
## my_handler_raises
```python
from test_pandas import my_handler_raises
```



---
## _TestObject
```python
from test_pandas import _TestObject
```



---
## __init__
```python
from test_pandas import __init__
```



---
## __str__
```python
from test_pandas import __str__
```



---
## e
```python
from test_pandas import e
```



---
## __name__
```python
from test_normalize import __name__
```



---
## deep_nested
```python
from test_normalize import deep_nested
```



---
## state_data
```python
from test_normalize import state_data
```



---
## author_missing_data
```python
from test_normalize import author_missing_data
```



---
## missing_metadata
```python
from test_normalize import missing_metadata
```



---
## max_level_test_input_data
```python
from test_normalize import max_level_test_input_data
```

input data to test json_normalize with max_level param

---
## TestJSONNormalize
```python
from test_normalize import TestJSONNormalize
```



---
## TestNestedToRecord
```python
from test_normalize import TestNestedToRecord
```



---
## test_simple_records
```python
from test_normalize import test_simple_records
```



---
## test_simple_normalize
```python
from test_normalize import test_simple_normalize
```



---
## test_fields_list_type_normalize
```python
from test_normalize import test_fields_list_type_normalize
```



---
## test_empty_array
```python
from test_normalize import test_empty_array
```



---
## test_accepted_input
```python
from test_normalize import test_accepted_input
```



---
## test_simple_normalize_with_separator
```python
from test_normalize import test_simple_normalize_with_separator
```



---
## test_normalize_with_multichar_separator
```python
from test_normalize import test_normalize_with_multichar_separator
```



---
## test_value_array_record_prefix
```python
from test_normalize import test_value_array_record_prefix
```



---
## test_nested_object_record_path
```python
from test_normalize import test_nested_object_record_path
```



---
## test_more_deeply_nested
```python
from test_normalize import test_more_deeply_nested
```



---
## test_shallow_nested
```python
from test_normalize import test_shallow_nested
```



---
## test_nested_meta_path_with_nested_record_path
```python
from test_normalize import test_nested_meta_path_with_nested_record_path
```



---
## test_meta_name_conflict
```python
from test_normalize import test_meta_name_conflict
```



---
## test_meta_parameter_not_modified
```python
from test_normalize import test_meta_parameter_not_modified
```



---
## test_record_prefix
```python
from test_normalize import test_record_prefix
```



---
## test_non_ascii_key
```python
from test_normalize import test_non_ascii_key
```



---
## test_missing_field
```python
from test_normalize import test_missing_field
```



---
## test_max_level_with_records_path
```python
from test_normalize import test_max_level_with_records_path
```



---
## test_nested_flattening_consistent
```python
from test_normalize import test_nested_flattening_consistent
```



---
## test_nonetype_record_path
```python
from test_normalize import test_nonetype_record_path
```



---
## test_non_list_record_path_errors
```python
from test_normalize import test_non_list_record_path_errors
```



---
## test_meta_non_iterable
```python
from test_normalize import test_meta_non_iterable
```



---
## test_generator
```python
from test_normalize import test_generator
```



---
## test_top_column_with_leading_underscore
```python
from test_normalize import test_top_column_with_leading_underscore
```



---
## test_flat_stays_flat
```python
from test_normalize import test_flat_stays_flat
```



---
## test_one_level_deep_flattens
```python
from test_normalize import test_one_level_deep_flattens
```



---
## test_nested_flattens
```python
from test_normalize import test_nested_flattens
```



---
## test_json_normalize_errors
```python
from test_normalize import test_json_normalize_errors
```



---
## test_missing_meta
```python
from test_normalize import test_missing_meta
```



---
## test_missing_nested_meta
```python
from test_normalize import test_missing_nested_meta
```



---
## test_missing_meta_multilevel_record_path_errors_raise
```python
from test_normalize import test_missing_meta_multilevel_record_path_errors_raise
```



---
## test_missing_meta_multilevel_record_path_errors_ignore
```python
from test_normalize import test_missing_meta_multilevel_record_path_errors_ignore
```



---
## test_donot_drop_nonevalues
```python
from test_normalize import test_donot_drop_nonevalues
```



---
## test_nonetype_top_level_bottom_level
```python
from test_normalize import test_nonetype_top_level_bottom_level
```



---
## test_nonetype_multiple_levels
```python
from test_normalize import test_nonetype_multiple_levels
```



---
## test_with_max_level
```python
from test_normalize import test_with_max_level
```



---
## test_with_large_max_level
```python
from test_normalize import test_with_large_max_level
```



---
## test_series_non_zero_index
```python
from test_normalize import test_series_non_zero_index
```



---
## generator_data
```python
from test_normalize import generator_data
```



---
## __name__
```python
from test_sas7bdat import __name__
```



---
## dirpath
```python
from test_sas7bdat import dirpath
```



---
## data_test_ix
```python
from test_sas7bdat import data_test_ix
```



---
## TestSAS7BDAT
```python
from test_sas7bdat import TestSAS7BDAT
```



---
## test_encoding_options
```python
from test_sas7bdat import test_encoding_options
```



---
## test_encoding_infer
```python
from test_sas7bdat import test_encoding_infer
```



---
## test_productsales
```python
from test_sas7bdat import test_productsales
```



---
## test_12659
```python
from test_sas7bdat import test_12659
```



---
## test_airline
```python
from test_sas7bdat import test_airline
```



---
## test_date_time
```python
from test_sas7bdat import test_date_time
```



---
## test_compact_numerical_values
```python
from test_sas7bdat import test_compact_numerical_values
```



---
## test_many_columns
```python
from test_sas7bdat import test_many_columns
```



---
## test_inconsistent_number_of_rows
```python
from test_sas7bdat import test_inconsistent_number_of_rows
```



---
## test_zero_variables
```python
from test_sas7bdat import test_zero_variables
```



---
## test_zero_rows
```python
from test_sas7bdat import test_zero_rows
```



---
## test_corrupt_read
```python
from test_sas7bdat import test_corrupt_read
```



---
## test_max_sas_date
```python
from test_sas7bdat import test_max_sas_date
```



---
## test_max_sas_date_iterator
```python
from test_sas7bdat import test_max_sas_date_iterator
```



---
## test_null_date
```python
from test_sas7bdat import test_null_date
```



---
## test_meta2_page
```python
from test_sas7bdat import test_meta2_page
```



---
## test_rle_rdc_exceptions
```python
from test_sas7bdat import test_rle_rdc_exceptions
```

Errors in RLE/RDC decompression should propagate.

---
## test_0x40_control_byte
```python
from test_sas7bdat import test_0x40_control_byte
```



---
## test_0x00_control_byte
```python
from test_sas7bdat import test_0x00_control_byte
```



---
## test_from_file
```python
from test_sas7bdat import test_from_file
```



---
## test_from_buffer
```python
from test_sas7bdat import test_from_buffer
```



---
## test_from_iterator
```python
from test_sas7bdat import test_from_iterator
```



---
## test_path_pathlib
```python
from test_sas7bdat import test_path_pathlib
```



---
## test_path_localpath
```python
from test_sas7bdat import test_path_localpath
```



---
## test_iterator_loop
```python
from test_sas7bdat import test_iterator_loop
```



---
## test_iterator_read_too_much
```python
from test_sas7bdat import test_iterator_read_too_much
```



---
## __name__
```python
from test_sas import __name__
```



---
## TestSas
```python
from test_sas import TestSas
```



---
## test_sas_archive
```python
from test_sas import test_sas_archive
```



---
## test_sas_buffer_format
```python
from test_sas import test_sas_buffer_format
```



---
## test_sas_read_no_format_or_extension
```python
from test_sas import test_sas_read_no_format_or_extension
```



---
## __name__
```python
from test_byteswap import __name__
```



---
## test_int_byteswap
```python
from test_byteswap import test_int_byteswap
```



---
## test_float_byteswap
```python
from test_byteswap import test_float_byteswap
```



---
## _test
```python
from test_byteswap import _test
```



---
## __name__
```python
from test_xport import __name__
```



---
## numeric_as_float
```python
from test_xport import numeric_as_float
```



---
## TestXport
```python
from test_xport import TestXport
```



---
## file01
```python
from test_xport import file01
```



---
## file02
```python
from test_xport import file02
```



---
## file03
```python
from test_xport import file03
```



---
## file04
```python
from test_xport import file04
```



---
## file05
```python
from test_xport import file05
```



---
## test1_basic
```python
from test_xport import test1_basic
```



---
## test1_index
```python
from test_xport import test1_index
```



---
## test1_incremental
```python
from test_xport import test1_incremental
```



---
## test2
```python
from test_xport import test2
```



---
## test2_binary
```python
from test_xport import test2_binary
```



---
## test_multiple_types
```python
from test_xport import test_multiple_types
```



---
## test_truncated_float_support
```python
from test_xport import test_truncated_float_support
```



---
## test_cport_header_found_raises
```python
from test_xport import test_cport_header_found_raises
```



---
## setup_path
```python
from conftest import setup_path
```

Fixture for setup path

---
## __name__
```python
from test_time_series import __name__
```



---
## test_store_datetime_fractional_secs
```python
from test_time_series import test_store_datetime_fractional_secs
```



---
## test_tseries_indices_series
```python
from test_time_series import test_tseries_indices_series
```



---
## test_tseries_indices_frame
```python
from test_time_series import test_tseries_indices_frame
```



---
## __name__
```python
from test_put import __name__
```



---
## test_format_type
```python
from test_put import test_format_type
```



---
## test_format_kwarg_in_constructor
```python
from test_put import test_format_kwarg_in_constructor
```



---
## test_api_default_format
```python
from test_put import test_api_default_format
```



---
## test_put
```python
from test_put import test_put
```



---
## test_put_string_index
```python
from test_put import test_put_string_index
```



---
## test_put_compression
```python
from test_put import test_put_compression
```



---
## test_put_compression_blosc
```python
from test_put import test_put_compression_blosc
```



---
## test_put_mixed_type
```python
from test_put import test_put_mixed_type
```



---
## test_store_index_types
```python
from test_put import test_store_index_types
```



---
## test_column_multiindex
```python
from test_put import test_column_multiindex
```



---
## test_store_multiindex
```python
from test_put import test_store_multiindex
```



---
## test_store_periodindex
```python
from test_put import test_store_periodindex
```



---
## make_index
```python
from test_put import make_index
```



---
## test_pass_spec_to_storer
```python
from test_errors import test_pass_spec_to_storer
```



---
## test_table_index_incompatible_dtypes
```python
from test_errors import test_table_index_incompatible_dtypes
```



---
## test_unimplemented_dtypes_table_columns
```python
from test_errors import test_unimplemented_dtypes_table_columns
```



---
## test_invalid_terms
```python
from test_errors import test_invalid_terms
```



---
## test_append_with_diff_col_name_types_raises_value_error
```python
from test_errors import test_append_with_diff_col_name_types_raises_value_error
```



---
## test_invalid_complib
```python
from test_errors import test_invalid_complib
```



---
## test_to_hdf_multiindex_extension_dtype
```python
from test_errors import test_to_hdf_multiindex_extension_dtype
```



---
## test_unsuppored_hdf_file_error
```python
from test_errors import test_unsuppored_hdf_file_error
```



---
## test_read_hdf_errors
```python
from test_errors import test_read_hdf_errors
```



---
## test_read_hdf_generic_buffer_errors
```python
from test_errors import test_read_hdf_generic_buffer_errors
```



---
## test_maybe_adjust_name_bad_version_raises
```python
from test_errors import test_maybe_adjust_name_bad_version_raises
```



---
## __name__
```python
from test_select import __name__
```



---
## test_select_columns_in_where
```python
from test_select import test_select_columns_in_where
```



---
## test_select_with_dups
```python
from test_select import test_select_with_dups
```



---
## test_select
```python
from test_select import test_select
```



---
## test_select_dtypes
```python
from test_select import test_select_dtypes
```



---
## test_select_with_many_inputs
```python
from test_select import test_select_with_many_inputs
```



---
## test_select_iterator
```python
from test_select import test_select_iterator
```



---
## test_select_iterator_complete_8014
```python
from test_select import test_select_iterator_complete_8014
```



---
## test_select_iterator_non_complete_8014
```python
from test_select import test_select_iterator_non_complete_8014
```



---
## test_select_iterator_many_empty_frames
```python
from test_select import test_select_iterator_many_empty_frames
```



---
## test_frame_select
```python
from test_select import test_frame_select
```



---
## test_frame_select_complex
```python
from test_select import test_frame_select_complex
```



---
## test_frame_select_complex2
```python
from test_select import test_frame_select_complex2
```



---
## test_invalid_filtering
```python
from test_select import test_invalid_filtering
```



---
## test_string_select
```python
from test_select import test_string_select
```



---
## test_select_as_multiple
```python
from test_select import test_select_as_multiple
```



---
## test_nan_selection_bug_4858
```python
from test_select import test_nan_selection_bug_4858
```



---
## test_query_with_nested_special_character
```python
from test_select import test_query_with_nested_special_character
```



---
## test_query_long_float_literal
```python
from test_select import test_query_long_float_literal
```



---
## test_query_compare_column_type
```python
from test_select import test_query_compare_column_type
```



---
## test_select_empty_where
```python
from test_select import test_select_empty_where
```



---
## test_select_large_integer
```python
from test_select import test_select_large_integer
```



---
## test_categorical
```python
from test_categorical import test_categorical
```



---
## test_categorical_conversion
```python
from test_categorical import test_categorical_conversion
```



---
## test_categorical_nan_only_columns
```python
from test_categorical import test_categorical_nan_only_columns
```



---
## test_convert_value
```python
from test_categorical import test_convert_value
```



---
## test_append_series
```python
from test_append import test_append_series
```



---
## test_append_some_nans
```python
from test_append import test_append_some_nans
```



---
## test_append_all_nans
```python
from test_append import test_append_all_nans
```



---
## test_append_frame_column_oriented
```python
from test_append import test_append_frame_column_oriented
```



---
## test_append_with_different_block_ordering
```python
from test_append import test_append_with_different_block_ordering
```



---
## test_append_with_strings
```python
from test_append import test_append_with_strings
```



---
## test_append_with_empty_string
```python
from test_append import test_append_with_empty_string
```



---
## test_append_with_data_columns
```python
from test_append import test_append_with_data_columns
```



---
## test_append_hierarchical
```python
from test_append import test_append_hierarchical
```



---
## test_append_misc
```python
from test_append import test_append_misc
```



---
## test_append_misc_chunksize
```python
from test_append import test_append_misc_chunksize
```



---
## test_append_misc_empty_frame
```python
from test_append import test_append_misc_empty_frame
```



---
## test_append_raise
```python
from test_append import test_append_raise
```



---
## test_append_with_timedelta
```python
from test_append import test_append_with_timedelta
```



---
## test_append_to_multiple
```python
from test_append import test_append_to_multiple
```



---
## test_append_to_multiple_dropna
```python
from test_append import test_append_to_multiple_dropna
```



---
## test_append_to_multiple_dropna_false
```python
from test_append import test_append_to_multiple_dropna_false
```



---
## test_append_to_multiple_min_itemsize
```python
from test_append import test_append_to_multiple_min_itemsize
```



---
## check_col
```python
from test_append import check_col
```



---
## __name__
```python
from test_keys import __name__
```



---
## test_keys
```python
from test_keys import test_keys
```



---
## test_non_pandas_keys
```python
from test_keys import test_non_pandas_keys
```



---
## test_keys_illegal_include_keyword_value
```python
from test_keys import test_keys_illegal_include_keyword_value
```



---
## test_keys_ignore_hdf_softlink
```python
from test_keys import test_keys_ignore_hdf_softlink
```



---
## Table1
```python
from test_keys import Table1
```



---
## Table2
```python
from test_keys import Table2
```



---
## Table3
```python
from test_keys import Table3
```



---
## __name__
```python
from test_pytables_missing import __name__
```



---
## test_pytables_raises
```python
from test_pytables_missing import test_pytables_raises
```



---
## _compare_with_tz
```python
from test_timezones import _compare_with_tz
```



---
## test_append_with_timezones
```python
from test_timezones import test_append_with_timezones
```



---
## test_append_with_timezones_as_index
```python
from test_timezones import test_append_with_timezones_as_index
```



---
## test_roundtrip_tz_aware_index
```python
from test_timezones import test_roundtrip_tz_aware_index
```



---
## test_store_index_name_with_tz
```python
from test_timezones import test_store_index_name_with_tz
```



---
## test_tseries_select_index_column
```python
from test_timezones import test_tseries_select_index_column
```



---
## test_timezones_fixed_format_frame_non_empty
```python
from test_timezones import test_timezones_fixed_format_frame_non_empty
```



---
## test_timezones_fixed_format_empty
```python
from test_timezones import test_timezones_fixed_format_empty
```



---
## test_timezones_fixed_format_series_nonempty
```python
from test_timezones import test_timezones_fixed_format_series_nonempty
```



---
## test_fixed_offset_tz
```python
from test_timezones import test_fixed_offset_tz
```



---
## test_store_timezone
```python
from test_timezones import test_store_timezone
```



---
## test_legacy_datetimetz_object
```python
from test_timezones import test_legacy_datetimetz_object
```



---
## test_dst_transitions
```python
from test_timezones import test_dst_transitions
```



---
## test_read_with_where_tz_aware_index
```python
from test_timezones import test_read_with_where_tz_aware_index
```



---
## test_py2_created_with_datetimez
```python
from test_timezones import test_py2_created_with_datetimez
```



---
## TestHDFStoreSubclass
```python
from test_subclass import TestHDFStoreSubclass
```



---
## test_supported_for_subclass_dataframe
```python
from test_subclass import test_supported_for_subclass_dataframe
```



---
## test_supported_for_subclass_series
```python
from test_subclass import test_supported_for_subclass_series
```



---
## __name__
```python
from test_round_trip import __name__
```



---
## test_conv_read_write
```python
from test_round_trip import test_conv_read_write
```



---
## test_long_strings
```python
from test_round_trip import test_long_strings
```



---
## test_api
```python
from test_round_trip import test_api
```



---
## test_api_append
```python
from test_round_trip import test_api_append
```



---
## test_api_2
```python
from test_round_trip import test_api_2
```



---
## test_api_invalid
```python
from test_round_trip import test_api_invalid
```



---
## test_get
```python
from test_round_trip import test_get
```



---
## test_put_integer
```python
from test_round_trip import test_put_integer
```



---
## test_table_values_dtypes_roundtrip
```python
from test_round_trip import test_table_values_dtypes_roundtrip
```



---
## test_series
```python
from test_round_trip import test_series
```



---
## test_float_index
```python
from test_round_trip import test_float_index
```



---
## test_tuple_index
```python
from test_round_trip import test_tuple_index
```



---
## test_index_types
```python
from test_round_trip import test_index_types
```



---
## test_timeseries_preepoch
```python
from test_round_trip import test_timeseries_preepoch
```



---
## test_frame
```python
from test_round_trip import test_frame
```



---
## test_empty_series_frame
```python
from test_round_trip import test_empty_series_frame
```



---
## test_empty_series
```python
from test_round_trip import test_empty_series
```



---
## test_can_serialize_dates
```python
from test_round_trip import test_can_serialize_dates
```



---
## test_store_hierarchical
```python
from test_round_trip import test_store_hierarchical
```



---
## test_store_mixed
```python
from test_round_trip import test_store_mixed
```



---
## _check_roundtrip
```python
from test_round_trip import _check_roundtrip
```



---
## _check_roundtrip_table
```python
from test_round_trip import _check_roundtrip_table
```



---
## test_unicode_index
```python
from test_round_trip import test_unicode_index
```



---
## test_unicode_longer_encoded
```python
from test_round_trip import test_unicode_longer_encoded
```



---
## test_store_datetime_mixed
```python
from test_round_trip import test_store_datetime_mixed
```



---
## test_round_trip_equals
```python
from test_round_trip import test_round_trip_equals
```



---
## test_infer_string_columns
```python
from test_round_trip import test_infer_string_columns
```



---
## _make_one
```python
from test_round_trip import _make_one
```



---
## roundtrip
```python
from test_round_trip import roundtrip
```



---
## __name__
```python
from test_store import __name__
```



---
## test_context
```python
from test_store import test_context
```



---
## test_no_track_times
```python
from test_store import test_no_track_times
```



---
## test_iter_empty
```python
from test_store import test_iter_empty
```



---
## test_repr
```python
from test_store import test_repr
```



---
## test_contains
```python
from test_store import test_contains
```



---
## test_versioning
```python
from test_store import test_versioning
```



---
## test_walk
```python
from test_store import test_walk
```



---
## test_getattr
```python
from test_store import test_getattr
```



---
## test_store_dropna
```python
from test_store import test_store_dropna
```



---
## test_keyword_deprecation
```python
from test_store import test_keyword_deprecation
```



---
## test_to_hdf_with_min_itemsize
```python
from test_store import test_to_hdf_with_min_itemsize
```



---
## test_to_hdf_errors
```python
from test_store import test_to_hdf_errors
```



---
## test_create_table_index
```python
from test_store import test_create_table_index
```



---
## test_create_table_index_data_columns_argument
```python
from test_store import test_create_table_index_data_columns_argument
```



---
## test_mi_data_columns
```python
from test_store import test_mi_data_columns
```



---
## test_table_mixed_dtypes
```python
from test_store import test_table_mixed_dtypes
```



---
## test_calendar_roundtrip_issue
```python
from test_store import test_calendar_roundtrip_issue
```



---
## test_remove
```python
from test_store import test_remove
```



---
## test_same_name_scoping
```python
from test_store import test_same_name_scoping
```



---
## test_store_index_name
```python
from test_store import test_store_index_name
```



---
## test_store_index_name_numpy_str
```python
from test_store import test_store_index_name_numpy_str
```



---
## test_store_series_name
```python
from test_store import test_store_series_name
```



---
## test_overwrite_node
```python
from test_store import test_overwrite_node
```



---
## test_coordinates
```python
from test_store import test_coordinates
```



---
## test_start_stop_table
```python
from test_store import test_start_stop_table
```



---
## test_start_stop_multiple
```python
from test_store import test_start_stop_multiple
```



---
## test_start_stop_fixed
```python
from test_store import test_start_stop_fixed
```



---
## test_select_filter_corner
```python
from test_store import test_select_filter_corner
```



---
## test_path_pathlib
```python
from test_store import test_path_pathlib
```



---
## test_contiguous_mixed_data_table
```python
from test_store import test_contiguous_mixed_data_table
```



---
## test_path_pathlib_hdfstore
```python
from test_store import test_path_pathlib_hdfstore
```



---
## test_pickle_path_localpath
```python
from test_store import test_pickle_path_localpath
```



---
## test_path_localpath_hdfstore
```python
from test_store import test_path_localpath_hdfstore
```



---
## test_copy
```python
from test_store import test_copy
```



---
## test_duplicate_column_name
```python
from test_store import test_duplicate_column_name
```



---
## test_preserve_timedeltaindex_type
```python
from test_store import test_preserve_timedeltaindex_type
```



---
## test_columns_multiindex_modified
```python
from test_store import test_columns_multiindex_modified
```



---
## test_to_hdf_with_object_column_names_should_fail
```python
from test_store import test_to_hdf_with_object_column_names_should_fail
```



---
## test_to_hdf_with_object_column_names_should_run
```python
from test_store import test_to_hdf_with_object_column_names_should_run
```



---
## test_hdfstore_strides
```python
from test_store import test_hdfstore_strides
```



---
## test_store_bool_index
```python
from test_store import test_store_bool_index
```



---
## checksum
```python
from test_store import checksum
```



---
## create_h5_and_return_checksum
```python
from test_store import create_h5_and_return_checksum
```



---
## writer
```python
from test_store import writer
```



---
## reader
```python
from test_store import reader
```



---
## col
```python
from test_store import col
```



---
## safe_close
```python
from common import safe_close
```



---
## ensure_clean_store
```python
from common import ensure_clean_store
```



---
## _maybe_remove
```python
from common import _maybe_remove
```

For tests using tables, try removing the table to be sure there is
no content from previous tests using the same table name.

---
## pytables_hdf5_file
```python
from test_compat import pytables_hdf5_file
```

Use PyTables to create a simple HDF5 file.

---
## TestReadPyTablesHDF5
```python
from test_compat import TestReadPyTablesHDF5
```

A group of tests which covers reading HDF5 files written by plain PyTables
(not written by pandas).

Was introduced for regression-testing issue 11188.

---
## test_read_complete
```python
from test_compat import test_read_complete
```



---
## test_read_with_start
```python
from test_compat import test_read_with_start
```



---
## test_read_with_stop
```python
from test_compat import test_read_with_stop
```



---
## test_read_with_startstop
```python
from test_compat import test_read_with_startstop
```



---
## __name__
```python
from test_retain_attributes import __name__
```



---
## test_retain_index_attributes
```python
from test_retain_attributes import test_retain_index_attributes
```



---
## test_retain_index_attributes2
```python
from test_retain_attributes import test_retain_index_attributes2
```



---
## __name__
```python
from test_complex import __name__
```



---
## test_complex_fixed
```python
from test_complex import test_complex_fixed
```



---
## test_complex_table
```python
from test_complex import test_complex_table
```



---
## test_complex_mixed_fixed
```python
from test_complex import test_complex_mixed_fixed
```



---
## test_complex_mixed_table
```python
from test_complex import test_complex_mixed_table
```



---
## test_complex_across_dimensions_fixed
```python
from test_complex import test_complex_across_dimensions_fixed
```



---
## test_complex_across_dimensions
```python
from test_complex import test_complex_across_dimensions
```



---
## test_complex_indexing_error
```python
from test_complex import test_complex_indexing_error
```



---
## test_complex_series_error
```python
from test_complex import test_complex_series_error
```



---
## test_complex_append
```python
from test_complex import test_complex_append
```



---
## test_read_missing_key_close_store
```python
from test_read import test_read_missing_key_close_store
```



---
## test_read_index_error_close_store
```python
from test_read import test_read_index_error_close_store
```



---
## test_read_missing_key_opened_store
```python
from test_read import test_read_missing_key_opened_store
```



---
## test_read_column
```python
from test_read import test_read_column
```



---
## test_pytables_native_read
```python
from test_read import test_pytables_native_read
```



---
## test_pytables_native2_read
```python
from test_read import test_pytables_native2_read
```



---
## test_legacy_table_fixed_format_read_py2
```python
from test_read import test_legacy_table_fixed_format_read_py2
```



---
## test_legacy_table_fixed_format_read_datetime_py2
```python
from test_read import test_legacy_table_fixed_format_read_datetime_py2
```



---
## test_legacy_table_read_py2
```python
from test_read import test_legacy_table_read_py2
```



---
## test_read_hdf_open_store
```python
from test_read import test_read_hdf_open_store
```



---
## test_read_hdf_index_not_view
```python
from test_read import test_read_hdf_index_not_view
```



---
## test_read_hdf_iterator
```python
from test_read import test_read_hdf_iterator
```



---
## test_read_nokey
```python
from test_read import test_read_nokey
```



---
## test_read_nokey_table
```python
from test_read import test_read_nokey_table
```



---
## test_read_nokey_empty
```python
from test_read import test_read_nokey_empty
```



---
## test_read_from_pathlib_path
```python
from test_read import test_read_from_pathlib_path
```



---
## test_read_from_py_localpath
```python
from test_read import test_read_from_py_localpath
```



---
## test_read_hdf_series_mode_r
```python
from test_read import test_read_hdf_series_mode_r
```



---
## test_read_py2_hdf_file_in_py3
```python
from test_read import test_read_py2_hdf_file_in_py3
```



---
## test_read_infer_string
```python
from test_read import test_read_infer_string
```



---
## __name__
```python
from test_file_handling import __name__
```



---
## test_mode
```python
from test_file_handling import test_mode
```



---
## test_default_mode
```python
from test_file_handling import test_default_mode
```



---
## test_reopen_handle
```python
from test_file_handling import test_reopen_handle
```



---
## test_open_args
```python
from test_file_handling import test_open_args
```



---
## test_flush
```python
from test_file_handling import test_flush
```



---
## test_complibs_default_settings
```python
from test_file_handling import test_complibs_default_settings
```



---
## test_complibs_default_settings_override
```python
from test_file_handling import test_complibs_default_settings_override
```



---
## test_complibs
```python
from test_file_handling import test_complibs
```



---
## test_encoding
```python
from test_file_handling import test_encoding
```



---
## test_latin_encoding
```python
from test_file_handling import test_latin_encoding
```



---
## test_multiple_open_close
```python
from test_file_handling import test_multiple_open_close
```



---
## test_fspath
```python
from test_file_handling import test_fspath
```



---
## df
```python
from test_to_string import df
```



---
## styler
```python
from test_to_string import styler
```



---
## test_basic_string
```python
from test_to_string import test_basic_string
```



---
## test_string_delimiter
```python
from test_to_string import test_string_delimiter
```



---
## test_concat
```python
from test_to_string import test_concat
```



---
## test_concat_recursion
```python
from test_to_string import test_concat_recursion
```



---
## test_concat_chain
```python
from test_to_string import test_concat_chain
```



---
## df
```python
from test_to_latex import df
```



---
## df_ext
```python
from test_to_latex import df_ext
```



---
## styler
```python
from test_to_latex import styler
```



---
## test_minimal_latex_tabular
```python
from test_to_latex import test_minimal_latex_tabular
```



---
## test_tabular_hrules
```python
from test_to_latex import test_tabular_hrules
```



---
## test_tabular_custom_hrules
```python
from test_to_latex import test_tabular_custom_hrules
```



---
## test_column_format
```python
from test_to_latex import test_column_format
```



---
## test_siunitx_cols
```python
from test_to_latex import test_siunitx_cols
```



---
## test_position
```python
from test_to_latex import test_position
```



---
## test_label
```python
from test_to_latex import test_label
```



---
## test_position_float_raises
```python
from test_to_latex import test_position_float_raises
```



---
## test_kwargs_combinations
```python
from test_to_latex import test_kwargs_combinations
```



---
## test_custom_table_styles
```python
from test_to_latex import test_custom_table_styles
```



---
## test_cell_styling
```python
from test_to_latex import test_cell_styling
```



---
## test_multiindex_columns
```python
from test_to_latex import test_multiindex_columns
```



---
## test_multiindex_row
```python
from test_to_latex import test_multiindex_row
```



---
## test_multirow_naive
```python
from test_to_latex import test_multirow_naive
```



---
## test_multiindex_row_and_col
```python
from test_to_latex import test_multiindex_row_and_col
```



---
## test_multicol_naive
```python
from test_to_latex import test_multicol_naive
```



---
## test_multi_options
```python
from test_to_latex import test_multi_options
```



---
## test_multiindex_columns_hidden
```python
from test_to_latex import test_multiindex_columns_hidden
```



---
## test_sparse_options
```python
from test_to_latex import test_sparse_options
```



---
## test_hidden_index
```python
from test_to_latex import test_hidden_index
```



---
## test_comprehensive
```python
from test_to_latex import test_comprehensive
```



---
## test_environment_option
```python
from test_to_latex import test_environment_option
```



---
## test_parse_latex_table_styles
```python
from test_to_latex import test_parse_latex_table_styles
```



---
## test_parse_latex_cell_styles_basic
```python
from test_to_latex import test_parse_latex_cell_styles_basic
```



---
## test_parse_latex_cell_styles_braces
```python
from test_to_latex import test_parse_latex_cell_styles_braces
```



---
## test_parse_latex_header_span
```python
from test_to_latex import test_parse_latex_header_span
```



---
## test_parse_latex_table_wrapping
```python
from test_to_latex import test_parse_latex_table_wrapping
```



---
## test_short_caption
```python
from test_to_latex import test_short_caption
```



---
## test_parse_latex_css_conversion
```python
from test_to_latex import test_parse_latex_css_conversion
```



---
## test_parse_latex_css_convert_minimal
```python
from test_to_latex import test_parse_latex_css_convert_minimal
```



---
## test_parse_latex_css_conversion_option
```python
from test_to_latex import test_parse_latex_css_conversion_option
```



---
## test_styler_object_after_render
```python
from test_to_latex import test_styler_object_after_render
```



---
## test_longtable_comprehensive
```python
from test_to_latex import test_longtable_comprehensive
```



---
## test_longtable_minimal
```python
from test_to_latex import test_longtable_minimal
```



---
## test_longtable_multiindex_columns
```python
from test_to_latex import test_longtable_multiindex_columns
```



---
## test_longtable_caption_label
```python
from test_to_latex import test_longtable_caption_label
```



---
## test_apply_map_header_render_mi
```python
from test_to_latex import test_apply_map_header_render_mi
```



---
## test_repr_option
```python
from test_to_latex import test_repr_option
```



---
## test_bool_options
```python
from test_to_latex import test_bool_options
```



---
## test_siunitx_basic_headers
```python
from test_to_latex import test_siunitx_basic_headers
```



---
## test_css_convert_apply_index
```python
from test_to_latex import test_css_convert_apply_index
```



---
## test_hide_index_latex
```python
from test_to_latex import test_hide_index_latex
```



---
## test_latex_hiding_index_columns_multiindex_alignment
```python
from test_to_latex import test_latex_hiding_index_columns_multiindex_alignment
```



---
## test_rendered_links
```python
from test_to_latex import test_rendered_links
```



---
## test_apply_index_hidden_levels
```python
from test_to_latex import test_apply_index_hidden_levels
```



---
## test_clines_validation
```python
from test_to_latex import test_clines_validation
```



---
## test_clines_index
```python
from test_to_latex import test_clines_index
```



---
## test_clines_multiindex
```python
from test_to_latex import test_clines_multiindex
```



---
## test_col_format_len
```python
from test_to_latex import test_col_format_len
```



---
## test_concat
```python
from test_to_latex import test_concat
```



---
## test_concat_recursion
```python
from test_to_latex import test_concat_recursion
```



---
## test_concat_chain
```python
from test_to_latex import test_concat_chain
```



---
## test_empty_clines
```python
from test_to_latex import test_empty_clines
```



---
## __name__
```python
from test_tooltip import __name__
```



---
## df
```python
from test_tooltip import df
```



---
## styler
```python
from test_tooltip import styler
```



---
## test_tooltip_render
```python
from test_tooltip import test_tooltip_render
```



---
## test_tooltip_ignored
```python
from test_tooltip import test_tooltip_ignored
```



---
## test_tooltip_css_class
```python
from test_tooltip import test_tooltip_css_class
```



---
## df
```python
from test_exceptions import df
```



---
## styler
```python
from test_exceptions import styler
```



---
## test_concat_bad_columns
```python
from test_exceptions import test_concat_bad_columns
```



---
## test_concat_bad_type
```python
from test_exceptions import test_concat_bad_type
```



---
## test_concat_bad_index_levels
```python
from test_exceptions import test_concat_bad_index_levels
```



---
## env
```python
from test_html import env
```



---
## styler
```python
from test_html import styler
```



---
## styler_mi
```python
from test_html import styler_mi
```



---
## tpl_style
```python
from test_html import tpl_style
```



---
## tpl_table
```python
from test_html import tpl_table
```



---
## test_html_template_extends_options
```python
from test_html import test_html_template_extends_options
```



---
## test_exclude_styles
```python
from test_html import test_exclude_styles
```



---
## test_w3_html_format
```python
from test_html import test_w3_html_format
```



---
## test_colspan_w3
```python
from test_html import test_colspan_w3
```



---
## test_rowspan_w3
```python
from test_html import test_rowspan_w3
```



---
## test_styles
```python
from test_html import test_styles
```



---
## test_doctype
```python
from test_html import test_doctype
```



---
## test_doctype_encoding
```python
from test_html import test_doctype_encoding
```



---
## test_bold_headers_arg
```python
from test_html import test_bold_headers_arg
```



---
## test_caption_arg
```python
from test_html import test_caption_arg
```



---
## test_block_names
```python
from test_html import test_block_names
```



---
## test_from_custom_template_table
```python
from test_html import test_from_custom_template_table
```



---
## test_from_custom_template_style
```python
from test_html import test_from_custom_template_style
```



---
## test_caption_as_sequence
```python
from test_html import test_caption_as_sequence
```



---
## test_sticky_basic
```python
from test_html import test_sticky_basic
```



---
## test_sticky_mi
```python
from test_html import test_sticky_mi
```



---
## test_sticky_levels
```python
from test_html import test_sticky_levels
```



---
## test_sticky_raises
```python
from test_html import test_sticky_raises
```



---
## test_sparse_options
```python
from test_html import test_sparse_options
```



---
## test_map_header_cell_ids
```python
from test_html import test_map_header_cell_ids
```



---
## test_maximums
```python
from test_html import test_maximums
```



---
## test_replaced_css_class_names
```python
from test_html import test_replaced_css_class_names
```



---
## test_include_css_style_rules_only_for_visible_cells
```python
from test_html import test_include_css_style_rules_only_for_visible_cells
```



---
## test_include_css_style_rules_only_for_visible_index_labels
```python
from test_html import test_include_css_style_rules_only_for_visible_index_labels
```



---
## test_include_css_style_rules_only_for_visible_column_labels
```python
from test_html import test_include_css_style_rules_only_for_visible_column_labels
```



---
## test_hiding_index_columns_multiindex_alignment
```python
from test_html import test_hiding_index_columns_multiindex_alignment
```



---
## test_hiding_index_columns_multiindex_trimming
```python
from test_html import test_hiding_index_columns_multiindex_trimming
```



---
## test_rendered_links
```python
from test_html import test_rendered_links
```



---
## test_multiple_rendered_links
```python
from test_html import test_multiple_rendered_links
```



---
## test_concat
```python
from test_html import test_concat
```



---
## test_concat_recursion
```python
from test_html import test_concat_recursion
```



---
## test_concat_chain
```python
from test_html import test_concat_chain
```



---
## test_concat_combined
```python
from test_html import test_concat_combined
```



---
## test_to_html_na_rep_non_scalar_data
```python
from test_html import test_to_html_na_rep_non_scalar_data
```



---
## html_lines
```python
from test_html import html_lines
```



---
## __name__
```python
from test_highlight import __name__
```



---
## df
```python
from test_highlight import df
```



---
## styler
```python
from test_highlight import styler
```



---
## test_highlight_null
```python
from test_highlight import test_highlight_null
```



---
## test_highlight_null_subset
```python
from test_highlight import test_highlight_null_subset
```



---
## test_highlight_minmax_basic
```python
from test_highlight import test_highlight_minmax_basic
```



---
## test_highlight_minmax_ext
```python
from test_highlight import test_highlight_minmax_ext
```



---
## test_highlight_minmax_nulls
```python
from test_highlight import test_highlight_minmax_nulls
```



---
## test_highlight_between
```python
from test_highlight import test_highlight_between
```



---
## test_highlight_between_raises
```python
from test_highlight import test_highlight_between_raises
```



---
## test_highlight_between_raises2
```python
from test_highlight import test_highlight_between_raises2
```



---
## test_highlight_between_inclusive
```python
from test_highlight import test_highlight_between_inclusive
```



---
## test_highlight_quantile
```python
from test_highlight import test_highlight_quantile
```



---
## test_all_highlight_dtypes
```python
from test_highlight import test_all_highlight_dtypes
```



---
## __name__
```python
from test_non_unique import __name__
```



---
## df
```python
from test_non_unique import df
```



---
## styler
```python
from test_non_unique import styler
```



---
## test_format_non_unique
```python
from test_non_unique import test_format_non_unique
```



---
## test_apply_map_non_unique_raises
```python
from test_non_unique import test_apply_map_non_unique_raises
```



---
## test_table_styles_dict_non_unique_index
```python
from test_non_unique import test_table_styles_dict_non_unique_index
```



---
## test_table_styles_dict_non_unique_columns
```python
from test_non_unique import test_table_styles_dict_non_unique_columns
```



---
## test_tooltips_non_unique_raises
```python
from test_non_unique import test_tooltips_non_unique_raises
```



---
## test_set_td_classes_non_unique_raises
```python
from test_non_unique import test_set_td_classes_non_unique_raises
```



---
## test_hide_columns_non_unique
```python
from test_non_unique import test_hide_columns_non_unique
```



---
## test_latex_non_unique
```python
from test_non_unique import test_latex_non_unique
```



---
## mi_df
```python
from test_style import mi_df
```



---
## mi_styler
```python
from test_style import mi_styler
```



---
## mi_styler_comp
```python
from test_style import mi_styler_comp
```



---
## blank_value
```python
from test_style import blank_value
```



---
## df
```python
from test_style import df
```



---
## styler
```python
from test_style import styler
```



---
## test_mi_styler_sparsify_columns
```python
from test_style import test_mi_styler_sparsify_columns
```



---
## test_mi_styler_sparsify_index
```python
from test_style import test_mi_styler_sparsify_index
```



---
## test_mi_styler_sparsify_options
```python
from test_style import test_mi_styler_sparsify_options
```



---
## test_trimming_maximum
```python
from test_style import test_trimming_maximum
```



---
## test_render_trimming_rows
```python
from test_style import test_render_trimming_rows
```



---
## test_render_trimming_cols
```python
from test_style import test_render_trimming_cols
```



---
## test_render_trimming_mi
```python
from test_style import test_render_trimming_mi
```



---
## test_render_empty_mi
```python
from test_style import test_render_empty_mi
```



---
## test_copy
```python
from test_style import test_copy
```



---
## test_inherited_copy
```python
from test_style import test_inherited_copy
```



---
## test_clear
```python
from test_style import test_clear
```



---
## test_export
```python
from test_style import test_export
```



---
## test_hide_raises
```python
from test_style import test_hide_raises
```



---
## test_hide_index_level
```python
from test_style import test_hide_index_level
```



---
## test_hide_columns_level
```python
from test_style import test_hide_columns_level
```



---
## test_apply_map_header
```python
from test_style import test_apply_map_header
```



---
## test_apply_map_header_mi
```python
from test_style import test_apply_map_header_mi
```



---
## test_apply_map_header_raises
```python
from test_style import test_apply_map_header_raises
```



---
## TestStyler
```python
from test_style import TestStyler
```



---
## test_hidden_index_names
```python
from test_style import test_hidden_index_names
```



---
## test_hidden_column_names
```python
from test_style import test_hidden_column_names
```



---
## test_caption_raises
```python
from test_style import test_caption_raises
```



---
## test_hiding_headers_over_index_no_sparsify
```python
from test_style import test_hiding_headers_over_index_no_sparsify
```



---
## test_hiding_headers_over_columns_no_sparsify
```python
from test_style import test_hiding_headers_over_columns_no_sparsify
```



---
## test_get_level_lengths_mi_hidden
```python
from test_style import test_get_level_lengths_mi_hidden
```



---
## test_row_trimming_hide_index
```python
from test_style import test_row_trimming_hide_index
```



---
## test_row_trimming_hide_index_mi
```python
from test_style import test_row_trimming_hide_index_mi
```



---
## test_col_trimming_hide_columns
```python
from test_style import test_col_trimming_hide_columns
```



---
## test_no_empty_apply
```python
from test_style import test_no_empty_apply
```



---
## test_output_buffer
```python
from test_style import test_output_buffer
```



---
## CustomStyler
```python
from test_style import CustomStyler
```



---
## test_init_non_pandas
```python
from test_style import test_init_non_pandas
```



---
## test_init_series
```python
from test_style import test_init_series
```



---
## test_repr_html_ok
```python
from test_style import test_repr_html_ok
```



---
## test_repr_html_mathjax
```python
from test_style import test_repr_html_mathjax
```



---
## test_update_ctx
```python
from test_style import test_update_ctx
```



---
## test_update_ctx_flatten_multi_and_trailing_semi
```python
from test_style import test_update_ctx_flatten_multi_and_trailing_semi
```



---
## test_render
```python
from test_style import test_render
```



---
## test_multiple_render
```python
from test_style import test_multiple_render
```



---
## test_render_empty_dfs
```python
from test_style import test_render_empty_dfs
```



---
## test_render_double
```python
from test_style import test_render_double
```



---
## test_set_properties
```python
from test_style import test_set_properties
```



---
## test_set_properties_subset
```python
from test_style import test_set_properties_subset
```



---
## test_empty_index_name_doesnt_display
```python
from test_style import test_empty_index_name_doesnt_display
```



---
## test_index_name
```python
from test_style import test_index_name
```



---
## test_numeric_columns
```python
from test_style import test_numeric_columns
```



---
## test_apply_axis
```python
from test_style import test_apply_axis
```



---
## test_apply_series_return
```python
from test_style import test_apply_series_return
```



---
## test_apply_dataframe_return
```python
from test_style import test_apply_dataframe_return
```



---
## test_apply_subset
```python
from test_style import test_apply_subset
```



---
## test_map_subset
```python
from test_style import test_map_subset
```



---
## test_map_subset_multiindex
```python
from test_style import test_map_subset_multiindex
```



---
## test_map_subset_multiindex_code
```python
from test_style import test_map_subset_multiindex_code
```



---
## test_subset_for_boolean_cols
```python
from test_style import test_subset_for_boolean_cols
```



---
## test_empty
```python
from test_style import test_empty
```



---
## test_duplicate
```python
from test_style import test_duplicate
```



---
## test_init_with_na_rep
```python
from test_style import test_init_with_na_rep
```



---
## test_caption
```python
from test_style import test_caption
```



---
## test_uuid
```python
from test_style import test_uuid
```



---
## test_unique_id
```python
from test_style import test_unique_id
```



---
## test_table_styles
```python
from test_style import test_table_styles
```



---
## test_table_styles_multiple
```python
from test_style import test_table_styles_multiple
```



---
## test_table_styles_dict_multiple_selectors
```python
from test_style import test_table_styles_dict_multiple_selectors
```



---
## test_maybe_convert_css_to_tuples
```python
from test_style import test_maybe_convert_css_to_tuples
```



---
## test_maybe_convert_css_to_tuples_err
```python
from test_style import test_maybe_convert_css_to_tuples_err
```



---
## test_table_attributes
```python
from test_style import test_table_attributes
```



---
## test_apply_none
```python
from test_style import test_apply_none
```



---
## test_trim
```python
from test_style import test_trim
```



---
## test_bad_apply_shape
```python
from test_style import test_bad_apply_shape
```



---
## test_apply_bad_return
```python
from test_style import test_apply_bad_return
```



---
## test_apply_bad_labels
```python
from test_style import test_apply_bad_labels
```



---
## test_get_level_lengths
```python
from test_style import test_get_level_lengths
```



---
## test_get_level_lengths_un_sorted
```python
from test_style import test_get_level_lengths_un_sorted
```



---
## test_mi_sparse_index_names
```python
from test_style import test_mi_sparse_index_names
```



---
## test_mi_sparse_column_names
```python
from test_style import test_mi_sparse_column_names
```



---
## test_hide_column_headers
```python
from test_style import test_hide_column_headers
```



---
## test_hide_single_index
```python
from test_style import test_hide_single_index
```



---
## test_hide_multiindex
```python
from test_style import test_hide_multiindex
```



---
## test_hide_columns_single_level
```python
from test_style import test_hide_columns_single_level
```



---
## test_hide_columns_index_mult_levels
```python
from test_style import test_hide_columns_index_mult_levels
```



---
## test_pipe
```python
from test_style import test_pipe
```



---
## test_no_cell_ids
```python
from test_style import test_no_cell_ids
```



---
## test_set_data_classes
```python
from test_style import test_set_data_classes
```



---
## test_set_data_classes_reindex
```python
from test_style import test_set_data_classes_reindex
```



---
## test_chaining_table_styles
```python
from test_style import test_chaining_table_styles
```



---
## test_column_and_row_styling
```python
from test_style import test_column_and_row_styling
```



---
## test_uuid_len
```python
from test_style import test_uuid_len
```



---
## test_uuid_len_raises
```python
from test_style import test_uuid_len_raises
```



---
## test_non_reducing_slice
```python
from test_style import test_non_reducing_slice
```



---
## test_list_slice
```python
from test_style import test_list_slice
```



---
## test_non_reducing_slice_on_multiindex
```python
from test_style import test_non_reducing_slice_on_multiindex
```



---
## test_non_reducing_multi_slice_on_multiindex
```python
from test_style import test_non_reducing_multi_slice_on_multiindex
```



---
## h
```python
from test_style import h
```



---
## color_negative_red
```python
from test_style import color_negative_red
```



---
## f
```python
from test_style import f
```



---
## set_caption_from_template
```python
from test_style import set_caption_from_template
```



---
## df
```python
from test_format import df
```



---
## styler
```python
from test_format import styler
```



---
## df_multi
```python
from test_format import df_multi
```



---
## styler_multi
```python
from test_format import styler_multi
```



---
## test_display_format
```python
from test_format import test_display_format
```



---
## test_display_format_index
```python
from test_format import test_display_format_index
```



---
## test_format_dict
```python
from test_format import test_format_dict
```



---
## test_format_index_dict
```python
from test_format import test_format_index_dict
```



---
## test_format_string
```python
from test_format import test_format_string
```



---
## test_format_callable
```python
from test_format import test_format_callable
```



---
## test_format_with_na_rep
```python
from test_format import test_format_with_na_rep
```



---
## test_format_index_with_na_rep
```python
from test_format import test_format_index_with_na_rep
```



---
## test_format_non_numeric_na
```python
from test_format import test_format_non_numeric_na
```



---
## test_format_clear
```python
from test_format import test_format_clear
```



---
## test_format_escape_html
```python
from test_format import test_format_escape_html
```



---
## test_format_escape_latex_math
```python
from test_format import test_format_escape_latex_math
```



---
## test_format_escape_na_rep
```python
from test_format import test_format_escape_na_rep
```



---
## test_format_escape_floats
```python
from test_format import test_format_escape_floats
```



---
## test_format_raises
```python
from test_format import test_format_raises
```



---
## test_format_with_precision
```python
from test_format import test_format_with_precision
```



---
## test_format_index_level
```python
from test_format import test_format_index_level
```



---
## test_format_subset
```python
from test_format import test_format_subset
```



---
## test_format_thousands
```python
from test_format import test_format_thousands
```



---
## test_format_decimal
```python
from test_format import test_format_decimal
```



---
## test_str_escape_error
```python
from test_format import test_str_escape_error
```



---
## test_long_int_formatting
```python
from test_format import test_long_int_formatting
```



---
## test_format_options
```python
from test_format import test_format_options
```



---
## test_precision_zero
```python
from test_format import test_precision_zero
```



---
## test_formatter_options_validator
```python
from test_format import test_formatter_options_validator
```



---
## test_formatter_options_raises
```python
from test_format import test_formatter_options_raises
```



---
## test_1level_multiindex
```python
from test_format import test_1level_multiindex
```



---
## test_boolean_format
```python
from test_format import test_boolean_format
```



---
## test_relabel_raise_length
```python
from test_format import test_relabel_raise_length
```



---
## test_relabel_index
```python
from test_format import test_relabel_index
```



---
## test_relabel_columns
```python
from test_format import test_relabel_columns
```



---
## test_relabel_roundtrip
```python
from test_format import test_relabel_roundtrip
```



---
## __name__
```python
from test_bar import __name__
```



---
## bar_grad
```python
from test_bar import bar_grad
```

Used in multiple tests to simplify formatting of expected result

---
## no_bar
```python
from test_bar import no_bar
```



---
## bar_to
```python
from test_bar import bar_to
```



---
## bar_from_to
```python
from test_bar import bar_from_to
```



---
## df_pos
```python
from test_bar import df_pos
```



---
## df_neg
```python
from test_bar import df_neg
```



---
## df_mix
```python
from test_bar import df_mix
```



---
## test_align_positive_cases
```python
from test_bar import test_align_positive_cases
```



---
## test_align_negative_cases
```python
from test_bar import test_align_negative_cases
```



---
## test_align_mixed_cases
```python
from test_bar import test_align_mixed_cases
```



---
## test_align_axis
```python
from test_bar import test_align_axis
```



---
## test_vmin_vmax_clipping
```python
from test_bar import test_vmin_vmax_clipping
```



---
## test_vmin_vmax_widening
```python
from test_bar import test_vmin_vmax_widening
```



---
## test_numerics
```python
from test_bar import test_numerics
```



---
## test_colors_mixed
```python
from test_bar import test_colors_mixed
```



---
## test_bar_align_height
```python
from test_bar import test_bar_align_height
```



---
## test_bar_value_error_raises
```python
from test_bar import test_bar_value_error_raises
```



---
## test_bar_color_and_cmap_error_raises
```python
from test_bar import test_bar_color_and_cmap_error_raises
```



---
## test_bar_invalid_color_type_error_raises
```python
from test_bar import test_bar_invalid_color_type_error_raises
```



---
## test_styler_bar_with_NA_values
```python
from test_bar import test_styler_bar_with_NA_values
```



---
## test_style_bar_with_pyarrow_NA_values
```python
from test_bar import test_style_bar_with_pyarrow_NA_values
```



---
## mpl_cleanup
```python
from test_matplotlib import mpl_cleanup
```



---
## df
```python
from test_matplotlib import df
```



---
## styler
```python
from test_matplotlib import styler
```



---
## df_blank
```python
from test_matplotlib import df_blank
```



---
## styler_blank
```python
from test_matplotlib import styler_blank
```



---
## test_function_gradient
```python
from test_matplotlib import test_function_gradient
```



---
## test_background_gradient_color
```python
from test_matplotlib import test_background_gradient_color
```



---
## test_background_gradient_axis
```python
from test_matplotlib import test_background_gradient_axis
```



---
## test_text_color_threshold
```python
from test_matplotlib import test_text_color_threshold
```



---
## test_background_gradient_vmin_vmax
```python
from test_matplotlib import test_background_gradient_vmin_vmax
```



---
## test_background_gradient_int64
```python
from test_matplotlib import test_background_gradient_int64
```



---
## test_background_gradient_gmap_array
```python
from test_matplotlib import test_background_gradient_gmap_array
```



---
## test_background_gradient_gmap_array_raises
```python
from test_matplotlib import test_background_gradient_gmap_array_raises
```



---
## test_background_gradient_gmap_dataframe_align
```python
from test_matplotlib import test_background_gradient_gmap_dataframe_align
```



---
## test_background_gradient_gmap_series_align
```python
from test_matplotlib import test_background_gradient_gmap_series_align
```



---
## test_background_gradient_gmap_wrong_dataframe
```python
from test_matplotlib import test_background_gradient_gmap_wrong_dataframe
```



---
## test_background_gradient_gmap_wrong_series
```python
from test_matplotlib import test_background_gradient_gmap_wrong_series
```



---
## test_background_gradient_nullable_dtypes
```python
from test_matplotlib import test_background_gradient_nullable_dtypes
```



---
## test_bar_colormap
```python
from test_matplotlib import test_bar_colormap
```



---
## test_bar_color_raises
```python
from test_matplotlib import test_bar_color_raises
```



---
## test_pass_colormap_instance
```python
from test_matplotlib import test_pass_colormap_instance
```



---
## __name__
```python
from test_usecols_basic import __name__
```

Tests the usecols functionality during parsing
for all of the parsers defined in parsers.py

---
## test_raise_on_mixed_dtype_usecols
```python
from test_usecols_basic import test_raise_on_mixed_dtype_usecols
```



---
## test_usecols
```python
from test_usecols_basic import test_usecols
```



---
## test_usecols_with_names
```python
from test_usecols_basic import test_usecols_with_names
```



---
## test_usecols_relative_to_names
```python
from test_usecols_basic import test_usecols_relative_to_names
```



---
## test_usecols_relative_to_names2
```python
from test_usecols_basic import test_usecols_relative_to_names2
```



---
## test_usecols_name_length_conflict
```python
from test_usecols_basic import test_usecols_name_length_conflict
```



---
## test_usecols_single_string
```python
from test_usecols_basic import test_usecols_single_string
```



---
## test_usecols_index_col_false
```python
from test_usecols_basic import test_usecols_index_col_false
```



---
## test_usecols_index_col_conflict
```python
from test_usecols_basic import test_usecols_index_col_conflict
```



---
## test_usecols_index_col_conflict2
```python
from test_usecols_basic import test_usecols_index_col_conflict2
```



---
## test_usecols_implicit_index_col
```python
from test_usecols_basic import test_usecols_implicit_index_col
```



---
## test_usecols_index_col_middle
```python
from test_usecols_basic import test_usecols_index_col_middle
```



---
## test_usecols_index_col_end
```python
from test_usecols_basic import test_usecols_index_col_end
```



---
## test_usecols_regex_sep
```python
from test_usecols_basic import test_usecols_regex_sep
```



---
## test_usecols_with_whitespace
```python
from test_usecols_basic import test_usecols_with_whitespace
```



---
## test_usecols_with_integer_like_header
```python
from test_usecols_basic import test_usecols_with_integer_like_header
```



---
## test_empty_usecols
```python
from test_usecols_basic import test_empty_usecols
```



---
## test_np_array_usecols
```python
from test_usecols_basic import test_np_array_usecols
```



---
## test_callable_usecols
```python
from test_usecols_basic import test_callable_usecols
```



---
## test_incomplete_first_row
```python
from test_usecols_basic import test_incomplete_first_row
```



---
## test_uneven_length_cols
```python
from test_usecols_basic import test_uneven_length_cols
```



---
## test_raises_on_usecols_names_mismatch
```python
from test_usecols_basic import test_raises_on_usecols_names_mismatch
```



---
## test_usecols_subset_names_mismatch_orig_columns
```python
from test_usecols_basic import test_usecols_subset_names_mismatch_orig_columns
```



---
## test_usecols_indices_out_of_bounds
```python
from test_usecols_basic import test_usecols_indices_out_of_bounds
```



---
## test_usecols_additional_columns
```python
from test_usecols_basic import test_usecols_additional_columns
```



---
## test_usecols_additional_columns_integer_columns
```python
from test_usecols_basic import test_usecols_additional_columns_integer_columns
```



---
## test_usecols_dtype
```python
from test_usecols_basic import test_usecols_dtype
```



---
## test_usecols_with_parse_dates
```python
from test_parse_dates import test_usecols_with_parse_dates
```



---
## test_usecols_with_parse_dates2
```python
from test_parse_dates import test_usecols_with_parse_dates2
```



---
## test_usecols_with_parse_dates3
```python
from test_parse_dates import test_usecols_with_parse_dates3
```



---
## test_usecols_with_parse_dates4
```python
from test_parse_dates import test_usecols_with_parse_dates4
```



---
## test_usecols_with_parse_dates_and_names
```python
from test_parse_dates import test_usecols_with_parse_dates_and_names
```



---
## test_usecols_with_unicode_strings
```python
from test_strings import test_usecols_with_unicode_strings
```



---
## test_usecols_with_single_byte_unicode_strings
```python
from test_strings import test_usecols_with_single_byte_unicode_strings
```



---
## test_usecols_with_mixed_encoding_strings
```python
from test_strings import test_usecols_with_mixed_encoding_strings
```



---
## test_usecols_with_multi_byte_characters
```python
from test_strings import test_usecols_with_multi_byte_characters
```



---
## __name__
```python
from test_dtypes_basic import __name__
```

Tests dtype specification during parsing
for all of the parsers defined in parsers.py

---
## test_dtype_all_columns
```python
from test_dtypes_basic import test_dtype_all_columns
```



---
## test_dtype_per_column
```python
from test_dtypes_basic import test_dtype_per_column
```



---
## test_invalid_dtype_per_column
```python
from test_dtypes_basic import test_invalid_dtype_per_column
```



---
## test_raise_on_passed_int_dtype_with_nas
```python
from test_dtypes_basic import test_raise_on_passed_int_dtype_with_nas
```



---
## test_dtype_with_converters
```python
from test_dtypes_basic import test_dtype_with_converters
```



---
## test_numeric_dtype
```python
from test_dtypes_basic import test_numeric_dtype
```



---
## test_boolean_dtype
```python
from test_dtypes_basic import test_boolean_dtype
```



---
## test_delimiter_with_usecols_and_parse_dates
```python
from test_dtypes_basic import test_delimiter_with_usecols_and_parse_dates
```



---
## test_decimal_and_exponential
```python
from test_dtypes_basic import test_decimal_and_exponential
```



---
## test_1000_sep_decimal_float_precision
```python
from test_dtypes_basic import test_1000_sep_decimal_float_precision
```



---
## decimal_number_check
```python
from test_dtypes_basic import decimal_number_check
```



---
## test_skip_whitespace
```python
from test_dtypes_basic import test_skip_whitespace
```



---
## test_true_values_cast_to_bool
```python
from test_dtypes_basic import test_true_values_cast_to_bool
```



---
## test_dtype_mangle_dup_cols
```python
from test_dtypes_basic import test_dtype_mangle_dup_cols
```



---
## test_dtype_mangle_dup_cols_single_dtype
```python
from test_dtypes_basic import test_dtype_mangle_dup_cols_single_dtype
```



---
## test_dtype_multi_index
```python
from test_dtypes_basic import test_dtype_multi_index
```



---
## test_nullable_int_dtype
```python
from test_dtypes_basic import test_nullable_int_dtype
```



---
## test_dtypes_defaultdict
```python
from test_dtypes_basic import test_dtypes_defaultdict
```



---
## test_dtypes_defaultdict_mangle_dup_cols
```python
from test_dtypes_basic import test_dtypes_defaultdict_mangle_dup_cols
```



---
## test_dtypes_defaultdict_invalid
```python
from test_dtypes_basic import test_dtypes_defaultdict_invalid
```



---
## test_dtype_backend
```python
from test_dtypes_basic import test_dtype_backend
```



---
## test_dtype_backend_and_dtype
```python
from test_dtypes_basic import test_dtype_backend_and_dtype
```



---
## test_dtype_backend_string
```python
from test_dtypes_basic import test_dtype_backend_string
```



---
## test_dtype_backend_ea_dtype_specified
```python
from test_dtypes_basic import test_dtype_backend_ea_dtype_specified
```



---
## test_dtype_backend_pyarrow
```python
from test_dtypes_basic import test_dtype_backend_pyarrow
```



---
## test_ea_int_avoid_overflow
```python
from test_dtypes_basic import test_ea_int_avoid_overflow
```



---
## test_string_inference
```python
from test_dtypes_basic import test_string_inference
```



---
## test_string_inference_object_dtype
```python
from test_dtypes_basic import test_string_inference_object_dtype
```



---
## test_accurate_parsing_of_large_integers
```python
from test_dtypes_basic import test_accurate_parsing_of_large_integers
```



---
## test_dtypes_with_usecols
```python
from test_dtypes_basic import test_dtypes_with_usecols
```



---
## test_categorical_dtype
```python
from test_categorical import test_categorical_dtype
```



---
## test_categorical_dtype_single
```python
from test_categorical import test_categorical_dtype_single
```



---
## test_categorical_dtype_unsorted
```python
from test_categorical import test_categorical_dtype_unsorted
```



---
## test_categorical_dtype_missing
```python
from test_categorical import test_categorical_dtype_missing
```



---
## test_categorical_dtype_high_cardinality_numeric
```python
from test_categorical import test_categorical_dtype_high_cardinality_numeric
```



---
## test_categorical_dtype_utf16
```python
from test_categorical import test_categorical_dtype_utf16
```



---
## test_categorical_dtype_chunksize_infer_categories
```python
from test_categorical import test_categorical_dtype_chunksize_infer_categories
```



---
## test_categorical_dtype_chunksize_explicit_categories
```python
from test_categorical import test_categorical_dtype_chunksize_explicit_categories
```



---
## test_categorical_dtype_latin1
```python
from test_categorical import test_categorical_dtype_latin1
```



---
## test_categorical_category_dtype
```python
from test_categorical import test_categorical_category_dtype
```



---
## test_categorical_category_dtype_unsorted
```python
from test_categorical import test_categorical_category_dtype_unsorted
```



---
## test_categorical_coerces_numeric
```python
from test_categorical import test_categorical_coerces_numeric
```



---
## test_categorical_coerces_datetime
```python
from test_categorical import test_categorical_coerces_datetime
```



---
## test_categorical_coerces_timestamp
```python
from test_categorical import test_categorical_coerces_timestamp
```



---
## test_categorical_coerces_timedelta
```python
from test_categorical import test_categorical_coerces_timedelta
```



---
## test_categorical_dtype_coerces_boolean
```python
from test_categorical import test_categorical_dtype_coerces_boolean
```



---
## test_categorical_unexpected_categories
```python
from test_categorical import test_categorical_unexpected_categories
```



---
## test_dtype_all_columns_empty
```python
from test_empty import test_dtype_all_columns_empty
```



---
## test_empty_pass_dtype
```python
from test_empty import test_empty_pass_dtype
```



---
## test_empty_with_index_pass_dtype
```python
from test_empty import test_empty_with_index_pass_dtype
```



---
## test_empty_with_multi_index_pass_dtype
```python
from test_empty import test_empty_with_multi_index_pass_dtype
```



---
## test_empty_with_mangled_column_pass_dtype_by_names
```python
from test_empty import test_empty_with_mangled_column_pass_dtype_by_names
```



---
## test_empty_with_mangled_column_pass_dtype_by_indexes
```python
from test_empty import test_empty_with_mangled_column_pass_dtype_by_indexes
```



---
## test_empty_with_dup_column_pass_dtype_by_indexes
```python
from test_empty import test_empty_with_dup_column_pass_dtype_by_indexes
```



---
## test_empty_with_dup_column_pass_dtype_by_indexes_raises
```python
from test_empty import test_empty_with_dup_column_pass_dtype_by_indexes_raises
```



---
## test_empty_dtype
```python
from test_empty import test_empty_dtype
```



---
## __name__
```python
from test_common_basic import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_override_set_noconvert_columns
```python
from test_common_basic import test_override_set_noconvert_columns
```



---
## test_read_csv_local
```python
from test_common_basic import test_read_csv_local
```



---
## test_1000_sep
```python
from test_common_basic import test_1000_sep
```



---
## test_unnamed_columns
```python
from test_common_basic import test_unnamed_columns
```



---
## test_csv_mixed_type
```python
from test_common_basic import test_csv_mixed_type
```



---
## test_read_csv_low_memory_no_rows_with_index
```python
from test_common_basic import test_read_csv_low_memory_no_rows_with_index
```



---
## test_read_csv_dataframe
```python
from test_common_basic import test_read_csv_dataframe
```



---
## test_read_nrows
```python
from test_common_basic import test_read_nrows
```



---
## test_read_nrows_bad
```python
from test_common_basic import test_read_nrows_bad
```



---
## test_nrows_skipfooter_errors
```python
from test_common_basic import test_nrows_skipfooter_errors
```



---
## test_missing_trailing_delimiters
```python
from test_common_basic import test_missing_trailing_delimiters
```



---
## test_skip_initial_space
```python
from test_common_basic import test_skip_initial_space
```



---
## test_trailing_delimiters
```python
from test_common_basic import test_trailing_delimiters
```



---
## test_escapechar
```python
from test_common_basic import test_escapechar
```



---
## test_ignore_leading_whitespace
```python
from test_common_basic import test_ignore_leading_whitespace
```



---
## test_uneven_lines_with_usecols
```python
from test_common_basic import test_uneven_lines_with_usecols
```



---
## test_read_empty_with_usecols
```python
from test_common_basic import test_read_empty_with_usecols
```



---
## test_trailing_spaces
```python
from test_common_basic import test_trailing_spaces
```



---
## test_raise_on_sep_with_delim_whitespace
```python
from test_common_basic import test_raise_on_sep_with_delim_whitespace
```



---
## test_read_filepath_or_buffer
```python
from test_common_basic import test_read_filepath_or_buffer
```



---
## test_single_char_leading_whitespace
```python
from test_common_basic import test_single_char_leading_whitespace
```



---
## test_empty_lines
```python
from test_common_basic import test_empty_lines
```



---
## test_whitespace_lines
```python
from test_common_basic import test_whitespace_lines
```



---
## test_whitespace_regex_separator
```python
from test_common_basic import test_whitespace_regex_separator
```



---
## test_sub_character
```python
from test_common_basic import test_sub_character
```



---
## test_filename_with_special_chars
```python
from test_common_basic import test_filename_with_special_chars
```



---
## test_read_table_same_signature_as_read_csv
```python
from test_common_basic import test_read_table_same_signature_as_read_csv
```



---
## test_read_table_equivalency_to_read_csv
```python
from test_common_basic import test_read_table_equivalency_to_read_csv
```



---
## test_read_csv_and_table_sys_setprofile
```python
from test_common_basic import test_read_csv_and_table_sys_setprofile
```



---
## test_first_row_bom
```python
from test_common_basic import test_first_row_bom
```



---
## test_first_row_bom_unquoted
```python
from test_common_basic import test_first_row_bom_unquoted
```



---
## test_blank_lines_between_header_and_data_rows
```python
from test_common_basic import test_blank_lines_between_header_and_data_rows
```



---
## test_no_header_two_extra_columns
```python
from test_common_basic import test_no_header_two_extra_columns
```



---
## test_read_csv_names_not_accepting_sets
```python
from test_common_basic import test_read_csv_names_not_accepting_sets
```



---
## test_read_table_delim_whitespace_default_sep
```python
from test_common_basic import test_read_table_delim_whitespace_default_sep
```



---
## test_read_csv_delim_whitespace_non_default_sep
```python
from test_common_basic import test_read_csv_delim_whitespace_non_default_sep
```



---
## test_read_csv_delimiter_and_sep_no_default
```python
from test_common_basic import test_read_csv_delimiter_and_sep_no_default
```



---
## test_read_csv_line_break_as_separator
```python
from test_common_basic import test_read_csv_line_break_as_separator
```



---
## test_read_table_delim_whitespace_non_default_sep
```python
from test_common_basic import test_read_table_delim_whitespace_non_default_sep
```



---
## test_dict_keys_as_names
```python
from test_common_basic import test_dict_keys_as_names
```



---
## test_encoding_surrogatepass
```python
from test_common_basic import test_encoding_surrogatepass
```



---
## test_malformed_second_line
```python
from test_common_basic import test_malformed_second_line
```



---
## test_short_single_line
```python
from test_common_basic import test_short_single_line
```



---
## test_short_multi_line
```python
from test_common_basic import test_short_multi_line
```



---
## test_read_seek
```python
from test_common_basic import test_read_seek
```



---
## MyTextFileReader
```python
from test_common_basic import MyTextFileReader
```



---
## MyCParserWrapper
```python
from test_common_basic import MyCParserWrapper
```



---
## __init__
```python
from test_common_basic import __init__
```



---
## _set_noconvert_columns
```python
from test_common_basic import _set_noconvert_columns
```



---
## __name__
```python
from test_verbose import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_verbose_read
```python
from test_verbose import test_verbose_read
```



---
## test_verbose_read2
```python
from test_verbose import test_verbose_read2
```



---
## test_1000_sep_with_decimal
```python
from test_decimal import test_1000_sep_with_decimal
```



---
## test_euro_decimal_format
```python
from test_decimal import test_euro_decimal_format
```



---
## __name__
```python
from test_read_errors import __name__
```

Tests that work on the Python, C and PyArrow engines but do not have a
specific classification into the other test modules.

---
## test_empty_decimal_marker
```python
from test_read_errors import test_empty_decimal_marker
```



---
## test_bad_stream_exception
```python
from test_read_errors import test_bad_stream_exception
```



---
## test_malformed
```python
from test_read_errors import test_malformed
```



---
## test_malformed_chunks
```python
from test_read_errors import test_malformed_chunks
```



---
## test_catch_too_many_names
```python
from test_read_errors import test_catch_too_many_names
```



---
## test_raise_on_no_columns
```python
from test_read_errors import test_raise_on_no_columns
```



---
## test_unexpected_keyword_parameter_exception
```python
from test_read_errors import test_unexpected_keyword_parameter_exception
```



---
## test_suppress_error_output
```python
from test_read_errors import test_suppress_error_output
```



---
## test_error_bad_lines
```python
from test_read_errors import test_error_bad_lines
```



---
## test_warn_bad_lines
```python
from test_read_errors import test_warn_bad_lines
```



---
## test_read_csv_wrong_num_columns
```python
from test_read_errors import test_read_csv_wrong_num_columns
```



---
## test_null_byte_char
```python
from test_read_errors import test_null_byte_char
```



---
## test_open_file
```python
from test_read_errors import test_open_file
```



---
## test_invalid_on_bad_line
```python
from test_read_errors import test_invalid_on_bad_line
```



---
## test_bad_header_uniform_error
```python
from test_read_errors import test_bad_header_uniform_error
```



---
## test_on_bad_lines_warn_correct_formatting
```python
from test_read_errors import test_on_bad_lines_warn_correct_formatting
```



---
## __name__
```python
from test_data_list import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_read_data_list
```python
from test_data_list import test_read_data_list
```



---
## test_reader_list
```python
from test_data_list import test_reader_list
```



---
## test_reader_list_skiprows
```python
from test_data_list import test_reader_list_skiprows
```



---
## test_read_csv_parse_simple_list
```python
from test_data_list import test_read_csv_parse_simple_list
```



---
## test_pass_names_with_index
```python
from test_index import test_pass_names_with_index
```



---
## test_multi_index_no_level_names
```python
from test_index import test_multi_index_no_level_names
```



---
## test_multi_index_no_level_names_implicit
```python
from test_index import test_multi_index_no_level_names_implicit
```



---
## test_multi_index_blank_df
```python
from test_index import test_multi_index_blank_df
```



---
## test_no_unnamed_index
```python
from test_index import test_no_unnamed_index
```



---
## test_read_duplicate_index_explicit
```python
from test_index import test_read_duplicate_index_explicit
```



---
## test_read_duplicate_index_implicit
```python
from test_index import test_read_duplicate_index_implicit
```



---
## test_read_csv_no_index_name
```python
from test_index import test_read_csv_no_index_name
```



---
## test_empty_with_index
```python
from test_index import test_empty_with_index
```



---
## test_empty_with_multi_index
```python
from test_index import test_empty_with_multi_index
```



---
## test_empty_with_reversed_multi_index
```python
from test_index import test_empty_with_reversed_multi_index
```



---
## __name__
```python
from test_ints import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_int_conversion
```python
from test_ints import test_int_conversion
```



---
## test_parse_bool
```python
from test_ints import test_parse_bool
```



---
## test_parse_integers_above_fp_precision
```python
from test_ints import test_parse_integers_above_fp_precision
```



---
## test_integer_overflow_bug
```python
from test_ints import test_integer_overflow_bug
```



---
## test_int64_min_issues
```python
from test_ints import test_int64_min_issues
```



---
## test_int64_overflow
```python
from test_ints import test_int64_overflow
```



---
## test_int64_uint64_range
```python
from test_ints import test_int64_uint64_range
```



---
## test_outside_int64_uint64_range
```python
from test_ints import test_outside_int64_uint64_range
```



---
## test_numeric_range_too_wide
```python
from test_ints import test_numeric_range_too_wide
```



---
## test_integer_precision
```python
from test_ints import test_integer_precision
```



---
## __name__
```python
from test_float import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_float_parser
```python
from test_float import test_float_parser
```



---
## test_scientific_no_exponent
```python
from test_float import test_scientific_no_exponent
```



---
## test_very_negative_exponent
```python
from test_float import test_very_negative_exponent
```



---
## test_too_many_exponent_digits
```python
from test_float import test_too_many_exponent_digits
```



---
## __name__
```python
from test_chunksize import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_read_chunksize_with_index
```python
from test_chunksize import test_read_chunksize_with_index
```



---
## test_read_chunksize_bad
```python
from test_chunksize import test_read_chunksize_bad
```



---
## test_read_chunksize_and_nrows
```python
from test_chunksize import test_read_chunksize_and_nrows
```



---
## test_read_chunksize_and_nrows_changing_size
```python
from test_chunksize import test_read_chunksize_and_nrows_changing_size
```



---
## test_get_chunk_passed_chunksize
```python
from test_chunksize import test_get_chunk_passed_chunksize
```



---
## test_read_chunksize_compat
```python
from test_chunksize import test_read_chunksize_compat
```



---
## test_read_chunksize_jagged_names
```python
from test_chunksize import test_read_chunksize_jagged_names
```



---
## test_chunk_begins_with_newline_whitespace
```python
from test_chunksize import test_chunk_begins_with_newline_whitespace
```



---
## test_chunks_have_consistent_numerical_type
```python
from test_chunksize import test_chunks_have_consistent_numerical_type
```



---
## test_warn_if_chunks_have_mismatched_type
```python
from test_chunksize import test_warn_if_chunks_have_mismatched_type
```



---
## test_empty_with_nrows_chunksize
```python
from test_chunksize import test_empty_with_nrows_chunksize
```



---
## test_read_csv_memory_growth_chunksize
```python
from test_chunksize import test_read_csv_memory_growth_chunksize
```



---
## test_chunksize_with_usecols_second_block_shorter
```python
from test_chunksize import test_chunksize_with_usecols_second_block_shorter
```



---
## test_chunksize_second_block_shorter
```python
from test_chunksize import test_chunksize_second_block_shorter
```



---
## __name__
```python
from test_iterator import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_iterator
```python
from test_iterator import test_iterator
```



---
## test_iterator2
```python
from test_iterator import test_iterator2
```



---
## test_iterator_stop_on_chunksize
```python
from test_iterator import test_iterator_stop_on_chunksize
```



---
## test_iterator_skipfooter_errors
```python
from test_iterator import test_iterator_skipfooter_errors
```



---
## test_iteration_open_handle
```python
from test_iterator import test_iteration_open_handle
```



---
## __name__
```python
from test_file_buffer_url import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_url
```python
from test_file_buffer_url import test_url
```



---
## test_local_file
```python
from test_file_buffer_url import test_local_file
```



---
## test_path_path_lib
```python
from test_file_buffer_url import test_path_path_lib
```



---
## test_path_local_path
```python
from test_file_buffer_url import test_path_local_path
```



---
## test_nonexistent_path
```python
from test_file_buffer_url import test_nonexistent_path
```



---
## test_no_permission
```python
from test_file_buffer_url import test_no_permission
```



---
## test_eof_states
```python
from test_file_buffer_url import test_eof_states
```



---
## test_temporary_file
```python
from test_file_buffer_url import test_temporary_file
```



---
## test_internal_eof_byte
```python
from test_file_buffer_url import test_internal_eof_byte
```



---
## test_internal_eof_byte_to_file
```python
from test_file_buffer_url import test_internal_eof_byte_to_file
```



---
## test_file_handle_string_io
```python
from test_file_buffer_url import test_file_handle_string_io
```



---
## test_file_handles_with_open
```python
from test_file_buffer_url import test_file_handles_with_open
```



---
## test_invalid_file_buffer_class
```python
from test_file_buffer_url import test_invalid_file_buffer_class
```



---
## test_invalid_file_buffer_mock
```python
from test_file_buffer_url import test_invalid_file_buffer_mock
```



---
## test_valid_file_buffer_seems_invalid
```python
from test_file_buffer_url import test_valid_file_buffer_seems_invalid
```



---
## test_read_csv_file_handle
```python
from test_file_buffer_url import test_read_csv_file_handle
```

Test whether read_csv does not close user-provided file handles.

GH 36980

---
## test_memory_map_compression
```python
from test_file_buffer_url import test_memory_map_compression
```

Support memory map for compressed files.

GH 37621

---
## test_context_manager
```python
from test_file_buffer_url import test_context_manager
```



---
## test_context_manageri_user_provided
```python
from test_file_buffer_url import test_context_manageri_user_provided
```



---
## test_file_descriptor_leak
```python
from test_file_buffer_url import test_file_descriptor_leak
```



---
## test_memory_map
```python
from test_file_buffer_url import test_memory_map
```



---
## InvalidBuffer
```python
from test_file_buffer_url import InvalidBuffer
```



---
## Foo
```python
from test_file_buffer_url import Foo
```



---
## NoSeekTellBuffer
```python
from test_file_buffer_url import NoSeekTellBuffer
```



---
## tell
```python
from test_file_buffer_url import tell
```



---
## seek
```python
from test_file_buffer_url import seek
```



---
## __name__
```python
from test_inf import __name__
```

Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.

---
## test_inf_parsing
```python
from test_inf import test_inf_parsing
```



---
## test_infinity_parsing
```python
from test_inf import test_infinity_parsing
```



---
## test_read_csv_with_use_inf_as_na
```python
from test_inf import test_read_csv_with_use_inf_as_na
```



---
## __name__
```python
from test_observance import __name__
```



---
## test_next_monday
```python
from test_observance import test_next_monday
```



---
## test_next_monday_or_tuesday
```python
from test_observance import test_next_monday_or_tuesday
```



---
## test_previous_friday
```python
from test_observance import test_previous_friday
```



---
## test_sunday_to_monday
```python
from test_observance import test_sunday_to_monday
```



---
## test_nearest_workday
```python
from test_observance import test_nearest_workday
```



---
## test_weekend_to_monday
```python
from test_observance import test_weekend_to_monday
```



---
## test_next_workday
```python
from test_observance import test_next_workday
```



---
## test_previous_workday
```python
from test_observance import test_previous_workday
```



---
## test_before_nearest_workday
```python
from test_observance import test_before_nearest_workday
```



---
## test_after_nearest_workday
```python
from test_observance import test_after_nearest_workday
```



---
## __name__
```python
from test_federal import __name__
```



---
## test_no_mlk_before_1986
```python
from test_federal import test_no_mlk_before_1986
```



---
## test_memorial_day
```python
from test_federal import test_memorial_day
```



---
## test_federal_holiday_inconsistent_returntype
```python
from test_federal import test_federal_holiday_inconsistent_returntype
```



---
## MLKCalendar
```python
from test_federal import MLKCalendar
```



---
## MemorialDay
```python
from test_federal import MemorialDay
```



---
## __name__
```python
from test_calendar import __name__
```



---
## test_calendar
```python
from test_calendar import test_calendar
```



---
## test_calendar_caching
```python
from test_calendar import test_calendar_caching
```



---
## test_calendar_observance_dates
```python
from test_calendar import test_calendar_observance_dates
```



---
## test_rule_from_name
```python
from test_calendar import test_rule_from_name
```



---
## test_calendar_2031
```python
from test_calendar import test_calendar_2031
```



---
## test_no_holidays_calendar
```python
from test_calendar import test_no_holidays_calendar
```



---
## TestCalendar
```python
from test_calendar import TestCalendar
```



---
## testCalendar
```python
from test_calendar import testCalendar
```



---
## NoHolidaysCalendar
```python
from test_calendar import NoHolidaysCalendar
```



---
## __init__
```python
from test_calendar import __init__
```



---
## __name__
```python
from test_holiday import __name__
```



---
## test_holiday_dates
```python
from test_holiday import test_holiday_dates
```



---
## test_holidays_within_dates
```python
from test_holiday import test_holidays_within_dates
```



---
## test_argument_types
```python
from test_holiday import test_argument_types
```



---
## test_special_holidays
```python
from test_holiday import test_special_holidays
```



---
## test_get_calendar
```python
from test_holiday import test_get_calendar
```



---
## test_factory
```python
from test_holiday import test_factory
```



---
## test_both_offset_observance_raises
```python
from test_holiday import test_both_offset_observance_raises
```



---
## test_half_open_interval_with_observance
```python
from test_holiday import test_half_open_interval_with_observance
```



---
## test_holidays_with_timezone_specified_but_no_occurences
```python
from test_holiday import test_holidays_with_timezone_specified_but_no_occurences
```



---
## TestCalendar
```python
from test_holiday import TestCalendar
```



---
## TestHolidayCalendar
```python
from test_holiday import TestHolidayCalendar
```



---
## base_delta_code_pair
```python
from test_inference import base_delta_code_pair
```



---
## test_infer_freq_range
```python
from test_inference import test_infer_freq_range
```



---
## test_raise_if_period_index
```python
from test_inference import test_raise_if_period_index
```



---
## test_raise_if_too_few
```python
from test_inference import test_raise_if_too_few
```



---
## test_business_daily
```python
from test_inference import test_business_daily
```



---
## test_business_daily_look_alike
```python
from test_inference import test_business_daily_look_alike
```



---
## test_day_corner
```python
from test_inference import test_day_corner
```



---
## test_non_datetime_index
```python
from test_inference import test_non_datetime_index
```



---
## test_fifth_week_of_month_infer
```python
from test_inference import test_fifth_week_of_month_infer
```



---
## test_week_of_month_fake
```python
from test_inference import test_week_of_month_fake
```



---
## test_fifth_week_of_month
```python
from test_inference import test_fifth_week_of_month
```



---
## test_monthly_ambiguous
```python
from test_inference import test_monthly_ambiguous
```



---
## test_annual_ambiguous
```python
from test_inference import test_annual_ambiguous
```



---
## test_infer_freq_delta
```python
from test_inference import test_infer_freq_delta
```



---
## test_infer_freq_custom
```python
from test_inference import test_infer_freq_custom
```



---
## test_infer_freq_index
```python
from test_inference import test_infer_freq_index
```



---
## test_infer_freq_tz
```python
from test_inference import test_infer_freq_tz
```



---
## test_infer_freq_tz_series
```python
from test_inference import test_infer_freq_tz_series
```



---
## test_infer_freq_tz_transition
```python
from test_inference import test_infer_freq_tz_transition
```



---
## test_infer_freq_tz_transition_custom
```python
from test_inference import test_infer_freq_tz_transition_custom
```



---
## test_infer_freq_business_hour
```python
from test_inference import test_infer_freq_business_hour
```



---
## test_not_monotonic
```python
from test_inference import test_not_monotonic
```



---
## test_non_datetime_index2
```python
from test_inference import test_non_datetime_index2
```



---
## test_invalid_index_types
```python
from test_inference import test_invalid_index_types
```



---
## test_invalid_index_types_unicode
```python
from test_inference import test_invalid_index_types_unicode
```



---
## test_string_datetime_like_compat
```python
from test_inference import test_string_datetime_like_compat
```



---
## test_series
```python
from test_inference import test_series
```



---
## test_series_invalid_type
```python
from test_inference import test_series_invalid_type
```



---
## test_series_inconvertible_string
```python
from test_inference import test_series_inconvertible_string
```



---
## test_series_period_index
```python
from test_inference import test_series_period_index
```



---
## test_series_datetime_index
```python
from test_inference import test_series_datetime_index
```



---
## test_legacy_offset_warnings
```python
from test_inference import test_legacy_offset_warnings
```



---
## test_ms_vs_capital_ms
```python
from test_inference import test_ms_vs_capital_ms
```



---
## test_infer_freq_non_nano
```python
from test_inference import test_infer_freq_non_nano
```



---
## test_infer_freq_non_nano_tzaware
```python
from test_inference import test_infer_freq_non_nano_tzaware
```



---
## __name__
```python
from test_frequencies import __name__
```



---
## test_super_sub_symmetry
```python
from test_frequencies import test_super_sub_symmetry
```



---
## __name__
```python
from test_freq_code import __name__
```



---
## test_get_to_timestamp_base
```python
from test_freq_code import test_get_to_timestamp_base
```



---
## test_resolution_bumping
```python
from test_freq_code import test_resolution_bumping
```



---
## test_cat
```python
from test_freq_code import test_cat
```



---
## test_compatibility
```python
from test_freq_code import test_compatibility
```



---
## __name__
```python
from test_business_quarter import __name__
```

Tests for the following offsets:
- BQuarterBegin
- BQuarterEnd

---
## test_quarterly_dont_normalize
```python
from test_business_quarter import test_quarterly_dont_normalize
```



---
## test_on_offset
```python
from test_business_quarter import test_on_offset
```



---
## TestBQuarterBegin
```python
from test_business_quarter import TestBQuarterBegin
```



---
## TestBQuarterEnd
```python
from test_business_quarter import TestBQuarterEnd
```



---
## test_repr
```python
from test_business_quarter import test_repr
```



---
## test_is_anchored
```python
from test_business_quarter import test_is_anchored
```



---
## test_offset_corner_case
```python
from test_business_quarter import test_offset_corner_case
```



---
## test_offset
```python
from test_business_quarter import test_offset
```



---
## test_is_on_offset
```python
from test_business_quarter import test_is_on_offset
```



---
## __name__
```python
from test_year import __name__
```

Tests for the following offsets:
- YearBegin
- YearEnd

---
## TestYearBegin
```python
from test_year import TestYearBegin
```



---
## TestYearEnd
```python
from test_year import TestYearEnd
```



---
## TestYearEndDiffMonth
```python
from test_year import TestYearEndDiffMonth
```



---
## test_add_out_of_pydatetime_range
```python
from test_year import test_add_out_of_pydatetime_range
```



---
## test_misspecified
```python
from test_year import test_misspecified
```



---
## test_offset
```python
from test_year import test_offset
```



---
## test_is_on_offset
```python
from test_year import test_is_on_offset
```



---
## __name__
```python
from test_custom_business_month import __name__
```

Tests for the following offsets:
- CustomBusinessMonthBase
- CustomBusinessMonthBegin
- CustomBusinessMonthEnd

---
## dt
```python
from test_custom_business_month import dt
```



---
## TestCommonCBM
```python
from test_custom_business_month import TestCommonCBM
```



---
## TestCustomBusinessMonthBegin
```python
from test_custom_business_month import TestCustomBusinessMonthBegin
```



---
## TestCustomBusinessMonthEnd
```python
from test_custom_business_month import TestCustomBusinessMonthEnd
```



---
## test_eq
```python
from test_custom_business_month import test_eq
```



---
## test_hash
```python
from test_custom_business_month import test_hash
```



---
## test_roundtrip_pickle
```python
from test_custom_business_month import test_roundtrip_pickle
```



---
## test_copy
```python
from test_custom_business_month import test_copy
```



---
## _offset
```python
from test_custom_business_month import _offset
```



---
## offset
```python
from test_custom_business_month import offset
```



---
## offset2
```python
from test_custom_business_month import offset2
```



---
## test_different_normalize_equals
```python
from test_custom_business_month import test_different_normalize_equals
```



---
## test_repr
```python
from test_custom_business_month import test_repr
```



---
## test_add_datetime
```python
from test_custom_business_month import test_add_datetime
```



---
## testRollback1
```python
from test_custom_business_month import testRollback1
```



---
## testRollback2
```python
from test_custom_business_month import testRollback2
```



---
## testRollforward1
```python
from test_custom_business_month import testRollforward1
```



---
## test_roll_date_object
```python
from test_custom_business_month import test_roll_date_object
```



---
## test_is_on_offset
```python
from test_custom_business_month import test_is_on_offset
```



---
## test_apply
```python
from test_custom_business_month import test_apply
```



---
## test_apply_large_n
```python
from test_custom_business_month import test_apply_large_n
```



---
## test_holidays
```python
from test_custom_business_month import test_holidays
```



---
## test_apply_with_extra_offset
```python
from test_custom_business_month import test_apply_with_extra_offset
```



---
## _check_roundtrip
```python
from test_custom_business_month import _check_roundtrip
```



---
## _get_offset
```python
from test_common import _get_offset
```



---
## _offset
```python
from test_common import _offset
```



---
## dt
```python
from test_common import dt
```



---
## test_apply_out_of_range
```python
from test_common import test_apply_out_of_range
```



---
## test_offsets_compare_equal
```python
from test_common import test_offsets_compare_equal
```



---
## test_rsub
```python
from test_common import test_rsub
```



---
## test_radd
```python
from test_common import test_radd
```



---
## test_sub
```python
from test_common import test_sub
```



---
## test_Mult1
```python
from test_common import test_Mult1
```



---
## test_compare_str
```python
from test_common import test_compare_str
```



---
## __name__
```python
from test_offsets_properties import __name__
```

Behavioral based tests for offsets and date_range.

This file is adapted from https://github.com/pandas-dev/pandas/pull/18761 -
which was more ambitious but less idiomatic in its use of Hypothesis.

You may wish to consult the previous version for inspiration on further
tests, or when trying to pin down the bugs exposed by the tests below.

---
## test_on_offset_implementations
```python
from test_offsets_properties import test_on_offset_implementations
```



---
## test_shift_across_dst
```python
from test_offsets_properties import test_shift_across_dst
```



---
## __name__
```python
from test_business_day import __name__
```

Tests for offsets.BDay

---
## dt
```python
from test_business_day import dt
```



---
## _offset
```python
from test_business_day import _offset
```



---
## offset
```python
from test_business_day import offset
```



---
## offset2
```python
from test_business_day import offset2
```



---
## TestBusinessDay
```python
from test_business_day import TestBusinessDay
```



---
## test_different_normalize_equals
```python
from test_business_day import test_different_normalize_equals
```



---
## test_repr
```python
from test_business_day import test_repr
```



---
## test_with_offset
```python
from test_business_day import test_with_offset
```



---
## test_with_offset_index
```python
from test_business_day import test_with_offset_index
```



---
## test_eq
```python
from test_business_day import test_eq
```



---
## test_hash
```python
from test_business_day import test_hash
```



---
## test_add_datetime
```python
from test_business_day import test_add_datetime
```



---
## testRollback1
```python
from test_business_day import testRollback1
```



---
## testRollback2
```python
from test_business_day import testRollback2
```



---
## testRollforward1
```python
from test_business_day import testRollforward1
```



---
## testRollforward2
```python
from test_business_day import testRollforward2
```



---
## test_roll_date_object
```python
from test_business_day import test_roll_date_object
```



---
## test_is_on_offset
```python
from test_business_day import test_is_on_offset
```



---
## test_apply
```python
from test_business_day import test_apply
```



---
## test_apply_large_n
```python
from test_business_day import test_apply_large_n
```



---
## test_apply_corner
```python
from test_business_day import test_apply_corner
```



---
## __name__
```python
from test_fiscal import __name__
```

Tests for Fiscal Year and Fiscal Quarter offset classes

---
## makeFY5253LastOfMonthQuarter
```python
from test_fiscal import makeFY5253LastOfMonthQuarter
```



---
## makeFY5253NearestEndMonthQuarter
```python
from test_fiscal import makeFY5253NearestEndMonthQuarter
```



---
## makeFY5253NearestEndMonth
```python
from test_fiscal import makeFY5253NearestEndMonth
```



---
## makeFY5253LastOfMonth
```python
from test_fiscal import makeFY5253LastOfMonth
```



---
## test_get_offset_name
```python
from test_fiscal import test_get_offset_name
```



---
## TestFY5253LastOfMonth
```python
from test_fiscal import TestFY5253LastOfMonth
```



---
## TestFY5253NearestEndMonth
```python
from test_fiscal import TestFY5253NearestEndMonth
```



---
## TestFY5253LastOfMonthQuarter
```python
from test_fiscal import TestFY5253LastOfMonthQuarter
```



---
## TestFY5253NearestEndMonthQuarter
```python
from test_fiscal import TestFY5253NearestEndMonthQuarter
```



---
## test_bunched_yearends
```python
from test_fiscal import test_bunched_yearends
```



---
## test_fy5253_last_onoffset
```python
from test_fiscal import test_fy5253_last_onoffset
```



---
## test_fy5253_nearest_onoffset
```python
from test_fiscal import test_fy5253_nearest_onoffset
```



---
## test_fy5253qtr_onoffset_nearest
```python
from test_fiscal import test_fy5253qtr_onoffset_nearest
```



---
## test_fy5253qtr_onoffset_last
```python
from test_fiscal import test_fy5253qtr_onoffset_last
```



---
## test_is_on_offset
```python
from test_fiscal import test_is_on_offset
```



---
## test_apply
```python
from test_fiscal import test_apply
```



---
## test_get_year_end
```python
from test_fiscal import test_get_year_end
```



---
## test_is_anchored
```python
from test_fiscal import test_is_anchored
```



---
## test_equality
```python
from test_fiscal import test_equality
```



---
## test_offset
```python
from test_fiscal import test_offset
```



---
## test_year_has_extra_week
```python
from test_fiscal import test_year_has_extra_week
```



---
## test_get_weeks
```python
from test_fiscal import test_get_weeks
```



---
## __name__
```python
from test_easter import __name__
```

Tests for the following offsets:
- Easter

---
## TestEaster
```python
from test_easter import TestEaster
```



---
## test_offset
```python
from test_easter import test_offset
```



---
## __name__
```python
from test_quarter import __name__
```

Tests for the following offsets:
- QuarterBegin
- QuarterEnd

---
## test_quarterly_dont_normalize
```python
from test_quarter import test_quarterly_dont_normalize
```



---
## test_on_offset
```python
from test_quarter import test_on_offset
```



---
## TestQuarterBegin
```python
from test_quarter import TestQuarterBegin
```



---
## TestQuarterEnd
```python
from test_quarter import TestQuarterEnd
```



---
## test_repr
```python
from test_quarter import test_repr
```



---
## test_is_anchored
```python
from test_quarter import test_is_anchored
```



---
## test_offset_corner_case
```python
from test_quarter import test_offset_corner_case
```



---
## test_offset
```python
from test_quarter import test_offset
```



---
## test_is_on_offset
```python
from test_quarter import test_is_on_offset
```



---
## __name__
```python
from test_dst import __name__
```

Tests for DateOffset additions over Daylight Savings Time

---
## get_utc_offset_hours
```python
from test_dst import get_utc_offset_hours
```



---
## TestDST
```python
from test_dst import TestDST
```



---
## test_nontick_offset_with_ambiguous_time_error
```python
from test_dst import test_nontick_offset_with_ambiguous_time_error
```



---
## _test_all_offsets
```python
from test_dst import _test_all_offsets
```



---
## _test_offset
```python
from test_dst import _test_offset
```



---
## _make_timestamp
```python
from test_dst import _make_timestamp
```



---
## test_springforward_plural
```python
from test_dst import test_springforward_plural
```



---
## test_fallback_singular
```python
from test_dst import test_fallback_singular
```



---
## test_springforward_singular
```python
from test_dst import test_springforward_singular
```



---
## test_all_offset_classes
```python
from test_dst import test_all_offset_classes
```



---
## __name__
```python
from test_custom_business_day import __name__
```

Tests for offsets.CustomBusinessDay / CDay

---
## offset
```python
from test_custom_business_day import offset
```



---
## offset2
```python
from test_custom_business_day import offset2
```



---
## TestCustomBusinessDay
```python
from test_custom_business_day import TestCustomBusinessDay
```



---
## test_repr
```python
from test_custom_business_day import test_repr
```



---
## test_holidays
```python
from test_custom_business_day import test_holidays
```



---
## test_weekmask
```python
from test_custom_business_day import test_weekmask
```



---
## test_weekmask_and_holidays
```python
from test_custom_business_day import test_weekmask_and_holidays
```



---
## test_calendar
```python
from test_custom_business_day import test_calendar
```



---
## test_roundtrip_pickle
```python
from test_custom_business_day import test_roundtrip_pickle
```



---
## test_pickle_compat_0_14_1
```python
from test_custom_business_day import test_pickle_compat_0_14_1
```



---
## _check_roundtrip
```python
from test_custom_business_day import _check_roundtrip
```



---
## __name__
```python
from test_business_hour import __name__
```

Tests for offsets.BusinessHour

---
## dt
```python
from test_business_hour import dt
```



---
## _offset
```python
from test_business_hour import _offset
```



---
## offset1
```python
from test_business_hour import offset1
```



---
## offset2
```python
from test_business_hour import offset2
```



---
## offset3
```python
from test_business_hour import offset3
```



---
## offset4
```python
from test_business_hour import offset4
```



---
## offset5
```python
from test_business_hour import offset5
```



---
## offset6
```python
from test_business_hour import offset6
```



---
## offset7
```python
from test_business_hour import offset7
```



---
## offset8
```python
from test_business_hour import offset8
```



---
## offset9
```python
from test_business_hour import offset9
```



---
## offset10
```python
from test_business_hour import offset10
```



---
## TestBusinessHour
```python
from test_business_hour import TestBusinessHour
```



---
## TestOpeningTimes
```python
from test_business_hour import TestOpeningTimes
```



---
## test_constructor_errors
```python
from test_business_hour import test_constructor_errors
```



---
## test_different_normalize_equals
```python
from test_business_hour import test_different_normalize_equals
```



---
## test_repr
```python
from test_business_hour import test_repr
```



---
## test_with_offset
```python
from test_business_hour import test_with_offset
```



---
## test_eq_attribute
```python
from test_business_hour import test_eq_attribute
```



---
## test_eq
```python
from test_business_hour import test_eq
```



---
## test_neq
```python
from test_business_hour import test_neq
```



---
## test_hash
```python
from test_business_hour import test_hash
```



---
## test_add_datetime
```python
from test_business_hour import test_add_datetime
```



---
## test_sub
```python
from test_business_hour import test_sub
```



---
## test_multiply_by_zero
```python
from test_business_hour import test_multiply_by_zero
```



---
## testRollback1
```python
from test_business_hour import testRollback1
```



---
## testRollback2
```python
from test_business_hour import testRollback2
```



---
## testRollforward1
```python
from test_business_hour import testRollforward1
```



---
## testRollforward2
```python
from test_business_hour import testRollforward2
```



---
## test_roll_date_object
```python
from test_business_hour import test_roll_date_object
```



---
## test_normalize
```python
from test_business_hour import test_normalize
```



---
## test_is_on_offset
```python
from test_business_hour import test_is_on_offset
```



---
## test_apply
```python
from test_business_hour import test_apply
```



---
## test_apply_large_n
```python
from test_business_hour import test_apply_large_n
```



---
## test_apply_nanoseconds
```python
from test_business_hour import test_apply_nanoseconds
```



---
## test_bday_ignores_timedeltas
```python
from test_business_hour import test_bday_ignores_timedeltas
```



---
## test_add_bday_offset_nanos
```python
from test_business_hour import test_add_bday_offset_nanos
```



---
## test_opening_time
```python
from test_business_hour import test_opening_time
```



---
## __name__
```python
from test_month import __name__
```

Tests for the following offsets:
- SemiMonthBegin
- SemiMonthEnd
- MonthBegin
- MonthEnd

---
## TestSemiMonthEnd
```python
from test_month import TestSemiMonthEnd
```



---
## TestSemiMonthBegin
```python
from test_month import TestSemiMonthBegin
```



---
## TestMonthBegin
```python
from test_month import TestMonthBegin
```



---
## TestMonthEnd
```python
from test_month import TestMonthEnd
```



---
## test_offset_whole_year
```python
from test_month import test_offset_whole_year
```



---
## test_offset
```python
from test_month import test_offset
```



---
## test_apply_index
```python
from test_month import test_apply_index
```



---
## test_is_on_offset
```python
from test_month import test_is_on_offset
```



---
## test_vectorized_offset_addition
```python
from test_month import test_vectorized_offset_addition
```



---
## test_day_of_month
```python
from test_month import test_day_of_month
```



---
## test_normalize
```python
from test_month import test_normalize
```



---
## __name__
```python
from test_custom_business_hour import __name__
```

Tests for offsets.CustomBusinessHour

---
## dt
```python
from test_custom_business_hour import dt
```



---
## _offset
```python
from test_custom_business_hour import _offset
```



---
## offset1
```python
from test_custom_business_hour import offset1
```



---
## offset2
```python
from test_custom_business_hour import offset2
```



---
## TestCustomBusinessHour
```python
from test_custom_business_hour import TestCustomBusinessHour
```



---
## test_custom_businesshour_weekmask_and_holidays
```python
from test_custom_business_hour import test_custom_businesshour_weekmask_and_holidays
```



---
## test_constructor_errors
```python
from test_custom_business_hour import test_constructor_errors
```



---
## test_different_normalize_equals
```python
from test_custom_business_hour import test_different_normalize_equals
```



---
## test_repr
```python
from test_custom_business_hour import test_repr
```



---
## test_with_offset
```python
from test_custom_business_hour import test_with_offset
```



---
## test_eq
```python
from test_custom_business_hour import test_eq
```



---
## test_hash
```python
from test_custom_business_hour import test_hash
```



---
## test_add_dateime
```python
from test_custom_business_hour import test_add_dateime
```



---
## testRollback1
```python
from test_custom_business_hour import testRollback1
```



---
## testRollback2
```python
from test_custom_business_hour import testRollback2
```



---
## testRollforward1
```python
from test_custom_business_hour import testRollforward1
```



---
## testRollforward2
```python
from test_custom_business_hour import testRollforward2
```



---
## test_roll_date_object
```python
from test_custom_business_hour import test_roll_date_object
```



---
## test_normalize
```python
from test_custom_business_hour import test_normalize
```



---
## test_is_on_offset
```python
from test_custom_business_hour import test_is_on_offset
```



---
## test_apply
```python
from test_custom_business_hour import test_apply
```



---
## test_apply_nanoseconds
```python
from test_custom_business_hour import test_apply_nanoseconds
```



---
## test_us_federal_holiday_with_datetime
```python
from test_custom_business_hour import test_us_federal_holiday_with_datetime
```



---
## assert_offset_equal
```python
from common import assert_offset_equal
```



---
## assert_is_on_offset
```python
from common import assert_is_on_offset
```



---
## WeekDay
```python
from common import WeekDay
```



---
## test_apply_index
```python
from test_index import test_apply_index
```



---
## __name__
```python
from test_ticks import __name__
```

Tests for offsets.Tick and subclasses

---
## test_apply_ticks
```python
from test_ticks import test_apply_ticks
```



---
## test_delta_to_tick
```python
from test_ticks import test_delta_to_tick
```



---
## test_tick_add_sub
```python
from test_ticks import test_tick_add_sub
```



---
## test_tick_equality
```python
from test_ticks import test_tick_equality
```



---
## test_Hour
```python
from test_ticks import test_Hour
```



---
## test_Minute
```python
from test_ticks import test_Minute
```



---
## test_Second
```python
from test_ticks import test_Second
```



---
## test_Millisecond
```python
from test_ticks import test_Millisecond
```



---
## test_MillisecondTimestampArithmetic
```python
from test_ticks import test_MillisecondTimestampArithmetic
```



---
## test_Microsecond
```python
from test_ticks import test_Microsecond
```



---
## test_NanosecondGeneric
```python
from test_ticks import test_NanosecondGeneric
```



---
## test_Nanosecond
```python
from test_ticks import test_Nanosecond
```



---
## test_tick_addition
```python
from test_ticks import test_tick_addition
```



---
## test_tick_delta_overflow
```python
from test_ticks import test_tick_delta_overflow
```



---
## test_tick_division
```python
from test_ticks import test_tick_division
```



---
## test_tick_mul_float
```python
from test_ticks import test_tick_mul_float
```



---
## test_tick_rdiv
```python
from test_ticks import test_tick_rdiv
```



---
## test_tick_zero
```python
from test_ticks import test_tick_zero
```



---
## test_tick_equalities
```python
from test_ticks import test_tick_equalities
```



---
## test_tick_offset
```python
from test_ticks import test_tick_offset
```



---
## test_compare_ticks
```python
from test_ticks import test_compare_ticks
```



---
## test_compare_ticks_to_strs
```python
from test_ticks import test_compare_ticks_to_strs
```



---
## test_compare_ticks_to_timedeltalike
```python
from test_ticks import test_compare_ticks_to_timedeltalike
```



---
## __name__
```python
from test_offsets import __name__
```

Tests of pandas.tseries.offsets

---
## _create_offset
```python
from test_offsets import _create_offset
```



---
## month_classes
```python
from test_offsets import month_classes
```

Fixture for month based datetime offsets available for a time series.

---
## offset_types
```python
from test_offsets import offset_types
```

Fixture for all the datetime offsets available for a time series.

---
## dt
```python
from test_offsets import dt
```



---
## expecteds
```python
from test_offsets import expecteds
```



---
## TestCommon
```python
from test_offsets import TestCommon
```



---
## TestDateOffset
```python
from test_offsets import TestDateOffset
```



---
## TestOffsetNames
```python
from test_offsets import TestOffsetNames
```



---
## test_get_offset
```python
from test_offsets import test_get_offset
```



---
## test_get_offset_legacy
```python
from test_offsets import test_get_offset_legacy
```



---
## TestOffsetAliases
```python
from test_offsets import TestOffsetAliases
```



---
## test_freq_offsets
```python
from test_offsets import test_freq_offsets
```



---
## TestReprNames
```python
from test_offsets import TestReprNames
```



---
## test_valid_default_arguments
```python
from test_offsets import test_valid_default_arguments
```



---
## test_valid_month_attributes
```python
from test_offsets import test_valid_month_attributes
```



---
## test_month_offset_name
```python
from test_offsets import test_month_offset_name
```



---
## test_valid_relativedelta_kwargs
```python
from test_offsets import test_valid_relativedelta_kwargs
```



---
## test_valid_tick_attributes
```python
from test_offsets import test_valid_tick_attributes
```



---
## test_validate_n_error
```python
from test_offsets import test_validate_n_error
```



---
## test_require_integers
```python
from test_offsets import test_require_integers
```



---
## test_tick_normalize_raises
```python
from test_offsets import test_tick_normalize_raises
```



---
## test_dateoffset_add_sub
```python
from test_offsets import test_dateoffset_add_sub
```



---
## test_dateoffset_add_sub_timestamp_with_nano
```python
from test_offsets import test_dateoffset_add_sub_timestamp_with_nano
```



---
## test_dateoffset_immutable
```python
from test_offsets import test_dateoffset_immutable
```



---
## test_dateoffset_misc
```python
from test_offsets import test_dateoffset_misc
```



---
## test_construct_int_arg_no_kwargs_assumed_days
```python
from test_offsets import test_construct_int_arg_no_kwargs_assumed_days
```



---
## test_dateoffset_add_sub_timestamp_series_with_nano
```python
from test_offsets import test_dateoffset_add_sub_timestamp_series_with_nano
```



---
## test_offset_multiplication
```python
from test_offsets import test_offset_multiplication
```



---
## test_dateoffset_operations_on_dataframes
```python
from test_offsets import test_dateoffset_operations_on_dataframes
```



---
## test_is_yqm_start_end
```python
from test_offsets import test_is_yqm_start_end
```



---
## test_immutable
```python
from test_offsets import test_immutable
```



---
## test_return_type
```python
from test_offsets import test_return_type
```



---
## test_offset_n
```python
from test_offsets import test_offset_n
```



---
## test_offset_timedelta64_arg
```python
from test_offsets import test_offset_timedelta64_arg
```



---
## test_offset_mul_ndarray
```python
from test_offsets import test_offset_mul_ndarray
```



---
## test_offset_freqstr
```python
from test_offsets import test_offset_freqstr
```



---
## _check_offsetfunc_works
```python
from test_offsets import _check_offsetfunc_works
```



---
## test_apply
```python
from test_offsets import test_apply
```



---
## test_rollforward
```python
from test_offsets import test_rollforward
```



---
## test_rollback
```python
from test_offsets import test_rollback
```



---
## test_is_on_offset
```python
from test_offsets import test_is_on_offset
```



---
## test_add
```python
from test_offsets import test_add
```



---
## test_add_empty_datetimeindex
```python
from test_offsets import test_add_empty_datetimeindex
```



---
## test_pickle_roundtrip
```python
from test_offsets import test_pickle_roundtrip
```



---
## test_pickle_dateoffset_odd_inputs
```python
from test_offsets import test_pickle_dateoffset_odd_inputs
```



---
## test_offsets_hashable
```python
from test_offsets import test_offsets_hashable
```



---
## test_add_dt64_ndarray_non_nano
```python
from test_offsets import test_add_dt64_ndarray_non_nano
```



---
## setup_method
```python
from test_offsets import setup_method
```



---
## test_repr
```python
from test_offsets import test_repr
```



---
## test_mul
```python
from test_offsets import test_mul
```



---
## test_constructor
```python
from test_offsets import test_constructor
```



---
## test_default_constructor
```python
from test_offsets import test_default_constructor
```



---
## test_is_anchored
```python
from test_offsets import test_is_anchored
```



---
## test_copy
```python
from test_offsets import test_copy
```



---
## test_sub
```python
from test_offsets import test_sub
```



---
## test_mul_add
```python
from test_offsets import test_mul_add
```



---
## test_mul_sub
```python
from test_offsets import test_mul_sub
```



---
## test_leap_year
```python
from test_offsets import test_leap_year
```



---
## test_eq
```python
from test_offsets import test_eq
```



---
## test_milliseconds_combination
```python
from test_offsets import test_milliseconds_combination
```



---
## test_offset_invalid_arguments
```python
from test_offsets import test_offset_invalid_arguments
```



---
## test_get_offset_name
```python
from test_offsets import test_get_offset_name
```



---
## test_alias_equality
```python
from test_offsets import test_alias_equality
```



---
## test_rule_code
```python
from test_offsets import test_rule_code
```



---
## test_str_for_named_is_name
```python
from test_offsets import test_str_for_named_is_name
```



---
## __name__
```python
from test_business_year import __name__
```

Tests for the following offsets:
- BYearBegin
- BYearEnd

---
## TestBYearBegin
```python
from test_business_year import TestBYearBegin
```



---
## TestBYearEnd
```python
from test_business_year import TestBYearEnd
```



---
## TestBYearEndLagged
```python
from test_business_year import TestBYearEndLagged
```



---
## test_misspecified
```python
from test_business_year import test_misspecified
```



---
## test_offset
```python
from test_business_year import test_offset
```



---
## test_is_on_offset
```python
from test_business_year import test_is_on_offset
```



---
## test_bad_month_fail
```python
from test_business_year import test_bad_month_fail
```



---
## test_roll
```python
from test_business_year import test_roll
```



---
## __name__
```python
from test_business_month import __name__
```

Tests for the following offsets:
- BMonthBegin
- BMonthEnd

---
## test_apply_index
```python
from test_business_month import test_apply_index
```



---
## TestBMonthBegin
```python
from test_business_month import TestBMonthBegin
```



---
## TestBMonthEnd
```python
from test_business_month import TestBMonthEnd
```



---
## test_offsets_compare_equal
```python
from test_business_month import test_offsets_compare_equal
```



---
## test_offset
```python
from test_business_month import test_offset
```



---
## test_is_on_offset
```python
from test_business_month import test_is_on_offset
```



---
## test_normalize
```python
from test_business_month import test_normalize
```



---
## __name__
```python
from test_week import __name__
```

Tests for the following offsets:
- Week
- WeekOfMonth
- LastWeekOfMonth

---
## TestWeek
```python
from test_week import TestWeek
```



---
## TestWeekOfMonth
```python
from test_week import TestWeekOfMonth
```



---
## TestLastWeekOfMonth
```python
from test_week import TestLastWeekOfMonth
```



---
## test_repr
```python
from test_week import test_repr
```



---
## test_corner
```python
from test_week import test_corner
```



---
## test_is_anchored
```python
from test_week import test_is_anchored
```



---
## test_offset
```python
from test_week import test_offset
```



---
## test_is_on_offset
```python
from test_week import test_is_on_offset
```



---
## test_is_on_offset_weekday_none
```python
from test_week import test_is_on_offset_weekday_none
```



---
## test_week_add_invalid
```python
from test_week import test_week_add_invalid
```



---
## test_constructor
```python
from test_week import test_constructor
```



---
## test_is_on_offset_nanoseconds
```python
from test_week import test_is_on_offset_nanoseconds
```



---
## test_last_week_of_month_on_offset
```python
from test_week import test_last_week_of_month_on_offset
```



---
## __name__
```python
from test_datetimeindex import __name__
```



---
## test_datetimeindex
```python
from test_datetimeindex import test_datetimeindex
```



---
## test_datetimeindex_tz_convert
```python
from test_datetimeindex import test_datetimeindex_tz_convert
```



---
## test_datetimeindex_tz_localize
```python
from test_datetimeindex import test_datetimeindex_tz_localize
```



---
## test_datetimeindex_isocalendar
```python
from test_datetimeindex import test_datetimeindex_isocalendar
```



---
## test_index_values
```python
from test_datetimeindex import test_index_values
```



---
## __name__
```python
from test_timedeltaindex import __name__
```



---
## test_timedeltaindex
```python
from test_timedeltaindex import test_timedeltaindex
```



---
## index_view
```python
from test_index import index_view
```



---
## test_set_index_update_column
```python
from test_index import test_set_index_update_column
```



---
## test_set_index_drop_update_column
```python
from test_index import test_set_index_drop_update_column
```



---
## test_set_index_series
```python
from test_index import test_set_index_series
```



---
## test_assign_index_as_series
```python
from test_index import test_assign_index_as_series
```



---
## test_assign_index_as_index
```python
from test_index import test_assign_index_as_index
```



---
## test_index_from_series
```python
from test_index import test_index_from_series
```



---
## test_index_from_series_copy
```python
from test_index import test_index_from_series_copy
```



---
## test_index_from_index
```python
from test_index import test_index_from_index
```



---
## test_index_ops
```python
from test_index import test_index_ops
```



---
## test_infer_objects
```python
from test_index import test_infer_objects
```



---
## test_index_to_frame
```python
from test_index import test_index_to_frame
```



---
## test_index_values
```python
from test_index import test_index_values
```



---
## __name__
```python
from test_periodindex import __name__
```



---
## test_periodindex
```python
from test_periodindex import test_periodindex
```



---
## __name__
```python
from test_isetitem import __name__
```



---
## TestDataFrameSetItem
```python
from test_isetitem import TestDataFrameSetItem
```



---
## test_isetitem_ea_df
```python
from test_isetitem import test_isetitem_ea_df
```



---
## test_isetitem_ea_df_scalar_indexer
```python
from test_isetitem import test_isetitem_ea_df_scalar_indexer
```



---
## test_isetitem_dimension_mismatch
```python
from test_isetitem import test_isetitem_dimension_mismatch
```



---
## test_data_frame_value_counts_unsorted
```python
from test_value_counts import test_data_frame_value_counts_unsorted
```



---
## test_data_frame_value_counts_ascending
```python
from test_value_counts import test_data_frame_value_counts_ascending
```



---
## test_data_frame_value_counts_default
```python
from test_value_counts import test_data_frame_value_counts_default
```



---
## test_data_frame_value_counts_normalize
```python
from test_value_counts import test_data_frame_value_counts_normalize
```



---
## test_data_frame_value_counts_single_col_default
```python
from test_value_counts import test_data_frame_value_counts_single_col_default
```



---
## test_data_frame_value_counts_empty
```python
from test_value_counts import test_data_frame_value_counts_empty
```



---
## test_data_frame_value_counts_empty_normalize
```python
from test_value_counts import test_data_frame_value_counts_empty_normalize
```



---
## test_data_frame_value_counts_dropna_true
```python
from test_value_counts import test_data_frame_value_counts_dropna_true
```



---
## test_data_frame_value_counts_dropna_false
```python
from test_value_counts import test_data_frame_value_counts_dropna_false
```



---
## test_data_frame_value_counts_subset
```python
from test_value_counts import test_data_frame_value_counts_subset
```



---
## test_value_counts_categorical_future_warning
```python
from test_value_counts import test_value_counts_categorical_future_warning
```



---
## test_value_counts_with_missing_category
```python
from test_value_counts import test_value_counts_with_missing_category
```



---
## test_combine_datetlike_udf
```python
from test_combine import test_combine_datetlike_udf
```



---
## test_combine_generic
```python
from test_combine import test_combine_generic
```



---
## combiner
```python
from test_combine import combiner
```



---
## TestConvertDtypes
```python
from test_convert_dtypes import TestConvertDtypes
```



---
## test_convert_empty
```python
from test_convert_dtypes import test_convert_empty
```



---
## test_convert_dtypes_retain_column_names
```python
from test_convert_dtypes import test_convert_dtypes_retain_column_names
```



---
## test_pyarrow_dtype_backend
```python
from test_convert_dtypes import test_pyarrow_dtype_backend
```



---
## test_pyarrow_dtype_backend_already_pyarrow
```python
from test_convert_dtypes import test_pyarrow_dtype_backend_already_pyarrow
```



---
## test_pyarrow_dtype_backend_from_pandas_nullable
```python
from test_convert_dtypes import test_pyarrow_dtype_backend_from_pandas_nullable
```



---
## test_pyarrow_dtype_empty_object
```python
from test_convert_dtypes import test_pyarrow_dtype_empty_object
```



---
## test_pyarrow_engine_lines_false
```python
from test_convert_dtypes import test_pyarrow_engine_lines_false
```



---
## test_pyarrow_backend_no_conversion
```python
from test_convert_dtypes import test_pyarrow_backend_no_conversion
```



---
## test_convert_dtypes_pyarrow_timestamp
```python
from test_convert_dtypes import test_convert_dtypes_pyarrow_timestamp
```



---
## test_convert_dtypes_avoid_block_splitting
```python
from test_convert_dtypes import test_convert_dtypes_avoid_block_splitting
```



---
## test_convert_dtypes_from_arrow
```python
from test_convert_dtypes import test_convert_dtypes_from_arrow
```



---
## __name__
```python
from test_iterrows import __name__
```



---
## test_no_overflow_of_freq_and_time_in_dataframe
```python
from test_iterrows import test_no_overflow_of_freq_and_time_in_dataframe
```



---
## TestDataFrameCov
```python
from test_cov_corr import TestDataFrameCov
```



---
## TestDataFrameCorr
```python
from test_cov_corr import TestDataFrameCorr
```



---
## TestDataFrameCorrWith
```python
from test_cov_corr import TestDataFrameCorrWith
```



---
## test_cov_nullable_integer
```python
from test_cov_corr import test_cov_nullable_integer
```



---
## test_cov_numeric_only
```python
from test_cov_corr import test_cov_numeric_only
```



---
## test_corr_scipy_method
```python
from test_cov_corr import test_corr_scipy_method
```



---
## test_corr_non_numeric
```python
from test_cov_corr import test_corr_non_numeric
```



---
## test_corr_nooverlap
```python
from test_cov_corr import test_corr_nooverlap
```



---
## test_corr_constant
```python
from test_cov_corr import test_corr_constant
```



---
## test_corr_int_and_boolean
```python
from test_cov_corr import test_corr_int_and_boolean
```



---
## test_corr_cov_independent_index_column
```python
from test_cov_corr import test_corr_cov_independent_index_column
```



---
## test_corr_int
```python
from test_cov_corr import test_corr_int
```



---
## test_corr_nullable_integer
```python
from test_cov_corr import test_corr_nullable_integer
```



---
## test_corr_item_cache
```python
from test_cov_corr import test_corr_item_cache
```



---
## test_corr_for_constant_columns
```python
from test_cov_corr import test_corr_for_constant_columns
```



---
## test_calc_corr_small_numbers
```python
from test_cov_corr import test_calc_corr_small_numbers
```



---
## test_corr_min_periods_greater_than_length
```python
from test_cov_corr import test_corr_min_periods_greater_than_length
```



---
## test_corr_numeric_only
```python
from test_cov_corr import test_corr_numeric_only
```



---
## test_corrwith
```python
from test_cov_corr import test_corrwith
```



---
## test_corrwith_with_objects
```python
from test_cov_corr import test_corrwith_with_objects
```



---
## test_corrwith_series
```python
from test_cov_corr import test_corrwith_series
```



---
## test_corrwith_matches_corrcoef
```python
from test_cov_corr import test_corrwith_matches_corrcoef
```



---
## test_corrwith_mixed_dtypes
```python
from test_cov_corr import test_corrwith_mixed_dtypes
```



---
## test_corrwith_index_intersection
```python
from test_cov_corr import test_corrwith_index_intersection
```



---
## test_corrwith_index_union
```python
from test_cov_corr import test_corrwith_index_union
```



---
## test_corrwith_dup_cols
```python
from test_cov_corr import test_corrwith_dup_cols
```



---
## test_corr_numerical_instabilities
```python
from test_cov_corr import test_corr_numerical_instabilities
```



---
## test_corrwith_spearman
```python
from test_cov_corr import test_corrwith_spearman
```



---
## test_corrwith_kendall
```python
from test_cov_corr import test_corrwith_kendall
```



---
## test_corrwith_spearman_with_tied_data
```python
from test_cov_corr import test_corrwith_spearman_with_tied_data
```



---
## __name__
```python
from test_shift import __name__
```



---
## TestDataFrameShift
```python
from test_shift import TestDataFrameShift
```



---
## test_shift_axis1_with_valid_fill_value_one_array
```python
from test_shift import test_shift_axis1_with_valid_fill_value_one_array
```



---
## test_shift_deprecate_freq_and_fill_value
```python
from test_shift import test_shift_deprecate_freq_and_fill_value
```



---
## test_shift_non_writable_array
```python
from test_shift import test_shift_non_writable_array
```



---
## test_shift_mismatched_freq
```python
from test_shift import test_shift_mismatched_freq
```



---
## test_shift_always_copy
```python
from test_shift import test_shift_always_copy
```



---
## test_shift_object_non_scalar_fill
```python
from test_shift import test_shift_object_non_scalar_fill
```



---
## test_shift_int
```python
from test_shift import test_shift_int
```



---
## test_shift_32bit_take
```python
from test_shift import test_shift_32bit_take
```



---
## test_shift_preserve_freqstr
```python
from test_shift import test_shift_preserve_freqstr
```



---
## test_shift_dst
```python
from test_shift import test_shift_dst
```



---
## test_shift_dst_beyond
```python
from test_shift import test_shift_dst_beyond
```



---
## test_shift_by_zero
```python
from test_shift import test_shift_by_zero
```



---
## test_shift
```python
from test_shift import test_shift
```



---
## test_shift_by_offset
```python
from test_shift import test_shift_by_offset
```



---
## test_shift_with_periodindex
```python
from test_shift import test_shift_with_periodindex
```



---
## test_shift_other_axis
```python
from test_shift import test_shift_other_axis
```



---
## test_shift_named_axis
```python
from test_shift import test_shift_named_axis
```



---
## test_shift_other_axis_with_freq
```python
from test_shift import test_shift_other_axis_with_freq
```



---
## test_shift_bool
```python
from test_shift import test_shift_bool
```



---
## test_shift_categorical1
```python
from test_shift import test_shift_categorical1
```



---
## test_shift_categorical
```python
from test_shift import test_shift_categorical
```



---
## test_shift_categorical_fill_value
```python
from test_shift import test_shift_categorical_fill_value
```



---
## test_shift_fill_value
```python
from test_shift import test_shift_fill_value
```



---
## test_shift_empty
```python
from test_shift import test_shift_empty
```



---
## test_shift_duplicate_columns
```python
from test_shift import test_shift_duplicate_columns
```



---
## test_shift_axis1_multiple_blocks
```python
from test_shift import test_shift_axis1_multiple_blocks
```



---
## test_shift_axis1_multiple_blocks_with_int_fill
```python
from test_shift import test_shift_axis1_multiple_blocks_with_int_fill
```



---
## test_period_index_frame_shift_with_freq
```python
from test_shift import test_period_index_frame_shift_with_freq
```



---
## test_datetime_frame_shift_with_freq
```python
from test_shift import test_datetime_frame_shift_with_freq
```



---
## test_period_index_frame_shift_with_freq_error
```python
from test_shift import test_period_index_frame_shift_with_freq_error
```



---
## test_datetime_frame_shift_with_freq_error
```python
from test_shift import test_datetime_frame_shift_with_freq_error
```



---
## test_shift_dt64values_int_fill_deprecated
```python
from test_shift import test_shift_dt64values_int_fill_deprecated
```



---
## test_shift_dt64values_axis1_invalid_fill
```python
from test_shift import test_shift_dt64values_axis1_invalid_fill
```



---
## test_shift_axis1_categorical_columns
```python
from test_shift import test_shift_axis1_categorical_columns
```



---
## test_shift_axis1_many_periods
```python
from test_shift import test_shift_axis1_many_periods
```



---
## test_shift_with_offsets_freq
```python
from test_shift import test_shift_with_offsets_freq
```



---
## test_shift_with_iterable_basic_functionality
```python
from test_shift import test_shift_with_iterable_basic_functionality
```



---
## test_shift_with_iterable_series
```python
from test_shift import test_shift_with_iterable_series
```



---
## test_shift_with_iterable_freq_and_fill_value
```python
from test_shift import test_shift_with_iterable_freq_and_fill_value
```



---
## test_shift_with_iterable_check_other_arguments
```python
from test_shift import test_shift_with_iterable_check_other_arguments
```



---
## test_shift_axis_one_empty
```python
from test_shift import test_shift_axis_one_empty
```



---
## get_cat_values
```python
from test_shift import get_cat_values
```



---
## TestDataFrameRound
```python
from test_round import TestDataFrameRound
```



---
## test_round_mixed_type
```python
from test_round import test_round_mixed_type
```



---
## test_round_with_duplicate_columns
```python
from test_round import test_round_with_duplicate_columns
```



---
## test_round_nonunique_categorical
```python
from test_round import test_round_nonunique_categorical
```



---
## test_round_interval_category_columns
```python
from test_round import test_round_interval_category_columns
```



---
## test_round_empty_not_input
```python
from test_round import test_round_empty_not_input
```



---
## TestDataFrameCombineFirst
```python
from test_combine_first import TestDataFrameCombineFirst
```



---
## test_combine_first_timestamp_bug
```python
from test_combine_first import test_combine_first_timestamp_bug
```



---
## test_combine_first_timestamp_bug_NaT
```python
from test_combine_first import test_combine_first_timestamp_bug_NaT
```



---
## test_combine_first_with_nan_multiindex
```python
from test_combine_first import test_combine_first_with_nan_multiindex
```



---
## test_combine_preserve_dtypes
```python
from test_combine_first import test_combine_preserve_dtypes
```



---
## test_combine_first_duplicates_rows_for_nan_index_values
```python
from test_combine_first import test_combine_first_duplicates_rows_for_nan_index_values
```



---
## test_combine_first_int64_not_cast_to_float64
```python
from test_combine_first import test_combine_first_int64_not_cast_to_float64
```



---
## test_midx_losing_dtype
```python
from test_combine_first import test_midx_losing_dtype
```



---
## test_combine_first_empty_columns
```python
from test_combine_first import test_combine_first_empty_columns
```



---
## test_combine_first_mixed
```python
from test_combine_first import test_combine_first_mixed
```



---
## test_combine_first_mixed_bug
```python
from test_combine_first import test_combine_first_mixed_bug
```



---
## test_combine_first_same_as_in_update
```python
from test_combine_first import test_combine_first_same_as_in_update
```



---
## test_combine_first_doc_example
```python
from test_combine_first import test_combine_first_doc_example
```



---
## test_combine_first_return_obj_type_with_bools
```python
from test_combine_first import test_combine_first_return_obj_type_with_bools
```



---
## test_combine_first_convert_datatime_correctly
```python
from test_combine_first import test_combine_first_convert_datatime_correctly
```



---
## test_combine_first_align_nan
```python
from test_combine_first import test_combine_first_align_nan
```



---
## test_combine_first_timezone
```python
from test_combine_first import test_combine_first_timezone
```



---
## test_combine_first_timezone2
```python
from test_combine_first import test_combine_first_timezone2
```



---
## test_combine_first_timezone3
```python
from test_combine_first import test_combine_first_timezone3
```



---
## test_combine_first_timezone4
```python
from test_combine_first import test_combine_first_timezone4
```



---
## test_combine_first_timezone5
```python
from test_combine_first import test_combine_first_timezone5
```



---
## test_combine_first_timedelta
```python
from test_combine_first import test_combine_first_timedelta
```



---
## test_combine_first_period
```python
from test_combine_first import test_combine_first_period
```



---
## test_combine_first_int
```python
from test_combine_first import test_combine_first_int
```



---
## test_combine_first_with_asymmetric_other
```python
from test_combine_first import test_combine_first_with_asymmetric_other
```



---
## test_combine_first_string_dtype_only_na
```python
from test_combine_first import test_combine_first_string_dtype_only_na
```



---
## test_infer_objects
```python
from test_infer_objects import test_infer_objects
```



---
## __name__
```python
from test_assign import __name__
```



---
## TestAssign
```python
from test_assign import TestAssign
```



---
## test_assign
```python
from test_assign import test_assign
```



---
## test_assign_multiple
```python
from test_assign import test_assign_multiple
```



---
## test_assign_order
```python
from test_assign import test_assign_order
```



---
## test_assign_bad
```python
from test_assign import test_assign_bad
```



---
## test_assign_dependent
```python
from test_assign import test_assign_dependent
```



---
## __name__
```python
from test_to_records import __name__
```



---
## TestDataFrameToRecords
```python
from test_to_records import TestDataFrameToRecords
```



---
## test_to_records_timeseries
```python
from test_to_records import test_to_records_timeseries
```



---
## test_to_records_dt64
```python
from test_to_records import test_to_records_dt64
```



---
## test_to_records_dt64tz_column
```python
from test_to_records import test_to_records_dt64tz_column
```



---
## test_to_records_with_multindex
```python
from test_to_records import test_to_records_with_multindex
```



---
## test_to_records_with_Mapping_type
```python
from test_to_records import test_to_records_with_Mapping_type
```



---
## test_to_records_floats
```python
from test_to_records import test_to_records_floats
```



---
## test_to_records_index_name
```python
from test_to_records import test_to_records_index_name
```



---
## test_to_records_with_unicode_index
```python
from test_to_records import test_to_records_with_unicode_index
```



---
## test_to_records_index_dtype
```python
from test_to_records import test_to_records_index_dtype
```



---
## test_to_records_with_unicode_column_names
```python
from test_to_records import test_to_records_with_unicode_column_names
```



---
## test_to_records_with_categorical
```python
from test_to_records import test_to_records_with_categorical
```



---
## test_to_records_dtype
```python
from test_to_records import test_to_records_dtype
```



---
## test_to_records_dtype_mi
```python
from test_to_records import test_to_records_dtype_mi
```



---
## test_to_records_dict_like
```python
from test_to_records import test_to_records_dict_like
```



---
## test_to_records_datetimeindex_with_tz
```python
from test_to_records import test_to_records_datetimeindex_with_tz
```



---
## DictLike
```python
from test_to_records import DictLike
```



---
## __init__
```python
from test_to_records import __init__
```



---
## __getitem__
```python
from test_to_records import __getitem__
```



---
## __contains__
```python
from test_to_records import __contains__
```



---
## keys
```python
from test_to_records import keys
```



---
## TestDataFrameSortValues
```python
from test_sort_values import TestDataFrameSortValues
```



---
## TestDataFrameSortKey
```python
from test_sort_values import TestDataFrameSortKey
```



---
## df_none
```python
from test_sort_values import df_none
```



---
## df_idx
```python
from test_sort_values import df_idx
```



---
## sort_names
```python
from test_sort_values import sort_names
```



---
## ascending
```python
from test_sort_values import ascending
```



---
## TestSortValuesLevelAsStr
```python
from test_sort_values import TestSortValuesLevelAsStr
```



---
## test_sort_values_sparse_no_warning
```python
from test_sort_values import test_sort_values_sparse_no_warning
```



---
## test_sort_values_by_empty_list
```python
from test_sort_values import test_sort_values_by_empty_list
```



---
## test_sort_values_inplace
```python
from test_sort_values import test_sort_values_inplace
```



---
## test_sort_values_multicolumn
```python
from test_sort_values import test_sort_values_multicolumn
```



---
## test_sort_values_multicolumn_uint64
```python
from test_sort_values import test_sort_values_multicolumn_uint64
```



---
## test_sort_values_nan
```python
from test_sort_values import test_sort_values_nan
```



---
## test_sort_values_stable_descending_sort
```python
from test_sort_values import test_sort_values_stable_descending_sort
```



---
## test_sort_values_stable_multicolumn_sort
```python
from test_sort_values import test_sort_values_stable_multicolumn_sort
```



---
## test_sort_values_stable_categorial
```python
from test_sort_values import test_sort_values_stable_categorial
```



---
## test_sort_values_datetimes
```python
from test_sort_values import test_sort_values_datetimes
```



---
## test_sort_values_frame_column_inplace_sort_exception
```python
from test_sort_values import test_sort_values_frame_column_inplace_sort_exception
```



---
## test_sort_values_nat_values_in_int_column
```python
from test_sort_values import test_sort_values_nat_values_in_int_column
```



---
## test_sort_nat
```python
from test_sort_values import test_sort_nat
```



---
## test_sort_values_na_position_with_categories
```python
from test_sort_values import test_sort_values_na_position_with_categories
```



---
## test_sort_values_nat
```python
from test_sort_values import test_sort_values_nat
```



---
## test_sort_values_na_position_with_categories_raises
```python
from test_sort_values import test_sort_values_na_position_with_categories_raises
```



---
## test_sort_values_nat_na_position_default
```python
from test_sort_values import test_sort_values_nat_na_position_default
```



---
## test_sort_values_item_cache
```python
from test_sort_values import test_sort_values_item_cache
```



---
## test_sort_values_reshaping
```python
from test_sort_values import test_sort_values_reshaping
```



---
## test_sort_values_no_by_inplace
```python
from test_sort_values import test_sort_values_no_by_inplace
```



---
## test_sort_values_no_op_reset_index
```python
from test_sort_values import test_sort_values_no_op_reset_index
```



---
## test_sort_values_inplace_key
```python
from test_sort_values import test_sort_values_inplace_key
```



---
## test_sort_values_by_key
```python
from test_sort_values import test_sort_values_by_key
```



---
## test_sort_values_by_key_by_name
```python
from test_sort_values import test_sort_values_by_key_by_name
```



---
## test_sort_values_key_string
```python
from test_sort_values import test_sort_values_key_string
```



---
## test_sort_values_key_empty
```python
from test_sort_values import test_sort_values_key_empty
```



---
## test_changes_length_raises
```python
from test_sort_values import test_changes_length_raises
```



---
## test_sort_values_key_axes
```python
from test_sort_values import test_sort_values_key_axes
```



---
## test_sort_values_key_dict_axis
```python
from test_sort_values import test_sort_values_key_dict_axis
```



---
## test_sort_values_key_casts_to_categorical
```python
from test_sort_values import test_sort_values_key_casts_to_categorical
```



---
## test_sort_index_level_and_column_label
```python
from test_sort_values import test_sort_index_level_and_column_label
```



---
## test_sort_column_level_and_index_label
```python
from test_sort_values import test_sort_column_level_and_index_label
```



---
## key
```python
from test_sort_values import key
```



---
## sorter
```python
from test_sort_values import sorter
```



---
## TestTranspose
```python
from test_transpose import TestTranspose
```



---
## test_transpose_td64_intervals
```python
from test_transpose import test_transpose_td64_intervals
```



---
## test_transpose_empty_preserves_datetimeindex
```python
from test_transpose import test_transpose_empty_preserves_datetimeindex
```



---
## test_transpose_tzaware_1col_single_tz
```python
from test_transpose import test_transpose_tzaware_1col_single_tz
```



---
## test_transpose_tzaware_2col_single_tz
```python
from test_transpose import test_transpose_tzaware_2col_single_tz
```



---
## test_transpose_tzaware_2col_mixed_tz
```python
from test_transpose import test_transpose_tzaware_2col_mixed_tz
```



---
## test_transpose_preserves_dtindex_equality_with_dst
```python
from test_transpose import test_transpose_preserves_dtindex_equality_with_dst
```



---
## test_transpose_object_to_tzaware_mixed_tz
```python
from test_transpose import test_transpose_object_to_tzaware_mixed_tz
```



---
## test_transpose_uint64
```python
from test_transpose import test_transpose_uint64
```



---
## test_transpose_float
```python
from test_transpose import test_transpose_float
```



---
## test_transpose_mixed
```python
from test_transpose import test_transpose_mixed
```



---
## test_transpose_get_view
```python
from test_transpose import test_transpose_get_view
```



---
## test_transpose_get_view_dt64tzget_view
```python
from test_transpose import test_transpose_get_view_dt64tzget_view
```



---
## test_transpose_not_inferring_dt
```python
from test_transpose import test_transpose_not_inferring_dt
```



---
## test_transpose_not_inferring_dt_mixed_blocks
```python
from test_transpose import test_transpose_not_inferring_dt_mixed_blocks
```



---
## __name__
```python
from test_sample import __name__
```



---
## TestSample
```python
from test_sample import TestSample
```



---
## TestSampleDataFrame
```python
from test_sample import TestSampleDataFrame
```



---
## obj
```python
from test_sample import obj
```



---
## test_sample
```python
from test_sample import test_sample
```



---
## test_sample_lengths
```python
from test_sample import test_sample_lengths
```



---
## test_sample_invalid_random_state
```python
from test_sample import test_sample_invalid_random_state
```



---
## test_sample_wont_accept_n_and_frac
```python
from test_sample import test_sample_wont_accept_n_and_frac
```



---
## test_sample_requires_positive_n_frac
```python
from test_sample import test_sample_requires_positive_n_frac
```



---
## test_sample_requires_integer_n
```python
from test_sample import test_sample_requires_integer_n
```



---
## test_sample_invalid_weight_lengths
```python
from test_sample import test_sample_invalid_weight_lengths
```



---
## test_sample_negative_weights
```python
from test_sample import test_sample_negative_weights
```



---
## test_sample_inf_weights
```python
from test_sample import test_sample_inf_weights
```



---
## test_sample_zero_weights
```python
from test_sample import test_sample_zero_weights
```



---
## test_sample_missing_weights
```python
from test_sample import test_sample_missing_weights
```



---
## test_sample_none_weights
```python
from test_sample import test_sample_none_weights
```



---
## test_sample_random_state
```python
from test_sample import test_sample_random_state
```



---
## test_sample_generator
```python
from test_sample import test_sample_generator
```



---
## test_sample_upsampling_without_replacement
```python
from test_sample import test_sample_upsampling_without_replacement
```



---
## test_sample_axis1
```python
from test_sample import test_sample_axis1
```



---
## test_sample_aligns_weights_with_frame
```python
from test_sample import test_sample_aligns_weights_with_frame
```



---
## test_sample_is_copy
```python
from test_sample import test_sample_is_copy
```



---
## test_sample_does_not_modify_weights
```python
from test_sample import test_sample_does_not_modify_weights
```



---
## test_sample_ignore_index
```python
from test_sample import test_sample_ignore_index
```



---
## __name__
```python
from test_filter import __name__
```



---
## TestDataFrameFilter
```python
from test_filter import TestDataFrameFilter
```



---
## test_filter
```python
from test_filter import test_filter
```



---
## test_filter_regex_search
```python
from test_filter import test_filter_regex_search
```



---
## test_filter_unicode
```python
from test_filter import test_filter_unicode
```



---
## test_filter_bytestring
```python
from test_filter import test_filter_bytestring
```



---
## test_filter_corner
```python
from test_filter import test_filter_corner
```



---
## test_filter_regex_non_string
```python
from test_filter import test_filter_regex_non_string
```



---
## test_filter_keep_order
```python
from test_filter import test_filter_keep_order
```



---
## test_filter_different_dtype
```python
from test_filter import test_filter_different_dtype
```



---
## multiindex_df
```python
from test_reset_index import multiindex_df
```



---
## test_reset_index_dtypes_on_empty_frame_with_multiindex
```python
from test_reset_index import test_reset_index_dtypes_on_empty_frame_with_multiindex
```



---
## test_reset_index_empty_frame_with_datetime64_multiindex
```python
from test_reset_index import test_reset_index_empty_frame_with_datetime64_multiindex
```



---
## test_reset_index_empty_frame_with_datetime64_multiindex_from_groupby
```python
from test_reset_index import test_reset_index_empty_frame_with_datetime64_multiindex_from_groupby
```



---
## test_reset_index_multiindex_nat
```python
from test_reset_index import test_reset_index_multiindex_nat
```



---
## test_reset_index_interval_columns_object_cast
```python
from test_reset_index import test_reset_index_interval_columns_object_cast
```



---
## test_reset_index_rename
```python
from test_reset_index import test_reset_index_rename
```



---
## test_reset_index_rename_multiindex
```python
from test_reset_index import test_reset_index_rename_multiindex
```



---
## test_errorreset_index_rename
```python
from test_reset_index import test_errorreset_index_rename
```



---
## test_reset_index_false_index_name
```python
from test_reset_index import test_reset_index_false_index_name
```



---
## test_reset_index_empty_rangeindex
```python
from test_reset_index import test_reset_index_empty_rangeindex
```



---
## test_set_reset
```python
from test_reset_index import test_set_reset
```



---
## test_set_index_reset_index_dt64tz
```python
from test_reset_index import test_set_index_reset_index_dt64tz
```



---
## test_reset_index_tz
```python
from test_reset_index import test_reset_index_tz
```



---
## test_frame_reset_index_tzaware_index
```python
from test_reset_index import test_frame_reset_index_tzaware_index
```



---
## test_reset_index_with_intervals
```python
from test_reset_index import test_reset_index_with_intervals
```



---
## test_reset_index_level_missing
```python
from test_reset_index import test_reset_index_level_missing
```



---
## test_reset_index_right_dtype
```python
from test_reset_index import test_reset_index_right_dtype
```



---
## test_reset_index_multiindex_col
```python
from test_reset_index import test_reset_index_multiindex_col
```



---
## test_reset_index_multiindex_nan
```python
from test_reset_index import test_reset_index_multiindex_nan
```



---
## test_reset_index_with_datetimeindex_cols
```python
from test_reset_index import test_reset_index_with_datetimeindex_cols
```



---
## test_reset_index_multiindex_columns
```python
from test_reset_index import test_reset_index_multiindex_columns
```



---
## test_reset_index_duplicate_columns_allow
```python
from test_reset_index import test_reset_index_duplicate_columns_allow
```



---
## test_reset_index_duplicate_columns_default
```python
from test_reset_index import test_reset_index_duplicate_columns_default
```



---
## test_reset_index_allow_duplicates_check
```python
from test_reset_index import test_reset_index_allow_duplicates_check
```



---
## test_reset_index_datetime
```python
from test_reset_index import test_reset_index_datetime
```



---
## test_reset_index_datetime2
```python
from test_reset_index import test_reset_index_datetime2
```



---
## test_reset_index_datetime3
```python
from test_reset_index import test_reset_index_datetime3
```



---
## test_reset_index_period
```python
from test_reset_index import test_reset_index_period
```



---
## test_reset_index_delevel_infer_dtype
```python
from test_reset_index import test_reset_index_delevel_infer_dtype
```



---
## test_reset_index_nat_multiindex
```python
from test_reset_index import test_reset_index_nat_multiindex
```



---
## test_rest_index_multiindex_categorical_with_missing_values
```python
from test_reset_index import test_rest_index_multiindex_categorical_with_missing_values
```



---
## TestDataFrameDescribe
```python
from test_describe import TestDataFrameDescribe
```



---
## test_describe_bool_in_mixed_frame
```python
from test_describe import test_describe_bool_in_mixed_frame
```



---
## test_describe_bool_frame
```python
from test_describe import test_describe_bool_frame
```



---
## test_describe_categorical
```python
from test_describe import test_describe_categorical
```



---
## test_describe_empty_categorical_column
```python
from test_describe import test_describe_empty_categorical_column
```



---
## test_describe_categorical_columns
```python
from test_describe import test_describe_categorical_columns
```



---
## test_describe_datetime_columns
```python
from test_describe import test_describe_datetime_columns
```



---
## test_describe_timedelta_values
```python
from test_describe import test_describe_timedelta_values
```



---
## test_describe_tz_values
```python
from test_describe import test_describe_tz_values
```



---
## test_describe_tz_values2
```python
from test_describe import test_describe_tz_values2
```



---
## test_describe_percentiles_integer_idx
```python
from test_describe import test_describe_percentiles_integer_idx
```



---
## test_describe_does_not_raise_error_for_dictlike_elements
```python
from test_describe import test_describe_does_not_raise_error_for_dictlike_elements
```



---
## test_describe_when_include_all_exclude_not_allowed
```python
from test_describe import test_describe_when_include_all_exclude_not_allowed
```

When include is 'all', then setting exclude != None is not allowed.

---
## test_describe_with_duplicate_columns
```python
from test_describe import test_describe_with_duplicate_columns
```



---
## test_ea_with_na
```python
from test_describe import test_ea_with_na
```



---
## test_describe_exclude_pa_dtype
```python
from test_describe import test_describe_exclude_pa_dtype
```



---
## test_size
```python
from test_size import test_size
```



---
## __name__
```python
from test_to_period import __name__
```



---
## TestToPeriod
```python
from test_to_period import TestToPeriod
```



---
## test_to_period
```python
from test_to_period import test_to_period
```



---
## test_to_period_without_freq
```python
from test_to_period import test_to_period_without_freq
```



---
## test_to_period_columns
```python
from test_to_period import test_to_period_columns
```



---
## test_to_period_invalid_axis
```python
from test_to_period import test_to_period_invalid_axis
```



---
## test_to_period_raises
```python
from test_to_period import test_to_period_raises
```



---
## frame_with_period_index
```python
from test_join import frame_with_period_index
```



---
## left
```python
from test_join import left
```



---
## right
```python
from test_join import right
```



---
## left_no_dup
```python
from test_join import left_no_dup
```



---
## right_no_dup
```python
from test_join import right_no_dup
```



---
## left_w_dups
```python
from test_join import left_w_dups
```



---
## right_w_dups
```python
from test_join import right_w_dups
```



---
## test_join
```python
from test_join import test_join
```



---
## test_suffix_on_list_join
```python
from test_join import test_suffix_on_list_join
```



---
## test_join_invalid_validate
```python
from test_join import test_join_invalid_validate
```



---
## test_join_on_single_col_dup_on_right
```python
from test_join import test_join_on_single_col_dup_on_right
```



---
## test_join_on_single_col_dup_on_left
```python
from test_join import test_join_on_single_col_dup_on_left
```



---
## test_join_on_single_col_dup_on_both
```python
from test_join import test_join_on_single_col_dup_on_both
```



---
## test_join_on_multi_col_check_dup
```python
from test_join import test_join_on_multi_col_check_dup
```



---
## test_join_index
```python
from test_join import test_join_index
```



---
## test_join_index_more
```python
from test_join import test_join_index_more
```



---
## test_join_index_series
```python
from test_join import test_join_index_series
```



---
## test_join_overlap
```python
from test_join import test_join_overlap
```



---
## test_join_period_index
```python
from test_join import test_join_period_index
```



---
## test_join_left_sequence_non_unique_index
```python
from test_join import test_join_left_sequence_non_unique_index
```



---
## test_join_list_series
```python
from test_join import test_join_list_series
```



---
## test_suppress_future_warning_with_sort_kw
```python
from test_join import test_suppress_future_warning_with_sort_kw
```



---
## TestDataFrameJoin
```python
from test_join import TestDataFrameJoin
```



---
## test_join_segfault
```python
from test_join import test_join_segfault
```



---
## test_join_str_datetime
```python
from test_join import test_join_str_datetime
```



---
## test_join_multiindex_leftright
```python
from test_join import test_join_multiindex_leftright
```



---
## test_join_multiindex_dates
```python
from test_join import test_join_multiindex_dates
```



---
## test_merge_join_different_levels_raises
```python
from test_join import test_merge_join_different_levels_raises
```



---
## test_frame_join_tzaware
```python
from test_join import test_frame_join_tzaware
```



---
## __name__
```python
from test_first_and_last import __name__
```

Note: includes tests for `last`

---
## TestFirst
```python
from test_first_and_last import TestFirst
```



---
## test_first_subset
```python
from test_first_and_last import test_first_subset
```



---
## test_first_last_raises
```python
from test_first_and_last import test_first_last_raises
```



---
## test_last_subset
```python
from test_first_and_last import test_last_subset
```



---
## test_first_with_first_day_last_of_month
```python
from test_first_and_last import test_first_with_first_day_last_of_month
```



---
## test_first_with_first_day_end_of_frq_n_greater_one
```python
from test_first_and_last import test_first_with_first_day_end_of_frq_n_greater_one
```



---
## test_empty_not_input
```python
from test_first_and_last import test_empty_not_input
```



---
## __name__
```python
from test_is_homogeneous_dtype import __name__
```



---
## test_is_homogeneous_type
```python
from test_is_homogeneous_dtype import test_is_homogeneous_type
```



---
## TestDataFrameReindexLike
```python
from test_reindex_like import TestDataFrameReindexLike
```



---
## test_reindex_like_methods
```python
from test_reindex_like import test_reindex_like_methods
```



---
## test_reindex_like_subclass
```python
from test_reindex_like import test_reindex_like_subclass
```



---
## MyDataFrame
```python
from test_reindex_like import MyDataFrame
```



---
## test_copy_cache
```python
from test_copy import test_copy_cache
```



---
## test_copy_consolidates
```python
from test_copy import test_copy_consolidates
```



---
## __name__
```python
from test_swaplevel import __name__
```



---
## TestSwaplevel
```python
from test_swaplevel import TestSwaplevel
```



---
## test_swaplevel
```python
from test_swaplevel import test_swaplevel
```



---
## TestDataFrameTruncate
```python
from test_truncate import TestDataFrameTruncate
```



---
## test_truncate
```python
from test_truncate import test_truncate
```



---
## test_truncate_nonsortedindex
```python
from test_truncate import test_truncate_nonsortedindex
```



---
## test_sort_values_nonsortedindex
```python
from test_truncate import test_sort_values_nonsortedindex
```



---
## test_truncate_nonsortedindex_axis1
```python
from test_truncate import test_truncate_nonsortedindex_axis1
```



---
## test_truncate_decreasing_index
```python
from test_truncate import test_truncate_decreasing_index
```



---
## test_truncate_multiindex
```python
from test_truncate import test_truncate_multiindex
```



---
## test_drop_duplicates_with_misspelled_column_name
```python
from test_drop_duplicates import test_drop_duplicates_with_misspelled_column_name
```



---
## test_drop_duplicates_with_duplicate_column_names
```python
from test_drop_duplicates import test_drop_duplicates_with_duplicate_column_names
```



---
## test_drop_duplicates_for_take_all
```python
from test_drop_duplicates import test_drop_duplicates_for_take_all
```



---
## test_drop_duplicates_tuple
```python
from test_drop_duplicates import test_drop_duplicates_tuple
```



---
## test_drop_duplicates_empty
```python
from test_drop_duplicates import test_drop_duplicates_empty
```



---
## test_drop_duplicates_NA
```python
from test_drop_duplicates import test_drop_duplicates_NA
```



---
## test_drop_duplicates_NA_for_take_all
```python
from test_drop_duplicates import test_drop_duplicates_NA_for_take_all
```



---
## test_drop_duplicates_inplace
```python
from test_drop_duplicates import test_drop_duplicates_inplace
```



---
## test_drop_duplicates_null_in_object_column
```python
from test_drop_duplicates import test_drop_duplicates_null_in_object_column
```



---
## test_drop_duplicates_series_vs_dataframe
```python
from test_drop_duplicates import test_drop_duplicates_series_vs_dataframe
```



---
## test_drop_duplicates_non_boolean_ignore_index
```python
from test_drop_duplicates import test_drop_duplicates_non_boolean_ignore_index
```



---
## __name__
```python
from test_between_time import __name__
```



---
## TestBetweenTime
```python
from test_between_time import TestBetweenTime
```



---
## test_between_time_formats
```python
from test_between_time import test_between_time_formats
```



---
## test_localized_between_time
```python
from test_between_time import test_localized_between_time
```



---
## test_between_time_types
```python
from test_between_time import test_between_time_types
```



---
## test_between_time
```python
from test_between_time import test_between_time
```



---
## test_between_time_raises
```python
from test_between_time import test_between_time_raises
```



---
## test_between_time_axis
```python
from test_between_time import test_between_time_axis
```



---
## test_between_time_axis_aliases
```python
from test_between_time import test_between_time_axis_aliases
```



---
## test_between_time_axis_raises
```python
from test_between_time import test_between_time_axis_raises
```



---
## test_between_time_datetimeindex
```python
from test_between_time import test_between_time_datetimeindex
```



---
## test_between_time_incorrect_arg_inclusive
```python
from test_between_time import test_between_time_incorrect_arg_inclusive
```



---
## test_head_tail_generic
```python
from test_head_tail import test_head_tail_generic
```



---
## test_head_tail_empty
```python
from test_head_tail import test_head_tail_empty
```



---
## __name__
```python
from test_to_timestamp import __name__
```



---
## _get_with_delta
```python
from test_to_timestamp import _get_with_delta
```



---
## TestToTimestamp
```python
from test_to_timestamp import TestToTimestamp
```



---
## test_to_timestamp
```python
from test_to_timestamp import test_to_timestamp
```



---
## test_to_timestamp_columns
```python
from test_to_timestamp import test_to_timestamp_columns
```



---
## test_to_timestamp_invalid_axis
```python
from test_to_timestamp import test_to_timestamp_invalid_axis
```



---
## test_to_timestamp_hourly
```python
from test_to_timestamp import test_to_timestamp_hourly
```



---
## test_to_timestamp_raises
```python
from test_to_timestamp import test_to_timestamp_raises
```



---
## __name__
```python
from test_reorder_levels import __name__
```



---
## TestReorderLevels
```python
from test_reorder_levels import TestReorderLevels
```



---
## test_reorder_levels
```python
from test_reorder_levels import test_reorder_levels
```



---
## test_reorder_levels_swaplevel_equivalence
```python
from test_reorder_levels import test_reorder_levels_swaplevel_equivalence
```



---
## TestDataFrameCount
```python
from test_count import TestDataFrameCount
```



---
## test_count_objects
```python
from test_count import test_count_objects
```



---
## interp_method
```python
from test_quantile import interp_method
```

(interpolation, method) arguments for quantile

---
## TestDataFrameQuantile
```python
from test_quantile import TestDataFrameQuantile
```



---
## TestQuantileExtensionDtype
```python
from test_quantile import TestQuantileExtensionDtype
```



---
## test_empty
```python
from test_quantile import test_empty
```



---
## test_non_numeric_exclusion
```python
from test_quantile import test_non_numeric_exclusion
```



---
## test_axis
```python
from test_quantile import test_axis
```



---
## test_axis_numeric_only_true
```python
from test_quantile import test_axis_numeric_only_true
```



---
## test_quantile_date_range
```python
from test_quantile import test_quantile_date_range
```



---
## test_quantile_axis_mixed
```python
from test_quantile import test_quantile_axis_mixed
```



---
## test_quantile_axis_parameter
```python
from test_quantile import test_quantile_axis_parameter
```



---
## test_quantile_interpolation_datetime
```python
from test_quantile import test_quantile_interpolation_datetime
```



---
## test_quantile_interpolation_int
```python
from test_quantile import test_quantile_interpolation_int
```



---
## test_quantile_multi_axis_1
```python
from test_quantile import test_quantile_multi_axis_1
```



---
## test_quantile_multi_empty
```python
from test_quantile import test_quantile_multi_empty
```



---
## test_quantile_datetime
```python
from test_quantile import test_quantile_datetime
```



---
## test_quantile_dt64_empty
```python
from test_quantile import test_quantile_dt64_empty
```



---
## test_quantile_invalid
```python
from test_quantile import test_quantile_invalid
```



---
## test_quantile_box_nat
```python
from test_quantile import test_quantile_box_nat
```



---
## test_quantile_empty_no_rows_floats
```python
from test_quantile import test_quantile_empty_no_rows_floats
```



---
## test_quantile_empty_no_rows_ints
```python
from test_quantile import test_quantile_empty_no_rows_ints
```



---
## test_quantile_empty_no_rows_dt64
```python
from test_quantile import test_quantile_empty_no_rows_dt64
```



---
## test_quantile_empty_no_columns
```python
from test_quantile import test_quantile_empty_no_columns
```



---
## test_quantile_item_cache
```python
from test_quantile import test_quantile_item_cache
```



---
## test_invalid_method
```python
from test_quantile import test_invalid_method
```



---
## test_table_invalid_interpolation
```python
from test_quantile import test_table_invalid_interpolation
```



---
## index
```python
from test_quantile import index
```



---
## obj
```python
from test_quantile import obj
```



---
## compute_quantile
```python
from test_quantile import compute_quantile
```



---
## test_quantile_ea
```python
from test_quantile import test_quantile_ea
```



---
## test_quantile_ea_with_na
```python
from test_quantile import test_quantile_ea_with_na
```



---
## test_quantile_ea_all_na
```python
from test_quantile import test_quantile_ea_all_na
```



---
## test_quantile_ea_scalar
```python
from test_quantile import test_quantile_ea_scalar
```



---
## test_empty_numeric
```python
from test_quantile import test_empty_numeric
```



---
## test_empty_datelike
```python
from test_quantile import test_empty_datelike
```



---
## test_datelike_numeric_only
```python
from test_quantile import test_datelike_numeric_only
```



---
## TestEquals
```python
from test_equals import TestEquals
```



---
## test_dataframe_not_equal
```python
from test_equals import test_dataframe_not_equal
```



---
## test_equals_different_blocks
```python
from test_equals import test_equals_different_blocks
```



---
## df_duplicates
```python
from test_nlargest import df_duplicates
```



---
## df_strings
```python
from test_nlargest import df_strings
```



---
## df_main_dtypes
```python
from test_nlargest import df_main_dtypes
```



---
## TestNLargestNSmallest
```python
from test_nlargest import TestNLargestNSmallest
```



---
## test_nlargest_all_dtypes
```python
from test_nlargest import test_nlargest_all_dtypes
```



---
## test_nlargest_duplicates_on_starter_columns
```python
from test_nlargest import test_nlargest_duplicates_on_starter_columns
```



---
## test_nlargest_n_identical_values
```python
from test_nlargest import test_nlargest_n_identical_values
```



---
## test_nlargest_n_duplicate_index
```python
from test_nlargest import test_nlargest_n_duplicate_index
```



---
## test_nlargest_multiindex_column_lookup
```python
from test_nlargest import test_nlargest_multiindex_column_lookup
```



---
## test_nlargest_nan
```python
from test_nlargest import test_nlargest_nan
```



---
## test_nsmallest_nan_after_n_element
```python
from test_nlargest import test_nsmallest_nan_after_n_element
```



---
## test_tz_localize
```python
from test_tz_localize import test_tz_localize
```



---
## test_tz_localize_axis1
```python
from test_tz_localize import test_tz_localize_axis1
```



---
## test_tz_localize_naive
```python
from test_tz_localize import test_tz_localize_naive
```



---
## test_tz_localize_copy_inplace_mutate
```python
from test_tz_localize import test_tz_localize_copy_inplace_mutate
```



---
## __name__
```python
from test_to_dict_of_blocks import __name__
```



---
## TestToDictOfBlocks
```python
from test_to_dict_of_blocks import TestToDictOfBlocks
```



---
## test_to_dict_of_blocks_item_cache
```python
from test_to_dict_of_blocks import test_to_dict_of_blocks_item_cache
```



---
## test_set_change_dtype_slice
```python
from test_to_dict_of_blocks import test_set_change_dtype_slice
```



---
## test_no_copy_blocks
```python
from test_to_dict_of_blocks import test_no_copy_blocks
```



---
## TestDataFrameUpdate
```python
from test_update import TestDataFrameUpdate
```



---
## test_update_nan
```python
from test_update import test_update_nan
```



---
## test_update_nooverwrite
```python
from test_update import test_update_nooverwrite
```



---
## test_update_filtered
```python
from test_update import test_update_filtered
```



---
## test_update_raise_bad_parameter
```python
from test_update import test_update_raise_bad_parameter
```



---
## test_update_raise_on_overlap
```python
from test_update import test_update_raise_on_overlap
```



---
## test_update_from_non_df
```python
from test_update import test_update_from_non_df
```



---
## test_update_datetime_tz
```python
from test_update import test_update_datetime_tz
```



---
## test_update_datetime_tz_in_place
```python
from test_update import test_update_datetime_tz_in_place
```



---
## test_update_with_different_dtype
```python
from test_update import test_update_with_different_dtype
```



---
## test_update_modify_view
```python
from test_update import test_update_modify_view
```



---
## test_update_dt_column_with_NaT_create_column
```python
from test_update import test_update_dt_column_with_NaT_create_column
```



---
## TestDataFrameDiff
```python
from test_diff import TestDataFrameDiff
```



---
## test_diff_requires_integer
```python
from test_diff import test_diff_requires_integer
```



---
## test_diff_int_dtype
```python
from test_diff import test_diff_int_dtype
```



---
## test_diff_mixed_numeric
```python
from test_diff import test_diff_mixed_numeric
```



---
## test_diff_axis1_nonconsolidated
```python
from test_diff import test_diff_axis1_nonconsolidated
```



---
## test_diff_timedelta64_with_nat
```python
from test_diff import test_diff_timedelta64_with_nat
```



---
## test_diff_datetime_axis0_with_nat
```python
from test_diff import test_diff_datetime_axis0_with_nat
```



---
## test_diff_datetime_with_nat_zero_periods
```python
from test_diff import test_diff_datetime_with_nat_zero_periods
```



---
## test_diff_datetime_axis0
```python
from test_diff import test_diff_datetime_axis0
```



---
## test_diff_datetime_axis1
```python
from test_diff import test_diff_datetime_axis1
```



---
## test_diff_timedelta
```python
from test_diff import test_diff_timedelta
```



---
## test_diff_mixed_dtype
```python
from test_diff import test_diff_mixed_dtype
```



---
## test_diff_neg_n
```python
from test_diff import test_diff_neg_n
```



---
## test_diff_float_n
```python
from test_diff import test_diff_float_n
```



---
## test_diff_axis
```python
from test_diff import test_diff_axis
```



---
## test_diff_period
```python
from test_diff import test_diff_period
```



---
## test_diff_axis1_mixed_dtypes
```python
from test_diff import test_diff_axis1_mixed_dtypes
```



---
## test_diff_axis1_mixed_dtypes_large_periods
```python
from test_diff import test_diff_axis1_mixed_dtypes_large_periods
```



---
## test_diff_axis1_mixed_dtypes_negative_periods
```python
from test_diff import test_diff_axis1_mixed_dtypes_negative_periods
```



---
## test_diff_sparse
```python
from test_diff import test_diff_sparse
```



---
## test_diff_integer_na
```python
from test_diff import test_diff_integer_na
```



---
## test_diff_readonly
```python
from test_diff import test_diff_readonly
```



---
## test_diff_all_int_dtype
```python
from test_diff import test_diff_all_int_dtype
```



---
## _check_cast
```python
from test_astype import _check_cast
```

Check if all dtypes of df are equal to v

---
## IntegerArrayNoCopy
```python
from test_astype import IntegerArrayNoCopy
```



---
## Int16DtypeNoCopy
```python
from test_astype import Int16DtypeNoCopy
```



---
## test_frame_astype_no_copy
```python
from test_astype import test_frame_astype_no_copy
```



---
## test_astype_copies
```python
from test_astype import test_astype_copies
```



---
## test_astype_to_string_not_modifying_input
```python
from test_astype import test_astype_to_string_not_modifying_input
```



---
## test_astype_float
```python
from test_astype import test_astype_float
```



---
## test_astype_mixed_float
```python
from test_astype import test_astype_mixed_float
```



---
## test_astype_mixed_type
```python
from test_astype import test_astype_mixed_type
```



---
## test_astype_with_exclude_string
```python
from test_astype import test_astype_with_exclude_string
```



---
## test_astype_with_view_float
```python
from test_astype import test_astype_with_view_float
```



---
## test_astype_with_view_mixed_float
```python
from test_astype import test_astype_with_view_mixed_float
```



---
## test_astype_str
```python
from test_astype import test_astype_str
```



---
## test_astype_str_float
```python
from test_astype import test_astype_str_float
```



---
## test_astype_duplicate_col
```python
from test_astype import test_astype_duplicate_col
```



---
## test_astype_duplicate_col_series_arg
```python
from test_astype import test_astype_duplicate_col_series_arg
```



---
## test_astype_categorical
```python
from test_astype import test_astype_categorical
```



---
## test_astype_categoricaldtype_class_raises
```python
from test_astype import test_astype_categoricaldtype_class_raises
```



---
## test_astype_extension_dtypes
```python
from test_astype import test_astype_extension_dtypes
```



---
## test_astype_extension_dtypes_1d
```python
from test_astype import test_astype_extension_dtypes_1d
```



---
## test_astype_extension_dtypes_duplicate_col
```python
from test_astype import test_astype_extension_dtypes_duplicate_col
```



---
## test_astype_column_metadata
```python
from test_astype import test_astype_column_metadata
```



---
## test_astype_from_object_to_datetime_unit
```python
from test_astype import test_astype_from_object_to_datetime_unit
```



---
## test_astype_from_object_to_timedelta_unit
```python
from test_astype import test_astype_from_object_to_timedelta_unit
```



---
## test_astype_from_datetimelike_to_object
```python
from test_astype import test_astype_from_datetimelike_to_object
```



---
## test_astype_to_datetimelike_unit
```python
from test_astype import test_astype_to_datetimelike_unit
```



---
## test_astype_to_datetime_unit
```python
from test_astype import test_astype_to_datetime_unit
```



---
## test_astype_to_timedelta_unit_ns
```python
from test_astype import test_astype_to_timedelta_unit_ns
```



---
## test_astype_to_timedelta_unit
```python
from test_astype import test_astype_to_timedelta_unit
```



---
## test_astype_to_incorrect_datetimelike
```python
from test_astype import test_astype_to_incorrect_datetimelike
```



---
## test_astype_arg_for_errors
```python
from test_astype import test_astype_arg_for_errors
```



---
## test_astype_invalid_conversion
```python
from test_astype import test_astype_invalid_conversion
```



---
## test_astype_arg_for_errors_dictlist
```python
from test_astype import test_astype_arg_for_errors_dictlist
```



---
## test_astype_dt64tz
```python
from test_astype import test_astype_dt64tz
```



---
## test_astype_empty_dtype_dict
```python
from test_astype import test_astype_empty_dtype_dict
```



---
## test_astype_tz_conversion
```python
from test_astype import test_astype_tz_conversion
```



---
## test_astype_tz_object_conversion
```python
from test_astype import test_astype_tz_object_conversion
```



---
## test_astype_dt64_to_string
```python
from test_astype import test_astype_dt64_to_string
```



---
## test_astype_td64_to_string
```python
from test_astype import test_astype_td64_to_string
```



---
## test_astype_noncontiguous
```python
from test_astype import test_astype_noncontiguous
```



---
## test_astype_from_categorical3
```python
from test_astype import test_astype_from_categorical3
```



---
## test_astype_from_categorical4
```python
from test_astype import test_astype_from_categorical4
```



---
## test_categorical_astype_to_int
```python
from test_astype import test_categorical_astype_to_int
```



---
## test_astype_categorical_to_string_missing
```python
from test_astype import test_astype_categorical_to_string_missing
```



---
## copy
```python
from test_astype import copy
```



---
## construct_array_type
```python
from test_astype import construct_array_type
```



---
## __name__
```python
from test_dot import __name__
```



---
## DotSharedTests
```python
from test_dot import DotSharedTests
```



---
## TestSeriesDot
```python
from test_dot import TestSeriesDot
```



---
## TestDataFrameDot
```python
from test_dot import TestDataFrameDot
```



---
## test_arrow_dtype
```python
from test_dot import test_arrow_dtype
```



---
## obj
```python
from test_dot import obj
```



---
## other
```python
from test_dot import other
```



---
## expected
```python
from test_dot import expected
```



---
## reduced_dim_assert
```python
from test_dot import reduced_dim_assert
```

Assertion about results with 1 fewer dimension that self.obj

---
## test_dot_equiv_values_dot
```python
from test_dot import test_dot_equiv_values_dot
```



---
## test_dot_2d_ndarray
```python
from test_dot import test_dot_2d_ndarray
```



---
## test_dot_1d_ndarray
```python
from test_dot import test_dot_1d_ndarray
```



---
## test_dot_series
```python
from test_dot import test_dot_series
```



---
## test_dot_series_alignment
```python
from test_dot import test_dot_series_alignment
```



---
## test_dot_aligns
```python
from test_dot import test_dot_aligns
```



---
## test_dot_shape_mismatch
```python
from test_dot import test_dot_shape_mismatch
```



---
## test_dot_misaligned
```python
from test_dot import test_dot_misaligned
```



---
## TestDataFrameMissingData
```python
from test_dropna import TestDataFrameMissingData
```



---
## test_dropEmptyRows
```python
from test_dropna import test_dropEmptyRows
```



---
## test_dropIncompleteRows
```python
from test_dropna import test_dropIncompleteRows
```



---
## test_dropna
```python
from test_dropna import test_dropna
```



---
## test_drop_and_dropna_caching
```python
from test_dropna import test_drop_and_dropna_caching
```



---
## test_dropna_corner
```python
from test_dropna import test_dropna_corner
```



---
## test_dropna_multiple_axes
```python
from test_dropna import test_dropna_multiple_axes
```



---
## test_dropna_tz_aware_datetime
```python
from test_dropna import test_dropna_tz_aware_datetime
```



---
## test_dropna_categorical_interval_index
```python
from test_dropna import test_dropna_categorical_interval_index
```



---
## test_dropna_with_duplicate_columns
```python
from test_dropna import test_dropna_with_duplicate_columns
```



---
## test_set_single_column_subset
```python
from test_dropna import test_set_single_column_subset
```



---
## test_single_column_not_present_in_axis
```python
from test_dropna import test_single_column_not_present_in_axis
```



---
## test_subset_is_nparray
```python
from test_dropna import test_subset_is_nparray
```



---
## test_no_nans_in_frame
```python
from test_dropna import test_no_nans_in_frame
```



---
## test_how_thresh_param_incompatible
```python
from test_dropna import test_how_thresh_param_incompatible
```



---
## test_error
```python
from test_explode import test_error
```



---
## test_error_multi_columns
```python
from test_explode import test_error_multi_columns
```



---
## test_multi_index_rows
```python
from test_explode import test_multi_index_rows
```



---
## test_multi_index_columns
```python
from test_explode import test_multi_index_columns
```



---
## test_usecase
```python
from test_explode import test_usecase
```



---
## test_multi_columns
```python
from test_explode import test_multi_columns
```



---
## test_multi_columns_nan_empty
```python
from test_explode import test_multi_columns_nan_empty
```



---
## __name__
```python
from test_set_axis import __name__
```



---
## SharedSetAxisTests
```python
from test_set_axis import SharedSetAxisTests
```



---
## TestDataFrameSetAxis
```python
from test_set_axis import TestDataFrameSetAxis
```



---
## TestSeriesSetAxis
```python
from test_set_axis import TestSeriesSetAxis
```



---
## obj
```python
from test_set_axis import obj
```



---
## test_set_axis
```python
from test_set_axis import test_set_axis
```



---
## test_set_axis_copy
```python
from test_set_axis import test_set_axis_copy
```



---
## test_set_axis_unnamed_kwarg_warns
```python
from test_set_axis import test_set_axis_unnamed_kwarg_warns
```



---
## test_set_axis_invalid_axis_name
```python
from test_set_axis import test_set_axis_invalid_axis_name
```



---
## test_set_axis_setattr_index_not_collection
```python
from test_set_axis import test_set_axis_setattr_index_not_collection
```



---
## test_set_axis_setattr_index_wrong_length
```python
from test_set_axis import test_set_axis_setattr_index_wrong_length
```



---
## TestMatMul
```python
from test_matmul import TestMatMul
```



---
## test_matmul_message_shapes
```python
from test_matmul import test_matmul_message_shapes
```



---
## TestDataFrameValues
```python
from test_values import TestDataFrameValues
```



---
## TestPrivateValues
```python
from test_values import TestPrivateValues
```



---
## test_more_values
```python
from test_values import test_more_values
```



---
## test_values_mixed_dtypes
```python
from test_values import test_values_mixed_dtypes
```



---
## test_values_duplicates
```python
from test_values import test_values_duplicates
```



---
## test_values_with_duplicate_columns
```python
from test_values import test_values_with_duplicate_columns
```



---
## test_values_casts_datetimelike_to_object
```python
from test_values import test_values_casts_datetimelike_to_object
```



---
## test_frame_values_with_tz
```python
from test_values import test_frame_values_with_tz
```



---
## test_interleave_with_tzaware
```python
from test_values import test_interleave_with_tzaware
```



---
## test_values_interleave_non_unique_cols
```python
from test_values import test_values_interleave_non_unique_cols
```



---
## test_values_numeric_cols
```python
from test_values import test_values_numeric_cols
```



---
## test_values_lcd
```python
from test_values import test_values_lcd
```



---
## test_private_values_dt64tz
```python
from test_values import test_private_values_dt64tz
```



---
## test_private_values_dt64tz_multicol
```python
from test_values import test_private_values_dt64tz_multicol
```



---
## test_private_values_dt64_multiblock
```python
from test_values import test_private_values_dt64_multiblock
```



---
## test_duplicated_with_misspelled_column_name
```python
from test_duplicated import test_duplicated_with_misspelled_column_name
```



---
## test_duplicated_implemented_no_recursion
```python
from test_duplicated import test_duplicated_implemented_no_recursion
```



---
## test_duplicated_subset
```python
from test_duplicated import test_duplicated_subset
```



---
## test_duplicated_on_empty_frame
```python
from test_duplicated import test_duplicated_on_empty_frame
```



---
## test_frame_datetime64_duplicated
```python
from test_duplicated import test_frame_datetime64_duplicated
```



---
## __name__
```python
from test_at_time import __name__
```



---
## TestAtTime
```python
from test_at_time import TestAtTime
```



---
## test_localized_at_time
```python
from test_at_time import test_localized_at_time
```



---
## test_at_time
```python
from test_at_time import test_at_time
```



---
## test_at_time_midnight
```python
from test_at_time import test_at_time_midnight
```



---
## test_at_time_nonexistent
```python
from test_at_time import test_at_time_nonexistent
```



---
## test_at_time_errors
```python
from test_at_time import test_at_time_errors
```



---
## test_at_time_tz
```python
from test_at_time import test_at_time_tz
```



---
## test_at_time_raises
```python
from test_at_time import test_at_time_raises
```



---
## test_at_time_axis
```python
from test_at_time import test_at_time_axis
```



---
## test_at_time_datetimeindex
```python
from test_at_time import test_at_time_datetimeindex
```



---
## TestDataFrameAlign
```python
from test_align import TestDataFrameAlign
```



---
## test_align_asfreq_method_raises
```python
from test_align import test_align_asfreq_method_raises
```



---
## test_frame_align_aware
```python
from test_align import test_frame_align_aware
```



---
## test_align_float
```python
from test_align import test_align_float
```



---
## test_align_frame_with_series
```python
from test_align import test_align_frame_with_series
```



---
## test_align_series_condition
```python
from test_align import test_align_series_condition
```



---
## test_align_int
```python
from test_align import test_align_int
```



---
## test_align_mixed_type
```python
from test_align import test_align_mixed_type
```



---
## test_align_mixed_float
```python
from test_align import test_align_mixed_float
```



---
## test_align_mixed_int
```python
from test_align import test_align_mixed_int
```



---
## test_align_categorical
```python
from test_align import test_align_categorical
```



---
## test_align_series_combinations
```python
from test_align import test_align_series_combinations
```



---
## test_multiindex_align_to_series_with_common_index_level
```python
from test_align import test_multiindex_align_to_series_with_common_index_level
```



---
## test_multiindex_align_to_series_with_common_index_level_missing_in_left
```python
from test_align import test_multiindex_align_to_series_with_common_index_level_missing_in_left
```



---
## test_multiindex_align_to_series_with_common_index_level_missing_in_right
```python
from test_align import test_multiindex_align_to_series_with_common_index_level_missing_in_right
```



---
## test_multiindex_align_to_series_with_common_index_level_missing_in_both
```python
from test_align import test_multiindex_align_to_series_with_common_index_level_missing_in_both
```



---
## test_multiindex_align_to_series_with_common_index_level_non_unique_cols
```python
from test_align import test_multiindex_align_to_series_with_common_index_level_non_unique_cols
```



---
## test_missing_axis_specification_exception
```python
from test_align import test_missing_axis_specification_exception
```



---
## test_align_series_check_copy
```python
from test_align import test_align_series_check_copy
```



---
## test_align_identical_different_object
```python
from test_align import test_align_identical_different_object
```



---
## test_align_identical_different_object_columns
```python
from test_align import test_align_identical_different_object_columns
```



---
## TestDataFramePop
```python
from test_pop import TestDataFramePop
```



---
## test_pop_non_unique_cols
```python
from test_pop import test_pop_non_unique_cols
```



---
## test_mixed_depth_pop
```python
from test_pop import test_mixed_depth_pop
```



---
## TestDataFramePctChange
```python
from test_pct_change import TestDataFramePctChange
```



---
## test_pct_change_none_beginning_no_warning
```python
from test_pct_change import test_pct_change_none_beginning_no_warning
```



---
## test_pct_change_with_nas
```python
from test_pct_change import test_pct_change_with_nas
```



---
## test_pct_change_numeric
```python
from test_pct_change import test_pct_change_numeric
```



---
## TestDataFrameIsIn
```python
from test_isin import TestDataFrameIsIn
```



---
## test_isin_dict
```python
from test_isin import test_isin_dict
```



---
## test_isin_df
```python
from test_isin import test_isin_df
```



---
## test_isin_tuples
```python
from test_isin import test_isin_tuples
```



---
## test_isin_df_dupe_values
```python
from test_isin import test_isin_df_dupe_values
```



---
## test_isin_dupe_self
```python
from test_isin import test_isin_dupe_self
```



---
## test_isin_against_series
```python
from test_isin import test_isin_against_series
```



---
## test_isin_multiIndex
```python
from test_isin import test_isin_multiIndex
```



---
## test_isin_empty_datetimelike
```python
from test_isin import test_isin_empty_datetimelike
```



---
## test_isin_category_frame
```python
from test_isin import test_isin_category_frame
```



---
## test_isin_not_lossy
```python
from test_isin import test_isin_not_lossy
```



---
## test_rename_signature
```python
from test_rename import test_rename_signature
```



---
## test_rename_mi
```python
from test_rename import test_rename_mi
```



---
## test_rename_chainmap
```python
from test_rename import test_rename_chainmap
```



---
## test_rename_multiindex
```python
from test_rename import test_rename_multiindex
```



---
## test_rename_nocopy
```python
from test_rename import test_rename_nocopy
```



---
## test_rename_bug
```python
from test_rename import test_rename_bug
```



---
## test_rename_bug2
```python
from test_rename import test_rename_bug2
```



---
## test_rename_errors_raises
```python
from test_rename import test_rename_errors_raises
```



---
## test_rename_errors
```python
from test_rename import test_rename_errors
```



---
## test_rename_objects
```python
from test_rename import test_rename_objects
```



---
## test_rename_axis_style
```python
from test_rename import test_rename_axis_style
```



---
## test_rename_mapper_multi
```python
from test_rename import test_rename_mapper_multi
```



---
## test_rename_positional_named
```python
from test_rename import test_rename_positional_named
```



---
## test_rename_axis_style_raises
```python
from test_rename import test_rename_axis_style_raises
```



---
## test_rename_positional_raises
```python
from test_rename import test_rename_positional_raises
```



---
## test_rename_no_mappings_raises
```python
from test_rename import test_rename_no_mappings_raises
```



---
## test_rename_mapper_and_positional_arguments_raises
```python
from test_rename import test_rename_mapper_and_positional_arguments_raises
```



---
## test_rename_with_duplicate_columns
```python
from test_rename import test_rename_with_duplicate_columns
```



---
## test_rename_boolean_index
```python
from test_rename import test_rename_boolean_index
```



---
## TestFillNA
```python
from test_fillna import TestFillNA
```



---
## test_fillna_nonconsolidated_frame
```python
from test_fillna import test_fillna_nonconsolidated_frame
```



---
## test_fillna_nones_inplace
```python
from test_fillna import test_fillna_nones_inplace
```



---
## test_fillna_dict_inplace_nonunique_columns
```python
from test_fillna import test_fillna_dict_inplace_nonunique_columns
```



---
## test_fillna_on_column_view
```python
from test_fillna import test_fillna_on_column_view
```



---
## test_fillna_datetime
```python
from test_fillna import test_fillna_datetime
```



---
## test_fillna_mixed_type
```python
from test_fillna import test_fillna_mixed_type
```



---
## test_fillna_mixed_float
```python
from test_fillna import test_fillna_mixed_float
```



---
## test_fillna_empty
```python
from test_fillna import test_fillna_empty
```



---
## test_fillna_different_dtype
```python
from test_fillna import test_fillna_different_dtype
```



---
## test_fillna_limit_and_value
```python
from test_fillna import test_fillna_limit_and_value
```



---
## test_fillna_datelike
```python
from test_fillna import test_fillna_datelike
```



---
## test_fillna_tzaware
```python
from test_fillna import test_fillna_tzaware
```



---
## test_fillna_tzaware_different_column
```python
from test_fillna import test_fillna_tzaware_different_column
```



---
## test_na_actions_categorical
```python
from test_fillna import test_na_actions_categorical
```



---
## test_fillna_categorical_nan
```python
from test_fillna import test_fillna_categorical_nan
```



---
## test_fillna_downcast_false
```python
from test_fillna import test_fillna_downcast_false
```



---
## test_fillna_downcast_noop
```python
from test_fillna import test_fillna_downcast_noop
```



---
## test_fillna_dictlike_value_duplicate_colnames
```python
from test_fillna import test_fillna_dictlike_value_duplicate_colnames
```



---
## test_fillna_dtype_conversion
```python
from test_fillna import test_fillna_dtype_conversion
```



---
## test_fillna_dtype_conversion_equiv_replace
```python
from test_fillna import test_fillna_dtype_conversion_equiv_replace
```



---
## test_fillna_datetime_columns
```python
from test_fillna import test_fillna_datetime_columns
```



---
## test_frame_pad_backfill_limit
```python
from test_fillna import test_frame_pad_backfill_limit
```



---
## test_frame_fillna_limit
```python
from test_fillna import test_frame_fillna_limit
```



---
## test_fillna_skip_certain_blocks
```python
from test_fillna import test_fillna_skip_certain_blocks
```



---
## test_fillna_positive_limit
```python
from test_fillna import test_fillna_positive_limit
```



---
## test_fillna_integer_limit
```python
from test_fillna import test_fillna_integer_limit
```



---
## test_fillna_inplace
```python
from test_fillna import test_fillna_inplace
```



---
## test_fillna_dict_series
```python
from test_fillna import test_fillna_dict_series
```



---
## test_fillna_dataframe
```python
from test_fillna import test_fillna_dataframe
```



---
## test_fillna_columns
```python
from test_fillna import test_fillna_columns
```



---
## test_fillna_invalid_value
```python
from test_fillna import test_fillna_invalid_value
```



---
## test_fillna_col_reordering
```python
from test_fillna import test_fillna_col_reordering
```



---
## test_fill_corner
```python
from test_fillna import test_fill_corner
```



---
## test_fillna_downcast_dict
```python
from test_fillna import test_fillna_downcast_dict
```



---
## test_fillna_with_columns_and_limit
```python
from test_fillna import test_fillna_with_columns_and_limit
```



---
## test_fillna_datetime_inplace
```python
from test_fillna import test_fillna_datetime_inplace
```



---
## test_fillna_inplace_with_columns_limit_and_value
```python
from test_fillna import test_fillna_inplace_with_columns_limit_and_value
```



---
## test_inplace_dict_update_view
```python
from test_fillna import test_inplace_dict_update_view
```



---
## test_single_block_df_with_horizontal_axis
```python
from test_fillna import test_single_block_df_with_horizontal_axis
```



---
## test_fillna_with_multi_index_frame
```python
from test_fillna import test_fillna_with_multi_index_frame
```



---
## TestDataFrameSortIndex
```python
from test_sort_index import TestDataFrameSortIndex
```



---
## TestDataFrameSortIndexKey
```python
from test_sort_index import TestDataFrameSortIndexKey
```



---
## test_sort_index_with_sliced_multiindex
```python
from test_sort_index import test_sort_index_with_sliced_multiindex
```



---
## test_axis_columns_ignore_index
```python
from test_sort_index import test_axis_columns_ignore_index
```



---
## test_sort_index_stable_sort
```python
from test_sort_index import test_sort_index_stable_sort
```



---
## test_sort_index_and_reconstruction_doc_example
```python
from test_sort_index import test_sort_index_and_reconstruction_doc_example
```



---
## test_sort_index_non_existent_label_multiindex
```python
from test_sort_index import test_sort_index_non_existent_label_multiindex
```



---
## test_sort_index_reorder_on_ops
```python
from test_sort_index import test_sort_index_reorder_on_ops
```



---
## test_sort_index_nan_multiindex
```python
from test_sort_index import test_sort_index_nan_multiindex
```



---
## test_sort_index_nan
```python
from test_sort_index import test_sort_index_nan
```



---
## test_sort_index_multi_index
```python
from test_sort_index import test_sort_index_multi_index
```



---
## test_sort_index_different_sortorder
```python
from test_sort_index import test_sort_index_different_sortorder
```



---
## test_sort_index_categorical_index
```python
from test_sort_index import test_sort_index_categorical_index
```



---
## test_sort_index_intervalindex
```python
from test_sort_index import test_sort_index_intervalindex
```



---
## test_respect_ignore_index
```python
from test_sort_index import test_respect_ignore_index
```



---
## test_sort_index_ignore_index_multi_index
```python
from test_sort_index import test_sort_index_ignore_index_multi_index
```



---
## test_sort_index_categorical_multiindex
```python
from test_sort_index import test_sort_index_categorical_multiindex
```



---
## test_sort_index_and_reconstruction
```python
from test_sort_index import test_sort_index_and_reconstruction
```



---
## test_sort_index_level2
```python
from test_sort_index import test_sort_index_level2
```



---
## test_sort_index_level_large_cardinality
```python
from test_sort_index import test_sort_index_level_large_cardinality
```



---
## test_sort_index_level_by_name
```python
from test_sort_index import test_sort_index_level_by_name
```



---
## test_sort_index_level_mixed
```python
from test_sort_index import test_sort_index_level_mixed
```



---
## test_sort_index_preserve_levels
```python
from test_sort_index import test_sort_index_preserve_levels
```



---
## test_sort_index_multilevel_repr_8017
```python
from test_sort_index import test_sort_index_multilevel_repr_8017
```



---
## test_sort_index_with_categories
```python
from test_sort_index import test_sort_index_with_categories
```



---
## test_sort_index_use_inf_as_na
```python
from test_sort_index import test_sort_index_use_inf_as_na
```



---
## test_sort_index_ascending_tuple
```python
from test_sort_index import test_sort_index_ascending_tuple
```



---
## test_sort_multi_index_key
```python
from test_sort_index import test_sort_multi_index_key
```



---
## test_sort_multi_index_key_str
```python
from test_sort_index import test_sort_multi_index_key_str
```



---
## test_sort_index_multiindex_sparse_column
```python
from test_sort_index import test_sort_index_multiindex_sparse_column
```



---
## test_sort_index_multiindex_sort_remaining
```python
from test_sort_index import test_sort_index_multiindex_sort_remaining
```



---
## my_func
```python
from test_sort_index import my_func
```



---
## test_map_float_object_conversion
```python
from test_map import test_map_float_object_conversion
```



---
## test_map_keeps_dtype
```python
from test_map import test_map_keeps_dtype
```



---
## test_map_str
```python
from test_map import test_map_str
```



---
## test_map_datetimelike
```python
from test_map import test_map_datetimelike
```



---
## test_map_kwargs
```python
from test_map import test_map_kwargs
```



---
## test_map_na_ignore
```python
from test_map import test_map_na_ignore
```



---
## test_map_box_timestamps
```python
from test_map import test_map_box_timestamps
```



---
## test_map_box
```python
from test_map import test_map_box
```



---
## test_frame_map_dont_convert_datetime64
```python
from test_map import test_frame_map_dont_convert_datetime64
```



---
## test_map_function_runs_once
```python
from test_map import test_map_function_runs_once
```



---
## test_map_invalid_na_action
```python
from test_map import test_map_invalid_na_action
```



---
## test_applymap_deprecated
```python
from test_map import test_applymap_deprecated
```



---
## reducing_function
```python
from test_map import reducing_function
```



---
## non_reducing_function
```python
from test_map import non_reducing_function
```



---
## test_drop_raise_exception_if_labels_not_in_level
```python
from test_drop import test_drop_raise_exception_if_labels_not_in_level
```



---
## test_drop_errors_ignore
```python
from test_drop import test_drop_errors_ignore
```



---
## test_drop_with_non_unique_datetime_index_and_invalid_keys
```python
from test_drop import test_drop_with_non_unique_datetime_index_and_invalid_keys
```



---
## TestDataFrameDrop
```python
from test_drop import TestDataFrameDrop
```



---
## test_drop_names
```python
from test_drop import test_drop_names
```



---
## test_drop
```python
from test_drop import test_drop
```



---
## test_drop_multiindex_not_lexsorted
```python
from test_drop import test_drop_multiindex_not_lexsorted
```



---
## test_drop_api_equivalence
```python
from test_drop import test_drop_api_equivalence
```



---
## test_raise_on_drop_duplicate_index
```python
from test_drop import test_raise_on_drop_duplicate_index
```



---
## test_drop_empty_listlike_non_unique_datetime_index
```python
from test_drop import test_drop_empty_listlike_non_unique_datetime_index
```



---
## test_mixed_depth_drop
```python
from test_drop import test_mixed_depth_drop
```



---
## test_drop_multiindex_other_level_nan
```python
from test_drop import test_drop_multiindex_other_level_nan
```



---
## test_drop_nonunique
```python
from test_drop import test_drop_nonunique
```



---
## test_drop_level
```python
from test_drop import test_drop_level
```



---
## test_drop_level_nonunique_datetime
```python
from test_drop import test_drop_level_nonunique_datetime
```



---
## test_drop_tz_aware_timestamp_across_dst
```python
from test_drop import test_drop_tz_aware_timestamp_across_dst
```



---
## test_drop_preserve_names
```python
from test_drop import test_drop_preserve_names
```



---
## test_inplace_drop_and_operation
```python
from test_drop import test_inplace_drop_and_operation
```



---
## test_drop_with_non_unique_multiindex
```python
from test_drop import test_drop_with_non_unique_multiindex
```



---
## test_drop_tuple_with_non_unique_multiindex
```python
from test_drop import test_drop_tuple_with_non_unique_multiindex
```



---
## test_drop_with_duplicate_columns
```python
from test_drop import test_drop_with_duplicate_columns
```



---
## test_drop_with_duplicate_columns2
```python
from test_drop import test_drop_with_duplicate_columns2
```



---
## test_drop_inplace_no_leftover_column_reference
```python
from test_drop import test_drop_inplace_no_leftover_column_reference
```



---
## test_drop_level_missing_label_multiindex
```python
from test_drop import test_drop_level_missing_label_multiindex
```



---
## test_drop_parse_strings_datetime_index
```python
from test_drop import test_drop_parse_strings_datetime_index
```



---
## __name__
```python
from test_first_valid_index import __name__
```

Includes test for last_valid_index.

---
## TestFirstValidIndex
```python
from test_first_valid_index import TestFirstValidIndex
```



---
## test_first_valid_index_single_nan
```python
from test_first_valid_index import test_first_valid_index_single_nan
```



---
## test_first_valid_index_empty
```python
from test_first_valid_index import test_first_valid_index_empty
```



---
## test_first_last_valid_frame
```python
from test_first_valid_index import test_first_last_valid_frame
```



---
## test_first_last_valid
```python
from test_first_valid_index import test_first_last_valid
```



---
## test_first_last_valid_all_nan
```python
from test_first_valid_index import test_first_last_valid_all_nan
```



---
## __name__
```python
from test_set_index import __name__
```

See also: test_reindex.py:TestReindexSetIndex

---
## frame_of_index_cols
```python
from test_set_index import frame_of_index_cols
```

Fixture for DataFrame of columns that can be used for indexing

Columns are ['A', 'B', 'C', 'D', 'E', ('tuple', 'as', 'label')];
'A' & 'B' contain duplicates (but are jointly unique), the rest are unique.

     A      B  C         D         E  (tuple, as, label)
0  foo    one  a  0.608477 -0.012500           -1.664297
1  foo    two  b -0.633460  0.249614           -0.364411
2  foo  three  c  0.615256  2.154968           -0.834666
3  bar    one  d  0.234246  1.085675            0.718445
4  bar    two  e  0.533841 -0.005702           -3.533912

---
## TestSetIndex
```python
from test_set_index import TestSetIndex
```



---
## TestSetIndexInvalid
```python
from test_set_index import TestSetIndexInvalid
```



---
## TestSetIndexCustomLabelType
```python
from test_set_index import TestSetIndexCustomLabelType
```



---
## test_set_index_multiindex
```python
from test_set_index import test_set_index_multiindex
```



---
## test_set_index_empty_column
```python
from test_set_index import test_set_index_empty_column
```



---
## test_set_index_empty_dataframe
```python
from test_set_index import test_set_index_empty_dataframe
```



---
## test_set_index_multiindexcolumns
```python
from test_set_index import test_set_index_multiindexcolumns
```



---
## test_set_index_timezone
```python
from test_set_index import test_set_index_timezone
```



---
## test_set_index_cast_datetimeindex
```python
from test_set_index import test_set_index_cast_datetimeindex
```



---
## test_set_index_dst
```python
from test_set_index import test_set_index_dst
```



---
## test_set_index
```python
from test_set_index import test_set_index
```



---
## test_set_index_names
```python
from test_set_index import test_set_index_names
```



---
## test_set_index_drop_inplace
```python
from test_set_index import test_set_index_drop_inplace
```



---
## test_set_index_append
```python
from test_set_index import test_set_index_append
```



---
## test_set_index_append_to_multiindex
```python
from test_set_index import test_set_index_append_to_multiindex
```



---
## test_set_index_after_mutation
```python
from test_set_index import test_set_index_after_mutation
```



---
## test_set_index_pass_single_array
```python
from test_set_index import test_set_index_pass_single_array
```



---
## test_set_index_pass_arrays
```python
from test_set_index import test_set_index_pass_arrays
```



---
## test_set_index_pass_arrays_duplicate
```python
from test_set_index import test_set_index_pass_arrays_duplicate
```



---
## test_set_index_pass_multiindex
```python
from test_set_index import test_set_index_pass_multiindex
```



---
## test_construction_with_categorical_index
```python
from test_set_index import test_construction_with_categorical_index
```



---
## test_set_index_preserve_categorical_dtype
```python
from test_set_index import test_set_index_preserve_categorical_dtype
```



---
## test_set_index_datetime
```python
from test_set_index import test_set_index_datetime
```



---
## test_set_index_period
```python
from test_set_index import test_set_index_period
```



---
## test_set_index_verify_integrity
```python
from test_set_index import test_set_index_verify_integrity
```



---
## test_set_index_raise_keys
```python
from test_set_index import test_set_index_raise_keys
```



---
## test_set_index_raise_on_type
```python
from test_set_index import test_set_index_raise_on_type
```



---
## test_set_index_raise_on_len
```python
from test_set_index import test_set_index_raise_on_len
```



---
## test_set_index_custom_label_type
```python
from test_set_index import test_set_index_custom_label_type
```



---
## test_set_index_custom_label_hashable_iterable
```python
from test_set_index import test_set_index_custom_label_hashable_iterable
```



---
## test_set_index_custom_label_type_raises
```python
from test_set_index import test_set_index_custom_label_type_raises
```



---
## test_set_index_periodindex
```python
from test_set_index import test_set_index_periodindex
```



---
## Thing
```python
from test_set_index import Thing
```



---
## __init__
```python
from test_set_index import __init__
```



---
## __str__
```python
from test_set_index import __str__
```



---
## __repr__
```python
from test_set_index import __repr__
```



---
## date_range_frame
```python
from test_asof import date_range_frame
```

Fixture for DataFrame of ints with date_range index

Columns are ['A', 'B'].

---
## TestFrameAsof
```python
from test_asof import TestFrameAsof
```



---
## test_subset
```python
from test_asof import test_subset
```



---
## test_missing
```python
from test_asof import test_missing
```



---
## test_asof_all_nans
```python
from test_asof import test_asof_all_nans
```



---
## test_time_zone_aware_index
```python
from test_asof import test_time_zone_aware_index
```



---
## test_is_copy
```python
from test_asof import test_is_copy
```



---
## test_asof_periodindex_mismatched_freq
```python
from test_asof import test_asof_periodindex_mismatched_freq
```



---
## test_asof_preserves_bool_dtype
```python
from test_asof import test_asof_preserves_bool_dtype
```



---
## test_get_numeric_data
```python
from test_get_numeric_data import test_get_numeric_data
```



---
## test_get_numeric_data_mixed_dtype
```python
from test_get_numeric_data import test_get_numeric_data_mixed_dtype
```



---
## test_get_numeric_data_extension_dtype
```python
from test_get_numeric_data import test_get_numeric_data_extension_dtype
```



---
## test_compare_result_names
```python
from test_compare import test_compare_result_names
```



---
## test_invalid_input_result_names
```python
from test_compare import test_invalid_input_result_names
```



---
## test_compare_ea_and_np_dtype
```python
from test_compare import test_compare_ea_and_np_dtype
```



---
## test_compare_nullable_int64_dtype
```python
from test_compare import test_compare_nullable_int64_dtype
```



---
## TestDataFrameToDict
```python
from test_to_dict import TestDataFrameToDict
```



---
## test_to_dict_list_pd_scalars
```python
from test_to_dict import test_to_dict_list_pd_scalars
```



---
## test_to_dict_timestamp
```python
from test_to_dict import test_to_dict_timestamp
```



---
## test_to_dict_index_not_unique_with_index_orient
```python
from test_to_dict import test_to_dict_index_not_unique_with_index_orient
```



---
## test_to_dict_invalid_orient
```python
from test_to_dict import test_to_dict_invalid_orient
```



---
## test_to_dict_short_orient_raises
```python
from test_to_dict import test_to_dict_short_orient_raises
```



---
## test_to_dict_errors
```python
from test_to_dict import test_to_dict_errors
```



---
## test_to_dict_not_unique_warning
```python
from test_to_dict import test_to_dict_not_unique_warning
```



---
## test_to_dict_not_unique
```python
from test_to_dict import test_to_dict_not_unique
```



---
## test_to_dict_box_scalars
```python
from test_to_dict import test_to_dict_box_scalars
```



---
## test_to_dict_tz
```python
from test_to_dict import test_to_dict_tz
```



---
## test_to_dict_index_dtypes
```python
from test_to_dict import test_to_dict_index_dtypes
```



---
## test_to_dict_numeric_names
```python
from test_to_dict import test_to_dict_numeric_names
```



---
## test_to_dict_wide
```python
from test_to_dict import test_to_dict_wide
```



---
## test_to_dict_orient_dtype
```python
from test_to_dict import test_to_dict_orient_dtype
```



---
## test_to_dict_scalar_constructor_orient_dtype
```python
from test_to_dict import test_to_dict_scalar_constructor_orient_dtype
```



---
## test_to_dict_mixed_numeric_frame
```python
from test_to_dict import test_to_dict_mixed_numeric_frame
```



---
## test_to_dict_orient_tight
```python
from test_to_dict import test_to_dict_orient_tight
```



---
## test_to_dict_returns_native_types
```python
from test_to_dict import test_to_dict_returns_native_types
```



---
## test_to_dict_index_false_error
```python
from test_to_dict import test_to_dict_index_false_error
```



---
## test_to_dict_index_false
```python
from test_to_dict import test_to_dict_index_false
```



---
## test_to_dict_na_to_none
```python
from test_to_dict import test_to_dict_na_to_none
```



---
## test_to_dict_masked_native_python
```python
from test_to_dict import test_to_dict_masked_native_python
```



---
## test_to_dict_pos_args_deprecation
```python
from test_to_dict import test_to_dict_pos_args_deprecation
```



---
## TestPipe
```python
from test_pipe import TestPipe
```



---
## test_pipe_tuple
```python
from test_pipe import test_pipe_tuple
```



---
## test_pipe_tuple_error
```python
from test_pipe import test_pipe_tuple_error
```



---
## TestDataFrameRenameAxis
```python
from test_rename_axis import TestDataFrameRenameAxis
```



---
## test_rename_axis_raises
```python
from test_rename_axis import test_rename_axis_raises
```



---
## TestRank
```python
from test_rank import TestRank
```



---
## method
```python
from test_rank import method
```

Fixture for trying all rank methods

---
## test_rank2
```python
from test_rank import test_rank2
```



---
## test_rank_does_not_mutate
```python
from test_rank import test_rank_does_not_mutate
```



---
## test_rank_mixed_frame
```python
from test_rank import test_rank_mixed_frame
```



---
## test_rank_na_option
```python
from test_rank import test_rank_na_option
```



---
## test_rank_axis
```python
from test_rank import test_rank_axis
```



---
## test_rank_methods_frame
```python
from test_rank import test_rank_methods_frame
```



---
## test_rank_2d_tie_methods
```python
from test_rank import test_rank_2d_tie_methods
```



---
## test_rank_pct_true
```python
from test_rank import test_rank_pct_true
```



---
## test_rank_inf_and_nan
```python
from test_rank import test_rank_inf_and_nan
```



---
## test_df_series_inf_nan_consistency
```python
from test_rank import test_df_series_inf_nan_consistency
```



---
## test_rank_both_inf
```python
from test_rank import test_rank_both_inf
```



---
## test_rank_inf_nans_na_option
```python
from test_rank import test_rank_inf_nans_na_option
```



---
## test_rank_object_first
```python
from test_rank import test_rank_object_first
```



---
## test_rank_mixed_axis_zero
```python
from test_rank import test_rank_mixed_axis_zero
```



---
## test_rank_string_dtype
```python
from test_rank import test_rank_string_dtype
```



---
## _check2d
```python
from test_rank import _check2d
```



---
## mix_ab
```python
from test_replace import mix_ab
```



---
## mix_abc
```python
from test_replace import mix_abc
```



---
## TestDataFrameReplace
```python
from test_replace import TestDataFrameReplace
```



---
## TestDataFrameReplaceRegex
```python
from test_replace import TestDataFrameReplaceRegex
```



---
## test_regex_replace_list_obj
```python
from test_replace import test_regex_replace_list_obj
```



---
## test_regex_replace_list_mixed
```python
from test_replace import test_regex_replace_list_mixed
```



---
## test_regex_replace_list_mixed_inplace
```python
from test_replace import test_regex_replace_list_mixed_inplace
```



---
## test_regex_replace_dict_mixed
```python
from test_replace import test_regex_replace_dict_mixed
```



---
## test_regex_replace_dict_nested
```python
from test_replace import test_regex_replace_dict_nested
```



---
## test_regex_replace_dict_nested_non_first_character
```python
from test_replace import test_regex_replace_dict_nested_non_first_character
```



---
## test_regex_replace_dict_nested_gh4115
```python
from test_replace import test_regex_replace_dict_nested_gh4115
```



---
## test_regex_replace_list_to_scalar
```python
from test_replace import test_regex_replace_list_to_scalar
```



---
## test_regex_replace_str_to_numeric
```python
from test_replace import test_regex_replace_str_to_numeric
```



---
## test_regex_replace_regex_list_to_numeric
```python
from test_replace import test_regex_replace_regex_list_to_numeric
```



---
## test_regex_replace_series_of_regexes
```python
from test_replace import test_regex_replace_series_of_regexes
```



---
## test_regex_replace_numeric_to_object_conversion
```python
from test_replace import test_regex_replace_numeric_to_object_conversion
```



---
## test_joint_simple_replace_and_regex_replace
```python
from test_replace import test_joint_simple_replace_and_regex_replace
```



---
## test_replace_regex_metachar
```python
from test_replace import test_replace_regex_metachar
```



---
## test_regex_replace_string_types
```python
from test_replace import test_regex_replace_string_types
```



---
## test_replace_list
```python
from test_replace import test_replace_list
```



---
## test_replace_with_empty_list
```python
from test_replace import test_replace_with_empty_list
```



---
## test_replace_series_dict
```python
from test_replace import test_replace_series_dict
```



---
## test_replace_convert
```python
from test_replace import test_replace_convert
```



---
## test_replace_mixed
```python
from test_replace import test_replace_mixed
```



---
## test_replace_mixed_int_block_upcasting
```python
from test_replace import test_replace_mixed_int_block_upcasting
```



---
## test_replace_mixed_int_block_splitting
```python
from test_replace import test_replace_mixed_int_block_splitting
```



---
## test_replace_mixed2
```python
from test_replace import test_replace_mixed2
```



---
## test_replace_mixed3
```python
from test_replace import test_replace_mixed3
```



---
## test_replace_nullable_int_with_string_doesnt_cast
```python
from test_replace import test_replace_nullable_int_with_string_doesnt_cast
```



---
## test_replace_with_nullable_column
```python
from test_replace import test_replace_with_nullable_column
```



---
## test_replace_simple_nested_dict
```python
from test_replace import test_replace_simple_nested_dict
```



---
## test_replace_simple_nested_dict_with_nonexistent_value
```python
from test_replace import test_replace_simple_nested_dict_with_nonexistent_value
```



---
## test_replace_NA_with_None
```python
from test_replace import test_replace_NA_with_None
```



---
## test_replace_NAT_with_None
```python
from test_replace import test_replace_NAT_with_None
```



---
## test_replace_with_None_keeps_categorical
```python
from test_replace import test_replace_with_None_keeps_categorical
```



---
## test_replace_value_is_none
```python
from test_replace import test_replace_value_is_none
```



---
## test_replace_for_new_dtypes
```python
from test_replace import test_replace_for_new_dtypes
```



---
## test_replace_dtypes
```python
from test_replace import test_replace_dtypes
```



---
## test_replace_input_formats_listlike
```python
from test_replace import test_replace_input_formats_listlike
```



---
## test_replace_input_formats_scalar
```python
from test_replace import test_replace_input_formats_scalar
```



---
## test_replace_limit
```python
from test_replace import test_replace_limit
```



---
## test_replace_dict_no_regex
```python
from test_replace import test_replace_dict_no_regex
```



---
## test_replace_series_no_regex
```python
from test_replace import test_replace_series_no_regex
```



---
## test_replace_dict_tuple_list_ordering_remains_the_same
```python
from test_replace import test_replace_dict_tuple_list_ordering_remains_the_same
```



---
## test_replace_doesnt_replace_without_regex
```python
from test_replace import test_replace_doesnt_replace_without_regex
```



---
## test_replace_pure_bool_with_string_no_op
```python
from test_replace import test_replace_pure_bool_with_string_no_op
```



---
## test_replace_dict_strings_vs_ints
```python
from test_replace import test_replace_dict_strings_vs_ints
```



---
## test_replace_truthy
```python
from test_replace import test_replace_truthy
```



---
## test_nested_dict_overlapping_keys_replace_int
```python
from test_replace import test_nested_dict_overlapping_keys_replace_int
```



---
## test_nested_dict_overlapping_keys_replace_str
```python
from test_replace import test_nested_dict_overlapping_keys_replace_str
```



---
## test_replace_swapping_bug
```python
from test_replace import test_replace_swapping_bug
```



---
## test_replace_period
```python
from test_replace import test_replace_period
```



---
## test_replace_datetime
```python
from test_replace import test_replace_datetime
```



---
## test_replace_datetimetz
```python
from test_replace import test_replace_datetimetz
```



---
## test_replace_method
```python
from test_replace import test_replace_method
```



---
## test_categorical_replace_with_dict
```python
from test_replace import test_categorical_replace_with_dict
```



---
## test_replace_replacer_dtype
```python
from test_replace import test_replace_replacer_dtype
```



---
## test_replace_after_convert_dtypes
```python
from test_replace import test_replace_after_convert_dtypes
```



---
## test_replace_no_replacement_dtypes
```python
from test_replace import test_replace_no_replacement_dtypes
```



---
## test_replace_with_duplicate_columns
```python
from test_replace import test_replace_with_duplicate_columns
```



---
## test_replace_ea_ignore_float
```python
from test_replace import test_replace_ea_ignore_float
```



---
## test_replace_value_category_type
```python
from test_replace import test_replace_value_category_type
```

Test for #23305: to ensure category dtypes are maintained
after replace with direct values

---
## test_replace_dict_category_type
```python
from test_replace import test_replace_dict_category_type
```

Test to ensure category dtypes are maintained
after replace with dict values

---
## test_replace_intervals
```python
from test_replace import test_replace_intervals
```



---
## test_replace_unicode
```python
from test_replace import test_replace_unicode
```



---
## test_replace_bytes
```python
from test_replace import test_replace_bytes
```



---
## test_replace_list_with_mixed_type
```python
from test_replace import test_replace_list_with_mixed_type
```



---
## test_replace_with_nil_na
```python
from test_replace import test_replace_with_nil_na
```



---
## test_regex_replace_scalar
```python
from test_replace import test_regex_replace_scalar
```



---
## test_replace_regex_dtype_frame
```python
from test_replace import test_replace_regex_dtype_frame
```



---
## test_replace_with_value_also_being_replaced
```python
from test_replace import test_replace_with_value_also_being_replaced
```



---
## test_replace_categorical_no_replacement
```python
from test_replace import test_replace_categorical_no_replacement
```



---
## test_replace_object_splitting
```python
from test_replace import test_replace_object_splitting
```



---
## TestDataFrameClip
```python
from test_clip import TestDataFrameClip
```



---
## test_inplace_clip
```python
from test_clip import test_inplace_clip
```



---
## test_dataframe_clip
```python
from test_clip import test_dataframe_clip
```



---
## test_clip_mixed_numeric
```python
from test_clip import test_clip_mixed_numeric
```



---
## test_clip_against_frame
```python
from test_clip import test_clip_against_frame
```



---
## test_clip_against_unordered_columns
```python
from test_clip import test_clip_against_unordered_columns
```



---
## test_clip_int_data_with_float_bound
```python
from test_clip import test_clip_int_data_with_float_bound
```



---
## test_clip_with_list_bound
```python
from test_clip import test_clip_with_list_bound
```



---
## duplicate_columns_frame
```python
from test_info import duplicate_columns_frame
```

Dataframe with duplicate column names.

---
## test_info_empty
```python
from test_info import test_info_empty
```



---
## test_info_categorical_column_smoke_test
```python
from test_info import test_info_categorical_column_smoke_test
```



---
## test_info_smoke_test
```python
from test_info import test_info_smoke_test
```



---
## test_info_smoke_test2
```python
from test_info import test_info_smoke_test2
```



---
## test_info_default_verbose_selection
```python
from test_info import test_info_default_verbose_selection
```



---
## test_info_verbose_check_header_separator_body
```python
from test_info import test_info_verbose_check_header_separator_body
```



---
## test_info_verbose_with_counts_spacing
```python
from test_info import test_info_verbose_with_counts_spacing
```

Test header column, spacer, first line and last line in verbose mode.

---
## test_info_duplicate_columns_shows_correct_dtypes
```python
from test_info import test_info_duplicate_columns_shows_correct_dtypes
```



---
## test_info_shows_column_dtypes
```python
from test_info import test_info_shows_column_dtypes
```



---
## test_info_max_cols
```python
from test_info import test_info_max_cols
```



---
## test_info_memory_usage
```python
from test_info import test_info_memory_usage
```



---
## test_usage_via_getsizeof
```python
from test_info import test_usage_via_getsizeof
```



---
## test_info_int_columns
```python
from test_info import test_info_int_columns
```



---
## test_memory_usage_empty_no_warning
```python
from test_info import test_memory_usage_empty_no_warning
```



---
## test_info_compute_numba
```python
from test_info import test_info_compute_numba
```



---
## test_info_show_counts
```python
from test_info import test_info_show_counts
```



---
## memory_usage
```python
from test_info import memory_usage
```



---
## TestDataFrameDataTypes
```python
from test_dtypes import TestDataFrameDataTypes
```



---
## test_empty_frame_dtypes
```python
from test_dtypes import test_empty_frame_dtypes
```



---
## test_datetime_with_tz_dtypes
```python
from test_dtypes import test_datetime_with_tz_dtypes
```



---
## test_dtypes_are_correct_after_column_slice
```python
from test_dtypes import test_dtypes_are_correct_after_column_slice
```



---
## test_dtypes_are_correct_after_groupby_last
```python
from test_dtypes import test_dtypes_are_correct_after_groupby_last
```



---
## test_dtypes_gh8722
```python
from test_dtypes import test_dtypes_gh8722
```



---
## test_dtypes_timedeltas
```python
from test_dtypes import test_dtypes_timedeltas
```



---
## test_frame_apply_np_array_return_type
```python
from test_dtypes import test_frame_apply_np_array_return_type
```



---
## __name__
```python
from test_tz_convert import __name__
```



---
## TestTZConvert
```python
from test_tz_convert import TestTZConvert
```



---
## test_tz_convert
```python
from test_tz_convert import test_tz_convert
```



---
## test_tz_convert_axis1
```python
from test_tz_convert import test_tz_convert_axis1
```



---
## test_tz_convert_naive
```python
from test_tz_convert import test_tz_convert_naive
```



---
## test_tz_convert_and_localize
```python
from test_tz_convert import test_tz_convert_and_localize
```



---
## test_tz_convert_copy_inplace_mutate
```python
from test_tz_convert import test_tz_convert_copy_inplace_mutate
```



---
## __name__
```python
from test_select_dtypes import __name__
```



---
## DummyDtype
```python
from test_select_dtypes import DummyDtype
```



---
## DummyArray
```python
from test_select_dtypes import DummyArray
```



---
## TestSelectDtypes
```python
from test_select_dtypes import TestSelectDtypes
```



---
## __init__
```python
from test_select_dtypes import __init__
```



---
## name
```python
from test_select_dtypes import name
```



---
## _is_numeric
```python
from test_select_dtypes import _is_numeric
```



---
## __array__
```python
from test_select_dtypes import __array__
```



---
## dtype
```python
from test_select_dtypes import dtype
```



---
## __len__
```python
from test_select_dtypes import __len__
```



---
## __getitem__
```python
from test_select_dtypes import __getitem__
```



---
## copy
```python
from test_select_dtypes import copy
```



---
## test_select_dtypes_include_using_list_like
```python
from test_select_dtypes import test_select_dtypes_include_using_list_like
```



---
## test_select_dtypes_exclude_using_list_like
```python
from test_select_dtypes import test_select_dtypes_exclude_using_list_like
```



---
## test_select_dtypes_exclude_include_using_list_like
```python
from test_select_dtypes import test_select_dtypes_exclude_include_using_list_like
```



---
## test_select_dtypes_exclude_include_int
```python
from test_select_dtypes import test_select_dtypes_exclude_include_int
```



---
## test_select_dtypes_include_using_scalars
```python
from test_select_dtypes import test_select_dtypes_include_using_scalars
```



---
## test_select_dtypes_exclude_using_scalars
```python
from test_select_dtypes import test_select_dtypes_exclude_using_scalars
```



---
## test_select_dtypes_include_exclude_using_scalars
```python
from test_select_dtypes import test_select_dtypes_include_exclude_using_scalars
```



---
## test_select_dtypes_include_exclude_mixed_scalars_lists
```python
from test_select_dtypes import test_select_dtypes_include_exclude_mixed_scalars_lists
```



---
## test_select_dtypes_duplicate_columns
```python
from test_select_dtypes import test_select_dtypes_duplicate_columns
```



---
## test_select_dtypes_not_an_attr_but_still_valid_dtype
```python
from test_select_dtypes import test_select_dtypes_not_an_attr_but_still_valid_dtype
```



---
## test_select_dtypes_empty
```python
from test_select_dtypes import test_select_dtypes_empty
```



---
## test_select_dtypes_bad_datetime64
```python
from test_select_dtypes import test_select_dtypes_bad_datetime64
```



---
## test_select_dtypes_datetime_with_tz
```python
from test_select_dtypes import test_select_dtypes_datetime_with_tz
```



---
## test_select_dtypes_str_raises
```python
from test_select_dtypes import test_select_dtypes_str_raises
```



---
## test_select_dtypes_bad_arg_raises
```python
from test_select_dtypes import test_select_dtypes_bad_arg_raises
```



---
## test_select_dtypes_typecodes
```python
from test_select_dtypes import test_select_dtypes_typecodes
```



---
## test_select_dtypes_numeric
```python
from test_select_dtypes import test_select_dtypes_numeric
```



---
## test_select_dtypes_numeric_nullable_string
```python
from test_select_dtypes import test_select_dtypes_numeric_nullable_string
```



---
## test_select_dtypes_float_dtype
```python
from test_select_dtypes import test_select_dtypes_float_dtype
```



---
## test_np_bool_ea_boolean_include_number
```python
from test_select_dtypes import test_np_bool_ea_boolean_include_number
```



---
## test_select_dtypes_no_view
```python
from test_select_dtypes import test_select_dtypes_no_view
```



---
## __name__
```python
from test_droplevel import __name__
```



---
## TestDropLevel
```python
from test_droplevel import TestDropLevel
```



---
## test_droplevel
```python
from test_droplevel import test_droplevel
```



---
## __name__
```python
from test_asfreq import __name__
```



---
## TestAsFreq
```python
from test_asfreq import TestAsFreq
```



---
## unit
```python
from test_asfreq import unit
```



---
## test_asfreq2
```python
from test_asfreq import test_asfreq2
```



---
## test_asfreq_datetimeindex_empty
```python
from test_asfreq import test_asfreq_datetimeindex_empty
```



---
## test_tz_aware_asfreq_smoke
```python
from test_asfreq import test_tz_aware_asfreq_smoke
```



---
## test_asfreq_normalize
```python
from test_asfreq import test_asfreq_normalize
```



---
## test_asfreq_keep_index_name
```python
from test_asfreq import test_asfreq_keep_index_name
```



---
## test_asfreq_ts
```python
from test_asfreq import test_asfreq_ts
```



---
## test_asfreq_resample_set_correct_freq
```python
from test_asfreq import test_asfreq_resample_set_correct_freq
```



---
## test_asfreq_empty
```python
from test_asfreq import test_asfreq_empty
```



---
## test_asfreq
```python
from test_asfreq import test_asfreq
```



---
## test_asfreq_datetimeindex
```python
from test_asfreq import test_asfreq_datetimeindex
```



---
## test_asfreq_fillvalue
```python
from test_asfreq import test_asfreq_fillvalue
```



---
## test_asfreq_with_date_object_index
```python
from test_asfreq import test_asfreq_with_date_object_index
```



---
## test_asfreq_with_unsorted_index
```python
from test_asfreq import test_asfreq_with_unsorted_index
```



---
## test_asfreq_after_normalize
```python
from test_asfreq import test_asfreq_after_normalize
```



---
## test_asfreq_2ME
```python
from test_asfreq import test_asfreq_2ME
```



---
## test_asfreq_frequency_M_Q_Y_A_deprecated
```python
from test_asfreq import test_asfreq_frequency_M_Q_Y_A_deprecated
```



---
## TestToNumpy
```python
from test_to_numpy import TestToNumpy
```



---
## test_to_numpy
```python
from test_to_numpy import test_to_numpy
```



---
## test_to_numpy_dtype
```python
from test_to_numpy import test_to_numpy_dtype
```



---
## test_to_numpy_copy
```python
from test_to_numpy import test_to_numpy_copy
```



---
## test_to_numpy_mixed_dtype_to_str
```python
from test_to_numpy import test_to_numpy_mixed_dtype_to_str
```



---
## __name__
```python
from test_swapaxes import __name__
```



---
## TestSwapAxes
```python
from test_swapaxes import TestSwapAxes
```



---
## test_swapaxes
```python
from test_swapaxes import test_swapaxes
```



---
## test_swapaxes_noop
```python
from test_swapaxes import test_swapaxes_noop
```



---
## test_swapaxes_invalid_axis
```python
from test_swapaxes import test_swapaxes_invalid_axis
```



---
## test_round_empty_not_input
```python
from test_swapaxes import test_round_empty_not_input
```



---
## TestDataFrameInterpolate
```python
from test_interpolate import TestDataFrameInterpolate
```



---
## test_interpolate_complex
```python
from test_interpolate import test_interpolate_complex
```



---
## test_interpolate_datetimelike_values
```python
from test_interpolate import test_interpolate_datetimelike_values
```



---
## test_interpolate_inplace
```python
from test_interpolate import test_interpolate_inplace
```



---
## test_interp_basic
```python
from test_interpolate import test_interp_basic
```



---
## test_interp_basic_with_non_range_index
```python
from test_interpolate import test_interp_basic_with_non_range_index
```



---
## test_interp_empty
```python
from test_interpolate import test_interp_empty
```



---
## test_interp_bad_method
```python
from test_interpolate import test_interp_bad_method
```



---
## test_interp_combo
```python
from test_interpolate import test_interp_combo
```



---
## test_inerpolate_invalid_downcast
```python
from test_interpolate import test_inerpolate_invalid_downcast
```



---
## test_interp_nan_idx
```python
from test_interpolate import test_interp_nan_idx
```



---
## test_interp_various
```python
from test_interpolate import test_interp_various
```



---
## test_interp_alt_scipy
```python
from test_interpolate import test_interp_alt_scipy
```



---
## test_interp_rowwise
```python
from test_interpolate import test_interp_rowwise
```



---
## test_interp_axis_names
```python
from test_interpolate import test_interp_axis_names
```



---
## test_rowwise_alt
```python
from test_interpolate import test_rowwise_alt
```



---
## test_interp_leading_nans
```python
from test_interpolate import test_interp_leading_nans
```



---
## test_interp_raise_on_only_mixed
```python
from test_interpolate import test_interp_raise_on_only_mixed
```



---
## test_interp_raise_on_all_object_dtype
```python
from test_interpolate import test_interp_raise_on_all_object_dtype
```



---
## test_interp_inplace
```python
from test_interpolate import test_interp_inplace
```



---
## test_interp_inplace_row
```python
from test_interpolate import test_interp_inplace_row
```



---
## test_interp_ignore_all_good
```python
from test_interpolate import test_interp_ignore_all_good
```



---
## test_interp_time_inplace_axis
```python
from test_interpolate import test_interp_time_inplace_axis
```



---
## test_interp_string_axis
```python
from test_interpolate import test_interp_string_axis
```



---
## test_interp_fillna_methods
```python
from test_interpolate import test_interp_fillna_methods
```



---
## test_interpolate_empty_df
```python
from test_interpolate import test_interpolate_empty_df
```



---
## test_interpolate_ea
```python
from test_interpolate import test_interpolate_ea
```



---
## test_interpolate_ea_float
```python
from test_interpolate import test_interpolate_ea_float
```



---
## test_interpolate_arrow
```python
from test_interpolate import test_interpolate_arrow
```



---
## TestReindexSetIndex
```python
from test_reindex import TestReindexSetIndex
```



---
## TestDataFrameSelectReindex
```python
from test_reindex import TestDataFrameSelectReindex
```



---
## test_dti_set_index_reindex_datetimeindex
```python
from test_reindex import test_dti_set_index_reindex_datetimeindex
```



---
## test_dti_set_index_reindex_freq_with_tz
```python
from test_reindex import test_dti_set_index_reindex_freq_with_tz
```



---
## test_set_reset_index_intervalindex
```python
from test_reindex import test_set_reset_index_intervalindex
```



---
## test_setitem_reset_index_dtypes
```python
from test_reindex import test_setitem_reset_index_dtypes
```



---
## test_reindex_timestamp_with_fold
```python
from test_reindex import test_reindex_timestamp_with_fold
```



---
## test_reindex_tzaware_fill_value
```python
from test_reindex import test_reindex_tzaware_fill_value
```



---
## test_reindex_copies
```python
from test_reindex import test_reindex_copies
```



---
## test_reindex_copies_ea
```python
from test_reindex import test_reindex_copies_ea
```



---
## test_reindex_date_fill_value
```python
from test_reindex import test_reindex_date_fill_value
```



---
## test_reindex_with_multi_index
```python
from test_reindex import test_reindex_with_multi_index
```



---
## test_reindex_methods
```python
from test_reindex import test_reindex_methods
```



---
## test_reindex_methods_nearest_special
```python
from test_reindex import test_reindex_methods_nearest_special
```



---
## test_reindex_nearest_tz
```python
from test_reindex import test_reindex_nearest_tz
```



---
## test_reindex_nearest_tz_empty_frame
```python
from test_reindex import test_reindex_nearest_tz_empty_frame
```



---
## test_reindex_frame_add_nat
```python
from test_reindex import test_reindex_frame_add_nat
```



---
## test_reindex_frame_tz_ffill_bfill
```python
from test_reindex import test_reindex_frame_tz_ffill_bfill
```



---
## test_reindex_limit
```python
from test_reindex import test_reindex_limit
```



---
## test_reindex_level_verify_first_level
```python
from test_reindex import test_reindex_level_verify_first_level
```



---
## test_reindex_level_verify_first_level_repeats
```python
from test_reindex import test_reindex_level_verify_first_level_repeats
```



---
## test_reindex_level_verify_repeats
```python
from test_reindex import test_reindex_level_verify_repeats
```



---
## test_reindex_level_verify
```python
from test_reindex import test_reindex_level_verify
```



---
## test_non_monotonic_reindex_methods
```python
from test_reindex import test_non_monotonic_reindex_methods
```



---
## test_reindex_sparse
```python
from test_reindex import test_reindex_sparse
```



---
## test_reindex_name_remains
```python
from test_reindex import test_reindex_name_remains
```



---
## test_reindex_columns
```python
from test_reindex import test_reindex_columns
```



---
## test_reindex_columns_method
```python
from test_reindex import test_reindex_columns_method
```



---
## test_reindex_axes
```python
from test_reindex import test_reindex_axes
```



---
## test_reindex_uint_dtypes_fill_value
```python
from test_reindex import test_reindex_uint_dtypes_fill_value
```



---
## test_reindex_single_column_ea_index_and_columns
```python
from test_reindex import test_reindex_single_column_ea_index_and_columns
```



---
## test_reindex_dups
```python
from test_reindex import test_reindex_dups
```



---
## test_reindex_with_duplicate_columns
```python
from test_reindex import test_reindex_with_duplicate_columns
```



---
## test_reindex_axis_style
```python
from test_reindex import test_reindex_axis_style
```



---
## test_reindex_positional_raises
```python
from test_reindex import test_reindex_positional_raises
```



---
## test_reindex_axis_style_raises
```python
from test_reindex import test_reindex_axis_style_raises
```



---
## test_reindex_single_named_indexer
```python
from test_reindex import test_reindex_single_named_indexer
```



---
## test_reindex_api_equivalence
```python
from test_reindex import test_reindex_api_equivalence
```



---
## test_reindex_boolean
```python
from test_reindex import test_reindex_boolean
```



---
## test_reindex_objects
```python
from test_reindex import test_reindex_objects
```



---
## test_reindex_with_nans
```python
from test_reindex import test_reindex_with_nans
```



---
## test_reindex_multi
```python
from test_reindex import test_reindex_multi
```



---
## test_reindex_multi_categorical_time
```python
from test_reindex import test_reindex_multi_categorical_time
```



---
## test_reindex_with_categoricalindex
```python
from test_reindex import test_reindex_with_categoricalindex
```



---
## test_reindex_signature
```python
from test_reindex import test_reindex_signature
```



---
## test_reindex_multiindex_ffill_added_rows
```python
from test_reindex import test_reindex_multiindex_ffill_added_rows
```



---
## test_reindex_empty_frame
```python
from test_reindex import test_reindex_empty_frame
```



---
## test_reindex_empty
```python
from test_reindex import test_reindex_empty
```



---
## test_reindex_datetimelike_to_object
```python
from test_reindex import test_reindex_datetimelike_to_object
```



---
## test_reindex_not_category
```python
from test_reindex import test_reindex_not_category
```



---
## test_invalid_method
```python
from test_reindex import test_invalid_method
```



---
## f
```python
from test_reindex import f
```



---
## TestDataFrameToCSV
```python
from test_to_csv import TestDataFrameToCSV
```



---
## test_to_csv_from_csv1
```python
from test_to_csv import test_to_csv_from_csv1
```



---
## test_to_csv_from_csv2
```python
from test_to_csv import test_to_csv_from_csv2
```



---
## test_to_csv_from_csv3
```python
from test_to_csv import test_to_csv_from_csv3
```



---
## test_to_csv_from_csv4
```python
from test_to_csv import test_to_csv_from_csv4
```



---
## test_to_csv_from_csv5
```python
from test_to_csv import test_to_csv_from_csv5
```



---
## test_to_csv_cols_reordering
```python
from test_to_csv import test_to_csv_cols_reordering
```



---
## test_to_csv_new_dupe_cols
```python
from test_to_csv import test_to_csv_new_dupe_cols
```



---
## test_to_csv_dtnat
```python
from test_to_csv import test_to_csv_dtnat
```



---
## _return_result_expected
```python
from test_to_csv import _return_result_expected
```



---
## test_to_csv_nrows
```python
from test_to_csv import test_to_csv_nrows
```



---
## test_to_csv_idx_types
```python
from test_to_csv import test_to_csv_idx_types
```



---
## test_to_csv_idx_ncols
```python
from test_to_csv import test_to_csv_idx_ncols
```



---
## test_to_csv_dup_cols
```python
from test_to_csv import test_to_csv_dup_cols
```



---
## test_to_csv_empty
```python
from test_to_csv import test_to_csv_empty
```



---
## test_to_csv_chunksize
```python
from test_to_csv import test_to_csv_chunksize
```



---
## test_to_csv_params
```python
from test_to_csv import test_to_csv_params
```



---
## test_to_csv_from_csv_w_some_infs
```python
from test_to_csv import test_to_csv_from_csv_w_some_infs
```



---
## test_to_csv_from_csv_w_all_infs
```python
from test_to_csv import test_to_csv_from_csv_w_all_infs
```



---
## test_to_csv_no_index
```python
from test_to_csv import test_to_csv_no_index
```



---
## test_to_csv_with_mix_columns
```python
from test_to_csv import test_to_csv_with_mix_columns
```



---
## test_to_csv_headers
```python
from test_to_csv import test_to_csv_headers
```



---
## test_to_csv_multiindex
```python
from test_to_csv import test_to_csv_multiindex
```



---
## test_to_csv_float32_nanrep
```python
from test_to_csv import test_to_csv_float32_nanrep
```



---
## test_to_csv_withcommas
```python
from test_to_csv import test_to_csv_withcommas
```



---
## test_to_csv_mixed
```python
from test_to_csv import test_to_csv_mixed
```



---
## test_to_csv_dups_cols
```python
from test_to_csv import test_to_csv_dups_cols
```



---
## test_to_csv_dups_cols2
```python
from test_to_csv import test_to_csv_dups_cols2
```



---
## test_to_csv_chunking
```python
from test_to_csv import test_to_csv_chunking
```



---
## test_to_csv_wide_frame_formatting
```python
from test_to_csv import test_to_csv_wide_frame_formatting
```



---
## test_to_csv_bug
```python
from test_to_csv import test_to_csv_bug
```



---
## test_to_csv_unicode
```python
from test_to_csv import test_to_csv_unicode
```



---
## test_to_csv_unicode_index_col
```python
from test_to_csv import test_to_csv_unicode_index_col
```



---
## test_to_csv_stringio
```python
from test_to_csv import test_to_csv_stringio
```



---
## test_to_csv_float_format_over_decimal
```python
from test_to_csv import test_to_csv_float_format_over_decimal
```



---
## test_to_csv_unicodewriter_quoting
```python
from test_to_csv import test_to_csv_unicodewriter_quoting
```



---
## test_to_csv_quote_none
```python
from test_to_csv import test_to_csv_quote_none
```



---
## test_to_csv_index_no_leading_comma
```python
from test_to_csv import test_to_csv_index_no_leading_comma
```



---
## test_to_csv_lineterminators
```python
from test_to_csv import test_to_csv_lineterminators
```



---
## test_to_csv_from_csv_categorical
```python
from test_to_csv import test_to_csv_from_csv_categorical
```



---
## test_to_csv_with_dst_transitions
```python
from test_to_csv import test_to_csv_with_dst_transitions
```



---
## test_to_csv_with_dst_transitions_with_pickle
```python
from test_to_csv import test_to_csv_with_dst_transitions_with_pickle
```



---
## test_to_csv_quoting
```python
from test_to_csv import test_to_csv_quoting
```



---
## test_period_index_date_overflow
```python
from test_to_csv import test_period_index_date_overflow
```



---
## test_multi_index_header
```python
from test_to_csv import test_multi_index_header
```



---
## test_gz_lineend
```python
from test_to_csv import test_gz_lineend
```



---
## test_to_csv_numpy_16_bug
```python
from test_to_csv import test_to_csv_numpy_16_bug
```



---
## test_to_csv_na_quoting
```python
from test_to_csv import test_to_csv_na_quoting
```



---
## test_to_csv_categorical_and_ea
```python
from test_to_csv import test_to_csv_categorical_and_ea
```



---
## test_to_csv_categorical_and_interval
```python
from test_to_csv import test_to_csv_categorical_and_interval
```



---
## make_dtnat_arr
```python
from test_to_csv import make_dtnat_arr
```



---
## _to_uni
```python
from test_to_csv import _to_uni
```



---
## create_cols
```python
from test_to_csv import create_cols
```



---
## _make_frame
```python
from test_to_csv import _make_frame
```



---
## __name__
```python
from test_from_records import __name__
```



---
## TestFromRecords
```python
from test_from_records import TestFromRecords
```



---
## test_from_records_dt64tz_frame
```python
from test_from_records import test_from_records_dt64tz_frame
```



---
## test_from_records_with_datetimes
```python
from test_from_records import test_from_records_with_datetimes
```



---
## test_from_records_sequencelike
```python
from test_from_records import test_from_records_sequencelike
```



---
## test_from_records_sequencelike_empty
```python
from test_from_records import test_from_records_sequencelike_empty
```



---
## test_from_records_dictlike
```python
from test_from_records import test_from_records_dictlike
```



---
## test_from_records_with_index_data
```python
from test_from_records import test_from_records_with_index_data
```



---
## test_from_records_bad_index_column
```python
from test_from_records import test_from_records_bad_index_column
```



---
## test_from_records_non_tuple
```python
from test_from_records import test_from_records_non_tuple
```



---
## test_from_records_len0_with_columns
```python
from test_from_records import test_from_records_len0_with_columns
```



---
## test_from_records_series_list_dict
```python
from test_from_records import test_from_records_series_list_dict
```



---
## test_from_records_series_categorical_index
```python
from test_from_records import test_from_records_series_categorical_index
```



---
## test_frame_from_records_utc
```python
from test_from_records import test_frame_from_records_utc
```



---
## test_from_records_to_records
```python
from test_from_records import test_from_records_to_records
```



---
## test_from_records_nones
```python
from test_from_records import test_from_records_nones
```



---
## test_from_records_iterator
```python
from test_from_records import test_from_records_iterator
```



---
## test_from_records_tuples_generator
```python
from test_from_records import test_from_records_tuples_generator
```



---
## test_from_records_lists_generator
```python
from test_from_records import test_from_records_lists_generator
```



---
## test_from_records_columns_not_modified
```python
from test_from_records import test_from_records_columns_not_modified
```



---
## test_from_records_decimal
```python
from test_from_records import test_from_records_decimal
```



---
## test_from_records_duplicates
```python
from test_from_records import test_from_records_duplicates
```



---
## test_from_records_set_index_name
```python
from test_from_records import test_from_records_set_index_name
```



---
## test_from_records_misc_brokenness
```python
from test_from_records import test_from_records_misc_brokenness
```



---
## test_from_records_misc_brokenness2
```python
from test_from_records import test_from_records_misc_brokenness2
```



---
## test_from_records_misc_brokenness3
```python
from test_from_records import test_from_records_misc_brokenness3
```



---
## test_from_records_empty
```python
from test_from_records import test_from_records_empty
```



---
## test_from_records_empty_with_nonempty_fields_gh3682
```python
from test_from_records import test_from_records_empty_with_nonempty_fields_gh3682
```



---
## test_from_records_empty2
```python
from test_from_records import test_from_records_empty2
```



---
## Record
```python
from test_from_records import Record
```



---
## tuple_generator
```python
from test_from_records import tuple_generator
```



---
## list_generator
```python
from test_from_records import list_generator
```



---
## create_dict
```python
from test_from_records import create_dict
```



---
## __init__
```python
from test_from_records import __init__
```



---
## __getitem__
```python
from test_from_records import __getitem__
```



---
## __iter__
```python
from test_from_records import __iter__
```



---
## __name__
```python
from test_from_dict import __name__
```



---
## TestFromDict
```python
from test_from_dict import TestFromDict
```



---
## test_constructor_list_of_odicts
```python
from test_from_dict import test_constructor_list_of_odicts
```



---
## test_constructor_single_row
```python
from test_from_dict import test_constructor_single_row
```



---
## test_constructor_list_of_series
```python
from test_from_dict import test_constructor_list_of_series
```



---
## test_constructor_orient
```python
from test_from_dict import test_constructor_orient
```



---
## test_constructor_from_ordered_dict
```python
from test_from_dict import test_constructor_from_ordered_dict
```



---
## test_from_dict_columns_parameter
```python
from test_from_dict import test_from_dict_columns_parameter
```



---
## test_constructor_from_dict_tuples
```python
from test_from_dict import test_constructor_from_dict_tuples
```



---
## test_frame_dict_constructor_empty_series
```python
from test_from_dict import test_frame_dict_constructor_empty_series
```



---
## test_from_dict_scalars_requires_index
```python
from test_from_dict import test_from_dict_scalars_requires_index
```



---
## test_from_dict_orient_invalid
```python
from test_from_dict import test_from_dict_orient_invalid
```



---
## test_from_dict_order_with_single_column
```python
from test_from_dict import test_from_dict_order_with_single_column
```



---
## __name__
```python
from test_insert import __name__
```



---
## TestDataFrameInsert
```python
from test_insert import TestDataFrameInsert
```



---
## test_insert
```python
from test_insert import test_insert
```



---
## test_insert_column_bug_4032
```python
from test_insert import test_insert_column_bug_4032
```



---
## test_insert_with_columns_dups
```python
from test_insert import test_insert_with_columns_dups
```



---
## test_insert_item_cache
```python
from test_insert import test_insert_item_cache
```



---
## test_insert_EA_no_warning
```python
from test_insert import test_insert_EA_no_warning
```



---
## test_insert_frame
```python
from test_insert import test_insert_frame
```



---
## test_insert_int64_loc
```python
from test_insert import test_insert_int64_loc
```



---
## TestSetValue
```python
from test_set_value import TestSetValue
```



---
## test_set_value
```python
from test_set_value import test_set_value
```



---
## test_set_value_resize
```python
from test_set_value import test_set_value_resize
```



---
## test_set_value_with_index_dtype_change
```python
from test_set_value import test_set_value_with_index_dtype_change
```



---
## TestDataFrameMask
```python
from test_mask import TestDataFrameMask
```



---
## test_mask_stringdtype
```python
from test_mask import test_mask_stringdtype
```



---
## test_mask_where_dtype_timedelta
```python
from test_mask import test_mask_where_dtype_timedelta
```



---
## test_mask_return_dtype
```python
from test_mask import test_mask_return_dtype
```



---
## test_mask_inplace_no_other
```python
from test_mask import test_mask_inplace_no_other
```



---
## test_mask2
```python
from test_mask import test_mask2
```



---
## test_mask_edge_case_1xN_frame
```python
from test_mask import test_mask_edge_case_1xN_frame
```



---
## test_mask_callable
```python
from test_mask import test_mask_callable
```



---
## test_mask_dtype_bool_conversion
```python
from test_mask import test_mask_dtype_bool_conversion
```



---
## four_level_index_dataframe
```python
from test_xs import four_level_index_dataframe
```



---
## TestXS
```python
from test_xs import TestXS
```



---
## test_xs
```python
from test_xs import test_xs
```



---
## test_xs_corner
```python
from test_xs import test_xs_corner
```



---
## test_xs_duplicates
```python
from test_xs import test_xs_duplicates
```



---
## test_xs_keep_level
```python
from test_xs import test_xs_keep_level
```



---
## test_xs_view
```python
from test_xs import test_xs_view
```



---
## test_xs_doc_example
```python
from test_xs import test_xs_doc_example
```



---
## test_xs_integer_key
```python
from test_xs import test_xs_integer_key
```



---
## test_xs_level
```python
from test_xs import test_xs_level
```



---
## test_xs_level_eq_2
```python
from test_xs import test_xs_level_eq_2
```



---
## test_xs_setting_with_copy_error
```python
from test_xs import test_xs_setting_with_copy_error
```



---
## test_xs_setting_with_copy_error_multiple
```python
from test_xs import test_xs_setting_with_copy_error_multiple
```



---
## test_xs_with_duplicates
```python
from test_xs import test_xs_with_duplicates
```



---
## test_xs_missing_values_in_index
```python
from test_xs import test_xs_missing_values_in_index
```



---
## test_xs_named_levels_axis_eq_1
```python
from test_xs import test_xs_named_levels_axis_eq_1
```



---
## test_xs_level_multiple
```python
from test_xs import test_xs_level_multiple
```



---
## test_xs_level0
```python
from test_xs import test_xs_level0
```



---
## test_xs_values
```python
from test_xs import test_xs_values
```



---
## test_xs_loc_equality
```python
from test_xs import test_xs_loc_equality
```



---
## test_xs_IndexSlice_argument_not_implemented
```python
from test_xs import test_xs_IndexSlice_argument_not_implemented
```



---
## test_xs_levels_raises
```python
from test_xs import test_xs_levels_raises
```



---
## test_xs_multiindex_droplevel_false
```python
from test_xs import test_xs_multiindex_droplevel_false
```



---
## test_xs_droplevel_false
```python
from test_xs import test_xs_droplevel_false
```



---
## test_xs_droplevel_false_view
```python
from test_xs import test_xs_droplevel_false_view
```



---
## test_xs_list_indexer_droplevel_false
```python
from test_xs import test_xs_list_indexer_droplevel_false
```



---
## TestGetitem
```python
from test_getitem import TestGetitem
```



---
## TestGetitemListLike
```python
from test_getitem import TestGetitemListLike
```



---
## TestGetitemSlice
```python
from test_getitem import TestGetitemSlice
```



---
## test_getitem_unused_level_raises
```python
from test_getitem import test_getitem_unused_level_raises
```



---
## test_getitem_periodindex
```python
from test_getitem import test_getitem_periodindex
```



---
## test_getitem_list_of_labels_categoricalindex_cols
```python
from test_getitem import test_getitem_list_of_labels_categoricalindex_cols
```



---
## test_getitem_sparse_column_return_type_and_dtype
```python
from test_getitem import test_getitem_sparse_column_return_type_and_dtype
```



---
## test_getitem_string_columns
```python
from test_getitem import test_getitem_string_columns
```



---
## test_getitem_list_missing_key
```python
from test_getitem import test_getitem_list_missing_key
```



---
## test_getitem_list_duplicates
```python
from test_getitem import test_getitem_list_duplicates
```



---
## test_getitem_dupe_cols
```python
from test_getitem import test_getitem_dupe_cols
```



---
## test_getitem_listlike
```python
from test_getitem import test_getitem_listlike
```



---
## test_getitem_iloc_generator
```python
from test_getitem import test_getitem_iloc_generator
```



---
## test_getitem_iloc_two_dimensional_generator
```python
from test_getitem import test_getitem_iloc_two_dimensional_generator
```



---
## test_getitem_iloc_dateoffset_days
```python
from test_getitem import test_getitem_iloc_dateoffset_days
```



---
## test_loc_multiindex_columns_one_level
```python
from test_getitem import test_loc_multiindex_columns_one_level
```



---
## test_getitem_bool_mask_categorical_index
```python
from test_getitem import test_getitem_bool_mask_categorical_index
```



---
## test_getitem_bool_mask_duplicate_columns_mixed_dtypes
```python
from test_getitem import test_getitem_bool_mask_duplicate_columns_mixed_dtypes
```



---
## df_dup_cols
```python
from test_getitem import df_dup_cols
```



---
## test_getitem_boolean_frame_unaligned_with_duplicate_columns
```python
from test_getitem import test_getitem_boolean_frame_unaligned_with_duplicate_columns
```



---
## test_getitem_boolean_series_with_duplicate_columns
```python
from test_getitem import test_getitem_boolean_series_with_duplicate_columns
```



---
## test_getitem_boolean_frame_with_duplicate_columns
```python
from test_getitem import test_getitem_boolean_frame_with_duplicate_columns
```



---
## test_getitem_empty_frame_with_boolean
```python
from test_getitem import test_getitem_empty_frame_with_boolean
```



---
## test_getitem_returns_view_when_column_is_unique_in_df
```python
from test_getitem import test_getitem_returns_view_when_column_is_unique_in_df
```



---
## test_getitem_frozenset_unique_in_column
```python
from test_getitem import test_getitem_frozenset_unique_in_column
```



---
## test_getitem_slice_float64
```python
from test_getitem import test_getitem_slice_float64
```



---
## test_getitem_datetime_slice
```python
from test_getitem import test_getitem_datetime_slice
```



---
## test_getitem_slice_same_dim_only_one_axis
```python
from test_getitem import test_getitem_slice_same_dim_only_one_axis
```



---
## __name__
```python
from test_get_value import __name__
```



---
## TestGetValue
```python
from test_get_value import TestGetValue
```



---
## test_get_set_value_no_partial_indexing
```python
from test_get_value import test_get_set_value_no_partial_indexing
```



---
## test_get_value
```python
from test_get_value import test_get_value
```



---
## TestDataFrameSetItem
```python
from test_setitem import TestDataFrameSetItem
```



---
## TestSetitemTZAwareValues
```python
from test_setitem import TestSetitemTZAwareValues
```



---
## TestDataFrameSetItemWithExpansion
```python
from test_setitem import TestDataFrameSetItemWithExpansion
```



---
## TestDataFrameSetItemSlicing
```python
from test_setitem import TestDataFrameSetItemSlicing
```



---
## TestDataFrameSetItemCallable
```python
from test_setitem import TestDataFrameSetItemCallable
```



---
## TestDataFrameSetItemBooleanMask
```python
from test_setitem import TestDataFrameSetItemBooleanMask
```



---
## TestDataFrameSetitemCopyViewSemantics
```python
from test_setitem import TestDataFrameSetitemCopyViewSemantics
```



---
## test_full_setter_loc_incompatible_dtype
```python
from test_setitem import test_full_setter_loc_incompatible_dtype
```



---
## test_setitem_partial_row_multiple_columns
```python
from test_setitem import test_setitem_partial_row_multiple_columns
```



---
## test_setitem_str_subclass
```python
from test_setitem import test_setitem_str_subclass
```



---
## test_setitem_dtype
```python
from test_setitem import test_setitem_dtype
```



---
## test_setitem_list_not_dataframe
```python
from test_setitem import test_setitem_list_not_dataframe
```



---
## test_setitem_error_msmgs
```python
from test_setitem import test_setitem_error_msmgs
```



---
## test_setitem_benchmark
```python
from test_setitem import test_setitem_benchmark
```



---
## test_setitem_different_dtype
```python
from test_setitem import test_setitem_different_dtype
```



---
## test_setitem_empty_columns
```python
from test_setitem import test_setitem_empty_columns
```



---
## test_setitem_dt64_index_empty_columns
```python
from test_setitem import test_setitem_dt64_index_empty_columns
```



---
## test_setitem_timestamp_empty_columns
```python
from test_setitem import test_setitem_timestamp_empty_columns
```



---
## test_setitem_wrong_length_categorical_dtype_raises
```python
from test_setitem import test_setitem_wrong_length_categorical_dtype_raises
```



---
## test_setitem_with_sparse_value
```python
from test_setitem import test_setitem_with_sparse_value
```



---
## test_setitem_with_unaligned_sparse_value
```python
from test_setitem import test_setitem_with_unaligned_sparse_value
```



---
## test_setitem_period_preserves_dtype
```python
from test_setitem import test_setitem_period_preserves_dtype
```



---
## test_setitem_dict_preserves_dtypes
```python
from test_setitem import test_setitem_dict_preserves_dtypes
```



---
## test_setitem_extension_types
```python
from test_setitem import test_setitem_extension_types
```



---
## test_setitem_with_ea_name
```python
from test_setitem import test_setitem_with_ea_name
```



---
## test_setitem_dt64_ndarray_with_NaT_and_diff_time_units
```python
from test_setitem import test_setitem_dt64_ndarray_with_NaT_and_diff_time_units
```



---
## test_frame_setitem_datetime64_col_other_units
```python
from test_setitem import test_frame_setitem_datetime64_col_other_units
```



---
## test_frame_setitem_existing_datetime64_col_other_units
```python
from test_setitem import test_frame_setitem_existing_datetime64_col_other_units
```



---
## test_setitem_dt64tz
```python
from test_setitem import test_setitem_dt64tz
```



---
## test_setitem_periodindex
```python
from test_setitem import test_setitem_periodindex
```



---
## test_setitem_complete_column_with_array
```python
from test_setitem import test_setitem_complete_column_with_array
```



---
## test_setitem_period_d_dtype
```python
from test_setitem import test_setitem_period_d_dtype
```



---
## test_setitem_bool_with_numeric_index
```python
from test_setitem import test_setitem_bool_with_numeric_index
```



---
## test_setitem_frame_length_0_str_key
```python
from test_setitem import test_setitem_frame_length_0_str_key
```



---
## test_setitem_frame_duplicate_columns
```python
from test_setitem import test_setitem_frame_duplicate_columns
```



---
## test_setitem_frame_duplicate_columns_size_mismatch
```python
from test_setitem import test_setitem_frame_duplicate_columns_size_mismatch
```



---
## test_setitem_df_wrong_column_number
```python
from test_setitem import test_setitem_df_wrong_column_number
```



---
## test_setitem_listlike_indexer_duplicate_columns
```python
from test_setitem import test_setitem_listlike_indexer_duplicate_columns
```



---
## test_setitem_listlike_indexer_duplicate_columns_not_equal_length
```python
from test_setitem import test_setitem_listlike_indexer_duplicate_columns_not_equal_length
```



---
## test_setitem_intervals
```python
from test_setitem import test_setitem_intervals
```



---
## test_setitem_categorical
```python
from test_setitem import test_setitem_categorical
```



---
## test_setitem_with_empty_listlike
```python
from test_setitem import test_setitem_with_empty_listlike
```



---
## test_setitem_same_column
```python
from test_setitem import test_setitem_same_column
```



---
## test_setitem_multi_index
```python
from test_setitem import test_setitem_multi_index
```



---
## test_setitem_list_missing_columns
```python
from test_setitem import test_setitem_list_missing_columns
```



---
## test_setitem_list_of_tuples
```python
from test_setitem import test_setitem_list_of_tuples
```



---
## test_setitem_iloc_generator
```python
from test_setitem import test_setitem_iloc_generator
```



---
## test_setitem_iloc_two_dimensional_generator
```python
from test_setitem import test_setitem_iloc_two_dimensional_generator
```



---
## test_setitem_dtypes_bytes_type_to_object
```python
from test_setitem import test_setitem_dtypes_bytes_type_to_object
```



---
## test_boolean_mask_nullable_int64
```python
from test_setitem import test_boolean_mask_nullable_int64
```



---
## test_setitem_ea_dtype_rhs_series
```python
from test_setitem import test_setitem_ea_dtype_rhs_series
```



---
## test_setitem_npmatrix_2d
```python
from test_setitem import test_setitem_npmatrix_2d
```



---
## test_setitem_aligning_dict_with_index
```python
from test_setitem import test_setitem_aligning_dict_with_index
```



---
## test_setitem_rhs_dataframe
```python
from test_setitem import test_setitem_rhs_dataframe
```



---
## test_setitem_frame_overwrite_with_ea_dtype
```python
from test_setitem import test_setitem_frame_overwrite_with_ea_dtype
```



---
## test_setitem_string_option_object_index
```python
from test_setitem import test_setitem_string_option_object_index
```



---
## test_setitem_frame_midx_columns
```python
from test_setitem import test_setitem_frame_midx_columns
```



---
## test_loc_setitem_ea_dtype
```python
from test_setitem import test_loc_setitem_ea_dtype
```



---
## test_setitem_object_inferring
```python
from test_setitem import test_setitem_object_inferring
```



---
## idx
```python
from test_setitem import idx
```



---
## test_setitem_dt64series
```python
from test_setitem import test_setitem_dt64series
```



---
## test_setitem_datetimeindex
```python
from test_setitem import test_setitem_datetimeindex
```



---
## test_setitem_object_array_of_tzaware_datetimes
```python
from test_setitem import test_setitem_object_array_of_tzaware_datetimes
```



---
## test_setitem_listlike_views
```python
from test_setitem import test_setitem_listlike_views
```



---
## test_setitem_string_column_numpy_dtype_raising
```python
from test_setitem import test_setitem_string_column_numpy_dtype_raising
```



---
## test_setitem_empty_df_duplicate_columns
```python
from test_setitem import test_setitem_empty_df_duplicate_columns
```



---
## test_setitem_with_expansion_categorical_dtype
```python
from test_setitem import test_setitem_with_expansion_categorical_dtype
```



---
## test_setitem_scalars_no_index
```python
from test_setitem import test_setitem_scalars_no_index
```



---
## test_setitem_newcol_tuple_key
```python
from test_setitem import test_setitem_newcol_tuple_key
```



---
## test_frame_setitem_newcol_timestamp
```python
from test_setitem import test_frame_setitem_newcol_timestamp
```



---
## test_frame_setitem_rangeindex_into_new_col
```python
from test_setitem import test_frame_setitem_rangeindex_into_new_col
```



---
## test_setitem_frame_keep_ea_dtype
```python
from test_setitem import test_setitem_frame_keep_ea_dtype
```



---
## test_loc_expansion_with_timedelta_type
```python
from test_setitem import test_loc_expansion_with_timedelta_type
```



---
## test_setitem_slice_position
```python
from test_setitem import test_setitem_slice_position
```



---
## test_setitem_slice_indexer_broadcasting_rhs
```python
from test_setitem import test_setitem_slice_indexer_broadcasting_rhs
```



---
## test_setitem_list_indexer_broadcasting_rhs
```python
from test_setitem import test_setitem_list_indexer_broadcasting_rhs
```



---
## test_setitem_slice_broadcasting_rhs_mixed_dtypes
```python
from test_setitem import test_setitem_slice_broadcasting_rhs_mixed_dtypes
```



---
## test_setitem_callable
```python
from test_setitem import test_setitem_callable
```



---
## test_setitem_other_callable
```python
from test_setitem import test_setitem_other_callable
```



---
## test_setitem_boolean_mask
```python
from test_setitem import test_setitem_boolean_mask
```



---
## test_setitem_loc_empty_indexer_raises_with_non_empty_value
```python
from test_setitem import test_setitem_loc_empty_indexer_raises_with_non_empty_value
```



---
## test_setitem_loc_only_false_indexer_dtype_changed
```python
from test_setitem import test_setitem_loc_only_false_indexer_dtype_changed
```



---
## test_setitem_boolean_mask_aligning
```python
from test_setitem import test_setitem_boolean_mask_aligning
```



---
## test_setitem_mask_categorical
```python
from test_setitem import test_setitem_mask_categorical
```



---
## test_setitem_empty_frame_with_boolean
```python
from test_setitem import test_setitem_empty_frame_with_boolean
```



---
## test_setitem_boolean_indexing
```python
from test_setitem import test_setitem_boolean_indexing
```



---
## test_loc_setitem_all_false_boolean_two_blocks
```python
from test_setitem import test_loc_setitem_all_false_boolean_two_blocks
```



---
## test_setitem_ea_boolean_mask
```python
from test_setitem import test_setitem_ea_boolean_mask
```



---
## test_setitem_always_copy
```python
from test_setitem import test_setitem_always_copy
```



---
## test_setitem_partial_column_inplace
```python
from test_setitem import test_setitem_partial_column_inplace
```



---
## test_setitem_duplicate_columns_not_inplace
```python
from test_setitem import test_setitem_duplicate_columns_not_inplace
```



---
## test_setitem_same_dtype_not_inplace
```python
from test_setitem import test_setitem_same_dtype_not_inplace
```



---
## test_setitem_listlike_key_scalar_value_not_inplace
```python
from test_setitem import test_setitem_listlike_key_scalar_value_not_inplace
```



---
## test_setitem_not_operating_inplace
```python
from test_setitem import test_setitem_not_operating_inplace
```



---
## test_setitem_column_update_inplace
```python
from test_setitem import test_setitem_column_update_inplace
```



---
## test_setitem_column_frame_as_category
```python
from test_setitem import test_setitem_column_frame_as_category
```



---
## test_setitem_iloc_with_numpy_array
```python
from test_setitem import test_setitem_iloc_with_numpy_array
```



---
## test_setitem_frame_dup_cols_dtype
```python
from test_setitem import test_setitem_frame_dup_cols_dtype
```



---
## test_frame_setitem_empty_dataframe
```python
from test_setitem import test_frame_setitem_empty_dataframe
```



---
## mystring
```python
from test_setitem import mystring
```



---
## inc
```python
from test_setitem import inc
```



---
## TestDataFrameIndexing
```python
from test_indexing import TestDataFrameIndexing
```



---
## TestDataFrameIndexingUInt64
```python
from test_indexing import TestDataFrameIndexingUInt64
```



---
## test_object_casting_indexing_wraps_datetimelike
```python
from test_indexing import test_object_casting_indexing_wraps_datetimelike
```



---
## TestLocILocDataFrameCategorical
```python
from test_indexing import TestLocILocDataFrameCategorical
```



---
## test_adding_new_conditional_column
```python
from test_indexing import test_adding_new_conditional_column
```



---
## test_adding_new_conditional_column_with_string
```python
from test_indexing import test_adding_new_conditional_column_with_string
```



---
## test_add_new_column_infer_string
```python
from test_indexing import test_add_new_column_infer_string
```



---
## test_getitem2
```python
from test_indexing import test_getitem2
```



---
## test_setitem_list2
```python
from test_indexing import test_setitem_list2
```



---
## test_getitem_boolean
```python
from test_indexing import test_getitem_boolean
```



---
## test_getitem_boolean_casting
```python
from test_indexing import test_getitem_boolean_casting
```



---
## test_getitem_boolean_list
```python
from test_indexing import test_getitem_boolean_list
```



---
## test_getitem_boolean_iadd
```python
from test_indexing import test_getitem_boolean_iadd
```



---
## test_boolean_index_empty_corner
```python
from test_indexing import test_boolean_index_empty_corner
```



---
## test_getitem_ix_mixed_integer
```python
from test_indexing import test_getitem_ix_mixed_integer
```



---
## test_getitem_ix_mixed_integer2
```python
from test_indexing import test_getitem_ix_mixed_integer2
```



---
## test_getattr
```python
from test_indexing import test_getattr
```



---
## test_setattr_column
```python
from test_indexing import test_setattr_column
```



---
## test_setitem2
```python
from test_indexing import test_setitem2
```



---
## test_setitem_boolean
```python
from test_indexing import test_setitem_boolean
```



---
## test_setitem_cast
```python
from test_indexing import test_setitem_cast
```



---
## test_setitem_corner
```python
from test_indexing import test_setitem_corner
```



---
## test_setitem_corner2
```python
from test_indexing import test_setitem_corner2
```



---
## test_setitem_ambig
```python
from test_indexing import test_setitem_ambig
```



---
## test_setitem_None
```python
from test_indexing import test_setitem_None
```



---
## test_loc_setitem_boolean_mask_allfalse
```python
from test_indexing import test_loc_setitem_boolean_mask_allfalse
```



---
## test_getitem_fancy_slice_integers_step
```python
from test_indexing import test_getitem_fancy_slice_integers_step
```



---
## test_getitem_setitem_integer_slice_keyerrors
```python
from test_indexing import test_getitem_setitem_integer_slice_keyerrors
```



---
## test_fancy_getitem_slice_mixed
```python
from test_indexing import test_fancy_getitem_slice_mixed
```



---
## test_getitem_setitem_non_ix_labels
```python
from test_indexing import test_getitem_setitem_non_ix_labels
```



---
## test_ix_multi_take
```python
from test_indexing import test_ix_multi_take
```



---
## test_getitem_fancy_scalar
```python
from test_indexing import test_getitem_fancy_scalar
```



---
## test_setitem_fancy_scalar
```python
from test_indexing import test_setitem_fancy_scalar
```



---
## test_getitem_fancy_boolean
```python
from test_indexing import test_getitem_fancy_boolean
```



---
## test_setitem_fancy_boolean
```python
from test_indexing import test_setitem_fancy_boolean
```



---
## test_getitem_fancy_ints
```python
from test_indexing import test_getitem_fancy_ints
```



---
## test_getitem_setitem_boolean_misaligned
```python
from test_indexing import test_getitem_setitem_boolean_misaligned
```



---
## test_getitem_setitem_boolean_multi
```python
from test_indexing import test_getitem_setitem_boolean_multi
```



---
## test_getitem_setitem_float_labels
```python
from test_indexing import test_getitem_setitem_float_labels
```



---
## test_setitem_single_column_mixed_datetime
```python
from test_indexing import test_setitem_single_column_mixed_datetime
```



---
## test_setitem_mixed_datetime
```python
from test_indexing import test_setitem_mixed_datetime
```



---
## test_setitem_frame_float
```python
from test_indexing import test_setitem_frame_float
```



---
## test_setitem_frame_mixed
```python
from test_indexing import test_setitem_frame_mixed
```



---
## test_setitem_frame_mixed_rows_unaligned
```python
from test_indexing import test_setitem_frame_mixed_rows_unaligned
```



---
## test_setitem_frame_mixed_key_unaligned
```python
from test_indexing import test_setitem_frame_mixed_key_unaligned
```



---
## test_setitem_frame_mixed_ndarray
```python
from test_indexing import test_setitem_frame_mixed_ndarray
```



---
## test_setitem_frame_upcast
```python
from test_indexing import test_setitem_frame_upcast
```



---
## test_setitem_frame_align
```python
from test_indexing import test_setitem_frame_align
```



---
## test_getitem_setitem_ix_duplicates
```python
from test_indexing import test_getitem_setitem_ix_duplicates
```



---
## test_getitem_ix_boolean_duplicates_multiple
```python
from test_indexing import test_getitem_ix_boolean_duplicates_multiple
```



---
## test_getitem_setitem_ix_bool_keyerror
```python
from test_indexing import test_getitem_setitem_ix_bool_keyerror
```



---
## test_single_element_ix_dont_upcast
```python
from test_indexing import test_single_element_ix_dont_upcast
```



---
## test_iloc_callable_tuple_return_value
```python
from test_indexing import test_iloc_callable_tuple_return_value
```



---
## test_iloc_row
```python
from test_indexing import test_iloc_row
```



---
## test_iloc_row_slice_view
```python
from test_indexing import test_iloc_row_slice_view
```



---
## test_iloc_col
```python
from test_indexing import test_iloc_col
```



---
## test_iloc_col_slice_view
```python
from test_indexing import test_iloc_col_slice_view
```



---
## test_loc_duplicates
```python
from test_indexing import test_loc_duplicates
```



---
## test_setitem_with_unaligned_tz_aware_datetime_column
```python
from test_indexing import test_setitem_with_unaligned_tz_aware_datetime_column
```



---
## test_loc_setitem_datetimelike_with_inference
```python
from test_indexing import test_loc_setitem_datetimelike_with_inference
```



---
## test_getitem_boolean_indexing_mixed
```python
from test_indexing import test_getitem_boolean_indexing_mixed
```



---
## test_type_error_multiindex
```python
from test_indexing import test_type_error_multiindex
```



---
## test_getitem_interval_index_partial_indexing
```python
from test_indexing import test_getitem_interval_index_partial_indexing
```



---
## test_setitem_array_as_cell_value
```python
from test_indexing import test_setitem_array_as_cell_value
```



---
## test_iloc_setitem_nullable_2d_values
```python
from test_indexing import test_iloc_setitem_nullable_2d_values
```



---
## test_getitem_segfault_with_empty_like_object
```python
from test_indexing import test_getitem_segfault_with_empty_like_object
```



---
## test_setting_mismatched_na_into_nullable_fails
```python
from test_indexing import test_setting_mismatched_na_into_nullable_fails
```



---
## test_loc_expand_empty_frame_keep_index_name
```python
from test_indexing import test_loc_expand_empty_frame_keep_index_name
```



---
## test_loc_expand_empty_frame_keep_midx_names
```python
from test_indexing import test_loc_expand_empty_frame_keep_midx_names
```



---
## test_loc_setitem_rhs_frame
```python
from test_indexing import test_loc_setitem_rhs_frame
```



---
## test_iloc_setitem_enlarge_no_warning
```python
from test_indexing import test_iloc_setitem_enlarge_no_warning
```



---
## test_loc_internals_not_updated_correctly
```python
from test_indexing import test_loc_internals_not_updated_correctly
```



---
## test_iloc_setitem_string_list_na
```python
from test_indexing import test_iloc_setitem_string_list_na
```



---
## test_iloc_setitem_string_na
```python
from test_indexing import test_iloc_setitem_string_na
```



---
## test_iloc_setitem_ea_null_slice_length_one_list
```python
from test_indexing import test_iloc_setitem_ea_null_slice_length_one_list
```



---
## test_loc_named_tuple_for_midx
```python
from test_indexing import test_loc_named_tuple_for_midx
```



---
## test_set_2d_casting_date_to_int
```python
from test_indexing import test_set_2d_casting_date_to_int
```



---
## test_loc_setitem_reordering_with_all_true_indexer
```python
from test_indexing import test_loc_setitem_reordering_with_all_true_indexer
```



---
## test_loc_rhs_empty_warning
```python
from test_indexing import test_loc_rhs_empty_warning
```



---
## test_iloc_ea_series_indexer
```python
from test_indexing import test_iloc_ea_series_indexer
```



---
## test_iloc_ea_series_indexer_with_na
```python
from test_indexing import test_iloc_ea_series_indexer_with_na
```



---
## test_loc_bool_multiindex
```python
from test_indexing import test_loc_bool_multiindex
```



---
## test_loc_datetime_assignment_dtype_does_not_change
```python
from test_indexing import test_loc_datetime_assignment_dtype_does_not_change
```



---
## test_setitem_value_coercing_dtypes
```python
from test_indexing import test_setitem_value_coercing_dtypes
```



---
## orig
```python
from test_indexing import orig
```



---
## exp_single_row
```python
from test_indexing import exp_single_row
```



---
## exp_multi_row
```python
from test_indexing import exp_multi_row
```



---
## exp_parts_cats_col
```python
from test_indexing import exp_parts_cats_col
```



---
## exp_single_cats_value
```python
from test_indexing import exp_single_cats_value
```



---
## test_loc_iloc_setitem_list_of_lists
```python
from test_indexing import test_loc_iloc_setitem_list_of_lists
```



---
## test_loc_iloc_at_iat_setitem_single_value_in_categories
```python
from test_indexing import test_loc_iloc_at_iat_setitem_single_value_in_categories
```



---
## test_loc_iloc_setitem_mask_single_value_in_categories
```python
from test_indexing import test_loc_iloc_setitem_mask_single_value_in_categories
```



---
## test_loc_iloc_setitem_full_row_non_categorical_rhs
```python
from test_indexing import test_loc_iloc_setitem_full_row_non_categorical_rhs
```



---
## test_loc_iloc_setitem_partial_col_categorical_rhs
```python
from test_indexing import test_loc_iloc_setitem_partial_col_categorical_rhs
```



---
## test_loc_iloc_setitem_non_categorical_rhs
```python
from test_indexing import test_loc_iloc_setitem_non_categorical_rhs
```



---
## test_getitem_preserve_object_index_with_dates
```python
from test_indexing import test_getitem_preserve_object_index_with_dates
```



---
## test_loc_on_multiindex_one_level
```python
from test_indexing import test_loc_on_multiindex_one_level
```



---
## TestDataFrameTake
```python
from test_take import TestDataFrameTake
```



---
## test_take_slices_deprecated
```python
from test_take import test_take_slices_deprecated
```



---
## test_take_mixed_type
```python
from test_take import test_take_mixed_type
```



---
## test_take_mixed_numeric
```python
from test_take import test_take_mixed_numeric
```



---
## TestGet
```python
from test_get import TestGet
```



---
## TestDataFrameSetitemCoercion
```python
from test_coercion import TestDataFrameSetitemCoercion
```



---
## test_37477
```python
from test_coercion import test_37477
```



---
## test_6942
```python
from test_coercion import test_6942
```



---
## test_26395
```python
from test_coercion import test_26395
```



---
## test_15231
```python
from test_coercion import test_15231
```



---
## test_iloc_setitem_unnecesssary_float_upcasting
```python
from test_coercion import test_iloc_setitem_unnecesssary_float_upcasting
```



---
## test_12499
```python
from test_coercion import test_12499
```



---
## test_20476
```python
from test_coercion import test_20476
```



---
## test_loc_setitem_multiindex_columns
```python
from test_coercion import test_loc_setitem_multiindex_columns
```



---
## where_frame
```python
from test_where import where_frame
```



---
## _safe_add
```python
from test_where import _safe_add
```



---
## TestDataFrameIndexingWhere
```python
from test_where import TestDataFrameIndexingWhere
```



---
## test_where_int_downcasting_deprecated
```python
from test_where import test_where_int_downcasting_deprecated
```



---
## test_where_copies_with_noop
```python
from test_where import test_where_copies_with_noop
```



---
## test_where_string_dtype
```python
from test_where import test_where_string_dtype
```



---
## test_where_bool_comparison
```python
from test_where import test_where_bool_comparison
```



---
## test_where_none_nan_coerce
```python
from test_where import test_where_none_nan_coerce
```



---
## test_where_duplicate_axes_mixed_dtypes
```python
from test_where import test_where_duplicate_axes_mixed_dtypes
```



---
## test_where_columns_casting
```python
from test_where import test_where_columns_casting
```



---
## test_where_period_invalid_na
```python
from test_where import test_where_period_invalid_na
```



---
## test_where_nullable_invalid_na
```python
from test_where import test_where_nullable_invalid_na
```



---
## test_where_inplace_casting
```python
from test_where import test_where_inplace_casting
```



---
## test_where_downcast_to_td64
```python
from test_where import test_where_downcast_to_td64
```



---
## _check_where_equivalences
```python
from test_where import _check_where_equivalences
```



---
## test_where_dt64_2d
```python
from test_where import test_where_dt64_2d
```



---
## test_where_producing_ea_cond_for_np_dtype
```python
from test_where import test_where_producing_ea_cond_for_np_dtype
```



---
## test_where_int_overflow
```python
from test_where import test_where_int_overflow
```



---
## test_where_inplace_no_other
```python
from test_where import test_where_inplace_no_other
```



---
## is_ok
```python
from test_where import is_ok
```



---
## test_where_get
```python
from test_where import test_where_get
```



---
## test_where_upcasting
```python
from test_where import test_where_upcasting
```



---
## test_where_alignment
```python
from test_where import test_where_alignment
```



---
## test_where_invalid
```python
from test_where import test_where_invalid
```



---
## test_where_set
```python
from test_where import test_where_set
```



---
## test_where_series_slicing
```python
from test_where import test_where_series_slicing
```



---
## test_where_invalid_input_single
```python
from test_where import test_where_invalid_input_single
```



---
## test_where_invalid_input_multiple
```python
from test_where import test_where_invalid_input_multiple
```



---
## test_where_dataframe_col_match
```python
from test_where import test_where_dataframe_col_match
```



---
## test_where_bug
```python
from test_where import test_where_bug
```



---
## test_where_bug_mixed
```python
from test_where import test_where_bug_mixed
```



---
## test_where_bug_transposition
```python
from test_where import test_where_bug_transposition
```



---
## test_where_datetime
```python
from test_where import test_where_datetime
```



---
## test_where_none
```python
from test_where import test_where_none
```



---
## test_where_empty_df_and_empty_cond_having_non_bool_dtypes
```python
from test_where import test_where_empty_df_and_empty_cond_having_non_bool_dtypes
```



---
## test_where_align
```python
from test_where import test_where_align
```



---
## test_where_complex
```python
from test_where import test_where_complex
```



---
## test_where_axis
```python
from test_where import test_where_axis
```



---
## test_where_axis_with_upcast
```python
from test_where import test_where_axis_with_upcast
```



---
## test_where_axis_multiple_dtypes
```python
from test_where import test_where_axis_multiple_dtypes
```



---
## test_where_callable
```python
from test_where import test_where_callable
```



---
## test_where_tz_values
```python
from test_where import test_where_tz_values
```



---
## test_df_where_change_dtype
```python
from test_where import test_df_where_change_dtype
```



---
## test_df_where_with_category
```python
from test_where import test_df_where_with_category
```



---
## test_where_categorical_filtering
```python
from test_where import test_where_categorical_filtering
```



---
## test_where_ea_other
```python
from test_where import test_where_ea_other
```



---
## test_where_interval_noop
```python
from test_where import test_where_interval_noop
```



---
## test_where_interval_fullop_downcast
```python
from test_where import test_where_interval_fullop_downcast
```



---
## test_where_datetimelike_noop
```python
from test_where import test_where_datetimelike_noop
```



---
## _check_get
```python
from test_where import _check_get
```



---
## _check_align
```python
from test_where import _check_align
```



---
## _check_set
```python
from test_where import _check_set
```



---
## create
```python
from test_where import create
```



---
## TestDataFrameDelItem
```python
from test_delitem import TestDataFrameDelItem
```



---
## test_delitem_multiindex
```python
from test_delitem import test_delitem_multiindex
```



---
## test_delitem_corner
```python
from test_delitem import test_delitem_corner
```



---
## test_delitem_col_still_multiindex
```python
from test_delitem import test_delitem_col_still_multiindex
```



---
## __name__
```python
from test_maybe_box_native import __name__
```



---
## test_maybe_box_native
```python
from test_maybe_box_native import test_maybe_box_native
```



---
## __name__
```python
from test_construct_object_arr import __name__
```



---
## test_cast_1d_array
```python
from test_construct_object_arr import test_cast_1d_array
```



---
## test_cast_1d_array_invalid_scalar
```python
from test_construct_object_arr import test_cast_1d_array_invalid_scalar
```



---
## __name__
```python
from test_promote import __name__
```

These test the method maybe_promote from core/dtypes/cast.py

---
## _check_promote
```python
from test_promote import _check_promote
```

Auxiliary function to unify testing of scalar/array promotion.

Parameters
----------
dtype : dtype
    The value to pass on as the first argument to maybe_promote.
fill_value : scalar
    The value to pass on as the second argument to maybe_promote as
    a scalar.
expected_dtype : dtype
    The expected dtype returned by maybe_promote (by design this is the
    same regardless of whether fill_value was passed as a scalar or in an
    array!).
exp_val_for_scalar : scalar
    The expected value for the (potentially upcast) fill_value returned by
    maybe_promote.

---
## _assert_match
```python
from test_promote import _assert_match
```



---
## test_maybe_promote_int_with_int
```python
from test_promote import test_maybe_promote_int_with_int
```



---
## test_maybe_promote_int_with_float
```python
from test_promote import test_maybe_promote_int_with_float
```



---
## test_maybe_promote_float_with_int
```python
from test_promote import test_maybe_promote_float_with_int
```



---
## test_maybe_promote_float_with_float
```python
from test_promote import test_maybe_promote_float_with_float
```



---
## test_maybe_promote_bool_with_any
```python
from test_promote import test_maybe_promote_bool_with_any
```



---
## test_maybe_promote_any_with_bool
```python
from test_promote import test_maybe_promote_any_with_bool
```



---
## test_maybe_promote_bytes_with_any
```python
from test_promote import test_maybe_promote_bytes_with_any
```



---
## test_maybe_promote_any_with_bytes
```python
from test_promote import test_maybe_promote_any_with_bytes
```



---
## test_maybe_promote_datetime64_with_any
```python
from test_promote import test_maybe_promote_datetime64_with_any
```



---
## test_maybe_promote_any_with_datetime64
```python
from test_promote import test_maybe_promote_any_with_datetime64
```



---
## test_maybe_promote_any_numpy_dtype_with_datetimetz
```python
from test_promote import test_maybe_promote_any_numpy_dtype_with_datetimetz
```



---
## test_maybe_promote_timedelta64_with_any
```python
from test_promote import test_maybe_promote_timedelta64_with_any
```



---
## test_maybe_promote_any_with_timedelta64
```python
from test_promote import test_maybe_promote_any_with_timedelta64
```



---
## test_maybe_promote_string_with_any
```python
from test_promote import test_maybe_promote_string_with_any
```



---
## test_maybe_promote_any_with_string
```python
from test_promote import test_maybe_promote_any_with_string
```



---
## test_maybe_promote_object_with_any
```python
from test_promote import test_maybe_promote_object_with_any
```



---
## test_maybe_promote_any_with_object
```python
from test_promote import test_maybe_promote_any_with_object
```



---
## test_maybe_promote_any_numpy_dtype_with_na
```python
from test_promote import test_maybe_promote_any_numpy_dtype_with_na
```



---
## __name__
```python
from test_construct_from_scalar import __name__
```



---
## test_cast_1d_array_like_from_scalar_categorical
```python
from test_construct_from_scalar import test_cast_1d_array_like_from_scalar_categorical
```



---
## test_cast_1d_array_like_from_timestamp
```python
from test_construct_from_scalar import test_cast_1d_array_like_from_timestamp
```



---
## test_cast_1d_array_like_from_timedelta
```python
from test_construct_from_scalar import test_cast_1d_array_like_from_timedelta
```



---
## test_cast_1d_array_like_mismatched_datetimelike
```python
from test_construct_from_scalar import test_cast_1d_array_like_mismatched_datetimelike
```



---
## __name__
```python
from test_find_common_type import __name__
```



---
## test_numpy_dtypes
```python
from test_find_common_type import test_numpy_dtypes
```



---
## test_raises_empty_input
```python
from test_find_common_type import test_raises_empty_input
```



---
## test_categorical_dtype
```python
from test_find_common_type import test_categorical_dtype
```



---
## test_datetimetz_dtype_match
```python
from test_find_common_type import test_datetimetz_dtype_match
```



---
## test_datetimetz_dtype_mismatch
```python
from test_find_common_type import test_datetimetz_dtype_mismatch
```



---
## test_period_dtype_match
```python
from test_find_common_type import test_period_dtype_match
```



---
## test_period_dtype_mismatch
```python
from test_find_common_type import test_period_dtype_mismatch
```



---
## test_interval_dtype
```python
from test_find_common_type import test_interval_dtype
```



---
## test_interval_dtype_with_categorical
```python
from test_find_common_type import test_interval_dtype_with_categorical
```



---
## __name__
```python
from test_infer_dtype import __name__
```



---
## test_infer_dtype_from_int_scalar
```python
from test_infer_dtype import test_infer_dtype_from_int_scalar
```



---
## test_infer_dtype_from_float_scalar
```python
from test_infer_dtype import test_infer_dtype_from_float_scalar
```



---
## test_infer_dtype_from_python_scalar
```python
from test_infer_dtype import test_infer_dtype_from_python_scalar
```



---
## test_infer_dtype_from_boolean
```python
from test_infer_dtype import test_infer_dtype_from_boolean
```



---
## test_infer_dtype_from_complex
```python
from test_infer_dtype import test_infer_dtype_from_complex
```



---
## test_infer_dtype_from_datetime
```python
from test_infer_dtype import test_infer_dtype_from_datetime
```



---
## test_infer_dtype_from_timedelta
```python
from test_infer_dtype import test_infer_dtype_from_timedelta
```



---
## test_infer_dtype_from_period
```python
from test_infer_dtype import test_infer_dtype_from_period
```



---
## test_infer_dtype_misc
```python
from test_infer_dtype import test_infer_dtype_misc
```



---
## test_infer_from_scalar_tz
```python
from test_infer_dtype import test_infer_from_scalar_tz
```



---
## test_infer_from_interval
```python
from test_infer_dtype import test_infer_from_interval
```



---
## test_infer_dtype_from_scalar_errors
```python
from test_infer_dtype import test_infer_dtype_from_scalar_errors
```



---
## test_infer_dtype_from_scalar
```python
from test_infer_dtype import test_infer_dtype_from_scalar
```



---
## test_infer_dtype_from_array
```python
from test_infer_dtype import test_infer_dtype_from_array
```



---
## test_infer_dtype_from_scalar_zerodim_datetimelike
```python
from test_infer_dtype import test_infer_dtype_from_scalar_zerodim_datetimelike
```



---
## __name__
```python
from test_dict_compat import __name__
```



---
## test_dict_compat
```python
from test_dict_compat import test_dict_compat
```



---
## __name__
```python
from test_infer_datetimelike import __name__
```



---
## test_maybe_infer_to_datetimelike_df_construct
```python
from test_infer_datetimelike import test_maybe_infer_to_datetimelike_df_construct
```



---
## test_maybe_infer_to_datetimelike_ser_construct
```python
from test_infer_datetimelike import test_maybe_infer_to_datetimelike_ser_construct
```



---
## __name__
```python
from test_construct_ndarray import __name__
```



---
## test_construct_1d_ndarray_preserving_na
```python
from test_construct_ndarray import test_construct_1d_ndarray_preserving_na
```



---
## test_construct_1d_ndarray_preserving_na_datetimelike
```python
from test_construct_ndarray import test_construct_1d_ndarray_preserving_na_datetimelike
```



---
## __name__
```python
from test_downcast import __name__
```



---
## test_downcast
```python
from test_downcast import test_downcast
```



---
## test_downcast_booleans
```python
from test_downcast import test_downcast_booleans
```



---
## test_downcast_conversion_no_nan
```python
from test_downcast import test_downcast_conversion_no_nan
```



---
## test_downcast_conversion_nan
```python
from test_downcast import test_downcast_conversion_nan
```



---
## test_downcast_conversion_empty
```python
from test_downcast import test_downcast_conversion_empty
```



---
## test_datetime_likes_nan
```python
from test_downcast import test_datetime_likes_nan
```



---
## __name__
```python
from test_can_hold_element import __name__
```



---
## test_can_hold_element_range
```python
from test_can_hold_element import test_can_hold_element_range
```



---
## test_can_hold_element_int_values_float_ndarray
```python
from test_can_hold_element import test_can_hold_element_int_values_float_ndarray
```



---
## test_can_hold_element_int8_int
```python
from test_can_hold_element import test_can_hold_element_int8_int
```



---
## test_groupby_skew_equivalence
```python
from test_skew import test_groupby_skew_equivalence
```



---
## tests_value_counts_index_names_category_column
```python
from test_value_counts import tests_value_counts_index_names_category_column
```



---
## seed_df
```python
from test_value_counts import seed_df
```



---
## test_series_groupby_value_counts
```python
from test_value_counts import test_series_groupby_value_counts
```



---
## test_series_groupby_value_counts_with_grouper
```python
from test_value_counts import test_series_groupby_value_counts_with_grouper
```



---
## test_series_groupby_value_counts_empty
```python
from test_value_counts import test_series_groupby_value_counts_empty
```



---
## test_series_groupby_value_counts_one_row
```python
from test_value_counts import test_series_groupby_value_counts_one_row
```



---
## test_series_groupby_value_counts_on_categorical
```python
from test_value_counts import test_series_groupby_value_counts_on_categorical
```



---
## test_series_groupby_value_counts_no_sort
```python
from test_value_counts import test_series_groupby_value_counts_no_sort
```



---
## education_df
```python
from test_value_counts import education_df
```



---
## test_axis
```python
from test_value_counts import test_axis
```



---
## test_bad_subset
```python
from test_value_counts import test_bad_subset
```



---
## test_basic
```python
from test_value_counts import test_basic
```



---
## _frame_value_counts
```python
from test_value_counts import _frame_value_counts
```



---
## test_against_frame_and_seriesgroupby
```python
from test_value_counts import test_against_frame_and_seriesgroupby
```



---
## test_compound
```python
from test_value_counts import test_compound
```



---
## animals_df
```python
from test_value_counts import animals_df
```



---
## test_data_frame_value_counts
```python
from test_value_counts import test_data_frame_value_counts
```



---
## nulls_df
```python
from test_value_counts import nulls_df
```



---
## test_dropna_combinations
```python
from test_value_counts import test_dropna_combinations
```



---
## names_with_nulls_df
```python
from test_value_counts import names_with_nulls_df
```



---
## test_data_frame_value_counts_dropna
```python
from test_value_counts import test_data_frame_value_counts_dropna
```



---
## test_categorical_single_grouper_with_only_observed_categories
```python
from test_value_counts import test_categorical_single_grouper_with_only_observed_categories
```



---
## assert_categorical_single_grouper
```python
from test_value_counts import assert_categorical_single_grouper
```



---
## test_categorical_single_grouper_observed_true
```python
from test_value_counts import test_categorical_single_grouper_observed_true
```



---
## test_categorical_single_grouper_observed_false
```python
from test_value_counts import test_categorical_single_grouper_observed_false
```



---
## test_categorical_multiple_groupers
```python
from test_value_counts import test_categorical_multiple_groupers
```



---
## test_categorical_non_groupers
```python
from test_value_counts import test_categorical_non_groupers
```



---
## test_mixed_groupings
```python
from test_value_counts import test_mixed_groupings
```



---
## test_column_label_duplicates
```python
from test_value_counts import test_column_label_duplicates
```



---
## test_result_label_duplicates
```python
from test_value_counts import test_result_label_duplicates
```



---
## test_ambiguous_grouping
```python
from test_value_counts import test_ambiguous_grouping
```



---
## test_subset_overlaps_gb_key_raises
```python
from test_value_counts import test_subset_overlaps_gb_key_raises
```



---
## test_subset_doesnt_exist_in_frame
```python
from test_value_counts import test_subset_doesnt_exist_in_frame
```



---
## test_subset
```python
from test_value_counts import test_subset
```



---
## test_subset_duplicate_columns
```python
from test_value_counts import test_subset_duplicate_columns
```



---
## test_value_counts_time_grouper
```python
from test_value_counts import test_value_counts_time_grouper
```



---
## test_value_counts_integer_columns
```python
from test_value_counts import test_value_counts_integer_columns
```



---
## test_value_counts_sort
```python
from test_value_counts import test_value_counts_sort
```



---
## test_value_counts_sort_categorical
```python
from test_value_counts import test_value_counts_sort_categorical
```



---
## rebuild_index
```python
from test_value_counts import rebuild_index
```



---
## __name__
```python
from test_nth import __name__
```



---
## test_first_last_nth
```python
from test_nth import test_first_last_nth
```



---
## test_first_last_with_na_object
```python
from test_nth import test_first_last_with_na_object
```



---
## test_nth_with_na_object
```python
from test_nth import test_nth_with_na_object
```



---
## test_first_last_with_None
```python
from test_nth import test_first_last_with_None
```



---
## test_first_last_with_None_expanded
```python
from test_nth import test_first_last_with_None_expanded
```



---
## test_first_last_nth_dtypes
```python
from test_nth import test_first_last_nth_dtypes
```



---
## test_first_last_nth_dtypes2
```python
from test_nth import test_first_last_nth_dtypes2
```



---
## test_first_last_nth_nan_dtype
```python
from test_nth import test_first_last_nth_nan_dtype
```



---
## test_first_strings_timestamps
```python
from test_nth import test_first_strings_timestamps
```



---
## test_nth
```python
from test_nth import test_nth
```



---
## test_nth2
```python
from test_nth import test_nth2
```



---
## test_nth3
```python
from test_nth import test_nth3
```



---
## test_nth4
```python
from test_nth import test_nth4
```



---
## test_nth5
```python
from test_nth import test_nth5
```



---
## test_nth_bdays
```python
from test_nth import test_nth_bdays
```



---
## test_nth_multi_grouper
```python
from test_nth import test_nth_multi_grouper
```



---
## test_first_last_tz
```python
from test_nth import test_first_last_tz
```



---
## test_first_last_tz_multi_column
```python
from test_nth import test_first_last_tz_multi_column
```



---
## test_first_last_extension_array_keeps_dtype
```python
from test_nth import test_first_last_extension_array_keeps_dtype
```



---
## test_nth_multi_index_as_expected
```python
from test_nth import test_nth_multi_index_as_expected
```



---
## test_groupby_head_tail
```python
from test_nth import test_groupby_head_tail
```



---
## test_groupby_head_tail_axis_1
```python
from test_nth import test_groupby_head_tail_axis_1
```



---
## test_group_selection_cache
```python
from test_nth import test_group_selection_cache
```



---
## test_nth_empty
```python
from test_nth import test_nth_empty
```



---
## test_nth_column_order
```python
from test_nth import test_nth_column_order
```



---
## test_nth_nan_in_grouper
```python
from test_nth import test_nth_nan_in_grouper
```



---
## test_nth_nan_in_grouper_series
```python
from test_nth import test_nth_nan_in_grouper_series
```



---
## test_first_categorical_and_datetime_data_nat
```python
from test_nth import test_first_categorical_and_datetime_data_nat
```



---
## test_first_multi_key_groupby_categorical
```python
from test_nth import test_first_multi_key_groupby_categorical
```



---
## test_groupby_last_first_nth_with_none
```python
from test_nth import test_groupby_last_first_nth_with_none
```



---
## test_slice
```python
from test_nth import test_slice
```



---
## test_nth_indexed
```python
from test_nth import test_nth_indexed
```



---
## test_invalid_argument
```python
from test_nth import test_invalid_argument
```



---
## test_negative_step
```python
from test_nth import test_negative_step
```



---
## test_np_ints
```python
from test_nth import test_np_ints
```



---
## test_groupby_nth_with_column_axis
```python
from test_nth import test_groupby_nth_with_column_axis
```



---
## test_groupby_nth_interval
```python
from test_nth import test_groupby_nth_interval
```



---
## test_nth_slices_with_column_axis
```python
from test_nth import test_nth_slices_with_column_axis
```



---
## test_head_tail_dropna_true
```python
from test_nth import test_head_tail_dropna_true
```



---
## test_head_tail_dropna_false
```python
from test_nth import test_head_tail_dropna_false
```



---
## test_nth_after_selection
```python
from test_nth import test_nth_after_selection
```



---
## test_groupby_nth_int_like_precision
```python
from test_nth import test_groupby_nth_int_like_precision
```



---
## __name__
```python
from test_corrwith import __name__
```



---
## test_corrwith_with_1_axis
```python
from test_corrwith import test_corrwith_with_1_axis
```



---
## test_groupby_sample_balanced_groups_shape
```python
from test_sample import test_groupby_sample_balanced_groups_shape
```



---
## test_groupby_sample_unbalanced_groups_shape
```python
from test_sample import test_groupby_sample_unbalanced_groups_shape
```



---
## test_groupby_sample_index_value_spans_groups
```python
from test_sample import test_groupby_sample_index_value_spans_groups
```



---
## test_groupby_sample_n_and_frac_raises
```python
from test_sample import test_groupby_sample_n_and_frac_raises
```



---
## test_groupby_sample_frac_gt_one_without_replacement_raises
```python
from test_sample import test_groupby_sample_frac_gt_one_without_replacement_raises
```



---
## test_groupby_sample_invalid_n_raises
```python
from test_sample import test_groupby_sample_invalid_n_raises
```



---
## test_groupby_sample_oversample
```python
from test_sample import test_groupby_sample_oversample
```



---
## test_groupby_sample_without_n_or_frac
```python
from test_sample import test_groupby_sample_without_n_or_frac
```



---
## test_groupby_sample_with_weights
```python
from test_sample import test_groupby_sample_with_weights
```



---
## test_groupby_sample_with_selections
```python
from test_sample import test_groupby_sample_with_selections
```



---
## test_groupby_sample_with_empty_inputs
```python
from test_sample import test_groupby_sample_with_empty_inputs
```



---
## test_apply_describe_bug
```python
from test_describe import test_apply_describe_bug
```



---
## test_series_describe_multikey
```python
from test_describe import test_series_describe_multikey
```



---
## test_series_describe_single
```python
from test_describe import test_series_describe_single
```



---
## test_series_describe_as_index
```python
from test_describe import test_series_describe_as_index
```



---
## test_frame_describe_multikey
```python
from test_describe import test_frame_describe_multikey
```



---
## test_frame_describe_tupleindex
```python
from test_describe import test_frame_describe_tupleindex
```



---
## test_frame_describe_unstacked_format
```python
from test_describe import test_frame_describe_unstacked_format
```



---
## test_describe_with_duplicate_output_column_names
```python
from test_describe import test_describe_with_duplicate_output_column_names
```



---
## test_describe_duplicate_columns
```python
from test_describe import test_describe_duplicate_columns
```



---
## TestGroupByNonCythonPaths
```python
from test_describe import TestGroupByNonCythonPaths
```



---
## test_groupby_empty_dataset
```python
from test_describe import test_groupby_empty_dataset
```



---
## df
```python
from test_describe import df
```



---
## gb
```python
from test_describe import gb
```



---
## gni
```python
from test_describe import gni
```



---
## test_describe
```python
from test_describe import test_describe
```



---
## test_size_axis_1
```python
from test_size import test_size_axis_1
```



---
## test_size_sort
```python
from test_size import test_size_sort
```



---
## test_size_series_dataframe
```python
from test_size import test_size_series_dataframe
```



---
## test_size_groupby_all_null
```python
from test_size import test_size_groupby_all_null
```



---
## test_size_period_index
```python
from test_size import test_size_period_index
```



---
## test_size_on_categorical
```python
from test_size import test_size_on_categorical
```



---
## test_size_series_masked_type_returns_Int64
```python
from test_size import test_size_series_masked_type_returns_Int64
```



---
## test_size_strings
```python
from test_size import test_size_strings
```



---
## test_quantile_array
```python
from test_quantile import test_quantile_array
```



---
## test_quantile_array2
```python
from test_quantile import test_quantile_array2
```



---
## test_quantile_array_no_sort
```python
from test_quantile import test_quantile_array_no_sort
```



---
## test_quantile_array_multiple_levels
```python
from test_quantile import test_quantile_array_multiple_levels
```



---
## test_groupby_quantile_with_arraylike_q_and_int_columns
```python
from test_quantile import test_groupby_quantile_with_arraylike_q_and_int_columns
```



---
## test_quantile_raises
```python
from test_quantile import test_quantile_raises
```



---
## test_quantile_out_of_bounds_q_raises
```python
from test_quantile import test_quantile_out_of_bounds_q_raises
```



---
## test_quantile_missing_group_values_no_segfaults
```python
from test_quantile import test_quantile_missing_group_values_no_segfaults
```



---
## test_quantile_missing_group_values_correct_results
```python
from test_quantile import test_quantile_missing_group_values_correct_results
```



---
## test_groupby_quantile_nullable_array
```python
from test_quantile import test_groupby_quantile_nullable_array
```



---
## test_groupby_quantile_raises_on_invalid_dtype
```python
from test_quantile import test_groupby_quantile_raises_on_invalid_dtype
```



---
## test_groupby_quantile_NA_float
```python
from test_quantile import test_groupby_quantile_NA_float
```



---
## test_groupby_quantile_NA_int
```python
from test_quantile import test_groupby_quantile_NA_int
```



---
## test_groupby_quantile_all_na_group_masked
```python
from test_quantile import test_groupby_quantile_all_na_group_masked
```



---
## test_groupby_quantile_all_na_group_masked_interp
```python
from test_quantile import test_groupby_quantile_all_na_group_masked_interp
```



---
## test_groupby_quantile_allNA_column
```python
from test_quantile import test_groupby_quantile_allNA_column
```



---
## test_groupby_timedelta_quantile
```python
from test_quantile import test_groupby_timedelta_quantile
```



---
## test_columns_groupby_quantile
```python
from test_quantile import test_columns_groupby_quantile
```



---
## test_timestamp_groupby_quantile
```python
from test_quantile import test_timestamp_groupby_quantile
```



---
## test_groupby_quantile_dt64tz_period
```python
from test_quantile import test_groupby_quantile_dt64tz_period
```



---
## test_groupby_quantile_nonmulti_levels_order
```python
from test_quantile import test_groupby_quantile_nonmulti_levels_order
```



---
## __name__
```python
from test_nlargest_nsmallest import __name__
```



---
## test_nlargest
```python
from test_nlargest_nsmallest import test_nlargest
```



---
## test_nlargest_mi_grouper
```python
from test_nlargest_nsmallest import test_nlargest_mi_grouper
```



---
## test_nsmallest
```python
from test_nlargest_nsmallest import test_nsmallest
```



---
## test_nlargest_and_smallest_noop
```python
from test_nlargest_nsmallest import test_nlargest_and_smallest_noop
```



---
## __name__
```python
from test_groupby_shift_diff import __name__
```



---
## test_group_shift_with_null_key
```python
from test_groupby_shift_diff import test_group_shift_with_null_key
```



---
## test_group_shift_with_fill_value
```python
from test_groupby_shift_diff import test_group_shift_with_fill_value
```



---
## test_group_shift_lose_timezone
```python
from test_groupby_shift_diff import test_group_shift_lose_timezone
```



---
## test_group_diff_real_series
```python
from test_groupby_shift_diff import test_group_diff_real_series
```



---
## test_group_diff_real_frame
```python
from test_groupby_shift_diff import test_group_diff_real_frame
```



---
## test_group_diff_datetimelike
```python
from test_groupby_shift_diff import test_group_diff_datetimelike
```



---
## test_group_diff_bool
```python
from test_groupby_shift_diff import test_group_diff_bool
```



---
## test_group_diff_object_raises
```python
from test_groupby_shift_diff import test_group_diff_object_raises
```



---
## test_empty_shift_with_fill
```python
from test_groupby_shift_diff import test_empty_shift_with_fill
```



---
## test_multindex_empty_shift_with_fill
```python
from test_groupby_shift_diff import test_multindex_empty_shift_with_fill
```



---
## test_shift_periods_freq
```python
from test_groupby_shift_diff import test_shift_periods_freq
```



---
## test_shift_deprecate_freq_and_fill_value
```python
from test_groupby_shift_diff import test_shift_deprecate_freq_and_fill_value
```



---
## test_shift_disallow_suffix_if_periods_is_int
```python
from test_groupby_shift_diff import test_shift_disallow_suffix_if_periods_is_int
```



---
## test_group_shift_with_multiple_periods
```python
from test_groupby_shift_diff import test_group_shift_with_multiple_periods
```



---
## test_group_shift_with_multiple_periods_and_freq
```python
from test_groupby_shift_diff import test_group_shift_with_multiple_periods_and_freq
```



---
## test_group_shift_with_multiple_periods_and_fill_value
```python
from test_groupby_shift_diff import test_group_shift_with_multiple_periods_and_fill_value
```



---
## test_group_shift_with_multiple_periods_and_both_fill_and_freq_deprecated
```python
from test_groupby_shift_diff import test_group_shift_with_multiple_periods_and_both_fill_and_freq_deprecated
```



---
## test_is_monotonic_increasing
```python
from test_is_monotonic import test_is_monotonic_increasing
```



---
## test_is_monotonic_decreasing
```python
from test_is_monotonic import test_is_monotonic_decreasing
```



---
## test_rank_unordered_categorical_typeerror
```python
from test_rank import test_rank_unordered_categorical_typeerror
```



---
## test_rank_apply
```python
from test_rank import test_rank_apply
```



---
## test_rank_args
```python
from test_rank import test_rank_args
```



---
## test_infs_n_nans
```python
from test_rank import test_infs_n_nans
```



---
## test_rank_args_missing
```python
from test_rank import test_rank_args_missing
```



---
## test_rank_resets_each_group
```python
from test_rank import test_rank_resets_each_group
```



---
## test_rank_avg_even_vals
```python
from test_rank import test_rank_avg_even_vals
```



---
## test_rank_object_dtype
```python
from test_rank import test_rank_object_dtype
```



---
## test_rank_naoption_raises
```python
from test_rank import test_rank_naoption_raises
```



---
## test_rank_empty_group
```python
from test_rank import test_rank_empty_group
```



---
## test_rank_zero_div
```python
from test_rank import test_rank_zero_div
```



---
## test_rank_min_int
```python
from test_rank import test_rank_min_int
```



---
## test_rank_pct_equal_values_on_group_transition
```python
from test_rank import test_rank_pct_equal_values_on_group_transition
```



---
## test_rank_multiindex
```python
from test_rank import test_rank_multiindex
```



---
## test_groupby_axis0_rank_axis1
```python
from test_rank import test_groupby_axis0_rank_axis1
```



---
## test_groupby_axis0_cummax_axis1
```python
from test_rank import test_groupby_axis0_cummax_axis1
```



---
## test_non_unique_index
```python
from test_rank import test_non_unique_index
```



---
## test_groupby_op_with_nullables
```python
from test_rank import test_groupby_op_with_nullables
```



---
## test_cythonized_aggers
```python
from test_cython import test_cythonized_aggers
```



---
## test_cython_agg_boolean
```python
from test_cython import test_cython_agg_boolean
```



---
## test_cython_agg_nothing_to_agg
```python
from test_cython import test_cython_agg_nothing_to_agg
```



---
## test_cython_agg_nothing_to_agg_with_dates
```python
from test_cython import test_cython_agg_nothing_to_agg_with_dates
```



---
## test_cython_agg_frame_columns
```python
from test_cython import test_cython_agg_frame_columns
```



---
## test_cython_agg_return_dict
```python
from test_cython import test_cython_agg_return_dict
```



---
## test_cython_fail_agg
```python
from test_cython import test_cython_fail_agg
```



---
## test__cython_agg_general
```python
from test_cython import test__cython_agg_general
```



---
## test_cython_agg_empty_buckets
```python
from test_cython import test_cython_agg_empty_buckets
```



---
## test_cython_agg_empty_buckets_nanops
```python
from test_cython import test_cython_agg_empty_buckets_nanops
```



---
## test_cython_with_timestamp_and_nat
```python
from test_cython import test_cython_with_timestamp_and_nat
```



---
## test_read_only_buffer_source_agg
```python
from test_cython import test_read_only_buffer_source_agg
```



---
## test_cython_agg_nullable_int
```python
from test_cython import test_cython_agg_nullable_int
```



---
## test_count_masked_returns_masked_dtype
```python
from test_cython import test_count_masked_returns_masked_dtype
```



---
## test_cython_agg_EA_known_dtypes
```python
from test_cython import test_cython_agg_EA_known_dtypes
```



---
## __name__
```python
from test_aggregate import __name__
```

test .agg behavior / note that .apply is tested generally in test_groupby.py

---
## test_groupby_agg_no_extra_calls
```python
from test_aggregate import test_groupby_agg_no_extra_calls
```



---
## test_agg_regression1
```python
from test_aggregate import test_agg_regression1
```



---
## test_agg_must_agg
```python
from test_aggregate import test_agg_must_agg
```



---
## test_agg_ser_multi_key
```python
from test_aggregate import test_agg_ser_multi_key
```



---
## test_groupby_aggregation_mixed_dtype
```python
from test_aggregate import test_groupby_aggregation_mixed_dtype
```



---
## test_groupby_aggregation_multi_level_column
```python
from test_aggregate import test_groupby_aggregation_multi_level_column
```



---
## test_agg_apply_corner
```python
from test_aggregate import test_agg_apply_corner
```



---
## test_agg_grouping_is_list_tuple
```python
from test_aggregate import test_agg_grouping_is_list_tuple
```



---
## test_agg_python_multiindex
```python
from test_aggregate import test_agg_python_multiindex
```



---
## test_aggregate_str_func
```python
from test_aggregate import test_aggregate_str_func
```



---
## test_std_masked_dtype
```python
from test_aggregate import test_std_masked_dtype
```



---
## test_agg_str_with_kwarg_axis_1_raises
```python
from test_aggregate import test_agg_str_with_kwarg_axis_1_raises
```



---
## test_multiindex_groupby_mixed_cols_axis1
```python
from test_aggregate import test_multiindex_groupby_mixed_cols_axis1
```



---
## test_groupby_mixed_cols_axis1
```python
from test_aggregate import test_groupby_mixed_cols_axis1
```



---
## test_aggregate_item_by_item
```python
from test_aggregate import test_aggregate_item_by_item
```



---
## test_wrap_agg_out
```python
from test_aggregate import test_wrap_agg_out
```



---
## test_agg_multiple_functions_maintain_order
```python
from test_aggregate import test_agg_multiple_functions_maintain_order
```



---
## test_series_index_name
```python
from test_aggregate import test_series_index_name
```



---
## test_agg_multiple_functions_same_name
```python
from test_aggregate import test_agg_multiple_functions_same_name
```



---
## test_agg_multiple_functions_same_name_with_ohlc_present
```python
from test_aggregate import test_agg_multiple_functions_same_name_with_ohlc_present
```



---
## test_multiple_functions_tuples_and_non_tuples
```python
from test_aggregate import test_multiple_functions_tuples_and_non_tuples
```



---
## test_more_flexible_frame_multi_function
```python
from test_aggregate import test_more_flexible_frame_multi_function
```



---
## test_multi_function_flexible_mix
```python
from test_aggregate import test_multi_function_flexible_mix
```



---
## test_groupby_agg_coercing_bools
```python
from test_aggregate import test_groupby_agg_coercing_bools
```



---
## test_groupby_agg_dict_with_getitem
```python
from test_aggregate import test_groupby_agg_dict_with_getitem
```



---
## test_groupby_agg_dict_dup_columns
```python
from test_aggregate import test_groupby_agg_dict_dup_columns
```



---
## test_bool_agg_dtype
```python
from test_aggregate import test_bool_agg_dtype
```



---
## test_callable_result_dtype_frame
```python
from test_aggregate import test_callable_result_dtype_frame
```



---
## test_callable_result_dtype_series
```python
from test_aggregate import test_callable_result_dtype_series
```



---
## test_order_aggregate_multiple_funcs
```python
from test_aggregate import test_order_aggregate_multiple_funcs
```



---
## test_ohlc_ea_dtypes
```python
from test_aggregate import test_ohlc_ea_dtypes
```



---
## test_uint64_type_handling
```python
from test_aggregate import test_uint64_type_handling
```



---
## test_func_duplicates_raises
```python
from test_aggregate import test_func_duplicates_raises
```



---
## test_agg_index_has_complex_internals
```python
from test_aggregate import test_agg_index_has_complex_internals
```



---
## test_agg_split_block
```python
from test_aggregate import test_agg_split_block
```



---
## test_agg_split_object_part_datetime
```python
from test_aggregate import test_agg_split_object_part_datetime
```



---
## TestNamedAggregationSeries
```python
from test_aggregate import TestNamedAggregationSeries
```



---
## TestNamedAggregationDataFrame
```python
from test_aggregate import TestNamedAggregationDataFrame
```



---
## test_agg_relabel_multiindex_column
```python
from test_aggregate import test_agg_relabel_multiindex_column
```



---
## test_agg_relabel_multiindex_raises_not_exist
```python
from test_aggregate import test_agg_relabel_multiindex_raises_not_exist
```



---
## test_agg_relabel_multiindex_duplicates
```python
from test_aggregate import test_agg_relabel_multiindex_duplicates
```



---
## test_groupby_aggregate_empty_key
```python
from test_aggregate import test_groupby_aggregate_empty_key
```



---
## test_groupby_aggregate_empty_key_empty_return
```python
from test_aggregate import test_groupby_aggregate_empty_key_empty_return
```



---
## test_groupby_aggregate_empty_with_multiindex_frame
```python
from test_aggregate import test_groupby_aggregate_empty_with_multiindex_frame
```



---
## test_grouby_agg_loses_results_with_as_index_false_relabel
```python
from test_aggregate import test_grouby_agg_loses_results_with_as_index_false_relabel
```



---
## test_grouby_agg_loses_results_with_as_index_false_relabel_multiindex
```python
from test_aggregate import test_grouby_agg_loses_results_with_as_index_false_relabel_multiindex
```



---
## test_multiindex_custom_func
```python
from test_aggregate import test_multiindex_custom_func
```



---
## myfunc
```python
from test_aggregate import myfunc
```



---
## test_lambda_named_agg
```python
from test_aggregate import test_lambda_named_agg
```



---
## test_aggregate_mixed_types
```python
from test_aggregate import test_aggregate_mixed_types
```



---
## test_aggregate_udf_na_extension_type
```python
from test_aggregate import test_aggregate_udf_na_extension_type
```



---
## TestLambdaMangling
```python
from test_aggregate import TestLambdaMangling
```



---
## test_groupby_get_by_index
```python
from test_aggregate import test_groupby_get_by_index
```



---
## test_groupby_single_agg_cat_cols
```python
from test_aggregate import test_groupby_single_agg_cat_cols
```



---
## test_groupby_combined_aggs_cat_cols
```python
from test_aggregate import test_groupby_combined_aggs_cat_cols
```



---
## test_nonagg_agg
```python
from test_aggregate import test_nonagg_agg
```



---
## test_aggregate_datetime_objects
```python
from test_aggregate import test_aggregate_datetime_objects
```



---
## test_groupby_index_object_dtype
```python
from test_aggregate import test_groupby_index_object_dtype
```



---
## test_timeseries_groupby_agg
```python
from test_aggregate import test_timeseries_groupby_agg
```



---
## test_groupby_agg_precision
```python
from test_aggregate import test_groupby_agg_precision
```



---
## test_groupby_aggregate_directory
```python
from test_aggregate import test_groupby_aggregate_directory
```



---
## test_group_mean_timedelta_nat
```python
from test_aggregate import test_group_mean_timedelta_nat
```



---
## test_group_mean_datetime64_nat
```python
from test_aggregate import test_group_mean_datetime64_nat
```



---
## test_groupby_complex
```python
from test_aggregate import test_groupby_complex
```



---
## test_groupby_complex_raises
```python
from test_aggregate import test_groupby_complex_raises
```



---
## test_multi_axis_1_raises
```python
from test_aggregate import test_multi_axis_1_raises
```



---
## test_agg_of_mode_list
```python
from test_aggregate import test_agg_of_mode_list
```



---
## test_dataframe_groupy_agg_list_like_func_with_args
```python
from test_aggregate import test_dataframe_groupy_agg_list_like_func_with_args
```



---
## test_series_groupy_agg_list_like_func_with_args
```python
from test_aggregate import test_series_groupy_agg_list_like_func_with_args
```



---
## test_agg_groupings_selection
```python
from test_aggregate import test_agg_groupings_selection
```



---
## test_agg_multiple_with_as_index_false_subset_to_a_single_column
```python
from test_aggregate import test_agg_multiple_with_as_index_false_subset_to_a_single_column
```



---
## test_agg_with_as_index_false_with_list
```python
from test_aggregate import test_agg_with_as_index_false_with_list
```



---
## test_groupby_agg_extension_timedelta_cumsum_with_named_aggregation
```python
from test_aggregate import test_groupby_agg_extension_timedelta_cumsum_with_named_aggregation
```



---
## test_groupby_aggregation_empty_group
```python
from test_aggregate import test_groupby_aggregation_empty_group
```



---
## dummy_func
```python
from test_aggregate import dummy_func
```



---
## aggfun_1
```python
from test_aggregate import aggfun_1
```



---
## func
```python
from test_aggregate import func
```



---
## numpymean
```python
from test_aggregate import numpymean
```



---
## numpystd
```python
from test_aggregate import numpystd
```



---
## test_series_named_agg
```python
from test_aggregate import test_series_named_agg
```



---
## test_no_args_raises
```python
from test_aggregate import test_no_args_raises
```



---
## test_series_named_agg_duplicates_no_raises
```python
from test_aggregate import test_series_named_agg_duplicates_no_raises
```



---
## test_mangled
```python
from test_aggregate import test_mangled
```



---
## test_named_agg_nametuple
```python
from test_aggregate import test_named_agg_nametuple
```



---
## test_agg_relabel
```python
from test_aggregate import test_agg_relabel
```



---
## test_agg_relabel_non_identifier
```python
from test_aggregate import test_agg_relabel_non_identifier
```



---
## test_duplicate_no_raises
```python
from test_aggregate import test_duplicate_no_raises
```



---
## test_agg_relabel_with_level
```python
from test_aggregate import test_agg_relabel_with_level
```



---
## test_agg_relabel_other_raises
```python
from test_aggregate import test_agg_relabel_other_raises
```



---
## test_missing_raises
```python
from test_aggregate import test_missing_raises
```



---
## test_agg_namedtuple
```python
from test_aggregate import test_agg_namedtuple
```



---
## aggfunc
```python
from test_aggregate import aggfunc
```



---
## test_basic
```python
from test_aggregate import test_basic
```



---
## test_mangle_series_groupby
```python
from test_aggregate import test_mangle_series_groupby
```



---
## test_with_kwargs
```python
from test_aggregate import test_with_kwargs
```



---
## test_agg_with_one_lambda
```python
from test_aggregate import test_agg_with_one_lambda
```



---
## test_agg_multiple_lambda
```python
from test_aggregate import test_agg_multiple_lambda
```



---
## foo1
```python
from test_aggregate import foo1
```



---
## foo2
```python
from test_aggregate import foo2
```



---
## test_correct_function_signature
```python
from test_numba import test_correct_function_signature
```



---
## test_check_nopython_kwargs
```python
from test_numba import test_check_nopython_kwargs
```



---
## test_numba_vs_cython
```python
from test_numba import test_numba_vs_cython
```



---
## test_cache
```python
from test_numba import test_cache
```



---
## test_multifunc_numba_vs_cython_frame
```python
from test_numba import test_multifunc_numba_vs_cython_frame
```



---
## test_multifunc_numba_udf_frame
```python
from test_numba import test_multifunc_numba_udf_frame
```



---
## test_multifunc_numba_vs_cython_series
```python
from test_numba import test_multifunc_numba_vs_cython_series
```



---
## test_multifunc_numba_kwarg_propagation
```python
from test_numba import test_multifunc_numba_kwarg_propagation
```



---
## test_args_not_cached
```python
from test_numba import test_args_not_cached
```



---
## test_index_data_correctly_passed
```python
from test_numba import test_index_data_correctly_passed
```



---
## test_engine_kwargs_not_cached
```python
from test_numba import test_engine_kwargs_not_cached
```



---
## test_multiindex_one_key
```python
from test_numba import test_multiindex_one_key
```



---
## test_multiindex_multi_key_not_supported
```python
from test_numba import test_multiindex_multi_key_not_supported
```



---
## test_multilabel_numba_vs_cython
```python
from test_numba import test_multilabel_numba_vs_cython
```



---
## test_multilabel_udf_numba_vs_cython
```python
from test_numba import test_multilabel_udf_numba_vs_cython
```



---
## incorrect_function
```python
from test_numba import incorrect_function
```



---
## func_numba
```python
from test_numba import func_numba
```



---
## sum_last
```python
from test_numba import sum_last
```



---
## func_kwargs
```python
from test_numba import func_kwargs
```



---
## numba_func
```python
from test_numba import numba_func
```



---
## __name__
```python
from test_other import __name__
```

test all other .agg behavior

---
## test_agg_partial_failure_raises
```python
from test_other import test_agg_partial_failure_raises
```



---
## test_agg_datetimes_mixed
```python
from test_other import test_agg_datetimes_mixed
```



---
## test_agg_period_index
```python
from test_other import test_agg_period_index
```



---
## test_agg_dict_parameter_cast_result_dtypes
```python
from test_other import test_agg_dict_parameter_cast_result_dtypes
```



---
## test_agg_cast_results_dtypes
```python
from test_other import test_agg_cast_results_dtypes
```



---
## test_aggregate_float64_no_int64
```python
from test_other import test_aggregate_float64_no_int64
```



---
## test_aggregate_api_consistency
```python
from test_other import test_aggregate_api_consistency
```



---
## test_agg_dict_renaming_deprecation
```python
from test_other import test_agg_dict_renaming_deprecation
```



---
## test_agg_compat
```python
from test_other import test_agg_compat
```



---
## test_agg_nested_dicts
```python
from test_other import test_agg_nested_dicts
```



---
## test_agg_item_by_item_raise_typeerror
```python
from test_other import test_agg_item_by_item_raise_typeerror
```



---
## test_series_agg_multikey
```python
from test_other import test_series_agg_multikey
```



---
## test_series_agg_multi_pure_python
```python
from test_other import test_series_agg_multi_pure_python
```



---
## test_agg_consistency
```python
from test_other import test_agg_consistency
```



---
## test_agg_callables
```python
from test_other import test_agg_callables
```



---
## test_agg_over_numpy_arrays
```python
from test_other import test_agg_over_numpy_arrays
```



---
## test_agg_tzaware_non_datetime_result
```python
from test_other import test_agg_tzaware_non_datetime_result
```



---
## test_agg_timezone_round_trip
```python
from test_other import test_agg_timezone_round_trip
```



---
## test_sum_uint64_overflow
```python
from test_other import test_sum_uint64_overflow
```



---
## test_agg_structs_dataframe
```python
from test_other import test_agg_structs_dataframe
```



---
## test_agg_structs_series
```python
from test_other import test_agg_structs_series
```



---
## test_agg_category_nansum
```python
from test_other import test_agg_category_nansum
```



---
## test_agg_list_like_func
```python
from test_other import test_agg_list_like_func
```



---
## test_agg_lambda_with_timezone
```python
from test_other import test_agg_lambda_with_timezone
```



---
## test_groupby_agg_err_catching
```python
from test_other import test_groupby_agg_err_catching
```



---
## peak_to_peak
```python
from test_other import peak_to_peak
```



---
## raiseException
```python
from test_other import raiseException
```



---
## bad
```python
from test_other import bad
```



---
## P1
```python
from test_other import P1
```



---
## fn_class
```python
from test_other import fn_class
```



---
## weird_func
```python
from test_other import weird_func
```



---
## __call__
```python
from test_other import __call__
```



---
## __name__
```python
from test_transform import __name__
```

test with the .transform 

---
## assert_fp_equal
```python
from test_transform import assert_fp_equal
```



---
## test_transform
```python
from test_transform import test_transform
```



---
## test_transform_fast
```python
from test_transform import test_transform_fast
```



---
## test_transform_fast2
```python
from test_transform import test_transform_fast2
```



---
## test_transform_fast3
```python
from test_transform import test_transform_fast3
```



---
## test_transform_broadcast
```python
from test_transform import test_transform_broadcast
```



---
## test_transform_axis_1
```python
from test_transform import test_transform_axis_1
```



---
## test_transform_axis_1_reducer
```python
from test_transform import test_transform_axis_1_reducer
```



---
## test_transform_axis_ts
```python
from test_transform import test_transform_axis_ts
```



---
## test_transform_dtype
```python
from test_transform import test_transform_dtype
```



---
## test_transform_bug
```python
from test_transform import test_transform_bug
```



---
## test_transform_numeric_to_boolean
```python
from test_transform import test_transform_numeric_to_boolean
```



---
## test_transform_datetime_to_timedelta
```python
from test_transform import test_transform_datetime_to_timedelta
```



---
## test_transform_datetime_to_numeric
```python
from test_transform import test_transform_datetime_to_numeric
```



---
## test_transform_casting
```python
from test_transform import test_transform_casting
```



---
## test_transform_multiple
```python
from test_transform import test_transform_multiple
```



---
## test_dispatch_transform
```python
from test_transform import test_dispatch_transform
```



---
## test_transform_fillna_null
```python
from test_transform import test_transform_fillna_null
```



---
## test_transform_transformation_func
```python
from test_transform import test_transform_transformation_func
```



---
## test_transform_select_columns
```python
from test_transform import test_transform_select_columns
```



---
## test_transform_nuisance_raises
```python
from test_transform import test_transform_nuisance_raises
```



---
## test_transform_function_aliases
```python
from test_transform import test_transform_function_aliases
```



---
## test_series_fast_transform_date
```python
from test_transform import test_series_fast_transform_date
```



---
## test_transform_length
```python
from test_transform import test_transform_length
```



---
## test_transform_coercion
```python
from test_transform import test_transform_coercion
```



---
## test_groupby_transform_with_int
```python
from test_transform import test_groupby_transform_with_int
```



---
## test_groupby_transform_with_nan_group
```python
from test_transform import test_groupby_transform_with_nan_group
```



---
## test_transform_mixed_type
```python
from test_transform import test_transform_mixed_type
```



---
## test_cython_transform_series
```python
from test_transform import test_cython_transform_series
```



---
## test_groupby_cum_skipna
```python
from test_transform import test_groupby_cum_skipna
```



---
## frame
```python
from test_transform import frame
```



---
## frame_mi
```python
from test_transform import frame_mi
```



---
## test_cython_transform_frame
```python
from test_transform import test_cython_transform_frame
```



---
## test_cython_transform_frame_column
```python
from test_transform import test_cython_transform_frame_column
```



---
## test_transform_with_non_scalar_group
```python
from test_transform import test_transform_with_non_scalar_group
```



---
## test_transform_numeric_ret
```python
from test_transform import test_transform_numeric_ret
```



---
## test_transform_ffill
```python
from test_transform import test_transform_ffill
```



---
## test_group_fill_methods
```python
from test_transform import test_group_fill_methods
```



---
## test_pad_stable_sorting
```python
from test_transform import test_pad_stable_sorting
```



---
## test_pct_change
```python
from test_transform import test_pct_change
```



---
## test_ffill_bfill_non_unique_multilevel
```python
from test_transform import test_ffill_bfill_non_unique_multilevel
```



---
## test_any_all_np_func
```python
from test_transform import test_any_all_np_func
```



---
## test_groupby_transform_rename
```python
from test_transform import test_groupby_transform_rename
```



---
## test_groupby_transform_timezone_column
```python
from test_transform import test_groupby_transform_timezone_column
```



---
## test_groupby_transform_with_datetimes
```python
from test_transform import test_groupby_transform_with_datetimes
```



---
## test_groupby_transform_dtype
```python
from test_transform import test_groupby_transform_dtype
```



---
## test_transform_absent_categories
```python
from test_transform import test_transform_absent_categories
```



---
## test_ffill_not_in_axis
```python
from test_transform import test_ffill_not_in_axis
```



---
## test_transform_invalid_name_raises
```python
from test_transform import test_transform_invalid_name_raises
```



---
## test_transform_agg_by_name
```python
from test_transform import test_transform_agg_by_name
```



---
## test_transform_lambda_with_datetimetz
```python
from test_transform import test_transform_lambda_with_datetimetz
```



---
## test_transform_fastpath_raises
```python
from test_transform import test_transform_fastpath_raises
```



---
## test_transform_lambda_indexing
```python
from test_transform import test_transform_lambda_indexing
```



---
## test_categorical_and_not_categorical_key
```python
from test_transform import test_categorical_and_not_categorical_key
```



---
## test_string_rank_grouping
```python
from test_transform import test_string_rank_grouping
```



---
## test_transform_cumcount
```python
from test_transform import test_transform_cumcount
```



---
## test_null_group_lambda_self
```python
from test_transform import test_null_group_lambda_self
```



---
## test_null_group_str_reducer
```python
from test_transform import test_null_group_str_reducer
```



---
## test_null_group_str_transformer
```python
from test_transform import test_null_group_str_transformer
```



---
## test_null_group_str_reducer_series
```python
from test_transform import test_null_group_str_reducer_series
```



---
## test_null_group_str_transformer_series
```python
from test_transform import test_null_group_str_transformer_series
```



---
## test_transform_aligns
```python
from test_transform import test_transform_aligns
```



---
## test_as_index_no_change
```python
from test_transform import test_as_index_no_change
```



---
## test_idxmin_idxmax_transform_args
```python
from test_transform import test_idxmin_idxmax_transform_args
```



---
## demean
```python
from test_transform import demean
```



---
## nsum
```python
from test_transform import nsum
```



---
## f
```python
from test_transform import f
```



---
## demean_rename
```python
from test_transform import demean_rename
```



---
## func
```python
from test_transform import func
```



---
## interweave
```python
from test_transform import interweave
```



---
## mock_op
```python
from test_transform import mock_op
```



---
## test_string_cython_vs_numba
```python
from test_numba import test_string_cython_vs_numba
```



---
## __name__
```python
from test_frame_color import __name__
```

Test cases for DataFrame.plot 

---
## _check_colors_box
```python
from test_frame_color import _check_colors_box
```



---
## TestDataFrameColor
```python
from test_frame_color import TestDataFrameColor
```



---
## test_mpl2_color_cycle_str
```python
from test_frame_color import test_mpl2_color_cycle_str
```



---
## test_color_single_series_list
```python
from test_frame_color import test_color_single_series_list
```



---
## test_rgb_tuple_color
```python
from test_frame_color import test_rgb_tuple_color
```



---
## test_color_empty_string
```python
from test_frame_color import test_color_empty_string
```



---
## test_color_and_style_arguments
```python
from test_frame_color import test_color_and_style_arguments
```



---
## test_color_and_marker
```python
from test_frame_color import test_color_and_marker
```



---
## test_bar_colors
```python
from test_frame_color import test_bar_colors
```



---
## test_bar_colors_custom
```python
from test_frame_color import test_bar_colors_custom
```



---
## test_bar_colors_cmap
```python
from test_frame_color import test_bar_colors_cmap
```



---
## test_bar_colors_single_col
```python
from test_frame_color import test_bar_colors_single_col
```



---
## test_bar_colors_green
```python
from test_frame_color import test_bar_colors_green
```



---
## test_bar_user_colors
```python
from test_frame_color import test_bar_user_colors
```



---
## test_if_scatterplot_colorbar_affects_xaxis_visibility
```python
from test_frame_color import test_if_scatterplot_colorbar_affects_xaxis_visibility
```



---
## test_if_hexbin_xaxis_label_is_visible
```python
from test_frame_color import test_if_hexbin_xaxis_label_is_visible
```



---
## test_if_scatterplot_colorbars_are_next_to_parent_axes
```python
from test_frame_color import test_if_scatterplot_colorbars_are_next_to_parent_axes
```



---
## test_scatter_with_c_column_name_with_colors
```python
from test_frame_color import test_scatter_with_c_column_name_with_colors
```



---
## test_scatter_colors
```python
from test_frame_color import test_scatter_colors
```



---
## test_scatter_colors_not_raising_warnings
```python
from test_frame_color import test_scatter_colors_not_raising_warnings
```



---
## test_scatter_colors_default
```python
from test_frame_color import test_scatter_colors_default
```



---
## test_scatter_colors_white
```python
from test_frame_color import test_scatter_colors_white
```



---
## test_scatter_colorbar_different_cmap
```python
from test_frame_color import test_scatter_colorbar_different_cmap
```



---
## test_line_colors
```python
from test_frame_color import test_line_colors
```



---
## test_line_colors_cmap
```python
from test_frame_color import test_line_colors_cmap
```



---
## test_line_colors_single_col
```python
from test_frame_color import test_line_colors_single_col
```



---
## test_line_colors_single_color
```python
from test_frame_color import test_line_colors_single_color
```



---
## test_line_colors_hex
```python
from test_frame_color import test_line_colors_hex
```



---
## test_dont_modify_colors
```python
from test_frame_color import test_dont_modify_colors
```



---
## test_line_colors_and_styles_subplots
```python
from test_frame_color import test_line_colors_and_styles_subplots
```



---
## test_line_colors_and_styles_subplots_single_color_str
```python
from test_frame_color import test_line_colors_and_styles_subplots_single_color_str
```



---
## test_line_colors_and_styles_subplots_custom_colors
```python
from test_frame_color import test_line_colors_and_styles_subplots_custom_colors
```



---
## test_line_colors_and_styles_subplots_colormap_hex
```python
from test_frame_color import test_line_colors_and_styles_subplots_colormap_hex
```



---
## test_line_colors_and_styles_subplots_colormap_subplot
```python
from test_frame_color import test_line_colors_and_styles_subplots_colormap_subplot
```



---
## test_line_colors_and_styles_subplots_single_col
```python
from test_frame_color import test_line_colors_and_styles_subplots_single_col
```



---
## test_line_colors_and_styles_subplots_single_char
```python
from test_frame_color import test_line_colors_and_styles_subplots_single_char
```



---
## test_line_colors_and_styles_subplots_list_styles
```python
from test_frame_color import test_line_colors_and_styles_subplots_list_styles
```



---
## test_area_colors
```python
from test_frame_color import test_area_colors
```



---
## test_area_colors_poly
```python
from test_frame_color import test_area_colors_poly
```



---
## test_area_colors_stacked_false
```python
from test_frame_color import test_area_colors_stacked_false
```



---
## test_hist_colors
```python
from test_frame_color import test_hist_colors
```



---
## test_hist_colors_single_custom
```python
from test_frame_color import test_hist_colors_single_custom
```



---
## test_hist_colors_cmap
```python
from test_frame_color import test_hist_colors_cmap
```



---
## test_hist_colors_single_col
```python
from test_frame_color import test_hist_colors_single_col
```



---
## test_hist_colors_single_color
```python
from test_frame_color import test_hist_colors_single_color
```



---
## test_kde_colors
```python
from test_frame_color import test_kde_colors
```



---
## test_kde_colors_cmap
```python
from test_frame_color import test_kde_colors_cmap
```



---
## test_kde_colors_and_styles_subplots
```python
from test_frame_color import test_kde_colors_and_styles_subplots
```



---
## test_kde_colors_and_styles_subplots_single_col_str
```python
from test_frame_color import test_kde_colors_and_styles_subplots_single_col_str
```



---
## test_kde_colors_and_styles_subplots_custom_color
```python
from test_frame_color import test_kde_colors_and_styles_subplots_custom_color
```



---
## test_kde_colors_and_styles_subplots_cmap
```python
from test_frame_color import test_kde_colors_and_styles_subplots_cmap
```



---
## test_kde_colors_and_styles_subplots_single_col
```python
from test_frame_color import test_kde_colors_and_styles_subplots_single_col
```



---
## test_kde_colors_and_styles_subplots_single_char
```python
from test_frame_color import test_kde_colors_and_styles_subplots_single_char
```



---
## test_kde_colors_and_styles_subplots_list
```python
from test_frame_color import test_kde_colors_and_styles_subplots_list
```



---
## test_boxplot_colors
```python
from test_frame_color import test_boxplot_colors
```



---
## test_boxplot_colors_dict_colors
```python
from test_frame_color import test_boxplot_colors_dict_colors
```



---
## test_boxplot_colors_default_color
```python
from test_frame_color import test_boxplot_colors_default_color
```



---
## test_boxplot_colors_cmap
```python
from test_frame_color import test_boxplot_colors_cmap
```



---
## test_boxplot_colors_single
```python
from test_frame_color import test_boxplot_colors_single
```



---
## test_boxplot_colors_tuple
```python
from test_frame_color import test_boxplot_colors_tuple
```



---
## test_boxplot_colors_invalid
```python
from test_frame_color import test_boxplot_colors_invalid
```



---
## test_default_color_cycle
```python
from test_frame_color import test_default_color_cycle
```



---
## test_no_color_bar
```python
from test_frame_color import test_no_color_bar
```



---
## test_mixing_cmap_and_colormap_raises
```python
from test_frame_color import test_mixing_cmap_and_colormap_raises
```



---
## test_passed_bar_colors
```python
from test_frame_color import test_passed_bar_colors
```



---
## test_rcParams_bar_colors
```python
from test_frame_color import test_rcParams_bar_colors
```



---
## test_colors_of_columns_with_same_name
```python
from test_frame_color import test_colors_of_columns_with_same_name
```



---
## test_invalid_colormap
```python
from test_frame_color import test_invalid_colormap
```



---
## test_dataframe_none_color
```python
from test_frame_color import test_dataframe_none_color
```



---
## TestDataFramePlots
```python
from test_frame import TestDataFramePlots
```



---
## _generate_4_axes_via_gridspec
```python
from test_frame import _generate_4_axes_via_gridspec
```



---
## test_plot
```python
from test_frame import test_plot
```



---
## test_plot_subplots
```python
from test_frame import test_plot_subplots
```



---
## test_plot_subplots_negative_layout
```python
from test_frame import test_plot_subplots_negative_layout
```



---
## test_plot_subplots_use_index
```python
from test_frame import test_plot_subplots_use_index
```



---
## test_plot_invalid_arg
```python
from test_frame import test_plot_invalid_arg
```



---
## test_plot_tick_props
```python
from test_frame import test_plot_tick_props
```



---
## test_plot_other_args
```python
from test_frame import test_plot_other_args
```



---
## test_plot_visible_ax
```python
from test_frame import test_plot_visible_ax
```



---
## test_plot_title
```python
from test_frame import test_plot_title
```



---
## test_plot_multiindex
```python
from test_frame import test_plot_multiindex
```



---
## test_plot_multiindex_unicode
```python
from test_frame import test_plot_multiindex_unicode
```



---
## test_plot_single_column_bar
```python
from test_frame import test_plot_single_column_bar
```



---
## test_plot_passed_ax
```python
from test_frame import test_plot_passed_ax
```



---
## test_nullable_int_plot
```python
from test_frame import test_nullable_int_plot
```



---
## test_integer_array_plot_series
```python
from test_frame import test_integer_array_plot_series
```



---
## test_integer_array_plot_df
```python
from test_frame import test_integer_array_plot_df
```



---
## test_nonnumeric_exclude
```python
from test_frame import test_nonnumeric_exclude
```



---
## test_implicit_label
```python
from test_frame import test_implicit_label
```



---
## test_donot_overwrite_index_name
```python
from test_frame import test_donot_overwrite_index_name
```



---
## test_plot_xy
```python
from test_frame import test_plot_xy
```



---
## test_plot_xy_int_cols
```python
from test_frame import test_plot_xy_int_cols
```



---
## test_plot_xy_figsize_and_title
```python
from test_frame import test_plot_xy_figsize_and_title
```



---
## test_logscales
```python
from test_frame import test_logscales
```



---
## test_invalid_logscale
```python
from test_frame import test_invalid_logscale
```



---
## test_xcompat
```python
from test_frame import test_xcompat
```



---
## test_xcompat_plot_params
```python
from test_frame import test_xcompat_plot_params
```



---
## test_xcompat_plot_params_x_compat
```python
from test_frame import test_xcompat_plot_params_x_compat
```



---
## test_xcompat_plot_params_context_manager
```python
from test_frame import test_xcompat_plot_params_context_manager
```



---
## test_xcompat_plot_period
```python
from test_frame import test_xcompat_plot_period
```



---
## test_period_compat
```python
from test_frame import test_period_compat
```



---
## test_unsorted_index
```python
from test_frame import test_unsorted_index
```



---
## test_unsorted_index_lims
```python
from test_frame import test_unsorted_index_lims
```



---
## test_unsorted_index_lims_x_y
```python
from test_frame import test_unsorted_index_lims_x_y
```



---
## test_negative_log
```python
from test_frame import test_negative_log
```



---
## _compare_stacked_y_cood
```python
from test_frame import _compare_stacked_y_cood
```



---
## test_line_area_stacked
```python
from test_frame import test_line_area_stacked
```



---
## test_line_area_stacked_sep_df
```python
from test_frame import test_line_area_stacked_sep_df
```



---
## test_line_area_stacked_mixed
```python
from test_frame import test_line_area_stacked_mixed
```



---
## test_line_area_stacked_positive_idx
```python
from test_frame import test_line_area_stacked_positive_idx
```



---
## test_line_area_nan_df
```python
from test_frame import test_line_area_nan_df
```



---
## test_line_area_nan_df_stacked
```python
from test_frame import test_line_area_nan_df_stacked
```



---
## test_line_area_nan_df_stacked_area
```python
from test_frame import test_line_area_nan_df_stacked_area
```



---
## test_line_lim
```python
from test_frame import test_line_lim
```



---
## test_line_lim_subplots
```python
from test_frame import test_line_lim_subplots
```



---
## test_area_lim
```python
from test_frame import test_area_lim
```



---
## test_area_sharey_dont_overwrite
```python
from test_frame import test_area_sharey_dont_overwrite
```



---
## test_bar_linewidth
```python
from test_frame import test_bar_linewidth
```



---
## test_bar_linewidth_subplots
```python
from test_frame import test_bar_linewidth_subplots
```



---
## test_bar_barwidth
```python
from test_frame import test_bar_barwidth
```



---
## test_barh_barwidth_subplots
```python
from test_frame import test_barh_barwidth_subplots
```



---
## test_bar_bottom_left_bottom
```python
from test_frame import test_bar_bottom_left_bottom
```



---
## test_bar_bottom_left_left
```python
from test_frame import test_bar_bottom_left_left
```



---
## test_bar_bottom_left_subplots
```python
from test_frame import test_bar_bottom_left_subplots
```



---
## test_bar_nan
```python
from test_frame import test_bar_nan
```



---
## test_bar_nan_stacked
```python
from test_frame import test_bar_nan_stacked
```



---
## test_bar_categorical
```python
from test_frame import test_bar_categorical
```



---
## test_plot_scatter
```python
from test_frame import test_plot_scatter
```



---
## test_plot_scatter_error
```python
from test_frame import test_plot_scatter_error
```



---
## test_plot_scatter_shape
```python
from test_frame import test_plot_scatter_shape
```



---
## test_raise_error_on_datetime_time_data
```python
from test_frame import test_raise_error_on_datetime_time_data
```



---
## test_scatterplot_datetime_data
```python
from test_frame import test_scatterplot_datetime_data
```



---
## test_scatterplot_object_data
```python
from test_frame import test_scatterplot_object_data
```



---
## test_scatterplot_color_by_categorical
```python
from test_frame import test_scatterplot_color_by_categorical
```



---
## test_plot_scatter_with_categorical_data
```python
from test_frame import test_plot_scatter_with_categorical_data
```



---
## test_plot_scatter_with_c
```python
from test_frame import test_plot_scatter_with_c
```



---
## test_plot_scatter_with_c_props
```python
from test_frame import test_plot_scatter_with_c_props
```



---
## test_plot_scatter_with_c_array
```python
from test_frame import test_plot_scatter_with_c_array
```



---
## test_plot_scatter_with_s
```python
from test_frame import test_plot_scatter_with_s
```



---
## test_plot_scatter_with_norm
```python
from test_frame import test_plot_scatter_with_norm
```



---
## test_plot_scatter_without_norm
```python
from test_frame import test_plot_scatter_without_norm
```



---
## test_plot_bar
```python
from test_frame import test_plot_bar
```



---
## test_plot_bar_int_col
```python
from test_frame import test_plot_bar_int_col
```



---
## test_plot_bar_ticks
```python
from test_frame import test_plot_bar_ticks
```



---
## test_plot_barh_ticks
```python
from test_frame import test_plot_barh_ticks
```



---
## test_boxplot
```python
from test_frame import test_boxplot
```



---
## test_boxplot_series
```python
from test_frame import test_boxplot_series
```



---
## test_boxplot_series_positions
```python
from test_frame import test_boxplot_series_positions
```



---
## test_boxplot_vertical
```python
from test_frame import test_boxplot_vertical
```



---
## test_boxplot_vertical_subplots
```python
from test_frame import test_boxplot_vertical_subplots
```



---
## test_boxplot_vertical_positions
```python
from test_frame import test_boxplot_vertical_positions
```



---
## test_boxplot_return_type_invalid
```python
from test_frame import test_boxplot_return_type_invalid
```



---
## test_boxplot_return_type_invalid_type
```python
from test_frame import test_boxplot_return_type_invalid_type
```



---
## test_kde_df
```python
from test_frame import test_kde_df
```



---
## test_kde_df_rot
```python
from test_frame import test_kde_df_rot
```



---
## test_kde_df_subplots
```python
from test_frame import test_kde_df_subplots
```



---
## test_kde_df_logy
```python
from test_frame import test_kde_df_logy
```



---
## test_kde_missing_vals
```python
from test_frame import test_kde_missing_vals
```



---
## test_hist_df
```python
from test_frame import test_hist_df
```



---
## test_hist_df_series
```python
from test_frame import test_hist_df_series
```



---
## test_hist_df_series_cumulative_density
```python
from test_frame import test_hist_df_series_cumulative_density
```



---
## test_hist_df_series_cumulative
```python
from test_frame import test_hist_df_series_cumulative
```



---
## test_hist_df_orientation
```python
from test_frame import test_hist_df_orientation
```



---
## test_hist_weights
```python
from test_frame import test_hist_weights
```



---
## _check_box_coord
```python
from test_frame import _check_box_coord
```



---
## test_hist_df_coord
```python
from test_frame import test_hist_df_coord
```



---
## test_plot_int_columns
```python
from test_frame import test_plot_int_columns
```



---
## test_style_by_column
```python
from test_frame import test_style_by_column
```



---
## test_line_label_none
```python
from test_frame import test_line_label_none
```



---
## test_specified_props_kwd_plot_box
```python
from test_frame import test_specified_props_kwd_plot_box
```



---
## test_unordered_ts
```python
from test_frame import test_unordered_ts
```



---
## test_kind_both_ways
```python
from test_frame import test_kind_both_ways
```



---
## test_kind_both_ways_x_y
```python
from test_frame import test_kind_both_ways_x_y
```



---
## test_all_invalid_plot_data
```python
from test_frame import test_all_invalid_plot_data
```



---
## test_partially_invalid_plot_data_numeric
```python
from test_frame import test_partially_invalid_plot_data_numeric
```



---
## test_invalid_kind
```python
from test_frame import test_invalid_kind
```



---
## test_invalid_xy_args
```python
from test_frame import test_invalid_xy_args
```



---
## test_bad_label
```python
from test_frame import test_bad_label
```



---
## test_invalid_xy_args_dup_cols
```python
from test_frame import test_invalid_xy_args_dup_cols
```



---
## test_y_listlike
```python
from test_frame import test_y_listlike
```



---
## test_xy_args_integer
```python
from test_frame import test_xy_args_integer
```



---
## test_hexbin_basic
```python
from test_frame import test_hexbin_basic
```



---
## test_hexbin_basic_subplots
```python
from test_frame import test_hexbin_basic_subplots
```



---
## test_hexbin_with_c
```python
from test_frame import test_hexbin_with_c
```



---
## test_hexbin_cmap
```python
from test_frame import test_hexbin_cmap
```



---
## test_pie_df_err
```python
from test_frame import test_pie_df_err
```



---
## test_pie_df
```python
from test_frame import test_pie_df
```



---
## test_pie_df_subplots
```python
from test_frame import test_pie_df_subplots
```



---
## test_pie_df_labels_colors
```python
from test_frame import test_pie_df_labels_colors
```



---
## test_pie_df_nan
```python
from test_frame import test_pie_df_nan
```



---
## test_errorbar_plot
```python
from test_frame import test_errorbar_plot
```



---
## test_errorbar_plot_bar
```python
from test_frame import test_errorbar_plot_bar
```



---
## test_errorbar_plot_yerr_array
```python
from test_frame import test_errorbar_plot_yerr_array
```



---
## test_errorbar_plot_column_name
```python
from test_frame import test_errorbar_plot_column_name
```



---
## test_errorbar_plot_external_valueerror
```python
from test_frame import test_errorbar_plot_external_valueerror
```



---
## test_errorbar_plot_external_typeerror
```python
from test_frame import test_errorbar_plot_external_typeerror
```



---
## test_errorbar_plot_different_yerr
```python
from test_frame import test_errorbar_plot_different_yerr
```



---
## test_errorbar_plot_different_yerr_xerr
```python
from test_frame import test_errorbar_plot_different_yerr_xerr
```



---
## test_errorbar_plot_different_yerr_xerr_subplots
```python
from test_frame import test_errorbar_plot_different_yerr_xerr_subplots
```



---
## test_errorbar_plot_iterator
```python
from test_frame import test_errorbar_plot_iterator
```



---
## test_errorbar_with_integer_column_names
```python
from test_frame import test_errorbar_with_integer_column_names
```



---
## test_errorbar_with_partial_columns_kind
```python
from test_frame import test_errorbar_with_partial_columns_kind
```



---
## test_errorbar_with_partial_columns_dti
```python
from test_frame import test_errorbar_with_partial_columns_dti
```



---
## test_errorbar_with_partial_columns_box
```python
from test_frame import test_errorbar_with_partial_columns_box
```



---
## test_errorbar_timeseries
```python
from test_frame import test_errorbar_timeseries
```



---
## test_errorbar_asymmetrical
```python
from test_frame import test_errorbar_asymmetrical
```



---
## test_table
```python
from test_frame import test_table
```



---
## test_errorbar_scatter
```python
from test_frame import test_errorbar_scatter
```



---
## test_errorbar_scatter_color
```python
from test_frame import test_errorbar_scatter_color
```



---
## test_scatter_unknown_colormap
```python
from test_frame import test_scatter_unknown_colormap
```



---
## test_sharex_and_ax
```python
from test_frame import test_sharex_and_ax
```



---
## test_sharex_false_and_ax
```python
from test_frame import test_sharex_false_and_ax
```



---
## test_sharey_and_ax
```python
from test_frame import test_sharey_and_ax
```



---
## test_sharey_and_ax_tight
```python
from test_frame import test_sharey_and_ax_tight
```



---
## test_memory_leak
```python
from test_frame import test_memory_leak
```

Check that every plot type gets properly collected.

---
## test_df_gridspec_patterns_vert_horiz
```python
from test_frame import test_df_gridspec_patterns_vert_horiz
```



---
## test_df_gridspec_patterns_boxed
```python
from test_frame import test_df_gridspec_patterns_boxed
```



---
## test_df_grid_settings
```python
from test_frame import test_df_grid_settings
```



---
## test_plain_axes
```python
from test_frame import test_plain_axes
```



---
## test_plain_axes_df
```python
from test_frame import test_plain_axes_df
```



---
## test_plain_axes_make_axes_locatable
```python
from test_frame import test_plain_axes_make_axes_locatable
```



---
## test_plain_axes_make_inset_axes
```python
from test_frame import test_plain_axes_make_inset_axes
```



---
## test_secondary_axis_font_size
```python
from test_frame import test_secondary_axis_font_size
```



---
## test_x_string_values_ticks
```python
from test_frame import test_x_string_values_ticks
```



---
## test_x_multiindex_values_ticks
```python
from test_frame import test_x_multiindex_values_ticks
```



---
## test_xlim_plot_line
```python
from test_frame import test_xlim_plot_line
```



---
## test_xlim_plot_line_correctly_in_mixed_plot_type
```python
from test_frame import test_xlim_plot_line_correctly_in_mixed_plot_type
```



---
## test_plot_no_rows
```python
from test_frame import test_plot_no_rows
```



---
## test_plot_no_numeric_data
```python
from test_frame import test_plot_no_numeric_data
```



---
## test_group_subplot
```python
from test_frame import test_group_subplot
```



---
## test_group_subplot_series_notimplemented
```python
from test_frame import test_group_subplot_series_notimplemented
```



---
## test_group_subplot_multiindex_notimplemented
```python
from test_frame import test_group_subplot_multiindex_notimplemented
```



---
## test_group_subplot_nonunique_cols_notimplemented
```python
from test_frame import test_group_subplot_nonunique_cols_notimplemented
```



---
## test_group_subplot_bad_input
```python
from test_frame import test_group_subplot_bad_input
```



---
## test_group_subplot_invalid_column_name
```python
from test_frame import test_group_subplot_invalid_column_name
```



---
## test_group_subplot_duplicated_column
```python
from test_frame import test_group_subplot_duplicated_column
```



---
## test_group_subplot_invalid_kind
```python
from test_frame import test_group_subplot_invalid_kind
```



---
## test_xlabel_ylabel_dataframe_single_plot
```python
from test_frame import test_xlabel_ylabel_dataframe_single_plot
```



---
## test_xlabel_ylabel_dataframe_plane_plot
```python
from test_frame import test_xlabel_ylabel_dataframe_plane_plot
```



---
## test_secondary_y
```python
from test_frame import test_secondary_y
```



---
## test_plot_no_warning
```python
from test_frame import test_plot_no_warning
```



---
## _check_errorbar_color
```python
from test_frame import _check_errorbar_color
```



---
## _check
```python
from test_frame import _check
```



---
## _get_vertical_grid
```python
from test_frame import _get_vertical_grid
```



---
## _get_horizontal_grid
```python
from test_frame import _get_horizontal_grid
```



---
## _get_boxed_grid
```python
from test_frame import _get_boxed_grid
```



---
## __name__
```python
from test_frame_subplots import __name__
```

Test cases for DataFrame.plot 

---
## TestDataFramePlotsSubplots
```python
from test_frame_subplots import TestDataFramePlotsSubplots
```



---
## test_subplots
```python
from test_frame_subplots import test_subplots
```



---
## test_subplots_no_share_x
```python
from test_frame_subplots import test_subplots_no_share_x
```



---
## test_subplots_no_legend
```python
from test_frame_subplots import test_subplots_no_legend
```



---
## test_subplots_timeseries
```python
from test_frame_subplots import test_subplots_timeseries
```



---
## test_subplots_timeseries_rot
```python
from test_frame_subplots import test_subplots_timeseries_rot
```



---
## test_subplots_timeseries_y_axis
```python
from test_frame_subplots import test_subplots_timeseries_y_axis
```



---
## test_subplots_timeseries_y_text_error
```python
from test_frame_subplots import test_subplots_timeseries_y_text_error
```



---
## test_subplots_timeseries_y_axis_not_supported
```python
from test_frame_subplots import test_subplots_timeseries_y_axis_not_supported
```

This test will fail for:
period:
    since period isn't yet implemented in ``select_dtypes``
    and because it will need a custom value converter +
    tick formatter (as was done for x-axis plots)

categorical:
     because it will need a custom value converter +
     tick formatter (also doesn't work for x-axis, as of now)

datetime_mixed_tz:
    because of the way how pandas handles ``Series`` of
    ``datetime`` objects with different timezone,
    generally converting ``datetime`` objects in a tz-aware
    form could help with this problem

---
## test_subplots_layout_multi_column
```python
from test_frame_subplots import test_subplots_layout_multi_column
```



---
## test_subplots_layout_multi_column_error
```python
from test_frame_subplots import test_subplots_layout_multi_column_error
```



---
## test_subplots_layout_single_column
```python
from test_frame_subplots import test_subplots_layout_single_column
```



---
## test_subplots_warnings
```python
from test_frame_subplots import test_subplots_warnings
```



---
## test_subplots_multiple_axes
```python
from test_frame_subplots import test_subplots_multiple_axes
```



---
## test_subplots_multiple_axes_error
```python
from test_frame_subplots import test_subplots_multiple_axes_error
```



---
## test_subplots_multiple_axes_2_dim
```python
from test_frame_subplots import test_subplots_multiple_axes_2_dim
```



---
## test_subplots_multiple_axes_single_col
```python
from test_frame_subplots import test_subplots_multiple_axes_single_col
```



---
## test_subplots_ts_share_axes
```python
from test_frame_subplots import test_subplots_ts_share_axes
```



---
## test_subplots_sharex_axes_existing_axes
```python
from test_frame_subplots import test_subplots_sharex_axes_existing_axes
```



---
## test_subplots_dup_columns
```python
from test_frame_subplots import test_subplots_dup_columns
```



---
## test_subplots_dup_columns_secondary_y
```python
from test_frame_subplots import test_subplots_dup_columns_secondary_y
```



---
## test_subplots_dup_columns_secondary_y_no_subplot
```python
from test_frame_subplots import test_subplots_dup_columns_secondary_y_no_subplot
```



---
## test_bar_log_no_subplots
```python
from test_frame_subplots import test_bar_log_no_subplots
```



---
## test_bar_log_subplots
```python
from test_frame_subplots import test_bar_log_subplots
```



---
## test_boxplot_subplots_return_type_default
```python
from test_frame_subplots import test_boxplot_subplots_return_type_default
```



---
## test_boxplot_subplots_return_type
```python
from test_frame_subplots import test_boxplot_subplots_return_type
```



---
## test_df_subplots_patterns_minorticks
```python
from test_frame_subplots import test_df_subplots_patterns_minorticks
```



---
## test_df_subplots_patterns_minorticks_1st_ax_hidden
```python
from test_frame_subplots import test_df_subplots_patterns_minorticks_1st_ax_hidden
```



---
## test_df_subplots_patterns_minorticks_not_shared
```python
from test_frame_subplots import test_df_subplots_patterns_minorticks_not_shared
```



---
## test_subplots_sharex_false
```python
from test_frame_subplots import test_subplots_sharex_false
```



---
## test_subplots_constrained_layout
```python
from test_frame_subplots import test_subplots_constrained_layout
```



---
## test_xlabel_ylabel_dataframe_subplots
```python
from test_frame_subplots import test_xlabel_ylabel_dataframe_subplots
```



---
## test_bar_align_multiple_columns
```python
from test_frame_subplots import test_bar_align_multiple_columns
```



---
## test_bar_align_single_column
```python
from test_frame_subplots import test_bar_align_single_column
```



---
## test_bar_barwidth_position
```python
from test_frame_subplots import test_bar_barwidth_position
```



---
## test_bar_barwidth_position_int
```python
from test_frame_subplots import test_bar_barwidth_position_int
```



---
## test_bar_barwidth_position_int_width_1
```python
from test_frame_subplots import test_bar_barwidth_position_int_width_1
```



---
## _check_bar_alignment
```python
from test_frame_subplots import _check_bar_alignment
```



---
## __name__
```python
from test_frame_legend import __name__
```



---
## TestFrameLegend
```python
from test_frame_legend import TestFrameLegend
```



---
## test_mixed_yerr
```python
from test_frame_legend import test_mixed_yerr
```



---
## test_legend_false
```python
from test_frame_legend import test_legend_false
```



---
## test_df_legend_labels
```python
from test_frame_legend import test_df_legend_labels
```



---
## test_df_legend_labels_secondary_y
```python
from test_frame_legend import test_df_legend_labels_secondary_y
```



---
## test_df_legend_labels_time_series
```python
from test_frame_legend import test_df_legend_labels_time_series
```



---
## test_df_legend_labels_time_series_scatter
```python
from test_frame_legend import test_df_legend_labels_time_series_scatter
```



---
## test_df_legend_labels_time_series_no_mutate
```python
from test_frame_legend import test_df_legend_labels_time_series_no_mutate
```



---
## test_missing_marker_multi_plots_on_same_ax
```python
from test_frame_legend import test_missing_marker_multi_plots_on_same_ax
```



---
## test_legend_name
```python
from test_frame_legend import test_legend_name
```



---
## test_no_legend
```python
from test_frame_legend import test_no_legend
```



---
## test_missing_markers_legend
```python
from test_frame_legend import test_missing_markers_legend
```



---
## test_missing_markers_legend_using_style
```python
from test_frame_legend import test_missing_markers_legend_using_style
```



---
## __name__
```python
from test_hist_box_by import __name__
```



---
## hist_df
```python
from test_hist_box_by import hist_df
```



---
## TestHistWithBy
```python
from test_hist_box_by import TestHistWithBy
```



---
## TestBoxWithBy
```python
from test_hist_box_by import TestBoxWithBy
```



---
## test_hist_plot_by_argument
```python
from test_hist_box_by import test_hist_plot_by_argument
```



---
## test_hist_plot_by_0
```python
from test_hist_box_by import test_hist_plot_by_0
```



---
## test_hist_plot_empty_list_string_tuple_by
```python
from test_hist_box_by import test_hist_plot_empty_list_string_tuple_by
```



---
## test_hist_plot_layout_with_by
```python
from test_hist_box_by import test_hist_plot_layout_with_by
```



---
## test_hist_plot_invalid_layout_with_by_raises
```python
from test_hist_box_by import test_hist_plot_invalid_layout_with_by_raises
```



---
## test_axis_share_x_with_by
```python
from test_hist_box_by import test_axis_share_x_with_by
```



---
## test_axis_share_y_with_by
```python
from test_hist_box_by import test_axis_share_y_with_by
```



---
## test_figure_shape_hist_with_by
```python
from test_hist_box_by import test_figure_shape_hist_with_by
```



---
## test_box_plot_by_argument
```python
from test_hist_box_by import test_box_plot_by_argument
```



---
## test_box_plot_by_0
```python
from test_hist_box_by import test_box_plot_by_0
```



---
## test_box_plot_with_none_empty_list_by
```python
from test_hist_box_by import test_box_plot_with_none_empty_list_by
```



---
## test_box_plot_layout_with_by
```python
from test_hist_box_by import test_box_plot_layout_with_by
```



---
## test_box_plot_invalid_layout_with_by_raises
```python
from test_hist_box_by import test_box_plot_invalid_layout_with_by_raises
```



---
## __name__
```python
from test_frame_groupby import __name__
```

Test cases for DataFrame.plot 

---
## TestDataFramePlotsGroupby
```python
from test_frame_groupby import TestDataFramePlotsGroupby
```



---
## _assert_ytickslabels_visibility
```python
from test_frame_groupby import _assert_ytickslabels_visibility
```



---
## _assert_xtickslabels_visibility
```python
from test_frame_groupby import _assert_xtickslabels_visibility
```



---
## test_groupby_boxplot_sharey
```python
from test_frame_groupby import test_groupby_boxplot_sharey
```



---
## test_groupby_boxplot_sharex
```python
from test_frame_groupby import test_groupby_boxplot_sharex
```



---
## create_series
```python
from conftest import create_series
```



---
## create_dataframes
```python
from conftest import create_dataframes
```



---
## is_constant
```python
from conftest import is_constant
```



---
## consistent_data
```python
from conftest import consistent_data
```



---
## series_data
```python
from conftest import series_data
```



---
## __name__
```python
from test_moments_consistency_ewm import __name__
```



---
## create_mock_weights
```python
from test_moments_consistency_ewm import create_mock_weights
```



---
## create_mock_series_weights
```python
from test_moments_consistency_ewm import create_mock_series_weights
```



---
## test_ewm_consistency_mean
```python
from test_moments_consistency_ewm import test_ewm_consistency_mean
```



---
## test_ewm_consistency_consistent
```python
from test_moments_consistency_ewm import test_ewm_consistency_consistent
```



---
## test_ewm_consistency_var_debiasing_factors
```python
from test_moments_consistency_ewm import test_ewm_consistency_var_debiasing_factors
```



---
## test_moments_consistency_var
```python
from test_moments_consistency_ewm import test_moments_consistency_var
```



---
## test_moments_consistency_var_constant
```python
from test_moments_consistency_ewm import test_moments_consistency_var_constant
```



---
## test_ewm_consistency_std
```python
from test_moments_consistency_ewm import test_ewm_consistency_std
```



---
## test_ewm_consistency_series_cov_corr
```python
from test_moments_consistency_ewm import test_ewm_consistency_series_cov_corr
```



---
## __name__
```python
from test_moments_consistency_rolling import __name__
```



---
## no_nans
```python
from test_moments_consistency_rolling import no_nans
```



---
## all_na
```python
from test_moments_consistency_rolling import all_na
```



---
## rolling_consistency_cases
```python
from test_moments_consistency_rolling import rolling_consistency_cases
```

window, min_periods

---
## test_rolling_apply_consistency_sum
```python
from test_moments_consistency_rolling import test_rolling_apply_consistency_sum
```



---
## test_moments_consistency_var
```python
from test_moments_consistency_rolling import test_moments_consistency_var
```



---
## test_moments_consistency_var_constant
```python
from test_moments_consistency_rolling import test_moments_consistency_var_constant
```



---
## test_rolling_consistency_var_std_cov
```python
from test_moments_consistency_rolling import test_rolling_consistency_var_std_cov
```



---
## test_rolling_consistency_series_cov_corr
```python
from test_moments_consistency_rolling import test_rolling_consistency_series_cov_corr
```



---
## test_rolling_consistency_mean
```python
from test_moments_consistency_rolling import test_rolling_consistency_mean
```



---
## test_rolling_consistency_constant
```python
from test_moments_consistency_rolling import test_rolling_consistency_constant
```



---
## test_rolling_consistency_var_debiasing_factors
```python
from test_moments_consistency_rolling import test_rolling_consistency_var_debiasing_factors
```



---
## __name__
```python
from test_moments_consistency_expanding import __name__
```



---
## no_nans
```python
from test_moments_consistency_expanding import no_nans
```



---
## all_na
```python
from test_moments_consistency_expanding import all_na
```



---
## test_expanding_apply_consistency_sum_nans
```python
from test_moments_consistency_expanding import test_expanding_apply_consistency_sum_nans
```



---
## test_moments_consistency_var
```python
from test_moments_consistency_expanding import test_moments_consistency_var
```



---
## test_moments_consistency_var_constant
```python
from test_moments_consistency_expanding import test_moments_consistency_var_constant
```



---
## test_expanding_consistency_var_std_cov
```python
from test_moments_consistency_expanding import test_expanding_consistency_var_std_cov
```



---
## test_expanding_consistency_series_cov_corr
```python
from test_moments_consistency_expanding import test_expanding_consistency_series_cov_corr
```



---
## test_expanding_consistency_mean
```python
from test_moments_consistency_expanding import test_expanding_consistency_mean
```



---
## test_expanding_consistency_constant
```python
from test_moments_consistency_expanding import test_expanding_consistency_constant
```



---
## test_expanding_consistency_var_debiasing_factors
```python
from test_moments_consistency_expanding import test_expanding_consistency_var_debiasing_factors
```



---
## na_val
```python
from test_string import na_val
```



---
## cls
```python
from test_string import cls
```

Fixture giving array type from parametrized 'dtype'

---
## test_repr
```python
from test_string import test_repr
```



---
## test_none_to_nan
```python
from test_string import test_none_to_nan
```



---
## test_setitem_validates
```python
from test_string import test_setitem_validates
```



---
## test_setitem_with_scalar_string
```python
from test_string import test_setitem_with_scalar_string
```



---
## test_setitem_with_array_with_missing
```python
from test_string import test_setitem_with_array_with_missing
```



---
## test_astype_roundtrip
```python
from test_string import test_astype_roundtrip
```



---
## test_add
```python
from test_string import test_add
```



---
## test_add_2d
```python
from test_string import test_add_2d
```



---
## test_add_sequence
```python
from test_string import test_add_sequence
```



---
## test_mul
```python
from test_string import test_mul
```



---
## test_add_strings
```python
from test_string import test_add_strings
```



---
## test_add_frame
```python
from test_string import test_add_frame
```



---
## test_comparison_methods_scalar
```python
from test_string import test_comparison_methods_scalar
```



---
## test_comparison_methods_scalar_pd_na
```python
from test_string import test_comparison_methods_scalar_pd_na
```



---
## test_comparison_methods_scalar_not_string
```python
from test_string import test_comparison_methods_scalar_not_string
```



---
## test_comparison_methods_array
```python
from test_string import test_comparison_methods_array
```



---
## test_constructor_raises
```python
from test_string import test_constructor_raises
```



---
## test_constructor_nan_like
```python
from test_string import test_constructor_nan_like
```



---
## test_from_sequence_no_mutate
```python
from test_string import test_from_sequence_no_mutate
```



---
## test_astype_int
```python
from test_string import test_astype_int
```



---
## test_astype_nullable_int
```python
from test_string import test_astype_nullable_int
```



---
## test_astype_float
```python
from test_string import test_astype_float
```



---
## test_reduce
```python
from test_string import test_reduce
```



---
## test_reduce_missing
```python
from test_string import test_reduce_missing
```



---
## test_min_max
```python
from test_string import test_min_max
```



---
## test_min_max_numpy
```python
from test_string import test_min_max_numpy
```



---
## test_fillna_args
```python
from test_string import test_fillna_args
```



---
## test_arrow_array
```python
from test_string import test_arrow_array
```



---
## test_arrow_roundtrip
```python
from test_string import test_arrow_roundtrip
```



---
## test_arrow_load_from_zero_chunks
```python
from test_string import test_arrow_load_from_zero_chunks
```



---
## test_value_counts_na
```python
from test_string import test_value_counts_na
```



---
## test_value_counts_with_normalize
```python
from test_string import test_value_counts_with_normalize
```



---
## test_use_inf_as_na
```python
from test_string import test_use_inf_as_na
```



---
## test_memory_usage
```python
from test_string import test_memory_usage
```



---
## test_astype_from_float_dtype
```python
from test_string import test_astype_from_float_dtype
```



---
## test_to_numpy_returns_pdna_default
```python
from test_string import test_to_numpy_returns_pdna_default
```



---
## test_to_numpy_na_value
```python
from test_string import test_to_numpy_na_value
```



---
## test_isin
```python
from test_string import test_isin
```



---
## test_setitem_scalar_with_mask_validation
```python
from test_string import test_setitem_scalar_with_mask_validation
```



---
## test_from_numpy_str
```python
from test_string import test_from_numpy_str
```



---
## test_tolist
```python
from test_string import test_tolist
```



---
## __name__
```python
from test_string_arrow import __name__
```



---
## test_eq_all_na
```python
from test_string_arrow import test_eq_all_na
```



---
## test_config
```python
from test_string_arrow import test_config
```



---
## test_config_bad_storage_raises
```python
from test_string_arrow import test_config_bad_storage_raises
```



---
## test_constructor_not_string_type_raises
```python
from test_string_arrow import test_constructor_not_string_type_raises
```



---
## test_constructor_not_string_type_value_dictionary_raises
```python
from test_string_arrow import test_constructor_not_string_type_value_dictionary_raises
```



---
## test_constructor_valid_string_type_value_dictionary
```python
from test_string_arrow import test_constructor_valid_string_type_value_dictionary
```



---
## test_constructor_from_list
```python
from test_string_arrow import test_constructor_from_list
```



---
## test_from_sequence_wrong_dtype_raises
```python
from test_string_arrow import test_from_sequence_wrong_dtype_raises
```



---
## test_pyarrow_not_installed_raises
```python
from test_string_arrow import test_pyarrow_not_installed_raises
```



---
## test_setitem
```python
from test_string_arrow import test_setitem
```



---
## test_setitem_invalid_indexer_raises
```python
from test_string_arrow import test_setitem_invalid_indexer_raises
```



---
## test_pickle_roundtrip
```python
from test_string_arrow import test_pickle_roundtrip
```



---
## test_string_dtype_error_message
```python
from test_string_arrow import test_string_dtype_error_message
```



---
## __name__
```python
from test_overlaps import __name__
```



---
## constructor
```python
from test_overlaps import constructor
```

Fixture for testing both interval container classes.

---
## start_shift
```python
from test_overlaps import start_shift
```

Fixture for generating intervals of types from a start value and a shift
value that can be added to start to generate an endpoint

---
## TestOverlaps
```python
from test_overlaps import TestOverlaps
```



---
## test_overlaps_interval
```python
from test_overlaps import test_overlaps_interval
```



---
## test_overlaps_interval_container
```python
from test_overlaps import test_overlaps_interval_container
```



---
## test_overlaps_na
```python
from test_overlaps import test_overlaps_na
```

NA values are marked as False

---
## test_overlaps_invalid_type
```python
from test_overlaps import test_overlaps_invalid_type
```



---
## TestAttributes
```python
from test_interval import TestAttributes
```



---
## TestMethods
```python
from test_interval import TestMethods
```



---
## TestSetitem
```python
from test_interval import TestSetitem
```



---
## TestReductions
```python
from test_interval import TestReductions
```



---
## test_is_empty
```python
from test_interval import test_is_empty
```



---
## test_set_closed
```python
from test_interval import test_set_closed
```



---
## test_where_raises
```python
from test_interval import test_where_raises
```



---
## test_shift
```python
from test_interval import test_shift
```



---
## test_shift_datetime
```python
from test_interval import test_shift_datetime
```



---
## test_set_na
```python
from test_interval import test_set_na
```



---
## test_setitem_mismatched_closed
```python
from test_interval import test_setitem_mismatched_closed
```



---
## test_min_max_invalid_axis
```python
from test_interval import test_min_max_invalid_axis
```



---
## test_min_max
```python
from test_interval import test_min_max
```



---
## test_astype_categorical_retains_ordered
```python
from test_astype import test_astype_categorical_retains_ordered
```



---
## test_repr
```python
from test_formats import test_repr
```



---
## __name__
```python
from test_interval_pyarrow import __name__
```



---
## test_arrow_extension_type
```python
from test_interval_pyarrow import test_arrow_extension_type
```



---
## test_arrow_array
```python
from test_interval_pyarrow import test_arrow_array
```



---
## test_arrow_array_missing
```python
from test_interval_pyarrow import test_arrow_array_missing
```



---
## test_arrow_table_roundtrip
```python
from test_interval_pyarrow import test_arrow_table_roundtrip
```



---
## test_arrow_table_roundtrip_without_metadata
```python
from test_interval_pyarrow import test_arrow_table_roundtrip_without_metadata
```



---
## test_from_arrow_from_raw_struct_array
```python
from test_interval_pyarrow import test_from_arrow_from_raw_struct_array
```



---
## __name__
```python
from test_arrow_compat import __name__
```



---
## data
```python
from test_arrow_compat import data
```

Fixture returning parametrized array from given dtype, including integer,
float and boolean

---
## test_arrow_array
```python
from test_arrow_compat import test_arrow_array
```



---
## test_arrow_roundtrip
```python
from test_arrow_compat import test_arrow_roundtrip
```



---
## test_dataframe_from_arrow_types_mapper
```python
from test_arrow_compat import test_dataframe_from_arrow_types_mapper
```



---
## test_arrow_load_from_zero_chunks
```python
from test_arrow_compat import test_arrow_load_from_zero_chunks
```



---
## test_arrow_from_arrow_uint
```python
from test_arrow_compat import test_arrow_from_arrow_uint
```



---
## test_arrow_sliced
```python
from test_arrow_compat import test_arrow_sliced
```



---
## np_dtype_to_arrays
```python
from test_arrow_compat import np_dtype_to_arrays
```

Fixture returning actual and expected dtype, pandas and numpy arrays and
mask from a given numpy dtype

---
## test_pyarrow_array_to_numpy_and_mask
```python
from test_arrow_compat import test_pyarrow_array_to_numpy_and_mask
```

Test conversion from pyarrow array to numpy array.

Modifies the pyarrow buffer to contain padding and offset, which are
considered valid buffers by pyarrow.

Also tests empty pyarrow arrays with non empty buffers.
See https://github.com/pandas-dev/pandas/issues/40896

---
## test_from_arrow_null
```python
from test_arrow_compat import test_from_arrow_null
```



---
## test_from_arrow_type_error
```python
from test_arrow_compat import test_from_arrow_type_error
```



---
## types_mapper
```python
from test_arrow_compat import types_mapper
```



---
## __name__
```python
from test_function import __name__
```



---
## data
```python
from test_function import data
```

Fixture returning parametrized 'data' array with different integer and
floating point types

---
## numpy_dtype
```python
from test_function import numpy_dtype
```

Fixture returning numpy dtype from 'data' input array.

---
## test_round
```python
from test_function import test_round
```



---
## test_tolist
```python
from test_function import test_tolist
```



---
## test_to_numpy
```python
from test_function import test_to_numpy
```



---
## MyStringArray
```python
from test_function import MyStringArray
```



---
## data
```python
from test_arithmetic import data
```

Fixture returning boolean array with valid and missing values.

---
## check_skip
```python
from test_arithmetic import check_skip
```



---
## is_bool_not_implemented
```python
from test_arithmetic import is_bool_not_implemented
```



---
## test_array_scalar_like_equivalence
```python
from test_arithmetic import test_array_scalar_like_equivalence
```



---
## test_array_NA
```python
from test_arithmetic import test_array_NA
```



---
## test_numpy_array_equivalence
```python
from test_arithmetic import test_numpy_array_equivalence
```



---
## test_frame
```python
from test_arithmetic import test_frame
```



---
## test_series
```python
from test_arithmetic import test_series
```



---
## test_error_invalid_object
```python
from test_arithmetic import test_error_invalid_object
```



---
## test_error_len_mismatch
```python
from test_arithmetic import test_error_len_mismatch
```



---
## test_unary_op_does_not_propagate_mask
```python
from test_arithmetic import test_unary_op_does_not_propagate_mask
```



---
## test_arrow_extension_type
```python
from test_arrow_compat import test_arrow_extension_type
```



---
## test_arrow_array_missing
```python
from test_arrow_compat import test_arrow_array_missing
```



---
## test_arrow_table_roundtrip
```python
from test_arrow_compat import test_arrow_table_roundtrip
```



---
## test_arrow_table_roundtrip_without_metadata
```python
from test_arrow_compat import test_arrow_table_roundtrip_without_metadata
```



---
## test_min_max_empty
```python
from test_reductions import test_min_max_empty
```



---
## test_period_array_ok
```python
from test_constructors import test_period_array_ok
```



---
## test_period_array_readonly_object
```python
from test_constructors import test_period_array_readonly_object
```



---
## test_from_datetime64_freq_changes
```python
from test_constructors import test_from_datetime64_freq_changes
```



---
## test_from_datetime64_freq_2M
```python
from test_constructors import test_from_datetime64_freq_2M
```



---
## test_period_array_raises
```python
from test_constructors import test_period_array_raises
```



---
## test_period_array_non_period_series_raies
```python
from test_constructors import test_period_array_non_period_series_raies
```



---
## test_period_array_freq_mismatch
```python
from test_constructors import test_period_array_freq_mismatch
```



---
## test_from_sequence_disallows_i8
```python
from test_constructors import test_from_sequence_disallows_i8
```



---
## test_from_td64nat_sequence_raises
```python
from test_constructors import test_from_td64nat_sequence_raises
```



---
## test_freq_deprecated
```python
from test_constructors import test_freq_deprecated
```



---
## test_period_array_from_datetime64
```python
from test_constructors import test_period_array_from_datetime64
```



---
## test_astype_int
```python
from test_astype import test_astype_int
```



---
## test_astype_period
```python
from test_astype import test_astype_period
```



---
## TestCategoricalWarnings
```python
from test_warnings import TestCategoricalWarnings
```



---
## test_tab_complete_warning
```python
from test_warnings import test_tab_complete_warning
```



---
## TestCategoricalConstructors
```python
from test_constructors import TestCategoricalConstructors
```



---
## test_fastpath_deprecated
```python
from test_constructors import test_fastpath_deprecated
```



---
## test_categorical_from_cat_and_dtype_str_preserve_ordered
```python
from test_constructors import test_categorical_from_cat_and_dtype_str_preserve_ordered
```



---
## test_categorical_disallows_scalar
```python
from test_constructors import test_categorical_disallows_scalar
```



---
## test_categorical_1d_only
```python
from test_constructors import test_categorical_1d_only
```



---
## test_validate_ordered
```python
from test_constructors import test_validate_ordered
```



---
## test_constructor_empty_boolean
```python
from test_constructors import test_constructor_empty_boolean
```



---
## test_constructor_tuples
```python
from test_constructors import test_constructor_tuples
```



---
## test_constructor_tuples_datetimes
```python
from test_constructors import test_constructor_tuples_datetimes
```



---
## test_constructor_unsortable
```python
from test_constructors import test_constructor_unsortable
```



---
## test_constructor_interval
```python
from test_constructors import test_constructor_interval
```



---
## test_constructor_with_existing_categories
```python
from test_constructors import test_constructor_with_existing_categories
```



---
## test_constructor_not_sequence
```python
from test_constructors import test_constructor_not_sequence
```



---
## test_constructor_with_null
```python
from test_constructors import test_constructor_with_null
```



---
## test_constructor_with_index
```python
from test_constructors import test_constructor_with_index
```



---
## test_constructor_with_generator
```python
from test_constructors import test_constructor_with_generator
```



---
## test_constructor_with_rangeindex
```python
from test_constructors import test_constructor_with_rangeindex
```



---
## test_constructor_with_datetimelike
```python
from test_constructors import test_constructor_with_datetimelike
```



---
## test_constructor_from_index_series_datetimetz
```python
from test_constructors import test_constructor_from_index_series_datetimetz
```



---
## test_constructor_date_objects
```python
from test_constructors import test_constructor_date_objects
```



---
## test_constructor_from_index_series_timedelta
```python
from test_constructors import test_constructor_from_index_series_timedelta
```



---
## test_constructor_from_index_series_period
```python
from test_constructors import test_constructor_from_index_series_period
```



---
## test_constructor_invariant
```python
from test_constructors import test_constructor_invariant
```



---
## test_constructor_with_dtype
```python
from test_constructors import test_constructor_with_dtype
```



---
## test_constructor_dtype_and_others_raises
```python
from test_constructors import test_constructor_dtype_and_others_raises
```



---
## test_constructor_str_category
```python
from test_constructors import test_constructor_str_category
```



---
## test_constructor_str_unknown
```python
from test_constructors import test_constructor_str_unknown
```



---
## test_constructor_np_strs
```python
from test_constructors import test_constructor_np_strs
```



---
## test_constructor_from_categorical_with_dtype
```python
from test_constructors import test_constructor_from_categorical_with_dtype
```



---
## test_constructor_from_categorical_with_unknown_dtype
```python
from test_constructors import test_constructor_from_categorical_with_unknown_dtype
```



---
## test_constructor_from_categorical_string
```python
from test_constructors import test_constructor_from_categorical_string
```



---
## test_constructor_with_categorical_categories
```python
from test_constructors import test_constructor_with_categorical_categories
```



---
## test_construction_with_null
```python
from test_constructors import test_construction_with_null
```



---
## test_from_codes_nullable_int_categories
```python
from test_constructors import test_from_codes_nullable_int_categories
```



---
## test_from_codes_empty
```python
from test_constructors import test_from_codes_empty
```



---
## test_from_codes_validate
```python
from test_constructors import test_from_codes_validate
```



---
## test_from_codes_too_few_categories
```python
from test_constructors import test_from_codes_too_few_categories
```



---
## test_from_codes_non_int_codes
```python
from test_constructors import test_from_codes_non_int_codes
```



---
## test_from_codes_non_unique_categories
```python
from test_constructors import test_from_codes_non_unique_categories
```



---
## test_from_codes_nan_cat_included
```python
from test_constructors import test_from_codes_nan_cat_included
```



---
## test_from_codes_too_negative
```python
from test_constructors import test_from_codes_too_negative
```



---
## test_from_codes
```python
from test_constructors import test_from_codes
```



---
## test_from_codes_with_categorical_categories
```python
from test_constructors import test_from_codes_with_categorical_categories
```



---
## test_from_codes_with_non_unique_categorical_categories
```python
from test_constructors import test_from_codes_with_non_unique_categorical_categories
```



---
## test_from_codes_with_nan_code
```python
from test_constructors import test_from_codes_with_nan_code
```



---
## test_from_codes_with_float
```python
from test_constructors import test_from_codes_with_float
```



---
## test_from_codes_with_dtype_raises
```python
from test_constructors import test_from_codes_with_dtype_raises
```



---
## test_from_codes_neither
```python
from test_constructors import test_from_codes_neither
```



---
## test_from_codes_with_nullable_int
```python
from test_constructors import test_from_codes_with_nullable_int
```



---
## test_from_codes_with_nullable_int_na_raises
```python
from test_constructors import test_from_codes_with_nullable_int_na_raises
```



---
## test_from_inferred_categories
```python
from test_constructors import test_from_inferred_categories
```



---
## test_from_inferred_categories_sorts
```python
from test_constructors import test_from_inferred_categories_sorts
```



---
## test_from_inferred_categories_dtype
```python
from test_constructors import test_from_inferred_categories_dtype
```



---
## test_from_inferred_categories_coerces
```python
from test_constructors import test_from_inferred_categories_coerces
```



---
## test_construction_with_ordered
```python
from test_constructors import test_construction_with_ordered
```



---
## test_constructor_imaginary
```python
from test_constructors import test_constructor_imaginary
```



---
## test_constructor_string_and_tuples
```python
from test_constructors import test_constructor_string_and_tuples
```



---
## test_interval
```python
from test_constructors import test_interval
```



---
## test_categorical_extension_array_nullable
```python
from test_constructors import test_categorical_extension_array_nullable
```



---
## test_from_sequence_copy
```python
from test_constructors import test_from_sequence_copy
```



---
## test_constructor_datetime64_non_nano
```python
from test_constructors import test_constructor_datetime64_non_nano
```



---
## test_constructor_preserves_freq
```python
from test_constructors import test_constructor_preserves_freq
```



---
## TestCategoricalMissing
```python
from test_missing import TestCategoricalMissing
```



---
## test_isna
```python
from test_missing import test_isna
```



---
## test_na_flags_int_categories
```python
from test_missing import test_na_flags_int_categories
```



---
## test_nan_handling
```python
from test_missing import test_nan_handling
```



---
## test_set_dtype_nans
```python
from test_missing import test_set_dtype_nans
```



---
## test_set_item_nan
```python
from test_missing import test_set_item_nan
```



---
## test_fillna_raises
```python
from test_missing import test_fillna_raises
```



---
## test_fillna_iterable_category
```python
from test_missing import test_fillna_iterable_category
```



---
## test_fillna_array
```python
from test_missing import test_fillna_array
```



---
## test_use_inf_as_na
```python
from test_missing import test_use_inf_as_na
```



---
## test_use_inf_as_na_outside_context
```python
from test_missing import test_use_inf_as_na_outside_context
```



---
## test_compare_categorical_with_missing
```python
from test_missing import test_compare_categorical_with_missing
```



---
## test_categorical_only_missing_values_no_cast
```python
from test_missing import test_categorical_only_missing_values_no_cast
```



---
## TestCategoricalSort
```python
from test_sorting import TestCategoricalSort
```



---
## test_argsort
```python
from test_sorting import test_argsort
```



---
## test_numpy_argsort
```python
from test_sorting import test_numpy_argsort
```



---
## test_sort_values
```python
from test_sorting import test_sort_values
```



---
## test_sort_values_na_position
```python
from test_sorting import test_sort_values_na_position
```



---
## __name__
```python
from test_operators import __name__
```



---
## TestCategoricalOpsWithFactor
```python
from test_operators import TestCategoricalOpsWithFactor
```



---
## TestCategoricalOps
```python
from test_operators import TestCategoricalOps
```



---
## test_categories_none_comparisons
```python
from test_operators import test_categories_none_comparisons
```



---
## test_comparisons
```python
from test_operators import test_comparisons
```



---
## test_not_equal_with_na
```python
from test_operators import test_not_equal_with_na
```



---
## test_compare_frame
```python
from test_operators import test_compare_frame
```



---
## test_compare_frame_raises
```python
from test_operators import test_compare_frame_raises
```



---
## test_datetime_categorical_comparison
```python
from test_operators import test_datetime_categorical_comparison
```



---
## test_reflected_comparison_with_scalars
```python
from test_operators import test_reflected_comparison_with_scalars
```



---
## test_comparison_with_unknown_scalars
```python
from test_operators import test_comparison_with_unknown_scalars
```



---
## test_comparison_with_tuple
```python
from test_operators import test_comparison_with_tuple
```



---
## test_comparison_of_ordered_categorical_with_nan_to_scalar
```python
from test_operators import test_comparison_of_ordered_categorical_with_nan_to_scalar
```



---
## test_comparison_of_ordered_categorical_with_nan_to_listlike
```python
from test_operators import test_comparison_of_ordered_categorical_with_nan_to_listlike
```



---
## test_unordered_different_order_equal
```python
from test_operators import test_unordered_different_order_equal
```



---
## test_unordered_different_categories_raises
```python
from test_operators import test_unordered_different_categories_raises
```



---
## test_compare_different_lengths
```python
from test_operators import test_compare_different_lengths
```



---
## test_compare_unordered_different_order
```python
from test_operators import test_compare_unordered_different_order
```



---
## test_numeric_like_ops
```python
from test_operators import test_numeric_like_ops
```



---
## test_numeric_like_ops_series
```python
from test_operators import test_numeric_like_ops_series
```



---
## test_numeric_like_ops_series_arith
```python
from test_operators import test_numeric_like_ops_series_arith
```



---
## test_numeric_like_ops_series_invalid
```python
from test_operators import test_numeric_like_ops_series_invalid
```



---
## SubclassedCategorical
```python
from test_subclass import SubclassedCategorical
```



---
## TestCategoricalSubclassing
```python
from test_subclass import TestCategoricalSubclassing
```



---
## test_constructor
```python
from test_subclass import test_constructor
```



---
## test_from_codes
```python
from test_subclass import test_from_codes
```



---
## test_map
```python
from test_subclass import test_map
```



---
## __name__
```python
from test_analytics import __name__
```



---
## TestCategoricalAnalytics
```python
from test_analytics import TestCategoricalAnalytics
```



---
## test_min_max_not_ordered_raises
```python
from test_analytics import test_min_max_not_ordered_raises
```



---
## test_min_max_ordered
```python
from test_analytics import test_min_max_ordered
```



---
## test_min_max_reduce
```python
from test_analytics import test_min_max_reduce
```



---
## test_min_max_ordered_empty
```python
from test_analytics import test_min_max_ordered_empty
```



---
## test_min_max_with_nan
```python
from test_analytics import test_min_max_with_nan
```



---
## test_min_max_only_nan
```python
from test_analytics import test_min_max_only_nan
```



---
## test_numeric_only_min_max_raises
```python
from test_analytics import test_numeric_only_min_max_raises
```



---
## test_numpy_min_max_raises
```python
from test_analytics import test_numpy_min_max_raises
```



---
## test_numpy_min_max_unsupported_kwargs_raises
```python
from test_analytics import test_numpy_min_max_unsupported_kwargs_raises
```



---
## test_numpy_min_max_axis_equals_none
```python
from test_analytics import test_numpy_min_max_axis_equals_none
```



---
## test_mode
```python
from test_analytics import test_mode
```



---
## test_searchsorted
```python
from test_analytics import test_searchsorted
```



---
## test_unique
```python
from test_analytics import test_unique
```



---
## test_unique_index_series
```python
from test_analytics import test_unique_index_series
```



---
## test_shift
```python
from test_analytics import test_shift
```



---
## test_nbytes
```python
from test_analytics import test_nbytes
```



---
## test_memory_usage
```python
from test_analytics import test_memory_usage
```



---
## test_map
```python
from test_analytics import test_map
```



---
## test_validate_inplace_raises
```python
from test_analytics import test_validate_inplace_raises
```



---
## test_quantile_empty
```python
from test_analytics import test_quantile_empty
```



---
## TestCategoricalIndexingWithFactor
```python
from test_indexing import TestCategoricalIndexingWithFactor
```



---
## TestCategoricalIndexing
```python
from test_indexing import TestCategoricalIndexing
```



---
## test_mask_with_boolean
```python
from test_indexing import test_mask_with_boolean
```



---
## test_mask_with_boolean_na_treated_as_false
```python
from test_indexing import test_mask_with_boolean_na_treated_as_false
```



---
## non_coercible_categorical
```python
from test_indexing import non_coercible_categorical
```

Monkeypatch Categorical.__array__ to ensure no implicit conversion.

Raises
------
ValueError
    When Categorical.__array__ is called.

---
## test_series_at
```python
from test_indexing import test_series_at
```



---
## test_setitem_same_but_unordered
```python
from test_indexing import test_setitem_same_but_unordered
```



---
## test_setitem_different_unordered_raises
```python
from test_indexing import test_setitem_different_unordered_raises
```



---
## test_setitem_same_ordered_raises
```python
from test_indexing import test_setitem_same_ordered_raises
```



---
## test_setitem_tuple
```python
from test_indexing import test_setitem_tuple
```



---
## test_setitem_listlike
```python
from test_indexing import test_setitem_listlike
```



---
## test_getitem_slice
```python
from test_indexing import test_getitem_slice
```



---
## test_getitem_listlike
```python
from test_indexing import test_getitem_listlike
```



---
## test_periodindex
```python
from test_indexing import test_periodindex
```



---
## test_periodindex_on_null_types
```python
from test_indexing import test_periodindex_on_null_types
```



---
## test_categories_assignments_wrong_length_raises
```python
from test_indexing import test_categories_assignments_wrong_length_raises
```



---
## test_get_indexer_non_unique
```python
from test_indexing import test_get_indexer_non_unique
```



---
## test_where_unobserved_nan
```python
from test_indexing import test_where_unobserved_nan
```



---
## test_where_unobserved_categories
```python
from test_indexing import test_where_unobserved_categories
```



---
## test_where_other_categorical
```python
from test_indexing import test_where_other_categorical
```



---
## test_where_new_category_raises
```python
from test_indexing import test_where_new_category_raises
```



---
## test_where_ordered_differs_rasies
```python
from test_indexing import test_where_ordered_differs_rasies
```



---
## test_contains
```python
from test_indexing import test_contains
```



---
## test_contains_interval
```python
from test_indexing import test_contains_interval
```



---
## test_contains_list
```python
from test_indexing import test_contains_list
```



---
## array
```python
from test_indexing import array
```



---
## test_astype_nan_to_int
```python
from test_astype import test_astype_nan_to_int
```



---
## test_astype_category_to_extension_dtype
```python
from test_astype import test_astype_category_to_extension_dtype
```



---
## test_astype_to_datetime64
```python
from test_astype import test_astype_to_datetime64
```



---
## test_astype_str_int_categories_to_nullable_int
```python
from test_astype import test_astype_str_int_categories_to_nullable_int
```



---
## test_astype_str_int_categories_to_nullable_float
```python
from test_astype import test_astype_str_int_categories_to_nullable_float
```



---
## test_astype_category
```python
from test_astype import test_astype_category
```



---
## test_astype_object_datetime_categories
```python
from test_astype import test_astype_object_datetime_categories
```



---
## test_astype_object_timestamp_categories
```python
from test_astype import test_astype_object_timestamp_categories
```



---
## test_astype_category_readonly_mask_values
```python
from test_astype import test_astype_category_readonly_mask_values
```



---
## allow_fill
```python
from test_take import allow_fill
```

Boolean 'allow_fill' parameter for Categorical.take

---
## test_take_default_allow_fill
```python
from test_take import test_take_default_allow_fill
```



---
## test_take_positive_no_warning
```python
from test_take import test_take_positive_no_warning
```



---
## test_take_bounds
```python
from test_take import test_take_bounds
```



---
## test_positional_take
```python
from test_take import test_positional_take
```



---
## test_positional_take_unobserved
```python
from test_take import test_positional_take_unobserved
```



---
## test_take_allow_fill
```python
from test_take import test_take_allow_fill
```



---
## test_take_fill_with_negative_one
```python
from test_take import test_take_fill_with_negative_one
```



---
## test_take_fill_value
```python
from test_take import test_take_fill_value
```



---
## test_take_fill_value_new_raises
```python
from test_take import test_take_fill_value_new_raises
```



---
## test_factorized_sort
```python
from test_algos import test_factorized_sort
```



---
## test_factorized_sort_ordered
```python
from test_algos import test_factorized_sort_ordered
```



---
## test_isin_cats
```python
from test_algos import test_isin_cats
```



---
## test_isin_cats_corner_cases
```python
from test_algos import test_isin_cats_corner_cases
```



---
## test_isin_empty
```python
from test_algos import test_isin_empty
```



---
## test_diff
```python
from test_algos import test_diff
```



---
## TestCategoricalReprWithFactor
```python
from test_repr import TestCategoricalReprWithFactor
```



---
## TestCategoricalRepr
```python
from test_repr import TestCategoricalRepr
```



---
## test_print
```python
from test_repr import test_print
```



---
## test_big_print
```python
from test_repr import test_big_print
```



---
## test_empty_print
```python
from test_repr import test_empty_print
```



---
## test_print_none_width
```python
from test_repr import test_print_none_width
```



---
## test_unicode_print
```python
from test_repr import test_unicode_print
```



---
## test_categorical_repr
```python
from test_repr import test_categorical_repr
```



---
## test_categorical_repr_ordered
```python
from test_repr import test_categorical_repr_ordered
```



---
## test_categorical_repr_datetime
```python
from test_repr import test_categorical_repr_datetime
```



---
## test_categorical_repr_datetime_ordered
```python
from test_repr import test_categorical_repr_datetime_ordered
```



---
## test_categorical_repr_int_with_nan
```python
from test_repr import test_categorical_repr_int_with_nan
```



---
## test_categorical_repr_period
```python
from test_repr import test_categorical_repr_period
```



---
## test_categorical_repr_period_ordered
```python
from test_repr import test_categorical_repr_period_ordered
```



---
## test_categorical_repr_timedelta
```python
from test_repr import test_categorical_repr_timedelta
```



---
## test_categorical_repr_timedelta_ordered
```python
from test_repr import test_categorical_repr_timedelta_ordered
```



---
## test_categorical_index_repr
```python
from test_repr import test_categorical_index_repr
```



---
## test_categorical_index_repr_ordered
```python
from test_repr import test_categorical_index_repr_ordered
```



---
## test_categorical_index_repr_datetime
```python
from test_repr import test_categorical_index_repr_datetime
```



---
## test_categorical_index_repr_datetime_ordered
```python
from test_repr import test_categorical_index_repr_datetime_ordered
```



---
## test_categorical_index_repr_period
```python
from test_repr import test_categorical_index_repr_period
```



---
## test_categorical_index_repr_period_ordered
```python
from test_repr import test_categorical_index_repr_period_ordered
```



---
## test_categorical_index_repr_timedelta
```python
from test_repr import test_categorical_index_repr_timedelta
```



---
## test_categorical_index_repr_timedelta_ordered
```python
from test_repr import test_categorical_index_repr_timedelta_ordered
```



---
## test_categorical_str_repr
```python
from test_repr import test_categorical_str_repr
```



---
## na_action
```python
from test_map import na_action
```



---
## test_map_with_nan_none
```python
from test_map import test_map_with_nan_none
```



---
## test_map_with_nan_ignore
```python
from test_map import test_map_with_nan_ignore
```



---
## test_map_with_dict_or_series
```python
from test_map import test_map_with_dict_or_series
```



---
## test_map_na_action_no_default_deprecated
```python
from test_map import test_map_na_action_no_default_deprecated
```



---
## TestCategoricalAPI
```python
from test_api import TestCategoricalAPI
```



---
## TestCategoricalAPIWithFactor
```python
from test_api import TestCategoricalAPIWithFactor
```



---
## TestPrivateCategoricalAPI
```python
from test_api import TestPrivateCategoricalAPI
```



---
## test_to_list_deprecated
```python
from test_api import test_to_list_deprecated
```



---
## test_ordered_api
```python
from test_api import test_ordered_api
```



---
## test_set_ordered
```python
from test_api import test_set_ordered
```



---
## test_rename_categories
```python
from test_api import test_rename_categories
```



---
## test_rename_categories_wrong_length_raises
```python
from test_api import test_rename_categories_wrong_length_raises
```



---
## test_rename_categories_series
```python
from test_api import test_rename_categories_series
```



---
## test_rename_categories_dict
```python
from test_api import test_rename_categories_dict
```



---
## test_reorder_categories
```python
from test_api import test_reorder_categories
```



---
## test_reorder_categories_raises
```python
from test_api import test_reorder_categories_raises
```



---
## test_add_categories
```python
from test_api import test_add_categories
```



---
## test_add_categories_existing_raises
```python
from test_api import test_add_categories_existing_raises
```



---
## test_add_categories_losing_dtype_information
```python
from test_api import test_add_categories_losing_dtype_information
```



---
## test_set_categories
```python
from test_api import test_set_categories
```



---
## test_set_categories_many
```python
from test_api import test_set_categories_many
```



---
## test_set_categories_rename_less
```python
from test_api import test_set_categories_rename_less
```



---
## test_set_categories_private
```python
from test_api import test_set_categories_private
```



---
## test_remove_categories
```python
from test_api import test_remove_categories
```



---
## test_remove_categories_raises
```python
from test_api import test_remove_categories_raises
```



---
## test_remove_unused_categories
```python
from test_api import test_remove_unused_categories
```



---
## test_describe
```python
from test_api import test_describe
```



---
## test_codes_immutable
```python
from test_api import test_codes_immutable
```



---
## test_recode_to_categories
```python
from test_api import test_recode_to_categories
```



---
## test_recode_to_categories_large
```python
from test_api import test_recode_to_categories_large
```



---
## test_replace_categorical_series
```python
from test_replace import test_replace_categorical_series
```



---
## test_replace_categorical_ea_dtype
```python
from test_replace import test_replace_categorical_ea_dtype
```



---
## test_replace_maintain_ordering
```python
from test_replace import test_replace_maintain_ordering
```



---
## TestCategoricalDtypes
```python
from test_dtypes import TestCategoricalDtypes
```



---
## test_categories_match_up_to_permutation
```python
from test_dtypes import test_categories_match_up_to_permutation
```



---
## test_set_dtype_same
```python
from test_dtypes import test_set_dtype_same
```



---
## test_set_dtype_new_categories
```python
from test_dtypes import test_set_dtype_new_categories
```



---
## test_set_dtype_many
```python
from test_dtypes import test_set_dtype_many
```



---
## test_set_dtype_no_overlap
```python
from test_dtypes import test_set_dtype_no_overlap
```



---
## test_codes_dtypes
```python
from test_dtypes import test_codes_dtypes
```



---
## test_iter_python_types
```python
from test_dtypes import test_iter_python_types
```



---
## test_iter_python_types_datetime
```python
from test_dtypes import test_iter_python_types_datetime
```



---
## test_interval_index_category
```python
from test_dtypes import test_interval_index_category
```



---
## unit
```python
from test_reductions import unit
```



---
## arr1d
```python
from test_reductions import arr1d
```

Fixture returning DatetimeArray with parametrized timezones

---
## test_median_empty
```python
from test_reductions import test_median_empty
```



---
## test_median_axis
```python
from test_reductions import test_median_axis
```



---
## test_median_2d
```python
from test_reductions import test_median_2d
```



---
## test_mean
```python
from test_reductions import test_mean
```



---
## test_mean_2d
```python
from test_reductions import test_mean_2d
```



---
## test_mean_empty
```python
from test_reductions import test_mean_empty
```



---
## TestDatetimeArrayConstructor
```python
from test_constructors import TestDatetimeArrayConstructor
```



---
## TestSequenceToDT64NS
```python
from test_constructors import TestSequenceToDT64NS
```



---
## test_from_arrow_with_different_units_and_timezones_with
```python
from test_constructors import test_from_arrow_with_different_units_and_timezones_with
```



---
## test_from_arrow_from_empty
```python
from test_constructors import test_from_arrow_from_empty
```



---
## test_from_arrow_from_integers
```python
from test_constructors import test_from_arrow_from_integers
```



---
## test_from_sequence_invalid_type
```python
from test_constructors import test_from_sequence_invalid_type
```



---
## test_only_1dim_accepted
```python
from test_constructors import test_only_1dim_accepted
```



---
## test_freq_validation
```python
from test_constructors import test_freq_validation
```



---
## test_mixing_naive_tzaware_raises
```python
from test_constructors import test_mixing_naive_tzaware_raises
```



---
## test_from_pandas_array
```python
from test_constructors import test_from_pandas_array
```



---
## test_mismatched_timezone_raises
```python
from test_constructors import test_mismatched_timezone_raises
```



---
## test_non_array_raises
```python
from test_constructors import test_non_array_raises
```



---
## test_bool_dtype_raises
```python
from test_constructors import test_bool_dtype_raises
```



---
## test_incorrect_dtype_raises
```python
from test_constructors import test_incorrect_dtype_raises
```



---
## test_mismatched_values_dtype_units
```python
from test_constructors import test_mismatched_values_dtype_units
```



---
## test_freq_infer_raises
```python
from test_constructors import test_freq_infer_raises
```



---
## test_copy
```python
from test_constructors import test_copy
```



---
## test_numpy_datetime_unit
```python
from test_constructors import test_numpy_datetime_unit
```



---
## test_tz_dtype_mismatch_raises
```python
from test_constructors import test_tz_dtype_mismatch_raises
```



---
## test_tz_dtype_matches
```python
from test_constructors import test_tz_dtype_matches
```



---
## test_2d
```python
from test_constructors import test_2d
```



---
## TestAccumulator
```python
from test_cumulative import TestAccumulator
```



---
## test_accumulators_freq
```python
from test_cumulative import test_accumulators_freq
```



---
## test_accumulators_disallowed
```python
from test_cumulative import test_accumulators_disallowed
```



---
## test_reductions_empty
```python
from test_reductions import test_reductions_empty
```



---
## test_sum_empty
```python
from test_reductions import test_sum_empty
```



---
## test_sum
```python
from test_reductions import test_sum
```



---
## test_npsum
```python
from test_reductions import test_npsum
```



---
## test_sum_2d_skipna_false
```python
from test_reductions import test_sum_2d_skipna_false
```



---
## test_std
```python
from test_reductions import test_std
```



---
## TestTimedeltaArrayConstructor
```python
from test_constructors import TestTimedeltaArrayConstructor
```



---
## test_other_type_raises
```python
from test_constructors import test_other_type_raises
```



---
## test_from_sequence_dtype
```python
from test_constructors import test_from_sequence_dtype
```



---
## test_cumsum
```python
from test_cumulative import test_cumsum
```



---
## __name__
```python
from test_logical import __name__
```



---
## TestLogicalOps
```python
from test_logical import TestLogicalOps
```



---
## test_error_both_scalar
```python
from test_logical import test_error_both_scalar
```



---
## test_numpy_scalars_ok
```python
from test_logical import test_numpy_scalars_ok
```



---
## get_op_from_name
```python
from test_logical import get_op_from_name
```



---
## test_empty_ok
```python
from test_logical import test_empty_ok
```



---
## test_eq_mismatched_type
```python
from test_logical import test_eq_mismatched_type
```



---
## test_logical_length_mismatch_raises
```python
from test_logical import test_logical_length_mismatch_raises
```



---
## test_logical_nan_raises
```python
from test_logical import test_logical_nan_raises
```



---
## test_non_bool_or_na_other_raises
```python
from test_logical import test_non_bool_or_na_other_raises
```



---
## test_kleene_or
```python
from test_logical import test_kleene_or
```



---
## test_kleene_or_scalar
```python
from test_logical import test_kleene_or_scalar
```



---
## test_kleene_and
```python
from test_logical import test_kleene_and
```



---
## test_kleene_and_scalar
```python
from test_logical import test_kleene_and_scalar
```



---
## test_kleene_xor
```python
from test_logical import test_kleene_xor
```



---
## test_kleene_xor_scalar
```python
from test_logical import test_kleene_xor_scalar
```



---
## test_no_masked_assumptions
```python
from test_logical import test_no_masked_assumptions
```



---
## __name__
```python
from test_comparison import __name__
```



---
## data
```python
from test_comparison import data
```

Fixture returning boolean array with valid and missing data

---
## dtype
```python
from test_comparison import dtype
```

Fixture returning BooleanDtype

---
## TestComparisonOps
```python
from test_comparison import TestComparisonOps
```



---
## test_compare_scalar
```python
from test_comparison import test_compare_scalar
```



---
## test_compare_array
```python
from test_comparison import test_compare_array
```



---
## test_scalar
```python
from test_comparison import test_scalar
```



---
## test_array
```python
from test_comparison import test_array
```



---
## test_setitem_missing_values
```python
from test_indexing import test_setitem_missing_values
```



---
## test_astype_to_boolean_array
```python
from test_astype import test_astype_to_boolean_array
```



---
## test_astype_to_integer_array
```python
from test_astype import test_astype_to_integer_array
```



---
## __name__
```python
from test_reduction import __name__
```



---
## data
```python
from test_reduction import data
```

Fixture returning boolean array, with valid and missing values.

---
## test_any_all
```python
from test_reduction import test_any_all
```



---
## test_reductions_return_types
```python
from test_reduction import test_reductions_return_types
```



---
## __name__
```python
from test_construction import __name__
```



---
## test_boolean_array_constructor
```python
from test_construction import test_boolean_array_constructor
```



---
## test_boolean_array_constructor_copy
```python
from test_construction import test_boolean_array_constructor_copy
```



---
## test_to_boolean_array
```python
from test_construction import test_to_boolean_array
```



---
## test_to_boolean_array_all_none
```python
from test_construction import test_to_boolean_array_all_none
```



---
## test_to_boolean_array_missing_indicators
```python
from test_construction import test_to_boolean_array_missing_indicators
```



---
## test_to_boolean_array_error
```python
from test_construction import test_to_boolean_array_error
```



---
## test_to_boolean_array_from_integer_array
```python
from test_construction import test_to_boolean_array_from_integer_array
```



---
## test_to_boolean_array_from_float_array
```python
from test_construction import test_to_boolean_array_from_float_array
```



---
## test_to_boolean_array_integer_like
```python
from test_construction import test_to_boolean_array_integer_like
```



---
## test_coerce_to_array
```python
from test_construction import test_coerce_to_array
```



---
## test_coerce_to_array_from_boolean_array
```python
from test_construction import test_coerce_to_array_from_boolean_array
```



---
## test_coerce_to_numpy_array
```python
from test_construction import test_coerce_to_numpy_array
```



---
## test_to_boolean_array_from_strings
```python
from test_construction import test_to_boolean_array_from_strings
```



---
## test_to_boolean_array_from_strings_invalid_string
```python
from test_construction import test_to_boolean_array_from_strings_invalid_string
```



---
## test_to_numpy
```python
from test_construction import test_to_numpy
```



---
## test_to_numpy_copy
```python
from test_construction import test_to_numpy_copy
```



---
## test_ufuncs_binary
```python
from test_function import test_ufuncs_binary
```



---
## test_ufuncs_unary
```python
from test_function import test_ufuncs_unary
```



---
## test_ufunc_numeric
```python
from test_function import test_ufunc_numeric
```



---
## test_ufunc_reduce_raises
```python
from test_function import test_ufunc_reduce_raises
```



---
## test_value_counts_na
```python
from test_function import test_value_counts_na
```



---
## test_value_counts_with_normalize
```python
from test_function import test_value_counts_with_normalize
```



---
## test_diff
```python
from test_function import test_diff
```



---
## __name__
```python
from test_ops import __name__
```



---
## TestUnaryOps
```python
from test_ops import TestUnaryOps
```



---
## test_invert
```python
from test_ops import test_invert
```



---
## test_abs
```python
from test_ops import test_abs
```



---
## left_array
```python
from test_arithmetic import left_array
```

Fixture returning boolean array with valid and missing values.

---
## right_array
```python
from test_arithmetic import right_array
```

Fixture returning boolean array with valid and missing values.

---
## test_add_mul
```python
from test_arithmetic import test_add_mul
```



---
## test_sub
```python
from test_arithmetic import test_sub
```



---
## test_div
```python
from test_arithmetic import test_div
```



---
## test_op_int8
```python
from test_arithmetic import test_op_int8
```



---
## test_error_invalid_values
```python
from test_arithmetic import test_error_invalid_values
```



---
## test_equals
```python
from test_comparison import test_equals
```



---
## test_compare_to_int
```python
from test_comparison import test_compare_to_int
```



---
## test_array_setitem_nullable_boolean_mask
```python
from test_indexing import test_array_setitem_nullable_boolean_mask
```



---
## test_array_setitem
```python
from test_indexing import test_array_setitem
```



---
## test_series_reductions
```python
from test_reduction import test_series_reductions
```



---
## test_dataframe_reductions
```python
from test_reduction import test_dataframe_reductions
```



---
## test_groupby_reductions
```python
from test_reduction import test_groupby_reductions
```



---
## test_mixed_reductions
```python
from test_reduction import test_mixed_reductions
```



---
## constructor
```python
from test_construction import constructor
```

Fixture returning parametrized IntegerArray from given sequence.

Used to test dtype conversions.

---
## test_uses_pandas_na
```python
from test_construction import test_uses_pandas_na
```



---
## test_from_dtype_from_float
```python
from test_construction import test_from_dtype_from_float
```



---
## test_conversions
```python
from test_construction import test_conversions
```



---
## test_integer_array_constructor
```python
from test_construction import test_integer_array_constructor
```



---
## test_integer_array_constructor_copy
```python
from test_construction import test_integer_array_constructor_copy
```



---
## test_to_integer_array_none_is_nan
```python
from test_construction import test_to_integer_array_none_is_nan
```



---
## test_to_integer_array_error
```python
from test_construction import test_to_integer_array_error
```



---
## test_to_integer_array_inferred_dtype
```python
from test_construction import test_to_integer_array_inferred_dtype
```



---
## test_to_integer_array_dtype_keyword
```python
from test_construction import test_to_integer_array_dtype_keyword
```



---
## test_to_integer_array_float
```python
from test_construction import test_to_integer_array_float
```



---
## test_to_integer_array_str
```python
from test_construction import test_to_integer_array_str
```



---
## test_to_integer_array_bool
```python
from test_construction import test_to_integer_array_bool
```



---
## test_to_integer_array
```python
from test_construction import test_to_integer_array
```



---
## test_integer_array_from_boolean
```python
from test_construction import test_integer_array_from_boolean
```



---
## test_dtypes
```python
from test_repr import test_dtypes
```



---
## test_repr_dtype
```python
from test_repr import test_repr_dtype
```



---
## test_repr_array
```python
from test_repr import test_repr_array
```



---
## test_repr_array_long
```python
from test_repr import test_repr_array_long
```



---
## test_frame_repr
```python
from test_repr import test_frame_repr
```



---
## test_concat_series
```python
from test_concat import test_concat_series
```



---
## test_concat_series_with_numpy
```python
from test_concat import test_concat_series_with_numpy
```



---
## test_ufuncs_single_int
```python
from test_function import test_ufuncs_single_int
```



---
## test_ufuncs_single_float
```python
from test_function import test_ufuncs_single_float
```



---
## test_ufuncs_binary_int
```python
from test_function import test_ufuncs_binary_int
```



---
## test_ufunc_binary_output
```python
from test_function import test_ufunc_binary_output
```



---
## test_stat_method
```python
from test_function import test_stat_method
```



---
## test_value_counts_empty
```python
from test_function import test_value_counts_empty
```



---
## test_integer_array_sum
```python
from test_function import test_integer_array_sum
```



---
## test_integer_array_min_max
```python
from test_function import test_integer_array_min_max
```



---
## test_integer_array_prod
```python
from test_function import test_integer_array_prod
```



---
## test_integer_array_numpy_sum
```python
from test_function import test_integer_array_numpy_sum
```



---
## test_dataframe_reductions
```python
from test_function import test_dataframe_reductions
```



---
## test_divide_by_zero
```python
from test_arithmetic import test_divide_by_zero
```



---
## test_floordiv
```python
from test_arithmetic import test_floordiv
```



---
## test_floordiv_by_int_zero_no_mask
```python
from test_arithmetic import test_floordiv_by_int_zero_no_mask
```



---
## test_mod
```python
from test_arithmetic import test_mod
```



---
## test_pow_scalar
```python
from test_arithmetic import test_pow_scalar
```



---
## test_pow_array
```python
from test_arithmetic import test_pow_array
```



---
## test_rpow_one_to_na
```python
from test_arithmetic import test_rpow_one_to_na
```



---
## test_numpy_zero_dim_ndarray
```python
from test_arithmetic import test_numpy_zero_dim_ndarray
```



---
## test_arith_coerce_scalar
```python
from test_arithmetic import test_arith_coerce_scalar
```



---
## test_arithmetic_conversion
```python
from test_arithmetic import test_arithmetic_conversion
```



---
## test_cross_type_arithmetic
```python
from test_arithmetic import test_cross_type_arithmetic
```



---
## test_reduce_to_float
```python
from test_arithmetic import test_reduce_to_float
```



---
## test_unary_int_operators
```python
from test_arithmetic import test_unary_int_operators
```



---
## test_values_multiplying_large_series_by_NA
```python
from test_arithmetic import test_values_multiplying_large_series_by_NA
```



---
## test_bitwise
```python
from test_arithmetic import test_bitwise
```



---
## test_dtypes
```python
from test_dtypes import test_dtypes
```



---
## test_preserve_dtypes
```python
from test_dtypes import test_preserve_dtypes
```



---
## test_astype_nansafe
```python
from test_dtypes import test_astype_nansafe
```



---
## test_construct_index
```python
from test_dtypes import test_construct_index
```



---
## test_astype_index
```python
from test_dtypes import test_astype_index
```



---
## test_astype
```python
from test_dtypes import test_astype
```



---
## test_astype_copy
```python
from test_dtypes import test_astype_copy
```



---
## test_astype_to_larger_numpy
```python
from test_dtypes import test_astype_to_larger_numpy
```



---
## test_astype_specific_casting
```python
from test_dtypes import test_astype_specific_casting
```



---
## test_astype_floating
```python
from test_dtypes import test_astype_floating
```



---
## test_astype_dt64
```python
from test_dtypes import test_astype_dt64
```



---
## test_construct_cast_invalid
```python
from test_dtypes import test_construct_cast_invalid
```



---
## test_to_numpy_na_nan
```python
from test_dtypes import test_to_numpy_na_nan
```



---
## test_to_numpy_dtype
```python
from test_dtypes import test_to_numpy_dtype
```



---
## test_to_numpy_na_raises
```python
from test_dtypes import test_to_numpy_na_raises
```



---
## test_astype_str
```python
from test_dtypes import test_astype_str
```



---
## test_astype_boolean
```python
from test_dtypes import test_astype_boolean
```



---
## test_equals_nan_vs_na
```python
from test_comparison import test_equals_nan_vs_na
```



---
## test_compare_with_integerarray
```python
from test_comparison import test_compare_with_integerarray
```



---
## test_astype_to_floating_array
```python
from test_astype import test_astype_to_floating_array
```



---
## test_astype_copy
```python
from test_astype import test_astype_copy
```



---
## test_astype_object
```python
from test_astype import test_astype_object
```



---
## test_Float64_conversion
```python
from test_astype import test_Float64_conversion
```



---
## test_floating_array_constructor
```python
from test_construction import test_floating_array_constructor
```



---
## test_floating_array_disallows_float16
```python
from test_construction import test_floating_array_disallows_float16
```



---
## test_floating_array_disallows_Float16_dtype
```python
from test_construction import test_floating_array_disallows_Float16_dtype
```



---
## test_floating_array_constructor_copy
```python
from test_construction import test_floating_array_constructor_copy
```



---
## test_to_array
```python
from test_construction import test_to_array
```



---
## test_to_array_none_is_nan
```python
from test_construction import test_to_array_none_is_nan
```



---
## test_to_array_mixed_integer_float
```python
from test_construction import test_to_array_mixed_integer_float
```



---
## test_to_array_error
```python
from test_construction import test_to_array_error
```



---
## test_construct_from_float_strings
```python
from test_construction import test_construct_from_float_strings
```



---
## test_to_array_inferred_dtype
```python
from test_construction import test_to_array_inferred_dtype
```



---
## test_to_array_dtype_keyword
```python
from test_construction import test_to_array_dtype_keyword
```



---
## test_to_array_integer
```python
from test_construction import test_to_array_integer
```



---
## test_to_array_bool
```python
from test_construction import test_to_array_bool
```



---
## test_series_from_float
```python
from test_construction import test_series_from_float
```



---
## test_ufuncs_single
```python
from test_function import test_ufuncs_single
```



---
## test_ufuncs_binary_float
```python
from test_function import test_ufuncs_binary_float
```



---
## test_floating_array_sum
```python
from test_function import test_floating_array_sum
```



---
## test_floating_array_numpy_sum
```python
from test_function import test_floating_array_numpy_sum
```



---
## test_preserve_dtypes
```python
from test_function import test_preserve_dtypes
```



---
## test_floating_array_min_max
```python
from test_function import test_floating_array_min_max
```



---
## test_floating_array_prod
```python
from test_function import test_floating_array_prod
```



---
## __name__
```python
from test_contains import __name__
```



---
## test_contains_nan
```python
from test_contains import test_contains_nan
```



---
## test_array_op
```python
from test_arithmetic import test_array_op
```



---
## test_arith_zero_dim_ndarray
```python
from test_arithmetic import test_arith_zero_dim_ndarray
```



---
## test_unary_float_operators
```python
from test_arithmetic import test_unary_float_operators
```



---
## test_to_numpy_float
```python
from test_to_numpy import test_to_numpy_float
```



---
## test_to_numpy_int
```python
from test_to_numpy import test_to_numpy_int
```



---
## test_to_numpy_na_value_with_nan
```python
from test_to_numpy import test_to_numpy_na_value_with_nan
```



---
## test_to_numpy_na_raises
```python
from test_to_numpy import test_to_numpy_na_raises
```



---
## test_to_numpy_string
```python
from test_to_numpy import test_to_numpy_string
```



---
## TestMinMax
```python
from test_reductions import TestMinMax
```



---
## TestArgmaxArgmin
```python
from test_reductions import TestArgmaxArgmin
```



---
## test_all
```python
from test_reductions import test_all
```



---
## test_numpy_all
```python
from test_reductions import test_numpy_all
```



---
## test_numpy_any
```python
from test_reductions import test_numpy_any
```



---
## test_sum_min_count
```python
from test_reductions import test_sum_min_count
```



---
## test_bool_sum_min_count
```python
from test_reductions import test_bool_sum_min_count
```



---
## test_numpy_sum
```python
from test_reductions import test_numpy_sum
```



---
## test_numpy_mean
```python
from test_reductions import test_numpy_mean
```



---
## test_nan_fill_value
```python
from test_reductions import test_nan_fill_value
```



---
## test_fill_value
```python
from test_reductions import test_fill_value
```



---
## test_only_fill_value
```python
from test_reductions import test_only_fill_value
```



---
## test_na_value_if_no_valid_values
```python
from test_reductions import test_na_value_if_no_valid_values
```



---
## test_argmax_argmin
```python
from test_reductions import test_argmax_argmin
```



---
## test_empty_array
```python
from test_reductions import test_empty_array
```



---
## TestConstructors
```python
from test_constructors import TestConstructors
```



---
## test_constructor_dtype_str
```python
from test_constructors import test_constructor_dtype_str
```



---
## test_constructor_sparse_dtype
```python
from test_constructors import test_constructor_sparse_dtype
```



---
## test_constructor_sparse_dtype_str
```python
from test_constructors import test_constructor_sparse_dtype_str
```



---
## test_constructor_object_dtype
```python
from test_constructors import test_constructor_object_dtype
```



---
## test_constructor_object_dtype_bool_fill
```python
from test_constructors import test_constructor_object_dtype_bool_fill
```



---
## test_constructor_na_dtype
```python
from test_constructors import test_constructor_na_dtype
```



---
## test_constructor_warns_when_losing_timezone
```python
from test_constructors import test_constructor_warns_when_losing_timezone
```



---
## test_constructor_spindex_dtype
```python
from test_constructors import test_constructor_spindex_dtype
```



---
## test_constructor_spindex_dtype_scalar
```python
from test_constructors import test_constructor_spindex_dtype_scalar
```



---
## test_constructor_spindex_dtype_scalar_broadcasts
```python
from test_constructors import test_constructor_spindex_dtype_scalar_broadcasts
```



---
## test_constructor_inferred_fill_value
```python
from test_constructors import test_constructor_inferred_fill_value
```



---
## test_from_spmatrix
```python
from test_constructors import test_from_spmatrix
```



---
## test_from_spmatrix_including_explicit_zero
```python
from test_constructors import test_from_spmatrix_including_explicit_zero
```



---
## test_from_spmatrix_raises
```python
from test_constructors import test_from_spmatrix_raises
```



---
## test_constructor_from_too_large_array
```python
from test_constructors import test_constructor_from_too_large_array
```



---
## test_constructor_from_sparse
```python
from test_constructors import test_constructor_from_sparse
```



---
## test_constructor_bool_fill_value
```python
from test_constructors import test_constructor_bool_fill_value
```



---
## test_constructor_float32
```python
from test_constructors import test_constructor_float32
```



---
## __name__
```python
from test_libsparse import __name__
```



---
## test_length
```python
from test_libsparse import test_length
```



---
## cases
```python
from test_libsparse import cases
```



---
## TestSparseIndexUnion
```python
from test_libsparse import TestSparseIndexUnion
```



---
## TestSparseIndexIntersect
```python
from test_libsparse import TestSparseIndexIntersect
```



---
## TestSparseIndexCommon
```python
from test_libsparse import TestSparseIndexCommon
```



---
## TestBlockIndex
```python
from test_libsparse import TestBlockIndex
```



---
## TestIntIndex
```python
from test_libsparse import TestIntIndex
```



---
## TestSparseOperators
```python
from test_libsparse import TestSparseOperators
```



---
## test_index_make_union
```python
from test_libsparse import test_index_make_union
```



---
## test_int_index_make_union
```python
from test_libsparse import test_int_index_make_union
```



---
## test_intersect
```python
from test_libsparse import test_intersect
```



---
## test_intersect_empty
```python
from test_libsparse import test_intersect_empty
```



---
## test_intersect_identical
```python
from test_libsparse import test_intersect_identical
```



---
## test_int_internal
```python
from test_libsparse import test_int_internal
```



---
## test_block_internal
```python
from test_libsparse import test_block_internal
```



---
## test_lookup
```python
from test_libsparse import test_lookup
```



---
## test_lookup_array
```python
from test_libsparse import test_lookup_array
```



---
## test_lookup_basics
```python
from test_libsparse import test_lookup_basics
```



---
## test_make_block_boundary
```python
from test_libsparse import test_make_block_boundary
```



---
## test_equals
```python
from test_libsparse import test_equals
```



---
## test_check_integrity
```python
from test_libsparse import test_check_integrity
```



---
## test_to_int_index
```python
from test_libsparse import test_to_int_index
```



---
## test_to_block_index
```python
from test_libsparse import test_to_block_index
```



---
## test_op
```python
from test_libsparse import test_op
```



---
## __name__
```python
from test_accessor import __name__
```



---
## TestSeriesAccessor
```python
from test_accessor import TestSeriesAccessor
```



---
## TestFrameAccessor
```python
from test_accessor import TestFrameAccessor
```



---
## test_to_dense
```python
from test_accessor import test_to_dense
```



---
## test_get_attributes
```python
from test_accessor import test_get_attributes
```



---
## test_from_coo
```python
from test_accessor import test_from_coo
```



---
## test_to_coo
```python
from test_accessor import test_to_coo
```



---
## test_non_sparse_raises
```python
from test_accessor import test_non_sparse_raises
```



---
## test_accessor_raises
```python
from test_accessor import test_accessor_raises
```



---
## test_from_spmatrix
```python
from test_accessor import test_from_spmatrix
```



---
## test_from_spmatrix_including_explicit_zero
```python
from test_accessor import test_from_spmatrix_including_explicit_zero
```



---
## test_from_spmatrix_columns
```python
from test_accessor import test_from_spmatrix_columns
```



---
## test_to_coo_nonzero_fill_val_raises
```python
from test_accessor import test_to_coo_nonzero_fill_val_raises
```



---
## test_to_coo_midx_categorical
```python
from test_accessor import test_to_coo_midx_categorical
```



---
## test_density
```python
from test_accessor import test_density
```



---
## test_series_from_coo
```python
from test_accessor import test_series_from_coo
```



---
## test_series_from_coo_incorrect_format_raises
```python
from test_accessor import test_series_from_coo_incorrect_format_raises
```



---
## test_with_column_named_sparse
```python
from test_accessor import test_with_column_named_sparse
```



---
## test_unary_op
```python
from test_unary import test_unary_op
```



---
## TestUnaryMethods
```python
from test_unary import TestUnaryMethods
```



---
## test_neg_operator
```python
from test_unary import test_neg_operator
```



---
## test_abs_operator
```python
from test_unary import test_abs_operator
```



---
## test_invert_operator
```python
from test_unary import test_invert_operator
```



---
## arr_data
```python
from test_array import arr_data
```

Fixture returning numpy array with valid and missing entries

---
## arr
```python
from test_array import arr
```

Fixture returning SparseArray from 'arr_data'

---
## zarr
```python
from test_array import zarr
```

Fixture returning SparseArray with integer entries and 'fill_value=0'

---
## TestSparseArray
```python
from test_array import TestSparseArray
```



---
## TestSparseArrayAnalytics
```python
from test_array import TestSparseArrayAnalytics
```



---
## test_setting_fill_value_fillna_still_works
```python
from test_array import test_setting_fill_value_fillna_still_works
```



---
## test_setting_fill_value_updates
```python
from test_array import test_setting_fill_value_updates
```



---
## test_first_fill_value_loc
```python
from test_array import test_first_fill_value_loc
```



---
## test_unique_na_fill
```python
from test_array import test_unique_na_fill
```



---
## test_unique_all_sparse
```python
from test_array import test_unique_all_sparse
```



---
## test_map
```python
from test_array import test_map
```



---
## test_map_missing
```python
from test_array import test_map_missing
```



---
## test_dropna
```python
from test_array import test_dropna
```



---
## test_drop_duplicates_fill_value
```python
from test_array import test_drop_duplicates_fill_value
```



---
## test_zero_sparse_column
```python
from test_array import test_zero_sparse_column
```



---
## test_shift_fill_value
```python
from test_array import test_shift_fill_value
```



---
## test_set_fill_value
```python
from test_array import test_set_fill_value
```



---
## test_set_fill_invalid_non_scalar
```python
from test_array import test_set_fill_invalid_non_scalar
```



---
## test_copy
```python
from test_array import test_copy
```



---
## test_values_asarray
```python
from test_array import test_values_asarray
```



---
## test_shape
```python
from test_array import test_shape
```



---
## test_dense_repr
```python
from test_array import test_dense_repr
```



---
## test_pickle
```python
from test_array import test_pickle
```



---
## test_generator_warnings
```python
from test_array import test_generator_warnings
```



---
## test_where_retain_fill_value
```python
from test_array import test_where_retain_fill_value
```



---
## test_fillna
```python
from test_array import test_fillna
```



---
## test_fillna_overlap
```python
from test_array import test_fillna_overlap
```



---
## test_nonzero
```python
from test_array import test_nonzero
```



---
## test_cumsum
```python
from test_array import test_cumsum
```



---
## test_ufunc
```python
from test_array import test_ufunc
```



---
## test_ufunc_args
```python
from test_array import test_ufunc_args
```



---
## test_modf
```python
from test_array import test_modf
```



---
## test_nbytes_integer
```python
from test_array import test_nbytes_integer
```



---
## test_nbytes_block
```python
from test_array import test_nbytes_block
```



---
## test_asarray_datetime64
```python
from test_array import test_asarray_datetime64
```



---
## test_density
```python
from test_array import test_density
```



---
## test_npoints
```python
from test_array import test_npoints
```



---
## __name__
```python
from test_arithmetics import __name__
```



---
## kind
```python
from test_arithmetics import kind
```

kind kwarg to pass to SparseArray

---
## mix
```python
from test_arithmetics import mix
```

Fixture returning True or False, determining whether to operate
op(sparse, dense) instead of op(sparse, sparse)

---
## TestSparseArrayArithmetics
```python
from test_arithmetics import TestSparseArrayArithmetics
```



---
## test_with_list
```python
from test_arithmetics import test_with_list
```



---
## test_with_dataframe
```python
from test_arithmetics import test_with_dataframe
```



---
## test_with_zerodim_ndarray
```python
from test_arithmetics import test_with_zerodim_ndarray
```



---
## test_ufuncs
```python
from test_arithmetics import test_ufuncs
```



---
## test_binary_ufuncs
```python
from test_arithmetics import test_binary_ufuncs
```



---
## test_ndarray_inplace
```python
from test_arithmetics import test_ndarray_inplace
```



---
## test_sparray_inplace
```python
from test_arithmetics import test_sparray_inplace
```



---
## test_mismatched_length_cmp_op
```python
from test_arithmetics import test_mismatched_length_cmp_op
```



---
## test_binary_operators
```python
from test_arithmetics import test_binary_operators
```



---
## _assert
```python
from test_arithmetics import _assert
```



---
## _check_numeric_ops
```python
from test_arithmetics import _check_numeric_ops
```



---
## _check_bool_result
```python
from test_arithmetics import _check_bool_result
```



---
## _check_comparison_ops
```python
from test_arithmetics import _check_comparison_ops
```



---
## _check_logical_ops
```python
from test_arithmetics import _check_logical_ops
```



---
## test_float_scalar
```python
from test_arithmetics import test_float_scalar
```



---
## test_float_scalar_comparison
```python
from test_arithmetics import test_float_scalar_comparison
```



---
## test_float_same_index_without_nans
```python
from test_arithmetics import test_float_same_index_without_nans
```



---
## test_float_same_index_with_nans
```python
from test_arithmetics import test_float_same_index_with_nans
```



---
## test_float_same_index_comparison
```python
from test_arithmetics import test_float_same_index_comparison
```



---
## test_float_array
```python
from test_arithmetics import test_float_array
```



---
## test_float_array_different_kind
```python
from test_arithmetics import test_float_array_different_kind
```



---
## test_float_array_comparison
```python
from test_arithmetics import test_float_array_comparison
```



---
## test_int_array
```python
from test_arithmetics import test_int_array
```



---
## test_int_array_comparison
```python
from test_arithmetics import test_int_array_comparison
```



---
## test_bool_same_index
```python
from test_arithmetics import test_bool_same_index
```



---
## test_bool_array_logical
```python
from test_arithmetics import test_bool_array_logical
```



---
## test_mixed_array_float_int
```python
from test_arithmetics import test_mixed_array_float_int
```



---
## test_mixed_array_comparison
```python
from test_arithmetics import test_mixed_array_comparison
```



---
## test_xor
```python
from test_arithmetics import test_xor
```



---
## arr_data
```python
from test_indexing import arr_data
```



---
## arr
```python
from test_indexing import arr
```



---
## TestGetitem
```python
from test_indexing import TestGetitem
```



---
## TestSetitem
```python
from test_indexing import TestSetitem
```



---
## TestWhere
```python
from test_indexing import TestWhere
```



---
## test_getitem_arraylike_mask
```python
from test_indexing import test_getitem_arraylike_mask
```



---
## test_getslice
```python
from test_indexing import test_getslice
```



---
## test_getslice_tuple
```python
from test_indexing import test_getslice_tuple
```



---
## test_boolean_slice_empty
```python
from test_indexing import test_boolean_slice_empty
```



---
## test_getitem_bool_sparse_array
```python
from test_indexing import test_getitem_bool_sparse_array
```



---
## test_getitem_bool_sparse_array_as_comparison
```python
from test_indexing import test_getitem_bool_sparse_array_as_comparison
```



---
## test_get_item
```python
from test_indexing import test_get_item
```



---
## test_set_item
```python
from test_indexing import test_set_item
```



---
## test_take_scalar_raises
```python
from test_indexing import test_take_scalar_raises
```



---
## test_take_all_empty
```python
from test_indexing import test_take_all_empty
```



---
## test_take_different_fill_value
```python
from test_indexing import test_take_different_fill_value
```



---
## test_take_fill_value
```python
from test_indexing import test_take_fill_value
```



---
## test_take_negative
```python
from test_indexing import test_take_negative
```



---
## test_bad_take
```python
from test_indexing import test_bad_take
```



---
## test_take_filling
```python
from test_indexing import test_take_filling
```



---
## test_take_filling_fill_value
```python
from test_indexing import test_take_filling_fill_value
```



---
## test_take_filling_all_nan
```python
from test_indexing import test_take_filling_all_nan
```



---
## test_where_retain_fill_value
```python
from test_indexing import test_where_retain_fill_value
```



---
## setitem
```python
from test_indexing import setitem
```



---
## setslice
```python
from test_indexing import setslice
```



---
## test_astype_bool
```python
from test_astype import test_astype_bool
```



---
## test_astype_all
```python
from test_astype import test_astype_all
```



---
## test_astype_more
```python
from test_astype import test_astype_more
```



---
## test_astype_nan_raises
```python
from test_astype import test_astype_nan_raises
```



---
## test_astype_copy_false
```python
from test_astype import test_astype_copy_false
```



---
## test_astype_dt64_to_int64
```python
from test_astype import test_astype_dt64_to_int64
```



---
## test_inferred_dtype
```python
from test_dtype import test_inferred_dtype
```



---
## test_from_sparse_dtype
```python
from test_dtype import test_from_sparse_dtype
```



---
## test_from_sparse_dtype_fill_value
```python
from test_dtype import test_from_sparse_dtype_fill_value
```



---
## test_equal
```python
from test_dtype import test_equal
```



---
## test_nans_equal
```python
from test_dtype import test_nans_equal
```



---
## test_not_equal
```python
from test_dtype import test_not_equal
```



---
## test_construct_from_string_raises
```python
from test_dtype import test_construct_from_string_raises
```



---
## test_str_uses_object
```python
from test_dtype import test_str_uses_object
```



---
## test_construct_from_string
```python
from test_dtype import test_construct_from_string
```



---
## test_hash_equal
```python
from test_dtype import test_hash_equal
```



---
## test_parse_subtype
```python
from test_dtype import test_parse_subtype
```



---
## test_construct_from_string_fill_value_raises
```python
from test_dtype import test_construct_from_string_fill_value_raises
```



---
## test_update_dtype
```python
from test_dtype import test_update_dtype
```



---
## test_update_dtype_raises
```python
from test_dtype import test_update_dtype_raises
```



---
## test_repr
```python
from test_dtype import test_repr
```



---
## test_sparse_dtype_subtype_must_be_numpy_dtype
```python
from test_dtype import test_sparse_dtype_subtype_must_be_numpy_dtype
```



---
## __name__
```python
from test_combine_concat import __name__
```



---
## TestSparseArrayConcat
```python
from test_combine_concat import TestSparseArrayConcat
```



---
## test_concat_with_non_sparse
```python
from test_combine_concat import test_concat_with_non_sparse
```



---
## test_basic
```python
from test_combine_concat import test_basic
```



---
## test_uses_first_kind
```python
from test_combine_concat import test_uses_first_kind
```



---
## TestSearchsorted
```python
from test_indexing import TestSearchsorted
```



---
## test_searchsorted_string
```python
from test_indexing import test_searchsorted_string
```



---
## test_searchsorted_numeric_dtypes_scalar
```python
from test_indexing import test_searchsorted_numeric_dtypes_scalar
```



---
## test_searchsorted_numeric_dtypes_vector
```python
from test_indexing import test_searchsorted_numeric_dtypes_vector
```



---
## test_searchsorted_sorter
```python
from test_indexing import test_searchsorted_sorter
```



---
## any_numpy_array
```python
from test_numpy import any_numpy_array
```

Parametrized fixture for NumPy arrays with different dtypes.

This excludes string and bytes.

---
## test_is_numeric
```python
from test_numpy import test_is_numeric
```



---
## test_is_boolean
```python
from test_numpy import test_is_boolean
```



---
## test_repr
```python
from test_numpy import test_repr
```



---
## test_constructor_from_string
```python
from test_numpy import test_constructor_from_string
```



---
## test_dtype_idempotent
```python
from test_numpy import test_dtype_idempotent
```



---
## test_constructor_no_coercion
```python
from test_numpy import test_constructor_no_coercion
```



---
## test_series_constructor_with_copy
```python
from test_numpy import test_series_constructor_with_copy
```



---
## test_series_constructor_with_astype
```python
from test_numpy import test_series_constructor_with_astype
```



---
## test_from_sequence_dtype
```python
from test_numpy import test_from_sequence_dtype
```



---
## test_constructor_copy
```python
from test_numpy import test_constructor_copy
```



---
## test_constructor_with_data
```python
from test_numpy import test_constructor_with_data
```



---
## test_to_numpy
```python
from test_numpy import test_to_numpy
```



---
## test_setitem_series
```python
from test_numpy import test_setitem_series
```



---
## test_setitem
```python
from test_numpy import test_setitem
```



---
## test_bad_reduce_raises
```python
from test_numpy import test_bad_reduce_raises
```



---
## test_validate_reduction_keyword_args
```python
from test_numpy import test_validate_reduction_keyword_args
```



---
## test_np_max_nested_tuples
```python
from test_numpy import test_np_max_nested_tuples
```



---
## test_np_reduce_2d
```python
from test_numpy import test_np_reduce_2d
```



---
## test_ufunc_unary
```python
from test_numpy import test_ufunc_unary
```



---
## test_ufunc
```python
from test_numpy import test_ufunc
```



---
## test_basic_binop
```python
from test_numpy import test_basic_binop
```



---
## test_setitem_object_typecode
```python
from test_numpy import test_setitem_object_typecode
```



---
## test_setitem_no_coercion
```python
from test_numpy import test_setitem_no_coercion
```



---
## test_setitem_preserves_views
```python
from test_numpy import test_setitem_preserves_views
```



---
## test_quantile_empty
```python
from test_numpy import test_quantile_empty
```



---
## test_factorize_unsigned
```python
from test_numpy import test_factorize_unsigned
```



---
## TestIntervalIndex
```python
from test_interval import TestIntervalIndex
```



---
## TestIntervalIndexInsideMultiIndex
```python
from test_interval import TestIntervalIndexInsideMultiIndex
```



---
## series_with_interval_index
```python
from test_interval import series_with_interval_index
```



---
## test_getitem_with_scalar
```python
from test_interval import test_getitem_with_scalar
```



---
## test_getitem_nonoverlapping_monotonic
```python
from test_interval import test_getitem_nonoverlapping_monotonic
```



---
## test_getitem_non_matching
```python
from test_interval import test_getitem_non_matching
```



---
## test_loc_getitem_large_series
```python
from test_interval import test_loc_getitem_large_series
```



---
## test_loc_getitem_frame
```python
from test_interval import test_loc_getitem_frame
```



---
## test_getitem_interval_with_nans
```python
from test_interval import test_getitem_interval_with_nans
```



---
## test_setitem_interval_with_slice
```python
from test_interval import test_setitem_interval_with_slice
```



---
## test_mi_intervalindex_slicing_with_scalar
```python
from test_interval import test_mi_intervalindex_slicing_with_scalar
```



---
## test_reindex_behavior_with_interval_index
```python
from test_interval import test_reindex_behavior_with_interval_index
```



---
## __name__
```python
from test_interval_new import __name__
```



---
## TestIntervalIndex
```python
from test_interval_new import TestIntervalIndex
```



---
## test_repeating_interval_index_with_infs
```python
from test_interval_new import test_repeating_interval_index_with_infs
```



---
## series_with_interval_index
```python
from test_interval_new import series_with_interval_index
```



---
## test_loc_with_interval
```python
from test_interval_new import test_loc_with_interval
```



---
## test_loc_with_scalar
```python
from test_interval_new import test_loc_with_scalar
```



---
## test_loc_with_slices
```python
from test_interval_new import test_loc_with_slices
```



---
## test_slice_step_ne1
```python
from test_interval_new import test_slice_step_ne1
```



---
## test_slice_float_start_stop
```python
from test_interval_new import test_slice_float_start_stop
```



---
## test_slice_interval_step
```python
from test_interval_new import test_slice_interval_step
```



---
## test_loc_with_overlap
```python
from test_interval_new import test_loc_with_overlap
```



---
## test_non_unique
```python
from test_interval_new import test_non_unique
```



---
## test_non_unique_moar
```python
from test_interval_new import test_non_unique_moar
```



---
## test_loc_getitem_missing_key_error_message
```python
from test_interval_new import test_loc_getitem_missing_key_error_message
```



---
## __name__
```python
from test_indexing_slow import __name__
```



---
## m
```python
from test_indexing_slow import m
```



---
## n
```python
from test_indexing_slow import n
```



---
## cols
```python
from test_indexing_slow import cols
```



---
## vals
```python
from test_indexing_slow import vals
```



---
## keys
```python
from test_indexing_slow import keys
```



---
## df
```python
from test_indexing_slow import df
```



---
## a
```python
from test_indexing_slow import a
```



---
## b
```python
from test_indexing_slow import b
```



---
## test_multiindex_get_loc
```python
from test_indexing_slow import test_multiindex_get_loc
```



---
## __name__
```python
from test_multiindex import __name__
```



---
## TestMultiIndexBasic
```python
from test_multiindex import TestMultiIndexBasic
```



---
## test_multiindex_perf_warn
```python
from test_multiindex import test_multiindex_perf_warn
```



---
## test_indexing_over_hashtable_size_cutoff
```python
from test_multiindex import test_indexing_over_hashtable_size_cutoff
```



---
## test_multi_nan_indexing
```python
from test_multiindex import test_multi_nan_indexing
```



---
## test_exclusive_nat_column_indexing
```python
from test_multiindex import test_exclusive_nat_column_indexing
```



---
## test_nested_tuples_duplicates
```python
from test_multiindex import test_nested_tuples_duplicates
```



---
## test_multiindex_with_datatime_level_preserves_freq
```python
from test_multiindex import test_multiindex_with_datatime_level_preserves_freq
```



---
## test_multiindex_complex
```python
from test_multiindex import test_multiindex_complex
```



---
## test_rename_multiindex_with_duplicates
```python
from test_multiindex import test_rename_multiindex_with_duplicates
```



---
## test_series_align_multiindex_with_nan_overlap_only
```python
from test_multiindex import test_series_align_multiindex_with_nan_overlap_only
```



---
## test_series_align_multiindex_with_nan
```python
from test_multiindex import test_series_align_multiindex_with_nan
```



---
## test_nunique_smoke
```python
from test_multiindex import test_nunique_smoke
```



---
## test_multiindex_repeated_keys
```python
from test_multiindex import test_multiindex_repeated_keys
```



---
## test_multiindex_with_na_missing_key
```python
from test_multiindex import test_multiindex_with_na_missing_key
```



---
## test_multiindex_dtype_preservation
```python
from test_multiindex import test_multiindex_dtype_preservation
```



---
## test_multiindex_from_tuples_with_nan
```python
from test_multiindex import test_multiindex_from_tuples_with_nan
```



---
## test_indexer_caching
```python
from test_chaining_and_caching import test_indexer_caching
```



---
## test_series_getitem_multiindex
```python
from test_getitem import test_series_getitem_multiindex
```



---
## test_series_getitem_duplicates_multiindex
```python
from test_getitem import test_series_getitem_duplicates_multiindex
```



---
## test_series_getitem
```python
from test_getitem import test_series_getitem
```



---
## test_series_getitem_returns_scalar
```python
from test_getitem import test_series_getitem_returns_scalar
```



---
## test_series_getitem_indexing_errors
```python
from test_getitem import test_series_getitem_indexing_errors
```



---
## test_series_getitem_corner_generator
```python
from test_getitem import test_series_getitem_corner_generator
```



---
## test_getitem_simple
```python
from test_getitem import test_getitem_simple
```



---
## test_frame_getitem_simple_key_error
```python
from test_getitem import test_frame_getitem_simple_key_error
```



---
## test_tuple_string_column_names
```python
from test_getitem import test_tuple_string_column_names
```



---
## test_frame_getitem_multicolumn_empty_level
```python
from test_getitem import test_frame_getitem_multicolumn_empty_level
```



---
## test_frame_getitem_toplevel
```python
from test_getitem import test_frame_getitem_toplevel
```



---
## test_frame_mixed_depth_get
```python
from test_getitem import test_frame_mixed_depth_get
```



---
## test_frame_getitem_nan_multiindex
```python
from test_getitem import test_frame_getitem_nan_multiindex
```



---
## test_frame_getitem_nan_cols_multiindex
```python
from test_getitem import test_frame_getitem_nan_cols_multiindex
```



---
## dataframe_with_duplicate_index
```python
from test_getitem import dataframe_with_duplicate_index
```

Fixture for DataFrame used in tests for gh-4145 and gh-4146

---
## test_frame_mi_access
```python
from test_getitem import test_frame_mi_access
```



---
## test_frame_mi_access_returns_series
```python
from test_getitem import test_frame_mi_access_returns_series
```



---
## test_frame_mi_access_returns_frame
```python
from test_getitem import test_frame_mi_access_returns_frame
```



---
## test_frame_mi_empty_slice
```python
from test_getitem import test_frame_mi_empty_slice
```



---
## test_loc_empty_multiindex
```python
from test_getitem import test_loc_empty_multiindex
```



---
## __name__
```python
from test_sorted import __name__
```



---
## TestMultiIndexSorted
```python
from test_sorted import TestMultiIndexSorted
```



---
## test_getitem_multilevel_index_tuple_not_sorted
```python
from test_sorted import test_getitem_multilevel_index_tuple_not_sorted
```



---
## test_getitem_slice_not_sorted
```python
from test_sorted import test_getitem_slice_not_sorted
```



---
## test_frame_getitem_not_sorted2
```python
from test_sorted import test_frame_getitem_not_sorted2
```



---
## test_sort_values_key
```python
from test_sorted import test_sort_values_key
```



---
## test_argsort_with_na
```python
from test_sorted import test_argsort_with_na
```



---
## test_sort_values_with_na
```python
from test_sorted import test_sort_values_with_na
```



---
## test_frame_getitem_not_sorted
```python
from test_sorted import test_frame_getitem_not_sorted
```



---
## test_series_getitem_not_sorted
```python
from test_sorted import test_series_getitem_not_sorted
```



---
## assert_equal
```python
from test_setitem import assert_equal
```



---
## TestMultiIndexSetItem
```python
from test_setitem import TestMultiIndexSetItem
```



---
## TestSetitemWithExpansionMultiIndex
```python
from test_setitem import TestSetitemWithExpansionMultiIndex
```



---
## test_frame_setitem_view_direct
```python
from test_setitem import test_frame_setitem_view_direct
```



---
## test_frame_setitem_copy_raises
```python
from test_setitem import test_frame_setitem_copy_raises
```



---
## test_frame_setitem_copy_no_write
```python
from test_setitem import test_frame_setitem_copy_no_write
```



---
## test_frame_setitem_partial_multiindex
```python
from test_setitem import test_frame_setitem_partial_multiindex
```



---
## check
```python
from test_setitem import check
```



---
## test_setitem_multiindex
```python
from test_setitem import test_setitem_multiindex
```



---
## test_setitem_multiindex2
```python
from test_setitem import test_setitem_multiindex2
```



---
## test_setitem_multiindex3
```python
from test_setitem import test_setitem_multiindex3
```



---
## test_multiindex_setitem
```python
from test_setitem import test_multiindex_setitem
```



---
## test_multiindex_setitem2
```python
from test_setitem import test_multiindex_setitem2
```



---
## test_multiindex_assignment
```python
from test_setitem import test_multiindex_assignment
```



---
## test_multiindex_assignment_single_dtype
```python
from test_setitem import test_multiindex_assignment_single_dtype
```



---
## test_groupby_example
```python
from test_setitem import test_groupby_example
```



---
## test_series_setitem
```python
from test_setitem import test_series_setitem
```



---
## test_frame_getitem_setitem_boolean
```python
from test_setitem import test_frame_getitem_setitem_boolean
```



---
## test_frame_getitem_setitem_multislice
```python
from test_setitem import test_frame_getitem_setitem_multislice
```



---
## test_frame_setitem_multi_column
```python
from test_setitem import test_frame_setitem_multi_column
```



---
## test_frame_setitem_multi_column2
```python
from test_setitem import test_frame_setitem_multi_column2
```



---
## test_loc_getitem_tuple_plus_columns
```python
from test_setitem import test_loc_getitem_tuple_plus_columns
```



---
## test_loc_getitem_setitem_slice_integers
```python
from test_setitem import test_loc_getitem_setitem_slice_integers
```



---
## test_setitem_change_dtype
```python
from test_setitem import test_setitem_change_dtype
```



---
## test_set_column_scalar_with_loc
```python
from test_setitem import test_set_column_scalar_with_loc
```



---
## test_nonunique_assignment_1750
```python
from test_setitem import test_nonunique_assignment_1750
```



---
## test_astype_assignment_with_dups
```python
from test_setitem import test_astype_assignment_with_dups
```



---
## test_setitem_nonmonotonic
```python
from test_setitem import test_setitem_nonmonotonic
```



---
## test_setitem_new_column_mixed_depth
```python
from test_setitem import test_setitem_new_column_mixed_depth
```



---
## test_setitem_new_column_all_na
```python
from test_setitem import test_setitem_new_column_all_na
```



---
## test_setitem_enlargement_keep_index_names
```python
from test_setitem import test_setitem_enlargement_keep_index_names
```



---
## simple_multiindex_dataframe
```python
from test_iloc import simple_multiindex_dataframe
```

Factory function to create simple 3 x 3 dataframe with
both columns and row MultiIndex using supplied data or
random data by default.

---
## test_iloc_returns_series
```python
from test_iloc import test_iloc_returns_series
```



---
## test_iloc_returns_dataframe
```python
from test_iloc import test_iloc_returns_dataframe
```



---
## test_iloc_returns_scalar
```python
from test_iloc import test_iloc_returns_scalar
```



---
## test_iloc_getitem_multiple_items
```python
from test_iloc import test_iloc_getitem_multiple_items
```



---
## test_iloc_getitem_labels
```python
from test_iloc import test_iloc_getitem_labels
```



---
## test_frame_getitem_slice
```python
from test_iloc import test_frame_getitem_slice
```



---
## test_frame_setitem_slice
```python
from test_iloc import test_frame_setitem_slice
```



---
## test_indexing_ambiguity_bug_1678
```python
from test_iloc import test_indexing_ambiguity_bug_1678
```



---
## test_iloc_integer_locations
```python
from test_iloc import test_iloc_integer_locations
```



---
## test_iloc_setitem_int_multiindex_series
```python
from test_iloc import test_iloc_setitem_int_multiindex_series
```



---
## test_getitem_iloc
```python
from test_iloc import test_getitem_iloc
```



---
## single_level_multiindex
```python
from test_loc import single_level_multiindex
```

single level MultiIndex

---
## frame_random_data_integer_multi_index
```python
from test_loc import frame_random_data_integer_multi_index
```



---
## TestMultiIndexLoc
```python
from test_loc import TestMultiIndexLoc
```



---
## test_loc_getitem_duplicates_multiindex_missing_indexers
```python
from test_loc import test_loc_getitem_duplicates_multiindex_missing_indexers
```



---
## test_loc_getitem_duplicates_multiindex_empty_indexer
```python
from test_loc import test_loc_getitem_duplicates_multiindex_empty_indexer
```



---
## test_loc_getitem_duplicates_multiindex_non_scalar_type_object
```python
from test_loc import test_loc_getitem_duplicates_multiindex_non_scalar_type_object
```



---
## test_loc_getitem_tuple_plus_slice
```python
from test_loc import test_loc_getitem_tuple_plus_slice
```



---
## test_loc_getitem_int_raises_exception
```python
from test_loc import test_loc_getitem_int_raises_exception
```



---
## test_loc_getitem_lowerdim_corner
```python
from test_loc import test_loc_getitem_lowerdim_corner
```



---
## test_loc_setitem_single_column_slice
```python
from test_loc import test_loc_setitem_single_column_slice
```



---
## test_loc_nan_multiindex
```python
from test_loc import test_loc_nan_multiindex
```



---
## test_loc_period_string_indexing
```python
from test_loc import test_loc_period_string_indexing
```



---
## test_loc_datetime_mask_slicing
```python
from test_loc import test_loc_datetime_mask_slicing
```



---
## test_loc_datetime_series_tuple_slicing
```python
from test_loc import test_loc_datetime_series_tuple_slicing
```



---
## test_loc_with_mi_indexer
```python
from test_loc import test_loc_with_mi_indexer
```



---
## test_loc_mi_with_level1_named_0
```python
from test_loc import test_loc_mi_with_level1_named_0
```



---
## test_getitem_str_slice
```python
from test_loc import test_getitem_str_slice
```



---
## test_3levels_leading_period_index
```python
from test_loc import test_3levels_leading_period_index
```



---
## TestKeyErrorsWithMultiIndex
```python
from test_loc import TestKeyErrorsWithMultiIndex
```



---
## test_getitem_loc_commutability
```python
from test_loc import test_getitem_loc_commutability
```



---
## test_loc_with_nan
```python
from test_loc import test_loc_with_nan
```



---
## test_getitem_non_found_tuple
```python
from test_loc import test_getitem_non_found_tuple
```



---
## test_get_loc_datetime_index
```python
from test_loc import test_get_loc_datetime_index
```



---
## test_loc_setitem_indexer_differently_ordered
```python
from test_loc import test_loc_setitem_indexer_differently_ordered
```



---
## test_loc_getitem_index_differently_ordered_slice_none
```python
from test_loc import test_loc_getitem_index_differently_ordered_slice_none
```



---
## test_loc_getitem_index_differently_ordered_slice_none_duplicates
```python
from test_loc import test_loc_getitem_index_differently_ordered_slice_none_duplicates
```



---
## test_loc_getitem_drops_levels_for_one_row_dataframe
```python
from test_loc import test_loc_getitem_drops_levels_for_one_row_dataframe
```



---
## test_mi_columns_loc_list_label_order
```python
from test_loc import test_mi_columns_loc_list_label_order
```



---
## test_mi_partial_indexing_list_raises
```python
from test_loc import test_mi_partial_indexing_list_raises
```



---
## test_mi_indexing_list_nonexistent_raises
```python
from test_loc import test_mi_indexing_list_nonexistent_raises
```



---
## test_mi_add_cell_missing_row_non_unique
```python
from test_loc import test_mi_add_cell_missing_row_non_unique
```



---
## test_loc_get_scalar_casting_to_float
```python
from test_loc import test_loc_get_scalar_casting_to_float
```



---
## test_loc_empty_single_selector_with_names
```python
from test_loc import test_loc_empty_single_selector_with_names
```



---
## test_loc_keyerror_rightmost_key_missing
```python
from test_loc import test_loc_keyerror_rightmost_key_missing
```



---
## test_multindex_series_loc_with_tuple_label
```python
from test_loc import test_multindex_series_loc_with_tuple_label
```



---
## test_loc_setitem_frame_with_multiindex
```python
from test_loc import test_loc_setitem_frame_with_multiindex
```



---
## test_loc_getitem_general
```python
from test_loc import test_loc_getitem_general
```



---
## test_loc_getitem_multiindex_missing_label_raises
```python
from test_loc import test_loc_getitem_multiindex_missing_label_raises
```



---
## test_loc_getitem_list_of_tuples_with_multiindex
```python
from test_loc import test_loc_getitem_list_of_tuples_with_multiindex
```



---
## test_loc_getitem_series
```python
from test_loc import test_loc_getitem_series
```



---
## test_loc_getitem_array
```python
from test_loc import test_loc_getitem_array
```



---
## test_loc_multiindex_labels
```python
from test_loc import test_loc_multiindex_labels
```



---
## test_loc_multiindex_ints
```python
from test_loc import test_loc_multiindex_ints
```



---
## test_loc_multiindex_missing_label_raises
```python
from test_loc import test_loc_multiindex_missing_label_raises
```



---
## test_loc_multiindex_list_missing_label
```python
from test_loc import test_loc_multiindex_list_missing_label
```



---
## test_loc_multiindex_too_many_dims_raises
```python
from test_loc import test_loc_multiindex_too_many_dims_raises
```



---
## test_loc_multiindex_indexer_none
```python
from test_loc import test_loc_multiindex_indexer_none
```



---
## test_loc_multiindex_incomplete
```python
from test_loc import test_loc_multiindex_incomplete
```



---
## test_get_loc_single_level
```python
from test_loc import test_get_loc_single_level
```



---
## test_loc_getitem_nested_indexer
```python
from test_loc import test_loc_getitem_nested_indexer
```



---
## test_multiindex_loc_one_dimensional_tuple
```python
from test_loc import test_multiindex_loc_one_dimensional_tuple
```



---
## test_multiindex_one_dimensional_tuple_columns
```python
from test_loc import test_multiindex_one_dimensional_tuple_columns
```



---
## test_multiindex_setitem_columns_enlarging
```python
from test_loc import test_multiindex_setitem_columns_enlarging
```



---
## test_sorted_multiindex_after_union
```python
from test_loc import test_sorted_multiindex_after_union
```



---
## test_loc_no_second_level_index
```python
from test_loc import test_loc_no_second_level_index
```



---
## test_loc_multi_index_key_error
```python
from test_loc import test_loc_multi_index_key_error
```



---
## test_missing_keys_raises_keyerror
```python
from test_loc import test_missing_keys_raises_keyerror
```



---
## test_missing_key_raises_keyerror2
```python
from test_loc import test_missing_key_raises_keyerror2
```



---
## test_missing_key_combination
```python
from test_loc import test_missing_key_combination
```



---
## convert_nested_indexer
```python
from test_loc import convert_nested_indexer
```



---
## test_multiindex_period_datetime
```python
from test_datetime import test_multiindex_period_datetime
```



---
## test_multiindex_datetime_columns
```python
from test_datetime import test_multiindex_datetime_columns
```



---
## __name__
```python
from test_slice import __name__
```



---
## TestMultiIndexSlicers
```python
from test_slice import TestMultiIndexSlicers
```



---
## test_per_axis_per_level_getitem
```python
from test_slice import test_per_axis_per_level_getitem
```



---
## test_multiindex_slicers_non_unique
```python
from test_slice import test_multiindex_slicers_non_unique
```



---
## test_multiindex_slicers_datetimelike
```python
from test_slice import test_multiindex_slicers_datetimelike
```



---
## test_multiindex_slicers_edges
```python
from test_slice import test_multiindex_slicers_edges
```



---
## test_per_axis_per_level_doc_examples
```python
from test_slice import test_per_axis_per_level_doc_examples
```



---
## test_loc_axis_arguments
```python
from test_slice import test_loc_axis_arguments
```



---
## test_loc_axis_single_level_multi_col_indexing_multiindex_col_df
```python
from test_slice import test_loc_axis_single_level_multi_col_indexing_multiindex_col_df
```



---
## test_loc_axis_single_level_single_col_indexing_multiindex_col_df
```python
from test_slice import test_loc_axis_single_level_single_col_indexing_multiindex_col_df
```



---
## test_loc_ax_single_level_indexer_simple_df
```python
from test_slice import test_loc_ax_single_level_indexer_simple_df
```



---
## test_per_axis_per_level_setitem
```python
from test_slice import test_per_axis_per_level_setitem
```



---
## test_multiindex_label_slicing_with_negative_step
```python
from test_slice import test_multiindex_label_slicing_with_negative_step
```



---
## test_multiindex_slice_first_level
```python
from test_slice import test_multiindex_slice_first_level
```



---
## test_int_series_slicing
```python
from test_slice import test_int_series_slicing
```



---
## test_loc_slice_negative_stepsize
```python
from test_slice import test_loc_slice_negative_stepsize
```



---
## TestMultiIndexPartial
```python
from test_partial import TestMultiIndexPartial
```



---
## test_loc_getitem_partial_both_axis
```python
from test_partial import test_loc_getitem_partial_both_axis
```



---
## test_getitem_partial_int
```python
from test_partial import test_getitem_partial_int
```



---
## test_series_slice_partial
```python
from test_partial import test_series_slice_partial
```



---
## test_xs_partial
```python
from test_partial import test_xs_partial
```



---
## test_getitem_partial
```python
from test_partial import test_getitem_partial
```



---
## test_fancy_slice_partial
```python
from test_partial import test_fancy_slice_partial
```



---
## test_getitem_partial_column_select
```python
from test_partial import test_getitem_partial_column_select
```



---
## test_partial_set
```python
from test_partial import test_partial_set
```



---
## test_getitem_intkey_leading_level
```python
from test_partial import test_getitem_intkey_leading_level
```



---
## test_setitem_multiple_partial
```python
from test_partial import test_setitem_multiple_partial
```



---
## test_partial_getitem_loc_datetime
```python
from test_partial import test_partial_getitem_loc_datetime
```



---
## test_overlaps_self
```python
from test_overlaps import test_overlaps_self
```



---
## test_overlaps_nested
```python
from test_overlaps import test_overlaps_nested
```



---
## test_overlaps_disjoint
```python
from test_overlaps import test_overlaps_disjoint
```



---
## test_overlaps_endpoint
```python
from test_overlaps import test_overlaps_endpoint
```



---
## TestIntervalConstructors
```python
from test_constructors import TestIntervalConstructors
```



---
## test_construct_errors
```python
from test_constructors import test_construct_errors
```



---
## test_constructor_errors
```python
from test_constructors import test_constructor_errors
```



---
## test_constructor_errors_tz
```python
from test_constructors import test_constructor_errors_tz
```



---
## interval
```python
from test_interval import interval
```



---
## TestInterval
```python
from test_interval import TestInterval
```



---
## test_properties
```python
from test_interval import test_properties
```



---
## test_hash
```python
from test_interval import test_hash
```



---
## test_length
```python
from test_interval import test_length
```



---
## test_length_timestamp
```python
from test_interval import test_length_timestamp
```



---
## test_interval_repr
```python
from test_formats import test_interval_repr
```



---
## TestContains
```python
from test_contains import TestContains
```



---
## test_contains
```python
from test_contains import test_contains
```



---
## test_contains_interval
```python
from test_contains import test_contains_interval
```



---
## test_contains_infinite_length
```python
from test_contains import test_contains_infinite_length
```



---
## test_contains_zero_length
```python
from test_contains import test_contains_zero_length
```



---
## test_contains_mixed_types
```python
from test_contains import test_contains_mixed_types
```



---
## TestIntervalArithmetic
```python
from test_arithmetic import TestIntervalArithmetic
```



---
## TestIntervalComparisons
```python
from test_arithmetic import TestIntervalComparisons
```



---
## test_interval_add
```python
from test_arithmetic import test_interval_add
```



---
## test_interval_sub
```python
from test_arithmetic import test_interval_sub
```



---
## test_interval_mult
```python
from test_arithmetic import test_interval_mult
```



---
## test_interval_div
```python
from test_arithmetic import test_interval_div
```



---
## test_interval_floordiv
```python
from test_arithmetic import test_interval_floordiv
```



---
## test_time_interval_add_subtract_timedelta
```python
from test_arithmetic import test_time_interval_add_subtract_timedelta
```



---
## test_numeric_interval_add_timedelta_raises
```python
from test_arithmetic import test_numeric_interval_add_timedelta_raises
```



---
## test_timedelta_add_timestamp_interval
```python
from test_arithmetic import test_timedelta_add_timestamp_interval
```



---
## test_interval_equal
```python
from test_arithmetic import test_interval_equal
```



---
## test_interval_comparison
```python
from test_arithmetic import test_interval_comparison
```



---
## test_equality_comparison_broadcasts_over_array
```python
from test_arithmetic import test_equality_comparison_broadcasts_over_array
```



---
## TestTimedeltaConstructorUnitKeyword
```python
from test_constructors import TestTimedeltaConstructorUnitKeyword
```



---
## test_construct_from_kwargs_overflow
```python
from test_constructors import test_construct_from_kwargs_overflow
```



---
## test_construct_with_weeks_unit_overflow
```python
from test_constructors import test_construct_with_weeks_unit_overflow
```



---
## test_construct_from_td64_with_unit
```python
from test_constructors import test_construct_from_td64_with_unit
```



---
## test_from_td64_retain_resolution
```python
from test_constructors import test_from_td64_retain_resolution
```



---
## test_from_pytimedelta_us_reso
```python
from test_constructors import test_from_pytimedelta_us_reso
```



---
## test_from_tick_reso
```python
from test_constructors import test_from_tick_reso
```



---
## test_construction
```python
from test_constructors import test_construction
```



---
## test_td_construction_with_np_dtypes
```python
from test_constructors import test_td_construction_with_np_dtypes
```



---
## test_td_from_repr_roundtrip
```python
from test_constructors import test_td_from_repr_roundtrip
```



---
## test_overflow_on_construction
```python
from test_constructors import test_overflow_on_construction
```



---
## test_construction_out_of_bounds_td64ns
```python
from test_constructors import test_construction_out_of_bounds_td64ns
```



---
## test_construction_out_of_bounds_td64s
```python
from test_constructors import test_construction_out_of_bounds_td64s
```



---
## test_iso_constructor
```python
from test_constructors import test_iso_constructor
```



---
## test_iso_constructor_raises
```python
from test_constructors import test_iso_constructor_raises
```



---
## test_td_constructor_on_nanoseconds
```python
from test_constructors import test_td_constructor_on_nanoseconds
```



---
## test_td_constructor_value_error
```python
from test_constructors import test_td_constructor_value_error
```



---
## test_timedelta_constructor_identity
```python
from test_constructors import test_timedelta_constructor_identity
```



---
## test_timedelta_pass_td_and_kwargs_raises
```python
from test_constructors import test_timedelta_pass_td_and_kwargs_raises
```



---
## test_string_with_unit
```python
from test_constructors import test_string_with_unit
```



---
## test_string_without_numbers
```python
from test_constructors import test_string_without_numbers
```



---
## test_timedelta_new_npnat
```python
from test_constructors import test_timedelta_new_npnat
```



---
## test_subclass_respected
```python
from test_constructors import test_subclass_respected
```



---
## test_non_nano_value
```python
from test_constructors import test_non_nano_value
```



---
## test_unit_m_y_raises
```python
from test_constructors import test_unit_m_y_raises
```



---
## test_units_H_T_S_L_N_U_deprecated
```python
from test_constructors import test_units_H_T_S_L_N_U_deprecated
```



---
## test_unit_parser
```python
from test_constructors import test_unit_parser
```



---
## MyCustomTimedelta
```python
from test_constructors import MyCustomTimedelta
```



---
## TestNonNano
```python
from test_timedelta import TestNonNano
```



---
## test_timedelta_class_min_max_resolution
```python
from test_timedelta import test_timedelta_class_min_max_resolution
```



---
## TestTimedeltaUnaryOps
```python
from test_timedelta import TestTimedeltaUnaryOps
```



---
## TestTimedeltas
```python
from test_timedelta import TestTimedeltas
```



---
## test_truthiness
```python
from test_timedelta import test_truthiness
```



---
## test_timedelta_attribute_precision
```python
from test_timedelta import test_timedelta_attribute_precision
```



---
## unit_str
```python
from test_timedelta import unit_str
```



---
## unit
```python
from test_timedelta import unit
```



---
## val
```python
from test_timedelta import val
```



---
## td
```python
from test_timedelta import td
```



---
## test_from_value_and_reso
```python
from test_timedelta import test_from_value_and_reso
```



---
## test_unary_non_nano
```python
from test_timedelta import test_unary_non_nano
```



---
## test_sub_preserves_reso
```python
from test_timedelta import test_sub_preserves_reso
```



---
## test_mul_preserves_reso
```python
from test_timedelta import test_mul_preserves_reso
```



---
## test_cmp_cross_reso
```python
from test_timedelta import test_cmp_cross_reso
```



---
## test_to_pytimedelta
```python
from test_timedelta import test_to_pytimedelta
```



---
## test_to_timedelta64
```python
from test_timedelta import test_to_timedelta64
```



---
## test_truediv_timedeltalike
```python
from test_timedelta import test_truediv_timedeltalike
```



---
## test_truediv_numeric
```python
from test_timedelta import test_truediv_numeric
```



---
## test_floordiv_timedeltalike
```python
from test_timedelta import test_floordiv_timedeltalike
```



---
## test_floordiv_numeric
```python
from test_timedelta import test_floordiv_numeric
```



---
## test_addsub_mismatched_reso
```python
from test_timedelta import test_addsub_mismatched_reso
```



---
## test_min
```python
from test_timedelta import test_min
```



---
## test_max
```python
from test_timedelta import test_max
```



---
## test_resolution
```python
from test_timedelta import test_resolution
```



---
## test_hash
```python
from test_timedelta import test_hash
```



---
## test_invert
```python
from test_timedelta import test_invert
```



---
## test_unary_ops
```python
from test_timedelta import test_unary_ops
```



---
## test_rounding_on_int_unit_construction
```python
from test_timedelta import test_rounding_on_int_unit_construction
```



---
## test_total_seconds_scalar
```python
from test_timedelta import test_total_seconds_scalar
```



---
## test_conversion
```python
from test_timedelta import test_conversion
```



---
## test_fields
```python
from test_timedelta import test_fields
```



---
## test_iso_conversion
```python
from test_timedelta import test_iso_conversion
```



---
## test_nat_converters
```python
from test_timedelta import test_nat_converters
```



---
## test_numeric_conversions
```python
from test_timedelta import test_numeric_conversions
```



---
## test_timedelta_conversions
```python
from test_timedelta import test_timedelta_conversions
```



---
## test_to_numpy_alias
```python
from test_timedelta import test_to_numpy_alias
```



---
## test_identity
```python
from test_timedelta import test_identity
```



---
## test_short_format_converters
```python
from test_timedelta import test_short_format_converters
```



---
## test_full_format_converters
```python
from test_timedelta import test_full_format_converters
```



---
## test_pickle
```python
from test_timedelta import test_pickle
```



---
## test_timedelta_hash_equality
```python
from test_timedelta import test_timedelta_hash_equality
```



---
## test_hash_equality_invariance
```python
from test_timedelta import test_hash_equality_invariance
```



---
## test_implementation_limits
```python
from test_timedelta import test_implementation_limits
```



---
## test_total_seconds_precision
```python
from test_timedelta import test_total_seconds_precision
```



---
## test_resolution_string
```python
from test_timedelta import test_resolution_string
```



---
## test_resolution_deprecated
```python
from test_timedelta import test_resolution_deprecated
```



---
## check
```python
from test_timedelta import check
```



---
## conv
```python
from test_timedelta import conv
```



---
## test_isoformat
```python
from test_formats import test_isoformat
```



---
## TestReprBase
```python
from test_formats import TestReprBase
```



---
## test_none
```python
from test_formats import test_none
```



---
## test_sub_day
```python
from test_formats import test_sub_day
```



---
## test_long
```python
from test_formats import test_long
```



---
## test_all
```python
from test_formats import test_all
```



---
## TestTimedeltaAdditionSubtraction
```python
from test_arithmetic import TestTimedeltaAdditionSubtraction
```

Tests for Timedelta methods:

__add__, __radd__,
__sub__, __rsub__

---
## TestTimedeltaMultiplicationDivision
```python
from test_arithmetic import TestTimedeltaMultiplicationDivision
```

Tests for Timedelta methods:

__mul__, __rmul__,
__div__, __rdiv__,
__truediv__, __rtruediv__,
__floordiv__, __rfloordiv__,
__mod__, __rmod__,
__divmod__, __rdivmod__

---
## TestTimedeltaComparison
```python
from test_arithmetic import TestTimedeltaComparison
```



---
## test_ops_notimplemented
```python
from test_arithmetic import test_ops_notimplemented
```



---
## test_ops_error_str
```python
from test_arithmetic import test_ops_error_str
```



---
## test_td_add_sub_ten_seconds
```python
from test_arithmetic import test_td_add_sub_ten_seconds
```



---
## test_td_add_sub_one_day_ten_seconds
```python
from test_arithmetic import test_td_add_sub_one_day_ten_seconds
```



---
## test_td_add_datetimelike_scalar
```python
from test_arithmetic import test_td_add_datetimelike_scalar
```



---
## test_td_add_timestamp_overflow
```python
from test_arithmetic import test_td_add_timestamp_overflow
```



---
## test_td_add_td
```python
from test_arithmetic import test_td_add_td
```



---
## test_td_add_pytimedelta
```python
from test_arithmetic import test_td_add_pytimedelta
```



---
## test_td_add_timedelta64
```python
from test_arithmetic import test_td_add_timedelta64
```



---
## test_td_add_offset
```python
from test_arithmetic import test_td_add_offset
```



---
## test_td_sub_td
```python
from test_arithmetic import test_td_sub_td
```



---
## test_td_sub_pytimedelta
```python
from test_arithmetic import test_td_sub_pytimedelta
```



---
## test_td_sub_timedelta64
```python
from test_arithmetic import test_td_sub_timedelta64
```



---
## test_td_sub_nat
```python
from test_arithmetic import test_td_sub_nat
```



---
## test_td_sub_td64_nat
```python
from test_arithmetic import test_td_sub_td64_nat
```



---
## test_td_sub_offset
```python
from test_arithmetic import test_td_sub_offset
```



---
## test_td_add_sub_numeric_raises
```python
from test_arithmetic import test_td_add_sub_numeric_raises
```



---
## test_td_add_sub_int_ndarray
```python
from test_arithmetic import test_td_add_sub_int_ndarray
```



---
## test_td_rsub_nat
```python
from test_arithmetic import test_td_rsub_nat
```



---
## test_td_rsub_offset
```python
from test_arithmetic import test_td_rsub_offset
```



---
## test_td_sub_timedeltalike_object_dtype_array
```python
from test_arithmetic import test_td_sub_timedeltalike_object_dtype_array
```



---
## test_td_sub_mixed_most_timedeltalike_object_dtype_array
```python
from test_arithmetic import test_td_sub_mixed_most_timedeltalike_object_dtype_array
```



---
## test_td_rsub_mixed_most_timedeltalike_object_dtype_array
```python
from test_arithmetic import test_td_rsub_mixed_most_timedeltalike_object_dtype_array
```



---
## test_td_add_timedeltalike_object_dtype_array
```python
from test_arithmetic import test_td_add_timedeltalike_object_dtype_array
```



---
## test_td_add_mixed_timedeltalike_object_dtype_array
```python
from test_arithmetic import test_td_add_mixed_timedeltalike_object_dtype_array
```



---
## test_td_add_sub_td64_ndarray
```python
from test_arithmetic import test_td_add_sub_td64_ndarray
```



---
## test_td_add_sub_dt64_ndarray
```python
from test_arithmetic import test_td_add_sub_dt64_ndarray
```



---
## test_td_add_sub_ndarray_0d
```python
from test_arithmetic import test_td_add_sub_ndarray_0d
```



---
## test_td_mul_nat
```python
from test_arithmetic import test_td_mul_nat
```



---
## test_td_mul_nan
```python
from test_arithmetic import test_td_mul_nan
```



---
## test_td_mul_scalar
```python
from test_arithmetic import test_td_mul_scalar
```



---
## test_td_mul_numeric_ndarray
```python
from test_arithmetic import test_td_mul_numeric_ndarray
```



---
## test_td_mul_numeric_ndarray_0d
```python
from test_arithmetic import test_td_mul_numeric_ndarray_0d
```



---
## test_td_mul_td64_ndarray_invalid
```python
from test_arithmetic import test_td_mul_td64_ndarray_invalid
```



---
## test_td_div_timedeltalike_scalar
```python
from test_arithmetic import test_td_div_timedeltalike_scalar
```



---
## test_td_div_td64_non_nano
```python
from test_arithmetic import test_td_div_td64_non_nano
```



---
## test_td_div_numeric_scalar
```python
from test_arithmetic import test_td_div_numeric_scalar
```



---
## test_td_div_nan
```python
from test_arithmetic import test_td_div_nan
```



---
## test_td_div_td64_ndarray
```python
from test_arithmetic import test_td_div_td64_ndarray
```



---
## test_td_div_ndarray_0d
```python
from test_arithmetic import test_td_div_ndarray_0d
```



---
## test_td_rdiv_timedeltalike_scalar
```python
from test_arithmetic import test_td_rdiv_timedeltalike_scalar
```



---
## test_td_rdiv_na_scalar
```python
from test_arithmetic import test_td_rdiv_na_scalar
```



---
## test_td_rdiv_ndarray
```python
from test_arithmetic import test_td_rdiv_ndarray
```



---
## test_td_rdiv_ndarray_0d
```python
from test_arithmetic import test_td_rdiv_ndarray_0d
```



---
## test_td_floordiv_timedeltalike_scalar
```python
from test_arithmetic import test_td_floordiv_timedeltalike_scalar
```



---
## test_td_floordiv_null_scalar
```python
from test_arithmetic import test_td_floordiv_null_scalar
```



---
## test_td_floordiv_offsets
```python
from test_arithmetic import test_td_floordiv_offsets
```



---
## test_td_floordiv_invalid_scalar
```python
from test_arithmetic import test_td_floordiv_invalid_scalar
```



---
## test_td_floordiv_numeric_scalar
```python
from test_arithmetic import test_td_floordiv_numeric_scalar
```



---
## test_td_floordiv_timedeltalike_array
```python
from test_arithmetic import test_td_floordiv_timedeltalike_array
```



---
## test_td_floordiv_numeric_series
```python
from test_arithmetic import test_td_floordiv_numeric_series
```



---
## test_td_rfloordiv_timedeltalike_scalar
```python
from test_arithmetic import test_td_rfloordiv_timedeltalike_scalar
```



---
## test_td_rfloordiv_null_scalar
```python
from test_arithmetic import test_td_rfloordiv_null_scalar
```



---
## test_td_rfloordiv_offsets
```python
from test_arithmetic import test_td_rfloordiv_offsets
```



---
## test_td_rfloordiv_invalid_scalar
```python
from test_arithmetic import test_td_rfloordiv_invalid_scalar
```



---
## test_td_rfloordiv_numeric_scalar
```python
from test_arithmetic import test_td_rfloordiv_numeric_scalar
```



---
## test_td_rfloordiv_timedeltalike_array
```python
from test_arithmetic import test_td_rfloordiv_timedeltalike_array
```



---
## test_td_rfloordiv_intarray
```python
from test_arithmetic import test_td_rfloordiv_intarray
```



---
## test_td_rfloordiv_numeric_series
```python
from test_arithmetic import test_td_rfloordiv_numeric_series
```



---
## test_mod_timedeltalike
```python
from test_arithmetic import test_mod_timedeltalike
```



---
## test_mod_timedelta64_nat
```python
from test_arithmetic import test_mod_timedelta64_nat
```



---
## test_mod_timedelta64
```python
from test_arithmetic import test_mod_timedelta64
```



---
## test_mod_offset
```python
from test_arithmetic import test_mod_offset
```



---
## test_mod_numeric
```python
from test_arithmetic import test_mod_numeric
```



---
## test_mod_invalid
```python
from test_arithmetic import test_mod_invalid
```



---
## test_rmod_pytimedelta
```python
from test_arithmetic import test_rmod_pytimedelta
```



---
## test_rmod_timedelta64
```python
from test_arithmetic import test_rmod_timedelta64
```



---
## test_rmod_invalid
```python
from test_arithmetic import test_rmod_invalid
```



---
## test_divmod_numeric
```python
from test_arithmetic import test_divmod_numeric
```



---
## test_divmod_offset
```python
from test_arithmetic import test_divmod_offset
```



---
## test_divmod_invalid
```python
from test_arithmetic import test_divmod_invalid
```



---
## test_rdivmod_pytimedelta
```python
from test_arithmetic import test_rdivmod_pytimedelta
```



---
## test_rdivmod_offset
```python
from test_arithmetic import test_rdivmod_offset
```



---
## test_rdivmod_invalid
```python
from test_arithmetic import test_rdivmod_invalid
```



---
## test_td_op_timedelta_timedeltalike_array
```python
from test_arithmetic import test_td_op_timedelta_timedeltalike_array
```



---
## test_compare_pytimedelta_bounds
```python
from test_arithmetic import test_compare_pytimedelta_bounds
```



---
## test_compare_pytimedelta_bounds2
```python
from test_arithmetic import test_compare_pytimedelta_bounds2
```



---
## test_compare_tick
```python
from test_arithmetic import test_compare_tick
```



---
## test_comparison_object_array
```python
from test_arithmetic import test_comparison_object_array
```



---
## test_compare_timedelta_ndarray
```python
from test_arithmetic import test_compare_timedelta_ndarray
```



---
## test_compare_td64_ndarray
```python
from test_arithmetic import test_compare_td64_ndarray
```



---
## test_compare_custom_object
```python
from test_arithmetic import test_compare_custom_object
```

Make sure non supported operations on Timedelta returns NonImplemented
and yields to other operand (GH#20829).

---
## test_compare_unknown_type
```python
from test_arithmetic import test_compare_unknown_type
```



---
## Other
```python
from test_arithmetic import Other
```



---
## CustomClass
```python
from test_arithmetic import CustomClass
```



---
## generic_result
```python
from test_arithmetic import generic_result
```



---
## __eq__
```python
from test_arithmetic import __eq__
```



---
## __gt__
```python
from test_arithmetic import __gt__
```



---
## TestPeriodDisallowedFreqs
```python
from test_period import TestPeriodDisallowedFreqs
```



---
## TestPeriodConstruction
```python
from test_period import TestPeriodConstruction
```



---
## TestPeriodMethods
```python
from test_period import TestPeriodMethods
```



---
## TestPeriodProperties
```python
from test_period import TestPeriodProperties
```

Test properties such as year, month, weekday, etc....

---
## TestPeriodComparisons
```python
from test_period import TestPeriodComparisons
```



---
## test_period_immutable
```python
from test_period import test_period_immutable
```



---
## test_small_year_parsing
```python
from test_period import test_small_year_parsing
```



---
## test_negone_ordinals
```python
from test_period import test_negone_ordinals
```



---
## test_offsets_not_supported
```python
from test_period import test_offsets_not_supported
```



---
## test_custom_business_day_freq_raises
```python
from test_period import test_custom_business_day_freq_raises
```



---
## test_invalid_frequency_error_message
```python
from test_period import test_invalid_frequency_error_message
```



---
## test_invalid_frequency_period_error_message
```python
from test_period import test_invalid_frequency_period_error_message
```



---
## test_from_td64nat_raises
```python
from test_period import test_from_td64nat_raises
```



---
## test_construction
```python
from test_period import test_construction
```



---
## test_tuple_freq_disallowed
```python
from test_period import test_tuple_freq_disallowed
```



---
## test_construction_from_timestamp_nanos
```python
from test_period import test_construction_from_timestamp_nanos
```



---
## test_construction_bday
```python
from test_period import test_construction_bday
```



---
## test_construction_quarter
```python
from test_period import test_construction_quarter
```



---
## test_construction_month
```python
from test_period import test_construction_month
```



---
## test_period_constructor_offsets
```python
from test_period import test_period_constructor_offsets
```



---
## test_invalid_arguments
```python
from test_period import test_invalid_arguments
```



---
## test_constructor_corner
```python
from test_period import test_constructor_corner
```



---
## test_constructor_infer_freq
```python
from test_period import test_constructor_infer_freq
```



---
## test_multiples
```python
from test_period import test_multiples
```



---
## test_period_cons_quarterly
```python
from test_period import test_period_cons_quarterly
```



---
## test_period_cons_annual
```python
from test_period import test_period_cons_annual
```



---
## test_period_cons_weekly
```python
from test_period import test_period_cons_weekly
```



---
## test_parse_week_str_roundstrip
```python
from test_period import test_parse_week_str_roundstrip
```



---
## test_period_from_ordinal
```python
from test_period import test_period_from_ordinal
```



---
## test_construct_from_nat_string_and_freq
```python
from test_period import test_construct_from_nat_string_and_freq
```



---
## test_period_cons_nat
```python
from test_period import test_period_cons_nat
```



---
## test_period_cons_mult
```python
from test_period import test_period_cons_mult
```



---
## test_period_cons_combined
```python
from test_period import test_period_cons_combined
```



---
## test_period_constructor_nanosecond
```python
from test_period import test_period_constructor_nanosecond
```



---
## test_period_large_ordinal
```python
from test_period import test_period_large_ordinal
```



---
## test_round_trip
```python
from test_period import test_round_trip
```



---
## test_hash
```python
from test_period import test_hash
```



---
## test_to_timestamp_mult
```python
from test_period import test_to_timestamp_mult
```



---
## test_to_timestamp
```python
from test_period import test_to_timestamp
```



---
## test_to_timestamp_business_end
```python
from test_period import test_to_timestamp_business_end
```



---
## test_to_timestamp_microsecond
```python
from test_period import test_to_timestamp_microsecond
```



---
## test_repr
```python
from test_period import test_repr
```



---
## test_repr_nat
```python
from test_period import test_repr_nat
```



---
## test_strftime
```python
from test_period import test_strftime
```



---
## test_is_leap_year
```python
from test_period import test_is_leap_year
```



---
## test_quarterly_negative_ordinals
```python
from test_period import test_quarterly_negative_ordinals
```



---
## test_freq_str
```python
from test_period import test_freq_str
```



---
## test_period_deprecated_freq
```python
from test_period import test_period_deprecated_freq
```



---
## _period_constructor
```python
from test_period import _period_constructor
```



---
## test_outer_bounds_start_and_end_time
```python
from test_period import test_outer_bounds_start_and_end_time
```



---
## test_inner_bounds_start_and_end_time
```python
from test_period import test_inner_bounds_start_and_end_time
```



---
## test_start_time
```python
from test_period import test_start_time
```



---
## test_end_time
```python
from test_period import test_end_time
```



---
## test_end_time_business_friday
```python
from test_period import test_end_time_business_friday
```



---
## test_anchor_week_end_time
```python
from test_period import test_anchor_week_end_time
```



---
## test_properties_annually
```python
from test_period import test_properties_annually
```



---
## test_properties_quarterly
```python
from test_period import test_properties_quarterly
```



---
## test_properties_monthly
```python
from test_period import test_properties_monthly
```



---
## test_properties_weekly
```python
from test_period import test_properties_weekly
```



---
## test_properties_weekly_legacy
```python
from test_period import test_properties_weekly_legacy
```



---
## test_properties_daily
```python
from test_period import test_properties_daily
```



---
## test_properties_hourly
```python
from test_period import test_properties_hourly
```



---
## test_properties_minutely
```python
from test_period import test_properties_minutely
```



---
## test_properties_secondly
```python
from test_period import test_properties_secondly
```



---
## test_sort_periods
```python
from test_period import test_sort_periods
```



---
## _ex
```python
from test_period import _ex
```



---
## TestPeriodArithmetic
```python
from test_arithmetic import TestPeriodArithmetic
```



---
## TestPeriodComparisons
```python
from test_arithmetic import TestPeriodComparisons
```



---
## test_add_overflow_raises
```python
from test_arithmetic import test_add_overflow_raises
```



---
## test_period_add_integer
```python
from test_arithmetic import test_period_add_integer
```



---
## test_period_add_invalid
```python
from test_arithmetic import test_period_add_invalid
```



---
## test_period_sub_period_annual
```python
from test_arithmetic import test_period_sub_period_annual
```



---
## test_period_sub_period
```python
from test_arithmetic import test_period_sub_period
```



---
## test_sub_n_gt_1_ticks
```python
from test_arithmetic import test_sub_n_gt_1_ticks
```



---
## test_sub_n_gt_1_offsets
```python
from test_arithmetic import test_sub_n_gt_1_offsets
```



---
## test_period_add_offset
```python
from test_arithmetic import test_period_add_offset
```



---
## test_period_sub_offset
```python
from test_arithmetic import test_period_sub_offset
```



---
## test_period_addsub_nat
```python
from test_arithmetic import test_period_addsub_nat
```



---
## test_period_add_sub_td64_nat
```python
from test_arithmetic import test_period_add_sub_td64_nat
```



---
## test_period_ops_offset
```python
from test_arithmetic import test_period_ops_offset
```



---
## test_period_add_timestamp_raises
```python
from test_arithmetic import test_period_add_timestamp_raises
```



---
## test_period_comparison_same_freq
```python
from test_arithmetic import test_period_comparison_same_freq
```



---
## test_period_comparison_same_period_different_object
```python
from test_arithmetic import test_period_comparison_same_period_different_object
```



---
## test_period_comparison_mismatched_freq
```python
from test_arithmetic import test_period_comparison_mismatched_freq
```



---
## test_period_comparison_invalid_type
```python
from test_arithmetic import test_period_comparison_invalid_type
```



---
## test_period_comparison_nat
```python
from test_arithmetic import test_period_comparison_nat
```



---
## test_period_comparison_numpy_zerodim_arr
```python
from test_arithmetic import test_period_comparison_numpy_zerodim_arr
```



---
## TestFreqConversion
```python
from test_asfreq import TestFreqConversion
```

Test frequency conversion of date objects

---
## test_asfreq_near_zero
```python
from test_asfreq import test_asfreq_near_zero
```



---
## test_asfreq_near_zero_weekly
```python
from test_asfreq import test_asfreq_near_zero_weekly
```



---
## test_to_timestamp_out_of_bounds
```python
from test_asfreq import test_to_timestamp_out_of_bounds
```



---
## test_asfreq_corner
```python
from test_asfreq import test_asfreq_corner
```



---
## test_conv_annual
```python
from test_asfreq import test_conv_annual
```



---
## test_conv_quarterly
```python
from test_asfreq import test_conv_quarterly
```



---
## test_conv_monthly
```python
from test_asfreq import test_conv_monthly
```



---
## test_conv_weekly
```python
from test_asfreq import test_conv_weekly
```



---
## test_conv_weekly_legacy
```python
from test_asfreq import test_conv_weekly_legacy
```



---
## test_conv_business
```python
from test_asfreq import test_conv_business
```



---
## test_conv_daily
```python
from test_asfreq import test_conv_daily
```



---
## test_conv_hourly
```python
from test_asfreq import test_conv_hourly
```



---
## test_conv_minutely
```python
from test_asfreq import test_conv_minutely
```



---
## test_conv_secondly
```python
from test_asfreq import test_conv_secondly
```



---
## test_conv_microsecond
```python
from test_asfreq import test_conv_microsecond
```



---
## test_asfreq_mult
```python
from test_asfreq import test_asfreq_mult
```



---
## test_asfreq_combined
```python
from test_asfreq import test_asfreq_combined
```



---
## test_asfreq_MS
```python
from test_asfreq import test_asfreq_MS
```



---
## TestTimestampConstructorUnitKeyword
```python
from test_constructors import TestTimestampConstructorUnitKeyword
```



---
## TestTimestampConstructorFoldKeyword
```python
from test_constructors import TestTimestampConstructorFoldKeyword
```



---
## TestTimestampConstructorPositionalAndKeywordSupport
```python
from test_constructors import TestTimestampConstructorPositionalAndKeywordSupport
```



---
## TestTimestampClassMethodConstructors
```python
from test_constructors import TestTimestampClassMethodConstructors
```



---
## TestTimestampResolutionInference
```python
from test_constructors import TestTimestampResolutionInference
```



---
## TestTimestampConstructors
```python
from test_constructors import TestTimestampConstructors
```



---
## test_constructor_ambiguous_dst
```python
from test_constructors import test_constructor_ambiguous_dst
```



---
## test_constructor_before_dst_switch
```python
from test_constructors import test_constructor_before_dst_switch
```



---
## test_timestamp_constructor_identity
```python
from test_constructors import test_timestamp_constructor_identity
```



---
## test_timestamp_nano_range
```python
from test_constructors import test_timestamp_nano_range
```



---
## test_timestamp_constructor_na_value
```python
from test_constructors import test_timestamp_constructor_na_value
```



---
## test_constructor_int_float_with_YM_unit
```python
from test_constructors import test_constructor_int_float_with_YM_unit
```



---
## test_construct_from_int_float_with_unit_out_of_bound_raises
```python
from test_constructors import test_construct_from_int_float_with_unit_out_of_bound_raises
```



---
## test_constructor_float_not_round_with_YM_unit_raises
```python
from test_constructors import test_constructor_float_not_round_with_YM_unit_raises
```



---
## test_construct_with_unit
```python
from test_constructors import test_construct_with_unit
```



---
## test_timestamp_constructor_invalid_fold_raise
```python
from test_constructors import test_timestamp_constructor_invalid_fold_raise
```



---
## test_timestamp_constructor_pytz_fold_raise
```python
from test_constructors import test_timestamp_constructor_pytz_fold_raise
```



---
## test_timestamp_constructor_fold_conflict
```python
from test_constructors import test_timestamp_constructor_fold_conflict
```



---
## test_timestamp_constructor_retain_fold
```python
from test_constructors import test_timestamp_constructor_retain_fold
```



---
## test_timestamp_constructor_infer_fold_from_value
```python
from test_constructors import test_timestamp_constructor_infer_fold_from_value
```



---
## test_timestamp_constructor_adjust_value_for_fold
```python
from test_constructors import test_timestamp_constructor_adjust_value_for_fold
```



---
## test_constructor_positional
```python
from test_constructors import test_constructor_positional
```



---
## test_constructor_keyword
```python
from test_constructors import test_constructor_keyword
```



---
## test_invalid_date_kwarg_with_string_input
```python
from test_constructors import test_invalid_date_kwarg_with_string_input
```



---
## test_constructor_missing_keyword
```python
from test_constructors import test_constructor_missing_keyword
```



---
## test_constructor_positional_with_tzinfo
```python
from test_constructors import test_constructor_positional_with_tzinfo
```



---
## test_constructor_positional_keyword_mixed_with_tzinfo
```python
from test_constructors import test_constructor_positional_keyword_mixed_with_tzinfo
```



---
## test_constructor_strptime
```python
from test_constructors import test_constructor_strptime
```



---
## test_constructor_fromisocalendar
```python
from test_constructors import test_constructor_fromisocalendar
```



---
## test_constructor_fromordinal
```python
from test_constructors import test_constructor_fromordinal
```



---
## test_now
```python
from test_constructors import test_now
```



---
## test_today
```python
from test_constructors import test_today
```



---
## test_construct_from_time_unit
```python
from test_constructors import test_construct_from_time_unit
```



---
## test_constructor_str_infer_reso
```python
from test_constructors import test_constructor_str_infer_reso
```



---
## test_now_today_unit
```python
from test_constructors import test_now_today_unit
```



---
## test_weekday_but_no_day_raises
```python
from test_constructors import test_weekday_but_no_day_raises
```



---
## test_construct_from_string_invalid_raises
```python
from test_constructors import test_construct_from_string_invalid_raises
```



---
## test_constructor_from_iso8601_str_with_offset_reso
```python
from test_constructors import test_constructor_from_iso8601_str_with_offset_reso
```



---
## test_constructor_from_date_second_reso
```python
from test_constructors import test_constructor_from_date_second_reso
```



---
## test_constructor_datetime64_with_tz
```python
from test_constructors import test_constructor_datetime64_with_tz
```



---
## test_constructor_with_stringoffset
```python
from test_constructors import test_constructor_with_stringoffset
```



---
## test_constructor_invalid
```python
from test_constructors import test_constructor_invalid
```



---
## test_constructor_invalid_tz
```python
from test_constructors import test_constructor_invalid_tz
```



---
## test_constructor_tz_or_tzinfo
```python
from test_constructors import test_constructor_tz_or_tzinfo
```



---
## test_constructor_nanosecond
```python
from test_constructors import test_constructor_nanosecond
```



---
## test_constructor_invalid_Z0_isostring
```python
from test_constructors import test_constructor_invalid_Z0_isostring
```



---
## test_out_of_bounds_integer_value
```python
from test_constructors import test_out_of_bounds_integer_value
```



---
## test_out_of_bounds_value
```python
from test_constructors import test_out_of_bounds_value
```



---
## test_out_of_bounds_string
```python
from test_constructors import test_out_of_bounds_string
```



---
## test_barely_out_of_bounds
```python
from test_constructors import test_barely_out_of_bounds
```



---
## test_bounds_with_different_units
```python
from test_constructors import test_bounds_with_different_units
```



---
## test_out_of_bounds_string_consistency
```python
from test_constructors import test_out_of_bounds_string_consistency
```



---
## test_min_valid
```python
from test_constructors import test_min_valid
```



---
## test_max_valid
```python
from test_constructors import test_max_valid
```



---
## test_construct_timestamp_near_dst
```python
from test_constructors import test_construct_timestamp_near_dst
```



---
## test_construct_with_different_string_format
```python
from test_constructors import test_construct_with_different_string_format
```



---
## test_raise_tz_and_tzinfo_in_datetime_input
```python
from test_constructors import test_raise_tz_and_tzinfo_in_datetime_input
```



---
## test_dont_convert_dateutil_utc_to_pytz_utc
```python
from test_constructors import test_dont_convert_dateutil_utc_to_pytz_utc
```



---
## test_constructor_subclassed_datetime
```python
from test_constructors import test_constructor_subclassed_datetime
```



---
## test_timestamp_constructor_tz_utc
```python
from test_constructors import test_timestamp_constructor_tz_utc
```



---
## test_timestamp_to_datetime_tzoffset
```python
from test_constructors import test_timestamp_to_datetime_tzoffset
```



---
## test_timestamp_constructor_near_dst_boundary
```python
from test_constructors import test_timestamp_constructor_near_dst_boundary
```



---
## test_timestamp_constructed_by_date_and_tz
```python
from test_constructors import test_timestamp_constructed_by_date_and_tz
```



---
## check
```python
from test_constructors import check
```



---
## SubDatetime
```python
from test_constructors import SubDatetime
```



---
## TestTimestampTZOperations
```python
from test_timezones import TestTimestampTZOperations
```



---
## test_timestamp_timetz_equivalent_with_datetime_tz
```python
from test_timezones import test_timestamp_timetz_equivalent_with_datetime_tz
```



---
## __name__
```python
from test_timestamp import __name__
```

test the scalar Timestamp 

---
## TestTimestampProperties
```python
from test_timestamp import TestTimestampProperties
```



---
## TestTimestamp
```python
from test_timestamp import TestTimestamp
```



---
## TestTimestampNsOperations
```python
from test_timestamp import TestTimestampNsOperations
```



---
## TestTimestampConversion
```python
from test_timestamp import TestTimestampConversion
```



---
## TestNonNano
```python
from test_timestamp import TestNonNano
```



---
## test_timestamp_class_min_max_resolution
```python
from test_timestamp import test_timestamp_class_min_max_resolution
```



---
## test_delimited_date
```python
from test_timestamp import test_delimited_date
```



---
## test_utctimetuple
```python
from test_timestamp import test_utctimetuple
```



---
## test_negative_dates
```python
from test_timestamp import test_negative_dates
```



---
## test_properties_business
```python
from test_timestamp import test_properties_business
```



---
## test_fields
```python
from test_timestamp import test_fields
```



---
## test_millisecond_raises
```python
from test_timestamp import test_millisecond_raises
```



---
## test_is_start
```python
from test_timestamp import test_is_start
```



---
## test_is_end
```python
from test_timestamp import test_is_end
```



---
## test_names
```python
from test_timestamp import test_names
```



---
## test_is_leap_year
```python
from test_timestamp import test_is_leap_year
```



---
## test_woy_boundary
```python
from test_timestamp import test_woy_boundary
```



---
## test_resolution
```python
from test_timestamp import test_resolution
```



---
## test_dow_historic
```python
from test_timestamp import test_dow_historic
```



---
## test_dow_parametric
```python
from test_timestamp import test_dow_parametric
```



---
## test_disallow_setting_tz
```python
from test_timestamp import test_disallow_setting_tz
```



---
## test_default_to_stdlib_utc
```python
from test_timestamp import test_default_to_stdlib_utc
```



---
## test_tz
```python
from test_timestamp import test_tz
```



---
## test_utc_z_designator
```python
from test_timestamp import test_utc_z_designator
```



---
## test_asm8
```python
from test_timestamp import test_asm8
```



---
## test_class_ops
```python
from test_timestamp import test_class_ops
```



---
## test_basics_nanos
```python
from test_timestamp import test_basics_nanos
```



---
## test_roundtrip
```python
from test_timestamp import test_roundtrip
```



---
## test_hash_equivalent
```python
from test_timestamp import test_hash_equivalent
```



---
## test_hash_timestamp_with_fold
```python
from test_timestamp import test_hash_timestamp_with_fold
```



---
## test_nanosecond_string_parsing
```python
from test_timestamp import test_nanosecond_string_parsing
```



---
## test_nanosecond_timestamp
```python
from test_timestamp import test_nanosecond_timestamp
```



---
## test_conversion
```python
from test_timestamp import test_conversion
```



---
## test_to_period_tz_warning
```python
from test_timestamp import test_to_period_tz_warning
```



---
## test_to_numpy_alias
```python
from test_timestamp import test_to_numpy_alias
```



---
## reso
```python
from test_timestamp import reso
```



---
## dt64
```python
from test_timestamp import dt64
```



---
## ts
```python
from test_timestamp import ts
```



---
## ts_tz
```python
from test_timestamp import ts_tz
```



---
## test_non_nano_construction
```python
from test_timestamp import test_non_nano_construction
```



---
## test_non_nano_fields
```python
from test_timestamp import test_non_nano_fields
```



---
## test_start_end_fields
```python
from test_timestamp import test_start_end_fields
```



---
## test_day_name
```python
from test_timestamp import test_day_name
```



---
## test_month_name
```python
from test_timestamp import test_month_name
```



---
## test_tz_convert
```python
from test_timestamp import test_tz_convert
```



---
## test_repr
```python
from test_timestamp import test_repr
```



---
## test_comparison
```python
from test_timestamp import test_comparison
```



---
## test_cmp_cross_reso
```python
from test_timestamp import test_cmp_cross_reso
```



---
## test_cmp_cross_reso_reversed_dt64
```python
from test_timestamp import test_cmp_cross_reso_reversed_dt64
```



---
## test_pickle
```python
from test_timestamp import test_pickle
```



---
## test_normalize
```python
from test_timestamp import test_normalize
```



---
## test_to_numpy
```python
from test_timestamp import test_to_numpy
```



---
## test_to_datetime64
```python
from test_timestamp import test_to_datetime64
```



---
## test_timestamp
```python
from test_timestamp import test_timestamp
```



---
## test_to_period
```python
from test_timestamp import test_to_period
```



---
## test_addsub_timedeltalike_non_nano
```python
from test_timestamp import test_addsub_timedeltalike_non_nano
```



---
## test_addsub_offset
```python
from test_timestamp import test_addsub_offset
```



---
## test_sub_datetimelike_mismatched_reso
```python
from test_timestamp import test_sub_datetimelike_mismatched_reso
```



---
## test_sub_timedeltalike_mismatched_reso
```python
from test_timestamp import test_sub_timedeltalike_mismatched_reso
```



---
## test_addition_doesnt_downcast_reso
```python
from test_timestamp import test_addition_doesnt_downcast_reso
```



---
## test_sub_timedelta64_mismatched_reso
```python
from test_timestamp import test_sub_timedelta64_mismatched_reso
```



---
## test_min
```python
from test_timestamp import test_min
```



---
## test_max
```python
from test_timestamp import test_max
```



---
## test_out_of_ns_bounds
```python
from test_timestamp import test_out_of_ns_bounds
```



---
## compare
```python
from test_timestamp import compare
```



---
## __name__
```python
from test_comparisons import __name__
```



---
## TestTimestampComparison
```python
from test_comparisons import TestTimestampComparison
```



---
## test_rich_comparison_with_unsupported_type
```python
from test_comparisons import test_rich_comparison_with_unsupported_type
```



---
## test_compare_non_nano_dt64
```python
from test_comparisons import test_compare_non_nano_dt64
```



---
## test_comparison_dt64_ndarray
```python
from test_comparisons import test_comparison_dt64_ndarray
```



---
## test_comparison_dt64_ndarray_tzaware
```python
from test_comparisons import test_comparison_dt64_ndarray_tzaware
```



---
## test_comparison_object_array
```python
from test_comparisons import test_comparison_object_array
```



---
## test_comparison
```python
from test_comparisons import test_comparison
```



---
## test_compare_invalid
```python
from test_comparisons import test_compare_invalid
```



---
## test_compare_date
```python
from test_comparisons import test_compare_date
```



---
## test_cant_compare_tz_naive_w_aware
```python
from test_comparisons import test_cant_compare_tz_naive_w_aware
```



---
## test_timestamp_compare_scalars
```python
from test_comparisons import test_timestamp_compare_scalars
```



---
## test_timestamp_compare_with_early_datetime
```python
from test_comparisons import test_timestamp_compare_with_early_datetime
```



---
## test_timestamp_compare_oob_dt64
```python
from test_comparisons import test_timestamp_compare_oob_dt64
```



---
## test_compare_zerodim_array
```python
from test_comparisons import test_compare_zerodim_array
```



---
## Inf
```python
from test_comparisons import Inf
```



---
## __lt__
```python
from test_comparisons import __lt__
```



---
## __le__
```python
from test_comparisons import __le__
```



---
## __gt__
```python
from test_comparisons import __gt__
```



---
## __ge__
```python
from test_comparisons import __ge__
```



---
## __eq__
```python
from test_comparisons import __eq__
```



---
## TestTimestampRendering
```python
from test_formats import TestTimestampRendering
```



---
## test_repr_utcoffset
```python
from test_formats import test_repr_utcoffset
```



---
## test_timestamp_repr_pre1900
```python
from test_formats import test_timestamp_repr_pre1900
```



---
## test_pprint
```python
from test_formats import test_pprint
```



---
## test_to_timestamp_repr_is_code
```python
from test_formats import test_to_timestamp_repr_is_code
```



---
## test_repr_matches_pydatetime_no_tz
```python
from test_formats import test_repr_matches_pydatetime_no_tz
```



---
## test_repr_matches_pydatetime_tz_pytz
```python
from test_formats import test_repr_matches_pydatetime_tz_pytz
```



---
## test_repr_matches_pydatetime_tz_dateutil
```python
from test_formats import test_repr_matches_pydatetime_tz_dateutil
```



---
## TestTimestampArithmetic
```python
from test_arithmetic import TestTimestampArithmetic
```



---
## SubDatetime
```python
from test_arithmetic import SubDatetime
```



---
## test_dt_subclass_add_timedelta
```python
from test_arithmetic import test_dt_subclass_add_timedelta
```



---
## test_overflow_offset
```python
from test_arithmetic import test_overflow_offset
```



---
## test_overflow_offset_raises
```python
from test_arithmetic import test_overflow_offset_raises
```



---
## test_overflow_timestamp_raises
```python
from test_arithmetic import test_overflow_timestamp_raises
```



---
## test_delta_preserve_nanos
```python
from test_arithmetic import test_delta_preserve_nanos
```



---
## test_rsub_dtscalars
```python
from test_arithmetic import test_rsub_dtscalars
```



---
## test_timestamp_sub_datetime
```python
from test_arithmetic import test_timestamp_sub_datetime
```



---
## test_subtract_tzaware_datetime
```python
from test_arithmetic import test_subtract_tzaware_datetime
```



---
## test_subtract_timestamp_from_different_timezone
```python
from test_arithmetic import test_subtract_timestamp_from_different_timezone
```



---
## test_subtracting_involving_datetime_with_different_tz
```python
from test_arithmetic import test_subtracting_involving_datetime_with_different_tz
```



---
## test_subtracting_different_timezones
```python
from test_arithmetic import test_subtracting_different_timezones
```



---
## test_addition_subtraction_types
```python
from test_arithmetic import test_addition_subtraction_types
```



---
## test_radd_tdscalar
```python
from test_arithmetic import test_radd_tdscalar
```



---
## test_timestamp_add_timedelta64_unit
```python
from test_arithmetic import test_timestamp_add_timedelta64_unit
```



---
## test_add_int_with_freq
```python
from test_arithmetic import test_add_int_with_freq
```



---
## test_addsub_m8ndarray
```python
from test_arithmetic import test_addsub_m8ndarray
```



---
## test_addsub_m8ndarray_tzaware
```python
from test_arithmetic import test_addsub_m8ndarray_tzaware
```



---
## test_subtract_different_utc_objects
```python
from test_arithmetic import test_subtract_different_utc_objects
```



---
## test_timestamp_add_timedelta_push_over_dst_boundary
```python
from test_arithmetic import test_timestamp_add_timedelta_push_over_dst_boundary
```



---
## TestTimedeltaRound
```python
from test_round import TestTimedeltaRound
```



---
## test_round_invalid
```python
from test_round import test_round_invalid
```



---
## test_round_implementation_bounds
```python
from test_round import test_round_implementation_bounds
```



---
## test_round_sanity
```python
from test_round import test_round_sanity
```



---
## test_round_non_nano
```python
from test_round import test_round_non_nano
```



---
## checker
```python
from test_round import checker
```



---
## __name__
```python
from test_as_unit import __name__
```



---
## TestAsUnit
```python
from test_as_unit import TestAsUnit
```



---
## test_as_unit
```python
from test_as_unit import test_as_unit
```



---
## test_as_unit_overflows
```python
from test_as_unit import test_as_unit_overflows
```



---
## test_as_unit_rounding
```python
from test_as_unit import test_as_unit_rounding
```



---
## test_as_unit_non_nano
```python
from test_as_unit import test_as_unit_non_nano
```



---
## __name__
```python
from test_to_julian_date import __name__
```



---
## TestTimestampToJulianDate
```python
from test_to_julian_date import TestTimestampToJulianDate
```



---
## test_compare_1700
```python
from test_to_julian_date import test_compare_1700
```



---
## test_compare_2000
```python
from test_to_julian_date import test_compare_2000
```



---
## test_compare_2100
```python
from test_to_julian_date import test_compare_2100
```



---
## test_compare_hour01
```python
from test_to_julian_date import test_compare_hour01
```



---
## test_compare_hour13
```python
from test_to_julian_date import test_compare_hour13
```



---
## TestTimestampRound
```python
from test_round import TestTimestampRound
```



---
## test_round_division_by_zero_raises
```python
from test_round import test_round_division_by_zero_raises
```



---
## test_round_frequencies
```python
from test_round import test_round_frequencies
```



---
## test_round_tzaware
```python
from test_round import test_round_tzaware
```



---
## test_round_30min
```python
from test_round import test_round_30min
```



---
## test_round_subsecond
```python
from test_round import test_round_subsecond
```



---
## test_round_nonstandard_freq
```python
from test_round import test_round_nonstandard_freq
```



---
## test_round_invalid_arg
```python
from test_round import test_round_invalid_arg
```



---
## test_ceil_floor_edge
```python
from test_round import test_ceil_floor_edge
```



---
## test_round_minute_freq
```python
from test_round import test_round_minute_freq
```



---
## test_ceil
```python
from test_round import test_ceil
```



---
## test_floor
```python
from test_round import test_floor
```



---
## test_round_dst_border_ambiguous
```python
from test_round import test_round_dst_border_ambiguous
```



---
## test_round_dst_border_nonexistent
```python
from test_round import test_round_dst_border_nonexistent
```



---
## test_round_int64
```python
from test_round import test_round_int64
```



---
## __name__
```python
from test_timestamp_method import __name__
```



---
## TestTimestampMethod
```python
from test_timestamp_method import TestTimestampMethod
```



---
## test_timestamp
```python
from test_timestamp_method import test_timestamp
```



---
## __name__
```python
from test_to_pydatetime import __name__
```



---
## TestTimestampToPyDatetime
```python
from test_to_pydatetime import TestTimestampToPyDatetime
```



---
## test_to_pydatetime_fold
```python
from test_to_pydatetime import test_to_pydatetime_fold
```



---
## test_to_pydatetime_nonzero_nano
```python
from test_to_pydatetime import test_to_pydatetime_nonzero_nano
```



---
## test_timestamp_to_datetime
```python
from test_to_pydatetime import test_timestamp_to_datetime
```



---
## test_timestamp_to_pydatetime_dateutil
```python
from test_to_pydatetime import test_timestamp_to_pydatetime_dateutil
```



---
## test_timestamp_to_pydatetime_explicit_pytz
```python
from test_to_pydatetime import test_timestamp_to_pydatetime_explicit_pytz
```



---
## test_timestamp_to_pydatetime_explicit_dateutil
```python
from test_to_pydatetime import test_timestamp_to_pydatetime_explicit_dateutil
```



---
## test_to_pydatetime_bijective
```python
from test_to_pydatetime import test_to_pydatetime_bijective
```



---
## TestTimestampTZLocalize
```python
from test_tz_localize import TestTimestampTZLocalize
```



---
## test_tz_localize_pushes_out_of_bounds
```python
from test_tz_localize import test_tz_localize_pushes_out_of_bounds
```



---
## test_tz_localize_ambiguous_bool
```python
from test_tz_localize import test_tz_localize_ambiguous_bool
```



---
## test_tz_localize_ambiguous
```python
from test_tz_localize import test_tz_localize_ambiguous
```



---
## test_tz_localize_nonexistent_shift
```python
from test_tz_localize import test_tz_localize_nonexistent_shift
```



---
## test_tz_localize_ambiguous_raise
```python
from test_tz_localize import test_tz_localize_ambiguous_raise
```



---
## test_tz_localize_nonexistent_invalid_arg
```python
from test_tz_localize import test_tz_localize_nonexistent_invalid_arg
```



---
## test_tz_localize_roundtrip
```python
from test_tz_localize import test_tz_localize_roundtrip
```



---
## test_tz_localize_ambiguous_compat
```python
from test_tz_localize import test_tz_localize_ambiguous_compat
```



---
## test_timestamp_tz_localize
```python
from test_tz_localize import test_timestamp_tz_localize
```



---
## test_timestamp_tz_localize_nonexistent_shift
```python
from test_tz_localize import test_timestamp_tz_localize_nonexistent_shift
```



---
## test_timestamp_tz_localize_nonexistent_shift_invalid
```python
from test_tz_localize import test_timestamp_tz_localize_nonexistent_shift_invalid
```



---
## test_timestamp_tz_localize_nonexistent_NaT
```python
from test_tz_localize import test_timestamp_tz_localize_nonexistent_NaT
```



---
## test_timestamp_tz_localize_nonexistent_raise
```python
from test_tz_localize import test_timestamp_tz_localize_nonexistent_raise
```



---
## TestTimestampAsUnit
```python
from test_as_unit import TestTimestampAsUnit
```



---
## TestTimestampReplace
```python
from test_replace import TestTimestampReplace
```



---
## test_replace_out_of_pydatetime_bounds
```python
from test_replace import test_replace_out_of_pydatetime_bounds
```



---
## test_replace_non_nano
```python
from test_replace import test_replace_non_nano
```



---
## test_replace_naive
```python
from test_replace import test_replace_naive
```



---
## test_replace_aware
```python
from test_replace import test_replace_aware
```



---
## test_replace_preserves_nanos
```python
from test_replace import test_replace_preserves_nanos
```



---
## test_replace_multiple
```python
from test_replace import test_replace_multiple
```



---
## test_replace_invalid_kwarg
```python
from test_replace import test_replace_invalid_kwarg
```



---
## test_replace_integer_args
```python
from test_replace import test_replace_integer_args
```



---
## test_replace_tzinfo_equiv_tz_localize_none
```python
from test_replace import test_replace_tzinfo_equiv_tz_localize_none
```



---
## test_replace_tzinfo
```python
from test_replace import test_replace_tzinfo
```



---
## test_replace_across_dst
```python
from test_replace import test_replace_across_dst
```



---
## test_replace_dst_border
```python
from test_replace import test_replace_dst_border
```



---
## test_replace_dst_fold
```python
from test_replace import test_replace_dst_fold
```



---
## test_replace_preserves_fold
```python
from test_replace import test_replace_preserves_fold
```



---
## TestTimestampNormalize
```python
from test_normalize import TestTimestampNormalize
```



---
## test_normalize
```python
from test_normalize import test_normalize
```



---
## test_normalize_pre_epoch_dates
```python
from test_normalize import test_normalize_pre_epoch_dates
```



---
## TestTimestampTZConvert
```python
from test_tz_convert import TestTimestampTZConvert
```



---
## test_astimezone
```python
from test_tz_convert import test_astimezone
```



---
## test_tz_convert_roundtrip
```python
from test_tz_convert import test_tz_convert_roundtrip
```



---
## test_tz_convert_utc_with_system_utc
```python
from test_tz_convert import test_tz_convert_utc_with_system_utc
```



---
## TestRangeIndexConstructors
```python
from test_constructors import TestRangeIndexConstructors
```



---
## test_constructor_invalid_args
```python
from test_constructors import test_constructor_invalid_args
```



---
## test_constructor_additional_invalid_args
```python
from test_constructors import test_constructor_additional_invalid_args
```



---
## test_constructor_invalid_args_wrong_type
```python
from test_constructors import test_constructor_invalid_args_wrong_type
```



---
## test_constructor_same
```python
from test_constructors import test_constructor_same
```



---
## test_constructor_range_object
```python
from test_constructors import test_constructor_range_object
```



---
## test_constructor_name
```python
from test_constructors import test_constructor_name
```



---
## test_join_outer
```python
from test_join import test_join_outer
```



---
## test_join_inner
```python
from test_join import test_join_inner
```



---
## test_join_left
```python
from test_join import test_join_left
```



---
## test_join_right
```python
from test_join import test_join_right
```



---
## test_join_non_int_index
```python
from test_join import test_join_non_int_index
```



---
## test_join_non_unique
```python
from test_join import test_join_non_unique
```



---
## test_join_self
```python
from test_join import test_join_self
```



---
## test_get_indexer
```python
from test_indexing import test_get_indexer
```



---
## test_get_indexer_pad
```python
from test_indexing import test_get_indexer_pad
```



---
## test_get_indexer_backfill
```python
from test_indexing import test_get_indexer_backfill
```



---
## test_get_indexer_limit
```python
from test_indexing import test_get_indexer_limit
```



---
## test_get_indexer_decreasing
```python
from test_indexing import test_get_indexer_decreasing
```



---
## test_take_preserve_name
```python
from test_indexing import test_take_preserve_name
```



---
## test_take_raises_index_error
```python
from test_indexing import test_take_raises_index_error
```



---
## test_take_accepts_empty_array
```python
from test_indexing import test_take_accepts_empty_array
```



---
## test_take_accepts_non_int64_array
```python
from test_indexing import test_take_accepts_non_int64_array
```



---
## test_take_when_index_has_step
```python
from test_indexing import test_take_when_index_has_step
```



---
## test_take_when_index_has_negative_step
```python
from test_indexing import test_take_when_index_has_negative_step
```



---
## test_where_putmask_range_cast
```python
from test_indexing import test_where_putmask_range_cast
```



---
## TestRangeIndexSetOps
```python
from test_setops import TestRangeIndexSetOps
```



---
## assert_range_or_not_is_rangelike
```python
from test_setops import assert_range_or_not_is_rangelike
```

Check that we either have a RangeIndex or that this index *cannot*
be represented as a RangeIndex.

---
## test_range_difference
```python
from test_setops import test_range_difference
```



---
## test_intersection_mismatched_dtype
```python
from test_setops import test_intersection_mismatched_dtype
```



---
## test_intersection_empty
```python
from test_setops import test_intersection_empty
```



---
## test_intersection_non_overlapping_gcd
```python
from test_setops import test_intersection_non_overlapping_gcd
```



---
## test_union_noncomparable
```python
from test_setops import test_union_noncomparable
```



---
## test_union_sorted
```python
from test_setops import test_union_sorted
```



---
## test_union_same_step_misaligned
```python
from test_setops import test_union_same_step_misaligned
```



---
## test_difference
```python
from test_setops import test_difference
```



---
## test_difference_mismatched_step
```python
from test_setops import test_difference_mismatched_step
```



---
## test_difference_interior_overlap_endpoints_preserved
```python
from test_setops import test_difference_interior_overlap_endpoints_preserved
```



---
## test_difference_endpoints_overlap_interior_preserved
```python
from test_setops import test_difference_endpoints_overlap_interior_preserved
```



---
## test_difference_interior_non_preserving
```python
from test_setops import test_difference_interior_non_preserving
```



---
## __name__
```python
from test_range import __name__
```



---
## TestRangeIndex
```python
from test_range import TestRangeIndex
```



---
## simple_index
```python
from test_range import simple_index
```



---
## test_constructor_unwraps_index
```python
from test_range import test_constructor_unwraps_index
```



---
## test_can_hold_identifiers
```python
from test_range import test_can_hold_identifiers
```



---
## test_too_many_names
```python
from test_range import test_too_many_names
```



---
## test_start_stop_step_attrs
```python
from test_range import test_start_stop_step_attrs
```



---
## test_copy
```python
from test_range import test_copy
```



---
## test_repr
```python
from test_range import test_repr
```



---
## test_insert
```python
from test_range import test_insert
```



---
## test_insert_edges_preserves_rangeindex
```python
from test_range import test_insert_edges_preserves_rangeindex
```



---
## test_insert_middle_preserves_rangeindex
```python
from test_range import test_insert_middle_preserves_rangeindex
```



---
## test_delete
```python
from test_range import test_delete
```



---
## test_delete_preserves_rangeindex
```python
from test_range import test_delete_preserves_rangeindex
```



---
## test_delete_preserves_rangeindex_middle
```python
from test_range import test_delete_preserves_rangeindex_middle
```



---
## test_delete_preserves_rangeindex_list_at_end
```python
from test_range import test_delete_preserves_rangeindex_list_at_end
```



---
## test_delete_preserves_rangeindex_list_middle
```python
from test_range import test_delete_preserves_rangeindex_list_middle
```



---
## test_delete_all_preserves_rangeindex
```python
from test_range import test_delete_all_preserves_rangeindex
```



---
## test_delete_not_preserving_rangeindex
```python
from test_range import test_delete_not_preserving_rangeindex
```



---
## test_view
```python
from test_range import test_view
```



---
## test_dtype
```python
from test_range import test_dtype
```



---
## test_cache
```python
from test_range import test_cache
```



---
## test_is_monotonic
```python
from test_range import test_is_monotonic
```



---
## test_equals_range
```python
from test_range import test_equals_range
```



---
## test_logical_compat
```python
from test_range import test_logical_compat
```



---
## test_identical
```python
from test_range import test_identical
```



---
## test_nbytes
```python
from test_range import test_nbytes
```



---
## test_cant_or_shouldnt_cast
```python
from test_range import test_cant_or_shouldnt_cast
```



---
## test_view_index
```python
from test_range import test_view_index
```



---
## test_prevent_casting
```python
from test_range import test_prevent_casting
```



---
## test_repr_roundtrip
```python
from test_range import test_repr_roundtrip
```



---
## test_slice_keep_name
```python
from test_range import test_slice_keep_name
```



---
## test_has_duplicates
```python
from test_range import test_has_duplicates
```



---
## test_extended_gcd
```python
from test_range import test_extended_gcd
```



---
## test_min_fitting_element
```python
from test_range import test_min_fitting_element
```



---
## test_slice_specialised
```python
from test_range import test_slice_specialised
```



---
## test_len_specialised
```python
from test_range import test_len_specialised
```



---
## test_append
```python
from test_range import test_append
```



---
## test_engineless_lookup
```python
from test_range import test_engineless_lookup
```



---
## test_format_empty
```python
from test_range import test_format_empty
```



---
## test_append_len_one
```python
from test_range import test_append_len_one
```



---
## test_isin_range
```python
from test_range import test_isin_range
```



---
## test_sort_values_key
```python
from test_range import test_sort_values_key
```



---
## test_range_index_rsub_by_const
```python
from test_range import test_range_index_rsub_by_const
```



---
## TestIndexConstructor
```python
from test_constructors import TestIndexConstructor
```



---
## test_construction_list_mixed_tuples
```python
from test_constructors import test_construction_list_mixed_tuples
```



---
## test_construct_empty_tuples
```python
from test_constructors import test_construct_empty_tuples
```



---
## test_index_string_inference
```python
from test_constructors import test_index_string_inference
```



---
## test_constructor_not_read_only
```python
from test_constructors import test_constructor_not_read_only
```



---
## test_pickle_preserves_object_dtype
```python
from test_pickle import test_pickle_preserves_object_dtype
```



---
## __name__
```python
from test_reshape import __name__
```



---
## TestReshape
```python
from test_reshape import TestReshape
```



---
## test_repeat
```python
from test_reshape import test_repeat
```



---
## test_insert
```python
from test_reshape import test_insert
```



---
## test_insert_missing
```python
from test_reshape import test_insert_missing
```



---
## test_insert_datetime_into_object
```python
from test_reshape import test_insert_datetime_into_object
```



---
## test_insert_none_into_string_numpy
```python
from test_reshape import test_insert_none_into_string_numpy
```



---
## test_delete
```python
from test_reshape import test_delete
```



---
## test_delete_raises
```python
from test_reshape import test_delete_raises
```



---
## test_append_multiple
```python
from test_reshape import test_append_multiple
```



---
## TestGetSliceBounds
```python
from test_indexing import TestGetSliceBounds
```



---
## TestGetIndexerNonUnique
```python
from test_indexing import TestGetIndexerNonUnique
```



---
## test_getitem_boolean_ea_indexer
```python
from test_indexing import test_getitem_boolean_ea_indexer
```



---
## test_get_slice_bounds_within
```python
from test_indexing import test_get_slice_bounds_within
```



---
## test_get_slice_bounds_outside
```python
from test_indexing import test_get_slice_bounds_outside
```



---
## test_get_slice_bounds_invalid_side
```python
from test_indexing import test_get_slice_bounds_invalid_side
```



---
## test_get_indexer_non_unique_dtype_mismatch
```python
from test_indexing import test_get_indexer_non_unique_dtype_mismatch
```



---
## test_get_indexer_non_unique_int_index
```python
from test_indexing import test_get_indexer_non_unique_int_index
```



---
## test_get_loc_tuple_monotonic_above_size_cutoff
```python
from test_indexing import test_get_loc_tuple_monotonic_above_size_cutoff
```



---
## test_get_loc_nan_object_dtype_nonmonotonic_nonunique
```python
from test_indexing import test_get_loc_nan_object_dtype_nonmonotonic_nonunique
```



---
## TestIndexRendering
```python
from test_formats import TestIndexRendering
```



---
## test_repr_is_valid_construction_code
```python
from test_formats import test_repr_is_valid_construction_code
```



---
## test_string_index_repr
```python
from test_formats import test_string_index_repr
```



---
## test_string_index_repr_with_unicode_option
```python
from test_formats import test_string_index_repr_with_unicode_option
```



---
## test_repr_summary
```python
from test_formats import test_repr_summary
```



---
## test_summary_bug
```python
from test_formats import test_summary_bug
```



---
## test_index_repr_bool_nan
```python
from test_formats import test_index_repr_bool_nan
```



---
## test_format_different_scalar_lengths
```python
from test_formats import test_format_different_scalar_lengths
```



---
## TestIndexSetOps
```python
from test_setops import TestIndexSetOps
```



---
## test_setops_sort_validation
```python
from test_setops import test_setops_sort_validation
```



---
## test_setops_preserve_object_dtype
```python
from test_setops import test_setops_preserve_object_dtype
```



---
## test_union_different_type_base
```python
from test_setops import test_union_different_type_base
```



---
## test_union_sort_other_incomparable
```python
from test_setops import test_union_sort_other_incomparable
```



---
## test_union_sort_other_incomparable_true
```python
from test_setops import test_union_sort_other_incomparable_true
```



---
## test_intersection_equal_sort_true
```python
from test_setops import test_intersection_equal_sort_true
```



---
## test_intersection_different_type_base
```python
from test_setops import test_intersection_different_type_base
```



---
## test_intersection_nosort
```python
from test_setops import test_intersection_nosort
```



---
## test_intersection_equal_sort
```python
from test_setops import test_intersection_equal_sort
```



---
## test_intersection_str_dates
```python
from test_setops import test_intersection_str_dates
```



---
## test_intersection_non_monotonic_non_unique
```python
from test_setops import test_intersection_non_monotonic_non_unique
```



---
## test_tuple_union_bug
```python
from test_setops import test_tuple_union_bug
```



---
## test_union_name_preservation
```python
from test_setops import test_union_name_preservation
```



---
## test_difference_object_type
```python
from test_setops import test_difference_object_type
```



---
## TestWhere
```python
from test_where import TestWhere
```



---
## test_where_intlike_str_doesnt_cast_ints
```python
from test_where import test_where_intlike_str_doesnt_cast_ints
```



---
## name
```python
from test_constructors import name
```



---
## ConstructorTests
```python
from test_constructors import ConstructorTests
```

Common tests for all variations of IntervalIndex construction. Input data
to be supplied in breaks format, then converted by the subclass method
get_kwargs_from_breaks to the expected format.

---
## TestFromArrays
```python
from test_constructors import TestFromArrays
```

Tests specific to IntervalIndex.from_arrays

---
## TestFromBreaks
```python
from test_constructors import TestFromBreaks
```

Tests specific to IntervalIndex.from_breaks

---
## TestFromTuples
```python
from test_constructors import TestFromTuples
```

Tests specific to IntervalIndex.from_tuples

---
## TestClassConstructors
```python
from test_constructors import TestClassConstructors
```

Tests specific to the IntervalIndex/Index constructors

---
## test_interval_index_subtype
```python
from test_constructors import test_interval_index_subtype
```



---
## test_dtype_closed_mismatch
```python
from test_constructors import test_dtype_closed_mismatch
```



---
## test_ea_dtype
```python
from test_constructors import test_ea_dtype
```



---
## breaks_and_expected_subtype
```python
from test_constructors import breaks_and_expected_subtype
```



---
## test_constructor_pass_closed
```python
from test_constructors import test_constructor_pass_closed
```



---
## test_constructor_string
```python
from test_constructors import test_constructor_string
```



---
## test_constructor_categorical_valid
```python
from test_constructors import test_constructor_categorical_valid
```



---
## test_generic_errors
```python
from test_constructors import test_generic_errors
```

override the base class implementation since errors are handled
differently; checks unnecessary since caught at the Interval level

---
## get_kwargs_from_breaks
```python
from test_constructors import get_kwargs_from_breaks
```

converts intervals in breaks format to a dictionary of kwargs to
specific to the format expected by the IntervalIndex/Index constructors

---
## test_mixed_float_int
```python
from test_constructors import test_mixed_float_int
```

mixed int/float left/right results in float for both sides

---
## test_from_arrays_mismatched_datetimelike_resos
```python
from test_constructors import test_from_arrays_mismatched_datetimelike_resos
```



---
## test_length_one
```python
from test_constructors import test_length_one
```

breaks of length one produce an empty IntervalIndex

---
## test_left_right_dont_share_data
```python
from test_constructors import test_left_right_dont_share_data
```



---
## test_na_tuples
```python
from test_constructors import test_na_tuples
```



---
## klass
```python
from test_constructors import klass
```



---
## test_override_inferred_closed
```python
from test_constructors import test_override_inferred_closed
```



---
## test_index_object_dtype
```python
from test_constructors import test_index_object_dtype
```



---
## test_index_mixed_closed
```python
from test_constructors import test_index_mixed_closed
```



---
## TestPickle
```python
from test_pickle import TestPickle
```



---
## test_pickle_round_trip_closed
```python
from test_pickle import test_pickle_round_trip_closed
```



---
## range_index
```python
from test_join import range_index
```



---
## interval_index
```python
from test_join import interval_index
```



---
## test_join_overlapping_in_mi_to_same_intervalindex
```python
from test_join import test_join_overlapping_in_mi_to_same_intervalindex
```



---
## test_join_overlapping_to_multiindex_with_same_interval
```python
from test_join import test_join_overlapping_to_multiindex_with_same_interval
```



---
## test_join_overlapping_interval_to_another_intervalindex
```python
from test_join import test_join_overlapping_interval_to_another_intervalindex
```



---
## __name__
```python
from test_interval_range import __name__
```



---
## name
```python
from test_interval_range import name
```



---
## TestIntervalRange
```python
from test_interval_range import TestIntervalRange
```



---
## test_constructor_numeric
```python
from test_interval_range import test_constructor_numeric
```



---
## test_constructor_timestamp
```python
from test_interval_range import test_constructor_timestamp
```



---
## test_constructor_timedelta
```python
from test_interval_range import test_constructor_timedelta
```



---
## test_early_truncation
```python
from test_interval_range import test_early_truncation
```



---
## test_no_invalid_float_truncation
```python
from test_interval_range import test_no_invalid_float_truncation
```



---
## test_linspace_dst_transition
```python
from test_interval_range import test_linspace_dst_transition
```



---
## test_float_subtype
```python
from test_interval_range import test_float_subtype
```



---
## test_interval_range_fractional_period
```python
from test_interval_range import test_interval_range_fractional_period
```



---
## test_constructor_coverage
```python
from test_interval_range import test_constructor_coverage
```



---
## test_errors
```python
from test_interval_range import test_errors
```



---
## test_float_freq
```python
from test_interval_range import test_float_freq
```



---
## name
```python
from test_interval import name
```



---
## test_dir
```python
from test_interval import test_dir
```



---
## test_searchsorted_different_argument_classes
```python
from test_interval import test_searchsorted_different_argument_classes
```



---
## test_searchsorted_invalid_argument
```python
from test_interval import test_searchsorted_invalid_argument
```



---
## create_index
```python
from test_interval import create_index
```



---
## create_index_with_nan
```python
from test_interval import create_index_with_nan
```



---
## test_with_nans
```python
from test_interval import test_with_nans
```



---
## test_copy
```python
from test_interval import test_copy
```



---
## test_ensure_copied_data
```python
from test_interval import test_ensure_copied_data
```



---
## test_delete
```python
from test_interval import test_delete
```



---
## test_insert
```python
from test_interval import test_insert
```



---
## test_is_unique_interval
```python
from test_interval import test_is_unique_interval
```

Interval specific tests for is_unique in addition to base class tests

---
## test_monotonic
```python
from test_interval import test_monotonic
```



---
## test_is_monotonic_with_nans
```python
from test_interval import test_is_monotonic_with_nans
```



---
## test_maybe_convert_i8
```python
from test_interval import test_maybe_convert_i8
```



---
## test_maybe_convert_i8_nat
```python
from test_interval import test_maybe_convert_i8_nat
```



---
## test_maybe_convert_i8_numeric
```python
from test_interval import test_maybe_convert_i8_numeric
```



---
## test_maybe_convert_i8_numeric_identical
```python
from test_interval import test_maybe_convert_i8_numeric_identical
```



---
## test_maybe_convert_i8_errors
```python
from test_interval import test_maybe_convert_i8_errors
```



---
## test_contains_method
```python
from test_interval import test_contains_method
```



---
## test_dropna
```python
from test_interval import test_dropna
```



---
## test_non_contiguous
```python
from test_interval import test_non_contiguous
```



---
## test_isin
```python
from test_interval import test_isin
```



---
## test_comparison
```python
from test_interval import test_comparison
```



---
## test_missing_values
```python
from test_interval import test_missing_values
```



---
## test_sort_values
```python
from test_interval import test_sort_values
```



---
## test_datetime
```python
from test_interval import test_datetime
```



---
## test_append
```python
from test_interval import test_append
```



---
## test_is_non_overlapping_monotonic
```python
from test_interval import test_is_non_overlapping_monotonic
```



---
## test_is_overlapping
```python
from test_interval import test_is_overlapping
```



---
## test_to_tuples
```python
from test_interval import test_to_tuples
```



---
## test_to_tuples_na
```python
from test_interval import test_to_tuples_na
```



---
## test_nbytes
```python
from test_interval import test_nbytes
```



---
## test_set_closed_errors
```python
from test_interval import test_set_closed_errors
```



---
## test_is_all_dates
```python
from test_interval import test_is_all_dates
```



---
## TestGetItem
```python
from test_indexing import TestGetItem
```



---
## TestSliceLocs
```python
from test_indexing import TestSliceLocs
```



---
## test_getitem_2d_deprecated
```python
from test_indexing import test_getitem_2d_deprecated
```



---
## test_where
```python
from test_indexing import test_where
```



---
## test_get_loc_interval
```python
from test_indexing import test_get_loc_interval
```



---
## test_get_loc_scalar
```python
from test_indexing import test_get_loc_scalar
```



---
## test_get_loc_length_one_scalar
```python
from test_indexing import test_get_loc_length_one_scalar
```



---
## test_get_loc_length_one_interval
```python
from test_indexing import test_get_loc_length_one_interval
```



---
## test_get_loc_datetimelike_nonoverlapping
```python
from test_indexing import test_get_loc_datetimelike_nonoverlapping
```



---
## test_get_loc_datetimelike_overlapping
```python
from test_indexing import test_get_loc_datetimelike_overlapping
```



---
## test_get_loc_decreasing
```python
from test_indexing import test_get_loc_decreasing
```



---
## test_get_loc_non_scalar_errors
```python
from test_indexing import test_get_loc_non_scalar_errors
```



---
## test_get_indexer_with_nans
```python
from test_indexing import test_get_indexer_with_nans
```



---
## test_get_indexer_with_interval
```python
from test_indexing import test_get_indexer_with_interval
```



---
## test_get_indexer_with_int_and_float
```python
from test_indexing import test_get_indexer_with_int_and_float
```



---
## test_get_indexer_length_one
```python
from test_indexing import test_get_indexer_length_one
```



---
## test_get_indexer_length_one_interval
```python
from test_indexing import test_get_indexer_length_one_interval
```



---
## test_get_indexer_categorical
```python
from test_indexing import test_get_indexer_categorical
```



---
## test_get_indexer_categorical_with_nans
```python
from test_indexing import test_get_indexer_categorical_with_nans
```



---
## test_get_indexer_datetime
```python
from test_indexing import test_get_indexer_datetime
```



---
## test_get_indexer_errors
```python
from test_indexing import test_get_indexer_errors
```



---
## test_get_indexer_non_unique_with_int_and_float
```python
from test_indexing import test_get_indexer_non_unique_with_int_and_float
```



---
## test_get_indexer_non_monotonic
```python
from test_indexing import test_get_indexer_non_monotonic
```



---
## test_get_index_non_unique_non_monotonic
```python
from test_indexing import test_get_index_non_unique_non_monotonic
```



---
## test_get_indexer_multiindex_with_intervals
```python
from test_indexing import test_get_indexer_multiindex_with_intervals
```



---
## test_get_indexer_interval_index
```python
from test_indexing import test_get_indexer_interval_index
```



---
## test_get_indexer_read_only
```python
from test_indexing import test_get_indexer_read_only
```



---
## test_slice_locs_with_interval
```python
from test_indexing import test_slice_locs_with_interval
```



---
## test_slice_locs_with_ints_and_floats_succeeds
```python
from test_indexing import test_slice_locs_with_ints_and_floats_succeeds
```



---
## test_slice_locs_with_ints_and_floats_errors
```python
from test_indexing import test_slice_locs_with_ints_and_floats_errors
```



---
## test_putmask_dt64
```python
from test_indexing import test_putmask_dt64
```



---
## test_putmask_td64
```python
from test_indexing import test_putmask_td64
```



---
## test_contains_dunder
```python
from test_indexing import test_contains_dunder
```



---
## AstypeTests
```python
from test_astype import AstypeTests
```

Tests common to IntervalIndex with any subtype

---
## TestIntSubtype
```python
from test_astype import TestIntSubtype
```

Tests specific to IntervalIndex with integer-like subtype

---
## TestFloatSubtype
```python
from test_astype import TestFloatSubtype
```

Tests specific to IntervalIndex with float subtype

---
## TestDatetimelikeSubtype
```python
from test_astype import TestDatetimelikeSubtype
```

Tests specific to IntervalIndex with datetime-like subtype

---
## test_astype_idempotent
```python
from test_astype import test_astype_idempotent
```



---
## test_astype_cannot_cast
```python
from test_astype import test_astype_cannot_cast
```



---
## test_astype_invalid_dtype
```python
from test_astype import test_astype_invalid_dtype
```



---
## index
```python
from test_astype import index
```



---
## test_subtype_conversion
```python
from test_astype import test_subtype_conversion
```



---
## test_subtype_integer
```python
from test_astype import test_subtype_integer
```



---
## test_subtype_integer_errors
```python
from test_astype import test_subtype_integer_errors
```



---
## test_subtype_integer_with_non_integer_borders
```python
from test_astype import test_subtype_integer_with_non_integer_borders
```



---
## test_subtype_datetimelike
```python
from test_astype import test_subtype_datetimelike
```



---
## test_subtype_float
```python
from test_astype import test_subtype_float
```



---
## TestIntervalIndexRendering
```python
from test_formats import TestIntervalIndexRendering
```



---
## test_repr_missing
```python
from test_formats import test_repr_missing
```



---
## test_repr_floats
```python
from test_formats import test_repr_floats
```



---
## test_get_values_for_csv
```python
from test_formats import test_get_values_for_csv
```



---
## test_timestamp_with_timezone
```python
from test_formats import test_timestamp_with_timezone
```



---
## monotonic_index
```python
from test_setops import monotonic_index
```



---
## empty_index
```python
from test_setops import empty_index
```



---
## TestIntervalIndex
```python
from test_setops import TestIntervalIndex
```



---
## test_union_empty_result
```python
from test_setops import test_union_empty_result
```



---
## test_intersection_empty_result
```python
from test_setops import test_intersection_empty_result
```



---
## test_set_incompatible_types
```python
from test_setops import test_set_incompatible_types
```



---
## __name__
```python
from test_interval_tree import __name__
```



---
## skipif_32bit
```python
from test_interval_tree import skipif_32bit
```

Skip parameters in a parametrize on 32bit systems. Specifically used
here to skip leaf_size parameters related to GH 23440.

---
## dtype
```python
from test_interval_tree import dtype
```



---
## leaf_size
```python
from test_interval_tree import leaf_size
```

Fixture to specify IntervalTree leaf_size parameter; to be used with the
tree fixture.

---
## tree
```python
from test_interval_tree import tree
```



---
## TestIntervalTree
```python
from test_interval_tree import TestIntervalTree
```



---
## test_get_indexer
```python
from test_interval_tree import test_get_indexer
```



---
## test_get_indexer_overflow
```python
from test_interval_tree import test_get_indexer_overflow
```



---
## test_get_indexer_non_unique
```python
from test_interval_tree import test_get_indexer_non_unique
```



---
## test_get_indexer_non_unique_overflow
```python
from test_interval_tree import test_get_indexer_non_unique_overflow
```



---
## test_duplicates
```python
from test_interval_tree import test_duplicates
```



---
## test_get_indexer_closed
```python
from test_interval_tree import test_get_indexer_closed
```



---
## test_is_overlapping
```python
from test_interval_tree import test_is_overlapping
```



---
## test_is_overlapping_endpoints
```python
from test_interval_tree import test_is_overlapping_endpoints
```

shared endpoints are marked as overlapping

---
## test_is_overlapping_trivial
```python
from test_interval_tree import test_is_overlapping_trivial
```



---
## test_construction_overflow
```python
from test_interval_tree import test_construction_overflow
```



---
## test_inf_bound_infinite_recursion
```python
from test_interval_tree import test_inf_bound_infinite_recursion
```



---
## __name__
```python
from test_names import __name__
```



---
## check_level_names
```python
from test_names import check_level_names
```



---
## test_slice_keep_name
```python
from test_names import test_slice_keep_name
```



---
## test_index_name_retained
```python
from test_names import test_index_name_retained
```



---
## test_changing_names
```python
from test_names import test_changing_names
```



---
## test_take_preserve_name
```python
from test_names import test_take_preserve_name
```



---
## test_copy_names
```python
from test_names import test_copy_names
```



---
## test_names
```python
from test_names import test_names
```



---
## test_duplicate_level_names_access_raises
```python
from test_names import test_duplicate_level_names_access_raises
```



---
## test_get_names_from_levels
```python
from test_names import test_get_names_from_levels
```



---
## test_setting_names_from_levels_raises
```python
from test_names import test_setting_names_from_levels_raises
```



---
## test_name_mi_with_dict_like_duplicate_names
```python
from test_names import test_name_mi_with_dict_like_duplicate_names
```



---
## test_name_mi_with_dict_like
```python
from test_names import test_name_mi_with_dict_like
```



---
## test_index_name_with_dict_like_raising
```python
from test_names import test_index_name_with_dict_like_raising
```



---
## test_multiindex_name_and_level_raising
```python
from test_names import test_multiindex_name_and_level_raising
```



---
## idx
```python
from conftest import idx
```



---
## test_constructor_single_level
```python
from test_constructors import test_constructor_single_level
```



---
## test_constructor_no_levels
```python
from test_constructors import test_constructor_no_levels
```



---
## test_constructor_nonhashable_names
```python
from test_constructors import test_constructor_nonhashable_names
```



---
## test_constructor_mismatched_codes_levels
```python
from test_constructors import test_constructor_mismatched_codes_levels
```



---
## test_na_levels
```python
from test_constructors import test_na_levels
```



---
## test_copy_in_constructor
```python
from test_constructors import test_copy_in_constructor
```



---
## test_from_arrays
```python
from test_constructors import test_from_arrays
```



---
## test_from_arrays_iterator
```python
from test_constructors import test_from_arrays_iterator
```



---
## test_from_arrays_tuples
```python
from test_constructors import test_from_arrays_tuples
```



---
## test_from_arrays_index_series_period_datetimetz_and_timedelta
```python
from test_constructors import test_from_arrays_index_series_period_datetimetz_and_timedelta
```



---
## test_from_arrays_index_datetimelike_mixed
```python
from test_constructors import test_from_arrays_index_datetimelike_mixed
```



---
## test_from_arrays_index_series_categorical
```python
from test_constructors import test_from_arrays_index_series_categorical
```



---
## test_from_arrays_empty
```python
from test_constructors import test_from_arrays_empty
```



---
## test_from_arrays_invalid_input
```python
from test_constructors import test_from_arrays_invalid_input
```



---
## test_from_arrays_different_lengths
```python
from test_constructors import test_from_arrays_different_lengths
```



---
## test_from_arrays_respects_none_names
```python
from test_constructors import test_from_arrays_respects_none_names
```



---
## test_from_tuples
```python
from test_constructors import test_from_tuples
```



---
## test_from_tuples_iterator
```python
from test_constructors import test_from_tuples_iterator
```



---
## test_from_tuples_empty
```python
from test_constructors import test_from_tuples_empty
```



---
## test_from_tuples_index_values
```python
from test_constructors import test_from_tuples_index_values
```



---
## test_tuples_with_name_string
```python
from test_constructors import test_tuples_with_name_string
```



---
## test_from_tuples_with_tuple_label
```python
from test_constructors import test_from_tuples_with_tuple_label
```



---
## test_from_product_empty_zero_levels
```python
from test_constructors import test_from_product_empty_zero_levels
```



---
## test_from_product_empty_one_level
```python
from test_constructors import test_from_product_empty_one_level
```



---
## test_from_product_empty_two_levels
```python
from test_constructors import test_from_product_empty_two_levels
```



---
## test_from_product_empty_three_levels
```python
from test_constructors import test_from_product_empty_three_levels
```



---
## test_from_product_invalid_input
```python
from test_constructors import test_from_product_invalid_input
```



---
## test_from_product_datetimeindex
```python
from test_constructors import test_from_product_datetimeindex
```



---
## test_from_product_rangeindex
```python
from test_constructors import test_from_product_rangeindex
```



---
## test_from_product_index_series_categorical
```python
from test_constructors import test_from_product_index_series_categorical
```



---
## test_from_product
```python
from test_constructors import test_from_product
```



---
## test_from_product_iterator
```python
from test_constructors import test_from_product_iterator
```



---
## test_from_product_infer_names
```python
from test_constructors import test_from_product_infer_names
```



---
## test_from_product_respects_none_names
```python
from test_constructors import test_from_product_respects_none_names
```



---
## test_from_product_readonly
```python
from test_constructors import test_from_product_readonly
```



---
## test_create_index_existing_name
```python
from test_constructors import test_create_index_existing_name
```



---
## test_from_frame
```python
from test_constructors import test_from_frame
```



---
## test_from_frame_missing_values_multiIndex
```python
from test_constructors import test_from_frame_missing_values_multiIndex
```



---
## test_from_frame_error
```python
from test_constructors import test_from_frame_error
```



---
## test_from_frame_dtype_fidelity
```python
from test_constructors import test_from_frame_dtype_fidelity
```



---
## test_from_frame_valid_names
```python
from test_constructors import test_from_frame_valid_names
```



---
## test_from_frame_invalid_names
```python
from test_constructors import test_from_frame_invalid_names
```



---
## test_index_equal_empty_iterable
```python
from test_constructors import test_index_equal_empty_iterable
```



---
## test_raise_invalid_sortorder
```python
from test_constructors import test_raise_invalid_sortorder
```



---
## test_datetimeindex
```python
from test_constructors import test_datetimeindex
```



---
## test_constructor_with_tz
```python
from test_constructors import test_constructor_with_tz
```



---
## test_multiindex_inference_consistency
```python
from test_constructors import test_multiindex_inference_consistency
```



---
## test_dtype_representation
```python
from test_constructors import test_dtype_representation
```



---
## test_fillna
```python
from test_missing import test_fillna
```



---
## test_dropna
```python
from test_missing import test_dropna
```



---
## test_nulls
```python
from test_missing import test_nulls
```



---
## test_hasnans_isnans
```python
from test_missing import test_hasnans_isnans
```



---
## test_nan_stays_float
```python
from test_missing import test_nan_stays_float
```



---
## test_tuples_have_na
```python
from test_missing import test_tuples_have_na
```



---
## test_pickle_compat_construction
```python
from test_pickle import test_pickle_compat_construction
```



---
## test_sortlevel
```python
from test_sorting import test_sortlevel
```



---
## test_sortlevel_not_sort_remaining
```python
from test_sorting import test_sortlevel_not_sort_remaining
```



---
## test_sortlevel_deterministic
```python
from test_sorting import test_sortlevel_deterministic
```



---
## test_sortlevel_na_position
```python
from test_sorting import test_sortlevel_na_position
```



---
## test_unsortedindex
```python
from test_sorting import test_unsortedindex
```



---
## test_unsortedindex_doc_examples
```python
from test_sorting import test_unsortedindex_doc_examples
```



---
## test_reconstruct_sort
```python
from test_sorting import test_reconstruct_sort
```



---
## test_reconstruct_remove_unused
```python
from test_sorting import test_reconstruct_remove_unused
```



---
## test_remove_unused_levels_large
```python
from test_sorting import test_remove_unused_levels_large
```



---
## test_remove_unused_nan
```python
from test_sorting import test_remove_unused_nan
```



---
## test_remove_unused_levels_with_nan
```python
from test_sorting import test_remove_unused_levels_with_nan
```



---
## test_sort_values_nan
```python
from test_sorting import test_sort_values_nan
```



---
## test_sort_values_incomparable
```python
from test_sorting import test_sort_values_incomparable
```



---
## test_sort_values_with_na_na_position
```python
from test_sorting import test_sort_values_with_na_na_position
```



---
## test_sort_unnecessary_warning
```python
from test_sorting import test_sort_unnecessary_warning
```



---
## __name__
```python
from test_get_level_values import __name__
```



---
## TestGetLevelValues
```python
from test_get_level_values import TestGetLevelValues
```



---
## test_get_level_values
```python
from test_get_level_values import test_get_level_values
```



---
## test_get_level_values_all_na
```python
from test_get_level_values import test_get_level_values_all_na
```



---
## test_get_level_values_int_with_na
```python
from test_get_level_values import test_get_level_values_int_with_na
```



---
## test_get_level_values_na
```python
from test_get_level_values import test_get_level_values_na
```



---
## test_get_level_values_when_periods
```python
from test_get_level_values import test_get_level_values_when_periods
```



---
## test_values_loses_freq_of_underlying_index
```python
from test_get_level_values import test_values_loses_freq_of_underlying_index
```



---
## test_get_level_values_box_datetime64
```python
from test_get_level_values import test_get_level_values_box_datetime64
```



---
## test_join_level
```python
from test_join import test_join_level
```



---
## test_join_level_corner_case
```python
from test_join import test_join_level_corner_case
```



---
## test_join_multi
```python
from test_join import test_join_multi
```



---
## test_join_multi_wrong_order
```python
from test_join import test_join_multi_wrong_order
```



---
## test_join_multi_return_indexers
```python
from test_join import test_join_multi_return_indexers
```



---
## test_join_overlapping_interval_level
```python
from test_join import test_join_overlapping_interval_level
```



---
## test_join_midx_ea
```python
from test_join import test_join_midx_ea
```



---
## test_join_midx_string
```python
from test_join import test_join_midx_string
```



---
## test_join_multi_with_nan
```python
from test_join import test_join_multi_with_nan
```



---
## test_join_dtypes
```python
from test_join import test_join_dtypes
```



---
## test_join_dtypes_all_nan
```python
from test_join import test_join_dtypes_all_nan
```



---
## test_join_index_levels
```python
from test_join import test_join_index_levels
```



---
## assert_multiindex_copied
```python
from test_copy import assert_multiindex_copied
```



---
## test_shallow_copy
```python
from test_copy import test_shallow_copy
```



---
## test_view
```python
from test_copy import test_view
```



---
## test_copy_and_deepcopy
```python
from test_copy import test_copy_and_deepcopy
```



---
## test_copy_method
```python
from test_copy import test_copy_method
```



---
## test_copy_method_kwargs
```python
from test_copy import test_copy_method_kwargs
```



---
## test_copy_deep_false_retains_id
```python
from test_copy import test_copy_deep_false_retains_id
```



---
## __name__
```python
from test_integrity import __name__
```



---
## test_labels_dtypes
```python
from test_integrity import test_labels_dtypes
```



---
## test_values_boxed
```python
from test_integrity import test_values_boxed
```



---
## test_values_multiindex_datetimeindex
```python
from test_integrity import test_values_multiindex_datetimeindex
```



---
## test_values_multiindex_periodindex
```python
from test_integrity import test_values_multiindex_periodindex
```



---
## test_consistency
```python
from test_integrity import test_consistency
```



---
## test_hash_collisions
```python
from test_integrity import test_hash_collisions
```



---
## test_dims
```python
from test_integrity import test_dims
```



---
## test_take_invalid_kwargs
```python
from test_integrity import test_take_invalid_kwargs
```



---
## test_isna_behavior
```python
from test_integrity import test_isna_behavior
```



---
## test_large_multiindex_error
```python
from test_integrity import test_large_multiindex_error
```



---
## test_mi_hashtable_populated_attribute_error
```python
from test_integrity import test_mi_hashtable_populated_attribute_error
```



---
## test_can_hold_identifiers
```python
from test_integrity import test_can_hold_identifiers
```



---
## test_metadata_immutable
```python
from test_integrity import test_metadata_immutable
```



---
## test_level_setting_resets_attributes
```python
from test_integrity import test_level_setting_resets_attributes
```



---
## test_rangeindex_fallback_coercion_bug
```python
from test_integrity import test_rangeindex_fallback_coercion_bug
```



---
## test_memory_usage
```python
from test_integrity import test_memory_usage
```



---
## test_nlevels
```python
from test_integrity import test_nlevels
```



---
## test_insert2
```python
from test_reshape import test_insert2
```



---
## test_append
```python
from test_reshape import test_append
```



---
## test_append_index
```python
from test_reshape import test_append_index
```



---
## test_append_names_match
```python
from test_reshape import test_append_names_match
```



---
## test_append_names_dont_match
```python
from test_reshape import test_append_names_dont_match
```



---
## test_append_overlapping_interval_levels
```python
from test_reshape import test_append_overlapping_interval_levels
```



---
## test_insert_base
```python
from test_reshape import test_insert_base
```



---
## test_delete_base
```python
from test_reshape import test_delete_base
```



---
## test_infer_objects
```python
from test_analytics import test_infer_objects
```



---
## test_groupby
```python
from test_analytics import test_groupby
```



---
## test_truncate_multiindex
```python
from test_analytics import test_truncate_multiindex
```



---
## test_reorder_levels
```python
from test_analytics import test_reorder_levels
```



---
## test_numpy_repeat
```python
from test_analytics import test_numpy_repeat
```



---
## test_append_mixed_dtypes
```python
from test_analytics import test_append_mixed_dtypes
```



---
## test_iter
```python
from test_analytics import test_iter
```



---
## test_sub
```python
from test_analytics import test_sub
```



---
## test_map_dictlike
```python
from test_analytics import test_map_dictlike
```



---
## test_numpy_ufuncs
```python
from test_analytics import test_numpy_ufuncs
```



---
## test_numpy_type_funcs
```python
from test_analytics import test_numpy_type_funcs
```



---
## test_to_frame
```python
from test_conversion import test_to_frame
```



---
## test_to_frame_dtype_fidelity
```python
from test_conversion import test_to_frame_dtype_fidelity
```



---
## test_to_frame_resulting_column_order
```python
from test_conversion import test_to_frame_resulting_column_order
```



---
## test_to_frame_duplicate_labels
```python
from test_conversion import test_to_frame_duplicate_labels
```



---
## test_to_flat_index
```python
from test_conversion import test_to_flat_index
```



---
## test_getitem_group_select
```python
from test_indexing import test_getitem_group_select
```



---
## test_getitem_bool_index_all
```python
from test_indexing import test_getitem_bool_index_all
```



---
## test_getitem_bool_index_single
```python
from test_indexing import test_getitem_bool_index_single
```



---
## test_timestamp_multiindex_indexer
```python
from test_indexing import test_timestamp_multiindex_indexer
```



---
## test_get_slice_bound_with_missing_value
```python
from test_indexing import test_get_slice_bound_with_missing_value
```



---
## test_slice_indexer_with_missing_value
```python
from test_indexing import test_slice_indexer_with_missing_value
```



---
## test_pyint_engine
```python
from test_indexing import test_pyint_engine
```



---
## test_get_locs_reordering
```python
from test_indexing import test_get_locs_reordering
```



---
## test_get_indexer_for_multiindex_with_nans
```python
from test_indexing import test_get_indexer_for_multiindex_with_nans
```



---
## test_slice_locs_partial
```python
from test_indexing import test_slice_locs_partial
```



---
## test_slice_locs
```python
from test_indexing import test_slice_locs
```



---
## test_slice_locs_with_type_mismatch
```python
from test_indexing import test_slice_locs_with_type_mismatch
```



---
## test_slice_locs_not_sorted
```python
from test_indexing import test_slice_locs_not_sorted
```



---
## test_slice_locs_not_contained
```python
from test_indexing import test_slice_locs_not_contained
```



---
## test_slice_locs_with_missing_value
```python
from test_indexing import test_slice_locs_with_missing_value
```



---
## test_putmask_multiindex_other
```python
from test_indexing import test_putmask_multiindex_other
```



---
## test_putmask_keep_dtype
```python
from test_indexing import test_putmask_keep_dtype
```



---
## test_putmask_keep_dtype_shorter_value
```python
from test_indexing import test_putmask_keep_dtype_shorter_value
```



---
## test_get_indexer_nearest
```python
from test_indexing import test_get_indexer_nearest
```



---
## test_get_indexer_categorical_time
```python
from test_indexing import test_get_indexer_categorical_time
```



---
## test_get_indexer_with_missing_value
```python
from test_indexing import test_get_indexer_with_missing_value
```



---
## test_get_indexer_methods
```python
from test_indexing import test_get_indexer_methods
```



---
## test_get_indexer_methods_raise_for_non_monotonic
```python
from test_indexing import test_get_indexer_methods_raise_for_non_monotonic
```



---
## test_get_indexer_three_or_more_levels
```python
from test_indexing import test_get_indexer_three_or_more_levels
```



---
## test_get_indexer_crossing_levels
```python
from test_indexing import test_get_indexer_crossing_levels
```



---
## test_get_indexer_kwarg_validation
```python
from test_indexing import test_get_indexer_kwarg_validation
```



---
## test_get_indexer_nan
```python
from test_indexing import test_get_indexer_nan
```



---
## test_get_loc
```python
from test_indexing import test_get_loc
```



---
## test_get_loc_duplicates
```python
from test_indexing import test_get_loc_duplicates
```



---
## test_get_loc_level
```python
from test_indexing import test_get_loc_level
```



---
## test_get_loc_multiple_dtypes
```python
from test_indexing import test_get_loc_multiple_dtypes
```



---
## test_get_loc_implicit_cast
```python
from test_indexing import test_get_loc_implicit_cast
```



---
## test_get_loc_cast_bool
```python
from test_indexing import test_get_loc_cast_bool
```



---
## test_get_loc_nan
```python
from test_indexing import test_get_loc_nan
```



---
## test_get_loc_missing_nan
```python
from test_indexing import test_get_loc_missing_nan
```



---
## test_get_loc_with_values_including_missing_values
```python
from test_indexing import test_get_loc_with_values_including_missing_values
```



---
## test_get_loc_duplicates2
```python
from test_indexing import test_get_loc_duplicates2
```



---
## test_get_loc_past_lexsort_depth
```python
from test_indexing import test_get_loc_past_lexsort_depth
```



---
## test_multiindex_get_loc_list_raises
```python
from test_indexing import test_multiindex_get_loc_list_raises
```



---
## test_get_loc_nested_tuple_raises_keyerror
```python
from test_indexing import test_get_loc_nested_tuple_raises_keyerror
```



---
## test_where_array_like
```python
from test_indexing import test_where_array_like
```



---
## test_contains_top_level
```python
from test_indexing import test_contains_top_level
```



---
## test_contains_with_nat
```python
from test_indexing import test_contains_with_nat
```



---
## test_contains_with_missing_value
```python
from test_indexing import test_contains_with_missing_value
```



---
## test_multiindex_contains_dropped
```python
from test_indexing import test_multiindex_contains_dropped
```



---
## test_contains_td64_level
```python
from test_indexing import test_contains_td64_level
```



---
## test_large_mi_contains
```python
from test_indexing import test_large_mi_contains
```



---
## test_format
```python
from test_formats import test_format
```



---
## test_format_integer_names
```python
from test_formats import test_format_integer_names
```



---
## test_format_sparse_config
```python
from test_formats import test_format_sparse_config
```



---
## test_format_sparse_display
```python
from test_formats import test_format_sparse_display
```



---
## test_repr_with_unicode_data
```python
from test_formats import test_repr_with_unicode_data
```



---
## test_repr_roundtrip_raises
```python
from test_formats import test_repr_roundtrip_raises
```



---
## test_repr_max_seq_item_setting
```python
from test_formats import test_repr_max_seq_item_setting
```



---
## TestRepr
```python
from test_formats import TestRepr
```



---
## test_unicode_repr_issues
```python
from test_formats import test_unicode_repr_issues
```



---
## test_repr_max_seq_items_equal_to_n
```python
from test_formats import test_repr_max_seq_items_equal_to_n
```



---
## test_rjust
```python
from test_formats import test_rjust
```



---
## test_tuple_width
```python
from test_formats import test_tuple_width
```



---
## test_multiindex_long_element
```python
from test_formats import test_multiindex_long_element
```



---
## test_multiindex_symmetric_difference
```python
from test_setops import test_multiindex_symmetric_difference
```



---
## test_empty
```python
from test_setops import test_empty
```



---
## test_difference_sort_special
```python
from test_setops import test_difference_sort_special
```



---
## test_difference_sort_special_true
```python
from test_setops import test_difference_sort_special_true
```



---
## test_difference_sort_incomparable
```python
from test_setops import test_difference_sort_incomparable
```



---
## test_difference_sort_incomparable_true
```python
from test_setops import test_difference_sort_incomparable_true
```



---
## test_union_with_regular_index
```python
from test_setops import test_union_with_regular_index
```



---
## test_intersection_non_object
```python
from test_setops import test_intersection_non_object
```



---
## test_intersect_equal_sort
```python
from test_setops import test_intersect_equal_sort
```



---
## test_intersect_equal_sort_true
```python
from test_setops import test_intersect_equal_sort_true
```



---
## test_union_sort_other_empty
```python
from test_setops import test_union_sort_other_empty
```



---
## test_union_sort_other_empty_sort
```python
from test_setops import test_union_sort_other_empty_sort
```



---
## test_union_sort_other_incomparable_sort
```python
from test_setops import test_union_sort_other_incomparable_sort
```



---
## test_union_non_object_dtype_raises
```python
from test_setops import test_union_non_object_dtype_raises
```



---
## test_union_empty_self_different_names
```python
from test_setops import test_union_empty_self_different_names
```



---
## test_union_multiindex_empty_rangeindex
```python
from test_setops import test_union_multiindex_empty_rangeindex
```



---
## test_difference_keep_ea_dtypes
```python
from test_setops import test_difference_keep_ea_dtypes
```



---
## test_symmetric_difference_keeping_ea_dtype
```python
from test_setops import test_symmetric_difference_keeping_ea_dtype
```



---
## test_intersect_with_duplicates
```python
from test_setops import test_intersect_with_duplicates
```



---
## test_maybe_match_names
```python
from test_setops import test_maybe_match_names
```



---
## test_intersection_equal_different_names
```python
from test_setops import test_intersection_equal_different_names
```



---
## test_intersection_different_names
```python
from test_setops import test_intersection_different_names
```



---
## test_intersection_with_missing_values_on_both_sides
```python
from test_setops import test_intersection_with_missing_values_on_both_sides
```



---
## test_union_with_missing_values_on_both_sides
```python
from test_setops import test_union_with_missing_values_on_both_sides
```



---
## test_union_nan_got_duplicated
```python
from test_setops import test_union_nan_got_duplicated
```



---
## test_union_keep_ea_dtype
```python
from test_setops import test_union_keep_ea_dtype
```



---
## test_union_with_duplicates_keep_ea_dtype
```python
from test_setops import test_union_with_duplicates_keep_ea_dtype
```



---
## test_union_duplicates
```python
from test_setops import test_union_duplicates
```



---
## test_union_keep_dtype_precision
```python
from test_setops import test_union_keep_dtype_precision
```



---
## test_union_keep_ea_dtype_with_na
```python
from test_setops import test_union_keep_ea_dtype_with_na
```



---
## test_intersection_lexsort_depth
```python
from test_setops import test_intersection_lexsort_depth
```



---
## test_intersection_with_non_lex_sorted_categories
```python
from test_setops import test_intersection_with_non_lex_sorted_categories
```



---
## test_intersection_keep_ea_dtypes
```python
from test_setops import test_intersection_keep_ea_dtypes
```



---
## test_union_with_na_when_constructing_dataframe
```python
from test_setops import test_union_with_na_when_constructing_dataframe
```



---
## test_take_invalid_kwargs
```python
from test_take import test_take_invalid_kwargs
```



---
## __name__
```python
from test_equivalence import __name__
```



---
## test_equals
```python
from test_equivalence import test_equals
```



---
## test_equals_op
```python
from test_equivalence import test_equals_op
```



---
## test_compare_tuple
```python
from test_equivalence import test_compare_tuple
```



---
## test_compare_tuple_strs
```python
from test_equivalence import test_compare_tuple_strs
```



---
## test_equals_multi
```python
from test_equivalence import test_equals_multi
```



---
## test_identical
```python
from test_equivalence import test_identical
```



---
## test_equals_operator
```python
from test_equivalence import test_equals_operator
```



---
## test_equals_missing_values
```python
from test_equivalence import test_equals_missing_values
```



---
## test_equals_missing_values_differently_sorted
```python
from test_equivalence import test_equals_missing_values_differently_sorted
```



---
## test_is_
```python
from test_equivalence import test_is_
```



---
## test_is_all_dates
```python
from test_equivalence import test_is_all_dates
```



---
## test_is_numeric
```python
from test_equivalence import test_is_numeric
```



---
## test_multiindex_compare
```python
from test_equivalence import test_multiindex_compare
```



---
## test_equals_ea_int_regular_int
```python
from test_equivalence import test_equals_ea_int_regular_int
```



---
## __name__
```python
from test_get_set import __name__
```



---
## assert_matching
```python
from test_get_set import assert_matching
```



---
## test_get_level_number_integer
```python
from test_get_set import test_get_level_number_integer
```



---
## test_get_dtypes
```python
from test_get_set import test_get_dtypes
```



---
## test_get_dtypes_no_level_name
```python
from test_get_set import test_get_dtypes_no_level_name
```



---
## test_get_dtypes_duplicate_level_names
```python
from test_get_set import test_get_dtypes_duplicate_level_names
```



---
## test_get_level_number_out_of_bounds
```python
from test_get_set import test_get_level_number_out_of_bounds
```



---
## test_set_name_methods
```python
from test_get_set import test_set_name_methods
```



---
## test_set_levels_codes_directly
```python
from test_get_set import test_set_levels_codes_directly
```



---
## test_set_levels
```python
from test_get_set import test_set_levels
```



---
## test_set_codes
```python
from test_get_set import test_set_codes
```



---
## test_set_levels_codes_names_bad_input
```python
from test_get_set import test_set_levels_codes_names_bad_input
```



---
## test_set_names_with_nlevel_1
```python
from test_get_set import test_set_names_with_nlevel_1
```



---
## test_set_levels_categorical
```python
from test_get_set import test_set_levels_categorical
```



---
## test_set_value_keeps_names
```python
from test_get_set import test_set_value_keeps_names
```



---
## test_set_levels_with_iterable
```python
from test_get_set import test_set_levels_with_iterable
```



---
## test_set_empty_level
```python
from test_get_set import test_set_empty_level
```



---
## test_set_levels_pos_args_removal
```python
from test_get_set import test_set_levels_pos_args_removal
```



---
## test_set_levels_categorical_keep_dtype
```python
from test_get_set import test_set_levels_categorical_keep_dtype
```



---
## test_numeric_compat
```python
from test_compat import test_numeric_compat
```



---
## test_logical_compat
```python
from test_compat import test_logical_compat
```



---
## test_inplace_mutation_resets_values
```python
from test_compat import test_inplace_mutation_resets_values
```



---
## test_boxable_categorical_values
```python
from test_compat import test_boxable_categorical_values
```



---
## __name__
```python
from test_monotonic import __name__
```



---
## test_is_monotonic_increasing_lexsorted
```python
from test_monotonic import test_is_monotonic_increasing_lexsorted
```



---
## test_is_monotonic_increasing
```python
from test_monotonic import test_is_monotonic_increasing
```



---
## test_is_monotonic_decreasing
```python
from test_monotonic import test_is_monotonic_decreasing
```



---
## test_is_strictly_monotonic_increasing
```python
from test_monotonic import test_is_strictly_monotonic_increasing
```



---
## test_is_strictly_monotonic_decreasing
```python
from test_monotonic import test_is_strictly_monotonic_decreasing
```



---
## test_is_monotonic_with_nans
```python
from test_monotonic import test_is_monotonic_with_nans
```



---
## test_isin_nan
```python
from test_isin import test_isin_nan
```



---
## test_isin_missing
```python
from test_isin import test_isin_missing
```



---
## test_isin_level_kwarg
```python
from test_isin import test_isin_level_kwarg
```



---
## test_isin_multi_index_with_missing_value
```python
from test_isin import test_isin_multi_index_with_missing_value
```



---
## test_isin_generator
```python
from test_isin import test_isin_generator
```



---
## test_droplevel_with_names
```python
from test_drop import test_droplevel_with_names
```



---
## test_droplevel_list
```python
from test_drop import test_droplevel_list
```



---
## test_drop_not_lexsorted
```python
from test_drop import test_drop_not_lexsorted
```



---
## test_drop_with_nan_in_index
```python
from test_drop import test_drop_with_nan_in_index
```



---
## test_drop_with_non_monotonic_duplicates
```python
from test_drop import test_drop_with_non_monotonic_duplicates
```



---
## test_single_level_drop_partially_missing_elements
```python
from test_drop import test_single_level_drop_partially_missing_elements
```



---
## test_droplevel_multiindex_one_level
```python
from test_drop import test_droplevel_multiindex_one_level
```



---
## __name__
```python
from test_duplicates import __name__
```



---
## idx_dup
```python
from test_duplicates import idx_dup
```



---
## test_unique
```python
from test_duplicates import test_unique
```



---
## test_unique_datetimelike
```python
from test_duplicates import test_unique_datetimelike
```



---
## test_unique_level
```python
from test_duplicates import test_unique_level
```



---
## test_duplicate_multiindex_codes
```python
from test_duplicates import test_duplicate_multiindex_codes
```



---
## test_duplicate_level_names
```python
from test_duplicates import test_duplicate_level_names
```



---
## test_duplicate_meta_data
```python
from test_duplicates import test_duplicate_meta_data
```



---
## test_has_duplicates
```python
from test_duplicates import test_has_duplicates
```



---
## test_has_duplicates_from_tuples
```python
from test_duplicates import test_has_duplicates_from_tuples
```



---
## test_has_duplicates_overflow
```python
from test_duplicates import test_has_duplicates_overflow
```



---
## test_duplicated
```python
from test_duplicates import test_duplicated
```



---
## test_duplicated_hashtable_impl
```python
from test_duplicates import test_duplicated_hashtable_impl
```



---
## test_duplicated_with_nan
```python
from test_duplicates import test_duplicated_with_nan
```



---
## test_duplicated_with_nan_multi_shape
```python
from test_duplicates import test_duplicated_with_nan_multi_shape
```



---
## test_duplicated_drop_duplicates
```python
from test_duplicates import test_duplicated_drop_duplicates
```



---
## test_duplicated_series_complex_numbers
```python
from test_duplicates import test_duplicated_series_complex_numbers
```



---
## test_midx_unique_ea_dtype
```python
from test_duplicates import test_midx_unique_ea_dtype
```



---
## f
```python
from test_duplicates import f
```



---
## __name__
```python
from test_partial_indexing import __name__
```



---
## df
```python
from test_partial_indexing import df
```



---
## test_partial_string_matching_single_index
```python
from test_partial_indexing import test_partial_string_matching_single_index
```



---
## test_get_loc_partial_timestamp_multiindex
```python
from test_partial_indexing import test_get_loc_partial_timestamp_multiindex
```



---
## test_partial_string_timestamp_multiindex
```python
from test_partial_indexing import test_partial_string_timestamp_multiindex
```



---
## test_partial_string_timestamp_multiindex_str_key_raises
```python
from test_partial_indexing import test_partial_string_timestamp_multiindex_str_key_raises
```



---
## test_partial_string_timestamp_multiindex_daily_resolution
```python
from test_partial_indexing import test_partial_string_timestamp_multiindex_daily_resolution
```



---
## __name__
```python
from test_lexsort import __name__
```



---
## TestIsLexsorted
```python
from test_lexsort import TestIsLexsorted
```



---
## TestLexsortDepth
```python
from test_lexsort import TestLexsortDepth
```



---
## test_is_lexsorted
```python
from test_lexsort import test_is_lexsorted
```



---
## test_lexsort_depth
```python
from test_lexsort import test_lexsort_depth
```



---
## test_reindex_level
```python
from test_reindex import test_reindex_level
```



---
## test_reindex_preserves_names_when_target_is_list_or_ndarray
```python
from test_reindex import test_reindex_preserves_names_when_target_is_list_or_ndarray
```



---
## test_reindex_lvl_preserves_names_when_target_is_list_or_array
```python
from test_reindex import test_reindex_lvl_preserves_names_when_target_is_list_or_array
```



---
## test_reindex_lvl_preserves_type_if_target_is_empty_list_or_array
```python
from test_reindex import test_reindex_lvl_preserves_type_if_target_is_empty_list_or_array
```



---
## test_reindex_base
```python
from test_reindex import test_reindex_base
```



---
## test_reindex_non_unique
```python
from test_reindex import test_reindex_non_unique
```



---
## test_reindex_not_all_tuples
```python
from test_reindex import test_reindex_not_all_tuples
```



---
## test_reindex_limit_arg_with_multiindex
```python
from test_reindex import test_reindex_limit_arg_with_multiindex
```



---
## test_reindex_with_none_in_nested_multiindex
```python
from test_reindex import test_reindex_with_none_in_nested_multiindex
```



---
## TestResolution
```python
from test_resolution import TestResolution
```



---
## test_resolution
```python
from test_resolution import test_resolution
```



---
## TestPeriodIndex
```python
from test_period import TestPeriodIndex
```



---
## test_maybe_convert_timedelta
```python
from test_period import test_maybe_convert_timedelta
```



---
## test_dunder_array
```python
from test_period import test_dunder_array
```



---
## test_view_asi8
```python
from test_period import test_view_asi8
```



---
## test_values
```python
from test_period import test_values
```



---
## test_fields
```python
from test_period import test_fields
```



---
## test_is_
```python
from test_period import test_is_
```



---
## test_index_unique
```python
from test_period import test_index_unique
```



---
## test_pindex_fieldaccessor_nat
```python
from test_period import test_pindex_fieldaccessor_nat
```



---
## test_pindex_multiples
```python
from test_period import test_pindex_multiples
```



---
## test_iteration
```python
from test_period import test_iteration
```



---
## test_with_multi_index
```python
from test_period import test_with_multi_index
```



---
## TestSearchsorted
```python
from test_searchsorted import TestSearchsorted
```



---
## test_searchsorted_different_argument_classes
```python
from test_searchsorted import test_searchsorted_different_argument_classes
```



---
## test_searchsorted_invalid
```python
from test_searchsorted import test_searchsorted_invalid
```



---
## __name__
```python
from test_freq_attr import __name__
```



---
## TestFreq
```python
from test_freq_attr import TestFreq
```



---
## test_freq_setter_deprecated
```python
from test_freq_attr import test_freq_setter_deprecated
```



---
## TestPeriodIndexDisallowedFreqs
```python
from test_constructors import TestPeriodIndexDisallowedFreqs
```



---
## TestPeriodIndex
```python
from test_constructors import TestPeriodIndex
```



---
## TestSimpleNew
```python
from test_constructors import TestSimpleNew
```



---
## TestShallowCopy
```python
from test_constructors import TestShallowCopy
```



---
## TestSeriesPeriod
```python
from test_constructors import TestSeriesPeriod
```



---
## test_period_index_offsets_frequency_error_message
```python
from test_constructors import test_period_index_offsets_frequency_error_message
```



---
## test_period_index_frequency_invalid_freq
```python
from test_constructors import test_period_index_frequency_invalid_freq
```



---
## test_period_index_from_datetime_index_invalid_freq
```python
from test_constructors import test_period_index_from_datetime_index_invalid_freq
```



---
## test_from_ordinals
```python
from test_constructors import test_from_ordinals
```



---
## test_keyword_mismatch
```python
from test_constructors import test_keyword_mismatch
```



---
## test_construction_base_constructor
```python
from test_constructors import test_construction_base_constructor
```



---
## test_base_constructor_with_period_dtype
```python
from test_constructors import test_base_constructor_with_period_dtype
```



---
## test_constructor_use_start_freq
```python
from test_constructors import test_constructor_use_start_freq
```



---
## test_constructor_field_arrays
```python
from test_constructors import test_constructor_field_arrays
```



---
## test_constructor_nano
```python
from test_constructors import test_constructor_nano
```



---
## test_constructor_arrays_negative_year
```python
from test_constructors import test_constructor_arrays_negative_year
```



---
## test_constructor_invalid_quarters
```python
from test_constructors import test_constructor_invalid_quarters
```



---
## test_period_range_fractional_period
```python
from test_constructors import test_period_range_fractional_period
```



---
## test_constructor_with_without_freq
```python
from test_constructors import test_constructor_with_without_freq
```



---
## test_constructor_fromarraylike
```python
from test_constructors import test_constructor_fromarraylike
```



---
## test_constructor_datetime64arr
```python
from test_constructors import test_constructor_datetime64arr
```



---
## test_constructor_datetime64arr_ok
```python
from test_constructors import test_constructor_datetime64arr_ok
```



---
## test_constructor_pi_nat
```python
from test_constructors import test_constructor_pi_nat
```



---
## test_constructor_incompat_freq
```python
from test_constructors import test_constructor_incompat_freq
```



---
## test_constructor_floats
```python
from test_constructors import test_constructor_floats
```



---
## test_constructor_year_and_quarter
```python
from test_constructors import test_constructor_year_and_quarter
```



---
## test_constructor_freq_mult
```python
from test_constructors import test_constructor_freq_mult
```



---
## test_constructor_freq_mult_dti_compat
```python
from test_constructors import test_constructor_freq_mult_dti_compat
```



---
## test_constructor_freq_mult_dti_compat_month
```python
from test_constructors import test_constructor_freq_mult_dti_compat_month
```



---
## test_constructor_freq_combined
```python
from test_constructors import test_constructor_freq_combined
```



---
## test_period_range_length
```python
from test_constructors import test_period_range_length
```



---
## test_infer_freq_from_first_element
```python
from test_constructors import test_infer_freq_from_first_element
```



---
## test_mixed_freq_raises
```python
from test_constructors import test_mixed_freq_raises
```



---
## test_recreate_from_data
```python
from test_constructors import test_recreate_from_data
```



---
## test_map_with_string_constructor
```python
from test_constructors import test_map_with_string_constructor
```



---
## test_constructor_simple_new
```python
from test_constructors import test_constructor_simple_new
```



---
## test_constructor_simple_new_empty
```python
from test_constructors import test_constructor_simple_new_empty
```



---
## test_period_index_simple_new_disallows_floats
```python
from test_constructors import test_period_index_simple_new_disallows_floats
```



---
## test_shallow_copy_empty
```python
from test_constructors import test_shallow_copy_empty
```



---
## test_shallow_copy_disallow_i8
```python
from test_constructors import test_shallow_copy_disallow_i8
```



---
## test_shallow_copy_requires_disallow_period_index
```python
from test_constructors import test_shallow_copy_requires_disallow_period_index
```



---
## test_constructor_cant_cast_period
```python
from test_constructors import test_constructor_cant_cast_period
```



---
## test_pickle_round_trip
```python
from test_pickle import test_pickle_round_trip
```



---
## test_pickle_freq
```python
from test_pickle import test_pickle_freq
```



---
## test_join_outer_indexer
```python
from test_join import test_join_outer_indexer
```



---
## test_joins
```python
from test_join import test_joins
```



---
## test_join_does_not_recur
```python
from test_join import test_join_does_not_recur
```



---
## test_join_mismatched_freq_raises
```python
from test_join import test_join_mismatched_freq_raises
```



---
## __name__
```python
from test_scalar_compat import __name__
```

Tests for TimedeltaIndex methods behaving like their Timedelta counterparts

---
## TestPeriodIndexOps
```python
from test_scalar_compat import TestPeriodIndexOps
```



---
## test_start_time
```python
from test_scalar_compat import test_start_time
```



---
## test_end_time
```python
from test_scalar_compat import test_end_time
```



---
## test_end_time_business_friday
```python
from test_scalar_compat import test_end_time_business_friday
```



---
## non_comparable_idx
```python
from test_indexing import non_comparable_idx
```



---
## TestGetValue
```python
from test_indexing import TestGetValue
```



---
## TestAsOfLocs
```python
from test_indexing import TestAsOfLocs
```



---
## test_getitem_slice_keeps_name
```python
from test_indexing import test_getitem_slice_keeps_name
```



---
## test_getitem_index
```python
from test_indexing import test_getitem_index
```



---
## test_getitem_partial
```python
from test_indexing import test_getitem_partial
```



---
## test_getitem_datetime
```python
from test_indexing import test_getitem_datetime
```



---
## test_getitem_nat
```python
from test_indexing import test_getitem_nat
```



---
## test_getitem_list_periods
```python
from test_indexing import test_getitem_list_periods
```



---
## test_getitem_seconds
```python
from test_indexing import test_getitem_seconds
```



---
## test_getitem_day
```python
from test_indexing import test_getitem_day
```



---
## test_get_loc_msg
```python
from test_indexing import test_get_loc_msg
```



---
## test_get_loc_nat
```python
from test_indexing import test_get_loc_nat
```



---
## test_get_loc_integer
```python
from test_indexing import test_get_loc_integer
```



---
## test_get_loc_invalid_string_raises_keyerror
```python
from test_indexing import test_get_loc_invalid_string_raises_keyerror
```



---
## test_get_loc_mismatched_freq
```python
from test_indexing import test_get_loc_mismatched_freq
```



---
## test_get_indexer_mismatched_dtype
```python
from test_indexing import test_get_indexer_mismatched_dtype
```



---
## test_get_indexer_mismatched_dtype_different_length
```python
from test_indexing import test_get_indexer_mismatched_dtype_different_length
```



---
## test_get_indexer_mismatched_dtype_with_method
```python
from test_indexing import test_get_indexer_mismatched_dtype_with_method
```



---
## test_get_indexer2
```python
from test_indexing import test_get_indexer2
```



---
## test_where_other
```python
from test_indexing import test_where_other
```



---
## test_where_invalid_dtypes
```python
from test_indexing import test_where_invalid_dtypes
```



---
## test_where_mismatched_nat
```python
from test_indexing import test_where_mismatched_nat
```



---
## test_take_misc
```python
from test_indexing import test_take_misc
```



---
## test_get_value_datetime_hourly
```python
from test_indexing import test_get_value_datetime_hourly
```



---
## test_contains_freq_mismatch
```python
from test_indexing import test_contains_freq_mismatch
```



---
## test_contains_nat
```python
from test_indexing import test_contains_nat
```



---
## test_asof_locs_mismatched_type
```python
from test_indexing import test_asof_locs_mismatched_type
```



---
## get_local_am_pm
```python
from test_formats import get_local_am_pm
```

Return the AM and PM strings returned by strftime in current locale.

---
## TestPeriodIndexRendering
```python
from test_formats import TestPeriodIndexRendering
```



---
## TestPeriodIndexFormat
```python
from test_formats import TestPeriodIndexFormat
```



---
## test_format_empty
```python
from test_formats import test_format_empty
```



---
## test_representation
```python
from test_formats import test_representation
```



---
## test_representation_to_series
```python
from test_formats import test_representation_to_series
```



---
## test_summary
```python
from test_formats import test_summary
```



---
## test_period_format_and_strftime_default
```python
from test_formats import test_period_format_and_strftime_default
```



---
## test_period_custom
```python
from test_formats import test_period_custom
```



---
## test_period_tz
```python
from test_formats import test_period_tz
```



---
## test_period_non_ascii_fmt
```python
from test_formats import test_period_non_ascii_fmt
```



---
## test_period_custom_locale_directive
```python
from test_formats import test_period_custom_locale_directive
```



---
## _permute
```python
from test_setops import _permute
```



---
## TestPeriodIndex
```python
from test_setops import TestPeriodIndex
```



---
## test_union_misc
```python
from test_setops import test_union_misc
```



---
## test_intersection_cases
```python
from test_setops import test_intersection_cases
```



---
## test_difference_freq
```python
from test_setops import test_difference_freq
```



---
## test_intersection_equal_duplicates
```python
from test_setops import test_intersection_equal_duplicates
```



---
## __name__
```python
from test_partial_slicing import __name__
```

test partial slicing on Series/Frame 

---
## TestPeriodIndex
```python
from test_partial_slicing import TestPeriodIndex
```



---
## test_getitem_periodindex_duplicates_string_slice
```python
from test_partial_slicing import test_getitem_periodindex_duplicates_string_slice
```



---
## test_getitem_periodindex_quarter_string
```python
from test_partial_slicing import test_getitem_periodindex_quarter_string
```



---
## test_pindex_slice_index
```python
from test_partial_slicing import test_pindex_slice_index
```



---
## test_range_slice_day
```python
from test_partial_slicing import test_range_slice_day
```



---
## test_range_slice_seconds
```python
from test_partial_slicing import test_range_slice_seconds
```



---
## test_range_slice_outofbounds
```python
from test_partial_slicing import test_range_slice_outofbounds
```



---
## test_maybe_cast_slice_bound
```python
from test_partial_slicing import test_maybe_cast_slice_bound
```



---
## test_partial_slice_doesnt_require_monotonicity
```python
from test_partial_slicing import test_partial_slice_doesnt_require_monotonicity
```



---
## TestPeriodRepresentation
```python
from test_tools import TestPeriodRepresentation
```

Wish to match NumPy units

---
## TestPeriodIndexConversion
```python
from test_tools import TestPeriodIndexConversion
```



---
## test_freq
```python
from test_tools import test_freq
```



---
## test_tolist
```python
from test_tools import test_tolist
```



---
## __name__
```python
from test_period_range import __name__
```



---
## TestPeriodRangeKeywords
```python
from test_period_range import TestPeriodRangeKeywords
```



---
## TestPeriodRange
```python
from test_period_range import TestPeriodRange
```



---
## TestPeriodRangeDisallowedFreqs
```python
from test_period_range import TestPeriodRangeDisallowedFreqs
```



---
## test_required_arguments
```python
from test_period_range import test_required_arguments
```



---
## test_required_arguments2
```python
from test_period_range import test_required_arguments2
```



---
## test_required_arguments3
```python
from test_period_range import test_required_arguments3
```



---
## test_required_arguments_too_many
```python
from test_period_range import test_required_arguments_too_many
```



---
## test_start_end_non_nat
```python
from test_period_range import test_start_end_non_nat
```



---
## test_periods_requires_integer
```python
from test_period_range import test_periods_requires_integer
```



---
## test_construction_from_string
```python
from test_period_range import test_construction_from_string
```



---
## test_construction_from_string_monthly
```python
from test_period_range import test_construction_from_string_monthly
```



---
## test_construction_from_period
```python
from test_period_range import test_construction_from_period
```



---
## test_mismatched_start_end_freq_raises
```python
from test_period_range import test_mismatched_start_end_freq_raises
```



---
## test_constructor_U
```python
from test_period_range import test_constructor_U
```



---
## test_a_deprecated_from_time_series
```python
from test_period_range import test_a_deprecated_from_time_series
```



---
## test_uppercase_freq_deprecated_from_time_series
```python
from test_period_range import test_uppercase_freq_deprecated_from_time_series
```



---
## test_lowercase_freq_deprecated_from_time_series
```python
from test_period_range import test_lowercase_freq_deprecated_from_time_series
```



---
## TestCategoricalIndexConstructors
```python
from test_constructors import TestCategoricalIndexConstructors
```



---
## test_construction_disallows_scalar
```python
from test_constructors import test_construction_disallows_scalar
```



---
## test_construction_with_dtype
```python
from test_constructors import test_construction_with_dtype
```



---
## test_construction_empty_with_bool_categories
```python
from test_constructors import test_construction_empty_with_bool_categories
```



---
## test_construction_with_categorical_dtype
```python
from test_constructors import test_construction_with_categorical_dtype
```



---
## ci
```python
from test_append import ci
```



---
## test_append_mismatched_categories
```python
from test_append import test_append_mismatched_categories
```



---
## test_append_category_objects
```python
from test_append import test_append_category_objects
```



---
## test_append_non_categories
```python
from test_append import test_append_non_categories
```



---
## test_append_object
```python
from test_append import test_append_object
```



---
## test_append_to_another
```python
from test_append import test_append_to_another
```



---
## test_equals_categorical
```python
from test_equals import test_equals_categorical
```



---
## test_equals_categorical_unordered
```python
from test_equals import test_equals_categorical_unordered
```



---
## test_equals_non_category
```python
from test_equals import test_equals_non_category
```



---
## test_equals_multiindex
```python
from test_equals import test_equals_multiindex
```



---
## test_equals_string_dtype
```python
from test_equals import test_equals_string_dtype
```



---
## test_take_fill_value_datetime
```python
from test_indexing import test_take_fill_value_datetime
```



---
## test_get_loc_unique
```python
from test_indexing import test_get_loc_unique
```



---
## test_get_loc_monotonic_nonunique
```python
from test_indexing import test_get_loc_monotonic_nonunique
```



---
## test_get_loc_nonmonotonic_nonunique
```python
from test_indexing import test_get_loc_nonmonotonic_nonunique
```



---
## test_get_indexer_requires_unique
```python
from test_indexing import test_get_indexer_requires_unique
```



---
## test_get_indexer_method
```python
from test_indexing import test_get_indexer_method
```



---
## test_get_indexer_array
```python
from test_indexing import test_get_indexer_array
```



---
## test_get_indexer_same_categories_same_order
```python
from test_indexing import test_get_indexer_same_categories_same_order
```



---
## test_get_indexer_same_categories_different_order
```python
from test_indexing import test_get_indexer_same_categories_different_order
```



---
## test_get_indexer_nans_in_index_and_target
```python
from test_indexing import test_get_indexer_nans_in_index_and_target
```



---
## test_where_non_categories
```python
from test_indexing import test_where_non_categories
```



---
## test_contains_nan
```python
from test_indexing import test_contains_nan
```



---
## test_contains_na_dtype
```python
from test_indexing import test_contains_na_dtype
```



---
## test_categorical_date_roundtrip
```python
from test_astype import test_categorical_date_roundtrip
```



---
## TestCategoricalIndexRepr
```python
from test_formats import TestCategoricalIndexRepr
```



---
## test_string_categorical_index_repr
```python
from test_formats import test_string_categorical_index_repr
```



---
## test_difference_with_na
```python
from test_setops import test_difference_with_na
```



---
## TestCategoricalIndex
```python
from test_category import TestCategoricalIndex
```



---
## TestCategoricalIndex2
```python
from test_category import TestCategoricalIndex2
```



---
## simple_index
```python
from test_category import simple_index
```



---
## test_can_hold_identifiers
```python
from test_category import test_can_hold_identifiers
```



---
## test_insert
```python
from test_category import test_insert
```



---
## test_insert_na_mismatched_dtype
```python
from test_category import test_insert_na_mismatched_dtype
```



---
## test_delete
```python
from test_category import test_delete
```



---
## test_is_monotonic
```python
from test_category import test_is_monotonic
```



---
## test_has_duplicates
```python
from test_category import test_has_duplicates
```



---
## test_drop_duplicates
```python
from test_category import test_drop_duplicates
```



---
## test_unique
```python
from test_category import test_unique
```



---
## test_repr_roundtrip
```python
from test_category import test_repr_roundtrip
```



---
## test_isin
```python
from test_category import test_isin
```



---
## test_isin_overlapping_intervals
```python
from test_category import test_isin_overlapping_intervals
```



---
## test_identical
```python
from test_category import test_identical
```



---
## test_ensure_copied_data
```python
from test_category import test_ensure_copied_data
```



---
## test_view_i8
```python
from test_category import test_view_i8
```



---
## test_engine_type
```python
from test_category import test_engine_type
```



---
## test_disallow_addsub_ops
```python
from test_category import test_disallow_addsub_ops
```



---
## test_method_delegation
```python
from test_category import test_method_delegation
```



---
## test_remove_maintains_order
```python
from test_category import test_remove_maintains_order
```



---
## test_fillna_copies_with_no_nas
```python
from test_fillna import test_fillna_copies_with_no_nas
```



---
## test_fillna_validates_with_no_nas
```python
from test_fillna import test_fillna_validates_with_no_nas
```



---
## test_map_with_categorical_series
```python
from test_map import test_map_with_categorical_series
```



---
## TestReindex
```python
from test_reindex import TestReindex
```



---
## test_reindex_list_non_unique
```python
from test_reindex import test_reindex_list_non_unique
```



---
## test_reindex_categorical_non_unique
```python
from test_reindex import test_reindex_categorical_non_unique
```



---
## test_reindex_list_non_unique_unused_category
```python
from test_reindex import test_reindex_list_non_unique_unused_category
```



---
## test_reindex_categorical_non_unique_unused_category
```python
from test_reindex import test_reindex_categorical_non_unique_unused_category
```



---
## test_reindex_duplicate_target
```python
from test_reindex import test_reindex_duplicate_target
```



---
## test_reindex_empty_index
```python
from test_reindex import test_reindex_empty_index
```



---
## test_reindex_categorical_added_category
```python
from test_reindex import test_reindex_categorical_added_category
```



---
## TestJoinInt64Index
```python
from test_join import TestJoinInt64Index
```



---
## TestJoinUInt64Index
```python
from test_join import TestJoinUInt64Index
```



---
## index_large
```python
from test_join import index_large
```



---
## index_large
```python
from test_indexing import index_large
```



---
## test_get_loc_raises_bad_label
```python
from test_indexing import test_get_loc_raises_bad_label
```



---
## test_get_loc_float64
```python
from test_indexing import test_get_loc_float64
```



---
## test_get_loc_na
```python
from test_indexing import test_get_loc_na
```



---
## test_get_loc_float_index_nan_with_method
```python
from test_indexing import test_get_loc_float_index_nan_with_method
```



---
## test_get_loc_numericindex_none_raises
```python
from test_indexing import test_get_loc_numericindex_none_raises
```



---
## test_get_loc_overflows
```python
from test_indexing import test_get_loc_overflows
```



---
## test_get_indexer_invalid
```python
from test_indexing import test_get_indexer_invalid
```



---
## test_get_indexer_nearest_listlike_tolerance
```python
from test_indexing import test_get_indexer_nearest_listlike_tolerance
```



---
## test_get_indexer_nearest_error
```python
from test_indexing import test_get_indexer_nearest_error
```



---
## test_get_indexer_nearest_decreasing
```python
from test_indexing import test_get_indexer_nearest_decreasing
```



---
## test_get_indexer_numeric_index_boolean_target
```python
from test_indexing import test_get_indexer_numeric_index_boolean_target
```



---
## test_get_indexer_with_method_numeric_vs_bool
```python
from test_indexing import test_get_indexer_with_method_numeric_vs_bool
```



---
## test_get_indexer_numeric_vs_bool
```python
from test_indexing import test_get_indexer_numeric_vs_bool
```



---
## test_get_indexer_float64
```python
from test_indexing import test_get_indexer_float64
```



---
## test_get_indexer_int64
```python
from test_indexing import test_get_indexer_int64
```



---
## test_get_indexer_uint64
```python
from test_indexing import test_get_indexer_uint64
```



---
## test_get_loc_masked
```python
from test_indexing import test_get_loc_masked
```



---
## test_get_loc_masked_na
```python
from test_indexing import test_get_loc_masked_na
```



---
## test_get_loc_masked_na_and_nan
```python
from test_indexing import test_get_loc_masked_na_and_nan
```



---
## test_get_indexer_masked_na
```python
from test_indexing import test_get_indexer_masked_na
```



---
## test_get_indexer_masked_na_boolean
```python
from test_indexing import test_get_indexer_masked_na_boolean
```



---
## test_get_indexer_arrow_dictionary_target
```python
from test_indexing import test_get_indexer_arrow_dictionary_target
```



---
## test_where_uint64
```python
from test_indexing import test_where_uint64
```



---
## test_where_infers_type_instead_of_trying_to_convert_string_to_float
```python
from test_indexing import test_where_infers_type_instead_of_trying_to_convert_string_to_float
```



---
## test_take_fill_value_float64
```python
from test_indexing import test_take_fill_value_float64
```



---
## test_take_fill_value_ints
```python
from test_indexing import test_take_fill_value_ints
```



---
## test_contains_none
```python
from test_indexing import test_contains_none
```



---
## test_contains_float64_nans
```python
from test_indexing import test_contains_float64_nans
```



---
## test_contains_float64_not_nans
```python
from test_indexing import test_contains_float64_not_nans
```



---
## test_slice_locs_float_locs
```python
from test_indexing import test_slice_locs_float_locs
```



---
## test_slice_locs_dup_numeric
```python
from test_indexing import test_slice_locs_dup_numeric
```



---
## test_slice_locs_na
```python
from test_indexing import test_slice_locs_na
```



---
## test_slice_locs_na_raises
```python
from test_indexing import test_slice_locs_na_raises
```



---
## TestFloatNumericIndex
```python
from test_numeric import TestFloatNumericIndex
```



---
## TestNumericInt
```python
from test_numeric import TestNumericInt
```



---
## TestIntNumericIndex
```python
from test_numeric import TestIntNumericIndex
```



---
## TestFloat16Index
```python
from test_numeric import TestFloat16Index
```



---
## test_uint_index_does_not_convert_to_float64
```python
from test_numeric import test_uint_index_does_not_convert_to_float64
```



---
## test_float64_index_equals
```python
from test_numeric import test_float64_index_equals
```



---
## test_map_dtype_inference_unsigned_to_signed
```python
from test_numeric import test_map_dtype_inference_unsigned_to_signed
```



---
## test_map_dtype_inference_overflows
```python
from test_numeric import test_map_dtype_inference_overflows
```



---
## test_view_to_datetimelike
```python
from test_numeric import test_view_to_datetimelike
```



---
## dtype
```python
from test_numeric import dtype
```



---
## simple_index
```python
from test_numeric import simple_index
```



---
## index
```python
from test_numeric import index
```



---
## mixed_index
```python
from test_numeric import mixed_index
```



---
## float_index
```python
from test_numeric import float_index
```



---
## test_repr_roundtrip
```python
from test_numeric import test_repr_roundtrip
```



---
## check_coerce
```python
from test_numeric import check_coerce
```



---
## test_constructor_from_list_no_dtype
```python
from test_numeric import test_constructor_from_list_no_dtype
```



---
## test_constructor
```python
from test_numeric import test_constructor
```



---
## test_constructor_invalid
```python
from test_numeric import test_constructor_invalid
```



---
## test_constructor_coerce
```python
from test_numeric import test_constructor_coerce
```



---
## test_constructor_explicit
```python
from test_numeric import test_constructor_explicit
```



---
## test_type_coercion_fail
```python
from test_numeric import test_type_coercion_fail
```



---
## test_equals_numeric
```python
from test_numeric import test_equals_numeric
```



---
## test_equals_numeric_other_index_type
```python
from test_numeric import test_equals_numeric_other_index_type
```



---
## test_lookups_datetimelike_values
```python
from test_numeric import test_lookups_datetimelike_values
```



---
## test_doesnt_contain_all_the_things
```python
from test_numeric import test_doesnt_contain_all_the_things
```



---
## test_nan_multiple_containment
```python
from test_numeric import test_nan_multiple_containment
```



---
## test_fillna_float64
```python
from test_numeric import test_fillna_float64
```



---
## test_logical_compat
```python
from test_numeric import test_logical_compat
```



---
## test_is_monotonic
```python
from test_numeric import test_is_monotonic
```



---
## test_is_strictly_monotonic
```python
from test_numeric import test_is_strictly_monotonic
```



---
## test_identical
```python
from test_numeric import test_identical
```



---
## test_cant_or_shouldnt_cast
```python
from test_numeric import test_cant_or_shouldnt_cast
```



---
## test_view_index
```python
from test_numeric import test_view_index
```



---
## test_prevent_casting
```python
from test_numeric import test_prevent_casting
```



---
## test_constructor_corner
```python
from test_numeric import test_constructor_corner
```



---
## test_constructor_coercion_signed_to_unsigned
```python
from test_numeric import test_constructor_coercion_signed_to_unsigned
```



---
## test_constructor_np_signed
```python
from test_numeric import test_constructor_np_signed
```



---
## test_constructor_np_unsigned
```python
from test_numeric import test_constructor_np_unsigned
```



---
## test_coerce_list
```python
from test_numeric import test_coerce_list
```



---
## test_astype_float64_to_uint64
```python
from test_astype import test_astype_float64_to_uint64
```



---
## test_astype_float64_to_object
```python
from test_astype import test_astype_float64_to_object
```



---
## test_astype_float64_mixed_to_object
```python
from test_astype import test_astype_float64_mixed_to_object
```



---
## test_astype_float64_to_int_dtype
```python
from test_astype import test_astype_float64_to_int_dtype
```



---
## test_astype_float64_to_float_dtype
```python
from test_astype import test_astype_float64_to_float_dtype
```



---
## test_astype_float_to_datetimelike
```python
from test_astype import test_astype_float_to_datetimelike
```



---
## test_cannot_cast_inf_to_int
```python
from test_astype import test_cannot_cast_inf_to_int
```



---
## test_astype_from_object
```python
from test_astype import test_astype_from_object
```



---
## index_large
```python
from test_setops import index_large
```



---
## TestSetOpsSort
```python
from test_setops import TestSetOpsSort
```



---
## test_union_non_numeric
```python
from test_setops import test_union_non_numeric
```



---
## test_int_float_union_dtype
```python
from test_setops import test_int_float_union_dtype
```



---
## test_range_float_union_dtype
```python
from test_setops import test_range_float_union_dtype
```



---
## test_range_uint64_union_dtype
```python
from test_setops import test_range_uint64_union_dtype
```



---
## test_float64_index_difference
```python
from test_setops import test_float64_index_difference
```



---
## test_intersection_uint64_outside_int64_range
```python
from test_setops import test_intersection_uint64_outside_int64_range
```



---
## test_intersection_monotonic
```python
from test_setops import test_intersection_monotonic
```



---
## test_union_sort_other_special
```python
from test_setops import test_union_sort_other_special
```



---
## test_union_sort_special_true
```python
from test_setops import test_union_sort_special_true
```



---
## test_get_indexer_strings
```python
from test_indexing import test_get_indexer_strings
```



---
## test_get_indexer_strings_raises
```python
from test_indexing import test_get_indexer_strings_raises
```



---
## test_get_indexer_with_NA_values
```python
from test_indexing import test_get_indexer_with_NA_values
```



---
## test_get_indexer_non_unique_nas
```python
from test_indexing import test_get_indexer_non_unique_nas
```



---
## test_get_indexer_non_unique_np_nats
```python
from test_indexing import test_get_indexer_non_unique_np_nats
```



---
## test_slice_locs_negative_step
```python
from test_indexing import test_slice_locs_negative_step
```



---
## test_slice_locs_negative_step_oob
```python
from test_indexing import test_slice_locs_negative_step_oob
```



---
## test_slice_locs_dup
```python
from test_indexing import test_slice_locs_dup
```



---
## test_astype_str_from_bytes
```python
from test_astype import test_astype_str_from_bytes
```



---
## test_astype_invalid_nas_to_tdt64_raises
```python
from test_astype import test_astype_invalid_nas_to_tdt64_raises
```



---
## test_freq_setter_errors
```python
from test_freq_attr import test_freq_setter_errors
```



---
## test_freq_setter
```python
from test_freq_attr import test_freq_setter
```



---
## test_freq_view_safe
```python
from test_freq_attr import test_freq_view_safe
```



---
## TestDatetimeIndex
```python
from test_constructors import TestDatetimeIndex
```



---
## TestTimeSeries
```python
from test_constructors import TestTimeSeries
```



---
## test_closed_deprecated
```python
from test_constructors import test_closed_deprecated
```



---
## test_normalize_deprecated
```python
from test_constructors import test_normalize_deprecated
```



---
## test_from_dt64_unsupported_unit
```python
from test_constructors import test_from_dt64_unsupported_unit
```



---
## test_explicit_tz_none
```python
from test_constructors import test_explicit_tz_none
```



---
## test_freq_validation_with_nat
```python
from test_constructors import test_freq_validation_with_nat
```



---
## test_shallow_copy_inherits_array_freq
```python
from test_constructors import test_shallow_copy_inherits_array_freq
```



---
## test_categorical_preserves_tz
```python
from test_constructors import test_categorical_preserves_tz
```



---
## test_dti_with_period_data_raises
```python
from test_constructors import test_dti_with_period_data_raises
```



---
## test_dti_with_timedelta64_data_raises
```python
from test_constructors import test_dti_with_timedelta64_data_raises
```



---
## test_constructor_from_sparse_array
```python
from test_constructors import test_constructor_from_sparse_array
```



---
## test_construction_caching
```python
from test_constructors import test_construction_caching
```



---
## test_construction_with_alt
```python
from test_constructors import test_construction_with_alt
```



---
## test_construction_with_alt_tz_localize
```python
from test_constructors import test_construction_with_alt_tz_localize
```



---
## test_construction_index_with_mixed_timezones
```python
from test_constructors import test_construction_index_with_mixed_timezones
```



---
## test_construction_index_with_mixed_timezones_with_NaT
```python
from test_constructors import test_construction_index_with_mixed_timezones_with_NaT
```



---
## test_construction_dti_with_mixed_timezones
```python
from test_constructors import test_construction_dti_with_mixed_timezones
```



---
## test_construction_outofbounds
```python
from test_constructors import test_construction_outofbounds
```



---
## test_dti_date_out_of_range
```python
from test_constructors import test_dti_date_out_of_range
```



---
## test_construction_with_ndarray
```python
from test_constructors import test_construction_with_ndarray
```



---
## test_integer_values_and_tz_interpreted_as_utc
```python
from test_constructors import test_integer_values_and_tz_interpreted_as_utc
```



---
## test_constructor_coverage
```python
from test_constructors import test_constructor_coverage
```



---
## test_constructor_datetime64_tzformat
```python
from test_constructors import test_constructor_datetime64_tzformat
```



---
## test_constructor_dtype_tz_mismatch_raises
```python
from test_constructors import test_constructor_dtype_tz_mismatch_raises
```



---
## test_constructor_invalid_dtype_raises
```python
from test_constructors import test_constructor_invalid_dtype_raises
```



---
## test_000constructor_resolution
```python
from test_constructors import test_000constructor_resolution
```



---
## test_disallow_setting_tz
```python
from test_constructors import test_disallow_setting_tz
```



---
## test_constructor_start_end_with_tz
```python
from test_constructors import test_constructor_start_end_with_tz
```



---
## test_constructor_with_non_normalized_pytz
```python
from test_constructors import test_constructor_with_non_normalized_pytz
```



---
## test_constructor_timestamp_near_dst
```python
from test_constructors import test_constructor_timestamp_near_dst
```



---
## test_constructor_with_int_tz
```python
from test_constructors import test_constructor_with_int_tz
```



---
## test_construction_int_rountrip
```python
from test_constructors import test_construction_int_rountrip
```



---
## test_construction_from_replaced_timestamps_with_dst
```python
from test_constructors import test_construction_from_replaced_timestamps_with_dst
```



---
## test_construction_with_tz_and_tz_aware_dti
```python
from test_constructors import test_construction_with_tz_and_tz_aware_dti
```



---
## test_construction_with_nat_and_tzlocal
```python
from test_constructors import test_construction_with_nat_and_tzlocal
```



---
## test_constructor_with_ambiguous_keyword_arg
```python
from test_constructors import test_constructor_with_ambiguous_keyword_arg
```



---
## test_constructor_with_nonexistent_keyword_arg
```python
from test_constructors import test_constructor_with_nonexistent_keyword_arg
```



---
## test_constructor_no_precision_raises
```python
from test_constructors import test_constructor_no_precision_raises
```



---
## test_constructor_wrong_precision_raises
```python
from test_constructors import test_constructor_wrong_precision_raises
```



---
## test_index_constructor_with_numpy_object_array_and_timestamp_tz_with_nan
```python
from test_constructors import test_index_constructor_with_numpy_object_array_and_timestamp_tz_with_nan
```



---
## test_dti_from_tzaware_datetime
```python
from test_constructors import test_dti_from_tzaware_datetime
```



---
## test_dti_tz_constructors
```python
from test_constructors import test_dti_tz_constructors
```

Test different DatetimeIndex constructions with timezone
Follow-up of GH#4229

---
## test_dti_construction_idempotent
```python
from test_constructors import test_dti_construction_idempotent
```



---
## test_dti_constructor_static_tzinfo
```python
from test_constructors import test_dti_constructor_static_tzinfo
```



---
## test_dti_convert_datetime_list
```python
from test_constructors import test_dti_convert_datetime_list
```



---
## test_dti_ambiguous_matches_timestamp
```python
from test_constructors import test_dti_ambiguous_matches_timestamp
```



---
## test_dti_constructor_with_non_nano_dtype
```python
from test_constructors import test_dti_constructor_with_non_nano_dtype
```



---
## test_dti_constructor_with_non_nano_now_today
```python
from test_constructors import test_dti_constructor_with_non_nano_now_today
```



---
## test_dti_constructor_object_float_matches_float_dtype
```python
from test_constructors import test_dti_constructor_object_float_matches_float_dtype
```



---
## test_dti_constructor_with_dtype_object_int_matches_int_dtype
```python
from test_constructors import test_dti_constructor_with_dtype_object_int_matches_int_dtype
```



---
## test_dti_constructor_preserve_dti_freq
```python
from test_constructors import test_dti_constructor_preserve_dti_freq
```



---
## test_explicit_none_freq
```python
from test_constructors import test_explicit_none_freq
```



---
## test_dti_constructor_small_int
```python
from test_constructors import test_dti_constructor_small_int
```



---
## test_ctor_str_intraday
```python
from test_constructors import test_ctor_str_intraday
```



---
## test_index_cast_datetime64_other_units
```python
from test_constructors import test_index_cast_datetime64_other_units
```



---
## test_constructor_int64_nocopy
```python
from test_constructors import test_constructor_int64_nocopy
```



---
## test_from_freq_recreate_from_data
```python
from test_constructors import test_from_freq_recreate_from_data
```



---
## test_datetimeindex_constructor_misc
```python
from test_constructors import test_datetimeindex_constructor_misc
```



---
## test_dti_constructor_object_dtype_dayfirst_yearfirst_with_tz
```python
from test_constructors import test_dti_constructor_object_dtype_dayfirst_yearfirst_with_tz
```



---
## test_pickle
```python
from test_pickle import test_pickle
```



---
## test_pickle_dont_infer_freq
```python
from test_pickle import test_pickle_dont_infer_freq
```



---
## test_pickle_after_set_freq
```python
from test_pickle import test_pickle_after_set_freq
```



---
## test_roundtrip_pickle_with_tz
```python
from test_pickle import test_roundtrip_pickle_with_tz
```



---
## test_pickle_unpickle
```python
from test_pickle import test_pickle_unpickle
```



---
## __name__
```python
from test_iter import __name__
```



---
## TestDatetimeIndexIteration
```python
from test_iter import TestDatetimeIndexIteration
```



---
## test_iteration_preserves_nanoseconds
```python
from test_iter import test_iteration_preserves_nanoseconds
```



---
## test_iter_readonly
```python
from test_iter import test_iter_readonly
```



---
## test_iteration_preserves_tz
```python
from test_iter import test_iteration_preserves_tz
```



---
## test_iteration_preserves_tz2
```python
from test_iter import test_iteration_preserves_tz2
```



---
## test_iteration_preserves_tz3
```python
from test_iter import test_iteration_preserves_tz3
```



---
## test_iteration_over_chunksize
```python
from test_iter import test_iteration_over_chunksize
```



---
## test_does_not_convert_mixed_integer
```python
from test_join import test_does_not_convert_mixed_integer
```



---
## test_join_with_period_index
```python
from test_join import test_join_with_period_index
```



---
## test_join_object_index
```python
from test_join import test_join_object_index
```



---
## test_join_utc_convert
```python
from test_join import test_join_utc_convert
```



---
## test_datetimeindex_union_join_empty
```python
from test_join import test_datetimeindex_union_join_empty
```



---
## test_join_nonunique
```python
from test_join import test_join_nonunique
```



---
## test_outer_join
```python
from test_join import test_outer_join
```



---
## test_naive_aware_conflicts
```python
from test_join import test_naive_aware_conflicts
```



---
## test_join_preserves_freq
```python
from test_join import test_join_preserves_freq
```



---
## __name__
```python
from test_date_range import __name__
```

test date_range, bdate_range construction from the convenience range functions

---
## _get_expected_range
```python
from test_date_range import _get_expected_range
```

Helper to get expected range from a both inclusive range

---
## TestTimestampEquivDateRange
```python
from test_date_range import TestTimestampEquivDateRange
```



---
## TestDateRanges
```python
from test_date_range import TestDateRanges
```



---
## TestDateRangeTZ
```python
from test_date_range import TestDateRangeTZ
```

Tests for date_range with timezones

---
## TestGenRangeGeneration
```python
from test_date_range import TestGenRangeGeneration
```



---
## TestBusinessDateRange
```python
from test_date_range import TestBusinessDateRange
```



---
## TestCustomDateRange
```python
from test_date_range import TestCustomDateRange
```



---
## TestDateRangeNonNano
```python
from test_date_range import TestDateRangeNonNano
```



---
## TestDateRangeNonTickFreq
```python
from test_date_range import TestDateRangeNonTickFreq
```



---
## test_date_range_timestamp_equiv
```python
from test_date_range import test_date_range_timestamp_equiv
```



---
## test_date_range_timestamp_equiv_dateutil
```python
from test_date_range import test_date_range_timestamp_equiv_dateutil
```



---
## test_date_range_timestamp_equiv_explicit_pytz
```python
from test_date_range import test_date_range_timestamp_equiv_explicit_pytz
```



---
## test_date_range_timestamp_equiv_explicit_dateutil
```python
from test_date_range import test_date_range_timestamp_equiv_explicit_dateutil
```



---
## test_date_range_timestamp_equiv_from_datetime_instance
```python
from test_date_range import test_date_range_timestamp_equiv_from_datetime_instance
```



---
## test_date_range_timestamp_equiv_preserve_frequency
```python
from test_date_range import test_date_range_timestamp_equiv_preserve_frequency
```



---
## test_date_range_name
```python
from test_date_range import test_date_range_name
```



---
## test_date_range_invalid_periods
```python
from test_date_range import test_date_range_invalid_periods
```



---
## test_date_range_fractional_period
```python
from test_date_range import test_date_range_fractional_period
```



---
## test_date_range_frequency_M_SM_BQ_BY_deprecated
```python
from test_date_range import test_date_range_frequency_M_SM_BQ_BY_deprecated
```



---
## test_date_range_tuple_freq_raises
```python
from test_date_range import test_date_range_tuple_freq_raises
```



---
## test_date_range_edges
```python
from test_date_range import test_date_range_edges
```



---
## test_date_range_near_implementation_bound
```python
from test_date_range import test_date_range_near_implementation_bound
```



---
## test_date_range_nat
```python
from test_date_range import test_date_range_nat
```



---
## test_date_range_multiplication_overflow
```python
from test_date_range import test_date_range_multiplication_overflow
```



---
## test_date_range_unsigned_overflow_handling
```python
from test_date_range import test_date_range_unsigned_overflow_handling
```



---
## test_date_range_int64_overflow_non_recoverable
```python
from test_date_range import test_date_range_int64_overflow_non_recoverable
```



---
## test_date_range_int64_overflow_stride_endpoint_different_signs
```python
from test_date_range import test_date_range_int64_overflow_stride_endpoint_different_signs
```



---
## test_date_range_out_of_bounds
```python
from test_date_range import test_date_range_out_of_bounds
```



---
## test_date_range_gen_error
```python
from test_date_range import test_date_range_gen_error
```



---
## test_date_range_normalize
```python
from test_date_range import test_date_range_normalize
```



---
## test_date_range_ambiguous_arguments
```python
from test_date_range import test_date_range_ambiguous_arguments
```



---
## test_date_range_convenience_periods
```python
from test_date_range import test_date_range_convenience_periods
```



---
## test_date_range_index_comparison
```python
from test_date_range import test_date_range_index_comparison
```



---
## test_date_range_linspacing_tz
```python
from test_date_range import test_date_range_linspacing_tz
```



---
## test_date_range_timedelta
```python
from test_date_range import test_date_range_timedelta
```



---
## test_range_misspecified
```python
from test_date_range import test_range_misspecified
```



---
## test_compat_replace
```python
from test_date_range import test_compat_replace
```



---
## test_catch_infinite_loop
```python
from test_date_range import test_catch_infinite_loop
```



---
## test_construct_over_dst
```python
from test_date_range import test_construct_over_dst
```



---
## test_construct_with_different_start_end_string_format
```python
from test_date_range import test_construct_with_different_start_end_string_format
```



---
## test_error_with_zero_monthends
```python
from test_date_range import test_error_with_zero_monthends
```



---
## test_range_bug
```python
from test_date_range import test_range_bug
```



---
## test_range_tz_pytz
```python
from test_date_range import test_range_tz_pytz
```



---
## test_range_tz_dst_straddle_pytz
```python
from test_date_range import test_range_tz_dst_straddle_pytz
```



---
## test_range_tz_dateutil
```python
from test_date_range import test_range_tz_dateutil
```



---
## test_range_closed
```python
from test_date_range import test_range_closed
```



---
## test_range_with_tz_closed_with_tz_aware_start_end
```python
from test_date_range import test_range_with_tz_closed_with_tz_aware_start_end
```



---
## test_range_closed_boundary
```python
from test_date_range import test_range_closed_boundary
```



---
## test_date_range_years_only
```python
from test_date_range import test_date_range_years_only
```



---
## test_freq_divides_end_in_nanos
```python
from test_date_range import test_freq_divides_end_in_nanos
```



---
## test_cached_range_bug
```python
from test_date_range import test_cached_range_bug
```



---
## test_timezone_comparison_bug
```python
from test_date_range import test_timezone_comparison_bug
```



---
## test_timezone_comparison_assert
```python
from test_date_range import test_timezone_comparison_assert
```



---
## test_negative_non_tick_frequency_descending_dates
```python
from test_date_range import test_negative_non_tick_frequency_descending_dates
```



---
## test_range_where_start_equal_end
```python
from test_date_range import test_range_where_start_equal_end
```



---
## test_freq_dateoffset_with_relateivedelta_nanos
```python
from test_date_range import test_freq_dateoffset_with_relateivedelta_nanos
```



---
## test_frequencies_H_T_S_L_U_N_deprecated
```python
from test_date_range import test_frequencies_H_T_S_L_U_N_deprecated
```



---
## test_frequencies_A_deprecated_Y_renamed
```python
from test_date_range import test_frequencies_A_deprecated_Y_renamed
```



---
## test_to_offset_with_lowercase_deprecated_freq
```python
from test_date_range import test_to_offset_with_lowercase_deprecated_freq
```



---
## test_date_range_bday
```python
from test_date_range import test_date_range_bday
```



---
## test_hongkong_tz_convert
```python
from test_date_range import test_hongkong_tz_convert
```



---
## test_date_range_span_dst_transition
```python
from test_date_range import test_date_range_span_dst_transition
```



---
## test_date_range_timezone_str_argument
```python
from test_date_range import test_date_range_timezone_str_argument
```



---
## test_date_range_with_fixed_tz
```python
from test_date_range import test_date_range_with_fixed_tz
```



---
## test_date_range_with_fixedoffset_noname
```python
from test_date_range import test_date_range_with_fixedoffset_noname
```



---
## test_date_range_with_tz
```python
from test_date_range import test_date_range_with_tz
```



---
## test_date_range_ambiguous_endpoint
```python
from test_date_range import test_date_range_ambiguous_endpoint
```



---
## test_date_range_nonexistent_endpoint
```python
from test_date_range import test_date_range_nonexistent_endpoint
```



---
## test_generate
```python
from test_date_range import test_generate
```



---
## test_1
```python
from test_date_range import test_1
```



---
## test_2
```python
from test_date_range import test_2
```



---
## test_3
```python
from test_date_range import test_3
```



---
## test_precision_finer_than_offset
```python
from test_date_range import test_precision_finer_than_offset
```



---
## test_mismatching_tz_raises_err
```python
from test_date_range import test_mismatching_tz_raises_err
```



---
## test_constructor
```python
from test_date_range import test_constructor
```



---
## test_misc
```python
from test_date_range import test_misc
```



---
## test_date_parse_failure
```python
from test_date_range import test_date_parse_failure
```



---
## test_daterange_bug_456
```python
from test_date_range import test_daterange_bug_456
```



---
## test_bdays_and_open_boundaries
```python
from test_date_range import test_bdays_and_open_boundaries
```



---
## test_bday_near_overflow
```python
from test_date_range import test_bday_near_overflow
```



---
## test_bday_overflow_error
```python
from test_date_range import test_bday_overflow_error
```



---
## test_cdaterange
```python
from test_date_range import test_cdaterange
```



---
## test_cdaterange_weekmask
```python
from test_date_range import test_cdaterange_weekmask
```



---
## test_cdaterange_holidays
```python
from test_date_range import test_cdaterange_holidays
```



---
## test_cdaterange_weekmask_and_holidays
```python
from test_date_range import test_cdaterange_weekmask_and_holidays
```



---
## test_cdaterange_holidays_weekmask_requires_freqstr
```python
from test_date_range import test_cdaterange_holidays_weekmask_requires_freqstr
```



---
## test_all_custom_freq
```python
from test_date_range import test_all_custom_freq
```



---
## test_range_with_millisecond_resolution
```python
from test_date_range import test_range_with_millisecond_resolution
```



---
## test_range_with_timezone_and_custombusinessday
```python
from test_date_range import test_range_with_timezone_and_custombusinessday
```



---
## test_date_range_reso_validation
```python
from test_date_range import test_date_range_reso_validation
```



---
## test_date_range_freq_higher_than_reso
```python
from test_date_range import test_date_range_freq_higher_than_reso
```



---
## test_date_range_freq_matches_reso
```python
from test_date_range import test_date_range_freq_matches_reso
```



---
## test_date_range_freq_lower_than_endpoints
```python
from test_date_range import test_date_range_freq_lower_than_endpoints
```



---
## test_date_range_non_nano
```python
from test_date_range import test_date_range_non_nano
```



---
## test_date_range_custom_business_month_begin
```python
from test_date_range import test_date_range_custom_business_month_begin
```



---
## test_date_range_custom_business_month_end
```python
from test_date_range import test_date_range_custom_business_month_end
```



---
## test_date_range_with_custom_holidays
```python
from test_date_range import test_date_range_with_custom_holidays
```



---
## test_date_range_businesshour
```python
from test_date_range import test_date_range_businesshour
```



---
## test_date_range_business_hour2
```python
from test_date_range import test_date_range_business_hour2
```



---
## test_date_range_business_hour_short
```python
from test_date_range import test_date_range_business_hour_short
```



---
## test_date_range_year_start
```python
from test_date_range import test_date_range_year_start
```



---
## test_date_range_year_end
```python
from test_date_range import test_date_range_year_end
```



---
## test_date_range_negative_freq_year_end
```python
from test_date_range import test_date_range_negative_freq_year_end
```



---
## test_date_range_business_year_end_year
```python
from test_date_range import test_date_range_business_year_end_year
```



---
## test_date_range_bms
```python
from test_date_range import test_date_range_bms
```



---
## test_date_range_semi_month_begin
```python
from test_date_range import test_date_range_semi_month_begin
```



---
## test_date_range_semi_month_end
```python
from test_date_range import test_date_range_semi_month_end
```



---
## test_date_range_week_of_month
```python
from test_date_range import test_date_range_week_of_month
```



---
## test_date_range_week_of_month2
```python
from test_date_range import test_date_range_week_of_month2
```



---
## test_date_range_negative_freq_month_end
```python
from test_date_range import test_date_range_negative_freq_month_end
```



---
## test_date_range_fy5253
```python
from test_date_range import test_date_range_fy5253
```



---
## test_date_range_freqstr_matches_offset
```python
from test_date_range import test_date_range_freqstr_matches_offset
```



---
## FixedOffset
```python
from test_timezones import FixedOffset
```

Fixed offset in minutes east from UTC.

---
## TestDatetimeIndexTimezones
```python
from test_timezones import TestDatetimeIndexTimezones
```



---
## __init__
```python
from test_timezones import __init__
```



---
## utcoffset
```python
from test_timezones import utcoffset
```



---
## tzname
```python
from test_timezones import tzname
```



---
## dst
```python
from test_timezones import dst
```



---
## test_dti_drop_dont_lose_tz
```python
from test_timezones import test_dti_drop_dont_lose_tz
```



---
## test_dti_tz_conversion_freq
```python
from test_timezones import test_dti_tz_conversion_freq
```



---
## test_drop_dst_boundary
```python
from test_timezones import test_drop_dst_boundary
```



---
## test_date_range_localize
```python
from test_timezones import test_date_range_localize
```



---
## test_date_range_localize2
```python
from test_timezones import test_date_range_localize2
```



---
## test_timestamp_equality_different_timezones
```python
from test_timezones import test_timestamp_equality_different_timezones
```



---
## test_dti_equals_with_tz
```python
from test_timezones import test_dti_equals_with_tz
```



---
## test_dti_tz_nat
```python
from test_timezones import test_dti_tz_nat
```



---
## test_utc_box_timestamp_and_localize
```python
from test_timezones import test_utc_box_timestamp_and_localize
```



---
## test_with_tz
```python
from test_timezones import test_with_tz
```



---
## test_dti_convert_tz_aware_datetime_datetime
```python
from test_timezones import test_dti_convert_tz_aware_datetime_datetime
```



---
## TestDatetimeIndexOps
```python
from test_scalar_compat import TestDatetimeIndexOps
```



---
## test_dti_no_millisecond_field
```python
from test_scalar_compat import test_dti_no_millisecond_field
```



---
## test_dti_time
```python
from test_scalar_compat import test_dti_time
```



---
## test_dti_date
```python
from test_scalar_compat import test_dti_date
```



---
## test_dti_date2
```python
from test_scalar_compat import test_dti_date2
```



---
## test_dti_time2
```python
from test_scalar_compat import test_dti_time2
```



---
## test_dti_timetz
```python
from test_scalar_compat import test_dti_timetz
```



---
## test_dti_timestamp_fields
```python
from test_scalar_compat import test_dti_timestamp_fields
```



---
## test_dti_nanosecond
```python
from test_scalar_compat import test_dti_nanosecond
```



---
## test_dti_hour_tzaware
```python
from test_scalar_compat import test_dti_hour_tzaware
```



---
## test_day_name_month_name
```python
from test_scalar_compat import test_day_name_month_name
```



---
## test_dti_week
```python
from test_scalar_compat import test_dti_week
```



---
## test_dti_fields
```python
from test_scalar_compat import test_dti_fields
```



---
## test_dti_is_year_quarter_start
```python
from test_scalar_compat import test_dti_is_year_quarter_start
```



---
## test_dti_is_month_start
```python
from test_scalar_compat import test_dti_is_month_start
```



---
## test_dti_is_month_start_custom
```python
from test_scalar_compat import test_dti_is_month_start_custom
```



---
## TestMaybeCastSliceBound
```python
from test_indexing import TestMaybeCastSliceBound
```



---
## TestIndexerBetweenTime
```python
from test_indexing import TestIndexerBetweenTime
```



---
## test_dti_business_getitem
```python
from test_indexing import test_dti_business_getitem
```



---
## test_dti_business_getitem_matplotlib_hackaround
```python
from test_indexing import test_dti_business_getitem_matplotlib_hackaround
```



---
## test_getitem_int_list
```python
from test_indexing import test_getitem_int_list
```



---
## test_where_doesnt_retain_freq
```python
from test_indexing import test_where_doesnt_retain_freq
```



---
## test_where_tz
```python
from test_indexing import test_where_tz
```



---
## test_dti_take_dont_lose_meta
```python
from test_indexing import test_dti_take_dont_lose_meta
```



---
## test_take_nan_first_datetime
```python
from test_indexing import test_take_nan_first_datetime
```



---
## test_take2
```python
from test_indexing import test_take2
```



---
## test_take_fill_value_with_timezone
```python
from test_indexing import test_take_fill_value_with_timezone
```



---
## test_get_loc_key_unit_mismatch
```python
from test_indexing import test_get_loc_key_unit_mismatch
```



---
## test_get_loc_key_unit_mismatch_not_castable
```python
from test_indexing import test_get_loc_key_unit_mismatch_not_castable
```



---
## test_get_loc_time_obj
```python
from test_indexing import test_get_loc_time_obj
```



---
## test_get_loc_time_obj2
```python
from test_indexing import test_get_loc_time_obj2
```



---
## test_get_loc_time_nat
```python
from test_indexing import test_get_loc_time_nat
```



---
## test_get_loc_timedelta_invalid_key
```python
from test_indexing import test_get_loc_timedelta_invalid_key
```



---
## test_get_loc_reasonable_key_error
```python
from test_indexing import test_get_loc_reasonable_key_error
```



---
## test_get_loc_year_str
```python
from test_indexing import test_get_loc_year_str
```



---
## test_dti_contains_with_duplicates
```python
from test_indexing import test_dti_contains_with_duplicates
```



---
## test_contains_nonunique
```python
from test_indexing import test_contains_nonunique
```



---
## test_get_indexer_date_objs
```python
from test_indexing import test_get_indexer_date_objs
```



---
## test_get_indexer_mixed_dtypes
```python
from test_indexing import test_get_indexer_mixed_dtypes
```



---
## test_get_indexer_out_of_bounds_date
```python
from test_indexing import test_get_indexer_out_of_bounds_date
```



---
## test_get_indexer_pad_requires_monotonicity
```python
from test_indexing import test_get_indexer_pad_requires_monotonicity
```



---
## test_maybe_cast_slice_bounds_empty
```python
from test_indexing import test_maybe_cast_slice_bounds_empty
```



---
## test_maybe_cast_slice_duplicate_monotonic
```python
from test_indexing import test_maybe_cast_slice_duplicate_monotonic
```



---
## test_get_slice_bounds_datetime_within
```python
from test_indexing import test_get_slice_bounds_datetime_within
```



---
## test_get_slice_bounds_datetime_outside
```python
from test_indexing import test_get_slice_bounds_datetime_outside
```



---
## test_slice_datetime_locs
```python
from test_indexing import test_slice_datetime_locs
```



---
## test_indexer_between_time
```python
from test_indexing import test_indexer_between_time
```



---
## test_indexer_between_time_non_nano
```python
from test_indexing import test_indexer_between_time_non_nano
```



---
## unit
```python
from test_formats import unit
```



---
## TestDatetimeIndexRendering
```python
from test_formats import TestDatetimeIndexRendering
```



---
## TestFormat
```python
from test_formats import TestFormat
```



---
## test_dti_with_timezone_repr
```python
from test_formats import test_dti_with_timezone_repr
```



---
## test_dti_repr_dates
```python
from test_formats import test_dti_repr_dates
```



---
## test_dti_repr_mixed
```python
from test_formats import test_dti_repr_mixed
```



---
## test_dti_repr_short
```python
from test_formats import test_dti_repr_short
```



---
## test_dti_repr_time_midnight
```python
from test_formats import test_dti_repr_time_midnight
```



---
## test_dti_representation
```python
from test_formats import test_dti_representation
```



---
## test_dti_representation_to_series
```python
from test_formats import test_dti_representation_to_series
```



---
## test_dti_summary
```python
from test_formats import test_dti_summary
```



---
## test_dti_business_repr_etc_smoke
```python
from test_formats import test_dti_business_repr_etc_smoke
```



---
## test_format_with_name_time_info
```python
from test_formats import test_format_with_name_time_info
```



---
## test_format_datetime_with_time
```python
from test_formats import test_format_datetime_with_time
```



---
## test_format_datetime
```python
from test_formats import test_format_datetime
```



---
## test_format_date
```python
from test_formats import test_format_date
```



---
## test_format_date_tz
```python
from test_formats import test_format_date_tz
```



---
## test_format_date_explicit_date_format
```python
from test_formats import test_format_date_explicit_date_format
```



---
## TestDatetimeIndexSetOps
```python
from test_setops import TestDatetimeIndexSetOps
```



---
## TestBusinessDatetimeIndex
```python
from test_setops import TestBusinessDatetimeIndex
```



---
## TestCustomDatetimeIndex
```python
from test_setops import TestCustomDatetimeIndex
```



---
## test_union2
```python
from test_setops import test_union2
```



---
## test_union3
```python
from test_setops import test_union3
```



---
## test_union_coverage
```python
from test_setops import test_union_coverage
```



---
## test_union_bug_1730
```python
from test_setops import test_union_bug_1730
```



---
## test_union_bug_1745
```python
from test_setops import test_union_bug_1745
```



---
## test_union_bug_4564
```python
from test_setops import test_union_bug_4564
```



---
## test_union_freq_both_none
```python
from test_setops import test_union_freq_both_none
```



---
## test_union_freq_infer
```python
from test_setops import test_union_freq_infer
```



---
## test_union_dataframe_index
```python
from test_setops import test_union_dataframe_index
```



---
## test_union_with_DatetimeIndex
```python
from test_setops import test_union_with_DatetimeIndex
```



---
## test_union_same_timezone_different_units
```python
from test_setops import test_union_same_timezone_different_units
```



---
## test_intersection2
```python
from test_setops import test_intersection2
```



---
## test_intersection_bug_1708
```python
from test_setops import test_intersection_bug_1708
```



---
## test_datetimeindex_diff
```python
from test_setops import test_datetimeindex_diff
```



---
## test_setops_preserve_freq
```python
from test_setops import test_setops_preserve_freq
```



---
## test_intersection_non_tick_no_fastpath
```python
from test_setops import test_intersection_non_tick_no_fastpath
```



---
## test_dti_intersection
```python
from test_setops import test_dti_intersection
```



---
## test_dti_setop_aware
```python
from test_setops import test_dti_setop_aware
```



---
## test_dti_union_mixed
```python
from test_setops import test_dti_union_mixed
```



---
## test_union_not_cacheable
```python
from test_setops import test_union_not_cacheable
```



---
## test_intersection_bug
```python
from test_setops import test_intersection_bug
```



---
## test_intersection_list
```python
from test_setops import test_intersection_list
```



---
## test_month_range_union_tz_pytz
```python
from test_setops import test_month_range_union_tz_pytz
```



---
## test_month_range_union_tz_dateutil
```python
from test_setops import test_month_range_union_tz_dateutil
```



---
## test_intersection_dst_transition
```python
from test_setops import test_intersection_dst_transition
```



---
## test_is_
```python
from test_datetime import test_is_
```



---
## test_time_overflow_for_32bit_machines
```python
from test_datetime import test_time_overflow_for_32bit_machines
```



---
## test_nat
```python
from test_datetime import test_nat
```



---
## test_week_of_month_frequency
```python
from test_datetime import test_week_of_month_frequency
```



---
## test_append_nondatetimeindex
```python
from test_datetime import test_append_nondatetimeindex
```



---
## test_misc_coverage
```python
from test_datetime import test_misc_coverage
```



---
## test_groupby_function_tuple_1677
```python
from test_datetime import test_groupby_function_tuple_1677
```



---
## assert_index_parameters
```python
from test_datetime import assert_index_parameters
```



---
## test_ns_index
```python
from test_datetime import test_ns_index
```



---
## test_asarray_tz_naive
```python
from test_datetime import test_asarray_tz_naive
```



---
## test_asarray_tz_aware
```python
from test_datetime import test_asarray_tz_aware
```



---
## test_CBH_deprecated
```python
from test_datetime import test_CBH_deprecated
```



---
## test_AS_BAS_deprecated
```python
from test_datetime import test_AS_BAS_deprecated
```



---
## test_BM_BQ_BY_deprecated
```python
from test_datetime import test_BM_BQ_BY_deprecated
```



---
## TestSlicing
```python
from test_partial_slicing import TestSlicing
```



---
## test_string_index_series_name_converted
```python
from test_partial_slicing import test_string_index_series_name_converted
```



---
## test_stringified_slice_with_tz
```python
from test_partial_slicing import test_stringified_slice_with_tz
```



---
## test_return_type_doesnt_depend_on_monotonicity
```python
from test_partial_slicing import test_return_type_doesnt_depend_on_monotonicity
```



---
## test_return_type_doesnt_depend_on_monotonicity_higher_reso
```python
from test_partial_slicing import test_return_type_doesnt_depend_on_monotonicity_higher_reso
```



---
## test_monotone_DTI_indexing_bug
```python
from test_partial_slicing import test_monotone_DTI_indexing_bug
```



---
## test_slice_year
```python
from test_partial_slicing import test_slice_year
```



---
## test_slice_end_of_period_resolution
```python
from test_partial_slicing import test_slice_end_of_period_resolution
```



---
## test_slice_quarter
```python
from test_partial_slicing import test_slice_quarter
```



---
## test_slice_month
```python
from test_partial_slicing import test_slice_month
```



---
## test_partial_slice
```python
from test_partial_slicing import test_partial_slice
```



---
## test_partial_slice_daily
```python
from test_partial_slicing import test_partial_slice_daily
```



---
## test_partial_slice_hourly
```python
from test_partial_slicing import test_partial_slice_hourly
```



---
## test_partial_slice_minutely
```python
from test_partial_slicing import test_partial_slice_minutely
```



---
## test_partial_slice_second_precision
```python
from test_partial_slicing import test_partial_slice_second_precision
```



---
## test_partial_slicing_dataframe
```python
from test_partial_slicing import test_partial_slicing_dataframe
```



---
## test_partial_slicing_with_multiindex
```python
from test_partial_slicing import test_partial_slicing_with_multiindex
```



---
## test_partial_slicing_with_multiindex_series
```python
from test_partial_slicing import test_partial_slicing_with_multiindex_series
```



---
## test_partial_slice_requires_monotonicity
```python
from test_partial_slicing import test_partial_slice_requires_monotonicity
```



---
## test_loc_datetime_length_one
```python
from test_partial_slicing import test_loc_datetime_length_one
```



---
## test_getitem_with_datestring_with_UTC_offset
```python
from test_partial_slicing import test_getitem_with_datestring_with_UTC_offset
```



---
## test_slice_reduce_to_series
```python
from test_partial_slicing import test_slice_reduce_to_series
```



---
## TestSplit
```python
from test_npfuncs import TestSplit
```



---
## test_split_non_utc
```python
from test_npfuncs import test_split_non_utc
```



---
## TestDatetimeIndexOps
```python
from test_ops import TestDatetimeIndexOps
```



---
## TestBusinessDatetimeIndex
```python
from test_ops import TestBusinessDatetimeIndex
```



---
## test_infer_freq
```python
from test_ops import test_infer_freq
```



---
## rng
```python
from test_ops import rng
```



---
## test_comparison
```python
from test_ops import test_comparison
```



---
## test_copy
```python
from test_ops import test_copy
```



---
## test_identical
```python
from test_ops import test_identical
```



---
## TestDatetimeIndexArithmetic
```python
from test_arithmetic import TestDatetimeIndexArithmetic
```



---
## test_add_timedelta_preserves_freq
```python
from test_arithmetic import test_add_timedelta_preserves_freq
```



---
## test_sub_datetime_preserves_freq
```python
from test_arithmetic import test_sub_datetime_preserves_freq
```



---
## test_sub_datetime_preserves_freq_across_dst
```python
from test_arithmetic import test_sub_datetime_preserves_freq_across_dst
```



---
## TestDatetimeIndexReindex
```python
from test_reindex import TestDatetimeIndexReindex
```



---
## test_reindex_preserves_tz_if_target_is_empty_list_or_array
```python
from test_reindex import test_reindex_preserves_tz_if_target_is_empty_list_or_array
```



---
## test_reindex_with_same_tz_nearest
```python
from test_reindex import test_reindex_with_same_tz_nearest
```



---
## TestSearchSorted
```python
from test_searchsorted import TestSearchSorted
```



---
## test_searchsorted_invalid_argument_dtype
```python
from test_searchsorted import test_searchsorted_invalid_argument_dtype
```



---
## test_with_freq_empty_requires_tick
```python
from test_freq_attr import test_with_freq_empty_requires_tick
```



---
## TestTimedeltaIndex
```python
from test_constructors import TestTimedeltaIndex
```



---
## test_array_of_dt64_nat_raises
```python
from test_constructors import test_array_of_dt64_nat_raises
```



---
## test_int64_nocopy
```python
from test_constructors import test_int64_nocopy
```



---
## test_infer_from_tdi
```python
from test_constructors import test_infer_from_tdi
```



---
## test_infer_from_tdi_mismatch
```python
from test_constructors import test_infer_from_tdi_mismatch
```



---
## test_dt64_data_invalid
```python
from test_constructors import test_dt64_data_invalid
```



---
## test_float64_ns_rounded
```python
from test_constructors import test_float64_ns_rounded
```



---
## test_float64_unit_conversion
```python
from test_constructors import test_float64_unit_conversion
```



---
## test_constructor_iso
```python
from test_constructors import test_constructor_iso
```



---
## test_timedelta_range_fractional_period
```python
from test_constructors import test_timedelta_range_fractional_period
```



---
## test_from_categorical
```python
from test_constructors import test_from_categorical
```



---
## test_append_join_nondatetimeindex
```python
from test_join import test_append_join_nondatetimeindex
```



---
## TestTimedeltaIndex
```python
from test_timedelta import TestTimedeltaIndex
```



---
## test_misc_coverage
```python
from test_timedelta import test_misc_coverage
```



---
## test_map
```python
from test_timedelta import test_map
```



---
## TestVectorizedTimedelta
```python
from test_scalar_compat import TestVectorizedTimedelta
```



---
## test_tdi_total_seconds
```python
from test_scalar_compat import test_tdi_total_seconds
```



---
## test_tdi_total_seconds_all_nat
```python
from test_scalar_compat import test_tdi_total_seconds_all_nat
```



---
## test_tdi_round
```python
from test_scalar_compat import test_tdi_round
```



---
## test_tdi_round_invalid
```python
from test_scalar_compat import test_tdi_round_invalid
```



---
## test_round
```python
from test_scalar_compat import test_round
```



---
## test_components
```python
from test_scalar_compat import test_components
```



---
## test_timestamp_invalid_key
```python
from test_indexing import test_timestamp_invalid_key
```



---
## test_take_equiv_getitem
```python
from test_indexing import test_take_equiv_getitem
```



---
## monotonic
```python
from test_indexing import monotonic
```



---
## tdi
```python
from test_indexing import tdi
```



---
## test_maybe_cast_slice_bound_invalid_str
```python
from test_indexing import test_maybe_cast_slice_bound_invalid_str
```



---
## test_slice_invalid_str_with_timedeltaindex
```python
from test_indexing import test_slice_invalid_str_with_timedeltaindex
```



---
## __name__
```python
from test_delete import __name__
```



---
## TestTimedeltaIndexDelete
```python
from test_delete import TestTimedeltaIndexDelete
```



---
## test_delete
```python
from test_delete import test_delete
```



---
## test_delete_slice
```python
from test_delete import test_delete_slice
```



---
## test_delete_doesnt_infer_freq
```python
from test_delete import test_delete_doesnt_infer_freq
```



---
## TestTimedeltaIndexRendering
```python
from test_formats import TestTimedeltaIndexRendering
```



---
## test_repr_round_days_non_nano
```python
from test_formats import test_repr_round_days_non_nano
```



---
## TestTimedeltaIndex
```python
from test_setops import TestTimedeltaIndex
```



---
## TestTimedeltaIndexDifference
```python
from test_setops import TestTimedeltaIndexDifference
```



---
## test_union_sort_false
```python
from test_setops import test_union_sort_false
```



---
## test_intersection_equal
```python
from test_setops import test_intersection_equal
```



---
## test_intersection_zero_length
```python
from test_setops import test_intersection_zero_length
```



---
## test_zero_length_input_index
```python
from test_setops import test_zero_length_input_index
```



---
## test_intersection_non_monotonic
```python
from test_setops import test_intersection_non_monotonic
```



---
## TestTimedeltaIndexOps
```python
from test_ops import TestTimedeltaIndexOps
```



---
## TestTimedeltaIndexArithmetic
```python
from test_arithmetic import TestTimedeltaIndexArithmetic
```



---
## test_arithmetic_zero_freq
```python
from test_arithmetic import test_arithmetic_zero_freq
```



---
## test_tdi_division
```python
from test_arithmetic import test_tdi_division
```



---
## __name__
```python
from test_timedelta_range import __name__
```



---
## TestTimedeltas
```python
from test_timedelta_range import TestTimedeltas
```



---
## test_timedelta_range_unit
```python
from test_timedelta_range import test_timedelta_range_unit
```



---
## test_timedelta_range
```python
from test_timedelta_range import test_timedelta_range
```



---
## test_timedelta_units_H_T_S_L_U_N_deprecated
```python
from test_timedelta_range import test_timedelta_units_H_T_S_L_U_N_deprecated
```



---
## test_linspace_behavior
```python
from test_timedelta_range import test_linspace_behavior
```



---
## test_timedelta_range_H_T_deprecated
```python
from test_timedelta_range import test_timedelta_range_H_T_deprecated
```



---
## test_errors
```python
from test_timedelta_range import test_errors
```



---
## test_timedelta_range_freq_divide_end
```python
from test_timedelta_range import test_timedelta_range_freq_divide_end
```



---
## test_timedelta_range_infer_freq
```python
from test_timedelta_range import test_timedelta_range_infer_freq
```



---
## test_timedelta_range_deprecated_freq
```python
from test_timedelta_range import test_timedelta_range_deprecated_freq
```



---
## TestValueCounts
```python
from test_value_counts import TestValueCounts
```



---
## test_value_counts_unique_datetimeindex
```python
from test_value_counts import test_value_counts_unique_datetimeindex
```



---
## test_value_counts_unique_timedeltaindex
```python
from test_value_counts import test_value_counts_unique_timedeltaindex
```



---
## test_value_counts_unique_periodindex
```python
from test_value_counts import test_value_counts_unique_periodindex
```



---
## _check_value_counts_with_repeats
```python
from test_value_counts import _check_value_counts_with_repeats
```



---
## test_value_counts_unique_datetimeindex2
```python
from test_value_counts import test_value_counts_unique_datetimeindex2
```



---
## test_value_counts_unique_timedeltaindex2
```python
from test_value_counts import test_value_counts_unique_timedeltaindex2
```



---
## test_value_counts_unique_periodindex2
```python
from test_value_counts import test_value_counts_unique_periodindex2
```



---
## _check_value_counts_dropna
```python
from test_value_counts import _check_value_counts_dropna
```



---
## NATests
```python
from test_nat import NATests
```



---
## TestDatetimeIndexNA
```python
from test_nat import TestDatetimeIndexNA
```



---
## TestTimedeltaIndexNA
```python
from test_nat import TestTimedeltaIndexNA
```



---
## TestPeriodIndexNA
```python
from test_nat import TestPeriodIndexNA
```



---
## test_nat
```python
from test_nat import test_nat
```



---
## index_without_na
```python
from test_nat import index_without_na
```



---
## check_freq_ascending
```python
from test_sort_values import check_freq_ascending
```

Check the expected freq on a PeriodIndex/DatetimeIndex/TimedeltaIndex
when the original index is generated (or generate-able) with
period_range/date_range/timedelta_range.

---
## check_freq_nonmonotonic
```python
from test_sort_values import check_freq_nonmonotonic
```

Check the expected freq on a PeriodIndex/DatetimeIndex/TimedeltaIndex
when the original index is _not_ generated (or generate-able) with
period_range/date_range//timedelta_range.

---
## TestSortValues
```python
from test_sort_values import TestSortValues
```



---
## test_order_stability_compat
```python
from test_sort_values import test_order_stability_compat
```



---
## non_monotonic_idx
```python
from test_sort_values import non_monotonic_idx
```



---
## test_argmin_argmax
```python
from test_sort_values import test_argmin_argmax
```



---
## check_sort_values_with_freq
```python
from test_sort_values import check_sort_values_with_freq
```



---
## test_sort_values_with_freq_timedeltaindex
```python
from test_sort_values import test_sort_values_with_freq_timedeltaindex
```



---
## test_sort_values_with_freq_datetimeindex
```python
from test_sort_values import test_sort_values_with_freq_datetimeindex
```



---
## test_sort_values_with_freq_periodindex
```python
from test_sort_values import test_sort_values_with_freq_periodindex
```



---
## test_sort_values_with_freq_periodindex2
```python
from test_sort_values import test_sort_values_with_freq_periodindex2
```



---
## check_sort_values_without_freq
```python
from test_sort_values import check_sort_values_without_freq
```



---
## test_sort_values_without_freq_timedeltaindex
```python
from test_sort_values import test_sort_values_without_freq_timedeltaindex
```



---
## test_sort_values_without_freq_datetimeindex
```python
from test_sort_values import test_sort_values_without_freq_datetimeindex
```



---
## test_sort_values_without_freq_periodindex
```python
from test_sort_values import test_sort_values_without_freq_periodindex
```



---
## test_sort_values_without_freq_periodindex_nat
```python
from test_sort_values import test_sort_values_without_freq_periodindex_nat
```



---
## DropDuplicates
```python
from test_drop_duplicates import DropDuplicates
```



---
## TestDropDuplicatesPeriodIndex
```python
from test_drop_duplicates import TestDropDuplicatesPeriodIndex
```



---
## TestDropDuplicatesDatetimeIndex
```python
from test_drop_duplicates import TestDropDuplicatesDatetimeIndex
```



---
## TestDropDuplicatesTimedeltaIndex
```python
from test_drop_duplicates import TestDropDuplicatesTimedeltaIndex
```



---
## test_drop_duplicates_metadata
```python
from test_drop_duplicates import test_drop_duplicates_metadata
```



---
## freq
```python
from test_drop_duplicates import freq
```



---
## idx
```python
from test_drop_duplicates import idx
```



---
## EqualsTests
```python
from test_equals import EqualsTests
```



---
## TestPeriodIndexEquals
```python
from test_equals import TestPeriodIndexEquals
```



---
## TestDatetimeIndexEquals
```python
from test_equals import TestDatetimeIndexEquals
```



---
## TestTimedeltaIndexEquals
```python
from test_equals import TestTimedeltaIndexEquals
```



---
## test_not_equals_numeric
```python
from test_equals import test_not_equals_numeric
```



---
## test_not_equals_non_arraylike
```python
from test_equals import test_not_equals_non_arraylike
```



---
## test_not_equals_strings
```python
from test_equals import test_not_equals_strings
```



---
## test_not_equals_misc_strs
```python
from test_equals import test_not_equals_misc_strs
```



---
## index
```python
from test_equals import index
```



---
## test_equals2
```python
from test_equals import test_equals2
```



---
## test_not_equals_bday
```python
from test_equals import test_not_equals_bday
```



---
## test_get_indexer_non_unique_wrong_dtype
```python
from test_indexing import test_get_indexer_non_unique_wrong_dtype
```



---
## construct
```python
from test_indexing import construct
```



---
## test_is_monotonic_with_nat
```python
from test_is_monotonic import test_is_monotonic_with_nat
```



---
## test_repeat_freqstr
```python
from test_repeat import test_repeat_freqstr
```



---
## __name__
```python
from test_is_full import __name__
```



---
## test_is_full
```python
from test_is_full import test_is_full
```



---
## TestPeriodIndexShift
```python
from test_shift import TestPeriodIndexShift
```



---
## test_pi_shift_ndarray
```python
from test_shift import test_pi_shift_ndarray
```



---
## test_shift_corner_cases
```python
from test_shift import test_shift_corner_cases
```



---
## test_shift_nat
```python
from test_shift import test_shift_nat
```



---
## test_shift_gh8083
```python
from test_shift import test_shift_gh8083
```



---
## test_shift_periods
```python
from test_shift import test_shift_periods
```



---
## TestInsert
```python
from test_insert import TestInsert
```



---
## __name__
```python
from test_factorize import __name__
```



---
## TestFactorize
```python
from test_factorize import TestFactorize
```



---
## test_factorize_period
```python
from test_factorize import test_factorize_period
```



---
## test_factorize_period_nonmonotonic
```python
from test_factorize import test_factorize_period_nonmonotonic
```



---
## test_to_timestamp_non_contiguous
```python
from test_to_timestamp import test_to_timestamp_non_contiguous
```



---
## test_to_timestamp_freq
```python
from test_to_timestamp import test_to_timestamp_freq
```



---
## test_to_timestamp_pi_nat
```python
from test_to_timestamp import test_to_timestamp_pi_nat
```



---
## test_to_timestamp_preserve_name
```python
from test_to_timestamp import test_to_timestamp_preserve_name
```



---
## test_to_timestamp_quarterly_bug
```python
from test_to_timestamp import test_to_timestamp_quarterly_bug
```



---
## test_to_timestamp_pi_mult
```python
from test_to_timestamp import test_to_timestamp_pi_mult
```



---
## test_to_timestamp_pi_combined
```python
from test_to_timestamp import test_to_timestamp_pi_combined
```



---
## test_to_timestamp_1703
```python
from test_to_timestamp import test_to_timestamp_1703
```



---
## TestPeriodIndexAsType
```python
from test_astype import TestPeriodIndexAsType
```



---
## test_astype_raises
```python
from test_astype import test_astype_raises
```



---
## test_astype_conversion
```python
from test_astype import test_astype_conversion
```



---
## test_astype_uint
```python
from test_astype import test_astype_uint
```



---
## test_astype_object2
```python
from test_astype import test_astype_object2
```



---
## test_astype_array_fallback
```python
from test_astype import test_astype_array_fallback
```



---
## test_period_astype_to_timestamp
```python
from test_astype import test_period_astype_to_timestamp
```



---
## TestPeriodIndex
```python
from test_asfreq import TestPeriodIndex
```



---
## test_asfreq_nat
```python
from test_asfreq import test_asfreq_nat
```



---
## test_asfreq_mult_pi
```python
from test_asfreq import test_asfreq_mult_pi
```



---
## test_asfreq_combined_pi
```python
from test_asfreq import test_asfreq_combined_pi
```



---
## test_astype_asfreq
```python
from test_asfreq import test_astype_asfreq
```



---
## test_asfreq_with_different_n
```python
from test_asfreq import test_asfreq_with_different_n
```



---
## test_pi_asfreq_not_supported_frequency
```python
from test_asfreq import test_pi_asfreq_not_supported_frequency
```



---
## test_pi_asfreq_invalid_frequency
```python
from test_asfreq import test_pi_asfreq_invalid_frequency
```



---
## test_pi_asfreq_invalid_baseoffset
```python
from test_asfreq import test_pi_asfreq_invalid_baseoffset
```



---
## test_dti_resolution
```python
from test_resolution import test_dti_resolution
```



---
## test_repeat_range
```python
from test_repeat import test_repeat_range
```



---
## test_repeat_range2
```python
from test_repeat import test_repeat_range2
```



---
## test_repeat_range3
```python
from test_repeat import test_repeat_range3
```



---
## test_repeat_range4
```python
from test_repeat import test_repeat_range4
```



---
## TestDatetimeIndexShift
```python
from test_shift import TestDatetimeIndexShift
```



---
## test_dti_shift_tzaware
```python
from test_shift import test_dti_shift_tzaware
```



---
## test_dti_shift_freqs
```python
from test_shift import test_dti_shift_freqs
```



---
## test_dti_shift_int
```python
from test_shift import test_dti_shift_int
```



---
## test_dti_shift_no_freq
```python
from test_shift import test_dti_shift_no_freq
```



---
## test_dti_shift_localized
```python
from test_shift import test_dti_shift_localized
```



---
## test_dti_shift_across_dst
```python
from test_shift import test_dti_shift_across_dst
```



---
## test_dti_shift_near_midnight
```python
from test_shift import test_dti_shift_near_midnight
```



---
## test_shift_bday
```python
from test_shift import test_shift_bday
```



---
## test_shift_bmonth
```python
from test_shift import test_shift_bmonth
```



---
## TestDateTimeIndexToJulianDate
```python
from test_to_julian_date import TestDateTimeIndexToJulianDate
```



---
## test_1700
```python
from test_to_julian_date import test_1700
```



---
## test_2000
```python
from test_to_julian_date import test_2000
```



---
## test_hour
```python
from test_to_julian_date import test_hour
```



---
## test_minute
```python
from test_to_julian_date import test_minute
```



---
## test_second
```python
from test_to_julian_date import test_second
```



---
## TestDatetimeIndexRound
```python
from test_round import TestDatetimeIndexRound
```



---
## test_round_daily
```python
from test_round import test_round_daily
```



---
## test_round2
```python
from test_round import test_round2
```



---
## test_round3
```python
from test_round import test_round3
```



---
## test_round4
```python
from test_round import test_round4
```



---
## test_no_rounding_occurs
```python
from test_round import test_no_rounding_occurs
```



---
## TestToPyDatetime
```python
from test_to_pydatetime import TestToPyDatetime
```



---
## test_dti_to_pydatetime
```python
from test_to_pydatetime import test_dti_to_pydatetime
```



---
## test_dti_to_pydatetime_fizedtz
```python
from test_to_pydatetime import test_dti_to_pydatetime_fizedtz
```



---
## test_insert_nat
```python
from test_insert import test_insert_nat
```



---
## test_insert_invalid_na
```python
from test_insert import test_insert_invalid_na
```



---
## test_insert_empty_preserves_freq
```python
from test_insert import test_insert_empty_preserves_freq
```



---
## test_insert2
```python
from test_insert import test_insert2
```



---
## test_insert3
```python
from test_insert import test_insert3
```



---
## test_insert4
```python
from test_insert import test_insert4
```



---
## test_insert_mismatched_tzawareness
```python
from test_insert import test_insert_mismatched_tzawareness
```



---
## test_insert_mismatched_tz
```python
from test_insert import test_insert_mismatched_tz
```



---
## test_insert_mismatched_types_raises
```python
from test_insert import test_insert_mismatched_types_raises
```



---
## test_insert_castable_str
```python
from test_insert import test_insert_castable_str
```



---
## test_insert_non_castable_str
```python
from test_insert import test_insert_non_castable_str
```



---
## test_to_frame_datetime_tz
```python
from test_to_frame import test_to_frame_datetime_tz
```



---
## test_to_frame_respects_none_name
```python
from test_to_frame import test_to_frame_respects_none_name
```



---
## test_dti_to_period
```python
from test_to_period import test_dti_to_period
```



---
## test_to_period_quarterly
```python
from test_to_period import test_to_period_quarterly
```



---
## test_to_period_quarterlyish
```python
from test_to_period import test_to_period_quarterlyish
```



---
## test_to_period_annualish
```python
from test_to_period import test_to_period_annualish
```



---
## test_to_period_monthish
```python
from test_to_period import test_to_period_monthish
```



---
## test_dti_to_period_2monthish
```python
from test_to_period import test_dti_to_period_2monthish
```



---
## test_to_period_frequency_M_Q_Y_A_deprecated
```python
from test_to_period import test_to_period_frequency_M_Q_Y_A_deprecated
```



---
## test_to_period_infer
```python
from test_to_period import test_to_period_infer
```



---
## test_period_dt64_round_trip
```python
from test_to_period import test_period_dt64_round_trip
```



---
## test_to_period_millisecond
```python
from test_to_period import test_to_period_millisecond
```



---
## test_to_period_microsecond
```python
from test_to_period import test_to_period_microsecond
```



---
## test_to_period_tz
```python
from test_to_period import test_to_period_tz
```



---
## test_to_period_tz_utc_offset_consistency
```python
from test_to_period import test_to_period_tz_utc_offset_consistency
```



---
## test_to_period_nofreq
```python
from test_to_period import test_to_period_nofreq
```



---
## test_to_period_offsets_not_supported
```python
from test_to_period import test_to_period_offsets_not_supported
```



---
## TestDatetimeIndexFactorize
```python
from test_factorize import TestDatetimeIndexFactorize
```



---
## test_factorize
```python
from test_factorize import test_factorize
```



---
## test_factorize_preserves_freq
```python
from test_factorize import test_factorize_preserves_freq
```



---
## test_factorize_tz
```python
from test_factorize import test_factorize_tz
```



---
## test_factorize_dst
```python
from test_factorize import test_factorize_dst
```



---
## test_factorize_no_freq_non_nano
```python
from test_factorize import test_factorize_no_freq_non_nano
```



---
## __name__
```python
from test_snap import __name__
```



---
## test_dti_snap
```python
from test_snap import test_dti_snap
```



---
## TestDelete
```python
from test_delete import TestDelete
```



---
## test_delete2
```python
from test_delete import test_delete2
```



---
## test_delete_slice2
```python
from test_delete import test_delete_slice2
```



---
## test_tz_localize_invalidates_freq
```python
from test_tz_localize import test_tz_localize_invalidates_freq
```



---
## test_tz_localize_utc_copies
```python
from test_tz_localize import test_tz_localize_utc_copies
```



---
## test_dti_tz_localize_nonexistent_raise_coerce
```python
from test_tz_localize import test_dti_tz_localize_nonexistent_raise_coerce
```



---
## test_dti_tz_localize_ambiguous_infer
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_infer
```



---
## test_dti_tz_localize_ambiguous_infer2
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_infer2
```



---
## test_dti_tz_localize_ambiguous_infer3
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_infer3
```



---
## test_dti_tz_localize_ambiguous_times
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_times
```



---
## test_dti_tz_localize_pass_dates_to_utc
```python
from test_tz_localize import test_dti_tz_localize_pass_dates_to_utc
```



---
## test_dti_tz_localize
```python
from test_tz_localize import test_dti_tz_localize
```



---
## test_dti_tz_localize_utc_conversion
```python
from test_tz_localize import test_dti_tz_localize_utc_conversion
```



---
## test_dti_tz_localize_roundtrip
```python
from test_tz_localize import test_dti_tz_localize_roundtrip
```



---
## test_dti_tz_localize_naive
```python
from test_tz_localize import test_dti_tz_localize_naive
```



---
## test_dti_tz_localize_tzlocal
```python
from test_tz_localize import test_dti_tz_localize_tzlocal
```



---
## test_dti_tz_localize_ambiguous_nat
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_nat
```



---
## test_dti_tz_localize_ambiguous_flags
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_flags
```



---
## test_dti_tz_localize_ambiguous_flags2
```python
from test_tz_localize import test_dti_tz_localize_ambiguous_flags2
```



---
## test_dti_tz_localize_bdate_range
```python
from test_tz_localize import test_dti_tz_localize_bdate_range
```



---
## test_dti_tz_localize_nonexistent_shift
```python
from test_tz_localize import test_dti_tz_localize_nonexistent_shift
```



---
## test_dti_tz_localize_nonexistent_shift_invalid
```python
from test_tz_localize import test_dti_tz_localize_nonexistent_shift_invalid
```



---
## TestDatetimeIndex
```python
from test_astype import TestDatetimeIndex
```



---
## test_dti_astype_asobject_around_dst_transition
```python
from test_astype import test_dti_astype_asobject_around_dst_transition
```



---
## test_astype2
```python
from test_astype import test_astype2
```



---
## test_astype_with_tz
```python
from test_astype import test_astype_with_tz
```



---
## test_astype_tzaware_to_tzaware
```python
from test_astype import test_astype_tzaware_to_tzaware
```



---
## test_astype_tznaive_to_tzaware
```python
from test_astype import test_astype_tznaive_to_tzaware
```



---
## test_astype_str_nat
```python
from test_astype import test_astype_str_nat
```



---
## test_astype_str_tz_and_name
```python
from test_astype import test_astype_str_tz_and_name
```



---
## test_astype_str_freq_and_name
```python
from test_astype import test_astype_str_freq_and_name
```



---
## test_astype_str_freq_and_tz
```python
from test_astype import test_astype_str_freq_and_tz
```



---
## test_astype_datetime64
```python
from test_astype import test_astype_datetime64
```



---
## test_astype_object_tz
```python
from test_astype import test_astype_object_tz
```



---
## test_astype_object_with_nat
```python
from test_astype import test_astype_object_with_nat
```



---
## test_index_convert_to_datetime_array
```python
from test_astype import test_index_convert_to_datetime_array
```



---
## test_index_convert_to_datetime_array_explicit_pytz
```python
from test_astype import test_index_convert_to_datetime_array_explicit_pytz
```



---
## test_index_convert_to_datetime_array_dateutil
```python
from test_astype import test_index_convert_to_datetime_array_dateutil
```



---
## test_integer_index_astype_datetime
```python
from test_astype import test_integer_index_astype_datetime
```



---
## test_dti_astype_period
```python
from test_astype import test_dti_astype_period
```



---
## _check_rng
```python
from test_astype import _check_rng
```



---
## __name__
```python
from test_to_series import __name__
```



---
## TestToSeries
```python
from test_to_series import TestToSeries
```



---
## test_to_series
```python
from test_to_series import test_to_series
```



---
## TestDatetimeIndexFillNA
```python
from test_fillna import TestDatetimeIndexFillNA
```



---
## test_fillna_datetime64
```python
from test_fillna import test_fillna_datetime64
```



---
## TestMap
```python
from test_map import TestMap
```



---
## test_map_fallthrough
```python
from test_map import test_map_fallthrough
```



---
## test_map_bug_1677
```python
from test_map import test_map_bug_1677
```



---
## test_index_map
```python
from test_map import test_index_map
```



---
## TestAsOf
```python
from test_asof import TestAsOf
```



---
## test_asof_partial
```python
from test_asof import test_asof_partial
```



---
## test_asof
```python
from test_asof import test_asof
```



---
## test_index_unique
```python
from test_unique import test_index_unique
```



---
## test_index_unique2
```python
from test_unique import test_index_unique2
```



---
## test_index_unique3
```python
from test_unique import test_index_unique3
```



---
## test_is_unique_monotonic
```python
from test_unique import test_is_unique_monotonic
```



---
## TestNormalize
```python
from test_normalize import TestNormalize
```



---
## test_normalize_nat
```python
from test_normalize import test_normalize_nat
```



---
## test_normalize_tz
```python
from test_normalize import test_normalize_tz
```



---
## test_normalize_tz_local
```python
from test_normalize import test_normalize_tz_local
```



---
## __name__
```python
from test_isocalendar import __name__
```



---
## test_isocalendar_returns_correct_values_close_to_new_year_with_tz
```python
from test_isocalendar import test_isocalendar_returns_correct_values_close_to_new_year_with_tz
```



---
## test_dti_timestamp_isocalendar_fields
```python
from test_isocalendar import test_dti_timestamp_isocalendar_fields
```



---
## test_tz_convert_nat
```python
from test_tz_convert import test_tz_convert_nat
```



---
## test_dti_tz_convert_compat_timestamp
```python
from test_tz_convert import test_dti_tz_convert_compat_timestamp
```



---
## test_dti_tz_convert_hour_overflow_dst
```python
from test_tz_convert import test_dti_tz_convert_hour_overflow_dst
```



---
## test_dti_tz_convert_hour_overflow_dst_timestamps
```python
from test_tz_convert import test_dti_tz_convert_hour_overflow_dst_timestamps
```



---
## test_dti_tz_convert_trans_pos_plus_1__bug
```python
from test_tz_convert import test_dti_tz_convert_trans_pos_plus_1__bug
```



---
## test_dti_tz_convert_dst
```python
from test_tz_convert import test_dti_tz_convert_dst
```



---
## test_dti_tz_convert_tzlocal
```python
from test_tz_convert import test_dti_tz_convert_tzlocal
```



---
## test_dti_tz_convert_utc_to_local_no_modify
```python
from test_tz_convert import test_dti_tz_convert_utc_to_local_no_modify
```



---
## test_tz_convert_unsorted
```python
from test_tz_convert import test_tz_convert_unsorted
```



---
## TestTimedeltaIndexShift
```python
from test_shift import TestTimedeltaIndexShift
```



---
## test_tdi_shift_empty
```python
from test_shift import test_tdi_shift_empty
```



---
## test_tdi_shift_hours
```python
from test_shift import test_tdi_shift_hours
```



---
## test_tdi_shift_minutes
```python
from test_shift import test_tdi_shift_minutes
```



---
## test_tdi_shift_int
```python
from test_shift import test_tdi_shift_int
```



---
## test_tdi_shift_nonstandard_freq
```python
from test_shift import test_tdi_shift_nonstandard_freq
```



---
## test_shift_no_freq
```python
from test_shift import test_shift_no_freq
```



---
## TestTimedeltaIndexInsert
```python
from test_insert import TestTimedeltaIndexInsert
```



---
## test_insert_empty
```python
from test_insert import test_insert_empty
```



---
## TestTimedeltaIndexFactorize
```python
from test_factorize import TestTimedeltaIndexFactorize
```



---
## TestTimedeltaIndex
```python
from test_astype import TestTimedeltaIndex
```



---
## test_astype_timedelta64
```python
from test_astype import test_astype_timedelta64
```



---
## test_astype_to_td64d_raises
```python
from test_astype import test_astype_to_td64d_raises
```



---
## test_astype_ms_to_s
```python
from test_astype import test_astype_ms_to_s
```



---
## test_astype_freq_conversion
```python
from test_astype import test_astype_freq_conversion
```



---
## test_fillna_timedelta
```python
from test_fillna import test_fillna_timedelta
```



---
## scatter_matrix
```python
from misc import scatter_matrix
```



---
## _get_marker_compat
```python
from misc import _get_marker_compat
```



---
## radviz
```python
from misc import radviz
```



---
## andrews_curves
```python
from misc import andrews_curves
```



---
## bootstrap_plot
```python
from misc import bootstrap_plot
```



---
## parallel_coordinates
```python
from misc import parallel_coordinates
```



---
## lag_plot
```python
from misc import lag_plot
```



---
## autocorrelation_plot
```python
from misc import autocorrelation_plot
```



---
## unpack_single_str_list
```python
from misc import unpack_single_str_list
```



---
## normalize
```python
from misc import normalize
```



---
## function
```python
from misc import function
```



---
## r
```python
from misc import r
```



---
## f
```python
from misc import f
```



---
## __name__
```python
from hist import __name__
```



---
## HistPlot
```python
from hist import HistPlot
```



---
## KdePlot
```python
from hist import KdePlot
```



---
## _grouped_plot
```python
from hist import _grouped_plot
```



---
## _grouped_hist
```python
from hist import _grouped_hist
```

Grouped histogram

Parameters
----------
data : Series/DataFrame
column : object, optional
by : object, optional
ax : axes, optional
bins : int, default 50
figsize : tuple, optional
layout : optional
sharex : bool, default False
sharey : bool, default False
rot : float, default 90
grid : bool, default True
legend: : bool, default False
kwargs : dict, keyword arguments passed to matplotlib.Axes.hist

Returns
-------
collection of Matplotlib Axes

---
## hist_series
```python
from hist import hist_series
```



---
## hist_frame
```python
from hist import hist_frame
```



---
## _kind
```python
from hist import _kind
```



---
## __init__
```python
from hist import __init__
```



---
## _adjust_bins
```python
from hist import _adjust_bins
```



---
## _calculate_bins
```python
from hist import _calculate_bins
```

Calculate bins given data

---
## _plot
```python
from hist import _plot
```



---
## _make_plot
```python
from hist import _make_plot
```



---
## _make_plot_keywords
```python
from hist import _make_plot_keywords
```



---
## _get_column_weights
```python
from hist import _get_column_weights
```



---
## _post_plot_logic
```python
from hist import _post_plot_logic
```



---
## orientation
```python
from hist import orientation
```



---
## _get_ind
```python
from hist import _get_ind
```



---
## plot_group
```python
from hist import plot_group
```



---
## __name__
```python
from boxplot import __name__
```



---
## _set_ticklabels
```python
from boxplot import _set_ticklabels
```

Set the tick labels of a given axis.

Due to https://github.com/matplotlib/matplotlib/pull/17266, we need to handle the
case of repeated ticks (due to `FixedLocator`) and thus we duplicate the number of
labels.

---
## BoxPlot
```python
from boxplot import BoxPlot
```



---
## maybe_color_bp
```python
from boxplot import maybe_color_bp
```



---
## _grouped_plot_by_column
```python
from boxplot import _grouped_plot_by_column
```



---
## boxplot
```python
from boxplot import boxplot
```



---
## boxplot_frame
```python
from boxplot import boxplot_frame
```



---
## boxplot_frame_groupby
```python
from boxplot import boxplot_frame_groupby
```



---
## _kind
```python
from boxplot import _kind
```



---
## BP
```python
from boxplot import BP
```



---
## __init__
```python
from boxplot import __init__
```



---
## _plot
```python
from boxplot import _plot
```



---
## _validate_color_args
```python
from boxplot import _validate_color_args
```



---
## _color_attrs
```python
from boxplot import _color_attrs
```



---
## _boxes_c
```python
from boxplot import _boxes_c
```



---
## _whiskers_c
```python
from boxplot import _whiskers_c
```



---
## _medians_c
```python
from boxplot import _medians_c
```



---
## _caps_c
```python
from boxplot import _caps_c
```



---
## _get_colors
```python
from boxplot import _get_colors
```



---
## _make_plot
```python
from boxplot import _make_plot
```



---
## _make_legend
```python
from boxplot import _make_legend
```



---
## _post_plot_logic
```python
from boxplot import _post_plot_logic
```



---
## orientation
```python
from boxplot import orientation
```



---
## result
```python
from boxplot import result
```



---
## plot_group
```python
from boxplot import plot_group
```



---
## get_standard_colors
```python
from style import get_standard_colors
```

Get standard colors based on `colormap`, `color_type` or `color` inputs.

Parameters
----------
num_colors : int
    Minimum number of colors to be returned.
    Ignored if `color` is a dictionary.
colormap : :py:class:`matplotlib.colors.Colormap`, optional
    Matplotlib colormap.
    When provided, the resulting colors will be derived from the colormap.
color_type : {"default", "random"}, optional
    Type of colors to derive. Used if provided `color` and `colormap` are None.
    Ignored if either `color` or `colormap` are not None.
color : dict or str or sequence, optional
    Color(s) to be used for deriving sequence of colors.
    Can be either be a dictionary, or a single color (single color string,
    or sequence of floats representing a single color),
    or a sequence of colors.

Returns
-------
dict or list
    Standard colors. Can either be a mapping if `color` was a dictionary,
    or a list of colors with a length of `num_colors` or more.

Warns
-----
UserWarning
    If both `colormap` and `color` are provided.
    Parameter `color` will override.

---
## _derive_colors
```python
from style import _derive_colors
```

Derive colors from either `colormap`, `color_type` or `color` inputs.

Get a list of colors either from `colormap`, or from `color`,
or from `color_type` (if both `colormap` and `color` are None).

Parameters
----------
color : str or sequence, optional
    Color(s) to be used for deriving sequence of colors.
    Can be either be a single color (single color string, or sequence of floats
    representing a single color), or a sequence of colors.
colormap : :py:class:`matplotlib.colors.Colormap`, optional
    Matplotlib colormap.
    When provided, the resulting colors will be derived from the colormap.
color_type : {"default", "random"}, optional
    Type of colors to derive. Used if provided `color` and `colormap` are None.
    Ignored if either `color` or `colormap`` are not None.
num_colors : int
    Number of colors to be extracted.

Returns
-------
list
    List of colors extracted.

Warns
-----
UserWarning
    If both `colormap` and `color` are provided.
    Parameter `color` will override.

---
## _cycle_colors
```python
from style import _cycle_colors
```

Cycle colors until achieving max of `num_colors` or length of `colors`.

Extra colors will be ignored by matplotlib if there are more colors
than needed and nothing needs to be done here.

---
## _get_colors_from_colormap
```python
from style import _get_colors_from_colormap
```

Get colors from colormap.

---
## _get_cmap_instance
```python
from style import _get_cmap_instance
```

Get instance of matplotlib colormap.

---
## _get_colors_from_color
```python
from style import _get_colors_from_color
```

Get colors from user input color.

---
## _is_single_color
```python
from style import _is_single_color
```

Check if `color` is a single color, not a sequence of colors.

Single color is of these kinds:
    - Named color "red", "C0", "firebrick"
    - Alias "g"
    - Sequence of floats, such as (0.1, 0.2, 0.3) or (0.1, 0.2, 0.3, 0.4).

See Also
--------
_is_single_string_color

---
## _gen_list_of_colors_from_iterable
```python
from style import _gen_list_of_colors_from_iterable
```

Yield colors from string of several letters or from collection of colors.

---
## _is_floats_color
```python
from style import _is_floats_color
```

Check if color comprises a sequence of floats representing color.

---
## _get_colors_from_color_type
```python
from style import _get_colors_from_color_type
```

Get colors from user input color type.

---
## _get_default_colors
```python
from style import _get_default_colors
```

Get `num_colors` of default colors from matplotlib rc params.

---
## _get_random_colors
```python
from style import _get_random_colors
```

Get `num_colors` of random colors.

---
## _random_color
```python
from style import _random_color
```

Get a random color represented as a list of length 3

---
## _is_single_string_color
```python
from style import _is_single_string_color
```

Check if `color` is a single string color.

Examples of single string colors:
    - 'r'
    - 'g'
    - 'red'
    - 'green'
    - 'C3'
    - 'firebrick'

Parameters
----------
color : Color
    Color string or sequence of floats.

Returns
-------
bool
    True if `color` looks like a valid color.
    False otherwise.

---
## do_adjust_figure
```python
from tools import do_adjust_figure
```

Whether fig has constrained_layout enabled.

---
## maybe_adjust_figure
```python
from tools import maybe_adjust_figure
```

Call fig.subplots_adjust unless fig has constrained_layout enabled.

---
## format_date_labels
```python
from tools import format_date_labels
```



---
## table
```python
from tools import table
```



---
## _get_layout
```python
from tools import _get_layout
```



---
## create_subplots
```python
from tools import create_subplots
```

Create a figure with a set of subplots already made.

This utility wrapper makes it convenient to create common layouts of
subplots, including the enclosing figure object, in a single call.

Parameters
----------
naxes : int
  Number of required axes. Exceeded axes are set invisible. Default is
  nrows * ncols.

sharex : bool
  If True, the X axis will be shared amongst all subplots.

sharey : bool
  If True, the Y axis will be shared amongst all subplots.

squeeze : bool

  If True, extra dimensions are squeezed out from the returned axis object:
    - if only one subplot is constructed (nrows=ncols=1), the resulting
    single Axis object is returned as a scalar.
    - for Nx1 or 1xN subplots, the returned object is a 1-d numpy object
    array of Axis objects are returned as numpy 1-d arrays.
    - for NxM subplots with N>1 and M>1 are returned as a 2d array.

  If False, no squeezing is done: the returned axis object is always
  a 2-d array containing Axis instances, even if it ends up being 1x1.

subplot_kw : dict
  Dict with keywords passed to the add_subplot() call used to create each
  subplots.

ax : Matplotlib axis object, optional

layout : tuple
  Number of rows and columns of the subplot grid.
  If not specified, calculated from naxes and layout_type

layout_type : {'box', 'horizontal', 'vertical'}, default 'box'
  Specify how to layout the subplot grid.

fig_kw : Other keyword arguments to be passed to the figure() call.
    Note that all keywords not recognized above will be
    automatically included here.

Returns
-------
fig, ax : tuple
  - fig is the Matplotlib Figure object
  - ax can be either a single axis object or an array of axis objects if
  more than one subplot was created.  The dimensions of the resulting array
  can be controlled with the squeeze keyword, see above.

Examples
--------
x = np.linspace(0, 2*np.pi, 400)
y = np.sin(x**2)

# Just a figure and one subplot
f, ax = plt.subplots()
ax.plot(x, y)
ax.set_title('Simple plot')

# Two subplots, unpack the output array immediately
f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
ax1.plot(x, y)
ax1.set_title('Sharing Y axis')
ax2.scatter(x, y)

# Four polar axes
plt.subplots(2, 2, subplot_kw=dict(polar=True))

---
## _remove_labels_from_axis
```python
from tools import _remove_labels_from_axis
```



---
## _has_externally_shared_axis
```python
from tools import _has_externally_shared_axis
```

Return whether an axis is externally shared.

Parameters
----------
ax1 : matplotlib.axes.Axes
    Axis to query.
compare_axis : str
    `"x"` or `"y"` according to whether the X-axis or Y-axis is being
    compared.

Returns
-------
bool
    `True` if the axis is externally shared. Otherwise `False`.

Notes
-----
If two axes with different positions are sharing an axis, they can be
referred to as *externally* sharing the common axis.

If two axes sharing an axis also have the same position, they can be
referred to as *internally* sharing the common axis (a.k.a twinning).

_handle_shared_axes() is only interested in axes externally sharing an
axis, regardless of whether either of the axes is also internally sharing
with a third axis.

---
## handle_shared_axes
```python
from tools import handle_shared_axes
```



---
## flatten_axes
```python
from tools import flatten_axes
```



---
## set_ticks_props
```python
from tools import set_ticks_props
```



---
## get_all_lines
```python
from tools import get_all_lines
```



---
## get_xlim
```python
from tools import get_xlim
```



---
## __name__
```python
from converter import __name__
```



---
## get_pairs
```python
from converter import get_pairs
```



---
## register_pandas_matplotlib_converters
```python
from converter import register_pandas_matplotlib_converters
```

Decorator applying pandas_converters.

---
## pandas_converters
```python
from converter import pandas_converters
```

Context manager registering pandas' converters for a plot.

See Also
--------
register_pandas_matplotlib_converters : Decorator that applies this.

---
## register
```python
from converter import register
```



---
## deregister
```python
from converter import deregister
```



---
## _to_ordinalf
```python
from converter import _to_ordinalf
```



---
## time2num
```python
from converter import time2num
```



---
## TimeConverter
```python
from converter import TimeConverter
```



---
## TimeFormatter
```python
from converter import TimeFormatter
```



---
## PeriodConverter
```python
from converter import PeriodConverter
```



---
## get_datevalue
```python
from converter import get_datevalue
```



---
## DatetimeConverter
```python
from converter import DatetimeConverter
```



---
## PandasAutoDateFormatter
```python
from converter import PandasAutoDateFormatter
```



---
## PandasAutoDateLocator
```python
from converter import PandasAutoDateLocator
```



---
## MilliSecondLocator
```python
from converter import MilliSecondLocator
```



---
## _from_ordinal
```python
from converter import _from_ordinal
```



---
## _get_default_annual_spacing
```python
from converter import _get_default_annual_spacing
```

Returns a default spacing between consecutive ticks for annual data.

---
## _period_break
```python
from converter import _period_break
```

Returns the indices where the given period changes.

Parameters
----------
dates : PeriodIndex
    Array of intervals to monitor.
period : str
    Name of the period to monitor.

---
## _period_break_mask
```python
from converter import _period_break_mask
```



---
## has_level_label
```python
from converter import has_level_label
```

Returns true if the ``label_flags`` indicate there is at least one label
for this level.

if the minimum view limit is not an exact integer, then the first tick
label won't be shown, so we must adjust for that.

---
## _get_periods_per_ymd
```python
from converter import _get_periods_per_ymd
```



---
## _daily_finder
```python
from converter import _daily_finder
```



---
## _monthly_finder
```python
from converter import _monthly_finder
```



---
## _quarterly_finder
```python
from converter import _quarterly_finder
```



---
## _annual_finder
```python
from converter import _annual_finder
```



---
## get_finder
```python
from converter import get_finder
```



---
## TimeSeries_DateLocator
```python
from converter import TimeSeries_DateLocator
```

Locates the ticks along an axis controlled by a :class:`Series`.

Parameters
----------
freq : BaseOffset
    Valid frequency specifier.
minor_locator : {False, True}, optional
    Whether the locator is for minor ticks (True) or not.
dynamic_mode : {True, False}, optional
    Whether the locator should work in dynamic mode.
base : {int}, optional
quarter : {int}, optional
month : {int}, optional
day : {int}, optional

---
## TimeSeries_DateFormatter
```python
from converter import TimeSeries_DateFormatter
```

Formats the ticks along an axis controlled by a :class:`PeriodIndex`.

Parameters
----------
freq : BaseOffset
    Valid frequency specifier.
minor_locator : bool, default False
    Whether the current formatter should apply to minor ticks (True) or
    major ticks (False).
dynamic_mode : bool, default True
    Whether the formatter works in dynamic mode or not.

---
## TimeSeries_TimedeltaFormatter
```python
from converter import TimeSeries_TimedeltaFormatter
```

Formats the ticks along an axis controlled by a :class:`TimedeltaIndex`.

---
## wrapper
```python
from converter import wrapper
```



---
## convert
```python
from converter import convert
```



---
## axisinfo
```python
from converter import axisinfo
```

Return the :class:`~matplotlib.units.AxisInfo` for *unit*.

*unit* is a tzinfo instance or None.
The *axis* argument is required but not used.

---
## default_units
```python
from converter import default_units
```



---
## __init__
```python
from converter import __init__
```



---
## __call__
```python
from converter import __call__
```



---
## _convert_1d
```python
from converter import _convert_1d
```



---
## get_locator
```python
from converter import get_locator
```

Pick the best locator based on a distance.

---
## _get_unit
```python
from converter import _get_unit
```



---
## get_unit_generic
```python
from converter import get_unit_generic
```



---
## _get_interval
```python
from converter import _get_interval
```



---
## autoscale
```python
from converter import autoscale
```

Sets the view limits to the nearest multiples of base that contain the
data.

---
## first_label
```python
from converter import first_label
```



---
## _get_default_locs
```python
from converter import _get_default_locs
```

Returns the default locations of ticks.

---
## _set_default_format
```python
from converter import _set_default_format
```

Returns the default ticks spacing.

---
## set_locs
```python
from converter import set_locs
```

Sets the locations of the ticks

---
## format_timedelta_ticks
```python
from converter import format_timedelta_ticks
```

Convert seconds to 'D days HH:MM:SS.F'

---
## try_parse
```python
from converter import try_parse
```



---
## _hour_finder
```python
from converter import _hour_finder
```



---
## _minute_finder
```python
from converter import _minute_finder
```



---
## _second_finder
```python
from converter import _second_finder
```



---
## plot
```python
from __init__ import plot
```



---
## _color_in_style
```python
from core import _color_in_style
```

Check if there is a color letter in the style string.

---
## MPLPlot
```python
from core import MPLPlot
```

Base class for assembling a pandas plot using matplotlib

Parameters
----------
data :

---
## PlanePlot
```python
from core import PlanePlot
```

Abstract class for plotting on plane, currently scatter and hexbin.

---
## ScatterPlot
```python
from core import ScatterPlot
```



---
## HexBinPlot
```python
from core import HexBinPlot
```



---
## LinePlot
```python
from core import LinePlot
```



---
## AreaPlot
```python
from core import AreaPlot
```



---
## BarPlot
```python
from core import BarPlot
```



---
## BarhPlot
```python
from core import BarhPlot
```



---
## PiePlot
```python
from core import PiePlot
```



---
## _kind
```python
from core import _kind
```



---
## orientation
```python
from core import orientation
```



---
## _validate_sharex
```python
from core import _validate_sharex
```



---
## _validate_log_kwd
```python
from core import _validate_log_kwd
```



---
## _validate_subplots_kwarg
```python
from core import _validate_subplots_kwarg
```

Validate the subplots parameter

- check type and content
- check for duplicate columns
- check for invalid column names
- convert column names into indices
- add missing columns in a group of their own
See comments in code below for more details.

Parameters
----------
subplots : subplots parameters as passed to PlotAccessor

Returns
-------
validated subplots : a bool or a list of tuples of column indices. Columns
in the same tuple will be grouped together in the resulting plot.

---
## _validate_color_args
```python
from core import _validate_color_args
```



---
## _iter_data
```python
from core import _iter_data
```



---
## _get_nseries
```python
from core import _get_nseries
```



---
## nseries
```python
from core import nseries
```



---
## draw
```python
from core import draw
```



---
## generate
```python
from core import generate
```



---
## _has_plotted_object
```python
from core import _has_plotted_object
```

check whether ax has data

---
## _maybe_right_yaxis
```python
from core import _maybe_right_yaxis
```



---
## fig
```python
from core import fig
```



---
## axes
```python
from core import axes
```



---
## _axes_and_fig
```python
from core import _axes_and_fig
```



---
## result
```python
from core import result
```

Return result axes

---
## _convert_to_ndarray
```python
from core import _convert_to_ndarray
```



---
## _ensure_frame
```python
from core import _ensure_frame
```



---
## _compute_plot_data
```python
from core import _compute_plot_data
```



---
## _make_plot
```python
from core import _make_plot
```



---
## _add_table
```python
from core import _add_table
```



---
## _post_plot_logic_common
```python
from core import _post_plot_logic_common
```

Common post process for each axes

---
## _post_plot_logic
```python
from core import _post_plot_logic
```



---
## _adorn_subplots
```python
from core import _adorn_subplots
```

Common post process unrelated to data

---
## _apply_axis_properties
```python
from core import _apply_axis_properties
```

Tick creation within matplotlib is reasonably expensive and is
internally deferred until accessed as Ticks are created/destroyed
multiple times per draw. It's therefore beneficial for us to avoid
accessing unless we will act on the Tick.

---
## legend_title
```python
from core import legend_title
```



---
## _mark_right_label
```python
from core import _mark_right_label
```

Append ``(right)`` to the label of a line if it's plotted on the right axis.

Note that ``(right)`` is only appended when ``subplots=False``.

---
## _append_legend_handles_labels
```python
from core import _append_legend_handles_labels
```

Append current handle and label to ``legend_handles`` and ``legend_labels``.

These will be used to make the legend.

---
## _make_legend
```python
from core import _make_legend
```



---
## _get_ax_legend
```python
from core import _get_ax_legend
```

Take in axes and return ax and legend under different scenarios

---
## plt
```python
from core import plt
```



---
## _get_xticks
```python
from core import _get_xticks
```



---
## _plot
```python
from core import _plot
```



---
## _get_custom_index_name
```python
from core import _get_custom_index_name
```



---
## _get_index_name
```python
from core import _get_index_name
```



---
## _get_ax_layer
```python
from core import _get_ax_layer
```

get left (primary) or right (secondary) axes

---
## _col_idx_to_axis_idx
```python
from core import _col_idx_to_axis_idx
```

Return the index of the axis where the column at col_idx should be plotted

---
## _get_ax
```python
from core import _get_ax
```



---
## on_right
```python
from core import on_right
```



---
## _apply_style_colors
```python
from core import _apply_style_colors
```

Manage style and color based on column number and its label.
Returns tuple of appropriate style and kwds which "color" may be added.

---
## _get_colors
```python
from core import _get_colors
```



---
## _parse_errorbars
```python
from core import _parse_errorbars
```

Look for error keyword arguments and return the actual errorbar data
or return the error DataFrame/dict

Error bars can be specified in several ways:
    Series: the user provides a pandas.Series object of the same
            length as the data
    ndarray: provides a np.ndarray of the same length as the data
    DataFrame/dict: error values are paired with keys matching the
            key in the plotted DataFrame
    str: the name of the column within the plotted DataFrame

Asymmetrical error bars are also supported, however raw error values
must be provided in this case. For a ``N`` length :class:`Series`, a
``2xN`` array should be provided indicating lower and upper (or left
and right) errors. For a ``MxN`` :class:`DataFrame`, asymmetrical errors
should be in a ``Mx2xN`` array.

---
## _get_errorbars
```python
from core import _get_errorbars
```



---
## _get_subplots
```python
from core import _get_subplots
```



---
## _get_axes_layout
```python
from core import _get_axes_layout
```



---
## _plot_colorbar
```python
from core import _plot_colorbar
```



---
## _get_c_values
```python
from core import _get_c_values
```



---
## _get_norm_and_cmap
```python
from core import _get_norm_and_cmap
```



---
## _get_colorbar
```python
from core import _get_colorbar
```



---
## _is_ts_plot
```python
from core import _is_ts_plot
```



---
## _use_dynamic_x
```python
from core import _use_dynamic_x
```



---
## _ts_plot
```python
from core import _ts_plot
```



---
## _get_stacking_id
```python
from core import _get_stacking_id
```



---
## _initialize_stacker
```python
from core import _initialize_stacker
```



---
## _get_stacked_values
```python
from core import _get_stacked_values
```



---
## _update_stacker
```python
from core import _update_stacker
```



---
## ax_pos
```python
from core import ax_pos
```



---
## tickoffset
```python
from core import tickoffset
```



---
## lim_offset
```python
from core import lim_offset
```



---
## _start_base
```python
from core import _start_base
```



---
## _decorate_ticks
```python
from core import _decorate_ticks
```



---
## match_labels
```python
from core import match_labels
```



---
## get_label
```python
from core import get_label
```



---
## blank_labeler
```python
from core import blank_labeler
```



---
## create_iter_data_given_by
```python
from groupby import create_iter_data_given_by
```

Create data for iteration given `by` is assigned or not, and it is only
used in both hist and boxplot.

If `by` is assigned, return a dictionary of DataFrames in which the key of
dictionary is the values in groups.
If `by` is not assigned, return input as is, and this preserves current
status of iter_data.

Parameters
----------
data : reformatted grouped data from `_compute_plot_data` method.
kind : str, plot kind. This function is only used for `hist` and `box` plots.

Returns
-------
iter_data : DataFrame or Dictionary of DataFrames

Examples
--------
If `by` is assigned:

>>> import numpy as np
>>> tuples = [('h1', 'a'), ('h1', 'b'), ('h2', 'a'), ('h2', 'b')]
>>> mi = pd.MultiIndex.from_tuples(tuples)
>>> value = [[1, 3, np.nan, np.nan],
...          [3, 4, np.nan, np.nan], [np.nan, np.nan, 5, 6]]
>>> data = pd.DataFrame(value, columns=mi)
>>> create_iter_data_given_by(data)
{'h1':     h1
     a    b
0  1.0  3.0
1  3.0  4.0
2  NaN  NaN, 'h2':     h2
     a    b
0  NaN  NaN
1  NaN  NaN
2  5.0  6.0}

---
## reconstruct_data_with_by
```python
from groupby import reconstruct_data_with_by
```

Internal function to group data, and reassign multiindex column names onto the
result in order to let grouped data be used in _compute_plot_data method.

Parameters
----------
data : Original DataFrame to plot
by : grouped `by` parameter selected by users
cols : columns of data set (excluding columns used in `by`)

Returns
-------
Output is the reconstructed DataFrame with MultiIndex columns. The first level
of MI is unique values of groups, and second level of MI is the columns
selected by users.

Examples
--------
>>> d = {'h': ['h1', 'h1', 'h2'], 'a': [1, 3, 5], 'b': [3, 4, 6]}
>>> df = pd.DataFrame(d)
>>> reconstruct_data_with_by(df, by='h', cols=['a', 'b'])
   h1      h2
   a     b     a     b
0  1.0   3.0   NaN   NaN
1  3.0   4.0   NaN   NaN
2  NaN   NaN   5.0   6.0

---
## reformat_hist_y_given_by
```python
from groupby import reformat_hist_y_given_by
```

Internal function to reformat y given `by` is applied or not for hist plot.

If by is None, input y is 1-d with NaN removed; and if by is not None, groupby
will take place and input y is multi-dimensional array.

---
## maybe_resample
```python
from timeseries import maybe_resample
```



---
## _is_sub
```python
from timeseries import _is_sub
```



---
## _is_sup
```python
from timeseries import _is_sup
```



---
## _upsample_others
```python
from timeseries import _upsample_others
```



---
## _replot_ax
```python
from timeseries import _replot_ax
```



---
## decorate_axes
```python
from timeseries import decorate_axes
```

Initialize axes for time-series plotting

---
## _get_ax_freq
```python
from timeseries import _get_ax_freq
```

Get the freq attribute of the ax object if set.
Also checks shared axes (eg when using secondary yaxis, sharex=True
or twinx)

---
## _get_period_alias
```python
from timeseries import _get_period_alias
```



---
## _get_freq
```python
from timeseries import _get_freq
```



---
## use_dynamic_x
```python
from timeseries import use_dynamic_x
```



---
## _get_index_freq
```python
from timeseries import _get_index_freq
```



---
## maybe_convert_index
```python
from timeseries import maybe_convert_index
```



---
## _format_coord
```python
from timeseries import _format_coord
```



---
## format_dateaxis
```python
from timeseries import format_dateaxis
```

Pretty-formats the date axis (x-axis).

Major and minor ticks are automatically set for the frequency of the
current underlying series.  As the dynamic mode is activated by
default, changing the limits of the x axis will intelligently change
the positions of the ticks.

---
## tzfile
```python
from __init__ import tzfile
```



---
## getzoneinfofile_stream
```python
from __init__ import getzoneinfofile_stream
```



---
## ZoneInfoFile
```python
from __init__ import ZoneInfoFile
```



---
## get_zonefile_instance
```python
from __init__ import get_zonefile_instance
```

This is a convenience function which provides a :class:`ZoneInfoFile`
instance using the data provided by the ``dateutil`` package. By default, it
caches a single instance of the ZoneInfoFile object and returns that.

:param new_instance:
    If ``True``, a new instance of :class:`ZoneInfoFile` is instantiated and
    used as the cached instance for the next call. Otherwise, new instances
    are created only as necessary.

:return:
    Returns a :class:`ZoneInfoFile` object.

.. versionadded:: 2.6

---
## gettz
```python
from __init__ import gettz
```

This retrieves a time zone from the local zoneinfo tarball that is packaged
with dateutil.

:param name:
    An IANA-style time zone name, as found in the zoneinfo file.

:return:
    Returns a :class:`dateutil.tz.tzfile` time zone object.

.. warning::
    It is generally inadvisable to use this function, and it is only
    provided for API compatibility with earlier versions. This is *not*
    equivalent to ``dateutil.tz.gettz()``, which selects an appropriate
    time zone based on the inputs, favoring system zoneinfo. This is ONLY
    for accessing the dateutil-specific zoneinfo (which may be out of
    date compared to the system zoneinfo).

.. deprecated:: 2.6
    If you need to use a specific zoneinfofile over the system zoneinfo,
    instantiate a :class:`dateutil.zoneinfo.ZoneInfoFile` object and call
    :func:`dateutil.zoneinfo.ZoneInfoFile.get(name)` instead.

    Use :func:`get_zonefile_instance` to retrieve an instance of the
    dateutil-provided zoneinfo.

---
## gettz_db_metadata
```python
from __init__ import gettz_db_metadata
```

Get the zonefile metadata

See `zonefile_metadata`_

:returns:
    A dictionary with the database metadata

.. deprecated:: 2.6
    See deprecation warning in :func:`zoneinfo.gettz`. To get metadata,
    query the attribute ``zoneinfo.ZoneInfoFile.metadata``.

---
## __name__
```python
from rebuild import __name__
```



---
## rebuild
```python
from rebuild import rebuild
```

Rebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*tar*

filename is the timezone tarball from ``ftp.iana.org/tz``.

---
## _run_zic
```python
from rebuild import _run_zic
```

Calls the ``zic`` compiler in a compatible way to get a "fat" binary.

Recent versions of ``zic`` default to ``-b slim``, while older versions
don't even have the ``-b`` option (but default to "fat" binaries). The
current version of dateutil does not support Version 2+ TZif files, which
causes problems when used in conjunction with "slim" binaries, so this
function is used to ensure that we always get a "fat" binary.

---
## _print_on_nosuchfile
```python
from rebuild import _print_on_nosuchfile
```

Print helpful troubleshooting message

e is an exception raised by subprocess.check_call()

---
## __name__
```python
from isoparser import __name__
```

This module offers a parser for ISO-8601 strings

It is intended to support all valid date, time and datetime formats per the
ISO-8601 specification.

..versionadded:: 2.7.0

---
## _takes_ascii
```python
from isoparser import _takes_ascii
```



---
## isoparser
```python
from isoparser import isoparser
```



---
## func
```python
from isoparser import func
```



---
## __init__
```python
from isoparser import __init__
```

:param sep:
A single character that separates date and time portions. If
``None``, the parser will accept any single character.
For strict ISO-8601 adherence, pass ``'T'``.

---
## isoparse
```python
from isoparser import isoparse
```

Parse an ISO-8601 datetime string into a :class:`datetime.datetime`.

An ISO-8601 datetime string consists of a date portion, followed
optionally by a time portion - the date and time portions are separated
by a single character separator, which is ``T`` in the official
standard. Incomplete date formats (such as ``YYYY-MM``) may *not* be
combined with a time portion.

Supported date formats are:

Common:

- ``YYYY``
- ``YYYY-MM``
- ``YYYY-MM-DD`` or ``YYYYMMDD``

Uncommon:

- ``YYYY-Www`` or ``YYYYWww`` - ISO week (day defaults to 0)
- ``YYYY-Www-D`` or ``YYYYWwwD`` - ISO week and day

The ISO week and day numbering follows the same logic as
:func:`datetime.date.isocalendar`.

Supported time formats are:

- ``hh``
- ``hh:mm`` or ``hhmm``
- ``hh:mm:ss`` or ``hhmmss``
- ``hh:mm:ss.ssssss`` (Up to 6 sub-second digits)

Midnight is a special case for `hh`, as the standard supports both
00:00 and 24:00 as a representation. The decimal separator can be
either a dot or a comma.


.. caution::

    Support for fractional components other than seconds is part of the
    ISO-8601 standard, but is not currently implemented in this parser.

Supported time zone offset formats are:

- `Z` (UTC)
- `±HH:MM`
- `±HHMM`
- `±HH`

Offsets will be represented as :class:`dateutil.tz.tzoffset` objects,
with the exception of UTC, which will be represented as
:class:`dateutil.tz.tzutc`. Time zone offsets equivalent to UTC (such
as `+00:00`) will also be represented as :class:`dateutil.tz.tzutc`.

:param dt_str:
    A string or stream containing only an ISO-8601 datetime string

:return:
    Returns a :class:`datetime.datetime` representing the string.
    Unspecified components default to their lowest value.

.. warning::

    As of version 2.7.0, the strictness of the parser should not be
    considered a stable part of the contract. Any valid ISO-8601 string
    that parses correctly with the default settings will continue to
    parse correctly in future versions, but invalid strings that
    currently fail (e.g. ``2017-01-01T00:00+00:00:00``) are not
    guaranteed to continue failing in future versions if they encode
    a valid date.

.. versionadded:: 2.7.0

---
## parse_isodate
```python
from isoparser import parse_isodate
```

Parse the date portion of an ISO string.

:param datestr:
    The string portion of an ISO string, without a separator

:return:
    Returns a :class:`datetime.date` object

---
## parse_isotime
```python
from isoparser import parse_isotime
```

Parse the time portion of an ISO string.

:param timestr:
    The time portion of an ISO string, without a separator

:return:
    Returns a :class:`datetime.time` object

---
## parse_tzstr
```python
from isoparser import parse_tzstr
```

Parse a valid ISO time zone string.

See :func:`isoparser.isoparse` for details on supported formats.

:param tzstr:
    A string representing an ISO time zone offset

:param zero_as_utc:
    Whether to return :class:`dateutil.tz.tzutc` for zero-offset zones

:return:
    Returns :class:`dateutil.tz.tzoffset` for offsets and
    :class:`dateutil.tz.tzutc` for ``Z`` and (if ``zero_as_utc`` is
    specified) offsets equivalent to UTC.

---
## _parse_isodate
```python
from isoparser import _parse_isodate
```



---
## _parse_isodate_common
```python
from isoparser import _parse_isodate_common
```



---
## _parse_isodate_uncommon
```python
from isoparser import _parse_isodate_uncommon
```



---
## _calculate_weekdate
```python
from isoparser import _calculate_weekdate
```

Calculate the day of corresponding to the ISO year-week-day calendar.

This function is effectively the inverse of
:func:`datetime.date.isocalendar`.

:param year:
    The year in the ISO calendar

:param week:
    The week in the ISO calendar - range is [1, 53]

:param day:
    The day in the ISO calendar - range is [1 (MON), 7 (SUN)]

:return:
    Returns a :class:`datetime.date`

---
## _parse_isotime
```python
from isoparser import _parse_isotime
```



---
## _parse_tzstr
```python
from isoparser import _parse_tzstr
```



---
## __deprecated_private_func
```python
from __init__ import __deprecated_private_func
```



---
## __deprecate_private_class
```python
from __init__ import __deprecate_private_class
```



---
## deprecated_func
```python
from __init__ import deprecated_func
```



---
## private_class
```python
from __init__ import private_class
```



---
## _timelex
```python
from _parser import _timelex
```



---
## _resultbase
```python
from _parser import _resultbase
```



---
## parserinfo
```python
from _parser import parserinfo
```

Class which handles what inputs are accepted. Subclass this to customize
the language and acceptable values for each parameter.

:param dayfirst:
    Whether to interpret the first value in an ambiguous 3-integer date
    (e.g. 01/05/09) as the day (``True``) or month (``False``). If
    ``yearfirst`` is set to ``True``, this distinguishes between YDM
    and YMD. Default is ``False``.

:param yearfirst:
    Whether to interpret the first value in an ambiguous 3-integer date
    (e.g. 01/05/09) as the year. If ``True``, the first number is taken
    to be the year, otherwise the last number is taken to be the year.
    Default is ``False``.

---
## _ymd
```python
from _parser import _ymd
```



---
## parse
```python
from _parser import parse
```



---
## _tzparser
```python
from _parser import _tzparser
```



---
## _parsetz
```python
from _parser import _parsetz
```



---
## ParserError
```python
from _parser import ParserError
```

Exception subclass used for any failure to parse a datetime string.

This is a subclass of :py:exc:`ValueError`, and should be raised any time
earlier versions of ``dateutil`` would have raised ``ValueError``.

.. versionadded:: 2.8.1

---
## UnknownTimezoneWarning
```python
from _parser import UnknownTimezoneWarning
```

Raised when the parser finds a timezone it cannot parse into a tzinfo.

.. versionadded:: 2.7.0

---
## get_token
```python
from _parser import get_token
```

This function breaks the time string into lexical units (tokens), which
can be parsed by the parser. Lexical units are demarcated by changes in
the character set, so any continuous string of letters is considered
one unit, any continuous string of numbers is considered one unit.

The main complication arises from the fact that dots ('.') can be used
both as separators (e.g. "Sep.20.2009") or decimal points (e.g.
"4:30:21.447"). As such, it is necessary to read the full context of
any dot-separated strings before breaking it into tokens; as such, this
function maintains a "token stack", for when the ambiguous context
demands that multiple tokens be parsed at once.

---
## __iter__
```python
from _parser import __iter__
```



---
## __next__
```python
from _parser import __next__
```



---
## next
```python
from _parser import next
```



---
## split
```python
from _parser import split
```



---
## isword
```python
from _parser import isword
```

Whether or not the next character is part of a word 

---
## isnum
```python
from _parser import isnum
```

Whether the next character is part of a number 

---
## isspace
```python
from _parser import isspace
```

Whether the next character is whitespace 

---
## _repr
```python
from _parser import _repr
```



---
## __len__
```python
from _parser import __len__
```



---
## _convert
```python
from _parser import _convert
```



---
## jump
```python
from _parser import jump
```



---
## weekday
```python
from _parser import weekday
```



---
## month
```python
from _parser import month
```



---
## hms
```python
from _parser import hms
```



---
## ampm
```python
from _parser import ampm
```



---
## pertain
```python
from _parser import pertain
```



---
## utczone
```python
from _parser import utczone
```



---
## tzoffset
```python
from _parser import tzoffset
```



---
## convertyear
```python
from _parser import convertyear
```

Converts two-digit years to year within [-50, 49]
range of self._year (current local time)

---
## validate
```python
from _parser import validate
```



---
## has_year
```python
from _parser import has_year
```



---
## has_month
```python
from _parser import has_month
```



---
## has_day
```python
from _parser import has_day
```



---
## could_be_day
```python
from _parser import could_be_day
```



---
## append
```python
from _parser import append
```



---
## _resolve_from_stridxs
```python
from _parser import _resolve_from_stridxs
```

Try to resolve the identities of year/month/day elements using
ystridx, mstridx, and dstridx, if enough of these are specified.

---
## resolve_ymd
```python
from _parser import resolve_ymd
```



---
## _result
```python
from _parser import _result
```



---
## _parse
```python
from _parser import _parse
```

Private method which performs the heavy lifting of parsing, called from
``parse()``, which passes on its ``kwargs`` to this function.

:param timestr:
    The string to parse.

:param dayfirst:
    Whether to interpret the first value in an ambiguous 3-integer date
    (e.g. 01/05/09) as the day (``True``) or month (``False``). If
    ``yearfirst`` is set to ``True``, this distinguishes between YDM
    and YMD. If set to ``None``, this value is retrieved from the
    current :class:`parserinfo` object (which itself defaults to
    ``False``).

:param yearfirst:
    Whether to interpret the first value in an ambiguous 3-integer date
    (e.g. 01/05/09) as the year. If ``True``, the first number is taken
    to be the year, otherwise the last number is taken to be the year.
    If this is set to ``None``, the value is retrieved from the current
    :class:`parserinfo` object (which itself defaults to ``False``).

:param fuzzy:
    Whether to allow fuzzy parsing, allowing for string like "Today is
    January 1, 2047 at 8:21:00AM".

:param fuzzy_with_tokens:
    If ``True``, ``fuzzy`` is automatically set to True, and the parser
    will return a tuple where the first element is the parsed
    :class:`datetime.datetime` datetimestamp and the second element is
    a tuple containing the portions of the string which were ignored:

    .. doctest::

        >>> from dateutil.parser import parse
        >>> parse("Today is January 1, 2047 at 8:21:00AM", fuzzy_with_tokens=True)
        (datetime.datetime(2047, 1, 1, 8, 21), (u'Today is ', u' ', u'at '))

---
## _parse_numeric_token
```python
from _parser import _parse_numeric_token
```



---
## _find_hms_idx
```python
from _parser import _find_hms_idx
```



---
## _assign_hms
```python
from _parser import _assign_hms
```



---
## _could_be_tzname
```python
from _parser import _could_be_tzname
```



---
## _ampm_valid
```python
from _parser import _ampm_valid
```

For fuzzy parsing, 'a' or 'am' (both valid English words)
may erroneously trigger the AM/PM flag. Deal with that
here.

---
## _adjust_ampm
```python
from _parser import _adjust_ampm
```



---
## _parse_min_sec
```python
from _parser import _parse_min_sec
```



---
## _parse_hms
```python
from _parser import _parse_hms
```



---
## _parsems
```python
from _parser import _parsems
```

Parse a I[.F] seconds value into (seconds, microseconds).

---
## _to_decimal
```python
from _parser import _to_decimal
```



---
## _build_tzinfo
```python
from _parser import _build_tzinfo
```



---
## _build_tzaware
```python
from _parser import _build_tzaware
```



---
## _build_naive
```python
from _parser import _build_naive
```



---
## _assign_tzname
```python
from _parser import _assign_tzname
```



---
## _recombine_skipped
```python
from _parser import _recombine_skipped
```

>>> tokens = ["foo", " ", "bar", " ", "19June2000", "baz"]
>>> skipped_idxs = [0, 1, 2, 5]
>>> _recombine_skipped(tokens, skipped_idxs)
["foo bar", "baz"]

---
## _attr
```python
from _parser import _attr
```



---
## __name__
```python
from _factories import __name__
```



---
## _TzSingleton
```python
from _factories import _TzSingleton
```



---
## _TzFactory
```python
from _factories import _TzFactory
```



---
## _TzOffsetFactory
```python
from _factories import _TzOffsetFactory
```



---
## _TzStrFactory
```python
from _factories import _TzStrFactory
```



---
## __init__
```python
from _factories import __init__
```



---
## __call__
```python
from _factories import __call__
```



---
## instance
```python
from _factories import instance
```

Alternate constructor that returns a fresh instance

---
## tzutc
```python
from tz import tzutc
```

This is a tzinfo object that represents the UTC time zone.

**Examples:**

.. doctest::

    >>> from datetime import *
    >>> from dateutil.tz import *

    >>> datetime.now()
    datetime.datetime(2003, 9, 27, 9, 40, 1, 521290)

    >>> datetime.now(tzutc())
    datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc())

    >>> datetime.now(tzutc()).tzname()
    'UTC'

.. versionchanged:: 2.7.0
    ``tzutc()`` is now a singleton, so the result of ``tzutc()`` will
    always return the same object.

    .. doctest::

        >>> from dateutil.tz import tzutc, UTC
        >>> tzutc() is tzutc()
        True
        >>> tzutc() is UTC
        True

---
## tzoffset
```python
from tz import tzoffset
```

A simple class for representing a fixed offset from UTC.

:param name:
    The timezone name, to be returned when ``tzname()`` is called.
:param offset:
    The time zone offset in seconds, or (since version 2.6.0, represented
    as a :py:class:`datetime.timedelta` object).

---
## tzlocal
```python
from tz import tzlocal
```

A :class:`tzinfo` subclass built around the ``time`` timezone functions.

---
## _ttinfo
```python
from tz import _ttinfo
```



---
## _tzfile
```python
from tz import _tzfile
```

Lightweight class for holding the relevant transition and time zone
information read from binary tzfiles.

---
## tzfile
```python
from tz import tzfile
```

This is a ``tzinfo`` subclass that allows one to use the ``tzfile(5)``
format timezone files to extract current and historical zone information.

:param fileobj:
    This can be an opened file stream or a file name that the time zone
    information can be read from.

:param filename:
    This is an optional parameter specifying the source of the time zone
    information in the event that ``fileobj`` is a file object. If omitted
    and ``fileobj`` is a file stream, this parameter will be set either to
    ``fileobj``'s ``name`` attribute or to ``repr(fileobj)``.

See `Sources for Time Zone and Daylight Saving Time Data
<https://data.iana.org/time-zones/tz-link.html>`_ for more information.
Time zone files can be compiled from the `IANA Time Zone database files
<https://www.iana.org/time-zones>`_ with the `zic time zone compiler
<https://www.freebsd.org/cgi/man.cgi?query=zic&sektion=8>`_

.. note::

    Only construct a ``tzfile`` directly if you have a specific timezone
    file on disk that you want to read into a Python ``tzinfo`` object.
    If you want to get a ``tzfile`` representing a specific IANA zone,
    (e.g. ``'America/New_York'``), you should call
    :func:`dateutil.tz.gettz` with the zone identifier.


**Examples:**

Using the US Eastern time zone as an example, we can see that a ``tzfile``
provides time zone information for the standard Daylight Saving offsets:

.. testsetup:: tzfile

    from dateutil.tz import gettz
    from datetime import datetime

.. doctest:: tzfile

    >>> NYC = gettz('America/New_York')
    >>> NYC
    tzfile('/usr/share/zoneinfo/America/New_York')

    >>> print(datetime(2016, 1, 3, tzinfo=NYC))     # EST
    2016-01-03 00:00:00-05:00

    >>> print(datetime(2016, 7, 7, tzinfo=NYC))     # EDT
    2016-07-07 00:00:00-04:00


The ``tzfile`` structure contains a fully history of the time zone,
so historical dates will also have the right offsets. For example, before
the adoption of the UTC standards, New York used local solar  mean time:

.. doctest:: tzfile

   >>> print(datetime(1901, 4, 12, tzinfo=NYC))    # LMT
   1901-04-12 00:00:00-04:56

And during World War II, New York was on "Eastern War Time", which was a
state of permanent daylight saving time:

.. doctest:: tzfile

    >>> print(datetime(1944, 2, 7, tzinfo=NYC))    # EWT
    1944-02-07 00:00:00-04:00

---
## tzrange
```python
from tz import tzrange
```

The ``tzrange`` object is a time zone specified by a set of offsets and
abbreviations, equivalent to the way the ``TZ`` variable can be specified
in POSIX-like systems, but using Python delta objects to specify DST
start, end and offsets.

:param stdabbr:
    The abbreviation for standard time (e.g. ``'EST'``).

:param stdoffset:
    An integer or :class:`datetime.timedelta` object or equivalent
    specifying the base offset from UTC.

    If unspecified, +00:00 is used.

:param dstabbr:
    The abbreviation for DST / "Summer" time (e.g. ``'EDT'``).

    If specified, with no other DST information, DST is assumed to occur
    and the default behavior or ``dstoffset``, ``start`` and ``end`` is
    used. If unspecified and no other DST information is specified, it
    is assumed that this zone has no DST.

    If this is unspecified and other DST information is *is* specified,
    DST occurs in the zone but the time zone abbreviation is left
    unchanged.

:param dstoffset:
    A an integer or :class:`datetime.timedelta` object or equivalent
    specifying the UTC offset during DST. If unspecified and any other DST
    information is specified, it is assumed to be the STD offset +1 hour.

:param start:
    A :class:`relativedelta.relativedelta` object or equivalent specifying
    the time and time of year that daylight savings time starts. To
    specify, for example, that DST starts at 2AM on the 2nd Sunday in
    March, pass:

        ``relativedelta(hours=2, month=3, day=1, weekday=SU(+2))``

    If unspecified and any other DST information is specified, the default
    value is 2 AM on the first Sunday in April.

:param end:
    A :class:`relativedelta.relativedelta` object or equivalent
    representing the time and time of year that daylight savings time
    ends, with the same specification method as in ``start``. One note is
    that this should point to the first time in the *standard* zone, so if
    a transition occurs at 2AM in the DST zone and the clocks are set back
    1 hour to 1AM, set the ``hours`` parameter to +1.


**Examples:**

.. testsetup:: tzrange

    from dateutil.tz import tzrange, tzstr

.. doctest:: tzrange

    >>> tzstr('EST5EDT') == tzrange("EST", -18000, "EDT")
    True

    >>> from dateutil.relativedelta import *
    >>> range1 = tzrange("EST", -18000, "EDT")
    >>> range2 = tzrange("EST", -18000, "EDT", -14400,
    ...                  relativedelta(hours=+2, month=4, day=1,
    ...                                weekday=SU(+1)),
    ...                  relativedelta(hours=+1, month=10, day=31,
    ...                                weekday=SU(-1)))
    >>> tzstr('EST5EDT') == range1 == range2
    True

---
## tzstr
```python
from tz import tzstr
```

``tzstr`` objects are time zone objects specified by a time-zone string as
it would be passed to a ``TZ`` variable on POSIX-style systems (see
the `GNU C Library: TZ Variable`_ for more details).

There is one notable exception, which is that POSIX-style time zones use an
inverted offset format, so normally ``GMT+3`` would be parsed as an offset
3 hours *behind* GMT. The ``tzstr`` time zone object will parse this as an
offset 3 hours *ahead* of GMT. If you would like to maintain the POSIX
behavior, pass a ``True`` value to ``posix_offset``.

The :class:`tzrange` object provides the same functionality, but is
specified using :class:`relativedelta.relativedelta` objects. rather than
strings.

:param s:
    A time zone string in ``TZ`` variable format. This can be a
    :class:`bytes` (2.x: :class:`str`), :class:`str` (2.x:
    :class:`unicode`) or a stream emitting unicode characters
    (e.g. :class:`StringIO`).

:param posix_offset:
    Optional. If set to ``True``, interpret strings such as ``GMT+3`` or
    ``UTC+3`` as being 3 hours *behind* UTC rather than ahead, per the
    POSIX standard.

.. caution::

    Prior to version 2.7.0, this function also supported time zones
    in the format:

        * ``EST5EDT,4,0,6,7200,10,0,26,7200,3600``
        * ``EST5EDT,4,1,0,7200,10,-1,0,7200,3600``

    This format is non-standard and has been deprecated; this function
    will raise a :class:`DeprecatedTZFormatWarning` until
    support is removed in a future version.

.. _`GNU C Library: TZ Variable`:
    https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

---
## _tzicalvtzcomp
```python
from tz import _tzicalvtzcomp
```



---
## _tzicalvtz
```python
from tz import _tzicalvtz
```



---
## tzical
```python
from tz import tzical
```

This object is designed to parse an iCalendar-style ``VTIMEZONE`` structure
as set out in `RFC 5545`_ Section 4.6.5 into one or more `tzinfo` objects.

:param `fileobj`:
    A file or stream in iCalendar format, which should be UTF-8 encoded
    with CRLF endings.

.. _`RFC 5545`: https://tools.ietf.org/html/rfc5545

---
## __get_gettz
```python
from tz import __get_gettz
```



---
## datetime_exists
```python
from tz import datetime_exists
```

Given a datetime and a time zone, determine whether or not a given datetime
would fall in a gap.

:param dt:
    A :class:`datetime.datetime` (whose time zone will be ignored if ``tz``
    is provided.)

:param tz:
    A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If
    ``None`` or not provided, the datetime's own time zone will be used.

:return:
    Returns a boolean value whether or not the "wall time" exists in
    ``tz``.

.. versionadded:: 2.7.0

---
## datetime_ambiguous
```python
from tz import datetime_ambiguous
```

Given a datetime and a time zone, determine whether or not a given datetime
is ambiguous (i.e if there are two times differentiated only by their DST
status).

:param dt:
    A :class:`datetime.datetime` (whose time zone will be ignored if ``tz``
    is provided.)

:param tz:
    A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If
    ``None`` or not provided, the datetime's own time zone will be used.

:return:
    Returns a boolean value whether or not the "wall time" is ambiguous in
    ``tz``.

.. versionadded:: 2.6.0

---
## resolve_imaginary
```python
from tz import resolve_imaginary
```

Given a datetime that may be imaginary, return an existing datetime.

This function assumes that an imaginary datetime represents what the
wall time would be in a zone had the offset transition not occurred, so
it will always fall forward by the transition's change in offset.

.. doctest::

    >>> from dateutil import tz
    >>> from datetime import datetime
    >>> NYC = tz.gettz('America/New_York')
    >>> print(tz.resolve_imaginary(datetime(2017, 3, 12, 2, 30, tzinfo=NYC)))
    2017-03-12 03:30:00-04:00

    >>> KIR = tz.gettz('Pacific/Kiritimati')
    >>> print(tz.resolve_imaginary(datetime(1995, 1, 1, 12, 30, tzinfo=KIR)))
    1995-01-02 12:30:00+14:00

As a note, :func:`datetime.astimezone` is guaranteed to produce a valid,
existing datetime, so a round-trip to and from UTC is sufficient to get
an extant datetime, however, this generally "falls back" to an earlier time
rather than falling forward to the STD side (though no guarantees are made
about this behavior).

:param dt:
    A :class:`datetime.datetime` which may or may not exist.

:return:
    Returns an existing :class:`datetime.datetime`. If ``dt`` was not
    imaginary, the datetime returned is guaranteed to be the same object
    passed to the function.

.. versionadded:: 2.7.0

---
## _datetime_to_timestamp
```python
from tz import _datetime_to_timestamp
```

Convert a :class:`datetime.datetime` object to an epoch timestamp in
seconds since January 1, 1970, ignoring the time zone.

---
## is_ambiguous
```python
from tz import is_ambiguous
```

Whether or not the "wall time" of a given datetime is ambiguous in this
zone.

:param dt:
    A :py:class:`datetime.datetime`, naive or time zone aware.


:return:
    Returns ``True`` if ambiguous, ``False`` otherwise.

.. versionadded:: 2.6.0

---
## fromutc
```python
from tz import fromutc
```

The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`.

:param dt:
    A :py:class:`datetime.datetime` object.

:raises TypeError:
    Raised if ``dt`` is not a :py:class:`datetime.datetime` object.

:raises ValueError:
    Raised if this is called with a ``dt`` which does not have this
    ``tzinfo`` attached.

:return:
    Returns a :py:class:`datetime.datetime` object representing the
    wall time in ``self``'s time zone.

---
## __eq__
```python
from tz import __eq__
```



---
## __ne__
```python
from tz import __ne__
```



---
## __repr__
```python
from tz import __repr__
```



---
## _naive_is_dst
```python
from tz import _naive_is_dst
```



---
## _isdst
```python
from tz import _isdst
```



---
## __getstate__
```python
from tz import __getstate__
```



---
## __setstate__
```python
from tz import __setstate__
```



---
## _set_tzdata
```python
from tz import _set_tzdata
```

Set the time zone data of this object from a _tzfile object 

---
## _read_tzfile
```python
from tz import _read_tzfile
```



---
## _find_last_transition
```python
from tz import _find_last_transition
```



---
## _get_ttinfo
```python
from tz import _get_ttinfo
```



---
## _find_ttinfo
```python
from tz import _find_ttinfo
```



---
## _resolve_ambiguous_time
```python
from tz import _resolve_ambiguous_time
```



---
## __reduce__
```python
from tz import __reduce__
```



---
## __reduce_ex__
```python
from tz import __reduce_ex__
```



---
## transitions
```python
from tz import transitions
```

For a given year, get the DST on and off transition times, expressed
always on the standard time side. For zones with no transitions, this
function returns ``None``.

:param year:
    The year whose transitions you would like to query.

:return:
    Returns a :class:`tuple` of :class:`datetime.datetime` objects,
    ``(dston, dstoff)`` for zones with an annual DST transition, or
    ``None`` for fixed offset zones.

---
## _dst_base_offset
```python
from tz import _dst_base_offset
```



---
## _delta
```python
from tz import _delta
```



---
## _find_comp
```python
from tz import _find_comp
```



---
## _find_compdt
```python
from tz import _find_compdt
```



---
## keys
```python
from tz import keys
```

Retrieves the available time zones as a list.

---
## get
```python
from tz import get
```

Retrieve a :py:class:`datetime.tzinfo` object by its ``tzid``.

:param tzid:
    If there is exactly one time zone available, omitting ``tzid``
    or passing :py:const:`None` value returns it. Otherwise a valid
    key (which can be retrieved from :func:`keys`) is required.

:raises ValueError:
    Raised if ``tzid`` is not specified but there are either more
    or fewer than 1 zone defined.

:returns:
    Returns either a :py:class:`datetime.tzinfo` object representing
    the relevant time zone or :py:const:`None` if the ``tzid`` was
    not found.

---
## _parse_offset
```python
from tz import _parse_offset
```



---
## _parse_rfc
```python
from tz import _parse_rfc
```



---
## GettzFunc
```python
from tz import GettzFunc
```

Retrieve a time zone object from a string representation

This function is intended to retrieve the :py:class:`tzinfo` subclass
that best represents the time zone that would be used if a POSIX
`TZ variable`_ were set to the same value.

If no argument or an empty string is passed to ``gettz``, local time
is returned:

.. code-block:: python3

    >>> gettz()
    tzfile('/etc/localtime')

This function is also the preferred way to map IANA tz database keys
to :class:`tzfile` objects:

.. code-block:: python3

    >>> gettz('Pacific/Kiritimati')
    tzfile('/usr/share/zoneinfo/Pacific/Kiritimati')

On Windows, the standard is extended to include the Windows-specific
zone names provided by the operating system:

.. code-block:: python3

    >>> gettz('Egypt Standard Time')
    tzwin('Egypt Standard Time')

Passing a GNU ``TZ`` style string time zone specification returns a
:class:`tzstr` object:

.. code-block:: python3

    >>> gettz('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3')
    tzstr('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3')

:param name:
    A time zone name (IANA, or, on Windows, Windows keys), location of
    a ``tzfile(5)`` zoneinfo file or ``TZ`` variable style time zone
    specifier. An empty string, no argument or ``None`` is interpreted
    as local time.

:return:
    Returns an instance of one of ``dateutil``'s :py:class:`tzinfo`
    subclasses.

.. versionchanged:: 2.7.0

    After version 2.7.0, any two calls to ``gettz`` using the same
    input strings will return the same object:

    .. code-block:: python3

        >>> tz.gettz('America/Chicago') is tz.gettz('America/Chicago')
        True

    In addition to improving performance, this ensures that
    `"same zone" semantics`_ are used for datetimes in the same zone.


.. _`TZ variable`:
    https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

.. _`"same zone" semantics`:
    https://blog.ganssle.io/articles/2018/02/aware-datetime-arithmetic.html

---
## _get_supported_offset
```python
from tz import _get_supported_offset
```



---
## __call__
```python
from tz import __call__
```



---
## set_cache_size
```python
from tz import set_cache_size
```



---
## cache_clear
```python
from tz import cache_clear
```



---
## nocache
```python
from tz import nocache
```

A non-cached version of gettz

---
## _nullcontext
```python
from tz import _nullcontext
```

Class for wrapping contexts so that they are passed through in a
with statement.

---
## __enter__
```python
from tz import __enter__
```



---
## __exit__
```python
from tz import __exit__
```



---
## tzname_in_python2
```python
from _common import tzname_in_python2
```

Change unicode output into bytestrings in Python 2

tzname() API changed in Python 3. It used to return bytes, but was changed
to unicode strings

---
## _validate_fromutc_inputs
```python
from _common import _validate_fromutc_inputs
```

The CPython version of ``fromutc`` checks that the input is a ``datetime``
object and that ``self`` is attached as its ``tzinfo``.

---
## _tzinfo
```python
from _common import _tzinfo
```

Base class for all ``dateutil`` ``tzinfo`` objects.

---
## tzrangebase
```python
from _common import tzrangebase
```

This is an abstract base class for time zones represented by an annual
transition into and out of DST. Child classes should implement the following
methods:

    * ``__init__(self, *args, **kwargs)``
    * ``transitions(self, year)`` - this is expected to return a tuple of
      datetimes representing the DST on and off transitions in standard
      time.

A fully initialized ``tzrangebase`` subclass should also provide the
following attributes:
    * ``hasdst``: Boolean whether or not the zone uses DST.
    * ``_dst_offset`` / ``_std_offset``: :class:`datetime.timedelta` objects
      representing the respective UTC offsets.
    * ``_dst_abbr`` / ``_std_abbr``: Strings representing the timezone short
      abbreviations in DST and STD, respectively.
    * ``_hasdst``: Whether or not the zone has DST.

.. versionadded:: 2.6.0

---
## enfold
```python
from _common import enfold
```

Provides a unified interface for assigning the ``fold`` attribute to
datetimes both before and after the implementation of PEP-495.

:param fold:
    The value for the ``fold`` attribute in the returned datetime. This
    should be either 0 or 1.

:return:
    Returns an object for which ``getattr(dt, 'fold', 0)`` returns
    ``fold`` for all versions of Python. In versions prior to
    Python 3.6, this is a ``_DatetimeWithFold`` object, which is a
    subclass of :py:class:`datetime.datetime` with the ``fold``
    attribute added, if ``fold`` is 1.

.. versionadded:: 2.6.0

---
## _DatetimeWithFold
```python
from _common import _DatetimeWithFold
```

This is a class designed to provide a PEP 495-compliant interface for
Python versions before 3.6. It is used only for dates in a fold, so
the ``fold`` attribute is fixed at ``1``.

.. versionadded:: 2.6.0

---
## fromutc
```python
from _common import fromutc
```

Given a datetime in UTC, return local time 

---
## is_ambiguous
```python
from _common import is_ambiguous
```

Whether or not the "wall time" of a given datetime is ambiguous in this
zone.

:param dt:
    A :py:class:`datetime.datetime`, naive or time zone aware.


:return:
    Returns ``True`` if ambiguous, ``False`` otherwise.

.. versionadded:: 2.6.0

---
## _fold_status
```python
from _common import _fold_status
```

Determine the fold status of a "wall" datetime, given a representation
of the same datetime as a (naive) UTC datetime. This is calculated based
on the assumption that ``dt.utcoffset() - dt.dst()`` is constant for all
datetimes, and that this offset is the actual number of hours separating
``dt_utc`` and ``dt_wall``.

:param dt_utc:
    Representation of the datetime as UTC

:param dt_wall:
    Representation of the datetime as "wall time". This parameter must
    either have a `fold` attribute or have a fold-naive
    :class:`datetime.tzinfo` attached, otherwise the calculation may
    fail.

---
## _fold
```python
from _common import _fold
```



---
## _fromutc
```python
from _common import _fromutc
```

Given a timezone-aware datetime in a given timezone, calculates a
timezone-aware datetime in a new timezone.

Since this is the one time that we *know* we have an unambiguous
datetime object, we take this opportunity to determine whether the
datetime is ambiguous and in a "fold" state (e.g. if it's the first
occurrence, chronologically, of the ambiguous datetime).

:param dt:
    A timezone-aware :class:`datetime.datetime` object.

---
## utcoffset
```python
from _common import utcoffset
```



---
## dst
```python
from _common import dst
```



---
## tzname
```python
from _common import tzname
```



---
## _isdst
```python
from _common import _isdst
```



---
## _naive_isdst
```python
from _common import _naive_isdst
```



---
## _dst_base_offset
```python
from _common import _dst_base_offset
```



---
## adjust_encoding
```python
from _common import adjust_encoding
```



---
## replace
```python
from _common import replace
```

Return a datetime with the same attributes, except for those
attributes given new values by whichever keyword arguments are
specified. Note that tzinfo=None can be specified to create a naive
datetime from an aware datetime with no conversion of date and time
data.

This is reimplemented in ``_DatetimeWithFold`` because pypy3 will
return a ``datetime.datetime`` even if ``fold`` is unchanged.

---
## fold
```python
from _common import fold
```



---
## DeprecatedTzFormatWarning
```python
from __init__ import DeprecatedTzFormatWarning
```

Warning raised when time zones are parsed from deprecated formats.

---
## __name__
```python
from win import __name__
```

This module provides an interface to the native time zone data on Windows,
including :py:class:`datetime.tzinfo` implementations.

Attempting to import this module on a non-Windows platform will raise an
:py:obj:`ImportError`.

---
## _settzkeyname
```python
from win import _settzkeyname
```



---
## tzres
```python
from win import tzres
```

Class for accessing ``tzres.dll``, which contains timezone name related
resources.

.. versionadded:: 2.5.0

---
## tzwinbase
```python
from win import tzwinbase
```

tzinfo class based on win32's timezones available in the registry.

---
## tzwin
```python
from win import tzwin
```

Time zone object created from the zone info in the Windows registry

These are similar to :py:class:`dateutil.tz.tzrange` objects in that
the time zone data is provided in the format of a single offset rule
for either 0 or 2 time zone transitions per year.

:param: name
    The name of a Windows time zone key, e.g. "Eastern Standard Time".
    The full list of keys can be retrieved with :func:`tzwin.list`.

---
## tzwinlocal
```python
from win import tzwinlocal
```

Class representing the local time zone information in the Windows registry

While :class:`dateutil.tz.tzlocal` makes system calls (via the :mod:`time`
module) to retrieve time zone information, ``tzwinlocal`` retrieves the
rules directly from the Windows registry and creates an object like
:class:`dateutil.tz.tzwin`.

Because Windows does not have an equivalent of :func:`time.tzset`, on
Windows, :class:`dateutil.tz.tzlocal` instances will always reflect the
time zone settings *at the time that the process was started*, meaning
changes to the machine's time zone settings during the run of a program
on Windows will **not** be reflected by :class:`dateutil.tz.tzlocal`.
Because ``tzwinlocal`` reads the registry directly, it is unaffected by
this issue.

---
## picknthweekday
```python
from win import picknthweekday
```

dayofweek == 0 means Sunday, whichweek 5 means last instance 

---
## valuestodict
```python
from win import valuestodict
```

Convert a registry key's values to a dictionary.

---
## __init__
```python
from win import __init__
```



---
## load_name
```python
from win import load_name
```

Load a timezone name from a DLL offset (integer).

>>> from dateutil.tzwin import tzres
>>> tzr = tzres()
>>> print(tzr.load_name(112))
'Eastern Standard Time'

:param offset:
    A positive integer value referring to a string from the tzres dll.

.. note::

    Offsets found in the registry are generally of the form
    ``@tzres.dll,-114``. The offset in this case is 114, not -114.

---
## name_from_string
```python
from win import name_from_string
```

Parse strings as returned from the Windows registry into the time zone
name as defined in the registry.

>>> from dateutil.tzwin import tzres
>>> tzr = tzres()
>>> print(tzr.name_from_string('@tzres.dll,-251'))
'Dateline Daylight Time'
>>> print(tzr.name_from_string('Eastern Standard Time'))
'Eastern Standard Time'

:param tzname_str:
    A timezone name string as returned from a Windows registry key.

:return:
    Returns the localized timezone string from tzres.dll if the string
    is of the form `@tzres.dll,-offset`, else returns the input string.

---
## __eq__
```python
from win import __eq__
```



---
## list
```python
from win import list
```

Return a list of all time zones known to the system.

---
## display
```python
from win import display
```

Return the display name of the time zone.

---
## transitions
```python
from win import transitions
```

For a given year, get the DST on and off transition times, expressed
always on the standard time side. For zones with no transitions, this
function returns ``None``.

:param year:
    The year whose transitions you would like to query.

:return:
    Returns a :class:`tuple` of :class:`datetime.datetime` objects,
    ``(dston, dstoff)`` for zones with an annual DST transition, or
    ``None`` for fixed offset zones.

---
## _get_hasdst
```python
from win import _get_hasdst
```



---
## _dst_base_offset
```python
from win import _dst_base_offset
```



---
## __repr__
```python
from win import __repr__
```



---
## __reduce__
```python
from win import __reduce__
```



---
## __str__
```python
from win import __str__
```



---
## __name__
```python
from docinfo import __name__
```



---
## Version
```python
from docinfo import Version
```



---
## version
```python
from docinfo import version
```



---
## Tag
```python
from docinfo import Tag
```



---
## DocInfo
```python
from docinfo import DocInfo
```

Store document information, can be used for analysis of a loaded YAML document
requested_version: if explicitly set before load
doc_version: from %YAML directive
tags: from %TAG directives in scanned order

---
## __init__
```python
from docinfo import __init__
```



---
## major
```python
from docinfo import major
```



---
## minor
```python
from docinfo import minor
```



---
## __eq__
```python
from docinfo import __eq__
```



---
## __lt__
```python
from docinfo import __lt__
```



---
## __le__
```python
from docinfo import __le__
```



---
## __gt__
```python
from docinfo import __gt__
```



---
## __ge__
```python
from docinfo import __ge__
```



---
## handle
```python
from docinfo import handle
```



---
## prefix
```python
from docinfo import prefix
```



---
## __name__
```python
from scalarfloat import __name__
```



---
## ScalarFloat
```python
from scalarfloat import ScalarFloat
```



---
## ExponentialFloat
```python
from scalarfloat import ExponentialFloat
```



---
## ExponentialCapsFloat
```python
from scalarfloat import ExponentialCapsFloat
```



---
## __new__
```python
from scalarfloat import __new__
```



---
## __iadd__
```python
from scalarfloat import __iadd__
```



---
## __ifloordiv__
```python
from scalarfloat import __ifloordiv__
```



---
## __imul__
```python
from scalarfloat import __imul__
```



---
## __ipow__
```python
from scalarfloat import __ipow__
```



---
## __isub__
```python
from scalarfloat import __isub__
```



---
## anchor
```python
from scalarfloat import anchor
```



---
## yaml_anchor
```python
from scalarfloat import yaml_anchor
```



---
## yaml_set_anchor
```python
from scalarfloat import yaml_set_anchor
```



---
## dump
```python
from scalarfloat import dump
```



---
## RoundTripScanner
```python
from scanner import RoundTripScanner
```



---
## CommentBase
```python
from scanner import CommentBase
```



---
## EOLComment
```python
from scanner import EOLComment
```



---
## FullLineComment
```python
from scanner import FullLineComment
```



---
## BlankLineComment
```python
from scanner import BlankLineComment
```



---
## ScannedComments
```python
from scanner import ScannedComments
```



---
## RoundTripScannerSC
```python
from scanner import RoundTripScannerSC
```



---
## xprintf
```python
from scanner import xprintf
```



---
## flow_level
```python
from scanner import flow_level
```



---
## reset_scanner
```python
from scanner import reset_scanner
```



---
## reader
```python
from scanner import reader
```



---
## scanner_processing_version
```python
from scanner import scanner_processing_version
```



---
## fetch_comment
```python
from scanner import fetch_comment
```



---
## _gather_comments
```python
from scanner import _gather_comments
```

combine multiple comment lines and assign to next non-comment-token

---
## set_used
```python
from scanner import set_used
```



---
## set_assigned
```python
from scanner import set_assigned
```



---
## __str__
```python
from scanner import __str__
```



---
## info
```python
from scanner import info
```



---
## add_eol_comment
```python
from scanner import add_eol_comment
```



---
## add_blank_line
```python
from scanner import add_blank_line
```



---
## add_full_line_comment
```python
from scanner import add_full_line_comment
```



---
## __getitem__
```python
from scanner import __getitem__
```



---
## last
```python
from scanner import last
```



---
## any_unprocessed
```python
from scanner import any_unprocessed
```



---
## unprocessed
```python
from scanner import unprocessed
```



---
## assign_pre
```python
from scanner import assign_pre
```



---
## assign_eol
```python
from scanner import assign_eol
```



---
## assign_post
```python
from scanner import assign_post
```



---
## str_unprocessed
```python
from scanner import str_unprocessed
```



---
## scan_empty_or_full_line_comments
```python
from scanner import scan_empty_or_full_line_comments
```



---
## ordereddict
```python
from compat import ordereddict
```



---
## with_metaclass
```python
from compat import with_metaclass
```

Create a base class with a metaclass.

---
## dbg
```python
from compat import dbg
```



---
## Nprint
```python
from compat import Nprint
```



---
## check_namespace_char
```python
from compat import check_namespace_char
```



---
## check_anchorname_char
```python
from compat import check_anchorname_char
```



---
## version_tnf
```python
from compat import version_tnf
```

return True if ruamel.yaml version_info < t1, None if t2 is specified and bigger else False

---
## MutableSliceableSequence
```python
from compat import MutableSliceableSequence
```



---
## ObjectCounter
```python
from compat import ObjectCounter
```



---
## __call__
```python
from compat import __call__
```



---
## set_max_print
```python
from compat import set_max_print
```



---
## fp
```python
from compat import fp
```



---
## __getsingleitem__
```python
from compat import __getsingleitem__
```



---
## __setsingleitem__
```python
from compat import __setsingleitem__
```



---
## __delsingleitem__
```python
from compat import __delsingleitem__
```



---
## insert
```python
from compat import insert
```



---
## dump
```python
from compat import dump
```



---
## StreamMark
```python
from error import StreamMark
```



---
## FileMark
```python
from error import FileMark
```



---
## StringMark
```python
from error import StringMark
```



---
## CommentMark
```python
from error import CommentMark
```



---
## YAMLStreamError
```python
from error import YAMLStreamError
```



---
## YAMLWarning
```python
from error import YAMLWarning
```



---
## MarkedYAMLWarning
```python
from error import MarkedYAMLWarning
```



---
## ReusedAnchorWarning
```python
from error import ReusedAnchorWarning
```



---
## UnsafeLoaderWarning
```python
from error import UnsafeLoaderWarning
```



---
## MantissaNoDotYAML1_1Warning
```python
from error import MantissaNoDotYAML1_1Warning
```



---
## YAMLFutureWarning
```python
from error import YAMLFutureWarning
```



---
## MarkedYAMLFutureWarning
```python
from error import MarkedYAMLFutureWarning
```



---
## __eq__
```python
from error import __eq__
```



---
## __ne__
```python
from error import __ne__
```



---
## __repr__
```python
from error import __repr__
```



---
## check_append
```python
from error import check_append
```



---
## __name__
```python
from anchor import __name__
```



---
## Anchor
```python
from anchor import Anchor
```



---
## __init__
```python
from anchor import __init__
```



---
## __repr__
```python
from anchor import __repr__
```



---
## DuplicateKeyFutureWarning
```python
from constructor import DuplicateKeyFutureWarning
```



---
## DuplicateKeyError
```python
from constructor import DuplicateKeyError
```



---
## RoundTripConstructor
```python
from constructor import RoundTripConstructor
```

need to store the comments on the node itself,
as well as on the items

---
## composer
```python
from constructor import composer
```



---
## resolver
```python
from constructor import resolver
```



---
## scanner
```python
from constructor import scanner
```



---
## construct_non_recursive_object
```python
from constructor import construct_non_recursive_object
```



---
## check_mapping_key
```python
from constructor import check_mapping_key
```

return True if key is unique

---
## check_set_key
```python
from constructor import check_set_key
```



---
## add_default_constructor
```python
from constructor import add_default_constructor
```



---
## comment
```python
from constructor import comment
```



---
## comments
```python
from constructor import comments
```



---
## construct_rt_sequence
```python
from constructor import construct_rt_sequence
```



---
## _sentinel
```python
from constructor import _sentinel
```



---
## construct_setting
```python
from constructor import construct_setting
```



---
## set_collection_style
```python
from constructor import set_collection_style
```



---
## construct_unknown
```python
from constructor import construct_unknown
```



---
## construct_yaml_sbool
```python
from constructor import construct_yaml_sbool
```



---
## leading_zeros
```python
from constructor import leading_zeros
```



---
## constructed
```python
from constructor import constructed
```



---
## parser
```python
from composer import parser
```



---
## resolver
```python
from composer import resolver
```



---
## return_alias
```python
from composer import return_alias
```



---
## check_end_doc_comment
```python
from composer import check_end_doc_comment
```



---
## LazyEval
```python
from util import LazyEval
```

Lightweight wrapper around lazily evaluated func(*args, **kwargs).

func is only evaluated when any attribute of its return value is accessed.
Every attribute access is passed through to the wrapped value.
(This only excludes special cases like method-wrappers, e.g., __hash__.)
The sole additional attribute is the lazy_self function which holds the
return value (or, prior to evaluation, func and arguments), in its closure.

---
## create_timestamp
```python
from util import create_timestamp
```



---
## load_yaml_guess_indent
```python
from util import load_yaml_guess_indent
```

guess the indent and block sequence indent of yaml stream/string

returns round_trip_loaded stream, indent level, block sequence indent
- block sequence indent is the number of spaces before a dash relative to previous indent
- if there are no block sequences, indent is taken from nested mappings, block sequence
  indent is unset (None) in that case

---
## configobj_walker
```python
from util import configobj_walker
```

walks over a ConfigObj (INI file with comments) generating
corresponding YAML output (including comments

---
## _walk_section
```python
from util import _walk_section
```



---
## __getattribute__
```python
from util import __getattribute__
```



---
## __setattr__
```python
from util import __setattr__
```



---
## leading_spaces
```python
from util import leading_spaces
```



---
## lazy_self
```python
from util import lazy_self
```



---
## CommentCheck
```python
from events import CommentCheck
```



---
## compact_repr
```python
from events import compact_repr
```



---
## tag
```python
from events import tag
```



---
## __name__
```python
from scalarint import __name__
```



---
## ScalarInt
```python
from scalarint import ScalarInt
```



---
## BinaryInt
```python
from scalarint import BinaryInt
```



---
## OctalInt
```python
from scalarint import OctalInt
```



---
## HexInt
```python
from scalarint import HexInt
```

uses lower case (a-f)

---
## HexCapsInt
```python
from scalarint import HexCapsInt
```

uses upper case (A-F)

---
## DecimalInt
```python
from scalarint import DecimalInt
```

needed if anchor

---
## __new__
```python
from scalarint import __new__
```



---
## __iadd__
```python
from scalarint import __iadd__
```



---
## __ifloordiv__
```python
from scalarint import __ifloordiv__
```



---
## __imul__
```python
from scalarint import __imul__
```



---
## __ipow__
```python
from scalarint import __ipow__
```



---
## __isub__
```python
from scalarint import __isub__
```



---
## anchor
```python
from scalarint import anchor
```



---
## yaml_anchor
```python
from scalarint import yaml_anchor
```



---
## yaml_set_anchor
```python
from scalarint import yaml_set_anchor
```



---
## __name__
```python
from scalarbool import __name__
```



---
## ScalarBoolean
```python
from scalarbool import ScalarBoolean
```



---
## __new__
```python
from scalarbool import __new__
```



---
## anchor
```python
from scalarbool import anchor
```



---
## yaml_anchor
```python
from scalarbool import yaml_anchor
```



---
## yaml_set_anchor
```python
from scalarbool import yaml_set_anchor
```



---
## __name__
```python
from configobjwalker import __name__
```



---
## configobj_walker
```python
from configobjwalker import configobj_walker
```



---
## RoundTripRepresenter
```python
from representer import RoundTripRepresenter
```



---
## serializer
```python
from representer import serializer
```



---
## represent_key
```python
from representer import represent_key
```



---
## represent_omap
```python
from representer import represent_omap
```



---
## represent_ordereddict
```python
from representer import represent_ordereddict
```



---
## represent_literal_scalarstring
```python
from representer import represent_literal_scalarstring
```



---
## represent_folded_scalarstring
```python
from representer import represent_folded_scalarstring
```



---
## represent_single_quoted_scalarstring
```python
from representer import represent_single_quoted_scalarstring
```



---
## represent_double_quoted_scalarstring
```python
from representer import represent_double_quoted_scalarstring
```



---
## represent_plain_scalarstring
```python
from representer import represent_plain_scalarstring
```



---
## insert_underscore
```python
from representer import insert_underscore
```



---
## represent_scalar_int
```python
from representer import represent_scalar_int
```



---
## represent_binary_int
```python
from representer import represent_binary_int
```



---
## represent_octal_int
```python
from representer import represent_octal_int
```



---
## represent_hex_int
```python
from representer import represent_hex_int
```



---
## represent_hex_caps_int
```python
from representer import represent_hex_caps_int
```



---
## represent_scalar_float
```python
from representer import represent_scalar_float
```

this is way more complicated 

---
## merge_comments
```python
from representer import merge_comments
```



---
## represent_tagged_scalar
```python
from representer import represent_tagged_scalar
```



---
## represent_scalar_bool
```python
from representer import represent_scalar_bool
```



---
## CommentToken
```python
from tokens import CommentToken
```



---
## column
```python
from tokens import column
```



---
## add_post_comment
```python
from tokens import add_post_comment
```



---
## add_pre_comments
```python
from tokens import add_pre_comments
```



---
## add_comment_pre
```python
from tokens import add_comment_pre
```



---
## add_comment_eol
```python
from tokens import add_comment_eol
```



---
## add_comment_post
```python
from tokens import add_comment_post
```



---
## comment
```python
from tokens import comment
```



---
## move_old_comment
```python
from tokens import move_old_comment
```

move a comment from this token to target (normally next token)
used to combine e.g. comments before a BlockEntryToken to the
ScalarToken that follows it
empty is a special for empty values -> comment after key

---
## split_old_comment
```python
from tokens import split_old_comment
```

split the post part of a comment, and return it
as comment to be added. Delete second part if [None, None]
 abc:  # this goes to sequence
   # this goes to first element
   - first element

---
## move_new_comment
```python
from tokens import move_new_comment
```

move a comment from this token to target (normally next token)
used to combine e.g. comments before a BlockEntryToken to the
ScalarToken that follows it
empty is a special for empty values -> comment after key

---
## value
```python
from tokens import value
```



---
## reset
```python
from tokens import reset
```



---
## __eq__
```python
from tokens import __eq__
```



---
## __ne__
```python
from tokens import __ne__
```



---
## RoundTripDumper
```python
from dumper import RoundTripDumper
```



---
## xprintf
```python
from parser import xprintf
```



---
## RoundTripParser
```python
from parser import RoundTripParser
```

roundtrip is a safe loader, that wants to see the unmangled tag

---
## RoundTripParserSC
```python
from parser import RoundTripParserSC
```

roundtrip is a safe loader, that wants to see the unmangled tag

---
## reset_parser
```python
from parser import reset_parser
```



---
## scanner
```python
from parser import scanner
```



---
## resolver
```python
from parser import resolver
```



---
## select_tag_transform
```python
from parser import select_tag_transform
```



---
## move_token_comment
```python
from parser import move_token_comment
```



---
## distribute_comment
```python
from parser import distribute_comment
```



---
## reset_reader
```python
from reader import reset_reader
```



---
## stream
```python
from reader import stream
```



---
## forward_1_1
```python
from reader import forward_1_1
```



---
## _get_non_printable_ascii
```python
from reader import _get_non_printable_ascii
```



---
## _get_non_printable_regex
```python
from reader import _get_non_printable_regex
```



---
## _get_non_printable
```python
from reader import _get_non_printable
```



---
## __name__
```python
from scalarstring import __name__
```



---
## ScalarString
```python
from scalarstring import ScalarString
```



---
## LiteralScalarString
```python
from scalarstring import LiteralScalarString
```



---
## FoldedScalarString
```python
from scalarstring import FoldedScalarString
```



---
## SingleQuotedScalarString
```python
from scalarstring import SingleQuotedScalarString
```



---
## DoubleQuotedScalarString
```python
from scalarstring import DoubleQuotedScalarString
```



---
## PlainScalarString
```python
from scalarstring import PlainScalarString
```



---
## preserve_literal
```python
from scalarstring import preserve_literal
```



---
## walk_tree
```python
from scalarstring import walk_tree
```

the routine here walks over a simple yaml tree (recursing in
    dict values and list items) and converts strings that
    have multiple lines to literal scalars

    You can also provide an explicit (ordered) mapping for multiple transforms
    (first of which is executed):
        map = ruamel.yaml.compat.ordereddict
        map['
'] = preserve_literal
        map[':'] = SingleQuotedScalarString
        walk_tree(data, map=map)
    

---
## __new__
```python
from scalarstring import __new__
```



---
## replace
```python
from scalarstring import replace
```



---
## anchor
```python
from scalarstring import anchor
```



---
## yaml_anchor
```python
from scalarstring import yaml_anchor
```



---
## yaml_set_anchor
```python
from scalarstring import yaml_set_anchor
```



---
## RoundTripLoader
```python
from loader import RoundTripLoader
```



---
## VersionedResolver
```python
from resolver import VersionedResolver
```

contrary to the "normal" resolver, the smart resolver delays loading
the pattern matching rules. That way it can decide to load 1.1 rules
or the (default) 1.2 rules, that no longer support octal without 0o, sexagesimals
and Yes/No/On/Off booleans.

---
## parser
```python
from resolver import parser
```



---
## add_implicit_resolver_base
```python
from resolver import add_implicit_resolver_base
```



---
## processing_version
```python
from resolver import processing_version
```



---
## add_version_implicit_resolver
```python
from resolver import add_version_implicit_resolver
```



---
## get_loader_version
```python
from resolver import get_loader_version
```



---
## versioned_resolver
```python
from resolver import versioned_resolver
```

select the resolver based on the version we are parsing

---
## templated_id
```python
from serializer import templated_id
```



---
## emitter
```python
from serializer import emitter
```



---
## resolver
```python
from serializer import resolver
```



---
## tag
```python
from nodes import tag
```



---
## __name__
```python
from timestamp import __name__
```



---
## TimeStamp
```python
from timestamp import TimeStamp
```



---
## __init__
```python
from timestamp import __init__
```



---
## __new__
```python
from timestamp import __new__
```



---
## __deepcopy__
```python
from timestamp import __deepcopy__
```



---
## replace
```python
from timestamp import replace
```



---
## YAML
```python
from main import YAML
```



---
## YAMLContextManager
```python
from main import YAMLContextManager
```



---
## yaml_object
```python
from main import yaml_object
```

decorator for classes that needs to dump/load objects
The tag for such objects is taken from the class attribute yaml_tag (or the
class name in lowercase in case unavailable)
If methods to_yaml and/or from_yaml are available, these are called for dumping resp.
loading, default routines (dumping a mapping of the attributes) used otherwise.

---
## warn_deprecation
```python
from main import warn_deprecation
```



---
## error_deprecation
```python
from main import error_deprecation
```



---
## scan
```python
from main import scan
```

Scan a YAML stream and produce scanning tokens.

---
## compose
```python
from main import compose
```

Parse the first YAML document in a stream
and produce the corresponding representation tree.

---
## compose_all
```python
from main import compose_all
```

Parse all YAML documents in a stream
and produce corresponding representation trees.

---
## load
```python
from main import load
```

at this point you either have the non-pure Parser (which has its own reader and
scanner) or you have the pure Parser.
If the pure Parser is set, then set the Reader and Scanner, if not already set.
If either the Scanner or Reader are set, you cannot use the non-pure Parser,
    so reset it to the pure parser and set the Reader resp. Scanner if necessary

---
## load_all
```python
from main import load_all
```



---
## safe_load
```python
from main import safe_load
```

Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.

---
## safe_load_all
```python
from main import safe_load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.
Resolve only basic YAML tags.

---
## round_trip_load
```python
from main import round_trip_load
```

Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags.

---
## round_trip_load_all
```python
from main import round_trip_load_all
```

Parse all YAML documents in a stream
and produce corresponding Python objects.
Resolve only basic YAML tags.

---
## emit
```python
from main import emit
```

Emit YAML parsing events into a stream.
If stream is None, return the produced string instead.

---
## serialize_all
```python
from main import serialize_all
```

Serialize a sequence of representation trees into a YAML stream.
If stream is None, return the produced string instead.

---
## serialize
```python
from main import serialize
```

Serialize a representation tree into a YAML stream.
If stream is None, return the produced string instead.

---
## dump_all
```python
from main import dump_all
```



---
## dump
```python
from main import dump
```



---
## safe_dump
```python
from main import safe_dump
```

Serialize a Python object into a YAML stream.
Produce only basic YAML tags.
If stream is None, return the produced string instead.

---
## round_trip_dump
```python
from main import round_trip_dump
```



---
## add_implicit_resolver
```python
from main import add_implicit_resolver
```

Add an implicit scalar detector.
If an implicit scalar value matches the given regexp,
the corresponding tag is assigned to the scalar.
first is a sequence of possible initial characters or None.

---
## add_path_resolver
```python
from main import add_path_resolver
```

Add a path based resolver for the given tag.
A path is a list of keys that forms a path
to a node in the representation tree.
Keys can be string values, integers, or None.

---
## add_constructor
```python
from main import add_constructor
```

Add an object constructor for the given tag.
object_onstructor is a function that accepts a Loader instance
and a node object and produces the corresponding Python object.

---
## add_multi_constructor
```python
from main import add_multi_constructor
```

Add a multi-constructor for the given tag prefix.
Multi-constructor is called for a node if its tag starts with tag_prefix.
Multi-constructor accepts a Loader instance, a tag suffix,
and a node object and produces the corresponding Python object.

---
## add_representer
```python
from main import add_representer
```

Add a representer for the given type.
object_representer is a function accepting a Dumper instance
and an instance of the given data type
and producing the corresponding representation node.

---
## add_multi_representer
```python
from main import add_multi_representer
```

Add a representer for the given type.
multi_representer is a function accepting a Dumper instance
and an instance of the given data type or subtype
and producing the corresponding representation node.

---
## YAMLObjectMetaclass
```python
from main import YAMLObjectMetaclass
```

The metaclass for YAMLObject.

---
## YAMLObject
```python
from main import YAMLObject
```

An object that can dump itself to a YAML stream
and load itself from a YAML stream.

---
## reader
```python
from main import reader
```



---
## scanner
```python
from main import scanner
```



---
## parser
```python
from main import parser
```



---
## composer
```python
from main import composer
```



---
## constructor
```python
from main import constructor
```



---
## resolver
```python
from main import resolver
```



---
## emitter
```python
from main import emitter
```



---
## serializer
```python
from main import serializer
```



---
## representer
```python
from main import representer
```



---
## get_constructor_parser
```python
from main import get_constructor_parser
```

the old cyaml needs special setup, and therefore the stream

---
## Xdump_all
```python
from main import Xdump_all
```

Serialize a sequence of Python objects into a YAML stream.

---
## get_serializer_representer_emitter
```python
from main import get_serializer_representer_emitter
```



---
## map
```python
from main import map
```



---
## seq
```python
from main import seq
```



---
## official_plug_ins
```python
from main import official_plug_ins
```

search for list of subdirs that are plug-ins, if __file__ is not available, e.g.
single file installers that are not properly emulating a file-system (issue 324)
no plug-ins will be found. If any are packaged, you know which file that are
and you can explicitly provide it during instantiation:
    yaml = ruamel.yaml.YAML(plug_ins=['ruamel/yaml/jinja2/__plug_in__'])

---
## register_class
```python
from main import register_class
```

register a class for dumping/loading
- if it has attribute yaml_tag use that to register, else use class name
- if it has methods to_yaml/from_yaml use those to dump/load else dump attributes
  as mapping

---
## __enter__
```python
from main import __enter__
```



---
## __exit__
```python
from main import __exit__
```



---
## _indent
```python
from main import _indent
```



---
## version
```python
from main import version
```



---
## tags
```python
from main import tags
```



---
## indent
```python
from main import indent
```



---
## block_seq_indent
```python
from main import block_seq_indent
```



---
## compact
```python
from main import compact
```



---
## teardown_output
```python
from main import teardown_output
```



---
## init_output
```python
from main import init_output
```



---
## yo_deco
```python
from main import yo_deco
```



---
## from_yaml
```python
from main import from_yaml
```

Convert a representation node to a Python object.

---
## to_yaml
```python
from main import to_yaml
```

Convert a Python object to a representation node.

---
## XDumper
```python
from main import XDumper
```



---
## t_y
```python
from main import t_y
```



---
## f_y
```python
from main import f_y
```



---
## XLoader
```python
from main import XLoader
```



---
## Indents
```python
from emitter import Indents
```



---
## RoundTripEmitter
```python
from emitter import RoundTripEmitter
```



---
## __repr__
```python
from emitter import __repr__
```



---
## append
```python
from emitter import append
```



---
## pop
```python
from emitter import pop
```



---
## seq_seq
```python
from emitter import seq_seq
```



---
## last_seq
```python
from emitter import last_seq
```



---
## seq_flow_align
```python
from emitter import seq_flow_align
```



---
## __len__
```python
from emitter import __len__
```



---
## stream
```python
from emitter import stream
```



---
## serializer
```python
from emitter import serializer
```



---
## flow_level
```python
from emitter import flow_level
```



---
## write_comment
```python
from emitter import write_comment
```



---
## write_pre_comment
```python
from emitter import write_pre_comment
```



---
## write_post_comment
```python
from emitter import write_post_comment
```



---
## Tag
```python
from tag import Tag
```

store original tag information for roundtripping

---
## __repr__
```python
from tag import __repr__
```



---
## __str__
```python
from tag import __str__
```



---
## __hash__
```python
from tag import __hash__
```



---
## __eq__
```python
from tag import __eq__
```



---
## startswith
```python
from tag import startswith
```



---
## trval
```python
from tag import trval
```



---
## uri_decoded_suffix
```python
from tag import uri_decoded_suffix
```



---
## select_transform
```python
from tag import select_transform
```

val: False -> non-round-trip
True -> round-trip

---
## check_handle
```python
from tag import check_handle
```



---
## __name__
```python
from comments import __name__
```



---
## IDX
```python
from comments import IDX
```



---
## Comment
```python
from comments import Comment
```



---
## NotNone
```python
from comments import NotNone
```



---
## Format
```python
from comments import Format
```



---
## LineCol
```python
from comments import LineCol
```

line and column information wrt document, values start at zero (0)

---
## CommentedBase
```python
from comments import CommentedBase
```



---
## CommentedSeq
```python
from comments import CommentedSeq
```



---
## CommentedKeySeq
```python
from comments import CommentedKeySeq
```

This primarily exists to be able to roundtrip keys that are sequences

---
## CommentedMapView
```python
from comments import CommentedMapView
```



---
## CommentedMapKeysView
```python
from comments import CommentedMapKeysView
```



---
## CommentedMapItemsView
```python
from comments import CommentedMapItemsView
```



---
## CommentedMapValuesView
```python
from comments import CommentedMapValuesView
```



---
## CommentedMap
```python
from comments import CommentedMap
```



---
## raise_immutable
```python
from comments import raise_immutable
```



---
## CommentedKeyMap
```python
from comments import CommentedKeyMap
```



---
## CommentedOrderedMap
```python
from comments import CommentedOrderedMap
```



---
## CommentedSet
```python
from comments import CommentedSet
```



---
## TaggedScalar
```python
from comments import TaggedScalar
```



---
## dump_comments
```python
from comments import dump_comments
```

recursively dump comments, all but the toplevel preceded by the path
in dotted form x.0.a

---
## __init__
```python
from comments import __init__
```



---
## __call__
```python
from comments import __call__
```



---
## __str__
```python
from comments import __str__
```



---
## _old__repr__
```python
from comments import _old__repr__
```



---
## __repr__
```python
from comments import __repr__
```



---
## items
```python
from comments import items
```



---
## end
```python
from comments import end
```



---
## pre
```python
from comments import pre
```



---
## get
```python
from comments import get
```



---
## set
```python
from comments import set
```



---
## __contains__
```python
from comments import __contains__
```



---
## set_flow_style
```python
from comments import set_flow_style
```



---
## set_block_style
```python
from comments import set_block_style
```



---
## flow_style
```python
from comments import flow_style
```

if default (the flow_style) is None, the flow style tacked on to
the object explicitly will be taken. If that is None as well the
default flow style rules the format down the line, or the type
of the constituent values (simple -> flow, map/list -> block)

---
## add_kv_line_col
```python
from comments import add_kv_line_col
```



---
## key
```python
from comments import key
```



---
## value
```python
from comments import value
```



---
## _kv
```python
from comments import _kv
```



---
## item
```python
from comments import item
```



---
## add_idx_line_col
```python
from comments import add_idx_line_col
```



---
## ca
```python
from comments import ca
```



---
## yaml_end_comment_extend
```python
from comments import yaml_end_comment_extend
```



---
## yaml_key_comment_extend
```python
from comments import yaml_key_comment_extend
```



---
## yaml_value_comment_extend
```python
from comments import yaml_value_comment_extend
```



---
## yaml_set_start_comment
```python
from comments import yaml_set_start_comment
```

overwrites any preceding comment lines on an object
expects comment to be without `#` and possible have multiple lines

---
## yaml_set_comment_before_after_key
```python
from comments import yaml_set_comment_before_after_key
```

expects comment (before/after) to be without `#` and possible have multiple lines

---
## fa
```python
from comments import fa
```

format attribute

set_flow_style()/set_block_style()

---
## yaml_add_eol_comment
```python
from comments import yaml_add_eol_comment
```

there is a problem as eol comments should start with ' #'
(but at the beginning of the line the space doesn't have to be before
the #. The column index is for the # mark

---
## lc
```python
from comments import lc
```



---
## _yaml_set_line_col
```python
from comments import _yaml_set_line_col
```



---
## _yaml_set_kv_line_col
```python
from comments import _yaml_set_kv_line_col
```



---
## _yaml_set_idx_line_col
```python
from comments import _yaml_set_idx_line_col
```



---
## anchor
```python
from comments import anchor
```



---
## yaml_anchor
```python
from comments import yaml_anchor
```



---
## yaml_set_anchor
```python
from comments import yaml_set_anchor
```



---
## tag
```python
from comments import tag
```



---
## yaml_set_ctag
```python
from comments import yaml_set_ctag
```



---
## copy_attributes
```python
from comments import copy_attributes
```

copies the YAML related attributes, not e.g. .values
returns target

---
## _yaml_add_eol_comment
```python
from comments import _yaml_add_eol_comment
```

add on the value line, with value specified by the key

---
## _yaml_get_pre_comment
```python
from comments import _yaml_get_pre_comment
```



---
## _yaml_get_column
```python
from comments import _yaml_get_column
```



---
## __getsingleitem__
```python
from comments import __getsingleitem__
```



---
## __setsingleitem__
```python
from comments import __setsingleitem__
```



---
## __delsingleitem__
```python
from comments import __delsingleitem__
```



---
## __len__
```python
from comments import __len__
```



---
## insert
```python
from comments import insert
```

insert key value into given position, as defined by source YAML
attach comment if provided

---
## extend
```python
from comments import extend
```



---
## __eq__
```python
from comments import __eq__
```



---
## _yaml_add_comment
```python
from comments import _yaml_add_comment
```

values is set to key to indicate a value attachment of comment

---
## _yaml_get_columnX
```python
from comments import _yaml_get_columnX
```



---
## _yaml_clear_pre_comment
```python
from comments import _yaml_clear_pre_comment
```



---
## __deepcopy__
```python
from comments import __deepcopy__
```



---
## __add__
```python
from comments import __add__
```



---
## sort
```python
from comments import sort
```



---
## _from_iterable
```python
from comments import _from_iterable
```



---
## __iter__
```python
from comments import __iter__
```



---
## update
```python
from comments import update
```



---
## mlget
```python
from comments import mlget
```

multi-level get that expects dicts within dicts

---
## __getitem__
```python
from comments import __getitem__
```



---
## __setitem__
```python
from comments import __setitem__
```



---
## _unmerged_contains
```python
from comments import _unmerged_contains
```



---
## non_merged_items
```python
from comments import non_merged_items
```



---
## __delitem__
```python
from comments import __delitem__
```



---
## pop
```python
from comments import pop
```



---
## _keys
```python
from comments import _keys
```



---
## keys
```python
from comments import keys
```



---
## values
```python
from comments import values
```



---
## _items
```python
from comments import _items
```



---
## merge
```python
from comments import merge
```



---
## copy
```python
from comments import copy
```



---
## add_referent
```python
from comments import add_referent
```



---
## add_yaml_merge
```python
from comments import add_yaml_merge
```



---
## update_key_value
```python
from comments import update_key_value
```



---
## __hash__
```python
from comments import __hash__
```



---
## fromkeys
```python
from comments import fromkeys
```



---
## add
```python
from comments import add
```

Add an element.

---
## discard
```python
from comments import discard
```

Remove an element.  Do not raise an exception if absent.

---
## count
```python
from comments import count
```



---
## comment_token
```python
from comments import comment_token
```



---
## get_one_level
```python
from comments import get_one_level
```



---
## __name__
```python
from upload_complete_params import __name__
```



---
## UploadCompleteParams
```python
from upload_complete_params import UploadCompleteParams
```



---
## __name__
```python
from file_purpose import __name__
```



---
## __name__
```python
from image_model import __name__
```



---
## __name__
```python
from model_deleted import __name__
```



---
## ModelDeleted
```python
from model_deleted import ModelDeleted
```



---
## __name__
```python
from moderation_text_input_param import __name__
```



---
## ModerationTextInputParam
```python
from moderation_text_input_param import ModerationTextInputParam
```



---
## __name__
```python
from batch_create_params import __name__
```



---
## BatchCreateParams
```python
from batch_create_params import BatchCreateParams
```



---
## __name__
```python
from moderation_create_params import __name__
```



---
## ModerationCreateParams
```python
from moderation_create_params import ModerationCreateParams
```



---
## __name__
```python
from embedding_model import __name__
```



---
## Upload
```python
from upload import Upload
```



---
## __name__
```python
from embedding import __name__
```



---
## Embedding
```python
from embedding import Embedding
```



---
## __name__
```python
from file_create_params import __name__
```



---
## FileCreateParams
```python
from file_create_params import FileCreateParams
```



---
## __name__
```python
from moderation import __name__
```



---
## Categories
```python
from moderation import Categories
```



---
## CategoryAppliedInputTypes
```python
from moderation import CategoryAppliedInputTypes
```



---
## CategoryScores
```python
from moderation import CategoryScores
```



---
## Moderation
```python
from moderation import Moderation
```



---
## __name__
```python
from batch import __name__
```



---
## Errors
```python
from batch import Errors
```



---
## Batch
```python
from batch import Batch
```



---
## __name__
```python
from moderation_image_url_input_param import __name__
```



---
## ImageURL
```python
from moderation_image_url_input_param import ImageURL
```



---
## ModerationImageURLInputParam
```python
from moderation_image_url_input_param import ModerationImageURLInputParam
```



---
## __name__
```python
from batch_list_params import __name__
```



---
## BatchListParams
```python
from batch_list_params import BatchListParams
```



---
## __name__
```python
from embedding_create_params import __name__
```



---
## EmbeddingCreateParams
```python
from embedding_create_params import EmbeddingCreateParams
```



---
## __name__
```python
from audio_response_format import __name__
```



---
## __name__
```python
from completion_choice import __name__
```



---
## Logprobs
```python
from completion_choice import Logprobs
```



---
## CompletionChoice
```python
from completion_choice import CompletionChoice
```



---
## __name__
```python
from image_generate_params import __name__
```



---
## ImageGenerateParams
```python
from image_generate_params import ImageGenerateParams
```



---
## Model
```python
from model import Model
```



---
## __name__
```python
from file_deleted import __name__
```



---
## FileDeleted
```python
from file_deleted import FileDeleted
```



---
## __name__
```python
from file_list_params import __name__
```



---
## FileListParams
```python
from file_list_params import FileListParams
```



---
## __name__
```python
from audio_model import __name__
```



---
## __name__
```python
from create_embedding_response import __name__
```



---
## Usage
```python
from create_embedding_response import Usage
```



---
## CreateEmbeddingResponse
```python
from create_embedding_response import CreateEmbeddingResponse
```



---
## __name__
```python
from moderation_multi_modal_input_param import __name__
```



---
## __name__
```python
from file_content import __name__
```



---
## __name__
```python
from batch_request_counts import __name__
```



---
## BatchRequestCounts
```python
from batch_request_counts import BatchRequestCounts
```



---
## __name__
```python
from images_response import __name__
```



---
## ImagesResponse
```python
from images_response import ImagesResponse
```



---
## __name__
```python
from completion_usage import __name__
```



---
## CompletionTokensDetails
```python
from completion_usage import CompletionTokensDetails
```



---
## PromptTokensDetails
```python
from completion_usage import PromptTokensDetails
```



---
## CompletionUsage
```python
from completion_usage import CompletionUsage
```



---
## __name__
```python
from moderation_model import __name__
```



---
## __name__
```python
from batch_error import __name__
```



---
## BatchError
```python
from batch_error import BatchError
```



---
## __name__
```python
from chat_model import __name__
```



---
## __name__
```python
from moderation_create_response import __name__
```



---
## ModerationCreateResponse
```python
from moderation_create_response import ModerationCreateResponse
```



---
## __name__
```python
from image_edit_params import __name__
```



---
## ImageEditParams
```python
from image_edit_params import ImageEditParams
```



---
## __name__
```python
from image_create_variation_params import __name__
```



---
## ImageCreateVariationParams
```python
from image_create_variation_params import ImageCreateVariationParams
```



---
## __name__
```python
from upload_create_params import __name__
```



---
## UploadCreateParams
```python
from upload_create_params import UploadCreateParams
```



---
## __name__
```python
from file_object import __name__
```



---
## FileObject
```python
from file_object import FileObject
```



---
## format_instructions
```python
from _common import format_instructions
```



---
## __name__
```python
from numpy_proxy import __name__
```



---
## NumpyProxy
```python
from numpy_proxy import NumpyProxy
```



---
## has_numpy
```python
from numpy_proxy import has_numpy
```



---
## __load__
```python
from numpy_proxy import __load__
```



---
## __name__
```python
from pandas_proxy import __name__
```



---
## PandasProxy
```python
from pandas_proxy import PandasProxy
```



---
## __load__
```python
from pandas_proxy import __load__
```



---
## AsyncFiles
```python
from files import AsyncFiles
```



---
## FilesWithRawResponse
```python
from files import FilesWithRawResponse
```



---
## AsyncFilesWithRawResponse
```python
from files import AsyncFilesWithRawResponse
```



---
## FilesWithStreamingResponse
```python
from files import FilesWithStreamingResponse
```



---
## AsyncFilesWithStreamingResponse
```python
from files import AsyncFilesWithStreamingResponse
```



---
## with_raw_response
```python
from files import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from files import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from files import create
```



---
## retrieve
```python
from files import retrieve
```

Retrieves a vector store file.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from files import list
```



---
## delete
```python
from files import delete
```



---
## content
```python
from files import content
```

Returns the contents of the specified file.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve_content
```python
from files import retrieve_content
```

Returns the contents of the specified file.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## wait_for_processing
```python
from files import wait_for_processing
```

Waits for the given file to be processed, default timeout is 30 mins.

---
## Models
```python
from models import Models
```



---
## AsyncModels
```python
from models import AsyncModels
```



---
## ModelsWithRawResponse
```python
from models import ModelsWithRawResponse
```



---
## AsyncModelsWithRawResponse
```python
from models import AsyncModelsWithRawResponse
```



---
## ModelsWithStreamingResponse
```python
from models import ModelsWithStreamingResponse
```



---
## AsyncModelsWithStreamingResponse
```python
from models import AsyncModelsWithStreamingResponse
```



---
## with_raw_response
```python
from models import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from models import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## retrieve
```python
from models import retrieve
```

Retrieves a model instance, providing basic information about the model such as
the owner and permissioning.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from models import list
```



---
## delete
```python
from models import delete
```



---
## __name__
```python
from moderations import __name__
```



---
## Moderations
```python
from moderations import Moderations
```



---
## AsyncModerations
```python
from moderations import AsyncModerations
```



---
## ModerationsWithRawResponse
```python
from moderations import ModerationsWithRawResponse
```



---
## AsyncModerationsWithRawResponse
```python
from moderations import AsyncModerationsWithRawResponse
```



---
## ModerationsWithStreamingResponse
```python
from moderations import ModerationsWithStreamingResponse
```



---
## AsyncModerationsWithStreamingResponse
```python
from moderations import AsyncModerationsWithStreamingResponse
```



---
## with_raw_response
```python
from moderations import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from moderations import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from moderations import create
```

Classifies if text and/or image inputs are potentially harmful.

Learn more in
the [moderation guide](https://platform.openai.com/docs/guides/moderation).

Args:
  input: Input (or inputs) to classify. Can be a single string, an array of strings, or
      an array of multi-modal input objects similar to other models.

  model: The content moderation model you would like to use. Learn more in
      [the moderation guide](https://platform.openai.com/docs/guides/moderation), and
      learn about available models
      [here](https://platform.openai.com/docs/models/moderation).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from moderations import __init__
```



---
## __name__
```python
from embeddings import __name__
```



---
## Embeddings
```python
from embeddings import Embeddings
```



---
## AsyncEmbeddings
```python
from embeddings import AsyncEmbeddings
```



---
## EmbeddingsWithRawResponse
```python
from embeddings import EmbeddingsWithRawResponse
```



---
## AsyncEmbeddingsWithRawResponse
```python
from embeddings import AsyncEmbeddingsWithRawResponse
```



---
## EmbeddingsWithStreamingResponse
```python
from embeddings import EmbeddingsWithStreamingResponse
```



---
## AsyncEmbeddingsWithStreamingResponse
```python
from embeddings import AsyncEmbeddingsWithStreamingResponse
```



---
## with_raw_response
```python
from embeddings import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from embeddings import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from embeddings import create
```

Creates an embedding vector representing the input text.

Args:
  input: Input text to embed, encoded as a string or array of tokens. To embed multiple
      inputs in a single request, pass an array of strings or array of token arrays.
      The input must not exceed the max input tokens for the model (8192 tokens for
      `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048
      dimensions or less.
      [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
      for counting tokens.

  model: ID of the model to use. You can use the
      [List models](https://platform.openai.com/docs/api-reference/models/list) API to
      see all of your available models, or see our
      [Model overview](https://platform.openai.com/docs/models/overview) for
      descriptions of them.

  dimensions: The number of dimensions the resulting output embeddings should have. Only
      supported in `text-embedding-3` and later models.

  encoding_format: The format to return the embeddings in. Can be either `float` or
      [`base64`](https://pypi.org/project/pybase64/).

  user: A unique identifier representing your end-user, which can help OpenAI to monitor
      and detect abuse.
      [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from embeddings import __init__
```



---
## parser
```python
from embeddings import parser
```



---
## Images
```python
from images import Images
```



---
## AsyncImages
```python
from images import AsyncImages
```



---
## ImagesWithRawResponse
```python
from images import ImagesWithRawResponse
```



---
## AsyncImagesWithRawResponse
```python
from images import AsyncImagesWithRawResponse
```



---
## ImagesWithStreamingResponse
```python
from images import ImagesWithStreamingResponse
```



---
## AsyncImagesWithStreamingResponse
```python
from images import AsyncImagesWithStreamingResponse
```



---
## with_raw_response
```python
from images import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from images import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create_variation
```python
from images import create_variation
```

Creates a variation of a given image.

Args:
  image: The image to use as the basis for the variation(s). Must be a valid PNG file,
      less than 4MB, and square.

  model: The model to use for image generation. Only `dall-e-2` is supported at this
      time.

  n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
      `n=1` is supported.

  response_format: The format in which the generated images are returned. Must be one of `url` or
      `b64_json`. URLs are only valid for 60 minutes after the image has been
      generated.

  size: The size of the generated images. Must be one of `256x256`, `512x512`, or
      `1024x1024`.

  user: A unique identifier representing your end-user, which can help OpenAI to monitor
      and detect abuse.
      [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## edit
```python
from images import edit
```

Creates an edited or extended image given an original image and a prompt.

Args:
  image: The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask
      is not provided, image must have transparency, which will be used as the mask.

  prompt: A text description of the desired image(s). The maximum length is 1000
      characters.

  mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
      indicate where `image` should be edited. Must be a valid PNG file, less than
      4MB, and have the same dimensions as `image`.

  model: The model to use for image generation. Only `dall-e-2` is supported at this
      time.

  n: The number of images to generate. Must be between 1 and 10.

  response_format: The format in which the generated images are returned. Must be one of `url` or
      `b64_json`. URLs are only valid for 60 minutes after the image has been
      generated.

  size: The size of the generated images. Must be one of `256x256`, `512x512`, or
      `1024x1024`.

  user: A unique identifier representing your end-user, which can help OpenAI to monitor
      and detect abuse.
      [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## generate
```python
from images import generate
```

Creates an image given a prompt.

Args:
  prompt: A text description of the desired image(s). The maximum length is 1000
      characters for `dall-e-2` and 4000 characters for `dall-e-3`.

  model: The model to use for image generation.

  n: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only
      `n=1` is supported.

  quality: The quality of the image that will be generated. `hd` creates images with finer
      details and greater consistency across the image. This param is only supported
      for `dall-e-3`.

  response_format: The format in which the generated images are returned. Must be one of `url` or
      `b64_json`. URLs are only valid for 60 minutes after the image has been
      generated.

  size: The size of the generated images. Must be one of `256x256`, `512x512`, or
      `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or
      `1024x1792` for `dall-e-3` models.

  style: The style of the generated images. Must be one of `vivid` or `natural`. Vivid
      causes the model to lean towards generating hyper-real and dramatic images.
      Natural causes the model to produce more natural, less hyper-real looking
      images. This param is only supported for `dall-e-3`.

  user: A unique identifier representing your end-user, which can help OpenAI to monitor
      and detect abuse.
      [Learn more](https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from images import __init__
```



---
## __name__
```python
from batches import __name__
```



---
## Batches
```python
from batches import Batches
```



---
## AsyncBatches
```python
from batches import AsyncBatches
```



---
## BatchesWithRawResponse
```python
from batches import BatchesWithRawResponse
```



---
## AsyncBatchesWithRawResponse
```python
from batches import AsyncBatchesWithRawResponse
```



---
## BatchesWithStreamingResponse
```python
from batches import BatchesWithStreamingResponse
```



---
## AsyncBatchesWithStreamingResponse
```python
from batches import AsyncBatchesWithStreamingResponse
```



---
## with_raw_response
```python
from batches import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from batches import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from batches import create
```

Creates and executes a batch from an uploaded file of requests

Args:
  completion_window: The time frame within which the batch should be processed. Currently only `24h`
      is supported.

  endpoint: The endpoint to be used for all requests in the batch. Currently
      `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.
      Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000
      embedding inputs across all requests in the batch.

  input_file_id: The ID of an uploaded file that contains requests for the new batch.

      See [upload file](https://platform.openai.com/docs/api-reference/files/create)
      for how to upload a file.

      Your input file must be formatted as a
      [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input),
      and must be uploaded with the purpose `batch`. The file can contain up to 50,000
      requests, and can be up to 100 MB in size.

  metadata: Optional custom metadata for the batch.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from batches import retrieve
```

Retrieves a batch.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from batches import list
```

List your organization's batches.

Args:
  after: A cursor for use in pagination.

`after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## cancel
```python
from batches import cancel
```

Cancels an in-progress batch.

The batch will be in status `cancelling` for up to
10 minutes, before changing to `cancelled`, where it will have partial results
(if any) available in the output file.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from batches import __init__
```



---
## __name__
```python
from _errors import __name__
```



---
## CLIError
```python
from _errors import CLIError
```



---
## SilentCLIError
```python
from _errors import SilentCLIError
```



---
## display_error
```python
from _errors import display_error
```



---
## Arguments
```python
from _cli import Arguments
```



---
## _build_parser
```python
from _cli import _build_parser
```



---
## main
```python
from _cli import main
```



---
## _parse_args
```python
from _cli import _parse_args
```



---
## _main
```python
from _cli import _main
```



---
## help
```python
from _cli import help
```



---
## Config
```python
from _cli import Config
```



---
## __name__
```python
from _progress import __name__
```



---
## CancelledError
```python
from _progress import CancelledError
```



---
## BufferReader
```python
from _progress import BufferReader
```



---
## progress
```python
from _progress import progress
```



---
## MB
```python
from _progress import MB
```



---
## __init__
```python
from _progress import __init__
```



---
## __str__
```python
from _progress import __str__
```



---
## __len__
```python
from _progress import __len__
```



---
## read
```python
from _progress import read
```



---
## incr
```python
from _progress import incr
```



---
## Colors
```python
from _utils import Colors
```



---
## get_client
```python
from _utils import get_client
```



---
## organization_info
```python
from _utils import organization_info
```



---
## print_model
```python
from _utils import print_model
```



---
## can_use_http2
```python
from _utils import can_use_http2
```



---
## __name__
```python
from _old_api import __name__
```



---
## APIRemovedInV1
```python
from _old_api import APIRemovedInV1
```



---
## APIRemovedInV1Proxy
```python
from _old_api import APIRemovedInV1Proxy
```



---
## __init__
```python
from _old_api import __init__
```



---
## __load__
```python
from _old_api import __load__
```



---
## __call__
```python
from _old_api import __call__
```



---
## Remediation
```python
from _validators import Remediation
```



---
## num_examples_validator
```python
from _validators import num_examples_validator
```

This validator will only print out the number of examples and recommend to the user to increase the number of examples if less than 100.

---
## necessary_column_validator
```python
from _validators import necessary_column_validator
```

This validator will ensure that the necessary column is present in the dataframe.

---
## additional_column_validator
```python
from _validators import additional_column_validator
```

This validator will remove additional columns from the dataframe.

---
## non_empty_field_validator
```python
from _validators import non_empty_field_validator
```

This validator will ensure that no completion is empty.

---
## duplicated_rows_validator
```python
from _validators import duplicated_rows_validator
```

This validator will suggest to the user to remove duplicate rows if they exist.

---
## long_examples_validator
```python
from _validators import long_examples_validator
```

This validator will suggest to the user to remove examples that are too long.

---
## common_prompt_suffix_validator
```python
from _validators import common_prompt_suffix_validator
```

This validator will suggest to add a common suffix to the prompt if one doesn't already exist in case of classification or conditional generation.

---
## common_prompt_prefix_validator
```python
from _validators import common_prompt_prefix_validator
```

This validator will suggest to remove a common prefix from the prompt if a long one exist.

---
## common_completion_prefix_validator
```python
from _validators import common_completion_prefix_validator
```

This validator will suggest to remove a common prefix from the completion if a long one exist.

---
## common_completion_suffix_validator
```python
from _validators import common_completion_suffix_validator
```

This validator will suggest to add a common suffix to the completion if one doesn't already exist in case of classification or conditional generation.

---
## completions_space_start_validator
```python
from _validators import completions_space_start_validator
```

This validator will suggest to add a space at the start of the completion if it doesn't already exist. This helps with tokenization.

---
## lower_case_validator
```python
from _validators import lower_case_validator
```

This validator will suggest to lowercase the column values, if more than a third of letters are uppercase.

---
## read_any_format
```python
from _validators import read_any_format
```

This function will read a file saved in .csv, .json, .txt, .xlsx or .tsv format using pandas.
- for .xlsx it will read the first sheet
- for .txt it will assume completions and split on newline

---
## format_inferrer_validator
```python
from _validators import format_inferrer_validator
```

This validator will infer the likely fine-tuning format of the data, and display it to the user if it is classification.
It will also suggest to use ada and explain train/validation split benefits.

---
## apply_necessary_remediation
```python
from _validators import apply_necessary_remediation
```

This function will apply a necessary remediation to a dataframe, or print an error message if one exists.

---
## accept_suggestion
```python
from _validators import accept_suggestion
```



---
## apply_optional_remediation
```python
from _validators import apply_optional_remediation
```

This function will apply an optional remediation to a dataframe, based on the user input.

---
## estimate_fine_tuning_time
```python
from _validators import estimate_fine_tuning_time
```

Estimate the time it'll take to fine-tune the dataset

---
## get_outfnames
```python
from _validators import get_outfnames
```



---
## get_classification_hyperparams
```python
from _validators import get_classification_hyperparams
```



---
## write_out_file
```python
from _validators import write_out_file
```

This function will write out a dataframe to a file, if the user would like to proceed, and also offer a fine-tuning command with the newly created file.
For classification it will optionally ask the user if they would like to split the data into train/valid files, and modify the suggested command to include the valid set.

---
## infer_task_type
```python
from _validators import infer_task_type
```

Infer the likely fine-tuning task type from the data

---
## get_common_xfix
```python
from _validators import get_common_xfix
```

Finds the longest common suffix or prefix of all the values in a series

---
## get_validators
```python
from _validators import get_validators
```



---
## apply_validators
```python
from _validators import apply_validators
```



---
## lower_case_column
```python
from _validators import lower_case_column
```



---
## add_suffix
```python
from _validators import add_suffix
```



---
## remove_common_prefix
```python
from _validators import remove_common_prefix
```



---
## optional_fn
```python
from _validators import optional_fn
```



---
## add_space_start
```python
from _validators import add_space_start
```



---
## lower_case
```python
from _validators import lower_case
```



---
## format_time
```python
from _validators import format_time
```



---
## necessary_fn
```python
from _validators import necessary_fn
```



---
## get_long_indexes
```python
from _validators import get_long_indexes
```



---
## lower_case_column_creator
```python
from _validators import lower_case_column_creator
```



---
## __name__
```python
from _tools import __name__
```



---
## PydanticFunctionTool
```python
from _tools import PydanticFunctionTool
```

Dictionary wrapper so we can pass the given base model
throughout the entire request stack without having to special
case it.

---
## pydantic_function_tool
```python
from _tools import pydantic_function_tool
```



---
## __init__
```python
from _tools import __init__
```



---
## cast
```python
from _tools import cast
```



---
## __name__
```python
from _pydantic import __name__
```



---
## to_strict_json_schema
```python
from _pydantic import to_strict_json_schema
```



---
## _ensure_strict_json_schema
```python
from _pydantic import _ensure_strict_json_schema
```

Mutates the given JSON schema to ensure it conforms to the `strict` standard
that the API expects.

---
## resolve_ref
```python
from _pydantic import resolve_ref
```



---
## is_basemodel_type
```python
from _pydantic import is_basemodel_type
```



---
## is_dataclass_like_type
```python
from _pydantic import is_dataclass_like_type
```

Returns True if the given type likely used `@pydantic.dataclass`

---
## is_dict
```python
from _pydantic import is_dict
```



---
## has_more_than_n_keys
```python
from _pydantic import has_more_than_n_keys
```



---
## __name__
```python
from azure import __name__
```



---
## MutuallyExclusiveAuthError
```python
from azure import MutuallyExclusiveAuthError
```



---
## BaseAzureClient
```python
from azure import BaseAzureClient
```



---
## AzureOpenAI
```python
from azure import AzureOpenAI
```



---
## AsyncAzureOpenAI
```python
from azure import AsyncAzureOpenAI
```



---
## __init__
```python
from azure import __init__
```

Construct a new asynchronous azure openai client instance.

This automatically infers the following arguments from their corresponding environment variables if they are not provided:
- `api_key` from `AZURE_OPENAI_API_KEY`
- `organization` from `OPENAI_ORG_ID`
- `project` from `OPENAI_PROJECT_ID`
- `azure_ad_token` from `AZURE_OPENAI_AD_TOKEN`
- `api_version` from `OPENAI_API_VERSION`
- `azure_endpoint` from `AZURE_OPENAI_ENDPOINT`

Args:
    azure_endpoint: Your Azure endpoint, including the resource, e.g. `https://example-resource.azure.openai.com/`

    azure_ad_token: Your Azure Active Directory token, https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id

    azure_ad_token_provider: A function that returns an Azure Active Directory token, will be invoked on every request.

    azure_deployment: A model deployment, if given sets the base client URL to include `/deployments/{azure_deployment}`.
        Note: this means you won't be able to use non-deployment endpoints. Not supported with Assistants APIs.

---
## _build_request
```python
from azure import _build_request
```



---
## copy
```python
from azure import copy
```

Create a new client instance re-using the same options given to the current client with optional overriding.

---
## _get_azure_ad_token
```python
from azure import _get_azure_ad_token
```



---
## _prepare_options
```python
from azure import _prepare_options
```



---
## __name__
```python
from other_file_chunking_strategy_object import __name__
```



---
## OtherFileChunkingStrategyObject
```python
from other_file_chunking_strategy_object import OtherFileChunkingStrategyObject
```



---
## __name__
```python
from assistant_tool_param import __name__
```



---
## __name__
```python
from assistant_list_params import __name__
```



---
## AssistantListParams
```python
from assistant_list_params import AssistantListParams
```



---
## __name__
```python
from file_search_tool import __name__
```



---
## FileSearchRankingOptions
```python
from file_search_tool import FileSearchRankingOptions
```



---
## FileSearch
```python
from file_search_tool import FileSearch
```



---
## FileSearchTool
```python
from file_search_tool import FileSearchTool
```



---
## __name__
```python
from assistant_tool_choice_function import __name__
```



---
## AssistantToolChoiceFunction
```python
from assistant_tool_choice_function import AssistantToolChoiceFunction
```



---
## __name__
```python
from assistant_stream_event import __name__
```



---
## ThreadCreated
```python
from assistant_stream_event import ThreadCreated
```



---
## ThreadRunCreated
```python
from assistant_stream_event import ThreadRunCreated
```



---
## ThreadRunQueued
```python
from assistant_stream_event import ThreadRunQueued
```



---
## ThreadRunInProgress
```python
from assistant_stream_event import ThreadRunInProgress
```



---
## ThreadRunRequiresAction
```python
from assistant_stream_event import ThreadRunRequiresAction
```



---
## ThreadRunCompleted
```python
from assistant_stream_event import ThreadRunCompleted
```



---
## ThreadRunIncomplete
```python
from assistant_stream_event import ThreadRunIncomplete
```



---
## ThreadRunFailed
```python
from assistant_stream_event import ThreadRunFailed
```



---
## ThreadRunCancelling
```python
from assistant_stream_event import ThreadRunCancelling
```



---
## ThreadRunCancelled
```python
from assistant_stream_event import ThreadRunCancelled
```



---
## ThreadRunExpired
```python
from assistant_stream_event import ThreadRunExpired
```



---
## ThreadRunStepCreated
```python
from assistant_stream_event import ThreadRunStepCreated
```



---
## ThreadRunStepInProgress
```python
from assistant_stream_event import ThreadRunStepInProgress
```



---
## ThreadRunStepDelta
```python
from assistant_stream_event import ThreadRunStepDelta
```



---
## ThreadRunStepCompleted
```python
from assistant_stream_event import ThreadRunStepCompleted
```



---
## ThreadRunStepFailed
```python
from assistant_stream_event import ThreadRunStepFailed
```



---
## ThreadRunStepCancelled
```python
from assistant_stream_event import ThreadRunStepCancelled
```



---
## ThreadRunStepExpired
```python
from assistant_stream_event import ThreadRunStepExpired
```



---
## ThreadMessageCreated
```python
from assistant_stream_event import ThreadMessageCreated
```



---
## ThreadMessageInProgress
```python
from assistant_stream_event import ThreadMessageInProgress
```



---
## ThreadMessageDelta
```python
from assistant_stream_event import ThreadMessageDelta
```



---
## ThreadMessageCompleted
```python
from assistant_stream_event import ThreadMessageCompleted
```



---
## ThreadMessageIncomplete
```python
from assistant_stream_event import ThreadMessageIncomplete
```



---
## ErrorEvent
```python
from assistant_stream_event import ErrorEvent
```



---
## __name__
```python
from vector_store_create_params import __name__
```



---
## VectorStoreCreateParams
```python
from vector_store_create_params import VectorStoreCreateParams
```



---
## ExpiresAfter
```python
from vector_store_create_params import ExpiresAfter
```



---
## __name__
```python
from code_interpreter_tool_param import __name__
```



---
## CodeInterpreterToolParam
```python
from code_interpreter_tool_param import CodeInterpreterToolParam
```



---
## __name__
```python
from function_tool_param import __name__
```



---
## FunctionToolParam
```python
from function_tool_param import FunctionToolParam
```



---
## ToolResourcesCodeInterpreter
```python
from thread import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearch
```python
from thread import ToolResourcesFileSearch
```



---
## ToolResources
```python
from thread import ToolResources
```



---
## Thread
```python
from thread import Thread
```



---
## __name__
```python
from thread_update_params import __name__
```



---
## ThreadUpdateParams
```python
from thread_update_params import ThreadUpdateParams
```



---
## ToolResourcesCodeInterpreter
```python
from thread_update_params import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearch
```python
from thread_update_params import ToolResourcesFileSearch
```



---
## ToolResources
```python
from thread_update_params import ToolResources
```



---
## __name__
```python
from file_chunking_strategy import __name__
```



---
## __name__
```python
from file_chunking_strategy_param import __name__
```



---
## __name__
```python
from vector_store import __name__
```



---
## FileCounts
```python
from vector_store import FileCounts
```



---
## ExpiresAfter
```python
from vector_store import ExpiresAfter
```



---
## VectorStore
```python
from vector_store import VectorStore
```



---
## __name__
```python
from thread_deleted import __name__
```



---
## ThreadDeleted
```python
from thread_deleted import ThreadDeleted
```



---
## __name__
```python
from assistant_tool_choice import __name__
```



---
## AssistantToolChoice
```python
from assistant_tool_choice import AssistantToolChoice
```



---
## __name__
```python
from thread_create_params import __name__
```



---
## ThreadCreateParams
```python
from thread_create_params import ThreadCreateParams
```



---
## MessageAttachmentToolFileSearch
```python
from thread_create_params import MessageAttachmentToolFileSearch
```



---
## MessageAttachment
```python
from thread_create_params import MessageAttachment
```



---
## Message
```python
from thread_create_params import Message
```



---
## ToolResourcesCodeInterpreter
```python
from thread_create_params import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearchVectorStore
```python
from thread_create_params import ToolResourcesFileSearchVectorStore
```



---
## ToolResourcesFileSearch
```python
from thread_create_params import ToolResourcesFileSearch
```



---
## ToolResources
```python
from thread_create_params import ToolResources
```



---
## __name__
```python
from assistant_tool_choice_option import __name__
```



---
## __name__
```python
from assistant import __name__
```



---
## ToolResourcesCodeInterpreter
```python
from assistant import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearch
```python
from assistant import ToolResourcesFileSearch
```



---
## ToolResources
```python
from assistant import ToolResources
```



---
## Assistant
```python
from assistant import Assistant
```



---
## __name__
```python
from assistant_deleted import __name__
```



---
## AssistantDeleted
```python
from assistant_deleted import AssistantDeleted
```



---
## __name__
```python
from auto_file_chunking_strategy_param import __name__
```



---
## AutoFileChunkingStrategyParam
```python
from auto_file_chunking_strategy_param import AutoFileChunkingStrategyParam
```



---
## __name__
```python
from vector_store_update_params import __name__
```



---
## VectorStoreUpdateParams
```python
from vector_store_update_params import VectorStoreUpdateParams
```



---
## ExpiresAfter
```python
from vector_store_update_params import ExpiresAfter
```



---
## __name__
```python
from assistant_response_format_option import __name__
```



---
## __name__
```python
from assistant_tool_choice_param import __name__
```



---
## AssistantToolChoiceParam
```python
from assistant_tool_choice_param import AssistantToolChoiceParam
```



---
## __name__
```python
from assistant_tool_choice_option_param import __name__
```



---
## __name__
```python
from code_interpreter_tool import __name__
```



---
## CodeInterpreterTool
```python
from code_interpreter_tool import CodeInterpreterTool
```



---
## __name__
```python
from assistant_response_format_option_param import __name__
```



---
## __name__
```python
from assistant_tool import __name__
```



---
## __name__
```python
from function_tool import __name__
```



---
## FunctionTool
```python
from function_tool import FunctionTool
```



---
## __name__
```python
from assistant_create_params import __name__
```



---
## AssistantCreateParams
```python
from assistant_create_params import AssistantCreateParams
```



---
## ToolResourcesCodeInterpreter
```python
from assistant_create_params import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearchVectorStore
```python
from assistant_create_params import ToolResourcesFileSearchVectorStore
```



---
## ToolResourcesFileSearch
```python
from assistant_create_params import ToolResourcesFileSearch
```



---
## ToolResources
```python
from assistant_create_params import ToolResources
```



---
## __name__
```python
from assistant_tool_choice_function_param import __name__
```



---
## AssistantToolChoiceFunctionParam
```python
from assistant_tool_choice_function_param import AssistantToolChoiceFunctionParam
```



---
## __name__
```python
from vector_store_deleted import __name__
```



---
## VectorStoreDeleted
```python
from vector_store_deleted import VectorStoreDeleted
```



---
## __name__
```python
from static_file_chunking_strategy_object import __name__
```



---
## StaticFileChunkingStrategyObject
```python
from static_file_chunking_strategy_object import StaticFileChunkingStrategyObject
```



---
## __name__
```python
from assistant_update_params import __name__
```



---
## AssistantUpdateParams
```python
from assistant_update_params import AssistantUpdateParams
```



---
## ToolResourcesCodeInterpreter
```python
from assistant_update_params import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearch
```python
from assistant_update_params import ToolResourcesFileSearch
```



---
## ToolResources
```python
from assistant_update_params import ToolResources
```



---
## __name__
```python
from static_file_chunking_strategy import __name__
```



---
## StaticFileChunkingStrategy
```python
from static_file_chunking_strategy import StaticFileChunkingStrategy
```



---
## __name__
```python
from vector_store_list_params import __name__
```



---
## VectorStoreListParams
```python
from vector_store_list_params import VectorStoreListParams
```



---
## __name__
```python
from thread_create_and_run_params import __name__
```



---
## ThreadCreateAndRunParamsBase
```python
from thread_create_and_run_params import ThreadCreateAndRunParamsBase
```



---
## ThreadMessageAttachmentToolFileSearch
```python
from thread_create_and_run_params import ThreadMessageAttachmentToolFileSearch
```



---
## ThreadMessageAttachment
```python
from thread_create_and_run_params import ThreadMessageAttachment
```



---
## ThreadMessage
```python
from thread_create_and_run_params import ThreadMessage
```



---
## ThreadToolResourcesCodeInterpreter
```python
from thread_create_and_run_params import ThreadToolResourcesCodeInterpreter
```



---
## ThreadToolResourcesFileSearchVectorStore
```python
from thread_create_and_run_params import ThreadToolResourcesFileSearchVectorStore
```



---
## ThreadToolResourcesFileSearch
```python
from thread_create_and_run_params import ThreadToolResourcesFileSearch
```



---
## ThreadToolResources
```python
from thread_create_and_run_params import ThreadToolResources
```



---
## Thread
```python
from thread_create_and_run_params import Thread
```



---
## ToolResourcesCodeInterpreter
```python
from thread_create_and_run_params import ToolResourcesCodeInterpreter
```



---
## ToolResourcesFileSearch
```python
from thread_create_and_run_params import ToolResourcesFileSearch
```



---
## ToolResources
```python
from thread_create_and_run_params import ToolResources
```



---
## TruncationStrategy
```python
from thread_create_and_run_params import TruncationStrategy
```



---
## ThreadCreateAndRunParamsNonStreaming
```python
from thread_create_and_run_params import ThreadCreateAndRunParamsNonStreaming
```



---
## ThreadCreateAndRunParamsStreaming
```python
from thread_create_and_run_params import ThreadCreateAndRunParamsStreaming
```



---
## __name__
```python
from static_file_chunking_strategy_param import __name__
```



---
## StaticFileChunkingStrategyParam
```python
from static_file_chunking_strategy_param import StaticFileChunkingStrategyParam
```



---
## __name__
```python
from file_search_tool_param import __name__
```



---
## FileSearchRankingOptions
```python
from file_search_tool_param import FileSearchRankingOptions
```



---
## FileSearch
```python
from file_search_tool_param import FileSearch
```



---
## FileSearchToolParam
```python
from file_search_tool_param import FileSearchToolParam
```



---
## __name__
```python
from fine_tuning_job_integration import __name__
```



---
## __name__
```python
from fine_tuning_job import __name__
```



---
## Error
```python
from fine_tuning_job import Error
```



---
## Hyperparameters
```python
from fine_tuning_job import Hyperparameters
```



---
## FineTuningJob
```python
from fine_tuning_job import FineTuningJob
```



---
## __name__
```python
from job_create_params import __name__
```



---
## JobCreateParams
```python
from job_create_params import JobCreateParams
```



---
## Hyperparameters
```python
from job_create_params import Hyperparameters
```



---
## IntegrationWandb
```python
from job_create_params import IntegrationWandb
```



---
## Integration
```python
from job_create_params import Integration
```



---
## __name__
```python
from fine_tuning_job_wandb_integration import __name__
```



---
## FineTuningJobWandbIntegration
```python
from fine_tuning_job_wandb_integration import FineTuningJobWandbIntegration
```



---
## __name__
```python
from job_list_params import __name__
```



---
## JobListParams
```python
from job_list_params import JobListParams
```



---
## __name__
```python
from fine_tuning_job_event import __name__
```



---
## FineTuningJobEvent
```python
from fine_tuning_job_event import FineTuningJobEvent
```



---
## __name__
```python
from fine_tuning_job_wandb_integration_object import __name__
```



---
## FineTuningJobWandbIntegrationObject
```python
from fine_tuning_job_wandb_integration_object import FineTuningJobWandbIntegrationObject
```



---
## __name__
```python
from job_list_events_params import __name__
```



---
## JobListEventsParams
```python
from job_list_events_params import JobListEventsParams
```



---
## __name__
```python
from chat_completion_user_message_param import __name__
```



---
## ChatCompletionUserMessageParam
```python
from chat_completion_user_message_param import ChatCompletionUserMessageParam
```



---
## __name__
```python
from chat_completion_role import __name__
```



---
## __name__
```python
from chat_completion_message import __name__
```



---
## FunctionCall
```python
from chat_completion_message import FunctionCall
```



---
## ChatCompletionMessage
```python
from chat_completion_message import ChatCompletionMessage
```



---
## __name__
```python
from chat_completion_message_tool_call_param import __name__
```



---
## Function
```python
from chat_completion_message_tool_call_param import Function
```



---
## ChatCompletionMessageToolCallParam
```python
from chat_completion_message_tool_call_param import ChatCompletionMessageToolCallParam
```



---
## __name__
```python
from chat_completion_content_part_param import __name__
```



---
## ChoiceLogprobs
```python
from chat_completion import ChoiceLogprobs
```



---
## Choice
```python
from chat_completion import Choice
```



---
## ChatCompletion
```python
from chat_completion import ChatCompletion
```



---
## __name__
```python
from chat_completion_message_param import __name__
```



---
## __name__
```python
from chat_completion_function_call_option_param import __name__
```



---
## ChatCompletionFunctionCallOptionParam
```python
from chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam
```



---
## __name__
```python
from parsed_chat_completion import __name__
```



---
## ParsedChatCompletionMessage
```python
from parsed_chat_completion import ParsedChatCompletionMessage
```



---
## ParsedChoice
```python
from parsed_chat_completion import ParsedChoice
```



---
## ParsedChatCompletion
```python
from parsed_chat_completion import ParsedChatCompletion
```



---
## __name__
```python
from chat_completion_chunk import __name__
```



---
## ChoiceDeltaFunctionCall
```python
from chat_completion_chunk import ChoiceDeltaFunctionCall
```



---
## ChoiceDeltaToolCallFunction
```python
from chat_completion_chunk import ChoiceDeltaToolCallFunction
```



---
## ChoiceDeltaToolCall
```python
from chat_completion_chunk import ChoiceDeltaToolCall
```



---
## ChoiceDelta
```python
from chat_completion_chunk import ChoiceDelta
```



---
## ChoiceLogprobs
```python
from chat_completion_chunk import ChoiceLogprobs
```



---
## Choice
```python
from chat_completion_chunk import Choice
```



---
## ChatCompletionChunk
```python
from chat_completion_chunk import ChatCompletionChunk
```



---
## __name__
```python
from chat_completion_token_logprob import __name__
```



---
## TopLogprob
```python
from chat_completion_token_logprob import TopLogprob
```



---
## ChatCompletionTokenLogprob
```python
from chat_completion_token_logprob import ChatCompletionTokenLogprob
```



---
## Function
```python
from completion_create_params import Function
```



---
## __name__
```python
from chat_completion_assistant_message_param import __name__
```



---
## FunctionCall
```python
from chat_completion_assistant_message_param import FunctionCall
```



---
## ChatCompletionAssistantMessageParam
```python
from chat_completion_assistant_message_param import ChatCompletionAssistantMessageParam
```



---
## __name__
```python
from parsed_function_tool_call import __name__
```



---
## ParsedFunction
```python
from parsed_function_tool_call import ParsedFunction
```



---
## ParsedFunctionToolCall
```python
from parsed_function_tool_call import ParsedFunctionToolCall
```



---
## __name__
```python
from chat_completion_tool_choice_option_param import __name__
```



---
## __name__
```python
from chat_completion_function_message_param import __name__
```



---
## ChatCompletionFunctionMessageParam
```python
from chat_completion_function_message_param import ChatCompletionFunctionMessageParam
```



---
## __name__
```python
from chat_completion_content_part_text_param import __name__
```



---
## ChatCompletionContentPartTextParam
```python
from chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
```



---
## __name__
```python
from chat_completion_content_part_image_param import __name__
```



---
## ImageURL
```python
from chat_completion_content_part_image_param import ImageURL
```



---
## ChatCompletionContentPartImageParam
```python
from chat_completion_content_part_image_param import ChatCompletionContentPartImageParam
```



---
## __name__
```python
from chat_completion_stream_options_param import __name__
```



---
## ChatCompletionStreamOptionsParam
```python
from chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
```



---
## __name__
```python
from chat_completion_tool_param import __name__
```



---
## ChatCompletionToolParam
```python
from chat_completion_tool_param import ChatCompletionToolParam
```



---
## __name__
```python
from chat_completion_tool_message_param import __name__
```



---
## ChatCompletionToolMessageParam
```python
from chat_completion_tool_message_param import ChatCompletionToolMessageParam
```



---
## __name__
```python
from chat_completion_named_tool_choice_param import __name__
```



---
## Function
```python
from chat_completion_named_tool_choice_param import Function
```



---
## ChatCompletionNamedToolChoiceParam
```python
from chat_completion_named_tool_choice_param import ChatCompletionNamedToolChoiceParam
```



---
## __name__
```python
from chat_completion_message_tool_call import __name__
```



---
## Function
```python
from chat_completion_message_tool_call import Function
```



---
## ChatCompletionMessageToolCall
```python
from chat_completion_message_tool_call import ChatCompletionMessageToolCall
```



---
## __name__
```python
from chat_completion_content_part_refusal_param import __name__
```



---
## ChatCompletionContentPartRefusalParam
```python
from chat_completion_content_part_refusal_param import ChatCompletionContentPartRefusalParam
```



---
## __name__
```python
from chat_completion_system_message_param import __name__
```



---
## ChatCompletionSystemMessageParam
```python
from chat_completion_system_message_param import ChatCompletionSystemMessageParam
```



---
## __name__
```python
from part_create_params import __name__
```



---
## PartCreateParams
```python
from part_create_params import PartCreateParams
```



---
## __name__
```python
from upload_part import __name__
```



---
## UploadPart
```python
from upload_part import UploadPart
```



---
## __name__
```python
from response_format_text import __name__
```



---
## ResponseFormatText
```python
from response_format_text import ResponseFormatText
```



---
## __name__
```python
from response_format_json_object import __name__
```



---
## ResponseFormatJSONObject
```python
from response_format_json_object import ResponseFormatJSONObject
```



---
## __name__
```python
from error_object import __name__
```



---
## ErrorObject
```python
from error_object import ErrorObject
```



---
## __name__
```python
from response_format_json_schema import __name__
```



---
## JSONSchema
```python
from response_format_json_schema import JSONSchema
```



---
## ResponseFormatJSONSchema
```python
from response_format_json_schema import ResponseFormatJSONSchema
```



---
## __name__
```python
from function_definition import __name__
```



---
## FunctionDefinition
```python
from function_definition import FunctionDefinition
```



---
## __name__
```python
from function_parameters import __name__
```



---
## __name__
```python
from transcription import __name__
```



---
## Transcription
```python
from transcription import Transcription
```



---
## __name__
```python
from transcription_segment import __name__
```



---
## TranscriptionSegment
```python
from transcription_segment import TranscriptionSegment
```



---
## __name__
```python
from transcription_create_response import __name__
```



---
## __name__
```python
from translation_verbose import __name__
```



---
## TranslationVerbose
```python
from translation_verbose import TranslationVerbose
```



---
## __name__
```python
from transcription_word import __name__
```



---
## TranscriptionWord
```python
from transcription_word import TranscriptionWord
```



---
## __name__
```python
from speech_model import __name__
```



---
## __name__
```python
from translation_create_params import __name__
```



---
## TranslationCreateParams
```python
from translation_create_params import TranslationCreateParams
```



---
## __name__
```python
from translation_create_response import __name__
```



---
## __name__
```python
from transcription_verbose import __name__
```



---
## TranscriptionVerbose
```python
from transcription_verbose import TranscriptionVerbose
```



---
## __name__
```python
from speech_create_params import __name__
```



---
## SpeechCreateParams
```python
from speech_create_params import SpeechCreateParams
```



---
## __name__
```python
from transcription_create_params import __name__
```



---
## TranscriptionCreateParams
```python
from transcription_create_params import TranscriptionCreateParams
```



---
## __name__
```python
from vector_store_file_deleted import __name__
```



---
## VectorStoreFileDeleted
```python
from vector_store_file_deleted import VectorStoreFileDeleted
```



---
## __name__
```python
from vector_store_file_batch import __name__
```



---
## FileCounts
```python
from vector_store_file_batch import FileCounts
```



---
## VectorStoreFileBatch
```python
from vector_store_file_batch import VectorStoreFileBatch
```



---
## __name__
```python
from vector_store_file import __name__
```



---
## LastError
```python
from vector_store_file import LastError
```



---
## VectorStoreFile
```python
from vector_store_file import VectorStoreFile
```



---
## __name__
```python
from file_batch_list_files_params import __name__
```



---
## FileBatchListFilesParams
```python
from file_batch_list_files_params import FileBatchListFilesParams
```



---
## __name__
```python
from file_batch_create_params import __name__
```



---
## FileBatchCreateParams
```python
from file_batch_create_params import FileBatchCreateParams
```



---
## __name__
```python
from run_status import __name__
```



---
## __name__
```python
from message_content_delta import __name__
```



---
## IncompleteDetails
```python
from run import IncompleteDetails
```



---
## LastError
```python
from run import LastError
```



---
## RequiredActionSubmitToolOutputs
```python
from run import RequiredActionSubmitToolOutputs
```



---
## RequiredAction
```python
from run import RequiredAction
```



---
## TruncationStrategy
```python
from run import TruncationStrategy
```



---
## Usage
```python
from run import Usage
```



---
## Run
```python
from run import Run
```



---
## __name__
```python
from message_update_params import __name__
```



---
## MessageUpdateParams
```python
from message_update_params import MessageUpdateParams
```



---
## __name__
```python
from file_citation_delta_annotation import __name__
```



---
## FileCitation
```python
from file_citation_delta_annotation import FileCitation
```



---
## FileCitationDeltaAnnotation
```python
from file_citation_delta_annotation import FileCitationDeltaAnnotation
```



---
## __name__
```python
from message_delta import __name__
```



---
## MessageDelta
```python
from message_delta import MessageDelta
```



---
## __name__
```python
from run_create_params import __name__
```



---
## RunCreateParamsBase
```python
from run_create_params import RunCreateParamsBase
```



---
## AdditionalMessageAttachmentToolFileSearch
```python
from run_create_params import AdditionalMessageAttachmentToolFileSearch
```



---
## AdditionalMessageAttachment
```python
from run_create_params import AdditionalMessageAttachment
```



---
## AdditionalMessage
```python
from run_create_params import AdditionalMessage
```



---
## TruncationStrategy
```python
from run_create_params import TruncationStrategy
```



---
## RunCreateParamsNonStreaming
```python
from run_create_params import RunCreateParamsNonStreaming
```



---
## RunCreateParamsStreaming
```python
from run_create_params import RunCreateParamsStreaming
```



---
## __name__
```python
from text_content_block_param import __name__
```



---
## TextContentBlockParam
```python
from text_content_block_param import TextContentBlockParam
```



---
## __name__
```python
from image_file_content_block_param import __name__
```



---
## ImageFileContentBlockParam
```python
from image_file_content_block_param import ImageFileContentBlockParam
```



---
## __name__
```python
from image_url_param import __name__
```



---
## ImageURLParam
```python
from image_url_param import ImageURLParam
```



---
## __name__
```python
from run_submit_tool_outputs_params import __name__
```



---
## RunSubmitToolOutputsParamsBase
```python
from run_submit_tool_outputs_params import RunSubmitToolOutputsParamsBase
```



---
## ToolOutput
```python
from run_submit_tool_outputs_params import ToolOutput
```



---
## RunSubmitToolOutputsParamsNonStreaming
```python
from run_submit_tool_outputs_params import RunSubmitToolOutputsParamsNonStreaming
```



---
## RunSubmitToolOutputsParamsStreaming
```python
from run_submit_tool_outputs_params import RunSubmitToolOutputsParamsStreaming
```



---
## __name__
```python
from message_list_params import __name__
```



---
## MessageListParams
```python
from message_list_params import MessageListParams
```



---
## __name__
```python
from run_update_params import __name__
```



---
## RunUpdateParams
```python
from run_update_params import RunUpdateParams
```



---
## __name__
```python
from refusal_content_block import __name__
```



---
## RefusalContentBlock
```python
from refusal_content_block import RefusalContentBlock
```



---
## MessageDeltaEvent
```python
from message_delta_event import MessageDeltaEvent
```



---
## __name__
```python
from text_content_block import __name__
```



---
## TextContentBlock
```python
from text_content_block import TextContentBlock
```



---
## __name__
```python
from message_content_part_param import __name__
```



---
## __name__
```python
from annotation_delta import __name__
```



---
## __name__
```python
from image_file_param import __name__
```



---
## ImageFileParam
```python
from image_file_param import ImageFileParam
```



---
## AttachmentToolAssistantToolsFileSearchTypeOnly
```python
from message import AttachmentToolAssistantToolsFileSearchTypeOnly
```



---
## Attachment
```python
from message import Attachment
```



---
## IncompleteDetails
```python
from message import IncompleteDetails
```



---
## MessageCreateParams
```python
from message_create_params import MessageCreateParams
```



---
## AttachmentToolFileSearch
```python
from message_create_params import AttachmentToolFileSearch
```



---
## Attachment
```python
from message_create_params import Attachment
```



---
## __name__
```python
from file_path_delta_annotation import __name__
```



---
## FilePath
```python
from file_path_delta_annotation import FilePath
```



---
## FilePathDeltaAnnotation
```python
from file_path_delta_annotation import FilePathDeltaAnnotation
```



---
## __name__
```python
from image_file_content_block import __name__
```



---
## ImageFileContentBlock
```python
from image_file_content_block import ImageFileContentBlock
```



---
## __name__
```python
from image_file_delta_block import __name__
```



---
## ImageFileDeltaBlock
```python
from image_file_delta_block import ImageFileDeltaBlock
```



---
## __name__
```python
from image_file import __name__
```



---
## ImageFile
```python
from image_file import ImageFile
```



---
## __name__
```python
from file_citation_annotation import __name__
```



---
## FileCitation
```python
from file_citation_annotation import FileCitation
```



---
## FileCitationAnnotation
```python
from file_citation_annotation import FileCitationAnnotation
```



---
## __name__
```python
from image_url_delta_block import __name__
```



---
## ImageURLDeltaBlock
```python
from image_url_delta_block import ImageURLDeltaBlock
```



---
## __name__
```python
from refusal_delta_block import __name__
```



---
## RefusalDeltaBlock
```python
from refusal_delta_block import RefusalDeltaBlock
```



---
## __name__
```python
from image_url_delta import __name__
```



---
## ImageURLDelta
```python
from image_url_delta import ImageURLDelta
```



---
## __name__
```python
from message_deleted import __name__
```



---
## MessageDeleted
```python
from message_deleted import MessageDeleted
```



---
## __name__
```python
from required_action_function_tool_call import __name__
```



---
## Function
```python
from required_action_function_tool_call import Function
```



---
## RequiredActionFunctionToolCall
```python
from required_action_function_tool_call import RequiredActionFunctionToolCall
```



---
## __name__
```python
from image_file_delta import __name__
```



---
## ImageFileDelta
```python
from image_file_delta import ImageFileDelta
```



---
## __name__
```python
from message_content import __name__
```



---
## __name__
```python
from text_delta_block import __name__
```



---
## TextDeltaBlock
```python
from text_delta_block import TextDeltaBlock
```



---
## __name__
```python
from image_url import __name__
```



---
## ImageURL
```python
from image_url import ImageURL
```



---
## __name__
```python
from file_path_annotation import __name__
```



---
## FilePath
```python
from file_path_annotation import FilePath
```



---
## FilePathAnnotation
```python
from file_path_annotation import FilePathAnnotation
```



---
## __name__
```python
from run_list_params import __name__
```



---
## RunListParams
```python
from run_list_params import RunListParams
```



---
## __name__
```python
from image_url_content_block_param import __name__
```



---
## ImageURLContentBlockParam
```python
from image_url_content_block_param import ImageURLContentBlockParam
```



---
## __name__
```python
from image_url_content_block import __name__
```



---
## ImageURLContentBlock
```python
from image_url_content_block import ImageURLContentBlock
```



---
## __name__
```python
from run_step_delta_event import __name__
```



---
## RunStepDeltaEvent
```python
from run_step_delta_event import RunStepDeltaEvent
```



---
## __name__
```python
from step_list_params import __name__
```



---
## StepListParams
```python
from step_list_params import StepListParams
```



---
## __name__
```python
from tool_call_delta_object import __name__
```



---
## ToolCallDeltaObject
```python
from tool_call_delta_object import ToolCallDeltaObject
```



---
## __name__
```python
from function_tool_call import __name__
```



---
## Function
```python
from function_tool_call import Function
```



---
## FunctionToolCall
```python
from function_tool_call import FunctionToolCall
```



---
## __name__
```python
from run_step import __name__
```



---
## LastError
```python
from run_step import LastError
```



---
## Usage
```python
from run_step import Usage
```



---
## RunStep
```python
from run_step import RunStep
```



---
## __name__
```python
from file_search_tool_call import __name__
```



---
## FileSearchRankingOptions
```python
from file_search_tool_call import FileSearchRankingOptions
```



---
## FileSearchResultContent
```python
from file_search_tool_call import FileSearchResultContent
```



---
## FileSearchResult
```python
from file_search_tool_call import FileSearchResult
```



---
## FileSearch
```python
from file_search_tool_call import FileSearch
```



---
## FileSearchToolCall
```python
from file_search_tool_call import FileSearchToolCall
```



---
## __name__
```python
from file_search_tool_call_delta import __name__
```



---
## FileSearchToolCallDelta
```python
from file_search_tool_call_delta import FileSearchToolCallDelta
```



---
## __name__
```python
from tool_calls_step_details import __name__
```



---
## ToolCallsStepDetails
```python
from tool_calls_step_details import ToolCallsStepDetails
```



---
## __name__
```python
from run_step_include import __name__
```



---
## __name__
```python
from tool_call_delta import __name__
```



---
## __name__
```python
from code_interpreter_tool_call_delta import __name__
```



---
## CodeInterpreter
```python
from code_interpreter_tool_call_delta import CodeInterpreter
```



---
## CodeInterpreterToolCallDelta
```python
from code_interpreter_tool_call_delta import CodeInterpreterToolCallDelta
```



---
## __name__
```python
from code_interpreter_output_image import __name__
```



---
## Image
```python
from code_interpreter_output_image import Image
```



---
## CodeInterpreterOutputImage
```python
from code_interpreter_output_image import CodeInterpreterOutputImage
```



---
## __name__
```python
from tool_call import __name__
```



---
## __name__
```python
from run_step_delta import __name__
```



---
## RunStepDelta
```python
from run_step_delta import RunStepDelta
```



---
## __name__
```python
from code_interpreter_tool_call import __name__
```



---
## CodeInterpreterOutputLogs
```python
from code_interpreter_tool_call import CodeInterpreterOutputLogs
```



---
## CodeInterpreterOutputImageImage
```python
from code_interpreter_tool_call import CodeInterpreterOutputImageImage
```



---
## CodeInterpreterOutputImage
```python
from code_interpreter_tool_call import CodeInterpreterOutputImage
```



---
## CodeInterpreter
```python
from code_interpreter_tool_call import CodeInterpreter
```



---
## CodeInterpreterToolCall
```python
from code_interpreter_tool_call import CodeInterpreterToolCall
```



---
## __name__
```python
from code_interpreter_logs import __name__
```



---
## CodeInterpreterLogs
```python
from code_interpreter_logs import CodeInterpreterLogs
```



---
## __name__
```python
from step_retrieve_params import __name__
```



---
## StepRetrieveParams
```python
from step_retrieve_params import StepRetrieveParams
```



---
## __name__
```python
from message_creation_step_details import __name__
```



---
## MessageCreation
```python
from message_creation_step_details import MessageCreation
```



---
## MessageCreationStepDetails
```python
from message_creation_step_details import MessageCreationStepDetails
```



---
## __name__
```python
from run_step_delta_message_delta import __name__
```



---
## MessageCreation
```python
from run_step_delta_message_delta import MessageCreation
```



---
## RunStepDeltaMessageDelta
```python
from run_step_delta_message_delta import RunStepDeltaMessageDelta
```



---
## __name__
```python
from function_tool_call_delta import __name__
```



---
## Function
```python
from function_tool_call_delta import Function
```



---
## FunctionToolCallDelta
```python
from function_tool_call_delta import FunctionToolCallDelta
```



---
## __name__
```python
from fine_tuning_job_checkpoint import __name__
```



---
## Metrics
```python
from fine_tuning_job_checkpoint import Metrics
```



---
## FineTuningJobCheckpoint
```python
from fine_tuning_job_checkpoint import FineTuningJobCheckpoint
```



---
## __name__
```python
from checkpoint_list_params import __name__
```



---
## CheckpointListParams
```python
from checkpoint_list_params import CheckpointListParams
```



---
## __name__
```python
from assistants import __name__
```



---
## Assistants
```python
from assistants import Assistants
```



---
## AsyncAssistants
```python
from assistants import AsyncAssistants
```



---
## AssistantsWithRawResponse
```python
from assistants import AssistantsWithRawResponse
```



---
## AsyncAssistantsWithRawResponse
```python
from assistants import AsyncAssistantsWithRawResponse
```



---
## AssistantsWithStreamingResponse
```python
from assistants import AssistantsWithStreamingResponse
```



---
## AsyncAssistantsWithStreamingResponse
```python
from assistants import AsyncAssistantsWithStreamingResponse
```



---
## with_raw_response
```python
from assistants import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from assistants import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from assistants import create
```

Create an assistant with a model and instructions.

Args:
  model: ID of the model to use. You can use the
      [List models](https://platform.openai.com/docs/api-reference/models/list) API to
      see all of your available models, or see our
      [Model overview](https://platform.openai.com/docs/models/overview) for
      descriptions of them.

  description: The description of the assistant. The maximum length is 512 characters.

  instructions: The system instructions that the assistant uses. The maximum length is 256,000
      characters.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  name: The name of the assistant. The maximum length is 256 characters.

  response_format: Specifies the format that the model must output. Compatible with
      [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
      [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
      and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

      Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
      Outputs which ensures the model will match your supplied JSON schema. Learn more
      in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
      message the model generates is valid JSON.

      **Important:** when using JSON mode, you **must** also instruct the model to
      produce JSON yourself via a system or user message. Without this, the model may
      generate an unending stream of whitespace until the generation reaches the token
      limit, resulting in a long-running and seemingly "stuck" request. Also note that
      the message content may be partially cut off if `finish_reason="length"`, which
      indicates the generation exceeded `max_tokens` or the conversation exceeded the
      max context length.

  temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
      make the output more random, while lower values like 0.2 will make it more
      focused and deterministic.

  tool_resources: A set of resources that are used by the assistant's tools. The resources are
      specific to the type of tool. For example, the `code_interpreter` tool requires
      a list of file IDs, while the `file_search` tool requires a list of vector store
      IDs.

  tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
      assistant. Tools can be of types `code_interpreter`, `file_search`, or
      `function`.

  top_p: An alternative to sampling with temperature, called nucleus sampling, where the
      model considers the results of the tokens with top_p probability mass. So 0.1
      means only the tokens comprising the top 10% probability mass are considered.

      We generally recommend altering this or temperature but not both.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from assistants import retrieve
```

Retrieves an assistant.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## update
```python
from assistants import update
```

Modifies an assistant.

Args:
  description: The description of the assistant.

The maximum length is 512 characters.

  instructions: The system instructions that the assistant uses. The maximum length is 256,000
      characters.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  model: ID of the model to use. You can use the
      [List models](https://platform.openai.com/docs/api-reference/models/list) API to
      see all of your available models, or see our
      [Model overview](https://platform.openai.com/docs/models/overview) for
      descriptions of them.

  name: The name of the assistant. The maximum length is 256 characters.

  response_format: Specifies the format that the model must output. Compatible with
      [GPT-4o](https://platform.openai.com/docs/models/gpt-4o),
      [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-turbo-and-gpt-4),
      and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.

      Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
      Outputs which ensures the model will match your supplied JSON schema. Learn more
      in the
      [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).

      Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
      message the model generates is valid JSON.

      **Important:** when using JSON mode, you **must** also instruct the model to
      produce JSON yourself via a system or user message. Without this, the model may
      generate an unending stream of whitespace until the generation reaches the token
      limit, resulting in a long-running and seemingly "stuck" request. Also note that
      the message content may be partially cut off if `finish_reason="length"`, which
      indicates the generation exceeded `max_tokens` or the conversation exceeded the
      max context length.

  temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
      make the output more random, while lower values like 0.2 will make it more
      focused and deterministic.

  tool_resources: A set of resources that are used by the assistant's tools. The resources are
      specific to the type of tool. For example, the `code_interpreter` tool requires
      a list of file IDs, while the `file_search` tool requires a list of vector store
      IDs.

  tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
      assistant. Tools can be of types `code_interpreter`, `file_search`, or
      `function`.

  top_p: An alternative to sampling with temperature, called nucleus sampling, where the
      model considers the results of the tokens with top_p probability mass. So 0.1
      means only the tokens comprising the top 10% probability mass are considered.

      We generally recommend altering this or temperature but not both.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from assistants import list
```

Returns a list of assistants.

Args:
  after: A cursor for use in pagination.

`after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## delete
```python
from assistants import delete
```

Delete an assistant.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from assistants import __init__
```



---
## chat
```python
from beta import chat
```



---
## vector_stores
```python
from beta import vector_stores
```



---
## assistants
```python
from beta import assistants
```



---
## threads
```python
from beta import threads
```



---
## __name__
```python
from fine_tuning import __name__
```



---
## FineTuning
```python
from fine_tuning import FineTuning
```



---
## AsyncFineTuning
```python
from fine_tuning import AsyncFineTuning
```



---
## FineTuningWithRawResponse
```python
from fine_tuning import FineTuningWithRawResponse
```



---
## AsyncFineTuningWithRawResponse
```python
from fine_tuning import AsyncFineTuningWithRawResponse
```



---
## FineTuningWithStreamingResponse
```python
from fine_tuning import FineTuningWithStreamingResponse
```



---
## AsyncFineTuningWithStreamingResponse
```python
from fine_tuning import AsyncFineTuningWithStreamingResponse
```



---
## jobs
```python
from fine_tuning import jobs
```



---
## with_raw_response
```python
from fine_tuning import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from fine_tuning import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## __init__
```python
from fine_tuning import __init__
```



---
## validate_response_format
```python
from completions import validate_response_format
```



---
## __name__
```python
from chat import __name__
```



---
## Chat
```python
from chat import Chat
```



---
## AsyncChat
```python
from chat import AsyncChat
```



---
## ChatWithRawResponse
```python
from chat import ChatWithRawResponse
```



---
## AsyncChatWithRawResponse
```python
from chat import AsyncChatWithRawResponse
```



---
## ChatWithStreamingResponse
```python
from chat import ChatWithStreamingResponse
```



---
## AsyncChatWithStreamingResponse
```python
from chat import AsyncChatWithStreamingResponse
```



---
## completions
```python
from chat import completions
```



---
## with_raw_response
```python
from chat import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from chat import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## __init__
```python
from chat import __init__
```



---
## Parts
```python
from parts import Parts
```



---
## AsyncParts
```python
from parts import AsyncParts
```



---
## PartsWithRawResponse
```python
from parts import PartsWithRawResponse
```



---
## AsyncPartsWithRawResponse
```python
from parts import AsyncPartsWithRawResponse
```



---
## PartsWithStreamingResponse
```python
from parts import PartsWithStreamingResponse
```



---
## AsyncPartsWithStreamingResponse
```python
from parts import AsyncPartsWithStreamingResponse
```



---
## with_raw_response
```python
from parts import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from parts import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from parts import create
```

Adds a
[Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
[Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
A Part represents a chunk of bytes from the file you are trying to upload.

Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
maximum of 8 GB.

It is possible to add multiple Parts in parallel. You can decide the intended
order of the Parts when you
[complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).

Args:
  data: The chunk of bytes for this Part.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from parts import __init__
```



---
## __name__
```python
from uploads import __name__
```



---
## Uploads
```python
from uploads import Uploads
```



---
## AsyncUploads
```python
from uploads import AsyncUploads
```



---
## UploadsWithRawResponse
```python
from uploads import UploadsWithRawResponse
```



---
## AsyncUploadsWithRawResponse
```python
from uploads import AsyncUploadsWithRawResponse
```



---
## UploadsWithStreamingResponse
```python
from uploads import UploadsWithStreamingResponse
```



---
## AsyncUploadsWithStreamingResponse
```python
from uploads import AsyncUploadsWithStreamingResponse
```



---
## parts
```python
from uploads import parts
```



---
## with_raw_response
```python
from uploads import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from uploads import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## upload_file_chunked
```python
from uploads import upload_file_chunked
```

Splits the given file into multiple parts and uploads them sequentially.

```py
from pathlib import Path

client.uploads.upload_file(
    file=Path("my-paper.pdf"),
    mime_type="pdf",
    purpose="assistants",
)
```

---
## create
```python
from uploads import create
```

Creates an intermediate
[Upload](https://platform.openai.com/docs/api-reference/uploads/object) object
that you can add
[Parts](https://platform.openai.com/docs/api-reference/uploads/part-object) to.
Currently, an Upload can accept at most 8 GB in total and expires after an hour
after you create it.

Once you complete the Upload, we will create a
[File](https://platform.openai.com/docs/api-reference/files/object) object that
contains all the parts you uploaded. This File is usable in the rest of our
platform as a regular File object.

For certain `purpose`s, the correct `mime_type` must be specified. Please refer
to documentation for the supported MIME types for your use case:

- [Assistants](https://platform.openai.com/docs/assistants/tools/file-search/supported-files)

For guidance on the proper filename extensions for each purpose, please follow
the documentation on
[creating a File](https://platform.openai.com/docs/api-reference/files/create).

Args:
  bytes: The number of bytes in the file you are uploading.

  filename: The name of the file to upload.

  mime_type: The MIME type of the file.

      This must fall within the supported MIME types for your file purpose. See the
      supported MIME types for assistants and vision.

  purpose: The intended purpose of the uploaded file.

      See the
      [documentation on File purposes](https://platform.openai.com/docs/api-reference/files/create#files-create-purpose).

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## cancel
```python
from uploads import cancel
```

Cancels the Upload.

No Parts may be added after an Upload is cancelled.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## complete
```python
from uploads import complete
```

Completes the
[Upload](https://platform.openai.com/docs/api-reference/uploads/object).

Within the returned Upload object, there is a nested
[File](https://platform.openai.com/docs/api-reference/files/object) object that
is ready to use in the rest of the platform.

You can specify the order of the Parts by passing in an ordered list of the Part
IDs.

The number of bytes uploaded upon completion must match the number of bytes
initially specified when creating the Upload object. No Parts may be added after
an Upload is completed.

Args:
  part_ids: The ordered list of Part IDs.

  md5: The optional md5 checksum for the file contents to verify if the bytes uploaded
      matches what you expect.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from uploads import __init__
```



---
## __name__
```python
from translations import __name__
```



---
## Translations
```python
from translations import Translations
```



---
## AsyncTranslations
```python
from translations import AsyncTranslations
```



---
## TranslationsWithRawResponse
```python
from translations import TranslationsWithRawResponse
```



---
## AsyncTranslationsWithRawResponse
```python
from translations import AsyncTranslationsWithRawResponse
```



---
## TranslationsWithStreamingResponse
```python
from translations import TranslationsWithStreamingResponse
```



---
## AsyncTranslationsWithStreamingResponse
```python
from translations import AsyncTranslationsWithStreamingResponse
```



---
## _get_response_format_type
```python
from translations import _get_response_format_type
```



---
## with_raw_response
```python
from translations import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from translations import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from translations import create
```

Translates audio into English.

Args:
  file: The audio file object (not file name) translate, in one of these formats: flac,
      mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

  model: ID of the model to use. Only `whisper-1` (which is powered by our open source
      Whisper V2 model) is currently available.

  prompt: An optional text to guide the model's style or continue a previous audio
      segment. The
      [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
      should be in English.

  response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
      `verbose_json`, or `vtt`.

  temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
      output more random, while lower values like 0.2 will make it more focused and
      deterministic. If set to 0, the model will use
      [log probability](https://en.wikipedia.org/wiki/Log_probability) to
      automatically increase the temperature until certain thresholds are hit.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from translations import __init__
```



---
## AsyncAudio
```python
from audio import AsyncAudio
```



---
## AudioWithRawResponse
```python
from audio import AudioWithRawResponse
```



---
## AsyncAudioWithRawResponse
```python
from audio import AsyncAudioWithRawResponse
```



---
## AudioWithStreamingResponse
```python
from audio import AudioWithStreamingResponse
```



---
## AsyncAudioWithStreamingResponse
```python
from audio import AsyncAudioWithStreamingResponse
```



---
## transcriptions
```python
from audio import transcriptions
```



---
## translations
```python
from audio import translations
```



---
## speech
```python
from audio import speech
```



---
## with_raw_response
```python
from audio import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from audio import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## __name__
```python
from transcriptions import __name__
```



---
## Transcriptions
```python
from transcriptions import Transcriptions
```



---
## AsyncTranscriptions
```python
from transcriptions import AsyncTranscriptions
```



---
## TranscriptionsWithRawResponse
```python
from transcriptions import TranscriptionsWithRawResponse
```



---
## AsyncTranscriptionsWithRawResponse
```python
from transcriptions import AsyncTranscriptionsWithRawResponse
```



---
## TranscriptionsWithStreamingResponse
```python
from transcriptions import TranscriptionsWithStreamingResponse
```



---
## AsyncTranscriptionsWithStreamingResponse
```python
from transcriptions import AsyncTranscriptionsWithStreamingResponse
```



---
## _get_response_format_type
```python
from transcriptions import _get_response_format_type
```



---
## with_raw_response
```python
from transcriptions import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from transcriptions import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from transcriptions import create
```

Transcribes audio into the input language.

Args:
  file:
      The audio file object (not file name) to transcribe, in one of these formats:
      flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.

  model: ID of the model to use. Only `whisper-1` (which is powered by our open source
      Whisper V2 model) is currently available.

  language: The language of the input audio. Supplying the input language in
      [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will
      improve accuracy and latency.

  prompt: An optional text to guide the model's style or continue a previous audio
      segment. The
      [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
      should match the audio language.

  response_format: The format of the output, in one of these options: `json`, `text`, `srt`,
      `verbose_json`, or `vtt`.

  temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
      output more random, while lower values like 0.2 will make it more focused and
      deterministic. If set to 0, the model will use
      [log probability](https://en.wikipedia.org/wiki/Log_probability) to
      automatically increase the temperature until certain thresholds are hit.

  timestamp_granularities: The timestamp granularities to populate for this transcription.
      `response_format` must be set `verbose_json` to use timestamp granularities.
      Either or both of these options are supported: `word`, or `segment`. Note: There
      is no additional latency for segment timestamps, but generating word timestamps
      incurs additional latency.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from transcriptions import __init__
```



---
## __name__
```python
from speech import __name__
```



---
## Speech
```python
from speech import Speech
```



---
## AsyncSpeech
```python
from speech import AsyncSpeech
```



---
## SpeechWithRawResponse
```python
from speech import SpeechWithRawResponse
```



---
## AsyncSpeechWithRawResponse
```python
from speech import AsyncSpeechWithRawResponse
```



---
## SpeechWithStreamingResponse
```python
from speech import SpeechWithStreamingResponse
```



---
## AsyncSpeechWithStreamingResponse
```python
from speech import AsyncSpeechWithStreamingResponse
```



---
## with_raw_response
```python
from speech import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from speech import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from speech import create
```

Generates audio from the input text.

Args:
  input: The text to generate audio for. The maximum length is 4096 characters.

  model:
      One of the available [TTS models](https://platform.openai.com/docs/models/tts):
      `tts-1` or `tts-1-hd`

  voice: The voice to use when generating the audio. Supported voices are `alloy`,
      `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are
      available in the
      [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech/voice-options).

  response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
      `wav`, and `pcm`.

  speed: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is
      the default.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from speech import __init__
```



---
## create_and_poll
```python
from files import create_and_poll
```

Attach a file to the given vector store and wait for it to be processed.

---
## poll
```python
from files import poll
```

Wait for the vector store file to finish processing.

Note: this will return even if the file failed to process, you need to check
file.last_error and file.status to handle these cases

---
## upload
```python
from files import upload
```

Upload a file to the `files` API and then attach it to the given vector store.

Note the file will be asynchronously processed (you can use the alternative
polling helper method to wait for processing to complete).

---
## upload_and_poll
```python
from files import upload_and_poll
```

Add a file to a vector store and poll until processing is complete.

---
## __name__
```python
from vector_stores import __name__
```



---
## VectorStores
```python
from vector_stores import VectorStores
```



---
## AsyncVectorStores
```python
from vector_stores import AsyncVectorStores
```



---
## VectorStoresWithRawResponse
```python
from vector_stores import VectorStoresWithRawResponse
```



---
## AsyncVectorStoresWithRawResponse
```python
from vector_stores import AsyncVectorStoresWithRawResponse
```



---
## VectorStoresWithStreamingResponse
```python
from vector_stores import VectorStoresWithStreamingResponse
```



---
## AsyncVectorStoresWithStreamingResponse
```python
from vector_stores import AsyncVectorStoresWithStreamingResponse
```



---
## files
```python
from vector_stores import files
```



---
## file_batches
```python
from vector_stores import file_batches
```



---
## with_raw_response
```python
from vector_stores import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from vector_stores import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from vector_stores import create
```

Create a vector store.

Args:
  chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
      strategy. Only applicable if `file_ids` is non-empty.

  expires_after: The expiration policy for a vector store.

  file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
      the vector store should use. Useful for tools like `file_search` that can access
      files.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  name: The name of the vector store.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from vector_stores import retrieve
```

Retrieves a vector store.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## update
```python
from vector_stores import update
```

Modifies a vector store.

Args:
  expires_after: The expiration policy for a vector store.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  name: The name of the vector store.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from vector_stores import list
```

Returns a list of vector stores.

Args:
  after: A cursor for use in pagination.

`after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## delete
```python
from vector_stores import delete
```

Delete a vector store.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from vector_stores import __init__
```



---
## __name__
```python
from file_batches import __name__
```



---
## FileBatches
```python
from file_batches import FileBatches
```



---
## AsyncFileBatches
```python
from file_batches import AsyncFileBatches
```



---
## FileBatchesWithRawResponse
```python
from file_batches import FileBatchesWithRawResponse
```



---
## AsyncFileBatchesWithRawResponse
```python
from file_batches import AsyncFileBatchesWithRawResponse
```



---
## FileBatchesWithStreamingResponse
```python
from file_batches import FileBatchesWithStreamingResponse
```



---
## AsyncFileBatchesWithStreamingResponse
```python
from file_batches import AsyncFileBatchesWithStreamingResponse
```



---
## with_raw_response
```python
from file_batches import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from file_batches import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from file_batches import create
```

Create a vector store file batch.

Args:
  file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
      the vector store should use. Useful for tools like `file_search` that can access
      files.

  chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
      strategy. Only applicable if `file_ids` is non-empty.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from file_batches import retrieve
```

Retrieves a vector store file batch.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## cancel
```python
from file_batches import cancel
```

Cancel a vector store file batch.

This attempts to cancel the processing of
files in this batch as soon as possible.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## create_and_poll
```python
from file_batches import create_and_poll
```

Create a vector store batch and poll until all files have been processed.

---
## list_files
```python
from file_batches import list_files
```

Returns a list of vector store files in a batch.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  filter: Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## poll
```python
from file_batches import poll
```

Wait for the given file batch to be processed.

Note: this will return even if one of the files failed to process, you need to
check batch.file_counts.failed_count to handle this case.

---
## upload_and_poll
```python
from file_batches import upload_and_poll
```

Uploads the given files concurrently and then creates a vector store file batch.

If you've already uploaded certain files that you want to include in this batch
then you can pass their IDs through the `file_ids` argument.

By default, if any file upload fails then an exception will be eagerly raised.

The number of concurrency uploads is configurable using the `max_concurrency`
parameter.

Note: this method only supports `asyncio` or `trio` as the backing async
runtime.

---
## __init__
```python
from file_batches import __init__
```



---
## parse
```python
from completions import parse
```

Wrapper over the `client.chat.completions.create()` method that provides richer integrations with Python specific types
& returns a `ParsedChatCompletion` object, which is a subclass of the standard `ChatCompletion` class.

You can pass a pydantic model to this method and it will automatically convert the model
into a JSON schema, send it to the API and parse the response content back into the given model.

This method will also automatically parse `function` tool calls if:
- You use the `openai.pydantic_function_tool()` helper method
- You mark your tool schema with `"strict": True`

Example usage:
```py
from pydantic import BaseModel
from openai import OpenAI


class Step(BaseModel):
    explanation: str
    output: str


class MathResponse(BaseModel):
    steps: List[Step]
    final_answer: str


client = OpenAI()
completion = client.beta.chat.completions.parse(
    model="gpt-4o-2024-08-06",
    messages=[
        {"role": "system", "content": "You are a helpful math tutor."},
        {"role": "user", "content": "solve 8x + 31 = 2"},
    ],
    response_format=MathResponse,
)

message = completion.choices[0].message
if message.parsed:
    print(message.parsed.steps)
    print("answer: ", message.parsed.final_answer)
```

---
## stream
```python
from completions import stream
```

Wrapper over the `client.chat.completions.create(stream=True)` method that provides a more granular event API
and automatic accumulation of each delta.

This also supports all of the parsing utilities that `.parse()` does.

Unlike `.create(stream=True)`, the `.stream()` method requires usage within a context manager to prevent accidental leakage of the response:

```py
async with client.beta.chat.completions.stream(
    model="gpt-4o-2024-08-06",
    messages=[...],
) as stream:
    async for event in stream:
        if event.type == "content.delta":
            print(event.delta, flush=True, end="")
```

When the context manager is entered, an `AsyncChatCompletionStream` instance is returned which, like `.create(stream=True)` is an async iterator. The full list of events that are yielded by the iterator are outlined in [these docs](https://github.com/openai/openai-python/blob/main/helpers.md#chat-completions-events).

When the context manager exits, the response will be closed, however the `stream` instance is still available outside
the context manager.

---
## parser
```python
from completions import parser
```



---
## __name__
```python
from threads import __name__
```



---
## Threads
```python
from threads import Threads
```



---
## AsyncThreads
```python
from threads import AsyncThreads
```



---
## ThreadsWithRawResponse
```python
from threads import ThreadsWithRawResponse
```



---
## AsyncThreadsWithRawResponse
```python
from threads import AsyncThreadsWithRawResponse
```



---
## ThreadsWithStreamingResponse
```python
from threads import ThreadsWithStreamingResponse
```



---
## AsyncThreadsWithStreamingResponse
```python
from threads import AsyncThreadsWithStreamingResponse
```



---
## runs
```python
from threads import runs
```



---
## messages
```python
from threads import messages
```



---
## with_raw_response
```python
from threads import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from threads import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from threads import create
```

Create a thread.

Args:
  messages: A list of [messages](https://platform.openai.com/docs/api-reference/messages) to
      start the thread with.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  tool_resources: A set of resources that are made available to the assistant's tools in this
      thread. The resources are specific to the type of tool. For example, the
      `code_interpreter` tool requires a list of file IDs, while the `file_search`
      tool requires a list of vector store IDs.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from threads import retrieve
```

Retrieves a thread.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## update
```python
from threads import update
```

Modifies a thread.

Args:
  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  tool_resources: A set of resources that are made available to the assistant's tools in this
      thread. The resources are specific to the type of tool. For example, the
      `code_interpreter` tool requires a list of file IDs, while the `file_search`
      tool requires a list of vector store IDs.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## delete
```python
from threads import delete
```

Delete a thread.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## create_and_run
```python
from threads import create_and_run
```



---
## create_and_run_poll
```python
from threads import create_and_run_poll
```

A helper to create a thread, start a run and then poll for a terminal state.
More information on Run lifecycles can be found here:
https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps

---
## create_and_run_stream
```python
from threads import create_and_run_stream
```

Create a thread and stream the run back

---
## __init__
```python
from threads import __init__
```



---
## retrieve
```python
from messages import retrieve
```

Retrieve a message.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## update
```python
from messages import update
```

Modifies a message.

Args:
  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from messages import list
```

Returns a list of messages for a given thread.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  run_id: Filter messages by the run ID that generated them.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## delete
```python
from messages import delete
```

Deletes a message.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __name__
```python
from steps import __name__
```



---
## Steps
```python
from steps import Steps
```



---
## AsyncSteps
```python
from steps import AsyncSteps
```



---
## StepsWithRawResponse
```python
from steps import StepsWithRawResponse
```



---
## AsyncStepsWithRawResponse
```python
from steps import AsyncStepsWithRawResponse
```



---
## StepsWithStreamingResponse
```python
from steps import StepsWithStreamingResponse
```



---
## AsyncStepsWithStreamingResponse
```python
from steps import AsyncStepsWithStreamingResponse
```



---
## with_raw_response
```python
from steps import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from steps import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## retrieve
```python
from steps import retrieve
```

Retrieves a run step.

Args:
  include: A list of additional fields to include in the response. Currently the only
      supported value is `step_details.tool_calls[*].file_search.results[*].content`
      to fetch the file search result content.

      See the
      [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings)
      for more information.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from steps import list
```

Returns a list of run steps belonging to a run.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  include: A list of additional fields to include in the response. Currently the only
      supported value is `step_details.tool_calls[*].file_search.results[*].content`
      to fetch the file search result content.

      See the
      [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/customizing-file-search-settings)
      for more information.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from steps import __init__
```



---
## __name__
```python
from runs import __name__
```



---
## Runs
```python
from runs import Runs
```



---
## AsyncRuns
```python
from runs import AsyncRuns
```



---
## RunsWithRawResponse
```python
from runs import RunsWithRawResponse
```



---
## AsyncRunsWithRawResponse
```python
from runs import AsyncRunsWithRawResponse
```



---
## RunsWithStreamingResponse
```python
from runs import RunsWithStreamingResponse
```



---
## AsyncRunsWithStreamingResponse
```python
from runs import AsyncRunsWithStreamingResponse
```



---
## steps
```python
from runs import steps
```



---
## with_raw_response
```python
from runs import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from runs import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from runs import create
```



---
## retrieve
```python
from runs import retrieve
```

Retrieves a run.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## update
```python
from runs import update
```

Modifies a run.

Args:
  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format. Keys
      can be a maximum of 64 characters long and values can be a maximum of 512
      characters long.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from runs import list
```

Returns a list of runs belonging to a thread.

Args:
  after: A cursor for use in pagination. `after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  before: A cursor for use in pagination. `before` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include before=obj_foo in order to
      fetch the previous page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
      order and `desc` for descending order.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## cancel
```python
from runs import cancel
```

Cancels a run that is `in_progress`.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## create_and_poll
```python
from runs import create_and_poll
```

A helper to create a run an poll for a terminal state. More information on Run
lifecycles can be found here:
https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps

---
## create_and_stream
```python
from runs import create_and_stream
```

Create a Run stream

---
## poll
```python
from runs import poll
```

A helper to poll a run status until it reaches a terminal state. More
information on Run lifecycles can be found here:
https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps

---
## stream
```python
from runs import stream
```

Create a Run stream

---
## submit_tool_outputs
```python
from runs import submit_tool_outputs
```



---
## submit_tool_outputs_and_poll
```python
from runs import submit_tool_outputs_and_poll
```

A helper to submit a tool output to a run and poll for a terminal run state.
More information on Run lifecycles can be found here:
https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps

---
## submit_tool_outputs_stream
```python
from runs import submit_tool_outputs_stream
```

Submit the tool outputs from a previous run and stream the run to a terminal
state. More information on Run lifecycles can be found here:
https://platform.openai.com/docs/assistants/how-it-works/runs-and-run-steps

---
## __init__
```python
from runs import __init__
```



---
## __name__
```python
from checkpoints import __name__
```



---
## Checkpoints
```python
from checkpoints import Checkpoints
```



---
## AsyncCheckpoints
```python
from checkpoints import AsyncCheckpoints
```



---
## CheckpointsWithRawResponse
```python
from checkpoints import CheckpointsWithRawResponse
```



---
## AsyncCheckpointsWithRawResponse
```python
from checkpoints import AsyncCheckpointsWithRawResponse
```



---
## CheckpointsWithStreamingResponse
```python
from checkpoints import CheckpointsWithStreamingResponse
```



---
## AsyncCheckpointsWithStreamingResponse
```python
from checkpoints import AsyncCheckpointsWithStreamingResponse
```



---
## with_raw_response
```python
from checkpoints import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from checkpoints import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## list
```python
from checkpoints import list
```

List checkpoints for a fine-tuning job.

Args:
  after: Identifier for the last checkpoint ID from the previous pagination request.

  limit: Number of checkpoints to retrieve.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from checkpoints import __init__
```



---
## __name__
```python
from jobs import __name__
```



---
## Jobs
```python
from jobs import Jobs
```



---
## AsyncJobs
```python
from jobs import AsyncJobs
```



---
## JobsWithRawResponse
```python
from jobs import JobsWithRawResponse
```



---
## AsyncJobsWithRawResponse
```python
from jobs import AsyncJobsWithRawResponse
```



---
## JobsWithStreamingResponse
```python
from jobs import JobsWithStreamingResponse
```



---
## AsyncJobsWithStreamingResponse
```python
from jobs import AsyncJobsWithStreamingResponse
```



---
## checkpoints
```python
from jobs import checkpoints
```



---
## with_raw_response
```python
from jobs import with_raw_response
```

This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.

For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers

---
## with_streaming_response
```python
from jobs import with_streaming_response
```

An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/openai/openai-python#with_streaming_response

---
## create
```python
from jobs import create
```

Creates a fine-tuning job which begins the process of creating a new model from
a given dataset.

Response includes details of the enqueued job including job status and the name
of the fine-tuned models once complete.

[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)

Args:
  model: The name of the model to fine-tune. You can select one of the
      [supported models](https://platform.openai.com/docs/guides/fine-tuning/which-models-can-be-fine-tuned).

  training_file: The ID of an uploaded file that contains training data.

      See [upload file](https://platform.openai.com/docs/api-reference/files/create)
      for how to upload a file.

      Your dataset must be formatted as a JSONL file. Additionally, you must upload
      your file with the purpose `fine-tune`.

      The contents of the file should differ depending on if the model uses the
      [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or
      [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
      format.

      See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning)
      for more details.

  hyperparameters: The hyperparameters used for the fine-tuning job.

  integrations: A list of integrations to enable for your fine-tuning job.

  seed: The seed controls the reproducibility of the job. Passing in the same seed and
      job parameters should produce the same results, but may differ in rare cases. If
      a seed is not specified, one will be generated for you.

  suffix: A string of up to 64 characters that will be added to your fine-tuned model
      name.

      For example, a `suffix` of "custom-model-name" would produce a model name like
      `ft:gpt-4o-mini:openai:custom-model-name:7p4lURel`.

  validation_file: The ID of an uploaded file that contains validation data.

      If you provide this file, the data is used to generate validation metrics
      periodically during fine-tuning. These metrics can be viewed in the fine-tuning
      results file. The same data should not be present in both train and validation
      files.

      Your dataset must be formatted as a JSONL file. You must upload your file with
      the purpose `fine-tune`.

      See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning)
      for more details.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## retrieve
```python
from jobs import retrieve
```

Get info about a fine-tuning job.

[Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list
```python
from jobs import list
```

List your organization's fine-tuning jobs

Args:
  after: Identifier for the last job from the previous pagination request.

  limit: Number of fine-tuning jobs to retrieve.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## cancel
```python
from jobs import cancel
```

Immediately cancel a fine-tune job.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## list_events
```python
from jobs import list_events
```

Get status updates for a fine-tuning job.

Args:
  after: Identifier for the last event from the previous pagination request.

  limit: Number of events to retrieve.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds

---
## __init__
```python
from jobs import __init__
```



---
## register
```python
from files import register
```



---
## CLIFileIDArgs
```python
from files import CLIFileIDArgs
```



---
## CLIFileCreateArgs
```python
from files import CLIFileCreateArgs
```



---
## CLIFile
```python
from files import CLIFile
```



---
## get
```python
from files import get
```



---
## register
```python
from models import register
```



---
## CLIModelIDArgs
```python
from models import CLIModelIDArgs
```



---
## CLIModels
```python
from models import CLIModels
```



---
## get
```python
from models import get
```



---
## register_commands
```python
from _main import register_commands
```



---
## register
```python
from completions import register
```



---
## CLICompletionCreateArgs
```python
from completions import CLICompletionCreateArgs
```



---
## CLICompletions
```python
from completions import CLICompletions
```



---
## _create
```python
from completions import _create
```



---
## _stream_create
```python
from completions import _stream_create
```



---
## register
```python
from audio import register
```



---
## CLITranscribeArgs
```python
from audio import CLITranscribeArgs
```



---
## CLITranslationArgs
```python
from audio import CLITranslationArgs
```



---
## CLIAudio
```python
from audio import CLIAudio
```



---
## transcribe
```python
from audio import transcribe
```



---
## translate
```python
from audio import translate
```



---
## register
```python
from image import register
```



---
## CLIImageCreateArgs
```python
from image import CLIImageCreateArgs
```



---
## CLIImageCreateVariationArgs
```python
from image import CLIImageCreateVariationArgs
```



---
## CLIImageEditArgs
```python
from image import CLIImageEditArgs
```



---
## CLIImage
```python
from image import CLIImage
```



---
## create
```python
from image import create
```



---
## create_variation
```python
from image import create_variation
```



---
## edit
```python
from image import edit
```



---
## __name__
```python
from fine_tunes import __name__
```



---
## register
```python
from fine_tunes import register
```



---
## PrepareDataArgs
```python
from fine_tunes import PrepareDataArgs
```



---
## prepare_data
```python
from fine_tunes import prepare_data
```



---
## __name__
```python
from migrate import __name__
```



---
## register
```python
from migrate import register
```



---
## GritArgs
```python
from migrate import GritArgs
```



---
## grit
```python
from migrate import grit
```



---
## MigrateArgs
```python
from migrate import MigrateArgs
```



---
## migrate
```python
from migrate import migrate
```



---
## _cache_dir
```python
from migrate import _cache_dir
```



---
## _debug
```python
from migrate import _debug
```



---
## install
```python
from migrate import install
```

Installs the Grit CLI and returns the location of the binary

---
## _move_files_recursively
```python
from migrate import _move_files_recursively
```



---
## _get_arch
```python
from migrate import _get_arch
```



---
## CLIMessage
```python
from completions import CLIMessage
```



---
## CLIChatCompletionCreateArgs
```python
from completions import CLIChatCompletionCreateArgs
```



---
## CLIChatCompletion
```python
from completions import CLIChatCompletion
```



---
## __name__
```python
from _completions import __name__
```



---
## validate_input_tools
```python
from _completions import validate_input_tools
```



---
## parse_chat_completion
```python
from _completions import parse_chat_completion
```



---
## get_input_tool_by_name
```python
from _completions import get_input_tool_by_name
```



---
## parse_function_tool_arguments
```python
from _completions import parse_function_tool_arguments
```



---
## maybe_parse_content
```python
from _completions import maybe_parse_content
```



---
## solve_response_format_t
```python
from _completions import solve_response_format_t
```

Return the runtime type for the given response format.

If no response format is given, or if we won't auto-parse the response format
then we default to `None`.

---
## has_parseable_input
```python
from _completions import has_parseable_input
```



---
## has_rich_response_format
```python
from _completions import has_rich_response_format
```



---
## is_response_format_param
```python
from _completions import is_response_format_param
```



---
## is_parseable_tool
```python
from _completions import is_parseable_tool
```



---
## _parse_content
```python
from _completions import _parse_content
```



---
## type_to_response_format_param
```python
from _completions import type_to_response_format_param
```



---
## __name__
```python
from _deltas import __name__
```



---
## accumulate_delta
```python
from _deltas import accumulate_delta
```



---
## __name__
```python
from _assistants import __name__
```



---
## AssistantEventHandler
```python
from _assistants import AssistantEventHandler
```



---
## AssistantStreamManager
```python
from _assistants import AssistantStreamManager
```

Wrapper over AssistantStreamEventHandler that is returned by `.stream()`
so that a context manager can be used.

```py
with client.threads.create_and_run_stream(...) as stream:
    for event in stream:
        ...
```

---
## AsyncAssistantEventHandler
```python
from _assistants import AsyncAssistantEventHandler
```



---
## AsyncAssistantStreamManager
```python
from _assistants import AsyncAssistantStreamManager
```

Wrapper over AsyncAssistantStreamEventHandler that is returned by `.stream()`
so that an async context manager can be used without `await`ing the
original client call.

```py
async with client.threads.create_and_run_stream(...) as stream:
    async for event in stream:
        ...
```

---
## accumulate_run_step
```python
from _assistants import accumulate_run_step
```



---
## accumulate_event
```python
from _assistants import accumulate_event
```

Returns a tuple of message snapshot and newly created text message deltas

---
## accumulate_delta
```python
from _assistants import accumulate_delta
```



---
## __init__
```python
from _assistants import __init__
```



---
## _init
```python
from _assistants import _init
```



---
## __next__
```python
from _assistants import __next__
```



---
## __iter__
```python
from _assistants import __iter__
```



---
## current_event
```python
from _assistants import current_event
```



---
## current_run
```python
from _assistants import current_run
```



---
## current_run_step_snapshot
```python
from _assistants import current_run_step_snapshot
```



---
## current_message_snapshot
```python
from _assistants import current_message_snapshot
```



---
## close
```python
from _assistants import close
```

Close the response and release the connection.

Automatically called when the context manager exits.

---
## until_done
```python
from _assistants import until_done
```

Waits until the stream has been consumed

---
## get_final_run
```python
from _assistants import get_final_run
```

Wait for the stream to finish and returns the completed Run object

---
## get_final_run_steps
```python
from _assistants import get_final_run_steps
```

Wait for the stream to finish and returns the steps taken in this run

---
## get_final_messages
```python
from _assistants import get_final_messages
```

Wait for the stream to finish and returns the messages emitted in this run

---
## __text_deltas__
```python
from _assistants import __text_deltas__
```



---
## on_end
```python
from _assistants import on_end
```

Fires when the stream has finished.

This happens if the stream is read to completion
or if an exception occurs during iteration.

---
## on_event
```python
from _assistants import on_event
```

Callback that is fired for every Server-Sent-Event

---
## on_run_step_created
```python
from _assistants import on_run_step_created
```

Callback that is fired when a run step is created

---
## on_run_step_delta
```python
from _assistants import on_run_step_delta
```

Callback that is fired whenever a run step delta is returned from the API

The first argument is just the delta as sent by the API and the second argument
is the accumulated snapshot of the run step. For example, a tool calls event may
look like this:

# delta
tool_calls=[
    RunStepDeltaToolCallsCodeInterpreter(
        index=0,
        type='code_interpreter',
        id=None,
        code_interpreter=CodeInterpreter(input=' sympy', outputs=None)
    )
]
# snapshot
tool_calls=[
    CodeToolCall(
        id='call_wKayJlcYV12NiadiZuJXxcfx',
        code_interpreter=CodeInterpreter(input='from sympy', outputs=[]),
        type='code_interpreter',
        index=0
    )
],

---
## on_run_step_done
```python
from _assistants import on_run_step_done
```

Callback that is fired when a run step is completed

---
## on_tool_call_created
```python
from _assistants import on_tool_call_created
```

Callback that is fired when a tool call is created

---
## on_tool_call_delta
```python
from _assistants import on_tool_call_delta
```

Callback that is fired when a tool call delta is encountered

---
## on_tool_call_done
```python
from _assistants import on_tool_call_done
```

Callback that is fired when a tool call delta is encountered

---
## on_exception
```python
from _assistants import on_exception
```

Fired whenever an exception happens during streaming

---
## on_timeout
```python
from _assistants import on_timeout
```

Fires if the request times out

---
## on_message_created
```python
from _assistants import on_message_created
```

Callback that is fired when a message is created

---
## on_message_delta
```python
from _assistants import on_message_delta
```

Callback that is fired whenever a message delta is returned from the API

The first argument is just the delta as sent by the API and the second argument
is the accumulated snapshot of the message. For example, a text content event may
look like this:

# delta
MessageDeltaText(
    index=0,
    type='text',
    text=Text(
        value=' Jane'
    ),
)
# snapshot
MessageContentText(
    index=0,
    type='text',
    text=Text(
        value='Certainly, Jane'
    ),
)

---
## on_message_done
```python
from _assistants import on_message_done
```

Callback that is fired when a message is completed

---
## on_text_created
```python
from _assistants import on_text_created
```

Callback that is fired when a text content block is created

---
## on_text_delta
```python
from _assistants import on_text_delta
```

Callback that is fired whenever a text content delta is returned
by the API.

The first argument is just the delta as sent by the API and the second argument
is the accumulated snapshot of the text. For example:

on_text_delta(TextDelta(value="The"), Text(value="The")),
on_text_delta(TextDelta(value=" solution"), Text(value="The solution")),
on_text_delta(TextDelta(value=" to"), Text(value="The solution to")),
on_text_delta(TextDelta(value=" the"), Text(value="The solution to the")),
on_text_delta(TextDelta(value=" equation"), Text(value="The solution to the equivalent")),

---
## on_text_done
```python
from _assistants import on_text_done
```

Callback that is fired when a text content block is finished

---
## on_image_file_done
```python
from _assistants import on_image_file_done
```

Callback that is fired when an image file block is finished

---
## _emit_sse_event
```python
from _assistants import _emit_sse_event
```



---
## __stream__
```python
from _assistants import __stream__
```



---
## __enter__
```python
from _assistants import __enter__
```



---
## __exit__
```python
from _assistants import __exit__
```



---
## ChatCompletionStream
```python
from _completions import ChatCompletionStream
```

Wrapper over the Chat Completions streaming API that adds helpful
events such as `content.done`, supports automatically parsing
responses & tool calls and accumulates a `ChatCompletion` object
from each individual chunk.

https://platform.openai.com/docs/api-reference/streaming

---
## ChatCompletionStreamManager
```python
from _completions import ChatCompletionStreamManager
```

Context manager over a `ChatCompletionStream` that is returned by `.stream()`.

This context manager ensures the response cannot be leaked if you don't read
the stream to completion.

Usage:
```py
with client.beta.chat.completions.stream(...) as stream:
    for event in stream:
        ...
```

---
## AsyncChatCompletionStream
```python
from _completions import AsyncChatCompletionStream
```

Wrapper over the Chat Completions streaming API that adds helpful
events such as `content.done`, supports automatically parsing
responses & tool calls and accumulates a `ChatCompletion` object
from each individual chunk.

https://platform.openai.com/docs/api-reference/streaming

---
## AsyncChatCompletionStreamManager
```python
from _completions import AsyncChatCompletionStreamManager
```

Context manager over a `AsyncChatCompletionStream` that is returned by `.stream()`.

This context manager ensures the response cannot be leaked if you don't read
the stream to completion.

Usage:
```py
async with client.beta.chat.completions.stream(...) as stream:
    for event in stream:
        ...
```

---
## ChatCompletionStreamState
```python
from _completions import ChatCompletionStreamState
```



---
## ChoiceEventState
```python
from _completions import ChoiceEventState
```



---
## _convert_initial_chunk_into_snapshot
```python
from _completions import _convert_initial_chunk_into_snapshot
```



---
## __init__
```python
from _completions import __init__
```



---
## __next__
```python
from _completions import __next__
```



---
## __iter__
```python
from _completions import __iter__
```



---
## __enter__
```python
from _completions import __enter__
```



---
## __exit__
```python
from _completions import __exit__
```



---
## close
```python
from _completions import close
```

Close the response and release the connection.

Automatically called if the response body is read to completion.

---
## get_final_completion
```python
from _completions import get_final_completion
```



---
## until_done
```python
from _completions import until_done
```

Blocks until the stream has been consumed.

---
## current_completion_snapshot
```python
from _completions import current_completion_snapshot
```



---
## __stream__
```python
from _completions import __stream__
```



---
## handle_chunk
```python
from _completions import handle_chunk
```

Accumulate a new chunk into the snapshot and returns a list of events to yield.

---
## _get_choice_state
```python
from _completions import _get_choice_state
```



---
## _accumulate_chunk
```python
from _completions import _accumulate_chunk
```



---
## _build_events
```python
from _completions import _build_events
```



---
## get_done_events
```python
from _completions import get_done_events
```



---
## _content_done_events
```python
from _completions import _content_done_events
```



---
## _add_tool_done_event
```python
from _completions import _add_tool_done_event
```



---
## ChunkEvent
```python
from _events import ChunkEvent
```



---
## ContentDeltaEvent
```python
from _events import ContentDeltaEvent
```

This event is yielded for every chunk with `choice.delta.content` data.

---
## ContentDoneEvent
```python
from _events import ContentDoneEvent
```



---
## RefusalDeltaEvent
```python
from _events import RefusalDeltaEvent
```



---
## RefusalDoneEvent
```python
from _events import RefusalDoneEvent
```



---
## FunctionToolCallArgumentsDeltaEvent
```python
from _events import FunctionToolCallArgumentsDeltaEvent
```



---
## FunctionToolCallArgumentsDoneEvent
```python
from _events import FunctionToolCallArgumentsDoneEvent
```



---
## LogprobsContentDeltaEvent
```python
from _events import LogprobsContentDeltaEvent
```



---
## LogprobsContentDoneEvent
```python
from _events import LogprobsContentDoneEvent
```



---
## LogprobsRefusalDeltaEvent
```python
from _events import LogprobsRefusalDeltaEvent
```



---
## LogprobsRefusalDoneEvent
```python
from _events import LogprobsRefusalDoneEvent
```



---
## _check_path
```python
from compat import _check_path
```



---
## PathAwareHookProxy
```python
from compat import PathAwareHookProxy
```

this helper wraps around hook callers
until pluggy supports fixingcalls, this one will do

it currently doesn't return full hook caller proxies for fixed hooks,
this may have to be changed later depending on bugs

---
## __dir__
```python
from compat import __dir__
```



---
## __getattr__
```python
from compat import __getattr__
```



---
## fixed_hook
```python
from compat import fixed_hook
```



---
## ExitCode
```python
from __init__ import ExitCode
```

Encodes the valid exit codes by pytest.

Currently users and plugins may supply other exit codes as well.

.. versionadded:: 5.0

---
## ConftestImportFailure
```python
from __init__ import ConftestImportFailure
```



---
## filter_traceback_for_conftest_import_failure
```python
from __init__ import filter_traceback_for_conftest_import_failure
```

Filter tracebacks entries which point to pytest internals or importlib.

Make a special case for importlib because we use it to import test modules and conftest files
in _pytest.pathlib.import_path.

---
## console_main
```python
from __init__ import console_main
```

The CLI entry point of pytest.

This function is not meant for programmable use; use `main()` instead.

---
## cmdline
```python
from __init__ import cmdline
```



---
## filename_arg
```python
from __init__ import filename_arg
```

Argparse type validator for filename arguments.

:path: Path of filename.
:optname: Name of the option.

---
## directory_arg
```python
from __init__ import directory_arg
```

Argparse type validator for directory arguments.

:path: Path of directory.
:optname: Name of the option.

---
## get_config
```python
from __init__ import get_config
```



---
## get_plugin_manager
```python
from __init__ import get_plugin_manager
```

Obtain a new instance of the
:py:class:`pytest.PytestPluginManager`, with default plugins
already loaded.

This function can be used by integration with other tools, like hooking
into pytest to run tests into an IDE.

---
## _prepareconfig
```python
from __init__ import _prepareconfig
```



---
## _get_directory
```python
from __init__ import _get_directory
```

Get the directory of a path - itself if already a directory.

---
## _get_legacy_hook_marks
```python
from __init__ import _get_legacy_hook_marks
```



---
## PytestPluginManager
```python
from __init__ import PytestPluginManager
```

A :py:class:`pluggy.PluginManager <pluggy.PluginManager>` with
additional pytest-specific functionality:

* Loading plugins from the command line, ``PYTEST_PLUGINS`` env variable and
  ``pytest_plugins`` global variables found in plugins being loaded.
* ``conftest.py`` loading during start-up.

---
## _get_plugin_specs_as_list
```python
from __init__ import _get_plugin_specs_as_list
```

Parse a plugins specification into a list of plugin names.

---
## Notset
```python
from __init__ import Notset
```



---
## _iter_rewritable_modules
```python
from __init__ import _iter_rewritable_modules
```

Given an iterable of file names in a source distribution, return the "names" that should
be marked for assertion rewrite.

For example the package "pytest_mock/__init__.py" should be added as "pytest_mock" in
the assertion rewrite mechanism.

This function has to deal with dist-info based distributions and egg based distributions
(which are still very much in use for "editable" installs).

Here are the file names as seen in a dist-info based distribution:

    pytest_mock/__init__.py
    pytest_mock/_version.py
    pytest_mock/plugin.py
    pytest_mock.egg-info/PKG-INFO

Here are the file names as seen in an egg based distribution:

    src/pytest_mock/__init__.py
    src/pytest_mock/_version.py
    src/pytest_mock/plugin.py
    src/pytest_mock.egg-info/PKG-INFO
    LICENSE
    setup.py

We have to take in account those two distribution flavors in order to determine which
names should be considered for assertion rewriting.

More information:
    https://github.com/pytest-dev/pytest-mock/issues/167

---
## _assertion_supported
```python
from __init__ import _assertion_supported
```



---
## create_terminal_writer
```python
from __init__ import create_terminal_writer
```

Create a TerminalWriter instance configured according to the options
in the config object.

Every code which requires a TerminalWriter object and has access to a
config object should use this function.

---
## _strtobool
```python
from __init__ import _strtobool
```

Convert a string representation of truth to True or False.

True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
'val' is anything else.

.. note:: Copied from distutils.util.

---
## parse_warning_filter
```python
from __init__ import parse_warning_filter
```

Parse a warnings filter string.

This is copied from warnings._setoption with the following changes:

* Does not apply the filter.
* Escaping is optional.
* Raises UsageError so we get nice error messages on failure.

---
## _resolve_warning_category
```python
from __init__ import _resolve_warning_category
```

Copied from warnings._getcategory, but changed so it lets exceptions (specially ImportErrors)
propagate so we can get access to their tracebacks (#9218).

---
## apply_warning_filters
```python
from __init__ import apply_warning_filters
```

Applies pytest-configured filters to the warnings module

---
## parse_hookimpl_opts
```python
from __init__ import parse_hookimpl_opts
```

:meta private:

---
## parse_hookspec_opts
```python
from __init__ import parse_hookspec_opts
```

:meta private:

---
## getplugin
```python
from __init__ import getplugin
```



---
## hasplugin
```python
from __init__ import hasplugin
```

Return whether a plugin with the given name is registered.

---
## pytest_configure
```python
from __init__ import pytest_configure
```



---
## _set_initial_conftests
```python
from __init__ import _set_initial_conftests
```

Load initial conftest files given a preparsed "namespace".

As conftest files may add their own command line options which have
arguments ('--my-opt somepath') we might get some false positives.
All builtin and 3rd party plugins will have been loaded, however, so
common options will not confuse our logic here.

---
## _is_in_confcutdir
```python
from __init__ import _is_in_confcutdir
```

Whether to consider the given path to load conftests from.

---
## _try_load_conftest
```python
from __init__ import _try_load_conftest
```



---
## _loadconftestmodules
```python
from __init__ import _loadconftestmodules
```



---
## _getconftestmodules
```python
from __init__ import _getconftestmodules
```



---
## _rget_with_confmod
```python
from __init__ import _rget_with_confmod
```



---
## _importconftest
```python
from __init__ import _importconftest
```



---
## _check_non_top_pytest_plugins
```python
from __init__ import _check_non_top_pytest_plugins
```



---
## consider_preparse
```python
from __init__ import consider_preparse
```

:meta private:

---
## consider_pluginarg
```python
from __init__ import consider_pluginarg
```

:meta private:

---
## consider_conftest
```python
from __init__ import consider_conftest
```

:meta private:

---
## consider_env
```python
from __init__ import consider_env
```

:meta private:

---
## consider_module
```python
from __init__ import consider_module
```

:meta private:

---
## _import_plugin_specs
```python
from __init__ import _import_plugin_specs
```



---
## import_plugin
```python
from __init__ import import_plugin
```

Import a plugin with ``modname``.

If ``consider_entry_points`` is True, entry point names are also
considered to find a plugin.

---
## InvocationParams
```python
from __init__ import InvocationParams
```

Holds parameters passed during :func:`pytest.main`.

The object attributes are read-only.

.. versionadded:: 5.1

.. note::

    Note that the environment variable ``PYTEST_ADDOPTS`` and the ``addopts``
    ini option are handled by pytest, not being included in the ``args`` attribute.

    Plugins accessing ``InvocationParams`` must be aware of that.

---
## ArgsSource
```python
from __init__ import ArgsSource
```

Indicates the source of the test arguments.

.. versionadded:: 7.2

---
## rootpath
```python
from __init__ import rootpath
```

The path to the :ref:`rootdir <rootdir>`.

:type: pathlib.Path

.. versionadded:: 6.1

---
## inipath
```python
from __init__ import inipath
```

The path to the :ref:`configfile <configfiles>`.

.. versionadded:: 6.1

---
## add_cleanup
```python
from __init__ import add_cleanup
```

Add a function to be called when the config object gets out of
use (usually coinciding with pytest_unconfigure).

---
## _do_configure
```python
from __init__ import _do_configure
```



---
## _ensure_unconfigure
```python
from __init__ import _ensure_unconfigure
```



---
## get_terminal_writer
```python
from __init__ import get_terminal_writer
```



---
## pytest_cmdline_parse
```python
from __init__ import pytest_cmdline_parse
```



---
## notify_exception
```python
from __init__ import notify_exception
```



---
## cwd_relative_nodeid
```python
from __init__ import cwd_relative_nodeid
```



---
## fromdictargs
```python
from __init__ import fromdictargs
```

Constructor usable for subprocesses.

---
## _processopt
```python
from __init__ import _processopt
```



---
## pytest_load_initial_conftests
```python
from __init__ import pytest_load_initial_conftests
```



---
## _initini
```python
from __init__ import _initini
```



---
## _consider_importhook
```python
from __init__ import _consider_importhook
```

Install the PEP 302 import hook if using assertion rewriting.

Needs to parse the --assert=<mode> option from the commandline
and find all the installed plugins to mark them for rewriting
by the importhook.

---
## _mark_plugins_for_rewrite
```python
from __init__ import _mark_plugins_for_rewrite
```

Given an importhook, mark for rewrite any top-level
modules or packages in the distribution package for
all pytest plugins.

---
## _validate_args
```python
from __init__ import _validate_args
```

Validate known args.

---
## _decide_args
```python
from __init__ import _decide_args
```

Decide the args (initial paths/nodeids) to use given the relevant inputs.

:param warn: Whether can issue warnings.

:returns: The args and the args source. Guaranteed to be non-empty.

---
## _preparse
```python
from __init__ import _preparse
```



---
## pytest_collection
```python
from __init__ import pytest_collection
```



---
## _checkversion
```python
from __init__ import _checkversion
```



---
## _validate_config_options
```python
from __init__ import _validate_config_options
```



---
## _validate_plugins
```python
from __init__ import _validate_plugins
```



---
## _warn_or_fail_if_strict
```python
from __init__ import _warn_or_fail_if_strict
```



---
## _get_unknown_ini_keys
```python
from __init__ import _get_unknown_ini_keys
```



---
## issue_config_time_warning
```python
from __init__ import issue_config_time_warning
```

Issue and handle a warning during the "configure" stage.

During ``pytest_configure`` we can't capture warnings using the ``catch_warnings_for_item``
function because it is not possible to have hook wrappers around ``pytest_configure``.

This function is mainly intended for plugins that need to issue warnings during
``pytest_configure`` (or similar stages).

:param warning: The warning instance.
:param stacklevel: stacklevel forwarded to warnings.warn.

---
## addinivalue_line
```python
from __init__ import addinivalue_line
```

Add a line to an ini-file option. The option must have been
declared but might not yet be set in which case the line becomes
the first line in its value.

---
## getini
```python
from __init__ import getini
```

Return configuration value from an :ref:`ini file <configfiles>`.

If a configuration value is not defined in an
:ref:`ini file <configfiles>`, then the ``default`` value provided while
registering the configuration through
:func:`parser.addini <pytest.Parser.addini>` will be returned.
Please note that you can even provide ``None`` as a valid
default value.

If ``default`` is not provided while registering using
:func:`parser.addini <pytest.Parser.addini>`, then a default value
based on the ``type`` parameter passed to
:func:`parser.addini <pytest.Parser.addini>` will be returned.
The default values based on ``type`` are:
``paths``, ``pathlist``, ``args`` and ``linelist`` : empty list ``[]``
``bool`` : ``False``
``string`` : empty string ``""``

If neither the ``default`` nor the ``type`` parameter is passed
while registering the configuration through
:func:`parser.addini <pytest.Parser.addini>`, then the configuration
is treated as a string and a default empty string '' is returned.

If the specified name hasn't been registered through a prior
:func:`parser.addini <pytest.Parser.addini>` call (usually from a
plugin), a ValueError is raised.

---
## _getini_unknown_type
```python
from __init__ import _getini_unknown_type
```



---
## _getini
```python
from __init__ import _getini
```



---
## _getconftest_pathlist
```python
from __init__ import _getconftest_pathlist
```



---
## _get_override_ini_value
```python
from __init__ import _get_override_ini_value
```



---
## getoption
```python
from __init__ import getoption
```

Return command line option value.

:param name: Name of the option.  You may also specify
    the literal ``--OPT`` option instead of the "dest" option name.
:param default: Default value if no option of that name exists.
:param skip: If True, raise pytest.skip if option does not exists
    or has a None value.

---
## getvalue
```python
from __init__ import getvalue
```

Deprecated, use getoption() instead.

---
## getvalueorskip
```python
from __init__ import getvalueorskip
```

Deprecated, use getoption(skip=True) instead.

---
## get_verbosity
```python
from __init__ import get_verbosity
```

Retrieve the verbosity level for a fine-grained verbosity type.

:param verbosity_type: Verbosity type to get level for. If a level is
    configured for the given type, that value will be returned. If the
    given type is not a known verbosity type, the global verbosity
    level will be returned. If the given type is None (default), the
    global verbosity level will be returned.

To configure a level for a fine-grained verbosity type, the
configuration file should have a setting for the configuration name
and a numeric value for the verbosity level. A special value of "auto"
can be used to explicitly use the global verbosity level.

Example:

.. code-block:: ini

    # content of pytest.ini
    [pytest]
    verbosity_assertions = 2

.. code-block:: console

    pytest -v

.. code-block:: python

    print(config.get_verbosity())  # 1
    print(config.get_verbosity(Config.VERBOSITY_ASSERTIONS))  # 2

---
## _verbosity_ini_name
```python
from __init__ import _verbosity_ini_name
```



---
## _add_verbosity_ini
```python
from __init__ import _add_verbosity_ini
```

Add a output verbosity configuration option for the given output type.

:param parser: Parser for command line arguments and ini-file values.
:param verbosity_type: Fine-grained verbosity category.
:param help: Description of the output this type controls.

The value should be retrieved via a call to
:py:func:`config.get_verbosity(type) <pytest.Config.get_verbosity>`.

---
## _warn_about_missing_assertion
```python
from __init__ import _warn_about_missing_assertion
```



---
## _warn_about_skipped_plugins
```python
from __init__ import _warn_about_skipped_plugins
```



---
## __name__
```python
from findpaths import __name__
```



---
## _parse_ini_config
```python
from findpaths import _parse_ini_config
```

Parse the given generic '.ini' file using legacy IniConfig parser, returning
the parsed object.

Raise UsageError if the file cannot be parsed.

---
## load_config_dict_from_file
```python
from findpaths import load_config_dict_from_file
```

Load pytest configuration from the given file path, if supported.

Return None if the file does not contain valid pytest configuration.

---
## locate_config
```python
from findpaths import locate_config
```

Search in the list of arguments for a valid ini-file for pytest,
and return a tuple of (rootdir, inifile, cfg-dict).

---
## get_common_ancestor
```python
from findpaths import get_common_ancestor
```



---
## get_dirs_from_args
```python
from findpaths import get_dirs_from_args
```



---
## determine_setup
```python
from findpaths import determine_setup
```

Determine the rootdir, inifile and ini configuration values from the
command line arguments.

:param inifile:
    The `--inifile` command line argument, if given.
:param args:
    The free command line arguments.
:param rootdir_cmd_arg:
    The `--rootdir` command line argument, if given.
:param invocation_dir:
    The working directory when pytest was invoked.

---
## is_fs_root
```python
from findpaths import is_fs_root
```

Return True if the given path is pointing to the root of the
file system ("/" on Unix and "C:\\" on Windows for example).

---
## is_option
```python
from findpaths import is_option
```



---
## get_file_part_from_node_id
```python
from findpaths import get_file_part_from_node_id
```



---
## get_dir_from_path
```python
from findpaths import get_dir_from_path
```



---
## make_scalar
```python
from findpaths import make_scalar
```



---
## PrintHelp
```python
from exceptions import PrintHelp
```

Raised when pytest should print its help to skip the rest of the
argument parsing and validation.

---
## __name__
```python
from argparsing import __name__
```



---
## NotSet
```python
from argparsing import NotSet
```



---
## Parser
```python
from argparsing import Parser
```

Parser for command line arguments and ini-file values.

:ivar extra_info: Dict of generic param -> value to display in case
    there's an error processing the command line arguments.

---
## get_ini_default_for_type
```python
from argparsing import get_ini_default_for_type
```

Used by addini to get the default value for a given ini-option type, when
default is not supplied.

---
## ArgumentError
```python
from argparsing import ArgumentError
```

Raised if an Argument instance is created with invalid or
inconsistent arguments.

---
## Argument
```python
from argparsing import Argument
```

Class that mimics the necessary behaviour of optparse.Option.

It's currently a least effort implementation and ignoring choices
and integer prefixes.

https://docs.python.org/3/library/optparse.html#optparse-standard-option-types

---
## OptionGroup
```python
from argparsing import OptionGroup
```

A group of options shown in its own section.

---
## MyOptionParser
```python
from argparsing import MyOptionParser
```



---
## DropShorterLongHelpFormatter
```python
from argparsing import DropShorterLongHelpFormatter
```

Shorten help for long options that differ only in extra hyphens.

- Collapse **long** options that are the same except for extra hyphens.
- Shortcut if there are only two options and one of them is a short one.
- Cache result on the action object as this is called at least 2 times.

---
## __repr__
```python
from argparsing import __repr__
```



---
## __init__
```python
from argparsing import __init__
```



---
## processoption
```python
from argparsing import processoption
```



---
## getgroup
```python
from argparsing import getgroup
```

Get (or create) a named option Group.

:param name: Name of the option group.
:param description: Long description for --help output.
:param after: Name of another group, used for ordering --help output.
:returns: The option group.

The returned group object has an ``addoption`` method with the same
signature as :func:`parser.addoption <pytest.Parser.addoption>` but
will be shown in the respective group in the output of
``pytest --help``.

---
## addoption
```python
from argparsing import addoption
```

Add an option to this group.

If a shortened version of a long option is specified, it will
be suppressed in the help. ``addoption('--twowords', '--two-words')``
results in help showing ``--two-words`` only, but ``--twowords`` gets
accepted **and** the automatic destination is in ``args.twowords``.

:param opts:
    Option names, can be short or long options.
:param attrs:
    Same attributes as the argparse library's :meth:`add_argument()
    <argparse.ArgumentParser.add_argument>` function accepts.

---
## parse
```python
from argparsing import parse
```



---
## _getparser
```python
from argparsing import _getparser
```



---
## parse_setoption
```python
from argparsing import parse_setoption
```



---
## parse_known_args
```python
from argparsing import parse_known_args
```

Parse the known arguments at this point.

:returns: An argparse namespace object.

---
## parse_known_and_unknown_args
```python
from argparsing import parse_known_and_unknown_args
```

Parse the known arguments at this point, and also return the
remaining unknown arguments.

:returns:
    A tuple containing an argparse namespace object for the known
    arguments, and a list of the unknown arguments.

---
## addini
```python
from argparsing import addini
```

Register an ini-file option.

:param name:
    Name of the ini-variable.
:param type:
    Type of the variable. Can be:

        * ``string``: a string
        * ``bool``: a boolean
        * ``args``: a list of strings, separated as in a shell
        * ``linelist``: a list of strings, separated by line breaks
        * ``paths``: a list of :class:`pathlib.Path`, separated as in a shell
        * ``pathlist``: a list of ``py.path``, separated as in a shell

    For ``paths`` and ``pathlist`` types, they are considered relative to the ini-file.
    In case the execution is happening without an ini-file defined,
    they will be considered relative to the current working directory (for example with ``--override-ini``).

    .. versionadded:: 7.0
        The ``paths`` variable type.

    .. versionadded:: 8.1
        Use the current working directory to resolve ``paths`` and ``pathlist`` in the absence of an ini-file.

    Defaults to ``string`` if ``None`` or not passed.
:param default:
    Default value if no ini-file option exists but is queried.

The value of ini-variables can be retrieved via a call to
:py:func:`config.getini(name) <pytest.Config.getini>`.

---
## __str__
```python
from argparsing import __str__
```



---
## names
```python
from argparsing import names
```



---
## attrs
```python
from argparsing import attrs
```



---
## _set_opt_strings
```python
from argparsing import _set_opt_strings
```

Directly from optparse.

Might not be necessary as this is passed to argparse later on.

---
## _addoption
```python
from argparsing import _addoption
```



---
## _addoption_instance
```python
from argparsing import _addoption_instance
```



---
## error
```python
from argparsing import error
```

Transform argparse error message into UsageError.

---
## parse_args
```python
from argparsing import parse_args
```

Allow splitting of positional arguments.

---
## _format_action_invocation
```python
from argparsing import _format_action_invocation
```



---
## _split_lines
```python
from argparsing import _split_lines
```

Wrap lines after splitting on original newlines.

This allows to have explicit line breaks in the help text.

---
## _parse_optional
```python
from argparsing import _parse_optional
```



---
## param
```python
from __init__ import param
```

Specify a parameter in `pytest.mark.parametrize`_ calls or
:ref:`parametrized fixtures <fixture-parametrize-marks>`.

.. code-block:: python

    @pytest.mark.parametrize(
        "test_input,expected",
        [
            ("3+5", 8),
            pytest.param("6*9", 42, marks=pytest.mark.xfail),
        ],
    )
    def test_eval(test_input, expected):
        assert eval(test_input) == expected

:param values: Variable args of the values of the parameter set, in order.
:param marks: A single mark or a list of marks to be applied to this parameter set.
:param id: The id to attribute to this parameter set.

---
## pytest_addoption
```python
from __init__ import pytest_addoption
```



---
## pytest_cmdline_main
```python
from __init__ import pytest_cmdline_main
```



---
## KeywordMatcher
```python
from __init__ import KeywordMatcher
```

A matcher for keywords.

Given a list of names, matches any substring of one of these names. The
string inclusion check is case-insensitive.

Will match on the name of colitem, including the names of its parents.
Only matches names of items which are either a :class:`Class` or a
:class:`Function`.

Additionally, matches on names in the 'extra_keyword_matches' set of
any item, as well as names directly assigned to test functions.

---
## deselect_by_keyword
```python
from __init__ import deselect_by_keyword
```



---
## MarkMatcher
```python
from __init__ import MarkMatcher
```

A matcher for markers which are present.

Tries to match on any marker names, attached to the given colitem.

---
## deselect_by_mark
```python
from __init__ import deselect_by_mark
```



---
## _parse_expression
```python
from __init__ import _parse_expression
```



---
## pytest_collection_modifyitems
```python
from __init__ import pytest_collection_modifyitems
```



---
## pytest_unconfigure
```python
from __init__ import pytest_unconfigure
```



---
## from_item
```python
from __init__ import from_item
```



---
## from_markers
```python
from __init__ import from_markers
```



---
## istestfunc
```python
from structures import istestfunc
```



---
## get_empty_parameterset_mark
```python
from structures import get_empty_parameterset_mark
```



---
## ParameterSet
```python
from structures import ParameterSet
```



---
## Mark
```python
from structures import Mark
```

A pytest mark.

---
## MarkDecorator
```python
from structures import MarkDecorator
```

A decorator for applying a mark on test functions and classes.

``MarkDecorators`` are created with ``pytest.mark``::

    mark1 = pytest.mark.NAME  # Simple MarkDecorator
    mark2 = pytest.mark.NAME(name1=value)  # Parametrized MarkDecorator

and can then be applied as decorators to test functions::

    @mark2
    def test_function():
        pass

When a ``MarkDecorator`` is called, it does the following:

1. If called with a single class as its only positional argument and no
   additional keyword arguments, it attaches the mark to the class so it
   gets applied automatically to all test cases found in that class.

2. If called with a single function as its only positional argument and
   no additional keyword arguments, it attaches the mark to the function,
   containing all the arguments already stored internally in the
   ``MarkDecorator``.

3. When called in any other case, it returns a new ``MarkDecorator``
   instance with the original ``MarkDecorator``'s content updated with
   the arguments passed to this call.

Note: The rules above prevent a ``MarkDecorator`` from storing only a
single function or class reference as its positional argument with no
additional keyword or positional arguments. You can work around this by
using `with_args()`.

---
## get_unpacked_marks
```python
from structures import get_unpacked_marks
```

Obtain the unpacked marks that are stored on an object.

If obj is a class and consider_mro is true, return marks applied to
this class and all of its super-classes in MRO order. If consider_mro
is false, only return marks applied directly to this class.

---
## normalize_mark_list
```python
from structures import normalize_mark_list
```

Normalize an iterable of Mark or MarkDecorator objects into a list of marks
by retrieving the `mark` attribute on MarkDecorator instances.

:param mark_list: marks to normalize
:returns: A new list of the extracted Mark objects

---
## store_mark
```python
from structures import store_mark
```

Store a Mark on an object.

This is used to implement the Mark declarations/decorators correctly.

---
## MarkGenerator
```python
from structures import MarkGenerator
```

Factory for :class:`MarkDecorator` objects - exposed as
a ``pytest.mark`` singleton instance.

Example::

     import pytest


     @pytest.mark.slowtest
     def test_function():
         pass

applies a 'slowtest' :class:`Mark` on ``test_function``.

---
## NodeKeywords
```python
from structures import NodeKeywords
```



---
## param
```python
from structures import param
```



---
## extract_from
```python
from structures import extract_from
```

Extract from an object or objects.

:param parameterset:
    A legacy style parameterset that may or may not be a tuple,
    and may or may not be wrapped into a mess of mark objects.

:param force_tuple:
    Enforce tuple wrapping so single argument tuple values
    don't get decomposed and break tests.

---
## _parse_parametrize_args
```python
from structures import _parse_parametrize_args
```



---
## _parse_parametrize_parameters
```python
from structures import _parse_parametrize_parameters
```



---
## _for_parametrize
```python
from structures import _for_parametrize
```



---
## _has_param_ids
```python
from structures import _has_param_ids
```



---
## combined_with
```python
from structures import combined_with
```

Return a new Mark which is a combination of this
Mark and another Mark.

Combines by appending args and merging kwargs.

:param Mark other: The mark to combine with.
:rtype: Mark

---
## name
```python
from structures import name
```

Alias for mark.name.

---
## args
```python
from structures import args
```

Alias for mark.args.

---
## kwargs
```python
from structures import kwargs
```

Alias for mark.kwargs.

---
## markname
```python
from structures import markname
```

:meta private:

---
## with_args
```python
from structures import with_args
```

Return a MarkDecorator with extra arguments added.

Unlike calling the MarkDecorator, with_args() can be used even
if the sole argument is a callable/class.

---
## __call__
```python
from structures import __call__
```



---
## _SkipMarkDecorator
```python
from structures import _SkipMarkDecorator
```



---
## _SkipifMarkDecorator
```python
from structures import _SkipifMarkDecorator
```



---
## _XfailMarkDecorator
```python
from structures import _XfailMarkDecorator
```



---
## _ParametrizeMarkDecorator
```python
from structures import _ParametrizeMarkDecorator
```



---
## _UsefixturesMarkDecorator
```python
from structures import _UsefixturesMarkDecorator
```



---
## _FilterwarningsMarkDecorator
```python
from structures import _FilterwarningsMarkDecorator
```



---
## __getattr__
```python
from structures import __getattr__
```

Generate a new :class:`MarkDecorator` with the given name.

---
## __contains__
```python
from structures import __contains__
```



---
## update
```python
from structures import update
```



---
## TokenType
```python
from expression import TokenType
```



---
## Token
```python
from expression import Token
```



---
## ParseError
```python
from expression import ParseError
```

The expression contains invalid syntax.

:param column: The column in the line where the error occurred (1-based).
:param message: A description of the error.

---
## Scanner
```python
from expression import Scanner
```



---
## expression
```python
from expression import expression
```



---
## expr
```python
from expression import expr
```



---
## and_expr
```python
from expression import and_expr
```



---
## not_expr
```python
from expression import not_expr
```



---
## single_kwarg
```python
from expression import single_kwarg
```



---
## all_kwargs
```python
from expression import all_kwargs
```



---
## MatcherCall
```python
from expression import MatcherCall
```



---
## MatcherNameAdapter
```python
from expression import MatcherNameAdapter
```



---
## MatcherAdapter
```python
from expression import MatcherAdapter
```

Adapts a matcher function to a locals mapping as required by eval().

---
## Expression
```python
from expression import Expression
```

A compiled match expression as used by -k and -m.

The expression can be evaluated against different matchers.

---
## __init__
```python
from expression import __init__
```



---
## __str__
```python
from expression import __str__
```



---
## lex
```python
from expression import lex
```



---
## accept
```python
from expression import accept
```



---
## reject
```python
from expression import reject
```



---
## __call__
```python
from expression import __call__
```



---
## __bool__
```python
from expression import __bool__
```



---
## __getitem__
```python
from expression import __getitem__
```



---
## __iter__
```python
from expression import __iter__
```



---
## __len__
```python
from expression import __len__
```



---
## compile
```python
from expression import compile
```

Compile a match expression.

:param input: The input expression - one line.

---
## evaluate
```python
from expression import evaluate
```

Evaluate the match expression.

:param matcher:
    Given an identifier, should return whether it matches or not.
    Should be prepared to handle arbitrary strings as input.

:returns: Whether the expression matches or not.

---
## Frame
```python
from code import Frame
```

Wrapper around a Python frame holding f_locals and f_globals
in which expressions can be evaluated.

---
## TracebackEntry
```python
from code import TracebackEntry
```

A single entry in a Traceback.

---
## Traceback
```python
from code import Traceback
```

Traceback objects encapsulate and offer higher level access to Traceback entries.

---
## ExceptionInfo
```python
from code import ExceptionInfo
```

Wraps sys.exc_info() objects and offers help for navigating the traceback.

---
## FormattedExcinfo
```python
from code import FormattedExcinfo
```

Presenting information about failing Functions and Generators.

---
## TerminalRepr
```python
from code import TerminalRepr
```



---
## ExceptionRepr
```python
from code import ExceptionRepr
```



---
## ExceptionChainRepr
```python
from code import ExceptionChainRepr
```



---
## ReprExceptionInfo
```python
from code import ReprExceptionInfo
```



---
## ReprTraceback
```python
from code import ReprTraceback
```



---
## ReprTracebackNative
```python
from code import ReprTracebackNative
```



---
## ReprEntryNative
```python
from code import ReprEntryNative
```



---
## ReprEntry
```python
from code import ReprEntry
```



---
## ReprFileLocation
```python
from code import ReprFileLocation
```



---
## ReprLocals
```python
from code import ReprLocals
```



---
## ReprFuncArgs
```python
from code import ReprFuncArgs
```



---
## getfslineno
```python
from code import getfslineno
```

Return source location (path, lineno) for the given object.

If the source cannot be determined return ("", -1).

The line number is 0-based.

---
## filter_traceback
```python
from code import filter_traceback
```

Return True if a TracebackEntry instance should be included in tracebacks.

We hide traceback entries of:

* dynamically generated code (no code to show up for it);
* internal traceback from pytest or its internal libraries, py and pluggy.

---
## from_function
```python
from code import from_function
```



---
## __eq__
```python
from code import __eq__
```



---
## firstlineno
```python
from code import firstlineno
```



---
## name
```python
from code import name
```

co_name of underlying code.

---
## path
```python
from code import path
```

Path to the source code.

---
## fullsource
```python
from code import fullsource
```

Return a _pytest._code.Source object for the full source file of the code.

---
## source
```python
from code import source
```

Return a _pytest._code.Source object for the code object's source only.

---
## getargs
```python
from code import getargs
```

Return a list of tuples (name, value) for all arguments.

If 'var' is set True, also include the variable and keyword arguments
when present.

---
## lineno
```python
from code import lineno
```



---
## f_globals
```python
from code import f_globals
```



---
## f_locals
```python
from code import f_locals
```



---
## statement
```python
from code import statement
```

_pytest._code.Source object for the current statement.

---
## eval
```python
from code import eval
```

Evaluate 'code' in the frame.

'vars' are optional additional local variables.

Returns the result of the evaluation.

---
## repr
```python
from code import repr
```

Return a 'safe' (non-recursive, one-line) string repr for 'object'.

---
## with_repr_style
```python
from code import with_repr_style
```



---
## frame
```python
from code import frame
```



---
## relline
```python
from code import relline
```



---
## __repr__
```python
from code import __repr__
```



---
## locals
```python
from code import locals
```

Locals of underlying frame.

---
## getfirstlinesource
```python
from code import getfirstlinesource
```



---
## getsource
```python
from code import getsource
```

Return failing source code.

---
## ishidden
```python
from code import ishidden
```

Return True if the current frame has a var __tracebackhide__
resolving to True.

If __tracebackhide__ is a callable, it gets called with the
ExceptionInfo instance and can decide whether to hide the traceback.

Mostly for internal use.

---
## __str__
```python
from code import __str__
```



---
## cut
```python
from code import cut
```

Return a Traceback instance wrapping part of this Traceback.

By providing any combination of path, lineno and firstlineno, the
first frame to start the to-be-returned traceback is determined.

This allows cutting the first part of a Traceback instance e.g.
for formatting reasons (removing some uninteresting bits that deal
with handling of the exception/traceback).

---
## __getitem__
```python
from code import __getitem__
```



---
## filter
```python
from code import filter
```

Return a Traceback instance with certain items removed.

If the filter is an `ExceptionInfo`, removes all the ``TracebackEntry``s
which are hidden (see ishidden() above).

Otherwise, the filter is a function that gets a single argument, a
``TracebackEntry`` instance, and should return True when the item should
be added to the ``Traceback``, False when not.

---
## recursionindex
```python
from code import recursionindex
```

Return the index of the frame/TracebackEntry where recursion originates if
appropriate, None if no recursion occurred.

---
## from_exception
```python
from code import from_exception
```

Return an ExceptionInfo for an existing exception.

The exception must have a non-``None`` ``__traceback__`` attribute,
otherwise this function fails with an assertion error. This means that
the exception must have been raised, or added a traceback with the
:py:meth:`~BaseException.with_traceback()` method.

:param exprinfo:
    A text string helping to determine if we should strip
    ``AssertionError`` from the output. Defaults to the exception
    message/``__str__()``.

.. versionadded:: 7.4

---
## from_exc_info
```python
from code import from_exc_info
```

Like :func:`from_exception`, but using old-style exc_info tuple.

---
## from_current
```python
from code import from_current
```

Return an ExceptionInfo matching the current traceback.

.. warning::

    Experimental API

:param exprinfo:
    A text string helping to determine if we should strip
    ``AssertionError`` from the output. Defaults to the exception
    message/``__str__()``.

---
## for_later
```python
from code import for_later
```

Return an unfilled ExceptionInfo.

---
## fill_unfilled
```python
from code import fill_unfilled
```

Fill an unfilled ExceptionInfo created with ``for_later()``.

---
## type
```python
from code import type
```

The exception class.

---
## value
```python
from code import value
```

The exception value.

---
## tb
```python
from code import tb
```

The exception raw traceback.

---
## typename
```python
from code import typename
```

The type name of the exception.

---
## traceback
```python
from code import traceback
```



---
## exconly
```python
from code import exconly
```

Return the exception as a string.

When 'tryshort' resolves to True, and the exception is an
AssertionError, only the actual exception part of the exception
representation is returned (so 'AssertionError: ' is removed from
the beginning).

---
## errisinstance
```python
from code import errisinstance
```

Return True if the exception is an instance of exc.

Consider using ``isinstance(excinfo.value, exc)`` instead.

---
## _getreprcrash
```python
from code import _getreprcrash
```



---
## getrepr
```python
from code import getrepr
```

Return str()able representation of this exception info.

:param bool showlocals:
    Show locals per traceback entry.
    Ignored if ``style=="native"``.

:param str style:
    long|short|line|no|native|value traceback style.

:param bool abspath:
    If paths should be changed to absolute or left unchanged.

:param tbfilter:
    A filter for traceback entries.

    * If false, don't hide any entries.
    * If true, hide internal entries and entries that contain a local
      variable ``__tracebackhide__ = True``.
    * If a callable, delegates the filtering to the callable.

    Ignored if ``style`` is ``"native"``.

:param bool funcargs:
    Show fixtures ("funcargs" for legacy purposes) per traceback entry.

:param bool truncate_locals:
    With ``showlocals==True``, make sure locals can be safely represented as strings.

:param bool truncate_args:
    With ``showargs==True``, make sure args can be safely represented as strings.

:param bool chain:
    If chained exceptions in Python 3 should be shown.

.. versionchanged:: 3.9

    Added the ``chain`` parameter.

---
## _stringify_exception
```python
from code import _stringify_exception
```



---
## match
```python
from code import match
```

Check whether the regular expression `regexp` matches the string
representation of the exception using :func:`python:re.search`.

If it matches `True` is returned, otherwise an `AssertionError` is raised.

---
## _group_contains
```python
from code import _group_contains
```

Return `True` if a `BaseExceptionGroup` contains a matching exception.

---
## group_contains
```python
from code import group_contains
```

Check whether a captured exception group contains a matching exception.

:param Type[BaseException] | Tuple[Type[BaseException]] expected_exception:
    The expected exception type, or a tuple if one of multiple possible
    exception types are expected.

:param str | Pattern[str] | None match:
    If specified, a string containing a regular expression,
    or a regular expression object, that is tested against the string
    representation of the exception and its `PEP-678 <https://peps.python.org/pep-0678/>` `__notes__`
    using :func:`re.search`.

    To match a literal string that may contain :ref:`special characters
    <re-syntax>`, the pattern can first be escaped with :func:`re.escape`.

:param Optional[int] depth:
    If `None`, will search for a matching exception at any nesting depth.
    If >= 1, will only match an exception if it's at the specified depth (depth = 1 being
    the exceptions contained within the topmost exception group).

.. versionadded:: 8.0

---
## _getindent
```python
from code import _getindent
```



---
## _getentrysource
```python
from code import _getentrysource
```



---
## repr_args
```python
from code import repr_args
```



---
## get_source
```python
from code import get_source
```

Return formatted and marked up source lines.

---
## get_exconly
```python
from code import get_exconly
```



---
## repr_locals
```python
from code import repr_locals
```



---
## repr_traceback_entry
```python
from code import repr_traceback_entry
```



---
## _makepath
```python
from code import _makepath
```



---
## repr_traceback
```python
from code import repr_traceback
```



---
## _truncate_recursive_traceback
```python
from code import _truncate_recursive_traceback
```

Truncate the given recursive traceback trying to find the starting
point of the recursion.

The detection is done by going through each traceback entry and
finding the point in which the locals of the frame are equal to the
locals of a previous frame (see ``recursionindex()``).

Handle the situation where the recursion process might raise an
exception (for example comparing numpy arrays using equality raises a
TypeError), in which case we do our best to warn the user of the
error and show a limited traceback.

---
## repr_excinfo
```python
from code import repr_excinfo
```



---
## toterminal
```python
from code import toterminal
```



---
## addsection
```python
from code import addsection
```



---
## _write_entry_lines
```python
from code import _write_entry_lines
```

Write the source code portions of a list of traceback entries with syntax highlighting.

Usually entries are lines like these:

    "     x = 1"
    ">    assert x == 2"
    "E    assert 1 == 2"

This function takes care of rendering the "source" portions of it (the lines without
the "E" prefix) using syntax highlighting, taking care to not highlighting the ">"
character, as doing so might break line continuations.

---
## __post_init__
```python
from code import __post_init__
```



---
## f
```python
from code import f
```



---
## getrawcode
```python
from source import getrawcode
```

Return code object for given function.

---
## deindent
```python
from source import deindent
```

Return a new Source object deindented.

---
## get_statement_startend2
```python
from source import get_statement_startend2
```



---
## getstatementrange_ast
```python
from source import getstatementrange_ast
```



---
## __eq__
```python
from source import __eq__
```



---
## __getitem__
```python
from source import __getitem__
```



---
## __iter__
```python
from source import __iter__
```



---
## __len__
```python
from source import __len__
```



---
## strip
```python
from source import strip
```

Return new Source object with trailing and leading blank lines removed.

---
## getstatement
```python
from source import getstatement
```

Return Source statement which contains the given linenumber
(counted from 0).

---
## getstatementrange
```python
from source import getstatementrange
```

Return (start, end) tuple which spans the minimal statement region
which containing the given lineno.

---
## __str__
```python
from source import __str__
```



---
## __name__
```python
from truncate import __name__
```

Utilities for truncating assertion output.

Current default behaviour is to truncate assertion explanations at
terminal lines, unless running with an assertions verbosity level of at least 2 or running on CI.

---
## truncate_if_required
```python
from truncate import truncate_if_required
```

Truncate this assertion explanation if the given test item is eligible.

---
## _should_truncate_item
```python
from truncate import _should_truncate_item
```

Whether or not this test item is eligible for truncation.

---
## _truncate_explanation
```python
from truncate import _truncate_explanation
```

Truncate given list of strings that makes up the assertion explanation.

Truncates to either 8 lines, or 640 characters - whichever the input reaches
first, taking the truncation explanation into account. The remaining lines
will be replaced by a usage message.

---
## _truncate_by_char_count
```python
from truncate import _truncate_by_char_count
```



---
## _HighlightFunc
```python
from util import _HighlightFunc
```



---
## format_explanation
```python
from util import format_explanation
```

Format an explanation.

Normally all embedded newlines are escaped, however there are
three exceptions: \n{, \n} and \n~.  The first two are intended
cover nested explanations, see function and attribute explanations
for examples (.visit_Call(), visit_Attribute()).  The last one is
for when one explanation needs to span multiple lines, e.g. when
displaying diffs.

---
## _split_explanation
```python
from util import _split_explanation
```

Return a list of individual lines in the explanation.

This will return a list of lines split on '\n{', '\n}' and '\n~'.
Any other newlines will be escaped and appear in the line as the
literal '\n' characters.

---
## _format_lines
```python
from util import _format_lines
```

Format the individual lines.

This will replace the '{', '}' and '~' characters of our mini formatting
language with the proper 'where ...', 'and ...' and ' + ...' text, taking
care of indentation along the way.

Return a list of formatted lines.

---
## issequence
```python
from util import issequence
```



---
## istext
```python
from util import istext
```



---
## isdict
```python
from util import isdict
```



---
## isset
```python
from util import isset
```



---
## isnamedtuple
```python
from util import isnamedtuple
```



---
## isdatacls
```python
from util import isdatacls
```



---
## isattrs
```python
from util import isattrs
```



---
## isiterable
```python
from util import isiterable
```



---
## has_default_eq
```python
from util import has_default_eq
```

Check if an instance of an object contains the default eq

First, we check if the object's __eq__ attribute has __code__,
if so, we check the equally of the method code filename (__code__.co_filename)
to the default one generated by the dataclass and attr module
for dataclasses the default co_filename is <string>, for attrs class, the __eq__ should contain "attrs eq generated"

---
## assertrepr_compare
```python
from util import assertrepr_compare
```

Return specialised explanations for some operators/operands.

---
## _compare_eq_any
```python
from util import _compare_eq_any
```



---
## _diff_text
```python
from util import _diff_text
```

Return the explanation for the diff between text.

Unless --verbose is used this will skip leading and trailing
characters which are identical to keep the diff minimal.

---
## _compare_eq_iterable
```python
from util import _compare_eq_iterable
```



---
## _compare_eq_sequence
```python
from util import _compare_eq_sequence
```



---
## _compare_eq_set
```python
from util import _compare_eq_set
```



---
## _compare_gt_set
```python
from util import _compare_gt_set
```



---
## _compare_lt_set
```python
from util import _compare_lt_set
```



---
## _compare_gte_set
```python
from util import _compare_gte_set
```



---
## _compare_lte_set
```python
from util import _compare_lte_set
```



---
## _set_one_sided_diff
```python
from util import _set_one_sided_diff
```



---
## _compare_eq_dict
```python
from util import _compare_eq_dict
```



---
## _compare_eq_cls
```python
from util import _compare_eq_cls
```



---
## _notin_text
```python
from util import _notin_text
```



---
## running_on_ci
```python
from util import running_on_ci
```

Check if we're currently running on a CI system.

---
## register_assert_rewrite
```python
from __init__ import register_assert_rewrite
```

Register one or more module names to be rewritten on import.

This function will make sure that this module or all modules inside
the package will get their assert statements rewritten.
Thus you should make sure to call this before the module is
actually imported, usually in your __init__.py if you are a plugin
using a package.

:param names: The module names to register.

---
## DummyRewriteHook
```python
from __init__ import DummyRewriteHook
```

A no-op import hook for when rewriting is disabled.

---
## AssertionState
```python
from __init__ import AssertionState
```

State for the assertion plugin.

---
## install_importhook
```python
from __init__ import install_importhook
```

Try to install the rewrite hook, raise SystemError if it fails.

---
## pytest_runtest_protocol
```python
from __init__ import pytest_runtest_protocol
```

Setup the pytest_assertrepr_compare and pytest_assertion_pass hooks.

The rewrite module will use util._reprcompare if it exists to use custom
reporting via the pytest_assertrepr_compare hook.  This sets up this custom
comparison for the test.

---
## pytest_sessionfinish
```python
from __init__ import pytest_sessionfinish
```



---
## pytest_assertrepr_compare
```python
from __init__ import pytest_assertrepr_compare
```



---
## mark_rewrite
```python
from __init__ import mark_rewrite
```



---
## undo
```python
from __init__ import undo
```



---
## callbinrepr
```python
from __init__ import callbinrepr
```

Call the pytest_assertrepr_compare hook and prepare the result.

This uses the first result from the hook and then ensures the
following:
* Overly verbose explanations are truncated unless configured otherwise
  (eg. if running in verbose mode).
* Embedded newlines are escaped to help util.format_explanation()
  later.
* If the rewrite mode is used embedded %-characters are replaced
  to protect later % formatting.

The result can be formatted by util.format_explanation() for
pretty printing.

---
## call_assertion_pass_hook
```python
from __init__ import call_assertion_pass_hook
```



---
## __name__
```python
from rewrite import __name__
```

Rewrite assertion AST to produce nice error messages.

---
## Sentinel
```python
from rewrite import Sentinel
```



---
## AssertionRewritingHook
```python
from rewrite import AssertionRewritingHook
```

PEP302/PEP451 import hook which rewrites asserts.

---
## _write_pyc_fp
```python
from rewrite import _write_pyc_fp
```



---
## _write_pyc
```python
from rewrite import _write_pyc
```



---
## _rewrite_test
```python
from rewrite import _rewrite_test
```

Read and rewrite *fn* and return the code object.

---
## _read_pyc
```python
from rewrite import _read_pyc
```

Possibly read a pytest pyc containing rewritten code.

Return rewritten code if successful or None if not.

---
## rewrite_asserts
```python
from rewrite import rewrite_asserts
```

Rewrite the assert statements in mod.

---
## _saferepr
```python
from rewrite import _saferepr
```

Get a safe repr of an object for assertion error messages.

The assertion formatting (util.format_explanation()) requires
newlines to be escaped since they are a special character for it.
Normally assertion.util.format_explanation() does this but for a
custom repr it is possible to contain one of the special escape
sequences, especially '\n{' and '\n}' are likely to be present in
JSON reprs.

---
## _get_maxsize_for_saferepr
```python
from rewrite import _get_maxsize_for_saferepr
```

Get `maxsize` configuration for saferepr based on the given config object.

---
## _format_assertmsg
```python
from rewrite import _format_assertmsg
```

Format the custom assertion message given.

For strings this simply replaces newlines with '\n~' so that
util.format_explanation() will preserve them instead of escaping
newlines.  For other objects saferepr() is used first.

---
## _should_repr_global_name
```python
from rewrite import _should_repr_global_name
```



---
## _format_boolop
```python
from rewrite import _format_boolop
```



---
## _call_reprcompare
```python
from rewrite import _call_reprcompare
```



---
## _call_assertion_pass
```python
from rewrite import _call_assertion_pass
```



---
## _check_if_assertion_pass_impl
```python
from rewrite import _check_if_assertion_pass_impl
```

Check if any plugins implement the pytest_assertion_pass hook
in order not to generate explanation unnecessarily (might be expensive).

---
## traverse_node
```python
from rewrite import traverse_node
```

Recursively yield node and all its children in depth-first order.

---
## _get_assertion_exprs
```python
from rewrite import _get_assertion_exprs
```

Return a mapping from {lineno: "assertion test expression"}.

---
## AssertionRewriter
```python
from rewrite import AssertionRewriter
```

Assertion rewriting implementation.

The main entrypoint is to call .run() with an ast.Module instance,
this will then find all the assert statements and rewrite them to
provide intermediate values and a detailed assertion error.  See
http://pybites.blogspot.be/2011/07/behind-scenes-of-pytests-new-assertion.html
for an overview of how this works.

The entry point here is .run() which will iterate over all the
statements in an ast.Module and for each ast.Assert statement it
finds call .visit() with it.  Then .visit_Assert() takes over and
is responsible for creating new ast statements to replace the
original assert statement: it rewrites the test of an assertion
to provide intermediate values and replace it with an if statement
which raises an assertion error with a detailed explanation in
case the expression is false and calls pytest_assertion_pass hook
if expression is true.

For this .visit_Assert() uses the visitor pattern to visit all the
AST nodes of the ast.Assert.test field, each visit call returning
an AST node and the corresponding explanation string.  During this
state is kept in several instance attributes:

:statements: All the AST statements which will replace the assert
   statement.

:variables: This is populated by .variable() with each variable
   used by the statements so that they can all be set to None at
   the end of the statements.

:variable_counter: Counter to create new unique variables needed
   by statements.  Variables are created using .variable() and
   have the form of "@py_assert0".

:expl_stmts: The AST statements which will be executed to get
   data from the assertion.  This is the code which will construct
   the detailed assertion message that is used in the AssertionError
   or for the pytest_assertion_pass hook.

:explanation_specifiers: A dict filled by .explanation_param()
   with %-formatting placeholders and their corresponding
   expressions to use in the building of an assertion message.
   This is used by .pop_format_context() to build a message.

:stack: A stack of the explanation_specifiers dicts maintained by
   .push_format_context() and .pop_format_context() which allows
   to build another %-formatted string while already building one.

:scope: A tuple containing the current scope used for variables_overwrite.

:variables_overwrite: A dict filled with references to variables
   that change value within an assert. This happens when a variable is
   reassigned with the walrus operator

This state, except the variables_overwrite,  is reset on every new assert
statement visited and used by the other visitors.

---
## try_makedirs
```python
from rewrite import try_makedirs
```

Attempt to create the given directory and sub-directories exist.

Returns True if successful or if it already exists.

---
## get_cache_dir
```python
from rewrite import get_cache_dir
```

Return the cache directory to write .pyc files for the given .py file path.

---
## __init__
```python
from rewrite import __init__
```



---
## set_session
```python
from rewrite import set_session
```



---
## find_spec
```python
from rewrite import find_spec
```



---
## create_module
```python
from rewrite import create_module
```



---
## exec_module
```python
from rewrite import exec_module
```



---
## _early_rewrite_bailout
```python
from rewrite import _early_rewrite_bailout
```

A fast way to get out of rewriting modules.

Profiling has shown that the call to PathFinder.find_spec (inside of
the find_spec from this class) is a major slowdown, so, this method
tries to filter what we're sure won't be rewritten before getting to
it.

---
## _should_rewrite
```python
from rewrite import _should_rewrite
```



---
## _is_marked_for_rewrite
```python
from rewrite import _is_marked_for_rewrite
```



---
## mark_rewrite
```python
from rewrite import mark_rewrite
```

Mark import names as needing to be rewritten.

The named module or package as well as any nested modules will
be rewritten on import.

---
## _warn_already_imported
```python
from rewrite import _warn_already_imported
```



---
## get_data
```python
from rewrite import get_data
```

Optional PEP302 get_data API.

---
## _write_and_reset
```python
from rewrite import _write_and_reset
```



---
## run
```python
from rewrite import run
```

Find all assert statements in *mod* and rewrite them.

---
## is_rewrite_disabled
```python
from rewrite import is_rewrite_disabled
```



---
## variable
```python
from rewrite import variable
```

Get a new variable.

---
## assign
```python
from rewrite import assign
```

Give *expr* a name.

---
## display
```python
from rewrite import display
```

Call saferepr on the expression.

---
## helper
```python
from rewrite import helper
```

Call a helper in this module.

---
## builtin
```python
from rewrite import builtin
```

Return the builtin called *name*.

---
## explanation_param
```python
from rewrite import explanation_param
```

Return a new named %-formatting placeholder for expr.

This creates a %-formatting placeholder for expr in the
current formatting context, e.g. ``%(py0)s``.  The placeholder
and expr are placed in the current format context so that it
can be used on the next call to .pop_format_context().

---
## push_format_context
```python
from rewrite import push_format_context
```

Create a new formatting context.

The format context is used for when an explanation wants to
have a variable value formatted in the assertion message.  In
this case the value required can be added using
.explanation_param().  Finally .pop_format_context() is used
to format a string of %-formatted values as added by
.explanation_param().

---
## pop_format_context
```python
from rewrite import pop_format_context
```

Format the %-formatted string with current format context.

The expl_expr should be an str ast.expr instance constructed from
the %-placeholders created by .explanation_param().  This will
add the required code to format said string to .expl_stmts and
return the ast.Name instance of the formatted string.

---
## generic_visit
```python
from rewrite import generic_visit
```

Handle expressions we don't have custom code for.

---
## visit_Assert
```python
from rewrite import visit_Assert
```

Return the AST statements to replace the ast.Assert instance.

This rewrites the test of an assertion to provide
intermediate values and replace it with an if statement which
raises an assertion error with a detailed explanation in case
the expression is false.

---
## visit_NamedExpr
```python
from rewrite import visit_NamedExpr
```



---
## visit_Name
```python
from rewrite import visit_Name
```



---
## visit_BoolOp
```python
from rewrite import visit_BoolOp
```



---
## visit_UnaryOp
```python
from rewrite import visit_UnaryOp
```



---
## visit_BinOp
```python
from rewrite import visit_BinOp
```



---
## visit_Call
```python
from rewrite import visit_Call
```



---
## visit_Starred
```python
from rewrite import visit_Starred
```



---
## visit_Attribute
```python
from rewrite import visit_Attribute
```



---
## visit_Compare
```python
from rewrite import visit_Compare
```



---
## get_resource_reader
```python
from rewrite import get_resource_reader
```



---
## __name__
```python
from wcwidth import __name__
```



---
## wcwidth
```python
from wcwidth import wcwidth
```

Determine how many columns are needed to display a character in a terminal.

Returns -1 if the character is not printable.
Returns 0, 1 or 2 for other characters.

---
## wcswidth
```python
from wcwidth import wcswidth
```

Determine how many columns are needed to display a string in a terminal.

Returns -1 if the string contains non-printable characters.

---
## __name__
```python
from saferepr import __name__
```



---
## _try_repr_or_str
```python
from saferepr import _try_repr_or_str
```



---
## _format_repr_exception
```python
from saferepr import _format_repr_exception
```



---
## _ellipsize
```python
from saferepr import _ellipsize
```



---
## SafeRepr
```python
from saferepr import SafeRepr
```

repr.Repr that limits the resulting size of repr() and includes
information on exceptions raised during the call.

---
## safeformat
```python
from saferepr import safeformat
```

Return a pretty printed string for the given object.

Failing __repr__ functions of user instances will be represented
with a short exception info.

---
## saferepr
```python
from saferepr import saferepr
```

Return a size-limited safe repr-string for the given object.

Failing __repr__ functions of user instances will be represented
with a short exception info and 'saferepr' generally takes
care to never raise exceptions itself.

This function is a wrapper around the Repr/reprlib functionality of the
stdlib.

---
## saferepr_unlimited
```python
from saferepr import saferepr_unlimited
```

Return an unlimited-size safe repr-string for the given object.

As with saferepr, failing __repr__ functions of user instances
will be represented with a short exception info.

This function is a wrapper around simple repr.

Note: a cleaner solution would be to alter ``saferepr``this way
when maxsize=None, but that might affect some other code.

---
## __init__
```python
from saferepr import __init__
```

:param maxsize:
If not None, will truncate the resulting repr to that specific size, using ellipsis
somewhere in the middle to hide the extra text.
If None, will not impose any size limits on the returning repr.

---
## repr
```python
from saferepr import repr
```



---
## repr_instance
```python
from saferepr import repr_instance
```



---
## __name__
```python
from terminalwriter import __name__
```

Helper functions for writing to terminals and files.

---
## get_terminal_width
```python
from terminalwriter import get_terminal_width
```



---
## should_do_markup
```python
from terminalwriter import should_do_markup
```



---
## TerminalWriter
```python
from terminalwriter import TerminalWriter
```



---
## __init__
```python
from terminalwriter import __init__
```



---
## fullwidth
```python
from terminalwriter import fullwidth
```



---
## width_of_current_line
```python
from terminalwriter import width_of_current_line
```

Return an estimate of the width so far in the current line.

---
## markup
```python
from terminalwriter import markup
```



---
## sep
```python
from terminalwriter import sep
```



---
## write
```python
from terminalwriter import write
```



---
## line
```python
from terminalwriter import line
```



---
## flush
```python
from terminalwriter import flush
```



---
## _write_source
```python
from terminalwriter import _write_source
```

Write lines of source code possibly highlighted.

Keeping this private for now because the API is clunky. We should discuss how
to evolve the terminal writer so we can have more precise color support, for example
being able to write part of a line in one color and the rest in another, and so on.

---
## _get_pygments_lexer
```python
from terminalwriter import _get_pygments_lexer
```



---
## _get_pygments_formatter
```python
from terminalwriter import _get_pygments_formatter
```



---
## _highlight
```python
from terminalwriter import _highlight
```

Highlight the given source if we have markup support.

---
## _safe_key
```python
from pprint import _safe_key
```

Helper function for key functions when sorting unorderable objects.

The wrapped-object will fallback to a Py2.x style comparison for
unorderable types (sorting first comparing the type name and then by
the obj ids).  Does not work recursively, so dict.items() must have
_safe_key applied to both the key and the value.

---
## _safe_tuple
```python
from pprint import _safe_tuple
```

Helper function for comparing 2-tuples

---
## PrettyPrinter
```python
from pprint import PrettyPrinter
```



---
## _recursion
```python
from pprint import _recursion
```



---
## _wrap_bytes_repr
```python
from pprint import _wrap_bytes_repr
```



---
## __lt__
```python
from pprint import __lt__
```



---
## pformat
```python
from pprint import pformat
```



---
## _format
```python
from pprint import _format
```



---
## _pprint_dataclass
```python
from pprint import _pprint_dataclass
```



---
## _pprint_dict
```python
from pprint import _pprint_dict
```



---
## _pprint_ordered_dict
```python
from pprint import _pprint_ordered_dict
```



---
## _pprint_list
```python
from pprint import _pprint_list
```



---
## _pprint_tuple
```python
from pprint import _pprint_tuple
```



---
## _pprint_set
```python
from pprint import _pprint_set
```



---
## _pprint_str
```python
from pprint import _pprint_str
```



---
## _pprint_bytes
```python
from pprint import _pprint_bytes
```



---
## _pprint_bytearray
```python
from pprint import _pprint_bytearray
```



---
## _pprint_mappingproxy
```python
from pprint import _pprint_mappingproxy
```



---
## _pprint_simplenamespace
```python
from pprint import _pprint_simplenamespace
```



---
## _format_dict_items
```python
from pprint import _format_dict_items
```



---
## _format_namespace_items
```python
from pprint import _format_namespace_items
```



---
## _format_items
```python
from pprint import _format_items
```



---
## _repr
```python
from pprint import _repr
```



---
## _pprint_default_dict
```python
from pprint import _pprint_default_dict
```



---
## _pprint_counter
```python
from pprint import _pprint_counter
```



---
## _pprint_chain_map
```python
from pprint import _pprint_chain_map
```



---
## _pprint_deque
```python
from pprint import _pprint_deque
```



---
## _pprint_user_dict
```python
from pprint import _pprint_user_dict
```



---
## _pprint_user_list
```python
from pprint import _pprint_user_list
```



---
## _pprint_user_string
```python
from pprint import _pprint_user_string
```



---
## _safe_repr
```python
from pprint import _safe_repr
```



---
## ErrorMaker
```python
from error import ErrorMaker
```

lazily provides Exception classes for each possible POSIX errno
(as defined per the 'errno' module).  All such instances
subclass EnvironmentError.

---
## __getattr__
```python
from error import __getattr__
```



---
## _geterrnoclass
```python
from error import _geterrnoclass
```



---
## checked_call
```python
from error import checked_call
```

Call a function and raise an errno-exception if applicable.

---
## Checkers
```python
from path import Checkers
```



---
## NeverRaised
```python
from path import NeverRaised
```



---
## Visitor
```python
from path import Visitor
```



---
## FNMatcher
```python
from path import FNMatcher
```



---
## map_as_list
```python
from path import map_as_list
```



---
## Stat
```python
from path import Stat
```



---
## getuserid
```python
from path import getuserid
```



---
## getgroupid
```python
from path import getgroupid
```



---
## LocalPath
```python
from path import LocalPath
```

Object oriented interface to os.path and other local filesystem
related information.

---
## copymode
```python
from path import copymode
```

Copy permission from src to dst.

---
## copystat
```python
from path import copystat
```

Copy permission,  last modification time,
last access time, and flags from src to dst.

---
## copychunked
```python
from path import copychunked
```



---
## isimportable
```python
from path import isimportable
```



---
## dotfile
```python
from path import dotfile
```



---
## ext
```python
from path import ext
```

Extension of the path (including the '.').

---
## basestarts
```python
from path import basestarts
```



---
## relto
```python
from path import relto
```

Return a string which is the relative part of the path
to the given 'relpath'.

---
## fnmatch
```python
from path import fnmatch
```

Return true if the basename/fullname matches the glob-'pattern'.

valid pattern characters::

    *       matches everything
    ?       matches any single character
    [seq]   matches any character in seq
    [!seq]  matches any char not in seq

If the pattern contains a path-separator then the full path
is used for pattern matching and a '*' is prepended to the
pattern.

if the pattern doesn't contain a path-separator the pattern
is only matched against the basename.

---
## endswith
```python
from path import endswith
```



---
## _evaluate
```python
from path import _evaluate
```



---
## _stat
```python
from path import _stat
```



---
## dir
```python
from path import dir
```



---
## file
```python
from path import file
```



---
## link
```python
from path import link
```



---
## gen
```python
from path import gen
```



---
## __call__
```python
from path import __call__
```



---
## __getattr__
```python
from path import __getattr__
```



---
## owner
```python
from path import owner
```



---
## group
```python
from path import group
```

Return group name of file.

---
## ImportMismatchError
```python
from path import ImportMismatchError
```

raised on pyimport() if there is a mismatch of __file__'s

---
## __div__
```python
from path import __div__
```



---
## dirname
```python
from path import dirname
```

Dirname part of path.

---
## purebasename
```python
from path import purebasename
```

Pure base name of the path.

---
## read_binary
```python
from path import read_binary
```

Read and return a bytestring from reading the path.

---
## read
```python
from path import read
```

Read and return a bytestring from reading the path.

---
## readlines
```python
from path import readlines
```

Read and return a list of lines from the path. if cr is False, the
newline will be removed from the end of each line.

---
## load
```python
from path import load
```

(deprecated) return object unpickled from self.read()

---
## move
```python
from path import move
```

Move this path to target.

---
## ensure_dir
```python
from path import ensure_dir
```

Ensure the path joined with args is a directory.

---
## bestrelpath
```python
from path import bestrelpath
```

Return a string which is a relative path from self
(assumed to be a directory) to dest such that
self.join(bestrelpath) == dest and if not such
path can be determined return dest.

---
## parts
```python
from path import parts
```

Return a root-first list of all ancestor directories
plus the path itself.

---
## common
```python
from path import common
```

Return the common part shared with the other path
or None if there is no common part.

---
## __add__
```python
from path import __add__
```

Return new path object with 'other' added to the basename

---
## visit
```python
from path import visit
```

Yields all paths below the current one

fil is a filter (glob pattern or callable), if not matching the
path will not be yielded, defaulting to None (everything is
returned)

rec is a filter (glob pattern or callable) that controls whether
a node is descended, defaulting to None

ignore is an Exception class that is ignoredwhen calling dirlist()
on any of the paths (by default, all exceptions are reported)

bf if True will cause a breadthfirst search instead of the
default depthfirst. Default: False

sort if True will sort entries within each directory level.

---
## _sortlist
```python
from path import _sortlist
```



---
## __fspath__
```python
from path import __fspath__
```



---
## __hash__
```python
from path import __hash__
```



---
## __eq__
```python
from path import __eq__
```



---
## __ne__
```python
from path import __ne__
```



---
## __lt__
```python
from path import __lt__
```



---
## __gt__
```python
from path import __gt__
```



---
## samefile
```python
from path import samefile
```

Return True if 'other' references the same file as 'self'.

---
## remove
```python
from path import remove
```

Remove a file or directory (or a directory tree if rec=1).
if ignore_errors is True, errors while removing directories will
be ignored.

---
## computehash
```python
from path import computehash
```

Return hexdigest of hashvalue for this file.

---
## new
```python
from path import new
```

Create a modified version of this path.
the following keyword arguments modify various path parts::

  a:/some/path/to/a/file.ext
  xx                           drive
  xxxxxxxxxxxxxxxxx            dirname
                    xxxxxxxx   basename
                    xxxx       purebasename
                         xxx   ext

---
## _getbyspec
```python
from path import _getbyspec
```

See new for what 'spec' can be.

---
## dirpath
```python
from path import dirpath
```

Return the directory path joined with any given path arguments.

---
## join
```python
from path import join
```

Return a new path by appending all 'args' as path
components.  if abs=1 is used restart from root if any
of the args is an absolute path.

---
## _fastjoin
```python
from path import _fastjoin
```



---
## check
```python
from path import check
```

Check a path for existence and properties.

Without arguments, return True if the path exists, otherwise False.

valid checkers::

    file = 1  # is a file
    file = 0  # is not a file (may not even exist)
    dir = 1  # is a dir
    link = 1  # is a link
    exists = 1  # exists

You can specify multiple checker definitions, for example::

    path.check(file=1, link=1)  # a link pointing to a file

---
## size
```python
from path import size
```



---
## mtime
```python
from path import mtime
```



---
## rename
```python
from path import rename
```

Rename this path to target.

---
## dump
```python
from path import dump
```

Pickle object into path location

---
## mkdir
```python
from path import mkdir
```

Create & return the directory joined with args.

---
## write_binary
```python
from path import write_binary
```

Write binary data into path.   If ensure is True create
missing parent directories.

---
## write
```python
from path import write
```

Write data into path.   If ensure is True create
missing parent directories.

---
## _ensuredirs
```python
from path import _ensuredirs
```



---
## ensure
```python
from path import ensure
```

Ensure that an args-joined path exists (by default as
a file). if you specify a keyword argument 'dir=True'
then the path is forced to be a directory path.

---
## lstat
```python
from path import lstat
```

Return an os.lstat() tuple.

---
## setmtime
```python
from path import setmtime
```

Set modification time for the given path.  if 'mtime' is None
(the default) then the file's mtime is set to current time.

Note that the resolution for 'mtime' is platform dependent.

---
## chdir
```python
from path import chdir
```

Change directory to self and return old current directory

---
## as_cwd
```python
from path import as_cwd
```

Return a context manager, which changes to the path's dir during the
managed "with" context.
On __enter__ it returns the old dir, which might be ``None``.

---
## realpath
```python
from path import realpath
```

Return a new path which contains no symbolic links.

---
## atime
```python
from path import atime
```

Return last access time of the path.

---
## __str__
```python
from path import __str__
```

Return string representation of the Path.

---
## chmod
```python
from path import chmod
```

Change permissions to the given mode. If mode is an
integer it directly encodes the os-specific modes.
if rec is True perform recursively.

---
## pypkgpath
```python
from path import pypkgpath
```

Return the Python package path by looking for the last
directory upwards which still contains an __init__.py.
Return None if a pkgpath cannot be determined.

---
## _ensuresyspath
```python
from path import _ensuresyspath
```



---
## pyimport
```python
from path import pyimport
```

Return path as an imported python module.

If modname is None, look for the containing package
and construct an according module name.
The module will be put/looked up in sys.modules.
if ensuresyspath is True then the root dir for importing
the file (taking __init__.py files into account) will
be prepended to sys.path if it isn't there already.
If ensuresyspath=="append" the root dir will be appended
if it isn't already contained in sys.path.
if ensuresyspath is False no modification of syspath happens.

Special value of ensuresyspath=="importlib" is intended
purely for using in pytest, it is capable only of importing
separate .py files outside packages, e.g. for test suite
without any __init__.py file. It effectively allows having
same-named test modules in different places and offers
mild opt-in via this option. Note that it works only in
recent versions of python.

---
## sysexec
```python
from path import sysexec
```

Return stdout text from executing a system child process,
where the 'self' path points to executable.
The process is directly invoked and not through a system shell.

---
## sysfind
```python
from path import sysfind
```

Return a path object found by looking at the systems
underlying PATH specification. If the checker is not None
it will be invoked to filter matching paths.  If a binary
cannot be found, None is returned
Note: This is probably not working on plain win32 systems
but may work on cygwin.

---
## _gethomedir
```python
from path import _gethomedir
```



---
## get_temproot
```python
from path import get_temproot
```

Return the system's temporary directory
(where tempfiles are usually created in)

---
## mkdtemp
```python
from path import mkdtemp
```

Return a Path object pointing to a fresh new temporary directory
(which we created ourselves).

---
## make_numbered_dir
```python
from path import make_numbered_dir
```

Return unique directory with a number greater than the current
maximum one.  The number is assumed to start directly after prefix.
if keep is true directories with a number less than (maxnum-keep)
will be removed. If .lock files are used (lock_timeout non-zero),
algorithm is multi-process safe.

---
## chown
```python
from path import chown
```

Change ownership to the given user and group.
user and group may be specified by a number or
by a name.  if rec is True change ownership
recursively.

---
## readlink
```python
from path import readlink
```

Return value of a symbolic link.

---
## mklinkto
```python
from path import mklinkto
```

Posix style hard link to another name.

---
## mksymlinkto
```python
from path import mksymlinkto
```

Create a symbolic link with the given value (pointing to another name).

---
## parse_num
```python
from path import parse_num
```

Parse the number out of a path (if it matches the prefix)

---
## create_lockfile
```python
from path import create_lockfile
```

Exclusively create lockfile. Throws when failed

---
## atexit_remove_lockfile
```python
from path import atexit_remove_lockfile
```

Ensure lockfile is removed at process exit

---
## get_mtime
```python
from path import get_mtime
```

Read file modification time

---
## is_garbage
```python
from path import is_garbage
```

Check if path denotes directory scheduled for removal

---
## rec
```python
from path import rec
```



---
## try_remove_lockfile
```python
from path import try_remove_lockfile
```



---
## __name__
```python
from test_bdist import __name__
```



---
## BDistTests
```python
from test_bdist import BDistTests
```



---
## _getTargetClass
```python
from test_bdist import _getTargetClass
```



---
## _makeOne
```python
from test_bdist import _makeOne
```



---
## _checkSample
```python
from test_bdist import _checkSample
```



---
## _checkClassifiers
```python
from test_bdist import _checkClassifiers
```



---
## test_ctor_w_bogus_filename
```python
from test_bdist import test_ctor_w_bogus_filename
```



---
## test_ctor_w_non_egg
```python
from test_bdist import test_ctor_w_non_egg
```



---
## test_ctor_wo_PKG_INFO
```python
from test_bdist import test_ctor_wo_PKG_INFO
```



---
## test_ctor_w_egg
```python
from test_bdist import test_ctor_w_egg
```



---
## test_ctor_w_egg_and_metadata_version
```python
from test_bdist import test_ctor_w_egg_and_metadata_version
```



---
## Test_get_metadata
```python
from test_utils import Test_get_metadata
```



---
## _callFUT
```python
from test_utils import _callFUT
```



---
## _checkMyPackage
```python
from test_utils import _checkMyPackage
```



---
## _checkClassifiers
```python
from test_utils import _checkClassifiers
```



---
## test_w_gztar
```python
from test_utils import test_w_gztar
```



---
## test_w_gztar_and_metadata_version
```python
from test_utils import test_w_gztar_and_metadata_version
```



---
## test_w_bztar
```python
from test_utils import test_w_bztar
```



---
## test_w_bztar_and_metadata_version
```python
from test_utils import test_w_bztar_and_metadata_version
```



---
## test_w_zip
```python
from test_utils import test_w_zip
```



---
## test_w_zip_and_metadata_version
```python
from test_utils import test_w_zip_and_metadata_version
```



---
## test_w_egg
```python
from test_utils import test_w_egg
```



---
## test_w_egg_and_metadata_version
```python
from test_utils import test_w_egg_and_metadata_version
```



---
## test_w_wheel
```python
from test_utils import test_w_wheel
```



---
## test_w_wheel_and_metadata_version
```python
from test_utils import test_w_wheel_and_metadata_version
```



---
## test_w_module
```python
from test_utils import test_w_module
```



---
## test_w_module_and_metadata_version
```python
from test_utils import test_w_module_and_metadata_version
```



---
## test_w_package_name
```python
from test_utils import test_w_package_name
```



---
## test_w_package_name_and_metadata_version
```python
from test_utils import test_w_package_name_and_metadata_version
```



---
## test_w_directory_no_EGG_INFO
```python
from test_utils import test_w_directory_no_EGG_INFO
```



---
## test_w_directory
```python
from test_utils import test_w_directory
```



---
## test_w_directory_and_metadata_version
```python
from test_utils import test_w_directory_and_metadata_version
```



---
## Test__parse_options
```python
from test_commandline import Test__parse_options
```



---
## BaseTests
```python
from test_commandline import BaseTests
```



---
## _FormatterBase
```python
from test_commandline import _FormatterBase
```



---
## SimpleTests
```python
from test_commandline import SimpleTests
```



---
## SingleLineTests
```python
from test_commandline import SingleLineTests
```



---
## CSVTests
```python
from test_commandline import CSVTests
```



---
## INITests
```python
from test_commandline import INITests
```



---
## JSONtests
```python
from test_commandline import JSONtests
```



---
## Test_main
```python
from test_commandline import Test_main
```



---
## _Options
```python
from test_commandline import _Options
```



---
## _Meta
```python
from test_commandline import _Meta
```



---
## _Monkey
```python
from test_commandline import _Monkey
```



---
## _Formatter
```python
from test_commandline import _Formatter
```



---
## _callFUT
```python
from test_commandline import _callFUT
```



---
## test_empty
```python
from test_commandline import test_empty
```



---
## test_nonempty
```python
from test_commandline import test_nonempty
```



---
## _getTargetClass
```python
from test_commandline import _getTargetClass
```



---
## _makeOne
```python
from test_commandline import _makeOne
```



---
## test___init___defaults
```python
from test_commandline import test___init___defaults
```



---
## test___init___w_fields
```python
from test_commandline import test___init___w_fields
```



---
## _capture_output
```python
from test_commandline import _capture_output
```



---
## _no_output
```python
from test_commandline import _no_output
```



---
## test___init___
```python
from test_commandline import test___init___
```



---
## test___call___w_empty_fields
```python
from test_commandline import test___call___w_empty_fields
```



---
## test___call___w_skip_and_value_None_no_fields
```python
from test_commandline import test___call___w_skip_and_value_None_no_fields
```



---
## test___call___w_skip_and_value_empty_tuple_explicit_fields
```python
from test_commandline import test___call___w_skip_and_value_empty_tuple_explicit_fields
```



---
## test___call___w_skip_but_values_explicit_fields
```python
from test_commandline import test___call___w_skip_but_values_explicit_fields
```



---
## test___call__wo_fields_wo_list
```python
from test_commandline import test___call__wo_fields_wo_list
```



---
## test___call__w_fields_w_list
```python
from test_commandline import test___call__w_fields_w_list
```



---
## test___call___duplicate
```python
from test_commandline import test___call___duplicate
```



---
## test___call___wo_fields_wo_list
```python
from test_commandline import test___call___wo_fields_wo_list
```



---
## test___call___w_fields_w_list
```python
from test_commandline import test___call___w_fields_w_list
```



---
## test___call___duplicate_with_meta_and_fields
```python
from test_commandline import test___call___duplicate_with_meta_and_fields
```



---
## test___call___duplicate_with_meta_wo_fields
```python
from test_commandline import test___call___duplicate_with_meta_wo_fields
```



---
## test___call___output
```python
from test_commandline import test___call___output
```



---
## test_w_mising_dist
```python
from test_commandline import test_w_mising_dist
```



---
## test_w_dist_wo_download_url
```python
from test_commandline import test_w_dist_wo_download_url
```



---
## test_w_dist_w_download_url
```python
from test_commandline import test_w_dist_w_download_url
```



---
## __init__
```python
from test_commandline import __init__
```



---
## __iter__
```python
from test_commandline import __iter__
```



---
## __enter__
```python
from test_commandline import __enter__
```



---
## __exit__
```python
from test_commandline import __exit__
```



---
## __call__
```python
from test_commandline import __call__
```



---
## finish
```python
from test_commandline import finish
```



---
## _get_metadata
```python
from test_commandline import _get_metadata
```



---
## _checkSample
```python
from __init__ import _checkSample
```



---
## _checkClassifiers
```python
from __init__ import _checkClassifiers
```



---
## _defaultMetadataVersion
```python
from __init__ import _defaultMetadataVersion
```



---
## __name__
```python
from test_installed import __name__
```



---
## InstalledTests
```python
from test_installed import InstalledTests
```



---
## _getTargetClass
```python
from test_installed import _getTargetClass
```



---
## _makeOne
```python
from test_installed import _makeOne
```



---
## test_ctor_w_package_no___file__
```python
from test_installed import test_ctor_w_package_no___file__
```



---
## test_ctor_w_package
```python
from test_installed import test_ctor_w_package
```



---
## test_ctor_w_no___package___falls_back_to___name__
```python
from test_installed import test_ctor_w_no___package___falls_back_to___name__
```



---
## test_ctor_w_package_no_PKG_INFO
```python
from test_installed import test_ctor_w_package_no_PKG_INFO
```



---
## test_ctor_w_package_and_metadata_version
```python
from test_installed import test_ctor_w_package_and_metadata_version
```



---
## test_ctor_w_name
```python
from test_installed import test_ctor_w_name
```



---
## test_ctor_w_name_and_metadata_version
```python
from test_installed import test_ctor_w_name_and_metadata_version
```



---
## test_ctor_w_invalid_name
```python
from test_installed import test_ctor_w_invalid_name
```



---
## test_ctor_w_egg_info_as_file
```python
from test_installed import test_ctor_w_egg_info_as_file
```



---
## test_ctor_w_dist_info
```python
from test_installed import test_ctor_w_dist_info
```



---
## test_namespaced_pkg_installed_via_setuptools
```python
from test_installed import test_namespaced_pkg_installed_via_setuptools
```



---
## test_namespaced_pkg_installed_via_pth
```python
from test_installed import test_namespaced_pkg_installed_via_pth
```



---
## __name__
```python
from test_wheel import __name__
```



---
## WheelTests
```python
from test_wheel import WheelTests
```



---
## _getTargetClass
```python
from test_wheel import _getTargetClass
```



---
## _makeOne
```python
from test_wheel import _makeOne
```



---
## _checkSample
```python
from test_wheel import _checkSample
```



---
## _checkClassifiers
```python
from test_wheel import _checkClassifiers
```



---
## test_ctor_w_bogus_filename
```python
from test_wheel import test_ctor_w_bogus_filename
```



---
## test_ctor_w_non_wheel
```python
from test_wheel import test_ctor_w_non_wheel
```



---
## test_ctor_wo_dist_info
```python
from test_wheel import test_ctor_wo_dist_info
```



---
## test_ctor_w_valid_wheel
```python
from test_wheel import test_ctor_w_valid_wheel
```



---
## test_ctor_w_installed_wheel
```python
from test_wheel import test_ctor_w_installed_wheel
```



---
## test_ctor_w_valid_wheel_and_metadata_version
```python
from test_wheel import test_ctor_w_valid_wheel_and_metadata_version
```



---
## test_ctor_w_valid_wheel_w_description_header
```python
from test_wheel import test_ctor_w_valid_wheel_w_description_header
```



---
## test_ctor_w_valid_wheel_w_description_body
```python
from test_wheel import test_ctor_w_valid_wheel_w_description_body
```



---
## test_ctor_w_valid_installed_wheel
```python
from test_wheel import test_ctor_w_valid_installed_wheel
```



---
## __name__
```python
from test_distribution import __name__
```



---
## Test__must_decode
```python
from test_distribution import Test__must_decode
```



---
## DistributionTests
```python
from test_distribution import DistributionTests
```



---
## _callFUT
```python
from test_distribution import _callFUT
```



---
## test_w_bytes_latin1
```python
from test_distribution import test_w_bytes_latin1
```



---
## test_w_bytes_utf8
```python
from test_distribution import test_w_bytes_utf8
```



---
## test_w_unicode
```python
from test_distribution import test_w_unicode
```



---
## test_w_object
```python
from test_distribution import test_w_object
```



---
## _getTargetClass
```python
from test_distribution import _getTargetClass
```



---
## _makeOne
```python
from test_distribution import _makeOne
```



---
## test_ctor_defaults
```python
from test_distribution import test_ctor_defaults
```



---
## test_extractMetadata_raises_NotImplementedError
```python
from test_distribution import test_extractMetadata_raises_NotImplementedError
```



---
## test_read_raises_NotImplementedError
```python
from test_distribution import test_read_raises_NotImplementedError
```



---
## test_parse_given_unicode
```python
from test_distribution import test_parse_given_unicode
```



---
## test_parse_Metadata_Version_1_0
```python
from test_distribution import test_parse_Metadata_Version_1_0
```



---
## test_parse_Metadata_Version_1_1
```python
from test_distribution import test_parse_Metadata_Version_1_1
```



---
## test_parse_Metadata_Version_1_2
```python
from test_distribution import test_parse_Metadata_Version_1_2
```



---
## test_parse_Metadata_Version_2_1
```python
from test_distribution import test_parse_Metadata_Version_2_1
```



---
## test_parse_Metadata_Version_2_2
```python
from test_distribution import test_parse_Metadata_Version_2_2
```



---
## test_parse_Metadata_Version_2_3
```python
from test_distribution import test_parse_Metadata_Version_2_3
```



---
## test_parse_Metadata_Version_unknown
```python
from test_distribution import test_parse_Metadata_Version_unknown
```



---
## test_parse_Metadata_Version_override
```python
from test_distribution import test_parse_Metadata_Version_override
```



---
## test_parse_Name
```python
from test_distribution import test_parse_Name
```



---
## test_parse_Version
```python
from test_distribution import test_parse_Version
```



---
## test_parse_Platform_single
```python
from test_distribution import test_parse_Platform_single
```



---
## test_parse_Platform_multiple
```python
from test_distribution import test_parse_Platform_multiple
```



---
## test_parse_Supported_Platform_single
```python
from test_distribution import test_parse_Supported_Platform_single
```



---
## test_parse_Supported_Platform_multiple
```python
from test_distribution import test_parse_Supported_Platform_multiple
```



---
## test_parse_Summary
```python
from test_distribution import test_parse_Summary
```



---
## test_parse_Description
```python
from test_distribution import test_parse_Description
```



---
## test_parse_Description_multiline
```python
from test_distribution import test_parse_Description_multiline
```



---
## test_parse_Description_in_payload
```python
from test_distribution import test_parse_Description_in_payload
```



---
## test_parse_Keywords
```python
from test_distribution import test_parse_Keywords
```



---
## test_parse_Home_page
```python
from test_distribution import test_parse_Home_page
```



---
## test_parse_Author
```python
from test_distribution import test_parse_Author
```



---
## test_parse_Author_Email
```python
from test_distribution import test_parse_Author_Email
```



---
## test_parse_License
```python
from test_distribution import test_parse_License
```



---
## test_parse_Classifier_single
```python
from test_distribution import test_parse_Classifier_single
```



---
## test_parse_Classifier_multiple
```python
from test_distribution import test_parse_Classifier_multiple
```



---
## test_parse_Download_URL
```python
from test_distribution import test_parse_Download_URL
```



---
## test_parse_Requires_single_wo_version
```python
from test_distribution import test_parse_Requires_single_wo_version
```



---
## test_parse_Requires_single_w_version
```python
from test_distribution import test_parse_Requires_single_w_version
```



---
## test_parse_Requires_multiple
```python
from test_distribution import test_parse_Requires_multiple
```



---
## test_parse_Provides_single_wo_version
```python
from test_distribution import test_parse_Provides_single_wo_version
```



---
## test_parse_Provides_single_w_version
```python
from test_distribution import test_parse_Provides_single_w_version
```



---
## test_parse_Provides_multiple
```python
from test_distribution import test_parse_Provides_multiple
```



---
## test_parse_Obsoletes_single_no_version
```python
from test_distribution import test_parse_Obsoletes_single_no_version
```



---
## test_parse_Obsoletes_single_w_version
```python
from test_distribution import test_parse_Obsoletes_single_w_version
```



---
## test_parse_Obsoletes_multiple
```python
from test_distribution import test_parse_Obsoletes_multiple
```



---
## test_parse_Maintainer
```python
from test_distribution import test_parse_Maintainer
```



---
## test_parse_Maintainer_Email
```python
from test_distribution import test_parse_Maintainer_Email
```



---
## test_parse_Requires_Python_single_spec
```python
from test_distribution import test_parse_Requires_Python_single_spec
```



---
## test_parse_Requires_External_single_wo_version
```python
from test_distribution import test_parse_Requires_External_single_wo_version
```



---
## test_parse_Requires_External_single_w_version
```python
from test_distribution import test_parse_Requires_External_single_w_version
```



---
## test_parse_Requires_External_multiple
```python
from test_distribution import test_parse_Requires_External_multiple
```



---
## test_parse_Requires_Dist_single_wo_version
```python
from test_distribution import test_parse_Requires_Dist_single_wo_version
```



---
## test_parse_Requires_Dist_single_w_version
```python
from test_distribution import test_parse_Requires_Dist_single_w_version
```



---
## test_parse_Requires_Dist_single_w_env_marker
```python
from test_distribution import test_parse_Requires_Dist_single_w_env_marker
```



---
## test_parse_Requires_Dist_multiple
```python
from test_distribution import test_parse_Requires_Dist_multiple
```



---
## test_parse_Provides_Dist_single_wo_version
```python
from test_distribution import test_parse_Provides_Dist_single_wo_version
```



---
## test_parse_Provides_Dist_single_w_version
```python
from test_distribution import test_parse_Provides_Dist_single_w_version
```



---
## test_parse_Provides_Dist_single_w_env_marker
```python
from test_distribution import test_parse_Provides_Dist_single_w_env_marker
```



---
## test_parse_Provides_Dist_multiple
```python
from test_distribution import test_parse_Provides_Dist_multiple
```



---
## test_parse_Obsoletes_Dist_single_no_version
```python
from test_distribution import test_parse_Obsoletes_Dist_single_no_version
```



---
## test_parse_Obsoletes_Dist_single_w_version
```python
from test_distribution import test_parse_Obsoletes_Dist_single_w_version
```



---
## test_parse_Obsoletes_Dist_single_w_env_marker
```python
from test_distribution import test_parse_Obsoletes_Dist_single_w_env_marker
```



---
## test_parse_Obsoletes_Dist_multiple
```python
from test_distribution import test_parse_Obsoletes_Dist_multiple
```



---
## test_parse_Project_URL_single_no_version
```python
from test_distribution import test_parse_Project_URL_single_no_version
```



---
## test_parse_Project_URL_multiple
```python
from test_distribution import test_parse_Project_URL_multiple
```



---
## test_parse_Provides_Extra_single
```python
from test_distribution import test_parse_Provides_Extra_single
```



---
## test_parse_Provides_Extra_multiple
```python
from test_distribution import test_parse_Provides_Extra_multiple
```



---
## test_parse_Distribution_Content_Type_single
```python
from test_distribution import test_parse_Distribution_Content_Type_single
```



---
## test_parse_Dynamic_single
```python
from test_distribution import test_parse_Dynamic_single
```



---
## test_parse_Dynamic_multiple
```python
from test_distribution import test_parse_Dynamic_multiple
```



---
## IndexTests
```python
from test_index import IndexTests
```



---
## _getTargetClass
```python
from test_index import _getTargetClass
```



---
## _makeOne
```python
from test_index import _makeOne
```



---
## test_empty
```python
from test_index import test_empty
```



---
## _makeDummy
```python
from test_index import _makeDummy
```



---
## test___getitem___miss
```python
from test_index import test___getitem___miss
```



---
## test___setitem___value_not_dist
```python
from test_index import test___setitem___value_not_dist
```



---
## test___setitem___bad_key
```python
from test_index import test___setitem___bad_key
```



---
## test___setitem___valid_key
```python
from test_index import test___setitem___valid_key
```



---
## test_add_not_dist
```python
from test_index import test_add_not_dist
```



---
## test_add_valid_dist
```python
from test_index import test_add_valid_dist
```



---
## DummyDistribution
```python
from test_index import DummyDistribution
```



---
## NotDistribution
```python
from test_index import NotDistribution
```



---
## __name__
```python
from test_develop import __name__
```



---
## DevelopTests
```python
from test_develop import DevelopTests
```



---
## _getTargetClass
```python
from test_develop import _getTargetClass
```



---
## _makeOne
```python
from test_develop import _makeOne
```



---
## test_ctor_w_path
```python
from test_develop import test_ctor_w_path
```



---
## test_ctor_w_invalid_path
```python
from test_develop import test_ctor_w_invalid_path
```



---
## __name__
```python
from test_sdist import __name__
```



---
## SDistTests
```python
from test_sdist import SDistTests
```



---
## UnpackedMixin
```python
from test_sdist import UnpackedMixin
```



---
## UnpackedSDistGivenDirectoryTests
```python
from test_sdist import UnpackedSDistGivenDirectoryTests
```



---
## UnpackedSDistGivenFileSDistTests
```python
from test_sdist import UnpackedSDistGivenFileSDistTests
```



---
## _getTargetClass
```python
from test_sdist import _getTargetClass
```



---
## _makeOne
```python
from test_sdist import _makeOne
```



---
## _checkSample
```python
from test_sdist import _checkSample
```



---
## _checkClassifiers
```python
from test_sdist import _checkClassifiers
```



---
## test_ctor_w_invalid_filename
```python
from test_sdist import test_ctor_w_invalid_filename
```



---
## test_ctor_wo_PKG_INFO
```python
from test_sdist import test_ctor_wo_PKG_INFO
```



---
## test_ctor_w_tar
```python
from test_sdist import test_ctor_w_tar
```



---
## test_ctor_w_gztar
```python
from test_sdist import test_ctor_w_gztar
```



---
## test_ctor_w_gztar_and_metadata_version
```python
from test_sdist import test_ctor_w_gztar_and_metadata_version
```



---
## test_ctor_w_bztar
```python
from test_sdist import test_ctor_w_bztar
```



---
## test_ctor_w_bztar_and_metadata_version
```python
from test_sdist import test_ctor_w_bztar_and_metadata_version
```



---
## test_ctor_w_zip
```python
from test_sdist import test_ctor_w_zip
```



---
## test_ctor_w_zip_and_metadata_version
```python
from test_sdist import test_ctor_w_zip_and_metadata_version
```



---
## test_ctor_w_bogus
```python
from test_sdist import test_ctor_w_bogus
```



---
## setUp
```python
from test_sdist import setUp
```



---
## tearDown
```python
from test_sdist import tearDown
```



---
## _getTopDirectory
```python
from test_sdist import _getTopDirectory
```



---
## _getLoadFilename
```python
from test_sdist import _getLoadFilename
```



---
## __name__
```python
from test_tensor import __name__
```



---
## test_tensor_attrs
```python
from test_tensor import test_tensor_attrs
```



---
## test_tensor_base_object
```python
from test_tensor import test_tensor_base_object
```



---
## test_tensor_numpy_roundtrip
```python
from test_tensor import test_tensor_numpy_roundtrip
```



---
## test_tensor_ipc_roundtrip
```python
from test_tensor import test_tensor_ipc_roundtrip
```



---
## test_tensor_ipc_read_from_compressed
```python
from test_tensor import test_tensor_ipc_read_from_compressed
```



---
## test_tensor_ipc_strided
```python
from test_tensor import test_tensor_ipc_strided
```



---
## test_tensor_equals
```python
from test_tensor import test_tensor_equals
```



---
## test_tensor_hashing
```python
from test_tensor import test_tensor_hashing
```



---
## test_tensor_size
```python
from test_tensor import test_tensor_size
```



---
## test_read_tensor
```python
from test_tensor import test_read_tensor
```



---
## test_tensor_memoryview
```python
from test_tensor import test_tensor_memoryview
```



---
## eq
```python
from test_tensor import eq
```



---
## ne
```python
from test_tensor import ne
```



---
## __name__
```python
from test_ipc import __name__
```



---
## IpcFixture
```python
from test_ipc import IpcFixture
```



---
## FileFormatFixture
```python
from test_ipc import FileFormatFixture
```



---
## StreamFormatFixture
```python
from test_ipc import StreamFormatFixture
```



---
## MessageFixture
```python
from test_ipc import MessageFixture
```



---
## ipc_fixture
```python
from test_ipc import ipc_fixture
```



---
## file_fixture
```python
from test_ipc import file_fixture
```



---
## stream_fixture
```python
from test_ipc import stream_fixture
```



---
## format_fixture
```python
from test_ipc import format_fixture
```



---
## test_empty_file
```python
from test_ipc import test_empty_file
```



---
## test_file_simple_roundtrip
```python
from test_ipc import test_file_simple_roundtrip
```



---
## test_file_write_table
```python
from test_ipc import test_file_write_table
```



---
## test_file_read_all
```python
from test_ipc import test_file_read_all
```



---
## test_open_file_from_buffer
```python
from test_ipc import test_open_file_from_buffer
```



---
## test_file_read_pandas
```python
from test_ipc import test_file_read_pandas
```



---
## test_file_pathlib
```python
from test_ipc import test_file_pathlib
```



---
## test_empty_stream
```python
from test_ipc import test_empty_stream
```



---
## test_read_year_month_nano_interval
```python
from test_ipc import test_read_year_month_nano_interval
```

ARROW-15783: Verify to_pandas works for interval types.

Interval types require static structures to be enabled. This test verifies
that they are when no other library functions are invoked.

---
## test_stream_categorical_roundtrip
```python
from test_ipc import test_stream_categorical_roundtrip
```



---
## test_open_stream_from_buffer
```python
from test_ipc import test_open_stream_from_buffer
```



---
## test_open_stream_options
```python
from test_ipc import test_open_stream_options
```



---
## test_open_stream_with_wrong_options
```python
from test_ipc import test_open_stream_with_wrong_options
```



---
## test_open_file_options
```python
from test_ipc import test_open_file_options
```



---
## test_open_file_with_wrong_options
```python
from test_ipc import test_open_file_with_wrong_options
```



---
## test_stream_write_dispatch
```python
from test_ipc import test_stream_write_dispatch
```



---
## test_stream_write_table_batches
```python
from test_ipc import test_stream_write_table_batches
```



---
## test_stream_simple_roundtrip
```python
from test_ipc import test_stream_simple_roundtrip
```



---
## test_compression_roundtrip
```python
from test_ipc import test_compression_roundtrip
```



---
## test_write_options
```python
from test_ipc import test_write_options
```



---
## test_write_options_legacy_exclusive
```python
from test_ipc import test_write_options_legacy_exclusive
```



---
## test_stream_options_roundtrip
```python
from test_ipc import test_stream_options_roundtrip
```



---
## test_read_options
```python
from test_ipc import test_read_options
```



---
## test_read_options_included_fields
```python
from test_ipc import test_read_options_included_fields
```



---
## test_dictionary_delta
```python
from test_ipc import test_dictionary_delta
```



---
## test_envvar_set_legacy_ipc_format
```python
from test_ipc import test_envvar_set_legacy_ipc_format
```



---
## test_stream_read_all
```python
from test_ipc import test_stream_read_all
```



---
## test_stream_read_pandas
```python
from test_ipc import test_stream_read_pandas
```



---
## example_messages
```python
from test_ipc import example_messages
```



---
## test_message_ctors_no_segfault
```python
from test_ipc import test_message_ctors_no_segfault
```



---
## test_message_reader
```python
from test_ipc import test_message_reader
```



---
## test_message_serialize_read_message
```python
from test_ipc import test_message_serialize_read_message
```



---
## test_message_read_from_compressed
```python
from test_ipc import test_message_read_from_compressed
```



---
## test_message_read_schema
```python
from test_ipc import test_message_read_schema
```



---
## test_message_read_record_batch
```python
from test_ipc import test_message_read_record_batch
```



---
## test_read_record_batch_on_stream_error_message
```python
from test_ipc import test_read_record_batch_on_stream_error_message
```



---
## StreamReaderServer
```python
from test_ipc import StreamReaderServer
```



---
## SocketStreamFixture
```python
from test_ipc import SocketStreamFixture
```



---
## socket_fixture
```python
from test_ipc import socket_fixture
```



---
## test_socket_simple_roundtrip
```python
from test_ipc import test_socket_simple_roundtrip
```



---
## test_socket_read_all
```python
from test_ipc import test_socket_read_all
```



---
## test_ipc_file_stream_has_eos
```python
from test_ipc import test_ipc_file_stream_has_eos
```



---
## test_ipc_zero_copy_numpy
```python
from test_ipc import test_ipc_zero_copy_numpy
```



---
## test_batches_with_custom_metadata_roundtrip
```python
from test_ipc import test_batches_with_custom_metadata_roundtrip
```



---
## test_ipc_stream_no_batches
```python
from test_ipc import test_ipc_stream_no_batches
```



---
## test_get_record_batch_size
```python
from test_ipc import test_get_record_batch_size
```



---
## _check_serialize_pandas_round_trip
```python
from test_ipc import _check_serialize_pandas_round_trip
```



---
## test_pandas_serialize_round_trip
```python
from test_ipc import test_pandas_serialize_round_trip
```



---
## test_pandas_serialize_round_trip_nthreads
```python
from test_ipc import test_pandas_serialize_round_trip_nthreads
```



---
## test_pandas_serialize_round_trip_multi_index
```python
from test_ipc import test_pandas_serialize_round_trip_multi_index
```



---
## test_serialize_pandas_empty_dataframe
```python
from test_ipc import test_serialize_pandas_empty_dataframe
```



---
## test_pandas_serialize_round_trip_not_string_columns
```python
from test_ipc import test_pandas_serialize_round_trip_not_string_columns
```



---
## test_serialize_pandas_no_preserve_index
```python
from test_ipc import test_serialize_pandas_no_preserve_index
```



---
## test_schema_batch_serialize_methods
```python
from test_ipc import test_schema_batch_serialize_methods
```



---
## test_schema_serialization_with_metadata
```python
from test_ipc import test_schema_serialization_with_metadata
```



---
## write_file
```python
from test_ipc import write_file
```



---
## read_file
```python
from test_ipc import read_file
```



---
## test_write_empty_ipc_file
```python
from test_ipc import test_write_empty_ipc_file
```



---
## test_py_record_batch_reader
```python
from test_ipc import test_py_record_batch_reader
```



---
## test_record_batch_reader_from_arrow_stream
```python
from test_ipc import test_record_batch_reader_from_arrow_stream
```



---
## test_record_batch_reader_cast
```python
from test_ipc import test_record_batch_reader_cast
```



---
## test_record_batch_reader_cast_nulls
```python
from test_ipc import test_record_batch_reader_cast_nulls
```



---
## __init__
```python
from test_ipc import __init__
```



---
## get_sink
```python
from test_ipc import get_sink
```



---
## get_source
```python
from test_ipc import get_source
```



---
## write_batches
```python
from test_ipc import write_batches
```



---
## _get_writer
```python
from test_ipc import _get_writer
```



---
## _check_roundtrip
```python
from test_ipc import _check_roundtrip
```



---
## init
```python
from test_ipc import init
```



---
## run
```python
from test_ipc import run
```



---
## get_result
```python
from test_ipc import get_result
```



---
## start_server
```python
from test_ipc import start_server
```



---
## stop_and_get_result
```python
from test_ipc import stop_and_get_result
```



---
## make_schema
```python
from test_ipc import make_schema
```



---
## make_batches
```python
from test_ipc import make_batches
```



---
## StreamWrapper
```python
from test_ipc import StreamWrapper
```



---
## __arrow_c_stream__
```python
from test_ipc import __arrow_c_stream__
```



---
## __name__
```python
from test_flight_async import __name__
```



---
## ExampleServer
```python
from test_flight_async import ExampleServer
```



---
## async_or_skip
```python
from test_flight_async import async_or_skip
```



---
## flight_client
```python
from test_flight_async import flight_client
```



---
## async_client
```python
from test_flight_async import async_client
```



---
## test_async_support_property
```python
from test_flight_async import test_async_support_property
```



---
## test_get_flight_info
```python
from test_flight_async import test_get_flight_info
```



---
## test_get_flight_info_error
```python
from test_flight_async import test_get_flight_info_error
```



---
## get_flight_info
```python
from test_flight_async import get_flight_info
```



---
## PyArrowConfig
```python
from conftest import PyArrowConfig
```



---
## pytest_runtest_setup
```python
from conftest import pytest_runtest_setup
```



---
## tempdir
```python
from conftest import tempdir
```



---
## base_datadir
```python
from conftest import base_datadir
```



---
## disable_aws_metadata
```python
from conftest import disable_aws_metadata
```

Stop the AWS SDK from trying to contact the EC2 metadata server.

Otherwise, this causes a 5 second delay in tests that exercise the
S3 filesystem.

---
## hdfs_connection
```python
from conftest import hdfs_connection
```



---
## s3_connection
```python
from conftest import s3_connection
```



---
## retry
```python
from conftest import retry
```

Retry decorator

Parameters
----------
attempts : int, default 3
    The number of attempts.
delay : float, default 1
    Initial delay in seconds.
max_delay : float, optional
    The max delay between attempts.
backoff : float, default 1
    The multiplier to delay after each attempt.

---
## s3_server
```python
from conftest import s3_server
```



---
## gcs_server
```python
from conftest import gcs_server
```



---
## azure_server
```python
from conftest import azure_server
```



---
## pickle_module
```python
from conftest import pickle_module
```



---
## builtin_pickle
```python
from conftest import builtin_pickle
```



---
## cloudpickle
```python
from conftest import cloudpickle
```



---
## bool_env
```python
from conftest import bool_env
```



---
## apply_mark
```python
from conftest import apply_mark
```



---
## requires
```python
from conftest import requires
```



---
## decorate
```python
from conftest import decorate
```



---
## minio_server_health_check
```python
from conftest import minio_server_health_check
```



---
## wrapper
```python
from conftest import wrapper
```



---
## __name__
```python
from test_convert_builtin import __name__
```



---
## StrangeIterable
```python
from test_convert_builtin import StrangeIterable
```



---
## MyInt
```python
from test_convert_builtin import MyInt
```



---
## MyBrokenInt
```python
from test_convert_builtin import MyBrokenInt
```



---
## check_struct_type
```python
from test_convert_builtin import check_struct_type
```

Check a struct type is as expected, but not taking order into account.

---
## test_iterable_types
```python
from test_convert_builtin import test_iterable_types
```



---
## test_empty_iterable
```python
from test_convert_builtin import test_empty_iterable
```



---
## test_limited_iterator_types
```python
from test_convert_builtin import test_limited_iterator_types
```



---
## test_limited_iterator_size_overflow
```python
from test_convert_builtin import test_limited_iterator_size_overflow
```



---
## test_limited_iterator_size_underflow
```python
from test_convert_builtin import test_limited_iterator_size_underflow
```



---
## test_iterator_without_size
```python
from test_convert_builtin import test_iterator_without_size
```



---
## test_infinite_iterator
```python
from test_convert_builtin import test_infinite_iterator
```



---
## test_failing_iterator
```python
from test_convert_builtin import test_failing_iterator
```



---
## ObjectWithOnlyGetitem
```python
from test_convert_builtin import ObjectWithOnlyGetitem
```



---
## test_object_with_getitem
```python
from test_convert_builtin import test_object_with_getitem
```



---
## _as_list
```python
from test_convert_builtin import _as_list
```



---
## _as_tuple
```python
from test_convert_builtin import _as_tuple
```



---
## _as_deque
```python
from test_convert_builtin import _as_deque
```



---
## _as_dict_values
```python
from test_convert_builtin import _as_dict_values
```



---
## _as_numpy_array
```python
from test_convert_builtin import _as_numpy_array
```



---
## _as_set
```python
from test_convert_builtin import _as_set
```



---
## test_sequence_types
```python
from test_convert_builtin import test_sequence_types
```



---
## test_nested_sequence_types
```python
from test_convert_builtin import test_nested_sequence_types
```



---
## test_sequence_boolean
```python
from test_convert_builtin import test_sequence_boolean
```



---
## test_sequence_numpy_boolean
```python
from test_convert_builtin import test_sequence_numpy_boolean
```



---
## test_sequence_mixed_numpy_python_bools
```python
from test_convert_builtin import test_sequence_mixed_numpy_python_bools
```



---
## test_empty_list
```python
from test_convert_builtin import test_empty_list
```



---
## test_nested_lists
```python
from test_convert_builtin import test_nested_lists
```



---
## test_nested_lists_with_explicit_type
```python
from test_convert_builtin import test_nested_lists_with_explicit_type
```



---
## test_list_with_non_list
```python
from test_convert_builtin import test_list_with_non_list
```



---
## test_nested_arrays
```python
from test_convert_builtin import test_nested_arrays
```



---
## test_nested_fixed_size_list
```python
from test_convert_builtin import test_nested_fixed_size_list
```



---
## test_sequence_all_none
```python
from test_convert_builtin import test_sequence_all_none
```



---
## test_sequence_integer
```python
from test_convert_builtin import test_sequence_integer
```



---
## test_sequence_integer_np_nan
```python
from test_convert_builtin import test_sequence_integer_np_nan
```



---
## test_sequence_integer_nested_np_nan
```python
from test_convert_builtin import test_sequence_integer_nested_np_nan
```



---
## test_sequence_integer_inferred
```python
from test_convert_builtin import test_sequence_integer_inferred
```



---
## test_sequence_numpy_integer
```python
from test_convert_builtin import test_sequence_numpy_integer
```



---
## test_sequence_numpy_integer_inferred
```python
from test_convert_builtin import test_sequence_numpy_integer_inferred
```



---
## test_sequence_custom_integers
```python
from test_convert_builtin import test_sequence_custom_integers
```



---
## test_broken_integers
```python
from test_convert_builtin import test_broken_integers
```



---
## test_numpy_scalars_mixed_type
```python
from test_convert_builtin import test_numpy_scalars_mixed_type
```



---
## test_uint64_max_convert
```python
from test_convert_builtin import test_uint64_max_convert
```



---
## test_signed_integer_overflow
```python
from test_convert_builtin import test_signed_integer_overflow
```



---
## test_unsigned_integer_overflow
```python
from test_convert_builtin import test_unsigned_integer_overflow
```



---
## test_integer_from_string_error
```python
from test_convert_builtin import test_integer_from_string_error
```



---
## test_convert_with_mask
```python
from test_convert_builtin import test_convert_with_mask
```



---
## test_garbage_collection
```python
from test_convert_builtin import test_garbage_collection
```



---
## test_sequence_double
```python
from test_convert_builtin import test_sequence_double
```



---
## test_double_auto_coerce_from_integer
```python
from test_convert_builtin import test_double_auto_coerce_from_integer
```



---
## test_double_integer_coerce_representable_range
```python
from test_convert_builtin import test_double_integer_coerce_representable_range
```



---
## test_float32_integer_coerce_representable_range
```python
from test_convert_builtin import test_float32_integer_coerce_representable_range
```



---
## test_mixed_sequence_errors
```python
from test_convert_builtin import test_mixed_sequence_errors
```



---
## test_sequence_numpy_double
```python
from test_convert_builtin import test_sequence_numpy_double
```



---
## test_ndarray_nested_numpy_double
```python
from test_convert_builtin import test_ndarray_nested_numpy_double
```



---
## test_nested_ndarray_in_object_array
```python
from test_convert_builtin import test_nested_ndarray_in_object_array
```



---
## test_multidimensional_ndarray_as_nested_list
```python
from test_convert_builtin import test_multidimensional_ndarray_as_nested_list
```



---
## test_list_array_from_object_ndarray
```python
from test_convert_builtin import test_list_array_from_object_ndarray
```



---
## test_nested_list_array_from_object_ndarray
```python
from test_convert_builtin import test_nested_list_array_from_object_ndarray
```



---
## test_array_ignore_nan_from_pandas
```python
from test_convert_builtin import test_array_ignore_nan_from_pandas
```



---
## test_nested_ndarray_different_dtypes
```python
from test_convert_builtin import test_nested_ndarray_different_dtypes
```



---
## test_sequence_unicode
```python
from test_convert_builtin import test_sequence_unicode
```



---
## test_sequence_unicode_explicit_type
```python
from test_convert_builtin import test_sequence_unicode_explicit_type
```



---
## check_array_mixed_unicode_bytes
```python
from test_convert_builtin import check_array_mixed_unicode_bytes
```



---
## test_array_mixed_unicode_bytes
```python
from test_convert_builtin import test_array_mixed_unicode_bytes
```



---
## test_large_binary_array
```python
from test_convert_builtin import test_large_binary_array
```



---
## test_large_binary_value
```python
from test_convert_builtin import test_large_binary_value
```



---
## test_string_too_large
```python
from test_convert_builtin import test_string_too_large
```



---
## test_sequence_bytes
```python
from test_convert_builtin import test_sequence_bytes
```



---
## test_sequence_utf8_to_unicode
```python
from test_convert_builtin import test_sequence_utf8_to_unicode
```



---
## test_sequence_fixed_size_bytes
```python
from test_convert_builtin import test_sequence_fixed_size_bytes
```



---
## test_fixed_size_bytes_does_not_accept_varying_lengths
```python
from test_convert_builtin import test_fixed_size_bytes_does_not_accept_varying_lengths
```



---
## test_fixed_size_binary_length_check
```python
from test_convert_builtin import test_fixed_size_binary_length_check
```



---
## test_sequence_date
```python
from test_convert_builtin import test_sequence_date
```



---
## test_sequence_explicit_types
```python
from test_convert_builtin import test_sequence_explicit_types
```



---
## test_date32_overflow
```python
from test_convert_builtin import test_date32_overflow
```



---
## test_sequence_time_with_timezone
```python
from test_convert_builtin import test_sequence_time_with_timezone
```



---
## test_sequence_timestamp
```python
from test_convert_builtin import test_sequence_timestamp
```



---
## test_sequence_timestamp_with_timezone
```python
from test_convert_builtin import test_sequence_timestamp_with_timezone
```



---
## test_pyarrow_ignore_timezone_environment_variable
```python
from test_convert_builtin import test_pyarrow_ignore_timezone_environment_variable
```



---
## test_sequence_timestamp_with_timezone_inference
```python
from test_convert_builtin import test_sequence_timestamp_with_timezone_inference
```



---
## test_sequence_timestamp_with_zoneinfo_timezone_inference
```python
from test_convert_builtin import test_sequence_timestamp_with_zoneinfo_timezone_inference
```



---
## test_sequence_timestamp_from_mixed_builtin_and_pandas_datetimes
```python
from test_convert_builtin import test_sequence_timestamp_from_mixed_builtin_and_pandas_datetimes
```



---
## test_sequence_timestamp_out_of_bounds_nanosecond
```python
from test_convert_builtin import test_sequence_timestamp_out_of_bounds_nanosecond
```



---
## test_sequence_numpy_timestamp
```python
from test_convert_builtin import test_sequence_numpy_timestamp
```



---
## MyDate
```python
from test_convert_builtin import MyDate
```



---
## MyDatetime
```python
from test_convert_builtin import MyDatetime
```



---
## MyTimedelta
```python
from test_convert_builtin import MyTimedelta
```



---
## test_datetime_subclassing
```python
from test_convert_builtin import test_datetime_subclassing
```



---
## test_sequence_timestamp_nanoseconds
```python
from test_convert_builtin import test_sequence_timestamp_nanoseconds
```



---
## test_sequence_timestamp_from_int_with_unit
```python
from test_convert_builtin import test_sequence_timestamp_from_int_with_unit
```



---
## test_sequence_duration
```python
from test_convert_builtin import test_sequence_duration
```



---
## test_sequence_duration_with_unit
```python
from test_convert_builtin import test_sequence_duration_with_unit
```



---
## test_sequence_duration_from_int_with_unit
```python
from test_convert_builtin import test_sequence_duration_from_int_with_unit
```



---
## test_sequence_duration_nested_lists
```python
from test_convert_builtin import test_sequence_duration_nested_lists
```



---
## test_sequence_duration_nested_lists_with_explicit_type
```python
from test_convert_builtin import test_sequence_duration_nested_lists_with_explicit_type
```



---
## test_sequence_duration_nested_lists_numpy
```python
from test_convert_builtin import test_sequence_duration_nested_lists_numpy
```



---
## test_sequence_nesting_levels
```python
from test_convert_builtin import test_sequence_nesting_levels
```



---
## test_sequence_mixed_types_fails
```python
from test_convert_builtin import test_sequence_mixed_types_fails
```



---
## test_sequence_mixed_types_with_specified_type_fails
```python
from test_convert_builtin import test_sequence_mixed_types_with_specified_type_fails
```



---
## test_sequence_decimal
```python
from test_convert_builtin import test_sequence_decimal
```



---
## test_sequence_decimal_different_precisions
```python
from test_convert_builtin import test_sequence_decimal_different_precisions
```



---
## test_sequence_decimal_no_scale
```python
from test_convert_builtin import test_sequence_decimal_no_scale
```



---
## test_sequence_decimal_negative
```python
from test_convert_builtin import test_sequence_decimal_negative
```



---
## test_sequence_decimal_no_whole_part
```python
from test_convert_builtin import test_sequence_decimal_no_whole_part
```



---
## test_sequence_decimal_large_integer
```python
from test_convert_builtin import test_sequence_decimal_large_integer
```



---
## test_sequence_decimal_from_integers
```python
from test_convert_builtin import test_sequence_decimal_from_integers
```



---
## test_sequence_decimal_too_high_precision
```python
from test_convert_builtin import test_sequence_decimal_too_high_precision
```



---
## test_sequence_decimal_infer
```python
from test_convert_builtin import test_sequence_decimal_infer
```



---
## test_sequence_decimal_infer_mixed
```python
from test_convert_builtin import test_sequence_decimal_infer_mixed
```



---
## test_sequence_decimal_given_type
```python
from test_convert_builtin import test_sequence_decimal_given_type
```



---
## test_range_types
```python
from test_convert_builtin import test_range_types
```



---
## test_empty_range
```python
from test_convert_builtin import test_empty_range
```



---
## test_structarray
```python
from test_convert_builtin import test_structarray
```



---
## test_struct_from_dicts
```python
from test_convert_builtin import test_struct_from_dicts
```



---
## test_struct_from_dicts_bytes_keys
```python
from test_convert_builtin import test_struct_from_dicts_bytes_keys
```



---
## test_struct_from_tuples
```python
from test_convert_builtin import test_struct_from_tuples
```



---
## test_struct_from_list_of_pairs
```python
from test_convert_builtin import test_struct_from_list_of_pairs
```



---
## test_struct_from_list_of_pairs_errors
```python
from test_convert_builtin import test_struct_from_list_of_pairs_errors
```



---
## test_struct_from_mixed_sequence
```python
from test_convert_builtin import test_struct_from_mixed_sequence
```



---
## test_struct_from_dicts_inference
```python
from test_convert_builtin import test_struct_from_dicts_inference
```



---
## test_structarray_from_arrays_coerce
```python
from test_convert_builtin import test_structarray_from_arrays_coerce
```



---
## test_decimal_array_with_none_and_nan
```python
from test_convert_builtin import test_decimal_array_with_none_and_nan
```



---
## test_map_from_dicts
```python
from test_convert_builtin import test_map_from_dicts
```



---
## test_map_from_tuples
```python
from test_convert_builtin import test_map_from_tuples
```



---
## test_dictionary_from_boolean
```python
from test_convert_builtin import test_dictionary_from_boolean
```



---
## test_dictionary_from_integers
```python
from test_convert_builtin import test_dictionary_from_integers
```



---
## test_dictionary_index_type
```python
from test_convert_builtin import test_dictionary_index_type
```



---
## test_dictionary_is_always_adaptive
```python
from test_convert_builtin import test_dictionary_is_always_adaptive
```



---
## test_dictionary_from_strings
```python
from test_convert_builtin import test_dictionary_from_strings
```



---
## test_duration_array_roundtrip_corner_cases
```python
from test_convert_builtin import test_duration_array_roundtrip_corner_cases
```



---
## test_roundtrip_nanosecond_resolution_pandas_temporal_objects
```python
from test_convert_builtin import test_roundtrip_nanosecond_resolution_pandas_temporal_objects
```



---
## test_array_to_pylist_roundtrip
```python
from test_convert_builtin import test_array_to_pylist_roundtrip
```



---
## test_auto_chunking_binary_like
```python
from test_convert_builtin import test_auto_chunking_binary_like
```



---
## test_auto_chunking_list_of_binary
```python
from test_convert_builtin import test_auto_chunking_list_of_binary
```



---
## test_auto_chunking_list_like
```python
from test_convert_builtin import test_auto_chunking_list_like
```



---
## test_auto_chunking_map_type
```python
from test_convert_builtin import test_auto_chunking_map_type
```



---
## test_nested_auto_chunking
```python
from test_convert_builtin import test_nested_auto_chunking
```



---
## test_array_from_pylist_data_overflow
```python
from test_convert_builtin import test_array_from_pylist_data_overflow
```



---
## test_array_from_pylist_offset_overflow
```python
from test_convert_builtin import test_array_from_pylist_offset_overflow
```



---
## test_array_accepts_pyarrow_scalar
```python
from test_convert_builtin import test_array_accepts_pyarrow_scalar
```



---
## test_array_accepts_pyarrow_scalar_errors
```python
from test_convert_builtin import test_array_accepts_pyarrow_scalar_errors
```



---
## __init__
```python
from test_convert_builtin import __init__
```



---
## __iter__
```python
from test_convert_builtin import __iter__
```



---
## __int__
```python
from test_convert_builtin import __int__
```



---
## __getitem__
```python
from test_convert_builtin import __getitem__
```



---
## expected_integer_value
```python
from test_convert_builtin import expected_integer_value
```



---
## expected_time_value
```python
from test_convert_builtin import expected_time_value
```



---
## tz
```python
from test_convert_builtin import tz
```



---
## expected_datetime_value
```python
from test_convert_builtin import expected_datetime_value
```



---
## CustomClass
```python
from test_convert_builtin import CustomClass
```



---
## test_get_include
```python
from test_misc import test_get_include
```



---
## test_get_library_dirs_win32
```python
from test_misc import test_get_library_dirs_win32
```



---
## test_cpu_count
```python
from test_misc import test_cpu_count
```



---
## test_io_thread_count
```python
from test_misc import test_io_thread_count
```



---
## test_env_var_io_thread_count
```python
from test_misc import test_env_var_io_thread_count
```



---
## test_build_info
```python
from test_misc import test_build_info
```



---
## test_runtime_info
```python
from test_misc import test_runtime_info
```



---
## test_import_at_shutdown
```python
from test_misc import test_import_at_shutdown
```



---
## test_set_timezone_db_path_non_windows
```python
from test_misc import test_set_timezone_db_path_non_windows
```



---
## test_extension_type_constructor_errors
```python
from test_misc import test_extension_type_constructor_errors
```



---
## run_with_env_var
```python
from test_misc import run_with_env_var
```



---
## __name__
```python
from arrow_39313 import __name__
```



---
## rc
```python
from arrow_39313 import rc
```



---
## __name__
```python
from arrow_16597 import __name__
```



---
## Server
```python
from arrow_16597 import Server
```



---
## do_put
```python
from arrow_16597 import do_put
```



---
## __name__
```python
from test_acero import __name__
```



---
## table_source
```python
from test_acero import table_source
```



---
## test_declaration
```python
from test_acero import test_declaration
```



---
## test_declaration_repr
```python
from test_acero import test_declaration_repr
```



---
## test_declaration_to_reader
```python
from test_acero import test_declaration_to_reader
```



---
## test_table_source
```python
from test_acero import test_table_source
```



---
## test_filter
```python
from test_acero import test_filter
```



---
## test_project
```python
from test_acero import test_project
```



---
## test_aggregate_scalar
```python
from test_acero import test_aggregate_scalar
```



---
## test_aggregate_hash
```python
from test_acero import test_aggregate_hash
```



---
## test_order_by
```python
from test_acero import test_order_by
```



---
## test_hash_join
```python
from test_acero import test_hash_join
```



---
## test_asof_join
```python
from test_acero import test_asof_join
```



---
## test_scan
```python
from test_acero import test_scan
```



---
## __name__
```python
from test_gandiva import __name__
```



---
## test_tree_exp_builder
```python
from test_gandiva import test_tree_exp_builder
```



---
## test_table
```python
from test_gandiva import test_table
```



---
## test_filter
```python
from test_gandiva import test_filter
```



---
## test_in_expr
```python
from test_gandiva import test_in_expr
```



---
## test_in_expr_todo
```python
from test_gandiva import test_in_expr_todo
```



---
## test_boolean
```python
from test_gandiva import test_boolean
```



---
## test_literals
```python
from test_gandiva import test_literals
```



---
## test_regex
```python
from test_gandiva import test_regex
```



---
## test_get_registered_function_signatures
```python
from test_gandiva import test_get_registered_function_signatures
```



---
## test_filter_project
```python
from test_gandiva import test_filter_project
```



---
## test_to_string
```python
from test_gandiva import test_to_string
```



---
## test_rejects_none
```python
from test_gandiva import test_rejects_none
```



---
## __name__
```python
from strategies import __name__
```



---
## fields
```python
from strategies import fields
```



---
## list_types
```python
from strategies import list_types
```



---
## struct_types
```python
from strategies import struct_types
```



---
## dictionary_types
```python
from strategies import dictionary_types
```



---
## map_types
```python
from strategies import map_types
```



---
## schemas
```python
from strategies import schemas
```



---
## _pylist
```python
from strategies import _pylist
```



---
## _pymap
```python
from strategies import _pymap
```



---
## arrays
```python
from strategies import arrays
```



---
## chunked_arrays
```python
from strategies import chunked_arrays
```



---
## record_batches
```python
from strategies import record_batches
```



---
## tables
```python
from strategies import tables
```



---
## pandas_compatible_list_types
```python
from strategies import pandas_compatible_list_types
```



---
## __name__
```python
from test_adhoc_memory_leak import __name__
```



---
## test_deserialize_pandas_arrow_7956
```python
from test_adhoc_memory_leak import test_deserialize_pandas_arrow_7956
```



---
## action
```python
from test_adhoc_memory_leak import action
```



---
## __name__
```python
from arrow_7980 import __name__
```



---
## randsign
```python
from util import randsign
```

Randomly choose either 1 or -1.

Returns
-------
sign : int

---
## random_seed
```python
from util import random_seed
```

Set the random seed inside of a context manager.

Parameters
----------
seed : int
    The seed to set

Notes
-----
This function is useful when you want to set a random seed but not affect
the random state of other functions using the random module.

---
## randdecimal
```python
from util import randdecimal
```

Generate a random decimal value with specified precision and scale.

Parameters
----------
precision : int
    The maximum number of digits to generate. Must be an integer between 1
    and 38 inclusive.
scale : int
    The maximum number of digits following the decimal point.  Must be an
    integer greater than or equal to 0.

Returns
-------
decimal_value : decimal.Decimal
    A random decimal.Decimal object with the specified precision and scale.

---
## random_ascii
```python
from util import random_ascii
```



---
## rands
```python
from util import rands
```

Generate one random string.

---
## make_dataframe
```python
from util import make_dataframe
```



---
## memory_leak_check
```python
from util import memory_leak_check
```

Execute the function and try to detect a clear memory leak either internal
to Arrow or caused by a reference counting problem in the Python binding
implementation. Raises exception if a leak detected

Parameters
----------
f : callable
    Function to invoke on each iteration
metric : {'rss', 'vms', 'shared'}, default 'rss'
    Attribute of psutil.Process.memory_info to use for determining current
    memory use
threshold : int, default 128K
    Threshold in number of bytes to consider a leak
iterations : int, default 10
    Total number of invocations of f
check_interval : int, default 1
    Number of invocations of f in between each memory use check

---
## get_modified_env_with_pythonpath
```python
from util import get_modified_env_with_pythonpath
```



---
## invoke_script
```python
from util import invoke_script
```



---
## changed_environ
```python
from util import changed_environ
```

Temporarily set environment variable *name* to *value*.

---
## change_cwd
```python
from util import change_cwd
```



---
## disabled_gc
```python
from util import disabled_gc
```



---
## _filesystem_uri
```python
from util import _filesystem_uri
```



---
## FSProtocolClass
```python
from util import FSProtocolClass
```



---
## ProxyHandler
```python
from util import ProxyHandler
```

A dataset handler that proxies to an underlying filesystem.  Useful
to partially wrap an existing filesystem with partial changes.

---
## get_raise_signal
```python
from util import get_raise_signal
```



---
## signal_wakeup_fd
```python
from util import signal_wakeup_fd
```



---
## _ensure_minio_component_version
```python
from util import _ensure_minio_component_version
```



---
## _wait_for_minio_startup
```python
from util import _wait_for_minio_startup
```



---
## _run_mc_command
```python
from util import _run_mc_command
```



---
## _configure_s3_limited_user
```python
from util import _configure_s3_limited_user
```

Attempts to use the mc command to configure the minio server
with a special user limited:limited123 which does not have
permission to create buckets.  This mirrors some real life S3
configurations where users are given strict permissions.

Arrow S3 operations should still work in such a configuration
(e.g. see ARROW-13685)

---
## windows_has_tzdata
```python
from util import windows_has_tzdata
```

This is the default location where tz.cpp will look for (until we make
this configurable at run-time)

---
## _get_use
```python
from util import _get_use
```



---
## _leak_check
```python
from util import _leak_check
```



---
## __fspath__
```python
from util import __fspath__
```



---
## __ne__
```python
from util import __ne__
```



---
## get_type_name
```python
from util import get_type_name
```



---
## normalize_path
```python
from util import normalize_path
```



---
## get_file_info
```python
from util import get_file_info
```



---
## get_file_info_selector
```python
from util import get_file_info_selector
```



---
## create_dir
```python
from util import create_dir
```



---
## delete_dir
```python
from util import delete_dir
```



---
## delete_dir_contents
```python
from util import delete_dir_contents
```



---
## delete_root_dir_contents
```python
from util import delete_root_dir_contents
```



---
## delete_file
```python
from util import delete_file
```



---
## move
```python
from util import move
```



---
## open_input_stream
```python
from util import open_input_stream
```



---
## open_input_file
```python
from util import open_input_file
```



---
## open_output_stream
```python
from util import open_output_stream
```



---
## open_append_stream
```python
from util import open_append_stream
```



---
## raise_signal
```python
from util import raise_signal
```



---
## datadir
```python
from test_orc import datadir
```



---
## fix_example_values
```python
from test_orc import fix_example_values
```

Fix type of expected values (as read from JSON) according to
actual ORC datatype.

---
## check_example_values
```python
from test_orc import check_example_values
```



---
## check_example_file
```python
from test_orc import check_example_file
```

Check a ORC file against the expected columns dictionary.

---
## test_example_using_json
```python
from test_orc import test_example_using_json
```

Check a ORC file example against the equivalent JSON file, as given
in the Apache ORC repository (the JSON file has one JSON object per
line, corresponding to one row in the ORC file).

---
## test_orcfile_empty
```python
from test_orc import test_orcfile_empty
```



---
## test_filesystem_uri
```python
from test_orc import test_filesystem_uri
```



---
## test_orcfile_readwrite
```python
from test_orc import test_orcfile_readwrite
```



---
## test_bytesio_readwrite
```python
from test_orc import test_bytesio_readwrite
```



---
## test_buffer_readwrite
```python
from test_orc import test_buffer_readwrite
```



---
## test_buffer_readwrite_with_writeoptions
```python
from test_orc import test_buffer_readwrite_with_writeoptions
```



---
## test_buffer_readwrite_with_bad_writeoptions
```python
from test_orc import test_buffer_readwrite_with_bad_writeoptions
```



---
## test_column_selection
```python
from test_orc import test_column_selection
```



---
## test_wrong_usage_orc_writer
```python
from test_orc import test_wrong_usage_orc_writer
```



---
## test_orc_writer_with_null_arrays
```python
from test_orc import test_orc_writer_with_null_arrays
```



---
## test_chunked_array_basics
```python
from test_table import test_chunked_array_basics
```



---
## test_chunked_array_construction
```python
from test_table import test_chunked_array_construction
```



---
## test_combine_chunks
```python
from test_table import test_combine_chunks
```



---
## test_chunked_array_can_combine_chunks_with_no_chunks
```python
from test_table import test_chunked_array_can_combine_chunks_with_no_chunks
```



---
## test_chunked_array_to_numpy
```python
from test_table import test_chunked_array_to_numpy
```



---
## test_chunked_array_mismatch_types
```python
from test_table import test_chunked_array_mismatch_types
```



---
## test_chunked_array_str
```python
from test_table import test_chunked_array_str
```



---
## test_chunked_array_getitem
```python
from test_table import test_chunked_array_getitem
```



---
## test_chunked_array_slice
```python
from test_table import test_chunked_array_slice
```



---
## test_chunked_array_iter
```python
from test_table import test_chunked_array_iter
```



---
## test_chunked_array_equals
```python
from test_table import test_chunked_array_equals
```



---
## test_chunked_array_pickle
```python
from test_table import test_chunked_array_pickle
```



---
## test_chunked_array_to_pandas
```python
from test_table import test_chunked_array_to_pandas
```



---
## test_chunked_array_to_pandas_preserve_name
```python
from test_table import test_chunked_array_to_pandas_preserve_name
```



---
## test_table_roundtrip_to_pandas_empty_dataframe
```python
from test_table import test_table_roundtrip_to_pandas_empty_dataframe
```



---
## test_recordbatch_roundtrip_to_pandas_empty_dataframe
```python
from test_table import test_recordbatch_roundtrip_to_pandas_empty_dataframe
```



---
## test_to_pandas_empty_table
```python
from test_table import test_to_pandas_empty_table
```



---
## test_chunked_array_asarray
```python
from test_table import test_chunked_array_asarray
```



---
## test_chunked_array_flatten
```python
from test_table import test_chunked_array_flatten
```



---
## test_chunked_array_unify_dictionaries
```python
from test_table import test_chunked_array_unify_dictionaries
```



---
## test_recordbatch_dunder_init
```python
from test_table import test_recordbatch_dunder_init
```



---
## test_chunked_array_c_array_interface
```python
from test_table import test_chunked_array_c_array_interface
```



---
## test_chunked_array_c_stream_interface
```python
from test_table import test_chunked_array_c_stream_interface
```



---
## BatchWrapper
```python
from test_table import BatchWrapper
```



---
## BatchDeviceWrapper
```python
from test_table import BatchDeviceWrapper
```



---
## test_recordbatch_c_array_interface
```python
from test_table import test_recordbatch_c_array_interface
```



---
## test_recordbatch_c_array_interface_device_unsupported_keyword
```python
from test_table import test_recordbatch_c_array_interface_device_unsupported_keyword
```



---
## test_table_c_array_interface
```python
from test_table import test_table_c_array_interface
```



---
## test_table_c_stream_interface
```python
from test_table import test_table_c_stream_interface
```



---
## test_recordbatch_itercolumns
```python
from test_table import test_recordbatch_itercolumns
```



---
## test_recordbatch_equals
```python
from test_table import test_recordbatch_equals
```



---
## test_recordbatch_take
```python
from test_table import test_recordbatch_take
```



---
## test_recordbatch_column_sets_private_name
```python
from test_table import test_recordbatch_column_sets_private_name
```



---
## test_recordbatch_from_arrays_validate_schema
```python
from test_table import test_recordbatch_from_arrays_validate_schema
```



---
## test_recordbatch_from_arrays_validate_lengths
```python
from test_table import test_recordbatch_from_arrays_validate_lengths
```



---
## test_recordbatch_no_fields
```python
from test_table import test_recordbatch_no_fields
```



---
## test_recordbatch_from_arrays_invalid_names
```python
from test_table import test_recordbatch_from_arrays_invalid_names
```



---
## test_recordbatch_empty_metadata
```python
from test_table import test_recordbatch_empty_metadata
```



---
## test_recordbatch_pickle
```python
from test_table import test_recordbatch_pickle
```



---
## test_recordbatch_get_field
```python
from test_table import test_recordbatch_get_field
```



---
## test_recordbatch_select_column
```python
from test_table import test_recordbatch_select_column
```



---
## test_recordbatch_select
```python
from test_table import test_recordbatch_select
```



---
## test_recordbatch_from_struct_array_invalid
```python
from test_table import test_recordbatch_from_struct_array_invalid
```



---
## test_recordbatch_from_struct_array
```python
from test_table import test_recordbatch_from_struct_array
```



---
## test_recordbatch_to_struct_array
```python
from test_table import test_recordbatch_to_struct_array
```



---
## test_table_from_struct_array_invalid
```python
from test_table import test_table_from_struct_array_invalid
```



---
## test_table_from_struct_array
```python
from test_table import test_table_from_struct_array
```



---
## test_table_from_struct_array_chunked_array
```python
from test_table import test_table_from_struct_array_chunked_array
```



---
## test_table_to_struct_array
```python
from test_table import test_table_to_struct_array
```



---
## test_table_to_struct_array_with_max_chunksize
```python
from test_table import test_table_to_struct_array_with_max_chunksize
```



---
## check_tensors
```python
from test_table import check_tensors
```



---
## test_recordbatch_to_tensor_uniform_type
```python
from test_table import test_recordbatch_to_tensor_uniform_type
```



---
## test_recordbatch_to_tensor_uniform_float_16
```python
from test_table import test_recordbatch_to_tensor_uniform_float_16
```



---
## test_recordbatch_to_tensor_mixed_type
```python
from test_table import test_recordbatch_to_tensor_mixed_type
```



---
## test_recordbatch_to_tensor_unsupported_mixed_type_with_float16
```python
from test_table import test_recordbatch_to_tensor_unsupported_mixed_type_with_float16
```



---
## test_recordbatch_to_tensor_nan
```python
from test_table import test_recordbatch_to_tensor_nan
```



---
## test_recordbatch_to_tensor_null
```python
from test_table import test_recordbatch_to_tensor_null
```



---
## test_recordbatch_to_tensor_empty
```python
from test_table import test_recordbatch_to_tensor_empty
```



---
## test_recordbatch_to_tensor_unsupported
```python
from test_table import test_recordbatch_to_tensor_unsupported
```



---
## _table_like_slice_tests
```python
from test_table import _table_like_slice_tests
```



---
## test_recordbatch_slice_getitem
```python
from test_table import test_recordbatch_slice_getitem
```



---
## test_table_slice_getitem
```python
from test_table import test_table_slice_getitem
```



---
## test_slice_zero_length_table
```python
from test_table import test_slice_zero_length_table
```



---
## test_recordbatchlist_schema_equals
```python
from test_table import test_recordbatchlist_schema_equals
```



---
## test_table_column_sets_private_name
```python
from test_table import test_table_column_sets_private_name
```



---
## test_table_equals
```python
from test_table import test_table_equals
```



---
## test_table_from_batches_and_schema
```python
from test_table import test_table_from_batches_and_schema
```



---
## test_table_to_batches
```python
from test_table import test_table_to_batches
```



---
## test_table_basics
```python
from test_table import test_table_basics
```



---
## test_table_dunder_init
```python
from test_table import test_table_dunder_init
```



---
## test_table_from_arrays_preserves_column_metadata
```python
from test_table import test_table_from_arrays_preserves_column_metadata
```



---
## test_table_from_arrays_invalid_names
```python
from test_table import test_table_from_arrays_invalid_names
```



---
## test_table_from_lists
```python
from test_table import test_table_from_lists
```



---
## test_table_pickle
```python
from test_table import test_table_pickle
```



---
## test_table_get_field
```python
from test_table import test_table_get_field
```



---
## test_table_select_column
```python
from test_table import test_table_select_column
```



---
## test_table_column_with_duplicates
```python
from test_table import test_table_column_with_duplicates
```



---
## test_table_add_column
```python
from test_table import test_table_add_column
```



---
## test_table_set_column
```python
from test_table import test_table_set_column
```



---
## test_table_drop_columns
```python
from test_table import test_table_drop_columns
```

drop one or more columns given labels

---
## test_table_drop
```python
from test_table import test_table_drop
```

verify the alias of drop_columns is working

---
## test_table_remove_column
```python
from test_table import test_table_remove_column
```



---
## test_table_remove_column_empty
```python
from test_table import test_table_remove_column_empty
```



---
## test_empty_table_with_names
```python
from test_table import test_empty_table_with_names
```



---
## test_empty_table
```python
from test_table import test_empty_table
```



---
## test_table_rename_columns
```python
from test_table import test_table_rename_columns
```



---
## test_table_rename_columns_mapping
```python
from test_table import test_table_rename_columns_mapping
```



---
## test_table_flatten
```python
from test_table import test_table_flatten
```



---
## test_table_combine_chunks
```python
from test_table import test_table_combine_chunks
```



---
## test_table_unify_dictionaries
```python
from test_table import test_table_unify_dictionaries
```



---
## test_concat_tables
```python
from test_table import test_concat_tables
```



---
## test_concat_tables_permissive
```python
from test_table import test_concat_tables_permissive
```



---
## test_concat_tables_invalid_option
```python
from test_table import test_concat_tables_invalid_option
```



---
## test_concat_tables_none_table
```python
from test_table import test_concat_tables_none_table
```



---
## test_concat_tables_with_different_schema_metadata
```python
from test_table import test_concat_tables_with_different_schema_metadata
```



---
## test_concat_tables_with_promote_option
```python
from test_table import test_concat_tables_with_promote_option
```



---
## test_concat_tables_with_promotion
```python
from test_table import test_concat_tables_with_promotion
```



---
## test_concat_tables_with_promotion_error
```python
from test_table import test_concat_tables_with_promotion_error
```



---
## test_table_negative_indexing
```python
from test_table import test_table_negative_indexing
```



---
## test_table_cast_to_incompatible_schema
```python
from test_table import test_table_cast_to_incompatible_schema
```



---
## test_table_safe_casting
```python
from test_table import test_table_safe_casting
```



---
## test_table_unsafe_casting
```python
from test_table import test_table_unsafe_casting
```



---
## test_invalid_table_construct
```python
from test_table import test_invalid_table_construct
```



---
## test_from_arrays_schema
```python
from test_table import test_from_arrays_schema
```



---
## test_table_from_pydict
```python
from test_table import test_table_from_pydict
```



---
## test_table_from_pydict_arrow_arrays
```python
from test_table import test_table_from_pydict_arrow_arrays
```



---
## test_table_from_pydict_schema
```python
from test_table import test_table_from_pydict_schema
```



---
## test_table_from_pylist
```python
from test_table import test_table_from_pylist
```



---
## test_table_from_pandas_schema
```python
from test_table import test_table_from_pandas_schema
```



---
## test_table_factory_function
```python
from test_table import test_table_factory_function
```



---
## test_table_factory_function_args
```python
from test_table import test_table_factory_function_args
```



---
## test_table_factory_function_args_pandas
```python
from test_table import test_table_factory_function_args_pandas
```



---
## test_factory_functions_invalid_input
```python
from test_table import test_factory_functions_invalid_input
```



---
## test_table_repr_to_string
```python
from test_table import test_table_repr_to_string
```



---
## test_table_repr_to_string_ellipsis
```python
from test_table import test_table_repr_to_string_ellipsis
```



---
## test_record_batch_repr_to_string
```python
from test_table import test_record_batch_repr_to_string
```



---
## test_record_batch_repr_to_string_ellipsis
```python
from test_table import test_record_batch_repr_to_string_ellipsis
```



---
## test_table_function_unicode_schema
```python
from test_table import test_table_function_unicode_schema
```



---
## test_table_take_vanilla_functionality
```python
from test_table import test_table_take_vanilla_functionality
```



---
## test_table_take_null_index
```python
from test_table import test_table_take_null_index
```



---
## test_table_take_non_consecutive
```python
from test_table import test_table_take_non_consecutive
```



---
## test_table_select
```python
from test_table import test_table_select
```



---
## test_table_group_by
```python
from test_table import test_table_group_by
```



---
## test_table_group_by_first
```python
from test_table import test_table_group_by_first
```



---
## test_table_to_recordbatchreader
```python
from test_table import test_table_to_recordbatchreader
```



---
## test_table_join
```python
from test_table import test_table_join
```



---
## test_table_join_unique_key
```python
from test_table import test_table_join_unique_key
```



---
## test_table_join_collisions
```python
from test_table import test_table_join_collisions
```



---
## test_table_filter_expression
```python
from test_table import test_table_filter_expression
```



---
## test_table_filter_expression_chunks
```python
from test_table import test_table_filter_expression_chunks
```



---
## test_table_join_many_columns
```python
from test_table import test_table_join_many_columns
```



---
## test_table_join_asof
```python
from test_table import test_table_join_asof
```



---
## test_table_join_asof_multiple_by
```python
from test_table import test_table_join_asof_multiple_by
```



---
## test_table_join_asof_empty_by
```python
from test_table import test_table_join_asof_empty_by
```



---
## test_table_join_asof_collisions
```python
from test_table import test_table_join_asof_collisions
```



---
## test_table_join_asof_by_length_mismatch
```python
from test_table import test_table_join_asof_by_length_mismatch
```



---
## test_table_join_asof_by_type_mismatch
```python
from test_table import test_table_join_asof_by_type_mismatch
```



---
## test_table_join_asof_on_type_mismatch
```python
from test_table import test_table_join_asof_on_type_mismatch
```



---
## test_table_cast_invalid
```python
from test_table import test_table_cast_invalid
```



---
## test_table_sort_by
```python
from test_table import test_table_sort_by
```



---
## test_numpy_asarray
```python
from test_table import test_numpy_asarray
```



---
## test_numpy_array_protocol
```python
from test_table import test_numpy_array_protocol
```



---
## test_invalid_non_join_column
```python
from test_table import test_invalid_non_join_column
```



---
## eq
```python
from test_table import eq
```



---
## ne
```python
from test_table import ne
```



---
## ArrayWrapper
```python
from test_table import ArrayWrapper
```



---
## ChunkedArrayWrapper
```python
from test_table import ChunkedArrayWrapper
```



---
## __arrow_c_array__
```python
from test_table import __arrow_c_array__
```



---
## __arrow_c_device_array__
```python
from test_table import __arrow_c_device_array__
```



---
## StreamWrapper
```python
from test_table import StreamWrapper
```



---
## sorted_by_keys
```python
from test_table import sorted_by_keys
```



---
## __arrow_c_stream__
```python
from test_table import __arrow_c_stream__
```



---
## test_total_bytes_allocated
```python
from test_array import test_total_bytes_allocated
```



---
## test_weakref
```python
from test_array import test_weakref
```



---
## test_getitem_NULL
```python
from test_array import test_getitem_NULL
```



---
## test_constructor_raises
```python
from test_array import test_constructor_raises
```



---
## test_list_format
```python
from test_array import test_list_format
```



---
## test_string_format
```python
from test_array import test_string_format
```



---
## test_long_array_format
```python
from test_array import test_long_array_format
```



---
## test_indented_string_format
```python
from test_array import test_indented_string_format
```



---
## test_top_level_indented_string_format
```python
from test_array import test_top_level_indented_string_format
```



---
## test_binary_format
```python
from test_array import test_binary_format
```



---
## test_binary_total_values_length
```python
from test_array import test_binary_total_values_length
```



---
## test_to_numpy_zero_copy
```python
from test_array import test_to_numpy_zero_copy
```



---
## test_chunked_array_to_numpy_zero_copy
```python
from test_array import test_chunked_array_to_numpy_zero_copy
```



---
## test_to_numpy_unsupported_types
```python
from test_array import test_to_numpy_unsupported_types
```



---
## test_to_numpy_writable
```python
from test_array import test_to_numpy_writable
```



---
## test_to_numpy_datetime64
```python
from test_array import test_to_numpy_datetime64
```



---
## test_to_numpy_timedelta64
```python
from test_array import test_to_numpy_timedelta64
```



---
## test_to_numpy_dictionary
```python
from test_array import test_to_numpy_dictionary
```



---
## test_to_pandas_zero_copy
```python
from test_array import test_to_pandas_zero_copy
```



---
## test_asarray
```python
from test_array import test_asarray
```



---
## test_nulls
```python
from test_array import test_nulls
```



---
## test_array_from_scalar
```python
from test_array import test_array_from_scalar
```



---
## test_array_from_dictionary_scalar
```python
from test_array import test_array_from_dictionary_scalar
```



---
## test_array_getitem
```python
from test_array import test_array_getitem
```



---
## test_array_slice
```python
from test_array import test_array_slice
```



---
## test_array_slice_negative_step
```python
from test_array import test_array_slice_negative_step
```



---
## test_array_diff
```python
from test_array import test_array_diff
```



---
## test_array_iter
```python
from test_array import test_array_iter
```



---
## test_struct_array_slice
```python
from test_array import test_struct_array_slice
```



---
## test_array_factory_invalid_type
```python
from test_array import test_array_factory_invalid_type
```



---
## test_array_ref_to_ndarray_base
```python
from test_array import test_array_ref_to_ndarray_base
```



---
## test_array_eq
```python
from test_array import test_array_eq
```



---
## test_array_from_buffers
```python
from test_array import test_array_from_buffers
```



---
## test_string_binary_from_buffers
```python
from test_array import test_string_binary_from_buffers
```



---
## test_list_from_buffers
```python
from test_array import test_list_from_buffers
```



---
## test_struct_from_buffers
```python
from test_array import test_struct_from_buffers
```



---
## test_struct_from_arrays
```python
from test_array import test_struct_from_arrays
```



---
## test_struct_array_from_chunked
```python
from test_array import test_struct_array_from_chunked
```



---
## test_dictionary_from_buffers
```python
from test_array import test_dictionary_from_buffers
```



---
## test_dictionary_from_numpy
```python
from test_array import test_dictionary_from_numpy
```



---
## test_dictionary_to_numpy
```python
from test_array import test_dictionary_to_numpy
```



---
## test_dictionary_from_boxed_arrays
```python
from test_array import test_dictionary_from_boxed_arrays
```



---
## test_dictionary_from_arrays_boundscheck
```python
from test_array import test_dictionary_from_arrays_boundscheck
```



---
## test_dictionary_indices
```python
from test_array import test_dictionary_indices
```



---
## test_list_from_arrays
```python
from test_array import test_list_from_arrays
```



---
## test_list_array_types_from_arrays
```python
from test_array import test_list_array_types_from_arrays
```



---
## test_list_array_types_from_arrays_fail
```python
from test_array import test_list_array_types_from_arrays_fail
```



---
## test_map_cast
```python
from test_array import test_map_cast
```



---
## test_map_labelled
```python
from test_array import test_map_labelled
```



---
## test_map_from_dict
```python
from test_array import test_map_from_dict
```



---
## test_map_from_arrays
```python
from test_array import test_map_from_arrays
```



---
## test_fixed_size_list_from_arrays
```python
from test_array import test_fixed_size_list_from_arrays
```



---
## test_variable_list_from_arrays
```python
from test_array import test_variable_list_from_arrays
```



---
## test_union_from_dense
```python
from test_array import test_union_from_dense
```



---
## test_union_from_sparse
```python
from test_array import test_union_from_sparse
```



---
## test_union_array_to_pylist_with_nulls
```python
from test_array import test_union_array_to_pylist_with_nulls
```



---
## test_union_array_slice
```python
from test_array import test_union_array_slice
```



---
## _check_cast_case
```python
from test_array import _check_cast_case
```



---
## test_cast_integers_safe
```python
from test_array import test_cast_integers_safe
```



---
## test_cast_none
```python
from test_array import test_cast_none
```



---
## test_cast_list_to_primitive
```python
from test_array import test_cast_list_to_primitive
```



---
## test_slice_chunked_array_zero_chunks
```python
from test_array import test_slice_chunked_array_zero_chunks
```



---
## test_cast_chunked_array
```python
from test_array import test_cast_chunked_array
```



---
## test_cast_chunked_array_empty
```python
from test_array import test_cast_chunked_array_empty
```



---
## test_chunked_array_data_warns
```python
from test_array import test_chunked_array_data_warns
```



---
## test_cast_integers_unsafe
```python
from test_array import test_cast_integers_unsafe
```



---
## test_floating_point_truncate_safe
```python
from test_array import test_floating_point_truncate_safe
```



---
## test_floating_point_truncate_unsafe
```python
from test_array import test_floating_point_truncate_unsafe
```



---
## test_decimal_to_int_safe
```python
from test_array import test_decimal_to_int_safe
```



---
## test_decimal_to_int_value_out_of_bounds
```python
from test_array import test_decimal_to_int_value_out_of_bounds
```



---
## test_decimal_to_int_non_integer
```python
from test_array import test_decimal_to_int_non_integer
```



---
## test_decimal_to_decimal
```python
from test_array import test_decimal_to_decimal
```



---
## test_safe_cast_nan_to_int_raises
```python
from test_array import test_safe_cast_nan_to_int_raises
```



---
## test_cast_signed_to_unsigned
```python
from test_array import test_cast_signed_to_unsigned
```



---
## test_cast_from_null
```python
from test_array import test_cast_from_null
```



---
## test_cast_string_to_number_roundtrip
```python
from test_array import test_cast_string_to_number_roundtrip
```



---
## test_cast_dictionary
```python
from test_array import test_cast_dictionary
```



---
## test_view
```python
from test_array import test_view
```



---
## test_unique_simple
```python
from test_array import test_unique_simple
```



---
## test_value_counts_simple
```python
from test_array import test_value_counts_simple
```



---
## test_unique_value_counts_dictionary_type
```python
from test_array import test_unique_value_counts_dictionary_type
```



---
## test_dictionary_encode_simple
```python
from test_array import test_dictionary_encode_simple
```



---
## test_dictionary_encode_sliced
```python
from test_array import test_dictionary_encode_sliced
```



---
## test_dictionary_encode_zero_length
```python
from test_array import test_dictionary_encode_zero_length
```



---
## test_dictionary_decode
```python
from test_array import test_dictionary_decode
```



---
## test_cast_time32_to_int
```python
from test_array import test_cast_time32_to_int
```



---
## test_cast_time64_to_int
```python
from test_array import test_cast_time64_to_int
```



---
## test_cast_timestamp_to_int
```python
from test_array import test_cast_timestamp_to_int
```



---
## test_cast_date32_to_int
```python
from test_array import test_cast_date32_to_int
```



---
## test_cast_duration_to_int
```python
from test_array import test_cast_duration_to_int
```



---
## test_cast_binary_to_utf8
```python
from test_array import test_cast_binary_to_utf8
```



---
## test_cast_date64_to_int
```python
from test_array import test_cast_date64_to_int
```



---
## test_date64_from_builtin_datetime
```python
from test_array import test_date64_from_builtin_datetime
```



---
## test_cast_identities
```python
from test_array import test_cast_identities
```



---
## test_array_pickle
```python
from test_array import test_array_pickle
```



---
## test_array_pickle_dictionary
```python
from test_array import test_array_pickle_dictionary
```



---
## test_pickling
```python
from test_array import test_pickling
```



---
## test_array_pickle_protocol5
```python
from test_array import test_array_pickle_protocol5
```



---
## test_to_numpy_roundtrip
```python
from test_array import test_to_numpy_roundtrip
```



---
## test_array_uint64_from_py_over_range
```python
from test_array import test_array_uint64_from_py_over_range
```



---
## test_array_conversions_no_sentinel_values
```python
from test_array import test_array_conversions_no_sentinel_values
```



---
## test_time32_time64_from_integer
```python
from test_array import test_time32_time64_from_integer
```



---
## test_binary_string_pandas_null_sentinels
```python
from test_array import test_binary_string_pandas_null_sentinels
```



---
## test_pandas_null_sentinels_raise_error
```python
from test_array import test_pandas_null_sentinels_raise_error
```



---
## test_pandas_null_sentinels_index
```python
from test_array import test_pandas_null_sentinels_index
```



---
## test_array_roundtrip_from_numpy_datetimeD
```python
from test_array import test_array_roundtrip_from_numpy_datetimeD
```



---
## test_array_from_naive_datetimes
```python
from test_array import test_array_from_naive_datetimes
```



---
## test_array_from_numpy_datetime
```python
from test_array import test_array_from_numpy_datetime
```



---
## test_array_from_different_numpy_datetime_units_raises
```python
from test_array import test_array_from_different_numpy_datetime_units_raises
```



---
## test_array_from_list_of_timestamps
```python
from test_array import test_array_from_list_of_timestamps
```



---
## test_array_from_timestamp_with_generic_unit
```python
from test_array import test_array_from_timestamp_with_generic_unit
```



---
## test_array_from_numpy_timedelta
```python
from test_array import test_array_from_numpy_timedelta
```



---
## test_array_from_numpy_timedelta_incorrect_unit
```python
from test_array import test_array_from_numpy_timedelta_incorrect_unit
```



---
## test_array_from_numpy_ascii
```python
from test_array import test_array_from_numpy_ascii
```



---
## test_interval_array_from_timedelta
```python
from test_array import test_interval_array_from_timedelta
```



---
## test_interval_array_from_relativedelta
```python
from test_array import test_interval_array_from_relativedelta
```



---
## test_interval_array_from_tuple
```python
from test_array import test_interval_array_from_tuple
```



---
## test_interval_array_from_dateoffset
```python
from test_array import test_interval_array_from_dateoffset
```



---
## test_array_from_numpy_unicode
```python
from test_array import test_array_from_numpy_unicode
```



---
## test_array_string_from_non_string
```python
from test_array import test_array_string_from_non_string
```



---
## test_array_string_from_all_null
```python
from test_array import test_array_string_from_all_null
```



---
## test_array_from_masked
```python
from test_array import test_array_from_masked
```



---
## test_array_from_shrunken_masked
```python
from test_array import test_array_from_shrunken_masked
```



---
## test_array_from_invalid_dim_raises
```python
from test_array import test_array_from_invalid_dim_raises
```



---
## test_array_from_strided_bool
```python
from test_array import test_array_from_strided_bool
```



---
## test_array_from_strided
```python
from test_array import test_array_from_strided
```



---
## test_boolean_true_count_false_count
```python
from test_array import test_boolean_true_count_false_count
```



---
## test_buffers_primitive
```python
from test_array import test_buffers_primitive
```



---
## test_buffers_nested
```python
from test_array import test_buffers_nested
```



---
## test_total_buffer_size
```python
from test_array import test_total_buffer_size
```



---
## test_nbytes_size
```python
from test_array import test_nbytes_size
```



---
## test_invalid_tensor_constructor_repr
```python
from test_array import test_invalid_tensor_constructor_repr
```



---
## test_invalid_tensor_construction
```python
from test_array import test_invalid_tensor_construction
```



---
## test_list_array_flatten
```python
from test_array import test_list_array_flatten
```



---
## test_list_value_parent_indices
```python
from test_array import test_list_value_parent_indices
```



---
## test_list_value_lengths
```python
from test_array import test_list_value_lengths
```



---
## test_list_array_flatten_non_canonical
```python
from test_array import test_list_array_flatten_non_canonical
```



---
## test_list_array_values_offsets_sliced
```python
from test_array import test_list_array_values_offsets_sliced
```



---
## test_fixed_size_list_array_flatten
```python
from test_array import test_fixed_size_list_array_flatten
```



---
## test_fixed_size_list_array_flatten_with_slice
```python
from test_array import test_fixed_size_list_array_flatten_with_slice
```



---
## test_map_array_values_offsets
```python
from test_array import test_map_array_values_offsets
```



---
## test_struct_array_flatten
```python
from test_array import test_struct_array_flatten
```



---
## test_struct_array_field
```python
from test_array import test_struct_array_field
```



---
## test_struct_array_flattened_field
```python
from test_array import test_struct_array_flattened_field
```



---
## test_empty_cast
```python
from test_array import test_empty_cast
```



---
## test_nested_dictionary_array
```python
from test_array import test_nested_dictionary_array
```



---
## test_array_from_numpy_str_utf8
```python
from test_array import test_array_from_numpy_str_utf8
```



---
## test_numpy_binary_overflow_to_chunked
```python
from test_array import test_numpy_binary_overflow_to_chunked
```



---
## test_list_child_overflow_to_chunked
```python
from test_array import test_list_child_overflow_to_chunked
```



---
## test_infer_type_masked
```python
from test_array import test_infer_type_masked
```



---
## test_array_masked
```python
from test_array import test_array_masked
```



---
## test_array_supported_masks
```python
from test_array import test_array_supported_masks
```



---
## test_array_supported_pandas_masks
```python
from test_array import test_array_supported_pandas_masks
```



---
## test_binary_array_masked
```python
from test_array import test_binary_array_masked
```



---
## test_binary_array_strided
```python
from test_array import test_binary_array_strided
```



---
## test_array_invalid_mask_raises
```python
from test_array import test_array_invalid_mask_raises
```



---
## test_array_from_large_pyints
```python
from test_array import test_array_from_large_pyints
```



---
## test_numpy_array_protocol
```python
from test_array import test_numpy_array_protocol
```



---
## test_array_protocol
```python
from test_array import test_array_protocol
```



---
## ArrayWrapper
```python
from test_array import ArrayWrapper
```



---
## ArrayDeviceWrapper
```python
from test_array import ArrayDeviceWrapper
```



---
## test_c_array_protocol
```python
from test_array import test_c_array_protocol
```



---
## test_c_array_protocol_device_unsupported_keyword
```python
from test_array import test_c_array_protocol_device_unsupported_keyword
```



---
## test_concat_array
```python
from test_array import test_concat_array
```



---
## test_concat_array_different_types
```python
from test_array import test_concat_array_different_types
```



---
## test_concat_array_invalid_type
```python
from test_array import test_concat_array_invalid_type
```



---
## test_to_pandas_timezone
```python
from test_array import test_to_pandas_timezone
```



---
## test_to_pandas_float16_list
```python
from test_array import test_to_pandas_float16_list
```



---
## test_array_sort
```python
from test_array import test_array_sort
```



---
## test_struct_array_sort
```python
from test_array import test_struct_array_sort
```



---
## test_array_accepts_pyarrow_array
```python
from test_array import test_array_accepts_pyarrow_array
```



---
## check_run_end_encoded
```python
from test_array import check_run_end_encoded
```



---
## check_run_end_encoded_from_arrays_with_type
```python
from test_array import check_run_end_encoded_from_arrays_with_type
```



---
## check_run_end_encoded_from_typed_arrays
```python
from test_array import check_run_end_encoded_from_typed_arrays
```



---
## test_run_end_encoded_from_arrays
```python
from test_array import test_run_end_encoded_from_arrays
```



---
## test_run_end_encoded_from_buffers
```python
from test_array import test_run_end_encoded_from_buffers
```



---
## test_run_end_encoded_from_array_with_type
```python
from test_array import test_run_end_encoded_from_array_with_type
```



---
## test_run_end_encoded_to_numpy
```python
from test_array import test_run_end_encoded_to_numpy
```



---
## test_run_end_encoded_to_pandas
```python
from test_array import test_run_end_encoded_to_pandas
```



---
## test_list_view_from_arrays
```python
from test_array import test_list_view_from_arrays
```



---
## test_list_view_from_arrays_fails
```python
from test_array import test_list_view_from_arrays_fails
```



---
## test_list_view_flatten
```python
from test_array import test_list_view_flatten
```



---
## test_list_view_slice
```python
from test_array import test_list_view_slice
```



---
## test_swapped_byte_order_fails
```python
from test_array import test_swapped_byte_order_fails
```



---
## test_non_cpu_array
```python
from test_array import test_non_cpu_array
```



---
## MyObject
```python
from test_array import MyObject
```



---
## check_result
```python
from test_array import check_result
```



---
## _check_case
```python
from test_array import _check_case
```



---
## MyArray
```python
from test_array import MyArray
```



---
## MyArrayInvalid
```python
from test_array import MyArrayInvalid
```



---
## MyArray2
```python
from test_array import MyArray2
```



---
## MyArray3
```python
from test_array import MyArray3
```



---
## __init__
```python
from test_array import __init__
```



---
## __arrow_c_array__
```python
from test_array import __arrow_c_array__
```



---
## __arrow_c_device_array__
```python
from test_array import __arrow_c_device_array__
```



---
## __arrow_array__
```python
from test_array import __arrow_array__
```



---
## check_large_seeks
```python
from test_io import check_large_seeks
```



---
## assert_file_not_found
```python
from test_io import assert_file_not_found
```



---
## test_python_file_write
```python
from test_io import test_python_file_write
```



---
## test_python_file_read
```python
from test_io import test_python_file_read
```



---
## test_python_file_get_stream
```python
from test_io import test_python_file_get_stream
```



---
## test_python_file_read_at
```python
from test_io import test_python_file_read_at
```



---
## test_python_file_readall
```python
from test_io import test_python_file_readall
```



---
## test_python_file_readinto
```python
from test_io import test_python_file_readinto
```



---
## test_python_file_read_buffer
```python
from test_io import test_python_file_read_buffer
```



---
## test_python_file_correct_abc
```python
from test_io import test_python_file_correct_abc
```



---
## test_python_file_iterable
```python
from test_io import test_python_file_iterable
```



---
## test_python_file_large_seeks
```python
from test_io import test_python_file_large_seeks
```



---
## test_bytes_reader
```python
from test_io import test_bytes_reader
```



---
## test_bytes_reader_non_bytes
```python
from test_io import test_bytes_reader_non_bytes
```



---
## test_bytes_reader_retains_parent_reference
```python
from test_io import test_bytes_reader_retains_parent_reference
```



---
## test_python_file_implicit_mode
```python
from test_io import test_python_file_implicit_mode
```



---
## test_python_file_writelines
```python
from test_io import test_python_file_writelines
```



---
## test_python_file_closing
```python
from test_io import test_python_file_closing
```



---
## check_buffer_pickling
```python
from test_io import check_buffer_pickling
```



---
## test_buffer_bytes
```python
from test_io import test_buffer_bytes
```



---
## test_buffer_null_data
```python
from test_io import test_buffer_null_data
```



---
## test_buffer_memoryview
```python
from test_io import test_buffer_memoryview
```



---
## test_buffer_bytearray
```python
from test_io import test_buffer_bytearray
```



---
## test_buffer_invalid
```python
from test_io import test_buffer_invalid
```



---
## test_buffer_weakref
```python
from test_io import test_buffer_weakref
```



---
## test_buffer_hex
```python
from test_io import test_buffer_hex
```



---
## test_buffer_to_numpy
```python
from test_io import test_buffer_to_numpy
```



---
## test_buffer_from_numpy
```python
from test_io import test_buffer_from_numpy
```



---
## test_buffer_address
```python
from test_io import test_buffer_address
```



---
## test_buffer_equals
```python
from test_io import test_buffer_equals
```



---
## test_buffer_eq_bytes
```python
from test_io import test_buffer_eq_bytes
```



---
## test_buffer_getitem
```python
from test_io import test_buffer_getitem
```



---
## test_buffer_slicing
```python
from test_io import test_buffer_slicing
```



---
## test_buffer_hashing
```python
from test_io import test_buffer_hashing
```



---
## test_buffer_protocol_respects_immutability
```python
from test_io import test_buffer_protocol_respects_immutability
```



---
## test_foreign_buffer
```python
from test_io import test_foreign_buffer
```



---
## test_allocate_buffer
```python
from test_io import test_allocate_buffer
```



---
## test_allocate_buffer_resizable
```python
from test_io import test_allocate_buffer_resizable
```



---
## test_non_cpu_buffer
```python
from test_io import test_non_cpu_buffer
```



---
## test_cache_options
```python
from test_io import test_cache_options
```



---
## test_cache_options_pickling
```python
from test_io import test_cache_options_pickling
```



---
## test_compress_decompress
```python
from test_io import test_compress_decompress
```



---
## test_compression_level
```python
from test_io import test_compression_level
```



---
## test_buffer_memoryview_is_immutable
```python
from test_io import test_buffer_memoryview_is_immutable
```



---
## test_uninitialized_buffer
```python
from test_io import test_uninitialized_buffer
```



---
## test_memory_output_stream
```python
from test_io import test_memory_output_stream
```



---
## test_inmemory_write_after_closed
```python
from test_io import test_inmemory_write_after_closed
```



---
## test_buffer_protocol_ref_counting
```python
from test_io import test_buffer_protocol_ref_counting
```



---
## test_nativefile_write_memoryview
```python
from test_io import test_nativefile_write_memoryview
```



---
## test_mock_output_stream
```python
from test_io import test_mock_output_stream
```



---
## sample_disk_data
```python
from test_io import sample_disk_data
```



---
## _check_native_file_reader
```python
from test_io import _check_native_file_reader
```



---
## test_memory_map_reader
```python
from test_io import test_memory_map_reader
```



---
## test_memory_map_retain_buffer_reference
```python
from test_io import test_memory_map_retain_buffer_reference
```



---
## test_os_file_reader
```python
from test_io import test_os_file_reader
```



---
## test_os_file_large_seeks
```python
from test_io import test_os_file_large_seeks
```



---
## _try_delete
```python
from test_io import _try_delete
```



---
## test_memory_map_writer
```python
from test_io import test_memory_map_writer
```



---
## test_memory_map_resize
```python
from test_io import test_memory_map_resize
```



---
## test_memory_zero_length
```python
from test_io import test_memory_zero_length
```



---
## test_memory_map_large_seeks
```python
from test_io import test_memory_map_large_seeks
```



---
## test_memory_map_close_remove
```python
from test_io import test_memory_map_close_remove
```



---
## test_memory_map_deref_remove
```python
from test_io import test_memory_map_deref_remove
```



---
## test_os_file_writer
```python
from test_io import test_os_file_writer
```



---
## test_native_file_write_reject_unicode
```python
from test_io import test_native_file_write_reject_unicode
```



---
## test_native_file_modes
```python
from test_io import test_native_file_modes
```



---
## test_native_file_permissions
```python
from test_io import test_native_file_permissions
```



---
## test_native_file_raises_ValueError_after_close
```python
from test_io import test_native_file_raises_ValueError_after_close
```



---
## test_native_file_TextIOWrapper
```python
from test_io import test_native_file_TextIOWrapper
```



---
## test_native_file_TextIOWrapper_perf
```python
from test_io import test_native_file_TextIOWrapper_perf
```



---
## test_native_file_read1
```python
from test_io import test_native_file_read1
```



---
## test_native_file_pandas_text_reader
```python
from test_io import test_native_file_pandas_text_reader
```



---
## test_native_file_open_error
```python
from test_io import test_native_file_open_error
```



---
## test_buffered_input_stream
```python
from test_io import test_buffered_input_stream
```



---
## test_buffered_input_stream_detach_seekable
```python
from test_io import test_buffered_input_stream_detach_seekable
```



---
## test_buffered_input_stream_detach_non_seekable
```python
from test_io import test_buffered_input_stream_detach_non_seekable
```



---
## test_buffered_output_stream
```python
from test_io import test_buffered_output_stream
```



---
## test_buffered_output_stream_detach
```python
from test_io import test_buffered_output_stream_detach
```



---
## check_compressed_input
```python
from test_io import check_compressed_input
```



---
## test_compressed_input_gzip
```python
from test_io import test_compressed_input_gzip
```



---
## test_compressed_input_bz2
```python
from test_io import test_compressed_input_bz2
```



---
## test_compressed_input_openfile
```python
from test_io import test_compressed_input_openfile
```



---
## check_compressed_concatenated
```python
from test_io import check_compressed_concatenated
```



---
## test_compressed_concatenated_gzip
```python
from test_io import test_compressed_concatenated_gzip
```



---
## test_compressed_input_invalid
```python
from test_io import test_compressed_input_invalid
```



---
## make_compressed_output
```python
from test_io import make_compressed_output
```



---
## test_compressed_output_gzip
```python
from test_io import test_compressed_output_gzip
```



---
## test_compressed_output_bz2
```python
from test_io import test_compressed_output_bz2
```



---
## test_output_stream_constructor
```python
from test_io import test_output_stream_constructor
```



---
## test_compression_detection
```python
from test_io import test_compression_detection
```



---
## test_unknown_compression_raises
```python
from test_io import test_unknown_compression_raises
```



---
## test_compressed_roundtrip
```python
from test_io import test_compressed_roundtrip
```



---
## test_compressed_recordbatch_stream
```python
from test_io import test_compressed_recordbatch_stream
```



---
## check_transcoding
```python
from test_io import check_transcoding
```



---
## test_transcoding_input_stream
```python
from test_io import test_transcoding_input_stream
```



---
## test_transcoding_no_ops
```python
from test_io import test_transcoding_no_ops
```



---
## test_transcoding_encoding_error
```python
from test_io import test_transcoding_encoding_error
```



---
## test_transcoding_decoding_error
```python
from test_io import test_transcoding_decoding_error
```



---
## test_input_stream_buffer
```python
from test_io import test_input_stream_buffer
```



---
## test_input_stream_duck_typing
```python
from test_io import test_input_stream_duck_typing
```



---
## test_input_stream_file_path
```python
from test_io import test_input_stream_file_path
```



---
## test_input_stream_file_path_compressed
```python
from test_io import test_input_stream_file_path_compressed
```



---
## test_input_stream_file_path_buffered
```python
from test_io import test_input_stream_file_path_buffered
```



---
## test_input_stream_file_path_compressed_and_buffered
```python
from test_io import test_input_stream_file_path_compressed_and_buffered
```



---
## test_input_stream_python_file
```python
from test_io import test_input_stream_python_file
```



---
## test_input_stream_native_file
```python
from test_io import test_input_stream_native_file
```



---
## test_input_stream_errors
```python
from test_io import test_input_stream_errors
```



---
## test_output_stream_buffer
```python
from test_io import test_output_stream_buffer
```



---
## test_output_stream_duck_typing
```python
from test_io import test_output_stream_duck_typing
```



---
## test_output_stream_file_path
```python
from test_io import test_output_stream_file_path
```



---
## test_output_stream_file_path_compressed
```python
from test_io import test_output_stream_file_path_compressed
```



---
## test_output_stream_file_path_buffered
```python
from test_io import test_output_stream_file_path_buffered
```



---
## test_output_stream_file_path_compressed_and_buffered
```python
from test_io import test_output_stream_file_path_compressed_and_buffered
```



---
## test_output_stream_destructor
```python
from test_io import test_output_stream_destructor
```



---
## test_output_stream_python_file
```python
from test_io import test_output_stream_python_file
```



---
## test_output_stream_errors
```python
from test_io import test_output_stream_errors
```



---
## DuckReader
```python
from test_io import DuckReader
```



---
## factory
```python
from test_io import factory
```



---
## get_buffer
```python
from test_io import get_buffer
```



---
## eq
```python
from test_io import eq
```



---
## ne
```python
from test_io import ne
```



---
## make_buffer
```python
from test_io import make_buffer
```



---
## teardown
```python
from test_io import teardown
```



---
## DuckWriter
```python
from test_io import DuckWriter
```



---
## check_data
```python
from test_io import check_data
```



---
## close
```python
from test_io import close
```



---
## closed
```python
from test_io import closed
```



---
## read_buffer
```python
from test_io import read_buffer
```



---
## func_a
```python
from test_util import func_a
```

This is the {method} method.

It computes {operation}.

---
## func_b
```python
from test_util import func_b
```



---
## func_c
```python
from test_util import func_c
```

Examples
--------

>>> func_c()
C

---
## func_d
```python
from test_util import func_d
```



---
## func_e
```python
from test_util import func_e
```



---
## func_f
```python
from test_util import func_f
```

This is the {method} method.

{{ We can escape curly braces like this. }}

Examples
--------
We should replace curly brace usage in doctests.

>>> dict(x = "x", y = "y")
>>> set((1, 2, 3))

---
## test_docstring_formatting
```python
from test_util import test_docstring_formatting
```



---
## test_docstring_concatenation
```python
from test_util import test_docstring_concatenation
```



---
## test_docstring_append
```python
from test_util import test_docstring_append
```



---
## test_docstring_template_from_callable
```python
from test_util import test_docstring_template_from_callable
```



---
## test_inherit_docstring_template_from_callable
```python
from test_util import test_inherit_docstring_template_from_callable
```



---
## test_escaping_in_docstring
```python
from test_util import test_escaping_in_docstring
```



---
## exhibit_signal_refcycle
```python
from test_util import exhibit_signal_refcycle
```



---
## test_signal_refcycle
```python
from test_util import test_signal_refcycle
```



---
## test_download_tzdata_on_windows
```python
from test_util import test_download_tzdata_on_windows
```



---
## __name__
```python
from test_cuda_numba_interop import __name__
```



---
## setup_module
```python
from test_cuda_numba_interop import setup_module
```



---
## teardown_module
```python
from test_cuda_numba_interop import teardown_module
```



---
## test_context
```python
from test_cuda_numba_interop import test_context
```



---
## make_random_buffer
```python
from test_cuda_numba_interop import make_random_buffer
```

Return a host or device buffer with random data.
    

---
## test_from_object
```python
from test_cuda_numba_interop import test_from_object
```



---
## test_numba_memalloc
```python
from test_cuda_numba_interop import test_numba_memalloc
```



---
## test_pyarrow_memalloc
```python
from test_cuda_numba_interop import test_pyarrow_memalloc
```



---
## test_numba_context
```python
from test_cuda_numba_interop import test_numba_context
```



---
## test_pyarrow_jit
```python
from test_cuda_numba_interop import test_pyarrow_jit
```



---
## MyObj
```python
from test_cuda_numba_interop import MyObj
```



---
## increment_by_one
```python
from test_cuda_numba_interop import increment_by_one
```



---
## __init__
```python
from test_cuda_numba_interop import __init__
```



---
## __cuda_array_interface__
```python
from test_cuda_numba_interop import __cuda_array_interface__
```



---
## __name__
```python
from test_cpp_internals import __name__
```



---
## inject_cpp_tests
```python
from test_cpp_internals import inject_cpp_tests
```

Inject C++ tests as Python functions into namespace `ns` (a dict).

---
## test_pyarrow_include
```python
from test_cpp_internals import test_pyarrow_include
```



---
## wrapper
```python
from test_cpp_internals import wrapper
```



---
## __name__
```python
from test_cffi import __name__
```



---
## PyCapsule_IsValid
```python
from test_cffi import PyCapsule_IsValid
```



---
## registered_extension_type
```python
from test_cffi import registered_extension_type
```



---
## ParamExtType
```python
from test_cffi import ParamExtType
```



---
## make_schema
```python
from test_cffi import make_schema
```



---
## make_extension_schema
```python
from test_cffi import make_extension_schema
```



---
## make_extension_storage_schema
```python
from test_cffi import make_extension_storage_schema
```



---
## make_batch
```python
from test_cffi import make_batch
```



---
## make_extension_batch
```python
from test_cffi import make_extension_batch
```



---
## make_batches
```python
from test_cffi import make_batches
```



---
## make_serialized
```python
from test_cffi import make_serialized
```



---
## test_export_import_type
```python
from test_cffi import test_export_import_type
```



---
## test_export_import_field
```python
from test_cffi import test_export_import_field
```



---
## check_export_import_array
```python
from test_cffi import check_export_import_array
```



---
## test_export_import_array
```python
from test_cffi import test_export_import_array
```



---
## test_export_import_device_array
```python
from test_cffi import test_export_import_device_array
```



---
## check_export_import_schema
```python
from test_cffi import check_export_import_schema
```



---
## test_export_import_schema
```python
from test_cffi import test_export_import_schema
```



---
## test_export_import_schema_with_extension
```python
from test_cffi import test_export_import_schema_with_extension
```



---
## test_export_import_schema_float_pointer
```python
from test_cffi import test_export_import_schema_float_pointer
```



---
## check_export_import_batch
```python
from test_cffi import check_export_import_batch
```



---
## test_export_import_batch
```python
from test_cffi import test_export_import_batch
```



---
## test_export_import_batch_with_extension
```python
from test_cffi import test_export_import_batch_with_extension
```



---
## test_export_import_device_batch
```python
from test_cffi import test_export_import_device_batch
```



---
## _export_import_batch_reader
```python
from test_cffi import _export_import_batch_reader
```



---
## make_ipc_stream_reader
```python
from test_cffi import make_ipc_stream_reader
```



---
## make_py_record_batch_reader
```python
from test_cffi import make_py_record_batch_reader
```



---
## test_export_import_batch_reader
```python
from test_cffi import test_export_import_batch_reader
```



---
## test_export_import_exception_reader
```python
from test_cffi import test_export_import_exception_reader
```



---
## test_imported_batch_reader_error
```python
from test_cffi import test_imported_batch_reader_error
```



---
## test_roundtrip_schema_capsule
```python
from test_cffi import test_roundtrip_schema_capsule
```



---
## test_roundtrip_array_capsule
```python
from test_cffi import test_roundtrip_array_capsule
```



---
## test_roundtrip_device_array_capsule
```python
from test_cffi import test_roundtrip_device_array_capsule
```



---
## test_roundtrip_reader_capsule
```python
from test_cffi import test_roundtrip_reader_capsule
```



---
## test_roundtrip_batch_reader_capsule_requested_schema
```python
from test_cffi import test_roundtrip_batch_reader_capsule_requested_schema
```



---
## test_roundtrip_batch_reader_capsule
```python
from test_cffi import test_roundtrip_batch_reader_capsule
```



---
## test_roundtrip_chunked_array_capsule
```python
from test_cffi import test_roundtrip_chunked_array_capsule
```



---
## test_roundtrip_chunked_array_capsule_requested_schema
```python
from test_cffi import test_roundtrip_chunked_array_capsule_requested_schema
```



---
## test_import_device_no_cuda
```python
from test_cffi import test_import_device_no_cuda
```



---
## __init__
```python
from test_cffi import __init__
```



---
## width
```python
from test_cffi import width
```



---
## __arrow_ext_serialize__
```python
from test_cffi import __arrow_ext_serialize__
```



---
## __arrow_ext_deserialize__
```python
from test_cffi import __arrow_ext_deserialize__
```



---
## gen
```python
from test_cffi import gen
```



---
## __name__
```python
from test_schema import __name__
```



---
## test_schema_constructor_errors
```python
from test_schema import test_schema_constructor_errors
```



---
## test_type_integers
```python
from test_schema import test_type_integers
```



---
## test_type_to_pandas_dtype
```python
from test_schema import test_type_to_pandas_dtype
```



---
## test_type_to_pandas_dtype_check_import
```python
from test_schema import test_type_to_pandas_dtype_check_import
```



---
## test_type_list
```python
from test_schema import test_type_list
```



---
## test_type_comparisons
```python
from test_schema import test_type_comparisons
```



---
## test_type_for_alias
```python
from test_schema import test_type_for_alias
```



---
## test_type_string
```python
from test_schema import test_type_string
```



---
## test_type_timestamp_with_tz
```python
from test_schema import test_type_timestamp_with_tz
```



---
## test_time_types
```python
from test_schema import test_time_types
```



---
## test_from_numpy_dtype
```python
from test_schema import test_from_numpy_dtype
```



---
## test_schema
```python
from test_schema import test_schema
```



---
## test_schema_weakref
```python
from test_schema import test_schema_weakref
```



---
## test_schema_to_string_with_metadata
```python
from test_schema import test_schema_to_string_with_metadata
```



---
## test_schema_from_tuples
```python
from test_schema import test_schema_from_tuples
```



---
## test_schema_from_mapping
```python
from test_schema import test_schema_from_mapping
```



---
## test_schema_duplicate_fields
```python
from test_schema import test_schema_duplicate_fields
```



---
## test_field_flatten
```python
from test_schema import test_field_flatten
```



---
## test_schema_add_remove_metadata
```python
from test_schema import test_schema_add_remove_metadata
```



---
## test_schema_equals
```python
from test_schema import test_schema_equals
```



---
## test_schema_equals_propagates_check_metadata
```python
from test_schema import test_schema_equals_propagates_check_metadata
```



---
## test_schema_equals_invalid_type
```python
from test_schema import test_schema_equals_invalid_type
```



---
## test_schema_equality_operators
```python
from test_schema import test_schema_equality_operators
```



---
## test_schema_get_fields
```python
from test_schema import test_schema_get_fields
```



---
## test_schema_negative_indexing
```python
from test_schema import test_schema_negative_indexing
```



---
## test_schema_repr_with_dictionaries
```python
from test_schema import test_schema_repr_with_dictionaries
```



---
## test_type_schema_pickling
```python
from test_schema import test_type_schema_pickling
```



---
## test_empty_table
```python
from test_schema import test_empty_table
```



---
## test_schema_from_pandas
```python
from test_schema import test_schema_from_pandas
```



---
## test_schema_sizeof
```python
from test_schema import test_schema_sizeof
```



---
## test_schema_merge
```python
from test_schema import test_schema_merge
```



---
## test_undecodable_metadata
```python
from test_schema import test_undecodable_metadata
```



---
## __name__
```python
from test_jvm import __name__
```



---
## root_allocator
```python
from test_jvm import root_allocator
```



---
## test_jvm_buffer
```python
from test_jvm import test_jvm_buffer
```



---
## test_jvm_buffer_released
```python
from test_jvm import test_jvm_buffer_released
```



---
## _jvm_field
```python
from test_jvm import _jvm_field
```



---
## _jvm_schema
```python
from test_jvm import _jvm_schema
```



---
## test_jvm_types
```python
from test_jvm import test_jvm_types
```



---
## test_jvm_array
```python
from test_jvm import test_jvm_array
```



---
## test_jvm_array_empty
```python
from test_jvm import test_jvm_array_empty
```



---
## test_jvm_record_batch
```python
from test_jvm import test_jvm_record_batch
```



---
## _string_to_varchar_holder
```python
from test_jvm import _string_to_varchar_holder
```



---
## test_jvm_string_array
```python
from test_jvm import test_jvm_string_array
```



---
## __name__
```python
from test_fs import __name__
```



---
## DummyHandler
```python
from test_fs import DummyHandler
```



---
## localfs
```python
from test_fs import localfs
```



---
## py_localfs
```python
from test_fs import py_localfs
```



---
## mockfs
```python
from test_fs import mockfs
```



---
## py_mockfs
```python
from test_fs import py_mockfs
```



---
## localfs_with_mmap
```python
from test_fs import localfs_with_mmap
```



---
## subtree_localfs
```python
from test_fs import subtree_localfs
```



---
## gcsfs
```python
from test_fs import gcsfs
```



---
## s3fs
```python
from test_fs import s3fs
```



---
## subtree_s3fs
```python
from test_fs import subtree_s3fs
```



---
## azurefs
```python
from test_fs import azurefs
```



---
## hdfs
```python
from test_fs import hdfs
```



---
## py_fsspec_localfs
```python
from test_fs import py_fsspec_localfs
```



---
## py_fsspec_memoryfs
```python
from test_fs import py_fsspec_memoryfs
```



---
## py_fsspec_s3fs
```python
from test_fs import py_fsspec_s3fs
```



---
## filesystem_config
```python
from test_fs import filesystem_config
```



---
## fs
```python
from test_fs import fs
```



---
## pathfn
```python
from test_fs import pathfn
```



---
## allow_move_dir
```python
from test_fs import allow_move_dir
```



---
## allow_append_to_file
```python
from test_fs import allow_append_to_file
```



---
## check_mtime
```python
from test_fs import check_mtime
```



---
## check_mtime_absent
```python
from test_fs import check_mtime_absent
```



---
## check_mtime_or_absent
```python
from test_fs import check_mtime_or_absent
```



---
## skip_fsspec_s3fs
```python
from test_fs import skip_fsspec_s3fs
```



---
## skip_azure
```python
from test_fs import skip_azure
```



---
## test_s3fs_limited_permissions_create_bucket
```python
from test_fs import test_s3fs_limited_permissions_create_bucket
```



---
## test_file_info_constructor
```python
from test_fs import test_file_info_constructor
```



---
## test_cannot_instantiate_base_filesystem
```python
from test_fs import test_cannot_instantiate_base_filesystem
```



---
## test_filesystem_equals
```python
from test_fs import test_filesystem_equals
```



---
## test_filesystem_equals_none
```python
from test_fs import test_filesystem_equals_none
```



---
## test_subtree_filesystem
```python
from test_fs import test_subtree_filesystem
```



---
## test_filesystem_pickling
```python
from test_fs import test_filesystem_pickling
```



---
## test_filesystem_is_functional_after_pickling
```python
from test_fs import test_filesystem_is_functional_after_pickling
```



---
## test_type_name
```python
from test_fs import test_type_name
```



---
## test_normalize_path
```python
from test_fs import test_normalize_path
```



---
## test_non_path_like_input_raises
```python
from test_fs import test_non_path_like_input_raises
```



---
## test_get_file_info
```python
from test_fs import test_get_file_info
```



---
## test_get_file_info_with_selector
```python
from test_fs import test_get_file_info_with_selector
```



---
## test_create_dir
```python
from test_fs import test_create_dir
```



---
## test_delete_dir
```python
from test_fs import test_delete_dir
```



---
## test_delete_dir_with_explicit_subdir
```python
from test_fs import test_delete_dir_with_explicit_subdir
```



---
## test_delete_dir_contents
```python
from test_fs import test_delete_dir_contents
```



---
## _check_root_dir_contents
```python
from test_fs import _check_root_dir_contents
```



---
## test_delete_root_dir_contents
```python
from test_fs import test_delete_root_dir_contents
```



---
## test_copy_file
```python
from test_fs import test_copy_file
```



---
## test_move_directory
```python
from test_fs import test_move_directory
```



---
## test_move_file
```python
from test_fs import test_move_file
```



---
## test_delete_file
```python
from test_fs import test_delete_file
```



---
## identity
```python
from test_fs import identity
```



---
## test_open_input_stream
```python
from test_fs import test_open_input_stream
```



---
## test_open_input_file
```python
from test_fs import test_open_input_file
```



---
## test_open_input_stream_not_found
```python
from test_fs import test_open_input_stream_not_found
```



---
## test_open_output_stream
```python
from test_fs import test_open_output_stream
```



---
## test_open_append_stream
```python
from test_fs import test_open_append_stream
```



---
## test_open_output_stream_metadata
```python
from test_fs import test_open_output_stream_metadata
```



---
## test_localfs_options
```python
from test_fs import test_localfs_options
```



---
## test_localfs_errors
```python
from test_fs import test_localfs_errors
```



---
## test_localfs_file_info
```python
from test_fs import test_localfs_file_info
```



---
## test_mockfs_mtime_roundtrip
```python
from test_fs import test_mockfs_mtime_roundtrip
```



---
## test_gcs_options
```python
from test_fs import test_gcs_options
```



---
## test_s3_options
```python
from test_fs import test_s3_options
```



---
## test_s3_proxy_options
```python
from test_fs import test_s3_proxy_options
```



---
## test_s3fs_wrong_region
```python
from test_fs import test_s3fs_wrong_region
```



---
## test_azurefs_options
```python
from test_fs import test_azurefs_options
```



---
## test_hdfs_options
```python
from test_fs import test_hdfs_options
```



---
## test_filesystem_from_uri
```python
from test_fs import test_filesystem_from_uri
```



---
## test_filesystem_from_path_object
```python
from test_fs import test_filesystem_from_path_object
```



---
## test_filesystem_from_uri_s3
```python
from test_fs import test_filesystem_from_uri_s3
```



---
## test_filesystem_from_uri_gcs
```python
from test_fs import test_filesystem_from_uri_gcs
```



---
## test_py_filesystem
```python
from test_fs import test_py_filesystem
```



---
## test_py_filesystem_equality
```python
from test_fs import test_py_filesystem_equality
```



---
## test_py_filesystem_pickling
```python
from test_fs import test_py_filesystem_pickling
```



---
## test_py_filesystem_lifetime
```python
from test_fs import test_py_filesystem_lifetime
```



---
## test_py_filesystem_get_file_info
```python
from test_fs import test_py_filesystem_get_file_info
```



---
## test_py_filesystem_get_file_info_selector
```python
from test_fs import test_py_filesystem_get_file_info_selector
```



---
## test_py_filesystem_ops
```python
from test_fs import test_py_filesystem_ops
```



---
## test_py_open_input_stream
```python
from test_fs import test_py_open_input_stream
```



---
## test_py_open_input_file
```python
from test_fs import test_py_open_input_file
```



---
## test_py_open_output_stream
```python
from test_fs import test_py_open_output_stream
```



---
## test_py_open_append_stream
```python
from test_fs import test_py_open_append_stream
```



---
## test_s3_real_aws
```python
from test_fs import test_s3_real_aws
```



---
## test_s3_real_aws_region_selection
```python
from test_fs import test_s3_real_aws_region_selection
```



---
## test_resolve_s3_region
```python
from test_fs import test_resolve_s3_region
```



---
## test_copy_files
```python
from test_fs import test_copy_files
```



---
## test_copy_files_directory
```python
from test_fs import test_copy_files_directory
```



---
## test_s3_finalize
```python
from test_fs import test_s3_finalize
```



---
## test_s3_finalize_region_resolver
```python
from test_fs import test_s3_finalize_region_resolver
```



---
## test_concurrent_s3fs_init
```python
from test_fs import test_concurrent_s3fs_init
```



---
## __init__
```python
from test_fs import __init__
```



---
## __eq__
```python
from test_fs import __eq__
```



---
## __ne__
```python
from test_fs import __ne__
```



---
## get_type_name
```python
from test_fs import get_type_name
```



---
## normalize_path
```python
from test_fs import normalize_path
```



---
## get_file_info
```python
from test_fs import get_file_info
```



---
## get_file_info_selector
```python
from test_fs import get_file_info_selector
```



---
## create_dir
```python
from test_fs import create_dir
```



---
## delete_dir
```python
from test_fs import delete_dir
```



---
## delete_dir_contents
```python
from test_fs import delete_dir_contents
```



---
## delete_root_dir_contents
```python
from test_fs import delete_root_dir_contents
```



---
## delete_file
```python
from test_fs import delete_file
```



---
## move
```python
from test_fs import move
```



---
## copy_file
```python
from test_fs import copy_file
```



---
## open_input_stream
```python
from test_fs import open_input_stream
```



---
## open_input_file
```python
from test_fs import open_input_file
```



---
## open_output_stream
```python
from test_fs import open_output_stream
```



---
## open_append_stream
```python
from test_fs import open_append_stream
```



---
## Path
```python
from test_fs import Path
```



---
## check_copied_files
```python
from test_fs import check_copied_files
```



---
## __name__
```python
from test_udf import __name__
```



---
## mock_udf_context
```python
from test_udf import mock_udf_context
```



---
## MyError
```python
from test_udf import MyError
```



---
## sum_agg_func_fixture
```python
from test_udf import sum_agg_func_fixture
```

Register a unary aggregate function (mean)

---
## exception_agg_func_fixture
```python
from test_udf import exception_agg_func_fixture
```



---
## wrong_output_dtype_agg_func_fixture
```python
from test_udf import wrong_output_dtype_agg_func_fixture
```



---
## wrong_output_type_agg_func_fixture
```python
from test_udf import wrong_output_type_agg_func_fixture
```



---
## binary_func_fixture
```python
from test_udf import binary_func_fixture
```

Register a binary scalar function.

---
## ternary_func_fixture
```python
from test_udf import ternary_func_fixture
```

Register a ternary scalar function.

---
## varargs_func_fixture
```python
from test_udf import varargs_func_fixture
```

Register a varargs scalar function with at least two arguments.

---
## nullary_func_fixture
```python
from test_udf import nullary_func_fixture
```

Register a nullary scalar function.

---
## wrong_output_type_func_fixture
```python
from test_udf import wrong_output_type_func_fixture
```

Register a scalar function which returns something that is neither
a Arrow scalar or array.

---
## wrong_output_datatype_func_fixture
```python
from test_udf import wrong_output_datatype_func_fixture
```

Register a scalar function whose actual output DataType doesn't
match the declared output DataType.

---
## wrong_signature_func_fixture
```python
from test_udf import wrong_signature_func_fixture
```

Register a scalar function with the wrong signature.

---
## raising_func_fixture
```python
from test_udf import raising_func_fixture
```

Register a scalar function which raises a custom exception.

---
## unary_vector_func_fixture
```python
from test_udf import unary_vector_func_fixture
```

Register a vector function

---
## struct_vector_func_fixture
```python
from test_udf import struct_vector_func_fixture
```

Register a vector function that returns a struct array

---
## check_scalar_function
```python
from test_udf import check_scalar_function
```



---
## test_udf_array_unary
```python
from test_udf import test_udf_array_unary
```



---
## test_udf_array_binary
```python
from test_udf import test_udf_array_binary
```



---
## test_udf_array_ternary
```python
from test_udf import test_udf_array_ternary
```



---
## test_udf_array_varargs
```python
from test_udf import test_udf_array_varargs
```



---
## test_registration_errors
```python
from test_udf import test_registration_errors
```



---
## test_varargs_function_validation
```python
from test_udf import test_varargs_function_validation
```



---
## test_function_doc_validation
```python
from test_udf import test_function_doc_validation
```



---
## test_nullary_function
```python
from test_udf import test_nullary_function
```



---
## test_wrong_output_type
```python
from test_udf import test_wrong_output_type
```



---
## test_wrong_output_datatype
```python
from test_udf import test_wrong_output_datatype
```



---
## test_wrong_signature
```python
from test_udf import test_wrong_signature
```



---
## test_wrong_datatype_declaration
```python
from test_udf import test_wrong_datatype_declaration
```



---
## test_wrong_input_type_declaration
```python
from test_udf import test_wrong_input_type_declaration
```



---
## test_scalar_udf_context
```python
from test_udf import test_scalar_udf_context
```



---
## test_raising_func
```python
from test_udf import test_raising_func
```



---
## test_scalar_input
```python
from test_udf import test_scalar_input
```



---
## test_input_lifetime
```python
from test_udf import test_input_lifetime
```



---
## _record_batch_from_iters
```python
from test_udf import _record_batch_from_iters
```



---
## _record_batch_for_range
```python
from test_udf import _record_batch_for_range
```



---
## make_udt_func
```python
from test_udf import make_udt_func
```



---
## datasource1_direct
```python
from test_udf import datasource1_direct
```

A short dataset

---
## datasource1_generator
```python
from test_udf import datasource1_generator
```



---
## datasource1_exception
```python
from test_udf import datasource1_exception
```



---
## datasource1_schema
```python
from test_udf import datasource1_schema
```



---
## datasource1_args
```python
from test_udf import datasource1_args
```



---
## _test_datasource1_udt
```python
from test_udf import _test_datasource1_udt
```



---
## test_udt_datasource1_direct
```python
from test_udf import test_udt_datasource1_direct
```



---
## test_udt_datasource1_generator
```python
from test_udf import test_udt_datasource1_generator
```



---
## test_udt_datasource1_exception
```python
from test_udf import test_udt_datasource1_exception
```



---
## test_scalar_agg_basic
```python
from test_udf import test_scalar_agg_basic
```



---
## test_scalar_agg_empty
```python
from test_udf import test_scalar_agg_empty
```



---
## test_scalar_agg_wrong_output_dtype
```python
from test_udf import test_scalar_agg_wrong_output_dtype
```



---
## test_scalar_agg_wrong_output_type
```python
from test_udf import test_scalar_agg_wrong_output_type
```



---
## test_scalar_agg_varargs
```python
from test_udf import test_scalar_agg_varargs
```



---
## test_scalar_agg_exception
```python
from test_udf import test_scalar_agg_exception
```



---
## test_hash_agg_basic
```python
from test_udf import test_hash_agg_basic
```



---
## test_hash_agg_empty
```python
from test_udf import test_hash_agg_empty
```



---
## test_hash_agg_wrong_output_dtype
```python
from test_udf import test_hash_agg_wrong_output_dtype
```



---
## test_hash_agg_wrong_output_type
```python
from test_udf import test_hash_agg_wrong_output_type
```



---
## test_hash_agg_exception
```python
from test_udf import test_hash_agg_exception
```



---
## test_hash_agg_random
```python
from test_udf import test_hash_agg_random
```

Test hash aggregate udf with randomly sampled data

---
## test_vector_basic
```python
from test_udf import test_vector_basic
```



---
## test_vector_empty
```python
from test_udf import test_vector_empty
```



---
## test_vector_struct
```python
from test_udf import test_vector_struct
```



---
## func
```python
from test_udf import func
```



---
## binary_function
```python
from test_udf import binary_function
```



---
## ternary_function
```python
from test_udf import ternary_function
```



---
## varargs_function
```python
from test_udf import varargs_function
```



---
## nullary_func
```python
from test_udf import nullary_func
```



---
## wrong_output_type
```python
from test_udf import wrong_output_type
```



---
## wrong_output_datatype
```python
from test_udf import wrong_output_datatype
```



---
## wrong_signature
```python
from test_udf import wrong_signature
```



---
## raising_func
```python
from test_udf import raising_func
```



---
## pct_rank
```python
from test_udf import pct_rank
```



---
## pivot
```python
from test_udf import pivot
```



---
## test_reg_function
```python
from test_udf import test_reg_function
```



---
## add_const
```python
from test_udf import add_const
```



---
## identity
```python
from test_udf import identity
```



---
## udf_func
```python
from test_udf import udf_func
```



---
## Generator
```python
from test_udf import Generator
```



---
## batch_gen
```python
from test_udf import batch_gen
```



---
## UDT
```python
from test_udf import UDT
```



---
## __init__
```python
from test_udf import __init__
```



---
## __call__
```python
from test_udf import __call__
```



---
## __name__
```python
from pandas_threaded_import import __name__
```



---
## thread_func
```python
from pandas_threaded_import import thread_func
```



---
## main
```python
from pandas_threaded_import import main
```



---
## __name__
```python
from pandas_examples import __name__
```



---
## dataframe_with_arrays
```python
from pandas_examples import dataframe_with_arrays
```

Dataframe with numpy arrays columns of every possible primitive type.

Returns
-------
df: pandas.DataFrame
schema: pyarrow.Schema
    Arrow schema definition that is in line with the constructed df.

---
## dataframe_with_lists
```python
from pandas_examples import dataframe_with_lists
```

Dataframe with list columns of every possible primitive type.

Returns
-------
df: pandas.DataFrame
schema: pyarrow.Schema
    Arrow schema definition that is in line with the constructed df.
parquet_compatible: bool
    Exclude types not supported by parquet

---
## check_cython_example_module
```python
from test_cython import check_cython_example_module
```



---
## test_cython_api
```python
from test_cython import test_cython_api
```

Basic test for the Cython API.

---
## test_visit_strings
```python
from test_cython import test_visit_strings
```



---
## raise_on_b
```python
from test_cython import raise_on_b
```



---
## __name__
```python
from test_sparse_tensor import __name__
```



---
## test_sparse_tensor_attrs
```python
from test_sparse_tensor import test_sparse_tensor_attrs
```



---
## test_sparse_coo_tensor_base_object
```python
from test_sparse_tensor import test_sparse_coo_tensor_base_object
```



---
## test_sparse_csr_matrix_base_object
```python
from test_sparse_tensor import test_sparse_csr_matrix_base_object
```



---
## test_sparse_csf_tensor_base_object
```python
from test_sparse_tensor import test_sparse_csf_tensor_base_object
```



---
## test_sparse_tensor_equals
```python
from test_sparse_tensor import test_sparse_tensor_equals
```



---
## test_sparse_coo_tensor_from_dense
```python
from test_sparse_tensor import test_sparse_coo_tensor_from_dense
```



---
## test_sparse_csr_matrix_from_dense
```python
from test_sparse_tensor import test_sparse_csr_matrix_from_dense
```



---
## test_sparse_csf_tensor_from_dense_numpy
```python
from test_sparse_tensor import test_sparse_csf_tensor_from_dense_numpy
```



---
## test_sparse_csf_tensor_from_dense_tensor
```python
from test_sparse_tensor import test_sparse_csf_tensor_from_dense_tensor
```



---
## test_sparse_coo_tensor_numpy_roundtrip
```python
from test_sparse_tensor import test_sparse_coo_tensor_numpy_roundtrip
```



---
## test_sparse_csr_matrix_numpy_roundtrip
```python
from test_sparse_tensor import test_sparse_csr_matrix_numpy_roundtrip
```



---
## test_sparse_csf_tensor_numpy_roundtrip
```python
from test_sparse_tensor import test_sparse_csf_tensor_numpy_roundtrip
```



---
## test_dense_to_sparse_tensor
```python
from test_sparse_tensor import test_dense_to_sparse_tensor
```



---
## test_sparse_coo_tensor_scipy_roundtrip
```python
from test_sparse_tensor import test_sparse_coo_tensor_scipy_roundtrip
```



---
## test_sparse_csr_matrix_scipy_roundtrip
```python
from test_sparse_tensor import test_sparse_csr_matrix_scipy_roundtrip
```



---
## test_pydata_sparse_sparse_coo_tensor_roundtrip
```python
from test_sparse_tensor import test_pydata_sparse_sparse_coo_tensor_roundtrip
```



---
## eq
```python
from test_sparse_tensor import eq
```



---
## ne
```python
from test_sparse_tensor import ne
```



---
## _generate_data
```python
from test_dataset import _generate_data
```



---
## _table_from_pandas
```python
from test_dataset import _table_from_pandas
```



---
## assert_dataset_fragment_convenience_methods
```python
from test_dataset import assert_dataset_fragment_convenience_methods
```



---
## mockfs
```python
from test_dataset import mockfs
```



---
## open_logging_fs
```python
from test_dataset import open_logging_fs
```



---
## multisourcefs
```python
from test_dataset import multisourcefs
```



---
## dataset
```python
from test_dataset import dataset
```



---
## dataset_reader
```python
from test_dataset import dataset_reader
```

Fixture which allows dataset scanning operations to be
run with/without threads

---
## test_filesystem_dataset
```python
from test_dataset import test_filesystem_dataset
```



---
## test_filesystem_dataset_no_filesystem_interaction
```python
from test_dataset import test_filesystem_dataset_no_filesystem_interaction
```



---
## test_dataset
```python
from test_dataset import test_dataset
```



---
## test_scanner_options
```python
from test_dataset import test_scanner_options
```



---
## test_scanner
```python
from test_dataset import test_scanner
```



---
## test_scanner_memory_pool
```python
from test_dataset import test_scanner_memory_pool
```



---
## test_head
```python
from test_dataset import test_head
```



---
## test_take
```python
from test_dataset import test_take
```



---
## test_count_rows
```python
from test_dataset import test_count_rows
```



---
## test_abstract_classes
```python
from test_dataset import test_abstract_classes
```



---
## test_partitioning
```python
from test_dataset import test_partitioning
```



---
## test_partitioning_pickling
```python
from test_dataset import test_partitioning_pickling
```



---
## test_expression_arithmetic_operators
```python
from test_dataset import test_expression_arithmetic_operators
```



---
## test_partition_keys
```python
from test_dataset import test_partition_keys
```



---
## test_parquet_read_options
```python
from test_dataset import test_parquet_read_options
```



---
## test_parquet_file_format_read_options
```python
from test_dataset import test_parquet_file_format_read_options
```



---
## test_parquet_scan_options
```python
from test_dataset import test_parquet_scan_options
```



---
## test_file_format_pickling
```python
from test_dataset import test_file_format_pickling
```



---
## test_fragment_scan_options_pickling
```python
from test_dataset import test_fragment_scan_options_pickling
```



---
## test_filesystem_factory
```python
from test_dataset import test_filesystem_factory
```



---
## test_make_fragment
```python
from test_dataset import test_make_fragment
```



---
## test_make_fragment_with_size
```python
from test_dataset import test_make_fragment_with_size
```

Test passing file_size to make_fragment. Not all FS implementations make use
of the file size (by implementing an OpenInputFile that takes a FileInfo), but
s3 does, which is why it's used here.

---
## test_make_csv_fragment_from_buffer
```python
from test_dataset import test_make_csv_fragment_from_buffer
```



---
## test_make_json_fragment_from_buffer
```python
from test_dataset import test_make_json_fragment_from_buffer
```



---
## test_make_parquet_fragment_from_buffer
```python
from test_dataset import test_make_parquet_fragment_from_buffer
```



---
## _create_dataset_for_fragments
```python
from test_dataset import _create_dataset_for_fragments
```



---
## test_fragments
```python
from test_dataset import test_fragments
```



---
## test_fragments_implicit_cast
```python
from test_dataset import test_fragments_implicit_cast
```



---
## test_fragments_reconstruct
```python
from test_dataset import test_fragments_reconstruct
```



---
## test_fragments_parquet_row_groups
```python
from test_dataset import test_fragments_parquet_row_groups
```



---
## test_fragments_parquet_num_row_groups
```python
from test_dataset import test_fragments_parquet_num_row_groups
```



---
## test_fragments_parquet_row_groups_dictionary
```python
from test_dataset import test_fragments_parquet_row_groups_dictionary
```



---
## test_fragments_parquet_ensure_metadata
```python
from test_dataset import test_fragments_parquet_ensure_metadata
```



---
## test_fragments_parquet_pickle_no_metadata
```python
from test_dataset import test_fragments_parquet_pickle_no_metadata
```



---
## _create_dataset_all_types
```python
from test_dataset import _create_dataset_all_types
```



---
## test_parquet_fragment_statistics
```python
from test_dataset import test_parquet_fragment_statistics
```



---
## test_parquet_fragment_statistics_nulls
```python
from test_dataset import test_parquet_fragment_statistics_nulls
```



---
## test_parquet_empty_row_group_statistics
```python
from test_dataset import test_parquet_empty_row_group_statistics
```



---
## test_fragments_parquet_row_groups_predicate
```python
from test_dataset import test_fragments_parquet_row_groups_predicate
```



---
## test_fragments_parquet_row_groups_reconstruct
```python
from test_dataset import test_fragments_parquet_row_groups_reconstruct
```



---
## test_fragments_parquet_subset_ids
```python
from test_dataset import test_fragments_parquet_subset_ids
```



---
## test_fragments_parquet_subset_filter
```python
from test_dataset import test_fragments_parquet_subset_filter
```



---
## test_fragments_parquet_subset_invalid
```python
from test_dataset import test_fragments_parquet_subset_invalid
```



---
## test_fragments_parquet_subset_with_nested_fields
```python
from test_dataset import test_fragments_parquet_subset_with_nested_fields
```



---
## test_fragments_repr
```python
from test_dataset import test_fragments_repr
```



---
## test_partitioning_factory
```python
from test_dataset import test_partitioning_factory
```



---
## test_partitioning_factory_dictionary
```python
from test_dataset import test_partitioning_factory_dictionary
```



---
## test_partitioning_factory_segment_encoding
```python
from test_dataset import test_partitioning_factory_segment_encoding
```



---
## test_partitioning_factory_hive_segment_encoding_key_encoded
```python
from test_dataset import test_partitioning_factory_hive_segment_encoding_key_encoded
```



---
## test_dictionary_partitioning_outer_nulls_raises
```python
from test_dataset import test_dictionary_partitioning_outer_nulls_raises
```



---
## test_positional_keywords_raises
```python
from test_dataset import test_positional_keywords_raises
```



---
## test_read_partition_keys_only
```python
from test_dataset import test_read_partition_keys_only
```



---
## _has_subdirs
```python
from test_dataset import _has_subdirs
```



---
## _do_list_all_dirs
```python
from test_dataset import _do_list_all_dirs
```



---
## _list_all_dirs
```python
from test_dataset import _list_all_dirs
```



---
## _check_dataset_directories
```python
from test_dataset import _check_dataset_directories
```



---
## test_dictionary_partitioning_inner_nulls
```python
from test_dataset import test_dictionary_partitioning_inner_nulls
```



---
## test_hive_partitioning_nulls
```python
from test_dataset import test_hive_partitioning_nulls
```



---
## test_partitioning_function
```python
from test_dataset import test_partitioning_function
```



---
## test_directory_partitioning_dictionary_key
```python
from test_dataset import test_directory_partitioning_dictionary_key
```



---
## test_hive_partitioning_dictionary_key
```python
from test_dataset import test_hive_partitioning_dictionary_key
```



---
## _create_single_file
```python
from test_dataset import _create_single_file
```



---
## _create_directory_of_files
```python
from test_dataset import _create_directory_of_files
```



---
## _check_dataset
```python
from test_dataset import _check_dataset
```



---
## _check_dataset_from_path
```python
from test_dataset import _check_dataset_from_path
```



---
## test_open_dataset_single_file
```python
from test_dataset import test_open_dataset_single_file
```



---
## test_deterministic_row_order
```python
from test_dataset import test_deterministic_row_order
```



---
## test_open_dataset_directory
```python
from test_dataset import test_open_dataset_directory
```



---
## test_open_dataset_list_of_files
```python
from test_dataset import test_open_dataset_list_of_files
```



---
## test_open_dataset_filesystem_fspath
```python
from test_dataset import test_open_dataset_filesystem_fspath
```



---
## test_construct_from_single_file
```python
from test_dataset import test_construct_from_single_file
```



---
## test_construct_from_single_directory
```python
from test_dataset import test_construct_from_single_directory
```



---
## test_construct_from_list_of_files
```python
from test_dataset import test_construct_from_list_of_files
```



---
## test_construct_from_list_of_mixed_paths_fails
```python
from test_dataset import test_construct_from_list_of_mixed_paths_fails
```



---
## test_construct_from_mixed_child_datasets
```python
from test_dataset import test_construct_from_mixed_child_datasets
```



---
## test_construct_empty_dataset
```python
from test_dataset import test_construct_empty_dataset
```



---
## test_construct_dataset_with_invalid_schema
```python
from test_dataset import test_construct_dataset_with_invalid_schema
```



---
## test_construct_from_invalid_sources_raise
```python
from test_dataset import test_construct_from_invalid_sources_raise
```



---
## test_construct_in_memory
```python
from test_dataset import test_construct_in_memory
```



---
## test_scan_iterator
```python
from test_dataset import test_scan_iterator
```



---
## _create_partitioned_dataset
```python
from test_dataset import _create_partitioned_dataset
```



---
## test_open_dataset_partitioned_directory
```python
from test_dataset import test_open_dataset_partitioned_directory
```



---
## test_open_dataset_filesystem
```python
from test_dataset import test_open_dataset_filesystem
```



---
## test_open_dataset_unsupported_format
```python
from test_dataset import test_open_dataset_unsupported_format
```



---
## test_open_union_dataset
```python
from test_dataset import test_open_union_dataset
```



---
## test_open_union_dataset_with_additional_kwargs
```python
from test_dataset import test_open_union_dataset_with_additional_kwargs
```



---
## test_open_dataset_non_existing_file
```python
from test_dataset import test_open_dataset_non_existing_file
```



---
## test_partition_discovery
```python
from test_dataset import test_partition_discovery
```



---
## test_dataset_partitioned_dictionary_type_reconstruct
```python
from test_dataset import test_dataset_partitioned_dictionary_type_reconstruct
```



---
## s3_example_simple
```python
from test_dataset import s3_example_simple
```



---
## test_open_dataset_from_uri_s3
```python
from test_dataset import test_open_dataset_from_uri_s3
```



---
## test_open_dataset_from_fileinfos
```python
from test_dataset import test_open_dataset_from_fileinfos
```



---
## test_open_dataset_from_uri_s3_fsspec
```python
from test_dataset import test_open_dataset_from_uri_s3_fsspec
```



---
## test_open_dataset_from_s3_with_filesystem_uri
```python
from test_dataset import test_open_dataset_from_s3_with_filesystem_uri
```



---
## test_open_dataset_from_fsspec
```python
from test_dataset import test_open_dataset_from_fsspec
```



---
## test_file_format_inspect_fsspec
```python
from test_dataset import test_file_format_inspect_fsspec
```



---
## test_filter_timestamp
```python
from test_dataset import test_filter_timestamp
```



---
## test_filter_implicit_cast
```python
from test_dataset import test_filter_implicit_cast
```



---
## test_filter_equal_null
```python
from test_dataset import test_filter_equal_null
```



---
## test_filter_compute_expression
```python
from test_dataset import test_filter_compute_expression
```



---
## test_dataset_union
```python
from test_dataset import test_dataset_union
```



---
## test_union_dataset_from_other_datasets
```python
from test_dataset import test_union_dataset_from_other_datasets
```



---
## test_dataset_from_a_list_of_local_directories_raises
```python
from test_dataset import test_dataset_from_a_list_of_local_directories_raises
```



---
## test_union_dataset_filesystem_datasets
```python
from test_dataset import test_union_dataset_filesystem_datasets
```



---
## test_specified_schema
```python
from test_dataset import test_specified_schema
```



---
## test_incompatible_schema_hang
```python
from test_dataset import test_incompatible_schema_hang
```



---
## test_ipc_format
```python
from test_dataset import test_ipc_format
```



---
## test_orc_format
```python
from test_dataset import test_orc_format
```



---
## test_orc_scan_options
```python
from test_dataset import test_orc_scan_options
```



---
## test_orc_format_not_supported
```python
from test_dataset import test_orc_format_not_supported
```



---
## test_orc_writer_not_implemented_for_dataset
```python
from test_dataset import test_orc_writer_not_implemented_for_dataset
```



---
## test_csv_format
```python
from test_dataset import test_csv_format
```



---
## test_csv_format_compressed
```python
from test_dataset import test_csv_format_compressed
```



---
## test_csv_format_options
```python
from test_dataset import test_csv_format_options
```



---
## test_csv_format_options_generate_columns
```python
from test_dataset import test_csv_format_options_generate_columns
```



---
## test_csv_fragment_options
```python
from test_dataset import test_csv_fragment_options
```



---
## test_json_format
```python
from test_dataset import test_json_format
```



---
## test_json_format_options
```python
from test_dataset import test_json_format_options
```



---
## test_json_fragment_options
```python
from test_dataset import test_json_fragment_options
```



---
## test_encoding
```python
from test_dataset import test_encoding
```



---
## test_column_names_encoding
```python
from test_dataset import test_column_names_encoding
```



---
## test_feather_format
```python
from test_dataset import test_feather_format
```



---
## test_feather_format_compressed
```python
from test_dataset import test_feather_format_compressed
```



---
## _create_parquet_dataset_simple
```python
from test_dataset import _create_parquet_dataset_simple
```

Creates a simple (flat files, no nested partitioning) Parquet dataset

---
## test_parquet_dataset_factory
```python
from test_dataset import test_parquet_dataset_factory
```



---
## test_parquet_dataset_factory_fsspec
```python
from test_dataset import test_parquet_dataset_factory_fsspec
```



---
## test_parquet_dataset_factory_roundtrip
```python
from test_dataset import test_parquet_dataset_factory_roundtrip
```



---
## test_parquet_dataset_factory_order
```python
from test_dataset import test_parquet_dataset_factory_order
```



---
## test_parquet_dataset_factory_invalid
```python
from test_dataset import test_parquet_dataset_factory_invalid
```



---
## _create_metadata_file
```python
from test_dataset import _create_metadata_file
```



---
## _create_parquet_dataset_partitioned
```python
from test_dataset import _create_parquet_dataset_partitioned
```



---
## test_parquet_dataset_factory_partitioned
```python
from test_dataset import test_parquet_dataset_factory_partitioned
```



---
## test_parquet_dataset_factory_metadata
```python
from test_dataset import test_parquet_dataset_factory_metadata
```



---
## test_parquet_dataset_lazy_filtering
```python
from test_dataset import test_parquet_dataset_lazy_filtering
```



---
## test_dataset_schema_metadata
```python
from test_dataset import test_dataset_schema_metadata
```



---
## test_filter_mismatching_schema
```python
from test_dataset import test_filter_mismatching_schema
```



---
## test_dataset_project_only_partition_columns
```python
from test_dataset import test_dataset_project_only_partition_columns
```



---
## test_dataset_project_null_column
```python
from test_dataset import test_dataset_project_null_column
```



---
## test_dataset_project_columns
```python
from test_dataset import test_dataset_project_columns
```



---
## test_dataset_preserved_partitioning
```python
from test_dataset import test_dataset_preserved_partitioning
```



---
## test_write_to_dataset_given_null_just_works
```python
from test_dataset import test_write_to_dataset_given_null_just_works
```



---
## _sort_table
```python
from test_dataset import _sort_table
```



---
## _check_dataset_roundtrip
```python
from test_dataset import _check_dataset_roundtrip
```



---
## test_write_dataset
```python
from test_dataset import test_write_dataset
```



---
## test_write_dataset_partitioned
```python
from test_dataset import test_write_dataset_partitioned
```



---
## test_write_dataset_with_field_names
```python
from test_dataset import test_write_dataset_with_field_names
```



---
## test_write_dataset_with_field_names_hive
```python
from test_dataset import test_write_dataset_with_field_names_hive
```



---
## test_write_dataset_with_scanner
```python
from test_dataset import test_write_dataset_with_scanner
```



---
## test_write_dataset_with_backpressure
```python
from test_dataset import test_write_dataset_with_backpressure
```



---
## test_write_dataset_with_dataset
```python
from test_dataset import test_write_dataset_with_dataset
```



---
## test_write_dataset_existing_data
```python
from test_dataset import test_write_dataset_existing_data
```



---
## _generate_random_int_array
```python
from test_dataset import _generate_random_int_array
```



---
## _generate_data_and_columns
```python
from test_dataset import _generate_data_and_columns
```



---
## _get_num_of_files_generated
```python
from test_dataset import _get_num_of_files_generated
```



---
## test_write_dataset_max_rows_per_file
```python
from test_dataset import test_write_dataset_max_rows_per_file
```



---
## test_write_dataset_min_rows_per_group
```python
from test_dataset import test_write_dataset_min_rows_per_group
```



---
## test_write_dataset_max_rows_per_group
```python
from test_dataset import test_write_dataset_max_rows_per_group
```



---
## test_write_dataset_max_open_files
```python
from test_dataset import test_write_dataset_max_open_files
```



---
## test_write_dataset_partitioned_dict
```python
from test_dataset import test_write_dataset_partitioned_dict
```



---
## test_write_dataset_use_threads
```python
from test_dataset import test_write_dataset_use_threads
```



---
## test_write_table
```python
from test_dataset import test_write_table
```



---
## test_write_table_multiple_fragments
```python
from test_dataset import test_write_table_multiple_fragments
```



---
## test_write_iterable
```python
from test_dataset import test_write_iterable
```



---
## test_write_scanner
```python
from test_dataset import test_write_scanner
```



---
## test_write_table_partitioned_dict
```python
from test_dataset import test_write_table_partitioned_dict
```



---
## test_write_dataset_parquet
```python
from test_dataset import test_write_dataset_parquet
```



---
## test_write_dataset_csv
```python
from test_dataset import test_write_dataset_csv
```



---
## test_write_dataset_parquet_file_visitor
```python
from test_dataset import test_write_dataset_parquet_file_visitor
```



---
## test_partition_dataset_parquet_file_visitor
```python
from test_dataset import test_partition_dataset_parquet_file_visitor
```



---
## test_write_dataset_arrow_schema_metadata
```python
from test_dataset import test_write_dataset_arrow_schema_metadata
```



---
## test_write_dataset_schema_metadata
```python
from test_dataset import test_write_dataset_schema_metadata
```



---
## test_write_dataset_schema_metadata_parquet
```python
from test_dataset import test_write_dataset_schema_metadata_parquet
```



---
## test_write_dataset_s3
```python
from test_dataset import test_write_dataset_s3
```



---
## test_write_dataset_s3_put_only
```python
from test_dataset import test_write_dataset_s3_put_only
```



---
## test_dataset_null_to_dictionary_cast
```python
from test_dataset import test_dataset_null_to_dictionary_cast
```



---
## test_dataset_join
```python
from test_dataset import test_dataset_join
```



---
## test_dataset_join_unique_key
```python
from test_dataset import test_dataset_join_unique_key
```



---
## test_dataset_join_collisions
```python
from test_dataset import test_dataset_join_collisions
```



---
## test_dataset_join_asof
```python
from test_dataset import test_dataset_join_asof
```



---
## test_dataset_join_asof_multiple_by
```python
from test_dataset import test_dataset_join_asof_multiple_by
```



---
## test_dataset_join_asof_empty_by
```python
from test_dataset import test_dataset_join_asof_empty_by
```



---
## test_dataset_join_asof_collisions
```python
from test_dataset import test_dataset_join_asof_collisions
```



---
## test_dataset_filter
```python
from test_dataset import test_dataset_filter
```



---
## test_union_dataset_filter
```python
from test_dataset import test_union_dataset_filter
```



---
## test_parquet_dataset_filter
```python
from test_dataset import test_parquet_dataset_filter
```



---
## test_write_dataset_with_scanner_use_projected_schema
```python
from test_dataset import test_write_dataset_with_scanner_use_projected_schema
```

Ensure the projected schema is used to validate partitions for scanner

https://issues.apache.org/jira/browse/ARROW-17228

---
## test_read_table_nested_columns
```python
from test_dataset import test_read_table_nested_columns
```



---
## test_dataset_partition_with_slash
```python
from test_dataset import test_dataset_partition_with_slash
```



---
## test_write_dataset_preserve_nullability
```python
from test_dataset import test_write_dataset_preserve_nullability
```



---
## test_write_dataset_preserve_field_metadata
```python
from test_dataset import test_write_dataset_preserve_field_metadata
```



---
## test_write_dataset_write_page_index
```python
from test_dataset import test_write_dataset_write_page_index
```



---
## test_dataset_sort_by
```python
from test_dataset import test_dataset_sort_by
```



---
## test_checksum_write_dataset_read_dataset_to_table
```python
from test_dataset import test_checksum_write_dataset_read_dataset_to_table
```

Check that checksum verification works for datasets created with
ds.write_dataset and read with ds.dataset.to_table

---
## test_make_write_options_error
```python
from test_dataset import test_make_write_options_error
```



---
## normalized
```python
from test_dataset import normalized
```



---
## open_input_file
```python
from test_dataset import open_input_file
```



---
## assert_opens
```python
from test_dataset import assert_opens
```



---
## reader
```python
from test_dataset import reader
```



---
## assert_yields_projected
```python
from test_dataset import assert_yields_projected
```



---
## dt_s
```python
from test_dataset import dt_s
```



---
## dt_ms
```python
from test_dataset import dt_ms
```



---
## dt_us
```python
from test_dataset import dt_us
```



---
## expected_type
```python
from test_dataset import expected_type
```



---
## GatingFs
```python
from test_dataset import GatingFs
```



---
## counting_generator
```python
from test_dataset import counting_generator
```



---
## compare_tables_ignoring_order
```python
from test_dataset import compare_tables_ignoring_order
```



---
## _get_compare_pair
```python
from test_dataset import _get_compare_pair
```



---
## file_visitor
```python
from test_dataset import file_visitor
```



---
## __init__
```python
from test_dataset import __init__
```



---
## _patch_kwargs
```python
from test_dataset import _patch_kwargs
```



---
## to_table
```python
from test_dataset import to_table
```



---
## to_batches
```python
from test_dataset import to_batches
```



---
## scanner
```python
from test_dataset import scanner
```



---
## head
```python
from test_dataset import head
```



---
## take
```python
from test_dataset import take
```



---
## count_rows
```python
from test_dataset import count_rows
```



---
## open_output_stream
```python
from test_dataset import open_output_stream
```



---
## duration
```python
from test_dataset import duration
```



---
## test_weakref
```python
from test_builder import test_weakref
```



---
## test_string_builder_append
```python
from test_builder import test_string_builder_append
```



---
## test_string_builder_append_values
```python
from test_builder import test_string_builder_append_values
```



---
## test_string_builder_append_after_finish
```python
from test_builder import test_string_builder_append_after_finish
```



---
## test_string_view_builder
```python
from test_builder import test_string_view_builder
```



---
## __name__
```python
from test_dataset_encryption import __name__
```



---
## create_sample_table
```python
from test_dataset_encryption import create_sample_table
```



---
## create_encryption_config
```python
from test_dataset_encryption import create_encryption_config
```



---
## create_decryption_config
```python
from test_dataset_encryption import create_decryption_config
```



---
## create_kms_connection_config
```python
from test_dataset_encryption import create_kms_connection_config
```



---
## kms_factory
```python
from test_dataset_encryption import kms_factory
```



---
## test_dataset_encryption_decryption
```python
from test_dataset_encryption import test_dataset_encryption_decryption
```



---
## test_write_dataset_parquet_without_encryption
```python
from test_dataset_encryption import test_write_dataset_parquet_without_encryption
```

Test write_dataset with ParquetFileFormat and test if an exception is thrown
if you try to set encryption_config using make_write_options

---
## test_large_row_encryption_decryption
```python
from test_dataset_encryption import test_large_row_encryption_decryption
```

Test encryption and decryption of a large number of rows.

---
## NoOpKmsClient
```python
from test_dataset_encryption import NoOpKmsClient
```



---
## wrap_key
```python
from test_dataset_encryption import wrap_key
```



---
## unwrap_key
```python
from test_dataset_encryption import unwrap_key
```



---
## __name__
```python
from test_cuda import __name__
```

UNTESTED:
read_message

---
## setup_module
```python
from test_cuda import setup_module
```



---
## teardown_module
```python
from test_cuda import teardown_module
```



---
## test_Context
```python
from test_cuda import test_Context
```



---
## test_manage_allocate_free_host
```python
from test_cuda import test_manage_allocate_free_host
```



---
## test_context_allocate_del
```python
from test_cuda import test_context_allocate_del
```



---
## make_random_buffer
```python
from test_cuda import make_random_buffer
```

Return a host or device buffer with random data.
    

---
## test_context_device_buffer
```python
from test_cuda import test_context_device_buffer
```



---
## test_context_from_object
```python
from test_cuda import test_context_from_object
```



---
## test_foreign_buffer
```python
from test_cuda import test_foreign_buffer
```



---
## test_CudaBuffer
```python
from test_cuda import test_CudaBuffer
```



---
## test_HostBuffer
```python
from test_cuda import test_HostBuffer
```



---
## test_copy_from_to_host
```python
from test_cuda import test_copy_from_to_host
```



---
## test_copy_to_host
```python
from test_cuda import test_copy_to_host
```



---
## test_copy_from_device
```python
from test_cuda import test_copy_from_device
```



---
## test_copy_from_host
```python
from test_cuda import test_copy_from_host
```



---
## test_BufferWriter
```python
from test_cuda import test_BufferWriter
```



---
## test_BufferWriter_edge_cases
```python
from test_cuda import test_BufferWriter_edge_cases
```



---
## test_BufferReader
```python
from test_cuda import test_BufferReader
```



---
## test_BufferReader_zero_size
```python
from test_cuda import test_BufferReader_zero_size
```



---
## make_recordbatch
```python
from test_cuda import make_recordbatch
```



---
## test_batch_serialize
```python
from test_cuda import test_batch_serialize
```



---
## make_table
```python
from test_cuda import make_table
```



---
## make_table_cuda
```python
from test_cuda import make_table_cuda
```



---
## test_table_deserialize
```python
from test_cuda import test_table_deserialize
```



---
## test_create_table_with_device_buffers
```python
from test_cuda import test_create_table_with_device_buffers
```



---
## other_process_for_test_IPC
```python
from test_cuda import other_process_for_test_IPC
```



---
## test_IPC
```python
from test_cuda import test_IPC
```



---
## _arr_copy_to_host
```python
from test_cuda import _arr_copy_to_host
```



---
## test_device_interface_array
```python
from test_cuda import test_device_interface_array
```



---
## _batch_copy_to_host
```python
from test_cuda import _batch_copy_to_host
```



---
## test_device_interface_batch_array
```python
from test_cuda import test_device_interface_batch_array
```



---
## test_print_array
```python
from test_cuda import test_print_array
```



---
## make_chunked_array
```python
from test_cuda import make_chunked_array
```



---
## test_print_chunked_array
```python
from test_cuda import test_print_chunked_array
```



---
## test_print_record_batch
```python
from test_cuda import test_print_record_batch
```



---
## test_print_table
```python
from test_cuda import test_print_table
```



---
## put
```python
from test_cuda import put
```



---
## allocate
```python
from test_cuda import allocate
```



---
## test_writes
```python
from test_cuda import test_writes
```



---
## __name__
```python
from test_extension_type import __name__
```



---
## registered_extension_type
```python
from test_extension_type import registered_extension_type
```



---
## enabled_auto_load
```python
from test_extension_type import enabled_auto_load
```



---
## TinyIntType
```python
from test_extension_type import TinyIntType
```



---
## IntegerType
```python
from test_extension_type import IntegerType
```



---
## IntegerEmbeddedType
```python
from test_extension_type import IntegerEmbeddedType
```



---
## UuidScalarType
```python
from test_extension_type import UuidScalarType
```



---
## UuidType
```python
from test_extension_type import UuidType
```



---
## UuidType2
```python
from test_extension_type import UuidType2
```



---
## LabelType
```python
from test_extension_type import LabelType
```



---
## ParamExtType
```python
from test_extension_type import ParamExtType
```



---
## MyStructType
```python
from test_extension_type import MyStructType
```



---
## MyListType
```python
from test_extension_type import MyListType
```



---
## MyFixedListType
```python
from test_extension_type import MyFixedListType
```



---
## AnnotatedType
```python
from test_extension_type import AnnotatedType
```

Generic extension type that can store any storage type.

---
## LegacyIntType
```python
from test_extension_type import LegacyIntType
```



---
## ipc_write_batch
```python
from test_extension_type import ipc_write_batch
```



---
## ipc_read_batch
```python
from test_extension_type import ipc_read_batch
```



---
## test_ext_type_basics
```python
from test_extension_type import test_ext_type_basics
```



---
## test_ext_type_str
```python
from test_extension_type import test_ext_type_str
```



---
## test_ext_type_repr
```python
from test_extension_type import test_ext_type_repr
```



---
## test_ext_type_lifetime
```python
from test_extension_type import test_ext_type_lifetime
```



---
## test_ext_type_storage_type
```python
from test_extension_type import test_ext_type_storage_type
```



---
## test_ext_type_byte_width
```python
from test_extension_type import test_ext_type_byte_width
```



---
## test_ext_type_bit_width
```python
from test_extension_type import test_ext_type_bit_width
```



---
## test_ext_type_as_py
```python
from test_extension_type import test_ext_type_as_py
```



---
## test_uuid_type_pickle
```python
from test_extension_type import test_uuid_type_pickle
```



---
## test_ext_type_equality
```python
from test_extension_type import test_ext_type_equality
```



---
## test_ext_array_basics
```python
from test_extension_type import test_ext_array_basics
```



---
## test_ext_array_lifetime
```python
from test_extension_type import test_ext_array_lifetime
```



---
## test_ext_array_to_pylist
```python
from test_extension_type import test_ext_array_to_pylist
```



---
## test_ext_array_errors
```python
from test_extension_type import test_ext_array_errors
```



---
## test_ext_array_equality
```python
from test_extension_type import test_ext_array_equality
```



---
## test_ext_array_wrap_array
```python
from test_extension_type import test_ext_array_wrap_array
```



---
## test_ext_scalar_from_array
```python
from test_extension_type import test_ext_scalar_from_array
```



---
## test_ext_scalar_from_storage
```python
from test_extension_type import test_ext_scalar_from_storage
```



---
## test_ext_array_pickling
```python
from test_extension_type import test_ext_array_pickling
```



---
## test_ext_array_conversion_to_numpy
```python
from test_extension_type import test_ext_array_conversion_to_numpy
```



---
## test_ext_array_conversion_to_pandas
```python
from test_extension_type import test_ext_array_conversion_to_pandas
```



---
## struct_w_ext_data
```python
from test_extension_type import struct_w_ext_data
```



---
## test_struct_w_ext_array_to_numpy
```python
from test_extension_type import test_struct_w_ext_array_to_numpy
```



---
## test_struct_w_ext_array_to_pandas
```python
from test_extension_type import test_struct_w_ext_array_to_pandas
```



---
## test_cast_kernel_on_extension_arrays
```python
from test_extension_type import test_cast_kernel_on_extension_arrays
```



---
## test_casting_to_extension_type
```python
from test_extension_type import test_casting_to_extension_type
```



---
## test_cast_between_extension_types
```python
from test_extension_type import test_cast_between_extension_types
```



---
## test_cast_to_extension_with_extension_storage
```python
from test_extension_type import test_cast_to_extension_with_extension_storage
```



---
## test_cast_nested_extension_types
```python
from test_extension_type import test_cast_nested_extension_types
```



---
## test_casting_dict_array_to_extension_type
```python
from test_extension_type import test_casting_dict_array_to_extension_type
```



---
## test_cast_to_extension_with_nested_storage
```python
from test_extension_type import test_cast_to_extension_with_nested_storage
```



---
## test_concat
```python
from test_extension_type import test_concat
```



---
## test_null_storage_type
```python
from test_extension_type import test_null_storage_type
```



---
## example_batch
```python
from test_extension_type import example_batch
```



---
## check_example_batch
```python
from test_extension_type import check_example_batch
```



---
## test_ipc_unregistered
```python
from test_extension_type import test_ipc_unregistered
```



---
## test_ipc_registered
```python
from test_extension_type import test_ipc_registered
```



---
## PeriodArray
```python
from test_extension_type import PeriodArray
```



---
## PeriodType
```python
from test_extension_type import PeriodType
```



---
## PeriodTypeWithClass
```python
from test_extension_type import PeriodTypeWithClass
```



---
## PeriodTypeWithToPandasDtype
```python
from test_extension_type import PeriodTypeWithToPandasDtype
```



---
## registered_period_type
```python
from test_extension_type import registered_period_type
```



---
## test_generic_ext_type
```python
from test_extension_type import test_generic_ext_type
```



---
## test_generic_ext_type_ipc
```python
from test_extension_type import test_generic_ext_type_ipc
```



---
## test_generic_ext_type_ipc_unknown
```python
from test_extension_type import test_generic_ext_type_ipc_unknown
```



---
## test_generic_ext_type_equality
```python
from test_extension_type import test_generic_ext_type_equality
```



---
## test_generic_ext_type_pickling
```python
from test_extension_type import test_generic_ext_type_pickling
```



---
## test_generic_ext_array_pickling
```python
from test_extension_type import test_generic_ext_array_pickling
```



---
## test_generic_ext_type_register
```python
from test_extension_type import test_generic_ext_type_register
```



---
## test_parquet_period
```python
from test_extension_type import test_parquet_period
```



---
## test_parquet_extension_with_nested_storage
```python
from test_extension_type import test_parquet_extension_with_nested_storage
```



---
## test_parquet_nested_extension
```python
from test_extension_type import test_parquet_nested_extension
```



---
## test_parquet_extension_nested_in_extension
```python
from test_extension_type import test_parquet_extension_nested_in_extension
```



---
## test_to_numpy
```python
from test_extension_type import test_to_numpy
```



---
## test_empty_take
```python
from test_extension_type import test_empty_take
```



---
## test_extension_array_to_numpy_pandas
```python
from test_extension_type import test_extension_array_to_numpy_pandas
```



---
## test_array_constructor
```python
from test_extension_type import test_array_constructor
```



---
## test_array_constructor_from_pandas
```python
from test_extension_type import test_array_constructor_from_pandas
```



---
## test_cpp_extension_in_python
```python
from test_extension_type import test_cpp_extension_in_python
```



---
## test_tensor_type
```python
from test_extension_type import test_tensor_type
```



---
## test_tensor_class_methods
```python
from test_extension_type import test_tensor_class_methods
```



---
## test_tensor_array_from_numpy
```python
from test_extension_type import test_tensor_array_from_numpy
```



---
## test_tensor_type_ipc
```python
from test_extension_type import test_tensor_type_ipc
```



---
## test_tensor_type_equality
```python
from test_extension_type import test_tensor_type_equality
```



---
## test_tensor_type_cast
```python
from test_extension_type import test_tensor_type_cast
```



---
## test_extension_to_pandas_storage_type
```python
from test_extension_type import test_extension_to_pandas_storage_type
```



---
## test_tensor_type_is_picklable
```python
from test_extension_type import test_tensor_type_is_picklable
```



---
## test_tensor_type_str
```python
from test_extension_type import test_tensor_type_str
```



---
## test_legacy_int_type
```python
from test_extension_type import test_legacy_int_type
```



---
## __init__
```python
from test_extension_type import __init__
```



---
## __arrow_ext_serialize__
```python
from test_extension_type import __arrow_ext_serialize__
```



---
## __arrow_ext_deserialize__
```python
from test_extension_type import __arrow_ext_deserialize__
```



---
## as_py
```python
from test_extension_type import as_py
```



---
## __arrow_ext_scalar_class__
```python
from test_extension_type import __arrow_ext_scalar_class__
```



---
## width
```python
from test_extension_type import width
```



---
## __reduce__
```python
from test_extension_type import __reduce__
```



---
## freq
```python
from test_extension_type import freq
```



---
## __eq__
```python
from test_extension_type import __eq__
```



---
## __arrow_ext_class__
```python
from test_extension_type import __arrow_ext_class__
```



---
## to_pandas_dtype
```python
from test_extension_type import to_pandas_dtype
```



---
## datadir
```python
from test_feather import datadir
```



---
## random_path
```python
from test_feather import random_path
```



---
## version
```python
from test_feather import version
```



---
## compression
```python
from test_feather import compression
```



---
## setup_module
```python
from test_feather import setup_module
```



---
## teardown_module
```python
from test_feather import teardown_module
```



---
## test_file_not_exist
```python
from test_feather import test_file_not_exist
```



---
## _check_pandas_roundtrip
```python
from test_feather import _check_pandas_roundtrip
```



---
## _check_arrow_roundtrip
```python
from test_feather import _check_arrow_roundtrip
```



---
## _assert_error_on_write
```python
from test_feather import _assert_error_on_write
```



---
## test_dataset
```python
from test_feather import test_dataset
```



---
## test_float_no_nulls
```python
from test_feather import test_float_no_nulls
```



---
## test_read_table
```python
from test_feather import test_read_table
```



---
## test_use_threads
```python
from test_feather import test_use_threads
```



---
## test_float_nulls
```python
from test_feather import test_float_nulls
```



---
## test_integer_no_nulls
```python
from test_feather import test_integer_no_nulls
```



---
## test_platform_numpy_integers
```python
from test_feather import test_platform_numpy_integers
```



---
## test_integer_with_nulls
```python
from test_feather import test_integer_with_nulls
```



---
## test_boolean_no_nulls
```python
from test_feather import test_boolean_no_nulls
```



---
## test_boolean_nulls
```python
from test_feather import test_boolean_nulls
```



---
## test_buffer_bounds_error
```python
from test_feather import test_buffer_bounds_error
```



---
## test_boolean_object_nulls
```python
from test_feather import test_boolean_object_nulls
```



---
## test_delete_partial_file_on_error
```python
from test_feather import test_delete_partial_file_on_error
```



---
## test_strings
```python
from test_feather import test_strings
```



---
## test_empty_strings
```python
from test_feather import test_empty_strings
```



---
## test_all_none
```python
from test_feather import test_all_none
```



---
## test_all_null_category
```python
from test_feather import test_all_null_category
```



---
## test_multithreaded_read
```python
from test_feather import test_multithreaded_read
```



---
## test_nan_as_null
```python
from test_feather import test_nan_as_null
```



---
## test_category
```python
from test_feather import test_category
```



---
## test_timestamp
```python
from test_feather import test_timestamp
```



---
## test_timestamp_with_nulls
```python
from test_feather import test_timestamp_with_nulls
```



---
## test_timedelta_with_nulls_v1
```python
from test_feather import test_timedelta_with_nulls_v1
```



---
## test_timedelta_with_nulls
```python
from test_feather import test_timedelta_with_nulls
```



---
## test_out_of_float64_timestamp_with_nulls
```python
from test_feather import test_out_of_float64_timestamp_with_nulls
```



---
## test_non_string_columns
```python
from test_feather import test_non_string_columns
```



---
## test_unicode_filename
```python
from test_feather import test_unicode_filename
```



---
## test_overwritten_file
```python
from test_feather import test_overwritten_file
```



---
## test_filelike_objects
```python
from test_feather import test_filelike_objects
```



---
## test_sparse_dataframe
```python
from test_feather import test_sparse_dataframe
```



---
## test_duplicate_columns_pandas
```python
from test_feather import test_duplicate_columns_pandas
```



---
## test_unsupported
```python
from test_feather import test_unsupported
```



---
## test_v2_set_chunksize
```python
from test_feather import test_v2_set_chunksize
```



---
## test_v2_compression_options
```python
from test_feather import test_v2_compression_options
```



---
## test_v2_lz4_default_compression
```python
from test_feather import test_v2_lz4_default_compression
```



---
## test_v1_unsupported_types
```python
from test_feather import test_v1_unsupported_types
```



---
## test_large_dataframe
```python
from test_feather import test_large_dataframe
```



---
## test_chunked_binary_error_message
```python
from test_feather import test_chunked_binary_error_message
```



---
## test_feather_without_pandas
```python
from test_feather import test_feather_without_pandas
```



---
## test_read_column_selection
```python
from test_feather import test_read_column_selection
```



---
## test_read_column_duplicated_selection
```python
from test_feather import test_read_column_duplicated_selection
```



---
## test_read_column_duplicated_in_file
```python
from test_feather import test_read_column_duplicated_in_file
```



---
## test_nested_types
```python
from test_feather import test_nested_types
```



---
## test_roundtrip
```python
from test_feather import test_roundtrip
```



---
## test_feather_v017_experimental_compression_backward_compatibility
```python
from test_feather import test_feather_v017_experimental_compression_backward_compatibility
```



---
## test_preserve_index_pandas
```python
from test_feather import test_preserve_index_pandas
```



---
## test_feather_datetime_resolution_arrow_to_pandas
```python
from test_feather import test_feather_datetime_resolution_arrow_to_pandas
```



---
## f
```python
from test_feather import f
```



---
## CustomClass
```python
from test_feather import CustomClass
```



---
## A
```python
from test_feather import A
```



---
## _alltypes_example
```python
from test_pandas import _alltypes_example
```



---
## _check_pandas_roundtrip
```python
from test_pandas import _check_pandas_roundtrip
```



---
## _check_series_roundtrip
```python
from test_pandas import _check_series_roundtrip
```



---
## _check_array_roundtrip
```python
from test_pandas import _check_array_roundtrip
```



---
## _check_array_from_pandas_roundtrip
```python
from test_pandas import _check_array_from_pandas_roundtrip
```



---
## TestConvertMetadata
```python
from test_pandas import TestConvertMetadata
```

Conversion tests for Pandas metadata & indices.

---
## TestConvertPrimitiveTypes
```python
from test_pandas import TestConvertPrimitiveTypes
```

Conversion tests for primitive (e.g. numeric) types.

---
## test_array_integer_object_nulls_option
```python
from test_pandas import test_array_integer_object_nulls_option
```



---
## test_table_integer_object_nulls_option
```python
from test_pandas import test_table_integer_object_nulls_option
```



---
## TestConvertDateTimeLikeTypes
```python
from test_pandas import TestConvertDateTimeLikeTypes
```

Conversion tests for datetime- and timestamp-like types (date64, etc.).

---
## TestConvertStringLikeTypes
```python
from test_pandas import TestConvertStringLikeTypes
```



---
## TestConvertDecimalTypes
```python
from test_pandas import TestConvertDecimalTypes
```

Conversion test for decimal types.

---
## TestConvertListTypes
```python
from test_pandas import TestConvertListTypes
```

Conversion tests for list<> types.

---
## TestConvertStructTypes
```python
from test_pandas import TestConvertStructTypes
```

Conversion tests for struct types.

---
## TestZeroCopyConversion
```python
from test_pandas import TestZeroCopyConversion
```

Tests that zero-copy conversion works with some types.

---
## _non_threaded_conversion
```python
from test_pandas import _non_threaded_conversion
```



---
## _threaded_conversion
```python
from test_pandas import _threaded_conversion
```



---
## TestConvertMisc
```python
from test_pandas import TestConvertMisc
```

Miscellaneous conversion tests.

---
## test_safe_cast_from_float_with_nans_to_int
```python
from test_pandas import test_safe_cast_from_float_with_nans_to_int
```



---
## _fully_loaded_dataframe_example
```python
from test_pandas import _fully_loaded_dataframe_example
```



---
## test_roundtrip_with_bytes_unicode
```python
from test_pandas import test_roundtrip_with_bytes_unicode
```



---
## _pytime_from_micros
```python
from test_pandas import _pytime_from_micros
```



---
## _pytime_to_micros
```python
from test_pandas import _pytime_to_micros
```



---
## test_convert_unsupported_type_error_message
```python
from test_pandas import test_convert_unsupported_type_error_message
```



---
## test_array_to_pandas_roundtrip
```python
from test_pandas import test_array_to_pandas_roundtrip
```



---
## _generate_dedup_example
```python
from test_pandas import _generate_dedup_example
```



---
## _assert_nunique
```python
from test_pandas import _assert_nunique
```



---
## test_to_pandas_deduplicate_strings_array_types
```python
from test_pandas import test_to_pandas_deduplicate_strings_array_types
```



---
## test_to_pandas_deduplicate_strings_table_types
```python
from test_pandas import test_to_pandas_deduplicate_strings_table_types
```



---
## test_to_pandas_deduplicate_integers_as_objects
```python
from test_pandas import test_to_pandas_deduplicate_integers_as_objects
```



---
## test_to_pandas_deduplicate_date_time
```python
from test_pandas import test_to_pandas_deduplicate_date_time
```



---
## test_table_from_pandas_checks_field_nullability
```python
from test_pandas import test_table_from_pandas_checks_field_nullability
```



---
## test_table_from_pandas_keeps_column_order_of_dataframe
```python
from test_pandas import test_table_from_pandas_keeps_column_order_of_dataframe
```



---
## test_table_from_pandas_keeps_column_order_of_schema
```python
from test_pandas import test_table_from_pandas_keeps_column_order_of_schema
```



---
## test_table_from_pandas_columns_argument_only_does_filtering
```python
from test_pandas import test_table_from_pandas_columns_argument_only_does_filtering
```



---
## test_table_from_pandas_columns_and_schema_are_mutually_exclusive
```python
from test_pandas import test_table_from_pandas_columns_and_schema_are_mutually_exclusive
```



---
## test_table_from_pandas_keeps_schema_nullability
```python
from test_pandas import test_table_from_pandas_keeps_schema_nullability
```



---
## test_table_from_pandas_schema_index_columns
```python
from test_pandas import test_table_from_pandas_schema_index_columns
```



---
## test_table_from_pandas_schema_index_columns__unnamed_index
```python
from test_pandas import test_table_from_pandas_schema_index_columns__unnamed_index
```



---
## test_table_from_pandas_schema_with_custom_metadata
```python
from test_pandas import test_table_from_pandas_schema_with_custom_metadata
```



---
## test_table_from_pandas_schema_field_order_metadata
```python
from test_pandas import test_table_from_pandas_schema_field_order_metadata
```



---
## test_recordbatch_from_to_pandas
```python
from test_pandas import test_recordbatch_from_to_pandas
```



---
## test_recordbatchlist_to_pandas
```python
from test_pandas import test_recordbatchlist_to_pandas
```



---
## test_recordbatch_table_pass_name_to_pandas
```python
from test_pandas import test_recordbatch_table_pass_name_to_pandas
```



---
## test_logical_type
```python
from test_pandas import test_logical_type
```



---
## test_array_uses_memory_pool
```python
from test_pandas import test_array_uses_memory_pool
```



---
## test_singleton_blocks_zero_copy
```python
from test_pandas import test_singleton_blocks_zero_copy
```



---
## _check_to_pandas_memory_unchanged
```python
from test_pandas import _check_to_pandas_memory_unchanged
```



---
## test_to_pandas_split_blocks
```python
from test_pandas import test_to_pandas_split_blocks
```



---
## _get_mgr
```python
from test_pandas import _get_mgr
```



---
## _check_blocks_created
```python
from test_pandas import _check_blocks_created
```



---
## test_to_pandas_self_destruct
```python
from test_pandas import test_to_pandas_self_destruct
```



---
## test_table_uses_memory_pool
```python
from test_pandas import test_table_uses_memory_pool
```



---
## test_object_leak_in_numpy_array
```python
from test_pandas import test_object_leak_in_numpy_array
```



---
## test_object_leak_in_dataframe
```python
from test_pandas import test_object_leak_in_dataframe
```



---
## test_array_from_py_float32
```python
from test_pandas import test_array_from_py_float32
```



---
## test_cast_timestamp_unit
```python
from test_pandas import test_cast_timestamp_unit
```



---
## test_nested_with_timestamp_tz_round_trip
```python
from test_pandas import test_nested_with_timestamp_tz_round_trip
```



---
## test_nested_with_timestamp_tz
```python
from test_pandas import test_nested_with_timestamp_tz
```



---
## test_dictionary_with_pandas
```python
from test_pandas import test_dictionary_with_pandas
```



---
## random_strings
```python
from test_pandas import random_strings
```



---
## test_variable_dictionary_to_pandas
```python
from test_pandas import test_variable_dictionary_to_pandas
```



---
## test_dictionary_encoded_nested_to_pandas
```python
from test_pandas import test_dictionary_encoded_nested_to_pandas
```



---
## test_dictionary_from_pandas
```python
from test_pandas import test_dictionary_from_pandas
```



---
## test_dictionary_from_pandas_specified_type
```python
from test_pandas import test_dictionary_from_pandas_specified_type
```



---
## test_convert_categories_to_array_with_string_pyarrow_dtype
```python
from test_pandas import test_convert_categories_to_array_with_string_pyarrow_dtype
```



---
## test_array_protocol
```python
from test_pandas import test_array_protocol
```



---
## DummyExtensionType
```python
from test_pandas import DummyExtensionType
```



---
## PandasArray__arrow_array__
```python
from test_pandas import PandasArray__arrow_array__
```



---
## test_array_protocol_pandas_extension_types
```python
from test_pandas import test_array_protocol_pandas_extension_types
```



---
## _Int64Dtype__from_arrow__
```python
from test_pandas import _Int64Dtype__from_arrow__
```



---
## test_convert_to_extension_array
```python
from test_pandas import test_convert_to_extension_array
```



---
## MyCustomIntegerType
```python
from test_pandas import MyCustomIntegerType
```



---
## test_conversion_extensiontype_to_extensionarray
```python
from test_pandas import test_conversion_extensiontype_to_extensionarray
```



---
## test_to_pandas_extension_dtypes_mapping
```python
from test_pandas import test_to_pandas_extension_dtypes_mapping
```



---
## test_array_to_pandas
```python
from test_pandas import test_array_to_pandas
```



---
## test_roundtrip_empty_table_with_extension_dtype_index
```python
from test_pandas import test_roundtrip_empty_table_with_extension_dtype_index
```



---
## test_to_pandas_types_mapper_index
```python
from test_pandas import test_to_pandas_types_mapper_index
```



---
## test_array_to_pandas_types_mapper
```python
from test_pandas import test_array_to_pandas_types_mapper
```



---
## test_chunked_array_to_pandas_types_mapper
```python
from test_pandas import test_chunked_array_to_pandas_types_mapper
```



---
## test_metadata_compat_range_index_pre_0_12
```python
from test_pandas import test_metadata_compat_range_index_pre_0_12
```



---
## test_metadata_compat_missing_field_name
```python
from test_pandas import test_metadata_compat_missing_field_name
```



---
## test_metadata_index_name_not_json_serializable
```python
from test_pandas import test_metadata_index_name_not_json_serializable
```



---
## test_metadata_index_name_is_json_serializable
```python
from test_pandas import test_metadata_index_name_is_json_serializable
```



---
## make_df_with_timestamps
```python
from test_pandas import make_df_with_timestamps
```



---
## test_timestamp_as_object_parquet
```python
from test_pandas import test_timestamp_as_object_parquet
```



---
## test_timestamp_as_object_out_of_range
```python
from test_pandas import test_timestamp_as_object_out_of_range
```



---
## test_timestamp_as_object_non_nanosecond
```python
from test_pandas import test_timestamp_as_object_non_nanosecond
```



---
## test_timestamp_as_object_fixed_offset
```python
from test_pandas import test_timestamp_as_object_fixed_offset
```



---
## test_threaded_pandas_import
```python
from test_pandas import test_threaded_pandas_import
```



---
## test_does_not_mutate_timedelta_dtype
```python
from test_pandas import test_does_not_mutate_timedelta_dtype
```



---
## test_does_not_mutate_timedelta_nested
```python
from test_pandas import test_does_not_mutate_timedelta_nested
```



---
## test_roundtrip_nested_map_table_with_pydicts
```python
from test_pandas import test_roundtrip_nested_map_table_with_pydicts
```



---
## test_roundtrip_nested_map_array_with_pydicts_sliced
```python
from test_pandas import test_roundtrip_nested_map_array_with_pydicts_sliced
```

Slightly more robust test with chunking and slicing

---
## test_roundtrip_map_array_with_pydicts_duplicate_keys
```python
from test_pandas import test_roundtrip_map_array_with_pydicts_duplicate_keys
```



---
## test_unhashable_map_keys_with_pydicts
```python
from test_pandas import test_unhashable_map_keys_with_pydicts
```



---
## test_table_column_conversion_for_datetime
```python
from test_pandas import test_table_column_conversion_for_datetime
```



---
## test_array_conversion_for_datetime
```python
from test_pandas import test_array_conversion_for_datetime
```



---
## test_nested_chunking_valid
```python
from test_pandas import test_nested_chunking_valid
```



---
## test_is_data_frame_race_condition
```python
from test_pandas import test_is_data_frame_race_condition
```



---
## test_non_string_columns
```python
from test_pandas import test_non_string_columns
```



---
## test_non_string_columns_with_index
```python
from test_pandas import test_non_string_columns_with_index
```



---
## test_from_pandas_with_columns
```python
from test_pandas import test_from_pandas_with_columns
```



---
## test_column_index_names_are_preserved
```python
from test_pandas import test_column_index_names_are_preserved
```



---
## test_column_index_names_with_tz
```python
from test_pandas import test_column_index_names_with_tz
```



---
## test_column_index_names_with_decimal
```python
from test_pandas import test_column_index_names_with_decimal
```



---
## test_range_index_shortcut
```python
from test_pandas import test_range_index_shortcut
```



---
## test_range_index_force_serialization
```python
from test_pandas import test_range_index_force_serialization
```



---
## test_rangeindex_doesnt_warn
```python
from test_pandas import test_rangeindex_doesnt_warn
```



---
## test_multiindex_columns
```python
from test_pandas import test_multiindex_columns
```



---
## test_multiindex_columns_with_dtypes
```python
from test_pandas import test_multiindex_columns_with_dtypes
```



---
## test_multiindex_with_column_dtype_object
```python
from test_pandas import test_multiindex_with_column_dtype_object
```



---
## test_multiindex_columns_unicode
```python
from test_pandas import test_multiindex_columns_unicode
```



---
## test_multiindex_doesnt_warn
```python
from test_pandas import test_multiindex_doesnt_warn
```



---
## test_integer_index_column
```python
from test_pandas import test_integer_index_column
```



---
## test_index_metadata_field_name
```python
from test_pandas import test_index_metadata_field_name
```



---
## test_categorical_column_index
```python
from test_pandas import test_categorical_column_index
```



---
## test_string_column_index
```python
from test_pandas import test_string_column_index
```



---
## test_datetimetz_column_index
```python
from test_pandas import test_datetimetz_column_index
```



---
## test_datetimetz_row_index
```python
from test_pandas import test_datetimetz_row_index
```



---
## test_categorical_row_index
```python
from test_pandas import test_categorical_row_index
```



---
## test_duplicate_column_names_does_not_crash
```python
from test_pandas import test_duplicate_column_names_does_not_crash
```



---
## test_dictionary_indices_boundscheck
```python
from test_pandas import test_dictionary_indices_boundscheck
```



---
## test_unicode_with_unicode_column_and_index
```python
from test_pandas import test_unicode_with_unicode_column_and_index
```



---
## test_mixed_column_names
```python
from test_pandas import test_mixed_column_names
```



---
## test_binary_column_name
```python
from test_pandas import test_binary_column_name
```



---
## test_multiindex_duplicate_values
```python
from test_pandas import test_multiindex_duplicate_values
```



---
## test_metadata_with_mixed_types
```python
from test_pandas import test_metadata_with_mixed_types
```



---
## test_ignore_metadata
```python
from test_pandas import test_ignore_metadata
```



---
## test_list_metadata
```python
from test_pandas import test_list_metadata
```



---
## test_struct_metadata
```python
from test_pandas import test_struct_metadata
```



---
## test_decimal_metadata
```python
from test_pandas import test_decimal_metadata
```



---
## test_table_column_subset_metadata
```python
from test_pandas import test_table_column_subset_metadata
```



---
## test_to_pandas_column_subset_multiindex
```python
from test_pandas import test_to_pandas_column_subset_multiindex
```



---
## test_empty_list_metadata
```python
from test_pandas import test_empty_list_metadata
```



---
## test_metadata_pandas_version
```python
from test_pandas import test_metadata_pandas_version
```



---
## test_mismatch_metadata_schema
```python
from test_pandas import test_mismatch_metadata_schema
```



---
## test_float_no_nulls
```python
from test_pandas import test_float_no_nulls
```



---
## test_float_nulls
```python
from test_pandas import test_float_nulls
```



---
## test_float_nulls_to_ints
```python
from test_pandas import test_float_nulls_to_ints
```



---
## test_float_nulls_to_boolean
```python
from test_pandas import test_float_nulls_to_boolean
```



---
## test_series_from_pandas_false_respected
```python
from test_pandas import test_series_from_pandas_false_respected
```



---
## test_integer_no_nulls
```python
from test_pandas import test_integer_no_nulls
```



---
## test_all_integer_types
```python
from test_pandas import test_all_integer_types
```



---
## test_integer_byteorder
```python
from test_pandas import test_integer_byteorder
```



---
## test_integer_with_nulls
```python
from test_pandas import test_integer_with_nulls
```



---
## test_array_from_pandas_type_cast
```python
from test_pandas import test_array_from_pandas_type_cast
```



---
## test_boolean_no_nulls
```python
from test_pandas import test_boolean_no_nulls
```



---
## test_boolean_nulls
```python
from test_pandas import test_boolean_nulls
```



---
## test_boolean_to_int
```python
from test_pandas import test_boolean_to_int
```



---
## test_boolean_objects_to_int
```python
from test_pandas import test_boolean_objects_to_int
```



---
## test_boolean_nulls_to_float
```python
from test_pandas import test_boolean_nulls_to_float
```



---
## test_boolean_multiple_columns
```python
from test_pandas import test_boolean_multiple_columns
```



---
## test_float_object_nulls
```python
from test_pandas import test_float_object_nulls
```



---
## test_float_with_null_as_integer
```python
from test_pandas import test_float_with_null_as_integer
```



---
## test_int_object_nulls
```python
from test_pandas import test_int_object_nulls
```



---
## test_boolean_object_nulls
```python
from test_pandas import test_boolean_object_nulls
```



---
## test_all_nulls_cast_numeric
```python
from test_pandas import test_all_nulls_cast_numeric
```



---
## test_half_floats_from_numpy
```python
from test_pandas import test_half_floats_from_numpy
```



---
## test_timestamps_notimezone_no_nulls
```python
from test_pandas import test_timestamps_notimezone_no_nulls
```



---
## test_timestamps_notimezone_nulls
```python
from test_pandas import test_timestamps_notimezone_nulls
```



---
## test_timestamps_with_timezone
```python
from test_pandas import test_timestamps_with_timezone
```



---
## test_python_datetime
```python
from test_pandas import test_python_datetime
```



---
## test_python_datetime_with_pytz_tzinfo
```python
from test_pandas import test_python_datetime_with_pytz_tzinfo
```



---
## test_python_datetime_with_pytz_timezone
```python
from test_pandas import test_python_datetime_with_pytz_timezone
```



---
## test_python_datetime_with_timezone_tzinfo
```python
from test_pandas import test_python_datetime_with_timezone_tzinfo
```



---
## test_python_datetime_subclass
```python
from test_pandas import test_python_datetime_subclass
```



---
## test_python_date_subclass
```python
from test_pandas import test_python_date_subclass
```



---
## test_datetime64_to_date32
```python
from test_pandas import test_datetime64_to_date32
```



---
## test_pandas_datetime_to_date64
```python
from test_pandas import test_pandas_datetime_to_date64
```



---
## test_array_types_date_as_object
```python
from test_pandas import test_array_types_date_as_object
```



---
## test_table_convert_date_as_object
```python
from test_pandas import test_table_convert_date_as_object
```



---
## test_array_coerce_temporal_nanoseconds
```python
from test_pandas import test_array_coerce_temporal_nanoseconds
```



---
## test_table_coerce_temporal_nanoseconds
```python
from test_pandas import test_table_coerce_temporal_nanoseconds
```



---
## test_date_infer
```python
from test_pandas import test_date_infer
```



---
## test_date_mask
```python
from test_pandas import test_date_mask
```



---
## test_date_objects_typed
```python
from test_pandas import test_date_objects_typed
```



---
## test_pandas_null_values
```python
from test_pandas import test_pandas_null_values
```



---
## test_dates_from_integers
```python
from test_pandas import test_dates_from_integers
```



---
## test_pytime_from_pandas
```python
from test_pandas import test_pytime_from_pandas
```



---
## test_arrow_time_to_pandas
```python
from test_pandas import test_arrow_time_to_pandas
```



---
## test_numpy_datetime64_columns
```python
from test_pandas import test_numpy_datetime64_columns
```



---
## test_timestamp_to_pandas_coerces_to_ns
```python
from test_pandas import test_timestamp_to_pandas_coerces_to_ns
```



---
## test_timestamp_to_pandas_out_of_bounds
```python
from test_pandas import test_timestamp_to_pandas_out_of_bounds
```



---
## test_timestamp_to_pandas_empty_chunked
```python
from test_pandas import test_timestamp_to_pandas_empty_chunked
```



---
## test_numpy_datetime64_day_unit
```python
from test_pandas import test_numpy_datetime64_day_unit
```



---
## test_array_from_pandas_date_with_mask
```python
from test_pandas import test_array_from_pandas_date_with_mask
```



---
## test_fixed_offset_timezone
```python
from test_pandas import test_fixed_offset_timezone
```



---
## test_timedeltas_no_nulls
```python
from test_pandas import test_timedeltas_no_nulls
```



---
## test_timedeltas_nulls
```python
from test_pandas import test_timedeltas_nulls
```



---
## test_month_day_nano_interval
```python
from test_pandas import test_month_day_nano_interval
```



---
## test_pandas_unicode
```python
from test_pandas import test_pandas_unicode
```



---
## test_bytes_to_binary
```python
from test_pandas import test_bytes_to_binary
```



---
## test_bytes_exceed_2gb
```python
from test_pandas import test_bytes_exceed_2gb
```



---
## test_auto_chunking_pandas_series_of_strings
```python
from test_pandas import test_auto_chunking_pandas_series_of_strings
```



---
## test_fixed_size_bytes
```python
from test_pandas import test_fixed_size_bytes
```



---
## test_fixed_size_bytes_does_not_accept_varying_lengths
```python
from test_pandas import test_fixed_size_bytes_does_not_accept_varying_lengths
```



---
## test_variable_size_bytes
```python
from test_pandas import test_variable_size_bytes
```



---
## test_binary_from_bytearray
```python
from test_pandas import test_binary_from_bytearray
```



---
## test_large_binary
```python
from test_pandas import test_large_binary
```



---
## test_large_string
```python
from test_pandas import test_large_string
```



---
## test_binary_view
```python
from test_pandas import test_binary_view
```



---
## test_string_view
```python
from test_pandas import test_string_view
```



---
## test_table_empty_str
```python
from test_pandas import test_table_empty_str
```



---
## test_selective_categoricals
```python
from test_pandas import test_selective_categoricals
```



---
## test_to_pandas_categorical_zero_length
```python
from test_pandas import test_to_pandas_categorical_zero_length
```



---
## test_to_pandas_categories_already_dictionary
```python
from test_pandas import test_to_pandas_categories_already_dictionary
```



---
## test_table_str_to_categorical_without_na
```python
from test_pandas import test_table_str_to_categorical_without_na
```



---
## test_table_str_to_categorical_with_na
```python
from test_pandas import test_table_str_to_categorical_with_na
```



---
## test_array_of_bytes_to_strings
```python
from test_pandas import test_array_of_bytes_to_strings
```



---
## test_array_of_bytes_to_strings_bad_data
```python
from test_pandas import test_array_of_bytes_to_strings_bad_data
```



---
## test_numpy_string_array_to_fixed_size_binary
```python
from test_pandas import test_numpy_string_array_to_fixed_size_binary
```



---
## test_decimal_from_pandas
```python
from test_pandas import test_decimal_from_pandas
```



---
## test_decimal_to_pandas
```python
from test_pandas import test_decimal_to_pandas
```



---
## test_decimal_fails_with_truncation
```python
from test_pandas import test_decimal_fails_with_truncation
```



---
## test_decimal_with_different_precisions
```python
from test_pandas import test_decimal_with_different_precisions
```



---
## test_decimal_with_None_explicit_type
```python
from test_pandas import test_decimal_with_None_explicit_type
```



---
## test_decimal_with_None_infer_type
```python
from test_pandas import test_decimal_with_None_infer_type
```



---
## test_strided_objects
```python
from test_pandas import test_strided_objects
```



---
## test_column_of_arrays
```python
from test_pandas import test_column_of_arrays
```



---
## test_column_of_arrays_to_py
```python
from test_pandas import test_column_of_arrays_to_py
```



---
## test_column_of_boolean_list
```python
from test_pandas import test_column_of_boolean_list
```



---
## test_column_of_decimal_list
```python
from test_pandas import test_column_of_decimal_list
```



---
## test_nested_types_from_ndarray_null_entries
```python
from test_pandas import test_nested_types_from_ndarray_null_entries
```



---
## test_column_of_lists
```python
from test_pandas import test_column_of_lists
```



---
## test_column_of_lists_first_empty
```python
from test_pandas import test_column_of_lists_first_empty
```



---
## test_column_of_lists_chunked
```python
from test_pandas import test_column_of_lists_chunked
```



---
## test_empty_column_of_lists_chunked
```python
from test_pandas import test_empty_column_of_lists_chunked
```



---
## test_column_of_lists_chunked2
```python
from test_pandas import test_column_of_lists_chunked2
```



---
## test_column_of_lists_strided
```python
from test_pandas import test_column_of_lists_strided
```



---
## test_nested_lists_all_none
```python
from test_pandas import test_nested_lists_all_none
```



---
## test_nested_lists_all_empty
```python
from test_pandas import test_nested_lists_all_empty
```



---
## test_nested_list_first_empty
```python
from test_pandas import test_nested_list_first_empty
```



---
## test_nested_smaller_ints
```python
from test_pandas import test_nested_smaller_ints
```



---
## test_infer_lists
```python
from test_pandas import test_infer_lists
```



---
## test_fixed_size_list
```python
from test_pandas import test_fixed_size_list
```



---
## test_infer_numpy_array
```python
from test_pandas import test_infer_numpy_array
```



---
## test_to_list_of_structs_pandas
```python
from test_pandas import test_to_list_of_structs_pandas
```



---
## test_to_list_of_maps_pandas
```python
from test_pandas import test_to_list_of_maps_pandas
```



---
## test_to_list_of_maps_pandas_sliced
```python
from test_pandas import test_to_list_of_maps_pandas_sliced
```

A slightly more rigorous test for chunk/slice combinations

---
## test_array_from_pandas_typed_array_with_mask
```python
from test_pandas import test_array_from_pandas_typed_array_with_mask
```



---
## test_empty_list_roundtrip
```python
from test_pandas import test_empty_list_roundtrip
```



---
## test_array_from_nested_arrays
```python
from test_pandas import test_array_from_nested_arrays
```



---
## test_nested_large_list
```python
from test_pandas import test_nested_large_list
```



---
## test_large_binary_list
```python
from test_pandas import test_large_binary_list
```



---
## test_list_of_dictionary
```python
from test_pandas import test_list_of_dictionary
```



---
## test_auto_chunking_on_list_overflow
```python
from test_pandas import test_auto_chunking_on_list_overflow
```



---
## test_map_array_roundtrip
```python
from test_pandas import test_map_array_roundtrip
```



---
## test_map_array_chunked
```python
from test_pandas import test_map_array_chunked
```



---
## test_map_array_with_nulls
```python
from test_pandas import test_map_array_with_nulls
```



---
## test_map_array_dictionary_encoded
```python
from test_pandas import test_map_array_dictionary_encoded
```



---
## test_list_no_duplicate_base
```python
from test_pandas import test_list_no_duplicate_base
```



---
## test_list_values_behind_null
```python
from test_pandas import test_list_values_behind_null
```



---
## test_list_view_to_pandas_with_in_order_offsets
```python
from test_pandas import test_list_view_to_pandas_with_in_order_offsets
```



---
## test_list_view_to_pandas_with_out_of_order_offsets
```python
from test_pandas import test_list_view_to_pandas_with_out_of_order_offsets
```



---
## test_list_view_to_pandas_with_overlapping_offsets
```python
from test_pandas import test_list_view_to_pandas_with_overlapping_offsets
```



---
## test_list_view_to_pandas_with_null_values
```python
from test_pandas import test_list_view_to_pandas_with_null_values
```



---
## test_list_view_to_pandas_multiple_chunks
```python
from test_pandas import test_list_view_to_pandas_multiple_chunks
```



---
## test_pandas_roundtrip
```python
from test_pandas import test_pandas_roundtrip
```



---
## test_to_pandas
```python
from test_pandas import test_to_pandas
```



---
## test_to_pandas_multiple_chunks
```python
from test_pandas import test_to_pandas_multiple_chunks
```



---
## test_from_numpy
```python
from test_pandas import test_from_numpy
```



---
## test_from_numpy_nested
```python
from test_pandas import test_from_numpy_nested
```



---
## test_from_numpy_large
```python
from test_pandas import test_from_numpy_large
```



---
## test_from_numpy_bad_input
```python
from test_pandas import test_from_numpy_bad_input
```



---
## test_from_tuples
```python
from test_pandas import test_from_tuples
```



---
## test_struct_of_dictionary
```python
from test_pandas import test_struct_of_dictionary
```



---
## test_zero_copy_success
```python
from test_pandas import test_zero_copy_success
```



---
## test_zero_copy_dictionaries
```python
from test_pandas import test_zero_copy_dictionaries
```



---
## test_zero_copy_timestamp
```python
from test_pandas import test_zero_copy_timestamp
```



---
## test_zero_copy_duration
```python
from test_pandas import test_zero_copy_duration
```



---
## check_zero_copy_failure
```python
from test_pandas import check_zero_copy_failure
```



---
## test_zero_copy_failure_on_object_types
```python
from test_pandas import test_zero_copy_failure_on_object_types
```



---
## test_zero_copy_failure_with_int_when_nulls
```python
from test_pandas import test_zero_copy_failure_with_int_when_nulls
```



---
## test_zero_copy_failure_with_float_when_nulls
```python
from test_pandas import test_zero_copy_failure_with_float_when_nulls
```



---
## test_zero_copy_failure_on_bool_types
```python
from test_pandas import test_zero_copy_failure_on_bool_types
```



---
## test_zero_copy_failure_on_list_types
```python
from test_pandas import test_zero_copy_failure_on_list_types
```



---
## test_zero_copy_failure_on_timestamp_with_nulls
```python
from test_pandas import test_zero_copy_failure_on_timestamp_with_nulls
```



---
## test_zero_copy_failure_on_duration_with_nulls
```python
from test_pandas import test_zero_copy_failure_on_duration_with_nulls
```



---
## test_all_none_objects
```python
from test_pandas import test_all_none_objects
```



---
## test_all_none_category
```python
from test_pandas import test_all_none_category
```



---
## test_empty_arrays
```python
from test_pandas import test_empty_arrays
```



---
## test_non_threaded_conversion
```python
from test_pandas import test_non_threaded_conversion
```



---
## test_threaded_conversion_multiprocess
```python
from test_pandas import test_threaded_conversion_multiprocess
```



---
## test_category
```python
from test_pandas import test_category
```



---
## test_category_implicit_from_pandas
```python
from test_pandas import test_category_implicit_from_pandas
```



---
## test_empty_category
```python
from test_pandas import test_empty_category
```



---
## test_category_zero_chunks
```python
from test_pandas import test_category_zero_chunks
```



---
## test_mixed_types_fails
```python
from test_pandas import test_mixed_types_fails
```



---
## test_strided_data_import
```python
from test_pandas import test_strided_data_import
```



---
## test_all_nones
```python
from test_pandas import test_all_nones
```



---
## test_partial_schema
```python
from test_pandas import test_partial_schema
```



---
## test_table_batch_empty_dataframe
```python
from test_pandas import test_table_batch_empty_dataframe
```



---
## test_convert_empty_table
```python
from test_pandas import test_convert_empty_table
```



---
## test_non_natural_stride
```python
from test_pandas import test_non_natural_stride
```

ARROW-2172: converting from a Numpy array with a stride that's
not a multiple of itemsize.

---
## test_array_from_strided_numpy_array
```python
from test_pandas import test_array_from_strided_numpy_array
```



---
## test_safe_unsafe_casts
```python
from test_pandas import test_safe_unsafe_casts
```



---
## test_error_sparse
```python
from test_pandas import test_error_sparse
```



---
## A
```python
from test_pandas import A
```



---
## _make_table
```python
from test_pandas import _make_table
```



---
## __arrow_ext_serialize__
```python
from test_pandas import __arrow_ext_serialize__
```



---
## __arrow_ext_deserialize__
```python
from test_pandas import __arrow_ext_deserialize__
```



---
## to_pandas_dtype
```python
from test_pandas import to_pandas_dtype
```



---
## assert_roundtrip
```python
from test_pandas import assert_roundtrip
```



---
## roundtrip
```python
from test_pandas import roundtrip
```



---
## _check_type
```python
from test_pandas import _check_type
```



---
## MyDatetime
```python
from test_pandas import MyDatetime
```



---
## MyDate
```python
from test_pandas import MyDate
```



---
## iter_chunked_array
```python
from test_pandas import iter_chunked_array
```



---
## check
```python
from test_pandas import check
```



---
## _check
```python
from test_pandas import _check
```



---
## _check_series
```python
from test_pandas import _check_series
```



---
## truncate
```python
from test_pandas import truncate
```



---
## __name__
```python
from test_memory import __name__
```



---
## supported_factories
```python
from test_memory import supported_factories
```



---
## allocate_bytes
```python
from test_memory import allocate_bytes
```

Temporarily allocate *nbytes* from the given *pool*.

---
## check_allocated_bytes
```python
from test_memory import check_allocated_bytes
```

Check allocation stats on *pool*.

---
## test_default_allocated_bytes
```python
from test_memory import test_default_allocated_bytes
```



---
## test_proxy_memory_pool
```python
from test_memory import test_proxy_memory_pool
```



---
## test_logging_memory_pool
```python
from test_memory import test_logging_memory_pool
```



---
## test_set_memory_pool
```python
from test_memory import test_set_memory_pool
```



---
## test_default_backend_name
```python
from test_memory import test_default_backend_name
```



---
## test_release_unused
```python
from test_memory import test_release_unused
```



---
## check_env_var
```python
from test_memory import check_env_var
```



---
## test_env_var
```python
from test_memory import test_env_var
```



---
## test_specific_memory_pools
```python
from test_memory import test_specific_memory_pools
```



---
## test_supported_memory_backends
```python
from test_memory import test_supported_memory_backends
```



---
## run_debug_memory_pool
```python
from test_memory import run_debug_memory_pool
```

Run a piece of code making an invalid memory write with the
ARROW_DEBUG_MEMORY_POOL environment variable set to a specific value.

---
## test_debug_memory_pool_abort
```python
from test_memory import test_debug_memory_pool_abort
```



---
## test_debug_memory_pool_trap
```python
from test_memory import test_debug_memory_pool_trap
```



---
## test_debug_memory_pool_warn
```python
from test_memory import test_debug_memory_pool_warn
```



---
## check_debug_memory_pool_disabled
```python
from test_memory import check_debug_memory_pool_disabled
```



---
## test_debug_memory_pool_none
```python
from test_memory import test_debug_memory_pool_none
```



---
## test_debug_memory_pool_empty
```python
from test_memory import test_debug_memory_pool_empty
```



---
## test_debug_memory_pool_unknown
```python
from test_memory import test_debug_memory_pool_unknown
```



---
## check
```python
from test_memory import check
```



---
## __name__
```python
from test_exec_plan import __name__
```



---
## test_joins_corner_cases
```python
from test_exec_plan import test_joins_corner_cases
```



---
## test_joins
```python
from test_exec_plan import test_joins
```



---
## test_table_join_collisions
```python
from test_exec_plan import test_table_join_collisions
```



---
## test_table_join_keys_order
```python
from test_exec_plan import test_table_join_keys_order
```



---
## test_filter_table_errors
```python
from test_exec_plan import test_filter_table_errors
```



---
## test_filter_table
```python
from test_exec_plan import test_filter_table
```



---
## test_filter_table_ordering
```python
from test_exec_plan import test_filter_table_ordering
```



---
## test_complex_filter_table
```python
from test_exec_plan import test_complex_filter_table
```



---
## test_join_extension_array_column
```python
from test_exec_plan import test_join_extension_array_column
```



---
## test_group_by_ordering
```python
from test_exec_plan import test_group_by_ordering
```



---
## __name__
```python
from test_flight import __name__
```



---
## test_import
```python
from test_flight import test_import
```



---
## resource_root
```python
from test_flight import resource_root
```

Get the path to the test resources directory.

---
## read_flight_resource
```python
from test_flight import read_flight_resource
```

Get the contents of a test resource file.

---
## example_tls_certs
```python
from test_flight import example_tls_certs
```

Get the paths to test TLS certificates.

---
## simple_ints_table
```python
from test_flight import simple_ints_table
```



---
## simple_dicts_table
```python
from test_flight import simple_dicts_table
```



---
## multiple_column_table
```python
from test_flight import multiple_column_table
```



---
## ConstantFlightServer
```python
from test_flight import ConstantFlightServer
```

A Flight server that always returns the same data.

See ARROW-4796: this server implementation will segfault if Flight
does not properly hold a reference to the Table object.

---
## MetadataFlightServer
```python
from test_flight import MetadataFlightServer
```

A Flight server that numbers incoming/outgoing data.

---
## EchoFlightServer
```python
from test_flight import EchoFlightServer
```

A Flight server that returns the last data uploaded.

---
## EchoStreamFlightServer
```python
from test_flight import EchoStreamFlightServer
```

An echo server that streams individual record batches.

---
## GetInfoFlightServer
```python
from test_flight import GetInfoFlightServer
```

A Flight server that tests GetFlightInfo.

---
## ListActionsFlightServer
```python
from test_flight import ListActionsFlightServer
```

A Flight server that tests ListActions.

---
## ListActionsErrorFlightServer
```python
from test_flight import ListActionsErrorFlightServer
```

A Flight server that tests ListActions.

---
## CheckTicketFlightServer
```python
from test_flight import CheckTicketFlightServer
```

A Flight server that compares the given ticket to an expected value.

---
## InvalidStreamFlightServer
```python
from test_flight import InvalidStreamFlightServer
```

A Flight server that tries to return messages with differing schemas.

---
## NeverSendsDataFlightServer
```python
from test_flight import NeverSendsDataFlightServer
```

A Flight server that never actually yields data.

---
## SlowFlightServer
```python
from test_flight import SlowFlightServer
```

A Flight server that delays its responses to test timeouts.

---
## ErrorFlightServer
```python
from test_flight import ErrorFlightServer
```

A Flight server that uses all the Flight-specific errors.

---
## ExchangeFlightServer
```python
from test_flight import ExchangeFlightServer
```

A server for testing DoExchange.

---
## HttpBasicServerAuthHandler
```python
from test_flight import HttpBasicServerAuthHandler
```

An example implementation of HTTP basic authentication.

---
## HttpBasicClientAuthHandler
```python
from test_flight import HttpBasicClientAuthHandler
```

An example implementation of HTTP basic authentication.

---
## TokenServerAuthHandler
```python
from test_flight import TokenServerAuthHandler
```

An example implementation of authentication via handshake.

---
## TokenClientAuthHandler
```python
from test_flight import TokenClientAuthHandler
```

An example implementation of authentication via handshake.

---
## NoopAuthHandler
```python
from test_flight import NoopAuthHandler
```

A no-op auth handler.

---
## case_insensitive_header_lookup
```python
from test_flight import case_insensitive_header_lookup
```

Lookup the value of given key in the given headers.
The key lookup is case-insensitive.

---
## ClientHeaderAuthMiddlewareFactory
```python
from test_flight import ClientHeaderAuthMiddlewareFactory
```

ClientMiddlewareFactory that creates ClientAuthHeaderMiddleware.

---
## ClientHeaderAuthMiddleware
```python
from test_flight import ClientHeaderAuthMiddleware
```

ClientMiddleware that extracts the authorization header
from the server.

This is an example of a ClientMiddleware that can extract
the bearer token authorization header from a HTTP header
authentication enabled server.

Parameters
----------
factory : ClientHeaderAuthMiddlewareFactory
    This factory is used to set call credentials if an
    authorization header is found in the headers from the server.

---
## HeaderAuthServerMiddlewareFactory
```python
from test_flight import HeaderAuthServerMiddlewareFactory
```

Validates incoming username and password.

---
## HeaderAuthServerMiddleware
```python
from test_flight import HeaderAuthServerMiddleware
```

A ServerMiddleware that transports incoming username and password.

---
## HeaderAuthFlightServer
```python
from test_flight import HeaderAuthFlightServer
```

A Flight server that tests with basic token authentication. 

---
## ArbitraryHeadersServerMiddlewareFactory
```python
from test_flight import ArbitraryHeadersServerMiddlewareFactory
```

A ServerMiddlewareFactory that transports arbitrary headers.

---
## ArbitraryHeadersServerMiddleware
```python
from test_flight import ArbitraryHeadersServerMiddleware
```

A ServerMiddleware that transports arbitrary headers.

---
## ArbitraryHeadersFlightServer
```python
from test_flight import ArbitraryHeadersFlightServer
```

A Flight server that tests multiple arbitrary headers.

---
## HeaderServerMiddleware
```python
from test_flight import HeaderServerMiddleware
```

Expose a per-call value to the RPC method body.

---
## HeaderServerMiddlewareFactory
```python
from test_flight import HeaderServerMiddlewareFactory
```

Expose a per-call hard-coded value to the RPC method body.

---
## HeaderFlightServer
```python
from test_flight import HeaderFlightServer
```

Echo back the per-call hard-coded value.

---
## MultiHeaderFlightServer
```python
from test_flight import MultiHeaderFlightServer
```

Test sending/receiving multiple (binary-valued) headers.

---
## SelectiveAuthServerMiddlewareFactory
```python
from test_flight import SelectiveAuthServerMiddlewareFactory
```

Deny access to certain methods based on a header.

---
## SelectiveAuthClientMiddlewareFactory
```python
from test_flight import SelectiveAuthClientMiddlewareFactory
```



---
## SelectiveAuthClientMiddleware
```python
from test_flight import SelectiveAuthClientMiddleware
```



---
## RecordingServerMiddlewareFactory
```python
from test_flight import RecordingServerMiddlewareFactory
```

Record what methods were called.

---
## RecordingClientMiddlewareFactory
```python
from test_flight import RecordingClientMiddlewareFactory
```

Record what methods were called.

---
## MultiHeaderClientMiddlewareFactory
```python
from test_flight import MultiHeaderClientMiddlewareFactory
```

Test sending/receiving multiple (binary-valued) headers.

---
## MultiHeaderClientMiddleware
```python
from test_flight import MultiHeaderClientMiddleware
```

Test sending/receiving multiple (binary-valued) headers.

---
## MultiHeaderServerMiddlewareFactory
```python
from test_flight import MultiHeaderServerMiddlewareFactory
```

Test sending/receiving multiple (binary-valued) headers.

---
## MultiHeaderServerMiddleware
```python
from test_flight import MultiHeaderServerMiddleware
```

Test sending/receiving multiple (binary-valued) headers.

---
## LargeMetadataFlightServer
```python
from test_flight import LargeMetadataFlightServer
```

Regression test for ARROW-13253.

---
## test_repr
```python
from test_flight import test_repr
```



---
## test_eq
```python
from test_flight import test_eq
```



---
## test_flight_server_location_argument
```python
from test_flight import test_flight_server_location_argument
```



---
## test_server_exit_reraises_exception
```python
from test_flight import test_server_exit_reraises_exception
```



---
## test_client_wait_for_available
```python
from test_flight import test_client_wait_for_available
```



---
## test_flight_list_flights
```python
from test_flight import test_flight_list_flights
```

Try a simple list_flights call.

---
## test_flight_client_close
```python
from test_flight import test_flight_client_close
```



---
## test_flight_do_get_ints
```python
from test_flight import test_flight_do_get_ints
```

Try a simple do_get call.

---
## test_do_get_ints_pandas
```python
from test_flight import test_do_get_ints_pandas
```

Try a simple do_get call.

---
## test_flight_do_get_dicts
```python
from test_flight import test_flight_do_get_dicts
```



---
## test_flight_do_get_ticket
```python
from test_flight import test_flight_do_get_ticket
```

Make sure Tickets get passed to the server.

---
## test_flight_get_info
```python
from test_flight import test_flight_get_info
```

Make sure FlightEndpoint accepts string and object URIs.

---
## test_flight_get_schema
```python
from test_flight import test_flight_get_schema
```

Make sure GetSchema returns correct schema.

---
## test_list_actions
```python
from test_flight import test_list_actions
```

Make sure the return type of ListActions is validated.

---
## ConvenienceServer
```python
from test_flight import ConvenienceServer
```

Server for testing various implementation conveniences (auto-boxing, etc.)

---
## test_do_action_result_convenience
```python
from test_flight import test_do_action_result_convenience
```



---
## test_nicer_server_exceptions
```python
from test_flight import test_nicer_server_exceptions
```



---
## test_get_port
```python
from test_flight import test_get_port
```

Make sure port() works.

---
## test_flight_domain_socket
```python
from test_flight import test_flight_domain_socket
```

Try a simple do_get call over a Unix domain socket.

---
## test_flight_large_message
```python
from test_flight import test_flight_large_message
```

Try sending/receiving a large message via Flight.

See ARROW-4421: by default, gRPC won't allow us to send messages >
4MiB in size.

---
## test_flight_generator_stream
```python
from test_flight import test_flight_generator_stream
```

Try downloading a flight of RecordBatches in a GeneratorStream.

---
## test_flight_invalid_generator_stream
```python
from test_flight import test_flight_invalid_generator_stream
```

Try streaming data with mismatched schemas.

---
## test_timeout_fires
```python
from test_flight import test_timeout_fires
```

Make sure timeouts fire on slow requests.

---
## test_timeout_passes
```python
from test_flight import test_timeout_passes
```

Make sure timeouts do not fire on fast requests.

---
## test_read_options
```python
from test_flight import test_read_options
```

Make sure ReadOptions can be used.

---
## test_http_basic_unauth
```python
from test_flight import test_http_basic_unauth
```

Test that auth fails when not authenticated.

---
## test_http_basic_auth
```python
from test_flight import test_http_basic_auth
```

Test a Python implementation of HTTP basic authentication.

---
## test_http_basic_auth_invalid_password
```python
from test_flight import test_http_basic_auth_invalid_password
```

Test that auth fails with the wrong password.

---
## test_token_auth
```python
from test_flight import test_token_auth
```

Test an auth mechanism that uses a handshake.

---
## test_token_auth_invalid
```python
from test_flight import test_token_auth_invalid
```

Test an auth mechanism that uses a handshake.

---
## test_authenticate_basic_token
```python
from test_flight import test_authenticate_basic_token
```

Test authenticate_basic_token with bearer token and auth headers.

---
## test_authenticate_basic_token_invalid_password
```python
from test_flight import test_authenticate_basic_token_invalid_password
```

Test authenticate_basic_token with an invalid password.

---
## test_authenticate_basic_token_and_action
```python
from test_flight import test_authenticate_basic_token_and_action
```

Test authenticate_basic_token and doAction after authentication.

---
## test_authenticate_basic_token_with_client_middleware
```python
from test_flight import test_authenticate_basic_token_with_client_middleware
```

Test authenticate_basic_token with client middleware
to intercept authorization header returned by the
HTTP header auth enabled server.

---
## test_arbitrary_headers_in_flight_call_options
```python
from test_flight import test_arbitrary_headers_in_flight_call_options
```

Test passing multiple arbitrary headers to the middleware.

---
## test_location_invalid
```python
from test_flight import test_location_invalid
```

Test constructing invalid URIs.

---
## test_location_unknown_scheme
```python
from test_flight import test_location_unknown_scheme
```

Test creating locations for unknown schemes.

---
## test_tls_fails
```python
from test_flight import test_tls_fails
```

Make sure clients cannot connect when cert verification fails.

---
## test_tls_do_get
```python
from test_flight import test_tls_do_get
```

Try a simple do_get call over TLS.

---
## test_tls_disable_server_verification
```python
from test_flight import test_tls_disable_server_verification
```

Try a simple do_get call over TLS with server verification disabled.

---
## test_tls_override_hostname
```python
from test_flight import test_tls_override_hostname
```

Check that incorrectly overriding the hostname fails.

---
## test_flight_do_get_metadata
```python
from test_flight import test_flight_do_get_metadata
```

Try a simple do_get call with metadata.

---
## test_flight_do_get_metadata_v4
```python
from test_flight import test_flight_do_get_metadata_v4
```

Try a simple do_get call with V4 metadata version.

---
## test_flight_do_put_metadata
```python
from test_flight import test_flight_do_put_metadata
```

Try a simple do_put call with metadata.

---
## test_flight_do_put_limit
```python
from test_flight import test_flight_do_put_limit
```

Try a simple do_put call with a size limit.

---
## test_cancel_do_get
```python
from test_flight import test_cancel_do_get
```

Test canceling a DoGet operation on the client side.

---
## test_cancel_do_get_threaded
```python
from test_flight import test_cancel_do_get_threaded
```

Test canceling a DoGet operation from another thread.

---
## test_streaming_do_action
```python
from test_flight import test_streaming_do_action
```



---
## test_roundtrip_types
```python
from test_flight import test_roundtrip_types
```

Make sure serializable types round-trip.

---
## test_roundtrip_errors
```python
from test_flight import test_roundtrip_errors
```

Ensure that Flight errors propagate from server to client.

---
## test_do_put_independent_read_write
```python
from test_flight import test_do_put_independent_read_write
```

Ensure that separate threads can read/write on a DoPut.

---
## test_server_middleware_same_thread
```python
from test_flight import test_server_middleware_same_thread
```

Ensure that server middleware run on the same thread as the RPC.

---
## test_middleware_reject
```python
from test_flight import test_middleware_reject
```

Test rejecting an RPC with server middleware.

---
## test_middleware_mapping
```python
from test_flight import test_middleware_mapping
```

Test that middleware records methods correctly.

---
## test_extra_info
```python
from test_flight import test_extra_info
```



---
## test_mtls
```python
from test_flight import test_mtls
```

Test mutual TLS (mTLS) with gRPC.

---
## test_doexchange_get
```python
from test_flight import test_doexchange_get
```

Emulate DoGet with DoExchange.

---
## test_doexchange_put
```python
from test_flight import test_doexchange_put
```

Emulate DoPut with DoExchange.

---
## test_doexchange_echo
```python
from test_flight import test_doexchange_echo
```

Try a DoExchange echo server.

---
## test_doexchange_echo_v4
```python
from test_flight import test_doexchange_echo_v4
```

Try a DoExchange echo server using the V4 metadata version.

---
## test_doexchange_transform
```python
from test_flight import test_doexchange_transform
```

Transform a table with a service.

---
## test_middleware_multi_header
```python
from test_flight import test_middleware_multi_header
```

Test sending/receiving multiple (binary-valued) headers.

---
## test_generic_options
```python
from test_flight import test_generic_options
```

Test setting generic client options.

---
## CancelFlightServer
```python
from test_flight import CancelFlightServer
```

A server for testing StopToken.

---
## test_interrupt
```python
from test_flight import test_interrupt
```



---
## test_never_sends_data
```python
from test_flight import test_never_sends_data
```



---
## test_large_descriptor
```python
from test_flight import test_large_descriptor
```



---
## test_large_metadata_client
```python
from test_flight import test_large_metadata_client
```



---
## ActionNoneFlightServer
```python
from test_flight import ActionNoneFlightServer
```

A server that implements a side effect to a non iterable action.

---
## test_none_action_side_effect
```python
from test_flight import test_none_action_side_effect
```

Ensure that actions are executed even when we don't consume iterator.

See https://issues.apache.org/jira/browse/ARROW-14255

---
## test_write_error_propagation
```python
from test_flight import test_write_error_propagation
```

Ensure that exceptions during writing preserve error context.

See https://issues.apache.org/jira/browse/ARROW-16592.

---
## test_interpreter_shutdown
```python
from test_flight import test_interpreter_shutdown
```

Ensure that the gRPC server is stopped at interpreter shutdown.

See https://issues.apache.org/jira/browse/ARROW-16597.

---
## TracingFlightServer
```python
from test_flight import TracingFlightServer
```

A server that echoes back trace context values.

---
## test_tracing
```python
from test_flight import test_tracing
```



---
## test_do_put_does_not_crash_when_schema_is_none
```python
from test_flight import test_do_put_does_not_crash_when_schema_is_none
```



---
## test_headers_trailers
```python
from test_flight import test_headers_trailers
```

Ensure that server-sent headers/trailers make it through.

---
## __init__
```python
from test_flight import __init__
```



---
## list_flights
```python
from test_flight import list_flights
```



---
## do_get
```python
from test_flight import do_get
```



---
## do_put
```python
from test_flight import do_put
```



---
## number_batches
```python
from test_flight import number_batches
```



---
## do_exchange
```python
from test_flight import do_exchange
```



---
## list_actions
```python
from test_flight import list_actions
```



---
## do_action
```python
from test_flight import do_action
```



---
## get_flight_info
```python
from test_flight import get_flight_info
```



---
## get_schema
```python
from test_flight import get_schema
```



---
## expected_actions
```python
from test_flight import expected_actions
```



---
## slow_stream
```python
from test_flight import slow_stream
```



---
## error_cases
```python
from test_flight import error_cases
```



---
## exchange_do_get
```python
from test_flight import exchange_do_get
```

Emulate DoGet with DoExchange.

---
## exchange_do_put
```python
from test_flight import exchange_do_put
```

Emulate DoPut with DoExchange.

---
## exchange_echo
```python
from test_flight import exchange_echo
```

Run a simple echo server.

---
## exchange_transform
```python
from test_flight import exchange_transform
```

Sum rows in an uploaded table.

---
## authenticate
```python
from test_flight import authenticate
```

Do nothing.

---
## is_valid
```python
from test_flight import is_valid
```

Returning an empty string.
Returning None causes Type error.

---
## get_token
```python
from test_flight import get_token
```



---
## start_call
```python
from test_flight import start_call
```



---
## set_call_credential
```python
from test_flight import set_call_credential
```



---
## received_headers
```python
from test_flight import received_headers
```



---
## sending_headers
```python
from test_flight import sending_headers
```



---
## serve
```python
from test_flight import serve
```



---
## simple_action_results
```python
from test_flight import simple_action_results
```



---
## signal_from_thread
```python
from test_flight import signal_from_thread
```



---
## test
```python
from test_flight import test
```



---
## FailServer
```python
from test_flight import FailServer
```



---
## HeadersTrailersFlightServer
```python
from test_flight import HeadersTrailersFlightServer
```



---
## HeadersTrailersMiddlewareFactory
```python
from test_flight import HeadersTrailersMiddlewareFactory
```



---
## HeadersTrailersMiddleware
```python
from test_flight import HeadersTrailersMiddleware
```



---
## block_read
```python
from test_flight import block_read
```



---
## _reader_thread
```python
from test_flight import _reader_thread
```



---
## _reader
```python
from test_flight import _reader
```



---
## gen
```python
from test_flight import gen
```



---
## __name__
```python
from test_device import __name__
```



---
## test_device_memory_manager
```python
from test_device import test_device_memory_manager
```



---
## test_buffer_device
```python
from test_device import test_buffer_device
```



---
## __name__
```python
from read_record_batch import __name__
```



---
## PyCapsule_IsValid
```python
from test_dlpack import PyCapsule_IsValid
```



---
## check_dlpack_export
```python
from test_dlpack import check_dlpack_export
```



---
## check_bytes_allocated
```python
from test_dlpack import check_bytes_allocated
```



---
## test_dlpack
```python
from test_dlpack import test_dlpack
```



---
## test_dlpack_not_supported
```python
from test_dlpack import test_dlpack_not_supported
```



---
## test_dlpack_cuda_not_supported
```python
from test_dlpack import test_dlpack_cuda_not_supported
```



---
## wrapper
```python
from test_dlpack import wrapper
```



---
## generate_col_names
```python
from test_json import generate_col_names
```



---
## make_random_json
```python
from test_json import make_random_json
```



---
## check_options_class_pickling
```python
from test_json import check_options_class_pickling
```



---
## test_read_options
```python
from test_json import test_read_options
```



---
## test_parse_options
```python
from test_json import test_parse_options
```



---
## BaseTestJSONRead
```python
from test_json import BaseTestJSONRead
```



---
## TestSerialJSONRead
```python
from test_json import TestSerialJSONRead
```



---
## TestParallelJSONRead
```python
from test_json import TestParallelJSONRead
```



---
## read_bytes
```python
from test_json import read_bytes
```



---
## check_names
```python
from test_json import check_names
```



---
## test_file_object
```python
from test_json import test_file_object
```



---
## test_block_sizes
```python
from test_json import test_block_sizes
```



---
## test_no_newline_at_end
```python
from test_json import test_no_newline_at_end
```



---
## test_simple_ints
```python
from test_json import test_simple_ints
```



---
## test_simple_varied
```python
from test_json import test_simple_varied
```



---
## test_simple_nulls
```python
from test_json import test_simple_nulls
```



---
## test_empty_lists
```python
from test_json import test_empty_lists
```



---
## test_empty_rows
```python
from test_json import test_empty_rows
```



---
## test_reconcile_across_blocks
```python
from test_json import test_reconcile_across_blocks
```



---
## test_explicit_schema_decimal
```python
from test_json import test_explicit_schema_decimal
```



---
## test_explicit_schema_with_unexpected_behaviour
```python
from test_json import test_explicit_schema_with_unexpected_behaviour
```



---
## test_small_random_json
```python
from test_json import test_small_random_json
```



---
## test_load_large_json
```python
from test_json import test_load_large_json
```



---
## test_stress_block_sizes
```python
from test_json import test_stress_block_sizes
```



---
## read_json
```python
from test_json import read_json
```



---
## __name__
```python
from test_compute import __name__
```



---
## test_exported_functions
```python
from test_compute import test_exported_functions
```



---
## test_hash_aggregate_not_exported
```python
from test_compute import test_hash_aggregate_not_exported
```



---
## test_exported_option_classes
```python
from test_compute import test_exported_option_classes
```



---
## test_option_class_equality
```python
from test_compute import test_option_class_equality
```



---
## test_list_functions
```python
from test_compute import test_list_functions
```



---
## _check_get_function
```python
from test_compute import _check_get_function
```



---
## test_get_function_scalar
```python
from test_compute import test_get_function_scalar
```



---
## test_get_function_vector
```python
from test_compute import test_get_function_vector
```



---
## test_get_function_scalar_aggregate
```python
from test_compute import test_get_function_scalar_aggregate
```



---
## test_get_function_hash_aggregate
```python
from test_compute import test_get_function_hash_aggregate
```



---
## test_call_function_with_memory_pool
```python
from test_compute import test_call_function_with_memory_pool
```



---
## test_pickle_functions
```python
from test_compute import test_pickle_functions
```



---
## test_pickle_global_functions
```python
from test_compute import test_pickle_global_functions
```



---
## test_function_attributes
```python
from test_compute import test_function_attributes
```



---
## test_input_type_conversion
```python
from test_compute import test_input_type_conversion
```



---
## test_sum_array
```python
from test_compute import test_sum_array
```



---
## test_sum_chunked_array
```python
from test_compute import test_sum_chunked_array
```



---
## test_mode_array
```python
from test_compute import test_mode_array
```



---
## test_mode_chunked_array
```python
from test_compute import test_mode_chunked_array
```



---
## test_empty_chunked_array
```python
from test_compute import test_empty_chunked_array
```



---
## test_variance
```python
from test_compute import test_variance
```



---
## test_count_substring
```python
from test_compute import test_count_substring
```



---
## test_count_substring_regex
```python
from test_compute import test_count_substring_regex
```



---
## test_find_substring
```python
from test_compute import test_find_substring
```



---
## test_match_like
```python
from test_compute import test_match_like
```



---
## test_match_substring
```python
from test_compute import test_match_substring
```



---
## test_match_substring_regex
```python
from test_compute import test_match_substring_regex
```



---
## test_trim
```python
from test_compute import test_trim
```



---
## test_slice_compatibility
```python
from test_compute import test_slice_compatibility
```



---
## test_binary_slice_compatibility
```python
from test_compute import test_binary_slice_compatibility
```



---
## test_split_pattern
```python
from test_compute import test_split_pattern
```



---
## test_split_whitespace_utf8
```python
from test_compute import test_split_whitespace_utf8
```



---
## test_split_whitespace_ascii
```python
from test_compute import test_split_whitespace_ascii
```



---
## test_split_pattern_regex
```python
from test_compute import test_split_pattern_regex
```



---
## test_min_max
```python
from test_compute import test_min_max
```



---
## test_any
```python
from test_compute import test_any
```



---
## test_all
```python
from test_compute import test_all
```



---
## test_is_valid
```python
from test_compute import test_is_valid
```



---
## test_generated_docstrings
```python
from test_compute import test_generated_docstrings
```



---
## test_generated_signatures
```python
from test_compute import test_generated_signatures
```



---
## find_new_unicode_codepoints
```python
from test_compute import find_new_unicode_codepoints
```



---
## test_string_py_compat_boolean
```python
from test_compute import test_string_py_compat_boolean
```



---
## test_pad
```python
from test_compute import test_pad
```



---
## test_replace_slice
```python
from test_compute import test_replace_slice
```



---
## test_replace_plain
```python
from test_compute import test_replace_plain
```



---
## test_replace_regex
```python
from test_compute import test_replace_regex
```



---
## test_extract_regex
```python
from test_compute import test_extract_regex
```



---
## test_binary_join
```python
from test_compute import test_binary_join
```



---
## test_binary_join_element_wise
```python
from test_compute import test_binary_join_element_wise
```



---
## test_take
```python
from test_compute import test_take
```



---
## test_take_indices_types
```python
from test_compute import test_take_indices_types
```



---
## test_take_on_chunked_array
```python
from test_compute import test_take_on_chunked_array
```



---
## test_take_dictionary
```python
from test_compute import test_take_dictionary
```



---
## test_take_null_type
```python
from test_compute import test_take_null_type
```



---
## test_drop_null
```python
from test_compute import test_drop_null
```



---
## test_drop_null_chunked_array
```python
from test_compute import test_drop_null_chunked_array
```



---
## test_drop_null_record_batch
```python
from test_compute import test_drop_null_record_batch
```



---
## test_drop_null_table
```python
from test_compute import test_drop_null_table
```



---
## test_drop_null_null_type
```python
from test_compute import test_drop_null_null_type
```



---
## test_filter
```python
from test_compute import test_filter
```



---
## test_filter_chunked_array
```python
from test_compute import test_filter_chunked_array
```



---
## test_filter_record_batch
```python
from test_compute import test_filter_record_batch
```



---
## test_filter_table
```python
from test_compute import test_filter_table
```



---
## test_filter_errors
```python
from test_compute import test_filter_errors
```



---
## test_filter_null_type
```python
from test_compute import test_filter_null_type
```



---
## test_compare_array
```python
from test_compute import test_compare_array
```



---
## test_compare_string_scalar
```python
from test_compute import test_compare_string_scalar
```



---
## test_compare_scalar
```python
from test_compute import test_compare_scalar
```



---
## test_compare_chunked_array_mixed
```python
from test_compute import test_compare_chunked_array_mixed
```



---
## test_arithmetic_add
```python
from test_compute import test_arithmetic_add
```



---
## test_arithmetic_subtract
```python
from test_compute import test_arithmetic_subtract
```



---
## test_arithmetic_multiply
```python
from test_compute import test_arithmetic_multiply
```



---
## test_round_to_integer
```python
from test_compute import test_round_to_integer
```



---
## test_round
```python
from test_compute import test_round
```



---
## test_round_to_multiple
```python
from test_compute import test_round_to_multiple
```



---
## test_round_binary
```python
from test_compute import test_round_binary
```



---
## test_is_null
```python
from test_compute import test_is_null
```



---
## test_is_nan
```python
from test_compute import test_is_nan
```



---
## test_fill_null
```python
from test_compute import test_fill_null
```



---
## test_fill_null_array
```python
from test_compute import test_fill_null_array
```



---
## test_fill_null_chunked_array
```python
from test_compute import test_fill_null_chunked_array
```



---
## test_logical
```python
from test_compute import test_logical
```



---
## test_dictionary_decode
```python
from test_compute import test_dictionary_decode
```



---
## test_cast
```python
from test_compute import test_cast
```



---
## test_fsl_to_fsl_cast
```python
from test_compute import test_fsl_to_fsl_cast
```



---
## largest_scaled_float_not_above
```python
from test_compute import largest_scaled_float_not_above
```

Find the largest float f such as `f * 10**scale <= val`

---
## scaled_float
```python
from test_compute import scaled_float
```

Return a float representation (possibly approximate) of `int_val**-scale`

---
## integral_float_to_decimal_cast_cases
```python
from test_compute import integral_float_to_decimal_cast_cases
```

Return FloatToDecimalCase instances with integral values.

---
## real_float_to_decimal_cast_cases
```python
from test_compute import real_float_to_decimal_cast_cases
```

Return FloatToDecimalCase instances with real values.

---
## random_float_to_decimal_cast_cases
```python
from test_compute import random_float_to_decimal_cast_cases
```

Return random-generated FloatToDecimalCase instances.

---
## check_cast_float_to_decimal
```python
from test_compute import check_cast_float_to_decimal
```



---
## test_cast_float_to_decimal
```python
from test_compute import test_cast_float_to_decimal
```



---
## test_cast_float_to_decimal_random
```python
from test_compute import test_cast_float_to_decimal_random
```

Test float-to-decimal conversion against exactly generated values.

---
## test_strptime
```python
from test_compute import test_strptime
```



---
## test_strftime
```python
from test_compute import test_strftime
```



---
## _check_datetime_components
```python
from test_compute import _check_datetime_components
```



---
## test_extract_datetime_components
```python
from test_compute import test_extract_datetime_components
```



---
## test_iso_calendar_longer_array
```python
from test_compute import test_iso_calendar_longer_array
```



---
## test_assume_timezone
```python
from test_compute import test_assume_timezone
```



---
## _check_temporal_rounding
```python
from test_compute import _check_temporal_rounding
```



---
## test_round_temporal
```python
from test_compute import test_round_temporal
```



---
## test_count
```python
from test_compute import test_count
```



---
## test_index
```python
from test_compute import test_index
```



---
## check_partition_nth
```python
from test_compute import check_partition_nth
```



---
## test_partition_nth
```python
from test_compute import test_partition_nth
```



---
## test_partition_nth_null_placement
```python
from test_compute import test_partition_nth_null_placement
```



---
## test_select_k_array
```python
from test_compute import test_select_k_array
```



---
## test_select_k_table
```python
from test_compute import test_select_k_table
```



---
## test_array_sort_indices
```python
from test_compute import test_array_sort_indices
```



---
## test_sort_indices_array
```python
from test_compute import test_sort_indices_array
```



---
## test_sort_indices_table
```python
from test_compute import test_sort_indices_table
```



---
## test_is_in
```python
from test_compute import test_is_in
```



---
## test_index_in
```python
from test_compute import test_index_in
```



---
## test_quantile
```python
from test_compute import test_quantile
```



---
## test_tdigest
```python
from test_compute import test_tdigest
```



---
## test_fill_null_segfault
```python
from test_compute import test_fill_null_segfault
```



---
## test_min_max_element_wise
```python
from test_compute import test_min_max_element_wise
```



---
## test_cumulative_sum
```python
from test_compute import test_cumulative_sum
```



---
## test_cumulative_prod
```python
from test_compute import test_cumulative_prod
```



---
## test_cumulative_max
```python
from test_compute import test_cumulative_max
```



---
## test_cumulative_min
```python
from test_compute import test_cumulative_min
```



---
## test_make_struct
```python
from test_compute import test_make_struct
```



---
## test_map_lookup
```python
from test_compute import test_map_lookup
```



---
## test_struct_fields_options
```python
from test_compute import test_struct_fields_options
```



---
## test_case_when
```python
from test_compute import test_case_when
```



---
## test_list_element
```python
from test_compute import test_list_element
```



---
## test_count_distinct
```python
from test_compute import test_count_distinct
```



---
## test_count_distinct_options
```python
from test_compute import test_count_distinct_options
```



---
## test_utf8_normalize
```python
from test_compute import test_utf8_normalize
```



---
## test_random
```python
from test_compute import test_random
```



---
## test_rank_options_tiebreaker
```python
from test_compute import test_rank_options_tiebreaker
```



---
## test_rank_options
```python
from test_compute import test_rank_options
```



---
## create_sample_expressions
```python
from test_compute import create_sample_expressions
```



---
## test_expression_serialization_arrow
```python
from test_compute import test_expression_serialization_arrow
```



---
## test_expression_serialization_substrait
```python
from test_compute import test_expression_serialization_substrait
```



---
## test_expression_construction
```python
from test_compute import test_expression_construction
```



---
## test_expression_boolean_operators
```python
from test_compute import test_expression_boolean_operators
```



---
## test_expression_call_function
```python
from test_compute import test_expression_call_function
```



---
## test_cast_table_raises
```python
from test_compute import test_cast_table_raises
```



---
## test_list_slice_output_fixed
```python
from test_compute import test_list_slice_output_fixed
```



---
## test_list_slice_output_variable
```python
from test_compute import test_list_slice_output_variable
```



---
## test_list_slice_field_names_retained
```python
from test_compute import test_list_slice_field_names_retained
```



---
## test_list_slice_bad_parameters
```python
from test_compute import test_list_slice_bad_parameters
```



---
## check_run_end_encode_decode
```python
from test_compute import check_run_end_encode_decode
```



---
## test_run_end_encode
```python
from test_compute import test_run_end_encode
```



---
## test_pairwise_diff
```python
from test_compute import test_pairwise_diff
```



---
## validate_select_k
```python
from test_compute import validate_select_k
```



---
## con
```python
from test_compute import con
```



---
## __name__
```python
from test_strategies import __name__
```



---
## test_types
```python
from test_strategies import test_types
```



---
## test_fields
```python
from test_strategies import test_fields
```



---
## test_schemas
```python
from test_strategies import test_schemas
```



---
## test_arrays
```python
from test_strategies import test_arrays
```



---
## test_array_nullability
```python
from test_strategies import test_array_nullability
```



---
## test_chunked_arrays
```python
from test_strategies import test_chunked_arrays
```



---
## test_record_batches
```python
from test_strategies import test_record_batches
```



---
## test_tables
```python
from test_strategies import test_tables
```



---
## __name__
```python
from test_csv import __name__
```



---
## generate_col_names
```python
from test_csv import generate_col_names
```



---
## make_random_csv
```python
from test_csv import make_random_csv
```



---
## make_empty_csv
```python
from test_csv import make_empty_csv
```



---
## check_options_class
```python
from test_csv import check_options_class
```

Check setting and getting attributes of an *Options class.

---
## check_options_class_pickling
```python
from test_csv import check_options_class_pickling
```



---
## InvalidRowHandler
```python
from test_csv import InvalidRowHandler
```



---
## test_read_options
```python
from test_csv import test_read_options
```



---
## test_parse_options
```python
from test_csv import test_parse_options
```



---
## test_convert_options
```python
from test_csv import test_convert_options
```



---
## test_write_options
```python
from test_csv import test_write_options
```



---
## BaseTestCSV
```python
from test_csv import BaseTestCSV
```

Common tests which are shared by streaming and non streaming readers

---
## BaseCSVTableRead
```python
from test_csv import BaseCSVTableRead
```



---
## TestSerialCSVTableRead
```python
from test_csv import TestSerialCSVTableRead
```



---
## TestThreadedCSVTableRead
```python
from test_csv import TestThreadedCSVTableRead
```



---
## BaseStreamingCSVRead
```python
from test_csv import BaseStreamingCSVRead
```



---
## TestSerialStreamingCSVRead
```python
from test_csv import TestSerialStreamingCSVRead
```



---
## TestThreadedStreamingCSVRead
```python
from test_csv import TestThreadedStreamingCSVRead
```



---
## BaseTestCompressedCSVRead
```python
from test_csv import BaseTestCompressedCSVRead
```



---
## TestGZipCSVRead
```python
from test_csv import TestGZipCSVRead
```



---
## TestBZ2CSVRead
```python
from test_csv import TestBZ2CSVRead
```



---
## test_read_csv_does_not_close_passed_file_handles
```python
from test_csv import test_read_csv_does_not_close_passed_file_handles
```



---
## test_write_read_round_trip
```python
from test_csv import test_write_read_round_trip
```



---
## test_write_quoting_style
```python
from test_csv import test_write_quoting_style
```



---
## test_read_csv_reference_cycle
```python
from test_csv import test_read_csv_reference_cycle
```



---
## test_write_csv_decimal
```python
from test_csv import test_write_csv_decimal
```



---
## test_read_csv_gil_deadlock
```python
from test_csv import test_read_csv_gil_deadlock
```



---
## __init__
```python
from test_csv import __init__
```



---
## __call__
```python
from test_csv import __call__
```



---
## __eq__
```python
from test_csv import __eq__
```



---
## __ne__
```python
from test_csv import __ne__
```



---
## read_bytes
```python
from test_csv import read_bytes
```



---
## use_threads
```python
from test_csv import use_threads
```



---
## check_names
```python
from test_csv import check_names
```



---
## test_header_skip_rows
```python
from test_csv import test_header_skip_rows
```



---
## test_skip_rows_after_names
```python
from test_csv import test_skip_rows_after_names
```



---
## test_row_number_offset_in_errors
```python
from test_csv import test_row_number_offset_in_errors
```



---
## test_invalid_row_handler
```python
from test_csv import test_invalid_row_handler
```



---
## test_chunker_out_of_sync
```python
from test_csv import test_chunker_out_of_sync
```



---
## read_csv
```python
from test_csv import read_csv
```



---
## test_file_object
```python
from test_csv import test_file_object
```



---
## test_header
```python
from test_csv import test_header
```



---
## test_bom
```python
from test_csv import test_bom
```



---
## test_one_chunk
```python
from test_csv import test_one_chunk
```



---
## test_header_column_names
```python
from test_csv import test_header_column_names
```



---
## test_header_autogenerate_column_names
```python
from test_csv import test_header_autogenerate_column_names
```



---
## test_include_columns
```python
from test_csv import test_include_columns
```



---
## test_include_missing_columns
```python
from test_csv import test_include_missing_columns
```



---
## test_simple_ints
```python
from test_csv import test_simple_ints
```



---
## test_simple_varied
```python
from test_csv import test_simple_varied
```



---
## test_simple_nulls
```python
from test_csv import test_simple_nulls
```



---
## test_decimal_point
```python
from test_csv import test_decimal_point
```



---
## test_simple_timestamps
```python
from test_csv import test_simple_timestamps
```



---
## test_timestamp_parsers
```python
from test_csv import test_timestamp_parsers
```



---
## test_dates
```python
from test_csv import test_dates
```



---
## test_times
```python
from test_csv import test_times
```



---
## test_auto_dict_encode
```python
from test_csv import test_auto_dict_encode
```



---
## test_custom_nulls
```python
from test_csv import test_custom_nulls
```



---
## test_custom_bools
```python
from test_csv import test_custom_bools
```



---
## test_column_types
```python
from test_csv import test_column_types
```



---
## test_column_types_dict
```python
from test_csv import test_column_types_dict
```



---
## test_column_types_with_column_names
```python
from test_csv import test_column_types_with_column_names
```



---
## test_no_ending_newline
```python
from test_csv import test_no_ending_newline
```



---
## test_trivial
```python
from test_csv import test_trivial
```



---
## test_empty_lines
```python
from test_csv import test_empty_lines
```



---
## test_invalid_csv
```python
from test_csv import test_invalid_csv
```



---
## test_options_delimiter
```python
from test_csv import test_options_delimiter
```



---
## test_small_random_csv
```python
from test_csv import test_small_random_csv
```



---
## test_stress_block_sizes
```python
from test_csv import test_stress_block_sizes
```



---
## test_stress_convert_options_blowup
```python
from test_csv import test_stress_convert_options_blowup
```



---
## test_cancellation
```python
from test_csv import test_cancellation
```



---
## test_cancellation_disabled
```python
from test_csv import test_cancellation_disabled
```



---
## open_csv
```python
from test_csv import open_csv
```

Reads the CSV file into memory using pyarrow's open_csv
csv The CSV bytes
args Positional arguments to be forwarded to pyarrow's open_csv
kwargs Keyword arguments to be forwarded to pyarrow's open_csv

---
## open_bytes
```python
from test_csv import open_bytes
```



---
## check_reader
```python
from test_csv import check_reader
```



---
## test_inference
```python
from test_csv import test_inference
```



---
## test_inference_failure
```python
from test_csv import test_inference_failure
```



---
## test_empty_file
```python
from test_csv import test_empty_file
```



---
## test_column_options
```python
from test_csv import test_column_options
```



---
## test_encoding
```python
from test_csv import test_encoding
```



---
## test_batch_lifetime
```python
from test_csv import test_batch_lifetime
```



---
## setUp
```python
from test_csv import setUp
```



---
## tearDown
```python
from test_csv import tearDown
```



---
## test_random_csv
```python
from test_csv import test_random_csv
```



---
## write_file
```python
from test_csv import write_file
```



---
## test_concatenated
```python
from test_csv import test_concatenated
```



---
## inner
```python
from test_csv import inner
```



---
## MyBytesIO
```python
from test_csv import MyBytesIO
```



---
## format_msg
```python
from test_csv import format_msg
```



---
## row_num
```python
from test_csv import row_num
```



---
## signal_from_thread
```python
from test_csv import signal_from_thread
```



---
## check_one_batch
```python
from test_csv import check_one_batch
```



---
## read
```python
from test_csv import read
```



---
## readinto
```python
from test_csv import readinto
```



---
## __name__
```python
from test_scalars import __name__
```



---
## test_basics
```python
from test_scalars import test_basics
```



---
## test_invalid_scalar
```python
from test_scalars import test_invalid_scalar
```



---
## test_null_singleton
```python
from test_scalars import test_null_singleton
```



---
## test_nulls
```python
from test_scalars import test_nulls
```



---
## test_hashing
```python
from test_scalars import test_hashing
```



---
## test_hashing_struct_scalar
```python
from test_scalars import test_hashing_struct_scalar
```



---
## test_timestamp_scalar
```python
from test_scalars import test_timestamp_scalar
```



---
## test_bool
```python
from test_scalars import test_bool
```



---
## test_numerics
```python
from test_scalars import test_numerics
```



---
## test_decimal128
```python
from test_scalars import test_decimal128
```



---
## test_decimal256
```python
from test_scalars import test_decimal256
```



---
## test_date
```python
from test_scalars import test_date
```



---
## test_date_cast
```python
from test_scalars import test_date_cast
```



---
## test_time_from_datetime_time
```python
from test_scalars import test_time_from_datetime_time
```



---
## test_temporal_values
```python
from test_scalars import test_temporal_values
```



---
## test_cast
```python
from test_scalars import test_cast
```



---
## test_cast_timestamp_to_string
```python
from test_scalars import test_cast_timestamp_to_string
```



---
## test_cast_float_to_int
```python
from test_scalars import test_cast_float_to_int
```



---
## test_cast_int_to_float
```python
from test_scalars import test_cast_int_to_float
```



---
## test_cast_string_to_date
```python
from test_scalars import test_cast_string_to_date
```



---
## test_timestamp
```python
from test_scalars import test_timestamp
```



---
## test_timestamp_nanos_nopandas
```python
from test_scalars import test_timestamp_nanos_nopandas
```



---
## test_timestamp_no_overflow
```python
from test_scalars import test_timestamp_no_overflow
```



---
## test_timestamp_fixed_offset_print
```python
from test_scalars import test_timestamp_fixed_offset_print
```



---
## test_duration
```python
from test_scalars import test_duration
```



---
## test_duration_nanos_pandas
```python
from test_scalars import test_duration_nanos_pandas
```



---
## test_duration_nanos_nopandas
```python
from test_scalars import test_duration_nanos_nopandas
```



---
## test_month_day_nano_interval
```python
from test_scalars import test_month_day_nano_interval
```



---
## test_string
```python
from test_scalars import test_string
```



---
## test_binary
```python
from test_scalars import test_binary
```



---
## test_fixed_size_binary
```python
from test_scalars import test_fixed_size_binary
```



---
## test_list
```python
from test_scalars import test_list
```



---
## test_list_from_numpy
```python
from test_scalars import test_list_from_numpy
```



---
## test_list_from_pandas
```python
from test_scalars import test_list_from_pandas
```



---
## test_fixed_size_list
```python
from test_scalars import test_fixed_size_list
```



---
## test_struct
```python
from test_scalars import test_struct
```



---
## test_struct_duplicate_fields
```python
from test_scalars import test_struct_duplicate_fields
```



---
## test_map
```python
from test_scalars import test_map
```



---
## test_dictionary
```python
from test_scalars import test_dictionary
```



---
## test_run_end_encoded
```python
from test_scalars import test_run_end_encoded
```



---
## test_union
```python
from test_scalars import test_union
```



---
## test_map_scalar_as_py_with_custom_field_name
```python
from test_scalars import test_map_scalar_as_py_with_custom_field_name
```

Check we can call `MapScalar.as_py` with custom field names

See https://github.com/apache/arrow/issues/36809

---
## __name__
```python
from test_gdb import __name__
```



---
## environment_for_gdb
```python
from test_gdb import environment_for_gdb
```



---
## is_gdb_available
```python
from test_gdb import is_gdb_available
```



---
## python_executable
```python
from test_gdb import python_executable
```



---
## skip_if_gdb_unavailable
```python
from test_gdb import skip_if_gdb_unavailable
```



---
## skip_if_gdb_script_unavailable
```python
from test_gdb import skip_if_gdb_script_unavailable
```



---
## GdbSession
```python
from test_gdb import GdbSession
```



---
## gdb
```python
from test_gdb import gdb
```



---
## gdb_arrow
```python
from test_gdb import gdb_arrow
```



---
## test_gdb_session
```python
from test_gdb import test_gdb_session
```



---
## test_gdb_arrow
```python
from test_gdb import test_gdb_arrow
```



---
## check_stack_repr
```python
from test_gdb import check_stack_repr
```

Check printing a stack-located value.

---
## check_heap_repr
```python
from test_gdb import check_heap_repr
```

Check printing a heap-located value, given its address.

---
## test_status
```python
from test_gdb import test_status
```



---
## test_buffer_stack
```python
from test_gdb import test_buffer_stack
```



---
## test_buffer_heap
```python
from test_gdb import test_buffer_heap
```



---
## test_decimals
```python
from test_gdb import test_decimals
```



---
## test_metadata
```python
from test_gdb import test_metadata
```



---
## test_types_stack
```python
from test_gdb import test_types_stack
```



---
## test_types_heap
```python
from test_gdb import test_types_heap
```



---
## test_fields_stack
```python
from test_gdb import test_fields_stack
```



---
## test_fields_heap
```python
from test_gdb import test_fields_heap
```



---
## test_scalars_stack
```python
from test_gdb import test_scalars_stack
```



---
## test_scalars_heap
```python
from test_gdb import test_scalars_heap
```



---
## test_array_data
```python
from test_gdb import test_array_data
```



---
## test_arrays_stack
```python
from test_gdb import test_arrays_stack
```



---
## test_arrays_heap
```python
from test_gdb import test_arrays_heap
```



---
## test_schema
```python
from test_gdb import test_schema
```



---
## test_chunked_array
```python
from test_gdb import test_chunked_array
```



---
## test_record_batch
```python
from test_gdb import test_record_batch
```



---
## test_table
```python
from test_gdb import test_table
```



---
## test_datum
```python
from test_gdb import test_datum
```



---
## __init__
```python
from test_gdb import __init__
```



---
## wait_until_ready
```python
from test_gdb import wait_until_ready
```

Record output until the gdb prompt displays.  Return recorded output.

---
## issue_command
```python
from test_gdb import issue_command
```



---
## run_command
```python
from test_gdb import run_command
```



---
## print_value
```python
from test_gdb import print_value
```

Ask gdb to print the value of an expression and return the result.

---
## select_frame
```python
from test_gdb import select_frame
```

Select the innermost frame with the given function name.

---
## join
```python
from test_gdb import join
```



---
## __del__
```python
from test_gdb import __del__
```



---
## get_many_types
```python
from test_types import get_many_types
```



---
## test_is_boolean
```python
from test_types import test_is_boolean
```



---
## test_is_integer
```python
from test_types import test_is_integer
```



---
## test_is_floating
```python
from test_types import test_is_floating
```



---
## test_is_null
```python
from test_types import test_is_null
```



---
## test_null_field_may_not_be_non_nullable
```python
from test_types import test_null_field_may_not_be_non_nullable
```



---
## test_is_decimal
```python
from test_types import test_is_decimal
```



---
## test_is_list
```python
from test_types import test_is_list
```



---
## test_is_list_view
```python
from test_types import test_is_list_view
```



---
## test_is_map
```python
from test_types import test_is_map
```



---
## test_is_dictionary
```python
from test_types import test_is_dictionary
```



---
## test_is_nested_or_struct
```python
from test_types import test_is_nested_or_struct
```



---
## test_is_union
```python
from test_types import test_is_union
```



---
## test_is_run_end_encoded
```python
from test_types import test_is_run_end_encoded
```



---
## test_is_binary_string
```python
from test_types import test_is_binary_string
```



---
## test_is_temporal_date_time_timestamp
```python
from test_types import test_is_temporal_date_time_timestamp
```



---
## test_is_primitive
```python
from test_types import test_is_primitive
```



---
## test_tzinfo_to_string
```python
from test_types import test_tzinfo_to_string
```



---
## test_pytz_tzinfo_to_string
```python
from test_types import test_pytz_tzinfo_to_string
```



---
## test_dateutil_tzinfo_to_string
```python
from test_types import test_dateutil_tzinfo_to_string
```



---
## test_zoneinfo_tzinfo_to_string
```python
from test_types import test_zoneinfo_tzinfo_to_string
```



---
## test_tzinfo_to_string_errors
```python
from test_types import test_tzinfo_to_string_errors
```



---
## test_pytz_timezone_roundtrip
```python
from test_types import test_pytz_timezone_roundtrip
```



---
## test_convert_custom_tzinfo_objects_to_string
```python
from test_types import test_convert_custom_tzinfo_objects_to_string
```



---
## test_string_to_tzinfo
```python
from test_types import test_string_to_tzinfo
```



---
## test_timezone_string_roundtrip_pytz
```python
from test_types import test_timezone_string_roundtrip_pytz
```



---
## test_timestamp
```python
from test_types import test_timestamp
```



---
## test_timestamp_print
```python
from test_types import test_timestamp_print
```



---
## test_time32_units
```python
from test_types import test_time32_units
```



---
## test_time64_units
```python
from test_types import test_time64_units
```



---
## test_duration
```python
from test_types import test_duration
```



---
## test_list_type
```python
from test_types import test_list_type
```



---
## test_large_list_type
```python
from test_types import test_large_list_type
```



---
## test_list_view_type
```python
from test_types import test_list_view_type
```



---
## test_large_list_view_type
```python
from test_types import test_large_list_view_type
```



---
## test_map_type
```python
from test_types import test_map_type
```



---
## test_fixed_size_list_type
```python
from test_types import test_fixed_size_list_type
```



---
## test_struct_type
```python
from test_types import test_struct_type
```



---
## test_struct_duplicate_field_names
```python
from test_types import test_struct_duplicate_field_names
```



---
## test_union_type
```python
from test_types import test_union_type
```



---
## test_dictionary_type
```python
from test_types import test_dictionary_type
```



---
## test_dictionary_ordered_equals
```python
from test_types import test_dictionary_ordered_equals
```



---
## test_types_hashable
```python
from test_types import test_types_hashable
```



---
## test_types_picklable
```python
from test_types import test_types_picklable
```



---
## test_types_weakref
```python
from test_types import test_types_weakref
```



---
## test_fields_hashable
```python
from test_types import test_fields_hashable
```



---
## test_fields_weakrefable
```python
from test_types import test_fields_weakrefable
```



---
## test_run_end_encoded_type
```python
from test_types import test_run_end_encoded_type
```



---
## test_exact_primitive_types
```python
from test_types import test_exact_primitive_types
```



---
## test_type_id
```python
from test_types import test_type_id
```



---
## test_bit_and_byte_width
```python
from test_types import test_bit_and_byte_width
```



---
## test_fixed_size_binary_byte_width
```python
from test_types import test_fixed_size_binary_byte_width
```



---
## test_decimal_properties
```python
from test_types import test_decimal_properties
```



---
## test_decimal_overflow
```python
from test_types import test_decimal_overflow
```



---
## test_timedelta_overflow
```python
from test_types import test_timedelta_overflow
```



---
## test_type_equality_operators
```python
from test_types import test_type_equality_operators
```



---
## test_key_value_metadata
```python
from test_types import test_key_value_metadata
```



---
## test_key_value_metadata_duplicates
```python
from test_types import test_key_value_metadata_duplicates
```



---
## test_field_basic
```python
from test_types import test_field_basic
```



---
## test_field_equals
```python
from test_types import test_field_equals
```



---
## test_field_equality_operators
```python
from test_types import test_field_equality_operators
```



---
## test_field_metadata
```python
from test_types import test_field_metadata
```



---
## test_field_add_remove_metadata
```python
from test_types import test_field_add_remove_metadata
```



---
## test_field_modified_copies
```python
from test_types import test_field_modified_copies
```



---
## test_is_integer_value
```python
from test_types import test_is_integer_value
```



---
## test_is_float_value
```python
from test_types import test_is_float_value
```



---
## test_is_boolean_value
```python
from test_types import test_is_boolean_value
```



---
## test_pickling
```python
from test_types import test_pickling
```



---
## test_hashing
```python
from test_types import test_hashing
```



---
## test_types_come_back_with_specific_type
```python
from test_types import test_types_come_back_with_specific_type
```



---
## test_schema_import_c_schema_interface
```python
from test_types import test_schema_import_c_schema_interface
```



---
## test_field_import_c_schema_interface
```python
from test_types import test_field_import_c_schema_interface
```



---
## CorrectTimezone1
```python
from test_types import CorrectTimezone1
```

Conversion is using utcoffset()

---
## CorrectTimezone2
```python
from test_types import CorrectTimezone2
```

Conversion is using tzname()

---
## BuggyTimezone1
```python
from test_types import BuggyTimezone1
```

Unable to infer name or offset

---
## BuggyTimezone2
```python
from test_types import BuggyTimezone2
```

Wrong offset type

---
## BuggyTimezone3
```python
from test_types import BuggyTimezone3
```

Wrong timezone name type

---
## check_fields
```python
from test_types import check_fields
```



---
## Wrapper
```python
from test_types import Wrapper
```



---
## tzname
```python
from test_types import tzname
```



---
## utcoffset
```python
from test_types import utcoffset
```



---
## __init__
```python
from test_types import __init__
```



---
## __arrow_c_schema__
```python
from test_types import __arrow_c_schema__
```



---
## __name__
```python
from test_substrait import __name__
```



---
## mock_udf_context
```python
from test_substrait import mock_udf_context
```



---
## _write_dummy_data_to_disk
```python
from test_substrait import _write_dummy_data_to_disk
```



---
## test_run_serialized_query
```python
from test_substrait import test_run_serialized_query
```



---
## test_run_query_input_types
```python
from test_substrait import test_run_query_input_types
```



---
## test_invalid_plan
```python
from test_substrait import test_invalid_plan
```



---
## test_binary_conversion_with_json_options
```python
from test_substrait import test_binary_conversion_with_json_options
```



---
## has_function
```python
from test_substrait import has_function
```



---
## test_get_supported_functions
```python
from test_substrait import test_get_supported_functions
```



---
## test_named_table
```python
from test_substrait import test_named_table
```



---
## test_named_table_invalid_table_name
```python
from test_substrait import test_named_table_invalid_table_name
```



---
## test_named_table_empty_names
```python
from test_substrait import test_named_table_empty_names
```



---
## test_udf_via_substrait
```python
from test_substrait import test_udf_via_substrait
```



---
## test_udf_via_substrait_wrong_udf_name
```python
from test_substrait import test_udf_via_substrait_wrong_udf_name
```



---
## test_output_field_names
```python
from test_substrait import test_output_field_names
```



---
## test_scalar_aggregate_udf_basic
```python
from test_substrait import test_scalar_aggregate_udf_basic
```



---
## test_hash_aggregate_udf_basic
```python
from test_substrait import test_hash_aggregate_udf_basic
```



---
## test_serializing_expressions
```python
from test_substrait import test_serializing_expressions
```



---
## test_arrow_specific_types
```python
from test_substrait import test_arrow_specific_types
```



---
## test_arrow_one_way_types
```python
from test_substrait import test_arrow_one_way_types
```



---
## test_invalid_expression_ser_des
```python
from test_substrait import test_invalid_expression_ser_des
```



---
## test_serializing_multiple_expressions
```python
from test_substrait import test_serializing_multiple_expressions
```



---
## test_serializing_with_compute
```python
from test_substrait import test_serializing_with_compute
```



---
## test_serializing_udfs
```python
from test_substrait import test_serializing_udfs
```



---
## table_provider
```python
from test_substrait import table_provider
```



---
## check_round_trip
```python
from test_substrait import check_round_trip
```



---
## check_one_way
```python
from test_substrait import check_one_way
```



---
## protocol_df_chunk_to_pyarrow
```python
from from_dataframe import protocol_df_chunk_to_pyarrow
```

Convert interchange protocol chunk to ``pa.RecordBatch``.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.RecordBatch

---
## column_to_array
```python
from from_dataframe import column_to_array
```

Convert a column holding one of the primitive dtypes to a PyArrow array.
A primitive type is one of: int, uint, float, bool (1 bit).

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array

---
## bool_column_to_array
```python
from from_dataframe import bool_column_to_array
```

Convert a column holding boolean dtype to a PyArrow array.

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array

---
## categorical_column_to_dictionary
```python
from from_dataframe import categorical_column_to_dictionary
```

Convert a column holding categorical data to a pa.DictionaryArray.

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.DictionaryArray

---
## map_date_type
```python
from from_dataframe import map_date_type
```

Map column date type to pyarrow date type. 

---
## buffers_to_array
```python
from from_dataframe import buffers_to_array
```

Build a PyArrow array from the passed buffer.

Parameters
----------
buffer : ColumnBuffers
    Dictionary containing tuples of underlying buffers and
    their associated dtype.
data_type : Tuple[DtypeKind, int, str, str],
    Dtype description of the column as a tuple ``(kind, bit-width, format string,
    endianness)``.
length : int
    The number of values in the array.
describe_null: ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array

Notes
-----
The returned array doesn't own the memory. The caller of this function
is responsible for keeping the memory owner object alive as long as
the returned PyArrow array is being used.

---
## validity_buffer_from_mask
```python
from from_dataframe import validity_buffer_from_mask
```

Build a PyArrow buffer from the passed mask buffer.

Parameters
----------
validity_buff : BufferObject
    Tuple of underlying validity buffer and associated dtype.
validity_dtype : Dtype
    Dtype description as a tuple ``(kind, bit-width, format string,
    endianness)``.
describe_null : ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
length : int
    The number of values in the array.
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Buffer

---
## validity_buffer_nan_sentinel
```python
from from_dataframe import validity_buffer_nan_sentinel
```

Build a PyArrow buffer from NaN or sentinel values.

Parameters
----------
data_pa_buffer : pa.Buffer
    PyArrow buffer for the column data.
data_type : Dtype
    Dtype description as a tuple ``(kind, bit-width, format string,
    endianness)``.
describe_null : ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
length : int
    The number of values in the array.
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Buffer

---
## _PyArrowDataFrame
```python
from dataframe import _PyArrowDataFrame
```

A data frame class, with only the methods required by the interchange
protocol defined.

A "data frame" represents an ordered collection of named columns.
A column's "name" must be a unique string.
Columns may be accessed by name or by position.

This could be a public data frame class, or an object with the methods and
attributes defined on this DataFrame class could be returned from the
``__dataframe__`` method of a public data frame class in a library adhering
to the dataframe interchange protocol specification.

---
## DlpackDeviceType
```python
from buffer import DlpackDeviceType
```

Integer enum for device type codes matching DLPack.

---
## _PyArrowBuffer
```python
from buffer import _PyArrowBuffer
```

Data in the buffer is guaranteed to be contiguous in memory.

Note that there is no dtype attribute present, a buffer can be thought of
as simply a block of memory. However, if the column that the buffer is
attached to has a dtype that's supported by DLPack and ``__dlpack__`` is
implemented, then that dtype information will be contained in the return
value from ``__dlpack__``.

This distinction is useful to support both data exchange via DLPack on a
buffer and (b) dtypes like variable-length strings which do not have a
fixed number of bytes per element.

---
## DtypeKind
```python
from column import DtypeKind
```

Integer enum for data types.

Attributes
----------
INT : int
    Matches to signed integer data type.
UINT : int
    Matches to unsigned integer data type.
FLOAT : int
    Matches to floating point data type.
BOOL : int
    Matches to boolean data type.
STRING : int
    Matches to string data type (UTF-8 encoded).
DATETIME : int
    Matches to datetime data type.
CATEGORICAL : int
    Matches to categorical data type.

---
## ColumnNullType
```python
from column import ColumnNullType
```

Integer enum for null type representation.

Attributes
----------
NON_NULLABLE : int
    Non-nullable column.
USE_NAN : int
    Use explicit float NaN value.
USE_SENTINEL : int
    Sentinel value besides NaN.
USE_BITMASK : int
    The bit is set/unset representing a null on a certain position.
USE_BYTEMASK : int
    The byte is set/unset representing a null on a certain position.

---
## ColumnBuffers
```python
from column import ColumnBuffers
```



---
## CategoricalDescription
```python
from column import CategoricalDescription
```



---
## Endianness
```python
from column import Endianness
```

Enum indicating the byte-order of a data-type.

---
## NoBufferPresent
```python
from column import NoBufferPresent
```

Exception to signal that there is no requested buffer.

---
## _PyArrowColumn
```python
from column import _PyArrowColumn
```

A column object, with only the methods and properties required by the
interchange protocol defined.

A column can contain one or more chunks. Each chunk can contain up to three
buffers - a data buffer, a mask buffer (depending on null representation),
and an offsets buffer (if variable-size binary; e.g., variable-length
strings).

TBD: Arrow has a separate "null" dtype, and has no separate mask concept.
     Instead, it seems to use "children" for both columns with a bit mask,
     and for nested dtypes. Unclear whether this is elegant or confusing.
     This design requires checking the null representation explicitly.

     The Arrow design requires checking:
     1. the ARROW_FLAG_NULLABLE (for sentinel values)
     2. if a column has two children, combined with one of those children
        having a null dtype.

     Making the mask concept explicit seems useful. One null dtype would
     not be enough to cover both bit and byte masks, so that would mean
     even more checking if we did it the Arrow way.

TBD: there's also the "chunk" concept here, which is implicit in Arrow as
     multiple buffers per array (= column here). Semantically it may make
     sense to have both: chunks were meant for example for lazy evaluation
     of data which doesn't fit in memory, while multiple buffers per column
     could also come from doing a selection operation on a single
     contiguous buffer.

     Given these concepts, one would expect chunks to be all of the same
     size (say a 10,000 row dataframe could have 10 chunks of 1,000 rows),
     while multiple buffers could have data-dependent lengths. Not an issue
     in pandas if one column is backed by a single NumPy array, but in
     Arrow it seems possible.
     Are multiple chunks *and* multiple buffers per column necessary for
     the purposes of this interchange protocol, or must producers either
     reuse the chunk concept for this or copy the data?

Note: this Column object can only be produced by ``__dataframe__``, so
      doesn't need its own version or ``__column__`` protocol.

---
## _dtype_from_arrowdtype
```python
from column import _dtype_from_arrowdtype
```

See `self.dtype` for details.

---
## InfinityType
```python
from version import InfinityType
```



---
## NegativeInfinityType
```python
from version import NegativeInfinityType
```



---
## _parse_version_parts
```python
from version import _parse_version_parts
```



---
## _legacy_cmpkey
```python
from version import _legacy_cmpkey
```



---
## __neg__
```python
from version import __neg__
```



---
## __name__
```python
from docscrape import __name__
```

Extract reference documentation from the NumPy source tree.

---
## strip_blank_lines
```python
from docscrape import strip_blank_lines
```

Remove leading and trailing blank lines from a list of lines

---
## Reader
```python
from docscrape import Reader
```

A line-based string reader.

    

---
## ParseError
```python
from docscrape import ParseError
```



---
## NumpyDocString
```python
from docscrape import NumpyDocString
```

Parses a numpydoc string to an abstract representation

Instances define a mapping from section title to structured data.

---
## dedent_lines
```python
from docscrape import dedent_lines
```

Deindent a list of lines maximally

---
## FunctionDoc
```python
from docscrape import FunctionDoc
```



---
## ObjDoc
```python
from docscrape import ObjDoc
```



---
## ClassDoc
```python
from docscrape import ClassDoc
```



---
## get_doc_object
```python
from docscrape import get_doc_object
```



---
## __init__
```python
from docscrape import __init__
```



---
## __getitem__
```python
from docscrape import __getitem__
```



---
## reset
```python
from docscrape import reset
```



---
## read
```python
from docscrape import read
```



---
## seek_next_non_empty_line
```python
from docscrape import seek_next_non_empty_line
```



---
## eof
```python
from docscrape import eof
```



---
## read_to_condition
```python
from docscrape import read_to_condition
```



---
## read_to_next_empty_line
```python
from docscrape import read_to_next_empty_line
```



---
## read_to_next_unindented_line
```python
from docscrape import read_to_next_unindented_line
```



---
## peek
```python
from docscrape import peek
```



---
## is_empty
```python
from docscrape import is_empty
```



---
## __str__
```python
from docscrape import __str__
```



---
## __setitem__
```python
from docscrape import __setitem__
```



---
## __iter__
```python
from docscrape import __iter__
```



---
## __len__
```python
from docscrape import __len__
```



---
## _is_at_section
```python
from docscrape import _is_at_section
```



---
## _strip
```python
from docscrape import _strip
```



---
## _read_to_next_section
```python
from docscrape import _read_to_next_section
```



---
## _read_sections
```python
from docscrape import _read_sections
```



---
## _parse_param_list
```python
from docscrape import _parse_param_list
```



---
## _parse_see_also
```python
from docscrape import _parse_see_also
```

func_name : Descriptive text
    continued text
another_func_name : Descriptive text
func_name1, func_name2, :meth:`func_name`, func_name3

---
## _parse_index
```python
from docscrape import _parse_index
```

.. index: default
:refguide: something, else, and more

---
## _parse_summary
```python
from docscrape import _parse_summary
```

Grab signature (if given) and summary

---
## _parse
```python
from docscrape import _parse
```



---
## _obj
```python
from docscrape import _obj
```



---
## _error_location
```python
from docscrape import _error_location
```



---
## _str_header
```python
from docscrape import _str_header
```



---
## _str_indent
```python
from docscrape import _str_indent
```



---
## _str_signature
```python
from docscrape import _str_signature
```



---
## _str_summary
```python
from docscrape import _str_summary
```



---
## _str_extended_summary
```python
from docscrape import _str_extended_summary
```



---
## _str_param_list
```python
from docscrape import _str_param_list
```



---
## _str_section
```python
from docscrape import _str_section
```



---
## _str_see_also
```python
from docscrape import _str_see_also
```



---
## _str_index
```python
from docscrape import _str_index
```



---
## get_func
```python
from docscrape import get_func
```



---
## methods
```python
from docscrape import methods
```



---
## properties
```python
from docscrape import properties
```



---
## _is_show_member
```python
from docscrape import _is_show_member
```



---
## is_unindented
```python
from docscrape import is_unindented
```



---
## parse_item_name
```python
from docscrape import parse_item_name
```

Match ':role:`name`' or 'name'.

---
## strip_each_in
```python
from docscrape import strip_each_in
```



---
## splitlines_x
```python
from docscrape import splitlines_x
```



---
## __name__
```python
from encryption import __name__
```



---
## _check_contains_null
```python
from core import _check_contains_null
```



---
## _check_filters
```python
from core import _check_filters
```

Check if filters are well-formed.

---
## filters_to_expression
```python
from core import filters_to_expression
```

Check if filters are well-formed and convert to an ``Expression``.

Parameters
----------
filters : List[Tuple] or List[List[Tuple]]

Notes
-----
See internal ``pyarrow._DNF_filter_doc`` attribute for more details.

Examples
--------

>>> filters_to_expression([('foo', '==', 'bar')])
<pyarrow.compute.Expression (foo == "bar")>

Returns
-------
pyarrow.compute.Expression
    An Expression representing the filters

---
## ParquetFile
```python
from core import ParquetFile
```

Reader interface for a single Parquet file.

Parameters
----------
source : str, pathlib.Path, pyarrow.NativeFile, or file-like object
    Readable source. For passing bytes or buffer-like file containing a
    Parquet file, use pyarrow.BufferReader.
metadata : FileMetaData, default None
    Use existing metadata object, rather than reading from file.
common_metadata : FileMetaData, default None
    Will be used in reads for pandas schema metadata if not found in the
    main file's metadata, no other uses at the moment.
read_dictionary : list
    List of column names to read directly as DictionaryArray.
memory_map : bool, default False
    If the source is a file path, use a memory map to read file, which can
    improve performance in some environments.
buffer_size : int, default 0
    If positive, perform read buffering when deserializing individual
    column chunks. Otherwise IO calls are unbuffered.
pre_buffer : bool, default False
    Coalesce and issue file reads in parallel to improve performance on
    high-latency filesystems (e.g. S3). If True, Arrow will use a
    background I/O thread pool.
coerce_int96_timestamp_unit : str, default None
    Cast timestamps that are stored in INT96 format to a particular
    resolution (e.g. 'ms'). Setting to None is equivalent to 'ns'
    and therefore INT96 timestamps will be inferred as timestamps
    in nanoseconds.
decryption_properties : FileDecryptionProperties, default None
    File decryption properties for Parquet Modular Encryption.
thrift_string_size_limit : int, default None
    If not None, override the maximum total string size allocated
    when decoding Thrift structures. The default limit should be
    sufficient for most Parquet files.
thrift_container_size_limit : int, default None
    If not None, override the maximum total size of containers allocated
    when decoding Thrift structures. The default limit should be
    sufficient for most Parquet files.
filesystem : FileSystem, default None
    If nothing passed, will be inferred based on path.
    Path will try to be found in the local on-disk filesystem otherwise
    it will be parsed as an URI to determine the filesystem.
page_checksum_verification : bool, default False
    If True, verify the checksum for each page read from the file.

Examples
--------

Generate an example PyArrow Table and write it to Parquet file:

>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})

>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')

Create a ``ParquetFile`` object from the Parquet file:

>>> parquet_file = pq.ParquetFile('example.parquet')

Read the data:

>>> parquet_file.read()
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[2,2,4,4,5,100]]
animal: [["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]]

Create a ParquetFile object with "animal" column as DictionaryArray:

>>> parquet_file = pq.ParquetFile('example.parquet',
...                               read_dictionary=["animal"])
>>> parquet_file.read()
pyarrow.Table
n_legs: int64
animal: dictionary<values=string, indices=int32, ordered=0>
----
n_legs: [[2,2,4,4,5,100]]
animal: [  -- dictionary:
["Flamingo","Parrot",...,"Brittle stars","Centipede"]  -- indices:
[0,1,2,3,4,5]]

---
## _sanitized_spark_field_name
```python
from core import _sanitized_spark_field_name
```



---
## _sanitize_schema
```python
from core import _sanitize_schema
```



---
## _sanitize_table
```python
from core import _sanitize_table
```



---
## ParquetWriter
```python
from core import ParquetWriter
```



---
## _get_pandas_index_columns
```python
from core import _get_pandas_index_columns
```



---
## ParquetDataset
```python
from core import ParquetDataset
```



---
## read_table
```python
from core import read_table
```



---
## read_pandas
```python
from core import read_pandas
```

Read dataset including pandas metadata, if any. Other arguments passed
through to :func:`read`, see docstring for further details.

Parameters
----------
**kwargs : optional
    Additional options for :func:`read`

Examples
--------
Generate an example parquet file:

>>> import pyarrow as pa
>>> import pandas as pd
>>> df = pd.DataFrame({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                    'n_legs': [2, 2, 4, 4, 5, 100],
...                    'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                    "Brittle stars", "Centipede"]})
>>> table = pa.Table.from_pandas(df)
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'table_V2.parquet')
>>> dataset = pq.ParquetDataset('table_V2.parquet')

Read the dataset with pandas metadata:

>>> dataset.read_pandas(columns=["n_legs"])
pyarrow.Table
n_legs: int64
----
n_legs: [[2,2,4,4,5,100]]

>>> dataset.read_pandas(columns=["n_legs"]).schema.pandas_metadata
{'index_columns': [{'kind': 'range', 'name': None, 'start': 0, ...}

---
## write_table
```python
from core import write_table
```

Write Table to the Parquet file.

Parameters
----------
table : Table
row_group_size : int, default None
    Maximum number of rows in each written row group. If None,
    the row group size will be the minimum of the Table size
    and 1024 * 1024.  If set larger than 64Mi then 64Mi will
    be used instead.

---
## write_to_dataset
```python
from core import write_to_dataset
```

Wrapper around dataset.write_dataset for writing a Table to
Parquet format by partitions.
For each combination of partition columns and values,
a subdirectories are created in the following
manner:

root_dir/
  group1=value1
    group2=value1
      <uuid>.parquet
    group2=value2
      <uuid>.parquet
  group1=valueN
    group2=value1
      <uuid>.parquet
    group2=valueN
      <uuid>.parquet

Parameters
----------
table : pyarrow.Table
root_path : str, pathlib.Path
    The root directory of the dataset.
partition_cols : list,
    Column names by which to partition the dataset.
    Columns are partitioned in the order they are given.
filesystem : FileSystem, default None
    If nothing passed, will be inferred based on path.
    Path will try to be found in the local on-disk filesystem otherwise
    it will be parsed as an URI to determine the filesystem.
use_legacy_dataset : bool, optional
    Deprecated and has no effect from PyArrow version 15.0.0.
schema : Schema, optional
    This Schema of the dataset.
partitioning : Partitioning or list[str], optional
    The partitioning scheme specified with the
    ``pyarrow.dataset.partitioning()`` function or a list of field names.
    When providing a list of field names, you can use
    ``partitioning_flavor`` to drive which partitioning type should be
    used.
basename_template : str, optional
    A template string used to generate basenames of written data files.
    The token '{i}' will be replaced with an automatically incremented
    integer. If not specified, it defaults to "guid-{i}.parquet".
use_threads : bool, default True
    Write files in parallel. If enabled, then maximum parallelism will be
    used determined by the number of available CPU cores.
file_visitor : function
    If set, this function will be called with a WrittenFile instance
    for each file created during the call.  This object will have both
    a path attribute and a metadata attribute.

    The path attribute will be a string containing the path to
    the created file.

    The metadata attribute will be the parquet metadata of the file.
    This metadata will have the file path attribute set and can be used
    to build a _metadata file.  The metadata attribute will be None if
    the format is not parquet.

    Example visitor which simple collects the filenames created::

        visited_paths = []

        def file_visitor(written_file):
            visited_paths.append(written_file.path)

existing_data_behavior : 'overwrite_or_ignore' | 'error' | 'delete_matching'
    Controls how the dataset will handle data that already exists in
    the destination. The default behaviour is 'overwrite_or_ignore'.

    'overwrite_or_ignore' will ignore any existing data and will
    overwrite files with the same name as an output file.  Other
    existing files will be ignored.  This behavior, in combination
    with a unique basename_template for each write, will allow for
    an append workflow.

    'error' will raise an error if any data exists in the destination.

    'delete_matching' is useful when you are writing a partitioned
    dataset.  The first time each partition directory is encountered
    the entire directory will be deleted.  This allows you to overwrite
    old partitions completely.
**kwargs : dict,
    Used as additional kwargs for :func:`pyarrow.dataset.write_dataset`
    function for matching kwargs, and remainder to
    :func:`pyarrow.dataset.ParquetFileFormat.make_write_options`.
    See the docstring of :func:`write_table` and
    :func:`pyarrow.dataset.write_dataset` for the available options.
    Using `metadata_collector` in kwargs allows one to collect the
    file metadata instances of dataset pieces. The file paths in the
    ColumnChunkMetaData will be set relative to `root_path`.

Examples
--------
Generate an example PyArrow Table:

>>> import pyarrow as pa
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})

and write it to a partitioned dataset:

>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(table, root_path='dataset_name_3',
...                     partition_cols=['year'])
>>> pq.ParquetDataset('dataset_name_3').files
['dataset_name_3/year=2019/...-0.parquet', ...

Write a single Parquet file into the root folder:

>>> pq.write_to_dataset(table, root_path='dataset_name_4')
>>> pq.ParquetDataset('dataset_name_4/').files
['dataset_name_4/...-0.parquet']

---
## write_metadata
```python
from core import write_metadata
```

Write metadata-only Parquet file from schema. This can be used with
`write_to_dataset` to generate `_common_metadata` and `_metadata` sidecar
files.

Parameters
----------
schema : pyarrow.Schema
where : string or pyarrow.NativeFile
metadata_collector : list
    where to collect metadata information.
filesystem : FileSystem, default None
    If nothing passed, will be inferred from `where` if path-like, else
    `where` is already a file-like object so no filesystem is needed.
**kwargs : dict,
    Additional kwargs for ParquetWriter class. See docstring for
    `ParquetWriter` for more information.

Examples
--------
Generate example data:

>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})

Write a dataset and collect metadata information.

>>> metadata_collector = []
>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(
...     table, 'dataset_metadata',
...      metadata_collector=metadata_collector)

Write the `_common_metadata` parquet file without row groups statistics.

>>> pq.write_metadata(
...     table.schema, 'dataset_metadata/_common_metadata')

Write the `_metadata` parquet file with row groups statistics.

>>> pq.write_metadata(
...     table.schema, 'dataset_metadata/_metadata',
...     metadata_collector=metadata_collector)

---
## read_metadata
```python
from core import read_metadata
```

Read FileMetaData from footer of a single Parquet file.

Parameters
----------
where : str (file path) or file-like object
memory_map : bool, default False
    Create memory map when the source is a file path.
decryption_properties : FileDecryptionProperties, default None
    Decryption properties for reading encrypted Parquet files.
filesystem : FileSystem, default None
    If nothing passed, will be inferred based on path.
    Path will try to be found in the local on-disk filesystem otherwise
    it will be parsed as an URI to determine the filesystem.

Returns
-------
metadata : FileMetaData
    The metadata of the Parquet file

Examples
--------
>>> import pyarrow as pa
>>> import pyarrow.parquet as pq
>>> table = pa.table({'n_legs': [4, 5, 100],
...                   'animal': ["Dog", "Brittle stars", "Centipede"]})
>>> pq.write_table(table, 'example.parquet')

>>> pq.read_metadata('example.parquet')
<pyarrow._parquet.FileMetaData object at ...>
  created_by: parquet-cpp-arrow version ...
  num_columns: 2
  num_rows: 3
  num_row_groups: 1
  format_version: 2.6
  serialized_size: ...

---
## read_schema
```python
from core import read_schema
```

Read effective Arrow schema from Parquet file metadata.

Parameters
----------
where : str (file path) or file-like object
memory_map : bool, default False
    Create memory map when the source is a file path.
decryption_properties : FileDecryptionProperties, default None
    Decryption properties for reading encrypted Parquet files.
filesystem : FileSystem, default None
    If nothing passed, will be inferred based on path.
    Path will try to be found in the local on-disk filesystem otherwise
    it will be parsed as an URI to determine the filesystem.

Returns
-------
schema : pyarrow.Schema
    The schema of the Parquet file

Examples
--------
>>> import pyarrow as pa
>>> import pyarrow.parquet as pq
>>> table = pa.table({'n_legs': [4, 5, 100],
...                   'animal': ["Dog", "Brittle stars", "Centipede"]})
>>> pq.write_table(table, 'example.parquet')

>>> pq.read_schema('example.parquet')
n_legs: int64
animal: string

---
## convert_single_predicate
```python
from core import convert_single_predicate
```



---
## _build_nested_paths
```python
from core import _build_nested_paths
```



---
## schema
```python
from core import schema
```

Schema of the Dataset.

Examples
--------
Generate an example dataset:

>>> import pyarrow as pa
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(table, root_path='dataset_v2_schema',
...                     partition_cols=['year'])
>>> dataset = pq.ParquetDataset('dataset_v2_schema/')

Read the schema:

>>> dataset.schema
n_legs: int64
animal: string
year: dictionary<values=int32, indices=int32, ordered=0>

---
## schema_arrow
```python
from core import schema_arrow
```

Return the inferred Arrow schema, converted from the whole Parquet
file's schema

Examples
--------
Generate an example Parquet file:

>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')

Read the Arrow schema:

>>> parquet_file.schema_arrow
n_legs: int64
animal: string

---
## num_row_groups
```python
from core import num_row_groups
```

Return the number of row groups of the Parquet file.

Examples
--------
>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')

>>> parquet_file.num_row_groups
1

---
## closed
```python
from core import closed
```



---
## read_row_group
```python
from core import read_row_group
```

Read a single row group from a Parquet file.

Parameters
----------
i : int
    Index of the individual row group that we want to read.
columns : list
    If not None, only these columns will be read from the row group. A
    column name may be a prefix of a nested field, e.g. 'a' will select
    'a.b', 'a.c', and 'a.d.e'.
use_threads : bool, default True
    Perform multi-threaded column reads.
use_pandas_metadata : bool, default False
    If True and file has custom pandas schema metadata, ensure that
    index columns are also loaded.

Returns
-------
pyarrow.table.Table
    Content of the row group as a table (of columns)

Examples
--------
>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')

>>> parquet_file.read_row_group(0)
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[2,2,4,4,5,100]]
animal: [["Flamingo","Parrot",...,"Brittle stars","Centipede"]]

---
## read_row_groups
```python
from core import read_row_groups
```

Read a multiple row groups from a Parquet file.

Parameters
----------
row_groups : list
    Only these row groups will be read from the file.
columns : list
    If not None, only these columns will be read from the row group. A
    column name may be a prefix of a nested field, e.g. 'a' will select
    'a.b', 'a.c', and 'a.d.e'.
use_threads : bool, default True
    Perform multi-threaded column reads.
use_pandas_metadata : bool, default False
    If True and file has custom pandas schema metadata, ensure that
    index columns are also loaded.

Returns
-------
pyarrow.table.Table
    Content of the row groups as a table (of columns).

Examples
--------
>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')

>>> parquet_file.read_row_groups([0,0])
pyarrow.Table
n_legs: int64
animal: string
----
n_legs: [[2,2,4,4,5,...,2,4,4,5,100]]
animal: [["Flamingo","Parrot","Dog",...,"Brittle stars","Centipede"]]

---
## iter_batches
```python
from core import iter_batches
```

Read streaming batches from a Parquet file.

Parameters
----------
batch_size : int, default 64K
    Maximum number of records to yield per batch. Batches may be
    smaller if there aren't enough rows in the file.
row_groups : list
    Only these row groups will be read from the file.
columns : list
    If not None, only these columns will be read from the file. A
    column name may be a prefix of a nested field, e.g. 'a' will select
    'a.b', 'a.c', and 'a.d.e'.
use_threads : boolean, default True
    Perform multi-threaded column reads.
use_pandas_metadata : boolean, default False
    If True and file has custom pandas schema metadata, ensure that
    index columns are also loaded.

Yields
------
pyarrow.RecordBatch
    Contents of each batch as a record batch

Examples
--------
Generate an example Parquet file:

>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')
>>> for i in parquet_file.iter_batches():
...     print("RecordBatch")
...     print(i.to_pandas())
...
RecordBatch
   n_legs         animal
0       2       Flamingo
1       2         Parrot
2       4            Dog
3       4          Horse
4       5  Brittle stars
5     100      Centipede

---
## read
```python
from core import read
```

Read (multiple) Parquet files as a single pyarrow.Table.

Parameters
----------
columns : List[str]
    Names of columns to read from the dataset. The partition fields
    are not automatically included.
use_threads : bool, default True
    Perform multi-threaded column reads.
use_pandas_metadata : bool, default False
    If True and file has custom pandas schema metadata, ensure that
    index columns are also loaded.

Returns
-------
pyarrow.Table
    Content of the file as a table (of columns).

Examples
--------
Generate an example dataset:

>>> import pyarrow as pa
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(table, root_path='dataset_v2_read',
...                     partition_cols=['year'])
>>> dataset = pq.ParquetDataset('dataset_v2_read/')

Read the dataset:

>>> dataset.read(columns=["n_legs"])
pyarrow.Table
n_legs: int64
----
n_legs: [[5],[2],[4,100],[2,4]]

---
## scan_contents
```python
from core import scan_contents
```

Read contents of file for the given columns and batch size.

Notes
-----
This function's primary purpose is benchmarking.
The scan is executed on a single thread.

Parameters
----------
columns : list of integers, default None
    Select columns to read, if None scan all columns.
batch_size : int, default 64K
    Number of rows to read at a time internally.

Returns
-------
num_rows : int
    Number of rows in file

Examples
--------
>>> import pyarrow as pa
>>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_table(table, 'example.parquet')
>>> parquet_file = pq.ParquetFile('example.parquet')

>>> parquet_file.scan_contents()
6

---
## _get_column_indices
```python
from core import _get_column_indices
```



---
## write
```python
from core import write
```

Write RecordBatch or Table to the Parquet file.

Parameters
----------
table_or_batch : {RecordBatch, Table}
row_group_size : int, default None
    Maximum number of rows in each written row group. If None,
    the row group size will be the minimum of the input
    table or batch length and 1024 * 1024.

---
## write_batch
```python
from core import write_batch
```

Write RecordBatch to the Parquet file.

Parameters
----------
batch : RecordBatch
row_group_size : int, default None
    Maximum number of rows in written row group. If None, the
    row group size will be the minimum of the RecordBatch
    size and 1024 * 1024.  If set larger than 64Mi then 64Mi
    will be used instead.

---
## add_key_value_metadata
```python
from core import add_key_value_metadata
```

Add key-value metadata to the file.
This will overwrite any existing metadata with the same key.

Parameters
----------
key_value_metadata : dict
    Keys and values must be string-like / coercible to bytes.

---
## equals
```python
from core import equals
```



---
## _get_common_pandas_metadata
```python
from core import _get_common_pandas_metadata
```



---
## fragments
```python
from core import fragments
```

A list of the Dataset source fragments or pieces with absolute
file paths.

Examples
--------
Generate an example dataset:

>>> import pyarrow as pa
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(table, root_path='dataset_v2_fragments',
...                     partition_cols=['year'])
>>> dataset = pq.ParquetDataset('dataset_v2_fragments/')

List the fragments:

>>> dataset.fragments
[<pyarrow.dataset.ParquetFileFragment path=dataset_v2_fragments/...

---
## files
```python
from core import files
```

A list of absolute Parquet file paths in the Dataset source.

Examples
--------
Generate an example dataset:

>>> import pyarrow as pa
>>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021],
...                   'n_legs': [2, 2, 4, 4, 5, 100],
...                   'animal': ["Flamingo", "Parrot", "Dog", "Horse",
...                              "Brittle stars", "Centipede"]})
>>> import pyarrow.parquet as pq
>>> pq.write_to_dataset(table, root_path='dataset_v2_files',
...                     partition_cols=['year'])
>>> dataset = pq.ParquetDataset('dataset_v2_files/')

List the files:

>>> dataset.files
['dataset_v2_files/year=2019/...-0.parquet', ...

---
## filesystem
```python
from core import filesystem
```

The filesystem type of the Dataset source.

---
## partitioning
```python
from core import partitioning
```

The partitioning of the Dataset source, if discovered.

---
## file_visitor
```python
from core import file_visitor
```



---
## test_datetime
```python
from test_conversion import test_datetime
```



---
## test_array_to_pyarrowcolumn
```python
from test_conversion import test_array_to_pyarrowcolumn
```



---
## test_offset_of_sliced_array
```python
from test_conversion import test_offset_of_sliced_array
```



---
## test_pandas_roundtrip
```python
from test_conversion import test_pandas_roundtrip
```



---
## test_pandas_roundtrip_string
```python
from test_conversion import test_pandas_roundtrip_string
```



---
## test_pandas_roundtrip_large_string
```python
from test_conversion import test_pandas_roundtrip_large_string
```



---
## test_pandas_roundtrip_string_with_missing
```python
from test_conversion import test_pandas_roundtrip_string_with_missing
```



---
## test_pandas_roundtrip_categorical
```python
from test_conversion import test_pandas_roundtrip_categorical
```



---
## test_pandas_roundtrip_datetime
```python
from test_conversion import test_pandas_roundtrip_datetime
```



---
## test_pandas_to_pyarrow_with_missing
```python
from test_conversion import test_pandas_to_pyarrow_with_missing
```



---
## test_pandas_to_pyarrow_float16_with_missing
```python
from test_conversion import test_pandas_to_pyarrow_float16_with_missing
```



---
## test_pyarrow_roundtrip
```python
from test_conversion import test_pyarrow_roundtrip
```



---
## test_pyarrow_roundtrip_categorical
```python
from test_conversion import test_pyarrow_roundtrip_categorical
```



---
## test_pyarrow_roundtrip_large_string
```python
from test_conversion import test_pyarrow_roundtrip_large_string
```



---
## test_nan_as_null
```python
from test_conversion import test_nan_as_null
```



---
## test_allow_copy_false
```python
from test_conversion import test_allow_copy_false
```



---
## test_allow_copy_false_bool_categorical
```python
from test_conversion import test_allow_copy_false_bool_categorical
```



---
## test_empty_dataframe
```python
from test_conversion import test_empty_dataframe
```



---
## __name__
```python
from test_interchange_spec import __name__
```



---
## test_dtypes
```python
from test_interchange_spec import test_dtypes
```



---
## test_mixed_dtypes
```python
from test_interchange_spec import test_mixed_dtypes
```



---
## test_na_float
```python
from test_interchange_spec import test_na_float
```



---
## test_noncategorical
```python
from test_interchange_spec import test_noncategorical
```



---
## test_categorical
```python
from test_interchange_spec import test_categorical
```



---
## test_dataframe
```python
from test_interchange_spec import test_dataframe
```



---
## test_df_get_chunks
```python
from test_interchange_spec import test_df_get_chunks
```



---
## test_column_get_chunks
```python
from test_interchange_spec import test_column_get_chunks
```



---
## test_get_columns
```python
from test_interchange_spec import test_get_columns
```



---
## test_buffer
```python
from test_interchange_spec import test_buffer
```



---
## test_categorical_dtype
```python
from test_interchange_spec import test_categorical_dtype
```



---
## test_parquet_invalid_version
```python
from test_basic import test_parquet_invalid_version
```



---
## test_set_data_page_size
```python
from test_basic import test_set_data_page_size
```



---
## test_set_write_batch_size
```python
from test_basic import test_set_write_batch_size
```



---
## test_set_dictionary_pagesize_limit
```python
from test_basic import test_set_dictionary_pagesize_limit
```



---
## test_chunked_table_write
```python
from test_basic import test_chunked_table_write
```



---
## test_memory_map
```python
from test_basic import test_memory_map
```



---
## test_enable_buffered_stream
```python
from test_basic import test_enable_buffered_stream
```



---
## test_special_chars_filename
```python
from test_basic import test_special_chars_filename
```



---
## test_invalid_source
```python
from test_basic import test_invalid_source
```



---
## test_file_with_over_int16_max_row_groups
```python
from test_basic import test_file_with_over_int16_max_row_groups
```



---
## test_empty_table_roundtrip
```python
from test_basic import test_empty_table_roundtrip
```



---
## test_empty_table_no_columns
```python
from test_basic import test_empty_table_no_columns
```



---
## test_write_nested_zero_length_array_chunk_failure
```python
from test_basic import test_write_nested_zero_length_array_chunk_failure
```



---
## test_multiple_path_types
```python
from test_basic import test_multiple_path_types
```



---
## test_fspath
```python
from test_basic import test_fspath
```



---
## test_relative_paths
```python
from test_basic import test_relative_paths
```



---
## test_read_non_existing_file
```python
from test_basic import test_read_non_existing_file
```



---
## test_file_error_python_exception
```python
from test_basic import test_file_error_python_exception
```



---
## test_parquet_read_from_buffer
```python
from test_basic import test_parquet_read_from_buffer
```



---
## test_byte_stream_split
```python
from test_basic import test_byte_stream_split
```



---
## test_store_decimal_as_integer
```python
from test_basic import test_store_decimal_as_integer
```



---
## test_column_encoding
```python
from test_basic import test_column_encoding
```



---
## test_compression_level
```python
from test_basic import test_compression_level
```



---
## test_sanitized_spark_field_names
```python
from test_basic import test_sanitized_spark_field_names
```



---
## test_multithreaded_read
```python
from test_basic import test_multithreaded_read
```



---
## test_min_chunksize
```python
from test_basic import test_min_chunksize
```



---
## test_write_error_deletes_incomplete_file
```python
from test_basic import test_write_error_deletes_incomplete_file
```



---
## test_read_non_existent_file
```python
from test_basic import test_read_non_existent_file
```



---
## test_read_table_doesnt_warn
```python
from test_basic import test_read_table_doesnt_warn
```



---
## test_zlib_compression_bug
```python
from test_basic import test_zlib_compression_bug
```



---
## test_parquet_file_too_small
```python
from test_basic import test_parquet_file_too_small
```



---
## test_fastparquet_cross_compatibility
```python
from test_basic import test_fastparquet_cross_compatibility
```



---
## test_buffer_contents
```python
from test_basic import test_buffer_contents
```



---
## test_parquet_compression_roundtrip
```python
from test_basic import test_parquet_compression_roundtrip
```



---
## test_empty_row_groups
```python
from test_basic import test_empty_row_groups
```



---
## test_reads_over_batch
```python
from test_basic import test_reads_over_batch
```



---
## test_permutation_of_column_order
```python
from test_basic import test_permutation_of_column_order
```



---
## test_thrift_size_limits
```python
from test_basic import test_thrift_size_limits
```



---
## test_page_checksum_verification_write_table
```python
from test_basic import test_page_checksum_verification_write_table
```

Check that checksum verification works for datasets created with
pq.write_table()

---
## test_checksum_write_to_dataset
```python
from test_basic import test_checksum_write_to_dataset
```

Check that checksum verification works for datasets created with
pq.write_to_dataset

---
## test_deprecated_use_legacy_dataset
```python
from test_basic import test_deprecated_use_legacy_dataset
```



---
## BogusFile
```python
from test_basic import BogusFile
```



---
## read
```python
from test_basic import read
```



---
## seek
```python
from test_basic import seek
```



---
## datadir
```python
from conftest import datadir
```



---
## s3_bucket
```python
from conftest import s3_bucket
```



---
## s3_example_s3fs
```python
from conftest import s3_example_s3fs
```



---
## s3_example_fs
```python
from conftest import s3_example_fs
```



---
## InMemoryKmsClient
```python
from encryption import InMemoryKmsClient
```

This is a mock class implementation of KmsClient, built for testing
only.

---
## verify_file_encrypted
```python
from encryption import verify_file_encrypted
```

Verify that the file is encrypted by looking at its first 4 bytes.
If it's the magic string PARE
then this is a parquet with encrypted footer.

---
## __init__
```python
from encryption import __init__
```

Create an InMemoryKmsClient instance.

---
## wrap_key
```python
from encryption import wrap_key
```

Not a secure cipher - the wrapped key
is just the master key concatenated with key bytes

---
## unwrap_key
```python
from encryption import unwrap_key
```

Not a secure cipher - just extract the key from
the wrapped key

---
## __name__
```python
from test_parquet_writer import __name__
```



---
## test_parquet_incremental_file_build
```python
from test_parquet_writer import test_parquet_incremental_file_build
```



---
## test_validate_schema_write_table
```python
from test_parquet_writer import test_validate_schema_write_table
```



---
## test_parquet_invalid_writer
```python
from test_parquet_writer import test_parquet_invalid_writer
```



---
## test_parquet_writer_context_obj
```python
from test_parquet_writer import test_parquet_writer_context_obj
```



---
## test_parquet_writer_context_obj_with_exception
```python
from test_parquet_writer import test_parquet_writer_context_obj_with_exception
```



---
## test_parquet_writer_write_wrappers
```python
from test_parquet_writer import test_parquet_writer_write_wrappers
```



---
## test_parquet_writer_chunk_size
```python
from test_parquet_writer import test_parquet_writer_chunk_size
```



---
## test_parquet_writer_filesystem_local
```python
from test_parquet_writer import test_parquet_writer_filesystem_local
```



---
## test_parquet_writer_filesystem_s3
```python
from test_parquet_writer import test_parquet_writer_filesystem_s3
```



---
## test_parquet_writer_filesystem_s3_uri
```python
from test_parquet_writer import test_parquet_writer_filesystem_s3_uri
```



---
## test_parquet_writer_filesystem_s3fs
```python
from test_parquet_writer import test_parquet_writer_filesystem_s3fs
```



---
## test_parquet_writer_filesystem_buffer_raises
```python
from test_parquet_writer import test_parquet_writer_filesystem_buffer_raises
```



---
## test_parquet_writer_store_schema
```python
from test_parquet_writer import test_parquet_writer_store_schema
```



---
## test_parquet_writer_append_key_value_metadata
```python
from test_parquet_writer import test_parquet_writer_append_key_value_metadata
```



---
## check_chunk_size
```python
from test_parquet_writer import check_chunk_size
```



---
## __name__
```python
from test_metadata import __name__
```



---
## test_parquet_metadata_api
```python
from test_metadata import test_parquet_metadata_api
```



---
## test_parquet_metadata_lifetime
```python
from test_metadata import test_parquet_metadata_lifetime
```



---
## test_parquet_column_statistics_api
```python
from test_metadata import test_parquet_column_statistics_api
```



---
## _close
```python
from test_metadata import _close
```



---
## test_parquet_raise_on_unset_statistics
```python
from test_metadata import test_parquet_raise_on_unset_statistics
```



---
## test_statistics_convert_logical_types
```python
from test_metadata import test_statistics_convert_logical_types
```



---
## test_parquet_write_disable_statistics
```python
from test_metadata import test_parquet_write_disable_statistics
```



---
## test_parquet_sorting_column
```python
from test_metadata import test_parquet_sorting_column
```



---
## test_parquet_sorting_column_nested
```python
from test_metadata import test_parquet_sorting_column_nested
```



---
## test_parquet_file_sorting_columns
```python
from test_metadata import test_parquet_file_sorting_columns
```



---
## test_field_id_metadata
```python
from test_metadata import test_field_id_metadata
```



---
## test_parquet_file_page_index
```python
from test_metadata import test_parquet_file_page_index
```



---
## test_multi_dataset_metadata
```python
from test_metadata import test_multi_dataset_metadata
```



---
## test_metadata_hashing
```python
from test_metadata import test_metadata_hashing
```



---
## test_write_metadata
```python
from test_metadata import test_write_metadata
```



---
## test_table_large_metadata
```python
from test_metadata import test_table_large_metadata
```



---
## test_compare_schemas
```python
from test_metadata import test_compare_schemas
```



---
## test_read_schema
```python
from test_metadata import test_read_schema
```



---
## test_parquet_metadata_empty_to_dict
```python
from test_metadata import test_parquet_metadata_empty_to_dict
```



---
## test_metadata_exceeds_message_size
```python
from test_metadata import test_metadata_exceeds_message_size
```



---
## test_metadata_schema_filesystem
```python
from test_metadata import test_metadata_schema_filesystem
```



---
## test_metadata_equals
```python
from test_metadata import test_metadata_equals
```



---
## test_metadata_append_row_groups_diff
```python
from test_metadata import test_metadata_append_row_groups_diff
```



---
## test_write_metadata_fs_file_combinations
```python
from test_metadata import test_write_metadata_fs_file_combinations
```



---
## test_pandas_parquet_datetime_tz
```python
from test_datetime import test_pandas_parquet_datetime_tz
```



---
## test_datetime_timezone_tzinfo
```python
from test_datetime import test_datetime_timezone_tzinfo
```



---
## test_coerce_timestamps
```python
from test_datetime import test_coerce_timestamps
```



---
## test_coerce_timestamps_truncated
```python
from test_datetime import test_coerce_timestamps_truncated
```

ARROW-2555: Test that we can truncate timestamps when coercing if
explicitly allowed.

---
## test_date_time_types
```python
from test_datetime import test_date_time_types
```



---
## test_coerce_int96_timestamp_unit
```python
from test_datetime import test_coerce_int96_timestamp_unit
```



---
## test_coerce_int96_timestamp_overflow
```python
from test_datetime import test_coerce_int96_timestamp_overflow
```



---
## test_timestamp_restore_timezone
```python
from test_datetime import test_timestamp_restore_timezone
```



---
## test_timestamp_restore_timezone_nanosecond
```python
from test_datetime import test_timestamp_restore_timezone_nanosecond
```



---
## test_list_of_datetime_time_roundtrip
```python
from test_datetime import test_list_of_datetime_time_roundtrip
```



---
## test_parquet_version_timestamp_differences
```python
from test_datetime import test_parquet_version_timestamp_differences
```



---
## test_noncoerced_nanoseconds_written_without_exception
```python
from test_datetime import test_noncoerced_nanoseconds_written_without_exception
```



---
## test_duration_type
```python
from test_datetime import test_duration_type
```



---
## get_table
```python
from test_datetime import get_table
```



---
## _write_table
```python
from common import _write_table
```



---
## _read_table
```python
from common import _read_table
```



---
## _roundtrip_table
```python
from common import _roundtrip_table
```



---
## _check_roundtrip
```python
from common import _check_roundtrip
```



---
## _roundtrip_pandas_dataframe
```python
from common import _roundtrip_pandas_dataframe
```



---
## _random_integers
```python
from common import _random_integers
```



---
## _range_integers
```python
from common import _range_integers
```



---
## _test_dataframe
```python
from common import _test_dataframe
```



---
## make_sample_file
```python
from common import make_sample_file
```



---
## alltypes_sample
```python
from common import alltypes_sample
```



---
## test_filesystem_uri
```python
from test_dataset import test_filesystem_uri
```



---
## test_read_partitioned_directory
```python
from test_dataset import test_read_partitioned_directory
```



---
## test_read_partitioned_columns_selection
```python
from test_dataset import test_read_partitioned_columns_selection
```



---
## test_filters_equivalency
```python
from test_dataset import test_filters_equivalency
```



---
## test_filters_cutoff_exclusive_integer
```python
from test_dataset import test_filters_cutoff_exclusive_integer
```



---
## test_filters_cutoff_exclusive_datetime
```python
from test_dataset import test_filters_cutoff_exclusive_datetime
```



---
## test_filters_inclusive_datetime
```python
from test_dataset import test_filters_inclusive_datetime
```



---
## test_filters_inclusive_integer
```python
from test_dataset import test_filters_inclusive_integer
```



---
## test_filters_inclusive_set
```python
from test_dataset import test_filters_inclusive_set
```



---
## test_filters_invalid_pred_op
```python
from test_dataset import test_filters_invalid_pred_op
```



---
## test_filters_invalid_column
```python
from test_dataset import test_filters_invalid_column
```



---
## test_filters_read_table
```python
from test_dataset import test_filters_read_table
```



---
## test_partition_keys_with_underscores
```python
from test_dataset import test_partition_keys_with_underscores
```



---
## test_read_s3fs
```python
from test_dataset import test_read_s3fs
```



---
## test_read_directory_s3fs
```python
from test_dataset import test_read_directory_s3fs
```



---
## test_read_single_file_list
```python
from test_dataset import test_read_single_file_list
```



---
## test_read_partitioned_directory_s3fs
```python
from test_dataset import test_read_partitioned_directory_s3fs
```



---
## _partition_test_for_filesystem
```python
from test_dataset import _partition_test_for_filesystem
```



---
## _generate_partition_directories
```python
from test_dataset import _generate_partition_directories
```



---
## _filter_partition
```python
from test_dataset import _filter_partition
```



---
## test_filter_before_validate_schema
```python
from test_dataset import test_filter_before_validate_schema
```



---
## test_read_multiple_files
```python
from test_dataset import test_read_multiple_files
```



---
## test_dataset_read_pandas
```python
from test_dataset import test_dataset_read_pandas
```



---
## test_dataset_memory_map
```python
from test_dataset import test_dataset_memory_map
```



---
## test_dataset_enable_buffered_stream
```python
from test_dataset import test_dataset_enable_buffered_stream
```



---
## test_dataset_enable_pre_buffer
```python
from test_dataset import test_dataset_enable_pre_buffer
```



---
## _make_example_multifile_dataset
```python
from test_dataset import _make_example_multifile_dataset
```



---
## _assert_dataset_paths
```python
from test_dataset import _assert_dataset_paths
```



---
## test_ignore_private_directories
```python
from test_dataset import test_ignore_private_directories
```



---
## test_ignore_hidden_files_dot
```python
from test_dataset import test_ignore_hidden_files_dot
```



---
## test_ignore_hidden_files_underscore
```python
from test_dataset import test_ignore_hidden_files_underscore
```



---
## test_ignore_no_private_directories_in_base_path
```python
from test_dataset import test_ignore_no_private_directories_in_base_path
```



---
## test_ignore_custom_prefixes
```python
from test_dataset import test_ignore_custom_prefixes
```



---
## test_empty_directory
```python
from test_dataset import test_empty_directory
```



---
## _test_write_to_dataset_with_partitions
```python
from test_dataset import _test_write_to_dataset_with_partitions
```



---
## _test_write_to_dataset_no_partitions
```python
from test_dataset import _test_write_to_dataset_no_partitions
```



---
## test_write_to_dataset_with_partitions
```python
from test_dataset import test_write_to_dataset_with_partitions
```



---
## test_write_to_dataset_with_partitions_and_schema
```python
from test_dataset import test_write_to_dataset_with_partitions_and_schema
```



---
## test_write_to_dataset_with_partitions_and_index_name
```python
from test_dataset import test_write_to_dataset_with_partitions_and_index_name
```



---
## test_write_to_dataset_no_partitions
```python
from test_dataset import test_write_to_dataset_no_partitions
```



---
## test_write_to_dataset_pathlib
```python
from test_dataset import test_write_to_dataset_pathlib
```



---
## test_write_to_dataset_pathlib_nonlocal
```python
from test_dataset import test_write_to_dataset_pathlib_nonlocal
```



---
## test_write_to_dataset_with_partitions_s3fs
```python
from test_dataset import test_write_to_dataset_with_partitions_s3fs
```



---
## test_write_to_dataset_no_partitions_s3fs
```python
from test_dataset import test_write_to_dataset_no_partitions_s3fs
```



---
## test_write_to_dataset_filesystem
```python
from test_dataset import test_write_to_dataset_filesystem
```



---
## _make_dataset_for_pickling
```python
from test_dataset import _make_dataset_for_pickling
```



---
## test_pickle_dataset
```python
from test_dataset import test_pickle_dataset
```



---
## test_partitioned_dataset
```python
from test_dataset import test_partitioned_dataset
```



---
## test_dataset_read_dictionary
```python
from test_dataset import test_dataset_read_dictionary
```



---
## test_read_table_schema
```python
from test_dataset import test_read_table_schema
```



---
## test_read_table_duplicate_column_selection
```python
from test_dataset import test_read_table_duplicate_column_selection
```



---
## test_dataset_partitioning
```python
from test_dataset import test_dataset_partitioning
```



---
## test_parquet_dataset_new_filesystem
```python
from test_dataset import test_parquet_dataset_new_filesystem
```



---
## test_parquet_dataset_partitions_piece_path_with_fsspec
```python
from test_dataset import test_parquet_dataset_partitions_piece_path_with_fsspec
```



---
## test_parquet_write_to_dataset_exposed_keywords
```python
from test_dataset import test_parquet_write_to_dataset_exposed_keywords
```



---
## test_write_to_dataset_kwargs_passed
```python
from test_dataset import test_write_to_dataset_kwargs_passed
```

Verify kwargs in pq.write_to_dataset are passed onto ds.write_dataset

---
## test_write_to_dataset_category_observed
```python
from test_dataset import test_write_to_dataset_category_observed
```



---
## _visit_level
```python
from test_dataset import _visit_level
```



---
## read_multiple_files
```python
from test_dataset import read_multiple_files
```



---
## is_pickleable
```python
from test_dataset import is_pickleable
```



---
## __name__
```python
from test_data_types import __name__
```



---
## test_parquet_2_0_roundtrip
```python
from test_data_types import test_parquet_2_0_roundtrip
```



---
## test_parquet_1_0_roundtrip
```python
from test_data_types import test_parquet_1_0_roundtrip
```



---
## _simple_table_write_read
```python
from test_data_types import _simple_table_write_read
```



---
## test_direct_read_dictionary
```python
from test_data_types import test_direct_read_dictionary
```



---
## test_direct_read_dictionary_subfield
```python
from test_data_types import test_direct_read_dictionary_subfield
```



---
## test_dictionary_array_automatically_read
```python
from test_data_types import test_dictionary_array_automatically_read
```



---
## test_decimal_roundtrip
```python
from test_data_types import test_decimal_roundtrip
```



---
## test_decimal_roundtrip_negative_scale
```python
from test_data_types import test_decimal_roundtrip_negative_scale
```



---
## test_single_pylist_column_roundtrip
```python
from test_data_types import test_single_pylist_column_roundtrip
```



---
## test_empty_lists_table_roundtrip
```python
from test_data_types import test_empty_lists_table_roundtrip
```



---
## test_nested_list_nonnullable_roundtrip_bug
```python
from test_data_types import test_nested_list_nonnullable_roundtrip_bug
```



---
## test_nested_list_struct_multiple_batches_roundtrip
```python
from test_data_types import test_nested_list_struct_multiple_batches_roundtrip
```



---
## test_writing_empty_lists
```python
from test_data_types import test_writing_empty_lists
```



---
## test_column_of_arrays
```python
from test_data_types import test_column_of_arrays
```



---
## test_column_of_lists
```python
from test_data_types import test_column_of_lists
```



---
## test_large_list_records
```python
from test_data_types import test_large_list_records
```



---
## test_parquet_nested_convenience
```python
from test_data_types import test_parquet_nested_convenience
```



---
## test_fixed_size_binary
```python
from test_data_types import test_fixed_size_binary
```



---
## test_large_table_int32_overflow
```python
from test_data_types import test_large_table_int32_overflow
```



---
## _simple_table_roundtrip
```python
from test_data_types import _simple_table_roundtrip
```



---
## test_byte_array_exactly_2gb
```python
from test_data_types import test_byte_array_exactly_2gb
```



---
## test_binary_array_overflow_to_chunked
```python
from test_data_types import test_binary_array_overflow_to_chunked
```



---
## test_list_of_binary_large_cell
```python
from test_data_types import test_list_of_binary_large_cell
```



---
## test_large_binary
```python
from test_data_types import test_large_binary
```



---
## test_large_binary_huge
```python
from test_data_types import test_large_binary_huge
```



---
## test_large_binary_overflow
```python
from test_data_types import test_large_binary_overflow
```



---
## test_pandas_parquet_custom_metadata
```python
from test_pandas import test_pandas_parquet_custom_metadata
```



---
## test_merging_parquet_tables_with_different_pandas_metadata
```python
from test_pandas import test_merging_parquet_tables_with_different_pandas_metadata
```



---
## test_pandas_parquet_column_multiindex
```python
from test_pandas import test_pandas_parquet_column_multiindex
```



---
## test_pandas_parquet_2_0_roundtrip_read_pandas_no_index_written
```python
from test_pandas import test_pandas_parquet_2_0_roundtrip_read_pandas_no_index_written
```



---
## test_pandas_parquet_native_file_roundtrip
```python
from test_pandas import test_pandas_parquet_native_file_roundtrip
```



---
## test_read_pandas_column_subset
```python
from test_pandas import test_read_pandas_column_subset
```



---
## test_pandas_parquet_empty_roundtrip
```python
from test_pandas import test_pandas_parquet_empty_roundtrip
```



---
## test_pandas_can_write_nested_data
```python
from test_pandas import test_pandas_can_write_nested_data
```



---
## test_pandas_parquet_pyfile_roundtrip
```python
from test_pandas import test_pandas_parquet_pyfile_roundtrip
```



---
## test_pandas_parquet_configuration_options
```python
from test_pandas import test_pandas_parquet_configuration_options
```



---
## test_spark_flavor_preserves_pandas_metadata
```python
from test_pandas import test_spark_flavor_preserves_pandas_metadata
```



---
## test_index_column_name_duplicate
```python
from test_pandas import test_index_column_name_duplicate
```



---
## test_backwards_compatible_index_naming
```python
from test_pandas import test_backwards_compatible_index_naming
```



---
## test_backwards_compatible_index_multi_level_named
```python
from test_pandas import test_backwards_compatible_index_multi_level_named
```



---
## test_backwards_compatible_index_multi_level_some_named
```python
from test_pandas import test_backwards_compatible_index_multi_level_some_named
```



---
## test_backwards_compatible_column_metadata_handling
```python
from test_pandas import test_backwards_compatible_column_metadata_handling
```



---
## test_categorical_index_survives_roundtrip
```python
from test_pandas import test_categorical_index_survives_roundtrip
```



---
## test_categorical_order_survives_roundtrip
```python
from test_pandas import test_categorical_order_survives_roundtrip
```



---
## test_pandas_categorical_na_type_row_groups
```python
from test_pandas import test_pandas_categorical_na_type_row_groups
```



---
## test_pandas_categorical_roundtrip
```python
from test_pandas import test_pandas_categorical_roundtrip
```



---
## test_categories_with_string_pyarrow_dtype
```python
from test_pandas import test_categories_with_string_pyarrow_dtype
```



---
## test_write_to_dataset_pandas_preserve_extensiondtypes
```python
from test_pandas import test_write_to_dataset_pandas_preserve_extensiondtypes
```



---
## test_write_to_dataset_pandas_preserve_index
```python
from test_pandas import test_write_to_dataset_pandas_preserve_index
```



---
## test_dataset_read_pandas_common_metadata
```python
from test_pandas import test_dataset_read_pandas_common_metadata
```



---
## test_read_pandas_passthrough_keywords
```python
from test_pandas import test_read_pandas_passthrough_keywords
```



---
## test_read_pandas_map_fields
```python
from test_pandas import test_read_pandas_map_fields
```



---
## __name__
```python
from test_parquet_file import __name__
```



---
## test_pass_separate_metadata
```python
from test_parquet_file import test_pass_separate_metadata
```



---
## test_read_single_row_group
```python
from test_parquet_file import test_read_single_row_group
```



---
## test_read_single_row_group_with_column_subset
```python
from test_parquet_file import test_read_single_row_group_with_column_subset
```



---
## test_read_multiple_row_groups
```python
from test_parquet_file import test_read_multiple_row_groups
```



---
## test_read_multiple_row_groups_with_column_subset
```python
from test_parquet_file import test_read_multiple_row_groups_with_column_subset
```



---
## test_scan_contents
```python
from test_parquet_file import test_scan_contents
```



---
## test_parquet_file_pass_directory_instead_of_file
```python
from test_parquet_file import test_parquet_file_pass_directory_instead_of_file
```



---
## test_read_column_invalid_index
```python
from test_parquet_file import test_read_column_invalid_index
```



---
## test_iter_batches_columns_reader
```python
from test_parquet_file import test_iter_batches_columns_reader
```



---
## test_iter_batches_reader
```python
from test_parquet_file import test_iter_batches_reader
```



---
## test_pre_buffer
```python
from test_parquet_file import test_pre_buffer
```



---
## test_parquet_file_explicitly_closed
```python
from test_parquet_file import test_parquet_file_explicitly_closed
```

Unopened files should be closed explicitly after use,
and previously opened files should be left open.
Applies to read_table, ParquetDataset, and ParquetFile

---
## test_parquet_file_with_filesystem
```python
from test_parquet_file import test_parquet_file_with_filesystem
```



---
## get_all_batches
```python
from test_parquet_file import get_all_batches
```



---
## __name__
```python
from test_compliant_nested_type import __name__
```



---
## test_write_compliant_nested_type_enable
```python
from test_compliant_nested_type import test_write_compliant_nested_type_enable
```



---
## test_write_compliant_nested_type_disable
```python
from test_compliant_nested_type import test_write_compliant_nested_type_disable
```



---
## __name__
```python
from test_encryption import __name__
```



---
## data_table
```python
from test_encryption import data_table
```



---
## basic_encryption_config
```python
from test_encryption import basic_encryption_config
```



---
## setup_encryption_environment
```python
from test_encryption import setup_encryption_environment
```

Sets up and returns the KMS connection configuration and crypto factory
based on provided KMS configuration parameters.

---
## write_encrypted_file
```python
from test_encryption import write_encrypted_file
```

Writes an encrypted parquet file based on the provided parameters.

---
## test_encrypted_parquet_write_read
```python
from test_encryption import test_encrypted_parquet_write_read
```

Write an encrypted parquet, verify it's encrypted, and then read it.

---
## write_encrypted_parquet
```python
from test_encryption import write_encrypted_parquet
```



---
## read_encrypted_parquet
```python
from test_encryption import read_encrypted_parquet
```



---
## test_encrypted_parquet_write_read_wrong_key
```python
from test_encryption import test_encrypted_parquet_write_read_wrong_key
```

Write an encrypted parquet, verify it's encrypted,
and then read it using wrong keys.

---
## test_encrypted_parquet_read_no_decryption_config
```python
from test_encryption import test_encrypted_parquet_read_no_decryption_config
```

Write an encrypted parquet, verify it's encrypted,
but then try to read it without decryption properties.

---
## test_encrypted_parquet_read_metadata_no_decryption_config
```python
from test_encryption import test_encrypted_parquet_read_metadata_no_decryption_config
```

Write an encrypted parquet, verify it's encrypted,
but then try to read its metadata without decryption properties.

---
## test_encrypted_parquet_read_schema_no_decryption_config
```python
from test_encryption import test_encrypted_parquet_read_schema_no_decryption_config
```

Write an encrypted parquet, verify it's encrypted,
but then try to read its schema without decryption properties.

---
## test_encrypted_parquet_write_no_col_key
```python
from test_encryption import test_encrypted_parquet_write_no_col_key
```

Write an encrypted parquet, but give only footer key,
without column key.

---
## test_encrypted_parquet_write_kms_error
```python
from test_encryption import test_encrypted_parquet_write_kms_error
```

Write an encrypted parquet, but raise KeyError in KmsClient.

---
## test_encrypted_parquet_write_kms_specific_error
```python
from test_encryption import test_encrypted_parquet_write_kms_specific_error
```

Write an encrypted parquet, but raise KeyError in KmsClient.

---
## test_encrypted_parquet_write_kms_factory_error
```python
from test_encryption import test_encrypted_parquet_write_kms_factory_error
```

Write an encrypted parquet, but raise ValueError in kms_factory.

---
## test_encrypted_parquet_write_kms_factory_type_error
```python
from test_encryption import test_encrypted_parquet_write_kms_factory_type_error
```

Write an encrypted parquet, but use wrong KMS client type
that doesn't implement KmsClient.

---
## test_encrypted_parquet_encryption_configuration
```python
from test_encryption import test_encrypted_parquet_encryption_configuration
```



---
## test_encrypted_parquet_decryption_configuration
```python
from test_encryption import test_encrypted_parquet_decryption_configuration
```



---
## test_encrypted_parquet_kms_configuration
```python
from test_encryption import test_encrypted_parquet_kms_configuration
```



---
## test_encrypted_parquet_write_read_plain_footer_single_wrapping
```python
from test_encryption import test_encrypted_parquet_write_read_plain_footer_single_wrapping
```

Write an encrypted parquet, with plaintext footer
and with single wrapping,
verify it's encrypted, and then read plaintext columns.

---
## test_encrypted_parquet_write_external
```python
from test_encryption import test_encrypted_parquet_write_external
```

Write an encrypted parquet, with external key
material.
Currently it's not implemented, so should throw
an exception

---
## test_encrypted_parquet_loop
```python
from test_encryption import test_encrypted_parquet_loop
```

Write an encrypted parquet, verify it's encrypted,
and then read it multithreaded in a loop.

---
## test_read_with_deleted_crypto_factory
```python
from test_encryption import test_read_with_deleted_crypto_factory
```

Test that decryption properties can be used if the crypto factory is no longer alive

---
## test_encrypted_parquet_read_table
```python
from test_encryption import test_encrypted_parquet_read_table
```

Write an encrypted parquet then read it back using read_table.

---
## kms_factory
```python
from test_encryption import kms_factory
```



---
## ThrowingKmsClient
```python
from test_encryption import ThrowingKmsClient
```

A KmsClient implementation that throws exception in
wrap/unwrap calls

---
## WrongTypeKmsClient
```python
from test_encryption import WrongTypeKmsClient
```

This is not an implementation of KmsClient.
        

---
## validate_encryption_configuration
```python
from test_encryption import validate_encryption_configuration
```



---
## validate_kms_connection_config
```python
from test_encryption import validate_kms_connection_config
```



---
## __init__
```python
from test_encryption import __init__
```



---
## wrap_key
```python
from test_encryption import wrap_key
```



---
## unwrap_key
```python
from test_encryption import unwrap_key
```



---
